fomantic-ui 2.9.3-beta.0 → 2.9.3-beta.10
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/.all-contributorsrc +9 -0
- package/CONTRIBUTORS.md +102 -99
- package/dist/components/accordion.css +1 -1
- package/dist/components/accordion.js +1 -5
- 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 +14 -8
- 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 +6 -6
- package/dist/components/calendar.js +1 -6
- 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 +1 -5
- 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 +1 -5
- 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 +19 -2
- package/dist/components/dropdown.js +29 -14
- 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 +1 -6
- package/dist/components/embed.min.css +1 -1
- package/dist/components/embed.min.js +2 -2
- package/dist/components/emoji.css +1 -1
- package/dist/components/emoji.min.css +1 -1
- 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 +1 -1
- package/dist/components/flyout.js +40 -27
- package/dist/components/flyout.min.css +1 -1
- package/dist/components/flyout.min.js +2 -2
- package/dist/components/form.css +36 -5
- package/dist/components/form.js +32 -24
- 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 +21 -2
- package/dist/components/label.min.css +2 -2
- 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/menu.css +1 -1
- package/dist/components/menu.min.css +1 -1
- package/dist/components/message.css +1 -1
- package/dist/components/message.min.css +1 -1
- package/dist/components/modal.css +6 -3
- package/dist/components/modal.js +44 -32
- 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 +16 -8
- 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 +41 -40
- package/dist/components/popup.js +25 -17
- 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 +1 -6
- 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 +1 -5
- 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 +1 -5
- package/dist/components/search.min.css +1 -1
- package/dist/components/search.min.js +2 -2
- package/dist/components/segment.css +3 -2
- package/dist/components/segment.min.css +2 -2
- package/dist/components/shape.css +1 -1
- package/dist/components/shape.js +1 -5
- 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 +15 -8
- 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 +1 -1
- package/dist/components/site.min.css +1 -1
- package/dist/components/site.min.js +1 -1
- package/dist/components/slider.css +1 -1
- package/dist/components/slider.js +122 -31
- package/dist/components/slider.min.css +1 -1
- package/dist/components/slider.min.js +2 -2
- package/dist/components/state.js +23 -20
- 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 +17 -16
- 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 +14 -6
- 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 +17 -9
- package/dist/components/toast.min.css +1 -1
- package/dist/components/toast.min.js +2 -2
- package/dist/components/transition.css +1 -1
- package/dist/components/transition.js +1 -5
- package/dist/components/transition.min.css +1 -1
- package/dist/components/transition.min.js +2 -2
- package/dist/components/visibility.js +15 -6
- package/dist/components/visibility.min.js +2 -2
- package/dist/semantic.css +203 -108
- package/dist/semantic.js +435 -281
- package/dist/semantic.min.css +2 -2
- package/dist/semantic.min.js +2 -2
- package/package.json +1 -1
- package/src/definitions/behaviors/api.js +13 -7
- package/src/definitions/behaviors/form.js +31 -23
- package/src/definitions/behaviors/state.js +22 -19
- package/src/definitions/behaviors/visibility.js +14 -5
- package/src/definitions/collections/breadcrumb.less +2 -1
- package/src/definitions/collections/form.less +24 -5
- package/src/definitions/collections/grid.less +2 -1
- package/src/definitions/collections/menu.less +2 -1
- package/src/definitions/collections/message.less +2 -1
- package/src/definitions/collections/table.less +2 -1
- package/src/definitions/elements/button.less +3 -1
- package/src/definitions/elements/container.less +2 -1
- package/src/definitions/elements/divider.less +2 -1
- package/src/definitions/elements/emoji.less +2 -1
- package/src/definitions/elements/flag.less +2 -1
- package/src/definitions/elements/header.less +2 -1
- package/src/definitions/elements/icon.less +2 -1
- package/src/definitions/elements/image.less +2 -1
- package/src/definitions/elements/input.less +2 -1
- package/src/definitions/elements/label.less +23 -2
- package/src/definitions/elements/list.less +2 -1
- package/src/definitions/elements/loader.less +2 -1
- package/src/definitions/elements/placeholder.less +2 -1
- package/src/definitions/elements/rail.less +2 -1
- package/src/definitions/elements/reveal.less +2 -1
- package/src/definitions/elements/segment.less +4 -2
- package/src/definitions/elements/step.less +2 -1
- package/src/definitions/elements/text.less +2 -1
- package/src/definitions/globals/reset.less +2 -1
- package/src/definitions/globals/site.less +2 -1
- package/src/definitions/modules/accordion.js +0 -4
- package/src/definitions/modules/accordion.less +2 -1
- package/src/definitions/modules/calendar.js +0 -5
- package/src/definitions/modules/calendar.less +3 -2
- package/src/definitions/modules/checkbox.js +0 -4
- package/src/definitions/modules/checkbox.less +2 -1
- package/src/definitions/modules/dimmer.js +0 -4
- package/src/definitions/modules/dimmer.less +2 -1
- package/src/definitions/modules/dropdown.js +28 -13
- package/src/definitions/modules/dropdown.less +22 -2
- package/src/definitions/modules/embed.js +0 -5
- package/src/definitions/modules/embed.less +2 -1
- package/src/definitions/modules/flyout.js +39 -26
- package/src/definitions/modules/flyout.less +2 -1
- package/src/definitions/modules/modal.js +43 -31
- package/src/definitions/modules/modal.less +7 -3
- package/src/definitions/modules/nag.js +15 -7
- package/src/definitions/modules/nag.less +3 -1
- package/src/definitions/modules/popup.js +24 -16
- package/src/definitions/modules/popup.less +42 -39
- package/src/definitions/modules/progress.js +0 -5
- package/src/definitions/modules/progress.less +2 -1
- package/src/definitions/modules/rating.js +0 -4
- package/src/definitions/modules/rating.less +2 -1
- package/src/definitions/modules/search.js +0 -4
- package/src/definitions/modules/search.less +2 -1
- package/src/definitions/modules/shape.js +0 -4
- package/src/definitions/modules/shape.less +2 -1
- package/src/definitions/modules/sidebar.js +14 -7
- package/src/definitions/modules/sidebar.less +2 -1
- package/src/definitions/modules/slider.js +121 -30
- package/src/definitions/modules/slider.less +2 -1
- package/src/definitions/modules/sticky.js +16 -15
- package/src/definitions/modules/sticky.less +2 -1
- package/src/definitions/modules/tab.js +13 -5
- package/src/definitions/modules/tab.less +2 -1
- package/src/definitions/modules/toast.js +16 -8
- package/src/definitions/modules/toast.less +2 -1
- package/src/definitions/modules/transition.js +0 -4
- package/src/definitions/modules/transition.less +2 -1
- package/src/definitions/views/ad.less +2 -1
- package/src/definitions/views/card.less +2 -1
- package/src/definitions/views/comment.less +2 -1
- package/src/definitions/views/feed.less +2 -1
- package/src/definitions/views/item.less +2 -1
- package/src/definitions/views/statistic.less +2 -1
- package/src/overrides.less +7 -0
- package/src/theme.less +7 -6
- package/src/themes/default/elements/label.variables +5 -0
- package/src/themes/default/modules/dropdown.variables +3 -0
- package/src/themes/default/modules/modal.variables +1 -0
- package/src/themes/default/modules/popup.variables +3 -1
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* # Fomantic-UI 2.9.3-beta.
|
2
|
+
* # Fomantic-UI 2.9.3-beta.10+11b4099 - Flyout
|
3
3
|
* https://github.com/fomantic/Fomantic-UI/
|
4
4
|
*
|
5
5
|
*
|
@@ -28,15 +28,25 @@
|
|
28
28
|
$head = $('head'),
|
29
29
|
$body = $('body'),
|
30
30
|
|
31
|
-
moduleSelector = $allModules.selector || '',
|
32
|
-
|
33
31
|
time = Date.now(),
|
34
32
|
performance = [],
|
35
33
|
|
36
34
|
query = arguments[0],
|
37
35
|
methodInvoked = typeof query === 'string',
|
38
36
|
queryArguments = [].slice.call(arguments, 1),
|
37
|
+
contextCheck = function (context, win) {
|
38
|
+
var $context;
|
39
|
+
if ([window, document].indexOf(context) >= 0) {
|
40
|
+
$context = $body;
|
41
|
+
} else {
|
42
|
+
$context = $(win.document).find(context);
|
43
|
+
if ($context.length === 0) {
|
44
|
+
$context = win.frameElement ? contextCheck(context, win.parent) : $body;
|
45
|
+
}
|
46
|
+
}
|
39
47
|
|
48
|
+
return $context;
|
49
|
+
},
|
40
50
|
returnedValue
|
41
51
|
;
|
42
52
|
|
@@ -57,7 +67,7 @@
|
|
57
67
|
moduleNamespace = 'module-' + namespace,
|
58
68
|
|
59
69
|
$module = $(this),
|
60
|
-
$context =
|
70
|
+
$context = contextCheck(settings.context, window),
|
61
71
|
$closeIcon = $module.find(selector.close),
|
62
72
|
$inputs,
|
63
73
|
$focusedElement,
|
@@ -76,6 +86,7 @@
|
|
76
86
|
initialBodyMargin = '',
|
77
87
|
tempBodyMargin = '',
|
78
88
|
hadScrollbar = false,
|
89
|
+
windowRefocused = false,
|
79
90
|
|
80
91
|
elementNamespace,
|
81
92
|
id,
|
@@ -254,9 +265,13 @@
|
|
254
265
|
module.setup.heights();
|
255
266
|
},
|
256
267
|
focus: function () {
|
257
|
-
|
268
|
+
windowRefocused = true;
|
269
|
+
},
|
270
|
+
click: function (event) {
|
271
|
+
if (windowRefocused && document.activeElement !== event.target && module.is.visible() && settings.autofocus && settings.dimPage && $(document.activeElement).closest(selector.flyout).length === 0) {
|
258
272
|
requestAnimationFrame(module.set.autofocus);
|
259
273
|
}
|
274
|
+
windowRefocused = false;
|
260
275
|
},
|
261
276
|
clickaway: function (event) {
|
262
277
|
if (settings.closable) {
|
@@ -363,6 +378,9 @@
|
|
363
378
|
$window
|
364
379
|
.on('focus' + elementNamespace, module.event.focus)
|
365
380
|
;
|
381
|
+
$context
|
382
|
+
.on('click' + elementNamespace, module.event.click)
|
383
|
+
;
|
366
384
|
},
|
367
385
|
clickaway: function () {
|
368
386
|
module.verbose('Adding clickaway events to context', $context);
|
@@ -492,11 +510,12 @@
|
|
492
510
|
|
493
511
|
return nodes;
|
494
512
|
},
|
495
|
-
shouldRefreshInputs = false
|
513
|
+
shouldRefreshInputs = false,
|
514
|
+
ignoreAutofocus = true
|
496
515
|
;
|
497
516
|
mutations.every(function (mutation) {
|
498
517
|
if (mutation.type === 'attributes') {
|
499
|
-
if (observeAttributes && (mutation.attributeName === 'disabled' || $(mutation.target).find(':input').addBack(':input').length > 0)) {
|
518
|
+
if (observeAttributes && (mutation.attributeName === 'disabled' || $(mutation.target).find(':input').addBack(':input').filter(':visible').length > 0)) {
|
500
519
|
shouldRefreshInputs = true;
|
501
520
|
}
|
502
521
|
} else {
|
@@ -506,6 +525,9 @@
|
|
506
525
|
$removedInputs = $(collectNodes(mutation.removedNodes)).filter('a[href], [tabindex], :input');
|
507
526
|
if ($addedInputs.length > 0 || $removedInputs.length > 0) {
|
508
527
|
shouldRefreshInputs = true;
|
528
|
+
if ($addedInputs.filter(':input').length > 0 || $removedInputs.filter(':input').length > 0) {
|
529
|
+
ignoreAutofocus = false;
|
530
|
+
}
|
509
531
|
}
|
510
532
|
}
|
511
533
|
|
@@ -513,7 +535,7 @@
|
|
513
535
|
});
|
514
536
|
|
515
537
|
if (shouldRefreshInputs) {
|
516
|
-
module.refreshInputs();
|
538
|
+
module.refreshInputs(ignoreAutofocus);
|
517
539
|
}
|
518
540
|
});
|
519
541
|
observer.observe(element, {
|
@@ -527,7 +549,7 @@
|
|
527
549
|
},
|
528
550
|
refresh: function () {
|
529
551
|
module.verbose('Refreshing selector cache');
|
530
|
-
$context =
|
552
|
+
$context = contextCheck(settings.context, window);
|
531
553
|
module.refreshFlyouts();
|
532
554
|
$pusher = $context.children(selector.pusher);
|
533
555
|
module.clear.cache();
|
@@ -538,7 +560,7 @@
|
|
538
560
|
$flyouts = $context.children(selector.flyout);
|
539
561
|
},
|
540
562
|
|
541
|
-
refreshInputs: function () {
|
563
|
+
refreshInputs: function (ignoreAutofocus) {
|
542
564
|
if ($inputs) {
|
543
565
|
$inputs
|
544
566
|
.off('keydown' + elementNamespace)
|
@@ -550,8 +572,8 @@
|
|
550
572
|
$inputs = $module.find('a[href], [tabindex], :input:enabled').filter(':visible').filter(function () {
|
551
573
|
return $(this).closest('.disabled').length === 0;
|
552
574
|
});
|
553
|
-
if ($inputs.length === 0) {
|
554
|
-
$inputs = $module;
|
575
|
+
if ($inputs.filter(':input').length === 0) {
|
576
|
+
$inputs = $module.add($inputs);
|
555
577
|
$module.attr('tabindex', -1);
|
556
578
|
} else {
|
557
579
|
$module.removeAttr('tabindex');
|
@@ -562,7 +584,7 @@
|
|
562
584
|
$inputs.last()
|
563
585
|
.on('keydown' + elementNamespace, module.event.inputKeyDown.last)
|
564
586
|
;
|
565
|
-
if (settings.autofocus && $inputs.filter(':focus').length === 0) {
|
587
|
+
if (!ignoreAutofocus && settings.autofocus && $inputs.filter(':focus').length === 0) {
|
566
588
|
module.set.autofocus();
|
567
589
|
}
|
568
590
|
},
|
@@ -840,20 +862,14 @@
|
|
840
862
|
var
|
841
863
|
$autofocus = $inputs.filter('[autofocus]'),
|
842
864
|
$rawInputs = $inputs.filter(':input'),
|
843
|
-
$input = $autofocus.length > 0
|
844
|
-
? $autofocus
|
865
|
+
$input = ($autofocus.length > 0
|
866
|
+
? $autofocus
|
845
867
|
: ($rawInputs.length > 0
|
846
868
|
? $rawInputs
|
847
|
-
: $
|
848
|
-
|
869
|
+
: $module)
|
870
|
+
).first()
|
849
871
|
;
|
850
|
-
|
851
|
-
if ($input.length === 0 && $inputs.length > 0) {
|
852
|
-
$input = $inputs.first();
|
853
|
-
}
|
854
|
-
if ($input.length > 0) {
|
855
|
-
$input.trigger('focus');
|
856
|
-
}
|
872
|
+
$input.trigger('focus');
|
857
873
|
},
|
858
874
|
dimmerStyles: function () {
|
859
875
|
if (settings.blurring) {
|
@@ -1244,9 +1260,6 @@
|
|
1244
1260
|
totalTime += data['Execution Time'];
|
1245
1261
|
});
|
1246
1262
|
title += ' ' + totalTime + 'ms';
|
1247
|
-
if (moduleSelector) {
|
1248
|
-
title += ' \'' + moduleSelector + '\'';
|
1249
|
-
}
|
1250
1263
|
if (performance.length > 0) {
|
1251
1264
|
console.groupCollapsed(title);
|
1252
1265
|
if (console.table) {
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*
|
2
|
-
* # Fomantic UI - 2.9.3-beta.
|
2
|
+
* # Fomantic UI - 2.9.3-beta.10+11b4099
|
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,W,U){"use strict";function X(e){return"function"==typeof e&&"number"!=typeof e.nodeType}W=void 0!==W&&W.Math===Math?W:globalThis,Q.fn.flyout=function(M){var O,e=Q(this),D=Q(W),N=Q(U),L=Q("html"),B=Q("head"),z=Q("body"),I=e.selector||"",j=Date.now(),R=[],q=M,K="string"==typeof q,V=[].slice.call(arguments,1);return e.each(function(){var n,e,o,s,t,i,r,a=Q.isPlainObject(M)?Q.extend(!0,{},Q.fn.flyout.settings,M):Q.extend({},Q.fn.flyout.settings),l=a.selector,c=a.className,u=a.namespace,d=a.fields,f=a.regExp,h=a.error,g="."+u,p="module-"+u,v=Q(this),b=[W,U].indexOf(a.context)<0?N.find(a.context):z,m=v.find(l.close),y=v.children(l.flyout),k=b.children(l.pusher),x=v.hasClass("flyout"),S=this,A=x?v.data(p):void 0,C=!1,w=b[0]===z[0],T="",F="",H=!1,P=!1,E={initialize:function(){var s;E.debug("Initializing flyout",M),E.create.id(),x||(E.create.flyout(),X(a.onHidden)||(a.onHidden=function(){E.destroy(),v.remove()}),a.autoShow||(a.autoShow=!0)),v.addClass(a.class),""!==a.title&&v.find(l.header).html(E.helpers.escape(a.title,a.preserveHTML)).addClass(a.classTitle),""!==a.content&&v.find(l.content).html(E.helpers.escape(a.content,a.preserveHTML)).addClass(a.classContent),E.has.configActions()&&(0===(s=v.find(l.actions).addClass(a.classActions)).length?s=Q("<div/>",{class:c.actions+" "+(a.classActions||"")}).appendTo(v):s.empty(),a.actions.forEach(function(e){var t=e[d.icon]?"<i "+(e[d.text]?'aria-hidden="true"':"")+' class="'+E.helpers.deQuote(e[d.icon])+' icon"></i>':"",n=E.helpers.escape(e[d.text]||"",a.preserveHTML),i=E.helpers.deQuote(e[d.class]||""),o=e[d.click]&&X(e[d.click])?e[d.click]:function(){};s.append(Q("<button/>",{html:t+n,"aria-label":(e[d.text]||e[d.icon]||"").replace(/<[^>]+(>|$)/g,""),class:c.button+" "+i,on:{click:function(){!1!==o.call(S,v)&&E.hide()}}}))})),a.delaySetup?requestAnimationFrame(E.setup.layout):E.setup.layout(),requestAnimationFrame(function(){E.setup.cache()}),"left"!==E.get.direction()&&"right"!==E.get.direction()||(E.setup.heights(),E.bind.resize()),E.bind.events(),E.observeChanges(),E.instantiate(),a.autoShow&&E.show()},instantiate:function(){E.verbose("Storing instance of module",E),A=E,v.data(p,A)},create:{flyout:function(){var e;E.verbose("Programmaticaly create flyout",b),v=Q("<div/>",{class:c.flyout,role:"dialog","aria-modal":a.dimPage}),a.closeIcon&&(m=Q("<i/>",{class:c.close,role:"button",tabindex:0,"aria-label":a.text.close}),v.append(m)),""!==a.title&&(e="_"+E.get.id()+"title",v.attr("aria-labelledby",e),Q("<div/>",{class:c.header,id:e}).appendTo(v)),""!==a.content&&(e="_"+E.get.id()+"desc",v.attr("aria-describedby",e),Q("<div/>",{class:c.content,id:e}).appendTo(v)),E.has.configActions()&&Q("<div/>",{class:c.actions}).appendTo(v),v.prependTo(b),S=v[0]},id:function(){t=(Math.random().toString(16)+"000000000").slice(2,10),s="."+t,E.verbose("Creating unique id for element",t)}},destroy:function(){i&&i.disconnect(),E.verbose("Destroying previous module for",v),v.off(g).removeData(p),E.is.ios()&&E.remove.ios(),m.off(s),n&&n.off(s),b.off(s),D.off(s),N.off(s)},event:{keyboard:function(e){e.which===a.keys.escape&&(a.closable?(E.debug("Escape key pressed hiding flyout"),E.hide()):E.debug("Escape key pressed, but closable is set to false"),e.preventDefault())},resize:function(){E.setup.heights()},focus:function(){E.is.visible()&&a.autofocus&&a.dimPage&&requestAnimationFrame(E.set.autofocus)},clickaway:function(e){var t;a.closable&&(t=0<k.find(e.target).length||k.is(e.target),e=b.is(e.target),t&&(E.verbose("User clicked on dimmed page"),E.hide()),e&&(E.verbose("User clicked on dimmable context (scaled out page)"),E.hide()))},close:function(e){E.hide()},closeKeyUp:function(e){e=e.which;e!==a.keys.enter&&e!==a.keys.space||E.hide()},inputKeyDown:{first:function(e){e.which===a.keys.tab&&e.shiftKey&&(n.last().trigger("focus"),e.preventDefault())},last:function(e){e.which!==a.keys.tab||e.shiftKey||(n.first().trigger("focus"),e.preventDefault())}},approve:function(e){C||!1===a.onApprove.call(E.element,Q(this))?E.verbose("Approve callback returned false cancelling close"):(C=!0,E.hide(function(){C=!1}))},deny:function(e){C||!1===a.onDeny.call(E.element,Q(this))?E.verbose("Deny callback returned false cancelling close"):(C=!0,E.hide(function(){C=!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(l.flyout).length&&e.preventDefault()}},bind:{resize:function(){E.verbose("Adding resize event to window",D),D.on("resize"+s,E.event.resize)},events:function(){E.verbose("Attaching events"),v.on("click"+g,l.close,E.event.close).on("click"+g,l.approve,E.event.approve).on("click"+g,l.deny,E.event.deny),m.on("keyup"+s,E.event.closeKeyUp),D.on("focus"+s,E.event.focus)},clickaway:function(){E.verbose("Adding clickaway events to context",b),b.on("click"+s,E.event.clickaway).on("touchend"+s,E.event.clickaway)},scrollLock:function(){a.scrollLock&&(E.debug("Disabling page scroll"),(H=E.has.scrollbar())&&(E.save.bodyMargin(),E.set.bodyMargin()),b.addClass(c.locked)),E.verbose("Adding events to contain flyout scroll"),N.on("touchmove"+s,E.event.touch),v.on("scroll"+g,E.event.containScroll)}},unbind:{clickaway:function(){E.verbose("Removing clickaway events from context",b),b.off(s)},scrollLock:function(){E.verbose("Removing scroll lock from page"),H&&E.restore.bodyMargin(),b.removeClass(c.locked),N.off(s),v.off("scroll"+g)}},add:{inlineCSS:function(){var e=E.cache.width||v.outerWidth(),t=E.cache.height||v.outerHeight(),n=E.is.rtl(),i=E.get.direction(),t={left:e,right:-e,top:t,bottom:-t};n&&(E.verbose("RTL detected, flipping widths"),t.left=-e,t.right=e),n="<style>","left"===i||"right"===i?(E.debug("Adding CSS rules for animation distance",e),n+=" .ui.visible."+i+".flyout ~ .fixed, .ui.visible."+i+".flyout ~ .pusher { transform: translate3d("+t[i]+"px, 0, 0); }"):"top"!==i&&"bottom"!==i||(n+=" .ui.visible."+i+".flyout ~ .fixed, .ui.visible."+i+".flyout ~ .pusher { transform: translate3d(0, "+t[i]+"px, 0); }"),E.is.ie()&&("left"===i||"right"===i?(E.debug("Adding CSS rules for animation distance",e),n+=" body.pushable > .ui.visible."+i+".flyout ~ .pusher::after { transform: translate3d("+t[i]+"px, 0, 0); }"):"top"!==i&&"bottom"!==i||(n+=" body.pushable > .ui.visible."+i+".flyout ~ .pusher::after { 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 { transform: translate3d(0, 0, 0); }"),o=Q(n+="</style>").appendTo(B),E.debug("Adding sizing css to head",o)},keyboardShortcuts:function(){E.verbose("Adding keyboard shortcuts"),N.on("keydown"+g,E.event.keyboard)}},observeChanges:function(){"MutationObserver"in W&&((i=new MutationObserver(function(e){function o(e){for(var t=[],n=0,i=e.length;n<i;n++)Array.prototype.push.apply(t,o(e[n].childNodes)),t.push(e[n]);return t}var n=!1;e.every(function(e){var t;return"attributes"===e.type?P&&("disabled"===e.attributeName||0<Q(e.target).find(":input").addBack(":input").length)&&(n=!0):(t=Q(o(e.addedNodes)).filter("a[href], [tabindex], :input:enabled").filter(":visible"),e=Q(o(e.removedNodes)).filter("a[href], [tabindex], :input"),(0<t.length||0<e.length)&&(n=!0)),!n}),n&&E.refreshInputs()})).observe(S,{attributeFilter:["class","disabled"],attributes:!0,childList:!0,subtree:!0}),E.debug("Setting up mutation observer",i))},refresh:function(){E.verbose("Refreshing selector cache"),b=[W,U].indexOf(a.context)<0?N.find(a.context):z,E.refreshFlyouts(),k=b.children(l.pusher),E.clear.cache()},refreshFlyouts:function(){E.verbose("Refreshing other flyouts"),y=b.children(l.flyout)},refreshInputs:function(){n&&n.off("keydown"+s),a.dimPage&&(0===(n=v.find("a[href], [tabindex], :input:enabled").filter(":visible").filter(function(){return 0===Q(this).closest(".disabled").length})).length?(n=v).attr("tabindex",-1):v.removeAttr("tabindex"),n.first().on("keydown"+s,E.event.inputKeyDown.first),n.last().on("keydown"+s,E.event.inputKeyDown.last),a.autofocus&&0===n.filter(":focus").length&&E.set.autofocus())},setup:{cache:function(){E.cache={width:v.outerWidth(),height:v.outerHeight()}},layout:function(){0===b.children(l.pusher).length&&(E.debug("Adding wrapper element for flyout"),E.error(h.pusher),k=Q('<div class="pusher" />'),b.children().not(l.omitted).not(y).wrapAll(k),E.refresh()),0!==v.nextAll(l.pusher).length&&v.nextAll(l.pusher)[0]===k[0]||(E.debug("Moved flyout to correct parent element"),E.error(h.movedFlyout,S),v.detach().prependTo(b),E.refresh()),E.is.mobile()&&v.addClass(c.fullscreen),E.clear.cache(),E.set.pushable(),E.set.direction()},heights:function(){E.debug("Setting up heights",v);var e=v.children(l.header),t=v.children(l.content),n=v.children(l.actions),e=(b.height()||0)-(e.outerHeight()||0)-(n.outerHeight()||0);0<e&&t.css("min-height",String(e)+"px")}},attachEvents:function(e,t){var n=Q(e);t=X(E[t])?E[t]:E.toggle,0<n.length?(E.debug("Attaching flyout events to element",e,t),n.on("click"+g,t)):E.error(h.notFound,e)},show:function(e){e=X(e)?e:function(){},E.is.hidden()?!1===a.onShow.call(S)?E.verbose("Show callback returned false cancelling show"):(E.refresh(),E.othersActive()&&(E.debug("Other flyouts currently visible"),a.exclusive?E.hideOthers():C=!1),E.set.dimmerStyles(),E.set.observeAttributes(!1),E.pushPage(function(){e.call(S),a.onVisible.call(S),a.keyboardShortcuts&&E.add.keyboardShortcuts(),E.save.focus(),E.refreshInputs(),requestAnimationFrame(E.set.observeAttributes)}),a.onChange.call(S)):E.debug("Flyout is already visible")},hide:function(e){if(e=X(e)?e:function(){},!1===a.onHide.call(S,Q(this)))return E.verbose("Hide callback returned false cancelling hide"),C=!1;(E.is.visible()||E.is.animating())&&(E.debug("Hiding flyout",e),E.refreshFlyouts(),E.set.observeAttributes(!1),E.pullPage(function(){e.call(S),X(a.onHidden)&&a.onHidden.call(S),E.restore.focus()}),a.onChange.call(S))},othersAnimating:function(){return 0<y.not(v).filter("."+c.animating).length},othersVisible:function(){return 0<y.not(v).filter("."+c.visible).length},othersActive:function(){return E.othersVisible()||E.othersAnimating()},hideOthers:function(e){var t=y.not(v).filter("."+c.visible),n=t.length,i=0;e=e||function(){},t.flyout("hide",function(){++i===n&&e()})},toggle:function(){E.verbose("Determining toggled direction"),E.is.hidden()?E.show():E.hide()},pushPage:function(t){var e,n,i;t=X(t)?t:function(){},E.set.overlay(),a.returnScroll&&(r=(w?D:b).scrollTop()),E.bind.scrollLock(),e=function(){E.bind.clickaway(),E.add.inlineCSS(),E.set.animating(),E.set.visible()},n=function(){E.set.dimmed()},i=function(e){e.target===v[0]&&(v.off("transitionend"+s,i),E.remove.animating(),t.call(S))},v.off("transitionend"+s),v.on("transitionend"+s,i),requestAnimationFrame(e),a.dimPage&&!E.othersVisible()&&requestAnimationFrame(n)},pullPage:function(t){var e,n;t=X(t)?t:function(){},E.verbose("Removing context push state",E.get.direction()),E.unbind.clickaway(),E.othersActive()||(E.unbind.scrollLock(),a.keyboardShortcuts&&E.remove.keyboardShortcuts()),e=function(){E.set.overlay(),E.set.animating(),a.dimPage&&!E.othersVisible()&&E.set.closing(),E.remove.visible()},n=function(e){e.target===v[0]&&(v.off("transitionend"+s,n),E.remove.animating(),E.remove.closing(),E.remove.overlay(),E.remove.inlineCSS(),a.returnScroll&&E.scrollBack(),a.dimPage&&!E.othersVisible()&&k.removeClass(c.dimmed),t.call(S))},v.off("transitionend"+s),v.on("transitionend"+s,n),requestAnimationFrame(e)},scrollToTop:function(){E.verbose("Scrolling to top of page to avoid animation issues"),v.scrollTop(0),(w?D:b)[0].scrollTo(0,0)},scrollBack:function(){E.verbose("Scrolling back to original page position"),(w?D:b)[0].scrollTo(0,r)},clear:{cache:function(){E.verbose("Clearing cached dimensions"),E.cache={}}},set:{observeAttributes:function(e){P=!1!==e},autofocus:function(){var e=n.filter("[autofocus]"),t=n.filter(":input"),e=(0<e.length?e:0<t.length?t:n.filter(":not(i.close)")).first();0<(e=0===e.length&&0<n.length?n.first():e).length&&e.trigger("focus")},dimmerStyles:function(){a.blurring?k.addClass(c.blurring):k.removeClass(c.blurring)},bodyMargin:function(){var n=E.can.leftBodyScrollbar()?"left":"right";b.css((w?"margin-":"padding-")+n,F+"px"),b.find(l.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)+" + "+F+"px)")})},ios:function(){L.addClass(c.ios)},pushed:function(){b.addClass(c.pushed)},pushable:function(){b.addClass(c.pushable)},dimmed:function(){k.addClass(c.dimmed)},active:function(){v.addClass(c.active)},animating:function(){v.addClass(c.animating)},closing:function(){k.addClass(c.closing)},direction:function(e){e=e||E.get.direction(),v.addClass(c[e])},visible:function(){v.addClass(c.visible)},overlay:function(){v.addClass(c.overlay)}},remove:{inlineCSS:function(){E.debug("Removing inline css styles",o),o&&0<o.length&&o.remove()},keyboardShortcuts:function(){E.verbose("Removing keyboard shortcuts"),N.off("keydown"+g)},ios:function(){L.removeClass(c.ios)},pushed:function(){b.removeClass(c.pushed)},pushable:function(){b.removeClass(c.pushable)},active:function(){v.removeClass(c.active)},animating:function(){v.removeClass(c.animating)},closing:function(){k.removeClass(c.closing)},direction:function(e){e=e||E.get.direction(),v.removeClass(c[e])},visible:function(){v.removeClass(c.visible)},overlay:function(){v.removeClass(c.overlay)}},get:{direction:function(){return v.hasClass(c.top)?c.top:v.hasClass(c.right)?c.right:v.hasClass(c.bottom)?c.bottom:c.left},id:function(){return t},element:function(){return v},settings:function(){return a}},can:{leftBodyScrollbar:function(){return void 0===E.cache.leftBodyScrollbar&&(E.cache.leftBodyScrollbar=E.is.rtl()&&(E.is.iframe&&!E.is.firefox()||E.is.safari()||E.is.edge()||E.is.ie())),E.cache.leftBodyScrollbar}},save:{focus:function(){0<Q(U.activeElement).closest(v).length||(e=Q(U.activeElement).trigger("blur"))},bodyMargin:function(){T=b.css((w?"margin-":"padding-")+(E.can.leftBodyScrollbar()?"left":"right"));var e=parseInt(T.replace(/[^\d.]/g,""),10),t=w?W.innerWidth-U.documentElement.clientWidth:b[0].offsetWidth-b[0].clientWidth;F=e+t}},is:{safari:function(){return void 0===E.cache.isSafari&&(E.cache.isSafari=/constructor/i.test(W.HTMLElement)||!!W.ApplePaySession),E.cache.isSafari},edge:function(){return void 0===E.cache.isEdge&&(E.cache.isEdge=!!W.setImmediate&&!E.is.ie()),E.cache.isEdge},firefox:function(){return void 0===E.cache.isFirefox&&(E.cache.isFirefox=!!W.InstallTrigger),E.cache.isFirefox},iframe:function(){return!(self===top)},ie:function(){var e,t;return void 0===E.cache.isIE&&(e=!W.ActiveXObject&&"ActiveXObject"in W,t="ActiveXObject"in W,E.cache.isIE=e||t),E.cache.isIE},ios:function(){var e=navigator.userAgent,t=e.match(f.ios),n=e.match(f.mobileChrome);return!(!t||n)&&(E.verbose("Browser was found to be iOS",e),!0)},mobile:function(){var e=navigator.userAgent;return e.match(f.mobile)?(E.verbose("Browser was found to be mobile",e),!0):(E.verbose("Browser is not mobile, using regular transition",e),!1)},hidden:function(){return!E.is.visible()},visible:function(){return v.hasClass(c.visible)},animating:function(){return b.hasClass(c.animating)},rtl:function(){return void 0===E.cache.isRTL&&(E.cache.isRTL="rtl"===v.attr("dir")||"rtl"===v.css("direction")||"rtl"===z.attr("dir")||"rtl"===z.css("direction")||"rtl"===b.attr("dir")||"rtl"===b.css("direction")),E.cache.isRTL}},has:{configActions:function(){return Array.isArray(a.actions)&&0<a.actions.length},scrollbar:function(){return w||"hidden"!==b.css("overflow-y")}},restore:{focus:function(){e&&0<e.length&&a.restoreFocus&&e.trigger("focus")},bodyMargin:function(){var n=E.can.leftBodyScrollbar()?"left":"right";b.css((w?"margin-":"padding-")+n,T),b.find(l.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(E.debug("Changing setting",e,t),Q.isPlainObject(e))Q.extend(!0,a,e);else{if(void 0===t)return a[e];Q.isPlainObject(a[e])?Q.extend(!0,a[e],t):a[e]=t}},internal:function(e,t){if(Q.isPlainObject(e))Q.extend(!0,E,e);else{if(void 0===t)return E[e];E[e]=t}},debug:function(){!a.silent&&a.debug&&(a.performance?E.performance.log(arguments):(E.debug=Function.prototype.bind.call(console.info,console,a.name+":"),E.debug.apply(console,arguments)))},verbose:function(){!a.silent&&a.verbose&&a.debug&&(a.performance?E.performance.log(arguments):(E.verbose=Function.prototype.bind.call(console.info,console,a.name+":"),E.verbose.apply(console,arguments)))},error:function(){a.silent||(E.error=Function.prototype.bind.call(console.error,console,a.name+":"),E.error.apply(console,arguments))},performance:{log:function(e){var t,n;a.performance&&(n=(t=Date.now())-(j||t),j=t,R.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:S,"Execution Time":n})),clearTimeout(E.performance.timer),E.performance.timer=setTimeout(E.performance.display,500)},display:function(){var e=a.name+":",n=0;j=!1,clearTimeout(E.performance.timer),Q.each(R,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",I&&(e+=" '"+I+"'"),0<R.length&&(console.groupCollapsed(e),console.table?console.table(R):Q.each(R,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),R=[]}},invoke:function(i,e,t){var o,s,n,r=A;return e=e||V,t=S||t,"string"==typeof i&&void 0!==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(void 0!==r[n])return s=r[n],!1;{if(!Q.isPlainObject(r[t])||e===o)return void 0!==r[t]?s=r[t]:E.error(h.method,i),!1;r=r[t]}}})),X(s)?n=s.apply(t,e):void 0!==s&&(n=s),Array.isArray(O)?O.push(n):void 0!==O?O=[O,n]:void 0!==n&&(O=n),s}};K?(void 0===A&&(X(a.templates[q])&&(a.autoShow=!0,a.className.flyout=a.className.template,a=Q.extend(!0,{},a,a.templates[q].apply(E,V)),c=a.className,a.namespace,d=a.fields,h=a.error),E.initialize()),X(a.templates[q])||E.invoke(q)):(void 0!==A&&A.invoke("destroy"),E.initialize(),O=v)}),void 0!==O?O: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]):(X(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(W,U,X){"use strict";function _(e){return"function"==typeof e&&"number"!=typeof e.nodeType}U=void 0!==U&&U.Math===Math?U:globalThis,W.fn.flyout=function(O){var D,e=W(this),N=W(U),L=W(X),B=W("html"),z=W("head"),I=W("body"),j=Date.now(),R=[],q=O,K="string"==typeof q,V=[].slice.call(arguments,1),Q=function(e,t){var n;return 0<=[U,X].indexOf(e)?n=I:0===(n=W(t.document).find(e)).length&&(n=t.frameElement?Q(e,t.parent):I),n};return e.each(function(){var n,e,o,s,t,i,r,l=W.isPlainObject(O)?W.extend(!0,{},W.fn.flyout.settings,O):W.extend({},W.fn.flyout.settings),a=l.selector,c=l.className,u=l.namespace,d=l.fields,f=l.regExp,h=l.error,g="."+u,p="module-"+u,v=W(this),b=Q(l.context,U),m=v.find(a.close),y=v.children(a.flyout),k=b.children(a.pusher),x=v.hasClass("flyout"),S=this,A=x?v.data(p):void 0,C=!1,w=b[0]===I[0],T="",F="",E=!1,H=!1,P=!1,M={initialize:function(){var s;M.debug("Initializing flyout",O),M.create.id(),x||(M.create.flyout(),_(l.onHidden)||(l.onHidden=function(){M.destroy(),v.remove()}),l.autoShow||(l.autoShow=!0)),v.addClass(l.class),""!==l.title&&v.find(a.header).html(M.helpers.escape(l.title,l.preserveHTML)).addClass(l.classTitle),""!==l.content&&v.find(a.content).html(M.helpers.escape(l.content,l.preserveHTML)).addClass(l.classContent),M.has.configActions()&&(0===(s=v.find(a.actions).addClass(l.classActions)).length?s=W("<div/>",{class:c.actions+" "+(l.classActions||"")}).appendTo(v):s.empty(),l.actions.forEach(function(e){var t=e[d.icon]?"<i "+(e[d.text]?'aria-hidden="true"':"")+' class="'+M.helpers.deQuote(e[d.icon])+' icon"></i>':"",n=M.helpers.escape(e[d.text]||"",l.preserveHTML),i=M.helpers.deQuote(e[d.class]||""),o=e[d.click]&&_(e[d.click])?e[d.click]:function(){};s.append(W("<button/>",{html:t+n,"aria-label":(e[d.text]||e[d.icon]||"").replace(/<[^>]+(>|$)/g,""),class:c.button+" "+i,on:{click:function(){!1!==o.call(S,v)&&M.hide()}}}))})),l.delaySetup?requestAnimationFrame(M.setup.layout):M.setup.layout(),requestAnimationFrame(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),A=M,v.data(p,A)},create:{flyout:function(){var e;M.verbose("Programmaticaly create flyout",b),v=W("<div/>",{class:c.flyout,role:"dialog","aria-modal":l.dimPage}),l.closeIcon&&(m=W("<i/>",{class:c.close,role:"button",tabindex:0,"aria-label":l.text.close}),v.append(m)),""!==l.title&&(e="_"+M.get.id()+"title",v.attr("aria-labelledby",e),W("<div/>",{class:c.header,id:e}).appendTo(v)),""!==l.content&&(e="_"+M.get.id()+"desc",v.attr("aria-describedby",e),W("<div/>",{class:c.content,id:e}).appendTo(v)),M.has.configActions()&&W("<div/>",{class:c.actions}).appendTo(v),v.prependTo(b),S=v[0]},id:function(){t=(Math.random().toString(16)+"000000000").slice(2,10),s="."+t,M.verbose("Creating unique id for element",t)}},destroy:function(){i&&i.disconnect(),M.verbose("Destroying previous module for",v),v.off(g).removeData(p),M.is.ios()&&M.remove.ios(),m.off(s),n&&n.off(s),b.off(s),N.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()},focus:function(){H=!0},click:function(e){H&&X.activeElement!==e.target&&M.is.visible()&&l.autofocus&&l.dimPage&&0===W(X.activeElement).closest(a.flyout).length&&requestAnimationFrame(M.set.autofocus),H=!1},clickaway:function(e){var t;l.closable&&(t=0<k.find(e.target).length||k.is(e.target),e=b.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&&(n.last().trigger("focus"),e.preventDefault())},last:function(e){e.which!==l.keys.tab||e.shiftKey||(n.first().trigger("focus"),e.preventDefault())}},approve:function(e){C||!1===l.onApprove.call(M.element,W(this))?M.verbose("Approve callback returned false cancelling close"):(C=!0,M.hide(function(){C=!1}))},deny:function(e){C||!1===l.onDeny.call(M.element,W(this))?M.verbose("Deny callback returned false cancelling close"):(C=!0,M.hide(function(){C=!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===W(e.target).closest(a.flyout).length&&e.preventDefault()}},bind:{resize:function(){M.verbose("Adding resize event to window",N),N.on("resize"+s,M.event.resize)},events:function(){M.verbose("Attaching events"),v.on("click"+g,a.close,M.event.close).on("click"+g,a.approve,M.event.approve).on("click"+g,a.deny,M.event.deny),m.on("keyup"+s,M.event.closeKeyUp),N.on("focus"+s,M.event.focus),b.on("click"+s,M.event.click)},clickaway:function(){M.verbose("Adding clickaway events to context",b),b.on("click"+s,M.event.clickaway).on("touchend"+s,M.event.clickaway)},scrollLock:function(){l.scrollLock&&(M.debug("Disabling page scroll"),(E=M.has.scrollbar())&&(M.save.bodyMargin(),M.set.bodyMargin()),b.addClass(c.locked)),M.verbose("Adding events to contain flyout scroll"),L.on("touchmove"+s,M.event.touch),v.on("scroll"+g,M.event.containScroll)}},unbind:{clickaway:function(){M.verbose("Removing clickaway events from context",b),b.off(s)},scrollLock:function(){M.verbose("Removing scroll lock from page"),E&&M.restore.bodyMargin(),b.removeClass(c.locked),L.off(s),v.off("scroll"+g)}},add:{inlineCSS:function(){var e=M.cache.width||v.outerWidth(),t=M.cache.height||v.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 { transform: translate3d("+t[i]+"px, 0, 0); }"):"top"!==i&&"bottom"!==i||(n+=" .ui.visible."+i+".flyout ~ .fixed, .ui.visible."+i+".flyout ~ .pusher { 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 { transform: translate3d("+t[i]+"px, 0, 0); }"):"top"!==i&&"bottom"!==i||(n+=" body.pushable > .ui.visible."+i+".flyout ~ .pusher::after { 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 { transform: translate3d(0, 0, 0); }"),o=W(n+="</style>").appendTo(z),M.debug("Adding sizing css to head",o)},keyboardShortcuts:function(){M.verbose("Adding keyboard shortcuts"),L.on("keydown"+g,M.event.keyboard)}},observeChanges:function(){"MutationObserver"in U&&((i=new MutationObserver(function(e){function o(e){for(var t=[],n=0,i=e.length;n<i;n++)Array.prototype.push.apply(t,o(e[n].childNodes)),t.push(e[n]);return t}var n=!1,i=!0;e.every(function(e){var t;return"attributes"===e.type?P&&("disabled"===e.attributeName||0<W(e.target).find(":input").addBack(":input").filter(":visible").length)&&(n=!0):(t=W(o(e.addedNodes)).filter("a[href], [tabindex], :input:enabled").filter(":visible"),e=W(o(e.removedNodes)).filter("a[href], [tabindex], :input"),(0<t.length||0<e.length)&&(n=!0,(0<t.filter(":input").length||0<e.filter(":input").length)&&(i=!1))),!n}),n&&M.refreshInputs(i)})).observe(S,{attributeFilter:["class","disabled"],attributes:!0,childList:!0,subtree:!0}),M.debug("Setting up mutation observer",i))},refresh:function(){M.verbose("Refreshing selector cache"),b=Q(l.context,U),M.refreshFlyouts(),k=b.children(a.pusher),M.clear.cache()},refreshFlyouts:function(){M.verbose("Refreshing other flyouts"),y=b.children(a.flyout)},refreshInputs:function(e){n&&n.off("keydown"+s),l.dimPage&&(0===(n=v.find("a[href], [tabindex], :input:enabled").filter(":visible").filter(function(){return 0===W(this).closest(".disabled").length})).filter(":input").length?(n=v.add(n),v.attr("tabindex",-1)):v.removeAttr("tabindex"),n.first().on("keydown"+s,M.event.inputKeyDown.first),n.last().on("keydown"+s,M.event.inputKeyDown.last),!e&&l.autofocus&&0===n.filter(":focus").length&&M.set.autofocus())},setup:{cache:function(){M.cache={width:v.outerWidth(),height:v.outerHeight()}},layout:function(){0===b.children(a.pusher).length&&(M.debug("Adding wrapper element for flyout"),M.error(h.pusher),k=W('<div class="pusher" />'),b.children().not(a.omitted).not(y).wrapAll(k),M.refresh()),0!==v.nextAll(a.pusher).length&&v.nextAll(a.pusher)[0]===k[0]||(M.debug("Moved flyout to correct parent element"),M.error(h.movedFlyout,S),v.detach().prependTo(b),M.refresh()),M.is.mobile()&&v.addClass(c.fullscreen),M.clear.cache(),M.set.pushable(),M.set.direction()},heights:function(){M.debug("Setting up heights",v);var e=v.children(a.header),t=v.children(a.content),n=v.children(a.actions),e=(b.height()||0)-(e.outerHeight()||0)-(n.outerHeight()||0);0<e&&t.css("min-height",String(e)+"px")}},attachEvents:function(e,t){var n=W(e);t=_(M[t])?M[t]:M.toggle,0<n.length?(M.debug("Attaching flyout events to element",e,t),n.on("click"+g,t)):M.error(h.notFound,e)},show:function(e){e=_(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():C=!1),M.set.dimmerStyles(),M.set.observeAttributes(!1),M.pushPage(function(){e.call(S),l.onVisible.call(S),l.keyboardShortcuts&&M.add.keyboardShortcuts(),M.save.focus(),M.refreshInputs(),requestAnimationFrame(M.set.observeAttributes)}),l.onChange.call(S)):M.debug("Flyout is already visible")},hide:function(e){if(e=_(e)?e:function(){},!1===l.onHide.call(S,W(this)))return M.verbose("Hide callback returned false cancelling hide"),C=!1;(M.is.visible()||M.is.animating())&&(M.debug("Hiding flyout",e),M.refreshFlyouts(),M.set.observeAttributes(!1),M.pullPage(function(){e.call(S),_(l.onHidden)&&l.onHidden.call(S),M.restore.focus()}),l.onChange.call(S))},othersAnimating:function(){return 0<y.not(v).filter("."+c.animating).length},othersVisible:function(){return 0<y.not(v).filter("."+c.visible).length},othersActive:function(){return M.othersVisible()||M.othersAnimating()},hideOthers:function(e){var t=y.not(v).filter("."+c.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=_(t)?t:function(){},M.set.overlay(),l.returnScroll&&(r=(w?N:b).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===v[0]&&(v.off("transitionend"+s,i),M.remove.animating(),t.call(S))},v.off("transitionend"+s),v.on("transitionend"+s,i),requestAnimationFrame(e),l.dimPage&&!M.othersVisible()&&requestAnimationFrame(n)},pullPage:function(t){var e,n;t=_(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===v[0]&&(v.off("transitionend"+s,n),M.remove.animating(),M.remove.closing(),M.remove.overlay(),M.remove.inlineCSS(),l.returnScroll&&M.scrollBack(),l.dimPage&&!M.othersVisible()&&k.removeClass(c.dimmed),t.call(S))},v.off("transitionend"+s),v.on("transitionend"+s,n),requestAnimationFrame(e)},scrollToTop:function(){M.verbose("Scrolling to top of page to avoid animation issues"),v.scrollTop(0),(w?N:b)[0].scrollTo(0,0)},scrollBack:function(){M.verbose("Scrolling back to original page position"),(w?N:b)[0].scrollTo(0,r)},clear:{cache:function(){M.verbose("Clearing cached dimensions"),M.cache={}}},set:{observeAttributes:function(e){P=!1!==e},autofocus:function(){var e=n.filter("[autofocus]"),t=n.filter(":input");(0<e.length?e:0<t.length?t:v).first().trigger("focus")},dimmerStyles:function(){l.blurring?k.addClass(c.blurring):k.removeClass(c.blurring)},bodyMargin:function(){var n=M.can.leftBodyScrollbar()?"left":"right";b.css((w?"margin-":"padding-")+n,F+"px"),b.find(a.bodyFixed.replace("right",n)).each(function(){var e=W(this),t="fixed"===e.css("position")?"padding-"+n:n;e.css(t,"calc("+e.css(t)+" + "+F+"px)")})},ios:function(){B.addClass(c.ios)},pushed:function(){b.addClass(c.pushed)},pushable:function(){b.addClass(c.pushable)},dimmed:function(){k.addClass(c.dimmed)},active:function(){v.addClass(c.active)},animating:function(){v.addClass(c.animating)},closing:function(){k.addClass(c.closing)},direction:function(e){e=e||M.get.direction(),v.addClass(c[e])},visible:function(){v.addClass(c.visible)},overlay:function(){v.addClass(c.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"+g)},ios:function(){B.removeClass(c.ios)},pushed:function(){b.removeClass(c.pushed)},pushable:function(){b.removeClass(c.pushable)},active:function(){v.removeClass(c.active)},animating:function(){v.removeClass(c.animating)},closing:function(){k.removeClass(c.closing)},direction:function(e){e=e||M.get.direction(),v.removeClass(c[e])},visible:function(){v.removeClass(c.visible)},overlay:function(){v.removeClass(c.overlay)}},get:{direction:function(){return v.hasClass(c.top)?c.top:v.hasClass(c.right)?c.right:v.hasClass(c.bottom)?c.bottom:c.left},id:function(){return t},element:function(){return v},settings:function(){return l}},can:{leftBodyScrollbar:function(){return void 0===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<W(X.activeElement).closest(v).length||(e=W(X.activeElement).trigger("blur"))},bodyMargin:function(){T=b.css((w?"margin-":"padding-")+(M.can.leftBodyScrollbar()?"left":"right"));var e=parseInt(T.replace(/[^\d.]/g,""),10),t=w?U.innerWidth-X.documentElement.clientWidth:b[0].offsetWidth-b[0].clientWidth;F=e+t}},is:{safari:function(){return void 0===M.cache.isSafari&&(M.cache.isSafari=/constructor/i.test(U.HTMLElement)||!!U.ApplePaySession),M.cache.isSafari},edge:function(){return void 0===M.cache.isEdge&&(M.cache.isEdge=!!U.setImmediate&&!M.is.ie()),M.cache.isEdge},firefox:function(){return void 0===M.cache.isFirefox&&(M.cache.isFirefox=!!U.InstallTrigger),M.cache.isFirefox},iframe:function(){return!(self===top)},ie:function(){var e,t;return void 0===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(f.ios),n=e.match(f.mobileChrome);return!(!t||n)&&(M.verbose("Browser was found to be iOS",e),!0)},mobile:function(){var e=navigator.userAgent;return e.match(f.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 v.hasClass(c.visible)},animating:function(){return b.hasClass(c.animating)},rtl:function(){return void 0===M.cache.isRTL&&(M.cache.isRTL="rtl"===v.attr("dir")||"rtl"===v.css("direction")||"rtl"===I.attr("dir")||"rtl"===I.css("direction")||"rtl"===b.attr("dir")||"rtl"===b.css("direction")),M.cache.isRTL}},has:{configActions:function(){return Array.isArray(l.actions)&&0<l.actions.length},scrollbar:function(){return w||"hidden"!==b.css("overflow-y")}},restore:{focus:function(){e&&0<e.length&&l.restoreFocus&&e.trigger("focus")},bodyMargin:function(){var n=M.can.leftBodyScrollbar()?"left":"right";b.css((w?"margin-":"padding-")+n,T),b.find(a.bodyFixed.replace("right",n)).each(function(){var e=W(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),W.isPlainObject(e))W.extend(!0,l,e);else{if(void 0===t)return l[e];W.isPlainObject(l[e])?W.extend(!0,l[e],t):l[e]=t}},internal:function(e,t){if(W.isPlainObject(e))W.extend(!0,M,e);else{if(void 0===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())-(j||t),j=t,R.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;j=!1,clearTimeout(M.performance.timer),W.each(R,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",0<R.length&&(console.groupCollapsed(e),console.table?console.table(R):W.each(R,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),R=[]}},invoke:function(i,e,t){var o,s,n,r=A;return e=e||V,t=S||t,"string"==typeof i&&void 0!==r&&(i=i.split(/[ .]/),o=i.length-1,W.each(i,function(e,t){var n=e!==o?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(W.isPlainObject(r[n])&&e!==o)r=r[n];else{if(void 0!==r[n])return s=r[n],!1;{if(!W.isPlainObject(r[t])||e===o)return void 0!==r[t]?s=r[t]:M.error(h.method,i),!1;r=r[t]}}})),_(s)?n=s.apply(t,e):void 0!==s&&(n=s),Array.isArray(D)?D.push(n):void 0!==D?D=[D,n]:void 0!==n&&(D=n),s}};K?(void 0===A&&(_(l.templates[q])&&(l.autoShow=!0,l.className.flyout=l.className.template,l=W.extend(!0,{},l,l.templates[q].apply(M,V)),c=l.className,l.namespace,d=l.fields,h=l.error),M.initialize()),_(l.templates[q])||M.invoke(q)):(void 0!==A&&A.invoke("destroy"),M.initialize(),D=v)}),void 0!==D?D:this},W.flyout=W.fn.flyout,W.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"}},W.fn.flyout.settings.templates={getArguments:function(e){e=[].slice.call(e);return W.isPlainObject(e[0])?W.extend({handler:function(){},content:"",title:""},e[0]):(_(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===W(W.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(W(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.3-beta.
|
2
|
+
* # Fomantic-UI 2.9.3-beta.10+11b4099 - Form
|
3
3
|
* https://github.com/fomantic/Fomantic-UI/
|
4
4
|
*
|
5
5
|
*
|
@@ -494,6 +494,9 @@
|
|
494
494
|
.ui.ui.form .field.error .input {
|
495
495
|
color: #9f3a38;
|
496
496
|
}
|
497
|
+
.ui.form .fields:has(.error) > label {
|
498
|
+
color: #9f3a38;
|
499
|
+
}
|
497
500
|
.ui.form .fields.error .field .ui.label,
|
498
501
|
.ui.form .field.error .ui.label {
|
499
502
|
background-color: #ecd1d1;
|
@@ -707,6 +710,9 @@
|
|
707
710
|
.ui.inverted.form .error.field label {
|
708
711
|
color: #ecd1d1;
|
709
712
|
}
|
713
|
+
.ui.inverted.form .fields:has(.error) > label {
|
714
|
+
color: #ecd1d1;
|
715
|
+
}
|
710
716
|
|
711
717
|
/* On Form */
|
712
718
|
.ui.form.info .info.message:not(:empty) {
|
@@ -740,6 +746,9 @@
|
|
740
746
|
.ui.ui.form .field.info .input {
|
741
747
|
color: #276f86;
|
742
748
|
}
|
749
|
+
.ui.form .fields:has(.info) > label {
|
750
|
+
color: #276f86;
|
751
|
+
}
|
743
752
|
.ui.form .fields.info .field .ui.label,
|
744
753
|
.ui.form .field.info .ui.label {
|
745
754
|
background-color: #c6e3e9;
|
@@ -932,6 +941,9 @@
|
|
932
941
|
.ui.inverted.form .info.field label {
|
933
942
|
color: #c6e3e9;
|
934
943
|
}
|
944
|
+
.ui.inverted.form .fields:has(.info) > label {
|
945
|
+
color: #c6e3e9;
|
946
|
+
}
|
935
947
|
|
936
948
|
/* On Form */
|
937
949
|
.ui.form.success .success.message:not(:empty) {
|
@@ -965,6 +977,9 @@
|
|
965
977
|
.ui.ui.form .field.success .input {
|
966
978
|
color: #2c662d;
|
967
979
|
}
|
980
|
+
.ui.form .fields:has(.success) > label {
|
981
|
+
color: #2c662d;
|
982
|
+
}
|
968
983
|
.ui.form .fields.success .field .ui.label,
|
969
984
|
.ui.form .field.success .ui.label {
|
970
985
|
background-color: #b9d1ad;
|
@@ -1157,6 +1172,9 @@
|
|
1157
1172
|
.ui.inverted.form .success.field label {
|
1158
1173
|
color: #b9d1ad;
|
1159
1174
|
}
|
1175
|
+
.ui.inverted.form .fields:has(.success) > label {
|
1176
|
+
color: #b9d1ad;
|
1177
|
+
}
|
1160
1178
|
|
1161
1179
|
/* On Form */
|
1162
1180
|
.ui.form.warning .warning.message:not(:empty) {
|
@@ -1190,6 +1208,9 @@
|
|
1190
1208
|
.ui.ui.form .field.warning .input {
|
1191
1209
|
color: #573a08;
|
1192
1210
|
}
|
1211
|
+
.ui.form .fields:has(.warning) > label {
|
1212
|
+
color: #573a08;
|
1213
|
+
}
|
1193
1214
|
.ui.form .fields.warning .field .ui.label,
|
1194
1215
|
.ui.form .field.warning .ui.label {
|
1195
1216
|
background-color: #d7ccb5;
|
@@ -1382,6 +1403,9 @@
|
|
1382
1403
|
.ui.inverted.form .warning.field label {
|
1383
1404
|
color: #d7ccb5;
|
1384
1405
|
}
|
1406
|
+
.ui.inverted.form .fields:has(.warning) > label {
|
1407
|
+
color: #d7ccb5;
|
1408
|
+
}
|
1385
1409
|
|
1386
1410
|
/* --------------------
|
1387
1411
|
Disabled
|
@@ -1446,29 +1470,36 @@
|
|
1446
1470
|
/* --------------------
|
1447
1471
|
Required Field
|
1448
1472
|
--------------------- */
|
1449
|
-
.ui.form .required.fields:not(.grouped) > .field > label::after,
|
1473
|
+
.ui.form .required.fields:not(.grouped):not(.inline) > .field > label::after,
|
1474
|
+
.ui.form .required.fields.inline > label::after,
|
1450
1475
|
.ui.form .required.fields.grouped > label::after,
|
1451
1476
|
.ui.form .required.field > label::after,
|
1452
|
-
.ui.form .required.fields:not(.grouped) > .field > .checkbox::after,
|
1477
|
+
.ui.form .required.fields:not(.grouped):not(.inline) > .field > .checkbox::after,
|
1453
1478
|
.ui.form .required.field > .checkbox::after,
|
1454
1479
|
.ui.form label.required::after {
|
1455
1480
|
margin: -0.2em 0 0 0.2em;
|
1456
1481
|
content: "*";
|
1457
1482
|
color: #db2828;
|
1458
1483
|
}
|
1459
|
-
.ui.form .required.fields:not(.grouped) > .field > label::after,
|
1484
|
+
.ui.form .required.fields:not(.grouped):not(.inline) > .field > label::after,
|
1485
|
+
.ui.form .required.fields.inline > label::after,
|
1460
1486
|
.ui.form .required.fields.grouped > label::after,
|
1461
1487
|
.ui.form .required.field > label::after,
|
1462
1488
|
.ui.form label.required::after {
|
1463
1489
|
display: inline-block;
|
1464
1490
|
vertical-align: top;
|
1465
1491
|
}
|
1466
|
-
.ui.form .required.fields:not(.grouped) > .field > .checkbox::after,
|
1492
|
+
.ui.form .required.fields:not(.grouped):not(.inline) > .field > .checkbox::after,
|
1467
1493
|
.ui.form .required.field > .checkbox::after {
|
1468
1494
|
position: absolute;
|
1469
1495
|
top: 0;
|
1470
1496
|
left: 100%;
|
1471
1497
|
}
|
1498
|
+
.ui.ui.ui.ui.form .fields > label:empty::after,
|
1499
|
+
.ui.ui.ui.ui.form .field > label:empty::after {
|
1500
|
+
content: " ";
|
1501
|
+
display: inline-block;
|
1502
|
+
}
|
1472
1503
|
|
1473
1504
|
|
1474
1505
|
/*******************************
|
package/dist/components/form.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* # Fomantic-UI 2.9.3-beta.
|
2
|
+
* # Fomantic-UI 2.9.3-beta.10+11b4099 - Form Validation
|
3
3
|
* https://github.com/fomantic/Fomantic-UI/
|
4
4
|
*
|
5
5
|
*
|
@@ -22,7 +22,7 @@
|
|
22
22
|
$.fn.form = function (parameters) {
|
23
23
|
var
|
24
24
|
$allModules = $(this),
|
25
|
-
|
25
|
+
$window = $(window),
|
26
26
|
|
27
27
|
time = Date.now(),
|
28
28
|
performance = [],
|
@@ -61,6 +61,8 @@
|
|
61
61
|
namespace,
|
62
62
|
moduleNamespace,
|
63
63
|
eventNamespace,
|
64
|
+
attachEventsSelector,
|
65
|
+
attachEventsAction,
|
64
66
|
|
65
67
|
submitting = false,
|
66
68
|
dirty = false,
|
@@ -143,6 +145,9 @@
|
|
143
145
|
module[action]();
|
144
146
|
event.preventDefault();
|
145
147
|
});
|
148
|
+
|
149
|
+
attachEventsSelector = selector;
|
150
|
+
attachEventsAction = action;
|
146
151
|
},
|
147
152
|
|
148
153
|
bindEvents: function () {
|
@@ -168,10 +173,14 @@
|
|
168
173
|
|
169
174
|
// Dirty events
|
170
175
|
if (settings.preventLeaving) {
|
171
|
-
$
|
176
|
+
$window.on('beforeunload' + eventNamespace, module.event.beforeUnload);
|
172
177
|
}
|
173
178
|
|
174
|
-
$field.on('change
|
179
|
+
$field.on('change' + eventNamespace
|
180
|
+
+ ' click' + eventNamespace
|
181
|
+
+ ' keyup' + eventNamespace
|
182
|
+
+ ' keydown' + eventNamespace
|
183
|
+
+ ' blur' + eventNamespace, function (e) {
|
175
184
|
module.determine.isDirty();
|
176
185
|
});
|
177
186
|
|
@@ -182,6 +191,9 @@
|
|
182
191
|
$module.on('clean' + eventNamespace, function (e) {
|
183
192
|
settings.onClean.call();
|
184
193
|
});
|
194
|
+
if (attachEventsSelector) {
|
195
|
+
module.attachEvents(attachEventsSelector, attachEventsAction);
|
196
|
+
}
|
185
197
|
},
|
186
198
|
|
187
199
|
clear: function () {
|
@@ -230,6 +242,7 @@
|
|
230
242
|
isCheckbox = $field.is(selector.checkbox),
|
231
243
|
isDropdown = $element.is(selector.uiDropdown) && module.can.useElement('dropdown'),
|
232
244
|
isCalendar = $calendar.length > 0 && module.can.useElement('calendar'),
|
245
|
+
isFile = $field.is(selector.file),
|
233
246
|
isErrored = $fieldGroup.hasClass(className.error)
|
234
247
|
;
|
235
248
|
if (defaultValue === undefined) {
|
@@ -250,7 +263,7 @@
|
|
250
263
|
$calendar.calendar('set date', defaultValue);
|
251
264
|
} else {
|
252
265
|
module.verbose('Resetting field value', $field, defaultValue);
|
253
|
-
$field.val(defaultValue);
|
266
|
+
$field.val(isFile ? '' : defaultValue);
|
254
267
|
}
|
255
268
|
});
|
256
269
|
module.remove.states();
|
@@ -386,6 +399,13 @@
|
|
386
399
|
$module.off(eventNamespace);
|
387
400
|
$field.off(eventNamespace);
|
388
401
|
$submit.off(eventNamespace);
|
402
|
+
if (settings.preventLeaving) {
|
403
|
+
$window.off(eventNamespace);
|
404
|
+
}
|
405
|
+
if (attachEventsSelector) {
|
406
|
+
$(attachEventsSelector).off(eventNamespace);
|
407
|
+
attachEventsSelector = undefined;
|
408
|
+
}
|
389
409
|
},
|
390
410
|
|
391
411
|
event: {
|
@@ -487,18 +507,7 @@
|
|
487
507
|
return rule.type;
|
488
508
|
},
|
489
509
|
changeEvent: function (type, $input) {
|
490
|
-
|
491
|
-
return 'change';
|
492
|
-
}
|
493
|
-
|
494
|
-
return module.get.inputEvent();
|
495
|
-
},
|
496
|
-
inputEvent: function () {
|
497
|
-
return document.createElement('input').oninput !== undefined
|
498
|
-
? 'input'
|
499
|
-
: (document.createElement('input').onpropertychange !== undefined
|
500
|
-
? 'propertychange'
|
501
|
-
: 'keyup');
|
510
|
+
return ['file', 'checkbox', 'radio', 'hidden'].indexOf(type) >= 0 || $input.is('select') ? 'change' : 'input';
|
502
511
|
},
|
503
512
|
fieldsFromShorthand: function (fields) {
|
504
513
|
var
|
@@ -634,7 +643,7 @@
|
|
634
643
|
var $field = typeof identifier === 'string'
|
635
644
|
? module.get.field(identifier)
|
636
645
|
: identifier,
|
637
|
-
$label = $field.closest(selector.group).find('label').eq(0)
|
646
|
+
$label = $field.closest(selector.group).find('label:not(:empty)').eq(0)
|
638
647
|
;
|
639
648
|
|
640
649
|
return $label.length === 1
|
@@ -1103,6 +1112,7 @@
|
|
1103
1112
|
$field = module.get.field(key),
|
1104
1113
|
$element = $field.parent(),
|
1105
1114
|
$calendar = $field.closest(selector.uiCalendar),
|
1115
|
+
isFile = $field.is(selector.file),
|
1106
1116
|
isMultiple = Array.isArray(value),
|
1107
1117
|
isCheckbox = $element.is(selector.uiCheckbox) && module.can.useElement('checkbox'),
|
1108
1118
|
isDropdown = $element.is(selector.uiDropdown) && module.can.useElement('dropdown'),
|
@@ -1145,7 +1155,7 @@
|
|
1145
1155
|
$calendar.calendar('set date', value);
|
1146
1156
|
} else {
|
1147
1157
|
module.verbose('Setting field value', value, $field);
|
1148
|
-
$field.val(value);
|
1158
|
+
$field.val(isFile ? '' : value);
|
1149
1159
|
}
|
1150
1160
|
}
|
1151
1161
|
});
|
@@ -1473,9 +1483,6 @@
|
|
1473
1483
|
totalTime += data['Execution Time'];
|
1474
1484
|
});
|
1475
1485
|
title += ' ' + totalTime + 'ms';
|
1476
|
-
if (moduleSelector) {
|
1477
|
-
title += ' \'' + moduleSelector + '\'';
|
1478
|
-
}
|
1479
1486
|
if ($allModules.length > 1) {
|
1480
1487
|
title += ' (' + $allModules.length + ')';
|
1481
1488
|
}
|
@@ -1651,9 +1658,10 @@
|
|
1651
1658
|
selector: {
|
1652
1659
|
checkbox: 'input[type="checkbox"], input[type="radio"]',
|
1653
1660
|
clear: '.clear',
|
1654
|
-
field: 'input:not(.search):not([type="
|
1661
|
+
field: 'input:not(.search):not([type="reset"]):not([type="button"]):not([type="submit"]), textarea, select',
|
1662
|
+
file: 'input[type="file"]',
|
1655
1663
|
group: '.field',
|
1656
|
-
input: 'input
|
1664
|
+
input: 'input',
|
1657
1665
|
message: '.error.message',
|
1658
1666
|
prompt: '.prompt.label',
|
1659
1667
|
radio: 'input[type="radio"]',
|