fomantic-ui 2.9.4-beta.31 → 2.9.4-beta.33
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 +1 -1
- package/dist/components/accordion.min.css +1 -1
- package/dist/components/accordion.min.js +1 -1
- 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 +1 -1
- package/dist/components/dimmer.min.css +1 -1
- package/dist/components/dimmer.min.js +1 -1
- 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 +44 -12
- 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 +1 -1
- package/dist/components/embed.min.css +1 -1
- package/dist/components/embed.min.js +1 -1
- package/dist/components/emoji.css +1 -1
- package/dist/components/emoji.min.css +1 -1
- package/dist/components/feed.css +1 -1
- package/dist/components/feed.min.css +1 -1
- package/dist/components/flag.css +1 -1
- package/dist/components/flag.min.css +1 -1
- package/dist/components/flyout.css +1 -1
- package/dist/components/flyout.js +1 -1
- package/dist/components/flyout.min.css +1 -1
- package/dist/components/flyout.min.js +1 -1
- package/dist/components/form.css +1 -1
- package/dist/components/form.js +1 -1
- package/dist/components/form.min.css +1 -1
- package/dist/components/form.min.js +1 -1
- package/dist/components/grid.css +1 -1
- package/dist/components/grid.min.css +1 -1
- package/dist/components/header.css +1 -1
- package/dist/components/header.min.css +1 -1
- package/dist/components/icon.css +1 -1
- package/dist/components/icon.min.css +1 -1
- package/dist/components/image.css +1 -1
- package/dist/components/image.min.css +1 -1
- package/dist/components/input.css +1 -1
- package/dist/components/input.min.css +1 -1
- package/dist/components/item.css +1 -1
- package/dist/components/item.min.css +1 -1
- package/dist/components/label.css +1 -1
- package/dist/components/label.min.css +1 -1
- package/dist/components/list.css +1 -1
- package/dist/components/list.min.css +1 -1
- package/dist/components/loader.css +1 -1
- package/dist/components/loader.min.css +1 -1
- package/dist/components/menu.css +1 -1
- package/dist/components/menu.min.css +1 -1
- package/dist/components/message.css +1 -1
- package/dist/components/message.min.css +1 -1
- package/dist/components/modal.css +1 -1
- package/dist/components/modal.js +1 -1
- package/dist/components/modal.min.css +1 -1
- package/dist/components/modal.min.js +1 -1
- package/dist/components/nag.css +1 -1
- package/dist/components/nag.js +5 -3
- 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 +1 -1
- package/dist/components/popup.min.css +1 -1
- package/dist/components/popup.min.js +1 -1
- package/dist/components/progress.css +1 -1
- package/dist/components/progress.js +1 -1
- package/dist/components/progress.min.css +1 -1
- package/dist/components/progress.min.js +1 -1
- 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 +58 -10
- 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 +1 -1
- package/dist/components/shape.min.css +1 -1
- package/dist/components/shape.min.js +1 -1
- package/dist/components/sidebar.css +1 -1
- package/dist/components/sidebar.js +1 -1
- package/dist/components/sidebar.min.css +1 -1
- package/dist/components/sidebar.min.js +1 -1
- 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.css +1 -1
- package/dist/components/slider.js +1 -1
- package/dist/components/slider.min.css +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 +7 -7
- package/dist/components/table.min.css +2 -2
- package/dist/components/text.css +1 -1
- package/dist/components/text.min.css +1 -1
- package/dist/components/toast.css +1 -1
- package/dist/components/toast.js +1 -1
- package/dist/components/toast.min.css +1 -1
- package/dist/components/toast.min.js +1 -1
- package/dist/components/transition.css +1 -1
- package/dist/components/transition.js +1 -1
- package/dist/components/transition.min.css +1 -1
- package/dist/components/transition.min.js +1 -1
- package/dist/components/visibility.js +1 -1
- package/dist/components/visibility.min.js +1 -1
- package/dist/semantic.css +59 -59
- package/dist/semantic.js +130 -48
- package/dist/semantic.min.css +2 -2
- package/dist/semantic.min.js +2 -2
- package/package.json +1 -1
- package/src/definitions/collections/table.less +6 -6
- package/src/definitions/modules/dropdown.js +43 -11
- package/src/definitions/modules/dropdown.less +7 -0
- package/src/definitions/modules/nag.js +4 -2
- package/src/definitions/modules/search.js +57 -9
- package/src/definitions/modules/search.less +9 -2
- package/src/themes/default/globals/site.variables +3 -0
- package/src/themes/default/globals/variation.variables +2 -0
- package/src/themes/default/modules/dropdown.variables +3 -0
- package/src/themes/default/modules/search.variables +3 -0
- package/types/fomantic-ui-dropdown.d.ts +6 -0
- package/types/fomantic-ui-search.d.ts +12 -0
package/dist/semantic.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
/*
|
2
|
-
* # Fomantic UI - 2.9.4-beta.
|
2
|
+
* # Fomantic UI - 2.9.4-beta.33+6daf34d
|
3
3
|
* https://github.com/fomantic/Fomantic-UI
|
4
4
|
* https://fomantic-ui.com/
|
5
5
|
*
|
@@ -9,7 +9,7 @@
|
|
9
9
|
*
|
10
10
|
*/
|
11
11
|
/*!
|
12
|
-
* # Fomantic-UI 2.9.4-beta.
|
12
|
+
* # Fomantic-UI 2.9.4-beta.33+6daf34d - Site
|
13
13
|
* https://github.com/fomantic/Fomantic-UI/
|
14
14
|
*
|
15
15
|
*
|
@@ -465,7 +465,7 @@
|
|
465
465
|
})(jQuery, window, document);
|
466
466
|
|
467
467
|
/*!
|
468
|
-
* # Fomantic-UI 2.9.4-beta.
|
468
|
+
* # Fomantic-UI 2.9.4-beta.33+6daf34d - Form Validation
|
469
469
|
* https://github.com/fomantic/Fomantic-UI/
|
470
470
|
*
|
471
471
|
*
|
@@ -2647,7 +2647,7 @@
|
|
2647
2647
|
})(jQuery, window, document);
|
2648
2648
|
|
2649
2649
|
/*!
|
2650
|
-
* # Fomantic-UI 2.9.4-beta.
|
2650
|
+
* # Fomantic-UI 2.9.4-beta.33+6daf34d - Accordion
|
2651
2651
|
* https://github.com/fomantic/Fomantic-UI/
|
2652
2652
|
*
|
2653
2653
|
*
|
@@ -3243,7 +3243,7 @@
|
|
3243
3243
|
})(jQuery, window, document);
|
3244
3244
|
|
3245
3245
|
/*!
|
3246
|
-
* # Fomantic-UI 2.9.4-beta.
|
3246
|
+
* # Fomantic-UI 2.9.4-beta.33+6daf34d - Calendar
|
3247
3247
|
* https://github.com/fomantic/Fomantic-UI/
|
3248
3248
|
*
|
3249
3249
|
*
|
@@ -5256,7 +5256,7 @@
|
|
5256
5256
|
})(jQuery, window, document);
|
5257
5257
|
|
5258
5258
|
/*!
|
5259
|
-
* # Fomantic-UI 2.9.4-beta.
|
5259
|
+
* # Fomantic-UI 2.9.4-beta.33+6daf34d - Checkbox
|
5260
5260
|
* https://github.com/fomantic/Fomantic-UI/
|
5261
5261
|
*
|
5262
5262
|
*
|
@@ -6141,7 +6141,7 @@
|
|
6141
6141
|
})(jQuery, window, document);
|
6142
6142
|
|
6143
6143
|
/*!
|
6144
|
-
* # Fomantic-UI 2.9.4-beta.
|
6144
|
+
* # Fomantic-UI 2.9.4-beta.33+6daf34d - Dimmer
|
6145
6145
|
* https://github.com/fomantic/Fomantic-UI/
|
6146
6146
|
*
|
6147
6147
|
*
|
@@ -6874,7 +6874,7 @@
|
|
6874
6874
|
})(jQuery, window, document);
|
6875
6875
|
|
6876
6876
|
/*!
|
6877
|
-
* # Fomantic-UI 2.9.4-beta.
|
6877
|
+
* # Fomantic-UI 2.9.4-beta.33+6daf34d - Dropdown
|
6878
6878
|
* https://github.com/fomantic/Fomantic-UI/
|
6879
6879
|
*
|
6880
6880
|
*
|
@@ -7765,11 +7765,13 @@
|
|
7765
7765
|
? query
|
7766
7766
|
: module.get.query()
|
7767
7767
|
),
|
7768
|
-
results
|
7769
|
-
escapedTerm
|
7770
|
-
|
7768
|
+
results = null,
|
7769
|
+
escapedTerm = module.escape.string(searchTerm),
|
7770
|
+
regExpIgnore = settings.ignoreSearchCase ? 'i' : '',
|
7771
|
+
regExpFlags = regExpIgnore + 'gm',
|
7771
7772
|
beginsWithRegExp = new RegExp('^' + escapedTerm, regExpFlags)
|
7772
7773
|
;
|
7774
|
+
module.remove.filteredItem();
|
7773
7775
|
// avoid loop if we're matching nothing
|
7774
7776
|
if (module.has.query()) {
|
7775
7777
|
results = [];
|
@@ -7813,12 +7815,34 @@
|
|
7813
7815
|
;
|
7814
7816
|
}
|
7815
7817
|
module.debug('Showing only matched items', searchTerm);
|
7816
|
-
module.remove.filteredItem();
|
7817
7818
|
if (results) {
|
7818
7819
|
$item
|
7819
7820
|
.not(results)
|
7820
7821
|
.addClass(className.filtered)
|
7821
7822
|
;
|
7823
|
+
if (settings.highlightMatches && (settings.match === 'both' || settings.match === 'text')) {
|
7824
|
+
var querySplit = query.split(''),
|
7825
|
+
diacriticReg = settings.ignoreDiacritics ? '[\u0300-\u036F]?' : '',
|
7826
|
+
htmlReg = '(?![^<]*>)',
|
7827
|
+
markedRegExp = new RegExp(htmlReg + '(' + querySplit.join(diacriticReg + ')(.*?)' + htmlReg + '(') + diacriticReg + ')', regExpIgnore),
|
7828
|
+
markedReplacer = function () {
|
7829
|
+
var args = [].slice.call(arguments, 1, querySplit.length * 2).map(function (x, i) {
|
7830
|
+
return i & 1 ? x : '<mark>' + x + '</mark>'; // eslint-disable-line no-bitwise
|
7831
|
+
});
|
7832
|
+
|
7833
|
+
return args.join('');
|
7834
|
+
}
|
7835
|
+
;
|
7836
|
+
$.each(results, function (index, result) {
|
7837
|
+
var $result = $(result),
|
7838
|
+
markedHTML = module.get.choiceText($result, true)
|
7839
|
+
;
|
7840
|
+
if (settings.ignoreDiacritics) {
|
7841
|
+
markedHTML = markedHTML.normalize('NFD');
|
7842
|
+
}
|
7843
|
+
$result.html(markedHTML.replace(markedRegExp, markedReplacer));
|
7844
|
+
});
|
7845
|
+
}
|
7822
7846
|
}
|
7823
7847
|
|
7824
7848
|
if (!module.has.query()) {
|
@@ -7854,8 +7878,10 @@
|
|
7854
7878
|
termLength = term.length,
|
7855
7879
|
queryLength = query.length
|
7856
7880
|
;
|
7857
|
-
|
7858
|
-
|
7881
|
+
if (settings.ignoreSearchCase) {
|
7882
|
+
query = query.toLowerCase();
|
7883
|
+
term = term.toLowerCase();
|
7884
|
+
}
|
7859
7885
|
if (queryLength > termLength) {
|
7860
7886
|
return false;
|
7861
7887
|
}
|
@@ -8062,7 +8088,7 @@
|
|
8062
8088
|
if (!itemActivated && !pageLostFocus) {
|
8063
8089
|
if (settings.forceSelection) {
|
8064
8090
|
module.forceSelection();
|
8065
|
-
} else if (!settings.allowAdditions) {
|
8091
|
+
} else if (!settings.allowAdditions && !settings.keepSearchTerm && !module.has.menuSearch()) {
|
8066
8092
|
module.remove.searchTerm();
|
8067
8093
|
}
|
8068
8094
|
module.hide();
|
@@ -9959,6 +9985,12 @@
|
|
9959
9985
|
$item.removeClass(className.active);
|
9960
9986
|
},
|
9961
9987
|
filteredItem: function () {
|
9988
|
+
if (settings.highlightMatches) {
|
9989
|
+
$.each($item, function (index, item) {
|
9990
|
+
var $markItem = $(item);
|
9991
|
+
$markItem.html($markItem.html().replace(/<\/?mark>/g, ''));
|
9992
|
+
});
|
9993
|
+
}
|
9962
9994
|
if (settings.useLabels && module.has.maxSelections()) {
|
9963
9995
|
return;
|
9964
9996
|
}
|
@@ -10668,6 +10700,7 @@
|
|
10668
10700
|
return text.replace(regExp.escape, '\\$&');
|
10669
10701
|
},
|
10670
10702
|
htmlEntities: function (string, forceAmpersand) {
|
10703
|
+
forceAmpersand = typeof forceAmpersand === 'number' ? false : forceAmpersand;
|
10671
10704
|
var
|
10672
10705
|
badChars = /["'<>`]/g,
|
10673
10706
|
shouldEscape = /["&'<>`]/,
|
@@ -10684,8 +10717,7 @@
|
|
10684
10717
|
;
|
10685
10718
|
if (shouldEscape.test(string)) {
|
10686
10719
|
string = string.replace(forceAmpersand ? /&/g : /&(?![\d#a-z]{1,12};)/gi, '&');
|
10687
|
-
|
10688
|
-
return string.replace(badChars, escapedChar);
|
10720
|
+
string = string.replace(badChars, escapedChar);
|
10689
10721
|
}
|
10690
10722
|
|
10691
10723
|
return string;
|
@@ -10890,6 +10922,7 @@
|
|
10890
10922
|
|
10891
10923
|
match: 'both', // what to match against with search selection (both, text, or label)
|
10892
10924
|
fullTextSearch: 'exact', // search anywhere in value (set to 'exact' to require exact matches)
|
10925
|
+
highlightMatches: false, // Whether search result should highlight matching strings
|
10893
10926
|
ignoreDiacritics: false, // match results also if they contain diacritics of the same base character (for example searching for "a" will also match "á" or "â" or "à", etc...)
|
10894
10927
|
hideDividers: false, // Whether to hide any divider elements (specified in selector.divider) that are sibling to any items when searched (set to true will hide all dividers, set to 'empty' will hide them when they are not followed by a visible item)
|
10895
10928
|
|
@@ -11114,8 +11147,7 @@
|
|
11114
11147
|
;
|
11115
11148
|
if (shouldEscape.test(string)) {
|
11116
11149
|
string = string.replace(/&(?![\d#a-z]{1,12};)/gi, '&');
|
11117
|
-
|
11118
|
-
return string.replace(badChars, escapedChar);
|
11150
|
+
string = string.replace(badChars, escapedChar);
|
11119
11151
|
}
|
11120
11152
|
|
11121
11153
|
return string;
|
@@ -11242,7 +11274,7 @@
|
|
11242
11274
|
})(jQuery, window, document);
|
11243
11275
|
|
11244
11276
|
/*!
|
11245
|
-
* # Fomantic-UI 2.9.4-beta.
|
11277
|
+
* # Fomantic-UI 2.9.4-beta.33+6daf34d - Embed
|
11246
11278
|
* https://github.com/fomantic/Fomantic-UI/
|
11247
11279
|
*
|
11248
11280
|
*
|
@@ -11923,7 +11955,7 @@
|
|
11923
11955
|
})(jQuery, window, document);
|
11924
11956
|
|
11925
11957
|
/*!
|
11926
|
-
* # Fomantic-UI 2.9.4-beta.
|
11958
|
+
* # Fomantic-UI 2.9.4-beta.33+6daf34d - Flyout
|
11927
11959
|
* https://github.com/fomantic/Fomantic-UI/
|
11928
11960
|
*
|
11929
11961
|
*
|
@@ -13475,7 +13507,7 @@
|
|
13475
13507
|
})(jQuery, window, document);
|
13476
13508
|
|
13477
13509
|
/*!
|
13478
|
-
* # Fomantic-UI 2.9.4-beta.
|
13510
|
+
* # Fomantic-UI 2.9.4-beta.33+6daf34d - Modal
|
13479
13511
|
* https://github.com/fomantic/Fomantic-UI/
|
13480
13512
|
*
|
13481
13513
|
*
|
@@ -15113,7 +15145,7 @@
|
|
15113
15145
|
})(jQuery, window, document);
|
15114
15146
|
|
15115
15147
|
/*!
|
15116
|
-
* # Fomantic-UI 2.9.4-beta.
|
15148
|
+
* # Fomantic-UI 2.9.4-beta.33+6daf34d - Nag
|
15117
15149
|
* https://github.com/fomantic/Fomantic-UI/
|
15118
15150
|
*
|
15119
15151
|
*
|
@@ -15260,8 +15292,10 @@
|
|
15260
15292
|
module.debug('Dismissing nag', settings.storageMethod, settings.key, settings.value, settings.expires);
|
15261
15293
|
module.storage.set(settings.key, settings.value);
|
15262
15294
|
}
|
15263
|
-
event
|
15264
|
-
|
15295
|
+
if (event) {
|
15296
|
+
event.stopImmediatePropagation();
|
15297
|
+
event.preventDefault();
|
15298
|
+
}
|
15265
15299
|
},
|
15266
15300
|
|
15267
15301
|
should: {
|
@@ -15678,7 +15712,7 @@
|
|
15678
15712
|
})(jQuery, window, document);
|
15679
15713
|
|
15680
15714
|
/*!
|
15681
|
-
* # Fomantic-UI 2.9.4-beta.
|
15715
|
+
* # Fomantic-UI 2.9.4-beta.33+6daf34d - Popup
|
15682
15716
|
* https://github.com/fomantic/Fomantic-UI/
|
15683
15717
|
*
|
15684
15718
|
*
|
@@ -17240,7 +17274,7 @@
|
|
17240
17274
|
})(jQuery, window, document);
|
17241
17275
|
|
17242
17276
|
/*!
|
17243
|
-
* # Fomantic-UI 2.9.4-beta.
|
17277
|
+
* # Fomantic-UI 2.9.4-beta.33+6daf34d - Progress
|
17244
17278
|
* https://github.com/fomantic/Fomantic-UI/
|
17245
17279
|
*
|
17246
17280
|
*
|
@@ -18220,7 +18254,7 @@
|
|
18220
18254
|
})(jQuery, window, document);
|
18221
18255
|
|
18222
18256
|
/*!
|
18223
|
-
* # Fomantic-UI 2.9.4-beta.
|
18257
|
+
* # Fomantic-UI 2.9.4-beta.33+6daf34d - Slider
|
18224
18258
|
* https://github.com/fomantic/Fomantic-UI/
|
18225
18259
|
*
|
18226
18260
|
*
|
@@ -19671,7 +19705,7 @@
|
|
19671
19705
|
})(jQuery, window, document);
|
19672
19706
|
|
19673
19707
|
/*!
|
19674
|
-
* # Fomantic-UI 2.9.4-beta.
|
19708
|
+
* # Fomantic-UI 2.9.4-beta.33+6daf34d - Rating
|
19675
19709
|
* https://github.com/fomantic/Fomantic-UI/
|
19676
19710
|
*
|
19677
19711
|
*
|
@@ -20212,7 +20246,7 @@
|
|
20212
20246
|
})(jQuery, window, document);
|
20213
20247
|
|
20214
20248
|
/*!
|
20215
|
-
* # Fomantic-UI 2.9.4-beta.
|
20249
|
+
* # Fomantic-UI 2.9.4-beta.33+6daf34d - Search
|
20216
20250
|
* https://github.com/fomantic/Fomantic-UI/
|
20217
20251
|
*
|
20218
20252
|
*
|
@@ -20348,7 +20382,10 @@
|
|
20348
20382
|
// this makes sure $.extend does not add specified search fields to default fields
|
20349
20383
|
// this is the only setting which should not extend defaults
|
20350
20384
|
if (parameters && parameters.searchFields !== undefined) {
|
20351
|
-
settings.searchFields = parameters.searchFields
|
20385
|
+
settings.searchFields = Array.isArray(parameters.searchFields)
|
20386
|
+
? parameters.searchFields
|
20387
|
+
: [parameters.searchFields]
|
20388
|
+
;
|
20352
20389
|
}
|
20353
20390
|
},
|
20354
20391
|
},
|
@@ -20844,7 +20881,7 @@
|
|
20844
20881
|
exactResults = [],
|
20845
20882
|
fuzzyResults = [],
|
20846
20883
|
searchExp = searchTerm.replace(regExp.escape, '\\$&'),
|
20847
|
-
matchRegExp
|
20884
|
+
matchRegExp = new RegExp(regExp.beginsWith + searchExp, settings.ignoreSearchCase ? 'i' : ''),
|
20848
20885
|
|
20849
20886
|
// avoid duplicates when pushing results
|
20850
20887
|
addResult = function (array, result) {
|
@@ -20880,13 +20917,14 @@
|
|
20880
20917
|
var concatenatedContent = [];
|
20881
20918
|
$.each(searchFields, function (index, field) {
|
20882
20919
|
var
|
20883
|
-
fieldExists =
|
20920
|
+
fieldExists = typeof content[field] === 'string' || typeof content[field] === 'number'
|
20884
20921
|
;
|
20885
20922
|
if (fieldExists) {
|
20886
20923
|
var text;
|
20887
20924
|
text = typeof content[field] === 'string'
|
20888
20925
|
? module.remove.diacritics(content[field])
|
20889
20926
|
: content[field].toString();
|
20927
|
+
text = $('<div/>', { html: text }).text().trim();
|
20890
20928
|
if (settings.fullTextSearch === 'all') {
|
20891
20929
|
concatenatedContent.push(text);
|
20892
20930
|
if (index < lastSearchFieldIndex) {
|
@@ -20917,8 +20955,10 @@
|
|
20917
20955
|
},
|
20918
20956
|
},
|
20919
20957
|
exactSearch: function (query, term) {
|
20920
|
-
|
20921
|
-
|
20958
|
+
if (settings.ignoreSearchCase) {
|
20959
|
+
query = query.toLowerCase();
|
20960
|
+
term = term.toLowerCase();
|
20961
|
+
}
|
20922
20962
|
|
20923
20963
|
return term.indexOf(query) > -1;
|
20924
20964
|
},
|
@@ -20945,8 +20985,10 @@
|
|
20945
20985
|
if (typeof query !== 'string') {
|
20946
20986
|
return false;
|
20947
20987
|
}
|
20948
|
-
|
20949
|
-
|
20988
|
+
if (settings.ignoreSearchCase) {
|
20989
|
+
query = query.toLowerCase();
|
20990
|
+
term = term.toLowerCase();
|
20991
|
+
}
|
20950
20992
|
if (queryLength > termLength) {
|
20951
20993
|
return false;
|
20952
20994
|
}
|
@@ -21301,6 +21343,39 @@
|
|
21301
21343
|
response[fields.results] = response[fields.results].slice(0, settings.maxResults);
|
21302
21344
|
}
|
21303
21345
|
}
|
21346
|
+
if (settings.highlightMatches) {
|
21347
|
+
var results = response[fields.results],
|
21348
|
+
regExpIgnore = settings.ignoreSearchCase ? 'i' : '',
|
21349
|
+
querySplit = module.get.value().split(''),
|
21350
|
+
diacriticReg = settings.ignoreDiacritics ? '[\u0300-\u036F]?' : '',
|
21351
|
+
htmlReg = '(?![^<]*>)',
|
21352
|
+
markedRegExp = new RegExp(htmlReg + '(' + querySplit.join(diacriticReg + ')(.*?)' + htmlReg + '(') + diacriticReg + ')', regExpIgnore),
|
21353
|
+
markedReplacer = function () {
|
21354
|
+
var args = [].slice.call(arguments, 1, querySplit.length * 2).map(function (x, i) {
|
21355
|
+
return i & 1 ? x : '<mark>' + x + '</mark>'; // eslint-disable-line no-bitwise
|
21356
|
+
});
|
21357
|
+
|
21358
|
+
return args.join('');
|
21359
|
+
}
|
21360
|
+
;
|
21361
|
+
$.each(results, function (label, content) {
|
21362
|
+
$.each(settings.searchFields, function (index, field) {
|
21363
|
+
var
|
21364
|
+
fieldExists = typeof content[field] === 'string' || typeof content[field] === 'number'
|
21365
|
+
;
|
21366
|
+
if (fieldExists) {
|
21367
|
+
var markedHTML = typeof content[field] === 'string'
|
21368
|
+
? content[field]
|
21369
|
+
: content[field].toString();
|
21370
|
+
if (settings.ignoreDiacritics) {
|
21371
|
+
markedHTML = markedHTML.normalize('NFD');
|
21372
|
+
}
|
21373
|
+
markedHTML = markedHTML.replace(/<\/?mark>/g, '');
|
21374
|
+
response[fields.results][label][field] = markedHTML.replace(markedRegExp, markedReplacer);
|
21375
|
+
}
|
21376
|
+
});
|
21377
|
+
});
|
21378
|
+
}
|
21304
21379
|
if (isFunction(template)) {
|
21305
21380
|
html = template(response, fields, settings.preserveHTML);
|
21306
21381
|
} else {
|
@@ -21529,9 +21604,15 @@
|
|
21529
21604
|
// search anywhere in value (set to 'exact' to require exact matches
|
21530
21605
|
fullTextSearch: 'exact',
|
21531
21606
|
|
21607
|
+
// Whether search result should highlight matching strings
|
21608
|
+
highlightMatches: false,
|
21609
|
+
|
21532
21610
|
// match results also if they contain diacritics of the same base character (for example searching for "a" will also match "á" or "â" or "à", etc...)
|
21533
21611
|
ignoreDiacritics: false,
|
21534
21612
|
|
21613
|
+
// whether to consider case sensitivity on local searching
|
21614
|
+
ignoreSearchCase: true,
|
21615
|
+
|
21535
21616
|
// whether to add events to prompt automatically
|
21536
21617
|
automatic: true,
|
21537
21618
|
|
@@ -21649,8 +21730,9 @@
|
|
21649
21730
|
};
|
21650
21731
|
if (shouldEscape.test(string)) {
|
21651
21732
|
string = string.replace(/&(?![\d#a-z]{1,12};)/gi, '&');
|
21652
|
-
|
21653
|
-
|
21733
|
+
string = string.replace(badChars, escapedChar);
|
21734
|
+
// FUI controlled HTML is still allowed
|
21735
|
+
string = string.replace(/<(\/)*mark>/g, '<$1mark>');
|
21654
21736
|
}
|
21655
21737
|
|
21656
21738
|
return string;
|
@@ -21794,7 +21876,7 @@
|
|
21794
21876
|
})(jQuery, window, document);
|
21795
21877
|
|
21796
21878
|
/*!
|
21797
|
-
* # Fomantic-UI 2.9.4-beta.
|
21879
|
+
* # Fomantic-UI 2.9.4-beta.33+6daf34d - Shape
|
21798
21880
|
* https://github.com/fomantic/Fomantic-UI/
|
21799
21881
|
*
|
21800
21882
|
*
|
@@ -22592,7 +22674,7 @@
|
|
22592
22674
|
})(jQuery, window, document);
|
22593
22675
|
|
22594
22676
|
/*!
|
22595
|
-
* # Fomantic-UI 2.9.4-beta.
|
22677
|
+
* # Fomantic-UI 2.9.4-beta.33+6daf34d - Sidebar
|
22596
22678
|
* https://github.com/fomantic/Fomantic-UI/
|
22597
22679
|
*
|
22598
22680
|
*
|
@@ -23647,7 +23729,7 @@
|
|
23647
23729
|
})(jQuery, window, document);
|
23648
23730
|
|
23649
23731
|
/*!
|
23650
|
-
* # Fomantic-UI 2.9.4-beta.
|
23732
|
+
* # Fomantic-UI 2.9.4-beta.33+6daf34d - Sticky
|
23651
23733
|
* https://github.com/fomantic/Fomantic-UI/
|
23652
23734
|
*
|
23653
23735
|
*
|
@@ -24565,7 +24647,7 @@
|
|
24565
24647
|
})(jQuery, window, document);
|
24566
24648
|
|
24567
24649
|
/*!
|
24568
|
-
* # Fomantic-UI 2.9.4-beta.
|
24650
|
+
* # Fomantic-UI 2.9.4-beta.33+6daf34d - Tab
|
24569
24651
|
* https://github.com/fomantic/Fomantic-UI/
|
24570
24652
|
*
|
24571
24653
|
*
|
@@ -25533,7 +25615,7 @@
|
|
25533
25615
|
})(jQuery, window, document);
|
25534
25616
|
|
25535
25617
|
/*!
|
25536
|
-
* # Fomantic-UI 2.9.4-beta.
|
25618
|
+
* # Fomantic-UI 2.9.4-beta.33+6daf34d - Toast
|
25537
25619
|
* https://github.com/fomantic/Fomantic-UI/
|
25538
25620
|
*
|
25539
25621
|
*
|
@@ -26496,7 +26578,7 @@
|
|
26496
26578
|
})(jQuery, window, document);
|
26497
26579
|
|
26498
26580
|
/*!
|
26499
|
-
* # Fomantic-UI 2.9.4-beta.
|
26581
|
+
* # Fomantic-UI 2.9.4-beta.33+6daf34d - Transition
|
26500
26582
|
* https://github.com/fomantic/Fomantic-UI/
|
26501
26583
|
*
|
26502
26584
|
*
|
@@ -27531,7 +27613,7 @@
|
|
27531
27613
|
})(jQuery, window, document);
|
27532
27614
|
|
27533
27615
|
/*!
|
27534
|
-
* # Fomantic-UI 2.9.4-beta.
|
27616
|
+
* # Fomantic-UI 2.9.4-beta.33+6daf34d - API
|
27535
27617
|
* https://github.com/fomantic/Fomantic-UI/
|
27536
27618
|
*
|
27537
27619
|
*
|
@@ -28757,7 +28839,7 @@
|
|
28757
28839
|
})(jQuery, window, document);
|
28758
28840
|
|
28759
28841
|
/*!
|
28760
|
-
* # Fomantic-UI 2.9.4-beta.
|
28842
|
+
* # Fomantic-UI 2.9.4-beta.33+6daf34d - State
|
28761
28843
|
* https://github.com/fomantic/Fomantic-UI/
|
28762
28844
|
*
|
28763
28845
|
*
|
@@ -29455,7 +29537,7 @@
|
|
29455
29537
|
})(jQuery, window, document);
|
29456
29538
|
|
29457
29539
|
/*!
|
29458
|
-
* # Fomantic-UI 2.9.4-beta.
|
29540
|
+
* # Fomantic-UI 2.9.4-beta.33+6daf34d - Visibility
|
29459
29541
|
* https://github.com/fomantic/Fomantic-UI/
|
29460
29542
|
*
|
29461
29543
|
*
|