fomantic-ui 2.9.1-beta.2 → 2.9.1-beta.20
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 +110 -0
- package/.github/workflows/ci.yml +14 -4
- package/.stylelintrc.js +46 -0
- package/dist/components/accordion.css +19 -26
- package/dist/components/accordion.js +568 -595
- package/dist/components/accordion.min.css +1 -1
- package/dist/components/accordion.min.js +2 -2
- package/dist/components/ad.css +31 -41
- package/dist/components/ad.min.css +1 -1
- package/dist/components/api.js +1161 -1179
- 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 +71 -106
- package/dist/components/button.min.css +1 -1
- package/dist/components/calendar.css +18 -16
- package/dist/components/calendar.js +1895 -1809
- package/dist/components/calendar.min.css +2 -2
- package/dist/components/calendar.min.js +2 -2
- package/dist/components/card.css +83 -115
- package/dist/components/card.min.css +1 -1
- package/dist/components/checkbox.css +47 -64
- package/dist/components/checkbox.js +842 -841
- package/dist/components/checkbox.min.css +1 -1
- package/dist/components/checkbox.min.js +2 -2
- package/dist/components/comment.css +37 -51
- package/dist/components/comment.min.css +1 -1
- package/dist/components/container.css +6 -5
- package/dist/components/container.min.css +2 -2
- package/dist/components/dimmer.css +31 -41
- package/dist/components/dimmer.js +708 -737
- package/dist/components/dimmer.min.css +1 -1
- package/dist/components/dimmer.min.js +2 -2
- package/dist/components/divider.css +32 -44
- package/dist/components/divider.min.css +1 -1
- package/dist/components/dropdown.css +129 -166
- package/dist/components/dropdown.js +4161 -4234
- package/dist/components/dropdown.min.css +2 -2
- package/dist/components/dropdown.min.js +2 -2
- package/dist/components/embed.css +13 -19
- package/dist/components/embed.js +651 -675
- package/dist/components/embed.min.css +1 -1
- package/dist/components/embed.min.js +2 -2
- package/dist/components/emoji.css +7 -6
- package/dist/components/feed.css +24 -32
- package/dist/components/feed.min.css +1 -1
- package/dist/components/flag.css +5 -3
- package/dist/components/flag.min.css +1 -1
- package/dist/components/flyout.css +44 -58
- package/dist/components/flyout.js +1464 -1465
- package/dist/components/flyout.min.css +2 -2
- package/dist/components/flyout.min.js +2 -2
- package/dist/components/form.css +85 -111
- package/dist/components/form.js +1979 -2004
- package/dist/components/form.min.css +1 -1
- package/dist/components/form.min.js +2 -2
- package/dist/components/grid.css +70 -96
- package/dist/components/grid.min.css +1 -1
- package/dist/components/header.css +47 -65
- package/dist/components/header.min.css +1 -1
- package/dist/components/icon.css +45 -66
- package/dist/components/icon.min.css +2 -2
- package/dist/components/image.css +32 -42
- package/dist/components/image.min.css +1 -1
- package/dist/components/input.css +182 -65
- package/dist/components/input.min.css +2 -2
- package/dist/components/item.css +55 -77
- package/dist/components/item.min.css +1 -1
- package/dist/components/label.css +68 -91
- package/dist/components/label.min.css +2 -2
- package/dist/components/list.css +44 -59
- package/dist/components/list.min.css +1 -1
- package/dist/components/loader.css +16 -22
- package/dist/components/loader.min.css +1 -1
- package/dist/components/menu.css +126 -186
- package/dist/components/message.css +25 -35
- package/dist/components/message.min.css +1 -1
- package/dist/components/modal.css +39 -40
- package/dist/components/modal.js +1491 -1485
- package/dist/components/modal.min.css +2 -2
- package/dist/components/modal.min.js +2 -2
- package/dist/components/nag.css +21 -28
- package/dist/components/nag.js +518 -526
- package/dist/components/nag.min.css +2 -2
- package/dist/components/nag.min.js +2 -2
- package/dist/components/placeholder.css +10 -12
- package/dist/components/placeholder.min.css +1 -1
- package/dist/components/popup.css +352 -59
- package/dist/components/popup.js +1437 -1456
- package/dist/components/popup.min.css +2 -2
- package/dist/components/popup.min.js +2 -2
- package/dist/components/progress.css +29 -39
- package/dist/components/progress.js +969 -997
- package/dist/components/progress.min.css +1 -1
- package/dist/components/progress.min.js +2 -2
- package/dist/components/rail.css +15 -20
- package/dist/components/rail.min.css +1 -1
- package/dist/components/rating.css +9 -13
- package/dist/components/rating.js +505 -523
- 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 +19 -26
- package/dist/components/reveal.min.css +1 -1
- package/dist/components/search.css +43 -58
- package/dist/components/search.js +1498 -1534
- package/dist/components/search.min.css +2 -2
- package/dist/components/search.min.js +2 -2
- package/dist/components/segment.css +64 -83
- package/dist/components/segment.min.css +2 -2
- package/dist/components/shape.css +10 -14
- package/dist/components/shape.js +792 -809
- package/dist/components/shape.min.css +1 -1
- package/dist/components/shape.min.js +2 -2
- package/dist/components/sidebar.css +43 -58
- package/dist/components/sidebar.js +1071 -1098
- package/dist/components/sidebar.min.css +2 -2
- package/dist/components/sidebar.min.js +2 -2
- package/dist/components/site.css +5 -5
- package/dist/components/site.js +462 -476
- package/dist/components/site.min.css +1 -1
- package/dist/components/site.min.js +2 -2
- package/dist/components/slider.css +27 -37
- package/dist/components/slider.js +1287 -1306
- package/dist/components/slider.min.js +2 -2
- package/dist/components/state.js +639 -657
- package/dist/components/state.min.js +2 -2
- package/dist/components/statistic.css +32 -41
- package/dist/components/statistic.min.css +2 -2
- package/dist/components/step.css +26 -35
- package/dist/components/step.min.css +1 -1
- package/dist/components/sticky.css +1 -1
- package/dist/components/sticky.js +857 -902
- package/dist/components/sticky.min.css +1 -1
- package/dist/components/sticky.min.js +2 -2
- package/dist/components/tab.css +6 -8
- package/dist/components/tab.js +922 -963
- package/dist/components/tab.min.css +1 -1
- package/dist/components/tab.min.js +2 -2
- package/dist/components/table.css +93 -119
- package/dist/components/table.min.css +2 -2
- package/dist/components/text.css +1 -1
- package/dist/components/text.min.css +1 -1
- package/dist/components/toast.css +4 -6
- package/dist/components/toast.js +886 -887
- package/dist/components/toast.min.css +1 -1
- package/dist/components/toast.min.js +2 -2
- package/dist/components/transition.css +150 -3
- package/dist/components/transition.js +1041 -1077
- package/dist/components/transition.min.css +2 -2
- package/dist/components/transition.min.js +2 -2
- package/dist/components/visibility.js +1220 -1244
- package/dist/components/visibility.min.js +2 -2
- package/dist/semantic.css +2529 -1778
- package/dist/semantic.js +28928 -29383
- package/dist/semantic.min.css +2 -2
- package/dist/semantic.min.js +2 -2
- package/dist/themes/default/assets/fonts/Lato-Bold.woff +0 -0
- package/dist/themes/default/assets/fonts/Lato-Bold.woff2 +0 -0
- package/dist/themes/default/assets/fonts/Lato-BoldItalic.woff +0 -0
- package/dist/themes/default/assets/fonts/Lato-BoldItalic.woff2 +0 -0
- package/dist/themes/default/assets/fonts/Lato-Italic.woff +0 -0
- package/dist/themes/default/assets/fonts/Lato-Italic.woff2 +0 -0
- package/dist/themes/default/assets/fonts/Lato-Regular.woff +0 -0
- package/dist/themes/default/assets/fonts/Lato-Regular.woff2 +0 -0
- package/dist/themes/default/assets/fonts/LatoLatin-Bold.woff +0 -0
- package/dist/themes/default/assets/fonts/LatoLatin-Bold.woff2 +0 -0
- package/dist/themes/default/assets/fonts/LatoLatin-BoldItalic.woff +0 -0
- package/dist/themes/default/assets/fonts/LatoLatin-BoldItalic.woff2 +0 -0
- package/dist/themes/default/assets/fonts/LatoLatin-Italic.woff +0 -0
- package/dist/themes/default/assets/fonts/LatoLatin-Italic.woff2 +0 -0
- package/dist/themes/default/assets/fonts/LatoLatin-Regular.woff +0 -0
- package/dist/themes/default/assets/fonts/LatoLatin-Regular.woff2 +0 -0
- package/examples/assets/show-examples.js +13 -13
- package/gulpfile.js +9 -10
- package/package.json +13 -8
- package/scripts/nightly-version.js +81 -75
- package/src/definitions/behaviors/api.js +1162 -1180
- package/src/definitions/behaviors/form.js +1978 -2003
- package/src/definitions/behaviors/state.js +645 -663
- package/src/definitions/behaviors/visibility.js +1219 -1243
- package/src/definitions/collections/breadcrumb.less +41 -44
- package/src/definitions/collections/form.less +869 -879
- package/src/definitions/collections/grid.less +1690 -1695
- package/src/definitions/collections/menu.less +1493 -1503
- package/src/definitions/collections/message.less +292 -295
- package/src/definitions/collections/table.less +1616 -1620
- package/src/definitions/elements/button.less +1721 -1743
- package/src/definitions/elements/container.less +209 -209
- package/src/definitions/elements/divider.less +205 -206
- package/src/definitions/elements/emoji.less +38 -44
- package/src/definitions/elements/flag.less +44 -46
- package/src/definitions/elements/header.less +337 -345
- package/src/definitions/elements/icon.less +516 -443
- package/src/definitions/elements/image.less +221 -225
- package/src/definitions/elements/input.less +663 -659
- package/src/definitions/elements/label.less +803 -793
- package/src/definitions/elements/list.less +809 -809
- package/src/definitions/elements/loader.less +272 -266
- package/src/definitions/elements/placeholder.less +171 -168
- package/src/definitions/elements/rail.less +91 -91
- package/src/definitions/elements/reveal.less +192 -196
- package/src/definitions/elements/segment.less +743 -746
- package/src/definitions/elements/step.less +425 -433
- package/src/definitions/elements/text.less +32 -34
- package/src/definitions/globals/reset.less +9 -6
- package/src/definitions/globals/site.js +461 -475
- package/src/definitions/globals/site.less +106 -108
- package/src/definitions/modules/accordion.js +567 -594
- package/src/definitions/modules/accordion.less +242 -246
- package/src/definitions/modules/calendar.js +1894 -1808
- package/src/definitions/modules/calendar.less +98 -95
- package/src/definitions/modules/checkbox.js +841 -840
- package/src/definitions/modules/checkbox.less +536 -542
- package/src/definitions/modules/dimmer.js +707 -736
- package/src/definitions/modules/dimmer.less +300 -297
- package/src/definitions/modules/dropdown.js +4160 -4233
- package/src/definitions/modules/dropdown.less +1577 -1589
- package/src/definitions/modules/embed.js +650 -674
- package/src/definitions/modules/embed.less +81 -82
- package/src/definitions/modules/flyout.js +1463 -1464
- package/src/definitions/modules/flyout.less +445 -451
- package/src/definitions/modules/modal.js +1490 -1484
- package/src/definitions/modules/modal.less +459 -459
- package/src/definitions/modules/nag.js +517 -525
- package/src/definitions/modules/nag.less +134 -138
- package/src/definitions/modules/popup.js +1436 -1455
- package/src/definitions/modules/popup.less +742 -687
- package/src/definitions/modules/progress.js +968 -996
- package/src/definitions/modules/progress.less +521 -494
- package/src/definitions/modules/rating.js +504 -522
- package/src/definitions/modules/rating.less +94 -101
- package/src/definitions/modules/search.js +1497 -1533
- package/src/definitions/modules/search.less +375 -382
- package/src/definitions/modules/shape.js +791 -808
- package/src/definitions/modules/shape.less +71 -76
- package/src/definitions/modules/sidebar.js +1070 -1097
- package/src/definitions/modules/sidebar.less +463 -472
- package/src/definitions/modules/slider.js +1286 -1305
- package/src/definitions/modules/slider.less +307 -308
- package/src/definitions/modules/sticky.js +873 -918
- package/src/definitions/modules/sticky.less +21 -23
- package/src/definitions/modules/tab.js +921 -962
- package/src/definitions/modules/tab.less +51 -52
- package/src/definitions/modules/toast.js +885 -886
- package/src/definitions/modules/toast.less +584 -586
- package/src/definitions/modules/transition.js +1040 -1076
- package/src/definitions/modules/transition.less +62 -28
- package/src/definitions/views/ad.less +206 -206
- package/src/definitions/views/card.less +968 -970
- package/src/definitions/views/comment.less +190 -198
- package/src/definitions/views/feed.less +220 -224
- package/src/definitions/views/item.less +436 -446
- package/src/definitions/views/statistic.less +271 -277
- package/src/theme.less +29 -32
- package/src/themes/default/assets/fonts/Lato-Bold.woff +0 -0
- package/src/themes/default/assets/fonts/Lato-Bold.woff2 +0 -0
- package/src/themes/default/assets/fonts/Lato-BoldItalic.woff +0 -0
- package/src/themes/default/assets/fonts/Lato-BoldItalic.woff2 +0 -0
- package/src/themes/default/assets/fonts/Lato-Italic.woff +0 -0
- package/src/themes/default/assets/fonts/Lato-Italic.woff2 +0 -0
- package/src/themes/default/assets/fonts/Lato-Regular.woff +0 -0
- package/src/themes/default/assets/fonts/Lato-Regular.woff2 +0 -0
- package/src/themes/default/assets/fonts/LatoLatin-Bold.woff +0 -0
- package/src/themes/default/assets/fonts/LatoLatin-Bold.woff2 +0 -0
- package/src/themes/default/assets/fonts/LatoLatin-BoldItalic.woff +0 -0
- package/src/themes/default/assets/fonts/LatoLatin-BoldItalic.woff2 +0 -0
- package/src/themes/default/assets/fonts/LatoLatin-Italic.woff +0 -0
- package/src/themes/default/assets/fonts/LatoLatin-Italic.woff2 +0 -0
- package/src/themes/default/assets/fonts/LatoLatin-Regular.woff +0 -0
- package/src/themes/default/assets/fonts/LatoLatin-Regular.woff2 +0 -0
- package/src/themes/default/elements/container.variables +0 -7
- package/src/themes/default/elements/icon.variables +18 -0
- package/src/themes/default/elements/segment.variables +0 -7
- package/src/themes/default/globals/colors.less +589 -589
- package/src/themes/default/globals/site.variables +8 -0
- package/src/themes/default/globals/variation.variables +13 -1
- package/src/themes/default/modules/calendar.variables +2 -0
- package/src/themes/default/modules/nag.variables +1 -1
- package/src/themes/default/modules/popup.variables +2 -0
- package/src/themes/default/modules/transition.variables +8 -1
- package/tasks/admin/components/create.js +274 -276
- package/tasks/admin/components/init.js +123 -130
- package/tasks/admin/components/update.js +149 -157
- package/tasks/admin/distributions/create.js +184 -187
- package/tasks/admin/distributions/init.js +123 -130
- package/tasks/admin/distributions/update.js +145 -152
- package/tasks/admin/publish.js +5 -7
- package/tasks/admin/register.js +36 -38
- package/tasks/admin/release.js +8 -10
- package/tasks/build/assets.js +42 -39
- package/tasks/build/css.js +225 -216
- package/tasks/build/javascript.js +118 -113
- package/tasks/build.js +10 -10
- package/tasks/check-install.js +14 -16
- package/tasks/clean.js +5 -5
- package/tasks/collections/admin.js +34 -36
- package/tasks/collections/build.js +18 -20
- package/tasks/collections/docs.js +9 -11
- package/tasks/collections/install.js +9 -11
- package/tasks/collections/rtl.js +9 -11
- package/tasks/collections/various.js +8 -10
- package/tasks/config/admin/github.js +17 -17
- package/tasks/config/admin/oauth.example.js +4 -4
- package/tasks/config/admin/release.js +98 -98
- package/tasks/config/admin/templates/component-package.js +9 -10
- package/tasks/config/admin/templates/css-package.js +18 -20
- package/tasks/config/admin/templates/less-package.js +11 -13
- package/tasks/config/defaults.js +116 -114
- package/tasks/config/docs.js +23 -23
- package/tasks/config/npm/gulpfile.js +8 -9
- package/tasks/config/project/config.js +127 -134
- package/tasks/config/project/install.js +715 -713
- package/tasks/config/project/release.js +32 -38
- package/tasks/config/tasks.js +165 -156
- package/tasks/config/user.js +23 -26
- package/tasks/docs/build.js +97 -95
- package/tasks/docs/metadata.js +90 -96
- package/tasks/docs/serve.js +80 -81
- package/tasks/install.js +370 -378
- package/tasks/rtl/build.js +2 -2
- package/tasks/rtl/watch.js +2 -2
- package/tasks/version.js +4 -4
- package/tasks/watch.js +28 -30
- package/test/meteor/assets.js +10 -13
- package/test/meteor/fonts.js +12 -13
- package/test/modules/accordion.spec.js +6 -8
- package/test/modules/checkbox.spec.js +5 -7
- package/test/modules/dropdown.spec.js +5 -7
- package/test/modules/modal.spec.js +6 -8
- package/test/modules/module.spec.js +158 -178
- package/test/modules/popup.spec.js +5 -7
- package/test/modules/search.spec.js +5 -7
- package/test/modules/shape.spec.js +5 -7
- package/test/modules/sidebar.spec.js +5 -7
- package/test/modules/tab.spec.js +6 -8
- package/test/modules/transition.spec.js +5 -7
- package/test/modules/video.spec.js +5 -7
@@ -1,5 +1,5 @@
|
|
1
1
|
/*
|
2
|
-
* # Fomantic UI - 2.9.1-beta.
|
2
|
+
* # Fomantic UI - 2.9.1-beta.20+d4987bf
|
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(P,O,j,F){"use strict";P.isWindow=P.isWindow||function(e){return null!=e&&e===e.window},O=void 0!==O&&O.Math==Math?O:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),P.api=P.fn.api=function(q){var x,e=P.isFunction(this)?P(O):P(this),A=e.selector||"",k=(new Date).getTime(),S=[],T=q,w="string"==typeof T,D=[].slice.call(arguments,1);return e.each(function(){var s,n,r,e,a,o,f=P.isPlainObject(q)?P.extend(!0,{},P.fn.api.settings,q):P.extend({},P.fn.api.settings),t=f.namespace,i=f.metadata,u=f.selector,c=f.error,d=f.className,l="."+t,g="module-"+t,p=P(this),m=p.closest(u.form),b=f.stateContext?[O,j].indexOf(f.stateContext)<0?P(j).find(f.stateContext):P(f.stateContext):p,v=this,h=b[0],y=p.data(g),R={initialize:function(){w||(o=f.data,R.bind.events()),R.instantiate()},instantiate:function(){R.verbose("Storing instance of module",R),y=R,p.data(g,y)},destroy:function(){R.verbose("Destroying previous module for",v),p.removeData(g).off(l)},bind:{events:function(){var e=R.get.event();e?(R.verbose("Attaching API events to element",e),p.on(e+l,R.event.trigger)):"now"==f.on&&(R.debug("Querying API endpoint immediately"),R.query())}},decode:{json:function(e){if(e!==F&&"string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}},read:{cachedResponse:function(e){var t;if(O.Storage!==F)return t=sessionStorage.getItem(e+R.get.normalizedData()),R.debug("Using cached response",e,f.data,t),R.decode.json(t);R.error(c.noStorage)}},write:{cachedResponse:function(e,t){t&&""===t?R.debug("Response empty, not caching",t):O.Storage===F?R.error(c.noStorage):(P.isPlainObject(t)&&(t=JSON.stringify(t)),sessionStorage.setItem(e+R.get.normalizedData(),t),R.verbose("Storing cached response for url",e,f.data,t))}},query:function(){if(R.is.disabled())R.debug("Element is disabled API request aborted");else{if(R.is.loading()){if(!f.interruptRequests)return void R.debug("Cancelling request, previous request is still pending");R.debug("Interrupting previous request"),R.abort()}if(f.defaultData&&P.extend(!0,f.urlData,R.get.defaultData()),f.serializeForm&&(f.data=R.add.formData(o||f.data)),!1===(n=R.get.settings()))return R.cancelled=!0,void R.error(c.beforeSend);if(R.cancelled=!1,(r=R.get.templatedURL())||R.is.mocked()){if((r=R.add.urlData(r))||R.is.mocked()){if(n.url=f.base+r,s=P.extend(!0,{},f,{type:f.method||f.type,data:e,url:f.base+r,beforeSend:f.beforeXHR,success:function(){},failure:function(){},complete:function(){}}),R.debug("Querying URL",s.url),R.verbose("Using AJAX settings",s),"local"===f.cache&&R.read.cachedResponse(r))return R.debug("Response returned from local cache"),R.request=R.create.request(),void R.request.resolveWith(h,[R.read.cachedResponse(r)]);f.throttle?f.throttleFirstRequest||R.timer?(R.debug("Throttling request",f.throttle),clearTimeout(R.timer),R.timer=setTimeout(function(){R.timer&&delete R.timer,R.debug("Sending throttled request",e,s.method),R.send.request()},f.throttle)):(R.debug("Sending request",e,s.method),R.send.request(),R.timer=setTimeout(function(){},f.throttle)):(R.debug("Sending request",e,s.method),R.send.request())}}else R.error(c.missingURL)}},should:{removeError:function(){return!0===f.hideError||"auto"===f.hideError&&!R.is.form()}},is:{disabled:function(){return 0<p.filter(u.disabled).length},expectingJSON:function(){return"json"===f.dataType||"jsonp"===f.dataType},form:function(){return p.is("form")||b.is("form")},mocked:function(){return f.mockResponse||f.mockResponseAsync||f.response||f.responseAsync},input:function(){return p.is("input")},loading:function(){return!!R.request&&"pending"==R.request.state()},abortedRequest:function(e){return e&&e.readyState!==F&&0===e.readyState?(R.verbose("XHR request determined to be aborted"),!0):(R.verbose("XHR request was not aborted"),!1)},validResponse:function(e){return R.is.expectingJSON()&&P.isFunction(f.successTest)?(R.debug("Checking JSON returned success",f.successTest,e),f.successTest(e)?(R.debug("Response passed success test",e),!0):(R.debug("Response failed success test",e),!1)):(R.verbose("Response is not JSON, skipping validation",f.successTest,e),!0)}},was:{cancelled:function(){return R.cancelled||!1},successful:function(){return R.request&&"resolved"==R.request.state()},failure:function(){return R.request&&"rejected"==R.request.state()},complete:function(){return R.request&&("resolved"==R.request.state()||"rejected"==R.request.state())}},add:{urlData:function(o,s){var e,t;return o&&(e=o.match(f.regExp.required),t=o.match(f.regExp.optional),s=s||f.urlData,e&&(R.debug("Looking for required URL variables",e),P.each(e,function(e,t){var r=-1!==t.indexOf("$")?t.slice(2,-1):t.slice(1,-1),n=P.isPlainObject(s)&&s[r]!==F?s[r]:p.data(r)!==F?p.data(r):b.data(r)!==F?b.data(r):s[r];if(n===F)return R.error(c.requiredParameter,r,o),o=!1;R.verbose("Found required variable",r,n),n=f.encodeParameters?R.get.urlEncodedValue(n):n,o=o.replace(t,n)})),t&&(R.debug("Looking for optional URL variables",e),P.each(t,function(e,t){var r=-1!==t.indexOf("$")?t.slice(3,-1):t.slice(2,-1),n=P.isPlainObject(s)&&s[r]!==F?s[r]:p.data(r)!==F?p.data(r):b.data(r)!==F?b.data(r):s[r];o=n!==F?(R.verbose("Optional variable Found",r,n),o.replace(t,n)):(R.verbose("Optional variable not found",r),-1!==o.indexOf("/"+t)?o.replace("/"+t,""):o.replace(t,""))}))),o},formData:function(r){var e,n,u,c,d,l={},t="formdata"===f.serializeForm;return r=r||o||f.data,e=P.isPlainObject(r),t?(l=new FormData(m[0]),f.processData=void 0!==f.processData&&f.processData,f.contentType=void 0!==f.contentType&&f.contentType):(n=m.serializeArray(),u={},c={},d=function(e,t,r){return e[t]=r,e},P.each(P('input[type="file"]',m),function(e,r){P.each(P(r)[0].files,function(e,t){n.push({name:r.name,value:t})})}),P.each(n,function(e,t){if(f.regExp.validate.test(t.name)){var r,n="checkbox"===P('[name="'+t.name+'"]',m).attr("type"),o=parseFloat(t.value),s=n&&"on"===t.value||"true"===t.value||(String(o)===t.value?o:"false"!==t.value&&t.value),a=t.name.match(f.regExp.key)||[],i=t.name.replace(/\[\]$/,"");i in u?Array.isArray(c[i])?c[i].push(s):c[i]=[c[i],s]:(u[i]=0,c[i]=s),s=c[i];for(;(r=a.pop())!==F;)""!=r||Array.isArray(s)?f.regExp.fixed.test(r)?s=d([],r,s):f.regExp.named.test(r)&&(s=d({},r,s)):s=d([],u[i]++,s);l=P.extend(!0,l,s)}})),r=e?(R.debug("Extending existing data with form data",r,l),t?(P.each(Object.keys(r),function(e,t){l.append(t,r[t])}),l):P.extend(!0,{},r,l)):(R.debug("Adding form data",l),l)}},send:{request:function(){R.set.loading(),R.request=R.create.request(),R.is.mocked()?R.mockedXHR=R.create.mockedXHR():R.xhr=R.create.xhr(),f.onRequest.call(h,R.request,R.xhr)}},event:{trigger:function(e){R.query(),"submit"!=e.type&&"click"!=e.type||e.preventDefault()},xhr:{always:function(){},done:function(e,t,r){var n=this,o=(new Date).getTime()-a,o=f.loadingDuration-o,s=!!P.isFunction(f.onResponse)&&(R.is.expectingJSON()&&!f.rawResponse?f.onResponse.call(n,P.extend(!0,{},e)):f.onResponse.call(n,e)),o=0<o?o:0;s&&(R.debug("Modified API response in onResponse callback",f.onResponse,s,e),e=s),0<o&&R.debug("Response completed early delaying state change by",o),setTimeout(function(){R.is.validResponse(e)?R.request.resolveWith(n,[e,r]):R.request.rejectWith(n,[r,"invalid"])},o)},fail:function(e,t,r){var n=this,o=(new Date).getTime()-a,o=f.loadingDuration-o;0<(o=0<o?o:0)&&R.debug("Response completed early delaying state change by",o),setTimeout(function(){R.is.abortedRequest(e)?R.request.rejectWith(n,[e,"aborted",r]):R.request.rejectWith(n,[e,"error",t,r])},o)}},request:{done:function(e,t){R.debug("Successful API Response",e),"local"===f.cache&&r&&(R.write.cachedResponse(r,e),R.debug("Saving server response locally",R.cache)),f.onSuccess.call(h,e,p,t)},complete:function(e,t){var r,n;R.was.successful()?(n=e,r=t):n=R.get.responseFromXHR(r=e),R.remove.loading(),f.onComplete.call(h,n,p,r)},fail:function(e,t,r){var n=R.get.responseFromXHR(e),o=R.get.errorFromRequest(n,t,r);if("aborted"==t)return R.debug("XHR Aborted (Most likely caused by page navigation or CORS Policy)",t,r),f.onAbort.call(h,t,p,e),!0;"invalid"==t?R.debug("JSON did not pass success test. A server-side error has most likely occurred",n):"error"==t&&e!==F&&(R.debug("XHR produced a server error",t,r),(e.status<200||300<=e.status)&&r!==F&&""!==r&&R.error(c.statusMessage+r,s.url),f.onError.call(h,o,p,e)),f.errorDuration&&"aborted"!==t&&(R.debug("Adding error state"),R.set.error(),R.should.removeError()&&setTimeout(R.remove.error,f.errorDuration)),R.debug("API Request failed",o,e),f.onFailure.call(h,n,p,e)}}},create:{request:function(){return P.Deferred().always(R.event.request.complete).done(R.event.request.done).fail(R.event.request.fail)},mockedXHR:function(){var e=f.mockResponse||f.response,t=f.mockResponseAsync||f.responseAsync,r=P.Deferred().always(R.event.xhr.complete).done(R.event.xhr.done).fail(R.event.xhr.fail);return e?(e=P.isFunction(e)?(R.debug("Using specified synchronous callback",e),e.call(h,n)):(R.debug("Using settings specified response",e),e),r.resolveWith(h,[e,!1,{responseText:e}])):P.isFunction(t)&&(e=function(e){R.debug("Async callback returned response",e),e?r.resolveWith(h,[e,!1,{responseText:e}]):r.rejectWith(h,[{responseText:e},!1,!1])},R.debug("Using specified async response callback",t),t.call(h,n,e)),r},xhr:function(){var e=P.ajax(s).always(R.event.xhr.always).done(R.event.xhr.done).fail(R.event.xhr.fail);return R.verbose("Created server request",e,s),e}},set:{error:function(){R.verbose("Adding error state to element",b),b.addClass(d.error)},loading:function(){R.verbose("Adding loading state to element",b),b.addClass(d.loading),a=(new Date).getTime()}},remove:{error:function(){R.verbose("Removing error state from element",b),b.removeClass(d.error)},loading:function(){R.verbose("Removing loading state from element",b),b.removeClass(d.loading)}},get:{normalizedData:function(){return"string"==typeof f.data?f.data:JSON.stringify(f.data,Object.keys(f.data).sort())},responseFromXHR:function(e){return!!P.isPlainObject(e)&&(R.is.expectingJSON()?R.decode.json(e.responseText):e.responseText)},errorFromRequest:function(e,t,r){return P.isPlainObject(e)&&e.error!==F?e.error:f.error[t]!==F?f.error[t]:r},request:function(){return R.request||!1},xhr:function(){return R.xhr||!1},settings:function(){var e=f.beforeSend.call(p,f);return e&&(e.success!==F&&(R.debug("Legacy success callback detected",e),R.error(c.legacyParameters,e.success),e.onSuccess=e.success),e.failure!==F&&(R.debug("Legacy failure callback detected",e),R.error(c.legacyParameters,e.failure),e.onFailure=e.failure),e.complete!==F&&(R.debug("Legacy complete callback detected",e),R.error(c.legacyParameters,e.complete),e.onComplete=e.complete)),e===F&&R.error(c.noReturnedValue),!1===e?e:e!==F?P.extend(!0,{},e):P.extend(!0,{},f)},urlEncodedValue:function(e){var t=O.decodeURIComponent(e),r=O.encodeURIComponent(e);return t!==e?(R.debug("URL value is already encoded, avoiding double encoding",e),e):(R.verbose("Encoding value using encodeURIComponent",e,r),r)},defaultData:function(){var e={};return P.isWindow(v)||(R.is.input()?e.value=p.val():R.is.form()||(e.text=p.text())),e},event:function(){return P.isWindow(v)||"now"==f.on?(R.debug("API called without element, no events attached"),!1):"auto"==f.on?p.is("input")?v.oninput!==F?"input":v.onpropertychange!==F?"propertychange":"keyup":p.is("form")?"submit":"click":f.on},templatedURL:function(e){if(e=e||p.data(i.action)||f.action||!1,r=p.data(i.url)||f.url||!1)return R.debug("Using specified url",r),r;if(e){if(R.debug("Looking up url for action",e,f.api),f.api[e]===F&&!R.is.mocked())return void R.error(c.missingAction,f.action,f.api);r=f.api[e]}else R.is.form()&&(r=p.attr("action")||b.attr("action")||!1,R.debug("No url or action specified, defaulting to form action",r));return r}},abort:function(){var e=R.get.xhr();e&&"resolved"!==e.state()&&(R.debug("Cancelling API request"),e.abort())},reset:function(){R.remove.error(),R.remove.loading()},setting:function(e,t){if(R.debug("Changing setting",e,t),P.isPlainObject(e))P.extend(!0,f,e);else{if(t===F)return f[e];P.isPlainObject(f[e])?P.extend(!0,f[e],t):f[e]=t}},internal:function(e,t){if(P.isPlainObject(e))P.extend(!0,R,e);else{if(t===F)return R[e];R[e]=t}},debug:function(){!f.silent&&f.debug&&(f.performance?R.performance.log(arguments):(R.debug=Function.prototype.bind.call(console.info,console,f.name+":"),R.debug.apply(console,arguments)))},verbose:function(){!f.silent&&f.verbose&&f.debug&&(f.performance?R.performance.log(arguments):(R.verbose=Function.prototype.bind.call(console.info,console,f.name+":"),R.verbose.apply(console,arguments)))},error:function(){f.silent||(R.error=Function.prototype.bind.call(console.error,console,f.name+":"),R.error.apply(console,arguments))},performance:{log:function(e){var t,r;f.performance&&(r=(t=(new Date).getTime())-(k||t),k=t,S.push({Name:e[0],Arguments:[].slice.call(e,1)||"","Execution Time":r})),clearTimeout(R.performance.timer),R.performance.timer=setTimeout(R.performance.display,500)},display:function(){var e=f.name+":",r=0;k=!1,clearTimeout(R.performance.timer),P.each(S,function(e,t){r+=t["Execution Time"]}),e+=" "+r+"ms",A&&(e+=" '"+A+"'"),(console.group!==F||console.table!==F)&&0<S.length&&(console.groupCollapsed(e),console.table?console.table(S):P.each(S,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),S=[]}},invoke:function(n,e,t){var o,s,r,a=y;return e=e||D,t=t||v,"string"==typeof n&&a!==F&&(n=n.split(/[\. ]/),o=n.length-1,P.each(n,function(e,t){var r=e!=o?t+n[e+1].charAt(0).toUpperCase()+n[e+1].slice(1):n;if(P.isPlainObject(a[r])&&e!=o)a=a[r];else{if(a[r]!==F)return s=a[r],!1;{if(!P.isPlainObject(a[t])||e==o)return a[t]!==F?s=a[t]:R.error(c.method,n),!1;a=a[t]}}})),P.isFunction(s)?r=s.apply(t,e):s!==F&&(r=s),Array.isArray(x)?x.push(r):x!==F?x=[x,r]:r!==F&&(x=r),s}};w?(y===F&&R.initialize(),R.invoke(T)):(y!==F&&y.invoke("destroy"),R.initialize())}),x!==F?x:this},P.api.settings={name:"API",namespace:"api",debug:!1,verbose:!1,performance:!0,api:{},cache:!0,interruptRequests:!0,on:"auto",stateContext:!1,loadingDuration:0,hideError:"auto",errorDuration:2e3,encodeParameters:!0,action:!1,url:!1,base:"",urlData:{},defaultData:!0,serializeForm:!1,throttle:0,throttleFirstRequest:!0,method:"get",data:{},dataType:"json",mockResponse:!1,mockResponseAsync:!1,response:!1,responseAsync:!1,rawResponse:!0,beforeSend:function(e){return e},beforeXHR:function(e){},onRequest:function(e,t){},onResponse:!1,onSuccess:function(e,t){},onComplete:function(e,t){},onFailure:function(e,t){},onError:function(e,t){},onAbort:function(e,t){},successTest:!1,error:{beforeSend:"The before send function has aborted the request",error:"There was an error with your request",exitConditions:"API Request Aborted. Exit conditions met",JSONParse:"JSON could not be parsed during error handling",legacyParameters:"You are using legacy API success callback names",method:"The method you called is not defined",missingAction:"API action used but no url was defined",missingURL:"No URL specified for api event",noReturnedValue:"The beforeSend callback must return a settings object, beforeSend ignored.",noStorage:"Caching responses locally requires session storage",parseError:"There was an error parsing your request",requiredParameter:"Missing a required URL parameter: ",statusMessage:"Server gave an error: ",timeout:"Your request timed out"},regExp:{required:/\{\$*[a-z0-9]+\}/gi,optional:/\{\/\$*[a-z0-9]+\}/gi,validate:/^[a-z_][a-z0-9_-]*(?:\[[a-z0-9_-]*\])*$/i,key:/[a-z0-9_-]+|(?=\[\])/gi,push:/^$/,fixed:/^\d+$/,named:/^[a-z0-9_-]+$/i},className:{loading:"loading",error:"error"},selector:{disabled:".disabled",form:"form"},metadata:{action:"action",url:"url"}}}(jQuery,window,document);
|
11
|
+
!function(P,w,j,C){"use strict";function E(e){return null!=e&&e===e.window}function F(e){return"function"==typeof e&&"number"!=typeof e.nodeType}w=void 0!==w&&w.Math==Math?w:globalThis,P.api=P.fn.api=function(q){var x,e=F(this)?P(w):P(this),A=e.selector||"",k=(new Date).getTime(),S=[],T=q,D="string"==typeof T,O=[].slice.call(arguments,1);return e.each(function(){var a,n,r,e,s,o,f=P.isPlainObject(q)?P.extend(!0,{},P.fn.api.settings,q):P.extend({},P.fn.api.settings),t=f.namespace,i=f.metadata,u=f.selector,c=f.error,d=f.className,l="."+t,p="module-"+t,g=P(this),m=g.closest(u.form),b=f.stateContext?[w,j].indexOf(f.stateContext)<0?P(j).find(f.stateContext):P(f.stateContext):g,v=this,h=b[0],y=g.data(p),R={initialize:function(){D||(o=f.data,R.bind.events()),R.instantiate()},instantiate:function(){R.verbose("Storing instance of module",R),y=R,g.data(p,y)},destroy:function(){R.verbose("Destroying previous module for",v),g.removeData(p).off(l)},bind:{events:function(){var e=R.get.event();e?(R.verbose("Attaching API events to element",e),g.on(e+l,R.event.trigger)):"now"==f.on&&(R.debug("Querying API endpoint immediately"),R.query())}},decode:{json:function(e){if(e!==C&&"string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}},read:{cachedResponse:function(e){var t;if(w.Storage!==C)return t=sessionStorage.getItem(e+R.get.normalizedData()),R.debug("Using cached response",e,f.data,t),R.decode.json(t);R.error(c.noStorage)}},write:{cachedResponse:function(e,t){t&&""===t?R.debug("Response empty, not caching",t):w.Storage===C?R.error(c.noStorage):(P.isPlainObject(t)&&(t=JSON.stringify(t)),sessionStorage.setItem(e+R.get.normalizedData(),t),R.verbose("Storing cached response for url",e,f.data,t))}},query:function(){if(R.is.disabled())R.debug("Element is disabled API request aborted");else{if(R.is.loading()){if(!f.interruptRequests)return void R.debug("Cancelling request, previous request is still pending");R.debug("Interrupting previous request"),R.abort()}if(f.defaultData&&P.extend(!0,f.urlData,R.get.defaultData()),f.serializeForm&&(f.data=R.add.formData(o||f.data)),!1===(n=R.get.settings()))return R.cancelled=!0,void R.error(c.beforeSend);if(R.cancelled=!1,(r=R.get.templatedURL())||R.is.mocked()){if((r=R.add.urlData(r))||R.is.mocked()){if(n.url=f.base+r,a=P.extend(!0,{},f,{type:f.method||f.type,data:e,url:f.base+r,beforeSend:f.beforeXHR,success:function(){},failure:function(){},complete:function(){}}),R.debug("Querying URL",a.url),R.verbose("Using AJAX settings",a),"local"===f.cache&&R.read.cachedResponse(r))return R.debug("Response returned from local cache"),R.request=R.create.request(),void R.request.resolveWith(h,[R.read.cachedResponse(r)]);f.throttle?f.throttleFirstRequest||R.timer?(R.debug("Throttling request",f.throttle),clearTimeout(R.timer),R.timer=setTimeout(function(){R.timer&&delete R.timer,R.debug("Sending throttled request",e,a.method),R.send.request()},f.throttle)):(R.debug("Sending request",e,a.method),R.send.request(),R.timer=setTimeout(function(){},f.throttle)):(R.debug("Sending request",e,a.method),R.send.request())}}else R.error(c.missingURL)}},should:{removeError:function(){return!0===f.hideError||"auto"===f.hideError&&!R.is.form()}},is:{disabled:function(){return 0<g.filter(u.disabled).length},expectingJSON:function(){return"json"===f.dataType||"jsonp"===f.dataType},form:function(){return g.is("form")||b.is("form")},mocked:function(){return f.mockResponse||f.mockResponseAsync||f.response||f.responseAsync},input:function(){return g.is("input")},loading:function(){return!!R.request&&"pending"==R.request.state()},abortedRequest:function(e){return e&&e.readyState!==C&&0===e.readyState?(R.verbose("XHR request determined to be aborted"),!0):(R.verbose("XHR request was not aborted"),!1)},validResponse:function(e){return R.is.expectingJSON()&&F(f.successTest)?(R.debug("Checking JSON returned success",f.successTest,e),f.successTest(e)?(R.debug("Response passed success test",e),!0):(R.debug("Response failed success test",e),!1)):(R.verbose("Response is not JSON, skipping validation",f.successTest,e),!0)}},was:{cancelled:function(){return R.cancelled||!1},successful:function(){return R.request&&"resolved"==R.request.state()},failure:function(){return R.request&&"rejected"==R.request.state()},complete:function(){return R.request&&("resolved"==R.request.state()||"rejected"==R.request.state())}},add:{urlData:function(o,a){var e,t;return o&&(e=o.match(f.regExp.required),t=o.match(f.regExp.optional),a=a||f.urlData,e&&(R.debug("Looking for required URL variables",e),P.each(e,function(e,t){var r=-1!==t.indexOf("$")?t.slice(2,-1):t.slice(1,-1),n=P.isPlainObject(a)&&a[r]!==C?a[r]:g.data(r)!==C?g.data(r):b.data(r)!==C?b.data(r):a[r];if(n===C)return R.error(c.requiredParameter,r,o),o=!1;R.verbose("Found required variable",r,n),n=f.encodeParameters?R.get.urlEncodedValue(n):n,o=o.replace(t,n)})),t&&(R.debug("Looking for optional URL variables",e),P.each(t,function(e,t){var r=-1!==t.indexOf("$")?t.slice(3,-1):t.slice(2,-1),n=P.isPlainObject(a)&&a[r]!==C?a[r]:g.data(r)!==C?g.data(r):b.data(r)!==C?b.data(r):a[r];o=n!==C?(R.verbose("Optional variable Found",r,n),o.replace(t,n)):(R.verbose("Optional variable not found",r),-1!==o.indexOf("/"+t)?o.replace("/"+t,""):o.replace(t,""))}))),o},formData:function(r){var e,n,u,c,d,l={},t="formdata"===f.serializeForm;return r=r||o||f.data,e=P.isPlainObject(r),t?(l=new FormData(m[0]),f.processData=void 0!==f.processData&&f.processData,f.contentType=void 0!==f.contentType&&f.contentType):(n=m.serializeArray(),u={},c={},d=function(e,t,r){return e[t]=r,e},P.each(P('input[type="file"]',m),function(e,r){P.each(P(r)[0].files,function(e,t){n.push({name:r.name,value:t})})}),P.each(n,function(e,t){if(f.regExp.validate.test(t.name)){var r,n="checkbox"===P('[name="'+t.name+'"]',m).attr("type"),o=parseFloat(t.value),a=n&&"on"===t.value||"true"===t.value||(String(o)===t.value?o:"false"!==t.value&&t.value),s=t.name.match(f.regExp.key)||[],i=t.name.replace(/\[\]$/,"");i in u?Array.isArray(c[i])?c[i].push(a):c[i]=[c[i],a]:(u[i]=0,c[i]=a),-1===i.indexOf("[]")&&(a=c[i]);for(;(r=s.pop())!==C;)""!=r||Array.isArray(a)?f.regExp.fixed.test(r)?a=d([],r,a):f.regExp.named.test(r)&&(a=d({},r,a)):a=d([],u[i]++,a);l=P.extend(!0,l,a)}})),r=e?(R.debug("Extending existing data with form data",r,l),t?(P.each(Object.keys(r),function(e,t){l.append(t,r[t])}),l):P.extend(!0,{},r,l)):(R.debug("Adding form data",l),l)}},send:{request:function(){R.set.loading(),R.request=R.create.request(),R.is.mocked()?R.mockedXHR=R.create.mockedXHR():R.xhr=R.create.xhr(),f.onRequest.call(h,R.request,R.xhr)}},event:{trigger:function(e){R.query(),"submit"!=e.type&&"click"!=e.type||e.preventDefault()},xhr:{always:function(){},done:function(e,t,r){var n=this,o=(new Date).getTime()-s,o=f.loadingDuration-o,a=!!F(f.onResponse)&&(R.is.expectingJSON()&&!f.rawResponse?f.onResponse.call(n,P.extend(!0,{},e)):f.onResponse.call(n,e)),o=0<o?o:0;a&&(R.debug("Modified API response in onResponse callback",f.onResponse,a,e),e=a),0<o&&R.debug("Response completed early delaying state change by",o),setTimeout(function(){R.is.validResponse(e)?R.request.resolveWith(n,[e,r]):R.request.rejectWith(n,[r,"invalid"])},o)},fail:function(e,t,r){var n=this,o=(new Date).getTime()-s,o=f.loadingDuration-o;0<(o=0<o?o:0)&&R.debug("Response completed early delaying state change by",o),setTimeout(function(){R.is.abortedRequest(e)?R.request.rejectWith(n,[e,"aborted",r]):R.request.rejectWith(n,[e,"error",t,r])},o)}},request:{done:function(e,t){R.debug("Successful API Response",e),"local"===f.cache&&r&&(R.write.cachedResponse(r,e),R.debug("Saving server response locally",R.cache)),f.onSuccess.call(h,e,g,t)},complete:function(e,t){var r,n;R.was.successful()?(n=e,r=t):n=R.get.responseFromXHR(r=e),R.remove.loading(),f.onComplete.call(h,n,g,r)},fail:function(e,t,r){var n=R.get.responseFromXHR(e),o=R.get.errorFromRequest(n,t,r);if("aborted"==t)return R.debug("XHR Aborted (Most likely caused by page navigation or CORS Policy)",t,r),f.onAbort.call(h,t,g,e),!0;"invalid"==t?R.debug("JSON did not pass success test. A server-side error has most likely occurred",n):"error"==t&&e!==C&&(R.debug("XHR produced a server error",t,r),(e.status<200||300<=e.status)&&r!==C&&""!==r&&R.error(c.statusMessage+r,a.url),f.onError.call(h,o,g,e)),f.errorDuration&&"aborted"!==t&&(R.debug("Adding error state"),R.set.error(),R.should.removeError()&&setTimeout(R.remove.error,f.errorDuration)),R.debug("API Request failed",o,e),f.onFailure.call(h,n,g,e)}}},create:{request:function(){return P.Deferred().always(R.event.request.complete).done(R.event.request.done).fail(R.event.request.fail)},mockedXHR:function(){var e=f.mockResponse||f.response,t=f.mockResponseAsync||f.responseAsync,r=P.Deferred().always(R.event.xhr.complete).done(R.event.xhr.done).fail(R.event.xhr.fail);return e?(e=F(e)?(R.debug("Using specified synchronous callback",e),e.call(h,n)):(R.debug("Using settings specified response",e),e),r.resolveWith(h,[e,!1,{responseText:e}])):F(t)&&(e=function(e){R.debug("Async callback returned response",e),e?r.resolveWith(h,[e,!1,{responseText:e}]):r.rejectWith(h,[{responseText:e},!1,!1])},R.debug("Using specified async response callback",t),t.call(h,n,e)),r},xhr:function(){var e=P.ajax(a).always(R.event.xhr.always).done(R.event.xhr.done).fail(R.event.xhr.fail);return R.verbose("Created server request",e,a),e}},set:{error:function(){R.verbose("Adding error state to element",b),b.addClass(d.error)},loading:function(){R.verbose("Adding loading state to element",b),b.addClass(d.loading),s=(new Date).getTime()}},remove:{error:function(){R.verbose("Removing error state from element",b),b.removeClass(d.error)},loading:function(){R.verbose("Removing loading state from element",b),b.removeClass(d.loading)}},get:{normalizedData:function(){return"string"==typeof f.data?f.data:JSON.stringify(f.data,Object.keys(f.data).sort())},responseFromXHR:function(e){return!!P.isPlainObject(e)&&(R.is.expectingJSON()?R.decode.json(e.responseText):e.responseText)},errorFromRequest:function(e,t,r){return P.isPlainObject(e)&&e.error!==C?e.error:f.error[t]!==C?f.error[t]:r},request:function(){return R.request||!1},xhr:function(){return R.xhr||!1},settings:function(){var e=f.beforeSend.call(g,f);return e&&(e.success!==C&&(R.debug("Legacy success callback detected",e),R.error(c.legacyParameters,e.success),e.onSuccess=e.success),e.failure!==C&&(R.debug("Legacy failure callback detected",e),R.error(c.legacyParameters,e.failure),e.onFailure=e.failure),e.complete!==C&&(R.debug("Legacy complete callback detected",e),R.error(c.legacyParameters,e.complete),e.onComplete=e.complete)),e===C&&R.error(c.noReturnedValue),!1===e?e:e!==C?P.extend(!0,{},e):P.extend(!0,{},f)},urlEncodedValue:function(e){var t=w.decodeURIComponent(e),r=w.encodeURIComponent(e);return t!==e?(R.debug("URL value is already encoded, avoiding double encoding",e),e):(R.verbose("Encoding value using encodeURIComponent",e,r),r)},defaultData:function(){var e={};return E(v)||(R.is.input()?e.value=g.val():R.is.form()||(e.text=g.text())),e},event:function(){return E(v)||"now"==f.on?(R.debug("API called without element, no events attached"),!1):"auto"==f.on?g.is("input")?v.oninput!==C?"input":v.onpropertychange!==C?"propertychange":"keyup":g.is("form")?"submit":"click":f.on},templatedURL:function(e){if(e=e||g.data(i.action)||f.action||!1,r=g.data(i.url)||f.url||!1)return R.debug("Using specified url",r),r;if(e){if(R.debug("Looking up url for action",e,f.api),f.api[e]===C&&!R.is.mocked())return void R.error(c.missingAction,f.action,f.api);r=f.api[e]}else R.is.form()&&(r=g.attr("action")||b.attr("action")||!1,R.debug("No url or action specified, defaulting to form action",r));return r}},abort:function(){var e=R.get.xhr();e&&"resolved"!==e.state()&&(R.debug("Cancelling API request"),e.abort())},reset:function(){R.remove.error(),R.remove.loading()},setting:function(e,t){if(R.debug("Changing setting",e,t),P.isPlainObject(e))P.extend(!0,f,e);else{if(t===C)return f[e];P.isPlainObject(f[e])?P.extend(!0,f[e],t):f[e]=t}},internal:function(e,t){if(P.isPlainObject(e))P.extend(!0,R,e);else{if(t===C)return R[e];R[e]=t}},debug:function(){!f.silent&&f.debug&&(f.performance?R.performance.log(arguments):(R.debug=Function.prototype.bind.call(console.info,console,f.name+":"),R.debug.apply(console,arguments)))},verbose:function(){!f.silent&&f.verbose&&f.debug&&(f.performance?R.performance.log(arguments):(R.verbose=Function.prototype.bind.call(console.info,console,f.name+":"),R.verbose.apply(console,arguments)))},error:function(){f.silent||(R.error=Function.prototype.bind.call(console.error,console,f.name+":"),R.error.apply(console,arguments))},performance:{log:function(e){var t,r;f.performance&&(r=(t=(new Date).getTime())-(k||t),k=t,S.push({Name:e[0],Arguments:[].slice.call(e,1)||"","Execution Time":r})),clearTimeout(R.performance.timer),R.performance.timer=setTimeout(R.performance.display,500)},display:function(){var e=f.name+":",r=0;k=!1,clearTimeout(R.performance.timer),P.each(S,function(e,t){r+=t["Execution Time"]}),e+=" "+r+"ms",A&&(e+=" '"+A+"'"),(console.group!==C||console.table!==C)&&0<S.length&&(console.groupCollapsed(e),console.table?console.table(S):P.each(S,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),S=[]}},invoke:function(n,e,t){var o,a,r,s=y;return e=e||O,t=t||v,"string"==typeof n&&s!==C&&(n=n.split(/[\. ]/),o=n.length-1,P.each(n,function(e,t){var r=e!=o?t+n[e+1].charAt(0).toUpperCase()+n[e+1].slice(1):n;if(P.isPlainObject(s[r])&&e!=o)s=s[r];else{if(s[r]!==C)return a=s[r],!1;{if(!P.isPlainObject(s[t])||e==o)return s[t]!==C?a=s[t]:R.error(c.method,n),!1;s=s[t]}}})),F(a)?r=a.apply(t,e):a!==C&&(r=a),Array.isArray(x)?x.push(r):x!==C?x=[x,r]:r!==C&&(x=r),a}};D?(y===C&&R.initialize(),R.invoke(T)):(y!==C&&y.invoke("destroy"),R.initialize())}),x!==C?x:this},P.api.settings={name:"API",namespace:"api",debug:!1,verbose:!1,performance:!0,api:{},cache:!0,interruptRequests:!0,on:"auto",stateContext:!1,loadingDuration:0,hideError:"auto",errorDuration:2e3,encodeParameters:!0,action:!1,url:!1,base:"",urlData:{},defaultData:!0,serializeForm:!1,throttle:0,throttleFirstRequest:!0,method:"get",data:{},dataType:"json",mockResponse:!1,mockResponseAsync:!1,response:!1,responseAsync:!1,rawResponse:!0,beforeSend:function(e){return e},beforeXHR:function(e){},onRequest:function(e,t){},onResponse:!1,onSuccess:function(e,t){},onComplete:function(e,t){},onFailure:function(e,t){},onError:function(e,t){},onAbort:function(e,t){},successTest:!1,error:{beforeSend:"The before send function has aborted the request",error:"There was an error with your request",exitConditions:"API Request Aborted. Exit conditions met",JSONParse:"JSON could not be parsed during error handling",legacyParameters:"You are using legacy API success callback names",method:"The method you called is not defined",missingAction:"API action used but no url was defined",missingURL:"No URL specified for api event",noReturnedValue:"The beforeSend callback must return a settings object, beforeSend ignored.",noStorage:"Caching responses locally requires session storage",parseError:"There was an error parsing your request",requiredParameter:"Missing a required URL parameter: ",statusMessage:"Server gave an error: ",timeout:"Your request timed out"},regExp:{required:/\{\$*[a-z0-9]+\}/gi,optional:/\{\/\$*[a-z0-9]+\}/gi,validate:/^[a-z_][a-z0-9_-]*(?:\[[a-z0-9_-]*\])*$/i,key:/[a-z0-9_-]+|(?=\[\])/gi,push:/^$/,fixed:/^\d+$/,named:/^[a-z0-9_-]+$/i},className:{loading:"loading",error:"error"},selector:{disabled:".disabled",form:"form"},metadata:{action:"action",url:"url"}}}(jQuery,window,document);
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* # Fomantic-UI 2.9.1-beta.
|
2
|
+
* # Fomantic-UI 2.9.1-beta.20+d4987bf - Button
|
3
3
|
* https://github.com/fomantic/Fomantic-UI/
|
4
4
|
*
|
5
5
|
*
|
@@ -53,10 +53,9 @@
|
|
53
53
|
*******************************/
|
54
54
|
|
55
55
|
|
56
|
-
|
56
|
+
/* --------------
|
57
57
|
Hover
|
58
|
-
|
59
|
-
|
58
|
+
--------------- */
|
60
59
|
.ui.button:hover {
|
61
60
|
background-color: #CACBCD;
|
62
61
|
background-image: none;
|
@@ -68,10 +67,9 @@
|
|
68
67
|
opacity: 0.85;
|
69
68
|
}
|
70
69
|
|
71
|
-
|
70
|
+
/* --------------
|
72
71
|
Focus
|
73
|
-
|
74
|
-
|
72
|
+
--------------- */
|
75
73
|
.ui.button:focus {
|
76
74
|
background-color: #CACBCD;
|
77
75
|
color: rgba(0, 0, 0, 0.8);
|
@@ -83,10 +81,9 @@
|
|
83
81
|
opacity: 0.85;
|
84
82
|
}
|
85
83
|
|
86
|
-
|
84
|
+
/* --------------
|
87
85
|
Down
|
88
|
-
|
89
|
-
|
86
|
+
--------------- */
|
90
87
|
.ui.button:active,
|
91
88
|
.ui.active.button:active {
|
92
89
|
background-color: #BABBBC;
|
@@ -96,10 +93,9 @@
|
|
96
93
|
box-shadow: 0 0 0 1px transparent inset, none;
|
97
94
|
}
|
98
95
|
|
99
|
-
|
96
|
+
/* --------------
|
100
97
|
Active
|
101
|
-
|
102
|
-
|
98
|
+
--------------- */
|
103
99
|
.ui.active.button {
|
104
100
|
background-color: #C0C1C2;
|
105
101
|
background-image: none;
|
@@ -117,10 +113,9 @@
|
|
117
113
|
background-image: none;
|
118
114
|
}
|
119
115
|
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
116
|
+
/* --------------
|
117
|
+
Loading
|
118
|
+
--------------- */
|
124
119
|
|
125
120
|
/* Specificity hack */
|
126
121
|
.ui.loading.loading.loading.loading.loading.loading.button {
|
@@ -177,10 +172,9 @@
|
|
177
172
|
border-color: #767676;
|
178
173
|
}
|
179
174
|
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
175
|
+
/* -------------------
|
176
|
+
Disabled
|
177
|
+
-------------------- */
|
184
178
|
.ui.buttons .disabled.button:not(.basic),
|
185
179
|
.ui.disabled.button,
|
186
180
|
.ui.button:disabled,
|
@@ -205,10 +199,9 @@
|
|
205
199
|
*******************************/
|
206
200
|
|
207
201
|
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
202
|
+
/* -------------------
|
203
|
+
Animated
|
204
|
+
-------------------- */
|
212
205
|
.ui.animated.button {
|
213
206
|
position: relative;
|
214
207
|
overflow: hidden;
|
@@ -324,10 +317,9 @@
|
|
324
317
|
transform: scale(1);
|
325
318
|
}
|
326
319
|
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
320
|
+
/* -------------------
|
321
|
+
Inverted
|
322
|
+
-------------------- */
|
331
323
|
.ui.inverted.button {
|
332
324
|
-webkit-box-shadow: 0 0 0 2px #FFFFFF inset;
|
333
325
|
box-shadow: 0 0 0 2px #FFFFFF inset;
|
@@ -377,10 +369,9 @@
|
|
377
369
|
color: rgba(0, 0, 0, 0.8);
|
378
370
|
}
|
379
371
|
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
372
|
+
/* -------------------
|
373
|
+
Labeled Button
|
374
|
+
-------------------- */
|
384
375
|
.ui.labeled.button:not(.icon) {
|
385
376
|
display: -webkit-inline-box;
|
386
377
|
display: -ms-inline-flexbox;
|
@@ -437,10 +428,9 @@
|
|
437
428
|
border-bottom-right-radius: 0;
|
438
429
|
}
|
439
430
|
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
431
|
+
/* -------------------
|
432
|
+
Social
|
433
|
+
-------------------- */
|
444
434
|
|
445
435
|
/* Facebook */
|
446
436
|
.ui.facebook.button {
|
@@ -630,10 +620,9 @@
|
|
630
620
|
color: #FFFFFF;
|
631
621
|
}
|
632
622
|
|
633
|
-
|
623
|
+
/* --------------
|
634
624
|
Icon
|
635
|
-
|
636
|
-
|
625
|
+
--------------- */
|
637
626
|
.ui.button > .icon:not(.button) {
|
638
627
|
height: auto;
|
639
628
|
opacity: 0.8;
|
@@ -659,10 +648,9 @@
|
|
659
648
|
*******************************/
|
660
649
|
|
661
650
|
|
662
|
-
|
663
|
-
|
664
|
-
|
665
|
-
|
651
|
+
/* --------------
|
652
|
+
Stackable
|
653
|
+
--------------- */
|
666
654
|
|
667
655
|
/* Tablet Or Below */
|
668
656
|
@media only screen and (max-width: 767.98px) {
|
@@ -686,10 +674,9 @@
|
|
686
674
|
}
|
687
675
|
}
|
688
676
|
|
689
|
-
|
690
|
-
|
691
|
-
|
692
|
-
|
677
|
+
/* -------------------
|
678
|
+
Floated
|
679
|
+
-------------------- */
|
693
680
|
.ui[class*="left floated"].buttons,
|
694
681
|
.ui[class*="left floated"].button {
|
695
682
|
float: left;
|
@@ -703,10 +690,9 @@
|
|
703
690
|
margin-left: 0.25em;
|
704
691
|
}
|
705
692
|
|
706
|
-
|
707
|
-
|
708
|
-
|
709
|
-
|
693
|
+
/* -------------------
|
694
|
+
Compact
|
695
|
+
-------------------- */
|
710
696
|
.ui.compact.buttons .button,
|
711
697
|
.ui.compact.button {
|
712
698
|
padding: 0.58928571em 1.125em 0.58928571em;
|
@@ -724,10 +710,9 @@
|
|
724
710
|
padding: 0.58928571em 0 0.58928571em 0;
|
725
711
|
}
|
726
712
|
|
727
|
-
|
713
|
+
/* -------------------
|
728
714
|
Sizes
|
729
|
-
|
730
|
-
|
715
|
+
-------------------- */
|
731
716
|
.ui.buttons .button,
|
732
717
|
.ui.buttons .or,
|
733
718
|
.ui.button {
|
@@ -783,10 +768,9 @@
|
|
783
768
|
font-size: 1.71428571rem;
|
784
769
|
}
|
785
770
|
|
786
|
-
|
787
|
-
|
788
|
-
|
789
|
-
|
771
|
+
/* --------------
|
772
|
+
Icon Only
|
773
|
+
--------------- */
|
790
774
|
.ui.icon.buttons .button,
|
791
775
|
.ui.icon.button:not(.animated):not(.compact):not(.labeled) {
|
792
776
|
padding: 0.78571429em 0.78571429em 0.78571429em;
|
@@ -802,10 +786,9 @@
|
|
802
786
|
vertical-align: top;
|
803
787
|
}
|
804
788
|
|
805
|
-
|
806
|
-
|
807
|
-
|
808
|
-
|
789
|
+
/* -------------------
|
790
|
+
Basic
|
791
|
+
-------------------- */
|
809
792
|
.ui.basic.buttons .button,
|
810
793
|
.ui.basic.button {
|
811
794
|
background: transparent none;
|
@@ -929,10 +912,9 @@
|
|
929
912
|
border-top: none;
|
930
913
|
}
|
931
914
|
|
932
|
-
|
933
|
-
|
934
|
-
|
935
|
-
|
915
|
+
/* -------------------
|
916
|
+
Tertiary
|
917
|
+
-------------------- */
|
936
918
|
|
937
919
|
/* Overline Mixin */
|
938
920
|
.ui.tertiary.button {
|
@@ -966,10 +948,9 @@
|
|
966
948
|
background: none;
|
967
949
|
}
|
968
950
|
|
969
|
-
|
970
|
-
|
971
|
-
|
972
|
-
|
951
|
+
/* --------------
|
952
|
+
Labeled Icon
|
953
|
+
--------------- */
|
973
954
|
.ui.labeled.icon.buttons .button,
|
974
955
|
.ui.labeled.icon.button {
|
975
956
|
position: relative;
|
@@ -1050,10 +1031,9 @@
|
|
1050
1031
|
animation: loader 2s linear infinite;
|
1051
1032
|
}
|
1052
1033
|
|
1053
|
-
|
1054
|
-
|
1055
|
-
|
1056
|
-
|
1034
|
+
/* --------------
|
1035
|
+
Toggle
|
1036
|
+
--------------- */
|
1057
1037
|
|
1058
1038
|
/* Toggle (Modifies active state to give affordances) */
|
1059
1039
|
.ui.toggle.buttons .active.button,
|
@@ -1071,10 +1051,9 @@
|
|
1071
1051
|
color: #FFFFFF;
|
1072
1052
|
}
|
1073
1053
|
|
1074
|
-
|
1075
|
-
|
1076
|
-
|
1077
|
-
|
1054
|
+
/* --------------
|
1055
|
+
Circular
|
1056
|
+
--------------- */
|
1078
1057
|
.ui.circular.button {
|
1079
1058
|
border-radius: 10em;
|
1080
1059
|
}
|
@@ -1083,10 +1062,9 @@
|
|
1083
1062
|
vertical-align: baseline;
|
1084
1063
|
}
|
1085
1064
|
|
1086
|
-
|
1087
|
-
|
1088
|
-
|
1089
|
-
|
1065
|
+
/* -------------------
|
1066
|
+
Or Buttons
|
1067
|
+
-------------------- */
|
1090
1068
|
.ui.buttons .or {
|
1091
1069
|
position: relative;
|
1092
1070
|
width: 0.3em;
|
@@ -1125,10 +1103,9 @@
|
|
1125
1103
|
display: none;
|
1126
1104
|
}
|
1127
1105
|
|
1128
|
-
|
1129
|
-
|
1130
|
-
|
1131
|
-
|
1106
|
+
/* -------------------
|
1107
|
+
Attached
|
1108
|
+
-------------------- */
|
1132
1109
|
|
1133
1110
|
/* Singular */
|
1134
1111
|
.ui.attached.button {
|
@@ -1241,10 +1218,9 @@
|
|
1241
1218
|
border-radius: 0 0 0 0.28571429rem;
|
1242
1219
|
}
|
1243
1220
|
|
1244
|
-
|
1245
|
-
|
1246
|
-
|
1247
|
-
|
1221
|
+
/* -------------------
|
1222
|
+
Fluid
|
1223
|
+
-------------------- */
|
1248
1224
|
.ui.fluid.buttons,
|
1249
1225
|
.ui.fluid.button {
|
1250
1226
|
width: 100%;
|
@@ -1364,10 +1340,9 @@
|
|
1364
1340
|
height: 8.3333%;
|
1365
1341
|
}
|
1366
1342
|
|
1367
|
-
|
1343
|
+
/* -------------------
|
1368
1344
|
Colors
|
1369
|
-
|
1370
|
-
|
1345
|
+
-------------------- */
|
1371
1346
|
.ui.primary.buttons .button,
|
1372
1347
|
.ui.primary.button {
|
1373
1348
|
background-color: #2185D0;
|
@@ -4099,11 +4074,6 @@
|
|
4099
4074
|
color: #0f0f10;
|
4100
4075
|
}
|
4101
4076
|
|
4102
|
-
/*---------------
|
4103
|
-
Positive
|
4104
|
-
----------------*/
|
4105
|
-
|
4106
|
-
|
4107
4077
|
/* Standard */
|
4108
4078
|
.ui.positive.buttons .button,
|
4109
4079
|
.ui.positive.button {
|
@@ -4182,11 +4152,6 @@
|
|
4182
4152
|
margin-left: -1px;
|
4183
4153
|
}
|
4184
4154
|
|
4185
|
-
/*---------------
|
4186
|
-
Negative
|
4187
|
-
----------------*/
|
4188
|
-
|
4189
|
-
|
4190
4155
|
/* Standard */
|
4191
4156
|
.ui.negative.buttons .button,
|
4192
4157
|
.ui.negative.button {
|
@@ -4267,8 +4232,8 @@
|
|
4267
4232
|
|
4268
4233
|
|
4269
4234
|
/*******************************
|
4270
|
-
|
4271
|
-
|
4235
|
+
Groups
|
4236
|
+
*******************************/
|
4272
4237
|
|
4273
4238
|
.ui.buttons {
|
4274
4239
|
display: -webkit-inline-box;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* # Fomantic-UI 2.9.1-beta.
|
2
|
+
* # Fomantic-UI 2.9.1-beta.20+d4987bf - Calendar
|
3
3
|
* https://github.com/fomantic/Fomantic-UI/
|
4
4
|
*
|
5
5
|
*
|
@@ -13,7 +13,7 @@
|
|
13
13
|
Popup
|
14
14
|
*******************************/
|
15
15
|
|
16
|
-
.ui.calendar
|
16
|
+
.ui.calendar.popup {
|
17
17
|
max-width: none;
|
18
18
|
padding: 0;
|
19
19
|
border: none;
|
@@ -22,13 +22,17 @@
|
|
22
22
|
-ms-user-select: none;
|
23
23
|
user-select: none;
|
24
24
|
}
|
25
|
+
.ui.calendar.popup.inverted::before {
|
26
|
+
background: #2b2b2b;
|
27
|
+
}
|
25
28
|
|
26
29
|
|
27
30
|
/*******************************
|
28
31
|
Calendar
|
29
32
|
*******************************/
|
30
33
|
|
31
|
-
.ui.calendar .calendar:focus
|
34
|
+
.ui.calendar .calendar:focus,
|
35
|
+
.ui.calendar.popup:focus {
|
32
36
|
outline: 0;
|
33
37
|
}
|
34
38
|
|
@@ -37,11 +41,11 @@
|
|
37
41
|
Grid
|
38
42
|
*******************************/
|
39
43
|
|
40
|
-
.ui.calendar
|
44
|
+
.ui.calendar.popup .ui.grid {
|
41
45
|
display: block;
|
42
46
|
white-space: nowrap;
|
43
47
|
}
|
44
|
-
.ui.calendar
|
48
|
+
.ui.calendar.popup .ui.grid > .column {
|
45
49
|
width: auto;
|
46
50
|
}
|
47
51
|
|
@@ -114,10 +118,9 @@
|
|
114
118
|
background: rgba(0, 0, 0, 0.03);
|
115
119
|
}
|
116
120
|
|
117
|
-
|
121
|
+
/* --------------
|
118
122
|
States
|
119
|
-
|
120
|
-
|
123
|
+
--------------- */
|
121
124
|
.ui.calendar .ui.table tr td.today {
|
122
125
|
font-weight: bold;
|
123
126
|
}
|
@@ -127,8 +130,8 @@
|
|
127
130
|
-webkit-box-shadow: none;
|
128
131
|
box-shadow: none;
|
129
132
|
}
|
130
|
-
.ui.calendar:not(.disabled)
|
131
|
-
.ui.calendar:not(.disabled)
|
133
|
+
.ui.calendar:not(.disabled):focus .ui.table tbody tr td.focus,
|
134
|
+
.ui.calendar:not(.disabled).popup.active .ui.table tbody tr td.focus {
|
132
135
|
-webkit-box-shadow: inset 0 0 0 1px #85B7D9;
|
133
136
|
box-shadow: inset 0 0 0 1px #85B7D9;
|
134
137
|
}
|
@@ -139,11 +142,11 @@
|
|
139
142
|
box-shadow: none;
|
140
143
|
}
|
141
144
|
.ui.inverted.calendar:not(.disabled) .calendar:focus .ui.table.inverted tbody tr td.focus,
|
142
|
-
.ui.inverted.calendar:not(.disabled)
|
145
|
+
.ui.inverted.calendar:not(.disabled).popup.active .ui.table.inverted tbody tr td.focus {
|
143
146
|
-webkit-box-shadow: inset 0 0 0 1px #85B7D9;
|
144
147
|
box-shadow: inset 0 0 0 1px #85B7D9;
|
145
148
|
}
|
146
|
-
.ui.inverted.calendar .ui.inverted.table tr .disabled {
|
149
|
+
.ui.inverted.calendar .ui.ui.ui.inverted.table tr .disabled {
|
147
150
|
color: rgba(225, 225, 225, 0.3);
|
148
151
|
}
|
149
152
|
.ui.inverted.calendar .ui.inverted.table tr .adjacent:not(.disabled):not(.active) {
|
@@ -174,10 +177,9 @@
|
|
174
177
|
*******************************/
|
175
178
|
|
176
179
|
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
180
|
+
/* --------------------
|
181
|
+
Disabled
|
182
|
+
--------------------- */
|
181
183
|
.ui.disabled.calendar {
|
182
184
|
opacity: 0.45;
|
183
185
|
}
|