fomantic-ui 2.9.1-beta.22 → 2.9.1-beta.23
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.
- package/.eslintrc.js +7 -59
- package/.stylelintrc.js +5 -7
- package/dist/components/accordion.css +1 -1
- package/dist/components/accordion.js +7 -7
- package/dist/components/accordion.min.css +1 -1
- package/dist/components/accordion.min.js +2 -2
- package/dist/components/ad.css +1 -1
- package/dist/components/ad.min.css +1 -1
- package/dist/components/api.js +54 -53
- package/dist/components/api.min.js +2 -2
- package/dist/components/breadcrumb.css +1 -1
- package/dist/components/breadcrumb.min.css +1 -1
- package/dist/components/button.css +1 -1
- package/dist/components/button.min.css +1 -1
- package/dist/components/calendar.css +3 -3
- package/dist/components/calendar.js +118 -99
- package/dist/components/calendar.min.css +2 -2
- package/dist/components/calendar.min.js +2 -2
- package/dist/components/card.css +1 -1
- package/dist/components/card.min.css +1 -1
- package/dist/components/checkbox.css +1 -1
- package/dist/components/checkbox.js +8 -8
- package/dist/components/checkbox.min.css +1 -1
- package/dist/components/checkbox.min.js +2 -2
- package/dist/components/comment.css +1 -1
- package/dist/components/comment.min.css +1 -1
- package/dist/components/container.css +1 -1
- package/dist/components/container.min.css +1 -1
- package/dist/components/dimmer.css +1 -1
- package/dist/components/dimmer.js +16 -18
- package/dist/components/dimmer.min.css +1 -1
- package/dist/components/dimmer.min.js +2 -2
- package/dist/components/divider.css +1 -1
- package/dist/components/divider.min.css +1 -1
- package/dist/components/dropdown.css +1 -1
- package/dist/components/dropdown.js +87 -87
- package/dist/components/dropdown.min.css +1 -1
- package/dist/components/dropdown.min.js +2 -2
- package/dist/components/embed.css +1 -1
- package/dist/components/embed.js +17 -23
- package/dist/components/embed.min.css +1 -1
- package/dist/components/embed.min.js +2 -2
- package/dist/components/feed.css +1 -1
- package/dist/components/feed.min.css +1 -1
- package/dist/components/flag.css +1 -1
- package/dist/components/flag.min.css +1 -1
- package/dist/components/flyout.css +2 -2
- package/dist/components/flyout.js +32 -30
- package/dist/components/flyout.min.css +1 -1
- package/dist/components/flyout.min.js +2 -2
- package/dist/components/form.css +2 -2
- package/dist/components/form.js +113 -89
- package/dist/components/form.min.css +2 -2
- package/dist/components/form.min.js +2 -2
- package/dist/components/grid.css +1 -1
- package/dist/components/grid.min.css +1 -1
- package/dist/components/header.css +1 -1
- package/dist/components/header.min.css +1 -1
- package/dist/components/icon.css +1 -1
- package/dist/components/icon.min.css +1 -1
- package/dist/components/image.css +1 -1
- package/dist/components/image.min.css +1 -1
- package/dist/components/input.css +1 -1
- package/dist/components/input.min.css +1 -1
- package/dist/components/item.css +1 -1
- package/dist/components/item.min.css +1 -1
- package/dist/components/label.css +1 -1
- package/dist/components/label.min.css +1 -1
- package/dist/components/list.css +1 -1
- package/dist/components/list.min.css +1 -1
- package/dist/components/loader.css +1 -1
- package/dist/components/loader.min.css +1 -1
- package/dist/components/message.css +1 -1
- package/dist/components/message.min.css +1 -1
- package/dist/components/modal.css +1 -1
- package/dist/components/modal.js +22 -22
- package/dist/components/modal.min.css +1 -1
- package/dist/components/modal.min.js +2 -2
- package/dist/components/nag.css +1 -1
- package/dist/components/nag.js +18 -16
- package/dist/components/nag.min.css +1 -1
- package/dist/components/nag.min.js +2 -2
- package/dist/components/placeholder.css +1 -1
- package/dist/components/placeholder.min.css +1 -1
- package/dist/components/popup.css +1 -1
- package/dist/components/popup.js +30 -30
- package/dist/components/popup.min.css +1 -1
- package/dist/components/popup.min.js +2 -2
- package/dist/components/progress.css +1 -1
- package/dist/components/progress.js +23 -21
- package/dist/components/progress.min.css +1 -1
- package/dist/components/progress.min.js +2 -2
- package/dist/components/rail.css +1 -1
- package/dist/components/rail.min.css +1 -1
- package/dist/components/rating.css +1 -1
- package/dist/components/rating.js +8 -8
- package/dist/components/rating.min.css +1 -1
- package/dist/components/rating.min.js +2 -2
- package/dist/components/reset.css +1 -1
- package/dist/components/reset.min.css +1 -1
- package/dist/components/reveal.css +1 -1
- package/dist/components/reveal.min.css +1 -1
- package/dist/components/search.css +1 -1
- package/dist/components/search.js +41 -46
- package/dist/components/search.min.css +1 -1
- package/dist/components/search.min.js +2 -2
- package/dist/components/segment.css +1 -1
- package/dist/components/segment.min.css +1 -1
- package/dist/components/shape.css +1 -1
- package/dist/components/shape.js +9 -9
- package/dist/components/shape.min.css +1 -1
- package/dist/components/shape.min.js +2 -2
- package/dist/components/sidebar.css +1 -1
- package/dist/components/sidebar.js +21 -19
- package/dist/components/sidebar.min.css +1 -1
- package/dist/components/sidebar.min.js +2 -2
- package/dist/components/site.css +1 -1
- package/dist/components/site.js +11 -10
- package/dist/components/site.min.css +1 -1
- package/dist/components/site.min.js +2 -2
- package/dist/components/slider.js +39 -42
- package/dist/components/slider.min.js +2 -2
- package/dist/components/state.js +7 -7
- package/dist/components/state.min.js +2 -2
- package/dist/components/statistic.css +1 -1
- package/dist/components/statistic.min.css +1 -1
- package/dist/components/step.css +1 -1
- package/dist/components/step.min.css +1 -1
- package/dist/components/sticky.css +1 -1
- package/dist/components/sticky.js +7 -7
- package/dist/components/sticky.min.css +1 -1
- package/dist/components/sticky.min.js +2 -2
- package/dist/components/tab.css +1 -1
- package/dist/components/tab.js +36 -38
- package/dist/components/tab.min.css +1 -1
- package/dist/components/tab.min.js +2 -2
- package/dist/components/table.css +1 -1
- package/dist/components/table.min.css +1 -1
- package/dist/components/text.css +1 -1
- package/dist/components/text.min.css +1 -1
- package/dist/components/toast.css +1 -1
- package/dist/components/toast.js +20 -17
- package/dist/components/toast.min.css +1 -1
- package/dist/components/toast.min.js +2 -2
- package/dist/components/transition.css +7 -7
- package/dist/components/transition.js +27 -21
- package/dist/components/transition.min.css +1 -1
- package/dist/components/transition.min.js +2 -2
- package/dist/components/visibility.js +8 -8
- package/dist/components/visibility.min.js +2 -2
- package/dist/semantic.css +60 -60
- package/dist/semantic.js +779 -735
- package/dist/semantic.min.css +2 -2
- package/dist/semantic.min.js +2 -2
- package/examples/responsive.html +1 -1
- package/gulpfile.js +1 -1
- package/package.json +1 -1
- package/scripts/nightly-version.js +3 -3
- package/src/definitions/behaviors/api.js +53 -52
- package/src/definitions/behaviors/form.js +112 -88
- package/src/definitions/behaviors/state.js +6 -6
- package/src/definitions/behaviors/visibility.js +7 -7
- package/src/definitions/collections/menu.less +2 -2
- package/src/definitions/elements/button.less +2 -2
- package/src/definitions/elements/loader.less +4 -4
- package/src/definitions/elements/step.less +1 -1
- package/src/definitions/globals/site.js +10 -9
- package/src/definitions/modules/accordion.js +6 -6
- package/src/definitions/modules/calendar.js +117 -98
- package/src/definitions/modules/calendar.less +2 -2
- package/src/definitions/modules/checkbox.js +7 -7
- package/src/definitions/modules/dimmer.js +15 -17
- package/src/definitions/modules/dimmer.less +10 -10
- package/src/definitions/modules/dropdown.js +86 -86
- package/src/definitions/modules/embed.js +16 -22
- package/src/definitions/modules/flyout.js +31 -29
- package/src/definitions/modules/flyout.less +1 -1
- package/src/definitions/modules/modal.js +21 -21
- package/src/definitions/modules/nag.js +17 -15
- package/src/definitions/modules/popup.js +29 -29
- package/src/definitions/modules/progress.js +22 -20
- package/src/definitions/modules/rating.js +7 -7
- package/src/definitions/modules/search.js +40 -45
- package/src/definitions/modules/shape.js +8 -8
- package/src/definitions/modules/sidebar.js +20 -18
- package/src/definitions/modules/slider.js +38 -41
- package/src/definitions/modules/sticky.js +6 -6
- package/src/definitions/modules/tab.js +35 -37
- package/src/definitions/modules/toast.js +19 -16
- package/src/definitions/modules/transition.js +26 -20
- package/src/themes/amazon/elements/button.overrides +7 -7
- package/src/themes/default/collections/form.variables +1 -1
- package/src/themes/default/elements/reveal.variables +1 -1
- package/src/themes/default/globals/site.variables +1 -1
- package/src/themes/default/modules/dimmer.variables +6 -6
- package/src/themes/default/modules/modal.variables +1 -1
- package/src/themes/default/modules/slider.variables +4 -4
- package/src/themes/default/modules/toast.variables +2 -2
- package/src/themes/default/modules/transition.overrides +12 -12
- package/src/themes/flat/collections/form.overrides +2 -2
- package/src/themes/flat/globals/site.variables +1 -1
- package/src/themes/github/collections/form.overrides +2 -2
- package/src/themes/github/collections/menu.variables +1 -1
- package/src/themes/github/collections/message.overrides +3 -3
- package/src/themes/github/elements/input.overrides +2 -2
- package/src/themes/timeline/views/feed.overrides +3 -3
- package/src/themes/twitter/elements/button.overrides +2 -2
- package/tasks/README.md +1 -3
- package/tasks/admin/components/create.js +9 -16
- package/tasks/admin/components/init.js +7 -7
- package/tasks/admin/components/update.js +7 -7
- package/tasks/admin/distributions/create.js +15 -17
- package/tasks/admin/distributions/init.js +7 -7
- package/tasks/admin/distributions/update.js +7 -7
- package/tasks/admin/publish.js +1 -1
- package/tasks/admin/register.js +2 -2
- package/tasks/admin/release.js +1 -1
- package/tasks/build/assets.js +2 -2
- package/tasks/build/css.js +8 -3
- package/tasks/build/javascript.js +3 -1
- package/tasks/build.js +1 -1
- package/tasks/check-install.js +1 -1
- package/tasks/clean.js +1 -1
- package/tasks/collections/README.md +3 -5
- package/tasks/collections/admin.js +1 -1
- package/tasks/collections/docs.js +1 -1
- package/tasks/collections/install.js +1 -1
- package/tasks/collections/rtl.js +1 -1
- package/tasks/collections/various.js +1 -1
- package/tasks/config/admin/github.js +5 -6
- package/tasks/config/admin/templates/css-package.js +1 -1
- package/tasks/config/admin/templates/less-package.js +1 -1
- package/tasks/config/npm/gulpfile.js +7 -7
- package/tasks/config/project/config.js +9 -16
- package/tasks/config/project/install.js +26 -25
- package/tasks/config/project/release.js +12 -14
- package/tasks/config/tasks.js +17 -19
- package/tasks/config/user.js +1 -1
- package/tasks/docs/build.js +5 -3
- package/tasks/docs/metadata.js +7 -8
- package/tasks/docs/serve.js +5 -3
- package/tasks/install.js +38 -38
- package/tasks/rtl/build.js +1 -1
- package/tasks/rtl/watch.js +1 -1
- package/tasks/version.js +1 -1
- package/tasks/watch.js +1 -1
- package/test/.eslintrc.js +0 -4
- package/test/meteor/assets.js +1 -1
- package/test/modules/module.spec.js +15 -15
- package/test/modules/popup.spec.js +1 -1
- package/test/modules/search.spec.js +1 -1
- package/test/modules/tab.spec.js +1 -1
- package/test/modules/transition.spec.js +1 -1
@@ -15,7 +15,7 @@
|
|
15
15
|
return typeof obj === 'function' && typeof obj.nodeType !== 'number';
|
16
16
|
}
|
17
17
|
|
18
|
-
window = (
|
18
|
+
window = (window !== undefined && window.Math === Math)
|
19
19
|
? window
|
20
20
|
: globalThis;
|
21
21
|
|
@@ -25,11 +25,11 @@
|
|
25
25
|
|
26
26
|
moduleSelector = $allModules.selector || '',
|
27
27
|
|
28
|
-
time =
|
28
|
+
time = Date.now(),
|
29
29
|
performance = [],
|
30
30
|
|
31
31
|
query = arguments[0],
|
32
|
-
methodInvoked = (typeof query
|
32
|
+
methodInvoked = (typeof query === 'string'),
|
33
33
|
queryArguments = [].slice.call(arguments, 1),
|
34
34
|
|
35
35
|
returnedValue
|
@@ -206,18 +206,14 @@
|
|
206
206
|
return settings.placeholder || $module.data(metadata.placeholder);
|
207
207
|
},
|
208
208
|
icon: function () {
|
209
|
-
return
|
210
|
-
?
|
211
|
-
:
|
212
|
-
? $module.data(metadata.icon)
|
213
|
-
: module.determine.icon();
|
209
|
+
return settings.icon || (($module.data(metadata.icon) !== undefined)
|
210
|
+
? $module.data(metadata.icon)
|
211
|
+
: module.determine.icon());
|
214
212
|
},
|
215
213
|
source: function (url) {
|
216
|
-
return
|
217
|
-
?
|
218
|
-
:
|
219
|
-
? $module.data(metadata.source)
|
220
|
-
: module.determine.source();
|
214
|
+
return settings.source || (($module.data(metadata.source) !== undefined)
|
215
|
+
? $module.data(metadata.source)
|
216
|
+
: module.determine.source());
|
221
217
|
},
|
222
218
|
type: function () {
|
223
219
|
var source = module.get.source();
|
@@ -227,11 +223,9 @@
|
|
227
223
|
: false;
|
228
224
|
},
|
229
225
|
url: function () {
|
230
|
-
return
|
231
|
-
?
|
232
|
-
:
|
233
|
-
? $module.data(metadata.url)
|
234
|
-
: module.determine.url();
|
226
|
+
return settings.url || (($module.data(metadata.url) !== undefined)
|
227
|
+
? $module.data(metadata.url)
|
228
|
+
: module.determine.url());
|
235
229
|
},
|
236
230
|
},
|
237
231
|
|
@@ -436,7 +430,7 @@
|
|
436
430
|
previousTime
|
437
431
|
;
|
438
432
|
if (settings.performance) {
|
439
|
-
currentTime =
|
433
|
+
currentTime = Date.now();
|
440
434
|
previousTime = time || currentTime;
|
441
435
|
executionTime = currentTime - previousTime;
|
442
436
|
time = currentTime;
|
@@ -465,7 +459,7 @@
|
|
465
459
|
title += ' \'' + moduleSelector + '\'';
|
466
460
|
}
|
467
461
|
if ($allModules.length > 1) {
|
468
|
-
title += '
|
462
|
+
title += ' (' + $allModules.length + ')';
|
469
463
|
}
|
470
464
|
if ((console.group !== undefined || console.table !== undefined) && performance.length > 0) {
|
471
465
|
console.groupCollapsed(title);
|
@@ -490,8 +484,8 @@
|
|
490
484
|
;
|
491
485
|
passedArguments = passedArguments || queryArguments;
|
492
486
|
context = context || element;
|
493
|
-
if (typeof query
|
494
|
-
query = query.split(/[
|
487
|
+
if (typeof query === 'string' && object !== undefined) {
|
488
|
+
query = query.split(/[ .]/);
|
495
489
|
maxDepth = query.length - 1;
|
496
490
|
$.each(query, function (depth, value) {
|
497
491
|
var camelCaseValue = (depth != maxDepth)
|
@@ -15,11 +15,11 @@
|
|
15
15
|
return typeof obj === 'function' && typeof obj.nodeType !== 'number';
|
16
16
|
}
|
17
17
|
|
18
|
-
window = (
|
18
|
+
window = (window !== undefined && window.Math === Math)
|
19
19
|
? window
|
20
20
|
: globalThis;
|
21
21
|
|
22
|
-
$.
|
22
|
+
$.fn.flyout = function (parameters) {
|
23
23
|
var
|
24
24
|
$allModules = $(this),
|
25
25
|
$window = $(window),
|
@@ -30,11 +30,11 @@
|
|
30
30
|
|
31
31
|
moduleSelector = $allModules.selector || '',
|
32
32
|
|
33
|
-
time =
|
33
|
+
time = Date.now(),
|
34
34
|
performance = [],
|
35
35
|
|
36
36
|
query = arguments[0],
|
37
|
-
methodInvoked = (typeof query
|
37
|
+
methodInvoked = (typeof query === 'string'),
|
38
38
|
queryArguments = [].slice.call(arguments, 1),
|
39
39
|
|
40
40
|
requestAnimationFrame = window.requestAnimationFrame
|
@@ -915,9 +915,11 @@
|
|
915
915
|
direction: function () {
|
916
916
|
if ($module.hasClass(className.top)) {
|
917
917
|
return className.top;
|
918
|
-
}
|
918
|
+
}
|
919
|
+
if ($module.hasClass(className.right)) {
|
919
920
|
return className.right;
|
920
|
-
}
|
921
|
+
}
|
922
|
+
if ($module.hasClass(className.bottom)) {
|
921
923
|
return className.bottom;
|
922
924
|
}
|
923
925
|
|
@@ -974,7 +976,7 @@
|
|
974
976
|
bodyMargin: function () {
|
975
977
|
initialBodyMargin = $context.css((isBody ? 'margin-' : 'padding-') + (module.can.leftBodyScrollbar() ? 'left' : 'right'));
|
976
978
|
var
|
977
|
-
bodyMarginRightPixel = parseInt(initialBodyMargin.replace(/[^\d.]/g, '')),
|
979
|
+
bodyMarginRightPixel = parseInt(initialBodyMargin.replace(/[^\d.]/g, ''), 10),
|
978
980
|
bodyScrollbarWidth = isBody ? window.innerWidth - document.documentElement.clientWidth : $context[0].offsetWidth - $context[0].clientWidth
|
979
981
|
;
|
980
982
|
tempBodyMargin = bodyMarginRightPixel + bodyScrollbarWidth;
|
@@ -1027,9 +1029,9 @@
|
|
1027
1029
|
module.verbose('Browser was found to be iOS', userAgent);
|
1028
1030
|
|
1029
1031
|
return true;
|
1030
|
-
} else {
|
1031
|
-
return false;
|
1032
1032
|
}
|
1033
|
+
|
1034
|
+
return false;
|
1033
1035
|
},
|
1034
1036
|
mobile: function () {
|
1035
1037
|
var
|
@@ -1040,11 +1042,11 @@
|
|
1040
1042
|
module.verbose('Browser was found to be mobile', userAgent);
|
1041
1043
|
|
1042
1044
|
return true;
|
1043
|
-
} else {
|
1044
|
-
module.verbose('Browser is not mobile, using regular transition', userAgent);
|
1045
|
-
|
1046
|
-
return false;
|
1047
1045
|
}
|
1046
|
+
|
1047
|
+
module.verbose('Browser is not mobile, using regular transition', userAgent);
|
1048
|
+
|
1049
|
+
return false;
|
1048
1050
|
},
|
1049
1051
|
hidden: function () {
|
1050
1052
|
return !module.is.visible();
|
@@ -1101,8 +1103,8 @@
|
|
1101
1103
|
return string;
|
1102
1104
|
}
|
1103
1105
|
var
|
1104
|
-
badChars = /[
|
1105
|
-
shouldEscape = /[
|
1106
|
+
badChars = /["'<>`]/g,
|
1107
|
+
shouldEscape = /["&'<>`]/,
|
1106
1108
|
escape = {
|
1107
1109
|
'<': '<',
|
1108
1110
|
'>': '>',
|
@@ -1115,7 +1117,7 @@
|
|
1115
1117
|
}
|
1116
1118
|
;
|
1117
1119
|
if (shouldEscape.test(string)) {
|
1118
|
-
string = string.replace(/&(?![a-
|
1120
|
+
string = string.replace(/&(?![\d#a-z]{1,12};)/gi, '&');
|
1119
1121
|
|
1120
1122
|
return string.replace(badChars, escapedChar);
|
1121
1123
|
}
|
@@ -1181,7 +1183,7 @@
|
|
1181
1183
|
previousTime
|
1182
1184
|
;
|
1183
1185
|
if (settings.performance) {
|
1184
|
-
currentTime =
|
1186
|
+
currentTime = Date.now();
|
1185
1187
|
previousTime = time || currentTime;
|
1186
1188
|
executionTime = currentTime - previousTime;
|
1187
1189
|
time = currentTime;
|
@@ -1232,8 +1234,8 @@
|
|
1232
1234
|
;
|
1233
1235
|
passedArguments = passedArguments || queryArguments;
|
1234
1236
|
context = element || context;
|
1235
|
-
if (typeof query
|
1236
|
-
query = query.split(/[
|
1237
|
+
if (typeof query === 'string' && object !== undefined) {
|
1238
|
+
query = query.split(/[ .]/);
|
1237
1239
|
maxDepth = query.length - 1;
|
1238
1240
|
$.each(query, function (depth, value) {
|
1239
1241
|
var camelCaseValue = (depth != maxDepth)
|
@@ -1307,6 +1309,7 @@
|
|
1307
1309
|
? returnedValue
|
1308
1310
|
: this;
|
1309
1311
|
};
|
1312
|
+
$.flyout = $.fn.flyout;
|
1310
1313
|
|
1311
1314
|
$.fn.flyout.settings = {
|
1312
1315
|
|
@@ -1440,17 +1443,16 @@
|
|
1440
1443
|
content: '',
|
1441
1444
|
title: '',
|
1442
1445
|
}, queryArguments[0]);
|
1443
|
-
} else {
|
1444
|
-
if (!isFunction(queryArguments[queryArguments.length - 1])) {
|
1445
|
-
queryArguments.push(function () {});
|
1446
|
-
}
|
1447
|
-
|
1448
|
-
return {
|
1449
|
-
handler: queryArguments.pop(),
|
1450
|
-
content: queryArguments.pop() || '',
|
1451
|
-
title: queryArguments.pop() || '',
|
1452
|
-
};
|
1453
1446
|
}
|
1447
|
+
if (!isFunction(queryArguments[queryArguments.length - 1])) {
|
1448
|
+
queryArguments.push(function () {});
|
1449
|
+
}
|
1450
|
+
|
1451
|
+
return {
|
1452
|
+
handler: queryArguments.pop(),
|
1453
|
+
content: queryArguments.pop() || '',
|
1454
|
+
title: queryArguments.pop() || '',
|
1455
|
+
};
|
1454
1456
|
},
|
1455
1457
|
alert: function () {
|
1456
1458
|
var
|
@@ -15,11 +15,11 @@
|
|
15
15
|
return typeof obj === 'function' && typeof obj.nodeType !== 'number';
|
16
16
|
}
|
17
17
|
|
18
|
-
window = (
|
18
|
+
window = (window !== undefined && window.Math === Math)
|
19
19
|
? window
|
20
20
|
: globalThis;
|
21
21
|
|
22
|
-
$.
|
22
|
+
$.fn.modal = function (parameters) {
|
23
23
|
var
|
24
24
|
$allModules = $(this),
|
25
25
|
$window = $(window),
|
@@ -28,11 +28,11 @@
|
|
28
28
|
|
29
29
|
moduleSelector = $allModules.selector || '',
|
30
30
|
|
31
|
-
time =
|
31
|
+
time = Date.now(),
|
32
32
|
performance = [],
|
33
33
|
|
34
34
|
query = arguments[0],
|
35
|
-
methodInvoked = (typeof query
|
35
|
+
methodInvoked = (typeof query === 'string'),
|
36
36
|
queryArguments = [].slice.call(arguments, 1),
|
37
37
|
|
38
38
|
requestAnimationFrame = window.requestAnimationFrame
|
@@ -756,7 +756,7 @@
|
|
756
756
|
bodyMargin: function () {
|
757
757
|
initialBodyMargin = $context.css((isBody ? 'margin-' : 'padding-') + (module.can.leftBodyScrollbar() ? 'left' : 'right'));
|
758
758
|
var
|
759
|
-
bodyMarginRightPixel = parseInt(initialBodyMargin.replace(/[^\d.]/g, '')),
|
759
|
+
bodyMarginRightPixel = parseInt(initialBodyMargin.replace(/[^\d.]/g, ''), 10),
|
760
760
|
bodyScrollbarWidth = isBody ? window.innerWidth - document.documentElement.clientWidth : $context[0].offsetWidth - $context[0].clientWidth
|
761
761
|
;
|
762
762
|
tempBodyMargin = bodyMarginRightPixel + bodyScrollbarWidth;
|
@@ -864,8 +864,8 @@
|
|
864
864
|
return string;
|
865
865
|
}
|
866
866
|
var
|
867
|
-
badChars = /[
|
868
|
-
shouldEscape = /[
|
867
|
+
badChars = /["'<>`]/g,
|
868
|
+
shouldEscape = /["&'<>`]/,
|
869
869
|
escape = {
|
870
870
|
'<': '<',
|
871
871
|
'>': '>',
|
@@ -878,7 +878,7 @@
|
|
878
878
|
}
|
879
879
|
;
|
880
880
|
if (shouldEscape.test(string)) {
|
881
|
-
string = string.replace(/&(?![a-
|
881
|
+
string = string.replace(/&(?![\d#a-z]{1,12};)/gi, '&');
|
882
882
|
|
883
883
|
return string.replace(badChars, escapedChar);
|
884
884
|
}
|
@@ -1189,7 +1189,7 @@
|
|
1189
1189
|
previousTime
|
1190
1190
|
;
|
1191
1191
|
if (settings.performance) {
|
1192
|
-
currentTime =
|
1192
|
+
currentTime = Date.now();
|
1193
1193
|
previousTime = time || currentTime;
|
1194
1194
|
executionTime = currentTime - previousTime;
|
1195
1195
|
time = currentTime;
|
@@ -1240,8 +1240,8 @@
|
|
1240
1240
|
;
|
1241
1241
|
passedArguments = passedArguments || queryArguments;
|
1242
1242
|
context = context || element;
|
1243
|
-
if (typeof query
|
1244
|
-
query = query.split(/[
|
1243
|
+
if (typeof query === 'string' && object !== undefined) {
|
1244
|
+
query = query.split(/[ .]/);
|
1245
1245
|
maxDepth = query.length - 1;
|
1246
1246
|
$.each(query, function (depth, value) {
|
1247
1247
|
var camelCaseValue = (depth != maxDepth)
|
@@ -1312,6 +1312,7 @@
|
|
1312
1312
|
? returnedValue
|
1313
1313
|
: this;
|
1314
1314
|
};
|
1315
|
+
$.modal = $.fn.modal;
|
1315
1316
|
|
1316
1317
|
$.fn.modal.settings = {
|
1317
1318
|
|
@@ -1463,17 +1464,16 @@
|
|
1463
1464
|
content: '',
|
1464
1465
|
title: '',
|
1465
1466
|
}, queryArguments[0]);
|
1466
|
-
} else {
|
1467
|
-
if (!isFunction(queryArguments[queryArguments.length - 1])) {
|
1468
|
-
queryArguments.push(function () {});
|
1469
|
-
}
|
1470
|
-
|
1471
|
-
return {
|
1472
|
-
handler: queryArguments.pop(),
|
1473
|
-
content: queryArguments.pop() || '',
|
1474
|
-
title: queryArguments.pop() || '',
|
1475
|
-
};
|
1476
1467
|
}
|
1468
|
+
if (!isFunction(queryArguments[queryArguments.length - 1])) {
|
1469
|
+
queryArguments.push(function () {});
|
1470
|
+
}
|
1471
|
+
|
1472
|
+
return {
|
1473
|
+
handler: queryArguments.pop(),
|
1474
|
+
content: queryArguments.pop() || '',
|
1475
|
+
title: queryArguments.pop() || '',
|
1476
|
+
};
|
1477
1477
|
},
|
1478
1478
|
alert: function () {
|
1479
1479
|
var
|
@@ -15,7 +15,7 @@
|
|
15
15
|
return typeof obj === 'function' && typeof obj.nodeType !== 'number';
|
16
16
|
}
|
17
17
|
|
18
|
-
window = (
|
18
|
+
window = (window !== undefined && window.Math === Math)
|
19
19
|
? window
|
20
20
|
: globalThis;
|
21
21
|
|
@@ -24,11 +24,11 @@
|
|
24
24
|
$allModules = $(this),
|
25
25
|
moduleSelector = $allModules.selector || '',
|
26
26
|
|
27
|
-
time =
|
27
|
+
time = Date.now(),
|
28
28
|
performance = [],
|
29
29
|
|
30
30
|
query = arguments[0],
|
31
|
-
methodInvoked = (typeof query
|
31
|
+
methodInvoked = (typeof query === 'string'),
|
32
32
|
queryArguments = [].slice.call(arguments, 1),
|
33
33
|
returnedValue
|
34
34
|
;
|
@@ -162,20 +162,22 @@
|
|
162
162
|
}
|
163
163
|
if (expires instanceof Date && expires.getTime()) {
|
164
164
|
return expires.toUTCString();
|
165
|
-
} else {
|
166
|
-
module.error(error.expiresFormat);
|
167
165
|
}
|
166
|
+
|
167
|
+
module.error(error.expiresFormat);
|
168
168
|
},
|
169
169
|
storage: function () {
|
170
170
|
if (settings.storageMethod === 'localstorage' && window.localStorage !== undefined) {
|
171
171
|
module.debug('Using local storage');
|
172
172
|
|
173
173
|
return window.localStorage;
|
174
|
-
}
|
174
|
+
}
|
175
|
+
if (settings.storageMethod === 'sessionstorage' && window.sessionStorage !== undefined) {
|
175
176
|
module.debug('Using session storage');
|
176
177
|
|
177
178
|
return window.sessionStorage;
|
178
|
-
}
|
179
|
+
}
|
180
|
+
if ('cookie' in document) {
|
179
181
|
module.debug('Using cookie');
|
180
182
|
|
181
183
|
return {
|
@@ -186,12 +188,12 @@
|
|
186
188
|
.replace(/[()]/g, escape)
|
187
189
|
;
|
188
190
|
value = encodeURIComponent(value)
|
189
|
-
.replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[
|
191
|
+
.replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[B-D])/g, decodeURIComponent)
|
190
192
|
;
|
191
193
|
|
192
194
|
var cookieOptions = '';
|
193
195
|
for (var option in options) {
|
194
|
-
if (
|
196
|
+
if (Object.prototype.hasOwnProperty.call(options, option)) {
|
195
197
|
cookieOptions += '; ' + option;
|
196
198
|
if (typeof options[option] === 'string') {
|
197
199
|
cookieOptions += '=' + options[option].split(';')[0];
|
@@ -205,7 +207,7 @@
|
|
205
207
|
for (var i = 0, il = cookies.length; i < il; i++) {
|
206
208
|
var
|
207
209
|
parts = cookies[i].split('='),
|
208
|
-
foundKey = parts[0].replace(/(%[\
|
210
|
+
foundKey = parts[0].replace(/(%[\da-f]{2})+/gi, decodeURIComponent)
|
209
211
|
;
|
210
212
|
if (key === foundKey) {
|
211
213
|
return parts[1] || '';
|
@@ -216,9 +218,9 @@
|
|
216
218
|
storage.setItem(key, '', options);
|
217
219
|
},
|
218
220
|
};
|
219
|
-
} else {
|
220
|
-
module.error(error.noStorage);
|
221
221
|
}
|
222
|
+
|
223
|
+
module.error(error.noStorage);
|
222
224
|
},
|
223
225
|
storageOptions: function () {
|
224
226
|
var
|
@@ -352,7 +354,7 @@
|
|
352
354
|
previousTime
|
353
355
|
;
|
354
356
|
if (settings.performance) {
|
355
|
-
currentTime =
|
357
|
+
currentTime = Date.now();
|
356
358
|
previousTime = time || currentTime;
|
357
359
|
executionTime = currentTime - previousTime;
|
358
360
|
time = currentTime;
|
@@ -403,8 +405,8 @@
|
|
403
405
|
;
|
404
406
|
passedArguments = passedArguments || queryArguments;
|
405
407
|
context = context || element;
|
406
|
-
if (typeof query
|
407
|
-
query = query.split(/[
|
408
|
+
if (typeof query === 'string' && object !== undefined) {
|
409
|
+
query = query.split(/[ .]/);
|
408
410
|
maxDepth = query.length - 1;
|
409
411
|
$.each(query, function (depth, value) {
|
410
412
|
var camelCaseValue = (depth != maxDepth)
|
@@ -15,7 +15,7 @@
|
|
15
15
|
return typeof obj === 'function' && typeof obj.nodeType !== 'number';
|
16
16
|
}
|
17
17
|
|
18
|
-
window = (
|
18
|
+
window = (window !== undefined && window.Math === Math)
|
19
19
|
? window
|
20
20
|
: globalThis;
|
21
21
|
|
@@ -32,11 +32,11 @@
|
|
32
32
|
? 'touchstart'
|
33
33
|
: 'click',
|
34
34
|
|
35
|
-
time =
|
35
|
+
time = Date.now(),
|
36
36
|
performance = [],
|
37
37
|
|
38
38
|
query = arguments[0],
|
39
|
-
methodInvoked = (typeof query
|
39
|
+
methodInvoked = (typeof query === 'string'),
|
40
40
|
queryArguments = [].slice.call(arguments, 1),
|
41
41
|
|
42
42
|
returnedValue
|
@@ -282,7 +282,7 @@
|
|
282
282
|
if (settings.hoverable) {
|
283
283
|
module.bind.popup();
|
284
284
|
}
|
285
|
-
} else if ($target.next(selector.popup).length
|
285
|
+
} else if ($target.next(selector.popup).length > 0) {
|
286
286
|
module.verbose('Pre-existing popup found');
|
287
287
|
settings.inline = true;
|
288
288
|
settings.popup = $target.next(selector.popup).data(metadata.activator, $module);
|
@@ -325,7 +325,8 @@
|
|
325
325
|
module.debug('onShow callback returned false, cancelling popup animation');
|
326
326
|
|
327
327
|
return;
|
328
|
-
}
|
328
|
+
}
|
329
|
+
if (!settings.preserve && !settings.popup) {
|
329
330
|
module.refresh();
|
330
331
|
}
|
331
332
|
if ($popup && module.set.position()) {
|
@@ -370,11 +371,9 @@
|
|
370
371
|
}
|
371
372
|
if (settings.inline || settings.popup) {
|
372
373
|
return (module.has.popup());
|
373
|
-
} else {
|
374
|
-
return ($popup.closest($context).length >= 1)
|
375
|
-
? true
|
376
|
-
: false;
|
377
374
|
}
|
375
|
+
|
376
|
+
return ($popup.closest($context).length > 0);
|
378
377
|
},
|
379
378
|
|
380
379
|
removePopup: function () {
|
@@ -590,7 +589,8 @@
|
|
590
589
|
startEvent: function () {
|
591
590
|
if (settings.on == 'hover') {
|
592
591
|
return 'mouseenter';
|
593
|
-
}
|
592
|
+
}
|
593
|
+
if (settings.on == 'focus') {
|
594
594
|
return 'focus';
|
595
595
|
}
|
596
596
|
|
@@ -602,7 +602,8 @@
|
|
602
602
|
endEvent: function () {
|
603
603
|
if (settings.on == 'hover') {
|
604
604
|
return 'mouseleave';
|
605
|
-
}
|
605
|
+
}
|
606
|
+
if (settings.on == 'focus') {
|
606
607
|
return 'blur';
|
607
608
|
}
|
608
609
|
|
@@ -912,19 +913,18 @@
|
|
912
913
|
return ($popup)
|
913
914
|
? module.set.position(position, calculations)
|
914
915
|
: false;
|
916
|
+
}
|
917
|
+
if (settings.lastResort) {
|
918
|
+
module.debug('No position found, showing with last position');
|
915
919
|
} else {
|
916
|
-
|
917
|
-
|
918
|
-
|
919
|
-
|
920
|
-
|
921
|
-
|
922
|
-
|
923
|
-
|
924
|
-
settings.onUnplaceable.call($popup, element);
|
925
|
-
|
926
|
-
return false;
|
927
|
-
}
|
920
|
+
module.debug('Popup could not find a position to display', $popup);
|
921
|
+
module.error(error.cannotPlace, element);
|
922
|
+
module.remove.attempts();
|
923
|
+
module.remove.loading();
|
924
|
+
module.reset();
|
925
|
+
settings.onUnplaceable.call($popup, element);
|
926
|
+
|
927
|
+
return false;
|
928
928
|
}
|
929
929
|
}
|
930
930
|
module.debug('Position is on stage', position);
|
@@ -1193,7 +1193,7 @@
|
|
1193
1193
|
previousTime
|
1194
1194
|
;
|
1195
1195
|
if (settings.performance) {
|
1196
|
-
currentTime =
|
1196
|
+
currentTime = Date.now();
|
1197
1197
|
previousTime = time || currentTime;
|
1198
1198
|
executionTime = currentTime - previousTime;
|
1199
1199
|
time = currentTime;
|
@@ -1244,8 +1244,8 @@
|
|
1244
1244
|
;
|
1245
1245
|
passedArguments = passedArguments || queryArguments;
|
1246
1246
|
context = context || element;
|
1247
|
-
if (typeof query
|
1248
|
-
query = query.split(/[
|
1247
|
+
if (typeof query === 'string' && object !== undefined) {
|
1248
|
+
query = query.split(/[ .]/);
|
1249
1249
|
maxDepth = query.length - 1;
|
1250
1250
|
$.each(query, function (depth, value) {
|
1251
1251
|
var camelCaseValue = (depth != maxDepth)
|
@@ -1471,8 +1471,8 @@
|
|
1471
1471
|
templates: {
|
1472
1472
|
escape: function (string) {
|
1473
1473
|
var
|
1474
|
-
badChars = /[
|
1475
|
-
shouldEscape = /[
|
1474
|
+
badChars = /["'<>`]/g,
|
1475
|
+
shouldEscape = /["&'<>`]/,
|
1476
1476
|
escape = {
|
1477
1477
|
'<': '<',
|
1478
1478
|
'>': '>',
|
@@ -1485,7 +1485,7 @@
|
|
1485
1485
|
}
|
1486
1486
|
;
|
1487
1487
|
if (shouldEscape.test(string)) {
|
1488
|
-
string = string.replace(/&(?![a-
|
1488
|
+
string = string.replace(/&(?![\d#a-z]{1,12};)/gi, '&');
|
1489
1489
|
|
1490
1490
|
return string.replace(badChars, escapedChar);
|
1491
1491
|
}
|