@react-querybuilder/core 8.22.2 → 8.22.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/cjs/react-querybuilder_core.cjs.development.d.ts +44 -0
- package/dist/cjs/react-querybuilder_core.cjs.development.js +85 -1
- package/dist/cjs/react-querybuilder_core.cjs.development.js.map +1 -1
- package/dist/cjs/react-querybuilder_core.cjs.production.d.ts +44 -0
- package/dist/cjs/react-querybuilder_core.cjs.production.js +1 -1
- package/dist/cjs/react-querybuilder_core.cjs.production.js.map +1 -1
- package/dist/react-querybuilder_core.d.mts +44 -0
- package/dist/react-querybuilder_core.legacy-esm.d.ts +44 -0
- package/dist/react-querybuilder_core.legacy-esm.js +118 -32
- package/dist/react-querybuilder_core.legacy-esm.js.map +1 -1
- package/dist/react-querybuilder_core.mjs +85 -1
- package/dist/react-querybuilder_core.mjs.map +1 -1
- package/dist/react-querybuilder_core.production.d.mts +44 -0
- package/dist/react-querybuilder_core.production.mjs +1 -1
- package/dist/react-querybuilder_core.production.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -5893,6 +5893,50 @@ declare class QueryManager<RG extends RuleGroupTypeAny = RuleGroupType, F extend
|
|
|
5893
5893
|
* `targetPathOrID` and `sourcePathOrID`.
|
|
5894
5894
|
*/
|
|
5895
5895
|
group(sourcePathOrID: Path | string, targetPathOrID: Path | string, options?: GroupOptions & StrictOptions): this;
|
|
5896
|
+
/**
|
|
5897
|
+
* The options currently in effect, as a frozen shallow copy. Reflects everything applied by
|
|
5898
|
+
* the constructor and any subsequent {@link QueryManager.reconfigure} calls, but not the
|
|
5899
|
+
* defaults filled in for options that were never provided.
|
|
5900
|
+
*/
|
|
5901
|
+
getOptions(): Readonly<QueryManagerOptions<F, O, C>>;
|
|
5902
|
+
/**
|
|
5903
|
+
* Updates the manager's configuration in place, keeping the current query, the undo/redo
|
|
5904
|
+
* history, and every subscriber. Use this to propagate new `translations`, `fields`,
|
|
5905
|
+
* `operators`, and so on without discarding state:
|
|
5906
|
+
*
|
|
5907
|
+
* ```ts
|
|
5908
|
+
* q.reconfigure({ translations: { fields: { placeholderLabel: 'Choisir un champ' } } });
|
|
5909
|
+
* ```
|
|
5910
|
+
*
|
|
5911
|
+
* The incoming options are shallow-merged over the current ones, so keys left out are
|
|
5912
|
+
* preserved. Passing a key explicitly as `undefined` resets it to its default. Object-valued
|
|
5913
|
+
* options like `translations` are replaced wholesale rather than deep-merged — spread the
|
|
5914
|
+
* current value in yourself to patch one key. Pass `{ replace: true }` to discard the
|
|
5915
|
+
* existing options entirely and start from the incoming set.
|
|
5916
|
+
*
|
|
5917
|
+
* The query is never rewritten, even when the new options no longer describe it: a rule whose
|
|
5918
|
+
* `field` is not in the new `fields` list is left as-is. Call
|
|
5919
|
+
* {@link QueryManager.validate validate} to detect that, or `setQuery(getQuery())` to
|
|
5920
|
+
* re-normalize.
|
|
5921
|
+
*
|
|
5922
|
+
* History options are honored immediately: lowering `maxHistory` trims the undo stack, and
|
|
5923
|
+
* turning history off clears both stacks. Subscribers are notified once, and
|
|
5924
|
+
* {@link QueryManager.getConfigVersion} is incremented, even inside a
|
|
5925
|
+
* {@link QueryManager.batch batch} — configuration is not part of a batch's rollback.
|
|
5926
|
+
*/
|
|
5927
|
+
reconfigure(options: Partial<QueryManagerOptions<F, O, C>>, config?: {
|
|
5928
|
+
replace?: boolean;
|
|
5929
|
+
}): this;
|
|
5930
|
+
/**
|
|
5931
|
+
* A counter incremented by every {@link QueryManager.reconfigure} call. Because reconfiguring
|
|
5932
|
+
* leaves the query object untouched, subscribers that compare query identity alone cannot see
|
|
5933
|
+
* it; this provides a snapshot that does change.
|
|
5934
|
+
*
|
|
5935
|
+
* Bound to the instance, so it can be passed directly to `useSyncExternalStore` alongside
|
|
5936
|
+
* {@link QueryManager.subscribe}. The `useQueryManager` hook from `react-querybuilder`
|
|
5937
|
+
* already does this.
|
|
5938
|
+
*/
|
|
5939
|
+
getConfigVersion: () => number;
|
|
5896
5940
|
/**
|
|
5897
5941
|
* Creates an independent manager with the same configuration and the current query.
|
|
5898
5942
|
*
|
|
@@ -5893,6 +5893,50 @@ declare class QueryManager<RG extends RuleGroupTypeAny = RuleGroupType, F extend
|
|
|
5893
5893
|
* `targetPathOrID` and `sourcePathOrID`.
|
|
5894
5894
|
*/
|
|
5895
5895
|
group(sourcePathOrID: Path | string, targetPathOrID: Path | string, options?: GroupOptions & StrictOptions): this;
|
|
5896
|
+
/**
|
|
5897
|
+
* The options currently in effect, as a frozen shallow copy. Reflects everything applied by
|
|
5898
|
+
* the constructor and any subsequent {@link QueryManager.reconfigure} calls, but not the
|
|
5899
|
+
* defaults filled in for options that were never provided.
|
|
5900
|
+
*/
|
|
5901
|
+
getOptions(): Readonly<QueryManagerOptions<F, O, C>>;
|
|
5902
|
+
/**
|
|
5903
|
+
* Updates the manager's configuration in place, keeping the current query, the undo/redo
|
|
5904
|
+
* history, and every subscriber. Use this to propagate new `translations`, `fields`,
|
|
5905
|
+
* `operators`, and so on without discarding state:
|
|
5906
|
+
*
|
|
5907
|
+
* ```ts
|
|
5908
|
+
* q.reconfigure({ translations: { fields: { placeholderLabel: 'Choisir un champ' } } });
|
|
5909
|
+
* ```
|
|
5910
|
+
*
|
|
5911
|
+
* The incoming options are shallow-merged over the current ones, so keys left out are
|
|
5912
|
+
* preserved. Passing a key explicitly as `undefined` resets it to its default. Object-valued
|
|
5913
|
+
* options like `translations` are replaced wholesale rather than deep-merged — spread the
|
|
5914
|
+
* current value in yourself to patch one key. Pass `{ replace: true }` to discard the
|
|
5915
|
+
* existing options entirely and start from the incoming set.
|
|
5916
|
+
*
|
|
5917
|
+
* The query is never rewritten, even when the new options no longer describe it: a rule whose
|
|
5918
|
+
* `field` is not in the new `fields` list is left as-is. Call
|
|
5919
|
+
* {@link QueryManager.validate validate} to detect that, or `setQuery(getQuery())` to
|
|
5920
|
+
* re-normalize.
|
|
5921
|
+
*
|
|
5922
|
+
* History options are honored immediately: lowering `maxHistory` trims the undo stack, and
|
|
5923
|
+
* turning history off clears both stacks. Subscribers are notified once, and
|
|
5924
|
+
* {@link QueryManager.getConfigVersion} is incremented, even inside a
|
|
5925
|
+
* {@link QueryManager.batch batch} — configuration is not part of a batch's rollback.
|
|
5926
|
+
*/
|
|
5927
|
+
reconfigure(options: Partial<QueryManagerOptions<F, O, C>>, config?: {
|
|
5928
|
+
replace?: boolean;
|
|
5929
|
+
}): this;
|
|
5930
|
+
/**
|
|
5931
|
+
* A counter incremented by every {@link QueryManager.reconfigure} call. Because reconfiguring
|
|
5932
|
+
* leaves the query object untouched, subscribers that compare query identity alone cannot see
|
|
5933
|
+
* it; this provides a snapshot that does change.
|
|
5934
|
+
*
|
|
5935
|
+
* Bound to the instance, so it can be passed directly to `useSyncExternalStore` alongside
|
|
5936
|
+
* {@link QueryManager.subscribe}. The `useQueryManager` hook from `react-querybuilder`
|
|
5937
|
+
* already does this.
|
|
5938
|
+
*/
|
|
5939
|
+
getConfigVersion: () => number;
|
|
5896
5940
|
/**
|
|
5897
5941
|
* Creates an independent manager with the same configuration and the current query.
|
|
5898
5942
|
*
|
|
@@ -6891,6 +6891,7 @@ var _historyEnabled = /* @__PURE__ */ new WeakMap();
|
|
|
6891
6891
|
var _maxHistory = /* @__PURE__ */ new WeakMap();
|
|
6892
6892
|
var _coalesceMs = /* @__PURE__ */ new WeakMap();
|
|
6893
6893
|
var _now = /* @__PURE__ */ new WeakMap();
|
|
6894
|
+
var _configVersion = /* @__PURE__ */ new WeakMap();
|
|
6894
6895
|
var _past = /* @__PURE__ */ new WeakMap();
|
|
6895
6896
|
var _future = /* @__PURE__ */ new WeakMap();
|
|
6896
6897
|
var _lastSig = /* @__PURE__ */ new WeakMap();
|
|
@@ -6928,7 +6929,6 @@ _Symbol$iterator = Symbol.iterator;
|
|
|
6928
6929
|
*/
|
|
6929
6930
|
var QueryManager = class QueryManager {
|
|
6930
6931
|
constructor(query, options = {}) {
|
|
6931
|
-
var _options$idGenerator, _options$validator, _options$strict, _options$respectDisab, _options$history, _historyOptions$maxHi, _historyOptions$coale, _options$now, _options$translations, _options$operators, _options$translations2, _options$combinators;
|
|
6932
6932
|
_classPrivateMethodInitSpec(this, _QueryManager_brand);
|
|
6933
6933
|
_classPrivateFieldInitSpec(this, _query, void 0);
|
|
6934
6934
|
_classPrivateFieldInitSpec(this, _options, void 0);
|
|
@@ -6946,6 +6946,7 @@ var QueryManager = class QueryManager {
|
|
|
6946
6946
|
_classPrivateFieldInitSpec(this, _maxHistory, void 0);
|
|
6947
6947
|
_classPrivateFieldInitSpec(this, _coalesceMs, void 0);
|
|
6948
6948
|
_classPrivateFieldInitSpec(this, _now, void 0);
|
|
6949
|
+
_classPrivateFieldInitSpec(this, _configVersion, 0);
|
|
6949
6950
|
_classPrivateFieldInitSpec(this, _past, []);
|
|
6950
6951
|
_classPrivateFieldInitSpec(this, _future, []);
|
|
6951
6952
|
_classPrivateFieldInitSpec(this, _lastSig, void 0);
|
|
@@ -6968,6 +6969,20 @@ var QueryManager = class QueryManager {
|
|
|
6968
6969
|
"getQuery",
|
|
6969
6970
|
() => _classPrivateFieldGet2(_query, this)
|
|
6970
6971
|
);
|
|
6972
|
+
_defineProperty(
|
|
6973
|
+
this,
|
|
6974
|
+
/**
|
|
6975
|
+
* A counter incremented by every {@link QueryManager.reconfigure} call. Because reconfiguring
|
|
6976
|
+
* leaves the query object untouched, subscribers that compare query identity alone cannot see
|
|
6977
|
+
* it; this provides a snapshot that does change.
|
|
6978
|
+
*
|
|
6979
|
+
* Bound to the instance, so it can be passed directly to `useSyncExternalStore` alongside
|
|
6980
|
+
* {@link QueryManager.subscribe}. The `useQueryManager` hook from `react-querybuilder`
|
|
6981
|
+
* already does this.
|
|
6982
|
+
*/
|
|
6983
|
+
"getConfigVersion",
|
|
6984
|
+
() => _classPrivateFieldGet2(_configVersion, this)
|
|
6985
|
+
);
|
|
6971
6986
|
_defineProperty(
|
|
6972
6987
|
this,
|
|
6973
6988
|
/**
|
|
@@ -6993,37 +7008,7 @@ var QueryManager = class QueryManager {
|
|
|
6993
7008
|
};
|
|
6994
7009
|
}
|
|
6995
7010
|
);
|
|
6996
|
-
|
|
6997
|
-
_classPrivateFieldSet2(_idGenerator, this, (_options$idGenerator = options.idGenerator) !== null && _options$idGenerator !== void 0 ? _options$idGenerator : generateID);
|
|
6998
|
-
_classPrivateFieldSet2(_validator, this, (_options$validator = options.validator) !== null && _options$validator !== void 0 ? _options$validator : defaultValidator);
|
|
6999
|
-
_classPrivateFieldSet2(_strict, this, (_options$strict = options.strict) !== null && _options$strict !== void 0 ? _options$strict : false);
|
|
7000
|
-
_classPrivateFieldSet2(_respectDisabled, this, (_options$respectDisab = options.respectDisabled) !== null && _options$respectDisab !== void 0 ? _options$respectDisab : true);
|
|
7001
|
-
_classPrivateFieldSet2(_onInvalidTarget, this, options.onInvalidTarget);
|
|
7002
|
-
const history = (_options$history = options.history) !== null && _options$history !== void 0 ? _options$history : false;
|
|
7003
|
-
const historyOptions = typeof history === "object" ? history : {};
|
|
7004
|
-
_classPrivateFieldSet2(_historyEnabled, this, history !== false);
|
|
7005
|
-
_classPrivateFieldSet2(_maxHistory, this, (_historyOptions$maxHi = historyOptions.maxHistory) !== null && _historyOptions$maxHi !== void 0 ? _historyOptions$maxHi : 50);
|
|
7006
|
-
_classPrivateFieldSet2(_coalesceMs, this, (_historyOptions$coale = historyOptions.coalesceMs) !== null && _historyOptions$coale !== void 0 ? _historyOptions$coale : 500);
|
|
7007
|
-
_classPrivateFieldSet2(_now, this, (_options$now = options.now) !== null && _options$now !== void 0 ? _options$now : Date.now);
|
|
7008
|
-
const { optionList: fields, optionsMap: fieldMap } = prepareOptionList({
|
|
7009
|
-
optionList: options.fields,
|
|
7010
|
-
baseOption: options.baseField,
|
|
7011
|
-
autoSelectOption: options.autoSelectField,
|
|
7012
|
-
placeholder: (_options$translations = options.translations) === null || _options$translations === void 0 ? void 0 : _options$translations.fields
|
|
7013
|
-
});
|
|
7014
|
-
_classPrivateFieldSet2(_fields, this, freeze(fields, true));
|
|
7015
|
-
_classPrivateFieldSet2(_fieldMap, this, freeze(fieldMap, true));
|
|
7016
|
-
_classPrivateFieldSet2(_operators, this, prepareOptionList({
|
|
7017
|
-
optionList: (_options$operators = options.operators) !== null && _options$operators !== void 0 ? _options$operators : defaultOperators,
|
|
7018
|
-
baseOption: options.baseOperator,
|
|
7019
|
-
labelMap: defaultOperatorLabelMap,
|
|
7020
|
-
autoSelectOption: options.autoSelectOperator,
|
|
7021
|
-
placeholder: (_options$translations2 = options.translations) === null || _options$translations2 === void 0 ? void 0 : _options$translations2.operators
|
|
7022
|
-
}).optionList);
|
|
7023
|
-
_classPrivateFieldSet2(_combinators, this, freeze(prepareOptionList({
|
|
7024
|
-
optionList: (_options$combinators = options.combinators) !== null && _options$combinators !== void 0 ? _options$combinators : defaultCombinators,
|
|
7025
|
-
baseOption: options.baseCombinator
|
|
7026
|
-
}).optionList, true));
|
|
7011
|
+
_assertClassBrand(_QueryManager_brand, this, _applyOptions).call(this, options);
|
|
7027
7012
|
_classPrivateFieldSet2(_query, this, freeze(query ? prepareRuleGroup(query, { idGenerator: _classPrivateFieldGet2(_idGenerator, this) }) : this.createRuleGroup(), true));
|
|
7028
7013
|
}
|
|
7029
7014
|
/** Replaces the current query, ensuring every rule and group has an `id`. */
|
|
@@ -7130,6 +7115,48 @@ var QueryManager = class QueryManager {
|
|
|
7130
7115
|
return this;
|
|
7131
7116
|
}
|
|
7132
7117
|
/**
|
|
7118
|
+
* The options currently in effect, as a frozen shallow copy. Reflects everything applied by
|
|
7119
|
+
* the constructor and any subsequent {@link QueryManager.reconfigure} calls, but not the
|
|
7120
|
+
* defaults filled in for options that were never provided.
|
|
7121
|
+
*/
|
|
7122
|
+
getOptions() {
|
|
7123
|
+
return freeze(_objectSpread2({}, _classPrivateFieldGet2(_options, this)));
|
|
7124
|
+
}
|
|
7125
|
+
/**
|
|
7126
|
+
* Updates the manager's configuration in place, keeping the current query, the undo/redo
|
|
7127
|
+
* history, and every subscriber. Use this to propagate new `translations`, `fields`,
|
|
7128
|
+
* `operators`, and so on without discarding state:
|
|
7129
|
+
*
|
|
7130
|
+
* ```ts
|
|
7131
|
+
* q.reconfigure({ translations: { fields: { placeholderLabel: 'Choisir un champ' } } });
|
|
7132
|
+
* ```
|
|
7133
|
+
*
|
|
7134
|
+
* The incoming options are shallow-merged over the current ones, so keys left out are
|
|
7135
|
+
* preserved. Passing a key explicitly as `undefined` resets it to its default. Object-valued
|
|
7136
|
+
* options like `translations` are replaced wholesale rather than deep-merged — spread the
|
|
7137
|
+
* current value in yourself to patch one key. Pass `{ replace: true }` to discard the
|
|
7138
|
+
* existing options entirely and start from the incoming set.
|
|
7139
|
+
*
|
|
7140
|
+
* The query is never rewritten, even when the new options no longer describe it: a rule whose
|
|
7141
|
+
* `field` is not in the new `fields` list is left as-is. Call
|
|
7142
|
+
* {@link QueryManager.validate validate} to detect that, or `setQuery(getQuery())` to
|
|
7143
|
+
* re-normalize.
|
|
7144
|
+
*
|
|
7145
|
+
* History options are honored immediately: lowering `maxHistory` trims the undo stack, and
|
|
7146
|
+
* turning history off clears both stacks. Subscribers are notified once, and
|
|
7147
|
+
* {@link QueryManager.getConfigVersion} is incremented, even inside a
|
|
7148
|
+
* {@link QueryManager.batch batch} — configuration is not part of a batch's rollback.
|
|
7149
|
+
*/
|
|
7150
|
+
reconfigure(options, config) {
|
|
7151
|
+
var _this$configVersion;
|
|
7152
|
+
_assertClassBrand(_QueryManager_brand, this, _applyOptions).call(this, freeze((config === null || config === void 0 ? void 0 : config.replace) ? _objectSpread2({}, options) : _objectSpread2(_objectSpread2({}, _classPrivateFieldGet2(_options, this)), options)));
|
|
7153
|
+
_classPrivateFieldSet2(_validation, this, void 0);
|
|
7154
|
+
_assertClassBrand(_QueryManager_brand, this, _reconcileHistoryConfig).call(this);
|
|
7155
|
+
_classPrivateFieldSet2(_configVersion, this, (_this$configVersion = _classPrivateFieldGet2(_configVersion, this), ++_this$configVersion));
|
|
7156
|
+
_assertClassBrand(_QueryManager_brand, this, _notify).call(this);
|
|
7157
|
+
return this;
|
|
7158
|
+
}
|
|
7159
|
+
/**
|
|
7133
7160
|
* Creates an independent manager with the same configuration and the current query.
|
|
7134
7161
|
*
|
|
7135
7162
|
* Subscribers and history are _not_ carried over: the clone starts with no listeners and an
|
|
@@ -7177,6 +7204,7 @@ var QueryManager = class QueryManager {
|
|
|
7177
7204
|
_classPrivateFieldSet2(_future, this, snapshot.future);
|
|
7178
7205
|
_classPrivateFieldSet2(_lastSig, this, snapshot.lastSig);
|
|
7179
7206
|
_classPrivateFieldSet2(_lastAt, this, snapshot.lastAt);
|
|
7207
|
+
_assertClassBrand(_QueryManager_brand, this, _reconcileHistoryConfig).call(this);
|
|
7180
7208
|
}
|
|
7181
7209
|
throw error;
|
|
7182
7210
|
} finally {
|
|
@@ -7521,6 +7549,45 @@ var QueryManager = class QueryManager {
|
|
|
7521
7549
|
return transformQuery(_classPrivateFieldGet2(_query, this), options);
|
|
7522
7550
|
}
|
|
7523
7551
|
};
|
|
7552
|
+
/**
|
|
7553
|
+
* Assigns `#options` and every field derived from it. Shared by the constructor and
|
|
7554
|
+
* {@link QueryManager.reconfigure}, so the two can never drift apart. Does not touch the
|
|
7555
|
+
* query, the history stacks, the caches, or the subscriber list.
|
|
7556
|
+
*/
|
|
7557
|
+
function _applyOptions(options) {
|
|
7558
|
+
var _options$idGenerator, _options$validator, _options$strict, _options$respectDisab, _options$history, _historyOptions$maxHi, _historyOptions$coale, _options$now, _options$translations, _options$operators, _options$translations2, _options$combinators;
|
|
7559
|
+
_classPrivateFieldSet2(_options, this, options);
|
|
7560
|
+
_classPrivateFieldSet2(_idGenerator, this, (_options$idGenerator = options.idGenerator) !== null && _options$idGenerator !== void 0 ? _options$idGenerator : generateID);
|
|
7561
|
+
_classPrivateFieldSet2(_validator, this, (_options$validator = options.validator) !== null && _options$validator !== void 0 ? _options$validator : defaultValidator);
|
|
7562
|
+
_classPrivateFieldSet2(_strict, this, (_options$strict = options.strict) !== null && _options$strict !== void 0 ? _options$strict : false);
|
|
7563
|
+
_classPrivateFieldSet2(_respectDisabled, this, (_options$respectDisab = options.respectDisabled) !== null && _options$respectDisab !== void 0 ? _options$respectDisab : true);
|
|
7564
|
+
_classPrivateFieldSet2(_onInvalidTarget, this, options.onInvalidTarget);
|
|
7565
|
+
const history = (_options$history = options.history) !== null && _options$history !== void 0 ? _options$history : false;
|
|
7566
|
+
const historyOptions = typeof history === "object" ? history : {};
|
|
7567
|
+
_classPrivateFieldSet2(_historyEnabled, this, history !== false);
|
|
7568
|
+
_classPrivateFieldSet2(_maxHistory, this, (_historyOptions$maxHi = historyOptions.maxHistory) !== null && _historyOptions$maxHi !== void 0 ? _historyOptions$maxHi : 50);
|
|
7569
|
+
_classPrivateFieldSet2(_coalesceMs, this, (_historyOptions$coale = historyOptions.coalesceMs) !== null && _historyOptions$coale !== void 0 ? _historyOptions$coale : 500);
|
|
7570
|
+
_classPrivateFieldSet2(_now, this, (_options$now = options.now) !== null && _options$now !== void 0 ? _options$now : Date.now);
|
|
7571
|
+
const { optionList: fields, optionsMap: fieldMap } = prepareOptionList({
|
|
7572
|
+
optionList: options.fields,
|
|
7573
|
+
baseOption: options.baseField,
|
|
7574
|
+
autoSelectOption: options.autoSelectField,
|
|
7575
|
+
placeholder: (_options$translations = options.translations) === null || _options$translations === void 0 ? void 0 : _options$translations.fields
|
|
7576
|
+
});
|
|
7577
|
+
_classPrivateFieldSet2(_fields, this, freeze(fields, true));
|
|
7578
|
+
_classPrivateFieldSet2(_fieldMap, this, freeze(fieldMap, true));
|
|
7579
|
+
_classPrivateFieldSet2(_operators, this, prepareOptionList({
|
|
7580
|
+
optionList: (_options$operators = options.operators) !== null && _options$operators !== void 0 ? _options$operators : defaultOperators,
|
|
7581
|
+
baseOption: options.baseOperator,
|
|
7582
|
+
labelMap: defaultOperatorLabelMap,
|
|
7583
|
+
autoSelectOption: options.autoSelectOperator,
|
|
7584
|
+
placeholder: (_options$translations2 = options.translations) === null || _options$translations2 === void 0 ? void 0 : _options$translations2.operators
|
|
7585
|
+
}).optionList);
|
|
7586
|
+
_classPrivateFieldSet2(_combinators, this, freeze(prepareOptionList({
|
|
7587
|
+
optionList: (_options$combinators = options.combinators) !== null && _options$combinators !== void 0 ? _options$combinators : defaultCombinators,
|
|
7588
|
+
baseOption: options.baseCombinator
|
|
7589
|
+
}).optionList, true));
|
|
7590
|
+
}
|
|
7524
7591
|
/** Resolves the field configuration for a field name. */
|
|
7525
7592
|
function _fieldData(field) {
|
|
7526
7593
|
var _this$fieldMap$field;
|
|
@@ -7723,6 +7790,25 @@ function _toPath(pathOrID) {
|
|
|
7723
7790
|
var _this$index$get;
|
|
7724
7791
|
return typeof pathOrID === "string" ? (_this$index$get = _assertClassBrand(_QueryManager_brand, this, _index).call(this).get(pathOrID)) !== null && _this$index$get !== void 0 ? _this$index$get : null : pathOrID;
|
|
7725
7792
|
}
|
|
7793
|
+
/**
|
|
7794
|
+
* Brings the history stacks in line with the current history configuration. Unlike
|
|
7795
|
+
* {@link QueryManager.clearHistory}, this does _not_ set `#historyBypassed`: it reflects a
|
|
7796
|
+
* configuration change rather than a deliberate history repositioning, so a later mutation in
|
|
7797
|
+
* the same batch must still be recorded normally.
|
|
7798
|
+
*
|
|
7799
|
+
* Called by {@link QueryManager.reconfigure} and again after a failed
|
|
7800
|
+
* {@link QueryManager.batch batch} restores its snapshot, since that snapshot predates the
|
|
7801
|
+
* configuration change (configuration is not part of a batch's rollback).
|
|
7802
|
+
*/
|
|
7803
|
+
function _reconcileHistoryConfig() {
|
|
7804
|
+
if (_classPrivateFieldGet2(_historyEnabled, this)) {
|
|
7805
|
+
if (_classPrivateFieldGet2(_past, this).length > _classPrivateFieldGet2(_maxHistory, this)) _classPrivateFieldGet2(_past, this).splice(0, _classPrivateFieldGet2(_past, this).length - _classPrivateFieldGet2(_maxHistory, this));
|
|
7806
|
+
} else {
|
|
7807
|
+
_classPrivateFieldSet2(_past, this, []);
|
|
7808
|
+
_classPrivateFieldSet2(_future, this, []);
|
|
7809
|
+
_classPrivateFieldSet2(_lastSig, this, void 0);
|
|
7810
|
+
}
|
|
7811
|
+
}
|
|
7726
7812
|
//#endregion
|
|
7727
7813
|
export { LogType, QueryManager, QueryManagerError, TestID, add, addInPlace, betweenOperators, bigIntJsonParseReviver, bigIntJsonStringifyReplacer, celCombinatorMap, clsx, coerceBigIntValue, coerceInputType, convertFromIC, convertQuery, convertToIC, createQueryActions, createRule, createRuleGroup, cypherCombinatorMap, defaultCELValueProcessor, defaultCoalesceMs, defaultCombinatorLabelMap, defaultCombinators, defaultCombinatorsExtended, defaultControlClassnames, defaultExportOperatorMap, defaultJoinChar, defaultMatchModes, defaultMaxHistory, defaultMongoDBValueProcessor, defaultNLTranslations, defaultOperatorLabelMap, defaultOperatorNegationMap, defaultOperatorProcessorNL, defaultOperatorProcessorSQL, defaultOperators, defaultPlaceholderFieldGroupLabel, defaultPlaceholderFieldLabel, defaultPlaceholderFieldName, defaultPlaceholderLabel, defaultPlaceholderName, defaultPlaceholderOperatorGroupLabel, defaultPlaceholderOperatorLabel, defaultPlaceholderOperatorName, defaultPlaceholderValueGroupLabel, defaultPlaceholderValueLabel, defaultPlaceholderValueName, defaultRuleGroupProcessorCEL, defaultRuleGroupProcessorCypher, defaultRuleGroupProcessorDiagnostics, defaultRuleGroupProcessorDrizzle, defaultRuleGroupProcessorElasticSearch, defaultRuleGroupProcessorGremlin, defaultRuleGroupProcessorJSONata, defaultRuleGroupProcessorJsonLogic, defaultRuleGroupProcessorLDAP, defaultRuleGroupProcessorMongoDB, defaultRuleGroupProcessorMongoDBQuery, defaultRuleGroupProcessorNL, defaultRuleGroupProcessorParameterized, defaultRuleGroupProcessorPrisma, defaultRuleGroupProcessorSPARQL, defaultRuleGroupProcessorSQL, defaultRuleGroupProcessorSequelize, defaultRuleGroupProcessorSpEL, defaultRuleGroupProcessorTanStackDB, defaultRuleProcessorCEL, defaultRuleProcessorCypher, defaultRuleProcessorDrizzle, defaultRuleProcessorElasticSearch, defaultRuleProcessorGremlin, defaultRuleProcessorJSONata, defaultRuleProcessorJsonLogic, defaultRuleProcessorLDAP, defaultRuleProcessorMongoDB, defaultRuleProcessorMongoDBQuery, defaultRuleProcessorNL, defaultRuleProcessorParameterized, defaultRuleProcessorPrisma, defaultRuleProcessorSPARQL, defaultRuleProcessorSQL, defaultRuleProcessorSequelize, defaultRuleProcessorSpEL, defaultRuleProcessorTanStackDB, defaultSpELValueProcessor, defaultTranslations, defaultValidator, defaultValueProcessor, defaultValueProcessorByRule, defaultValueProcessorCELByRule, defaultValueProcessorMongoDBByRule, defaultValueProcessorNL, defaultValueProcessorSpELByRule, derivePathInfo, deriveQueryBuilderClassNames, deriveRuleClassName, deriveRuleClassNames, deriveRuleContext, deriveRuleGroupClassNames, deriveRuleGroupContext, deriveRuleGroupOuterClassName, deriveRuleOuterClassName, exceedsMaxLevels, filterFieldsByComparator, findID, findPath, formatQuery, formatQueryOptionPresets, generateAccessibleDescription, generateID, getCommonAncestorPath, getFieldData, getFirstOption, getGuardAbortReason, getLikeWildcards, getMatchModesUtil, getMultiValueUpdate, getNLTranslataion, getOption, getParametersAsList, getParentPath, getParseNumberMethod, getPathOfID, getQuoteFieldNamesWithArray, getQuotedFieldName, getRuleDefaultValue, getRuleGroupCombinator, getRuleInputType, getRuleValidationResult, getRuleValueEditorType, getRuleValueSourceOptions, getRuleValues, getSQLConcat, getSubqueryElementAlias, getValidationClassNames, getValueEditorReset, getValueSelectorUpdate, getValueSourcesUtil, group, groupInPlace, groupInvalidReasons, hideValueControlsForOperator, inOperators, insert, insertInPlace, isAncestor, isBetweenOperator, isFlexibleOptionArray, isFlexibleOptionGroupArray, isFullOptionArray, isFullOptionGroupArray, isOptionGroupArray, isPojo, isRuleGroup, isRuleGroupType, isRuleGroupTypeIC, isRuleOrGroupValid, isRuleType, isUnsafeKey, isValidValue, isValidationResult, isValueProcessorLegacy, joinWith, jsonLogicAdditionalOperators, lc, mapSQLOperator, mergeAnyTranslation, mergeAnyTranslations, mergeClassnames, mongoDbFallback, mongoOperators, move, moveInPlace, normalizeConstituentWordOrder, normalizeValueSelectorValue, nullFreeArray, nullOperators, nullOrUndefinedOrEmpty, numericRegex, numerifyValues, objectEntries, objectKeys, parseNumber, pathIsDisabled, pathIsDisabledByPaths, pathsAreEqual, preferAnyProp, preferFlagProps, preferProp, prepareOptionList, prepareRule, prepareRuleGroup, prepareRuleOrGroup, prismaFallback, prismaOperators, processMatchMode, queryBuilderFlagDefaults, regenerateID, regenerateIDs, relationalOperators, remove, removeInPlace, resolveCandidateQuery, resolveDefaultOperator, resolveOperatorList, resolveValueEditorType, resolveValueList, rootPath, shouldRenderAsNumber, signatureOf, sparqlVar, splitBy, sqlDialectPresets, standardClassnames, strictAbortReasons, stripParamPrefix, structuralSignature, subqueryElementAliasBase, substringOperators, toArray, toFlatOptionArray, toFullOption, toFullOptionList, toFullOptionMap, transformQuery, trimIfString, unchangedSignature, uniqByIdentifier, uniqByName, uniqOptGroups, uniqOptList, update, updateInPlace, uuidV4regex, withParamPrefix, wrapLikeFragment };
|
|
7728
7814
|
|