提交 | 用户 | 时间
|
58d006
|
1 |
;(function(window, document, undefined) { |
A |
2 |
"use strict"; |
|
3 |
|
|
4 |
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){ |
|
5 |
// SweetAlert |
|
6 |
// 2014-2015 (c) - Tristan Edwards |
|
7 |
// github.com/t4t5/sweetalert |
|
8 |
|
|
9 |
/* |
|
10 |
* jQuery-like functions for manipulating the DOM |
|
11 |
*/ |
|
12 |
'use strict'; |
|
13 |
|
|
14 |
Object.defineProperty(exports, '__esModule', { |
|
15 |
value: true |
|
16 |
}); |
|
17 |
|
|
18 |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } |
|
19 |
|
|
20 |
var _modulesHandleDom = require('./modules/handle-dom'); |
|
21 |
|
|
22 |
/* |
|
23 |
* Handy utilities |
|
24 |
*/ |
|
25 |
|
|
26 |
var _modulesUtils = require('./modules/utils'); |
|
27 |
|
|
28 |
/* |
|
29 |
* Handle sweetAlert's DOM elements |
|
30 |
*/ |
|
31 |
|
|
32 |
var _modulesHandleSwalDom = require('./modules/handle-swal-dom'); |
|
33 |
|
|
34 |
// Handle button events and keyboard events |
|
35 |
|
|
36 |
var _modulesHandleClick = require('./modules/handle-click'); |
|
37 |
|
|
38 |
var _modulesHandleKey = require('./modules/handle-key'); |
|
39 |
|
|
40 |
var _modulesHandleKey2 = _interopRequireDefault(_modulesHandleKey); |
|
41 |
|
|
42 |
// Default values |
|
43 |
|
|
44 |
var _modulesDefaultParams = require('./modules/default-params'); |
|
45 |
|
|
46 |
var _modulesDefaultParams2 = _interopRequireDefault(_modulesDefaultParams); |
|
47 |
|
|
48 |
var _modulesSetParams = require('./modules/set-params'); |
|
49 |
|
|
50 |
var _modulesSetParams2 = _interopRequireDefault(_modulesSetParams); |
|
51 |
|
|
52 |
/* |
|
53 |
* Remember state in cases where opening and handling a modal will fiddle with it. |
|
54 |
* (We also use window.previousActiveElement as a global variable) |
|
55 |
*/ |
|
56 |
var previousWindowKeyDown; |
|
57 |
var lastFocusedButton; |
|
58 |
|
|
59 |
/* |
|
60 |
* Global sweetAlert function |
|
61 |
* (this is what the user calls) |
|
62 |
*/ |
|
63 |
var sweetAlert, swal; |
|
64 |
|
|
65 |
exports['default'] = sweetAlert = swal = function () { |
|
66 |
var customizations = arguments[0]; |
|
67 |
|
|
68 |
(0, _modulesHandleDom.addClass)(document.body, 'stop-scrolling'); |
|
69 |
(0, _modulesHandleSwalDom.resetInput)(); |
|
70 |
|
|
71 |
/* |
|
72 |
* Use argument if defined or default value from params object otherwise. |
|
73 |
* Supports the case where a default value is boolean true and should be |
|
74 |
* overridden by a corresponding explicit argument which is boolean false. |
|
75 |
*/ |
|
76 |
function argumentOrDefault(key) { |
|
77 |
var args = customizations; |
|
78 |
return args[key] === undefined ? _modulesDefaultParams2['default'][key] : args[key]; |
|
79 |
} |
|
80 |
|
|
81 |
if (customizations === undefined) { |
|
82 |
(0, _modulesUtils.logStr)('SweetAlert expects at least 1 attribute!'); |
|
83 |
return false; |
|
84 |
} |
|
85 |
|
|
86 |
var params = (0, _modulesUtils.extend)({}, _modulesDefaultParams2['default']); |
|
87 |
|
|
88 |
switch (typeof customizations) { |
|
89 |
|
|
90 |
// Ex: swal("Hello", "Just testing", "info"); |
|
91 |
case 'string': |
|
92 |
params.title = customizations; |
|
93 |
params.text = arguments[1] || ''; |
|
94 |
params.type = arguments[2] || ''; |
|
95 |
break; |
|
96 |
|
|
97 |
// Ex: swal({ title:"Hello", text: "Just testing", type: "info" }); |
|
98 |
case 'object': |
|
99 |
if (customizations.title === undefined) { |
|
100 |
(0, _modulesUtils.logStr)('Missing "title" argument!'); |
|
101 |
return false; |
|
102 |
} |
|
103 |
|
|
104 |
params.title = customizations.title; |
|
105 |
|
|
106 |
for (var customName in _modulesDefaultParams2['default']) { |
|
107 |
params[customName] = argumentOrDefault(customName); |
|
108 |
} |
|
109 |
|
|
110 |
// Show "Confirm" instead of "OK" if cancel button is visible |
|
111 |
params.confirmButtonText = params.showCancelButton ? 'Confirm' : _modulesDefaultParams2['default'].confirmButtonText; |
|
112 |
params.confirmButtonText = argumentOrDefault('confirmButtonText'); |
|
113 |
|
|
114 |
// Callback function when clicking on "OK"/"Cancel" |
|
115 |
params.doneFunction = arguments[1] || null; |
|
116 |
|
|
117 |
break; |
|
118 |
|
|
119 |
default: |
|
120 |
(0, _modulesUtils.logStr)('Unexpected type of argument! Expected "string" or "object", got ' + typeof customizations); |
|
121 |
return false; |
|
122 |
|
|
123 |
} |
|
124 |
|
|
125 |
(0, _modulesSetParams2['default'])(params); |
|
126 |
(0, _modulesHandleSwalDom.fixVerticalPosition)(); |
|
127 |
(0, _modulesHandleSwalDom.openModal)(arguments[1]); |
|
128 |
|
|
129 |
// Modal interactions |
|
130 |
var modal = (0, _modulesHandleSwalDom.getModal)(); |
|
131 |
|
|
132 |
/* |
|
133 |
* Make sure all modal buttons respond to all events |
|
134 |
*/ |
|
135 |
var $buttons = modal.querySelectorAll('button'); |
|
136 |
var buttonEvents = ['onclick', 'onmouseover', 'onmouseout', 'onmousedown', 'onmouseup', 'onfocus']; |
|
137 |
var onButtonEvent = function onButtonEvent(e) { |
|
138 |
return (0, _modulesHandleClick.handleButton)(e, params, modal); |
|
139 |
}; |
|
140 |
|
|
141 |
for (var btnIndex = 0; btnIndex < $buttons.length; btnIndex++) { |
|
142 |
for (var evtIndex = 0; evtIndex < buttonEvents.length; evtIndex++) { |
|
143 |
var btnEvt = buttonEvents[evtIndex]; |
|
144 |
$buttons[btnIndex][btnEvt] = onButtonEvent; |
|
145 |
} |
|
146 |
} |
|
147 |
|
|
148 |
// Clicking outside the modal dismisses it (if allowed by user) |
|
149 |
(0, _modulesHandleSwalDom.getOverlay)().onclick = onButtonEvent; |
|
150 |
|
|
151 |
previousWindowKeyDown = window.onkeydown; |
|
152 |
|
|
153 |
var onKeyEvent = function onKeyEvent(e) { |
|
154 |
return (0, _modulesHandleKey2['default'])(e, params, modal); |
|
155 |
}; |
|
156 |
window.onkeydown = onKeyEvent; |
|
157 |
|
|
158 |
window.onfocus = function () { |
|
159 |
// When the user has focused away and focused back from the whole window. |
|
160 |
setTimeout(function () { |
|
161 |
// Put in a timeout to jump out of the event sequence. |
|
162 |
// Calling focus() in the event sequence confuses things. |
|
163 |
if (lastFocusedButton !== undefined) { |
|
164 |
lastFocusedButton.focus(); |
|
165 |
lastFocusedButton = undefined; |
|
166 |
} |
|
167 |
}, 0); |
|
168 |
}; |
|
169 |
|
|
170 |
// Show alert with enabled buttons always |
|
171 |
swal.enableButtons(); |
|
172 |
}; |
|
173 |
|
|
174 |
/* |
|
175 |
* Set default params for each popup |
|
176 |
* @param {Object} userParams |
|
177 |
*/ |
|
178 |
sweetAlert.setDefaults = swal.setDefaults = function (userParams) { |
|
179 |
if (!userParams) { |
|
180 |
throw new Error('userParams is required'); |
|
181 |
} |
|
182 |
if (typeof userParams !== 'object') { |
|
183 |
throw new Error('userParams has to be a object'); |
|
184 |
} |
|
185 |
|
|
186 |
(0, _modulesUtils.extend)(_modulesDefaultParams2['default'], userParams); |
|
187 |
}; |
|
188 |
|
|
189 |
/* |
|
190 |
* Animation when closing modal |
|
191 |
*/ |
|
192 |
sweetAlert.close = swal.close = function () { |
|
193 |
var modal = (0, _modulesHandleSwalDom.getModal)(); |
|
194 |
|
|
195 |
(0, _modulesHandleDom.fadeOut)((0, _modulesHandleSwalDom.getOverlay)(), 5); |
|
196 |
(0, _modulesHandleDom.fadeOut)(modal, 5); |
|
197 |
(0, _modulesHandleDom.removeClass)(modal, 'showSweetAlert'); |
|
198 |
(0, _modulesHandleDom.addClass)(modal, 'hideSweetAlert'); |
|
199 |
(0, _modulesHandleDom.removeClass)(modal, 'visible'); |
|
200 |
|
|
201 |
/* |
|
202 |
* Reset icon animations |
|
203 |
*/ |
|
204 |
var $successIcon = modal.querySelector('.sa-icon.sa-success'); |
|
205 |
(0, _modulesHandleDom.removeClass)($successIcon, 'animate'); |
|
206 |
(0, _modulesHandleDom.removeClass)($successIcon.querySelector('.sa-tip'), 'animateSuccessTip'); |
|
207 |
(0, _modulesHandleDom.removeClass)($successIcon.querySelector('.sa-long'), 'animateSuccessLong'); |
|
208 |
|
|
209 |
var $errorIcon = modal.querySelector('.sa-icon.sa-error'); |
|
210 |
(0, _modulesHandleDom.removeClass)($errorIcon, 'animateErrorIcon'); |
|
211 |
(0, _modulesHandleDom.removeClass)($errorIcon.querySelector('.sa-x-mark'), 'animateXMark'); |
|
212 |
|
|
213 |
var $warningIcon = modal.querySelector('.sa-icon.sa-warning'); |
|
214 |
(0, _modulesHandleDom.removeClass)($warningIcon, 'pulseWarning'); |
|
215 |
(0, _modulesHandleDom.removeClass)($warningIcon.querySelector('.sa-body'), 'pulseWarningIns'); |
|
216 |
(0, _modulesHandleDom.removeClass)($warningIcon.querySelector('.sa-dot'), 'pulseWarningIns'); |
|
217 |
|
|
218 |
// Reset custom class (delay so that UI changes aren't visible) |
|
219 |
setTimeout(function () { |
|
220 |
var customClass = modal.getAttribute('data-custom-class'); |
|
221 |
(0, _modulesHandleDom.removeClass)(modal, customClass); |
|
222 |
}, 300); |
|
223 |
|
|
224 |
// Make page scrollable again |
|
225 |
(0, _modulesHandleDom.removeClass)(document.body, 'stop-scrolling'); |
|
226 |
|
|
227 |
// Reset the page to its previous state |
|
228 |
window.onkeydown = previousWindowKeyDown; |
|
229 |
if (window.previousActiveElement) { |
|
230 |
window.previousActiveElement.focus(); |
|
231 |
} |
|
232 |
lastFocusedButton = undefined; |
|
233 |
clearTimeout(modal.timeout); |
|
234 |
|
|
235 |
return true; |
|
236 |
}; |
|
237 |
|
|
238 |
/* |
|
239 |
* Validation of the input field is done by user |
|
240 |
* If something is wrong => call showInputError with errorMessage |
|
241 |
*/ |
|
242 |
sweetAlert.showInputError = swal.showInputError = function (errorMessage) { |
|
243 |
var modal = (0, _modulesHandleSwalDom.getModal)(); |
|
244 |
|
|
245 |
var $errorIcon = modal.querySelector('.sa-input-error'); |
|
246 |
(0, _modulesHandleDom.addClass)($errorIcon, 'show'); |
|
247 |
|
|
248 |
var $errorContainer = modal.querySelector('.sa-error-container'); |
|
249 |
(0, _modulesHandleDom.addClass)($errorContainer, 'show'); |
|
250 |
|
|
251 |
$errorContainer.querySelector('p').innerHTML = errorMessage; |
|
252 |
|
|
253 |
setTimeout(function () { |
|
254 |
sweetAlert.enableButtons(); |
|
255 |
}, 1); |
|
256 |
|
|
257 |
modal.querySelector('input').focus(); |
|
258 |
}; |
|
259 |
|
|
260 |
/* |
|
261 |
* Reset input error DOM elements |
|
262 |
*/ |
|
263 |
sweetAlert.resetInputError = swal.resetInputError = function (event) { |
|
264 |
// If press enter => ignore |
|
265 |
if (event && event.keyCode === 13) { |
|
266 |
return false; |
|
267 |
} |
|
268 |
|
|
269 |
var $modal = (0, _modulesHandleSwalDom.getModal)(); |
|
270 |
|
|
271 |
var $errorIcon = $modal.querySelector('.sa-input-error'); |
|
272 |
(0, _modulesHandleDom.removeClass)($errorIcon, 'show'); |
|
273 |
|
|
274 |
var $errorContainer = $modal.querySelector('.sa-error-container'); |
|
275 |
(0, _modulesHandleDom.removeClass)($errorContainer, 'show'); |
|
276 |
}; |
|
277 |
|
|
278 |
/* |
|
279 |
* Disable confirm and cancel buttons |
|
280 |
*/ |
|
281 |
sweetAlert.disableButtons = swal.disableButtons = function (event) { |
|
282 |
var modal = (0, _modulesHandleSwalDom.getModal)(); |
|
283 |
var $confirmButton = modal.querySelector('button.confirm'); |
|
284 |
var $cancelButton = modal.querySelector('button.cancel'); |
|
285 |
$confirmButton.disabled = true; |
|
286 |
$cancelButton.disabled = true; |
|
287 |
}; |
|
288 |
|
|
289 |
/* |
|
290 |
* Enable confirm and cancel buttons |
|
291 |
*/ |
|
292 |
sweetAlert.enableButtons = swal.enableButtons = function (event) { |
|
293 |
var modal = (0, _modulesHandleSwalDom.getModal)(); |
|
294 |
var $confirmButton = modal.querySelector('button.confirm'); |
|
295 |
var $cancelButton = modal.querySelector('button.cancel'); |
|
296 |
$confirmButton.disabled = false; |
|
297 |
$cancelButton.disabled = false; |
|
298 |
}; |
|
299 |
|
|
300 |
if (typeof window !== 'undefined') { |
|
301 |
// The 'handle-click' module requires |
|
302 |
// that 'sweetAlert' was set as global. |
|
303 |
window.sweetAlert = window.swal = sweetAlert; |
|
304 |
} else { |
|
305 |
(0, _modulesUtils.logStr)('SweetAlert is a frontend module!'); |
|
306 |
} |
|
307 |
module.exports = exports['default']; |
|
308 |
|
|
309 |
},{"./modules/default-params":2,"./modules/handle-click":3,"./modules/handle-dom":4,"./modules/handle-key":5,"./modules/handle-swal-dom":6,"./modules/set-params":8,"./modules/utils":9}],2:[function(require,module,exports){ |
|
310 |
'use strict'; |
|
311 |
|
|
312 |
Object.defineProperty(exports, '__esModule', { |
|
313 |
value: true |
|
314 |
}); |
|
315 |
var defaultParams = { |
|
316 |
title: '', |
|
317 |
text: '', |
|
318 |
type: null, |
|
319 |
allowOutsideClick: false, |
|
320 |
showConfirmButton: true, |
|
321 |
showCancelButton: false, |
|
322 |
closeOnConfirm: true, |
|
323 |
closeOnCancel: true, |
|
324 |
confirmButtonText: 'OK', |
|
325 |
confirmButtonColor: '#8CD4F5', |
|
326 |
cancelButtonText: 'Cancel', |
|
327 |
imageUrl: null, |
|
328 |
imageSize: null, |
|
329 |
timer: null, |
|
330 |
customClass: '', |
|
331 |
html: false, |
|
332 |
animation: true, |
|
333 |
allowEscapeKey: true, |
|
334 |
inputType: 'text', |
|
335 |
inputPlaceholder: '', |
|
336 |
inputValue: '', |
|
337 |
showLoaderOnConfirm: false |
|
338 |
}; |
|
339 |
|
|
340 |
exports['default'] = defaultParams; |
|
341 |
module.exports = exports['default']; |
|
342 |
|
|
343 |
},{}],3:[function(require,module,exports){ |
|
344 |
'use strict'; |
|
345 |
|
|
346 |
Object.defineProperty(exports, '__esModule', { |
|
347 |
value: true |
|
348 |
}); |
|
349 |
|
|
350 |
var _utils = require('./utils'); |
|
351 |
|
|
352 |
var _handleSwalDom = require('./handle-swal-dom'); |
|
353 |
|
|
354 |
var _handleDom = require('./handle-dom'); |
|
355 |
|
|
356 |
/* |
|
357 |
* User clicked on "Confirm"/"OK" or "Cancel" |
|
358 |
*/ |
|
359 |
var handleButton = function handleButton(event, params, modal) { |
|
360 |
var e = event || window.event; |
|
361 |
var target = e.target || e.srcElement; |
|
362 |
|
|
363 |
var targetedConfirm = target.className.indexOf('confirm') !== -1; |
|
364 |
var targetedOverlay = target.className.indexOf('sweet-overlay') !== -1; |
|
365 |
var modalIsVisible = (0, _handleDom.hasClass)(modal, 'visible'); |
|
366 |
var doneFunctionExists = params.doneFunction && modal.getAttribute('data-has-done-function') === 'true'; |
|
367 |
|
|
368 |
// Since the user can change the background-color of the confirm button programmatically, |
|
369 |
// we must calculate what the color should be on hover/active |
|
370 |
var normalColor, hoverColor, activeColor; |
|
371 |
if (targetedConfirm && params.confirmButtonColor) { |
|
372 |
normalColor = params.confirmButtonColor; |
|
373 |
hoverColor = (0, _utils.colorLuminance)(normalColor, -0.04); |
|
374 |
activeColor = (0, _utils.colorLuminance)(normalColor, -0.14); |
|
375 |
} |
|
376 |
|
|
377 |
function shouldSetConfirmButtonColor(color) { |
|
378 |
if (targetedConfirm && params.confirmButtonColor) { |
|
379 |
target.style.backgroundColor = color; |
|
380 |
} |
|
381 |
} |
|
382 |
|
|
383 |
switch (e.type) { |
|
384 |
case 'mouseover': |
|
385 |
shouldSetConfirmButtonColor(hoverColor); |
|
386 |
break; |
|
387 |
|
|
388 |
case 'mouseout': |
|
389 |
shouldSetConfirmButtonColor(normalColor); |
|
390 |
break; |
|
391 |
|
|
392 |
case 'mousedown': |
|
393 |
shouldSetConfirmButtonColor(activeColor); |
|
394 |
break; |
|
395 |
|
|
396 |
case 'mouseup': |
|
397 |
shouldSetConfirmButtonColor(hoverColor); |
|
398 |
break; |
|
399 |
|
|
400 |
case 'focus': |
|
401 |
var $confirmButton = modal.querySelector('button.confirm'); |
|
402 |
var $cancelButton = modal.querySelector('button.cancel'); |
|
403 |
|
|
404 |
if (targetedConfirm) { |
|
405 |
$cancelButton.style.boxShadow = 'none'; |
|
406 |
} else { |
|
407 |
$confirmButton.style.boxShadow = 'none'; |
|
408 |
} |
|
409 |
break; |
|
410 |
|
|
411 |
case 'click': |
|
412 |
var clickedOnModal = modal === target; |
|
413 |
var clickedOnModalChild = (0, _handleDom.isDescendant)(modal, target); |
|
414 |
|
|
415 |
// Ignore click outside if allowOutsideClick is false |
|
416 |
if (!clickedOnModal && !clickedOnModalChild && modalIsVisible && !params.allowOutsideClick) { |
|
417 |
break; |
|
418 |
} |
|
419 |
|
|
420 |
if (targetedConfirm && doneFunctionExists && modalIsVisible) { |
|
421 |
handleConfirm(modal, params); |
|
422 |
} else if (doneFunctionExists && modalIsVisible || targetedOverlay) { |
|
423 |
handleCancel(modal, params); |
|
424 |
} else if ((0, _handleDom.isDescendant)(modal, target) && target.tagName === 'BUTTON') { |
|
425 |
sweetAlert.close(); |
|
426 |
} |
|
427 |
break; |
|
428 |
} |
|
429 |
}; |
|
430 |
|
|
431 |
/* |
|
432 |
* User clicked on "Confirm"/"OK" |
|
433 |
*/ |
|
434 |
var handleConfirm = function handleConfirm(modal, params) { |
|
435 |
var callbackValue = true; |
|
436 |
|
|
437 |
if ((0, _handleDom.hasClass)(modal, 'show-input')) { |
|
438 |
callbackValue = modal.querySelector('input').value; |
|
439 |
|
|
440 |
if (!callbackValue) { |
|
441 |
callbackValue = ''; |
|
442 |
} |
|
443 |
} |
|
444 |
|
|
445 |
params.doneFunction(callbackValue); |
|
446 |
|
|
447 |
if (params.closeOnConfirm) { |
|
448 |
sweetAlert.close(); |
|
449 |
} |
|
450 |
// Disable cancel and confirm button if the parameter is true |
|
451 |
if (params.showLoaderOnConfirm) { |
|
452 |
sweetAlert.disableButtons(); |
|
453 |
} |
|
454 |
}; |
|
455 |
|
|
456 |
/* |
|
457 |
* User clicked on "Cancel" |
|
458 |
*/ |
|
459 |
var handleCancel = function handleCancel(modal, params) { |
|
460 |
// Check if callback function expects a parameter (to track cancel actions) |
|
461 |
var functionAsStr = String(params.doneFunction).replace(/\s/g, ''); |
|
462 |
var functionHandlesCancel = functionAsStr.substring(0, 9) === 'function(' && functionAsStr.substring(9, 10) !== ')'; |
|
463 |
|
|
464 |
if (functionHandlesCancel) { |
|
465 |
params.doneFunction(false); |
|
466 |
} |
|
467 |
|
|
468 |
if (params.closeOnCancel) { |
|
469 |
sweetAlert.close(); |
|
470 |
} |
|
471 |
}; |
|
472 |
|
|
473 |
exports['default'] = { |
|
474 |
handleButton: handleButton, |
|
475 |
handleConfirm: handleConfirm, |
|
476 |
handleCancel: handleCancel |
|
477 |
}; |
|
478 |
module.exports = exports['default']; |
|
479 |
|
|
480 |
},{"./handle-dom":4,"./handle-swal-dom":6,"./utils":9}],4:[function(require,module,exports){ |
|
481 |
'use strict'; |
|
482 |
|
|
483 |
Object.defineProperty(exports, '__esModule', { |
|
484 |
value: true |
|
485 |
}); |
|
486 |
var hasClass = function hasClass(elem, className) { |
|
487 |
return new RegExp(' ' + className + ' ').test(' ' + elem.className + ' '); |
|
488 |
}; |
|
489 |
|
|
490 |
var addClass = function addClass(elem, className) { |
|
491 |
if (!hasClass(elem, className)) { |
|
492 |
elem.className += ' ' + className; |
|
493 |
} |
|
494 |
}; |
|
495 |
|
|
496 |
var removeClass = function removeClass(elem, className) { |
|
497 |
var newClass = ' ' + elem.className.replace(/[\t\r\n]/g, ' ') + ' '; |
|
498 |
if (hasClass(elem, className)) { |
|
499 |
while (newClass.indexOf(' ' + className + ' ') >= 0) { |
|
500 |
newClass = newClass.replace(' ' + className + ' ', ' '); |
|
501 |
} |
|
502 |
elem.className = newClass.replace(/^\s+|\s+$/g, ''); |
|
503 |
} |
|
504 |
}; |
|
505 |
|
|
506 |
var escapeHtml = function escapeHtml(str) { |
|
507 |
var div = document.createElement('div'); |
|
508 |
div.appendChild(document.createTextNode(str)); |
|
509 |
return div.innerHTML; |
|
510 |
}; |
|
511 |
|
|
512 |
var _show = function _show(elem) { |
|
513 |
elem.style.opacity = ''; |
|
514 |
elem.style.display = 'block'; |
|
515 |
}; |
|
516 |
|
|
517 |
var show = function show(elems) { |
|
518 |
if (elems && !elems.length) { |
|
519 |
return _show(elems); |
|
520 |
} |
|
521 |
for (var i = 0; i < elems.length; ++i) { |
|
522 |
_show(elems[i]); |
|
523 |
} |
|
524 |
}; |
|
525 |
|
|
526 |
var _hide = function _hide(elem) { |
|
527 |
elem.style.opacity = ''; |
|
528 |
elem.style.display = 'none'; |
|
529 |
}; |
|
530 |
|
|
531 |
var hide = function hide(elems) { |
|
532 |
if (elems && !elems.length) { |
|
533 |
return _hide(elems); |
|
534 |
} |
|
535 |
for (var i = 0; i < elems.length; ++i) { |
|
536 |
_hide(elems[i]); |
|
537 |
} |
|
538 |
}; |
|
539 |
|
|
540 |
var isDescendant = function isDescendant(parent, child) { |
|
541 |
var node = child.parentNode; |
|
542 |
while (node !== null) { |
|
543 |
if (node === parent) { |
|
544 |
return true; |
|
545 |
} |
|
546 |
node = node.parentNode; |
|
547 |
} |
|
548 |
return false; |
|
549 |
}; |
|
550 |
|
|
551 |
var getTopMargin = function getTopMargin(elem) { |
|
552 |
elem.style.left = '-9999px'; |
|
553 |
elem.style.display = 'block'; |
|
554 |
|
|
555 |
var height = elem.clientHeight, |
|
556 |
padding; |
|
557 |
if (typeof getComputedStyle !== "undefined") { |
|
558 |
// IE 8 |
|
559 |
padding = parseInt(getComputedStyle(elem).getPropertyValue('padding-top'), 10); |
|
560 |
} else { |
|
561 |
padding = parseInt(elem.currentStyle.padding); |
|
562 |
} |
|
563 |
|
|
564 |
elem.style.left = ''; |
|
565 |
elem.style.display = 'none'; |
|
566 |
return '-' + parseInt((height + padding) / 2) + 'px'; |
|
567 |
}; |
|
568 |
|
|
569 |
var fadeIn = function fadeIn(elem, interval) { |
|
570 |
if (+elem.style.opacity < 1) { |
|
571 |
interval = interval || 16; |
|
572 |
elem.style.opacity = 0; |
|
573 |
elem.style.display = 'block'; |
|
574 |
var last = +new Date(); |
|
575 |
var tick = function tick() { |
|
576 |
elem.style.opacity = +elem.style.opacity + (new Date() - last) / 100; |
|
577 |
last = +new Date(); |
|
578 |
|
|
579 |
if (+elem.style.opacity < 1) { |
|
580 |
setTimeout(tick, interval); |
|
581 |
} |
|
582 |
}; |
|
583 |
tick(); |
|
584 |
} |
|
585 |
elem.style.display = 'block'; //fallback IE8 |
|
586 |
}; |
|
587 |
|
|
588 |
var fadeOut = function fadeOut(elem, interval) { |
|
589 |
interval = interval || 16; |
|
590 |
elem.style.opacity = 1; |
|
591 |
var last = +new Date(); |
|
592 |
var tick = function tick() { |
|
593 |
elem.style.opacity = +elem.style.opacity - (new Date() - last) / 100; |
|
594 |
last = +new Date(); |
|
595 |
|
|
596 |
if (+elem.style.opacity > 0) { |
|
597 |
setTimeout(tick, interval); |
|
598 |
} else { |
|
599 |
elem.style.display = 'none'; |
|
600 |
} |
|
601 |
}; |
|
602 |
tick(); |
|
603 |
}; |
|
604 |
|
|
605 |
var fireClick = function fireClick(node) { |
|
606 |
// Taken from http://www.nonobtrusive.com/2011/11/29/programatically-fire-crossbrowser-click-event-with-javascript/ |
|
607 |
// Then fixed for today's Chrome browser. |
|
608 |
if (typeof MouseEvent === 'function') { |
|
609 |
// Up-to-date approach |
|
610 |
var mevt = new MouseEvent('click', { |
|
611 |
view: window, |
|
612 |
bubbles: false, |
|
613 |
cancelable: true |
|
614 |
}); |
|
615 |
node.dispatchEvent(mevt); |
|
616 |
} else if (document.createEvent) { |
|
617 |
// Fallback |
|
618 |
var evt = document.createEvent('MouseEvents'); |
|
619 |
evt.initEvent('click', false, false); |
|
620 |
node.dispatchEvent(evt); |
|
621 |
} else if (document.createEventObject) { |
|
622 |
node.fireEvent('onclick'); |
|
623 |
} else if (typeof node.onclick === 'function') { |
|
624 |
node.onclick(); |
|
625 |
} |
|
626 |
}; |
|
627 |
|
|
628 |
var stopEventPropagation = function stopEventPropagation(e) { |
|
629 |
// In particular, make sure the space bar doesn't scroll the main window. |
|
630 |
if (typeof e.stopPropagation === 'function') { |
|
631 |
e.stopPropagation(); |
|
632 |
e.preventDefault(); |
|
633 |
} else if (window.event && window.event.hasOwnProperty('cancelBubble')) { |
|
634 |
window.event.cancelBubble = true; |
|
635 |
} |
|
636 |
}; |
|
637 |
|
|
638 |
exports.hasClass = hasClass; |
|
639 |
exports.addClass = addClass; |
|
640 |
exports.removeClass = removeClass; |
|
641 |
exports.escapeHtml = escapeHtml; |
|
642 |
exports._show = _show; |
|
643 |
exports.show = show; |
|
644 |
exports._hide = _hide; |
|
645 |
exports.hide = hide; |
|
646 |
exports.isDescendant = isDescendant; |
|
647 |
exports.getTopMargin = getTopMargin; |
|
648 |
exports.fadeIn = fadeIn; |
|
649 |
exports.fadeOut = fadeOut; |
|
650 |
exports.fireClick = fireClick; |
|
651 |
exports.stopEventPropagation = stopEventPropagation; |
|
652 |
|
|
653 |
},{}],5:[function(require,module,exports){ |
|
654 |
'use strict'; |
|
655 |
|
|
656 |
Object.defineProperty(exports, '__esModule', { |
|
657 |
value: true |
|
658 |
}); |
|
659 |
|
|
660 |
var _handleDom = require('./handle-dom'); |
|
661 |
|
|
662 |
var _handleSwalDom = require('./handle-swal-dom'); |
|
663 |
|
|
664 |
var handleKeyDown = function handleKeyDown(event, params, modal) { |
|
665 |
var e = event || window.event; |
|
666 |
var keyCode = e.keyCode || e.which; |
|
667 |
|
|
668 |
var $okButton = modal.querySelector('button.confirm'); |
|
669 |
var $cancelButton = modal.querySelector('button.cancel'); |
|
670 |
var $modalButtons = modal.querySelectorAll('button[tabindex]'); |
|
671 |
|
|
672 |
if ([9, 13, 32, 27].indexOf(keyCode) === -1) { |
|
673 |
// Don't do work on keys we don't care about. |
|
674 |
return; |
|
675 |
} |
|
676 |
|
|
677 |
var $targetElement = e.target || e.srcElement; |
|
678 |
|
|
679 |
var btnIndex = -1; // Find the button - note, this is a nodelist, not an array. |
|
680 |
for (var i = 0; i < $modalButtons.length; i++) { |
|
681 |
if ($targetElement === $modalButtons[i]) { |
|
682 |
btnIndex = i; |
|
683 |
break; |
|
684 |
} |
|
685 |
} |
|
686 |
|
|
687 |
if (keyCode === 9) { |
|
688 |
// TAB |
|
689 |
if (btnIndex === -1) { |
|
690 |
// No button focused. Jump to the confirm button. |
|
691 |
$targetElement = $okButton; |
|
692 |
} else { |
|
693 |
// Cycle to the next button |
|
694 |
if (btnIndex === $modalButtons.length - 1) { |
|
695 |
$targetElement = $modalButtons[0]; |
|
696 |
} else { |
|
697 |
$targetElement = $modalButtons[btnIndex + 1]; |
|
698 |
} |
|
699 |
} |
|
700 |
|
|
701 |
(0, _handleDom.stopEventPropagation)(e); |
|
702 |
$targetElement.focus(); |
|
703 |
|
|
704 |
if (params.confirmButtonColor) { |
|
705 |
(0, _handleSwalDom.setFocusStyle)($targetElement, params.confirmButtonColor); |
|
706 |
} |
|
707 |
} else { |
|
708 |
if (keyCode === 13) { |
|
709 |
if ($targetElement.tagName === 'INPUT') { |
|
710 |
$targetElement = $okButton; |
|
711 |
$okButton.focus(); |
|
712 |
} |
|
713 |
|
|
714 |
if (btnIndex === -1) { |
|
715 |
// ENTER/SPACE clicked outside of a button. |
|
716 |
$targetElement = $okButton; |
|
717 |
} else { |
|
718 |
// Do nothing - let the browser handle it. |
|
719 |
$targetElement = undefined; |
|
720 |
} |
|
721 |
} else if (keyCode === 27 && params.allowEscapeKey === true) { |
|
722 |
$targetElement = $cancelButton; |
|
723 |
(0, _handleDom.fireClick)($targetElement, e); |
|
724 |
} else { |
|
725 |
// Fallback - let the browser handle it. |
|
726 |
$targetElement = undefined; |
|
727 |
} |
|
728 |
} |
|
729 |
}; |
|
730 |
|
|
731 |
exports['default'] = handleKeyDown; |
|
732 |
module.exports = exports['default']; |
|
733 |
|
|
734 |
},{"./handle-dom":4,"./handle-swal-dom":6}],6:[function(require,module,exports){ |
|
735 |
'use strict'; |
|
736 |
|
|
737 |
Object.defineProperty(exports, '__esModule', { |
|
738 |
value: true |
|
739 |
}); |
|
740 |
|
|
741 |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } |
|
742 |
|
|
743 |
var _utils = require('./utils'); |
|
744 |
|
|
745 |
var _handleDom = require('./handle-dom'); |
|
746 |
|
|
747 |
var _defaultParams = require('./default-params'); |
|
748 |
|
|
749 |
var _defaultParams2 = _interopRequireDefault(_defaultParams); |
|
750 |
|
|
751 |
/* |
|
752 |
* Add modal + overlay to DOM |
|
753 |
*/ |
|
754 |
|
|
755 |
var _injectedHtml = require('./injected-html'); |
|
756 |
|
|
757 |
var _injectedHtml2 = _interopRequireDefault(_injectedHtml); |
|
758 |
|
|
759 |
var modalClass = '.sweet-alert'; |
|
760 |
var overlayClass = '.sweet-overlay'; |
|
761 |
|
|
762 |
var sweetAlertInitialize = function sweetAlertInitialize() { |
|
763 |
var sweetWrap = document.createElement('div'); |
|
764 |
sweetWrap.innerHTML = _injectedHtml2['default']; |
|
765 |
|
|
766 |
// Append elements to body |
|
767 |
while (sweetWrap.firstChild) { |
|
768 |
document.body.appendChild(sweetWrap.firstChild); |
|
769 |
} |
|
770 |
}; |
|
771 |
|
|
772 |
/* |
|
773 |
* Get DOM element of modal |
|
774 |
*/ |
|
775 |
var getModal = function getModal() { |
|
776 |
var $modal = document.querySelector(modalClass); |
|
777 |
|
|
778 |
if (!$modal) { |
|
779 |
sweetAlertInitialize(); |
|
780 |
$modal = getModal(); |
|
781 |
} |
|
782 |
|
|
783 |
return $modal; |
|
784 |
}; |
|
785 |
|
|
786 |
/* |
|
787 |
* Get DOM element of input (in modal) |
|
788 |
*/ |
|
789 |
var getInput = function getInput() { |
|
790 |
var $modal = getModal(); |
|
791 |
if ($modal) { |
|
792 |
return $modal.querySelector('input'); |
|
793 |
} |
|
794 |
}; |
|
795 |
|
|
796 |
/* |
|
797 |
* Get DOM element of overlay |
|
798 |
*/ |
|
799 |
var getOverlay = function getOverlay() { |
|
800 |
return document.querySelector(overlayClass); |
|
801 |
}; |
|
802 |
|
|
803 |
/* |
|
804 |
* Add box-shadow style to button (depending on its chosen bg-color) |
|
805 |
*/ |
|
806 |
var setFocusStyle = function setFocusStyle($button, bgColor) { |
|
807 |
var rgbColor = (0, _utils.hexToRgb)(bgColor); |
|
808 |
$button.style.boxShadow = '0 0 2px rgba(' + rgbColor + ', 0.8), inset 0 0 0 1px rgba(0, 0, 0, 0.05)'; |
|
809 |
}; |
|
810 |
|
|
811 |
/* |
|
812 |
* Animation when opening modal |
|
813 |
*/ |
|
814 |
var openModal = function openModal(callback) { |
|
815 |
var $modal = getModal(); |
|
816 |
(0, _handleDom.fadeIn)(getOverlay(), 10); |
|
817 |
(0, _handleDom.show)($modal); |
|
818 |
(0, _handleDom.addClass)($modal, 'showSweetAlert'); |
|
819 |
(0, _handleDom.removeClass)($modal, 'hideSweetAlert'); |
|
820 |
|
|
821 |
window.previousActiveElement = document.activeElement; |
|
822 |
var $okButton = $modal.querySelector('button.confirm'); |
|
823 |
$okButton.focus(); |
|
824 |
|
|
825 |
setTimeout(function () { |
|
826 |
(0, _handleDom.addClass)($modal, 'visible'); |
|
827 |
}, 500); |
|
828 |
|
|
829 |
var timer = $modal.getAttribute('data-timer'); |
|
830 |
|
|
831 |
if (timer !== 'null' && timer !== '') { |
|
832 |
var timerCallback = callback; |
|
833 |
$modal.timeout = setTimeout(function () { |
|
834 |
var doneFunctionExists = (timerCallback || null) && $modal.getAttribute('data-has-done-function') === 'true'; |
|
835 |
if (doneFunctionExists) { |
|
836 |
timerCallback(null); |
|
837 |
} else { |
|
838 |
sweetAlert.close(); |
|
839 |
} |
|
840 |
}, timer); |
|
841 |
} |
|
842 |
}; |
|
843 |
|
|
844 |
/* |
|
845 |
* Reset the styling of the input |
|
846 |
* (for example if errors have been shown) |
|
847 |
*/ |
|
848 |
var resetInput = function resetInput() { |
|
849 |
var $modal = getModal(); |
|
850 |
var $input = getInput(); |
|
851 |
|
|
852 |
(0, _handleDom.removeClass)($modal, 'show-input'); |
|
853 |
$input.value = _defaultParams2['default'].inputValue; |
|
854 |
$input.setAttribute('type', _defaultParams2['default'].inputType); |
|
855 |
$input.setAttribute('placeholder', _defaultParams2['default'].inputPlaceholder); |
|
856 |
|
|
857 |
resetInputError(); |
|
858 |
}; |
|
859 |
|
|
860 |
var resetInputError = function resetInputError(event) { |
|
861 |
// If press enter => ignore |
|
862 |
if (event && event.keyCode === 13) { |
|
863 |
return false; |
|
864 |
} |
|
865 |
|
|
866 |
var $modal = getModal(); |
|
867 |
|
|
868 |
var $errorIcon = $modal.querySelector('.sa-input-error'); |
|
869 |
(0, _handleDom.removeClass)($errorIcon, 'show'); |
|
870 |
|
|
871 |
var $errorContainer = $modal.querySelector('.sa-error-container'); |
|
872 |
(0, _handleDom.removeClass)($errorContainer, 'show'); |
|
873 |
}; |
|
874 |
|
|
875 |
/* |
|
876 |
* Set "margin-top"-property on modal based on its computed height |
|
877 |
*/ |
|
878 |
var fixVerticalPosition = function fixVerticalPosition() { |
|
879 |
var $modal = getModal(); |
|
880 |
$modal.style.marginTop = (0, _handleDom.getTopMargin)(getModal()); |
|
881 |
}; |
|
882 |
|
|
883 |
exports.sweetAlertInitialize = sweetAlertInitialize; |
|
884 |
exports.getModal = getModal; |
|
885 |
exports.getOverlay = getOverlay; |
|
886 |
exports.getInput = getInput; |
|
887 |
exports.setFocusStyle = setFocusStyle; |
|
888 |
exports.openModal = openModal; |
|
889 |
exports.resetInput = resetInput; |
|
890 |
exports.resetInputError = resetInputError; |
|
891 |
exports.fixVerticalPosition = fixVerticalPosition; |
|
892 |
|
|
893 |
},{"./default-params":2,"./handle-dom":4,"./injected-html":7,"./utils":9}],7:[function(require,module,exports){ |
|
894 |
"use strict"; |
|
895 |
|
|
896 |
Object.defineProperty(exports, "__esModule", { |
|
897 |
value: true |
|
898 |
}); |
|
899 |
var injectedHTML = |
|
900 |
|
|
901 |
// Dark overlay |
|
902 |
"<div class=\"sweet-overlay\" tabIndex=\"-1\"></div>" + |
|
903 |
|
|
904 |
// Modal |
|
905 |
"<div class=\"sweet-alert\">" + |
|
906 |
|
|
907 |
// Error icon |
|
908 |
"<div class=\"sa-icon sa-error\">\n <span class=\"sa-x-mark\">\n <span class=\"sa-line sa-left\"></span>\n <span class=\"sa-line sa-right\"></span>\n </span>\n </div>" + |
|
909 |
|
|
910 |
// Warning icon |
|
911 |
"<div class=\"sa-icon sa-warning\">\n <span class=\"sa-body\"></span>\n <span class=\"sa-dot\"></span>\n </div>" + |
|
912 |
|
|
913 |
// Info icon |
|
914 |
"<div class=\"sa-icon sa-info\"></div>" + |
|
915 |
|
|
916 |
// Success icon |
|
917 |
"<div class=\"sa-icon sa-success\">\n <span class=\"sa-line sa-tip\"></span>\n <span class=\"sa-line sa-long\"></span>\n\n <div class=\"sa-placeholder\"></div>\n <div class=\"sa-fix\"></div>\n </div>" + "<div class=\"sa-icon sa-custom\"></div>" + |
|
918 |
|
|
919 |
// Title, text and input |
|
920 |
"<h2>Title</h2>\n <p>Text</p>\n <fieldset>\n <input type=\"text\" tabIndex=\"3\" />\n <div class=\"sa-input-error\"></div>\n </fieldset>" + |
|
921 |
|
|
922 |
// Input errors |
|
923 |
"<div class=\"sa-error-container\">\n <div class=\"icon\">!</div>\n <p>Not valid!</p>\n </div>" + |
|
924 |
|
|
925 |
// Cancel and confirm buttons |
|
926 |
"<div class=\"sa-button-container\">\n <button class=\"cancel\" tabIndex=\"2\">Cancel</button>\n <div class=\"sa-confirm-button-container\">\n <button class=\"confirm\" tabIndex=\"1\">OK</button>" + |
|
927 |
|
|
928 |
// Loading animation |
|
929 |
"<div class=\"la-ball-fall\">\n <div></div>\n <div></div>\n <div></div>\n </div>\n </div>\n </div>" + |
|
930 |
|
|
931 |
// End of modal |
|
932 |
"</div>"; |
|
933 |
|
|
934 |
exports["default"] = injectedHTML; |
|
935 |
module.exports = exports["default"]; |
|
936 |
|
|
937 |
},{}],8:[function(require,module,exports){ |
|
938 |
'use strict'; |
|
939 |
|
|
940 |
Object.defineProperty(exports, '__esModule', { |
|
941 |
value: true |
|
942 |
}); |
|
943 |
|
|
944 |
var _utils = require('./utils'); |
|
945 |
|
|
946 |
var _handleSwalDom = require('./handle-swal-dom'); |
|
947 |
|
|
948 |
var _handleDom = require('./handle-dom'); |
|
949 |
|
|
950 |
/* |
|
951 |
* Set type, text and actions on modal |
|
952 |
*/ |
|
953 |
var alertTypes = ['error', 'warning', 'info', 'success', 'input', 'prompt']; |
|
954 |
|
|
955 |
var setParameters = function setParameters(params) { |
|
956 |
var modal = (0, _handleSwalDom.getModal)(); |
|
957 |
|
|
958 |
var $title = modal.querySelector('h2'); |
|
959 |
var $text = modal.querySelector('p'); |
|
960 |
var $cancelBtn = modal.querySelector('button.cancel'); |
|
961 |
var $confirmBtn = modal.querySelector('button.confirm'); |
|
962 |
|
|
963 |
/* |
|
964 |
* Title |
|
965 |
*/ |
|
966 |
$title.innerHTML = params.html ? params.title : (0, _handleDom.escapeHtml)(params.title).split('\n').join('<br>'); |
|
967 |
|
|
968 |
/* |
|
969 |
* Text |
|
970 |
*/ |
|
971 |
$text.innerHTML = params.html ? params.text : (0, _handleDom.escapeHtml)(params.text || '').split('\n').join('<br>'); |
|
972 |
if (params.text) (0, _handleDom.show)($text); |
|
973 |
|
|
974 |
/* |
|
975 |
* Custom class |
|
976 |
*/ |
|
977 |
if (params.customClass) { |
|
978 |
(0, _handleDom.addClass)(modal, params.customClass); |
|
979 |
modal.setAttribute('data-custom-class', params.customClass); |
|
980 |
} else { |
|
981 |
// Find previously set classes and remove them |
|
982 |
var customClass = modal.getAttribute('data-custom-class'); |
|
983 |
(0, _handleDom.removeClass)(modal, customClass); |
|
984 |
modal.setAttribute('data-custom-class', ''); |
|
985 |
} |
|
986 |
|
|
987 |
/* |
|
988 |
* Icon |
|
989 |
*/ |
|
990 |
(0, _handleDom.hide)(modal.querySelectorAll('.sa-icon')); |
|
991 |
|
|
992 |
if (params.type && !(0, _utils.isIE8)()) { |
|
993 |
var _ret = (function () { |
|
994 |
|
|
995 |
var validType = false; |
|
996 |
|
|
997 |
for (var i = 0; i < alertTypes.length; i++) { |
|
998 |
if (params.type === alertTypes[i]) { |
|
999 |
validType = true; |
|
1000 |
break; |
|
1001 |
} |
|
1002 |
} |
|
1003 |
|
|
1004 |
if (!validType) { |
|
1005 |
logStr('Unknown alert type: ' + params.type); |
|
1006 |
return { |
|
1007 |
v: false |
|
1008 |
}; |
|
1009 |
} |
|
1010 |
|
|
1011 |
var typesWithIcons = ['success', 'error', 'warning', 'info']; |
|
1012 |
var $icon = undefined; |
|
1013 |
|
|
1014 |
if (typesWithIcons.indexOf(params.type) !== -1) { |
|
1015 |
$icon = modal.querySelector('.sa-icon.' + 'sa-' + params.type); |
|
1016 |
(0, _handleDom.show)($icon); |
|
1017 |
} |
|
1018 |
|
|
1019 |
var $input = (0, _handleSwalDom.getInput)(); |
|
1020 |
|
|
1021 |
// Animate icon |
|
1022 |
switch (params.type) { |
|
1023 |
|
|
1024 |
case 'success': |
|
1025 |
(0, _handleDom.addClass)($icon, 'animate'); |
|
1026 |
(0, _handleDom.addClass)($icon.querySelector('.sa-tip'), 'animateSuccessTip'); |
|
1027 |
(0, _handleDom.addClass)($icon.querySelector('.sa-long'), 'animateSuccessLong'); |
|
1028 |
break; |
|
1029 |
|
|
1030 |
case 'error': |
|
1031 |
(0, _handleDom.addClass)($icon, 'animateErrorIcon'); |
|
1032 |
(0, _handleDom.addClass)($icon.querySelector('.sa-x-mark'), 'animateXMark'); |
|
1033 |
break; |
|
1034 |
|
|
1035 |
case 'warning': |
|
1036 |
(0, _handleDom.addClass)($icon, 'pulseWarning'); |
|
1037 |
(0, _handleDom.addClass)($icon.querySelector('.sa-body'), 'pulseWarningIns'); |
|
1038 |
(0, _handleDom.addClass)($icon.querySelector('.sa-dot'), 'pulseWarningIns'); |
|
1039 |
break; |
|
1040 |
|
|
1041 |
case 'input': |
|
1042 |
case 'prompt': |
|
1043 |
$input.setAttribute('type', params.inputType); |
|
1044 |
$input.value = params.inputValue; |
|
1045 |
$input.setAttribute('placeholder', params.inputPlaceholder); |
|
1046 |
(0, _handleDom.addClass)(modal, 'show-input'); |
|
1047 |
setTimeout(function () { |
|
1048 |
$input.focus(); |
|
1049 |
$input.addEventListener('keyup', swal.resetInputError); |
|
1050 |
}, 400); |
|
1051 |
break; |
|
1052 |
} |
|
1053 |
})(); |
|
1054 |
|
|
1055 |
if (typeof _ret === 'object') return _ret.v; |
|
1056 |
} |
|
1057 |
|
|
1058 |
/* |
|
1059 |
* Custom image |
|
1060 |
*/ |
|
1061 |
if (params.imageUrl) { |
|
1062 |
var $customIcon = modal.querySelector('.sa-icon.sa-custom'); |
|
1063 |
|
|
1064 |
$customIcon.style.backgroundImage = 'url(' + params.imageUrl + ')'; |
|
1065 |
(0, _handleDom.show)($customIcon); |
|
1066 |
|
|
1067 |
var _imgWidth = 80; |
|
1068 |
var _imgHeight = 80; |
|
1069 |
|
|
1070 |
if (params.imageSize) { |
|
1071 |
var dimensions = params.imageSize.toString().split('x'); |
|
1072 |
var imgWidth = dimensions[0]; |
|
1073 |
var imgHeight = dimensions[1]; |
|
1074 |
|
|
1075 |
if (!imgWidth || !imgHeight) { |
|
1076 |
logStr('Parameter imageSize expects value with format WIDTHxHEIGHT, got ' + params.imageSize); |
|
1077 |
} else { |
|
1078 |
_imgWidth = imgWidth; |
|
1079 |
_imgHeight = imgHeight; |
|
1080 |
} |
|
1081 |
} |
|
1082 |
|
|
1083 |
$customIcon.setAttribute('style', $customIcon.getAttribute('style') + 'width:' + _imgWidth + 'px; height:' + _imgHeight + 'px'); |
|
1084 |
} |
|
1085 |
|
|
1086 |
/* |
|
1087 |
* Show cancel button? |
|
1088 |
*/ |
|
1089 |
modal.setAttribute('data-has-cancel-button', params.showCancelButton); |
|
1090 |
if (params.showCancelButton) { |
|
1091 |
$cancelBtn.style.display = 'inline-block'; |
|
1092 |
} else { |
|
1093 |
(0, _handleDom.hide)($cancelBtn); |
|
1094 |
} |
|
1095 |
|
|
1096 |
/* |
|
1097 |
* Show confirm button? |
|
1098 |
*/ |
|
1099 |
modal.setAttribute('data-has-confirm-button', params.showConfirmButton); |
|
1100 |
if (params.showConfirmButton) { |
|
1101 |
$confirmBtn.style.display = 'inline-block'; |
|
1102 |
} else { |
|
1103 |
(0, _handleDom.hide)($confirmBtn); |
|
1104 |
} |
|
1105 |
|
|
1106 |
/* |
|
1107 |
* Custom text on cancel/confirm buttons |
|
1108 |
*/ |
|
1109 |
if (params.cancelButtonText) { |
|
1110 |
$cancelBtn.innerHTML = (0, _handleDom.escapeHtml)(params.cancelButtonText); |
|
1111 |
} |
|
1112 |
if (params.confirmButtonText) { |
|
1113 |
$confirmBtn.innerHTML = (0, _handleDom.escapeHtml)(params.confirmButtonText); |
|
1114 |
} |
|
1115 |
|
|
1116 |
/* |
|
1117 |
* Custom color on confirm button |
|
1118 |
*/ |
|
1119 |
if (params.confirmButtonColor) { |
|
1120 |
// Set confirm button to selected background color |
|
1121 |
$confirmBtn.style.backgroundColor = params.confirmButtonColor; |
|
1122 |
|
|
1123 |
// Set the confirm button color to the loading ring |
|
1124 |
$confirmBtn.style.borderLeftColor = params.confirmLoadingButtonColor; |
|
1125 |
$confirmBtn.style.borderRightColor = params.confirmLoadingButtonColor; |
|
1126 |
|
|
1127 |
// Set box-shadow to default focused button |
|
1128 |
(0, _handleSwalDom.setFocusStyle)($confirmBtn, params.confirmButtonColor); |
|
1129 |
} |
|
1130 |
|
|
1131 |
/* |
|
1132 |
* Allow outside click |
|
1133 |
*/ |
|
1134 |
modal.setAttribute('data-allow-outside-click', params.allowOutsideClick); |
|
1135 |
|
|
1136 |
/* |
|
1137 |
* Callback function |
|
1138 |
*/ |
|
1139 |
var hasDoneFunction = params.doneFunction ? true : false; |
|
1140 |
modal.setAttribute('data-has-done-function', hasDoneFunction); |
|
1141 |
|
|
1142 |
/* |
|
1143 |
* Animation |
|
1144 |
*/ |
|
1145 |
if (!params.animation) { |
|
1146 |
modal.setAttribute('data-animation', 'none'); |
|
1147 |
} else if (typeof params.animation === 'string') { |
|
1148 |
modal.setAttribute('data-animation', params.animation); // Custom animation |
|
1149 |
} else { |
|
1150 |
modal.setAttribute('data-animation', 'pop'); |
|
1151 |
} |
|
1152 |
|
|
1153 |
/* |
|
1154 |
* Timer |
|
1155 |
*/ |
|
1156 |
modal.setAttribute('data-timer', params.timer); |
|
1157 |
}; |
|
1158 |
|
|
1159 |
exports['default'] = setParameters; |
|
1160 |
module.exports = exports['default']; |
|
1161 |
|
|
1162 |
},{"./handle-dom":4,"./handle-swal-dom":6,"./utils":9}],9:[function(require,module,exports){ |
|
1163 |
/* |
|
1164 |
* Allow user to pass their own params |
|
1165 |
*/ |
|
1166 |
'use strict'; |
|
1167 |
|
|
1168 |
Object.defineProperty(exports, '__esModule', { |
|
1169 |
value: true |
|
1170 |
}); |
|
1171 |
var extend = function extend(a, b) { |
|
1172 |
for (var key in b) { |
|
1173 |
if (b.hasOwnProperty(key)) { |
|
1174 |
a[key] = b[key]; |
|
1175 |
} |
|
1176 |
} |
|
1177 |
return a; |
|
1178 |
}; |
|
1179 |
|
|
1180 |
/* |
|
1181 |
* Convert HEX codes to RGB values (#000000 -> rgb(0,0,0)) |
|
1182 |
*/ |
|
1183 |
var hexToRgb = function hexToRgb(hex) { |
|
1184 |
var result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex); |
|
1185 |
return result ? parseInt(result[1], 16) + ', ' + parseInt(result[2], 16) + ', ' + parseInt(result[3], 16) : null; |
|
1186 |
}; |
|
1187 |
|
|
1188 |
/* |
|
1189 |
* Check if the user is using Internet Explorer 8 (for fallbacks) |
|
1190 |
*/ |
|
1191 |
var isIE8 = function isIE8() { |
|
1192 |
return window.attachEvent && !window.addEventListener; |
|
1193 |
}; |
|
1194 |
|
|
1195 |
/* |
|
1196 |
* IE compatible logging for developers |
|
1197 |
*/ |
|
1198 |
var logStr = function logStr(string) { |
|
1199 |
if (typeof window !== 'undefined' && window.console) { |
|
1200 |
// IE... |
|
1201 |
window.console.log('SweetAlert: ' + string); |
|
1202 |
} |
|
1203 |
}; |
|
1204 |
|
|
1205 |
/* |
|
1206 |
* Set hover, active and focus-states for buttons |
|
1207 |
* (source: http://www.sitepoint.com/javascript-generate-lighter-darker-color) |
|
1208 |
*/ |
|
1209 |
var colorLuminance = function colorLuminance(hex, lum) { |
|
1210 |
// Validate hex string |
|
1211 |
hex = String(hex).replace(/[^0-9a-f]/gi, ''); |
|
1212 |
if (hex.length < 6) { |
|
1213 |
hex = hex[0] + hex[0] + hex[1] + hex[1] + hex[2] + hex[2]; |
|
1214 |
} |
|
1215 |
lum = lum || 0; |
|
1216 |
|
|
1217 |
// Convert to decimal and change luminosity |
|
1218 |
var rgb = '#'; |
|
1219 |
var c; |
|
1220 |
var i; |
|
1221 |
|
|
1222 |
for (i = 0; i < 3; i++) { |
|
1223 |
c = parseInt(hex.substr(i * 2, 2), 16); |
|
1224 |
c = Math.round(Math.min(Math.max(0, c + c * lum), 255)).toString(16); |
|
1225 |
rgb += ('00' + c).substr(c.length); |
|
1226 |
} |
|
1227 |
|
|
1228 |
return rgb; |
|
1229 |
}; |
|
1230 |
|
|
1231 |
exports.extend = extend; |
|
1232 |
exports.hexToRgb = hexToRgb; |
|
1233 |
exports.isIE8 = isIE8; |
|
1234 |
exports.logStr = logStr; |
|
1235 |
exports.colorLuminance = colorLuminance; |
|
1236 |
|
|
1237 |
},{}]},{},[1]) |
|
1238 |
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9icm93c2VyLXBhY2svX3ByZWx1ZGUuanMiLCIvVXNlcnMvemh1c2hp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JnYiArPSAoJzAwJyArIGMpLnN1YnN0cihjLmxlbmd0aCk7XG4gIH1cblxuICByZXR1cm4gcmdiO1xufTtcblxuXG5leHBvcnQge1xuICBleHRlbmQsXG4gIGhleFRvUmdiLFxuICBpc0lFOCxcbiAgbG9nU3RyLFxuICBjb2xvckx1bWluYW5jZVxufTtcbiJdfQ== |
|
1239 |
|
|
1240 |
|
|
1241 |
/* |
|
1242 |
* Use SweetAlert with RequireJS |
|
1243 |
*/ |
|
1244 |
|
|
1245 |
if (typeof define === 'function' && define.amd) { |
|
1246 |
define(function () { |
|
1247 |
return sweetAlert; |
|
1248 |
}); |
|
1249 |
} else if (typeof module !== 'undefined' && module.exports) { |
|
1250 |
module.exports = sweetAlert; |
|
1251 |
} |
|
1252 |
|
|
1253 |
})(window, document); |