fomantic-ui 2.9.4-beta.30 → 2.9.4-beta.32
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 +42 -11
- 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 +1 -1
- package/dist/components/nag.min.css +1 -1
- package/dist/components/nag.min.js +1 -1
- package/dist/components/placeholder.css +1 -1
- package/dist/components/placeholder.min.css +1 -1
- package/dist/components/popup.css +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 +124 -45
- 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 +41 -10
- package/src/definitions/modules/dropdown.less +7 -0
- 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/dist/semantic.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
/*
|
2
|
-
* # Fomantic UI - 2.9.4-beta.
|
2
|
+
* # Fomantic UI - 2.9.4-beta.32+94e4e87
|
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.32+94e4e87 - 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.32+94e4e87 - 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.32+94e4e87 - 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.32+94e4e87 - 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.32+94e4e87 - 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.32+94e4e87 - 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.32+94e4e87 - 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
|
}
|
@@ -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
|
}
|
@@ -10684,8 +10716,7 @@
|
|
10684
10716
|
;
|
10685
10717
|
if (shouldEscape.test(string)) {
|
10686
10718
|
string = string.replace(forceAmpersand ? /&/g : /&(?![\d#a-z]{1,12};)/gi, '&');
|
10687
|
-
|
10688
|
-
return string.replace(badChars, escapedChar);
|
10719
|
+
string = string.replace(badChars, escapedChar);
|
10689
10720
|
}
|
10690
10721
|
|
10691
10722
|
return string;
|
@@ -10890,6 +10921,7 @@
|
|
10890
10921
|
|
10891
10922
|
match: 'both', // what to match against with search selection (both, text, or label)
|
10892
10923
|
fullTextSearch: 'exact', // search anywhere in value (set to 'exact' to require exact matches)
|
10924
|
+
highlightMatches: false, // Whether search result should highlight matching strings
|
10893
10925
|
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
10926
|
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
10927
|
|
@@ -11114,8 +11146,7 @@
|
|
11114
11146
|
;
|
11115
11147
|
if (shouldEscape.test(string)) {
|
11116
11148
|
string = string.replace(/&(?![\d#a-z]{1,12};)/gi, '&');
|
11117
|
-
|
11118
|
-
return string.replace(badChars, escapedChar);
|
11149
|
+
string = string.replace(badChars, escapedChar);
|
11119
11150
|
}
|
11120
11151
|
|
11121
11152
|
return string;
|
@@ -11242,7 +11273,7 @@
|
|
11242
11273
|
})(jQuery, window, document);
|
11243
11274
|
|
11244
11275
|
/*!
|
11245
|
-
* # Fomantic-UI 2.9.4-beta.
|
11276
|
+
* # Fomantic-UI 2.9.4-beta.32+94e4e87 - Embed
|
11246
11277
|
* https://github.com/fomantic/Fomantic-UI/
|
11247
11278
|
*
|
11248
11279
|
*
|
@@ -11923,7 +11954,7 @@
|
|
11923
11954
|
})(jQuery, window, document);
|
11924
11955
|
|
11925
11956
|
/*!
|
11926
|
-
* # Fomantic-UI 2.9.4-beta.
|
11957
|
+
* # Fomantic-UI 2.9.4-beta.32+94e4e87 - Flyout
|
11927
11958
|
* https://github.com/fomantic/Fomantic-UI/
|
11928
11959
|
*
|
11929
11960
|
*
|
@@ -13475,7 +13506,7 @@
|
|
13475
13506
|
})(jQuery, window, document);
|
13476
13507
|
|
13477
13508
|
/*!
|
13478
|
-
* # Fomantic-UI 2.9.4-beta.
|
13509
|
+
* # Fomantic-UI 2.9.4-beta.32+94e4e87 - Modal
|
13479
13510
|
* https://github.com/fomantic/Fomantic-UI/
|
13480
13511
|
*
|
13481
13512
|
*
|
@@ -15113,7 +15144,7 @@
|
|
15113
15144
|
})(jQuery, window, document);
|
15114
15145
|
|
15115
15146
|
/*!
|
15116
|
-
* # Fomantic-UI 2.9.4-beta.
|
15147
|
+
* # Fomantic-UI 2.9.4-beta.32+94e4e87 - Nag
|
15117
15148
|
* https://github.com/fomantic/Fomantic-UI/
|
15118
15149
|
*
|
15119
15150
|
*
|
@@ -15678,7 +15709,7 @@
|
|
15678
15709
|
})(jQuery, window, document);
|
15679
15710
|
|
15680
15711
|
/*!
|
15681
|
-
* # Fomantic-UI 2.9.4-beta.
|
15712
|
+
* # Fomantic-UI 2.9.4-beta.32+94e4e87 - Popup
|
15682
15713
|
* https://github.com/fomantic/Fomantic-UI/
|
15683
15714
|
*
|
15684
15715
|
*
|
@@ -17240,7 +17271,7 @@
|
|
17240
17271
|
})(jQuery, window, document);
|
17241
17272
|
|
17242
17273
|
/*!
|
17243
|
-
* # Fomantic-UI 2.9.4-beta.
|
17274
|
+
* # Fomantic-UI 2.9.4-beta.32+94e4e87 - Progress
|
17244
17275
|
* https://github.com/fomantic/Fomantic-UI/
|
17245
17276
|
*
|
17246
17277
|
*
|
@@ -18220,7 +18251,7 @@
|
|
18220
18251
|
})(jQuery, window, document);
|
18221
18252
|
|
18222
18253
|
/*!
|
18223
|
-
* # Fomantic-UI 2.9.4-beta.
|
18254
|
+
* # Fomantic-UI 2.9.4-beta.32+94e4e87 - Slider
|
18224
18255
|
* https://github.com/fomantic/Fomantic-UI/
|
18225
18256
|
*
|
18226
18257
|
*
|
@@ -19671,7 +19702,7 @@
|
|
19671
19702
|
})(jQuery, window, document);
|
19672
19703
|
|
19673
19704
|
/*!
|
19674
|
-
* # Fomantic-UI 2.9.4-beta.
|
19705
|
+
* # Fomantic-UI 2.9.4-beta.32+94e4e87 - Rating
|
19675
19706
|
* https://github.com/fomantic/Fomantic-UI/
|
19676
19707
|
*
|
19677
19708
|
*
|
@@ -20212,7 +20243,7 @@
|
|
20212
20243
|
})(jQuery, window, document);
|
20213
20244
|
|
20214
20245
|
/*!
|
20215
|
-
* # Fomantic-UI 2.9.4-beta.
|
20246
|
+
* # Fomantic-UI 2.9.4-beta.32+94e4e87 - Search
|
20216
20247
|
* https://github.com/fomantic/Fomantic-UI/
|
20217
20248
|
*
|
20218
20249
|
*
|
@@ -20348,7 +20379,10 @@
|
|
20348
20379
|
// this makes sure $.extend does not add specified search fields to default fields
|
20349
20380
|
// this is the only setting which should not extend defaults
|
20350
20381
|
if (parameters && parameters.searchFields !== undefined) {
|
20351
|
-
settings.searchFields = parameters.searchFields
|
20382
|
+
settings.searchFields = Array.isArray(parameters.searchFields)
|
20383
|
+
? parameters.searchFields
|
20384
|
+
: [parameters.searchFields]
|
20385
|
+
;
|
20352
20386
|
}
|
20353
20387
|
},
|
20354
20388
|
},
|
@@ -20844,7 +20878,7 @@
|
|
20844
20878
|
exactResults = [],
|
20845
20879
|
fuzzyResults = [],
|
20846
20880
|
searchExp = searchTerm.replace(regExp.escape, '\\$&'),
|
20847
|
-
matchRegExp
|
20881
|
+
matchRegExp = new RegExp(regExp.beginsWith + searchExp, settings.ignoreSearchCase ? 'i' : ''),
|
20848
20882
|
|
20849
20883
|
// avoid duplicates when pushing results
|
20850
20884
|
addResult = function (array, result) {
|
@@ -20880,13 +20914,14 @@
|
|
20880
20914
|
var concatenatedContent = [];
|
20881
20915
|
$.each(searchFields, function (index, field) {
|
20882
20916
|
var
|
20883
|
-
fieldExists =
|
20917
|
+
fieldExists = typeof content[field] === 'string' || typeof content[field] === 'number'
|
20884
20918
|
;
|
20885
20919
|
if (fieldExists) {
|
20886
20920
|
var text;
|
20887
20921
|
text = typeof content[field] === 'string'
|
20888
20922
|
? module.remove.diacritics(content[field])
|
20889
20923
|
: content[field].toString();
|
20924
|
+
text = $('<div/>', { html: text }).text().trim();
|
20890
20925
|
if (settings.fullTextSearch === 'all') {
|
20891
20926
|
concatenatedContent.push(text);
|
20892
20927
|
if (index < lastSearchFieldIndex) {
|
@@ -20917,8 +20952,10 @@
|
|
20917
20952
|
},
|
20918
20953
|
},
|
20919
20954
|
exactSearch: function (query, term) {
|
20920
|
-
|
20921
|
-
|
20955
|
+
if (settings.ignoreSearchCase) {
|
20956
|
+
query = query.toLowerCase();
|
20957
|
+
term = term.toLowerCase();
|
20958
|
+
}
|
20922
20959
|
|
20923
20960
|
return term.indexOf(query) > -1;
|
20924
20961
|
},
|
@@ -20945,8 +20982,10 @@
|
|
20945
20982
|
if (typeof query !== 'string') {
|
20946
20983
|
return false;
|
20947
20984
|
}
|
20948
|
-
|
20949
|
-
|
20985
|
+
if (settings.ignoreSearchCase) {
|
20986
|
+
query = query.toLowerCase();
|
20987
|
+
term = term.toLowerCase();
|
20988
|
+
}
|
20950
20989
|
if (queryLength > termLength) {
|
20951
20990
|
return false;
|
20952
20991
|
}
|
@@ -21301,6 +21340,39 @@
|
|
21301
21340
|
response[fields.results] = response[fields.results].slice(0, settings.maxResults);
|
21302
21341
|
}
|
21303
21342
|
}
|
21343
|
+
if (settings.highlightMatches) {
|
21344
|
+
var results = response[fields.results],
|
21345
|
+
regExpIgnore = settings.ignoreSearchCase ? 'i' : '',
|
21346
|
+
querySplit = module.get.value().split(''),
|
21347
|
+
diacriticReg = settings.ignoreDiacritics ? '[\u0300-\u036F]?' : '',
|
21348
|
+
htmlReg = '(?![^<]*>)',
|
21349
|
+
markedRegExp = new RegExp(htmlReg + '(' + querySplit.join(diacriticReg + ')(.*?)' + htmlReg + '(') + diacriticReg + ')', regExpIgnore),
|
21350
|
+
markedReplacer = function () {
|
21351
|
+
var args = [].slice.call(arguments, 1, querySplit.length * 2).map(function (x, i) {
|
21352
|
+
return i & 1 ? x : '<mark>' + x + '</mark>'; // eslint-disable-line no-bitwise
|
21353
|
+
});
|
21354
|
+
|
21355
|
+
return args.join('');
|
21356
|
+
}
|
21357
|
+
;
|
21358
|
+
$.each(results, function (label, content) {
|
21359
|
+
$.each(settings.searchFields, function (index, field) {
|
21360
|
+
var
|
21361
|
+
fieldExists = typeof content[field] === 'string' || typeof content[field] === 'number'
|
21362
|
+
;
|
21363
|
+
if (fieldExists) {
|
21364
|
+
var markedHTML = typeof content[field] === 'string'
|
21365
|
+
? content[field]
|
21366
|
+
: content[field].toString();
|
21367
|
+
if (settings.ignoreDiacritics) {
|
21368
|
+
markedHTML = markedHTML.normalize('NFD');
|
21369
|
+
}
|
21370
|
+
markedHTML = markedHTML.replace(/<\/?mark>/g, '');
|
21371
|
+
response[fields.results][label][field] = markedHTML.replace(markedRegExp, markedReplacer);
|
21372
|
+
}
|
21373
|
+
});
|
21374
|
+
});
|
21375
|
+
}
|
21304
21376
|
if (isFunction(template)) {
|
21305
21377
|
html = template(response, fields, settings.preserveHTML);
|
21306
21378
|
} else {
|
@@ -21529,9 +21601,15 @@
|
|
21529
21601
|
// search anywhere in value (set to 'exact' to require exact matches
|
21530
21602
|
fullTextSearch: 'exact',
|
21531
21603
|
|
21604
|
+
// Whether search result should highlight matching strings
|
21605
|
+
highlightMatches: false,
|
21606
|
+
|
21532
21607
|
// match results also if they contain diacritics of the same base character (for example searching for "a" will also match "á" or "â" or "à", etc...)
|
21533
21608
|
ignoreDiacritics: false,
|
21534
21609
|
|
21610
|
+
// whether to consider case sensitivity on local searching
|
21611
|
+
ignoreSearchCase: true,
|
21612
|
+
|
21535
21613
|
// whether to add events to prompt automatically
|
21536
21614
|
automatic: true,
|
21537
21615
|
|
@@ -21649,8 +21727,9 @@
|
|
21649
21727
|
};
|
21650
21728
|
if (shouldEscape.test(string)) {
|
21651
21729
|
string = string.replace(/&(?![\d#a-z]{1,12};)/gi, '&');
|
21652
|
-
|
21653
|
-
|
21730
|
+
string = string.replace(badChars, escapedChar);
|
21731
|
+
// FUI controlled HTML is still allowed
|
21732
|
+
string = string.replace(/<(\/)*mark>/g, '<$1mark>');
|
21654
21733
|
}
|
21655
21734
|
|
21656
21735
|
return string;
|
@@ -21794,7 +21873,7 @@
|
|
21794
21873
|
})(jQuery, window, document);
|
21795
21874
|
|
21796
21875
|
/*!
|
21797
|
-
* # Fomantic-UI 2.9.4-beta.
|
21876
|
+
* # Fomantic-UI 2.9.4-beta.32+94e4e87 - Shape
|
21798
21877
|
* https://github.com/fomantic/Fomantic-UI/
|
21799
21878
|
*
|
21800
21879
|
*
|
@@ -22592,7 +22671,7 @@
|
|
22592
22671
|
})(jQuery, window, document);
|
22593
22672
|
|
22594
22673
|
/*!
|
22595
|
-
* # Fomantic-UI 2.9.4-beta.
|
22674
|
+
* # Fomantic-UI 2.9.4-beta.32+94e4e87 - Sidebar
|
22596
22675
|
* https://github.com/fomantic/Fomantic-UI/
|
22597
22676
|
*
|
22598
22677
|
*
|
@@ -23647,7 +23726,7 @@
|
|
23647
23726
|
})(jQuery, window, document);
|
23648
23727
|
|
23649
23728
|
/*!
|
23650
|
-
* # Fomantic-UI 2.9.4-beta.
|
23729
|
+
* # Fomantic-UI 2.9.4-beta.32+94e4e87 - Sticky
|
23651
23730
|
* https://github.com/fomantic/Fomantic-UI/
|
23652
23731
|
*
|
23653
23732
|
*
|
@@ -24565,7 +24644,7 @@
|
|
24565
24644
|
})(jQuery, window, document);
|
24566
24645
|
|
24567
24646
|
/*!
|
24568
|
-
* # Fomantic-UI 2.9.4-beta.
|
24647
|
+
* # Fomantic-UI 2.9.4-beta.32+94e4e87 - Tab
|
24569
24648
|
* https://github.com/fomantic/Fomantic-UI/
|
24570
24649
|
*
|
24571
24650
|
*
|
@@ -25533,7 +25612,7 @@
|
|
25533
25612
|
})(jQuery, window, document);
|
25534
25613
|
|
25535
25614
|
/*!
|
25536
|
-
* # Fomantic-UI 2.9.4-beta.
|
25615
|
+
* # Fomantic-UI 2.9.4-beta.32+94e4e87 - Toast
|
25537
25616
|
* https://github.com/fomantic/Fomantic-UI/
|
25538
25617
|
*
|
25539
25618
|
*
|
@@ -26496,7 +26575,7 @@
|
|
26496
26575
|
})(jQuery, window, document);
|
26497
26576
|
|
26498
26577
|
/*!
|
26499
|
-
* # Fomantic-UI 2.9.4-beta.
|
26578
|
+
* # Fomantic-UI 2.9.4-beta.32+94e4e87 - Transition
|
26500
26579
|
* https://github.com/fomantic/Fomantic-UI/
|
26501
26580
|
*
|
26502
26581
|
*
|
@@ -27531,7 +27610,7 @@
|
|
27531
27610
|
})(jQuery, window, document);
|
27532
27611
|
|
27533
27612
|
/*!
|
27534
|
-
* # Fomantic-UI 2.9.4-beta.
|
27613
|
+
* # Fomantic-UI 2.9.4-beta.32+94e4e87 - API
|
27535
27614
|
* https://github.com/fomantic/Fomantic-UI/
|
27536
27615
|
*
|
27537
27616
|
*
|
@@ -28757,7 +28836,7 @@
|
|
28757
28836
|
})(jQuery, window, document);
|
28758
28837
|
|
28759
28838
|
/*!
|
28760
|
-
* # Fomantic-UI 2.9.4-beta.
|
28839
|
+
* # Fomantic-UI 2.9.4-beta.32+94e4e87 - State
|
28761
28840
|
* https://github.com/fomantic/Fomantic-UI/
|
28762
28841
|
*
|
28763
28842
|
*
|
@@ -29455,7 +29534,7 @@
|
|
29455
29534
|
})(jQuery, window, document);
|
29456
29535
|
|
29457
29536
|
/*!
|
29458
|
-
* # Fomantic-UI 2.9.4-beta.
|
29537
|
+
* # Fomantic-UI 2.9.4-beta.32+94e4e87 - Visibility
|
29459
29538
|
* https://github.com/fomantic/Fomantic-UI/
|
29460
29539
|
*
|
29461
29540
|
*
|