fomantic-ui 2.9.2-beta.7 → 2.9.2-beta.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/accordion.css +1 -1
- package/dist/components/accordion.js +4 -4
- 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 +1 -1
- package/dist/components/api.min.js +1 -1
- package/dist/components/breadcrumb.css +1 -1
- package/dist/components/breadcrumb.min.css +1 -1
- package/dist/components/button.css +1 -1
- package/dist/components/button.min.css +1 -1
- package/dist/components/calendar.css +1 -1
- package/dist/components/calendar.js +1 -1
- package/dist/components/calendar.min.css +1 -1
- package/dist/components/calendar.min.js +1 -1
- package/dist/components/card.css +1 -1
- package/dist/components/card.min.css +1 -1
- package/dist/components/checkbox.css +1 -1
- package/dist/components/checkbox.js +1 -1
- package/dist/components/checkbox.min.css +1 -1
- package/dist/components/checkbox.min.js +1 -1
- package/dist/components/comment.css +1 -1
- package/dist/components/comment.min.css +1 -1
- package/dist/components/container.css +1 -1
- package/dist/components/container.min.css +1 -1
- package/dist/components/dimmer.css +1 -1
- package/dist/components/dimmer.js +3 -3
- 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 +3 -3
- 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 +2 -2
- package/dist/components/embed.min.css +1 -1
- package/dist/components/embed.min.js +2 -2
- package/dist/components/feed.css +1 -1
- package/dist/components/feed.min.css +1 -1
- package/dist/components/flag.css +1 -1
- package/dist/components/flag.min.css +1 -1
- package/dist/components/flyout.css +1 -1
- package/dist/components/flyout.js +18 -30
- 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 +3 -3
- 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/message.css +1 -1
- package/dist/components/message.min.css +1 -1
- package/dist/components/modal.css +1 -1
- package/dist/components/modal.js +14 -8
- 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 +1 -1
- package/dist/components/nag.min.css +1 -1
- package/dist/components/nag.min.js +1 -1
- package/dist/components/placeholder.css +1 -1
- package/dist/components/placeholder.min.css +1 -1
- package/dist/components/popup.css +147 -2
- package/dist/components/popup.js +20 -8
- package/dist/components/popup.min.css +2 -2
- package/dist/components/popup.min.js +2 -2
- package/dist/components/progress.css +1 -1
- package/dist/components/progress.js +3 -29
- 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 +1 -1
- package/dist/components/rating.min.css +1 -1
- package/dist/components/rating.min.js +1 -1
- package/dist/components/reset.css +1 -1
- package/dist/components/reset.min.css +1 -1
- package/dist/components/reveal.css +1 -1
- package/dist/components/reveal.min.css +1 -1
- package/dist/components/search.css +1 -1
- package/dist/components/search.js +2 -2
- 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 +15 -37
- 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 +7 -27
- 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 +1 -1
- package/dist/components/site.min.css +1 -1
- package/dist/components/site.min.js +1 -1
- package/dist/components/slider.js +1 -1
- package/dist/components/slider.min.js +1 -1
- package/dist/components/state.js +1 -1
- package/dist/components/state.min.js +1 -1
- package/dist/components/statistic.css +1 -1
- package/dist/components/statistic.min.css +1 -1
- package/dist/components/step.css +1 -1
- package/dist/components/step.min.css +1 -1
- package/dist/components/sticky.css +1 -1
- package/dist/components/sticky.js +1 -1
- package/dist/components/sticky.min.css +1 -1
- package/dist/components/sticky.min.js +1 -1
- package/dist/components/tab.css +1 -1
- package/dist/components/tab.js +1 -1
- package/dist/components/tab.min.css +1 -1
- package/dist/components/tab.min.js +1 -1
- package/dist/components/table.css +1 -1
- package/dist/components/table.min.css +1 -1
- package/dist/components/text.css +1 -1
- package/dist/components/text.min.css +1 -1
- package/dist/components/toast.css +1 -1
- package/dist/components/toast.js +3 -3
- 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 +9 -57
- package/dist/components/transition.min.css +1 -1
- package/dist/components/transition.min.js +2 -2
- package/dist/components/visibility.js +1 -1
- package/dist/components/visibility.min.js +1 -1
- package/dist/semantic.css +229 -51
- package/dist/semantic.js +118 -228
- package/dist/semantic.min.css +2 -2
- package/dist/semantic.min.js +2 -2
- package/package.json +1 -1
- package/src/definitions/behaviors/form.js +2 -2
- package/src/definitions/modules/accordion.js +3 -3
- package/src/definitions/modules/dimmer.js +2 -2
- package/src/definitions/modules/dropdown.js +2 -2
- package/src/definitions/modules/embed.js +1 -1
- package/src/definitions/modules/flyout.js +17 -29
- package/src/definitions/modules/modal.js +13 -7
- package/src/definitions/modules/popup.js +19 -7
- package/src/definitions/modules/popup.less +47 -3
- package/src/definitions/modules/progress.js +2 -28
- package/src/definitions/modules/search.js +1 -1
- package/src/definitions/modules/shape.js +14 -36
- package/src/definitions/modules/sidebar.js +6 -26
- package/src/definitions/modules/toast.js +2 -2
- package/src/definitions/modules/transition.js +8 -56
- package/src/themes/default/modules/popup.variables +8 -0
@@ -1,5 +1,5 @@
|
|
1
1
|
/*
|
2
|
-
* # Fomantic UI - 2.9.2-beta.
|
2
|
+
* # Fomantic UI - 2.9.2-beta.9+f3fb845
|
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(F,k,D){"use strict";function E(e){return"function"==typeof e&&"number"!=typeof e.nodeType}k=void 0!==k&&k.Math===Math?k:globalThis,F.fn.search=function(R){var S,x=F(this),C=x.selector||"",w=Date.now(),T=[],A=R,j="string"==typeof A,q=[].slice.call(arguments,1);return x.each(function(){var d=F.isPlainObject(R)?F.extend(!0,{},F.fn.search.settings,R):F.extend({},F.fn.search.settings),f=d.className,c=d.metadata,r=d.regExp,i=d.fields,g=d.selector,h=d.error,e=d.namespace,n="."+e,t=e+"-module",v=F(this),p=v.find(g.prompt),s=v.find(g.searchButton),a=v.find(g.results),o=v.find(g.result),u=(v.find(g.category),this),l=v.data(t),m=!1,y=!1,b={initialize:function(){b.verbose("Initializing module"),b.get.settings(),b.determine.searchFields(),b.bind.events(),b.set.type(),b.create.results(),b.instantiate()},instantiate:function(){b.verbose("Storing instance of module",b),l=b,v.data(t,b)},destroy:function(){b.verbose("Destroying instance"),v.off(n).removeData(t)},refresh:function(){b.debug("Refreshing selector cache"),p=v.find(g.prompt),s=v.find(g.searchButton),v.find(g.category),a=v.find(g.results),o=v.find(g.result)},refreshResults:function(){a=v.find(g.results),o=v.find(g.result)},bind:{events:function(){b.verbose("Binding events to search"),d.automatic&&(v.on(b.get.inputEvent()+n,g.prompt,b.event.input),p.attr("autocomplete",b.is.chrome()?"fomantic-search":"off")),v.on("focus"+n,g.prompt,b.event.focus).on("blur"+n,g.prompt,b.event.blur).on("keydown"+n,g.prompt,b.handleKeyboard).on("click"+n,g.searchButton,b.query).on("mousedown"+n,g.results,b.event.result.mousedown).on("mouseup"+n,g.results,b.event.result.mouseup).on("click"+n,g.result,b.event.result.click)}},determine:{searchFields:function(){R&&void 0!==R.searchFields&&(d.searchFields=R.searchFields)}},event:{input:function(){d.searchDelay?(clearTimeout(b.timer),b.timer=setTimeout(function(){b.is.focused()&&b.query()},d.searchDelay)):b.query()},focus:function(){b.set.focus(),d.searchOnFocus&&b.has.minimumCharacters()&&b.query(function(){b.can.show()&&b.showResults()})},blur:function(e){function t(){b.cancel.query(),b.remove.focus(),b.timer=setTimeout(b.hideResults,d.hideDelay)}var s=D.activeElement===this;s||(y=!1,b.resultsClicked?(b.debug("Determining if user action caused search to close"),v.one("click.close"+n,g.results,function(e){b.is.inMessage(e)||m?p.trigger("focus"):(m=!1,b.is.animating()||b.is.hidden()||t())})):(b.debug("Input blurred without user action, closing results"),t()))},result:{mousedown:function(){b.resultsClicked=!0},mouseup:function(){b.resultsClicked=!1},click:function(e){b.debug("Search result selected");var t=F(this),s=t.find(g.title).eq(0),r=t.is("a[href]")?t:t.find("a[href]").eq(0),n=r.attr("href")||!1,i=r.attr("target")||!1,s=0<s.length&&s.text(),a=b.get.results(),t=t.data(c.result)||b.get.result(s,a),o=b.get.value();if(E(d.onSelect)&&!1===d.onSelect.call(u,t,a))return b.debug("Custom onSelect callback cancelled default select action"),void(m=!0);b.hideResults(),s&&b.get.value()===o&&b.set.value(s),n&&(e.preventDefault(),b.verbose("Opening search link found in result",r),"_blank"===i||e.ctrlKey?k.open(n):k.location.href=n)}}},ensureVisible:function(e){var t,s,r;0!==e.length&&(e=(t=e.position().top)+e.outerHeight(!0),s=a.scrollTop(),r=a.height(),t<0?a.scrollTop(s+t):r<e&&a.scrollTop(s+(e-r)))},handleKeyboard:function(e){var t,s=v.find(g.result),r=v.find(g.category),n=s.filter("."+f.active),i=s.index(n),a=s.length,n=0<n.length,o=e.which,c=13,u=38,l=40;if(o===27&&(b.is.visible()?b.hideResults():(b.verbose("Escape key pressed, blurring search field"),p.trigger("blur")),e.stopPropagation(),y=!0),b.is.visible())if(o===c){if(b.verbose("Enter key pressed, selecting active result"),0<s.filter("."+f.active).length)return b.event.result.click.call(s.filter("."+f.active),e),e.preventDefault(),!1}else o===u&&n?(b.verbose("Up key pressed, changing active result"),t=i-1<0?i:i-1,r.removeClass(f.active),s.removeClass(f.active).eq(t).addClass(f.active).closest(r).addClass(f.active),b.ensureVisible(s.eq(t)),e.preventDefault()):o===l&&(b.verbose("Down key pressed, changing active result"),t=a<=i+1?i:i+1,r.removeClass(f.active),s.removeClass(f.active).eq(t).addClass(f.active).closest(r).addClass(f.active),b.ensureVisible(s.eq(t)),e.preventDefault());else o===c&&(b.verbose("Enter key pressed, executing query"),b.query(),b.set.buttonPressed(),p.one("keyup",b.remove.buttonFocus))},setup:{api:function(r,n){var e={debug:d.debug,on:!1,cache:d.cache,action:"search",urlData:{query:r}};F.extend(!0,e,d.apiSettings,{onSuccess:function(e,t,s){b.parse.response.call(u,e,r),n(),d.apiSettings&&"function"==typeof d.apiSettings.onSuccess&&d.apiSettings.onSuccess.call(this,e,t,s)},onFailure:function(e,t,s){b.displayMessage(h.serverError),n(),d.apiSettings&&"function"==typeof d.apiSettings.onFailure&&d.apiSettings.onFailure.call(this,e,t,s)},onAbort:function(e,t,s){d.apiSettings&&"function"==typeof d.apiSettings.onAbort&&d.apiSettings.onAbort.call(this,e,t,s)},onError:function(e,t,s){b.error(),d.apiSettings&&"function"==typeof d.apiSettings.onError&&d.apiSettings.onError.call(this,e,t,s)}}),b.verbose("Setting up API request",e),v.api(e)}},can:{useAPI:function(){return void 0!==F.fn.api},show:function(){return b.is.focused()&&!b.is.visible()&&!b.is.empty()},transition:function(){return d.transition&&void 0!==F.fn.transition&&v.transition("is supported")}},is:{animating:function(){return a.hasClass(f.animating)},chrome:function(){return!!k.chrome&&!k.StyleMedia},hidden:function(){return a.hasClass(f.hidden)},inMessage:function(e){var t;if(e.target)return t=F(e.target),F.contains(D.documentElement,e.target)&&0<t.closest(g.message).length},empty:function(){return""===a.html()},visible:function(){return 0<a.filter(":visible").length},focused:function(){return 0<p.filter(":focus").length}},get:{settings:function(){F.isPlainObject(R)&&R.searchFullText&&(d.fullTextSearch=R.searchFullText,b.error(d.error.oldSearchSyntax,u)),d.ignoreDiacritics&&!String.prototype.normalize&&(d.ignoreDiacritics=!1,b.error(h.noNormalize,u))},inputEvent:function(){var e=p[0];return void 0!==e&&void 0!==e.oninput?"input":void 0!==e&&void 0!==e.onpropertychange?"propertychange":"keyup"},value:function(){return p.val()},results:function(){return v.data(c.results)},result:function(s,e){var r=!1;return s=void 0!==s?s:b.get.value(),e=void 0!==e?e:b.get.results(),"category"===d.type?(b.debug("Finding result that matches",s),F.each(e,function(e,t){if(Array.isArray(t.results)&&(r=b.search.object(s,t.results)[0]))return!1})):(b.debug("Finding result in results object",s),r=b.search.object(s,e)[0]),r||!1}},select:{firstResult:function(){b.verbose("Selecting first result"),o.first().addClass(f.active)}},set:{focus:function(){v.addClass(f.focus)},loading:function(){v.addClass(f.loading)},value:function(e){b.verbose("Setting search input value",e),p.val(e)},type:function(e){e=e||d.type,f[e]&&v.addClass(f[e])},buttonPressed:function(){s.addClass(f.pressed)}},remove:{loading:function(){v.removeClass(f.loading)},focus:function(){v.removeClass(f.focus)},buttonPressed:function(){s.removeClass(f.pressed)},diacritics:function(e){return d.ignoreDiacritics?e.normalize("NFD").replace(/[\u0300-\u036F]/g,""):e}},query:function(e){e=E(e)?e:function(){};var t=b.get.value(),s=b.read.cache(t);e=e||function(){},b.has.minimumCharacters()?(s?(b.debug("Reading result from cache",t),b.save.results(s.results),b.addResults(s.html),b.inject.id(s.results),e()):(b.debug("Querying for",t),F.isPlainObject(d.source)||Array.isArray(d.source)?(b.search.local(t),e()):b.can.useAPI()?b.search.remote(t,e):(b.error(h.source),e())),d.onSearchQuery.call(u,t)):b.hideResults()},search:{local:function(e){var t,s=b.search.object(e,d.source);b.set.loading(),b.save.results(s),b.debug("Returned full local search results",s),0<d.maxResults&&(b.debug("Using specified max results",s),s=s.slice(0,d.maxResults)),"category"===d.type&&(s=b.create.categoryResults(s)),t=b.generateResults({results:s}),b.remove.loading(),b.addResults(t),b.inject.id(s),b.write.cache(e,{html:t,results:s})},remote:function(e,t){t=E(t)?t:function(){},v.api("is loading")&&v.api("abort"),b.setup.api(e,t),v.api("query")},object:function(n,e,t){n=b.remove.diacritics(String(n));function i(e,t){var s=-1===F.inArray(t,a),r=-1===F.inArray(t,c),n=-1===F.inArray(t,o);s&&r&&n&&e.push(t)}var a=[],o=[],c=[],s=n.replace(r.escape,"\\$&"),u=new RegExp(r.beginsWith+s,"i");if(e=e||d.source,t=void 0!==t?t:d.searchFields,Array.isArray(t)||(t=[t]),void 0===e||!1===e)return b.error(h.source),[];var l=t.length-1;return F.each(e,function(e,s){var r=[];F.each(t,function(e,t){if("string"==typeof s[t]||"number"==typeof s[t]){t="string"==typeof s[t]?b.remove.diacritics(s[t]):s[t].toString();if("all"===d.fullTextSearch){if(r.push(t),e<l)return!0;t=r.join(" ")}"all"!==d.fullTextSearch&&-1!==t.search(u)?i(a,s):"exact"===d.fullTextSearch&&b.exactSearch(n,t)||"some"===d.fullTextSearch&&b.wordSearch(n,t)||"all"===d.fullTextSearch&&b.wordSearch(n,t,!0)?i(o,s):!0===d.fullTextSearch&&b.fuzzySearch(n,t)&&i(c,s)}})}),F.merge(o,c),F.merge(a,o),a}},exactSearch:function(e,t){return e=e.toLowerCase(),-1<(t=t.toLowerCase()).indexOf(e)},wordSearch:function(e,t,s){for(var r=e.split(/\s+/),n=r.length,i=!1,a=0;a<n&&!(!(i=b.exactSearch(r[a],t))&&s||i&&!s);a++);return i},fuzzySearch:function(e,t){var s=t.length,r=e.length;if("string"!=typeof e)return!1;if(e=e.toLowerCase(),t=t.toLowerCase(),s<r)return!1;if(r===s)return e===t;for(var n=0,i=0;n<r;n++){for(var a=!1,o=e.charCodeAt(n);i<s;)if(t.charCodeAt(i++)===o){a=!0;break}if(!a)return!1}return!0},parse:{response:function(e,t){Array.isArray(e)&&((s={})[i.results]=e,e=s);var s=b.generateResults(e);b.verbose("Parsing server response",e),void 0!==e&&void 0!==t&&void 0!==e[i.results]&&(b.addResults(s),b.inject.id(e[i.results]),b.write.cache(t,{html:s,results:e[i.results]}),b.save.results(e[i.results]))}},cancel:{query:function(){b.can.useAPI()&&v.api("abort")}},has:{minimumCharacters:function(){return b.get.value().length>=d.minCharacters},results:function(){return 0!==a.length&&""!==a.html()}},clear:{cache:function(e){var t=v.data(c.cache);e?t&&t[e]&&(b.debug("Removing value from cache",e),delete t[e],v.data(c.cache,t)):(b.debug("Clearing cache",e),v.removeData(c.cache))}},read:{cache:function(e){var t=v.data(c.cache);return!!d.cache&&(b.verbose("Checking cache for generated html for query",e),"object"==typeof t&&void 0!==t[e]&&t[e])}},create:{categoryResults:function(e){var s={};return F.each(e,function(e,t){t.category&&(void 0===s[t.category]?(b.verbose("Creating new category of results",t.category),s[t.category]={name:t.category,results:[t]}):s[t.category].results.push(t))}),s},id:function(e,t){var s,e=e+1;return void 0!==t?(t=String.fromCharCode(97+t),b.verbose("Creating category result id",s=t+e)):b.verbose("Creating result id",s=e),s},results:function(){0===a.length&&(a=F("<div />").addClass(f.results).appendTo(v))}},inject:{result:function(e,t,s){b.verbose("Injecting result into results");s=(void 0!==s?a.children().eq(s).children(g.results).first():a).children(g.result).eq(t);b.verbose("Injecting results metadata",s),s.data(c.result,e)},id:function(e){b.debug("Injecting unique ids into results");var s=0,r=0;return"category"===d.type?F.each(e,function(e,t){0<t.results.length&&(r=0,F.each(t.results,function(e,t){void 0===t.id&&(t.id=b.create.id(r,s)),b.inject.result(t,r,s),r++}),s++)}):F.each(e,function(e,t){void 0===t.id&&(t.id=b.create.id(r)),b.inject.result(t,r),r++}),e}},save:{results:function(e){b.verbose("Saving current search results to metadata",e),v.data(c.results,e)}},write:{cache:function(e,t){var s=void 0!==v.data(c.cache)?v.data(c.cache):{};d.cache&&(b.verbose("Writing generated html to cache",e,t),s[e]=t,v.data(c.cache,s))}},addResults:function(e){if(E(d.onResultsAdd)&&!1===d.onResultsAdd.call(a,e))return b.debug("onResultsAdd callback cancelled default action"),!1;e?(a.html(e),b.refreshResults(),d.selectFirstResult&&b.select.firstResult(),b.showResults()):b.hideResults(function(){a.empty()})},showResults:function(e){e=E(e)?e:function(){},y||!b.is.visible()&&b.has.results()&&(b.can.transition()?(b.debug("Showing results with css animations"),a.transition({animation:d.transition+" in",debug:d.debug,verbose:d.verbose,silent:d.silent,duration:d.duration,onShow:function(){var e=v.find(g.result).eq(0);b.ensureVisible(e)},onComplete:function(){e()},queue:!0})):(b.debug("Showing results with javascript"),a.stop().fadeIn(d.duration,d.easing)),d.onResultsOpen.call(a))},hideResults:function(e){e=E(e)?e:function(){},b.is.visible()&&(b.can.transition()?(b.debug("Hiding results with css animations"),a.transition({animation:d.transition+" out",debug:d.debug,verbose:d.verbose,silent:d.silent,duration:d.duration,onComplete:function(){e()},queue:!0})):(b.debug("Hiding results with javascript"),a.stop().fadeOut(d.duration,d.easing)),d.onResultsClose.call(a))},generateResults:function(e){b.debug("Generating html from response",e);var t=d.templates[d.type],s=F.isPlainObject(e[i.results])&&!F.isEmptyObject(e[i.results]),r=Array.isArray(e[i.results])&&0<e[i.results].length,n="";return s||r?(0<d.maxResults&&(s?"standard"===d.type&&b.error(h.maxResults):e[i.results]=e[i.results].slice(0,d.maxResults)),E(t)?n=t(e,i,d.preserveHTML):b.error(h.noTemplate,!1)):d.showNoResults&&(n=b.displayMessage(h.noResults,"empty",h.noResultsHeader)),d.onResults.call(u,e),n},displayMessage:function(e,t,s){return b.debug("Displaying message",e,t=t||"standard",s),b.addResults(d.templates.message(e,t,s)),d.templates.message(e,t,s)},setting:function(e,t){if(F.isPlainObject(e))F.extend(!0,d,e);else{if(void 0===t)return d[e];d[e]=t}},internal:function(e,t){if(F.isPlainObject(e))F.extend(!0,b,e);else{if(void 0===t)return b[e];b[e]=t}},debug:function(){!d.silent&&d.debug&&(d.performance?b.performance.log(arguments):(b.debug=Function.prototype.bind.call(console.info,console,d.name+":"),b.debug.apply(console,arguments)))},verbose:function(){!d.silent&&d.verbose&&d.debug&&(d.performance?b.performance.log(arguments):(b.verbose=Function.prototype.bind.call(console.info,console,d.name+":"),b.verbose.apply(console,arguments)))},error:function(){d.silent||(b.error=Function.prototype.bind.call(console.error,console,d.name+":"),b.error.apply(console,arguments))},performance:{log:function(e){var t,s;d.performance&&(s=(t=Date.now())-(w||t),w=t,T.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:u,"Execution Time":s})),clearTimeout(b.performance.timer),b.performance.timer=setTimeout(b.performance.display,500)},display:function(){var e=d.name+":",s=0;w=!1,clearTimeout(b.performance.timer),F.each(T,function(e,t){s+=t["Execution Time"]}),e+=" "+s+"ms",C&&(e+=" '"+C+"'"),1<x.length&&(e+=" ("+x.length+")"),0<T.length&&(console.groupCollapsed(e),console.table?console.table(T):F.each(T,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),T=[]}},invoke:function(r,e,t){var n,i,s,a=l;return e=e||q,t=t||u,"string"==typeof r&&void 0!==a&&(r=r.split(/[ .]/),n=r.length-1,F.each(r,function(e,t){var s=e!==n?t+r[e+1].charAt(0).toUpperCase()+r[e+1].slice(1):r;if(F.isPlainObject(a[s])&&e!==n)a=a[s];else{if(void 0!==a[s])return i=a[s],!1;{if(!F.isPlainObject(a[t])||e===n)return void 0!==a[t]?i=a[t]:b.error(h.method,r),!1;a=a[t]}}})),E(i)?s=i.apply(t,e):void 0!==i&&(s=i),Array.isArray(S)?S.push(s):void 0!==S?S=[S,s]:void 0!==s&&(S=s),i}};j?(void 0===l&&b.initialize(),b.invoke(A)):(void 0!==l&&l.invoke("destroy"),b.initialize())}),void 0!==S?S:this},F.fn.search.settings={name:"Search",namespace:"search",silent:!1,debug:!1,verbose:!1,performance:!0,type:"standard",minCharacters:1,selectFirstResult:!1,apiSettings:!1,source:!1,searchOnFocus:!0,searchFields:["id","title","description"],displayField:"",fullTextSearch:"exact",ignoreDiacritics:!1,automatic:!0,hideDelay:0,searchDelay:200,maxResults:7,cache:!0,showNoResults:!0,preserveHTML:!0,transition:"scale",duration:200,easing:"easeOutExpo",onSelect:!1,onResultsAdd:!1,onSearchQuery:function(e){},onResults:function(e){},onResultsOpen:function(){},onResultsClose:function(){},className:{animating:"animating",active:"active",category:"category",empty:"empty",focus:"focus",hidden:"hidden",loading:"loading",results:"results",pressed:"down"},error:{source:"Cannot search. No source used, and Fomantic API module was not included",noResultsHeader:"No Results",noResults:"Your search returned no results",noTemplate:"A valid template name was not specified.",oldSearchSyntax:"searchFullText setting has been renamed fullTextSearch for consistency, please adjust your settings.",serverError:"There was an issue querying the server.",maxResults:"Results must be an array to use maxResults setting",method:"The method you called is not defined.",noNormalize:'"ignoreDiacritics" setting will be ignored. Browser does not support String().normalize(). You may consider including <https://cdn.jsdelivr.net/npm/unorm@1.4.1/lib/unorm.min.js> as a polyfill.'},metadata:{cache:"cache",results:"results",result:"result"},regExp:{escape:/[$()*+./?[\\\]^{|}-]/g,beginsWith:"(?:\\s|^)"},fields:{categories:"results",categoryName:"name",categoryResults:"results",description:"description",image:"image",price:"price",results:"results",title:"title",url:"url",action:"action",actionText:"text",actionURL:"url"},selector:{prompt:".prompt",searchButton:".search.button",results:".results",message:".results > .message",category:".category",result:".result",title:".title, .name"},templates:{escape:function(e,t){if(t)return e;var s={"<":"<",">":">",'"':""","'":"'","`":"`"};return/["&'<>`]/.test(e)?(e=e.replace(/&(?![\d#a-z]{1,12};)/gi,"&")).replace(/["'<>`]/g,function(e){return s[e]}):e},message:function(e,t,s){var r="";return void 0!==e&&void 0!==t&&(r+='<div class="message '+t+'">',s&&(r+='<div class="header">'+s+"</div>"),r=r+' <div class="description">'+e+"</div></div>"),r},category:function(e,s,r){var n="",i=F.fn.search.settings.templates.escape;return void 0!==e[s.categoryResults]&&(F.each(e[s.categoryResults],function(e,t){void 0!==t[s.results]&&0<t.results.length&&(n+='<div class="category">',void 0!==t[s.categoryName]&&(n+='<div class="name">'+i(t[s.categoryName],r)+"</div>"),n+='<div class="results">',F.each(t.results,function(e,t){n+=t[s.url]?'<a class="result" href="'+t[s.url].replace(/"/g,"")+'">':'<a class="result">',void 0!==t[s.image]&&(n+='<div class="image"> <img src="'+t[s.image].replace(/"/g,"")+'"></div>'),n+='<div class="content">',void 0!==t[s.price]&&(n+='<div class="price">'+i(t[s.price],r)+"</div>"),void 0!==t[s.title]&&(n+='<div class="title">'+i(t[s.title],r)+"</div>"),void 0!==t[s.description]&&(n+='<div class="description">'+i(t[s.description],r)+"</div>"),n+="</div></a>"}),n+="</div></div>")}),e[s.action]&&(n+=!1===s.actionURL?'<div class="action">'+i(e[s.action][s.actionText],r)+"</div>":'<a href="'+e[s.action][s.actionURL].replace(/"/g,"")+'" class="action">'+i(e[s.action][s.actionText],r)+"</a>"),n)},standard:function(e,s,r){var n="",i=F.fn.search.settings.templates.escape;return void 0!==e[s.results]&&(F.each(e[s.results],function(e,t){n+=t[s.url]?'<a class="result" href="'+t[s.url].replace(/"/g,"")+'">':'<a class="result">',void 0!==t[s.image]&&(n+='<div class="image"> <img src="'+t[s.image].replace(/"/g,"")+'"></div>'),n+='<div class="content">',void 0!==t[s.price]&&(n+='<div class="price">'+i(t[s.price],r)+"</div>"),void 0!==t[s.title]&&(n+='<div class="title">'+i(t[s.title],r)+"</div>"),void 0!==t[s.description]&&(n+='<div class="description">'+i(t[s.description],r)+"</div>"),n+="</div></a>"}),e[s.action]&&(n+=!1===s.actionURL?'<div class="action">'+i(e[s.action][s.actionText],r)+"</div>":'<a href="'+e[s.action][s.actionURL].replace(/"/g,"")+'" class="action">'+i(e[s.action][s.actionText],r)+"</a>"),n)}}},F.extend(F.easing,{easeOutExpo:function(e){return 1===e?1:1-Math.pow(2,-10*e)}})}(jQuery,window,document);
|
11
|
+
!function(F,k,D){"use strict";function E(e){return"function"==typeof e&&"number"!=typeof e.nodeType}k=void 0!==k&&k.Math===Math?k:globalThis,F.fn.search=function(R){var S,x=F(this),C=x.selector||"",w=Date.now(),T=[],A=R,j="string"==typeof A,q=[].slice.call(arguments,1);return x.each(function(){var d=F.isPlainObject(R)?F.extend(!0,{},F.fn.search.settings,R):F.extend({},F.fn.search.settings),f=d.className,c=d.metadata,r=d.regExp,i=d.fields,g=d.selector,h=d.error,e=d.namespace,n="."+e,t=e+"-module",v=F(this),p=v.find(g.prompt),s=v.find(g.searchButton),a=v.find(g.results),o=v.find(g.result),u=(v.find(g.category),this),l=v.data(t),m=!1,y=!1,b={initialize:function(){b.verbose("Initializing module"),b.get.settings(),b.determine.searchFields(),b.bind.events(),b.set.type(),b.create.results(),b.instantiate()},instantiate:function(){b.verbose("Storing instance of module",b),l=b,v.data(t,b)},destroy:function(){b.verbose("Destroying instance"),v.off(n).removeData(t)},refresh:function(){b.debug("Refreshing selector cache"),p=v.find(g.prompt),s=v.find(g.searchButton),v.find(g.category),a=v.find(g.results),o=v.find(g.result)},refreshResults:function(){a=v.find(g.results),o=v.find(g.result)},bind:{events:function(){b.verbose("Binding events to search"),d.automatic&&(v.on(b.get.inputEvent()+n,g.prompt,b.event.input),p.attr("autocomplete",b.is.chrome()?"fomantic-search":"off")),v.on("focus"+n,g.prompt,b.event.focus).on("blur"+n,g.prompt,b.event.blur).on("keydown"+n,g.prompt,b.handleKeyboard).on("click"+n,g.searchButton,b.query).on("mousedown"+n,g.results,b.event.result.mousedown).on("mouseup"+n,g.results,b.event.result.mouseup).on("click"+n,g.result,b.event.result.click)}},determine:{searchFields:function(){R&&void 0!==R.searchFields&&(d.searchFields=R.searchFields)}},event:{input:function(){d.searchDelay?(clearTimeout(b.timer),b.timer=setTimeout(function(){b.is.focused()&&b.query()},d.searchDelay)):b.query()},focus:function(){b.set.focus(),d.searchOnFocus&&b.has.minimumCharacters()&&b.query(function(){b.can.show()&&b.showResults()})},blur:function(e){function t(){b.cancel.query(),b.remove.focus(),b.timer=setTimeout(b.hideResults,d.hideDelay)}var s=D.activeElement===this;s||(y=!1,b.resultsClicked?(b.debug("Determining if user action caused search to close"),v.one("click.close"+n,g.results,function(e){b.is.inMessage(e)||m?p.trigger("focus"):(m=!1,b.is.animating()||b.is.hidden()||t())})):(b.debug("Input blurred without user action, closing results"),t()))},result:{mousedown:function(){b.resultsClicked=!0},mouseup:function(){b.resultsClicked=!1},click:function(e){b.debug("Search result selected");var t=F(this),s=t.find(g.title).eq(0),r=t.is("a[href]")?t:t.find("a[href]").eq(0),n=r.attr("href")||!1,i=r.attr("target")||!1,s=0<s.length&&s.text(),a=b.get.results(),t=t.data(c.result)||b.get.result(s,a),o=b.get.value();if(E(d.onSelect)&&!1===d.onSelect.call(u,t,a))return b.debug("Custom onSelect callback cancelled default select action"),void(m=!0);b.hideResults(),s&&b.get.value()===o&&b.set.value(s),n&&(e.preventDefault(),b.verbose("Opening search link found in result",r),"_blank"===i||e.ctrlKey?k.open(n):k.location.href=n)}}},ensureVisible:function(e){var t,s,r;0!==e.length&&(e=(t=e.position().top)+e.outerHeight(!0),s=a.scrollTop(),r=a.height(),t<0?a.scrollTop(s+t):r<e&&a.scrollTop(s+(e-r)))},handleKeyboard:function(e){var t,s=v.find(g.result),r=v.find(g.category),n=s.filter("."+f.active),i=s.index(n),a=s.length,n=0<n.length,o=e.which,c=13,u=38,l=40;if(o===27&&(b.is.visible()?b.hideResults():(b.verbose("Escape key pressed, blurring search field"),p.trigger("blur")),e.stopPropagation(),y=!0),b.is.visible())if(o===c){if(b.verbose("Enter key pressed, selecting active result"),0<s.filter("."+f.active).length)return b.event.result.click.call(s.filter("."+f.active),e),e.preventDefault(),!1}else o===u&&n?(b.verbose("Up key pressed, changing active result"),t=i-1<0?i:i-1,r.removeClass(f.active),s.removeClass(f.active).eq(t).addClass(f.active).closest(r).addClass(f.active),b.ensureVisible(s.eq(t)),e.preventDefault()):o===l&&(b.verbose("Down key pressed, changing active result"),t=a<=i+1?i:i+1,r.removeClass(f.active),s.removeClass(f.active).eq(t).addClass(f.active).closest(r).addClass(f.active),b.ensureVisible(s.eq(t)),e.preventDefault());else o===c&&(b.verbose("Enter key pressed, executing query"),b.query(),b.set.buttonPressed(),p.one("keyup",b.remove.buttonFocus))},setup:{api:function(r,n){var e={debug:d.debug,on:!1,cache:d.cache,action:"search",urlData:{query:r}};F.extend(!0,e,d.apiSettings,{onSuccess:function(e,t,s){b.parse.response.call(u,e,r),n(),d.apiSettings&&"function"==typeof d.apiSettings.onSuccess&&d.apiSettings.onSuccess.call(this,e,t,s)},onFailure:function(e,t,s){b.displayMessage(h.serverError),n(),d.apiSettings&&"function"==typeof d.apiSettings.onFailure&&d.apiSettings.onFailure.call(this,e,t,s)},onAbort:function(e,t,s){d.apiSettings&&"function"==typeof d.apiSettings.onAbort&&d.apiSettings.onAbort.call(this,e,t,s)},onError:function(e,t,s){b.error(),d.apiSettings&&"function"==typeof d.apiSettings.onError&&d.apiSettings.onError.call(this,e,t,s)}}),b.verbose("Setting up API request",e),v.api(e)}},can:{useAPI:function(){return void 0!==F.fn.api},show:function(){return b.is.focused()&&!b.is.visible()&&!b.is.empty()},transition:function(){return d.transition&&void 0!==F.fn.transition}},is:{animating:function(){return a.hasClass(f.animating)},chrome:function(){return!!k.chrome&&!k.StyleMedia},hidden:function(){return a.hasClass(f.hidden)},inMessage:function(e){var t;if(e.target)return t=F(e.target),F.contains(D.documentElement,e.target)&&0<t.closest(g.message).length},empty:function(){return""===a.html()},visible:function(){return 0<a.filter(":visible").length},focused:function(){return 0<p.filter(":focus").length}},get:{settings:function(){F.isPlainObject(R)&&R.searchFullText&&(d.fullTextSearch=R.searchFullText,b.error(d.error.oldSearchSyntax,u)),d.ignoreDiacritics&&!String.prototype.normalize&&(d.ignoreDiacritics=!1,b.error(h.noNormalize,u))},inputEvent:function(){var e=p[0];return void 0!==e&&void 0!==e.oninput?"input":void 0!==e&&void 0!==e.onpropertychange?"propertychange":"keyup"},value:function(){return p.val()},results:function(){return v.data(c.results)},result:function(s,e){var r=!1;return s=void 0!==s?s:b.get.value(),e=void 0!==e?e:b.get.results(),"category"===d.type?(b.debug("Finding result that matches",s),F.each(e,function(e,t){if(Array.isArray(t.results)&&(r=b.search.object(s,t.results)[0]))return!1})):(b.debug("Finding result in results object",s),r=b.search.object(s,e)[0]),r||!1}},select:{firstResult:function(){b.verbose("Selecting first result"),o.first().addClass(f.active)}},set:{focus:function(){v.addClass(f.focus)},loading:function(){v.addClass(f.loading)},value:function(e){b.verbose("Setting search input value",e),p.val(e)},type:function(e){e=e||d.type,f[e]&&v.addClass(f[e])},buttonPressed:function(){s.addClass(f.pressed)}},remove:{loading:function(){v.removeClass(f.loading)},focus:function(){v.removeClass(f.focus)},buttonPressed:function(){s.removeClass(f.pressed)},diacritics:function(e){return d.ignoreDiacritics?e.normalize("NFD").replace(/[\u0300-\u036F]/g,""):e}},query:function(e){e=E(e)?e:function(){};var t=b.get.value(),s=b.read.cache(t);e=e||function(){},b.has.minimumCharacters()?(s?(b.debug("Reading result from cache",t),b.save.results(s.results),b.addResults(s.html),b.inject.id(s.results),e()):(b.debug("Querying for",t),F.isPlainObject(d.source)||Array.isArray(d.source)?(b.search.local(t),e()):b.can.useAPI()?b.search.remote(t,e):(b.error(h.source),e())),d.onSearchQuery.call(u,t)):b.hideResults()},search:{local:function(e){var t,s=b.search.object(e,d.source);b.set.loading(),b.save.results(s),b.debug("Returned full local search results",s),0<d.maxResults&&(b.debug("Using specified max results",s),s=s.slice(0,d.maxResults)),"category"===d.type&&(s=b.create.categoryResults(s)),t=b.generateResults({results:s}),b.remove.loading(),b.addResults(t),b.inject.id(s),b.write.cache(e,{html:t,results:s})},remote:function(e,t){t=E(t)?t:function(){},v.api("is loading")&&v.api("abort"),b.setup.api(e,t),v.api("query")},object:function(n,e,t){n=b.remove.diacritics(String(n));function i(e,t){var s=-1===F.inArray(t,a),r=-1===F.inArray(t,c),n=-1===F.inArray(t,o);s&&r&&n&&e.push(t)}var a=[],o=[],c=[],s=n.replace(r.escape,"\\$&"),u=new RegExp(r.beginsWith+s,"i");if(e=e||d.source,t=void 0!==t?t:d.searchFields,Array.isArray(t)||(t=[t]),void 0===e||!1===e)return b.error(h.source),[];var l=t.length-1;return F.each(e,function(e,s){var r=[];F.each(t,function(e,t){if("string"==typeof s[t]||"number"==typeof s[t]){t="string"==typeof s[t]?b.remove.diacritics(s[t]):s[t].toString();if("all"===d.fullTextSearch){if(r.push(t),e<l)return!0;t=r.join(" ")}"all"!==d.fullTextSearch&&-1!==t.search(u)?i(a,s):"exact"===d.fullTextSearch&&b.exactSearch(n,t)||"some"===d.fullTextSearch&&b.wordSearch(n,t)||"all"===d.fullTextSearch&&b.wordSearch(n,t,!0)?i(o,s):!0===d.fullTextSearch&&b.fuzzySearch(n,t)&&i(c,s)}})}),F.merge(o,c),F.merge(a,o),a}},exactSearch:function(e,t){return e=e.toLowerCase(),-1<(t=t.toLowerCase()).indexOf(e)},wordSearch:function(e,t,s){for(var r=e.split(/\s+/),n=r.length,i=!1,a=0;a<n&&!(!(i=b.exactSearch(r[a],t))&&s||i&&!s);a++);return i},fuzzySearch:function(e,t){var s=t.length,r=e.length;if("string"!=typeof e)return!1;if(e=e.toLowerCase(),t=t.toLowerCase(),s<r)return!1;if(r===s)return e===t;for(var n=0,i=0;n<r;n++){for(var a=!1,o=e.charCodeAt(n);i<s;)if(t.charCodeAt(i++)===o){a=!0;break}if(!a)return!1}return!0},parse:{response:function(e,t){Array.isArray(e)&&((s={})[i.results]=e,e=s);var s=b.generateResults(e);b.verbose("Parsing server response",e),void 0!==e&&void 0!==t&&void 0!==e[i.results]&&(b.addResults(s),b.inject.id(e[i.results]),b.write.cache(t,{html:s,results:e[i.results]}),b.save.results(e[i.results]))}},cancel:{query:function(){b.can.useAPI()&&v.api("abort")}},has:{minimumCharacters:function(){return b.get.value().length>=d.minCharacters},results:function(){return 0!==a.length&&""!==a.html()}},clear:{cache:function(e){var t=v.data(c.cache);e?t&&t[e]&&(b.debug("Removing value from cache",e),delete t[e],v.data(c.cache,t)):(b.debug("Clearing cache",e),v.removeData(c.cache))}},read:{cache:function(e){var t=v.data(c.cache);return!!d.cache&&(b.verbose("Checking cache for generated html for query",e),"object"==typeof t&&void 0!==t[e]&&t[e])}},create:{categoryResults:function(e){var s={};return F.each(e,function(e,t){t.category&&(void 0===s[t.category]?(b.verbose("Creating new category of results",t.category),s[t.category]={name:t.category,results:[t]}):s[t.category].results.push(t))}),s},id:function(e,t){var s,e=e+1;return void 0!==t?(t=String.fromCharCode(97+t),b.verbose("Creating category result id",s=t+e)):b.verbose("Creating result id",s=e),s},results:function(){0===a.length&&(a=F("<div />").addClass(f.results).appendTo(v))}},inject:{result:function(e,t,s){b.verbose("Injecting result into results");s=(void 0!==s?a.children().eq(s).children(g.results).first():a).children(g.result).eq(t);b.verbose("Injecting results metadata",s),s.data(c.result,e)},id:function(e){b.debug("Injecting unique ids into results");var s=0,r=0;return"category"===d.type?F.each(e,function(e,t){0<t.results.length&&(r=0,F.each(t.results,function(e,t){void 0===t.id&&(t.id=b.create.id(r,s)),b.inject.result(t,r,s),r++}),s++)}):F.each(e,function(e,t){void 0===t.id&&(t.id=b.create.id(r)),b.inject.result(t,r),r++}),e}},save:{results:function(e){b.verbose("Saving current search results to metadata",e),v.data(c.results,e)}},write:{cache:function(e,t){var s=void 0!==v.data(c.cache)?v.data(c.cache):{};d.cache&&(b.verbose("Writing generated html to cache",e,t),s[e]=t,v.data(c.cache,s))}},addResults:function(e){if(E(d.onResultsAdd)&&!1===d.onResultsAdd.call(a,e))return b.debug("onResultsAdd callback cancelled default action"),!1;e?(a.html(e),b.refreshResults(),d.selectFirstResult&&b.select.firstResult(),b.showResults()):b.hideResults(function(){a.empty()})},showResults:function(e){e=E(e)?e:function(){},y||!b.is.visible()&&b.has.results()&&(b.can.transition()?(b.debug("Showing results with css animations"),a.transition({animation:d.transition+" in",debug:d.debug,verbose:d.verbose,silent:d.silent,duration:d.duration,onShow:function(){var e=v.find(g.result).eq(0);b.ensureVisible(e)},onComplete:function(){e()},queue:!0})):(b.debug("Showing results with javascript"),a.stop().fadeIn(d.duration,d.easing)),d.onResultsOpen.call(a))},hideResults:function(e){e=E(e)?e:function(){},b.is.visible()&&(b.can.transition()?(b.debug("Hiding results with css animations"),a.transition({animation:d.transition+" out",debug:d.debug,verbose:d.verbose,silent:d.silent,duration:d.duration,onComplete:function(){e()},queue:!0})):(b.debug("Hiding results with javascript"),a.stop().fadeOut(d.duration,d.easing)),d.onResultsClose.call(a))},generateResults:function(e){b.debug("Generating html from response",e);var t=d.templates[d.type],s=F.isPlainObject(e[i.results])&&!F.isEmptyObject(e[i.results]),r=Array.isArray(e[i.results])&&0<e[i.results].length,n="";return s||r?(0<d.maxResults&&(s?"standard"===d.type&&b.error(h.maxResults):e[i.results]=e[i.results].slice(0,d.maxResults)),E(t)?n=t(e,i,d.preserveHTML):b.error(h.noTemplate,!1)):d.showNoResults&&(n=b.displayMessage(h.noResults,"empty",h.noResultsHeader)),d.onResults.call(u,e),n},displayMessage:function(e,t,s){return b.debug("Displaying message",e,t=t||"standard",s),b.addResults(d.templates.message(e,t,s)),d.templates.message(e,t,s)},setting:function(e,t){if(F.isPlainObject(e))F.extend(!0,d,e);else{if(void 0===t)return d[e];d[e]=t}},internal:function(e,t){if(F.isPlainObject(e))F.extend(!0,b,e);else{if(void 0===t)return b[e];b[e]=t}},debug:function(){!d.silent&&d.debug&&(d.performance?b.performance.log(arguments):(b.debug=Function.prototype.bind.call(console.info,console,d.name+":"),b.debug.apply(console,arguments)))},verbose:function(){!d.silent&&d.verbose&&d.debug&&(d.performance?b.performance.log(arguments):(b.verbose=Function.prototype.bind.call(console.info,console,d.name+":"),b.verbose.apply(console,arguments)))},error:function(){d.silent||(b.error=Function.prototype.bind.call(console.error,console,d.name+":"),b.error.apply(console,arguments))},performance:{log:function(e){var t,s;d.performance&&(s=(t=Date.now())-(w||t),w=t,T.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:u,"Execution Time":s})),clearTimeout(b.performance.timer),b.performance.timer=setTimeout(b.performance.display,500)},display:function(){var e=d.name+":",s=0;w=!1,clearTimeout(b.performance.timer),F.each(T,function(e,t){s+=t["Execution Time"]}),e+=" "+s+"ms",C&&(e+=" '"+C+"'"),1<x.length&&(e+=" ("+x.length+")"),0<T.length&&(console.groupCollapsed(e),console.table?console.table(T):F.each(T,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),T=[]}},invoke:function(r,e,t){var n,i,s,a=l;return e=e||q,t=t||u,"string"==typeof r&&void 0!==a&&(r=r.split(/[ .]/),n=r.length-1,F.each(r,function(e,t){var s=e!==n?t+r[e+1].charAt(0).toUpperCase()+r[e+1].slice(1):r;if(F.isPlainObject(a[s])&&e!==n)a=a[s];else{if(void 0!==a[s])return i=a[s],!1;{if(!F.isPlainObject(a[t])||e===n)return void 0!==a[t]?i=a[t]:b.error(h.method,r),!1;a=a[t]}}})),E(i)?s=i.apply(t,e):void 0!==i&&(s=i),Array.isArray(S)?S.push(s):void 0!==S?S=[S,s]:void 0!==s&&(S=s),i}};j?(void 0===l&&b.initialize(),b.invoke(A)):(void 0!==l&&l.invoke("destroy"),b.initialize())}),void 0!==S?S:this},F.fn.search.settings={name:"Search",namespace:"search",silent:!1,debug:!1,verbose:!1,performance:!0,type:"standard",minCharacters:1,selectFirstResult:!1,apiSettings:!1,source:!1,searchOnFocus:!0,searchFields:["id","title","description"],displayField:"",fullTextSearch:"exact",ignoreDiacritics:!1,automatic:!0,hideDelay:0,searchDelay:200,maxResults:7,cache:!0,showNoResults:!0,preserveHTML:!0,transition:"scale",duration:200,easing:"easeOutExpo",onSelect:!1,onResultsAdd:!1,onSearchQuery:function(e){},onResults:function(e){},onResultsOpen:function(){},onResultsClose:function(){},className:{animating:"animating",active:"active",category:"category",empty:"empty",focus:"focus",hidden:"hidden",loading:"loading",results:"results",pressed:"down"},error:{source:"Cannot search. No source used, and Fomantic API module was not included",noResultsHeader:"No Results",noResults:"Your search returned no results",noTemplate:"A valid template name was not specified.",oldSearchSyntax:"searchFullText setting has been renamed fullTextSearch for consistency, please adjust your settings.",serverError:"There was an issue querying the server.",maxResults:"Results must be an array to use maxResults setting",method:"The method you called is not defined.",noNormalize:'"ignoreDiacritics" setting will be ignored. Browser does not support String().normalize(). You may consider including <https://cdn.jsdelivr.net/npm/unorm@1.4.1/lib/unorm.min.js> as a polyfill.'},metadata:{cache:"cache",results:"results",result:"result"},regExp:{escape:/[$()*+./?[\\\]^{|}-]/g,beginsWith:"(?:\\s|^)"},fields:{categories:"results",categoryName:"name",categoryResults:"results",description:"description",image:"image",price:"price",results:"results",title:"title",url:"url",action:"action",actionText:"text",actionURL:"url"},selector:{prompt:".prompt",searchButton:".search.button",results:".results",message:".results > .message",category:".category",result:".result",title:".title, .name"},templates:{escape:function(e,t){if(t)return e;var s={"<":"<",">":">",'"':""","'":"'","`":"`"};return/["&'<>`]/.test(e)?(e=e.replace(/&(?![\d#a-z]{1,12};)/gi,"&")).replace(/["'<>`]/g,function(e){return s[e]}):e},message:function(e,t,s){var r="";return void 0!==e&&void 0!==t&&(r+='<div class="message '+t+'">',s&&(r+='<div class="header">'+s+"</div>"),r=r+' <div class="description">'+e+"</div></div>"),r},category:function(e,s,r){var n="",i=F.fn.search.settings.templates.escape;return void 0!==e[s.categoryResults]&&(F.each(e[s.categoryResults],function(e,t){void 0!==t[s.results]&&0<t.results.length&&(n+='<div class="category">',void 0!==t[s.categoryName]&&(n+='<div class="name">'+i(t[s.categoryName],r)+"</div>"),n+='<div class="results">',F.each(t.results,function(e,t){n+=t[s.url]?'<a class="result" href="'+t[s.url].replace(/"/g,"")+'">':'<a class="result">',void 0!==t[s.image]&&(n+='<div class="image"> <img src="'+t[s.image].replace(/"/g,"")+'"></div>'),n+='<div class="content">',void 0!==t[s.price]&&(n+='<div class="price">'+i(t[s.price],r)+"</div>"),void 0!==t[s.title]&&(n+='<div class="title">'+i(t[s.title],r)+"</div>"),void 0!==t[s.description]&&(n+='<div class="description">'+i(t[s.description],r)+"</div>"),n+="</div></a>"}),n+="</div></div>")}),e[s.action]&&(n+=!1===s.actionURL?'<div class="action">'+i(e[s.action][s.actionText],r)+"</div>":'<a href="'+e[s.action][s.actionURL].replace(/"/g,"")+'" class="action">'+i(e[s.action][s.actionText],r)+"</a>"),n)},standard:function(e,s,r){var n="",i=F.fn.search.settings.templates.escape;return void 0!==e[s.results]&&(F.each(e[s.results],function(e,t){n+=t[s.url]?'<a class="result" href="'+t[s.url].replace(/"/g,"")+'">':'<a class="result">',void 0!==t[s.image]&&(n+='<div class="image"> <img src="'+t[s.image].replace(/"/g,"")+'"></div>'),n+='<div class="content">',void 0!==t[s.price]&&(n+='<div class="price">'+i(t[s.price],r)+"</div>"),void 0!==t[s.title]&&(n+='<div class="title">'+i(t[s.title],r)+"</div>"),void 0!==t[s.description]&&(n+='<div class="description">'+i(t[s.description],r)+"</div>"),n+="</div></a>"}),e[s.action]&&(n+=!1===s.actionURL?'<div class="action">'+i(e[s.action][s.actionText],r)+"</div>":'<a href="'+e[s.action][s.actionURL].replace(/"/g,"")+'" class="action">'+i(e[s.action][s.actionText],r)+"</a>"),n)}}},F.extend(F.easing,{easeOutExpo:function(e){return 1===e?1:1-Math.pow(2,-10*e)}})}(jQuery,window,document);
|
package/dist/components/shape.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* # Fomantic-UI 2.9.2-beta.
|
2
|
+
* # Fomantic-UI 2.9.2-beta.9+f3fb845 - Shape
|
3
3
|
* https://github.com/fomantic/Fomantic-UI/
|
4
4
|
*
|
5
5
|
*
|
@@ -116,33 +116,29 @@
|
|
116
116
|
module.set.active();
|
117
117
|
};
|
118
118
|
settings.onBeforeChange.call($nextSide[0]);
|
119
|
-
|
120
|
-
|
119
|
+
module.verbose('Starting CSS animation');
|
120
|
+
$module
|
121
|
+
.addClass(className.animating)
|
122
|
+
;
|
123
|
+
$sides
|
124
|
+
.css(propertyObject)
|
125
|
+
.one('transitionend', callback)
|
126
|
+
;
|
127
|
+
module.set.duration(settings.duration);
|
128
|
+
requestAnimationFrame(function () {
|
121
129
|
$module
|
122
130
|
.addClass(className.animating)
|
123
131
|
;
|
124
|
-
$
|
125
|
-
.
|
126
|
-
.one(module.get.transitionEvent(), callback)
|
132
|
+
$activeSide
|
133
|
+
.addClass(className.hidden)
|
127
134
|
;
|
128
|
-
|
129
|
-
requestAnimationFrame(function () {
|
130
|
-
$module
|
131
|
-
.addClass(className.animating)
|
132
|
-
;
|
133
|
-
$activeSide
|
134
|
-
.addClass(className.hidden)
|
135
|
-
;
|
136
|
-
});
|
137
|
-
} else {
|
138
|
-
callback();
|
139
|
-
}
|
135
|
+
});
|
140
136
|
},
|
141
137
|
|
142
138
|
queue: function (method) {
|
143
139
|
module.debug('Queueing animation of', method);
|
144
140
|
$sides
|
145
|
-
.one(
|
141
|
+
.one('transitionend', function () {
|
146
142
|
module.debug('Executing queued animation');
|
147
143
|
setTimeout(function () {
|
148
144
|
$module.shape(method);
|
@@ -412,24 +408,6 @@
|
|
412
408
|
},
|
413
409
|
},
|
414
410
|
|
415
|
-
transitionEvent: function () {
|
416
|
-
var
|
417
|
-
element = document.createElement('element'),
|
418
|
-
transitions = {
|
419
|
-
transition: 'transitionend',
|
420
|
-
OTransition: 'oTransitionEnd',
|
421
|
-
MozTransition: 'transitionend',
|
422
|
-
WebkitTransition: 'webkitTransitionEnd',
|
423
|
-
},
|
424
|
-
transition
|
425
|
-
;
|
426
|
-
for (transition in transitions) {
|
427
|
-
if (element.style[transition] !== undefined) {
|
428
|
-
return transitions[transition];
|
429
|
-
}
|
430
|
-
}
|
431
|
-
},
|
432
|
-
|
433
411
|
nextSide: function () {
|
434
412
|
return $activeSide.next(selector.side).length > 0
|
435
413
|
? $activeSide.next(selector.side)
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*
|
2
|
-
* # Fomantic UI - 2.9.2-beta.
|
2
|
+
* # Fomantic UI - 2.9.2-beta.9+f3fb845
|
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(
|
11
|
+
!function(Y,e,A){"use strict";e=void 0!==e&&e.Math===Math?e:globalThis,Y.fn.shape=function(v){var b,x=Y(this),y=Date.now(),C=[],S=v,w="string"==typeof S,W=[].slice.call(arguments,1);return x.each(function(){var i,n,t=x.selector||"",a=Y.isPlainObject(v)?Y.extend(!0,{},Y.fn.shape.settings,v):Y.extend({},Y.fn.shape.settings),e=a.namespace,r=a.selector,d=a.error,s=a.className,o="."+e,l="module-"+e,c=Y(this),u=c.find(">"+r.sides),f=u.find(">"+r.side),g=!1,h=this,p=c.data(l),m={initialize:function(){m.verbose("Initializing module for",h),m.set.defaultSide(),m.instantiate()},instantiate:function(){m.verbose("Storing instance of module",m),p=m,c.data(l,p)},destroy:function(){m.verbose("Destroying previous module for",h),c.removeData(l).off(o)},refresh:function(){m.verbose("Refreshing selector cache for",h),c=Y(h),u=Y(this).find(r.sides),f=Y(this).find(r.side)},repaint:function(){m.verbose("Forcing repaint event");(u[0]||A.createElement("div")).offsetWidth},animate:function(e,t){m.verbose("Animating box with properties",e),t=t||function(e){m.verbose("Executing animation callback"),void 0!==e&&e.stopPropagation(),m.reset(),m.set.active()},a.onBeforeChange.call(n[0]),m.verbose("Starting CSS animation"),c.addClass(s.animating),u.css(e).one("transitionend",t),m.set.duration(a.duration),requestAnimationFrame(function(){c.addClass(s.animating),i.addClass(s.hidden)})},queue:function(e){m.debug("Queueing animation of",e),u.one("transitionend",function(){m.debug("Executing queued animation"),setTimeout(function(){c.shape(e)},0)})},reset:function(){m.verbose("Animating states reset"),c.removeClass(s.animating).attr("style","").removeAttr("style"),u.attr("style","").removeAttr("style"),f.attr("style","").removeAttr("style").removeClass(s.hidden),n.removeClass(s.animating).attr("style","").removeAttr("style")},is:{complete:function(){return f.filter("."+s.active)[0]===n[0]},animating:function(){return c.hasClass(s.animating)},hidden:function(){return 0<c.closest(":hidden").length}},set:{defaultSide:function(){i=f.filter("."+a.className.active),n=0<i.next(r.side).length?i.next(r.side):f.first(),g=!1,m.verbose("Active side set to",i),m.verbose("Next side set to",n)},duration:function(e){e=e||a.duration,m.verbose("Setting animation duration",e="number"==typeof e?e+"ms":e),!a.duration&&0!==a.duration||u.add(f).css({"transition-duration":e})},currentStageSize:function(){var e=f.filter("."+a.className.active),t=e.outerWidth(!0),e=e.outerHeight(!0);c.css({width:t,height:e})},stageSize:function(){var e=c.clone().addClass(s.loading),t=e.find(">"+r.sides+">"+r.side),i=t.filter("."+a.className.active),t=g?t.eq(g):0<i.next(r.side).length?i.next(r.side):t.first(),n="next"===a.width?t.outerWidth(!0):"initial"===a.width?c.width():a.width,o="next"===a.height?t.outerHeight(!0):"initial"===a.height?c.height():a.height;i.removeClass(s.active),t.addClass(s.active),e.insertAfter(c),e.remove(),"auto"!==a.width&&(c.css("width",n+a.jitter),m.verbose("Specifying width during animation",n)),"auto"!==a.height&&(c.css("height",o+a.jitter),m.verbose("Specifying height during animation",o))},nextSide:function(e){g=e,n=f.filter(e),g=f.index(n),0===n.length&&(m.set.defaultSide(),m.error(d.side)),m.verbose("Next side manually set to",n)},active:function(){m.verbose("Setting new side to active",n),f.removeClass(s.active),n.addClass(s.active),a.onChange.call(n[0]),m.set.defaultSide()}},flip:{to:function(e,t){var i;m.is.hidden()?m.debug("Module not visible",n):!m.is.complete()||m.is.animating()||a.allowRepeats?(i=m.get.transform[e](),m.is.animating()?m.queue("flip "+e):(m.debug("Flipping "+e,n),m.set.stageSize(),m.stage[t](),m.animate(i))):m.debug("Side already visible",n)},up:function(){m.flip.to("up","above")},down:function(){m.flip.to("down","below")},left:function(){m.flip.to("left","left")},right:function(){m.flip.to("right","right")},over:function(){m.flip.to("over","behind")},back:function(){m.flip.to("back","behind")}},get:{transform:{up:function(){var e=i.outerHeight(!0)/2;return{transform:"translateY("+(n.outerHeight(!0)-e)+"px) translateZ(-"+e+"px) rotateX(-90deg)"}},down:function(){var e=i.outerHeight(!0)/2;return{transform:"translateY(-"+e+"px) translateZ(-"+e+"px) rotateX(90deg)"}},left:function(){var e=i.outerWidth(!0)/2;return{transform:"translateX("+(n.outerWidth(!0)-e)+"px) translateZ(-"+e+"px) rotateY(90deg)"}},right:function(){var e=i.outerWidth(!0)/2;return{transform:"translateX(-"+e+"px) translateZ(-"+e+"px) rotateY(-90deg)"}},over:function(){return{transform:"translateX("+-(i.outerWidth(!0)-n.outerWidth(!0))/2+"px) rotateY(180deg)"}},back:function(){return{transform:"translateX("+-(i.outerWidth(!0)-n.outerWidth(!0))/2+"px) rotateY(-180deg)"}}},nextSide:function(){return 0<i.next(r.side).length?i.next(r.side):f.first()}},stage:{above:function(){var e={origin:(i.outerHeight(!0)-n.outerHeight(!0))/2,depth:{active:n.outerHeight(!0)/2,next:i.outerHeight(!0)/2}};m.verbose("Setting the initial animation position as above",n,e),i.css({transform:"rotateX(0deg)"}),n.addClass(s.animating).css({top:e.origin+"px",transform:"rotateX(90deg) translateZ("+e.depth.next+"px) translateY(-"+e.depth.active+"px)"})},below:function(){var e={origin:(i.outerHeight(!0)-n.outerHeight(!0))/2,depth:{active:n.outerHeight(!0)/2,next:i.outerHeight(!0)/2}};m.verbose("Setting the initial animation position as below",n,e),i.css({transform:"rotateX(0deg)"}),n.addClass(s.animating).css({top:e.origin+"px",transform:"rotateX(-90deg) translateZ("+e.depth.next+"px) translateY("+e.depth.active+"px)"})},left:function(){var e=i.outerWidth(!0),t=n.outerWidth(!0),t={origin:(e-t)/2,depth:{active:t/2,next:e/2}};m.verbose("Setting the initial animation position as left",n,t),i.css({transform:"rotateY(0deg)"}),n.addClass(s.animating).css({left:t.origin+"px",transform:"rotateY(-90deg) translateZ("+t.depth.next+"px) translateX(-"+t.depth.active+"px)"})},right:function(){var e=i.outerWidth(!0),t=n.outerWidth(!0),t={origin:(e-t)/2,depth:{active:t/2,next:e/2}};m.verbose("Setting the initial animation position as right",n,t),i.css({transform:"rotateY(0deg)"}),n.addClass(s.animating).css({left:t.origin+"px",transform:"rotateY(90deg) translateZ("+t.depth.next+"px) translateX("+t.depth.active+"px)"})},behind:function(){var e=i.outerWidth(!0),t=n.outerWidth(!0),t={origin:(e-t)/2,depth:{active:t/2,next:e/2}};m.verbose("Setting the initial animation position as behind",n,t),i.css({transform:"rotateY(0deg)"}),n.addClass(s.animating).css({left:t.origin+"px",transform:"rotateY(-180deg)"})}},setting:function(e,t){if(m.debug("Changing setting",e,t),Y.isPlainObject(e))Y.extend(!0,a,e);else{if(void 0===t)return a[e];Y.isPlainObject(a[e])?Y.extend(!0,a[e],t):a[e]=t}},internal:function(e,t){if(Y.isPlainObject(e))Y.extend(!0,m,e);else{if(void 0===t)return m[e];m[e]=t}},debug:function(){!a.silent&&a.debug&&(a.performance?m.performance.log(arguments):(m.debug=Function.prototype.bind.call(console.info,console,a.name+":"),m.debug.apply(console,arguments)))},verbose:function(){!a.silent&&a.verbose&&a.debug&&(a.performance?m.performance.log(arguments):(m.verbose=Function.prototype.bind.call(console.info,console,a.name+":"),m.verbose.apply(console,arguments)))},error:function(){a.silent||(m.error=Function.prototype.bind.call(console.error,console,a.name+":"),m.error.apply(console,arguments))},performance:{log:function(e){var t,i;a.performance&&(i=(t=Date.now())-(y||t),y=t,C.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:h,"Execution Time":i})),clearTimeout(m.performance.timer),m.performance.timer=setTimeout(m.performance.display,500)},display:function(){var e=a.name+":",i=0;y=!1,clearTimeout(m.performance.timer),Y.each(C,function(e,t){i+=t["Execution Time"]}),e+=" "+i+"ms",t&&(e+=" '"+t+"'"),1<x.length&&(e+=" ("+x.length+")"),0<C.length&&(console.groupCollapsed(e),console.table?console.table(C):Y.each(C,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),C=[]}},invoke:function(n,e,t){var o,a,i,r,s=p;return e=e||W,t=t||h,"string"==typeof n&&void 0!==s&&(n=n.split(/[ .]/),o=n.length-1,Y.each(n,function(e,t){var i=e!==o?t+n[e+1].charAt(0).toUpperCase()+n[e+1].slice(1):n;if(Y.isPlainObject(s[i])&&e!==o)s=s[i];else{if(void 0!==s[i])return a=s[i],!1;{if(!Y.isPlainObject(s[t])||e===o)return void 0!==s[t]?a=s[t]:m.error(d.method,n),!1;s=s[t]}}})),"function"==typeof(r=a)&&"number"!=typeof r.nodeType?i=a.apply(t,e):void 0!==a&&(i=a),Array.isArray(b)?b.push(i):void 0!==b?b=[b,i]:void 0!==i&&(b=i),a}};w?(void 0===p&&m.initialize(),0<(e=c.find("input")).length?(e.trigger("blur"),setTimeout(function(){m.invoke(S)},150)):m.invoke(S)):(void 0!==p&&p.invoke("destroy"),m.initialize())}),void 0!==b?b:this},Y.fn.shape.settings={name:"Shape",silent:!1,debug:!1,verbose:!1,jitter:0,performance:!0,namespace:"shape",width:"initial",height:"initial",onBeforeChange:function(){},onChange:function(){},allowRepeats:!1,duration:!1,error:{side:"You tried to switch to a side that does not exist.",method:"The method you called is not defined"},className:{animating:"animating",hidden:"hidden",loading:"loading",active:"active"},selector:{sides:".sides",side:".side"}}}(jQuery,window,document);
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* # Fomantic-UI 2.9.2-beta.
|
2
|
+
* # Fomantic-UI 2.9.2-beta.9+f3fb845 - Sidebar
|
3
3
|
* https://github.com/fomantic/Fomantic-UI/
|
4
4
|
*
|
5
5
|
*
|
@@ -69,7 +69,6 @@
|
|
69
69
|
elementNamespace,
|
70
70
|
id,
|
71
71
|
currentScroll,
|
72
|
-
transitionEvent,
|
73
72
|
initialBodyMargin = '',
|
74
73
|
tempBodyMargin = '',
|
75
74
|
hadScrollbar = false,
|
@@ -84,8 +83,6 @@
|
|
84
83
|
|
85
84
|
module.create.id();
|
86
85
|
|
87
|
-
transitionEvent = module.get.transitionEvent();
|
88
|
-
|
89
86
|
// avoids locking rendering if initialized in onReady
|
90
87
|
if (settings.delaySetup) {
|
91
88
|
requestAnimationFrame(module.setup.layout);
|
@@ -492,13 +489,13 @@
|
|
492
489
|
};
|
493
490
|
transitionEnd = function (event) {
|
494
491
|
if (event.target === $transition[0]) {
|
495
|
-
$transition.off(
|
492
|
+
$transition.off('transitionend' + elementNamespace, transitionEnd);
|
496
493
|
module.remove.animating();
|
497
494
|
callback.call(element);
|
498
495
|
}
|
499
496
|
};
|
500
|
-
$transition.off(
|
501
|
-
$transition.on(
|
497
|
+
$transition.off('transitionend' + elementNamespace);
|
498
|
+
$transition.on('transitionend' + elementNamespace, transitionEnd);
|
502
499
|
requestAnimationFrame(animate);
|
503
500
|
if (settings.dimPage && !module.othersVisible()) {
|
504
501
|
requestAnimationFrame(dim);
|
@@ -532,7 +529,7 @@
|
|
532
529
|
};
|
533
530
|
transitionEnd = function (event) {
|
534
531
|
if (event.target === $transition[0]) {
|
535
|
-
$transition.off(
|
532
|
+
$transition.off('transitionend' + elementNamespace, transitionEnd);
|
536
533
|
module.remove.animating();
|
537
534
|
module.remove.closing();
|
538
535
|
module.remove.transition();
|
@@ -546,8 +543,8 @@
|
|
546
543
|
callback.call(element);
|
547
544
|
}
|
548
545
|
};
|
549
|
-
$transition.off(
|
550
|
-
$transition.on(
|
546
|
+
$transition.off('transitionend' + elementNamespace);
|
547
|
+
$transition.on('transitionend' + elementNamespace, transitionEnd);
|
551
548
|
requestAnimationFrame(animate);
|
552
549
|
},
|
553
550
|
|
@@ -722,23 +719,6 @@
|
|
722
719
|
|
723
720
|
return transition;
|
724
721
|
},
|
725
|
-
transitionEvent: function () {
|
726
|
-
var
|
727
|
-
element = document.createElement('element'),
|
728
|
-
transitions = {
|
729
|
-
transition: 'transitionend',
|
730
|
-
OTransition: 'oTransitionEnd',
|
731
|
-
MozTransition: 'transitionend',
|
732
|
-
WebkitTransition: 'webkitTransitionEnd',
|
733
|
-
},
|
734
|
-
transition
|
735
|
-
;
|
736
|
-
for (transition in transitions) {
|
737
|
-
if (element.style[transition] !== undefined) {
|
738
|
-
return transitions[transition];
|
739
|
-
}
|
740
|
-
}
|
741
|
-
},
|
742
722
|
},
|
743
723
|
has: {
|
744
724
|
scrollbar: function () {
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*
|
2
|
-
* # Fomantic UI - 2.9.2-beta.
|
2
|
+
* # Fomantic UI - 2.9.2-beta.9+f3fb845
|
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(R,I,z){"use strict";function V(e){return"function"==typeof e&&"number"!=typeof e.nodeType}I=void 0!==I&&I.Math===Math?I:globalThis,R.fn.sidebar=function(k){var w,e=R(this),A=R(I),E=R(z),F=R("body"),O=R("html"),P=R("head"),M=e.selector||"",B=Date.now(),H=[],L=k,j="string"==typeof L,D=[].slice.call(arguments,1);return e.each(function(){var o,r,e,s,a,l=R.isPlainObject(k)?R.extend(!0,{},R.fn.sidebar.settings,k):R.extend({},R.fn.sidebar.settings),i=l.selector,c=l.className,n=l.namespace,t=l.regExp,d=l.error,u="."+n,f="module-"+n,h=R(this),b=[I,z].indexOf(l.context)<0?E.find(l.context):F,g=b[0]===F[0],m=h.children(i.sidebar),v=(b.children(i.fixed),b.children(i.pusher)),p=this,y=h.data(f),x="",S="",C=!1,T={initialize:function(){T.debug("Initializing sidebar",k),T.create.id(),a=T.get.transitionEvent(),l.delaySetup?requestAnimationFrame(T.setup.layout):T.setup.layout(),requestAnimationFrame(function(){T.setup.cache()}),T.instantiate()},instantiate:function(){T.verbose("Storing instance of module",T),y=T,h.data(f,T)},create:{id:function(){e=(Math.random().toString(16)+"000000000").slice(2,10),r="."+e,T.verbose("Creating unique id for element",e)}},destroy:function(){T.verbose("Destroying previous module for",h),h.off(u).removeData(f),T.is.ios()&&T.remove.ios(),b.off(r),A.off(r),E.off(r)},event:{clickaway:function(e){var i;l.closable&&(i=0<v.find(e.target).length||v.is(e.target),e=b.is(e.target),i&&(T.verbose("User clicked on dimmed page"),T.hide()),e&&(T.verbose("User clicked on dimmable context (scaled out page)"),T.hide()))},touch:function(e){},containScroll:function(e){p.scrollTop<=0&&(p.scrollTop=1),p.scrollTop+p.offsetHeight>=p.scrollHeight&&(p.scrollTop=p.scrollHeight-p.offsetHeight-1)},scroll:function(e){0===R(e.target).closest(i.sidebar).length&&e.preventDefault()}},bind:{clickaway:function(){T.verbose("Adding clickaway events to context",b),b.on("click"+r,T.event.clickaway).on("touchend"+r,T.event.clickaway)},scrollLock:function(){l.scrollLock&&(T.debug("Disabling page scroll"),(C=T.has.scrollbar())&&(T.save.bodyMargin(),T.set.bodyMargin()),b.addClass(c.locked)),T.verbose("Adding events to contain sidebar scroll"),E.on("touchmove"+r,T.event.touch),h.on("scroll"+u,T.event.containScroll)}},unbind:{clickaway:function(){T.verbose("Removing clickaway events from context",b),b.off(r)},scrollLock:function(){T.verbose("Removing scroll lock from page"),C&&T.restore.bodyMargin(),b.removeClass(c.locked),E.off(r),h.off("scroll"+u)}},add:{inlineCSS:function(){var e=T.cache.width||h.outerWidth(),i=T.cache.height||h.outerHeight(),n=T.is.rtl(),t=T.get.direction(),i={left:e,right:-e,top:i,bottom:-i};n&&(T.verbose("RTL detected, flipping widths"),i.left=-e,i.right=e),n="<style>","left"===t||"right"===t?(T.debug("Adding CSS rules for animation distance",e),n+=" .ui.visible."+t+".sidebar ~ .fixed, .ui.visible."+t+".sidebar ~ .pusher { transform: translate3d("+i[t]+"px, 0, 0); }"):"top"!==t&&"bottom"!==t||(n+=" .ui.visible."+t+".sidebar ~ .fixed, .ui.visible."+t+".sidebar ~ .pusher { transform: translate3d(0, "+i[t]+"px, 0); }"),T.is.ie()&&("left"===t||"right"===t?(T.debug("Adding CSS rules for animation distance",e),n+=" body.pushable > .ui.visible."+t+".sidebar ~ .pusher::after { transform: translate3d("+i[t]+"px, 0, 0); }"):"top"!==t&&"bottom"!==t||(n+=" body.pushable > .ui.visible."+t+".sidebar ~ .pusher::after { transform: translate3d(0, "+i[t]+"px, 0); }"),n+=" body.pushable > .ui.visible.left.sidebar ~ .ui.visible.right.sidebar ~ .pusher::after, body.pushable > .ui.visible.right.sidebar ~ .ui.visible.left.sidebar ~ .pusher::after { transform: translate3d(0, 0, 0); }"),o=R(n+="</style>").appendTo(P),T.debug("Adding sizing css to head",o)}},refresh:function(){T.verbose("Refreshing selector cache"),b=[I,z].indexOf(l.context)<0?E.find(l.context):F,T.refreshSidebars(),v=b.children(i.pusher),b.children(i.fixed),T.clear.cache()},refreshSidebars:function(){T.verbose("Refreshing other sidebars"),m=b.children(i.sidebar)},repaint:function(){T.verbose("Forcing repaint event"),p.style.display="none";p.offsetHeight;p.scrollTop=p.scrollTop,p.style.display=""},setup:{cache:function(){T.cache={width:h.outerWidth(),height:h.outerHeight()}},layout:function(){0===b.children(i.pusher).length&&(T.debug("Adding wrapper element for sidebar"),T.error(d.pusher),v=R('<div class="pusher" />'),b.children().not(i.omitted).not(m).wrapAll(v),T.refresh()),0!==h.nextAll(i.pusher).length&&h.nextAll(i.pusher)[0]===v[0]||(T.debug("Moved sidebar to correct parent element"),T.error(d.movedSidebar,p),h.detach().prependTo(b),T.refresh()),T.clear.cache(),T.set.pushable(),T.set.direction()}},attachEvents:function(e,i){var n=R(e);i=V(T[i])?T[i]:T.toggle,0<n.length?(T.debug("Attaching sidebar events to element",e,i),n.on("click"+u,i)):T.error(d.notFound,e)},can:{leftBodyScrollbar:function(){return void 0===T.cache.leftBodyScrollbar&&(T.cache.leftBodyScrollbar=T.is.rtl()&&(T.is.iframe&&!T.is.firefox()||T.is.safari()||T.is.edge()||T.is.ie())),T.cache.leftBodyScrollbar}},save:{bodyMargin:function(){x=b.css((g?"margin-":"padding-")+(T.can.leftBodyScrollbar()?"left":"right"));var e=parseInt(x.replace(/[^\d.]/g,""),10),i=g?I.innerWidth-z.documentElement.clientWidth:b[0].offsetWidth-b[0].clientWidth;S=e+i}},show:function(e){if(e=V(e)?e:function(){},T.is.hidden())if(!1===l.onShow.call(p))T.verbose("Show callback returned false cancelling show");else{if(l.overlay&&(T.error(d.overlay),l.transition="overlay"),T.refresh(),T.othersActive())if(T.debug("Other sidebars currently visible"),l.exclusive){if("overlay"!==l.transition)return void T.hideOthers(T.show);T.hideOthers()}else l.transition="overlay";T.set.dimmerStyles(),T.pushPage(function(){e.call(p),l.onVisible.call(p)}),l.onChange.call(p)}else T.debug("Sidebar is already visible")},hide:function(e){e=V(e)?e:function(){},(T.is.visible()||T.is.animating())&&!1!==l.onHide.call(p)&&(T.debug("Hiding sidebar",e),T.refreshSidebars(),T.pullPage(function(){e.call(p),l.onHidden.call(p)}),l.onChange.call(p))},othersAnimating:function(){return 0<m.not(h).filter("."+c.animating).length},othersVisible:function(){return 0<m.not(h).filter("."+c.visible).length},othersActive:function(){return T.othersVisible()||T.othersAnimating()},hideOthers:function(e){var i=m.not(h).filter("."+c.visible),n=i.length,t=0;e=e||function(){},i.sidebar("hide",function(){++t===n&&e()})},toggle:function(){T.verbose("Determining toggled direction"),T.is.hidden()?T.show():T.hide()},pushPage:function(i){var e,n,t=T.get.transition(),o="overlay"===t||T.othersActive()?h:v;i=V(i)?i:function(){},l.returnScroll&&(s=(g?A:b).scrollTop()),"scale down"===l.transition&&T.scrollToTop(),T.bind.scrollLock(),T.set.transition(t),T.repaint(),t=function(){T.bind.clickaway(),T.add.inlineCSS(),T.set.animating(),T.set.visible()},e=function(){T.set.dimmed()},n=function(e){e.target===o[0]&&(o.off(a+r,n),T.remove.animating(),i.call(p))},o.off(a+r),o.on(a+r,n),requestAnimationFrame(t),l.dimPage&&!T.othersVisible()&&requestAnimationFrame(e)},pullPage:function(i){var e,n,t=T.get.transition(),o="overlay"===t||T.othersActive()?h:v;i=V(i)?i:function(){},T.verbose("Removing context push state",T.get.direction()),T.unbind.clickaway(),T.unbind.scrollLock(),e=function(){T.set.transition(t),T.set.animating(),l.dimPage&&!T.othersVisible()&&T.set.closing(),T.remove.visible()},n=function(e){e.target===o[0]&&(o.off(a+r,n),T.remove.animating(),T.remove.closing(),T.remove.transition(),T.remove.inlineCSS(),"scale down"!==t&&!l.returnScroll||T.scrollBack(),l.dimPage&&!T.othersVisible()&&v.removeClass(c.dimmed),i.call(p))},o.off(a+r),o.on(a+r,n),requestAnimationFrame(e)},scrollToTop:function(){T.verbose("Scrolling to top of page to avoid animation issues"),h.scrollTop(0),(g?A:b)[0].scrollTo(0,0)},scrollBack:function(){T.verbose("Scrolling back to original page position"),(g?A:b)[0].scrollTo(0,s)},clear:{cache:function(){T.verbose("Clearing cached dimensions"),T.cache={}}},set:{bodyMargin:function(){var n=T.can.leftBodyScrollbar()?"left":"right";b.css((g?"margin-":"padding-")+n,S+"px"),b.find(i.bodyFixed.replace("right",n)).each(function(){var e=R(this),i="fixed"===e.css("position")?"padding-"+n:n;e.css(i,"calc("+e.css(i)+" + "+S+"px)")})},dimmerStyles:function(){l.blurring?v.addClass(c.blurring):v.removeClass(c.blurring)},ios:function(){O.addClass(c.ios)},pushed:function(){b.addClass(c.pushed)},pushable:function(){b.addClass(c.pushable)},dimmed:function(){v.addClass(c.dimmed)},active:function(){h.addClass(c.active)},animating:function(){h.addClass(c.animating)},closing:function(){v.addClass(c.closing)},transition:function(e){e=e||T.get.transition(),h.addClass(e)},direction:function(e){e=e||T.get.direction(),h.addClass(c[e])},visible:function(){h.addClass(c.visible)},overlay:function(){h.addClass(c.overlay)}},remove:{inlineCSS:function(){T.debug("Removing inline css styles",o),o&&0<o.length&&o.remove()},ios:function(){O.removeClass(c.ios)},pushed:function(){b.removeClass(c.pushed)},pushable:function(){b.removeClass(c.pushable)},active:function(){h.removeClass(c.active)},animating:function(){h.removeClass(c.animating)},closing:function(){v.removeClass(c.closing)},transition:function(e){e=e||T.get.transition(),h.removeClass(e)},direction:function(e){e=e||T.get.direction(),h.removeClass(c[e])},visible:function(){h.removeClass(c.visible)},overlay:function(){h.removeClass(c.overlay)}},restore:{bodyMargin:function(){var n=T.can.leftBodyScrollbar()?"left":"right";b.css((g?"margin-":"padding-")+n,x),b.find(i.bodyFixed.replace("right",n)).each(function(){var e=R(this),i="fixed"===e.css("position")?"padding-"+n:n;e.css(i,"")})}},get:{direction:function(){return h.hasClass(c.top)?c.top:h.hasClass(c.right)?c.right:h.hasClass(c.bottom)?c.bottom:c.left},transition:function(){var e=T.get.direction(),e=T.is.mobile()?"auto"===l.mobileTransition?l.defaultTransition.mobile[e]:l.mobileTransition:"auto"===l.transition?l.defaultTransition.computer[e]:l.transition;return T.verbose("Determined transition",e),e},transitionEvent:function(){var e,i=z.createElement("element"),n={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(e in n)if(void 0!==i.style[e])return n[e]}},has:{scrollbar:function(){return g||"hidden"!==b.css("overflow-y")}},is:{safari:function(){return void 0===T.cache.isSafari&&(T.cache.isSafari=/constructor/i.test(I.HTMLElement)||!!I.ApplePaySession),T.cache.isSafari},edge:function(){return void 0===T.cache.isEdge&&(T.cache.isEdge=!!I.setImmediate&&!T.is.ie()),T.cache.isEdge},firefox:function(){return void 0===T.cache.isFirefox&&(T.cache.isFirefox=!!I.InstallTrigger),T.cache.isFirefox},iframe:function(){return!(self===top)},ie:function(){var e,i;return void 0===T.cache.isIE&&(e=!I.ActiveXObject&&"ActiveXObject"in I,i="ActiveXObject"in I,T.cache.isIE=e||i),T.cache.isIE},ios:function(){var e=navigator.userAgent,i=e.match(t.ios),n=e.match(t.mobileChrome);return!(!i||n)&&(T.verbose("Browser was found to be iOS",e),!0)},mobile:function(){var e=navigator.userAgent;return e.match(t.mobile)?(T.verbose("Browser was found to be mobile",e),!0):(T.verbose("Browser is not mobile, using regular transition",e),!1)},hidden:function(){return!T.is.visible()},visible:function(){return h.hasClass(c.visible)},open:function(){return T.is.visible()},closed:function(){return T.is.hidden()},vertical:function(){return h.hasClass(c.top)},animating:function(){return b.hasClass(c.animating)},rtl:function(){return void 0===T.cache.isRTL&&(T.cache.isRTL="rtl"===h.attr("dir")||"rtl"===h.css("direction")||"rtl"===F.attr("dir")||"rtl"===F.css("direction")||"rtl"===b.attr("dir")||"rtl"===b.css("direction")),T.cache.isRTL}},setting:function(e,i){if(T.debug("Changing setting",e,i),R.isPlainObject(e))R.extend(!0,l,e);else{if(void 0===i)return l[e];R.isPlainObject(l[e])?R.extend(!0,l[e],i):l[e]=i}},internal:function(e,i){if(R.isPlainObject(e))R.extend(!0,T,e);else{if(void 0===i)return T[e];T[e]=i}},debug:function(){!l.silent&&l.debug&&(l.performance?T.performance.log(arguments):(T.debug=Function.prototype.bind.call(console.info,console,l.name+":"),T.debug.apply(console,arguments)))},verbose:function(){!l.silent&&l.verbose&&l.debug&&(l.performance?T.performance.log(arguments):(T.verbose=Function.prototype.bind.call(console.info,console,l.name+":"),T.verbose.apply(console,arguments)))},error:function(){l.silent||(T.error=Function.prototype.bind.call(console.error,console,l.name+":"),T.error.apply(console,arguments))},performance:{log:function(e){var i,n;l.performance&&(n=(i=Date.now())-(B||i),B=i,H.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:p,"Execution Time":n})),clearTimeout(T.performance.timer),T.performance.timer=setTimeout(T.performance.display,500)},display:function(){var e=l.name+":",n=0;B=!1,clearTimeout(T.performance.timer),R.each(H,function(e,i){n+=i["Execution Time"]}),e+=" "+n+"ms",M&&(e+=" '"+M+"'"),0<H.length&&(console.groupCollapsed(e),console.table?console.table(H):R.each(H,function(e,i){console.log(i.Name+": "+i["Execution Time"]+"ms")}),console.groupEnd()),H=[]}},invoke:function(t,e,i){var o,r,n,s=y;return e=e||D,i=i||p,"string"==typeof t&&void 0!==s&&(t=t.split(/[ .]/),o=t.length-1,R.each(t,function(e,i){var n=e!==o?i+t[e+1].charAt(0).toUpperCase()+t[e+1].slice(1):t;if(R.isPlainObject(s[n])&&e!==o)s=s[n];else{if(void 0!==s[n])return r=s[n],!1;{if(!R.isPlainObject(s[i])||e===o)return void 0!==s[i]?r=s[i]:T.error(d.method,t),!1;s=s[i]}}})),V(r)?n=r.apply(i,e):void 0!==r&&(n=r),Array.isArray(w)?w.push(n):void 0!==w?w=[w,n]:void 0!==n&&(w=n),r}};j?(void 0===y&&T.initialize(),T.invoke(L)):(void 0!==y&&T.invoke("destroy"),T.initialize())}),void 0!==w?w:this},R.fn.sidebar.settings={name:"Sidebar",namespace:"sidebar",silent:!1,debug:!1,verbose:!1,performance:!0,transition:"auto",mobileTransition:"auto",defaultTransition:{computer:{left:"uncover",right:"uncover",top:"overlay",bottom:"overlay"},mobile:{left:"uncover",right:"uncover",top:"overlay",bottom:"overlay"}},context:"body",exclusive:!1,closable:!0,dimPage:!0,scrollLock:!1,returnScroll:!1,delaySetup:!1,onChange:function(){},onShow:function(){},onHide:function(){},onHidden:function(){},onVisible:function(){},className:{active:"active",animating:"animating",blurring:"blurring",closing:"closing",dimmed:"dimmed",ios:"ios",locked:"locked",pushable:"pushable",pushed:"pushed",right:"right",top:"top",left:"left",bottom:"bottom",visible:"visible"},selector:{bodyFixed:"> .ui.fixed.menu, > .ui.right.toast-container, > .ui.right.sidebar, > .ui.fixed.nag, > .ui.fixed.nag > .close",fixed:".fixed",omitted:"script, link, style, .ui.modal, .ui.dimmer, .ui.nag, .ui.fixed",pusher:".pusher",sidebar:".ui.sidebar"},regExp:{ios:/(iPad|iPhone|iPod)/g,mobileChrome:/(CriOS)/g,mobile:/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|Silk-Accelerated|(hpw|web)OS|Fennec|Minimo|Opera M(obi|ini)|Blazer|Dolfin|Dolphin|Skyfire|Zune/g},error:{method:"The method you called is not defined.",pusher:"Had to add pusher element. For optimal performance make sure body content is inside a pusher element",movedSidebar:"Had to move sidebar. For optimal performance make sure sidebar and pusher are direct children of your body tag",overlay:"The overlay setting is no longer supported, use animation: overlay",notFound:"There were no elements that matched the specified selector"}}}(jQuery,window,document);
|
11
|
+
!function(D,R,I){"use strict";function V(e){return"function"==typeof e&&"number"!=typeof e.nodeType}R=void 0!==R&&R.Math===Math?R:globalThis,D.fn.sidebar=function(T){var k,e=D(this),w=D(R),A=D(I),F=D("body"),O=D("html"),P=D("head"),E=e.selector||"",B=Date.now(),H=[],M=T,L="string"==typeof M,j=[].slice.call(arguments,1);return e.each(function(){var t,r,e,s,a=D.isPlainObject(T)?D.extend(!0,{},D.fn.sidebar.settings,T):D.extend({},D.fn.sidebar.settings),i=a.selector,l=a.className,n=a.namespace,o=a.regExp,c=a.error,d="."+n,u="module-"+n,f=D(this),h=[R,I].indexOf(a.context)<0?A.find(a.context):F,b=h[0]===F[0],g=f.children(i.sidebar),m=(h.children(i.fixed),h.children(i.pusher)),v=this,p=f.data(u),y="",x="",S=!1,C={initialize:function(){C.debug("Initializing sidebar",T),C.create.id(),a.delaySetup?requestAnimationFrame(C.setup.layout):C.setup.layout(),requestAnimationFrame(function(){C.setup.cache()}),C.instantiate()},instantiate:function(){C.verbose("Storing instance of module",C),p=C,f.data(u,C)},create:{id:function(){e=(Math.random().toString(16)+"000000000").slice(2,10),r="."+e,C.verbose("Creating unique id for element",e)}},destroy:function(){C.verbose("Destroying previous module for",f),f.off(d).removeData(u),C.is.ios()&&C.remove.ios(),h.off(r),w.off(r),A.off(r)},event:{clickaway:function(e){var i;a.closable&&(i=0<m.find(e.target).length||m.is(e.target),e=h.is(e.target),i&&(C.verbose("User clicked on dimmed page"),C.hide()),e&&(C.verbose("User clicked on dimmable context (scaled out page)"),C.hide()))},touch:function(e){},containScroll:function(e){v.scrollTop<=0&&(v.scrollTop=1),v.scrollTop+v.offsetHeight>=v.scrollHeight&&(v.scrollTop=v.scrollHeight-v.offsetHeight-1)},scroll:function(e){0===D(e.target).closest(i.sidebar).length&&e.preventDefault()}},bind:{clickaway:function(){C.verbose("Adding clickaway events to context",h),h.on("click"+r,C.event.clickaway).on("touchend"+r,C.event.clickaway)},scrollLock:function(){a.scrollLock&&(C.debug("Disabling page scroll"),(S=C.has.scrollbar())&&(C.save.bodyMargin(),C.set.bodyMargin()),h.addClass(l.locked)),C.verbose("Adding events to contain sidebar scroll"),A.on("touchmove"+r,C.event.touch),f.on("scroll"+d,C.event.containScroll)}},unbind:{clickaway:function(){C.verbose("Removing clickaway events from context",h),h.off(r)},scrollLock:function(){C.verbose("Removing scroll lock from page"),S&&C.restore.bodyMargin(),h.removeClass(l.locked),A.off(r),f.off("scroll"+d)}},add:{inlineCSS:function(){var e=C.cache.width||f.outerWidth(),i=C.cache.height||f.outerHeight(),n=C.is.rtl(),o=C.get.direction(),i={left:e,right:-e,top:i,bottom:-i};n&&(C.verbose("RTL detected, flipping widths"),i.left=-e,i.right=e),n="<style>","left"===o||"right"===o?(C.debug("Adding CSS rules for animation distance",e),n+=" .ui.visible."+o+".sidebar ~ .fixed, .ui.visible."+o+".sidebar ~ .pusher { transform: translate3d("+i[o]+"px, 0, 0); }"):"top"!==o&&"bottom"!==o||(n+=" .ui.visible."+o+".sidebar ~ .fixed, .ui.visible."+o+".sidebar ~ .pusher { transform: translate3d(0, "+i[o]+"px, 0); }"),C.is.ie()&&("left"===o||"right"===o?(C.debug("Adding CSS rules for animation distance",e),n+=" body.pushable > .ui.visible."+o+".sidebar ~ .pusher::after { transform: translate3d("+i[o]+"px, 0, 0); }"):"top"!==o&&"bottom"!==o||(n+=" body.pushable > .ui.visible."+o+".sidebar ~ .pusher::after { transform: translate3d(0, "+i[o]+"px, 0); }"),n+=" body.pushable > .ui.visible.left.sidebar ~ .ui.visible.right.sidebar ~ .pusher::after, body.pushable > .ui.visible.right.sidebar ~ .ui.visible.left.sidebar ~ .pusher::after { transform: translate3d(0, 0, 0); }"),t=D(n+="</style>").appendTo(P),C.debug("Adding sizing css to head",t)}},refresh:function(){C.verbose("Refreshing selector cache"),h=[R,I].indexOf(a.context)<0?A.find(a.context):F,C.refreshSidebars(),m=h.children(i.pusher),h.children(i.fixed),C.clear.cache()},refreshSidebars:function(){C.verbose("Refreshing other sidebars"),g=h.children(i.sidebar)},repaint:function(){C.verbose("Forcing repaint event"),v.style.display="none";v.offsetHeight;v.scrollTop=v.scrollTop,v.style.display=""},setup:{cache:function(){C.cache={width:f.outerWidth(),height:f.outerHeight()}},layout:function(){0===h.children(i.pusher).length&&(C.debug("Adding wrapper element for sidebar"),C.error(c.pusher),m=D('<div class="pusher" />'),h.children().not(i.omitted).not(g).wrapAll(m),C.refresh()),0!==f.nextAll(i.pusher).length&&f.nextAll(i.pusher)[0]===m[0]||(C.debug("Moved sidebar to correct parent element"),C.error(c.movedSidebar,v),f.detach().prependTo(h),C.refresh()),C.clear.cache(),C.set.pushable(),C.set.direction()}},attachEvents:function(e,i){var n=D(e);i=V(C[i])?C[i]:C.toggle,0<n.length?(C.debug("Attaching sidebar events to element",e,i),n.on("click"+d,i)):C.error(c.notFound,e)},can:{leftBodyScrollbar:function(){return void 0===C.cache.leftBodyScrollbar&&(C.cache.leftBodyScrollbar=C.is.rtl()&&(C.is.iframe&&!C.is.firefox()||C.is.safari()||C.is.edge()||C.is.ie())),C.cache.leftBodyScrollbar}},save:{bodyMargin:function(){y=h.css((b?"margin-":"padding-")+(C.can.leftBodyScrollbar()?"left":"right"));var e=parseInt(y.replace(/[^\d.]/g,""),10),i=b?R.innerWidth-I.documentElement.clientWidth:h[0].offsetWidth-h[0].clientWidth;x=e+i}},show:function(e){if(e=V(e)?e:function(){},C.is.hidden())if(!1===a.onShow.call(v))C.verbose("Show callback returned false cancelling show");else{if(a.overlay&&(C.error(c.overlay),a.transition="overlay"),C.refresh(),C.othersActive())if(C.debug("Other sidebars currently visible"),a.exclusive){if("overlay"!==a.transition)return void C.hideOthers(C.show);C.hideOthers()}else a.transition="overlay";C.set.dimmerStyles(),C.pushPage(function(){e.call(v),a.onVisible.call(v)}),a.onChange.call(v)}else C.debug("Sidebar is already visible")},hide:function(e){e=V(e)?e:function(){},(C.is.visible()||C.is.animating())&&!1!==a.onHide.call(v)&&(C.debug("Hiding sidebar",e),C.refreshSidebars(),C.pullPage(function(){e.call(v),a.onHidden.call(v)}),a.onChange.call(v))},othersAnimating:function(){return 0<g.not(f).filter("."+l.animating).length},othersVisible:function(){return 0<g.not(f).filter("."+l.visible).length},othersActive:function(){return C.othersVisible()||C.othersAnimating()},hideOthers:function(e){var i=g.not(f).filter("."+l.visible),n=i.length,o=0;e=e||function(){},i.sidebar("hide",function(){++o===n&&e()})},toggle:function(){C.verbose("Determining toggled direction"),C.is.hidden()?C.show():C.hide()},pushPage:function(i){var e,n,o=C.get.transition(),t="overlay"===o||C.othersActive()?f:m;i=V(i)?i:function(){},a.returnScroll&&(s=(b?w:h).scrollTop()),"scale down"===a.transition&&C.scrollToTop(),C.bind.scrollLock(),C.set.transition(o),C.repaint(),o=function(){C.bind.clickaway(),C.add.inlineCSS(),C.set.animating(),C.set.visible()},e=function(){C.set.dimmed()},n=function(e){e.target===t[0]&&(t.off("transitionend"+r,n),C.remove.animating(),i.call(v))},t.off("transitionend"+r),t.on("transitionend"+r,n),requestAnimationFrame(o),a.dimPage&&!C.othersVisible()&&requestAnimationFrame(e)},pullPage:function(i){var e,n,o=C.get.transition(),t="overlay"===o||C.othersActive()?f:m;i=V(i)?i:function(){},C.verbose("Removing context push state",C.get.direction()),C.unbind.clickaway(),C.unbind.scrollLock(),e=function(){C.set.transition(o),C.set.animating(),a.dimPage&&!C.othersVisible()&&C.set.closing(),C.remove.visible()},n=function(e){e.target===t[0]&&(t.off("transitionend"+r,n),C.remove.animating(),C.remove.closing(),C.remove.transition(),C.remove.inlineCSS(),"scale down"!==o&&!a.returnScroll||C.scrollBack(),a.dimPage&&!C.othersVisible()&&m.removeClass(l.dimmed),i.call(v))},t.off("transitionend"+r),t.on("transitionend"+r,n),requestAnimationFrame(e)},scrollToTop:function(){C.verbose("Scrolling to top of page to avoid animation issues"),f.scrollTop(0),(b?w:h)[0].scrollTo(0,0)},scrollBack:function(){C.verbose("Scrolling back to original page position"),(b?w:h)[0].scrollTo(0,s)},clear:{cache:function(){C.verbose("Clearing cached dimensions"),C.cache={}}},set:{bodyMargin:function(){var n=C.can.leftBodyScrollbar()?"left":"right";h.css((b?"margin-":"padding-")+n,x+"px"),h.find(i.bodyFixed.replace("right",n)).each(function(){var e=D(this),i="fixed"===e.css("position")?"padding-"+n:n;e.css(i,"calc("+e.css(i)+" + "+x+"px)")})},dimmerStyles:function(){a.blurring?m.addClass(l.blurring):m.removeClass(l.blurring)},ios:function(){O.addClass(l.ios)},pushed:function(){h.addClass(l.pushed)},pushable:function(){h.addClass(l.pushable)},dimmed:function(){m.addClass(l.dimmed)},active:function(){f.addClass(l.active)},animating:function(){f.addClass(l.animating)},closing:function(){m.addClass(l.closing)},transition:function(e){e=e||C.get.transition(),f.addClass(e)},direction:function(e){e=e||C.get.direction(),f.addClass(l[e])},visible:function(){f.addClass(l.visible)},overlay:function(){f.addClass(l.overlay)}},remove:{inlineCSS:function(){C.debug("Removing inline css styles",t),t&&0<t.length&&t.remove()},ios:function(){O.removeClass(l.ios)},pushed:function(){h.removeClass(l.pushed)},pushable:function(){h.removeClass(l.pushable)},active:function(){f.removeClass(l.active)},animating:function(){f.removeClass(l.animating)},closing:function(){m.removeClass(l.closing)},transition:function(e){e=e||C.get.transition(),f.removeClass(e)},direction:function(e){e=e||C.get.direction(),f.removeClass(l[e])},visible:function(){f.removeClass(l.visible)},overlay:function(){f.removeClass(l.overlay)}},restore:{bodyMargin:function(){var n=C.can.leftBodyScrollbar()?"left":"right";h.css((b?"margin-":"padding-")+n,y),h.find(i.bodyFixed.replace("right",n)).each(function(){var e=D(this),i="fixed"===e.css("position")?"padding-"+n:n;e.css(i,"")})}},get:{direction:function(){return f.hasClass(l.top)?l.top:f.hasClass(l.right)?l.right:f.hasClass(l.bottom)?l.bottom:l.left},transition:function(){var e=C.get.direction(),e=C.is.mobile()?"auto"===a.mobileTransition?a.defaultTransition.mobile[e]:a.mobileTransition:"auto"===a.transition?a.defaultTransition.computer[e]:a.transition;return C.verbose("Determined transition",e),e}},has:{scrollbar:function(){return b||"hidden"!==h.css("overflow-y")}},is:{safari:function(){return void 0===C.cache.isSafari&&(C.cache.isSafari=/constructor/i.test(R.HTMLElement)||!!R.ApplePaySession),C.cache.isSafari},edge:function(){return void 0===C.cache.isEdge&&(C.cache.isEdge=!!R.setImmediate&&!C.is.ie()),C.cache.isEdge},firefox:function(){return void 0===C.cache.isFirefox&&(C.cache.isFirefox=!!R.InstallTrigger),C.cache.isFirefox},iframe:function(){return!(self===top)},ie:function(){var e,i;return void 0===C.cache.isIE&&(e=!R.ActiveXObject&&"ActiveXObject"in R,i="ActiveXObject"in R,C.cache.isIE=e||i),C.cache.isIE},ios:function(){var e=navigator.userAgent,i=e.match(o.ios),n=e.match(o.mobileChrome);return!(!i||n)&&(C.verbose("Browser was found to be iOS",e),!0)},mobile:function(){var e=navigator.userAgent;return e.match(o.mobile)?(C.verbose("Browser was found to be mobile",e),!0):(C.verbose("Browser is not mobile, using regular transition",e),!1)},hidden:function(){return!C.is.visible()},visible:function(){return f.hasClass(l.visible)},open:function(){return C.is.visible()},closed:function(){return C.is.hidden()},vertical:function(){return f.hasClass(l.top)},animating:function(){return h.hasClass(l.animating)},rtl:function(){return void 0===C.cache.isRTL&&(C.cache.isRTL="rtl"===f.attr("dir")||"rtl"===f.css("direction")||"rtl"===F.attr("dir")||"rtl"===F.css("direction")||"rtl"===h.attr("dir")||"rtl"===h.css("direction")),C.cache.isRTL}},setting:function(e,i){if(C.debug("Changing setting",e,i),D.isPlainObject(e))D.extend(!0,a,e);else{if(void 0===i)return a[e];D.isPlainObject(a[e])?D.extend(!0,a[e],i):a[e]=i}},internal:function(e,i){if(D.isPlainObject(e))D.extend(!0,C,e);else{if(void 0===i)return C[e];C[e]=i}},debug:function(){!a.silent&&a.debug&&(a.performance?C.performance.log(arguments):(C.debug=Function.prototype.bind.call(console.info,console,a.name+":"),C.debug.apply(console,arguments)))},verbose:function(){!a.silent&&a.verbose&&a.debug&&(a.performance?C.performance.log(arguments):(C.verbose=Function.prototype.bind.call(console.info,console,a.name+":"),C.verbose.apply(console,arguments)))},error:function(){a.silent||(C.error=Function.prototype.bind.call(console.error,console,a.name+":"),C.error.apply(console,arguments))},performance:{log:function(e){var i,n;a.performance&&(n=(i=Date.now())-(B||i),B=i,H.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:v,"Execution Time":n})),clearTimeout(C.performance.timer),C.performance.timer=setTimeout(C.performance.display,500)},display:function(){var e=a.name+":",n=0;B=!1,clearTimeout(C.performance.timer),D.each(H,function(e,i){n+=i["Execution Time"]}),e+=" "+n+"ms",E&&(e+=" '"+E+"'"),0<H.length&&(console.groupCollapsed(e),console.table?console.table(H):D.each(H,function(e,i){console.log(i.Name+": "+i["Execution Time"]+"ms")}),console.groupEnd()),H=[]}},invoke:function(o,e,i){var t,r,n,s=p;return e=e||j,i=i||v,"string"==typeof o&&void 0!==s&&(o=o.split(/[ .]/),t=o.length-1,D.each(o,function(e,i){var n=e!==t?i+o[e+1].charAt(0).toUpperCase()+o[e+1].slice(1):o;if(D.isPlainObject(s[n])&&e!==t)s=s[n];else{if(void 0!==s[n])return r=s[n],!1;{if(!D.isPlainObject(s[i])||e===t)return void 0!==s[i]?r=s[i]:C.error(c.method,o),!1;s=s[i]}}})),V(r)?n=r.apply(i,e):void 0!==r&&(n=r),Array.isArray(k)?k.push(n):void 0!==k?k=[k,n]:void 0!==n&&(k=n),r}};L?(void 0===p&&C.initialize(),C.invoke(M)):(void 0!==p&&C.invoke("destroy"),C.initialize())}),void 0!==k?k:this},D.fn.sidebar.settings={name:"Sidebar",namespace:"sidebar",silent:!1,debug:!1,verbose:!1,performance:!0,transition:"auto",mobileTransition:"auto",defaultTransition:{computer:{left:"uncover",right:"uncover",top:"overlay",bottom:"overlay"},mobile:{left:"uncover",right:"uncover",top:"overlay",bottom:"overlay"}},context:"body",exclusive:!1,closable:!0,dimPage:!0,scrollLock:!1,returnScroll:!1,delaySetup:!1,onChange:function(){},onShow:function(){},onHide:function(){},onHidden:function(){},onVisible:function(){},className:{active:"active",animating:"animating",blurring:"blurring",closing:"closing",dimmed:"dimmed",ios:"ios",locked:"locked",pushable:"pushable",pushed:"pushed",right:"right",top:"top",left:"left",bottom:"bottom",visible:"visible"},selector:{bodyFixed:"> .ui.fixed.menu, > .ui.right.toast-container, > .ui.right.sidebar, > .ui.fixed.nag, > .ui.fixed.nag > .close",fixed:".fixed",omitted:"script, link, style, .ui.modal, .ui.dimmer, .ui.nag, .ui.fixed",pusher:".pusher",sidebar:".ui.sidebar"},regExp:{ios:/(iPad|iPhone|iPod)/g,mobileChrome:/(CriOS)/g,mobile:/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|Silk-Accelerated|(hpw|web)OS|Fennec|Minimo|Opera M(obi|ini)|Blazer|Dolfin|Dolphin|Skyfire|Zune/g},error:{method:"The method you called is not defined.",pusher:"Had to add pusher element. For optimal performance make sure body content is inside a pusher element",movedSidebar:"Had to move sidebar. For optimal performance make sure sidebar and pusher are direct children of your body tag",overlay:"The overlay setting is no longer supported, use animation: overlay",notFound:"There were no elements that matched the specified selector"}}}(jQuery,window,document);
|
package/dist/components/site.css
CHANGED
package/dist/components/site.js
CHANGED
package/dist/components/state.js
CHANGED
package/dist/components/step.css
CHANGED