overview-components 1.0.77 → 1.0.79

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 (49) hide show
  1. package/dist/_virtual/_commonjsHelpers.js +6 -2
  2. package/dist/_virtual/air-datepicker.js +4 -0
  3. package/dist/index.d.ts +56 -11
  4. package/dist/index.d.ts.map +1 -1
  5. package/dist/index.js +105 -53
  6. package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js +285 -231
  7. package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +48 -47
  8. package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +39 -38
  9. package/dist/node_modules/air-datepicker/air-datepicker.js +1147 -0
  10. package/dist/node_modules/air-datepicker/index.es.js +4 -0
  11. package/dist/shared/filter-inputs.js +326 -0
  12. package/dist/shared/lit-case-variables-tab-cell.js +207 -0
  13. package/dist/shared/lit-custom-popper.js +99 -0
  14. package/dist/shared/lit-data-grid-action-buttons-popover.js +258 -0
  15. package/dist/shared/lit-data-grid-density-popover.js +79 -0
  16. package/dist/shared/lit-data-grid-export-popover.js +66 -0
  17. package/dist/shared/lit-data-grid-operators-popover.js +94 -0
  18. package/dist/shared/lit-data-grid-row-actions.js +73 -0
  19. package/dist/shared/lit-date-picker.js +525 -0
  20. package/dist/shared/lit-icon-button.d.ts +1 -1
  21. package/dist/shared/lit-icon-button.d.ts.map +1 -1
  22. package/dist/shared/lit-icon-button.js +91 -0
  23. package/dist/shared/lit-label.js +96 -0
  24. package/dist/shared/lit-loader.d.ts +1 -1
  25. package/dist/shared/lit-loader.d.ts.map +1 -1
  26. package/dist/shared/lit-loader.js +70 -0
  27. package/dist/shared/lit-loading-bar.d.ts +1 -1
  28. package/dist/shared/lit-loading-bar.d.ts.map +1 -1
  29. package/dist/shared/lit-loading-bar.js +94 -0
  30. package/dist/shared/lit-menu-item.d.ts +1 -1
  31. package/dist/shared/lit-menu-item.d.ts.map +1 -1
  32. package/dist/shared/lit-menu-item.js +94 -0
  33. package/dist/shared/lit-modal-body.js +28 -0
  34. package/dist/shared/lit-modal-footer.js +32 -0
  35. package/dist/shared/lit-modal-header.js +39 -0
  36. package/dist/shared/lit-overflow-tooltip.js +85 -0
  37. package/dist/shared/lit-responsive-button.js +84 -0
  38. package/dist/shared/lit-select-field.js +376 -0
  39. package/dist/shared/lit-settings.js +60 -0
  40. package/dist/shared/lit-text-field.d.ts +1 -1
  41. package/dist/shared/lit-text-field.d.ts.map +1 -1
  42. package/dist/shared/lit-text-field.js +205 -0
  43. package/dist/shared/lit-toggle.js +213 -0
  44. package/dist/shared/simple-popper.js +186 -0
  45. package/dist/shared/simple-tooltip.js +1 -1
  46. package/dist/style.css +1 -0
  47. package/dist/utils/localization.js +410 -25
  48. package/dist/utils/utils.js +11 -0
  49. package/package.json +1 -1
@@ -0,0 +1,258 @@
1
+ import { customElement as k } from "../node_modules/@lit/reactive-element/decorators/custom-element.js";
2
+ import { property as g } from "../node_modules/@lit/reactive-element/decorators/property.js";
3
+ import { state as h } from "../node_modules/@lit/reactive-element/decorators/state.js";
4
+ import { query as d } from "../node_modules/@lit/reactive-element/decorators/query.js";
5
+ import "../node_modules/@lit/reactive-element/reactive-element.js";
6
+ import { html as l } from "../node_modules/lit-html/lit-html.js";
7
+ import { LitElement as A } from "../node_modules/lit-element/lit-element.js";
8
+ import { msg as p } from "../node_modules/@lit/localize/init/install.js";
9
+ import "../node_modules/@lit/localize/init/runtime.js";
10
+ import { computePosition as x, offset as y, flip as $, shift as O } from "../node_modules/@floating-ui/dom/dist/floating-ui.dom.js";
11
+ import { css as P } from "../node_modules/@lit/reactive-element/css-tag.js";
12
+ var E = Object.defineProperty, w = Object.getOwnPropertyDescriptor, r = (e, i, t, o) => {
13
+ for (var s = o > 1 ? void 0 : o ? w(i, t) : i, u = e.length - 1, a; u >= 0; u--)
14
+ (a = e[u]) && (s = (o ? a(i, t, s) : a(s)) || s);
15
+ return o && s && E(i, t, s), s;
16
+ };
17
+ let n = class extends A {
18
+ constructor() {
19
+ super(...arguments), this.pin = () => {
20
+ }, this.group = () => {
21
+ }, this.header = null, this.table = null, this.isOpen = !1, this.isSubmenuOpen = !1, this.currentAggregation = "", this._handleOutsideClick = (e) => {
22
+ e.composedPath().includes(this) || (this.isOpen = !1, this.isSubmenuOpen = !1);
23
+ };
24
+ }
25
+ connectedCallback() {
26
+ var e, i, t;
27
+ super.connectedCallback(), (t = (i = (e = this.header) == null ? void 0 : e.column) == null ? void 0 : i.columnDef) != null && t.aggregationFn && (this.currentAggregation = this.header.column.columnDef.aggregationFn), document.addEventListener("click", this._handleOutsideClick, { capture: !0 });
28
+ }
29
+ disconnectedCallback() {
30
+ super.disconnectedCallback(), document.removeEventListener("click", this._handleOutsideClick, { capture: !0 });
31
+ }
32
+ toggleCustomPopover() {
33
+ this.isOpen = !this.isOpen, this.isOpen || (this.isSubmenuOpen = !1);
34
+ }
35
+ closePopover() {
36
+ this.isOpen = !1, this.isSubmenuOpen = !1;
37
+ }
38
+ handleAction(e) {
39
+ e(), this.closePopover();
40
+ }
41
+ openSubmenu(e) {
42
+ this.isSubmenuOpen = e;
43
+ }
44
+ setAggregation(e) {
45
+ this.currentAggregation = e;
46
+ const i = this.table.getState().grouping;
47
+ this.header.column.columnDef.aggregationFn = e;
48
+ const t = i.map((o) => (o === this.header.column.id && (this.header.column.columnDef.aggregationFn = e), o));
49
+ this.table.setGrouping(t), this.closePopover();
50
+ }
51
+ updated(e) {
52
+ super.updated(e), this.isOpen && this.mainTrigger && this.mainMenuEl && x(this.mainTrigger, this.mainMenuEl, {
53
+ placement: "bottom-end",
54
+ middleware: [y(0), $(), O({ padding: 5 })]
55
+ }).then(({ x: i, y: t }) => {
56
+ Object.assign(this.mainMenuEl.style, {
57
+ left: `${i}px`,
58
+ top: `${t}px`
59
+ });
60
+ }), this.isSubmenuOpen && this.submenuTriggerEl && this.submenuEl && x(this.submenuTriggerEl, this.submenuEl, {
61
+ placement: "right-start",
62
+ middleware: [y(0), $(), O({ padding: 5 })]
63
+ }).then(({ x: i, y: t }) => {
64
+ Object.assign(this.submenuEl.style, {
65
+ left: `${i}px`,
66
+ top: `${t}px`
67
+ });
68
+ });
69
+ }
70
+ render() {
71
+ var s, u, a, f, m, b, c, v;
72
+ if (!this.header)
73
+ return l``;
74
+ const e = ((u = (s = this.header.column) == null ? void 0 : s.getCanPin) == null ? void 0 : u.call(s)) || !1, i = ((f = (a = this.header.column) == null ? void 0 : a.getIsPinned) == null ? void 0 : f.call(a)) || !1, t = ((b = (m = this.header.column) == null ? void 0 : m.getCanGroup) == null ? void 0 : b.call(m)) || !1, o = ((v = (c = this.header.column) == null ? void 0 : c.getIsGrouped) == null ? void 0 : v.call(c)) || !1;
75
+ return l`
76
+ <lit-icon-button
77
+ class="main-menu-trigger"
78
+ size="small"
79
+ variant="text"
80
+ icon="more"
81
+ @click="${this.toggleCustomPopover}"
82
+ ></lit-icon-button>
83
+
84
+ <div class="menu ${this.isOpen ? "open" : ""}">
85
+ ${t ? l`
86
+ <div
87
+ class="menu-item ${o ? "active" : ""}"
88
+ @click="${() => this.handleAction(this.group)}"
89
+ >
90
+ <lit-icon icon="agregation" size="1rem"></lit-icon>
91
+ ${p("Seskupit sloupec")}
92
+ </div>
93
+ ` : null}
94
+ ${e ? l`
95
+ <div
96
+ class="menu-item ${i ? "active" : ""}"
97
+ @click="${() => this.handleAction(this.pin)}"
98
+ >
99
+ <lit-icon icon="pin" size="1rem"></lit-icon>
100
+ ${p("Připnout sloupec vlevo")}
101
+ </div>
102
+ ` : null}
103
+
104
+ <div
105
+ class="menu-item submenu-trigger"
106
+ @mouseenter="${() => this.openSubmenu(!0)}"
107
+ @mouseleave="${() => this.openSubmenu(!1)}"
108
+ >
109
+ ${p("Agregace")}
110
+ <lit-icon icon="arrowRight" size="1rem"></lit-icon>
111
+ <div class="submenu ${this.isSubmenuOpen ? "open" : ""}">
112
+ <div
113
+ class="menu-item ${this.currentAggregation === "sum" ? "selected" : ""}"
114
+ @click="${() => this.setAggregation("sum")}"
115
+ >
116
+ sum
117
+ </div>
118
+ <div
119
+ class="menu-item ${this.currentAggregation === "median" ? "selected" : ""}"
120
+ @click="${() => this.setAggregation("median")}"
121
+ >
122
+ median
123
+ </div>
124
+ <div
125
+ class="menu-item ${this.currentAggregation === "min" ? "selected" : ""}"
126
+ @click="${() => this.setAggregation("min")}"
127
+ >
128
+ min
129
+ </div>
130
+ <div
131
+ class="menu-item ${this.currentAggregation === "max" ? "selected" : ""}"
132
+ @click="${() => this.setAggregation("max")}"
133
+ >
134
+ max
135
+ </div>
136
+ ${this.currentAggregation ? l`<div class="menu-item" @click="${() => this.setAggregation("")}">
137
+ ${p("zrušit")}
138
+ </div>` : null}
139
+ </div>
140
+ </div>
141
+ </div>
142
+ `;
143
+ }
144
+ };
145
+ n.styles = [
146
+ P`
147
+ :host {
148
+ position: relative;
149
+ display: inline-block;
150
+ }
151
+
152
+ .menu {
153
+ display: none;
154
+ flex-direction: column;
155
+ background-color: var(--background-paper, #fff);
156
+ border-radius: 0.5rem;
157
+ padding: 0.375rem;
158
+ box-shadow: var(--box-shadow, 0px 4px 6px rgba(0, 0, 0, 0.1));
159
+ overflow-y: visible;
160
+ min-width: max-content;
161
+ z-index: 9999;
162
+ position: absolute;
163
+ }
164
+ .menu.open {
165
+ display: flex;
166
+ }
167
+
168
+ .menu-item {
169
+ padding: 0.375rem 0.625rem;
170
+ margin: 0 0 0.25rem;
171
+ font-size: 0.8125rem;
172
+ font-weight: 500;
173
+ text-align: left;
174
+ cursor: pointer;
175
+ color: var(--text-primary, #111827);
176
+ transition: background-color 0.2s;
177
+ display: flex;
178
+ align-items: center;
179
+ gap: 0.5rem;
180
+ }
181
+
182
+ .menu-item:hover {
183
+ background: var(--color-primary-light, #f0fadf);
184
+ border-radius: 4px;
185
+ }
186
+
187
+ .menu-item.selected {
188
+ background: var(--color-primary-light, #f0fadf);
189
+ font-weight: 600;
190
+ border-radius: 4px;
191
+ }
192
+
193
+ .active {
194
+ background: var(--color-primary-light, #f0fadf);
195
+ border-radius: 4px;
196
+ }
197
+
198
+ /* Submenu */
199
+ .submenu-trigger {
200
+ position: relative;
201
+ }
202
+
203
+ .submenu {
204
+ display: none;
205
+ flex-direction: column;
206
+ background-color: var(--background-paper, #fff);
207
+ border-radius: 0.5rem;
208
+ padding: 0.375rem;
209
+ box-shadow: var(--box-shadow, 0px 4px 6px rgba(0, 0, 0, 0.1));
210
+ overflow-y: visible;
211
+ z-index: 9999;
212
+ position: absolute;
213
+ }
214
+
215
+ .submenu.open {
216
+ display: flex;
217
+ }
218
+ `
219
+ ];
220
+ r([
221
+ g({ type: Function })
222
+ ], n.prototype, "pin", 2);
223
+ r([
224
+ g({ type: Function })
225
+ ], n.prototype, "group", 2);
226
+ r([
227
+ g({ type: Object })
228
+ ], n.prototype, "header", 2);
229
+ r([
230
+ g({ type: Object })
231
+ ], n.prototype, "table", 2);
232
+ r([
233
+ h()
234
+ ], n.prototype, "isOpen", 2);
235
+ r([
236
+ h()
237
+ ], n.prototype, "isSubmenuOpen", 2);
238
+ r([
239
+ h()
240
+ ], n.prototype, "currentAggregation", 2);
241
+ r([
242
+ d(".main-menu-trigger")
243
+ ], n.prototype, "mainTrigger", 2);
244
+ r([
245
+ d(".menu")
246
+ ], n.prototype, "mainMenuEl", 2);
247
+ r([
248
+ d(".submenu-trigger")
249
+ ], n.prototype, "submenuTriggerEl", 2);
250
+ r([
251
+ d(".submenu")
252
+ ], n.prototype, "submenuEl", 2);
253
+ n = r([
254
+ k("lit-data-grid-action-buttons-popover")
255
+ ], n);
256
+ export {
257
+ n as LitDataGridActionButtonsPopover
258
+ };
@@ -0,0 +1,79 @@
1
+ import "../node_modules/@lit/reactive-element/reactive-element.js";
2
+ import { html as c } from "../node_modules/lit-html/lit-html.js";
3
+ import { LitElement as d } from "../node_modules/lit-element/lit-element.js";
4
+ import { customElement as y } from "../node_modules/@lit/reactive-element/decorators/custom-element.js";
5
+ import { property as a } from "../node_modules/@lit/reactive-element/decorators/property.js";
6
+ import { msg as o } from "../node_modules/@lit/localize/init/install.js";
7
+ import "../node_modules/@lit/localize/init/runtime.js";
8
+ import { css as u } from "../node_modules/@lit/reactive-element/css-tag.js";
9
+ var f = Object.defineProperty, h = Object.getOwnPropertyDescriptor, l = (e, n, r, s) => {
10
+ for (var t = s > 1 ? void 0 : s ? h(n, r) : n, m = e.length - 1, p; m >= 0; m--)
11
+ (p = e[m]) && (t = (s ? p(n, r, t) : p(t)) || t);
12
+ return s && t && f(n, r, t), t;
13
+ };
14
+ let i = class extends d {
15
+ constructor() {
16
+ super(...arguments), this.setDensity = (e) => {
17
+ };
18
+ }
19
+ handleDensity(e) {
20
+ typeof this.setDensity == "function" ? this.setDensity(e) : console.error("setDensity is not a function");
21
+ }
22
+ render() {
23
+ return c`
24
+ <lit-responsive-button
25
+ size="medium"
26
+ variant="text"
27
+ label=${o("Zobrazení")}
28
+ icon="rowmedium"
29
+ slot="reference"
30
+ ></lit-responsive-button>
31
+
32
+ <simple-popper placement="top-end">
33
+ <lit-menu>
34
+ <lit-menu-item
35
+ id="${1}"
36
+ icon="rowmall"
37
+ .onClick="${() => this.handleDensity("compact")}"
38
+ .isActive="${this.density === "compact"}"
39
+ >${o("Kompaktní")}
40
+ </lit-menu-item>
41
+ <lit-menu-item
42
+ id="${2}"
43
+ icon="rowmedium"
44
+ .onClick="${() => this.handleDensity("standard")}"
45
+ .isActive="${this.density === "standard"}"
46
+ >${o("Standardní")}
47
+ </lit-menu-item>
48
+ <lit-menu-item
49
+ id="${3}"
50
+ icon="rowlarge"
51
+ .onClick="${() => this.handleDensity("comfort")}"
52
+ .isActive="${this.density === "comfort"}"
53
+ >${o("Komfortní")}
54
+ </lit-menu-item>
55
+ </lit-menu>
56
+ </simple-popper>
57
+ `;
58
+ }
59
+ };
60
+ i.styles = [
61
+ // styles,
62
+ u`
63
+ :host {
64
+ font-family: 'Inter', sans-serif;
65
+ }
66
+ `
67
+ ];
68
+ l([
69
+ a({ type: Function })
70
+ ], i.prototype, "setDensity", 2);
71
+ l([
72
+ a({ type: String })
73
+ ], i.prototype, "density", 2);
74
+ i = l([
75
+ y("lit-data-grid-density-popover")
76
+ ], i);
77
+ export {
78
+ i as LitDataGridDensityPopover
79
+ };
@@ -0,0 +1,66 @@
1
+ import "../node_modules/@lit/reactive-element/reactive-element.js";
2
+ import { html as d } from "../node_modules/lit-html/lit-html.js";
3
+ import { LitElement as c } from "../node_modules/lit-element/lit-element.js";
4
+ import { customElement as u } from "../node_modules/@lit/reactive-element/decorators/custom-element.js";
5
+ import { property as a } from "../node_modules/@lit/reactive-element/decorators/property.js";
6
+ import { msg as m } from "../node_modules/@lit/localize/init/install.js";
7
+ import "../node_modules/@lit/localize/init/runtime.js";
8
+ var x = Object.defineProperty, v = Object.getOwnPropertyDescriptor, p = (o, r, s, i) => {
9
+ for (var t = i > 1 ? void 0 : i ? v(r, s) : r, n = o.length - 1, l; n >= 0; n--)
10
+ (l = o[n]) && (t = (i ? l(r, s, t) : l(t)) || t);
11
+ return i && t && x(r, s, t), t;
12
+ };
13
+ let e = class extends c {
14
+ constructor() {
15
+ super(...arguments), this.exportToExcel = () => {
16
+ }, this.exportToCsv = () => {
17
+ }, this.disabledButtons = !1;
18
+ }
19
+ handleExport(o) {
20
+ o();
21
+ }
22
+ render() {
23
+ return d`
24
+ <lit-responsive-button
25
+ size="medium"
26
+ variant="text"
27
+ label=${m("Export")}
28
+ icon="csv"
29
+ slot="reference"
30
+ ></lit-responsive-button>
31
+ <simple-popper placement="top-end">
32
+ <lit-menu>
33
+ <lit-menu-item
34
+ id="${1}"
35
+ icon="csv"
36
+ .onClick=${() => this.handleExport(this.exportToCsv)}
37
+ .disabled=${this.disabledButtons}
38
+ >${m("Export do CSV")}
39
+ </lit-menu-item>
40
+ <lit-menu-item
41
+ id="${1}"
42
+ icon="csv"
43
+ .onClick=${() => this.handleExport(this.exportToExcel)}
44
+ .disabled=${this.disabledButtons}
45
+ >${m("Export do Excel")}
46
+ </lit-menu-item>
47
+ </lit-menu>
48
+ </simple-popper>
49
+ `;
50
+ }
51
+ };
52
+ p([
53
+ a({ type: Function })
54
+ ], e.prototype, "exportToExcel", 2);
55
+ p([
56
+ a({ type: Function })
57
+ ], e.prototype, "exportToCsv", 2);
58
+ p([
59
+ a({ type: Boolean })
60
+ ], e.prototype, "disabledButtons", 2);
61
+ e = p([
62
+ u("lit-data-grid-export-popover")
63
+ ], e);
64
+ export {
65
+ e as LitDataGridExportPopover
66
+ };
@@ -0,0 +1,94 @@
1
+ import { customElement as m } from "../node_modules/@lit/reactive-element/decorators/custom-element.js";
2
+ import { property as o } from "../node_modules/@lit/reactive-element/decorators/property.js";
3
+ import { state as u } from "../node_modules/@lit/reactive-element/decorators/state.js";
4
+ import "../node_modules/@lit/reactive-element/reactive-element.js";
5
+ import { html as c } from "../node_modules/lit-html/lit-html.js";
6
+ import { LitElement as d } from "../node_modules/lit-element/lit-element.js";
7
+ import { msg as h } from "../node_modules/@lit/localize/init/install.js";
8
+ import "../node_modules/@lit/localize/init/runtime.js";
9
+ import { css as f } from "../node_modules/@lit/reactive-element/css-tag.js";
10
+ var O = Object.defineProperty, v = Object.getOwnPropertyDescriptor, s = (t, e, p, n) => {
11
+ for (var r = n > 1 ? void 0 : n ? v(e, p) : e, a = t.length - 1, l; a >= 0; a--)
12
+ (l = t[a]) && (r = (n ? l(e, p, r) : l(r)) || r);
13
+ return n && r && O(e, p, r), r;
14
+ };
15
+ let i = class extends d {
16
+ constructor() {
17
+ super(...arguments), this.setOperator = (t) => {
18
+ }, this.type = "string", this.disabled = !1, this.filterOperators = [], this.isOpen = !1, this._handleOutsideClick = (t) => {
19
+ t.composedPath().includes(this) || (this.isOpen = !1, document.removeEventListener("click", this._handleOutsideClick, { capture: !0 }));
20
+ };
21
+ }
22
+ handleOperator(t) {
23
+ typeof this.setOperator == "function" ? (this.operator = t, this.setOperator(t)) : console.error("setOperator is not a function");
24
+ }
25
+ async toggleCustomPopover(t) {
26
+ t.stopPropagation(), await this.updateComplete, this.isOpen = !this.isOpen, this.isOpen ? setTimeout(() => {
27
+ document.addEventListener("click", this._handleOutsideClick, { capture: !0 });
28
+ }, 0) : document.removeEventListener("click", this._handleOutsideClick, { capture: !0 });
29
+ }
30
+ disconnectedCallback() {
31
+ super.disconnectedCallback(), document.removeEventListener("click", this._handleOutsideClick, { capture: !0 });
32
+ }
33
+ render() {
34
+ var t;
35
+ return c`
36
+ <lit-icon-button
37
+ icon="filter"
38
+ size="small"
39
+ variant="text"
40
+ slot="reference"
41
+ @click=${this.toggleCustomPopover}
42
+ >
43
+ </lit-icon-button>
44
+ <simple-popper placement="bottom-end" manualOpening=${!0} .showing=${this.isOpen}>
45
+ <lit-menu>
46
+ ${(t = this.filterOperators) == null ? void 0 : t.map(
47
+ (e) => c`
48
+ <lit-menu-item
49
+ .onClick="${() => this.handleOperator(e.value)}"
50
+ .isActive="${this.operator === e.value}"
51
+ >
52
+ ${h(e.label)}
53
+ </lit-menu-item>
54
+ `
55
+ )}
56
+ </lit-menu>
57
+ </simple-popper>
58
+ `;
59
+ }
60
+ };
61
+ i.styles = [
62
+ f`
63
+ :host {
64
+ font-family: 'Inter', sans-serif;
65
+ }
66
+ .disabled {
67
+ background-color: #f8f8f8;
68
+ }
69
+ `
70
+ ];
71
+ s([
72
+ o({ type: Function })
73
+ ], i.prototype, "setOperator", 2);
74
+ s([
75
+ o({ type: String })
76
+ ], i.prototype, "type", 2);
77
+ s([
78
+ o({ type: String })
79
+ ], i.prototype, "operator", 2);
80
+ s([
81
+ o({ type: Boolean })
82
+ ], i.prototype, "disabled", 2);
83
+ s([
84
+ o({ type: Array })
85
+ ], i.prototype, "filterOperators", 2);
86
+ s([
87
+ u()
88
+ ], i.prototype, "isOpen", 2);
89
+ i = s([
90
+ m("lit-data-grid-operators-popover")
91
+ ], i);
92
+ export {
93
+ i as LitDataGridOperatorsPopover
94
+ };
@@ -0,0 +1,73 @@
1
+ import "../node_modules/@lit/reactive-element/reactive-element.js";
2
+ import { html as n } from "../node_modules/lit-html/lit-html.js";
3
+ import { LitElement as c } from "../node_modules/lit-element/lit-element.js";
4
+ import { customElement as m } from "../node_modules/@lit/reactive-element/decorators/custom-element.js";
5
+ import { property as d } from "../node_modules/@lit/reactive-element/decorators/property.js";
6
+ import { tooltip as f } from "./simple-tooltip.js";
7
+ var u = Object.defineProperty, h = Object.getOwnPropertyDescriptor, p = (l, e, t, i) => {
8
+ for (var o = i > 1 ? void 0 : i ? h(e, t) : e, r = l.length - 1, s; r >= 0; r--)
9
+ (s = l[r]) && (o = (i ? s(e, t, o) : s(o)) || o);
10
+ return i && o && u(e, t, o), o;
11
+ };
12
+ let a = class extends c {
13
+ constructor() {
14
+ super(...arguments), this.buttons = [];
15
+ }
16
+ handleOnClick(l, e) {
17
+ l.stopPropagation(), e();
18
+ }
19
+ render() {
20
+ const l = this.buttons.filter((t) => !t.showInMenu), e = this.buttons.filter((t) => t.showInMenu);
21
+ return n`
22
+ <div
23
+ style="display: flex; height: 100%; align-items: center; justify-content: flex-end;"
24
+ >
25
+ ${l.map(
26
+ (t) => n`
27
+ <lit-icon-button
28
+ variant="text"
29
+ size="small"
30
+ .icon="${t.icon}"
31
+ @click="${(i) => this.handleOnClick(i, t.onClick)}"
32
+ .disabled="${t.disabled}"
33
+ .marked="${t.marked}"
34
+ ${f(t.label, "left")}
35
+ ></lit-icon-button>
36
+ `
37
+ )}
38
+ ${e.length > 0 ? n` <lit-icon-button
39
+ size="small"
40
+ variant="text"
41
+ icon="morevertical"
42
+ slot="reference"
43
+ @click="${(t) => t.stopPropagation()}"
44
+ ></lit-icon-button>
45
+ <simple-popper offset="0" placement="bottom-end">
46
+ <lit-menu>
47
+ ${e.map(
48
+ (t) => n`
49
+ <lit-menu-item
50
+ id="${t.id}"
51
+ icon="${t.icon}"
52
+ .onClick="${(i) => this.handleOnClick(i, t.onClick)}"
53
+ .disabled="${t.disabled}"
54
+ >
55
+ ${t.label}
56
+ </lit-menu-item>
57
+ `
58
+ )}
59
+ </lit-menu>
60
+ </simple-popper>` : null}
61
+ </div>
62
+ `;
63
+ }
64
+ };
65
+ p([
66
+ d({ type: Array })
67
+ ], a.prototype, "buttons", 2);
68
+ a = p([
69
+ m("lit-data-grid-row-actions")
70
+ ], a);
71
+ export {
72
+ a as LitDataGridRowActions
73
+ };