@sme.up/ketchup 9.6.6 → 9.6.7
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/{f-button-7de4ca64.js → f-button-3cc5c9ba.js} +1 -1
- package/dist/cjs/{f-cell-abe47ff4.js → f-cell-192e5b87.js} +5 -5
- package/dist/cjs/{f-chip-d98809f9.js → f-chip-be2dddb4.js} +2 -2
- package/dist/cjs/{f-image-b22e12c9.js → f-image-98e4e61d.js} +32 -9
- package/dist/cjs/{f-paginator-utils-59c26ee9.js → f-paginator-utils-44d07f52.js} +2 -2
- package/dist/cjs/{f-text-field-4cacd928.js → f-text-field-1efcecb6.js} +1 -1
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/ketchup.cjs.js +1 -1
- package/dist/cjs/kup-accordion.cjs.entry.js +2 -2
- package/dist/cjs/kup-autocomplete_27.cjs.entry.js +9 -7
- package/dist/cjs/kup-box.cjs.entry.js +22 -15
- package/dist/cjs/kup-calendar.cjs.entry.js +4 -4
- package/dist/cjs/kup-card-list.cjs.entry.js +1 -1
- package/dist/cjs/kup-cell.cjs.entry.js +6 -6
- package/dist/cjs/kup-dashboard.cjs.entry.js +4 -4
- package/dist/cjs/kup-drawer.cjs.entry.js +1 -1
- package/dist/cjs/kup-echart.cjs.entry.js +1 -1
- package/dist/cjs/kup-editor.cjs.entry.js +29 -3
- package/dist/cjs/kup-family-tree.cjs.entry.js +3 -3
- package/dist/cjs/kup-grid.cjs.entry.js +1 -1
- package/dist/cjs/kup-iframe.cjs.entry.js +1 -1
- package/dist/cjs/kup-image-list.cjs.entry.js +6 -6
- package/dist/cjs/kup-input-panel.cjs.entry.js +70 -40
- package/dist/cjs/kup-lazy.cjs.entry.js +1 -1
- package/dist/cjs/kup-magic-box.cjs.entry.js +2 -2
- package/dist/cjs/{kup-manager-118c4e57.js → kup-manager-72ad15fe.js} +1 -1
- package/dist/cjs/kup-nav-bar.cjs.entry.js +1 -1
- package/dist/cjs/kup-numeric-picker.cjs.entry.js +2 -2
- package/dist/cjs/kup-pdf.cjs.entry.js +1 -1
- package/dist/cjs/kup-photo-frame.cjs.entry.js +1 -1
- package/dist/cjs/kup-planner.cjs.entry.js +2 -2
- package/dist/cjs/kup-probe.cjs.entry.js +1 -1
- package/dist/cjs/kup-qlik.cjs.entry.js +1 -1
- package/dist/cjs/kup-snackbar.cjs.entry.js +3 -3
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/assets/editor.js +3 -2
- package/dist/collection/assets/input-panel.js +3864 -260
- package/dist/collection/components/kup-box/kup-box.js +15 -8
- package/dist/collection/components/kup-editor/kup-editor-declarations.js +1 -0
- package/dist/collection/components/kup-editor/kup-editor.js +56 -2
- package/dist/collection/components/kup-image/kup-image.js +23 -0
- package/dist/collection/components/kup-input-panel/kup-input-panel.css +12 -0
- package/dist/collection/components/kup-input-panel/kup-input-panel.js +64 -34
- package/dist/collection/f-components/f-image/f-image.js +32 -10
- package/dist/components/kup-autocomplete2.js +35 -9
- package/dist/components/kup-box2.js +15 -8
- package/dist/components/kup-editor.js +30 -2
- package/dist/components/kup-input-panel.js +65 -35
- package/dist/components/kup-manager.js +1 -1
- package/dist/esm/{f-button-e63b4537.js → f-button-07a6ea71.js} +1 -1
- package/dist/esm/{f-cell-262f3239.js → f-cell-819033de.js} +5 -5
- package/dist/esm/{f-chip-eaf517ff.js → f-chip-71ce7cab.js} +2 -2
- package/dist/esm/{f-image-20e217c8.js → f-image-46787842.js} +32 -9
- package/dist/esm/{f-paginator-utils-7ed775bd.js → f-paginator-utils-a8f895d1.js} +2 -2
- package/dist/esm/{f-text-field-17075562.js → f-text-field-52de97f3.js} +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/ketchup.js +1 -1
- package/dist/esm/kup-accordion.entry.js +2 -2
- package/dist/esm/kup-autocomplete_27.entry.js +9 -7
- package/dist/esm/kup-box.entry.js +22 -15
- package/dist/esm/kup-calendar.entry.js +4 -4
- package/dist/esm/kup-card-list.entry.js +1 -1
- package/dist/esm/kup-cell.entry.js +6 -6
- package/dist/esm/kup-dashboard.entry.js +4 -4
- package/dist/esm/kup-drawer.entry.js +1 -1
- package/dist/esm/kup-echart.entry.js +1 -1
- package/dist/esm/kup-editor.entry.js +29 -3
- package/dist/esm/kup-family-tree.entry.js +3 -3
- package/dist/esm/kup-grid.entry.js +1 -1
- package/dist/esm/kup-iframe.entry.js +1 -1
- package/dist/esm/kup-image-list.entry.js +6 -6
- package/dist/esm/kup-input-panel.entry.js +70 -40
- package/dist/esm/kup-lazy.entry.js +1 -1
- package/dist/esm/kup-magic-box.entry.js +2 -2
- package/dist/esm/{kup-manager-c974dda6.js → kup-manager-7b151628.js} +1 -1
- package/dist/esm/kup-nav-bar.entry.js +1 -1
- package/dist/esm/kup-numeric-picker.entry.js +2 -2
- package/dist/esm/kup-pdf.entry.js +1 -1
- package/dist/esm/kup-photo-frame.entry.js +1 -1
- package/dist/esm/kup-planner.entry.js +2 -2
- package/dist/esm/kup-probe.entry.js +1 -1
- package/dist/esm/kup-qlik.entry.js +1 -1
- package/dist/esm/kup-snackbar.entry.js +3 -3
- package/dist/esm/loader.js +1 -1
- package/dist/ketchup/index.esm.js +1 -1
- package/dist/ketchup/ketchup.esm.js +1 -1
- package/dist/ketchup/p-00a5d02c.js +1 -0
- package/dist/ketchup/{p-fa1f706e.js → p-0787925c.js} +1 -1
- package/dist/ketchup/{p-76f39bd6.entry.js → p-1afe847f.entry.js} +1 -1
- package/dist/ketchup/{p-04d047b1.entry.js → p-1f8d3a1e.entry.js} +1 -1
- package/dist/ketchup/{p-8c7009f6.entry.js → p-20030845.entry.js} +1 -1
- package/dist/ketchup/{p-04e2beb5.js → p-34b51a97.js} +1 -1
- package/dist/ketchup/{p-b169b592.js → p-43a89559.js} +1 -1
- package/dist/ketchup/p-45bb8683.entry.js +1 -0
- package/dist/ketchup/{p-dad18517.entry.js → p-475429a1.entry.js} +1 -1
- package/dist/ketchup/{p-d77fbe3d.entry.js → p-4952eba9.entry.js} +1 -1
- package/dist/ketchup/{p-ca3d9d80.js → p-537f66c5.js} +1 -1
- package/dist/ketchup/{p-f6f30bb4.entry.js → p-58093828.entry.js} +1 -1
- package/dist/ketchup/{p-e7eaa6b3.entry.js → p-64099f8c.entry.js} +2 -2
- package/dist/ketchup/p-66ec0b16.entry.js +1 -0
- package/dist/ketchup/{p-e850bdf3.entry.js → p-791dfc1a.entry.js} +1 -1
- package/dist/ketchup/{p-c7e28520.entry.js → p-7ce691cd.entry.js} +1 -1
- package/dist/ketchup/{p-2ea2fd08.entry.js → p-85d44da6.entry.js} +1 -1
- package/dist/ketchup/{p-cb600014.entry.js → p-9106f511.entry.js} +1 -1
- package/dist/ketchup/{p-9fa95bdb.entry.js → p-a323ff1c.entry.js} +1 -1
- package/dist/ketchup/{p-4f4d4b9d.entry.js → p-b42a37ae.entry.js} +1 -1
- package/dist/ketchup/{p-c0be9b3c.entry.js → p-b58cc563.entry.js} +1 -1
- package/dist/ketchup/p-b8aefc56.entry.js +1 -0
- package/dist/ketchup/{p-4561daec.entry.js → p-bb1b8aac.entry.js} +1 -1
- package/dist/ketchup/{p-d9a4f193.entry.js → p-be0070a2.entry.js} +3 -3
- package/dist/ketchup/{p-1b5eb6f4.entry.js → p-cd0f09b3.entry.js} +1 -1
- package/dist/ketchup/{p-02b017a6.entry.js → p-cea71777.entry.js} +1 -1
- package/dist/ketchup/{p-b6e350b5.entry.js → p-d56677f1.entry.js} +1 -1
- package/dist/ketchup/{p-c58a6b55.entry.js → p-e70ff428.entry.js} +1 -1
- package/dist/ketchup/{p-237f4b66.js → p-ecbd1132.js} +1 -1
- package/dist/ketchup/{p-b5a46daf.entry.js → p-ed99792c.entry.js} +1 -1
- package/dist/ketchup/{p-1fc57b76.entry.js → p-f1aa239b.entry.js} +1 -1
- package/dist/ketchup/{p-75b2681f.js → p-f46c2da6.js} +1 -1
- package/dist/types/components/kup-editor/kup-editor-declarations.d.ts +2 -0
- package/dist/types/components/kup-editor/kup-editor.d.ts +8 -1
- package/dist/types/components/kup-image/kup-image.d.ts +5 -0
- package/dist/types/components/kup-input-panel/kup-input-panel-declarations.d.ts +2 -2
- package/dist/types/components.d.ts +22 -2
- package/dist/types/f-components/f-image/f-image-declarations.d.ts +1 -0
- package/package.json +1 -1
- package/dist/ketchup/p-2c3aff15.js +0 -1
- package/dist/ketchup/p-90b07248.entry.js +0 -1
- package/dist/ketchup/p-b9884b65.entry.js +0 -1
- package/dist/ketchup/p-f943ef5b.entry.js +0 -1
|
@@ -264,14 +264,16 @@ export class KupBox {
|
|
|
264
264
|
return sortByArray;
|
|
265
265
|
}
|
|
266
266
|
checkScrollOnHover() {
|
|
267
|
-
if (
|
|
268
|
-
if (this.scrollOnHover) {
|
|
269
|
-
this.
|
|
267
|
+
if (this.boxContainer) {
|
|
268
|
+
if (!this.kupManager.scrollOnHover.isRegistered(this.boxContainer)) {
|
|
269
|
+
if (this.scrollOnHover) {
|
|
270
|
+
this.kupManager.scrollOnHover.register(this.boxContainer);
|
|
271
|
+
}
|
|
270
272
|
}
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
273
|
+
else {
|
|
274
|
+
if (!this.scrollOnHover) {
|
|
275
|
+
this.kupManager.scrollOnHover.unregister(this.boxContainer);
|
|
276
|
+
}
|
|
275
277
|
}
|
|
276
278
|
}
|
|
277
279
|
}
|
|
@@ -782,7 +784,11 @@ export class KupBox {
|
|
|
782
784
|
column: !horizontal,
|
|
783
785
|
};
|
|
784
786
|
const rowStyle = row.style || {};
|
|
785
|
-
return (h("div", { class: "box-wrapper", style: rowStyle, ref: (el) =>
|
|
787
|
+
return (h("div", { class: "box-wrapper", style: rowStyle, ref: (el) => {
|
|
788
|
+
if (el) {
|
|
789
|
+
__classPrivateFieldGet(this, _KupBox_rowsRefs, "f").push(el);
|
|
790
|
+
}
|
|
791
|
+
} }, h("div", { class: boxClass, "data-row": row, ref: (el) => this.rowsRefs.push(el) }, multiSel, boxContent, badges), rowObject));
|
|
786
792
|
}
|
|
787
793
|
renderSection(section, parent, row, visibleColumns) {
|
|
788
794
|
let sectionContent = null;
|
|
@@ -1184,6 +1190,7 @@ export class KupBox {
|
|
|
1184
1190
|
this.kupManager.debug.logRender(this, true);
|
|
1185
1191
|
}
|
|
1186
1192
|
render() {
|
|
1193
|
+
__classPrivateFieldSet(this, _KupBox_rowsRefs, [], "f");
|
|
1187
1194
|
const isKanban = !!(typeof this.kanban === 'object' && this.kanban !== null);
|
|
1188
1195
|
let sortPanel = null;
|
|
1189
1196
|
if (this.sortEnabled) {
|
|
@@ -9,6 +9,7 @@ export var KupEditorProps;
|
|
|
9
9
|
KupEditorProps["initialEditType"] = "Initializes editor with the specified editor type. Suported values: \"markdown\", \"wysiwyg\".";
|
|
10
10
|
KupEditorProps["initialValue"] = "Initializes editor with the specified string.";
|
|
11
11
|
KupEditorProps["isReadOnly"] = "Defaults at false. When set, When set, the editor\u2019s content can\u2019t be changed..";
|
|
12
|
+
KupEditorProps["selectedTab"] = "Sets the markdown editor with the specified tab. Supported values: \"preview\", \"write\".";
|
|
12
13
|
KupEditorProps["previewStyle"] = "Initializes editor with the specified preview type. Suported values: \"tab\", \"vertical\".";
|
|
13
14
|
KupEditorProps["showSaveButton"] = "When set, a save button shown in the editor\u2019s toolbar.";
|
|
14
15
|
KupEditorProps["showToolbar"] = "When set to false, the toolbar will not be shown.";
|
|
@@ -49,6 +49,7 @@ export class KupEditor {
|
|
|
49
49
|
this.initialValue = '';
|
|
50
50
|
this.isReadOnly = false;
|
|
51
51
|
this.previewStyle = 'vertical';
|
|
52
|
+
this.selectedTab = 'write';
|
|
52
53
|
this.showSaveButton = true;
|
|
53
54
|
this.showToolbar = true;
|
|
54
55
|
}
|
|
@@ -69,7 +70,14 @@ export class KupEditor {
|
|
|
69
70
|
if (this.editor) {
|
|
70
71
|
// to give focus to editor
|
|
71
72
|
setTimeout(() => {
|
|
72
|
-
|
|
73
|
+
if (this.editor) {
|
|
74
|
+
this.editor.moveCursorToStart();
|
|
75
|
+
if (this.initialEditType === 'markdown' &&
|
|
76
|
+
this.previewStyle === 'tab' &&
|
|
77
|
+
this.selectedTab === 'preview') {
|
|
78
|
+
this.updateMarkDownPreviewTab();
|
|
79
|
+
}
|
|
80
|
+
}
|
|
73
81
|
}, 100);
|
|
74
82
|
}
|
|
75
83
|
}
|
|
@@ -108,6 +116,13 @@ export class KupEditor {
|
|
|
108
116
|
}
|
|
109
117
|
this.updateToolbarVisiblity();
|
|
110
118
|
}
|
|
119
|
+
onMarkdownPreviewTabChanged() {
|
|
120
|
+
if ((this.initialEditType != 'markdown' &&
|
|
121
|
+
this.previewStyle != 'tab') ||
|
|
122
|
+
!this.editor)
|
|
123
|
+
return;
|
|
124
|
+
this.updateMarkDownPreviewTab();
|
|
125
|
+
}
|
|
111
126
|
onShowSaveButtonChanged() {
|
|
112
127
|
if (this.editor) {
|
|
113
128
|
const toolbar = this.editor.getUI().getToolbar();
|
|
@@ -289,6 +304,15 @@ export class KupEditor {
|
|
|
289
304
|
onEditorAutoSave() {
|
|
290
305
|
this.kupAutoSave.emit(this.getSaveAndAutoSaveProps());
|
|
291
306
|
}
|
|
307
|
+
updateMarkDownPreviewTab() {
|
|
308
|
+
const tabSection = this.rootElement.querySelector('.te-markdown-tab-section');
|
|
309
|
+
if (!tabSection)
|
|
310
|
+
return;
|
|
311
|
+
this.selectedTab === 'preview' &&
|
|
312
|
+
tabSection.querySelector('button:last-child').click();
|
|
313
|
+
this.selectedTab === 'write' &&
|
|
314
|
+
tabSection.querySelector('button').click();
|
|
315
|
+
}
|
|
292
316
|
getToolBarWithSaveButton(includeDefaultItems = true) {
|
|
293
317
|
const options = {
|
|
294
318
|
toolbarItems: [
|
|
@@ -363,7 +387,7 @@ export class KupEditor {
|
|
|
363
387
|
__classPrivateFieldGet(this, _KupEditor_kupManager, "f").debug.logRender(this, true);
|
|
364
388
|
}
|
|
365
389
|
render() {
|
|
366
|
-
return (h(Host, { key: '
|
|
390
|
+
return (h(Host, { key: 'f414260cec0a8190bdd9f5958d7eef3199866068' }, h("div", { key: '285a3de0a62a09bac44d88a949f33d415ca433b6', id: componentWrapperId }, h("div", { key: this.rootElement.id, ref: (el) => (this.editorRef = el), class: "kup-editor" }))));
|
|
367
391
|
}
|
|
368
392
|
disconnectedCallback() {
|
|
369
393
|
__classPrivateFieldGet(this, _KupEditor_kupManager, "f").theme.unregister(this);
|
|
@@ -509,6 +533,33 @@ export class KupEditor {
|
|
|
509
533
|
"reflect": false,
|
|
510
534
|
"defaultValue": "'vertical'"
|
|
511
535
|
},
|
|
536
|
+
"selectedTab": {
|
|
537
|
+
"type": "string",
|
|
538
|
+
"mutable": false,
|
|
539
|
+
"complexType": {
|
|
540
|
+
"original": "KupEditorSelectedTab",
|
|
541
|
+
"resolved": "\"preview\" | \"write\"",
|
|
542
|
+
"references": {
|
|
543
|
+
"KupEditorSelectedTab": {
|
|
544
|
+
"location": "import",
|
|
545
|
+
"path": "./kup-editor-declarations",
|
|
546
|
+
"id": "src/components/kup-editor/kup-editor-declarations.ts::KupEditorSelectedTab"
|
|
547
|
+
}
|
|
548
|
+
}
|
|
549
|
+
},
|
|
550
|
+
"required": false,
|
|
551
|
+
"optional": false,
|
|
552
|
+
"docs": {
|
|
553
|
+
"tags": [{
|
|
554
|
+
"name": "default",
|
|
555
|
+
"text": "'write'"
|
|
556
|
+
}],
|
|
557
|
+
"text": "The markdown editor selected tab."
|
|
558
|
+
},
|
|
559
|
+
"attribute": "selected-tab",
|
|
560
|
+
"reflect": false,
|
|
561
|
+
"defaultValue": "'write'"
|
|
562
|
+
},
|
|
512
563
|
"showSaveButton": {
|
|
513
564
|
"type": "boolean",
|
|
514
565
|
"mutable": false,
|
|
@@ -759,6 +810,9 @@ export class KupEditor {
|
|
|
759
810
|
}, {
|
|
760
811
|
"propName": "previewStyle",
|
|
761
812
|
"methodName": "onPreviewStyleChanged"
|
|
813
|
+
}, {
|
|
814
|
+
"propName": "selectedTab",
|
|
815
|
+
"methodName": "onMarkdownPreviewTabChanged"
|
|
762
816
|
}, {
|
|
763
817
|
"propName": "showSaveButton",
|
|
764
818
|
"methodName": "onShowSaveButtonChanged"
|
|
@@ -23,6 +23,7 @@ export class KupImage {
|
|
|
23
23
|
this.data = null;
|
|
24
24
|
this.feedback = false;
|
|
25
25
|
this.isCanvas = false;
|
|
26
|
+
this.placeholderResource = '';
|
|
26
27
|
this.resource = null;
|
|
27
28
|
this.sizeX = '100%';
|
|
28
29
|
this.sizeY = '100%';
|
|
@@ -116,6 +117,7 @@ export class KupImage {
|
|
|
116
117
|
color: this.color,
|
|
117
118
|
data: this.data,
|
|
118
119
|
fit: this.rootElement.classList.contains('kup-fit') ? true : false,
|
|
120
|
+
placeholderResource: this.placeholderResource,
|
|
119
121
|
resource: this.resource,
|
|
120
122
|
sizeX: this.sizeX,
|
|
121
123
|
sizeY: this.sizeY,
|
|
@@ -300,6 +302,27 @@ export class KupImage {
|
|
|
300
302
|
"reflect": false,
|
|
301
303
|
"defaultValue": "false"
|
|
302
304
|
},
|
|
305
|
+
"placeholderResource": {
|
|
306
|
+
"type": "string",
|
|
307
|
+
"mutable": false,
|
|
308
|
+
"complexType": {
|
|
309
|
+
"original": "string",
|
|
310
|
+
"resolved": "string",
|
|
311
|
+
"references": {}
|
|
312
|
+
},
|
|
313
|
+
"required": false,
|
|
314
|
+
"optional": false,
|
|
315
|
+
"docs": {
|
|
316
|
+
"tags": [{
|
|
317
|
+
"name": "default",
|
|
318
|
+
"text": "\"\""
|
|
319
|
+
}],
|
|
320
|
+
"text": "An SVG that will be displayed until the image is loaded."
|
|
321
|
+
},
|
|
322
|
+
"attribute": "placeholder-resource",
|
|
323
|
+
"reflect": false,
|
|
324
|
+
"defaultValue": "''"
|
|
325
|
+
},
|
|
303
326
|
"resource": {
|
|
304
327
|
"type": "string",
|
|
305
328
|
"mutable": false,
|
|
@@ -153,6 +153,7 @@
|
|
|
153
153
|
overflow: auto;
|
|
154
154
|
padding: var(--kup_input_panel_padding);
|
|
155
155
|
position: relative;
|
|
156
|
+
gap: 2rem;
|
|
156
157
|
}
|
|
157
158
|
:host .input-panel--column {
|
|
158
159
|
flex-direction: column;
|
|
@@ -160,10 +161,21 @@
|
|
|
160
161
|
:host .input-panel__section {
|
|
161
162
|
display: grid;
|
|
162
163
|
}
|
|
164
|
+
:host .input-panel__section .f-cell__content > * {
|
|
165
|
+
width: 100%;
|
|
166
|
+
}
|
|
163
167
|
:host .input-panel__horizontal-section {
|
|
164
168
|
display: inline-grid;
|
|
165
169
|
}
|
|
166
170
|
:host .input-panel .f-cell .f-checkbox .checkbox .checkbox__native-control {
|
|
167
171
|
height: 40px;
|
|
168
172
|
width: 40px;
|
|
173
|
+
}
|
|
174
|
+
:host .input-panel__label_container {
|
|
175
|
+
display: flex;
|
|
176
|
+
flex-direction: column;
|
|
177
|
+
justify-content: center;
|
|
178
|
+
}
|
|
179
|
+
:host .input-panel__label_container > .f-cell {
|
|
180
|
+
flex: 1;
|
|
169
181
|
}
|
|
@@ -14,7 +14,7 @@ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (
|
|
|
14
14
|
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
15
15
|
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
16
16
|
};
|
|
17
|
-
var _KupInputPanel_instances, _KupInputPanel_kupManager, _KupInputPanel_optionsAdapterMap, _KupInputPanel_originalData, _KupInputPanel_renderRow, _KupInputPanel_renderCell, _KupInputPanel_renderSection, _KupInputPanel_renderField, _KupInputPanel_mapCells, _KupInputPanel_reverseMapCells, _KupInputPanel_mapData, _KupInputPanel_slotData, _KupInputPanel_CHIAdapter, _KupInputPanel_GRAAdapter, _KupInputPanel_BTNAdapter, _KupInputPanel_CMBandACPAdapter, _KupInputPanel_CHKAdapter, _KupInputPanel_CLPAdapter, _KupInputPanel_ITXAdapter, _KupInputPanel_RADAdapter, _KupInputPanel_optionsTreeComboAdapter, _KupInputPanel_treeOptionsNodeAdapter, _KupInputPanel_tableOptionsAdapter;
|
|
17
|
+
var _KupInputPanel_instances, _KupInputPanel_kupManager, _KupInputPanel_optionsAdapterMap, _KupInputPanel_originalData, _KupInputPanel_eventNames, _KupInputPanel_listeners, _KupInputPanel_renderRow, _KupInputPanel_renderCell, _KupInputPanel_getLabelComponent, _KupInputPanel_renderSection, _KupInputPanel_renderField, _KupInputPanel_mapCells, _KupInputPanel_reverseMapCells, _KupInputPanel_mapData, _KupInputPanel_slotData, _KupInputPanel_CHIAdapter, _KupInputPanel_GRAAdapter, _KupInputPanel_BTNAdapter, _KupInputPanel_CMBandACPAdapter, _KupInputPanel_CHKAdapter, _KupInputPanel_CLPAdapter, _KupInputPanel_ITXAdapter, _KupInputPanel_RADAdapter, _KupInputPanel_optionsTreeComboAdapter, _KupInputPanel_treeOptionsNodeAdapter, _KupInputPanel_tableOptionsAdapter, _KupInputPanel_getAutocompleteEventCallback;
|
|
18
18
|
import { Host, forceUpdate, h, } from "@stencil/core";
|
|
19
19
|
import { FButton } from "../../f-components/f-button/f-button";
|
|
20
20
|
import { FCell } from "../../f-components/f-cell/f-cell";
|
|
@@ -40,6 +40,14 @@ export class KupInputPanel {
|
|
|
40
40
|
['SmeupTable', __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_tableOptionsAdapter).bind(this)],
|
|
41
41
|
]));
|
|
42
42
|
_KupInputPanel_originalData.set(this, null);
|
|
43
|
+
_KupInputPanel_eventNames.set(this, new Map([
|
|
44
|
+
[
|
|
45
|
+
FCellTypes.AUTOCOMPLETE,
|
|
46
|
+
['kup-autocomplete-input', 'kup-autocomplete-iconclick'],
|
|
47
|
+
],
|
|
48
|
+
[FCellTypes.COMBOBOX, ['kup-combobox-iconclick']],
|
|
49
|
+
]));
|
|
50
|
+
_KupInputPanel_listeners.set(this, []);
|
|
43
51
|
this.customStyle = '';
|
|
44
52
|
this.data = null;
|
|
45
53
|
this.hiddenSubmitButton = false;
|
|
@@ -53,8 +61,12 @@ export class KupInputPanel {
|
|
|
53
61
|
/* W a t c h e r s */
|
|
54
62
|
/*-------------------------------------------------*/
|
|
55
63
|
onDataChanged() {
|
|
56
|
-
|
|
57
|
-
|
|
64
|
+
__classPrivateFieldSet(this, _KupInputPanel_originalData, structuredClone(this.data), "f");
|
|
65
|
+
if (__classPrivateFieldGet(this, _KupInputPanel_listeners, "f").length) {
|
|
66
|
+
__classPrivateFieldGet(this, _KupInputPanel_listeners, "f").map(({ event, handler }) => {
|
|
67
|
+
this.rootElement.removeEventListener(event, handler);
|
|
68
|
+
});
|
|
69
|
+
__classPrivateFieldSet(this, _KupInputPanel_listeners, [], "f");
|
|
58
70
|
}
|
|
59
71
|
__classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_mapCells).call(this, this.data);
|
|
60
72
|
}
|
|
@@ -98,22 +110,6 @@ export class KupInputPanel {
|
|
|
98
110
|
componentDidLoad() {
|
|
99
111
|
this.kupReady.emit({ comp: this, id: this.rootElement.id });
|
|
100
112
|
__classPrivateFieldGet(this, _KupInputPanel_kupManager, "f").debug.logLoad(this, true);
|
|
101
|
-
// this.handleEventsCallbacks.map((cbData) => {
|
|
102
|
-
// this.rootElement.addEventListener(cbData.eventName, (e: any) => {
|
|
103
|
-
// const inputPanelEvent: InputPanelEvent = {
|
|
104
|
-
// state: this.inputPanelCells.find((data) =>
|
|
105
|
-
// data.cells.find(
|
|
106
|
-
// (cell) => cell.column.name === e.detail.id
|
|
107
|
-
// )
|
|
108
|
-
// ).cells,
|
|
109
|
-
// data: {
|
|
110
|
-
// field: e.detail.id,
|
|
111
|
-
// value: e.detail.inputValue || e.detail.value,
|
|
112
|
-
// },
|
|
113
|
-
// };
|
|
114
|
-
// cbData.eventCallback(inputPanelEvent);
|
|
115
|
-
// });
|
|
116
|
-
// });
|
|
117
113
|
}
|
|
118
114
|
componentWillRender() {
|
|
119
115
|
__classPrivateFieldGet(this, _KupInputPanel_kupManager, "f").debug.logRender(this, false);
|
|
@@ -135,7 +131,7 @@ export class KupInputPanel {
|
|
|
135
131
|
h("p", null, __classPrivateFieldGet(this, _KupInputPanel_kupManager, "f").language.translate(KupLanguageGeneric.EMPTY_DATA)),
|
|
136
132
|
]
|
|
137
133
|
: this.inputPanelCells.map((inputPanelCell) => __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_renderRow).call(this, inputPanelCell));
|
|
138
|
-
return (h(Host, { key: '
|
|
134
|
+
return (h(Host, { key: 'ae9e00db322fcda0ee1f996c5ba7f92d337ab03c' }, h("style", { key: '0aea3b4b3c388f5887a5440d05a7cafa1f1c24aa' }, __classPrivateFieldGet(this, _KupInputPanel_kupManager, "f").theme.setKupStyle(this.rootElement)), h("div", { key: '181bc90607f56adf9b5ee12f0716693ed425cd88', id: componentWrapperId }, inputPanelContent)));
|
|
139
135
|
}
|
|
140
136
|
disconnectedCallback() {
|
|
141
137
|
__classPrivateFieldGet(this, _KupInputPanel_kupManager, "f").language.unregister(this);
|
|
@@ -255,7 +251,7 @@ export class KupInputPanel {
|
|
|
255
251
|
"mutable": false,
|
|
256
252
|
"complexType": {
|
|
257
253
|
"original": "InputPanelOptionsHandler",
|
|
258
|
-
"resolved": "(fun: string) => Promise<GenericObject>",
|
|
254
|
+
"resolved": "(fun: string, inputValue: string, currentState: KupInputPanelData) => Promise<GenericObject>",
|
|
259
255
|
"references": {
|
|
260
256
|
"InputPanelOptionsHandler": {
|
|
261
257
|
"location": "import",
|
|
@@ -396,7 +392,7 @@ export class KupInputPanel {
|
|
|
396
392
|
}];
|
|
397
393
|
}
|
|
398
394
|
}
|
|
399
|
-
_KupInputPanel_kupManager = new WeakMap(), _KupInputPanel_optionsAdapterMap = new WeakMap(), _KupInputPanel_originalData = new WeakMap(), _KupInputPanel_instances = new WeakSet(), _KupInputPanel_renderRow = function _KupInputPanel_renderRow(inputPanelCell) {
|
|
395
|
+
_KupInputPanel_kupManager = new WeakMap(), _KupInputPanel_optionsAdapterMap = new WeakMap(), _KupInputPanel_originalData = new WeakMap(), _KupInputPanel_eventNames = new WeakMap(), _KupInputPanel_listeners = new WeakMap(), _KupInputPanel_instances = new WeakSet(), _KupInputPanel_renderRow = function _KupInputPanel_renderRow(inputPanelCell) {
|
|
400
396
|
var _a;
|
|
401
397
|
const layout = inputPanelCell.row.layout;
|
|
402
398
|
const horizontal = (layout === null || layout === void 0 ? void 0 : layout.horizontal) || false;
|
|
@@ -425,11 +421,24 @@ _KupInputPanel_kupManager = new WeakMap(), _KupInputPanel_optionsAdapterMap = ne
|
|
|
425
421
|
column,
|
|
426
422
|
row,
|
|
427
423
|
component: this,
|
|
428
|
-
editable:
|
|
424
|
+
editable: true,
|
|
429
425
|
renderKup: true,
|
|
430
426
|
setSizes: true,
|
|
431
427
|
};
|
|
428
|
+
const label = __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_getLabelComponent).call(this, cell, column.title);
|
|
429
|
+
if (label) {
|
|
430
|
+
return (h("div", { class: { 'input-panel__label_container': true } }, label, h(FCell, Object.assign({}, cellProps))));
|
|
431
|
+
}
|
|
432
432
|
return h(FCell, Object.assign({}, cellProps));
|
|
433
|
+
}, _KupInputPanel_getLabelComponent = function _KupInputPanel_getLabelComponent(cell, label) {
|
|
434
|
+
if (!label) {
|
|
435
|
+
return null;
|
|
436
|
+
}
|
|
437
|
+
const cellType = dom.ketchup.data.cell.getType(cell, cell.shape);
|
|
438
|
+
if (cellType === FCellTypes.RADIO) {
|
|
439
|
+
return h("span", null, label);
|
|
440
|
+
}
|
|
441
|
+
return null;
|
|
433
442
|
}, _KupInputPanel_renderSection = function _KupInputPanel_renderSection(cells, section) {
|
|
434
443
|
var _a, _b, _c, _d;
|
|
435
444
|
let content = [];
|
|
@@ -484,7 +493,7 @@ _KupInputPanel_kupManager = new WeakMap(), _KupInputPanel_optionsAdapterMap = ne
|
|
|
484
493
|
.filter((column) => column.visible)
|
|
485
494
|
.map((column) => {
|
|
486
495
|
const cell = structuredClone(row.cells[column.name]);
|
|
487
|
-
const mappedCell = Object.assign(Object.assign({}, cell), { data: Object.assign(Object.assign({}, __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_mapData).call(this, cell, column)), { id: column.name }), slotData: __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_slotData).call(this, cell, column), isEditable:
|
|
496
|
+
const mappedCell = Object.assign(Object.assign({}, cell), { data: Object.assign(Object.assign({}, __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_mapData).call(this, cell, column)), { disabled: !cell.editable, id: column.name }), slotData: __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_slotData).call(this, cell, column), isEditable: true });
|
|
488
497
|
return { column, cell: mappedCell };
|
|
489
498
|
});
|
|
490
499
|
return [...inpuPanelCells, { cells, row }];
|
|
@@ -532,7 +541,7 @@ _KupInputPanel_kupManager = new WeakMap(), _KupInputPanel_optionsAdapterMap = ne
|
|
|
532
541
|
]);
|
|
533
542
|
const adapter = dataAdapterMap.get(cellType);
|
|
534
543
|
return adapter
|
|
535
|
-
? adapter(options, fieldLabel, currentValue, cell.
|
|
544
|
+
? adapter(options, fieldLabel, currentValue, cell, col.name)
|
|
536
545
|
: null;
|
|
537
546
|
}, _KupInputPanel_slotData = function _KupInputPanel_slotData(cell, col) {
|
|
538
547
|
const cellType = dom.ketchup.data.cell.getType(cell, cell.shape);
|
|
@@ -579,7 +588,7 @@ _KupInputPanel_kupManager = new WeakMap(), _KupInputPanel_optionsAdapterMap = ne
|
|
|
579
588
|
{ data: { dropdownOnly: false, label: 'Valerio' } },
|
|
580
589
|
],
|
|
581
590
|
};
|
|
582
|
-
}, _KupInputPanel_CMBandACPAdapter = function _KupInputPanel_CMBandACPAdapter(rawOptions, fieldLabel, currentValue,
|
|
591
|
+
}, _KupInputPanel_CMBandACPAdapter = function _KupInputPanel_CMBandACPAdapter(rawOptions, fieldLabel, currentValue, cell, id) {
|
|
583
592
|
const configCMandACP = {
|
|
584
593
|
data: {
|
|
585
594
|
'kup-text-field': {
|
|
@@ -592,19 +601,29 @@ _KupInputPanel_kupManager = new WeakMap(), _KupInputPanel_optionsAdapterMap = ne
|
|
|
592
601
|
data: [],
|
|
593
602
|
},
|
|
594
603
|
},
|
|
604
|
+
initialValue: currentValue,
|
|
595
605
|
label: fieldLabel,
|
|
596
606
|
};
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
return
|
|
602
|
-
|
|
607
|
+
if (cell.fun) {
|
|
608
|
+
const cellType = dom.ketchup.data.cell.getType(cell, cell.shape);
|
|
609
|
+
const evNames = __classPrivateFieldGet(this, _KupInputPanel_eventNames, "f").get(cellType);
|
|
610
|
+
if (!evNames) {
|
|
611
|
+
return;
|
|
612
|
+
}
|
|
613
|
+
evNames.map((evName) => {
|
|
614
|
+
const handler = (e) => {
|
|
615
|
+
__classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_getAutocompleteEventCallback).call(this, e.detail, cell.fun, configCMandACP, id, currentValue);
|
|
616
|
+
};
|
|
617
|
+
this.rootElement.addEventListener(evName, handler);
|
|
618
|
+
__classPrivateFieldGet(this, _KupInputPanel_listeners, "f").push({
|
|
619
|
+
event: evName,
|
|
620
|
+
handler,
|
|
621
|
+
});
|
|
603
622
|
});
|
|
604
623
|
}
|
|
605
|
-
else if (
|
|
624
|
+
else if (rawOptions) {
|
|
606
625
|
configCMandACP.data['kup-list'].data =
|
|
607
|
-
__classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_optionsTreeComboAdapter).call(this,
|
|
626
|
+
__classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_optionsTreeComboAdapter).call(this, rawOptions, currentValue);
|
|
608
627
|
}
|
|
609
628
|
return configCMandACP;
|
|
610
629
|
}, _KupInputPanel_CHKAdapter = function _KupInputPanel_CHKAdapter(_options, fieldLabel, currentValue) {
|
|
@@ -666,4 +685,15 @@ _KupInputPanel_kupManager = new WeakMap(), _KupInputPanel_optionsAdapterMap = ne
|
|
|
666
685
|
}));
|
|
667
686
|
})
|
|
668
687
|
.flat();
|
|
688
|
+
}, _KupInputPanel_getAutocompleteEventCallback = function _KupInputPanel_getAutocompleteEventCallback(detail, fun, data, id, currentValue) {
|
|
689
|
+
if (detail.id !== id ||
|
|
690
|
+
detail.open === false) {
|
|
691
|
+
return;
|
|
692
|
+
}
|
|
693
|
+
this.optionsHandler(fun, detail.inputValue, __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_reverseMapCells).call(this)).then((options) => {
|
|
694
|
+
var _a;
|
|
695
|
+
data.data['kup-list'].data =
|
|
696
|
+
(_a = __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_optionsTreeComboAdapter).call(this, options, currentValue)) !== null && _a !== void 0 ? _a : [];
|
|
697
|
+
detail.comp.refresh();
|
|
698
|
+
});
|
|
669
699
|
};
|
|
@@ -3,6 +3,9 @@ import { getAssetPath, h } from "@stencil/core";
|
|
|
3
3
|
/*-------------------------------------------------*/
|
|
4
4
|
/* C o m p o n e n t */
|
|
5
5
|
/*-------------------------------------------------*/
|
|
6
|
+
let img;
|
|
7
|
+
let placeholder;
|
|
8
|
+
const HIDDEN_CLASS = 'f-image__hidden';
|
|
6
9
|
export const FImage = (props) => {
|
|
7
10
|
let el;
|
|
8
11
|
let style;
|
|
@@ -21,7 +24,7 @@ export const FImage = (props) => {
|
|
|
21
24
|
'--kup_image_height': props.sizeY ? props.sizeY : '100%',
|
|
22
25
|
'--kup_image_width': props.sizeX ? props.sizeX : '100%',
|
|
23
26
|
};
|
|
24
|
-
el = createIcon(props);
|
|
27
|
+
el = createIcon(props.resource, props.color);
|
|
25
28
|
}
|
|
26
29
|
}
|
|
27
30
|
else if (props.data) {
|
|
@@ -37,32 +40,51 @@ export const FImage = (props) => {
|
|
|
37
40
|
badgeCollection.push(h("kup-badge", Object.assign({}, props.badgeData[index])));
|
|
38
41
|
}
|
|
39
42
|
}
|
|
40
|
-
return (h("div", Object.assign({ class: `f-image ${props.wrapperClass ? props.wrapperClass : ''} ` }, props.dataSet, { id: props.id, style: style, title: props.title, onClick: props.onClick }),
|
|
43
|
+
return (h("div", Object.assign({ class: `f-image ${props.wrapperClass ? props.wrapperClass : ''} ` }, props.dataSet, { id: props.id, style: style, title: props.title, onClick: props.onClick }), props.placeholderResource
|
|
44
|
+
? createIcon(props.placeholderResource, props.color, 'f-image__placeholder ' + HIDDEN_CLASS)
|
|
45
|
+
: undefined, el, ...badgeCollection));
|
|
41
46
|
};
|
|
42
47
|
/*-------------------------------------------------*/
|
|
43
48
|
/* M e t h o d s */
|
|
44
49
|
/*-------------------------------------------------*/
|
|
45
|
-
function createIcon(
|
|
50
|
+
function createIcon(icon, color, iconClass = 'f-image__icon') {
|
|
46
51
|
const classObj = {
|
|
47
|
-
|
|
52
|
+
[iconClass]: true,
|
|
48
53
|
};
|
|
49
54
|
const style = {
|
|
50
|
-
background:
|
|
55
|
+
background: color ? color : `var(--kup-gray-color-70)`,
|
|
51
56
|
};
|
|
52
|
-
if (
|
|
53
|
-
let themeIcon =
|
|
57
|
+
if (icon.indexOf('--kup') > -1) {
|
|
58
|
+
let themeIcon = icon.replace('--', '');
|
|
54
59
|
classObj['kup-icon'] = true;
|
|
55
60
|
classObj[themeIcon] = true;
|
|
56
61
|
}
|
|
57
62
|
else {
|
|
58
|
-
const path = getAssetPath(`./assets/svg/${
|
|
63
|
+
const path = getAssetPath(`./assets/svg/${icon}.svg`);
|
|
59
64
|
style.mask = `url('${path}') no-repeat center`;
|
|
60
65
|
style.webkitMask = `url('${path}') no-repeat center`;
|
|
61
66
|
}
|
|
62
|
-
return h("div", { class: classObj,
|
|
67
|
+
return (h("div", { class: classObj, ref: (el) => {
|
|
68
|
+
if (iconClass.indexOf('placeholder') > 1) {
|
|
69
|
+
placeholder = el;
|
|
70
|
+
}
|
|
71
|
+
}, style: style }));
|
|
63
72
|
}
|
|
64
73
|
function createImage(props) {
|
|
65
|
-
return h("img", {
|
|
74
|
+
return (h("img", { class: props.placeholderResource ? HIDDEN_CLASS : '', onLoad: (e) => {
|
|
75
|
+
if (props.onLoad) {
|
|
76
|
+
props.onLoad(e);
|
|
77
|
+
}
|
|
78
|
+
if (placeholder) {
|
|
79
|
+
placeholder.classList.add(HIDDEN_CLASS);
|
|
80
|
+
img.classList.remove(HIDDEN_CLASS);
|
|
81
|
+
}
|
|
82
|
+
}, onError: () => {
|
|
83
|
+
if (placeholder) {
|
|
84
|
+
placeholder.classList.remove(HIDDEN_CLASS);
|
|
85
|
+
img.classList.add(HIDDEN_CLASS);
|
|
86
|
+
}
|
|
87
|
+
}, ref: (el) => (img = el), src: props.resource }));
|
|
66
88
|
}
|
|
67
89
|
function createBar(data) {
|
|
68
90
|
const steps = [];
|
|
@@ -1115,6 +1115,9 @@ var FImageShape;
|
|
|
1115
1115
|
/*-------------------------------------------------*/
|
|
1116
1116
|
/* C o m p o n e n t */
|
|
1117
1117
|
/*-------------------------------------------------*/
|
|
1118
|
+
let img;
|
|
1119
|
+
let placeholder;
|
|
1120
|
+
const HIDDEN_CLASS = 'f-image__hidden';
|
|
1118
1121
|
const FImage = (props) => {
|
|
1119
1122
|
let el;
|
|
1120
1123
|
let style;
|
|
@@ -1133,7 +1136,7 @@ const FImage = (props) => {
|
|
|
1133
1136
|
'--kup_image_height': props.sizeY ? props.sizeY : '100%',
|
|
1134
1137
|
'--kup_image_width': props.sizeX ? props.sizeX : '100%',
|
|
1135
1138
|
};
|
|
1136
|
-
el = createIcon(props);
|
|
1139
|
+
el = createIcon(props.resource, props.color);
|
|
1137
1140
|
}
|
|
1138
1141
|
}
|
|
1139
1142
|
else if (props.data) {
|
|
@@ -1150,33 +1153,53 @@ const FImage = (props) => {
|
|
|
1150
1153
|
}
|
|
1151
1154
|
}
|
|
1152
1155
|
return (h("div", Object.assign({ class: `f-image ${props.wrapperClass ? props.wrapperClass : ''} ` }, props.dataSet, { id: props.id, style: style, title: props.title, onClick: props.onClick }),
|
|
1156
|
+
props.placeholderResource
|
|
1157
|
+
? createIcon(props.placeholderResource, props.color, 'f-image__placeholder ' + HIDDEN_CLASS)
|
|
1158
|
+
: undefined,
|
|
1153
1159
|
el,
|
|
1154
1160
|
...badgeCollection));
|
|
1155
1161
|
};
|
|
1156
1162
|
/*-------------------------------------------------*/
|
|
1157
1163
|
/* M e t h o d s */
|
|
1158
1164
|
/*-------------------------------------------------*/
|
|
1159
|
-
function createIcon(
|
|
1165
|
+
function createIcon(icon, color, iconClass = 'f-image__icon') {
|
|
1160
1166
|
const classObj = {
|
|
1161
|
-
|
|
1167
|
+
[iconClass]: true,
|
|
1162
1168
|
};
|
|
1163
1169
|
const style = {
|
|
1164
|
-
background:
|
|
1170
|
+
background: color ? color : `var(--kup-gray-color-70)`,
|
|
1165
1171
|
};
|
|
1166
|
-
if (
|
|
1167
|
-
let themeIcon =
|
|
1172
|
+
if (icon.indexOf('--kup') > -1) {
|
|
1173
|
+
let themeIcon = icon.replace('--', '');
|
|
1168
1174
|
classObj['kup-icon'] = true;
|
|
1169
1175
|
classObj[themeIcon] = true;
|
|
1170
1176
|
}
|
|
1171
1177
|
else {
|
|
1172
|
-
const path = getAssetPath(`./assets/svg/${
|
|
1178
|
+
const path = getAssetPath(`./assets/svg/${icon}.svg`);
|
|
1173
1179
|
style.mask = `url('${path}') no-repeat center`;
|
|
1174
1180
|
style.webkitMask = `url('${path}') no-repeat center`;
|
|
1175
1181
|
}
|
|
1176
|
-
return h("div", { class: classObj,
|
|
1182
|
+
return (h("div", { class: classObj, ref: (el) => {
|
|
1183
|
+
if (iconClass.indexOf('placeholder') > 1) {
|
|
1184
|
+
placeholder = el;
|
|
1185
|
+
}
|
|
1186
|
+
}, style: style }));
|
|
1177
1187
|
}
|
|
1178
1188
|
function createImage(props) {
|
|
1179
|
-
return h("img", {
|
|
1189
|
+
return (h("img", { class: props.placeholderResource ? HIDDEN_CLASS : '', onLoad: (e) => {
|
|
1190
|
+
if (props.onLoad) {
|
|
1191
|
+
props.onLoad(e);
|
|
1192
|
+
}
|
|
1193
|
+
if (placeholder) {
|
|
1194
|
+
placeholder.classList.add(HIDDEN_CLASS);
|
|
1195
|
+
img.classList.remove(HIDDEN_CLASS);
|
|
1196
|
+
}
|
|
1197
|
+
}, onError: () => {
|
|
1198
|
+
if (placeholder) {
|
|
1199
|
+
placeholder.classList.remove(HIDDEN_CLASS);
|
|
1200
|
+
img.classList.add(HIDDEN_CLASS);
|
|
1201
|
+
}
|
|
1202
|
+
}, ref: (el) => (img = el), src: props.resource }));
|
|
1180
1203
|
}
|
|
1181
1204
|
function createBar(data) {
|
|
1182
1205
|
const steps = [];
|
|
@@ -18078,6 +18101,7 @@ const KupImage = /*@__PURE__*/ proxyCustomElement(class KupImage extends HTMLEle
|
|
|
18078
18101
|
this.data = null;
|
|
18079
18102
|
this.feedback = false;
|
|
18080
18103
|
this.isCanvas = false;
|
|
18104
|
+
this.placeholderResource = '';
|
|
18081
18105
|
this.resource = null;
|
|
18082
18106
|
this.sizeX = '100%';
|
|
18083
18107
|
this.sizeY = '100%';
|
|
@@ -18171,6 +18195,7 @@ const KupImage = /*@__PURE__*/ proxyCustomElement(class KupImage extends HTMLEle
|
|
|
18171
18195
|
color: this.color,
|
|
18172
18196
|
data: this.data,
|
|
18173
18197
|
fit: this.rootElement.classList.contains('kup-fit') ? true : false,
|
|
18198
|
+
placeholderResource: this.placeholderResource,
|
|
18174
18199
|
resource: this.resource,
|
|
18175
18200
|
sizeX: this.sizeX,
|
|
18176
18201
|
sizeY: this.sizeY,
|
|
@@ -18213,6 +18238,7 @@ const KupImage = /*@__PURE__*/ proxyCustomElement(class KupImage extends HTMLEle
|
|
|
18213
18238
|
"data": [16],
|
|
18214
18239
|
"feedback": [4],
|
|
18215
18240
|
"isCanvas": [4, "is-canvas"],
|
|
18241
|
+
"placeholderResource": [1, "placeholder-resource"],
|
|
18216
18242
|
"resource": [1],
|
|
18217
18243
|
"sizeX": [1, "size-x"],
|
|
18218
18244
|
"sizeY": [1, "size-y"],
|
|
@@ -327,14 +327,16 @@ const KupBox = /*@__PURE__*/ proxyCustomElement(class KupBox extends HTMLElement
|
|
|
327
327
|
return sortByArray;
|
|
328
328
|
}
|
|
329
329
|
checkScrollOnHover() {
|
|
330
|
-
if (
|
|
331
|
-
if (this.scrollOnHover) {
|
|
332
|
-
this.
|
|
330
|
+
if (this.boxContainer) {
|
|
331
|
+
if (!this.kupManager.scrollOnHover.isRegistered(this.boxContainer)) {
|
|
332
|
+
if (this.scrollOnHover) {
|
|
333
|
+
this.kupManager.scrollOnHover.register(this.boxContainer);
|
|
334
|
+
}
|
|
333
335
|
}
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
336
|
+
else {
|
|
337
|
+
if (!this.scrollOnHover) {
|
|
338
|
+
this.kupManager.scrollOnHover.unregister(this.boxContainer);
|
|
339
|
+
}
|
|
338
340
|
}
|
|
339
341
|
}
|
|
340
342
|
}
|
|
@@ -843,7 +845,11 @@ const KupBox = /*@__PURE__*/ proxyCustomElement(class KupBox extends HTMLElement
|
|
|
843
845
|
column: !horizontal,
|
|
844
846
|
};
|
|
845
847
|
const rowStyle = row.style || {};
|
|
846
|
-
return (h("div", { class: "box-wrapper", style: rowStyle, ref: (el) =>
|
|
848
|
+
return (h("div", { class: "box-wrapper", style: rowStyle, ref: (el) => {
|
|
849
|
+
if (el) {
|
|
850
|
+
__classPrivateFieldGet(this, _KupBox_rowsRefs, "f").push(el);
|
|
851
|
+
}
|
|
852
|
+
} }, h("div", { class: boxClass, "data-row": row, ref: (el) => this.rowsRefs.push(el) }, multiSel, boxContent, badges), rowObject));
|
|
847
853
|
}
|
|
848
854
|
renderSection(section, parent, row, visibleColumns) {
|
|
849
855
|
let sectionContent = null;
|
|
@@ -1245,6 +1251,7 @@ const KupBox = /*@__PURE__*/ proxyCustomElement(class KupBox extends HTMLElement
|
|
|
1245
1251
|
this.kupManager.debug.logRender(this, true);
|
|
1246
1252
|
}
|
|
1247
1253
|
render() {
|
|
1254
|
+
__classPrivateFieldSet(this, _KupBox_rowsRefs, [], "f");
|
|
1248
1255
|
const isKanban = !!(typeof this.kanban === 'object' && this.kanban !== null);
|
|
1249
1256
|
let sortPanel = null;
|
|
1250
1257
|
if (this.sortEnabled) {
|