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.
Files changed (34) hide show
  1. package/dist/_virtual/_commonjsHelpers.js +4 -24
  2. package/dist/assets/icons/iconGlyphs.js +680 -0
  3. package/dist/assets/illustration/not-found.js +109 -0
  4. package/dist/components/components-settings/data-grid-settings.js +288 -0
  5. package/dist/components/lit-attachments-tab.js +1 -1
  6. package/dist/index.d.ts +27 -0
  7. package/dist/index.d.ts.map +1 -1
  8. package/dist/index.js +76 -38
  9. package/dist/node_modules/lit-html/directives/class-map.js +34 -0
  10. package/dist/shared/filter-inputs.js +326 -0
  11. package/dist/shared/lit-checkbox.js +155 -0
  12. package/dist/shared/lit-data-grid-action-buttons-popover.js +258 -0
  13. package/dist/shared/lit-data-grid-density-popover.js +79 -0
  14. package/dist/shared/lit-data-grid-export-popover.js +66 -0
  15. package/dist/shared/lit-data-grid-row-actions.js +73 -0
  16. package/dist/shared/lit-icon-button.d.ts +1 -1
  17. package/dist/shared/lit-icon-button.d.ts.map +1 -1
  18. package/dist/shared/lit-icon-button.js +91 -0
  19. package/dist/shared/lit-icon.js +282 -0
  20. package/dist/shared/lit-loading-bar.d.ts +3 -3
  21. package/dist/shared/lit-loading-bar.d.ts.map +1 -1
  22. package/dist/shared/lit-loading-bar.js +94 -0
  23. package/dist/shared/lit-overflow-tooltip.js +85 -0
  24. package/dist/shared/lit-responsive-button.js +84 -0
  25. package/dist/shared/simple-tooltip.js +1 -1
  26. package/dist/style.css +1 -0
  27. package/dist/styles.js +174 -0
  28. package/dist/utils/utils.js +11 -0
  29. package/package.json +1 -1
  30. package/dist/_virtual/___vite-browser-external.js +0 -6
  31. package/dist/_virtual/__vite-browser-external.js +0 -4
  32. package/dist/_virtual/_commonjs-dynamic-modules.js +0 -6
  33. package/dist/_virtual/pdf.js +0 -4
  34. package/dist/node_modules/pdfjs-dist/build/pdf.js +0 -10310
@@ -0,0 +1,326 @@
1
+ import "../node_modules/@lit/reactive-element/reactive-element.js";
2
+ import { html as p } from "../node_modules/lit-html/lit-html.js";
3
+ import { LitElement as y } from "../node_modules/lit-element/lit-element.js";
4
+ import d from "../node_modules/lodash/lodash.js";
5
+ import { msg as m } from "../node_modules/@lit/localize/init/install.js";
6
+ import "../node_modules/@lit/localize/init/runtime.js";
7
+ import { customElement as v } from "../node_modules/@lit/reactive-element/decorators/custom-element.js";
8
+ import { property as h } from "../node_modules/@lit/reactive-element/decorators/property.js";
9
+ import { state as f } from "../node_modules/@lit/reactive-element/decorators/state.js";
10
+ /* empty css */
11
+ import { debounce as c } from "../utils/utils.js";
12
+ import { css as $ } from "../node_modules/@lit/reactive-element/css-tag.js";
13
+ var g = Object.defineProperty, b = Object.getOwnPropertyDescriptor, o = (e, t, s, r) => {
14
+ for (var i = r > 1 ? void 0 : r ? b(t, s) : t, a = e.length - 1, l; a >= 0; a--)
15
+ (l = e[a]) && (i = (r ? l(t, s, i) : l(i)) || i);
16
+ return r && i && g(t, s, i), i;
17
+ };
18
+ let n = class extends y {
19
+ constructor() {
20
+ super(), this.minFilterCharacters = 0, this.server = !1, this.value = void 0, this.operator = void 0, this.filterOperators = [], this.valueOptions = [], this.filterVariant = [], this.isClickInside = !1, this.handleSetOperator = (e, t) => {
21
+ var s, r, i;
22
+ this.operator = (s = this.filterOperators.find((a) => a.value === e)) == null ? void 0 : s.value, ["isEmpty", "isNotEmpty"].includes(e) ? (this.value = null, (r = this.column) == null || r.setFilterValue({ value: this.value, operator: e })) : this.value && !(t != null && t.silent) && ((i = this.column) == null || i.setFilterValue({
23
+ value: this.value,
24
+ operator: this.operator
25
+ }));
26
+ }, this.debouncedSetTextFilter = c((e) => {
27
+ this.checkNumberOfCharacters(e, () => {
28
+ this.handleSetFilter(e);
29
+ });
30
+ }), this.debouncedSetNumberFilter = c((e) => {
31
+ this.handleSetFilter(e);
32
+ });
33
+ }
34
+ checkNumberOfCharacters(e, t) {
35
+ (d.isEmpty(e) || e.length >= this.minFilterCharacters) && t();
36
+ }
37
+ updated(e) {
38
+ var t, s, r, i, a;
39
+ if (e.has("column") && (this.filterVariant === "select" || this.filterVariant === "multiselect"))
40
+ if ((s = (t = this.column) == null ? void 0 : t.columnDef) != null && s.meta.valueOptions || this.server)
41
+ this.valueOptions = ((i = (r = this.column) == null ? void 0 : r.columnDef) == null ? void 0 : i.meta.valueOptions) || [];
42
+ else {
43
+ const l = Array.from(
44
+ (a = this.column) == null ? void 0 : a.getFacetedUniqueValues().keys()
45
+ ).sort().slice(0, 5e3);
46
+ this.valueOptions = l.map((u) => ({
47
+ value: u,
48
+ label: u
49
+ }));
50
+ }
51
+ }
52
+ handleSetFilter(e) {
53
+ var t, s, r;
54
+ this.value = e, d.isEmpty(e) ? (r = this.column) == null || r.setFilterValue() : this.server ? (t = this.column) == null || t.setFilterValue({ value: this.value, operator: this.operator }) : (s = this.column) == null || s.setFilterValue(this.value);
55
+ }
56
+ handleClearFilter() {
57
+ var e;
58
+ this.server && (this.operator = this.filterOperators[0].value), this.value = null, (e = this.column) == null || e.setFilterValue();
59
+ }
60
+ handleDateChange(e) {
61
+ d.isEqual(e, this.value) || this.handleSetFilter(e);
62
+ }
63
+ handleStartDateChange(e) {
64
+ this.startDate = e, this.handleFilterDateRangeChange();
65
+ }
66
+ handleEndDateChange(e) {
67
+ this.endDate = e, this.handleFilterDateRangeChange();
68
+ }
69
+ handleFilterDateRangeChange() {
70
+ !this.startDate && !this.endDate ? this.handleSetFilter(void 0) : this.handleSetFilter({ startDate: this.startDate, endDate: this.endDate });
71
+ }
72
+ handleKeyDown(e) {
73
+ if (e.key === "Enter") {
74
+ const t = e.target;
75
+ t && (this.handleSetFilter(t.value), this.requestUpdate());
76
+ } else if (e.key === "Tab") {
77
+ const t = this.getFocusableElements();
78
+ if (t.length <= 1) {
79
+ e.preventDefault(), this.dispatchEvent(
80
+ new CustomEvent("filter-tab", {
81
+ bubbles: !0,
82
+ composed: !0,
83
+ detail: {
84
+ direction: e.shiftKey ? "backward" : "forward",
85
+ currentFilter: this
86
+ }
87
+ })
88
+ );
89
+ return;
90
+ }
91
+ const s = e.target, r = t.indexOf(s);
92
+ if (e.shiftKey && r === 0 || !e.shiftKey && r === t.length - 1)
93
+ e.preventDefault(), this.dispatchEvent(
94
+ new CustomEvent("filter-tab", {
95
+ bubbles: !0,
96
+ composed: !0,
97
+ detail: {
98
+ direction: e.shiftKey ? "backward" : "forward",
99
+ currentFilter: this
100
+ }
101
+ })
102
+ );
103
+ else {
104
+ e.preventDefault();
105
+ const i = e.shiftKey ? r - 1 : r + 1;
106
+ t[i].focus();
107
+ }
108
+ }
109
+ }
110
+ // Improved getFocusableElements to find all actual focusable elements
111
+ getFocusableElements() {
112
+ var i, a, l;
113
+ const e = [], t = (i = this.shadowRoot) == null ? void 0 : i.querySelectorAll("lit-input");
114
+ t && t.forEach((u) => e.push(u));
115
+ const s = (a = this.shadowRoot) == null ? void 0 : a.querySelectorAll("lit-select");
116
+ s && s.forEach((u) => e.push(u));
117
+ const r = (l = this.shadowRoot) == null ? void 0 : l.querySelectorAll("lit-date-picker");
118
+ return r && r.forEach((u) => e.push(u)), e;
119
+ }
120
+ focus() {
121
+ var t;
122
+ const e = (t = this.shadowRoot) == null ? void 0 : t.querySelector(
123
+ "lit-input, lit-select, lit-date-picker"
124
+ );
125
+ e == null || e.focus();
126
+ }
127
+ render() {
128
+ return this.filterVariant === "numberRange" ? this.renderNumberRangeInput() : this.filterVariant === "select" ? this.renderSelectInput() : this.filterVariant === "multiselect" ? this.renderSelectInput(!0) : this.filterVariant === "number" ? this.renderNumberInput() : this.filterVariant === "currency" ? this.renderNumberInput() : this.filterVariant === "date" ? this.renderDateInput() : this.filterVariant === "dateTime" ? this.renderDateInput() : this.filterVariant === "dateRange" ? this.renderDateRangeInput() : this.filterVariant === "dateTimeRange" ? this.renderDateRangeInput() : this.renderTextInput();
129
+ }
130
+ renderNumberRangeInput() {
131
+ var t, s;
132
+ const e = c(
133
+ (r, i) => {
134
+ this.handleSetFilter([r, i]);
135
+ }
136
+ );
137
+ return p`
138
+ <div class="range">
139
+ <lit-input
140
+ class="range-fields"
141
+ type="number"
142
+ .server="${this.server}"
143
+ .value="${((t = this.value) == null ? void 0 : t[0]) || ""}"
144
+ placeholder="Min"
145
+ .onInput=${(r) => {
146
+ var l;
147
+ const i = r ? Number(r) : void 0, a = (l = this.value) == null ? void 0 : l[1];
148
+ e(i, a);
149
+ }}
150
+ .onClear="${() => {
151
+ this.handleClearFilter();
152
+ }}"
153
+ @keydown=${(r) => this.handleKeyDown(r)}
154
+ ></lit-input>
155
+
156
+ <lit-input
157
+ class="range-fields"
158
+ type="number"
159
+ .server="${this.server}"
160
+ .value="${((s = this.value) == null ? void 0 : s[1]) || ""}"
161
+ placeholder="Max"
162
+ .onInput=${(r) => {
163
+ var l;
164
+ const i = r ? Number(r) : void 0, a = (l = this.value) == null ? void 0 : l[0];
165
+ e(a, i);
166
+ }}
167
+ .onClear="${() => {
168
+ this.handleClearFilter();
169
+ }}"
170
+ @keydown=${(r) => this.handleKeyDown(r)}
171
+ ></lit-input>
172
+ </div>
173
+ `;
174
+ }
175
+ renderSelectInput(e = !1) {
176
+ return p`
177
+ <lit-select
178
+ id=${this.column.id}
179
+ .value="${typeof this.value == "number" ? this.value.toString() : this.value || []}"
180
+ .server="${this.server}"
181
+ .options="${this.valueOptions}"
182
+ .onChange="${(t) => {
183
+ const s = t.length === 0 ? void 0 : t;
184
+ this.handleSetFilter(s);
185
+ }}"
186
+ .multiple="${e}"
187
+ @keydown=${(t) => this.handleKeyDown(t)}
188
+ .setOperator="${this.handleSetOperator}"
189
+ .operator="${this.operator}"
190
+ .filterOperators="${this.filterOperators}"
191
+ ></lit-select>
192
+ `;
193
+ }
194
+ renderNumberInput() {
195
+ return p`
196
+ <lit-input
197
+ type="number"
198
+ .value="${this.value || ""}"
199
+ .server="${this.server}"
200
+ .onInput=${(e) => this.debouncedSetNumberFilter(e)}
201
+ .onClear="${() => {
202
+ this.handleClearFilter();
203
+ }}"
204
+ @keydown=${(e) => this.handleKeyDown(e)}
205
+ .setOperator="${this.handleSetOperator}"
206
+ .operator="${this.operator}"
207
+ .disabled="${this.server && ["isEmpty", "isNotEmpty"].includes(this.operator)}"
208
+ .filterOperators="${this.filterOperators}"
209
+ ></lit-input>
210
+ `;
211
+ }
212
+ renderDateInput() {
213
+ return p`
214
+ <lit-date-picker
215
+ class="datePicker"
216
+ .server="${this.server}"
217
+ .pickerVariant=${this.filterVariant || ""}
218
+ .value=${this.value}
219
+ .dateFormat=${this.dateFormat}
220
+ .userLang=${this.userLang}
221
+ .onChange="${(e) => this.handleDateChange(e)}"
222
+ @keydown=${(e) => this.handleKeyDown(e)}
223
+ .setOperator="${this.handleSetOperator}"
224
+ .operator="${this.operator}"
225
+ .disabled="${this.server && ["isEmpty", "isNotEmpty"].includes(this.operator)}"
226
+ .range="${["fromTo"].includes(this.operator)}"
227
+ .filterOperators="${this.filterOperators}"
228
+ ></lit-date-picker>
229
+ `;
230
+ }
231
+ renderDateRangeInput() {
232
+ return p`
233
+ <div class="range">
234
+ <lit-date-picker
235
+ class="range-fields"
236
+ .server="${this.server}"
237
+ .dateFormat=${this.dateFormat}
238
+ .userLang=${this.userLang}
239
+ placeholder=${m("Od")}
240
+ .onChange="${(e) => this.handleStartDateChange(e)}"
241
+ @keydown=${(e) => this.handleKeyDown(e)}
242
+ ></lit-date-picker>
243
+
244
+ <lit-date-picker
245
+ class="range-fields"
246
+ .server="${this.server}"
247
+ .dateFormat=${this.dateFormat}
248
+ .userLang=${this.userLang}
249
+ placeholder=${m("Do")}
250
+ .onChange="${(e) => this.handleEndDateChange(e)}"
251
+ @keydown=${(e) => this.handleKeyDown(e)}
252
+ ></lit-date-picker>
253
+ </div>
254
+ `;
255
+ }
256
+ renderTextInput() {
257
+ return p`
258
+ <lit-input
259
+ .value="${this.value}"
260
+ .server="${this.server}"
261
+ .onInput=${(e) => this.debouncedSetTextFilter(e)}
262
+ .onClear="${() => {
263
+ this.handleClearFilter();
264
+ }}"
265
+ @keydown=${(e) => this.handleKeyDown(e)}
266
+ .setOperator="${this.handleSetOperator}"
267
+ .operator="${this.operator}"
268
+ .disabled="${this.server && ["isEmpty", "isNotEmpty"].includes(this.operator)}"
269
+ .filterOperators="${this.filterOperators}"
270
+ ></lit-input>
271
+ `;
272
+ }
273
+ };
274
+ n.styles = $`
275
+ .range {
276
+ display: flex;
277
+ gap: 0.3125rem;
278
+ }
279
+
280
+ .range-fields {
281
+ width: 100%;
282
+ min-width: 70px;
283
+ }
284
+ `;
285
+ o([
286
+ h({ type: Object })
287
+ ], n.prototype, "column", 2);
288
+ o([
289
+ h({ type: String })
290
+ ], n.prototype, "dateFormat", 2);
291
+ o([
292
+ h({ type: String })
293
+ ], n.prototype, "userLang", 2);
294
+ o([
295
+ h({ type: Number })
296
+ ], n.prototype, "minFilterCharacters", 2);
297
+ o([
298
+ h({ type: Boolean })
299
+ ], n.prototype, "server", 2);
300
+ o([
301
+ h({ type: Object })
302
+ ], n.prototype, "value", 2);
303
+ o([
304
+ h({ type: String })
305
+ ], n.prototype, "operator", 2);
306
+ o([
307
+ h({ type: Array })
308
+ ], n.prototype, "filterOperators", 2);
309
+ o([
310
+ h({ type: Array })
311
+ ], n.prototype, "valueOptions", 2);
312
+ o([
313
+ f()
314
+ ], n.prototype, "startDate", 2);
315
+ o([
316
+ f()
317
+ ], n.prototype, "endDate", 2);
318
+ o([
319
+ f()
320
+ ], n.prototype, "filterVariant", 2);
321
+ n = o([
322
+ v("filter-inputs")
323
+ ], n);
324
+ export {
325
+ n as FilterInputs
326
+ };
@@ -0,0 +1,155 @@
1
+ import "../node_modules/@lit/reactive-element/reactive-element.js";
2
+ import { html as p } 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 h } from "../node_modules/@lit/reactive-element/decorators/custom-element.js";
5
+ import { property as o } from "../node_modules/@lit/reactive-element/decorators/property.js";
6
+ import { classMap as b } from "../node_modules/lit-html/directives/class-map.js";
7
+ import { css as m } from "../node_modules/@lit/reactive-element/css-tag.js";
8
+ var u = Object.defineProperty, f = Object.getOwnPropertyDescriptor, a = (e, i, c, n) => {
9
+ for (var r = n > 1 ? void 0 : n ? f(i, c) : i, s = e.length - 1, l; s >= 0; s--)
10
+ (l = e[s]) && (r = (n ? l(i, c, r) : l(r)) || r);
11
+ return n && r && u(i, c, r), r;
12
+ };
13
+ let t = class extends d {
14
+ constructor() {
15
+ super(...arguments), this.disabled = !1, this.checked = !1, this.indeterminate = !1, this.onChange = () => {
16
+ }, this.value = "", this.label = "";
17
+ }
18
+ // 1) Manually sync the indeterminate property on the <input>
19
+ updated(e) {
20
+ super.updated(e);
21
+ const i = this.renderRoot.querySelector(
22
+ 'input[type="checkbox"]'
23
+ );
24
+ i && (i.indeterminate = this.indeterminate);
25
+ }
26
+ // 2) Intercept clicks when we're indeterminate
27
+ _onClick(e) {
28
+ this.indeterminate && (e.preventDefault(), this.indeterminate = !1, this._notifyChange(e));
29
+ }
30
+ // 3) Handle the native change event when not indeterminate
31
+ _onChange(e) {
32
+ this.checked = e.target.checked, this._notifyChange(e);
33
+ }
34
+ _notifyChange(e) {
35
+ this.dispatchEvent(
36
+ new CustomEvent("change", {
37
+ bubbles: !0,
38
+ composed: !0,
39
+ detail: e.target.checked
40
+ })
41
+ ), typeof this.onChange == "function" && this.onChange(e);
42
+ }
43
+ render() {
44
+ return p`
45
+ <div class="container">
46
+ ${this.label ? p`
47
+ <lit-label label="${this.label}" ?disabled=${this.disabled}> </lit-label>
48
+ ` : ""}
49
+ <input
50
+ class=${b({
51
+ indeterminate: this.indeterminate,
52
+ marginLeft: this.label !== ""
53
+ })}
54
+ type="checkbox"
55
+ .checked=${this.checked}
56
+ ?disabled=${this.disabled}
57
+ @click=${this._onClick}
58
+ @change=${this._onChange}
59
+ .value=${this.value}
60
+ aria-label="${this.label || "checkbox"}"
61
+ aria-checked="${this.indeterminate ? "mixed" : this.checked ? "true" : "false"}"
62
+ aria-disabled="${this.disabled ? "true" : "false"}"
63
+ />
64
+ </div>
65
+ `;
66
+ }
67
+ };
68
+ t.styles = m`
69
+ :host {
70
+ display: inline-block;
71
+ font-family: Inter, sans-serif;
72
+ }
73
+ .container {
74
+ display: flex;
75
+ flex-direction: column;
76
+ }
77
+ /* Hide the default checkbox */
78
+ .marginLeft {
79
+ margin-left: 0.75rem;
80
+ }
81
+ input[type='checkbox'] {
82
+ position: relative;
83
+ appearance: none;
84
+ width: 20px;
85
+ height: 20px;
86
+ border: 1px solid var(--text-primary, #111827);
87
+ border-radius: 6px;
88
+ display: flex;
89
+ align-items: center;
90
+ justify-content: center;
91
+ background-color: var(--background-paper, #fff);
92
+ transition: all 0.1s ease-in-out;
93
+ cursor: pointer;
94
+ }
95
+
96
+ input[type='checkbox'].indeterminate {
97
+ background-color: var(--color-primary-main, #76b703);
98
+ border-color: var(--color-primary-main, #76b703);
99
+ }
100
+
101
+ input[type='checkbox'].indeterminate::after {
102
+ content: '−';
103
+ color: var(--background-default, #111827);
104
+ font-size: 16px;
105
+ }
106
+
107
+ /* Custom checkmark */
108
+ input[type='checkbox']::after {
109
+ content: '✓';
110
+ color: var(--background-paper, #111827);
111
+ font-size: 16px;
112
+ visible: none;
113
+ }
114
+
115
+ /* Checked state */
116
+ input[type='checkbox']:checked {
117
+ background-color: var(--color-primary-main, #76b703);
118
+ border-color: var(--color-primary-main, #76b703);
119
+ }
120
+
121
+ input[type='checkbox']:checked::after {
122
+ visible: visibility;
123
+ }
124
+
125
+ /* Disabled state */
126
+ input[type='checkbox']:disabled {
127
+ background-color: var(--background-paper, #fff);
128
+ border-color: var(--color-primary-disabled, #d0d3db);
129
+ cursor: not-allowed;
130
+ }
131
+ `;
132
+ a([
133
+ o({ type: Boolean })
134
+ ], t.prototype, "disabled", 2);
135
+ a([
136
+ o({ type: Boolean })
137
+ ], t.prototype, "checked", 2);
138
+ a([
139
+ o({ type: Boolean })
140
+ ], t.prototype, "indeterminate", 2);
141
+ a([
142
+ o({ type: Function })
143
+ ], t.prototype, "onChange", 2);
144
+ a([
145
+ o({ type: String })
146
+ ], t.prototype, "value", 2);
147
+ a([
148
+ o({ type: String })
149
+ ], t.prototype, "label", 2);
150
+ t = a([
151
+ h("lit-checkbox")
152
+ ], t);
153
+ export {
154
+ t as LitCheckbox
155
+ };