overview-components 1.0.96 → 1.0.98
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/_commonjsHelpers.js +4 -24
- package/dist/assets/icons/iconGlyphs.js +680 -0
- package/dist/assets/illustration/not-found.js +109 -0
- package/dist/components/components-settings/data-grid-settings.js +288 -0
- package/dist/components/lit-attachments-tab.js +1 -1
- package/dist/index.d.ts +27 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +76 -38
- package/dist/node_modules/lit-html/directives/class-map.js +34 -0
- package/dist/shared/filter-inputs.js +326 -0
- package/dist/shared/lit-checkbox.js +155 -0
- package/dist/shared/lit-data-grid-action-buttons-popover.js +258 -0
- package/dist/shared/lit-data-grid-density-popover.js +79 -0
- package/dist/shared/lit-data-grid-export-popover.js +66 -0
- package/dist/shared/lit-data-grid-row-actions.js +73 -0
- package/dist/shared/lit-icon-button.d.ts +1 -1
- package/dist/shared/lit-icon-button.d.ts.map +1 -1
- package/dist/shared/lit-icon-button.js +91 -0
- package/dist/shared/lit-icon.js +282 -0
- package/dist/shared/lit-loading-bar.d.ts +3 -3
- package/dist/shared/lit-loading-bar.d.ts.map +1 -1
- package/dist/shared/lit-loading-bar.js +94 -0
- package/dist/shared/lit-overflow-tooltip.js +85 -0
- package/dist/shared/lit-responsive-button.js +84 -0
- package/dist/shared/simple-tooltip.js +1 -1
- package/dist/style.css +1 -0
- package/dist/styles.js +174 -0
- package/dist/utils/utils.js +11 -0
- package/package.json +1 -1
- package/dist/_virtual/___vite-browser-external.js +0 -6
- package/dist/_virtual/__vite-browser-external.js +0 -4
- package/dist/_virtual/_commonjs-dynamic-modules.js +0 -6
- package/dist/_virtual/pdf.js +0 -4
- package/dist/node_modules/pdfjs-dist/build/pdf.js +0 -10310
|
@@ -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,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
|
+
};
|
|
@@ -9,7 +9,7 @@ type LitIconButtonProps = {
|
|
|
9
9
|
icon?: Icon;
|
|
10
10
|
marked?: boolean;
|
|
11
11
|
};
|
|
12
|
-
export declare class
|
|
12
|
+
export declare class LitIconButton extends LitElement {
|
|
13
13
|
variant?: 'text' | 'contained' | 'outlined' | 'dashed' | 'error' | 'ai' | 'outlined-ai';
|
|
14
14
|
size?: 'small' | 'medium' | 'large';
|
|
15
15
|
disabled?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lit-icon-button.d.ts","sourceRoot":"","sources":["../../src/shared/lit-icon-button.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAa,MAAM,KAAK,CAAC;AAE5C,OAAO,eAAe,CAAC;AACvB,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAK1C,KAAK,kBAAkB,GAAG;IACtB,OAAO,CAAC,EAAE,MAAM,GAAG,WAAW,GAAG,UAAU,GAAG,QAAQ,GAAG,OAAO,GAAG,IAAI,GAAG,aAAa,CAAC;IACxF,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;IAC7C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,MAAM,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AACF,qBACa,
|
|
1
|
+
{"version":3,"file":"lit-icon-button.d.ts","sourceRoot":"","sources":["../../src/shared/lit-icon-button.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAa,MAAM,KAAK,CAAC;AAE5C,OAAO,eAAe,CAAC;AACvB,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAK1C,KAAK,kBAAkB,GAAG;IACtB,OAAO,CAAC,EAAE,MAAM,GAAG,WAAW,GAAG,UAAU,GAAG,QAAQ,GAAG,OAAO,GAAG,IAAI,GAAG,aAAa,CAAC;IACxF,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;IAC7C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,MAAM,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AACF,qBACa,aAAc,SAAQ,UAAU;IAEb,OAAO,CAAC,EAC9B,MAAM,GACN,WAAW,GACX,UAAU,GACV,QAAQ,GACR,OAAO,GACP,IAAI,GACJ,aAAa,CAAe;IACN,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAY;IAC9C,QAAQ,CAAC,EAAE,OAAO,CAAS;IACZ,MAAM,CAAC,EAAE,OAAO,CAAS;IACzC,IAAI,CAAC,EAAE,IAAI,CAAS;IACnB,MAAM,CAAC,EAAE,OAAO,CAAS;IAGtD,MAAM,CAAC,MAAM,4BAiCX;IAGF,MAAM;CAwBT;AAED,OAAO,CAAC,MAAM,CAAC;IACX,UAAU,qBAAqB;QAC3B,iBAAiB,EAAE,kBAAkB,CAAC;KACzC;CACJ"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import "../node_modules/@lit/reactive-element/reactive-element.js";
|
|
2
|
+
import { html as m } 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 h } from "../node_modules/@lit/reactive-element/decorators/custom-element.js";
|
|
5
|
+
import { property as s } from "../node_modules/@lit/reactive-element/decorators/property.js";
|
|
6
|
+
import u from "./styles/button-shared-styles.js";
|
|
7
|
+
import { css as d } from "../node_modules/@lit/reactive-element/css-tag.js";
|
|
8
|
+
var b = Object.defineProperty, f = Object.getOwnPropertyDescriptor, i = (r, o, a, n) => {
|
|
9
|
+
for (var e = n > 1 ? void 0 : n ? f(o, a) : o, p = r.length - 1, l; p >= 0; p--)
|
|
10
|
+
(l = r[p]) && (e = (n ? l(o, a, e) : l(e)) || e);
|
|
11
|
+
return n && e && b(o, a, e), e;
|
|
12
|
+
};
|
|
13
|
+
let t = class extends c {
|
|
14
|
+
constructor() {
|
|
15
|
+
super(...arguments), this.variant = "contained", this.size = "medium", this.disabled = !1, this.active = !1, this.icon = "add", this.marked = !1;
|
|
16
|
+
}
|
|
17
|
+
// Render method to define the component's template
|
|
18
|
+
render() {
|
|
19
|
+
const r = `button--${this.size} button--${this.variant} ${this.active ? "active" : ""}`, o = this.size === "large" ? "1.5rem" : this.size === "medium" || this.marked ? "1.25rem" : this.size === "small" ? "1rem" : "0.75rem";
|
|
20
|
+
return m`
|
|
21
|
+
<button ?disabled=${this.disabled} class=${r}>
|
|
22
|
+
<slot name="icon"
|
|
23
|
+
>${this.icon && m`<lit-icon
|
|
24
|
+
class="out-ai"
|
|
25
|
+
.isActive="${this.marked}"
|
|
26
|
+
size="${o}"
|
|
27
|
+
icon=${this.icon}
|
|
28
|
+
></lit-icon>`}</slot
|
|
29
|
+
>
|
|
30
|
+
</button>
|
|
31
|
+
`;
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
t.styles = [
|
|
35
|
+
// styles,
|
|
36
|
+
u,
|
|
37
|
+
d`
|
|
38
|
+
/* Base styles for icon button */
|
|
39
|
+
|
|
40
|
+
button {
|
|
41
|
+
cursor: pointer;
|
|
42
|
+
font-size: inherit;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/* Size variations */
|
|
46
|
+
|
|
47
|
+
.button--mini {
|
|
48
|
+
width: 12px;
|
|
49
|
+
height: 12px;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.button--small {
|
|
53
|
+
width: 20px;
|
|
54
|
+
height: 20px;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.button--medium {
|
|
58
|
+
width: 48px;
|
|
59
|
+
height: 36px;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.button--large {
|
|
63
|
+
width: 48px;
|
|
64
|
+
height: 48px;
|
|
65
|
+
}
|
|
66
|
+
`
|
|
67
|
+
];
|
|
68
|
+
i([
|
|
69
|
+
s({ type: String })
|
|
70
|
+
], t.prototype, "variant", 2);
|
|
71
|
+
i([
|
|
72
|
+
s({ type: String })
|
|
73
|
+
], t.prototype, "size", 2);
|
|
74
|
+
i([
|
|
75
|
+
s({ type: Boolean })
|
|
76
|
+
], t.prototype, "disabled", 2);
|
|
77
|
+
i([
|
|
78
|
+
s({ type: Boolean, reflect: !0 })
|
|
79
|
+
], t.prototype, "active", 2);
|
|
80
|
+
i([
|
|
81
|
+
s({ type: String })
|
|
82
|
+
], t.prototype, "icon", 2);
|
|
83
|
+
i([
|
|
84
|
+
s({ type: Boolean })
|
|
85
|
+
], t.prototype, "marked", 2);
|
|
86
|
+
t = i([
|
|
87
|
+
h("lit-icon-button")
|
|
88
|
+
], t);
|
|
89
|
+
export {
|
|
90
|
+
t as LitIconButton
|
|
91
|
+
};
|