@sme.up/ketchup 6.7.0 → 6.9.0-SNAPSHOT
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-bf76ab95.js → f-button-e48df7ac.js} +1 -1
- package/dist/cjs/{f-cell-b7a1524a.js → f-cell-73b2fd86.js} +5 -5
- package/dist/cjs/{f-chip-a5e100b1.js → f-chip-1d499dc9.js} +2 -2
- package/dist/cjs/{f-image-d80a2749.js → f-image-9be73458.js} +1 -1
- package/dist/cjs/{f-paginator-utils-c70812fe.js → f-paginator-utils-b1f44f04.js} +2 -2
- package/dist/cjs/{f-text-field-48b8bb16.js → f-text-field-43439612.js} +1 -1
- package/dist/cjs/ketchup.cjs.js +2 -2
- package/dist/cjs/kup-accordion.cjs.entry.js +6 -29
- package/dist/cjs/{kup-autocomplete_25.cjs.entry.js → kup-autocomplete_26.cjs.entry.js} +3792 -4304
- package/dist/cjs/kup-box.cjs.entry.js +29 -110
- package/dist/cjs/kup-calendar.cjs.entry.js +9 -33
- package/dist/cjs/kup-cell.cjs.entry.js +8 -27
- package/dist/cjs/kup-dash-list.cjs.entry.js +9 -8
- package/dist/cjs/kup-dash_2.cjs.entry.js +6 -34
- package/dist/cjs/kup-dashboard.cjs.entry.js +8 -30
- package/dist/cjs/kup-drawer.cjs.entry.js +3 -18
- package/dist/cjs/kup-echart.cjs.entry.js +15 -76
- package/dist/cjs/kup-family-tree.cjs.entry.js +11 -47
- package/dist/cjs/kup-iframe.cjs.entry.js +4 -16
- package/dist/cjs/kup-image-list.cjs.entry.js +14 -32
- package/dist/cjs/kup-lazy.cjs.entry.js +9 -36
- package/dist/cjs/kup-magic-box.cjs.entry.js +5 -24
- package/dist/cjs/{kup-manager-0e38bf48.js → kup-manager-58ba55f4.js} +70 -2
- package/dist/cjs/kup-nav-bar.cjs.entry.js +3 -15
- package/dist/cjs/kup-numeric-picker.cjs.entry.js +13 -56
- package/dist/cjs/kup-photo-frame.cjs.entry.js +8 -30
- package/dist/cjs/kup-probe.cjs.entry.js +12 -32
- package/dist/cjs/kup-qlik.cjs.entry.js +5 -59
- package/dist/cjs/kup-snackbar.cjs.entry.js +6 -37
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/assets/data-table.js +0 -44
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/kup-accordion/kup-accordion.js +4 -27
- package/dist/collection/components/kup-autocomplete/kup-autocomplete.js +15 -64
- package/dist/collection/components/kup-badge/kup-badge.js +3 -19
- package/dist/collection/components/kup-box/kup-box.js +22 -103
- package/dist/collection/components/kup-button/kup-button.js +3 -58
- package/dist/collection/components/kup-button-list/kup-button-list.js +3 -38
- package/dist/collection/components/kup-calendar/kup-calendar.js +5 -29
- package/dist/collection/components/kup-card/box/kup-card-box.js +5 -2
- package/dist/collection/components/kup-card/built-in/kup-card-built-in.js +10 -2
- package/dist/collection/components/kup-card/built-in/kup-card-form.js +11 -0
- package/dist/collection/components/kup-card/kup-card.css +78 -12
- package/dist/collection/components/kup-card/kup-card.js +48 -47
- package/dist/collection/components/kup-cell/kup-cell.js +3 -22
- package/dist/collection/components/kup-chart/kup-chart.js +15 -49
- package/dist/collection/components/kup-checkbox/kup-checkbox.js +3 -38
- package/dist/collection/components/kup-chip/kup-chip.js +5 -21
- package/dist/collection/components/kup-color-picker/kup-color-picker.js +4 -35
- package/dist/collection/components/kup-combobox/kup-combobox.js +10 -42
- package/dist/collection/components/kup-dash/kup-dash.js +2 -14
- package/dist/collection/components/kup-dash-list/kup-dash-list.js +8 -7
- package/dist/collection/components/kup-dashboard/kup-dashboard.js +4 -26
- package/dist/collection/components/kup-data-table/kup-data-table-declarations.js +2 -0
- package/dist/collection/components/kup-data-table/kup-data-table-state.js +1 -1
- package/dist/collection/components/kup-data-table/kup-data-table.css +9 -0
- package/dist/collection/components/kup-data-table/kup-data-table.js +3546 -3385
- package/dist/collection/components/kup-date-picker/kup-date-picker.js +7 -35
- package/dist/collection/components/kup-drawer/kup-drawer.js +2 -17
- package/dist/collection/components/kup-dropdown-button/kup-dropdown-button.js +12 -63
- package/dist/collection/components/kup-echart/kup-echart.js +14 -75
- package/dist/collection/components/kup-family-tree/kup-family-tree.js +8 -44
- package/dist/collection/components/kup-form/kup-form.js +4 -24
- package/dist/collection/components/kup-gauge/kup-gauge.js +15 -76
- package/dist/collection/components/kup-grid/kup-grid.js +3 -19
- package/dist/collection/components/kup-iframe/kup-iframe.js +3 -15
- package/dist/collection/components/kup-image/kup-image.js +5 -45
- package/dist/collection/components/kup-image-list/kup-image-list.js +8 -26
- package/dist/collection/components/kup-lazy/kup-lazy.js +8 -35
- package/dist/collection/components/kup-list/kup-list.js +5 -68
- package/dist/collection/components/kup-magic-box/kup-magic-box.js +3 -22
- package/dist/collection/components/kup-nav-bar/kup-nav-bar.js +2 -14
- package/dist/collection/components/kup-numeric-picker/kup-numeric-picker.js +11 -54
- package/dist/collection/components/kup-photo-frame/kup-photo-frame.js +7 -29
- package/dist/collection/components/kup-probe/kup-probe.js +11 -31
- package/dist/collection/components/kup-progress-bar/kup-progress-bar.js +3 -35
- package/dist/collection/components/kup-qlik/kup-qlik.js +4 -58
- package/dist/collection/components/kup-radio/kup-radio.js +3 -34
- package/dist/collection/components/kup-rating/kup-rating.js +4 -27
- package/dist/collection/components/kup-snackbar/kup-snackbar.js +3 -34
- package/dist/collection/components/kup-spinner/kup-spinner.js +3 -39
- package/dist/collection/components/kup-switch/kup-switch.js +3 -34
- package/dist/collection/components/kup-tab-bar/kup-tab-bar.js +4 -24
- package/dist/collection/components/kup-text-field/kup-text-field.js +2 -115
- package/dist/collection/components/kup-time-picker/kup-time-picker.js +8 -43
- package/dist/collection/components/kup-tree/kup-tree.js +39 -129
- package/dist/collection/f-components/f-cell/f-cell.js +1 -1
- package/dist/collection/managers/kup-data/kup-data-column-helper.js +4 -1
- package/dist/collection/managers/kup-language/kup-language-declarations.js +6 -0
- package/dist/collection/utils/kup-column-menu/kup-column-menu.js +1 -1
- package/dist/components/index.d.ts +68 -0
- package/dist/components/index.js +48 -0
- package/dist/components/kup-accordion.d.ts +11 -0
- package/dist/components/kup-accordion.js +363 -0
- package/dist/components/kup-autocomplete.d.ts +11 -0
- package/dist/components/kup-autocomplete.js +6 -0
- package/dist/components/kup-autocomplete2.js +45995 -0
- package/dist/components/kup-badge.d.ts +11 -0
- package/dist/components/kup-badge.js +6 -0
- package/dist/components/kup-box.d.ts +11 -0
- package/dist/components/kup-box.js +6 -0
- package/dist/components/kup-box2.js +1412 -0
- package/dist/components/kup-button-list.d.ts +11 -0
- package/dist/components/kup-button-list.js +6 -0
- package/dist/components/kup-button.d.ts +11 -0
- package/dist/components/kup-button.js +6 -0
- package/dist/components/kup-calendar.d.ts +11 -0
- package/dist/components/kup-calendar.js +14818 -0
- package/dist/components/kup-card.d.ts +11 -0
- package/dist/components/kup-card.js +6 -0
- package/dist/components/kup-cell.d.ts +11 -0
- package/dist/components/kup-cell.js +332 -0
- package/dist/components/kup-chart.d.ts +11 -0
- package/dist/components/kup-chart.js +6 -0
- package/dist/components/kup-checkbox.d.ts +11 -0
- package/dist/components/kup-checkbox.js +6 -0
- package/dist/components/kup-chip.d.ts +11 -0
- package/dist/components/kup-chip.js +6 -0
- package/dist/components/kup-color-picker.d.ts +11 -0
- package/dist/components/kup-color-picker.js +6 -0
- package/dist/components/kup-combobox.d.ts +11 -0
- package/dist/components/kup-combobox.js +6 -0
- package/dist/components/kup-dash-list.d.ts +11 -0
- package/dist/components/kup-dash-list.js +275 -0
- package/dist/components/kup-dash.d.ts +11 -0
- package/dist/components/kup-dash.js +6 -0
- package/dist/components/kup-dash2.js +223 -0
- package/dist/components/kup-dashboard.d.ts +11 -0
- package/dist/components/kup-dashboard.js +559 -0
- package/dist/components/kup-data-table.d.ts +11 -0
- package/dist/components/kup-data-table.js +6 -0
- package/dist/components/kup-date-picker.d.ts +11 -0
- package/dist/components/kup-date-picker.js +6 -0
- package/dist/components/kup-drawer.d.ts +11 -0
- package/dist/components/kup-drawer.js +303 -0
- package/dist/components/kup-dropdown-button.d.ts +11 -0
- package/dist/components/kup-dropdown-button.js +6 -0
- package/dist/components/kup-echart.d.ts +11 -0
- package/dist/components/kup-echart.js +6 -0
- package/dist/components/kup-echart2.js +94317 -0
- package/dist/components/kup-family-tree.d.ts +11 -0
- package/dist/components/kup-family-tree.js +623 -0
- package/dist/components/kup-form.d.ts +11 -0
- package/dist/components/kup-form.js +6 -0
- package/dist/components/kup-gauge.d.ts +11 -0
- package/dist/components/kup-gauge.js +6 -0
- package/dist/components/kup-grid.d.ts +11 -0
- package/dist/components/kup-grid.js +6 -0
- package/dist/components/kup-grid2.js +256 -0
- package/dist/components/kup-iframe.d.ts +11 -0
- package/dist/components/kup-iframe.js +257 -0
- package/dist/components/kup-image-list.d.ts +11 -0
- package/dist/components/kup-image-list.js +416 -0
- package/dist/components/kup-image.d.ts +11 -0
- package/dist/components/kup-image.js +6 -0
- package/dist/components/kup-lazy.d.ts +11 -0
- package/dist/components/kup-lazy.js +352 -0
- package/dist/components/kup-list.d.ts +11 -0
- package/dist/components/kup-list.js +6 -0
- package/dist/components/kup-magic-box.d.ts +11 -0
- package/dist/components/kup-magic-box.js +470 -0
- package/dist/components/kup-nav-bar.d.ts +11 -0
- package/dist/components/kup-nav-bar.js +292 -0
- package/dist/components/kup-numeric-picker.d.ts +11 -0
- package/dist/components/kup-numeric-picker.js +536 -0
- package/dist/components/kup-photo-frame.d.ts +11 -0
- package/dist/components/kup-photo-frame.js +308 -0
- package/dist/components/kup-probe.d.ts +11 -0
- package/dist/components/kup-probe.js +403 -0
- package/dist/components/kup-progress-bar.d.ts +11 -0
- package/dist/components/kup-progress-bar.js +6 -0
- package/dist/components/kup-qlik.d.ts +11 -0
- package/dist/components/kup-qlik.js +302 -0
- package/dist/components/kup-radio.d.ts +11 -0
- package/dist/components/kup-radio.js +6 -0
- package/dist/components/kup-rating.d.ts +11 -0
- package/dist/components/kup-rating.js +6 -0
- package/dist/components/kup-snackbar.d.ts +11 -0
- package/dist/components/kup-snackbar.js +272 -0
- package/dist/components/kup-spinner.d.ts +11 -0
- package/dist/components/kup-spinner.js +6 -0
- package/dist/components/kup-switch.d.ts +11 -0
- package/dist/components/kup-switch.js +6 -0
- package/dist/components/kup-tab-bar.d.ts +11 -0
- package/dist/components/kup-tab-bar.js +6 -0
- package/dist/components/kup-text-field.d.ts +11 -0
- package/dist/components/kup-text-field.js +6 -0
- package/dist/components/kup-time-picker.d.ts +11 -0
- package/dist/components/kup-time-picker.js +6 -0
- package/dist/components/kup-tree.d.ts +11 -0
- package/dist/components/kup-tree.js +6 -0
- package/dist/esm/{f-button-e79f7594.js → f-button-b902ad65.js} +1 -1
- package/dist/esm/{f-cell-9400374e.js → f-cell-b11d0d5d.js} +5 -5
- package/dist/esm/{f-chip-bf740287.js → f-chip-6b8cd306.js} +2 -2
- package/dist/esm/{f-image-ab3dc8cb.js → f-image-983805af.js} +1 -1
- package/dist/esm/{f-paginator-utils-6909e43b.js → f-paginator-utils-b22bec1f.js} +2 -2
- package/dist/esm/{f-text-field-4841dfea.js → f-text-field-3f9a7ba7.js} +1 -1
- package/dist/esm/ketchup.js +2 -2
- package/dist/esm/kup-accordion.entry.js +6 -29
- package/dist/esm/{kup-autocomplete_25.entry.js → kup-autocomplete_26.entry.js} +3790 -4303
- package/dist/esm/kup-box.entry.js +29 -110
- package/dist/esm/kup-calendar.entry.js +9 -33
- package/dist/esm/kup-cell.entry.js +8 -27
- package/dist/esm/kup-dash-list.entry.js +9 -8
- package/dist/esm/kup-dash_2.entry.js +6 -34
- package/dist/esm/kup-dashboard.entry.js +8 -30
- package/dist/esm/kup-drawer.entry.js +3 -18
- package/dist/esm/kup-echart.entry.js +15 -76
- package/dist/esm/kup-family-tree.entry.js +11 -47
- package/dist/esm/kup-iframe.entry.js +4 -16
- package/dist/esm/kup-image-list.entry.js +14 -32
- package/dist/esm/kup-lazy.entry.js +9 -36
- package/dist/esm/kup-magic-box.entry.js +5 -24
- package/dist/esm/{kup-manager-c54e6df5.js → kup-manager-a1976c1f.js} +71 -3
- package/dist/esm/kup-nav-bar.entry.js +3 -15
- package/dist/esm/kup-numeric-picker.entry.js +13 -56
- package/dist/esm/kup-photo-frame.entry.js +8 -30
- package/dist/esm/kup-probe.entry.js +12 -32
- package/dist/esm/kup-qlik.entry.js +5 -59
- package/dist/esm/kup-snackbar.entry.js +6 -37
- package/dist/esm/loader.js +2 -2
- package/dist/ketchup/ketchup.esm.js +1 -1
- package/dist/ketchup/{p-4a0ccf18.entry.js → p-0e34943f.entry.js} +1 -1
- package/dist/ketchup/p-1df3f4b3.js +30 -0
- package/dist/ketchup/p-1f1c3e90.entry.js +1 -0
- package/dist/ketchup/p-2f274bd1.entry.js +1 -0
- package/dist/ketchup/{p-e1d0ea71.js → p-34fb0757.js} +1 -1
- package/dist/ketchup/p-43d52a62.js +1 -0
- package/dist/ketchup/{p-4f0d3062.js → p-59a78bb2.js} +1 -1
- package/dist/ketchup/{p-bffaef6e.entry.js → p-5c6798dc.entry.js} +1 -1
- package/dist/ketchup/p-5d4503ff.entry.js +9 -0
- package/dist/ketchup/{p-182b869e.entry.js → p-6154123c.entry.js} +1 -1
- package/dist/ketchup/p-657eb6db.js +1 -0
- package/dist/ketchup/{p-30a63b85.entry.js → p-6686f614.entry.js} +1 -1
- package/dist/ketchup/p-67c86b4a.entry.js +1 -0
- package/dist/ketchup/{p-25bf0cb6.js → p-751a87a6.js} +1 -1
- package/dist/ketchup/{p-60fa0ccf.entry.js → p-7d223413.entry.js} +1 -1
- package/dist/ketchup/{p-7e7b6127.entry.js → p-8bed854e.entry.js} +1 -1
- package/dist/ketchup/{p-6bd57787.entry.js → p-9003c78d.entry.js} +1 -1
- package/dist/ketchup/{p-41620707.entry.js → p-913d78b8.entry.js} +1 -1
- package/dist/ketchup/{p-f9d5e553.entry.js → p-a4c30e9a.entry.js} +1 -1
- package/dist/ketchup/p-b2bb0feb.entry.js +1 -0
- package/dist/ketchup/{p-fb4d772a.entry.js → p-b8de542a.entry.js} +1 -1
- package/dist/ketchup/{p-2e184b57.entry.js → p-bb172702.entry.js} +1 -1
- package/dist/ketchup/{p-859163c2.entry.js → p-c1d3332f.entry.js} +1 -1
- package/dist/ketchup/{p-8e1fa7a8.entry.js → p-ca42bab6.entry.js} +2 -2
- package/dist/ketchup/{p-758d03f4.entry.js → p-ca723973.entry.js} +1 -1
- package/dist/ketchup/{p-5bea2971.js → p-f08ba5cd.js} +1 -1
- package/dist/ketchup/{p-313e376b.entry.js → p-fc1f1a63.entry.js} +2 -2
- package/dist/ketchup/{p-1f5c7f21.entry.js → p-fe4d6234.entry.js} +1 -1
- package/dist/types/components/kup-card/built-in/kup-card-built-in.d.ts +7 -2
- package/dist/types/components/kup-card/built-in/kup-card-form.d.ts +3 -0
- package/dist/types/components/kup-card/kup-card-declarations.d.ts +11 -1
- package/dist/types/components/kup-card/kup-card.d.ts +5 -0
- package/dist/types/components/kup-data-table/kup-data-table-declarations.d.ts +9 -0
- package/dist/types/components/kup-data-table/kup-data-table-state.d.ts +1 -1
- package/dist/types/components/kup-data-table/kup-data-table.d.ts +41 -202
- package/dist/types/components/kup-tree/kup-tree.d.ts +0 -1
- package/dist/types/components.d.ts +55 -2
- package/dist/types/managers/kup-data/kup-data-declarations.d.ts +1 -0
- package/dist/types/managers/kup-language/kup-language-declarations.d.ts +7 -1
- package/dist/types/managers/kup-theme/kup-theme-declarations.d.ts +1 -0
- package/dist/types/stencil-public-runtime.d.ts +5 -0
- package/package.json +2 -2
- package/dist/cjs/kup-form.cjs.entry.js +0 -486
- package/dist/esm/kup-form.entry.js +0 -482
- package/dist/ketchup/p-1dfd2a51.js +0 -30
- package/dist/ketchup/p-22ec1ba0.entry.js +0 -9
- package/dist/ketchup/p-260ff835.entry.js +0 -1
- package/dist/ketchup/p-53d3ae80.entry.js +0 -1
- package/dist/ketchup/p-6333388c.js +0 -1
- package/dist/ketchup/p-8386e3db.entry.js +0 -1
- package/dist/ketchup/p-90860d9e.entry.js +0 -1
- package/dist/ketchup/p-b7fdc7aa.entry.js +0 -1
- package/dist/ketchup/p-c35c5e05.js +0 -1
|
@@ -92,6 +92,7 @@ export interface KupThemeCSSVariables {
|
|
|
92
92
|
'--kup-font-family-monospace': string;
|
|
93
93
|
'--kup-obj-cursor': string;
|
|
94
94
|
[KupThemeColorValues.TEXT_ON_SECONDARY]: string;
|
|
95
|
+
'--kup-card-zindex': number;
|
|
95
96
|
'--kup-drawer-zindex': number;
|
|
96
97
|
'--kup-navbar-zindex': number;
|
|
97
98
|
}
|
|
@@ -223,6 +223,7 @@ export declare const setMode: (handler: ResolutionHandler) => void;
|
|
|
223
223
|
/**
|
|
224
224
|
* `getMode()` is used for libraries which provide multiple "modes" for styles.
|
|
225
225
|
* @param ref a reference to the node to get styles for
|
|
226
|
+
* @returns the current mode or undefined, if not found
|
|
226
227
|
*/
|
|
227
228
|
export declare function getMode<T = string | undefined>(ref: any): T;
|
|
228
229
|
export declare function setPlatformHelpers(helpers: {
|
|
@@ -237,6 +238,7 @@ export declare function setPlatformHelpers(helpers: {
|
|
|
237
238
|
* if the path needs to be customized.
|
|
238
239
|
* @param path the path to use in calculating the asset path. this value will be
|
|
239
240
|
* used in conjunction with the base asset path
|
|
241
|
+
* @returns the base path
|
|
240
242
|
*/
|
|
241
243
|
export declare function getAssetPath(path: string): string;
|
|
242
244
|
/**
|
|
@@ -252,11 +254,13 @@ export declare function getAssetPath(path: string): string;
|
|
|
252
254
|
* bundling, and where your assets can be loaded from. Additionally custom bundling
|
|
253
255
|
* will have to ensure the static assets are copied to its build directory.
|
|
254
256
|
* @param path the asset path to set
|
|
257
|
+
* @returns the set path
|
|
255
258
|
*/
|
|
256
259
|
export declare function setAssetPath(path: string): string;
|
|
257
260
|
/**
|
|
258
261
|
* Retrieve a Stencil element for a given reference
|
|
259
262
|
* @param ref the ref to get the Stencil element for
|
|
263
|
+
* @returns a reference to the element
|
|
260
264
|
*/
|
|
261
265
|
export declare function getElement(ref: any): HTMLStencilElement;
|
|
262
266
|
/**
|
|
@@ -269,6 +273,7 @@ export declare function getElement(ref: any): HTMLStencilElement;
|
|
|
269
273
|
export declare function forceUpdate(ref: any): void;
|
|
270
274
|
/**
|
|
271
275
|
* getRenderingRef
|
|
276
|
+
* @returns the rendering ref
|
|
272
277
|
*/
|
|
273
278
|
export declare function getRenderingRef(): any;
|
|
274
279
|
export interface HTMLStencilElement extends HTMLElement {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sme.up/ketchup",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.9.0-SNAPSHOT",
|
|
4
4
|
"keywords": [
|
|
5
5
|
"smeup",
|
|
6
6
|
"KetchUP",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"vanilla-picker": "^2.12.1"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
|
-
"@stencil/core": "^2.
|
|
59
|
+
"@stencil/core": "^2.20.0",
|
|
60
60
|
"@stencil/sass": "^1.4.1",
|
|
61
61
|
"@stencil/react-output-target": "0.3.1",
|
|
62
62
|
"@types/d3-shape": "^3.0.2",
|
|
@@ -1,486 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
const index = require('./index-ffdb46f6.js');
|
|
6
|
-
const kupManager = require('./kup-manager-0e38bf48.js');
|
|
7
|
-
const GenericVariables = require('./GenericVariables-a9ed17ee.js');
|
|
8
|
-
const fCell = require('./f-cell-b7a1524a.js');
|
|
9
|
-
const fTextFieldMdc = require('./f-text-field-mdc-85997738.js');
|
|
10
|
-
const fButton = require('./f-button-bf76ab95.js');
|
|
11
|
-
require('./f-checkbox-1097ca5d.js');
|
|
12
|
-
require('./f-text-field-48b8bb16.js');
|
|
13
|
-
require('./f-image-d80a2749.js');
|
|
14
|
-
require('./f-chip-a5e100b1.js');
|
|
15
|
-
require('./tslib.es6-0ee02c67.js');
|
|
16
|
-
require('./component-72a5b626.js');
|
|
17
|
-
require('./f-button-declarations-b611587f.js');
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* Props of the kup-form component.
|
|
21
|
-
* Used to export every prop in an object.
|
|
22
|
-
*/
|
|
23
|
-
var KupFormProps;
|
|
24
|
-
(function (KupFormProps) {
|
|
25
|
-
KupFormProps["customStyle"] = "Custom style of the component.";
|
|
26
|
-
KupFormProps["data"] = "Actual data of the form.";
|
|
27
|
-
KupFormProps["hiddenSubmitButton"] = "Creates a hidden submit button in order to submit the form with enter.";
|
|
28
|
-
KupFormProps["layout"] = "How the form will arrange its content.";
|
|
29
|
-
})(KupFormProps || (KupFormProps = {}));
|
|
30
|
-
var KupFormLabelAlignment;
|
|
31
|
-
(function (KupFormLabelAlignment) {
|
|
32
|
-
KupFormLabelAlignment["CENTER"] = "center";
|
|
33
|
-
KupFormLabelAlignment["LEFT"] = "left";
|
|
34
|
-
KupFormLabelAlignment["RIGHT"] = "right";
|
|
35
|
-
})(KupFormLabelAlignment || (KupFormLabelAlignment = {}));
|
|
36
|
-
var KupFormLabelPlacement;
|
|
37
|
-
(function (KupFormLabelPlacement) {
|
|
38
|
-
KupFormLabelPlacement["BOTTOM"] = "bottom";
|
|
39
|
-
KupFormLabelPlacement["LEFT"] = "left";
|
|
40
|
-
KupFormLabelPlacement["HIDDEN"] = "hidden";
|
|
41
|
-
KupFormLabelPlacement["PLACEHOLDER"] = "placeholder";
|
|
42
|
-
KupFormLabelPlacement["RIGHT"] = "right";
|
|
43
|
-
KupFormLabelPlacement["TOP"] = "top";
|
|
44
|
-
})(KupFormLabelPlacement || (KupFormLabelPlacement = {}));
|
|
45
|
-
|
|
46
|
-
const kupFormCss = ":host{--kup_form_background_color:var(\n --kup-form-background-color,\n var(--kup-background-color)\n );--kup_form_color:var(--kup-form-color, var(--kup-text-color));--kup_form_font_family:var(--kup-form-font-family, var(--kup-font-family));--kup_form_font_size:var(--kup-form-font-size, var(--kup-font-size));--kup_form_label_alignment:var(--kup-form-label-alignment);--kup_form_label_width:var(--kup-form-label-width);display:block;font-family:var(--kup_form_font_family);font-size:var(--kup_form_font_size)}.form{background:var(--kup_form_background_color);color:var(--kup_form_color);display:flex;flex-grow:1;overflow:auto;padding:1em 0;position:relative}.form--column{flex-direction:column}.form__section{display:flex;flex:1 1 1%;flex-direction:row;flex-wrap:wrap}.form__section--column{flex-direction:column;flex-wrap:unset}.form__section--column>.form__section{flex:0 0 auto}.form__section--grid{display:grid}.form__section--titled{border:1px solid var(--kup-border-color);padding-top:5px;position:relative;margin:10px}.form__section--titled>h3{background:var(--kup-background-color);font-size:calc(var(--kup-font-size) * 1.15);position:absolute;margin:0px;padding:0 8px;top:-11px;left:5px;transition:background-color 0.25s ease}.form__section--left .form__label{width:var(--kup_form_label_width, 0)}.form__section--right .form__field{min-width:200px;width:0}.form__label{-webkit-font-smoothing:antialiased;box-sizing:border-box;font-size:0.875em;letter-spacing:0.0178571429em;white-space:nowrap;width:var(--kup_form_label_width)}.form__label--center{text-align:var(--kup_form_label_alignment, center)}.form__label--left{text-align:var(--kup_form_label_alignment, left)}.form__label--right{text-align:var(--kup_form_label_alignment, right)}.form__field{min-height:16px}.form__field img{height:auto}.form__submit{height:0;opacity:0;overflow:hidden;position:absolute;width:0}.form .f-cell.c-right-aligned:not(.c-centered) .f-cell__content{justify-content:flex-start}";
|
|
47
|
-
|
|
48
|
-
const dom = document.documentElement;
|
|
49
|
-
const KupForm = class {
|
|
50
|
-
constructor(hostRef) {
|
|
51
|
-
index.registerInstance(this, hostRef);
|
|
52
|
-
/*-------------------------------------------------*/
|
|
53
|
-
/* P r o p s */
|
|
54
|
-
/*-------------------------------------------------*/
|
|
55
|
-
/**
|
|
56
|
-
* Custom style of the component.
|
|
57
|
-
* @default ""
|
|
58
|
-
* @see https://ketchup.smeup.com/ketchup-showcase/#/customization
|
|
59
|
-
*/
|
|
60
|
-
this.customStyle = '';
|
|
61
|
-
/**
|
|
62
|
-
* Actual data of the form.
|
|
63
|
-
* @default null
|
|
64
|
-
*/
|
|
65
|
-
this.data = null;
|
|
66
|
-
/**
|
|
67
|
-
* Creates a hidden submit button in order to submit the form with enter.
|
|
68
|
-
* @default false
|
|
69
|
-
*/
|
|
70
|
-
this.hiddenSubmitButton = false;
|
|
71
|
-
/**
|
|
72
|
-
* How the form will arrange its content.
|
|
73
|
-
* @default null
|
|
74
|
-
*/
|
|
75
|
-
this.layout = null;
|
|
76
|
-
/*-------------------------------------------------*/
|
|
77
|
-
/* I n t e r n a l V a r i a b l e s */
|
|
78
|
-
/*-------------------------------------------------*/
|
|
79
|
-
this.kupManager = kupManager.kupManagerInstance();
|
|
80
|
-
this.visibleColumns = [];
|
|
81
|
-
}
|
|
82
|
-
/*-------------------------------------------------*/
|
|
83
|
-
/* W a t c h e r s */
|
|
84
|
-
/*-------------------------------------------------*/
|
|
85
|
-
onDataChanged() {
|
|
86
|
-
kupManager.identify(this.getRows());
|
|
87
|
-
this.initVisibleColumns();
|
|
88
|
-
this.checkLayout();
|
|
89
|
-
}
|
|
90
|
-
onLayoutChanged() {
|
|
91
|
-
this.checkLayout();
|
|
92
|
-
}
|
|
93
|
-
/*-------------------------------------------------*/
|
|
94
|
-
/* P u b l i c M e t h o d s */
|
|
95
|
-
/*-------------------------------------------------*/
|
|
96
|
-
/**
|
|
97
|
-
* Used to retrieve component's props values.
|
|
98
|
-
* @param {boolean} descriptions - When provided and true, the result will be the list of props with their description.
|
|
99
|
-
* @returns {Promise<GenericObject>} List of props as object, each key will be a prop.
|
|
100
|
-
*/
|
|
101
|
-
async getProps(descriptions) {
|
|
102
|
-
return kupManager.getProps(this, KupFormProps, descriptions);
|
|
103
|
-
}
|
|
104
|
-
/**
|
|
105
|
-
* This method is used to trigger a new render of the component.
|
|
106
|
-
*/
|
|
107
|
-
async refresh() {
|
|
108
|
-
index.forceUpdate(this);
|
|
109
|
-
}
|
|
110
|
-
/**
|
|
111
|
-
* Sets the focus on an editable table cell.
|
|
112
|
-
* @param {string} column - Name of the column.
|
|
113
|
-
* @param {string} rowId - Id of the row.
|
|
114
|
-
*/
|
|
115
|
-
async setFocus(column, rowId) {
|
|
116
|
-
const cells = this.rootElement.shadowRoot.querySelectorAll('td[data-column="' + column + '"]');
|
|
117
|
-
for (let index = 0; cells && index < cells.length; index++) {
|
|
118
|
-
const cell = cells[index];
|
|
119
|
-
if (cell['data-row'] && cell['data-row'].id == rowId) {
|
|
120
|
-
const input = cell.querySelector('input');
|
|
121
|
-
if (input) {
|
|
122
|
-
input.focus();
|
|
123
|
-
}
|
|
124
|
-
else {
|
|
125
|
-
const kupInput = cell.querySelector('.hydrated');
|
|
126
|
-
if (kupInput) {
|
|
127
|
-
try {
|
|
128
|
-
kupInput.setFocus();
|
|
129
|
-
}
|
|
130
|
-
catch (error) { }
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
/**
|
|
137
|
-
* Sets the props to the component.
|
|
138
|
-
* @param {GenericObject} props - Object containing props that will be set to the component.
|
|
139
|
-
*/
|
|
140
|
-
async setProps(props) {
|
|
141
|
-
kupManager.setProps(this, KupFormProps, props);
|
|
142
|
-
}
|
|
143
|
-
/*-------------------------------------------------*/
|
|
144
|
-
/* P r i v a t e M e t h o d s */
|
|
145
|
-
/*-------------------------------------------------*/
|
|
146
|
-
getColumns() {
|
|
147
|
-
return this.data && this.data.columns
|
|
148
|
-
? this.data.columns
|
|
149
|
-
: [{ title: '', name: '', size: undefined }];
|
|
150
|
-
}
|
|
151
|
-
initVisibleColumns() {
|
|
152
|
-
this.visibleColumns = this.getColumns().filter((column) => {
|
|
153
|
-
if (column.hasOwnProperty('visible')) {
|
|
154
|
-
return column.visible;
|
|
155
|
-
}
|
|
156
|
-
return true;
|
|
157
|
-
});
|
|
158
|
-
}
|
|
159
|
-
getRows() {
|
|
160
|
-
return this.data && this.data.rows ? this.data.rows : [];
|
|
161
|
-
}
|
|
162
|
-
checkLayout() {
|
|
163
|
-
if (this.layout) {
|
|
164
|
-
this.formLayout = this.layout;
|
|
165
|
-
return;
|
|
166
|
-
}
|
|
167
|
-
const section = {
|
|
168
|
-
horizontal: false,
|
|
169
|
-
sections: [],
|
|
170
|
-
};
|
|
171
|
-
const visibleColumns = this.visibleColumns;
|
|
172
|
-
let size = visibleColumns.length;
|
|
173
|
-
const content = [];
|
|
174
|
-
let cnt = 0;
|
|
175
|
-
while (size-- > 0) {
|
|
176
|
-
content.push({
|
|
177
|
-
column: visibleColumns[cnt++].name,
|
|
178
|
-
});
|
|
179
|
-
}
|
|
180
|
-
section.content = content;
|
|
181
|
-
this.formLayout = {
|
|
182
|
-
sections: [section],
|
|
183
|
-
};
|
|
184
|
-
}
|
|
185
|
-
renderRow(row) {
|
|
186
|
-
const visibleColumns = [...this.visibleColumns];
|
|
187
|
-
let formContent = null;
|
|
188
|
-
let rowLayout = row.layout;
|
|
189
|
-
if (!rowLayout) {
|
|
190
|
-
rowLayout = this.formLayout;
|
|
191
|
-
}
|
|
192
|
-
let horizontal = false;
|
|
193
|
-
if (rowLayout) {
|
|
194
|
-
if (rowLayout.horizontal) {
|
|
195
|
-
horizontal = true;
|
|
196
|
-
}
|
|
197
|
-
const sections = rowLayout.sections;
|
|
198
|
-
let size = sections.length;
|
|
199
|
-
let cnt = 0;
|
|
200
|
-
if (size > 0) {
|
|
201
|
-
formContent = [];
|
|
202
|
-
}
|
|
203
|
-
const parent = {
|
|
204
|
-
horizontal: horizontal,
|
|
205
|
-
};
|
|
206
|
-
while (size-- > 0) {
|
|
207
|
-
formContent.push(this.renderSection(sections[cnt++], parent, row, visibleColumns));
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
const classObj = {
|
|
211
|
-
form: true,
|
|
212
|
-
'form--column': !horizontal,
|
|
213
|
-
};
|
|
214
|
-
return (index.h("form", { class: classObj, name: this.rootElement.id }, formContent, this.hiddenSubmitButton ? (index.h(fButton.FButton, { buttonType: "submit", label: "submit", wrapperClass: "form__submit" })) : null));
|
|
215
|
-
}
|
|
216
|
-
renderSection(section, parent, row, visibleColumns) {
|
|
217
|
-
var _a;
|
|
218
|
-
let sectionContent = null;
|
|
219
|
-
if (section.sections && section.sections.length > 0) {
|
|
220
|
-
const sections = section.sections;
|
|
221
|
-
let size = sections.length;
|
|
222
|
-
let cnt = 0;
|
|
223
|
-
if (size > 0) {
|
|
224
|
-
sectionContent = [];
|
|
225
|
-
}
|
|
226
|
-
while (size-- > 0) {
|
|
227
|
-
sectionContent.push(this.renderSection(sections[cnt++], section, row, visibleColumns));
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
else if (section.content) {
|
|
231
|
-
const content = section.content;
|
|
232
|
-
let size = content.length;
|
|
233
|
-
let cnt = 0;
|
|
234
|
-
if (size > 0) {
|
|
235
|
-
sectionContent = [];
|
|
236
|
-
}
|
|
237
|
-
while (size-- > 0) {
|
|
238
|
-
const formField = this.renderFormField({
|
|
239
|
-
formField: content[cnt++],
|
|
240
|
-
row,
|
|
241
|
-
visibleColumns,
|
|
242
|
-
}, section);
|
|
243
|
-
let field = formField;
|
|
244
|
-
if (!section.horizontal) {
|
|
245
|
-
field = index.h("tr", null, formField);
|
|
246
|
-
}
|
|
247
|
-
sectionContent.push(field);
|
|
248
|
-
}
|
|
249
|
-
}
|
|
250
|
-
else if (visibleColumns.length > 0) {
|
|
251
|
-
const column = visibleColumns[0];
|
|
252
|
-
sectionContent = this.renderFormField({
|
|
253
|
-
formField: { column: column.name },
|
|
254
|
-
row,
|
|
255
|
-
visibleColumns,
|
|
256
|
-
});
|
|
257
|
-
}
|
|
258
|
-
const isGrid = !!section.columns;
|
|
259
|
-
const labelPlacement = ((_a = section === null || section === void 0 ? void 0 : section.label) === null || _a === void 0 ? void 0 : _a.placement) || KupFormLabelPlacement.LEFT;
|
|
260
|
-
const sectionClass = {
|
|
261
|
-
form__section: true,
|
|
262
|
-
'form__section--column': !isGrid && !section.horizontal,
|
|
263
|
-
'form__section--grid': isGrid,
|
|
264
|
-
'form__section--titled': !!section.title,
|
|
265
|
-
'form__section--last': !section.sections || section.sections.length === 0,
|
|
266
|
-
[`form__section--${labelPlacement}`]: true,
|
|
267
|
-
};
|
|
268
|
-
const sectionStyle = section.style || {};
|
|
269
|
-
if (section.dim && parent) {
|
|
270
|
-
sectionStyle.flex = `0 0 ${section.dim}`;
|
|
271
|
-
if (parent.horizontal) {
|
|
272
|
-
sectionStyle.maxWidth = section.dim;
|
|
273
|
-
}
|
|
274
|
-
else {
|
|
275
|
-
sectionStyle.maxHeight = section.dim;
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
|
-
if (isGrid) {
|
|
279
|
-
sectionStyle['grid-template-columns'] = `repeat(${section.columns}, 1fr)`;
|
|
280
|
-
}
|
|
281
|
-
return (index.h("div", { class: sectionClass, style: sectionStyle }, section.title ? index.h("h3", null, section.title) : null, index.h("table", null, index.h("tbody", null, section.horizontal ? (index.h("tr", null, sectionContent)) : (sectionContent)))));
|
|
282
|
-
}
|
|
283
|
-
renderFormField({ formField, row, visibleColumns, }, section) {
|
|
284
|
-
var _a;
|
|
285
|
-
const classObj = {
|
|
286
|
-
form__field: true,
|
|
287
|
-
};
|
|
288
|
-
const styleObj = {};
|
|
289
|
-
let column = null;
|
|
290
|
-
let index$1 = -1;
|
|
291
|
-
for (let i = 0; i < visibleColumns.length; i++) {
|
|
292
|
-
const c = visibleColumns[i];
|
|
293
|
-
if (c.name === formField.column) {
|
|
294
|
-
index$1 = i;
|
|
295
|
-
break;
|
|
296
|
-
}
|
|
297
|
-
}
|
|
298
|
-
if (index$1 >= 0) {
|
|
299
|
-
column = visibleColumns[index$1];
|
|
300
|
-
visibleColumns.splice(index$1, 1);
|
|
301
|
-
}
|
|
302
|
-
else if (section) {
|
|
303
|
-
column = this.data.columns.find((x) => x.name === formField.column);
|
|
304
|
-
}
|
|
305
|
-
const cell = row.cells[formField.column];
|
|
306
|
-
let title = undefined;
|
|
307
|
-
if (cell) {
|
|
308
|
-
cell.isEditable = true;
|
|
309
|
-
if (!this.kupManager.objects.isEmptyKupObj(cell.obj)) {
|
|
310
|
-
if (this.kupManager.debug.isDebug()) {
|
|
311
|
-
title =
|
|
312
|
-
cell.obj.t +
|
|
313
|
-
'; ' +
|
|
314
|
-
cell.obj.p +
|
|
315
|
-
'; ' +
|
|
316
|
-
cell.obj.k +
|
|
317
|
-
';';
|
|
318
|
-
}
|
|
319
|
-
}
|
|
320
|
-
}
|
|
321
|
-
else {
|
|
322
|
-
return null;
|
|
323
|
-
}
|
|
324
|
-
const cellProps = {
|
|
325
|
-
cell: cell,
|
|
326
|
-
column: column,
|
|
327
|
-
component: this,
|
|
328
|
-
editable: true,
|
|
329
|
-
renderKup: true,
|
|
330
|
-
row: row,
|
|
331
|
-
setSizes: true,
|
|
332
|
-
shape: formField.shape,
|
|
333
|
-
};
|
|
334
|
-
const label = formField.label || column.title;
|
|
335
|
-
resetLabel();
|
|
336
|
-
switch ((_a = section.label) === null || _a === void 0 ? void 0 : _a.placement) {
|
|
337
|
-
case KupFormLabelPlacement.BOTTOM:
|
|
338
|
-
return [index.h("tr", null, fieldCell()), index.h("tr", null, labelCell(label))];
|
|
339
|
-
case KupFormLabelPlacement.PLACEHOLDER:
|
|
340
|
-
setPlaceholderLabel();
|
|
341
|
-
case KupFormLabelPlacement.HIDDEN: {
|
|
342
|
-
if (section) {
|
|
343
|
-
return [fieldCell()];
|
|
344
|
-
}
|
|
345
|
-
else {
|
|
346
|
-
return [index.h("tr", null, fieldCell())];
|
|
347
|
-
}
|
|
348
|
-
}
|
|
349
|
-
case KupFormLabelPlacement.RIGHT: {
|
|
350
|
-
if (section) {
|
|
351
|
-
return [fieldCell(), labelCell(label)];
|
|
352
|
-
}
|
|
353
|
-
else {
|
|
354
|
-
return [
|
|
355
|
-
index.h("tr", null, fieldCell(), labelCell(label)),
|
|
356
|
-
];
|
|
357
|
-
}
|
|
358
|
-
}
|
|
359
|
-
case KupFormLabelPlacement.TOP:
|
|
360
|
-
return [index.h("tr", null, labelCell(label)), index.h("tr", null, fieldCell())];
|
|
361
|
-
default: {
|
|
362
|
-
if (section) {
|
|
363
|
-
return [labelCell(label), fieldCell()];
|
|
364
|
-
}
|
|
365
|
-
else {
|
|
366
|
-
return [
|
|
367
|
-
index.h("tr", null, labelCell(label), fieldCell()),
|
|
368
|
-
];
|
|
369
|
-
}
|
|
370
|
-
}
|
|
371
|
-
}
|
|
372
|
-
function fieldCell() {
|
|
373
|
-
return (index.h("td", { "data-cell": cell, "data-row": row, "data-column": formField.column, class: classObj, style: styleObj, title: title }, cell && column ? (index.h(fCell.FCell, Object.assign({}, cellProps))) : (index.h("span", null, formField.value))));
|
|
374
|
-
}
|
|
375
|
-
function labelCell(label) {
|
|
376
|
-
var _a, _b, _c;
|
|
377
|
-
const alignment = ((_a = section === null || section === void 0 ? void 0 : section.label) === null || _a === void 0 ? void 0 : _a.alignment) || KupFormLabelAlignment.LEFT;
|
|
378
|
-
const style = {
|
|
379
|
-
width: ((_b = section === null || section === void 0 ? void 0 : section.label) === null || _b === void 0 ? void 0 : _b.width) ? (_c = section === null || section === void 0 ? void 0 : section.label) === null || _c === void 0 ? void 0 : _c.width : '',
|
|
380
|
-
};
|
|
381
|
-
return (index.h("td", { class: `form__label form__label--${alignment}`, style: style }, index.h("span", null, label)));
|
|
382
|
-
}
|
|
383
|
-
function resetLabel() {
|
|
384
|
-
if (!cell.data) {
|
|
385
|
-
cell.data = {};
|
|
386
|
-
}
|
|
387
|
-
try {
|
|
388
|
-
delete cell.data.label;
|
|
389
|
-
}
|
|
390
|
-
catch (_a) { }
|
|
391
|
-
try {
|
|
392
|
-
delete cell.data.data['kup-text-field'].label;
|
|
393
|
-
}
|
|
394
|
-
catch (_b) { }
|
|
395
|
-
}
|
|
396
|
-
function setPlaceholderLabel() {
|
|
397
|
-
switch (dom.ketchup.data.cell.getType(cell, cell.shape || column.shape || null)) {
|
|
398
|
-
case kupManager.FCellTypes.AUTOCOMPLETE:
|
|
399
|
-
case kupManager.FCellTypes.COLOR_PICKER:
|
|
400
|
-
case kupManager.FCellTypes.COMBOBOX:
|
|
401
|
-
case kupManager.FCellTypes.DATE:
|
|
402
|
-
case kupManager.FCellTypes.DATETIME:
|
|
403
|
-
case kupManager.FCellTypes.TIME:
|
|
404
|
-
if (cell.data.data) {
|
|
405
|
-
if (cell.data.data['kup-text-field']) {
|
|
406
|
-
cell.data.data['kup-text-field'].label =
|
|
407
|
-
column.title;
|
|
408
|
-
}
|
|
409
|
-
else {
|
|
410
|
-
cell.data.data = {
|
|
411
|
-
'kup-text-field': {
|
|
412
|
-
label: column.title,
|
|
413
|
-
},
|
|
414
|
-
};
|
|
415
|
-
}
|
|
416
|
-
}
|
|
417
|
-
else {
|
|
418
|
-
cell.data.data = {
|
|
419
|
-
'kup-text-field': {
|
|
420
|
-
label: column.title,
|
|
421
|
-
},
|
|
422
|
-
};
|
|
423
|
-
}
|
|
424
|
-
break;
|
|
425
|
-
case kupManager.FCellTypes.CHECKBOX:
|
|
426
|
-
case kupManager.FCellTypes.NUMBER:
|
|
427
|
-
case kupManager.FCellTypes.STRING:
|
|
428
|
-
case kupManager.FCellTypes.SWITCH:
|
|
429
|
-
cell.data.label = column.title;
|
|
430
|
-
}
|
|
431
|
-
}
|
|
432
|
-
}
|
|
433
|
-
/*-------------------------------------------------*/
|
|
434
|
-
/* L i f e c y c l e H o o k s */
|
|
435
|
-
/*-------------------------------------------------*/
|
|
436
|
-
componentWillLoad() {
|
|
437
|
-
this.kupManager.debug.logLoad(this, false);
|
|
438
|
-
this.kupManager.language.register(this);
|
|
439
|
-
this.kupManager.theme.register(this);
|
|
440
|
-
this.onDataChanged();
|
|
441
|
-
}
|
|
442
|
-
componentDidLoad() {
|
|
443
|
-
this.kupManager.debug.logLoad(this, true);
|
|
444
|
-
}
|
|
445
|
-
componentWillRender() {
|
|
446
|
-
this.kupManager.debug.logRender(this, false);
|
|
447
|
-
}
|
|
448
|
-
componentDidRender() {
|
|
449
|
-
const root = this.rootElement.shadowRoot;
|
|
450
|
-
if (root) {
|
|
451
|
-
const fs = root.querySelectorAll('.f-text-field');
|
|
452
|
-
for (let index = 0; index < fs.length; index++) {
|
|
453
|
-
fTextFieldMdc.FTextFieldMDC(fs[index]);
|
|
454
|
-
}
|
|
455
|
-
}
|
|
456
|
-
this.kupManager.debug.logRender(this, true);
|
|
457
|
-
}
|
|
458
|
-
render() {
|
|
459
|
-
let formContent = null;
|
|
460
|
-
if (this.data.rows.length === 0) {
|
|
461
|
-
formContent = (index.h("p", null, this.kupManager.language.translate(kupManager.KupLanguageGeneric.EMPTY_DATA)));
|
|
462
|
-
}
|
|
463
|
-
else {
|
|
464
|
-
const rows = this.data.rows;
|
|
465
|
-
let size = rows.length;
|
|
466
|
-
let cnt = 0;
|
|
467
|
-
formContent = [];
|
|
468
|
-
while (size-- > 0) {
|
|
469
|
-
formContent.push(this.renderRow(rows[cnt++]));
|
|
470
|
-
}
|
|
471
|
-
}
|
|
472
|
-
return (index.h(index.Host, null, index.h("style", null, this.kupManager.theme.setKupStyle(this.rootElement)), index.h("div", { id: GenericVariables.componentWrapperId }, formContent)));
|
|
473
|
-
}
|
|
474
|
-
disconnectedCallback() {
|
|
475
|
-
this.kupManager.language.unregister(this);
|
|
476
|
-
this.kupManager.theme.unregister(this);
|
|
477
|
-
}
|
|
478
|
-
get rootElement() { return index.getElement(this); }
|
|
479
|
-
static get watchers() { return {
|
|
480
|
-
"data": ["onDataChanged"],
|
|
481
|
-
"layout": ["onLayoutChanged"]
|
|
482
|
-
}; }
|
|
483
|
-
};
|
|
484
|
-
KupForm.style = kupFormCss;
|
|
485
|
-
|
|
486
|
-
exports.kup_form = KupForm;
|