fomantic-ui 2.9.1-beta.24 → 2.9.1-beta.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslint/eqeqeq-rule.js +18 -0
- package/.eslint/index.js +3 -0
- package/.eslintrc.js +1 -2
- package/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 +17 -17
- package/dist/components/api.min.js +2 -2
- package/dist/components/breadcrumb.css +1 -1
- package/dist/components/breadcrumb.min.css +1 -1
- package/dist/components/button.css +1 -1
- package/dist/components/button.min.css +1 -1
- package/dist/components/calendar.css +1 -1
- package/dist/components/calendar.js +18 -17
- package/dist/components/calendar.min.css +1 -1
- package/dist/components/calendar.min.js +2 -2
- package/dist/components/card.css +1 -1
- package/dist/components/card.min.css +1 -1
- package/dist/components/checkbox.css +1 -1
- package/dist/components/checkbox.js +11 -11
- package/dist/components/checkbox.min.css +1 -1
- package/dist/components/checkbox.min.js +2 -2
- package/dist/components/comment.css +1 -1
- package/dist/components/comment.min.css +1 -1
- package/dist/components/container.css +1 -1
- package/dist/components/container.min.css +1 -1
- package/dist/components/dimmer.css +1 -1
- package/dist/components/dimmer.js +9 -9
- package/dist/components/dimmer.min.css +1 -1
- package/dist/components/dimmer.min.js +2 -2
- package/dist/components/divider.css +1 -1
- package/dist/components/divider.min.css +1 -1
- package/dist/components/dropdown.css +1 -1
- package/dist/components/dropdown.js +103 -91
- 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 +5 -5
- 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 +10 -10
- 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 +77 -60
- 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 +4 -4
- 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 +5 -5
- package/dist/components/nag.min.css +1 -1
- package/dist/components/nag.min.js +2 -2
- package/dist/components/placeholder.css +1 -1
- package/dist/components/placeholder.min.css +1 -1
- package/dist/components/popup.css +1 -1
- package/dist/components/popup.js +39 -31
- package/dist/components/popup.min.css +1 -1
- package/dist/components/popup.min.js +2 -2
- package/dist/components/progress.css +1 -1
- package/dist/components/progress.js +12 -12
- package/dist/components/progress.min.css +1 -1
- package/dist/components/progress.min.js +2 -2
- package/dist/components/rail.css +1 -1
- package/dist/components/rail.min.css +1 -1
- package/dist/components/rating.css +1 -1
- package/dist/components/rating.js +6 -6
- package/dist/components/rating.min.css +1 -1
- package/dist/components/rating.min.js +2 -2
- package/dist/components/reset.css +1 -1
- package/dist/components/reset.min.css +1 -1
- package/dist/components/reveal.css +1 -1
- package/dist/components/reveal.min.css +1 -1
- package/dist/components/search.css +1 -1
- package/dist/components/search.js +16 -16
- 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 +5 -5
- 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 +13 -13
- 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 +4 -4
- package/dist/components/site.min.css +1 -1
- package/dist/components/site.min.js +2 -2
- package/dist/components/slider.js +50 -37
- package/dist/components/slider.min.js +2 -2
- package/dist/components/state.js +5 -5
- package/dist/components/state.min.js +2 -2
- package/dist/components/statistic.css +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 +8 -8
- package/dist/components/sticky.min.css +1 -1
- package/dist/components/sticky.min.js +2 -2
- package/dist/components/tab.css +1 -1
- package/dist/components/tab.js +17 -17
- package/dist/components/tab.min.css +1 -1
- package/dist/components/tab.min.js +2 -2
- package/dist/components/table.css +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 +4 -4
- 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 +8 -8
- package/dist/components/transition.min.css +1 -1
- package/dist/components/transition.min.js +2 -2
- package/dist/components/visibility.js +12 -12
- package/dist/components/visibility.min.js +2 -2
- package/dist/semantic.css +50 -50
- package/dist/semantic.js +462 -411
- package/dist/semantic.min.css +1 -1
- package/dist/semantic.min.js +2 -2
- package/package.json +1 -1
- package/src/definitions/behaviors/api.js +16 -16
- package/src/definitions/behaviors/form.js +76 -59
- package/src/definitions/behaviors/state.js +4 -4
- package/src/definitions/behaviors/visibility.js +11 -11
- package/src/definitions/globals/site.js +3 -3
- package/src/definitions/modules/accordion.js +3 -3
- package/src/definitions/modules/calendar.js +17 -16
- package/src/definitions/modules/checkbox.js +10 -10
- package/src/definitions/modules/dimmer.js +8 -8
- package/src/definitions/modules/dropdown.js +102 -90
- package/src/definitions/modules/embed.js +4 -4
- package/src/definitions/modules/flyout.js +9 -9
- package/src/definitions/modules/modal.js +3 -3
- package/src/definitions/modules/nag.js +4 -4
- package/src/definitions/modules/popup.js +38 -30
- package/src/definitions/modules/progress.js +11 -11
- package/src/definitions/modules/rating.js +5 -5
- package/src/definitions/modules/search.js +15 -15
- package/src/definitions/modules/shape.js +4 -4
- package/src/definitions/modules/sidebar.js +12 -12
- package/src/definitions/modules/slider.js +49 -36
- package/src/definitions/modules/sticky.js +7 -7
- package/src/definitions/modules/tab.js +16 -16
- package/src/definitions/modules/toast.js +3 -3
- package/src/definitions/modules/transition.js +7 -7
- package/tasks/admin/components/init.js +1 -1
- package/tasks/admin/components/update.js +1 -1
- package/tasks/admin/distributions/create.js +4 -5
- package/tasks/admin/distributions/init.js +1 -1
- package/tasks/admin/distributions/update.js +1 -1
- package/tasks/config/project/config.js +2 -2
- package/tasks/config/project/install.js +8 -8
- package/tasks/config/project/release.js +1 -1
- package/tasks/config/tasks.js +2 -2
- package/tasks/docs/metadata.js +1 -1
- package/tasks/install.js +2 -2
- package/test/modules/module.spec.js +1 -1
@@ -1,5 +1,5 @@
|
|
1
1
|
/*
|
2
|
-
* # Fomantic UI - 2.9.1-beta.
|
2
|
+
* # Fomantic UI - 2.9.1-beta.25+bbe4e58
|
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(A,e,T){"use strict";e=e!==T&&e.Math===Math?e:globalThis,A.fn.rating=function(f){var v,p=A(this),b=p.selector||"",h=Date.now(),y=[],C=f,x="string"==typeof C,R=[].slice.call(arguments,1);return p.each(function(){var e,a=A.isPlainObject(f)?A.extend(!0,{},A.fn.rating.settings,f):A.extend({},A.fn.rating.settings),n=a.namespace,o=a.className,t=a.metadata,i=a.selector,r=a.cssVars,s="."+n,l="module-"+n,c=this,u=A(this).data(l),d=A(this),g=d.find(i.icon),m={initialize:function(){m.verbose("Initializing rating module",a),0===g.length&&m.setup.layout(),a.interactive&&!m.is.disabled()?m.enable():m.disable(),m.set.initialLoad(),m.set.rating(m.get.initialRating()),m.remove.initialLoad(),m.instantiate()},instantiate:function(){m.verbose("Instantiating module",a),u=m,d.data(l,m)},destroy:function(){m.verbose("Destroying previous instance",u),m.remove.events(),d.removeData(l)},refresh:function(){g=d.find(i.icon)},setup:{layout:function(){var e=m.get.maxRating(),n=m.get.icon(),e=A.fn.rating.settings.templates.icon(e,n);m.debug("Generating icon html dynamically"),d.html(e),m.refresh()}},event:{mouseenter:function(){var e=A(this);e.nextAll().removeClass(o.selected),d.addClass(o.selected),e.addClass(o.selected).prevAll().addClass(o.selected)},mouseleave:function(){d.removeClass(o.selected),g.removeClass(o.selected)},click:function(){var e=A(this),n=m.get.rating(),e=g.index(e)+1;("auto"
|
11
|
+
!function(A,e,T){"use strict";e=e!==T&&e.Math===Math?e:globalThis,A.fn.rating=function(f){var v,p=A(this),b=p.selector||"",h=Date.now(),y=[],C=f,x="string"==typeof C,R=[].slice.call(arguments,1);return p.each(function(){var e,a=A.isPlainObject(f)?A.extend(!0,{},A.fn.rating.settings,f):A.extend({},A.fn.rating.settings),n=a.namespace,o=a.className,t=a.metadata,i=a.selector,r=a.cssVars,s="."+n,l="module-"+n,c=this,u=A(this).data(l),d=A(this),g=d.find(i.icon),m={initialize:function(){m.verbose("Initializing rating module",a),0===g.length&&m.setup.layout(),a.interactive&&!m.is.disabled()?m.enable():m.disable(),m.set.initialLoad(),m.set.rating(m.get.initialRating()),m.remove.initialLoad(),m.instantiate()},instantiate:function(){m.verbose("Instantiating module",a),u=m,d.data(l,m)},destroy:function(){m.verbose("Destroying previous instance",u),m.remove.events(),d.removeData(l)},refresh:function(){g=d.find(i.icon)},setup:{layout:function(){var e=m.get.maxRating(),n=m.get.icon(),e=A.fn.rating.settings.templates.icon(e,n);m.debug("Generating icon html dynamically"),d.html(e),m.refresh()}},event:{mouseenter:function(){var e=A(this);e.nextAll().removeClass(o.selected),d.addClass(o.selected),e.addClass(o.selected).prevAll().addClass(o.selected)},mouseleave:function(){d.removeClass(o.selected),g.removeClass(o.selected)},click:function(){var e=A(this),n=m.get.rating(),e=g.index(e)+1;("auto"===a.clearable?1===g.length:a.clearable)&&n===e?m.clearRating():m.set.rating(e)}},clearRating:function(){m.debug("Clearing current rating"),m.set.rating(0)},bind:{events:function(){m.verbose("Binding events"),d.on("mouseenter"+s,i.icon,m.event.mouseenter).on("mouseleave"+s,i.icon,m.event.mouseleave).on("click"+s,i.icon,m.event.click)}},remove:{events:function(){m.verbose("Removing events"),d.off(s)},initialLoad:function(){e=!1}},enable:function(){m.debug("Setting rating to interactive mode"),m.bind.events(),d.removeClass(o.disabled)},disable:function(){m.debug("Setting rating to read-only mode"),m.remove.events(),d.addClass(o.disabled)},is:{initialLoad:function(){return e},disabled:function(){return d.hasClass(o.disabled)}},get:{icon:function(){var e=d.data(t.icon);return e&&d.removeData(t.icon),e||a.icon},initialRating:function(){return d.data(t.rating)!==T?(d.removeData(t.rating),d.data(t.rating)):a.initialRating},maxRating:function(){return d.data(t.maxRating)!==T?(d.removeData(t.maxRating),d.data(t.maxRating)):a.maxRating},rating:function(){var e=g.filter("."+o.active).length;return m.verbose("Current rating retrieved",e),e}},set:{rating:function(e){var n=Math.floor(0<=e-1?e-1:0),n=g.eq(n),t=e<=1?n:n.next(),i=e%1*100;d.removeClass(o.selected),g.removeClass(o.selected).removeClass(o.active).removeClass(o.partiallyActive),0<e&&(m.verbose("Setting current rating to",e),n.prevAll().addBack().addClass(o.active),n.next()&&e%1!=0&&(t.addClass(o.partiallyActive).addClass(o.active),t.css(r.filledCustomPropName,i+"%"),"transparent"===t.css("backgroundColor")&&t.removeClass(o.partiallyActive).removeClass(o.active))),m.is.initialLoad()||a.onRate.call(c,e)},initialLoad:function(){e=!0}},setting:function(e,n){if(m.debug("Changing setting",e,n),A.isPlainObject(e))A.extend(!0,a,e);else{if(n===T)return a[e];A.isPlainObject(a[e])?A.extend(!0,a[e],n):a[e]=n}},internal:function(e,n){if(A.isPlainObject(e))A.extend(!0,m,e);else{if(n===T)return m[e];m[e]=n}},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 n,t;a.performance&&(t=(n=Date.now())-(h||n),h=n,y.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:c,"Execution Time":t})),clearTimeout(m.performance.timer),m.performance.timer=setTimeout(m.performance.display,500)},display:function(){var e=a.name+":",t=0;h=!1,clearTimeout(m.performance.timer),A.each(y,function(e,n){t+=n["Execution Time"]}),e+=" "+t+"ms",b&&(e+=" '"+b+"'"),1<p.length&&(e+=" ("+p.length+")"),(console.group!==T||console.table!==T)&&0<y.length&&(console.groupCollapsed(e),console.table?console.table(y):A.each(y,function(e,n){console.log(n.Name+": "+n["Execution Time"]+"ms")}),console.groupEnd()),y=[]}},invoke:function(i,e,n){var a,o,t,r,s=u;return e=e||R,n=n||c,"string"==typeof i&&s!==T&&(i=i.split(/[ .]/),a=i.length-1,A.each(i,function(e,n){var t=e!==a?n+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(A.isPlainObject(s[t])&&e!==a)s=s[t];else{if(s[t]!==T)return o=s[t],!1;{if(!A.isPlainObject(s[n])||e===a)return s[n]!==T&&(o=s[n]),!1;s=s[n]}}})),"function"==typeof(r=o)&&"number"!=typeof r.nodeType?t=o.apply(n,e):o!==T&&(t=o),Array.isArray(v)?v.push(t):v!==T?v=[v,t]:t!==T&&(v=t),o}};x?(u===T&&m.initialize(),m.invoke(C)):(u!==T&&u.invoke("destroy"),m.initialize())}),v!==T?v:this},A.fn.rating.settings={name:"Rating",namespace:"rating",icon:"star",silent:!1,debug:!1,verbose:!1,performance:!0,initialRating:0,interactive:!0,maxRating:4,clearable:"auto",fireOnInit:!1,onRate:function(e){},error:{method:"The method you called is not defined",noMaximum:"No maximum rating specified. Cannot generate HTML automatically"},metadata:{rating:"rating",maxRating:"maxRating",icon:"icon"},className:{active:"active",disabled:"disabled",selected:"selected",loading:"loading",partiallyActive:"partial"},cssVars:{filledCustomPropName:"--full"},selector:{icon:".icon"},templates:{deQuote:function(e,n){return String(e).replace(/"/g,n?""":"")},icon:function(e,n){for(var t=1,i="",a=A.fn.rating.settings.templates.deQuote;t<=e;)i+='<i class="'+a(n)+' icon"></i>',t++;return i}}}}(jQuery,window,void document);
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* # Fomantic-UI 2.9.1-beta.
|
2
|
+
* # Fomantic-UI 2.9.1-beta.25+bbe4e58 - Search
|
3
3
|
* https://github.com/fomantic/Fomantic-UI/
|
4
4
|
*
|
5
5
|
*
|
@@ -237,7 +237,7 @@
|
|
237
237
|
if (href) {
|
238
238
|
event.preventDefault();
|
239
239
|
module.verbose('Opening search link found in result', $link);
|
240
|
-
if (target
|
240
|
+
if (target === '_blank' || event.ctrlKey) {
|
241
241
|
window.open(href);
|
242
242
|
} else {
|
243
243
|
window.location.href = href;
|
@@ -289,7 +289,7 @@
|
|
289
289
|
newIndex
|
290
290
|
;
|
291
291
|
// search shortcuts
|
292
|
-
if (keyCode
|
292
|
+
if (keyCode === keys.escape) {
|
293
293
|
if (!module.is.visible()) {
|
294
294
|
module.verbose('Escape key pressed, blurring search field');
|
295
295
|
$prompt.trigger('blur');
|
@@ -300,7 +300,7 @@
|
|
300
300
|
resultsDismissed = true;
|
301
301
|
}
|
302
302
|
if (module.is.visible()) {
|
303
|
-
if (keyCode
|
303
|
+
if (keyCode === keys.enter) {
|
304
304
|
module.verbose('Enter key pressed, selecting active result');
|
305
305
|
if ($result.filter('.' + className.active).length > 0) {
|
306
306
|
module.event.result.click.call($result.filter('.' + className.active), event);
|
@@ -308,7 +308,7 @@
|
|
308
308
|
|
309
309
|
return false;
|
310
310
|
}
|
311
|
-
} else if (keyCode
|
311
|
+
} else if (keyCode === keys.upArrow && hasActiveResult) {
|
312
312
|
module.verbose('Up key pressed, changing active result');
|
313
313
|
newIndex = currentIndex - 1 < 0
|
314
314
|
? currentIndex
|
@@ -325,7 +325,7 @@
|
|
325
325
|
;
|
326
326
|
module.ensureVisible($result.eq(newIndex));
|
327
327
|
event.preventDefault();
|
328
|
-
} else if (keyCode
|
328
|
+
} else if (keyCode === keys.downArrow) {
|
329
329
|
module.verbose('Down key pressed, changing active result');
|
330
330
|
newIndex = currentIndex + 1 >= resultSize
|
331
331
|
? currentIndex
|
@@ -345,7 +345,7 @@
|
|
345
345
|
}
|
346
346
|
} else {
|
347
347
|
// query shortcuts
|
348
|
-
if (keyCode
|
348
|
+
if (keyCode === keys.enter) {
|
349
349
|
module.verbose('Enter key pressed, executing query');
|
350
350
|
module.query();
|
351
351
|
module.set.buttonPressed();
|
@@ -596,7 +596,7 @@
|
|
596
596
|
module.debug('Using specified max results', results);
|
597
597
|
results = results.slice(0, settings.maxResults);
|
598
598
|
}
|
599
|
-
if (settings.type
|
599
|
+
if (settings.type === 'category') {
|
600
600
|
results = module.create.categoryResults(results);
|
601
601
|
}
|
602
602
|
searchHTML = module.generateResults({
|
@@ -634,9 +634,9 @@
|
|
634
634
|
// avoid duplicates when pushing results
|
635
635
|
addResult = function (array, result) {
|
636
636
|
var
|
637
|
-
notResult = $.inArray(result, results)
|
638
|
-
notFuzzyResult = $.inArray(result, fuzzyResults)
|
639
|
-
notExactResults = $.inArray(result, exactResults)
|
637
|
+
notResult = $.inArray(result, results) === -1,
|
638
|
+
notFuzzyResult = $.inArray(result, fuzzyResults) === -1,
|
639
|
+
notExactResults = $.inArray(result, exactResults) === -1
|
640
640
|
;
|
641
641
|
if (notResult && notFuzzyResult && notExactResults) {
|
642
642
|
array.push(result);
|
@@ -782,7 +782,7 @@
|
|
782
782
|
html = $results.html()
|
783
783
|
;
|
784
784
|
|
785
|
-
return html
|
785
|
+
return html !== '';
|
786
786
|
},
|
787
787
|
},
|
788
788
|
|
@@ -1052,7 +1052,7 @@
|
|
1052
1052
|
if (isProperObject || isProperArray) {
|
1053
1053
|
if (settings.maxResults > 0) {
|
1054
1054
|
if (isProperObject) {
|
1055
|
-
if (settings.type
|
1055
|
+
if (settings.type === 'standard') {
|
1056
1056
|
module.error(error.maxResults);
|
1057
1057
|
}
|
1058
1058
|
} else {
|
@@ -1190,17 +1190,17 @@
|
|
1190
1190
|
query = query.split(/[ .]/);
|
1191
1191
|
maxDepth = query.length - 1;
|
1192
1192
|
$.each(query, function (depth, value) {
|
1193
|
-
var camelCaseValue = depth
|
1193
|
+
var camelCaseValue = depth !== maxDepth
|
1194
1194
|
? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)
|
1195
1195
|
: query
|
1196
1196
|
;
|
1197
|
-
if ($.isPlainObject(object[camelCaseValue]) && (depth
|
1197
|
+
if ($.isPlainObject(object[camelCaseValue]) && (depth !== maxDepth)) {
|
1198
1198
|
object = object[camelCaseValue];
|
1199
1199
|
} else if (object[camelCaseValue] !== undefined) {
|
1200
1200
|
found = object[camelCaseValue];
|
1201
1201
|
|
1202
1202
|
return false;
|
1203
|
-
} else if ($.isPlainObject(object[value]) && (depth
|
1203
|
+
} else if ($.isPlainObject(object[value]) && (depth !== maxDepth)) {
|
1204
1204
|
object = object[value];
|
1205
1205
|
} else if (object[value] !== undefined) {
|
1206
1206
|
found = object[value];
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*
|
2
|
-
* # Fomantic UI - 2.9.1-beta.
|
2
|
+
* # Fomantic UI - 2.9.1-beta.25+bbe4e58
|
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(k,F,E,D){"use strict";function O(e){return"function"==typeof e&&"number"!=typeof e.nodeType}F=F!==D&&F.Math===Math?F:globalThis,k.fn.search=function(R){var S,x=k(this),C=x.selector||"",w=Date.now(),T=[],A=R,j="string"==typeof A,q=[].slice.call(arguments,1);return x.each(function(){var l=k.isPlainObject(R)?k.extend(!0,{},k.fn.search.settings,R):k.extend({},k.fn.search.settings),d=l.className,c=l.metadata,n=l.regExp,i=l.fields,f=l.selector,g=l.error,e=l.namespace,r="."+e,t=e+"-module",p=k(this),h=p.find(f.prompt),s=p.find(f.searchButton),a=p.find(f.results),o=p.find(f.result),u=(p.find(f.category),this),m=p.data(t),v=!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),m=b,p.data(t,b)},destroy:function(){b.verbose("Destroying instance"),p.off(r).removeData(t)},refresh:function(){b.debug("Refreshing selector cache"),h=p.find(f.prompt),s=p.find(f.searchButton),p.find(f.category),a=p.find(f.results),o=p.find(f.result)},refreshResults:function(){a=p.find(f.results),o=p.find(f.result)},bind:{events:function(){b.verbose("Binding events to search"),l.automatic&&(p.on(b.get.inputEvent()+r,f.prompt,b.event.input),h.attr("autocomplete",b.is.chrome()?"fomantic-search":"off")),p.on("focus"+r,f.prompt,b.event.focus).on("blur"+r,f.prompt,b.event.blur).on("keydown"+r,f.prompt,b.handleKeyboard).on("click"+r,f.searchButton,b.query).on("mousedown"+r,f.results,b.event.result.mousedown).on("mouseup"+r,f.results,b.event.result.mouseup).on("click"+r,f.result,b.event.result.click)}},determine:{searchFields:function(){R&&R.searchFields!==D&&(l.searchFields=R.searchFields)}},event:{input:function(){l.searchDelay?(clearTimeout(b.timer),b.timer=setTimeout(function(){b.is.focused()&&b.query()},l.searchDelay)):b.query()},focus:function(){b.set.focus(),l.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,l.hideDelay)}var s=E.activeElement===this;s||(y=!1,b.resultsClicked?(b.debug("Determining if user action caused search to close"),p.one("click.close"+r,f.results,function(e){b.is.inMessage(e)||v?h.trigger("focus"):(v=!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=k(this),s=t.find(f.title).eq(0),n=t.is("a[href]")?t:t.find("a[href]").eq(0),r=n.attr("href")||!1,i=n.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(O(l.onSelect)&&!1===l.onSelect.call(u,t,a))return b.debug("Custom onSelect callback cancelled default select action"),void(v=!0);b.hideResults(),s&&b.get.value()===o&&b.set.value(s),r&&(e.preventDefault(),b.verbose("Opening search link found in result",n),"_blank"==i||e.ctrlKey?F.open(r):F.location.href=r)}}},ensureVisible:function(e){var t,s,n;0!==e.length&&(e=(t=e.position().top)+e.outerHeight(!0),s=a.scrollTop(),n=a.height(),t<0?a.scrollTop(s+t):n<e&&a.scrollTop(s+(e-n)))},handleKeyboard:function(e){var t,s=p.find(f.result),n=p.find(f.category),r=s.filter("."+d.active),i=s.index(r),a=s.length,r=0<r.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"),h.trigger("blur")),e.stopPropagation(),y=!0),b.is.visible())if(o==c){if(b.verbose("Enter key pressed, selecting active result"),0<s.filter("."+d.active).length)return b.event.result.click.call(s.filter("."+d.active),e),e.preventDefault(),!1}else o==u&&r?(b.verbose("Up key pressed, changing active result"),t=i-1<0?i:i-1,n.removeClass(d.active),s.removeClass(d.active).eq(t).addClass(d.active).closest(n).addClass(d.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,n.removeClass(d.active),s.removeClass(d.active).eq(t).addClass(d.active).closest(n).addClass(d.active),b.ensureVisible(s.eq(t)),e.preventDefault());else o==c&&(b.verbose("Enter key pressed, executing query"),b.query(),b.set.buttonPressed(),h.one("keyup",b.remove.buttonFocus))},setup:{api:function(n,r){var e={debug:l.debug,on:!1,cache:l.cache,action:"search",urlData:{query:n}};k.extend(!0,e,l.apiSettings,{onSuccess:function(e,t,s){b.parse.response.call(u,e,n),r(),l.apiSettings&&"function"==typeof l.apiSettings.onSuccess&&l.apiSettings.onSuccess.call(this,e,t,s)},onFailure:function(e,t,s){b.displayMessage(g.serverError),r(),l.apiSettings&&"function"==typeof l.apiSettings.onFailure&&l.apiSettings.onFailure.call(this,e,t,s)},onAbort:function(e,t,s){l.apiSettings&&"function"==typeof l.apiSettings.onAbort&&l.apiSettings.onAbort.call(this,e,t,s)},onError:function(e,t,s){b.error(),l.apiSettings&&"function"==typeof l.apiSettings.onError&&l.apiSettings.onError.call(this,e,t,s)}}),b.verbose("Setting up API request",e),p.api(e)}},can:{useAPI:function(){return k.fn.api!==D},show:function(){return b.is.focused()&&!b.is.visible()&&!b.is.empty()},transition:function(){return l.transition&&k.fn.transition!==D&&p.transition("is supported")}},is:{animating:function(){return a.hasClass(d.animating)},chrome:function(){return!!F.chrome&&!F.StyleMedia},hidden:function(){return a.hasClass(d.hidden)},inMessage:function(e){var t;if(e.target)return t=k(e.target),k.contains(E.documentElement,e.target)&&0<t.closest(f.message).length},empty:function(){return""===a.html()},visible:function(){return 0<a.filter(":visible").length},focused:function(){return 0<h.filter(":focus").length}},get:{settings:function(){k.isPlainObject(R)&&R.searchFullText&&(l.fullTextSearch=R.searchFullText,b.error(l.error.oldSearchSyntax,u)),l.ignoreDiacritics&&!String.prototype.normalize&&(l.ignoreDiacritics=!1,b.error(g.noNormalize,u))},inputEvent:function(){var e=h[0];return e!==D&&e.oninput!==D?"input":e!==D&&e.onpropertychange!==D?"propertychange":"keyup"},value:function(){return h.val()},results:function(){return p.data(c.results)},result:function(s,e){var n=!1;return s=s!==D?s:b.get.value(),e=e!==D?e:b.get.results(),"category"===l.type?(b.debug("Finding result that matches",s),k.each(e,function(e,t){if(Array.isArray(t.results)&&(n=b.search.object(s,t.results)[0]))return!1})):(b.debug("Finding result in results object",s),n=b.search.object(s,e)[0]),n||!1}},select:{firstResult:function(){b.verbose("Selecting first result"),o.first().addClass(d.active)}},set:{focus:function(){p.addClass(d.focus)},loading:function(){p.addClass(d.loading)},value:function(e){b.verbose("Setting search input value",e),h.val(e)},type:function(e){e=e||l.type,d[e]&&p.addClass(d[e])},buttonPressed:function(){s.addClass(d.pressed)}},remove:{loading:function(){p.removeClass(d.loading)},focus:function(){p.removeClass(d.focus)},buttonPressed:function(){s.removeClass(d.pressed)},diacritics:function(e){return l.ignoreDiacritics?e.normalize("NFD").replace(/[\u0300-\u036F]/g,""):e}},query:function(e){e=O(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),k.isPlainObject(l.source)||Array.isArray(l.source)?(b.search.local(t),e()):b.can.useAPI()?b.search.remote(t,e):(b.error(g.source),e())),l.onSearchQuery.call(u,t)):b.hideResults()},search:{local:function(e){var t,s=b.search.object(e,l.source);b.set.loading(),b.save.results(s),b.debug("Returned full local search results",s),0<l.maxResults&&(b.debug("Using specified max results",s),s=s.slice(0,l.maxResults)),"category"==l.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=O(t)?t:function(){},p.api("is loading")&&p.api("abort"),b.setup.api(e,t),p.api("query")},object:function(r,t,e){r=b.remove.diacritics(String(r));function i(e,t){var s=-1==k.inArray(t,a),n=-1==k.inArray(t,c),r=-1==k.inArray(t,o);s&&n&&r&&e.push(t)}var a=[],o=[],c=[],s=r.replace(n.escape,"\\$&"),u=new RegExp(n.beginsWith+s,"i");return t=t||l.source,e=e!==D?e:l.searchFields,Array.isArray(e)||(e=[e]),t===D||!1===t?(b.error(g.source),[]):(k.each(e,function(e,n){k.each(t,function(e,t){var s;"string"!=typeof t[n]&&"number"!=typeof t[n]||(-1!==(s="string"==typeof t[n]?b.remove.diacritics(t[n]):t[n].toString()).search(u)?i(a,t):"exact"===l.fullTextSearch&&b.exactSearch(r,s)?i(o,t):!0===l.fullTextSearch&&b.fuzzySearch(r,s)&&i(c,t))})}),k.merge(o,c),k.merge(a,o),a)}},exactSearch:function(e,t){return e=e.toLowerCase(),-1<(t=t.toLowerCase()).indexOf(e)},fuzzySearch:function(e,t){var s=t.length,n=e.length;if("string"!=typeof e)return!1;if(e=e.toLowerCase(),t=t.toLowerCase(),s<n)return!1;if(n===s)return e===t;for(var r=0,i=0;r<n;r++){for(var a=!1,o=e.charCodeAt(r);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),e!==D&&t!==D&&e[i.results]!==D&&(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()&&p.api("abort")}},has:{minimumCharacters:function(){return b.get.value().length>=l.minCharacters},results:function(){return 0!==a.length&&""!=a.html()}},clear:{cache:function(e){var t=p.data(c.cache);e?t&&t[e]&&(b.debug("Removing value from cache",e),delete t[e],p.data(c.cache,t)):(b.debug("Clearing cache",e),p.removeData(c.cache))}},read:{cache:function(e){var t=p.data(c.cache);return!!l.cache&&(b.verbose("Checking cache for generated html for query",e),"object"==typeof t&&t[e]!==D&&t[e])}},create:{categoryResults:function(e){var s={};return k.each(e,function(e,t){t.category&&(s[t.category]===D?(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 t!==D?(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=k("<div />").addClass(d.results).appendTo(p))}},inject:{result:function(e,t,s){b.verbose("Injecting result into results");s=(s!==D?a.children().eq(s).children(f.results).first():a).children(f.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,n=0;return"category"===l.type?k.each(e,function(e,t){0<t.results.length&&(n=0,k.each(t.results,function(e,t){t.id===D&&(t.id=b.create.id(n,s)),b.inject.result(t,n,s),n++}),s++)}):k.each(e,function(e,t){t.id===D&&(t.id=b.create.id(n)),b.inject.result(t,n),n++}),e}},save:{results:function(e){b.verbose("Saving current search results to metadata",e),p.data(c.results,e)}},write:{cache:function(e,t){var s=p.data(c.cache)!==D?p.data(c.cache):{};l.cache&&(b.verbose("Writing generated html to cache",e,t),s[e]=t,p.data(c.cache,s))}},addResults:function(e){if(O(l.onResultsAdd)&&!1===l.onResultsAdd.call(a,e))return b.debug("onResultsAdd callback cancelled default action"),!1;e?(a.html(e),b.refreshResults(),l.selectFirstResult&&b.select.firstResult(),b.showResults()):b.hideResults(function(){a.empty()})},showResults:function(e){e=O(e)?e:function(){},y||!b.is.visible()&&b.has.results()&&(b.can.transition()?(b.debug("Showing results with css animations"),a.transition({animation:l.transition+" in",debug:l.debug,verbose:l.verbose,silent:l.silent,duration:l.duration,onShow:function(){var e=p.find(f.result).eq(0);b.ensureVisible(e)},onComplete:function(){e()},queue:!0})):(b.debug("Showing results with javascript"),a.stop().fadeIn(l.duration,l.easing)),l.onResultsOpen.call(a))},hideResults:function(e){e=O(e)?e:function(){},b.is.visible()&&(b.can.transition()?(b.debug("Hiding results with css animations"),a.transition({animation:l.transition+" out",debug:l.debug,verbose:l.verbose,silent:l.silent,duration:l.duration,onComplete:function(){e()},queue:!0})):(b.debug("Hiding results with javascript"),a.stop().fadeOut(l.duration,l.easing)),l.onResultsClose.call(a))},generateResults:function(e){b.debug("Generating html from response",e);var t=l.templates[l.type],s=k.isPlainObject(e[i.results])&&!k.isEmptyObject(e[i.results]),n=Array.isArray(e[i.results])&&0<e[i.results].length,r="";return s||n?(0<l.maxResults&&(s?"standard"==l.type&&b.error(g.maxResults):e[i.results]=e[i.results].slice(0,l.maxResults)),O(t)?r=t(e,i,l.preserveHTML):b.error(g.noTemplate,!1)):l.showNoResults&&(r=b.displayMessage(g.noResults,"empty",g.noResultsHeader)),l.onResults.call(u,e),r},displayMessage:function(e,t,s){return b.debug("Displaying message",e,t=t||"standard",s),b.addResults(l.templates.message(e,t,s)),l.templates.message(e,t,s)},setting:function(e,t){if(k.isPlainObject(e))k.extend(!0,l,e);else{if(t===D)return l[e];l[e]=t}},internal:function(e,t){if(k.isPlainObject(e))k.extend(!0,b,e);else{if(t===D)return b[e];b[e]=t}},debug:function(){!l.silent&&l.debug&&(l.performance?b.performance.log(arguments):(b.debug=Function.prototype.bind.call(console.info,console,l.name+":"),b.debug.apply(console,arguments)))},verbose:function(){!l.silent&&l.verbose&&l.debug&&(l.performance?b.performance.log(arguments):(b.verbose=Function.prototype.bind.call(console.info,console,l.name+":"),b.verbose.apply(console,arguments)))},error:function(){l.silent||(b.error=Function.prototype.bind.call(console.error,console,l.name+":"),b.error.apply(console,arguments))},performance:{log:function(e){var t,s;l.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=l.name+":",s=0;w=!1,clearTimeout(b.performance.timer),k.each(T,function(e,t){s+=t["Execution Time"]}),e+=" "+s+"ms",C&&(e+=" '"+C+"'"),1<x.length&&(e+=" ("+x.length+")"),(console.group!==D||console.table!==D)&&0<T.length&&(console.groupCollapsed(e),console.table?console.table(T):k.each(T,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),T=[]}},invoke:function(n,e,t){var r,i,s,a=m;return e=e||q,t=t||u,"string"==typeof n&&a!==D&&(n=n.split(/[ .]/),r=n.length-1,k.each(n,function(e,t){var s=e!=r?t+n[e+1].charAt(0).toUpperCase()+n[e+1].slice(1):n;if(k.isPlainObject(a[s])&&e!=r)a=a[s];else{if(a[s]!==D)return i=a[s],!1;{if(!k.isPlainObject(a[t])||e==r)return a[t]!==D&&(i=a[t]),!1;a=a[t]}}})),O(i)?s=i.apply(t,e):i!==D&&(s=i),Array.isArray(S)?S.push(s):S!==D?S=[S,s]:s!==D&&(S=s),i}};j?(m===D&&b.initialize(),b.invoke(A)):(m!==D&&m.invoke("destroy"),b.initialize())}),S!==D?S:this},k.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 Semantic API module was not included",noResultsHeader:"No Results",noResults:"Your search returned no results",logging:"Error in debug logging, exiting.",noEndpoint:"No search endpoint was specified",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 n="";return e!==D&&t!==D&&(n+='<div class="message '+t+'">',s&&(n+='<div class="header">'+s+"</div>"),n=n+' <div class="description">'+e+"</div></div>"),n},category:function(e,s,n){var r="",i=k.fn.search.settings.templates.escape;return e[s.categoryResults]!==D&&(k.each(e[s.categoryResults],function(e,t){t[s.results]!==D&&0<t.results.length&&(r+='<div class="category">',t[s.categoryName]!==D&&(r+='<div class="name">'+i(t[s.categoryName],n)+"</div>"),r+='<div class="results">',k.each(t.results,function(e,t){r+=t[s.url]?'<a class="result" href="'+t[s.url].replace(/"/g,"")+'">':'<a class="result">',t[s.image]!==D&&(r+='<div class="image"> <img src="'+t[s.image].replace(/"/g,"")+'"></div>'),r+='<div class="content">',t[s.price]!==D&&(r+='<div class="price">'+i(t[s.price],n)+"</div>"),t[s.title]!==D&&(r+='<div class="title">'+i(t[s.title],n)+"</div>"),t[s.description]!==D&&(r+='<div class="description">'+i(t[s.description],n)+"</div>"),r+="</div></a>"}),r+="</div></div>")}),e[s.action]&&(r+=!1===s.actionURL?'<div class="action">'+i(e[s.action][s.actionText],n)+"</div>":'<a href="'+e[s.action][s.actionURL].replace(/"/g,"")+'" class="action">'+i(e[s.action][s.actionText],n)+"</a>"),r)},standard:function(e,s,n){var r="",i=k.fn.search.settings.templates.escape;return e[s.results]!==D&&(k.each(e[s.results],function(e,t){r+=t[s.url]?'<a class="result" href="'+t[s.url].replace(/"/g,"")+'">':'<a class="result">',t[s.image]!==D&&(r+='<div class="image"> <img src="'+t[s.image].replace(/"/g,"")+'"></div>'),r+='<div class="content">',t[s.price]!==D&&(r+='<div class="price">'+i(t[s.price],n)+"</div>"),t[s.title]!==D&&(r+='<div class="title">'+i(t[s.title],n)+"</div>"),t[s.description]!==D&&(r+='<div class="description">'+i(t[s.description],n)+"</div>"),r+="</div></a>"}),e[s.action]&&(r+=!1===s.actionURL?'<div class="action">'+i(e[s.action][s.actionText],n)+"</div>":'<a href="'+e[s.action][s.actionURL].replace(/"/g,"")+'" class="action">'+i(e[s.action][s.actionText],n)+"</a>"),r)}}},k.extend(k.easing,{easeOutExpo:function(e){return 1===e?1:1-Math.pow(2,-10*e)}})}(jQuery,window,document);
|
11
|
+
!function(k,F,E,D){"use strict";function O(e){return"function"==typeof e&&"number"!=typeof e.nodeType}F=F!==D&&F.Math===Math?F:globalThis,k.fn.search=function(R){var S,x=k(this),C=x.selector||"",w=Date.now(),T=[],A=R,j="string"==typeof A,q=[].slice.call(arguments,1);return x.each(function(){var l=k.isPlainObject(R)?k.extend(!0,{},k.fn.search.settings,R):k.extend({},k.fn.search.settings),d=l.className,c=l.metadata,n=l.regExp,i=l.fields,f=l.selector,g=l.error,e=l.namespace,r="."+e,t=e+"-module",p=k(this),h=p.find(f.prompt),s=p.find(f.searchButton),a=p.find(f.results),o=p.find(f.result),u=(p.find(f.category),this),m=p.data(t),v=!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),m=b,p.data(t,b)},destroy:function(){b.verbose("Destroying instance"),p.off(r).removeData(t)},refresh:function(){b.debug("Refreshing selector cache"),h=p.find(f.prompt),s=p.find(f.searchButton),p.find(f.category),a=p.find(f.results),o=p.find(f.result)},refreshResults:function(){a=p.find(f.results),o=p.find(f.result)},bind:{events:function(){b.verbose("Binding events to search"),l.automatic&&(p.on(b.get.inputEvent()+r,f.prompt,b.event.input),h.attr("autocomplete",b.is.chrome()?"fomantic-search":"off")),p.on("focus"+r,f.prompt,b.event.focus).on("blur"+r,f.prompt,b.event.blur).on("keydown"+r,f.prompt,b.handleKeyboard).on("click"+r,f.searchButton,b.query).on("mousedown"+r,f.results,b.event.result.mousedown).on("mouseup"+r,f.results,b.event.result.mouseup).on("click"+r,f.result,b.event.result.click)}},determine:{searchFields:function(){R&&R.searchFields!==D&&(l.searchFields=R.searchFields)}},event:{input:function(){l.searchDelay?(clearTimeout(b.timer),b.timer=setTimeout(function(){b.is.focused()&&b.query()},l.searchDelay)):b.query()},focus:function(){b.set.focus(),l.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,l.hideDelay)}var s=E.activeElement===this;s||(y=!1,b.resultsClicked?(b.debug("Determining if user action caused search to close"),p.one("click.close"+r,f.results,function(e){b.is.inMessage(e)||v?h.trigger("focus"):(v=!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=k(this),s=t.find(f.title).eq(0),n=t.is("a[href]")?t:t.find("a[href]").eq(0),r=n.attr("href")||!1,i=n.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(O(l.onSelect)&&!1===l.onSelect.call(u,t,a))return b.debug("Custom onSelect callback cancelled default select action"),void(v=!0);b.hideResults(),s&&b.get.value()===o&&b.set.value(s),r&&(e.preventDefault(),b.verbose("Opening search link found in result",n),"_blank"===i||e.ctrlKey?F.open(r):F.location.href=r)}}},ensureVisible:function(e){var t,s,n;0!==e.length&&(e=(t=e.position().top)+e.outerHeight(!0),s=a.scrollTop(),n=a.height(),t<0?a.scrollTop(s+t):n<e&&a.scrollTop(s+(e-n)))},handleKeyboard:function(e){var t,s=p.find(f.result),n=p.find(f.category),r=s.filter("."+d.active),i=s.index(r),a=s.length,r=0<r.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"),h.trigger("blur")),e.stopPropagation(),y=!0),b.is.visible())if(o===c){if(b.verbose("Enter key pressed, selecting active result"),0<s.filter("."+d.active).length)return b.event.result.click.call(s.filter("."+d.active),e),e.preventDefault(),!1}else o===u&&r?(b.verbose("Up key pressed, changing active result"),t=i-1<0?i:i-1,n.removeClass(d.active),s.removeClass(d.active).eq(t).addClass(d.active).closest(n).addClass(d.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,n.removeClass(d.active),s.removeClass(d.active).eq(t).addClass(d.active).closest(n).addClass(d.active),b.ensureVisible(s.eq(t)),e.preventDefault());else o===c&&(b.verbose("Enter key pressed, executing query"),b.query(),b.set.buttonPressed(),h.one("keyup",b.remove.buttonFocus))},setup:{api:function(n,r){var e={debug:l.debug,on:!1,cache:l.cache,action:"search",urlData:{query:n}};k.extend(!0,e,l.apiSettings,{onSuccess:function(e,t,s){b.parse.response.call(u,e,n),r(),l.apiSettings&&"function"==typeof l.apiSettings.onSuccess&&l.apiSettings.onSuccess.call(this,e,t,s)},onFailure:function(e,t,s){b.displayMessage(g.serverError),r(),l.apiSettings&&"function"==typeof l.apiSettings.onFailure&&l.apiSettings.onFailure.call(this,e,t,s)},onAbort:function(e,t,s){l.apiSettings&&"function"==typeof l.apiSettings.onAbort&&l.apiSettings.onAbort.call(this,e,t,s)},onError:function(e,t,s){b.error(),l.apiSettings&&"function"==typeof l.apiSettings.onError&&l.apiSettings.onError.call(this,e,t,s)}}),b.verbose("Setting up API request",e),p.api(e)}},can:{useAPI:function(){return k.fn.api!==D},show:function(){return b.is.focused()&&!b.is.visible()&&!b.is.empty()},transition:function(){return l.transition&&k.fn.transition!==D&&p.transition("is supported")}},is:{animating:function(){return a.hasClass(d.animating)},chrome:function(){return!!F.chrome&&!F.StyleMedia},hidden:function(){return a.hasClass(d.hidden)},inMessage:function(e){var t;if(e.target)return t=k(e.target),k.contains(E.documentElement,e.target)&&0<t.closest(f.message).length},empty:function(){return""===a.html()},visible:function(){return 0<a.filter(":visible").length},focused:function(){return 0<h.filter(":focus").length}},get:{settings:function(){k.isPlainObject(R)&&R.searchFullText&&(l.fullTextSearch=R.searchFullText,b.error(l.error.oldSearchSyntax,u)),l.ignoreDiacritics&&!String.prototype.normalize&&(l.ignoreDiacritics=!1,b.error(g.noNormalize,u))},inputEvent:function(){var e=h[0];return e!==D&&e.oninput!==D?"input":e!==D&&e.onpropertychange!==D?"propertychange":"keyup"},value:function(){return h.val()},results:function(){return p.data(c.results)},result:function(s,e){var n=!1;return s=s!==D?s:b.get.value(),e=e!==D?e:b.get.results(),"category"===l.type?(b.debug("Finding result that matches",s),k.each(e,function(e,t){if(Array.isArray(t.results)&&(n=b.search.object(s,t.results)[0]))return!1})):(b.debug("Finding result in results object",s),n=b.search.object(s,e)[0]),n||!1}},select:{firstResult:function(){b.verbose("Selecting first result"),o.first().addClass(d.active)}},set:{focus:function(){p.addClass(d.focus)},loading:function(){p.addClass(d.loading)},value:function(e){b.verbose("Setting search input value",e),h.val(e)},type:function(e){e=e||l.type,d[e]&&p.addClass(d[e])},buttonPressed:function(){s.addClass(d.pressed)}},remove:{loading:function(){p.removeClass(d.loading)},focus:function(){p.removeClass(d.focus)},buttonPressed:function(){s.removeClass(d.pressed)},diacritics:function(e){return l.ignoreDiacritics?e.normalize("NFD").replace(/[\u0300-\u036F]/g,""):e}},query:function(e){e=O(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),k.isPlainObject(l.source)||Array.isArray(l.source)?(b.search.local(t),e()):b.can.useAPI()?b.search.remote(t,e):(b.error(g.source),e())),l.onSearchQuery.call(u,t)):b.hideResults()},search:{local:function(e){var t,s=b.search.object(e,l.source);b.set.loading(),b.save.results(s),b.debug("Returned full local search results",s),0<l.maxResults&&(b.debug("Using specified max results",s),s=s.slice(0,l.maxResults)),"category"===l.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=O(t)?t:function(){},p.api("is loading")&&p.api("abort"),b.setup.api(e,t),p.api("query")},object:function(r,t,e){r=b.remove.diacritics(String(r));function i(e,t){var s=-1===k.inArray(t,a),n=-1===k.inArray(t,c),r=-1===k.inArray(t,o);s&&n&&r&&e.push(t)}var a=[],o=[],c=[],s=r.replace(n.escape,"\\$&"),u=new RegExp(n.beginsWith+s,"i");return t=t||l.source,e=e!==D?e:l.searchFields,Array.isArray(e)||(e=[e]),t===D||!1===t?(b.error(g.source),[]):(k.each(e,function(e,n){k.each(t,function(e,t){var s;"string"!=typeof t[n]&&"number"!=typeof t[n]||(-1!==(s="string"==typeof t[n]?b.remove.diacritics(t[n]):t[n].toString()).search(u)?i(a,t):"exact"===l.fullTextSearch&&b.exactSearch(r,s)?i(o,t):!0===l.fullTextSearch&&b.fuzzySearch(r,s)&&i(c,t))})}),k.merge(o,c),k.merge(a,o),a)}},exactSearch:function(e,t){return e=e.toLowerCase(),-1<(t=t.toLowerCase()).indexOf(e)},fuzzySearch:function(e,t){var s=t.length,n=e.length;if("string"!=typeof e)return!1;if(e=e.toLowerCase(),t=t.toLowerCase(),s<n)return!1;if(n===s)return e===t;for(var r=0,i=0;r<n;r++){for(var a=!1,o=e.charCodeAt(r);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),e!==D&&t!==D&&e[i.results]!==D&&(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()&&p.api("abort")}},has:{minimumCharacters:function(){return b.get.value().length>=l.minCharacters},results:function(){return 0!==a.length&&""!==a.html()}},clear:{cache:function(e){var t=p.data(c.cache);e?t&&t[e]&&(b.debug("Removing value from cache",e),delete t[e],p.data(c.cache,t)):(b.debug("Clearing cache",e),p.removeData(c.cache))}},read:{cache:function(e){var t=p.data(c.cache);return!!l.cache&&(b.verbose("Checking cache for generated html for query",e),"object"==typeof t&&t[e]!==D&&t[e])}},create:{categoryResults:function(e){var s={};return k.each(e,function(e,t){t.category&&(s[t.category]===D?(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 t!==D?(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=k("<div />").addClass(d.results).appendTo(p))}},inject:{result:function(e,t,s){b.verbose("Injecting result into results");s=(s!==D?a.children().eq(s).children(f.results).first():a).children(f.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,n=0;return"category"===l.type?k.each(e,function(e,t){0<t.results.length&&(n=0,k.each(t.results,function(e,t){t.id===D&&(t.id=b.create.id(n,s)),b.inject.result(t,n,s),n++}),s++)}):k.each(e,function(e,t){t.id===D&&(t.id=b.create.id(n)),b.inject.result(t,n),n++}),e}},save:{results:function(e){b.verbose("Saving current search results to metadata",e),p.data(c.results,e)}},write:{cache:function(e,t){var s=p.data(c.cache)!==D?p.data(c.cache):{};l.cache&&(b.verbose("Writing generated html to cache",e,t),s[e]=t,p.data(c.cache,s))}},addResults:function(e){if(O(l.onResultsAdd)&&!1===l.onResultsAdd.call(a,e))return b.debug("onResultsAdd callback cancelled default action"),!1;e?(a.html(e),b.refreshResults(),l.selectFirstResult&&b.select.firstResult(),b.showResults()):b.hideResults(function(){a.empty()})},showResults:function(e){e=O(e)?e:function(){},y||!b.is.visible()&&b.has.results()&&(b.can.transition()?(b.debug("Showing results with css animations"),a.transition({animation:l.transition+" in",debug:l.debug,verbose:l.verbose,silent:l.silent,duration:l.duration,onShow:function(){var e=p.find(f.result).eq(0);b.ensureVisible(e)},onComplete:function(){e()},queue:!0})):(b.debug("Showing results with javascript"),a.stop().fadeIn(l.duration,l.easing)),l.onResultsOpen.call(a))},hideResults:function(e){e=O(e)?e:function(){},b.is.visible()&&(b.can.transition()?(b.debug("Hiding results with css animations"),a.transition({animation:l.transition+" out",debug:l.debug,verbose:l.verbose,silent:l.silent,duration:l.duration,onComplete:function(){e()},queue:!0})):(b.debug("Hiding results with javascript"),a.stop().fadeOut(l.duration,l.easing)),l.onResultsClose.call(a))},generateResults:function(e){b.debug("Generating html from response",e);var t=l.templates[l.type],s=k.isPlainObject(e[i.results])&&!k.isEmptyObject(e[i.results]),n=Array.isArray(e[i.results])&&0<e[i.results].length,r="";return s||n?(0<l.maxResults&&(s?"standard"===l.type&&b.error(g.maxResults):e[i.results]=e[i.results].slice(0,l.maxResults)),O(t)?r=t(e,i,l.preserveHTML):b.error(g.noTemplate,!1)):l.showNoResults&&(r=b.displayMessage(g.noResults,"empty",g.noResultsHeader)),l.onResults.call(u,e),r},displayMessage:function(e,t,s){return b.debug("Displaying message",e,t=t||"standard",s),b.addResults(l.templates.message(e,t,s)),l.templates.message(e,t,s)},setting:function(e,t){if(k.isPlainObject(e))k.extend(!0,l,e);else{if(t===D)return l[e];l[e]=t}},internal:function(e,t){if(k.isPlainObject(e))k.extend(!0,b,e);else{if(t===D)return b[e];b[e]=t}},debug:function(){!l.silent&&l.debug&&(l.performance?b.performance.log(arguments):(b.debug=Function.prototype.bind.call(console.info,console,l.name+":"),b.debug.apply(console,arguments)))},verbose:function(){!l.silent&&l.verbose&&l.debug&&(l.performance?b.performance.log(arguments):(b.verbose=Function.prototype.bind.call(console.info,console,l.name+":"),b.verbose.apply(console,arguments)))},error:function(){l.silent||(b.error=Function.prototype.bind.call(console.error,console,l.name+":"),b.error.apply(console,arguments))},performance:{log:function(e){var t,s;l.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=l.name+":",s=0;w=!1,clearTimeout(b.performance.timer),k.each(T,function(e,t){s+=t["Execution Time"]}),e+=" "+s+"ms",C&&(e+=" '"+C+"'"),1<x.length&&(e+=" ("+x.length+")"),(console.group!==D||console.table!==D)&&0<T.length&&(console.groupCollapsed(e),console.table?console.table(T):k.each(T,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),T=[]}},invoke:function(n,e,t){var r,i,s,a=m;return e=e||q,t=t||u,"string"==typeof n&&a!==D&&(n=n.split(/[ .]/),r=n.length-1,k.each(n,function(e,t){var s=e!==r?t+n[e+1].charAt(0).toUpperCase()+n[e+1].slice(1):n;if(k.isPlainObject(a[s])&&e!==r)a=a[s];else{if(a[s]!==D)return i=a[s],!1;{if(!k.isPlainObject(a[t])||e===r)return a[t]!==D&&(i=a[t]),!1;a=a[t]}}})),O(i)?s=i.apply(t,e):i!==D&&(s=i),Array.isArray(S)?S.push(s):S!==D?S=[S,s]:s!==D&&(S=s),i}};j?(m===D&&b.initialize(),b.invoke(A)):(m!==D&&m.invoke("destroy"),b.initialize())}),S!==D?S:this},k.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 Semantic API module was not included",noResultsHeader:"No Results",noResults:"Your search returned no results",logging:"Error in debug logging, exiting.",noEndpoint:"No search endpoint was specified",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 n="";return e!==D&&t!==D&&(n+='<div class="message '+t+'">',s&&(n+='<div class="header">'+s+"</div>"),n=n+' <div class="description">'+e+"</div></div>"),n},category:function(e,s,n){var r="",i=k.fn.search.settings.templates.escape;return e[s.categoryResults]!==D&&(k.each(e[s.categoryResults],function(e,t){t[s.results]!==D&&0<t.results.length&&(r+='<div class="category">',t[s.categoryName]!==D&&(r+='<div class="name">'+i(t[s.categoryName],n)+"</div>"),r+='<div class="results">',k.each(t.results,function(e,t){r+=t[s.url]?'<a class="result" href="'+t[s.url].replace(/"/g,"")+'">':'<a class="result">',t[s.image]!==D&&(r+='<div class="image"> <img src="'+t[s.image].replace(/"/g,"")+'"></div>'),r+='<div class="content">',t[s.price]!==D&&(r+='<div class="price">'+i(t[s.price],n)+"</div>"),t[s.title]!==D&&(r+='<div class="title">'+i(t[s.title],n)+"</div>"),t[s.description]!==D&&(r+='<div class="description">'+i(t[s.description],n)+"</div>"),r+="</div></a>"}),r+="</div></div>")}),e[s.action]&&(r+=!1===s.actionURL?'<div class="action">'+i(e[s.action][s.actionText],n)+"</div>":'<a href="'+e[s.action][s.actionURL].replace(/"/g,"")+'" class="action">'+i(e[s.action][s.actionText],n)+"</a>"),r)},standard:function(e,s,n){var r="",i=k.fn.search.settings.templates.escape;return e[s.results]!==D&&(k.each(e[s.results],function(e,t){r+=t[s.url]?'<a class="result" href="'+t[s.url].replace(/"/g,"")+'">':'<a class="result">',t[s.image]!==D&&(r+='<div class="image"> <img src="'+t[s.image].replace(/"/g,"")+'"></div>'),r+='<div class="content">',t[s.price]!==D&&(r+='<div class="price">'+i(t[s.price],n)+"</div>"),t[s.title]!==D&&(r+='<div class="title">'+i(t[s.title],n)+"</div>"),t[s.description]!==D&&(r+='<div class="description">'+i(t[s.description],n)+"</div>"),r+="</div></a>"}),e[s.action]&&(r+=!1===s.actionURL?'<div class="action">'+i(e[s.action][s.actionText],n)+"</div>":'<a href="'+e[s.action][s.actionURL].replace(/"/g,"")+'" class="action">'+i(e[s.action][s.actionText],n)+"</a>"),r)}}},k.extend(k.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.1-beta.
|
2
|
+
* # Fomantic-UI 2.9.1-beta.25+bbe4e58 - Shape
|
3
3
|
* https://github.com/fomantic/Fomantic-UI/
|
4
4
|
*
|
5
5
|
*
|
@@ -185,7 +185,7 @@
|
|
185
185
|
|
186
186
|
is: {
|
187
187
|
complete: function () {
|
188
|
-
return $side.filter('.' + className.active)[0]
|
188
|
+
return $side.filter('.' + className.active)[0] === $nextSide[0];
|
189
189
|
},
|
190
190
|
animating: function () {
|
191
191
|
return $module.hasClass(className.animating);
|
@@ -704,17 +704,17 @@
|
|
704
704
|
query = query.split(/[ .]/);
|
705
705
|
maxDepth = query.length - 1;
|
706
706
|
$.each(query, function (depth, value) {
|
707
|
-
var camelCaseValue = depth
|
707
|
+
var camelCaseValue = depth !== maxDepth
|
708
708
|
? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)
|
709
709
|
: query
|
710
710
|
;
|
711
|
-
if ($.isPlainObject(object[camelCaseValue]) && (depth
|
711
|
+
if ($.isPlainObject(object[camelCaseValue]) && (depth !== maxDepth)) {
|
712
712
|
object = object[camelCaseValue];
|
713
713
|
} else if (object[camelCaseValue] !== undefined) {
|
714
714
|
found = object[camelCaseValue];
|
715
715
|
|
716
716
|
return false;
|
717
|
-
} else if ($.isPlainObject(object[value]) && (depth
|
717
|
+
} else if ($.isPlainObject(object[value]) && (depth !== maxDepth)) {
|
718
718
|
object = object[value];
|
719
719
|
} else if (object[value] !== undefined) {
|
720
720
|
found = object[value];
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*
|
2
|
-
* # Fomantic UI - 2.9.1-beta.
|
2
|
+
* # Fomantic UI - 2.9.1-beta.25+bbe4e58
|
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(A,e,E,Y){"use strict";e=e!==Y&&e.Math===Math?e:globalThis,A.fn.shape=function(v){var b,x=A(this),y=Date.now(),w=[],C=v,S="string"==typeof C,T=[].slice.call(arguments,1),W=e.requestAnimationFrame||e.mozRequestAnimationFrame||e.webkitRequestAnimationFrame||e.msRequestAnimationFrame||function(e){setTimeout(e,0)};return x.each(function(){var i,n,t=x.selector||"",a=A.isPlainObject(v)?A.extend(!0,{},A.fn.shape.settings,v):A.extend({},A.fn.shape.settings),e=a.namespace,r=a.selector,o=a.error,s=a.className,d="."+e,l="module-"+e,u=A(this),c=u.find(">"+r.sides),f=c.find(">"+r.side),g=!1,h=this,m=u.data(l),p={initialize:function(){p.verbose("Initializing module for",h),p.set.defaultSide(),p.instantiate()},instantiate:function(){p.verbose("Storing instance of module",p),m=p,u.data(l,m)},destroy:function(){p.verbose("Destroying previous module for",h),u.removeData(l).off(d)},refresh:function(){p.verbose("Refreshing selector cache for",h),u=A(h),c=A(this).find(r.sides),f=A(this).find(r.side)},repaint:function(){p.verbose("Forcing repaint event");(c[0]||E.createElement("div")).offsetWidth},animate:function(e,t){p.verbose("Animating box with properties",e),t=t||function(e){p.verbose("Executing animation callback"),e!==Y&&e.stopPropagation(),p.reset(),p.set.active()},a.onBeforeChange.call(n[0]),p.get.transitionEvent()?(p.verbose("Starting CSS animation"),u.addClass(s.animating),c.css(e).one(p.get.transitionEvent(),t),p.set.duration(a.duration),W(function(){u.addClass(s.animating),i.addClass(s.hidden)})):t()},queue:function(e){p.debug("Queueing animation of",e),c.one(p.get.transitionEvent(),function(){p.debug("Executing queued animation"),setTimeout(function(){u.shape(e)},0)})},reset:function(){p.verbose("Animating states reset"),u.removeClass(s.animating).attr("style","").removeAttr("style"),c.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]
|
11
|
+
!function(A,e,E,Y){"use strict";e=e!==Y&&e.Math===Math?e:globalThis,A.fn.shape=function(v){var b,x=A(this),y=Date.now(),w=[],C=v,S="string"==typeof C,T=[].slice.call(arguments,1),W=e.requestAnimationFrame||e.mozRequestAnimationFrame||e.webkitRequestAnimationFrame||e.msRequestAnimationFrame||function(e){setTimeout(e,0)};return x.each(function(){var i,n,t=x.selector||"",a=A.isPlainObject(v)?A.extend(!0,{},A.fn.shape.settings,v):A.extend({},A.fn.shape.settings),e=a.namespace,r=a.selector,o=a.error,s=a.className,d="."+e,l="module-"+e,u=A(this),c=u.find(">"+r.sides),f=c.find(">"+r.side),g=!1,h=this,m=u.data(l),p={initialize:function(){p.verbose("Initializing module for",h),p.set.defaultSide(),p.instantiate()},instantiate:function(){p.verbose("Storing instance of module",p),m=p,u.data(l,m)},destroy:function(){p.verbose("Destroying previous module for",h),u.removeData(l).off(d)},refresh:function(){p.verbose("Refreshing selector cache for",h),u=A(h),c=A(this).find(r.sides),f=A(this).find(r.side)},repaint:function(){p.verbose("Forcing repaint event");(c[0]||E.createElement("div")).offsetWidth},animate:function(e,t){p.verbose("Animating box with properties",e),t=t||function(e){p.verbose("Executing animation callback"),e!==Y&&e.stopPropagation(),p.reset(),p.set.active()},a.onBeforeChange.call(n[0]),p.get.transitionEvent()?(p.verbose("Starting CSS animation"),u.addClass(s.animating),c.css(e).one(p.get.transitionEvent(),t),p.set.duration(a.duration),W(function(){u.addClass(s.animating),i.addClass(s.hidden)})):t()},queue:function(e){p.debug("Queueing animation of",e),c.one(p.get.transitionEvent(),function(){p.debug("Executing queued animation"),setTimeout(function(){u.shape(e)},0)})},reset:function(){p.verbose("Animating states reset"),u.removeClass(s.animating).attr("style","").removeAttr("style"),c.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 u.hasClass(s.animating)},hidden:function(){return 0<u.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,p.verbose("Active side set to",i),p.verbose("Next side set to",n)},duration:function(e){e=e||a.duration,p.verbose("Setting animation duration",e="number"==typeof e?e+"ms":e),!a.duration&&0!==a.duration||c.add(f).css({"-webkit-transition-duration":e,"-moz-transition-duration":e,"-ms-transition-duration":e,"-o-transition-duration":e,"transition-duration":e})},currentStageSize:function(){var e=f.filter("."+a.className.active),t=e.outerWidth(!0),e=e.outerHeight(!0);u.css({width:t,height:e})},stageSize:function(){var e=u.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?u.width():a.width,o="next"===a.height?t.outerHeight(!0):"initial"===a.height?u.height():a.height;i.removeClass(s.active),t.addClass(s.active),e.insertAfter(u),e.remove(),"auto"!==a.width&&(u.css("width",n+a.jitter),p.verbose("Specifying width during animation",n)),"auto"!==a.height&&(u.css("height",o+a.jitter),p.verbose("Specifying height during animation",o))},nextSide:function(e){g=e,n=f.filter(e),g=f.index(n),0===n.length&&(p.set.defaultSide(),p.error(o.side)),p.verbose("Next side manually set to",n)},active:function(){p.verbose("Setting new side to active",n),f.removeClass(s.active),n.addClass(s.active),a.onChange.call(n[0]),p.set.defaultSide()}},flip:{to:function(e,t){var i;p.is.hidden()?p.debug("Module not visible",n):!p.is.complete()||p.is.animating()||a.allowRepeats?(i=p.get.transform[e](),p.is.animating()?p.queue("flip "+e):(p.debug("Flipping "+e,n),p.set.stageSize(),p.stage[t](),p.animate(i))):p.debug("Side already visible",n)},up:function(){p.flip.to("up","above")},down:function(){p.flip.to("down","below")},left:function(){p.flip.to("left","left")},right:function(){p.flip.to("right","right")},over:function(){p.flip.to("over","behind")},back:function(){p.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)"}}},transitionEvent:function(){var e,t=E.createElement("element"),i={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(e in i)if(t.style[e]!==Y)return i[e]},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}};p.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}};p.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}};p.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}};p.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}};p.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(p.debug("Changing setting",e,t),A.isPlainObject(e))A.extend(!0,a,e);else{if(t===Y)return a[e];A.isPlainObject(a[e])?A.extend(!0,a[e],t):a[e]=t}},internal:function(e,t){if(A.isPlainObject(e))A.extend(!0,p,e);else{if(t===Y)return p[e];p[e]=t}},debug:function(){!a.silent&&a.debug&&(a.performance?p.performance.log(arguments):(p.debug=Function.prototype.bind.call(console.info,console,a.name+":"),p.debug.apply(console,arguments)))},verbose:function(){!a.silent&&a.verbose&&a.debug&&(a.performance?p.performance.log(arguments):(p.verbose=Function.prototype.bind.call(console.info,console,a.name+":"),p.verbose.apply(console,arguments)))},error:function(){a.silent||(p.error=Function.prototype.bind.call(console.error,console,a.name+":"),p.error.apply(console,arguments))},performance:{log:function(e){var t,i;a.performance&&(i=(t=Date.now())-(y||t),y=t,w.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:h,"Execution Time":i})),clearTimeout(p.performance.timer),p.performance.timer=setTimeout(p.performance.display,500)},display:function(){var e=a.name+":",i=0;y=!1,clearTimeout(p.performance.timer),A.each(w,function(e,t){i+=t["Execution Time"]}),e+=" "+i+"ms",t&&(e+=" '"+t+"'"),1<x.length&&(e+=" ("+x.length+")"),(console.group!==Y||console.table!==Y)&&0<w.length&&(console.groupCollapsed(e),console.table?console.table(w):A.each(w,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),w=[]}},invoke:function(n,e,t){var o,a,i,r,s=m;return e=e||T,t=t||h,"string"==typeof n&&s!==Y&&(n=n.split(/[ .]/),o=n.length-1,A.each(n,function(e,t){var i=e!==o?t+n[e+1].charAt(0).toUpperCase()+n[e+1].slice(1):n;if(A.isPlainObject(s[i])&&e!==o)s=s[i];else{if(s[i]!==Y)return a=s[i],!1;{if(!A.isPlainObject(s[t])||e===o)return s[t]!==Y&&(a=s[t]),!1;s=s[t]}}})),"function"==typeof(r=a)&&"number"!=typeof r.nodeType?i=a.apply(t,e):a!==Y&&(i=a),Array.isArray(b)?b.push(i):b!==Y?b=[b,i]:i!==Y&&(b=i),a}};S?(m===Y&&p.initialize(),0<(e=u.find("input")).length?(e.trigger("blur"),setTimeout(function(){p.invoke(C)},150)):p.invoke(C)):(m!==Y&&m.invoke("destroy"),p.initialize())}),b!==Y?b:this},A.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.1-beta.
|
2
|
+
* # Fomantic-UI 2.9.1-beta.25+bbe4e58 - Sidebar
|
3
3
|
* https://github.com/fomantic/Fomantic-UI/
|
4
4
|
*
|
5
5
|
*
|
@@ -249,7 +249,7 @@
|
|
249
249
|
+ ' -webkit-transform: translate3d(' + distance[direction] + 'px, 0, 0);'
|
250
250
|
+ ' transform: translate3d(' + distance[direction] + 'px, 0, 0);'
|
251
251
|
+ ' }';
|
252
|
-
} else if (direction === 'top' || direction
|
252
|
+
} else if (direction === 'top' || direction === 'bottom') {
|
253
253
|
style += ''
|
254
254
|
+ ' .ui.visible.' + direction + '.sidebar ~ .fixed,'
|
255
255
|
+ ' .ui.visible.' + direction + '.sidebar ~ .pusher {'
|
@@ -268,7 +268,7 @@
|
|
268
268
|
+ ' -webkit-transform: translate3d(' + distance[direction] + 'px, 0, 0);'
|
269
269
|
+ ' transform: translate3d(' + distance[direction] + 'px, 0, 0);'
|
270
270
|
+ ' }';
|
271
|
-
} else if (direction === 'top' || direction
|
271
|
+
} else if (direction === 'top' || direction === 'bottom') {
|
272
272
|
style += ''
|
273
273
|
+ ' body.pushable > .ui.visible.' + direction + '.sidebar ~ .pusher::after {'
|
274
274
|
+ ' -webkit-transform: translate3d(0, ' + distance[direction] + 'px, 0);'
|
@@ -399,7 +399,7 @@
|
|
399
399
|
module.debug('Other sidebars currently visible');
|
400
400
|
if (settings.exclusive) {
|
401
401
|
// if not overlay queue animation after hide
|
402
|
-
if (settings.transition
|
402
|
+
if (settings.transition !== 'overlay') {
|
403
403
|
module.hideOthers(module.show);
|
404
404
|
|
405
405
|
return;
|
@@ -456,7 +456,7 @@
|
|
456
456
|
$otherSidebars
|
457
457
|
.sidebar('hide', function () {
|
458
458
|
callbackCount++;
|
459
|
-
if (callbackCount
|
459
|
+
if (callbackCount === sidebarCount) {
|
460
460
|
callback();
|
461
461
|
}
|
462
462
|
})
|
@@ -504,7 +504,7 @@
|
|
504
504
|
module.set.dimmed();
|
505
505
|
};
|
506
506
|
transitionEnd = function (event) {
|
507
|
-
if (event.target
|
507
|
+
if (event.target === $transition[0]) {
|
508
508
|
$transition.off(transitionEvent + elementNamespace, transitionEnd);
|
509
509
|
module.remove.animating();
|
510
510
|
callback.call(element);
|
@@ -521,7 +521,7 @@
|
|
521
521
|
pullPage: function (callback) {
|
522
522
|
var
|
523
523
|
transition = module.get.transition(),
|
524
|
-
$transition = transition
|
524
|
+
$transition = transition === 'overlay' || module.othersActive()
|
525
525
|
? $module
|
526
526
|
: $pusher,
|
527
527
|
animate,
|
@@ -544,7 +544,7 @@
|
|
544
544
|
module.remove.visible();
|
545
545
|
};
|
546
546
|
transitionEnd = function (event) {
|
547
|
-
if (event.target
|
547
|
+
if (event.target === $transition[0]) {
|
548
548
|
$transition.off(transitionEvent + elementNamespace, transitionEnd);
|
549
549
|
module.remove.animating();
|
550
550
|
module.remove.closing();
|
@@ -725,10 +725,10 @@
|
|
725
725
|
transition
|
726
726
|
;
|
727
727
|
transition = module.is.mobile()
|
728
|
-
? (settings.mobileTransition
|
728
|
+
? (settings.mobileTransition === 'auto'
|
729
729
|
? settings.defaultTransition.mobile[direction]
|
730
730
|
: settings.mobileTransition)
|
731
|
-
: (settings.transition
|
731
|
+
: (settings.transition === 'auto'
|
732
732
|
? settings.defaultTransition.computer[direction]
|
733
733
|
: settings.transition);
|
734
734
|
module.verbose('Determined transition', transition);
|
@@ -964,17 +964,17 @@
|
|
964
964
|
query = query.split(/[ .]/);
|
965
965
|
maxDepth = query.length - 1;
|
966
966
|
$.each(query, function (depth, value) {
|
967
|
-
var camelCaseValue = depth
|
967
|
+
var camelCaseValue = depth !== maxDepth
|
968
968
|
? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)
|
969
969
|
: query
|
970
970
|
;
|
971
|
-
if ($.isPlainObject(object[camelCaseValue]) && (depth
|
971
|
+
if ($.isPlainObject(object[camelCaseValue]) && (depth !== maxDepth)) {
|
972
972
|
object = object[camelCaseValue];
|
973
973
|
} else if (object[camelCaseValue] !== undefined) {
|
974
974
|
found = object[camelCaseValue];
|
975
975
|
|
976
976
|
return false;
|
977
|
-
} else if ($.isPlainObject(object[value]) && (depth
|
977
|
+
} else if ($.isPlainObject(object[value]) && (depth !== maxDepth)) {
|
978
978
|
object = object[value];
|
979
979
|
} else if (object[value] !== undefined) {
|
980
980
|
found = object[value];
|