@cpsoft13/z-agent-ui 0.2.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (165) hide show
  1. package/bin/lines-baseline.json +1 -15
  2. package/bin/text-baseline.json +1 -2
  3. package/dist/build-info.json +2 -2
  4. package/dist/components/context-menu/ContextMenu.js +7 -7
  5. package/dist/components/context-menu/ContextMenu.js.map +1 -1
  6. package/dist/components/date-range/DateRange.js +4 -4
  7. package/dist/components/date-range/DateRange.js.map +1 -1
  8. package/dist/components/datepicker/Datepicker.js +207 -332
  9. package/dist/components/datepicker/Datepicker.js.map +1 -1
  10. package/dist/components/datepicker/datepicker-keyboard.js +66 -0
  11. package/dist/components/datepicker/datepicker-keyboard.js.map +1 -0
  12. package/dist/components/datepicker/datepicker-panel-render.js +78 -0
  13. package/dist/components/datepicker/datepicker-panel-render.js.map +1 -0
  14. package/dist/components/form/Form.js +69 -47
  15. package/dist/components/form/Form.js.map +1 -1
  16. package/dist/components/form/form-context.js +9 -0
  17. package/dist/components/form/form-context.js.map +1 -0
  18. package/dist/components/form.js +2 -0
  19. package/dist/components/form.js.map +1 -1
  20. package/dist/components/menu/Menu.js +27 -27
  21. package/dist/components/menu/Menu.js.map +1 -1
  22. package/dist/components/popover/Popover.js +1 -1
  23. package/dist/components/popover/Popover.js.map +1 -1
  24. package/dist/components/select/Select.js +235 -351
  25. package/dist/components/select/Select.js.map +1 -1
  26. package/dist/components/select/option-search.js +49 -0
  27. package/dist/components/select/option-search.js.map +1 -0
  28. package/dist/components/select/select-render.js +75 -0
  29. package/dist/components/select/select-render.js.map +1 -0
  30. package/dist/components/select/selection-strategy.js +151 -0
  31. package/dist/components/select/selection-strategy.js.map +1 -0
  32. package/dist/components/time-picker/TimePicker.js +1 -1
  33. package/dist/components/time-picker/TimePicker.js.map +1 -1
  34. package/dist/components/tooltip/Tooltip.js +16 -16
  35. package/dist/components/tooltip/Tooltip.js.map +1 -1
  36. package/dist/core/BaseElement.js +96 -77
  37. package/dist/core/BaseElement.js.map +1 -1
  38. package/dist/core/context.js +68 -0
  39. package/dist/core/context.js.map +1 -0
  40. package/dist/core/controller.js +2 -0
  41. package/dist/core/controller.js.map +1 -0
  42. package/dist/core/public.js +35 -30
  43. package/dist/core/public.js.map +1 -1
  44. package/dist/core.js +95 -90
  45. package/dist/core.js.map +1 -1
  46. package/dist/doc/doc-template-editor-core.js +12 -11
  47. package/dist/doc/doc-template-editor-core.js.map +1 -1
  48. package/dist/doc/doc-template-editor-panel.css.js +202 -0
  49. package/dist/doc/doc-template-editor-panel.css.js.map +1 -0
  50. package/dist/doc/doc-template-editor.css.js +1 -200
  51. package/dist/doc/doc-template-editor.css.js.map +1 -1
  52. package/dist/flow/Flow.js +104 -195
  53. package/dist/flow/Flow.js.map +1 -1
  54. package/dist/flow/flow-keyboard-controller.js +101 -0
  55. package/dist/flow/flow-keyboard-controller.js.map +1 -0
  56. package/dist/primitives/overlay/floatingPanel.js +6 -2
  57. package/dist/primitives/overlay/floatingPanel.js.map +1 -1
  58. package/dist/report/chart/Chart.js +271 -761
  59. package/dist/report/chart/Chart.js.map +1 -1
  60. package/dist/report/chart/chart-brush-controller.js +187 -0
  61. package/dist/report/chart/chart-brush-controller.js.map +1 -0
  62. package/dist/report/chart/chart-layout-pipeline.js +158 -0
  63. package/dist/report/chart/chart-layout-pipeline.js.map +1 -0
  64. package/dist/report/chart/chart-zoom.js +79 -0
  65. package/dist/report/chart/chart-zoom.js.map +1 -0
  66. package/dist/report/chart/geometry/build.js +41 -26
  67. package/dist/report/chart/geometry/build.js.map +1 -1
  68. package/dist/report/chart/geometry/extra-flow-dist.js +283 -0
  69. package/dist/report/chart/geometry/extra-flow-dist.js.map +1 -0
  70. package/dist/report/chart/geometry/extra-radial-grid.js +280 -0
  71. package/dist/report/chart/geometry/extra-radial-grid.js.map +1 -0
  72. package/dist/report/chart/geometry/extra-shared.js +36 -0
  73. package/dist/report/chart/geometry/extra-shared.js.map +1 -0
  74. package/dist/report/chart/geometry/extra.js +20 -583
  75. package/dist/report/chart/geometry/extra.js.map +1 -1
  76. package/dist/report/chart/geometry/registry.js +20 -0
  77. package/dist/report/chart/geometry/registry.js.map +1 -0
  78. package/dist/report/chart.js +12 -6
  79. package/dist/report/chart.js.map +1 -1
  80. package/dist/report/gantt/Gantt.js +199 -308
  81. package/dist/report/gantt/Gantt.js.map +1 -1
  82. package/dist/report/gantt/gantt-bars.css.js +247 -0
  83. package/dist/report/gantt/gantt-bars.css.js.map +1 -0
  84. package/dist/report/gantt/gantt-edit-controller.js +94 -0
  85. package/dist/report/gantt/gantt-edit-controller.js.map +1 -0
  86. package/dist/report/gantt/gantt.css.js +0 -272
  87. package/dist/report/gantt/gantt.css.js.map +1 -1
  88. package/dist/report/table/ReportTable.js +336 -493
  89. package/dist/report/table/ReportTable.js.map +1 -1
  90. package/dist/report/table/report-table-config.css.js +172 -0
  91. package/dist/report/table/report-table-config.css.js.map +1 -0
  92. package/dist/report/table/report-table-types.js.map +1 -1
  93. package/dist/report/table/report-table.css.js +0 -176
  94. package/dist/report/table/report-table.css.js.map +1 -1
  95. package/dist/report/table/table-cell-registry.js +29 -0
  96. package/dist/report/table/table-cell-registry.js.map +1 -0
  97. package/dist/report/table/table-keyboard-controller.js +96 -0
  98. package/dist/report/table/table-keyboard-controller.js.map +1 -0
  99. package/dist/report/table/table-pipeline.js +36 -0
  100. package/dist/report/table/table-pipeline.js.map +1 -0
  101. package/dist/report/table/table-render.js +97 -96
  102. package/dist/report/table/table-render.js.map +1 -1
  103. package/dist/report/table/table-scroll-controller.js +33 -0
  104. package/dist/report/table/table-scroll-controller.js.map +1 -0
  105. package/dist/report/table.js +7 -2
  106. package/dist/report/table.js.map +1 -1
  107. package/dist/report.js +39 -28
  108. package/dist/report.js.map +1 -1
  109. package/dist/types/components/datepicker/Datepicker.d.ts +1 -109
  110. package/dist/types/components/datepicker/datepicker-keyboard.d.ts +21 -0
  111. package/dist/types/components/datepicker/datepicker-panel-render.d.ts +25 -0
  112. package/dist/types/components/form/Form.d.ts +7 -2
  113. package/dist/types/components/form/form-context.d.ts +11 -0
  114. package/dist/types/components/form/index.d.ts +1 -1
  115. package/dist/types/components/select/Select.d.ts +7 -110
  116. package/dist/types/components/select/option-search.d.ts +38 -0
  117. package/dist/types/components/select/select-render.d.ts +39 -0
  118. package/dist/types/components/select/selection-strategy.d.ts +86 -0
  119. package/dist/types/core/BaseElement.d.ts +7 -1
  120. package/dist/types/core/context.d.ts +66 -0
  121. package/dist/types/core/controller.d.ts +22 -0
  122. package/dist/types/core/public.d.ts +2 -0
  123. package/dist/types/flow/Flow.d.ts +3 -76
  124. package/dist/types/flow/flow-keyboard-controller.d.ts +35 -0
  125. package/dist/types/primitives/overlay/floatingPanel.d.ts +2 -0
  126. package/dist/types/report/chart/Chart.d.ts +2 -245
  127. package/dist/types/report/chart/chart-brush-controller.d.ts +59 -0
  128. package/dist/types/report/chart/chart-layout-pipeline.d.ts +42 -0
  129. package/dist/types/report/chart/chart-zoom.d.ts +12 -0
  130. package/dist/types/report/chart/geometry/build.d.ts +2 -0
  131. package/dist/types/report/chart/geometry/extra-flow-dist.d.ts +6 -0
  132. package/dist/types/report/chart/geometry/extra-radial-grid.d.ts +6 -0
  133. package/dist/types/report/chart/geometry/extra-shared.d.ts +24 -0
  134. package/dist/types/report/chart/geometry/extra.d.ts +2 -34
  135. package/dist/types/report/chart/geometry/registry.d.ts +26 -0
  136. package/dist/types/report/chart/index.d.ts +1 -0
  137. package/dist/types/report/gantt/Gantt.d.ts +7 -97
  138. package/dist/types/report/gantt/gantt-edit-controller.d.ts +34 -0
  139. package/dist/types/report/table/ReportTable.d.ts +9 -180
  140. package/dist/types/report/table/index.d.ts +1 -0
  141. package/dist/types/report/table/report-table-types.d.ts +2 -0
  142. package/dist/types/report/table/table-cell-registry.d.ts +17 -0
  143. package/dist/types/report/table/table-keyboard-controller.d.ts +30 -0
  144. package/dist/types/report/table/table-pipeline.d.ts +33 -0
  145. package/dist/types/report/table/table-scroll-controller.d.ts +25 -0
  146. package/dist/z-agent-ui.js +35 -30
  147. package/dist/z-agent-ui.js.map +1 -1
  148. package/package.json +1 -1
  149. package/registry/component-manifest.json +39 -7
  150. package/src/components/context-menu/ContextMenu.ts +1 -1
  151. package/src/components/date-range/DateRange.ts +1 -1
  152. package/src/components/datepicker/Datepicker.ts +99 -417
  153. package/src/components/datepicker/datepicker-keyboard.ts +94 -0
  154. package/src/components/datepicker/datepicker-panel-render.ts +169 -0
  155. package/src/components/form/Form.ts +39 -11
  156. package/src/components/form/form-context.ts +11 -0
  157. package/src/components/form/index.ts +1 -1
  158. package/src/components/menu/Menu.ts +1 -1
  159. package/src/components/popover/Popover.ts +1 -1
  160. package/src/components/select/Select.ts +140 -525
  161. package/src/components/select/option-search.ts +114 -0
  162. package/src/components/select/select-render.ts +161 -0
  163. package/src/components/select/selection-strategy.ts +245 -0
  164. package/src/components/time-picker/TimePicker.ts +1 -1
  165. package/src/components/tooltip/Tooltip.ts +1 -1
@@ -1,457 +1,341 @@
1
- import { DROPDOWN_CSS as z } from "./dropdown-css.js";
2
- import { BaseElement as w } from "../../core/BaseElement.js";
3
- import { property as c } from "../../core/decorators.js";
4
- import { escapeHtml as _, escapeAttr as p, html as d } from "../../core/template.js";
5
- import { injectGlobalStyles as x } from "../../core/styleInjection.js";
1
+ import { DROPDOWN_CSS as v } from "./dropdown-css.js";
2
+ import { BaseElement as b } from "../../core/BaseElement.js";
3
+ import { property as r } from "../../core/decorators.js";
4
+ import { html as S } from "../../core/template.js";
5
+ import { injectGlobalStyles as O } from "../../core/styleInjection.js";
6
6
  import { t as g } from "../../core/i18n.js";
7
7
  import "../../core/date/presets.js";
8
- import { controlHeight as O } from "../../core/controlSize.js";
9
- import { COPY as k } from "../../core/copy.js";
10
- import { defineElement as L } from "../../core/define.js";
8
+ import { controlHeight as D } from "../../core/controlSize.js";
9
+ import "../../core/copy.js";
10
+ import { defineElement as w } from "../../core/define.js";
11
11
  import "../../primitives/portal/Portal.js";
12
12
  import "../../primitives/position/Position.js";
13
- import { FocusTrap as S } from "../../primitives/focus-trap/FocusTrap.js";
14
- import { FloatingPanelController as $ } from "../../primitives/overlay/floatingPanel.js";
15
- import { listIntent as T, resolveIndex as D } from "../../primitives/roving/roving.js";
16
- import C from "./select.css.js";
17
- var E = Object.defineProperty, h = (v, e, t, s) => {
18
- for (var i = void 0, o = v.length - 1, n; o >= 0; o--)
19
- (n = v[o]) && (i = n(e, t, i) || i);
20
- return i && E(e, t, i), i;
13
+ import { FocusTrap as x } from "../../primitives/focus-trap/FocusTrap.js";
14
+ import { FloatingPanelController as z } from "../../primitives/overlay/floatingPanel.js";
15
+ import { listIntent as L, resolveIndex as C } from "../../primitives/roving/roving.js";
16
+ import { OptionSearchController as k } from "./option-search.js";
17
+ import { resolveSelectionStrategy as y } from "./selection-strategy.js";
18
+ import { renderSelectTrigger as I, buildSelectDropdownShell as T, buildSelectOptionsHTML as E } from "./select-render.js";
19
+ import A from "./select.css.js";
20
+ var V = Object.defineProperty, a = (_, t, e, i) => {
21
+ for (var s = void 0, o = _.length - 1, l; o >= 0; o--)
22
+ (l = _[o]) && (s = l(t, e, s) || s);
23
+ return s && V(t, e, s), s;
21
24
  };
22
- const A = 300;
23
- function I() {
24
- x("z-select", z);
25
+ const m = "Select...";
26
+ let P = 0;
27
+ function B() {
28
+ O("z-select", v);
25
29
  }
26
- const b = "Select...";
27
- let q = 0;
28
- const m = class m extends w {
30
+ const d = class d extends b {
29
31
  constructor() {
30
- super(...arguments), this.size = "sm", this.value = "", this.placeholder = b, this.disabled = !1, this.invalid = !1, this.open = !1, this.name = "", this.searchable = !1, this.searchMode = "frontend", this.searchPlaceholder = "Search...", this.loading = !1, this.multiple = !1, this.clearable = !1, this.commitOnConfirm = !1, this.maxTags = 2, this.remoteMethod = null, this._floating = new $(this), this._focusTrap = null, this._activeIndex = -1, this._query = "", this._uid = `z-select-${++q}`, this._draft = null, this._searchTimer = null, this._optionsObserver = null, this._onTriggerClick = (e) => {
31
- var i, o, n;
32
+ super(...arguments), this.size = "sm", this.value = "", this.placeholder = m, this.disabled = !1, this.invalid = !1, this.open = !1, this.name = "", this.searchable = !1, this.searchMode = "frontend", this.searchPlaceholder = "Search...", this.loading = !1, this.multiple = !1, this.clearable = !1, this.commitOnConfirm = !1, this.maxTags = 2, this.remoteMethod = null, this._floating = this.addController(new z(this)), this._search = this.addController(new k()), this._strategy = y(!1, !1), this._focusTrap = null, this._activeIndex = -1, this._uid = `z-select-${++P}`, this._onTriggerClick = (t) => {
33
+ var s, o, l;
32
34
  if (this.disabled) return;
33
- const t = ((i = e.composedPath) == null ? void 0 : i.call(e)[0]) ?? e.target, s = (o = t == null ? void 0 : t.closest) == null ? void 0 : o.call(t, ".z-select__tag-x");
34
- if (s) {
35
- this._removeValue(s.getAttribute("data-value") ?? "");
35
+ const e = ((s = t.composedPath) == null ? void 0 : s.call(t)[0]) ?? t.target, i = (o = e == null ? void 0 : e.closest) == null ? void 0 : o.call(e, ".z-select__tag-x");
36
+ if (i) {
37
+ this._removeValue(i.getAttribute("data-value") ?? "");
36
38
  return;
37
39
  }
38
- if ((n = t == null ? void 0 : t.closest) != null && n.call(t, ".z-select__clear")) {
40
+ if ((l = e == null ? void 0 : e.closest) != null && l.call(e, ".z-select__clear")) {
39
41
  this._clearValue();
40
42
  return;
41
43
  }
42
44
  this.open ? this._closeDropdown() : this._openDropdown();
43
- }, this._onTriggerKey = (e) => {
44
- const t = e;
45
- if (t.key === "ArrowDown" || t.key === "ArrowUp")
46
- e.preventDefault(), this.open ? this._floating.panel && this._onDropdownKey(t) : this._openDropdown();
47
- else if (t.key === "Enter" && this.open)
48
- e.preventDefault(), this._onDropdownKey(t);
49
- else if (t.key === "Escape")
50
- e.stopPropagation(), this._closeDropdown();
51
- else if (t.key === "Delete" && !this.open) {
45
+ }, this._onTriggerKey = (t) => {
46
+ const e = t;
47
+ if (e.key === "ArrowDown" || e.key === "ArrowUp")
48
+ t.preventDefault(), this.open ? this._floating.panel && this._onDropdownKey(e) : this._openDropdown();
49
+ else if (e.key === "Enter" && this.open)
50
+ t.preventDefault(), this._onDropdownKey(e);
51
+ else if (e.key === "Escape")
52
+ t.stopPropagation(), this._closeDropdown();
53
+ else if (e.key === "Delete" && !this.open) {
52
54
  if (this.multiple || !this.clearable || !this.value) return;
53
- e.preventDefault(), this._clearValue();
54
- } else if (t.key === "Backspace" && this.multiple && !this.open) {
55
- const s = this._selectedValues();
56
- if (!s.length) return;
57
- e.preventDefault(), this._removeValue(s[s.length - 1]);
55
+ t.preventDefault(), this._clearValue();
56
+ } else if (e.key === "Backspace" && this.multiple && !this.open) {
57
+ const i = this._syncStrategy().getCommittedValues(this.value);
58
+ if (!i.length) return;
59
+ t.preventDefault(), this._removeValue(i[i.length - 1]);
58
60
  }
59
- }, this._onSearchInput = (e) => {
60
- const t = e.target;
61
- this._query = t.value, this.searchMode === "backend" ? this._scheduleRemoteSearch() : this._renderOptionList();
62
- }, this._onDropdownKey = (e) => {
63
- const t = e, s = this._getFilteredOptions(), i = T(t.key);
64
- if (i) {
65
- e.preventDefault();
66
- const o = D(s.length, this._activeIndex, i, {
67
- isDisabled: (n) => s[n].disabled
61
+ }, this._onSearchInput = (t) => {
62
+ const e = t.target;
63
+ this._search.handleInput(e.value, {
64
+ searchMode: this.searchMode,
65
+ remoteMethod: this.remoteMethod,
66
+ isOpen: () => this.open,
67
+ setLoading: (i) => {
68
+ this.loading = i;
69
+ },
70
+ applySpecs: (i) => this._applyRemoteOptions(i),
71
+ onLocalFilter: () => this._renderOptionList(),
72
+ onSearchEmit: (i) => {
73
+ this.emit("z-search", { query: i });
74
+ }
75
+ });
76
+ }, this._onDropdownKey = (t) => {
77
+ const e = t, i = this._getFilteredOptions(), s = L(e.key);
78
+ if (s) {
79
+ t.preventDefault();
80
+ const o = C(i.length, this._activeIndex, s, {
81
+ isDisabled: (l) => i[l].disabled
68
82
  });
69
83
  o >= 0 && (this._activeIndex = o, this._updateActive());
70
84
  return;
71
85
  }
72
- switch (t.key) {
86
+ switch (e.key) {
73
87
  case "Enter": {
74
- e.preventDefault();
75
- const o = s[this._activeIndex];
88
+ t.preventDefault();
89
+ const o = i[this._activeIndex];
76
90
  o && !o.disabled && this._selectOption(o.value);
77
91
  break;
78
92
  }
79
93
  case "Escape":
80
- e.preventDefault(), e.stopPropagation(), this._closeDropdown();
94
+ t.preventDefault(), t.stopPropagation(), this._closeDropdown();
81
95
  break;
82
96
  case "Tab":
83
- this._staging() || this._closeDropdown();
97
+ this._syncStrategy().isStaging || this._closeDropdown();
84
98
  break;
85
99
  }
86
100
  };
87
101
  }
88
102
  willUpdate() {
89
- this.style.setProperty("--_h", O(this.size));
103
+ this.style.setProperty("--_h", D(this.size)), this._syncStrategy();
90
104
  }
91
105
  render() {
92
- var a;
93
- const e = this._getSelectedOption(), t = this._selectedValues(), s = ((a = this._optionByValue("")) == null ? void 0 : a.label) ?? "", i = this.multiple ? t.length > 0 : !!e, o = this.clearable && i && !this.disabled && !this.multiple ? `<span class="z-select__clear" part="clear" role="button" tabindex="-1" aria-label="${k.clear}"><svg width="10" height="10" viewBox="0 0 10 10" fill="none" aria-hidden="true"><path d="M2 2l6 6M8 2l-6 6" stroke="currentColor" stroke-width="1.4" stroke-linecap="round"/></svg></span>` : "", n = this.multiple ? t.length ? `<span class="z-select__tags" part="value">${this._renderTags(t)}</span>` : `<span class="z-select__value z-select__placeholder" part="value">${_(
94
- this._authoredPlaceholder() || s || this.placeholder
95
- )}</span>` : `<span class="z-select__value${e ? "" : " z-select__placeholder"}" part="value">${_(
96
- String(e ? e.label : this.placeholder)
97
- )}</span>`, r = !this.multiple && e ? ` title="${p(String(e.label))}"` : "";
98
- return d`
99
- <button
100
- type="button"
101
- class="z-select__trigger ${this.open ? "z-select__trigger--open" : ""}${this.multiple ? " z-select__trigger--multi" : ""}"
102
- ${this.disabled ? "disabled" : ""}
103
- aria-expanded="${this.open ? "true" : "false"}"
104
- aria-haspopup="listbox"
105
- ${this.invalid ? 'aria-invalid="true"' : ""}
106
- ${r}
107
- part="trigger"
108
- data-focus-key="trigger"
109
- >
110
- ${n}${o}
111
- <span class="z-select__chevron ${this.open ? "z-select__chevron--open" : ""}" part="chevron" aria-hidden="true">
112
- <svg width="12" height="12" viewBox="0 0 12 12" fill="none">
113
- <path d="M3 4.5L6 7.5L9 4.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
114
- </svg>
115
- </span>
116
- </button>
117
- `;
106
+ var i;
107
+ const t = this._syncStrategy(), e = this._getSelectedOption();
108
+ return I({
109
+ open: this.open,
110
+ disabled: this.disabled,
111
+ invalid: this.invalid,
112
+ multiple: this.multiple,
113
+ clearable: this.clearable,
114
+ maxTags: this.maxTags,
115
+ placeholder: this.placeholder,
116
+ authoredPlaceholder: this._authoredPlaceholder(),
117
+ emptyLabel: ((i = this._optionByValue("")) == null ? void 0 : i.label) ?? "",
118
+ selectedOption: e,
119
+ selectedValues: t.getCommittedValues(this.value),
120
+ labelOf: (s) => {
121
+ var o;
122
+ return ((o = this._optionByValue(s)) == null ? void 0 : o.label) ?? s;
123
+ }
124
+ });
118
125
  }
119
126
  connectedCallback() {
120
- super.connectedCallback(), this.addEventListener("click", this._onTriggerClick), this.addEventListener("keydown", this._onTriggerKey);
127
+ super.connectedCallback(), this.listen(this, "click", this._onTriggerClick), this.listen(this, "keydown", this._onTriggerKey);
121
128
  }
122
129
  disconnectedCallback() {
123
- this._closeDropdown(), this.removeEventListener("click", this._onTriggerClick), this.removeEventListener("keydown", this._onTriggerKey), super.disconnectedCallback();
130
+ this._closeDropdown(), super.disconnectedCallback();
124
131
  }
125
132
  updated() {
126
133
  this._floating.panel && this._renderOptionList();
127
134
  }
135
+ _syncStrategy() {
136
+ return this._strategy = y(this.multiple, this.commitOnConfirm, this._strategy), this._strategy;
137
+ }
128
138
  _getOptions() {
129
139
  return Array.from(this.querySelectorAll("z-option"));
130
140
  }
131
141
  _getSelectedOption() {
132
142
  if (this.value)
133
- return this._getOptions().find((e) => e.value === this.value && !e.disabled);
134
- }
135
- /** 多选当前值。非多选返回 [](多选分支不参与单选逻辑)。 */
136
- _selectedValues() {
137
- return !this.multiple || !this.value ? [] : this.value.split(",").map((e) => e.trim()).filter(Boolean);
143
+ return this._getOptions().find((t) => t.value === this.value && !t.disabled);
138
144
  }
139
- /** 是否处于「暂存 + 确认」模式(只有多选才有意义)。 */
140
- _staging() {
141
- return this.multiple && this.commitOnConfirm;
145
+ _optionByValue(t) {
146
+ return this._getOptions().find((e) => e.value === t);
142
147
  }
143
- /**
144
- * 面板里该显示成「已勾选」的一组值。
145
- *
146
- * 暂存模式下取草稿、否则取已提交值 —— 渲染勾选态与计数都走这一个入口,
147
- * 免得某一处忘了切档(症状是「勾了看不到勾」或「没确定却已经显示为选中」)。
148
- */
149
- _draftValues() {
150
- return this._draft ?? this._selectedValues();
151
- }
152
- /**
153
- * 多选标签列表:每个已选值一个标签,标签自带 ×。
154
- *
155
- * [WHY 从「已选 N 项」改成标签] 折叠成计数之后,取消某一项只能重新打开下拉、在长列表里
156
- * 找回那一行再点一次 —— 「当前筛了什么」和「怎么去掉它」被拆到两个坐标上。标签把它们合回一处。
157
- * 超过 `maxTags` 折叠成 `+N`:筛选栏一格约 168px,三个中文标签就撑破。
158
- *
159
- * 选项文案来自数据源,进属性一律 `escapeAttr` / `escapeHtml`(`"` 不转义可闭合 title 注入)。
160
- */
161
- _renderTags(e) {
162
- const t = this.maxTags > 0 ? this.maxTags : e.length, s = e.slice(0, t), i = e.length - s.length, o = s.map((n) => {
163
- var a;
164
- const r = ((a = this._optionByValue(n)) == null ? void 0 : a.label) ?? n;
165
- return `<span class="z-select__tag" title="${p(r)}"><span class="z-select__tag-label">${_(r)}</span><span class="z-select__tag-x" role="button" tabindex="-1" data-value="${p(n)}" aria-label="${p(g("removeItem", { label: r }))}"><svg width="8" height="8" viewBox="0 0 8 8" fill="none" aria-hidden="true"><path d="M1.6 1.6l4.8 4.8M6.4 1.6L1.6 6.4" stroke="currentColor" stroke-width="1.2" stroke-linecap="round"/></svg></span></span>`;
166
- });
167
- if (i > 0) {
168
- const n = e.slice(t).map((r) => {
169
- var a;
170
- return ((a = this._optionByValue(r)) == null ? void 0 : a.label) ?? r;
171
- });
172
- o.push(
173
- `<span class="z-select__tag z-select__tag--more" title="${p(n.join("、"))}">+${i}</span>`
174
- );
175
- }
176
- return o.join("");
177
- }
178
- _optionByValue(e) {
179
- return this._getOptions().find((t) => t.value === e);
180
- }
181
- /** 作者显式写的占位文案(没写 = 空串,与组件默认值区分开)。 */
182
148
  _authoredPlaceholder() {
183
- return this.placeholder === b ? "" : this.placeholder;
149
+ return this.placeholder === m ? "" : this.placeholder;
184
150
  }
185
151
  _getFilteredOptions() {
186
- const e = this._getOptions();
187
- if (!this.searchable || !this._query) return e;
188
- const t = this._query.toLowerCase();
189
- return e.filter((s) => s.label.toLowerCase().includes(t) || s.value.toLowerCase().includes(t));
152
+ return this._search.filter(this._getOptions(), this.searchable);
190
153
  }
191
- /**
192
- * 多选去掉一项(标签 ×)。
193
- *
194
- * 值与 `_selectOption` 同一条出口(逗号串 + `z-change`),否则「从标签删」和
195
- * 「从下拉取消勾选」会走出两种状态。面板开着时要同步勾选态:标签没了、下拉里还打着勾,
196
- * 用户会以为没删掉。
197
- */
198
- _removeValue(e) {
199
- const t = this._selectedValues().filter((s) => s !== e);
200
- t.length !== this._selectedValues().length && (this.value = t.join(","), this._staging() && (this._draft = t.slice()), this.open && this._renderOptionList(), this.emit("z-change", { values: t.slice(), value: this.value }));
154
+ _removeValue(t) {
155
+ const e = this._syncStrategy().removeValue(t, this.value);
156
+ e && (this.value = e.nextValue, this.open && this._renderOptionList(), this.emit("z-change", e.changeDetail));
201
157
  }
202
- /**
203
- * 整框清除。空串 = 不限,与点「value='' 的空值选项」同义。
204
- *
205
- * [WHY 也发 `z-change` 而不是单独的 `z-clear`] 消费方(PageView)已经按「值变化」处理
206
- * 取数与重渲染;再造一个事件就多一条必须被同时监听的路径,漏一个就是「清空后不重新取数」。
207
- */
208
158
  _clearValue() {
209
- this.value && (this.value = "", this._staging() && (this._draft = []), this.open && this._renderOptionList(), this.emit("z-change", this.multiple ? { values: [], value: "" } : { value: "" }));
159
+ const t = this._syncStrategy().clear(this.value);
160
+ t && (this.value = t.nextValue, this.open && this._renderOptionList(), this.emit("z-change", t.changeDetail));
210
161
  }
211
162
  _openDropdown() {
212
- var i, o, n;
163
+ var o, l, u;
213
164
  if (this.open) return;
214
- I(), this._query = "", this._clearSearchTimer(), this.loading = !1;
215
- const e = this.shadowRoot.querySelector(".z-select__trigger"), t = this._floating.open(
165
+ const t = this._syncStrategy();
166
+ B(), this._search.reset(), this.loading = !1;
167
+ const e = this.shadowRoot.querySelector(".z-select__trigger"), i = this._floating.open(
216
168
  {
217
169
  panelClass: "z-select__dropdown",
218
170
  hidingClass: "z-select__dropdown--hiding",
219
171
  part: "dropdown",
220
- // [WHY 不在这层给 listbox] 面板里本来就有一个 `.z-select__options[role=listbox]`,
221
- // 两层都标 listbox 会得到「listbox 套 listbox」,读屏进去要报两次。
222
172
  role: null,
223
173
  tabIndex: !1,
224
174
  anchor: () => this.shadowRoot.querySelector(".z-select__trigger"),
225
175
  onOutsideClose: () => this._closeDropdown()
226
176
  },
227
- (r) => {
228
- const a = this.searchable ? d`<input type="text" class="z-select__search" part="search" role="combobox" aria-autocomplete="list" aria-expanded="true" aria-controls="${this._uid}-listbox" placeholder="${p(this.searchPlaceholder)}" aria-label="${p(this.searchPlaceholder)}" autocomplete="off" />` : "", u = this._staging() ? `<div class="z-select__footer" part="footer"><span class="z-select__count" part="count"></span><span class="z-select__footer-actions"><button type="button" class="z-select__btn" data-act="reset">${_(g("clearAll"))}</button><button type="button" class="z-select__btn z-select__btn--primary" data-act="confirm">${_(g("confirm"))}</button></span></div>` : "", f = this._authoredPlaceholder() || this.placeholder, y = f ? ` aria-label="${p(f)}"` : "";
229
- r.innerHTML = `${a}<div class="z-select__options" role="listbox" id="${this._uid}-listbox" tabindex="-1"${y}></div>${u}`;
177
+ (h) => {
178
+ h.innerHTML = T({
179
+ uid: this._uid,
180
+ searchable: this.searchable,
181
+ searchPlaceholder: this.searchPlaceholder,
182
+ staging: t.isStaging,
183
+ listName: this._authoredPlaceholder() || this.placeholder
184
+ });
230
185
  }
231
186
  );
232
- t.addEventListener("click", (r) => {
233
- const a = r.target.closest("[data-act]");
234
- if (a) {
235
- a.dataset.act === "confirm" ? this._commitDraft() : a.dataset.act === "reset" && this._resetDraft();
187
+ i.addEventListener("click", (h) => {
188
+ const c = h.target.closest("[data-act]");
189
+ if (c) {
190
+ c.dataset.act === "confirm" ? this._commitDraft() : c.dataset.act === "reset" && this._resetDraft();
236
191
  return;
237
192
  }
238
- const u = r.target.closest(".z-select__option");
239
- if (!u) return;
240
- const f = u.dataset.value;
241
- f !== void 0 && !u.classList.contains("z-select__option--disabled") && this._selectOption(f);
242
- }), t.addEventListener("mouseover", (r) => {
243
- const a = r.target.closest(".z-select__option");
244
- a && this._setActiveByElement(a);
245
- }), (i = t.querySelector(".z-select__search")) == null || i.addEventListener("input", this._onSearchInput);
193
+ const p = h.target.closest(".z-select__option");
194
+ if (!p) return;
195
+ const f = p.dataset.value;
196
+ f !== void 0 && !p.classList.contains("z-select__option--disabled") && this._selectOption(f);
197
+ }), i.addEventListener("mouseover", (h) => {
198
+ const c = h.target.closest(".z-select__option");
199
+ c && this._setActiveByElement(c);
200
+ }), (o = i.querySelector(".z-select__search")) == null || o.addEventListener("input", this._onSearchInput);
246
201
  const s = e.getBoundingClientRect();
247
- t.style.minWidth = `${this._staging() ? Math.max(s.width, 240) : s.width}px`, this._focusTrap = new S({ container: t }), this.open = !0, this._staging() && (this._draft = this._selectedValues()), this._activeIndex = this._getOptions().findIndex((r) => r.value === this.value && !r.disabled), this._renderOptionList(), this._floating.reposition(), this._observeOptions(), t.addEventListener("keydown", this._onDropdownKey), this.searchable || ((n = (o = this._floating.panel) == null ? void 0 : o.querySelector(".z-select__options")) == null || n.focus(), this._updateActive()), this.emit("z-select-open");
202
+ i.style.minWidth = `${t.isStaging ? Math.max(s.width, 240) : s.width}px`, this._focusTrap = new x({ container: i }), this.open = !0, t.onOpen(this.value), this._activeIndex = this._getOptions().findIndex((h) => h.value === this.value && !h.disabled), this._renderOptionList(), this._floating.reposition(), this._search.observeHost(this, () => {
203
+ this.open && this._renderOptionList();
204
+ }), i.addEventListener("keydown", this._onDropdownKey), this.searchable || ((u = (l = this._floating.panel) == null ? void 0 : l.querySelector(".z-select__options")) == null || u.focus(), this._updateActive()), this.emit("z-select-open");
248
205
  }
249
206
  _closeDropdown() {
250
- var t, s, i;
207
+ var e, i;
251
208
  if (!this.open) return;
252
- this._clearSearchTimer(), (t = this._optionsObserver) == null || t.disconnect(), this._optionsObserver = null, (s = this._focusTrap) == null || s.destroy(), this._focusTrap = null, (i = this._floating.panel) == null || i.removeEventListener("keydown", this._onDropdownKey), this._floating.close(), this.open = !1, this._activeIndex = -1, this._draft = null;
253
- const e = this.shadowRoot.querySelector(".z-select__trigger");
254
- e == null || e.focus(), this.emit("z-select-close");
209
+ this._search.clearTimer(), this._search.stopObserving(), (e = this._focusTrap) == null || e.destroy(), this._focusTrap = null, (i = this._floating.panel) == null || i.removeEventListener("keydown", this._onDropdownKey), this._floating.close(), this.open = !1, this._activeIndex = -1, this._strategy.onClose();
210
+ const t = this.shadowRoot.querySelector(".z-select__trigger");
211
+ t == null || t.focus(), this.emit("z-select-close");
255
212
  }
256
- _selectOption(e) {
257
- if (this._staging()) {
258
- const t = this._draft ?? this._selectedValues();
259
- if (e === "")
260
- t.length = 0;
261
- else {
262
- const s = t.indexOf(e);
263
- s >= 0 ? t.splice(s, 1) : t.push(e);
264
- }
265
- this._draft = t, this._renderOptionList();
266
- return;
267
- }
268
- if (this.multiple) {
269
- const t = e === "" ? [] : this._selectedValues();
270
- if (e !== "") {
271
- const s = t.indexOf(e);
272
- s >= 0 ? t.splice(s, 1) : t.push(e);
273
- }
274
- this.value = t.join(","), this._renderOptionList(), this.emit("z-change", { values: t.slice(), value: this.value });
275
- return;
276
- }
277
- if (this.value === e) {
278
- this._closeDropdown();
279
- return;
280
- }
281
- this.value = e, this._closeDropdown(), this.emit("z-change", { value: e });
213
+ _selectOption(t) {
214
+ const e = this._syncStrategy().pick(t, this.value);
215
+ e.nextValue !== void 0 && (this.value = e.nextValue), e.closeDropdown && this._closeDropdown(), e.rerenderList && this._renderOptionList(), e.changeDetail && this.emit("z-change", e.changeDetail);
282
216
  }
283
- /**
284
- * 提交草稿(暂存模式的「确定」)。
285
- *
286
- * 顺序是**先关面板、再改值、最后发事件**:宿主收到 `z-change` 会重渲染整个筛选栏,
287
- * 这个元素(连同浮层)可能在事件处理里被摘掉 —— 那时再去拆面板就是对已脱离文档的节点
288
- * 做操作,轻则报错重则浮层残留。先把自己收拾干净再交出去。
289
- *
290
- * 值没变就不发事件(否则「打开 → 直接点确定」也会触发一次全量查询)。
291
- */
292
217
  _commitDraft() {
293
- const e = (this._draft ?? []).slice(), t = e.join(",") !== this.value;
294
- this._closeDropdown(), t && (this.value = e.join(","), this.emit("z-change", { values: e.slice(), value: this.value }));
218
+ const t = this._syncStrategy().commit(this.value);
219
+ this._closeDropdown(), t && (this.value = t.nextValue, this.emit("z-change", t.changeDetail));
295
220
  }
296
- /** 草稿清空(暂存模式的「清空」)。只清草稿,仍需点「确定」才生效。 */
297
221
  _resetDraft() {
298
- var e;
299
- (e = this._draft) != null && e.length && (this._draft = [], this._renderOptionList());
222
+ this._syncStrategy().resetDraft() && this._renderOptionList();
300
223
  }
301
- /** 底部计数的文案与「清空」的可用态(打开面板、每次勾选都会刷新)。 */
302
224
  _updateFooter() {
303
- const e = this._floating.panel;
304
- if (!e) return;
305
- const t = e.querySelector(".z-select__count");
225
+ const t = this._floating.panel;
306
226
  if (!t) return;
307
- const s = (this._draft ?? []).length;
308
- t.textContent = s > 0 ? g("selectedCount", { count: s }) : g("noneSelected");
309
- const i = e.querySelector('[data-act="reset"]');
310
- i && (i.disabled = s === 0);
311
- }
312
- _clearSearchTimer() {
313
- this._searchTimer !== null && (window.clearTimeout(this._searchTimer), this._searchTimer = null);
314
- }
315
- _scheduleRemoteSearch() {
316
- this._clearSearchTimer(), this._searchTimer = window.setTimeout(() => {
317
- this._searchTimer = null, this._runRemoteSearch();
318
- }, A);
319
- }
320
- _runRemoteSearch() {
321
- const e = this._query, t = this.remoteMethod ? this.remoteMethod(e) : void 0;
322
- t && typeof t.then == "function" && (this.loading = !0, t.then((s) => {
323
- !this.open || this._query !== e || !Array.isArray(s) || this._applyRemoteOptions(s);
324
- }).catch(() => {
325
- }).finally(() => {
326
- this.open && this._query === e && (this.loading = !1);
327
- })), this.emit("z-search", { query: e });
328
- }
329
- _applyRemoteOptions(e) {
330
- this._getOptions().forEach((t) => t.remove());
331
- for (const t of e) {
332
- const s = document.createElement("z-option");
333
- s.value = t.value, s.textContent = t.label, t.disabled && (s.disabled = !0), this.appendChild(s);
227
+ const e = t.querySelector(".z-select__count");
228
+ if (!e) return;
229
+ const i = this._syncStrategy().draftCount();
230
+ e.textContent = i > 0 ? g("selectedCount", { count: i }) : g("noneSelected");
231
+ const s = t.querySelector('[data-act="reset"]');
232
+ s && (s.disabled = i === 0);
233
+ }
234
+ _applyRemoteOptions(t) {
235
+ this._getOptions().forEach((e) => e.remove());
236
+ for (const e of t) {
237
+ const i = document.createElement("z-option");
238
+ i.value = e.value, i.textContent = e.label, e.disabled && (i.disabled = !0), this.appendChild(i);
334
239
  }
335
240
  this._renderOptionList();
336
241
  }
337
- _observeOptions() {
338
- this._optionsObserver || (this._optionsObserver = new MutationObserver(() => {
339
- this.open && this._renderOptionList();
340
- }), this._optionsObserver.observe(this, { childList: !0 }));
341
- }
342
242
  _renderOptionList() {
343
243
  if (!this._floating.panel) return;
344
- const e = this._floating.panel.querySelector(".z-select__options");
345
- if (!e) return;
244
+ const t = this._floating.panel.querySelector(".z-select__options");
245
+ if (!t) return;
346
246
  if (this.loading) {
347
- e.innerHTML = d`<div class="z-select__loading" part="loading">Loading...</div>`, this._activeIndex = -1, this._updateFooter();
247
+ t.innerHTML = S`<div class="z-select__loading" part="loading">Loading...</div>`, this._activeIndex = -1, this._updateFooter();
348
248
  return;
349
249
  }
350
- const t = this._getFilteredOptions();
351
- if (e.innerHTML = this._buildOptionsHTML(t), this._updateFooter(), t.length === 0) {
250
+ const e = this._getFilteredOptions();
251
+ if (t.innerHTML = this._buildOptionsHTML(e), this._updateFooter(), e.length === 0) {
352
252
  this._activeIndex = -1;
353
253
  return;
354
254
  }
355
- (this._activeIndex < 0 || this._activeIndex >= t.length || t[this._activeIndex].disabled) && (this._activeIndex = t.findIndex((s) => !s.disabled)), this._updateActive();
356
- }
357
- _buildOptionsHTML(e) {
358
- if (e.length === 0) {
359
- const s = this.searchable && this._query ? "No results" : "No options";
360
- return d`<div class="z-select__empty" part="empty">${s}</div>`;
361
- }
362
- const t = this._draftValues();
363
- return e.map((s, i) => {
364
- const o = this.multiple ? t.includes(s.value) : s.value === this.value, n = [
365
- "z-select__option",
366
- o ? "z-select__option--selected" : "",
367
- // 多选里选中态降级为中性底:蓝底会被读成"这行是高亮项",与"已勾选"混淆
368
- this.multiple && o ? "z-select__option--multi" : "",
369
- s.disabled ? "z-select__option--disabled" : "",
370
- i === this._activeIndex ? "z-select__option--active" : ""
371
- ].filter(Boolean).join(" "), r = this.multiple ? d`<span class="z-select__box ${o ? "z-select__box--on" : ""}" part="box">${o ? '<svg width="12" height="12" viewBox="0 0 12 12"><path d="M2.5 6L5 8.5L9.5 3.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" fill="none"/></svg>' : ""}</span>` : "";
372
- return d`<div class="${n}" id="${this._uid}-opt-${i}" data-value="${p(String(s.value))}" role="option" tabindex="-1" aria-selected="${o ? "true" : "false"}" aria-disabled="${s.disabled ? "true" : "false"}">
373
- ${r}
374
- ${_(String(s.label ?? ""))}
375
- ${!this.multiple && o ? d`<span class="z-select__check" part="check"><svg width="12" height="12" viewBox="0 0 12 12"><path d="M2.5 6L5 8.5L9.5 3.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" fill="none"/></svg></span>` : ""}
376
- </div>`;
377
- }).join("");
255
+ (this._activeIndex < 0 || this._activeIndex >= e.length || e[this._activeIndex].disabled) && (this._activeIndex = e.findIndex((i) => !i.disabled)), this._updateActive();
256
+ }
257
+ _buildOptionsHTML(t) {
258
+ const e = this._syncStrategy();
259
+ return E({
260
+ uid: this._uid,
261
+ options: t,
262
+ multiple: this.multiple,
263
+ searchable: this.searchable,
264
+ query: this._search.query,
265
+ activeIndex: this._activeIndex,
266
+ isSelected: (i) => e.isSelected(i, this.value)
267
+ });
378
268
  }
379
- _setActiveByElement(e) {
380
- var i;
381
- const t = (i = this._floating.panel) == null ? void 0 : i.querySelectorAll(".z-select__option");
382
- if (!t) return;
383
- const s = Array.from(t).indexOf(e);
384
- s >= 0 && (this._activeIndex = s, this._updateActive());
269
+ _setActiveByElement(t) {
270
+ var s;
271
+ const e = (s = this._floating.panel) == null ? void 0 : s.querySelectorAll(".z-select__option");
272
+ if (!e) return;
273
+ const i = Array.from(e).indexOf(t);
274
+ i >= 0 && (this._activeIndex = i, this._updateActive());
385
275
  }
386
- /**
387
- * 面板里「持有键盘焦点、并且能承载 activedescendant」的那个元素。
388
- *
389
- * 搜索模式是输入框(combobox),非搜索模式是 listbox 自身。两者都在 body 这棵树里,
390
- * 与选项同树 —— 这是 IDREF 能解析的前提,不是风格选择。
391
- */
392
276
  _focusOwner() {
393
- const e = this._floating.panel;
394
- return e ? this.searchable ? e.querySelector(".z-select__search") : e.querySelector(".z-select__options") : null;
277
+ const t = this._floating.panel;
278
+ return t ? this.searchable ? t.querySelector(".z-select__search") : t.querySelector(".z-select__options") : null;
395
279
  }
396
280
  _updateActive() {
397
281
  if (!this._floating.panel) return;
398
- const e = this._floating.panel.querySelectorAll(".z-select__option");
399
- e.forEach((i, o) => {
400
- i.classList.toggle("z-select__option--active", o === this._activeIndex);
282
+ const t = this._floating.panel.querySelectorAll(".z-select__option");
283
+ t.forEach((s, o) => {
284
+ s.classList.toggle("z-select__option--active", o === this._activeIndex);
401
285
  });
402
- const t = this._focusOwner(), s = e[this._activeIndex];
403
- t && (s != null && s.id ? t.setAttribute("aria-activedescendant", s.id) : t.removeAttribute("aria-activedescendant")), s == null || s.scrollIntoView({ block: "nearest" });
286
+ const e = this._focusOwner(), i = t[this._activeIndex];
287
+ e && (i != null && i.id ? e.setAttribute("aria-activedescendant", i.id) : e.removeAttribute("aria-activedescendant")), i == null || i.scrollIntoView({ block: "nearest" });
404
288
  }
405
289
  };
406
- m.styles = C;
407
- let l = m;
408
- h([
409
- c({ type: String })
410
- ], l.prototype, "size");
411
- h([
412
- c({ type: String })
413
- ], l.prototype, "value");
414
- h([
415
- c({ type: String })
416
- ], l.prototype, "placeholder");
417
- h([
418
- c({ type: Boolean })
419
- ], l.prototype, "disabled");
420
- h([
421
- c({ type: Boolean })
422
- ], l.prototype, "invalid");
423
- h([
424
- c({ type: Boolean })
425
- ], l.prototype, "open");
426
- h([
427
- c({ type: String })
428
- ], l.prototype, "name");
429
- h([
430
- c({ type: Boolean })
431
- ], l.prototype, "searchable");
432
- h([
433
- c({ type: String, attribute: "search-mode" })
434
- ], l.prototype, "searchMode");
435
- h([
436
- c({ type: String, attribute: "search-placeholder" })
437
- ], l.prototype, "searchPlaceholder");
438
- h([
439
- c({ type: Boolean })
440
- ], l.prototype, "loading");
441
- h([
442
- c({ type: Boolean })
443
- ], l.prototype, "multiple");
444
- h([
445
- c({ type: Boolean })
446
- ], l.prototype, "clearable");
447
- h([
448
- c({ type: Boolean, attribute: "commit-on-confirm" })
449
- ], l.prototype, "commitOnConfirm");
450
- h([
451
- c({ type: Number, attribute: "max-tags" })
452
- ], l.prototype, "maxTags");
453
- L("z-select", l);
290
+ d.styles = A;
291
+ let n = d;
292
+ a([
293
+ r({ type: String })
294
+ ], n.prototype, "size");
295
+ a([
296
+ r({ type: String })
297
+ ], n.prototype, "value");
298
+ a([
299
+ r({ type: String })
300
+ ], n.prototype, "placeholder");
301
+ a([
302
+ r({ type: Boolean })
303
+ ], n.prototype, "disabled");
304
+ a([
305
+ r({ type: Boolean })
306
+ ], n.prototype, "invalid");
307
+ a([
308
+ r({ type: Boolean })
309
+ ], n.prototype, "open");
310
+ a([
311
+ r({ type: String })
312
+ ], n.prototype, "name");
313
+ a([
314
+ r({ type: Boolean })
315
+ ], n.prototype, "searchable");
316
+ a([
317
+ r({ type: String, attribute: "search-mode" })
318
+ ], n.prototype, "searchMode");
319
+ a([
320
+ r({ type: String, attribute: "search-placeholder" })
321
+ ], n.prototype, "searchPlaceholder");
322
+ a([
323
+ r({ type: Boolean })
324
+ ], n.prototype, "loading");
325
+ a([
326
+ r({ type: Boolean })
327
+ ], n.prototype, "multiple");
328
+ a([
329
+ r({ type: Boolean })
330
+ ], n.prototype, "clearable");
331
+ a([
332
+ r({ type: Boolean, attribute: "commit-on-confirm" })
333
+ ], n.prototype, "commitOnConfirm");
334
+ a([
335
+ r({ type: Number, attribute: "max-tags" })
336
+ ], n.prototype, "maxTags");
337
+ w("z-select", n);
454
338
  export {
455
- l as ZSelect
339
+ n as ZSelect
456
340
  };
457
341
  //# sourceMappingURL=Select.js.map