fomantic-ui 2.10.0-beta.1 → 2.10.0-beta.3
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/dist/components/accordion.css +1 -1
- package/dist/components/accordion.js +1 -1
- package/dist/components/accordion.min.css +1 -1
- package/dist/components/accordion.min.js +1 -1
- package/dist/components/ad.css +1 -1
- package/dist/components/ad.min.css +1 -1
- package/dist/components/api.js +6 -6
- package/dist/components/api.min.js +1 -1
- 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 +1 -1
- package/dist/components/calendar.js +7 -7
- package/dist/components/calendar.min.css +1 -1
- package/dist/components/calendar.min.js +1 -1
- 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 -1
- package/dist/components/checkbox.min.css +1 -1
- package/dist/components/checkbox.min.js +1 -1
- 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 +4 -4
- package/dist/components/dimmer.min.css +1 -1
- package/dist/components/dimmer.min.js +1 -1
- package/dist/components/divider.css +1 -1
- package/dist/components/divider.min.css +1 -1
- package/dist/components/dropdown.css +1 -1
- package/dist/components/dropdown.js +29 -29
- package/dist/components/dropdown.min.css +1 -1
- package/dist/components/dropdown.min.js +1 -1
- package/dist/components/embed.css +1 -1
- package/dist/components/embed.js +2 -2
- package/dist/components/embed.min.css +1 -1
- package/dist/components/embed.min.js +1 -1
- 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 +3 -3
- package/dist/components/flyout.min.css +1 -1
- package/dist/components/flyout.min.js +2 -2
- package/dist/components/form.css +5 -5
- package/dist/components/form.js +11 -11
- package/dist/components/form.min.css +1 -1
- package/dist/components/form.min.js +1 -1
- package/dist/components/grid.css +1 -1
- package/dist/components/grid.min.css +1 -1
- package/dist/components/header.css +1 -1
- package/dist/components/header.min.css +1 -1
- package/dist/components/icon.css +1 -1
- package/dist/components/icon.min.css +1 -1
- package/dist/components/image.css +1 -1
- package/dist/components/image.min.css +1 -1
- package/dist/components/input.css +1 -1
- package/dist/components/input.min.css +1 -1
- package/dist/components/item.css +1 -1
- package/dist/components/item.min.css +1 -1
- package/dist/components/label.css +1 -1
- package/dist/components/label.min.css +1 -1
- package/dist/components/list.css +1 -1
- package/dist/components/list.min.css +1 -1
- package/dist/components/loader.css +1 -1
- package/dist/components/loader.min.css +1 -1
- package/dist/components/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 +1 -1
- package/dist/components/modal.js +2 -2
- package/dist/components/modal.min.css +1 -1
- package/dist/components/modal.min.js +1 -1
- package/dist/components/nag.css +1 -1
- package/dist/components/nag.js +2 -2
- package/dist/components/nag.min.css +1 -1
- package/dist/components/nag.min.js +1 -1
- package/dist/components/placeholder.css +1 -1
- package/dist/components/placeholder.min.css +1 -1
- package/dist/components/popup.css +1 -1
- package/dist/components/popup.js +8 -8
- package/dist/components/popup.min.css +1 -1
- package/dist/components/popup.min.js +1 -1
- package/dist/components/progress.css +1 -1
- package/dist/components/progress.js +7 -7
- package/dist/components/progress.min.css +1 -1
- package/dist/components/progress.min.js +1 -1
- 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 -1
- package/dist/components/rating.min.css +1 -1
- package/dist/components/rating.min.js +1 -1
- 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 +7 -7
- package/dist/components/search.min.css +1 -1
- package/dist/components/search.min.js +1 -1
- package/dist/components/segment.css +1 -1
- package/dist/components/segment.min.css +1 -1
- package/dist/components/shape.css +1 -1
- package/dist/components/shape.js +2 -2
- package/dist/components/shape.min.css +1 -1
- package/dist/components/shape.min.js +1 -1
- package/dist/components/sidebar.css +1 -1
- package/dist/components/sidebar.js +2 -2
- package/dist/components/sidebar.min.css +1 -1
- package/dist/components/sidebar.min.js +1 -1
- 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 +5 -5
- package/dist/components/slider.min.css +1 -1
- package/dist/components/slider.min.js +2 -2
- package/dist/components/state.js +3 -3
- package/dist/components/state.min.js +1 -1
- 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 +5 -5
- package/dist/components/sticky.min.css +1 -1
- package/dist/components/sticky.min.js +1 -1
- package/dist/components/tab.css +1 -1
- package/dist/components/tab.js +10 -13
- 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 +4 -4
- package/dist/components/toast.min.css +1 -1
- package/dist/components/toast.min.js +1 -1
- package/dist/components/transition.css +1 -1
- package/dist/components/transition.js +5 -5
- package/dist/components/transition.min.css +1 -1
- package/dist/components/transition.min.js +1 -1
- package/dist/components/visibility.js +2 -2
- package/dist/components/visibility.min.js +1 -1
- package/dist/semantic.css +57 -57
- package/dist/semantic.js +131 -134
- package/dist/semantic.min.css +1 -1
- package/dist/semantic.min.js +2 -2
- package/package.json +1 -1
- package/src/README.md +3 -3
- package/src/definitions/behaviors/api.js +5 -5
- package/src/definitions/behaviors/form.js +10 -10
- package/src/definitions/behaviors/state.js +2 -2
- package/src/definitions/behaviors/visibility.js +1 -1
- package/src/definitions/collections/form.less +1 -1
- package/src/definitions/modules/calendar.js +6 -6
- package/src/definitions/modules/dimmer.js +3 -3
- package/src/definitions/modules/dropdown.js +28 -28
- package/src/definitions/modules/embed.js +1 -1
- package/src/definitions/modules/flyout.js +2 -2
- package/src/definitions/modules/modal.js +1 -1
- package/src/definitions/modules/nag.js +1 -1
- package/src/definitions/modules/popup.js +7 -7
- package/src/definitions/modules/progress.js +6 -6
- package/src/definitions/modules/search.js +6 -6
- package/src/definitions/modules/shape.js +1 -1
- package/src/definitions/modules/sidebar.js +1 -1
- package/src/definitions/modules/slider.js +4 -4
- package/src/definitions/modules/slider.less +1 -1
- package/src/definitions/modules/sticky.js +4 -4
- package/src/definitions/modules/tab.js +9 -12
- package/src/definitions/modules/toast.js +3 -3
- package/src/definitions/modules/transition.js +4 -4
- package/src/themes/default/modules/slider.variables +1 -1
package/dist/components/feed.css
CHANGED
package/dist/components/flag.css
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* # Fomantic-UI 2.10.0-beta.
|
2
|
+
* # Fomantic-UI 2.10.0-beta.3+f3fff7f - Flyout
|
3
3
|
* https://github.com/fomantic/Fomantic-UI/
|
4
4
|
*
|
5
5
|
*
|
@@ -190,7 +190,7 @@
|
|
190
190
|
|
191
191
|
create: {
|
192
192
|
flyout: function () {
|
193
|
-
module.verbose('
|
193
|
+
module.verbose('Programmatically create flyout', $context);
|
194
194
|
$module = $('<div/>', { class: className.flyout, role: 'dialog', 'aria-modal': settings.dimPage });
|
195
195
|
if (settings.closeIcon) {
|
196
196
|
$closeIcon = $('<i/>', {
|
@@ -516,7 +516,7 @@
|
|
516
516
|
shouldRefreshInputs = true;
|
517
517
|
}
|
518
518
|
} else {
|
519
|
-
// mutationobserver only provides the parent nodes
|
519
|
+
// mutationobserver only provides the parent nodes,
|
520
520
|
// so let's collect all childs as well to find nested inputs
|
521
521
|
var $addedInputs = $(collectNodes(mutation.addedNodes)).filter('a[href], [tabindex], :input:enabled').filter(':visible'),
|
522
522
|
$removedInputs = $(collectNodes(mutation.removedNodes)).filter('a[href], [tabindex], :input');
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*
|
2
|
-
* # Fomantic UI - 2.10.0-beta.
|
2
|
+
* # Fomantic UI - 2.10.0-beta.3+f3fff7f
|
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(O){var D,e=Q(this),N=Q(W),L=Q(U),B=(Q("html"),Q("head")),z=Q("body"),I=Date.now(),j=[],R=O,q="string"==typeof R,K=[].slice.call(arguments,1),V=function(e,t){var n;return 0<=[W,U].indexOf(e)?n=z:0===(n=Q(t.document).find(e)).length&&(n=t.frameElement?V(e,t.parent):z),n};return e.each(function(){var n,e,o,s,t,i,r,l=Q.isPlainObject(O)?Q.extend(!0,{},Q.fn.flyout.settings,O):Q.extend({},Q.fn.flyout.settings),c=l.selector,a=l.className,u=l.namespace,d=l.fields,f=l.regExp,h=l.error,g="."+u,p="module-"+u,v=Q(this),b=V(l.context,W),m=v.find(c.close),y=v.children(c.flyout),k=b.children(c.pusher),x=v.hasClass("flyout"),S=this,A=x?v.data(p):void 0,C=!1,w=b[0]===z[0],T="",F="",E=!1,H=!1,M=!1,P={initialize:function(){var s;P.debug("Initializing flyout",O),P.create.id(),x||(P.create.flyout(),X(l.onHidden)||(l.onHidden=function(){P.destroy(),v.remove()}),l.autoShow||(l.autoShow=!0)),v.addClass(l.class),""!==l.title&&v.find(c.header).html(P.helpers.escape(l.title,l.preserveHTML)).addClass(l.classTitle),""!==l.content&&v.find(c.content).html(P.helpers.escape(l.content,l.preserveHTML)).addClass(l.classContent),P.has.configActions()&&(0===(s=v.find(c.actions).addClass(l.classActions)).length?s=Q("<div/>",{class:a.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="'+P.helpers.deQuote(e[d.icon])+' icon"></i>':"",n=P.helpers.escape(e[d.text]||"",l.preserveHTML),i=P.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:a.button+" "+i,on:{click:function(){!1!==o.call(S,v)&&P.hide()}}}))})),l.delaySetup?requestAnimationFrame(P.setup.layout):P.setup.layout(),requestAnimationFrame(function(){P.setup.cache()}),"left"!==P.get.direction()&&"right"!==P.get.direction()||(P.setup.heights(),P.bind.resize()),P.bind.events(),P.observeChanges(),P.instantiate(),l.autoShow&&P.show()},instantiate:function(){P.verbose("Storing instance of module",P),A=P,v.data(p,A)},create:{flyout:function(){var e;P.verbose("Programmaticaly create flyout",b),v=Q("<div/>",{class:a.flyout,role:"dialog","aria-modal":l.dimPage}),l.closeIcon&&(m=Q("<i/>",{class:a.close,role:"button",tabindex:0,"aria-label":l.text.close}),v.append(m)),""!==l.title&&(e="_"+P.get.id()+"title",v.attr("aria-labelledby",e),Q("<div/>",{class:a.header,id:e}).appendTo(v)),""!==l.content&&(e="_"+P.get.id()+"desc",v.attr("aria-describedby",e),Q("<div/>",{class:a.content,id:e}).appendTo(v)),P.has.configActions()&&Q("<div/>",{class:a.actions}).appendTo(v),v.prependTo(b),S=v[0]},id:function(){t=(Math.random().toString(16)+"000000000").slice(2,10),s="."+t,P.verbose("Creating unique id for element",t)}},destroy:function(){i&&i.disconnect(),P.verbose("Destroying previous module for",v),v.off(g).removeData(p),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?(P.debug("Escape key pressed hiding flyout"),P.hide()):P.debug("Escape key pressed, but closable is set to false"),e.preventDefault())},resize:function(){P.setup.heights()},focus:function(){H=!0},click:function(e){H&&U.activeElement!==e.target&&P.is.visible()&&l.autofocus&&l.dimPage&&0===Q(U.activeElement).closest(c.flyout).length&&requestAnimationFrame(P.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&&(P.verbose("User clicked on dimmed page"),P.hide()),e&&(P.verbose("User clicked on dimmable context (scaled out page)"),P.hide()))},close:function(e){P.hide()},closeKeyUp:function(e){e=e.which;e!==l.keys.enter&&e!==l.keys.space||P.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(P.element,Q(this))?P.verbose("Approve callback returned false cancelling close"):(C=!0,P.hide(function(){C=!1}))},deny:function(e){C||!1===l.onDeny.call(P.element,Q(this))?P.verbose("Deny callback returned false cancelling close"):(C=!0,P.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(c.flyout).length&&e.preventDefault()}},bind:{resize:function(){P.verbose("Adding resize event to window",N),N.on("resize"+s,P.event.resize)},events:function(){P.verbose("Attaching events"),v.on("click"+g,c.close,P.event.close).on("click"+g,c.approve,P.event.approve).on("click"+g,c.deny,P.event.deny),m.on("keyup"+s,P.event.closeKeyUp),N.on("focus"+s,P.event.focus),b.on("click"+s,P.event.click)},clickaway:function(){P.verbose("Adding clickaway events to context",b),b.on("click"+s,P.event.clickaway).on("touchend"+s,P.event.clickaway)},scrollLock:function(){l.scrollLock&&(P.debug("Disabling page scroll"),(E=P.has.scrollbar())&&(P.save.bodyMargin(),P.set.bodyMargin()),b.addClass(a.locked)),P.verbose("Adding events to contain flyout scroll"),L.on("touchmove"+s,P.event.touch),v.on("scroll"+g,P.event.containScroll)}},unbind:{clickaway:function(){P.verbose("Removing clickaway events from context",b),b.off(s)},scrollLock:function(){P.verbose("Removing scroll lock from page"),E&&P.restore.bodyMargin(),b.removeClass(a.locked),L.off(s),v.off("scroll"+g)}},add:{inlineCSS:function(){var e=P.cache.width||v.outerWidth(),t=P.cache.height||v.outerHeight(),n=P.is.rtl(),i=P.get.direction(),t={left:e,right:-e,top:t,bottom:-t};n&&(P.verbose("RTL detected, flipping widths"),t.left=-e,t.right=e),n="<style>","left"===i||"right"===i?(P.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); }"),P.is.ie()&&("left"===i||"right"===i?(P.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),P.debug("Adding sizing css to head",o)},keyboardShortcuts:function(){P.verbose("Adding keyboard shortcuts"),L.on("keydown"+g,P.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,i=!0;e.every(function(e){var t;return"attributes"===e.type?M&&("disabled"===e.attributeName||0<Q(e.target).find(":input").addBack(":input").filter(":visible").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,(0<t.filter(":input").length||0<e.filter(":input").length)&&(i=!1))),!n}),n&&P.refreshInputs(i)})).observe(S,{attributeFilter:["class","disabled"],attributes:!0,childList:!0,subtree:!0}),P.debug("Setting up mutation observer",i))},refresh:function(){P.verbose("Refreshing selector cache"),b=V(l.context,W),P.refreshFlyouts(),k=b.children(c.pusher),P.clear.cache()},refreshFlyouts:function(){P.verbose("Refreshing other flyouts"),y=b.children(c.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===Q(this).closest(".disabled").length})).filter(":input").length?(n=v.add(n),v.attr("tabindex",-1)):v.removeAttr("tabindex"),n.first().on("keydown"+s,P.event.inputKeyDown.first),n.last().on("keydown"+s,P.event.inputKeyDown.last),!e&&l.autofocus&&0===n.filter(":focus").length&&P.set.autofocus())},setup:{cache:function(){P.cache={width:v.outerWidth(),height:v.outerHeight()}},layout:function(){0===b.children(c.pusher).length&&(P.debug("Adding wrapper element for flyout"),P.error(h.pusher),k=Q('<div class="pusher" />'),b.children().not(c.omitted).not(y).wrapAll(k),P.refresh()),0!==v.nextAll(c.pusher).length&&v.nextAll(c.pusher)[0]===k[0]||(P.debug("Moved flyout to correct parent element"),P.error(h.movedFlyout,S),v.detach().prependTo(b),P.refresh()),P.is.mobile()&&v.addClass(a.fullscreen),P.clear.cache(),P.set.pushable(),P.set.direction()},heights:function(){P.debug("Setting up heights",v);var e=v.children(c.header),t=v.children(c.content),n=v.children(c.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(P[t])?P[t]:P.toggle,0<n.length?(P.debug("Attaching flyout events to element",e,t),n.on("click"+g,t)):P.error(h.notFound,e)},show:function(e){e=X(e)?e:function(){},P.is.hidden()?!1===l.onShow.call(S)?P.verbose("Show callback returned false cancelling show"):(P.refresh(),P.othersActive()&&(P.debug("Other flyouts currently visible"),l.exclusive?P.hideOthers():C=!1),P.set.dimmerStyles(),P.set.observeAttributes(!1),P.pushPage(function(){e.call(S),l.onVisible.call(S),l.keyboardShortcuts&&P.add.keyboardShortcuts(),P.save.focus(),P.refreshInputs(),requestAnimationFrame(P.set.observeAttributes)}),l.onChange.call(S)):P.debug("Flyout is already visible")},hide:function(e){if(e=X(e)?e:function(){},!1===l.onHide.call(S,Q(this)))return P.verbose("Hide callback returned false cancelling hide"),C=!1;(P.is.visible()||P.is.animating())&&(P.debug("Hiding flyout",e),P.refreshFlyouts(),P.set.observeAttributes(!1),P.pullPage(function(){e.call(S),X(l.onHidden)&&l.onHidden.call(S),P.restore.focus()}),l.onChange.call(S))},othersAnimating:function(){return 0<y.not(v).filter("."+a.animating).length},othersVisible:function(){return 0<y.not(v).filter("."+a.visible).length},othersActive:function(){return P.othersVisible()||P.othersAnimating()},hideOthers:function(e){var t=y.not(v).filter("."+a.visible),n=t.length,i=0;e=e||function(){},t.flyout("hide",function(){++i===n&&e()})},toggle:function(){P.verbose("Determining toggled direction"),P.is.hidden()?P.show():P.hide()},pushPage:function(t){var e,n,i;t=X(t)?t:function(){},P.set.overlay(),l.returnScroll&&(r=(w?N:b).scrollTop()),P.bind.scrollLock(),e=function(){P.bind.clickaway(),P.add.inlineCSS(),P.set.animating(),P.set.visible()},n=function(){P.set.dimmed()},i=function(e){e.target===v[0]&&(v.off("transitionend"+s,i),P.remove.animating(),t.call(S))},v.off("transitionend"+s),v.on("transitionend"+s,i),requestAnimationFrame(e),l.dimPage&&!P.othersVisible()&&requestAnimationFrame(n)},pullPage:function(t){var e,n;t=X(t)?t:function(){},P.verbose("Removing context push state",P.get.direction()),P.unbind.clickaway(),P.othersActive()||(P.unbind.scrollLock(),l.keyboardShortcuts&&P.remove.keyboardShortcuts()),e=function(){P.set.overlay(),P.set.animating(),l.dimPage&&!P.othersVisible()&&P.set.closing(),P.remove.visible()},n=function(e){e.target===v[0]&&(v.off("transitionend"+s,n),P.remove.animating(),P.remove.closing(),P.remove.overlay(),P.remove.inlineCSS(),l.returnScroll&&P.scrollBack(),l.dimPage&&!P.othersVisible()&&k.removeClass(a.dimmed),t.call(S))},v.off("transitionend"+s),v.on("transitionend"+s,n),requestAnimationFrame(e)},scrollToTop:function(){P.verbose("Scrolling to top of page to avoid animation issues"),v.scrollTop(0),(w?N:b)[0].scrollTo(0,0)},scrollBack:function(){P.verbose("Scrolling back to original page position"),(w?N:b)[0].scrollTo(0,r)},clear:{cache:function(){P.verbose("Clearing cached dimensions"),P.cache={}}},set:{observeAttributes:function(e){M=!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(a.blurring):k.removeClass(a.blurring)},bodyMargin:function(){var n=P.can.leftBodyScrollbar()?"left":"right";b.css((w?"margin-":"padding-")+n,F+"px"),b.find(c.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)")})},pushed:function(){b.addClass(a.pushed)},pushable:function(){b.addClass(a.pushable)},dimmed:function(){k.addClass(a.dimmed)},active:function(){v.addClass(a.active)},animating:function(){v.addClass(a.animating)},closing:function(){k.addClass(a.closing)},direction:function(e){e=e||P.get.direction(),v.addClass(a[e])},visible:function(){v.addClass(a.visible)},overlay:function(){v.addClass(a.overlay)}},remove:{inlineCSS:function(){P.debug("Removing inline css styles",o),o&&0<o.length&&o.remove()},keyboardShortcuts:function(){P.verbose("Removing keyboard shortcuts"),L.off("keydown"+g)},pushed:function(){b.removeClass(a.pushed)},pushable:function(){b.removeClass(a.pushable)},active:function(){v.removeClass(a.active)},animating:function(){v.removeClass(a.animating)},closing:function(){k.removeClass(a.closing)},direction:function(e){e=e||P.get.direction(),v.removeClass(a[e])},visible:function(){v.removeClass(a.visible)},overlay:function(){v.removeClass(a.overlay)}},get:{direction:function(){return v.hasClass(a.top)?a.top:v.hasClass(a.right)?a.right:v.hasClass(a.bottom)?a.bottom:a.left},id:function(){return t},element:function(){return v},settings:function(){return l}},can:{leftBodyScrollbar:function(){return void 0===P.cache.leftBodyScrollbar&&(P.cache.leftBodyScrollbar=P.is.rtl()&&(P.is.iframe&&!P.is.firefox()||P.is.safari()||P.is.edge()||P.is.ie())),P.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-")+(P.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===P.cache.isSafari&&(P.cache.isSafari=/constructor/i.test(W.HTMLElement)||!!W.ApplePaySession),P.cache.isSafari},edge:function(){return void 0===P.cache.isEdge&&(P.cache.isEdge=!!W.setImmediate&&!P.is.ie()),P.cache.isEdge},firefox:function(){return void 0===P.cache.isFirefox&&(P.cache.isFirefox=!!W.InstallTrigger),P.cache.isFirefox},iframe:function(){return!(self===top)},ie:function(){var e,t;return void 0===P.cache.isIE&&(e=!W.ActiveXObject&&"ActiveXObject"in W,t="ActiveXObject"in W,P.cache.isIE=e||t),P.cache.isIE},mobile:function(){var e=navigator.userAgent;return e.match(f.mobile)?(P.verbose("Browser was found to be mobile",e),!0):(P.verbose("Browser is not mobile, using regular transition",e),!1)},hidden:function(){return!P.is.visible()},visible:function(){return v.hasClass(a.visible)},animating:function(){return b.hasClass(a.animating)},rtl:function(){return void 0===P.cache.isRTL&&(P.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")),P.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=P.can.leftBodyScrollbar()?"left":"right";b.css((w?"margin-":"padding-")+n,T),b.find(c.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(P.debug("Changing setting",e,t),Q.isPlainObject(e))Q.extend(!0,l,e);else{if(void 0===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,P,e);else{if(void 0===t)return P[e];P[e]=t}},debug:function(){!l.silent&&l.debug&&(l.performance?P.performance.log(arguments):(P.debug=Function.prototype.bind.call(console.info,console,l.name+":"),P.debug.apply(console,arguments)))},verbose:function(){!l.silent&&l.verbose&&l.debug&&(l.performance?P.performance.log(arguments):(P.verbose=Function.prototype.bind.call(console.info,console,l.name+":"),P.verbose.apply(console,arguments)))},error:function(){l.silent||(P.error=Function.prototype.bind.call(console.error,console,l.name+":"),P.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(P.performance.timer),P.performance.timer=setTimeout(function(){P.performance.display()},500)},display:function(){var e=l.name+":",n=0;I=!1,clearTimeout(P.performance.timer),Q.each(j,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",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=A;return e=e||K,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]:P.error(h.method,i),!1;r=r[t]}}})),X(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}};q?(void 0===A&&(X(l.templates[R])&&(l.autoShow=!0,l.className.flyout=l.className.template,l=Q.extend(!0,{},l,l.templates[R].apply(P,K)),a=l.className,l.namespace,d=l.fields,h=l.error),P.initialize()),X(l.templates[R])||P.invoke(R)):(void 0!==A&&A.invoke("destroy"),P.initialize(),D=v)}),void 0!==D?D: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",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:{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(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(O){var D,e=Q(this),N=Q(W),L=Q(U),B=(Q("html"),Q("head")),z=Q("body"),I=Date.now(),j=[],R=O,q="string"==typeof R,K=[].slice.call(arguments,1),V=function(e,t){var n;return 0<=[W,U].indexOf(e)?n=z:0===(n=Q(t.document).find(e)).length&&(n=t.frameElement?V(e,t.parent):z),n};return e.each(function(){var n,e,o,s,t,i,r,l=Q.isPlainObject(O)?Q.extend(!0,{},Q.fn.flyout.settings,O):Q.extend({},Q.fn.flyout.settings),c=l.selector,a=l.className,u=l.namespace,d=l.fields,f=l.regExp,h=l.error,g="."+u,p="module-"+u,v=Q(this),b=V(l.context,W),m=v.find(c.close),y=v.children(c.flyout),k=b.children(c.pusher),x=v.hasClass("flyout"),S=this,A=x?v.data(p):void 0,C=!1,w=b[0]===z[0],T="",F="",E=!1,H=!1,M=!1,P={initialize:function(){var s;P.debug("Initializing flyout",O),P.create.id(),x||(P.create.flyout(),X(l.onHidden)||(l.onHidden=function(){P.destroy(),v.remove()}),l.autoShow||(l.autoShow=!0)),v.addClass(l.class),""!==l.title&&v.find(c.header).html(P.helpers.escape(l.title,l.preserveHTML)).addClass(l.classTitle),""!==l.content&&v.find(c.content).html(P.helpers.escape(l.content,l.preserveHTML)).addClass(l.classContent),P.has.configActions()&&(0===(s=v.find(c.actions).addClass(l.classActions)).length?s=Q("<div/>",{class:a.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="'+P.helpers.deQuote(e[d.icon])+' icon"></i>':"",n=P.helpers.escape(e[d.text]||"",l.preserveHTML),i=P.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:a.button+" "+i,on:{click:function(){!1!==o.call(S,v)&&P.hide()}}}))})),l.delaySetup?requestAnimationFrame(P.setup.layout):P.setup.layout(),requestAnimationFrame(function(){P.setup.cache()}),"left"!==P.get.direction()&&"right"!==P.get.direction()||(P.setup.heights(),P.bind.resize()),P.bind.events(),P.observeChanges(),P.instantiate(),l.autoShow&&P.show()},instantiate:function(){P.verbose("Storing instance of module",P),A=P,v.data(p,A)},create:{flyout:function(){var e;P.verbose("Programmatically create flyout",b),v=Q("<div/>",{class:a.flyout,role:"dialog","aria-modal":l.dimPage}),l.closeIcon&&(m=Q("<i/>",{class:a.close,role:"button",tabindex:0,"aria-label":l.text.close}),v.append(m)),""!==l.title&&(e="_"+P.get.id()+"title",v.attr("aria-labelledby",e),Q("<div/>",{class:a.header,id:e}).appendTo(v)),""!==l.content&&(e="_"+P.get.id()+"desc",v.attr("aria-describedby",e),Q("<div/>",{class:a.content,id:e}).appendTo(v)),P.has.configActions()&&Q("<div/>",{class:a.actions}).appendTo(v),v.prependTo(b),S=v[0]},id:function(){t=(Math.random().toString(16)+"000000000").slice(2,10),s="."+t,P.verbose("Creating unique id for element",t)}},destroy:function(){i&&i.disconnect(),P.verbose("Destroying previous module for",v),v.off(g).removeData(p),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?(P.debug("Escape key pressed hiding flyout"),P.hide()):P.debug("Escape key pressed, but closable is set to false"),e.preventDefault())},resize:function(){P.setup.heights()},focus:function(){H=!0},click:function(e){H&&U.activeElement!==e.target&&P.is.visible()&&l.autofocus&&l.dimPage&&0===Q(U.activeElement).closest(c.flyout).length&&requestAnimationFrame(P.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&&(P.verbose("User clicked on dimmed page"),P.hide()),e&&(P.verbose("User clicked on dimmable context (scaled out page)"),P.hide()))},close:function(e){P.hide()},closeKeyUp:function(e){e=e.which;e!==l.keys.enter&&e!==l.keys.space||P.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(P.element,Q(this))?P.verbose("Approve callback returned false cancelling close"):(C=!0,P.hide(function(){C=!1}))},deny:function(e){C||!1===l.onDeny.call(P.element,Q(this))?P.verbose("Deny callback returned false cancelling close"):(C=!0,P.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(c.flyout).length&&e.preventDefault()}},bind:{resize:function(){P.verbose("Adding resize event to window",N),N.on("resize"+s,P.event.resize)},events:function(){P.verbose("Attaching events"),v.on("click"+g,c.close,P.event.close).on("click"+g,c.approve,P.event.approve).on("click"+g,c.deny,P.event.deny),m.on("keyup"+s,P.event.closeKeyUp),N.on("focus"+s,P.event.focus),b.on("click"+s,P.event.click)},clickaway:function(){P.verbose("Adding clickaway events to context",b),b.on("click"+s,P.event.clickaway).on("touchend"+s,P.event.clickaway)},scrollLock:function(){l.scrollLock&&(P.debug("Disabling page scroll"),(E=P.has.scrollbar())&&(P.save.bodyMargin(),P.set.bodyMargin()),b.addClass(a.locked)),P.verbose("Adding events to contain flyout scroll"),L.on("touchmove"+s,P.event.touch),v.on("scroll"+g,P.event.containScroll)}},unbind:{clickaway:function(){P.verbose("Removing clickaway events from context",b),b.off(s)},scrollLock:function(){P.verbose("Removing scroll lock from page"),E&&P.restore.bodyMargin(),b.removeClass(a.locked),L.off(s),v.off("scroll"+g)}},add:{inlineCSS:function(){var e=P.cache.width||v.outerWidth(),t=P.cache.height||v.outerHeight(),n=P.is.rtl(),i=P.get.direction(),t={left:e,right:-e,top:t,bottom:-t};n&&(P.verbose("RTL detected, flipping widths"),t.left=-e,t.right=e),n="<style>","left"===i||"right"===i?(P.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); }"),P.is.ie()&&("left"===i||"right"===i?(P.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),P.debug("Adding sizing css to head",o)},keyboardShortcuts:function(){P.verbose("Adding keyboard shortcuts"),L.on("keydown"+g,P.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,i=!0;e.every(function(e){var t;return"attributes"===e.type?M&&("disabled"===e.attributeName||0<Q(e.target).find(":input").addBack(":input").filter(":visible").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,(0<t.filter(":input").length||0<e.filter(":input").length)&&(i=!1))),!n}),n&&P.refreshInputs(i)})).observe(S,{attributeFilter:["class","disabled"],attributes:!0,childList:!0,subtree:!0}),P.debug("Setting up mutation observer",i))},refresh:function(){P.verbose("Refreshing selector cache"),b=V(l.context,W),P.refreshFlyouts(),k=b.children(c.pusher),P.clear.cache()},refreshFlyouts:function(){P.verbose("Refreshing other flyouts"),y=b.children(c.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===Q(this).closest(".disabled").length})).filter(":input").length?(n=v.add(n),v.attr("tabindex",-1)):v.removeAttr("tabindex"),n.first().on("keydown"+s,P.event.inputKeyDown.first),n.last().on("keydown"+s,P.event.inputKeyDown.last),!e&&l.autofocus&&0===n.filter(":focus").length&&P.set.autofocus())},setup:{cache:function(){P.cache={width:v.outerWidth(),height:v.outerHeight()}},layout:function(){0===b.children(c.pusher).length&&(P.debug("Adding wrapper element for flyout"),P.error(h.pusher),k=Q('<div class="pusher" />'),b.children().not(c.omitted).not(y).wrapAll(k),P.refresh()),0!==v.nextAll(c.pusher).length&&v.nextAll(c.pusher)[0]===k[0]||(P.debug("Moved flyout to correct parent element"),P.error(h.movedFlyout,S),v.detach().prependTo(b),P.refresh()),P.is.mobile()&&v.addClass(a.fullscreen),P.clear.cache(),P.set.pushable(),P.set.direction()},heights:function(){P.debug("Setting up heights",v);var e=v.children(c.header),t=v.children(c.content),n=v.children(c.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(P[t])?P[t]:P.toggle,0<n.length?(P.debug("Attaching flyout events to element",e,t),n.on("click"+g,t)):P.error(h.notFound,e)},show:function(e){e=X(e)?e:function(){},P.is.hidden()?!1===l.onShow.call(S)?P.verbose("Show callback returned false cancelling show"):(P.refresh(),P.othersActive()&&(P.debug("Other flyouts currently visible"),l.exclusive?P.hideOthers():C=!1),P.set.dimmerStyles(),P.set.observeAttributes(!1),P.pushPage(function(){e.call(S),l.onVisible.call(S),l.keyboardShortcuts&&P.add.keyboardShortcuts(),P.save.focus(),P.refreshInputs(),requestAnimationFrame(P.set.observeAttributes)}),l.onChange.call(S)):P.debug("Flyout is already visible")},hide:function(e){if(e=X(e)?e:function(){},!1===l.onHide.call(S,Q(this)))return P.verbose("Hide callback returned false cancelling hide"),C=!1;(P.is.visible()||P.is.animating())&&(P.debug("Hiding flyout",e),P.refreshFlyouts(),P.set.observeAttributes(!1),P.pullPage(function(){e.call(S),X(l.onHidden)&&l.onHidden.call(S),P.restore.focus()}),l.onChange.call(S))},othersAnimating:function(){return 0<y.not(v).filter("."+a.animating).length},othersVisible:function(){return 0<y.not(v).filter("."+a.visible).length},othersActive:function(){return P.othersVisible()||P.othersAnimating()},hideOthers:function(e){var t=y.not(v).filter("."+a.visible),n=t.length,i=0;e=e||function(){},t.flyout("hide",function(){++i===n&&e()})},toggle:function(){P.verbose("Determining toggled direction"),P.is.hidden()?P.show():P.hide()},pushPage:function(t){var e,n,i;t=X(t)?t:function(){},P.set.overlay(),l.returnScroll&&(r=(w?N:b).scrollTop()),P.bind.scrollLock(),e=function(){P.bind.clickaway(),P.add.inlineCSS(),P.set.animating(),P.set.visible()},n=function(){P.set.dimmed()},i=function(e){e.target===v[0]&&(v.off("transitionend"+s,i),P.remove.animating(),t.call(S))},v.off("transitionend"+s),v.on("transitionend"+s,i),requestAnimationFrame(e),l.dimPage&&!P.othersVisible()&&requestAnimationFrame(n)},pullPage:function(t){var e,n;t=X(t)?t:function(){},P.verbose("Removing context push state",P.get.direction()),P.unbind.clickaway(),P.othersActive()||(P.unbind.scrollLock(),l.keyboardShortcuts&&P.remove.keyboardShortcuts()),e=function(){P.set.overlay(),P.set.animating(),l.dimPage&&!P.othersVisible()&&P.set.closing(),P.remove.visible()},n=function(e){e.target===v[0]&&(v.off("transitionend"+s,n),P.remove.animating(),P.remove.closing(),P.remove.overlay(),P.remove.inlineCSS(),l.returnScroll&&P.scrollBack(),l.dimPage&&!P.othersVisible()&&k.removeClass(a.dimmed),t.call(S))},v.off("transitionend"+s),v.on("transitionend"+s,n),requestAnimationFrame(e)},scrollToTop:function(){P.verbose("Scrolling to top of page to avoid animation issues"),v.scrollTop(0),(w?N:b)[0].scrollTo(0,0)},scrollBack:function(){P.verbose("Scrolling back to original page position"),(w?N:b)[0].scrollTo(0,r)},clear:{cache:function(){P.verbose("Clearing cached dimensions"),P.cache={}}},set:{observeAttributes:function(e){M=!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(a.blurring):k.removeClass(a.blurring)},bodyMargin:function(){var n=P.can.leftBodyScrollbar()?"left":"right";b.css((w?"margin-":"padding-")+n,F+"px"),b.find(c.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)")})},pushed:function(){b.addClass(a.pushed)},pushable:function(){b.addClass(a.pushable)},dimmed:function(){k.addClass(a.dimmed)},active:function(){v.addClass(a.active)},animating:function(){v.addClass(a.animating)},closing:function(){k.addClass(a.closing)},direction:function(e){e=e||P.get.direction(),v.addClass(a[e])},visible:function(){v.addClass(a.visible)},overlay:function(){v.addClass(a.overlay)}},remove:{inlineCSS:function(){P.debug("Removing inline css styles",o),o&&0<o.length&&o.remove()},keyboardShortcuts:function(){P.verbose("Removing keyboard shortcuts"),L.off("keydown"+g)},pushed:function(){b.removeClass(a.pushed)},pushable:function(){b.removeClass(a.pushable)},active:function(){v.removeClass(a.active)},animating:function(){v.removeClass(a.animating)},closing:function(){k.removeClass(a.closing)},direction:function(e){e=e||P.get.direction(),v.removeClass(a[e])},visible:function(){v.removeClass(a.visible)},overlay:function(){v.removeClass(a.overlay)}},get:{direction:function(){return v.hasClass(a.top)?a.top:v.hasClass(a.right)?a.right:v.hasClass(a.bottom)?a.bottom:a.left},id:function(){return t},element:function(){return v},settings:function(){return l}},can:{leftBodyScrollbar:function(){return void 0===P.cache.leftBodyScrollbar&&(P.cache.leftBodyScrollbar=P.is.rtl()&&(P.is.iframe&&!P.is.firefox()||P.is.safari()||P.is.edge()||P.is.ie())),P.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-")+(P.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===P.cache.isSafari&&(P.cache.isSafari=/constructor/i.test(W.HTMLElement)||!!W.ApplePaySession),P.cache.isSafari},edge:function(){return void 0===P.cache.isEdge&&(P.cache.isEdge=!!W.setImmediate&&!P.is.ie()),P.cache.isEdge},firefox:function(){return void 0===P.cache.isFirefox&&(P.cache.isFirefox=!!W.InstallTrigger),P.cache.isFirefox},iframe:function(){return!(self===top)},ie:function(){var e,t;return void 0===P.cache.isIE&&(e=!W.ActiveXObject&&"ActiveXObject"in W,t="ActiveXObject"in W,P.cache.isIE=e||t),P.cache.isIE},mobile:function(){var e=navigator.userAgent;return e.match(f.mobile)?(P.verbose("Browser was found to be mobile",e),!0):(P.verbose("Browser is not mobile, using regular transition",e),!1)},hidden:function(){return!P.is.visible()},visible:function(){return v.hasClass(a.visible)},animating:function(){return b.hasClass(a.animating)},rtl:function(){return void 0===P.cache.isRTL&&(P.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")),P.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=P.can.leftBodyScrollbar()?"left":"right";b.css((w?"margin-":"padding-")+n,T),b.find(c.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(P.debug("Changing setting",e,t),Q.isPlainObject(e))Q.extend(!0,l,e);else{if(void 0===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,P,e);else{if(void 0===t)return P[e];P[e]=t}},debug:function(){!l.silent&&l.debug&&(l.performance?P.performance.log(arguments):(P.debug=Function.prototype.bind.call(console.info,console,l.name+":"),P.debug.apply(console,arguments)))},verbose:function(){!l.silent&&l.verbose&&l.debug&&(l.performance?P.performance.log(arguments):(P.verbose=Function.prototype.bind.call(console.info,console,l.name+":"),P.verbose.apply(console,arguments)))},error:function(){l.silent||(P.error=Function.prototype.bind.call(console.error,console,l.name+":"),P.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(P.performance.timer),P.performance.timer=setTimeout(function(){P.performance.display()},500)},display:function(){var e=l.name+":",n=0;I=!1,clearTimeout(P.performance.timer),Q.each(j,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",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=A;return e=e||K,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]:P.error(h.method,i),!1;r=r[t]}}})),X(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}};q?(void 0===A&&(X(l.templates[R])&&(l.autoShow=!0,l.className.flyout=l.className.template,l=Q.extend(!0,{},l,l.templates[R].apply(P,K)),a=l.className,l.namespace,d=l.fields,h=l.error),P.initialize()),X(l.templates[R])||P.invoke(R)):(void 0!==A&&A.invoke("destroy"),P.initialize(),D=v)}),void 0!==D?D: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",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:{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);
|
package/dist/components/form.css
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* # Fomantic-UI 2.10.0-beta.
|
2
|
+
* # Fomantic-UI 2.10.0-beta.3+f3fff7f - Form
|
3
3
|
* https://github.com/fomantic/Fomantic-UI/
|
4
4
|
*
|
5
5
|
*
|
@@ -591,7 +591,7 @@
|
|
591
591
|
border-color: #e0b4b4;
|
592
592
|
}
|
593
593
|
|
594
|
-
/* Preserve Native Select
|
594
|
+
/* Preserve Native Select Styling */
|
595
595
|
.ui.form .field.error select {
|
596
596
|
-webkit-appearance: menulist-button;
|
597
597
|
}
|
@@ -832,7 +832,7 @@
|
|
832
832
|
border-color: #a9d5de;
|
833
833
|
}
|
834
834
|
|
835
|
-
/* Preserve Native Select
|
835
|
+
/* Preserve Native Select Styling */
|
836
836
|
.ui.form .field.info select {
|
837
837
|
-webkit-appearance: menulist-button;
|
838
838
|
}
|
@@ -1073,7 +1073,7 @@
|
|
1073
1073
|
border-color: #a3c293;
|
1074
1074
|
}
|
1075
1075
|
|
1076
|
-
/* Preserve Native Select
|
1076
|
+
/* Preserve Native Select Styling */
|
1077
1077
|
.ui.form .field.success select {
|
1078
1078
|
-webkit-appearance: menulist-button;
|
1079
1079
|
}
|
@@ -1314,7 +1314,7 @@
|
|
1314
1314
|
border-color: #c9ba9b;
|
1315
1315
|
}
|
1316
1316
|
|
1317
|
-
/* Preserve Native Select
|
1317
|
+
/* Preserve Native Select Styling */
|
1318
1318
|
.ui.form .field.warning select {
|
1319
1319
|
-webkit-appearance: menulist-button;
|
1320
1320
|
}
|
package/dist/components/form.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* # Fomantic-UI 2.10.0-beta.
|
2
|
+
* # Fomantic-UI 2.10.0-beta.3+f3fff7f - Form Validation
|
3
3
|
* https://github.com/fomantic/Fomantic-UI/
|
4
4
|
*
|
5
5
|
*
|
@@ -377,10 +377,10 @@
|
|
377
377
|
if (currentValue === undefined || currentValue === null) {
|
378
378
|
currentValue = '';
|
379
379
|
} else if (Array.isArray(currentValue)) {
|
380
|
-
// multiple select values are returned as arrays which are never equal, so do string conversion first
|
380
|
+
// multiple select values are returned as arrays which are never equal, so do the string conversion first
|
381
381
|
currentValue = currentValue.toString();
|
382
382
|
}
|
383
|
-
// Boolean values can be encoded as "true/false" or "True/False" depending on underlying frameworks so we need a case
|
383
|
+
// Boolean values can be encoded as "true/false" or "True/False" depending on underlying frameworks, so we need a case-insensitive comparison
|
384
384
|
var boolRegex = /^(true|false)$/i;
|
385
385
|
var isBoolValue = boolRegex.test(initialValue) && boolRegex.test(currentValue);
|
386
386
|
if (isBoolValue) {
|
@@ -494,7 +494,7 @@
|
|
494
494
|
event.returnValue = settings.text.leavingMessage;
|
495
495
|
}
|
496
496
|
|
497
|
-
// For
|
497
|
+
// For older...
|
498
498
|
return settings.text.leavingMessage;
|
499
499
|
}
|
500
500
|
},
|
@@ -1315,7 +1315,7 @@
|
|
1315
1315
|
if (typeof settings.errorFocus === 'string') {
|
1316
1316
|
$focusElement = $(document).find(settings.errorFocus);
|
1317
1317
|
hasTabIndex = $focusElement.is('[tabindex]');
|
1318
|
-
// to be able to focus/scroll into non
|
1318
|
+
// to be able to focus/scroll into non-input elements, we need a tabindex
|
1319
1319
|
if (!hasTabIndex) {
|
1320
1320
|
$focusElement.attr('tabindex', -1);
|
1321
1321
|
}
|
@@ -1858,7 +1858,7 @@
|
|
1858
1858
|
return $.fn.form.settings.regExp.email.test(value);
|
1859
1859
|
},
|
1860
1860
|
|
1861
|
-
// value is most likely url
|
1861
|
+
// value is most likely the url
|
1862
1862
|
url: function (value) {
|
1863
1863
|
return $.fn.form.settings.regExp.url.test(value);
|
1864
1864
|
},
|
@@ -1934,7 +1934,7 @@
|
|
1934
1934
|
);
|
1935
1935
|
},
|
1936
1936
|
|
1937
|
-
// is valid number (with decimal)
|
1937
|
+
// is it a valid number (with decimal)
|
1938
1938
|
decimal: function (value, range) {
|
1939
1939
|
return $.fn.form.settings.rules.range(value, range, 'decimal');
|
1940
1940
|
},
|
@@ -1944,7 +1944,7 @@
|
|
1944
1944
|
return $.fn.form.settings.rules.range(value, range, 'number');
|
1945
1945
|
},
|
1946
1946
|
|
1947
|
-
// is value (case
|
1947
|
+
// is value (case-insensitive)
|
1948
1948
|
is: function (value, text) {
|
1949
1949
|
text = typeof text === 'string'
|
1950
1950
|
? text.toLowerCase()
|
@@ -1961,7 +1961,7 @@
|
|
1961
1961
|
return value == text;
|
1962
1962
|
},
|
1963
1963
|
|
1964
|
-
// value is not another value (case
|
1964
|
+
// value is not another value (case-insensitive)
|
1965
1965
|
not: function (value, notValue) {
|
1966
1966
|
value = typeof value === 'string'
|
1967
1967
|
? value.toLowerCase()
|
@@ -1973,7 +1973,7 @@
|
|
1973
1973
|
return value != notValue;
|
1974
1974
|
},
|
1975
1975
|
|
1976
|
-
// value is not another value (case
|
1976
|
+
// value is not another value (case-sensitive)
|
1977
1977
|
notExactly: function (value, notValue) {
|
1978
1978
|
return value != notValue;
|
1979
1979
|
},
|
@@ -2038,7 +2038,7 @@
|
|
2038
2038
|
: false;
|
2039
2039
|
},
|
2040
2040
|
|
2041
|
-
// different
|
2041
|
+
// different from another field
|
2042
2042
|
different: function (value, identifier, module) {
|
2043
2043
|
var matchingValue = module.get.value(identifier, true);
|
2044
2044
|
|
package/dist/components/grid.css
CHANGED
package/dist/components/icon.css
CHANGED
package/dist/components/item.css
CHANGED
package/dist/components/list.css
CHANGED
package/dist/components/menu.css
CHANGED
package/dist/components/modal.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* # Fomantic-UI 2.10.0-beta.
|
2
|
+
* # Fomantic-UI 2.10.0-beta.3+f3fff7f - Modal
|
3
3
|
* https://github.com/fomantic/Fomantic-UI/
|
4
4
|
*
|
5
5
|
*
|
@@ -284,7 +284,7 @@
|
|
284
284
|
}
|
285
285
|
} else {
|
286
286
|
shouldRefresh = true;
|
287
|
-
// mutationobserver only provides the parent nodes
|
287
|
+
// mutationobserver only provides the parent nodes,
|
288
288
|
// so let's collect all childs as well to find nested inputs
|
289
289
|
var $addedInputs = $(collectNodes(mutation.addedNodes)).filter('a[href], [tabindex], :input:enabled').filter(':visible'),
|
290
290
|
$removedInputs = $(collectNodes(mutation.removedNodes)).filter('a[href], [tabindex], :input');
|
package/dist/components/nag.css
CHANGED
package/dist/components/nag.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* # Fomantic-UI 2.10.0-beta.
|
2
|
+
* # Fomantic-UI 2.10.0-beta.3+f3fff7f - Nag
|
3
3
|
* https://github.com/fomantic/Fomantic-UI/
|
4
4
|
*
|
5
5
|
*
|
@@ -495,7 +495,7 @@
|
|
495
495
|
// allows cookie to be overridden
|
496
496
|
persist: false,
|
497
497
|
|
498
|
-
// set to zero to require
|
498
|
+
// set to zero to require manual dismissal, otherwise hides on its own
|
499
499
|
displayTime: 0,
|
500
500
|
|
501
501
|
animation: {
|