fomantic-ui 2.9.1-beta.24 → 2.9.1-beta.26
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/.eslint/eqeqeq-rule.js +18 -0
- package/.eslint/index.js +3 -0
- package/.eslintrc.js +1 -2
- package/.stylelintrc.js +8 -12
- package/dist/components/accordion.css +3 -3
- package/dist/components/accordion.js +4 -4
- package/dist/components/accordion.min.css +2 -2
- 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 +19 -19
- 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 +5 -5
- package/dist/components/button.min.css +2 -2
- package/dist/components/calendar.css +1 -1
- package/dist/components/calendar.js +18 -17
- package/dist/components/calendar.min.css +1 -1
- package/dist/components/calendar.min.js +2 -2
- package/dist/components/card.css +4 -4
- package/dist/components/card.min.css +2 -2
- package/dist/components/checkbox.css +3 -3
- package/dist/components/checkbox.js +11 -11
- 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 +2 -2
- package/dist/components/container.min.css +2 -2
- package/dist/components/dimmer.css +2 -2
- package/dist/components/dimmer.js +9 -9
- 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 +13 -13
- package/dist/components/dropdown.js +103 -91
- package/dist/components/dropdown.min.css +2 -2
- package/dist/components/dropdown.min.js +2 -2
- package/dist/components/embed.css +1 -1
- package/dist/components/embed.js +5 -5
- package/dist/components/embed.min.css +1 -1
- package/dist/components/embed.min.js +2 -2
- package/dist/components/emoji.css +3547 -3547
- package/dist/components/feed.css +1 -1
- package/dist/components/feed.min.css +1 -1
- package/dist/components/flag.css +265 -265
- package/dist/components/flag.min.css +1 -1
- package/dist/components/flyout.css +7 -7
- package/dist/components/flyout.js +10 -10
- package/dist/components/flyout.min.css +1 -1
- package/dist/components/flyout.min.js +2 -2
- package/dist/components/form.css +13 -13
- package/dist/components/form.js +77 -60
- package/dist/components/form.min.css +2 -2
- package/dist/components/form.min.js +2 -2
- package/dist/components/grid.css +2 -2
- package/dist/components/grid.min.css +2 -2
- package/dist/components/header.css +2 -2
- package/dist/components/header.min.css +2 -2
- package/dist/components/icon.css +1960 -1960
- package/dist/components/icon.min.css +2 -2
- package/dist/components/image.css +1 -1
- package/dist/components/image.min.css +1 -1
- package/dist/components/input.css +2 -2
- package/dist/components/input.min.css +2 -2
- package/dist/components/item.css +3 -3
- package/dist/components/item.min.css +2 -2
- package/dist/components/label.css +2 -2
- package/dist/components/label.min.css +2 -2
- package/dist/components/list.css +4 -4
- package/dist/components/list.min.css +2 -2
- package/dist/components/loader.css +1 -1
- package/dist/components/loader.min.css +1 -1
- package/dist/components/menu.css +2 -2
- package/dist/components/menu.min.css +1 -1
- package/dist/components/message.css +2 -2
- package/dist/components/message.min.css +2 -2
- package/dist/components/modal.css +2 -2
- package/dist/components/modal.js +4 -4
- package/dist/components/modal.min.css +2 -2
- package/dist/components/modal.min.js +2 -2
- package/dist/components/nag.css +1 -1
- package/dist/components/nag.js +5 -5
- 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 +2 -2
- package/dist/components/popup.js +39 -31
- package/dist/components/popup.min.css +2 -2
- package/dist/components/popup.min.js +2 -2
- package/dist/components/progress.css +1 -1
- package/dist/components/progress.js +12 -12
- 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 +31 -31
- package/dist/components/rating.js +6 -6
- 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 +13 -13
- package/dist/components/reveal.min.css +1 -1
- package/dist/components/search.css +4 -4
- package/dist/components/search.js +16 -16
- package/dist/components/search.min.css +2 -2
- package/dist/components/search.min.js +2 -2
- package/dist/components/segment.css +2 -2
- package/dist/components/segment.min.css +2 -2
- package/dist/components/shape.css +1 -1
- package/dist/components/shape.js +5 -5
- package/dist/components/shape.min.css +1 -1
- package/dist/components/shape.min.js +2 -2
- package/dist/components/sidebar.css +33 -33
- package/dist/components/sidebar.js +13 -13
- package/dist/components/sidebar.min.css +1 -1
- package/dist/components/sidebar.min.js +2 -2
- package/dist/components/site.css +18 -18
- package/dist/components/site.js +4 -4
- package/dist/components/site.min.css +2 -2
- package/dist/components/site.min.js +2 -2
- package/dist/components/slider.js +50 -37
- package/dist/components/slider.min.js +2 -2
- package/dist/components/state.js +5 -5
- package/dist/components/state.min.js +2 -2
- package/dist/components/statistic.css +3 -3
- package/dist/components/statistic.min.css +2 -2
- package/dist/components/step.css +4 -4
- package/dist/components/step.min.css +2 -2
- package/dist/components/sticky.css +1 -1
- package/dist/components/sticky.js +8 -8
- 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 +17 -17
- package/dist/components/tab.min.css +1 -1
- package/dist/components/tab.min.js +2 -2
- package/dist/components/table.css +8 -2
- 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 +4 -4
- package/dist/components/toast.min.css +1 -1
- package/dist/components/toast.min.js +2 -2
- package/dist/components/transition.css +97 -97
- package/dist/components/transition.js +8 -8
- package/dist/components/transition.min.css +1 -1
- package/dist/components/transition.min.js +2 -2
- package/dist/components/visibility.js +12 -12
- package/dist/components/visibility.min.js +2 -2
- package/dist/semantic.css +6078 -6074
- package/dist/semantic.js +464 -413
- package/dist/semantic.min.css +2 -2
- package/dist/semantic.min.js +2 -2
- package/package.json +1 -1
- package/src/_site/modules/embed.variables +3 -0
- package/src/definitions/behaviors/api.js +18 -18
- package/src/definitions/behaviors/form.js +76 -59
- package/src/definitions/behaviors/state.js +4 -4
- package/src/definitions/behaviors/visibility.js +11 -11
- package/src/definitions/collections/breadcrumb.less +2 -2
- package/src/definitions/collections/form.less +12 -12
- package/src/definitions/collections/grid.less +7 -7
- package/src/definitions/collections/menu.less +4 -4
- package/src/definitions/collections/message.less +38 -38
- package/src/definitions/collections/table.less +3 -3
- package/src/definitions/elements/button.less +12 -12
- package/src/definitions/elements/container.less +2 -2
- package/src/definitions/elements/divider.less +2 -2
- package/src/definitions/elements/emoji.less +5 -5
- package/src/definitions/elements/flag.less +11 -11
- package/src/definitions/elements/header.less +2 -2
- package/src/definitions/elements/icon.less +22 -22
- package/src/definitions/elements/image.less +2 -2
- package/src/definitions/elements/input.less +2 -2
- package/src/definitions/elements/label.less +4 -4
- package/src/definitions/elements/list.less +3 -3
- package/src/definitions/elements/loader.less +2 -2
- package/src/definitions/elements/placeholder.less +2 -2
- package/src/definitions/elements/rail.less +2 -2
- package/src/definitions/elements/reveal.less +8 -8
- package/src/definitions/elements/segment.less +3 -3
- package/src/definitions/elements/step.less +2 -2
- package/src/definitions/elements/text.less +2 -2
- package/src/definitions/globals/reset.less +2 -2
- package/src/definitions/globals/site.js +3 -3
- package/src/definitions/globals/site.less +9 -9
- package/src/definitions/modules/accordion.js +3 -3
- package/src/definitions/modules/accordion.less +2 -2
- package/src/definitions/modules/calendar.js +17 -16
- package/src/definitions/modules/calendar.less +2 -2
- package/src/definitions/modules/checkbox.js +10 -10
- package/src/definitions/modules/checkbox.less +2 -2
- package/src/definitions/modules/dimmer.js +8 -8
- package/src/definitions/modules/dimmer.less +3 -3
- package/src/definitions/modules/dropdown.js +102 -90
- package/src/definitions/modules/dropdown.less +6 -6
- package/src/definitions/modules/embed.js +4 -4
- package/src/definitions/modules/embed.less +2 -2
- package/src/definitions/modules/flyout.js +9 -9
- package/src/definitions/modules/flyout.less +5 -5
- package/src/definitions/modules/modal.js +3 -3
- package/src/definitions/modules/modal.less +7 -7
- package/src/definitions/modules/nag.js +4 -4
- package/src/definitions/modules/nag.less +3 -3
- package/src/definitions/modules/popup.js +38 -30
- package/src/definitions/modules/popup.less +2 -2
- package/src/definitions/modules/progress.js +11 -11
- package/src/definitions/modules/progress.less +2 -2
- package/src/definitions/modules/rating.js +5 -5
- package/src/definitions/modules/rating.less +14 -10
- package/src/definitions/modules/search.js +15 -15
- package/src/definitions/modules/search.less +2 -2
- package/src/definitions/modules/shape.js +4 -4
- package/src/definitions/modules/shape.less +2 -2
- package/src/definitions/modules/sidebar.js +12 -12
- package/src/definitions/modules/sidebar.less +18 -18
- package/src/definitions/modules/slider.js +49 -36
- package/src/definitions/modules/slider.less +2 -2
- package/src/definitions/modules/sticky.js +7 -7
- package/src/definitions/modules/sticky.less +2 -2
- package/src/definitions/modules/tab.js +16 -16
- package/src/definitions/modules/tab.less +2 -2
- package/src/definitions/modules/toast.js +3 -3
- package/src/definitions/modules/toast.less +5 -5
- package/src/definitions/modules/transition.js +7 -7
- package/src/definitions/modules/transition.less +2 -2
- package/src/definitions/views/ad.less +2 -2
- package/src/definitions/views/card.less +16 -16
- package/src/definitions/views/comment.less +2 -2
- package/src/definitions/views/feed.less +2 -2
- package/src/definitions/views/item.less +3 -3
- package/src/definitions/views/statistic.less +2 -2
- package/src/semantic.less +54 -52
- package/src/theme.config.example +53 -53
- package/src/theme.less +13 -13
- package/src/themes/amazon/elements/button.variables +1 -1
- package/src/themes/amazon/globals/site.variables +5 -5
- package/src/themes/basic/elements/icon.overrides +4 -4
- package/src/themes/basic/elements/icon.variables +2 -2
- package/src/themes/basic/modules/progress.variables +2 -2
- package/src/themes/basic/views/card.variables +3 -3
- package/src/themes/bookish/elements/header.variables +1 -1
- package/src/themes/bootstrap3/elements/button.overrides +3 -0
- package/src/themes/bootstrap3/elements/button.variables +8 -8
- package/src/themes/chubby/collections/menu.overrides +3 -0
- package/src/themes/chubby/collections/menu.variables +2 -2
- package/src/themes/chubby/elements/button.overrides +4 -4
- package/src/themes/chubby/elements/header.variables +1 -1
- package/src/themes/chubby/modules/accordion.variables +1 -1
- package/src/themes/chubby/views/comment.overrides +1 -1
- package/src/themes/chubby/views/comment.variables +4 -4
- package/src/themes/classic/collections/table.variables +1 -1
- package/src/themes/classic/elements/button.variables +17 -17
- package/src/themes/classic/modules/progress.variables +1 -1
- package/src/themes/classic/views/card.overrides +13 -13
- package/src/themes/classic/views/card.variables +2 -2
- package/src/themes/colored/modules/checkbox.overrides +3 -0
- package/src/themes/colored/modules/checkbox.variables +1 -1
- package/src/themes/default/collections/grid.variables +1 -1
- package/src/themes/default/collections/menu.variables +2 -2
- package/src/themes/default/collections/table.overrides +3 -0
- package/src/themes/default/collections/table.variables +1 -1
- package/src/themes/default/elements/container.variables +9 -9
- package/src/themes/default/elements/divider.variables +2 -2
- package/src/themes/default/elements/emoji.variables +2 -2
- package/src/themes/default/elements/flag.variables +2 -2
- package/src/themes/default/elements/header.variables +15 -15
- package/src/themes/default/elements/icon.variables +1979 -1979
- package/src/themes/default/elements/label.variables +24 -24
- package/src/themes/default/elements/list.variables +3 -3
- package/src/themes/default/elements/loader.variables +8 -8
- package/src/themes/default/elements/rail.variables +2 -2
- package/src/themes/default/elements/segment.variables +1 -1
- package/src/themes/default/elements/step.overrides +2 -2
- package/src/themes/default/elements/step.variables +1 -1
- package/src/themes/default/globals/colors.less +450 -450
- package/src/themes/default/globals/site.variables +821 -821
- package/src/themes/default/modules/accordion.overrides +1 -1
- package/src/themes/default/modules/checkbox.overrides +2 -2
- package/src/themes/default/modules/dimmer.variables +7 -7
- package/src/themes/default/modules/dropdown.overrides +8 -8
- package/src/themes/default/modules/dropdown.variables +2 -2
- package/src/themes/default/modules/flyout.variables +1 -1
- package/src/themes/default/modules/modal.variables +1 -1
- package/src/themes/default/modules/popup.variables +1 -1
- package/src/themes/default/modules/search.variables +1 -1
- package/src/themes/default/modules/sidebar.variables +1 -1
- package/src/themes/default/modules/slider.variables +45 -45
- package/src/themes/default/modules/toast.variables +6 -6
- package/src/themes/default/modules/transition.overrides +24 -24
- package/src/themes/default/views/card.variables +11 -11
- package/src/themes/default/views/item.variables +4 -4
- package/src/themes/famfamfam/elements/flag.variables +2 -2
- package/src/themes/fixed-width/collections/grid.variables +3 -3
- package/src/themes/fixed-width/modules/modal.variables +9 -9
- package/src/themes/flat/collections/form.overrides +1 -1
- package/src/themes/flat/collections/form.variables +9 -9
- package/src/themes/flat/globals/site.variables +50 -50
- package/src/themes/github/collections/form.overrides +2 -2
- package/src/themes/github/collections/form.variables +2 -2
- package/src/themes/github/collections/menu.overrides +1 -1
- package/src/themes/github/collections/menu.variables +4 -4
- package/src/themes/github/collections/message.variables +5 -5
- package/src/themes/github/elements/button.variables +2 -2
- package/src/themes/github/elements/icon.variables +2 -2
- package/src/themes/github/elements/segment.variables +2 -2
- package/src/themes/github/elements/step.overrides +1 -1
- package/src/themes/github/elements/step.variables +2 -2
- package/src/themes/github/globals/site.variables +5 -5
- package/src/themes/github/modules/dropdown.overrides +4 -4
- package/src/themes/github/modules/dropdown.variables +6 -6
- package/src/themes/gmail/collections/message.overrides +3 -0
- package/src/themes/gmail/collections/message.variables +2 -2
- package/src/themes/instagram/views/card.overrides +1 -1
- package/src/themes/instagram/views/card.variables +1 -1
- package/src/themes/joypixels/elements/emoji.variables +2 -2
- package/src/themes/material/collections/menu.variables +2 -2
- package/src/themes/material/elements/button.overrides +4 -4
- package/src/themes/material/elements/button.variables +25 -25
- package/src/themes/material/elements/header.variables +6 -6
- package/src/themes/material/elements/icon.variables +4 -4
- package/src/themes/material/globals/site.overrides +3 -0
- package/src/themes/material/globals/site.variables +52 -52
- package/src/themes/material/modules/dropdown.overrides +1 -1
- package/src/themes/material/modules/dropdown.variables +3 -3
- package/src/themes/material/modules/modal.overrides +1 -1
- package/src/themes/material/modules/modal.variables +3 -3
- package/src/themes/pulsar/elements/loader.overrides +4 -4
- package/src/themes/round/elements/button.overrides +3 -0
- package/src/themes/round/elements/button.variables +15 -15
- package/src/themes/rtl/globals/site.variables +3 -3
- package/src/themes/striped/modules/progress.overrides +1 -1
- package/src/themes/systemfont/globals/site.variables +6 -6
- package/src/themes/timeline/views/feed.variables +4 -4
- package/src/themes/twitter/elements/button.overrides +1 -1
- package/src/themes/twitter/elements/button.variables +1 -1
- package/src/themes/twitter/elements/emoji.variables +2 -2
- package/tasks/admin/components/init.js +1 -1
- package/tasks/admin/components/update.js +1 -1
- package/tasks/admin/distributions/create.js +4 -5
- package/tasks/admin/distributions/init.js +1 -1
- package/tasks/admin/distributions/update.js +1 -1
- package/tasks/config/project/config.js +2 -2
- package/tasks/config/project/install.js +8 -8
- package/tasks/config/project/release.js +1 -1
- package/tasks/config/tasks.js +2 -2
- package/tasks/docs/metadata.js +1 -1
- package/tasks/install.js +3 -3
- package/test/modules/module.spec.js +1 -1
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* # Fomantic-UI 2.9.1-beta.
|
2
|
+
* # Fomantic-UI 2.9.1-beta.26+1084e98 - Flyout
|
3
3
|
* https://github.com/fomantic/Fomantic-UI/
|
4
4
|
*
|
5
5
|
*
|
@@ -541,12 +541,12 @@ body.pushable > .pusher {
|
|
541
541
|
transform: translate3d(100%, 0, 0);
|
542
542
|
}
|
543
543
|
.ui.top.overlay.flyout {
|
544
|
-
-webkit-transform: translate3d(0
|
545
|
-
transform: translate3d(0
|
544
|
+
-webkit-transform: translate3d(0, -100%, 0);
|
545
|
+
transform: translate3d(0, -100%, 0);
|
546
546
|
}
|
547
547
|
.ui.bottom.overlay.flyout {
|
548
|
-
-webkit-transform: translate3d(0
|
549
|
-
transform: translate3d(0
|
548
|
+
-webkit-transform: translate3d(0, 100%, 0);
|
549
|
+
transform: translate3d(0, 100%, 0);
|
550
550
|
}
|
551
551
|
|
552
552
|
/* Animation */
|
@@ -560,8 +560,8 @@ body.pushable > .pusher {
|
|
560
560
|
|
561
561
|
/* End - flyout */
|
562
562
|
.ui.visible.overlay.flyout {
|
563
|
-
-webkit-transform: translate3d(0
|
564
|
-
transform: translate3d(0
|
563
|
+
-webkit-transform: translate3d(0, 0, 0);
|
564
|
+
transform: translate3d(0, 0, 0);
|
565
565
|
}
|
566
566
|
|
567
567
|
/* End - Pusher */
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* # Fomantic-UI 2.9.1-beta.
|
2
|
+
* # Fomantic-UI 2.9.1-beta.26+1084e98 - Flyout
|
3
3
|
* https://github.com/fomantic/Fomantic-UI/
|
4
4
|
*
|
5
5
|
*
|
@@ -166,7 +166,7 @@
|
|
166
166
|
module.setup.cache();
|
167
167
|
});
|
168
168
|
|
169
|
-
if (module.get.direction()
|
169
|
+
if (module.get.direction() === 'left' || module.get.direction() === 'right') {
|
170
170
|
module.setup.heights();
|
171
171
|
module.bind.resize();
|
172
172
|
}
|
@@ -440,7 +440,7 @@
|
|
440
440
|
+ ' -webkit-transform: translate3d(' + distance[direction] + 'px, 0, 0);'
|
441
441
|
+ ' transform: translate3d(' + distance[direction] + 'px, 0, 0);'
|
442
442
|
+ ' }';
|
443
|
-
} else if (direction === 'top' || direction
|
443
|
+
} else if (direction === 'top' || direction === 'bottom') {
|
444
444
|
style += ''
|
445
445
|
+ ' .ui.visible.' + direction + '.flyout ~ .fixed,'
|
446
446
|
+ ' .ui.visible.' + direction + '.flyout ~ .pusher {'
|
@@ -459,7 +459,7 @@
|
|
459
459
|
+ ' -webkit-transform: translate3d(' + distance[direction] + 'px, 0, 0);'
|
460
460
|
+ ' transform: translate3d(' + distance[direction] + 'px, 0, 0);'
|
461
461
|
+ ' }';
|
462
|
-
} else if (direction === 'top' || direction
|
462
|
+
} else if (direction === 'top' || direction === 'bottom') {
|
463
463
|
style += ''
|
464
464
|
+ ' body.pushable > .ui.visible.' + direction + '.flyout ~ .pusher::after {'
|
465
465
|
+ ' -webkit-transform: translate3d(0, ' + distance[direction] + 'px, 0);'
|
@@ -675,7 +675,7 @@
|
|
675
675
|
$otherFlyouts
|
676
676
|
.flyout('hide', function () {
|
677
677
|
callbackCount++;
|
678
|
-
if (callbackCount
|
678
|
+
if (callbackCount === flyoutCount) {
|
679
679
|
callback();
|
680
680
|
}
|
681
681
|
})
|
@@ -715,7 +715,7 @@
|
|
715
715
|
module.set.dimmed();
|
716
716
|
};
|
717
717
|
transitionEnd = function (event) {
|
718
|
-
if (event.target
|
718
|
+
if (event.target === $module[0]) {
|
719
719
|
$module.off(transitionEvent + elementNamespace, transitionEnd);
|
720
720
|
module.remove.animating();
|
721
721
|
callback.call(element);
|
@@ -756,7 +756,7 @@
|
|
756
756
|
module.remove.visible();
|
757
757
|
};
|
758
758
|
transitionEnd = function (event) {
|
759
|
-
if (event.target
|
759
|
+
if (event.target === $module[0]) {
|
760
760
|
$module.off(transitionEvent + elementNamespace, transitionEnd);
|
761
761
|
module.remove.animating();
|
762
762
|
module.remove.closing();
|
@@ -1242,17 +1242,17 @@
|
|
1242
1242
|
query = query.split(/[ .]/);
|
1243
1243
|
maxDepth = query.length - 1;
|
1244
1244
|
$.each(query, function (depth, value) {
|
1245
|
-
var camelCaseValue = depth
|
1245
|
+
var camelCaseValue = depth !== maxDepth
|
1246
1246
|
? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)
|
1247
1247
|
: query
|
1248
1248
|
;
|
1249
|
-
if ($.isPlainObject(object[camelCaseValue]) && (depth
|
1249
|
+
if ($.isPlainObject(object[camelCaseValue]) && (depth !== maxDepth)) {
|
1250
1250
|
object = object[camelCaseValue];
|
1251
1251
|
} else if (object[camelCaseValue] !== undefined) {
|
1252
1252
|
found = object[camelCaseValue];
|
1253
1253
|
|
1254
1254
|
return false;
|
1255
|
-
} else if ($.isPlainObject(object[value]) && (depth
|
1255
|
+
} else if ($.isPlainObject(object[value]) && (depth !== maxDepth)) {
|
1256
1256
|
object = object[value];
|
1257
1257
|
} else if (object[value] !== undefined) {
|
1258
1258
|
found = object[value];
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*
|
2
|
-
* # Fomantic UI - 2.9.1-beta.
|
2
|
+
* # Fomantic UI - 2.9.1-beta.26+1084e98
|
3
3
|
* https://github.com/fomantic/Fomantic-UI
|
4
4
|
* https://fomantic-ui.com/
|
5
5
|
*
|
@@ -8,4 +8,4 @@
|
|
8
8
|
* https://opensource.org/licenses/MIT
|
9
9
|
*
|
10
10
|
*/
|
11
|
-
!function(Q,U,X,_){"use strict";function Z(e){return"function"==typeof e&&"number"!=typeof e.nodeType}U=U!==_&&U.Math===Math?U:globalThis,Q.fn.flyout=function(O){var P,e=Q(this),D=Q(U),L=Q(X),z=Q("html"),B=Q("head"),N=Q("body"),R=e.selector||"",I=Date.now(),j=[],K=O,V="string"==typeof K,W=[].slice.call(arguments,1),q=U.requestAnimationFrame||U.mozRequestAnimationFrame||U.webkitRequestAnimationFrame||U.msRequestAnimationFrame||function(e){setTimeout(e,0)};return e.each(function(){var t,e,o,s,n,i,r,c,l=Q.isPlainObject(O)?Q.extend(!0,{},Q.fn.flyout.settings,O):Q.extend({},Q.fn.flyout.settings),a=l.selector,u=l.className,d=l.namespace,f=l.fields,h=l.regExp,g=l.error,p="."+d,m="module-"+d,b=Q(this),v=[U,X].indexOf(l.context)<0?L.find(l.context):N,y=b.find(a.close),k=b.children(a.flyout),x=v.children(a.pusher),w=b.hasClass("flyout"),S=this,C=w?b.data(m):_,A=!1,T=v[0]===N[0],F="",E="",H=!1,M={initialize:function(){var s;M.debug("Initializing flyout",O),M.create.id(),w||(M.create.flyout(),Z(l.onHidden)||(l.onHidden=function(){M.destroy(),b.remove()}),l.autoShow||(l.autoShow=!0)),b.addClass(l.class),""!==l.title&&b.find(a.header).html(M.helpers.escape(l.title,l.preserveHTML)).addClass(l.classTitle),""!==l.content&&b.find(a.content).html(M.helpers.escape(l.content,l.preserveHTML)).addClass(l.classContent),M.has.configActions()&&(0===(s=b.find(a.actions).addClass(l.classActions)).length?s=Q("<div/>",{class:u.actions+" "+(l.classActions||"")}).appendTo(b):s.empty(),l.actions.forEach(function(e){var t=e[f.icon]?"<i "+(e[f.text]?'aria-hidden="true"':"")+' class="'+M.helpers.deQuote(e[f.icon])+' icon"></i>':"",n=M.helpers.escape(e[f.text]||"",l.preserveHTML),i=M.helpers.deQuote(e[f.class]||""),o=e[f.click]&&Z(e[f.click])?e[f.click]:function(){};s.append(Q("<button/>",{html:t+n,"aria-label":(e[f.text]||e[f.icon]||"").replace(/<[^>]+(>|$)/g,""),class:u.button+" "+i,on:{click:function(){!1!==o.call(S,b)&&M.hide()}}}))})),c=M.get.transitionEvent(),l.delaySetup?q(M.setup.layout):M.setup.layout(),q(function(){M.setup.cache()}),"left"!=M.get.direction()&&"right"!=M.get.direction()||(M.setup.heights(),M.bind.resize()),M.bind.events(),M.observeChanges(),M.instantiate(),l.autoShow&&M.show()},instantiate:function(){M.verbose("Storing instance of module",M),C=M,b.data(m,C)},create:{flyout:function(){var e;M.verbose("Programmaticaly create flyout",v),b=Q("<div/>",{class:u.flyout,role:"dialog","aria-modal":l.dimPage}),l.closeIcon&&(y=Q("<i/>",{class:u.close,role:"button",tabindex:0,"aria-label":l.text.close}),b.append(y)),""!==l.title&&(e="_"+M.get.id()+"title",b.attr("aria-labelledby",e),Q("<div/>",{class:u.header,id:e}).appendTo(b)),""!==l.content&&(e="_"+M.get.id()+"desc",b.attr("aria-describedby",e),Q("<div/>",{class:u.content,id:e}).appendTo(b)),M.has.configActions()&&Q("<div/>",{class:u.actions}).appendTo(b),b.prependTo(v),S=b[0]},id:function(){n=(Math.random().toString(16)+"000000000").slice(2,10),s="."+n,M.verbose("Creating unique id for element",n)}},destroy:function(){i&&i.disconnect(),M.verbose("Destroying previous module for",b),b.off(p).removeData(m),M.is.ios()&&M.remove.ios(),y.off(s),t&&t.off(s),v.off(s),D.off(s),L.off(s)},event:{keyboard:function(e){e.which===l.keys.escape&&(l.closable?(M.debug("Escape key pressed hiding flyout"),M.hide()):M.debug("Escape key pressed, but closable is set to false"),e.preventDefault())},resize:function(){M.setup.heights()},clickaway:function(e){var t;l.closable&&(t=0<x.find(e.target).length||x.is(e.target),e=v.is(e.target),t&&(M.verbose("User clicked on dimmed page"),M.hide()),e&&(M.verbose("User clicked on dimmable context (scaled out page)"),M.hide()))},close:function(e){M.hide()},closeKeyUp:function(e){e=e.which;e!==l.keys.enter&&e!==l.keys.space||M.hide()},inputKeyDown:{first:function(e){e.which===l.keys.tab&&e.shiftKey&&(t.last().trigger("focus"),e.preventDefault())},last:function(e){e.which!==l.keys.tab||e.shiftKey||(t.first().trigger("focus"),e.preventDefault())}},approve:function(e){A||!1===l.onApprove.call(M.element,Q(this))?M.verbose("Approve callback returned false cancelling close"):(A=!0,M.hide(function(){A=!1}))},deny:function(e){A||!1===l.onDeny.call(M.element,Q(this))?M.verbose("Deny callback returned false cancelling close"):(A=!0,M.hide(function(){A=!1}))},touch:function(e){},containScroll:function(e){S.scrollTop<=0&&(S.scrollTop=1),S.scrollTop+S.offsetHeight>=S.scrollHeight&&(S.scrollTop=S.scrollHeight-S.offsetHeight-1)},scroll:function(e){0===Q(e.target).closest(a.flyout).length&&e.preventDefault()}},bind:{resize:function(){M.verbose("Adding resize event to window",D),D.on("resize"+s,M.event.resize)},events:function(){M.verbose("Attaching events"),b.on("click"+p,a.close,M.event.close).on("click"+p,a.approve,M.event.approve).on("click"+p,a.deny,M.event.deny),y.on("keyup"+s,M.event.closeKeyUp)},clickaway:function(){M.verbose("Adding clickaway events to context",v),v.on("click"+s,M.event.clickaway).on("touchend"+s,M.event.clickaway)},scrollLock:function(){l.scrollLock&&(M.debug("Disabling page scroll"),(H=M.has.scrollbar())&&(M.save.bodyMargin(),M.set.bodyMargin()),v.addClass(u.locked)),M.verbose("Adding events to contain flyout scroll"),L.on("touchmove"+s,M.event.touch),b.on("scroll"+p,M.event.containScroll)}},unbind:{clickaway:function(){M.verbose("Removing clickaway events from context",v),v.off(s)},scrollLock:function(){M.verbose("Removing scroll lock from page"),H&&M.restore.bodyMargin(),v.removeClass(u.locked),L.off(s),b.off("scroll"+p)}},add:{inlineCSS:function(){var e=M.cache.width||b.outerWidth(),t=M.cache.height||b.outerHeight(),n=M.is.rtl(),i=M.get.direction(),t={left:e,right:-e,top:t,bottom:-t};n&&(M.verbose("RTL detected, flipping widths"),t.left=-e,t.right=e),n="<style>","left"===i||"right"===i?(M.debug("Adding CSS rules for animation distance",e),n+=" .ui.visible."+i+".flyout ~ .fixed, .ui.visible."+i+".flyout ~ .pusher { -webkit-transform: translate3d("+t[i]+"px, 0, 0); transform: translate3d("+t[i]+"px, 0, 0); }"):"top"!==i&&"bottom"!=i||(n+=" .ui.visible."+i+".flyout ~ .fixed, .ui.visible."+i+".flyout ~ .pusher { -webkit-transform: translate3d(0, "+t[i]+"px, 0); transform: translate3d(0, "+t[i]+"px, 0); }"),M.is.ie()&&("left"===i||"right"===i?(M.debug("Adding CSS rules for animation distance",e),n+=" body.pushable > .ui.visible."+i+".flyout ~ .pusher::after { -webkit-transform: translate3d("+t[i]+"px, 0, 0); transform: translate3d("+t[i]+"px, 0, 0); }"):"top"!==i&&"bottom"!=i||(n+=" body.pushable > .ui.visible."+i+".flyout ~ .pusher::after { -webkit-transform: translate3d(0, "+t[i]+"px, 0); transform: translate3d(0, "+t[i]+"px, 0); }"),n+=" body.pushable > .ui.visible.left.flyout ~ .ui.visible.right.flyout ~ .pusher::after, body.pushable > .ui.visible.right.flyout ~ .ui.visible.left.flyout ~ .pusher::after { -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); }"),o=Q(n+="</style>").appendTo(B),M.debug("Adding sizing css to head",o)},keyboardShortcuts:function(){M.verbose("Adding keyboard shortcuts"),L.on("keydown"+p,M.event.keyboard)}},observeChanges:function(){"MutationObserver"in U&&((i=new MutationObserver(function(e){M.refreshInputs()})).observe(S,{childList:!0,subtree:!0}),M.debug("Setting up mutation observer",i))},refresh:function(){M.verbose("Refreshing selector cache"),v=[U,X].indexOf(l.context)<0?L.find(l.context):N,M.refreshFlyouts(),x=v.children(a.pusher),M.clear.cache()},refreshFlyouts:function(){M.verbose("Refreshing other flyouts"),k=v.children(a.flyout)},refreshInputs:function(){t&&t.off("keydown"+s),l.dimPage&&((t=b.find("[tabindex], :input").filter(":visible").filter(function(){return 0===Q(this).closest(".disabled").length})).first().on("keydown"+s,M.event.inputKeyDown.first),t.last().on("keydown"+s,M.event.inputKeyDown.last))},setup:{cache:function(){M.cache={width:b.outerWidth(),height:b.outerHeight()}},layout:function(){0===v.children(a.pusher).length&&(M.debug("Adding wrapper element for flyout"),M.error(g.pusher),x=Q('<div class="pusher" />'),v.children().not(a.omitted).not(k).wrapAll(x),M.refresh()),0!==b.nextAll(a.pusher).length&&b.nextAll(a.pusher)[0]===x[0]||(M.debug("Moved flyout to correct parent element"),M.error(g.movedFlyout,S),b.detach().prependTo(v),M.refresh()),M.is.mobile()&&b.addClass(u.fullscreen),M.clear.cache(),M.set.pushable(),M.set.direction()},heights:function(){M.debug("Setting up heights",b);var e=b.children(a.header),t=b.children(a.content),n=b.children(a.actions);t.css("min-height",v.height()-e.outerHeight()-n.outerHeight()+"px")}},attachEvents:function(e,t){var n=Q(e);t=Z(M[t])?M[t]:M.toggle,0<n.length?(M.debug("Attaching flyout events to element",e,t),n.on("click"+p,t)):M.error(g.notFound,e)},show:function(e){e=Z(e)?e:function(){},M.is.hidden()?!1===l.onShow.call(S)?M.verbose("Show callback returned false cancelling show"):(M.refresh(),M.othersActive()&&(M.debug("Other flyouts currently visible"),l.exclusive?M.hideOthers():A=!1),M.set.dimmerStyles(),M.pushPage(function(){e.call(S),l.onVisible.call(S),l.keyboardShortcuts&&M.add.keyboardShortcuts(),M.save.focus(),M.refreshInputs(),l.autofocus&&M.set.autofocus()}),l.onChange.call(S)):M.debug("Flyout is already visible")},hide:function(e){if(e=Z(e)?e:function(){},!1===l.onHide.call(S,Q(this)))return M.verbose("Hide callback returned false cancelling hide"),A=!1;(M.is.visible()||M.is.animating())&&(M.debug("Hiding flyout",e),M.refreshFlyouts(),M.pullPage(function(){e.call(S),Z(l.onHidden)&&l.onHidden.call(S),M.restore.focus()}),l.onChange.call(S))},othersAnimating:function(){return 0<k.not(b).filter("."+u.animating).length},othersVisible:function(){return 0<k.not(b).filter("."+u.visible).length},othersActive:function(){return M.othersVisible()||M.othersAnimating()},hideOthers:function(e){var t=k.not(b).filter("."+u.visible),n=t.length,i=0;e=e||function(){},t.flyout("hide",function(){++i==n&&e()})},toggle:function(){M.verbose("Determining toggled direction"),M.is.hidden()?M.show():M.hide()},pushPage:function(t){var e,n,i;t=Z(t)?t:function(){},M.set.overlay(),l.returnScroll&&(r=(T?D:v).scrollTop()),M.bind.scrollLock(),e=function(){M.bind.clickaway(),M.add.inlineCSS(),M.set.animating(),M.set.visible()},n=function(){M.set.dimmed()},i=function(e){e.target==b[0]&&(b.off(c+s,i),M.remove.animating(),t.call(S))},b.off(c+s),b.on(c+s,i),q(e),l.dimPage&&!M.othersVisible()&&q(n)},pullPage:function(t){var e,n;t=Z(t)?t:function(){},M.verbose("Removing context push state",M.get.direction()),M.unbind.clickaway(),M.othersActive()||(M.unbind.scrollLock(),l.keyboardShortcuts&&M.remove.keyboardShortcuts()),e=function(){M.set.overlay(),M.set.animating(),l.dimPage&&!M.othersVisible()&&M.set.closing(),M.remove.visible()},n=function(e){e.target==b[0]&&(b.off(c+s,n),M.remove.animating(),M.remove.closing(),M.remove.overlay(),M.remove.inlineCSS(),l.returnScroll&&M.scrollBack(),l.dimPage&&!M.othersVisible()&&x.removeClass(u.dimmed),t.call(S))},b.off(c+s),b.on(c+s,n),q(e)},scrollToTop:function(){M.verbose("Scrolling to top of page to avoid animation issues"),b.scrollTop(0),(T?D:v)[0].scrollTo(0,0)},scrollBack:function(){M.verbose("Scrolling back to original page position"),(T?D:v)[0].scrollTo(0,r)},clear:{cache:function(){M.verbose("Clearing cached dimensions"),M.cache={}}},set:{autofocus:function(){var e=t.filter("[autofocus]"),e=(0<e.length?e:1<t.length?t.filter(":not(i.close)"):t).first();0<e.length&&e.trigger("focus")},dimmerStyles:function(){l.blurring?x.addClass(u.blurring):x.removeClass(u.blurring)},bodyMargin:function(){var n=M.can.leftBodyScrollbar()?"left":"right";v.css((T?"margin-":"padding-")+n,E+"px"),v.find(a.bodyFixed.replace("right",n)).each(function(){var e=Q(this),t="fixed"===e.css("position")?"padding-"+n:n;e.css(t,"calc("+e.css(t)+" + "+E+"px)")})},ios:function(){z.addClass(u.ios)},pushed:function(){v.addClass(u.pushed)},pushable:function(){v.addClass(u.pushable)},dimmed:function(){x.addClass(u.dimmed)},active:function(){b.addClass(u.active)},animating:function(){b.addClass(u.animating)},closing:function(){x.addClass(u.closing)},direction:function(e){e=e||M.get.direction(),b.addClass(u[e])},visible:function(){b.addClass(u.visible)},overlay:function(){b.addClass(u.overlay)}},remove:{inlineCSS:function(){M.debug("Removing inline css styles",o),o&&0<o.length&&o.remove()},keyboardShortcuts:function(){M.verbose("Removing keyboard shortcuts"),L.off("keydown"+p)},ios:function(){z.removeClass(u.ios)},pushed:function(){v.removeClass(u.pushed)},pushable:function(){v.removeClass(u.pushable)},active:function(){b.removeClass(u.active)},animating:function(){b.removeClass(u.animating)},closing:function(){x.removeClass(u.closing)},direction:function(e){e=e||M.get.direction(),b.removeClass(u[e])},visible:function(){b.removeClass(u.visible)},overlay:function(){b.removeClass(u.overlay)}},get:{direction:function(){return b.hasClass(u.top)?u.top:b.hasClass(u.right)?u.right:b.hasClass(u.bottom)?u.bottom:u.left},transitionEvent:function(){var e,t=X.createElement("element"),n={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(e in n)if(t.style[e]!==_)return n[e]},id:function(){return n},element:function(){return b},settings:function(){return l}},can:{leftBodyScrollbar:function(){return M.cache.leftBodyScrollbar===_&&(M.cache.leftBodyScrollbar=M.is.rtl()&&(M.is.iframe&&!M.is.firefox()||M.is.safari()||M.is.edge()||M.is.ie())),M.cache.leftBodyScrollbar}},save:{focus:function(){0<Q(X.activeElement).closest(b).length||(e=Q(X.activeElement).trigger("blur"))},bodyMargin:function(){F=v.css((T?"margin-":"padding-")+(M.can.leftBodyScrollbar()?"left":"right"));var e=parseInt(F.replace(/[^\d.]/g,""),10),t=T?U.innerWidth-X.documentElement.clientWidth:v[0].offsetWidth-v[0].clientWidth;E=e+t}},is:{safari:function(){return M.cache.isSafari===_&&(M.cache.isSafari=/constructor/i.test(U.HTMLElement)||!!U.ApplePaySession),M.cache.isSafari},edge:function(){return M.cache.isEdge===_&&(M.cache.isEdge=!!U.setImmediate&&!M.is.ie()),M.cache.isEdge},firefox:function(){return M.cache.isFirefox===_&&(M.cache.isFirefox=!!U.InstallTrigger),M.cache.isFirefox},iframe:function(){return!(self===top)},ie:function(){var e,t;return M.cache.isIE===_&&(e=!U.ActiveXObject&&"ActiveXObject"in U,t="ActiveXObject"in U,M.cache.isIE=e||t),M.cache.isIE},ios:function(){var e=navigator.userAgent,t=e.match(h.ios),n=e.match(h.mobileChrome);return!(!t||n)&&(M.verbose("Browser was found to be iOS",e),!0)},mobile:function(){var e=navigator.userAgent;return e.match(h.mobile)?(M.verbose("Browser was found to be mobile",e),!0):(M.verbose("Browser is not mobile, using regular transition",e),!1)},hidden:function(){return!M.is.visible()},visible:function(){return b.hasClass(u.visible)},animating:function(){return v.hasClass(u.animating)},rtl:function(){return M.cache.isRTL===_&&(M.cache.isRTL="rtl"===b.attr("dir")||"rtl"===b.css("direction")||"rtl"===N.attr("dir")||"rtl"===N.css("direction")||"rtl"===v.attr("dir")||"rtl"===v.css("direction")),M.cache.isRTL}},has:{configActions:function(){return Array.isArray(l.actions)&&0<l.actions.length},scrollbar:function(){return T||"hidden"!==v.css("overflow-y")}},restore:{focus:function(){e&&0<e.length&&l.restoreFocus&&e.trigger("focus")},bodyMargin:function(){var n=M.can.leftBodyScrollbar()?"left":"right";v.css((T?"margin-":"padding-")+n,F),v.find(a.bodyFixed.replace("right",n)).each(function(){var e=Q(this),t="fixed"===e.css("position")?"padding-"+n:n;e.css(t,"")})}},helpers:{deQuote:function(e){return String(e).replace(/"/g,"")},escape:function(e,t){if(t)return e;var n={"<":"<",">":">",'"':""","'":"'","`":"`"};return/["&'<>`]/.test(e)?(e=e.replace(/&(?![\d#a-z]{1,12};)/gi,"&")).replace(/["'<>`]/g,function(e){return n[e]}):e}},setting:function(e,t){if(M.debug("Changing setting",e,t),Q.isPlainObject(e))Q.extend(!0,l,e);else{if(t===_)return l[e];Q.isPlainObject(l[e])?Q.extend(!0,l[e],t):l[e]=t}},internal:function(e,t){if(Q.isPlainObject(e))Q.extend(!0,M,e);else{if(t===_)return M[e];M[e]=t}},debug:function(){!l.silent&&l.debug&&(l.performance?M.performance.log(arguments):(M.debug=Function.prototype.bind.call(console.info,console,l.name+":"),M.debug.apply(console,arguments)))},verbose:function(){!l.silent&&l.verbose&&l.debug&&(l.performance?M.performance.log(arguments):(M.verbose=Function.prototype.bind.call(console.info,console,l.name+":"),M.verbose.apply(console,arguments)))},error:function(){l.silent||(M.error=Function.prototype.bind.call(console.error,console,l.name+":"),M.error.apply(console,arguments))},performance:{log:function(e){var t,n;l.performance&&(n=(t=Date.now())-(I||t),I=t,j.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:S,"Execution Time":n})),clearTimeout(M.performance.timer),M.performance.timer=setTimeout(M.performance.display,500)},display:function(){var e=l.name+":",n=0;I=!1,clearTimeout(M.performance.timer),Q.each(j,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",R&&(e+=" '"+R+"'"),(console.group!==_||console.table!==_)&&0<j.length&&(console.groupCollapsed(e),console.table?console.table(j):Q.each(j,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),j=[]}},invoke:function(i,e,t){var o,s,n,r=C;return e=e||W,t=S||t,"string"==typeof i&&r!==_&&(i=i.split(/[ .]/),o=i.length-1,Q.each(i,function(e,t){var n=e!=o?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(Q.isPlainObject(r[n])&&e!=o)r=r[n];else{if(r[n]!==_)return s=r[n],!1;{if(!Q.isPlainObject(r[t])||e==o)return r[t]!==_?s=r[t]:M.error(g.method,i),!1;r=r[t]}}})),Z(s)?n=s.apply(t,e):s!==_&&(n=s),Array.isArray(P)?P.push(n):P!==_?P=[P,n]:n!==_&&(P=n),s}};V?(C===_&&(Z(l.templates[K])&&(l.autoShow=!0,l.className.flyout=l.className.template,l=Q.extend(!0,{},l,l.templates[K].apply(M,W)),u=l.className,l.namespace,f=l.fields,g=l.error),M.initialize()),Z(l.templates[K])||M.invoke(K)):(C!==_&&C.invoke("destroy"),M.initialize(),P=b)}),P!==_?P:this},Q.flyout=Q.fn.flyout,Q.fn.flyout.settings={name:"Flyout",namespace:"flyout",silent:!1,debug:!1,verbose:!1,performance:!0,context:"body",exclusive:!1,closable:!0,autofocus:!0,restoreFocus:!0,dimPage:!0,scrollLock:!1,returnScroll:!1,delaySetup:!1,autoShow:!1,keyboardShortcuts:!0,title:"",content:"",class:"",classTitle:"",classContent:"",classActions:"",closeIcon:!1,actions:!1,preserveHTML:!0,fields:{class:"class",text:"text",icon:"icon",click:"click"},onChange:function(){},onShow:function(){},onHide:function(){return!0},onHidden:!1,onVisible:function(){},onApprove:function(){},onDeny:function(){},keys:{space:32,enter:13,escape:27,tab:9},className:{flyout:"ui flyout",close:"close icon",header:"ui header",content:"content",actions:"actions",active:"active",animating:"animating",blurring:"blurring",closing:"closing",dimmed:"dimmed",ios:"ios",locked:"locked",pushable:"pushable",pushed:"pushed",right:"right",top:"top",left:"left",bottom:"bottom",visible:"visible",overlay:"overlay",fullscreen:"fullscreen",template:"ui flyout",button:"ui button",ok:"positive",cancel:"negative",prompt:"ui fluid input"},selector:{bodyFixed:"> .ui.fixed.menu, > .ui.right.toast-container, > .ui.right.sidebar, > .ui.right.flyout, > .ui.fixed.nag, > .ui.fixed.nag > .close",fixed:".fixed",omitted:"script, link, style, .ui.modal, .ui.dimmer, .ui.nag, .ui.fixed",pusher:".pusher",flyout:".ui.flyout",header:".ui.header",content:".content",actions:".actions",close:".close",approve:".actions .positive, .actions .approve, .actions .ok",deny:".actions .negative, .actions .deny, .actions .cancel"},regExp:{ios:/(iPad|iPhone|iPod)/g,mobileChrome:/(CriOS)/g,mobile:/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|Silk-Accelerated|(hpw|web)OS|Fennec|Minimo|Opera M(obi|ini)|Blazer|Dolfin|Dolphin|Skyfire|Zune/g},error:{method:"The method you called is not defined.",pusher:"Had to add pusher element. For optimal performance make sure body content is inside a pusher element",movedFlyout:"Had to move flyout. For optimal performance make sure flyout and pusher are direct children of your body tag",notFound:"There were no elements that matched the specified selector"},text:{ok:"Ok",cancel:"Cancel",close:"Close"}},Q.fn.flyout.settings.templates={getArguments:function(e){e=[].slice.call(e);return Q.isPlainObject(e[0])?Q.extend({handler:function(){},content:"",title:""},e[0]):(Z(e[e.length-1])||e.push(function(){}),{handler:e.pop(),content:e.pop()||"",title:e.pop()||""})},alert:function(){var e=this.get.settings(),t=e.templates.getArguments(arguments);return{title:t.title,content:t.content,actions:[{text:e.text.ok,class:e.className.ok,click:t.handler}]}},confirm:function(){var e=this.get.settings(),t=e.templates.getArguments(arguments);return{title:t.title,content:t.content,actions:[{text:e.text.ok,class:e.className.ok,click:function(){t.handler(!0)}},{text:e.text.cancel,class:e.className.cancel,click:function(){t.handler(!1)}}]}},prompt:function(){var t=this,e=this.get.settings(),n=e.templates.getArguments(arguments);return 0===Q(Q.parseHTML(n.content)).filter(".ui.input").length&&(n.content+='<p><div class="'+e.className.prompt+'"><input placeholder="'+this.helpers.deQuote(n.placeholder||"")+'" type="text" value="'+this.helpers.deQuote(n.defaultValue||"")+'"></div></p>'),{title:n.title,content:n.content,actions:[{text:e.text.ok,class:e.className.ok,click:function(){var e=t.get.settings(),e=t.get.element().find(e.selector.prompt)[0];n.handler(Q(e).val())}},{text:e.text.cancel,class:e.className.cancel,click:function(){n.handler(null)}}]}}}}(jQuery,window,document);
|
11
|
+
!function(Q,U,X,_){"use strict";function Z(e){return"function"==typeof e&&"number"!=typeof e.nodeType}U=U!==_&&U.Math===Math?U:globalThis,Q.fn.flyout=function(O){var P,e=Q(this),D=Q(U),L=Q(X),z=Q("html"),B=Q("head"),N=Q("body"),R=e.selector||"",I=Date.now(),j=[],K=O,V="string"==typeof K,W=[].slice.call(arguments,1),q=U.requestAnimationFrame||U.mozRequestAnimationFrame||U.webkitRequestAnimationFrame||U.msRequestAnimationFrame||function(e){setTimeout(e,0)};return e.each(function(){var t,e,o,s,n,i,r,c,l=Q.isPlainObject(O)?Q.extend(!0,{},Q.fn.flyout.settings,O):Q.extend({},Q.fn.flyout.settings),a=l.selector,u=l.className,d=l.namespace,f=l.fields,h=l.regExp,g=l.error,p="."+d,m="module-"+d,b=Q(this),v=[U,X].indexOf(l.context)<0?L.find(l.context):N,y=b.find(a.close),k=b.children(a.flyout),x=v.children(a.pusher),w=b.hasClass("flyout"),S=this,C=w?b.data(m):_,A=!1,T=v[0]===N[0],F="",E="",H=!1,M={initialize:function(){var s;M.debug("Initializing flyout",O),M.create.id(),w||(M.create.flyout(),Z(l.onHidden)||(l.onHidden=function(){M.destroy(),b.remove()}),l.autoShow||(l.autoShow=!0)),b.addClass(l.class),""!==l.title&&b.find(a.header).html(M.helpers.escape(l.title,l.preserveHTML)).addClass(l.classTitle),""!==l.content&&b.find(a.content).html(M.helpers.escape(l.content,l.preserveHTML)).addClass(l.classContent),M.has.configActions()&&(0===(s=b.find(a.actions).addClass(l.classActions)).length?s=Q("<div/>",{class:u.actions+" "+(l.classActions||"")}).appendTo(b):s.empty(),l.actions.forEach(function(e){var t=e[f.icon]?"<i "+(e[f.text]?'aria-hidden="true"':"")+' class="'+M.helpers.deQuote(e[f.icon])+' icon"></i>':"",n=M.helpers.escape(e[f.text]||"",l.preserveHTML),i=M.helpers.deQuote(e[f.class]||""),o=e[f.click]&&Z(e[f.click])?e[f.click]:function(){};s.append(Q("<button/>",{html:t+n,"aria-label":(e[f.text]||e[f.icon]||"").replace(/<[^>]+(>|$)/g,""),class:u.button+" "+i,on:{click:function(){!1!==o.call(S,b)&&M.hide()}}}))})),c=M.get.transitionEvent(),l.delaySetup?q(M.setup.layout):M.setup.layout(),q(function(){M.setup.cache()}),"left"!==M.get.direction()&&"right"!==M.get.direction()||(M.setup.heights(),M.bind.resize()),M.bind.events(),M.observeChanges(),M.instantiate(),l.autoShow&&M.show()},instantiate:function(){M.verbose("Storing instance of module",M),C=M,b.data(m,C)},create:{flyout:function(){var e;M.verbose("Programmaticaly create flyout",v),b=Q("<div/>",{class:u.flyout,role:"dialog","aria-modal":l.dimPage}),l.closeIcon&&(y=Q("<i/>",{class:u.close,role:"button",tabindex:0,"aria-label":l.text.close}),b.append(y)),""!==l.title&&(e="_"+M.get.id()+"title",b.attr("aria-labelledby",e),Q("<div/>",{class:u.header,id:e}).appendTo(b)),""!==l.content&&(e="_"+M.get.id()+"desc",b.attr("aria-describedby",e),Q("<div/>",{class:u.content,id:e}).appendTo(b)),M.has.configActions()&&Q("<div/>",{class:u.actions}).appendTo(b),b.prependTo(v),S=b[0]},id:function(){n=(Math.random().toString(16)+"000000000").slice(2,10),s="."+n,M.verbose("Creating unique id for element",n)}},destroy:function(){i&&i.disconnect(),M.verbose("Destroying previous module for",b),b.off(p).removeData(m),M.is.ios()&&M.remove.ios(),y.off(s),t&&t.off(s),v.off(s),D.off(s),L.off(s)},event:{keyboard:function(e){e.which===l.keys.escape&&(l.closable?(M.debug("Escape key pressed hiding flyout"),M.hide()):M.debug("Escape key pressed, but closable is set to false"),e.preventDefault())},resize:function(){M.setup.heights()},clickaway:function(e){var t;l.closable&&(t=0<x.find(e.target).length||x.is(e.target),e=v.is(e.target),t&&(M.verbose("User clicked on dimmed page"),M.hide()),e&&(M.verbose("User clicked on dimmable context (scaled out page)"),M.hide()))},close:function(e){M.hide()},closeKeyUp:function(e){e=e.which;e!==l.keys.enter&&e!==l.keys.space||M.hide()},inputKeyDown:{first:function(e){e.which===l.keys.tab&&e.shiftKey&&(t.last().trigger("focus"),e.preventDefault())},last:function(e){e.which!==l.keys.tab||e.shiftKey||(t.first().trigger("focus"),e.preventDefault())}},approve:function(e){A||!1===l.onApprove.call(M.element,Q(this))?M.verbose("Approve callback returned false cancelling close"):(A=!0,M.hide(function(){A=!1}))},deny:function(e){A||!1===l.onDeny.call(M.element,Q(this))?M.verbose("Deny callback returned false cancelling close"):(A=!0,M.hide(function(){A=!1}))},touch:function(e){},containScroll:function(e){S.scrollTop<=0&&(S.scrollTop=1),S.scrollTop+S.offsetHeight>=S.scrollHeight&&(S.scrollTop=S.scrollHeight-S.offsetHeight-1)},scroll:function(e){0===Q(e.target).closest(a.flyout).length&&e.preventDefault()}},bind:{resize:function(){M.verbose("Adding resize event to window",D),D.on("resize"+s,M.event.resize)},events:function(){M.verbose("Attaching events"),b.on("click"+p,a.close,M.event.close).on("click"+p,a.approve,M.event.approve).on("click"+p,a.deny,M.event.deny),y.on("keyup"+s,M.event.closeKeyUp)},clickaway:function(){M.verbose("Adding clickaway events to context",v),v.on("click"+s,M.event.clickaway).on("touchend"+s,M.event.clickaway)},scrollLock:function(){l.scrollLock&&(M.debug("Disabling page scroll"),(H=M.has.scrollbar())&&(M.save.bodyMargin(),M.set.bodyMargin()),v.addClass(u.locked)),M.verbose("Adding events to contain flyout scroll"),L.on("touchmove"+s,M.event.touch),b.on("scroll"+p,M.event.containScroll)}},unbind:{clickaway:function(){M.verbose("Removing clickaway events from context",v),v.off(s)},scrollLock:function(){M.verbose("Removing scroll lock from page"),H&&M.restore.bodyMargin(),v.removeClass(u.locked),L.off(s),b.off("scroll"+p)}},add:{inlineCSS:function(){var e=M.cache.width||b.outerWidth(),t=M.cache.height||b.outerHeight(),n=M.is.rtl(),i=M.get.direction(),t={left:e,right:-e,top:t,bottom:-t};n&&(M.verbose("RTL detected, flipping widths"),t.left=-e,t.right=e),n="<style>","left"===i||"right"===i?(M.debug("Adding CSS rules for animation distance",e),n+=" .ui.visible."+i+".flyout ~ .fixed, .ui.visible."+i+".flyout ~ .pusher { -webkit-transform: translate3d("+t[i]+"px, 0, 0); transform: translate3d("+t[i]+"px, 0, 0); }"):"top"!==i&&"bottom"!==i||(n+=" .ui.visible."+i+".flyout ~ .fixed, .ui.visible."+i+".flyout ~ .pusher { -webkit-transform: translate3d(0, "+t[i]+"px, 0); transform: translate3d(0, "+t[i]+"px, 0); }"),M.is.ie()&&("left"===i||"right"===i?(M.debug("Adding CSS rules for animation distance",e),n+=" body.pushable > .ui.visible."+i+".flyout ~ .pusher::after { -webkit-transform: translate3d("+t[i]+"px, 0, 0); transform: translate3d("+t[i]+"px, 0, 0); }"):"top"!==i&&"bottom"!==i||(n+=" body.pushable > .ui.visible."+i+".flyout ~ .pusher::after { -webkit-transform: translate3d(0, "+t[i]+"px, 0); transform: translate3d(0, "+t[i]+"px, 0); }"),n+=" body.pushable > .ui.visible.left.flyout ~ .ui.visible.right.flyout ~ .pusher::after, body.pushable > .ui.visible.right.flyout ~ .ui.visible.left.flyout ~ .pusher::after { -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); }"),o=Q(n+="</style>").appendTo(B),M.debug("Adding sizing css to head",o)},keyboardShortcuts:function(){M.verbose("Adding keyboard shortcuts"),L.on("keydown"+p,M.event.keyboard)}},observeChanges:function(){"MutationObserver"in U&&((i=new MutationObserver(function(e){M.refreshInputs()})).observe(S,{childList:!0,subtree:!0}),M.debug("Setting up mutation observer",i))},refresh:function(){M.verbose("Refreshing selector cache"),v=[U,X].indexOf(l.context)<0?L.find(l.context):N,M.refreshFlyouts(),x=v.children(a.pusher),M.clear.cache()},refreshFlyouts:function(){M.verbose("Refreshing other flyouts"),k=v.children(a.flyout)},refreshInputs:function(){t&&t.off("keydown"+s),l.dimPage&&((t=b.find("[tabindex], :input").filter(":visible").filter(function(){return 0===Q(this).closest(".disabled").length})).first().on("keydown"+s,M.event.inputKeyDown.first),t.last().on("keydown"+s,M.event.inputKeyDown.last))},setup:{cache:function(){M.cache={width:b.outerWidth(),height:b.outerHeight()}},layout:function(){0===v.children(a.pusher).length&&(M.debug("Adding wrapper element for flyout"),M.error(g.pusher),x=Q('<div class="pusher" />'),v.children().not(a.omitted).not(k).wrapAll(x),M.refresh()),0!==b.nextAll(a.pusher).length&&b.nextAll(a.pusher)[0]===x[0]||(M.debug("Moved flyout to correct parent element"),M.error(g.movedFlyout,S),b.detach().prependTo(v),M.refresh()),M.is.mobile()&&b.addClass(u.fullscreen),M.clear.cache(),M.set.pushable(),M.set.direction()},heights:function(){M.debug("Setting up heights",b);var e=b.children(a.header),t=b.children(a.content),n=b.children(a.actions);t.css("min-height",v.height()-e.outerHeight()-n.outerHeight()+"px")}},attachEvents:function(e,t){var n=Q(e);t=Z(M[t])?M[t]:M.toggle,0<n.length?(M.debug("Attaching flyout events to element",e,t),n.on("click"+p,t)):M.error(g.notFound,e)},show:function(e){e=Z(e)?e:function(){},M.is.hidden()?!1===l.onShow.call(S)?M.verbose("Show callback returned false cancelling show"):(M.refresh(),M.othersActive()&&(M.debug("Other flyouts currently visible"),l.exclusive?M.hideOthers():A=!1),M.set.dimmerStyles(),M.pushPage(function(){e.call(S),l.onVisible.call(S),l.keyboardShortcuts&&M.add.keyboardShortcuts(),M.save.focus(),M.refreshInputs(),l.autofocus&&M.set.autofocus()}),l.onChange.call(S)):M.debug("Flyout is already visible")},hide:function(e){if(e=Z(e)?e:function(){},!1===l.onHide.call(S,Q(this)))return M.verbose("Hide callback returned false cancelling hide"),A=!1;(M.is.visible()||M.is.animating())&&(M.debug("Hiding flyout",e),M.refreshFlyouts(),M.pullPage(function(){e.call(S),Z(l.onHidden)&&l.onHidden.call(S),M.restore.focus()}),l.onChange.call(S))},othersAnimating:function(){return 0<k.not(b).filter("."+u.animating).length},othersVisible:function(){return 0<k.not(b).filter("."+u.visible).length},othersActive:function(){return M.othersVisible()||M.othersAnimating()},hideOthers:function(e){var t=k.not(b).filter("."+u.visible),n=t.length,i=0;e=e||function(){},t.flyout("hide",function(){++i===n&&e()})},toggle:function(){M.verbose("Determining toggled direction"),M.is.hidden()?M.show():M.hide()},pushPage:function(t){var e,n,i;t=Z(t)?t:function(){},M.set.overlay(),l.returnScroll&&(r=(T?D:v).scrollTop()),M.bind.scrollLock(),e=function(){M.bind.clickaway(),M.add.inlineCSS(),M.set.animating(),M.set.visible()},n=function(){M.set.dimmed()},i=function(e){e.target===b[0]&&(b.off(c+s,i),M.remove.animating(),t.call(S))},b.off(c+s),b.on(c+s,i),q(e),l.dimPage&&!M.othersVisible()&&q(n)},pullPage:function(t){var e,n;t=Z(t)?t:function(){},M.verbose("Removing context push state",M.get.direction()),M.unbind.clickaway(),M.othersActive()||(M.unbind.scrollLock(),l.keyboardShortcuts&&M.remove.keyboardShortcuts()),e=function(){M.set.overlay(),M.set.animating(),l.dimPage&&!M.othersVisible()&&M.set.closing(),M.remove.visible()},n=function(e){e.target===b[0]&&(b.off(c+s,n),M.remove.animating(),M.remove.closing(),M.remove.overlay(),M.remove.inlineCSS(),l.returnScroll&&M.scrollBack(),l.dimPage&&!M.othersVisible()&&x.removeClass(u.dimmed),t.call(S))},b.off(c+s),b.on(c+s,n),q(e)},scrollToTop:function(){M.verbose("Scrolling to top of page to avoid animation issues"),b.scrollTop(0),(T?D:v)[0].scrollTo(0,0)},scrollBack:function(){M.verbose("Scrolling back to original page position"),(T?D:v)[0].scrollTo(0,r)},clear:{cache:function(){M.verbose("Clearing cached dimensions"),M.cache={}}},set:{autofocus:function(){var e=t.filter("[autofocus]"),e=(0<e.length?e:1<t.length?t.filter(":not(i.close)"):t).first();0<e.length&&e.trigger("focus")},dimmerStyles:function(){l.blurring?x.addClass(u.blurring):x.removeClass(u.blurring)},bodyMargin:function(){var n=M.can.leftBodyScrollbar()?"left":"right";v.css((T?"margin-":"padding-")+n,E+"px"),v.find(a.bodyFixed.replace("right",n)).each(function(){var e=Q(this),t="fixed"===e.css("position")?"padding-"+n:n;e.css(t,"calc("+e.css(t)+" + "+E+"px)")})},ios:function(){z.addClass(u.ios)},pushed:function(){v.addClass(u.pushed)},pushable:function(){v.addClass(u.pushable)},dimmed:function(){x.addClass(u.dimmed)},active:function(){b.addClass(u.active)},animating:function(){b.addClass(u.animating)},closing:function(){x.addClass(u.closing)},direction:function(e){e=e||M.get.direction(),b.addClass(u[e])},visible:function(){b.addClass(u.visible)},overlay:function(){b.addClass(u.overlay)}},remove:{inlineCSS:function(){M.debug("Removing inline css styles",o),o&&0<o.length&&o.remove()},keyboardShortcuts:function(){M.verbose("Removing keyboard shortcuts"),L.off("keydown"+p)},ios:function(){z.removeClass(u.ios)},pushed:function(){v.removeClass(u.pushed)},pushable:function(){v.removeClass(u.pushable)},active:function(){b.removeClass(u.active)},animating:function(){b.removeClass(u.animating)},closing:function(){x.removeClass(u.closing)},direction:function(e){e=e||M.get.direction(),b.removeClass(u[e])},visible:function(){b.removeClass(u.visible)},overlay:function(){b.removeClass(u.overlay)}},get:{direction:function(){return b.hasClass(u.top)?u.top:b.hasClass(u.right)?u.right:b.hasClass(u.bottom)?u.bottom:u.left},transitionEvent:function(){var e,t=X.createElement("element"),n={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(e in n)if(t.style[e]!==_)return n[e]},id:function(){return n},element:function(){return b},settings:function(){return l}},can:{leftBodyScrollbar:function(){return M.cache.leftBodyScrollbar===_&&(M.cache.leftBodyScrollbar=M.is.rtl()&&(M.is.iframe&&!M.is.firefox()||M.is.safari()||M.is.edge()||M.is.ie())),M.cache.leftBodyScrollbar}},save:{focus:function(){0<Q(X.activeElement).closest(b).length||(e=Q(X.activeElement).trigger("blur"))},bodyMargin:function(){F=v.css((T?"margin-":"padding-")+(M.can.leftBodyScrollbar()?"left":"right"));var e=parseInt(F.replace(/[^\d.]/g,""),10),t=T?U.innerWidth-X.documentElement.clientWidth:v[0].offsetWidth-v[0].clientWidth;E=e+t}},is:{safari:function(){return M.cache.isSafari===_&&(M.cache.isSafari=/constructor/i.test(U.HTMLElement)||!!U.ApplePaySession),M.cache.isSafari},edge:function(){return M.cache.isEdge===_&&(M.cache.isEdge=!!U.setImmediate&&!M.is.ie()),M.cache.isEdge},firefox:function(){return M.cache.isFirefox===_&&(M.cache.isFirefox=!!U.InstallTrigger),M.cache.isFirefox},iframe:function(){return!(self===top)},ie:function(){var e,t;return M.cache.isIE===_&&(e=!U.ActiveXObject&&"ActiveXObject"in U,t="ActiveXObject"in U,M.cache.isIE=e||t),M.cache.isIE},ios:function(){var e=navigator.userAgent,t=e.match(h.ios),n=e.match(h.mobileChrome);return!(!t||n)&&(M.verbose("Browser was found to be iOS",e),!0)},mobile:function(){var e=navigator.userAgent;return e.match(h.mobile)?(M.verbose("Browser was found to be mobile",e),!0):(M.verbose("Browser is not mobile, using regular transition",e),!1)},hidden:function(){return!M.is.visible()},visible:function(){return b.hasClass(u.visible)},animating:function(){return v.hasClass(u.animating)},rtl:function(){return M.cache.isRTL===_&&(M.cache.isRTL="rtl"===b.attr("dir")||"rtl"===b.css("direction")||"rtl"===N.attr("dir")||"rtl"===N.css("direction")||"rtl"===v.attr("dir")||"rtl"===v.css("direction")),M.cache.isRTL}},has:{configActions:function(){return Array.isArray(l.actions)&&0<l.actions.length},scrollbar:function(){return T||"hidden"!==v.css("overflow-y")}},restore:{focus:function(){e&&0<e.length&&l.restoreFocus&&e.trigger("focus")},bodyMargin:function(){var n=M.can.leftBodyScrollbar()?"left":"right";v.css((T?"margin-":"padding-")+n,F),v.find(a.bodyFixed.replace("right",n)).each(function(){var e=Q(this),t="fixed"===e.css("position")?"padding-"+n:n;e.css(t,"")})}},helpers:{deQuote:function(e){return String(e).replace(/"/g,"")},escape:function(e,t){if(t)return e;var n={"<":"<",">":">",'"':""","'":"'","`":"`"};return/["&'<>`]/.test(e)?(e=e.replace(/&(?![\d#a-z]{1,12};)/gi,"&")).replace(/["'<>`]/g,function(e){return n[e]}):e}},setting:function(e,t){if(M.debug("Changing setting",e,t),Q.isPlainObject(e))Q.extend(!0,l,e);else{if(t===_)return l[e];Q.isPlainObject(l[e])?Q.extend(!0,l[e],t):l[e]=t}},internal:function(e,t){if(Q.isPlainObject(e))Q.extend(!0,M,e);else{if(t===_)return M[e];M[e]=t}},debug:function(){!l.silent&&l.debug&&(l.performance?M.performance.log(arguments):(M.debug=Function.prototype.bind.call(console.info,console,l.name+":"),M.debug.apply(console,arguments)))},verbose:function(){!l.silent&&l.verbose&&l.debug&&(l.performance?M.performance.log(arguments):(M.verbose=Function.prototype.bind.call(console.info,console,l.name+":"),M.verbose.apply(console,arguments)))},error:function(){l.silent||(M.error=Function.prototype.bind.call(console.error,console,l.name+":"),M.error.apply(console,arguments))},performance:{log:function(e){var t,n;l.performance&&(n=(t=Date.now())-(I||t),I=t,j.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:S,"Execution Time":n})),clearTimeout(M.performance.timer),M.performance.timer=setTimeout(M.performance.display,500)},display:function(){var e=l.name+":",n=0;I=!1,clearTimeout(M.performance.timer),Q.each(j,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",R&&(e+=" '"+R+"'"),(console.group!==_||console.table!==_)&&0<j.length&&(console.groupCollapsed(e),console.table?console.table(j):Q.each(j,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),j=[]}},invoke:function(i,e,t){var o,s,n,r=C;return e=e||W,t=S||t,"string"==typeof i&&r!==_&&(i=i.split(/[ .]/),o=i.length-1,Q.each(i,function(e,t){var n=e!==o?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(Q.isPlainObject(r[n])&&e!==o)r=r[n];else{if(r[n]!==_)return s=r[n],!1;{if(!Q.isPlainObject(r[t])||e===o)return r[t]!==_?s=r[t]:M.error(g.method,i),!1;r=r[t]}}})),Z(s)?n=s.apply(t,e):s!==_&&(n=s),Array.isArray(P)?P.push(n):P!==_?P=[P,n]:n!==_&&(P=n),s}};V?(C===_&&(Z(l.templates[K])&&(l.autoShow=!0,l.className.flyout=l.className.template,l=Q.extend(!0,{},l,l.templates[K].apply(M,W)),u=l.className,l.namespace,f=l.fields,g=l.error),M.initialize()),Z(l.templates[K])||M.invoke(K)):(C!==_&&C.invoke("destroy"),M.initialize(),P=b)}),P!==_?P:this},Q.flyout=Q.fn.flyout,Q.fn.flyout.settings={name:"Flyout",namespace:"flyout",silent:!1,debug:!1,verbose:!1,performance:!0,context:"body",exclusive:!1,closable:!0,autofocus:!0,restoreFocus:!0,dimPage:!0,scrollLock:!1,returnScroll:!1,delaySetup:!1,autoShow:!1,keyboardShortcuts:!0,title:"",content:"",class:"",classTitle:"",classContent:"",classActions:"",closeIcon:!1,actions:!1,preserveHTML:!0,fields:{class:"class",text:"text",icon:"icon",click:"click"},onChange:function(){},onShow:function(){},onHide:function(){return!0},onHidden:!1,onVisible:function(){},onApprove:function(){},onDeny:function(){},keys:{space:32,enter:13,escape:27,tab:9},className:{flyout:"ui flyout",close:"close icon",header:"ui header",content:"content",actions:"actions",active:"active",animating:"animating",blurring:"blurring",closing:"closing",dimmed:"dimmed",ios:"ios",locked:"locked",pushable:"pushable",pushed:"pushed",right:"right",top:"top",left:"left",bottom:"bottom",visible:"visible",overlay:"overlay",fullscreen:"fullscreen",template:"ui flyout",button:"ui button",ok:"positive",cancel:"negative",prompt:"ui fluid input"},selector:{bodyFixed:"> .ui.fixed.menu, > .ui.right.toast-container, > .ui.right.sidebar, > .ui.right.flyout, > .ui.fixed.nag, > .ui.fixed.nag > .close",fixed:".fixed",omitted:"script, link, style, .ui.modal, .ui.dimmer, .ui.nag, .ui.fixed",pusher:".pusher",flyout:".ui.flyout",header:".ui.header",content:".content",actions:".actions",close:".close",approve:".actions .positive, .actions .approve, .actions .ok",deny:".actions .negative, .actions .deny, .actions .cancel"},regExp:{ios:/(iPad|iPhone|iPod)/g,mobileChrome:/(CriOS)/g,mobile:/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|Silk-Accelerated|(hpw|web)OS|Fennec|Minimo|Opera M(obi|ini)|Blazer|Dolfin|Dolphin|Skyfire|Zune/g},error:{method:"The method you called is not defined.",pusher:"Had to add pusher element. For optimal performance make sure body content is inside a pusher element",movedFlyout:"Had to move flyout. For optimal performance make sure flyout and pusher are direct children of your body tag",notFound:"There were no elements that matched the specified selector"},text:{ok:"Ok",cancel:"Cancel",close:"Close"}},Q.fn.flyout.settings.templates={getArguments:function(e){e=[].slice.call(e);return Q.isPlainObject(e[0])?Q.extend({handler:function(){},content:"",title:""},e[0]):(Z(e[e.length-1])||e.push(function(){}),{handler:e.pop(),content:e.pop()||"",title:e.pop()||""})},alert:function(){var e=this.get.settings(),t=e.templates.getArguments(arguments);return{title:t.title,content:t.content,actions:[{text:e.text.ok,class:e.className.ok,click:t.handler}]}},confirm:function(){var e=this.get.settings(),t=e.templates.getArguments(arguments);return{title:t.title,content:t.content,actions:[{text:e.text.ok,class:e.className.ok,click:function(){t.handler(!0)}},{text:e.text.cancel,class:e.className.cancel,click:function(){t.handler(!1)}}]}},prompt:function(){var t=this,e=this.get.settings(),n=e.templates.getArguments(arguments);return 0===Q(Q.parseHTML(n.content)).filter(".ui.input").length&&(n.content+='<p><div class="'+e.className.prompt+'"><input placeholder="'+this.helpers.deQuote(n.placeholder||"")+'" type="text" value="'+this.helpers.deQuote(n.defaultValue||"")+'"></div></p>'),{title:n.title,content:n.content,actions:[{text:e.text.ok,class:e.className.ok,click:function(){var e=t.get.settings(),e=t.get.element().find(e.selector.prompt)[0];n.handler(Q(e).val())}},{text:e.text.cancel,class:e.className.cancel,click:function(){n.handler(null)}}]}}}}(jQuery,window,document);
|
package/dist/components/form.css
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* # Fomantic-UI 2.9.1-beta.
|
2
|
+
* # Fomantic-UI 2.9.1-beta.26+1084e98 - Form
|
3
3
|
* https://github.com/fomantic/Fomantic-UI/
|
4
4
|
*
|
5
5
|
*
|
@@ -84,8 +84,8 @@
|
|
84
84
|
}
|
85
85
|
|
86
86
|
/* Set max height on unusual input */
|
87
|
-
.ui.form
|
88
|
-
.ui.form
|
87
|
+
.ui.form::-webkit-datetime-edit,
|
88
|
+
.ui.form::-webkit-inner-spin-button {
|
89
89
|
height: 1.21428571em;
|
90
90
|
}
|
91
91
|
.ui.form input:not([type]),
|
@@ -103,7 +103,7 @@
|
|
103
103
|
.ui.form input[type="file"],
|
104
104
|
.ui.form input[type="url"],
|
105
105
|
.ui.form input[type="week"] {
|
106
|
-
font-family: 'Lato', system-ui, -apple-system,
|
106
|
+
font-family: 'Lato', system-ui, -apple-system, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', Arial, 'Noto Sans', 'Liberation Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
|
107
107
|
margin: 0;
|
108
108
|
outline: none;
|
109
109
|
-webkit-appearance: none;
|
@@ -148,7 +148,7 @@
|
|
148
148
|
-webkit-transition: color 0.1s ease, border-color 0.1s ease;
|
149
149
|
transition: color 0.1s ease, border-color 0.1s ease;
|
150
150
|
font-size: 1em;
|
151
|
-
font-family: 'Lato', system-ui, -apple-system,
|
151
|
+
font-family: 'Lato', system-ui, -apple-system, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', Arial, 'Noto Sans', 'Liberation Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
|
152
152
|
line-height: 1.2857;
|
153
153
|
resize: vertical;
|
154
154
|
}
|
@@ -370,23 +370,23 @@
|
|
370
370
|
--------------------- */
|
371
371
|
|
372
372
|
/* browsers require these rules separate */
|
373
|
-
.ui.form
|
373
|
+
.ui.form::-webkit-input-placeholder {
|
374
374
|
color: rgba(191, 191, 191, 0.87);
|
375
375
|
}
|
376
|
-
.ui.form
|
376
|
+
.ui.form:-ms-input-placeholder {
|
377
377
|
color: rgba(191, 191, 191, 0.87) !important;
|
378
378
|
}
|
379
|
-
.ui.form
|
379
|
+
.ui.form::-moz-placeholder {
|
380
380
|
color: rgba(191, 191, 191, 0.87);
|
381
381
|
opacity: 1;
|
382
382
|
}
|
383
|
-
.ui.form
|
383
|
+
.ui.form:focus::-webkit-input-placeholder {
|
384
384
|
color: rgba(115, 115, 115, 0.87);
|
385
385
|
}
|
386
|
-
.ui.form
|
386
|
+
.ui.form:focus:-ms-input-placeholder {
|
387
387
|
color: rgba(115, 115, 115, 0.87) !important;
|
388
388
|
}
|
389
|
-
.ui.form
|
389
|
+
.ui.form:focus::-moz-placeholder {
|
390
390
|
color: rgba(115, 115, 115, 0.87);
|
391
391
|
}
|
392
392
|
|
@@ -1408,7 +1408,7 @@
|
|
1408
1408
|
--------------------- */
|
1409
1409
|
.ui.form .disabled.fields .field,
|
1410
1410
|
.ui.form .disabled.field,
|
1411
|
-
.ui.form .field
|
1411
|
+
.ui.form .field:disabled {
|
1412
1412
|
pointer-events: none;
|
1413
1413
|
opacity: 0.45;
|
1414
1414
|
}
|
@@ -1416,7 +1416,7 @@
|
|
1416
1416
|
.ui.form .fields.disabled > label {
|
1417
1417
|
opacity: 0.45;
|
1418
1418
|
}
|
1419
|
-
.ui.form .field.disabled
|
1419
|
+
.ui.form .field.disabled:disabled {
|
1420
1420
|
opacity: 1;
|
1421
1421
|
}
|
1422
1422
|
|
package/dist/components/form.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* # Fomantic-UI 2.9.1-beta.
|
2
|
+
* # Fomantic-UI 2.9.1-beta.26+1084e98 - Form Validation
|
3
3
|
* https://github.com/fomantic/Fomantic-UI/
|
4
4
|
*
|
5
5
|
*
|
@@ -345,14 +345,14 @@
|
|
345
345
|
},
|
346
346
|
fieldDirty: function ($el) {
|
347
347
|
var initialValue = $el.data(metadata.defaultValue);
|
348
|
-
// Explicitly check for null
|
349
|
-
if (initialValue
|
348
|
+
// Explicitly check for undefined/null here as value may be `false`, so ($el.data(dataInitialValue) || '') would not work
|
349
|
+
if (initialValue === undefined || initialValue === null) {
|
350
350
|
initialValue = '';
|
351
351
|
} else if (Array.isArray(initialValue)) {
|
352
352
|
initialValue = initialValue.toString();
|
353
353
|
}
|
354
354
|
var currentValue = $el.val();
|
355
|
-
if (currentValue
|
355
|
+
if (currentValue === undefined || currentValue === null) {
|
356
356
|
currentValue = '';
|
357
357
|
} else if (Array.isArray(currentValue)) {
|
358
358
|
// multiple select values are returned as arrays which are never equal, so do string conversion first
|
@@ -403,13 +403,13 @@
|
|
403
403
|
escape: 27,
|
404
404
|
}
|
405
405
|
;
|
406
|
-
if (key
|
406
|
+
if (key === keyCode.escape) {
|
407
407
|
module.verbose('Escape key pressed blurring field');
|
408
408
|
$field[0]
|
409
409
|
.blur()
|
410
410
|
;
|
411
411
|
}
|
412
|
-
if (!event.ctrlKey && key
|
412
|
+
if (!event.ctrlKey && key === keyCode.enter && isInput && !isInDropdown && !isCheckbox) {
|
413
413
|
if (!keyHeldDown) {
|
414
414
|
$field.one('keyup' + eventNamespace, module.event.field.keyup);
|
415
415
|
module.submit();
|
@@ -428,7 +428,7 @@
|
|
428
428
|
$fieldGroup = $field.closest($group),
|
429
429
|
validationRules = module.get.validation($field)
|
430
430
|
;
|
431
|
-
if (validationRules && (settings.on
|
431
|
+
if (validationRules && (settings.on === 'blur' || ($fieldGroup.hasClass(className.error) && settings.revalidate))) {
|
432
432
|
module.debug('Revalidating field', $field, validationRules);
|
433
433
|
module.validate.field(validationRules);
|
434
434
|
if (!settings.inline) {
|
@@ -442,7 +442,7 @@
|
|
442
442
|
$fieldGroup = $field.closest($group),
|
443
443
|
validationRules = module.get.validation($field)
|
444
444
|
;
|
445
|
-
if (validationRules && (settings.on
|
445
|
+
if (validationRules && (settings.on === 'change' || ($fieldGroup.hasClass(className.error) && settings.revalidate))) {
|
446
446
|
clearTimeout(module.timer);
|
447
447
|
module.timer = setTimeout(function () {
|
448
448
|
module.debug('Revalidating field', $field, validationRules);
|
@@ -488,7 +488,7 @@
|
|
488
488
|
return rule.type;
|
489
489
|
},
|
490
490
|
changeEvent: function (type, $input) {
|
491
|
-
if (type
|
491
|
+
if (type === 'checkbox' || type === 'radio' || type === 'hidden' || $input.is('select')) {
|
492
492
|
return 'change';
|
493
493
|
}
|
494
494
|
|
@@ -557,7 +557,7 @@
|
|
557
557
|
}
|
558
558
|
if (requiresName) {
|
559
559
|
$label = $field.closest(selector.group).find('label').eq(0);
|
560
|
-
name = $label.length
|
560
|
+
name = $label.length === 1
|
561
561
|
? $label.text()
|
562
562
|
: $field.prop('placeholder') || settings.text.unspecifiedField;
|
563
563
|
prompt = prompt.replace(/{name}/g, name);
|
@@ -730,42 +730,53 @@
|
|
730
730
|
var date = $calendar.calendar('get date');
|
731
731
|
|
732
732
|
if (date !== null) {
|
733
|
-
|
734
|
-
|
735
|
-
|
736
|
-
values[name] = $calendar.calendar('get input date');
|
737
|
-
} else if (settings.dateHandling == 'formatter') {
|
738
|
-
var type = $calendar.calendar('setting', 'type');
|
733
|
+
switch (settings.dateHandling) {
|
734
|
+
case 'date': {
|
735
|
+
values[name] = date;
|
739
736
|
|
740
|
-
|
741
|
-
|
742
|
-
|
743
|
-
|
744
|
-
break;
|
745
|
-
|
746
|
-
case 'datetime':
|
747
|
-
values[name] = settings.formatter.datetime(date);
|
748
|
-
|
749
|
-
break;
|
750
|
-
|
751
|
-
case 'time':
|
752
|
-
values[name] = settings.formatter.time(date);
|
753
|
-
|
754
|
-
break;
|
755
|
-
|
756
|
-
case 'month':
|
757
|
-
values[name] = settings.formatter.month(date);
|
758
|
-
|
759
|
-
break;
|
760
|
-
|
761
|
-
case 'year':
|
762
|
-
values[name] = settings.formatter.year(date);
|
763
|
-
|
764
|
-
break;
|
737
|
+
break;
|
738
|
+
}
|
739
|
+
case 'input': {
|
740
|
+
values[name] = $calendar.calendar('get input date');
|
765
741
|
|
766
|
-
|
767
|
-
|
768
|
-
|
742
|
+
break;
|
743
|
+
}
|
744
|
+
case 'formatter': {
|
745
|
+
var type = $calendar.calendar('setting', 'type');
|
746
|
+
|
747
|
+
switch (type) {
|
748
|
+
case 'date': {
|
749
|
+
values[name] = settings.formatter.date(date);
|
750
|
+
|
751
|
+
break;
|
752
|
+
}
|
753
|
+
case 'datetime': {
|
754
|
+
values[name] = settings.formatter.datetime(date);
|
755
|
+
|
756
|
+
break;
|
757
|
+
}
|
758
|
+
case 'time': {
|
759
|
+
values[name] = settings.formatter.time(date);
|
760
|
+
|
761
|
+
break;
|
762
|
+
}
|
763
|
+
case 'month': {
|
764
|
+
values[name] = settings.formatter.month(date);
|
765
|
+
|
766
|
+
break;
|
767
|
+
}
|
768
|
+
case 'year': {
|
769
|
+
values[name] = settings.formatter.year(date);
|
770
|
+
|
771
|
+
break;
|
772
|
+
}
|
773
|
+
default: {
|
774
|
+
module.debug('Wrong calendar mode', $calendar, type);
|
775
|
+
values[name] = '';
|
776
|
+
}
|
777
|
+
}
|
778
|
+
|
779
|
+
break;
|
769
780
|
}
|
770
781
|
}
|
771
782
|
} else {
|
@@ -854,7 +865,7 @@
|
|
854
865
|
// For each new rule, check if there's not already one with the same type
|
855
866
|
$.each(newValidation.rules, function (_index, rule) {
|
856
867
|
if ($.grep(validation[name].rules, function (item) {
|
857
|
-
return item.type
|
868
|
+
return item.type === rule.type;
|
858
869
|
}).length === 0) {
|
859
870
|
validation[name].rules.push(rule);
|
860
871
|
}
|
@@ -1139,7 +1150,7 @@
|
|
1139
1150
|
validation = module.get.validation($el),
|
1140
1151
|
hasEmptyRule = validation
|
1141
1152
|
? $.grep(validation.rules, function (rule) {
|
1142
|
-
return rule.type
|
1153
|
+
return rule.type === 'empty';
|
1143
1154
|
}) !== 0
|
1144
1155
|
: false,
|
1145
1156
|
identifier = validation.identifier || $el.attr('id') || $el.attr('name') || $el.data(metadata.validate)
|
@@ -1158,7 +1169,7 @@
|
|
1158
1169
|
optional: function (identifier, bool) {
|
1159
1170
|
bool = bool !== false;
|
1160
1171
|
$.each(validation, function (fieldName, field) {
|
1161
|
-
if (identifier
|
1172
|
+
if (identifier === fieldName || identifier === field.identifier) {
|
1162
1173
|
field.optional = bool;
|
1163
1174
|
}
|
1164
1175
|
});
|
@@ -1442,16 +1453,16 @@
|
|
1442
1453
|
query = query.split(/[ .]/);
|
1443
1454
|
maxDepth = query.length - 1;
|
1444
1455
|
$.each(query, function (depth, value) {
|
1445
|
-
var camelCaseValue = depth
|
1456
|
+
var camelCaseValue = depth !== maxDepth
|
1446
1457
|
? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)
|
1447
1458
|
: query;
|
1448
|
-
if ($.isPlainObject(object[camelCaseValue]) && (depth
|
1459
|
+
if ($.isPlainObject(object[camelCaseValue]) && (depth !== maxDepth)) {
|
1449
1460
|
object = object[camelCaseValue];
|
1450
1461
|
} else if (object[camelCaseValue] !== undefined) {
|
1451
1462
|
found = object[camelCaseValue];
|
1452
1463
|
|
1453
1464
|
return false;
|
1454
|
-
} else if ($.isPlainObject(object[value]) && (depth
|
1465
|
+
} else if ($.isPlainObject(object[value]) && (depth !== maxDepth)) {
|
1455
1466
|
object = object[value];
|
1456
1467
|
} else if (object[value] !== undefined) {
|
1457
1468
|
found = object[value];
|
@@ -1748,7 +1759,7 @@
|
|
1748
1759
|
if (!range || ['', '..'].indexOf(range) !== -1) {
|
1749
1760
|
|
1750
1761
|
// do nothing
|
1751
|
-
} else if (range.indexOf('..')
|
1762
|
+
} else if (range.indexOf('..') === -1) {
|
1752
1763
|
if (regExp.test(range)) {
|
1753
1764
|
min = range - 0;
|
1754
1765
|
max = min;
|
@@ -1856,7 +1867,7 @@
|
|
1856
1867
|
// is exactly length
|
1857
1868
|
exactLength: function (value, requiredLength) {
|
1858
1869
|
return value !== undefined
|
1859
|
-
? value.length
|
1870
|
+
? value.length === Number(requiredLength)
|
1860
1871
|
: false;
|
1861
1872
|
},
|
1862
1873
|
|
@@ -1894,7 +1905,7 @@
|
|
1894
1905
|
}
|
1895
1906
|
|
1896
1907
|
return matchingValue !== undefined
|
1897
|
-
? value.toString()
|
1908
|
+
? value.toString() === matchingValue.toString()
|
1898
1909
|
: false;
|
1899
1910
|
},
|
1900
1911
|
|
@@ -2039,10 +2050,12 @@
|
|
2039
2050
|
},
|
2040
2051
|
|
2041
2052
|
minCount: function (value, minCount) {
|
2042
|
-
|
2053
|
+
minCount = Number(minCount);
|
2054
|
+
|
2055
|
+
if (minCount === 0) {
|
2043
2056
|
return true;
|
2044
2057
|
}
|
2045
|
-
if (minCount
|
2058
|
+
if (minCount === 1) {
|
2046
2059
|
return value !== '';
|
2047
2060
|
}
|
2048
2061
|
|
@@ -2050,21 +2063,25 @@
|
|
2050
2063
|
},
|
2051
2064
|
|
2052
2065
|
exactCount: function (value, exactCount) {
|
2053
|
-
|
2066
|
+
exactCount = Number(exactCount);
|
2067
|
+
|
2068
|
+
if (exactCount === 0) {
|
2054
2069
|
return value === '';
|
2055
2070
|
}
|
2056
|
-
if (exactCount
|
2071
|
+
if (exactCount === 1) {
|
2057
2072
|
return value !== '' && value.search(',') === -1;
|
2058
2073
|
}
|
2059
2074
|
|
2060
|
-
return value.split(',').length
|
2075
|
+
return value.split(',').length === exactCount;
|
2061
2076
|
},
|
2062
2077
|
|
2063
2078
|
maxCount: function (value, maxCount) {
|
2064
|
-
|
2079
|
+
maxCount = Number(maxCount);
|
2080
|
+
|
2081
|
+
if (maxCount === 0) {
|
2065
2082
|
return false;
|
2066
2083
|
}
|
2067
|
-
if (maxCount
|
2084
|
+
if (maxCount === 1) {
|
2068
2085
|
return value.search(',') === -1;
|
2069
2086
|
}
|
2070
2087
|
|