@retailcrm/embed-ui-v1-components 0.9.21 → 0.9.22-alpha.1

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.
Files changed (96) hide show
  1. package/AGENTS.md +3 -3
  2. package/README.md +3 -4
  3. package/assets/sprites/actions/add-square-outlined.svg +8 -0
  4. package/assets/sprites/actions/drag.svg +8 -0
  5. package/bin/embed-ui-v1-components.mjs +227 -50
  6. package/bin/postinstall.mjs +2 -1
  7. package/dist/host.cjs +1204 -488
  8. package/dist/host.css +629 -0
  9. package/dist/host.d.ts +100 -20
  10. package/dist/host.js +1205 -489
  11. package/dist/remote.cjs +1210 -153
  12. package/dist/remote.d.ts +786 -36
  13. package/dist/remote.js +1212 -155
  14. package/docs/AI.md +19 -20
  15. package/docs/COMPONENTS.md +58 -59
  16. package/docs/FORMAT.md +6 -8
  17. package/docs/PROFILES.md +34 -21
  18. package/docs/README.md +3 -6
  19. package/docs/profiles/{UiAddButton.yml → components/UiAddButton.yml} +49 -2
  20. package/docs/profiles/{UiAlert.yml → components/UiAlert.yml} +32 -2
  21. package/docs/profiles/{UiAvatar.yml → components/UiAvatar.yml} +17 -3
  22. package/docs/profiles/{UiAvatarList.yml → components/UiAvatarList.yml} +0 -2
  23. package/docs/profiles/{UiButton.yml → components/UiButton.yml} +14 -1
  24. package/docs/profiles/components/UiCalendar.yml +190 -0
  25. package/docs/profiles/{UiCheckbox.yml → components/UiCheckbox.yml} +28 -2
  26. package/docs/profiles/{UiCollapse.yml → components/UiCollapse.yml} +57 -2
  27. package/docs/profiles/{UiCollapseBox.yml → components/UiCollapseBox.yml} +64 -2
  28. package/docs/profiles/{UiCollapseGroup.yml → components/UiCollapseGroup.yml} +0 -2
  29. package/docs/profiles/{UiCopyButton.yml → components/UiCopyButton.yml} +19 -2
  30. package/docs/profiles/{UiDate.yml → components/UiDate.yml} +20 -2
  31. package/docs/profiles/{UiDatePicker.yml → components/UiDatePicker.yml} +51 -2
  32. package/docs/profiles/{UiError.yml → components/UiError.yml} +48 -2
  33. package/docs/profiles/{UiField.yml → components/UiField.yml} +46 -1
  34. package/docs/profiles/{UiInfobox.yml → components/UiInfobox.yml} +54 -2
  35. package/docs/profiles/{UiLink.yml → components/UiLink.yml} +22 -2
  36. package/docs/profiles/{UiLoader.yml → components/UiLoader.yml} +0 -2
  37. package/docs/profiles/{UiMenuItem.yml → components/UiMenuItem.yml} +0 -2
  38. package/docs/profiles/{UiMenuItemGroup.yml → components/UiMenuItemGroup.yml} +0 -2
  39. package/docs/profiles/{UiModalSidebar.yml → components/UiModalSidebar.yml} +80 -2
  40. package/docs/profiles/components/UiModalWindow.yml +181 -0
  41. package/docs/profiles/{UiModalWindowSurface.yml → components/UiModalWindowSurface.yml} +0 -2
  42. package/docs/profiles/{UiNumberStepper.yml → components/UiNumberStepper.yml} +14 -2
  43. package/docs/profiles/{UiPageHeader.yml → components/UiPageHeader.yml} +39 -1
  44. package/docs/profiles/components/UiPopconfirm.yml +164 -0
  45. package/docs/profiles/{UiPopper.yml → components/UiPopper.yml} +66 -1
  46. package/docs/profiles/{UiPopperConnector.yml → components/UiPopperConnector.yml} +0 -2
  47. package/docs/profiles/{UiPopperTarget.yml → components/UiPopperTarget.yml} +0 -2
  48. package/docs/profiles/{UiRadio.yml → components/UiRadio.yml} +15 -2
  49. package/docs/profiles/{UiRadioSwitch.yml → components/UiRadioSwitch.yml} +55 -1
  50. package/docs/profiles/{UiRadioSwitchOption.yml → components/UiRadioSwitchOption.yml} +0 -2
  51. package/docs/profiles/{UiScrollBox.yml → components/UiScrollBox.yml} +45 -2
  52. package/docs/profiles/{UiSelect.yml → components/UiSelect.yml} +133 -1
  53. package/docs/profiles/{UiSelectOption.yml → components/UiSelectOption.yml} +0 -2
  54. package/docs/profiles/{UiSelectOptionGroup.yml → components/UiSelectOptionGroup.yml} +0 -2
  55. package/docs/profiles/{UiSkeleton.yml → components/UiSkeleton.yml} +11 -2
  56. package/docs/profiles/{UiSlider.yml → components/UiSlider.yml} +85 -2
  57. package/docs/profiles/{UiSwitch.yml → components/UiSwitch.yml} +50 -2
  58. package/docs/profiles/{UiTab.yml → components/UiTab.yml} +126 -2
  59. package/docs/profiles/{UiTabGroup.yml → components/UiTabGroup.yml} +0 -1
  60. package/docs/profiles/components/UiTable.yml +622 -0
  61. package/docs/profiles/{UiTableBodyCell.yml → components/UiTableBodyCell.yml} +0 -2
  62. package/docs/profiles/{UiTableColumn.yml → components/UiTableColumn.yml} +0 -2
  63. package/docs/profiles/{UiTableFooterButton.yml → components/UiTableFooterButton.yml} +0 -2
  64. package/docs/profiles/{UiTableFooterSection.yml → components/UiTableFooterSection.yml} +0 -2
  65. package/docs/profiles/{UiTableHeadCell.yml → components/UiTableHeadCell.yml} +0 -2
  66. package/docs/profiles/{UiTableSorter.yml → components/UiTableSorter.yml} +0 -2
  67. package/docs/profiles/{UiTag.yml → components/UiTag.yml} +13 -2
  68. package/docs/profiles/{UiTextbox.yml → components/UiTextbox.yml} +20 -1
  69. package/docs/profiles/{UiTimePicker.yml → components/UiTimePicker.yml} +60 -2
  70. package/docs/profiles/{UiToggleButton.yml → components/UiToggleButton.yml} +16 -1
  71. package/docs/profiles/{UiToggleGroup.yml → components/UiToggleGroup.yml} +25 -1
  72. package/docs/profiles/{UiToggleGroupOption.yml → components/UiToggleGroupOption.yml} +0 -2
  73. package/docs/profiles/{UiToolbarButton.yml → components/UiToolbarButton.yml} +15 -2
  74. package/docs/profiles/{UiToolbarLink.yml → components/UiToolbarLink.yml} +13 -2
  75. package/docs/profiles/{UiTooltip.yml → components/UiTooltip.yml} +18 -2
  76. package/docs/profiles/{UiTransition.yml → components/UiTransition.yml} +0 -2
  77. package/docs/profiles/{UiYandexMap.yml → components/UiYandexMap.yml} +24 -2
  78. package/docs/profiles/pages/CardSettingsPage.yml +58 -0
  79. package/docs/profiles/pages/CollapseBlockPage.yml +46 -0
  80. package/docs/profiles/pages/EntityListPage.yml +66 -0
  81. package/docs/profiles/pages/ModalSidebar.yml +158 -0
  82. package/docs/profiles/pages/ModalWindow.yml +55 -0
  83. package/docs/profiles/pages/MultiColumnPage.yml +27 -0
  84. package/docs/profiles/pages/PageComposition.yml +56 -0
  85. package/package.json +1 -1
  86. package/docs/AGENT-DESIGN-GUIDELINES.md +0 -463
  87. package/docs/assets/page-guidelines/card-settings-page.png +0 -0
  88. package/docs/assets/page-guidelines/collapse-block-page.png +0 -0
  89. package/docs/assets/page-guidelines/entity-list-page.png +0 -0
  90. package/docs/assets/page-guidelines/modal-sidebar.png +0 -0
  91. package/docs/assets/page-guidelines/modal-window.png +0 -0
  92. package/docs/assets/page-guidelines/multi-column-page.png +0 -0
  93. package/docs/profiles/UiCalendar.yml +0 -76
  94. package/docs/profiles/UiImage.yml +0 -67
  95. package/docs/profiles/UiModalWindow.yml +0 -86
  96. package/docs/profiles/UiTable.yml +0 -300
package/dist/remote.cjs CHANGED
@@ -124,13 +124,13 @@ const UiError = remote.defineRemoteComponent(
124
124
  UiErrorType,
125
125
  ["click", "focus", "blur"]
126
126
  );
127
- const _hoisted_1$7 = {
127
+ const _hoisted_1$9 = {
128
128
  xmlns: "http://www.w3.org/2000/svg",
129
129
  fill: "currentColor",
130
130
  viewBox: "0 0 24 24"
131
131
  };
132
- function render$2(_ctx, _cache) {
133
- return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$7, [..._cache[0] || (_cache[0] = [
132
+ function render$3(_ctx, _cache) {
133
+ return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$9, [..._cache[0] || (_cache[0] = [
134
134
  vue.createElementVNode("path", {
135
135
  "fill-rule": "evenodd",
136
136
  d: "M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10A10 10 0 0 0 12 2m1 15.5a.5.5 0 0 1-.5.5h-1a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5h1a.5.5 0 0 1 .5.5zm.88-5.21a2.89 2.89 0 0 0 2-2.73V9A2.88 2.88 0 0 0 13 6.12h-2A2.88 2.88 0 0 0 8.12 9v.5a.5.5 0 0 0 .5.5h.76a.5.5 0 0 0 .5-.5V9c0-.619.501-1.12 1.12-1.12h2A1.12 1.12 0 0 1 14.16 9v.56a1.13 1.13 0 0 1-.76 1.07l-.95.31a1.88 1.88 0 0 0-1.29 1.78v.78a.5.5 0 0 0 .5.5h.76a.5.5 0 0 0 .5-.5v-.78c0-.053.032-.1.08-.12z",
@@ -138,18 +138,28 @@ function render$2(_ctx, _cache) {
138
138
  }, null, -1)
139
139
  ])]);
140
140
  }
141
- const IconHelp = { render: render$2 };
141
+ const IconHelp = { render: render$3 };
142
142
  const UiPopperType = "UiPopper";
143
- const UiPopper = remote.defineRemoteComponent(UiPopperType);
143
+ const UiPopper = remote.defineRemoteComponent(UiPopperType, {
144
+ emits: [
145
+ "attached",
146
+ "dispose",
147
+ "hide",
148
+ "hidden",
149
+ "show",
150
+ "shown",
151
+ "update:visible"
152
+ ]
153
+ });
144
154
  const UiPopperConnectorType = "UiPopperConnector";
145
155
  const UiPopperConnector = remote.defineRemoteComponent(UiPopperConnectorType);
146
156
  const UiPopperTargetType = "UiPopperTarget";
147
157
  const UiPopperTarget = remote.defineRemoteComponent(UiPopperTargetType);
148
158
  const UiTooltipType = "UiTooltip";
149
159
  const UiTooltip = remote.defineRemoteComponent(UiTooltipType);
150
- const _hoisted_1$6 = { class: "ui-v1-field__headline" };
151
- const _hoisted_2$3 = ["id", "for"];
152
- const _hoisted_3$3 = {
160
+ const _hoisted_1$8 = { class: "ui-v1-field__headline" };
161
+ const _hoisted_2$4 = ["id", "for"];
162
+ const _hoisted_3$4 = {
153
163
  key: 0,
154
164
  class: "ui-v1-field__required-mark",
155
165
  "aria-hidden": "true"
@@ -163,7 +173,7 @@ const _hoisted_5$1 = {
163
173
  class: "ui-v1-field__addon"
164
174
  };
165
175
  const _hoisted_6 = { class: "ui-v1-field__control" };
166
- const _sfc_main$b = /* @__PURE__ */ vue.defineComponent({
176
+ const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
167
177
  ...{
168
178
  inheritAttrs: false
169
179
  },
@@ -221,7 +231,7 @@ const _sfc_main$b = /* @__PURE__ */ vue.defineComponent({
221
231
  "ui-v1-field_readonly": __props.readonly
222
232
  }
223
233
  }, _ctx.$attrs), [
224
- vue.createElementVNode("div", _hoisted_1$6, [
234
+ vue.createElementVNode("div", _hoisted_1$8, [
225
235
  __props.label || _ctx.$slots.label ? (vue.openBlock(), vue.createElementBlock("label", {
226
236
  key: 0,
227
237
  id: `${__props.id}-label`,
@@ -231,8 +241,8 @@ const _sfc_main$b = /* @__PURE__ */ vue.defineComponent({
231
241
  vue.renderSlot(_ctx.$slots, "label", {}, () => [
232
242
  vue.createTextVNode(vue.toDisplayString(__props.label), 1)
233
243
  ]),
234
- __props.required ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$3, " * ")) : vue.createCommentVNode("", true)
235
- ], 8, _hoisted_2$3)) : vue.createCommentVNode("", true),
244
+ __props.required ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$4, " * ")) : vue.createCommentVNode("", true)
245
+ ], 8, _hoisted_2$4)) : vue.createCommentVNode("", true),
236
246
  __props.hint || _ctx.$slots.hint ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_4$2, [
237
247
  vue.createVNode(vue.unref(UiPopperConnector), null, {
238
248
  default: vue.withCtx(() => [
@@ -317,6 +327,954 @@ const UiLoader = remote.defineRemoteComponent(
317
327
  UiLoaderType,
318
328
  ["click", "focus", "blur"]
319
329
  );
330
+ var LogicTreeNodeKind = /* @__PURE__ */ ((LogicTreeNodeKind2) => {
331
+ LogicTreeNodeKind2["BRANCH"] = "branch";
332
+ LogicTreeNodeKind2["CONDITION"] = "condition";
333
+ LogicTreeNodeKind2["GROUP"] = "group";
334
+ return LogicTreeNodeKind2;
335
+ })(LogicTreeNodeKind || {});
336
+ var LogicTreeChildrenView = /* @__PURE__ */ ((LogicTreeChildrenView2) => {
337
+ LogicTreeChildrenView2["GROUPED"] = "grouped";
338
+ LogicTreeChildrenView2["PLAIN"] = "plain";
339
+ return LogicTreeChildrenView2;
340
+ })(LogicTreeChildrenView || {});
341
+ var LogicTreeConjunction = /* @__PURE__ */ ((LogicTreeConjunction2) => {
342
+ LogicTreeConjunction2["AND"] = "and";
343
+ LogicTreeConjunction2["OR"] = "or";
344
+ return LogicTreeConjunction2;
345
+ })(LogicTreeConjunction || {});
346
+ var LogicTreeNodeView = /* @__PURE__ */ ((LogicTreeNodeView2) => {
347
+ LogicTreeNodeView2["ACTIONS"] = "actions";
348
+ LogicTreeNodeView2["SUMMARY"] = "summary";
349
+ return LogicTreeNodeView2;
350
+ })(LogicTreeNodeView || {});
351
+ var LogicTreeTone = /* @__PURE__ */ ((LogicTreeTone2) => {
352
+ LogicTreeTone2["BLUE"] = "blue";
353
+ LogicTreeTone2["GREEN"] = "green";
354
+ LogicTreeTone2["GREY"] = "grey";
355
+ LogicTreeTone2["RED"] = "red";
356
+ LogicTreeTone2["YELLOW"] = "yellow";
357
+ return LogicTreeTone2;
358
+ })(LogicTreeTone || {});
359
+ const pluralization_en_GB = (choice) => choice === 1 ? 0 : 1;
360
+ const pluralization_es_ES = (choice) => choice === 1 ? 0 : 1;
361
+ const pluralization_ru_RU = (choice, choicesLength) => {
362
+ if (choicesLength === 2) {
363
+ return choice === 1 ? 0 : 1;
364
+ }
365
+ const mod100 = choice % 100;
366
+ return mod100 % 10 === 1 && mod100 !== 11 ? 0 : mod100 % 10 >= 2 && mod100 % 10 <= 4 && !(mod100 >= 10 && mod100 < 15) ? 1 : 2;
367
+ };
368
+ const get = (messages, path) => {
369
+ let i = 0;
370
+ let slice = messages[path[0]];
371
+ while (i < path.length) {
372
+ if (typeof slice === "string" && i + 1 === path.length) {
373
+ return slice;
374
+ }
375
+ if (typeof slice !== "object") {
376
+ return void 0;
377
+ }
378
+ slice = slice[path[++i]];
379
+ }
380
+ return slice;
381
+ };
382
+ const replace = (message, values) => {
383
+ return Object.keys(values).reduce((message2, key) => {
384
+ const pattern = new RegExp(`\\{${key}\\}`, "g");
385
+ const replacement = String(values[key]);
386
+ return message2.replace(pattern, replacement);
387
+ }, message);
388
+ };
389
+ const compile = (messages, path, values = void 0) => {
390
+ const message = get(messages, path);
391
+ if (typeof message === "string" && values) {
392
+ return replace(message, values);
393
+ }
394
+ return message;
395
+ };
396
+ const fail = (message) => {
397
+ throw new Error(message);
398
+ };
399
+ const t = (locale2, messages, path, values = void 0) => {
400
+ const keys = path.split(".");
401
+ if (locale2) {
402
+ const message = compile(messages[locale2] ?? {}, keys, values);
403
+ return typeof message !== "object" ? message : fail(`Translation for "${locale2}:${path}" is not translatable`);
404
+ }
405
+ return void 0;
406
+ };
407
+ const plural = (template, choice, rule) => {
408
+ const forms = template.split("|");
409
+ return forms[rule(choice, forms.length)];
410
+ };
411
+ class I18n {
412
+ parent;
413
+ messages;
414
+ computed;
415
+ pluralization;
416
+ fallback;
417
+ constructor(options = void 0, parent = void 0) {
418
+ this.parent = parent;
419
+ this.messages = options?.messages ?? {};
420
+ this.computed = options?.computed ?? {};
421
+ this.pluralization = {
422
+ "en-GB": pluralization_en_GB,
423
+ "es-ES": pluralization_es_ES,
424
+ "ru-RU": pluralization_ru_RU,
425
+ ...options?.pluralization ?? {}
426
+ };
427
+ this.fallback = options?.fallback;
428
+ }
429
+ t(locale2, path, values = void 0) {
430
+ try {
431
+ const _t = (locale22) => t(locale22, this.messages, path, values);
432
+ return _t(locale2) ?? _t(this.fallback) ?? fail(`Translation for "${path}" does not exists`);
433
+ } catch (e) {
434
+ if (this.parent) {
435
+ return this.parent.t(locale2, path, values);
436
+ }
437
+ throw e;
438
+ }
439
+ }
440
+ tc(locale2, path, choice, values = void 0) {
441
+ return plural(
442
+ this.t(
443
+ locale2,
444
+ path,
445
+ values
446
+ ),
447
+ choice,
448
+ this.pluralization[locale2]
449
+ );
450
+ }
451
+ compute(locale2, key, values) {
452
+ const computed = this.computed[key];
453
+ if (computed) {
454
+ return computed(localize(this, locale2), values);
455
+ }
456
+ if (this.parent) {
457
+ return this.parent.compute(locale2, key, values);
458
+ }
459
+ return fail("Key " + key + " is not registered");
460
+ }
461
+ extend(options) {
462
+ return new I18n({
463
+ pluralization: this.pluralization,
464
+ fallback: this.fallback,
465
+ ...options
466
+ }, this);
467
+ }
468
+ }
469
+ const localize = (i18n, locale2) => ({
470
+ t(path, values = void 0) {
471
+ return i18n.t(locale2, path, values);
472
+ },
473
+ tc(path, choice, values = void 0) {
474
+ return i18n.tc(locale2, path, choice, values);
475
+ },
476
+ compute(key, values) {
477
+ return i18n.compute(locale2, key, values);
478
+ }
479
+ });
480
+ const fallback = "en-GB";
481
+ const define = (options = void 0, parent = void 0) => {
482
+ const i18n = new I18n({
483
+ ...options,
484
+ fallback
485
+ }, parent);
486
+ const extend = (i18n2, options2 = void 0) => options2 ? i18n2.extend(options2) : i18n2;
487
+ return {
488
+ i18n,
489
+ init: (locale2, options2 = void 0) => localize(
490
+ extend(i18n, options2),
491
+ locale2
492
+ ),
493
+ fallback
494
+ };
495
+ };
496
+ const relationAnd$2 = "AND";
497
+ const relationOr$2 = "OR";
498
+ const messages_en_GB$1 = {
499
+ "delete": "Delete",
500
+ relationAnd: relationAnd$2,
501
+ relationOr: relationOr$2
502
+ };
503
+ const relationAnd$1 = "Y";
504
+ const relationOr$1 = "O";
505
+ const messages_es_ES$1 = {
506
+ "delete": "Eliminar",
507
+ relationAnd: relationAnd$1,
508
+ relationOr: relationOr$1
509
+ };
510
+ const relationAnd = "И";
511
+ const relationOr = "ИЛИ";
512
+ const messages_ru_RU$1 = {
513
+ "delete": "Удалить",
514
+ relationAnd,
515
+ relationOr
516
+ };
517
+ const _i18n = define({
518
+ messages: {
519
+ "en-GB": messages_en_GB$1,
520
+ "es-ES": messages_es_ES$1,
521
+ "ru-RU": messages_ru_RU$1
522
+ }
523
+ });
524
+ const I18nInjectKey = /* @__PURE__ */ Symbol("$embedI18n");
525
+ const UiLogicTreeRootType = "UiLogicTreeRoot";
526
+ const UiLogicTreeRoot = remote.defineRemoteComponent(UiLogicTreeRootType, {
527
+ emits: [
528
+ "outsideClick"
529
+ ],
530
+ slots: ["default"]
531
+ });
532
+ const UiLogicTreeNodeType = "UiLogicTreeNode";
533
+ const UiLogicTreeNode = remote.defineRemoteComponent(UiLogicTreeNodeType, {
534
+ emits: [
535
+ "nodeClick",
536
+ "nodeEdit"
537
+ ],
538
+ slots: ["conjunction-poppers", "prefix", "content", "trailing"]
539
+ });
540
+ const UiLogicTreeCaretType = "UiLogicTreeCaret";
541
+ const UiLogicTreeCaret = remote.defineRemoteComponent(UiLogicTreeCaretType);
542
+ const UiLogicTreeNodeItemType = "UiLogicTreeNodeItem";
543
+ const UiLogicTreeNodeItem = remote.defineRemoteComponent(UiLogicTreeNodeItemType, {
544
+ slots: ["default", "headline", "title", "trailing"]
545
+ });
546
+ const UiLogicTreeNodeIconType = "UiLogicTreeNodeIcon";
547
+ const UiLogicTreeNodeIcon = remote.defineRemoteComponent(UiLogicTreeNodeIconType, {
548
+ slots: ["default"]
549
+ });
550
+ const _hoisted_1$7 = { class: "ui-v1-logic-tree__slot-content" };
551
+ const _hoisted_2$3 = { class: "ui-v1-logic-tree__slot-content" };
552
+ const _hoisted_3$3 = { class: "ui-v1-logic-tree__slot-content" };
553
+ const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
554
+ __name: "UiLogicTree",
555
+ props: {
556
+ items: { default: () => [] }
557
+ },
558
+ emits: ["action", "control-action", "control:update", "drop", "remove", "node:add", "node:edit", "node:remove", "toggle", "update:items"],
559
+ setup(__props, { emit: __emit }) {
560
+ const props = __props;
561
+ const emit = __emit;
562
+ const i18n = vue.computed(() => _i18n.init(vue.inject(I18nInjectKey, null)?.locale ?? _i18n.fallback));
563
+ const resolveConjunctionLabel = (conjunction) => {
564
+ if (conjunction === LogicTreeConjunction.AND) {
565
+ return i18n.value.t("relationAnd");
566
+ }
567
+ if (conjunction === LogicTreeConjunction.OR) {
568
+ return i18n.value.t("relationOr");
569
+ }
570
+ return String(conjunction ?? "");
571
+ };
572
+ const itemsState = vue.shallowRef([]);
573
+ const activePathKey = vue.ref("");
574
+ const fallbackTone = (node) => node.tone ?? (node.kind === LogicTreeNodeKind.GROUP ? LogicTreeTone.GREEN : LogicTreeTone.BLUE);
575
+ const resolveConjunctionTone = (conjunction, fallback2) => {
576
+ if (conjunction === LogicTreeConjunction.OR) {
577
+ return LogicTreeTone.YELLOW;
578
+ }
579
+ if (conjunction === LogicTreeConjunction.AND) {
580
+ return LogicTreeTone.BLUE;
581
+ }
582
+ return fallback2;
583
+ };
584
+ const resolveNodeConjunction = (node, index, isGroupedSectionNode, parentNode) => {
585
+ if (isGroupedSectionNode || !isConjunctionContentNode(node)) {
586
+ return "";
587
+ }
588
+ if (index === 0) {
589
+ return parentNode && isConjunctionContentNode(parentNode) && countConjunctionContentChildren(parentNode) >= 2 ? node.conjunction ?? "" : "";
590
+ }
591
+ return node.conjunction ?? "";
592
+ };
593
+ const resolveConjunctionOffset = (conjunction) => {
594
+ if (!conjunction) {
595
+ return void 0;
596
+ }
597
+ return -8;
598
+ };
599
+ const resolveSubtreeEndPathKey = (source, nodeIndex) => {
600
+ const nodeEntry = source[nodeIndex];
601
+ const nodePathKey = pathToKey(nodeEntry.path);
602
+ const subtreePrefix = `${nodePathKey}.`;
603
+ let endIndex = nodeIndex;
604
+ for (let index = nodeIndex + 1; index < source.length; index += 1) {
605
+ const candidatePathKey = pathToKey(source[index].path);
606
+ if (candidatePathKey.startsWith(subtreePrefix)) {
607
+ endIndex = index;
608
+ continue;
609
+ }
610
+ break;
611
+ }
612
+ return pathToKey(source[endIndex].path);
613
+ };
614
+ const resolveConjunctionRangeEndPathKey = (source, nodeIndex) => {
615
+ const nodeEntry = source[nodeIndex];
616
+ const siblingIndex = nodeEntry.path.at(-1);
617
+ if (siblingIndex === void 0) {
618
+ return void 0;
619
+ }
620
+ let lastSiblingNodeIndex = nodeIndex;
621
+ source.forEach((candidate, candidateIndex) => {
622
+ const candidateSiblingIndex = candidate.path.at(-1);
623
+ if (candidate.path.length === nodeEntry.path.length && candidateSiblingIndex !== void 0 && candidateSiblingIndex >= siblingIndex && candidate.parentPath.length === nodeEntry.parentPath.length && candidate.parentPath.every((segment, index) => segment === nodeEntry.parentPath[index])) {
624
+ lastSiblingNodeIndex = candidateIndex;
625
+ }
626
+ });
627
+ return resolveSubtreeEndPathKey(source, lastSiblingNodeIndex);
628
+ };
629
+ const applyConjunctionToneToConnectors = (connectors, conjunction, conjunctionTone) => {
630
+ if (!conjunction || connectors.length === 0) {
631
+ return connectors;
632
+ }
633
+ return connectors.map((connector, connectorIndex, source) => connectorIndex === source.length - 1 ? {
634
+ ...connector,
635
+ tone: conjunctionTone
636
+ } : connector);
637
+ };
638
+ const setConnectorToneAtIndex = (nodeEntry, connectorIndex, tone) => {
639
+ if (!nodeEntry.connectors[connectorIndex]) {
640
+ return nodeEntry;
641
+ }
642
+ return {
643
+ ...nodeEntry,
644
+ connectors: nodeEntry.connectors.map((connector, index) => index === connectorIndex ? {
645
+ ...connector,
646
+ tone
647
+ } : connector)
648
+ };
649
+ };
650
+ const applyConjunctionBranchTones = (source) => {
651
+ const nodes = source.map((nodeEntry) => ({
652
+ ...nodeEntry,
653
+ connectors: nodeEntry.connectors.map((connector) => ({ ...connector }))
654
+ }));
655
+ const startsWithPath = (path, prefix) => prefix.length <= path.length && prefix.every((segment, index) => path[index] === segment);
656
+ const recolorBranchLevel = (parentPath, connectorIndex, tone) => {
657
+ nodes.forEach((candidate, index) => {
658
+ if (!startsWithPath(candidate.path, parentPath)) {
659
+ return;
660
+ }
661
+ if (!candidate.connectors[connectorIndex]) {
662
+ return;
663
+ }
664
+ nodes[index] = setConnectorToneAtIndex(candidate, connectorIndex, tone);
665
+ });
666
+ };
667
+ nodes.forEach((nodeEntry) => {
668
+ if (!nodeEntry.conjunction) {
669
+ return;
670
+ }
671
+ const connectorIndex = Math.max(0, nodeEntry.connectors.length - 1);
672
+ recolorBranchLevel(nodeEntry.parentPath, connectorIndex, nodeEntry.conjunctionTone);
673
+ });
674
+ return nodes;
675
+ };
676
+ const applyConjunctionRanges = (source) => source.map((nodeEntry, nodeIndex) => {
677
+ if (!nodeEntry.conjunction) {
678
+ return nodeEntry;
679
+ }
680
+ const siblingIndex = nodeEntry.path.at(-1);
681
+ const parentPathKey = nodeEntry.parentPath.length > 0 ? pathToKey(nodeEntry.parentPath) : void 0;
682
+ const parentEntry = parentPathKey ? source.find((candidate) => pathToKey(candidate.path) === parentPathKey) : void 0;
683
+ if (siblingIndex === void 0) {
684
+ return nodeEntry;
685
+ }
686
+ if (siblingIndex === 0) {
687
+ return {
688
+ ...nodeEntry,
689
+ conjunctionEndPathKey: resolveConjunctionRangeEndPathKey(source, nodeIndex),
690
+ conjunctionStartPathKey: parentEntry ? pathToKey(parentEntry.path) : void 0
691
+ };
692
+ }
693
+ return {
694
+ ...nodeEntry,
695
+ conjunctionEndPathKey: resolveConjunctionRangeEndPathKey(source, nodeIndex),
696
+ conjunctionStartPathKey: pathToKey([...nodeEntry.parentPath, siblingIndex - 1])
697
+ };
698
+ });
699
+ const pathToKey = (path) => path.join(".");
700
+ const cloneNodes = (nodes) => nodes.map((node) => ({
701
+ ...node,
702
+ children: node.children ? cloneNodes(node.children) : void 0,
703
+ data: { ...node.data }
704
+ }));
705
+ const resolveConfiguredNodeView = (node) => node.data.view;
706
+ const isConjunctionContentNode = (node) => resolveConfiguredNodeView(node) !== LogicTreeNodeView.ACTIONS && node.kind !== LogicTreeNodeKind.BRANCH;
707
+ const countConjunctionContentChildren = (node) => node?.children?.filter((child) => isConjunctionContentNode(child)).length ?? 0;
708
+ const resolveNodeView = (nodeEntry) => {
709
+ const configuredNodeView = resolveConfiguredNodeView(nodeEntry.node);
710
+ if (configuredNodeView === LogicTreeNodeView.ACTIONS) {
711
+ return configuredNodeView;
712
+ }
713
+ return configuredNodeView;
714
+ };
715
+ const canToggleNode = (nodeEntry) => Boolean(nodeEntry.node.collapsible) && nodeEntry.hasChildren;
716
+ const canSetNodeEditable = (nodeEntry) => resolveConfiguredNodeView(nodeEntry.node) !== LogicTreeNodeView.ACTIONS && !canToggleNode(nodeEntry);
717
+ const isNodeEditing = (nodeEntry) => canSetNodeEditable(nodeEntry) && Boolean(nodeEntry.node.data.editable);
718
+ const setNodeEditable = (nodeEntry, value) => {
719
+ if (!canSetNodeEditable(nodeEntry)) {
720
+ return;
721
+ }
722
+ withItemsMutation((nextItems) => {
723
+ setEditableState(nextItems, value ? nodeEntry.path : null);
724
+ });
725
+ };
726
+ vue.watch(() => props.items, (items) => {
727
+ itemsState.value = cloneNodes(items ?? []);
728
+ }, { deep: true, immediate: true });
729
+ const withItemsMutation = (mutator) => {
730
+ const nextItems = cloneNodes(itemsState.value);
731
+ mutator(nextItems);
732
+ itemsState.value = nextItems;
733
+ emit("update:items", cloneNodes(itemsState.value));
734
+ };
735
+ const getBranchAtPath = (nodes, parentPath, create = false) => {
736
+ let branch = nodes;
737
+ for (const index of parentPath) {
738
+ const node = branch[index];
739
+ if (!node) {
740
+ return null;
741
+ }
742
+ if (!node.children) {
743
+ if (!create) {
744
+ return null;
745
+ }
746
+ node.children = [];
747
+ }
748
+ branch = node.children;
749
+ }
750
+ return branch;
751
+ };
752
+ const getNodeAtPath = (nodes, path) => {
753
+ const branch = getBranchAtPath(nodes, path.slice(0, -1));
754
+ const index = path.at(-1);
755
+ if (index === void 0) {
756
+ return null;
757
+ }
758
+ return branch?.[index] ?? null;
759
+ };
760
+ const setEditableState = (nodes, editablePath = null) => {
761
+ const editablePathKey = editablePath ? pathToKey(editablePath) : "";
762
+ const walk = (branch, parentPath = []) => {
763
+ branch.forEach((node, index) => {
764
+ const path = [...parentPath, index];
765
+ node.data.editable = editablePathKey !== "" && pathToKey(path) === editablePathKey;
766
+ if (node.children?.length) {
767
+ walk(node.children, path);
768
+ }
769
+ });
770
+ };
771
+ walk(nodes);
772
+ };
773
+ const resolveParentMeta = (nodes, path) => {
774
+ const parentPath = path.slice(0, -1);
775
+ const parentNode = parentPath.length > 0 ? getNodeAtPath(nodes, parentPath) : null;
776
+ return {
777
+ parentNode,
778
+ parentPath,
779
+ parentPathKey: parentPath.length > 0 ? pathToKey(parentPath) : null
780
+ };
781
+ };
782
+ const flatten = (nodes, ancestors = [], parentPath = [], parentTone = null, currentSectionKey = "", parentNode = null) => nodes.flatMap((node, index, siblings) => {
783
+ const isLast = index === siblings.length - 1;
784
+ const path = [...parentPath, index];
785
+ const expanded = node.expanded !== false;
786
+ const hasChildren = Boolean(node.children?.length);
787
+ const shouldPreserveChildLevel = node.kind === LogicTreeNodeKind.BRANCH && ancestors.length === 0;
788
+ const descendsIntoChildren = hasChildren && expanded;
789
+ const isGroupedSectionNode = Boolean(currentSectionKey);
790
+ const conjunction = resolveNodeConjunction(node, index, isGroupedSectionNode, parentNode);
791
+ const connectorTone = parentTone ?? fallbackTone(node);
792
+ const conjunctionTone = resolveConjunctionTone(conjunction, connectorTone);
793
+ const connectorContinues = !isLast || descendsIntoChildren;
794
+ const connectors = applyConjunctionToneToConnectors([
795
+ ...ancestors,
796
+ ...parentTone ? [{
797
+ continues: connectorContinues,
798
+ tone: connectorTone,
799
+ visible: true
800
+ }] : []
801
+ ].map((connector, connectorIndex, source) => ({
802
+ ...connector,
803
+ placeholder: isGroupedSectionNode && connectorIndex === source.length - 1
804
+ })), conjunction, conjunctionTone);
805
+ const conjunctionOffset = resolveConjunctionOffset(conjunction);
806
+ const flattenedNodes2 = [{
807
+ conjunction,
808
+ conjunctionEndPathKey: void 0,
809
+ conjunctionOffset,
810
+ conjunctionStartPathKey: void 0,
811
+ connectors,
812
+ expanded,
813
+ groupedPosition: "",
814
+ hasChildren,
815
+ node,
816
+ parentPath,
817
+ path,
818
+ conjunctionTone,
819
+ sectionKey: currentSectionKey
820
+ }];
821
+ if (hasChildren && expanded) {
822
+ const childAncestors = shouldPreserveChildLevel ? ancestors : [
823
+ ...ancestors,
824
+ ...parentTone ? [{
825
+ continues: connectorContinues,
826
+ tone: connectorTone,
827
+ visible: true
828
+ }] : []
829
+ ];
830
+ const childParentTone = shouldPreserveChildLevel ? parentTone ?? fallbackTone(node) : fallbackTone(node);
831
+ const nextSectionKey = node.childrenView === LogicTreeChildrenView.GROUPED ? pathToKey(path) : "";
832
+ flattenedNodes2.push(...flatten(
833
+ node.children ?? [],
834
+ childAncestors,
835
+ path,
836
+ childParentTone,
837
+ nextSectionKey,
838
+ node
839
+ ));
840
+ }
841
+ return flattenedNodes2;
842
+ });
843
+ const flattenedNodes = vue.computed(() => applyConjunctionRanges(applyConjunctionBranchTones(flatten(itemsState.value))));
844
+ const nodesWithGrouping = vue.computed(() => flattenedNodes.value.map((nodeEntry, index, source) => {
845
+ if (!nodeEntry.sectionKey) {
846
+ return nodeEntry;
847
+ }
848
+ const prev = source[index - 1];
849
+ const next = source[index + 1];
850
+ const hasPrev = prev?.sectionKey === nodeEntry.sectionKey;
851
+ const hasNext = next?.sectionKey === nodeEntry.sectionKey;
852
+ const parentNode = nodeEntry.parentPath.length > 0 ? getNodeAtPath(itemsState.value, nodeEntry.parentPath) : null;
853
+ const hasGroupedHeader = parentNode?.childrenView === LogicTreeChildrenView.GROUPED;
854
+ let groupedPosition = "single";
855
+ if (!hasPrev && hasNext) {
856
+ groupedPosition = "start";
857
+ } else if (hasPrev && hasNext) {
858
+ groupedPosition = "middle";
859
+ } else if (hasPrev && !hasNext) {
860
+ groupedPosition = "end";
861
+ } else if (!hasPrev && !hasNext && hasGroupedHeader) {
862
+ groupedPosition = "end";
863
+ }
864
+ return {
865
+ ...nodeEntry,
866
+ groupedPosition
867
+ };
868
+ }));
869
+ const renderEntries = vue.computed(() => {
870
+ const nextEntries = [];
871
+ for (let index = 0; index < nodesWithGrouping.value.length; index += 1) {
872
+ const nodeEntry = nodesWithGrouping.value[index];
873
+ if (!nodeEntry.sectionKey) {
874
+ nextEntries.push({
875
+ id: `node:${pathToKey(nodeEntry.path)}`,
876
+ kind: "node",
877
+ item: nodeEntry
878
+ });
879
+ continue;
880
+ }
881
+ const sectionNodes = [nodeEntry];
882
+ let cursor = index + 1;
883
+ while (nodesWithGrouping.value[cursor]?.sectionKey === nodeEntry.sectionKey) {
884
+ sectionNodes.push(nodesWithGrouping.value[cursor]);
885
+ cursor += 1;
886
+ }
887
+ nextEntries.push({
888
+ containerId: nodeEntry.sectionKey,
889
+ footerNodes: sectionNodes.filter((sectionNode) => resolveConfiguredNodeView(sectionNode.node) === LogicTreeNodeView.ACTIONS),
890
+ id: `group:${nodeEntry.sectionKey}`,
891
+ itemNodes: sectionNodes.filter((sectionNode) => resolveConfiguredNodeView(sectionNode.node) !== LogicTreeNodeView.ACTIONS),
892
+ kind: "grouped"
893
+ });
894
+ index = cursor - 1;
895
+ }
896
+ return nextEntries;
897
+ });
898
+ const isNodeDraggable = (node) => Boolean(node.data.draggable) && !node.data.disabled && resolveConfiguredNodeView(node) !== LogicTreeNodeView.ACTIONS;
899
+ const isGroupedDraggableNode = (nodeEntry) => Boolean(nodeEntry.sectionKey) && isNodeDraggable(nodeEntry.node);
900
+ const isNodeSelected = (nodeEntry) => Boolean(nodeEntry.node.data.selected) || activePathKey.value === pathToKey(nodeEntry.path) || isNodeEditing(nodeEntry);
901
+ const resolveNodeSlotProps = (nodeEntry) => ({
902
+ editing: isNodeEditing(nodeEntry),
903
+ expanded: nodeEntry.expanded,
904
+ grouped: Boolean(nodeEntry.sectionKey),
905
+ groupedHeader: nodeEntry.node.childrenView === LogicTreeChildrenView.GROUPED,
906
+ groupedPosition: nodeEntry.groupedPosition || void 0,
907
+ hasChildren: nodeEntry.hasChildren,
908
+ highlighted: Boolean(nodeEntry.node.data.highlighted),
909
+ disabled: Boolean(nodeEntry.node.data.disabled),
910
+ node: nodeEntry.node,
911
+ onAction: (actionId, kind) => {
912
+ onAction(nodeEntry, actionId, kind);
913
+ },
914
+ onControlAction: (controlId) => {
915
+ emit("control-action", {
916
+ controlId,
917
+ nodeId: nodeEntry.node.id
918
+ });
919
+ },
920
+ onControlUpdate: (controlId, value) => {
921
+ onControlUpdate(nodeEntry.path, controlId, value);
922
+ },
923
+ onRemove: () => {
924
+ onRemove(nodeEntry.path, nodeEntry.node.id);
925
+ },
926
+ onToggle: () => {
927
+ onToggle(nodeEntry);
928
+ },
929
+ path: [...nodeEntry.path],
930
+ pathKey: pathToKey(nodeEntry.path),
931
+ nodeView: resolveNodeView(nodeEntry),
932
+ selected: isNodeSelected(nodeEntry)
933
+ });
934
+ const onControlUpdate = (path, controlId, value) => {
935
+ const currentNode = getNodeAtPath(itemsState.value, path);
936
+ if (currentNode) {
937
+ emit("node:edit", {
938
+ controlId,
939
+ nodeId: currentNode.id,
940
+ pathKey: pathToKey(path),
941
+ value
942
+ });
943
+ }
944
+ emit("control:update", {
945
+ controlId,
946
+ nodeId: currentNode?.id ?? "",
947
+ value
948
+ });
949
+ };
950
+ const onToggle = (nodeEntry) => {
951
+ const nextExpanded = !nodeEntry.expanded;
952
+ withItemsMutation((nextItems) => {
953
+ const nextNode = getNodeAtPath(nextItems, nodeEntry.path);
954
+ if (nextNode) {
955
+ nextNode.expanded = nextExpanded;
956
+ }
957
+ });
958
+ emit("toggle", {
959
+ expanded: nextExpanded,
960
+ nodeId: nodeEntry.node.id
961
+ });
962
+ };
963
+ const onRemove = (path, nodeId) => {
964
+ const pathKey = pathToKey(path);
965
+ const index = path.at(-1);
966
+ const { parentNode, parentPathKey } = resolveParentMeta(itemsState.value, path);
967
+ if (activePathKey.value === pathKey) {
968
+ activePathKey.value = "";
969
+ }
970
+ if (index !== void 0) {
971
+ emit("node:remove", {
972
+ index,
973
+ nodeId,
974
+ parentNodeId: parentNode?.id ?? null,
975
+ parentPathKey,
976
+ pathKey
977
+ });
978
+ }
979
+ emit("remove", nodeId);
980
+ };
981
+ const onAction = (nodeEntry, actionId, kind) => {
982
+ if (resolveNodeView(nodeEntry) !== LogicTreeNodeView.ACTIONS) {
983
+ return;
984
+ }
985
+ const { parentNode, parentPathKey } = resolveParentMeta(itemsState.value, nodeEntry.path);
986
+ emit("node:add", {
987
+ actionId,
988
+ kind,
989
+ parentNodeId: parentNode?.id ?? null,
990
+ parentPathKey,
991
+ triggerNodeId: nodeEntry.node.id
992
+ });
993
+ emit("action", {
994
+ actionId,
995
+ nodeId: nodeEntry.node.id
996
+ });
997
+ };
998
+ const onNodeClick = (nodeEntry) => {
999
+ if (resolveNodeView(nodeEntry) === LogicTreeNodeView.ACTIONS) {
1000
+ return;
1001
+ }
1002
+ if (canToggleNode(nodeEntry)) {
1003
+ onToggle(nodeEntry);
1004
+ activePathKey.value = pathToKey(nodeEntry.path);
1005
+ return;
1006
+ }
1007
+ if (!canSetNodeEditable(nodeEntry)) {
1008
+ withItemsMutation((nextItems) => {
1009
+ setEditableState(nextItems, null);
1010
+ });
1011
+ }
1012
+ activePathKey.value = pathToKey(nodeEntry.path);
1013
+ };
1014
+ const onOutsideClick = () => {
1015
+ activePathKey.value = "";
1016
+ withItemsMutation((nextItems) => {
1017
+ setEditableState(nextItems, null);
1018
+ });
1019
+ };
1020
+ const resolveGroupedDropPayload = (event) => {
1021
+ if (!event.accepted || !event.targetContainerId || event.sourceContainerId !== event.targetContainerId || event.placement !== "before" && event.placement !== "after") {
1022
+ return null;
1023
+ }
1024
+ return {
1025
+ itemId: event.itemId,
1026
+ payload: event.payload,
1027
+ placement: event.placement,
1028
+ sourceContainerId: event.sourceContainerId,
1029
+ targetContainerId: event.targetContainerId,
1030
+ targetIndex: event.targetIndex,
1031
+ targetItemId: event.targetItemId
1032
+ };
1033
+ };
1034
+ const onGroupedDrop = (event) => {
1035
+ const payload = resolveGroupedDropPayload(event);
1036
+ if (!payload) {
1037
+ return;
1038
+ }
1039
+ const parentPath = payload.sourceContainerId.split(".").filter(Boolean).map((segment) => Number(segment));
1040
+ withItemsMutation((nextItems) => {
1041
+ const branchNode = getNodeAtPath(nextItems, parentPath);
1042
+ const children = branchNode?.children;
1043
+ if (!children?.length) {
1044
+ return;
1045
+ }
1046
+ const sortableChildren = children.filter((child) => resolveConfiguredNodeView(child) !== LogicTreeNodeView.ACTIONS);
1047
+ const footerChildren = children.filter((child) => resolveConfiguredNodeView(child) === LogicTreeNodeView.ACTIONS);
1048
+ const movedNodeIndex = sortableChildren.findIndex((child) => child.id === payload.itemId);
1049
+ if (movedNodeIndex === -1) {
1050
+ return;
1051
+ }
1052
+ const [movedNode] = sortableChildren.splice(movedNodeIndex, 1);
1053
+ if (!movedNode) {
1054
+ return;
1055
+ }
1056
+ const targetIndex = Math.min(
1057
+ Math.max(payload.targetIndex ?? sortableChildren.length, 0),
1058
+ sortableChildren.length
1059
+ );
1060
+ sortableChildren.splice(targetIndex, 0, movedNode);
1061
+ branchNode.children = [...sortableChildren, ...footerChildren];
1062
+ });
1063
+ emit("drop", payload);
1064
+ };
1065
+ return (_ctx, _cache) => {
1066
+ return vue.openBlock(), vue.createBlock(vue.unref(UiLogicTreeRoot), { onOutsideClick }, {
1067
+ default: vue.withCtx(() => [
1068
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(renderEntries.value, (entry) => {
1069
+ return vue.openBlock(), vue.createElementBlock(vue.Fragment, {
1070
+ key: entry.id
1071
+ }, [
1072
+ entry.kind === "grouped" ? (vue.openBlock(), vue.createBlock(vue.unref(remote.RemoteSortableContainer), {
1073
+ key: 0,
1074
+ as: "div",
1075
+ class: "ui-v1-logic-tree__grouped-sortable",
1076
+ "container-id": entry.containerId,
1077
+ accepts: [entry.containerId],
1078
+ "on-drop": onGroupedDrop
1079
+ }, {
1080
+ default: vue.withCtx(() => [
1081
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(entry.itemNodes, (nodeEntry, index) => {
1082
+ return vue.openBlock(), vue.createBlock(vue.unref(remote.RemoteSortableItem), {
1083
+ key: nodeEntry.node.id,
1084
+ as: "div",
1085
+ class: "ui-v1-logic-tree__grouped-sortable-item",
1086
+ "item-id": nodeEntry.node.id,
1087
+ "container-id": entry.containerId,
1088
+ type: entry.containerId,
1089
+ index,
1090
+ payload: { nodeId: nodeEntry.node.id, pathKey: pathToKey(nodeEntry.path) },
1091
+ disabled: !isGroupedDraggableNode(nodeEntry)
1092
+ }, {
1093
+ default: vue.withCtx(() => [
1094
+ vue.createVNode(vue.unref(UiLogicTreeNode), {
1095
+ "path-key": pathToKey(nodeEntry.path),
1096
+ "node-view": resolveNodeView(nodeEntry),
1097
+ connectors: nodeEntry.connectors,
1098
+ conjunction: nodeEntry.conjunction,
1099
+ "conjunction-end-path-key": nodeEntry.conjunctionEndPathKey,
1100
+ "conjunction-label": resolveConjunctionLabel(nodeEntry.conjunction),
1101
+ "conjunction-offset": nodeEntry.conjunctionOffset,
1102
+ "conjunction-start-path-key": nodeEntry.conjunctionStartPathKey,
1103
+ "conjunction-tone": nodeEntry.conjunctionTone,
1104
+ grouped: Boolean(nodeEntry.sectionKey),
1105
+ "grouped-header": nodeEntry.node.childrenView === vue.unref(LogicTreeChildrenView).GROUPED,
1106
+ "grouped-position": nodeEntry.groupedPosition || void 0,
1107
+ editable: nodeEntry.node.data.editable,
1108
+ selected: isNodeSelected(nodeEntry),
1109
+ highlighted: Boolean(nodeEntry.node.data.highlighted),
1110
+ disabled: Boolean(nodeEntry.node.data.disabled),
1111
+ onNodeClick: ($event) => onNodeClick(nodeEntry),
1112
+ onNodeEdit: ($event) => setNodeEditable(nodeEntry, $event)
1113
+ }, {
1114
+ "conjunction-poppers": vue.withCtx(() => [
1115
+ vue.renderSlot(_ctx.$slots, "conjunction-poppers", vue.mergeProps({ ref_for: true }, resolveNodeSlotProps(nodeEntry)))
1116
+ ]),
1117
+ prefix: vue.withCtx(() => [
1118
+ vue.renderSlot(_ctx.$slots, "node-prefix", vue.mergeProps({ ref_for: true }, resolveNodeSlotProps(nodeEntry)))
1119
+ ]),
1120
+ content: vue.withCtx(() => [
1121
+ vue.createElementVNode("div", _hoisted_1$7, [
1122
+ vue.renderSlot(_ctx.$slots, "node", vue.mergeProps({ ref_for: true }, resolveNodeSlotProps(nodeEntry)), () => [
1123
+ _cache[0] || (_cache[0] = vue.createElementVNode("div", {
1124
+ class: "ui-v1-logic-tree__slot-placeholder",
1125
+ "data-ui-logic-tree-slot": "node"
1126
+ }, null, -1))
1127
+ ])
1128
+ ])
1129
+ ]),
1130
+ trailing: vue.withCtx(() => [
1131
+ vue.renderSlot(_ctx.$slots, "node-trailing", vue.mergeProps({ ref_for: true }, resolveNodeSlotProps(nodeEntry)))
1132
+ ]),
1133
+ _: 2
1134
+ }, 1032, ["path-key", "node-view", "connectors", "conjunction", "conjunction-end-path-key", "conjunction-label", "conjunction-offset", "conjunction-start-path-key", "conjunction-tone", "grouped", "grouped-header", "grouped-position", "editable", "selected", "highlighted", "disabled", "onNodeClick", "onNodeEdit"])
1135
+ ]),
1136
+ _: 2
1137
+ }, 1032, ["item-id", "container-id", "type", "index", "payload", "disabled"]);
1138
+ }), 128)),
1139
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(entry.footerNodes, (nodeEntry) => {
1140
+ return vue.openBlock(), vue.createBlock(vue.unref(UiLogicTreeNode), {
1141
+ key: nodeEntry.node.id,
1142
+ "path-key": pathToKey(nodeEntry.path),
1143
+ "node-view": resolveNodeView(nodeEntry),
1144
+ connectors: nodeEntry.connectors,
1145
+ conjunction: nodeEntry.conjunction,
1146
+ "conjunction-end-path-key": nodeEntry.conjunctionEndPathKey,
1147
+ "conjunction-label": resolveConjunctionLabel(nodeEntry.conjunction),
1148
+ "conjunction-offset": nodeEntry.conjunctionOffset,
1149
+ "conjunction-start-path-key": nodeEntry.conjunctionStartPathKey,
1150
+ "conjunction-tone": nodeEntry.conjunctionTone,
1151
+ grouped: Boolean(nodeEntry.sectionKey),
1152
+ "grouped-header": nodeEntry.node.childrenView === vue.unref(LogicTreeChildrenView).GROUPED,
1153
+ "grouped-position": nodeEntry.groupedPosition || void 0,
1154
+ editable: nodeEntry.node.data.editable,
1155
+ selected: isNodeSelected(nodeEntry),
1156
+ highlighted: Boolean(nodeEntry.node.data.highlighted),
1157
+ disabled: Boolean(nodeEntry.node.data.disabled),
1158
+ onNodeClick: ($event) => onNodeClick(nodeEntry),
1159
+ onNodeEdit: ($event) => setNodeEditable(nodeEntry, $event)
1160
+ }, {
1161
+ "conjunction-poppers": vue.withCtx(() => [
1162
+ vue.renderSlot(_ctx.$slots, "conjunction-poppers", vue.mergeProps({ ref_for: true }, resolveNodeSlotProps(nodeEntry)))
1163
+ ]),
1164
+ prefix: vue.withCtx(() => [
1165
+ vue.renderSlot(_ctx.$slots, "node-prefix", vue.mergeProps({ ref_for: true }, resolveNodeSlotProps(nodeEntry)))
1166
+ ]),
1167
+ content: vue.withCtx(() => [
1168
+ vue.createElementVNode("div", _hoisted_2$3, [
1169
+ vue.renderSlot(_ctx.$slots, "node", vue.mergeProps({ ref_for: true }, resolveNodeSlotProps(nodeEntry)), () => [
1170
+ _cache[1] || (_cache[1] = vue.createElementVNode("div", {
1171
+ class: "ui-v1-logic-tree__slot-placeholder",
1172
+ "data-ui-logic-tree-slot": "node"
1173
+ }, null, -1))
1174
+ ])
1175
+ ])
1176
+ ]),
1177
+ trailing: vue.withCtx(() => [
1178
+ vue.renderSlot(_ctx.$slots, "node-trailing", vue.mergeProps({ ref_for: true }, resolveNodeSlotProps(nodeEntry)))
1179
+ ]),
1180
+ _: 2
1181
+ }, 1032, ["path-key", "node-view", "connectors", "conjunction", "conjunction-end-path-key", "conjunction-label", "conjunction-offset", "conjunction-start-path-key", "conjunction-tone", "grouped", "grouped-header", "grouped-position", "editable", "selected", "highlighted", "disabled", "onNodeClick", "onNodeEdit"]);
1182
+ }), 128))
1183
+ ]),
1184
+ _: 2
1185
+ }, 1032, ["container-id", "accepts"])) : (vue.openBlock(), vue.createBlock(vue.unref(UiLogicTreeNode), {
1186
+ key: 1,
1187
+ "path-key": pathToKey(entry.item.path),
1188
+ "node-view": resolveNodeView(entry.item),
1189
+ connectors: entry.item.connectors,
1190
+ conjunction: entry.item.conjunction,
1191
+ "conjunction-end-path-key": entry.item.conjunctionEndPathKey,
1192
+ "conjunction-label": resolveConjunctionLabel(entry.item.conjunction),
1193
+ "conjunction-offset": entry.item.conjunctionOffset,
1194
+ "conjunction-start-path-key": entry.item.conjunctionStartPathKey,
1195
+ "conjunction-tone": entry.item.conjunctionTone,
1196
+ grouped: Boolean(entry.item.sectionKey),
1197
+ "grouped-header": entry.item.node.childrenView === vue.unref(LogicTreeChildrenView).GROUPED,
1198
+ "grouped-position": entry.item.groupedPosition || void 0,
1199
+ editable: entry.item.node.data.editable,
1200
+ selected: isNodeSelected(entry.item),
1201
+ highlighted: Boolean(entry.item.node.data.highlighted),
1202
+ disabled: Boolean(entry.item.node.data.disabled),
1203
+ onNodeClick: ($event) => onNodeClick(entry.item),
1204
+ onNodeEdit: ($event) => setNodeEditable(entry.item, $event)
1205
+ }, {
1206
+ "conjunction-poppers": vue.withCtx(() => [
1207
+ vue.renderSlot(_ctx.$slots, "conjunction-poppers", vue.mergeProps({ ref_for: true }, resolveNodeSlotProps(entry.item)))
1208
+ ]),
1209
+ prefix: vue.withCtx(() => [
1210
+ vue.renderSlot(_ctx.$slots, "node-prefix", vue.mergeProps({ ref_for: true }, resolveNodeSlotProps(entry.item)))
1211
+ ]),
1212
+ content: vue.withCtx(() => [
1213
+ vue.createElementVNode("div", _hoisted_3$3, [
1214
+ vue.renderSlot(_ctx.$slots, "node", vue.mergeProps({ ref_for: true }, resolveNodeSlotProps(entry.item)), () => [
1215
+ _cache[2] || (_cache[2] = vue.createElementVNode("div", {
1216
+ class: "ui-v1-logic-tree__slot-placeholder",
1217
+ "data-ui-logic-tree-slot": "node"
1218
+ }, null, -1))
1219
+ ])
1220
+ ])
1221
+ ]),
1222
+ trailing: vue.withCtx(() => [
1223
+ vue.renderSlot(_ctx.$slots, "node-trailing", vue.mergeProps({ ref_for: true }, resolveNodeSlotProps(entry.item)))
1224
+ ]),
1225
+ _: 2
1226
+ }, 1032, ["path-key", "node-view", "connectors", "conjunction", "conjunction-end-path-key", "conjunction-label", "conjunction-offset", "conjunction-start-path-key", "conjunction-tone", "grouped", "grouped-header", "grouped-position", "editable", "selected", "highlighted", "disabled", "onNodeClick", "onNodeEdit"]))
1227
+ ], 64);
1228
+ }), 128))
1229
+ ]),
1230
+ _: 3
1231
+ });
1232
+ };
1233
+ }
1234
+ });
1235
+ const _hoisted_1$6 = {
1236
+ xmlns: "http://www.w3.org/2000/svg",
1237
+ viewBox: "0 0 20 20"
1238
+ };
1239
+ function render$2(_ctx, _cache) {
1240
+ return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1$6, [..._cache[0] || (_cache[0] = [
1241
+ vue.createElementVNode("path", {
1242
+ fill: "currentColor",
1243
+ "fill-rule": "evenodd",
1244
+ d: "M7.499 6.667a1.667 1.667 0 1 0 0-3.333 1.667 1.667 0 0 0 0 3.333M5.832 10a1.667 1.667 0 1 1 3.333 0 1.667 1.667 0 0 1-3.333 0m1.667 3.334a1.667 1.667 0 1 0 0 3.333 1.667 1.667 0 0 0 0-3.334M14.165 5a1.667 1.667 0 1 1-3.333 0 1.667 1.667 0 0 1 3.333 0M12.5 8.334a1.667 1.667 0 1 0 0 3.333 1.667 1.667 0 0 0 0-3.333M10.832 15a1.667 1.667 0 1 1 3.333 0 1.667 1.667 0 0 1-3.333 0",
1245
+ "clip-rule": "evenodd"
1246
+ }, null, -1)
1247
+ ])]);
1248
+ }
1249
+ const IconDrag = { render: render$2 };
1250
+ const _sfc_main$c = /* @__PURE__ */ vue.defineComponent({
1251
+ __name: "UiLogicTreeDragHandle",
1252
+ props: {
1253
+ disabled: { type: Boolean, default: false },
1254
+ for: { default: void 0 }
1255
+ },
1256
+ setup(__props) {
1257
+ const props = __props;
1258
+ return (_ctx, _cache) => {
1259
+ return vue.openBlock(), vue.createBlock(vue.unref(remote.RemoteDragHandle), {
1260
+ for: props.for,
1261
+ disabled: props.disabled,
1262
+ class: vue.normalizeClass([{
1263
+ "ui-v1-logic-tree-drag-handle_disabled": props.disabled
1264
+ }, "ui-v1-logic-tree-drag-handle"]),
1265
+ as: "span",
1266
+ "data-skip-node-click": "true"
1267
+ }, {
1268
+ default: vue.withCtx(() => [
1269
+ vue.renderSlot(_ctx.$slots, "default", {}, () => [
1270
+ vue.createVNode(vue.unref(IconDrag), { "aria-hidden": "true" })
1271
+ ])
1272
+ ]),
1273
+ _: 3
1274
+ }, 8, ["for", "disabled", "class"]);
1275
+ };
1276
+ }
1277
+ });
320
1278
  const UiModalSidebarType = "UiModalSidebar";
321
1279
  const UiModalSidebar = remote.defineRemoteComponent(
322
1280
  UiModalSidebarType,
@@ -414,7 +1372,7 @@ const _hoisted_4$1 = {
414
1372
  key: 0,
415
1373
  class: "ui-v1-page-header__addon"
416
1374
  };
417
- const _sfc_main$a = /* @__PURE__ */ vue.defineComponent({
1375
+ const _sfc_main$b = /* @__PURE__ */ vue.defineComponent({
418
1376
  ...{
419
1377
  inheritAttrs: false
420
1378
  },
@@ -558,6 +1516,225 @@ const _sfc_main$a = /* @__PURE__ */ vue.defineComponent({
558
1516
  };
559
1517
  }
560
1518
  });
1519
+ var APPEARANCE$3 = /* @__PURE__ */ ((APPEARANCE2) => {
1520
+ APPEARANCE2["OUTLINED"] = "outlined";
1521
+ APPEARANCE2["PRIMARY"] = "primary";
1522
+ APPEARANCE2["SECONDARY"] = "secondary";
1523
+ APPEARANCE2["TERTIARY"] = "tertiary";
1524
+ return APPEARANCE2;
1525
+ })(APPEARANCE$3 || {});
1526
+ var SIZE$5 = /* @__PURE__ */ ((SIZE2) => {
1527
+ SIZE2["LG"] = "lg";
1528
+ SIZE2["MD"] = "md";
1529
+ SIZE2["SM"] = "sm";
1530
+ SIZE2["XS"] = "xs";
1531
+ return SIZE2;
1532
+ })(SIZE$5 || {});
1533
+ var VARIANT = /* @__PURE__ */ ((VARIANT2) => {
1534
+ VARIANT2["DEFAULT"] = "default";
1535
+ VARIANT2["SUCCESS"] = "success";
1536
+ VARIANT2["DANGER"] = "danger";
1537
+ return VARIANT2;
1538
+ })(VARIANT || {});
1539
+ const UiPopconfirmTriggerType = "UiPopconfirmTrigger";
1540
+ const UiPopconfirmTrigger = remote.defineRemoteComponent(UiPopconfirmTriggerType, {
1541
+ emits: [
1542
+ "click"
1543
+ ]
1544
+ });
1545
+ const UiPopconfirmPopperType = "UiPopconfirmPopper";
1546
+ const UiPopconfirmPopper = remote.defineRemoteComponent(UiPopconfirmPopperType, {
1547
+ emits: [
1548
+ "update:visible",
1549
+ "toggle",
1550
+ "cancel",
1551
+ "ok"
1552
+ ],
1553
+ methods: {
1554
+ adjust: remote.defineRemoteMethod(),
1555
+ close: remote.defineRemoteMethod(),
1556
+ dispose: remote.defineRemoteMethod(),
1557
+ open: remote.defineRemoteMethod()
1558
+ },
1559
+ slots: [
1560
+ "title",
1561
+ "cancel-text",
1562
+ "ok-text"
1563
+ ]
1564
+ });
1565
+ const _sfc_main$a = /* @__PURE__ */ vue.defineComponent({
1566
+ __name: "UiPopconfirm",
1567
+ props: {
1568
+ id: {
1569
+ type: String,
1570
+ default: void 0
1571
+ },
1572
+ visible: {
1573
+ type: Boolean,
1574
+ default: false
1575
+ },
1576
+ title: {
1577
+ type: String,
1578
+ default: ""
1579
+ },
1580
+ okVariant: {
1581
+ type: String,
1582
+ default: VARIANT.DEFAULT
1583
+ },
1584
+ okTitle: {
1585
+ type: null,
1586
+ default: null
1587
+ },
1588
+ cancelTitle: {
1589
+ type: null,
1590
+ default: null
1591
+ },
1592
+ cancelAppearance: {
1593
+ type: String,
1594
+ default: APPEARANCE$3.SECONDARY
1595
+ },
1596
+ cancelVariant: {
1597
+ type: String,
1598
+ default: VARIANT.DEFAULT
1599
+ },
1600
+ buttonSize: {
1601
+ type: String,
1602
+ default: SIZE$5.XS
1603
+ },
1604
+ placement: {
1605
+ type: [String, Object],
1606
+ default: "bottom-start"
1607
+ },
1608
+ popperClass: {
1609
+ type: null,
1610
+ default: null
1611
+ },
1612
+ popperOptions: {
1613
+ type: Object,
1614
+ default: () => ({})
1615
+ },
1616
+ locale: {
1617
+ type: String,
1618
+ default: void 0
1619
+ }
1620
+ },
1621
+ emits: ["update:visible", "toggle", "cancel", "ok"],
1622
+ setup(__props, { expose: __expose, emit: __emit }) {
1623
+ const props = __props;
1624
+ const emit = __emit;
1625
+ const popper = vue.useTemplateRef("popper");
1626
+ const visibleState = vue.ref(props.visible);
1627
+ const setVisible = (visible) => {
1628
+ if (visibleState.value === visible) {
1629
+ return;
1630
+ }
1631
+ visibleState.value = visible;
1632
+ emit("update:visible", visible);
1633
+ emit("toggle", visible);
1634
+ };
1635
+ const open = async () => {
1636
+ setVisible(true);
1637
+ };
1638
+ const close = async () => {
1639
+ setVisible(false);
1640
+ };
1641
+ const toggle = async () => {
1642
+ if (visibleState.value) {
1643
+ await close();
1644
+ } else {
1645
+ await open();
1646
+ }
1647
+ };
1648
+ const onUpdateVisible = (visible) => {
1649
+ setVisible(visible);
1650
+ };
1651
+ const onCancel = () => {
1652
+ emit("cancel");
1653
+ void close();
1654
+ };
1655
+ const onOk = () => {
1656
+ emit("ok");
1657
+ void close();
1658
+ };
1659
+ vue.watch(() => props.visible, (visible) => {
1660
+ setVisible(visible);
1661
+ });
1662
+ __expose({
1663
+ adjust: async () => {
1664
+ await popper.value?.adjust();
1665
+ },
1666
+ close,
1667
+ dispose: async () => {
1668
+ await popper.value?.dispose();
1669
+ },
1670
+ open,
1671
+ toggle
1672
+ });
1673
+ return (_ctx, _cache) => {
1674
+ return vue.openBlock(), vue.createBlock(vue.unref(UiPopperConnector), null, {
1675
+ default: vue.withCtx(() => [
1676
+ vue.createVNode(vue.unref(UiPopconfirmTrigger), {
1677
+ visible: visibleState.value,
1678
+ onClick: toggle
1679
+ }, {
1680
+ default: vue.withCtx(() => [
1681
+ vue.renderSlot(_ctx.$slots, "trigger", { open: visibleState.value }),
1682
+ vue.createVNode(vue.unref(UiPopconfirmPopper), {
1683
+ id: __props.id,
1684
+ ref_key: "popper",
1685
+ ref: popper,
1686
+ visible: visibleState.value,
1687
+ title: __props.title,
1688
+ "ok-variant": __props.okVariant,
1689
+ "ok-title": __props.okTitle,
1690
+ "cancel-title": __props.cancelTitle,
1691
+ "cancel-appearance": __props.cancelAppearance,
1692
+ "cancel-variant": __props.cancelVariant,
1693
+ "button-size": __props.buttonSize,
1694
+ placement: __props.placement,
1695
+ "popper-class": __props.popperClass,
1696
+ "popper-options": __props.popperOptions,
1697
+ locale: __props.locale,
1698
+ onCancel,
1699
+ onOk,
1700
+ "onUpdate:visible": onUpdateVisible
1701
+ }, vue.createSlots({
1702
+ default: vue.withCtx(() => [
1703
+ vue.renderSlot(_ctx.$slots, "default")
1704
+ ]),
1705
+ _: 2
1706
+ }, [
1707
+ _ctx.$slots["title"] ? {
1708
+ name: "title",
1709
+ fn: vue.withCtx(() => [
1710
+ vue.renderSlot(_ctx.$slots, "title")
1711
+ ]),
1712
+ key: "0"
1713
+ } : void 0,
1714
+ _ctx.$slots["cancel-text"] ? {
1715
+ name: "cancel-text",
1716
+ fn: vue.withCtx(() => [
1717
+ vue.renderSlot(_ctx.$slots, "cancel-text")
1718
+ ]),
1719
+ key: "1"
1720
+ } : void 0,
1721
+ _ctx.$slots["ok-text"] ? {
1722
+ name: "ok-text",
1723
+ fn: vue.withCtx(() => [
1724
+ vue.renderSlot(_ctx.$slots, "ok-text")
1725
+ ]),
1726
+ key: "2"
1727
+ } : void 0
1728
+ ]), 1032, ["id", "visible", "title", "ok-variant", "ok-title", "cancel-title", "cancel-appearance", "cancel-variant", "button-size", "placement", "popper-class", "popper-options", "locale"])
1729
+ ]),
1730
+ _: 3
1731
+ }, 8, ["visible"])
1732
+ ]),
1733
+ _: 3
1734
+ });
1735
+ };
1736
+ }
1737
+ });
561
1738
  const UiRadioType = "UiRadio";
562
1739
  const UiRadio = remote.defineRemoteComponent(
563
1740
  UiRadioType,
@@ -2048,143 +3225,6 @@ const UiMenuItemGroup = remote.defineRemoteComponent(
2048
3225
  "quantity"
2049
3226
  ]
2050
3227
  );
2051
- const pluralization_en_GB = (choice) => choice === 1 ? 0 : 1;
2052
- const pluralization_es_ES = (choice) => choice === 1 ? 0 : 1;
2053
- const pluralization_ru_RU = (choice, choicesLength) => {
2054
- if (choicesLength === 2) {
2055
- return choice === 1 ? 0 : 1;
2056
- }
2057
- const mod100 = choice % 100;
2058
- return mod100 % 10 === 1 && mod100 !== 11 ? 0 : mod100 % 10 >= 2 && mod100 % 10 <= 4 && !(mod100 >= 10 && mod100 < 15) ? 1 : 2;
2059
- };
2060
- const get = (messages, path) => {
2061
- let i = 0;
2062
- let slice = messages[path[0]];
2063
- while (i < path.length) {
2064
- if (typeof slice === "string" && i + 1 === path.length) {
2065
- return slice;
2066
- }
2067
- if (typeof slice !== "object") {
2068
- return void 0;
2069
- }
2070
- slice = slice[path[++i]];
2071
- }
2072
- return slice;
2073
- };
2074
- const replace = (message, values) => {
2075
- return Object.keys(values).reduce((message2, key) => {
2076
- const pattern = new RegExp(`\\{${key}\\}`, "g");
2077
- const replacement = String(values[key]);
2078
- return message2.replace(pattern, replacement);
2079
- }, message);
2080
- };
2081
- const compile = (messages, path, values = void 0) => {
2082
- const message = get(messages, path);
2083
- if (typeof message === "string" && values) {
2084
- return replace(message, values);
2085
- }
2086
- return message;
2087
- };
2088
- const fail = (message) => {
2089
- throw new Error(message);
2090
- };
2091
- const t = (locale2, messages, path, values = void 0) => {
2092
- const keys = path.split(".");
2093
- if (locale2) {
2094
- const message = compile(messages[locale2] ?? {}, keys, values);
2095
- return typeof message !== "object" ? message : fail(`Translation for "${locale2}:${path}" is not translatable`);
2096
- }
2097
- return void 0;
2098
- };
2099
- const plural = (template, choice, rule) => {
2100
- const forms = template.split("|");
2101
- return forms[rule(choice, forms.length)];
2102
- };
2103
- class I18n {
2104
- parent;
2105
- messages;
2106
- computed;
2107
- pluralization;
2108
- fallback;
2109
- constructor(options = void 0, parent = void 0) {
2110
- this.parent = parent;
2111
- this.messages = options?.messages ?? {};
2112
- this.computed = options?.computed ?? {};
2113
- this.pluralization = {
2114
- "en-GB": pluralization_en_GB,
2115
- "es-ES": pluralization_es_ES,
2116
- "ru-RU": pluralization_ru_RU,
2117
- ...options?.pluralization ?? {}
2118
- };
2119
- this.fallback = options?.fallback;
2120
- }
2121
- t(locale2, path, values = void 0) {
2122
- try {
2123
- const _t = (locale22) => t(locale22, this.messages, path, values);
2124
- return _t(locale2) ?? _t(this.fallback) ?? fail(`Translation for "${path}" does not exists`);
2125
- } catch (e) {
2126
- if (this.parent) {
2127
- return this.parent.t(locale2, path, values);
2128
- }
2129
- throw e;
2130
- }
2131
- }
2132
- tc(locale2, path, choice, values = void 0) {
2133
- return plural(
2134
- this.t(
2135
- locale2,
2136
- path,
2137
- values
2138
- ),
2139
- choice,
2140
- this.pluralization[locale2]
2141
- );
2142
- }
2143
- compute(locale2, key, values) {
2144
- const computed = this.computed[key];
2145
- if (computed) {
2146
- return computed(localize(this, locale2), values);
2147
- }
2148
- if (this.parent) {
2149
- return this.parent.compute(locale2, key, values);
2150
- }
2151
- return fail("Key " + key + " is not registered");
2152
- }
2153
- extend(options) {
2154
- return new I18n({
2155
- pluralization: this.pluralization,
2156
- fallback: this.fallback,
2157
- ...options
2158
- }, this);
2159
- }
2160
- }
2161
- const localize = (i18n, locale2) => ({
2162
- t(path, values = void 0) {
2163
- return i18n.t(locale2, path, values);
2164
- },
2165
- tc(path, choice, values = void 0) {
2166
- return i18n.tc(locale2, path, choice, values);
2167
- },
2168
- compute(key, values) {
2169
- return i18n.compute(locale2, key, values);
2170
- }
2171
- });
2172
- const fallback = "en-GB";
2173
- const define = (options = void 0, parent = void 0) => {
2174
- const i18n = new I18n({
2175
- ...options,
2176
- fallback
2177
- }, parent);
2178
- const extend = (i18n2, options2 = void 0) => options2 ? i18n2.extend(options2) : i18n2;
2179
- return {
2180
- i18n,
2181
- init: (locale2, options2 = void 0) => localize(
2182
- extend(i18n, options2),
2183
- locale2
2184
- ),
2185
- fallback
2186
- };
2187
- };
2188
3228
  const selected$2 = "Selected";
2189
3229
  const search$2 = { "placeholder": "", "noResult": "Nothing found" };
2190
3230
  const messages_en_GB = {
@@ -2248,7 +3288,6 @@ const RegisterGroupKey = /* @__PURE__ */ Symbol("UiSelectOptionGroupRegister");
2248
3288
  const UnregisterGroupKey = /* @__PURE__ */ Symbol("UiSelectOptionGroupUnregister");
2249
3289
  const RegisterHeaderOptionKey = /* @__PURE__ */ Symbol("UiSelectOptionGroupRegisterHeaderOption");
2250
3290
  const UnregisterHeaderOptionKey = /* @__PURE__ */ Symbol("UiSelectOptionGroupUnregisterHeaderOption");
2251
- const I18nInjectKey = /* @__PURE__ */ Symbol("$embedI18n");
2252
3291
  const UiSelectTriggerType = "UiSelectTrigger";
2253
3292
  const UiSelectTrigger = remote.defineRemoteComponent(UiSelectTriggerType, {
2254
3293
  emits: [
@@ -3061,6 +4100,11 @@ const createEndpointRoot = async (channel) => {
3061
4100
  "UiInfobox",
3062
4101
  "UiLink",
3063
4102
  "UiLoader",
4103
+ "UiLogicTreeCaret",
4104
+ "UiLogicTreeNode",
4105
+ "UiLogicTreeNodeIcon",
4106
+ "UiLogicTreeNodeItem",
4107
+ "UiLogicTreeRoot",
3064
4108
  "UiMenuItem",
3065
4109
  "UiMenuItemGroup",
3066
4110
  "UiModalSidebar",
@@ -3070,6 +4114,8 @@ const createEndpointRoot = async (channel) => {
3070
4114
  "UiPageHeader",
3071
4115
  "UiPageHeaderLayout",
3072
4116
  "UiPageHeaderTitle",
4117
+ "UiPopconfirmPopper",
4118
+ "UiPopconfirmTrigger",
3073
4119
  "UiPopper",
3074
4120
  "UiPopperConnector",
3075
4121
  "UiPopperTarget",
@@ -3192,6 +4238,11 @@ function detectLocale() {
3192
4238
  exports.ALIGN = ALIGN;
3193
4239
  exports.DIRECTION = DIRECTION;
3194
4240
  exports.ImageWorkersKey = ImageWorkersKey;
4241
+ exports.LogicTreeChildrenView = LogicTreeChildrenView;
4242
+ exports.LogicTreeConjunction = LogicTreeConjunction;
4243
+ exports.LogicTreeNodeKind = LogicTreeNodeKind;
4244
+ exports.LogicTreeNodeView = LogicTreeNodeView;
4245
+ exports.LogicTreeTone = LogicTreeTone;
3195
4246
  exports.RADIO_SWITCH_APPEARANCE = APPEARANCE$2;
3196
4247
  exports.RADIO_SWITCH_SIZE = SIZE$4;
3197
4248
  exports.SKELETON_ANIMATION = ANIMATION;
@@ -3227,13 +4278,18 @@ exports.UiDatePickerType = UiDatePickerType;
3227
4278
  exports.UiDateType = UiDateType;
3228
4279
  exports.UiError = UiError;
3229
4280
  exports.UiErrorType = UiErrorType;
3230
- exports.UiField = _sfc_main$b;
4281
+ exports.UiField = _sfc_main$e;
3231
4282
  exports.UiInfobox = UiInfobox;
3232
4283
  exports.UiInfoboxType = UiInfoboxType;
3233
4284
  exports.UiLink = UiLink;
3234
4285
  exports.UiLinkType = UiLinkType;
3235
4286
  exports.UiLoader = UiLoader;
3236
4287
  exports.UiLoaderType = UiLoaderType;
4288
+ exports.UiLogicTree = _sfc_main$d;
4289
+ exports.UiLogicTreeCaret = UiLogicTreeCaret;
4290
+ exports.UiLogicTreeDragHandle = _sfc_main$c;
4291
+ exports.UiLogicTreeNodeIcon = UiLogicTreeNodeIcon;
4292
+ exports.UiLogicTreeNodeItem = UiLogicTreeNodeItem;
3237
4293
  exports.UiMenuItem = UiMenuItem;
3238
4294
  exports.UiMenuItemGroup = UiMenuItemGroup;
3239
4295
  exports.UiMenuItemGroupType = UiMenuItemGroupType;
@@ -3246,7 +4302,8 @@ exports.UiModalWindowSurfaceType = UiModalWindowSurfaceType;
3246
4302
  exports.UiModalWindowType = UiModalWindowType;
3247
4303
  exports.UiNumberStepper = UiNumberStepper;
3248
4304
  exports.UiNumberStepperType = UiNumberStepperType;
3249
- exports.UiPageHeader = _sfc_main$a;
4305
+ exports.UiPageHeader = _sfc_main$b;
4306
+ exports.UiPopconfirm = _sfc_main$a;
3250
4307
  exports.UiPopper = UiPopper;
3251
4308
  exports.UiPopperConnector = UiPopperConnector;
3252
4309
  exports.UiPopperConnectorType = UiPopperConnectorType;