@mintplayer/web-components 2.16.0 → 2.18.0
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/accordion/index.mjs +5 -5
- package/calendar/index.mjs +1 -1
- package/carousel/index.mjs +57 -143
- package/charts/core/index.mjs +30 -20
- package/charts/core/src/attributes.d.ts +18 -0
- package/charts/core/src/index.d.ts +2 -0
- package/charts/core/src/view-window.d.ts +46 -0
- package/charts/hierarchy/index.mjs +245 -256
- package/charts/hierarchy/src/components/mp-hierarchy-chart.d.ts +1 -3
- package/charts/sparkline/index.mjs +27 -26
- package/charts/trend/index.mjs +21 -20
- package/checkbox/index.mjs +1 -1
- package/checkbox/src/components/mp-checkbox.d.ts +1 -0
- package/chunks/attributes-L3eKsbdy.mjs +16 -0
- package/chunks/color-mode-warning-71FmlzWX.mjs +13 -0
- package/chunks/{form-check.styles-B0pxJ6YC.mjs → form-check.styles-DqvBnspm.mjs} +24 -3
- package/chunks/{mp-calendar.element-CJ8-t-Zn.mjs → mp-calendar.element-BIHS9SZZ.mjs} +11 -6
- package/chunks/{mp-checkbox-CzwS7Y_t.mjs → mp-checkbox-zV83gILn.mjs} +44 -36
- package/chunks/{mp-datatable-B7st6G-I.mjs → mp-datatable-CEpSxlkd.mjs} +660 -357
- package/chunks/{mp-datetime-picker.element-DsWA1AFs.mjs → mp-datetime-picker.element-Cxu5-qRE.mjs} +29 -32
- package/chunks/{mp-pagination-Dea75mD4.mjs → mp-pagination-hGy4dL7p.mjs} +9 -4
- package/chunks/{mp-radio-cL46sUA0.mjs → mp-radio-BhRVNdKp.mjs} +32 -28
- package/chunks/{mp-select-BNrbPwN4.mjs → mp-select-CgqYFvUj.mjs} +41 -26
- package/chunks/{mp-splitter-Ckn1kN4v.mjs → mp-splitter-DLehrw3Y.mjs} +144 -120
- package/chunks/{mp-timepicker.element-CwaAAOcm.mjs → mp-timepicker.element-BiB9lkgc.mjs} +58 -45
- package/chunks/{mp-toggle-button-eo_aTQtu.mjs → mp-toggle-button-CaS9uYLE.mjs} +26 -24
- package/chunks/{mp-treeview-C8iltDbq.mjs → mp-treeview-CaMTDrvY.mjs} +51 -50
- package/chunks/{overlay-controller-DifgO6jT.mjs → overlay-controller-BHDagokg.mjs} +96 -92
- package/chunks/{id-DNZVAnGC.mjs → resource.service--lqLwEqk.mjs} +144 -206
- package/chunks/view-window-DGvFiDnW.mjs +263 -0
- package/code-snippet/index.mjs +70 -66
- package/code-snippet/src/hljs-loaders.generated.d.ts +1 -1
- package/custom-elements.json +66193 -0
- package/datatable/index.mjs +1 -1
- package/datatable/src/components/column-resize.d.ts +11 -0
- package/datatable/src/components/index.d.ts +1 -1
- package/datatable/src/components/mp-datatable.d.ts +264 -20
- package/datatable/src/index.d.ts +1 -1
- package/datatable/src/types/labels.d.ts +11 -0
- package/datepicker/index.mjs +10 -9
- package/datetime-picker/index.mjs +1 -1
- package/datetime-picker/src/mp-datetime-picker.element.d.ts +3 -0
- package/dock/index.mjs +430 -463
- package/dock/src/components/mint-dock-manager.element.d.ts +25 -2
- package/dock/src/core/resize.d.ts +60 -0
- package/dropdown-menu/index.mjs +4 -2
- package/dropdown-menu/src/components/mp-dropdown-menu.d.ts +6 -1
- package/dropdown-menu/src/index.d.ts +1 -1
- package/dropdown-menu/src/types/dropdown.d.ts +14 -1
- package/dropdown-menu/src/types/index.d.ts +1 -1
- package/file-manager/index.mjs +63 -61
- package/file-manager/src/components/mp-file-manager.d.ts +4 -3
- package/multi-range/index.mjs +56 -50
- package/multi-range/src/mint-multi-range.element.d.ts +4 -10
- package/multi-range/src/pointer-geometry.d.ts +31 -0
- package/navbar/index.mjs +89 -439
- package/overlay/index.mjs +1 -1
- package/overlay/src/overlay-controller.d.ts +0 -14
- package/overlay/src/placement.d.ts +48 -0
- package/package.json +7 -1
- package/pagination/index.mjs +1 -1
- package/phone-input/index.mjs +44 -40
- package/phone-input/src/components/stack.d.ts +8 -0
- package/query-builder/index.mjs +418 -466
- package/query-builder/src/dnd/drag-controller.d.ts +12 -8
- package/query-builder/src/mp-query-builder.element.d.ts +5 -1
- package/query-builder/src/mp-query-condition.element.d.ts +1 -0
- package/radio/index.mjs +1 -1
- package/radio-group/index.mjs +1 -1
- package/ribbon/index.mjs +477 -498
- package/ribbon/src/core/band-text-color.d.ts +10 -0
- package/ribbon/src/core/key-tip-allocator.d.ts +10 -0
- package/ribbon/src/core/plan-reduce-steps.d.ts +62 -0
- package/ribbon/src/mp-ribbon.element.d.ts +0 -27
- package/scheduler/index.mjs +726 -711
- package/scheduler/src/components/mp-scheduler.d.ts +19 -3
- package/scheduler/src/drag/drag-manager.d.ts +1 -9
- package/scheduler/src/input/input-handler.d.ts +12 -2
- package/scheduler/src/utils/geometry.d.ts +39 -0
- package/scheduler/src/views/timeline-view.d.ts +0 -1
- package/scheduler-core/index.mjs +84 -71
- package/scheduler-core/src/services/resource.service.d.ts +0 -12
- package/scheduler-core/src/services/timeline.service.d.ts +0 -9
- package/select/index.mjs +1 -1
- package/select/src/components/mp-select.d.ts +1 -0
- package/signature-pad/index.mjs +21 -23
- package/signature-pad/src/canvas-point.d.ts +26 -0
- package/signature-pad/src/mp-signature-pad.element.d.ts +1 -7
- package/splitter/index.mjs +1 -1
- package/splitter/src/components/mp-splitter.d.ts +16 -0
- package/splitter/src/managers/index.d.ts +1 -0
- package/splitter/src/managers/rescale-panel-sizes.d.ts +14 -0
- package/swiper-core/index.mjs +2 -2
- package/theming/bs-theme-preboot.js +1 -0
- package/theming/color-mode.css +36 -0
- package/theming/index.d.ts +1 -0
- package/theming/index.mjs +327 -0
- package/theming/src/components/mp-theme-toggle.d.ts +71 -0
- package/theming/src/cookie.d.ts +31 -0
- package/theming/src/index.d.ts +5 -0
- package/theming/src/preboot.d.ts +1 -0
- package/theming/src/resolve.d.ts +36 -0
- package/theming/src/store.d.ts +27 -0
- package/theming/src/styles/theme-toggle.styles.d.ts +2 -0
- package/theming/src/testing/fake-broadcast-channel.d.ts +35 -0
- package/theming/src/toggle-modes.d.ts +23 -0
- package/tile-manager/index.mjs +252 -211
- package/tile-manager/src/components/mint-tile-manager.element.d.ts +8 -0
- package/tile-manager/src/utils/grid-geometry.d.ts +49 -0
- package/timeline/index.mjs +156 -164
- package/timeline/src/components/mp-timeline.d.ts +41 -7
- package/timepicker/index.mjs +7 -4
- package/timepicker/src/mp-time-list.element.d.ts +26 -0
- package/timepicker/src/mp-timepicker.element.d.ts +3 -0
- package/toggle-button/index.mjs +1 -1
- package/tree-select/index.mjs +21 -9
- package/treeview/index.mjs +1 -1
- package/treeview/src/components/mp-treeview.d.ts +6 -4
- package/chunks/color-DIeST-IS.mjs +0 -224
- package/query-builder/src/mp-query-condition.element.template.d.ts +0 -2
package/query-builder/index.mjs
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { unsafeCSS as
|
|
2
|
-
import { s as
|
|
3
|
-
import { createContext as P, ContextConsumer as
|
|
4
|
-
import { createRef as
|
|
5
|
-
import "../chunks/
|
|
6
|
-
import "../chunks/mp-
|
|
7
|
-
|
|
1
|
+
import { unsafeCSS as T, LitElement as M, nothing as m } from "lit";
|
|
2
|
+
import { d as W, s as I, i as L } from "../chunks/install-light-styles-DbCAGFOC.mjs";
|
|
3
|
+
import { createContext as P, ContextConsumer as h, ContextProvider as x } from "@lit/context";
|
|
4
|
+
import { createRef as me, ref as pe } from "lit/directives/ref.js";
|
|
5
|
+
import { w as be } from "../chunks/color-mode-warning-71FmlzWX.mjs";
|
|
6
|
+
import "../chunks/mp-select-CgqYFvUj.mjs";
|
|
7
|
+
import "../chunks/mp-checkbox-zV83gILn.mjs";
|
|
8
|
+
const J = {
|
|
8
9
|
string: [
|
|
9
10
|
"equals",
|
|
10
11
|
"not-equals",
|
|
@@ -101,7 +102,7 @@ const W = {
|
|
|
101
102
|
enum: ["equals", "not-equals", "in", "not-in", "is-null", "is-not-null"],
|
|
102
103
|
relation: ["in", "not-in"],
|
|
103
104
|
array: ["any-of", "all-of", "none-of", "is-empty", "is-not-empty"]
|
|
104
|
-
},
|
|
105
|
+
}, he = /* @__PURE__ */ new Set([
|
|
105
106
|
"is-null",
|
|
106
107
|
"is-not-null",
|
|
107
108
|
"is-true",
|
|
@@ -120,18 +121,18 @@ const W = {
|
|
|
120
121
|
"last-year",
|
|
121
122
|
"next-year",
|
|
122
123
|
"year-to-date"
|
|
123
|
-
]),
|
|
124
|
+
]), fe = /* @__PURE__ */ new Set(["between", "not-between"]), ye = /* @__PURE__ */ new Set([
|
|
124
125
|
"in",
|
|
125
126
|
"not-in",
|
|
126
127
|
"any-of",
|
|
127
128
|
"all-of",
|
|
128
129
|
"none-of"
|
|
129
|
-
]),
|
|
130
|
-
function
|
|
131
|
-
return
|
|
130
|
+
]), ge = /* @__PURE__ */ new Set(["last-n-days", "next-n-days"]);
|
|
131
|
+
function q(o) {
|
|
132
|
+
return he.has(o) ? "null" : fe.has(o) ? "tuple" : ye.has(o) ? "array" : ge.has(o) ? "n-input" : "scalar";
|
|
132
133
|
}
|
|
133
|
-
function
|
|
134
|
-
switch (
|
|
134
|
+
function N(o) {
|
|
135
|
+
switch (q(o)) {
|
|
135
136
|
case "null":
|
|
136
137
|
return null;
|
|
137
138
|
case "tuple":
|
|
@@ -144,10 +145,10 @@ function $(o) {
|
|
|
144
145
|
return null;
|
|
145
146
|
}
|
|
146
147
|
}
|
|
147
|
-
function
|
|
148
|
+
function k(o, e = J) {
|
|
148
149
|
return e[o] ?? [];
|
|
149
150
|
}
|
|
150
|
-
function
|
|
151
|
+
function lt(o, e, t = J) {
|
|
151
152
|
const r = {
|
|
152
153
|
sanitized: {},
|
|
153
154
|
warnings: []
|
|
@@ -158,63 +159,59 @@ function We(o, e, t = W) {
|
|
|
158
159
|
for (const s of i.fields)
|
|
159
160
|
n.has(s.name) || n.set(s.name, { entity: i.name, type: s.type });
|
|
160
161
|
for (const [i, s] of Object.entries(e)) {
|
|
161
|
-
const
|
|
162
|
-
if (!
|
|
162
|
+
const d = s ?? [], a = n.get(i);
|
|
163
|
+
if (!a) {
|
|
163
164
|
r.warnings.push(
|
|
164
165
|
`[operatorOverrides] Unknown field "${i}" — no entity in schema declares it. Override ignored.`
|
|
165
166
|
);
|
|
166
167
|
continue;
|
|
167
168
|
}
|
|
168
|
-
const
|
|
169
|
-
for (const
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
`[operatorOverrides] Field "${i}" (${
|
|
173
|
-
),
|
|
169
|
+
const u = new Set(k(a.type, t)), l = [], c = [];
|
|
170
|
+
for (const b of d)
|
|
171
|
+
u.has(b) ? l.push(b) : c.push(b);
|
|
172
|
+
c.length > 0 && r.warnings.push(
|
|
173
|
+
`[operatorOverrides] Field "${i}" (${a.entity}.${i}, type=${a.type}) has operator(s) [${c.join(", ")}] not in the catalog for that type. Stripping.`
|
|
174
|
+
), l.length === 0 && d.length > 0 && r.warnings.push(
|
|
174
175
|
`[operatorOverrides] Field "${i}" has no valid operators after intersection — empty operator dropdown.`
|
|
175
|
-
), r.sanitized[i] =
|
|
176
|
+
), r.sanitized[i] = l;
|
|
176
177
|
}
|
|
177
178
|
return r;
|
|
178
179
|
}
|
|
179
|
-
function
|
|
180
|
+
function ve() {
|
|
180
181
|
if (typeof crypto < "u" && typeof crypto.randomUUID == "function")
|
|
181
182
|
return crypto.randomUUID();
|
|
182
|
-
const o = new Uint8Array(16);
|
|
183
|
-
if (typeof crypto < "u" && typeof crypto.getRandomValues == "function")
|
|
184
|
-
crypto.getRandomValues(o);
|
|
185
|
-
else
|
|
186
|
-
for (let t = 0; t < 16; t++) o[t] = Math.floor(Math.random() * 256);
|
|
183
|
+
const o = typeof crypto < "u" && typeof crypto.getRandomValues == "function" ? crypto.getRandomValues(new Uint8Array(16)) : Uint8Array.from({ length: 16 }, () => Math.floor(Math.random() * 256));
|
|
187
184
|
o[6] = o[6] & 15 | 64, o[8] = o[8] & 63 | 128;
|
|
188
185
|
const e = Array.from(o, (t) => t.toString(16).padStart(2, "0"));
|
|
189
186
|
return `${e.slice(0, 4).join("")}-${e.slice(4, 6).join("")}-${e.slice(6, 8).join("")}-${e.slice(8, 10).join("")}-${e.slice(10, 16).join("")}`;
|
|
190
187
|
}
|
|
191
188
|
function C() {
|
|
192
|
-
return
|
|
189
|
+
return ve();
|
|
193
190
|
}
|
|
194
|
-
function
|
|
191
|
+
function H(o = "and") {
|
|
195
192
|
return { kind: "group", id: C(), logic: o, children: [] };
|
|
196
193
|
}
|
|
197
|
-
function
|
|
194
|
+
function qe(o) {
|
|
198
195
|
const e = o.fields.find((r) => r.type !== "relation") ?? o.fields[0];
|
|
199
196
|
if (!e)
|
|
200
197
|
return { kind: "condition", id: C(), field: "", operator: "equals", value: null };
|
|
201
|
-
const t =
|
|
198
|
+
const t = k(e.type)[0] ?? "equals";
|
|
202
199
|
return {
|
|
203
200
|
kind: "condition",
|
|
204
201
|
id: C(),
|
|
205
202
|
field: e.name,
|
|
206
203
|
operator: t,
|
|
207
|
-
value:
|
|
204
|
+
value: N(t)
|
|
208
205
|
};
|
|
209
206
|
}
|
|
210
|
-
function
|
|
207
|
+
function we(o) {
|
|
211
208
|
const e = o.fields.find((t) => t.type === "relation" && t.targetEntity);
|
|
212
209
|
return e ? {
|
|
213
210
|
kind: "subquery",
|
|
214
211
|
id: C(),
|
|
215
212
|
field: e.name,
|
|
216
213
|
operator: "in",
|
|
217
|
-
subQuery:
|
|
214
|
+
subQuery: H("and")
|
|
218
215
|
} : null;
|
|
219
216
|
}
|
|
220
217
|
function G(o) {
|
|
@@ -227,7 +224,7 @@ function G(o) {
|
|
|
227
224
|
case "condition":
|
|
228
225
|
return {
|
|
229
226
|
...o,
|
|
230
|
-
value:
|
|
227
|
+
value: O(o.value)
|
|
231
228
|
};
|
|
232
229
|
case "subquery":
|
|
233
230
|
return {
|
|
@@ -236,80 +233,65 @@ function G(o) {
|
|
|
236
233
|
};
|
|
237
234
|
}
|
|
238
235
|
}
|
|
239
|
-
function
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
const e = {};
|
|
244
|
-
for (const [t, r] of Object.entries(o))
|
|
245
|
-
e[t] = N(r);
|
|
246
|
-
return e;
|
|
247
|
-
}
|
|
248
|
-
return o;
|
|
236
|
+
function O(o) {
|
|
237
|
+
return o == null ? o : Array.isArray(o) ? o.map(O) : typeof o == "object" ? Object.fromEntries(
|
|
238
|
+
Object.entries(o).map(([e, t]) => [e, O(t)])
|
|
239
|
+
) : o;
|
|
249
240
|
}
|
|
250
|
-
function
|
|
241
|
+
function S(o, e) {
|
|
251
242
|
const t = e(o);
|
|
252
243
|
if (t === null) return null;
|
|
253
244
|
if (t.kind === "group") {
|
|
254
|
-
const r = t.children.map((n) =>
|
|
245
|
+
const r = t.children.map((n) => S(n, e)).filter((n) => n !== null);
|
|
255
246
|
return { ...t, children: r };
|
|
256
247
|
}
|
|
257
248
|
if (t.kind === "subquery") {
|
|
258
|
-
const r =
|
|
259
|
-
return r !== null && r.kind === "group" ? { ...t, subQuery: r } : { ...t, subQuery:
|
|
249
|
+
const r = S(t.subQuery, e);
|
|
250
|
+
return r !== null && r.kind === "group" ? { ...t, subQuery: r } : { ...t, subQuery: H("and") };
|
|
260
251
|
}
|
|
261
252
|
return t;
|
|
262
253
|
}
|
|
263
|
-
function
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
return E(o.subQuery, e);
|
|
272
|
-
return null;
|
|
254
|
+
function w(o, e) {
|
|
255
|
+
return S(o, e);
|
|
256
|
+
}
|
|
257
|
+
function $(o, e) {
|
|
258
|
+
return o.id === e ? o : o.kind === "group" ? Z(o.children, (t) => $(t, e)) : o.kind === "subquery" ? $(o.subQuery, e) : null;
|
|
259
|
+
}
|
|
260
|
+
function Z(o, e) {
|
|
261
|
+
return o.reduce((t, r) => t ?? e(r), null);
|
|
273
262
|
}
|
|
274
263
|
function D(o, e) {
|
|
275
264
|
if (o.kind === "group") {
|
|
276
265
|
const t = o.children.findIndex((r) => r.id === e);
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
if (n) return n;
|
|
281
|
-
}
|
|
282
|
-
} else if (o.kind === "subquery")
|
|
283
|
-
return D(o.subQuery, e);
|
|
284
|
-
return null;
|
|
266
|
+
return t >= 0 ? { parent: o, index: t } : Z(o.children, (r) => D(r, e));
|
|
267
|
+
}
|
|
268
|
+
return o.kind === "subquery" ? D(o.subQuery, e) : null;
|
|
285
269
|
}
|
|
286
|
-
function
|
|
287
|
-
const e =
|
|
288
|
-
|
|
289
|
-
};
|
|
290
|
-
return t(o), e;
|
|
270
|
+
function ee(o) {
|
|
271
|
+
const e = (t) => t.kind === "group" ? [t.id, ...t.children.flatMap(e)] : t.kind === "subquery" ? [t.id, ...e(t.subQuery)] : [t.id];
|
|
272
|
+
return new Set(e(o));
|
|
291
273
|
}
|
|
292
|
-
function
|
|
293
|
-
return
|
|
274
|
+
function B(o, e, t) {
|
|
275
|
+
return w(o, (r) => r.kind === "group" && r.id === e ? { ...r, children: [...r.children, t] } : r);
|
|
294
276
|
}
|
|
295
|
-
function
|
|
296
|
-
return
|
|
277
|
+
function _e(o, e, t) {
|
|
278
|
+
return B(o, e, qe(t));
|
|
297
279
|
}
|
|
298
|
-
function
|
|
299
|
-
return
|
|
280
|
+
function $e(o, e, t = "and") {
|
|
281
|
+
return B(o, e, H(t));
|
|
300
282
|
}
|
|
301
|
-
function
|
|
302
|
-
const r =
|
|
303
|
-
return r ?
|
|
283
|
+
function Ee(o, e, t) {
|
|
284
|
+
const r = we(t);
|
|
285
|
+
return r ? B(o, e, r) : o;
|
|
304
286
|
}
|
|
305
|
-
function
|
|
306
|
-
return
|
|
287
|
+
function te(o, e) {
|
|
288
|
+
return S(o, (r) => r.id === e ? null : r) ?? o;
|
|
307
289
|
}
|
|
308
|
-
function
|
|
309
|
-
return
|
|
290
|
+
function ke(o, e, t) {
|
|
291
|
+
return w(o, (r) => r.kind === "group" && r.id === e ? { ...r, logic: t } : r);
|
|
310
292
|
}
|
|
311
|
-
function
|
|
312
|
-
return
|
|
293
|
+
function xe(o, e, t) {
|
|
294
|
+
return w(o, (r) => {
|
|
313
295
|
if ((r.kind === "condition" || r.kind === "subquery") && r.id === e) {
|
|
314
296
|
if (r.kind === "subquery") {
|
|
315
297
|
const i = { ...r };
|
|
@@ -319,66 +301,63 @@ function ge(o, e, t) {
|
|
|
319
301
|
return t.field !== void 0 && (n.field = t.field), t.operator !== void 0 && (n.operator = t.operator), t.value !== void 0 && (n.value = t.value), n;
|
|
320
302
|
}
|
|
321
303
|
return r;
|
|
322
|
-
})
|
|
304
|
+
});
|
|
323
305
|
}
|
|
324
|
-
function
|
|
325
|
-
return
|
|
326
|
-
if (r.kind === "condition" && r.id === e) {
|
|
327
|
-
const n = w(t.type), i = n.includes(r.operator) ? r.operator : n[0] ?? "equals", s = n.includes(r.operator) && h(r.operator) === h(i) ? r.value : $(i);
|
|
328
|
-
return { ...r, field: t.name, operator: i, value: s };
|
|
329
|
-
}
|
|
330
|
-
return r;
|
|
331
|
-
}) ?? o;
|
|
306
|
+
function Ce(o, e, t) {
|
|
307
|
+
return w(o, (r) => r.kind === "condition" && r.id === e ? re(r, t) : r);
|
|
332
308
|
}
|
|
333
|
-
function
|
|
334
|
-
|
|
309
|
+
function re(o, e) {
|
|
310
|
+
const t = k(e.type);
|
|
311
|
+
if (t.includes(o.operator)) return { ...o, field: e.name };
|
|
312
|
+
const r = t[0] ?? "equals";
|
|
313
|
+
return { ...o, field: e.name, operator: r, value: N(r) };
|
|
314
|
+
}
|
|
315
|
+
function Se(o, e, t) {
|
|
316
|
+
return w(o, (r) => {
|
|
335
317
|
if (r.kind === "condition" && r.id === e) {
|
|
336
|
-
const i =
|
|
318
|
+
const i = q(r.operator) === q(t) ? r.value : N(t);
|
|
337
319
|
return { ...r, operator: t, value: i };
|
|
338
320
|
}
|
|
339
321
|
return r;
|
|
340
|
-
})
|
|
322
|
+
});
|
|
341
323
|
}
|
|
342
324
|
function j(o, e, t, r, n) {
|
|
343
325
|
if (e === t) return o;
|
|
344
|
-
const i =
|
|
326
|
+
const i = $(o, e);
|
|
345
327
|
if (!i) return o;
|
|
346
|
-
const s =
|
|
347
|
-
if (!s || s.kind !== "group" ||
|
|
348
|
-
const
|
|
349
|
-
return
|
|
350
|
-
if (
|
|
351
|
-
const
|
|
352
|
-
return
|
|
328
|
+
const s = $(o, t);
|
|
329
|
+
if (!s || s.kind !== "group" || ee(i).has(t)) return o;
|
|
330
|
+
const a = n ? oe(i, n) : i, u = te(o, e);
|
|
331
|
+
return w(u, (l) => {
|
|
332
|
+
if (l.kind === "group" && l.id === t) {
|
|
333
|
+
const c = [...l.children], b = Math.max(0, Math.min(r, c.length));
|
|
334
|
+
return c.splice(b, 0, a), { ...l, children: c };
|
|
353
335
|
}
|
|
354
|
-
return
|
|
355
|
-
})
|
|
336
|
+
return l;
|
|
337
|
+
});
|
|
356
338
|
}
|
|
357
|
-
function
|
|
339
|
+
function oe(o, e) {
|
|
358
340
|
const t = e.fields.find((r) => r.type !== "relation");
|
|
359
341
|
if (o.kind === "condition") {
|
|
360
342
|
const r = e.fields.find((i) => i.name === o.field);
|
|
361
|
-
if (r && r.type !== "relation")
|
|
362
|
-
const i = w(r.type), s = i.includes(o.operator) ? o.operator : i[0] ?? "equals", a = i.includes(o.operator) && h(o.operator) === h(s) ? o.value : $(s);
|
|
363
|
-
return { ...o, operator: s, value: a };
|
|
364
|
-
}
|
|
343
|
+
if (r && r.type !== "relation") return re(o, r);
|
|
365
344
|
if (!t) return o;
|
|
366
|
-
const n =
|
|
345
|
+
const n = k(t.type)[0] ?? "equals";
|
|
367
346
|
return {
|
|
368
347
|
...o,
|
|
369
348
|
field: t.name,
|
|
370
349
|
operator: n,
|
|
371
|
-
value:
|
|
350
|
+
value: N(n)
|
|
372
351
|
};
|
|
373
352
|
}
|
|
374
|
-
return o.kind === "group" ? { ...o, children: o.children.map((r) =>
|
|
353
|
+
return o.kind === "group" ? { ...o, children: o.children.map((r) => oe(r, e)) } : o;
|
|
375
354
|
}
|
|
376
|
-
class
|
|
355
|
+
class ne extends Error {
|
|
377
356
|
constructor(e, t) {
|
|
378
357
|
super(`Query tree depth ${e} exceeds maxDepth ${t}.`), this.depth = e, this.maxDepth = t, this.name = "MaxDepthExceededError";
|
|
379
358
|
}
|
|
380
359
|
}
|
|
381
|
-
const
|
|
360
|
+
const f = {
|
|
382
361
|
addCondition: "Add condition",
|
|
383
362
|
addGroup: "Add group",
|
|
384
363
|
addSubquery: "Add sub-query",
|
|
@@ -439,9 +418,9 @@ const y = {
|
|
|
439
418
|
"is-empty": "is empty",
|
|
440
419
|
"is-not-empty": "is not empty"
|
|
441
420
|
}
|
|
442
|
-
},
|
|
443
|
-
function
|
|
444
|
-
const n = r.maxDepth ??
|
|
421
|
+
}, De = 32;
|
|
422
|
+
function ut(o, e, t, r = {}) {
|
|
423
|
+
const n = r.maxDepth ?? De, i = {
|
|
445
424
|
schema: t.schema,
|
|
446
425
|
currentEntity: t.rootEntity,
|
|
447
426
|
depth: 0
|
|
@@ -449,7 +428,7 @@ function Je(o, e, t, r = {}) {
|
|
|
449
428
|
return z(o, e, i, n);
|
|
450
429
|
}
|
|
451
430
|
function z(o, e, t, r) {
|
|
452
|
-
if (t.depth > r) throw new
|
|
431
|
+
if (t.depth > r) throw new ne(t.depth, r);
|
|
453
432
|
switch (o.kind) {
|
|
454
433
|
case "condition":
|
|
455
434
|
return e.condition(o, t);
|
|
@@ -458,81 +437,81 @@ function z(o, e, t, r) {
|
|
|
458
437
|
return e.group(o, i, t);
|
|
459
438
|
}
|
|
460
439
|
case "subquery": {
|
|
461
|
-
const n = t.schema.find((
|
|
440
|
+
const n = t.schema.find((u) => u.name === t.currentEntity);
|
|
462
441
|
if (!n) throw new Error(`visitTree: schema has no entity "${t.currentEntity}".`);
|
|
463
|
-
const i = n.fields.find((
|
|
442
|
+
const i = n.fields.find((u) => u.name === o.field);
|
|
464
443
|
if (!i) throw new Error(`visitTree: entity "${t.currentEntity}" has no field "${o.field}".`);
|
|
465
444
|
if (i.type !== "relation" || !i.targetEntity)
|
|
466
445
|
throw new Error(`visitTree: field "${o.field}" is not a relation.`);
|
|
467
446
|
const s = i.targetEntity;
|
|
468
|
-
if (!t.schema.some((
|
|
447
|
+
if (!t.schema.some((u) => u.name === s))
|
|
469
448
|
throw new Error(`visitTree: relation target "${s}" missing from schema.`);
|
|
470
|
-
const
|
|
449
|
+
const d = {
|
|
471
450
|
...t,
|
|
472
451
|
currentEntity: s,
|
|
473
452
|
depth: t.depth + 1
|
|
474
|
-
},
|
|
475
|
-
return e.subquery(o, t,
|
|
453
|
+
}, a = () => z(o.subQuery, e, d, r);
|
|
454
|
+
return e.subquery(o, t, a);
|
|
476
455
|
}
|
|
477
456
|
}
|
|
478
457
|
}
|
|
479
|
-
const
|
|
480
|
-
function
|
|
481
|
-
const r =
|
|
482
|
-
return
|
|
458
|
+
const Re = 32;
|
|
459
|
+
function Ae(o, e, t = {}) {
|
|
460
|
+
const r = Te(t.messages), n = t.maxDepth ?? Re, i = t.rootEntity ?? e[0]?.name ?? "";
|
|
461
|
+
return U(o, e, i, r, 0, n);
|
|
483
462
|
}
|
|
484
|
-
function
|
|
463
|
+
function Te(o) {
|
|
485
464
|
return {
|
|
486
|
-
...
|
|
465
|
+
...f,
|
|
487
466
|
...o ?? {},
|
|
488
|
-
operators: { ...
|
|
467
|
+
operators: { ...f.operators, ...o?.operators ?? {} }
|
|
489
468
|
};
|
|
490
469
|
}
|
|
491
|
-
function
|
|
492
|
-
if (n > i) throw new
|
|
470
|
+
function U(o, e, t, r, n, i) {
|
|
471
|
+
if (n > i) throw new ne(n, i);
|
|
493
472
|
switch (o.kind) {
|
|
494
473
|
case "group":
|
|
495
|
-
return
|
|
474
|
+
return Me(o, e, t, r, n, i);
|
|
496
475
|
case "condition":
|
|
497
|
-
return
|
|
476
|
+
return Ie(o, e, t, r);
|
|
498
477
|
case "subquery":
|
|
499
|
-
return
|
|
478
|
+
return Le(o, e, t, r, n, i);
|
|
500
479
|
}
|
|
501
480
|
}
|
|
502
|
-
function
|
|
481
|
+
function Me(o, e, t, r, n, i) {
|
|
503
482
|
if (o.children.length === 0)
|
|
504
483
|
return o.logic === "and" ? "TRUE" : "FALSE";
|
|
505
484
|
const s = o.logic === "and" ? ` ${r.logicAnd} ` : ` ${r.logicOr} `;
|
|
506
|
-
return `(${o.children.map((
|
|
485
|
+
return `(${o.children.map((a) => U(a, e, t, r, n + 1, i)).join(s)})`;
|
|
507
486
|
}
|
|
508
|
-
function
|
|
509
|
-
const i =
|
|
510
|
-
return
|
|
487
|
+
function Ie(o, e, t, r) {
|
|
488
|
+
const i = ie(e, t, o.field)?.label ?? o.field, s = r.operators[o.operator] ?? o.operator, d = Pe(o.operator, o.value);
|
|
489
|
+
return d === "" ? `${i} ${s}` : `${i} ${s} ${d}`;
|
|
511
490
|
}
|
|
512
|
-
function
|
|
513
|
-
const s =
|
|
514
|
-
return `${
|
|
491
|
+
function Le(o, e, t, r, n, i) {
|
|
492
|
+
const s = ie(e, t, o.field), d = s?.label ?? o.field, a = r.operators[o.operator] ?? o.operator, u = s?.targetEntity ?? "", l = U(o.subQuery, e, u, r, n + 1, i);
|
|
493
|
+
return `${d} ${a} ${l}`;
|
|
515
494
|
}
|
|
516
|
-
function
|
|
517
|
-
const t =
|
|
495
|
+
function Pe(o, e) {
|
|
496
|
+
const t = q(o);
|
|
518
497
|
if (t === "null") return "";
|
|
519
498
|
if (t === "tuple" && Array.isArray(e))
|
|
520
|
-
return `[${e.map(
|
|
499
|
+
return `[${e.map(F).join(", ")}]`;
|
|
521
500
|
if (t === "array" && Array.isArray(e))
|
|
522
|
-
return `[${e.map(
|
|
501
|
+
return `[${e.map(F).join(", ")}]`;
|
|
523
502
|
if (t === "n-input" && typeof e == "object" && e !== null) {
|
|
524
503
|
const r = e.n;
|
|
525
504
|
return typeof r == "number" ? String(r) : JSON.stringify(e);
|
|
526
505
|
}
|
|
527
|
-
return
|
|
506
|
+
return F(e);
|
|
528
507
|
}
|
|
529
|
-
function
|
|
508
|
+
function F(o) {
|
|
530
509
|
return o == null ? "?" : typeof o == "string" ? `"${o}"` : o instanceof Date ? o.toISOString() : String(o);
|
|
531
510
|
}
|
|
532
|
-
function
|
|
511
|
+
function ie(o, e, t) {
|
|
533
512
|
return o.find((r) => r.name === e)?.fields.find((r) => r.name === t);
|
|
534
513
|
}
|
|
535
|
-
const
|
|
514
|
+
const Ne = T(`.form-control[data-mps=query-builder] {
|
|
536
515
|
display: block;
|
|
537
516
|
width: 100%;
|
|
538
517
|
padding: 0.375rem 0.75rem;
|
|
@@ -764,7 +743,7 @@ mp-query-builder {
|
|
|
764
743
|
}
|
|
765
744
|
|
|
766
745
|
.qb-sort-add[data-mps=query-builder] {
|
|
767
|
-
--bs-btn-color:
|
|
746
|
+
--bs-btn-color: var(--bs-secondary-color);
|
|
768
747
|
}
|
|
769
748
|
|
|
770
749
|
.qb-too-deep[data-mps=query-builder] {
|
|
@@ -824,7 +803,7 @@ mp-query-builder {
|
|
|
824
803
|
color: var(--bs-body-color, currentColor);
|
|
825
804
|
white-space: pre-wrap;
|
|
826
805
|
word-break: break-word;
|
|
827
|
-
}`),
|
|
806
|
+
}`), Fe = T(`.form-control[data-mps=query-condition] {
|
|
828
807
|
display: block;
|
|
829
808
|
width: 100%;
|
|
830
809
|
padding: 0.375rem 0.75rem;
|
|
@@ -1030,10 +1009,17 @@ textarea.form-control-lg[data-mps=query-condition] {
|
|
|
1030
1009
|
border-radius: var(--bs-border-radius-lg);
|
|
1031
1010
|
}
|
|
1032
1011
|
|
|
1033
|
-
|
|
1034
|
-
|
|
1012
|
+
@container style(--mp-color-mode: dark) {
|
|
1013
|
+
.form-select[data-mps=query-condition] {
|
|
1014
|
+
--bs-form-select-bg-img: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23dee2e6' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
|
|
1015
|
+
}
|
|
1016
|
+
}
|
|
1017
|
+
@media (forced-colors: active) {
|
|
1018
|
+
.form-select[data-mps=query-condition] {
|
|
1019
|
+
appearance: auto;
|
|
1020
|
+
background-image: none;
|
|
1021
|
+
}
|
|
1035
1022
|
}
|
|
1036
|
-
|
|
1037
1023
|
mp-query-condition {
|
|
1038
1024
|
display: block;
|
|
1039
1025
|
}
|
|
@@ -1202,7 +1188,7 @@ mp-query-condition {
|
|
|
1202
1188
|
.qb-editor-chip-add:focus[data-mps=query-condition] {
|
|
1203
1189
|
outline: none;
|
|
1204
1190
|
box-shadow: none;
|
|
1205
|
-
}`),
|
|
1191
|
+
}`), Oe = T(`mp-query-group {
|
|
1206
1192
|
display: block;
|
|
1207
1193
|
margin: 0.25rem 0;
|
|
1208
1194
|
}
|
|
@@ -1284,7 +1270,7 @@ mp-query-condition {
|
|
|
1284
1270
|
[data-mps=query-group] {
|
|
1285
1271
|
transition-duration: 0.01ms !important;
|
|
1286
1272
|
}
|
|
1287
|
-
}`),
|
|
1273
|
+
}`), ze = T(`mp-query-subquery {
|
|
1288
1274
|
display: block;
|
|
1289
1275
|
margin: 0.25rem 0;
|
|
1290
1276
|
}
|
|
@@ -1316,8 +1302,8 @@ mp-query-condition {
|
|
|
1316
1302
|
.qb-subquery-target[data-mps=query-subquery] {
|
|
1317
1303
|
font-style: italic;
|
|
1318
1304
|
color: var(--bs-secondary-color, #6c757d);
|
|
1319
|
-
}`),
|
|
1320
|
-
class
|
|
1305
|
+
}`), Qe = 99999;
|
|
1306
|
+
class He {
|
|
1321
1307
|
constructor() {
|
|
1322
1308
|
this._source = null, this._ghost = null, this._lastTarget = null, this._offsetX = 0, this._offsetY = 0;
|
|
1323
1309
|
}
|
|
@@ -1336,7 +1322,7 @@ class Te {
|
|
|
1336
1322
|
const r = e.rowElement.getBoundingClientRect();
|
|
1337
1323
|
this._offsetX = t.clientX - r.left, this._offsetY = t.clientY - r.top;
|
|
1338
1324
|
const n = e.rowElement.cloneNode(!0);
|
|
1339
|
-
n.style.position = "fixed", n.style.top = `${r.top}px`, n.style.left = `${r.left}px`, n.style.width = `${r.width}px`, n.style.pointerEvents = "none", n.style.zIndex = String(
|
|
1325
|
+
n.style.position = "fixed", n.style.top = `${r.top}px`, n.style.left = `${r.left}px`, n.style.width = `${r.width}px`, n.style.pointerEvents = "none", n.style.zIndex = String(Qe), n.style.opacity = "0.85", n.classList.add("qb-drag-ghost"), document.body.appendChild(n), this._ghost = n;
|
|
1340
1326
|
}
|
|
1341
1327
|
move(e) {
|
|
1342
1328
|
if (!this._source || !this._ghost) return;
|
|
@@ -1355,70 +1341,63 @@ class Te {
|
|
|
1355
1341
|
this._ghost && typeof document < "u" && this._ghost.remove(), this._ghost = null, this._source = null, this._lastTarget = null, this._offsetX = 0, this._offsetY = 0;
|
|
1356
1342
|
}
|
|
1357
1343
|
/**
|
|
1358
|
-
*
|
|
1359
|
-
*
|
|
1360
|
-
*
|
|
1361
|
-
*
|
|
1362
|
-
*
|
|
1363
|
-
*
|
|
1364
|
-
|
|
1365
|
-
|
|
1344
|
+
* The one hit-test seam: every element under (x, y), topmost first.
|
|
1345
|
+
* `document.elementsFromPoint` (evergreen: Chromium, Firefox, WebKit 11.1+)
|
|
1346
|
+
* stops at a shadow host, so the chain is extended one level into the
|
|
1347
|
+
* shadow root of any host it contains — the builder may itself live inside
|
|
1348
|
+
* another component's shadow root. Specs stub this method to say which
|
|
1349
|
+
* element is under the pointer; they never fake geometry.
|
|
1350
|
+
*/
|
|
1351
|
+
elementsAt(e, t) {
|
|
1352
|
+
return Be(document.elementsFromPoint(e, t), e, t);
|
|
1353
|
+
}
|
|
1354
|
+
/**
|
|
1355
|
+
* Returns the first `[data-drop-slot]` under the pointer (or its ancestor)
|
|
1356
|
+
* that carries a complete target and whose data-parent-id is NOT in the
|
|
1357
|
+
* source's descendant set (cycle prevention).
|
|
1366
1358
|
*/
|
|
1367
1359
|
resolveDropTarget(e, t) {
|
|
1368
|
-
if (typeof document > "u") return null;
|
|
1369
1360
|
const r = this._source;
|
|
1370
1361
|
if (!r) return null;
|
|
1371
|
-
const
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
a && (i = [a]);
|
|
1378
|
-
}
|
|
1379
|
-
const s = Pe(i, e, t);
|
|
1380
|
-
for (const a of s) {
|
|
1381
|
-
const d = a.closest("[data-drop-slot]");
|
|
1382
|
-
if (!d) continue;
|
|
1383
|
-
const l = d.dataset.parentId, u = d.dataset.index, p = d.dataset.qbRoot;
|
|
1384
|
-
if (!(!l || !u || !p) && !r.descendantIds.has(l))
|
|
1385
|
-
return { parentId: l, index: Number(u), qbRoot: p };
|
|
1386
|
-
}
|
|
1387
|
-
return null;
|
|
1362
|
+
const i = this.elementsAt(e, t).map((s) => s.closest("[data-drop-slot]")).map((s) => s && {
|
|
1363
|
+
parentId: s.dataset.parentId,
|
|
1364
|
+
index: s.dataset.index,
|
|
1365
|
+
qbRoot: s.dataset.qbRoot
|
|
1366
|
+
}).find((s) => !!s && !!s.parentId && !!s.index && !!s.qbRoot && !r.descendantIds.has(s.parentId));
|
|
1367
|
+
return i ? { parentId: i.parentId, index: Number(i.index), qbRoot: i.qbRoot } : null;
|
|
1388
1368
|
}
|
|
1389
1369
|
}
|
|
1390
|
-
function
|
|
1391
|
-
const r = [...o
|
|
1392
|
-
|
|
1393
|
-
const s = i.shadowRoot;
|
|
1394
|
-
if (!s || n.has(s)) continue;
|
|
1395
|
-
n.add(s);
|
|
1396
|
-
const a = s.elementFromPoint(e, t);
|
|
1397
|
-
a && r.push(a);
|
|
1398
|
-
}
|
|
1399
|
-
return r;
|
|
1370
|
+
function Be(o, e, t) {
|
|
1371
|
+
const r = [...new Set(o.map((n) => n.shadowRoot).filter((n) => !!n))].map((n) => n.elementFromPoint(e, t)).filter((n) => !!n);
|
|
1372
|
+
return [...o, ...r];
|
|
1400
1373
|
}
|
|
1401
|
-
const
|
|
1374
|
+
const Q = P(
|
|
1402
1375
|
Symbol("mp-query-builder.editorRegistry")
|
|
1403
|
-
),
|
|
1376
|
+
), R = P(
|
|
1404
1377
|
Symbol("mp-query-builder.disabled")
|
|
1405
|
-
),
|
|
1378
|
+
), E = P(
|
|
1406
1379
|
Symbol("mp-query-builder.messages")
|
|
1407
1380
|
), V = P(
|
|
1408
1381
|
Symbol("mp-query-builder.maxDepth")
|
|
1409
|
-
);
|
|
1410
|
-
function
|
|
1382
|
+
), se = "query-condition";
|
|
1383
|
+
function Ue(o) {
|
|
1384
|
+
return (e) => {
|
|
1385
|
+
const t = o(e);
|
|
1386
|
+
return W(t.element, se), t;
|
|
1387
|
+
};
|
|
1388
|
+
}
|
|
1389
|
+
function A(o, e, t, r, n = {}) {
|
|
1411
1390
|
const i = document.createElement("input");
|
|
1412
1391
|
i.type = o, i.className = "form-control form-control-sm qb-editor-input", i.value = e, r && (i.disabled = !0);
|
|
1413
|
-
for (const [
|
|
1414
|
-
|
|
1392
|
+
for (const [d, a] of Object.entries(n))
|
|
1393
|
+
a !== void 0 && i.setAttribute(d, a);
|
|
1415
1394
|
const s = () => t(i.value);
|
|
1416
1395
|
return i.addEventListener("input", s), i.addEventListener("change", s), i;
|
|
1417
1396
|
}
|
|
1418
|
-
function
|
|
1397
|
+
function ae(o, e) {
|
|
1419
1398
|
return o == null ? "" : e === "date" && o instanceof Date ? o.toISOString().slice(0, 10) : e === "datetime" && o instanceof Date ? o.toISOString().slice(0, 16) : typeof o == "string" && (e === "date" || e === "datetime") ? e === "date" ? o.slice(0, 10) : o.slice(0, 16) : String(o);
|
|
1420
1399
|
}
|
|
1421
|
-
function
|
|
1400
|
+
function de(o, e) {
|
|
1422
1401
|
if (o === "") return null;
|
|
1423
1402
|
switch (e) {
|
|
1424
1403
|
case "number":
|
|
@@ -1437,10 +1416,10 @@ function _(o) {
|
|
|
1437
1416
|
return (e) => {
|
|
1438
1417
|
const t = o === "string" ? "text" : o === "date" ? "date" : o === "datetime" ? "datetime-local" : "number", r = {};
|
|
1439
1418
|
o === "integer" && (r.step = "1"), o === "number" && (r.step = "any");
|
|
1440
|
-
const n =
|
|
1419
|
+
const n = ae(e.value, o), i = A(
|
|
1441
1420
|
t,
|
|
1442
1421
|
n,
|
|
1443
|
-
(s) => e.onChange(
|
|
1422
|
+
(s) => e.onChange(de(s, o)),
|
|
1444
1423
|
e.disabled,
|
|
1445
1424
|
r
|
|
1446
1425
|
);
|
|
@@ -1451,20 +1430,20 @@ function X(o) {
|
|
|
1451
1430
|
return (e) => {
|
|
1452
1431
|
const t = document.createElement("span");
|
|
1453
1432
|
t.className = "qb-editor-tuple";
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
},
|
|
1458
|
-
o === "integer" && (
|
|
1459
|
-
const l =
|
|
1460
|
-
l.setAttribute("aria-label", `${e.field.label} (from)`),
|
|
1461
|
-
const
|
|
1462
|
-
return
|
|
1433
|
+
let r = Array.isArray(e.value) ? [e.value[0] ?? null, e.value[1] ?? null] : [null, null];
|
|
1434
|
+
const [n, i] = r, s = (y, le) => {
|
|
1435
|
+
r = r.map((ue, ce) => ce === y ? de(le, o) : ue), e.onChange(r);
|
|
1436
|
+
}, d = (y) => ae(y, o), a = o === "date" ? "date" : o === "datetime" ? "datetime-local" : "number", u = {};
|
|
1437
|
+
o === "integer" && (u.step = "1"), o === "number" && (u.step = "any");
|
|
1438
|
+
const l = A(a, d(n), (y) => s(0, y), e.disabled, u), c = A(a, d(i), (y) => s(1, y), e.disabled, u);
|
|
1439
|
+
l.setAttribute("aria-label", `${e.field.label} (from)`), c.setAttribute("aria-label", `${e.field.label} (to)`);
|
|
1440
|
+
const b = document.createElement("span");
|
|
1441
|
+
return b.textContent = " … ", b.className = "qb-editor-tuple-sep", t.append(l, b, c), { element: t };
|
|
1463
1442
|
};
|
|
1464
1443
|
}
|
|
1465
|
-
function
|
|
1444
|
+
function Ge() {
|
|
1466
1445
|
return (o) => {
|
|
1467
|
-
const e = typeof o.value == "object" && o.value !== null ? String(o.value.n ?? 1) : "1", t =
|
|
1446
|
+
const e = typeof o.value == "object" && o.value !== null ? String(o.value.n ?? 1) : "1", t = A(
|
|
1468
1447
|
"number",
|
|
1469
1448
|
e,
|
|
1470
1449
|
(r) => {
|
|
@@ -1477,7 +1456,7 @@ function Fe() {
|
|
|
1477
1456
|
return t.classList.add("qb-editor-n-input"), t.setAttribute("aria-label", `${o.field.label} — number of days`), { element: t };
|
|
1478
1457
|
};
|
|
1479
1458
|
}
|
|
1480
|
-
function
|
|
1459
|
+
function je(o) {
|
|
1481
1460
|
return (e) => {
|
|
1482
1461
|
const t = document.createElement("select");
|
|
1483
1462
|
t.className = "form-select form-select-sm qb-editor-select", t.setAttribute("aria-label", e.field.label), e.disabled && (t.disabled = !0);
|
|
@@ -1497,7 +1476,7 @@ function Ie(o) {
|
|
|
1497
1476
|
}), { element: t };
|
|
1498
1477
|
};
|
|
1499
1478
|
}
|
|
1500
|
-
function
|
|
1479
|
+
function Ve(o) {
|
|
1501
1480
|
return (e) => {
|
|
1502
1481
|
const t = document.createElement("select");
|
|
1503
1482
|
t.className = "form-select form-select-sm qb-editor-multiselect", t.multiple = !0, t.setAttribute("aria-label", e.field.label), e.disabled && (t.disabled = !0);
|
|
@@ -1507,7 +1486,7 @@ function Ne(o) {
|
|
|
1507
1486
|
i.value = String(n.value), i.textContent = n.label, r.includes(n.value) && (i.selected = !0), t.appendChild(i);
|
|
1508
1487
|
}
|
|
1509
1488
|
return t.addEventListener("change", () => {
|
|
1510
|
-
const n = Array.from(t.selectedOptions).map((i) => o.find((
|
|
1489
|
+
const n = Array.from(t.selectedOptions).map((i) => o.find((d) => String(d.value) === i.value)?.value ?? i.value);
|
|
1511
1490
|
e.onChange(n);
|
|
1512
1491
|
}), { element: t };
|
|
1513
1492
|
};
|
|
@@ -1515,58 +1494,63 @@ function Ne(o) {
|
|
|
1515
1494
|
function Y(o) {
|
|
1516
1495
|
return (e) => {
|
|
1517
1496
|
const t = document.createElement("span");
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1497
|
+
t.className = "qb-editor-chip-input";
|
|
1498
|
+
let r = Array.isArray(e.value) ? [...e.value] : [];
|
|
1499
|
+
const n = document.createElement("input");
|
|
1500
|
+
n.type = "text", n.className = "form-control form-control-sm qb-editor-chip-add", n.placeholder = "+ add", n.size = 8, n.setAttribute("aria-label", `${e.field.label} — add value`), e.disabled && (n.disabled = !0);
|
|
1501
|
+
const i = (a) => {
|
|
1502
|
+
r = a, d(), e.onChange(a);
|
|
1503
|
+
}, s = (a, u) => {
|
|
1504
|
+
const l = document.createElement("span");
|
|
1505
|
+
l.className = "qb-editor-chip", l.textContent = String(a);
|
|
1506
|
+
const c = document.createElement("button");
|
|
1507
|
+
return c.type = "button", c.className = "qb-editor-chip-remove", c.setAttribute("aria-label", `Remove ${String(a)}`), c.textContent = "×", e.disabled && (c.disabled = !0), c.addEventListener("click", () => i(r.filter((b, y) => y !== u))), l.appendChild(c), W(l, se), l;
|
|
1508
|
+
}, d = () => {
|
|
1509
|
+
const a = document.createRange();
|
|
1510
|
+
a.selectNodeContents(t), a.setEndBefore(n), a.deleteContents(), n.before(...r.map(s));
|
|
1511
|
+
};
|
|
1512
|
+
return t.appendChild(n), n.addEventListener("keydown", (a) => {
|
|
1513
|
+
if (a.key === "Enter" && n.value.trim() !== "") {
|
|
1514
|
+
a.preventDefault();
|
|
1515
|
+
const u = o(n.value.trim());
|
|
1516
|
+
n.value = "", i([...r, u]);
|
|
1529
1517
|
}
|
|
1530
|
-
|
|
1531
|
-
i.type = "text", i.className = "form-control form-control-sm qb-editor-chip-add", i.placeholder = "+ add", i.size = 8, i.setAttribute("aria-label", `${e.field.label} — add value`), e.disabled && (i.disabled = !0), i.addEventListener("keydown", (s) => {
|
|
1532
|
-
if (s.key === "Enter" && i.value.trim() !== "") {
|
|
1533
|
-
s.preventDefault();
|
|
1534
|
-
const a = o(i.value.trim()), d = [...Array.isArray(e.value) ? e.value : [], a];
|
|
1535
|
-
i.value = "", e.onChange(d);
|
|
1536
|
-
}
|
|
1537
|
-
}), t.appendChild(i);
|
|
1538
|
-
})(), {
|
|
1518
|
+
}), d(), {
|
|
1539
1519
|
element: t,
|
|
1540
1520
|
dispose: () => {
|
|
1541
1521
|
}
|
|
1542
1522
|
};
|
|
1543
1523
|
};
|
|
1544
1524
|
}
|
|
1545
|
-
function
|
|
1546
|
-
const t =
|
|
1525
|
+
function Xe(o, e) {
|
|
1526
|
+
const t = Ye(o, e);
|
|
1527
|
+
return t ? Ue(t) : null;
|
|
1528
|
+
}
|
|
1529
|
+
function Ye(o, e) {
|
|
1530
|
+
const t = q(e);
|
|
1547
1531
|
if (t === "null") return null;
|
|
1548
|
-
if (t === "n-input") return
|
|
1532
|
+
if (t === "n-input") return Ge();
|
|
1549
1533
|
if (t === "tuple") {
|
|
1550
1534
|
const r = o.type;
|
|
1551
1535
|
return X(r === "number" || r === "integer" || r === "date" || r === "datetime" ? r : "number");
|
|
1552
1536
|
}
|
|
1553
|
-
return t === "array" ? o.options && o.options.length > 0 ?
|
|
1537
|
+
return t === "array" ? o.options && o.options.length > 0 ? Ve(o.options) : o.type === "number" || o.type === "integer" ? Y(
|
|
1554
1538
|
(r) => o.type === "integer" ? Number.parseInt(r, 10) : Number(r)
|
|
1555
|
-
) : Y((r) => r) : o.type === "enum" && o.options && o.options.length > 0 ?
|
|
1539
|
+
) : Y((r) => r) : o.type === "enum" && o.options && o.options.length > 0 ? je(o.options) : o.type === "string" ? _("string") : o.type === "number" ? _("number") : o.type === "integer" ? _("integer") : o.type === "date" ? _("date") : o.type === "datetime" ? _("datetime") : null;
|
|
1556
1540
|
}
|
|
1557
|
-
const
|
|
1558
|
-
class
|
|
1541
|
+
const v = I("query-condition");
|
|
1542
|
+
class Ke extends M {
|
|
1559
1543
|
constructor() {
|
|
1560
|
-
super(...arguments), this.node = null, this.schema = [], this.currentEntity = "", this._messagesConsumer = new
|
|
1561
|
-
context:
|
|
1544
|
+
super(...arguments), this.node = null, this.schema = [], this.currentEntity = "", this._messagesConsumer = new h(this, {
|
|
1545
|
+
context: E,
|
|
1562
1546
|
subscribe: !0
|
|
1563
|
-
}), this._disabledConsumer = new
|
|
1564
|
-
context:
|
|
1547
|
+
}), this._disabledConsumer = new h(this, {
|
|
1548
|
+
context: R,
|
|
1565
1549
|
subscribe: !0
|
|
1566
|
-
}), this._registryConsumer = new
|
|
1567
|
-
context:
|
|
1550
|
+
}), this._registryConsumer = new h(this, {
|
|
1551
|
+
context: Q,
|
|
1568
1552
|
subscribe: !0
|
|
1569
|
-
}), this._editorMount =
|
|
1553
|
+
}), this._editorMount = me(), this._currentHandle = null, this._editorKey = "", this._registryTokens = /* @__PURE__ */ new WeakMap(), this._nextRegistryToken = 1, this._onFieldChange = (e) => {
|
|
1570
1554
|
const t = e.target, r = this.node;
|
|
1571
1555
|
r && this.dispatchEvent(new CustomEvent("condition-field-change", {
|
|
1572
1556
|
detail: { id: r.id, field: t.value },
|
|
@@ -1632,6 +1616,9 @@ class Oe extends L {
|
|
|
1632
1616
|
const r = this._nextRegistryToken++;
|
|
1633
1617
|
return this._registryTokens.set(e, r), r;
|
|
1634
1618
|
}
|
|
1619
|
+
connectedCallback() {
|
|
1620
|
+
super.connectedCallback(), be();
|
|
1621
|
+
}
|
|
1635
1622
|
disconnectedCallback() {
|
|
1636
1623
|
super.disconnectedCallback(), this._disposeEditor();
|
|
1637
1624
|
}
|
|
@@ -1651,9 +1638,9 @@ class Oe extends L {
|
|
|
1651
1638
|
messages() {
|
|
1652
1639
|
const e = this._messagesConsumer.value ?? {};
|
|
1653
1640
|
return {
|
|
1654
|
-
...
|
|
1641
|
+
...f,
|
|
1655
1642
|
...e,
|
|
1656
|
-
operators: { ...
|
|
1643
|
+
operators: { ...f.operators, ...e.operators ?? {} }
|
|
1657
1644
|
};
|
|
1658
1645
|
}
|
|
1659
1646
|
isDisabled() {
|
|
@@ -1663,10 +1650,8 @@ class Oe extends L {
|
|
|
1663
1650
|
this._refreshEditor();
|
|
1664
1651
|
}
|
|
1665
1652
|
_refreshEditor() {
|
|
1666
|
-
const e = this._editorMount.value;
|
|
1667
|
-
if (!e)
|
|
1668
|
-
const t = this.node;
|
|
1669
|
-
if (!t) {
|
|
1653
|
+
const e = this._editorMount.value, t = this.node;
|
|
1654
|
+
if (!e || !t) {
|
|
1670
1655
|
this._disposeEditor();
|
|
1671
1656
|
return;
|
|
1672
1657
|
}
|
|
@@ -1675,41 +1660,37 @@ class Oe extends L {
|
|
|
1675
1660
|
this._disposeEditor();
|
|
1676
1661
|
return;
|
|
1677
1662
|
}
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
return;
|
|
1681
|
-
}
|
|
1682
|
-
const i = this.isDisabled(), s = this._registryConsumer.value, a = s?.[r.name], d = a ? `r${this._registryIdentityToken(s)}` : "b", l = `${r.name}|${t.operator}|${i ? "1" : "0"}|${d}`;
|
|
1683
|
-
if (this._currentHandle && l === this._editorKey) return;
|
|
1663
|
+
const n = this.isDisabled(), i = this._registryConsumer.value, s = i?.[r.name], d = s ? `r${this._registryIdentityToken(i)}` : "b", a = `${r.name}|${t.operator}|${n ? "1" : "0"}|${d}`;
|
|
1664
|
+
if (this._currentHandle && a === this._editorKey) return;
|
|
1684
1665
|
this._disposeEditor();
|
|
1685
|
-
const u =
|
|
1666
|
+
const u = s ?? Xe(r, t.operator);
|
|
1686
1667
|
if (!u) return;
|
|
1687
|
-
const
|
|
1668
|
+
const l = {
|
|
1688
1669
|
field: r,
|
|
1689
1670
|
operator: t.operator,
|
|
1690
1671
|
value: t.value,
|
|
1691
|
-
disabled:
|
|
1692
|
-
onChange: (
|
|
1672
|
+
disabled: n,
|
|
1673
|
+
onChange: (b) => {
|
|
1693
1674
|
this.dispatchEvent(new CustomEvent("condition-value-change", {
|
|
1694
|
-
detail: { id: t.id, value:
|
|
1675
|
+
detail: { id: t.id, value: b },
|
|
1695
1676
|
bubbles: !0,
|
|
1696
1677
|
composed: !0
|
|
1697
1678
|
}));
|
|
1698
1679
|
}
|
|
1699
|
-
},
|
|
1700
|
-
e.appendChild(
|
|
1680
|
+
}, c = u(l);
|
|
1681
|
+
e.appendChild(c.element), this._currentHandle = c, this._editorKey = a;
|
|
1701
1682
|
}
|
|
1702
1683
|
_availableFields() {
|
|
1703
1684
|
return this.schema.find((e) => e.name === this.currentEntity)?.fields.filter((e) => e.type !== "relation") ?? [];
|
|
1704
1685
|
}
|
|
1705
1686
|
_availableOperators(e) {
|
|
1706
|
-
return e ?
|
|
1687
|
+
return e ? k(e.type) : [];
|
|
1707
1688
|
}
|
|
1708
1689
|
render() {
|
|
1709
1690
|
const e = this.node;
|
|
1710
|
-
if (!e) return
|
|
1711
|
-
const t = this.resolveField(e.field), r = this.messages(), n =
|
|
1712
|
-
return
|
|
1691
|
+
if (!e) return m;
|
|
1692
|
+
const t = this.resolveField(e.field), r = this.messages(), n = q(e.operator), i = this.isDisabled(), s = this._availableFields(), d = this._availableOperators(t);
|
|
1693
|
+
return v`
|
|
1713
1694
|
<div
|
|
1714
1695
|
class="qb-condition"
|
|
1715
1696
|
tabindex="0"
|
|
@@ -1737,8 +1718,8 @@ class Oe extends L {
|
|
|
1737
1718
|
@change=${this._onFieldChange}
|
|
1738
1719
|
aria-label=${r.field}
|
|
1739
1720
|
>
|
|
1740
|
-
${s.map((
|
|
1741
|
-
${t ?
|
|
1721
|
+
${s.map((a) => v`<option value=${a.name}>${a.label}</option>`)}
|
|
1722
|
+
${t ? m : v`<option value=${e.field}>(${e.field})</option>`}
|
|
1742
1723
|
</mp-select>
|
|
1743
1724
|
<mp-select
|
|
1744
1725
|
class="qb-operator-select"
|
|
@@ -1748,12 +1729,12 @@ class Oe extends L {
|
|
|
1748
1729
|
@change=${this._onOperatorChange}
|
|
1749
1730
|
aria-label=${r.operator}
|
|
1750
1731
|
>
|
|
1751
|
-
${
|
|
1752
|
-
<option value=${
|
|
1732
|
+
${d.map((a) => v`
|
|
1733
|
+
<option value=${a}>${r.operators[a] ?? a}</option>
|
|
1753
1734
|
`)}
|
|
1754
|
-
${
|
|
1735
|
+
${d.includes(e.operator) ? m : v`<option value=${e.operator}>${e.operator}</option>`}
|
|
1755
1736
|
</mp-select>
|
|
1756
|
-
${n === "null" ?
|
|
1737
|
+
${n === "null" ? m : v`<span class="qb-value" ${pe(this._editorMount)}></span>`}
|
|
1757
1738
|
<button
|
|
1758
1739
|
type="button"
|
|
1759
1740
|
class="btn btn-sm btn-link qb-remove"
|
|
@@ -1766,13 +1747,13 @@ class Oe extends L {
|
|
|
1766
1747
|
`;
|
|
1767
1748
|
}
|
|
1768
1749
|
}
|
|
1769
|
-
|
|
1770
|
-
typeof customElements < "u" && !customElements.get("mp-query-condition") && customElements.define("mp-query-condition",
|
|
1771
|
-
const K =
|
|
1772
|
-
class
|
|
1750
|
+
L("query-condition", Fe);
|
|
1751
|
+
typeof customElements < "u" && !customElements.get("mp-query-condition") && customElements.define("mp-query-condition", Ke);
|
|
1752
|
+
const K = I("query-subquery");
|
|
1753
|
+
class We extends M {
|
|
1773
1754
|
constructor() {
|
|
1774
|
-
super(...arguments), this.node = null, this.schema = [], this.currentEntity = "", this.depth = 0, this.qbRoot = "", this.isDragging = !1, this._messagesConsumer = new
|
|
1775
|
-
context:
|
|
1755
|
+
super(...arguments), this.node = null, this.schema = [], this.currentEntity = "", this.depth = 0, this.qbRoot = "", this.isDragging = !1, this._messagesConsumer = new h(this, {
|
|
1756
|
+
context: E,
|
|
1776
1757
|
subscribe: !0
|
|
1777
1758
|
}), this._onHeaderKeyDown = (e) => {
|
|
1778
1759
|
if (!e.altKey || e.key !== "ArrowUp" && e.key !== "ArrowDown") return;
|
|
@@ -1805,14 +1786,14 @@ class Qe extends L {
|
|
|
1805
1786
|
messages() {
|
|
1806
1787
|
const e = this._messagesConsumer.value ?? {};
|
|
1807
1788
|
return {
|
|
1808
|
-
...
|
|
1789
|
+
...f,
|
|
1809
1790
|
...e,
|
|
1810
|
-
operators: { ...
|
|
1791
|
+
operators: { ...f.operators, ...e.operators ?? {} }
|
|
1811
1792
|
};
|
|
1812
1793
|
}
|
|
1813
1794
|
render() {
|
|
1814
1795
|
const e = this.node;
|
|
1815
|
-
if (!e) return
|
|
1796
|
+
if (!e) return m;
|
|
1816
1797
|
const t = this.resolveField(e.field), r = this.messages(), n = t?.label ?? e.field, i = r.operators[e.operator] ?? e.operator, s = t?.targetEntity ?? "";
|
|
1817
1798
|
return K`
|
|
1818
1799
|
<div class="qb-subquery" data-row-id=${e.id}>
|
|
@@ -1827,28 +1808,29 @@ class Qe extends L {
|
|
|
1827
1808
|
>
|
|
1828
1809
|
<span class="qb-subquery-field">${n}</span>
|
|
1829
1810
|
<span class="qb-subquery-operator">${i}</span>
|
|
1830
|
-
${s ? K`<span class="qb-subquery-target">(${s})</span>` :
|
|
1811
|
+
${s ? K`<span class="qb-subquery-target">(${s})</span>` : m}
|
|
1831
1812
|
</div>
|
|
1832
1813
|
<mp-query-builder
|
|
1833
1814
|
.query=${e.subQuery}
|
|
1834
1815
|
.schema=${this.schema}
|
|
1835
1816
|
.rootEntity=${s}
|
|
1836
1817
|
.depth=${this.depth + 1}
|
|
1818
|
+
.dragActive=${this.isDragging}
|
|
1837
1819
|
></mp-query-builder>
|
|
1838
1820
|
</div>
|
|
1839
1821
|
`;
|
|
1840
1822
|
}
|
|
1841
1823
|
}
|
|
1842
|
-
|
|
1843
|
-
typeof customElements < "u" && !customElements.get("mp-query-subquery") && customElements.define("mp-query-subquery",
|
|
1844
|
-
const g =
|
|
1845
|
-
class
|
|
1824
|
+
L("query-subquery", ze);
|
|
1825
|
+
typeof customElements < "u" && !customElements.get("mp-query-subquery") && customElements.define("mp-query-subquery", We);
|
|
1826
|
+
const g = I("query-group");
|
|
1827
|
+
class Je extends M {
|
|
1846
1828
|
constructor() {
|
|
1847
|
-
super(...arguments), this.node = null, this.schema = [], this.currentEntity = "", this.depth = 0, this.isRoot = !1, this.qbRoot = "", this.isDragging = !1, this._messagesConsumer = new
|
|
1848
|
-
context:
|
|
1829
|
+
super(...arguments), this.node = null, this.schema = [], this.currentEntity = "", this.depth = 0, this.isRoot = !1, this.qbRoot = "", this.isDragging = !1, this._messagesConsumer = new h(this, {
|
|
1830
|
+
context: E,
|
|
1849
1831
|
subscribe: !0
|
|
1850
|
-
}), this._disabledConsumer = new
|
|
1851
|
-
context:
|
|
1832
|
+
}), this._disabledConsumer = new h(this, {
|
|
1833
|
+
context: R,
|
|
1852
1834
|
subscribe: !0
|
|
1853
1835
|
}), this._onLogicChange = (e) => {
|
|
1854
1836
|
const t = this.node;
|
|
@@ -1889,9 +1871,9 @@ class He extends L {
|
|
|
1889
1871
|
messages() {
|
|
1890
1872
|
const e = this._messagesConsumer.value ?? {};
|
|
1891
1873
|
return {
|
|
1892
|
-
...
|
|
1874
|
+
...f,
|
|
1893
1875
|
...e,
|
|
1894
|
-
operators: { ...
|
|
1876
|
+
operators: { ...f.operators, ...e.operators ?? {} }
|
|
1895
1877
|
};
|
|
1896
1878
|
}
|
|
1897
1879
|
renderChild(e) {
|
|
@@ -1923,7 +1905,7 @@ class He extends L {
|
|
|
1923
1905
|
}
|
|
1924
1906
|
}
|
|
1925
1907
|
renderDropSlot(e) {
|
|
1926
|
-
return !this.isDragging || !this.node ?
|
|
1908
|
+
return !this.isDragging || !this.node ? m : g`<div
|
|
1927
1909
|
class="qb-drop-slot"
|
|
1928
1910
|
data-drop-slot
|
|
1929
1911
|
data-parent-id=${this.node.id}
|
|
@@ -1951,11 +1933,12 @@ class He extends L {
|
|
|
1951
1933
|
}
|
|
1952
1934
|
render() {
|
|
1953
1935
|
const e = this.node;
|
|
1954
|
-
if (!e) return
|
|
1936
|
+
if (!e) return m;
|
|
1955
1937
|
const t = this.messages(), r = this.isDisabled(), n = this._hasRelation();
|
|
1956
1938
|
return g`
|
|
1957
1939
|
<div
|
|
1958
1940
|
class="qb-group"
|
|
1941
|
+
data-row-id=${e.id}
|
|
1959
1942
|
role="group"
|
|
1960
1943
|
aria-label=${// Depth rides in the NAME: aria-level is not an allowed attribute
|
|
1961
1944
|
// on role=group (axe aria-allowed-attr, serious) — it belongs to
|
|
@@ -1997,8 +1980,8 @@ class He extends L {
|
|
|
1997
1980
|
class="btn btn-sm btn-outline-secondary qb-add-subquery"
|
|
1998
1981
|
?disabled=${r}
|
|
1999
1982
|
@click=${this._onAddSubquery}
|
|
2000
|
-
>+ ${t.addSubquery}</button>` :
|
|
2001
|
-
${this.isRoot ?
|
|
1983
|
+
>+ ${t.addSubquery}</button>` : m}
|
|
1984
|
+
${this.isRoot ? m : g`<button
|
|
2002
1985
|
type="button"
|
|
2003
1986
|
class="btn btn-sm btn-link qb-remove-group"
|
|
2004
1987
|
?disabled=${r}
|
|
@@ -2015,30 +1998,30 @@ class He extends L {
|
|
|
2015
1998
|
`;
|
|
2016
1999
|
}
|
|
2017
2000
|
}
|
|
2018
|
-
|
|
2019
|
-
typeof customElements < "u" && !customElements.get("mp-query-group") && customElements.define("mp-query-group",
|
|
2020
|
-
const
|
|
2021
|
-
class
|
|
2001
|
+
L("query-group", Oe);
|
|
2002
|
+
typeof customElements < "u" && !customElements.get("mp-query-group") && customElements.define("mp-query-group", Je);
|
|
2003
|
+
const Ze = "mp-query-group, mp-query-condition, mp-query-subquery, mp-query-builder", p = I("query-builder"), et = 32;
|
|
2004
|
+
class tt extends M {
|
|
2022
2005
|
constructor() {
|
|
2023
|
-
super(...arguments), this.query = null, this.schema = [], this.rootEntity = "", this.multiEntityPickerEnabled = !1, this.selectedFields = [], this.sortBy = [], this.disabled = !1, this.editorRegistry = void 0, this.messages = void 0, this.maxDepth =
|
|
2024
|
-
context:
|
|
2006
|
+
super(...arguments), this.query = null, this.schema = [], this.rootEntity = "", this.multiEntityPickerEnabled = !1, this.selectedFields = [], this.sortBy = [], this.disabled = !1, this.editorRegistry = void 0, this.messages = void 0, this.maxDepth = et, this.showPreview = !1, this.showSavedQueries = !1, this.savedQueries = [], this._saveDraftName = "", this.depth = 0, this.dragActive = !1, this._qbRootId = `qb-${Math.random().toString(36).slice(2, 10)}`, this._isDragging = !1, this._drag = new He(), this._pointerMoveHandler = null, this._pointerUpHandler = null, this._pointerCancelHandler = null, this._registryConsumer = new h(this, {
|
|
2007
|
+
context: Q,
|
|
2025
2008
|
subscribe: !0
|
|
2026
2009
|
}), this._registryProvider = new x(this, {
|
|
2027
|
-
context:
|
|
2010
|
+
context: Q,
|
|
2028
2011
|
initialValue: void 0
|
|
2029
|
-
}), this._disabledConsumer = new
|
|
2030
|
-
context:
|
|
2012
|
+
}), this._disabledConsumer = new h(this, {
|
|
2013
|
+
context: R,
|
|
2031
2014
|
subscribe: !0
|
|
2032
2015
|
}), this._disabledProvider = new x(this, {
|
|
2033
|
-
context:
|
|
2016
|
+
context: R,
|
|
2034
2017
|
initialValue: void 0
|
|
2035
|
-
}), this._messagesConsumer = new
|
|
2036
|
-
context:
|
|
2018
|
+
}), this._messagesConsumer = new h(this, {
|
|
2019
|
+
context: E,
|
|
2037
2020
|
subscribe: !0
|
|
2038
2021
|
}), this._messagesProvider = new x(this, {
|
|
2039
|
-
context:
|
|
2022
|
+
context: E,
|
|
2040
2023
|
initialValue: void 0
|
|
2041
|
-
}), this._maxDepthConsumer = new
|
|
2024
|
+
}), this._maxDepthConsumer = new h(this, {
|
|
2042
2025
|
context: V,
|
|
2043
2026
|
subscribe: !0
|
|
2044
2027
|
}), this._maxDepthProvider = new x(this, {
|
|
@@ -2049,49 +2032,49 @@ class Ue extends L {
|
|
|
2049
2032
|
e.stopPropagation();
|
|
2050
2033
|
const { id: t, field: r } = e.detail, n = this.query;
|
|
2051
2034
|
if (!n) return;
|
|
2052
|
-
const s = this._resolveEntityForNode(t)?.fields.find((
|
|
2053
|
-
s && this._mutate(
|
|
2035
|
+
const s = this._resolveEntityForNode(t)?.fields.find((d) => d.name === r);
|
|
2036
|
+
s && this._mutate(Ce(n, t, s));
|
|
2054
2037
|
}, this._onConditionOperatorChange = (e) => {
|
|
2055
2038
|
if (!this._handlesEvents()) return;
|
|
2056
2039
|
e.stopPropagation();
|
|
2057
2040
|
const { id: t, operator: r } = e.detail, n = this.query;
|
|
2058
|
-
n && this._mutate(
|
|
2041
|
+
n && this._mutate(Se(n, t, r));
|
|
2059
2042
|
}, this._onConditionValueChange = (e) => {
|
|
2060
2043
|
if (!this._handlesEvents()) return;
|
|
2061
2044
|
e.stopPropagation();
|
|
2062
2045
|
const { id: t, value: r } = e.detail, n = this.query;
|
|
2063
|
-
n && this._mutate(
|
|
2046
|
+
n && this._mutate(xe(n, t, { value: r }));
|
|
2064
2047
|
}, this._onGroupLogicChange = (e) => {
|
|
2065
2048
|
if (!this._handlesEvents()) return;
|
|
2066
2049
|
e.stopPropagation();
|
|
2067
2050
|
const { id: t, logic: r } = e.detail, n = this.query;
|
|
2068
|
-
n && this._mutate(
|
|
2051
|
+
n && this._mutate(ke(n, t, r));
|
|
2069
2052
|
}, this._onAddCondition = (e) => {
|
|
2070
2053
|
if (!this._handlesEvents()) return;
|
|
2071
2054
|
e.stopPropagation();
|
|
2072
2055
|
const { groupId: t } = e.detail, r = this.query;
|
|
2073
2056
|
if (!r) return;
|
|
2074
2057
|
const n = this._resolveEntityForNode(t);
|
|
2075
|
-
n && this._mutate(
|
|
2058
|
+
n && this._mutate(_e(r, t, n));
|
|
2076
2059
|
}, this._onAddGroup = (e) => {
|
|
2077
2060
|
if (!this._handlesEvents()) return;
|
|
2078
2061
|
e.stopPropagation();
|
|
2079
2062
|
const { groupId: t } = e.detail, r = this.query;
|
|
2080
|
-
r && this._mutate(
|
|
2063
|
+
r && this._mutate($e(r, t, "and"));
|
|
2081
2064
|
}, this._onAddSubquery = (e) => {
|
|
2082
2065
|
if (!this._handlesEvents()) return;
|
|
2083
2066
|
e.stopPropagation();
|
|
2084
2067
|
const { groupId: t } = e.detail, r = this.query;
|
|
2085
2068
|
if (!r) return;
|
|
2086
2069
|
const n = this._resolveEntityForNode(t);
|
|
2087
|
-
n && this._mutate(
|
|
2070
|
+
n && this._mutate(Ee(r, t, n));
|
|
2088
2071
|
}, this._onNodeRemove = (e) => {
|
|
2089
2072
|
if (!this._handlesEvents()) return;
|
|
2090
2073
|
e.stopPropagation();
|
|
2091
2074
|
const { id: t } = e.detail, r = this.query;
|
|
2092
2075
|
if (!r || r.id === t) return;
|
|
2093
2076
|
const n = D(r, t);
|
|
2094
|
-
this._pendingRefocusId = n?.parent.id ?? r.id, this._mutate(
|
|
2077
|
+
this._pendingRefocusId = n?.parent.id ?? r.id, this._mutate(te(r, t));
|
|
2095
2078
|
}, this._pendingRefocusId = null, this._onKeyboardMove = (e) => {
|
|
2096
2079
|
if (!this._handlesEvents()) return;
|
|
2097
2080
|
e.stopPropagation();
|
|
@@ -2106,9 +2089,9 @@ class Ue extends L {
|
|
|
2106
2089
|
e.stopPropagation();
|
|
2107
2090
|
const t = e.detail, r = this.query;
|
|
2108
2091
|
if (!r) return;
|
|
2109
|
-
const n =
|
|
2092
|
+
const n = $(r, t.id);
|
|
2110
2093
|
if (!n) return;
|
|
2111
|
-
const i =
|
|
2094
|
+
const i = ee(n);
|
|
2112
2095
|
this._drag.start(
|
|
2113
2096
|
{
|
|
2114
2097
|
id: t.id,
|
|
@@ -2166,6 +2149,7 @@ class Ue extends L {
|
|
|
2166
2149
|
showSavedQueries: { attribute: "show-saved-queries", type: Boolean, reflect: !0 },
|
|
2167
2150
|
savedQueries: { attribute: !1 },
|
|
2168
2151
|
depth: { attribute: !1 },
|
|
2152
|
+
dragActive: { attribute: !1 },
|
|
2169
2153
|
_isDragging: { state: !0 },
|
|
2170
2154
|
_saveDraftName: { state: !0 }
|
|
2171
2155
|
};
|
|
@@ -2178,27 +2162,25 @@ class Ue extends L {
|
|
|
2178
2162
|
const n = this.messages, i = this._messagesConsumer.value;
|
|
2179
2163
|
let s;
|
|
2180
2164
|
this._lastEffMessages !== void 0 && this._lastMessagesOwn === n && this._lastMessagesConsumed === i ? s = this._lastEffMessages : (s = { ...i ?? {}, ...n ?? {} }, this._lastMessagesOwn = n, this._lastMessagesConsumed = i, this._lastEffMessages = s), this._messagesProvider.setValue(s);
|
|
2181
|
-
const
|
|
2182
|
-
this._maxDepthProvider.setValue(
|
|
2165
|
+
const a = this._maxDepthConsumer.value ?? this.maxDepth;
|
|
2166
|
+
this._maxDepthProvider.setValue(a);
|
|
2183
2167
|
}
|
|
2184
2168
|
updated(e) {
|
|
2185
2169
|
if (this._pendingRefocusId === null) return;
|
|
2186
2170
|
const t = this._pendingRefocusId;
|
|
2187
|
-
this._pendingRefocusId = null,
|
|
2171
|
+
this._pendingRefocusId = null, this._descendantsSettled().then(() => this._focusRowById(t));
|
|
2172
|
+
}
|
|
2173
|
+
async _descendantsSettled() {
|
|
2174
|
+
const e = Array.from(this.querySelectorAll(Ze)).filter((t) => t.isUpdatePending);
|
|
2175
|
+
if (e.length !== 0)
|
|
2176
|
+
return await Promise.all(e.map((t) => t.updateComplete)), this._descendantsSettled();
|
|
2188
2177
|
}
|
|
2189
2178
|
_focusRowById(e) {
|
|
2190
|
-
const t = (
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
if (s.shadowRoot) {
|
|
2196
|
-
const a = t(s.shadowRoot);
|
|
2197
|
-
if (a) return a;
|
|
2198
|
-
}
|
|
2199
|
-
return null;
|
|
2200
|
-
};
|
|
2201
|
-
t(this.renderRoot)?.focus();
|
|
2179
|
+
const t = this.querySelector(`[data-row-id="${e}"]`);
|
|
2180
|
+
if (!t) return;
|
|
2181
|
+
(t.querySelector(
|
|
2182
|
+
":scope > .qb-subquery-header, :scope > .qb-group-header .qb-add-condition"
|
|
2183
|
+
) ?? t).focus();
|
|
2202
2184
|
}
|
|
2203
2185
|
/**
|
|
2204
2186
|
* Effective max-depth used for the render check. The OUTER builder's
|
|
@@ -2218,15 +2200,15 @@ class Ue extends L {
|
|
|
2218
2200
|
if (!t) return null;
|
|
2219
2201
|
const r = this.query;
|
|
2220
2202
|
if (!r) return t;
|
|
2221
|
-
const n = { entity: t }, i = (s,
|
|
2203
|
+
const n = { entity: t }, i = (s, d) => {
|
|
2222
2204
|
if (s.id === e)
|
|
2223
|
-
return n.entity =
|
|
2205
|
+
return n.entity = d, !0;
|
|
2224
2206
|
if (s.kind === "group") {
|
|
2225
|
-
for (const
|
|
2226
|
-
if (i(
|
|
2207
|
+
for (const a of s.children)
|
|
2208
|
+
if (i(a, d)) return !0;
|
|
2227
2209
|
} else if (s.kind === "subquery") {
|
|
2228
|
-
const
|
|
2229
|
-
if (i(s.subQuery,
|
|
2210
|
+
const a = d.fields.find((l) => l.name === s.field), u = a?.targetEntity ? this.schema.find((l) => l.name === a.targetEntity) ?? d : d;
|
|
2211
|
+
if (i(s.subQuery, u)) return !0;
|
|
2230
2212
|
}
|
|
2231
2213
|
return !1;
|
|
2232
2214
|
};
|
|
@@ -2247,8 +2229,8 @@ class Ue extends L {
|
|
|
2247
2229
|
return this.depth === 0;
|
|
2248
2230
|
}
|
|
2249
2231
|
_finishDrag(e) {
|
|
2250
|
-
const t = this._drag.end(e);
|
|
2251
|
-
this._teardownDragListeners(), this._isDragging = !1, t && this._applyDrop(t);
|
|
2232
|
+
const t = this._drag.source(), r = this._drag.end(e);
|
|
2233
|
+
this._teardownDragListeners(), this._isDragging = !1, !(!r || !t) && this._applyDrop(t, r);
|
|
2252
2234
|
}
|
|
2253
2235
|
_cancelDrag() {
|
|
2254
2236
|
this._drag.cancel(), this._teardownDragListeners(), this._isDragging = !1;
|
|
@@ -2256,38 +2238,20 @@ class Ue extends L {
|
|
|
2256
2238
|
_teardownDragListeners() {
|
|
2257
2239
|
typeof window > "u" || (this._pointerMoveHandler && window.removeEventListener("pointermove", this._pointerMoveHandler), this._pointerUpHandler && window.removeEventListener("pointerup", this._pointerUpHandler), this._pointerCancelHandler && window.removeEventListener("pointercancel", this._pointerCancelHandler), this._pointerMoveHandler = null, this._pointerUpHandler = null, this._pointerCancelHandler = null);
|
|
2258
2240
|
}
|
|
2259
|
-
_applyDrop(e) {
|
|
2260
|
-
const
|
|
2261
|
-
if (!t || !r) return;
|
|
2262
|
-
const n = e.qbRoot !== r.qbRoot ? this._schemaForGroup(e.parentId) : void 0, i = j(t, r.id, e.parentId, e.index, n);
|
|
2263
|
-
this._mutate(i);
|
|
2264
|
-
}
|
|
2265
|
-
_schemaForGroup(e) {
|
|
2266
|
-
const t = this.query;
|
|
2267
|
-
if (!t) return;
|
|
2268
|
-
const r = this._entitySchemaForCurrentRoot();
|
|
2241
|
+
_applyDrop(e, t) {
|
|
2242
|
+
const r = this.query;
|
|
2269
2243
|
if (!r) return;
|
|
2270
|
-
const n =
|
|
2271
|
-
|
|
2272
|
-
return n.schema = a, !0;
|
|
2273
|
-
if (s.kind === "group") {
|
|
2274
|
-
for (const d of s.children) if (i(d, a)) return !0;
|
|
2275
|
-
} else if (s.kind === "subquery") {
|
|
2276
|
-
const d = a.fields.find((u) => u.name === s.field), l = d?.targetEntity ? this.schema.find((u) => u.name === d.targetEntity) ?? a : a;
|
|
2277
|
-
if (i(s.subQuery, l)) return !0;
|
|
2278
|
-
}
|
|
2279
|
-
return !1;
|
|
2280
|
-
};
|
|
2281
|
-
return i(t, r), n.schema;
|
|
2244
|
+
const n = t.qbRoot !== e.qbRoot ? this._resolveEntityForNode(t.parentId) ?? void 0 : void 0, i = j(r, e.id, t.parentId, t.index, n);
|
|
2245
|
+
this._mutate(i);
|
|
2282
2246
|
}
|
|
2283
2247
|
disconnectedCallback() {
|
|
2284
2248
|
super.disconnectedCallback(), this._teardownDragListeners(), this._drag.cancel();
|
|
2285
2249
|
}
|
|
2286
2250
|
_renderSavedPicker(e) {
|
|
2287
|
-
return
|
|
2251
|
+
return p`
|
|
2288
2252
|
<div class="qb-saved">
|
|
2289
2253
|
<div class="qb-saved-list">
|
|
2290
|
-
${this.savedQueries.length === 0 ?
|
|
2254
|
+
${this.savedQueries.length === 0 ? p`<span class="qb-saved-empty">No saved queries</span>` : this.savedQueries.map((t) => p`
|
|
2291
2255
|
<span class="qb-saved-row" data-name=${t.name}>
|
|
2292
2256
|
<button
|
|
2293
2257
|
type="button"
|
|
@@ -2329,11 +2293,11 @@ class Ue extends L {
|
|
|
2329
2293
|
* Phase-2 widgets (field projection, sort-by) hang off this same toolbar.
|
|
2330
2294
|
*/
|
|
2331
2295
|
_renderToolbar() {
|
|
2332
|
-
if (this.depth !== 0) return
|
|
2333
|
-
if (!this.multiEntityPickerEnabled) return
|
|
2334
|
-
if (this.schema.length < 2) return
|
|
2296
|
+
if (this.depth !== 0) return m;
|
|
2297
|
+
if (!this.multiEntityPickerEnabled) return m;
|
|
2298
|
+
if (this.schema.length < 2) return m;
|
|
2335
2299
|
const t = this.schema.find((n) => n.name === this.rootEntity)?.fields.filter((n) => n.type !== "relation") ?? [], r = this._messages();
|
|
2336
|
-
return
|
|
2300
|
+
return p`
|
|
2337
2301
|
<div class="qb-toolbar">
|
|
2338
2302
|
<label class="qb-toolbar-label">
|
|
2339
2303
|
Entity:
|
|
@@ -2345,13 +2309,13 @@ class Ue extends L {
|
|
|
2345
2309
|
@change=${this._onRootEntityChange}
|
|
2346
2310
|
aria-label=${r.entity}
|
|
2347
2311
|
>
|
|
2348
|
-
${this.schema.map((n) =>
|
|
2312
|
+
${this.schema.map((n) => p`<option value=${n.name}>${n.label}</option>`)}
|
|
2349
2313
|
</mp-select>
|
|
2350
2314
|
</label>
|
|
2351
|
-
${t.length > 0 ?
|
|
2315
|
+
${t.length > 0 ? p`
|
|
2352
2316
|
<span class="qb-toolbar-section qb-field-projection" role="group" aria-label=${r.columns}>
|
|
2353
2317
|
<span class="qb-toolbar-label">${r.columns}:</span>
|
|
2354
|
-
${t.map((n) =>
|
|
2318
|
+
${t.map((n) => p`
|
|
2355
2319
|
<mp-checkbox
|
|
2356
2320
|
class="qb-field-checkbox"
|
|
2357
2321
|
value=${n.name}
|
|
@@ -2362,17 +2326,17 @@ class Ue extends L {
|
|
|
2362
2326
|
>${n.label}</mp-checkbox>
|
|
2363
2327
|
`)}
|
|
2364
2328
|
</span>
|
|
2365
|
-
` :
|
|
2366
|
-
${t.length > 0 ? this._renderSortBy(t) :
|
|
2329
|
+
` : m}
|
|
2330
|
+
${t.length > 0 ? this._renderSortBy(t) : m}
|
|
2367
2331
|
</div>
|
|
2368
2332
|
`;
|
|
2369
2333
|
}
|
|
2370
2334
|
_renderSortBy(e) {
|
|
2371
2335
|
const t = this._messages();
|
|
2372
|
-
return
|
|
2336
|
+
return p`
|
|
2373
2337
|
<span class="qb-toolbar-section qb-sort-by" role="group" aria-label=${t.sortBy}>
|
|
2374
2338
|
<span class="qb-toolbar-label">${t.sortBy}:</span>
|
|
2375
|
-
${this.sortBy.map((r, n) =>
|
|
2339
|
+
${this.sortBy.map((r, n) => p`
|
|
2376
2340
|
<span class="qb-sort-row">
|
|
2377
2341
|
<mp-select
|
|
2378
2342
|
class="qb-sort-field"
|
|
@@ -2382,8 +2346,8 @@ class Ue extends L {
|
|
|
2382
2346
|
@change=${(i) => this._onSortFieldChange(n, i)}
|
|
2383
2347
|
aria-label=${`Sort ${n + 1} field`}
|
|
2384
2348
|
>
|
|
2385
|
-
${e.map((i) =>
|
|
2386
|
-
${e.some((i) => i.name === r.field) ?
|
|
2349
|
+
${e.map((i) => p`<option value=${i.name}>${i.label}</option>`)}
|
|
2350
|
+
${e.some((i) => i.name === r.field) ? m : p`
|
|
2387
2351
|
<option value=${r.field}>(${r.field})</option>
|
|
2388
2352
|
`}
|
|
2389
2353
|
</mp-select>
|
|
@@ -2454,9 +2418,9 @@ class Ue extends L {
|
|
|
2454
2418
|
}
|
|
2455
2419
|
render() {
|
|
2456
2420
|
if (this.depth > this.effectiveMaxDepth())
|
|
2457
|
-
return
|
|
2421
|
+
return p`<div class="qb-too-deep" role="alert">Tree too deep</div>`;
|
|
2458
2422
|
const e = this.query;
|
|
2459
|
-
return e ?
|
|
2423
|
+
return e ? p`
|
|
2460
2424
|
<div
|
|
2461
2425
|
class="qb-root"
|
|
2462
2426
|
data-qb-root=${this._qbRootId}
|
|
@@ -2472,20 +2436,20 @@ class Ue extends L {
|
|
|
2472
2436
|
@qb-keyboard-move=${this._onKeyboardMove}
|
|
2473
2437
|
>
|
|
2474
2438
|
${this._renderToolbar()}
|
|
2475
|
-
${this.showSavedQueries && this.depth === 0 ? this._renderSavedPicker(this._messages()) :
|
|
2476
|
-
${this.showPreview && this.depth === 0 ?
|
|
2439
|
+
${this.showSavedQueries && this.depth === 0 ? this._renderSavedPicker(this._messages()) : m}
|
|
2440
|
+
${this.showPreview && this.depth === 0 ? p`<pre class="qb-preview">${this._renderPreview(e)}</pre>` : m}
|
|
2477
2441
|
${this.renderTreeRoot(e)}
|
|
2478
2442
|
</div>
|
|
2479
|
-
` :
|
|
2443
|
+
` : m;
|
|
2480
2444
|
}
|
|
2481
2445
|
_messages() {
|
|
2482
2446
|
const e = this._messagesConsumer.value ?? {};
|
|
2483
2447
|
return {
|
|
2484
|
-
...
|
|
2448
|
+
...f,
|
|
2485
2449
|
...e,
|
|
2486
2450
|
...this.messages ?? {},
|
|
2487
2451
|
operators: {
|
|
2488
|
-
...
|
|
2452
|
+
...f.operators,
|
|
2489
2453
|
...e.operators ?? {},
|
|
2490
2454
|
...this.messages?.operators ?? {}
|
|
2491
2455
|
}
|
|
@@ -2497,7 +2461,7 @@ class Ue extends L {
|
|
|
2497
2461
|
...this._messagesConsumer.value ?? {},
|
|
2498
2462
|
...this.messages ?? {}
|
|
2499
2463
|
};
|
|
2500
|
-
return
|
|
2464
|
+
return Ae(e, this.schema, {
|
|
2501
2465
|
messages: t,
|
|
2502
2466
|
rootEntity: this.rootEntity,
|
|
2503
2467
|
maxDepth: this.effectiveMaxDepth()
|
|
@@ -2507,69 +2471,57 @@ class Ue extends L {
|
|
|
2507
2471
|
}
|
|
2508
2472
|
}
|
|
2509
2473
|
renderTreeRoot(e) {
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
.currentEntity=${this.rootEntity}
|
|
2514
|
-
.depth=${this.depth}
|
|
2515
|
-
.isRoot=${!0}
|
|
2516
|
-
.qbRoot=${this._qbRootId}
|
|
2517
|
-
.isDragging=${this._isDragging}
|
|
2518
|
-
></mp-query-group>` : b`<mp-query-group
|
|
2519
|
-
.node=${{
|
|
2520
|
-
kind: "group",
|
|
2521
|
-
id: "synthetic-root",
|
|
2522
|
-
logic: "and",
|
|
2523
|
-
children: [e]
|
|
2524
|
-
}}
|
|
2474
|
+
const t = e.kind === "group" ? e : { kind: "group", id: "synthetic-root", logic: "and", children: [e] };
|
|
2475
|
+
return p`<mp-query-group
|
|
2476
|
+
.node=${t}
|
|
2525
2477
|
.schema=${this.schema}
|
|
2526
2478
|
.currentEntity=${this.rootEntity}
|
|
2527
2479
|
.depth=${this.depth}
|
|
2528
2480
|
.isRoot=${!0}
|
|
2529
2481
|
.qbRoot=${this._qbRootId}
|
|
2530
|
-
.isDragging=${this._isDragging}
|
|
2482
|
+
.isDragging=${this._isDragging || this.dragActive}
|
|
2531
2483
|
></mp-query-group>`;
|
|
2532
2484
|
}
|
|
2533
2485
|
}
|
|
2534
|
-
|
|
2535
|
-
typeof customElements < "u" && !customElements.get("mp-query-builder") && customElements.define("mp-query-builder",
|
|
2486
|
+
L("query-builder", Ne);
|
|
2487
|
+
typeof customElements < "u" && !customElements.get("mp-query-builder") && customElements.define("mp-query-builder", tt);
|
|
2536
2488
|
export {
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
|
|
2548
|
-
|
|
2549
|
-
|
|
2489
|
+
f as DEFAULT_MESSAGES,
|
|
2490
|
+
J as DEFAULT_OPERATOR_CATALOG,
|
|
2491
|
+
ne as MaxDepthExceededError,
|
|
2492
|
+
tt as MpQueryBuilderElement,
|
|
2493
|
+
Ke as MpQueryConditionElement,
|
|
2494
|
+
Je as MpQueryGroupElement,
|
|
2495
|
+
We as MpQuerySubqueryElement,
|
|
2496
|
+
B as addChild,
|
|
2497
|
+
_e as addEmptyConditionTo,
|
|
2498
|
+
$e as addEmptyGroupTo,
|
|
2499
|
+
Ee as addEmptySubqueryTo,
|
|
2500
|
+
Ce as changeConditionField,
|
|
2501
|
+
Se as changeConditionOperator,
|
|
2550
2502
|
G as cloneTree,
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2503
|
+
ee as collectDescendantIds,
|
|
2504
|
+
N as defaultValueFor,
|
|
2505
|
+
R as disabledContext,
|
|
2506
|
+
Q as editorRegistryContext,
|
|
2507
|
+
qe as emptyCondition,
|
|
2508
|
+
H as emptyGroup,
|
|
2509
|
+
we as emptySubquery,
|
|
2510
|
+
$ as findNodeById,
|
|
2511
|
+
S as mapTree,
|
|
2512
|
+
E as messagesContext,
|
|
2561
2513
|
j as moveNode,
|
|
2562
2514
|
C as newId,
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
|
|
2515
|
+
k as operatorsForType,
|
|
2516
|
+
Ne as queryBuilderLightStyles,
|
|
2517
|
+
Fe as queryConditionLightStyles,
|
|
2518
|
+
Oe as queryGroupLightStyles,
|
|
2519
|
+
ze as querySubqueryLightStyles,
|
|
2520
|
+
te as removeNode,
|
|
2521
|
+
Ae as renderExpression,
|
|
2522
|
+
ke as setGroupLogic,
|
|
2523
|
+
xe as updateCondition,
|
|
2524
|
+
lt as validateOperatorOverrides,
|
|
2525
|
+
q as valueShapeFor,
|
|
2526
|
+
ut as visitTree
|
|
2575
2527
|
};
|