@appbaseio/reactivesearch-vue 3.0.0-rc.8 → 3.0.0-rc.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/@appbaseio/reactivesearch-vue.umd.js +405 -2181
- package/dist/@appbaseio/reactivesearch-vue.umd.js.map +1 -1
- package/dist/@appbaseio/reactivesearch-vue.umd.min.js +5 -5
- package/dist/@appbaseio/reactivesearch-vue.umd.min.js.map +1 -1
- package/dist/cjs/{DropDown-82d92f8b.js → DropDown-aef75c14.js} +4 -12
- package/dist/cjs/{Input-fcd780de.js → Input-56eba499.js} +16 -28
- package/dist/cjs/MultiDropdownList.js +2 -2
- package/dist/cjs/MultiList.js +1 -1
- package/dist/cjs/RangeInput.js +1 -1
- package/dist/cjs/SingleDropdownList.js +2 -2
- package/dist/cjs/SingleList.js +1 -1
- package/dist/cjs/index.js +3 -4
- package/dist/cjs/{install-2a1c953d.js → install-e8141489.js} +169 -369
- package/dist/cjs/install.js +3 -4
- package/dist/cjs/version.js +1 -1
- package/dist/es/{DropDown-8075451b.js → DropDown-39fedff8.js} +5 -12
- package/dist/es/{Input-4cd74b38.js → Input-11d211d2.js} +17 -27
- package/dist/es/MultiDropdownList.js +2 -2
- package/dist/es/MultiList.js +1 -1
- package/dist/es/RangeInput.js +1 -1
- package/dist/es/SingleDropdownList.js +2 -2
- package/dist/es/SingleList.js +1 -1
- package/dist/es/index.js +4 -5
- package/dist/es/{install-f4f2557b.js → install-b785dd55.js} +170 -370
- package/dist/es/install.js +3 -4
- package/dist/es/version.js +1 -1
- package/package.json +3 -4
|
@@ -8247,14 +8247,14 @@
|
|
|
8247
8247
|
var chunk = decoder.decode(value, {
|
|
8248
8248
|
stream: true
|
|
8249
8249
|
});
|
|
8250
|
-
var regex = /\n\n(?=data
|
|
8250
|
+
var regex = /\n\n(?=data:|$)/;
|
|
8251
8251
|
var lines = chunk.split(regex);
|
|
8252
8252
|
var shouldStop = false;
|
|
8253
8253
|
for (var i = 0; i < lines.length; i++) {
|
|
8254
8254
|
var line = lines[i];
|
|
8255
8255
|
if (line.startsWith('data: ')) {
|
|
8256
8256
|
var content = line.slice(6);
|
|
8257
|
-
if (content === '[DONE]
|
|
8257
|
+
if (content === '[DONE]') {
|
|
8258
8258
|
shouldStop = true;
|
|
8259
8259
|
if (Promise.resolve(metaInfoPromise) === metaInfoPromise) {
|
|
8260
8260
|
metaInfoPromise.then(function (resMeta) {
|
|
@@ -8800,7 +8800,27 @@
|
|
|
8800
8800
|
analyticsInstance.saveSessionUsefulness(sessionId, _extends({}, otherInfo, {
|
|
8801
8801
|
userID: userID
|
|
8802
8802
|
}), function (err, res) {
|
|
8803
|
-
|
|
8803
|
+
res._bodyBlob.text().then(function (textData) {
|
|
8804
|
+
try {
|
|
8805
|
+
var parsedErrorRes = JSON.parse(textData);
|
|
8806
|
+
if (parsedErrorRes.error) {
|
|
8807
|
+
var errorCode = parsedErrorRes.error.code;
|
|
8808
|
+
var errorMessage = parsedErrorRes.error.message;
|
|
8809
|
+
var finalErrorMessage = 'There was an error recording the usefulness of the session. \n\n';
|
|
8810
|
+
if (errorCode) {
|
|
8811
|
+
finalErrorMessage += errorCode;
|
|
8812
|
+
}
|
|
8813
|
+
if (errorMessage) {
|
|
8814
|
+
finalErrorMessage += '' + (errorCode ? ': ' : '') + errorMessage;
|
|
8815
|
+
}
|
|
8816
|
+
console.error(finalErrorMessage);
|
|
8817
|
+
}
|
|
8818
|
+
} catch (error) {
|
|
8819
|
+
console.error('There was an error recording the usefulness of the session. \n\n');
|
|
8820
|
+
}
|
|
8821
|
+
})["catch"](function (error) {
|
|
8822
|
+
console.error('Error reading component error text data:', error);
|
|
8823
|
+
});
|
|
8804
8824
|
});
|
|
8805
8825
|
};
|
|
8806
8826
|
}
|
|
@@ -23119,1799 +23139,196 @@
|
|
|
23119
23139
|
return this.renderer.render(this.parseInline(str, env), this.options, env);
|
|
23120
23140
|
};
|
|
23121
23141
|
|
|
23122
|
-
|
|
23123
|
-
|
|
23124
|
-
|
|
23125
|
-
|
|
23126
|
-
|
|
23127
|
-
|
|
23128
|
-
function getDefaultWhiteList() {
|
|
23129
|
-
// 白名单值说明:
|
|
23130
|
-
// true: 允许该属性
|
|
23131
|
-
// Function: function (val) { } 返回true表示允许该属性,其他值均表示不允许
|
|
23132
|
-
// RegExp: regexp.test(val) 返回true表示允许该属性,其他值均表示不允许
|
|
23133
|
-
// 除上面列出的值外均表示不允许
|
|
23134
|
-
var whiteList = {};
|
|
23135
|
-
whiteList['align-content'] = false; // default: auto
|
|
23136
|
-
whiteList['align-items'] = false; // default: auto
|
|
23137
|
-
whiteList['align-self'] = false; // default: auto
|
|
23138
|
-
whiteList['alignment-adjust'] = false; // default: auto
|
|
23139
|
-
whiteList['alignment-baseline'] = false; // default: baseline
|
|
23140
|
-
whiteList['all'] = false; // default: depending on individual properties
|
|
23141
|
-
whiteList['anchor-point'] = false; // default: none
|
|
23142
|
-
whiteList['animation'] = false; // default: depending on individual properties
|
|
23143
|
-
whiteList['animation-delay'] = false; // default: 0
|
|
23144
|
-
whiteList['animation-direction'] = false; // default: normal
|
|
23145
|
-
whiteList['animation-duration'] = false; // default: 0
|
|
23146
|
-
whiteList['animation-fill-mode'] = false; // default: none
|
|
23147
|
-
whiteList['animation-iteration-count'] = false; // default: 1
|
|
23148
|
-
whiteList['animation-name'] = false; // default: none
|
|
23149
|
-
whiteList['animation-play-state'] = false; // default: running
|
|
23150
|
-
whiteList['animation-timing-function'] = false; // default: ease
|
|
23151
|
-
whiteList['azimuth'] = false; // default: center
|
|
23152
|
-
whiteList['backface-visibility'] = false; // default: visible
|
|
23153
|
-
whiteList['background'] = true; // default: depending on individual properties
|
|
23154
|
-
whiteList['background-attachment'] = true; // default: scroll
|
|
23155
|
-
whiteList['background-clip'] = true; // default: border-box
|
|
23156
|
-
whiteList['background-color'] = true; // default: transparent
|
|
23157
|
-
whiteList['background-image'] = true; // default: none
|
|
23158
|
-
whiteList['background-origin'] = true; // default: padding-box
|
|
23159
|
-
whiteList['background-position'] = true; // default: 0% 0%
|
|
23160
|
-
whiteList['background-repeat'] = true; // default: repeat
|
|
23161
|
-
whiteList['background-size'] = true; // default: auto
|
|
23162
|
-
whiteList['baseline-shift'] = false; // default: baseline
|
|
23163
|
-
whiteList['binding'] = false; // default: none
|
|
23164
|
-
whiteList['bleed'] = false; // default: 6pt
|
|
23165
|
-
whiteList['bookmark-label'] = false; // default: content()
|
|
23166
|
-
whiteList['bookmark-level'] = false; // default: none
|
|
23167
|
-
whiteList['bookmark-state'] = false; // default: open
|
|
23168
|
-
whiteList['border'] = true; // default: depending on individual properties
|
|
23169
|
-
whiteList['border-bottom'] = true; // default: depending on individual properties
|
|
23170
|
-
whiteList['border-bottom-color'] = true; // default: current color
|
|
23171
|
-
whiteList['border-bottom-left-radius'] = true; // default: 0
|
|
23172
|
-
whiteList['border-bottom-right-radius'] = true; // default: 0
|
|
23173
|
-
whiteList['border-bottom-style'] = true; // default: none
|
|
23174
|
-
whiteList['border-bottom-width'] = true; // default: medium
|
|
23175
|
-
whiteList['border-collapse'] = true; // default: separate
|
|
23176
|
-
whiteList['border-color'] = true; // default: depending on individual properties
|
|
23177
|
-
whiteList['border-image'] = true; // default: none
|
|
23178
|
-
whiteList['border-image-outset'] = true; // default: 0
|
|
23179
|
-
whiteList['border-image-repeat'] = true; // default: stretch
|
|
23180
|
-
whiteList['border-image-slice'] = true; // default: 100%
|
|
23181
|
-
whiteList['border-image-source'] = true; // default: none
|
|
23182
|
-
whiteList['border-image-width'] = true; // default: 1
|
|
23183
|
-
whiteList['border-left'] = true; // default: depending on individual properties
|
|
23184
|
-
whiteList['border-left-color'] = true; // default: current color
|
|
23185
|
-
whiteList['border-left-style'] = true; // default: none
|
|
23186
|
-
whiteList['border-left-width'] = true; // default: medium
|
|
23187
|
-
whiteList['border-radius'] = true; // default: 0
|
|
23188
|
-
whiteList['border-right'] = true; // default: depending on individual properties
|
|
23189
|
-
whiteList['border-right-color'] = true; // default: current color
|
|
23190
|
-
whiteList['border-right-style'] = true; // default: none
|
|
23191
|
-
whiteList['border-right-width'] = true; // default: medium
|
|
23192
|
-
whiteList['border-spacing'] = true; // default: 0
|
|
23193
|
-
whiteList['border-style'] = true; // default: depending on individual properties
|
|
23194
|
-
whiteList['border-top'] = true; // default: depending on individual properties
|
|
23195
|
-
whiteList['border-top-color'] = true; // default: current color
|
|
23196
|
-
whiteList['border-top-left-radius'] = true; // default: 0
|
|
23197
|
-
whiteList['border-top-right-radius'] = true; // default: 0
|
|
23198
|
-
whiteList['border-top-style'] = true; // default: none
|
|
23199
|
-
whiteList['border-top-width'] = true; // default: medium
|
|
23200
|
-
whiteList['border-width'] = true; // default: depending on individual properties
|
|
23201
|
-
whiteList['bottom'] = false; // default: auto
|
|
23202
|
-
whiteList['box-decoration-break'] = true; // default: slice
|
|
23203
|
-
whiteList['box-shadow'] = true; // default: none
|
|
23204
|
-
whiteList['box-sizing'] = true; // default: content-box
|
|
23205
|
-
whiteList['box-snap'] = true; // default: none
|
|
23206
|
-
whiteList['box-suppress'] = true; // default: show
|
|
23207
|
-
whiteList['break-after'] = true; // default: auto
|
|
23208
|
-
whiteList['break-before'] = true; // default: auto
|
|
23209
|
-
whiteList['break-inside'] = true; // default: auto
|
|
23210
|
-
whiteList['caption-side'] = false; // default: top
|
|
23211
|
-
whiteList['chains'] = false; // default: none
|
|
23212
|
-
whiteList['clear'] = true; // default: none
|
|
23213
|
-
whiteList['clip'] = false; // default: auto
|
|
23214
|
-
whiteList['clip-path'] = false; // default: none
|
|
23215
|
-
whiteList['clip-rule'] = false; // default: nonzero
|
|
23216
|
-
whiteList['color'] = true; // default: implementation dependent
|
|
23217
|
-
whiteList['color-interpolation-filters'] = true; // default: auto
|
|
23218
|
-
whiteList['column-count'] = false; // default: auto
|
|
23219
|
-
whiteList['column-fill'] = false; // default: balance
|
|
23220
|
-
whiteList['column-gap'] = false; // default: normal
|
|
23221
|
-
whiteList['column-rule'] = false; // default: depending on individual properties
|
|
23222
|
-
whiteList['column-rule-color'] = false; // default: current color
|
|
23223
|
-
whiteList['column-rule-style'] = false; // default: medium
|
|
23224
|
-
whiteList['column-rule-width'] = false; // default: medium
|
|
23225
|
-
whiteList['column-span'] = false; // default: none
|
|
23226
|
-
whiteList['column-width'] = false; // default: auto
|
|
23227
|
-
whiteList['columns'] = false; // default: depending on individual properties
|
|
23228
|
-
whiteList['contain'] = false; // default: none
|
|
23229
|
-
whiteList['content'] = false; // default: normal
|
|
23230
|
-
whiteList['counter-increment'] = false; // default: none
|
|
23231
|
-
whiteList['counter-reset'] = false; // default: none
|
|
23232
|
-
whiteList['counter-set'] = false; // default: none
|
|
23233
|
-
whiteList['crop'] = false; // default: auto
|
|
23234
|
-
whiteList['cue'] = false; // default: depending on individual properties
|
|
23235
|
-
whiteList['cue-after'] = false; // default: none
|
|
23236
|
-
whiteList['cue-before'] = false; // default: none
|
|
23237
|
-
whiteList['cursor'] = false; // default: auto
|
|
23238
|
-
whiteList['direction'] = false; // default: ltr
|
|
23239
|
-
whiteList['display'] = true; // default: depending on individual properties
|
|
23240
|
-
whiteList['display-inside'] = true; // default: auto
|
|
23241
|
-
whiteList['display-list'] = true; // default: none
|
|
23242
|
-
whiteList['display-outside'] = true; // default: inline-level
|
|
23243
|
-
whiteList['dominant-baseline'] = false; // default: auto
|
|
23244
|
-
whiteList['elevation'] = false; // default: level
|
|
23245
|
-
whiteList['empty-cells'] = false; // default: show
|
|
23246
|
-
whiteList['filter'] = false; // default: none
|
|
23247
|
-
whiteList['flex'] = false; // default: depending on individual properties
|
|
23248
|
-
whiteList['flex-basis'] = false; // default: auto
|
|
23249
|
-
whiteList['flex-direction'] = false; // default: row
|
|
23250
|
-
whiteList['flex-flow'] = false; // default: depending on individual properties
|
|
23251
|
-
whiteList['flex-grow'] = false; // default: 0
|
|
23252
|
-
whiteList['flex-shrink'] = false; // default: 1
|
|
23253
|
-
whiteList['flex-wrap'] = false; // default: nowrap
|
|
23254
|
-
whiteList['float'] = false; // default: none
|
|
23255
|
-
whiteList['float-offset'] = false; // default: 0 0
|
|
23256
|
-
whiteList['flood-color'] = false; // default: black
|
|
23257
|
-
whiteList['flood-opacity'] = false; // default: 1
|
|
23258
|
-
whiteList['flow-from'] = false; // default: none
|
|
23259
|
-
whiteList['flow-into'] = false; // default: none
|
|
23260
|
-
whiteList['font'] = true; // default: depending on individual properties
|
|
23261
|
-
whiteList['font-family'] = true; // default: implementation dependent
|
|
23262
|
-
whiteList['font-feature-settings'] = true; // default: normal
|
|
23263
|
-
whiteList['font-kerning'] = true; // default: auto
|
|
23264
|
-
whiteList['font-language-override'] = true; // default: normal
|
|
23265
|
-
whiteList['font-size'] = true; // default: medium
|
|
23266
|
-
whiteList['font-size-adjust'] = true; // default: none
|
|
23267
|
-
whiteList['font-stretch'] = true; // default: normal
|
|
23268
|
-
whiteList['font-style'] = true; // default: normal
|
|
23269
|
-
whiteList['font-synthesis'] = true; // default: weight style
|
|
23270
|
-
whiteList['font-variant'] = true; // default: normal
|
|
23271
|
-
whiteList['font-variant-alternates'] = true; // default: normal
|
|
23272
|
-
whiteList['font-variant-caps'] = true; // default: normal
|
|
23273
|
-
whiteList['font-variant-east-asian'] = true; // default: normal
|
|
23274
|
-
whiteList['font-variant-ligatures'] = true; // default: normal
|
|
23275
|
-
whiteList['font-variant-numeric'] = true; // default: normal
|
|
23276
|
-
whiteList['font-variant-position'] = true; // default: normal
|
|
23277
|
-
whiteList['font-weight'] = true; // default: normal
|
|
23278
|
-
whiteList['grid'] = false; // default: depending on individual properties
|
|
23279
|
-
whiteList['grid-area'] = false; // default: depending on individual properties
|
|
23280
|
-
whiteList['grid-auto-columns'] = false; // default: auto
|
|
23281
|
-
whiteList['grid-auto-flow'] = false; // default: none
|
|
23282
|
-
whiteList['grid-auto-rows'] = false; // default: auto
|
|
23283
|
-
whiteList['grid-column'] = false; // default: depending on individual properties
|
|
23284
|
-
whiteList['grid-column-end'] = false; // default: auto
|
|
23285
|
-
whiteList['grid-column-start'] = false; // default: auto
|
|
23286
|
-
whiteList['grid-row'] = false; // default: depending on individual properties
|
|
23287
|
-
whiteList['grid-row-end'] = false; // default: auto
|
|
23288
|
-
whiteList['grid-row-start'] = false; // default: auto
|
|
23289
|
-
whiteList['grid-template'] = false; // default: depending on individual properties
|
|
23290
|
-
whiteList['grid-template-areas'] = false; // default: none
|
|
23291
|
-
whiteList['grid-template-columns'] = false; // default: none
|
|
23292
|
-
whiteList['grid-template-rows'] = false; // default: none
|
|
23293
|
-
whiteList['hanging-punctuation'] = false; // default: none
|
|
23294
|
-
whiteList['height'] = true; // default: auto
|
|
23295
|
-
whiteList['hyphens'] = false; // default: manual
|
|
23296
|
-
whiteList['icon'] = false; // default: auto
|
|
23297
|
-
whiteList['image-orientation'] = false; // default: auto
|
|
23298
|
-
whiteList['image-resolution'] = false; // default: normal
|
|
23299
|
-
whiteList['ime-mode'] = false; // default: auto
|
|
23300
|
-
whiteList['initial-letters'] = false; // default: normal
|
|
23301
|
-
whiteList['inline-box-align'] = false; // default: last
|
|
23302
|
-
whiteList['justify-content'] = false; // default: auto
|
|
23303
|
-
whiteList['justify-items'] = false; // default: auto
|
|
23304
|
-
whiteList['justify-self'] = false; // default: auto
|
|
23305
|
-
whiteList['left'] = false; // default: auto
|
|
23306
|
-
whiteList['letter-spacing'] = true; // default: normal
|
|
23307
|
-
whiteList['lighting-color'] = true; // default: white
|
|
23308
|
-
whiteList['line-box-contain'] = false; // default: block inline replaced
|
|
23309
|
-
whiteList['line-break'] = false; // default: auto
|
|
23310
|
-
whiteList['line-grid'] = false; // default: match-parent
|
|
23311
|
-
whiteList['line-height'] = false; // default: normal
|
|
23312
|
-
whiteList['line-snap'] = false; // default: none
|
|
23313
|
-
whiteList['line-stacking'] = false; // default: depending on individual properties
|
|
23314
|
-
whiteList['line-stacking-ruby'] = false; // default: exclude-ruby
|
|
23315
|
-
whiteList['line-stacking-shift'] = false; // default: consider-shifts
|
|
23316
|
-
whiteList['line-stacking-strategy'] = false; // default: inline-line-height
|
|
23317
|
-
whiteList['list-style'] = true; // default: depending on individual properties
|
|
23318
|
-
whiteList['list-style-image'] = true; // default: none
|
|
23319
|
-
whiteList['list-style-position'] = true; // default: outside
|
|
23320
|
-
whiteList['list-style-type'] = true; // default: disc
|
|
23321
|
-
whiteList['margin'] = true; // default: depending on individual properties
|
|
23322
|
-
whiteList['margin-bottom'] = true; // default: 0
|
|
23323
|
-
whiteList['margin-left'] = true; // default: 0
|
|
23324
|
-
whiteList['margin-right'] = true; // default: 0
|
|
23325
|
-
whiteList['margin-top'] = true; // default: 0
|
|
23326
|
-
whiteList['marker-offset'] = false; // default: auto
|
|
23327
|
-
whiteList['marker-side'] = false; // default: list-item
|
|
23328
|
-
whiteList['marks'] = false; // default: none
|
|
23329
|
-
whiteList['mask'] = false; // default: border-box
|
|
23330
|
-
whiteList['mask-box'] = false; // default: see individual properties
|
|
23331
|
-
whiteList['mask-box-outset'] = false; // default: 0
|
|
23332
|
-
whiteList['mask-box-repeat'] = false; // default: stretch
|
|
23333
|
-
whiteList['mask-box-slice'] = false; // default: 0 fill
|
|
23334
|
-
whiteList['mask-box-source'] = false; // default: none
|
|
23335
|
-
whiteList['mask-box-width'] = false; // default: auto
|
|
23336
|
-
whiteList['mask-clip'] = false; // default: border-box
|
|
23337
|
-
whiteList['mask-image'] = false; // default: none
|
|
23338
|
-
whiteList['mask-origin'] = false; // default: border-box
|
|
23339
|
-
whiteList['mask-position'] = false; // default: center
|
|
23340
|
-
whiteList['mask-repeat'] = false; // default: no-repeat
|
|
23341
|
-
whiteList['mask-size'] = false; // default: border-box
|
|
23342
|
-
whiteList['mask-source-type'] = false; // default: auto
|
|
23343
|
-
whiteList['mask-type'] = false; // default: luminance
|
|
23344
|
-
whiteList['max-height'] = true; // default: none
|
|
23345
|
-
whiteList['max-lines'] = false; // default: none
|
|
23346
|
-
whiteList['max-width'] = true; // default: none
|
|
23347
|
-
whiteList['min-height'] = true; // default: 0
|
|
23348
|
-
whiteList['min-width'] = true; // default: 0
|
|
23349
|
-
whiteList['move-to'] = false; // default: normal
|
|
23350
|
-
whiteList['nav-down'] = false; // default: auto
|
|
23351
|
-
whiteList['nav-index'] = false; // default: auto
|
|
23352
|
-
whiteList['nav-left'] = false; // default: auto
|
|
23353
|
-
whiteList['nav-right'] = false; // default: auto
|
|
23354
|
-
whiteList['nav-up'] = false; // default: auto
|
|
23355
|
-
whiteList['object-fit'] = false; // default: fill
|
|
23356
|
-
whiteList['object-position'] = false; // default: 50% 50%
|
|
23357
|
-
whiteList['opacity'] = false; // default: 1
|
|
23358
|
-
whiteList['order'] = false; // default: 0
|
|
23359
|
-
whiteList['orphans'] = false; // default: 2
|
|
23360
|
-
whiteList['outline'] = false; // default: depending on individual properties
|
|
23361
|
-
whiteList['outline-color'] = false; // default: invert
|
|
23362
|
-
whiteList['outline-offset'] = false; // default: 0
|
|
23363
|
-
whiteList['outline-style'] = false; // default: none
|
|
23364
|
-
whiteList['outline-width'] = false; // default: medium
|
|
23365
|
-
whiteList['overflow'] = false; // default: depending on individual properties
|
|
23366
|
-
whiteList['overflow-wrap'] = false; // default: normal
|
|
23367
|
-
whiteList['overflow-x'] = false; // default: visible
|
|
23368
|
-
whiteList['overflow-y'] = false; // default: visible
|
|
23369
|
-
whiteList['padding'] = true; // default: depending on individual properties
|
|
23370
|
-
whiteList['padding-bottom'] = true; // default: 0
|
|
23371
|
-
whiteList['padding-left'] = true; // default: 0
|
|
23372
|
-
whiteList['padding-right'] = true; // default: 0
|
|
23373
|
-
whiteList['padding-top'] = true; // default: 0
|
|
23374
|
-
whiteList['page'] = false; // default: auto
|
|
23375
|
-
whiteList['page-break-after'] = false; // default: auto
|
|
23376
|
-
whiteList['page-break-before'] = false; // default: auto
|
|
23377
|
-
whiteList['page-break-inside'] = false; // default: auto
|
|
23378
|
-
whiteList['page-policy'] = false; // default: start
|
|
23379
|
-
whiteList['pause'] = false; // default: implementation dependent
|
|
23380
|
-
whiteList['pause-after'] = false; // default: implementation dependent
|
|
23381
|
-
whiteList['pause-before'] = false; // default: implementation dependent
|
|
23382
|
-
whiteList['perspective'] = false; // default: none
|
|
23383
|
-
whiteList['perspective-origin'] = false; // default: 50% 50%
|
|
23384
|
-
whiteList['pitch'] = false; // default: medium
|
|
23385
|
-
whiteList['pitch-range'] = false; // default: 50
|
|
23386
|
-
whiteList['play-during'] = false; // default: auto
|
|
23387
|
-
whiteList['position'] = false; // default: static
|
|
23388
|
-
whiteList['presentation-level'] = false; // default: 0
|
|
23389
|
-
whiteList['quotes'] = false; // default: text
|
|
23390
|
-
whiteList['region-fragment'] = false; // default: auto
|
|
23391
|
-
whiteList['resize'] = false; // default: none
|
|
23392
|
-
whiteList['rest'] = false; // default: depending on individual properties
|
|
23393
|
-
whiteList['rest-after'] = false; // default: none
|
|
23394
|
-
whiteList['rest-before'] = false; // default: none
|
|
23395
|
-
whiteList['richness'] = false; // default: 50
|
|
23396
|
-
whiteList['right'] = false; // default: auto
|
|
23397
|
-
whiteList['rotation'] = false; // default: 0
|
|
23398
|
-
whiteList['rotation-point'] = false; // default: 50% 50%
|
|
23399
|
-
whiteList['ruby-align'] = false; // default: auto
|
|
23400
|
-
whiteList['ruby-merge'] = false; // default: separate
|
|
23401
|
-
whiteList['ruby-position'] = false; // default: before
|
|
23402
|
-
whiteList['shape-image-threshold'] = false; // default: 0.0
|
|
23403
|
-
whiteList['shape-outside'] = false; // default: none
|
|
23404
|
-
whiteList['shape-margin'] = false; // default: 0
|
|
23405
|
-
whiteList['size'] = false; // default: auto
|
|
23406
|
-
whiteList['speak'] = false; // default: auto
|
|
23407
|
-
whiteList['speak-as'] = false; // default: normal
|
|
23408
|
-
whiteList['speak-header'] = false; // default: once
|
|
23409
|
-
whiteList['speak-numeral'] = false; // default: continuous
|
|
23410
|
-
whiteList['speak-punctuation'] = false; // default: none
|
|
23411
|
-
whiteList['speech-rate'] = false; // default: medium
|
|
23412
|
-
whiteList['stress'] = false; // default: 50
|
|
23413
|
-
whiteList['string-set'] = false; // default: none
|
|
23414
|
-
whiteList['tab-size'] = false; // default: 8
|
|
23415
|
-
whiteList['table-layout'] = false; // default: auto
|
|
23416
|
-
whiteList['text-align'] = true; // default: start
|
|
23417
|
-
whiteList['text-align-last'] = true; // default: auto
|
|
23418
|
-
whiteList['text-combine-upright'] = true; // default: none
|
|
23419
|
-
whiteList['text-decoration'] = true; // default: none
|
|
23420
|
-
whiteList['text-decoration-color'] = true; // default: currentColor
|
|
23421
|
-
whiteList['text-decoration-line'] = true; // default: none
|
|
23422
|
-
whiteList['text-decoration-skip'] = true; // default: objects
|
|
23423
|
-
whiteList['text-decoration-style'] = true; // default: solid
|
|
23424
|
-
whiteList['text-emphasis'] = true; // default: depending on individual properties
|
|
23425
|
-
whiteList['text-emphasis-color'] = true; // default: currentColor
|
|
23426
|
-
whiteList['text-emphasis-position'] = true; // default: over right
|
|
23427
|
-
whiteList['text-emphasis-style'] = true; // default: none
|
|
23428
|
-
whiteList['text-height'] = true; // default: auto
|
|
23429
|
-
whiteList['text-indent'] = true; // default: 0
|
|
23430
|
-
whiteList['text-justify'] = true; // default: auto
|
|
23431
|
-
whiteList['text-orientation'] = true; // default: mixed
|
|
23432
|
-
whiteList['text-overflow'] = true; // default: clip
|
|
23433
|
-
whiteList['text-shadow'] = true; // default: none
|
|
23434
|
-
whiteList['text-space-collapse'] = true; // default: collapse
|
|
23435
|
-
whiteList['text-transform'] = true; // default: none
|
|
23436
|
-
whiteList['text-underline-position'] = true; // default: auto
|
|
23437
|
-
whiteList['text-wrap'] = true; // default: normal
|
|
23438
|
-
whiteList['top'] = false; // default: auto
|
|
23439
|
-
whiteList['transform'] = false; // default: none
|
|
23440
|
-
whiteList['transform-origin'] = false; // default: 50% 50% 0
|
|
23441
|
-
whiteList['transform-style'] = false; // default: flat
|
|
23442
|
-
whiteList['transition'] = false; // default: depending on individual properties
|
|
23443
|
-
whiteList['transition-delay'] = false; // default: 0s
|
|
23444
|
-
whiteList['transition-duration'] = false; // default: 0s
|
|
23445
|
-
whiteList['transition-property'] = false; // default: all
|
|
23446
|
-
whiteList['transition-timing-function'] = false; // default: ease
|
|
23447
|
-
whiteList['unicode-bidi'] = false; // default: normal
|
|
23448
|
-
whiteList['vertical-align'] = false; // default: baseline
|
|
23449
|
-
whiteList['visibility'] = false; // default: visible
|
|
23450
|
-
whiteList['voice-balance'] = false; // default: center
|
|
23451
|
-
whiteList['voice-duration'] = false; // default: auto
|
|
23452
|
-
whiteList['voice-family'] = false; // default: implementation dependent
|
|
23453
|
-
whiteList['voice-pitch'] = false; // default: medium
|
|
23454
|
-
whiteList['voice-range'] = false; // default: medium
|
|
23455
|
-
whiteList['voice-rate'] = false; // default: normal
|
|
23456
|
-
whiteList['voice-stress'] = false; // default: normal
|
|
23457
|
-
whiteList['voice-volume'] = false; // default: medium
|
|
23458
|
-
whiteList['volume'] = false; // default: medium
|
|
23459
|
-
whiteList['white-space'] = false; // default: normal
|
|
23460
|
-
whiteList['widows'] = false; // default: 2
|
|
23461
|
-
whiteList['width'] = true; // default: auto
|
|
23462
|
-
whiteList['will-change'] = false; // default: auto
|
|
23463
|
-
whiteList['word-break'] = true; // default: normal
|
|
23464
|
-
whiteList['word-spacing'] = true; // default: normal
|
|
23465
|
-
whiteList['word-wrap'] = true; // default: normal
|
|
23466
|
-
whiteList['wrap-flow'] = false; // default: auto
|
|
23467
|
-
whiteList['wrap-through'] = false; // default: wrap
|
|
23468
|
-
whiteList['writing-mode'] = false; // default: horizontal-tb
|
|
23469
|
-
whiteList['z-index'] = false; // default: auto
|
|
23470
|
-
|
|
23471
|
-
return whiteList;
|
|
23472
|
-
}
|
|
23473
|
-
|
|
23474
|
-
/**
|
|
23475
|
-
* 匹配到白名单上的一个属性时
|
|
23476
|
-
*
|
|
23477
|
-
* @param {String} name
|
|
23478
|
-
* @param {String} value
|
|
23479
|
-
* @param {Object} options
|
|
23480
|
-
* @return {String}
|
|
23481
|
-
*/
|
|
23482
|
-
function onAttr(name, value, options) {
|
|
23483
|
-
// do nothing
|
|
23484
|
-
}
|
|
23142
|
+
var _templateObject$8;
|
|
23143
|
+
var InputGroup = styled('div')(_templateObject$8 || (_templateObject$8 = _taggedTemplateLiteralLoose(["\n\tdisplay: flex;\n\talign-items: stretch;\n\twidth: 100%;\n"])));
|
|
23144
|
+
InputGroup.defaultProps = {
|
|
23145
|
+
className: 'input-group'
|
|
23146
|
+
};
|
|
23485
23147
|
|
|
23486
|
-
|
|
23487
|
-
|
|
23488
|
-
*
|
|
23489
|
-
* @param {String} name
|
|
23490
|
-
* @param {String} value
|
|
23491
|
-
* @param {Object} options
|
|
23492
|
-
* @return {String}
|
|
23493
|
-
*/
|
|
23494
|
-
function onIgnoreAttr(name, value, options) {
|
|
23495
|
-
// do nothing
|
|
23496
|
-
}
|
|
23497
|
-
var REGEXP_URL_JAVASCRIPT = /javascript\s*\:/img;
|
|
23148
|
+
var _templateObject$9;
|
|
23149
|
+
var InputWrapper = styled('span')(_templateObject$9 || (_templateObject$9 = _taggedTemplateLiteralLoose(["\n\tflex: 1;\n\tposition: relative;\n\theight: 42px;\n"])));
|
|
23498
23150
|
|
|
23499
|
-
|
|
23500
|
-
|
|
23501
|
-
|
|
23502
|
-
|
|
23503
|
-
* @param {String} value
|
|
23504
|
-
* @return {String}
|
|
23505
|
-
*/
|
|
23506
|
-
function safeAttrValue(name, value) {
|
|
23507
|
-
if (REGEXP_URL_JAVASCRIPT.test(value)) return '';
|
|
23508
|
-
return value;
|
|
23509
|
-
}
|
|
23510
|
-
var whiteList = getDefaultWhiteList();
|
|
23511
|
-
var getDefaultWhiteList_1 = getDefaultWhiteList;
|
|
23512
|
-
var onAttr_1 = onAttr;
|
|
23513
|
-
var onIgnoreAttr_1 = onIgnoreAttr;
|
|
23514
|
-
var safeAttrValue_1 = safeAttrValue;
|
|
23515
|
-
var _default = {
|
|
23516
|
-
whiteList: whiteList,
|
|
23517
|
-
getDefaultWhiteList: getDefaultWhiteList_1,
|
|
23518
|
-
onAttr: onAttr_1,
|
|
23519
|
-
onIgnoreAttr: onIgnoreAttr_1,
|
|
23520
|
-
safeAttrValue: safeAttrValue_1
|
|
23151
|
+
var _templateObject$a;
|
|
23152
|
+
var InputAddon = styled('span')(_templateObject$a || (_templateObject$a = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: #fafafa;\n border: 1px solid #ccc;\n border-radius: 2px;\n color: rgba(0, 0, 0, 0.85);\n font-size: 14px;\n font-weight: 400;\n padding: 0 11px;\n position: relative;\n transition: all 0.3s;\n box-sizing: border-box;\n overflow: hidden;\n\n &:first-of-type {\n border-right: none;\n }\n &:last-of-type {\n border-left: none;\n }\n"])));
|
|
23153
|
+
InputAddon.defaultProps = {
|
|
23154
|
+
className: 'input-addon'
|
|
23521
23155
|
};
|
|
23522
23156
|
|
|
23523
|
-
var
|
|
23524
|
-
|
|
23525
|
-
|
|
23526
|
-
|
|
23527
|
-
return arr.indexOf(item);
|
|
23528
|
-
}
|
|
23529
|
-
for (i = 0, j = arr.length; i < j; i++) {
|
|
23530
|
-
if (arr[i] === item) {
|
|
23531
|
-
return i;
|
|
23532
|
-
}
|
|
23533
|
-
}
|
|
23534
|
-
return -1;
|
|
23535
|
-
},
|
|
23536
|
-
forEach: function forEach(arr, fn, scope) {
|
|
23537
|
-
var i, j;
|
|
23538
|
-
if (Array.prototype.forEach) {
|
|
23539
|
-
return arr.forEach(fn, scope);
|
|
23540
|
-
}
|
|
23541
|
-
for (i = 0, j = arr.length; i < j; i++) {
|
|
23542
|
-
fn.call(scope, arr[i], i, arr);
|
|
23543
|
-
}
|
|
23544
|
-
},
|
|
23545
|
-
trim: function trim(str) {
|
|
23546
|
-
if (String.prototype.trim) {
|
|
23547
|
-
return str.trim();
|
|
23548
|
-
}
|
|
23549
|
-
return str.replace(/(^\s*)|(\s*$)/g, '');
|
|
23550
|
-
},
|
|
23551
|
-
trimRight: function trimRight(str) {
|
|
23552
|
-
if (String.prototype.trimRight) {
|
|
23553
|
-
return str.trimRight();
|
|
23554
|
-
}
|
|
23555
|
-
return str.replace(/(\s*$)/g, '');
|
|
23556
|
-
}
|
|
23157
|
+
var _templateObject$b, _templateObject2$4, _templateObject3$3, _templateObject4$1, _templateObject5$1, _templateObject6;
|
|
23158
|
+
var alertBorder = function alertBorder(_ref) {
|
|
23159
|
+
var theme = _ref.theme;
|
|
23160
|
+
return "\n\tborder: 1px solid " + theme.colors.alertColor + ";\n";
|
|
23557
23161
|
};
|
|
23162
|
+
var input = "\n\twidth: 100%;\n\tline-height: 1.5;\n\tmin-height: 42px;\n\tpadding: 8px 12px;\n\tborder: 1px solid #ccc;\n\tbackground-color: #fafafa;\n\tfont-size: 0.9rem;\n\toutline: none;\n\theight: 100%;\n\n\t&:focus {\n\t\tbackground-color: #fff;\n\t}\n";
|
|
23163
|
+
var dark$1 = function dark(theme) {
|
|
23164
|
+
return "\n\tborder-color: " + theme.colors.borderColor + ";\n";
|
|
23165
|
+
};
|
|
23166
|
+
var darkInput = function darkInput(_ref2) {
|
|
23167
|
+
var theme = _ref2.theme;
|
|
23168
|
+
return "\n\tbackground-color: " + theme.colors.backgroundColor + ";\n\tcolor: " + theme.colors.textColor + ";\n\t" + dark$1(theme) + ";\n\n\t&:focus {\n\t\tbackground-color: " + theme.colors.backgroundColor + ";\n\t}\n";
|
|
23169
|
+
};
|
|
23170
|
+
var Input = styled('input')(_templateObject$b || (_templateObject$b = _taggedTemplateLiteralLoose(["\n\t", ";\n\n\t&:focus {\n\t\tbackground-color: #fff;\n\t}\n\t", ";\n\n\t", ";\n\n\t", ";\n\n\t", ";\n\t", ";\n\n\t", ";\n\n\t", ";\n\t", ";\n\t", ";\n\n\t", ";\n"])), input, function (_ref3) {
|
|
23171
|
+
var themePreset = _ref3.themePreset,
|
|
23172
|
+
theme = _ref3.theme;
|
|
23173
|
+
return themePreset === 'dark' && darkInput({
|
|
23174
|
+
theme: theme
|
|
23175
|
+
});
|
|
23176
|
+
}, function (props) {
|
|
23177
|
+
return props.showIcon && props.iconPosition === 'left' && "\n\t\t\tpadding-left: 36px;\n\t\t";
|
|
23178
|
+
}, function (props) {
|
|
23179
|
+
return props.showIcon && props.iconPosition === 'right' && "\n\t\t\tpadding-right: 36px;\n\t\t";
|
|
23180
|
+
}, function (props) {
|
|
23181
|
+
return (
|
|
23182
|
+
// for clear icon
|
|
23183
|
+
props.showClear && "\n\t\t\tpadding-right: 36px;\n\t\t"
|
|
23184
|
+
);
|
|
23185
|
+
}, function (props) {
|
|
23186
|
+
return (
|
|
23187
|
+
// for voice search icon
|
|
23188
|
+
props.showVoiceSearch && "\n\t\t\tpadding-right: 36px;\n\t\t"
|
|
23189
|
+
);
|
|
23190
|
+
}, function (props) {
|
|
23191
|
+
return (
|
|
23192
|
+
// for clear icon with search icon
|
|
23193
|
+
props.showClear && props.showIcon && props.iconPosition === 'right' && "\n\t\t\tpadding-right: 66px;\n\t\t"
|
|
23194
|
+
);
|
|
23195
|
+
}, function (props) {
|
|
23196
|
+
return (
|
|
23197
|
+
// for voice search icon with search icon
|
|
23198
|
+
props.showVoiceSearch && props.showIcon && props.iconPosition === 'right' && "\n\t\t\tpadding-right: 66px;\n\t\t"
|
|
23199
|
+
);
|
|
23200
|
+
}, function (props) {
|
|
23201
|
+
return (
|
|
23202
|
+
// for voice search icon with clear icon
|
|
23203
|
+
props.showVoiceSearch && props.showIcon && "\n\t\t\tpadding-right: 66px;\n\t\t"
|
|
23204
|
+
);
|
|
23205
|
+
}, function (props) {
|
|
23206
|
+
return (
|
|
23207
|
+
// for clear icon with search icon and voice search
|
|
23208
|
+
props.showClear && props.showIcon && props.showVoiceSearch && props.iconPosition === 'right' && "\n\t\t\tpadding-right: 90px;\n\t\t"
|
|
23209
|
+
);
|
|
23210
|
+
}, function (props) {
|
|
23211
|
+
return props.alert && alertBorder;
|
|
23212
|
+
});
|
|
23213
|
+
var suggestions$1 = function suggestions(themePreset, theme) {
|
|
23214
|
+
return css(_templateObject2$4 || (_templateObject2$4 = _taggedTemplateLiteralLoose(["\n\tdisplay: block;\n\twidth: 100%;\n\tborder: 1px solid #ccc;\n\tborder-top: none;\n\tbackground-color: #fff;\n\tfont-size: 0.9rem;\n\tz-index: 3;\n\tposition: absolute;\n\tmargin: 0;\n\tpadding: 0;\n\tlist-style: none;\n\tmax-height: min(100vh, 402px);\n\toverflow-y: auto;\n\n\t&.small {\n\t\ttop: 30px;\n\t}\n\n\tli {\n\t\tdisplay: flex;\n\t\tjustify-content: space-between;\n\t\tcursor: pointer;\n\t\tpadding: 10px;\n\t\tuser-select: none;\n\n\t\t& > .trim {\n\t\t\tdisplay: -webkit-box;\n\t\t\tdisplay: flex;\n\t\t\twidth: 100%;\n\t\t\tmax-height: 2.3rem;\n\t\t\tline-height: 1.2rem;\n\t\t\t-webkit-line-clamp: 2;\n\t\t\t-webkit-box-orient: vertical;\n\t\t\toverflow: hidden;\n\t\t\ttext-overflow: ellipsis;\n\t\t\twhite-space: nowrap;\n\t\t}\n\n\t\t&:hover,\n\t\t&:focus {\n\t\t\tbackground-color: #eee;\n\t\t}\n\t}\n\n\t", ";\n"])), themePreset === 'dark' && theme && dark$1(theme));
|
|
23215
|
+
};
|
|
23216
|
+
var suggestionsContainer = css(_templateObject3$3 || (_templateObject3$3 = _taggedTemplateLiteralLoose(["\n\tposition: relative;\n\t.cancel-icon {\n\t\tcursor: pointer;\n\t}\n"])));
|
|
23217
|
+
var noSuggestions = function noSuggestions(themePreset, theme) {
|
|
23218
|
+
return css(_templateObject4$1 || (_templateObject4$1 = _taggedTemplateLiteralLoose(["\n\tdisplay: block;\n\twidth: 100%;\n\tborder: 1px solid #ccc;\n\tborder-top: none;\n\tbackground-color: #fff;\n\tfont-size: 0.9rem;\n\tz-index: 3;\n\tposition: absolute;\n\tmargin: 0;\n\tpadding: 0;\n\tlist-style: none;\n\tmax-height: 260px;\n\toverflow-y: auto;\n\n\t&.small {\n\t\ttop: 30px;\n\t}\n\n\tli {\n\t\tdisplay: flex;\n\t\tjustify-content: space-between;\n\t\tpadding: 10px;\n\t\tuser-select: none;\n\n\t\t& > .trim {\n\t\t\tdisplay: -webkit-box;\n\t\t\tdisplay: block;\n\t\t\twidth: 100%;\n\t\t\tmax-height: 2.3rem;\n\t\t\tline-height: 1.2rem;\n\t\t\t-webkit-line-clamp: 2;\n\t\t\t-webkit-box-orient: vertical;\n\t\t\toverflow: hidden;\n\t\t\ttext-overflow: ellipsis;\n\t\t\twhite-space: nowrap;\n\t\t}\n\t}\n\n\t", "\n"])), themePreset === 'dark' && theme && dark$1(theme));
|
|
23219
|
+
};
|
|
23220
|
+
var TextArea = styled('textarea')(_templateObject5$1 || (_templateObject5$1 = _taggedTemplateLiteralLoose(["\n\t", ";\n\n\t&:focus {\n\t\tbackground-color: #fff;\n\t}\n\t", ";\n\n\t", ";\n\n\t", ";\n\n\t", ";\n\t", ";\n\t", ";\n\t", ";\n\n\t", ";\n\t", ";\n\t", ";\n\t", ";\n\t", ";\n\n\t", ";\n\t", ";\n\t", ";\n\n\t", ";\n\t", ";\n\t&::-webkit-search-decoration,\n\t&::-webkit-search-cancel-button,\n\t&::-webkit-search-results-button,\n\t&::-webkit-search-results-decoration {\n\t\tdisplay: none;\n\t}\n\tresize: none;\n\toverflow: hidden;\n\theight: 42px;\n"])), input, function (_ref4) {
|
|
23221
|
+
var themePreset = _ref4.themePreset,
|
|
23222
|
+
theme = _ref4.theme;
|
|
23223
|
+
return themePreset === 'dark' && darkInput({
|
|
23224
|
+
theme: theme
|
|
23225
|
+
});
|
|
23226
|
+
}, function (props) {
|
|
23227
|
+
return props.showIcon && props.iconPosition === 'left' && "\n\t\t\tpadding-left: 36px;\n\t\t";
|
|
23228
|
+
}, function (props) {
|
|
23229
|
+
return props.showIcon && props.iconPosition === 'right' && "\n\t\t\tpadding-right: 36px;\n\t\t";
|
|
23230
|
+
}, function (props) {
|
|
23231
|
+
return (
|
|
23232
|
+
// for clear icon
|
|
23233
|
+
props.showClear && "\n\t\t\tpadding-right: 36px;\n\t\t"
|
|
23234
|
+
);
|
|
23235
|
+
}, function (props) {
|
|
23236
|
+
return (
|
|
23237
|
+
// for voice search icon
|
|
23238
|
+
props.showVoiceSearch && "\n\t\t\tpadding-right: 36px;\n\t\t"
|
|
23239
|
+
);
|
|
23240
|
+
}, function (props) {
|
|
23241
|
+
return props.showFocusShortcutsIcon && "\n\t\t\tpadding-right: 20px;\n\t\t";
|
|
23242
|
+
}, function (props) {
|
|
23243
|
+
return props.showIcon && props.showFocusShortcutsIcon && props.iconPosition === 'right' && "\n\t\t\tpadding-right: 66px;\n\t\t";
|
|
23244
|
+
}, function (props) {
|
|
23245
|
+
return (
|
|
23246
|
+
// for voice search icon with focusshortcut icon
|
|
23247
|
+
props.showVoiceSearch && props.showFocusShortcutsIcon && "\n\t\t\tpadding-right: 50px;\n\t\t"
|
|
23248
|
+
);
|
|
23249
|
+
}, function (props) {
|
|
23250
|
+
return (
|
|
23251
|
+
// for clear icon with search icon
|
|
23252
|
+
props.showClear && props.showIcon && props.iconPosition === 'right' && "\n\t\t\tpadding-right: 66px;\n\t\t"
|
|
23253
|
+
);
|
|
23254
|
+
}, function (props) {
|
|
23255
|
+
return (
|
|
23256
|
+
// for voice search icon with clear icon
|
|
23257
|
+
props.showVoiceSearch && props.showIcon && "\n\t\t\tpadding-right: 66px;\n\t\t"
|
|
23258
|
+
);
|
|
23259
|
+
}, function (props) {
|
|
23260
|
+
return (
|
|
23261
|
+
// for voice search icon with search icon
|
|
23262
|
+
props.showVoiceSearch && props.showIcon && props.iconPosition === 'right' && "\n\t\t\tpadding-right: 66px;\n\t\t"
|
|
23263
|
+
);
|
|
23264
|
+
}, function (props) {
|
|
23265
|
+
return (
|
|
23266
|
+
// for voice search icon with focusshortcut icon and clear icon
|
|
23267
|
+
props.showVoiceSearch && props.showFocusShortcutsIcon && props.showClear && "\n\t\t\tpadding-right: 80px;\n\t\t"
|
|
23268
|
+
);
|
|
23269
|
+
}, function (props) {
|
|
23270
|
+
return (
|
|
23271
|
+
// for search icon with focusshortcut icon
|
|
23272
|
+
props.showIcon && props.showFocusShortcutsIcon && props.iconPosition === 'right' && "\n\t\t\tpadding-right: 66px;\n\t\t"
|
|
23273
|
+
);
|
|
23274
|
+
}, function (props) {
|
|
23275
|
+
return (
|
|
23276
|
+
// for clear icon with search icon and voice search
|
|
23277
|
+
props.showClear && props.showIcon && props.showVoiceSearch && props.iconPosition === 'right' && "\n\t\t\tpadding-right: 90px;\n\t\t"
|
|
23278
|
+
);
|
|
23279
|
+
}, function (props) {
|
|
23280
|
+
return (
|
|
23281
|
+
// for clear icon with search icon, focusshortcut icon and voice search
|
|
23282
|
+
props.showClear && props.showIcon && props.showVoiceSearch && props.iconPosition === 'right' && props.showFocusShortcutsIcon && "\n\t\t\tpadding-right: 106px;\n\t\t"
|
|
23283
|
+
);
|
|
23284
|
+
}, function (props) {
|
|
23285
|
+
return props.alert && alertBorder;
|
|
23286
|
+
}, function (props) {
|
|
23287
|
+
return props.isOpen && css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteralLoose(["\n\t\t\tborder-bottom-left-radius: 0;\n\t\t\tborder-bottom-right-radius: 0;\n\t\t"])));
|
|
23288
|
+
});
|
|
23558
23289
|
|
|
23559
|
-
|
|
23560
|
-
|
|
23561
|
-
|
|
23562
|
-
|
|
23563
|
-
|
|
23564
|
-
|
|
23565
|
-
|
|
23566
|
-
|
|
23567
|
-
|
|
23568
|
-
|
|
23569
|
-
|
|
23570
|
-
|
|
23571
|
-
|
|
23572
|
-
|
|
23573
|
-
function parseStyle(css, onAttr) {
|
|
23574
|
-
css = util.trimRight(css);
|
|
23575
|
-
if (css[css.length - 1] !== ';') css += ';';
|
|
23576
|
-
var cssLength = css.length;
|
|
23577
|
-
var isParenthesisOpen = false;
|
|
23578
|
-
var lastPos = 0;
|
|
23579
|
-
var i = 0;
|
|
23580
|
-
var retCSS = '';
|
|
23581
|
-
function addNewAttr() {
|
|
23582
|
-
// 如果没有正常的闭合圆括号,则直接忽略当前属性
|
|
23583
|
-
if (!isParenthesisOpen) {
|
|
23584
|
-
var source = util.trim(css.slice(lastPos, i));
|
|
23585
|
-
var j = source.indexOf(':');
|
|
23586
|
-
if (j !== -1) {
|
|
23587
|
-
var name = util.trim(source.slice(0, j));
|
|
23588
|
-
var value = util.trim(source.slice(j + 1));
|
|
23589
|
-
// 必须有属性名称
|
|
23590
|
-
if (name) {
|
|
23591
|
-
var ret = onAttr(lastPos, retCSS.length, name, value, source);
|
|
23592
|
-
if (ret) retCSS += ret + '; ';
|
|
23593
|
-
}
|
|
23594
|
-
}
|
|
23595
|
-
}
|
|
23596
|
-
lastPos = i + 1;
|
|
23597
|
-
}
|
|
23598
|
-
for (; i < cssLength; i++) {
|
|
23599
|
-
var c = css[i];
|
|
23600
|
-
if (c === '/' && css[i + 1] === '*') {
|
|
23601
|
-
// 备注开始
|
|
23602
|
-
var j = css.indexOf('*/', i + 2);
|
|
23603
|
-
// 如果没有正常的备注结束,则后面的部分全部跳过
|
|
23604
|
-
if (j === -1) break;
|
|
23605
|
-
// 直接将当前位置调到备注结尾,并且初始化状态
|
|
23606
|
-
i = j + 1;
|
|
23607
|
-
lastPos = i + 1;
|
|
23608
|
-
isParenthesisOpen = false;
|
|
23609
|
-
} else if (c === '(') {
|
|
23610
|
-
isParenthesisOpen = true;
|
|
23611
|
-
} else if (c === ')') {
|
|
23612
|
-
isParenthesisOpen = false;
|
|
23613
|
-
} else if (c === ';') {
|
|
23614
|
-
if (isParenthesisOpen) ; else {
|
|
23615
|
-
addNewAttr();
|
|
23616
|
-
}
|
|
23617
|
-
} else if (c === '\n') {
|
|
23618
|
-
addNewAttr();
|
|
23619
|
-
}
|
|
23620
|
-
}
|
|
23621
|
-
return util.trim(retCSS);
|
|
23622
|
-
}
|
|
23623
|
-
var parser = parseStyle;
|
|
23290
|
+
var _templateObject$c;
|
|
23291
|
+
var IconGroup = styled('div')(_templateObject$c || (_templateObject$c = _taggedTemplateLiteralLoose(["\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\tgrid-gap: 6px;\n\tmargin: 0 10px;\n\theight: 100%;\n\n\t", ";\n\n\t", ";\n\n\t", ";\n"])), function (_ref) {
|
|
23292
|
+
var positionType = _ref.positionType;
|
|
23293
|
+
if (positionType === 'absolute') {
|
|
23294
|
+
return "\n\t\t\t\tposition: absolute;\n\t\t\t\ttop: 50%;\n\t\t\t\ttransform: translateY(-50%);\n\t\t\t";
|
|
23295
|
+
}
|
|
23296
|
+
return null;
|
|
23297
|
+
}, function (_ref2) {
|
|
23298
|
+
var groupPosition = _ref2.groupPosition;
|
|
23299
|
+
return groupPosition === 'right' ? "\n\t\t\t\t\tright: 0;\n\t\t\t " : "\n\t\t\t\t\tleft: 0;\n\t\t\t ";
|
|
23300
|
+
}, function (_ref3) {
|
|
23301
|
+
var enableAI = _ref3.enableAI;
|
|
23302
|
+
return enableAI ? "\n\t\ttop: 0%;\n\t transform: translateY(0);\n \theight: 42px;\n\t" : '';
|
|
23303
|
+
});
|
|
23624
23304
|
|
|
23625
|
-
|
|
23626
|
-
|
|
23627
|
-
|
|
23628
|
-
|
|
23629
|
-
|
|
23305
|
+
var _templateObject$d;
|
|
23306
|
+
var IconWrapper = styled('div')(_templateObject$d || (_templateObject$d = _taggedTemplateLiteralLoose(["\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\tmax-width: 23px;\n\twidth: max-content;\n\tcursor: pointer;\n\theight: 100%;\n\tmin-width: 20px;\n\n\tsvg.search-icon {\n\t\tfill: ", ";\n\t\ttransform: scale(1.5);\n\t}\n\n\tsvg.cancel-icon {\n\t\tfill: ", ";\n\t}\n"])), function (_ref) {
|
|
23307
|
+
var _ref$theme = _ref.theme,
|
|
23308
|
+
theme = _ref$theme === void 0 ? {} : _ref$theme;
|
|
23309
|
+
return theme.colors ? theme.colors.primaryColor : 'unset';
|
|
23310
|
+
}, function (_ref2) {
|
|
23311
|
+
var _ref2$theme = _ref2.theme,
|
|
23312
|
+
theme = _ref2$theme === void 0 ? {} : _ref2$theme;
|
|
23313
|
+
return theme.colors ? theme.colors.borderColor : '#000';
|
|
23314
|
+
});
|
|
23630
23315
|
|
|
23631
|
-
|
|
23632
|
-
* 返回值是否为空
|
|
23633
|
-
*
|
|
23634
|
-
* @param {Object} obj
|
|
23635
|
-
* @return {Boolean}
|
|
23636
|
-
*/
|
|
23637
|
-
function isNull(obj) {
|
|
23638
|
-
return obj === undefined || obj === null;
|
|
23639
|
-
}
|
|
23316
|
+
function t$1(t){return "object"==typeof t&&null!=t&&1===t.nodeType}function e$1(t,e){return (!e||"hidden"!==t)&&"visible"!==t&&"clip"!==t}function n$2(t,n){if(t.clientHeight<t.scrollHeight||t.clientWidth<t.scrollWidth){var r=getComputedStyle(t,null);return e$1(r.overflowY,n)||e$1(r.overflowX,n)||function(t){var e=function(t){if(!t.ownerDocument||!t.ownerDocument.defaultView)return null;try{return t.ownerDocument.defaultView.frameElement}catch(t){return null}}(t);return !!e&&(e.clientHeight<t.scrollHeight||e.clientWidth<t.scrollWidth)}(t)}return !1}function r$2(t,e,n,r,i,o,l,d){return o<t&&l>e||o>t&&l<e?0:o<=t&&d<=n||l>=e&&d>=n?o-t-r:l>e&&d<n||o<t&&d>n?l-e+i:0}var i$3=function(e,i){var o=window,l=i.scrollMode,d=i.block,f=i.inline,h=i.boundary,u=i.skipOverflowHiddenElements,s="function"==typeof h?h:function(t){return t!==h};if(!t$1(e))throw new TypeError("Invalid target");for(var a,c,g=document.scrollingElement||document.documentElement,p=[],m=e;t$1(m)&&s(m);){if((m=null==(c=(a=m).parentElement)?a.getRootNode().host||null:c)===g){p.push(m);break}null!=m&&m===document.body&&n$2(m)&&!n$2(document.documentElement)||null!=m&&n$2(m,u)&&p.push(m);}for(var w=o.visualViewport?o.visualViewport.width:innerWidth,v=o.visualViewport?o.visualViewport.height:innerHeight,W=window.scrollX||pageXOffset,H=window.scrollY||pageYOffset,b=e.getBoundingClientRect(),y=b.height,E=b.width,M=b.top,V=b.right,x=b.bottom,I=b.left,C="start"===d||"nearest"===d?M:"end"===d?x:M+y/2,R="center"===f?I+E/2:"end"===f?V:I,T=[],k=0;k<p.length;k++){var B=p[k],D=B.getBoundingClientRect(),O=D.height,X=D.width,Y=D.top,L=D.right,S=D.bottom,j=D.left;if("if-needed"===l&&M>=0&&I>=0&&x<=v&&V<=w&&M>=Y&&x<=S&&I>=j&&V<=L)return T;var N=getComputedStyle(B),q=parseInt(N.borderLeftWidth,10),z=parseInt(N.borderTopWidth,10),A=parseInt(N.borderRightWidth,10),F=parseInt(N.borderBottomWidth,10),G=0,J=0,K="offsetWidth"in B?B.offsetWidth-B.clientWidth-q-A:0,P="offsetHeight"in B?B.offsetHeight-B.clientHeight-z-F:0,Q="offsetWidth"in B?0===B.offsetWidth?0:X/B.offsetWidth:0,U="offsetHeight"in B?0===B.offsetHeight?0:O/B.offsetHeight:0;if(g===B)G="start"===d?C:"end"===d?C-v:"nearest"===d?r$2(H,H+v,v,z,F,H+C,H+C+y,y):C-v/2,J="start"===f?R:"center"===f?R-w/2:"end"===f?R-w:r$2(W,W+w,w,q,A,W+R,W+R+E,E),G=Math.max(0,G+H),J=Math.max(0,J+W);else {G="start"===d?C-Y-z:"end"===d?C-S+F+P:"nearest"===d?r$2(Y,S,O,z,F+P,C,C+y,y):C-(Y+O/2)+P/2,J="start"===f?R-j-q:"center"===f?R-(j+X/2)+K/2:"end"===f?R-L+A+K:r$2(j,L,X,q,A+K,R,R+E,E);var Z=B.scrollLeft,$=B.scrollTop;C+=$-(G=Math.max(0,Math.min($+G/U,B.scrollHeight-O/U+P))),R+=Z-(J=Math.max(0,Math.min(Z+J/Q,B.scrollWidth-X/Q+K)));}T.push({el:B,top:G,left:J});}return T};
|
|
23640
23317
|
|
|
23641
23318
|
/**
|
|
23642
|
-
*
|
|
23643
|
-
*
|
|
23644
|
-
* @param {
|
|
23645
|
-
* @return {Object}
|
|
23319
|
+
* Scroll node into view if necessary
|
|
23320
|
+
* @param {HTMLElement} node the element that should scroll into view
|
|
23321
|
+
* @param {HTMLElement} rootNode the root element of the component
|
|
23646
23322
|
*/
|
|
23647
|
-
|
|
23648
|
-
|
|
23649
|
-
|
|
23650
|
-
|
|
23323
|
+
// eslint-disable-next-line
|
|
23324
|
+
var scrollIntoView = function scrollIntoView(node, rootNode) {
|
|
23325
|
+
if (node === null) {
|
|
23326
|
+
return;
|
|
23651
23327
|
}
|
|
23652
|
-
|
|
23653
|
-
|
|
23654
|
-
|
|
23655
|
-
|
|
23656
|
-
* 创建CSS过滤器
|
|
23657
|
-
*
|
|
23658
|
-
* @param {Object} options
|
|
23659
|
-
* - {Object} whiteList
|
|
23660
|
-
* - {Function} onAttr
|
|
23661
|
-
* - {Function} onIgnoreAttr
|
|
23662
|
-
* - {Function} safeAttrValue
|
|
23663
|
-
*/
|
|
23664
|
-
function FilterCSS(options) {
|
|
23665
|
-
options = shallowCopyObject(options || {});
|
|
23666
|
-
options.whiteList = options.whiteList || _default.whiteList;
|
|
23667
|
-
options.onAttr = options.onAttr || _default.onAttr;
|
|
23668
|
-
options.onIgnoreAttr = options.onIgnoreAttr || _default.onIgnoreAttr;
|
|
23669
|
-
options.safeAttrValue = options.safeAttrValue || _default.safeAttrValue;
|
|
23670
|
-
this.options = options;
|
|
23671
|
-
}
|
|
23672
|
-
FilterCSS.prototype.process = function (css) {
|
|
23673
|
-
// 兼容各种奇葩输入
|
|
23674
|
-
css = css || '';
|
|
23675
|
-
css = css.toString();
|
|
23676
|
-
if (!css) return '';
|
|
23677
|
-
var me = this;
|
|
23678
|
-
var options = me.options;
|
|
23679
|
-
var whiteList = options.whiteList;
|
|
23680
|
-
var onAttr = options.onAttr;
|
|
23681
|
-
var onIgnoreAttr = options.onIgnoreAttr;
|
|
23682
|
-
var safeAttrValue = options.safeAttrValue;
|
|
23683
|
-
var retCSS = parser(css, function (sourcePosition, position, name, value, source) {
|
|
23684
|
-
var check = whiteList[name];
|
|
23685
|
-
var isWhite = false;
|
|
23686
|
-
if (check === true) isWhite = check;else if (typeof check === 'function') isWhite = check(value);else if (check instanceof RegExp) isWhite = check.test(value);
|
|
23687
|
-
if (isWhite !== true) isWhite = false;
|
|
23688
|
-
|
|
23689
|
-
// 如果过滤后 value 为空则直接忽略
|
|
23690
|
-
value = safeAttrValue(name, value);
|
|
23691
|
-
if (!value) return;
|
|
23692
|
-
var opts = {
|
|
23693
|
-
position: position,
|
|
23694
|
-
sourcePosition: sourcePosition,
|
|
23695
|
-
source: source,
|
|
23696
|
-
isWhite: isWhite
|
|
23697
|
-
};
|
|
23698
|
-
if (isWhite) {
|
|
23699
|
-
var ret = onAttr(name, value, opts);
|
|
23700
|
-
if (isNull(ret)) {
|
|
23701
|
-
return name + ':' + value;
|
|
23702
|
-
} else {
|
|
23703
|
-
return ret;
|
|
23704
|
-
}
|
|
23705
|
-
} else {
|
|
23706
|
-
var ret = onIgnoreAttr(name, value, opts);
|
|
23707
|
-
if (!isNull(ret)) {
|
|
23708
|
-
return ret;
|
|
23709
|
-
}
|
|
23710
|
-
}
|
|
23711
|
-
});
|
|
23712
|
-
return retCSS;
|
|
23713
|
-
};
|
|
23714
|
-
var css$1 = FilterCSS;
|
|
23715
|
-
|
|
23716
|
-
var lib$1 = createCommonjsModule(function (module, exports) {
|
|
23717
|
-
/**
|
|
23718
|
-
* cssfilter
|
|
23719
|
-
*
|
|
23720
|
-
* @author 老雷<leizongmin@gmail.com>
|
|
23721
|
-
*/
|
|
23722
|
-
|
|
23723
|
-
/**
|
|
23724
|
-
* XSS过滤
|
|
23725
|
-
*
|
|
23726
|
-
* @param {String} css 要过滤的CSS代码
|
|
23727
|
-
* @param {Object} options 选项:whiteList, onAttr, onIgnoreAttr
|
|
23728
|
-
* @return {String}
|
|
23729
|
-
*/
|
|
23730
|
-
function filterCSS(html, options) {
|
|
23731
|
-
var xss = new css$1(options);
|
|
23732
|
-
return xss.process(html);
|
|
23733
|
-
}
|
|
23734
|
-
|
|
23735
|
-
// 输出
|
|
23736
|
-
exports = module.exports = filterCSS;
|
|
23737
|
-
exports.FilterCSS = css$1;
|
|
23738
|
-
for (var i in _default) exports[i] = _default[i];
|
|
23739
|
-
|
|
23740
|
-
// 在浏览器端使用
|
|
23741
|
-
if (typeof window !== 'undefined') {
|
|
23742
|
-
window.filterCSS = module.exports;
|
|
23743
|
-
}
|
|
23744
|
-
});
|
|
23745
|
-
var lib_1$1 = lib$1.FilterCSS;
|
|
23746
|
-
|
|
23747
|
-
var util$1 = {
|
|
23748
|
-
indexOf: function indexOf(arr, item) {
|
|
23749
|
-
var i, j;
|
|
23750
|
-
if (Array.prototype.indexOf) {
|
|
23751
|
-
return arr.indexOf(item);
|
|
23752
|
-
}
|
|
23753
|
-
for (i = 0, j = arr.length; i < j; i++) {
|
|
23754
|
-
if (arr[i] === item) {
|
|
23755
|
-
return i;
|
|
23756
|
-
}
|
|
23757
|
-
}
|
|
23758
|
-
return -1;
|
|
23759
|
-
},
|
|
23760
|
-
forEach: function forEach(arr, fn, scope) {
|
|
23761
|
-
var i, j;
|
|
23762
|
-
if (Array.prototype.forEach) {
|
|
23763
|
-
return arr.forEach(fn, scope);
|
|
23764
|
-
}
|
|
23765
|
-
for (i = 0, j = arr.length; i < j; i++) {
|
|
23766
|
-
fn.call(scope, arr[i], i, arr);
|
|
23767
|
-
}
|
|
23768
|
-
},
|
|
23769
|
-
trim: function trim(str) {
|
|
23770
|
-
if (String.prototype.trim) {
|
|
23771
|
-
return str.trim();
|
|
23772
|
-
}
|
|
23773
|
-
return str.replace(/(^\s*)|(\s*$)/g, "");
|
|
23774
|
-
},
|
|
23775
|
-
spaceIndex: function spaceIndex(str) {
|
|
23776
|
-
var reg = /\s|\n|\t/;
|
|
23777
|
-
var match = reg.exec(str);
|
|
23778
|
-
return match ? match.index : -1;
|
|
23779
|
-
}
|
|
23780
|
-
};
|
|
23781
|
-
|
|
23782
|
-
/**
|
|
23783
|
-
* default settings
|
|
23784
|
-
*
|
|
23785
|
-
* @author Zongmin Lei<leizongmin@gmail.com>
|
|
23786
|
-
*/
|
|
23787
|
-
|
|
23788
|
-
var FilterCSS$1 = lib$1.FilterCSS;
|
|
23789
|
-
var getDefaultCSSWhiteList = lib$1.getDefaultWhiteList;
|
|
23790
|
-
function getDefaultWhiteList$1() {
|
|
23791
|
-
return {
|
|
23792
|
-
a: ["target", "href", "title"],
|
|
23793
|
-
abbr: ["title"],
|
|
23794
|
-
address: [],
|
|
23795
|
-
area: ["shape", "coords", "href", "alt"],
|
|
23796
|
-
article: [],
|
|
23797
|
-
aside: [],
|
|
23798
|
-
audio: ["autoplay", "controls", "crossorigin", "loop", "muted", "preload", "src"],
|
|
23799
|
-
b: [],
|
|
23800
|
-
bdi: ["dir"],
|
|
23801
|
-
bdo: ["dir"],
|
|
23802
|
-
big: [],
|
|
23803
|
-
blockquote: ["cite"],
|
|
23804
|
-
br: [],
|
|
23805
|
-
caption: [],
|
|
23806
|
-
center: [],
|
|
23807
|
-
cite: [],
|
|
23808
|
-
code: [],
|
|
23809
|
-
col: ["align", "valign", "span", "width"],
|
|
23810
|
-
colgroup: ["align", "valign", "span", "width"],
|
|
23811
|
-
dd: [],
|
|
23812
|
-
del: ["datetime"],
|
|
23813
|
-
details: ["open"],
|
|
23814
|
-
div: [],
|
|
23815
|
-
dl: [],
|
|
23816
|
-
dt: [],
|
|
23817
|
-
em: [],
|
|
23818
|
-
figcaption: [],
|
|
23819
|
-
figure: [],
|
|
23820
|
-
font: ["color", "size", "face"],
|
|
23821
|
-
footer: [],
|
|
23822
|
-
h1: [],
|
|
23823
|
-
h2: [],
|
|
23824
|
-
h3: [],
|
|
23825
|
-
h4: [],
|
|
23826
|
-
h5: [],
|
|
23827
|
-
h6: [],
|
|
23828
|
-
header: [],
|
|
23829
|
-
hr: [],
|
|
23830
|
-
i: [],
|
|
23831
|
-
img: ["src", "alt", "title", "width", "height"],
|
|
23832
|
-
ins: ["datetime"],
|
|
23833
|
-
li: [],
|
|
23834
|
-
mark: [],
|
|
23835
|
-
nav: [],
|
|
23836
|
-
ol: [],
|
|
23837
|
-
p: [],
|
|
23838
|
-
pre: [],
|
|
23839
|
-
s: [],
|
|
23840
|
-
section: [],
|
|
23841
|
-
small: [],
|
|
23842
|
-
span: [],
|
|
23843
|
-
sub: [],
|
|
23844
|
-
summary: [],
|
|
23845
|
-
sup: [],
|
|
23846
|
-
strong: [],
|
|
23847
|
-
strike: [],
|
|
23848
|
-
table: ["width", "border", "align", "valign"],
|
|
23849
|
-
tbody: ["align", "valign"],
|
|
23850
|
-
td: ["width", "rowspan", "colspan", "align", "valign"],
|
|
23851
|
-
tfoot: ["align", "valign"],
|
|
23852
|
-
th: ["width", "rowspan", "colspan", "align", "valign"],
|
|
23853
|
-
thead: ["align", "valign"],
|
|
23854
|
-
tr: ["rowspan", "align", "valign"],
|
|
23855
|
-
tt: [],
|
|
23856
|
-
u: [],
|
|
23857
|
-
ul: [],
|
|
23858
|
-
video: ["autoplay", "controls", "crossorigin", "loop", "muted", "playsinline", "poster", "preload", "src", "height", "width"]
|
|
23859
|
-
};
|
|
23860
|
-
}
|
|
23861
|
-
var defaultCSSFilter = new FilterCSS$1();
|
|
23862
|
-
|
|
23863
|
-
/**
|
|
23864
|
-
* default onTag function
|
|
23865
|
-
*
|
|
23866
|
-
* @param {String} tag
|
|
23867
|
-
* @param {String} html
|
|
23868
|
-
* @param {Object} options
|
|
23869
|
-
* @return {String}
|
|
23870
|
-
*/
|
|
23871
|
-
function onTag(tag, html, options) {
|
|
23872
|
-
// do nothing
|
|
23873
|
-
}
|
|
23874
|
-
|
|
23875
|
-
/**
|
|
23876
|
-
* default onIgnoreTag function
|
|
23877
|
-
*
|
|
23878
|
-
* @param {String} tag
|
|
23879
|
-
* @param {String} html
|
|
23880
|
-
* @param {Object} options
|
|
23881
|
-
* @return {String}
|
|
23882
|
-
*/
|
|
23883
|
-
function onIgnoreTag(tag, html, options) {
|
|
23884
|
-
// do nothing
|
|
23885
|
-
}
|
|
23886
|
-
|
|
23887
|
-
/**
|
|
23888
|
-
* default onTagAttr function
|
|
23889
|
-
*
|
|
23890
|
-
* @param {String} tag
|
|
23891
|
-
* @param {String} name
|
|
23892
|
-
* @param {String} value
|
|
23893
|
-
* @return {String}
|
|
23894
|
-
*/
|
|
23895
|
-
function onTagAttr(tag, name, value) {
|
|
23896
|
-
// do nothing
|
|
23897
|
-
}
|
|
23898
|
-
|
|
23899
|
-
/**
|
|
23900
|
-
* default onIgnoreTagAttr function
|
|
23901
|
-
*
|
|
23902
|
-
* @param {String} tag
|
|
23903
|
-
* @param {String} name
|
|
23904
|
-
* @param {String} value
|
|
23905
|
-
* @return {String}
|
|
23906
|
-
*/
|
|
23907
|
-
function onIgnoreTagAttr(tag, name, value) {
|
|
23908
|
-
// do nothing
|
|
23909
|
-
}
|
|
23910
|
-
|
|
23911
|
-
/**
|
|
23912
|
-
* default escapeHtml function
|
|
23913
|
-
*
|
|
23914
|
-
* @param {String} html
|
|
23915
|
-
*/
|
|
23916
|
-
function escapeHtml$1(html) {
|
|
23917
|
-
return html.replace(REGEXP_LT, "<").replace(REGEXP_GT, ">");
|
|
23918
|
-
}
|
|
23919
|
-
|
|
23920
|
-
/**
|
|
23921
|
-
* default safeAttrValue function
|
|
23922
|
-
*
|
|
23923
|
-
* @param {String} tag
|
|
23924
|
-
* @param {String} name
|
|
23925
|
-
* @param {String} value
|
|
23926
|
-
* @param {Object} cssFilter
|
|
23927
|
-
* @return {String}
|
|
23928
|
-
*/
|
|
23929
|
-
function safeAttrValue$1(tag, name, value, cssFilter) {
|
|
23930
|
-
// unescape attribute value firstly
|
|
23931
|
-
value = friendlyAttrValue(value);
|
|
23932
|
-
if (name === "href" || name === "src") {
|
|
23933
|
-
// filter `href` and `src` attribute
|
|
23934
|
-
// only allow the value that starts with `http://` | `https://` | `mailto:` | `/` | `#`
|
|
23935
|
-
value = util$1.trim(value);
|
|
23936
|
-
if (value === "#") return "#";
|
|
23937
|
-
if (!(value.substr(0, 7) === "http://" || value.substr(0, 8) === "https://" || value.substr(0, 7) === "mailto:" || value.substr(0, 4) === "tel:" || value.substr(0, 11) === "data:image/" || value.substr(0, 6) === "ftp://" || value.substr(0, 2) === "./" || value.substr(0, 3) === "../" || value[0] === "#" || value[0] === "/")) {
|
|
23938
|
-
return "";
|
|
23939
|
-
}
|
|
23940
|
-
} else if (name === "background") {
|
|
23941
|
-
// filter `background` attribute (maybe no use)
|
|
23942
|
-
// `javascript:`
|
|
23943
|
-
REGEXP_DEFAULT_ON_TAG_ATTR_4.lastIndex = 0;
|
|
23944
|
-
if (REGEXP_DEFAULT_ON_TAG_ATTR_4.test(value)) {
|
|
23945
|
-
return "";
|
|
23946
|
-
}
|
|
23947
|
-
} else if (name === "style") {
|
|
23948
|
-
// `expression()`
|
|
23949
|
-
REGEXP_DEFAULT_ON_TAG_ATTR_7.lastIndex = 0;
|
|
23950
|
-
if (REGEXP_DEFAULT_ON_TAG_ATTR_7.test(value)) {
|
|
23951
|
-
return "";
|
|
23952
|
-
}
|
|
23953
|
-
// `url()`
|
|
23954
|
-
REGEXP_DEFAULT_ON_TAG_ATTR_8.lastIndex = 0;
|
|
23955
|
-
if (REGEXP_DEFAULT_ON_TAG_ATTR_8.test(value)) {
|
|
23956
|
-
REGEXP_DEFAULT_ON_TAG_ATTR_4.lastIndex = 0;
|
|
23957
|
-
if (REGEXP_DEFAULT_ON_TAG_ATTR_4.test(value)) {
|
|
23958
|
-
return "";
|
|
23959
|
-
}
|
|
23960
|
-
}
|
|
23961
|
-
if (cssFilter !== false) {
|
|
23962
|
-
cssFilter = cssFilter || defaultCSSFilter;
|
|
23963
|
-
value = cssFilter.process(value);
|
|
23964
|
-
}
|
|
23965
|
-
}
|
|
23966
|
-
|
|
23967
|
-
// escape `<>"` before returns
|
|
23968
|
-
value = escapeAttrValue(value);
|
|
23969
|
-
return value;
|
|
23970
|
-
}
|
|
23971
|
-
|
|
23972
|
-
// RegExp list
|
|
23973
|
-
var REGEXP_LT = /</g;
|
|
23974
|
-
var REGEXP_GT = />/g;
|
|
23975
|
-
var REGEXP_QUOTE = /"/g;
|
|
23976
|
-
var REGEXP_QUOTE_2 = /"/g;
|
|
23977
|
-
var REGEXP_ATTR_VALUE_1 = /&#([a-zA-Z0-9]*);?/gim;
|
|
23978
|
-
var REGEXP_ATTR_VALUE_COLON = /:?/gim;
|
|
23979
|
-
var REGEXP_ATTR_VALUE_NEWLINE = /&newline;?/gim;
|
|
23980
|
-
// var REGEXP_DEFAULT_ON_TAG_ATTR_3 = /\/\*|\*\//gm;
|
|
23981
|
-
var REGEXP_DEFAULT_ON_TAG_ATTR_4 = /((j\s*a\s*v\s*a|v\s*b|l\s*i\s*v\s*e)\s*s\s*c\s*r\s*i\s*p\s*t\s*|m\s*o\s*c\s*h\s*a):/gi;
|
|
23982
|
-
// var REGEXP_DEFAULT_ON_TAG_ATTR_5 = /^[\s"'`]*(d\s*a\s*t\s*a\s*)\:/gi;
|
|
23983
|
-
// var REGEXP_DEFAULT_ON_TAG_ATTR_6 = /^[\s"'`]*(d\s*a\s*t\s*a\s*)\:\s*image\//gi;
|
|
23984
|
-
var REGEXP_DEFAULT_ON_TAG_ATTR_7 = /e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi;
|
|
23985
|
-
var REGEXP_DEFAULT_ON_TAG_ATTR_8 = /u\s*r\s*l\s*\(.*/gi;
|
|
23986
|
-
|
|
23987
|
-
/**
|
|
23988
|
-
* escape double quote
|
|
23989
|
-
*
|
|
23990
|
-
* @param {String} str
|
|
23991
|
-
* @return {String} str
|
|
23992
|
-
*/
|
|
23993
|
-
function escapeQuote(str) {
|
|
23994
|
-
return str.replace(REGEXP_QUOTE, """);
|
|
23995
|
-
}
|
|
23996
|
-
|
|
23997
|
-
/**
|
|
23998
|
-
* unescape double quote
|
|
23999
|
-
*
|
|
24000
|
-
* @param {String} str
|
|
24001
|
-
* @return {String} str
|
|
24002
|
-
*/
|
|
24003
|
-
function unescapeQuote(str) {
|
|
24004
|
-
return str.replace(REGEXP_QUOTE_2, '"');
|
|
24005
|
-
}
|
|
24006
|
-
|
|
24007
|
-
/**
|
|
24008
|
-
* escape html entities
|
|
24009
|
-
*
|
|
24010
|
-
* @param {String} str
|
|
24011
|
-
* @return {String}
|
|
24012
|
-
*/
|
|
24013
|
-
function escapeHtmlEntities(str) {
|
|
24014
|
-
return str.replace(REGEXP_ATTR_VALUE_1, function replaceUnicode(str, code) {
|
|
24015
|
-
return code[0] === "x" || code[0] === "X" ? String.fromCharCode(parseInt(code.substr(1), 16)) : String.fromCharCode(parseInt(code, 10));
|
|
24016
|
-
});
|
|
24017
|
-
}
|
|
24018
|
-
|
|
24019
|
-
/**
|
|
24020
|
-
* escape html5 new danger entities
|
|
24021
|
-
*
|
|
24022
|
-
* @param {String} str
|
|
24023
|
-
* @return {String}
|
|
24024
|
-
*/
|
|
24025
|
-
function escapeDangerHtml5Entities(str) {
|
|
24026
|
-
return str.replace(REGEXP_ATTR_VALUE_COLON, ":").replace(REGEXP_ATTR_VALUE_NEWLINE, " ");
|
|
24027
|
-
}
|
|
24028
|
-
|
|
24029
|
-
/**
|
|
24030
|
-
* clear nonprintable characters
|
|
24031
|
-
*
|
|
24032
|
-
* @param {String} str
|
|
24033
|
-
* @return {String}
|
|
24034
|
-
*/
|
|
24035
|
-
function clearNonPrintableCharacter(str) {
|
|
24036
|
-
var str2 = "";
|
|
24037
|
-
for (var i = 0, len = str.length; i < len; i++) {
|
|
24038
|
-
str2 += str.charCodeAt(i) < 32 ? " " : str.charAt(i);
|
|
24039
|
-
}
|
|
24040
|
-
return util$1.trim(str2);
|
|
24041
|
-
}
|
|
24042
|
-
|
|
24043
|
-
/**
|
|
24044
|
-
* get friendly attribute value
|
|
24045
|
-
*
|
|
24046
|
-
* @param {String} str
|
|
24047
|
-
* @return {String}
|
|
24048
|
-
*/
|
|
24049
|
-
function friendlyAttrValue(str) {
|
|
24050
|
-
str = unescapeQuote(str);
|
|
24051
|
-
str = escapeHtmlEntities(str);
|
|
24052
|
-
str = escapeDangerHtml5Entities(str);
|
|
24053
|
-
str = clearNonPrintableCharacter(str);
|
|
24054
|
-
return str;
|
|
24055
|
-
}
|
|
24056
|
-
|
|
24057
|
-
/**
|
|
24058
|
-
* unescape attribute value
|
|
24059
|
-
*
|
|
24060
|
-
* @param {String} str
|
|
24061
|
-
* @return {String}
|
|
24062
|
-
*/
|
|
24063
|
-
function escapeAttrValue(str) {
|
|
24064
|
-
str = escapeQuote(str);
|
|
24065
|
-
str = escapeHtml$1(str);
|
|
24066
|
-
return str;
|
|
24067
|
-
}
|
|
24068
|
-
|
|
24069
|
-
/**
|
|
24070
|
-
* `onIgnoreTag` function for removing all the tags that are not in whitelist
|
|
24071
|
-
*/
|
|
24072
|
-
function onIgnoreTagStripAll() {
|
|
24073
|
-
return "";
|
|
24074
|
-
}
|
|
24075
|
-
|
|
24076
|
-
/**
|
|
24077
|
-
* remove tag body
|
|
24078
|
-
* specify a `tags` list, if the tag is not in the `tags` list then process by the specify function (optional)
|
|
24079
|
-
*
|
|
24080
|
-
* @param {array} tags
|
|
24081
|
-
* @param {function} next
|
|
24082
|
-
*/
|
|
24083
|
-
function StripTagBody(tags, next) {
|
|
24084
|
-
if (typeof next !== "function") {
|
|
24085
|
-
next = function next() {};
|
|
24086
|
-
}
|
|
24087
|
-
var isRemoveAllTag = !Array.isArray(tags);
|
|
24088
|
-
function isRemoveTag(tag) {
|
|
24089
|
-
if (isRemoveAllTag) return true;
|
|
24090
|
-
return util$1.indexOf(tags, tag) !== -1;
|
|
24091
|
-
}
|
|
24092
|
-
var removeList = [];
|
|
24093
|
-
var posStart = false;
|
|
24094
|
-
return {
|
|
24095
|
-
onIgnoreTag: function onIgnoreTag(tag, html, options) {
|
|
24096
|
-
if (isRemoveTag(tag)) {
|
|
24097
|
-
if (options.isClosing) {
|
|
24098
|
-
var ret = "[/removed]";
|
|
24099
|
-
var end = options.position + ret.length;
|
|
24100
|
-
removeList.push([posStart !== false ? posStart : options.position, end]);
|
|
24101
|
-
posStart = false;
|
|
24102
|
-
return ret;
|
|
24103
|
-
} else {
|
|
24104
|
-
if (!posStart) {
|
|
24105
|
-
posStart = options.position;
|
|
24106
|
-
}
|
|
24107
|
-
return "[removed]";
|
|
24108
|
-
}
|
|
24109
|
-
} else {
|
|
24110
|
-
return next(tag, html, options);
|
|
24111
|
-
}
|
|
24112
|
-
},
|
|
24113
|
-
remove: function remove(html) {
|
|
24114
|
-
var rethtml = "";
|
|
24115
|
-
var lastPos = 0;
|
|
24116
|
-
util$1.forEach(removeList, function (pos) {
|
|
24117
|
-
rethtml += html.slice(lastPos, pos[0]);
|
|
24118
|
-
lastPos = pos[1];
|
|
24119
|
-
});
|
|
24120
|
-
rethtml += html.slice(lastPos);
|
|
24121
|
-
return rethtml;
|
|
24122
|
-
}
|
|
24123
|
-
};
|
|
24124
|
-
}
|
|
24125
|
-
|
|
24126
|
-
/**
|
|
24127
|
-
* remove html comments
|
|
24128
|
-
*
|
|
24129
|
-
* @param {String} html
|
|
24130
|
-
* @return {String}
|
|
24131
|
-
*/
|
|
24132
|
-
function stripCommentTag(html) {
|
|
24133
|
-
var retHtml = "";
|
|
24134
|
-
var lastPos = 0;
|
|
24135
|
-
while (lastPos < html.length) {
|
|
24136
|
-
var i = html.indexOf("<!--", lastPos);
|
|
24137
|
-
if (i === -1) {
|
|
24138
|
-
retHtml += html.slice(lastPos);
|
|
24139
|
-
break;
|
|
24140
|
-
}
|
|
24141
|
-
retHtml += html.slice(lastPos, i);
|
|
24142
|
-
var j = html.indexOf("-->", i);
|
|
24143
|
-
if (j === -1) {
|
|
24144
|
-
break;
|
|
24145
|
-
}
|
|
24146
|
-
lastPos = j + 3;
|
|
24147
|
-
}
|
|
24148
|
-
return retHtml;
|
|
24149
|
-
}
|
|
24150
|
-
|
|
24151
|
-
/**
|
|
24152
|
-
* remove invisible characters
|
|
24153
|
-
*
|
|
24154
|
-
* @param {String} html
|
|
24155
|
-
* @return {String}
|
|
24156
|
-
*/
|
|
24157
|
-
function stripBlankChar(html) {
|
|
24158
|
-
var chars = html.split("");
|
|
24159
|
-
chars = chars.filter(function (_char) {
|
|
24160
|
-
var c = _char.charCodeAt(0);
|
|
24161
|
-
if (c === 127) return false;
|
|
24162
|
-
if (c <= 31) {
|
|
24163
|
-
if (c === 10 || c === 13) return true;
|
|
24164
|
-
return false;
|
|
24165
|
-
}
|
|
24166
|
-
return true;
|
|
24167
|
-
});
|
|
24168
|
-
return chars.join("");
|
|
24169
|
-
}
|
|
24170
|
-
var whiteList$1 = getDefaultWhiteList$1();
|
|
24171
|
-
var getDefaultWhiteList_1$1 = getDefaultWhiteList$1;
|
|
24172
|
-
var onTag_1 = onTag;
|
|
24173
|
-
var onIgnoreTag_1 = onIgnoreTag;
|
|
24174
|
-
var onTagAttr_1 = onTagAttr;
|
|
24175
|
-
var onIgnoreTagAttr_1 = onIgnoreTagAttr;
|
|
24176
|
-
var safeAttrValue_1$1 = safeAttrValue$1;
|
|
24177
|
-
var escapeHtml_1 = escapeHtml$1;
|
|
24178
|
-
var escapeQuote_1 = escapeQuote;
|
|
24179
|
-
var unescapeQuote_1 = unescapeQuote;
|
|
24180
|
-
var escapeHtmlEntities_1 = escapeHtmlEntities;
|
|
24181
|
-
var escapeDangerHtml5Entities_1 = escapeDangerHtml5Entities;
|
|
24182
|
-
var clearNonPrintableCharacter_1 = clearNonPrintableCharacter;
|
|
24183
|
-
var friendlyAttrValue_1 = friendlyAttrValue;
|
|
24184
|
-
var escapeAttrValue_1 = escapeAttrValue;
|
|
24185
|
-
var onIgnoreTagStripAll_1 = onIgnoreTagStripAll;
|
|
24186
|
-
var StripTagBody_1 = StripTagBody;
|
|
24187
|
-
var stripCommentTag_1 = stripCommentTag;
|
|
24188
|
-
var stripBlankChar_1 = stripBlankChar;
|
|
24189
|
-
var cssFilter = defaultCSSFilter;
|
|
24190
|
-
var getDefaultCSSWhiteList_1 = getDefaultCSSWhiteList;
|
|
24191
|
-
var _default$1 = {
|
|
24192
|
-
whiteList: whiteList$1,
|
|
24193
|
-
getDefaultWhiteList: getDefaultWhiteList_1$1,
|
|
24194
|
-
onTag: onTag_1,
|
|
24195
|
-
onIgnoreTag: onIgnoreTag_1,
|
|
24196
|
-
onTagAttr: onTagAttr_1,
|
|
24197
|
-
onIgnoreTagAttr: onIgnoreTagAttr_1,
|
|
24198
|
-
safeAttrValue: safeAttrValue_1$1,
|
|
24199
|
-
escapeHtml: escapeHtml_1,
|
|
24200
|
-
escapeQuote: escapeQuote_1,
|
|
24201
|
-
unescapeQuote: unescapeQuote_1,
|
|
24202
|
-
escapeHtmlEntities: escapeHtmlEntities_1,
|
|
24203
|
-
escapeDangerHtml5Entities: escapeDangerHtml5Entities_1,
|
|
24204
|
-
clearNonPrintableCharacter: clearNonPrintableCharacter_1,
|
|
24205
|
-
friendlyAttrValue: friendlyAttrValue_1,
|
|
24206
|
-
escapeAttrValue: escapeAttrValue_1,
|
|
24207
|
-
onIgnoreTagStripAll: onIgnoreTagStripAll_1,
|
|
24208
|
-
StripTagBody: StripTagBody_1,
|
|
24209
|
-
stripCommentTag: stripCommentTag_1,
|
|
24210
|
-
stripBlankChar: stripBlankChar_1,
|
|
24211
|
-
cssFilter: cssFilter,
|
|
24212
|
-
getDefaultCSSWhiteList: getDefaultCSSWhiteList_1
|
|
24213
|
-
};
|
|
24214
|
-
|
|
24215
|
-
/**
|
|
24216
|
-
* Simple HTML Parser
|
|
24217
|
-
*
|
|
24218
|
-
* @author Zongmin Lei<leizongmin@gmail.com>
|
|
24219
|
-
*/
|
|
24220
|
-
|
|
24221
|
-
/**
|
|
24222
|
-
* get tag name
|
|
24223
|
-
*
|
|
24224
|
-
* @param {String} html e.g. '<a hef="#">'
|
|
24225
|
-
* @return {String}
|
|
24226
|
-
*/
|
|
24227
|
-
function getTagName(html) {
|
|
24228
|
-
var i = util$1.spaceIndex(html);
|
|
24229
|
-
var tagName;
|
|
24230
|
-
if (i === -1) {
|
|
24231
|
-
tagName = html.slice(1, -1);
|
|
24232
|
-
} else {
|
|
24233
|
-
tagName = html.slice(1, i + 1);
|
|
24234
|
-
}
|
|
24235
|
-
tagName = util$1.trim(tagName).toLowerCase();
|
|
24236
|
-
if (tagName.slice(0, 1) === "/") tagName = tagName.slice(1);
|
|
24237
|
-
if (tagName.slice(-1) === "/") tagName = tagName.slice(0, -1);
|
|
24238
|
-
return tagName;
|
|
24239
|
-
}
|
|
24240
|
-
|
|
24241
|
-
/**
|
|
24242
|
-
* is close tag?
|
|
24243
|
-
*
|
|
24244
|
-
* @param {String} html 如:'<a hef="#">'
|
|
24245
|
-
* @return {Boolean}
|
|
24246
|
-
*/
|
|
24247
|
-
function isClosing(html) {
|
|
24248
|
-
return html.slice(0, 2) === "</";
|
|
24249
|
-
}
|
|
24250
|
-
|
|
24251
|
-
/**
|
|
24252
|
-
* parse input html and returns processed html
|
|
24253
|
-
*
|
|
24254
|
-
* @param {String} html
|
|
24255
|
-
* @param {Function} onTag e.g. function (sourcePosition, position, tag, html, isClosing)
|
|
24256
|
-
* @param {Function} escapeHtml
|
|
24257
|
-
* @return {String}
|
|
24258
|
-
*/
|
|
24259
|
-
function parseTag(html, onTag, escapeHtml) {
|
|
24260
|
-
|
|
24261
|
-
var rethtml = "";
|
|
24262
|
-
var lastPos = 0;
|
|
24263
|
-
var tagStart = false;
|
|
24264
|
-
var quoteStart = false;
|
|
24265
|
-
var currentPos = 0;
|
|
24266
|
-
var len = html.length;
|
|
24267
|
-
var currentTagName = "";
|
|
24268
|
-
var currentHtml = "";
|
|
24269
|
-
chariterator: for (currentPos = 0; currentPos < len; currentPos++) {
|
|
24270
|
-
var c = html.charAt(currentPos);
|
|
24271
|
-
if (tagStart === false) {
|
|
24272
|
-
if (c === "<") {
|
|
24273
|
-
tagStart = currentPos;
|
|
24274
|
-
continue;
|
|
24275
|
-
}
|
|
24276
|
-
} else {
|
|
24277
|
-
if (quoteStart === false) {
|
|
24278
|
-
if (c === "<") {
|
|
24279
|
-
rethtml += escapeHtml(html.slice(lastPos, currentPos));
|
|
24280
|
-
tagStart = currentPos;
|
|
24281
|
-
lastPos = currentPos;
|
|
24282
|
-
continue;
|
|
24283
|
-
}
|
|
24284
|
-
if (c === ">" || currentPos === len - 1) {
|
|
24285
|
-
rethtml += escapeHtml(html.slice(lastPos, tagStart));
|
|
24286
|
-
currentHtml = html.slice(tagStart, currentPos + 1);
|
|
24287
|
-
currentTagName = getTagName(currentHtml);
|
|
24288
|
-
rethtml += onTag(tagStart, rethtml.length, currentTagName, currentHtml, isClosing(currentHtml));
|
|
24289
|
-
lastPos = currentPos + 1;
|
|
24290
|
-
tagStart = false;
|
|
24291
|
-
continue;
|
|
24292
|
-
}
|
|
24293
|
-
if (c === '"' || c === "'") {
|
|
24294
|
-
var i = 1;
|
|
24295
|
-
var ic = html.charAt(currentPos - i);
|
|
24296
|
-
while (ic.trim() === "" || ic === "=") {
|
|
24297
|
-
if (ic === "=") {
|
|
24298
|
-
quoteStart = c;
|
|
24299
|
-
continue chariterator;
|
|
24300
|
-
}
|
|
24301
|
-
ic = html.charAt(currentPos - ++i);
|
|
24302
|
-
}
|
|
24303
|
-
}
|
|
24304
|
-
} else {
|
|
24305
|
-
if (c === quoteStart) {
|
|
24306
|
-
quoteStart = false;
|
|
24307
|
-
continue;
|
|
24308
|
-
}
|
|
24309
|
-
}
|
|
24310
|
-
}
|
|
24311
|
-
}
|
|
24312
|
-
if (lastPos < len) {
|
|
24313
|
-
rethtml += escapeHtml(html.substr(lastPos));
|
|
24314
|
-
}
|
|
24315
|
-
return rethtml;
|
|
24316
|
-
}
|
|
24317
|
-
var REGEXP_ILLEGAL_ATTR_NAME = /[^a-zA-Z0-9\\_:.-]/gim;
|
|
24318
|
-
|
|
24319
|
-
/**
|
|
24320
|
-
* parse input attributes and returns processed attributes
|
|
24321
|
-
*
|
|
24322
|
-
* @param {String} html e.g. `href="#" target="_blank"`
|
|
24323
|
-
* @param {Function} onAttr e.g. `function (name, value)`
|
|
24324
|
-
* @return {String}
|
|
24325
|
-
*/
|
|
24326
|
-
function parseAttr(html, onAttr) {
|
|
24327
|
-
|
|
24328
|
-
var lastPos = 0;
|
|
24329
|
-
var lastMarkPos = 0;
|
|
24330
|
-
var retAttrs = [];
|
|
24331
|
-
var tmpName = false;
|
|
24332
|
-
var len = html.length;
|
|
24333
|
-
function addAttr(name, value) {
|
|
24334
|
-
name = util$1.trim(name);
|
|
24335
|
-
name = name.replace(REGEXP_ILLEGAL_ATTR_NAME, "").toLowerCase();
|
|
24336
|
-
if (name.length < 1) return;
|
|
24337
|
-
var ret = onAttr(name, value || "");
|
|
24338
|
-
if (ret) retAttrs.push(ret);
|
|
24339
|
-
}
|
|
24340
|
-
|
|
24341
|
-
// 逐个分析字符
|
|
24342
|
-
for (var i = 0; i < len; i++) {
|
|
24343
|
-
var c = html.charAt(i);
|
|
24344
|
-
var v, j;
|
|
24345
|
-
if (tmpName === false && c === "=") {
|
|
24346
|
-
tmpName = html.slice(lastPos, i);
|
|
24347
|
-
lastPos = i + 1;
|
|
24348
|
-
lastMarkPos = html.charAt(lastPos) === '"' || html.charAt(lastPos) === "'" ? lastPos : findNextQuotationMark(html, i + 1);
|
|
24349
|
-
continue;
|
|
24350
|
-
}
|
|
24351
|
-
if (tmpName !== false) {
|
|
24352
|
-
if (i === lastMarkPos) {
|
|
24353
|
-
j = html.indexOf(c, i + 1);
|
|
24354
|
-
if (j === -1) {
|
|
24355
|
-
break;
|
|
24356
|
-
} else {
|
|
24357
|
-
v = util$1.trim(html.slice(lastMarkPos + 1, j));
|
|
24358
|
-
addAttr(tmpName, v);
|
|
24359
|
-
tmpName = false;
|
|
24360
|
-
i = j;
|
|
24361
|
-
lastPos = i + 1;
|
|
24362
|
-
continue;
|
|
24363
|
-
}
|
|
24364
|
-
}
|
|
24365
|
-
}
|
|
24366
|
-
if (/\s|\n|\t/.test(c)) {
|
|
24367
|
-
html = html.replace(/\s|\n|\t/g, " ");
|
|
24368
|
-
if (tmpName === false) {
|
|
24369
|
-
j = findNextEqual(html, i);
|
|
24370
|
-
if (j === -1) {
|
|
24371
|
-
v = util$1.trim(html.slice(lastPos, i));
|
|
24372
|
-
addAttr(v);
|
|
24373
|
-
tmpName = false;
|
|
24374
|
-
lastPos = i + 1;
|
|
24375
|
-
continue;
|
|
24376
|
-
} else {
|
|
24377
|
-
i = j - 1;
|
|
24378
|
-
continue;
|
|
24379
|
-
}
|
|
24380
|
-
} else {
|
|
24381
|
-
j = findBeforeEqual(html, i - 1);
|
|
24382
|
-
if (j === -1) {
|
|
24383
|
-
v = util$1.trim(html.slice(lastPos, i));
|
|
24384
|
-
v = stripQuoteWrap(v);
|
|
24385
|
-
addAttr(tmpName, v);
|
|
24386
|
-
tmpName = false;
|
|
24387
|
-
lastPos = i + 1;
|
|
24388
|
-
continue;
|
|
24389
|
-
} else {
|
|
24390
|
-
continue;
|
|
24391
|
-
}
|
|
24392
|
-
}
|
|
24393
|
-
}
|
|
24394
|
-
}
|
|
24395
|
-
if (lastPos < html.length) {
|
|
24396
|
-
if (tmpName === false) {
|
|
24397
|
-
addAttr(html.slice(lastPos));
|
|
24398
|
-
} else {
|
|
24399
|
-
addAttr(tmpName, stripQuoteWrap(util$1.trim(html.slice(lastPos))));
|
|
24400
|
-
}
|
|
24401
|
-
}
|
|
24402
|
-
return util$1.trim(retAttrs.join(" "));
|
|
24403
|
-
}
|
|
24404
|
-
function findNextEqual(str, i) {
|
|
24405
|
-
for (; i < str.length; i++) {
|
|
24406
|
-
var c = str[i];
|
|
24407
|
-
if (c === " ") continue;
|
|
24408
|
-
if (c === "=") return i;
|
|
24409
|
-
return -1;
|
|
24410
|
-
}
|
|
24411
|
-
}
|
|
24412
|
-
function findNextQuotationMark(str, i) {
|
|
24413
|
-
for (; i < str.length; i++) {
|
|
24414
|
-
var c = str[i];
|
|
24415
|
-
if (c === " ") continue;
|
|
24416
|
-
if (c === "'" || c === '"') return i;
|
|
24417
|
-
return -1;
|
|
24418
|
-
}
|
|
24419
|
-
}
|
|
24420
|
-
function findBeforeEqual(str, i) {
|
|
24421
|
-
for (; i > 0; i--) {
|
|
24422
|
-
var c = str[i];
|
|
24423
|
-
if (c === " ") continue;
|
|
24424
|
-
if (c === "=") return i;
|
|
24425
|
-
return -1;
|
|
24426
|
-
}
|
|
24427
|
-
}
|
|
24428
|
-
function isQuoteWrapString(text) {
|
|
24429
|
-
if (text[0] === '"' && text[text.length - 1] === '"' || text[0] === "'" && text[text.length - 1] === "'") {
|
|
24430
|
-
return true;
|
|
24431
|
-
} else {
|
|
24432
|
-
return false;
|
|
24433
|
-
}
|
|
24434
|
-
}
|
|
24435
|
-
function stripQuoteWrap(text) {
|
|
24436
|
-
if (isQuoteWrapString(text)) {
|
|
24437
|
-
return text.substr(1, text.length - 2);
|
|
24438
|
-
} else {
|
|
24439
|
-
return text;
|
|
24440
|
-
}
|
|
24441
|
-
}
|
|
24442
|
-
var parseTag_1 = parseTag;
|
|
24443
|
-
var parseAttr_1 = parseAttr;
|
|
24444
|
-
var parser$1 = {
|
|
24445
|
-
parseTag: parseTag_1,
|
|
24446
|
-
parseAttr: parseAttr_1
|
|
24447
|
-
};
|
|
24448
|
-
|
|
24449
|
-
/**
|
|
24450
|
-
* filter xss
|
|
24451
|
-
*
|
|
24452
|
-
* @author Zongmin Lei<leizongmin@gmail.com>
|
|
24453
|
-
*/
|
|
24454
|
-
|
|
24455
|
-
var FilterCSS$2 = lib$1.FilterCSS;
|
|
24456
|
-
var parseTag$1 = parser$1.parseTag;
|
|
24457
|
-
var parseAttr$1 = parser$1.parseAttr;
|
|
24458
|
-
|
|
24459
|
-
/**
|
|
24460
|
-
* returns `true` if the input value is `undefined` or `null`
|
|
24461
|
-
*
|
|
24462
|
-
* @param {Object} obj
|
|
24463
|
-
* @return {Boolean}
|
|
24464
|
-
*/
|
|
24465
|
-
function isNull$1(obj) {
|
|
24466
|
-
return obj === undefined || obj === null;
|
|
24467
|
-
}
|
|
24468
|
-
|
|
24469
|
-
/**
|
|
24470
|
-
* get attributes for a tag
|
|
24471
|
-
*
|
|
24472
|
-
* @param {String} html
|
|
24473
|
-
* @return {Object}
|
|
24474
|
-
* - {String} html
|
|
24475
|
-
* - {Boolean} closing
|
|
24476
|
-
*/
|
|
24477
|
-
function getAttrs(html) {
|
|
24478
|
-
var i = util$1.spaceIndex(html);
|
|
24479
|
-
if (i === -1) {
|
|
24480
|
-
return {
|
|
24481
|
-
html: "",
|
|
24482
|
-
closing: html[html.length - 2] === "/"
|
|
24483
|
-
};
|
|
24484
|
-
}
|
|
24485
|
-
html = util$1.trim(html.slice(i + 1, -1));
|
|
24486
|
-
var isClosing = html[html.length - 1] === "/";
|
|
24487
|
-
if (isClosing) html = util$1.trim(html.slice(0, -1));
|
|
24488
|
-
return {
|
|
24489
|
-
html: html,
|
|
24490
|
-
closing: isClosing
|
|
24491
|
-
};
|
|
24492
|
-
}
|
|
24493
|
-
|
|
24494
|
-
/**
|
|
24495
|
-
* shallow copy
|
|
24496
|
-
*
|
|
24497
|
-
* @param {Object} obj
|
|
24498
|
-
* @return {Object}
|
|
24499
|
-
*/
|
|
24500
|
-
function shallowCopyObject$1(obj) {
|
|
24501
|
-
var ret = {};
|
|
24502
|
-
for (var i in obj) {
|
|
24503
|
-
ret[i] = obj[i];
|
|
24504
|
-
}
|
|
24505
|
-
return ret;
|
|
24506
|
-
}
|
|
24507
|
-
function keysToLowerCase(obj) {
|
|
24508
|
-
var ret = {};
|
|
24509
|
-
for (var i in obj) {
|
|
24510
|
-
if (Array.isArray(obj[i])) {
|
|
24511
|
-
ret[i.toLowerCase()] = obj[i].map(function (item) {
|
|
24512
|
-
return item.toLowerCase();
|
|
24513
|
-
});
|
|
24514
|
-
} else {
|
|
24515
|
-
ret[i.toLowerCase()] = obj[i];
|
|
24516
|
-
}
|
|
24517
|
-
}
|
|
24518
|
-
return ret;
|
|
24519
|
-
}
|
|
24520
|
-
|
|
24521
|
-
/**
|
|
24522
|
-
* FilterXSS class
|
|
24523
|
-
*
|
|
24524
|
-
* @param {Object} options
|
|
24525
|
-
* whiteList (or allowList), onTag, onTagAttr, onIgnoreTag,
|
|
24526
|
-
* onIgnoreTagAttr, safeAttrValue, escapeHtml
|
|
24527
|
-
* stripIgnoreTagBody, allowCommentTag, stripBlankChar
|
|
24528
|
-
* css{whiteList, onAttr, onIgnoreAttr} `css=false` means don't use `cssfilter`
|
|
24529
|
-
*/
|
|
24530
|
-
function FilterXSS(options) {
|
|
24531
|
-
options = shallowCopyObject$1(options || {});
|
|
24532
|
-
if (options.stripIgnoreTag) {
|
|
24533
|
-
if (options.onIgnoreTag) {
|
|
24534
|
-
console.error('Notes: cannot use these two options "stripIgnoreTag" and "onIgnoreTag" at the same time');
|
|
24535
|
-
}
|
|
24536
|
-
options.onIgnoreTag = _default$1.onIgnoreTagStripAll;
|
|
24537
|
-
}
|
|
24538
|
-
if (options.whiteList || options.allowList) {
|
|
24539
|
-
options.whiteList = keysToLowerCase(options.whiteList || options.allowList);
|
|
24540
|
-
} else {
|
|
24541
|
-
options.whiteList = _default$1.whiteList;
|
|
24542
|
-
}
|
|
24543
|
-
options.onTag = options.onTag || _default$1.onTag;
|
|
24544
|
-
options.onTagAttr = options.onTagAttr || _default$1.onTagAttr;
|
|
24545
|
-
options.onIgnoreTag = options.onIgnoreTag || _default$1.onIgnoreTag;
|
|
24546
|
-
options.onIgnoreTagAttr = options.onIgnoreTagAttr || _default$1.onIgnoreTagAttr;
|
|
24547
|
-
options.safeAttrValue = options.safeAttrValue || _default$1.safeAttrValue;
|
|
24548
|
-
options.escapeHtml = options.escapeHtml || _default$1.escapeHtml;
|
|
24549
|
-
this.options = options;
|
|
24550
|
-
if (options.css === false) {
|
|
24551
|
-
this.cssFilter = false;
|
|
24552
|
-
} else {
|
|
24553
|
-
options.css = options.css || {};
|
|
24554
|
-
this.cssFilter = new FilterCSS$2(options.css);
|
|
24555
|
-
}
|
|
24556
|
-
}
|
|
24557
|
-
|
|
24558
|
-
/**
|
|
24559
|
-
* start process and returns result
|
|
24560
|
-
*
|
|
24561
|
-
* @param {String} html
|
|
24562
|
-
* @return {String}
|
|
24563
|
-
*/
|
|
24564
|
-
FilterXSS.prototype.process = function (html) {
|
|
24565
|
-
// compatible with the input
|
|
24566
|
-
html = html || "";
|
|
24567
|
-
html = html.toString();
|
|
24568
|
-
if (!html) return "";
|
|
24569
|
-
var me = this;
|
|
24570
|
-
var options = me.options;
|
|
24571
|
-
var whiteList = options.whiteList;
|
|
24572
|
-
var onTag = options.onTag;
|
|
24573
|
-
var onIgnoreTag = options.onIgnoreTag;
|
|
24574
|
-
var onTagAttr = options.onTagAttr;
|
|
24575
|
-
var onIgnoreTagAttr = options.onIgnoreTagAttr;
|
|
24576
|
-
var safeAttrValue = options.safeAttrValue;
|
|
24577
|
-
var escapeHtml = options.escapeHtml;
|
|
24578
|
-
var cssFilter = me.cssFilter;
|
|
24579
|
-
|
|
24580
|
-
// remove invisible characters
|
|
24581
|
-
if (options.stripBlankChar) {
|
|
24582
|
-
html = _default$1.stripBlankChar(html);
|
|
24583
|
-
}
|
|
24584
|
-
|
|
24585
|
-
// remove html comments
|
|
24586
|
-
if (!options.allowCommentTag) {
|
|
24587
|
-
html = _default$1.stripCommentTag(html);
|
|
24588
|
-
}
|
|
24589
|
-
|
|
24590
|
-
// if enable stripIgnoreTagBody
|
|
24591
|
-
var stripIgnoreTagBody = false;
|
|
24592
|
-
if (options.stripIgnoreTagBody) {
|
|
24593
|
-
stripIgnoreTagBody = _default$1.StripTagBody(options.stripIgnoreTagBody, onIgnoreTag);
|
|
24594
|
-
onIgnoreTag = stripIgnoreTagBody.onIgnoreTag;
|
|
24595
|
-
}
|
|
24596
|
-
var retHtml = parseTag$1(html, function (sourcePosition, position, tag, html, isClosing) {
|
|
24597
|
-
var info = {
|
|
24598
|
-
sourcePosition: sourcePosition,
|
|
24599
|
-
position: position,
|
|
24600
|
-
isClosing: isClosing,
|
|
24601
|
-
isWhite: Object.prototype.hasOwnProperty.call(whiteList, tag)
|
|
24602
|
-
};
|
|
24603
|
-
|
|
24604
|
-
// call `onTag()`
|
|
24605
|
-
var ret = onTag(tag, html, info);
|
|
24606
|
-
if (!isNull$1(ret)) return ret;
|
|
24607
|
-
if (info.isWhite) {
|
|
24608
|
-
if (info.isClosing) {
|
|
24609
|
-
return "</" + tag + ">";
|
|
24610
|
-
}
|
|
24611
|
-
var attrs = getAttrs(html);
|
|
24612
|
-
var whiteAttrList = whiteList[tag];
|
|
24613
|
-
var attrsHtml = parseAttr$1(attrs.html, function (name, value) {
|
|
24614
|
-
// call `onTagAttr()`
|
|
24615
|
-
var isWhiteAttr = util$1.indexOf(whiteAttrList, name) !== -1;
|
|
24616
|
-
var ret = onTagAttr(tag, name, value, isWhiteAttr);
|
|
24617
|
-
if (!isNull$1(ret)) return ret;
|
|
24618
|
-
if (isWhiteAttr) {
|
|
24619
|
-
// call `safeAttrValue()`
|
|
24620
|
-
value = safeAttrValue(tag, name, value, cssFilter);
|
|
24621
|
-
if (value) {
|
|
24622
|
-
return name + '="' + value + '"';
|
|
24623
|
-
} else {
|
|
24624
|
-
return name;
|
|
24625
|
-
}
|
|
24626
|
-
} else {
|
|
24627
|
-
// call `onIgnoreTagAttr()`
|
|
24628
|
-
ret = onIgnoreTagAttr(tag, name, value, isWhiteAttr);
|
|
24629
|
-
if (!isNull$1(ret)) return ret;
|
|
24630
|
-
return;
|
|
24631
|
-
}
|
|
24632
|
-
});
|
|
24633
|
-
|
|
24634
|
-
// build new tag html
|
|
24635
|
-
html = "<" + tag;
|
|
24636
|
-
if (attrsHtml) html += " " + attrsHtml;
|
|
24637
|
-
if (attrs.closing) html += " /";
|
|
24638
|
-
html += ">";
|
|
24639
|
-
return html;
|
|
24640
|
-
} else {
|
|
24641
|
-
// call `onIgnoreTag()`
|
|
24642
|
-
ret = onIgnoreTag(tag, html, info);
|
|
24643
|
-
if (!isNull$1(ret)) return ret;
|
|
24644
|
-
return escapeHtml(html);
|
|
24645
|
-
}
|
|
24646
|
-
}, escapeHtml);
|
|
24647
|
-
|
|
24648
|
-
// if enable stripIgnoreTagBody
|
|
24649
|
-
if (stripIgnoreTagBody) {
|
|
24650
|
-
retHtml = stripIgnoreTagBody.remove(retHtml);
|
|
24651
|
-
}
|
|
24652
|
-
return retHtml;
|
|
24653
|
-
};
|
|
24654
|
-
var xss = FilterXSS;
|
|
24655
|
-
|
|
24656
|
-
var lib$2 = createCommonjsModule(function (module, exports) {
|
|
24657
|
-
/**
|
|
24658
|
-
* xss
|
|
24659
|
-
*
|
|
24660
|
-
* @author Zongmin Lei<leizongmin@gmail.com>
|
|
24661
|
-
*/
|
|
24662
|
-
|
|
24663
|
-
/**
|
|
24664
|
-
* filter xss function
|
|
24665
|
-
*
|
|
24666
|
-
* @param {String} html
|
|
24667
|
-
* @param {Object} options { whiteList, onTag, onTagAttr, onIgnoreTag, onIgnoreTagAttr, safeAttrValue, escapeHtml }
|
|
24668
|
-
* @return {String}
|
|
24669
|
-
*/
|
|
24670
|
-
function filterXSS(html, options) {
|
|
24671
|
-
var xss$1 = new xss(options);
|
|
24672
|
-
return xss$1.process(html);
|
|
24673
|
-
}
|
|
24674
|
-
exports = module.exports = filterXSS;
|
|
24675
|
-
exports.filterXSS = filterXSS;
|
|
24676
|
-
exports.FilterXSS = xss;
|
|
24677
|
-
(function () {
|
|
24678
|
-
for (var i in _default$1) {
|
|
24679
|
-
exports[i] = _default$1[i];
|
|
24680
|
-
}
|
|
24681
|
-
for (var j in parser$1) {
|
|
24682
|
-
exports[j] = parser$1[j];
|
|
24683
|
-
}
|
|
24684
|
-
})();
|
|
24685
|
-
|
|
24686
|
-
// using `xss` on the browser, output `filterXSS` to the globals
|
|
24687
|
-
if (typeof window !== "undefined") {
|
|
24688
|
-
window.filterXSS = module.exports;
|
|
24689
|
-
}
|
|
24690
|
-
|
|
24691
|
-
// using `xss` on the WebWorker, output `filterXSS` to the globals
|
|
24692
|
-
function isWorkerEnv() {
|
|
24693
|
-
return typeof self !== "undefined" && typeof DedicatedWorkerGlobalScope !== "undefined" && self instanceof DedicatedWorkerGlobalScope;
|
|
24694
|
-
}
|
|
24695
|
-
if (isWorkerEnv()) {
|
|
24696
|
-
self.filterXSS = module.exports;
|
|
24697
|
-
}
|
|
24698
|
-
});
|
|
24699
|
-
var lib_1$2 = lib$2.filterXSS;
|
|
24700
|
-
var lib_2$1 = lib$2.FilterXSS;
|
|
24701
|
-
|
|
24702
|
-
var _templateObject$8;
|
|
24703
|
-
var InputGroup = styled('div')(_templateObject$8 || (_templateObject$8 = _taggedTemplateLiteralLoose(["\n \tdisplay: flex;\n\talign-items: stretch;\n\twidth: 100%;\n\tbox-shadow: rgb(0 0 0 / 20%) 0px 0px 6px;\n\tborder-radius: 6px;\n\n\t", "\n\t", "\n\t};\n"])), function (_ref) {
|
|
24704
|
-
var theme = _ref.theme,
|
|
24705
|
-
searchBox = _ref.searchBox;
|
|
24706
|
-
return searchBox && "background-color: " + (theme.colors.backgroundColor || '#fafafa') + ";\n\t\tcolor: " + (theme.colors.textColor || '#fff') + ";\n\n\t\t&:focus-within {\n\t\t\tbackground-color: " + (theme.colors.backgroundColor || '#fff') + ";\n\t\t}";
|
|
24707
|
-
}, function (props) {
|
|
24708
|
-
return props.isOpen && 'box-shadow: rgb(0 0 0 / 20%) 0px 0px 15px;';
|
|
24709
|
-
});
|
|
24710
|
-
InputGroup.defaultProps = {
|
|
24711
|
-
className: 'input-group'
|
|
24712
|
-
};
|
|
24713
|
-
|
|
24714
|
-
var _templateObject$9;
|
|
24715
|
-
var InputWrapper = styled('span')(_templateObject$9 || (_templateObject$9 = _taggedTemplateLiteralLoose(["\n\tflex: 1;\n\tposition: relative;\n\theight: 42px;\n"])));
|
|
24716
|
-
|
|
24717
|
-
var _templateObject$a;
|
|
24718
|
-
var InputAddon = styled('span')(_templateObject$a || (_templateObject$a = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: #fafafa;\n border: 1px solid #ccc;\n border-radius: 2px;\n color: rgba(0, 0, 0, 0.85);\n font-size: 14px;\n font-weight: 400;\n padding: 0 11px;\n position: relative;\n transition: all 0.3s;\n box-sizing: border-box;\n overflow: hidden;\n\n &:first-of-type {\n border-right: none;\n }\n &:last-of-type {\n border-left: none;\n }\n"])));
|
|
24719
|
-
InputAddon.defaultProps = {
|
|
24720
|
-
className: 'input-addon'
|
|
24721
|
-
};
|
|
24722
|
-
|
|
24723
|
-
var _templateObject$b, _templateObject2$4, _templateObject3$3, _templateObject4$1, _templateObject5$1, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10;
|
|
24724
|
-
var alertBorder = function alertBorder(_ref) {
|
|
24725
|
-
var theme = _ref.theme;
|
|
24726
|
-
return "\n\tborder: 1px solid " + theme.colors.alertColor + ";\n";
|
|
24727
|
-
};
|
|
24728
|
-
var input = function input(searchBox) {
|
|
24729
|
-
return "\nwidth: 100%;\nline-height: 1.5;\nmin-height: 42px;\npadding: 8px 12px;\nborder: 1px solid #ccc;\nbackground-color: #fafafa;\nfont-size: 0.9rem;\noutline: none;\n&:focus {\n\tbackground-color: #fff;\n}\n" + (searchBox && "\n\tpadding: 8px 12px 9px;\n\tborder: 1px solid transparent;\n\tborder-radius: 6px;\n") + ";\n";
|
|
24730
|
-
};
|
|
24731
|
-
var dark$1 = function dark(theme) {
|
|
24732
|
-
return "\n\tborder-color: " + theme.colors.borderColor + ";\n";
|
|
24733
|
-
};
|
|
24734
|
-
var darkInput = function darkInput(_ref2) {
|
|
24735
|
-
var theme = _ref2.theme;
|
|
24736
|
-
return "\n\tbackground-color: " + theme.colors.backgroundColor + ";\n\tcolor: " + theme.colors.textColor + ";\n\t" + dark$1(theme) + ";\n\n\t&:focus {\n\t\tbackground-color: " + theme.colors.backgroundColor + ";\n\t}\n";
|
|
24737
|
-
};
|
|
24738
|
-
var Input = styled('input')(_templateObject$b || (_templateObject$b = _taggedTemplateLiteralLoose(["\n\t", ";\n\t", ";\n\n\t", ";\n\n\t", ";\n\n\t", ";\n\t", ";\n\t", ";\n\t", ";\n\t", ";\n\t", ";\n\n\t", ";\n\n\t", ";\n\n\t&[type='search']::-webkit-search-decoration,\n\t&[type='search']::-webkit-search-cancel-button,\n\t&[type='search']::-webkit-search-results-button,\n\t&[type='search']::-webkit-search-results-decoration {\n\t\tdisplay: none;\n\t}\n"])), function (props) {
|
|
24739
|
-
return input(props.searchBox);
|
|
24740
|
-
}, function (_ref3) {
|
|
24741
|
-
var themePreset = _ref3.themePreset;
|
|
24742
|
-
return themePreset === 'dark' && darkInput;
|
|
24743
|
-
}, function (props) {
|
|
24744
|
-
return props.showIcon && props.iconPosition === 'left' && "\n\t\t\tpadding-left: 36px;\n\t\t";
|
|
24745
|
-
}, function (props) {
|
|
24746
|
-
return props.showIcon && props.iconPosition === 'right' && "\n\t\t\tpadding-right: 36px;\n\t\t";
|
|
24747
|
-
}, function (props) {
|
|
24748
|
-
return (
|
|
24749
|
-
// for clear icon
|
|
24750
|
-
props.showClear && "\n\t\t\tpadding-right: 36px;\n\t\t"
|
|
24751
|
-
);
|
|
24752
|
-
}, function (props) {
|
|
24753
|
-
return (
|
|
24754
|
-
// for voice search icon
|
|
24755
|
-
props.showVoiceSearch && "\n\t\t\tpadding-right: 36px;\n\t\t"
|
|
24756
|
-
);
|
|
24757
|
-
}, function (props) {
|
|
24758
|
-
return (
|
|
24759
|
-
// for clear icon with search icon
|
|
24760
|
-
props.showClear && props.showIcon && props.iconPosition === 'right' && "\n\t\t\tpadding-right: 66px;\n\t\t"
|
|
24761
|
-
);
|
|
24762
|
-
}, function (props) {
|
|
24763
|
-
return (
|
|
24764
|
-
// for voice search icon with clear icon
|
|
24765
|
-
props.showVoiceSearch && props.showIcon && "\n\t\t\tpadding-right: 66px;\n\t\t"
|
|
24766
|
-
);
|
|
24767
|
-
}, function (props) {
|
|
24768
|
-
return (
|
|
24769
|
-
// for voice search icon with search icon
|
|
24770
|
-
props.showVoiceSearch && props.showIcon && props.iconPosition === 'right' && "\n\t\t\tpadding-right: 66px;\n\t\t"
|
|
24771
|
-
);
|
|
24772
|
-
}, function (props) {
|
|
24773
|
-
return (
|
|
24774
|
-
// for clear icon with search icon and voice search
|
|
24775
|
-
props.showClear && props.showIcon && props.showVoiceSearch && props.iconPosition === 'right' && "\n\t\t\tpadding-right: 90px;\n\t\t"
|
|
24776
|
-
);
|
|
24777
|
-
}, function (props) {
|
|
24778
|
-
return props.alert && alertBorder;
|
|
24779
|
-
}, function (props) {
|
|
24780
|
-
return props.isOpen && "\n\t\t\tborder-bottom-left-radius: 0;\n\t\t\tborder-bottom-right-radius: 0;\n\t\t";
|
|
24781
|
-
});
|
|
24782
|
-
var suggestions$1 = function suggestions(themePreset, theme) {
|
|
24783
|
-
return css(_templateObject2$4 || (_templateObject2$4 = _taggedTemplateLiteralLoose(["\n\tdisplay: block;\n\twidth: 100%;\n\tborder: 1px solid #ccc;\n\tborder-top: none;\n\tbackground-color: #fff;\n\tfont-size: 0.9rem;\n\tz-index: 3;\n\tposition: absolute;\n\tmargin: 0;\n\tpadding: 0;\n\tlist-style: none;\n\tmax-height: min(100vh, 402px);\n\toverflow-y: auto;\n\n\t&.small {\n\t\ttop: 30px;\n\t}\n\n\tli {\n\t\tdisplay: flex;\n\t\tjustify-content: space-between;\n\t\tcursor: pointer;\n\t\tpadding: 10px;\n\t\tuser-select: none;\n\n\t\t& > .trim {\n\t\t\tdisplay: -webkit-box;\n\t\t\tdisplay: flex;\n\t\t\twidth: 100%;\n\t\t\tmax-height: 2.3rem;\n\t\t\tline-height: 1.2rem;\n\t\t\t-webkit-line-clamp: 2;\n\t\t\t-webkit-box-orient: vertical;\n\t\t\toverflow: hidden;\n\t\t\ttext-overflow: ellipsis;\n\t\t\twhite-space: nowrap;\n\t\t}\n\n\t\t&:hover,\n\t\t&:focus {\n\t\t\tbackground-color: #eee;\n\t\t}\n\t}\n\n\t", ";\n"])), themePreset === 'dark' && theme && dark$1(theme));
|
|
24784
|
-
};
|
|
24785
|
-
var searchboxSuggestions = function searchboxSuggestions(themePreset, theme) {
|
|
24786
|
-
return css(_templateObject3$3 || (_templateObject3$3 = _taggedTemplateLiteralLoose(["\n\t", ";\n\n\tmax-height: min(100vh, 401px);\n\tborder: none;\n\tborder-radius: 6px;\n\tborder-top-left-radius: 0;\n\tborder-top-right-radius: 0;\n\tbox-shadow: rgb(0 0 0 / 20%) 0px 10px 15px;\n\tborder-top: 1px solid #f2f0f0;\n\tli {\n\t\ttransition: all 0.3s ease-in;\n\t\tposition: relative;\n\t\t&:hover,\n\t\t&:focus {\n\t\t\tbackground-color: unset;\n\t\t}\n\t\t.trim {\n\t\t\tline-height: 20px;\n\t\t}\n\t\t&.li-item {\n\t\t\tbackground-color: ", ";\n\n\t\t\t", "\n\t\t}\n\t\t&.active-li-item {\n\t\t\tbackground-color: ", ";\n\t\t\tcolor: #fff;\n\t\t\tsvg {\n\t\t\t\ttransition: fill 0.3s ease-in;\n\t\t\t\tfill: #fff !important;\n\t\t\t}\n\t\t}\n\t}\n\n\t.section-container {\n\t\tpadding-bottom: 5px;\n\t\tborder-bottom: 1px solid #f2f0f0;\n\t\t", ";\n\t\t.section-header {\n\t\t\tpadding: 10px;\n\t\t\tfont-size: 12px;\n\t\t\tcolor: #7f7c7c;\n\t\t\tbackground: #f9f9f9;\n\t\t\t", ";\n\t\t}\n\n\t\t.section-list {\n\t\t\tpadding-left: 0;\n\t\t}\n\t\t.section-list-item {\n\t\t\t&__label,\n\t\t\t&__description {\n\t\t\t\toverflow: hidden;\n\t\t\t\ttext-overflow: ellipsis;\n\t\t\t\twhite-space: nowrap;\n\n\t\t\t\t* {\n\t\t\t\t\tmargin: 0;\n\t\t\t\t\tpadding: 0;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t&__label {\n\t\t\t}\n\t\t\t&__description {\n\t\t\t\tmargin-top: 5px;\n\t\t\t\topacity: 0.7;\n\t\t\t\tfont-size: 12px;\n\t\t\t}\n\t\t}\n\t}\n"])), suggestions$1(themePreset, theme), themePreset === 'dark' ? '#424242' : '#fff', themePreset && theme && "svg {\n\t\t\t\tfill: " + (theme.colors ? theme.colors.primaryColor : '#707070') + ";\n\t\t\t}", themePreset === 'dark' ? '#555' : '#2d84f6', themePreset === 'dark' && css(_templateObject4$1 || (_templateObject4$1 = _taggedTemplateLiteralLoose(["\n\t\t\tbackground: #161616;\n\t\t"]))), themePreset === 'dark' && css(_templateObject5$1 || (_templateObject5$1 = _taggedTemplateLiteralLoose(["\n\t\t\t\tcolor: #218fe7;\n\t\t\t\tbackground: #161616;\n\t\t\t"]))));
|
|
24787
|
-
};
|
|
24788
|
-
var suggestionsContainer = css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteralLoose(["\n\tposition: relative;\n\t.cancel-icon {\n\t\tcursor: pointer;\n\t}\n"])));
|
|
24789
|
-
var noSuggestions = function noSuggestions(themePreset, theme) {
|
|
24790
|
-
return css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteralLoose(["\n\tdisplay: block;\n\twidth: 100%;\n\tborder: 1px solid #ccc;\n\tborder-top: none;\n\tbackground-color: #fff;\n\tfont-size: 0.9rem;\n\tz-index: 3;\n\tposition: absolute;\n\tmargin: 0;\n\tpadding: 0;\n\tlist-style: none;\n\tmax-height: 260px;\n\toverflow-y: auto;\n\n\t&.small {\n\t\ttop: 30px;\n\t}\n\n\tli {\n\t\tdisplay: flex;\n\t\tjustify-content: space-between;\n\t\tpadding: 10px;\n\t\tuser-select: none;\n\n\t\t& > .trim {\n\t\t\tdisplay: -webkit-box;\n\t\t\tdisplay: block;\n\t\t\twidth: 100%;\n\t\t\tmax-height: 2.3rem;\n\t\t\tline-height: 1.2rem;\n\t\t\t-webkit-line-clamp: 2;\n\t\t\t-webkit-box-orient: vertical;\n\t\t\toverflow: hidden;\n\t\t\ttext-overflow: ellipsis;\n\t\t\twhite-space: nowrap;\n\t\t}\n\t}\n\n\t", "\n"])), themePreset === 'dark' && theme && dark$1(theme));
|
|
24791
|
-
};
|
|
24792
|
-
var TextArea = styled('textarea')(_templateObject8 || (_templateObject8 = _taggedTemplateLiteralLoose(["\n\t", ";\n\t", ";\n\n\t", ";\n\n\t", ";\n\n\t", ";\n\t", ";\n\t", ";\n\t", ";\n\n\t", ";\n\t", ";\n\t", ";\n\t", ";\n\t", ";\n\n\t", ";\n\t", ";\n\t", ";\n\t", ";\n\t", ";\n\t&::-webkit-search-decoration,\n\t&::-webkit-search-cancel-button,\n\t&::-webkit-search-results-button,\n\t&::-webkit-search-results-decoration {\n\t\tdisplay: none;\n\t}\n\tresize: none;\n\toverflow: hidden;\n\theight: 42px;\n\t", "\n"])), input, function (_ref4) {
|
|
24793
|
-
var themePreset = _ref4.themePreset,
|
|
24794
|
-
theme = _ref4.theme;
|
|
24795
|
-
return themePreset === 'dark' && darkInput({
|
|
24796
|
-
theme: theme
|
|
24797
|
-
});
|
|
24798
|
-
}, function (props) {
|
|
24799
|
-
return props.showIcon && props.iconPosition === 'left' && "\n\t\t\tpadding-left: 36px;\n\t\t";
|
|
24800
|
-
}, function (props) {
|
|
24801
|
-
return props.showIcon && props.iconPosition === 'right' && "\n\t\t\tpadding-right: 36px;\n\t\t";
|
|
24802
|
-
}, function (props) {
|
|
24803
|
-
return (
|
|
24804
|
-
// for clear icon
|
|
24805
|
-
props.showClear && "\n\t\t\tpadding-right: 36px;\n\t\t"
|
|
24806
|
-
);
|
|
24807
|
-
}, function (props) {
|
|
24808
|
-
return (
|
|
24809
|
-
// for voice search icon
|
|
24810
|
-
props.showVoiceSearch && "\n\t\t\tpadding-right: 36px;\n\t\t"
|
|
24811
|
-
);
|
|
24812
|
-
}, function (props) {
|
|
24813
|
-
return props.showFocusShortcutsIcon && "\n\t\t\tpadding-right: 20px;\n\t\t";
|
|
24814
|
-
}, function (props) {
|
|
24815
|
-
return props.showIcon && props.showFocusShortcutsIcon && props.iconPosition === 'right' && "\n\t\t\tpadding-right: 66px;\n\t\t";
|
|
24816
|
-
}, function (props) {
|
|
24817
|
-
return (
|
|
24818
|
-
// for voice search icon with focusshortcut icon
|
|
24819
|
-
props.showVoiceSearch && props.showFocusShortcutsIcon && "\n\t\t\tpadding-right: 50px;\n\t\t"
|
|
24820
|
-
);
|
|
24821
|
-
}, function (props) {
|
|
24822
|
-
return (
|
|
24823
|
-
// for clear icon with search icon
|
|
24824
|
-
props.showClear && props.showIcon && props.iconPosition === 'right' && "\n\t\t\tpadding-right: 66px;\n\t\t"
|
|
24825
|
-
);
|
|
24826
|
-
}, function (props) {
|
|
24827
|
-
return (
|
|
24828
|
-
// for voice search icon with clear icon
|
|
24829
|
-
props.showVoiceSearch && props.showIcon && "\n\t\t\tpadding-right: 66px;\n\t\t"
|
|
24830
|
-
);
|
|
24831
|
-
}, function (props) {
|
|
24832
|
-
return (
|
|
24833
|
-
// for voice search icon with search icon
|
|
24834
|
-
props.showVoiceSearch && props.showIcon && props.iconPosition === 'right' && "\n\t\t\tpadding-right: 66px;\n\t\t"
|
|
24835
|
-
);
|
|
24836
|
-
}, function (props) {
|
|
24837
|
-
return (
|
|
24838
|
-
// for voice search icon with focusshortcut icon and clear icon
|
|
24839
|
-
props.showVoiceSearch && props.showFocusShortcutsIcon && props.showClear && "\n\t\t\tpadding-right: 80px;\n\t\t"
|
|
24840
|
-
);
|
|
24841
|
-
}, function (props) {
|
|
24842
|
-
return (
|
|
24843
|
-
// for search icon with focusshortcut icon
|
|
24844
|
-
props.showIcon && props.showFocusShortcutsIcon && props.iconPosition === 'right' && "\n\t\t\tpadding-right: 66px;\n\t\t"
|
|
24845
|
-
);
|
|
24846
|
-
}, function (props) {
|
|
24847
|
-
return (
|
|
24848
|
-
// for clear icon with search icon and voice search
|
|
24849
|
-
props.showClear && props.showIcon && props.showVoiceSearch && props.iconPosition === 'right' && "\n\t\t\tpadding-right: 90px;\n\t\t"
|
|
24850
|
-
);
|
|
24851
|
-
}, function (props) {
|
|
24852
|
-
return (
|
|
24853
|
-
// for clear icon with search icon, focusshortcut icon and voice search
|
|
24854
|
-
props.showClear && props.showIcon && props.showVoiceSearch && props.iconPosition === 'right' && props.showFocusShortcutsIcon && "\n\t\t\tpadding-right: 106px;\n\t\t"
|
|
24855
|
-
);
|
|
24856
|
-
}, function (props) {
|
|
24857
|
-
return props.alert && alertBorder;
|
|
24858
|
-
}, function (props) {
|
|
24859
|
-
return props.isOpen && css(_templateObject9 || (_templateObject9 = _taggedTemplateLiteralLoose(["\n\t\t\tborder-bottom-left-radius: 0;\n\t\t\tborder-bottom-right-radius: 0;\n\t\t"])));
|
|
24860
|
-
}, function (_ref5) {
|
|
24861
|
-
var searchBox = _ref5.searchBox;
|
|
24862
|
-
return searchBox && "\n\t\tbackground: none;\n\t\tpadding:0px;\n\t\tpadding-top: 12px;\n\t\tborder: none;\n\t\tline-height: inherit;\n\t\twhite-space: nowrap;\n\t\t&:focus {\n\t\t\tbackground: none;\n\t\t}\n\t";
|
|
24863
|
-
});
|
|
24864
|
-
var Actions = styled('div')(_templateObject10 || (_templateObject10 = _taggedTemplateLiteralLoose(["\n\tdisplay: flex;\n"])));
|
|
24865
|
-
|
|
24866
|
-
var _templateObject$c;
|
|
24867
|
-
var IconGroup = styled('div')(_templateObject$c || (_templateObject$c = _taggedTemplateLiteralLoose(["\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\tgrid-gap: 6px;\n\tmargin: 0 10px;\n\theight: 100%;\n\n\t", ";\n\n\t", ";\n\n\t", ";\n"])), function (_ref) {
|
|
24868
|
-
var positionType = _ref.positionType;
|
|
24869
|
-
if (positionType === 'absolute') {
|
|
24870
|
-
return "\n\t\t\t\tposition: absolute;\n\t\t\t\ttop: 50%;\n\t\t\t\ttransform: translateY(-50%);\n\t\t\t";
|
|
24871
|
-
}
|
|
24872
|
-
return null;
|
|
24873
|
-
}, function (_ref2) {
|
|
24874
|
-
var groupPosition = _ref2.groupPosition;
|
|
24875
|
-
return groupPosition === 'right' ? "\n\t\t\t\t\tright: 0;\n\t\t\t " : "\n\t\t\t\t\tleft: 0;\n\t\t\t ";
|
|
24876
|
-
}, function (_ref3) {
|
|
24877
|
-
var enableAI = _ref3.enableAI;
|
|
24878
|
-
return enableAI ? "\n\t\ttop: 0%;\n\t transform: translateY(0);\n \theight: 42px;\n\t" : '';
|
|
24879
|
-
});
|
|
24880
|
-
|
|
24881
|
-
var _templateObject$d, _templateObject2$5;
|
|
24882
|
-
var IconWrapper = styled('div')(_templateObject$d || (_templateObject$d = _taggedTemplateLiteralLoose(["\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\tmax-width: 23px;\n\twidth: max-content;\n\tcursor: pointer;\n\theight: 100%;\n\tmin-width: 20px;\n\n\tsvg.search-icon {\n\t\tfill: ", ";\n\t\ttransform: scale(1.5);\n\t}\n\n\tsvg.cancel-icon {\n\t\tfill: ", ";\n\t}\n"])), function (_ref) {
|
|
24883
|
-
var _ref$theme = _ref.theme,
|
|
24884
|
-
theme = _ref$theme === void 0 ? {} : _ref$theme;
|
|
24885
|
-
return theme.colors ? theme.colors.primaryColor : 'unset';
|
|
24886
|
-
}, function (_ref2) {
|
|
24887
|
-
var _ref2$theme = _ref2.theme,
|
|
24888
|
-
theme = _ref2$theme === void 0 ? {} : _ref2$theme;
|
|
24889
|
-
return theme.colors ? theme.colors.borderColor : '#000';
|
|
24890
|
-
});
|
|
24891
|
-
var ButtonIconWrapper = styled(IconWrapper)(_templateObject2$5 || (_templateObject2$5 = _taggedTemplateLiteralLoose(["\n\tborder-radius: 4px;\n\tvertical-align: middle;\n\theight: 25px;\n\tfont-size: 12px;\n\tborder: 1px solid ", ";\n\tcolor: ", ";\n\tmax-width: unset;\n\tpadding: 5px;\n"])), function (_ref3) {
|
|
24892
|
-
var theme = _ref3.theme;
|
|
24893
|
-
return theme.colors ? theme.colors.primaryColor : '#000';
|
|
24894
|
-
}, function (_ref4) {
|
|
24895
|
-
var theme = _ref4.theme;
|
|
24896
|
-
return theme.colors ? theme.colors.primaryColor : '#000';
|
|
24897
|
-
});
|
|
24898
|
-
|
|
24899
|
-
function t$1(t){return "object"==typeof t&&null!=t&&1===t.nodeType}function e$1(t,e){return (!e||"hidden"!==t)&&"visible"!==t&&"clip"!==t}function n$2(t,n){if(t.clientHeight<t.scrollHeight||t.clientWidth<t.scrollWidth){var r=getComputedStyle(t,null);return e$1(r.overflowY,n)||e$1(r.overflowX,n)||function(t){var e=function(t){if(!t.ownerDocument||!t.ownerDocument.defaultView)return null;try{return t.ownerDocument.defaultView.frameElement}catch(t){return null}}(t);return !!e&&(e.clientHeight<t.scrollHeight||e.clientWidth<t.scrollWidth)}(t)}return !1}function r$2(t,e,n,r,i,o,l,d){return o<t&&l>e||o>t&&l<e?0:o<=t&&d<=n||l>=e&&d>=n?o-t-r:l>e&&d<n||o<t&&d>n?l-e+i:0}var i$3=function(e,i){var o=window,l=i.scrollMode,d=i.block,f=i.inline,h=i.boundary,u=i.skipOverflowHiddenElements,s="function"==typeof h?h:function(t){return t!==h};if(!t$1(e))throw new TypeError("Invalid target");for(var a,c,g=document.scrollingElement||document.documentElement,p=[],m=e;t$1(m)&&s(m);){if((m=null==(c=(a=m).parentElement)?a.getRootNode().host||null:c)===g){p.push(m);break}null!=m&&m===document.body&&n$2(m)&&!n$2(document.documentElement)||null!=m&&n$2(m,u)&&p.push(m);}for(var w=o.visualViewport?o.visualViewport.width:innerWidth,v=o.visualViewport?o.visualViewport.height:innerHeight,W=window.scrollX||pageXOffset,H=window.scrollY||pageYOffset,b=e.getBoundingClientRect(),y=b.height,E=b.width,M=b.top,V=b.right,x=b.bottom,I=b.left,C="start"===d||"nearest"===d?M:"end"===d?x:M+y/2,R="center"===f?I+E/2:"end"===f?V:I,T=[],k=0;k<p.length;k++){var B=p[k],D=B.getBoundingClientRect(),O=D.height,X=D.width,Y=D.top,L=D.right,S=D.bottom,j=D.left;if("if-needed"===l&&M>=0&&I>=0&&x<=v&&V<=w&&M>=Y&&x<=S&&I>=j&&V<=L)return T;var N=getComputedStyle(B),q=parseInt(N.borderLeftWidth,10),z=parseInt(N.borderTopWidth,10),A=parseInt(N.borderRightWidth,10),F=parseInt(N.borderBottomWidth,10),G=0,J=0,K="offsetWidth"in B?B.offsetWidth-B.clientWidth-q-A:0,P="offsetHeight"in B?B.offsetHeight-B.clientHeight-z-F:0,Q="offsetWidth"in B?0===B.offsetWidth?0:X/B.offsetWidth:0,U="offsetHeight"in B?0===B.offsetHeight?0:O/B.offsetHeight:0;if(g===B)G="start"===d?C:"end"===d?C-v:"nearest"===d?r$2(H,H+v,v,z,F,H+C,H+C+y,y):C-v/2,J="start"===f?R:"center"===f?R-w/2:"end"===f?R-w:r$2(W,W+w,w,q,A,W+R,W+R+E,E),G=Math.max(0,G+H),J=Math.max(0,J+W);else {G="start"===d?C-Y-z:"end"===d?C-S+F+P:"nearest"===d?r$2(Y,S,O,z,F+P,C,C+y,y):C-(Y+O/2)+P/2,J="start"===f?R-j-q:"center"===f?R-(j+X/2)+K/2:"end"===f?R-L+A+K:r$2(j,L,X,q,A+K,R,R+E,E);var Z=B.scrollLeft,$=B.scrollTop;C+=$-(G=Math.max(0,Math.min($+G/U,B.scrollHeight-O/U+P))),R+=Z-(J=Math.max(0,Math.min(Z+J/Q,B.scrollWidth-X/Q+K)));}T.push({el:B,top:G,left:J});}return T};
|
|
24900
|
-
|
|
24901
|
-
/**
|
|
24902
|
-
* Scroll node into view if necessary
|
|
24903
|
-
* @param {HTMLElement} node the element that should scroll into view
|
|
24904
|
-
* @param {HTMLElement} rootNode the root element of the component
|
|
24905
|
-
*/
|
|
24906
|
-
// eslint-disable-next-line
|
|
24907
|
-
var scrollIntoView = function scrollIntoView(node, rootNode) {
|
|
24908
|
-
if (node === null) {
|
|
24909
|
-
return;
|
|
24910
|
-
}
|
|
24911
|
-
var actions = i$3(node, {
|
|
24912
|
-
boundary: rootNode,
|
|
24913
|
-
block: 'nearest',
|
|
24914
|
-
scrollMode: 'if-needed'
|
|
23328
|
+
var actions = i$3(node, {
|
|
23329
|
+
boundary: rootNode,
|
|
23330
|
+
block: 'nearest',
|
|
23331
|
+
scrollMode: 'if-needed'
|
|
24915
23332
|
});
|
|
24916
23333
|
actions.forEach(function (_ref) {
|
|
24917
23334
|
var el = _ref.el,
|
|
@@ -26377,16 +24794,13 @@
|
|
|
26377
24794
|
}
|
|
26378
24795
|
};
|
|
26379
24796
|
|
|
26380
|
-
var _templateObject$h, _templateObject2$
|
|
24797
|
+
var _templateObject$h, _templateObject2$5;
|
|
26381
24798
|
var TagsContainer = styled('div')(_templateObject$h || (_templateObject$h = _taggedTemplateLiteralLoose(["\n\tdisplay: flex;\n\tflex-wrap: wrap;\n\tmargin-top: 10px;\n\twidth: 100%;\n"])));
|
|
26382
|
-
var TagItem = styled('span')(_templateObject2$
|
|
26383
|
-
|
|
26384
|
-
var _templateObject$i;
|
|
26385
|
-
var AutosuggestFooterContainer = styled('div')(_templateObject$i || (_templateObject$i = _taggedTemplateLiteralLoose(["\n\tdisplay: flex;\n\tjustify-content: space-between;\n\talign-items: center;\n\tcolor: #8792a2;\n\tbackground: #f7fafc;\n\tpadding: 10px;\n\theight: 40px;\n"])));
|
|
24799
|
+
var TagItem = styled('span')(_templateObject2$5 || (_templateObject2$5 = _taggedTemplateLiteralLoose(["\n\tcursor: default;\n\tbox-sizing: border-box;\n\tmargin: 0 4px 4px 0;\n\tcolor: #000000d9;\n\tfont-size: 14px;\n\tfont-variant: tabular-nums;\n\tline-height: 1.5715;\n\tlist-style: none;\n\tfont-feature-settings: 'tnum';\n\tdisplay: inline-block;\n\theight: auto;\n\tpadding: 0 2px 0 7px;\n\tfont-size: 12px;\n\tline-height: 22px;\n\twhite-space: nowrap;\n\tbackground: #fafafa;\n\tborder: 1px solid #d9d9d9;\n\tborder-radius: 2px;\n\topacity: 1;\n\ttransition: all 0.3s;\n\n\tspan.close-icon {\n\t\tsvg {\n\t\t\tcursor: pointer;\n\t\t\theight: 15px;\n\t\t\tposition: relative;\n\t\t\ttop: 4px;\n\t\t\tfill: #262626;\n\t\t}\n\t}\n"])));
|
|
26386
24800
|
|
|
26387
|
-
var _templateObject$
|
|
26388
|
-
var skeletonAnimation = keyframes(_templateObject$
|
|
26389
|
-
var SkeletonLoader = styled('div')(_templateObject2$
|
|
24801
|
+
var _templateObject$i, _templateObject2$6, _templateObject3$4;
|
|
24802
|
+
var skeletonAnimation = keyframes(_templateObject$i || (_templateObject$i = _taggedTemplateLiteralLoose(["\n 0% {\n background-position: 100% 0;\n }\n 100% {\n background-position: -200% 0;\n }\n"])));
|
|
24803
|
+
var SkeletonLoader = styled('div')(_templateObject2$6 || (_templateObject2$6 = _taggedTemplateLiteralLoose(["\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 10px;\n"])));
|
|
26390
24804
|
var SkeletonLine = styled('div')(_templateObject3$4 || (_templateObject3$4 = _taggedTemplateLiteralLoose(["\n\twidth: 100%;\n\theight: 20px;\n\tbackground: linear-gradient(\n\t\t90deg,\n\t\trgba(220, 220, 220, 0.5) 25%,\n\t\trgba(240, 240, 240, 0.9) 50%,\n\t\trgba(220, 220, 220, 0.5) 75%\n\t);\n\tbackground-size: 200% 100%;\n\tanimation: ", " 1.5s infinite;\n"])), skeletonAnimation);
|
|
26391
24805
|
var HorizontalSkeletonLoader = vue.defineComponent({
|
|
26392
24806
|
name: 'HorizontalSkeletonLoader',
|
|
@@ -26399,11 +24813,11 @@
|
|
|
26399
24813
|
}
|
|
26400
24814
|
});
|
|
26401
24815
|
|
|
26402
|
-
var _templateObject$
|
|
26403
|
-
var Chatbox = styled('div')(_templateObject$
|
|
24816
|
+
var _templateObject$j, _templateObject2$7, _templateObject3$5, _templateObject4$2, _templateObject5$2, _templateObject6$1, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11;
|
|
24817
|
+
var Chatbox = styled('div')(_templateObject$j || (_templateObject$j = _taggedTemplateLiteralLoose(["\n\tposition: relative;\n\tmargin: 0 auto;\n\tpadding: 10px;\n\tbackground-color: #fafafa;\n\twidth: 100%;\n\tbox-shadow: rgb(0 0 0 / 20%) 0px 0px 6px;\n\tborder-radius: 6px;\n\tmargin-bottom: 20px;\n\tbackground-color: ", ";\n"])), function (props) {
|
|
26404
24818
|
return props.theme && props.theme.colors ? props.theme.colors.backgroundColor : '#fff';
|
|
26405
24819
|
});
|
|
26406
|
-
var ChatContainer = styled('div')(_templateObject2$
|
|
24820
|
+
var ChatContainer = styled('div')(_templateObject2$7 || (_templateObject2$7 = _taggedTemplateLiteralLoose(["\n\tdisplay: flex;\n\tflex-direction: column;\n\theight: 100%;\n\tposition: relative;\n\t.--ai-answer-error-container {\n\t\ttext-align: center;\n\t\tposition: absolute;\n\t\tbottom: 0px;\n\t\t", ";\n\t\tz-index: 1;\n\t\tleft: 50%;\n\t\ttransform: translateX(-50%);\n\t\twidth: 100%;\n\n\t\t.--default-error-element {\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t\talign-items: center;\n\t\t\tpadding: 10px;\n\t\t\tbackground-color: ", ";\n\t\t\tbox-shadow: 0 -5px 5px -2px\n\t\t\t\t", ";\n\n\t\t\tspan {\n\t\t\t\tmargin-bottom: 5px;\n\t\t\t}\n\n\t\t\tbutton {\n\t\t\t}\n\t\t}\n\t}\n\n\t", ";\n"])), function (props) {
|
|
26407
24821
|
return props.showInput ? 'bottom: 48px;' : '';
|
|
26408
24822
|
}, function (props) {
|
|
26409
24823
|
return props.theme && props.theme.colors && props.theme.colors.backgroundColor ? props.theme.colors.backgroundColor : '#fff';
|
|
@@ -26440,7 +24854,7 @@
|
|
|
26440
24854
|
}
|
|
26441
24855
|
return finalBGColor;
|
|
26442
24856
|
};
|
|
26443
|
-
var Message = styled('div')(_templateObject7
|
|
24857
|
+
var Message = styled('div')(_templateObject7 || (_templateObject7 = _taggedTemplateLiteralLoose(["\n\tbackground-color: ", ";\n\tcolor: ", ";\n\tborder: 1px solid\n\t\t", ";\n\tpadding: 10px;\n\tborder-radius: 7px;\n\tmargin-bottom: 10px;\n\tmax-width: 80%;\n\talign-self: ", ";\n\tdisplay: inline-block;\n\tposition: relative;\n\toverflow-wrap: anywhere;\n\t", "\n"])), function (props) {
|
|
26444
24858
|
return messageBGColor(props);
|
|
26445
24859
|
}, function (props) {
|
|
26446
24860
|
var finalColor;
|
|
@@ -26457,8 +24871,8 @@
|
|
|
26457
24871
|
}, function (props) {
|
|
26458
24872
|
return resetCSS(props);
|
|
26459
24873
|
});
|
|
26460
|
-
var MessageInputContainer = styled('form')(_templateObject8
|
|
26461
|
-
var MessageInput = styled(TextArea)(_templateObject9
|
|
24874
|
+
var MessageInputContainer = styled('form')(_templateObject8 || (_templateObject8 = _taggedTemplateLiteralLoose(["\n\tdisplay: flex;\n\tpadding-top: 12px;\n\talign-items: stretch;\n\tmargin-top: 10px;\n\t.ai-enter-button-wrapper {\n\t\talign-self: baseline;\n\t\theight: 41px;\n\t}\n"])));
|
|
24875
|
+
var MessageInput = styled(TextArea)(_templateObject9 || (_templateObject9 = _taggedTemplateLiteralLoose(["\n\twidth: 100%;\n\tborder-radius: 5px;\n\tborder: 1px solid #ccc;\n\tbackground-color: ", ";\n\tcolor: ", ";\n\n\t::placeholder {\n\t\tcolor: ", ";\n\t}\n\n\t:-ms-input-placeholder {\n\t\tcolor: ", ";\n\t}\n\n\t::-ms-input-placeholder {\n\t\tcolor: ", ";\n\t}\n\t", "\n"])), function (props) {
|
|
26462
24876
|
return props.themePreset === 'dark' ? props.theme.colors.borderColor : '#fff';
|
|
26463
24877
|
}, function (props) {
|
|
26464
24878
|
return props.themePreset === 'dark' ? props.theme.colors.titleColor : props.theme.colors.textColor;
|
|
@@ -26472,12 +24886,12 @@
|
|
|
26472
24886
|
var enterButton = _ref.enterButton;
|
|
26473
24887
|
return enterButton && "\n\t\t border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n\t";
|
|
26474
24888
|
});
|
|
26475
|
-
var SendButton = styled(Button)(_templateObject10
|
|
24889
|
+
var SendButton = styled(Button)(_templateObject10 || (_templateObject10 = _taggedTemplateLiteralLoose(["\n\tborder: none;\n\tcolor: #ffffff;\n\tcursor: pointer;\n\tfont-size: 16px;\n\tmargin-left: 8px;\n\toutline: none;\n\tpadding: 10px;\n\ttext-align: center;\n\n\t&:disabled {\n\t\tcursor: not-allowed;\n\t}\n"])));
|
|
26476
24890
|
var AIFeedbackContainer = styled('div')(_templateObject11 || (_templateObject11 = _taggedTemplateLiteralLoose(["\n\t.--feedback-svgs-wrapper {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tjustify-content: flex-end;\n\t\tgap: 5px;\n\n\t\tsvg {\n\t\t\tcursor: pointer;\n\t\t\ttransition: all ease-in 0.1s;\n\t\t\t&.selected {\n\t\t\t\ttransform: scale(1.1);\n\t\t\t\tcursor: default;\n\t\t\t}\n\n\t\t\t&:hover {\n\t\t\t\ttransform: scale(1.1);\n\t\t\t}\n\t\t}\n\t}\n\n\t.--feedback-input-wrapper {\n\t\tdisplay: flex;\n\t\tgap: 7px;\n\t}\n"])));
|
|
26477
24891
|
|
|
26478
|
-
var _templateObject$
|
|
26479
|
-
var fadeInFromBottom = keyframes(_templateObject$
|
|
26480
|
-
var fadeInFromTop = keyframes(_templateObject2$
|
|
24892
|
+
var _templateObject$k, _templateObject2$8, _templateObject3$6, _templateObject4$3, _templateObject5$3, _templateObject6$2, _templateObject7$1;
|
|
24893
|
+
var fadeInFromBottom = keyframes(_templateObject$k || (_templateObject$k = _taggedTemplateLiteralLoose(["\n 0% {\n opacity: 0;\n transform: translateY(20px);\n }\n 100% {\n opacity: 1;\n transform: translateY(0);\n }\n"])));
|
|
24894
|
+
var fadeInFromTop = keyframes(_templateObject2$8 || (_templateObject2$8 = _taggedTemplateLiteralLoose(["\n 0% {\n opacity: 0;\n transform: translateY(-20px);\n }\n 100% {\n opacity: 1;\n transform: translateY(0);\n }\n"])));
|
|
26481
24895
|
var SearchBoxAISection = styled('div')(_templateObject3$6 || (_templateObject3$6 = _taggedTemplateLiteralLoose(["\n\tpadding: 10px;\n\tborder-radius: 4px;\n\tmin-height: 200px;\n\tpadding-top: 20px;\n\tposition: relative;\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: space-between;\n\tbackground-color: ", ";\n\tcolor: ", ";\n\t.--ai-answer-error-container {\n\t\tposition: absolute;\n\t\ttop: 50%;\n\t\tleft: 50%;\n\t\ttransform: translate(-50%, -50%);\n\t\t.--default-error-element {\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t\talign-items: center;\n\t\t\tgap: 10px;\n\t\t}\n\t}\n"])), function (_ref) {
|
|
26482
24896
|
var themePreset = _ref.themePreset,
|
|
26483
24897
|
theme = _ref.theme;
|
|
@@ -26498,7 +24912,7 @@
|
|
|
26498
24912
|
var theme = _ref4.theme;
|
|
26499
24913
|
return theme.colors.textColor;
|
|
26500
24914
|
});
|
|
26501
|
-
var SourceTags = styled('div')(_templateObject7$
|
|
24915
|
+
var SourceTags = styled('div')(_templateObject7$1 || (_templateObject7$1 = _taggedTemplateLiteralLoose(["\n\tdisplay: flex;\n\tgap: 8px;\n\tflex-wrap: wrap;\n\t.--ai-source-tag {\n\t\tdisplay: inline-block;\n\t\tmax-width: 200px;\n\t\twhite-space: nowrap;\n\t\toverflow: hidden;\n\t\ttext-overflow: ellipsis;\n\t}\n"])));
|
|
26502
24916
|
|
|
26503
24917
|
var ThumbsUpSvg = {
|
|
26504
24918
|
name: 'ThumbsUpSvg',
|
|
@@ -26749,26 +25163,6 @@
|
|
|
26749
25163
|
},
|
|
26750
25164
|
stats: function stats() {
|
|
26751
25165
|
return getResultStats$1(this);
|
|
26752
|
-
},
|
|
26753
|
-
parsedSuggestions: function parsedSuggestions() {
|
|
26754
|
-
var suggestionsArray = [];
|
|
26755
|
-
if (Array.isArray(this.suggestions) && this.suggestions.length) {
|
|
26756
|
-
suggestionsArray = [].concat(withClickIds(this.suggestions));
|
|
26757
|
-
}
|
|
26758
|
-
var sectionsAccumulated = [];
|
|
26759
|
-
var sectionisedSuggestions = suggestionsArray.reduce(function (acc, d, currentIndex) {
|
|
26760
|
-
if (sectionsAccumulated.includes(d.sectionId)) return acc;
|
|
26761
|
-
if (d.sectionId) {
|
|
26762
|
-
acc[currentIndex] = suggestionsArray.filter(function (g) {
|
|
26763
|
-
return g.sectionId === d.sectionId;
|
|
26764
|
-
});
|
|
26765
|
-
sectionsAccumulated.push(d.sectionId);
|
|
26766
|
-
} else {
|
|
26767
|
-
acc[currentIndex] = d;
|
|
26768
|
-
}
|
|
26769
|
-
return acc;
|
|
26770
|
-
}, {});
|
|
26771
|
-
return Object.values(sectionisedSuggestions);
|
|
26772
25166
|
}
|
|
26773
25167
|
},
|
|
26774
25168
|
props: {
|
|
@@ -26835,20 +25229,12 @@
|
|
|
26835
25229
|
distinctFieldConfig: types.props,
|
|
26836
25230
|
//
|
|
26837
25231
|
focusShortcuts: Q.arrayOf(Q.oneOfType([Q.string, Q.number])).def(['/']),
|
|
26838
|
-
showFocusShortcutsIcon: Q.bool.def(true),
|
|
26839
25232
|
addonBefore: Q.any,
|
|
26840
25233
|
addonAfter: Q.any,
|
|
26841
|
-
showSuggestionsFooter: Q.bool.def(true),
|
|
26842
25234
|
expandSuggestionsContainer: Q.bool.def(true),
|
|
26843
|
-
renderSuggestionsFooter: Q.func,
|
|
26844
25235
|
index: Q.string,
|
|
26845
25236
|
popularSuggestionsConfig: Q.object,
|
|
26846
25237
|
recentSuggestionsConfig: Q.object,
|
|
26847
|
-
featuredSuggestionsConfig: Q.shape({
|
|
26848
|
-
maxSuggestionsPerSection: Q.number,
|
|
26849
|
-
sectionsOrder: Q.arrayOf(Q.string)
|
|
26850
|
-
}),
|
|
26851
|
-
customEvents: Q.object,
|
|
26852
25238
|
applyStopwords: Q.bool,
|
|
26853
25239
|
customStopwords: types.stringArray,
|
|
26854
25240
|
onData: types.func,
|
|
@@ -27294,52 +25680,12 @@
|
|
|
27294
25680
|
}, e);
|
|
27295
25681
|
}
|
|
27296
25682
|
},
|
|
27297
|
-
handleFeaturedSuggestionClicked: function handleFeaturedSuggestionClicked(suggestion) {
|
|
27298
|
-
try {
|
|
27299
|
-
var _this$$refs2, _this$$refs2$this$$pr;
|
|
27300
|
-
if (suggestion.action === helper_15.NAVIGATE) {
|
|
27301
|
-
var _JSON$parse = JSON.parse(suggestion.subAction),
|
|
27302
|
-
_JSON$parse$target = _JSON$parse.target,
|
|
27303
|
-
target = _JSON$parse$target === void 0 ? '_self' : _JSON$parse$target,
|
|
27304
|
-
_JSON$parse$link = _JSON$parse.link,
|
|
27305
|
-
link = _JSON$parse$link === void 0 ? '/' : _JSON$parse$link;
|
|
27306
|
-
if (typeof window !== 'undefined') {
|
|
27307
|
-
window.open(link, target);
|
|
27308
|
-
}
|
|
27309
|
-
}
|
|
27310
|
-
if (suggestion.action === helper_15.FUNCTION) {
|
|
27311
|
-
var matchedValues = suggestion.subAction.match(/function\s*\(.*\)(.|\n)*/);
|
|
27312
|
-
var functionStr = matchedValues && matchedValues[0];
|
|
27313
|
-
// eslint-disable-next-line no-new-func
|
|
27314
|
-
var func = new Function("return " + functionStr)();
|
|
27315
|
-
func(suggestion, this.$data.currentValue, this.$props.customEvents);
|
|
27316
|
-
}
|
|
27317
|
-
if (suggestion.action === helper_15.SELECT) {
|
|
27318
|
-
this.setValue(suggestion.value, true, this.$props, this.$options.isTagsMode.current ? lib_7.SUGGESTION_SELECT : lib_7.ENTER_PRESS);
|
|
27319
|
-
this.onValueSelectedHandler(suggestion.value, lib_7.SUGGESTION_SELECT);
|
|
27320
|
-
}
|
|
27321
|
-
// blur is important to close the dropdown
|
|
27322
|
-
// on selecting one of featured suggestions
|
|
27323
|
-
// else Downshift probably is focusing the dropdown
|
|
27324
|
-
// and not letting it close
|
|
27325
|
-
// eslint-disable-next-line no-unused-expressions
|
|
27326
|
-
(_this$$refs2 = this.$refs) == null ? void 0 : (_this$$refs2$this$$pr = _this$$refs2[this.$props.innerRef]) == null ? void 0 : _this$$refs2$this$$pr.blur();
|
|
27327
|
-
} catch (e) {
|
|
27328
|
-
console.error("Error: There was an error parsing the subAction for the featured suggestion with label, \"" + suggestion.label + "\"", e);
|
|
27329
|
-
}
|
|
27330
|
-
},
|
|
27331
25683
|
onSuggestionSelected: function onSuggestionSelected(suggestion) {
|
|
27332
25684
|
var _this4 = this;
|
|
27333
25685
|
if (!this.$props.enableAI) this.isOpen = false;else {
|
|
27334
25686
|
this.showAIScreen = true;
|
|
27335
25687
|
}
|
|
27336
25688
|
var value = this.$props.value;
|
|
27337
|
-
|
|
27338
|
-
// handle featured suggestions click event
|
|
27339
|
-
if (suggestion._suggestion_type === helper_16.Featured) {
|
|
27340
|
-
this.handleFeaturedSuggestionClicked(suggestion);
|
|
27341
|
-
return;
|
|
27342
|
-
}
|
|
27343
25689
|
// Record analytics for selected suggestions
|
|
27344
25690
|
this.triggerClickAnalytics(suggestion._click_id);
|
|
27345
25691
|
if (value === undefined) {
|
|
@@ -27495,13 +25841,6 @@
|
|
|
27495
25841
|
customQuery: true
|
|
27496
25842
|
});
|
|
27497
25843
|
},
|
|
27498
|
-
suggestionsFooter: function suggestionsFooter() {
|
|
27499
|
-
return typeof renderSuggestionsFooter === 'function' ? this.$props.renderSuggestionsFooter() : vue.createVNode(AutosuggestFooterContainer, null, {
|
|
27500
|
-
"default": function _default() {
|
|
27501
|
-
return [vue.createVNode("div", null, [vue.createTextVNode("\u2191\u2193 Navigate")]), vue.createVNode("div", null, [vue.createTextVNode("\u21A9 Go")])];
|
|
27502
|
-
}
|
|
27503
|
-
});
|
|
27504
|
-
},
|
|
27505
25844
|
renderEnterButtonElement: function renderEnterButtonElement() {
|
|
27506
25845
|
var _this6 = this;
|
|
27507
25846
|
var _this$$props2 = this.$props,
|
|
@@ -27529,98 +25868,71 @@
|
|
|
27529
25868
|
}
|
|
27530
25869
|
return null;
|
|
27531
25870
|
},
|
|
27532
|
-
|
|
27533
|
-
if (this.$props.focusShortcuts && this.$props.focusShortcuts.length) {
|
|
27534
|
-
var shortcut = this.$props.focusShortcuts[0];
|
|
27535
|
-
shortcut = shortcut.toLowerCase();
|
|
27536
|
-
shortcut = shortcut.replace('shift', '⬆️');
|
|
27537
|
-
shortcut = shortcut.replace('command', 'cmd');
|
|
27538
|
-
shortcut = shortcut.replace('control', 'ctrl');
|
|
27539
|
-
shortcut = shortcut.replace('option', 'alt');
|
|
27540
|
-
return shortcut.toUpperCase();
|
|
27541
|
-
}
|
|
27542
|
-
return '/';
|
|
27543
|
-
},
|
|
27544
|
-
renderLeftIcons: function renderLeftIcons() {
|
|
25871
|
+
renderIcons: function renderIcons() {
|
|
27545
25872
|
var _this7 = this;
|
|
27546
|
-
var _slot3;
|
|
25873
|
+
var _slot3, _slot4, _slot5;
|
|
27547
25874
|
var _this$$props3 = this.$props,
|
|
27548
25875
|
iconPosition = _this$$props3.iconPosition,
|
|
25876
|
+
showClear = _this$$props3.showClear,
|
|
25877
|
+
innerClass = _this$$props3.innerClass,
|
|
25878
|
+
getMicInstance = _this$$props3.getMicInstance,
|
|
25879
|
+
showVoiceSearch = _this$$props3.showVoiceSearch,
|
|
27549
25880
|
showIcon = _this$$props3.showIcon;
|
|
27550
|
-
return vue.createVNode("div", null, [vue.createVNode(IconGroup, {
|
|
27551
|
-
"groupPosition": "left"
|
|
27552
|
-
}, {
|
|
27553
|
-
"default": function _default() {
|
|
27554
|
-
return [iconPosition === 'left' && showIcon && vue.createVNode(IconWrapper, {
|
|
27555
|
-
"onClick": _this7.handleSearchIconClick
|
|
27556
|
-
}, _isSlot$5(_slot3 = _this7.renderIcon()) ? _slot3 : {
|
|
27557
|
-
"default": function _default() {
|
|
27558
|
-
return [_slot3];
|
|
27559
|
-
}
|
|
27560
|
-
})];
|
|
27561
|
-
}
|
|
27562
|
-
})]);
|
|
27563
|
-
},
|
|
27564
|
-
renderRightIcons: function renderRightIcons() {
|
|
27565
|
-
var _this8 = this;
|
|
27566
|
-
var _slot4, _slot5, _slot6;
|
|
27567
|
-
var _this$$props4 = this.$props,
|
|
27568
|
-
iconPosition = _this$$props4.iconPosition,
|
|
27569
|
-
showClear = _this$$props4.showClear,
|
|
27570
|
-
innerClass = _this$$props4.innerClass,
|
|
27571
|
-
getMicInstance = _this$$props4.getMicInstance,
|
|
27572
|
-
showVoiceSearch = _this$$props4.showVoiceSearch,
|
|
27573
|
-
showIcon = _this$$props4.showIcon,
|
|
27574
|
-
showFocusShortcutsIcon = _this$$props4.showFocusShortcutsIcon;
|
|
27575
25881
|
var renderMic = this.$slots.renderMic || this.$props.renderMic;
|
|
27576
25882
|
var currentValue = this.$data.currentValue;
|
|
27577
25883
|
return vue.createVNode("div", null, [vue.createVNode(IconGroup, {
|
|
27578
|
-
"groupPosition": "right"
|
|
25884
|
+
"groupPosition": "right",
|
|
25885
|
+
"positionType": "absolute"
|
|
27579
25886
|
}, {
|
|
27580
25887
|
"default": function _default() {
|
|
27581
25888
|
return [currentValue && showClear && vue.createVNode(IconWrapper, {
|
|
27582
|
-
"onClick":
|
|
25889
|
+
"onClick": _this7.clearValue,
|
|
27583
25890
|
"showIcon": showIcon,
|
|
27584
25891
|
"isClearIcon": true
|
|
27585
|
-
}, _isSlot$5(
|
|
27586
|
-
"default": function _default() {
|
|
27587
|
-
return [_slot4];
|
|
27588
|
-
}
|
|
27589
|
-
}), showFocusShortcutsIcon && vue.createVNode(ButtonIconWrapper, {
|
|
27590
|
-
"onClick": function onClick(e) {
|
|
27591
|
-
return _this8.focusSearchBox(e);
|
|
27592
|
-
}
|
|
27593
|
-
}, _isSlot$5(_slot5 = _this8.renderShortcut()) ? _slot5 : {
|
|
25892
|
+
}, _isSlot$5(_slot3 = _this7.renderCancelIcon()) ? _slot3 : {
|
|
27594
25893
|
"default": function _default() {
|
|
27595
|
-
return [
|
|
25894
|
+
return [_slot3];
|
|
27596
25895
|
}
|
|
27597
25896
|
}), showVoiceSearch && vue.createVNode(Mic, {
|
|
27598
25897
|
"getInstance": getMicInstance,
|
|
27599
25898
|
"render": renderMic,
|
|
27600
|
-
"handleResult":
|
|
25899
|
+
"handleResult": _this7.handleVoiceResults,
|
|
27601
25900
|
"className": getClassName$3(innerClass, 'mic') || null
|
|
27602
25901
|
}, null), iconPosition === 'right' && showIcon && vue.createVNode(IconWrapper, {
|
|
27603
|
-
"onClick":
|
|
27604
|
-
}, _isSlot$5(
|
|
25902
|
+
"onClick": _this7.handleSearchIconClick
|
|
25903
|
+
}, _isSlot$5(_slot4 = _this7.renderIcon()) ? _slot4 : {
|
|
27605
25904
|
"default": function _default() {
|
|
27606
|
-
return [
|
|
25905
|
+
return [_slot4];
|
|
25906
|
+
}
|
|
25907
|
+
})];
|
|
25908
|
+
}
|
|
25909
|
+
}), vue.createVNode(IconGroup, {
|
|
25910
|
+
"groupPosition": "left",
|
|
25911
|
+
"positionType": "absolute"
|
|
25912
|
+
}, {
|
|
25913
|
+
"default": function _default() {
|
|
25914
|
+
return [iconPosition === 'left' && showIcon && vue.createVNode(IconWrapper, {
|
|
25915
|
+
"onClick": _this7.handleSearchIconClick
|
|
25916
|
+
}, _isSlot$5(_slot5 = _this7.renderIcon()) ? _slot5 : {
|
|
25917
|
+
"default": function _default() {
|
|
25918
|
+
return [_slot5];
|
|
27607
25919
|
}
|
|
27608
25920
|
})];
|
|
27609
25921
|
}
|
|
27610
25922
|
})]);
|
|
27611
25923
|
},
|
|
27612
25924
|
focusSearchBox: function focusSearchBox(event) {
|
|
27613
|
-
var _this$$
|
|
25925
|
+
var _this$$refs2, _this$$refs2$this$$pr;
|
|
27614
25926
|
var elt = event.target || event.srcElement;
|
|
27615
25927
|
var tagName = elt.tagName;
|
|
27616
25928
|
if (elt.isContentEditable || tagName === 'INPUT' || tagName === 'SELECT' || tagName === 'TEXTAREA') {
|
|
27617
25929
|
// already in an input
|
|
27618
25930
|
return;
|
|
27619
25931
|
}
|
|
27620
|
-
(_this$$
|
|
25932
|
+
(_this$$refs2 = this.$refs) == null ? void 0 : (_this$$refs2$this$$pr = _this$$refs2[this.$props.innerRef]) == null ? void 0 : _this$$refs2$this$$pr.focus(); // eslint-disable-line
|
|
27621
25933
|
},
|
|
27622
25934
|
listenForFocusShortcuts: function listenForFocusShortcuts() {
|
|
27623
|
-
var
|
|
25935
|
+
var _this8 = this;
|
|
27624
25936
|
var _this$$props$focusSho = this.$props.focusShortcuts,
|
|
27625
25937
|
focusShortcuts = _this$$props$focusSho === void 0 ? ['/'] : _this$$props$focusSho;
|
|
27626
25938
|
if (isEmpty(focusShortcuts)) {
|
|
@@ -27635,7 +25947,7 @@
|
|
|
27635
25947
|
function (event, handler) {
|
|
27636
25948
|
// Prevent the default refresh event under WINDOWS system
|
|
27637
25949
|
event.preventDefault();
|
|
27638
|
-
|
|
25950
|
+
_this8.focusSearchBox(event);
|
|
27639
25951
|
});
|
|
27640
25952
|
|
|
27641
25953
|
// if one of modifier keys are used, they are handled below
|
|
@@ -27645,7 +25957,7 @@
|
|
|
27645
25957
|
for (var index = 0; index < modifierKeys.length; index += 1) {
|
|
27646
25958
|
var element = modifierKeys[index];
|
|
27647
25959
|
if (hotkeys[element]) {
|
|
27648
|
-
|
|
25960
|
+
_this8.focusSearchBox(event);
|
|
27649
25961
|
break;
|
|
27650
25962
|
}
|
|
27651
25963
|
}
|
|
@@ -27657,34 +25969,19 @@
|
|
|
27657
25969
|
this.currentValue = decodeHtml(value);
|
|
27658
25970
|
this.triggerDefaultQuery(value);
|
|
27659
25971
|
},
|
|
27660
|
-
|
|
27661
|
-
var
|
|
25972
|
+
renderAutoFill: function renderAutoFill(suggestion) {
|
|
25973
|
+
var _this9 = this;
|
|
27662
25974
|
var handleAutoFillClick = function handleAutoFillClick(e) {
|
|
27663
25975
|
e.stopPropagation();
|
|
27664
|
-
|
|
25976
|
+
_this9.onAutofillClick(suggestion);
|
|
27665
25977
|
};
|
|
27666
|
-
|
|
27667
|
-
|
|
27668
|
-
|
|
27669
|
-
|
|
27670
|
-
transform: 'rotate(135deg)',
|
|
27671
|
-
pointerEvents: 'none'
|
|
27672
|
-
}
|
|
27673
|
-
}, null);
|
|
27674
|
-
}
|
|
27675
|
-
return null;
|
|
27676
|
-
}
|
|
27677
|
-
if (!suggestion._category) {
|
|
27678
|
-
/* 👇 avoid showing autofill for category suggestions👇 */
|
|
27679
|
-
|
|
27680
|
-
return vue.createVNode(AutoFillSvg, {
|
|
27681
|
-
"onClick": handleAutoFillClick
|
|
27682
|
-
}, null);
|
|
27683
|
-
}
|
|
27684
|
-
return null;
|
|
25978
|
+
/* 👇 avoid showing autofill for category suggestions👇 */
|
|
25979
|
+
return suggestion._category ? null : vue.createVNode(AutoFillSvg, {
|
|
25980
|
+
"onClick": handleAutoFillClick
|
|
25981
|
+
}, null);
|
|
27685
25982
|
},
|
|
27686
25983
|
renderTag: function renderTag(item) {
|
|
27687
|
-
var
|
|
25984
|
+
var _this10 = this;
|
|
27688
25985
|
var innerClass = this.$props.innerClass;
|
|
27689
25986
|
return vue.createVNode(TagItem, {
|
|
27690
25987
|
"class": getClassName$3(innerClass, 'selected-tag') || ''
|
|
@@ -27695,7 +25992,7 @@
|
|
|
27695
25992
|
"aria-label": "delete-tag",
|
|
27696
25993
|
"class": "close-icon",
|
|
27697
25994
|
"onClick": function onClick() {
|
|
27698
|
-
return
|
|
25995
|
+
return _this10.clearTag(item);
|
|
27699
25996
|
}
|
|
27700
25997
|
}, [vue.createVNode(CancelSvg, null, null)])];
|
|
27701
25998
|
}
|
|
@@ -27718,7 +26015,7 @@
|
|
|
27718
26015
|
}
|
|
27719
26016
|
},
|
|
27720
26017
|
renderTags: function renderTags() {
|
|
27721
|
-
var
|
|
26018
|
+
var _this11 = this;
|
|
27722
26019
|
if (!Array.isArray(this.selectedTags)) {
|
|
27723
26020
|
return null;
|
|
27724
26021
|
}
|
|
@@ -27732,16 +26029,16 @@
|
|
|
27732
26029
|
}) : vue.createVNode(TagsContainer, null, {
|
|
27733
26030
|
"default": function _default() {
|
|
27734
26031
|
return [tagsList.map(function (item) {
|
|
27735
|
-
return
|
|
26032
|
+
return _this11.renderTag(item);
|
|
27736
26033
|
}), shouldRenderClearAllTag && vue.createVNode(TagItem, {
|
|
27737
|
-
"class": getClassName$3(
|
|
26034
|
+
"class": getClassName$3(_this11.$props.innerClass, 'selected-tag') || ''
|
|
27738
26035
|
}, {
|
|
27739
26036
|
"default": function _default() {
|
|
27740
26037
|
return [vue.createVNode("span", null, [vue.createTextVNode("Clear All")]), vue.createVNode("span", {
|
|
27741
26038
|
"role": "img",
|
|
27742
26039
|
"aria-label": "delete-tag",
|
|
27743
26040
|
"class": "close-icon",
|
|
27744
|
-
"onClick":
|
|
26041
|
+
"onClick": _this11.clearAllTags
|
|
27745
26042
|
}, [vue.createVNode(CancelSvg, null, null)])];
|
|
27746
26043
|
}
|
|
27747
26044
|
})];
|
|
@@ -27788,8 +26085,8 @@
|
|
|
27788
26085
|
return vue.createVNode(HorizontalSkeletonLoader, null, null);
|
|
27789
26086
|
},
|
|
27790
26087
|
renderAIScreenFooter: function renderAIScreenFooter() {
|
|
27791
|
-
var
|
|
27792
|
-
var
|
|
26088
|
+
var _slot6;
|
|
26089
|
+
var _this12 = this;
|
|
27793
26090
|
var _this$$props$AIUIConf2 = this.$props.AIUIConfig,
|
|
27794
26091
|
AIUIConfig = _this$$props$AIUIConf2 === void 0 ? {} : _this$$props$AIUIConf2;
|
|
27795
26092
|
var _ref6 = AIUIConfig || {},
|
|
@@ -27803,9 +26100,9 @@
|
|
|
27803
26100
|
"themePreset": this.$props.themePreset
|
|
27804
26101
|
}, {
|
|
27805
26102
|
"default": function _default() {
|
|
27806
|
-
return [vue.createTextVNode("Summary generated using the following sources:"), ' ', vue.createVNode(SourceTags, null, _isSlot$5(
|
|
26103
|
+
return [vue.createTextVNode("Summary generated using the following sources:"), ' ', vue.createVNode(SourceTags, null, _isSlot$5(_slot6 = _this12.getAISourceObjects().map(function (el) {
|
|
27807
26104
|
return vue.createVNode(Button, {
|
|
27808
|
-
"class": "--ai-source-tag " + (getClassName$3(
|
|
26105
|
+
"class": "--ai-source-tag " + (getClassName$3(_this12.$props.innerClass, 'ai-source-tag') || ''),
|
|
27809
26106
|
"title": el[sourceDocumentLabel],
|
|
27810
26107
|
"info": true,
|
|
27811
26108
|
"onClick": function onClick() {
|
|
@@ -27816,16 +26113,16 @@
|
|
|
27816
26113
|
return [el[sourceDocumentLabel]];
|
|
27817
26114
|
}
|
|
27818
26115
|
});
|
|
27819
|
-
})) ?
|
|
26116
|
+
})) ? _slot6 : {
|
|
27820
26117
|
"default": function _default() {
|
|
27821
|
-
return [
|
|
26118
|
+
return [_slot6];
|
|
27822
26119
|
}
|
|
27823
26120
|
})];
|
|
27824
26121
|
}
|
|
27825
26122
|
}) : null;
|
|
27826
26123
|
},
|
|
27827
26124
|
renderAIScreen: function renderAIScreen() {
|
|
27828
|
-
var
|
|
26125
|
+
var _this13 = this;
|
|
27829
26126
|
var customAIRenderer = this.$props.renderAIAnswer || this.$slots.renderAIAnswer;
|
|
27830
26127
|
if (customAIRenderer) {
|
|
27831
26128
|
return customAIRenderer({
|
|
@@ -27849,11 +26146,11 @@
|
|
|
27849
26146
|
"hideUI": this.isAIResponseLoading || this.isLoading || !this.sessionIdFromStore,
|
|
27850
26147
|
"key": this.sessionIdFromStore,
|
|
27851
26148
|
"onFeedbackSubmit": function onFeedbackSubmit(useful, reason) {
|
|
27852
|
-
|
|
26149
|
+
_this13.feedbackState = {
|
|
27853
26150
|
isRecorded: true,
|
|
27854
26151
|
feedbackType: useful ? 'positive' : 'negative'
|
|
27855
26152
|
};
|
|
27856
|
-
|
|
26153
|
+
_this13.recordAISessionUsefulness(_this13.sessionIdFromStore, {
|
|
27857
26154
|
useful: useful,
|
|
27858
26155
|
reason: reason
|
|
27859
26156
|
});
|
|
@@ -27888,22 +26185,22 @@
|
|
|
27888
26185
|
});
|
|
27889
26186
|
},
|
|
27890
26187
|
renderAskButtonElement: function renderAskButtonElement() {
|
|
27891
|
-
var
|
|
27892
|
-
var _this$$
|
|
27893
|
-
AIUIConfig = _this$$
|
|
27894
|
-
innerClass = _this$$
|
|
26188
|
+
var _this14 = this;
|
|
26189
|
+
var _this$$props4 = this.$props,
|
|
26190
|
+
AIUIConfig = _this$$props4.AIUIConfig,
|
|
26191
|
+
innerClass = _this$$props4.innerClass;
|
|
27895
26192
|
var _ref7 = AIUIConfig || {},
|
|
27896
26193
|
askButton = _ref7.askButton;
|
|
27897
26194
|
var renderAskButton = this.$slots.renderAskButton;
|
|
27898
26195
|
if (askButton) {
|
|
27899
26196
|
var getEnterButtonMarkup = function getEnterButtonMarkup() {
|
|
27900
26197
|
if (renderAskButton) {
|
|
27901
|
-
return renderAskButton(
|
|
26198
|
+
return renderAskButton(_this14.askButtonOnClick);
|
|
27902
26199
|
}
|
|
27903
26200
|
return vue.createVNode(Button, {
|
|
27904
26201
|
"class": "enter-btn " + getClassName$3(innerClass, 'ask-button'),
|
|
27905
26202
|
"info": true,
|
|
27906
|
-
"onClick":
|
|
26203
|
+
"onClick": _this14.askButtonOnClick
|
|
27907
26204
|
}, {
|
|
27908
26205
|
"default": function _default() {
|
|
27909
26206
|
return [vue.createTextVNode("Ask")];
|
|
@@ -27918,7 +26215,7 @@
|
|
|
27918
26215
|
}
|
|
27919
26216
|
},
|
|
27920
26217
|
render: function render() {
|
|
27921
|
-
var
|
|
26218
|
+
var _this15 = this;
|
|
27922
26219
|
var expandSuggestionsContainer = this.$props.expandSuggestionsContainer;
|
|
27923
26220
|
var _this$$slots = this.$slots,
|
|
27924
26221
|
recentSearchesIcon = _this$$slots.recentSearchesIcon,
|
|
@@ -27929,17 +26226,17 @@
|
|
|
27929
26226
|
"class": this.$props.className
|
|
27930
26227
|
}, {
|
|
27931
26228
|
"default": function _default() {
|
|
27932
|
-
return [
|
|
27933
|
-
"class": getClassName$3(
|
|
26229
|
+
return [_this15.$props.title && vue.createVNode(Title, {
|
|
26230
|
+
"class": getClassName$3(_this15.$props.innerClass, 'title') || ''
|
|
27934
26231
|
}, {
|
|
27935
26232
|
"default": function _default() {
|
|
27936
|
-
return [
|
|
26233
|
+
return [_this15.$props.title];
|
|
27937
26234
|
}
|
|
27938
|
-
}),
|
|
27939
|
-
"id":
|
|
27940
|
-
"handleChange":
|
|
27941
|
-
"handleMouseup":
|
|
27942
|
-
"isOpen":
|
|
26235
|
+
}), _this15.$props.autosuggest ? vue.createVNode(Downshift, {
|
|
26236
|
+
"id": _this15.$props.componentId + "-downshift",
|
|
26237
|
+
"handleChange": _this15.onSuggestionSelected,
|
|
26238
|
+
"handleMouseup": _this15.handleStateChange,
|
|
26239
|
+
"isOpen": _this15.$data.isOpen
|
|
27943
26240
|
}, {
|
|
27944
26241
|
"default": function _default(_ref8) {
|
|
27945
26242
|
var getInputEvents = _ref8.getInputEvents,
|
|
@@ -27950,229 +26247,156 @@
|
|
|
27950
26247
|
highlightedIndex = _ref8.highlightedIndex,
|
|
27951
26248
|
setHighlightedIndex = _ref8.setHighlightedIndex;
|
|
27952
26249
|
var renderSuggestionsDropdown = function renderSuggestionsDropdown() {
|
|
27953
|
-
var getIcon = function getIcon(iconType
|
|
26250
|
+
var getIcon = function getIcon(iconType) {
|
|
27954
26251
|
switch (iconType) {
|
|
27955
26252
|
case helper_16.Recent:
|
|
27956
26253
|
return recentSearchesIcon;
|
|
27957
26254
|
case helper_16.Popular:
|
|
27958
26255
|
return popularSearchesIcon;
|
|
27959
|
-
case helper_16.Featured:
|
|
27960
|
-
if (item.icon) {
|
|
27961
|
-
return function () {
|
|
27962
|
-
return vue.createVNode("div", {
|
|
27963
|
-
"style": {
|
|
27964
|
-
display: 'flex'
|
|
27965
|
-
},
|
|
27966
|
-
"innerHTML": lib$2(item.icon)
|
|
27967
|
-
}, null);
|
|
27968
|
-
};
|
|
27969
|
-
}
|
|
27970
|
-
if (item.iconURL) {
|
|
27971
|
-
return function () {
|
|
27972
|
-
return (// When you change below also change the empty icon below
|
|
27973
|
-
vue.createVNode("img", {
|
|
27974
|
-
"style": {
|
|
27975
|
-
maxHeight: '25px'
|
|
27976
|
-
},
|
|
27977
|
-
"src": lib$2(item.iconURL),
|
|
27978
|
-
"alt": item.value
|
|
27979
|
-
}, null)
|
|
27980
|
-
);
|
|
27981
|
-
};
|
|
27982
|
-
}
|
|
27983
|
-
// Render an empty icon when no icon is provided from the dashboard
|
|
27984
|
-
return function () {
|
|
27985
|
-
return vue.createVNode("span", {
|
|
27986
|
-
"style": {
|
|
27987
|
-
display: 'inline-block',
|
|
27988
|
-
height: '25px',
|
|
27989
|
-
width: leaveSpaceForIcon ? '25px' : 0
|
|
27990
|
-
}
|
|
27991
|
-
}, null);
|
|
27992
|
-
};
|
|
27993
26256
|
default:
|
|
27994
26257
|
return null;
|
|
27995
26258
|
}
|
|
27996
26259
|
};
|
|
27997
|
-
|
|
27998
|
-
return vue.createVNode("div", null, [_this16.hasCustomRenderer && _this16.getComponent({
|
|
26260
|
+
return vue.createVNode("div", null, [_this15.hasCustomRenderer && _this15.getComponent({
|
|
27999
26261
|
isOpen: isOpen,
|
|
28000
26262
|
getItemProps: getItemProps,
|
|
28001
26263
|
getItemEvents: getItemEvents,
|
|
28002
26264
|
highlightedIndex: highlightedIndex
|
|
28003
|
-
}),
|
|
28004
|
-
"class": suggestions$1(
|
|
26265
|
+
}), _this15.renderErrorComponent(), !_this15.hasCustomRenderer && isOpen && hasSuggestions ? vue.createVNode("ul", {
|
|
26266
|
+
"class": suggestions$1(_this15.themePreset, _this15.theme) + " " + getClassName$3(_this15.$props.innerClass, 'list'),
|
|
28005
26267
|
"ref": _dropdownULRef
|
|
28006
|
-
}, [
|
|
28007
|
-
"themePreset":
|
|
26268
|
+
}, [_this15.showAIScreen && vue.createVNode(SearchBoxAISection, {
|
|
26269
|
+
"themePreset": _this15.$props.themePreset
|
|
28008
26270
|
}, {
|
|
28009
26271
|
"default": function _default() {
|
|
28010
|
-
return [
|
|
28011
|
-
}
|
|
28012
|
-
}), !_this16.showAIScreen && _this16.parsedSuggestions.map(function (item, itemIndex) {
|
|
28013
|
-
var index = indexOffset + itemIndex;
|
|
28014
|
-
if (Array.isArray(item)) {
|
|
28015
|
-
var sectionHtml = lib$2(item[0].sectionLabel);
|
|
28016
|
-
indexOffset += item.length - 1;
|
|
28017
|
-
return vue.createVNode("div", {
|
|
28018
|
-
"class": "section-container"
|
|
28019
|
-
}, [sectionHtml ? vue.createVNode("div", {
|
|
28020
|
-
"class": "section-header " + getClassName$3(_this16.$props.innerClass, 'section-label'),
|
|
28021
|
-
"key": "" + item[0].sectionId,
|
|
28022
|
-
"innerHTML": sectionHtml
|
|
28023
|
-
}, null) : null, vue.createVNode("ul", {
|
|
28024
|
-
"class": "section-list"
|
|
28025
|
-
}, [item.map(function (sectionItem, sectionIndex) {
|
|
28026
|
-
var suggestionsHaveIcon = item.some(function (s) {
|
|
28027
|
-
return s.icon || s.iconURL;
|
|
28028
|
-
});
|
|
28029
|
-
return renderItem ? vue.createVNode("li", vue.mergeProps(getItemProps({
|
|
28030
|
-
item: sectionItem
|
|
28031
|
-
}), babelHelperVueTransformOn(getItemEvents({
|
|
28032
|
-
item: sectionItem
|
|
28033
|
-
})), {
|
|
28034
|
-
"key": index + sectionIndex,
|
|
28035
|
-
"style": {
|
|
28036
|
-
justifyContent: 'flex-start',
|
|
28037
|
-
alignItems: 'center'
|
|
28038
|
-
},
|
|
28039
|
-
"class": "" + (highlightedIndex === index + sectionIndex ? "active-li-item " + getClassName$3(_this16.$props.innerClass, 'active-suggestion-item') : "li-item " + getClassName$3(_this16.$props.innerClass, 'suggestion-item'))
|
|
28040
|
-
}), [renderItem(sectionItem)]) : vue.createVNode("li", vue.mergeProps(getItemProps({
|
|
28041
|
-
item: sectionItem
|
|
28042
|
-
}), babelHelperVueTransformOn(getItemEvents({
|
|
28043
|
-
item: sectionItem
|
|
28044
|
-
})), {
|
|
28045
|
-
"key": index + sectionIndex,
|
|
28046
|
-
"style": {
|
|
28047
|
-
justifyContent: 'flex-start',
|
|
28048
|
-
alignItems: 'center'
|
|
28049
|
-
},
|
|
28050
|
-
"class": "" + (highlightedIndex === index + sectionIndex ? "active-li-item " + getClassName$3(_this16.$props.innerClass, 'active-suggestion-item') : "li-item " + getClassName$3(_this16.$props.innerClass, 'suggestion-item'))
|
|
28051
|
-
}), [vue.createVNode("div", {
|
|
28052
|
-
"style": {
|
|
28053
|
-
padding: '0 10px 0 0',
|
|
28054
|
-
display: 'flex'
|
|
28055
|
-
}
|
|
28056
|
-
}, [vue.createVNode(CustomSvg, {
|
|
28057
|
-
"className": getClassName$3(_this16.$props.innerClass, sectionItem._suggestion_type + "-search-icon") || null,
|
|
28058
|
-
"icon": getIcon(sectionItem._suggestion_type, sectionItem, suggestionsHaveIcon),
|
|
28059
|
-
"type": sectionItem._suggestion_type + "-search-icon"
|
|
28060
|
-
}, null)]), vue.createVNode(SuggestionItem, {
|
|
28061
|
-
"currentValue": _this16.currentValue,
|
|
28062
|
-
"suggestion": sectionItem
|
|
28063
|
-
}, null), _this16.renderActionIcon(sectionItem)]);
|
|
28064
|
-
})])]);
|
|
26272
|
+
return [_this15.renderAIScreen(), ' ', _this15.renderErrorComponent(true)];
|
|
28065
26273
|
}
|
|
28066
|
-
|
|
28067
|
-
|
|
26274
|
+
}), !_this15.showAIScreen && _this15.normalizedSuggestions.map(function (item, index) {
|
|
26275
|
+
return renderItem ? vue.createVNode("li", vue.mergeProps(getItemProps({
|
|
26276
|
+
item: item
|
|
26277
|
+
}), getItemEvents({
|
|
26278
|
+
item: item
|
|
26279
|
+
}), {
|
|
26280
|
+
"key": index + 1 + "-" + item.value,
|
|
26281
|
+
"style": {
|
|
26282
|
+
backgroundColor: _this15.getBackgroundColor(highlightedIndex, index),
|
|
26283
|
+
justifyContent: 'flex-start',
|
|
26284
|
+
alignItems: 'center'
|
|
26285
|
+
}
|
|
26286
|
+
}), [renderItem(item)]) : vue.createVNode("li", vue.mergeProps(getItemProps({
|
|
26287
|
+
item: item
|
|
26288
|
+
}), babelHelperVueTransformOn(getItemEvents({
|
|
26289
|
+
item: item
|
|
26290
|
+
})), {
|
|
26291
|
+
"key": index + 1 + "-" + item.value,
|
|
26292
|
+
"style": {
|
|
26293
|
+
backgroundColor: _this15.getBackgroundColor(highlightedIndex, index),
|
|
26294
|
+
justifyContent: 'flex-start',
|
|
26295
|
+
alignItems: 'center'
|
|
26296
|
+
}
|
|
26297
|
+
}), [vue.createVNode("div", {
|
|
26298
|
+
"style": {
|
|
26299
|
+
padding: '0 10px 0 0',
|
|
26300
|
+
display: 'flex'
|
|
26301
|
+
}
|
|
26302
|
+
}, [vue.createVNode(CustomSvg, {
|
|
26303
|
+
"className": getClassName$3(_this15.$props.innerClass, item._suggestion_type + "-search-icon") || null,
|
|
26304
|
+
"icon": getIcon(item._suggestion_type),
|
|
26305
|
+
"type": item._suggestion_type + "-search-icon"
|
|
26306
|
+
}, null)]), vue.createVNode(SuggestionItem, {
|
|
26307
|
+
"currentValue": _this15.currentValue,
|
|
26308
|
+
"suggestion": item
|
|
26309
|
+
}, null), _this15.renderAutoFill(item)]);
|
|
26310
|
+
})]) : _this15.renderNoSuggestions(_this15.normalizedSuggestions)]);
|
|
28068
26311
|
};
|
|
28069
26312
|
return vue.createVNode("div", {
|
|
28070
26313
|
"class": suggestionsContainer
|
|
28071
26314
|
}, [vue.createVNode(InputGroup, {
|
|
28072
|
-
"searchBox": true,
|
|
28073
26315
|
"ref": _inputGroupRef
|
|
28074
26316
|
}, {
|
|
28075
26317
|
"default": function _default() {
|
|
28076
|
-
return [vue.createVNode(
|
|
28077
|
-
"default": function _default() {
|
|
28078
|
-
return [_this16.renderInputAddonBefore(), _this16.renderLeftIcons()];
|
|
28079
|
-
}
|
|
28080
|
-
}), vue.createVNode(InputWrapper, null, {
|
|
26318
|
+
return [_this15.renderInputAddonBefore(), vue.createVNode(InputWrapper, null, {
|
|
28081
26319
|
"default": function _default() {
|
|
28082
26320
|
return [vue.createVNode(TextArea, vue.mergeProps(babelHelperVueTransformOn(getInputEvents({
|
|
28083
|
-
onInput:
|
|
26321
|
+
onInput: _this15.onInputChange,
|
|
28084
26322
|
onBlur: function onBlur(e) {
|
|
28085
|
-
|
|
26323
|
+
_this15.$emit('blur', e, _this15.triggerQuery);
|
|
28086
26324
|
},
|
|
28087
|
-
onFocus:
|
|
26325
|
+
onFocus: _this15.handleFocus,
|
|
28088
26326
|
onKeyPress: function onKeyPress(e) {
|
|
28089
|
-
|
|
28090
|
-
|
|
26327
|
+
_this15.$emit('keyPress', e, _this15.triggerQuery);
|
|
26328
|
+
_this15.$emit('key-press', e, _this15.triggerQuery);
|
|
28091
26329
|
},
|
|
28092
26330
|
onKeyDown: function onKeyDown(e) {
|
|
28093
|
-
return
|
|
26331
|
+
return _this15.handleKeyDown(e, highlightedIndex);
|
|
28094
26332
|
},
|
|
28095
26333
|
onKeyUp: function onKeyUp(e) {
|
|
28096
|
-
|
|
28097
|
-
|
|
26334
|
+
_this15.$emit('keyUp', e, _this15.triggerQuery);
|
|
26335
|
+
_this15.$emit('key-up', e, _this15.triggerQuery);
|
|
28098
26336
|
},
|
|
28099
26337
|
onClick: function onClick() {
|
|
28100
26338
|
setHighlightedIndex(null);
|
|
28101
26339
|
}
|
|
28102
26340
|
})), {
|
|
28103
|
-
"id":
|
|
28104
|
-
"showIcon":
|
|
28105
|
-
"showClear":
|
|
28106
|
-
"iconPosition":
|
|
28107
|
-
"ref":
|
|
28108
|
-
"class": getClassName$3(
|
|
28109
|
-
"placeholder":
|
|
28110
|
-
"autoFocus":
|
|
28111
|
-
"
|
|
28112
|
-
"
|
|
28113
|
-
"showVoiceSearch": _this16.$props.showVoiceSearch
|
|
26341
|
+
"id": _this15.$props.componentId + "-input",
|
|
26342
|
+
"showIcon": _this15.$props.showIcon,
|
|
26343
|
+
"showClear": _this15.$props.showClear,
|
|
26344
|
+
"iconPosition": _this15.$props.iconPosition,
|
|
26345
|
+
"ref": _this15.$props.innerRef,
|
|
26346
|
+
"class": getClassName$3(_this15.$props.innerClass, 'input'),
|
|
26347
|
+
"placeholder": _this15.$props.placeholder,
|
|
26348
|
+
"autoFocus": _this15.$props.autoFocus,
|
|
26349
|
+
"showFocusShortcutsIcon": _this15.$props.showFocusShortcutsIcon,
|
|
26350
|
+
"showVoiceSearch": _this15.$props.showVoiceSearch
|
|
28114
26351
|
}, getInputProps({
|
|
28115
|
-
value:
|
|
26352
|
+
value: _this15.$data.currentValue === null ? '' : _this15.$data.currentValue
|
|
28116
26353
|
}), {
|
|
28117
|
-
"themePreset":
|
|
26354
|
+
"themePreset": _this15.themePreset,
|
|
28118
26355
|
"autocomplete": "off"
|
|
28119
|
-
}), null), !expandSuggestionsContainer && renderSuggestionsDropdown()];
|
|
28120
|
-
}
|
|
28121
|
-
}), vue.createVNode(Actions, null, {
|
|
28122
|
-
"default": function _default() {
|
|
28123
|
-
return [_this16.renderRightIcons(), _this16.renderInputAddonAfter(), _this16.renderAskButtonElement(), _this16.renderEnterButtonElement()];
|
|
26356
|
+
}), null), _this15.renderIcons(), !expandSuggestionsContainer && renderSuggestionsDropdown()];
|
|
28124
26357
|
}
|
|
28125
|
-
})];
|
|
26358
|
+
}), _this15.renderInputAddonAfter(), _this15.renderAskButtonElement(), _this15.renderEnterButtonElement()];
|
|
28126
26359
|
}
|
|
28127
|
-
}), expandSuggestionsContainer && renderSuggestionsDropdown(),
|
|
26360
|
+
}), expandSuggestionsContainer && renderSuggestionsDropdown(), _this15.renderTags()]);
|
|
28128
26361
|
}
|
|
28129
26362
|
}) : vue.createVNode("div", {
|
|
28130
26363
|
"class": suggestionsContainer
|
|
28131
26364
|
}, [vue.createVNode(InputGroup, {
|
|
28132
|
-
"searchBox": true,
|
|
28133
26365
|
"ref": _inputGroupRef
|
|
28134
26366
|
}, {
|
|
28135
26367
|
"default": function _default() {
|
|
28136
|
-
return [vue.createVNode(
|
|
28137
|
-
"default": function _default() {
|
|
28138
|
-
return [_this16.renderInputAddonBefore(), _this16.renderLeftIcons()];
|
|
28139
|
-
}
|
|
28140
|
-
}), vue.createVNode(InputWrapper, null, {
|
|
26368
|
+
return [_this15.renderInputAddonBefore(), vue.createVNode(InputWrapper, null, {
|
|
28141
26369
|
"default": function _default() {
|
|
28142
26370
|
return [vue.createVNode(TextArea, vue.mergeProps(babelHelperVueTransformOn({
|
|
28143
26371
|
blur: function blur(e) {
|
|
28144
|
-
|
|
26372
|
+
_this15.$emit('blur', e, _this15.triggerQuery);
|
|
28145
26373
|
},
|
|
28146
26374
|
keypress: function keypress(e) {
|
|
28147
|
-
|
|
28148
|
-
|
|
26375
|
+
_this15.$emit('keyPress', e, _this15.triggerQuery);
|
|
26376
|
+
_this15.$emit('key-press', e, _this15.triggerQuery);
|
|
28149
26377
|
},
|
|
28150
|
-
input:
|
|
26378
|
+
input: _this15.onInputChange,
|
|
28151
26379
|
focus: function focus(e) {
|
|
28152
|
-
|
|
26380
|
+
_this15.$emit('focus', e, _this15.triggerQuery);
|
|
28153
26381
|
},
|
|
28154
|
-
keydown:
|
|
26382
|
+
keydown: _this15.handleKeyDown,
|
|
28155
26383
|
keyup: function keyup(e) {
|
|
28156
|
-
|
|
28157
|
-
|
|
26384
|
+
_this15.$emit('keyUp', e, _this15.triggerQuery);
|
|
26385
|
+
_this15.$emit('key-up', e, _this15.triggerQuery);
|
|
28158
26386
|
}
|
|
28159
26387
|
}), {
|
|
28160
|
-
"class": getClassName$3(
|
|
28161
|
-
"placeholder":
|
|
28162
|
-
"autofocus":
|
|
28163
|
-
"value":
|
|
28164
|
-
"iconPosition":
|
|
28165
|
-
"showIcon":
|
|
28166
|
-
"showClear":
|
|
28167
|
-
"ref":
|
|
28168
|
-
"themePreset":
|
|
28169
|
-
}), null)];
|
|
28170
|
-
}
|
|
28171
|
-
}), vue.createVNode(Actions, null, {
|
|
28172
|
-
"default": function _default() {
|
|
28173
|
-
return [_this16.renderRightIcons(), _this16.renderInputAddonAfter(), _this16.renderEnterButtonElement()];
|
|
26388
|
+
"class": getClassName$3(_this15.$props.innerClass, 'input') || '',
|
|
26389
|
+
"placeholder": _this15.$props.placeholder,
|
|
26390
|
+
"autofocus": _this15.$props.autoFocus,
|
|
26391
|
+
"value": _this15.$data.currentValue ? _this15.$data.currentValue : '',
|
|
26392
|
+
"iconPosition": _this15.$props.iconPosition,
|
|
26393
|
+
"showIcon": _this15.$props.showIcon,
|
|
26394
|
+
"showClear": _this15.$props.showClear,
|
|
26395
|
+
"ref": _this15.$props.innerRef,
|
|
26396
|
+
"themePreset": _this15.themePreset
|
|
26397
|
+
}), null), _this15.renderIcons()];
|
|
28174
26398
|
}
|
|
28175
|
-
})];
|
|
26399
|
+
}), _this15.renderInputAddonAfter(), _this15.renderEnterButtonElement()];
|
|
28176
26400
|
}
|
|
28177
26401
|
})])];
|
|
28178
26402
|
}
|
|
@@ -28857,7 +27081,7 @@
|
|
|
28857
27081
|
// Add componentType for SSR
|
|
28858
27082
|
AIConnected.componentType = constants_1$1.AIAnswer;
|
|
28859
27083
|
|
|
28860
|
-
var _templateObject$
|
|
27084
|
+
var _templateObject$l, _templateObject2$9, _templateObject3$7;
|
|
28861
27085
|
var item = {
|
|
28862
27086
|
width: '15px',
|
|
28863
27087
|
height: '15px',
|
|
@@ -28870,7 +27094,7 @@
|
|
|
28870
27094
|
theme = _ref$theme === void 0 ? {} : _ref$theme;
|
|
28871
27095
|
return "\n\t" + vh + ";\n\n\t&:focus {\n\t\t+ label {\n\t\t\t&::before {\n\t\t\t\tbox-shadow: 0 0 0 2px " + curriedLighten(0.4, theme.colors.primaryColor) + ";\n\t\t\t}\n\t\t}\n\t}\n\n\t&:hover {\n\t\t+ label {\n\t\t\t&::before {\n\t\t\t\tborder-color: " + theme.colors.primaryColor + ";\n\t\t\t}\n\t\t}\n\t}\n\n\t&:active {\n\t\t+ label {\n\t\t\t&::before {\n\t\t\t\ttransition-duration: 0;\n\t\t\t}\n\t\t}\n\t}\n\n\t+ label {\n\t\tposition: relative;\n\t\tuser-select: none;\n\t\tdisplay: flex;\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\talign-items: center;\n\t\tcursor: pointer;\n\n\t\t&::before {\n\t\t\tbackground-color: #fff;\n\t\t\tborder: 1px solid " + (theme.colors.borderColor || curriedLighten(0.1, theme.colors.textColor)) + ";\n\t\t\tbox-sizing: content-box;\n\t\t\tcontent: '';\n\t\t\tcolor: " + theme.colors.primaryColor + ";\n\t\t\tmargin-right: calc(" + item.width + " * 0.5);\n\t\t\ttop: 50%;\n\t\t\tleft: 0;\n\t\t\twidth: " + item.width + ";\n\t\t\theight: " + item.height + ";\n\t\t\tdisplay: inline-block;\n\t\t\tvertical-align: middle;\n\t\t}\n\n\t\t&::after {\n\t\t\tbox-sizing: content-box;\n\t\t\tcontent: '';\n\t\t\tbackground-color: " + theme.colors.primaryColor + ";\n\t\t\tposition: absolute;\n\t\t\ttop: 50%;\n\t\t\tleft: calc(1px + " + item.scale + " / 2);\n\t\t\twidth: calc(" + item.width + " - " + item.scale + ");\n\t\t\theight: calc(" + item.height + " - " + item.scale + ");\n\t\t\tmargin-top: calc(" + item.height + " / -2 - " + item.scale + " / -2);\n\t\t\ttransform: scale(0);\n\t\t\ttransform-origin: 50%;\n\t\t\ttransition: transform 200ms ease-out;\n\t\t}\n\t}\n";
|
|
28872
27096
|
};
|
|
28873
|
-
var Radio = styled('input')(_templateObject$
|
|
27097
|
+
var Radio = styled('input')(_templateObject$l || (_templateObject$l = _taggedTemplateLiteralLoose(["\n\t", ";\n\t", ";\n\n\t+ label {\n\t\t&::before,\n\t\t&::after {\n\t\t\tborder-radius: 50%;\n\t\t}\n\t}\n\n\t&:checked {\n\t\t&:active,\n\t\t&:focus {\n\t\t\t+ label {\n\t\t\t\tcolor: ", ";\n\n\t\t\t\t&::before {\n\t\t\t\t\tanimation: none;\n\t\t\t\t\tfilter: none;\n\t\t\t\t\ttransition: none;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t+ label {\n\t\t\t&::before {\n\t\t\t\tanimation: none;\n\t\t\t\tbackground-color: #fff;\n\t\t\t\tborder-color: ", ";\n\t\t}\n\n\t\t&::after {\n\t\t\ttransform: scale(1);\n\t\t}\n\t}\n"])), formItem, function (props) {
|
|
28874
27098
|
return props.show ? null : hideInputControl;
|
|
28875
27099
|
}, function (_ref2) {
|
|
28876
27100
|
var theme = _ref2.theme;
|
|
@@ -28879,7 +27103,7 @@
|
|
|
28879
27103
|
var theme = _ref3.theme;
|
|
28880
27104
|
return theme.colors.primaryColor;
|
|
28881
27105
|
});
|
|
28882
|
-
var Checkbox = styled('input')(_templateObject2$
|
|
27106
|
+
var Checkbox = styled('input')(_templateObject2$9 || (_templateObject2$9 = _taggedTemplateLiteralLoose(["\n\t", ";\n\t", ";\n\n\t+ label {\n\t\t&::before,\n\t\t&::after {\n\t\t\tborder-radius: 0;\n\t\t}\n\n\t\t&::after {\n\t\t\tbackground-color: transparent;\n\t\t\ttop: 50%;\n\t\t\tleft: calc(1px + ", " / 5);\n\t\t\twidth: calc(", " / 2);\n\t\t\theight: calc(", " / 5);\n\t\t\tmargin-top: calc(", " / -2 / 2 * 0.8);\n\t\t\tborder-style: solid;\n\t\t\tborder-color: ", ";\n\t\t\tborder-width: 0 0 2px 2px;\n\t\t\tborder-radius: 0;\n\t\t\tborder-image: none;\n\t\t\ttransform: rotate(-45deg) scale(0);\n\t\t\ttransition: none;\n\t\t}\n\t}\n\n\t&:checked {\n\t\t+ label {\n\t\t\t&::before {\n\t\t\t\tborder-color: ", ";\n\t\t\t}\n\n\t\t\t&::after {\n\t\t\t\tcontent: '';\n\t\t\t\ttransform: rotate(-45deg) scale(1);\n\t\t\t\ttransition: transform 200ms ease-out;\n\t\t\t}\n\t\t}\n\t}\n"])), formItem, function (props) {
|
|
28883
27107
|
return props.show ? null : hideInputControl;
|
|
28884
27108
|
}, item.width, item.width, item.width, item.height, function (_ref4) {
|
|
28885
27109
|
var theme = _ref4.theme;
|
|
@@ -30868,9 +29092,9 @@
|
|
|
30868
29092
|
});
|
|
30869
29093
|
var types$1 = unwrapExports(types_1);
|
|
30870
29094
|
|
|
30871
|
-
var _templateObject$
|
|
30872
|
-
var HierarchicalMenuList = styled('ul')(_templateObject$
|
|
30873
|
-
var HierarchicalMenuListItem = styled('li')(_templateObject2$
|
|
29095
|
+
var _templateObject$m, _templateObject2$a;
|
|
29096
|
+
var HierarchicalMenuList = styled('ul')(_templateObject$m || (_templateObject$m = _taggedTemplateLiteralLoose(["\n\tlist-style: none;\n\tpadding: 0;\n\tmargin: 0;\n\tmax-height: 0;\n\toverflow: hidden;\n\n\t&.--open {\n\t\tmax-height: 100%;\n\t}\n"])));
|
|
29097
|
+
var HierarchicalMenuListItem = styled('li')(_templateObject2$a || (_templateObject2$a = _taggedTemplateLiteralLoose(["\n\tfont-weight: 400;\n\tline-height: 1.5;\n\tbox-sizing: border-box;\n\n\ta {\n\t\tcolor: #424242;\n\t\ttext-decoration: none;\n\t\tgap: 5px;\n\t\t.--leaf-icon,\n\t\t.--folder-icon {\n\t\t\tline-height: 15px;\n\t\t\tsvg {\n\t\t\t\theight: 15px;\n\t\t\t}\n\t\t}\n\n\t\tinput {\n\t\t\tmargin: 0;\n\t\t\tcursor: pointer;\n\t\t}\n\t}\n\n\t.--switcher-icon {\n\t\ttransition: all 0.2s ease-in;\n\t\tmargin-right: 2px;\n\t}\n\t.--list-child {\n\t\tpadding-left: 1rem;\n\t\tposition: relative;\n\t\t&:before {\n\t\t\theight: 100%;\n\t\t\tcontent: '';\n\t\t\tposition: absolute;\n\t\t\tborder-left: 1px solid #787878;\n\t\t\twidth: 0;\n\t\t\tleft: 19px;\n\t\t\t", ";\n\t\t}\n\n\t\t&.--show-switcher-icon {\n\t\t\tpadding-left: 36px;\n\t\t}\n\t}\n\t.--list-item-label {\n\t\tline-height: 100%;\n\t}\n\t.--list-item-count {\n\t\tmargin-left: 10px;\n\t\tpadding: 0.1rem 0.4rem;\n\t\tfont-size: 0.8rem;\n\t\tcolor: #424242;\n\t\tbackground-color: #dee1e6;\n\t\tborder-radius: 8px;\n\t}\n\t&.-selected-item {\n\t\tfont-weight: 700 !important;\n\t}\n\t&.-expanded-item {\n\t\t& > a {\n\t\t\t& div > .--switcher-icon {\n\t\t\t\ttransform: rotate(90deg);\n\t\t\t}\n\t\t}\n\t}\n\t.--list-item-label-count-wrapper {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\t&:hover {\n\t\t\t.--list-item-count,\n\t\t\t.--list-item-label {\n\t\t\t\tfont-weight: 700;\n\t\t\t}\n\t\t}\n\t}\n"])), function (props) {
|
|
30874
29098
|
return !props.showLine && "\n\t\t\t\t\tdisplay: none;\n\t\t\t\t";
|
|
30875
29099
|
});
|
|
30876
29100
|
|
|
@@ -31631,26 +29855,26 @@
|
|
|
31631
29855
|
// Add componentType for SSR
|
|
31632
29856
|
TreeListConnected.componentType = constants_1$1.treeList;
|
|
31633
29857
|
|
|
31634
|
-
var _templateObject$
|
|
29858
|
+
var _templateObject$n, _templateObject2$b;
|
|
31635
29859
|
var small = "\n\tmin-height: 0;\n\theight: 30px;\n\tborder: 0;\n\tbox-shadow: rgba(0, 0, 0, 0.3) 0px 1px 4px -1px;\n\tborder-radius: 2px;\n";
|
|
31636
29860
|
var dark$2 = function dark(_ref) {
|
|
31637
29861
|
var theme = _ref.theme;
|
|
31638
29862
|
return "\n\tbackground-color: " + (theme.colors ? theme.colors.backgroundColor : '') + ";\n\tborder-color: " + (theme.colors ? theme.colors.borderColor : '') + ";\n\tcolor: " + (theme.colors ? theme.colors.textColor : '') + ";\n\n\t&:hover,\n\t&:focus {\n\t\tbackground-color: " + (theme.colors ? theme.colors.backgroundColor : '') + ";\n\t}\n";
|
|
31639
29863
|
};
|
|
31640
|
-
var Select = styled('button')(_templateObject$
|
|
29864
|
+
var Select = styled('button')(_templateObject$n || (_templateObject$n = _taggedTemplateLiteralLoose(["\n\twidth: 100%;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: space-between;\n\tmin-height: 42px;\n\tborder-radius: 0;\n\toutline: none;\n\tpadding: 5px 12px;\n\tfont-size: 0.9rem;\n\tline-height: 1.2rem;\n\tbackground-color: #fff;\n\tborder: 1px solid #ccc;\n\tcolor: #424242;\n\tcursor: pointer;\n\tuser-select: none;\n\ttransition: all 0.3s ease;\n\n\t", ";\n\n\t& > div {\n\t\twidth: calc(100% - 24px);\n\t\twhite-space: nowrap;\n\t\toverflow: hidden;\n\t\ttext-overflow: ellipsis;\n\t\ttext-align: left;\n\t}\n\n\t&:hover,\n\t&:focus {\n\t\tbackground-color: #fcfcfc;\n\t}\n\n\t", ";\n"])), function (props) {
|
|
31641
29865
|
return props.small ? small : null;
|
|
31642
29866
|
}, function (_ref2) {
|
|
31643
29867
|
var themePreset = _ref2.themePreset;
|
|
31644
29868
|
return themePreset === 'dark' && dark$2;
|
|
31645
29869
|
});
|
|
31646
|
-
var Tick = styled('span')(_templateObject2$
|
|
29870
|
+
var Tick = styled('span')(_templateObject2$b || (_templateObject2$b = _taggedTemplateLiteralLoose(["\n\twidth: 16px;\n\theight: 16px;\n\tdisplay: inline-block;\n\tposition: relative;\n\tuser-select: none;\n\talign-items: center;\n\n\t&::after {\n\t\tbox-sizing: content-box;\n\t\tcontent: '';\n\t\tposition: absolute;\n\t\tbackground-color: transparent;\n\t\ttop: 50%;\n\t\tleft: 0;\n\t\twidth: 8px;\n\t\theight: 4px;\n\t\tmargin-top: -4px;\n\t\tborder-style: solid;\n\t\tborder-color: ", ";\n\t\tborder-width: 0 0 2px 2px;\n\t\tborder-radius: 0;\n\t\tborder-image: none;\n\t\ttransform: rotate(-45deg) scale(1);\n\t\ttransition: all 200ms ease-out;\n\t}\n"])), function (_ref3) {
|
|
31647
29871
|
var theme = _ref3.theme;
|
|
31648
29872
|
return theme.colors.primaryColor;
|
|
31649
29873
|
});
|
|
31650
29874
|
|
|
31651
|
-
var _templateObject$
|
|
29875
|
+
var _templateObject$o;
|
|
31652
29876
|
var open = "\n\ttop: 0.55em;\n\ttransform: rotate(-45deg);\n";
|
|
31653
|
-
var Chevron = styled('span')(_templateObject$
|
|
29877
|
+
var Chevron = styled('span')(_templateObject$o || (_templateObject$o = _taggedTemplateLiteralLoose(["\n\t&::before {\n\t\tcontent: '';\n\t\tborder-style: solid;\n\t\tborder-width: 0.15em 0.15em 0 0;\n\t\tdisplay: inline-block;\n\t\theight: 0.45em;\n\t\tposition: relative;\n\t\ttop: 0.35em;\n\t\tleft: 0;\n\t\ttransform: rotate(135deg);\n\t\tvertical-align: top;\n\t\twidth: 0.45em;\n\n\t\t", ";\n\t}\n"])), function (props) {
|
|
31654
29878
|
return props.open ? open : null;
|
|
31655
29879
|
});
|
|
31656
29880
|
|
|
@@ -33364,8 +31588,8 @@
|
|
|
33364
31588
|
}
|
|
33365
31589
|
});
|
|
33366
31590
|
|
|
33367
|
-
var _templateObject$
|
|
33368
|
-
var Slider = styled('div')(_templateObject$
|
|
31591
|
+
var _templateObject$p;
|
|
31592
|
+
var Slider = styled('div')(_templateObject$p || (_templateObject$p = _taggedTemplateLiteralLoose(["\n\tmargin-top: 30px;\n\tpadding: 10px;\n\n\t/* component style */\n\t.vue-slider-disabled {\n\t\topacity: 0.5;\n\t\tcursor: not-allowed;\n\t}\n\n\t/* rail style */\n\t.vue-slider-rail {\n\t\tbackground-color: #ccc;\n\t\tborder-radius: 15px;\n\t\theight: 4px;\n\t}\n\n\t/* process style */\n\t.vue-slider-process {\n\t\tbackground-color: #0b6aff;\n\t\tborder-radius: 15px;\n\t}\n\n\t/* mark style */\n\t.vue-slider-mark {\n\t\tz-index: 4;\n\t}\n\n\t.vue-slider-mark:first-child .vue-slider-mark-step,\n\t.vue-slider-mark:last-child .vue-slider-mark-step {\n\t\tdisplay: none;\n\t}\n\n\t.vue-slider-mark-step {\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\tborder-radius: 50%;\n\t\tbackground-color: rgba(0, 0, 0, 0.16);\n\t}\n\n\t.vue-slider-mark-label {\n\t\tfont-size: 14px;\n\t\twhite-space: nowrap;\n\t}\n\n\t/* dot style */\n\t.vue-slider-dot {\n\t\tz-index: 2;\n\t}\n\n\t.vue-slider-dot-handle {\n\t\tcursor: pointer;\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\tborder-radius: 50%;\n\t\tbackground-color: #fff;\n\t\tbox-sizing: border-box;\n\t\tborder: 1px solid #9a9a9a;\n\t\tz-index: 2;\n\t\tbox-shadow: 0.5px 0.5px 2px 1px rgb(0 0 0 / 32%);\n\t}\n\n\t.vue-slider-dot-handle-disabled {\n\t\tcursor: not-allowed;\n\t\tbackground-color: #ccc;\n\t}\n\n\t.vue-slider-dot-tooltip-inner {\n\t\tfont-size: 14px;\n\t\twhite-space: nowrap;\n\t\tpadding: 2px 5px;\n\t\tmin-width: 20px;\n\t\ttext-align: center;\n\t\tcolor: #fff;\n\t\tborder-radius: 5px;\n\t\tborder: 1px solid #3498db;\n\t\tbackground-color: #3498db;\n\t\tbox-sizing: content-box;\n\t}\n\n\t.vue-slider-dot-tooltip-inner::after {\n\t\tcontent: '';\n\t\tposition: absolute;\n\t}\n\n\t.vue-slider-dot-tooltip-inner-top::after {\n\t\ttop: 100%;\n\t\tleft: 50%;\n\t\ttransform: translate(-50%, 0);\n\t\theight: 0;\n\t\twidth: 0;\n\t\tborder-color: transparent;\n\t\tborder-style: solid;\n\t\tborder-width: 5px;\n\t\tborder-top-color: inherit;\n\t}\n\n\t.vue-slider-dot-tooltip-inner-bottom::after {\n\t\tbottom: 100%;\n\t\tleft: 50%;\n\t\ttransform: translate(-50%, 0);\n\t\theight: 0;\n\t\twidth: 0;\n\t\tborder-color: transparent;\n\t\tborder-style: solid;\n\t\tborder-width: 5px;\n\t\tborder-bottom-color: inherit;\n\t}\n\n\t.vue-slider-dot-tooltip-inner-left::after {\n\t\tleft: 100%;\n\t\ttop: 50%;\n\t\ttransform: translate(0, -50%);\n\t\theight: 0;\n\t\twidth: 0;\n\t\tborder-color: transparent;\n\t\tborder-style: solid;\n\t\tborder-width: 5px;\n\t\tborder-left-color: inherit;\n\t}\n\n\t.vue-slider-dot-tooltip-inner-right::after {\n\t\tright: 100%;\n\t\ttop: 50%;\n\t\ttransform: translate(0, -50%);\n\t\theight: 0;\n\t\twidth: 0;\n\t\tborder-color: transparent;\n\t\tborder-style: solid;\n\t\tborder-width: 5px;\n\t\tborder-right-color: inherit;\n\t}\n\n\t.vue-slider-dot-tooltip-wrapper {\n\t\topacity: 0;\n\t\ttransition: all 0.3s;\n\t}\n\t.vue-slider-dot-tooltip-wrapper-show {\n\t\topacity: 1;\n\t}\n\n\t.label-container {\n\t\tmargin: 10px 0;\n\t\twidth: 100%;\n\t}\n\n\t.range-label-right {\n\t\tfloat: right;\n\t}\n"])));
|
|
33369
31593
|
|
|
33370
31594
|
var global$1 = typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {};
|
|
33371
31595
|
|
|
@@ -34485,12 +32709,12 @@
|
|
|
34485
32709
|
// Add componentType for SSR
|
|
34486
32710
|
RangeConnected$3.componentType = constants_1$1.rangeSlider;
|
|
34487
32711
|
|
|
34488
|
-
var _templateObject$
|
|
32712
|
+
var _templateObject$q;
|
|
34489
32713
|
var alert = function alert(_ref) {
|
|
34490
32714
|
var theme = _ref.theme;
|
|
34491
32715
|
return "\n\tcolor: " + theme.colors.alertColor + ";\n";
|
|
34492
32716
|
};
|
|
34493
|
-
var Content = styled('div')(_templateObject$
|
|
32717
|
+
var Content = styled('div')(_templateObject$q || (_templateObject$q = _taggedTemplateLiteralLoose(["\n\t", ";\n\tfont-size: 13px;\n\tmargin: 8px;\n"])), function (props) {
|
|
34494
32718
|
return props.alert && alert;
|
|
34495
32719
|
});
|
|
34496
32720
|
|
|
@@ -40314,9 +38538,9 @@
|
|
|
40314
38538
|
}
|
|
40315
38539
|
};
|
|
40316
38540
|
|
|
40317
|
-
var _templateObject$
|
|
40318
|
-
var MapPin = styled('div')(_templateObject$
|
|
40319
|
-
var MapPinArrow = styled('div')(_templateObject2$
|
|
38541
|
+
var _templateObject$r, _templateObject2$c, _templateObject3$8;
|
|
38542
|
+
var MapPin = styled('div')(_templateObject$r || (_templateObject$r = _taggedTemplateLiteralLoose(["\n\theight: 24px;\n\twidth: auto;\n\tbackground-color: #fff;\n\tborder-radius: 2px;\n\tcolor: #222;\n\tbox-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.15);\n\tpadding: 3px 6px;\n\tfont-size: 15px;\n"])));
|
|
38543
|
+
var MapPinArrow = styled('div')(_templateObject2$c || (_templateObject2$c = _taggedTemplateLiteralLoose(["\n\tborder-color: rgba(0, 0, 0, 0.2);\n\tborder-style: solid;\n\tborder-width: 0 1px 1px 0;\n\tmargin-left: -6px;\n\tbackground-color: #fff;\n\tmargin-top: -6px;\n\twidth: 12px;\n\theight: 12px;\n\t-webkit-transform: rotate(45deg);\n\t-ms-transform: rotate(45deg);\n\ttransform: rotate(45deg);\n"])));
|
|
40320
38544
|
var mapPinWrapper = css(_templateObject3$8 || (_templateObject3$8 = _taggedTemplateLiteralLoose(["\n\t&:hover,\n\t&:focus {\n\t\tz-index: 200;\n\t}\n"])));
|
|
40321
38545
|
|
|
40322
38546
|
var recordResultClick$3 = lib_5.recordResultClick;
|
|
@@ -40645,7 +38869,7 @@
|
|
|
40645
38869
|
}
|
|
40646
38870
|
};
|
|
40647
38871
|
|
|
40648
|
-
var _templateObject$
|
|
38872
|
+
var _templateObject$s;
|
|
40649
38873
|
var ReactiveGoogleMap = {
|
|
40650
38874
|
name: 'ReactiveGoogleMap',
|
|
40651
38875
|
props: {
|
|
@@ -40720,7 +38944,7 @@
|
|
|
40720
38944
|
"style": {
|
|
40721
38945
|
height: '100%'
|
|
40722
38946
|
},
|
|
40723
|
-
"class": css(_templateObject$
|
|
38947
|
+
"class": css(_templateObject$s || (_templateObject$s = _taggedTemplateLiteralLoose(["\n\t\t\t\t\t\t\theight: 100%;\n\t\t\t\t\t\t"]))),
|
|
40724
38948
|
"options": {
|
|
40725
38949
|
zoomControl: true
|
|
40726
38950
|
},
|
|
@@ -40979,7 +39203,7 @@
|
|
|
40979
39203
|
httpEquiv: "http-equiv"
|
|
40980
39204
|
};
|
|
40981
39205
|
var escapeRE = /["'&<>]/;
|
|
40982
|
-
function escapeHtml$
|
|
39206
|
+
function escapeHtml$1(string) {
|
|
40983
39207
|
var str = "" + string;
|
|
40984
39208
|
var match = escapeRE.exec(str);
|
|
40985
39209
|
if (!match) {
|
|
@@ -41049,7 +39273,7 @@
|
|
|
41049
39273
|
if (isBooleanAttr(attrKey)) {
|
|
41050
39274
|
return includeBooleanAttr(value) ? " " + attrKey : "";
|
|
41051
39275
|
} else if (isSSRSafeAttrName(attrKey)) {
|
|
41052
|
-
return value === "" ? " " + attrKey : " " + attrKey + "=\"" + escapeHtml$
|
|
39276
|
+
return value === "" ? " " + attrKey : " " + attrKey + "=\"" + escapeHtml$1(value) + "\"";
|
|
41053
39277
|
} else {
|
|
41054
39278
|
console.warn("[@vue/server-renderer] Skipped rendering unsafe attribute name: " + attrKey);
|
|
41055
39279
|
return "";
|
|
@@ -41063,17 +39287,17 @@
|
|
|
41063
39287
|
return type === "string" || type === "number" || type === "boolean";
|
|
41064
39288
|
}
|
|
41065
39289
|
function ssrRenderClass(raw) {
|
|
41066
|
-
return escapeHtml$
|
|
39290
|
+
return escapeHtml$1(normalizeClass(raw));
|
|
41067
39291
|
}
|
|
41068
39292
|
function ssrRenderStyle(raw) {
|
|
41069
39293
|
if (!raw) {
|
|
41070
39294
|
return "";
|
|
41071
39295
|
}
|
|
41072
39296
|
if (isString(raw)) {
|
|
41073
|
-
return escapeHtml$
|
|
39297
|
+
return escapeHtml$1(raw);
|
|
41074
39298
|
}
|
|
41075
39299
|
var styles = normalizeStyle(raw);
|
|
41076
|
-
return escapeHtml$
|
|
39300
|
+
return escapeHtml$1(stringifyStyle(styles));
|
|
41077
39301
|
}
|
|
41078
39302
|
function ssrRenderTeleport(parentPush, contentRenderFn, target, disabled, parentComponent) {
|
|
41079
39303
|
parentPush("<!--teleport start-->");
|
|
@@ -41236,7 +39460,7 @@
|
|
|
41236
39460
|
children = vnode.children;
|
|
41237
39461
|
switch (type) {
|
|
41238
39462
|
case vue.Text:
|
|
41239
|
-
push(escapeHtml$
|
|
39463
|
+
push(escapeHtml$1(children));
|
|
41240
39464
|
break;
|
|
41241
39465
|
case vue.Comment:
|
|
41242
39466
|
push(children ? "<!--" + escapeHtmlComment(children) + "-->" : "<!---->");
|
|
@@ -41309,15 +39533,15 @@
|
|
|
41309
39533
|
push(props.innerHTML);
|
|
41310
39534
|
} else if (props.textContent) {
|
|
41311
39535
|
hasChildrenOverride = true;
|
|
41312
|
-
push(escapeHtml$
|
|
39536
|
+
push(escapeHtml$1(props.textContent));
|
|
41313
39537
|
} else if (tag === "textarea" && props.value) {
|
|
41314
39538
|
hasChildrenOverride = true;
|
|
41315
|
-
push(escapeHtml$
|
|
39539
|
+
push(escapeHtml$1(props.value));
|
|
41316
39540
|
}
|
|
41317
39541
|
}
|
|
41318
39542
|
if (!hasChildrenOverride) {
|
|
41319
39543
|
if (shapeFlag & 8) {
|
|
41320
|
-
push(escapeHtml$
|
|
39544
|
+
push(escapeHtml$1(children));
|
|
41321
39545
|
} else if (shapeFlag & 16) {
|
|
41322
39546
|
renderVNodeChildren(push, children, parentComponent, slotScopeId);
|
|
41323
39547
|
}
|
|
@@ -41824,7 +40048,7 @@
|
|
|
41824
40048
|
}, queryString, renderFunction);
|
|
41825
40049
|
}
|
|
41826
40050
|
|
|
41827
|
-
var version = "3.0.0-rc.
|
|
40051
|
+
var version = "3.0.0-rc.9";
|
|
41828
40052
|
|
|
41829
40053
|
var components = [RLConnected, ResultCard, ResultList, ReactiveBase, SBConnected, ListConnected, ListConnected$1, RangeConnected$1, RangeConnected$2, RangeConnected$3, RangeConnected, RcConnected, RcConnected$1, RcConnected$2, TBConnected, ListConnected$2, ListConnected$3, StateProviderConnected, RangeConnected$4, TreeListConnected, AIConnected];
|
|
41830
40054
|
function install$1 (Vue) {
|