fomantic-ui 2.10.0-beta.6 → 2.10.0-beta.8
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/.eslintrc.js +0 -10
- package/README.md +4 -5
- package/changelog-setup.js +64 -70
- package/dist/components/accordion.css +1 -1
- package/dist/components/accordion.js +94 -131
- package/dist/components/accordion.min.css +1 -1
- package/dist/components/accordion.min.js +2 -2
- package/dist/components/ad.css +1 -1
- package/dist/components/ad.min.css +1 -1
- package/dist/components/api.js +152 -205
- package/dist/components/api.min.js +2 -2
- package/dist/components/breadcrumb.css +1 -1
- package/dist/components/breadcrumb.min.css +1 -1
- package/dist/components/button.css +1 -1
- package/dist/components/button.min.css +1 -1
- package/dist/components/calendar.css +1 -1
- package/dist/components/calendar.js +305 -341
- package/dist/components/calendar.min.css +1 -1
- package/dist/components/calendar.min.js +2 -2
- package/dist/components/card.css +1 -1
- package/dist/components/card.min.css +1 -1
- package/dist/components/checkbox.css +1 -1
- package/dist/components/checkbox.js +76 -116
- package/dist/components/checkbox.min.css +1 -1
- package/dist/components/checkbox.min.js +2 -2
- package/dist/components/comment.css +1 -1
- package/dist/components/comment.min.css +1 -1
- package/dist/components/container.css +1 -1
- package/dist/components/container.min.css +1 -1
- package/dist/components/dimmer.css +1 -1
- package/dist/components/dimmer.js +58 -91
- package/dist/components/dimmer.min.css +1 -1
- package/dist/components/dimmer.min.js +2 -2
- package/dist/components/divider.css +1 -1
- package/dist/components/divider.min.css +1 -1
- package/dist/components/dropdown.css +1 -1
- package/dist/components/dropdown.js +674 -977
- package/dist/components/dropdown.min.css +1 -1
- package/dist/components/dropdown.min.js +2 -2
- package/dist/components/embed.css +1 -1
- package/dist/components/embed.js +80 -127
- package/dist/components/embed.min.css +1 -1
- package/dist/components/embed.min.js +2 -2
- package/dist/components/emoji.css +1 -1
- package/dist/components/emoji.min.css +1 -1
- package/dist/components/feed.css +1 -1
- package/dist/components/feed.min.css +1 -1
- package/dist/components/flag.css +1 -1
- package/dist/components/flag.min.css +1 -1
- package/dist/components/flyout.css +1 -1
- package/dist/components/flyout.js +192 -274
- package/dist/components/flyout.min.css +1 -1
- package/dist/components/flyout.min.js +2 -2
- package/dist/components/form.css +1 -1
- package/dist/components/form.js +325 -429
- package/dist/components/form.min.css +1 -1
- package/dist/components/form.min.js +2 -2
- package/dist/components/grid.css +1 -1
- package/dist/components/grid.min.css +1 -1
- package/dist/components/header.css +1 -1
- package/dist/components/header.min.css +1 -1
- package/dist/components/icon.css +1 -1
- package/dist/components/icon.min.css +1 -1
- package/dist/components/image.css +1 -1
- package/dist/components/image.min.css +1 -1
- package/dist/components/input.css +1 -1
- package/dist/components/input.min.css +1 -1
- package/dist/components/item.css +1 -1
- package/dist/components/item.min.css +1 -1
- package/dist/components/label.css +1 -1
- package/dist/components/label.min.css +1 -1
- package/dist/components/list.css +1 -1
- package/dist/components/list.min.css +1 -1
- package/dist/components/loader.css +1 -1
- package/dist/components/loader.min.css +1 -1
- package/dist/components/menu.css +1 -1
- package/dist/components/menu.min.css +1 -1
- package/dist/components/message.css +1 -1
- package/dist/components/message.min.css +1 -1
- package/dist/components/modal.css +1 -1
- package/dist/components/modal.js +221 -313
- package/dist/components/modal.min.css +1 -1
- package/dist/components/modal.min.js +2 -2
- package/dist/components/nag.css +1 -1
- package/dist/components/nag.js +67 -97
- package/dist/components/nag.min.css +1 -1
- package/dist/components/nag.min.js +2 -2
- package/dist/components/placeholder.css +1 -1
- package/dist/components/placeholder.min.css +1 -1
- package/dist/components/popup.css +1 -1
- package/dist/components/popup.js +185 -254
- package/dist/components/popup.min.css +1 -1
- package/dist/components/popup.min.js +2 -2
- package/dist/components/progress.css +1 -1
- package/dist/components/progress.js +103 -138
- package/dist/components/progress.min.css +1 -1
- package/dist/components/progress.min.js +2 -2
- package/dist/components/rail.css +1 -1
- package/dist/components/rail.min.css +1 -1
- package/dist/components/rating.css +1 -1
- package/dist/components/rating.js +89 -139
- package/dist/components/rating.min.css +1 -1
- package/dist/components/rating.min.js +2 -2
- package/dist/components/reset.css +1 -1
- package/dist/components/reset.min.css +1 -1
- package/dist/components/reveal.css +1 -1
- package/dist/components/reveal.min.css +1 -1
- package/dist/components/search.css +1 -1
- package/dist/components/search.js +253 -352
- package/dist/components/search.min.css +1 -1
- package/dist/components/search.min.js +2 -2
- package/dist/components/segment.css +1 -1
- package/dist/components/segment.min.css +1 -1
- package/dist/components/shape.css +1 -1
- package/dist/components/shape.js +157 -223
- package/dist/components/shape.min.css +1 -1
- package/dist/components/shape.min.js +2 -2
- package/dist/components/sidebar.css +1 -1
- package/dist/components/sidebar.js +122 -163
- package/dist/components/sidebar.min.css +1 -1
- package/dist/components/sidebar.min.js +2 -2
- package/dist/components/site.css +1 -1
- package/dist/components/site.js +38 -57
- package/dist/components/site.min.css +1 -1
- package/dist/components/site.min.js +2 -2
- package/dist/components/slider.css +1 -1
- package/dist/components/slider.js +242 -325
- package/dist/components/slider.min.css +1 -1
- package/dist/components/slider.min.js +2 -2
- package/dist/components/state.js +68 -98
- package/dist/components/state.min.js +2 -2
- package/dist/components/statistic.css +1 -1
- package/dist/components/statistic.min.css +1 -1
- package/dist/components/step.css +1 -1
- package/dist/components/step.min.css +1 -1
- package/dist/components/sticky.css +1 -1
- package/dist/components/sticky.js +116 -159
- 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 +168 -233
- package/dist/components/tab.min.css +1 -1
- package/dist/components/tab.min.js +2 -2
- package/dist/components/table.css +1 -1
- package/dist/components/table.min.css +1 -1
- package/dist/components/text.css +1 -1
- package/dist/components/text.min.css +1 -1
- package/dist/components/toast.css +1 -1
- package/dist/components/toast.js +99 -132
- package/dist/components/toast.min.css +1 -1
- package/dist/components/toast.min.js +2 -2
- package/dist/components/transition.css +1 -1
- package/dist/components/transition.js +86 -141
- package/dist/components/transition.min.css +1 -1
- package/dist/components/transition.min.js +2 -2
- package/dist/components/visibility.js +134 -210
- package/dist/components/visibility.min.js +2 -2
- package/dist/semantic.css +53 -53
- package/dist/semantic.js +4100 -5721
- package/dist/semantic.min.css +1 -1
- package/dist/semantic.min.js +2 -2
- package/examples/assets/show-examples.js +2 -4
- package/gulpfile.js +5 -7
- package/package.json +1 -1
- package/scripts/nightly-version.js +7 -10
- package/src/definitions/behaviors/api.js +151 -204
- package/src/definitions/behaviors/form.js +324 -428
- package/src/definitions/behaviors/state.js +67 -97
- package/src/definitions/behaviors/visibility.js +133 -209
- package/src/definitions/globals/site.js +37 -56
- package/src/definitions/modules/accordion.js +93 -130
- package/src/definitions/modules/calendar.js +304 -340
- package/src/definitions/modules/checkbox.js +75 -115
- package/src/definitions/modules/dimmer.js +57 -90
- package/src/definitions/modules/dropdown.js +673 -976
- package/src/definitions/modules/embed.js +79 -126
- package/src/definitions/modules/flyout.js +191 -273
- package/src/definitions/modules/modal.js +220 -312
- package/src/definitions/modules/nag.js +66 -96
- package/src/definitions/modules/popup.js +184 -253
- package/src/definitions/modules/progress.js +102 -137
- package/src/definitions/modules/rating.js +88 -138
- package/src/definitions/modules/search.js +252 -351
- package/src/definitions/modules/shape.js +156 -222
- package/src/definitions/modules/sidebar.js +121 -162
- package/src/definitions/modules/slider.js +241 -324
- package/src/definitions/modules/sticky.js +115 -158
- package/src/definitions/modules/tab.js +167 -232
- package/src/definitions/modules/toast.js +98 -131
- package/src/definitions/modules/transition.js +85 -140
- package/tasks/admin/components/create.js +88 -108
- package/tasks/admin/components/init.js +26 -32
- package/tasks/admin/components/update.js +46 -53
- package/tasks/admin/distributions/create.js +71 -101
- package/tasks/admin/distributions/init.js +27 -33
- package/tasks/admin/distributions/update.js +45 -52
- package/tasks/admin/register.js +11 -15
- package/tasks/build/assets.js +14 -18
- package/tasks/build/css.js +54 -63
- package/tasks/build/javascript.js +45 -53
- package/tasks/build.js +4 -6
- package/tasks/check-install.js +5 -7
- package/tasks/clean.js +2 -4
- package/tasks/collections/admin.js +13 -15
- package/tasks/collections/build.js +6 -8
- package/tasks/collections/docs.js +2 -4
- package/tasks/collections/install.js +2 -4
- package/tasks/collections/rtl.js +2 -4
- package/tasks/collections/various.js +2 -4
- package/tasks/config/admin/github.js +7 -9
- package/tasks/config/admin/templates/css-package.js +1 -3
- package/tasks/config/admin/templates/less-package.js +1 -3
- package/tasks/config/npm/gulpfile.js +4 -6
- package/tasks/config/project/config.js +22 -30
- package/tasks/config/project/install.js +56 -70
- package/tasks/config/project/release.js +6 -8
- package/tasks/config/tasks.js +8 -12
- package/tasks/config/user.js +13 -17
- package/tasks/docs/build.js +26 -31
- package/tasks/docs/metadata.js +24 -30
- package/tasks/docs/serve.js +20 -26
- package/tasks/install.js +71 -98
- package/tasks/rtl/build.js +2 -4
- package/tasks/rtl/watch.js +2 -4
- package/tasks/watch.js +9 -11
- package/test/meteor/fonts.js +1 -2
- package/test/modules/module.spec.js +16 -18
@@ -1,5 +1,5 @@
|
|
1
1
|
/*
|
2
|
-
* # Fomantic UI - 2.10.0-beta.
|
2
|
+
* # Fomantic UI - 2.10.0-beta.8+62e258f
|
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){"use strict";function z(t){return"function"==typeof t&&"number"!=typeof t.nodeType}W=void 0!==W&&W.Math===Math?W:globalThis,V.fn.popup=function(x){var E,t=V(this),k=V(M),S=V(W),A=V("body"),D="ontouchstart"in M.documentElement?"touchstart":"click",O=Date.now(),j=[],F=x,R="string"==typeof F,H=[].slice.call(arguments,1),N=function(t,e){var o;return 0<=[W,M].indexOf(t)?o=V(t):0===(o=V(e.document).find(t)).length&&(o=e.frameElement?N(t,e.parent):A),o};return t.each(function(){var p,s,t,e,o,u=V.isPlainObject(x)?V.extend(!0,{},V.fn.popup.settings,x):V.extend({},V.fn.popup.settings),i=u.selector,c=u.className,d=u.error,f=u.metadata,n=u.namespace,r="."+u.namespace,a="module-"+n,h=V(this),l=N(u.context,W),g=N(u.scrollContext,W),v=N(u.boundary,W),m=u.target?N(u.target,W):h,b=0,w=!1,y=!1,P=this,C=h.data(a),T={initialize:function(){T.debug("Initializing",h),T.createID(),T.bind.events(),!T.exists()&&u.preserve&&T.create(),u.observeChanges&&T.observeChanges(),T.instantiate()},instantiate:function(){T.verbose("Storing instance",T),C=T,h.data(a,C)},observeChanges:function(){"MutationObserver"in W&&((t=new MutationObserver(T.event.documentChanged)).observe(M,{childList:!0,subtree:!0}),T.debug("Setting up mutation observer",t))},refresh:function(){u.popup?p=k.find(u.popup).eq(0):u.inline&&(p=m.nextAll(i.popup).eq(0),u.popup=p),u.popup?(T.set.invisible(),s=T.get.offsetParent(),T.remove.invisible(),u.movePopup&&T.has.popup()&&T.get.offsetParent(p)[0]!==s[0]&&(T.debug("Moving popup to the same offset parent as target"),p.detach().appendTo(s))):s=u.inline?T.get.offsetParent(m):T.has.popup()?T.get.offsetParent(p):A,s.is("html")&&s[0]!==A[0]&&(T.debug("Setting page as offset parent"),s=A),T.get.variation()&&T.set.variation()},reposition:function(){T.refresh(),T.set.position()},destroy:function(){T.debug("Destroying previous module"),t&&t.disconnect(),p&&!u.preserve&&T.removePopup(),clearTimeout(T.hideTimer),clearTimeout(T.showTimer),T.unbind.close(),T.unbind.events(),h.removeData(a)},event:{start:function(t){var e=V.isPlainObject(u.delay)?u.delay.show:u.delay;clearTimeout(T.hideTimer),y&&!u.addTouchEvents||(T.showTimer=setTimeout(function(){T.show()},e))},end:function(){var t=V.isPlainObject(u.delay)?u.delay.hide:u.delay;clearTimeout(T.showTimer),T.hideTimer=setTimeout(function(){T.hide()},t)},touchstart:function(t){y=!0,u.addTouchEvents&&T.show()},resize:function(){T.is.visible()&&T.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)&&(T.debug("Element removed from DOM, tearing down events"),T.destroy())})})},hideGracefully:function(t){var e=V(t.target),o=V.contains(M.documentElement,t.target),e=0<e.closest(i.popup).length;t&&!e&&o?(T.debug("Click occurred outside popup hiding popup"),T.hide()):T.debug("Click was inside popup, keeping popup open")}},create:function(){var t=m.next(i.popup),e=!u.popup&&0===t.length&&h.attr("title"),o=T.get.html(),n=T.get.title(),e=T.get.content(e);o||e||n?(T.debug("Creating pop-up html"),o=o||u.templates.popup({title:n,content:e}),p=V("<div/>").addClass(c.popup).data(f.activator,h).html(o),u.inline?(T.verbose("Inserting popup element inline",p),p.insertAfter(h)):(T.verbose("Appending popup element to body",p),p.appendTo(l)),T.refresh(),T.set.variation(),u.hoverable&&T.bind.popup(),u.onCreate.call(p,P)):u.popup?(k.find(u.popup).data(f.activator,h),T.verbose("Used popup specified in settings"),T.refresh(),u.hoverable&&T.bind.popup()):0<t.length?(T.verbose("Pre-existing popup found"),u.inline=!0,u.popup=t.data(f.activator,h),T.refresh(),u.hoverable&&T.bind.popup()):T.debug("No content specified skipping display",P)},createID:function(){o=(Math.random().toString(16)+"000000000").slice(2,10),e="."+o,T.verbose("Creating unique id for element",o)},toggle:function(){T.debug("Toggling pop-up"),T.is.hidden()?(T.debug("Popup is hidden, showing pop-up"),T.unbind.close(),T.show()):(T.debug("Popup is visible, hiding pop-up"),T.hide())},show:function(t){t=t||function(){},T.debug("Showing pop-up",u.transition),!T.is.hidden()||T.is.active()&&T.is.dropdown()||(T.exists()||T.create(),!1===u.onShow.call(p,P)?T.debug("onShow callback returned false, cancelling popup animation"):(u.preserve||u.popup||T.refresh(),p&&T.set.position()&&(T.save.conditions(),u.exclusive&&T.hideAll(),T.animate.show(t))))},hide:function(t){t=t||function(){},(T.is.visible()||T.is.animating())&&(!1===u.onHide.call(p,P)?T.debug("onHide callback returned false, cancelling popup animation"):(T.remove.visible(),T.unbind.close(),T.restore.conditions(),T.animate.hide(t)))},hideAll:function(){k.find(i.popup).filter("."+c.popupVisible).each(function(){V(this).data(f.activator).popup("hide")})},exists:function(){return!!p&&(u.inline||u.popup?T.has.popup():0<p.closest(l).length)},removePopup:function(){T.has.popup()&&!u.popup&&(T.debug("Removing popup",p),p.remove(),p=void 0,u.onRemove.call(p,P))},save:{conditions:function(){T.cache={title:h.attr("title")},T.cache.title&&h.removeAttr("title"),T.verbose("Saving original attributes",T.cache.title)}},restore:{conditions:function(){return T.cache&&T.cache.title&&(h.attr("title",T.cache.title),T.verbose("Restoring original attributes",T.cache.title)),!0}},supports:{svg:function(){return"undefined"!=typeof SVGGraphicsElement}},animate:{show:function(t){t=z(t)?t:function(){},u.transition&&T.can.useElement("transition")&&(T.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(){T.bind.close(),t.call(p,P),u.onVisible.call(p,P)}}))},hide:function(t){t=z(t)?t:function(){},T.debug("Hiding pop-up"),u.transition&&void 0!==V.fn.transition?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(){T.reset(),t.call(p,P),u.onHidden.call(p,P)}}):T.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(t){return h.removeData(f.content),h.data(f.content)||u.content||t},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=T.get.offsetParent(p),e=m[0],o=v[0]===W,n=m.offset(),i=u.inline||u.popup&&u.movePopup?m.offsetParent().offset():{top:0,left:0},r=o?{top:0,left:0}:v.offset(),a={},o=o?{top:S.scrollTop(),left:S.scrollLeft()}:{top:0,left:0},a={target:{element:m[0],width:m.outerWidth(),height:m.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:v.width(),height:v.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&&T.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?T.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||T.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)},T.verbose("Distance from boundaries determined",t,o)),o},offsetParent:function(t){var e=(void 0!==t?t:m)[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||(T.verbose("All available positions available"),w=T.get.positions()),T.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],T.debug("Trying opposite strategy",a)),"adjacent"===u.prefer&&n&&(a=(a=[o,{left:"center",center:"right",right:"left"}[e]]).join(" "),r=!0===w[a],T.debug("Trying adjacent strategy",a)),(r||i)&&(T.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!==m.length&&0!==p.length){var o,n,i,r,a,s,l;if(e=e||T.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,T.should.centerArrow(e)&&(T.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&&!T.is.svg(i.element))return T.debug("Popup target is hidden, no action taken"),!1;switch(u.inline&&(T.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)),T.debug("Determining popup position from calculations",t,e),T.is.rtl()&&(t=t.replace(/left|right/g,function(t){return"left"===t?"right":"left"}),T.debug("RTL: Popup position updated",t)),t=b===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(void 0===s&&T.error(d.invalidPosition,t),T.debug("Calculated popup positioning values",s),p.css(s).removeClass(c.position).addClass(t),T.set.invisible(),l=T.get.popupOffset(),l=T.get.distanceFromBoundary(l,e),!u.forcePosition&&T.is.offstage(l,t)){if(T.debug("Position is outside viewport",t),b<u.maxSearchDepth)return b++,t=T.get.nextPosition(t),T.debug("Trying new position",t),!!p&&T.set.position(t,e);if(!u.lastResort)return T.debug("Popup could not find a position to display",p),T.error(d.cannotPlace,P),T.remove.attempts(),T.remove.invisible(),T.reset(),u.onUnplaceable.call(p,P),!1;T.debug("No position found, showing with last position")}return T.debug("Position is on stage",t),T.remove.attempts(),T.remove.invisible(),u.setFluidWidth&&T.is.fluid()&&T.set.fluidWidth(e),!0}T.error(d.notFound)},fluidWidth:function(t){t=t||T.get.calculations(),T.debug("Automatically setting element width to parent width",t.parent.width),p.css("width",t.container.width)},loading:function(){p.addClass(c.loading)},invisible:function(){p.addClass(c.invisible)},variation:function(t){(t=t||T.get.variation())&&T.has.popup()&&(T.verbose("Adding variation to popup",t),p.addClass(t))},visible:function(){h.addClass(c.visible)}},remove:{loading:function(){p.removeClass(c.loading)},invisible:function(){p.removeClass(c.invisible)},variation:function(t){(t=t||T.get.variation())&&(T.verbose("Removing variation",t),p.removeClass(t))},visible:function(){h.removeClass(c.visible)},attempts:function(){T.verbose("Resetting all searched positions"),b=0,w=!1}},bind:{events:function(){T.debug("Binding popup events to module"),"click"===u.on&&h.on(D+r,T.toggle),"hover"===u.on&&h.on("touchstart"+r,T.event.touchstart),T.get.startEvent()&&h.on(T.get.startEvent()+r,T.event.start).on(T.get.endEvent()+r,T.event.end),u.target&&T.debug("Target set to element",m),S.on("resize"+e,T.event.resize)},popup:function(){T.verbose("Allowing hover events on popup to prevent closing"),p&&T.has.popup()&&p.on("mouseenter"+r,T.event.start).on("mouseleave"+r,T.event.end)},close:function(){(!0===u.hideOnScroll||"auto"===u.hideOnScroll&&"click"!==u.on)&&T.bind.closeOnScroll(),T.is.closable()?T.bind.clickaway():"hover"===u.on&&y&&T.bind.touchClose()},closeOnScroll:function(){T.verbose("Binding scroll close event to document"),g.one(T.get.scrollEvent()+e,T.event.hideGracefully)},touchClose:function(){T.verbose("Binding popup touchclose event to document"),k.on("touchstart"+e,function(t){T.verbose("Touched away from popup"),T.event.hideGracefully.call(P,t)})},clickaway:function(){T.verbose("Binding popup close event to document"),k.on(D+e,function(t){T.verbose("Clicked away from popup"),T.event.hideGracefully.call(P,t)})}},unbind:{events:function(){S.off(e),h.off(r)},close:function(){k.off(e),g.off(e)}},can:{useElement:function(t){return void 0!==V.fn[t]||(T.error(d.noElement.replace("{element}",t)),!1)}},has:{popup:function(){return p&&0<p.length}},should:{centerArrow:function(t){return!T.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&&(T.debug("Position exceeds allowable distance from edge",t,e,o),n.push(t))}),0<n.length},svg:function(t){return T.supports.svg()&&t instanceof SVGGraphicsElement},basic:function(){return h.hasClass(c.basic)},active:function(){return h.hasClass(c.active)},animating:function(){return void 0!==p&&p.hasClass(c.animating)},fluid:function(){return void 0!==p&&p.hasClass(c.fluid)},visible:function(){return void 0!==p&&p.hasClass(c.popupVisible)},dropdown:function(){return h.hasClass(c.dropdown)},hidden:function(){return!T.is.visible()},rtl:function(){return"rtl"===h.attr("dir")||"rtl"===h.css("direction")||"rtl"===A.attr("dir")||"rtl"===A.css("direction")||"rtl"===l.attr("dir")||"rtl"===l.css("direction")}},reset:function(){T.remove.visible(),u.preserve?void 0!==V.fn.transition&&p.transition("remove transition"):T.removePopup()},setting:function(t,e){if(V.isPlainObject(t))V.extend(!0,u,t);else{if(void 0===e)return u[t];u[t]=e}},internal:function(t,e){if(V.isPlainObject(t))V.extend(!0,T,t);else{if(void 0===e)return T[t];T[t]=e}},debug:function(){!u.silent&&u.debug&&(u.performance?T.performance.log(arguments):(T.debug=Function.prototype.bind.call(console.info,console,u.name+":"),T.debug.apply(console,arguments)))},verbose:function(){!u.silent&&u.verbose&&u.debug&&(u.performance?T.performance.log(arguments):(T.verbose=Function.prototype.bind.call(console.info,console,u.name+":"),T.verbose.apply(console,arguments)))},error:function(){u.silent||(T.error=Function.prototype.bind.call(console.error,console,u.name+":"),T.error.apply(console,arguments))},performance:{log:function(t){var e,o;u.performance&&(o=(e=Date.now())-(O||e),O=e,j.push({Name:t[0],Arguments:[].slice.call(t,1)||"",Element:P,"Execution Time":o})),clearTimeout(T.performance.timer),T.performance.timer=setTimeout(function(){T.performance.display()},500)},display:function(){var t=u.name+":",o=0;O=!1,clearTimeout(T.performance.timer),V.each(j,function(t,e){o+=e["Execution Time"]}),t+=" "+o+"ms",0<j.length&&(console.groupCollapsed(t),console.table?console.table(j):V.each(j,function(t,e){console.log(e.Name+": "+e["Execution Time"]+"ms")}),console.groupEnd()),j=[]}},invoke:function(n,t,e){var i,r,o,a=C;return t=t||H,e=e||P,"string"==typeof n&&void 0!==a&&(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(void 0!==a[o])return r=a[o],!1;{if(!V.isPlainObject(a[e])||t===i)return void 0!==a[e]?r=a[e]:T.error(d.method,n),!1;a=a[e]}}})),z(r)?o=r.apply(e,t):void 0!==r&&(o=r),Array.isArray(E)?E.push(o):void 0!==E?E=[E,o]:void 0!==o&&(E=o),r}};R?(void 0===C&&T.initialize(),T.invoke(F)):(void 0!==C&&C.invoke("destroy"),T.initialize())}),void 0!==E?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.",noElement:"This module requires ui {element}",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",invisible:"invisible",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 t=/["&'<>]/.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 void 0!==t&&(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){"use strict";function z(t){return"function"==typeof t&&"number"!=typeof t.nodeType}W=void 0!==W&&W.Math===Math?W:globalThis,V.fn.popup=function(x){let t=V(this),E=V(M),k=V(W),S=V("body"),A="ontouchstart"in M.documentElement?"touchstart":"click",D=Date.now(),O=[],j=x,F="string"==typeof j,R=[].slice.call(arguments,1),H=function(t,e){let o;return 0<=[W,M].indexOf(t)?o=V(t):0===(o=V(e.document).find(t)).length&&(o=e.frameElement?H(t,e.parent):S),o},N;return t.each(function(){let p=V.isPlainObject(x)?V.extend(!0,{},V.fn.popup.settings,x):V.extend({},V.fn.popup.settings),i=p.selector,u=p.className,c=p.error,d=p.metadata;var t=p.namespace;let e="."+p.namespace,o="module-"+t,f=V(this),r=H(p.context,W),n=H(p.scrollContext,W),s=H(p.boundary,W),h=p.target?H(p.target,W):f,g,l,v=0,m=!1,a=!1,b=this,w=f.data(o),y,P,C,T;T={initialize:function(){T.debug("Initializing",f),T.createID(),T.bind.events(),!T.exists()&&p.preserve&&T.create(),p.observeChanges&&T.observeChanges(),T.instantiate()},instantiate:function(){T.verbose("Storing instance",T),w=T,f.data(o,w)},observeChanges:function(){"MutationObserver"in W&&((y=new MutationObserver(T.event.documentChanged)).observe(M,{childList:!0,subtree:!0}),T.debug("Setting up mutation observer",y))},refresh:function(){p.popup?g=E.find(p.popup).eq(0):p.inline&&(g=h.nextAll(i.popup).eq(0),p.popup=g),p.popup?(T.set.invisible(),l=T.get.offsetParent(),T.remove.invisible(),p.movePopup&&T.has.popup()&&T.get.offsetParent(g)[0]!==l[0]&&(T.debug("Moving popup to the same offset parent as target"),g.detach().appendTo(l))):l=p.inline?T.get.offsetParent(h):T.has.popup()?T.get.offsetParent(g):S,l.is("html")&&l[0]!==S[0]&&(T.debug("Setting page as offset parent"),l=S),T.get.variation()&&T.set.variation()},reposition:function(){T.refresh(),T.set.position()},destroy:function(){T.debug("Destroying previous module"),y&&y.disconnect(),g&&!p.preserve&&T.removePopup(),clearTimeout(T.hideTimer),clearTimeout(T.showTimer),T.unbind.close(),T.unbind.events(),f.removeData(o)},event:{start:function(t){var e=V.isPlainObject(p.delay)?p.delay.show:p.delay;clearTimeout(T.hideTimer),(!a||a&&p.addTouchEvents)&&(T.showTimer=setTimeout(function(){T.show()},e))},end:function(){var t=V.isPlainObject(p.delay)?p.delay.hide:p.delay;clearTimeout(T.showTimer),T.hideTimer=setTimeout(function(){T.hide()},t)},touchstart:function(t){a=!0,p.addTouchEvents&&T.show()},resize:function(){T.is.visible()&&T.set.position()},documentChanged:function(t){[].forEach.call(t,function(t){t.removedNodes&&[].forEach.call(t.removedNodes,function(t){(t===b||0<V(t).find(b).length)&&(T.debug("Element removed from DOM, tearing down events"),T.destroy())})})},hideGracefully:function(t){let e=V(t.target);var o=V.contains(M.documentElement,t.target),n=0<e.closest(i.popup).length;t&&!n&&o?(T.debug("Click occurred outside popup hiding popup"),T.hide()):T.debug("Click was inside popup, keeping popup open")}},create:function(){let t=h.next(i.popup);var e=!p.popup&&0===t.length&&f.attr("title");let o=T.get.html();var n=T.get.title(),e=T.get.content(e);o||e||n?(T.debug("Creating pop-up html"),o=o||p.templates.popup({title:n,content:e}),g=V("<div/>").addClass(u.popup).data(d.activator,f).html(o),p.inline?(T.verbose("Inserting popup element inline",g),g.insertAfter(f)):(T.verbose("Appending popup element to body",g),g.appendTo(r)),T.refresh(),T.set.variation(),p.hoverable&&T.bind.popup(),p.onCreate.call(g,b)):p.popup?(E.find(p.popup).data(d.activator,f),T.verbose("Used popup specified in settings"),T.refresh(),p.hoverable&&T.bind.popup()):0<t.length?(T.verbose("Pre-existing popup found"),p.inline=!0,p.popup=t.data(d.activator,f),T.refresh(),p.hoverable&&T.bind.popup()):T.debug("No content specified skipping display",b)},createID:function(){C=(Math.random().toString(16)+"000000000").slice(2,10),P="."+C,T.verbose("Creating unique id for element",C)},toggle:function(){T.debug("Toggling pop-up"),T.is.hidden()?(T.debug("Popup is hidden, showing pop-up"),T.unbind.close(),T.show()):(T.debug("Popup is visible, hiding pop-up"),T.hide())},show:function(t){t=t||function(){},T.debug("Showing pop-up",p.transition),!T.is.hidden()||T.is.active()&&T.is.dropdown()||(T.exists()||T.create(),!1===p.onShow.call(g,b)?T.debug("onShow callback returned false, cancelling popup animation"):(p.preserve||p.popup||T.refresh(),g&&T.set.position()&&(T.save.conditions(),p.exclusive&&T.hideAll(),T.animate.show(t))))},hide:function(t){t=t||function(){},(T.is.visible()||T.is.animating())&&(!1===p.onHide.call(g,b)?T.debug("onHide callback returned false, cancelling popup animation"):(T.remove.visible(),T.unbind.close(),T.restore.conditions(),T.animate.hide(t)))},hideAll:function(){E.find(i.popup).filter("."+u.popupVisible).each(function(){V(this).data(d.activator).popup("hide")})},exists:function(){return!!g&&(p.inline||p.popup?T.has.popup():0<g.closest(r).length)},removePopup:function(){T.has.popup()&&!p.popup&&(T.debug("Removing popup",g),g.remove(),g=void 0,p.onRemove.call(g,b))},save:{conditions:function(){T.cache={title:f.attr("title")},T.cache.title&&f.removeAttr("title"),T.verbose("Saving original attributes",T.cache.title)}},restore:{conditions:function(){return T.cache&&T.cache.title&&(f.attr("title",T.cache.title),T.verbose("Restoring original attributes",T.cache.title)),!0}},supports:{svg:function(){return"undefined"!=typeof SVGGraphicsElement}},animate:{show:function(t){t=z(t)?t:function(){},p.transition&&T.can.useElement("transition")&&(T.set.visible(),g.transition({animation:(p.transition.showMethod||p.transition)+" in",queue:!1,debug:p.debug,verbose:p.verbose,silent:p.silent,duration:p.transition.showDuration||p.duration,onComplete:function(){T.bind.close(),t.call(g,b),p.onVisible.call(g,b)}}))},hide:function(t){t=z(t)?t:function(){},T.debug("Hiding pop-up"),p.transition&&void 0!==V.fn.transition?g.transition({animation:(p.transition.hideMethod||p.transition)+" out",queue:!1,duration:p.transition.hideDuration||p.duration,debug:p.debug,verbose:p.verbose,silent:p.silent,onComplete:function(){T.reset(),t.call(g,b),p.onHidden.call(g,b)}}):T.error(c.noTransition)}},change:{content:function(t){g.html(t)}},get:{html:function(){return f.removeData(d.html),f.data(d.html)||p.html},title:function(){return f.removeData(d.title),f.data(d.title)||p.title},content:function(t){return f.removeData(d.content),f.data(d.content)||p.content||t},variation:function(){return f.removeData(d.variation),f.data(d.variation)||p.variation},popup:function(){return g},popupOffset:function(){return g.offset()},calculations:function(){let t=T.get.offsetParent(g);var e=h[0],o=s[0]===W,n=h.offset(),i=p.inline||p.popup&&p.movePopup?h.offsetParent().offset():{top:0,left:0},r=o?{top:0,left:0}:s.offset();let a={};o=o?{top:k.scrollTop(),left:k.scrollLeft()}:{top:0,left:0};return a={target:{element:h[0],width:h.outerWidth(),height:h.outerHeight(),top:n.top-i.top,left:n.left-i.left,margin:{}},popup:{width:g.outerWidth(),height:g.outerHeight()},parent:{width:l.outerWidth(),height:l.outerHeight()},screen:{top:r.top,left:r.left,scroll:{top:o.top,left:o.left},width:s.width(),height:s.height()}},t[0]!==l[0]&&(n=t.offset(),a.target.top-=n.top,a.target.left-=n.left,a.parent.width=t.outerWidth(),a.parent.height=t.outerHeight()),p.setFluidWidth&&T.is.fluid()&&(a.container={width:g.parent().outerWidth()},a.popup.width=a.container.width),a.target.margin.top=p.inline?parseInt(W.getComputedStyle(e).getPropertyValue("margin-top"),10):0,a.target.margin.left=p.inline?T.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 C},startEvent:function(){return"hover"===p.on?"mouseenter":"focus"===p.on&&"focus"},scrollEvent:function(){return"scroll"},endEvent:function(){return"hover"===p.on?"mouseleave":"focus"===p.on&&"blur"},distanceFromBoundary:function(t,e){let o={};var n=(e=e||T.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)},T.verbose("Distance from boundaries determined",t,o)),o},offsetParent:function(t){let n=(void 0!==t?t:h)[0].parentNode,i=V(n);if(n){let t="none"===i.css("transform"),e="static"===i.css("position"),o=i.is("body");for(;n&&!o&&e&&t;)n=n.parentNode,i=V(n),t="none"===i.css("transform"),e="static"===i.css("position"),o=i.is("body")}return i&&0<i.length?i: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;let i=!1,r=!1,a=!1;return m||(T.verbose("All available positions available"),m=T.get.positions()),T.debug("Recording last position tried",t),m[t]=!0,"opposite"===p.prefer&&(a=(a=[{top:"bottom",bottom:"top",left:"right",right:"left"}[o],e]).join(" "),i=!0===m[a],T.debug("Trying opposite strategy",a)),"adjacent"===p.prefer&&n&&(a=(a=[o,{left:"center",center:"right",right:"left"}[e]]).join(" "),r=!0===m[a],T.debug("Trying adjacent strategy",a)),(r||i)&&(T.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(n,i){if(0!==h.length&&0!==g.length){let t,e;var r,a,s,l;let o;if(i=i||T.get.calculations(),n=n||f.data(d.position)||p.position,t=f.data(d.offset)||p.offset,e=p.distanceAway,r=i.target,a=i.popup,s=i.parent,T.should.centerArrow(i)&&(T.verbose("Adjusting offset to center arrow on small target element"),"top left"!==n&&"bottom left"!==n||(t=(t+=r.width/2)-p.arrowPixelsFromEdge),"top right"!==n&&"bottom right"!==n||(t=(t-=r.width/2)+p.arrowPixelsFromEdge)),0===r.width&&0===r.height&&!T.is.svg(r.element))return T.debug("Popup target is hidden, no action taken"),!1;switch(p.inline&&(T.debug("Adding margin to calculation",r.margin),"left center"===n||"right center"===n?(t+=r.margin.top,e+=-r.margin.left):"top left"===n||"top center"===n||"top right"===n?(t+=r.margin.left,e-=r.margin.top):(t+=r.margin.left,e+=r.margin.top)),T.debug("Determining popup position from calculations",n,i),T.is.rtl()&&(n=n.replace(/left|right/g,function(t){return"left"===t?"right":"left"}),T.debug("RTL: Popup position updated",n)),n=v===p.maxSearchDepth&&"string"==typeof p.lastResort?p.lastResort:n){case"top left":o={top:"auto",bottom:s.height-r.top+e,left:r.left+t,right:"auto"};break;case"top center":o={bottom:s.height-r.top+e,left:r.left+r.width/2-a.width/2+t,top:"auto",right:"auto"};break;case"top right":o={bottom:s.height-r.top+e,right:s.width-r.left-r.width-t,top:"auto",left:"auto"};break;case"left center":o={top:r.top+r.height/2-a.height/2+t,right:s.width-r.left+e,left:"auto",bottom:"auto"};break;case"right center":o={top:r.top+r.height/2-a.height/2+t,left:r.left+r.width+e,bottom:"auto",right:"auto"};break;case"bottom left":o={top:r.top+r.height+e,left:r.left+t,bottom:"auto",right:"auto"};break;case"bottom center":o={top:r.top+r.height+e,left:r.left+r.width/2-a.width/2+t,bottom:"auto",right:"auto"};break;case"bottom right":o={top:r.top+r.height+e,right:s.width-r.left-r.width-t,left:"auto",bottom:"auto"}}if(void 0===o&&T.error(c.invalidPosition,n),T.debug("Calculated popup positioning values",o),g.css(o).removeClass(u.position).addClass(n),T.set.invisible(),l=T.get.popupOffset(),l=T.get.distanceFromBoundary(l,i),!p.forcePosition&&T.is.offstage(l,n)){if(T.debug("Position is outside viewport",n),v<p.maxSearchDepth)return v++,n=T.get.nextPosition(n),T.debug("Trying new position",n),!!g&&T.set.position(n,i);if(!p.lastResort)return T.debug("Popup could not find a position to display",g),T.error(c.cannotPlace,b),T.remove.attempts(),T.remove.invisible(),T.reset(),p.onUnplaceable.call(g,b),!1;T.debug("No position found, showing with last position")}return T.debug("Position is on stage",n),T.remove.attempts(),T.remove.invisible(),p.setFluidWidth&&T.is.fluid()&&T.set.fluidWidth(i),!0}T.error(c.notFound)},fluidWidth:function(t){t=t||T.get.calculations(),T.debug("Automatically setting element width to parent width",t.parent.width),g.css("width",t.container.width)},loading:function(){g.addClass(u.loading)},invisible:function(){g.addClass(u.invisible)},variation:function(t){(t=t||T.get.variation())&&T.has.popup()&&(T.verbose("Adding variation to popup",t),g.addClass(t))},visible:function(){f.addClass(u.visible)}},remove:{loading:function(){g.removeClass(u.loading)},invisible:function(){g.removeClass(u.invisible)},variation:function(t){(t=t||T.get.variation())&&(T.verbose("Removing variation",t),g.removeClass(t))},visible:function(){f.removeClass(u.visible)},attempts:function(){T.verbose("Resetting all searched positions"),v=0,m=!1}},bind:{events:function(){T.debug("Binding popup events to module"),"click"===p.on&&f.on(A+e,T.toggle),"hover"===p.on&&f.on("touchstart"+e,T.event.touchstart),T.get.startEvent()&&f.on(T.get.startEvent()+e,T.event.start).on(T.get.endEvent()+e,T.event.end),p.target&&T.debug("Target set to element",h),k.on("resize"+P,T.event.resize)},popup:function(){T.verbose("Allowing hover events on popup to prevent closing"),g&&T.has.popup()&&g.on("mouseenter"+e,T.event.start).on("mouseleave"+e,T.event.end)},close:function(){(!0===p.hideOnScroll||"auto"===p.hideOnScroll&&"click"!==p.on)&&T.bind.closeOnScroll(),T.is.closable()?T.bind.clickaway():"hover"===p.on&&a&&T.bind.touchClose()},closeOnScroll:function(){T.verbose("Binding scroll close event to document"),n.one(T.get.scrollEvent()+P,T.event.hideGracefully)},touchClose:function(){T.verbose("Binding popup touchclose event to document"),E.on("touchstart"+P,function(t){T.verbose("Touched away from popup"),T.event.hideGracefully.call(b,t)})},clickaway:function(){T.verbose("Binding popup close event to document"),E.on(A+P,function(t){T.verbose("Clicked away from popup"),T.event.hideGracefully.call(b,t)})}},unbind:{events:function(){k.off(P),f.off(e)},close:function(){E.off(P),n.off(P)}},can:{useElement:function(t){return void 0!==V.fn[t]||(T.error(c.noElement.replace("{element}",t)),!1)}},has:{popup:function(){return g&&0<g.length}},should:{centerArrow:function(t){return!T.is.basic()&&t.target.width<=2*p.arrowPixelsFromEdge}},is:{closable:function(){return"auto"===p.closable?"hover"!==p.on:p.closable},offstage:function(t,o){let n=[];return V.each(t,function(t,e){e<-p.jitter&&(T.debug("Position exceeds allowable distance from edge",t,e,o),n.push(t))}),0<n.length},svg:function(t){return T.supports.svg()&&t instanceof SVGGraphicsElement},basic:function(){return f.hasClass(u.basic)},active:function(){return f.hasClass(u.active)},animating:function(){return void 0!==g&&g.hasClass(u.animating)},fluid:function(){return void 0!==g&&g.hasClass(u.fluid)},visible:function(){return void 0!==g&&g.hasClass(u.popupVisible)},dropdown:function(){return f.hasClass(u.dropdown)},hidden:function(){return!T.is.visible()},rtl:function(){return"rtl"===f.attr("dir")||"rtl"===f.css("direction")||"rtl"===S.attr("dir")||"rtl"===S.css("direction")||"rtl"===r.attr("dir")||"rtl"===r.css("direction")}},reset:function(){T.remove.visible(),p.preserve?void 0!==V.fn.transition&&g.transition("remove transition"):T.removePopup()},setting:function(t,e){if(V.isPlainObject(t))V.extend(!0,p,t);else{if(void 0===e)return p[t];p[t]=e}},internal:function(t,e){if(V.isPlainObject(t))V.extend(!0,T,t);else{if(void 0===e)return T[t];T[t]=e}},debug:function(){!p.silent&&p.debug&&(p.performance?T.performance.log(arguments):(T.debug=Function.prototype.bind.call(console.info,console,p.name+":"),T.debug.apply(console,arguments)))},verbose:function(){!p.silent&&p.verbose&&p.debug&&(p.performance?T.performance.log(arguments):(T.verbose=Function.prototype.bind.call(console.info,console,p.name+":"),T.verbose.apply(console,arguments)))},error:function(){p.silent||(T.error=Function.prototype.bind.call(console.error,console,p.name+":"),T.error.apply(console,arguments))},performance:{log:function(t){var e,o;p.performance&&(o=(e=Date.now())-(D||e),D=e,O.push({Name:t[0],Arguments:[].slice.call(t,1)||"",Element:b,"Execution Time":o})),clearTimeout(T.performance.timer),T.performance.timer=setTimeout(function(){T.performance.display()},500)},display:function(){var t=p.name+":";let o=0;D=!1,clearTimeout(T.performance.timer),V.each(O,function(t,e){o+=e["Execution Time"]}),t+=" "+o+"ms",0<O.length&&(console.groupCollapsed(t),console.table?console.table(O):V.each(O,function(t,e){console.log(e.Name+": "+e["Execution Time"]+"ms")}),console.groupEnd()),O=[]}},invoke:function(n,t,e){let i=w,r,a,o;return t=t||R,e=e||b,"string"==typeof n&&void 0!==i&&(n=n.split(/[ .]/),r=n.length-1,V.each(n,function(t,e){var o=t!==r?e+n[t+1].charAt(0).toUpperCase()+n[t+1].slice(1):n;if(V.isPlainObject(i[o])&&t!==r)i=i[o];else{if(void 0!==i[o])return a=i[o],!1;{if(!V.isPlainObject(i[e])||t===r)return void 0!==i[e]?a=i[e]:T.error(c.method,n),!1;i=i[e]}}})),z(a)?o=a.apply(e,t):void 0!==a&&(o=a),Array.isArray(N)?N.push(o):void 0!==N?N=[N,o]:void 0!==o&&(N=o),a}},F?(void 0===w&&T.initialize(),T.invoke(j)):(void 0!==w&&w.invoke("destroy"),T.initialize())}),void 0!==N?N: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.",noElement:"This module requires ui {element}",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",invisible:"invisible",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){const e={'"':""","&":"&","'":"'","<":"<",">":">"};return t.replace(/["'<>]|&(?![\d#A-Za-z]{1,12};)/g,t=>e[t])},popup:function(t){let e="",o=V.fn.popup.settings.templates.escape;return void 0!==t&&(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.10.0-beta.
|
2
|
+
* # Fomantic-UI 2.10.0-beta.8+62e258f - Progress
|
3
3
|
* https://github.com/fomantic/Fomantic-UI/
|
4
4
|
*
|
5
5
|
*
|
@@ -20,45 +20,41 @@
|
|
20
20
|
: globalThis;
|
21
21
|
|
22
22
|
$.fn.progress = function (parameters) {
|
23
|
-
|
24
|
-
$allModules = $(this),
|
23
|
+
let $allModules = $(this);
|
25
24
|
|
26
|
-
|
27
|
-
|
25
|
+
let time = Date.now();
|
26
|
+
let performance = [];
|
28
27
|
|
29
|
-
|
30
|
-
|
31
|
-
|
28
|
+
let query = arguments[0];
|
29
|
+
let methodInvoked = typeof query === 'string';
|
30
|
+
let queryArguments = [].slice.call(arguments, 1);
|
32
31
|
|
33
|
-
|
34
|
-
;
|
32
|
+
let returnedValue;
|
35
33
|
|
36
34
|
$allModules.each(function () {
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
module
|
61
|
-
;
|
35
|
+
let settings = $.isPlainObject(parameters)
|
36
|
+
? $.extend(true, {}, $.fn.progress.settings, parameters)
|
37
|
+
: $.extend({}, $.fn.progress.settings);
|
38
|
+
|
39
|
+
let className = settings.className;
|
40
|
+
let metadata = settings.metadata;
|
41
|
+
let namespace = settings.namespace;
|
42
|
+
let selector = settings.selector;
|
43
|
+
let error = settings.error;
|
44
|
+
|
45
|
+
let eventNamespace = '.' + namespace;
|
46
|
+
let moduleNamespace = 'module-' + namespace;
|
47
|
+
|
48
|
+
let $module = $(this);
|
49
|
+
let $bars = $(this).find(selector.bar);
|
50
|
+
let $progresses = $(this).find(selector.progress);
|
51
|
+
let $label = $(this).find(selector.label);
|
52
|
+
|
53
|
+
let element = this;
|
54
|
+
let instance = $module.data(moduleNamespace);
|
55
|
+
|
56
|
+
let animating = false;
|
57
|
+
let module;
|
62
58
|
module = {
|
63
59
|
helper: {
|
64
60
|
sum: function (nums) {
|
@@ -88,9 +84,9 @@
|
|
88
84
|
* @returns {number} A precision. Could be 1, 10, 100, ... 1e+10.
|
89
85
|
*/
|
90
86
|
derivePrecision: function (min, total) {
|
91
|
-
|
92
|
-
|
93
|
-
|
87
|
+
let precisionPower = 0;
|
88
|
+
let precision = 1;
|
89
|
+
let ratio = min / total;
|
94
90
|
while (precisionPower < 10) {
|
95
91
|
ratio *= precision;
|
96
92
|
if (ratio > 1) {
|
@@ -124,8 +120,7 @@
|
|
124
120
|
module.verbose('Storing instance of progress', module);
|
125
121
|
instance = module;
|
126
122
|
$module
|
127
|
-
.data(moduleNamespace, module)
|
128
|
-
;
|
123
|
+
.data(moduleNamespace, module);
|
129
124
|
},
|
130
125
|
destroy: function () {
|
131
126
|
module.verbose('Destroying previous progress for', $module);
|
@@ -151,13 +146,11 @@
|
|
151
146
|
|
152
147
|
read: {
|
153
148
|
metadata: function () {
|
154
|
-
|
155
|
-
data
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
}
|
160
|
-
;
|
149
|
+
let data = {
|
150
|
+
percent: module.helper.forceArray($module.data(metadata.percent)),
|
151
|
+
total: $module.data(metadata.total),
|
152
|
+
value: module.helper.forceArray($module.data(metadata.value)),
|
153
|
+
};
|
161
154
|
if (data.total !== undefined) {
|
162
155
|
module.debug('Total value set from metadata', data.total);
|
163
156
|
module.set.total(data.total);
|
@@ -195,8 +188,7 @@
|
|
195
188
|
.one('transitionend' + eventNamespace, function (event) {
|
196
189
|
clearTimeout(module.failSafeTimer);
|
197
190
|
callback.call(this, event);
|
198
|
-
})
|
199
|
-
;
|
191
|
+
});
|
200
192
|
module.failSafeTimer = setTimeout(function () {
|
201
193
|
$bars.triggerHandler('transitionend');
|
202
194
|
}, settings.duration + settings.failSafeDelay);
|
@@ -205,10 +197,8 @@
|
|
205
197
|
},
|
206
198
|
|
207
199
|
increment: function (incrementValue) {
|
208
|
-
|
209
|
-
|
210
|
-
newValue
|
211
|
-
;
|
200
|
+
let startValue;
|
201
|
+
let newValue;
|
212
202
|
if (module.has.total()) {
|
213
203
|
startValue = module.get.value();
|
214
204
|
incrementValue = incrementValue || 1;
|
@@ -222,11 +212,9 @@
|
|
222
212
|
module.set.progress(newValue);
|
223
213
|
},
|
224
214
|
decrement: function (decrementValue) {
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
newValue
|
229
|
-
;
|
215
|
+
let total = module.get.total();
|
216
|
+
let startValue;
|
217
|
+
let newValue;
|
230
218
|
if (total) {
|
231
219
|
startValue = module.get.value();
|
232
220
|
decrementValue = decrementValue || 1;
|
@@ -257,24 +245,21 @@
|
|
257
245
|
index = 0;
|
258
246
|
}
|
259
247
|
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
: 100 - percent
|
269
|
-
;
|
248
|
+
let value = module.get.value(index);
|
249
|
+
let total = module.get.total();
|
250
|
+
let percent = animating
|
251
|
+
? module.get.displayPercent(index)
|
252
|
+
: module.get.percent(index);
|
253
|
+
let left = total !== false
|
254
|
+
? Math.max(0, total - value)
|
255
|
+
: 100 - percent;
|
270
256
|
templateText = templateText || '';
|
271
257
|
templateText = templateText
|
272
258
|
.replace('{value}', value)
|
273
259
|
.replace('{total}', total || 0)
|
274
260
|
.replace('{left}', left)
|
275
261
|
.replace('{percent}', percent)
|
276
|
-
.replace('{bar}', settings.text.bars[index] || '')
|
277
|
-
;
|
262
|
+
.replace('{bar}', settings.text.bars[index] || '');
|
278
263
|
module.verbose('Adding variables to progress bar text', templateText);
|
279
264
|
|
280
265
|
return templateText;
|
@@ -325,15 +310,13 @@
|
|
325
310
|
|
326
311
|
// gets current displayed percentage (if animating values, this is the intermediary value)
|
327
312
|
displayPercent: function (index) {
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
: module.percent
|
336
|
-
;
|
313
|
+
let $bar = $($bars[index]);
|
314
|
+
let barWidth = $bar.width();
|
315
|
+
let totalWidth = $module.width();
|
316
|
+
let minDisplay = parseInt($bar.css('min-width'), 10);
|
317
|
+
let displayPercent = barWidth > minDisplay
|
318
|
+
? (barWidth / totalWidth) * 100
|
319
|
+
: module.percent;
|
337
320
|
|
338
321
|
return settings.precision > 0
|
339
322
|
? Math.round(displayPercent * (10 * settings.precision)) / (10 * settings.precision)
|
@@ -421,14 +404,14 @@
|
|
421
404
|
barWidth: function (values) {
|
422
405
|
module.debug('set bar width with ', values);
|
423
406
|
values = module.helper.forceArray(values);
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
|
407
|
+
let firstNonZeroIndex = -1;
|
408
|
+
let lastNonZeroIndex = -1;
|
409
|
+
let valuesSum = module.helper.sum(values);
|
410
|
+
let barCounts = $bars.length;
|
411
|
+
let isMultiple = barCounts > 1;
|
412
|
+
let percents = values.map(function (value, index) {
|
413
|
+
let allZero = index === barCounts - 1 && valuesSum === 0;
|
414
|
+
let $bar = $($bars[index]);
|
432
415
|
if (value === 0 && isMultiple && !allZero) {
|
433
416
|
$bar.css('display', 'none');
|
434
417
|
} else {
|
@@ -448,7 +431,7 @@
|
|
448
431
|
return parseFloat(value);
|
449
432
|
});
|
450
433
|
values.forEach(function (_, index) {
|
451
|
-
|
434
|
+
let $bar = $($bars[index]);
|
452
435
|
$bar.css({
|
453
436
|
borderTopLeftRadius: index === firstNonZeroIndex ? '' : '0',
|
454
437
|
borderBottomLeftRadius: index === firstNonZeroIndex ? '' : '0',
|
@@ -457,8 +440,7 @@
|
|
457
440
|
});
|
458
441
|
});
|
459
442
|
$module
|
460
|
-
.attr('data-percent', percents)
|
461
|
-
;
|
443
|
+
.attr('data-percent', percents);
|
462
444
|
},
|
463
445
|
duration: function (duration) {
|
464
446
|
duration = duration || settings.duration;
|
@@ -469,8 +451,7 @@
|
|
469
451
|
$bars
|
470
452
|
.css({
|
471
453
|
'transition-duration': duration,
|
472
|
-
})
|
473
|
-
;
|
454
|
+
});
|
474
455
|
},
|
475
456
|
percent: function (percents) {
|
476
457
|
percents = module.helper.forceArray(percents).map(function (percent) {
|
@@ -482,10 +463,10 @@
|
|
482
463
|
? Math.max(0, Math.min(100, percent))
|
483
464
|
: percent;
|
484
465
|
});
|
485
|
-
|
486
|
-
|
487
|
-
|
488
|
-
|
466
|
+
let hasTotal = module.has.total();
|
467
|
+
let totalPercent = module.helper.sum(percents);
|
468
|
+
let isMultipleValues = percents.length > 1 && hasTotal;
|
469
|
+
let sumTotal = module.helper.sum(module.helper.forceArray(module.value));
|
489
470
|
if (isMultipleValues && sumTotal > module.total) {
|
490
471
|
// Sum values instead of percents to avoid precision issues when summing floats
|
491
472
|
module.error(error.sumExceedsTotal, sumTotal, module.total);
|
@@ -495,18 +476,17 @@
|
|
495
476
|
} else if (totalPercent < 0) {
|
496
477
|
module.error(error.tooLow, totalPercent);
|
497
478
|
} else {
|
498
|
-
|
479
|
+
let autoPrecision = settings.precision > 0
|
499
480
|
? settings.precision
|
500
481
|
: (isMultipleValues
|
501
482
|
? module.helper.derivePrecision(Math.min.apply(null, module.value), module.total)
|
502
483
|
: 0);
|
503
484
|
|
504
485
|
// round display percentage
|
505
|
-
|
486
|
+
let roundedPercents = percents.map(function (percent) {
|
506
487
|
return autoPrecision > 0
|
507
488
|
? Math.round(percent * (10 * autoPrecision)) / (10 * autoPrecision)
|
508
|
-
: Math.round(percent)
|
509
|
-
;
|
489
|
+
: Math.round(percent);
|
510
490
|
});
|
511
491
|
module.percent = roundedPercents;
|
512
492
|
if (hasTotal) {
|
@@ -522,21 +502,17 @@
|
|
522
502
|
settings.onChange.call(element, percents, module.value, module.total);
|
523
503
|
},
|
524
504
|
labelInterval: function () {
|
525
|
-
|
526
|
-
|
527
|
-
|
528
|
-
|
529
|
-
|
530
|
-
|
531
|
-
}
|
532
|
-
;
|
505
|
+
let animationCallback = function () {
|
506
|
+
module.verbose('Bar finished animating, removing continuous label updates');
|
507
|
+
clearInterval(module.interval);
|
508
|
+
animating = false;
|
509
|
+
module.set.labels();
|
510
|
+
};
|
533
511
|
clearInterval(module.interval);
|
534
512
|
module.bind.transitionEnd(animationCallback);
|
535
513
|
animating = true;
|
536
514
|
module.interval = setInterval(function () {
|
537
|
-
|
538
|
-
isInDOM = $.contains(document.documentElement, element)
|
539
|
-
;
|
515
|
+
let isInDOM = $.contains(document.documentElement, element);
|
540
516
|
if (!isInDOM) {
|
541
517
|
clearInterval(module.interval);
|
542
518
|
animating = false;
|
@@ -582,7 +558,7 @@
|
|
582
558
|
},
|
583
559
|
barLabel: function (text) {
|
584
560
|
$progresses.each(function (index, element) {
|
585
|
-
|
561
|
+
let $progress = $(element);
|
586
562
|
if (text !== undefined) {
|
587
563
|
$progress.text(module.get.text(text, index));
|
588
564
|
} else if (settings.label === 'ratio' && module.has.total()) {
|
@@ -685,9 +661,7 @@
|
|
685
661
|
|
686
662
|
update: {
|
687
663
|
toNextValue: function () {
|
688
|
-
|
689
|
-
nextValue = module.nextValue
|
690
|
-
;
|
664
|
+
let nextValue = module.nextValue;
|
691
665
|
if (nextValue) {
|
692
666
|
module.debug('Update interval complete using last updated value', nextValue);
|
693
667
|
module.update.progress(nextValue);
|
@@ -695,14 +669,12 @@
|
|
695
669
|
}
|
696
670
|
},
|
697
671
|
progress: function (values) {
|
698
|
-
|
672
|
+
let hasTotal = module.has.total();
|
699
673
|
if (hasTotal) {
|
700
674
|
module.set.value(values);
|
701
675
|
}
|
702
|
-
|
703
|
-
|
704
|
-
percentComplete
|
705
|
-
;
|
676
|
+
let percentCompletes = module.helper.forceArray(values).map(function (value) {
|
677
|
+
let percentComplete;
|
706
678
|
value = module.get.numericValue(value);
|
707
679
|
if (value === false) {
|
708
680
|
module.error(error.nonNumeric, value);
|
@@ -773,11 +745,9 @@
|
|
773
745
|
},
|
774
746
|
performance: {
|
775
747
|
log: function (message) {
|
776
|
-
|
777
|
-
|
778
|
-
|
779
|
-
previousTime
|
780
|
-
;
|
748
|
+
let currentTime;
|
749
|
+
let executionTime;
|
750
|
+
let previousTime;
|
781
751
|
if (settings.performance) {
|
782
752
|
currentTime = Date.now();
|
783
753
|
previousTime = time || currentTime;
|
@@ -796,10 +766,8 @@
|
|
796
766
|
}, 500);
|
797
767
|
},
|
798
768
|
display: function () {
|
799
|
-
|
800
|
-
|
801
|
-
totalTime = 0
|
802
|
-
;
|
769
|
+
let title = settings.name + ':';
|
770
|
+
let totalTime = 0;
|
803
771
|
time = false;
|
804
772
|
clearTimeout(module.performance.timer);
|
805
773
|
$.each(performance, function (index, data) {
|
@@ -821,22 +789,19 @@
|
|
821
789
|
},
|
822
790
|
},
|
823
791
|
invoke: function (query, passedArguments, context) {
|
824
|
-
|
825
|
-
|
826
|
-
|
827
|
-
|
828
|
-
response
|
829
|
-
;
|
792
|
+
let object = instance;
|
793
|
+
let maxDepth;
|
794
|
+
let found;
|
795
|
+
let response;
|
830
796
|
passedArguments = passedArguments || queryArguments;
|
831
797
|
context = context || element;
|
832
798
|
if (typeof query === 'string' && object !== undefined) {
|
833
799
|
query = query.split(/[ .]/);
|
834
800
|
maxDepth = query.length - 1;
|
835
801
|
$.each(query, function (depth, value) {
|
836
|
-
|
802
|
+
let camelCaseValue = depth !== maxDepth
|
837
803
|
? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)
|
838
|
-
: query
|
839
|
-
;
|
804
|
+
: query;
|
840
805
|
if ($.isPlainObject(object[camelCaseValue]) && (depth !== maxDepth)) {
|
841
806
|
object = object[camelCaseValue];
|
842
807
|
} else if (object[camelCaseValue] !== undefined) {
|