@ryuzaki13/react-foundation-lib 1.1.12 → 1.1.13

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.
@@ -35,36 +35,36 @@ function c(e) {
35
35
  function l(e) {
36
36
  return c(e) ?? 0;
37
37
  }
38
- function u(e) {
38
+ function ee(e) {
39
39
  let t = c(e);
40
40
  return t ? t > 0 : !1;
41
41
  }
42
- function d(e) {
42
+ function u(e) {
43
43
  let t = c(e);
44
44
  if (!(t === void 0 || !Number.isInteger(t) || t <= 0)) return t;
45
45
  }
46
46
  //#endregion
47
47
  //#region src/odata-service/baseTypes.ts
48
- var f = Object.freeze([
48
+ var d = Object.freeze([
49
49
  "string",
50
50
  "number",
51
51
  "boolean",
52
52
  "date"
53
- ]), ee = new Set(f), te = Object.freeze({
53
+ ]), te = new Set(d), ne = Object.freeze({
54
54
  string: "строка",
55
55
  number: "число",
56
56
  boolean: "boolean",
57
57
  date: "дата"
58
58
  });
59
- function ne(e) {
60
- return typeof e == "string" && ee.has(e);
61
- }
62
59
  function re(e) {
63
- return te[e];
60
+ return typeof e == "string" && te.has(e);
61
+ }
62
+ function ie(e) {
63
+ return ne[e];
64
64
  }
65
65
  //#endregion
66
66
  //#region src/odata-service/schema.ts
67
- var p = {
67
+ var f = {
68
68
  string: a.string(),
69
69
  guid: a.uuid().or(a.string().regex(/^[0-9a-fA-F-]+$/, "Invalid GUID")),
70
70
  boolean: a.boolean(),
@@ -79,24 +79,24 @@ var p = {
79
79
  binary: a.string(),
80
80
  byte: a.number().int().min(0).max(255)
81
81
  };
82
- function m(e, t) {
82
+ function p(e, t) {
83
83
  return t.safeParse(e).success;
84
84
  }
85
- function ie(e) {
86
- return m(e, p.string);
87
- }
88
85
  function ae(e) {
89
- return m(e, p.float);
86
+ return p(e, f.string);
90
87
  }
91
88
  function oe(e) {
92
- return m(e, p.boolean);
89
+ return p(e, f.float);
93
90
  }
94
91
  function se(e) {
95
- return m(e, p.datetime);
92
+ return p(e, f.boolean);
93
+ }
94
+ function ce(e) {
95
+ return p(e, f.datetime);
96
96
  }
97
97
  //#endregion
98
98
  //#region src/odata-service/formatters.ts
99
- function h(e, t) {
99
+ function m(e, t) {
100
100
  switch (e) {
101
101
  case "string": return `'${String(t).replace(/'/g, "''")}'`;
102
102
  case "guid": return `guid'${String(t)}'`;
@@ -116,12 +116,12 @@ function h(e, t) {
116
116
  default: throw Error(`Неподдерживаемый тип: ${e}`);
117
117
  }
118
118
  }
119
- function g(e, t) {
120
- let n = p[e].safeParse(t);
119
+ function h(e, t) {
120
+ let n = f[e].safeParse(t);
121
121
  if (!n.success) throw Error(`Некорректное значение для типа '${e}': ${n.error.issues[0]?.message ?? t}`);
122
- return h(e, n.data);
122
+ return m(e, n.data);
123
123
  }
124
- function ce(e) {
124
+ function le(e) {
125
125
  if (typeof e == "boolean") return e;
126
126
  if (typeof e == "number") return e === 1 ? !0 : e === 0 ? !1 : void 0;
127
127
  if (typeof e != "string") return;
@@ -131,13 +131,13 @@ function ce(e) {
131
131
  if (t === "true" || t === "1") return !0;
132
132
  if (t === "false" || t === "0") return !1;
133
133
  }
134
- function le(e) {
134
+ function ue(e) {
135
135
  if (e == null) return !1;
136
136
  if (typeof e == "string" && (e === "X" || e === " " || e === "")) return o(e);
137
137
  }
138
- function ue(e, n) {
138
+ function de(e, n) {
139
139
  switch (e) {
140
- case "boolean": return ce(n) ?? n;
140
+ case "boolean": return le(n) ?? n;
141
141
  case "int":
142
142
  case "long":
143
143
  case "float":
@@ -150,14 +150,14 @@ function ue(e, n) {
150
150
  default: return String(n);
151
151
  }
152
152
  }
153
- function de(e, t) {
153
+ function fe(e, t) {
154
154
  if (e.abapBooleanLike) {
155
- let e = le(t);
155
+ let e = ue(t);
156
156
  if (e !== void 0) return e;
157
157
  }
158
- return ue(e.type, t);
158
+ return de(e.type, t);
159
159
  }
160
- function fe(e) {
160
+ function pe(e) {
161
161
  switch (e) {
162
162
  case "boolean": return !1;
163
163
  case "int":
@@ -172,7 +172,7 @@ function fe(e) {
172
172
  default: return "";
173
173
  }
174
174
  }
175
- function pe(e) {
175
+ function me(e) {
176
176
  switch (e) {
177
177
  case "boolean": return !1;
178
178
  case "number": return 0;
@@ -180,72 +180,72 @@ function pe(e) {
180
180
  default: return "";
181
181
  }
182
182
  }
183
- function _(e, t) {
183
+ function g(e, t) {
184
184
  return (...n) => {
185
185
  let r = e.safeParse(n);
186
186
  if (!r.success) throw Error(`Validation failed: ${r.error.message}`);
187
187
  return t(...r.data);
188
188
  };
189
189
  }
190
- function v(e) {
191
- return _(a.array(a.boolean()), e);
192
- }
193
- function me(e) {
194
- return _(a.array(a.string()), e);
190
+ function _(e) {
191
+ return g(a.array(a.boolean()), e);
195
192
  }
196
193
  function he(e) {
197
- return _(a.array(a.number()), e);
194
+ return g(a.array(a.string()), e);
198
195
  }
199
- function y(e) {
200
- return _(a.array(a.date()), e);
196
+ function ge(e) {
197
+ return g(a.array(a.number()), e);
201
198
  }
202
- var ge = y(r.datetime), _e = y(r.datetimeOffset), ve = y(r.time), ye = y((e) => h("string", n(e))), be = v((e) => h("boolean", e)), xe = v((e) => h("string", Number(e))), Se = v((e) => h("byte", Number(e))), Ce = me((e) => h("string", e)), b = {
199
+ function v(e) {
200
+ return g(a.array(a.date()), e);
201
+ }
202
+ var _e = v(r.datetime), ve = v(r.datetimeOffset), ye = v(r.time), be = v((e) => m("string", n(e))), xe = _((e) => m("boolean", e)), Se = _((e) => m("string", Number(e))), Ce = _((e) => m("byte", Number(e))), we = he((e) => m("string", e)), y = {
203
203
  date: {
204
204
  base: {
205
205
  label: "Базовый datetime",
206
206
  description: "Используется для параметров OData с типом данных datetime",
207
- fn: ge
207
+ fn: _e
208
208
  },
209
209
  datetimeOffset: {
210
210
  label: "Базовый datetimeoffset",
211
211
  description: "Используется для параметров OData с типом данных datetimeoffset",
212
- fn: _e
212
+ fn: ve
213
213
  },
214
214
  time: {
215
215
  label: "Базовый time",
216
216
  description: "Используется для параметров OData с типом данных time",
217
- fn: ve
217
+ fn: ye
218
218
  },
219
219
  stringAbapDate: {
220
220
  label: "Дата ABAP YYYYMMDD",
221
221
  description: "Используется для параметров OData с типом данных string(8)",
222
- fn: ye
222
+ fn: be
223
223
  }
224
224
  },
225
225
  boolean: {
226
226
  base: {
227
227
  label: "Базовое ABAP булево",
228
228
  description: "Стандартный формат abap_bool со значением 'X' для true и '' для false",
229
- fn: be
229
+ fn: xe
230
230
  },
231
231
  asChar: {
232
232
  label: "Как символ",
233
233
  description: "Преобразование булево в символы '0' или '1'",
234
- fn: xe
234
+ fn: Se
235
235
  },
236
236
  asByte: {
237
237
  label: "Как цифра",
238
238
  description: "Преобразование булево в цифру 0 или 1",
239
- fn: Se
239
+ fn: Ce
240
240
  }
241
241
  },
242
242
  string: { base: {
243
243
  label: "Базовая строка",
244
244
  description: "",
245
- fn: Ce
245
+ fn: we
246
246
  } }
247
247
  };
248
- function x(e) {
248
+ function b(e) {
249
249
  switch (e) {
250
250
  case "boolean": return "boolean";
251
251
  case "int":
@@ -260,80 +260,80 @@ function x(e) {
260
260
  default: return "string";
261
261
  }
262
262
  }
263
- function we(e) {
264
- let t = b[x(e)];
263
+ function Te(e) {
264
+ let t = y[b(e)];
265
265
  return t ? Object.entries(t).map(([e, t]) => ({
266
266
  id: e,
267
267
  ...t
268
268
  })) : [];
269
269
  }
270
- function Te(e) {
271
- let t = b[e];
270
+ function Ee(e) {
271
+ let t = y[e];
272
272
  return t ? Object.entries(t).map(([e, t]) => ({
273
273
  id: e,
274
274
  ...t
275
275
  })) : [];
276
276
  }
277
- function Ee(e, t) {
278
- return b[x(e)]?.[t];
279
- }
280
277
  function De(e, t) {
281
- return b[e]?.[t];
278
+ return y[b(e)]?.[t];
279
+ }
280
+ function Oe(e, t) {
281
+ return y[e]?.[t];
282
282
  }
283
283
  //#endregion
284
284
  //#region src/odata-service/builder.ts
285
- function Oe(e, t) {
285
+ function ke(e, t) {
286
286
  if (!t || typeof t != "number") return;
287
287
  let n = e.match(/^'(.*)'$/s);
288
288
  if (!n) throw Error(`Значение должно быть заключено в одинарные кавычки: ${e}`);
289
289
  let r = n[1];
290
290
  if (r.length > t) throw Error(`Значение слишком длинное для maxLength=${t}: '${e}' (${r.length} символов внутри кавычек)`);
291
291
  }
292
- function S(e, t) {
292
+ function x(e, t) {
293
293
  return e.parameters ? e.parameters.map((e) => {
294
294
  let { id: n, type: r, maxLength: i, mandatory: a } = e, o = t[n] ?? {}, s = o.value, c = o.formatter;
295
295
  if (a && s == null) throw Error(`Отсутствует обязательный параметр: ${n}`);
296
296
  if (s == null) return null;
297
297
  try {
298
- let e = c ? c(s) : g(r, s);
299
- return Oe(e, i), [n, e];
298
+ let e = c ? c(s) : h(r, s);
299
+ return ke(e, i), [n, e];
300
300
  } catch (e) {
301
301
  throw Error(`Ошибка форматирования параметра ${n}: ${String(e)}`);
302
302
  }
303
303
  }).filter((e) => e !== null) : [];
304
304
  }
305
- function C(e, t) {
306
- let n = S(e, t);
305
+ function S(e, t) {
306
+ let n = x(e, t);
307
307
  return n.length ? `(${n.map(([e, t]) => `${e}=${encodeURIComponent(t)}`).join(",")})` : "";
308
308
  }
309
- function w(e, t) {
309
+ function C(e, t) {
310
310
  let n = new URLSearchParams();
311
- for (let [r, i] of S(e, t)) n.set(r, i);
311
+ for (let [r, i] of x(e, t)) n.set(r, i);
312
312
  return n;
313
313
  }
314
- function ke(e, t, n, r) {
314
+ function Ae(e, t, n, r) {
315
315
  let i = `/${t.service}/${t.target}`;
316
- return r === "create" ? i : r === "query" ? e.result ? T(e, t, n) : (__DEV__ && Object.keys(n).length > 0 && console.warn(`Параметры для query-запроса '/${t.service}/${t.target}' проигнорированы: target не поддерживает parameterized query.`), i) : `${i}${C(e, n)}`;
316
+ return r === "create" ? i : r === "query" ? e.result ? w(e, t, n) : (__DEV__ && Object.keys(n).length > 0 && console.warn(`Параметры для query-запроса '/${t.service}/${t.target}' проигнорированы: target не поддерживает parameterized query.`), i) : `${i}${S(e, n)}`;
317
317
  }
318
- function Ae(e, t, n) {
319
- let r = w(e, n).toString(), i = `/${t.service}/${t.target}`;
318
+ function je(e, t, n) {
319
+ let r = C(e, n).toString(), i = `/${t.service}/${t.target}`;
320
320
  return r ? `${i}?${r}` : i;
321
321
  }
322
- function T(e, t, n) {
323
- let r = C(e, n), i = e.result ? `/${e.result}` : "";
322
+ function w(e, t, n) {
323
+ let r = S(e, n), i = e.result ? `/${e.result}` : "";
324
324
  return `/${t.service}/${t.target}${r}${i}`;
325
325
  }
326
326
  //#endregion
327
327
  //#region src/odata-service/columns.ts
328
- function E(e) {
328
+ function T(e) {
329
329
  return e.filter((e) => e.semanticType === "code" && e.filterable);
330
330
  }
331
- function je(e) {
332
- return new Set(E(e).map((e) => e.id));
331
+ function Me(e) {
332
+ return new Set(T(e).map((e) => e.id));
333
333
  }
334
334
  //#endregion
335
335
  //#region src/odata-service/filters.ts
336
- var Me = Object.freeze({
336
+ var Ne = Object.freeze({
337
337
  eq: "eq",
338
338
  ne: "ne",
339
339
  gt: "gt",
@@ -343,7 +343,7 @@ var Me = Object.freeze({
343
343
  startswith: "startswith",
344
344
  endswith: "endswith",
345
345
  contains: "contains"
346
- }), Ne = Object.freeze(Object.values(Me)), Pe = Object.freeze({
346
+ }), Pe = Object.freeze(Object.values(Ne)), Fe = Object.freeze({
347
347
  eq: "равно",
348
348
  ne: "не равно",
349
349
  gt: "больше",
@@ -353,14 +353,14 @@ var Me = Object.freeze({
353
353
  startswith: "начинается с",
354
354
  endswith: "заканчивается на",
355
355
  contains: "содержит"
356
- }), Fe = new Set(Ne);
357
- function Ie(e) {
358
- return typeof e == "string" && Fe.has(e);
359
- }
356
+ }), Ie = new Set(Pe);
360
357
  function Le(e) {
361
- return Pe[e];
358
+ return typeof e == "string" && Ie.has(e);
362
359
  }
363
360
  function Re(e) {
361
+ return Fe[e];
362
+ }
363
+ function ze(e) {
364
364
  switch (typeof e) {
365
365
  case "bigint":
366
366
  case "number": return "int";
@@ -369,17 +369,17 @@ function Re(e) {
369
369
  }
370
370
  return "string";
371
371
  }
372
- function D(e) {
373
- let { key: t, operation: n = "eq", value: r, type: i } = e, a = g(i ?? Re(r), r);
372
+ function E(e) {
373
+ let { key: t, operation: n = "eq", value: r, type: i } = e, a = h(i ?? ze(r), r);
374
374
  return n === "contains" ? `substringof(${a},${String(t)})` : n === "startswith" || n === "endswith" ? `${n}(${String(t)}, ${a})` : `${String(t)} ${n} ${a}`;
375
375
  }
376
- function O(e) {
376
+ function Be(e) {
377
377
  return "conditions" in e && e.conditions !== void 0;
378
378
  }
379
- function k(e) {
379
+ function Ve(e) {
380
380
  return "filters" in e && e.filters !== void 0;
381
381
  }
382
- function ze(e, t) {
382
+ function He(e, t) {
383
383
  let n = [];
384
384
  for (let r of e) {
385
385
  let e = t(r);
@@ -387,46 +387,46 @@ function ze(e, t) {
387
387
  }
388
388
  return n;
389
389
  }
390
- function A(e) {
390
+ function D(e) {
391
391
  if (!e) return "";
392
- if (O(e)) {
392
+ if (Be(e)) {
393
393
  let { conditions: t, and: n = !1 } = e;
394
394
  if (t.length === 0) return "";
395
- if (t.length === 1) return D(t[0]);
395
+ if (t.length === 1) return E(t[0]);
396
396
  let r = n ? "and" : "or";
397
- return `(${t.map(D).join(` ${r} `)})`;
397
+ return `(${t.map(E).join(` ${r} `)})`;
398
398
  }
399
- if (k(e)) {
399
+ if (Ve(e)) {
400
400
  let { filters: t, and: n = !1 } = e;
401
401
  if (t.length === 0) return "";
402
- if (t.length === 1) return A(t[0]);
403
- let r = n ? "and" : "or", i = ze(t, A);
402
+ if (t.length === 1) return D(t[0]);
403
+ let r = n ? "and" : "or", i = He(t, D);
404
404
  return i.length === 0 ? "" : i.length === 1 ? i[0] : `(${i.join(` ${r} `)})`;
405
405
  }
406
406
  throw Error("Некорректное выражение фильтра");
407
407
  }
408
- function Be(e) {
408
+ function Ue(e) {
409
409
  let t = (e) => {
410
410
  if (!e) return "";
411
- if (O(e)) {
411
+ if (Be(e)) {
412
412
  let { conditions: t, and: n = !1 } = e;
413
413
  if (t.length === 0) return "";
414
- if (t.length === 1) return D(t[0]);
414
+ if (t.length === 1) return E(t[0]);
415
415
  let r = n ? "and" : "or";
416
- return `(${t.map(D).join(` ${r} `)})`;
416
+ return `(${t.map(E).join(` ${r} `)})`;
417
417
  }
418
- if (k(e)) {
418
+ if (Ve(e)) {
419
419
  let { filters: n, and: r = !1 } = e;
420
420
  if (n.length === 0) return "";
421
421
  if (n.length === 1) return t(n[0]);
422
- let i = r ? "and" : "or", a = ze(n, t).map((e) => e.includes(" ") ? `(${e})` : e);
422
+ let i = r ? "and" : "or", a = He(n, t).map((e) => e.includes(" ") ? `(${e})` : e);
423
423
  return a.length === 0 ? "" : a.length === 1 ? a[0] : `(${a.join(` ${i} `)})`;
424
424
  }
425
425
  return "";
426
426
  };
427
427
  return t(e);
428
428
  }
429
- function j(e, t, n) {
429
+ function O(e, t, n) {
430
430
  if (t == null) return { conditions: [] };
431
431
  if (Array.isArray(t)) {
432
432
  let r = [];
@@ -443,7 +443,7 @@ function j(e, t, n) {
443
443
  operation: n
444
444
  }] };
445
445
  }
446
- function Ve(e, t) {
446
+ function We(e, t) {
447
447
  if (!t) return { conditions: [] };
448
448
  let n = t[0], r = t[1];
449
449
  return n == null || r == null ? n ? { conditions: [{
@@ -467,16 +467,16 @@ function Ve(e, t) {
467
467
  }]
468
468
  };
469
469
  }
470
- function M(e, t) {
471
- return j(e, t, "eq");
470
+ function k(e, t) {
471
+ return O(e, t, "eq");
472
472
  }
473
- function He(e, t) {
474
- return j(e, Array.isArray(t) ? t.map((e) => e || null) : t || null, "eq");
473
+ function Ge(e, t) {
474
+ return O(e, Array.isArray(t) ? t.map((e) => e || null) : t || null, "eq");
475
475
  }
476
- function Ue(e, t) {
477
- return j(e, t, "contains");
476
+ function Ke(e, t) {
477
+ return O(e, t, "contains");
478
478
  }
479
- function We(e, t) {
479
+ function qe(e, t) {
480
480
  return e ? t ? {
481
481
  and: !0,
482
482
  filters: [e, t]
@@ -484,30 +484,36 @@ function We(e, t) {
484
484
  }
485
485
  //#endregion
486
486
  //#region src/odata-service/filterDefinitions.ts
487
- function Ge(e) {
487
+ function Je(e) {
488
488
  return e === "select" || e === "multi-select" || e === "checkbox" || e === "text-input" || e === "number-input";
489
489
  }
490
- function N(e, t) {
490
+ function A(e, t) {
491
491
  return e?.conditions.length ? e.conditions.map((e) => e.columnId?.trim() || t).filter((e) => !!e) : [];
492
492
  }
493
- function Ke(e, t) {
494
- let n = e.kind === "list" ? e.options.flatMap((e) => N(e.filter, t)) : e.kind === "boolean" ? N(e.trueFilter, t) : N(e.valueFilter, t);
495
- return [...new Set(n.length ? n : [t])];
493
+ function j(e, t) {
494
+ let n = e.kind === "list" ? e.options.flatMap((e) => A(e.filter, t)) : e.kind === "boolean" ? A(e.trueFilter, t) : A(e.valueFilter, t);
495
+ return [...new Set(n.length ? n : t ? [t] : [])];
496
496
  }
497
- function P(e, t) {
498
- let n = N(e, t);
499
- return n.length ? n : [t];
497
+ function M(e, t) {
498
+ let n = A(e, t);
499
+ return n.length ? n : t ? [t] : [];
500
500
  }
501
- function qe(e, t) {
502
- if (e.componentId === "multi-select") return R(t) ?? [];
501
+ function Ye(e) {
502
+ return e.kind === "registered" ? e.valueMode === "multiple" : e.componentId === "multi-select";
503
+ }
504
+ function Xe(e) {
505
+ return Array.isArray(e) ? [...new Set(e.filter((e) => typeof e == "string").map((e) => e.trim()))] : [];
506
+ }
507
+ function N(e, t) {
508
+ if (Ye(e)) return Xe(t);
503
509
  let n = F(t);
504
- return typeof n == "string" && n ? [n] : [];
510
+ return typeof n == "string" ? [n] : [];
505
511
  }
506
- function Je(e) {
512
+ function Ze(e) {
507
513
  let t = H([e])[0];
508
- return t ? t.kind === "segment" || t.kind === "column" || t.kind === "advanced" ? [t.ownerColumnId] : [...t.columnIds] : [];
514
+ return t ? t.kind === "registered" ? [...t.columnIds] : t.kind === "segment" || t.kind === "column" || t.kind === "advanced" ? [t.ownerColumnId] : [...t.columnIds] : [];
509
515
  }
510
- function Ye(e, t) {
516
+ function Qe(e, t) {
511
517
  let n = H([e])[0], r = U(t);
512
518
  if (!n || r === void 0) return [];
513
519
  switch (n.kind) {
@@ -520,17 +526,29 @@ function Ye(e, t) {
520
526
  }
521
527
  case "local":
522
528
  if (n.binding.kind === "list") {
523
- let e = qe(n, r);
529
+ let e = N(n, r);
524
530
  return [...new Set(e.flatMap((e) => {
525
531
  let t = n.binding.kind === "list" ? n.binding.options.find((t) => t.key === e) : void 0;
526
- return t ? P(t.filter, n.ownerColumnId) : [];
532
+ return t ? M(t.filter, n.ownerColumnId) : [];
533
+ }))];
534
+ }
535
+ return n.binding.kind === "boolean" ? r === !0 ? M(n.binding.trueFilter, n.ownerColumnId) : [] : M(n.binding.valueFilter, n.ownerColumnId);
536
+ case "registered": {
537
+ let e = n.binding;
538
+ if (!e) return [];
539
+ if (e.kind === "list") {
540
+ let t = N(n, r);
541
+ return [...new Set(t.flatMap((t) => {
542
+ let n = e.options.find((e) => e.key === t);
543
+ return n ? M(n.filter, "") : [];
527
544
  }))];
528
545
  }
529
- return n.binding.kind === "boolean" ? r === !0 ? P(n.binding.trueFilter, n.ownerColumnId) : [] : P(n.binding.valueFilter, n.ownerColumnId);
546
+ return e.kind === "boolean" ? r === !0 ? M(e.trueFilter, "") : [] : M(e.valueFilter, "");
547
+ }
530
548
  default: return [];
531
549
  }
532
550
  }
533
- function Xe(e, t) {
551
+ function P(e, t) {
534
552
  let n = e?.trim();
535
553
  return n && n !== t ? n : void 0;
536
554
  }
@@ -593,10 +611,13 @@ function V(e) {
593
611
  filter: B(n.filter)
594
612
  });
595
613
  }
596
- return t.length ? {
614
+ if (!t.length) return;
615
+ let n = e.and === !0 ? !0 : e.and === !1 ? !1 : void 0;
616
+ return {
597
617
  kind: "list",
618
+ ...n === void 0 ? {} : { and: n },
598
619
  options: t
599
- } : void 0;
620
+ };
600
621
  }
601
622
  return e.kind === "boolean" ? {
602
623
  kind: "boolean",
@@ -611,57 +632,72 @@ function H(e) {
611
632
  if (!e?.length) return [];
612
633
  let t = [];
613
634
  for (let n of e) {
614
- let e = n.id.trim(), r = n.ownerColumnId.trim();
615
- if (!e || !r) continue;
616
- let i = { ...n };
617
- switch (i.kind === "odata-segment" && (i.kind = "segment"), i.kind === "odata-tree" && (i.kind = "tree"), i.kind) {
635
+ let e = n.id.trim();
636
+ if (!e) continue;
637
+ let r = { ...n };
638
+ if (r.kind === "odata-segment" && (r.kind = "segment"), r.kind === "odata-tree" && (r.kind = "tree"), r.kind === "registered") {
639
+ let n = r.componentId.trim(), i = r.valueMode;
640
+ if (!n || i !== "single" && i !== "multiple") continue;
641
+ let a = V(r.binding);
642
+ t.push({
643
+ ...r,
644
+ id: e,
645
+ componentId: n,
646
+ valueMode: i,
647
+ columnIds: a ? j(a, "") : [],
648
+ binding: a
649
+ });
650
+ continue;
651
+ }
652
+ let i = r.ownerColumnId.trim();
653
+ if (i) switch (r.kind) {
618
654
  case "segment":
619
655
  t.push({
620
- ...i,
656
+ ...r,
621
657
  id: e,
622
- ownerColumnId: r,
623
- columnIds: [r],
624
- componentId: i.componentId === "select" ? "select" : "multi-select",
625
- dictionaryCodeKey: Xe(i.dictionaryCodeKey, r)
658
+ ownerColumnId: i,
659
+ columnIds: [i],
660
+ componentId: r.componentId === "select" ? "select" : "multi-select",
661
+ dictionaryCodeKey: P(r.dictionaryCodeKey, i)
626
662
  });
627
663
  break;
628
664
  case "tree": {
629
- let n = [...new Set(i.columnIds.map((e) => e.trim()).filter(Boolean))];
665
+ let n = [...new Set(r.columnIds.map((e) => e.trim()).filter(Boolean))];
630
666
  if (n.length < 2) break;
631
- let a = i.componentId, o = a === "treeSelect" || a === "tree-select" ? "tree-select" : "tree-multi-select";
667
+ let a = r.componentId, o = a === "treeSelect" || a === "tree-select" ? "tree-select" : "tree-multi-select";
632
668
  t.push({
633
- ...i,
669
+ ...r,
634
670
  id: e,
635
- ownerColumnId: n.includes(r) ? r : n[0],
671
+ ownerColumnId: n.includes(i) ? i : n[0],
636
672
  columnIds: n,
637
673
  componentId: o
638
674
  });
639
675
  break;
640
676
  }
641
677
  case "local": {
642
- let n = V(i.binding);
678
+ let n = V(r.binding);
643
679
  if (!n) break;
644
680
  t.push({
645
- ...i,
681
+ ...r,
646
682
  id: e,
647
- ownerColumnId: r,
648
- columnIds: Ke(n, r),
683
+ ownerColumnId: i,
684
+ columnIds: j(n, i),
649
685
  binding: n
650
686
  });
651
687
  break;
652
688
  }
653
689
  case "advanced":
654
690
  t.push({
655
- ...i,
691
+ ...r,
656
692
  id: e,
657
- ownerColumnId: r
693
+ ownerColumnId: i
658
694
  });
659
695
  break;
660
696
  case "column":
661
697
  t.push({
662
- ...i,
698
+ ...r,
663
699
  id: e,
664
- ownerColumnId: r
700
+ ownerColumnId: i
665
701
  });
666
702
  break;
667
703
  default:
@@ -685,11 +721,11 @@ function W(e) {
685
721
  }
686
722
  return t;
687
723
  }
688
- function Ze(e, t, n) {
724
+ function $e(e, t, n) {
689
725
  let r = { ...W(e) }, i = U(n);
690
726
  return i === void 0 ? (delete r[t], r) : (r[t] = i, r);
691
727
  }
692
- function Qe(e, t, n) {
728
+ function et(e, t, n) {
693
729
  if (!e || Object.keys(e).length === 0) return {};
694
730
  let r = {}, i = {};
695
731
  for (let [e, t] of Object.entries(n)) for (let n of t) i[n.codeKey] = e;
@@ -714,61 +750,61 @@ function Qe(e, t, n) {
714
750
  }
715
751
  return r;
716
752
  }
717
- function $e(e, t) {
753
+ function tt(e, t) {
718
754
  return F(t);
719
755
  }
720
- function et(e, t, n) {
721
- let r = $e(t.valueSource, t.valueSource === "input" ? n : t.value);
722
- if (r !== void 0) return {
723
- key: t.columnId?.trim() || e,
756
+ function nt(e, t, n) {
757
+ let r = tt(t.valueSource, t.valueSource === "input" ? n : t.value);
758
+ if (r === void 0) return;
759
+ let i = t.columnId?.trim() || e;
760
+ if (i) return {
761
+ key: i,
724
762
  operation: t.operation,
725
763
  value: r
726
764
  };
727
765
  }
728
766
  function G(e, t, n) {
729
767
  if (!t?.conditions.length) return;
730
- let r = t.conditions.map((t) => et(e, t, n)).filter((e) => !!e);
768
+ let r = t.conditions.map((t) => nt(e, t, n)).filter((e) => !!e);
731
769
  if (r.length) return {
732
770
  and: t.and === !1 ? void 0 : !0,
733
771
  conditions: r
734
772
  };
735
773
  }
736
- function tt(e) {
737
- return M(e, !0);
774
+ function rt(e) {
775
+ return k(e, !0);
738
776
  }
739
777
  function K(e, t) {
740
- return M(e, t);
778
+ return k(e, t);
741
779
  }
742
- function nt(e, t) {
780
+ function it(e, t) {
743
781
  let n = z(t);
744
782
  if (!n) return;
745
783
  let r = e.columnIds.map((e) => {
746
784
  let t = n[e];
747
- if (t?.length) return M(e, t);
785
+ if (t?.length) return k(e, t);
748
786
  }).filter((e) => !!e);
749
787
  if (r.length) return r.length === 1 ? r[0] : {
750
788
  and: !0,
751
789
  filters: r
752
790
  };
753
791
  }
754
- function rt(e, t) {
755
- if (e.binding.kind !== "list") return;
756
- let n = e.binding;
757
- if (e.componentId === "multi-select") {
758
- let r = R(t);
759
- if (!r?.length) return;
760
- let i = r.map((t) => {
761
- let r = n.options.find((e) => e.key === t);
762
- if (r) return G(e.ownerColumnId, r.filter) ?? K(e.ownerColumnId, r.key);
763
- }).filter((e) => !!e);
764
- return i.length ? i.length === 1 ? i[0] : { filters: i } : void 0;
765
- }
766
- let r = F(t);
767
- if (typeof r != "string" || !r) return;
768
- let i = n.options.find((e) => e.key === r);
769
- if (i) return G(e.ownerColumnId, i.filter) ?? K(e.ownerColumnId, i.key);
792
+ function at(e, t) {
793
+ if (!e.binding || e.binding.kind !== "list") return;
794
+ let n = e.binding, r = N(e, t);
795
+ if (!r.length) return;
796
+ let i = e.kind === "local" ? e.ownerColumnId : "", a = r.map((t) => {
797
+ let r = n.options.find((e) => e.key === t);
798
+ if (!r) return;
799
+ let a = G(i, r.filter);
800
+ return a || e.kind === "registered" ? a : K(e.ownerColumnId, r.key);
801
+ }).filter((e) => !!e);
802
+ if (a.length) return a.length === 1 ? a[0] : {
803
+ and: n.and === !0 ? !0 : void 0,
804
+ filters: a
805
+ };
770
806
  }
771
- function it(e, t) {
807
+ function ot(e, t) {
772
808
  if (t !== void 0) switch (e.kind) {
773
809
  case "segment": {
774
810
  if (e.componentId === "select") {
@@ -778,11 +814,12 @@ function it(e, t) {
778
814
  let n = L(t);
779
815
  return n?.length ? K(e.ownerColumnId, n) : void 0;
780
816
  }
781
- case "tree": return nt(e, t);
782
- case "local": return e.binding.kind === "list" ? rt(e, t) : e.binding.kind === "boolean" ? t === !0 ? G(e.ownerColumnId, e.binding.trueFilter) ?? tt(e.ownerColumnId) : void 0 : G(e.ownerColumnId, e.binding.valueFilter, t) ?? (() => {
817
+ case "tree": return it(e, t);
818
+ case "local": return e.binding.kind === "list" ? at(e, t) : e.binding.kind === "boolean" ? t === !0 ? G(e.ownerColumnId, e.binding.trueFilter) ?? rt(e.ownerColumnId) : void 0 : G(e.ownerColumnId, e.binding.valueFilter, t) ?? (() => {
783
819
  let n = F(t), r = L(t), i = n ?? r;
784
820
  return i === void 0 ? void 0 : K(e.ownerColumnId, i);
785
821
  })();
822
+ case "registered": return e.binding ? e.binding.kind === "list" ? at(e, t) : e.binding.kind === "boolean" ? t === !0 ? G("", e.binding.trueFilter) : void 0 : G("", e.binding.valueFilter, t) : void 0;
786
823
  case "column": {
787
824
  let n = F(t), r = L(t), i = n ?? r;
788
825
  return i === void 0 ? void 0 : K(e.ownerColumnId, i);
@@ -794,16 +831,16 @@ function it(e, t) {
794
831
  default:
795
832
  }
796
833
  }
797
- function at(e, t) {
834
+ function st(e, t) {
798
835
  let n = H(e), r = W(t);
799
836
  if (!n.length || !Object.keys(r).length) return;
800
- let i = n.map((e) => it(e, r[e.id])).filter((e) => !!e);
837
+ let i = n.map((e) => ot(e, r[e.id])).filter((e) => !!e);
801
838
  if (i.length) return i.length === 1 ? i[0] : {
802
839
  and: !0,
803
840
  filters: i
804
841
  };
805
842
  }
806
- function ot(e, t) {
843
+ function ct(e, t) {
807
844
  let n = H(e), r = W(t), i = {};
808
845
  for (let e of n) {
809
846
  if (e.kind !== "segment" && e.kind !== "tree") continue;
@@ -822,21 +859,21 @@ function ot(e, t) {
822
859
  }
823
860
  //#endregion
824
861
  //#region src/odata-service/parser.ts
825
- var st = /^(.+)(_txt|_text|_t)$/i, q = /* @__PURE__ */ new Set(["ZDIV", "ZCFO1"]);
826
- function ct(e) {
862
+ var lt = /^(.+)(_txt|_text|_t)$/i, q = /* @__PURE__ */ new Set(["ZDIV", "ZCFO1"]);
863
+ function ut(e) {
827
864
  return e.label || e.id;
828
865
  }
829
- function lt(e) {
866
+ function dt(e) {
830
867
  return e ? q.has(e.toUpperCase()) : !1;
831
868
  }
832
- function ut(e) {
869
+ function ft(e) {
833
870
  if (!e) return !1;
834
871
  let t = e.toUpperCase();
835
872
  if (q.has(t)) return !0;
836
873
  let n = t.match(/^(.+)(_TXT|_TEXT|_T)$/);
837
874
  return n ? q.has(n[1]) : !1;
838
875
  }
839
- function dt(e) {
876
+ function pt(e) {
840
877
  return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
841
878
  }
842
879
  function J(e) {
@@ -845,13 +882,13 @@ function J(e) {
845
882
  function Y(e, t) {
846
883
  if (t) return e[t.toUpperCase()];
847
884
  }
848
- function ft(e, t, n) {
885
+ function mt(e, t, n) {
849
886
  let r = Y(n, e);
850
887
  if (!r) return;
851
- let i = RegExp(`^${dt(r)}(_txt|_text|_t)$`, "i");
888
+ let i = RegExp(`^${pt(r)}(_txt|_text|_t)$`, "i");
852
889
  for (let e of t) if (i.test(e.id)) return e.id;
853
890
  }
854
- function pt(e) {
891
+ function ht(e) {
855
892
  let t = {}, n = {};
856
893
  for (let r of e) t[r.id] = r, n[r.id.toUpperCase()] = r.id;
857
894
  for (let t of e) {
@@ -859,7 +896,7 @@ function pt(e) {
859
896
  t.semanticType = "none", t.linkedColumnId = void 0;
860
897
  continue;
861
898
  }
862
- t.role = "dimension", t.sortable = !0, t.filterable = !0, t.semanticType = st.test(t.id) ? "text" : "code";
899
+ t.role = "dimension", t.sortable = !0, t.filterable = !0, t.semanticType = lt.test(t.id) ? "text" : "code";
863
900
  let e = Y(n, t.linkedColumnId);
864
901
  t.linkedColumnId = e && e !== t.id ? e : void 0;
865
902
  }
@@ -870,7 +907,7 @@ function pt(e) {
870
907
  let e = t[i];
871
908
  !e || e.role !== "dimension" ? i = void 0 : e.semanticType = "text";
872
909
  }
873
- if (i ||= ft(r.id, e, n), !i && lt(r.id) && (i = ft(r.id, e, n)), r.linkedColumnId = i, i) {
910
+ if (i ||= mt(r.id, e, n), !i && dt(r.id) && (i = mt(r.id, e, n)), r.linkedColumnId = i, i) {
874
911
  let e = t[i];
875
912
  e && e.role === "dimension" && (e.semanticType = "text", e.linkedColumnId = r.id);
876
913
  }
@@ -883,7 +920,7 @@ function pt(e) {
883
920
  !n || n.role !== "dimension" ? e = void 0 : n.semanticType = "code";
884
921
  }
885
922
  if (!e) {
886
- let i = Y(n, r.id.match(st)?.[1]);
923
+ let i = Y(n, r.id.match(lt)?.[1]);
887
924
  i && t[i]?.role === "dimension" && (e = i);
888
925
  }
889
926
  if (r.linkedColumnId = e, e) {
@@ -893,7 +930,7 @@ function pt(e) {
893
930
  }
894
931
  return e;
895
932
  }
896
- function mt(e) {
933
+ function gt(e) {
897
934
  switch (e) {
898
935
  case "Edm.String": return "string";
899
936
  case "Edm.Guid": return "guid";
@@ -913,7 +950,7 @@ function mt(e) {
913
950
  }
914
951
  }
915
952
  function X(e) {
916
- let t = e.getAttribute("Name"), n = e.getAttribute("Type") || "", r = mt(n), i = e.hasAttribute("MaxLength") ? Number(e.getAttribute("MaxLength")) : void 0, a = e.hasAttribute("Precision") ? Number(e.getAttribute("Precision")) : void 0, o = e.hasAttribute("Scale") ? Number(e.getAttribute("Scale")) : void 0, s = e.getAttribute("sap:label") || void 0, c = e.getAttribute("sap:parameter") || void 0, l = e.getAttribute("Nullable") === "false" ? void 0 : !0;
953
+ let t = e.getAttribute("Name"), n = e.getAttribute("Type") || "", r = gt(n), i = e.hasAttribute("MaxLength") ? Number(e.getAttribute("MaxLength")) : void 0, a = e.hasAttribute("Precision") ? Number(e.getAttribute("Precision")) : void 0, o = e.hasAttribute("Scale") ? Number(e.getAttribute("Scale")) : void 0, s = e.getAttribute("sap:label") || void 0, c = e.getAttribute("sap:parameter") || void 0, l = e.getAttribute("Nullable") === "false" ? void 0 : !0;
917
954
  return {
918
955
  id: t,
919
956
  label: s ?? t,
@@ -928,7 +965,7 @@ function X(e) {
928
965
  ...c === "mandatory" && { mandatory: !0 }
929
966
  };
930
967
  }
931
- function ht(e) {
968
+ function _t(e) {
932
969
  let t = X(e), n = e.getAttribute("sap:text") || void 0, r = e.getAttribute("sap:sortable") !== "false", i = e.getAttribute("sap:filterable") !== "false", a = e.getAttribute("sap:aggregation-role") === "measure" ? "measure" : "dimension", o = e.getAttribute("sap:label") || void 0, { nullable: s, mandatory: c, ...l } = t;
933
970
  return {
934
971
  ...l,
@@ -940,42 +977,42 @@ function ht(e) {
940
977
  role: a
941
978
  };
942
979
  }
943
- function gt(e) {
980
+ function vt(e) {
944
981
  let t = e.getAttribute("Name"), n = e.getAttribute("Type") || "";
945
982
  return !t || !J(n) ? !1 : !(["CNT", "cnt"].includes(t) || /_F$/i.test(t));
946
983
  }
947
- function _t(e) {
984
+ function yt(e) {
948
985
  let t = e.getAttribute("Name"), n = e.getAttribute("Type") || "";
949
986
  return !t || !J(n) ? !1 : !(["CNT", "cnt"].includes(t) || /_F$/i.test(t));
950
987
  }
951
988
  function Z(e) {
952
989
  return Array.from(e.getElementsByTagName("Property"));
953
990
  }
954
- function vt(e) {
991
+ function bt(e) {
955
992
  return Array.from(e.getElementsByTagName("PropertyRef"));
956
993
  }
957
- function yt(e) {
994
+ function xt(e) {
958
995
  return Array.from(e.getElementsByTagName("NavigationProperty"));
959
996
  }
960
- function bt(e) {
961
- return Z(e).filter(gt).map(X);
997
+ function St(e) {
998
+ return Z(e).filter(vt).map(X);
962
999
  }
963
- function xt(e) {
964
- let t = Z(e).filter(gt), n = vt(e);
1000
+ function Ct(e) {
1001
+ let t = Z(e).filter(vt), n = bt(e);
965
1002
  return t.map((e) => {
966
1003
  let t = X(e);
967
1004
  return n.find((e) => e.getAttribute("Name") === t.id) && (t.mandatory = !0), t;
968
1005
  });
969
1006
  }
970
- function St(e) {
971
- return pt(Z(e).filter(_t).map(ht));
1007
+ function wt(e) {
1008
+ return ht(Z(e).filter(yt).map(_t));
972
1009
  }
973
1010
  function Q(e) {
974
1011
  if (!e) return;
975
1012
  let t = e.split(".");
976
1013
  return t[t.length - 1] || void 0;
977
1014
  }
978
- function Ct(e) {
1015
+ function Tt(e) {
979
1016
  let t = e.getAttribute("Mode");
980
1017
  if (t && t !== "In") {
981
1018
  let n = e.getAttribute("Name") || "(unknown)";
@@ -989,19 +1026,19 @@ function Ct(e) {
989
1026
  let r = X(e);
990
1027
  return e.getAttribute("Nullable") === "false" && (r.mandatory = !0), r;
991
1028
  }
992
- function wt(e) {
1029
+ function Et(e) {
993
1030
  return e.reduce((e, t) => {
994
1031
  let n = t.getAttribute("Name");
995
1032
  return n && (e[n] = t), e;
996
1033
  }, {});
997
1034
  }
998
- function Tt(e) {
1035
+ function Dt(e) {
999
1036
  return Array.from(e.getElementsByTagName("EntitySet")).reduce((e, t) => {
1000
1037
  let n = t.getAttribute("Name"), r = Q(t.getAttribute("EntityType"));
1001
1038
  return !n || !r || (e[n] = r), e;
1002
1039
  }, {});
1003
1040
  }
1004
- function Et(e) {
1041
+ function Ot(e) {
1005
1042
  return Array.from(e.getElementsByTagName("AssociationSet")).reduce((e, t) => {
1006
1043
  let n = t.getAttribute("Association");
1007
1044
  if (!n) return e;
@@ -1017,8 +1054,8 @@ function Et(e) {
1017
1054
  return i && (e[i] = r), e;
1018
1055
  }, {});
1019
1056
  }
1020
- function Dt(e, t) {
1021
- for (let n of yt(e)) {
1057
+ function kt(e, t) {
1058
+ for (let n of xt(e)) {
1022
1059
  let e = n.getAttribute("Name");
1023
1060
  if (e !== "Set" && e !== "Results") continue;
1024
1061
  let r = n.getAttribute("Relationship"), i = r ? t[r] : void 0, a = n.getAttribute("ToRole"), o = n.getAttribute("FromRole"), s = i?.ends.find((e) => e.role === a)?.entitySet;
@@ -1028,34 +1065,34 @@ function Dt(e, t) {
1028
1065
  };
1029
1066
  }
1030
1067
  }
1031
- function Ot(e, t, n) {
1068
+ function At(e, t, n) {
1032
1069
  let r = /* @__PURE__ */ new Set();
1033
1070
  for (let [i, a] of Object.entries(e)) {
1034
1071
  let e = t[a];
1035
1072
  if (!e) continue;
1036
- let o = Dt(e, n);
1073
+ let o = kt(e, n);
1037
1074
  o?.targetEntitySet && o.targetEntitySet !== i && r.add(o.targetEntitySet);
1038
1075
  }
1039
1076
  return r;
1040
1077
  }
1041
- function kt(e, t, n, r) {
1078
+ function jt(e, t, n, r) {
1042
1079
  let i = t?.targetEntitySet ? n[t.targetEntitySet] : void 0;
1043
1080
  return i && r[i] || e;
1044
1081
  }
1045
- function At(e, t, n) {
1046
- if (n) return bt(e);
1047
- if (!t.endsWith("Type")) return xt(e);
1082
+ function Mt(e, t, n) {
1083
+ if (n) return St(e);
1084
+ if (!t.endsWith("Type")) return Ct(e);
1048
1085
  }
1049
- function jt(e, t) {
1086
+ function Nt(e, t) {
1050
1087
  if (!e) return /* @__PURE__ */ new Set();
1051
1088
  let n = Q(e);
1052
1089
  if (!n) return /* @__PURE__ */ new Set();
1053
1090
  let r = t[n];
1054
- return r ? new Set(vt(r).map((e) => e.getAttribute("Name")).filter((e) => !!e)) : /* @__PURE__ */ new Set();
1091
+ return r ? new Set(bt(r).map((e) => e.getAttribute("Name")).filter((e) => !!e)) : /* @__PURE__ */ new Set();
1055
1092
  }
1056
- function Mt(e, t, n) {
1057
- let r = e.getAttribute("Name") || "", i = e.getAttribute("EntitySet") || void 0, a = e.getAttribute("sap:action-for") || void 0, o = jt(a, n), s = Array.from(e.getElementsByTagName("Parameter")).map((e) => {
1058
- let t = Ct(e);
1093
+ function Pt(e, t, n) {
1094
+ let r = e.getAttribute("Name") || "", i = e.getAttribute("EntitySet") || void 0, a = e.getAttribute("sap:action-for") || void 0, o = Nt(a, n), s = Array.from(e.getElementsByTagName("Parameter")).map((e) => {
1095
+ let t = Tt(e);
1059
1096
  return o.has(t.id) && (t.mandatory = !0), t;
1060
1097
  });
1061
1098
  return {
@@ -1069,22 +1106,22 @@ function Mt(e, t, n) {
1069
1106
  ...i && t[i] ? { resultEntity: i } : {}
1070
1107
  };
1071
1108
  }
1072
- function Nt(e) {
1073
- let t = new DOMParser().parseFromString(e, "application/xml"), n = Array.from(t.getElementsByTagName("EntityType")), r = Array.from(t.getElementsByTagName("FunctionImport")), i = Tt(t), a = wt(n), o = Et(t), s = Ot(i, a, o), c = {}, l = {};
1109
+ function Ft(e) {
1110
+ let t = new DOMParser().parseFromString(e, "application/xml"), n = Array.from(t.getElementsByTagName("EntityType")), r = Array.from(t.getElementsByTagName("FunctionImport")), i = Dt(t), a = Et(n), o = Ot(t), s = At(i, a, o), c = {}, l = {};
1074
1111
  for (let [e, t] of Object.entries(i)) {
1075
1112
  if (s.has(e)) continue;
1076
1113
  let n = a[t];
1077
1114
  if (!n) continue;
1078
- let r = Dt(n, o), l = kt(n, r, i, a), u = n.getAttribute("sap:label") || l.getAttribute("sap:label") || "", d = St(l), f = At(n, t, r);
1115
+ let r = kt(n, o), l = jt(n, r, i, a), ee = n.getAttribute("sap:label") || l.getAttribute("sap:label") || "", u = wt(l), d = Mt(n, t, r);
1079
1116
  c[e] = {
1080
- title: u,
1081
- columns: d,
1082
- ...f?.length ? { parameters: f } : {},
1117
+ title: ee,
1118
+ columns: u,
1119
+ ...d?.length ? { parameters: d } : {},
1083
1120
  ...r ? { result: r.name } : {}
1084
1121
  };
1085
1122
  }
1086
1123
  for (let e of r) {
1087
- let t = Mt(e, i, a);
1124
+ let t = Pt(e, i, a);
1088
1125
  l[t.name] = t;
1089
1126
  }
1090
1127
  return {
@@ -1094,30 +1131,30 @@ function Nt(e) {
1094
1131
  }
1095
1132
  //#endregion
1096
1133
  //#region src/odata-service/sorts.ts
1097
- function Pt(e, t) {
1134
+ function It(e, t) {
1098
1135
  return e.findIndex((e) => e.key === t);
1099
1136
  }
1100
- function Ft(e) {
1137
+ function Lt(e) {
1101
1138
  return e.map((e) => `${String(e.key)} ${e.desc ? "desc" : "asc"}`).join(",");
1102
1139
  }
1103
- function It(e, t, n) {
1104
- let r = Pt(e, t), i = n ? [...e] : [...e.filter((e) => e.key === t)];
1140
+ function Rt(e, t, n) {
1141
+ let r = It(e, t), i = n ? [...e] : [...e.filter((e) => e.key === t)];
1105
1142
  return r === -1 ? (i.push({ key: t }), i) : e[r].desc ? i.filter((e) => e.key !== t) : i.map((e) => e.key === t ? {
1106
1143
  key: t,
1107
1144
  desc: !0
1108
1145
  } : e);
1109
1146
  }
1110
- function Lt(e, t) {
1147
+ function zt(e, t) {
1111
1148
  return t.length > 0 ? t.map((e) => ({
1112
1149
  key: e.key,
1113
1150
  desc: e.desc
1114
1151
  })) : e.map((e) => ({ key: e }));
1115
1152
  }
1116
- function Rt(e, t) {
1117
- let n = Lt(e, t).map((e) => `${String(e.key)} ${e.desc ? "desc" : "asc"}`);
1153
+ function Bt(e, t) {
1154
+ let n = zt(e, t).map((e) => `${String(e.key)} ${e.desc ? "desc" : "asc"}`);
1118
1155
  return n.length ? n.join(",") : void 0;
1119
1156
  }
1120
- function zt(e, t, n) {
1157
+ function Vt(e, t, n) {
1121
1158
  let r = t.length > 0, i = e.indexOf(n);
1122
1159
  if (!r && i !== -1) return {
1123
1160
  active: !0,
@@ -1133,61 +1170,61 @@ function zt(e, t, n) {
1133
1170
  }
1134
1171
  //#endregion
1135
1172
  //#region src/odata-service/sqlFilters.ts
1136
- var Bt = /^[A-Za-z_][A-Za-z0-9_]*$/;
1137
- function Vt(e) {
1173
+ var Ht = /^[A-Za-z_][A-Za-z0-9_]*$/;
1174
+ function Ut(e) {
1138
1175
  return typeof e == "string" || typeof e == "number" || typeof e == "boolean";
1139
1176
  }
1140
1177
  function $(e) {
1141
- if (!Bt.test(e)) throw Error(`Некорректное имя поля SQL-фильтра: ${e}`);
1178
+ if (!Ht.test(e)) throw Error(`Некорректное имя поля SQL-фильтра: ${e}`);
1142
1179
  }
1143
- function Ht(e, t) {
1180
+ function Wt(e, t) {
1144
1181
  return {
1145
1182
  fieldId: e,
1146
1183
  operation: "eq",
1147
1184
  value: t
1148
1185
  };
1149
1186
  }
1150
- function Ut(e, t) {
1187
+ function Gt(e, t) {
1151
1188
  return {
1152
1189
  fieldId: e,
1153
1190
  operation: "in",
1154
1191
  values: t
1155
1192
  };
1156
1193
  }
1157
- function Wt(e) {
1194
+ function Kt(e) {
1158
1195
  if (e instanceof Date) throw Error("Дата должна быть отформатирована вызывающей стороной до формирования SQL-фильтра");
1159
- if (!Vt(e) || typeof e == "number" && !Number.isFinite(e)) return;
1196
+ if (!Ut(e) || typeof e == "number" && !Number.isFinite(e)) return;
1160
1197
  let t = String(e);
1161
1198
  if (!(!t || t.trim() === "")) return `'${t.replaceAll("'", "''")}'`;
1162
1199
  }
1163
- function Gt(e) {
1200
+ function qt(e) {
1164
1201
  if (e.operation === "eq") {
1165
- let t = Wt(e.value);
1202
+ let t = Kt(e.value);
1166
1203
  return t ? ($(e.fieldId), `${e.fieldId}=${t}`) : void 0;
1167
1204
  }
1168
- let t = (e.values ?? []).map((e) => Wt(e)).filter((e) => !!e);
1205
+ let t = (e.values ?? []).map((e) => Kt(e)).filter((e) => !!e);
1169
1206
  if (t.length !== 0) return $(e.fieldId), `${e.fieldId} IN (${t.join(", ")})`;
1170
1207
  }
1171
- function Kt(e) {
1172
- return e ? e.map((e) => Gt(e)).filter((e) => !!e).join(" AND ") : "";
1208
+ function Jt(e) {
1209
+ return e ? e.map((e) => qt(e)).filter((e) => !!e).join(" AND ") : "";
1173
1210
  }
1174
1211
  //#endregion
1175
1212
  //#region src/odata-service/typesValidation.ts
1176
- function qt(e) {
1213
+ function Yt(e) {
1177
1214
  return e === "boolean";
1178
1215
  }
1179
- function Jt(e) {
1216
+ function Xt(e) {
1180
1217
  return e === "byte" || e === "int" || e === "long" || e === "float" || e === "decimal" || e === "double";
1181
1218
  }
1182
- function Yt(e) {
1219
+ function Zt(e) {
1183
1220
  return e === "byte" || e === "int" || e === "long";
1184
1221
  }
1185
- function Xt(e) {
1222
+ function Qt(e) {
1186
1223
  return e === "datetime" || e === "datetimeOffset" || e === "time";
1187
1224
  }
1188
1225
  //#endregion
1189
1226
  //#region src/odata-service/unwrapODataQueryResult.ts
1190
- function Zt(e) {
1227
+ function $t(e) {
1191
1228
  let t = e.data?.data, n = e.data?.totalCount;
1192
1229
  return {
1193
1230
  ...e,
@@ -1197,30 +1234,30 @@ function Zt(e) {
1197
1234
  }
1198
1235
  //#endregion
1199
1236
  //#region src/odata-service/utils.ts
1200
- function Qt(e) {
1201
- return Array.isArray(e) ? [e[0] ?? null, e[1] ?? null] : [en(e) ? e ?? null : null, null];
1237
+ function en(e) {
1238
+ return Array.isArray(e) ? [e[0] ?? null, e[1] ?? null] : [nn(e) ? e ?? null : null, null];
1202
1239
  }
1203
- function $t(t) {
1240
+ function tn(t) {
1204
1241
  return t instanceof Date ? t : Array.isArray(t) || e(t) ? null : t;
1205
1242
  }
1206
- function en(e) {
1243
+ function nn(e) {
1207
1244
  return e == null || typeof e == "string" || typeof e == "number" || typeof e == "boolean" || e instanceof Date;
1208
1245
  }
1209
1246
  //#endregion
1210
1247
  //#region src/odata-service/wrapParams.ts
1211
- function tn(e) {
1248
+ function rn(e) {
1212
1249
  if (!e) return {};
1213
1250
  let t = {};
1214
1251
  for (let n in e) t[n] = { value: e[n] };
1215
1252
  return t;
1216
1253
  }
1217
- function nn(e) {
1254
+ function an(e) {
1218
1255
  if (!e) return;
1219
1256
  let t = {};
1220
1257
  for (let n of Object.keys(e).sort()) t[n] = e[n]?.value ?? null;
1221
1258
  return t;
1222
1259
  }
1223
1260
  //#endregion
1224
- export { je as $, Ge as A, u as At, Ne as B, ut as C, ae as Ct, Qe as D, te as Dt, ct as E, f as Et, V as F, s as Ft, Ve as G, A as H, B as I, He as J, Ue as K, H as L, Xe as M, c as Mt, Ye as N, d as Nt, at as O, ne as Ot, Je as P, o as Pt, E as Q, U as R, q as S, se as St, Nt as T, p as Tt, Be as U, Me as V, j as W, We as X, Ie as Y, Le as Z, Rt as _, Te as _t, Qt as a, S as at, Lt as b, de as bt, Xt as c, _ as ct, $ as d, pe as dt, ke as et, Kt as f, fe as ft, Ft as g, we as gt, Vt as h, De as ht, $t as i, Ae as it, Ze as j, l as jt, ot as k, re as kt, Yt as l, he as lt, Ut as m, Ee as mt, tn as n, T as nt, Zt as o, v as ot, Ht as p, x as pt, M as q, en as r, w as rt, qt as s, y as st, nn as t, C as tt, Jt as u, me as ut, Pt as v, g as vt, lt as w, ie as wt, It as x, oe as xt, zt as y, ue as yt, W as z };
1261
+ export { Me as $, Je as A, ee as At, Pe as B, ft as C, oe as Ct, et as D, ne as Dt, ut as E, d as Et, V as F, s as Ft, We as G, D as H, B as I, Ge as J, Ke as K, H as L, P as M, c as Mt, Qe as N, u as Nt, st as O, re as Ot, Ze as P, o as Pt, T as Q, U as R, q as S, ce as St, Ft as T, f as Tt, Ue as U, Ne as V, O as W, qe as X, Le as Y, Re as Z, Bt as _, Ee as _t, en as a, x as at, zt as b, fe as bt, Qt as c, g as ct, $ as d, me as dt, Ae as et, Jt as f, pe as ft, Lt as g, Te as gt, Ut as h, Oe as ht, tn as i, je as it, $e as j, l as jt, ct as k, ie as kt, Zt as l, ge as lt, Gt as m, De as mt, rn as n, w as nt, $t as o, _ as ot, Wt as p, b as pt, k as q, nn as r, C as rt, Yt as s, v as st, an as t, S as tt, Xt as u, he as ut, It as v, h as vt, dt as w, ae as wt, Rt as x, se as xt, Vt as y, de as yt, W as z };
1225
1262
 
1226
- //# sourceMappingURL=odata-service-CEfjPsY9.js.map
1263
+ //# sourceMappingURL=odata-service-Ba6s7-gZ.js.map