@aiao/rxdb-query-builder 0.0.10 → 0.0.12

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/index.js CHANGED
@@ -1,13 +1,13 @@
1
- import { v4 as V } from "uuid";
2
- import { BehaviorSubject as L, map as M, distinctUntilChanged as w } from "rxjs";
1
+ import { v4 as U } from "uuid";
2
+ import { BehaviorSubject as W, map as k, distinctUntilChanged as $ } from "rxjs";
3
3
  import { RelationKind as B, PropertyType as g } from "@aiao/rxdb";
4
- function b(n) {
4
+ function v(n) {
5
5
  return "combinator" in n && "rules" in n;
6
6
  }
7
- function S(n) {
7
+ function M(n) {
8
8
  return "field" in n && "operator" in n;
9
9
  }
10
- const k = [
10
+ const O = [
11
11
  // 相等操作符
12
12
  {
13
13
  key: "=",
@@ -136,35 +136,37 @@ const k = [
136
136
  applicableTypes: ["relation"]
137
137
  }
138
138
  ];
139
- function ce(n, e = k) {
140
- return e.filter((r) => r.applicableTypes.includes(n));
139
+ function ye(n, e = O) {
140
+ return e.filter((t) => t.applicableTypes.includes(n));
141
141
  }
142
- const K = [
142
+ function D(n) {
143
+ return n == null || Array.isArray(n);
144
+ }
145
+ const Y = [
143
146
  {
144
147
  name: "stringType",
145
148
  appliesTo: ["string"],
146
149
  message: "值必须是字符串类型",
147
- validate: (n) => n.value === void 0 || n.value === null || Array.isArray(n.value) ? !0 : typeof n.value == "string"
150
+ validate: (n) => D(n.value) ? !0 : typeof n.value == "string"
148
151
  },
149
152
  {
150
153
  name: "numberType",
151
154
  appliesTo: ["number"],
152
155
  message: "值必须是数字类型",
153
- validate: (n) => n.value === void 0 || n.value === null || Array.isArray(n.value) ? !0 : typeof n.value == "number" && !isNaN(n.value)
156
+ validate: (n) => D(n.value) ? !0 : typeof n.value == "number" && !isNaN(n.value)
154
157
  },
155
158
  {
156
159
  name: "booleanType",
157
160
  appliesTo: ["boolean"],
158
161
  message: "值必须是布尔类型",
159
- validate: (n) => n.value === void 0 || n.value === null || Array.isArray(n.value) ? !0 : typeof n.value == "boolean"
162
+ validate: (n) => D(n.value) ? !0 : typeof n.value == "boolean"
160
163
  },
161
164
  {
162
165
  name: "dateType",
163
166
  appliesTo: ["date"],
164
167
  message: "值必须是有效日期",
165
168
  validate: (n) => {
166
- if (n.value === void 0 || n.value === null || Array.isArray(n.value))
167
- return !0;
169
+ if (D(n.value)) return !0;
168
170
  if (n.value instanceof Date)
169
171
  return !isNaN(n.value.getTime());
170
172
  if (typeof n.value == "string") {
@@ -174,7 +176,7 @@ const K = [
174
176
  return !1;
175
177
  }
176
178
  }
177
- ], U = {
179
+ ], X = {
178
180
  uuid: "string",
179
181
  string: "string",
180
182
  number: "number",
@@ -186,10 +188,10 @@ const K = [
186
188
  keyValue: "object",
187
189
  json: "object"
188
190
  };
189
- function W(n, e) {
190
- return e?.displayName ? e.displayName : n.replace(/([A-Z])/g, " $1").replace(/^./, (r) => r.toUpperCase()).trim();
191
+ function z(n, e) {
192
+ return e?.displayName ? e.displayName : n.replace(/([A-Z])/g, " $1").replace(/^./, (t) => t.toUpperCase()).trim();
191
193
  }
192
- class P {
194
+ class x {
193
195
  options;
194
196
  constructor(e = {}) {
195
197
  this.options = {
@@ -198,7 +200,7 @@ class P {
198
200
  includeRelations: e.includeRelations ?? !1,
199
201
  entityMetadataMap: e.entityMetadataMap,
200
202
  fieldFilter: e.fieldFilter ?? (() => !0),
201
- displayNameGenerator: e.displayNameGenerator ?? W
203
+ displayNameGenerator: e.displayNameGenerator ?? z
202
204
  };
203
205
  }
204
206
  /**
@@ -215,24 +217,24 @@ class P {
215
217
  * ```
216
218
  */
217
219
  parse(e) {
218
- const r = [];
219
- for (const t of e.properties) {
220
- if (!this.options.includeForeignKeys && e.isForeignKey(t.name))
220
+ const t = [];
221
+ for (const r of e.properties) {
222
+ if (!this.options.includeForeignKeys && e.isForeignKey(r.name))
221
223
  continue;
222
- const s = this.parseProperty(t);
223
- s && this.options.fieldFilter(s) && r.push(s);
224
+ const s = this.parseProperty(r);
225
+ s && this.options.fieldFilter(s) && t.push(s);
224
226
  }
225
227
  if (this.options.includeComputedProperties)
226
- for (const t of e.computedProperties) {
227
- const s = this.parseProperty(t);
228
- s && this.options.fieldFilter(s) && r.push(s);
228
+ for (const r of e.computedProperties) {
229
+ const s = this.parseProperty(r);
230
+ s && this.options.fieldFilter(s) && t.push(s);
229
231
  }
230
232
  if (this.options.includeRelations && e.relations)
231
- for (const t of e.relations) {
232
- const s = this.parseRelation(t);
233
- s && this.options.fieldFilter(s) && r.push(s);
233
+ for (const r of e.relations) {
234
+ const s = this.parseRelation(r);
235
+ s && this.options.fieldFilter(s) && t.push(s);
234
236
  }
235
- return r;
237
+ return t;
236
238
  }
237
239
  /**
238
240
  * 从多个 EntityMetadata 批量解析
@@ -241,37 +243,37 @@ class P {
241
243
  * @returns 实体名称到字段数组的映射
242
244
  */
243
245
  parseMany(e) {
244
- const r = /* @__PURE__ */ new Map();
245
- for (const [t, s] of e)
246
- r.set(t, this.parse(s));
247
- return r;
246
+ const t = /* @__PURE__ */ new Map();
247
+ for (const [r, s] of e)
248
+ t.set(r, this.parse(s));
249
+ return t;
248
250
  }
249
251
  /**
250
252
  * 解析单个属性
251
253
  */
252
254
  parseProperty(e) {
253
- const r = this.mapPropertyType(e.type);
254
- if (!r)
255
+ const t = this.mapPropertyType(e.type);
256
+ if (!t)
255
257
  return null;
256
- const t = {
258
+ const r = {
257
259
  name: e.name,
258
260
  displayName: this.options.displayNameGenerator(e.name, e),
259
- type: r
261
+ type: t
260
262
  };
261
- return e.nullable !== void 0 && (t.required = !e.nullable), e.description && (t.description = e.description), e.enum && Array.isArray(e.enum) && (t.enum = e.enum), e.pattern && (t.pattern = e.pattern), t;
263
+ return e.nullable !== void 0 && (r.required = !e.nullable), e.description && (r.description = e.description), e.enum && Array.isArray(e.enum) && (r.enum = e.enum), e.pattern && (r.pattern = e.pattern), r;
262
264
  }
263
265
  /**
264
266
  * 将 RxDB PropertyType 映射到 QueryBuilder 类型
265
267
  */
266
268
  mapPropertyType(e) {
267
- const r = typeof e == "string" ? e : String(e);
268
- return U[r] ?? null;
269
+ const t = typeof e == "string" ? e : String(e);
270
+ return X[t] ?? null;
269
271
  }
270
272
  /**
271
273
  * 解析关系字段
272
274
  */
273
275
  parseRelation(e) {
274
- const r = {
276
+ const t = {
275
277
  name: e.name,
276
278
  displayName: this.options.displayNameGenerator(e.name, e),
277
279
  type: "relation",
@@ -280,29 +282,29 @@ class P {
280
282
  relationKind: e.kind
281
283
  };
282
284
  if (this.options.entityMetadataMap) {
283
- const t = e.mappedEntity, s = this.options.entityMetadataMap.get(t);
285
+ const r = e.mappedEntity, s = this.options.entityMetadataMap.get(r);
284
286
  if (s) {
285
- const a = new P({
287
+ const a = new x({
286
288
  ...this.options,
287
289
  includeRelations: !1
288
290
  // 防止无限递归
289
291
  });
290
- r.relationFields = a.parse(s);
292
+ t.relationFields = a.parse(s);
291
293
  }
292
294
  }
293
- return r;
295
+ return t;
294
296
  }
295
297
  }
296
- function j(n) {
297
- return new P(n);
298
+ function _(n) {
299
+ return new x(n);
298
300
  }
299
- function A() {
300
- return V();
301
+ function E() {
302
+ return U();
301
303
  }
302
- class Y {
304
+ class Z {
303
305
  idGenerator;
304
306
  constructor(e = {}) {
305
- this.idGenerator = e.idGenerator ?? A;
307
+ this.idGenerator = e.idGenerator ?? E;
306
308
  }
307
309
  /**
308
310
  * 将 QueryBuilder 状态转换为 RxDB Query
@@ -341,12 +343,12 @@ class Y {
341
343
  * 转换单个规则组到 RxDB 格式
342
344
  */
343
345
  convertGroupToRxDB(e) {
344
- const r = [];
345
- for (const t of e.rules)
346
- b(t) ? r.push(this.convertGroupToRxDB(t)) : S(t) && r.push(this.convertRuleToRxDB(t));
346
+ const t = [];
347
+ for (const r of e.rules)
348
+ v(r) ? t.push(this.convertGroupToRxDB(r)) : t.push(this.convertRuleToRxDB(r));
347
349
  return {
348
350
  combinator: e.combinator,
349
- rules: r
351
+ rules: t
350
352
  };
351
353
  }
352
354
  /**
@@ -354,20 +356,20 @@ class Y {
354
356
  * 移除 QueryBuilder 特有的 id 字段
355
357
  */
356
358
  convertRuleToRxDB(e) {
357
- const { id: r, ...t } = e;
358
- return t;
359
+ const { id: t, ...r } = e;
360
+ return r;
359
361
  }
360
362
  /**
361
363
  * 从 RxDB 格式转换规则组
362
364
  */
363
365
  convertGroupFromRxDB(e) {
364
- const r = [];
365
- for (const t of e.rules)
366
- this.isRxDBRuleGroup(t) ? r.push(this.convertGroupFromRxDB(t)) : r.push(this.convertRuleFromRxDB(t));
366
+ const t = [];
367
+ for (const r of e.rules)
368
+ "combinator" in r && "rules" in r ? t.push(this.convertGroupFromRxDB(r)) : t.push(this.convertRuleFromRxDB(r));
367
369
  return {
368
370
  id: this.idGenerator(),
369
371
  combinator: e.combinator,
370
- rules: r
372
+ rules: t
371
373
  };
372
374
  }
373
375
  /**
@@ -380,17 +382,11 @@ class Y {
380
382
  ...e
381
383
  };
382
384
  }
383
- /**
384
- * 判断是否为 RxDB RuleGroup
385
- */
386
- isRxDBRuleGroup(e) {
387
- return typeof e == "object" && e !== null && "combinator" in e && "rules" in e && Array.isArray(e.rules);
388
- }
389
385
  }
390
- function X(n) {
391
- return new Y(n);
386
+ function H(n) {
387
+ return new Z(n);
392
388
  }
393
- class q {
389
+ class C {
394
390
  operators;
395
391
  /**
396
392
  * 获取操作符数量
@@ -400,11 +396,11 @@ class q {
400
396
  }
401
397
  constructor(e = {}) {
402
398
  if (this.operators = /* @__PURE__ */ new Map(), e.useDefaultOperators !== !1)
403
- for (const r of k)
404
- this.operators.set(r.key, r);
399
+ for (const t of O)
400
+ this.operators.set(t.key, t);
405
401
  if (e.operators)
406
- for (const r of e.operators)
407
- this.operators.set(r.key, r);
402
+ for (const t of e.operators)
403
+ this.operators.set(t.key, t);
408
404
  }
409
405
  /**
410
406
  * 注册新操作符
@@ -430,8 +426,8 @@ class q {
430
426
  * @param operators - 操作符定义数组
431
427
  */
432
428
  registerMany(e) {
433
- for (const r of e)
434
- this.register(r);
429
+ for (const t of e)
430
+ this.register(t);
435
431
  }
436
432
  /**
437
433
  * 移除操作符
@@ -472,7 +468,7 @@ class q {
472
468
  * ```
473
469
  */
474
470
  getForType(e) {
475
- return Array.from(this.operators.values()).filter((r) => r.applicableTypes.includes(e));
471
+ return Array.from(this.operators.values()).filter((t) => t.applicableTypes.includes(e));
476
472
  }
477
473
  /**
478
474
  * 根据字段元数据获取适用的操作符
@@ -481,12 +477,12 @@ class q {
481
477
  * @returns 适用的操作符数组
482
478
  */
483
479
  getForField(e) {
484
- const r = this.getForType(e.type);
480
+ const t = this.getForType(e.type);
485
481
  if (e.nullable) {
486
- const t = r.some((o) => o.key === "null"), s = r.some((o) => o.key === "notNull"), a = this.operators.get("null"), l = this.operators.get("notNull"), i = [...r];
487
- return !t && a && i.push(a), !s && l && i.push(l), i;
482
+ const r = t.some((o) => o.key === "null"), s = t.some((o) => o.key === "notNull"), a = this.operators.get("null"), l = this.operators.get("notNull"), i = [...t];
483
+ return !r && a && i.push(a), !s && l && i.push(l), i;
488
484
  }
489
- return r;
485
+ return t;
490
486
  }
491
487
  /**
492
488
  * 检查操作符是否支持指定类型
@@ -495,9 +491,9 @@ class q {
495
491
  * @param fieldType - 字段类型
496
492
  * @returns 是否支持
497
493
  */
498
- isOperatorSupportedForType(e, r) {
499
- const t = this.operators.get(e);
500
- return t ? t.applicableTypes.includes(r) : !1;
494
+ isOperatorSupportedForType(e, t) {
495
+ const r = this.operators.get(e);
496
+ return r ? r.applicableTypes.includes(t) : !1;
501
497
  }
502
498
  /**
503
499
  * 检查操作符是否支持指定字段
@@ -506,9 +502,9 @@ class q {
506
502
  * @param field - 字段元数据
507
503
  * @returns 是否支持
508
504
  */
509
- isOperatorSupportedForField(e, r) {
510
- const t = this.operators.get(e);
511
- return t ? (e === "null" || e === "notNull") && r.nullable ? !0 : t.applicableTypes.includes(r.type) : !1;
505
+ isOperatorSupportedForField(e, t) {
506
+ const r = this.operators.get(e);
507
+ return r ? (e === "null" || e === "notNull") && t.nullable ? !0 : r.applicableTypes.includes(t.type) : !1;
512
508
  }
513
509
  /**
514
510
  * 获取操作符的值类型
@@ -530,63 +526,63 @@ class q {
530
526
  */
531
527
  reset() {
532
528
  this.clear();
533
- for (const e of k)
529
+ for (const e of O)
534
530
  this.operators.set(e.key, e);
535
531
  }
536
532
  }
537
533
  function J(n) {
538
- return new q(n);
534
+ return new C(n);
539
535
  }
540
- let $ = null;
541
- function z() {
542
- return $ || ($ = new q()), $;
536
+ let P = null;
537
+ function ee() {
538
+ return P || (P = new C()), P;
543
539
  }
544
- function Z(n) {
540
+ function te(n) {
545
541
  return typeof n == "object" && n !== null && "where" in n;
546
542
  }
547
- function O(n) {
543
+ function j(n) {
548
544
  if ("value" in n)
549
545
  return n.value;
550
546
  }
551
- class H {
547
+ class re {
552
548
  rules;
553
549
  operatorRegistry;
554
550
  constructor(e = {}) {
555
- if (this.rules = /* @__PURE__ */ new Map(), this.operatorRegistry = e.operatorRegistry ?? z(), e.useBuiltinRules !== !1)
556
- for (const r of K)
557
- this.rules.set(r.name, r);
551
+ if (this.rules = /* @__PURE__ */ new Map(), this.operatorRegistry = e.operatorRegistry ?? ee(), e.useBuiltinRules !== !1)
552
+ for (const t of Y)
553
+ this.rules.set(t.name, t);
558
554
  if (e.customRules)
559
- for (const r of e.customRules)
560
- this.rules.set(r.name, r);
555
+ for (const t of e.customRules)
556
+ this.rules.set(t.name, t);
561
557
  }
562
558
  /**
563
559
  * 校验单条规则
564
560
  */
565
- validateRule(e, r) {
566
- const t = [], s = O(e), a = {
567
- fieldType: r.type,
561
+ validateRule(e, t) {
562
+ const r = [], s = j(e), a = {
563
+ fieldType: t.type,
568
564
  operator: e.operator,
569
565
  value: s
570
566
  };
571
- this.operatorRegistry.isOperatorSupportedForField(e.operator, r) || t.push({
567
+ this.operatorRegistry.isOperatorSupportedForField(e.operator, t) || r.push({
572
568
  field: e.field,
573
569
  rule: "operatorTypeMatch",
574
- message: `操作符 "${e.operator}" 不支持字段 "${r.name}"`
570
+ message: `操作符 "${e.operator}" 不支持字段 "${t.name}"`
575
571
  });
576
572
  const l = this.operatorRegistry.getValueType(e.operator);
577
573
  if (l === "subquery") {
578
- if (Z(e) && e.where !== void 0 && e.where !== null) {
574
+ if (te(e) && e.where !== void 0 && e.where !== null) {
579
575
  const i = e.where;
580
576
  if (typeof i == "object" && "combinator" in i && "rules" in i)
581
577
  if (!i.rules || i.rules.length === 0)
582
- t.push({
578
+ r.push({
583
579
  field: e.field,
584
580
  rule: "valueType",
585
581
  message: "EXISTS 子查询条件不能为空"
586
582
  });
587
583
  else {
588
584
  const o = this.validateSubqueryRules(i);
589
- o.length > 0 && t.push(
585
+ o.length > 0 && r.push(
590
586
  ...o.map((f) => ({
591
587
  ...f,
592
588
  field: `${e.field}.${f.field}`
@@ -595,43 +591,43 @@ class H {
595
591
  );
596
592
  }
597
593
  else
598
- t.push({
594
+ r.push({
599
595
  field: e.field,
600
596
  rule: "valueType",
601
597
  message: "EXISTS 子查询格式无效"
602
598
  });
603
599
  }
604
600
  } else {
605
- const i = this.validateValueType(s, l, e.field, r.displayName);
606
- i && t.push(i);
601
+ const i = this.validateValueType(s, l, e.field, t.displayName);
602
+ i && r.push(i);
607
603
  }
608
604
  for (const i of this.rules.values()) {
609
- if (i.appliesTo && !i.appliesTo.includes(r.type))
605
+ if (i.appliesTo && !i.appliesTo.includes(t.type))
610
606
  continue;
611
- i.validate(a) || t.push({
607
+ i.validate(a) || r.push({
612
608
  field: e.field,
613
609
  rule: i.name,
614
610
  message: i.message
615
611
  });
616
612
  }
617
613
  return {
618
- valid: t.length === 0,
619
- errors: t.length > 0 ? t : void 0
614
+ valid: r.length === 0,
615
+ errors: r.length > 0 ? r : void 0
620
616
  };
621
617
  }
622
618
  /**
623
619
  * 校验整个规则组
624
620
  */
625
- validateGroup(e, r) {
626
- const t = [];
621
+ validateGroup(e, t) {
622
+ const r = [];
627
623
  for (const s of e.rules)
628
- if (b(s)) {
629
- const a = this.validateGroup(s, r);
630
- !a.valid && a.errors && t.push(...a.errors);
631
- } else if (S(s)) {
632
- const a = r.get(s.field);
624
+ if (v(s)) {
625
+ const a = this.validateGroup(s, t);
626
+ !a.valid && a.errors && r.push(...a.errors);
627
+ } else if (M(s)) {
628
+ const a = t.get(s.field);
633
629
  if (!a) {
634
- t.push({
630
+ r.push({
635
631
  field: s.field,
636
632
  rule: "fieldExists",
637
633
  message: `字段 "${s.field}" 不存在`
@@ -639,11 +635,11 @@ class H {
639
635
  continue;
640
636
  }
641
637
  const l = this.validateRule(s, a);
642
- !l.valid && l.errors && t.push(...l.errors);
638
+ !l.valid && l.errors && r.push(...l.errors);
643
639
  }
644
640
  return {
645
- valid: t.length === 0,
646
- errors: t.length > 0 ? t : void 0
641
+ valid: r.length === 0,
642
+ errors: r.length > 0 ? r : void 0
647
643
  };
648
644
  }
649
645
  /**
@@ -667,19 +663,19 @@ class H {
667
663
  /**
668
664
  * 校验值类型
669
665
  */
670
- validateValueType(e, r, t, s) {
671
- return r === "none" || r === "subquery" ? null : r === "array" ? !Array.isArray(e) || e.length === 0 ? {
672
- field: t,
666
+ validateValueType(e, t, r, s) {
667
+ return t === "none" || t === "subquery" ? null : t === "array" ? !Array.isArray(e) || e.length === 0 ? {
668
+ field: r,
673
669
  rule: "valueType",
674
- message: `${s || t}需要提供一个或多个值`
675
- } : null : r === "range" ? !Array.isArray(e) || e.length !== 2 ? {
676
- field: t,
670
+ message: `${s || r}需要提供一个或多个值`
671
+ } : null : t === "range" ? !Array.isArray(e) || e.length !== 2 ? {
672
+ field: r,
677
673
  rule: "valueType",
678
- message: `${s || t}需要提供两个值(范围)`
674
+ message: `${s || r}需要提供两个值(范围)`
679
675
  } : null : e == null || e === "" ? {
680
- field: t,
676
+ field: r,
681
677
  rule: "valueType",
682
- message: `${s || t}需要提供一个值`
678
+ message: `${s || r}需要提供一个值`
683
679
  } : null;
684
680
  }
685
681
  /**
@@ -690,52 +686,70 @@ class H {
690
686
  * 因此只验证规则的基本结构和值类型,不验证字段是否存在或操作符是否匹配。
691
687
  */
692
688
  validateSubqueryRules(e) {
693
- const r = [];
694
- for (const t of e.rules)
695
- if (b(t)) {
696
- const s = this.validateSubqueryRules(t);
697
- r.push(...s);
698
- } else if (S(t)) {
699
- const s = O(t), a = this.operatorRegistry.getValueType(t.operator), l = this.validateValueType(s, a, t.field);
700
- if (l && r.push(l), a === "subquery") {
701
- const i = t;
689
+ const t = [];
690
+ for (const r of e.rules)
691
+ if (v(r)) {
692
+ const s = this.validateSubqueryRules(r);
693
+ t.push(...s);
694
+ } else if (M(r)) {
695
+ const s = j(r), a = this.operatorRegistry.getValueType(r.operator), l = this.validateValueType(s, a, r.field);
696
+ if (l && t.push(l), a === "subquery") {
697
+ const i = r;
702
698
  if ("where" in i && i.where) {
703
699
  const o = i.where;
704
700
  if (typeof o == "object" && "combinator" in o && "rules" in o)
705
701
  if (!o.rules || o.rules.length === 0)
706
- r.push({
707
- field: t.field,
702
+ t.push({
703
+ field: r.field,
708
704
  rule: "valueType",
709
705
  message: "EXISTS 子查询条件不能为空"
710
706
  });
711
707
  else {
712
708
  const f = this.validateSubqueryRules(o);
713
- r.push(...f);
709
+ t.push(...f);
714
710
  }
715
711
  else
716
- r.push({
717
- field: t.field,
712
+ t.push({
713
+ field: r.field,
718
714
  rule: "valueType",
719
715
  message: "EXISTS 子查询格式无效"
720
716
  });
721
717
  }
722
718
  }
723
719
  }
724
- return r;
720
+ return t;
725
721
  }
726
722
  }
727
- function ee(n) {
728
- return new H(n);
723
+ function se(n) {
724
+ return new re(n);
725
+ }
726
+ function w(n, e) {
727
+ if (n === e) return !0;
728
+ if (n === null || e === null || typeof n != typeof e) return !1;
729
+ if (Array.isArray(n)) {
730
+ if (!Array.isArray(e) || n.length !== e.length) return !1;
731
+ for (let t = 0; t < n.length; t++)
732
+ if (!w(n[t], e[t])) return !1;
733
+ return !0;
734
+ }
735
+ if (typeof n == "object") {
736
+ const t = n, r = e, s = Object.keys(t), a = Object.keys(r);
737
+ if (s.length !== a.length) return !1;
738
+ for (const l of s)
739
+ if (!Object.prototype.hasOwnProperty.call(r, l) || !w(t[l], r[l])) return !1;
740
+ return !0;
741
+ }
742
+ return !1;
729
743
  }
730
- const te = 5, _ = "and";
744
+ const ne = 5, V = "and";
731
745
  function I() {
732
746
  return {
733
- id: A(),
734
- combinator: _,
747
+ id: E(),
748
+ combinator: V,
735
749
  rules: []
736
750
  };
737
751
  }
738
- class re {
752
+ class ie {
739
753
  stateSubject;
740
754
  fieldsMap;
741
755
  config;
@@ -759,22 +773,22 @@ class re {
759
773
  */
760
774
  query$;
761
775
  constructor(e = {}) {
762
- if (this.operatorRegistry = e.operatorRegistry ?? J(), this.validationService = e.validationService ?? ee({
776
+ if (this.operatorRegistry = e.operatorRegistry ?? J(), this.validationService = e.validationService ?? se({
763
777
  operatorRegistry: this.operatorRegistry
764
- }), this.queryConverter = e.queryConverter ?? X(), this.fieldsMap = /* @__PURE__ */ new Map(), e.fields)
765
- for (const t of e.fields)
766
- this.fieldsMap.set(t.name, t);
778
+ }), this.queryConverter = e.queryConverter ?? H(), this.fieldsMap = /* @__PURE__ */ new Map(), e.fields)
779
+ for (const r of e.fields)
780
+ this.fieldsMap.set(r.name, r);
767
781
  this.config = e.config ?? {};
768
- let r;
769
- e.initialState ? r = e.initialState : e.initialQuery ? r = this.queryConverter.fromRxDBQuery(e.initialQuery) : e.config?.initialQuery ? r = { rootGroup: e.config.initialQuery } : r = { rootGroup: I() }, this.stateSubject = new L(r), this.state$ = this.stateSubject.asObservable(), this.rootGroup$ = this.state$.pipe(
770
- M((t) => t.rootGroup),
771
- w()
782
+ let t;
783
+ e.initialState ? t = e.initialState : e.initialQuery ? t = this.queryConverter.fromRxDBQuery(e.initialQuery) : e.config?.initialQuery ? t = { rootGroup: e.config.initialQuery } : t = { rootGroup: I() }, this.stateSubject = new W(t), this.state$ = this.stateSubject.asObservable(), this.rootGroup$ = this.state$.pipe(
784
+ k((r) => r.rootGroup),
785
+ $()
772
786
  ), this.validation$ = this.state$.pipe(
773
- M((t) => this.validationService.validateGroup(t.rootGroup, this.fieldsMap)),
774
- w((t, s) => t.valid === s.valid && JSON.stringify(t.errors) === JSON.stringify(s.errors))
787
+ k((r) => this.validationService.validateGroup(r.rootGroup, this.fieldsMap)),
788
+ $((r, s) => r.valid === s.valid && w(r.errors, s.errors))
775
789
  ), this.query$ = this.state$.pipe(
776
- M((t) => this.queryConverter.toRxDBQuery(t)),
777
- w((t, s) => JSON.stringify(t) === JSON.stringify(s))
790
+ k((r) => this.queryConverter.toRxDBQuery(r)),
791
+ $((r, s) => w(r, s))
778
792
  );
779
793
  }
780
794
  /**
@@ -793,7 +807,7 @@ class re {
793
807
  * 获取最大嵌套层级
794
808
  */
795
809
  getMaxNestingLevel() {
796
- return this.config.maxNestingLevel ?? te;
810
+ return this.config.maxNestingLevel ?? ne;
797
811
  }
798
812
  /**
799
813
  * 获取字段列表
@@ -806,8 +820,8 @@ class re {
806
820
  */
807
821
  setFields(e) {
808
822
  this.fieldsMap.clear();
809
- for (const r of e)
810
- this.fieldsMap.set(r.name, r);
823
+ for (const t of e)
824
+ this.fieldsMap.set(t.name, t);
811
825
  }
812
826
  /**
813
827
  * 获取操作符注册表
@@ -819,52 +833,52 @@ class re {
819
833
  /**
820
834
  * 添加规则
821
835
  */
822
- addRule(e = null, r) {
823
- const t = {
824
- id: A(),
825
- field: r?.field ?? "",
826
- operator: r?.operator ?? "=",
827
- value: "value" in (r ?? {}) ? r.value : ""
828
- }, s = this.getState(), a = this.addItemToGroup(s.rootGroup, e ?? s.rootGroup.id, t);
829
- return this.stateSubject.next({ rootGroup: a }), t.id;
836
+ addRule(e = null, t) {
837
+ const r = {
838
+ id: E(),
839
+ field: t?.field ?? "",
840
+ operator: t?.operator ?? "=",
841
+ ...t && "value" in t ? { value: t.value } : { value: "" }
842
+ }, s = this.getState(), a = this.addItemToGroup(s.rootGroup, e ?? s.rootGroup.id, r);
843
+ return this.stateSubject.next({ rootGroup: a }), r.id;
830
844
  }
831
845
  /**
832
846
  * 添加规则组
833
847
  */
834
- addGroup(e = null, r = _) {
835
- const t = this.getState(), s = e ?? t.rootGroup.id, a = this.getGroupDepth(t.rootGroup, s), l = this.getMaxNestingLevel();
848
+ addGroup(e = null, t = V) {
849
+ const r = this.getState(), s = e ?? r.rootGroup.id, a = this.getGroupDepth(r.rootGroup, s), l = this.getMaxNestingLevel();
836
850
  if (a >= l)
837
851
  throw new Error(`已达到最大嵌套深度 ${l}`);
838
852
  const i = {
839
- id: A(),
840
- combinator: r,
853
+ id: E(),
854
+ combinator: t,
841
855
  rules: []
842
- }, o = this.addItemToGroup(t.rootGroup, s, i);
856
+ }, o = this.addItemToGroup(r.rootGroup, s, i);
843
857
  return this.stateSubject.next({ rootGroup: o }), i.id;
844
858
  }
845
859
  /**
846
860
  * 更新规则
847
861
  */
848
- updateRule(e, r) {
849
- const t = this.getState(), s = this.updateItemInGroup(t.rootGroup, e, r);
862
+ updateRule(e, t) {
863
+ const r = this.getState(), s = this.updateItemInGroup(r.rootGroup, e, t);
850
864
  this.stateSubject.next({ rootGroup: s });
851
865
  }
852
866
  /**
853
867
  * 更新组的组合器
854
868
  */
855
- updateGroupCombinator(e, r) {
856
- const t = this.getState(), s = this.updateItemInGroup(t.rootGroup, e, { combinator: r });
869
+ updateGroupCombinator(e, t) {
870
+ const r = this.getState(), s = this.updateItemInGroup(r.rootGroup, e, { combinator: t });
857
871
  this.stateSubject.next({ rootGroup: s });
858
872
  }
859
873
  /**
860
874
  * 删除规则或组
861
875
  */
862
876
  remove(e) {
863
- const r = this.getState();
864
- if (e === r.rootGroup.id)
877
+ const t = this.getState();
878
+ if (e === t.rootGroup.id)
865
879
  throw new Error("不能删除根组");
866
- const t = this.removeItemFromGroup(r.rootGroup, e);
867
- this.stateSubject.next({ rootGroup: t });
880
+ const r = this.removeItemFromGroup(t.rootGroup, e);
881
+ this.stateSubject.next({ rootGroup: r });
868
882
  }
869
883
  /**
870
884
  * 清空所有规则
@@ -889,8 +903,8 @@ class re {
889
903
  * 从 RxDB Query 加载
890
904
  */
891
905
  fromRxDBQuery(e) {
892
- const r = this.queryConverter.fromRxDBQuery(e);
893
- this.stateSubject.next(r);
906
+ const t = this.queryConverter.fromRxDBQuery(e);
907
+ this.stateSubject.next(t);
894
908
  }
895
909
  // ==================== 校验方法 ====================
896
910
  /**
@@ -906,49 +920,49 @@ class re {
906
920
  return this.validate().valid;
907
921
  }
908
922
  // ==================== 私有辅助方法 ====================
909
- addItemToGroup(e, r, t) {
910
- return e.id === r ? {
923
+ addItemToGroup(e, t, r) {
924
+ return e.id === t ? {
911
925
  ...e,
912
- rules: [...e.rules, t]
926
+ rules: [...e.rules, r]
913
927
  } : {
914
928
  ...e,
915
- rules: e.rules.map((s) => b(s) ? this.addItemToGroup(s, r, t) : s)
929
+ rules: e.rules.map((s) => v(s) ? this.addItemToGroup(s, t, r) : s)
916
930
  };
917
931
  }
918
- updateItemInGroup(e, r, t) {
919
- return e.id === r ? { ...e, ...t } : {
932
+ updateItemInGroup(e, t, r) {
933
+ return e.id === t ? { ...e, ...r } : {
920
934
  ...e,
921
- rules: e.rules.map((s) => b(s) ? s.id === r ? { ...s, ...t } : this.updateItemInGroup(s, r, t) : S(s) && s.id === r ? { ...s, ...t } : s)
935
+ rules: e.rules.map((s) => v(s) ? s.id === t ? { ...s, ...r } : this.updateItemInGroup(s, t, r) : M(s) && s.id === t ? { ...s, ...r } : s)
922
936
  };
923
937
  }
924
- removeItemFromGroup(e, r) {
938
+ removeItemFromGroup(e, t) {
925
939
  return {
926
940
  ...e,
927
- rules: e.rules.filter((t) => b(t) || S(t) ? t.id !== r : !0).map((t) => b(t) ? this.removeItemFromGroup(t, r) : t)
941
+ rules: e.rules.filter((r) => v(r) || M(r) ? r.id !== t : !0).map((r) => v(r) ? this.removeItemFromGroup(r, t) : r)
928
942
  };
929
943
  }
930
- getGroupDepth(e, r, t = 1) {
931
- if (e.id === r)
932
- return t;
944
+ getGroupDepth(e, t, r = 1) {
945
+ if (e.id === t)
946
+ return r;
933
947
  for (const s of e.rules)
934
- if (b(s)) {
935
- const a = this.getGroupDepth(s, r, t + 1);
948
+ if (v(s)) {
949
+ const a = this.getGroupDepth(s, t, r + 1);
936
950
  if (a > 0)
937
951
  return a;
938
952
  }
939
953
  return 0;
940
954
  }
941
955
  }
942
- function fe(n) {
943
- return new re(n);
956
+ function de(n) {
957
+ return new ie(n);
944
958
  }
945
- const x = "__exists__";
946
- function ye(n) {
947
- const e = /* @__PURE__ */ new Set(), r = n.filter((i) => e.has(i.name) ? !1 : (e.add(i.name), !0)), t = [], s = /* @__PURE__ */ new Map(), a = [...r].sort((i, o) => {
959
+ const q = "__exists__";
960
+ function he(n) {
961
+ const e = /* @__PURE__ */ new Set(), t = n.filter((i) => e.has(i.name) ? !1 : (e.add(i.name), !0)), r = [], s = /* @__PURE__ */ new Map(), a = [...t].sort((i, o) => {
948
962
  const f = (i.name.match(/\./g) || []).length, y = (o.name.match(/\./g) || []).length;
949
963
  return f - y;
950
964
  }), l = /* @__PURE__ */ new Map();
951
- for (const i of r)
965
+ for (const i of t)
952
966
  if (i.displayName) {
953
967
  const o = i.name.split("."), f = i.displayName.split(".");
954
968
  let y = "";
@@ -969,23 +983,23 @@ function ye(n) {
969
983
  ...i.relationFields && { relationFields: i.relationFields }
970
984
  };
971
985
  if (s.set(i.name, p), o.length === 1)
972
- t.push(p);
986
+ r.push(p);
973
987
  else {
974
- const m = o.slice(0, -1).join("."), v = s.get(m);
975
- if (v)
976
- v.children = v.children ?? [], v.children.push(p);
988
+ const m = o.slice(0, -1).join("."), b = s.get(m);
989
+ if (b)
990
+ b.children = b.children ?? [], b.children.push(p);
977
991
  else {
978
- let d = "", N = t;
992
+ let d = "", N = r;
979
993
  for (let T = 0; T < o.length - 1; T++) {
980
994
  const R = o[T];
981
995
  d = d ? `${d}.${R}` : R;
982
996
  let h = s.get(d);
983
997
  if (!h) {
984
- const F = l.get(d) ?? R;
998
+ const S = l.get(d) ?? R;
985
999
  h = {
986
1000
  label: R,
987
1001
  value: d,
988
- displayName: F,
1002
+ displayName: S,
989
1003
  type: "relation",
990
1004
  isRelation: !0,
991
1005
  children: []
@@ -997,58 +1011,58 @@ function ye(n) {
997
1011
  }
998
1012
  }
999
1013
  }
1000
- return C(t, r), t;
1014
+ return Q(r, t), r;
1001
1015
  }
1002
- function C(n, e) {
1003
- const r = new Map(e.map((t) => [t.name, t]));
1004
- for (const t of n) {
1005
- if (t.isRelation && t.children && t.children.length > 0 && !t.children.some((a) => a.label === x)) {
1006
- const l = r.get(t.value)?.relationFields;
1007
- t.children.unshift({
1008
- label: x,
1009
- value: t.value,
1016
+ function Q(n, e) {
1017
+ const t = new Map(e.map((r) => [r.name, r]));
1018
+ for (const r of n) {
1019
+ if (r.isRelation && r.children && r.children.length > 0 && !r.children.some((a) => a.label === q)) {
1020
+ const l = t.get(r.value)?.relationFields;
1021
+ r.children.unshift({
1022
+ label: q,
1023
+ value: r.value,
1010
1024
  // 使用父节点的值,这样选择它就等于选择关系字段本身
1011
1025
  displayName: "(存在性检查)",
1012
1026
  type: "relation",
1013
1027
  isRelation: !0,
1014
- description: `检查 ${t.displayName} 是否存在`,
1028
+ description: `检查 ${r.displayName} 是否存在`,
1015
1029
  relationFields: l
1016
1030
  // 复制 relationFields,确保 EXISTS 查询可以访问关联实体字段
1017
1031
  });
1018
1032
  }
1019
- t.children && C(t.children, e);
1033
+ r.children && Q(r.children, e);
1020
1034
  }
1021
1035
  }
1022
- function se(n, e) {
1023
- for (const r of n) {
1024
- if (r.value === e)
1025
- return r;
1026
- if (r.children) {
1027
- const t = se(r.children, e);
1028
- if (t) return t;
1036
+ function ae(n, e) {
1037
+ for (const t of n) {
1038
+ if (t.value === e)
1039
+ return t;
1040
+ if (t.children) {
1041
+ const r = ae(t.children, e);
1042
+ if (r) return r;
1029
1043
  }
1030
1044
  }
1031
1045
  }
1032
- function de(n) {
1033
- const e = /* @__PURE__ */ new Map(), r = (t) => {
1034
- for (const s of t)
1035
- e.set(s.value, s), s.children && r(s.children);
1046
+ function me(n) {
1047
+ const e = /* @__PURE__ */ new Map(), t = (r) => {
1048
+ for (const s of r)
1049
+ e.set(s.value, s), s.children && t(s.children);
1036
1050
  };
1037
- return r(n), e;
1051
+ return t(n), e;
1038
1052
  }
1039
- function he(n = 10) {
1053
+ function ge(n = 10) {
1040
1054
  return Array(n).fill("children");
1041
1055
  }
1042
- function me(n, e) {
1043
- const r = e.split("."), t = [];
1056
+ function be(n, e) {
1057
+ const t = e.split("."), r = [];
1044
1058
  let s = n;
1045
- for (let a = 0; a < r.length; a++) {
1046
- const l = r.slice(0, a + 1).join("."), i = s.find((o) => o.value === l);
1047
- i ? (t.push(i.displayName || i.label), s = i.children ?? []) : t.push(r[a]);
1059
+ for (let a = 0; a < t.length; a++) {
1060
+ const l = t.slice(0, a + 1).join("."), i = s.find((o) => o.value === l);
1061
+ i ? (r.push(i.displayName || i.label), s = i.children ?? []) : r.push(t[a]);
1048
1062
  }
1049
- return t.join(".");
1063
+ return r.join(".");
1050
1064
  }
1051
- const ne = 4, Q = ["id", "createdAt", "updatedAt", "createdBy", "updatedBy"];
1065
+ const oe = 4, L = ["id", "createdAt", "updatedAt", "createdBy", "updatedBy"];
1052
1066
  function G(n) {
1053
1067
  switch (n) {
1054
1068
  case g.uuid:
@@ -1072,12 +1086,15 @@ function G(n) {
1072
1086
  return "string";
1073
1087
  }
1074
1088
  }
1075
- function ie(n) {
1076
- return n.kind === B.ONE_TO_MANY || n.kind === B.MANY_TO_MANY ? "mappedProperty" in n && n.mappedProperty ? [n.mappedProperty] : [] : [];
1089
+ function le(n) {
1090
+ return n.kind === B.ONE_TO_MANY || n.kind === B.MANY_TO_MANY ? [n.mappedProperty] : [];
1091
+ }
1092
+ function ve(n, e, t = {}) {
1093
+ return K(n, e, t, n, [], "", /* @__PURE__ */ new Set(), 0);
1077
1094
  }
1078
- function ae(n, e, r = {}, t, s = [], a = "", l = /* @__PURE__ */ new Set(), i = 0) {
1079
- const o = [], f = r.relationQueryDeep ?? ne, y = r.systemFields ?? Q;
1080
- if (t = t ?? n, l.has(n.name))
1095
+ function K(n, e, t, r, s, a, l, i) {
1096
+ const o = [], f = t.relationQueryDeep ?? oe, y = t.systemFields ?? L;
1097
+ if (l.has(n.name))
1081
1098
  return o;
1082
1099
  if (!a)
1083
1100
  for (const u of y) {
@@ -1101,10 +1118,10 @@ function ae(n, e, r = {}, t, s = [], a = "", l = /* @__PURE__ */ new Set(), i =
1101
1118
  for (const u of n.foreignKeyNames) {
1102
1119
  const c = a ? `${a}.${u}` : u;
1103
1120
  if (!o.some((p) => p.name === c)) {
1104
- const p = u.slice(0, -2), m = n.foreignKeyRelationMap.get(p), v = m?.displayName ?? p, d = m && "nullable" in m ? m.nullable ?? !1 : !1;
1121
+ const p = u.slice(0, -2), m = n.foreignKeyRelationMap.get(p), b = m?.displayName ?? p, d = m && "nullable" in m ? m.nullable ?? !1 : !1;
1105
1122
  o.push({
1106
1123
  name: c,
1107
- displayName: `${v}ID`,
1124
+ displayName: `${b}ID`,
1108
1125
  type: "string",
1109
1126
  nullable: d
1110
1127
  });
@@ -1114,46 +1131,46 @@ function ae(n, e, r = {}, t, s = [], a = "", l = /* @__PURE__ */ new Set(), i =
1114
1131
  for (const [u, c] of n.relationMap) {
1115
1132
  if (s.includes(u)) continue;
1116
1133
  const p = e.get(c.mappedEntity);
1117
- if (!p || i > 0 && p.metadata === t || l.has(p.metadata.name)) continue;
1118
- const m = a ? `${a}.${u}` : u, v = c.displayName || u, d = oe(p.metadata, r);
1134
+ if (!p || i > 0 && p.metadata === r || l.has(p.metadata.name)) continue;
1135
+ const m = a ? `${a}.${u}` : u, b = c.displayName || u, d = ue(p.metadata, t);
1119
1136
  o.push({
1120
1137
  name: m,
1121
- displayName: `${v} (${c.kind})`,
1138
+ displayName: `${b} (${c.kind})`,
1122
1139
  type: "relation",
1123
1140
  isRelation: !0,
1124
1141
  relationTarget: c.mappedEntity,
1125
1142
  relationFields: d
1126
1143
  });
1127
- const N = ie(c), T = new Set(l);
1144
+ const N = le(c), T = new Set(l);
1128
1145
  T.add(n.name);
1129
- const R = ae(
1146
+ const R = K(
1130
1147
  p.metadata,
1131
1148
  e,
1132
- r,
1133
1149
  t,
1150
+ r,
1134
1151
  N,
1135
1152
  m,
1136
1153
  T,
1137
1154
  i + 1
1138
1155
  );
1139
1156
  for (const h of y) {
1140
- const F = `${m}.${h}`, D = p.metadata.properties.find((E) => E.name === h);
1141
- D && !o.some((E) => E.name === F) && o.push({
1142
- name: F,
1143
- displayName: `${v}.${D.displayName ?? h}`,
1144
- type: G(D.type),
1145
- nullable: D.nullable ?? !1
1157
+ const S = `${m}.${h}`, F = p.metadata.properties.find((A) => A.name === h);
1158
+ F && !o.some((A) => A.name === S) && o.push({
1159
+ name: S,
1160
+ displayName: `${b}.${F.displayName ?? h}`,
1161
+ type: G(F.type),
1162
+ nullable: F.nullable ?? !1
1146
1163
  });
1147
1164
  }
1148
1165
  o.push(...R);
1149
1166
  }
1150
1167
  return o;
1151
1168
  }
1152
- function oe(n, e = {}) {
1153
- const r = [], t = e.systemFields ?? Q;
1154
- for (const s of t) {
1169
+ function ue(n, e = {}) {
1170
+ const t = [], r = e.systemFields ?? L;
1171
+ for (const s of r) {
1155
1172
  const a = n.properties.find((l) => l.name === s);
1156
- a && r.push({
1173
+ a && t.push({
1157
1174
  name: s,
1158
1175
  displayName: a.displayName ?? s,
1159
1176
  type: G(a.type),
@@ -1161,64 +1178,65 @@ function oe(n, e = {}) {
1161
1178
  });
1162
1179
  }
1163
1180
  for (const [s, a] of n.propertyMap)
1164
- r.push({
1181
+ t.push({
1165
1182
  name: s,
1166
1183
  displayName: a.displayName ?? s,
1167
1184
  type: G(a.type),
1168
1185
  nullable: a.nullable ?? !1
1169
1186
  });
1170
1187
  for (const s of n.foreignKeyNames)
1171
- if (!r.some((a) => a.name === s)) {
1188
+ if (!t.some((a) => a.name === s)) {
1172
1189
  const a = s.slice(0, -2), l = n.foreignKeyRelationMap.get(a), i = l?.displayName ?? a, o = l && "nullable" in l ? l.nullable ?? !1 : !1;
1173
- r.push({
1190
+ t.push({
1174
1191
  name: s,
1175
1192
  displayName: `${i}ID`,
1176
1193
  type: "string",
1177
1194
  nullable: o
1178
1195
  });
1179
1196
  }
1180
- return r;
1197
+ return t;
1181
1198
  }
1182
- function ge(n) {
1183
- return n.sort((e, r) => {
1184
- const t = (e.name.match(/\./g) || []).length, s = (r.name.match(/\./g) || []).length;
1185
- return t !== s ? t - s : e.name.localeCompare(r.name);
1199
+ function Te(n) {
1200
+ return [...n].sort((e, t) => {
1201
+ const r = (e.name.match(/\./g) || []).length, s = (t.name.match(/\./g) || []).length;
1202
+ return r !== s ? r - s : e.name.localeCompare(t.name);
1186
1203
  });
1187
1204
  }
1188
- function ve(n, e) {
1189
- return j(e).parse(n);
1205
+ function Re(n, e) {
1206
+ return _(e).parse(n);
1190
1207
  }
1191
- function be(n, e) {
1192
- return j(e).parseMany(n);
1208
+ function Ne(n, e) {
1209
+ return _(e).parseMany(n);
1193
1210
  }
1194
1211
  export {
1195
- K as BUILTIN_VALIDATION_RULES,
1196
- k as DEFAULT_OPERATORS,
1197
- q as OperatorRegistry,
1198
- re as QueryBuilderService,
1199
- Y as QueryConverter,
1200
- P as SchemaParser,
1201
- H as ValidationService,
1202
- ye as buildFieldTree,
1203
- de as createFieldNodeMap,
1212
+ Y as BUILTIN_VALIDATION_RULES,
1213
+ O as DEFAULT_OPERATORS,
1214
+ C as OperatorRegistry,
1215
+ ie as QueryBuilderService,
1216
+ Z as QueryConverter,
1217
+ x as SchemaParser,
1218
+ re as ValidationService,
1219
+ he as buildFieldTree,
1220
+ me as createFieldNodeMap,
1204
1221
  J as createOperatorRegistry,
1205
- fe as createQueryBuilderService,
1206
- X as createQueryConverter,
1207
- be as createSchemaFromEntities,
1208
- ve as createSchemaFromEntity,
1209
- j as createSchemaParser,
1210
- ee as createValidationService,
1211
- ae as extractFieldsFromMetadata,
1212
- oe as extractRelationTargetFields,
1213
- se as findNodeByValue,
1214
- A as generateId,
1215
- z as getDefaultOperatorRegistry,
1216
- me as getDisplayNamePath,
1217
- ce as getOperatorsForType,
1218
- he as getOptionGroupChildren,
1219
- ie as getRelationIgnoreKeys,
1220
- S as isRule,
1221
- b as isRuleGroup,
1222
+ de as createQueryBuilderService,
1223
+ H as createQueryConverter,
1224
+ Ne as createSchemaFromEntities,
1225
+ Re as createSchemaFromEntity,
1226
+ _ as createSchemaParser,
1227
+ se as createValidationService,
1228
+ ve as extractFieldsFromMetadata,
1229
+ ue as extractRelationTargetFields,
1230
+ ae as findNodeByValue,
1231
+ E as generateId,
1232
+ ee as getDefaultOperatorRegistry,
1233
+ be as getDisplayNamePath,
1234
+ ye as getOperatorsForType,
1235
+ ge as getOptionGroupChildren,
1236
+ le as getRelationIgnoreKeys,
1237
+ M as isRule,
1238
+ v as isRuleGroup,
1222
1239
  G as mapPropertyType,
1223
- ge as organizeFields
1240
+ Te as organizeFields,
1241
+ w as structuralEqual
1224
1242
  };