@sme.up/ketchup 11.0.0-SNAPSHOT-20250115150932 → 11.0.0-SNAPSHOT-20250115163245
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/ketchup.cjs.js +1 -1
- package/dist/cjs/kup-autocomplete_28.cjs.entry.js +20 -19
- package/dist/cjs/kup-box.cjs.entry.js +6 -5
- package/dist/cjs/kup-calendar.cjs.entry.js +123 -52
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/kup-box/kup-box.js +6 -5
- package/dist/collection/components/kup-calendar/kup-calendar-declarations.js +1 -0
- package/dist/collection/components/kup-calendar/kup-calendar-state.js +5 -0
- package/dist/collection/components/kup-calendar/kup-calendar.js +156 -52
- package/dist/collection/components/kup-card/standard/kup-card-standard.js +1 -2
- package/dist/collection/components/kup-dropdown-button/kup-dropdown-button.js +14 -13
- package/dist/collection/components/kup-tree/kup-tree.js +6 -5
- package/dist/components/kup-accordion.js +1 -1
- package/dist/components/kup-activity-timeline.js +1 -1
- package/dist/components/kup-autocomplete.js +1 -1
- package/dist/components/kup-badge.js +1 -1
- package/dist/components/kup-box.js +1 -1
- package/dist/components/kup-button-list.js +1 -1
- package/dist/components/kup-button.js +1 -1
- package/dist/components/kup-calendar.js +126 -53
- package/dist/components/kup-card-list.js +2 -2
- package/dist/components/kup-card.js +1 -1
- package/dist/components/kup-cell.js +1 -1
- package/dist/components/kup-chart.js +1 -1
- package/dist/components/kup-checkbox.js +1 -1
- package/dist/components/kup-chip.js +1 -1
- package/dist/components/kup-color-picker.js +1 -1
- package/dist/components/kup-combobox.js +1 -1
- package/dist/components/kup-dashboard.js +1 -1
- package/dist/components/kup-data-table.js +1 -1
- package/dist/components/kup-date-picker.js +1 -1
- package/dist/components/kup-dialog.js +1 -1
- package/dist/components/kup-drawer.js +1 -1
- package/dist/components/kup-dropdown-button.js +1 -1
- package/dist/components/kup-echart.js +1 -1
- package/dist/components/kup-editor.js +1 -1
- package/dist/components/kup-family-tree.js +2 -2
- package/dist/components/kup-form.js +1 -1
- package/dist/components/kup-gauge.js +1 -1
- package/dist/components/kup-grid.js +1 -1
- package/dist/components/kup-htm.js +1 -1
- package/dist/components/kup-iframe.js +1 -1
- package/dist/components/kup-image-list.js +1 -1
- package/dist/components/kup-image.js +1 -1
- package/dist/components/kup-input-panel.js +2 -2
- package/dist/components/kup-lazy.js +1 -1
- package/dist/components/kup-list.js +1 -1
- package/dist/components/kup-magic-box.js +3 -3
- package/dist/components/kup-nav-bar.js +1 -1
- package/dist/components/kup-numeric-picker.js +1 -1
- package/dist/components/kup-object-field.js +1 -1
- package/dist/components/kup-pdf.js +1 -1
- package/dist/components/kup-photo-frame.js +1 -1
- package/dist/components/kup-planner.js +1 -1
- package/dist/components/kup-probe.js +1 -1
- package/dist/components/kup-progress-bar.js +1 -1
- package/dist/components/kup-qlik.js +1 -1
- package/dist/components/kup-radio.js +1 -1
- package/dist/components/kup-rating.js +1 -1
- package/dist/components/kup-snackbar.js +1 -1
- package/dist/components/kup-spinner.js +1 -1
- package/dist/components/kup-switch.js +1 -1
- package/dist/components/kup-tab-bar.js +1 -1
- package/dist/components/kup-text-field.js +1 -1
- package/dist/components/kup-time-picker.js +1 -1
- package/dist/components/kup-toolbar.js +1 -1
- package/dist/components/kup-tree.js +1 -1
- package/dist/components/kup-txt.js +1 -1
- package/dist/components/kup-typography-list.js +1 -1
- package/dist/components/kup-typography.js +1 -1
- package/dist/components/{p-3807d2aa.js → p-389bea49.js} +7 -6
- package/dist/components/{p-e205e81f.js → p-4ef87c42.js} +1 -1
- package/dist/components/{p-095eee2a.js → p-5c3d161a.js} +1 -1
- package/dist/components/{p-7cc12994.js → p-82a475df.js} +21 -20
- package/dist/components/{p-0e3f4967.js → p-d9e801a2.js} +1 -1
- package/dist/esm/ketchup.js +1 -1
- package/dist/esm/kup-autocomplete_28.entry.js +20 -19
- package/dist/esm/kup-box.entry.js +6 -5
- package/dist/esm/kup-calendar.entry.js +123 -52
- package/dist/esm/loader.js +1 -1
- package/dist/ketchup/ketchup.esm.js +1 -1
- package/dist/ketchup/{p-75668f3d.entry.js → p-08c10a48.entry.js} +2 -2
- package/dist/ketchup/p-8636974b.entry.js +1 -0
- package/dist/ketchup/{p-33818918.entry.js → p-bcc871a0.entry.js} +1 -1
- package/dist/types/components/kup-calendar/kup-calendar-declarations.d.ts +2 -1
- package/dist/types/components/kup-calendar/kup-calendar-state.d.ts +7 -0
- package/dist/types/components/kup-calendar/kup-calendar.d.ts +8 -0
- package/dist/types/components/kup-dropdown-button/kup-dropdown-button.d.ts +1 -1
- package/dist/types/components.d.ts +4 -0
- package/package.json +1 -1
- package/dist/ketchup/p-4c10d20f.entry.js +0 -1
|
@@ -22,8 +22,13 @@ import { FChipType, } from "../../f-components/f-chip/f-chip-declarations";
|
|
|
22
22
|
import { KupLanguageGeneric } from "../../managers/kup-language/kup-language-declarations";
|
|
23
23
|
import { KupDatesFormats, KupDatesLocales, } from "../../managers/kup-dates/kup-dates-declarations";
|
|
24
24
|
import { KupDebugCategory } from "../../managers/kup-debug/kup-debug-declarations";
|
|
25
|
+
import { KupCalendarState } from "./kup-calendar-state";
|
|
25
26
|
export class KupCalendar {
|
|
26
27
|
constructor() {
|
|
28
|
+
/*-------------------------------------------------*/
|
|
29
|
+
/* S t a t e s */
|
|
30
|
+
/*-------------------------------------------------*/
|
|
31
|
+
this.state = new KupCalendarState();
|
|
27
32
|
this.calendarContainer = null;
|
|
28
33
|
this.kupManager = kupManagerInstance();
|
|
29
34
|
this.navTitle = null;
|
|
@@ -51,12 +56,48 @@ export class KupCalendar {
|
|
|
51
56
|
this.editableEvents = true;
|
|
52
57
|
this.enableChangeView = false;
|
|
53
58
|
this.viewType = KupCalendarViewTypes.MONTH;
|
|
59
|
+
this.stateId = '';
|
|
60
|
+
this.store = undefined;
|
|
61
|
+
}
|
|
62
|
+
initWithPersistedState() {
|
|
63
|
+
var _a, _b;
|
|
64
|
+
if (this.store && this.stateId) {
|
|
65
|
+
const state = this.store.getState(this.stateId);
|
|
66
|
+
if (state) {
|
|
67
|
+
this.kupManager.debug.logMessage(this, 'Initialize with state for stateId ' +
|
|
68
|
+
this.stateId +
|
|
69
|
+
': ' +
|
|
70
|
+
state);
|
|
71
|
+
}
|
|
72
|
+
this.initialDate = (_a = state.initialDate) !== null && _a !== void 0 ? _a : this.initialDate;
|
|
73
|
+
this.viewType = (_b = state.viewType) !== null && _b !== void 0 ? _b : this.viewType;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
persistState() {
|
|
77
|
+
if (this.store && this.stateId) {
|
|
78
|
+
let somethingChanged = false;
|
|
79
|
+
if (this.state.initialDate !== this.initialDate) {
|
|
80
|
+
this.state.initialDate = this.initialDate;
|
|
81
|
+
somethingChanged = true;
|
|
82
|
+
}
|
|
83
|
+
if (this.state.viewType !== this.viewType) {
|
|
84
|
+
this.state.viewType = this.viewType;
|
|
85
|
+
somethingChanged = true;
|
|
86
|
+
}
|
|
87
|
+
if (somethingChanged) {
|
|
88
|
+
this.kupManager.debug.logMessage(this, 'Persisting state for stateId ' +
|
|
89
|
+
this.stateId +
|
|
90
|
+
': ' +
|
|
91
|
+
this.state);
|
|
92
|
+
this.store.persistState(this.stateId, this.state);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
54
95
|
}
|
|
55
96
|
/*-------------------------------------------------*/
|
|
56
97
|
/* W a t c h e r s */
|
|
57
98
|
/*-------------------------------------------------*/
|
|
58
99
|
setCalendarData() {
|
|
59
|
-
var _a;
|
|
100
|
+
var _a, _b;
|
|
60
101
|
if (!this.calendarContainer) {
|
|
61
102
|
return;
|
|
62
103
|
}
|
|
@@ -74,6 +115,20 @@ export class KupCalendar {
|
|
|
74
115
|
});
|
|
75
116
|
}
|
|
76
117
|
this.calendar = new Calendar(this.calendarContainer, {
|
|
118
|
+
datesSet: (info) => {
|
|
119
|
+
const isoDate = info.startStr.substring(0, 10);
|
|
120
|
+
const date = new Date(isoDate);
|
|
121
|
+
if (this.viewType === KupCalendarViewTypes.MONTH &&
|
|
122
|
+
date.getDate() > 1) {
|
|
123
|
+
date.setMonth(date.getMonth() + 1);
|
|
124
|
+
date.setDate(1);
|
|
125
|
+
this.initialDate = date.toISOString().substring(0, 10);
|
|
126
|
+
}
|
|
127
|
+
else {
|
|
128
|
+
this.initialDate = isoDate;
|
|
129
|
+
}
|
|
130
|
+
this.persistState();
|
|
131
|
+
},
|
|
77
132
|
dateClick: ({ date }) => {
|
|
78
133
|
this.kupCalendarDateClick.emit({
|
|
79
134
|
comp: this,
|
|
@@ -153,8 +208,7 @@ export class KupCalendar {
|
|
|
153
208
|
},
|
|
154
209
|
events: this.getEvents(),
|
|
155
210
|
headerToolbar: false,
|
|
156
|
-
|
|
157
|
-
initialDate: this.currentDate,
|
|
211
|
+
initialDate: (_b = this.initialDate) !== null && _b !== void 0 ? _b : this.currentDate,
|
|
158
212
|
initialView: this.viewType,
|
|
159
213
|
locale: this.getLocale(),
|
|
160
214
|
locales: [
|
|
@@ -270,56 +324,66 @@ export class KupCalendar {
|
|
|
270
324
|
this.endCol &&
|
|
271
325
|
getColumnByName(this.getColumns(), this.startCol) &&
|
|
272
326
|
getColumnByName(this.getColumns(), this.endCol);
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
if (
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
327
|
+
let events = {};
|
|
328
|
+
try {
|
|
329
|
+
if (!this.dateCol || !this.descrCol) {
|
|
330
|
+
throw new Error('dateCol or/and descrCol are not specified, check calendarColums props');
|
|
331
|
+
}
|
|
332
|
+
events = this.getRows().map((row) => {
|
|
333
|
+
const cell = row.cells[this.dateCol];
|
|
334
|
+
if (cell) {
|
|
335
|
+
let startDate = this.kupManager.dates.toDayjs(cell.value);
|
|
336
|
+
let endDate = this.kupManager.dates.toDayjs(cell.value);
|
|
337
|
+
if (isHourRange) {
|
|
338
|
+
const startCell = row.cells[this.startCol];
|
|
339
|
+
const endCell = row.cells[this.endCol];
|
|
340
|
+
if (startCell && endCell) {
|
|
341
|
+
const dayjsStart = this.kupManager.dates.toDayjs(startCell.value, KupDatesFormats.ISO_TIME);
|
|
342
|
+
const dayjsEnd = this.kupManager.dates.toDayjs(endCell.value, KupDatesFormats.ISO_TIME);
|
|
343
|
+
if (dayjsStart && dayjsEnd) {
|
|
344
|
+
startDate = startDate.hour(dayjsStart.hour());
|
|
345
|
+
startDate = startDate.minute(dayjsStart.minute());
|
|
346
|
+
startDate = startDate.second(dayjsStart.second());
|
|
347
|
+
endDate = endDate.hour(dayjsEnd.hour());
|
|
348
|
+
endDate = endDate.minute(dayjsEnd.minute());
|
|
349
|
+
endDate = endDate.second(dayjsEnd.second());
|
|
350
|
+
}
|
|
351
|
+
else {
|
|
352
|
+
this.kupManager.debug.logMessage(this, `error while converting hour range: [${dayjsStart
|
|
353
|
+
? `start hour: ${dayjsStart}`
|
|
354
|
+
: `invalid start hour: ${startCell.value}`}, ${dayjsEnd
|
|
355
|
+
? `end hour: ${dayjsEnd}`
|
|
356
|
+
: `invalid end hour: ${endCell.value}`}]`, KupDebugCategory.WARNING);
|
|
357
|
+
}
|
|
298
358
|
}
|
|
299
359
|
}
|
|
360
|
+
if (endDate && startDate) {
|
|
361
|
+
const el = {
|
|
362
|
+
allDay: isHourRange ? false : true,
|
|
363
|
+
editable: this.editableEvents,
|
|
364
|
+
end: endDate.toISOString(),
|
|
365
|
+
extendedProps: {
|
|
366
|
+
row,
|
|
367
|
+
},
|
|
368
|
+
start: startDate.toISOString(),
|
|
369
|
+
title: row.cells[this.descrCol].value,
|
|
370
|
+
};
|
|
371
|
+
return el;
|
|
372
|
+
}
|
|
373
|
+
else {
|
|
374
|
+
this.kupManager.debug.logMessage(this, `error while converting dates: [${startDate
|
|
375
|
+
? `start date: ${startDate}`
|
|
376
|
+
: `invalid start date: ${cell.value}`}. ${endDate
|
|
377
|
+
? `end date: ${endDate}`
|
|
378
|
+
: `invalid end date: ${cell.value}`}]`, KupDebugCategory.WARNING);
|
|
379
|
+
}
|
|
300
380
|
}
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
row,
|
|
308
|
-
},
|
|
309
|
-
start: startDate.toISOString(),
|
|
310
|
-
title: row.cells[this.descrCol].value,
|
|
311
|
-
};
|
|
312
|
-
return el;
|
|
313
|
-
}
|
|
314
|
-
else {
|
|
315
|
-
this.kupManager.debug.logMessage(this, `error while converting dates: [${startDate
|
|
316
|
-
? `start date: ${startDate}`
|
|
317
|
-
: `invalid start date: ${cell.value}`}. ${endDate
|
|
318
|
-
? `end date: ${endDate}`
|
|
319
|
-
: `invalid end date: ${cell.value}`}]`, KupDebugCategory.WARNING);
|
|
320
|
-
}
|
|
321
|
-
}
|
|
322
|
-
});
|
|
381
|
+
});
|
|
382
|
+
}
|
|
383
|
+
catch (error) {
|
|
384
|
+
this.kupManager.debug.logMessage(this, `Unable to create calendard events, caused by: ${error}`, KupDebugCategory.ERROR);
|
|
385
|
+
}
|
|
386
|
+
return events;
|
|
323
387
|
}
|
|
324
388
|
onPrev() {
|
|
325
389
|
this.calendar.prev();
|
|
@@ -362,6 +426,7 @@ export class KupCalendar {
|
|
|
362
426
|
this.kupManager.debug.logLoad(this, false);
|
|
363
427
|
this.kupManager.language.register(this);
|
|
364
428
|
this.kupManager.theme.register(this);
|
|
429
|
+
this.initWithPersistedState();
|
|
365
430
|
}
|
|
366
431
|
componentDidLoad() {
|
|
367
432
|
this.setCalendarData();
|
|
@@ -377,11 +442,11 @@ export class KupCalendar {
|
|
|
377
442
|
this.kupManager.debug.logRender(this, true);
|
|
378
443
|
}
|
|
379
444
|
render() {
|
|
380
|
-
return (h(Host, { key: '
|
|
445
|
+
return (h(Host, { key: '3755873fa47397c498a36795d6855875043ef4b0' }, h("style", { key: '07bb73bd538b4a040f01f5711170ad53fd582ba3' }, this.kupManager.theme.setKupStyle(this.rootElement)), h("div", { key: 'fad6b4222893c0ba51d957eb8377800f2a7c7ae4', id: componentWrapperId }, h("div", { key: 'd24e0fa87e410e850754938cc6d51d5796e402f2', class: "navigation" }, !this.hideNavigation ? (h("div", { class: "navigation__left" }, h(FButton, { icon: "chevron_left", onClick: () => this.onPrev(), title: this.kupManager.language.translate(KupLanguageGeneric.PREVIOUS), wrapperClass: "navigation__prev" }), h(FButton, { icon: "calendar", onClick: () => this.onToday(), title: this.kupManager.language.translate(KupLanguageGeneric.TODAY), wrapperClass: "navigation__today" }), h(FButton, { icon: "chevron_right", onClick: () => this.onNext(), title: this.kupManager.language.translate(KupLanguageGeneric.NEXT), wrapperClass: "navigation__next" }))) : null, h("div", { key: '2eabd1ca9d91ed4d159b69b6010969b729ae0376', class: `navigation__title ${this.hideNavigation
|
|
381
446
|
? 'navigation__title--centered'
|
|
382
447
|
: ''}`, ref: (el) => {
|
|
383
448
|
this.navTitle = el;
|
|
384
|
-
} }), h("div", { key: '
|
|
449
|
+
} }), h("div", { key: '6167055757c8c5fa4406262365fb456be5255f42', class: "navigation__right" }, this.enableChangeView ? (h(FChip, Object.assign({}, this.setChipProps()))) : null)), h("div", { key: '80c87f4cc19c07442186b566db0276a47e2a1792', class: "calendar", ref: (el) => (this.calendarContainer = el) }))));
|
|
385
450
|
}
|
|
386
451
|
disconnectedCallback() {
|
|
387
452
|
if (this.calendar) {
|
|
@@ -590,6 +655,45 @@ export class KupCalendar {
|
|
|
590
655
|
"attribute": "view-type",
|
|
591
656
|
"reflect": false,
|
|
592
657
|
"defaultValue": "KupCalendarViewTypes.MONTH"
|
|
658
|
+
},
|
|
659
|
+
"stateId": {
|
|
660
|
+
"type": "string",
|
|
661
|
+
"mutable": false,
|
|
662
|
+
"complexType": {
|
|
663
|
+
"original": "string",
|
|
664
|
+
"resolved": "string",
|
|
665
|
+
"references": {}
|
|
666
|
+
},
|
|
667
|
+
"required": false,
|
|
668
|
+
"optional": false,
|
|
669
|
+
"docs": {
|
|
670
|
+
"tags": [],
|
|
671
|
+
"text": ""
|
|
672
|
+
},
|
|
673
|
+
"attribute": "state-id",
|
|
674
|
+
"reflect": false,
|
|
675
|
+
"defaultValue": "''"
|
|
676
|
+
},
|
|
677
|
+
"store": {
|
|
678
|
+
"type": "unknown",
|
|
679
|
+
"mutable": false,
|
|
680
|
+
"complexType": {
|
|
681
|
+
"original": "KupStore",
|
|
682
|
+
"resolved": "KupStore",
|
|
683
|
+
"references": {
|
|
684
|
+
"KupStore": {
|
|
685
|
+
"location": "import",
|
|
686
|
+
"path": "../kup-state/kup-store",
|
|
687
|
+
"id": "src/components/kup-state/kup-store.ts::KupStore"
|
|
688
|
+
}
|
|
689
|
+
}
|
|
690
|
+
},
|
|
691
|
+
"required": false,
|
|
692
|
+
"optional": false,
|
|
693
|
+
"docs": {
|
|
694
|
+
"tags": [],
|
|
695
|
+
"text": ""
|
|
696
|
+
}
|
|
593
697
|
}
|
|
594
698
|
};
|
|
595
699
|
}
|
|
@@ -578,14 +578,13 @@ export function create15(component) {
|
|
|
578
578
|
data: { 'kup-list': { data: [], showIcons: true } },
|
|
579
579
|
dropdownOnly: true,
|
|
580
580
|
icon: 'more_vert',
|
|
581
|
-
id: 'options',
|
|
582
581
|
styling: FButtonStyling.ICON,
|
|
583
582
|
};
|
|
584
583
|
for (let index = 5; index < genericButtons.length; index++) {
|
|
585
584
|
const button = genericButtons[index];
|
|
586
585
|
props.data['kup-list'].data.push(Object.assign(Object.assign({}, button), { value: button.title }));
|
|
587
586
|
}
|
|
588
|
-
return (h("kup-dropdown-button", Object.assign({}, props, { title: dom.ketchup.language.translate(KupLanguageGeneric.OPTIONS) })));
|
|
587
|
+
return (h("kup-dropdown-button", Object.assign({}, props, { id: "options", title: dom.ketchup.language.translate(KupLanguageGeneric.OPTIONS) })));
|
|
589
588
|
};
|
|
590
589
|
return (h("div", { class: `standard-layout-${component.layoutNumber}` }, h("div", { class: "section-1" }, imageArray[0] ? (h(FImage, Object.assign({ id: "image1" }, imageArray[0], { sizeX: "84px", sizeY: "84px" }))) : (h("div", { class: "sub-spinner" }, h("kup-spinner", { active: true, dimensions: "7px", layout: 14 }))), h("div", { class: "sub-1" }, textArray[0] ||
|
|
591
590
|
buttonsIds.includes(KupColumnMenuIds.BUTTON_OPEN_IN_NEW) ||
|
|
@@ -31,7 +31,7 @@ export class KupDropdownButton {
|
|
|
31
31
|
*/
|
|
32
32
|
this.listEl = null;
|
|
33
33
|
this.clickCb = null;
|
|
34
|
-
this.
|
|
34
|
+
this.value = '';
|
|
35
35
|
this.customStyle = '';
|
|
36
36
|
this.data = null;
|
|
37
37
|
this.disabled = false;
|
|
@@ -99,7 +99,7 @@ export class KupDropdownButton {
|
|
|
99
99
|
this.kupBlur.emit({
|
|
100
100
|
comp: this,
|
|
101
101
|
id: this.rootElement.id,
|
|
102
|
-
value: this.
|
|
102
|
+
value: this.value,
|
|
103
103
|
});
|
|
104
104
|
}
|
|
105
105
|
onKupClick() {
|
|
@@ -107,14 +107,14 @@ export class KupDropdownButton {
|
|
|
107
107
|
this.kupClick.emit({
|
|
108
108
|
comp: this,
|
|
109
109
|
id: this.rootElement.id,
|
|
110
|
-
value: this.
|
|
110
|
+
value: this.value,
|
|
111
111
|
});
|
|
112
112
|
}
|
|
113
113
|
onKupFocus() {
|
|
114
114
|
this.kupFocus.emit({
|
|
115
115
|
comp: this,
|
|
116
116
|
id: this.rootElement.id,
|
|
117
|
-
value: this.
|
|
117
|
+
value: this.value,
|
|
118
118
|
});
|
|
119
119
|
}
|
|
120
120
|
onDropDownClick() {
|
|
@@ -131,13 +131,13 @@ export class KupDropdownButton {
|
|
|
131
131
|
this.kupChange.emit({
|
|
132
132
|
comp: this,
|
|
133
133
|
id: this.rootElement.id,
|
|
134
|
-
value: this.
|
|
134
|
+
value: this.value,
|
|
135
135
|
node: e.detail.selected,
|
|
136
136
|
});
|
|
137
137
|
this.kupItemClick.emit({
|
|
138
138
|
comp: this,
|
|
139
139
|
id: this.rootElement.id,
|
|
140
|
-
value: this.
|
|
140
|
+
value: this.value,
|
|
141
141
|
node: e.detail.selected,
|
|
142
142
|
});
|
|
143
143
|
}
|
|
@@ -156,7 +156,7 @@ export class KupDropdownButton {
|
|
|
156
156
|
* Returns the component's internal value.
|
|
157
157
|
*/
|
|
158
158
|
async getValue() {
|
|
159
|
-
return this.
|
|
159
|
+
return this.value;
|
|
160
160
|
}
|
|
161
161
|
/**
|
|
162
162
|
* This method is used to trigger a new render of the component.
|
|
@@ -175,7 +175,7 @@ export class KupDropdownButton {
|
|
|
175
175
|
* Sets the internal value of the component.
|
|
176
176
|
*/
|
|
177
177
|
async setValue(value) {
|
|
178
|
-
this.
|
|
178
|
+
this.value = value;
|
|
179
179
|
}
|
|
180
180
|
/*-------------------------------------------------*/
|
|
181
181
|
/* P r i v a t e M e t h o d s */
|
|
@@ -236,7 +236,7 @@ export class KupDropdownButton {
|
|
|
236
236
|
*/
|
|
237
237
|
consistencyCheck(e, idIn) {
|
|
238
238
|
const ret = consistencyCheck(idIn, this.data['kup-list'], this.listEl, this.selectMode, this.displayMode, e);
|
|
239
|
-
this.
|
|
239
|
+
this.value = ret.value;
|
|
240
240
|
}
|
|
241
241
|
/*-------------------------------------------------*/
|
|
242
242
|
/* L i f e c y c l e H o o k s */
|
|
@@ -244,7 +244,7 @@ export class KupDropdownButton {
|
|
|
244
244
|
componentWillLoad() {
|
|
245
245
|
this.kupManager.debug.logLoad(this, false);
|
|
246
246
|
this.kupManager.theme.register(this);
|
|
247
|
-
this.
|
|
247
|
+
this.value = this.initialValue;
|
|
248
248
|
if (!this.data) {
|
|
249
249
|
this.data = {
|
|
250
250
|
'kup-list': {},
|
|
@@ -252,7 +252,7 @@ export class KupDropdownButton {
|
|
|
252
252
|
}
|
|
253
253
|
}
|
|
254
254
|
componentDidLoad() {
|
|
255
|
-
this.consistencyCheck(undefined, this.
|
|
255
|
+
this.consistencyCheck(undefined, this.value);
|
|
256
256
|
this.kupManager.debug.logLoad(this, true);
|
|
257
257
|
}
|
|
258
258
|
componentWillRender() {
|
|
@@ -293,7 +293,8 @@ export class KupDropdownButton {
|
|
|
293
293
|
return buttons;
|
|
294
294
|
}
|
|
295
295
|
render() {
|
|
296
|
-
|
|
296
|
+
console.log('cacca ketchup dropdown button, render', this.rootElement.id, this.rootElement);
|
|
297
|
+
return (h(Host, { key: 'ca24ce7229c8b254dcd0a2d753f7b77067319f0a' }, h("style", { key: 'f3e986ef17001a6fe7d5651663816d56f072046d' }, this.kupManager.theme.setKupStyle(this.rootElement)), h("div", { key: 'c17e23dd40ad3b64a45593f57eef7ec48fadd4f1', id: componentWrapperId }, h("div", { key: '9cc393f4603db74149153a3e528ffdd4c2b5ddb5', class: "dropdown-button--wrapper" }, this.renderButtons()), h("kup-list", Object.assign({ key: '21b3c34f2b04c662865cad8ec52b3a50d26bb1ba' }, this.data['kup-list'], { displayMode: this.displayMode, isMenu: true, "onKup-list-click": (e) => this.onKupItemClick(e), id: this.rootElement.id + '_list', ref: (el) => (this.listEl = el) })))));
|
|
297
298
|
}
|
|
298
299
|
disconnectedCallback() {
|
|
299
300
|
if (this.listEl) {
|
|
@@ -623,7 +624,7 @@ export class KupDropdownButton {
|
|
|
623
624
|
}
|
|
624
625
|
static get states() {
|
|
625
626
|
return {
|
|
626
|
-
"
|
|
627
|
+
"value": {}
|
|
627
628
|
};
|
|
628
629
|
}
|
|
629
630
|
static get events() {
|
|
@@ -1289,6 +1289,7 @@ export class KupTree {
|
|
|
1289
1289
|
__classPrivateFieldGet(this, _KupTree_kupManager, "f").language.register(this);
|
|
1290
1290
|
__classPrivateFieldGet(this, _KupTree_kupManager, "f").theme.register(this);
|
|
1291
1291
|
this.columnMenuInstance = new KupColumnMenu();
|
|
1292
|
+
this.initWithPersistedState();
|
|
1292
1293
|
this.refreshStructureState();
|
|
1293
1294
|
}
|
|
1294
1295
|
componentDidLoad() {
|
|
@@ -1362,17 +1363,17 @@ export class KupTree {
|
|
|
1362
1363
|
this.data &&
|
|
1363
1364
|
this.data.length &&
|
|
1364
1365
|
this.data.length > 0) {
|
|
1365
|
-
filterField = (h("div", { key: '
|
|
1366
|
+
filterField = (h("div", { key: '60602bd446f14c44bb0dfc9fb6281ea1f5b0729a', id: "global-filter" }, h("kup-text-field", { key: 'eb0998c48e8f34a05c89bdb6780d89baff9f2373', fullWidth: true, label: __classPrivateFieldGet(this, _KupTree_kupManager, "f").language.translate(KupLanguageSearch.SEARCH), icon: KupThemeIconValues.SEARCH, initialValue: this.globalFilterValue, "onkup-textfield-input": (event) => {
|
|
1366
1367
|
window.clearTimeout(this.globalFilterTimeout);
|
|
1367
1368
|
this.globalFilterTimeout = window.setTimeout(() => this.onGlobalFilterChange(event), 600);
|
|
1368
1369
|
} })));
|
|
1369
1370
|
}
|
|
1370
|
-
return (h(Host, { key: '
|
|
1371
|
-
el) }, h("table", { key: '
|
|
1371
|
+
return (h(Host, { key: 'b3ab4c72a5f94269971ff9b9334f96b2d05b62c2' }, h("style", { key: '0fa0a5348a5c02e3c1ddeef132ca08795831ec06' }, __classPrivateFieldGet(this, _KupTree_kupManager, "f").theme.setKupStyle(this.rootElement)), h("div", { key: '0f4922c906fd89ba275427a820beb9f64ada68bc', id: componentWrapperId, class: wrapperClass }, filterField, h("div", { key: '37a94180c74ed44e1622222fd4cb898e20a5848b', class: "wrapper", ref: (el) => (this.treeWrapperRef =
|
|
1372
|
+
el) }, h("table", { key: 'b2ed044a19b23a4d101c2745e5c0b97d42e5c914', class: "kup-tree", "data-show-columns": this.showColumns, onContextMenu: (e) => {
|
|
1372
1373
|
e.preventDefault();
|
|
1373
|
-
} }, h("thead", { key: '
|
|
1374
|
+
} }, h("thead", { key: '368361d34e46e73fe87fe8f8dd352ecc6a09979b', class: {
|
|
1374
1375
|
'header--is-visible': visibleHeader,
|
|
1375
|
-
} }, h("tr", { key: '
|
|
1376
|
+
} }, h("tr", { key: '67071927cd7e5ba561cbc21b5b324a3713422d31' }, visibleHeader ? this.renderHeader() : null)), h("tbody", { key: '8f27a4eb6e7bf65f4596b64ff9b8506a6ce7a84f' }, treeNodes), (this.showFooter || this.hasTotals()) &&
|
|
1376
1377
|
this.columns
|
|
1377
1378
|
? this.renderFooter()
|
|
1378
1379
|
: null)))));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, c as createEvent, f as forceUpdate, h, d as Host } from './p-2e5f2e07.js';
|
|
2
2
|
import { k as kupManagerInstance, a as KupComponentSizing, g as getProps, s as setProps, b as KupThemeColorValues, c as KupThemeIconValues } from './p-9a52cf80.js';
|
|
3
|
-
import { M as MDCRipple, F as FImage, c as componentWrapperId, d as defineCustomElement$2, a as defineCustomElement$3, b as defineCustomElement$4, e as defineCustomElement$5, f as defineCustomElement$6, g as defineCustomElement$7, h as defineCustomElement$8, i as defineCustomElement$9, j as defineCustomElement$a, k as defineCustomElement$b, l as defineCustomElement$c, m as defineCustomElement$d, n as defineCustomElement$e, o as defineCustomElement$f, p as defineCustomElement$g, q as defineCustomElement$h, r as defineCustomElement$i, s as defineCustomElement$j, t as defineCustomElement$k, u as defineCustomElement$l, v as defineCustomElement$m, w as defineCustomElement$n, x as defineCustomElement$o, y as defineCustomElement$p, z as defineCustomElement$q, A as defineCustomElement$r, B as defineCustomElement$s, C as defineCustomElement$t } from './p-
|
|
3
|
+
import { M as MDCRipple, F as FImage, c as componentWrapperId, d as defineCustomElement$2, a as defineCustomElement$3, b as defineCustomElement$4, e as defineCustomElement$5, f as defineCustomElement$6, g as defineCustomElement$7, h as defineCustomElement$8, i as defineCustomElement$9, j as defineCustomElement$a, k as defineCustomElement$b, l as defineCustomElement$c, m as defineCustomElement$d, n as defineCustomElement$e, o as defineCustomElement$f, p as defineCustomElement$g, q as defineCustomElement$h, r as defineCustomElement$i, s as defineCustomElement$j, t as defineCustomElement$k, u as defineCustomElement$l, v as defineCustomElement$m, w as defineCustomElement$n, x as defineCustomElement$o, y as defineCustomElement$p, z as defineCustomElement$q, A as defineCustomElement$r, B as defineCustomElement$s, C as defineCustomElement$t } from './p-82a475df.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Props of the kup-accordion component.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, c as createEvent, f as forceUpdate, h, F as Fragment, d as Host } from './p-2e5f2e07.js';
|
|
2
2
|
import { k as kupManagerInstance, g as getProps, s as setProps, t as KupDebugCategory, m as getCellValueForDisplay } from './p-9a52cf80.js';
|
|
3
|
-
import { c as componentWrapperId, D as sortRows, d as defineCustomElement$2, a as defineCustomElement$3, b as defineCustomElement$4, e as defineCustomElement$5, f as defineCustomElement$6, g as defineCustomElement$7, h as defineCustomElement$8, i as defineCustomElement$9, j as defineCustomElement$a, k as defineCustomElement$b, l as defineCustomElement$c, m as defineCustomElement$d, n as defineCustomElement$e, o as defineCustomElement$f, p as defineCustomElement$g, q as defineCustomElement$h, r as defineCustomElement$i, s as defineCustomElement$j, t as defineCustomElement$k, u as defineCustomElement$l, v as defineCustomElement$m, w as defineCustomElement$n, x as defineCustomElement$o, y as defineCustomElement$p, z as defineCustomElement$q, A as defineCustomElement$r, B as defineCustomElement$s, C as defineCustomElement$t, F as FImage } from './p-
|
|
3
|
+
import { c as componentWrapperId, D as sortRows, d as defineCustomElement$2, a as defineCustomElement$3, b as defineCustomElement$4, e as defineCustomElement$5, f as defineCustomElement$6, g as defineCustomElement$7, h as defineCustomElement$8, i as defineCustomElement$9, j as defineCustomElement$a, k as defineCustomElement$b, l as defineCustomElement$c, m as defineCustomElement$d, n as defineCustomElement$e, o as defineCustomElement$f, p as defineCustomElement$g, q as defineCustomElement$h, r as defineCustomElement$i, s as defineCustomElement$j, t as defineCustomElement$k, u as defineCustomElement$l, v as defineCustomElement$m, w as defineCustomElement$n, x as defineCustomElement$o, y as defineCustomElement$p, z as defineCustomElement$q, A as defineCustomElement$r, B as defineCustomElement$s, C as defineCustomElement$t, F as FImage } from './p-82a475df.js';
|
|
4
4
|
|
|
5
5
|
var KupActivityTimelineProps;
|
|
6
6
|
(function (KupActivityTimelineProps) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { K as KupAutocomplete$1, C as defineCustomElement$1 } from './p-
|
|
1
|
+
import { K as KupAutocomplete$1, C as defineCustomElement$1 } from './p-82a475df.js';
|
|
2
2
|
|
|
3
3
|
const KupAutocomplete = KupAutocomplete$1;
|
|
4
4
|
const defineCustomElement = defineCustomElement$1;
|