@appbaseio/reactivesearch-vue 3.0.0-alpha.2 → 3.0.0-alpha.4
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 +1551 -617
- 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/{ComponentWrapper-611cf7f9.js → ComponentWrapper-2dc930e1.js} +20 -19
- package/dist/cjs/{DropDown-dc184468.js → DropDown-7bd56543.js} +3 -4
- package/dist/cjs/DynamicRangeSlider.js +50 -49
- package/dist/cjs/MultiDropdownList.js +33 -33
- package/dist/cjs/MultiList.js +29 -30
- package/dist/cjs/MultiRange.js +17 -17
- package/dist/cjs/{Pagination-b5ddc906.js → Pagination-4ffc67cd.js} +3 -4
- package/dist/cjs/{PreferencesConsumer-22d1b49f.js → PreferencesConsumer-2c69ac61.js} +1 -1
- package/dist/cjs/RangeInput.js +6 -7
- package/dist/cjs/RangeSlider.js +14 -14
- package/dist/cjs/ReactiveBase.js +32 -13
- package/dist/cjs/{ReactiveComponent-0a6b819b.js → ReactiveComponent-4435adfa.js} +84 -81
- package/dist/cjs/ReactiveComponent.js +7 -7
- package/dist/cjs/ReactiveGoogleMap.js +33 -34
- package/dist/cjs/ReactiveList.js +37 -27
- package/dist/cjs/SelectedFilters.js +7 -8
- package/dist/cjs/SingleDropdownList.js +23 -24
- package/dist/cjs/SingleList.js +20 -21
- package/dist/cjs/SingleRange.js +14 -14
- package/dist/cjs/StateProvider.js +4 -5
- package/dist/cjs/ToggleButton.js +17 -18
- package/dist/cjs/{index-d8d8f291.js → index-1481798c.js} +4 -7
- package/dist/cjs/index.js +11 -16
- package/dist/cjs/initReactivesearch.js +10 -464
- package/dist/cjs/install.js +8 -7
- package/dist/cjs/{utils-83fd01e9.js → utils-36b1b880.js} +2 -5
- package/dist/cjs/version.js +1 -1
- package/dist/es/{ComponentWrapper-3dfe6931.js → ComponentWrapper-3a215eed.js} +9 -7
- package/dist/es/DynamicRangeSlider.js +32 -30
- package/dist/es/MultiDropdownList.js +16 -15
- package/dist/es/MultiList.js +15 -15
- package/dist/es/MultiRange.js +7 -6
- package/dist/es/RangeInput.js +1 -1
- package/dist/es/RangeSlider.js +4 -3
- package/dist/es/ReactiveBase.js +27 -8
- package/dist/es/{ReactiveComponent-8fb219ec.js → ReactiveComponent-04d94e01.js} +38 -34
- package/dist/es/ReactiveComponent.js +2 -2
- package/dist/es/ReactiveGoogleMap.js +11 -11
- package/dist/es/ReactiveList.js +16 -5
- package/dist/es/SingleDropdownList.js +6 -6
- package/dist/es/SingleList.js +6 -6
- package/dist/es/SingleRange.js +4 -3
- package/dist/es/ToggleButton.js +6 -6
- package/dist/es/index.js +6 -11
- package/dist/es/initReactivesearch.js +9 -463
- package/dist/es/install.js +3 -2
- package/dist/es/version.js +1 -1
- package/package.json +2 -2
|
@@ -1010,7 +1010,7 @@
|
|
|
1010
1010
|
return state;
|
|
1011
1011
|
}
|
|
1012
1012
|
});
|
|
1013
|
-
|
|
1013
|
+
unwrapExports(dependencyTreeReducer_1);
|
|
1014
1014
|
|
|
1015
1015
|
var queryReducer_1 = createCommonjsModule(function (module, exports) {
|
|
1016
1016
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -1063,7 +1063,7 @@
|
|
|
1063
1063
|
return state;
|
|
1064
1064
|
}
|
|
1065
1065
|
});
|
|
1066
|
-
|
|
1066
|
+
unwrapExports(queryReducer_1);
|
|
1067
1067
|
|
|
1068
1068
|
var appbaseQueryReducer_1 = createCommonjsModule(function (module, exports) {
|
|
1069
1069
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -1143,7 +1143,7 @@
|
|
|
1143
1143
|
return state;
|
|
1144
1144
|
}
|
|
1145
1145
|
});
|
|
1146
|
-
|
|
1146
|
+
unwrapExports(queryOptionsReducer_1);
|
|
1147
1147
|
|
|
1148
1148
|
var constants$1 = createCommonjsModule(function (module, exports) {
|
|
1149
1149
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -1673,7 +1673,7 @@
|
|
|
1673
1673
|
}
|
|
1674
1674
|
}
|
|
1675
1675
|
});
|
|
1676
|
-
|
|
1676
|
+
unwrapExports(valueReducer_1);
|
|
1677
1677
|
|
|
1678
1678
|
var internalValueReducer = createCommonjsModule(function (module, exports) {
|
|
1679
1679
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -2544,7 +2544,7 @@
|
|
|
2544
2544
|
return state;
|
|
2545
2545
|
}
|
|
2546
2546
|
});
|
|
2547
|
-
|
|
2547
|
+
unwrapExports(compositeAggsReducer_1);
|
|
2548
2548
|
|
|
2549
2549
|
var appliedSettingsReducer_1 = createCommonjsModule(function (module, exports) {
|
|
2550
2550
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -5102,13 +5102,15 @@
|
|
|
5102
5102
|
size = props.size,
|
|
5103
5103
|
sortBy = props.sortBy,
|
|
5104
5104
|
showMissing = props.showMissing,
|
|
5105
|
-
missingLabel = props.missingLabel
|
|
5105
|
+
missingLabel = props.missingLabel,
|
|
5106
|
+
aggregationSize = props.aggregationSize;
|
|
5106
5107
|
clonedQuery.size = 0;
|
|
5107
5108
|
if (typeof dataField === 'string') {
|
|
5108
5109
|
clonedQuery.aggs = _defineProperty({}, dataField, {
|
|
5109
5110
|
terms: _extends({
|
|
5110
5111
|
field: dataField,
|
|
5111
5112
|
size: size,
|
|
5113
|
+
aggregationSize: aggregationSize,
|
|
5112
5114
|
order: getAggsOrder(sortBy || 'count')
|
|
5113
5115
|
}, showMissing ? {
|
|
5114
5116
|
missing: missingLabel
|
|
@@ -5121,6 +5123,7 @@
|
|
|
5121
5123
|
terms: _extends({
|
|
5122
5124
|
field: dataFieldItem,
|
|
5123
5125
|
size: size,
|
|
5126
|
+
aggregationSize: aggregationSize,
|
|
5124
5127
|
order: getAggsOrder(sortBy || 'count')
|
|
5125
5128
|
}, showMissing ? {
|
|
5126
5129
|
missing: missingLabel
|
|
@@ -5994,7 +5997,7 @@
|
|
|
5994
5997
|
excludeFields: props.excludeFields,
|
|
5995
5998
|
size: props.size,
|
|
5996
5999
|
aggregationSize: props.aggregationSize,
|
|
5997
|
-
from: props.from,
|
|
6000
|
+
from: props.from || undefined,
|
|
5998
6001
|
queryFormat: props.queryFormat,
|
|
5999
6002
|
sortBy: props.sortBy,
|
|
6000
6003
|
fieldWeights: getNormalizedField(props.fieldWeights),
|
|
@@ -7532,7 +7535,7 @@
|
|
|
7532
7535
|
dependencyTree = _getState3.dependencyTree,
|
|
7533
7536
|
queryList = _getState3.queryList,
|
|
7534
7537
|
queryOptions = _getState3.queryOptions;
|
|
7535
|
-
var lockTime = config.initialQueriesSyncTime ||
|
|
7538
|
+
var lockTime = config.initialQueriesSyncTime || 100;
|
|
7536
7539
|
var initialTimestamp = config.initialTimestamp;
|
|
7537
7540
|
var queryId = requestId || new Date().getTime();
|
|
7538
7541
|
if (config.queryLockConfig instanceof Object) {
|
|
@@ -7573,16 +7576,20 @@
|
|
|
7573
7576
|
var queryToLog = _extends(_defineProperty({}, component, currentQuery), Object.keys(dependentQueries).reduce(function (acc, q) {
|
|
7574
7577
|
return _extends({}, acc, _defineProperty({}, q, _extends({}, dependentQueries[q], {
|
|
7575
7578
|
execute: false
|
|
7576
|
-
}
|
|
7579
|
+
}, dependentQueries[q].type === constants$1.queryTypes.suggestion ? {
|
|
7580
|
+
type: 'search'
|
|
7581
|
+
} : {})));
|
|
7577
7582
|
}, {}));
|
|
7578
7583
|
var queryType = transform.componentToTypeMap[componentProps && componentProps.componentType];
|
|
7579
7584
|
if ([constants$1.queryTypes.range, constants$1.queryTypes.term].includes(queryType)) {
|
|
7580
7585
|
var _value = currentQuery.value,
|
|
7581
7586
|
rest = _objectWithoutProperties(currentQuery, ['value']);
|
|
7582
7587
|
queryToLog = _extends(_defineProperty({}, component, rest), Object.keys(dependentQueries).reduce(function (acc, q) {
|
|
7583
|
-
return _extends({}, acc, _defineProperty({}, q,
|
|
7588
|
+
return _extends({}, acc, _defineProperty({}, q, _extends({}, dependentQueries[q], {
|
|
7584
7589
|
execute: false
|
|
7585
|
-
}
|
|
7590
|
+
}, dependentQueries[q].type === constants$1.queryTypes.suggestion ? {
|
|
7591
|
+
type: 'search'
|
|
7592
|
+
} : {})));
|
|
7586
7593
|
}, {}));
|
|
7587
7594
|
}
|
|
7588
7595
|
if (mustExecuteMapQuery || !(0, helper.compareQueries)(queryToLog, oldQuery, false)) {
|
|
@@ -8466,6 +8473,337 @@
|
|
|
8466
8473
|
};
|
|
8467
8474
|
var babelHelperVueTransformOn = transformOn;
|
|
8468
8475
|
|
|
8476
|
+
function _regeneratorRuntime() {
|
|
8477
|
+
_regeneratorRuntime = function () {
|
|
8478
|
+
return exports;
|
|
8479
|
+
};
|
|
8480
|
+
var exports = {},
|
|
8481
|
+
Op = Object.prototype,
|
|
8482
|
+
hasOwn = Op.hasOwnProperty,
|
|
8483
|
+
defineProperty = Object.defineProperty || function (obj, key, desc) {
|
|
8484
|
+
obj[key] = desc.value;
|
|
8485
|
+
},
|
|
8486
|
+
$Symbol = "function" == typeof Symbol ? Symbol : {},
|
|
8487
|
+
iteratorSymbol = $Symbol.iterator || "@@iterator",
|
|
8488
|
+
asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
|
|
8489
|
+
toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
|
|
8490
|
+
function define(obj, key, value) {
|
|
8491
|
+
return Object.defineProperty(obj, key, {
|
|
8492
|
+
value: value,
|
|
8493
|
+
enumerable: !0,
|
|
8494
|
+
configurable: !0,
|
|
8495
|
+
writable: !0
|
|
8496
|
+
}), obj[key];
|
|
8497
|
+
}
|
|
8498
|
+
try {
|
|
8499
|
+
define({}, "");
|
|
8500
|
+
} catch (err) {
|
|
8501
|
+
define = function (obj, key, value) {
|
|
8502
|
+
return obj[key] = value;
|
|
8503
|
+
};
|
|
8504
|
+
}
|
|
8505
|
+
function wrap(innerFn, outerFn, self, tryLocsList) {
|
|
8506
|
+
var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
|
|
8507
|
+
generator = Object.create(protoGenerator.prototype),
|
|
8508
|
+
context = new Context(tryLocsList || []);
|
|
8509
|
+
return defineProperty(generator, "_invoke", {
|
|
8510
|
+
value: makeInvokeMethod(innerFn, self, context)
|
|
8511
|
+
}), generator;
|
|
8512
|
+
}
|
|
8513
|
+
function tryCatch(fn, obj, arg) {
|
|
8514
|
+
try {
|
|
8515
|
+
return {
|
|
8516
|
+
type: "normal",
|
|
8517
|
+
arg: fn.call(obj, arg)
|
|
8518
|
+
};
|
|
8519
|
+
} catch (err) {
|
|
8520
|
+
return {
|
|
8521
|
+
type: "throw",
|
|
8522
|
+
arg: err
|
|
8523
|
+
};
|
|
8524
|
+
}
|
|
8525
|
+
}
|
|
8526
|
+
exports.wrap = wrap;
|
|
8527
|
+
var ContinueSentinel = {};
|
|
8528
|
+
function Generator() {}
|
|
8529
|
+
function GeneratorFunction() {}
|
|
8530
|
+
function GeneratorFunctionPrototype() {}
|
|
8531
|
+
var IteratorPrototype = {};
|
|
8532
|
+
define(IteratorPrototype, iteratorSymbol, function () {
|
|
8533
|
+
return this;
|
|
8534
|
+
});
|
|
8535
|
+
var getProto = Object.getPrototypeOf,
|
|
8536
|
+
NativeIteratorPrototype = getProto && getProto(getProto(values([])));
|
|
8537
|
+
NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
|
|
8538
|
+
var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
|
|
8539
|
+
function defineIteratorMethods(prototype) {
|
|
8540
|
+
["next", "throw", "return"].forEach(function (method) {
|
|
8541
|
+
define(prototype, method, function (arg) {
|
|
8542
|
+
return this._invoke(method, arg);
|
|
8543
|
+
});
|
|
8544
|
+
});
|
|
8545
|
+
}
|
|
8546
|
+
function AsyncIterator(generator, PromiseImpl) {
|
|
8547
|
+
function invoke(method, arg, resolve, reject) {
|
|
8548
|
+
var record = tryCatch(generator[method], generator, arg);
|
|
8549
|
+
if ("throw" !== record.type) {
|
|
8550
|
+
var result = record.arg,
|
|
8551
|
+
value = result.value;
|
|
8552
|
+
return value && "object" == typeof value && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
|
|
8553
|
+
invoke("next", value, resolve, reject);
|
|
8554
|
+
}, function (err) {
|
|
8555
|
+
invoke("throw", err, resolve, reject);
|
|
8556
|
+
}) : PromiseImpl.resolve(value).then(function (unwrapped) {
|
|
8557
|
+
result.value = unwrapped, resolve(result);
|
|
8558
|
+
}, function (error) {
|
|
8559
|
+
return invoke("throw", error, resolve, reject);
|
|
8560
|
+
});
|
|
8561
|
+
}
|
|
8562
|
+
reject(record.arg);
|
|
8563
|
+
}
|
|
8564
|
+
var previousPromise;
|
|
8565
|
+
defineProperty(this, "_invoke", {
|
|
8566
|
+
value: function (method, arg) {
|
|
8567
|
+
function callInvokeWithMethodAndArg() {
|
|
8568
|
+
return new PromiseImpl(function (resolve, reject) {
|
|
8569
|
+
invoke(method, arg, resolve, reject);
|
|
8570
|
+
});
|
|
8571
|
+
}
|
|
8572
|
+
return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
|
|
8573
|
+
}
|
|
8574
|
+
});
|
|
8575
|
+
}
|
|
8576
|
+
function makeInvokeMethod(innerFn, self, context) {
|
|
8577
|
+
var state = "suspendedStart";
|
|
8578
|
+
return function (method, arg) {
|
|
8579
|
+
if ("executing" === state) throw new Error("Generator is already running");
|
|
8580
|
+
if ("completed" === state) {
|
|
8581
|
+
if ("throw" === method) throw arg;
|
|
8582
|
+
return doneResult();
|
|
8583
|
+
}
|
|
8584
|
+
for (context.method = method, context.arg = arg;;) {
|
|
8585
|
+
var delegate = context.delegate;
|
|
8586
|
+
if (delegate) {
|
|
8587
|
+
var delegateResult = maybeInvokeDelegate(delegate, context);
|
|
8588
|
+
if (delegateResult) {
|
|
8589
|
+
if (delegateResult === ContinueSentinel) continue;
|
|
8590
|
+
return delegateResult;
|
|
8591
|
+
}
|
|
8592
|
+
}
|
|
8593
|
+
if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
|
|
8594
|
+
if ("suspendedStart" === state) throw state = "completed", context.arg;
|
|
8595
|
+
context.dispatchException(context.arg);
|
|
8596
|
+
} else "return" === context.method && context.abrupt("return", context.arg);
|
|
8597
|
+
state = "executing";
|
|
8598
|
+
var record = tryCatch(innerFn, self, context);
|
|
8599
|
+
if ("normal" === record.type) {
|
|
8600
|
+
if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
|
|
8601
|
+
return {
|
|
8602
|
+
value: record.arg,
|
|
8603
|
+
done: context.done
|
|
8604
|
+
};
|
|
8605
|
+
}
|
|
8606
|
+
"throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
|
|
8607
|
+
}
|
|
8608
|
+
};
|
|
8609
|
+
}
|
|
8610
|
+
function maybeInvokeDelegate(delegate, context) {
|
|
8611
|
+
var methodName = context.method,
|
|
8612
|
+
method = delegate.iterator[methodName];
|
|
8613
|
+
if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel;
|
|
8614
|
+
var record = tryCatch(method, delegate.iterator, context.arg);
|
|
8615
|
+
if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
|
|
8616
|
+
var info = record.arg;
|
|
8617
|
+
return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel);
|
|
8618
|
+
}
|
|
8619
|
+
function pushTryEntry(locs) {
|
|
8620
|
+
var entry = {
|
|
8621
|
+
tryLoc: locs[0]
|
|
8622
|
+
};
|
|
8623
|
+
1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
|
|
8624
|
+
}
|
|
8625
|
+
function resetTryEntry(entry) {
|
|
8626
|
+
var record = entry.completion || {};
|
|
8627
|
+
record.type = "normal", delete record.arg, entry.completion = record;
|
|
8628
|
+
}
|
|
8629
|
+
function Context(tryLocsList) {
|
|
8630
|
+
this.tryEntries = [{
|
|
8631
|
+
tryLoc: "root"
|
|
8632
|
+
}], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
|
|
8633
|
+
}
|
|
8634
|
+
function values(iterable) {
|
|
8635
|
+
if (iterable) {
|
|
8636
|
+
var iteratorMethod = iterable[iteratorSymbol];
|
|
8637
|
+
if (iteratorMethod) return iteratorMethod.call(iterable);
|
|
8638
|
+
if ("function" == typeof iterable.next) return iterable;
|
|
8639
|
+
if (!isNaN(iterable.length)) {
|
|
8640
|
+
var i = -1,
|
|
8641
|
+
next = function next() {
|
|
8642
|
+
for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
|
|
8643
|
+
return next.value = undefined, next.done = !0, next;
|
|
8644
|
+
};
|
|
8645
|
+
return next.next = next;
|
|
8646
|
+
}
|
|
8647
|
+
}
|
|
8648
|
+
return {
|
|
8649
|
+
next: doneResult
|
|
8650
|
+
};
|
|
8651
|
+
}
|
|
8652
|
+
function doneResult() {
|
|
8653
|
+
return {
|
|
8654
|
+
value: undefined,
|
|
8655
|
+
done: !0
|
|
8656
|
+
};
|
|
8657
|
+
}
|
|
8658
|
+
return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", {
|
|
8659
|
+
value: GeneratorFunctionPrototype,
|
|
8660
|
+
configurable: !0
|
|
8661
|
+
}), defineProperty(GeneratorFunctionPrototype, "constructor", {
|
|
8662
|
+
value: GeneratorFunction,
|
|
8663
|
+
configurable: !0
|
|
8664
|
+
}), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
|
|
8665
|
+
var ctor = "function" == typeof genFun && genFun.constructor;
|
|
8666
|
+
return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
|
|
8667
|
+
}, exports.mark = function (genFun) {
|
|
8668
|
+
return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun;
|
|
8669
|
+
}, exports.awrap = function (arg) {
|
|
8670
|
+
return {
|
|
8671
|
+
__await: arg
|
|
8672
|
+
};
|
|
8673
|
+
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
|
|
8674
|
+
return this;
|
|
8675
|
+
}), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
|
|
8676
|
+
void 0 === PromiseImpl && (PromiseImpl = Promise);
|
|
8677
|
+
var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
|
|
8678
|
+
return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
|
|
8679
|
+
return result.done ? result.value : iter.next();
|
|
8680
|
+
});
|
|
8681
|
+
}, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
|
|
8682
|
+
return this;
|
|
8683
|
+
}), define(Gp, "toString", function () {
|
|
8684
|
+
return "[object Generator]";
|
|
8685
|
+
}), exports.keys = function (val) {
|
|
8686
|
+
var object = Object(val),
|
|
8687
|
+
keys = [];
|
|
8688
|
+
for (var key in object) keys.push(key);
|
|
8689
|
+
return keys.reverse(), function next() {
|
|
8690
|
+
for (; keys.length;) {
|
|
8691
|
+
var key = keys.pop();
|
|
8692
|
+
if (key in object) return next.value = key, next.done = !1, next;
|
|
8693
|
+
}
|
|
8694
|
+
return next.done = !0, next;
|
|
8695
|
+
};
|
|
8696
|
+
}, exports.values = values, Context.prototype = {
|
|
8697
|
+
constructor: Context,
|
|
8698
|
+
reset: function (skipTempReset) {
|
|
8699
|
+
if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);
|
|
8700
|
+
},
|
|
8701
|
+
stop: function () {
|
|
8702
|
+
this.done = !0;
|
|
8703
|
+
var rootRecord = this.tryEntries[0].completion;
|
|
8704
|
+
if ("throw" === rootRecord.type) throw rootRecord.arg;
|
|
8705
|
+
return this.rval;
|
|
8706
|
+
},
|
|
8707
|
+
dispatchException: function (exception) {
|
|
8708
|
+
if (this.done) throw exception;
|
|
8709
|
+
var context = this;
|
|
8710
|
+
function handle(loc, caught) {
|
|
8711
|
+
return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
|
|
8712
|
+
}
|
|
8713
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
8714
|
+
var entry = this.tryEntries[i],
|
|
8715
|
+
record = entry.completion;
|
|
8716
|
+
if ("root" === entry.tryLoc) return handle("end");
|
|
8717
|
+
if (entry.tryLoc <= this.prev) {
|
|
8718
|
+
var hasCatch = hasOwn.call(entry, "catchLoc"),
|
|
8719
|
+
hasFinally = hasOwn.call(entry, "finallyLoc");
|
|
8720
|
+
if (hasCatch && hasFinally) {
|
|
8721
|
+
if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
|
|
8722
|
+
if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
|
|
8723
|
+
} else if (hasCatch) {
|
|
8724
|
+
if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
|
|
8725
|
+
} else {
|
|
8726
|
+
if (!hasFinally) throw new Error("try statement without catch or finally");
|
|
8727
|
+
if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
|
|
8728
|
+
}
|
|
8729
|
+
}
|
|
8730
|
+
}
|
|
8731
|
+
},
|
|
8732
|
+
abrupt: function (type, arg) {
|
|
8733
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
8734
|
+
var entry = this.tryEntries[i];
|
|
8735
|
+
if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
|
|
8736
|
+
var finallyEntry = entry;
|
|
8737
|
+
break;
|
|
8738
|
+
}
|
|
8739
|
+
}
|
|
8740
|
+
finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
|
|
8741
|
+
var record = finallyEntry ? finallyEntry.completion : {};
|
|
8742
|
+
return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
|
|
8743
|
+
},
|
|
8744
|
+
complete: function (record, afterLoc) {
|
|
8745
|
+
if ("throw" === record.type) throw record.arg;
|
|
8746
|
+
return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel;
|
|
8747
|
+
},
|
|
8748
|
+
finish: function (finallyLoc) {
|
|
8749
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
8750
|
+
var entry = this.tryEntries[i];
|
|
8751
|
+
if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
|
|
8752
|
+
}
|
|
8753
|
+
},
|
|
8754
|
+
catch: function (tryLoc) {
|
|
8755
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
8756
|
+
var entry = this.tryEntries[i];
|
|
8757
|
+
if (entry.tryLoc === tryLoc) {
|
|
8758
|
+
var record = entry.completion;
|
|
8759
|
+
if ("throw" === record.type) {
|
|
8760
|
+
var thrown = record.arg;
|
|
8761
|
+
resetTryEntry(entry);
|
|
8762
|
+
}
|
|
8763
|
+
return thrown;
|
|
8764
|
+
}
|
|
8765
|
+
}
|
|
8766
|
+
throw new Error("illegal catch attempt");
|
|
8767
|
+
},
|
|
8768
|
+
delegateYield: function (iterable, resultName, nextLoc) {
|
|
8769
|
+
return this.delegate = {
|
|
8770
|
+
iterator: values(iterable),
|
|
8771
|
+
resultName: resultName,
|
|
8772
|
+
nextLoc: nextLoc
|
|
8773
|
+
}, "next" === this.method && (this.arg = undefined), ContinueSentinel;
|
|
8774
|
+
}
|
|
8775
|
+
}, exports;
|
|
8776
|
+
}
|
|
8777
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
8778
|
+
try {
|
|
8779
|
+
var info = gen[key](arg);
|
|
8780
|
+
var value = info.value;
|
|
8781
|
+
} catch (error) {
|
|
8782
|
+
reject(error);
|
|
8783
|
+
return;
|
|
8784
|
+
}
|
|
8785
|
+
if (info.done) {
|
|
8786
|
+
resolve(value);
|
|
8787
|
+
} else {
|
|
8788
|
+
Promise.resolve(value).then(_next, _throw);
|
|
8789
|
+
}
|
|
8790
|
+
}
|
|
8791
|
+
function _asyncToGenerator(fn) {
|
|
8792
|
+
return function () {
|
|
8793
|
+
var self = this,
|
|
8794
|
+
args = arguments;
|
|
8795
|
+
return new Promise(function (resolve, reject) {
|
|
8796
|
+
var gen = fn.apply(self, args);
|
|
8797
|
+
function _next(value) {
|
|
8798
|
+
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
|
|
8799
|
+
}
|
|
8800
|
+
function _throw(err) {
|
|
8801
|
+
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
|
|
8802
|
+
}
|
|
8803
|
+
_next(undefined);
|
|
8804
|
+
});
|
|
8805
|
+
};
|
|
8806
|
+
}
|
|
8469
8807
|
function _defineProperties(target, props) {
|
|
8470
8808
|
for (var i = 0; i < props.length; i++) {
|
|
8471
8809
|
var descriptor = props[i];
|
|
@@ -12752,6 +13090,7 @@
|
|
|
12752
13090
|
destroyOnUnmount: Q.bool.def(true)
|
|
12753
13091
|
},
|
|
12754
13092
|
created: function created() {
|
|
13093
|
+
var _this = this;
|
|
12755
13094
|
// clone the props for component it is needed because attrs gets changed on time
|
|
12756
13095
|
var componentProps = _extends({}, this.$attrs);
|
|
12757
13096
|
// handle kebab case for props
|
|
@@ -12763,9 +13102,6 @@
|
|
|
12763
13102
|
this.componentId = this.componentProps.componentId;
|
|
12764
13103
|
this.react = this.componentProps.react;
|
|
12765
13104
|
this.$timestamp = new Date().getTime();
|
|
12766
|
-
},
|
|
12767
|
-
beforeMount: function beforeMount() {
|
|
12768
|
-
var _this = this;
|
|
12769
13105
|
var components = [];
|
|
12770
13106
|
if (this.$$store) {
|
|
12771
13107
|
var _this$$$store$getStat = this.$$store.getState();
|
|
@@ -12800,11 +13136,15 @@
|
|
|
12800
13136
|
this.addComponent(this.internalComponent, this.$timestamp);
|
|
12801
13137
|
this.setComponentProps(this.internalComponent, this.componentProps, options.componentType);
|
|
12802
13138
|
}
|
|
13139
|
+
if (this.internalComponent) {
|
|
13140
|
+
// Watch component after rendering the component to avoid the un-necessary calls
|
|
13141
|
+
this.setReact(this.componentProps, false);
|
|
13142
|
+
}
|
|
12803
13143
|
},
|
|
12804
13144
|
mounted: function mounted() {
|
|
12805
13145
|
if (this.internalComponent) {
|
|
12806
13146
|
// Watch component after rendering the component to avoid the un-necessary calls
|
|
12807
|
-
this.setReact(this.componentProps);
|
|
13147
|
+
this.setReact(this.componentProps, true);
|
|
12808
13148
|
}
|
|
12809
13149
|
},
|
|
12810
13150
|
beforeDestroy: function beforeDestroy() {
|
|
@@ -12843,7 +13183,7 @@
|
|
|
12843
13183
|
}
|
|
12844
13184
|
},
|
|
12845
13185
|
methods: {
|
|
12846
|
-
setReact: function setReact(props) {
|
|
13186
|
+
setReact: function setReact(props, shouldExecute) {
|
|
12847
13187
|
var react = props.react,
|
|
12848
13188
|
executeInitialQuery = props.executeInitialQuery;
|
|
12849
13189
|
if (this.internalComponent) {
|
|
@@ -12853,10 +13193,10 @@
|
|
|
12853
13193
|
} else {
|
|
12854
13194
|
this.watchComponent(props.componentId, {
|
|
12855
13195
|
and: this.internalComponent
|
|
12856
|
-
}, executeInitialQuery);
|
|
13196
|
+
}, shouldExecute || executeInitialQuery);
|
|
12857
13197
|
}
|
|
12858
13198
|
} else {
|
|
12859
|
-
this.watchComponent(props.componentId, react, executeInitialQuery);
|
|
13199
|
+
this.watchComponent(props.componentId, react, shouldExecute || executeInitialQuery);
|
|
12860
13200
|
}
|
|
12861
13201
|
}
|
|
12862
13202
|
},
|
|
@@ -13301,7 +13641,7 @@
|
|
|
13301
13641
|
}, constants_1$1.reactiveList);
|
|
13302
13642
|
},
|
|
13303
13643
|
props: {
|
|
13304
|
-
currentPage: Q.number
|
|
13644
|
+
currentPage: Q.number,
|
|
13305
13645
|
includeFields: types.includeFields,
|
|
13306
13646
|
// component props
|
|
13307
13647
|
className: types.string,
|
|
@@ -13486,7 +13826,16 @@
|
|
|
13486
13826
|
},
|
|
13487
13827
|
infiniteScroll: function infiniteScroll(newVal, oldVal) {
|
|
13488
13828
|
if (newVal !== oldVal) {
|
|
13489
|
-
if (!
|
|
13829
|
+
if (newVal && !this.pagination) {
|
|
13830
|
+
window.addEventListener('scroll', this.scrollHandler);
|
|
13831
|
+
} else {
|
|
13832
|
+
window.removeEventListener('scroll', this.scrollHandler);
|
|
13833
|
+
}
|
|
13834
|
+
}
|
|
13835
|
+
},
|
|
13836
|
+
pagination: function pagination(newVal, oldVal) {
|
|
13837
|
+
if (newVal !== oldVal) {
|
|
13838
|
+
if (!newVal && this.infiniteScroll) {
|
|
13490
13839
|
window.addEventListener('scroll', this.scrollHandler);
|
|
13491
13840
|
} else {
|
|
13492
13841
|
window.removeEventListener('scroll', this.scrollHandler);
|
|
@@ -13768,8 +14117,8 @@
|
|
|
13768
14117
|
triggerClickAnalytics: function triggerClickAnalytics(searchPosition, documentId) {
|
|
13769
14118
|
var docId = documentId;
|
|
13770
14119
|
if (!docId) {
|
|
13771
|
-
var _this$
|
|
13772
|
-
data = _this$
|
|
14120
|
+
var _this$getData2 = this.getData(),
|
|
14121
|
+
data = _this$getData2.data;
|
|
13773
14122
|
var hitData = data.find(function (hit) {
|
|
13774
14123
|
return hit._click_id === searchPosition;
|
|
13775
14124
|
});
|
|
@@ -13927,6 +14276,8 @@
|
|
|
13927
14276
|
internalComponent: ReactiveList.hasInternalComponent()
|
|
13928
14277
|
}));
|
|
13929
14278
|
RLConnected.name = ReactiveList.name;
|
|
14279
|
+
RLConnected.generateQueryOptions = ReactiveList.generateQueryOptions;
|
|
14280
|
+
RLConnected.hasInternalComponent = ReactiveList.hasInternalComponent;
|
|
13930
14281
|
RLConnected.install = function (Vue) {
|
|
13931
14282
|
Vue.component(RLConnected.name, RLConnected);
|
|
13932
14283
|
Vue.component(ResultListWrapper.name, ResultListWrapper);
|
|
@@ -16057,12 +16408,12 @@
|
|
|
16057
16408
|
try {
|
|
16058
16409
|
var component = item[0],
|
|
16059
16410
|
value = item[1];
|
|
16060
|
-
var
|
|
16411
|
+
var _ref2 = _this.selectedValues[component] || {
|
|
16061
16412
|
label: component
|
|
16062
16413
|
},
|
|
16063
|
-
label =
|
|
16064
|
-
showFilter =
|
|
16065
|
-
URLParams =
|
|
16414
|
+
label = _ref2.label,
|
|
16415
|
+
showFilter = _ref2.showFilter,
|
|
16416
|
+
URLParams = _ref2.URLParams;
|
|
16066
16417
|
_this.setValue(component, JSON.parse(value), label, showFilter, URLParams, undefined, undefined, undefined, 'URL');
|
|
16067
16418
|
} catch (e) {
|
|
16068
16419
|
// Do not set value if JSON parsing fails.
|
|
@@ -16279,6 +16630,7 @@
|
|
|
16279
16630
|
function _isSlot$4(s) {
|
|
16280
16631
|
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !vue.isVNode(s);
|
|
16281
16632
|
}
|
|
16633
|
+
var setValues = lib_5.setValues;
|
|
16282
16634
|
var ReactiveBase = {
|
|
16283
16635
|
name: 'ReactiveBase',
|
|
16284
16636
|
data: function data() {
|
|
@@ -16305,6 +16657,7 @@
|
|
|
16305
16657
|
initialQueriesSyncTime: types.number,
|
|
16306
16658
|
className: types.string,
|
|
16307
16659
|
initialState: Q.object.def({}),
|
|
16660
|
+
contextCollector: Q.func,
|
|
16308
16661
|
transformRequest: types.func,
|
|
16309
16662
|
transformResponse: types.func,
|
|
16310
16663
|
as: Q.string.def('div'),
|
|
@@ -16315,11 +16668,15 @@
|
|
|
16315
16668
|
preferences: Q.object
|
|
16316
16669
|
},
|
|
16317
16670
|
provide: function provide() {
|
|
16671
|
+
var createCacheFn = createCache;
|
|
16672
|
+
if (createCache["default"]) {
|
|
16673
|
+
createCacheFn = createCache["default"];
|
|
16674
|
+
}
|
|
16318
16675
|
return {
|
|
16319
16676
|
theme_reactivesearch: composeThemeObject(getTheme(this.$props.themePreset), this.$props.theme),
|
|
16320
16677
|
store: this.store,
|
|
16321
16678
|
$searchPreferences: this.preferences,
|
|
16322
|
-
$emotionCache: this.$parent && this.$parent.$emotionCache ||
|
|
16679
|
+
$emotionCache: this.$parent && this.$parent.$emotionCache || createCacheFn({
|
|
16323
16680
|
key: 'css'
|
|
16324
16681
|
})
|
|
16325
16682
|
};
|
|
@@ -16473,8 +16830,20 @@
|
|
|
16473
16830
|
selectedValues: selectedValues,
|
|
16474
16831
|
urlValues: urlValues,
|
|
16475
16832
|
headers: this.getHeaders
|
|
16476
|
-
}, this
|
|
16477
|
-
|
|
16833
|
+
}, this.initialState);
|
|
16834
|
+
var storeFn = configureStore;
|
|
16835
|
+
if (configureStore["default"]) {
|
|
16836
|
+
storeFn = configureStore["default"];
|
|
16837
|
+
}
|
|
16838
|
+
this.store = storeFn(initialState);
|
|
16839
|
+
// server side rendered app to collect context
|
|
16840
|
+
if (typeof window === 'undefined' && props.contextCollector) {
|
|
16841
|
+
var res = props.contextCollector({
|
|
16842
|
+
ctx: this.store
|
|
16843
|
+
});
|
|
16844
|
+
// necessary for supporting SSR of queryParams
|
|
16845
|
+
this.store.dispatch(setValues(res.selectedValues));
|
|
16846
|
+
}
|
|
16478
16847
|
this.analyticsRef = analyticsRef;
|
|
16479
16848
|
}
|
|
16480
16849
|
},
|
|
@@ -18413,14 +18782,14 @@
|
|
|
18413
18782
|
if (status === STATUS.active) {
|
|
18414
18783
|
this.status = STATUS.inactive;
|
|
18415
18784
|
}
|
|
18416
|
-
var _this$$
|
|
18417
|
-
handleResult = _this$$
|
|
18418
|
-
onNoMatch = _this$$
|
|
18419
|
-
onError = _this$$
|
|
18420
|
-
lang = _this$$
|
|
18421
|
-
getInstance = _this$$
|
|
18422
|
-
var
|
|
18423
|
-
SpeechRecognition =
|
|
18785
|
+
var _this$$props2 = this.$props,
|
|
18786
|
+
handleResult = _this$$props2.handleResult,
|
|
18787
|
+
onNoMatch = _this$$props2.onNoMatch,
|
|
18788
|
+
onError = _this$$props2.onError,
|
|
18789
|
+
lang = _this$$props2.lang,
|
|
18790
|
+
getInstance = _this$$props2.getInstance;
|
|
18791
|
+
var _window2 = window,
|
|
18792
|
+
SpeechRecognition = _window2.SpeechRecognition;
|
|
18424
18793
|
if (this.instance && this.status !== STATUS.denied) {
|
|
18425
18794
|
this.status = STATUS.inactive;
|
|
18426
18795
|
this.instance.stop();
|
|
@@ -18691,6 +19060,13 @@
|
|
|
18691
19060
|
// Set custom and default queries in store
|
|
18692
19061
|
this.triggerCustomQuery(this.currentValue, this.selectedCategory);
|
|
18693
19062
|
this.triggerDefaultQuery(this.currentValue);
|
|
19063
|
+
if (this.selectedValue) {
|
|
19064
|
+
this.setValue(this.selectedValue, true, this.$props, this.$options.isTagsMode ? lib_7.SUGGESTION_SELECT : undefined);
|
|
19065
|
+
} else if (this.$props.value) {
|
|
19066
|
+
this.setValue(this.$props.value, true, this.$props, this.$options.isTagsMode ? lib_7.SUGGESTION_SELECT : undefined);
|
|
19067
|
+
} else if (this.$props.defaultValue) {
|
|
19068
|
+
this.setValue(this.$props.defaultValue, true, this.$props, this.$options.isTagsMode ? lib_7.SUGGESTION_SELECT : undefined);
|
|
19069
|
+
}
|
|
18694
19070
|
},
|
|
18695
19071
|
computed: {
|
|
18696
19072
|
hasCustomRenderer: function hasCustomRenderer$1() {
|
|
@@ -18781,15 +19157,6 @@
|
|
|
18781
19157
|
searchboxId: Q.string,
|
|
18782
19158
|
endpoint: types.endpointConfig
|
|
18783
19159
|
},
|
|
18784
|
-
beforeMount: function beforeMount() {
|
|
18785
|
-
if (this.selectedValue) {
|
|
18786
|
-
this.setValue(this.selectedValue, true, this.$props, this.$options.isTagsMode ? lib_7.SUGGESTION_SELECT : undefined);
|
|
18787
|
-
} else if (this.$props.value) {
|
|
18788
|
-
this.setValue(this.$props.value, true, this.$props, this.$options.isTagsMode ? lib_7.SUGGESTION_SELECT : undefined);
|
|
18789
|
-
} else if (this.$props.defaultValue) {
|
|
18790
|
-
this.setValue(this.$props.defaultValue, true, this.$props, this.$options.isTagsMode ? lib_7.SUGGESTION_SELECT : undefined);
|
|
18791
|
-
}
|
|
18792
|
-
},
|
|
18793
19160
|
mounted: function mounted() {
|
|
18794
19161
|
this.listenForFocusShortcuts();
|
|
18795
19162
|
},
|
|
@@ -19267,12 +19634,12 @@
|
|
|
19267
19634
|
renderInputAddonBefore: function renderInputAddonBefore() {
|
|
19268
19635
|
var addonBefore = this.$slots.addonBefore;
|
|
19269
19636
|
if (addonBefore) {
|
|
19270
|
-
var
|
|
19637
|
+
var _slot2;
|
|
19271
19638
|
return vue.createVNode(InputAddon, {
|
|
19272
19639
|
"class": "addon-before"
|
|
19273
|
-
}, _isSlot$5(
|
|
19640
|
+
}, _isSlot$5(_slot2 = addonBefore()) ? _slot2 : {
|
|
19274
19641
|
"default": function _default() {
|
|
19275
|
-
return [
|
|
19642
|
+
return [_slot2];
|
|
19276
19643
|
}
|
|
19277
19644
|
});
|
|
19278
19645
|
}
|
|
@@ -19281,12 +19648,12 @@
|
|
|
19281
19648
|
renderInputAddonAfter: function renderInputAddonAfter() {
|
|
19282
19649
|
var addonAfter = this.$slots.addonAfter;
|
|
19283
19650
|
if (addonAfter) {
|
|
19284
|
-
var
|
|
19651
|
+
var _slot4;
|
|
19285
19652
|
return vue.createVNode(InputAddon, {
|
|
19286
19653
|
"class": "addon-after"
|
|
19287
|
-
}, _isSlot$5(
|
|
19654
|
+
}, _isSlot$5(_slot4 = addonAfter()) ? _slot4 : {
|
|
19288
19655
|
"default": function _default() {
|
|
19289
|
-
return [
|
|
19656
|
+
return [_slot4];
|
|
19290
19657
|
}
|
|
19291
19658
|
});
|
|
19292
19659
|
}
|
|
@@ -19328,7 +19695,7 @@
|
|
|
19328
19695
|
},
|
|
19329
19696
|
renderIcons: function renderIcons() {
|
|
19330
19697
|
var _this6 = this;
|
|
19331
|
-
var
|
|
19698
|
+
var _slot5, _slot6, _slot7;
|
|
19332
19699
|
var _this$$props3 = this.$props,
|
|
19333
19700
|
iconPosition = _this$$props3.iconPosition,
|
|
19334
19701
|
showClear = _this$$props3.showClear,
|
|
@@ -19347,9 +19714,9 @@
|
|
|
19347
19714
|
"onClick": _this6.clearValue,
|
|
19348
19715
|
"showIcon": showIcon,
|
|
19349
19716
|
"isClearIcon": true
|
|
19350
|
-
}, _isSlot$5(
|
|
19717
|
+
}, _isSlot$5(_slot5 = _this6.renderCancelIcon()) ? _slot5 : {
|
|
19351
19718
|
"default": function _default() {
|
|
19352
|
-
return [
|
|
19719
|
+
return [_slot5];
|
|
19353
19720
|
}
|
|
19354
19721
|
}), showVoiceSearch && vue.createVNode(Mic, {
|
|
19355
19722
|
"getInstance": getMicInstance,
|
|
@@ -19358,9 +19725,9 @@
|
|
|
19358
19725
|
"className": getClassName$3(innerClass, 'mic') || null
|
|
19359
19726
|
}, null), iconPosition === 'right' && showIcon && vue.createVNode(IconWrapper, {
|
|
19360
19727
|
"onClick": _this6.handleSearchIconClick
|
|
19361
|
-
}, _isSlot$5(
|
|
19728
|
+
}, _isSlot$5(_slot6 = _this6.renderIcon()) ? _slot6 : {
|
|
19362
19729
|
"default": function _default() {
|
|
19363
|
-
return [
|
|
19730
|
+
return [_slot6];
|
|
19364
19731
|
}
|
|
19365
19732
|
})];
|
|
19366
19733
|
}
|
|
@@ -19371,9 +19738,9 @@
|
|
|
19371
19738
|
"default": function _default() {
|
|
19372
19739
|
return [iconPosition === 'left' && showIcon && vue.createVNode(IconWrapper, {
|
|
19373
19740
|
"onClick": _this6.handleSearchIconClick
|
|
19374
|
-
}, _isSlot$5(
|
|
19741
|
+
}, _isSlot$5(_slot7 = _this6.renderIcon()) ? _slot7 : {
|
|
19375
19742
|
"default": function _default() {
|
|
19376
|
-
return [
|
|
19743
|
+
return [_slot7];
|
|
19377
19744
|
}
|
|
19378
19745
|
})];
|
|
19379
19746
|
}
|
|
@@ -19683,6 +20050,9 @@
|
|
|
19683
20050
|
document.removeEventListener('keydown', this.onKeyDown);
|
|
19684
20051
|
}
|
|
19685
20052
|
});
|
|
20053
|
+
SearchBox.hasInternalComponent = function () {
|
|
20054
|
+
return true;
|
|
20055
|
+
};
|
|
19686
20056
|
SearchBox.defaultQuery = function (value, props) {
|
|
19687
20057
|
var finalQuery = null;
|
|
19688
20058
|
finalQuery = {
|
|
@@ -19741,6 +20111,9 @@
|
|
|
19741
20111
|
internalComponent: true
|
|
19742
20112
|
}));
|
|
19743
20113
|
SBConnected.name = SearchBox.name;
|
|
20114
|
+
SBConnected.defaultQuery = SearchBox.defaultQuery;
|
|
20115
|
+
SBConnected.shouldQuery = SearchBox.shouldQuery;
|
|
20116
|
+
SBConnected.hasInternalComponent = SearchBox.hasInternalComponent;
|
|
19744
20117
|
SBConnected.install = function (Vue) {
|
|
19745
20118
|
Vue.component(SBConnected.name, SBConnected);
|
|
19746
20119
|
};
|
|
@@ -19889,8 +20262,6 @@
|
|
|
19889
20262
|
// Set custom and default queries in store
|
|
19890
20263
|
updateCustomQuery(this.componentId, this.setCustomQuery, this.$props, this.currentValue);
|
|
19891
20264
|
updateDefaultQuery(this.componentId, this.setDefaultQuery, this.$props, this.currentValue);
|
|
19892
|
-
},
|
|
19893
|
-
beforeMount: function beforeMount() {
|
|
19894
20265
|
this.updateQueryHandlerOptions(this.$props);
|
|
19895
20266
|
if (this.selectedValue) {
|
|
19896
20267
|
this.setValue(this.selectedValue);
|
|
@@ -20215,13 +20586,15 @@
|
|
|
20215
20586
|
internalComponent: SingleList.hasInternalComponent()
|
|
20216
20587
|
}));
|
|
20217
20588
|
ListConnected.name = SingleList.name;
|
|
20589
|
+
ListConnected.defaultQuery = SingleList.defaultQuery;
|
|
20590
|
+
ListConnected.generateQueryOptions = SingleList.generateQueryOptions;
|
|
20591
|
+
ListConnected.hasInternalComponent = SingleList.hasInternalComponent;
|
|
20592
|
+
// Add componentType for SSR
|
|
20593
|
+
ListConnected.componentType = constants_1$1.singleList;
|
|
20218
20594
|
ListConnected.install = function (Vue) {
|
|
20219
20595
|
Vue.component(ListConnected.name, ListConnected);
|
|
20220
20596
|
};
|
|
20221
20597
|
|
|
20222
|
-
// Add componentType for SSR
|
|
20223
|
-
ListConnected.componentType = constants_1$1.singleList;
|
|
20224
|
-
|
|
20225
20598
|
var updateQuery$3 = lib_5.updateQuery,
|
|
20226
20599
|
setQueryOptions$2 = lib_5.setQueryOptions,
|
|
20227
20600
|
setCustomQuery$2 = lib_5.setCustomQuery,
|
|
@@ -20284,8 +20657,6 @@
|
|
|
20284
20657
|
// Set custom and default queries in store
|
|
20285
20658
|
updateCustomQuery(this.componentId, this.setCustomQuery, this.$props, this.currentValue);
|
|
20286
20659
|
updateDefaultQuery(this.componentId, this.setDefaultQuery, this.$props, this.currentValue);
|
|
20287
|
-
},
|
|
20288
|
-
beforeMount: function beforeMount() {
|
|
20289
20660
|
this.updateQueryHandlerOptions(this.$props);
|
|
20290
20661
|
var value = this.selectedValue || this.$props.value || this.$props.defaultValue;
|
|
20291
20662
|
this.setValue(value, !this.selectedValue);
|
|
@@ -20473,16 +20844,16 @@
|
|
|
20473
20844
|
});
|
|
20474
20845
|
}
|
|
20475
20846
|
if (selectAllLabel && selectAllLabel in currentValue) {
|
|
20476
|
-
var
|
|
20477
|
-
del =
|
|
20478
|
-
obj = _objectWithoutPropertiesLoose(
|
|
20847
|
+
var _currentValue2 = currentValue,
|
|
20848
|
+
del = _currentValue2[selectAllLabel],
|
|
20849
|
+
obj = _objectWithoutPropertiesLoose(_currentValue2, [selectAllLabel].map(_toPropertyKey$1));
|
|
20479
20850
|
currentValue = _extends({}, obj);
|
|
20480
20851
|
}
|
|
20481
20852
|
} else {
|
|
20482
20853
|
if (currentValue[value]) {
|
|
20483
|
-
var
|
|
20484
|
-
_del =
|
|
20485
|
-
rest = _objectWithoutPropertiesLoose(
|
|
20854
|
+
var _currentValue4 = currentValue,
|
|
20855
|
+
_del = _currentValue4[value],
|
|
20856
|
+
rest = _objectWithoutPropertiesLoose(_currentValue4, [value].map(_toPropertyKey$1));
|
|
20486
20857
|
currentValue = _extends({}, rest);
|
|
20487
20858
|
} else if (Array.isArray(value)) {
|
|
20488
20859
|
value.forEach(function (val) {
|
|
@@ -20492,9 +20863,9 @@
|
|
|
20492
20863
|
currentValue[value] = true;
|
|
20493
20864
|
}
|
|
20494
20865
|
if (selectAllLabel && selectAllLabel in currentValue) {
|
|
20495
|
-
var
|
|
20496
|
-
_del2 =
|
|
20497
|
-
_obj = _objectWithoutPropertiesLoose(
|
|
20866
|
+
var _currentValue6 = currentValue,
|
|
20867
|
+
_del2 = _currentValue6[selectAllLabel],
|
|
20868
|
+
_obj = _objectWithoutPropertiesLoose(_currentValue6, [selectAllLabel].map(_toPropertyKey$1));
|
|
20498
20869
|
currentValue = _extends({}, _obj);
|
|
20499
20870
|
}
|
|
20500
20871
|
finalValues = Object.keys(currentValue);
|
|
@@ -20668,13 +21039,15 @@
|
|
|
20668
21039
|
internalComponent: MultiList.hasInternalComponent()
|
|
20669
21040
|
}));
|
|
20670
21041
|
ListConnected$1.name = MultiList.name;
|
|
21042
|
+
ListConnected$1.defaultQuery = MultiList.defaultQuery;
|
|
21043
|
+
ListConnected$1.generateQueryOptions = MultiList.generateQueryOptions;
|
|
21044
|
+
ListConnected$1.hasInternalComponent = MultiList.hasInternalComponent;
|
|
21045
|
+
// Add componentType for SSR
|
|
21046
|
+
ListConnected$1.componentType = constants_1$1.multiList;
|
|
20671
21047
|
ListConnected$1.install = function (Vue) {
|
|
20672
21048
|
Vue.component(ListConnected$1.name, ListConnected$1);
|
|
20673
21049
|
};
|
|
20674
21050
|
|
|
20675
|
-
// Add componentType for SSR
|
|
20676
|
-
ListConnected$1.componentType = constants_1$1.multiList;
|
|
20677
|
-
|
|
20678
21051
|
var _templateObject$m, _templateObject2$7;
|
|
20679
21052
|
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";
|
|
20680
21053
|
var dark$2 = function dark(_ref) {
|
|
@@ -21029,8 +21402,6 @@
|
|
|
21029
21402
|
// Set custom and default queries in store
|
|
21030
21403
|
updateCustomQuery(this.componentId, this.setCustomQuery, this.$props, this.currentValue);
|
|
21031
21404
|
updateDefaultQuery(this.componentId, this.setDefaultQuery, this.$props, this.currentValue);
|
|
21032
|
-
},
|
|
21033
|
-
beforeMount: function beforeMount() {
|
|
21034
21405
|
this.updateQueryOptions(this.$props);
|
|
21035
21406
|
if (this.selectedValue) {
|
|
21036
21407
|
this.setValue(this.selectedValue);
|
|
@@ -21343,14 +21714,16 @@
|
|
|
21343
21714
|
componentType: constants_1$1.singleDropdownList,
|
|
21344
21715
|
internalComponent: SingleDropdownList.hasInternalComponent()
|
|
21345
21716
|
}));
|
|
21717
|
+
ListConnected$2.defaultQuery = SingleDropdownList.defaultQuery;
|
|
21718
|
+
ListConnected$2.generateQueryOptions = SingleDropdownList.generateQueryOptions;
|
|
21719
|
+
ListConnected$2.hasInternalComponent = SingleDropdownList.hasInternalComponent;
|
|
21346
21720
|
ListConnected$2.name = SingleDropdownList.name;
|
|
21721
|
+
// Add componentType for SSR
|
|
21722
|
+
ListConnected$2.componentType = constants_1$1.singleDropdownList;
|
|
21347
21723
|
ListConnected$2.install = function (Vue) {
|
|
21348
21724
|
Vue.component(ListConnected$2.name, ListConnected$2);
|
|
21349
21725
|
};
|
|
21350
21726
|
|
|
21351
|
-
// Add componentType for SSR
|
|
21352
|
-
ListConnected$2.componentType = constants_1$1.singleDropdownList;
|
|
21353
|
-
|
|
21354
21727
|
function _isSlot$7(s) {
|
|
21355
21728
|
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !vue.isVNode(s);
|
|
21356
21729
|
}
|
|
@@ -21424,8 +21797,6 @@
|
|
|
21424
21797
|
// Set custom and default queries in store
|
|
21425
21798
|
updateCustomQuery(this.componentId, this.setCustomQuery, this.$props, this.currentValue);
|
|
21426
21799
|
updateDefaultQuery(this.componentId, this.setDefaultQuery, this.$props, this.currentValue);
|
|
21427
|
-
},
|
|
21428
|
-
beforeMount: function beforeMount() {
|
|
21429
21800
|
this.updateQueryOptions(this.$props);
|
|
21430
21801
|
if (this.selectedValue) {
|
|
21431
21802
|
this.setValue(this.selectedValue, true);
|
|
@@ -21631,24 +22002,24 @@
|
|
|
21631
22002
|
});
|
|
21632
22003
|
}
|
|
21633
22004
|
if (selectAllLabel && selectAllLabel in currentValue) {
|
|
21634
|
-
var
|
|
21635
|
-
del =
|
|
21636
|
-
obj = _objectWithoutPropertiesLoose(
|
|
22005
|
+
var _currentValue2 = currentValue,
|
|
22006
|
+
del = _currentValue2[selectAllLabel],
|
|
22007
|
+
obj = _objectWithoutPropertiesLoose(_currentValue2, [selectAllLabel].map(_toPropertyKey$1));
|
|
21637
22008
|
currentValue = _extends({}, obj);
|
|
21638
22009
|
}
|
|
21639
22010
|
} else {
|
|
21640
22011
|
if (currentValue[value]) {
|
|
21641
|
-
var
|
|
21642
|
-
_del =
|
|
21643
|
-
rest = _objectWithoutPropertiesLoose(
|
|
22012
|
+
var _currentValue4 = currentValue,
|
|
22013
|
+
_del = _currentValue4[value],
|
|
22014
|
+
rest = _objectWithoutPropertiesLoose(_currentValue4, [value].map(_toPropertyKey$1));
|
|
21644
22015
|
currentValue = _extends({}, rest);
|
|
21645
22016
|
} else {
|
|
21646
22017
|
currentValue[value] = true;
|
|
21647
22018
|
}
|
|
21648
22019
|
if (selectAllLabel && selectAllLabel in currentValue) {
|
|
21649
|
-
var
|
|
21650
|
-
_del2 =
|
|
21651
|
-
_obj = _objectWithoutPropertiesLoose(
|
|
22020
|
+
var _currentValue6 = currentValue,
|
|
22021
|
+
_del2 = _currentValue6[selectAllLabel],
|
|
22022
|
+
_obj = _objectWithoutPropertiesLoose(_currentValue6, [selectAllLabel].map(_toPropertyKey$1));
|
|
21652
22023
|
currentValue = _extends({}, _obj);
|
|
21653
22024
|
}
|
|
21654
22025
|
finalValues = Object.keys(currentValue);
|
|
@@ -21799,12 +22170,15 @@
|
|
|
21799
22170
|
internalComponent: MultiDropdownList.hasInternalComponent()
|
|
21800
22171
|
}));
|
|
21801
22172
|
ListConnected$3.name = MultiDropdownList.name;
|
|
21802
|
-
ListConnected$3.install = function (Vue) {
|
|
21803
|
-
Vue.component(ListConnected$3.name, ListConnected$3);
|
|
21804
|
-
};
|
|
21805
22173
|
|
|
21806
22174
|
// Add componentType for SSR
|
|
21807
22175
|
ListConnected$3.componentType = constants_1$1.multiDropdownList;
|
|
22176
|
+
ListConnected$3.defaultQuery = MultiDropdownList.defaultQuery;
|
|
22177
|
+
ListConnected$3.generateQueryOptions = MultiDropdownList.generateQueryOptions;
|
|
22178
|
+
ListConnected$3.hasInternalComponent = MultiDropdownList.hasInternalComponent;
|
|
22179
|
+
ListConnected$3.install = function (Vue) {
|
|
22180
|
+
Vue.component(ListConnected$3.name, ListConnected$3);
|
|
22181
|
+
};
|
|
21808
22182
|
|
|
21809
22183
|
var updateQuery$6 = lib_5.updateQuery,
|
|
21810
22184
|
setQueryOptions$5 = lib_5.setQueryOptions,
|
|
@@ -21842,7 +22216,9 @@
|
|
|
21842
22216
|
};
|
|
21843
22217
|
return this.__state;
|
|
21844
22218
|
},
|
|
21845
|
-
|
|
22219
|
+
created: function created() {
|
|
22220
|
+
// Set custom query in store
|
|
22221
|
+
updateCustomQuery(this.componentId, this.setCustomQuery, this.$props, this.currentValue);
|
|
21846
22222
|
var props = this.$props;
|
|
21847
22223
|
var hasMounted = false;
|
|
21848
22224
|
var value = this.selectedValue || props.value || props.defaultValue || [];
|
|
@@ -21852,10 +22228,6 @@
|
|
|
21852
22228
|
this.handleToggle(this.$data.currentValue, true, props, hasMounted);
|
|
21853
22229
|
}
|
|
21854
22230
|
},
|
|
21855
|
-
created: function created() {
|
|
21856
|
-
// Set custom query in store
|
|
21857
|
-
updateCustomQuery(this.componentId, this.setCustomQuery, this.$props, this.currentValue);
|
|
21858
|
-
},
|
|
21859
22231
|
watch: {
|
|
21860
22232
|
defaultValue: function defaultValue(newVal) {
|
|
21861
22233
|
this.setValue(ToggleButton.parseValue(newVal, this.$props));
|
|
@@ -22081,6 +22453,8 @@
|
|
|
22081
22453
|
var TBConnected = PreferencesConsumer(ComponentWrapper$1(connect(mapStateToProps$8, mapDispatchtoProps$6)(ToggleButton), {
|
|
22082
22454
|
componentType: constants_1$1.toggleButton
|
|
22083
22455
|
}));
|
|
22456
|
+
TBConnected.parseValue = ToggleButton.parseValue;
|
|
22457
|
+
TBConnected.defaultQuery = ToggleButton.defaultQuery;
|
|
22084
22458
|
TBConnected.name = ToggleButton.name;
|
|
22085
22459
|
TBConnected.install = function (Vue) {
|
|
22086
22460
|
Vue.component(TBConnected.name, TBConnected);
|
|
@@ -22212,25 +22586,6 @@
|
|
|
22212
22586
|
created: function created() {
|
|
22213
22587
|
var _this = this;
|
|
22214
22588
|
this.$timestamp = new Date().getTime();
|
|
22215
|
-
var onQueryChange = function onQueryChange() {
|
|
22216
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
22217
|
-
args[_key] = arguments[_key];
|
|
22218
|
-
}
|
|
22219
|
-
_this.$emit.apply(_this, ['queryChange'].concat(args));
|
|
22220
|
-
_this.$emit.apply(_this, ['query-change'].concat(args));
|
|
22221
|
-
};
|
|
22222
|
-
this.setQueryListener(this.$props.componentId, onQueryChange, null);
|
|
22223
|
-
// Update props in store
|
|
22224
|
-
this.setComponentProps(this.componentId, this.$props, constants_1$1.dynamicRangeSlider);
|
|
22225
|
-
this.setComponentProps(this.internalRangeComponent, this.$props, constants_1$1.dynamicRangeSlider);
|
|
22226
|
-
|
|
22227
|
-
// Set custom query in store
|
|
22228
|
-
updateCustomQuery(this.componentId, this.setCustomQuery, this.$props, this.currentValue);
|
|
22229
|
-
},
|
|
22230
|
-
mounted: function mounted() {
|
|
22231
|
-
this.setReact();
|
|
22232
|
-
},
|
|
22233
|
-
beforeMount: function beforeMount() {
|
|
22234
22589
|
var components = [];
|
|
22235
22590
|
if (this.$$store) {
|
|
22236
22591
|
var _this$$$store$getStat = this.$$store.getState();
|
|
@@ -22251,6 +22606,24 @@
|
|
|
22251
22606
|
// get range before executing other queries
|
|
22252
22607
|
this.updateRangeQueryOptions();
|
|
22253
22608
|
}
|
|
22609
|
+
var onQueryChange = function onQueryChange() {
|
|
22610
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
22611
|
+
args[_key] = arguments[_key];
|
|
22612
|
+
}
|
|
22613
|
+
_this.$emit.apply(_this, ['queryChange'].concat(args));
|
|
22614
|
+
_this.$emit.apply(_this, ['query-change'].concat(args));
|
|
22615
|
+
};
|
|
22616
|
+
this.setQueryListener(this.$props.componentId, onQueryChange, null);
|
|
22617
|
+
// Update props in store
|
|
22618
|
+
this.setComponentProps(this.componentId, this.$props, constants_1$1.dynamicRangeSlider);
|
|
22619
|
+
this.setComponentProps(this.internalRangeComponent, this.$props, constants_1$1.dynamicRangeSlider);
|
|
22620
|
+
|
|
22621
|
+
// Set custom query in store
|
|
22622
|
+
updateCustomQuery(this.componentId, this.setCustomQuery, this.$props, this.currentValue);
|
|
22623
|
+
this.setReact(false);
|
|
22624
|
+
},
|
|
22625
|
+
mounted: function mounted() {
|
|
22626
|
+
this.setReact(true);
|
|
22254
22627
|
},
|
|
22255
22628
|
beforeUpdate: function beforeUpdate() {
|
|
22256
22629
|
if (!this.currentValue) {
|
|
@@ -22274,9 +22647,9 @@
|
|
|
22274
22647
|
var start = _ref.start,
|
|
22275
22648
|
end = _ref.end;
|
|
22276
22649
|
if (this.$props.defaultValue) {
|
|
22277
|
-
var _this$$props$
|
|
22278
|
-
defaultStart = _this$$props$
|
|
22279
|
-
defaultEnd = _this$$props$
|
|
22650
|
+
var _this$$props$defaultV2 = this.$props.defaultValue(start, end),
|
|
22651
|
+
defaultStart = _this$$props$defaultV2.start,
|
|
22652
|
+
defaultEnd = _this$$props$defaultV2.end;
|
|
22280
22653
|
this.handleChange([defaultStart, defaultEnd]);
|
|
22281
22654
|
} else if (this.isControlled()) {
|
|
22282
22655
|
this.handleChange(DynamicRangeSlider.parseValue(this.$props.value), 'change');
|
|
@@ -22284,13 +22657,13 @@
|
|
|
22284
22657
|
this.currentValue = [start, end];
|
|
22285
22658
|
}
|
|
22286
22659
|
},
|
|
22287
|
-
setReact: function setReact() {
|
|
22660
|
+
setReact: function setReact(shouldExecute) {
|
|
22288
22661
|
if (this.$props.react) {
|
|
22289
|
-
this.watchComponent(this.internalRangeComponent, this.$props.react);
|
|
22290
|
-
this.watchComponent(this.$props.componentId, this.$props.react);
|
|
22662
|
+
this.watchComponent(this.internalRangeComponent, this.$props.react, shouldExecute);
|
|
22663
|
+
this.watchComponent(this.$props.componentId, this.$props.react, shouldExecute);
|
|
22291
22664
|
} else {
|
|
22292
|
-
this.watchComponent(this.internalRangeComponent, {});
|
|
22293
|
-
this.watchComponent(this.$props.componentId, {});
|
|
22665
|
+
this.watchComponent(this.internalRangeComponent, {}, shouldExecute);
|
|
22666
|
+
this.watchComponent(this.$props.componentId, {}, shouldExecute);
|
|
22294
22667
|
}
|
|
22295
22668
|
},
|
|
22296
22669
|
rangeQuery: function rangeQuery() {
|
|
@@ -22548,13 +22921,16 @@
|
|
|
22548
22921
|
updateComponentProps: updateComponentProps$2
|
|
22549
22922
|
};
|
|
22550
22923
|
var RangeConnected = PreferencesConsumer(connect(mapStateToProps$9, mapDispatchtoProps$7)(DynamicRangeSlider));
|
|
22924
|
+
RangeConnected.defaultQuery = DynamicRangeSlider.defaultQuery;
|
|
22925
|
+
RangeConnected.parseValue = DynamicRangeSlider.parseValue;
|
|
22926
|
+
RangeConnected.hasInternalComponent = DynamicRangeSlider.hasInternalComponent;
|
|
22551
22927
|
RangeConnected.name = DynamicRangeSlider.name;
|
|
22552
|
-
RangeConnected.install = function (Vue) {
|
|
22553
|
-
Vue.component(RangeConnected.name, RangeConnected);
|
|
22554
|
-
};
|
|
22555
22928
|
|
|
22556
22929
|
// Add componentType for SSR
|
|
22557
22930
|
RangeConnected.componentType = constants_1$1.dynamicRangeSlider;
|
|
22931
|
+
RangeConnected.install = function (Vue) {
|
|
22932
|
+
Vue.component(RangeConnected.name, RangeConnected);
|
|
22933
|
+
};
|
|
22558
22934
|
|
|
22559
22935
|
function _isSlot$8(s) {
|
|
22560
22936
|
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !vue.isVNode(s);
|
|
@@ -22598,8 +22974,6 @@
|
|
|
22598
22974
|
created: function created() {
|
|
22599
22975
|
// Set custom query in store
|
|
22600
22976
|
updateCustomQuery(this.componentId, this.setCustomQuery, this.$props, this.currentValue);
|
|
22601
|
-
},
|
|
22602
|
-
beforeMount: function beforeMount() {
|
|
22603
22977
|
if (this.selectedValue) {
|
|
22604
22978
|
this.setValue(this.selectedValue);
|
|
22605
22979
|
} else if (this.$props.value) {
|
|
@@ -22748,6 +23122,9 @@
|
|
|
22748
23122
|
componentType: constants_1$1.singleRange
|
|
22749
23123
|
}));
|
|
22750
23124
|
RangeConnected$1.name = SingleRange.name;
|
|
23125
|
+
RangeConnected$1.defaultQuery = SingleRange.defaultQuery;
|
|
23126
|
+
RangeConnected$1.parseValue = SingleRange.parseValue;
|
|
23127
|
+
RangeConnected$1.hasInternalComponent = SingleRange.hasInternalComponent;
|
|
22751
23128
|
RangeConnected$1.install = function (Vue) {
|
|
22752
23129
|
Vue.component(RangeConnected$1.name, RangeConnected$1);
|
|
22753
23130
|
};
|
|
@@ -22836,9 +23213,9 @@
|
|
|
22836
23213
|
currentValue = currentValue.filter(function (value) {
|
|
22837
23214
|
return value.label !== item;
|
|
22838
23215
|
});
|
|
22839
|
-
var
|
|
22840
|
-
del =
|
|
22841
|
-
selected = _objectWithoutPropertiesLoose(
|
|
23216
|
+
var _selectedValues2 = selectedValues,
|
|
23217
|
+
del = _selectedValues2[item],
|
|
23218
|
+
selected = _objectWithoutPropertiesLoose(_selectedValues2, [item].map(_toPropertyKey$1));
|
|
22842
23219
|
selectedValues = selected;
|
|
22843
23220
|
} else {
|
|
22844
23221
|
var _extends2;
|
|
@@ -22910,8 +23287,6 @@
|
|
|
22910
23287
|
created: function created() {
|
|
22911
23288
|
// Set custom query in store
|
|
22912
23289
|
updateCustomQuery(this.componentId, this.setCustomQuery, this.$props, this.currentValue);
|
|
22913
|
-
},
|
|
22914
|
-
beforeMount: function beforeMount() {
|
|
22915
23290
|
if (this.selectedValue) {
|
|
22916
23291
|
this.selectItem(this.selectedValue, true);
|
|
22917
23292
|
} else if (this.$props.value) {
|
|
@@ -22993,6 +23368,9 @@
|
|
|
22993
23368
|
componentType: constants_1$1.multiRange
|
|
22994
23369
|
}));
|
|
22995
23370
|
RangeConnected$2.name = MultiRange.name;
|
|
23371
|
+
RangeConnected$2.defaultQuery = MultiRange.defaultQuery;
|
|
23372
|
+
RangeConnected$2.parseValue = MultiRange.parseValue;
|
|
23373
|
+
RangeConnected$2.hasInternalComponent = MultiRange.hasInternalComponent;
|
|
22996
23374
|
RangeConnected$2.install = function (Vue) {
|
|
22997
23375
|
Vue.component(RangeConnected$2.name, RangeConnected$2);
|
|
22998
23376
|
};
|
|
@@ -23142,8 +23520,6 @@
|
|
|
23142
23520
|
|
|
23143
23521
|
// Set custom query in store
|
|
23144
23522
|
updateCustomQuery(this.componentId, this.setCustomQuery, this.$props, this.currentValue);
|
|
23145
|
-
},
|
|
23146
|
-
beforeMount: function beforeMount() {
|
|
23147
23523
|
var _this$$props = this.$props,
|
|
23148
23524
|
value = _this$$props.value,
|
|
23149
23525
|
defaultValue = _this$$props.defaultValue;
|
|
@@ -23239,6 +23615,9 @@
|
|
|
23239
23615
|
componentType: constants_1$1.rangeSlider
|
|
23240
23616
|
}));
|
|
23241
23617
|
RangeConnected$3.name = RangeSlider.name;
|
|
23618
|
+
RangeConnected$3.defaultQuery = RangeSlider.defaultQuery;
|
|
23619
|
+
RangeConnected$3.parseValue = RangeSlider.parseValue;
|
|
23620
|
+
RangeConnected$3.hasInternalComponent = RangeSlider.hasInternalComponent;
|
|
23242
23621
|
RangeConnected$3.install = function (Vue) {
|
|
23243
23622
|
Vue.component(RangeConnected$3.name, RangeConnected$3);
|
|
23244
23623
|
};
|
|
@@ -23876,13 +24255,13 @@
|
|
|
23876
24255
|
}
|
|
23877
24256
|
});
|
|
23878
24257
|
RcConnected.name = ReactiveComponent.name;
|
|
24258
|
+
RcConnected.hasInternalComponent = ReactiveComponent.hasInternalComponent;
|
|
24259
|
+
// Add componentType for SSR
|
|
24260
|
+
RcConnected.componentType = constants_1$1.reactiveComponent;
|
|
23879
24261
|
RcConnected.install = function (Vue) {
|
|
23880
24262
|
Vue.component(RcConnected.name, RcConnected);
|
|
23881
24263
|
};
|
|
23882
24264
|
|
|
23883
|
-
// Add componentType for SSR
|
|
23884
|
-
RcConnected.componentType = constants_1$1.reactiveComponent;
|
|
23885
|
-
|
|
23886
24265
|
var setValue$2 = lib_5.setValue,
|
|
23887
24266
|
clearValues = lib_5.clearValues,
|
|
23888
24267
|
resetValuesToDefault = lib_5.resetValuesToDefault;
|
|
@@ -26318,13 +26697,13 @@
|
|
|
26318
26697
|
var map = this.getMap();
|
|
26319
26698
|
if (map instanceof google.maps.Map && this.getProjection()) {
|
|
26320
26699
|
google.maps.event.trigger(this, MarkerClustererEvents.CLUSTERING_BEGIN, this);
|
|
26321
|
-
var _this$algorithm$
|
|
26700
|
+
var _this$algorithm$calcu2 = this.algorithm.calculate({
|
|
26322
26701
|
markers: this.markers,
|
|
26323
26702
|
map: map,
|
|
26324
26703
|
mapCanvasProjection: this.getProjection()
|
|
26325
26704
|
}),
|
|
26326
|
-
clusters = _this$algorithm$
|
|
26327
|
-
changed = _this$algorithm$
|
|
26705
|
+
clusters = _this$algorithm$calcu2.clusters,
|
|
26706
|
+
changed = _this$algorithm$calcu2.changed;
|
|
26328
26707
|
// allow algorithms to return flag on whether the clusters/markers have changed
|
|
26329
26708
|
if (changed || changed == undefined) {
|
|
26330
26709
|
// reset visibility of markers and clusters
|
|
@@ -27682,9 +28061,9 @@
|
|
|
27682
28061
|
var options = getQueryOptions$5(this.$props);
|
|
27683
28062
|
options.from = 0;
|
|
27684
28063
|
this.$defaultQuery = newVal(null, this.$props);
|
|
27685
|
-
var
|
|
27686
|
-
sort =
|
|
27687
|
-
query =
|
|
28064
|
+
var _ref2 = this.$defaultQuery || {},
|
|
28065
|
+
sort = _ref2.sort,
|
|
28066
|
+
query = _ref2.query;
|
|
27688
28067
|
if (sort) {
|
|
27689
28068
|
options.sort = this.$defaultQuery.sort;
|
|
27690
28069
|
}
|
|
@@ -28067,8 +28446,8 @@
|
|
|
28067
28446
|
geo_bounding_box: (_geo_bounding_box = {}, _geo_bounding_box[this.dataField] = boundingBoxCoordinates, _geo_bounding_box)
|
|
28068
28447
|
};
|
|
28069
28448
|
if (this.$defaultQuery) {
|
|
28070
|
-
var
|
|
28071
|
-
query =
|
|
28449
|
+
var _ref4 = this.$defaultQuery || {},
|
|
28450
|
+
query = _ref4.query;
|
|
28072
28451
|
if (query) {
|
|
28073
28452
|
// adds defaultQuery's query to geo-query
|
|
28074
28453
|
// to generate a map query
|
|
@@ -28111,8 +28490,8 @@
|
|
|
28111
28490
|
triggerClickAnalytics: function triggerClickAnalytics(searchPosition, documentId) {
|
|
28112
28491
|
var docId = documentId;
|
|
28113
28492
|
if (!docId) {
|
|
28114
|
-
var _this$
|
|
28115
|
-
data = _this$
|
|
28493
|
+
var _this$getData3 = this.getData(),
|
|
28494
|
+
data = _this$getData3.data;
|
|
28116
28495
|
var hitData = data.find(function (hit) {
|
|
28117
28496
|
return hit._click_id === searchPosition;
|
|
28118
28497
|
});
|
|
@@ -28203,10 +28582,10 @@
|
|
|
28203
28582
|
var options = getQueryOptions$5(this.$props);
|
|
28204
28583
|
options.from = this.$data.from;
|
|
28205
28584
|
if (this.$props.sortBy) {
|
|
28206
|
-
var
|
|
28207
|
-
options.sort = [(
|
|
28585
|
+
var _ref5;
|
|
28586
|
+
options.sort = [(_ref5 = {}, _ref5[this.$props.dataField] = {
|
|
28208
28587
|
order: this.$props.sortBy
|
|
28209
|
-
},
|
|
28588
|
+
}, _ref5)];
|
|
28210
28589
|
}
|
|
28211
28590
|
this.$defaultQuery = null;
|
|
28212
28591
|
if (this.$props.defaultQuery) {
|
|
@@ -29646,506 +30025,1061 @@
|
|
|
29646
30025
|
// Add componentType for SSR
|
|
29647
30026
|
ReactiveGoogleMap.componentType = constants_1$1.reactiveMap;
|
|
29648
30027
|
|
|
29649
|
-
var
|
|
29650
|
-
|
|
29651
|
-
|
|
29652
|
-
|
|
29653
|
-
|
|
29654
|
-
|
|
29655
|
-
|
|
29656
|
-
|
|
29657
|
-
|
|
29658
|
-
|
|
30028
|
+
var _PatchFlagNames, _slotFlagsText;
|
|
30029
|
+
/**
|
|
30030
|
+
* Make a map and return a function for checking if a key
|
|
30031
|
+
* is in that map.
|
|
30032
|
+
* IMPORTANT: all calls of this function must be prefixed with
|
|
30033
|
+
* \/\*#\_\_PURE\_\_\*\/
|
|
30034
|
+
* So that rollup can tree-shake them if necessary.
|
|
30035
|
+
*/
|
|
30036
|
+
function makeMap(str, expectsLowerCase) {
|
|
30037
|
+
var map = Object.create(null);
|
|
30038
|
+
var list = str.split(',');
|
|
30039
|
+
for (var i = 0; i < list.length; i++) {
|
|
30040
|
+
map[list[i]] = true;
|
|
30041
|
+
}
|
|
30042
|
+
return expectsLowerCase ? function (val) {
|
|
30043
|
+
return !!map[val.toLowerCase()];
|
|
30044
|
+
} : function (val) {
|
|
30045
|
+
return !!map[val];
|
|
30046
|
+
};
|
|
30047
|
+
}
|
|
30048
|
+
|
|
30049
|
+
/**
|
|
30050
|
+
* dev only flag -> name mapping
|
|
30051
|
+
*/
|
|
30052
|
+
var PatchFlagNames = (_PatchFlagNames = {}, _PatchFlagNames[1 /* PatchFlags.TEXT */] = "TEXT", _PatchFlagNames[2 /* PatchFlags.CLASS */] = "CLASS", _PatchFlagNames[4 /* PatchFlags.STYLE */] = "STYLE", _PatchFlagNames[8 /* PatchFlags.PROPS */] = "PROPS", _PatchFlagNames[16 /* PatchFlags.FULL_PROPS */] = "FULL_PROPS", _PatchFlagNames[32 /* PatchFlags.HYDRATE_EVENTS */] = "HYDRATE_EVENTS", _PatchFlagNames[64 /* PatchFlags.STABLE_FRAGMENT */] = "STABLE_FRAGMENT", _PatchFlagNames[128 /* PatchFlags.KEYED_FRAGMENT */] = "KEYED_FRAGMENT", _PatchFlagNames[256 /* PatchFlags.UNKEYED_FRAGMENT */] = "UNKEYED_FRAGMENT", _PatchFlagNames[512 /* PatchFlags.NEED_PATCH */] = "NEED_PATCH", _PatchFlagNames[1024 /* PatchFlags.DYNAMIC_SLOTS */] = "DYNAMIC_SLOTS", _PatchFlagNames[2048 /* PatchFlags.DEV_ROOT_FRAGMENT */] = "DEV_ROOT_FRAGMENT", _PatchFlagNames[-1 /* PatchFlags.HOISTED */] = "HOISTED", _PatchFlagNames[-2 /* PatchFlags.BAIL */] = "BAIL", _PatchFlagNames);
|
|
30053
|
+
|
|
30054
|
+
/**
|
|
30055
|
+
* Dev only
|
|
30056
|
+
*/
|
|
30057
|
+
var slotFlagsText = (_slotFlagsText = {}, _slotFlagsText[1 /* SlotFlags.STABLE */] = 'STABLE', _slotFlagsText[2 /* SlotFlags.DYNAMIC */] = 'DYNAMIC', _slotFlagsText[3 /* SlotFlags.FORWARDED */] = 'FORWARDED', _slotFlagsText);
|
|
30058
|
+
function normalizeStyle(value) {
|
|
30059
|
+
if (isArray(value)) {
|
|
30060
|
+
var res = {};
|
|
30061
|
+
for (var i = 0; i < value.length; i++) {
|
|
30062
|
+
var item = value[i];
|
|
30063
|
+
var normalized = isString(item) ? parseStringStyle(item) : normalizeStyle(item);
|
|
30064
|
+
if (normalized) {
|
|
30065
|
+
for (var key in normalized) {
|
|
30066
|
+
res[key] = normalized[key];
|
|
29659
30067
|
}
|
|
29660
30068
|
}
|
|
29661
30069
|
}
|
|
29662
|
-
return
|
|
29663
|
-
}
|
|
29664
|
-
|
|
29665
|
-
|
|
29666
|
-
return
|
|
29667
|
-
"default": obj
|
|
29668
|
-
};
|
|
30070
|
+
return res;
|
|
30071
|
+
} else if (isString(value)) {
|
|
30072
|
+
return value;
|
|
30073
|
+
} else if (isObject$1(value)) {
|
|
30074
|
+
return value;
|
|
29669
30075
|
}
|
|
29670
|
-
|
|
29671
|
-
|
|
29672
|
-
|
|
29673
|
-
|
|
29674
|
-
|
|
29675
|
-
|
|
29676
|
-
|
|
29677
|
-
|
|
29678
|
-
|
|
29679
|
-
|
|
29680
|
-
body: '\n\t\t\tquery{\n\t\t\t\telastic77(host: "' + fetchUrl + '"){\n\t\t\t\t\tmsearch(\n\t\t\t\t\t\tindex: "' + app + '"\n\t\t\t\t\t\tbody: ' + JSON.stringify(query.map(function (item) {
|
|
29681
|
-
return JSON.stringify(item);
|
|
29682
|
-
})) + '\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t}\n\t\t',
|
|
29683
|
-
headers: _extends({}, headers, {
|
|
29684
|
-
'Content-Type': 'application/graphql'
|
|
29685
|
-
})
|
|
29686
|
-
}).then(function (res) {
|
|
29687
|
-
return res.json();
|
|
29688
|
-
}).then(function (jsonRes) {
|
|
29689
|
-
return jsonRes.data.elastic77.msearch;
|
|
29690
|
-
})["catch"](function (error) {
|
|
29691
|
-
console.error(error);
|
|
29692
|
-
});
|
|
29693
|
-
};
|
|
29694
|
-
exports["default"] = fetchGraphQL;
|
|
29695
|
-
});
|
|
29696
|
-
var fetchGraphQL = unwrapExports(graphQL);
|
|
29697
|
-
|
|
29698
|
-
var _excluded$a = ["aggs", "size"],
|
|
29699
|
-
_excluded2 = ["query"],
|
|
29700
|
-
_excluded3 = ["query"];
|
|
29701
|
-
var _componentTypeToDefau;
|
|
29702
|
-
var X_SEARCH_CLIENT$1 = 'ReactiveSearch Vue';
|
|
29703
|
-
var componentsWithoutFilters = [constants_1$1.numberBox, constants_1$1.ratingsFilter];
|
|
29704
|
-
var resultComponents = [constants_1$1.reactiveList, constants_1$1.reactiveMap];
|
|
29705
|
-
var componentTypeToDefaultValue = (_componentTypeToDefau = {}, _componentTypeToDefau[constants_1$1.singleList] = '', _componentTypeToDefau[constants_1$1.multiList] = [], _componentTypeToDefau[constants_1$1.singleDataList] = '', _componentTypeToDefau[constants_1$1.singleDropdownList] = '', _componentTypeToDefau[constants_1$1.multiDataList] = [], _componentTypeToDefau[constants_1$1.multiDropdownList] = [], _componentTypeToDefau[constants_1$1.tagCloud] = '', _componentTypeToDefau[constants_1$1.toggleButton] = '', _componentTypeToDefau[constants_1$1.singleDropdownRange] = '', _componentTypeToDefau[constants_1$1.multiDropdownRange] = [], _componentTypeToDefau[constants_1$1.singleRange] = '', _componentTypeToDefau[constants_1$1.multiRange] = [], _componentTypeToDefau);
|
|
29706
|
-
function getValue(state, id, defaultValue, componentType) {
|
|
29707
|
-
if (state && state[id]) {
|
|
29708
|
-
try {
|
|
29709
|
-
// parsing for next.js - since it uses extra set of quotes to wrap params
|
|
29710
|
-
var parsedValue = JSON.parse(state[id]);
|
|
29711
|
-
return {
|
|
29712
|
-
value: parsedValue,
|
|
29713
|
-
reference: 'URL'
|
|
29714
|
-
};
|
|
29715
|
-
} catch (error) {
|
|
29716
|
-
// using react-dom-server for ssr
|
|
29717
|
-
return {
|
|
29718
|
-
value: state[id],
|
|
29719
|
-
reference: 'URL'
|
|
29720
|
-
};
|
|
30076
|
+
}
|
|
30077
|
+
var listDelimiterRE = /;(?![^(]*\))/g;
|
|
30078
|
+
var propertyDelimiterRE = /:([^]+)/;
|
|
30079
|
+
var styleCommentRE = /\/\*[\s\S]*?\*\//g;
|
|
30080
|
+
function parseStringStyle(cssText) {
|
|
30081
|
+
var ret = {};
|
|
30082
|
+
cssText.replace(styleCommentRE, '').split(listDelimiterRE).forEach(function (item) {
|
|
30083
|
+
if (item) {
|
|
30084
|
+
var tmp = item.split(propertyDelimiterRE);
|
|
30085
|
+
tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim());
|
|
29721
30086
|
}
|
|
30087
|
+
});
|
|
30088
|
+
return ret;
|
|
30089
|
+
}
|
|
30090
|
+
function stringifyStyle(styles) {
|
|
30091
|
+
var ret = '';
|
|
30092
|
+
if (!styles || isString(styles)) {
|
|
30093
|
+
return ret;
|
|
29722
30094
|
}
|
|
29723
|
-
|
|
29724
|
-
value
|
|
29725
|
-
|
|
29726
|
-
|
|
30095
|
+
for (var key in styles) {
|
|
30096
|
+
var value = styles[key];
|
|
30097
|
+
var normalizedKey = key.startsWith("--") ? key : hyphenate(key);
|
|
30098
|
+
if (isString(value) || typeof value === 'number') {
|
|
30099
|
+
// only render valid values
|
|
30100
|
+
ret += normalizedKey + ":" + value + ";";
|
|
30101
|
+
}
|
|
30102
|
+
}
|
|
30103
|
+
return ret;
|
|
29727
30104
|
}
|
|
29728
|
-
function
|
|
29729
|
-
|
|
29730
|
-
|
|
30105
|
+
function normalizeClass(value) {
|
|
30106
|
+
var res = '';
|
|
30107
|
+
if (isString(value)) {
|
|
30108
|
+
res = value;
|
|
30109
|
+
} else if (isArray(value)) {
|
|
30110
|
+
for (var i = 0; i < value.length; i++) {
|
|
30111
|
+
var normalized = normalizeClass(value[i]);
|
|
30112
|
+
if (normalized) {
|
|
30113
|
+
res += normalized + ' ';
|
|
30114
|
+
}
|
|
30115
|
+
}
|
|
30116
|
+
} else if (isObject$1(value)) {
|
|
30117
|
+
for (var name in value) {
|
|
30118
|
+
if (value[name]) {
|
|
30119
|
+
res += name + ' ';
|
|
30120
|
+
}
|
|
30121
|
+
}
|
|
29731
30122
|
}
|
|
29732
|
-
return
|
|
30123
|
+
return res.trim();
|
|
29733
30124
|
}
|
|
30125
|
+
// https://developer.mozilla.org/en-US/docs/Web/SVG/Element
|
|
30126
|
+
var SVG_TAGS = 'svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,' + 'defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,' + 'feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,' + 'feDistanceLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,' + 'feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,' + 'fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,' + 'foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,' + 'mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,' + 'polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,' + 'text,textPath,title,tspan,unknown,use,view';
|
|
30127
|
+
var VOID_TAGS = 'area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr';
|
|
30128
|
+
/**
|
|
30129
|
+
* Compiler only.
|
|
30130
|
+
* Do NOT use in runtime code paths unless behind `("development" !== 'production')` flag.
|
|
30131
|
+
*/
|
|
30132
|
+
var isSVGTag = /*#__PURE__*/makeMap(SVG_TAGS);
|
|
30133
|
+
/**
|
|
30134
|
+
* Compiler only.
|
|
30135
|
+
* Do NOT use in runtime code paths unless behind `("development" !== 'production')` flag.
|
|
30136
|
+
*/
|
|
30137
|
+
var isVoidTag = /*#__PURE__*/makeMap(VOID_TAGS);
|
|
29734
30138
|
|
|
29735
|
-
|
|
29736
|
-
|
|
29737
|
-
|
|
29738
|
-
|
|
29739
|
-
|
|
29740
|
-
|
|
29741
|
-
|
|
29742
|
-
|
|
29743
|
-
|
|
29744
|
-
|
|
29745
|
-
|
|
29746
|
-
|
|
29747
|
-
|
|
29748
|
-
|
|
29749
|
-
|
|
29750
|
-
|
|
29751
|
-
|
|
29752
|
-
|
|
29753
|
-
|
|
29754
|
-
|
|
29755
|
-
|
|
29756
|
-
|
|
29757
|
-
|
|
29758
|
-
|
|
30139
|
+
/**
|
|
30140
|
+
* On the client we only need to offer special cases for boolean attributes that
|
|
30141
|
+
* have different names from their corresponding dom properties:
|
|
30142
|
+
* - itemscope -> N/A
|
|
30143
|
+
* - allowfullscreen -> allowFullscreen
|
|
30144
|
+
* - formnovalidate -> formNoValidate
|
|
30145
|
+
* - ismap -> isMap
|
|
30146
|
+
* - nomodule -> noModule
|
|
30147
|
+
* - novalidate -> noValidate
|
|
30148
|
+
* - readonly -> readOnly
|
|
30149
|
+
*/
|
|
30150
|
+
var specialBooleanAttrs = "itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly";
|
|
30151
|
+
/**
|
|
30152
|
+
* The full list is needed during SSR to produce the correct initial markup.
|
|
30153
|
+
*/
|
|
30154
|
+
var isBooleanAttr = /*#__PURE__*/makeMap(specialBooleanAttrs + ",async,autofocus,autoplay,controls,default,defer,disabled,hidden," + "loop,open,required,reversed,scoped,seamless," + "checked,muted,multiple,selected");
|
|
30155
|
+
/**
|
|
30156
|
+
* Boolean attributes should be included if the value is truthy or ''.
|
|
30157
|
+
* e.g. `<select multiple>` compiles to `{ multiple: '' }`
|
|
30158
|
+
*/
|
|
30159
|
+
function includeBooleanAttr(value) {
|
|
30160
|
+
return !!value || value === '';
|
|
30161
|
+
}
|
|
30162
|
+
var unsafeAttrCharRE = /[>/="'\u0009\u000a\u000c\u0020]/;
|
|
30163
|
+
var attrValidationCache = {};
|
|
30164
|
+
function isSSRSafeAttrName(name) {
|
|
30165
|
+
if (attrValidationCache.hasOwnProperty(name)) {
|
|
30166
|
+
return attrValidationCache[name];
|
|
30167
|
+
}
|
|
30168
|
+
var isUnsafe = unsafeAttrCharRE.test(name);
|
|
30169
|
+
if (isUnsafe) {
|
|
30170
|
+
console.error("unsafe attribute name: " + name);
|
|
29759
30171
|
}
|
|
29760
|
-
return
|
|
29761
|
-
query: component.source.defaultQuery(currentValue, component)
|
|
29762
|
-
} : null;
|
|
30172
|
+
return attrValidationCache[name] = !isUnsafe;
|
|
29763
30173
|
}
|
|
29764
|
-
|
|
29765
|
-
|
|
29766
|
-
|
|
29767
|
-
|
|
29768
|
-
|
|
29769
|
-
|
|
29770
|
-
|
|
29771
|
-
|
|
29772
|
-
|
|
29773
|
-
|
|
29774
|
-
|
|
29775
|
-
|
|
29776
|
-
|
|
29777
|
-
|
|
29778
|
-
|
|
29779
|
-
|
|
29780
|
-
|
|
29781
|
-
|
|
29782
|
-
|
|
29783
|
-
|
|
29784
|
-
|
|
29785
|
-
|
|
29786
|
-
|
|
30174
|
+
var propsToAttrMap = {
|
|
30175
|
+
acceptCharset: 'accept-charset',
|
|
30176
|
+
className: 'class',
|
|
30177
|
+
htmlFor: 'for',
|
|
30178
|
+
httpEquiv: 'http-equiv'
|
|
30179
|
+
};
|
|
30180
|
+
var escapeRE = /["'&<>]/;
|
|
30181
|
+
function escapeHtml(string) {
|
|
30182
|
+
var str = '' + string;
|
|
30183
|
+
var match = escapeRE.exec(str);
|
|
30184
|
+
if (!match) {
|
|
30185
|
+
return str;
|
|
30186
|
+
}
|
|
30187
|
+
var html = '';
|
|
30188
|
+
var escaped;
|
|
30189
|
+
var index;
|
|
30190
|
+
var lastIndex = 0;
|
|
30191
|
+
for (index = match.index; index < str.length; index++) {
|
|
30192
|
+
switch (str.charCodeAt(index)) {
|
|
30193
|
+
case 34:
|
|
30194
|
+
// "
|
|
30195
|
+
escaped = '"';
|
|
30196
|
+
break;
|
|
30197
|
+
case 38:
|
|
30198
|
+
// &
|
|
30199
|
+
escaped = '&';
|
|
30200
|
+
break;
|
|
30201
|
+
case 39:
|
|
30202
|
+
// '
|
|
30203
|
+
escaped = ''';
|
|
30204
|
+
break;
|
|
30205
|
+
case 60:
|
|
30206
|
+
// <
|
|
30207
|
+
escaped = '<';
|
|
30208
|
+
break;
|
|
30209
|
+
case 62:
|
|
30210
|
+
// >
|
|
30211
|
+
escaped = '>';
|
|
30212
|
+
break;
|
|
30213
|
+
default:
|
|
30214
|
+
continue;
|
|
29787
30215
|
}
|
|
29788
|
-
|
|
29789
|
-
|
|
29790
|
-
|
|
29791
|
-
|
|
29792
|
-
|
|
29793
|
-
|
|
29794
|
-
|
|
29795
|
-
|
|
29796
|
-
|
|
29797
|
-
|
|
29798
|
-
|
|
29799
|
-
|
|
29800
|
-
|
|
29801
|
-
|
|
29802
|
-
|
|
29803
|
-
|
|
30216
|
+
if (lastIndex !== index) {
|
|
30217
|
+
html += str.slice(lastIndex, index);
|
|
30218
|
+
}
|
|
30219
|
+
lastIndex = index + 1;
|
|
30220
|
+
html += escaped;
|
|
30221
|
+
}
|
|
30222
|
+
return lastIndex !== index ? html + str.slice(lastIndex, index) : html;
|
|
30223
|
+
}
|
|
30224
|
+
// https://www.w3.org/TR/html52/syntax.html#comments
|
|
30225
|
+
var commentStripRE = /^-?>|<!--|-->|--!>|<!-$/g;
|
|
30226
|
+
function escapeHtmlComment(src) {
|
|
30227
|
+
return src.replace(commentStripRE, '');
|
|
30228
|
+
}
|
|
30229
|
+
var EMPTY_OBJ = Object.freeze({}) ;
|
|
30230
|
+
var EMPTY_ARR = Object.freeze([]) ;
|
|
30231
|
+
var NOOP = function NOOP() {};
|
|
30232
|
+
var onRE = /^on[^a-z]/;
|
|
30233
|
+
var isOn = function isOn(key) {
|
|
30234
|
+
return onRE.test(key);
|
|
30235
|
+
};
|
|
30236
|
+
var isArray = Array.isArray;
|
|
30237
|
+
var isFunction$1 = function isFunction(val) {
|
|
30238
|
+
return typeof val === 'function';
|
|
30239
|
+
};
|
|
30240
|
+
var isString = function isString(val) {
|
|
30241
|
+
return typeof val === 'string';
|
|
30242
|
+
};
|
|
30243
|
+
var isObject$1 = function isObject(val) {
|
|
30244
|
+
return val !== null && typeof val === 'object';
|
|
30245
|
+
};
|
|
30246
|
+
var isPromise = function isPromise(val) {
|
|
30247
|
+
return isObject$1(val) && isFunction$1(val.then) && isFunction$1(val["catch"]);
|
|
30248
|
+
};
|
|
30249
|
+
var cacheStringFunction = function cacheStringFunction(fn) {
|
|
30250
|
+
var cache = Object.create(null);
|
|
30251
|
+
return function (str) {
|
|
30252
|
+
var hit = cache[str];
|
|
30253
|
+
return hit || (cache[str] = fn(str));
|
|
30254
|
+
};
|
|
30255
|
+
};
|
|
30256
|
+
var hyphenateRE = /\B([A-Z])/g;
|
|
30257
|
+
/**
|
|
30258
|
+
* @private
|
|
30259
|
+
*/
|
|
30260
|
+
var hyphenate = cacheStringFunction(function (str) {
|
|
30261
|
+
return str.replace(hyphenateRE, '-$1').toLowerCase();
|
|
30262
|
+
});
|
|
30263
|
+
|
|
30264
|
+
var _ErrorTypeStrings;
|
|
30265
|
+
|
|
30266
|
+
// leading comma for empty string ""
|
|
30267
|
+
var shouldIgnoreProp = makeMap(",key,ref,innerHTML,textContent,ref_key,ref_for");
|
|
30268
|
+
function ssrRenderAttrs(props, tag) {
|
|
30269
|
+
var ret = '';
|
|
30270
|
+
for (var key in props) {
|
|
30271
|
+
if (shouldIgnoreProp(key) || isOn(key) || tag === 'textarea' && key === 'value') {
|
|
30272
|
+
continue;
|
|
29804
30273
|
}
|
|
29805
|
-
|
|
29806
|
-
|
|
30274
|
+
var value = props[key];
|
|
30275
|
+
if (key === 'class') {
|
|
30276
|
+
ret += " class=\"" + ssrRenderClass(value) + "\"";
|
|
30277
|
+
} else if (key === 'style') {
|
|
30278
|
+
ret += " style=\"" + ssrRenderStyle(value) + "\"";
|
|
30279
|
+
} else {
|
|
30280
|
+
ret += ssrRenderDynamicAttr(key, value, tag);
|
|
29807
30281
|
}
|
|
29808
|
-
|
|
29809
|
-
|
|
29810
|
-
|
|
29811
|
-
|
|
29812
|
-
|
|
29813
|
-
|
|
29814
|
-
|
|
29815
|
-
|
|
29816
|
-
|
|
29817
|
-
|
|
29818
|
-
|
|
29819
|
-
|
|
29820
|
-
|
|
29821
|
-
|
|
29822
|
-
|
|
29823
|
-
|
|
29824
|
-
|
|
29825
|
-
|
|
29826
|
-
|
|
29827
|
-
|
|
29828
|
-
|
|
29829
|
-
|
|
29830
|
-
|
|
29831
|
-
|
|
29832
|
-
|
|
30282
|
+
}
|
|
30283
|
+
return ret;
|
|
30284
|
+
}
|
|
30285
|
+
// render an attr with dynamic (unknown) key.
|
|
30286
|
+
function ssrRenderDynamicAttr(key, value, tag) {
|
|
30287
|
+
if (!isRenderableValue(value)) {
|
|
30288
|
+
return "";
|
|
30289
|
+
}
|
|
30290
|
+
var attrKey = tag && (tag.indexOf('-') > 0 || isSVGTag(tag)) ? key // preserve raw name on custom elements and svg
|
|
30291
|
+
: propsToAttrMap[key] || key.toLowerCase();
|
|
30292
|
+
if (isBooleanAttr(attrKey)) {
|
|
30293
|
+
return includeBooleanAttr(value) ? " " + attrKey : "";
|
|
30294
|
+
} else if (isSSRSafeAttrName(attrKey)) {
|
|
30295
|
+
return value === '' ? " " + attrKey : " " + attrKey + "=\"" + escapeHtml(value) + "\"";
|
|
30296
|
+
} else {
|
|
30297
|
+
console.warn("[@vue/server-renderer] Skipped rendering unsafe attribute name: " + attrKey);
|
|
30298
|
+
return "";
|
|
30299
|
+
}
|
|
30300
|
+
}
|
|
30301
|
+
function isRenderableValue(value) {
|
|
30302
|
+
if (value == null) {
|
|
30303
|
+
return false;
|
|
30304
|
+
}
|
|
30305
|
+
var type = typeof value;
|
|
30306
|
+
return type === 'string' || type === 'number' || type === 'boolean';
|
|
30307
|
+
}
|
|
30308
|
+
function ssrRenderClass(raw) {
|
|
30309
|
+
return escapeHtml(normalizeClass(raw));
|
|
30310
|
+
}
|
|
30311
|
+
function ssrRenderStyle(raw) {
|
|
30312
|
+
if (!raw) {
|
|
30313
|
+
return '';
|
|
30314
|
+
}
|
|
30315
|
+
if (isString(raw)) {
|
|
30316
|
+
return escapeHtml(raw);
|
|
30317
|
+
}
|
|
30318
|
+
var styles = normalizeStyle(raw);
|
|
30319
|
+
return escapeHtml(stringifyStyle(styles));
|
|
30320
|
+
}
|
|
30321
|
+
function ssrCompile(template, instance) {
|
|
30322
|
+
{
|
|
30323
|
+
throw new Error("On-the-fly template compilation is not supported in the ESM build of " + "@vue/server-renderer. All templates must be pre-compiled into " + "render functions.");
|
|
30324
|
+
}
|
|
30325
|
+
}
|
|
30326
|
+
function ssrRenderTeleport(parentPush, contentRenderFn, target, disabled, parentComponent) {
|
|
30327
|
+
parentPush('<!--teleport start-->');
|
|
30328
|
+
var context = parentComponent.appContext.provides[vue.ssrContextKey];
|
|
30329
|
+
var teleportBuffers = context.__teleportBuffers || (context.__teleportBuffers = {});
|
|
30330
|
+
var targetBuffer = teleportBuffers[target] || (teleportBuffers[target] = []);
|
|
30331
|
+
// record current index of the target buffer to handle nested teleports
|
|
30332
|
+
// since the parent needs to be rendered before the child
|
|
30333
|
+
var bufferIndex = targetBuffer.length;
|
|
30334
|
+
var teleportContent;
|
|
30335
|
+
if (disabled) {
|
|
30336
|
+
contentRenderFn(parentPush);
|
|
30337
|
+
teleportContent = "<!--teleport anchor-->";
|
|
30338
|
+
} else {
|
|
30339
|
+
var _createBuffer2 = createBuffer(),
|
|
30340
|
+
getBuffer = _createBuffer2.getBuffer,
|
|
30341
|
+
push = _createBuffer2.push;
|
|
30342
|
+
contentRenderFn(push);
|
|
30343
|
+
push("<!--teleport anchor-->");
|
|
30344
|
+
teleportContent = getBuffer();
|
|
30345
|
+
}
|
|
30346
|
+
targetBuffer.splice(bufferIndex, 0, teleportContent);
|
|
30347
|
+
parentPush('<!--teleport end-->');
|
|
30348
|
+
}
|
|
30349
|
+
var createComponentInstance = vue.ssrUtils.createComponentInstance,
|
|
30350
|
+
setCurrentRenderingInstance = vue.ssrUtils.setCurrentRenderingInstance,
|
|
30351
|
+
setupComponent = vue.ssrUtils.setupComponent,
|
|
30352
|
+
renderComponentRoot = vue.ssrUtils.renderComponentRoot,
|
|
30353
|
+
normalizeVNode = vue.ssrUtils.normalizeVNode;
|
|
30354
|
+
// Each component has a buffer array.
|
|
30355
|
+
// A buffer array can contain one of the following:
|
|
30356
|
+
// - plain string
|
|
30357
|
+
// - A resolved buffer (recursive arrays of strings that can be unrolled
|
|
30358
|
+
// synchronously)
|
|
30359
|
+
// - An async buffer (a Promise that resolves to a resolved buffer)
|
|
30360
|
+
function createBuffer() {
|
|
30361
|
+
var appendable = false;
|
|
30362
|
+
var buffer = [];
|
|
30363
|
+
return {
|
|
30364
|
+
getBuffer: function getBuffer() {
|
|
30365
|
+
// Return static buffer and await on items during unroll stage
|
|
30366
|
+
return buffer;
|
|
30367
|
+
},
|
|
30368
|
+
push: function push(item) {
|
|
30369
|
+
var isStringItem = isString(item);
|
|
30370
|
+
if (appendable && isStringItem) {
|
|
30371
|
+
buffer[buffer.length - 1] += item;
|
|
30372
|
+
} else {
|
|
30373
|
+
buffer.push(item);
|
|
30374
|
+
}
|
|
30375
|
+
appendable = isStringItem;
|
|
30376
|
+
if (isPromise(item) || isArray(item) && item.hasAsync) {
|
|
30377
|
+
// promise, or child buffer with async, mark as async.
|
|
30378
|
+
// this allows skipping unnecessary await ticks during unroll stage
|
|
30379
|
+
buffer.hasAsync = true;
|
|
30380
|
+
}
|
|
30381
|
+
}
|
|
30382
|
+
};
|
|
30383
|
+
}
|
|
30384
|
+
function renderComponentVNode(vnode, parentComponent, slotScopeId) {
|
|
30385
|
+
if (parentComponent === void 0) {
|
|
30386
|
+
parentComponent = null;
|
|
30387
|
+
}
|
|
30388
|
+
var instance = createComponentInstance(vnode, parentComponent, null);
|
|
30389
|
+
var res = setupComponent(instance, true /* isSSR */);
|
|
30390
|
+
var hasAsyncSetup = isPromise(res);
|
|
30391
|
+
var prefetches = instance.sp; /* LifecycleHooks.SERVER_PREFETCH */
|
|
30392
|
+
if (hasAsyncSetup || prefetches) {
|
|
30393
|
+
var p = hasAsyncSetup ? res : Promise.resolve();
|
|
30394
|
+
if (prefetches) {
|
|
30395
|
+
p = p.then(function () {
|
|
30396
|
+
return Promise.all(prefetches.map(function (prefetch) {
|
|
30397
|
+
return prefetch.call(instance.proxy);
|
|
30398
|
+
}));
|
|
30399
|
+
})
|
|
30400
|
+
// Note: error display is already done by the wrapped lifecycle hook function.
|
|
30401
|
+
["catch"](function () {});
|
|
30402
|
+
}
|
|
30403
|
+
return p.then(function () {
|
|
30404
|
+
return renderComponentSubTree(instance, slotScopeId);
|
|
30405
|
+
});
|
|
30406
|
+
} else {
|
|
30407
|
+
return renderComponentSubTree(instance, slotScopeId);
|
|
30408
|
+
}
|
|
30409
|
+
}
|
|
30410
|
+
function renderComponentSubTree(instance, slotScopeId) {
|
|
30411
|
+
var comp = instance.type;
|
|
30412
|
+
var _createBuffer = createBuffer(),
|
|
30413
|
+
getBuffer = _createBuffer.getBuffer,
|
|
30414
|
+
push = _createBuffer.push;
|
|
30415
|
+
if (isFunction$1(comp)) {
|
|
30416
|
+
var root = renderComponentRoot(instance);
|
|
30417
|
+
// #5817 scope ID attrs not falling through if functional component doesn't
|
|
30418
|
+
// have props
|
|
30419
|
+
if (!comp.props) {
|
|
30420
|
+
for (var key in instance.attrs) {
|
|
30421
|
+
if (key.startsWith("data-v-")) {
|
|
30422
|
+
(root.props || (root.props = {}))[key] = "";
|
|
30423
|
+
}
|
|
30424
|
+
}
|
|
30425
|
+
}
|
|
30426
|
+
renderVNode(push, instance.subTree = root, instance, slotScopeId);
|
|
30427
|
+
} else {
|
|
30428
|
+
if ((!instance.render || instance.render === NOOP) && !instance.ssrRender && !comp.ssrRender && isString(comp.template)) {
|
|
30429
|
+
comp.ssrRender = ssrCompile(comp.template);
|
|
30430
|
+
}
|
|
30431
|
+
// perf: enable caching of computed getters during render
|
|
30432
|
+
// since there cannot be state mutations during render.
|
|
30433
|
+
for (var _iterator = _createForOfIteratorHelperLoose(instance.scope.effects), _step; !(_step = _iterator()).done;) {
|
|
30434
|
+
var e = _step.value;
|
|
30435
|
+
if (e.computed) e.computed._cacheable = true;
|
|
30436
|
+
}
|
|
30437
|
+
var ssrRender = instance.ssrRender || comp.ssrRender;
|
|
30438
|
+
if (ssrRender) {
|
|
30439
|
+
// optimized
|
|
30440
|
+
// resolve fallthrough attrs
|
|
30441
|
+
var attrs = instance.inheritAttrs !== false ? instance.attrs : undefined;
|
|
30442
|
+
var hasCloned = false;
|
|
30443
|
+
var cur = instance;
|
|
30444
|
+
while (true) {
|
|
30445
|
+
var scopeId = cur.vnode.scopeId;
|
|
30446
|
+
if (scopeId) {
|
|
30447
|
+
if (!hasCloned) {
|
|
30448
|
+
attrs = _extends({}, attrs);
|
|
30449
|
+
hasCloned = true;
|
|
30450
|
+
}
|
|
30451
|
+
attrs[scopeId] = '';
|
|
30452
|
+
}
|
|
30453
|
+
var parent = cur.parent;
|
|
30454
|
+
if (parent && parent.subTree && parent.subTree === cur.vnode) {
|
|
30455
|
+
// parent is a non-SSR compiled component and is rendering this
|
|
30456
|
+
// component as root. inherit its scopeId if present.
|
|
30457
|
+
cur = parent;
|
|
30458
|
+
} else {
|
|
30459
|
+
break;
|
|
29833
30460
|
}
|
|
29834
|
-
});
|
|
29835
|
-
var isInternalComponentPresent = false;
|
|
29836
|
-
if (component.source.hasInternalComponent) {
|
|
29837
|
-
isInternalComponentPresent = component.source.hasInternalComponent(component);
|
|
29838
|
-
}
|
|
29839
|
-
var isResultComponent = resultComponents.includes(componentType);
|
|
29840
|
-
var internalComponent = component.componentId + "__internal";
|
|
29841
|
-
var label = component.filterLabel || component.componentId;
|
|
29842
|
-
var _getValue = getValue(searchState, component.componentId, component.value || component.defaultValue, componentType),
|
|
29843
|
-
value = _getValue.value,
|
|
29844
|
-
reference = _getValue.reference;
|
|
29845
|
-
// [1] set selected values
|
|
29846
|
-
var showFilter = component.showFilter !== undefined ? component.showFilter : true;
|
|
29847
|
-
if (componentsWithoutFilters.includes(componentType)) {
|
|
29848
|
-
showFilter = false;
|
|
29849
|
-
}
|
|
29850
|
-
selectedValues = valueReducer(selectedValues, {
|
|
29851
|
-
type: 'SET_VALUE',
|
|
29852
|
-
component: component.componentId,
|
|
29853
|
-
label: label,
|
|
29854
|
-
value: value,
|
|
29855
|
-
reference: reference,
|
|
29856
|
-
showFilter: showFilter,
|
|
29857
|
-
URLParams: component.URLParams || false
|
|
29858
|
-
});
|
|
29859
|
-
// Set custom and default queries
|
|
29860
|
-
if (component.customQuery && typeof component.customQuery === 'function') {
|
|
29861
|
-
customQueries[component.componentId] = component.customQuery(value, compProps);
|
|
29862
30461
|
}
|
|
29863
|
-
if (
|
|
29864
|
-
|
|
30462
|
+
if (slotScopeId) {
|
|
30463
|
+
if (!hasCloned) attrs = _extends({}, attrs);
|
|
30464
|
+
attrs[slotScopeId.trim()] = '';
|
|
29865
30465
|
}
|
|
29866
|
-
|
|
29867
|
-
|
|
29868
|
-
|
|
29869
|
-
|
|
30466
|
+
// set current rendering instance for asset resolution
|
|
30467
|
+
var prev = setCurrentRenderingInstance(instance);
|
|
30468
|
+
try {
|
|
30469
|
+
ssrRender(instance.proxy, push, instance, attrs,
|
|
30470
|
+
// compiler-optimized bindings
|
|
30471
|
+
instance.props, instance.setupState, instance.data, instance.ctx);
|
|
30472
|
+
} finally {
|
|
30473
|
+
setCurrentRenderingInstance(prev);
|
|
29870
30474
|
}
|
|
29871
|
-
|
|
29872
|
-
|
|
29873
|
-
|
|
30475
|
+
} else if (instance.render && instance.render !== NOOP) {
|
|
30476
|
+
renderVNode(push, instance.subTree = renderComponentRoot(instance), instance, slotScopeId);
|
|
30477
|
+
} else {
|
|
30478
|
+
var componentName = comp.name || comp.__file || "<Anonymous>";
|
|
30479
|
+
vue.warn("Component " + componentName + " is missing template or render function.");
|
|
30480
|
+
push("<!---->");
|
|
30481
|
+
}
|
|
30482
|
+
}
|
|
30483
|
+
return getBuffer();
|
|
30484
|
+
}
|
|
30485
|
+
function renderVNode(push, vnode, parentComponent, slotScopeId) {
|
|
30486
|
+
var type = vnode.type,
|
|
30487
|
+
shapeFlag = vnode.shapeFlag,
|
|
30488
|
+
children = vnode.children;
|
|
30489
|
+
switch (type) {
|
|
30490
|
+
case vue.Text:
|
|
30491
|
+
push(escapeHtml(children));
|
|
30492
|
+
break;
|
|
30493
|
+
case vue.Comment:
|
|
30494
|
+
push(children ? "<!--" + escapeHtmlComment(children) + "-->" : "<!---->");
|
|
30495
|
+
break;
|
|
30496
|
+
case vue.Static:
|
|
30497
|
+
push(children);
|
|
30498
|
+
break;
|
|
30499
|
+
case vue.Fragment:
|
|
30500
|
+
if (vnode.slotScopeIds) {
|
|
30501
|
+
slotScopeId = (slotScopeId ? slotScopeId + ' ' : '') + vnode.slotScopeIds.join(' ');
|
|
29874
30502
|
}
|
|
29875
|
-
|
|
29876
|
-
|
|
29877
|
-
|
|
29878
|
-
|
|
29879
|
-
|
|
29880
|
-
|
|
29881
|
-
|
|
29882
|
-
|
|
29883
|
-
|
|
29884
|
-
|
|
29885
|
-
|
|
29886
|
-
|
|
29887
|
-
|
|
29888
|
-
|
|
29889
|
-
|
|
29890
|
-
|
|
29891
|
-
|
|
29892
|
-
|
|
29893
|
-
|
|
29894
|
-
|
|
29895
|
-
|
|
29896
|
-
|
|
29897
|
-
|
|
30503
|
+
push("<!--[-->"); // open
|
|
30504
|
+
renderVNodeChildren(push, children, parentComponent, slotScopeId);
|
|
30505
|
+
push("<!--]-->"); // close
|
|
30506
|
+
break;
|
|
30507
|
+
default:
|
|
30508
|
+
if (shapeFlag & 1 /* ShapeFlags.ELEMENT */) {
|
|
30509
|
+
renderElementVNode(push, vnode, parentComponent, slotScopeId);
|
|
30510
|
+
} else if (shapeFlag & 6 /* ShapeFlags.COMPONENT */) {
|
|
30511
|
+
push(renderComponentVNode(vnode, parentComponent, slotScopeId));
|
|
30512
|
+
} else if (shapeFlag & 64 /* ShapeFlags.TELEPORT */) {
|
|
30513
|
+
renderTeleportVNode(push, vnode, parentComponent, slotScopeId);
|
|
30514
|
+
} else if (shapeFlag & 128 /* ShapeFlags.SUSPENSE */) {
|
|
30515
|
+
renderVNode(push, vnode.ssContent, parentComponent, slotScopeId);
|
|
30516
|
+
} else {
|
|
30517
|
+
vue.warn('[@vue/server-renderer] Invalid VNode type:', type, "(" + typeof type + ")");
|
|
30518
|
+
}
|
|
30519
|
+
}
|
|
30520
|
+
}
|
|
30521
|
+
function renderVNodeChildren(push, children, parentComponent, slotScopeId) {
|
|
30522
|
+
for (var i = 0; i < children.length; i++) {
|
|
30523
|
+
renderVNode(push, normalizeVNode(children[i]), parentComponent, slotScopeId);
|
|
30524
|
+
}
|
|
30525
|
+
}
|
|
30526
|
+
function renderElementVNode(push, vnode, parentComponent, slotScopeId) {
|
|
30527
|
+
var tag = vnode.type;
|
|
30528
|
+
var props = vnode.props,
|
|
30529
|
+
children = vnode.children,
|
|
30530
|
+
shapeFlag = vnode.shapeFlag,
|
|
30531
|
+
scopeId = vnode.scopeId,
|
|
30532
|
+
dirs = vnode.dirs;
|
|
30533
|
+
var openTag = "<" + tag;
|
|
30534
|
+
if (dirs) {
|
|
30535
|
+
props = applySSRDirectives(vnode, props, dirs);
|
|
30536
|
+
}
|
|
30537
|
+
if (props) {
|
|
30538
|
+
openTag += ssrRenderAttrs(props, tag);
|
|
30539
|
+
}
|
|
30540
|
+
if (scopeId) {
|
|
30541
|
+
openTag += " " + scopeId;
|
|
30542
|
+
}
|
|
30543
|
+
// inherit parent chain scope id if this is the root node
|
|
30544
|
+
var curParent = parentComponent;
|
|
30545
|
+
var curVnode = vnode;
|
|
30546
|
+
while (curParent && curVnode === curParent.subTree) {
|
|
30547
|
+
curVnode = curParent.vnode;
|
|
30548
|
+
if (curVnode.scopeId) {
|
|
30549
|
+
openTag += " " + curVnode.scopeId;
|
|
30550
|
+
}
|
|
30551
|
+
curParent = curParent.parent;
|
|
30552
|
+
}
|
|
30553
|
+
if (slotScopeId) {
|
|
30554
|
+
openTag += " " + slotScopeId;
|
|
30555
|
+
}
|
|
30556
|
+
push(openTag + ">");
|
|
30557
|
+
if (!isVoidTag(tag)) {
|
|
30558
|
+
var hasChildrenOverride = false;
|
|
30559
|
+
if (props) {
|
|
30560
|
+
if (props.innerHTML) {
|
|
30561
|
+
hasChildrenOverride = true;
|
|
30562
|
+
push(props.innerHTML);
|
|
30563
|
+
} else if (props.textContent) {
|
|
30564
|
+
hasChildrenOverride = true;
|
|
30565
|
+
push(escapeHtml(props.textContent));
|
|
30566
|
+
} else if (tag === 'textarea' && props.value) {
|
|
30567
|
+
hasChildrenOverride = true;
|
|
30568
|
+
push(escapeHtml(props.value));
|
|
30569
|
+
}
|
|
30570
|
+
}
|
|
30571
|
+
if (!hasChildrenOverride) {
|
|
30572
|
+
if (shapeFlag & 8 /* ShapeFlags.TEXT_CHILDREN */) {
|
|
30573
|
+
push(escapeHtml(children));
|
|
30574
|
+
} else if (shapeFlag & 16 /* ShapeFlags.ARRAY_CHILDREN */) {
|
|
30575
|
+
renderVNodeChildren(push, children, parentComponent, slotScopeId);
|
|
30576
|
+
}
|
|
30577
|
+
}
|
|
30578
|
+
push("</" + tag + ">");
|
|
30579
|
+
}
|
|
30580
|
+
}
|
|
30581
|
+
function applySSRDirectives(vnode, rawProps, dirs) {
|
|
30582
|
+
var toMerge = [];
|
|
30583
|
+
for (var i = 0; i < dirs.length; i++) {
|
|
30584
|
+
var binding = dirs[i];
|
|
30585
|
+
var getSSRProps = binding.dir.getSSRProps;
|
|
30586
|
+
if (getSSRProps) {
|
|
30587
|
+
var props = getSSRProps(binding, vnode);
|
|
30588
|
+
if (props) toMerge.push(props);
|
|
30589
|
+
}
|
|
30590
|
+
}
|
|
30591
|
+
return vue.mergeProps.apply(void 0, [rawProps || {}].concat(toMerge));
|
|
30592
|
+
}
|
|
30593
|
+
function renderTeleportVNode(push, vnode, parentComponent, slotScopeId) {
|
|
30594
|
+
var target = vnode.props && vnode.props.to;
|
|
30595
|
+
var disabled = vnode.props && vnode.props.disabled;
|
|
30596
|
+
if (!target) {
|
|
30597
|
+
if (!disabled) {
|
|
30598
|
+
vue.warn("[@vue/server-renderer] Teleport is missing target prop.");
|
|
30599
|
+
}
|
|
30600
|
+
return [];
|
|
30601
|
+
}
|
|
30602
|
+
if (!isString(target)) {
|
|
30603
|
+
vue.warn("[@vue/server-renderer] Teleport target must be a query selector string.");
|
|
30604
|
+
return [];
|
|
30605
|
+
}
|
|
30606
|
+
ssrRenderTeleport(push, function (push) {
|
|
30607
|
+
renderVNodeChildren(push, vnode.children, parentComponent, slotScopeId);
|
|
30608
|
+
}, target, disabled || disabled === '', parentComponent);
|
|
30609
|
+
}
|
|
30610
|
+
var isVNode = vue.ssrUtils.isVNode;
|
|
30611
|
+
function unrollBuffer(_x) {
|
|
30612
|
+
return _unrollBuffer.apply(this, arguments);
|
|
30613
|
+
}
|
|
30614
|
+
function _unrollBuffer() {
|
|
30615
|
+
_unrollBuffer = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(buffer) {
|
|
30616
|
+
var ret, i, item;
|
|
30617
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
30618
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
30619
|
+
case 0:
|
|
30620
|
+
if (!buffer.hasAsync) {
|
|
30621
|
+
_context2.next = 23;
|
|
30622
|
+
break;
|
|
30623
|
+
}
|
|
30624
|
+
ret = '';
|
|
30625
|
+
i = 0;
|
|
30626
|
+
case 3:
|
|
30627
|
+
if (!(i < buffer.length)) {
|
|
30628
|
+
_context2.next = 20;
|
|
30629
|
+
break;
|
|
30630
|
+
}
|
|
30631
|
+
item = buffer[i];
|
|
30632
|
+
if (!isPromise(item)) {
|
|
30633
|
+
_context2.next = 9;
|
|
30634
|
+
break;
|
|
30635
|
+
}
|
|
30636
|
+
_context2.next = 8;
|
|
30637
|
+
return item;
|
|
30638
|
+
case 8:
|
|
30639
|
+
item = _context2.sent;
|
|
30640
|
+
case 9:
|
|
30641
|
+
if (!isString(item)) {
|
|
30642
|
+
_context2.next = 13;
|
|
30643
|
+
break;
|
|
30644
|
+
}
|
|
30645
|
+
ret += item;
|
|
30646
|
+
_context2.next = 17;
|
|
30647
|
+
break;
|
|
30648
|
+
case 13:
|
|
30649
|
+
_context2.t0 = ret;
|
|
30650
|
+
_context2.next = 16;
|
|
30651
|
+
return unrollBuffer(item);
|
|
30652
|
+
case 16:
|
|
30653
|
+
ret = _context2.t0 += _context2.sent;
|
|
30654
|
+
case 17:
|
|
30655
|
+
i++;
|
|
30656
|
+
_context2.next = 3;
|
|
30657
|
+
break;
|
|
30658
|
+
case 20:
|
|
30659
|
+
return _context2.abrupt("return", ret);
|
|
30660
|
+
case 23:
|
|
30661
|
+
return _context2.abrupt("return", unrollBufferSync(buffer));
|
|
30662
|
+
case 24:
|
|
30663
|
+
case "end":
|
|
30664
|
+
return _context2.stop();
|
|
30665
|
+
}
|
|
30666
|
+
}, _callee2);
|
|
30667
|
+
}));
|
|
30668
|
+
return _unrollBuffer.apply(this, arguments);
|
|
30669
|
+
}
|
|
30670
|
+
function unrollBufferSync(buffer) {
|
|
30671
|
+
var ret = '';
|
|
30672
|
+
for (var i = 0; i < buffer.length; i++) {
|
|
30673
|
+
var item = buffer[i];
|
|
30674
|
+
if (isString(item)) {
|
|
30675
|
+
ret += item;
|
|
30676
|
+
} else {
|
|
30677
|
+
// since this is a sync buffer, child buffers are never promises
|
|
30678
|
+
ret += unrollBufferSync(item);
|
|
30679
|
+
}
|
|
30680
|
+
}
|
|
30681
|
+
return ret;
|
|
30682
|
+
}
|
|
30683
|
+
function renderToString(_x2, _x3) {
|
|
30684
|
+
return _renderToString.apply(this, arguments);
|
|
30685
|
+
}
|
|
30686
|
+
function _renderToString() {
|
|
30687
|
+
_renderToString = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(input, context) {
|
|
30688
|
+
var vnode, buffer, result, _iterator3, _step3, unwatch;
|
|
30689
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
30690
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
30691
|
+
case 0:
|
|
30692
|
+
if (context === void 0) {
|
|
30693
|
+
context = {};
|
|
30694
|
+
}
|
|
30695
|
+
if (!isVNode(input)) {
|
|
30696
|
+
_context3.next = 3;
|
|
30697
|
+
break;
|
|
29898
30698
|
}
|
|
29899
|
-
|
|
29900
|
-
|
|
29901
|
-
|
|
29902
|
-
|
|
30699
|
+
return _context3.abrupt("return", renderToString(vue.createApp({
|
|
30700
|
+
render: function render() {
|
|
30701
|
+
return input;
|
|
30702
|
+
}
|
|
30703
|
+
}), context));
|
|
30704
|
+
case 3:
|
|
30705
|
+
// rendering an app
|
|
30706
|
+
vnode = vue.createVNode(input._component, input._props);
|
|
30707
|
+
vnode.appContext = input._context;
|
|
30708
|
+
// provide the ssr context to the tree
|
|
30709
|
+
input.provide(vue.ssrContextKey, context);
|
|
30710
|
+
_context3.next = 8;
|
|
30711
|
+
return renderComponentVNode(vnode);
|
|
30712
|
+
case 8:
|
|
30713
|
+
buffer = _context3.sent;
|
|
30714
|
+
_context3.next = 11;
|
|
30715
|
+
return unrollBuffer(buffer);
|
|
30716
|
+
case 11:
|
|
30717
|
+
result = _context3.sent;
|
|
30718
|
+
_context3.next = 14;
|
|
30719
|
+
return resolveTeleports(context);
|
|
30720
|
+
case 14:
|
|
30721
|
+
if (context.__watcherHandles) {
|
|
30722
|
+
for (_iterator3 = _createForOfIteratorHelperLoose(context.__watcherHandles); !(_step3 = _iterator3()).done;) {
|
|
30723
|
+
unwatch = _step3.value;
|
|
30724
|
+
unwatch();
|
|
29903
30725
|
}
|
|
29904
|
-
var resultSize = component.size || 10;
|
|
29905
|
-
var from = currentPage * resultSize;
|
|
29906
|
-
// Update props for RS API
|
|
29907
|
-
compProps.from = from;
|
|
29908
|
-
mainQueryOptions = _extends({}, mainQueryOptions, highlightQuery, {
|
|
29909
|
-
size: resultSize,
|
|
29910
|
-
from: from
|
|
29911
|
-
});
|
|
29912
30726
|
}
|
|
29913
|
-
|
|
29914
|
-
|
|
30727
|
+
return _context3.abrupt("return", result);
|
|
30728
|
+
case 16:
|
|
30729
|
+
case "end":
|
|
30730
|
+
return _context3.stop();
|
|
29915
30731
|
}
|
|
29916
|
-
|
|
29917
|
-
|
|
29918
|
-
|
|
29919
|
-
|
|
29920
|
-
|
|
29921
|
-
|
|
29922
|
-
|
|
29923
|
-
|
|
29924
|
-
|
|
29925
|
-
|
|
29926
|
-
|
|
29927
|
-
|
|
29928
|
-
|
|
29929
|
-
|
|
29930
|
-
|
|
29931
|
-
|
|
29932
|
-
|
|
29933
|
-
|
|
29934
|
-
|
|
29935
|
-
|
|
29936
|
-
|
|
29937
|
-
|
|
29938
|
-
|
|
29939
|
-
|
|
29940
|
-
|
|
29941
|
-
|
|
29942
|
-
|
|
29943
|
-
|
|
30732
|
+
}, _callee3);
|
|
30733
|
+
}));
|
|
30734
|
+
return _renderToString.apply(this, arguments);
|
|
30735
|
+
}
|
|
30736
|
+
function resolveTeleports(_x4) {
|
|
30737
|
+
return _resolveTeleports.apply(this, arguments);
|
|
30738
|
+
}
|
|
30739
|
+
function _resolveTeleports() {
|
|
30740
|
+
_resolveTeleports = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(context) {
|
|
30741
|
+
var key;
|
|
30742
|
+
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
30743
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
30744
|
+
case 0:
|
|
30745
|
+
if (!context.__teleportBuffers) {
|
|
30746
|
+
_context4.next = 14;
|
|
30747
|
+
break;
|
|
30748
|
+
}
|
|
30749
|
+
context.teleports = context.teleports || {};
|
|
30750
|
+
_context4.t0 = _regeneratorRuntime().keys(context.__teleportBuffers);
|
|
30751
|
+
case 3:
|
|
30752
|
+
if ((_context4.t1 = _context4.t0()).done) {
|
|
30753
|
+
_context4.next = 14;
|
|
30754
|
+
break;
|
|
30755
|
+
}
|
|
30756
|
+
key = _context4.t1.value;
|
|
30757
|
+
_context4.t2 = unrollBuffer;
|
|
30758
|
+
_context4.next = 8;
|
|
30759
|
+
return Promise.all([context.__teleportBuffers[key]]);
|
|
30760
|
+
case 8:
|
|
30761
|
+
_context4.t3 = _context4.sent;
|
|
30762
|
+
_context4.next = 11;
|
|
30763
|
+
return (0, _context4.t2)(_context4.t3);
|
|
30764
|
+
case 11:
|
|
30765
|
+
context.teleports[key] = _context4.sent;
|
|
30766
|
+
_context4.next = 3;
|
|
30767
|
+
break;
|
|
30768
|
+
case 14:
|
|
30769
|
+
case "end":
|
|
30770
|
+
return _context4.stop();
|
|
29944
30771
|
}
|
|
29945
|
-
|
|
29946
|
-
|
|
29947
|
-
|
|
29948
|
-
|
|
29949
|
-
|
|
29950
|
-
|
|
29951
|
-
|
|
29952
|
-
|
|
29953
|
-
|
|
29954
|
-
|
|
29955
|
-
|
|
29956
|
-
|
|
29957
|
-
|
|
29958
|
-
|
|
29959
|
-
|
|
29960
|
-
|
|
29961
|
-
|
|
29962
|
-
|
|
29963
|
-
});
|
|
29964
|
-
state = {
|
|
29965
|
-
components: components,
|
|
29966
|
-
dependencyTree: dependencyTree,
|
|
29967
|
-
queryList: queryList,
|
|
29968
|
-
queryOptions: queryOptions,
|
|
29969
|
-
selectedValues: selectedValues,
|
|
29970
|
-
internalValues: internalValues,
|
|
29971
|
-
props: componentProps,
|
|
29972
|
-
customQueries: customQueries,
|
|
29973
|
-
defaultQueries: defaultQueries
|
|
29974
|
-
};
|
|
29975
|
-
// [5] Generate finalQuery for search
|
|
29976
|
-
componentCollection.forEach(function (component) {
|
|
29977
|
-
// eslint-disable-next-line
|
|
29978
|
-
var _buildQuery = helper_37(component.componentId, dependencyTree, queryList, queryOptions),
|
|
29979
|
-
queryObj = _buildQuery.queryObj,
|
|
29980
|
-
options = _buildQuery.options;
|
|
29981
|
-
var componentQueryOptions = options;
|
|
29982
|
-
var validOptions = ['aggs', 'from', 'sort'];
|
|
29983
|
-
// check if query or componentQueryOptions are valid - non-empty
|
|
29984
|
-
if (queryObj && !!Object.keys(queryObj).length || componentQueryOptions && Object.keys(componentQueryOptions).some(function (item) {
|
|
29985
|
-
return validOptions.includes(item);
|
|
29986
|
-
})) {
|
|
29987
|
-
var _extends2;
|
|
29988
|
-
if (!queryObj || queryObj && !Object.keys(queryObj).length) {
|
|
29989
|
-
queryObj = {
|
|
29990
|
-
match_all: {}
|
|
29991
|
-
};
|
|
29992
|
-
}
|
|
29993
|
-
orderOfQueries = [].concat(orderOfQueries, [component.componentId]);
|
|
29994
|
-
var currentQuery = _extends({
|
|
29995
|
-
query: _extends({}, queryObj)
|
|
29996
|
-
}, componentQueryOptions, queryOptions[component.componentId]);
|
|
29997
|
-
queryLog = _extends({}, queryLog, (_extends2 = {}, _extends2[component.componentId] = currentQuery, _extends2));
|
|
29998
|
-
var query = transform_5(component.componentId, transform_3(state, component.componentId, queryOptions && Object.keys(queryOptions[component.componentId]).length ? {
|
|
29999
|
-
from: queryOptions[component.componentId].from
|
|
30000
|
-
} : null));
|
|
30001
|
-
if (query) {
|
|
30002
|
-
var _extends3;
|
|
30003
|
-
// Apply dependent queries
|
|
30004
|
-
appbaseQuery = _extends({}, appbaseQuery, (_extends3 = {}, _extends3[component.componentId] = query, _extends3), transform_2(state, component.componentId, orderOfQueries));
|
|
30772
|
+
}, _callee4);
|
|
30773
|
+
}));
|
|
30774
|
+
return _resolveTeleports.apply(this, arguments);
|
|
30775
|
+
}
|
|
30776
|
+
var isVNode$1 = vue.ssrUtils.isVNode;
|
|
30777
|
+
var ErrorTypeStrings = (_ErrorTypeStrings = {}, _ErrorTypeStrings["sp" /* LifecycleHooks.SERVER_PREFETCH */] = 'serverPrefetch hook', _ErrorTypeStrings["bc" /* LifecycleHooks.BEFORE_CREATE */] = 'beforeCreate hook', _ErrorTypeStrings["c" /* LifecycleHooks.CREATED */] = 'created hook', _ErrorTypeStrings["bm" /* LifecycleHooks.BEFORE_MOUNT */] = 'beforeMount hook', _ErrorTypeStrings["m" /* LifecycleHooks.MOUNTED */] = 'mounted hook', _ErrorTypeStrings["bu" /* LifecycleHooks.BEFORE_UPDATE */] = 'beforeUpdate hook', _ErrorTypeStrings["u" /* LifecycleHooks.UPDATED */] = 'updated', _ErrorTypeStrings["bum" /* LifecycleHooks.BEFORE_UNMOUNT */] = 'beforeUnmount hook', _ErrorTypeStrings["um" /* LifecycleHooks.UNMOUNTED */] = 'unmounted hook', _ErrorTypeStrings["a" /* LifecycleHooks.ACTIVATED */] = 'activated hook', _ErrorTypeStrings["da" /* LifecycleHooks.DEACTIVATED */] = 'deactivated hook', _ErrorTypeStrings["ec" /* LifecycleHooks.ERROR_CAPTURED */] = 'errorCaptured hook', _ErrorTypeStrings["rtc" /* LifecycleHooks.RENDER_TRACKED */] = 'renderTracked hook', _ErrorTypeStrings["rtg" /* LifecycleHooks.RENDER_TRIGGERED */] = 'renderTriggered hook', _ErrorTypeStrings[0 /* ErrorCodes.SETUP_FUNCTION */] = 'setup function', _ErrorTypeStrings[1 /* ErrorCodes.RENDER_FUNCTION */] = 'render function', _ErrorTypeStrings[2 /* ErrorCodes.WATCH_GETTER */] = 'watcher getter', _ErrorTypeStrings[3 /* ErrorCodes.WATCH_CALLBACK */] = 'watcher callback', _ErrorTypeStrings[4 /* ErrorCodes.WATCH_CLEANUP */] = 'watcher cleanup function', _ErrorTypeStrings[5 /* ErrorCodes.NATIVE_EVENT_HANDLER */] = 'native event handler', _ErrorTypeStrings[6 /* ErrorCodes.COMPONENT_EVENT_HANDLER */] = 'component event handler', _ErrorTypeStrings[7 /* ErrorCodes.VNODE_HOOK */] = 'vnode hook', _ErrorTypeStrings[8 /* ErrorCodes.DIRECTIVE_HOOK */] = 'directive hook', _ErrorTypeStrings[9 /* ErrorCodes.TRANSITION_HOOK */] = 'transition hook', _ErrorTypeStrings[10 /* ErrorCodes.APP_ERROR_HANDLER */] = 'app errorHandler', _ErrorTypeStrings[11 /* ErrorCodes.APP_WARN_HANDLER */] = 'app warnHandler', _ErrorTypeStrings[12 /* ErrorCodes.FUNCTION_REF */] = 'ref function', _ErrorTypeStrings[13 /* ErrorCodes.ASYNC_COMPONENT_LOADER */] = 'async component loader', _ErrorTypeStrings[14 /* ErrorCodes.SCHEDULER */] = 'scheduler flush. This is likely a Vue internals bug. ' + 'Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/core', _ErrorTypeStrings);
|
|
30778
|
+
vue.initDirectivesForSSR();
|
|
30779
|
+
|
|
30780
|
+
var server = createCommonjsModule(function (module, exports) {
|
|
30781
|
+
Object.defineProperty(exports, "__esModule", {
|
|
30782
|
+
value: true
|
|
30783
|
+
});
|
|
30784
|
+
var _extends = Object.assign || function (target) {
|
|
30785
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
30786
|
+
var source = arguments[i];
|
|
30787
|
+
for (var key in source) {
|
|
30788
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
30789
|
+
target[key] = source[key];
|
|
30005
30790
|
}
|
|
30006
30791
|
}
|
|
30007
|
-
}
|
|
30008
|
-
|
|
30009
|
-
|
|
30010
|
-
|
|
30011
|
-
|
|
30792
|
+
}
|
|
30793
|
+
return target;
|
|
30794
|
+
};
|
|
30795
|
+
var _valueReducer2 = _interopRequireDefault(valueReducer_1);
|
|
30796
|
+
function _interopRequireDefault(obj) {
|
|
30797
|
+
return obj && obj.__esModule ? obj : {
|
|
30798
|
+
"default": obj
|
|
30799
|
+
};
|
|
30800
|
+
}
|
|
30801
|
+
function _toConsumableArray(arr) {
|
|
30802
|
+
if (Array.isArray(arr)) {
|
|
30803
|
+
for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) {
|
|
30804
|
+
arr2[i] = arr[i];
|
|
30012
30805
|
}
|
|
30013
|
-
return
|
|
30014
|
-
|
|
30806
|
+
return arr2;
|
|
30807
|
+
} else {
|
|
30808
|
+
return Array.from(arr);
|
|
30809
|
+
}
|
|
30810
|
+
}
|
|
30811
|
+
function _objectWithoutProperties(obj, keys) {
|
|
30812
|
+
var target = {};
|
|
30813
|
+
for (var i in obj) {
|
|
30814
|
+
if (keys.indexOf(i) >= 0) continue;
|
|
30815
|
+
if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;
|
|
30816
|
+
target[i] = obj[i];
|
|
30817
|
+
}
|
|
30818
|
+
return target;
|
|
30819
|
+
}
|
|
30820
|
+
function _defineProperty(obj, key, value) {
|
|
30821
|
+
if (key in obj) {
|
|
30822
|
+
Object.defineProperty(obj, key, {
|
|
30823
|
+
value: value,
|
|
30824
|
+
enumerable: true,
|
|
30825
|
+
configurable: true,
|
|
30826
|
+
writable: true
|
|
30015
30827
|
});
|
|
30828
|
+
} else {
|
|
30829
|
+
obj[key] = value;
|
|
30830
|
+
}
|
|
30831
|
+
return obj;
|
|
30832
|
+
}
|
|
30833
|
+
function getValue(state, id, defaultValue) {
|
|
30834
|
+
if (state && state[id]) {
|
|
30835
|
+
try {
|
|
30836
|
+
var parsedValue = JSON.parse(state[id]);
|
|
30837
|
+
return _extends({}, typeof parsedValue === 'object' && parsedValue.value ? _extends({
|
|
30838
|
+
value: parsedValue.value
|
|
30839
|
+
}, parsedValue.category ? {
|
|
30840
|
+
category: parsedValue.category
|
|
30841
|
+
} : {}) : {
|
|
30842
|
+
value: parsedValue
|
|
30843
|
+
}, {
|
|
30844
|
+
reference: 'URL'
|
|
30845
|
+
});
|
|
30846
|
+
} catch (error) {
|
|
30847
|
+
return {
|
|
30848
|
+
value: state[id],
|
|
30849
|
+
reference: 'URL'
|
|
30850
|
+
};
|
|
30851
|
+
}
|
|
30852
|
+
}
|
|
30853
|
+
return {
|
|
30854
|
+
value: defaultValue,
|
|
30855
|
+
reference: 'DEFAULT'
|
|
30016
30856
|
};
|
|
30017
|
-
|
|
30018
|
-
|
|
30019
|
-
|
|
30020
|
-
|
|
30021
|
-
|
|
30022
|
-
|
|
30023
|
-
|
|
30024
|
-
|
|
30025
|
-
|
|
30026
|
-
|
|
30027
|
-
|
|
30028
|
-
|
|
30857
|
+
}
|
|
30858
|
+
function parseQuery(str) {
|
|
30859
|
+
if (str instanceof Object) {
|
|
30860
|
+
return str;
|
|
30861
|
+
}
|
|
30862
|
+
if (typeof str !== 'string' || str.length === 0) return {};
|
|
30863
|
+
var s = void 0;
|
|
30864
|
+
if (str.split('/?')[1]) {
|
|
30865
|
+
s = str.split('/?')[1].split('&');
|
|
30866
|
+
}
|
|
30867
|
+
if (str.split('?')[1]) {
|
|
30868
|
+
s = str.split('?')[1].split('&');
|
|
30869
|
+
}
|
|
30870
|
+
if (!s) return {};
|
|
30871
|
+
var sLength = s.length;
|
|
30872
|
+
var bit = void 0;
|
|
30873
|
+
var query = {};
|
|
30874
|
+
var first = void 0;
|
|
30875
|
+
var second = void 0;
|
|
30876
|
+
for (var i = 0; i < sLength; i += 1) {
|
|
30877
|
+
bit = s[i].split('=');
|
|
30878
|
+
first = decodeURIComponent(bit[0]);
|
|
30879
|
+
if (first.length === 0) continue;
|
|
30880
|
+
second = decodeURIComponent(bit[1]);
|
|
30881
|
+
if (typeof query[first] === 'undefined') query[first] = second;else if (query[first] instanceof Array) query[first].push(second);else query[first] = [query[first], second];
|
|
30882
|
+
}
|
|
30883
|
+
return query;
|
|
30884
|
+
}
|
|
30885
|
+
var getServerResults = function getServerResults() {
|
|
30886
|
+
var storeReference = null;
|
|
30887
|
+
return function (App) {
|
|
30888
|
+
var queryString = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
|
30889
|
+
var ssrRenderFunc = arguments[2];
|
|
30890
|
+
try {
|
|
30891
|
+
var parsedQueryString = parseQuery(queryString);
|
|
30892
|
+
if (!storeReference) {
|
|
30893
|
+
var newSelectedValues = {};
|
|
30894
|
+
var contextCollector = function contextCollector(params) {
|
|
30895
|
+
if (params.ctx) {
|
|
30896
|
+
storeReference = params.ctx;
|
|
30897
|
+
Object.keys(parsedQueryString).forEach(function (componentId) {
|
|
30898
|
+
var _getValue = getValue(parsedQueryString, componentId, null),
|
|
30899
|
+
value = _getValue.value,
|
|
30900
|
+
reference = _getValue.reference;
|
|
30901
|
+
if (value) {
|
|
30902
|
+
newSelectedValues = (0, _valueReducer2["default"])(newSelectedValues, {
|
|
30903
|
+
type: 'PATCH_VALUE',
|
|
30904
|
+
component: componentId,
|
|
30905
|
+
payload: {
|
|
30906
|
+
value: value,
|
|
30907
|
+
reference: reference
|
|
30908
|
+
}
|
|
30909
|
+
});
|
|
30910
|
+
}
|
|
30029
30911
|
});
|
|
30030
30912
|
}
|
|
30031
|
-
|
|
30032
|
-
|
|
30033
|
-
|
|
30034
|
-
|
|
30035
|
-
|
|
30036
|
-
|
|
30037
|
-
})
|
|
30038
|
-
|
|
30039
|
-
|
|
30040
|
-
|
|
30041
|
-
|
|
30042
|
-
|
|
30043
|
-
|
|
30044
|
-
|
|
30045
|
-
|
|
30046
|
-
|
|
30047
|
-
|
|
30048
|
-
|
|
30049
|
-
|
|
30050
|
-
|
|
30051
|
-
|
|
30052
|
-
|
|
30053
|
-
|
|
30054
|
-
|
|
30055
|
-
|
|
30056
|
-
|
|
30057
|
-
|
|
30058
|
-
|
|
30059
|
-
|
|
30060
|
-
var
|
|
30061
|
-
|
|
30062
|
-
|
|
30063
|
-
|
|
30064
|
-
|
|
30913
|
+
return {
|
|
30914
|
+
selectedValues: newSelectedValues
|
|
30915
|
+
};
|
|
30916
|
+
};
|
|
30917
|
+
var output = ssrRenderFunc(App({
|
|
30918
|
+
contextCollector: contextCollector
|
|
30919
|
+
}));
|
|
30920
|
+
var promiseFunc = void 0;
|
|
30921
|
+
if (!output.then) {
|
|
30922
|
+
promiseFunc = Promise.resolve(promiseFunc);
|
|
30923
|
+
} else {
|
|
30924
|
+
promiseFunc = output;
|
|
30925
|
+
}
|
|
30926
|
+
return promiseFunc.then(function () {
|
|
30927
|
+
if (storeReference) {
|
|
30928
|
+
var extractedState = storeReference.getState();
|
|
30929
|
+
var components = extractedState.components,
|
|
30930
|
+
config = extractedState.config,
|
|
30931
|
+
appbaseRef = extractedState.appbaseRef,
|
|
30932
|
+
queryOptions = extractedState.queryOptions,
|
|
30933
|
+
internalValues = extractedState.internalValues,
|
|
30934
|
+
props = extractedState.props,
|
|
30935
|
+
queryList = extractedState.queryList,
|
|
30936
|
+
dependencyTree = extractedState.dependencyTree;
|
|
30937
|
+
var queryLog = extractedState.queryLog;
|
|
30938
|
+
var finalQuery = [];
|
|
30939
|
+
var appbaseQuery = {};
|
|
30940
|
+
var orderOfQueries = [];
|
|
30941
|
+
var hits = {};
|
|
30942
|
+
var aggregations = {};
|
|
30943
|
+
var state = _extends({}, extractedState);
|
|
30944
|
+
components.filter(function (t) {
|
|
30945
|
+
return !t.endsWith('__internal');
|
|
30946
|
+
}).forEach(function (componentId) {
|
|
30947
|
+
var _buildQuery = (0, helper.buildQuery)(componentId, dependencyTree, queryList, queryOptions),
|
|
30948
|
+
queryObj = _buildQuery.queryObj,
|
|
30949
|
+
options = _buildQuery.options;
|
|
30950
|
+
if (!queryObj && !options) {
|
|
30951
|
+
return;
|
|
30952
|
+
}
|
|
30953
|
+
var query = (0, transform.getRSQuery)(componentId, (0, transform.extractPropsFromState)(state, componentId, queryOptions && queryOptions[componentId] ? {
|
|
30954
|
+
from: queryOptions[componentId].from
|
|
30955
|
+
} : null));
|
|
30956
|
+
if (query && !!Object.keys(query).length) {
|
|
30957
|
+
var currentQuery = query;
|
|
30958
|
+
var dependentQueries = (0, transform.getDependentQueries)(state, componentId, orderOfQueries);
|
|
30959
|
+
var queryToLog = _extends(_defineProperty({}, componentId, currentQuery), Object.keys(dependentQueries).reduce(function (acc, q) {
|
|
30960
|
+
return _extends({}, acc, _defineProperty({}, q, _extends({}, dependentQueries[q], {
|
|
30961
|
+
execute: false
|
|
30962
|
+
}, dependentQueries[q].type === constants$1.queryTypes.suggestion ? {
|
|
30963
|
+
type: 'search'
|
|
30964
|
+
} : {})));
|
|
30965
|
+
}, {}));
|
|
30966
|
+
if ([constants$1.queryTypes.range, constants$1.queryTypes.term].includes(transform.componentToTypeMap[props[componentId].componentType])) {
|
|
30967
|
+
var value = currentQuery.value,
|
|
30968
|
+
rest = _objectWithoutProperties(currentQuery, ['value']);
|
|
30969
|
+
queryToLog = _extends(_defineProperty({}, componentId, rest), Object.keys(dependentQueries).reduce(function (acc, q) {
|
|
30970
|
+
return _extends({}, acc, _defineProperty({}, q, _extends({}, dependentQueries[q], {
|
|
30971
|
+
execute: false
|
|
30972
|
+
}, dependentQueries[q].type === constants$1.queryTypes.suggestion ? {
|
|
30973
|
+
type: 'search'
|
|
30974
|
+
} : {})));
|
|
30975
|
+
}, {}));
|
|
30976
|
+
}
|
|
30977
|
+
orderOfQueries = [].concat(_toConsumableArray(orderOfQueries), [componentId]);
|
|
30978
|
+
queryLog = _extends({}, queryLog, _defineProperty({}, componentId, queryToLog));
|
|
30979
|
+
if (query) {
|
|
30980
|
+
var dependentQueriesToAppend = (0, transform.getDependentQueries)(state, componentId, orderOfQueries);
|
|
30981
|
+
appbaseQuery = _extends({}, appbaseQuery, _defineProperty({}, componentId, query));
|
|
30982
|
+
Object.keys(dependentQueriesToAppend).forEach(function (cId) {
|
|
30983
|
+
if (appbaseQuery[cId]) {
|
|
30984
|
+
appbaseQuery[cId + Math.random()] = dependentQueriesToAppend[cId];
|
|
30985
|
+
} else {
|
|
30986
|
+
appbaseQuery[cId] = dependentQueriesToAppend[cId];
|
|
30987
|
+
}
|
|
30988
|
+
});
|
|
30989
|
+
}
|
|
30990
|
+
}
|
|
30991
|
+
});
|
|
30992
|
+
var handleRSResponse = function handleRSResponse(res) {
|
|
30993
|
+
var promotedResults = {};
|
|
30994
|
+
var rawData = {};
|
|
30995
|
+
var customData = {};
|
|
30996
|
+
var allPromises = orderOfQueries.map(function (component) {
|
|
30997
|
+
return new Promise(function (responseResolve, responseReject) {
|
|
30998
|
+
(0, utils.handleTransformResponse)(res[component], config, component).then(function (response) {
|
|
30999
|
+
if (response) {
|
|
31000
|
+
if (response.promoted) {
|
|
31001
|
+
promotedResults[component] = response.promoted.map(function (promoted) {
|
|
31002
|
+
return _extends({}, promoted.doc, {
|
|
31003
|
+
_position: promoted.position
|
|
31004
|
+
});
|
|
31005
|
+
});
|
|
31006
|
+
}
|
|
31007
|
+
rawData[component] = response;
|
|
31008
|
+
if (response.customData) {
|
|
31009
|
+
customData[component] = response.customData;
|
|
31010
|
+
}
|
|
31011
|
+
if (response.aggregations) {
|
|
31012
|
+
aggregations = _extends({}, aggregations, _defineProperty({}, component, response.aggregations));
|
|
31013
|
+
}
|
|
31014
|
+
var hitsObj = response.hits || {};
|
|
31015
|
+
hits = _extends({}, hits, _defineProperty({}, component, {
|
|
31016
|
+
hits: hitsObj.hits,
|
|
31017
|
+
total: typeof hitsObj.total === 'object' ? hitsObj.total.value : hitsObj.total,
|
|
31018
|
+
time: response.took
|
|
31019
|
+
}));
|
|
31020
|
+
responseResolve();
|
|
31021
|
+
}
|
|
31022
|
+
})["catch"](function (err) {
|
|
31023
|
+
responseReject(err);
|
|
31024
|
+
});
|
|
30065
31025
|
});
|
|
30066
31026
|
});
|
|
31027
|
+
return Promise.all(allPromises).then(function () {
|
|
31028
|
+
state = {
|
|
31029
|
+
queryList: queryList,
|
|
31030
|
+
queryOptions: queryOptions,
|
|
31031
|
+
selectedValues: newSelectedValues,
|
|
31032
|
+
internalValues: internalValues,
|
|
31033
|
+
queryLog: queryLog,
|
|
31034
|
+
hits: hits,
|
|
31035
|
+
aggregations: aggregations,
|
|
31036
|
+
promotedResults: promotedResults,
|
|
31037
|
+
customData: customData,
|
|
31038
|
+
rawData: rawData,
|
|
31039
|
+
dependencyTree: dependencyTree
|
|
31040
|
+
};
|
|
31041
|
+
return Promise.resolve(JSON.parse(JSON.stringify(state)));
|
|
31042
|
+
});
|
|
31043
|
+
};
|
|
31044
|
+
if (Object.keys(appbaseQuery).length) {
|
|
31045
|
+
finalQuery = Object.values(appbaseQuery);
|
|
31046
|
+
var rsAPISettings = {};
|
|
31047
|
+
if (config.analyticsConfig) {
|
|
31048
|
+
rsAPISettings.recordAnalytics = (0, utils.isPropertyDefined)(config.analyticsConfig.recordAnalytics) ? config.analyticsConfig.recordAnalytics : undefined;
|
|
31049
|
+
rsAPISettings.userId = (0, utils.isPropertyDefined)(config.analyticsConfig.userId) ? config.analyticsConfig.userId : undefined;
|
|
31050
|
+
rsAPISettings.enableQueryRules = (0, utils.isPropertyDefined)(config.analyticsConfig.enableQueryRules) ? config.analyticsConfig.enableQueryRules : undefined;
|
|
31051
|
+
rsAPISettings.customEvents = (0, utils.isPropertyDefined)(config.analyticsConfig.customEvents) ? config.analyticsConfig.customEvents : undefined;
|
|
31052
|
+
}
|
|
31053
|
+
return appbaseRef.reactiveSearchv3(finalQuery, rsAPISettings).then(function (res) {
|
|
31054
|
+
return handleRSResponse(res);
|
|
31055
|
+
})["catch"](function (err) {
|
|
31056
|
+
return Promise.reject(err);
|
|
31057
|
+
});
|
|
30067
31058
|
}
|
|
30068
|
-
|
|
30069
|
-
|
|
30070
|
-
|
|
30071
|
-
customData[component] = response.customData;
|
|
30072
|
-
}
|
|
30073
|
-
|
|
30074
|
-
// Update settings
|
|
30075
|
-
if (response.settings) {
|
|
30076
|
-
settingsResponse[component] = response.settings;
|
|
30077
|
-
}
|
|
30078
|
-
if (response.aggregations) {
|
|
30079
|
-
var _extends6;
|
|
30080
|
-
aggregations = _extends({}, aggregations, (_extends6 = {}, _extends6[component] = response.aggregations, _extends6));
|
|
30081
|
-
}
|
|
30082
|
-
timestamp[component] = res._timestamp;
|
|
30083
|
-
var hitsObj = response.hits ? response.hits : response[component].hits;
|
|
30084
|
-
hits = _extends({}, hits, (_extends7 = {}, _extends7[component] = {
|
|
30085
|
-
hits: hitsObj.hits,
|
|
30086
|
-
total: typeof hitsObj.total === 'object' ? hitsObj.total.value : hitsObj.total,
|
|
30087
|
-
time: response.took
|
|
30088
|
-
}, _extends7));
|
|
30089
|
-
responseResolve();
|
|
31059
|
+
throw new Error('Could not compute server-side initial state of the app!');
|
|
31060
|
+
} else {
|
|
31061
|
+
return null;
|
|
30090
31062
|
}
|
|
30091
|
-
})["catch"](function (err) {
|
|
30092
|
-
return responseReject(err);
|
|
30093
31063
|
});
|
|
30094
|
-
});
|
|
30095
|
-
});
|
|
30096
|
-
Promise.all(allPromises).then(function () {
|
|
30097
|
-
state = _extends({}, state, {
|
|
30098
|
-
hits: hits,
|
|
30099
|
-
timestamp: timestamp,
|
|
30100
|
-
aggregations: aggregations,
|
|
30101
|
-
compositeAggregations: compositeAggregations,
|
|
30102
|
-
promotedResults: promotedResults,
|
|
30103
|
-
settings: settingsResponse,
|
|
30104
|
-
customData: customData,
|
|
30105
|
-
rawData: rawData
|
|
30106
|
-
});
|
|
30107
|
-
resolve(state);
|
|
30108
|
-
});
|
|
30109
|
-
};
|
|
30110
|
-
if (config.graphQLUrl) {
|
|
30111
|
-
var handleTransformRequest = function handleTransformRequest(res) {
|
|
30112
|
-
if (config.transformRequest && typeof config.transformRequest === 'function') {
|
|
30113
|
-
var transformRequestPromise = config.transformRequest(res);
|
|
30114
|
-
return transformRequestPromise instanceof Promise ? transformRequestPromise : Promise.resolve(transformRequestPromise);
|
|
30115
31064
|
}
|
|
30116
|
-
return
|
|
30117
|
-
}
|
|
30118
|
-
|
|
30119
|
-
fetchGraphQL(config.graphQLUrl, config.url, config.credentials, config.app, requestQuery).then(function (res) {
|
|
30120
|
-
handleResponse(res);
|
|
30121
|
-
})["catch"](function (err) {
|
|
30122
|
-
return reject(err);
|
|
30123
|
-
});
|
|
30124
|
-
})["catch"](function (err) {
|
|
30125
|
-
return reject(err);
|
|
30126
|
-
});
|
|
30127
|
-
} else if (Object.keys(appbaseQuery).length) {
|
|
30128
|
-
finalQuery = Object.keys(appbaseQuery).map(function (c) {
|
|
30129
|
-
return appbaseQuery[c];
|
|
30130
|
-
});
|
|
30131
|
-
// Call RS API
|
|
30132
|
-
var rsAPISettings = {};
|
|
30133
|
-
if (config.analyticsConfig) {
|
|
30134
|
-
rsAPISettings.recordAnalytics = utils_2(config.analyticsConfig.recordAnalytics) ? config.analyticsConfig.recordAnalytics : undefined;
|
|
30135
|
-
rsAPISettings.userId = utils_2(config.analyticsConfig.userId) ? config.analyticsConfig.userId : undefined;
|
|
30136
|
-
rsAPISettings.enableQueryRules = utils_2(config.analyticsConfig.enableQueryRules) ? config.analyticsConfig.enableQueryRules : undefined;
|
|
30137
|
-
rsAPISettings.customEvents = utils_2(config.analyticsConfig.customEvents) ? config.analyticsConfig.customEvents : undefined;
|
|
31065
|
+
return null;
|
|
31066
|
+
} catch (error) {
|
|
31067
|
+
return Promise.reject(error);
|
|
30138
31068
|
}
|
|
30139
|
-
|
|
30140
|
-
|
|
30141
|
-
|
|
30142
|
-
|
|
30143
|
-
|
|
30144
|
-
|
|
30145
|
-
|
|
31069
|
+
};
|
|
31070
|
+
};
|
|
31071
|
+
exports["default"] = getServerResults;
|
|
31072
|
+
});
|
|
31073
|
+
var getServerResults = unwrapExports(server);
|
|
31074
|
+
|
|
31075
|
+
function getServerState(App, queryString) {
|
|
31076
|
+
var renderFunction = renderToString;
|
|
31077
|
+
return getServerResults()(function (props) {
|
|
31078
|
+
return vue.createSSRApp(App, props);
|
|
31079
|
+
}, queryString, renderFunction);
|
|
30146
31080
|
}
|
|
30147
31081
|
|
|
30148
|
-
var version = "3.0.0-alpha.
|
|
31082
|
+
var version = "3.0.0-alpha.4";
|
|
30149
31083
|
|
|
30150
31084
|
var components = [RLConnected, ResultCard, ResultList, ReactiveBase, SBConnected, ListConnected, ListConnected$1, RangeConnected$1, RangeConnected$2, RangeConnected$3, RangeConnected, RcConnected, RcConnected$1, TBConnected, ListConnected$2, ListConnected$3, StateProviderConnected, RangeConnected$4];
|
|
30151
31085
|
function install$1 (Vue) {
|
|
@@ -30185,7 +31119,7 @@
|
|
|
30185
31119
|
exports.ToggleButton = TBConnected;
|
|
30186
31120
|
exports.componentTypes = constants_1$1;
|
|
30187
31121
|
exports.default = index$1;
|
|
30188
|
-
exports.
|
|
31122
|
+
exports.getServerState = getServerState;
|
|
30189
31123
|
exports.install = install$1;
|
|
30190
31124
|
exports.version = version;
|
|
30191
31125
|
|