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