fomantic-ui 2.9.0-beta.317 → 2.9.0-beta.318
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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- package/dist/components/embed.min.css +1 -1
- package/dist/components/embed.min.js +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 +9 -12
- package/dist/components/flyout.min.css +1 -1
- package/dist/components/flyout.min.js +2 -2
- package/dist/components/form.css +1 -1
- package/dist/components/form.js +1 -1
- 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/message.css +1 -1
- package/dist/components/message.min.css +1 -1
- package/dist/components/modal.css +1 -1
- package/dist/components/modal.js +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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.js +1 -1
- package/dist/components/slider.min.js +1 -1
- package/dist/components/state.js +1 -1
- 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 +1 -1
- 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 +1 -1
- package/dist/components/tab.min.css +1 -1
- package/dist/components/tab.min.js +1 -1
- 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 +1 -1
- 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 +1 -1
- package/dist/components/transition.min.css +1 -1
- package/dist/components/transition.min.js +1 -1
- package/dist/components/visibility.js +1 -1
- package/dist/components/visibility.min.js +1 -1
- package/dist/semantic.css +50 -50
- package/dist/semantic.js +34 -37
- package/dist/semantic.min.css +1 -1
- package/dist/semantic.min.js +2 -2
- package/package.json +1 -1
- package/src/definitions/modules/flyout.js +8 -11
package/dist/components/ad.css
CHANGED
package/dist/components/api.js
CHANGED
package/dist/components/card.css
CHANGED
package/dist/components/embed.js
CHANGED
package/dist/components/feed.css
CHANGED
package/dist/components/flag.css
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* # Fomantic-UI 2.9.0-beta.
|
2
|
+
* # Fomantic-UI 2.9.0-beta.318+01b81c0 - Flyout
|
3
3
|
* http://github.com/fomantic/Fomantic-UI/
|
4
4
|
*
|
5
5
|
*
|
@@ -23,7 +23,7 @@ window = (typeof window != 'undefined' && window.Math == Math)
|
|
23
23
|
: Function('return this')()
|
24
24
|
;
|
25
25
|
|
26
|
-
$.fn.flyout = function(parameters) {
|
26
|
+
$.flyout = $.fn.flyout = function(parameters) {
|
27
27
|
var
|
28
28
|
$allModules = $(this),
|
29
29
|
$window = $(window),
|
@@ -75,8 +75,10 @@ $.fn.flyout = function(parameters) {
|
|
75
75
|
$pusher = $context.children(selector.pusher),
|
76
76
|
$style,
|
77
77
|
|
78
|
+
isFlyoutComponent = $module.hasClass('flyout'),
|
79
|
+
|
78
80
|
element = this,
|
79
|
-
instance =
|
81
|
+
instance = isFlyoutComponent ? $module.data(moduleNamespace) : undefined,
|
80
82
|
|
81
83
|
ignoreRepeatedEvents = false,
|
82
84
|
isBody = $context[0] === $body[0],
|
@@ -97,7 +99,7 @@ $.fn.flyout = function(parameters) {
|
|
97
99
|
initialize: function() {
|
98
100
|
module.debug('Initializing flyout', parameters);
|
99
101
|
|
100
|
-
if(
|
102
|
+
if(!isFlyoutComponent) {
|
101
103
|
module.create.flyout();
|
102
104
|
if(!$.isFunction(settings.onHidden)) {
|
103
105
|
settings.onHidden = function () {
|
@@ -105,6 +107,9 @@ $.fn.flyout = function(parameters) {
|
|
105
107
|
$module.remove();
|
106
108
|
};
|
107
109
|
}
|
110
|
+
if(!settings.autoShow) {
|
111
|
+
settings.autoShow = true;
|
112
|
+
}
|
108
113
|
}
|
109
114
|
$module.addClass(settings.class);
|
110
115
|
if (settings.title !== '') {
|
@@ -422,13 +427,6 @@ $.fn.flyout = function(parameters) {
|
|
422
427
|
$flyouts = $context.children(selector.flyout);
|
423
428
|
},
|
424
429
|
|
425
|
-
repaint: function() {
|
426
|
-
module.verbose('Forcing repaint event');
|
427
|
-
element.style.display = 'none';
|
428
|
-
element.scrollTop = element.scrollTop;
|
429
|
-
element.style.display = '';
|
430
|
-
},
|
431
|
-
|
432
430
|
setup: {
|
433
431
|
cache: function() {
|
434
432
|
module.cache = {
|
@@ -591,7 +589,6 @@ $.fn.flyout = function(parameters) {
|
|
591
589
|
: function(){}
|
592
590
|
;
|
593
591
|
module.set.overlay();
|
594
|
-
module.repaint();
|
595
592
|
if(settings.returnScroll) {
|
596
593
|
currentScroll = (isBody ? $window : $context).scrollTop();
|
597
594
|
}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*
|
2
|
-
* # Fomantic UI - 2.9.0-beta.
|
2
|
+
* # Fomantic UI - 2.9.0-beta.318+01b81c0
|
3
3
|
* https://github.com/fomantic/Fomantic-UI
|
4
4
|
* http://fomantic-ui.com/
|
5
5
|
*
|
@@ -8,4 +8,4 @@
|
|
8
8
|
* http://opensource.org/licenses/MIT
|
9
9
|
*
|
10
10
|
*/
|
11
|
-
!function(V,W,q,Q){"use strict";V.isFunction=V.isFunction||function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},W=void 0!==W&&W.Math==Math?W:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),V.fn.flyout=function(F){var H,e=V(this),E=V(W),M=V(q),O=V("html"),P=V("head"),L=V("body"),z=e.selector||"",B=(new Date).getTime(),N=[],R=F,D="string"==typeof R,j=[].slice.call(arguments,1),I=W.requestAnimationFrame||W.mozRequestAnimationFrame||W.webkitRequestAnimationFrame||W.msRequestAnimationFrame||function(e){setTimeout(e,0)};return e.each(function(){var e,o,s,t,r,c,l=V.isPlainObject(F)?V.extend(!0,{},V.fn.flyout.settings,F):V.extend({},V.fn.flyout.settings),i=l.selector,a=l.className,n=l.namespace,u=l.fields,d=l.regExp,f=l.error,h="."+n,p="module-"+n,g=V(this),m=[W,q].indexOf(l.context)<0?V(q).find(l.context):L,v=(g.find(i.close),g.children(i.flyout)),b=m.children(i.pusher),y=this,x=g.hasClass(n)?g.data(p):Q,k=!1,C=m[0]===L[0],T="",A="",S=!1,w={initialize:function(){var s;w.debug("Initializing flyout",F),g.hasClass(n)||(w.create.flyout(),V.isFunction(l.onHidden)||(l.onHidden=function(){w.destroy(),g.remove()})),g.addClass(l.class),""!==l.title&&g.find(i.header).html(w.helpers.escape(l.title,l.preserveHTML)).addClass(l.classTitle),""!==l.content&&g.find(i.content).html(w.helpers.escape(l.content,l.preserveHTML)).addClass(l.classContent),w.has.configActions()&&(0===(s=g.find(i.actions).addClass(l.classActions)).length?s=V("<div/>",{class:a.actions+" "+(l.classActions||"")}).appendTo(g):s.empty(),l.actions.forEach(function(e){var t=e[u.icon]?'<i class="'+w.helpers.deQuote(e[u.icon])+' icon"></i>':"",n=w.helpers.escape(e[u.text]||"",l.preserveHTML),i=w.helpers.deQuote(e[u.class]||""),o=e[u.click]&&V.isFunction(e[u.click])?e[u.click]:function(){};s.append(V("<button/>",{html:t+n,class:a.button+" "+i,click:function(){!1!==o.call(y,g)&&w.hide()}}))})),w.create.id(),c=w.get.transitionEvent(),l.delaySetup?I(w.setup.layout):w.setup.layout(),I(function(){w.setup.cache()}),"left"!=w.get.direction()&&"right"!=w.get.direction()||(w.setup.heights(),w.bind.resize()),w.instantiate(),l.autoShow&&w.show()},instantiate:function(){w.verbose("Storing instance of module",w),x=w,g.data(p,x)},create:{flyout:function(){w.verbose("Programmaticaly create flyout",m),g=V("<div/>",{class:a.flyout}),l.closeIcon&&(e=V("<i/>",{class:a.close}),g.append(e)),""!==l.title&&V("<div/>",{class:a.header}).appendTo(g),""!==l.content&&V("<div/>",{class:a.content}).appendTo(g),w.has.configActions()&&V("<div/>",{class:a.actions}).appendTo(g),m.append(g)},id:function(){t=(Math.random().toString(16)+"000000000").substr(2,8),s="."+t,w.verbose("Creating unique id for element",t)}},destroy:function(){w.verbose("Destroying previous module for",g),g.off(h).removeData(p),w.is.ios()&&w.remove.ios(),m.off(s),E.off(s),M.off(s)},event:{resize:function(){w.setup.heights()},clickaway:function(e){var t;l.closable&&(t=0<b.find(e.target).length||b.is(e.target),e=m.is(e.target),t&&(w.verbose("User clicked on dimmed page"),w.hide()),e&&(w.verbose("User clicked on dimmable context (scaled out page)"),w.hide()))},close:function(e){w.hide()},approve:function(e){k||!1===l.onApprove.call(w.element,V(this))?w.verbose("Approve callback returned false cancelling close"):(k=!0,w.hide(function(){k=!1}))},deny:function(e){k||!1===l.onDeny.call(w.element,V(this))?w.verbose("Deny callback returned false cancelling close"):(k=!0,w.hide(function(){k=!1}))},touch:function(e){},containScroll:function(e){y.scrollTop<=0&&(y.scrollTop=1),y.scrollTop+y.offsetHeight>=y.scrollHeight&&(y.scrollTop=y.scrollHeight-y.offsetHeight-1)},scroll:function(e){0===V(e.target).closest(i.flyout).length&&e.preventDefault()}},bind:{resize:function(){w.verbose("Adding resize event to window",E),E.on("resize"+s,w.event.resize)},clickaway:function(){w.verbose("Adding clickaway events to context",m),m.on("click"+s,w.event.clickaway).on("touchend"+s,w.event.clickaway),g.on("click"+s,l.selector.close,w.event.close),g.on("click"+s,l.selector.approve,w.event.approve),g.on("click"+s,l.selector.deny,w.event.deny)},scrollLock:function(){l.scrollLock&&(w.debug("Disabling page scroll"),(S=w.has.scrollbar())&&(w.save.bodyMargin(),w.set.bodyMargin()),m.addClass(a.locked)),w.verbose("Adding events to contain flyout scroll"),M.on("touchmove"+s,w.event.touch),g.on("scroll"+h,w.event.containScroll)}},unbind:{clickaway:function(){w.verbose("Removing clickaway events from context",m),m.off(s)},scrollLock:function(){w.verbose("Removing scroll lock from page"),S&&w.restore.bodyMargin(),m.removeClass(a.locked),M.off(s),g.off("scroll"+h)}},add:{inlineCSS:function(){var e=w.cache.width||g.outerWidth(),t=w.cache.height||g.outerHeight(),n=w.is.rtl(),i=w.get.direction(),t={left:e,right:-e,top:t,bottom:-t};n&&(w.verbose("RTL detected, flipping widths"),t.left=-e,t.right=e),n="<style>","left"===i||"right"===i?(w.debug("Adding CSS rules for animation distance",e),n+=" .ui.visible."+i+".flyout ~ .fixed, .ui.visible."+i+".flyout ~ .pusher { -webkit-transform: translate3d("+t[i]+"px, 0, 0); transform: translate3d("+t[i]+"px, 0, 0); }"):"top"!==i&&"bottom"!=i||(n+=" .ui.visible."+i+".flyout ~ .fixed, .ui.visible."+i+".flyout ~ .pusher { -webkit-transform: translate3d(0, "+t[i]+"px, 0); transform: translate3d(0, "+t[i]+"px, 0); }"),w.is.ie()&&("left"===i||"right"===i?(w.debug("Adding CSS rules for animation distance",e),n+=" body.pushable > .ui.visible."+i+".flyout ~ .pusher:after { -webkit-transform: translate3d("+t[i]+"px, 0, 0); transform: translate3d("+t[i]+"px, 0, 0); }"):"top"!==i&&"bottom"!=i||(n+=" body.pushable > .ui.visible."+i+".flyout ~ .pusher:after { -webkit-transform: translate3d(0, "+t[i]+"px, 0); transform: translate3d(0, "+t[i]+"px, 0); }"),n+=" body.pushable > .ui.visible.left.flyout ~ .ui.visible.right.flyout ~ .pusher:after, body.pushable > .ui.visible.right.flyout ~ .ui.visible.left.flyout ~ .pusher:after { -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); }"),o=V(n+="</style>").appendTo(P),w.debug("Adding sizing css to head",o)}},refresh:function(){w.verbose("Refreshing selector cache"),m=[W,q].indexOf(l.context)<0?V(q).find(l.context):V(l.context),v=m.children(i.flyout),b=m.children(i.pusher),w.clear.cache()},refreshFlyouts:function(){w.verbose("Refreshing other flyouts"),v=m.children(i.flyout)},repaint:function(){w.verbose("Forcing repaint event"),y.style.display="none",y.scrollTop=y.scrollTop,y.style.display=""},setup:{cache:function(){w.cache={width:g.outerWidth(),height:g.outerHeight()}},layout:function(){0===m.children(i.pusher).length&&(w.debug("Adding wrapper element for flyout"),w.error(f.pusher),b=V('<div class="pusher" />'),m.children().not(i.omitted).not(v).wrapAll(b),w.refresh()),0!==g.nextAll(i.pusher).length&&g.nextAll(i.pusher)[0]===b[0]||(w.debug("Moved flyout to correct parent element"),w.error(f.movedFlyout,y),g.detach().prependTo(m),w.refresh()),w.is.mobile()&&g.addClass(a.fullscreen),w.clear.cache(),w.set.pushable(),w.set.direction()},heights:function(){w.debug("Setting up heights",g);var e=g.children(i.header),t=g.children(i.content),n=g.children(i.actions);t.css("min-height",m.height()-e.outerHeight()-n.outerHeight()+"px")}},attachEvents:function(e,t){var n=V(e);t=V.isFunction(w[t])?w[t]:w.toggle,0<n.length?(w.debug("Attaching flyout events to element",e,t),n.on("click"+h,t)):w.error(f.notFound,e)},show:function(e){e=V.isFunction(e)?e:function(){},w.is.hidden()?(w.refreshFlyouts(),w.refresh(),w.othersActive()&&(w.debug("Other flyouts currently visible"),l.exclusive?w.hideOthers():k=!1),w.pushPage(function(){e.call(y),l.onShow.call(y)}),l.onChange.call(y),l.onVisible.call(y)):w.debug("Flyout is already visible")},hide:function(e){if(e=V.isFunction(e)?e:function(){},!1===l.onHide.call(y,V(this)))return w.verbose("Hide callback returned false cancelling hide"),k=!1;(w.is.visible()||w.is.animating())&&(w.debug("Hiding flyout",e),w.refreshFlyouts(),w.pullPage(function(){e.call(y),V.isFunction(l.onHidden)&&l.onHidden.call(y)}),l.onChange.call(y))},othersAnimating:function(){return 0<v.not(g).filter("."+a.animating).length},othersVisible:function(){return 0<v.not(g).filter("."+a.visible).length},othersActive:function(){return w.othersVisible()||w.othersAnimating()},hideOthers:function(e){var t=v.not(g).filter("."+a.visible),n=t.length,i=0;e=e||function(){},t.flyout("hide",function(){++i==n&&e()})},toggle:function(){w.verbose("Determining toggled direction"),w.is.hidden()?w.show():w.hide()},pushPage:function(t){var e,n,i;t=V.isFunction(t)?t:function(){},w.set.overlay(),w.repaint(),l.returnScroll&&(r=(C?E:m).scrollTop()),w.bind.scrollLock(),e=function(){w.bind.clickaway(),w.add.inlineCSS(),w.set.animating(),w.set.visible()},n=function(){w.set.dimmed()},i=function(e){e.target==g[0]&&(g.off(c+s,i),w.remove.animating(),t.call(y))},g.off(c+s),g.on(c+s,i),I(e),l.dimPage&&!w.othersVisible()&&I(n)},pullPage:function(t){var e,n;t=V.isFunction(t)?t:function(){},w.verbose("Removing context push state",w.get.direction()),w.unbind.clickaway(),w.othersActive()||w.unbind.scrollLock(),e=function(){w.set.overlay(),w.set.animating(),w.remove.visible()},n=function(e){e.target==g[0]&&(g.off(c+s,n),w.remove.animating(),w.remove.overlay(),w.remove.inlineCSS(),l.returnScroll&&w.scrollBack(),l.dimPage&&!w.othersVisible()&&b.removeClass(a.dimmed),t.call(y))},g.off(c+s),g.on(c+s,n),I(e)},scrollToTop:function(){w.verbose("Scrolling to top of page to avoid animation issues"),g.scrollTop(0),(C?E:m)[0].scrollTo(0,0)},scrollBack:function(){w.verbose("Scrolling back to original page position"),(C?E:m)[0].scrollTo(0,r)},clear:{cache:function(){w.verbose("Clearing cached dimensions"),w.cache={}}},set:{bodyMargin:function(){var n=w.can.leftBodyScrollbar()?"left":"right";m.css((C?"margin-":"padding-")+n,A+"px"),m.find(i.bodyFixed.replace("right",n)).each(function(){var e=V(this),t="fixed"===e.css("position")?"padding-"+n:n;e.css(t,"calc("+e.css(t)+" + "+A+"px)")})},ios:function(){O.addClass(a.ios)},pushed:function(){m.addClass(a.pushed)},pushable:function(){m.addClass(a.pushable)},dimmed:function(){b.addClass(a.dimmed)},active:function(){g.addClass(a.active)},animating:function(){g.addClass(a.animating)},direction:function(e){e=e||w.get.direction(),g.addClass(a[e])},visible:function(){g.addClass(a.visible)},overlay:function(){g.addClass(a.overlay)}},remove:{inlineCSS:function(){w.debug("Removing inline css styles",o),o&&0<o.length&&o.remove()},ios:function(){O.removeClass(a.ios)},pushed:function(){m.removeClass(a.pushed)},pushable:function(){m.removeClass(a.pushable)},active:function(){g.removeClass(a.active)},animating:function(){g.removeClass(a.animating)},direction:function(e){e=e||w.get.direction(),g.removeClass(a[e])},visible:function(){g.removeClass(a.visible)},overlay:function(){g.removeClass(a.overlay)}},get:{direction:function(){return g.hasClass(a.top)?a.top:g.hasClass(a.right)?a.right:g.hasClass(a.bottom)?a.bottom:a.left},transitionEvent:function(){var e,t=q.createElement("element"),n={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(e in n)if(t.style[e]!==Q)return n[e]},settings:function(){return l}},can:{leftBodyScrollbar:function(){return w.cache.leftBodyScrollbar===Q&&(w.cache.leftBodyScrollbar=w.is.rtl()&&(w.is.iframe&&!w.is.firefox()||w.is.safari()||w.is.edge()||w.is.ie())),w.cache.leftBodyScrollbar}},save:{bodyMargin:function(){T=m.css((C?"margin-":"padding-")+(w.can.leftBodyScrollbar()?"left":"right"));var e=parseInt(T.replace(/[^\d.]/g,"")),t=C?W.innerWidth-q.documentElement.clientWidth:m[0].offsetWidth-m[0].clientWidth;A=e+t}},is:{safari:function(){return w.cache.isSafari===Q&&(w.cache.isSafari=/constructor/i.test(W.HTMLElement)||!!W.ApplePaySession),w.cache.isSafari},edge:function(){return w.cache.isEdge===Q&&(w.cache.isEdge=!!W.setImmediate&&!w.is.ie()),w.cache.isEdge},firefox:function(){return w.cache.isFirefox===Q&&(w.cache.isFirefox=!!W.InstallTrigger),w.cache.isFirefox},iframe:function(){return!(self===top)},ie:function(){var e,t;return w.cache.isIE===Q&&(e=!W.ActiveXObject&&"ActiveXObject"in W,t="ActiveXObject"in W,w.cache.isIE=e||t),w.cache.isIE},ios:function(){var e=navigator.userAgent,t=e.match(d.ios),n=e.match(d.mobileChrome);return!(!t||n)&&(w.verbose("Browser was found to be iOS",e),!0)},mobile:function(){var e=navigator.userAgent;return e.match(d.mobile)?(w.verbose("Browser was found to be mobile",e),!0):(w.verbose("Browser is not mobile, using regular transition",e),!1)},hidden:function(){return!w.is.visible()},visible:function(){return g.hasClass(a.visible)},animating:function(){return m.hasClass(a.animating)},rtl:function(){return w.cache.isRTL===Q&&(w.cache.isRTL="rtl"===g.attr("dir")||"rtl"===g.css("direction")||"rtl"===L.attr("dir")||"rtl"===L.css("direction")||"rtl"===m.attr("dir")||"rtl"===m.css("direction")),w.cache.isRTL}},has:{configActions:function(){return Array.isArray(l.actions)&&0<l.actions.length},scrollbar:function(){return C||"hidden"!==m.css("overflow-y")}},restore:{bodyMargin:function(){var n=w.can.leftBodyScrollbar()?"left":"right";m.css((C?"margin-":"padding-")+n,T),m.find(i.bodyFixed.replace("right",n)).each(function(){var e=V(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(/&(?![a-z0-9#]{1,6};)/,"&")).replace(/[<>"'`]/g,function(e){return n[e]}):e}},setting:function(e,t){if(w.debug("Changing setting",e,t),V.isPlainObject(e))V.extend(!0,l,e);else{if(t===Q)return l[e];V.isPlainObject(l[e])?V.extend(!0,l[e],t):l[e]=t}},internal:function(e,t){if(V.isPlainObject(e))V.extend(!0,w,e);else{if(t===Q)return w[e];w[e]=t}},debug:function(){!l.silent&&l.debug&&(l.performance?w.performance.log(arguments):(w.debug=Function.prototype.bind.call(console.info,console,l.name+":"),w.debug.apply(console,arguments)))},verbose:function(){!l.silent&&l.verbose&&l.debug&&(l.performance?w.performance.log(arguments):(w.verbose=Function.prototype.bind.call(console.info,console,l.name+":"),w.verbose.apply(console,arguments)))},error:function(){l.silent||(w.error=Function.prototype.bind.call(console.error,console,l.name+":"),w.error.apply(console,arguments))},performance:{log:function(e){var t,n;l.performance&&(n=(t=(new Date).getTime())-(B||t),B=t,N.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:y,"Execution Time":n})),clearTimeout(w.performance.timer),w.performance.timer=setTimeout(w.performance.display,500)},display:function(){var e=l.name+":",n=0;B=!1,clearTimeout(w.performance.timer),V.each(N,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",z&&(e+=" '"+z+"'"),(console.group!==Q||console.table!==Q)&&0<N.length&&(console.groupCollapsed(e),console.table?console.table(N):V.each(N,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),N=[]}},invoke:function(i,e,t){var o,s,n,r=x;return e=e||j,t=y||t,"string"==typeof i&&r!==Q&&(i=i.split(/[\. ]/),o=i.length-1,V.each(i,function(e,t){var n=e!=o?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(V.isPlainObject(r[n])&&e!=o)r=r[n];else{if(r[n]!==Q)return s=r[n],!1;{if(!V.isPlainObject(r[t])||e==o)return r[t]!==Q?s=r[t]:w.error(f.method,i),!1;r=r[t]}}})),V.isFunction(s)?n=s.apply(t,e):s!==Q&&(n=s),Array.isArray(H)?H.push(n):H!==Q?H=[H,n]:n!==Q&&(H=n),s}};D?(x===Q&&(V.isFunction(l.templates[R])&&(l.autoShow=!0,l.className.flyout=l.className.template,l=V.extend(!0,{},l,l.templates[R].apply(w,j)),a=l.className,n=l.namespace,u=l.fields,f=l.error),w.initialize()),V.isFunction(l.templates[R])||w.invoke(R)):(x!==Q&&x.invoke("destroy"),w.initialize(),H=g)}),H!==Q?H:this},V.fn.flyout.settings={name:"Flyout",namespace:"flyout",silent:!1,debug:!1,verbose:!1,performance:!0,context:"body",exclusive:!1,closable:!0,dimPage:!0,scrollLock:!1,returnScroll:!1,delaySetup:!1,autoShow:!1,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(){},className:{flyout:"ui flyout",close:"close icon",header:"ui header",content:"content",actions:"actions",active:"active",animating:"animating",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"}},V.fn.flyout.settings.templates={getArguments:function(e){e=[].slice.call(e);return V.isPlainObject(e[0])?V.extend({handler:function(){},content:"",title:""},e[0]):(V.isFunction(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===V(V.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(V(e).val())}},{text:e.text.cancel,class:e.className.cancel,click:function(){n.handler(null)}}]}}}}(jQuery,window,document);
|
11
|
+
!function(W,q,Q,U){"use strict";W.isFunction=W.isFunction||function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},q=void 0!==q&&q.Math==Math?q:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),W.flyout=W.fn.flyout=function(H){var E,e=W(this),M=W(q),O=W(Q),P=W("html"),L=W("head"),z=W("body"),B=e.selector||"",N=(new Date).getTime(),R=[],D=H,j="string"==typeof D,I=[].slice.call(arguments,1),V=q.requestAnimationFrame||q.mozRequestAnimationFrame||q.webkitRequestAnimationFrame||q.msRequestAnimationFrame||function(e){setTimeout(e,0)};return e.each(function(){var e,o,s,t,c,r,l=W.isPlainObject(H)?W.extend(!0,{},W.fn.flyout.settings,H):W.extend({},W.fn.flyout.settings),i=l.selector,a=l.className,n=l.namespace,u=l.fields,d=l.regExp,f=l.error,h="."+n,p="module-"+n,g=W(this),m=[q,Q].indexOf(l.context)<0?W(Q).find(l.context):z,v=(g.find(i.close),g.children(i.flyout)),b=m.children(i.pusher),y=g.hasClass("flyout"),x=this,k=y?g.data(p):U,C=!1,S=m[0]===z[0],A="",w="",T=!1,F={initialize:function(){var s;F.debug("Initializing flyout",H),y||(F.create.flyout(),W.isFunction(l.onHidden)||(l.onHidden=function(){F.destroy(),g.remove()}),l.autoShow||(l.autoShow=!0)),g.addClass(l.class),""!==l.title&&g.find(i.header).html(F.helpers.escape(l.title,l.preserveHTML)).addClass(l.classTitle),""!==l.content&&g.find(i.content).html(F.helpers.escape(l.content,l.preserveHTML)).addClass(l.classContent),F.has.configActions()&&(0===(s=g.find(i.actions).addClass(l.classActions)).length?s=W("<div/>",{class:a.actions+" "+(l.classActions||"")}).appendTo(g):s.empty(),l.actions.forEach(function(e){var t=e[u.icon]?'<i class="'+F.helpers.deQuote(e[u.icon])+' icon"></i>':"",n=F.helpers.escape(e[u.text]||"",l.preserveHTML),i=F.helpers.deQuote(e[u.class]||""),o=e[u.click]&&W.isFunction(e[u.click])?e[u.click]:function(){};s.append(W("<button/>",{html:t+n,class:a.button+" "+i,click:function(){!1!==o.call(x,g)&&F.hide()}}))})),F.create.id(),r=F.get.transitionEvent(),l.delaySetup?V(F.setup.layout):F.setup.layout(),V(function(){F.setup.cache()}),"left"!=F.get.direction()&&"right"!=F.get.direction()||(F.setup.heights(),F.bind.resize()),F.instantiate(),l.autoShow&&F.show()},instantiate:function(){F.verbose("Storing instance of module",F),k=F,g.data(p,k)},create:{flyout:function(){F.verbose("Programmaticaly create flyout",m),g=W("<div/>",{class:a.flyout}),l.closeIcon&&(e=W("<i/>",{class:a.close}),g.append(e)),""!==l.title&&W("<div/>",{class:a.header}).appendTo(g),""!==l.content&&W("<div/>",{class:a.content}).appendTo(g),F.has.configActions()&&W("<div/>",{class:a.actions}).appendTo(g),m.append(g)},id:function(){t=(Math.random().toString(16)+"000000000").substr(2,8),s="."+t,F.verbose("Creating unique id for element",t)}},destroy:function(){F.verbose("Destroying previous module for",g),g.off(h).removeData(p),F.is.ios()&&F.remove.ios(),m.off(s),M.off(s),O.off(s)},event:{resize:function(){F.setup.heights()},clickaway:function(e){var t;l.closable&&(t=0<b.find(e.target).length||b.is(e.target),e=m.is(e.target),t&&(F.verbose("User clicked on dimmed page"),F.hide()),e&&(F.verbose("User clicked on dimmable context (scaled out page)"),F.hide()))},close:function(e){F.hide()},approve:function(e){C||!1===l.onApprove.call(F.element,W(this))?F.verbose("Approve callback returned false cancelling close"):(C=!0,F.hide(function(){C=!1}))},deny:function(e){C||!1===l.onDeny.call(F.element,W(this))?F.verbose("Deny callback returned false cancelling close"):(C=!0,F.hide(function(){C=!1}))},touch:function(e){},containScroll:function(e){x.scrollTop<=0&&(x.scrollTop=1),x.scrollTop+x.offsetHeight>=x.scrollHeight&&(x.scrollTop=x.scrollHeight-x.offsetHeight-1)},scroll:function(e){0===W(e.target).closest(i.flyout).length&&e.preventDefault()}},bind:{resize:function(){F.verbose("Adding resize event to window",M),M.on("resize"+s,F.event.resize)},clickaway:function(){F.verbose("Adding clickaway events to context",m),m.on("click"+s,F.event.clickaway).on("touchend"+s,F.event.clickaway),g.on("click"+s,l.selector.close,F.event.close),g.on("click"+s,l.selector.approve,F.event.approve),g.on("click"+s,l.selector.deny,F.event.deny)},scrollLock:function(){l.scrollLock&&(F.debug("Disabling page scroll"),(T=F.has.scrollbar())&&(F.save.bodyMargin(),F.set.bodyMargin()),m.addClass(a.locked)),F.verbose("Adding events to contain flyout scroll"),O.on("touchmove"+s,F.event.touch),g.on("scroll"+h,F.event.containScroll)}},unbind:{clickaway:function(){F.verbose("Removing clickaway events from context",m),m.off(s)},scrollLock:function(){F.verbose("Removing scroll lock from page"),T&&F.restore.bodyMargin(),m.removeClass(a.locked),O.off(s),g.off("scroll"+h)}},add:{inlineCSS:function(){var e=F.cache.width||g.outerWidth(),t=F.cache.height||g.outerHeight(),n=F.is.rtl(),i=F.get.direction(),t={left:e,right:-e,top:t,bottom:-t};n&&(F.verbose("RTL detected, flipping widths"),t.left=-e,t.right=e),n="<style>","left"===i||"right"===i?(F.debug("Adding CSS rules for animation distance",e),n+=" .ui.visible."+i+".flyout ~ .fixed, .ui.visible."+i+".flyout ~ .pusher { -webkit-transform: translate3d("+t[i]+"px, 0, 0); transform: translate3d("+t[i]+"px, 0, 0); }"):"top"!==i&&"bottom"!=i||(n+=" .ui.visible."+i+".flyout ~ .fixed, .ui.visible."+i+".flyout ~ .pusher { -webkit-transform: translate3d(0, "+t[i]+"px, 0); transform: translate3d(0, "+t[i]+"px, 0); }"),F.is.ie()&&("left"===i||"right"===i?(F.debug("Adding CSS rules for animation distance",e),n+=" body.pushable > .ui.visible."+i+".flyout ~ .pusher:after { -webkit-transform: translate3d("+t[i]+"px, 0, 0); transform: translate3d("+t[i]+"px, 0, 0); }"):"top"!==i&&"bottom"!=i||(n+=" body.pushable > .ui.visible."+i+".flyout ~ .pusher:after { -webkit-transform: translate3d(0, "+t[i]+"px, 0); transform: translate3d(0, "+t[i]+"px, 0); }"),n+=" body.pushable > .ui.visible.left.flyout ~ .ui.visible.right.flyout ~ .pusher:after, body.pushable > .ui.visible.right.flyout ~ .ui.visible.left.flyout ~ .pusher:after { -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); }"),o=W(n+="</style>").appendTo(L),F.debug("Adding sizing css to head",o)}},refresh:function(){F.verbose("Refreshing selector cache"),m=[q,Q].indexOf(l.context)<0?W(Q).find(l.context):W(l.context),v=m.children(i.flyout),b=m.children(i.pusher),F.clear.cache()},refreshFlyouts:function(){F.verbose("Refreshing other flyouts"),v=m.children(i.flyout)},setup:{cache:function(){F.cache={width:g.outerWidth(),height:g.outerHeight()}},layout:function(){0===m.children(i.pusher).length&&(F.debug("Adding wrapper element for flyout"),F.error(f.pusher),b=W('<div class="pusher" />'),m.children().not(i.omitted).not(v).wrapAll(b),F.refresh()),0!==g.nextAll(i.pusher).length&&g.nextAll(i.pusher)[0]===b[0]||(F.debug("Moved flyout to correct parent element"),F.error(f.movedFlyout,x),g.detach().prependTo(m),F.refresh()),F.is.mobile()&&g.addClass(a.fullscreen),F.clear.cache(),F.set.pushable(),F.set.direction()},heights:function(){F.debug("Setting up heights",g);var e=g.children(i.header),t=g.children(i.content),n=g.children(i.actions);t.css("min-height",m.height()-e.outerHeight()-n.outerHeight()+"px")}},attachEvents:function(e,t){var n=W(e);t=W.isFunction(F[t])?F[t]:F.toggle,0<n.length?(F.debug("Attaching flyout events to element",e,t),n.on("click"+h,t)):F.error(f.notFound,e)},show:function(e){e=W.isFunction(e)?e:function(){},F.is.hidden()?(F.refreshFlyouts(),F.refresh(),F.othersActive()&&(F.debug("Other flyouts currently visible"),l.exclusive?F.hideOthers():C=!1),F.pushPage(function(){e.call(x),l.onShow.call(x)}),l.onChange.call(x),l.onVisible.call(x)):F.debug("Flyout is already visible")},hide:function(e){if(e=W.isFunction(e)?e:function(){},!1===l.onHide.call(x,W(this)))return F.verbose("Hide callback returned false cancelling hide"),C=!1;(F.is.visible()||F.is.animating())&&(F.debug("Hiding flyout",e),F.refreshFlyouts(),F.pullPage(function(){e.call(x),W.isFunction(l.onHidden)&&l.onHidden.call(x)}),l.onChange.call(x))},othersAnimating:function(){return 0<v.not(g).filter("."+a.animating).length},othersVisible:function(){return 0<v.not(g).filter("."+a.visible).length},othersActive:function(){return F.othersVisible()||F.othersAnimating()},hideOthers:function(e){var t=v.not(g).filter("."+a.visible),n=t.length,i=0;e=e||function(){},t.flyout("hide",function(){++i==n&&e()})},toggle:function(){F.verbose("Determining toggled direction"),F.is.hidden()?F.show():F.hide()},pushPage:function(t){var e,n,i;t=W.isFunction(t)?t:function(){},F.set.overlay(),l.returnScroll&&(c=(S?M:m).scrollTop()),F.bind.scrollLock(),e=function(){F.bind.clickaway(),F.add.inlineCSS(),F.set.animating(),F.set.visible()},n=function(){F.set.dimmed()},i=function(e){e.target==g[0]&&(g.off(r+s,i),F.remove.animating(),t.call(x))},g.off(r+s),g.on(r+s,i),V(e),l.dimPage&&!F.othersVisible()&&V(n)},pullPage:function(t){var e,n;t=W.isFunction(t)?t:function(){},F.verbose("Removing context push state",F.get.direction()),F.unbind.clickaway(),F.othersActive()||F.unbind.scrollLock(),e=function(){F.set.overlay(),F.set.animating(),F.remove.visible()},n=function(e){e.target==g[0]&&(g.off(r+s,n),F.remove.animating(),F.remove.overlay(),F.remove.inlineCSS(),l.returnScroll&&F.scrollBack(),l.dimPage&&!F.othersVisible()&&b.removeClass(a.dimmed),t.call(x))},g.off(r+s),g.on(r+s,n),V(e)},scrollToTop:function(){F.verbose("Scrolling to top of page to avoid animation issues"),g.scrollTop(0),(S?M:m)[0].scrollTo(0,0)},scrollBack:function(){F.verbose("Scrolling back to original page position"),(S?M:m)[0].scrollTo(0,c)},clear:{cache:function(){F.verbose("Clearing cached dimensions"),F.cache={}}},set:{bodyMargin:function(){var n=F.can.leftBodyScrollbar()?"left":"right";m.css((S?"margin-":"padding-")+n,w+"px"),m.find(i.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)+" + "+w+"px)")})},ios:function(){P.addClass(a.ios)},pushed:function(){m.addClass(a.pushed)},pushable:function(){m.addClass(a.pushable)},dimmed:function(){b.addClass(a.dimmed)},active:function(){g.addClass(a.active)},animating:function(){g.addClass(a.animating)},direction:function(e){e=e||F.get.direction(),g.addClass(a[e])},visible:function(){g.addClass(a.visible)},overlay:function(){g.addClass(a.overlay)}},remove:{inlineCSS:function(){F.debug("Removing inline css styles",o),o&&0<o.length&&o.remove()},ios:function(){P.removeClass(a.ios)},pushed:function(){m.removeClass(a.pushed)},pushable:function(){m.removeClass(a.pushable)},active:function(){g.removeClass(a.active)},animating:function(){g.removeClass(a.animating)},direction:function(e){e=e||F.get.direction(),g.removeClass(a[e])},visible:function(){g.removeClass(a.visible)},overlay:function(){g.removeClass(a.overlay)}},get:{direction:function(){return g.hasClass(a.top)?a.top:g.hasClass(a.right)?a.right:g.hasClass(a.bottom)?a.bottom:a.left},transitionEvent:function(){var e,t=Q.createElement("element"),n={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(e in n)if(t.style[e]!==U)return n[e]},settings:function(){return l}},can:{leftBodyScrollbar:function(){return F.cache.leftBodyScrollbar===U&&(F.cache.leftBodyScrollbar=F.is.rtl()&&(F.is.iframe&&!F.is.firefox()||F.is.safari()||F.is.edge()||F.is.ie())),F.cache.leftBodyScrollbar}},save:{bodyMargin:function(){A=m.css((S?"margin-":"padding-")+(F.can.leftBodyScrollbar()?"left":"right"));var e=parseInt(A.replace(/[^\d.]/g,"")),t=S?q.innerWidth-Q.documentElement.clientWidth:m[0].offsetWidth-m[0].clientWidth;w=e+t}},is:{safari:function(){return F.cache.isSafari===U&&(F.cache.isSafari=/constructor/i.test(q.HTMLElement)||!!q.ApplePaySession),F.cache.isSafari},edge:function(){return F.cache.isEdge===U&&(F.cache.isEdge=!!q.setImmediate&&!F.is.ie()),F.cache.isEdge},firefox:function(){return F.cache.isFirefox===U&&(F.cache.isFirefox=!!q.InstallTrigger),F.cache.isFirefox},iframe:function(){return!(self===top)},ie:function(){var e,t;return F.cache.isIE===U&&(e=!q.ActiveXObject&&"ActiveXObject"in q,t="ActiveXObject"in q,F.cache.isIE=e||t),F.cache.isIE},ios:function(){var e=navigator.userAgent,t=e.match(d.ios),n=e.match(d.mobileChrome);return!(!t||n)&&(F.verbose("Browser was found to be iOS",e),!0)},mobile:function(){var e=navigator.userAgent;return e.match(d.mobile)?(F.verbose("Browser was found to be mobile",e),!0):(F.verbose("Browser is not mobile, using regular transition",e),!1)},hidden:function(){return!F.is.visible()},visible:function(){return g.hasClass(a.visible)},animating:function(){return m.hasClass(a.animating)},rtl:function(){return F.cache.isRTL===U&&(F.cache.isRTL="rtl"===g.attr("dir")||"rtl"===g.css("direction")||"rtl"===z.attr("dir")||"rtl"===z.css("direction")||"rtl"===m.attr("dir")||"rtl"===m.css("direction")),F.cache.isRTL}},has:{configActions:function(){return Array.isArray(l.actions)&&0<l.actions.length},scrollbar:function(){return S||"hidden"!==m.css("overflow-y")}},restore:{bodyMargin:function(){var n=F.can.leftBodyScrollbar()?"left":"right";m.css((S?"margin-":"padding-")+n,A),m.find(i.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(/&(?![a-z0-9#]{1,6};)/,"&")).replace(/[<>"'`]/g,function(e){return n[e]}):e}},setting:function(e,t){if(F.debug("Changing setting",e,t),W.isPlainObject(e))W.extend(!0,l,e);else{if(t===U)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,F,e);else{if(t===U)return F[e];F[e]=t}},debug:function(){!l.silent&&l.debug&&(l.performance?F.performance.log(arguments):(F.debug=Function.prototype.bind.call(console.info,console,l.name+":"),F.debug.apply(console,arguments)))},verbose:function(){!l.silent&&l.verbose&&l.debug&&(l.performance?F.performance.log(arguments):(F.verbose=Function.prototype.bind.call(console.info,console,l.name+":"),F.verbose.apply(console,arguments)))},error:function(){l.silent||(F.error=Function.prototype.bind.call(console.error,console,l.name+":"),F.error.apply(console,arguments))},performance:{log:function(e){var t,n;l.performance&&(n=(t=(new Date).getTime())-(N||t),N=t,R.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:x,"Execution Time":n})),clearTimeout(F.performance.timer),F.performance.timer=setTimeout(F.performance.display,500)},display:function(){var e=l.name+":",n=0;N=!1,clearTimeout(F.performance.timer),W.each(R,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",B&&(e+=" '"+B+"'"),(console.group!==U||console.table!==U)&&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,c=k;return e=e||I,t=x||t,"string"==typeof i&&c!==U&&(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(c[n])&&e!=o)c=c[n];else{if(c[n]!==U)return s=c[n],!1;{if(!W.isPlainObject(c[t])||e==o)return c[t]!==U?s=c[t]:F.error(f.method,i),!1;c=c[t]}}})),W.isFunction(s)?n=s.apply(t,e):s!==U&&(n=s),Array.isArray(E)?E.push(n):E!==U?E=[E,n]:n!==U&&(E=n),s}};j?(k===U&&(W.isFunction(l.templates[D])&&(l.autoShow=!0,l.className.flyout=l.className.template,l=W.extend(!0,{},l,l.templates[D].apply(F,I)),a=l.className,l.namespace,u=l.fields,f=l.error),F.initialize()),W.isFunction(l.templates[D])||F.invoke(D)):(k!==U&&k.invoke("destroy"),F.initialize(),E=g)}),E!==U?E:this},W.fn.flyout.settings={name:"Flyout",namespace:"flyout",silent:!1,debug:!1,verbose:!1,performance:!0,context:"body",exclusive:!1,closable:!0,dimPage:!0,scrollLock:!1,returnScroll:!1,delaySetup:!1,autoShow:!1,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(){},className:{flyout:"ui flyout",close:"close icon",header:"ui header",content:"content",actions:"actions",active:"active",animating:"animating",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"}},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]):(W.isFunction(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
package/dist/components/form.js
CHANGED
package/dist/components/grid.css
CHANGED