fomantic-ui 2.9.1-beta.22 → 2.9.1-beta.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslint/index.js +23 -0
- package/.eslint/no-extra-parens-rule.js +17 -0
- package/.eslint/package.json +11 -0
- package/.eslintrc.js +13 -70
- package/.stylelintrc.js +5 -7
- package/dist/components/accordion.css +1 -1
- package/dist/components/accordion.js +26 -26
- package/dist/components/accordion.min.css +1 -1
- package/dist/components/accordion.min.js +2 -2
- package/dist/components/ad.css +1 -1
- package/dist/components/ad.min.css +1 -1
- package/dist/components/api.js +95 -94
- package/dist/components/api.min.js +2 -2
- package/dist/components/breadcrumb.css +1 -1
- package/dist/components/breadcrumb.min.css +1 -1
- package/dist/components/button.css +1 -1
- package/dist/components/button.min.css +1 -1
- package/dist/components/calendar.css +3 -3
- package/dist/components/calendar.js +181 -151
- package/dist/components/calendar.min.css +2 -2
- package/dist/components/calendar.min.js +2 -2
- package/dist/components/card.css +1 -1
- package/dist/components/card.min.css +1 -1
- package/dist/components/checkbox.css +1 -1
- package/dist/components/checkbox.js +14 -14
- package/dist/components/checkbox.min.css +1 -1
- package/dist/components/checkbox.min.js +2 -2
- package/dist/components/comment.css +1 -1
- package/dist/components/comment.min.css +1 -1
- package/dist/components/container.css +1 -1
- package/dist/components/container.min.css +1 -1
- package/dist/components/dimmer.css +1 -1
- package/dist/components/dimmer.js +23 -25
- package/dist/components/dimmer.min.css +1 -1
- package/dist/components/dimmer.min.js +2 -2
- package/dist/components/divider.css +1 -1
- package/dist/components/divider.min.css +1 -1
- package/dist/components/dropdown.css +1 -1
- package/dist/components/dropdown.js +252 -254
- package/dist/components/dropdown.min.css +1 -1
- package/dist/components/dropdown.min.js +2 -2
- package/dist/components/embed.css +1 -1
- package/dist/components/embed.js +27 -33
- package/dist/components/embed.min.css +1 -1
- package/dist/components/embed.min.js +2 -2
- package/dist/components/feed.css +1 -1
- package/dist/components/feed.min.css +1 -1
- package/dist/components/flag.css +1 -1
- package/dist/components/flag.min.css +1 -1
- package/dist/components/flyout.css +2 -2
- package/dist/components/flyout.js +50 -44
- package/dist/components/flyout.min.css +1 -1
- package/dist/components/flyout.min.js +2 -2
- package/dist/components/form.css +2 -2
- package/dist/components/form.js +187 -163
- package/dist/components/form.min.css +2 -2
- package/dist/components/form.min.js +2 -2
- package/dist/components/grid.css +1 -1
- package/dist/components/grid.min.css +1 -1
- package/dist/components/header.css +1 -1
- package/dist/components/header.min.css +1 -1
- package/dist/components/icon.css +1 -1
- package/dist/components/icon.min.css +1 -1
- package/dist/components/image.css +1 -1
- package/dist/components/image.min.css +1 -1
- package/dist/components/input.css +1 -1
- package/dist/components/input.min.css +1 -1
- package/dist/components/item.css +1 -1
- package/dist/components/item.min.css +1 -1
- package/dist/components/label.css +1 -1
- package/dist/components/label.min.css +1 -1
- package/dist/components/list.css +1 -1
- package/dist/components/list.min.css +1 -1
- package/dist/components/loader.css +1 -1
- package/dist/components/loader.min.css +1 -1
- package/dist/components/message.css +1 -1
- package/dist/components/message.min.css +1 -1
- package/dist/components/modal.css +1 -1
- package/dist/components/modal.js +49 -45
- package/dist/components/modal.min.css +1 -1
- package/dist/components/modal.min.js +2 -2
- package/dist/components/nag.css +1 -1
- package/dist/components/nag.js +22 -20
- package/dist/components/nag.min.css +1 -1
- package/dist/components/nag.min.js +2 -2
- package/dist/components/placeholder.css +1 -1
- package/dist/components/placeholder.min.css +1 -1
- package/dist/components/popup.css +1 -1
- package/dist/components/popup.js +71 -71
- package/dist/components/popup.min.css +1 -1
- package/dist/components/popup.min.js +2 -2
- package/dist/components/progress.css +1 -1
- package/dist/components/progress.js +46 -46
- package/dist/components/progress.min.css +1 -1
- package/dist/components/progress.min.js +2 -2
- package/dist/components/rail.css +1 -1
- package/dist/components/rail.min.css +1 -1
- package/dist/components/rating.css +1 -1
- package/dist/components/rating.js +15 -15
- package/dist/components/rating.min.css +1 -1
- package/dist/components/rating.min.js +2 -2
- package/dist/components/reset.css +1 -1
- package/dist/components/reset.min.css +1 -1
- package/dist/components/reveal.css +1 -1
- package/dist/components/reveal.min.css +1 -1
- package/dist/components/search.css +1 -1
- package/dist/components/search.js +69 -74
- package/dist/components/search.min.css +1 -1
- package/dist/components/search.min.js +2 -2
- package/dist/components/segment.css +1 -1
- package/dist/components/segment.min.css +1 -1
- package/dist/components/shape.css +1 -1
- package/dist/components/shape.js +39 -39
- package/dist/components/shape.min.css +1 -1
- package/dist/components/shape.min.js +2 -2
- package/dist/components/sidebar.css +1 -1
- package/dist/components/sidebar.js +39 -37
- package/dist/components/sidebar.min.css +1 -1
- package/dist/components/sidebar.min.js +2 -2
- package/dist/components/site.css +1 -1
- package/dist/components/site.js +22 -21
- package/dist/components/site.min.css +1 -1
- package/dist/components/site.min.js +2 -2
- package/dist/components/slider.js +69 -64
- package/dist/components/slider.min.js +2 -2
- package/dist/components/state.js +15 -15
- package/dist/components/state.min.js +2 -2
- package/dist/components/statistic.css +1 -1
- package/dist/components/statistic.min.css +1 -1
- package/dist/components/step.css +1 -1
- package/dist/components/step.min.css +1 -1
- package/dist/components/sticky.css +1 -1
- package/dist/components/sticky.js +25 -25
- package/dist/components/sticky.min.css +1 -1
- package/dist/components/sticky.min.js +2 -2
- package/dist/components/tab.css +1 -1
- package/dist/components/tab.js +55 -57
- 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 +57 -30
- package/dist/components/toast.min.css +1 -1
- package/dist/components/toast.min.js +2 -2
- package/dist/components/transition.css +7 -7
- package/dist/components/transition.js +45 -39
- package/dist/components/transition.min.css +1 -1
- package/dist/components/transition.min.js +2 -2
- package/dist/components/visibility.js +25 -25
- package/dist/components/visibility.min.js +2 -2
- package/dist/semantic.css +60 -60
- package/dist/semantic.js +1518 -1427
- package/dist/semantic.min.css +2 -2
- package/dist/semantic.min.js +2 -2
- package/examples/responsive.html +1 -1
- package/gulpfile.js +1 -1
- package/package.json +2 -1
- package/scripts/nightly-version.js +6 -4
- package/src/definitions/behaviors/api.js +94 -93
- package/src/definitions/behaviors/form.js +186 -162
- package/src/definitions/behaviors/state.js +14 -14
- package/src/definitions/behaviors/visibility.js +24 -24
- package/src/definitions/collections/menu.less +2 -2
- package/src/definitions/elements/button.less +2 -2
- package/src/definitions/elements/loader.less +4 -4
- package/src/definitions/elements/step.less +1 -1
- package/src/definitions/globals/site.js +21 -20
- package/src/definitions/modules/accordion.js +25 -25
- package/src/definitions/modules/calendar.js +180 -150
- package/src/definitions/modules/calendar.less +2 -2
- package/src/definitions/modules/checkbox.js +13 -13
- package/src/definitions/modules/dimmer.js +22 -24
- package/src/definitions/modules/dimmer.less +10 -10
- package/src/definitions/modules/dropdown.js +251 -253
- package/src/definitions/modules/embed.js +26 -32
- package/src/definitions/modules/flyout.js +49 -43
- package/src/definitions/modules/flyout.less +1 -1
- package/src/definitions/modules/modal.js +48 -44
- package/src/definitions/modules/nag.js +21 -19
- package/src/definitions/modules/popup.js +70 -70
- package/src/definitions/modules/progress.js +45 -45
- package/src/definitions/modules/rating.js +14 -14
- package/src/definitions/modules/search.js +68 -73
- package/src/definitions/modules/shape.js +38 -38
- package/src/definitions/modules/sidebar.js +38 -36
- package/src/definitions/modules/slider.js +68 -63
- package/src/definitions/modules/sticky.js +24 -24
- package/src/definitions/modules/tab.js +54 -56
- package/src/definitions/modules/toast.js +56 -29
- package/src/definitions/modules/transition.js +44 -38
- package/src/themes/amazon/elements/button.overrides +7 -7
- package/src/themes/default/collections/form.variables +1 -1
- package/src/themes/default/elements/reveal.variables +1 -1
- package/src/themes/default/globals/site.variables +1 -1
- package/src/themes/default/modules/dimmer.variables +6 -6
- package/src/themes/default/modules/modal.variables +1 -1
- package/src/themes/default/modules/slider.variables +4 -4
- package/src/themes/default/modules/toast.variables +2 -2
- package/src/themes/default/modules/transition.overrides +12 -12
- package/src/themes/flat/collections/form.overrides +2 -2
- package/src/themes/flat/globals/site.variables +1 -1
- package/src/themes/github/collections/form.overrides +2 -2
- package/src/themes/github/collections/menu.variables +1 -1
- package/src/themes/github/collections/message.overrides +3 -3
- package/src/themes/github/elements/input.overrides +2 -2
- package/src/themes/timeline/views/feed.overrides +3 -3
- package/src/themes/twitter/elements/button.overrides +2 -2
- package/tasks/README.md +1 -3
- package/tasks/admin/components/create.js +9 -16
- package/tasks/admin/components/init.js +7 -7
- package/tasks/admin/components/update.js +10 -10
- package/tasks/admin/distributions/create.js +16 -18
- package/tasks/admin/distributions/init.js +7 -7
- package/tasks/admin/distributions/update.js +10 -10
- package/tasks/admin/publish.js +1 -3
- package/tasks/admin/register.js +6 -6
- package/tasks/admin/release.js +1 -3
- package/tasks/build/assets.js +2 -2
- package/tasks/build/css.js +8 -3
- package/tasks/build/javascript.js +3 -1
- package/tasks/build.js +1 -1
- package/tasks/check-install.js +1 -1
- package/tasks/clean.js +1 -1
- package/tasks/collections/README.md +3 -5
- package/tasks/collections/admin.js +1 -1
- package/tasks/collections/docs.js +1 -1
- package/tasks/collections/install.js +1 -1
- package/tasks/collections/rtl.js +1 -1
- package/tasks/collections/various.js +1 -1
- package/tasks/config/admin/github.js +6 -8
- package/tasks/config/admin/templates/css-package.js +1 -1
- package/tasks/config/admin/templates/less-package.js +1 -1
- package/tasks/config/npm/gulpfile.js +7 -7
- package/tasks/config/project/config.js +14 -19
- package/tasks/config/project/install.js +35 -34
- package/tasks/config/project/release.js +15 -16
- package/tasks/config/tasks.js +18 -20
- package/tasks/config/user.js +5 -3
- package/tasks/docs/build.js +5 -3
- package/tasks/docs/metadata.js +7 -8
- package/tasks/docs/serve.js +6 -3
- package/tasks/install.js +39 -39
- package/tasks/rtl/build.js +1 -3
- package/tasks/rtl/watch.js +1 -3
- package/tasks/version.js +1 -3
- package/tasks/watch.js +1 -1
- package/test/.eslintrc.js +0 -4
- package/test/meteor/assets.js +1 -1
- package/test/modules/module.spec.js +15 -15
- package/test/modules/popup.spec.js +1 -1
- package/test/modules/search.spec.js +1 -1
- package/test/modules/tab.spec.js +1 -1
- package/test/modules/transition.spec.js +1 -1
@@ -1,5 +1,5 @@
|
|
1
1
|
/*
|
2
|
-
* # Fomantic UI - 2.9.1-beta.
|
2
|
+
* # Fomantic UI - 2.9.1-beta.24+029436f
|
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(D,E,H,z){"use strict";function S(e){return"function"==typeof e&&"number"!=typeof e.nodeType}E=void 0!==E&&E.Math==Math?E:globalThis,D.toast=D.fn.toast=function(x){var k,e=D(this),T=e.selector||"",I=(new Date).getTime(),P=[],O=x,M="string"==typeof O,A=[].slice.call(arguments,1);return e.each(function(){var t,o,a,s,i,c,l,e,r=D.isPlainObject(x)?D.extend(!0,{},D.fn.toast.settings,x):D.extend({},D.fn.toast.settings),d=r.className,u=r.selector,p=r.error,n=r.namespace,f=r.fields,g="."+n,m=n+"-module",h=D(this),b=r.context?[E,H].indexOf(r.context)<0?D(H).find(r.context):D(r.context):D("body"),v=h.hasClass("toast")||h.hasClass("message")||h.hasClass("card"),C=this,y=v?h.data(m):z,w={initialize:function(){w.verbose("Initializing element"),w.create.id(),w.has.container()||w.create.container(),(v||""!==r.message||""!==r.title||""!==w.get.iconClass()||r.showImage||w.has.configActions())&&("string"==typeof r.showProgress&&-1!==[d.top,d.bottom].indexOf(r.showProgress)||(r.showProgress=!1),w.create.toast(),r.closeOnClick&&(r.closeIcon||0<D(o).find(u.input).length||w.has.configActions())&&(r.closeOnClick=!1),r.closeOnClick||t.addClass(d.unclickable),w.bind.events()),w.instantiate(),t&&w.show()},instantiate:function(){w.verbose("Storing instance of toast"),y=w,h.data(m,y)},destroy:function(){t&&(w.debug("Removing toast",t),w.unbind.events(),t.remove(),c=o=t=z,r.onRemove.call(t,C),l=i=s=z),h.removeData(m)},show:function(e){!1===r.onShow.call(t,C)?w.debug("onShow callback returned false, cancelling toast animation"):(e=e||function(){},w.debug("Showing toast"),w.animate.show(e))},close:function(e){!1===r.onHide.call(t,C)?w.debug("onHide callback returned false, cancelling toast animation"):(e=e||function(){},w.debug("Closing toast"),w.remove.visible(),w.unbind.events(),w.animate.close(e))},create:{container:function(){w.verbose("Creating container"),b.append(D("<div/>",{class:r.position+" "+d.container+" "+(r.horizontal?d.horizontal:"")+" "+(r.context&&"body"!==r.context?d.absolute:"")}))},id:function(){e=(Math.random().toString(16)+"000000000").slice(2,10),w.verbose("Creating unique id for element",e)},toast:function(){t=D("<div/>",{class:d.box});var e,n=w.get.iconClass();v?(o=r.cloneModule?h.clone().removeAttr("id"):h,l=o.find("> i"+w.helpers.toClass(d.close)),r.closeIcon=0<l.length,""!==n&&o.find(u.icon).attr("class",n+" "+d.icon),r.showImage&&o.find(u.image).attr("src",r.showImage),""!==r.title&&o.find(u.title).html(w.helpers.escape(r.title,r.preserveHTML)),""!==r.message&&o.find(u.message).html(w.helpers.escape(r.message,r.preserveHTML))):(w.verbose("Creating toast"),o=D("<div/>",{role:"alert"}),e=D("<div/>",{class:d.content}),""!==n&&o.append(D("<i/>",{class:n+" "+d.icon})),r.showImage&&o.append(D("<img>",{class:d.image+" "+r.classImage,src:r.showImage})),""!==r.title&&(n="_"+w.get.id()+"title",o.attr("aria-labelledby",n),e.append(D("<div/>",{class:d.title,id:n,html:w.helpers.escape(r.title,r.preserveHTML)}))),n="_"+w.get.id()+"desc",o.attr("aria-describedby",n),e.append(D("<div/>",{class:d.message,id:n,html:w.helpers.escape(r.message,r.preserveHTML)})),o.addClass(r.class+" "+d.toast).append(e),o.css("opacity",String(r.opacity)),r.closeIcon&&((l=D("<i/>",{class:d.close+" "+("string"==typeof r.closeIcon?r.closeIcon:""),role:"button",tabindex:0,"aria-label":r.text.close})).hasClass(d.left)?o.prepend(l):o.append(l))),o.hasClass(d.compact)&&(r.compact=!0),o.hasClass("card")&&(r.compact=!1),a=o.find(".actions"),w.has.configActions()&&(0===a.length&&(a=D("<div/>",{class:d.actions+" "+(r.classActions||"")}).appendTo(o)),o.hasClass("card")&&!a.hasClass(d.attached)&&(a.addClass(d.extraContent),a.hasClass(d.vertical)&&(a.removeClass(d.vertical),w.error(p.verticalCard))),r.actions.forEach(function(e){var n=e[f.icon]?"<i "+(e[f.text]?'aria-hidden="true"':"")+' class="'+w.helpers.deQuote(e[f.icon])+' icon"></i>':"",t=w.helpers.escape(e[f.text]||"",r.preserveHTML),o=w.helpers.deQuote(e[f.class]||""),s=e[f.click]&&S(e[f.click])?e[f.click]:function(){};a.append(D("<button/>",{html:n+t,"aria-label":(e[f.text]||e[f.icon]||"").replace(/<[^>]+(>|$)/g,""),class:d.button+" "+o,on:{click:function(){var e=D(this);e.is(u.approve)||e.is(u.deny)||!1===s.call(C,h)||w.close()}}}))})),a&&a.hasClass(d.vertical)&&o.addClass(d.vertical),0<a.length&&!a.hasClass(d.attached)&&(!a||a.hasClass(d.basic)&&!a.hasClass(d.left)||o.addClass(d.actions)),"auto"===r.displayTime&&(r.displayTime=Math.max(r.minDisplayTime,o.text().split(" ").length/r.wordsPerMinute*6e4)),t.append(o),0<a.length&&a.hasClass(d.attached)&&(a.addClass(d.buttons),a.detach(),o.addClass(d.attached),a.hasClass(d.vertical)?(o.wrap(D("<div/>",{class:d.vertical+" "+d.attached+" "+(r.compact?d.compact:"")})),a.hasClass(d.left)?o.addClass(d.left).parent().addClass(d.left).prepend(a):o.parent().append(a)):a.hasClass(d.top)?(t.prepend(a),o.addClass(d.bottom)):(t.append(a),o.addClass(d.top))),h!==o&&(C=(h=o)[0]),0<r.displayTime&&(n=d.progressing+" "+(r.pauseOnHover?d.pausable:""),r.showProgress&&(s=D("<div/>",{class:d.progress+" "+(r.classProgress||r.class),"data-percent":""}),r.classProgress||(o.hasClass("toast")&&!o.hasClass(d.inverted)?s.addClass(d.inverted):s.removeClass(d.inverted)),i=D("<div/>",{class:"bar "+(r.progressUp?"up ":"down ")+n}),s.addClass(r.showProgress).append(i),s.hasClass(d.top)?t.prepend(s):t.append(s),i.css("animation-duration",r.displayTime/1e3+"s")),(c=D("<span/>",{class:"wait "+n})).css("animation-duration",r.displayTime/1e3+"s"),c.appendTo(o)),r.compact&&(t.addClass(d.compact),o.addClass(d.compact),s&&s.addClass(d.compact)),r.newestOnTop?t.prependTo(w.get.container()):t.appendTo(w.get.container())}},bind:{events:function(){w.debug("Binding events to toast"),r.closeIcon&&l.on("click"+g,w.event.close),o.on("click"+g,w.event.click),c&&c.on("animationend"+g,w.event.close),t.on("click"+g,u.approve,w.event.approve).on("click"+g,u.deny,w.event.deny)}},unbind:{events:function(){w.debug("Unbinding events to toast"),r.closeIcon&&l.off("click"+g),o.off("click"+g),c&&c.off("animationend"+g),t.off("click"+g)}},animate:{show:function(e){e=S(e)?e:function(){},r.transition&&w.can.useElement("transition")&&h.transition("is supported")&&(w.set.visible(),t.transition({animation:r.transition.showMethod+" in",queue:!1,debug:r.debug,verbose:r.verbose,silent:r.silent,duration:r.transition.showDuration,onComplete:function(){e.call(t,C),r.onVisible.call(t,C)}}))},close:function(e){e=S(e)?e:function(){},r.transition&&D.fn.transition!==z&&h.transition("is supported")?t.transition({animation:r.transition.hideMethod+" out",queue:!1,duration:r.transition.hideDuration,debug:r.debug,verbose:r.verbose,silent:r.silent,interval:50,onBeforeHide:function(e){e=S(e)?e:function(){},""!==r.transition.closeEasing?t&&(t.css("opacity","0"),t.wrap("<div/>").parent().hide(r.transition.closeDuration,r.transition.closeEasing,function(){t&&(t.parent().remove(),e.call(t))})):e.call(t)},onComplete:function(){e.call(t,C),r.onHidden.call(t,C),w.destroy()}}):w.error(p.noTransition)},pause:function(){c.css("animationPlayState","paused"),i&&i.css("animationPlayState","paused")},continue:function(){c.css("animationPlayState","running"),i&&i.css("animationPlayState","running")}},has:{container:function(){return w.verbose("Determining if there is already a container"),0<w.get.containers().length},toast:function(){return!!w.get.toast()},toasts:function(){return 0<w.get.toasts().length},configActions:function(){return Array.isArray(r.actions)&&0<r.actions.length}},get:{id:function(){return e},containers:function(){return b.children(w.helpers.toClass(r.position)+u.container+(r.horizontal?w.helpers.toClass(d.horizontal):":not("+w.helpers.toClass(d.horizontal)+")")+(r.context&&"body"!==r.context?w.helpers.toClass(d.absolute):":not("+w.helpers.toClass(d.absolute)+")"))},container:function(){return w.get.containers()[0]},toastBox:function(){return t||null},toast:function(){return o||null},toasts:function(){return D(w.get.container()).find(u.box)},iconClass:function(){return"string"==typeof r.showIcon?r.showIcon:r.showIcon&&r.icons[r.class]?r.icons[r.class]:""},remainingTime:function(){return c?c.css("opacity")*r.displayTime:0}},set:{visible:function(){o.addClass(d.visible)}},remove:{visible:function(){o.removeClass(d.visible)}},event:{close:function(){w.close()},click:function(e){0===D(e.target).closest(u.clickable).length&&(!1!==r.onClick.call(t,C)&&r.closeOnClick?w.close():w.verbose("Click callback returned false or close denied by setting cancelling close"))},approve:function(){!1===r.onApprove.call(C,h)?w.verbose("Approve callback returned false cancelling close"):w.close()},deny:function(){!1===r.onDeny.call(C,h)?w.verbose("Deny callback returned false cancelling close"):w.close()}},helpers:{toClass:function(e){var e=e.trim().split(/\s+/),n="";return e.forEach(function(e){n+="."+e}),n},deQuote:function(e){return String(e).replace(/"/g,"")},escape:function(e,n){if(n)return e;var t={"<":"<",">":">",'"':""","'":"'","`":"`"};return/[&<>"'`]/.test(e)?(e=e.replace(/&(?![a-z0-9#]{1,12};)/gi,"&")).replace(/[<>"'`]/g,function(e){return t[e]}):e}},can:{useElement:function(e){return D.fn[e]!==z||(w.error(p.noElement.replace("{element}",e)),!1)}},setting:function(e,n){if(w.debug("Changing setting",e,n),D.isPlainObject(e))D.extend(!0,r,e);else{if(n===z)return r[e];D.isPlainObject(r[e])?D.extend(!0,r[e],n):r[e]=n}},internal:function(e,n){if(D.isPlainObject(e))D.extend(!0,w,e);else{if(n===z)return w[e];w[e]=n}},debug:function(){!r.silent&&r.debug&&(r.performance?w.performance.log(arguments):(w.debug=Function.prototype.bind.call(console.info,console,r.name+":"),w.debug.apply(console,arguments)))},verbose:function(){!r.silent&&r.verbose&&r.debug&&(r.performance?w.performance.log(arguments):(w.verbose=Function.prototype.bind.call(console.info,console,r.name+":"),w.verbose.apply(console,arguments)))},error:function(){r.silent||(w.error=Function.prototype.bind.call(console.error,console,r.name+":"),w.error.apply(console,arguments))},performance:{log:function(e){var n,t;r.performance&&(t=(n=(new Date).getTime())-(I||n),I=n,P.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:C,"Execution Time":t})),clearTimeout(w.performance.timer),w.performance.timer=setTimeout(w.performance.display,500)},display:function(){var e=r.name+":",t=0;I=!1,clearTimeout(w.performance.timer),D.each(P,function(e,n){t+=n["Execution Time"]}),e+=" "+t+"ms",T&&(e+=" '"+T+"'"),(console.group!==z||console.table!==z)&&0<P.length&&(console.groupCollapsed(e),console.table?console.table(P):D.each(P,function(e,n){console.log(n.Name+": "+n["Execution Time"]+"ms")}),console.groupEnd()),P=[]}},invoke:function(o,e,n){var s,a,t,i=y;return e=e||A,n=n||C,"string"==typeof o&&i!==z&&(o=o.split(/[\. ]/),s=o.length-1,D.each(o,function(e,n){var t=e!=s?n+o[e+1].charAt(0).toUpperCase()+o[e+1].slice(1):o;if(D.isPlainObject(i[t])&&e!=s)i=i[t];else{if(i[t]!==z)return a=i[t],!1;{if(!D.isPlainObject(i[n])||e==s)return i[n]!==z?a=i[n]:w.error(p.method,o),!1;i=i[n]}}})),S(a)?t=a.apply(n,e):a!==z&&(t=a),Array.isArray(k)?k.push(t):k!==z?k=[k,t]:t!==z&&(k=t),a}};M?(y===z&&w.initialize(),w.invoke(O)):(y!==z&&y.invoke("destroy"),w.initialize(),k=h)}),k!==z?k:this},D.fn.toast.settings={name:"Toast",namespace:"toast",silent:!1,debug:!1,verbose:!1,performance:!0,context:"body",position:"top right",horizontal:!1,class:"neutral",classProgress:!1,classActions:!1,classImage:"mini",title:"",message:"",displayTime:3e3,minDisplayTime:1e3,wordsPerMinute:120,showIcon:!1,newestOnTop:!1,showProgress:!1,pauseOnHover:!0,progressUp:!1,opacity:1,compact:!0,closeIcon:!1,closeOnClick:!0,cloneModule:!0,actions:!1,preserveHTML:!0,showImage:!1,transition:{showMethod:"scale",showDuration:500,hideMethod:"scale",hideDuration:500,closeEasing:"easeOutCubic",closeDuration:500},error:{method:"The method you called is not defined.",noElement:"This module requires ui {element}",verticalCard:"Vertical but not attached actions are not supported for card layout"},className:{container:"ui toast-container",absolute:"absolute",box:"floating toast-box",progress:"ui attached active progress",toast:"ui toast",icon:"centered icon",visible:"visible",content:"content",title:"ui header",message:"message",actions:"actions",extraContent:"extra content",button:"ui button",buttons:"ui buttons",close:"close icon",image:"ui image",vertical:"vertical",horizontal:"horizontal",attached:"attached",inverted:"inverted",compact:"compact",pausable:"pausable",progressing:"progressing",top:"top",bottom:"bottom",left:"left",basic:"basic",unclickable:"unclickable"},text:{close:"Close"},icons:{info:"info",success:"checkmark",warning:"warning",error:"times"},selector:{container:".ui.toast-container",box:".toast-box",toast:".ui.toast",title:".header",message:".message:not(.ui)",image:"> img.image, > .image > img",icon:"> i.icon",input:'input:not([type="hidden"]), textarea, select, button, .ui.button, ui.dropdown',clickable:"a, details, .ui.accordion",approve:".actions .positive, .actions .approve, .actions .ok",deny:".actions .negative, .actions .deny, .actions .cancel"},fields:{class:"class",text:"text",icon:"icon",click:"click"},onShow:function(){},onVisible:function(){},onClick:function(){},onHide:function(){},onHidden:function(){},onRemove:function(){},onApprove:function(){},onDeny:function(){}},D.extend(D.easing,{easeOutBounce:function(e){var n=7.5625,t=2.75;return e<1/t?n*e*e:e<2/t?n*(e-=1.5/t)*e+.75:e<2.5/t?n*(e-=2.25/t)*e+.9375:n*(e-=2.625/t)*e+.984375},easeOutCubic:function(e){return--e*e*e+1}})}(jQuery,window,document);
|
11
|
+
!function(D,E,H,z){"use strict";function S(e){return"function"==typeof e&&"number"!=typeof e.nodeType}E=E!==z&&E.Math===Math?E:globalThis,D.fn.toast=function(x){var k,e=D(this),T=e.selector||"",I=Date.now(),P=[],O=x,M="string"==typeof O,A=[].slice.call(arguments,1);return e.each(function(){var t,o,a,s,i,c,l,e,r=D.isPlainObject(x)?D.extend(!0,{},D.fn.toast.settings,x):D.extend({},D.fn.toast.settings),d=r.className,u=r.selector,p=r.error,n=r.namespace,f=r.fields,g="."+n,m=n+"-module",h=D(this),b=r.context?[E,H].indexOf(r.context)<0?D(H).find(r.context):D(r.context):D("body"),v=h.hasClass("toast")||h.hasClass("message")||h.hasClass("card"),C=this,y=v?h.data(m):z,w={initialize:function(){w.verbose("Initializing element"),w.create.id(),w.has.container()||w.create.container(),(v||""!==r.message||""!==r.title||""!==w.get.iconClass()||r.showImage||w.has.configActions())&&("string"==typeof r.showProgress&&-1!==[d.top,d.bottom].indexOf(r.showProgress)||(r.showProgress=!1),w.create.toast(),r.closeOnClick&&(r.closeIcon||0<D(o).find(u.input).length||w.has.configActions())&&(r.closeOnClick=!1),r.closeOnClick||t.addClass(d.unclickable),w.bind.events()),w.instantiate(),t&&w.show()},instantiate:function(){w.verbose("Storing instance of toast"),y=w,h.data(m,y)},destroy:function(){t&&(w.debug("Removing toast",t),w.unbind.events(),t.remove(),c=o=t=z,r.onRemove.call(t,C),l=i=s=z),h.removeData(m)},show:function(e){!1===r.onShow.call(t,C)?w.debug("onShow callback returned false, cancelling toast animation"):(e=e||function(){},w.debug("Showing toast"),w.animate.show(e))},close:function(e){!1===r.onHide.call(t,C)?w.debug("onHide callback returned false, cancelling toast animation"):(e=e||function(){},w.debug("Closing toast"),w.remove.visible(),w.unbind.events(),w.animate.close(e))},create:{container:function(){w.verbose("Creating container"),b.append(D("<div/>",{class:r.position+" "+d.container+" "+(r.horizontal?d.horizontal:"")+" "+(r.context&&"body"!==r.context?d.absolute:"")}))},id:function(){e=(Math.random().toString(16)+"000000000").slice(2,10),w.verbose("Creating unique id for element",e)},toast:function(){t=D("<div/>",{class:d.box});var e,n=w.get.iconClass();v?(o=r.cloneModule?h.clone().removeAttr("id"):h,l=o.find("> i"+w.helpers.toClass(d.close)),r.closeIcon=0<l.length,""!==n&&o.find(u.icon).attr("class",n+" "+d.icon),r.showImage&&o.find(u.image).attr("src",r.showImage),""!==r.title&&o.find(u.title).html(w.helpers.escape(r.title,r.preserveHTML)),""!==r.message&&o.find(u.message).html(w.helpers.escape(r.message,r.preserveHTML))):(w.verbose("Creating toast"),o=D("<div/>",{role:"alert"}),e=D("<div/>",{class:d.content}),""!==n&&o.append(D("<i/>",{class:n+" "+d.icon})),r.showImage&&o.append(D("<img>",{class:d.image+" "+r.classImage,src:r.showImage})),""!==r.title&&(n="_"+w.get.id()+"title",o.attr("aria-labelledby",n),e.append(D("<div/>",{class:d.title,id:n,html:w.helpers.escape(r.title,r.preserveHTML)}))),n="_"+w.get.id()+"desc",o.attr("aria-describedby",n),e.append(D("<div/>",{class:d.message,id:n,html:w.helpers.escape(r.message,r.preserveHTML)})),o.addClass(r.class+" "+d.toast).append(e),o.css("opacity",String(r.opacity)),r.closeIcon&&((l=D("<i/>",{class:d.close+" "+("string"==typeof r.closeIcon?r.closeIcon:""),role:"button",tabindex:0,"aria-label":r.text.close})).hasClass(d.left)?o.prepend(l):o.append(l))),o.hasClass(d.compact)&&(r.compact=!0),o.hasClass("card")&&(r.compact=!1),a=o.find(".actions"),w.has.configActions()&&(0===a.length&&(a=D("<div/>",{class:d.actions+" "+(r.classActions||"")}).appendTo(o)),o.hasClass("card")&&!a.hasClass(d.attached)&&(a.addClass(d.extraContent),a.hasClass(d.vertical)&&(a.removeClass(d.vertical),w.error(p.verticalCard))),r.actions.forEach(function(e){var n=e[f.icon]?"<i "+(e[f.text]?'aria-hidden="true"':"")+' class="'+w.helpers.deQuote(e[f.icon])+' icon"></i>':"",t=w.helpers.escape(e[f.text]||"",r.preserveHTML),o=w.helpers.deQuote(e[f.class]||""),s=e[f.click]&&S(e[f.click])?e[f.click]:function(){};a.append(D("<button/>",{html:n+t,"aria-label":(e[f.text]||e[f.icon]||"").replace(/<[^>]+(>|$)/g,""),class:d.button+" "+o,on:{click:function(){var e=D(this);e.is(u.approve)||e.is(u.deny)||!1===s.call(C,h)||w.close()}}}))})),a&&a.hasClass(d.vertical)&&o.addClass(d.vertical),0<a.length&&!a.hasClass(d.attached)&&(!a||a.hasClass(d.basic)&&!a.hasClass(d.left)||o.addClass(d.actions)),"auto"===r.displayTime&&(r.displayTime=Math.max(r.minDisplayTime,o.text().split(" ").length/r.wordsPerMinute*6e4)),t.append(o),0<a.length&&a.hasClass(d.attached)&&(a.addClass(d.buttons),a.detach(),o.addClass(d.attached),a.hasClass(d.vertical)?(o.wrap(D("<div/>",{class:d.vertical+" "+d.attached+" "+(r.compact?d.compact:"")})),a.hasClass(d.left)?o.addClass(d.left).parent().addClass(d.left).prepend(a):o.parent().append(a)):a.hasClass(d.top)?(t.prepend(a),o.addClass(d.bottom)):(t.append(a),o.addClass(d.top))),h!==o&&(C=(h=o)[0]),0<r.displayTime&&(n=d.progressing+" "+(r.pauseOnHover?d.pausable:""),r.showProgress&&(s=D("<div/>",{class:d.progress+" "+(r.classProgress||r.class),"data-percent":""}),r.classProgress||(o.hasClass("toast")&&!o.hasClass(d.inverted)?s.addClass(d.inverted):s.removeClass(d.inverted)),i=D("<div/>",{class:"bar "+(r.progressUp?"up ":"down ")+n}),s.addClass(r.showProgress).append(i),s.hasClass(d.top)?t.prepend(s):t.append(s),i.css("animation-duration",r.displayTime/1e3+"s")),(c=D("<span/>",{class:"wait "+n})).css("animation-duration",r.displayTime/1e3+"s"),c.appendTo(o)),r.compact&&(t.addClass(d.compact),o.addClass(d.compact),s&&s.addClass(d.compact)),r.newestOnTop?t.prependTo(w.get.container()):t.appendTo(w.get.container())}},bind:{events:function(){w.debug("Binding events to toast"),r.closeIcon&&l.on("click"+g,w.event.close),o.on("click"+g,w.event.click),c&&c.on("animationend"+g,w.event.close),t.on("click"+g,u.approve,w.event.approve).on("click"+g,u.deny,w.event.deny)}},unbind:{events:function(){w.debug("Unbinding events to toast"),r.closeIcon&&l.off("click"+g),o.off("click"+g),c&&c.off("animationend"+g),t.off("click"+g)}},animate:{show:function(e){e=S(e)?e:function(){},r.transition&&w.can.useElement("transition")&&h.transition("is supported")&&(w.set.visible(),t.transition({animation:r.transition.showMethod+" in",queue:!1,debug:r.debug,verbose:r.verbose,silent:r.silent,duration:r.transition.showDuration,onComplete:function(){e.call(t,C),r.onVisible.call(t,C)}}))},close:function(e){e=S(e)?e:function(){},r.transition&&D.fn.transition!==z&&h.transition("is supported")?t.transition({animation:r.transition.hideMethod+" out",queue:!1,duration:r.transition.hideDuration,debug:r.debug,verbose:r.verbose,silent:r.silent,interval:50,onBeforeHide:function(e){e=S(e)?e:function(){},""!==r.transition.closeEasing?t&&(t.css("opacity","0"),t.wrap("<div/>").parent().hide(r.transition.closeDuration,r.transition.closeEasing,function(){t&&(t.parent().remove(),e.call(t))})):e.call(t)},onComplete:function(){e.call(t,C),r.onHidden.call(t,C),w.destroy()}}):w.error(p.noTransition)},pause:function(){c.css("animationPlayState","paused"),i&&i.css("animationPlayState","paused")},continue:function(){c.css("animationPlayState","running"),i&&i.css("animationPlayState","running")}},has:{container:function(){return w.verbose("Determining if there is already a container"),0<w.get.containers().length},toast:function(){return!!w.get.toast()},toasts:function(){return 0<w.get.toasts().length},configActions:function(){return Array.isArray(r.actions)&&0<r.actions.length}},get:{id:function(){return e},containers:function(){return b.children(w.helpers.toClass(r.position)+u.container+(r.horizontal?w.helpers.toClass(d.horizontal):":not("+w.helpers.toClass(d.horizontal)+")")+(r.context&&"body"!==r.context?w.helpers.toClass(d.absolute):":not("+w.helpers.toClass(d.absolute)+")"))},container:function(){return w.get.containers()[0]},toastBox:function(){return t||null},toast:function(){return o||null},toasts:function(){return D(w.get.container()).find(u.box)},iconClass:function(){return"string"==typeof r.showIcon?r.showIcon:r.showIcon&&r.icons[r.class]?r.icons[r.class]:""},remainingTime:function(){return c?c.css("opacity")*r.displayTime:0}},set:{visible:function(){o.addClass(d.visible)}},remove:{visible:function(){o.removeClass(d.visible)}},event:{close:function(){w.close()},click:function(e){0===D(e.target).closest(u.clickable).length&&(!1!==r.onClick.call(t,C)&&r.closeOnClick?w.close():w.verbose("Click callback returned false or close denied by setting cancelling close"))},approve:function(){!1===r.onApprove.call(C,h)?w.verbose("Approve callback returned false cancelling close"):w.close()},deny:function(){!1===r.onDeny.call(C,h)?w.verbose("Deny callback returned false cancelling close"):w.close()}},helpers:{toClass:function(e){var e=e.trim().split(/\s+/),n="";return e.forEach(function(e){n+="."+e}),n},deQuote:function(e){return String(e).replace(/"/g,"")},escape:function(e,n){if(n)return e;var t={"<":"<",">":">",'"':""","'":"'","`":"`"};return/["&'<>`]/.test(e)?(e=e.replace(/&(?![\d#a-z]{1,12};)/gi,"&")).replace(/["'<>`]/g,function(e){return t[e]}):e}},can:{useElement:function(e){return D.fn[e]!==z||(w.error(p.noElement.replace("{element}",e)),!1)}},setting:function(e,n){if(w.debug("Changing setting",e,n),D.isPlainObject(e))D.extend(!0,r,e);else{if(n===z)return r[e];D.isPlainObject(r[e])?D.extend(!0,r[e],n):r[e]=n}},internal:function(e,n){if(D.isPlainObject(e))D.extend(!0,w,e);else{if(n===z)return w[e];w[e]=n}},debug:function(){!r.silent&&r.debug&&(r.performance?w.performance.log(arguments):(w.debug=Function.prototype.bind.call(console.info,console,r.name+":"),w.debug.apply(console,arguments)))},verbose:function(){!r.silent&&r.verbose&&r.debug&&(r.performance?w.performance.log(arguments):(w.verbose=Function.prototype.bind.call(console.info,console,r.name+":"),w.verbose.apply(console,arguments)))},error:function(){r.silent||(w.error=Function.prototype.bind.call(console.error,console,r.name+":"),w.error.apply(console,arguments))},performance:{log:function(e){var n,t;r.performance&&(t=(n=Date.now())-(I||n),I=n,P.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:C,"Execution Time":t})),clearTimeout(w.performance.timer),w.performance.timer=setTimeout(w.performance.display,500)},display:function(){var e=r.name+":",t=0;I=!1,clearTimeout(w.performance.timer),D.each(P,function(e,n){t+=n["Execution Time"]}),e+=" "+t+"ms",T&&(e+=" '"+T+"'"),(console.group!==z||console.table!==z)&&0<P.length&&(console.groupCollapsed(e),console.table?console.table(P):D.each(P,function(e,n){console.log(n.Name+": "+n["Execution Time"]+"ms")}),console.groupEnd()),P=[]}},invoke:function(o,e,n){var s,a,t,i=y;return e=e||A,n=n||C,"string"==typeof o&&i!==z&&(o=o.split(/[ .]/),s=o.length-1,D.each(o,function(e,n){var t=e!=s?n+o[e+1].charAt(0).toUpperCase()+o[e+1].slice(1):o;if(D.isPlainObject(i[t])&&e!=s)i=i[t];else{if(i[t]!==z)return a=i[t],!1;{if(!D.isPlainObject(i[n])||e==s)return i[n]!==z?a=i[n]:w.error(p.method,o),!1;i=i[n]}}})),S(a)?t=a.apply(n,e):a!==z&&(t=a),Array.isArray(k)?k.push(t):k!==z?k=[k,t]:t!==z&&(k=t),a}};M?(y===z&&w.initialize(),w.invoke(O)):(y!==z&&y.invoke("destroy"),w.initialize(),k=h)}),k!==z?k:this},D.toast=D.fn.toast,D.fn.toast.settings={name:"Toast",namespace:"toast",silent:!1,debug:!1,verbose:!1,performance:!0,context:"body",position:"top right",horizontal:!1,class:"neutral",classProgress:!1,classActions:!1,classImage:"mini",title:"",message:"",displayTime:3e3,minDisplayTime:1e3,wordsPerMinute:120,showIcon:!1,newestOnTop:!1,showProgress:!1,pauseOnHover:!0,progressUp:!1,opacity:1,compact:!0,closeIcon:!1,closeOnClick:!0,cloneModule:!0,actions:!1,preserveHTML:!0,showImage:!1,transition:{showMethod:"scale",showDuration:500,hideMethod:"scale",hideDuration:500,closeEasing:"easeOutCubic",closeDuration:500},error:{method:"The method you called is not defined.",noElement:"This module requires ui {element}",verticalCard:"Vertical but not attached actions are not supported for card layout"},className:{container:"ui toast-container",absolute:"absolute",box:"floating toast-box",progress:"ui attached active progress",toast:"ui toast",icon:"centered icon",visible:"visible",content:"content",title:"ui header",message:"message",actions:"actions",extraContent:"extra content",button:"ui button",buttons:"ui buttons",close:"close icon",image:"ui image",vertical:"vertical",horizontal:"horizontal",attached:"attached",inverted:"inverted",compact:"compact",pausable:"pausable",progressing:"progressing",top:"top",bottom:"bottom",left:"left",basic:"basic",unclickable:"unclickable"},text:{close:"Close"},icons:{info:"info",success:"checkmark",warning:"warning",error:"times"},selector:{container:".ui.toast-container",box:".toast-box",toast:".ui.toast",title:".header",message:".message:not(.ui)",image:"> img.image, > .image > img",icon:"> i.icon",input:'input:not([type="hidden"]), textarea, select, button, .ui.button, ui.dropdown',clickable:"a, details, .ui.accordion",approve:".actions .positive, .actions .approve, .actions .ok",deny:".actions .negative, .actions .deny, .actions .cancel"},fields:{class:"class",text:"text",icon:"icon",click:"click"},onShow:function(){},onVisible:function(){},onClick:function(){},onHide:function(){},onHidden:function(){},onRemove:function(){},onApprove:function(){},onDeny:function(){}},D.extend(D.easing,{easeOutBounce:function(e){var n=7.5625,t=2.75;return e<1/t?n*e*e:e<2/t?n*(e-=1.5/t)*e+.75:e<2.5/t?n*(e-=2.25/t)*e+.9375:n*(e-=2.625/t)*e+.984375},easeOutCubic:function(e){return--e*e*e+1}})}(jQuery,window,document);
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* # Fomantic-UI 2.9.1-beta.
|
2
|
+
* # Fomantic-UI 2.9.1-beta.24+029436f - Transition
|
3
3
|
* https://github.com/fomantic/Fomantic-UI/
|
4
4
|
*
|
5
5
|
*
|
@@ -2168,24 +2168,24 @@
|
|
2168
2168
|
/* Glow */
|
2169
2169
|
@-webkit-keyframes glow {
|
2170
2170
|
0% {
|
2171
|
-
background-color: #
|
2171
|
+
background-color: #fcfcfd;
|
2172
2172
|
}
|
2173
2173
|
30% {
|
2174
|
-
background-color: #
|
2174
|
+
background-color: #fff6cd;
|
2175
2175
|
}
|
2176
2176
|
100% {
|
2177
|
-
background-color: #
|
2177
|
+
background-color: #fcfcfd;
|
2178
2178
|
}
|
2179
2179
|
}
|
2180
2180
|
@keyframes glow {
|
2181
2181
|
0% {
|
2182
|
-
background-color: #
|
2182
|
+
background-color: #fcfcfd;
|
2183
2183
|
}
|
2184
2184
|
30% {
|
2185
|
-
background-color: #
|
2185
|
+
background-color: #fff6cd;
|
2186
2186
|
}
|
2187
2187
|
100% {
|
2188
|
-
background-color: #
|
2188
|
+
background-color: #fcfcfd;
|
2189
2189
|
}
|
2190
2190
|
}
|
2191
2191
|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* # Fomantic-UI 2.9.1-beta.
|
2
|
+
* # Fomantic-UI 2.9.1-beta.24+029436f - Transition
|
3
3
|
* https://github.com/fomantic/Fomantic-UI/
|
4
4
|
*
|
5
5
|
*
|
@@ -15,7 +15,7 @@
|
|
15
15
|
return typeof obj === 'function' && typeof obj.nodeType !== 'number';
|
16
16
|
}
|
17
17
|
|
18
|
-
window =
|
18
|
+
window = window !== undefined && window.Math === Math
|
19
19
|
? window
|
20
20
|
: globalThis;
|
21
21
|
|
@@ -24,13 +24,13 @@
|
|
24
24
|
$allModules = $(this),
|
25
25
|
moduleSelector = $allModules.selector || '',
|
26
26
|
|
27
|
-
time =
|
27
|
+
time = Date.now(),
|
28
28
|
performance = [],
|
29
29
|
|
30
30
|
moduleArguments = arguments,
|
31
31
|
query = moduleArguments[0],
|
32
32
|
queryArguments = [].slice.call(arguments, 1),
|
33
|
-
methodInvoked =
|
33
|
+
methodInvoked = typeof query === 'string',
|
34
34
|
|
35
35
|
returnedValue
|
36
36
|
;
|
@@ -139,11 +139,11 @@
|
|
139
139
|
? module.get.direction()
|
140
140
|
: 'static';
|
141
141
|
}
|
142
|
-
interval =
|
142
|
+
interval = interval !== undefined
|
143
143
|
? interval
|
144
144
|
: settings.interval;
|
145
|
-
shouldReverse =
|
146
|
-
delay =
|
145
|
+
shouldReverse = settings.reverse == 'auto' && direction == className.outward;
|
146
|
+
delay = shouldReverse || settings.reverse === true
|
147
147
|
? ($allModules.length - index) * interval
|
148
148
|
: index * interval;
|
149
149
|
module.debug('Delaying animation by', delay);
|
@@ -167,14 +167,15 @@
|
|
167
167
|
}
|
168
168
|
|
169
169
|
return false;
|
170
|
-
}
|
170
|
+
}
|
171
|
+
if (!settings.allowRepeats && module.is.occurring()) {
|
171
172
|
module.debug('Animation is already occurring, will not execute repeated animation', settings.animation);
|
172
173
|
|
173
174
|
return false;
|
174
|
-
} else {
|
175
|
-
module.debug('New animation started, completing previous early', settings.animation);
|
176
|
-
instance.complete();
|
177
175
|
}
|
176
|
+
|
177
|
+
module.debug('New animation started, completing previous early', settings.animation);
|
178
|
+
instance.complete();
|
178
179
|
}
|
179
180
|
if (module.can.animate()) {
|
180
181
|
module.set.animating(settings.animation);
|
@@ -252,7 +253,7 @@
|
|
252
253
|
var
|
253
254
|
style = $module.attr('style'),
|
254
255
|
currentDisplay = $module.css('display'),
|
255
|
-
emptyStyle =
|
256
|
+
emptyStyle = style === undefined || style === ''
|
256
257
|
;
|
257
258
|
if (currentDisplay !== 'none' && !module.is.hidden()) {
|
258
259
|
module.verbose('Overriding default display to hide element');
|
@@ -314,7 +315,7 @@
|
|
314
315
|
},
|
315
316
|
duration: function (animationName, duration) {
|
316
317
|
duration = duration || settings.duration;
|
317
|
-
duration =
|
318
|
+
duration = typeof duration === 'number'
|
318
319
|
? duration + 'ms'
|
319
320
|
: duration;
|
320
321
|
if (duration || duration === 0) {
|
@@ -488,38 +489,43 @@
|
|
488
489
|
},
|
489
490
|
get: {
|
490
491
|
settings: function (animation, duration, onComplete) {
|
491
|
-
if (typeof animation
|
492
|
+
if (typeof animation === 'object') { // single settings object
|
492
493
|
return $.extend(true, {}, $.fn.transition.settings, animation);
|
493
|
-
}
|
494
|
+
}
|
495
|
+
if (typeof onComplete === 'function') { // all arguments provided
|
494
496
|
return $.extend({}, $.fn.transition.settings, {
|
495
497
|
animation: animation,
|
496
498
|
onComplete: onComplete,
|
497
499
|
duration: duration,
|
498
500
|
});
|
499
|
-
}
|
501
|
+
}
|
502
|
+
if (typeof duration === 'string' || typeof duration === 'number') { // only duration provided
|
500
503
|
return $.extend({}, $.fn.transition.settings, {
|
501
504
|
animation: animation,
|
502
505
|
duration: duration,
|
503
506
|
});
|
504
|
-
}
|
507
|
+
}
|
508
|
+
if (typeof duration === 'object') { // duration is actually settings object
|
505
509
|
return $.extend({}, $.fn.transition.settings, duration, {
|
506
510
|
animation: animation,
|
507
511
|
});
|
508
|
-
}
|
512
|
+
}
|
513
|
+
if (typeof duration === 'function') { // duration is actually callback
|
509
514
|
return $.extend({}, $.fn.transition.settings, {
|
510
515
|
animation: animation,
|
511
516
|
onComplete: duration,
|
512
517
|
});
|
513
|
-
} else { // only animation provided
|
514
|
-
return $.extend({}, $.fn.transition.settings, {
|
515
|
-
animation: animation,
|
516
|
-
});
|
517
518
|
}
|
519
|
+
|
520
|
+
// only animation provided
|
521
|
+
return $.extend({}, $.fn.transition.settings, {
|
522
|
+
animation: animation,
|
523
|
+
});
|
518
524
|
},
|
519
525
|
animationClass: function (animation) {
|
520
526
|
var
|
521
527
|
animationClass = animation || settings.animation,
|
522
|
-
directionClass =
|
528
|
+
directionClass = module.can.transition() && !module.has.direction()
|
523
529
|
? module.get.direction() + ' '
|
524
530
|
: ''
|
525
531
|
;
|
@@ -530,7 +536,7 @@
|
|
530
536
|
+ animationClass;
|
531
537
|
},
|
532
538
|
currentAnimation: function () {
|
533
|
-
return
|
539
|
+
return module.cache && module.cache.animation !== undefined
|
534
540
|
? module.cache.animation
|
535
541
|
: false;
|
536
542
|
},
|
@@ -573,14 +579,14 @@
|
|
573
579
|
duration = $module.css('animation-duration') || 0;
|
574
580
|
}
|
575
581
|
|
576
|
-
return
|
577
|
-
? (duration.indexOf('ms') > -1
|
582
|
+
return typeof duration === 'string'
|
583
|
+
? (duration.indexOf('ms') > -1
|
578
584
|
? parseFloat(duration)
|
579
|
-
: parseFloat(duration) * 1000
|
585
|
+
: parseFloat(duration) * 1000)
|
580
586
|
: duration;
|
581
587
|
},
|
582
588
|
displayType: function (shouldDetermine) {
|
583
|
-
shouldDetermine =
|
589
|
+
shouldDetermine = shouldDetermine !== undefined
|
584
590
|
? shouldDetermine
|
585
591
|
: true;
|
586
592
|
if (settings.displayType) {
|
@@ -708,13 +714,13 @@
|
|
708
714
|
module.save.transitionExists(animation, directionExists);
|
709
715
|
}
|
710
716
|
|
711
|
-
return
|
717
|
+
return transitionExists !== undefined
|
712
718
|
? transitionExists
|
713
719
|
: directionExists;
|
714
720
|
},
|
715
721
|
animate: function () {
|
716
722
|
// can transition does not return a value if animation does not exist
|
717
|
-
return
|
723
|
+
return module.can.transition() !== undefined;
|
718
724
|
},
|
719
725
|
},
|
720
726
|
|
@@ -735,7 +741,7 @@
|
|
735
741
|
animation = animation || settings.animation;
|
736
742
|
animation = '.' + animation.replace(' ', '.');
|
737
743
|
|
738
|
-
return
|
744
|
+
return $module.filter(animation).length > 0;
|
739
745
|
},
|
740
746
|
visible: function () {
|
741
747
|
return $module.is(':visible');
|
@@ -744,7 +750,7 @@
|
|
744
750
|
return $module.css('visibility') === 'hidden';
|
745
751
|
},
|
746
752
|
supported: function () {
|
747
|
-
return
|
753
|
+
return animationEnd !== false;
|
748
754
|
},
|
749
755
|
},
|
750
756
|
|
@@ -878,7 +884,7 @@
|
|
878
884
|
previousTime
|
879
885
|
;
|
880
886
|
if (settings.performance) {
|
881
|
-
currentTime =
|
887
|
+
currentTime = Date.now();
|
882
888
|
previousTime = time || currentTime;
|
883
889
|
executionTime = currentTime - previousTime;
|
884
890
|
time = currentTime;
|
@@ -907,7 +913,7 @@
|
|
907
913
|
title += ' \'' + moduleSelector + '\'';
|
908
914
|
}
|
909
915
|
if ($allModules.length > 1) {
|
910
|
-
title += '
|
916
|
+
title += ' (' + $allModules.length + ')';
|
911
917
|
}
|
912
918
|
if ((console.group !== undefined || console.table !== undefined) && performance.length > 0) {
|
913
919
|
console.groupCollapsed(title);
|
@@ -933,11 +939,11 @@
|
|
933
939
|
;
|
934
940
|
passedArguments = passedArguments || queryArguments;
|
935
941
|
context = context || element;
|
936
|
-
if (typeof query
|
937
|
-
query = query.split(/[
|
942
|
+
if (typeof query === 'string' && object !== undefined) {
|
943
|
+
query = query.split(/[ .]/);
|
938
944
|
maxDepth = query.length - 1;
|
939
945
|
$.each(query, function (depth, value) {
|
940
|
-
var camelCaseValue =
|
946
|
+
var camelCaseValue = depth != maxDepth
|
941
947
|
? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)
|
942
948
|
: query
|
943
949
|
;
|
@@ -972,7 +978,7 @@
|
|
972
978
|
returnedValue = response;
|
973
979
|
}
|
974
980
|
|
975
|
-
return
|
981
|
+
return found !== undefined
|
976
982
|
? found
|
977
983
|
: false;
|
978
984
|
},
|
@@ -980,7 +986,7 @@
|
|
980
986
|
module.initialize();
|
981
987
|
});
|
982
988
|
|
983
|
-
return
|
989
|
+
return returnedValue !== undefined
|
984
990
|
? returnedValue
|
985
991
|
: this;
|
986
992
|
};
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*
|
2
|
-
* # Fomantic UI - 2.9.1-beta.
|
2
|
+
* # Fomantic UI - 2.9.1-beta.24+029436f
|
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(C,n,S,A){"use strict";n=void 0!==n&&n.Math==Math?n:globalThis,C.fn.transition=function(){var p,r=C(this),s=r.selector||"",g=(new Date).getTime(),v=[],b=arguments,y=b[0],h=[].slice.call(arguments,1),w="string"==typeof y;return r.each(function(i){var l,c,e,d,t,a,n,o,u=C(this),m=this,f={initialize:function(){l=f.get.settings.apply(m,b),d=l.className,e=l.error,t=l.metadata,o="."+l.namespace,n="module-"+l.namespace,c=u.data(n)||f,a=f.get.animationEndEvent(),!1===(w=w&&f.invoke(y))&&(f.verbose("Converted arguments into settings object",l),l.interval?f.delay(l.interval):f.animate(),f.instantiate())},instantiate:function(){f.verbose("Storing instance of module",f),c=f,u.data(n,c)},destroy:function(){f.verbose("Destroying previous module for",m),u.removeData(n)},refresh:function(){f.verbose("Refreshing display type on next animation"),delete f.displayType},forceRepaint:function(){f.verbose("Forcing element repaint");var n=u.parent(),e=u.next();0===e.length?u.detach().appendTo(n):u.detach().insertBefore(e)},repaint:function(){f.verbose("Repainting element");m.offsetWidth},delay:function(n){var e=(e=f.get.animationDirection())||(f.can.transition()?f.get.direction():"static");n=n!==A?n:l.interval,e="auto"==l.reverse&&e==d.outward||!0===l.reverse?(r.length-i)*n:i*n,f.debug("Delaying animation by",e),setTimeout(f.animate,e)},animate:function(n){if(l=n||l,!f.is.supported())return f.error(e.support),!1;if(f.debug("Preparing animation",l.animation),f.is.animating()){if(l.queue)return!l.allowRepeats&&f.has.direction()&&f.is.occurring()&&!0!==f.queuing?f.debug("Animation is currently occurring, preventing queueing same animation",l.animation):f.queue(l.animation),!1;if(!l.allowRepeats&&f.is.occurring())return f.debug("Animation is already occurring, will not execute repeated animation",l.animation),!1;f.debug("New animation started, completing previous early",l.animation),c.complete()}f.can.animate()?f.set.animating(l.animation):f.error(e.noAnimation,l.animation,m)},reset:function(){f.debug("Resetting animation to beginning conditions"),f.remove.animationCallbacks(),f.restore.conditions(),f.remove.animating()},queue:function(n){f.debug("Queueing animation of",n),f.queuing=!0,u.one(a+".queue"+o,function(){f.queuing=!1,f.repaint(),f.animate.apply(this,l)})},complete:function(n){n&&n.target===m&&n.stopPropagation(),f.debug("Animation complete",l.animation),f.remove.completeCallback(),f.remove.failSafe(),f.is.looping()||(f.is.outward()?(f.verbose("Animation is outward, hiding element"),f.restore.conditions(),f.hide()):f.is.inward()?(f.verbose("Animation is outward, showing element"),f.restore.conditions(),f.show()):(f.verbose("Static animation completed"),f.restore.conditions(),l.onComplete.call(m)))},force:{visible:function(){var n=u.attr("style"),n=f.get.userStyle(n),e=f.get.displayType(),n=n+"display: "+e+" !important;",i=u[0].style.display;return!e||"none"===i&&l.skipInlineHidden||u[0].tagName.match(/(script|link|style)/i)?(f.remove.transition(),!1):(f.verbose("Overriding default display to show element",e),u.attr("style",n),!0)},hidden:function(){var n=u.attr("style"),e=u.css("display"),n=n===A||""===n;"none"===e||f.is.hidden()?n&&u.removeAttr("style"):(f.verbose("Overriding default display to hide element"),u.css("display","none"))}},has:{direction:function(n){var i=!1;return"string"==typeof(n=n||l.animation)&&(n=n.split(" "),C.each(n,function(n,e){e!==d.inward&&e!==d.outward||(i=!0)})),i},inlineDisplay:function(){var n=u.attr("style")||"";return Array.isArray(n.match(/display.*?;/,""))}},set:{animating:function(n){f.remove.completeCallback(),n=n||l.animation;n=f.get.animationClass(n);f.save.animation(n),f.force.visible()&&(f.remove.hidden(),f.remove.direction(),f.start.animation(n))},duration:function(n,e){!(e="number"==typeof(e=e||l.duration)?e+"ms":e)&&0!==e||(f.verbose("Setting animation duration",e),u.css({"animation-duration":e}))},direction:function(n){(n=n||f.get.direction())==d.inward?f.set.inward():f.set.outward()},looping:function(){f.debug("Transition set to loop"),u.addClass(d.looping)},hidden:function(){u.addClass(d.transition).addClass(d.hidden)},inward:function(){f.debug("Setting direction to inward"),u.removeClass(d.outward).addClass(d.inward)},outward:function(){f.debug("Setting direction to outward"),u.removeClass(d.inward).addClass(d.outward)},visible:function(){u.addClass(d.transition).addClass(d.visible)}},start:{animation:function(n){n=n||f.get.animationClass(),f.debug("Starting tween",n),u.addClass(n).one(a+".complete"+o,f.complete),l.useFailSafe&&f.add.failSafe(),f.set.duration(l.duration),l.onStart.call(m)}},save:{animation:function(n){f.cache||(f.cache={}),f.cache.animation=n},displayType:function(n){"none"!==n&&u.data(t.displayType,n)},transitionExists:function(n,e){C.fn.transition.exists[n]=e,f.verbose("Saving existence of transition",n,e)}},restore:{conditions:function(){var n=f.get.currentAnimation();n&&(u.removeClass(n),f.verbose("Removing animation class",f.cache)),f.remove.duration()}},add:{failSafe:function(){var n=f.get.duration();f.timer=setTimeout(function(){u.triggerHandler(a)},n+l.failSafeDelay),f.verbose("Adding fail safe timer",f.timer)}},remove:{animating:function(){u.removeClass(d.animating)},animationCallbacks:function(){f.remove.queueCallback(),f.remove.completeCallback()},queueCallback:function(){u.off(".queue"+o)},completeCallback:function(){u.off(".complete"+o)},display:function(){u.css("display","")},direction:function(){u.removeClass(d.inward).removeClass(d.outward)},duration:function(){u.css("animation-duration","")},failSafe:function(){f.verbose("Removing fail safe timer",f.timer),f.timer&&clearTimeout(f.timer)},hidden:function(){u.removeClass(d.hidden)},visible:function(){u.removeClass(d.visible)},looping:function(){f.debug("Transitions are no longer looping"),f.is.looping()&&(f.reset(),u.removeClass(d.looping))},transition:function(){u.removeClass(d.transition).removeClass(d.visible).removeClass(d.hidden)}},get:{settings:function(n,e,i){return"object"==typeof n?C.extend(!0,{},C.fn.transition.settings,n):"function"==typeof i?C.extend({},C.fn.transition.settings,{animation:n,onComplete:i,duration:e}):"string"==typeof e||"number"==typeof e?C.extend({},C.fn.transition.settings,{animation:n,duration:e}):"object"==typeof e?C.extend({},C.fn.transition.settings,e,{animation:n}):"function"==typeof e?C.extend({},C.fn.transition.settings,{animation:n,onComplete:e}):C.extend({},C.fn.transition.settings,{animation:n})},animationClass:function(n){var n=n||l.animation,e=f.can.transition()&&!f.has.direction()?f.get.direction()+" ":"";return d.animating+" "+d.transition+" "+e+n},currentAnimation:function(){return!(!f.cache||f.cache.animation===A)&&f.cache.animation},currentDirection:function(){return f.is.inward()?d.inward:d.outward},direction:function(){return f.is.hidden()||!f.is.visible()?d.inward:d.outward},animationDirection:function(n){var i;return"string"==typeof(n=n||l.animation)&&(n=n.split(" "),C.each(n,function(n,e){e===d.inward?i=d.inward:e===d.outward&&(i=d.outward)})),i||!1},duration:function(n){return"string"==typeof(n=!1===(n=n||l.duration)?u.css("animation-duration")||0:n)?-1<n.indexOf("ms")?parseFloat(n):1e3*parseFloat(n):n},displayType:function(n){return l.displayType||((n=n===A||n)&&u.data(t.displayType)===A&&(""===(n=u.css("display"))||"none"===n?f.can.transition(!0):f.save.displayType(n)),u.data(t.displayType))},userStyle:function(n){return(n=n||u.attr("style")||"").replace(/display.*?;/,"")},transitionExists:function(n){return C.fn.transition.exists[n]},animationStartEvent:function(){var n,e=S.createElement("div"),i={animation:"animationstart",OAnimation:"oAnimationStart",MozAnimation:"mozAnimationStart",WebkitAnimation:"webkitAnimationStart"};for(n in i)if(e.style[n]!==A)return i[n];return!1},animationEndEvent:function(){var n,e=S.createElement("div"),i={animation:"animationend",OAnimation:"oAnimationEnd",MozAnimation:"mozAnimationEnd",WebkitAnimation:"webkitAnimationEnd"};for(n in i)if(e.style[n]!==A)return i[n];return!1}},can:{transition:function(n){var e,i,t,a,o=l.animation,r=f.get.transitionExists(o),s=f.get.displayType(!1);if(r===A||n){if(f.verbose("Determining whether animation exists"),n=u.attr("class"),e=u.prop("tagName"),i=(e=C("<"+e+" />").addClass(n).insertAfter(u)).addClass(o).removeClass(d.inward).removeClass(d.outward).addClass(d.animating).addClass(d.transition).css("animationName"),e.detach().insertAfter(u),t=e.addClass(d.inward).css("animationName"),s||(e.detach().insertAfter(u),s=e.attr("class",n).removeAttr("style").removeClass(d.hidden).removeClass(d.visible).show().css("display"),f.verbose("Determining final display state",s),f.save.displayType(s)),e.remove(),i!=t)f.debug("Direction exists for animation",o),a=!0;else{if("none"==i||!i)return void f.debug("No animation defined in css",o);f.debug("Static animation found",o,s),a=!1}f.save.transitionExists(o,a)}return r!==A?r:a},animate:function(){return f.can.transition()!==A}},is:{animating:function(){return u.hasClass(d.animating)},inward:function(){return u.hasClass(d.inward)},outward:function(){return u.hasClass(d.outward)},looping:function(){return u.hasClass(d.looping)},occurring:function(n){return n="."+(n=n||l.animation).replace(" ","."),0<u.filter(n).length},visible:function(){return u.is(":visible")},hidden:function(){return"hidden"===u.css("visibility")},supported:function(){return!1!==a}},hide:function(){if(!1===l.onHide.call(m))return f.verbose("Hide callback returned false cancelling hide"),!1;f.verbose("Hiding element"),f.is.animating()&&f.reset(),m.blur(),f.remove.display(),f.remove.visible(),l.onBeforeHide.call(m,f.hideNow)},hideNow:function(){f.set.hidden(),f.force.hidden(),l.onHidden.call(m),l.onComplete.call(m)},show:function(n){f.force.visible()&&!1!==l.onShow.call(m)&&(f.verbose("Showing element",n),f.remove.hidden(),l.onBeforeShow.call(m,f.showNow))},showNow:function(){f.set.visible(),l.onVisible.call(m),l.onComplete.call(m)},toggle:function(){f.is.visible()?f.hide():f.show()},stop:function(){f.debug("Stopping current animation"),u.triggerHandler(a)},stopAll:function(){f.debug("Stopping all animation"),f.remove.queueCallback(),u.triggerHandler(a)},clear:{queue:function(){f.debug("Clearing animation queue"),f.remove.queueCallback()}},enable:function(){f.verbose("Starting animation"),u.removeClass(d.disabled)},disable:function(){f.debug("Stopping animation"),u.addClass(d.disabled)},setting:function(n,e){if(f.debug("Changing setting",n,e),C.isPlainObject(n))C.extend(!0,l,n);else{if(e===A)return l[n];C.isPlainObject(l[n])?C.extend(!0,l[n],e):l[n]=e}},internal:function(n,e){if(C.isPlainObject(n))C.extend(!0,f,n);else{if(e===A)return f[n];f[n]=e}},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(n){var e,i;l.performance&&(i=(e=(new Date).getTime())-(g||e),g=e,v.push({Name:n[0],Arguments:[].slice.call(n,1)||"",Element:m,"Execution Time":i})),clearTimeout(f.performance.timer),f.performance.timer=setTimeout(f.performance.display,500)},display:function(){var n=l.name+":",i=0;g=!1,clearTimeout(f.performance.timer),C.each(v,function(n,e){i+=e["Execution Time"]}),n+=" "+i+"ms",s&&(n+=" '"+s+"'"),1<r.length&&(n+=" ("+r.length+")"),(console.group!==A||console.table!==A)&&0<v.length&&(console.groupCollapsed(n),console.table?console.table(v):C.each(v,function(n,e){console.log(e.Name+": "+e["Execution Time"]+"ms")}),console.groupEnd()),v=[]}},invoke:function(t,n,e){var a,o,i,r,s=c;return n=n||h,e=e||m,"string"==typeof t&&s!==A&&(t=t.split(/[\. ]/),a=t.length-1,C.each(t,function(n,e){var i=n!=a?e+t[n+1].charAt(0).toUpperCase()+t[n+1].slice(1):t;if(C.isPlainObject(s[i])&&n!=a)s=s[i];else{if(s[i]!==A)return o=s[i],!1;{if(!C.isPlainObject(s[e])||n==a)return s[e]!==A&&(o=s[e]),!1;s=s[e]}}})),"function"==typeof(r=o)&&"number"!=typeof r.nodeType?i=o.apply(e,n):o!==A&&(i=o),Array.isArray(p)?p.push(i):p!==A?p=[p,i]:i!==A&&(p=i),o!==A&&o}};f.initialize()}),p!==A?p:this},C.fn.transition.exists={},C.fn.transition.settings={name:"Transition",silent:!1,debug:!1,verbose:!1,performance:!0,namespace:"transition",interval:0,reverse:"auto",onStart:function(){},onComplete:function(){},onShow:function(){},onBeforeShow:function(n){n.call(this)},onVisible:function(){},onHide:function(){},onHidden:function(){},onBeforeHide:function(n){n.call(this)},useFailSafe:!0,failSafeDelay:100,allowRepeats:!1,displayType:!1,animation:"fade",duration:!1,queue:!0,skipInlineHidden:!1,metadata:{displayType:"display"},className:{animating:"animating",disabled:"disabled",hidden:"hidden",inward:"in",loading:"loading",looping:"looping",outward:"out",transition:"transition",visible:"visible"},error:{noAnimation:"Element is no longer attached to DOM. Unable to animate. Use silent setting to suppress this warning in production.",repeated:"That animation is already occurring, cancelling repeated animation",method:"The method you called is not defined",support:"This browser does not support CSS animations"}}}(jQuery,window,document);
|
11
|
+
!function(C,n,S,A){"use strict";n=n!==A&&n.Math===Math?n:globalThis,C.fn.transition=function(){var p,r=C(this),s=r.selector||"",g=Date.now(),v=[],b=arguments,y=b[0],h=[].slice.call(arguments,1),w="string"==typeof y;return r.each(function(i){var l,c,e,d,t,a,n,o,u=C(this),m=this,f={initialize:function(){l=f.get.settings.apply(m,b),d=l.className,e=l.error,t=l.metadata,o="."+l.namespace,n="module-"+l.namespace,c=u.data(n)||f,a=f.get.animationEndEvent(),!1===(w=w&&f.invoke(y))&&(f.verbose("Converted arguments into settings object",l),l.interval?f.delay(l.interval):f.animate(),f.instantiate())},instantiate:function(){f.verbose("Storing instance of module",f),c=f,u.data(n,c)},destroy:function(){f.verbose("Destroying previous module for",m),u.removeData(n)},refresh:function(){f.verbose("Refreshing display type on next animation"),delete f.displayType},forceRepaint:function(){f.verbose("Forcing element repaint");var n=u.parent(),e=u.next();0===e.length?u.detach().appendTo(n):u.detach().insertBefore(e)},repaint:function(){f.verbose("Repainting element");m.offsetWidth},delay:function(n){var e=(e=f.get.animationDirection())||(f.can.transition()?f.get.direction():"static");n=n!==A?n:l.interval,e="auto"==l.reverse&&e==d.outward||!0===l.reverse?(r.length-i)*n:i*n,f.debug("Delaying animation by",e),setTimeout(f.animate,e)},animate:function(n){if(l=n||l,!f.is.supported())return f.error(e.support),!1;if(f.debug("Preparing animation",l.animation),f.is.animating()){if(l.queue)return!l.allowRepeats&&f.has.direction()&&f.is.occurring()&&!0!==f.queuing?f.debug("Animation is currently occurring, preventing queueing same animation",l.animation):f.queue(l.animation),!1;if(!l.allowRepeats&&f.is.occurring())return f.debug("Animation is already occurring, will not execute repeated animation",l.animation),!1;f.debug("New animation started, completing previous early",l.animation),c.complete()}f.can.animate()?f.set.animating(l.animation):f.error(e.noAnimation,l.animation,m)},reset:function(){f.debug("Resetting animation to beginning conditions"),f.remove.animationCallbacks(),f.restore.conditions(),f.remove.animating()},queue:function(n){f.debug("Queueing animation of",n),f.queuing=!0,u.one(a+".queue"+o,function(){f.queuing=!1,f.repaint(),f.animate.apply(this,l)})},complete:function(n){n&&n.target===m&&n.stopPropagation(),f.debug("Animation complete",l.animation),f.remove.completeCallback(),f.remove.failSafe(),f.is.looping()||(f.is.outward()?(f.verbose("Animation is outward, hiding element"),f.restore.conditions(),f.hide()):f.is.inward()?(f.verbose("Animation is outward, showing element"),f.restore.conditions(),f.show()):(f.verbose("Static animation completed"),f.restore.conditions(),l.onComplete.call(m)))},force:{visible:function(){var n=u.attr("style"),n=f.get.userStyle(n),e=f.get.displayType(),n=n+"display: "+e+" !important;",i=u[0].style.display;return!e||"none"===i&&l.skipInlineHidden||u[0].tagName.match(/(script|link|style)/i)?(f.remove.transition(),!1):(f.verbose("Overriding default display to show element",e),u.attr("style",n),!0)},hidden:function(){var n=u.attr("style"),e=u.css("display"),n=n===A||""===n;"none"===e||f.is.hidden()?n&&u.removeAttr("style"):(f.verbose("Overriding default display to hide element"),u.css("display","none"))}},has:{direction:function(n){var i=!1;return"string"==typeof(n=n||l.animation)&&(n=n.split(" "),C.each(n,function(n,e){e!==d.inward&&e!==d.outward||(i=!0)})),i},inlineDisplay:function(){var n=u.attr("style")||"";return Array.isArray(n.match(/display.*?;/,""))}},set:{animating:function(n){f.remove.completeCallback(),n=n||l.animation;n=f.get.animationClass(n);f.save.animation(n),f.force.visible()&&(f.remove.hidden(),f.remove.direction(),f.start.animation(n))},duration:function(n,e){!(e="number"==typeof(e=e||l.duration)?e+"ms":e)&&0!==e||(f.verbose("Setting animation duration",e),u.css({"animation-duration":e}))},direction:function(n){(n=n||f.get.direction())==d.inward?f.set.inward():f.set.outward()},looping:function(){f.debug("Transition set to loop"),u.addClass(d.looping)},hidden:function(){u.addClass(d.transition).addClass(d.hidden)},inward:function(){f.debug("Setting direction to inward"),u.removeClass(d.outward).addClass(d.inward)},outward:function(){f.debug("Setting direction to outward"),u.removeClass(d.inward).addClass(d.outward)},visible:function(){u.addClass(d.transition).addClass(d.visible)}},start:{animation:function(n){n=n||f.get.animationClass(),f.debug("Starting tween",n),u.addClass(n).one(a+".complete"+o,f.complete),l.useFailSafe&&f.add.failSafe(),f.set.duration(l.duration),l.onStart.call(m)}},save:{animation:function(n){f.cache||(f.cache={}),f.cache.animation=n},displayType:function(n){"none"!==n&&u.data(t.displayType,n)},transitionExists:function(n,e){C.fn.transition.exists[n]=e,f.verbose("Saving existence of transition",n,e)}},restore:{conditions:function(){var n=f.get.currentAnimation();n&&(u.removeClass(n),f.verbose("Removing animation class",f.cache)),f.remove.duration()}},add:{failSafe:function(){var n=f.get.duration();f.timer=setTimeout(function(){u.triggerHandler(a)},n+l.failSafeDelay),f.verbose("Adding fail safe timer",f.timer)}},remove:{animating:function(){u.removeClass(d.animating)},animationCallbacks:function(){f.remove.queueCallback(),f.remove.completeCallback()},queueCallback:function(){u.off(".queue"+o)},completeCallback:function(){u.off(".complete"+o)},display:function(){u.css("display","")},direction:function(){u.removeClass(d.inward).removeClass(d.outward)},duration:function(){u.css("animation-duration","")},failSafe:function(){f.verbose("Removing fail safe timer",f.timer),f.timer&&clearTimeout(f.timer)},hidden:function(){u.removeClass(d.hidden)},visible:function(){u.removeClass(d.visible)},looping:function(){f.debug("Transitions are no longer looping"),f.is.looping()&&(f.reset(),u.removeClass(d.looping))},transition:function(){u.removeClass(d.transition).removeClass(d.visible).removeClass(d.hidden)}},get:{settings:function(n,e,i){return"object"==typeof n?C.extend(!0,{},C.fn.transition.settings,n):"function"==typeof i?C.extend({},C.fn.transition.settings,{animation:n,onComplete:i,duration:e}):"string"==typeof e||"number"==typeof e?C.extend({},C.fn.transition.settings,{animation:n,duration:e}):"object"==typeof e?C.extend({},C.fn.transition.settings,e,{animation:n}):"function"==typeof e?C.extend({},C.fn.transition.settings,{animation:n,onComplete:e}):C.extend({},C.fn.transition.settings,{animation:n})},animationClass:function(n){var n=n||l.animation,e=f.can.transition()&&!f.has.direction()?f.get.direction()+" ":"";return d.animating+" "+d.transition+" "+e+n},currentAnimation:function(){return!(!f.cache||f.cache.animation===A)&&f.cache.animation},currentDirection:function(){return f.is.inward()?d.inward:d.outward},direction:function(){return f.is.hidden()||!f.is.visible()?d.inward:d.outward},animationDirection:function(n){var i;return"string"==typeof(n=n||l.animation)&&(n=n.split(" "),C.each(n,function(n,e){e===d.inward?i=d.inward:e===d.outward&&(i=d.outward)})),i||!1},duration:function(n){return"string"==typeof(n=!1===(n=n||l.duration)?u.css("animation-duration")||0:n)?-1<n.indexOf("ms")?parseFloat(n):1e3*parseFloat(n):n},displayType:function(n){return l.displayType||((n=n===A||n)&&u.data(t.displayType)===A&&(""===(n=u.css("display"))||"none"===n?f.can.transition(!0):f.save.displayType(n)),u.data(t.displayType))},userStyle:function(n){return(n=n||u.attr("style")||"").replace(/display.*?;/,"")},transitionExists:function(n){return C.fn.transition.exists[n]},animationStartEvent:function(){var n,e=S.createElement("div"),i={animation:"animationstart",OAnimation:"oAnimationStart",MozAnimation:"mozAnimationStart",WebkitAnimation:"webkitAnimationStart"};for(n in i)if(e.style[n]!==A)return i[n];return!1},animationEndEvent:function(){var n,e=S.createElement("div"),i={animation:"animationend",OAnimation:"oAnimationEnd",MozAnimation:"mozAnimationEnd",WebkitAnimation:"webkitAnimationEnd"};for(n in i)if(e.style[n]!==A)return i[n];return!1}},can:{transition:function(n){var e,i,t,a,o=l.animation,r=f.get.transitionExists(o),s=f.get.displayType(!1);if(r===A||n){if(f.verbose("Determining whether animation exists"),n=u.attr("class"),e=u.prop("tagName"),i=(e=C("<"+e+" />").addClass(n).insertAfter(u)).addClass(o).removeClass(d.inward).removeClass(d.outward).addClass(d.animating).addClass(d.transition).css("animationName"),e.detach().insertAfter(u),t=e.addClass(d.inward).css("animationName"),s||(e.detach().insertAfter(u),s=e.attr("class",n).removeAttr("style").removeClass(d.hidden).removeClass(d.visible).show().css("display"),f.verbose("Determining final display state",s),f.save.displayType(s)),e.remove(),i!=t)f.debug("Direction exists for animation",o),a=!0;else{if("none"==i||!i)return void f.debug("No animation defined in css",o);f.debug("Static animation found",o,s),a=!1}f.save.transitionExists(o,a)}return r!==A?r:a},animate:function(){return f.can.transition()!==A}},is:{animating:function(){return u.hasClass(d.animating)},inward:function(){return u.hasClass(d.inward)},outward:function(){return u.hasClass(d.outward)},looping:function(){return u.hasClass(d.looping)},occurring:function(n){return n="."+(n=n||l.animation).replace(" ","."),0<u.filter(n).length},visible:function(){return u.is(":visible")},hidden:function(){return"hidden"===u.css("visibility")},supported:function(){return!1!==a}},hide:function(){if(!1===l.onHide.call(m))return f.verbose("Hide callback returned false cancelling hide"),!1;f.verbose("Hiding element"),f.is.animating()&&f.reset(),m.blur(),f.remove.display(),f.remove.visible(),l.onBeforeHide.call(m,f.hideNow)},hideNow:function(){f.set.hidden(),f.force.hidden(),l.onHidden.call(m),l.onComplete.call(m)},show:function(n){f.force.visible()&&!1!==l.onShow.call(m)&&(f.verbose("Showing element",n),f.remove.hidden(),l.onBeforeShow.call(m,f.showNow))},showNow:function(){f.set.visible(),l.onVisible.call(m),l.onComplete.call(m)},toggle:function(){f.is.visible()?f.hide():f.show()},stop:function(){f.debug("Stopping current animation"),u.triggerHandler(a)},stopAll:function(){f.debug("Stopping all animation"),f.remove.queueCallback(),u.triggerHandler(a)},clear:{queue:function(){f.debug("Clearing animation queue"),f.remove.queueCallback()}},enable:function(){f.verbose("Starting animation"),u.removeClass(d.disabled)},disable:function(){f.debug("Stopping animation"),u.addClass(d.disabled)},setting:function(n,e){if(f.debug("Changing setting",n,e),C.isPlainObject(n))C.extend(!0,l,n);else{if(e===A)return l[n];C.isPlainObject(l[n])?C.extend(!0,l[n],e):l[n]=e}},internal:function(n,e){if(C.isPlainObject(n))C.extend(!0,f,n);else{if(e===A)return f[n];f[n]=e}},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(n){var e,i;l.performance&&(i=(e=Date.now())-(g||e),g=e,v.push({Name:n[0],Arguments:[].slice.call(n,1)||"",Element:m,"Execution Time":i})),clearTimeout(f.performance.timer),f.performance.timer=setTimeout(f.performance.display,500)},display:function(){var n=l.name+":",i=0;g=!1,clearTimeout(f.performance.timer),C.each(v,function(n,e){i+=e["Execution Time"]}),n+=" "+i+"ms",s&&(n+=" '"+s+"'"),1<r.length&&(n+=" ("+r.length+")"),(console.group!==A||console.table!==A)&&0<v.length&&(console.groupCollapsed(n),console.table?console.table(v):C.each(v,function(n,e){console.log(e.Name+": "+e["Execution Time"]+"ms")}),console.groupEnd()),v=[]}},invoke:function(t,n,e){var a,o,i,r,s=c;return n=n||h,e=e||m,"string"==typeof t&&s!==A&&(t=t.split(/[ .]/),a=t.length-1,C.each(t,function(n,e){var i=n!=a?e+t[n+1].charAt(0).toUpperCase()+t[n+1].slice(1):t;if(C.isPlainObject(s[i])&&n!=a)s=s[i];else{if(s[i]!==A)return o=s[i],!1;{if(!C.isPlainObject(s[e])||n==a)return s[e]!==A&&(o=s[e]),!1;s=s[e]}}})),"function"==typeof(r=o)&&"number"!=typeof r.nodeType?i=o.apply(e,n):o!==A&&(i=o),Array.isArray(p)?p.push(i):p!==A?p=[p,i]:i!==A&&(p=i),o!==A&&o}};f.initialize()}),p!==A?p:this},C.fn.transition.exists={},C.fn.transition.settings={name:"Transition",silent:!1,debug:!1,verbose:!1,performance:!0,namespace:"transition",interval:0,reverse:"auto",onStart:function(){},onComplete:function(){},onShow:function(){},onBeforeShow:function(n){n.call(this)},onVisible:function(){},onHide:function(){},onHidden:function(){},onBeforeHide:function(n){n.call(this)},useFailSafe:!0,failSafeDelay:100,allowRepeats:!1,displayType:!1,animation:"fade",duration:!1,queue:!0,skipInlineHidden:!1,metadata:{displayType:"display"},className:{animating:"animating",disabled:"disabled",hidden:"hidden",inward:"in",loading:"loading",looping:"looping",outward:"out",transition:"transition",visible:"visible"},error:{noAnimation:"Element is no longer attached to DOM. Unable to animate. Use silent setting to suppress this warning in production.",repeated:"That animation is already occurring, cancelling repeated animation",method:"The method you called is not defined",support:"This browser does not support CSS animations"}}}(jQuery,window,document);
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* # Fomantic-UI 2.9.1-beta.
|
2
|
+
* # Fomantic-UI 2.9.1-beta.24+029436f - Visibility
|
3
3
|
* https://github.com/fomantic/Fomantic-UI/
|
4
4
|
*
|
5
5
|
*
|
@@ -15,7 +15,7 @@
|
|
15
15
|
return typeof obj === 'function' && typeof obj.nodeType !== 'number';
|
16
16
|
}
|
17
17
|
|
18
|
-
window =
|
18
|
+
window = window !== undefined && window.Math === Math
|
19
19
|
? window
|
20
20
|
: globalThis;
|
21
21
|
|
@@ -24,11 +24,11 @@
|
|
24
24
|
$allModules = $(this),
|
25
25
|
moduleSelector = $allModules.selector || '',
|
26
26
|
|
27
|
-
time =
|
27
|
+
time = Date.now(),
|
28
28
|
performance = [],
|
29
29
|
|
30
30
|
query = arguments[0],
|
31
|
-
methodInvoked =
|
31
|
+
methodInvoked = typeof query === 'string',
|
32
32
|
queryArguments = [].slice.call(arguments, 1),
|
33
33
|
returnedValue,
|
34
34
|
|
@@ -38,7 +38,7 @@
|
|
38
38
|
|
39
39
|
$allModules.each(function () {
|
40
40
|
var
|
41
|
-
settings =
|
41
|
+
settings = $.isPlainObject(parameters)
|
42
42
|
? $.extend(true, {}, $.fn.visibility.settings, parameters)
|
43
43
|
: $.extend({}, $.fn.visibility.settings),
|
44
44
|
|
@@ -227,7 +227,7 @@
|
|
227
227
|
},
|
228
228
|
|
229
229
|
precache: function (images, callback) {
|
230
|
-
if (!(images
|
230
|
+
if (!Array.isArray(images)) {
|
231
231
|
images = [images];
|
232
232
|
}
|
233
233
|
var
|
@@ -427,21 +427,21 @@
|
|
427
427
|
},
|
428
428
|
verticallyScrollableContext: function () {
|
429
429
|
var
|
430
|
-
overflowY =
|
430
|
+
overflowY = $context[0] !== window
|
431
431
|
? $context.css('overflow-y')
|
432
432
|
: false
|
433
433
|
;
|
434
434
|
|
435
|
-
return
|
435
|
+
return overflowY == 'auto' || overflowY == 'scroll';
|
436
436
|
},
|
437
437
|
horizontallyScrollableContext: function () {
|
438
438
|
var
|
439
|
-
overflowX =
|
439
|
+
overflowX = $context[0] !== window
|
440
440
|
? $context.css('overflow-x')
|
441
441
|
: false
|
442
442
|
;
|
443
443
|
|
444
|
-
return
|
444
|
+
return overflowX == 'auto' || overflowX == 'scroll';
|
445
445
|
},
|
446
446
|
},
|
447
447
|
|
@@ -515,7 +515,7 @@
|
|
515
515
|
if (amount && newCallback) {
|
516
516
|
settings.onPassed[amount] = newCallback;
|
517
517
|
} else if (amount !== undefined) {
|
518
|
-
return
|
518
|
+
return module.get.pixelsPassed(amount) > calculations.pixelsPassed;
|
519
519
|
} else if (calculations.passing) {
|
520
520
|
$.each(settings.onPassed, function (amount, callback) {
|
521
521
|
if (calculations.bottomVisible || calculations.pixelsPassed > module.get.pixelsPassed(amount)) {
|
@@ -873,7 +873,7 @@
|
|
873
873
|
;
|
874
874
|
module.verbose('Saving element position');
|
875
875
|
// (quicker than $.extend)
|
876
|
-
element.fits =
|
876
|
+
element.fits = element.height < screen.height;
|
877
877
|
element.offset = $module.offset();
|
878
878
|
element.width = $module.outerWidth();
|
879
879
|
element.height = $module.outerHeight();
|
@@ -907,21 +907,21 @@
|
|
907
907
|
}
|
908
908
|
|
909
909
|
// visibility
|
910
|
-
element.topPassed =
|
911
|
-
element.bottomPassed =
|
910
|
+
element.topPassed = screen.top >= element.top;
|
911
|
+
element.bottomPassed = screen.top >= element.bottom;
|
912
912
|
element.topVisible = (screen.bottom >= element.top) && !element.topPassed;
|
913
913
|
element.bottomVisible = (screen.bottom >= element.bottom) && !element.bottomPassed;
|
914
914
|
element.pixelsPassed = 0;
|
915
915
|
element.percentagePassed = 0;
|
916
916
|
|
917
917
|
// meta calculations
|
918
|
-
element.onScreen = (
|
919
|
-
element.passing =
|
920
|
-
element.offScreen =
|
918
|
+
element.onScreen = (element.topVisible || element.passing) && !element.bottomPassed;
|
919
|
+
element.passing = element.topPassed && !element.bottomPassed;
|
920
|
+
element.offScreen = !element.onScreen;
|
921
921
|
|
922
922
|
// passing calculations
|
923
923
|
if (element.passing) {
|
924
|
-
element.pixelsPassed =
|
924
|
+
element.pixelsPassed = screen.top - element.top;
|
925
925
|
element.percentagePassed = (screen.top - element.top) / element.height;
|
926
926
|
}
|
927
927
|
module.cache.element = element;
|
@@ -957,13 +957,13 @@
|
|
957
957
|
element = module.get.elementCalculations()
|
958
958
|
;
|
959
959
|
if (amount.search('%') > -1) {
|
960
|
-
return
|
960
|
+
return element.height * (parseInt(amount, 10) / 100);
|
961
961
|
}
|
962
962
|
|
963
963
|
return parseInt(amount, 10);
|
964
964
|
},
|
965
965
|
occurred: function (callback) {
|
966
|
-
return
|
966
|
+
return module.cache.occurred !== undefined
|
967
967
|
? module.cache.occurred[callback] || false
|
968
968
|
: false;
|
969
969
|
},
|
@@ -1072,7 +1072,7 @@
|
|
1072
1072
|
previousTime
|
1073
1073
|
;
|
1074
1074
|
if (settings.performance) {
|
1075
|
-
currentTime =
|
1075
|
+
currentTime = Date.now();
|
1076
1076
|
previousTime = time || currentTime;
|
1077
1077
|
executionTime = currentTime - previousTime;
|
1078
1078
|
time = currentTime;
|
@@ -1123,11 +1123,11 @@
|
|
1123
1123
|
;
|
1124
1124
|
passedArguments = passedArguments || queryArguments;
|
1125
1125
|
context = context || element;
|
1126
|
-
if (typeof query
|
1127
|
-
query = query.split(/[
|
1126
|
+
if (typeof query === 'string' && object !== undefined) {
|
1127
|
+
query = query.split(/[ .]/);
|
1128
1128
|
maxDepth = query.length - 1;
|
1129
1129
|
$.each(query, function (depth, value) {
|
1130
|
-
var camelCaseValue =
|
1130
|
+
var camelCaseValue = depth != maxDepth
|
1131
1131
|
? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)
|
1132
1132
|
: query
|
1133
1133
|
;
|
@@ -1182,7 +1182,7 @@
|
|
1182
1182
|
}
|
1183
1183
|
});
|
1184
1184
|
|
1185
|
-
return
|
1185
|
+
return returnedValue !== undefined
|
1186
1186
|
? returnedValue
|
1187
1187
|
: this;
|
1188
1188
|
};
|