fomantic-ui 2.9.1-beta.24 → 2.9.1-beta.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslint/eqeqeq-rule.js +18 -0
- package/.eslint/index.js +3 -0
- package/.eslintrc.js +1 -2
- package/.stylelintrc.js +8 -12
- package/dist/components/accordion.css +3 -3
- package/dist/components/accordion.js +4 -4
- package/dist/components/accordion.min.css +2 -2
- package/dist/components/accordion.min.js +2 -2
- package/dist/components/ad.css +1 -1
- package/dist/components/ad.min.css +1 -1
- package/dist/components/api.js +19 -19
- package/dist/components/api.min.js +2 -2
- package/dist/components/breadcrumb.css +1 -1
- package/dist/components/breadcrumb.min.css +1 -1
- package/dist/components/button.css +5 -5
- package/dist/components/button.min.css +2 -2
- package/dist/components/calendar.css +1 -1
- package/dist/components/calendar.js +18 -17
- package/dist/components/calendar.min.css +1 -1
- package/dist/components/calendar.min.js +2 -2
- package/dist/components/card.css +4 -4
- package/dist/components/card.min.css +2 -2
- package/dist/components/checkbox.css +3 -3
- package/dist/components/checkbox.js +11 -11
- package/dist/components/checkbox.min.css +1 -1
- package/dist/components/checkbox.min.js +2 -2
- package/dist/components/comment.css +1 -1
- package/dist/components/comment.min.css +1 -1
- package/dist/components/container.css +2 -2
- package/dist/components/container.min.css +2 -2
- package/dist/components/dimmer.css +2 -2
- package/dist/components/dimmer.js +9 -9
- package/dist/components/dimmer.min.css +1 -1
- package/dist/components/dimmer.min.js +2 -2
- package/dist/components/divider.css +1 -1
- package/dist/components/divider.min.css +1 -1
- package/dist/components/dropdown.css +13 -13
- package/dist/components/dropdown.js +103 -91
- package/dist/components/dropdown.min.css +2 -2
- package/dist/components/dropdown.min.js +2 -2
- package/dist/components/embed.css +1 -1
- package/dist/components/embed.js +5 -5
- package/dist/components/embed.min.css +1 -1
- package/dist/components/embed.min.js +2 -2
- package/dist/components/emoji.css +3547 -3547
- package/dist/components/feed.css +1 -1
- package/dist/components/feed.min.css +1 -1
- package/dist/components/flag.css +265 -265
- package/dist/components/flag.min.css +1 -1
- package/dist/components/flyout.css +7 -7
- package/dist/components/flyout.js +10 -10
- package/dist/components/flyout.min.css +1 -1
- package/dist/components/flyout.min.js +2 -2
- package/dist/components/form.css +13 -13
- package/dist/components/form.js +77 -60
- package/dist/components/form.min.css +2 -2
- package/dist/components/form.min.js +2 -2
- package/dist/components/grid.css +2 -2
- package/dist/components/grid.min.css +2 -2
- package/dist/components/header.css +2 -2
- package/dist/components/header.min.css +2 -2
- package/dist/components/icon.css +1960 -1960
- package/dist/components/icon.min.css +2 -2
- package/dist/components/image.css +1 -1
- package/dist/components/image.min.css +1 -1
- package/dist/components/input.css +2 -2
- package/dist/components/input.min.css +2 -2
- package/dist/components/item.css +3 -3
- package/dist/components/item.min.css +2 -2
- package/dist/components/label.css +2 -2
- package/dist/components/label.min.css +2 -2
- package/dist/components/list.css +4 -4
- package/dist/components/list.min.css +2 -2
- package/dist/components/loader.css +1 -1
- package/dist/components/loader.min.css +1 -1
- package/dist/components/menu.css +2 -2
- package/dist/components/menu.min.css +1 -1
- package/dist/components/message.css +2 -2
- package/dist/components/message.min.css +2 -2
- package/dist/components/modal.css +2 -2
- package/dist/components/modal.js +4 -4
- package/dist/components/modal.min.css +2 -2
- package/dist/components/modal.min.js +2 -2
- package/dist/components/nag.css +1 -1
- package/dist/components/nag.js +5 -5
- package/dist/components/nag.min.css +1 -1
- package/dist/components/nag.min.js +2 -2
- package/dist/components/placeholder.css +1 -1
- package/dist/components/placeholder.min.css +1 -1
- package/dist/components/popup.css +2 -2
- package/dist/components/popup.js +39 -31
- package/dist/components/popup.min.css +2 -2
- package/dist/components/popup.min.js +2 -2
- package/dist/components/progress.css +1 -1
- package/dist/components/progress.js +12 -12
- package/dist/components/progress.min.css +1 -1
- package/dist/components/progress.min.js +2 -2
- package/dist/components/rail.css +1 -1
- package/dist/components/rail.min.css +1 -1
- package/dist/components/rating.css +31 -31
- package/dist/components/rating.js +6 -6
- package/dist/components/rating.min.css +1 -1
- package/dist/components/rating.min.js +2 -2
- package/dist/components/reset.css +1 -1
- package/dist/components/reset.min.css +1 -1
- package/dist/components/reveal.css +13 -13
- package/dist/components/reveal.min.css +1 -1
- package/dist/components/search.css +4 -4
- package/dist/components/search.js +16 -16
- package/dist/components/search.min.css +2 -2
- package/dist/components/search.min.js +2 -2
- package/dist/components/segment.css +2 -2
- package/dist/components/segment.min.css +2 -2
- package/dist/components/shape.css +1 -1
- package/dist/components/shape.js +5 -5
- package/dist/components/shape.min.css +1 -1
- package/dist/components/shape.min.js +2 -2
- package/dist/components/sidebar.css +33 -33
- package/dist/components/sidebar.js +13 -13
- package/dist/components/sidebar.min.css +1 -1
- package/dist/components/sidebar.min.js +2 -2
- package/dist/components/site.css +18 -18
- package/dist/components/site.js +4 -4
- package/dist/components/site.min.css +2 -2
- package/dist/components/site.min.js +2 -2
- package/dist/components/slider.js +50 -37
- package/dist/components/slider.min.js +2 -2
- package/dist/components/state.js +5 -5
- package/dist/components/state.min.js +2 -2
- package/dist/components/statistic.css +3 -3
- package/dist/components/statistic.min.css +2 -2
- package/dist/components/step.css +4 -4
- package/dist/components/step.min.css +2 -2
- package/dist/components/sticky.css +1 -1
- package/dist/components/sticky.js +8 -8
- package/dist/components/sticky.min.css +1 -1
- package/dist/components/sticky.min.js +2 -2
- package/dist/components/tab.css +1 -1
- package/dist/components/tab.js +17 -17
- package/dist/components/tab.min.css +1 -1
- package/dist/components/tab.min.js +2 -2
- package/dist/components/table.css +8 -2
- package/dist/components/table.min.css +1 -1
- package/dist/components/text.css +1 -1
- package/dist/components/text.min.css +1 -1
- package/dist/components/toast.css +1 -1
- package/dist/components/toast.js +4 -4
- package/dist/components/toast.min.css +1 -1
- package/dist/components/toast.min.js +2 -2
- package/dist/components/transition.css +97 -97
- package/dist/components/transition.js +8 -8
- package/dist/components/transition.min.css +1 -1
- package/dist/components/transition.min.js +2 -2
- package/dist/components/visibility.js +12 -12
- package/dist/components/visibility.min.js +2 -2
- package/dist/semantic.css +6078 -6074
- package/dist/semantic.js +464 -413
- package/dist/semantic.min.css +2 -2
- package/dist/semantic.min.js +2 -2
- package/package.json +1 -1
- package/src/_site/modules/embed.variables +3 -0
- package/src/definitions/behaviors/api.js +18 -18
- package/src/definitions/behaviors/form.js +76 -59
- package/src/definitions/behaviors/state.js +4 -4
- package/src/definitions/behaviors/visibility.js +11 -11
- package/src/definitions/collections/breadcrumb.less +2 -2
- package/src/definitions/collections/form.less +12 -12
- package/src/definitions/collections/grid.less +7 -7
- package/src/definitions/collections/menu.less +4 -4
- package/src/definitions/collections/message.less +38 -38
- package/src/definitions/collections/table.less +3 -3
- package/src/definitions/elements/button.less +12 -12
- package/src/definitions/elements/container.less +2 -2
- package/src/definitions/elements/divider.less +2 -2
- package/src/definitions/elements/emoji.less +5 -5
- package/src/definitions/elements/flag.less +11 -11
- package/src/definitions/elements/header.less +2 -2
- package/src/definitions/elements/icon.less +22 -22
- package/src/definitions/elements/image.less +2 -2
- package/src/definitions/elements/input.less +2 -2
- package/src/definitions/elements/label.less +4 -4
- package/src/definitions/elements/list.less +3 -3
- package/src/definitions/elements/loader.less +2 -2
- package/src/definitions/elements/placeholder.less +2 -2
- package/src/definitions/elements/rail.less +2 -2
- package/src/definitions/elements/reveal.less +8 -8
- package/src/definitions/elements/segment.less +3 -3
- package/src/definitions/elements/step.less +2 -2
- package/src/definitions/elements/text.less +2 -2
- package/src/definitions/globals/reset.less +2 -2
- package/src/definitions/globals/site.js +3 -3
- package/src/definitions/globals/site.less +9 -9
- package/src/definitions/modules/accordion.js +3 -3
- package/src/definitions/modules/accordion.less +2 -2
- package/src/definitions/modules/calendar.js +17 -16
- package/src/definitions/modules/calendar.less +2 -2
- package/src/definitions/modules/checkbox.js +10 -10
- package/src/definitions/modules/checkbox.less +2 -2
- package/src/definitions/modules/dimmer.js +8 -8
- package/src/definitions/modules/dimmer.less +3 -3
- package/src/definitions/modules/dropdown.js +102 -90
- package/src/definitions/modules/dropdown.less +6 -6
- package/src/definitions/modules/embed.js +4 -4
- package/src/definitions/modules/embed.less +2 -2
- package/src/definitions/modules/flyout.js +9 -9
- package/src/definitions/modules/flyout.less +5 -5
- package/src/definitions/modules/modal.js +3 -3
- package/src/definitions/modules/modal.less +7 -7
- package/src/definitions/modules/nag.js +4 -4
- package/src/definitions/modules/nag.less +3 -3
- package/src/definitions/modules/popup.js +38 -30
- package/src/definitions/modules/popup.less +2 -2
- package/src/definitions/modules/progress.js +11 -11
- package/src/definitions/modules/progress.less +2 -2
- package/src/definitions/modules/rating.js +5 -5
- package/src/definitions/modules/rating.less +14 -10
- package/src/definitions/modules/search.js +15 -15
- package/src/definitions/modules/search.less +2 -2
- package/src/definitions/modules/shape.js +4 -4
- package/src/definitions/modules/shape.less +2 -2
- package/src/definitions/modules/sidebar.js +12 -12
- package/src/definitions/modules/sidebar.less +18 -18
- package/src/definitions/modules/slider.js +49 -36
- package/src/definitions/modules/slider.less +2 -2
- package/src/definitions/modules/sticky.js +7 -7
- package/src/definitions/modules/sticky.less +2 -2
- package/src/definitions/modules/tab.js +16 -16
- package/src/definitions/modules/tab.less +2 -2
- package/src/definitions/modules/toast.js +3 -3
- package/src/definitions/modules/toast.less +5 -5
- package/src/definitions/modules/transition.js +7 -7
- package/src/definitions/modules/transition.less +2 -2
- package/src/definitions/views/ad.less +2 -2
- package/src/definitions/views/card.less +16 -16
- package/src/definitions/views/comment.less +2 -2
- package/src/definitions/views/feed.less +2 -2
- package/src/definitions/views/item.less +3 -3
- package/src/definitions/views/statistic.less +2 -2
- package/src/semantic.less +54 -52
- package/src/theme.config.example +53 -53
- package/src/theme.less +13 -13
- package/src/themes/amazon/elements/button.variables +1 -1
- package/src/themes/amazon/globals/site.variables +5 -5
- package/src/themes/basic/elements/icon.overrides +4 -4
- package/src/themes/basic/elements/icon.variables +2 -2
- package/src/themes/basic/modules/progress.variables +2 -2
- package/src/themes/basic/views/card.variables +3 -3
- package/src/themes/bookish/elements/header.variables +1 -1
- package/src/themes/bootstrap3/elements/button.overrides +3 -0
- package/src/themes/bootstrap3/elements/button.variables +8 -8
- package/src/themes/chubby/collections/menu.overrides +3 -0
- package/src/themes/chubby/collections/menu.variables +2 -2
- package/src/themes/chubby/elements/button.overrides +4 -4
- package/src/themes/chubby/elements/header.variables +1 -1
- package/src/themes/chubby/modules/accordion.variables +1 -1
- package/src/themes/chubby/views/comment.overrides +1 -1
- package/src/themes/chubby/views/comment.variables +4 -4
- package/src/themes/classic/collections/table.variables +1 -1
- package/src/themes/classic/elements/button.variables +17 -17
- package/src/themes/classic/modules/progress.variables +1 -1
- package/src/themes/classic/views/card.overrides +13 -13
- package/src/themes/classic/views/card.variables +2 -2
- package/src/themes/colored/modules/checkbox.overrides +3 -0
- package/src/themes/colored/modules/checkbox.variables +1 -1
- package/src/themes/default/collections/grid.variables +1 -1
- package/src/themes/default/collections/menu.variables +2 -2
- package/src/themes/default/collections/table.overrides +3 -0
- package/src/themes/default/collections/table.variables +1 -1
- package/src/themes/default/elements/container.variables +9 -9
- package/src/themes/default/elements/divider.variables +2 -2
- package/src/themes/default/elements/emoji.variables +2 -2
- package/src/themes/default/elements/flag.variables +2 -2
- package/src/themes/default/elements/header.variables +15 -15
- package/src/themes/default/elements/icon.variables +1979 -1979
- package/src/themes/default/elements/label.variables +24 -24
- package/src/themes/default/elements/list.variables +3 -3
- package/src/themes/default/elements/loader.variables +8 -8
- package/src/themes/default/elements/rail.variables +2 -2
- package/src/themes/default/elements/segment.variables +1 -1
- package/src/themes/default/elements/step.overrides +2 -2
- package/src/themes/default/elements/step.variables +1 -1
- package/src/themes/default/globals/colors.less +450 -450
- package/src/themes/default/globals/site.variables +821 -821
- package/src/themes/default/modules/accordion.overrides +1 -1
- package/src/themes/default/modules/checkbox.overrides +2 -2
- package/src/themes/default/modules/dimmer.variables +7 -7
- package/src/themes/default/modules/dropdown.overrides +8 -8
- package/src/themes/default/modules/dropdown.variables +2 -2
- package/src/themes/default/modules/flyout.variables +1 -1
- package/src/themes/default/modules/modal.variables +1 -1
- package/src/themes/default/modules/popup.variables +1 -1
- package/src/themes/default/modules/search.variables +1 -1
- package/src/themes/default/modules/sidebar.variables +1 -1
- package/src/themes/default/modules/slider.variables +45 -45
- package/src/themes/default/modules/toast.variables +6 -6
- package/src/themes/default/modules/transition.overrides +24 -24
- package/src/themes/default/views/card.variables +11 -11
- package/src/themes/default/views/item.variables +4 -4
- package/src/themes/famfamfam/elements/flag.variables +2 -2
- package/src/themes/fixed-width/collections/grid.variables +3 -3
- package/src/themes/fixed-width/modules/modal.variables +9 -9
- package/src/themes/flat/collections/form.overrides +1 -1
- package/src/themes/flat/collections/form.variables +9 -9
- package/src/themes/flat/globals/site.variables +50 -50
- package/src/themes/github/collections/form.overrides +2 -2
- package/src/themes/github/collections/form.variables +2 -2
- package/src/themes/github/collections/menu.overrides +1 -1
- package/src/themes/github/collections/menu.variables +4 -4
- package/src/themes/github/collections/message.variables +5 -5
- package/src/themes/github/elements/button.variables +2 -2
- package/src/themes/github/elements/icon.variables +2 -2
- package/src/themes/github/elements/segment.variables +2 -2
- package/src/themes/github/elements/step.overrides +1 -1
- package/src/themes/github/elements/step.variables +2 -2
- package/src/themes/github/globals/site.variables +5 -5
- package/src/themes/github/modules/dropdown.overrides +4 -4
- package/src/themes/github/modules/dropdown.variables +6 -6
- package/src/themes/gmail/collections/message.overrides +3 -0
- package/src/themes/gmail/collections/message.variables +2 -2
- package/src/themes/instagram/views/card.overrides +1 -1
- package/src/themes/instagram/views/card.variables +1 -1
- package/src/themes/joypixels/elements/emoji.variables +2 -2
- package/src/themes/material/collections/menu.variables +2 -2
- package/src/themes/material/elements/button.overrides +4 -4
- package/src/themes/material/elements/button.variables +25 -25
- package/src/themes/material/elements/header.variables +6 -6
- package/src/themes/material/elements/icon.variables +4 -4
- package/src/themes/material/globals/site.overrides +3 -0
- package/src/themes/material/globals/site.variables +52 -52
- package/src/themes/material/modules/dropdown.overrides +1 -1
- package/src/themes/material/modules/dropdown.variables +3 -3
- package/src/themes/material/modules/modal.overrides +1 -1
- package/src/themes/material/modules/modal.variables +3 -3
- package/src/themes/pulsar/elements/loader.overrides +4 -4
- package/src/themes/round/elements/button.overrides +3 -0
- package/src/themes/round/elements/button.variables +15 -15
- package/src/themes/rtl/globals/site.variables +3 -3
- package/src/themes/striped/modules/progress.overrides +1 -1
- package/src/themes/systemfont/globals/site.variables +6 -6
- package/src/themes/timeline/views/feed.variables +4 -4
- package/src/themes/twitter/elements/button.overrides +1 -1
- package/src/themes/twitter/elements/button.variables +1 -1
- package/src/themes/twitter/elements/emoji.variables +2 -2
- package/tasks/admin/components/init.js +1 -1
- package/tasks/admin/components/update.js +1 -1
- package/tasks/admin/distributions/create.js +4 -5
- package/tasks/admin/distributions/init.js +1 -1
- package/tasks/admin/distributions/update.js +1 -1
- package/tasks/config/project/config.js +2 -2
- package/tasks/config/project/install.js +8 -8
- package/tasks/config/project/release.js +1 -1
- package/tasks/config/tasks.js +2 -2
- package/tasks/docs/metadata.js +1 -1
- package/tasks/install.js +3 -3
- package/test/modules/module.spec.js +1 -1
@@ -1,5 +1,5 @@
|
|
1
1
|
/*
|
2
|
-
* # Fomantic UI - 2.9.1-beta.
|
2
|
+
* # Fomantic UI - 2.9.1-beta.26+1084e98
|
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(V,W,M,z){"use strict";function G(t){return"function"==typeof t&&"number"!=typeof t.nodeType}W=W!==z&&W.Math===Math?W:globalThis,V.fn.popup=function(T){var E,t=V(this),k=V(M),S=V(W),O=V("body"),A=t.selector||"",D="ontouchstart"in M.documentElement?"touchstart":"click",j=Date.now(),F=[],R=T,H="string"==typeof R,N=[].slice.call(arguments,1);return t.each(function(){var p,s,t,e,o,u=V.isPlainObject(T)?V.extend(!0,{},V.fn.popup.settings,T):V.extend({},V.fn.popup.settings),n=u.selector,c=u.className,d=u.error,f=u.metadata,i=u.namespace,r="."+u.namespace,a="module-"+i,h=V(this),l=[W,M].indexOf(u.context)<0?k.find(u.context):V(u.context),g=[W,M].indexOf(u.scrollContext)<0?k.find(u.scrollContext):V(u.scrollContext),m=[W,M].indexOf(u.boundary)<0?k.find(u.boundary):V(u.boundary),b=u.target?[W,M].indexOf(u.target)<0?k.find(u.target):V(u.target):h,v=0,w=!1,y=!1,P=this,C=h.data(a),x={initialize:function(){x.debug("Initializing",h),x.createID(),x.bind.events(),!x.exists()&&u.preserve&&x.create(),u.observeChanges&&x.observeChanges(),x.instantiate()},instantiate:function(){x.verbose("Storing instance",x),C=x,h.data(a,C)},observeChanges:function(){"MutationObserver"in W&&((t=new MutationObserver(x.event.documentChanged)).observe(M,{childList:!0,subtree:!0}),x.debug("Setting up mutation observer",t))},refresh:function(){u.popup?p=k.find(u.popup).eq(0):u.inline&&(p=b.nextAll(n.popup).eq(0),u.popup=p),u.popup?(p.addClass(c.loading),s=x.get.offsetParent(),p.removeClass(c.loading),u.movePopup&&x.has.popup()&&x.get.offsetParent(p)[0]!==s[0]&&(x.debug("Moving popup to the same offset parent as target"),p.detach().appendTo(s))):s=u.inline?x.get.offsetParent(b):x.has.popup()?x.get.offsetParent(p):O,s.is("html")&&s[0]!==O[0]&&(x.debug("Setting page as offset parent"),s=O),x.get.variation()&&x.set.variation()},reposition:function(){x.refresh(),x.set.position()},destroy:function(){x.debug("Destroying previous module"),t&&t.disconnect(),p&&!u.preserve&&x.removePopup(),clearTimeout(x.hideTimer),clearTimeout(x.showTimer),x.unbind.close(),x.unbind.events(),h.removeData(a)},event:{start:function(t){var e=V.isPlainObject(u.delay)?u.delay.show:u.delay;clearTimeout(x.hideTimer),y&&!u.addTouchEvents||(x.showTimer=setTimeout(x.show,e))},end:function(){var t=V.isPlainObject(u.delay)?u.delay.hide:u.delay;clearTimeout(x.showTimer),x.hideTimer=setTimeout(x.hide,t)},touchstart:function(t){y=!0,u.addTouchEvents&&x.show()},resize:function(){x.is.visible()&&x.set.position()},documentChanged:function(t){[].forEach.call(t,function(t){t.removedNodes&&[].forEach.call(t.removedNodes,function(t){(t==P||0<V(t).find(P).length)&&(x.debug("Element removed from DOM, tearing down events"),x.destroy())})})},hideGracefully:function(t){var e=V(t.target),o=V.contains(M.documentElement,t.target),e=0<e.closest(n.popup).length;t&&!e&&o?(x.debug("Click occurred outside popup hiding popup"),x.hide()):x.debug("Click was inside popup, keeping popup open")}},create:function(){var t=x.get.html(),e=x.get.title(),o=x.get.content();t||o||e?(x.debug("Creating pop-up html"),t=t||u.templates.popup({title:e,content:o}),p=V("<div/>").addClass(c.popup).data(f.activator,h).html(t),u.inline?(x.verbose("Inserting popup element inline",p),p.insertAfter(h)):(x.verbose("Appending popup element to body",p),p.appendTo(l)),x.refresh(),x.set.variation(),u.hoverable&&x.bind.popup(),u.onCreate.call(p,P)):u.popup?(k.find(u.popup).data(f.activator,h),x.verbose("Used popup specified in settings"),x.refresh(),u.hoverable&&x.bind.popup()):0<b.next(n.popup).length?(x.verbose("Pre-existing popup found"),u.inline=!0,u.popup=b.next(n.popup).data(f.activator,h),x.refresh(),u.hoverable&&x.bind.popup()):x.debug("No content specified skipping display",P)},createID:function(){o=(Math.random().toString(16)+"000000000").slice(2,10),e="."+o,x.verbose("Creating unique id for element",o)},toggle:function(){x.debug("Toggling pop-up"),x.is.hidden()?(x.debug("Popup is hidden, showing pop-up"),x.unbind.close(),x.show()):(x.debug("Popup is visible, hiding pop-up"),x.hide())},show:function(t){t=t||function(){},x.debug("Showing pop-up",u.transition),!x.is.hidden()||x.is.active()&&x.is.dropdown()||(x.exists()||x.create(),!1===u.onShow.call(p,P)?x.debug("onShow callback returned false, cancelling popup animation"):(u.preserve||u.popup||x.refresh(),p&&x.set.position()&&(x.save.conditions(),u.exclusive&&x.hideAll(),x.animate.show(t))))},hide:function(t){t=t||function(){},(x.is.visible()||x.is.animating())&&(!1===u.onHide.call(p,P)?x.debug("onHide callback returned false, cancelling popup animation"):(x.remove.visible(),x.unbind.close(),x.restore.conditions(),x.animate.hide(t)))},hideAll:function(){k.find(n.popup).filter("."+c.popupVisible).each(function(){V(this).data(f.activator).popup("hide")})},exists:function(){return!!p&&(u.inline||u.popup?x.has.popup():0<p.closest(l).length)},removePopup:function(){x.has.popup()&&!u.popup&&(x.debug("Removing popup",p),p.remove(),p=z,u.onRemove.call(p,P))},save:{conditions:function(){x.cache={title:h.attr("title")},x.cache.title&&h.removeAttr("title"),x.verbose("Saving original attributes",x.cache.title)}},restore:{conditions:function(){return x.cache&&x.cache.title&&(h.attr("title",x.cache.title),x.verbose("Restoring original attributes",x.cache.title)),!0}},supports:{svg:function(){return"undefined"!=typeof SVGGraphicsElement}},animate:{show:function(t){t=G(t)?t:function(){},u.transition&&V.fn.transition!==z&&h.transition("is supported")?(x.set.visible(),p.transition({animation:(u.transition.showMethod||u.transition)+" in",queue:!1,debug:u.debug,verbose:u.verbose,silent:u.silent,duration:u.transition.showDuration||u.duration,onComplete:function(){x.bind.close(),t.call(p,P),u.onVisible.call(p,P)}})):x.error(d.noTransition)},hide:function(t){t=G(t)?t:function(){},x.debug("Hiding pop-up"),u.transition&&V.fn.transition!==z&&h.transition("is supported")?p.transition({animation:(u.transition.hideMethod||u.transition)+" out",queue:!1,duration:u.transition.hideDuration||u.duration,debug:u.debug,verbose:u.verbose,silent:u.silent,onComplete:function(){x.reset(),t.call(p,P),u.onHidden.call(p,P)}}):x.error(d.noTransition)}},change:{content:function(t){p.html(t)}},get:{html:function(){return h.removeData(f.html),h.data(f.html)||u.html},title:function(){return h.removeData(f.title),h.data(f.title)||u.title},content:function(){return h.removeData(f.content),h.data(f.content)||u.content||h.attr("title")},variation:function(){return h.removeData(f.variation),h.data(f.variation)||u.variation},popup:function(){return p},popupOffset:function(){return p.offset()},calculations:function(){var t=x.get.offsetParent(p),e=b[0],o=m[0]==W,n=b.offset(),i=u.inline||u.popup&&u.movePopup?b.offsetParent().offset():{top:0,left:0},r=o?{top:0,left:0}:m.offset(),a={},o=o?{top:S.scrollTop(),left:S.scrollLeft()}:{top:0,left:0},a={target:{element:b[0],width:b.outerWidth(),height:b.outerHeight(),top:n.top-i.top,left:n.left-i.left,margin:{}},popup:{width:p.outerWidth(),height:p.outerHeight()},parent:{width:s.outerWidth(),height:s.outerHeight()},screen:{top:r.top,left:r.left,scroll:{top:o.top,left:o.left},width:m.width(),height:m.height()}};return t[0]!==s[0]&&(n=t.offset(),a.target.top-=n.top,a.target.left-=n.left,a.parent.width=t.outerWidth(),a.parent.height=t.outerHeight()),u.setFluidWidth&&x.is.fluid()&&(a.container={width:p.parent().outerWidth()},a.popup.width=a.container.width),a.target.margin.top=u.inline?parseInt(W.getComputedStyle(e).getPropertyValue("margin-top"),10):0,a.target.margin.left=u.inline?x.is.rtl()?parseInt(W.getComputedStyle(e).getPropertyValue("margin-right"),10):parseInt(W.getComputedStyle(e).getPropertyValue("margin-left"),10):0,i=a.screen,a.boundary={top:i.top+i.scroll.top,bottom:i.top+i.scroll.top+i.height,left:i.left+i.scroll.left,right:i.left+i.scroll.left+i.width},a},id:function(){return o},startEvent:function(){return"hover"==u.on?"mouseenter":"focus"==u.on&&"focus"},scrollEvent:function(){return"scroll"},endEvent:function(){return"hover"==u.on?"mouseleave":"focus"==u.on&&"blur"},distanceFromBoundary:function(t,e){var o={},n=(e=e||x.get.calculations()).popup,e=e.boundary;return t&&(o={top:t.top-e.top,left:t.left-e.left,right:e.right-(t.left+n.width),bottom:e.bottom-(t.top+n.height)},x.verbose("Distance from boundaries determined",t,o)),o},offsetParent:function(t){var e=(t!==z?t:b)[0].parentNode,o=V(e);if(e)for(var n="none"===o.css("transform"),i="static"===o.css("position"),r=o.is("body");e&&!r&&i&&n;)e=e.parentNode,n="none"===(o=V(e)).css("transform"),i="static"===o.css("position"),r=o.is("body");return o&&0<o.length?o:V()},positions:function(){return{"top left":!1,"top center":!1,"top right":!1,"bottom left":!1,"bottom center":!1,"bottom right":!1,"left center":!1,"right center":!1}},nextPosition:function(t){var e=t.split(" "),o=e[0],e=e[1],n="top"==o||"bottom"==o,i=!1,r=!1,a=!1;return w||(x.verbose("All available positions available"),w=x.get.positions()),x.debug("Recording last position tried",t),w[t]=!0,"opposite"===u.prefer&&(a=(a=[{top:"bottom",bottom:"top",left:"right",right:"left"}[o],e]).join(" "),i=!0===w[a],x.debug("Trying opposite strategy",a)),"adjacent"===u.prefer&&n&&(a=(a=[o,{left:"center",center:"right",right:"left"}[e]]).join(" "),r=!0===w[a],x.debug("Trying adjacent strategy",a)),(r||i)&&(x.debug("Using backup position",a),a={"top left":"top center","top center":"top right","top right":"right center","right center":"bottom right","bottom right":"bottom center","bottom center":"bottom left","bottom left":"left center","left center":"top left"}[t]),a}},set:{position:function(t,e){if(0!==b.length&&0!==p.length){var o,n,i,r,a,s,l;if(e=e||x.get.calculations(),t=t||h.data(f.position)||u.position,o=h.data(f.offset)||u.offset,n=u.distanceAway,i=e.target,r=e.popup,a=e.parent,x.should.centerArrow(e)&&(x.verbose("Adjusting offset to center arrow on small target element"),"top left"!=t&&"bottom left"!=t||(o=(o+=i.width/2)-u.arrowPixelsFromEdge),"top right"!=t&&"bottom right"!=t||(o=(o-=i.width/2)+u.arrowPixelsFromEdge)),0===i.width&&0===i.height&&!x.is.svg(i.element))return x.debug("Popup target is hidden, no action taken"),!1;switch(u.inline&&(x.debug("Adding margin to calculation",i.margin),"left center"==t||"right center"==t?(o+=i.margin.top,n+=-i.margin.left):"top left"==t||"top center"==t||"top right"==t?(o+=i.margin.left,n-=i.margin.top):(o+=i.margin.left,n+=i.margin.top)),x.debug("Determining popup position from calculations",t,e),x.is.rtl()&&(t=t.replace(/left|right/g,function(t){return"left"==t?"right":"left"}),x.debug("RTL: Popup position updated",t)),t=v==u.maxSearchDepth&&"string"==typeof u.lastResort?u.lastResort:t){case"top left":s={top:"auto",bottom:a.height-i.top+n,left:i.left+o,right:"auto"};break;case"top center":s={bottom:a.height-i.top+n,left:i.left+i.width/2-r.width/2+o,top:"auto",right:"auto"};break;case"top right":s={bottom:a.height-i.top+n,right:a.width-i.left-i.width-o,top:"auto",left:"auto"};break;case"left center":s={top:i.top+i.height/2-r.height/2+o,right:a.width-i.left+n,left:"auto",bottom:"auto"};break;case"right center":s={top:i.top+i.height/2-r.height/2+o,left:i.left+i.width+n,bottom:"auto",right:"auto"};break;case"bottom left":s={top:i.top+i.height+n,left:i.left+o,bottom:"auto",right:"auto"};break;case"bottom center":s={top:i.top+i.height+n,left:i.left+i.width/2-r.width/2+o,bottom:"auto",right:"auto"};break;case"bottom right":s={top:i.top+i.height+n,right:a.width-i.left-i.width-o,left:"auto",bottom:"auto"}}if(s===z&&x.error(d.invalidPosition,t),x.debug("Calculated popup positioning values",s),p.css(s).removeClass(c.position).addClass(t).addClass(c.loading),l=x.get.popupOffset(),l=x.get.distanceFromBoundary(l,e),!u.forcePosition&&x.is.offstage(l,t)){if(x.debug("Position is outside viewport",t),v<u.maxSearchDepth)return v++,t=x.get.nextPosition(t),x.debug("Trying new position",t),!!p&&x.set.position(t,e);if(!u.lastResort)return x.debug("Popup could not find a position to display",p),x.error(d.cannotPlace,P),x.remove.attempts(),x.remove.loading(),x.reset(),u.onUnplaceable.call(p,P),!1;x.debug("No position found, showing with last position")}return x.debug("Position is on stage",t),x.remove.attempts(),x.remove.loading(),u.setFluidWidth&&x.is.fluid()&&x.set.fluidWidth(e),!0}x.error(d.notFound)},fluidWidth:function(t){t=t||x.get.calculations(),x.debug("Automatically setting element width to parent width",t.parent.width),p.css("width",t.container.width)},variation:function(t){(t=t||x.get.variation())&&x.has.popup()&&(x.verbose("Adding variation to popup",t),p.addClass(t))},visible:function(){h.addClass(c.visible)}},remove:{loading:function(){p.removeClass(c.loading)},variation:function(t){(t=t||x.get.variation())&&(x.verbose("Removing variation",t),p.removeClass(t))},visible:function(){h.removeClass(c.visible)},attempts:function(){x.verbose("Resetting all searched positions"),v=0,w=!1}},bind:{events:function(){x.debug("Binding popup events to module"),"click"==u.on&&h.on(D+r,x.toggle),"hover"==u.on&&h.on("touchstart"+r,x.event.touchstart),x.get.startEvent()&&h.on(x.get.startEvent()+r,x.event.start).on(x.get.endEvent()+r,x.event.end),u.target&&x.debug("Target set to element",b),S.on("resize"+e,x.event.resize)},popup:function(){x.verbose("Allowing hover events on popup to prevent closing"),p&&x.has.popup()&&p.on("mouseenter"+r,x.event.start).on("mouseleave"+r,x.event.end)},close:function(){(!0===u.hideOnScroll||"auto"==u.hideOnScroll&&"click"!=u.on)&&x.bind.closeOnScroll(),x.is.closable()?x.bind.clickaway():"hover"==u.on&&y&&x.bind.touchClose()},closeOnScroll:function(){x.verbose("Binding scroll close event to document"),g.one(x.get.scrollEvent()+e,x.event.hideGracefully)},touchClose:function(){x.verbose("Binding popup touchclose event to document"),k.on("touchstart"+e,function(t){x.verbose("Touched away from popup"),x.event.hideGracefully.call(P,t)})},clickaway:function(){x.verbose("Binding popup close event to document"),k.on(D+e,function(t){x.verbose("Clicked away from popup"),x.event.hideGracefully.call(P,t)})}},unbind:{events:function(){S.off(e),h.off(r)},close:function(){k.off(e),g.off(e)}},has:{popup:function(){return p&&0<p.length}},should:{centerArrow:function(t){return!x.is.basic()&&t.target.width<=2*u.arrowPixelsFromEdge}},is:{closable:function(){return"auto"==u.closable?"hover"!=u.on:u.closable},offstage:function(t,o){var n=[];return V.each(t,function(t,e){e<-u.jitter&&(x.debug("Position exceeds allowable distance from edge",t,e,o),n.push(t))}),0<n.length},svg:function(t){return x.supports.svg()&&t instanceof SVGGraphicsElement},basic:function(){return h.hasClass(c.basic)},active:function(){return h.hasClass(c.active)},animating:function(){return p!==z&&p.hasClass(c.animating)},fluid:function(){return p!==z&&p.hasClass(c.fluid)},visible:function(){return p!==z&&p.hasClass(c.popupVisible)},dropdown:function(){return h.hasClass(c.dropdown)},hidden:function(){return!x.is.visible()},rtl:function(){return"rtl"===h.attr("dir")||"rtl"===h.css("direction")||"rtl"===O.attr("dir")||"rtl"===O.css("direction")||"rtl"===l.attr("dir")||"rtl"===l.css("direction")}},reset:function(){x.remove.visible(),u.preserve?V.fn.transition!==z&&p.transition("remove transition"):x.removePopup()},setting:function(t,e){if(V.isPlainObject(t))V.extend(!0,u,t);else{if(e===z)return u[t];u[t]=e}},internal:function(t,e){if(V.isPlainObject(t))V.extend(!0,x,t);else{if(e===z)return x[t];x[t]=e}},debug:function(){!u.silent&&u.debug&&(u.performance?x.performance.log(arguments):(x.debug=Function.prototype.bind.call(console.info,console,u.name+":"),x.debug.apply(console,arguments)))},verbose:function(){!u.silent&&u.verbose&&u.debug&&(u.performance?x.performance.log(arguments):(x.verbose=Function.prototype.bind.call(console.info,console,u.name+":"),x.verbose.apply(console,arguments)))},error:function(){u.silent||(x.error=Function.prototype.bind.call(console.error,console,u.name+":"),x.error.apply(console,arguments))},performance:{log:function(t){var e,o;u.performance&&(o=(e=Date.now())-(j||e),j=e,F.push({Name:t[0],Arguments:[].slice.call(t,1)||"",Element:P,"Execution Time":o})),clearTimeout(x.performance.timer),x.performance.timer=setTimeout(x.performance.display,500)},display:function(){var t=u.name+":",o=0;j=!1,clearTimeout(x.performance.timer),V.each(F,function(t,e){o+=e["Execution Time"]}),t+=" "+o+"ms",A&&(t+=" '"+A+"'"),(console.group!==z||console.table!==z)&&0<F.length&&(console.groupCollapsed(t),console.table?console.table(F):V.each(F,function(t,e){console.log(e.Name+": "+e["Execution Time"]+"ms")}),console.groupEnd()),F=[]}},invoke:function(n,t,e){var i,r,o,a=C;return t=t||N,e=e||P,"string"==typeof n&&a!==z&&(n=n.split(/[ .]/),i=n.length-1,V.each(n,function(t,e){var o=t!=i?e+n[t+1].charAt(0).toUpperCase()+n[t+1].slice(1):n;if(V.isPlainObject(a[o])&&t!=i)a=a[o];else{if(a[o]!==z)return r=a[o],!1;{if(!V.isPlainObject(a[e])||t==i)return a[e]!==z&&(r=a[e]),!1;a=a[e]}}})),G(r)?o=r.apply(e,t):r!==z&&(o=r),Array.isArray(E)?E.push(o):E!==z?E=[E,o]:o!==z&&(E=o),r}};H?(C===z&&x.initialize(),x.invoke(R)):(C!==z&&C.invoke("destroy"),x.initialize())}),E!==z?E:this},V.fn.popup.settings={name:"Popup",silent:!1,debug:!1,verbose:!1,performance:!0,namespace:"popup",observeChanges:!0,onCreate:function(){},onRemove:function(){},onShow:function(){},onVisible:function(){},onHide:function(){},onUnplaceable:function(){},onHidden:function(){},on:"hover",boundary:W,addTouchEvents:!0,position:"top left",forcePosition:!1,variation:"",movePopup:!0,target:!1,popup:!1,inline:!1,preserve:!1,hoverable:!1,content:!1,html:!1,title:!1,closable:!0,hideOnScroll:"auto",exclusive:!1,context:"body",scrollContext:W,prefer:"opposite",lastResort:!1,arrowPixelsFromEdge:20,delay:{show:50,hide:70},setFluidWidth:!0,duration:200,transition:"scale",distanceAway:0,jitter:2,offset:0,maxSearchDepth:15,error:{invalidPosition:"The position you specified is not a valid position",cannotPlace:"Popup does not fit within the boundaries of the viewport",method:"The method you called is not defined.",noTransition:"This module requires ui transitions <https://github.com/Semantic-Org/UI-Transition>",notFound:"The target or popup you specified does not exist on the page"},metadata:{activator:"activator",content:"content",html:"html",offset:"offset",position:"position",title:"title",variation:"variation"},className:{active:"active",basic:"basic",animating:"animating",dropdown:"dropdown",fluid:"fluid",loading:"loading",popup:"ui popup",position:"top left center bottom right",visible:"visible",popupVisible:"visible"},selector:{popup:".ui.popup"},templates:{escape:function(t){var e={"<":"<",">":">",'"':""","'":"'","`":"`"};return/["&'<>`]/.test(t)?(t=t.replace(/&(?![\d#a-z]{1,12};)/gi,"&")).replace(/["'<>`]/g,function(t){return e[t]}):t},popup:function(t){var e="",o=V.fn.popup.settings.templates.escape;return t!==z&&(t.title&&(t.title=o(t.title),e+='<div class="header">'+t.title+"</div>"),t.content&&(t.content=o(t.content),e+='<div class="content">'+t.content+"</div>")),e}}}}(jQuery,window,document);
|
11
|
+
!function(V,W,M,z){"use strict";function G(t){return"function"==typeof t&&"number"!=typeof t.nodeType}W=W!==z&&W.Math===Math?W:globalThis,V.fn.popup=function(T){var E,t=V(this),k=V(M),S=V(W),O=V("body"),A=t.selector||"",D="ontouchstart"in M.documentElement?"touchstart":"click",j=Date.now(),F=[],R=T,H="string"==typeof R,N=[].slice.call(arguments,1);return t.each(function(){var p,s,t,e,o,u=V.isPlainObject(T)?V.extend(!0,{},V.fn.popup.settings,T):V.extend({},V.fn.popup.settings),n=u.selector,c=u.className,d=u.error,f=u.metadata,i=u.namespace,r="."+u.namespace,a="module-"+i,h=V(this),l=[W,M].indexOf(u.context)<0?k.find(u.context):V(u.context),g=[W,M].indexOf(u.scrollContext)<0?k.find(u.scrollContext):V(u.scrollContext),m=[W,M].indexOf(u.boundary)<0?k.find(u.boundary):V(u.boundary),b=u.target?[W,M].indexOf(u.target)<0?k.find(u.target):V(u.target):h,v=0,w=!1,y=!1,P=this,C=h.data(a),x={initialize:function(){x.debug("Initializing",h),x.createID(),x.bind.events(),!x.exists()&&u.preserve&&x.create(),u.observeChanges&&x.observeChanges(),x.instantiate()},instantiate:function(){x.verbose("Storing instance",x),C=x,h.data(a,C)},observeChanges:function(){"MutationObserver"in W&&((t=new MutationObserver(x.event.documentChanged)).observe(M,{childList:!0,subtree:!0}),x.debug("Setting up mutation observer",t))},refresh:function(){u.popup?p=k.find(u.popup).eq(0):u.inline&&(p=b.nextAll(n.popup).eq(0),u.popup=p),u.popup?(p.addClass(c.loading),s=x.get.offsetParent(),p.removeClass(c.loading),u.movePopup&&x.has.popup()&&x.get.offsetParent(p)[0]!==s[0]&&(x.debug("Moving popup to the same offset parent as target"),p.detach().appendTo(s))):s=u.inline?x.get.offsetParent(b):x.has.popup()?x.get.offsetParent(p):O,s.is("html")&&s[0]!==O[0]&&(x.debug("Setting page as offset parent"),s=O),x.get.variation()&&x.set.variation()},reposition:function(){x.refresh(),x.set.position()},destroy:function(){x.debug("Destroying previous module"),t&&t.disconnect(),p&&!u.preserve&&x.removePopup(),clearTimeout(x.hideTimer),clearTimeout(x.showTimer),x.unbind.close(),x.unbind.events(),h.removeData(a)},event:{start:function(t){var e=V.isPlainObject(u.delay)?u.delay.show:u.delay;clearTimeout(x.hideTimer),y&&!u.addTouchEvents||(x.showTimer=setTimeout(x.show,e))},end:function(){var t=V.isPlainObject(u.delay)?u.delay.hide:u.delay;clearTimeout(x.showTimer),x.hideTimer=setTimeout(x.hide,t)},touchstart:function(t){y=!0,u.addTouchEvents&&x.show()},resize:function(){x.is.visible()&&x.set.position()},documentChanged:function(t){[].forEach.call(t,function(t){t.removedNodes&&[].forEach.call(t.removedNodes,function(t){(t===P||0<V(t).find(P).length)&&(x.debug("Element removed from DOM, tearing down events"),x.destroy())})})},hideGracefully:function(t){var e=V(t.target),o=V.contains(M.documentElement,t.target),e=0<e.closest(n.popup).length;t&&!e&&o?(x.debug("Click occurred outside popup hiding popup"),x.hide()):x.debug("Click was inside popup, keeping popup open")}},create:function(){var t=x.get.html(),e=x.get.title(),o=x.get.content();t||o||e?(x.debug("Creating pop-up html"),t=t||u.templates.popup({title:e,content:o}),p=V("<div/>").addClass(c.popup).data(f.activator,h).html(t),u.inline?(x.verbose("Inserting popup element inline",p),p.insertAfter(h)):(x.verbose("Appending popup element to body",p),p.appendTo(l)),x.refresh(),x.set.variation(),u.hoverable&&x.bind.popup(),u.onCreate.call(p,P)):u.popup?(k.find(u.popup).data(f.activator,h),x.verbose("Used popup specified in settings"),x.refresh(),u.hoverable&&x.bind.popup()):0<b.next(n.popup).length?(x.verbose("Pre-existing popup found"),u.inline=!0,u.popup=b.next(n.popup).data(f.activator,h),x.refresh(),u.hoverable&&x.bind.popup()):x.debug("No content specified skipping display",P)},createID:function(){o=(Math.random().toString(16)+"000000000").slice(2,10),e="."+o,x.verbose("Creating unique id for element",o)},toggle:function(){x.debug("Toggling pop-up"),x.is.hidden()?(x.debug("Popup is hidden, showing pop-up"),x.unbind.close(),x.show()):(x.debug("Popup is visible, hiding pop-up"),x.hide())},show:function(t){t=t||function(){},x.debug("Showing pop-up",u.transition),!x.is.hidden()||x.is.active()&&x.is.dropdown()||(x.exists()||x.create(),!1===u.onShow.call(p,P)?x.debug("onShow callback returned false, cancelling popup animation"):(u.preserve||u.popup||x.refresh(),p&&x.set.position()&&(x.save.conditions(),u.exclusive&&x.hideAll(),x.animate.show(t))))},hide:function(t){t=t||function(){},(x.is.visible()||x.is.animating())&&(!1===u.onHide.call(p,P)?x.debug("onHide callback returned false, cancelling popup animation"):(x.remove.visible(),x.unbind.close(),x.restore.conditions(),x.animate.hide(t)))},hideAll:function(){k.find(n.popup).filter("."+c.popupVisible).each(function(){V(this).data(f.activator).popup("hide")})},exists:function(){return!!p&&(u.inline||u.popup?x.has.popup():0<p.closest(l).length)},removePopup:function(){x.has.popup()&&!u.popup&&(x.debug("Removing popup",p),p.remove(),p=z,u.onRemove.call(p,P))},save:{conditions:function(){x.cache={title:h.attr("title")},x.cache.title&&h.removeAttr("title"),x.verbose("Saving original attributes",x.cache.title)}},restore:{conditions:function(){return x.cache&&x.cache.title&&(h.attr("title",x.cache.title),x.verbose("Restoring original attributes",x.cache.title)),!0}},supports:{svg:function(){return"undefined"!=typeof SVGGraphicsElement}},animate:{show:function(t){t=G(t)?t:function(){},u.transition&&V.fn.transition!==z&&h.transition("is supported")?(x.set.visible(),p.transition({animation:(u.transition.showMethod||u.transition)+" in",queue:!1,debug:u.debug,verbose:u.verbose,silent:u.silent,duration:u.transition.showDuration||u.duration,onComplete:function(){x.bind.close(),t.call(p,P),u.onVisible.call(p,P)}})):x.error(d.noTransition)},hide:function(t){t=G(t)?t:function(){},x.debug("Hiding pop-up"),u.transition&&V.fn.transition!==z&&h.transition("is supported")?p.transition({animation:(u.transition.hideMethod||u.transition)+" out",queue:!1,duration:u.transition.hideDuration||u.duration,debug:u.debug,verbose:u.verbose,silent:u.silent,onComplete:function(){x.reset(),t.call(p,P),u.onHidden.call(p,P)}}):x.error(d.noTransition)}},change:{content:function(t){p.html(t)}},get:{html:function(){return h.removeData(f.html),h.data(f.html)||u.html},title:function(){return h.removeData(f.title),h.data(f.title)||u.title},content:function(){return h.removeData(f.content),h.data(f.content)||u.content||h.attr("title")},variation:function(){return h.removeData(f.variation),h.data(f.variation)||u.variation},popup:function(){return p},popupOffset:function(){return p.offset()},calculations:function(){var t=x.get.offsetParent(p),e=b[0],o=m[0]===W,n=b.offset(),i=u.inline||u.popup&&u.movePopup?b.offsetParent().offset():{top:0,left:0},r=o?{top:0,left:0}:m.offset(),a={},o=o?{top:S.scrollTop(),left:S.scrollLeft()}:{top:0,left:0},a={target:{element:b[0],width:b.outerWidth(),height:b.outerHeight(),top:n.top-i.top,left:n.left-i.left,margin:{}},popup:{width:p.outerWidth(),height:p.outerHeight()},parent:{width:s.outerWidth(),height:s.outerHeight()},screen:{top:r.top,left:r.left,scroll:{top:o.top,left:o.left},width:m.width(),height:m.height()}};return t[0]!==s[0]&&(n=t.offset(),a.target.top-=n.top,a.target.left-=n.left,a.parent.width=t.outerWidth(),a.parent.height=t.outerHeight()),u.setFluidWidth&&x.is.fluid()&&(a.container={width:p.parent().outerWidth()},a.popup.width=a.container.width),a.target.margin.top=u.inline?parseInt(W.getComputedStyle(e).getPropertyValue("margin-top"),10):0,a.target.margin.left=u.inline?x.is.rtl()?parseInt(W.getComputedStyle(e).getPropertyValue("margin-right"),10):parseInt(W.getComputedStyle(e).getPropertyValue("margin-left"),10):0,i=a.screen,a.boundary={top:i.top+i.scroll.top,bottom:i.top+i.scroll.top+i.height,left:i.left+i.scroll.left,right:i.left+i.scroll.left+i.width},a},id:function(){return o},startEvent:function(){return"hover"===u.on?"mouseenter":"focus"===u.on&&"focus"},scrollEvent:function(){return"scroll"},endEvent:function(){return"hover"===u.on?"mouseleave":"focus"===u.on&&"blur"},distanceFromBoundary:function(t,e){var o={},n=(e=e||x.get.calculations()).popup,e=e.boundary;return t&&(o={top:t.top-e.top,left:t.left-e.left,right:e.right-(t.left+n.width),bottom:e.bottom-(t.top+n.height)},x.verbose("Distance from boundaries determined",t,o)),o},offsetParent:function(t){var e=(t!==z?t:b)[0].parentNode,o=V(e);if(e)for(var n="none"===o.css("transform"),i="static"===o.css("position"),r=o.is("body");e&&!r&&i&&n;)e=e.parentNode,n="none"===(o=V(e)).css("transform"),i="static"===o.css("position"),r=o.is("body");return o&&0<o.length?o:V()},positions:function(){return{"top left":!1,"top center":!1,"top right":!1,"bottom left":!1,"bottom center":!1,"bottom right":!1,"left center":!1,"right center":!1}},nextPosition:function(t){var e=t.split(" "),o=e[0],e=e[1],n="top"===o||"bottom"===o,i=!1,r=!1,a=!1;return w||(x.verbose("All available positions available"),w=x.get.positions()),x.debug("Recording last position tried",t),w[t]=!0,"opposite"===u.prefer&&(a=(a=[{top:"bottom",bottom:"top",left:"right",right:"left"}[o],e]).join(" "),i=!0===w[a],x.debug("Trying opposite strategy",a)),"adjacent"===u.prefer&&n&&(a=(a=[o,{left:"center",center:"right",right:"left"}[e]]).join(" "),r=!0===w[a],x.debug("Trying adjacent strategy",a)),(r||i)&&(x.debug("Using backup position",a),a={"top left":"top center","top center":"top right","top right":"right center","right center":"bottom right","bottom right":"bottom center","bottom center":"bottom left","bottom left":"left center","left center":"top left"}[t]),a}},set:{position:function(t,e){if(0!==b.length&&0!==p.length){var o,n,i,r,a,s,l;if(e=e||x.get.calculations(),t=t||h.data(f.position)||u.position,o=h.data(f.offset)||u.offset,n=u.distanceAway,i=e.target,r=e.popup,a=e.parent,x.should.centerArrow(e)&&(x.verbose("Adjusting offset to center arrow on small target element"),"top left"!==t&&"bottom left"!==t||(o=(o+=i.width/2)-u.arrowPixelsFromEdge),"top right"!==t&&"bottom right"!==t||(o=(o-=i.width/2)+u.arrowPixelsFromEdge)),0===i.width&&0===i.height&&!x.is.svg(i.element))return x.debug("Popup target is hidden, no action taken"),!1;switch(u.inline&&(x.debug("Adding margin to calculation",i.margin),"left center"===t||"right center"===t?(o+=i.margin.top,n+=-i.margin.left):"top left"===t||"top center"===t||"top right"===t?(o+=i.margin.left,n-=i.margin.top):(o+=i.margin.left,n+=i.margin.top)),x.debug("Determining popup position from calculations",t,e),x.is.rtl()&&(t=t.replace(/left|right/g,function(t){return"left"===t?"right":"left"}),x.debug("RTL: Popup position updated",t)),t=v===u.maxSearchDepth&&"string"==typeof u.lastResort?u.lastResort:t){case"top left":s={top:"auto",bottom:a.height-i.top+n,left:i.left+o,right:"auto"};break;case"top center":s={bottom:a.height-i.top+n,left:i.left+i.width/2-r.width/2+o,top:"auto",right:"auto"};break;case"top right":s={bottom:a.height-i.top+n,right:a.width-i.left-i.width-o,top:"auto",left:"auto"};break;case"left center":s={top:i.top+i.height/2-r.height/2+o,right:a.width-i.left+n,left:"auto",bottom:"auto"};break;case"right center":s={top:i.top+i.height/2-r.height/2+o,left:i.left+i.width+n,bottom:"auto",right:"auto"};break;case"bottom left":s={top:i.top+i.height+n,left:i.left+o,bottom:"auto",right:"auto"};break;case"bottom center":s={top:i.top+i.height+n,left:i.left+i.width/2-r.width/2+o,bottom:"auto",right:"auto"};break;case"bottom right":s={top:i.top+i.height+n,right:a.width-i.left-i.width-o,left:"auto",bottom:"auto"}}if(s===z&&x.error(d.invalidPosition,t),x.debug("Calculated popup positioning values",s),p.css(s).removeClass(c.position).addClass(t).addClass(c.loading),l=x.get.popupOffset(),l=x.get.distanceFromBoundary(l,e),!u.forcePosition&&x.is.offstage(l,t)){if(x.debug("Position is outside viewport",t),v<u.maxSearchDepth)return v++,t=x.get.nextPosition(t),x.debug("Trying new position",t),!!p&&x.set.position(t,e);if(!u.lastResort)return x.debug("Popup could not find a position to display",p),x.error(d.cannotPlace,P),x.remove.attempts(),x.remove.loading(),x.reset(),u.onUnplaceable.call(p,P),!1;x.debug("No position found, showing with last position")}return x.debug("Position is on stage",t),x.remove.attempts(),x.remove.loading(),u.setFluidWidth&&x.is.fluid()&&x.set.fluidWidth(e),!0}x.error(d.notFound)},fluidWidth:function(t){t=t||x.get.calculations(),x.debug("Automatically setting element width to parent width",t.parent.width),p.css("width",t.container.width)},variation:function(t){(t=t||x.get.variation())&&x.has.popup()&&(x.verbose("Adding variation to popup",t),p.addClass(t))},visible:function(){h.addClass(c.visible)}},remove:{loading:function(){p.removeClass(c.loading)},variation:function(t){(t=t||x.get.variation())&&(x.verbose("Removing variation",t),p.removeClass(t))},visible:function(){h.removeClass(c.visible)},attempts:function(){x.verbose("Resetting all searched positions"),v=0,w=!1}},bind:{events:function(){x.debug("Binding popup events to module"),"click"===u.on&&h.on(D+r,x.toggle),"hover"===u.on&&h.on("touchstart"+r,x.event.touchstart),x.get.startEvent()&&h.on(x.get.startEvent()+r,x.event.start).on(x.get.endEvent()+r,x.event.end),u.target&&x.debug("Target set to element",b),S.on("resize"+e,x.event.resize)},popup:function(){x.verbose("Allowing hover events on popup to prevent closing"),p&&x.has.popup()&&p.on("mouseenter"+r,x.event.start).on("mouseleave"+r,x.event.end)},close:function(){(!0===u.hideOnScroll||"auto"===u.hideOnScroll&&"click"!==u.on)&&x.bind.closeOnScroll(),x.is.closable()?x.bind.clickaway():"hover"===u.on&&y&&x.bind.touchClose()},closeOnScroll:function(){x.verbose("Binding scroll close event to document"),g.one(x.get.scrollEvent()+e,x.event.hideGracefully)},touchClose:function(){x.verbose("Binding popup touchclose event to document"),k.on("touchstart"+e,function(t){x.verbose("Touched away from popup"),x.event.hideGracefully.call(P,t)})},clickaway:function(){x.verbose("Binding popup close event to document"),k.on(D+e,function(t){x.verbose("Clicked away from popup"),x.event.hideGracefully.call(P,t)})}},unbind:{events:function(){S.off(e),h.off(r)},close:function(){k.off(e),g.off(e)}},has:{popup:function(){return p&&0<p.length}},should:{centerArrow:function(t){return!x.is.basic()&&t.target.width<=2*u.arrowPixelsFromEdge}},is:{closable:function(){return"auto"===u.closable?"hover"!==u.on:u.closable},offstage:function(t,o){var n=[];return V.each(t,function(t,e){e<-u.jitter&&(x.debug("Position exceeds allowable distance from edge",t,e,o),n.push(t))}),0<n.length},svg:function(t){return x.supports.svg()&&t instanceof SVGGraphicsElement},basic:function(){return h.hasClass(c.basic)},active:function(){return h.hasClass(c.active)},animating:function(){return p!==z&&p.hasClass(c.animating)},fluid:function(){return p!==z&&p.hasClass(c.fluid)},visible:function(){return p!==z&&p.hasClass(c.popupVisible)},dropdown:function(){return h.hasClass(c.dropdown)},hidden:function(){return!x.is.visible()},rtl:function(){return"rtl"===h.attr("dir")||"rtl"===h.css("direction")||"rtl"===O.attr("dir")||"rtl"===O.css("direction")||"rtl"===l.attr("dir")||"rtl"===l.css("direction")}},reset:function(){x.remove.visible(),u.preserve?V.fn.transition!==z&&p.transition("remove transition"):x.removePopup()},setting:function(t,e){if(V.isPlainObject(t))V.extend(!0,u,t);else{if(e===z)return u[t];u[t]=e}},internal:function(t,e){if(V.isPlainObject(t))V.extend(!0,x,t);else{if(e===z)return x[t];x[t]=e}},debug:function(){!u.silent&&u.debug&&(u.performance?x.performance.log(arguments):(x.debug=Function.prototype.bind.call(console.info,console,u.name+":"),x.debug.apply(console,arguments)))},verbose:function(){!u.silent&&u.verbose&&u.debug&&(u.performance?x.performance.log(arguments):(x.verbose=Function.prototype.bind.call(console.info,console,u.name+":"),x.verbose.apply(console,arguments)))},error:function(){u.silent||(x.error=Function.prototype.bind.call(console.error,console,u.name+":"),x.error.apply(console,arguments))},performance:{log:function(t){var e,o;u.performance&&(o=(e=Date.now())-(j||e),j=e,F.push({Name:t[0],Arguments:[].slice.call(t,1)||"",Element:P,"Execution Time":o})),clearTimeout(x.performance.timer),x.performance.timer=setTimeout(x.performance.display,500)},display:function(){var t=u.name+":",o=0;j=!1,clearTimeout(x.performance.timer),V.each(F,function(t,e){o+=e["Execution Time"]}),t+=" "+o+"ms",A&&(t+=" '"+A+"'"),(console.group!==z||console.table!==z)&&0<F.length&&(console.groupCollapsed(t),console.table?console.table(F):V.each(F,function(t,e){console.log(e.Name+": "+e["Execution Time"]+"ms")}),console.groupEnd()),F=[]}},invoke:function(n,t,e){var i,r,o,a=C;return t=t||N,e=e||P,"string"==typeof n&&a!==z&&(n=n.split(/[ .]/),i=n.length-1,V.each(n,function(t,e){var o=t!==i?e+n[t+1].charAt(0).toUpperCase()+n[t+1].slice(1):n;if(V.isPlainObject(a[o])&&t!==i)a=a[o];else{if(a[o]!==z)return r=a[o],!1;{if(!V.isPlainObject(a[e])||t===i)return a[e]!==z&&(r=a[e]),!1;a=a[e]}}})),G(r)?o=r.apply(e,t):r!==z&&(o=r),Array.isArray(E)?E.push(o):E!==z?E=[E,o]:o!==z&&(E=o),r}};H?(C===z&&x.initialize(),x.invoke(R)):(C!==z&&C.invoke("destroy"),x.initialize())}),E!==z?E:this},V.fn.popup.settings={name:"Popup",silent:!1,debug:!1,verbose:!1,performance:!0,namespace:"popup",observeChanges:!0,onCreate:function(){},onRemove:function(){},onShow:function(){},onVisible:function(){},onHide:function(){},onUnplaceable:function(){},onHidden:function(){},on:"hover",boundary:W,addTouchEvents:!0,position:"top left",forcePosition:!1,variation:"",movePopup:!0,target:!1,popup:!1,inline:!1,preserve:!1,hoverable:!1,content:!1,html:!1,title:!1,closable:!0,hideOnScroll:"auto",exclusive:!1,context:"body",scrollContext:W,prefer:"opposite",lastResort:!1,arrowPixelsFromEdge:20,delay:{show:50,hide:70},setFluidWidth:!0,duration:200,transition:"scale",distanceAway:0,jitter:2,offset:0,maxSearchDepth:15,error:{invalidPosition:"The position you specified is not a valid position",cannotPlace:"Popup does not fit within the boundaries of the viewport",method:"The method you called is not defined.",noTransition:"This module requires ui transitions <https://github.com/Semantic-Org/UI-Transition>",notFound:"The target or popup you specified does not exist on the page"},metadata:{activator:"activator",content:"content",html:"html",offset:"offset",position:"position",title:"title",variation:"variation"},className:{active:"active",basic:"basic",animating:"animating",dropdown:"dropdown",fluid:"fluid",loading:"loading",popup:"ui popup",position:"top left center bottom right",visible:"visible",popupVisible:"visible"},selector:{popup:".ui.popup"},templates:{escape:function(t){var e={"<":"<",">":">",'"':""","'":"'","`":"`"};return/["&'<>`]/.test(t)?(t=t.replace(/&(?![\d#a-z]{1,12};)/gi,"&")).replace(/["'<>`]/g,function(t){return e[t]}):t},popup:function(t){var e="",o=V.fn.popup.settings.templates.escape;return t!==z&&(t.title&&(t.title=o(t.title),e+='<div class="header">'+t.title+"</div>"),t.content&&(t.content=o(t.content),e+='<div class="content">'+t.content+"</div>")),e}}}}(jQuery,window,document);
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* # Fomantic-UI 2.9.1-beta.
|
2
|
+
* # Fomantic-UI 2.9.1-beta.26+1084e98 - Progress
|
3
3
|
* https://github.com/fomantic/Fomantic-UI/
|
4
4
|
*
|
5
5
|
*
|
@@ -309,7 +309,7 @@
|
|
309
309
|
},
|
310
310
|
|
311
311
|
updateInterval: function () {
|
312
|
-
if (settings.updateInterval
|
312
|
+
if (settings.updateInterval === 'auto') {
|
313
313
|
return settings.duration;
|
314
314
|
}
|
315
315
|
|
@@ -460,7 +460,7 @@
|
|
460
460
|
if (isMultiple && allZero) {
|
461
461
|
$bar.css('background', 'transparent');
|
462
462
|
}
|
463
|
-
if (firstNonZeroIndex
|
463
|
+
if (firstNonZeroIndex === -1) {
|
464
464
|
firstNonZeroIndex = index;
|
465
465
|
}
|
466
466
|
lastNonZeroIndex = index;
|
@@ -475,10 +475,10 @@
|
|
475
475
|
values.forEach(function (_, index) {
|
476
476
|
var $bar = $($bars[index]);
|
477
477
|
$bar.css({
|
478
|
-
borderTopLeftRadius: index
|
479
|
-
borderBottomLeftRadius: index
|
480
|
-
borderTopRightRadius: index
|
481
|
-
borderBottomRightRadius: index
|
478
|
+
borderTopLeftRadius: index === firstNonZeroIndex ? '' : '0',
|
479
|
+
borderBottomLeftRadius: index === firstNonZeroIndex ? '' : '0',
|
480
|
+
borderTopRightRadius: index === lastNonZeroIndex ? '' : '0',
|
481
|
+
borderBottomRightRadius: index === lastNonZeroIndex ? '' : '0',
|
482
482
|
});
|
483
483
|
});
|
484
484
|
$module
|
@@ -610,10 +610,10 @@
|
|
610
610
|
var $progress = $(element);
|
611
611
|
if (text !== undefined) {
|
612
612
|
$progress.text(module.get.text(text, index));
|
613
|
-
} else if (settings.label
|
613
|
+
} else if (settings.label === 'ratio' && module.has.total()) {
|
614
614
|
module.verbose('Adding ratio to bar label');
|
615
615
|
$progress.text(module.get.text(settings.text.ratio, index));
|
616
|
-
} else if (settings.label
|
616
|
+
} else if (settings.label === 'percent') {
|
617
617
|
module.verbose('Adding percentage to bar label');
|
618
618
|
$progress.text(module.get.text(settings.text.percent, index));
|
619
619
|
}
|
@@ -862,17 +862,17 @@
|
|
862
862
|
query = query.split(/[ .]/);
|
863
863
|
maxDepth = query.length - 1;
|
864
864
|
$.each(query, function (depth, value) {
|
865
|
-
var camelCaseValue = depth
|
865
|
+
var camelCaseValue = depth !== maxDepth
|
866
866
|
? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)
|
867
867
|
: query
|
868
868
|
;
|
869
|
-
if ($.isPlainObject(object[camelCaseValue]) && (depth
|
869
|
+
if ($.isPlainObject(object[camelCaseValue]) && (depth !== maxDepth)) {
|
870
870
|
object = object[camelCaseValue];
|
871
871
|
} else if (object[camelCaseValue] !== undefined) {
|
872
872
|
found = object[camelCaseValue];
|
873
873
|
|
874
874
|
return false;
|
875
|
-
} else if ($.isPlainObject(object[value]) && (depth
|
875
|
+
} else if ($.isPlainObject(object[value]) && (depth !== maxDepth)) {
|
876
876
|
object = object[value];
|
877
877
|
} else if (object[value] !== undefined) {
|
878
878
|
found = object[value];
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*
|
2
|
-
* # Fomantic UI - 2.9.1-beta.
|
2
|
+
* # Fomantic UI - 2.9.1-beta.26+1084e98
|
3
3
|
* https://github.com/fomantic/Fomantic-UI
|
4
4
|
* https://fomantic-ui.com/
|
5
5
|
*
|
@@ -8,4 +8,4 @@
|
|
8
8
|
* https://opensource.org/licenses/MIT
|
9
9
|
*
|
10
10
|
*/
|
11
|
-
!function(E,e,P,T){"use strict";e=e!==T&&e.Math===Math?e:globalThis,E.fn.progress=function(m){var b,e=E(this),h=e.selector||"",x=Date.now(),y=[],w=m,V="string"==typeof w,A=[].slice.call(arguments,1);return e.each(function(){var i=E.isPlainObject(m)?E.extend(!0,{},E.fn.progress.settings,m):E.extend({},E.fn.progress.settings),r=i.className,t=i.metadata,e=i.namespace,n=i.selector,l=i.error,a="."+e,o="module-"+e,c=E(this),u=E(this).find(n.bar),s=E(this).find(n.progress),p=E(this).find(n.label),d=this,g=c.data(o),v=!1,f={helper:{sum:function(e){return Array.isArray(e)?e.reduce(function(e,t){return e+Number(t)},0):0},derivePrecision:function(e,t){for(var r=0,n=1,a=e/t;r<10&&!(1<(a*=n));)n=Math.pow(10,r++);return n},forceArray:function(e){return Array.isArray(e)?e:isNaN(e)?"string"==typeof e?e.split(","):[]:[e]}},initialize:function(){f.set.duration(),f.set.transitionEvent(),f.debug(d),f.read.metadata(),f.read.settings(),f.instantiate()},instantiate:function(){f.verbose("Storing instance of progress",f),g=f,c.data(o,f)},destroy:function(){f.verbose("Destroying previous progress for",c),clearInterval(g.interval),f.remove.state(),c.removeData(o),g=T},reset:function(){f.remove.nextValue(),f.update.progress(0)},complete:function(e){(f.percent===T||f.percent<100)&&(f.remove.progressPoll(),!0!==e&&f.set.percent(100))},read:{metadata:function(){var e={percent:f.helper.forceArray(c.data(t.percent)),total:c.data(t.total),value:f.helper.forceArray(c.data(t.value))};e.total!==T&&(f.debug("Total value set from metadata",e.total),f.set.total(e.total)),0<e.value.length&&(f.debug("Current value set from metadata",e.value),f.set.value(e.value),f.set.progress(e.value)),0<e.percent.length&&(f.debug("Current percent value set from metadata",e.percent),f.set.percent(e.percent))},settings:function(){!1!==i.total&&(f.debug("Current total set in settings",i.total),f.set.total(i.total)),!1!==i.value&&(f.debug("Current value set in settings",i.value),f.set.value(i.value),f.set.progress(f.value)),!1!==i.percent&&(f.debug("Current percent set in settings",i.percent),f.set.percent(i.percent))}},bind:{transitionEnd:function(t){var e=f.get.transitionEnd();u.one(e+a,function(e){clearTimeout(f.failSafeTimer),t.call(this,e)}),f.failSafeTimer=setTimeout(function(){u.triggerHandler(e)},i.duration+i.failSafeDelay),f.verbose("Adding fail safe timer",f.timer)}},increment:function(e){var t;e=f.has.total()?(t=f.get.value(),e||1):(t=f.get.percent(),e||f.get.randomValue()),f.debug("Incrementing percentage by",t,t=t+e,e),t=f.get.normalizedValue(t),f.set.progress(t)},decrement:function(e){var t,r;f.get.total()?(r=(t=f.get.value())-(e=e||1),f.debug("Decrementing value by",e,t)):(r=(t=f.get.percent())-(e=e||f.get.randomValue()),f.debug("Decrementing percentage by",e,t)),r=f.get.normalizedValue(r),f.set.progress(r)},has:{progressPoll:function(){return f.progressPoll},total:function(){return!1!==f.get.total()}},get:{text:function(e,t){var r=f.get.value(t=t||0),n=f.get.total(),a=v?f.get.displayPercent(t):f.get.percent(t),o=!1!==n?Math.max(0,n-r):100-a;return e=(e=e||"").replace("{value}",r).replace("{total}",n||0).replace("{left}",o).replace("{percent}",a).replace("{bar}",i.text.bars[t]||""),f.verbose("Adding variables to progress bar text",e),e},normalizedValue:function(e){if(e<0)return f.debug("Value cannot decrement below 0"),0;if(f.has.total()){if(e>f.total)return f.debug("Value cannot increment above total",f.total),f.total}else if(100<e)return f.debug("Value cannot increment above 100 percent"),100;return e},updateInterval:function(){return"auto"==i.updateInterval?i.duration:i.updateInterval},randomValue:function(){return f.debug("Generating random increment percentage"),Math.floor(Math.random()*i.random.max+i.random.min)},numericValue:function(e){return"string"==typeof e?""!==e.replace(/[^\d.]/g,"")&&+e.replace(/[^\d.]/g,""):e},transitionEnd:function(){var e,t=P.createElement("element"),r={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(e in r)if(t.style[e]!==T)return r[e]},displayPercent:function(e){var e=E(u[e]),t=e.width(),r=c.width(),e=parseInt(e.css("min-width"),10)<t?t/r*100:f.percent;return 0<i.precision?Math.round(e*(10*i.precision))/(10*i.precision):Math.round(e)},percent:function(e){return f.percent&&f.percent[e||0]||0},value:function(e){return f.nextValue||f.value&&f.value[e||0]||0},total:function(){return f.total!==T&&f.total}},create:{progressPoll:function(){f.progressPoll=setTimeout(function(){f.update.toNextValue(),f.remove.progressPoll()},f.get.updateInterval())}},is:{complete:function(){return f.is.success()||f.is.warning()||f.is.error()},success:function(){return c.hasClass(r.success)},warning:function(){return c.hasClass(r.warning)},error:function(){return c.hasClass(r.error)},active:function(){return c.hasClass(r.active)},visible:function(){return c.is(":visible")}},remove:{progressPoll:function(){f.verbose("Removing progress poll timer"),f.progressPoll&&(clearTimeout(f.progressPoll),delete f.progressPoll)},nextValue:function(){f.verbose("Removing progress value stored for next update"),delete f.nextValue},state:function(){f.verbose("Removing stored state"),delete f.total,delete f.percent,delete f.value},active:function(){f.verbose("Removing active state"),c.removeClass(r.active)},success:function(){f.verbose("Removing success state"),c.removeClass(r.success)},warning:function(){f.verbose("Removing warning state"),c.removeClass(r.warning)},error:function(){f.verbose("Removing error state"),c.removeClass(r.error)}},set:{barWidth:function(e){f.debug("set bar width with ",e),e=f.helper.forceArray(e);var a=-1,o=-1,i=f.helper.sum(e),s=u.length,l=1<s,t=e.map(function(e,t){var r=t===s-1&&0===i,n=E(u[t]);return 0===e&&l&&!r?n.css("display","none"):(l&&r&&n.css("background","transparent"),-1==a&&(a=t),o=t,n.css({display:"block",width:e+"%"})),parseFloat(e)});e.forEach(function(e,t){E(u[t]).css({borderTopLeftRadius:t==a?"":"0",borderBottomLeftRadius:t==a?"":"0",borderTopRightRadius:t==o?"":"0",borderBottomRightRadius:t==o?"":"0"})}),c.attr("data-percent",t)},duration:function(e){e=e||i.duration,f.verbose("Setting progress bar transition duration",e="number"==typeof e?e+"ms":e),u.css({"transition-duration":e})},percent:function(e){e=f.helper.forceArray(e).map(function(e){return e="string"==typeof e?+e.replace("%",""):e,i.limitValues?Math.max(0,Math.min(100,e)):e});var t,r=f.has.total(),n=f.helper.sum(e),a=1<e.length&&r,o=f.helper.sum(f.helper.forceArray(f.value));a&&o>f.total?f.error(l.sumExceedsTotal,o,f.total):!a&&100<n?f.error(l.tooHigh,n):n<0?f.error(l.tooLow,n):(t=0<i.precision?i.precision:a?f.helper.derivePrecision(Math.min.apply(null,f.value),f.total):0,o=e.map(function(e){return 0<t?Math.round(e*(10*t))/(10*t):Math.round(e)}),f.percent=o,r&&(f.value=e.map(function(e){return 0<t?Math.round(e/100*f.total*(10*t))/(10*t):Math.round(e/100*f.total*10)/10})),f.set.barWidth(e),f.set.labelInterval()),i.onChange.call(d,e,f.value,f.total)},labelInterval:function(){clearInterval(f.interval),f.bind.transitionEnd(function(){f.verbose("Bar finished animating, removing continuous label updates"),clearInterval(f.interval),v=!1,f.set.labels()}),v=!0,f.interval=setInterval(function(){E.contains(P.documentElement,d)||(clearInterval(f.interval),v=!1),f.set.labels()},i.framerate)},labels:function(){f.verbose("Setting both bar progress and outer label text"),f.set.barLabel(),f.set.state()},label:function(e){e&&(e=f.get.text(e),f.verbose("Setting label to text",e),p.text(e))},state:function(e){100===(e=e!==T?e:f.helper.sum(f.percent))?i.autoSuccess&&1===u.length&&!(f.is.warning()||f.is.error()||f.is.success())?(f.set.success(),f.debug("Automatically triggering success at 100%")):(f.verbose("Reached 100% removing active state"),f.remove.active(),f.remove.progressPoll()):0<e?(f.verbose("Adjusting active progress bar label",e),f.set.active()):(f.remove.active(),f.remove.warning(),f.remove.error(),f.remove.success(),f.set.label(i.text.active))},barLabel:function(r){s.each(function(e,t){t=E(t);r!==T?t.text(f.get.text(r,e)):"ratio"==i.label&&f.has.total()?(f.verbose("Adding ratio to bar label"),t.text(f.get.text(i.text.ratio,e))):"percent"==i.label&&(f.verbose("Adding percentage to bar label"),t.text(f.get.text(i.text.percent,e)))})},active:function(e){e=e||i.text.active,f.debug("Setting active state"),i.showActivity&&!f.is.active()&&c.addClass(r.active),f.remove.warning(),f.remove.error(),f.remove.success(),(e=i.onLabelUpdate("active",e,f.value,f.total))&&f.set.label(e),f.bind.transitionEnd(function(){i.onActive.call(d,f.value,f.total)})},success:function(e,t){e=e||i.text.success||i.text.active,f.debug("Setting success state"),c.addClass(r.success),f.remove.active(),f.remove.warning(),f.remove.error(),f.complete(t),e=i.text.success?i.onLabelUpdate("success",e,f.value,f.total):i.onLabelUpdate("active",e,f.value,f.total),f.set.label(e),f.bind.transitionEnd(function(){i.onSuccess.call(d,f.total)})},warning:function(e,t){e=e||i.text.warning,f.debug("Setting warning state"),c.addClass(r.warning),f.remove.active(),f.remove.success(),f.remove.error(),f.complete(t),(e=i.onLabelUpdate("warning",e,f.value,f.total))&&f.set.label(e),f.bind.transitionEnd(function(){i.onWarning.call(d,f.value,f.total)})},error:function(e,t){e=e||i.text.error,f.debug("Setting error state"),c.addClass(r.error),f.remove.active(),f.remove.success(),f.remove.warning(),f.complete(t),(e=i.onLabelUpdate("error",e,f.value,f.total))&&f.set.label(e),f.bind.transitionEnd(function(){i.onError.call(d,f.value,f.total)})},transitionEvent:function(){f.get.transitionEnd()},total:function(e){f.total=e},value:function(e){f.value=f.helper.forceArray(e)},progress:function(e){f.has.progressPoll()?(f.debug("Updated within interval, setting next update to use new value",e),f.set.nextValue(e)):(f.debug("First update in progress update interval, immediately updating",e),f.update.progress(e),f.create.progressPoll())},nextValue:function(e){f.nextValue=e}},update:{toNextValue:function(){var e=f.nextValue;e&&(f.debug("Update interval complete using last updated value",e),f.update.progress(e),f.remove.nextValue())},progress:function(e){var r=f.has.total(),e=(r&&f.set.value(e),f.helper.forceArray(e).map(function(e){var t;return!1===(e=f.get.numericValue(e))&&f.error(l.nonNumeric,e),e=f.get.normalizedValue(e),r?(t=0<f.total?e/f.total*100:100,f.debug("Calculating percent complete from total",t)):(t=e,f.debug("Setting value to exact percentage value",t)),t}));f.set.percent(e)}},setting:function(e,t){if(f.debug("Changing setting",e,t),E.isPlainObject(e))E.extend(!0,i,e);else{if(t===T)return i[e];E.isPlainObject(i[e])?E.extend(!0,i[e],t):i[e]=t}},internal:function(e,t){if(E.isPlainObject(e))E.extend(!0,f,e);else{if(t===T)return f[e];f[e]=t}},debug:function(){!i.silent&&i.debug&&(i.performance?f.performance.log(arguments):(f.debug=Function.prototype.bind.call(console.info,console,i.name+":"),f.debug.apply(console,arguments)))},verbose:function(){!i.silent&&i.verbose&&i.debug&&(i.performance?f.performance.log(arguments):(f.verbose=Function.prototype.bind.call(console.info,console,i.name+":"),f.verbose.apply(console,arguments)))},error:function(){i.silent||(f.error=Function.prototype.bind.call(console.error,console,i.name+":"),f.error.apply(console,arguments))},performance:{log:function(e){var t,r;i.performance&&(r=(t=Date.now())-(x||t),x=t,y.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:d,"Execution Time":r})),clearTimeout(f.performance.timer),f.performance.timer=setTimeout(f.performance.display,500)},display:function(){var e=i.name+":",r=0;x=!1,clearTimeout(f.performance.timer),E.each(y,function(e,t){r+=t["Execution Time"]}),e+=" "+r+"ms",h&&(e+=" '"+h+"'"),(console.group!==T||console.table!==T)&&0<y.length&&(console.groupCollapsed(e),console.table?console.table(y):E.each(y,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),y=[]}},invoke:function(n,e,t){var a,o,r,i,s=g;return e=e||A,t=t||d,"string"==typeof n&&s!==T&&(n=n.split(/[ .]/),a=n.length-1,E.each(n,function(e,t){var r=e!=a?t+n[e+1].charAt(0).toUpperCase()+n[e+1].slice(1):n;if(E.isPlainObject(s[r])&&e!=a)s=s[r];else{if(s[r]!==T)return o=s[r],!1;{if(!E.isPlainObject(s[t])||e==a)return s[t]!==T?o=s[t]:f.error(l.method,n),!1;s=s[t]}}})),"function"==typeof(i=o)&&"number"!=typeof i.nodeType?r=o.apply(t,e):o!==T&&(r=o),Array.isArray(b)?b.push(r):b!==T?b=[b,r]:r!==T&&(b=r),o}};V?(g===T&&f.initialize(),f.invoke(w)):(g!==T&&g.invoke("destroy"),f.initialize())}),b!==T?b:this},E.fn.progress.settings={name:"Progress",namespace:"progress",silent:!1,debug:!1,verbose:!1,performance:!0,random:{min:2,max:5},duration:300,updateInterval:"auto",autoSuccess:!0,showActivity:!0,limitValues:!0,label:"percent",precision:0,framerate:1e3/30,percent:!1,total:!1,value:!1,failSafeDelay:100,onLabelUpdate:function(e,t,r,n){return t},onChange:function(e,t,r){},onSuccess:function(e){},onActive:function(e,t){},onError:function(e,t){},onWarning:function(e,t){},error:{method:"The method you called is not defined.",nonNumeric:"Progress value is non numeric",tooHigh:"Value specified is above 100%",tooLow:"Value specified is below 0%",sumExceedsTotal:"Sum of multiple values exceed total"},regExp:{variable:/{\$*[\da-z]+}/gi},metadata:{percent:"percent",total:"total",value:"value"},selector:{bar:"> .bar",label:"> .label",progress:".bar > .progress"},text:{active:!1,error:!1,success:!1,warning:!1,percent:"{percent}%",ratio:"{value} of {total}",bars:[""]},className:{active:"active",error:"error",success:"success",warning:"warning"}}}(jQuery,window,document);
|
11
|
+
!function(E,e,P,T){"use strict";e=e!==T&&e.Math===Math?e:globalThis,E.fn.progress=function(m){var b,e=E(this),h=e.selector||"",x=Date.now(),y=[],w=m,V="string"==typeof w,A=[].slice.call(arguments,1);return e.each(function(){var i=E.isPlainObject(m)?E.extend(!0,{},E.fn.progress.settings,m):E.extend({},E.fn.progress.settings),r=i.className,t=i.metadata,e=i.namespace,n=i.selector,l=i.error,a="."+e,o="module-"+e,c=E(this),u=E(this).find(n.bar),s=E(this).find(n.progress),p=E(this).find(n.label),d=this,g=c.data(o),v=!1,f={helper:{sum:function(e){return Array.isArray(e)?e.reduce(function(e,t){return e+Number(t)},0):0},derivePrecision:function(e,t){for(var r=0,n=1,a=e/t;r<10&&!(1<(a*=n));)n=Math.pow(10,r++);return n},forceArray:function(e){return Array.isArray(e)?e:isNaN(e)?"string"==typeof e?e.split(","):[]:[e]}},initialize:function(){f.set.duration(),f.set.transitionEvent(),f.debug(d),f.read.metadata(),f.read.settings(),f.instantiate()},instantiate:function(){f.verbose("Storing instance of progress",f),g=f,c.data(o,f)},destroy:function(){f.verbose("Destroying previous progress for",c),clearInterval(g.interval),f.remove.state(),c.removeData(o),g=T},reset:function(){f.remove.nextValue(),f.update.progress(0)},complete:function(e){(f.percent===T||f.percent<100)&&(f.remove.progressPoll(),!0!==e&&f.set.percent(100))},read:{metadata:function(){var e={percent:f.helper.forceArray(c.data(t.percent)),total:c.data(t.total),value:f.helper.forceArray(c.data(t.value))};e.total!==T&&(f.debug("Total value set from metadata",e.total),f.set.total(e.total)),0<e.value.length&&(f.debug("Current value set from metadata",e.value),f.set.value(e.value),f.set.progress(e.value)),0<e.percent.length&&(f.debug("Current percent value set from metadata",e.percent),f.set.percent(e.percent))},settings:function(){!1!==i.total&&(f.debug("Current total set in settings",i.total),f.set.total(i.total)),!1!==i.value&&(f.debug("Current value set in settings",i.value),f.set.value(i.value),f.set.progress(f.value)),!1!==i.percent&&(f.debug("Current percent set in settings",i.percent),f.set.percent(i.percent))}},bind:{transitionEnd:function(t){var e=f.get.transitionEnd();u.one(e+a,function(e){clearTimeout(f.failSafeTimer),t.call(this,e)}),f.failSafeTimer=setTimeout(function(){u.triggerHandler(e)},i.duration+i.failSafeDelay),f.verbose("Adding fail safe timer",f.timer)}},increment:function(e){var t;e=f.has.total()?(t=f.get.value(),e||1):(t=f.get.percent(),e||f.get.randomValue()),f.debug("Incrementing percentage by",t,t=t+e,e),t=f.get.normalizedValue(t),f.set.progress(t)},decrement:function(e){var t,r;f.get.total()?(r=(t=f.get.value())-(e=e||1),f.debug("Decrementing value by",e,t)):(r=(t=f.get.percent())-(e=e||f.get.randomValue()),f.debug("Decrementing percentage by",e,t)),r=f.get.normalizedValue(r),f.set.progress(r)},has:{progressPoll:function(){return f.progressPoll},total:function(){return!1!==f.get.total()}},get:{text:function(e,t){var r=f.get.value(t=t||0),n=f.get.total(),a=v?f.get.displayPercent(t):f.get.percent(t),o=!1!==n?Math.max(0,n-r):100-a;return e=(e=e||"").replace("{value}",r).replace("{total}",n||0).replace("{left}",o).replace("{percent}",a).replace("{bar}",i.text.bars[t]||""),f.verbose("Adding variables to progress bar text",e),e},normalizedValue:function(e){if(e<0)return f.debug("Value cannot decrement below 0"),0;if(f.has.total()){if(e>f.total)return f.debug("Value cannot increment above total",f.total),f.total}else if(100<e)return f.debug("Value cannot increment above 100 percent"),100;return e},updateInterval:function(){return"auto"===i.updateInterval?i.duration:i.updateInterval},randomValue:function(){return f.debug("Generating random increment percentage"),Math.floor(Math.random()*i.random.max+i.random.min)},numericValue:function(e){return"string"==typeof e?""!==e.replace(/[^\d.]/g,"")&&+e.replace(/[^\d.]/g,""):e},transitionEnd:function(){var e,t=P.createElement("element"),r={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(e in r)if(t.style[e]!==T)return r[e]},displayPercent:function(e){var e=E(u[e]),t=e.width(),r=c.width(),e=parseInt(e.css("min-width"),10)<t?t/r*100:f.percent;return 0<i.precision?Math.round(e*(10*i.precision))/(10*i.precision):Math.round(e)},percent:function(e){return f.percent&&f.percent[e||0]||0},value:function(e){return f.nextValue||f.value&&f.value[e||0]||0},total:function(){return f.total!==T&&f.total}},create:{progressPoll:function(){f.progressPoll=setTimeout(function(){f.update.toNextValue(),f.remove.progressPoll()},f.get.updateInterval())}},is:{complete:function(){return f.is.success()||f.is.warning()||f.is.error()},success:function(){return c.hasClass(r.success)},warning:function(){return c.hasClass(r.warning)},error:function(){return c.hasClass(r.error)},active:function(){return c.hasClass(r.active)},visible:function(){return c.is(":visible")}},remove:{progressPoll:function(){f.verbose("Removing progress poll timer"),f.progressPoll&&(clearTimeout(f.progressPoll),delete f.progressPoll)},nextValue:function(){f.verbose("Removing progress value stored for next update"),delete f.nextValue},state:function(){f.verbose("Removing stored state"),delete f.total,delete f.percent,delete f.value},active:function(){f.verbose("Removing active state"),c.removeClass(r.active)},success:function(){f.verbose("Removing success state"),c.removeClass(r.success)},warning:function(){f.verbose("Removing warning state"),c.removeClass(r.warning)},error:function(){f.verbose("Removing error state"),c.removeClass(r.error)}},set:{barWidth:function(e){f.debug("set bar width with ",e),e=f.helper.forceArray(e);var a=-1,o=-1,i=f.helper.sum(e),s=u.length,l=1<s,t=e.map(function(e,t){var r=t===s-1&&0===i,n=E(u[t]);return 0===e&&l&&!r?n.css("display","none"):(l&&r&&n.css("background","transparent"),-1===a&&(a=t),o=t,n.css({display:"block",width:e+"%"})),parseFloat(e)});e.forEach(function(e,t){E(u[t]).css({borderTopLeftRadius:t===a?"":"0",borderBottomLeftRadius:t===a?"":"0",borderTopRightRadius:t===o?"":"0",borderBottomRightRadius:t===o?"":"0"})}),c.attr("data-percent",t)},duration:function(e){e=e||i.duration,f.verbose("Setting progress bar transition duration",e="number"==typeof e?e+"ms":e),u.css({"transition-duration":e})},percent:function(e){e=f.helper.forceArray(e).map(function(e){return e="string"==typeof e?+e.replace("%",""):e,i.limitValues?Math.max(0,Math.min(100,e)):e});var t,r=f.has.total(),n=f.helper.sum(e),a=1<e.length&&r,o=f.helper.sum(f.helper.forceArray(f.value));a&&o>f.total?f.error(l.sumExceedsTotal,o,f.total):!a&&100<n?f.error(l.tooHigh,n):n<0?f.error(l.tooLow,n):(t=0<i.precision?i.precision:a?f.helper.derivePrecision(Math.min.apply(null,f.value),f.total):0,o=e.map(function(e){return 0<t?Math.round(e*(10*t))/(10*t):Math.round(e)}),f.percent=o,r&&(f.value=e.map(function(e){return 0<t?Math.round(e/100*f.total*(10*t))/(10*t):Math.round(e/100*f.total*10)/10})),f.set.barWidth(e),f.set.labelInterval()),i.onChange.call(d,e,f.value,f.total)},labelInterval:function(){clearInterval(f.interval),f.bind.transitionEnd(function(){f.verbose("Bar finished animating, removing continuous label updates"),clearInterval(f.interval),v=!1,f.set.labels()}),v=!0,f.interval=setInterval(function(){E.contains(P.documentElement,d)||(clearInterval(f.interval),v=!1),f.set.labels()},i.framerate)},labels:function(){f.verbose("Setting both bar progress and outer label text"),f.set.barLabel(),f.set.state()},label:function(e){e&&(e=f.get.text(e),f.verbose("Setting label to text",e),p.text(e))},state:function(e){100===(e=e!==T?e:f.helper.sum(f.percent))?i.autoSuccess&&1===u.length&&!(f.is.warning()||f.is.error()||f.is.success())?(f.set.success(),f.debug("Automatically triggering success at 100%")):(f.verbose("Reached 100% removing active state"),f.remove.active(),f.remove.progressPoll()):0<e?(f.verbose("Adjusting active progress bar label",e),f.set.active()):(f.remove.active(),f.remove.warning(),f.remove.error(),f.remove.success(),f.set.label(i.text.active))},barLabel:function(r){s.each(function(e,t){t=E(t);r!==T?t.text(f.get.text(r,e)):"ratio"===i.label&&f.has.total()?(f.verbose("Adding ratio to bar label"),t.text(f.get.text(i.text.ratio,e))):"percent"===i.label&&(f.verbose("Adding percentage to bar label"),t.text(f.get.text(i.text.percent,e)))})},active:function(e){e=e||i.text.active,f.debug("Setting active state"),i.showActivity&&!f.is.active()&&c.addClass(r.active),f.remove.warning(),f.remove.error(),f.remove.success(),(e=i.onLabelUpdate("active",e,f.value,f.total))&&f.set.label(e),f.bind.transitionEnd(function(){i.onActive.call(d,f.value,f.total)})},success:function(e,t){e=e||i.text.success||i.text.active,f.debug("Setting success state"),c.addClass(r.success),f.remove.active(),f.remove.warning(),f.remove.error(),f.complete(t),e=i.text.success?i.onLabelUpdate("success",e,f.value,f.total):i.onLabelUpdate("active",e,f.value,f.total),f.set.label(e),f.bind.transitionEnd(function(){i.onSuccess.call(d,f.total)})},warning:function(e,t){e=e||i.text.warning,f.debug("Setting warning state"),c.addClass(r.warning),f.remove.active(),f.remove.success(),f.remove.error(),f.complete(t),(e=i.onLabelUpdate("warning",e,f.value,f.total))&&f.set.label(e),f.bind.transitionEnd(function(){i.onWarning.call(d,f.value,f.total)})},error:function(e,t){e=e||i.text.error,f.debug("Setting error state"),c.addClass(r.error),f.remove.active(),f.remove.success(),f.remove.warning(),f.complete(t),(e=i.onLabelUpdate("error",e,f.value,f.total))&&f.set.label(e),f.bind.transitionEnd(function(){i.onError.call(d,f.value,f.total)})},transitionEvent:function(){f.get.transitionEnd()},total:function(e){f.total=e},value:function(e){f.value=f.helper.forceArray(e)},progress:function(e){f.has.progressPoll()?(f.debug("Updated within interval, setting next update to use new value",e),f.set.nextValue(e)):(f.debug("First update in progress update interval, immediately updating",e),f.update.progress(e),f.create.progressPoll())},nextValue:function(e){f.nextValue=e}},update:{toNextValue:function(){var e=f.nextValue;e&&(f.debug("Update interval complete using last updated value",e),f.update.progress(e),f.remove.nextValue())},progress:function(e){var r=f.has.total(),e=(r&&f.set.value(e),f.helper.forceArray(e).map(function(e){var t;return!1===(e=f.get.numericValue(e))&&f.error(l.nonNumeric,e),e=f.get.normalizedValue(e),r?(t=0<f.total?e/f.total*100:100,f.debug("Calculating percent complete from total",t)):(t=e,f.debug("Setting value to exact percentage value",t)),t}));f.set.percent(e)}},setting:function(e,t){if(f.debug("Changing setting",e,t),E.isPlainObject(e))E.extend(!0,i,e);else{if(t===T)return i[e];E.isPlainObject(i[e])?E.extend(!0,i[e],t):i[e]=t}},internal:function(e,t){if(E.isPlainObject(e))E.extend(!0,f,e);else{if(t===T)return f[e];f[e]=t}},debug:function(){!i.silent&&i.debug&&(i.performance?f.performance.log(arguments):(f.debug=Function.prototype.bind.call(console.info,console,i.name+":"),f.debug.apply(console,arguments)))},verbose:function(){!i.silent&&i.verbose&&i.debug&&(i.performance?f.performance.log(arguments):(f.verbose=Function.prototype.bind.call(console.info,console,i.name+":"),f.verbose.apply(console,arguments)))},error:function(){i.silent||(f.error=Function.prototype.bind.call(console.error,console,i.name+":"),f.error.apply(console,arguments))},performance:{log:function(e){var t,r;i.performance&&(r=(t=Date.now())-(x||t),x=t,y.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:d,"Execution Time":r})),clearTimeout(f.performance.timer),f.performance.timer=setTimeout(f.performance.display,500)},display:function(){var e=i.name+":",r=0;x=!1,clearTimeout(f.performance.timer),E.each(y,function(e,t){r+=t["Execution Time"]}),e+=" "+r+"ms",h&&(e+=" '"+h+"'"),(console.group!==T||console.table!==T)&&0<y.length&&(console.groupCollapsed(e),console.table?console.table(y):E.each(y,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),y=[]}},invoke:function(n,e,t){var a,o,r,i,s=g;return e=e||A,t=t||d,"string"==typeof n&&s!==T&&(n=n.split(/[ .]/),a=n.length-1,E.each(n,function(e,t){var r=e!==a?t+n[e+1].charAt(0).toUpperCase()+n[e+1].slice(1):n;if(E.isPlainObject(s[r])&&e!==a)s=s[r];else{if(s[r]!==T)return o=s[r],!1;{if(!E.isPlainObject(s[t])||e===a)return s[t]!==T?o=s[t]:f.error(l.method,n),!1;s=s[t]}}})),"function"==typeof(i=o)&&"number"!=typeof i.nodeType?r=o.apply(t,e):o!==T&&(r=o),Array.isArray(b)?b.push(r):b!==T?b=[b,r]:r!==T&&(b=r),o}};V?(g===T&&f.initialize(),f.invoke(w)):(g!==T&&g.invoke("destroy"),f.initialize())}),b!==T?b:this},E.fn.progress.settings={name:"Progress",namespace:"progress",silent:!1,debug:!1,verbose:!1,performance:!0,random:{min:2,max:5},duration:300,updateInterval:"auto",autoSuccess:!0,showActivity:!0,limitValues:!0,label:"percent",precision:0,framerate:1e3/30,percent:!1,total:!1,value:!1,failSafeDelay:100,onLabelUpdate:function(e,t,r,n){return t},onChange:function(e,t,r){},onSuccess:function(e){},onActive:function(e,t){},onError:function(e,t){},onWarning:function(e,t){},error:{method:"The method you called is not defined.",nonNumeric:"Progress value is non numeric",tooHigh:"Value specified is above 100%",tooLow:"Value specified is below 0%",sumExceedsTotal:"Sum of multiple values exceed total"},regExp:{variable:/{\$*[\da-z]+}/gi},metadata:{percent:"percent",total:"total",value:"value"},selector:{bar:"> .bar",label:"> .label",progress:".bar > .progress"},text:{active:!1,error:!1,success:!1,warning:!1,percent:"{percent}%",ratio:"{value} of {total}",bars:[""]},className:{active:"active",error:"error",success:"success",warning:"warning"}}}(jQuery,window,document);
|
package/dist/components/rail.css
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* # Fomantic-UI 2.9.1-beta.
|
2
|
+
* # Fomantic-UI 2.9.1-beta.26+1084e98 - Rating
|
3
3
|
* https://github.com/fomantic/Fomantic-UI/
|
4
4
|
*
|
5
5
|
*
|
@@ -95,14 +95,14 @@
|
|
95
95
|
-------------- */
|
96
96
|
.ui.primary.rating .active.icon {
|
97
97
|
color: #54C8FF;
|
98
|
-
text-shadow:
|
98
|
+
text-shadow: 0 -1px 0 #2185D0, -1px 0 0 #2185D0, 0 1px 0 #2185D0, 1px 0 0 #2185D0;
|
99
99
|
}
|
100
100
|
.ui.primary.rating .icon.selected,
|
101
101
|
.ui.primary.rating .icon.selected.active,
|
102
102
|
.ui.primary.rating .icon.selected.partial.active {
|
103
103
|
background: inherit;
|
104
104
|
color: #21b8ff;
|
105
|
-
text-shadow:
|
105
|
+
text-shadow: 0 -1px 0 #1678c2, -1px 0 0 #1678c2, 0 1px 0 #1678c2, 1px 0 0 #1678c2;
|
106
106
|
-webkit-text-stroke: unset;
|
107
107
|
background-clip: unset;
|
108
108
|
}
|
@@ -114,14 +114,14 @@
|
|
114
114
|
}
|
115
115
|
.ui.secondary.rating .active.icon {
|
116
116
|
color: #545454;
|
117
|
-
text-shadow:
|
117
|
+
text-shadow: 0 -1px 0 #1B1C1D, -1px 0 0 #1B1C1D, 0 1px 0 #1B1C1D, 1px 0 0 #1B1C1D;
|
118
118
|
}
|
119
119
|
.ui.secondary.rating .icon.selected,
|
120
120
|
.ui.secondary.rating .icon.selected.active,
|
121
121
|
.ui.secondary.rating .icon.selected.partial.active {
|
122
122
|
background: inherit;
|
123
123
|
color: #6e6e6e;
|
124
|
-
text-shadow:
|
124
|
+
text-shadow: 0 -1px 0 #27292a, -1px 0 0 #27292a, 0 1px 0 #27292a, 1px 0 0 #27292a;
|
125
125
|
-webkit-text-stroke: unset;
|
126
126
|
background-clip: unset;
|
127
127
|
}
|
@@ -133,14 +133,14 @@
|
|
133
133
|
}
|
134
134
|
.ui.red.rating .active.icon {
|
135
135
|
color: #FF695E;
|
136
|
-
text-shadow:
|
136
|
+
text-shadow: 0 -1px 0 #DB2828, -1px 0 0 #DB2828, 0 1px 0 #DB2828, 1px 0 0 #DB2828;
|
137
137
|
}
|
138
138
|
.ui.red.rating .icon.selected,
|
139
139
|
.ui.red.rating .icon.selected.active,
|
140
140
|
.ui.red.rating .icon.selected.partial.active {
|
141
141
|
background: inherit;
|
142
142
|
color: #ff392b;
|
143
|
-
text-shadow:
|
143
|
+
text-shadow: 0 -1px 0 #d01919, -1px 0 0 #d01919, 0 1px 0 #d01919, 1px 0 0 #d01919;
|
144
144
|
-webkit-text-stroke: unset;
|
145
145
|
background-clip: unset;
|
146
146
|
}
|
@@ -152,14 +152,14 @@
|
|
152
152
|
}
|
153
153
|
.ui.orange.rating .active.icon {
|
154
154
|
color: #FF851B;
|
155
|
-
text-shadow:
|
155
|
+
text-shadow: 0 -1px 0 #F2711C, -1px 0 0 #F2711C, 0 1px 0 #F2711C, 1px 0 0 #F2711C;
|
156
156
|
}
|
157
157
|
.ui.orange.rating .icon.selected,
|
158
158
|
.ui.orange.rating .icon.selected.active,
|
159
159
|
.ui.orange.rating .icon.selected.partial.active {
|
160
160
|
background: inherit;
|
161
161
|
color: #e76b00;
|
162
|
-
text-shadow:
|
162
|
+
text-shadow: 0 -1px 0 #f26202, -1px 0 0 #f26202, 0 1px 0 #f26202, 1px 0 0 #f26202;
|
163
163
|
-webkit-text-stroke: unset;
|
164
164
|
background-clip: unset;
|
165
165
|
}
|
@@ -171,14 +171,14 @@
|
|
171
171
|
}
|
172
172
|
.ui.yellow.rating .active.icon {
|
173
173
|
color: #FFE21F;
|
174
|
-
text-shadow:
|
174
|
+
text-shadow: 0 -1px 0 #FBBD08, -1px 0 0 #FBBD08, 0 1px 0 #FBBD08, 1px 0 0 #FBBD08;
|
175
175
|
}
|
176
176
|
.ui.yellow.rating .icon.selected,
|
177
177
|
.ui.yellow.rating .icon.selected.active,
|
178
178
|
.ui.yellow.rating .icon.selected.partial.active {
|
179
179
|
background: inherit;
|
180
180
|
color: #ebcd00;
|
181
|
-
text-shadow:
|
181
|
+
text-shadow: 0 -1px 0 #eaae00, -1px 0 0 #eaae00, 0 1px 0 #eaae00, 1px 0 0 #eaae00;
|
182
182
|
-webkit-text-stroke: unset;
|
183
183
|
background-clip: unset;
|
184
184
|
}
|
@@ -190,14 +190,14 @@
|
|
190
190
|
}
|
191
191
|
.ui.olive.rating .active.icon {
|
192
192
|
color: #D9E778;
|
193
|
-
text-shadow:
|
193
|
+
text-shadow: 0 -1px 0 #B5CC18, -1px 0 0 #B5CC18, 0 1px 0 #B5CC18, 1px 0 0 #B5CC18;
|
194
194
|
}
|
195
195
|
.ui.olive.rating .icon.selected,
|
196
196
|
.ui.olive.rating .icon.selected.active,
|
197
197
|
.ui.olive.rating .icon.selected.partial.active {
|
198
198
|
background: inherit;
|
199
199
|
color: #d2e745;
|
200
|
-
text-shadow:
|
200
|
+
text-shadow: 0 -1px 0 #a7bd0d, -1px 0 0 #a7bd0d, 0 1px 0 #a7bd0d, 1px 0 0 #a7bd0d;
|
201
201
|
-webkit-text-stroke: unset;
|
202
202
|
background-clip: unset;
|
203
203
|
}
|
@@ -209,14 +209,14 @@
|
|
209
209
|
}
|
210
210
|
.ui.green.rating .active.icon {
|
211
211
|
color: #2ECC40;
|
212
|
-
text-shadow:
|
212
|
+
text-shadow: 0 -1px 0 #21BA45, -1px 0 0 #21BA45, 0 1px 0 #21BA45, 1px 0 0 #21BA45;
|
213
213
|
}
|
214
214
|
.ui.green.rating .icon.selected,
|
215
215
|
.ui.green.rating .icon.selected.active,
|
216
216
|
.ui.green.rating .icon.selected.partial.active {
|
217
217
|
background: inherit;
|
218
218
|
color: #1ea92e;
|
219
|
-
text-shadow:
|
219
|
+
text-shadow: 0 -1px 0 #16ab39, -1px 0 0 #16ab39, 0 1px 0 #16ab39, 1px 0 0 #16ab39;
|
220
220
|
-webkit-text-stroke: unset;
|
221
221
|
background-clip: unset;
|
222
222
|
}
|
@@ -228,14 +228,14 @@
|
|
228
228
|
}
|
229
229
|
.ui.teal.rating .active.icon {
|
230
230
|
color: #6DFFFF;
|
231
|
-
text-shadow:
|
231
|
+
text-shadow: 0 -1px 0 #00B5AD, -1px 0 0 #00B5AD, 0 1px 0 #00B5AD, 1px 0 0 #00B5AD;
|
232
232
|
}
|
233
233
|
.ui.teal.rating .icon.selected,
|
234
234
|
.ui.teal.rating .icon.selected.active,
|
235
235
|
.ui.teal.rating .icon.selected.partial.active {
|
236
236
|
background: inherit;
|
237
237
|
color: #3affff;
|
238
|
-
text-shadow:
|
238
|
+
text-shadow: 0 -1px 0 #009c95, -1px 0 0 #009c95, 0 1px 0 #009c95, 1px 0 0 #009c95;
|
239
239
|
-webkit-text-stroke: unset;
|
240
240
|
background-clip: unset;
|
241
241
|
}
|
@@ -247,14 +247,14 @@
|
|
247
247
|
}
|
248
248
|
.ui.blue.rating .active.icon {
|
249
249
|
color: #54C8FF;
|
250
|
-
text-shadow:
|
250
|
+
text-shadow: 0 -1px 0 #2185D0, -1px 0 0 #2185D0, 0 1px 0 #2185D0, 1px 0 0 #2185D0;
|
251
251
|
}
|
252
252
|
.ui.blue.rating .icon.selected,
|
253
253
|
.ui.blue.rating .icon.selected.active,
|
254
254
|
.ui.blue.rating .icon.selected.partial.active {
|
255
255
|
background: inherit;
|
256
256
|
color: #21b8ff;
|
257
|
-
text-shadow:
|
257
|
+
text-shadow: 0 -1px 0 #1678c2, -1px 0 0 #1678c2, 0 1px 0 #1678c2, 1px 0 0 #1678c2;
|
258
258
|
-webkit-text-stroke: unset;
|
259
259
|
background-clip: unset;
|
260
260
|
}
|
@@ -266,14 +266,14 @@
|
|
266
266
|
}
|
267
267
|
.ui.violet.rating .active.icon {
|
268
268
|
color: #A291FB;
|
269
|
-
text-shadow:
|
269
|
+
text-shadow: 0 -1px 0 #6435C9, -1px 0 0 #6435C9, 0 1px 0 #6435C9, 1px 0 0 #6435C9;
|
270
270
|
}
|
271
271
|
.ui.violet.rating .icon.selected,
|
272
272
|
.ui.violet.rating .icon.selected.active,
|
273
273
|
.ui.violet.rating .icon.selected.partial.active {
|
274
274
|
background: inherit;
|
275
275
|
color: #745aff;
|
276
|
-
text-shadow:
|
276
|
+
text-shadow: 0 -1px 0 #5829bb, -1px 0 0 #5829bb, 0 1px 0 #5829bb, 1px 0 0 #5829bb;
|
277
277
|
-webkit-text-stroke: unset;
|
278
278
|
background-clip: unset;
|
279
279
|
}
|
@@ -285,14 +285,14 @@
|
|
285
285
|
}
|
286
286
|
.ui.purple.rating .active.icon {
|
287
287
|
color: #DC73FF;
|
288
|
-
text-shadow:
|
288
|
+
text-shadow: 0 -1px 0 #A333C8, -1px 0 0 #A333C8, 0 1px 0 #A333C8, 1px 0 0 #A333C8;
|
289
289
|
}
|
290
290
|
.ui.purple.rating .icon.selected,
|
291
291
|
.ui.purple.rating .icon.selected.active,
|
292
292
|
.ui.purple.rating .icon.selected.partial.active {
|
293
293
|
background: inherit;
|
294
294
|
color: #cf40ff;
|
295
|
-
text-shadow:
|
295
|
+
text-shadow: 0 -1px 0 #9627ba, -1px 0 0 #9627ba, 0 1px 0 #9627ba, 1px 0 0 #9627ba;
|
296
296
|
-webkit-text-stroke: unset;
|
297
297
|
background-clip: unset;
|
298
298
|
}
|
@@ -304,14 +304,14 @@
|
|
304
304
|
}
|
305
305
|
.ui.pink.rating .active.icon {
|
306
306
|
color: #FF8EDF;
|
307
|
-
text-shadow:
|
307
|
+
text-shadow: 0 -1px 0 #E03997, -1px 0 0 #E03997, 0 1px 0 #E03997, 1px 0 0 #E03997;
|
308
308
|
}
|
309
309
|
.ui.pink.rating .icon.selected,
|
310
310
|
.ui.pink.rating .icon.selected.active,
|
311
311
|
.ui.pink.rating .icon.selected.partial.active {
|
312
312
|
background: inherit;
|
313
313
|
color: #ff5bd1;
|
314
|
-
text-shadow:
|
314
|
+
text-shadow: 0 -1px 0 #e61a8d, -1px 0 0 #e61a8d, 0 1px 0 #e61a8d, 1px 0 0 #e61a8d;
|
315
315
|
-webkit-text-stroke: unset;
|
316
316
|
background-clip: unset;
|
317
317
|
}
|
@@ -323,14 +323,14 @@
|
|
323
323
|
}
|
324
324
|
.ui.brown.rating .active.icon {
|
325
325
|
color: #D67C1C;
|
326
|
-
text-shadow:
|
326
|
+
text-shadow: 0 -1px 0 #A5673F, -1px 0 0 #A5673F, 0 1px 0 #A5673F, 1px 0 0 #A5673F;
|
327
327
|
}
|
328
328
|
.ui.brown.rating .icon.selected,
|
329
329
|
.ui.brown.rating .icon.selected.active,
|
330
330
|
.ui.brown.rating .icon.selected.partial.active {
|
331
331
|
background: inherit;
|
332
332
|
color: #b0620f;
|
333
|
-
text-shadow:
|
333
|
+
text-shadow: 0 -1px 0 #975b33, -1px 0 0 #975b33, 0 1px 0 #975b33, 1px 0 0 #975b33;
|
334
334
|
-webkit-text-stroke: unset;
|
335
335
|
background-clip: unset;
|
336
336
|
}
|
@@ -342,14 +342,14 @@
|
|
342
342
|
}
|
343
343
|
.ui.grey.rating .active.icon {
|
344
344
|
color: #DCDDDE;
|
345
|
-
text-shadow:
|
345
|
+
text-shadow: 0 -1px 0 #767676, -1px 0 0 #767676, 0 1px 0 #767676, 1px 0 0 #767676;
|
346
346
|
}
|
347
347
|
.ui.grey.rating .icon.selected,
|
348
348
|
.ui.grey.rating .icon.selected.active,
|
349
349
|
.ui.grey.rating .icon.selected.partial.active {
|
350
350
|
background: inherit;
|
351
351
|
color: #c2c4c5;
|
352
|
-
text-shadow:
|
352
|
+
text-shadow: 0 -1px 0 #838383, -1px 0 0 #838383, 0 1px 0 #838383, 1px 0 0 #838383;
|
353
353
|
-webkit-text-stroke: unset;
|
354
354
|
background-clip: unset;
|
355
355
|
}
|
@@ -361,14 +361,14 @@
|
|
361
361
|
}
|
362
362
|
.ui.black.rating .active.icon {
|
363
363
|
color: #545454;
|
364
|
-
text-shadow:
|
364
|
+
text-shadow: 0 -1px 0 #1B1C1D, -1px 0 0 #1B1C1D, 0 1px 0 #1B1C1D, 1px 0 0 #1B1C1D;
|
365
365
|
}
|
366
366
|
.ui.black.rating .icon.selected,
|
367
367
|
.ui.black.rating .icon.selected.active,
|
368
368
|
.ui.black.rating .icon.selected.partial.active {
|
369
369
|
background: inherit;
|
370
370
|
color: #000000;
|
371
|
-
text-shadow:
|
371
|
+
text-shadow: 0 -1px 0 #27292a, -1px 0 0 #27292a, 0 1px 0 #27292a, 1px 0 0 #27292a;
|
372
372
|
-webkit-text-stroke: unset;
|
373
373
|
background-clip: unset;
|
374
374
|
}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* # Fomantic-UI 2.9.1-beta.
|
2
|
+
* # Fomantic-UI 2.9.1-beta.26+1084e98 - Rating
|
3
3
|
* https://github.com/fomantic/Fomantic-UI/
|
4
4
|
*
|
5
5
|
*
|
@@ -143,11 +143,11 @@
|
|
143
143
|
$activeIcon = $(this),
|
144
144
|
currentRating = module.get.rating(),
|
145
145
|
rating = $icon.index($activeIcon) + 1,
|
146
|
-
canClear = settings.clearable
|
146
|
+
canClear = settings.clearable === 'auto'
|
147
147
|
? $icon.length === 1
|
148
148
|
: settings.clearable
|
149
149
|
;
|
150
|
-
if (canClear && currentRating
|
150
|
+
if (canClear && currentRating === rating) {
|
151
151
|
module.clearRating();
|
152
152
|
} else {
|
153
153
|
module.set.rating(rating);
|
@@ -414,17 +414,17 @@
|
|
414
414
|
query = query.split(/[ .]/);
|
415
415
|
maxDepth = query.length - 1;
|
416
416
|
$.each(query, function (depth, value) {
|
417
|
-
var camelCaseValue = depth
|
417
|
+
var camelCaseValue = depth !== maxDepth
|
418
418
|
? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)
|
419
419
|
: query
|
420
420
|
;
|
421
|
-
if ($.isPlainObject(object[camelCaseValue]) && (depth
|
421
|
+
if ($.isPlainObject(object[camelCaseValue]) && (depth !== maxDepth)) {
|
422
422
|
object = object[camelCaseValue];
|
423
423
|
} else if (object[camelCaseValue] !== undefined) {
|
424
424
|
found = object[camelCaseValue];
|
425
425
|
|
426
426
|
return false;
|
427
|
-
} else if ($.isPlainObject(object[value]) && (depth
|
427
|
+
} else if ($.isPlainObject(object[value]) && (depth !== maxDepth)) {
|
428
428
|
object = object[value];
|
429
429
|
} else if (object[value] !== undefined) {
|
430
430
|
found = object[value];
|