@sme.up/ketchup 6.0.0 → 6.2.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.
- package/dist/cjs/{cell-utils-a78d6fac.js → cell-utils-fe64a28c.js} +2 -2
- package/dist/cjs/{f-button-ac179257.js → f-button-5b69d882.js} +4 -4
- package/dist/cjs/f-cell-3a740c48.js +418 -0
- package/dist/cjs/f-checkbox-57443ca3.js +29 -0
- package/dist/cjs/{f-chip-b00897d7.js → f-chip-02e83f82.js} +3 -3
- package/dist/cjs/{f-image-89f25556.js → f-image-2a61ece2.js} +2 -2
- package/dist/cjs/{f-paginator-utils-8fa501b3.js → f-paginator-utils-09126bdd.js} +5 -5
- package/dist/cjs/{f-text-field-e1e45ade.js → f-text-field-9ee20a67.js} +3 -3
- package/dist/cjs/{index-eb556444.js → index-06b131ea.js} +6 -4
- package/dist/cjs/ketchup.cjs.js +3 -3
- package/dist/cjs/kup-accordion.cjs.entry.js +4 -4
- package/dist/cjs/kup-autocomplete_25.cjs.entry.js +209 -193
- package/dist/cjs/kup-box.cjs.entry.js +1306 -0
- package/dist/cjs/kup-calendar.cjs.entry.js +7 -7
- package/dist/cjs/kup-cell.cjs.entry.js +10 -9
- package/dist/cjs/kup-dash-list.cjs.entry.js +4 -4
- package/dist/cjs/kup-dash_2.cjs.entry.js +4 -7
- package/dist/cjs/{kup-form-editor.cjs.entry.js → kup-dashboard.cjs.entry.js} +123 -148
- package/dist/cjs/kup-drawer.cjs.entry.js +4 -4
- package/dist/cjs/{kup-box_2.cjs.entry.js → kup-echart.cjs.entry.js} +53 -1338
- package/dist/cjs/kup-family-tree.cjs.entry.js +410 -0
- package/dist/cjs/kup-form.cjs.entry.js +480 -0
- package/dist/cjs/kup-iframe.cjs.entry.js +3 -3
- package/dist/cjs/kup-image-list.cjs.entry.js +73 -11
- package/dist/cjs/kup-lazy.cjs.entry.js +4 -4
- package/dist/cjs/kup-magic-box.cjs.entry.js +4 -4
- package/dist/cjs/{kup-manager-7a941909.js → kup-manager-02acbb37.js} +407 -7
- package/dist/cjs/kup-nav-bar.cjs.entry.js +3 -3
- package/dist/cjs/kup-numeric-picker.cjs.entry.js +3 -3
- package/dist/cjs/kup-photo-frame.cjs.entry.js +5 -5
- package/dist/cjs/kup-probe.cjs.entry.js +2 -2
- package/dist/cjs/kup-qlik.cjs.entry.js +2 -2
- package/dist/cjs/kup-snackbar.cjs.entry.js +5 -5
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/{utils-6287d878.js → utils-4b208b48.js} +1 -1
- package/dist/collection/assets/dashboard.js +113 -0
- package/dist/collection/assets/data-table.js +15 -0
- package/dist/collection/assets/family-tree.js +2437 -0
- package/dist/collection/assets/form.js +433 -0
- package/dist/collection/assets/grid.js +17 -0
- package/dist/collection/assets/index.js +14 -6
- package/dist/collection/collection-manifest.json +4 -3
- package/dist/collection/components/kup-autocomplete/kup-autocomplete.js +135 -129
- package/dist/collection/components/kup-box/kup-box.js +13 -2
- package/dist/collection/components/kup-button/kup-button.js +1 -0
- package/dist/collection/components/kup-combobox/kup-combobox.js +16 -13
- package/dist/collection/components/kup-dashboard/kup-dashboard-declarations.js +10 -0
- package/dist/collection/components/{kup-form-editor/kup-form-editor.css → kup-dashboard/kup-dashboard.css} +7 -6
- package/dist/collection/components/{kup-form-editor/kup-form-editor.js → kup-dashboard/kup-dashboard.js} +148 -149
- package/dist/collection/components/kup-data-table/kup-data-table.js +7 -6
- package/dist/collection/components/kup-drawer/kup-drawer.css +5 -8
- package/dist/collection/components/kup-dropdown-button/kup-dropdown-button.js +1 -0
- package/dist/collection/components/kup-family-tree/kup-family-tree-declarations.js +12 -0
- package/dist/collection/components/kup-family-tree/kup-family-tree.css +101 -0
- package/dist/collection/components/kup-family-tree/kup-family-tree.js +666 -0
- package/dist/collection/components/kup-form/kup-form-declarations.js +25 -0
- package/dist/collection/components/kup-form/kup-form.css +99 -0
- package/dist/collection/components/kup-form/kup-form.js +647 -0
- package/dist/collection/components/kup-grid/kup-grid.js +1 -4
- package/dist/collection/components/kup-image-list/kup-image-list-state.js +9 -0
- package/dist/collection/components/kup-image-list/kup-image-list.css +0 -6
- package/dist/collection/components/kup-image-list/kup-image-list.js +113 -1
- package/dist/collection/components/kup-lazy/kup-lazy.css +13 -6
- package/dist/collection/components/kup-list/kup-list-helper.js +9 -3
- package/dist/collection/components/kup-photo-frame/kup-photo-frame.css +13 -3
- package/dist/collection/components/kup-photo-frame/kup-photo-frame.js +1 -1
- package/dist/collection/components/kup-text-field/kup-text-field-declarations.js +3 -0
- package/dist/collection/components/kup-text-field/kup-text-field.js +27 -0
- package/dist/collection/components/kup-time-picker/kup-time-picker.js +0 -6
- package/dist/collection/components/kup-tree/kup-tree.js +10 -4
- package/dist/collection/f-components/f-button/f-button.js +2 -2
- package/dist/collection/f-components/f-cell/f-cell-declarations.js +5 -1
- package/dist/collection/f-components/f-cell/f-cell.js +34 -114
- package/dist/collection/f-components/f-text-field/f-text-field.js +1 -1
- package/dist/collection/managers/kup-data/kup-data-node-helper.js +69 -0
- package/dist/collection/managers/kup-data/kup-data.js +109 -1
- package/dist/collection/managers/kup-language/kup-language-declarations.js +11 -0
- package/dist/collection/managers/kup-objects/kup-objects.js +10 -0
- package/dist/collection/managers/kup-theme/kup-theme-declarations.js +20 -3
- package/dist/collection/types/GenericTypes.js +3 -2
- package/dist/esm/{cell-utils-964da6b5.js → cell-utils-cb5d4149.js} +2 -2
- package/dist/esm/{f-button-871a544b.js → f-button-fd44ef70.js} +4 -4
- package/dist/esm/{f-cell-521ef17a.js → f-cell-7b159a22.js} +48 -283
- package/dist/esm/f-checkbox-c51c4a75.js +27 -0
- package/dist/esm/{f-chip-1dda722f.js → f-chip-c2e4c522.js} +3 -3
- package/dist/esm/{f-image-c468d8ae.js → f-image-2ab4b9aa.js} +2 -2
- package/dist/esm/{f-paginator-utils-7dff8ff0.js → f-paginator-utils-ef537d82.js} +5 -5
- package/dist/esm/{f-text-field-d6c61c73.js → f-text-field-41c575eb.js} +3 -3
- package/dist/esm/{index-baeab1ac.js → index-ad6ab214.js} +6 -4
- package/dist/esm/ketchup.js +3 -3
- package/dist/esm/kup-accordion.entry.js +4 -4
- package/dist/esm/kup-autocomplete_25.entry.js +199 -183
- package/dist/esm/kup-box.entry.js +1302 -0
- package/dist/esm/kup-calendar.entry.js +7 -7
- package/dist/esm/kup-cell.entry.js +9 -8
- package/dist/esm/kup-dash-list.entry.js +4 -4
- package/dist/esm/kup-dash_2.entry.js +4 -7
- package/dist/esm/{kup-form-editor.entry.js → kup-dashboard.entry.js} +123 -148
- package/dist/esm/kup-drawer.entry.js +4 -4
- package/dist/esm/{kup-box_2.entry.js → kup-echart.entry.js} +54 -1338
- package/dist/esm/kup-family-tree.entry.js +406 -0
- package/dist/esm/kup-form.entry.js +476 -0
- package/dist/esm/kup-iframe.entry.js +3 -3
- package/dist/esm/kup-image-list.entry.js +72 -10
- package/dist/esm/kup-lazy.entry.js +4 -4
- package/dist/esm/kup-magic-box.entry.js +4 -4
- package/dist/esm/{kup-manager-58b075b4.js → kup-manager-22a475e6.js} +404 -8
- package/dist/esm/kup-nav-bar.entry.js +3 -3
- package/dist/esm/kup-numeric-picker.entry.js +3 -3
- package/dist/esm/kup-photo-frame.entry.js +5 -5
- package/dist/esm/kup-probe.entry.js +2 -2
- package/dist/esm/kup-qlik.entry.js +2 -2
- package/dist/esm/kup-snackbar.entry.js +5 -5
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{utils-d7e4b3c2.js → utils-2c1f4122.js} +1 -1
- package/dist/ketchup/ketchup.esm.js +1 -1
- package/dist/ketchup/p-06c6cc68.js +1 -0
- package/dist/ketchup/{p-3c11e615.entry.js → p-0dacd4bc.entry.js} +1 -1
- package/dist/ketchup/{p-fac1a08b.entry.js → p-1959f835.entry.js} +1 -1
- package/dist/ketchup/p-1c44dc62.entry.js +1 -0
- package/dist/ketchup/{p-f09f2f98.entry.js → p-264b1b19.entry.js} +1 -1
- package/dist/ketchup/p-38d7584e.js +1 -0
- package/dist/ketchup/{p-f71a1675.entry.js → p-42080355.entry.js} +1 -1
- package/dist/ketchup/p-4bc9f98b.entry.js +1 -0
- package/dist/ketchup/p-578583db.entry.js +1 -0
- package/dist/ketchup/p-5866d507.entry.js +1 -0
- package/dist/ketchup/p-61059e9d.entry.js +9 -0
- package/dist/ketchup/{p-a615a92b.entry.js → p-664be494.entry.js} +1 -1
- package/dist/ketchup/{p-d2ee56dd.entry.js → p-67cd575d.entry.js} +1 -1
- package/dist/ketchup/{p-e0035c58.js → p-682a367a.js} +1 -1
- package/dist/ketchup/p-6ccf7eb2.entry.js +1 -0
- package/dist/ketchup/p-7230ab97.entry.js +1 -0
- package/dist/ketchup/p-752b4cef.entry.js +1 -0
- package/dist/ketchup/{p-954cc340.entry.js → p-7de3e7ac.entry.js} +1 -1
- package/dist/ketchup/p-928c5c36.js +1 -0
- package/dist/ketchup/{p-6dff70f8.entry.js → p-9b36497d.entry.js} +1 -1
- package/dist/ketchup/{p-99e0d768.entry.js → p-b982d137.entry.js} +1 -1
- package/dist/ketchup/{p-8cdf61a4.js → p-c0219e5e.js} +1 -1
- package/dist/ketchup/p-c55fd0a7.entry.js +1 -0
- package/dist/ketchup/p-cd5cfa7c.js +1 -0
- package/dist/ketchup/p-d154b3a0.entry.js +1 -0
- package/dist/ketchup/p-d2affb6f.entry.js +27 -0
- package/dist/ketchup/p-d3b542b3.js +2 -0
- package/dist/ketchup/{p-7454cb92.js → p-d6c12c6c.js} +1 -1
- package/dist/ketchup/p-da0eab60.entry.js +1 -0
- package/dist/ketchup/{p-7eff4eee.js → p-dc62a30f.js} +1 -1
- package/dist/ketchup/p-e9366aaf.entry.js +39 -0
- package/dist/ketchup/{p-44ec4f03.js → p-edae3076.js} +1 -1
- package/dist/ketchup/p-fc2b1229.js +30 -0
- package/dist/types/components/kup-autocomplete/kup-autocomplete.d.ts +1 -16
- package/dist/types/components/{kup-form-editor/kup-form-editor-declarations.d.ts → kup-dashboard/kup-dashboard-declarations.d.ts} +9 -27
- package/dist/types/components/{kup-form-editor/kup-form-editor.d.ts → kup-dashboard/kup-dashboard.d.ts} +12 -9
- package/dist/types/components/kup-family-tree/kup-family-tree-declarations.d.ts +33 -0
- package/dist/types/components/kup-family-tree/kup-family-tree.d.ts +61 -0
- package/dist/types/components/kup-form/kup-form-declarations.d.ts +60 -0
- package/dist/types/components/kup-form/kup-form.d.ts +63 -0
- package/dist/types/components/kup-image-list/kup-image-list-state.d.ts +6 -0
- package/dist/types/components/kup-image-list/kup-image-list.d.ts +17 -0
- package/dist/types/components/kup-text-field/kup-text-field-declarations.d.ts +3 -0
- package/dist/types/components/kup-text-field/kup-text-field.d.ts +5 -0
- package/dist/types/components/kup-time-picker/kup-time-picker.d.ts +0 -6
- package/dist/types/components/kup-tree/kup-tree-declarations.d.ts +2 -0
- package/dist/types/components.d.ts +460 -241
- package/dist/types/f-components/f-cell/f-cell-declarations.d.ts +4 -1
- package/dist/types/f-components/f-text-field/f-text-field-declarations.d.ts +1 -0
- package/dist/types/managers/kup-data/kup-data-declarations.d.ts +8 -0
- package/dist/types/managers/kup-data/kup-data-node-helper.d.ts +15 -1
- package/dist/types/managers/kup-data/kup-data.d.ts +7 -1
- package/dist/types/managers/kup-language/kup-language-declarations.d.ts +11 -1
- package/dist/types/managers/kup-objects/kup-objects.d.ts +6 -0
- package/dist/types/types/GenericTypes.d.ts +3 -2
- package/package.json +2 -2
- package/dist/cjs/f-cell-69294bca.js +0 -653
- package/dist/cjs/kup-field.cjs.entry.js +0 -241
- package/dist/collection/assets/form-editor.js +0 -338
- package/dist/collection/components/kup-field/kup-field-declarations.js +0 -15
- package/dist/collection/components/kup-field/kup-field.css +0 -48
- package/dist/collection/components/kup-field/kup-field.js +0 -514
- package/dist/collection/components/kup-form-editor/kup-form-editor-declarations.js +0 -23
- package/dist/esm/kup-field.entry.js +0 -237
- package/dist/ketchup/p-1ae66cc5.js +0 -1
- package/dist/ketchup/p-34b74425.js +0 -1
- package/dist/ketchup/p-4ffbc3ff.js +0 -1
- package/dist/ketchup/p-5264a3e6.entry.js +0 -1
- package/dist/ketchup/p-65974e48.entry.js +0 -1
- package/dist/ketchup/p-65b46587.entry.js +0 -40
- package/dist/ketchup/p-80968627.entry.js +0 -1
- package/dist/ketchup/p-a0f6e25c.entry.js +0 -1
- package/dist/ketchup/p-aca0e54b.js +0 -30
- package/dist/ketchup/p-b8939a8b.entry.js +0 -1
- package/dist/ketchup/p-bfc3bac7.js +0 -1
- package/dist/ketchup/p-c5ce8951.entry.js +0 -1
- package/dist/ketchup/p-cad1e097.entry.js +0 -9
- package/dist/ketchup/p-db71436b.entry.js +0 -27
- package/dist/ketchup/p-e1039cf2.entry.js +0 -1
- package/dist/ketchup/p-ea10176c.entry.js +0 -1
- package/dist/types/components/kup-field/kup-field-declarations.d.ts +0 -25
- package/dist/types/components/kup-field/kup-field.d.ts +0 -90
|
@@ -1,237 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, f as forceUpdate, h, H as Host, g as getElement } from './index-baeab1ac.js';
|
|
2
|
-
import { k as kupManagerInstance, c as KupDebugCategory } from './kup-manager-58b075b4.js';
|
|
3
|
-
import { c as componentWrapperId } from './GenericVariables-665de00a.js';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Props of the kup-field component.
|
|
7
|
-
* Used to export every prop in an object.
|
|
8
|
-
*/
|
|
9
|
-
var KupFieldProps;
|
|
10
|
-
(function (KupFieldProps) {
|
|
11
|
-
KupFieldProps["customStyle"] = "Custom style of the component.";
|
|
12
|
-
KupFieldProps["data"] = "Effective data to pass to the component.";
|
|
13
|
-
KupFieldProps["label"] = "The text of the label. If set to empty or has only white space chars, the label will be removed.";
|
|
14
|
-
KupFieldProps["labelPos"] = "Sets the label's position, left right or top.";
|
|
15
|
-
KupFieldProps["showSubmit"] = "Sets whether the submit button must be displayed or not.";
|
|
16
|
-
KupFieldProps["submitLabel"] = "Sets the submit button's label.";
|
|
17
|
-
KupFieldProps["submitPos"] = "Sets the submit button's position, top right bottom or left.";
|
|
18
|
-
KupFieldProps["type"] = "The type of the FLD";
|
|
19
|
-
})(KupFieldProps || (KupFieldProps = {}));
|
|
20
|
-
|
|
21
|
-
const kupFieldCss = ":host{display:block;font-size:var(--kup-font-size)}label{color:var(--kup-text-color);font-family:var(--kup-font-family);font-size:1em}.kup-field__component{display:inline-block}.label-top.submit-top label{float:left;margin:auto auto 1em auto}.label-top.submit-top kup-button{float:right;margin:auto auto 1em auto}.label-right label{display:inline-block;margin:auto auto auto 1em}.submit-right kup-button{display:inline-block;margin:auto auto auto 1em}.label-left label{display:inline-block;margin:auto 1em auto auto}.submit-left kup-button{display:inline-block;margin:auto 1em auto auto}.submit-bottom kup-button{display:block;margin:1em auto auto auto}";
|
|
22
|
-
|
|
23
|
-
const KupField = class {
|
|
24
|
-
constructor(hostRef) {
|
|
25
|
-
registerInstance(this, hostRef);
|
|
26
|
-
this.kupChange = createEvent(this, "kup-field-change", 6);
|
|
27
|
-
this.kupSubmit = createEvent(this, "kup-field-submit", 6);
|
|
28
|
-
/*-------------------------------------------------*/
|
|
29
|
-
/* P r o p s */
|
|
30
|
-
/*-------------------------------------------------*/
|
|
31
|
-
/**
|
|
32
|
-
* Custom style of the component.
|
|
33
|
-
* @default ""
|
|
34
|
-
* @see https://ketchup.smeup.com/ketchup-showcase/#/customization
|
|
35
|
-
*/
|
|
36
|
-
this.customStyle = '';
|
|
37
|
-
/**
|
|
38
|
-
* Effective data to pass to the component.
|
|
39
|
-
* @default {}
|
|
40
|
-
*/
|
|
41
|
-
this.data = {};
|
|
42
|
-
/**
|
|
43
|
-
* The text of the label. If set to empty or has only white space chars, the label will be removed.
|
|
44
|
-
* @default ""
|
|
45
|
-
*/
|
|
46
|
-
this.label = '';
|
|
47
|
-
/**
|
|
48
|
-
* Sets the label's position, left right or top.
|
|
49
|
-
* @default "left"
|
|
50
|
-
*/
|
|
51
|
-
this.labelPos = 'left';
|
|
52
|
-
/**
|
|
53
|
-
* Sets whether the submit button must be displayed or not.
|
|
54
|
-
* @default false
|
|
55
|
-
*/
|
|
56
|
-
this.showSubmit = false;
|
|
57
|
-
/**
|
|
58
|
-
* Sets the submit button's label.
|
|
59
|
-
* @default ""
|
|
60
|
-
*/
|
|
61
|
-
this.submitLabel = '';
|
|
62
|
-
/**
|
|
63
|
-
* Sets the submit button's position, top right bottom or left.
|
|
64
|
-
* @default "right"
|
|
65
|
-
*/
|
|
66
|
-
this.submitPos = 'right';
|
|
67
|
-
/**
|
|
68
|
-
* The type of the FLD
|
|
69
|
-
* @default undefined
|
|
70
|
-
*/
|
|
71
|
-
this.type = undefined;
|
|
72
|
-
/*-------------------------------------------------*/
|
|
73
|
-
/* I n t e r n a l V a r i a b l e s */
|
|
74
|
-
/*-------------------------------------------------*/
|
|
75
|
-
/**
|
|
76
|
-
* Instance of the KupManager class.
|
|
77
|
-
*/
|
|
78
|
-
this.kupManager = kupManagerInstance();
|
|
79
|
-
this.currentValue = null;
|
|
80
|
-
this.previousValue = null;
|
|
81
|
-
// Generates an instance of the event handler while binding the current component as its this value
|
|
82
|
-
// This is done once per component to improve performance speed
|
|
83
|
-
this.onChangeInstance = this.onChange.bind(this);
|
|
84
|
-
this.onSubmitInstance = this.onSubmit.bind(this);
|
|
85
|
-
}
|
|
86
|
-
// When a change or update event must be launched as if it's coming from the FLD itself
|
|
87
|
-
onChange(event) {
|
|
88
|
-
const { value, info } = event.detail;
|
|
89
|
-
this.kupChange.emit({
|
|
90
|
-
originalEvent: event,
|
|
91
|
-
oldValue: this.currentValue,
|
|
92
|
-
value,
|
|
93
|
-
info,
|
|
94
|
-
});
|
|
95
|
-
this.previousValue = this.currentValue;
|
|
96
|
-
this.currentValue = value;
|
|
97
|
-
}
|
|
98
|
-
// When a submit event must be launched as if it's coming from the FLD itself
|
|
99
|
-
onSubmit(event) {
|
|
100
|
-
this.kupSubmit.emit({
|
|
101
|
-
originalEvent: event,
|
|
102
|
-
oldValue: this.previousValue,
|
|
103
|
-
value: this.currentValue,
|
|
104
|
-
info: {
|
|
105
|
-
obj: event.detail.info && event.detail.info.obj
|
|
106
|
-
? event.detail.info.obj
|
|
107
|
-
: undefined,
|
|
108
|
-
},
|
|
109
|
-
});
|
|
110
|
-
}
|
|
111
|
-
/*-------------------------------------------------*/
|
|
112
|
-
/* P u b l i c M e t h o d s */
|
|
113
|
-
/*-------------------------------------------------*/
|
|
114
|
-
/**
|
|
115
|
-
* Provides an interface to get the current value programmatically
|
|
116
|
-
* @method getCurrentValue
|
|
117
|
-
* @returns {any}
|
|
118
|
-
*/
|
|
119
|
-
async getCurrentValue() {
|
|
120
|
-
return this.currentValue;
|
|
121
|
-
}
|
|
122
|
-
/**
|
|
123
|
-
* Used to retrieve component's props values.
|
|
124
|
-
* @param {boolean} descriptions - When provided and true, the result will be the list of props with their description.
|
|
125
|
-
* @returns {Promise<GenericObject>} List of props as object, each key will be a prop.
|
|
126
|
-
*/
|
|
127
|
-
async getProps(descriptions) {
|
|
128
|
-
let props = {};
|
|
129
|
-
if (descriptions) {
|
|
130
|
-
props = KupFieldProps;
|
|
131
|
-
}
|
|
132
|
-
else {
|
|
133
|
-
for (const key in KupFieldProps) {
|
|
134
|
-
if (Object.prototype.hasOwnProperty.call(KupFieldProps, key)) {
|
|
135
|
-
props[key] = this[key];
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
return props;
|
|
140
|
-
}
|
|
141
|
-
/**
|
|
142
|
-
* This method is used to trigger a new render of the component.
|
|
143
|
-
*/
|
|
144
|
-
async refresh() {
|
|
145
|
-
forceUpdate(this);
|
|
146
|
-
}
|
|
147
|
-
/*-------------------------------------------------*/
|
|
148
|
-
/* L i f e c y c l e H o o k s */
|
|
149
|
-
/*-------------------------------------------------*/
|
|
150
|
-
componentWillLoad() {
|
|
151
|
-
this.kupManager.debug.logLoad(this, false);
|
|
152
|
-
this.kupManager.theme.register(this);
|
|
153
|
-
}
|
|
154
|
-
componentDidLoad() {
|
|
155
|
-
this.kupManager.debug.logLoad(this, true);
|
|
156
|
-
}
|
|
157
|
-
componentWillRender() {
|
|
158
|
-
this.kupManager.debug.logRender(this, false);
|
|
159
|
-
}
|
|
160
|
-
componentDidRender() {
|
|
161
|
-
this.kupManager.debug.logRender(this, true);
|
|
162
|
-
}
|
|
163
|
-
render() {
|
|
164
|
-
let toRender = [];
|
|
165
|
-
const baseClass = 'kup-field';
|
|
166
|
-
let label = null;
|
|
167
|
-
let submit = null;
|
|
168
|
-
let wrapperClass = '';
|
|
169
|
-
let propList = Object.assign({}, this.data);
|
|
170
|
-
if (this.label.trim().length) {
|
|
171
|
-
wrapperClass += ' label-' + this.labelPos;
|
|
172
|
-
label = (h("label", { class: baseClass +
|
|
173
|
-
'__label' +
|
|
174
|
-
' ' +
|
|
175
|
-
baseClass +
|
|
176
|
-
'--' +
|
|
177
|
-
this.labelPos }, this.label));
|
|
178
|
-
}
|
|
179
|
-
if (this.showSubmit) {
|
|
180
|
-
wrapperClass += ' submit-' + this.submitPos;
|
|
181
|
-
submit = (h("kup-button", { class: baseClass + '__submit', label: this.submitLabel, "onkup-button-click": this.onSubmitInstance }));
|
|
182
|
-
}
|
|
183
|
-
//-- If a component must be positioned on top of the dynamic one --
|
|
184
|
-
const labelIsTop = this.labelPos === 'top';
|
|
185
|
-
const labelIsLeft = this.labelPos === 'left';
|
|
186
|
-
const labelIsRight = this.labelPos === 'right';
|
|
187
|
-
const submitIsTop = this.submitPos === 'top';
|
|
188
|
-
const submitIsLeft = this.submitPos === 'left';
|
|
189
|
-
const submitIsRight = this.submitPos === 'right';
|
|
190
|
-
const submitIsBottom = this.submitPos === 'bottom';
|
|
191
|
-
if (labelIsTop || submitIsTop) {
|
|
192
|
-
toRender.push(h("div", { class: baseClass + '__top-container' }, labelIsTop && label ? label : null, submitIsTop && submit ? submit : null));
|
|
193
|
-
}
|
|
194
|
-
if (labelIsLeft && label) {
|
|
195
|
-
toRender.push(label);
|
|
196
|
-
}
|
|
197
|
-
if (submitIsLeft && submit) {
|
|
198
|
-
toRender.push(submit);
|
|
199
|
-
}
|
|
200
|
-
let comp = undefined;
|
|
201
|
-
if (this.type === undefined) {
|
|
202
|
-
this.kupManager.debug.logMessage(this, 'Type (state) is undefined!', KupDebugCategory.WARNING);
|
|
203
|
-
}
|
|
204
|
-
else {
|
|
205
|
-
switch (this.type.toLowerCase()) {
|
|
206
|
-
case 'cmb':
|
|
207
|
-
comp = 'kup-combobox';
|
|
208
|
-
propList.onKupComboboxChange = this.onChangeInstance;
|
|
209
|
-
break;
|
|
210
|
-
case 'itx':
|
|
211
|
-
comp = 'kup-text-field';
|
|
212
|
-
propList.onkupTextFieldChange = this.onChangeInstance;
|
|
213
|
-
break;
|
|
214
|
-
case 'rad':
|
|
215
|
-
comp = 'kup-radio';
|
|
216
|
-
propList.onkupRadioChange = this.onChangeInstance;
|
|
217
|
-
break;
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
const $DynamicComponent = comp; // TODO check if there is a better typing
|
|
221
|
-
toRender.push(h($DynamicComponent, Object.assign({ class: baseClass + '__component' }, propList)));
|
|
222
|
-
if (labelIsRight && label) {
|
|
223
|
-
toRender.push(label);
|
|
224
|
-
}
|
|
225
|
-
if ((submitIsRight || submitIsBottom) && submit) {
|
|
226
|
-
toRender.push(submit);
|
|
227
|
-
}
|
|
228
|
-
return (h(Host, null, h("style", null, this.kupManager.theme.setKupStyle(this.rootElement)), h("div", { id: componentWrapperId, class: wrapperClass }, toRender)));
|
|
229
|
-
}
|
|
230
|
-
disconnectedCallback() {
|
|
231
|
-
this.kupManager.theme.unregister(this);
|
|
232
|
-
}
|
|
233
|
-
get rootElement() { return getElement(this); }
|
|
234
|
-
};
|
|
235
|
-
KupField.style = kupFieldCss;
|
|
236
|
-
|
|
237
|
-
export { KupField as kup_field };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h as n}from"./p-34b74425.js";import{F as t}from"./p-6c77a36c.js";import{F as o}from"./p-bfc3bac7.js";const e=(e,u)=>{if(e.styling||(e.styling=t.RAISED),!e.label&&!e.icon)return;const i=!!(e.styling.toLowerCase()===t.ICON||e.styling.toLowerCase()===t.RAISED&&e.icon&&null==e.label);return n("div",Object.assign({class:`f-button ${e.danger?"kup-danger":""} ${e.fullHeight?"kup-full-height":""} ${e.fullWidth?"kup-full-width":""} ${e.info?"kup-info":""} ${e.large?"kup-large":""} ${e.pulsating?"kup-pulsating":""} ${e.shaped?"kup-shaped":""} ${e.secondary?"kup-secondary":""} ${e.slim?"kup-slim":""} ${e.success?"kup-success":""} ${e.warning?"kup-warning":""} ${e.wrapperClass?e.wrapperClass:""}`},e.dataSet,{id:e.id,title:e.title}),i?function(t){const e={color:t.disabled?"var(--kup_button_disabled_color)":"var(--kup_button_primary_color)",sizeX:t.large?"calc(1.75em * 1.5)":"1.75em",sizeY:t.large?"calc(1.75em * 1.5)":"1.75em"};return n("button",{class:{"icon-button":!0,"button--disabled":!!t.disabled,"icon-button--on":!(!t.toggable||!t.checked),toggable:!!t.toggable,"button--with-spinner":!(!t.showSpinner||t.disabled)},disabled:t.disabled,onClick:t.onClick,style:{"--kup_button_spinner_height":e.sizeY,"--kup_button_spinner_width":e.sizeX},type:"button",value:t.checked?"on":"off"},!t.showSpinner||t.disabled?n(o,Object.assign({},e,{resource:t.toggable&&!t.checked?t.iconOff?t.iconOff:t.icon+"_border":t.icon,wrapperClass:"icon-button__icon kup-icon"})):null,t.toggable&&!t.showSpinner?n(o,Object.assign({},e,{resource:t.icon,wrapperClass:"icon-button__icon icon-button__icon--on kup-icon"})):null,t.showSpinner&&!t.disabled?n("div",{class:"icon-button__spinner-container"},n("slot",{name:"spinner"})):void 0)}(e):function(e){const u=e.styling.toLowerCase()===t.FLAT,i=e.styling.toLowerCase()===t.FLOATING,s=e.styling.toLowerCase()===t.ICON,r=e.styling.toLowerCase()===t.OUTLINED,c=!(u||i||r||s),l={color:e.disabled?"var(--kup_button_disabled_color)":r||u?"var(--kup_button_primary_color)":"var(--kup_button_text_on_primary_color)",resource:e.icon,sizeX:i?"1.75em":"1.475em",sizeY:i?"1.75em":"1.475em",wrapperClass:"button__icon kup-icon"};e.showSpinner&&(l.wrapperClass+=" content--hidden");const p={button__label:!0,"content--hidden":!(!e.showSpinner||e.disabled)};return n("button",{class:{button:!0,"button--disabled":!!e.disabled,"button--floating":!!i,"button--outlined":!!r,"button--raised":!!c,"button--no-label":!e.label||" "===e.label,"button--with-spinner":!(!e.showSpinner||e.disabled)},disabled:e.disabled,onBlur:e.onBlur,onClick:e.onClick,onFocus:e.onFocus,style:{"--kup_button_spinner_height":l.sizeY},type:"button"},e.trailingIcon?[n("span",{class:p},e.label),e.icon?n(o,Object.assign({},l)):void 0]:[e.icon?n(o,Object.assign({},l)):void 0,n("span",{class:p},e.label)],e.showSpinner&&!e.disabled?n("div",{class:"button__spinner-container"},n("slot",{name:"spinner"})):void 0)}(e),u)};export{e as F}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
let e,t,n=!1,l=!1;const s="undefined"!=typeof window?window:{},o=s.document||{head:{}},i={t:0,l:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,l)=>e.addEventListener(t,n,l),rel:(e,t,n,l)=>e.removeEventListener(t,n,l),ce:(e,t)=>new CustomEvent(e,t)},r=e=>Promise.resolve(e),c=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replace}catch(e){}return!1})(),a=(e,t,n)=>{n&&n.map((([n,l,s])=>{const o=f(e,n),r=u(t,s),c=p(n);i.ael(o,l,r,c),(t.o=t.o||[]).push((()=>i.rel(o,l,r,c)))}))},u=(e,t)=>n=>{try{256&e.t?e.i[t](n):(e.u=e.u||[]).push([t,n])}catch(e){le(e)}},f=(e,t)=>4&t?o:e,p=e=>0!=(2&e),d="http://www.w3.org/1999/xlink",h=new WeakMap,m=e=>"sc-"+e.p,y={},$=e=>"object"==(e=typeof e)||"function"===e,w=(e,t,...n)=>{let l=null,s=null,o=!1,i=!1,r=[];const c=t=>{for(let n=0;n<t.length;n++)l=t[n],Array.isArray(l)?c(l):null!=l&&"boolean"!=typeof l&&((o="function"!=typeof e&&!$(l))&&(l+=""),o&&i?r[r.length-1].h+=l:r.push(o?b(null,l):l),i=o)};if(c(n),t){t.key&&(s=t.key);{const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}}if("function"==typeof e)return e(null===t?{}:t,r,v);const a=b(e,null);return a.m=t,r.length>0&&(a.$=r),a.g=s,a},b=(e,t)=>({t:0,v:e,h:t,j:null,$:null,m:null,g:null}),g={},v={forEach:(e,t)=>e.map(j).forEach(t),map:(e,t)=>e.map(j).map(t).map(k)},j=e=>({vattrs:e.m,vchildren:e.$,vkey:e.g,vname:e.k,vtag:e.v,vtext:e.h}),k=e=>{if("function"==typeof e.vtag){const t=Object.assign({},e.vattrs);return e.vkey&&(t.key=e.vkey),e.vname&&(t.name=e.vname),w(e.vtag,t,...e.vchildren||[])}const t=b(e.vtag,e.vtext);return t.m=e.vattrs,t.$=e.vchildren,t.g=e.vkey,t.k=e.vname,t},S=(e,t,n,l,o,r)=>{if(n!==l){let c=ne(e,t),a=t.toLowerCase();if("class"===t){const t=e.classList,s=M(n),o=M(l);t.remove(...s.filter((e=>e&&!o.includes(e)))),t.add(...o.filter((e=>e&&!s.includes(e))))}else if("style"===t){for(const t in n)l&&null!=l[t]||(t.includes("-")?e.style.removeProperty(t):e.style[t]="");for(const t in l)n&&l[t]===n[t]||(t.includes("-")?e.style.setProperty(t,l[t]):e.style[t]=l[t])}else if("key"===t);else if("ref"===t)l&&l(e);else if(c||"o"!==t[0]||"n"!==t[1]){const s=$(l);if((c||s&&null!==l)&&!o)try{if(e.tagName.includes("-"))e[t]=l;else{let s=null==l?"":l;"list"===t?c=!1:null!=n&&e[t]==s||(e[t]=s)}}catch(e){}let i=!1;a!==(a=a.replace(/^xlink\:?/,""))&&(t=a,i=!0),null==l||!1===l?!1===l&&""!==e.getAttribute(t)||(i?e.removeAttributeNS(d,t):e.removeAttribute(t)):(!c||4&r||o)&&!s&&(l=!0===l?"":l,i?e.setAttributeNS(d,t,l):e.setAttribute(t,l))}else t="-"===t[2]?t.slice(3):ne(s,a)?a.slice(2):a[2]+t.slice(3),n&&i.rel(e,t,n,!1),l&&i.ael(e,t,l,!1)}},O=/\s/,M=e=>e?e.split(O):[],x=(e,t,n,l)=>{const s=11===t.j.nodeType&&t.j.host?t.j.host:t.j,o=e&&e.m||y,i=t.m||y;for(l in o)l in i||S(s,l,o[l],void 0,n,t.t);for(l in i)S(s,l,o[l],i[l],n,t.t)},C=(t,l,s)=>{let i,r,c=l.$[s],a=0;if(null!==c.h)i=c.j=o.createTextNode(c.h);else{if(n||(n="svg"===c.v),i=c.j=o.createElementNS(n?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",c.v),n&&"foreignObject"===c.v&&(n=!1),x(null,c,n),null!=e&&i["s-si"]!==e&&i.classList.add(i["s-si"]=e),c.$)for(a=0;a<c.$.length;++a)r=C(t,c,a),r&&i.appendChild(r);"svg"===c.v?n=!1:"foreignObject"===i.tagName&&(n=!0)}return i},L=(e,n,l,s,o,i)=>{let r,c=e;for(c.shadowRoot&&c.tagName===t&&(c=c.shadowRoot);o<=i;++o)s[o]&&(r=C(null,l,o),r&&(s[o].j=r,c.insertBefore(r,n)))},P=(e,t,n,l,s)=>{for(;t<=n;++t)(l=e[t])&&(s=l.j,W(l),s.remove())},R=(e,t)=>e.v===t.v&&e.g===t.g,U=(e,t)=>{const l=t.j=e.j,s=e.$,o=t.$,i=t.v,r=t.h;null===r?(n="svg"===i||"foreignObject"!==i&&n,"slot"===i||x(e,t,n),null!==s&&null!==o?((e,t,n,l)=>{let s,o,i=0,r=0,c=0,a=0,u=t.length-1,f=t[0],p=t[u],d=l.length-1,h=l[0],m=l[d];for(;i<=u&&r<=d;)if(null==f)f=t[++i];else if(null==p)p=t[--u];else if(null==h)h=l[++r];else if(null==m)m=l[--d];else if(R(f,h))U(f,h),f=t[++i],h=l[++r];else if(R(p,m))U(p,m),p=t[--u],m=l[--d];else if(R(f,m))U(f,m),e.insertBefore(f.j,p.j.nextSibling),f=t[++i],m=l[--d];else if(R(p,h))U(p,h),e.insertBefore(p.j,f.j),p=t[--u],h=l[++r];else{for(c=-1,a=i;a<=u;++a)if(t[a]&&null!==t[a].g&&t[a].g===h.g){c=a;break}c>=0?(o=t[c],o.v!==h.v?s=C(t&&t[r],n,c):(U(o,h),t[c]=void 0,s=o.j),h=l[++r]):(s=C(t&&t[r],n,r),h=l[++r]),s&&f.j.parentNode.insertBefore(s,f.j)}i>u?L(e,null==l[d+1]?null:l[d+1].j,n,l,r,d):r>d&&P(t,i,u)})(l,s,t,o):null!==o?(null!==e.h&&(l.textContent=""),L(l,null,t,o,0,o.length-1)):null!==s&&P(s,0,s.length-1),n&&"svg"===i&&(n=!1)):e.h!==r&&(l.data=r)},W=e=>{e.m&&e.m.ref&&e.m.ref(null),e.$&&e.$.map(W)},E=e=>Z(e).S,D=(e,t,n)=>{const l=E(e);return{emit:e=>N(l,t,{bubbles:!!(4&n),composed:!!(2&n),cancelable:!!(1&n),detail:e})}},N=(e,t,n)=>{const l=i.ce(t,n);return e.dispatchEvent(l),l},T=(e,t)=>{t&&!e.O&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.O=t)))},A=(e,t)=>{if(e.t|=16,!(4&e.t))return T(e,e.M),de((()=>F(e,t)));e.t|=512},F=(e,t)=>{const n=e.i;let l;return t?(e.t|=256,e.u&&(e.u.map((([e,t])=>B(n,e,t))),e.u=null),l=B(n,"componentWillLoad")):l=B(n,"componentWillUpdate"),l=G(l,(()=>B(n,"componentWillRender"))),G(l,(()=>H(e,n,t)))},H=async(e,t,n)=>{const l=e.S,s=l["s-rc"];n&&(e=>{const t=e.C,n=e.S,l=t.t,s=((e,t)=>{let n=m(t),l=ie.get(n);if(e=11===e.nodeType?e:o,l)if("string"==typeof l){let t,s=h.get(e=e.head||e);s||h.set(e,s=new Set),s.has(n)||(t=o.createElement("style"),t.innerHTML=l,e.insertBefore(t,e.querySelector("link")),s&&s.add(n))}else e.adoptedStyleSheets.includes(l)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,l]);return n})(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);10&l&&(n["s-sc"]=s,n.classList.add(s+"-h"))})(e);q(e,t),s&&(s.map((e=>e())),l["s-rc"]=void 0);{const t=l["s-p"],n=()=>V(e);0===t.length?n():(Promise.all(t).then(n),e.t|=4,t.length=0)}},q=(n,l)=>{try{l=l.render(),n.t&=-17,n.t|=2,((n,l)=>{const s=n.S,o=n.C,i=n.L||b(null,null),r=(e=>e&&e.v===g)(l)?l:w(null,null,l);t=s.tagName,o.P&&(r.m=r.m||{},o.P.map((([e,t])=>r.m[t]=s[e]))),r.v=null,r.t|=4,n.L=r,r.j=i.j=s.shadowRoot||s,e=s["s-sc"],U(i,r)})(n,l)}catch(e){le(e,n.S)}return null},V=e=>{const t=e.S,n=e.i,l=e.M;B(n,"componentDidRender"),64&e.t?B(n,"componentDidUpdate"):(e.t|=64,I(t),B(n,"componentDidLoad"),e.R(t),l||z()),e.U(t),e.O&&(e.O(),e.O=void 0),512&e.t&&pe((()=>A(e,!1))),e.t&=-517},_=e=>{{const t=Z(e),n=t.S.isConnected;return n&&2==(18&t.t)&&A(t,!1),n}},z=()=>{I(o.documentElement),pe((()=>N(s,"appload",{detail:{namespace:"ketchup"}})))},B=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){le(e)}},G=(e,t)=>e&&e.then?e.then(t):t(),I=e=>e.classList.add("hydrated"),J=(e,t,n)=>{if(t.W){e.watchers&&(t.D=e.watchers);const l=Object.entries(t.W),s=e.prototype;if(l.map((([e,[l]])=>{31&l||2&n&&32&l?Object.defineProperty(s,e,{get(){return((e,t)=>Z(this).N.get(t))(0,e)},set(n){((e,t,n,l)=>{const s=Z(e),o=s.S,i=s.N.get(t),r=s.t,c=s.i;if(n=((e,t)=>null==e||$(e)?e:4&t?"false"!==e&&(""===e||!!e):2&t?parseFloat(e):1&t?e+"":e)(n,l.W[t][0]),(!(8&r)||void 0===i)&&n!==i&&(!Number.isNaN(i)||!Number.isNaN(n))&&(s.N.set(t,n),c)){if(l.D&&128&r){const e=l.D[t];e&&e.map((e=>{try{c[e](n,i,t)}catch(e){le(e,o)}}))}2==(18&r)&&A(s,!1)}})(this,e,n,t)},configurable:!0,enumerable:!0}):1&n&&64&l&&Object.defineProperty(s,e,{value(...t){const n=Z(this);return n.T.then((()=>n.i[e](...t)))}})})),1&n){const n=new Map;s.attributeChangedCallback=function(e,t,l){i.jmp((()=>{const t=n.get(e);if(this.hasOwnProperty(t))l=this[t],delete this[t];else if(s.hasOwnProperty(t)&&"number"==typeof this[t]&&this[t]==l)return;this[t]=(null!==l||"boolean"!=typeof this[t])&&l}))},e.observedAttributes=l.filter((([e,t])=>15&t[0])).map((([e,l])=>{const s=l[1]||e;return n.set(s,e),512&l[0]&&t.P.push([e,s]),s}))}}return e},K=(e,t={})=>{const n=[],l=t.exclude||[],r=s.customElements,u=o.head,f=u.querySelector("meta[charset]"),p=o.createElement("style"),d=[];let h,y=!0;Object.assign(i,t),i.l=new URL(t.resourcesUrl||"./",o.baseURI).href,e.map((e=>{e[1].map((t=>{const s={t:t[0],p:t[1],W:t[2],A:t[3]};s.W=t[2],s.A=t[3],s.P=[],s.D={};const o=s.p,u=class extends HTMLElement{constructor(e){super(e),te(e=this,s),1&s.t&&e.attachShadow({mode:"open"})}connectedCallback(){h&&(clearTimeout(h),h=null),y?d.push(this):i.jmp((()=>(e=>{if(0==(1&i.t)){const t=Z(e),n=t.C,l=()=>{};if(1&t.t)a(e,t,n.A);else{t.t|=1;{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){T(t,t.M=n);break}}n.W&&Object.entries(n.W).map((([t,[n]])=>{if(31&n&&e.hasOwnProperty(t)){const n=e[t];delete e[t],e[t]=n}})),(async(e,t,n,l,s)=>{if(0==(32&t.t)){{if(t.t|=32,(s=oe(n)).then){const e=()=>{};s=await s,e()}s.isProxied||(n.D=s.watchers,J(s,n,2),s.isProxied=!0);const e=()=>{};t.t|=8;try{new s(t)}catch(e){le(e)}t.t&=-9,t.t|=128,e()}if(s.style){let e=s.style;const t=m(n);if(!ie.has(t)){const l=()=>{};((e,t,n)=>{let l=ie.get(e);c&&n?(l=l||new CSSStyleSheet,l.replace(t)):l=t,ie.set(e,l)})(t,e,!!(1&n.t)),l()}}}const o=t.M,i=()=>A(t,!0);o&&o["s-rc"]?o["s-rc"].push(i):i()})(0,t,n)}l()}})(this)))}disconnectedCallback(){i.jmp((()=>(()=>{if(0==(1&i.t)){const e=Z(this),t=e.i;e.o&&(e.o.map((e=>e())),e.o=void 0),B(t,"disconnectedCallback")}})()))}componentOnReady(){return Z(this).F}};s.H=e[0],l.includes(o)||r.get(o)||(n.push(o),r.define(o,J(u,s,1)))}))})),p.innerHTML=n+"{visibility:hidden}.hydrated{visibility:inherit}",p.setAttribute("data-styles",""),u.insertBefore(p,f?f.nextSibling:u.firstChild),y=!1,d.length?d.map((e=>e.connectedCallback())):i.jmp((()=>h=setTimeout(z,30)))},Q=e=>{const t=new URL(e,i.l);return t.origin!==s.location.origin?t.href:t.pathname},X=e=>i.l=e,Y=new WeakMap,Z=e=>Y.get(e),ee=(e,t)=>Y.set(t.i=e,t),te=(e,t)=>{const n={t:0,S:e,C:t,N:new Map};return n.T=new Promise((e=>n.U=e)),n.F=new Promise((e=>n.R=e)),e["s-p"]=[],e["s-rc"]=[],a(e,n,t.A),Y.set(e,n)},ne=(e,t)=>t in e,le=(e,t)=>(0,console.error)(e,t),se=new Map,oe=e=>{const t=e.p.replace(/-/g,"_"),n=e.H,l=se.get(n);return l?l[t]:import(`./${n}.entry.js`).then((e=>(se.set(n,e),e[t])),le)},ie=new Map,re=[],ce=[],ae=(e,t)=>n=>{e.push(n),l||(l=!0,t&&4&i.t?pe(fe):i.raf(fe))},ue=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){le(e)}e.length=0},fe=()=>{ue(re),ue(ce),(l=re.length>0)&&i.raf(fe)},pe=e=>r().then(e),de=ae(ce,!0);export{g as H,Q as a,K as b,D as c,_ as f,E as g,w as h,r as p,ee as r,X as s}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{V as e,b as c}from"./p-aca0e54b.js";import{h as t}from"./p-34b74425.js";import{c as n}from"./p-7454cb92.js";import{F as r}from"./p-44ec4f03.js";import{h as a}from"./p-e0035c58.js";import{F as s}from"./p-bfc3bac7.js";import{a as o}from"./p-7eff4eee.js";const i=e=>{const c={"data-indeterminate":!!e.indeterminate},n={checkbox:!0,"checkbox--checked":!(!e.checked||e.indeterminate),"checkbox--disabled":!!e.disabled,"checkbox--indeterminate":!!e.indeterminate};return t("div",Object.assign({class:`f-checkbox ${e.danger?"kup-danger":""} ${e.info?"kup-info":""} ${e.secondary?"kup-secondary":""} ${e.success?"kup-success":""} ${e.warning?"kup-warning":""} ${e.wrapperClass?e.wrapperClass:""}`},e.dataSet,{id:e.id,title:e.title}),t("div",{class:"form-field "+(e.leadingLabel?"form-field--align-end":"")},t("div",{class:n},t("input",Object.assign({type:"checkbox",class:"checkbox__native-control",checked:e.checked,disabled:e.disabled,onBlur:e.onBlur,onChange:e.onChange,onFocus:e.onFocus},c,{value:e.checked?"on":"off"})),t("div",{class:"checkbox__background",onClick:e.onChange},t("svg",{class:"checkbox__checkmark",viewBox:"0 0 24 24"},t("path",{class:"checkbox__checkmark-path",fill:"none",d:"M1.73,12.91 8.1,19.28 22.79,4.59"})),t("div",{class:"checkbox__mixedmark"}))),e.label?t("label",null,e.label):void 0))},u=[e.DATA_TABLE,e.TREE];var l,p,b,k,d;!function(e){e.CLICK="kup-cell-click",e.ICON_CLICK="kup-cell-iconclick",e.INPUT="kup-cell-input",e.UPDATE="kup-cell-update"}(l||(l={})),function(e){e.DENSE="dense",e.MEDIUM="medium",e.NONE="",e.WIDE="wide"}(p||(p={})),function(e){e.BG_DANGER="danger-bg",e.BG_GREEN="green-bg",e.BG_GREY="grey-bg",e.BG_ORANGE="orange-bg",e.BG_PURPLE="purple-bg",e.BG_SUCCESS="success-bg",e.BG_TEAL="teal-bg",e.BG_WARNING="warning-bg",e.C_BG_DANGER="c-danger-bg",e.C_BG_GREEN="c-green-bg",e.C_BG_GREY="c-grey-bg",e.C_BG_ORANGE="c-orange-bg",e.C_BG_PURPLE="c-purple-bg",e.C_BG_SUCCESS="c-success-bg",e.C_BG_TEAL="c-teal-bg",e.C_BG_WARNING="c-warning-bg",e.C_CENTERED="c-centered",e.C_FITTED="c-fitted",e.C_PADDED="c-padded",e.C_PADDED_HOR="c-padded-hor",e.C_PADDED_VER="c-padded-ver",e.C_ROUND="c-round",e.C_RIGHT_ALIGNED="c-right-aligned",e.C_SHAPED="c-shaped",e.C_TEXT_VERTICAL="c-vertical-text",e.CLICKABLE="clickable",e.HOVER_DISPLAY="display-on-hover",e.HOVER_EXPAND="expand-on-hover",e.HOVER_REDUCE="reduce-on-hover",e.INDICATOR_TOPRIGHT="top-right-indicator",e.LINK="link",e.MONOSPACE="monospace",e.OBJ="obj",e.SHAPED="shaped",e.TEXT_DANGER="danger-text",e.TEXT_INFO="info-text",e.TEXT_PRIMARY="primary-text",e.TEXT_PURPLE="purple-text",e.TEXT_SECONDARY="secondary-text",e.TEXT_STRONG="strong-text",e.TEXT_SUCCESS="success-text",e.TEXT_WARNING="warning-text",e.UNDERLINED="underlined"}(b||(b={})),function(e){e.AUTOCOMPLETE="ACP",e.BUTTON_LIST="BTN",e.CHART="GRA",e.CHECKBOX="CHK",e.CHIP="CHI",e.COLOR_PICKER="CLP",e.COMBOBOX="CMB",e.EDITOR="EDT",e.GAUGE="GAU",e.IMAGE="IMG",e.KNOB="KNB",e.PROGRESS_BAR="PGB",e.RADIO="RAD",e.RATING="RTG",e.TEXT_FIELD="ITX"}(k||(k={})),function(e){e.AUTOCOMPLETE="autocomplete",e.BAR="bar",e.BUTTON="button",e.BUTTON_LIST="button-list",e.CHART="chart",e.CHECKBOX="checkbox",e.CHIP="chips",e.COLOR_PICKER="color-picker",e.COMBOBOX="combobox",e.DATE="date",e.DATETIME="datetime",e.EDITOR="editor",e.GAUGE="gauge",e.ICON="icon",e.IMAGE="image",e.KNOB="knob",e.LINK="link",e.NUMBER="number",e.PROGRESS_BAR="progress-bar",e.RADIO="radio",e.RATING="rating",e.STRING="string",e.TIME="time"}(d||(d={}));const g=[d.AUTOCOMPLETE,d.CHECKBOX,d.COLOR_PICKER,d.COMBOBOX,d.DATE,d.NUMBER,d.RATING,d.STRING,d.TIME],h=[d.BAR,d.BUTTON,d.BUTTON_LIST,d.CHART,d.CHIP,d.COLOR_PICKER,d.GAUGE,d.KNOB,d.PROGRESS_BAR,d.RADIO,d.RATING],m=document.documentElement,f=(p,f)=>{const j=p.cell,v=p.column,w=p.row,O=p.shape?p.shape:j.shape?j.shape:v.shape?v.shape:null,_=!m.ketchup.objects.isEmptyKupObj(j.obj),y=!(!j.isEditable||!p.editable),C=p.previousValue!==j.value?j.value:"",$=function(e,c){const t=e.obj;if(c)switch(c.toUpperCase()){case k.AUTOCOMPLETE:return d.AUTOCOMPLETE;case k.BUTTON_LIST:return d.BUTTON_LIST;case k.CHART:return d.CHART;case k.CHECKBOX:return d.CHECKBOX;case k.CHIP:return d.CHIP;case k.COLOR_PICKER:return d.COLOR_PICKER;case k.COMBOBOX:return d.COMBOBOX;case k.EDITOR:return d.EDITOR;case k.GAUGE:return d.GAUGE;case k.IMAGE:return d.IMAGE;case k.KNOB:return d.KNOB;case k.PROGRESS_BAR:return d.PROGRESS_BAR;case k.RADIO:return d.RADIO;case k.RATING:return d.RATING;case k.TEXT_FIELD:return d.STRING}return m.ketchup.objects.isBar(t)?d.BAR:m.ketchup.objects.isButton(t)?d.BUTTON:m.ketchup.objects.isChart(t)?d.CHART:m.ketchup.objects.isCheckbox(t)?d.CHECKBOX:m.ketchup.objects.isColor(t)?d.COLOR_PICKER:m.ketchup.objects.isIcon(t)?d.ICON:m.ketchup.objects.isImage(t)?d.IMAGE:m.ketchup.objects.isLink(t)?d.LINK:m.ketchup.objects.isProgressBar(t)?d.PROGRESS_BAR:m.ketchup.objects.isRadio(t)?d.RADIO:m.ketchup.objects.isKupObjList(t)?d.CHIP:m.ketchup.objects.isNumber(t)?d.NUMBER:m.ketchup.objects.isDate(t)?d.DATE:m.ketchup.objects.isTimestamp(t)?d.DATETIME:m.ketchup.objects.isTime(t)?d.TIME:m.ketchup.objects.isVoCodver(t)?d.ICON:d.STRING}(j,O),T=Object.assign({},j.data);let z=j.cssClass?j.cssClass:v.cssClass?v.cssClass:"";const B={"f-cell":!0,[b.OBJ]:!!_,[$+"-cell"]:!0,[p.wrapperClass]:!!p.wrapperClass,[p.density]:!(!p.density||$===d.BAR),[z]:!!z};let H=C;y&&g.includes($)?H=function(e,c,n,s,o){switch(e){case d.AUTOCOMPLETE:return t("kup-autocomplete",Object.assign({},n.data,{class:"kup-full-width","onkup-autocomplete-change":c=>x(c,o,e,l.UPDATE),"onkup-autocomplete-input":c=>x(c,o,e,l.INPUT),"onkup-autocomplete-iconclick":c=>x(c,o,e,l.ICON_CLICK)}));case d.CHECKBOX:return u.includes(o.component.rootElement.tagName)&&(c[b.C_CENTERED]=!0),t(i,Object.assign({},n.data,{onChange:c=>x(c,o,e,l.UPDATE)}));case d.COLOR_PICKER:return t("kup-color-picker",Object.assign({},n.data,{class:"kup-full-width",disabled:!1,"onkup-colorpicker-change":c=>x(c,o,e,l.UPDATE)}));case d.COMBOBOX:return t("kup-combobox",Object.assign({},n.data,{class:"kup-full-width","onkup-combobox-change":c=>x(c,o,e,l.UPDATE),"onkup-combobox-input":c=>x(c,o,e,l.INPUT),"onkup-combobox-iconclick":c=>x(c,o,e,l.ICON_CLICK)}));case d.DATE:return t("kup-date-picker",Object.assign({initialValue:n.value},n.data,{class:"kup-full-width","onkup-datepicker-change":c=>x(c,o,e,l.UPDATE),"onkup-datepicker-input":c=>x(c,o,e,l.INPUT)}));case d.RATING:return t("kup-rating",Object.assign({},n.data,{disabled:!1,"onkup-rating-click":c=>x(c,o,e,l.UPDATE)}));case d.TIME:return t("kup-time-picker",Object.assign({initialValue:n.value},n.data,{class:"kup-full-width","onkup-timepicker-change":c=>x(c,o,e,l.UPDATE),"onkup-timepicker-input":c=>x(c,o,e,l.INPUT)}));case d.NUMBER:c[b.C_RIGHT_ALIGNED]=!0;case d.STRING:return t(r,Object.assign({},n.data,{icon:n.icon?n.icon:s.icon?s.icon:null,fullWidth:!0,inputType:e===d.NUMBER?"number":null,value:e===d.NUMBER?a(n.value).toString():n.value,onChange:c=>x(c,o,e,l.UPDATE),onInput:c=>x(c,o,e,l.INPUT),onIconClick:c=>x(c,o,e,l.ICON_CLICK)}))}}($,B,j,v,p):j.data&&h.includes($)?(p.setSizes&&function(e,c,t){switch(e){case d.BAR:c.sizeY||(c.sizeY="26px");break;case d.BUTTON:let e="";c.label&&(e="36px"),t.style?t.style.height||(t.style.minHeight=e):t.style={minHeight:e};break;case d.CHART:c.sizeX||(c.sizeX="100%"),c.sizeY||(c.sizeY="100%");break;case d.CHIP:case d.RADIO:t.style?t.style.height||(t.style.minHeight="40px"):t.style={minHeight:"40px"}}}($,T,j),H=p.renderKup?function(e,c,n,r,i,p,k){switch(e){case d.BAR:return n.data?t("div",{style:{height:n.sizeY,width:"100%"}},t(s,Object.assign({},n))):t("kup-image",Object.assign({},n));case d.BUTTON:return u.includes(k.component.rootElement.tagName)&&(c[b.C_CENTERED]=!0),t("kup-button",Object.assign({},n,{"onkup-button-click":c=>x(c,k,e,l.CLICK)}));case d.BUTTON_LIST:return u.includes(k.component.rootElement.tagName)&&(c[b.C_CENTERED]=!0),n["data-storage"]={cell:r,row:i,column:p},t("kup-button-list",Object.assign({},n));case d.CHART:return u.includes(k.component.rootElement.tagName)&&(c[b.C_CENTERED]=!0),t("kup-chart",Object.assign({},n));case d.CHIP:return t(o,Object.assign({},n));case d.COLOR_PICKER:return t("kup-color-picker",Object.assign({},n,{class:"kup-full-width",disabled:!0}));case d.GAUGE:return t("kup-gauge",Object.assign({value:a(r.value),"width-component":"280px"},n));case d.KNOB:case d.PROGRESS_BAR:return t("kup-progress-bar",Object.assign({},n));case d.RADIO:return u.includes(k.component.rootElement.tagName)&&(c[b.C_CENTERED]=!0),n.disabled=i.readOnly,t("kup-radio",Object.assign({},n));case d.RATING:return t("kup-rating",Object.assign({},n,{disabled:!0}))}}($,B,T,j,w,v,p):t("span",{class:"cell-"+$+" placeholder"})):(p.setSizes&&function(c,t,n,r){switch(c){case d.CHECKBOX:case d.ICON:t.sizeX||(t.sizeX="18px"),t.sizeY||(t.sizeY="18px"),n.style?n.style.height||(n.style.minHeight=t.sizeY):n.style={minHeight:t.sizeY};break;case d.IMAGE:r.component.rootElement.tagName===e.BOX?(t.sizeY||(t.sizeY="auto"),void 0===t.fit&&(t.fit=!0)):t.sizeX||(t.sizeX="auto"),t.sizeY||(t.sizeY="64px")}}($,T,j,p),H=function(e,c,r,o,i,l,p){switch(e){case d.AUTOCOMPLETE:case d.COMBOBOX:case d.DATE:case d.DATETIME:case d.TIME:if(r&&""!=r){const e=n(l,i);return t("div",{class:"f-cell__text"},e)}return r;case d.CHECKBOX:return u.includes(p.component.rootElement.tagName)&&(o[b.C_CENTERED]=!0),t(s,{resource:c.checked?"check_box":"check_box_outline_blank",sizeX:"18px",sizeY:"18px"});case d.EDITOR:return t("div",{innerHTML:i.value});case d.ICON:case d.IMAGE:return u.includes(p.component.rootElement.tagName)&&(o[b.C_CENTERED]=!0),c.badgeData&&(o[b.C_PADDED]=!0),t(s,Object.assign({},c));case d.LINK:return t("a",{href:r,target:"_blank"},i.value);case d.NUMBER:if(r&&""!=r){const e=a(i.value),c=n(l,i);return e<0&&(o[b.TEXT_DANGER]=!0),u.includes(p.component.rootElement.tagName)&&(o[b.C_RIGHT_ALIGNED]=!0),t("div",{class:"f-cell__text"},c)}return t("div",{class:"f-cell__text"},r);default:return t("div",{class:"f-cell__text"},r)}}($,T,H,B,j,v,p));let I=null;!y&&(v.icon||j.icon)&&H&&(I=t(s,Object.assign({},{color:`rgba(var(${c.TEXT}-rgb), 0.375)`,resource:j.icon?j.icon:v.icon,sizeX:"1.25em",sizeY:"1.25em",wrapperClass:"obj-icon"})));let G=null;m.ketchup.debug.isDebug()&&_?G=j.obj.t+"; "+j.obj.p+"; "+j.obj.k+";":null!=j.title&&""!=j.title.trim()&&(G=j.title);let A=null;if(j.info){const e=Object.assign({},j.info);e.color||(e.color=`var(${c.INFO})`),e.icon||(e.icon="info"),A=t(s,Object.assign({},{color:e.color,resource:e.icon,sizeX:"1.25em",sizeY:"1.25em",title:e.message?e.message:"",wrapperClass:"cell-info"}))}return t("div",{class:B,"kup-get-cell-props":()=>p,style:j.style},t("div",{class:"f-cell__content",style:j.styleContent,title:G},f&&f.length>0?f:[p.indents,A,I,H]))};function x(e,c,t,r){const a=c.cell,s=c.column,o=c.component,i=c.row;let u="INPUT"===e.target.tagName?e.target.value:e.detail.value;if(r===l.UPDATE){switch(t){case d.AUTOCOMPLETE:case d.COMBOBOX:case d.DATE:case d.TIME:a.data&&(a.data.initialValue=u);break;case d.CHECKBOX:u="on"===u?"0":"1",a.data&&(a.data.checked="0"!==u)}a.obj&&(a.obj.k=u.toString()),a.value=u.toString(),a.displayedValue=null,a.displayedValue=n(s,a)}if(o&&o.rootElement){const c=new CustomEvent(r,{bubbles:!0,cancelable:!0,composed:!0,detail:{comp:o,id:o.rootElement.id,cell:a,column:s,event:e,row:i,type:t}});o.rootElement.dispatchEvent(c);try{o.refresh()}catch(e){}}}export{i as F,p as a,f as b}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as i,c as t,f as a,h as e,H as r,g as s}from"./p-34b74425.js";import{k as o,h as n}from"./p-aca0e54b.js";import{g as l,s as p}from"./p-e0035c58.js";import{c as m}from"./p-97e8ea42.js";import{F as c}from"./p-bfc3bac7.js";import{F as g}from"./p-1ae66cc5.js";import{F as _}from"./p-6c77a36c.js";import{a as h,b as u}from"./p-4ffbc3ff.js";import{M as d}from"./p-81605f08.js";import"./p-7454cb92.js";import"./p-44ec4f03.js";import"./p-7eff4eee.js";import"./p-79b0730b.js";var f;!function(i){i.customStyle="Custom style of the component.",i.data="Actual data of the component",i.ripple="When enabled displays Material's ripple effect on clicked items."}(f||(f={}));var b,k,v,w,y,x,j,C=function(i,t,a,e){if("a"===a&&!e)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?i!==t||!e:!t.has(i))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===a?e:"a"===a?e.call(i):e?e.value:t.get(i)};const M=class{constructor(a){i(this,a),this.kupClick=t(this,"kup-imagelist-click",6),this.kupContextMenu=t(this,"kup-imagelist-contextmenu",6),this.kupDblClick=t(this,"kup-imagelist-dblclick",6),b.add(this),this.currentNode=null,this.navigationBarToggled=!1,this.customStyle="",this.data=[],this.ripple=!0,k.set(this,[]),v.set(this,o()),w.set(this,{icon:"arrow_back",onClick:()=>{this.currentNode=C(this,v,"f").data.node.getParent(this.data,this.currentNode),this.currentNode||(this.navigationBarToggled=!1)},styling:_.FLAT,wrapperClass:"navigation-bar__back"}),y.set(this,{icon:"arrow_upward",onClick:()=>{this.currentNode=null,this.navigationBarToggled=!1},styling:_.FLAT,wrapperClass:"navigation-bar__top"})}onKupClick(i){i.children&&i.children.length>0&&(this.currentNode=i),this.kupClick.emit({comp:this,id:this.rootElement.id,node:i})}onKupContextMenu(i,t){i.preventDefault(),this.kupContextMenu.emit({comp:this,id:this.rootElement.id,node:t})}onKupDblClick(i){for(let i=0;i<C(this,k,"f").length;i++)clearTimeout(C(this,k,"f")[i]);(function(i,t,a,e,r){if("m"===e)throw new TypeError("Private method is not writable");if("a"===e&&!r)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?i!==t||!r:!t.has(i))throw new TypeError("Cannot write private member to an object whose class did not declare it");"a"===e?r.call(i,a):r?r.value=a:t.set(i,a)})(this,k,[],"f"),this.kupDblClick.emit({comp:this,id:this.rootElement.id,node:i})}async getProps(i){return l(this,f,i)}async refresh(){a(this)}async setProps(i){p(this,f,i)}componentWillLoad(){C(this,v,"f").debug.logLoad(this,!1),C(this,v,"f").language.register(this),C(this,v,"f").theme.register(this)}componentDidLoad(){C(this,v,"f").debug.logLoad(this,!0)}componentWillRender(){C(this,v,"f").debug.logRender(this,!1)}componentDidRender(){const i=this.rootElement.shadowRoot;if(i&&this.ripple){const t=i.querySelectorAll(".mdc-ripple-surface:not(.mdc-ripple-upgraded)");if(t)for(let i=0;i<t.length;i++)d.attachTo(t[i])}C(this,v,"f").debug.logRender(this,!0)}render(){const i=!!this.currentNode;return e(r,null,e("style",null,C(this,v,"f").theme.setKupStyle(this.rootElement)),e("div",{id:m},e("div",{class:"navigation-bar"},i?e("div",{class:"navigation-bar__wrapper "+(this.navigationBarToggled?"navigation-bar__wrapper--active":"")},e("div",{class:"navigation-bar__title",onClick:()=>{this.navigationBarToggled=!this.navigationBarToggled}},e(c,{fit:!0,resource:this.currentNode.icon,sizeX:"1.25em",sizeY:"1.25em",wrapperClass:"navigation-bar__title__image"}),e("div",{class:"navigation-bar__title__label"},this.currentNode.value)),e(g,Object.assign({},C(this,w,"f"),{label:C(this,v,"f").language.translate(n.BACK)})),e(g,Object.assign({},C(this,y,"f"),{label:C(this,v,"f").language.translate(n.TOP)}))):null),e("div",{class:"image-list"},...C(this,b,"m",j).call(this))))}disconnectedCallback(){C(this,v,"f").language.unregister(this),C(this,v,"f").theme.unregister(this)}get rootElement(){return s(this)}};k=new WeakMap,v=new WeakMap,w=new WeakMap,y=new WeakMap,b=new WeakSet,x=function(i){const t=e(c,Object.assign({},{fit:!0,resource:i.icon,title:i.title,wrapperClass:"image-list__image"})),a=e("div",{class:"image-list__label"},i.value);return e(u,{cell:{value:i.value,icon:i.icon,obj:i.obj},column:{name:"IMAGE",title:"Image"},density:h.NONE,row:Object.assign({},i)},e("div",{class:"image-list__wrapper"},t,a))},j=function(){const i=[],t=this.currentNode?this.currentNode.children:this.data;for(let a=0;t&&a<t.length;a++){const r=t[a],s=e("div",{onClick:()=>{C(this,k,"f").push(setTimeout((()=>this.onKupClick(r)),300))},onContextMenu:i=>this.onKupContextMenu(i,r),onDblClick:()=>this.onKupDblClick(r),class:{"image-list__item":!0,"mdc-ripple-surface":!!this.ripple}},C(this,b,"m",x).call(this,r));i.push(s)}return i},M.style=":host{--kup_imagelist_background_color:var(\n --kup-imagelist-background-color,\n transparent\n );--kup_imagelist_columns:var(--kup-imagelist-columns, 4);--kup_imagelist_grid_gap:var(--kup-imagelist-grid-gap, 0.5em);--kup_imagelist_image_margin:var(--kup-imagelist-image-margin, 1em auto);--kup_imagelist_image_min_height:var(--kup-imagelist-image-min-height, 64px);--kup_imagelist_item_border_radius:var(\n --kup-imagelist-item-border-radius,\n 8px\n );--kup_imagelist_item_height:var(--kup-imagelist-item-height, auto);--kup_imagelist_item_padding:var(--kup-imagelist-item-padding, 0);--kup_imagelist_item_width:var(--kup-imagelist-item-width, auto);--kup_imagelist_label_margin:var(\n --kup-imagelist-label-margin,\n 0 auto 1em auto\n );--kup_imagelist_navbar_background_color:var(\n --kup-imagelist-navbar-background-color,\n transparent\n );--kup_imagelist_primary_color:var(\n --kup-imagelist-primary-color,\n var(--kup-primary-color)\n );--kup_imagelist_primary_color_rgb:var(\n --kup-imagelist-primary-color-rgb,\n var(--kup-primary-color-rgb)\n );--kup_imagelist_text_color:var(\n --kup-imagelist-text-color,\n var(--kup-text-color)\n );display:block}.navigation-bar{align-items:center;background-color:var(--kup_imagelist_navbar_background_color);display:flex;justify-content:center}.navigation-bar__wrapper{align-items:center;display:flex;flex-wrap:wrap;justify-content:center;max-width:100%;position:relative}.navigation-bar__wrapper--active .navigation-bar__title{background-color:rgba(var(--kup_imagelist_primary_color_rgb), 0.15);color:var(--kup_imagelist_primary_color)}.navigation-bar__wrapper--active .navigation-bar__back,.navigation-bar__wrapper--active .navigation-bar__top{display:block}.navigation-bar__back,.navigation-bar__top{--kup-button-primary-color-rgb:0;animation:fade-in 0.375s ease-in;display:none}.navigation-bar__title{border-radius:16px;box-sizing:border-box;cursor:pointer;display:flex;justify-content:center;padding:0.75em 1em;user-select:none;transition:background-color 125ms, color 125ms;width:100%}.navigation-bar__title__image.f-image{margin:0}.navigation-bar__title__label{font-size:1.2em;font-weight:bold;letter-spacing:0.12em;overflow:hidden;padding:0 0.5em;text-overflow:ellipsis;text-transform:uppercase;white-space:nowrap}.image-list{background-color:var(--kup_imagelist_background_color);display:grid;grid-gap:var(--kup_imagelist_grid_gap);grid-template-columns:repeat(var(--kup_imagelist_columns, 4), minmax(0px, 1fr));margin-top:1em;width:100%}.image-list .f-cell{height:100%;width:100%}.image-list__item{border-radius:var(--kup_imagelist_item_border_radius);cursor:pointer;height:var(--kup_imagelist_item_height);padding:var(--kup_imagelist_item_padding);width:var(--kup_imagelist_item_width)}.image-list__image.f-image{margin:var(--kup_imagelist_image_margin)}.image-list__image.f-image .f-image__icon{min-height:var(--kup_imagelist_image_min_height)}.image-list__label{color:var(--kup_imagelist_text_color);letter-spacing:0.12em;margin:var(--kup_imagelist_label_margin);overflow:hidden;text-align:center;text-overflow:ellipsis}.image-list .mdc-ripple-surface{--mdc-ripple-fg-opacity:0.24}.image-list .mdc-ripple-surface:before,.image-list .mdc-ripple-surface:after{background-color:var(--kup_imagelist_primary_color)}:host(.kup-full-height){height:100%}:host(.kup-full-width){width:100%}:host(.kup-horizontal) .image-list{display:flex}:host(.kup-auto-grid) .image-list{display:flex;flex-wrap:wrap;justify-content:center}";export{M as kup_image_list}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as e,f as s,h as i,H as h,g as a}from"./p-34b74425.js";import{k as o}from"./p-aca0e54b.js";import{g as n,s as l}from"./p-e0035c58.js";import{c as r}from"./p-97e8ea42.js";var p,c;!function(t){t.componentName="Sets the tag name of the component to be lazy loaded.",t.customStyle="Custom style of the component.",t.data="Sets the data of the component to be lazy loaded.",t.showPlaceholder="Displays an animated SVG placeholder until the component is loaded."}(p||(p={})),function(t){t.VIEWPORT="viewport",t.PROPS="props",t.BOTH="both"}(c||(c={}));const v=class{constructor(s){t(this,s),this.kupLazyLoaded=e(this,"kup-lazy-loaded",6),this.isInViewport=!1,this.componentName=null,this.customStyle="",this.data=null,this.renderMode=c.BOTH,this.showPlaceholder=!0,this.intObserver=null,this.kupManager=o(),this.lazyComponent=null,this.lazyComponentLoaded=!1}async getProps(t){return n(this,p,t)}async getComponent(){return this.lazyComponent}async refresh(){s(this)}async setProps(t){l(this,p,t)}setObserver(){this.intObserver=new IntersectionObserver((t=>{t.forEach((t=>{t.isIntersecting&&(this.kupManager.debug.logMessage(this,"kup-lazy entering the viewport, rendering "+this.componentName+"."),this.isInViewport=!0,this.intObserver.unobserve(this.rootElement))}))}),{threshold:.25})}componentWillLoad(){this.kupManager.debug.logLoad(this,!1),this.kupManager.theme.register(this),this.setObserver()}componentDidLoad(){this.intObserver.observe(this.rootElement),this.kupManager.debug.logLoad(this,!0)}componentWillRender(){this.kupManager.debug.logRender(this,!1)}componentDidRender(){this.lazyComponent&&!this.lazyComponentLoaded&&(this.lazyComponentLoaded=!0,this.kupLazyLoaded.emit({comp:this,id:this.rootElement.id})),this.kupManager.debug.logRender(this,!0)}render(){let t,e,s=this.componentName;switch(this.componentName){case"kup-button":e=i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},i("path",{d:"M42 6H6c-2.2 0-4 1.8-4 4v28c0 2.2 1.8 4 4 4h36c2.2 0 4-1.8 4-4V10c0-2.2-1.8-4-4-4zm0 32H6v-6h36v6z"}));break;case"kup-card":e=i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},i("path",{d:"M44 26H28v-4h16v4zm0-12H28v4h16v-4zM28 34h16v-4H28v4zm-4-16v12c0 2.2-1.8 4-4 4H8c-2.2 0-4-1.8-4-4V18c0-2.2 1.8-4 4-4h12c2.2 0 4 1.8 4 4zm-3 12l-4.5-6-3.5 4.51-2.5-3.01L7 30h14z"}));break;case"kup-checkbox":e=i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},i("path",{d:"M38 10v28H10V10h28m0-4H10c-2.21 0-4 1.79-4 4v28c0 2.21 1.79 4 4 4h28c2.21 0 4-1.79 4-4V10c0-2.21-1.79-4-4-4z"}));break;case"kup-chart":e=i("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"100%",height:"100%",viewBox:"0 0 24 24"},i("path",{d:"M22,21H2V3H4V19H6V10H10V19H12V6H16V19H18V14H22V21Z"}));break;case"kup-data-table":e=i("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"100%",height:"100%",viewBox:"0 0 24 24"},i("path",{d:"M4,3H20A2,2 0 0,1 22,5V20A2,2 0 0,1 20,22H4A2,2 0 0,1 2,20V5A2,2 0 0,1 4,3M4,7V10H8V7H4M10,7V10H14V7H10M20,10V7H16V10H20M4,12V15H8V12H4M4,20H8V17H4V20M10,12V15H14V12H10M10,20H14V17H10V20M20,20V17H16V20H20M20,12H16V15H20V12Z"}));break;case"kup-image":e=i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},i("path",{d:"M42 38V10c0-2.21-1.79-4-4-4H10c-2.21 0-4 1.79-4 4v28c0 2.21 1.79 4 4 4h28c2.21 0 4-1.79 4-4zM17 27l5 6.01L29 24l9 12H10l7-9z"}));break;case"kup-progress-bar":e=i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},i("path",{d:"M39 19c-2.05 0-3.81 1.23-4.58 3h-5.84c-.77-1.77-2.53-3-4.58-3s-3.81 1.23-4.58 3h-5.84c-.77-1.77-2.53-3-4.58-3-2.77 0-5 2.23-5 5s2.23 5 5 5c2.05 0 3.81-1.23 4.58-3h5.84c.77 1.77 2.53 3 4.58 3s3.81-1.23 4.58-3h5.84c.77 1.77 2.53 3 4.58 3 2.77 0 5-2.23 5-5s-2.23-5-5-5z"}));break;case"kup-radio":e=i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},i("path",{d:"M24 4C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm0 36c-8.84 0-16-7.16-16-16S15.16 8 24 8s16 7.16 16 16-7.16 16-16 16z"}));break;default:e=i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},i("path",{d:"M44 26H28v-4h16v4zm0-12H28v4h16v-4zM28 34h16v-4H28v4zm-4-16v12c0 2.2-1.8 4-4 4H8c-2.2 0-4-1.8-4-4V18c0-2.2 1.8-4 4-4h12c2.2 0 4 1.8 4 4zm-3 12l-4.5-6-3.5 4.51-2.5-3.01L7 30h14z"}))}return this.renderMode===c.VIEWPORT&&this.isInViewport||this.renderMode===c.PROPS&&this.data||this.renderMode===c.BOTH&&this.data&&this.isInViewport?(t=i(this.componentName,Object.assign({},this.data,{ref:t=>this.lazyComponent=t})),s+=" kup-loaded"):this.showPlaceholder&&(t=e,s+=" kup-to-be-loaded"),i(h,{class:s},i("style",null,this.kupManager.theme.setKupStyle(this.rootElement)),i("div",{id:r},t))}disconnectedCallback(){this.kupManager.theme.unregister(this),this.intObserver.unobserve(this.rootElement)}get rootElement(){return a(this)}};v.style=":host{--kup_lazy_hor_alignment:var(--kup-lazy-hor-alignment, center);--kup_lazy_ver_alignment:var(--kup-lazy-ver-alignment, center);--kup_lazy_animation_time:var(--kup-lazy-animation-time, 2s);--kup_lazy_placeholder_color:var(\n --kup-lazy-placeholder-color,\n var(--kup-icon-color)\n );display:block;height:100%;width:100%;position:relative}#kup-component{align-items:var(--kup_lazy_ver_alignment);display:flex;justify-content:var(--kup_lazy_hor_alignment);height:100%;width:100%}#kup-component kup-data-table{min-width:100%}svg{fill:var(--kup_lazy_placeholder_color);animation:shine ease var(--kup_lazy_animation_time) infinite}@keyframes shine{0%{opacity:0.4}50%{opacity:0.8}100%{opacity:0.4}}:host(.kup-bottom-aligned){--kup-lazy-ver-alignment:flex-end}:host(.kup-left-aligned){--kup-lazy-hor-alignment:flex-start}:host(.kup-right-aligned){--kup-lazy-hor-alignment:flex-end}:host(.kup-top-aligned){--kup-lazy-ver-alignment:flex-start}:host(.kup-to-be-loaded) #kup-component{position:absolute}:host(.kup-to-be-loaded) #kup-component>*{margin:auto}";export{v as kup_lazy}
|