@sme.up/ketchup 6.1.0-SNAPSHOT → 6.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{f-button-ac179257.js → f-button-94cb5f35.js} +4 -4
- package/dist/cjs/f-cell-76830a0d.js +416 -0
- package/dist/cjs/f-checkbox-cd977193.js +29 -0
- package/dist/cjs/{f-chip-b00897d7.js → f-chip-68d45fd3.js} +3 -3
- package/dist/cjs/{f-image-89f25556.js → f-image-0e71df7e.js} +2 -2
- package/dist/cjs/{f-paginator-utils-8fa501b3.js → f-paginator-utils-46689c0a.js} +80 -403
- package/dist/cjs/{f-text-field-e1e45ade.js → f-text-field-b4229cef.js} +11 -3
- package/dist/cjs/{index-eb556444.js → index-31125378.js} +15 -8
- package/dist/cjs/ketchup.cjs.js +3 -3
- package/dist/cjs/kup-accordion.cjs.entry.js +5 -6
- package/dist/cjs/kup-autocomplete_25.cjs.entry.js +331 -299
- package/dist/cjs/kup-box.cjs.entry.js +1304 -0
- package/dist/cjs/kup-calendar.cjs.entry.js +9 -11
- package/dist/cjs/kup-cell.cjs.entry.js +10 -11
- package/dist/cjs/kup-dash-list.cjs.entry.js +5 -7
- package/dist/cjs/kup-dash_2.cjs.entry.js +5 -9
- package/dist/cjs/kup-dashboard.cjs.entry.js +438 -0
- package/dist/cjs/kup-drawer.cjs.entry.js +5 -6
- package/dist/cjs/{kup-box_2.cjs.entry.js → kup-echart.cjs.entry.js} +66 -1353
- package/dist/cjs/kup-family-tree.cjs.entry.js +486 -0
- package/dist/cjs/kup-form.cjs.entry.js +478 -0
- package/dist/cjs/kup-iframe.cjs.entry.js +4 -5
- package/dist/cjs/kup-image-list.cjs.entry.js +73 -13
- package/dist/cjs/kup-lazy.cjs.entry.js +5 -6
- package/dist/cjs/kup-magic-box.cjs.entry.js +5 -6
- package/dist/cjs/{kup-manager-7a941909.js → kup-manager-7c514a30.js} +1787 -356
- package/dist/cjs/kup-nav-bar.cjs.entry.js +4 -5
- package/dist/cjs/kup-numeric-picker.cjs.entry.js +3 -3
- package/dist/cjs/kup-photo-frame.cjs.entry.js +6 -7
- package/dist/cjs/kup-probe.cjs.entry.js +2 -2
- package/dist/cjs/kup-qlik.cjs.entry.js +2 -2
- package/dist/cjs/kup-snackbar.cjs.entry.js +6 -7
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/collection/assets/dashboard.js +161 -0
- package/dist/collection/assets/data-table.js +59 -0
- package/dist/collection/assets/family-tree.js +2654 -0
- package/dist/collection/assets/form.js +433 -0
- package/dist/collection/assets/grid.js +17 -0
- package/dist/collection/assets/index.js +18 -6
- package/dist/collection/assets/kupinteract.js +68 -0
- package/dist/collection/collection-manifest.json +8 -7
- package/dist/collection/components/kup-autocomplete/kup-autocomplete.js +135 -129
- package/dist/collection/components/kup-box/kup-box.js +13 -2
- package/dist/collection/components/kup-button/kup-button.js +1 -0
- package/dist/collection/components/kup-combobox/kup-combobox.js +16 -13
- package/dist/collection/components/kup-dashboard/kup-dashboard-declarations.js +10 -0
- package/dist/collection/components/{kup-form-editor/kup-form-editor.css → kup-dashboard/kup-dashboard.css} +14 -6
- package/dist/collection/components/{kup-form-editor/kup-form-editor.js → kup-dashboard/kup-dashboard.js} +211 -152
- package/dist/collection/components/kup-data-table/kup-data-table-helper.js +42 -30
- package/dist/collection/components/kup-data-table/kup-data-table-state.js +1 -1
- package/dist/collection/components/kup-data-table/kup-data-table.js +7 -6
- package/dist/collection/components/kup-drawer/kup-drawer.css +5 -8
- package/dist/collection/components/kup-dropdown-button/kup-dropdown-button.js +1 -0
- package/dist/collection/components/kup-echart/kup-echart.js +9 -9
- package/dist/collection/components/kup-family-tree/kup-family-tree-declarations.js +14 -0
- package/dist/collection/components/kup-family-tree/kup-family-tree.css +171 -0
- package/dist/collection/components/kup-family-tree/kup-family-tree.js +854 -0
- package/dist/collection/components/kup-form/kup-form-declarations.js +25 -0
- package/dist/collection/components/kup-form/kup-form.css +99 -0
- package/dist/collection/components/kup-form/kup-form.js +647 -0
- package/dist/collection/components/kup-grid/kup-grid.js +1 -4
- package/dist/collection/components/kup-image-list/kup-image-list-state.js +9 -0
- package/dist/collection/components/kup-image-list/kup-image-list.css +0 -6
- package/dist/collection/components/kup-image-list/kup-image-list.js +113 -1
- package/dist/collection/components/kup-lazy/kup-lazy.css +13 -6
- package/dist/collection/components/kup-list/kup-list-helper.js +9 -3
- package/dist/collection/components/kup-photo-frame/kup-photo-frame.css +13 -3
- package/dist/collection/components/kup-photo-frame/kup-photo-frame.js +1 -1
- package/dist/collection/components/kup-text-field/kup-text-field-declarations.js +4 -0
- package/dist/collection/components/kup-text-field/kup-text-field.js +54 -0
- package/dist/collection/components/kup-time-picker/kup-time-picker.js +0 -6
- package/dist/collection/components/kup-tree/kup-tree.js +26 -9
- package/dist/collection/f-components/f-button/f-button.js +2 -2
- package/dist/collection/f-components/f-cell/f-cell-declarations.js +5 -1
- package/dist/collection/f-components/f-cell/f-cell.js +34 -114
- package/dist/collection/f-components/f-text-field/f-text-field.js +9 -1
- package/dist/collection/managers/kup-data/kup-data-cell-helper.js +48 -15
- package/dist/collection/managers/kup-data/kup-data-node-helper.js +69 -0
- package/dist/collection/managers/kup-data/kup-data.js +114 -6
- package/dist/collection/managers/kup-interact/kup-interact.js +3 -5
- package/dist/collection/managers/kup-language/kup-language-declarations.js +11 -0
- package/dist/collection/managers/kup-objects/kup-objects.js +10 -0
- package/dist/collection/managers/kup-scroll-on-hover/kup-scroll-on-hover-declarations.js +2 -0
- package/dist/collection/managers/kup-scroll-on-hover/kup-scroll-on-hover.js +131 -45
- package/dist/collection/managers/kup-theme/kup-theme-declarations.js +20 -3
- package/dist/collection/types/GenericTypes.js +3 -2
- package/dist/collection/utils/filters/filters-rows.js +4 -23
- package/dist/collection/utils/filters/filters-tree-items.js +2 -1
- package/dist/esm/{f-button-871a544b.js → f-button-cd948e50.js} +4 -4
- package/dist/esm/{f-cell-521ef17a.js → f-cell-474dd282.js} +46 -283
- package/dist/esm/f-checkbox-e06cf07b.js +27 -0
- package/dist/esm/{f-chip-1dda722f.js → f-chip-d6f2eb94.js} +3 -3
- package/dist/esm/{f-image-c468d8ae.js → f-image-914a03ef.js} +2 -2
- package/dist/esm/{f-paginator-utils-7dff8ff0.js → f-paginator-utils-a4a52732.js} +44 -366
- package/dist/esm/{f-text-field-d6c61c73.js → f-text-field-76341fe3.js} +11 -3
- package/dist/esm/{index-baeab1ac.js → index-e41330a5.js} +15 -8
- package/dist/esm/ketchup.js +3 -3
- package/dist/esm/kup-accordion.entry.js +3 -4
- package/dist/esm/kup-autocomplete_25.entry.js +222 -190
- package/dist/esm/kup-box.entry.js +1300 -0
- package/dist/esm/kup-calendar.entry.js +5 -7
- package/dist/esm/kup-cell.entry.js +7 -8
- package/dist/esm/kup-dash-list.entry.js +2 -4
- package/dist/esm/kup-dash_2.entry.js +3 -7
- package/dist/esm/kup-dashboard.entry.js +434 -0
- package/dist/esm/kup-drawer.entry.js +3 -4
- package/dist/esm/{kup-box_2.entry.js → kup-echart.entry.js} +61 -1347
- package/dist/esm/kup-family-tree.entry.js +482 -0
- package/dist/esm/kup-form.entry.js +474 -0
- package/dist/esm/kup-iframe.entry.js +2 -3
- package/dist/esm/kup-image-list.entry.js +70 -10
- package/dist/esm/kup-lazy.entry.js +3 -4
- package/dist/esm/kup-magic-box.entry.js +3 -4
- package/dist/esm/{kup-manager-58b075b4.js → kup-manager-86f440c7.js} +1762 -357
- package/dist/esm/kup-nav-bar.entry.js +2 -3
- package/dist/esm/kup-numeric-picker.entry.js +3 -3
- package/dist/esm/kup-photo-frame.entry.js +4 -5
- package/dist/esm/kup-probe.entry.js +2 -2
- package/dist/esm/kup-qlik.entry.js +2 -2
- package/dist/esm/kup-snackbar.entry.js +4 -5
- package/dist/esm/loader.js +3 -3
- package/dist/ketchup/ketchup.esm.js +1 -1
- package/dist/ketchup/p-00e1133d.entry.js +9 -0
- package/dist/ketchup/p-066f344a.entry.js +1 -0
- package/dist/ketchup/p-0c6e0647.entry.js +1 -0
- package/dist/ketchup/p-151f7c17.entry.js +27 -0
- package/dist/ketchup/p-1e9c03b0.entry.js +1 -0
- package/dist/ketchup/p-21ea11cb.js +30 -0
- package/dist/ketchup/{p-fac1a08b.entry.js → p-2f4e6c50.entry.js} +1 -1
- package/dist/ketchup/p-3586f59c.js +1 -0
- package/dist/ketchup/p-359fd90d.entry.js +1 -0
- package/dist/ketchup/p-389fd0bf.js +1 -0
- package/dist/ketchup/p-5552f156.js +1 -0
- package/dist/ketchup/{p-f09f2f98.entry.js → p-77aff9c1.entry.js} +1 -1
- package/dist/ketchup/p-7cfdf53c.entry.js +39 -0
- package/dist/ketchup/p-853a5178.entry.js +1 -0
- package/dist/ketchup/{p-44ec4f03.js → p-8673bd4e.js} +1 -1
- package/dist/ketchup/p-8b55b786.entry.js +1 -0
- package/dist/ketchup/p-95f5834b.entry.js +1 -0
- package/dist/ketchup/p-a2c595c4.js +1 -0
- package/dist/ketchup/p-ae91f27e.entry.js +1 -0
- package/dist/ketchup/p-af664379.js +1 -0
- package/dist/ketchup/p-b0b3989b.js +2 -0
- package/dist/ketchup/p-b3b65a61.entry.js +1 -0
- package/dist/ketchup/p-bc306a53.entry.js +1 -0
- package/dist/ketchup/{p-f71a1675.entry.js → p-c3783b77.entry.js} +1 -1
- package/dist/ketchup/{p-7eff4eee.js → p-cd4fc3fb.js} +1 -1
- package/dist/ketchup/p-cee76b14.entry.js +1 -0
- package/dist/ketchup/p-cfaea29b.entry.js +1 -0
- package/dist/ketchup/p-d2f51e7b.entry.js +1 -0
- package/dist/ketchup/p-df8e6a4d.entry.js +1 -0
- package/dist/ketchup/p-e60a1170.entry.js +1 -0
- package/dist/ketchup/p-e9a1ba04.entry.js +1 -0
- package/dist/types/components/kup-autocomplete/kup-autocomplete.d.ts +1 -16
- package/dist/types/components/{kup-form-editor/kup-form-editor-declarations.d.ts → kup-dashboard/kup-dashboard-declarations.d.ts} +9 -27
- package/dist/types/components/{kup-form-editor/kup-form-editor.d.ts → kup-dashboard/kup-dashboard.d.ts} +17 -9
- package/dist/types/components/kup-data-table/kup-data-table-state.d.ts +1 -1
- package/dist/types/components/kup-family-tree/kup-family-tree-declarations.d.ts +37 -0
- package/dist/types/components/kup-family-tree/kup-family-tree.d.ts +82 -0
- package/dist/types/components/kup-form/kup-form-declarations.d.ts +60 -0
- package/dist/types/components/kup-form/kup-form.d.ts +63 -0
- package/dist/types/components/kup-image-list/kup-image-list-state.d.ts +6 -0
- package/dist/types/components/kup-image-list/kup-image-list.d.ts +17 -0
- package/dist/types/components/kup-text-field/kup-text-field-declarations.d.ts +4 -0
- package/dist/types/components/kup-text-field/kup-text-field.d.ts +10 -0
- package/dist/types/components/kup-time-picker/kup-time-picker.d.ts +0 -6
- package/dist/types/components/kup-tree/kup-tree-declarations.d.ts +2 -0
- package/dist/types/components/kup-tree/kup-tree.d.ts +0 -1
- package/dist/types/components.d.ts +492 -231
- package/dist/types/f-components/f-cell/f-cell-declarations.d.ts +4 -1
- package/dist/types/f-components/f-text-field/f-text-field-declarations.d.ts +2 -0
- package/dist/types/managers/kup-data/kup-data-cell-helper.d.ts +13 -6
- package/dist/types/managers/kup-data/kup-data-declarations.d.ts +8 -0
- package/dist/types/managers/kup-data/kup-data-node-helper.d.ts +15 -1
- package/dist/types/managers/kup-data/kup-data.d.ts +9 -2
- package/dist/types/managers/kup-language/kup-language-declarations.d.ts +11 -1
- package/dist/types/managers/kup-objects/kup-objects.d.ts +6 -0
- package/dist/types/managers/kup-scroll-on-hover/kup-scroll-on-hover-declarations.d.ts +9 -1
- package/dist/types/managers/kup-scroll-on-hover/kup-scroll-on-hover.d.ts +7 -5
- package/dist/types/types/GenericTypes.d.ts +3 -2
- package/dist/types/utils/filters/filters-rows.d.ts +0 -2
- package/package.json +2 -2
- package/dist/cjs/cell-utils-a78d6fac.js +0 -168
- package/dist/cjs/f-cell-69294bca.js +0 -653
- package/dist/cjs/kup-field.cjs.entry.js +0 -241
- package/dist/cjs/kup-form-editor.cjs.entry.js +0 -404
- package/dist/cjs/utils-6287d878.js +0 -447
- package/dist/collection/assets/form-editor.js +0 -338
- package/dist/collection/components/kup-field/kup-field-declarations.js +0 -15
- package/dist/collection/components/kup-field/kup-field.css +0 -48
- package/dist/collection/components/kup-field/kup-field.js +0 -514
- package/dist/collection/components/kup-form-editor/kup-form-editor-declarations.js +0 -23
- package/dist/esm/cell-utils-964da6b5.js +0 -160
- package/dist/esm/kup-field.entry.js +0 -237
- package/dist/esm/kup-form-editor.entry.js +0 -400
- package/dist/esm/utils-d7e4b3c2.js +0 -428
- package/dist/ketchup/p-1ae66cc5.js +0 -1
- package/dist/ketchup/p-34b74425.js +0 -1
- package/dist/ketchup/p-3c11e615.entry.js +0 -1
- package/dist/ketchup/p-4ffbc3ff.js +0 -1
- package/dist/ketchup/p-5264a3e6.entry.js +0 -1
- package/dist/ketchup/p-65974e48.entry.js +0 -1
- package/dist/ketchup/p-65b46587.entry.js +0 -40
- package/dist/ketchup/p-6dff70f8.entry.js +0 -1
- package/dist/ketchup/p-7454cb92.js +0 -1
- package/dist/ketchup/p-80968627.entry.js +0 -1
- package/dist/ketchup/p-8cdf61a4.js +0 -1
- package/dist/ketchup/p-954cc340.entry.js +0 -1
- package/dist/ketchup/p-976244f9.entry.js +0 -9
- package/dist/ketchup/p-99e0d768.entry.js +0 -1
- package/dist/ketchup/p-a0f6e25c.entry.js +0 -1
- package/dist/ketchup/p-a615a92b.entry.js +0 -1
- package/dist/ketchup/p-aca0e54b.js +0 -30
- package/dist/ketchup/p-b8939a8b.entry.js +0 -1
- package/dist/ketchup/p-bfc3bac7.js +0 -1
- package/dist/ketchup/p-c5ce8951.entry.js +0 -1
- package/dist/ketchup/p-d2ee56dd.entry.js +0 -1
- package/dist/ketchup/p-db71436b.entry.js +0 -27
- package/dist/ketchup/p-e0035c58.js +0 -1
- package/dist/ketchup/p-e1039cf2.entry.js +0 -1
- package/dist/ketchup/p-ea10176c.entry.js +0 -1
- package/dist/types/components/kup-field/kup-field-declarations.d.ts +0 -25
- package/dist/types/components/kup-field/kup-field.d.ts +0 -90
|
@@ -10,7 +10,7 @@ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (
|
|
|
10
10
|
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
11
11
|
};
|
|
12
12
|
var _KupImageList_instances, _KupImageList_clickTimeout, _KupImageList_kupManager, _KupImageList_backProps, _KupImageList_topProps, _KupImageList_createItem, _KupImageList_createList;
|
|
13
|
-
import { Component, Element, Event, forceUpdate, h, Host, Method, Prop, State, } from '@stencil/core';
|
|
13
|
+
import { Component, Element, Event, forceUpdate, h, Host, Method, Prop, State, Watch, } from '@stencil/core';
|
|
14
14
|
import { MDCRipple } from '@material/ripple';
|
|
15
15
|
import { kupManagerInstance, } from '../../managers/kup-manager/kup-manager';
|
|
16
16
|
import { KupImageListProps, } from './kup-image-list-declarations';
|
|
@@ -22,12 +22,14 @@ import { FButtonStyling, } from '../../f-components/f-button/f-button-declaratio
|
|
|
22
22
|
import { KupLanguageGeneric } from '../../managers/kup-language/kup-language-declarations';
|
|
23
23
|
import { FCell } from '../../f-components/f-cell/f-cell';
|
|
24
24
|
import { FCellPadding } from '../../f-components/f-cell/f-cell-declarations';
|
|
25
|
+
import { KupImageListState } from './kup-image-list-state';
|
|
25
26
|
export class KupImageList {
|
|
26
27
|
constructor() {
|
|
27
28
|
_KupImageList_instances.add(this);
|
|
28
29
|
/*-------------------------------------------------*/
|
|
29
30
|
/* S t a t e s */
|
|
30
31
|
/*-------------------------------------------------*/
|
|
32
|
+
this.state = new KupImageListState();
|
|
31
33
|
this.currentNode = null;
|
|
32
34
|
this.navigationBarToggled = false;
|
|
33
35
|
/*-------------------------------------------------*/
|
|
@@ -49,9 +51,18 @@ export class KupImageList {
|
|
|
49
51
|
* @default true
|
|
50
52
|
*/
|
|
51
53
|
this.ripple = true;
|
|
54
|
+
/**
|
|
55
|
+
* An array of integers containing the path to a selected child.\
|
|
56
|
+
*/
|
|
57
|
+
this.selectedNode = [];
|
|
58
|
+
this.stateId = '';
|
|
52
59
|
/*-------------------------------------------------*/
|
|
53
60
|
/* I n t e r n a l V a r i a b l e s */
|
|
54
61
|
/*-------------------------------------------------*/
|
|
62
|
+
/**
|
|
63
|
+
* Instance of the KupManager class.
|
|
64
|
+
*/
|
|
65
|
+
this.kupManager = kupManagerInstance();
|
|
55
66
|
_KupImageList_clickTimeout.set(this, []);
|
|
56
67
|
_KupImageList_kupManager.set(this, kupManagerInstance());
|
|
57
68
|
_KupImageList_backProps.set(this, {
|
|
@@ -75,6 +86,32 @@ export class KupImageList {
|
|
|
75
86
|
wrapperClass: 'navigation-bar__top',
|
|
76
87
|
});
|
|
77
88
|
}
|
|
89
|
+
initWithPersistedState() {
|
|
90
|
+
if (this.store && this.stateId) {
|
|
91
|
+
const state = this.store.getState(this.stateId);
|
|
92
|
+
if (state != null) {
|
|
93
|
+
this.currentNode =
|
|
94
|
+
this.kupManager.data.node.findByStrTreeNodePath(this.data, state.selectedTreeNodePath);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
persistState() {
|
|
99
|
+
if (this.store && this.stateId) {
|
|
100
|
+
let somethingChanged = false;
|
|
101
|
+
let cNodeRowId = this.currentNode ? this.currentNode.id : '';
|
|
102
|
+
if (!this.kupManager.objects.deepEqual(this.state.selectedTreeNodePath, cNodeRowId)) {
|
|
103
|
+
this.state.selectedTreeNodePath = cNodeRowId;
|
|
104
|
+
somethingChanged = true;
|
|
105
|
+
}
|
|
106
|
+
if (!this.state.load) {
|
|
107
|
+
this.state.load = true;
|
|
108
|
+
return;
|
|
109
|
+
}
|
|
110
|
+
if (somethingChanged) {
|
|
111
|
+
this.store.persistState(this.stateId, this.state);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
78
115
|
onKupClick(node) {
|
|
79
116
|
if (node.children && node.children.length > 0) {
|
|
80
117
|
this.currentNode = node;
|
|
@@ -105,6 +142,15 @@ export class KupImageList {
|
|
|
105
142
|
});
|
|
106
143
|
}
|
|
107
144
|
/*-------------------------------------------------*/
|
|
145
|
+
/* W a t c h e r s */
|
|
146
|
+
/*-------------------------------------------------*/
|
|
147
|
+
selectNode(newData) {
|
|
148
|
+
if (!newData || newData.length == 0) {
|
|
149
|
+
return;
|
|
150
|
+
}
|
|
151
|
+
this.currentNode = this.kupManager.data.node.find(this.data, newData);
|
|
152
|
+
}
|
|
153
|
+
/*-------------------------------------------------*/
|
|
108
154
|
/* P u b l i c M e t h o d s */
|
|
109
155
|
/*-------------------------------------------------*/
|
|
110
156
|
/**
|
|
@@ -152,6 +198,9 @@ export class KupImageList {
|
|
|
152
198
|
}
|
|
153
199
|
}
|
|
154
200
|
}
|
|
201
|
+
// *** Store
|
|
202
|
+
this.persistState();
|
|
203
|
+
// ***
|
|
155
204
|
__classPrivateFieldGet(this, _KupImageList_kupManager, "f").debug.logRender(this, true);
|
|
156
205
|
}
|
|
157
206
|
render() {
|
|
@@ -253,6 +302,65 @@ export class KupImageList {
|
|
|
253
302
|
"attribute": "ripple",
|
|
254
303
|
"reflect": false,
|
|
255
304
|
"defaultValue": "true"
|
|
305
|
+
},
|
|
306
|
+
"selectedNode": {
|
|
307
|
+
"type": "unknown",
|
|
308
|
+
"mutable": false,
|
|
309
|
+
"complexType": {
|
|
310
|
+
"original": "TreeNodePath",
|
|
311
|
+
"resolved": "number[]",
|
|
312
|
+
"references": {
|
|
313
|
+
"TreeNodePath": {
|
|
314
|
+
"location": "import",
|
|
315
|
+
"path": "../kup-tree/kup-tree-declarations"
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
},
|
|
319
|
+
"required": false,
|
|
320
|
+
"optional": false,
|
|
321
|
+
"docs": {
|
|
322
|
+
"tags": [],
|
|
323
|
+
"text": "An array of integers containing the path to a selected child.\\"
|
|
324
|
+
},
|
|
325
|
+
"defaultValue": "[]"
|
|
326
|
+
},
|
|
327
|
+
"stateId": {
|
|
328
|
+
"type": "string",
|
|
329
|
+
"mutable": false,
|
|
330
|
+
"complexType": {
|
|
331
|
+
"original": "string",
|
|
332
|
+
"resolved": "string",
|
|
333
|
+
"references": {}
|
|
334
|
+
},
|
|
335
|
+
"required": false,
|
|
336
|
+
"optional": false,
|
|
337
|
+
"docs": {
|
|
338
|
+
"tags": [],
|
|
339
|
+
"text": ""
|
|
340
|
+
},
|
|
341
|
+
"attribute": "state-id",
|
|
342
|
+
"reflect": false,
|
|
343
|
+
"defaultValue": "''"
|
|
344
|
+
},
|
|
345
|
+
"store": {
|
|
346
|
+
"type": "unknown",
|
|
347
|
+
"mutable": false,
|
|
348
|
+
"complexType": {
|
|
349
|
+
"original": "KupStore",
|
|
350
|
+
"resolved": "KupStore",
|
|
351
|
+
"references": {
|
|
352
|
+
"KupStore": {
|
|
353
|
+
"location": "import",
|
|
354
|
+
"path": "../kup-state/kup-store"
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
},
|
|
358
|
+
"required": false,
|
|
359
|
+
"optional": false,
|
|
360
|
+
"docs": {
|
|
361
|
+
"tags": [],
|
|
362
|
+
"text": ""
|
|
363
|
+
}
|
|
256
364
|
}
|
|
257
365
|
}; }
|
|
258
366
|
static get states() { return {
|
|
@@ -400,6 +508,10 @@ export class KupImageList {
|
|
|
400
508
|
}
|
|
401
509
|
}; }
|
|
402
510
|
static get elementRef() { return "rootElement"; }
|
|
511
|
+
static get watchers() { return [{
|
|
512
|
+
"propName": "selectedNode",
|
|
513
|
+
"methodName": "selectNode"
|
|
514
|
+
}]; }
|
|
403
515
|
}
|
|
404
516
|
_KupImageList_clickTimeout = new WeakMap(), _KupImageList_kupManager = new WeakMap(), _KupImageList_backProps = new WeakMap(), _KupImageList_topProps = new WeakMap(), _KupImageList_instances = new WeakSet(), _KupImageList_createItem = function _KupImageList_createItem(node) {
|
|
405
517
|
const props = {
|
|
@@ -1,20 +1,22 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @prop --kup-lazy-hor-alignment: Sets the horizontal alignment of the subcomponent.
|
|
3
|
-
* @prop --kup-lazy-ver-alignment: Sets the vertical alignment of the subcomponent.
|
|
4
2
|
* @prop --kup-lazy-animation-time: Sets the duration of the animation.
|
|
3
|
+
* @prop --kup-lazy-hor-alignment: Sets the horizontal alignment of the subcomponent.
|
|
5
4
|
* @prop --kup-lazy-placeholder-color: Sets color of the placeholder icon.
|
|
5
|
+
* @prop --kup-lazy-ver-alignment: Sets the vertical alignment of the subcomponent.
|
|
6
|
+
* @prop --kup-lazy-width: Sets the width of the component and subcomponent.
|
|
6
7
|
*/
|
|
7
8
|
:host {
|
|
8
|
-
--kup_lazy_hor_alignment: var(--kup-lazy-hor-alignment, center);
|
|
9
|
-
--kup_lazy_ver_alignment: var(--kup-lazy-ver-alignment, center);
|
|
10
9
|
--kup_lazy_animation_time: var(--kup-lazy-animation-time, 2s);
|
|
10
|
+
--kup_lazy_hor_alignment: var(--kup-lazy-hor-alignment, center);
|
|
11
11
|
--kup_lazy_placeholder_color: var(
|
|
12
12
|
--kup-lazy-placeholder-color,
|
|
13
13
|
var(--kup-icon-color)
|
|
14
14
|
);
|
|
15
|
+
--kup_lazy_ver_alignment: var(--kup-lazy-ver-alignment, center);
|
|
16
|
+
--kup_lazy_width: var(--kup-lazy-width, 100%);
|
|
15
17
|
display: block;
|
|
16
18
|
height: 100%;
|
|
17
|
-
width:
|
|
19
|
+
width: var(--kup_lazy_width);
|
|
18
20
|
position: relative;
|
|
19
21
|
}
|
|
20
22
|
|
|
@@ -23,12 +25,17 @@
|
|
|
23
25
|
display: flex;
|
|
24
26
|
justify-content: var(--kup_lazy_hor_alignment);
|
|
25
27
|
height: 100%;
|
|
26
|
-
width:
|
|
28
|
+
width: var(--kup_lazy_width);
|
|
27
29
|
}
|
|
28
30
|
#kup-component kup-data-table {
|
|
29
31
|
min-width: 100%;
|
|
30
32
|
}
|
|
31
33
|
|
|
34
|
+
.kup-loaded,
|
|
35
|
+
.kup-to-be-loaded {
|
|
36
|
+
width: var(--kup_lazy_width);
|
|
37
|
+
}
|
|
38
|
+
|
|
32
39
|
svg {
|
|
33
40
|
fill: var(--kup_lazy_placeholder_color);
|
|
34
41
|
animation: shine ease var(--kup_lazy_animation_time) infinite;
|
|
@@ -26,15 +26,21 @@ export function consistencyCheck(idIn, listData, listEl, selectMode, displayMode
|
|
|
26
26
|
if (selected == null && idIn == null && listData) {
|
|
27
27
|
selected = getFirstItemSelected(listData);
|
|
28
28
|
}
|
|
29
|
+
let trueValue = null;
|
|
29
30
|
if (selected == null) {
|
|
30
31
|
selected = {
|
|
31
32
|
id: idIn == null ? '' : idIn,
|
|
32
33
|
value: idIn == null ? '' : idIn,
|
|
33
34
|
};
|
|
35
|
+
id = selected.id;
|
|
36
|
+
displayedValue = selected.id;
|
|
37
|
+
trueValue = selected.id;
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
id = getIdOfItemByDisplayMode(selected, selectMode, ' - ');
|
|
41
|
+
displayedValue = getIdOfItemByDisplayMode(selected, displayMode, ' - ');
|
|
42
|
+
trueValue = getIdOfItemByDisplayMode(selected, ItemsDisplayMode.CODE, ' - ');
|
|
34
43
|
}
|
|
35
|
-
id = getIdOfItemByDisplayMode(selected, selectMode, ' - ');
|
|
36
|
-
displayedValue = getIdOfItemByDisplayMode(selected, displayMode, ' - ');
|
|
37
|
-
const trueValue = getIdOfItemByDisplayMode(selected, ItemsDisplayMode.CODE, ' - ');
|
|
38
44
|
return {
|
|
39
45
|
value: id,
|
|
40
46
|
displayedValue: displayedValue,
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
--kup-photoframe-border,
|
|
8
8
|
1px inset var(--kup-border-color)
|
|
9
9
|
);
|
|
10
|
-
--kup_photoframe_fade_out_time: var(--kup-photoframe-fade-out-time,
|
|
10
|
+
--kup_photoframe_fade_out_time: var(--kup-photoframe-fade-out-time, 2000ms);
|
|
11
11
|
border: var(--kup_photoframe_border);
|
|
12
12
|
display: block;
|
|
13
13
|
height: 100%;
|
|
@@ -35,19 +35,29 @@ img {
|
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
.placeholder {
|
|
38
|
-
|
|
38
|
+
display: none;
|
|
39
39
|
transition: opacity var(--kup_photoframe_fade_out_time) ease-out;
|
|
40
|
+
will-change: opacity;
|
|
40
41
|
z-index: 1;
|
|
41
42
|
}
|
|
43
|
+
.placeholder--loaded {
|
|
44
|
+
display: block;
|
|
45
|
+
}
|
|
42
46
|
.placeholder--fade-out {
|
|
43
47
|
opacity: 0;
|
|
48
|
+
position: absolute;
|
|
44
49
|
}
|
|
45
50
|
|
|
46
51
|
.resource {
|
|
52
|
+
display: none;
|
|
47
53
|
left: 0;
|
|
48
54
|
position: absolute;
|
|
49
55
|
top: 0;
|
|
50
|
-
z-index:
|
|
56
|
+
z-index: 0;
|
|
57
|
+
}
|
|
58
|
+
.resource--fade-in {
|
|
59
|
+
display: block;
|
|
60
|
+
position: relative;
|
|
51
61
|
}
|
|
52
62
|
|
|
53
63
|
/*-------------------------------------------------*/
|
|
@@ -139,8 +139,8 @@ export class KupPhotoFrame {
|
|
|
139
139
|
});
|
|
140
140
|
} })),
|
|
141
141
|
__classPrivateFieldGet(this, _KupPhotoFrame_renderResource, "f") ? (h("img", Object.assign({}, this.resourceAttrs, { class: "resource", ref: (el) => (__classPrivateFieldSet(this, _KupPhotoFrame_resourceEl, el, "f")), onLoad: () => {
|
|
142
|
-
__classPrivateFieldGet(this, _KupPhotoFrame_resourceEl, "f").classList.add('resource--fade-in');
|
|
143
142
|
__classPrivateFieldGet(this, _KupPhotoFrame_placeholderEl, "f").classList.add('placeholder--fade-out');
|
|
143
|
+
__classPrivateFieldGet(this, _KupPhotoFrame_resourceEl, "f").classList.add('resource--fade-in');
|
|
144
144
|
this.kupPhotoFrameResourceLoad.emit({
|
|
145
145
|
comp: this,
|
|
146
146
|
id: this.rootElement.id,
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
export var KupTextFieldProps;
|
|
6
6
|
(function (KupTextFieldProps) {
|
|
7
7
|
KupTextFieldProps["customStyle"] = "Custom style of the component.";
|
|
8
|
+
KupTextFieldProps["decimals"] = "Number of decimals (should be used when inputType is number).";
|
|
8
9
|
KupTextFieldProps["disabled"] = "When set to true, the component is disabled.";
|
|
9
10
|
KupTextFieldProps["emitSubmitEventOnEnter"] = "When the text field is part of the autocomplete component and the list is opened, enter key selects the item and doesn't submit.";
|
|
10
11
|
KupTextFieldProps["fullWidth"] = "When set to true, the component will be rendered at full width.";
|
|
@@ -17,7 +18,10 @@ export var KupTextFieldProps;
|
|
|
17
18
|
KupTextFieldProps["isClearable"] = "Enables a clear trailing icon.";
|
|
18
19
|
KupTextFieldProps["label"] = "When set, its content will be shown as a label.";
|
|
19
20
|
KupTextFieldProps["leadingLabel"] = "When set to true, the label will be on the left of the component.";
|
|
21
|
+
KupTextFieldProps["max"] = "The HTML max attribute specifies the maximum value for the input element. Works with the following input types: number, range, date, datetime-local, month, time and week.";
|
|
20
22
|
KupTextFieldProps["maxLength"] = "When set, the helper will display a character counter.";
|
|
23
|
+
KupTextFieldProps["min"] = "The HTML min attribute specifies the minimum value for the input element. Works with the following input types: number, range, date, datetime-local, month, time and week.";
|
|
24
|
+
KupTextFieldProps["name"] = "The HTML name attribute used for form autocomplete.";
|
|
21
25
|
KupTextFieldProps["outlined"] = "When set to true, the component will be rendered as an outlined field.";
|
|
22
26
|
KupTextFieldProps["readOnly"] = "Sets the component to read only state, making it not editable, but interactable. Used in combobox component when it behaves as a select.";
|
|
23
27
|
KupTextFieldProps["step"] = "The HTML step of the input element. It has effect only with number input type.";
|
|
@@ -25,6 +25,11 @@ export class KupTextField {
|
|
|
25
25
|
* @see https://ketchup.smeup.com/ketchup-showcase/#/customization
|
|
26
26
|
*/
|
|
27
27
|
this.customStyle = '';
|
|
28
|
+
/**
|
|
29
|
+
* Number of decimals (should be used when inputType is number).
|
|
30
|
+
* @default null
|
|
31
|
+
*/
|
|
32
|
+
this.decimals = null;
|
|
28
33
|
/**
|
|
29
34
|
* When set to true, the component is disabled.
|
|
30
35
|
* @default false
|
|
@@ -102,6 +107,11 @@ export class KupTextField {
|
|
|
102
107
|
* @default null
|
|
103
108
|
*/
|
|
104
109
|
this.min = null;
|
|
110
|
+
/**
|
|
111
|
+
* The HTML name attribute used for form autocomplete.
|
|
112
|
+
* @default null
|
|
113
|
+
*/
|
|
114
|
+
this.name = null;
|
|
105
115
|
/**
|
|
106
116
|
* When set to true, the component will be rendered as an outlined field.
|
|
107
117
|
* @default false
|
|
@@ -286,6 +296,7 @@ export class KupTextField {
|
|
|
286
296
|
danger: this.rootElement.classList.contains('kup-danger')
|
|
287
297
|
? true
|
|
288
298
|
: false,
|
|
299
|
+
decimals: this.decimals,
|
|
289
300
|
disabled: this.disabled,
|
|
290
301
|
fullHeight: this.rootElement.classList.contains('kup-full-height')
|
|
291
302
|
? true
|
|
@@ -305,6 +316,7 @@ export class KupTextField {
|
|
|
305
316
|
max: this.max,
|
|
306
317
|
maxLength: this.maxLength,
|
|
307
318
|
min: this.min,
|
|
319
|
+
name: this.name,
|
|
308
320
|
outlined: this.outlined,
|
|
309
321
|
readOnly: this.readOnly,
|
|
310
322
|
secondary: this.rootElement.classList.contains('kup-secondary')
|
|
@@ -374,6 +386,27 @@ export class KupTextField {
|
|
|
374
386
|
"reflect": false,
|
|
375
387
|
"defaultValue": "''"
|
|
376
388
|
},
|
|
389
|
+
"decimals": {
|
|
390
|
+
"type": "number",
|
|
391
|
+
"mutable": false,
|
|
392
|
+
"complexType": {
|
|
393
|
+
"original": "number",
|
|
394
|
+
"resolved": "number",
|
|
395
|
+
"references": {}
|
|
396
|
+
},
|
|
397
|
+
"required": false,
|
|
398
|
+
"optional": false,
|
|
399
|
+
"docs": {
|
|
400
|
+
"tags": [{
|
|
401
|
+
"name": "default",
|
|
402
|
+
"text": "null"
|
|
403
|
+
}],
|
|
404
|
+
"text": "Number of decimals (should be used when inputType is number)."
|
|
405
|
+
},
|
|
406
|
+
"attribute": "decimals",
|
|
407
|
+
"reflect": false,
|
|
408
|
+
"defaultValue": "null"
|
|
409
|
+
},
|
|
377
410
|
"disabled": {
|
|
378
411
|
"type": "boolean",
|
|
379
412
|
"mutable": false,
|
|
@@ -689,6 +722,27 @@ export class KupTextField {
|
|
|
689
722
|
"reflect": false,
|
|
690
723
|
"defaultValue": "null"
|
|
691
724
|
},
|
|
725
|
+
"name": {
|
|
726
|
+
"type": "string",
|
|
727
|
+
"mutable": false,
|
|
728
|
+
"complexType": {
|
|
729
|
+
"original": "string",
|
|
730
|
+
"resolved": "string",
|
|
731
|
+
"references": {}
|
|
732
|
+
},
|
|
733
|
+
"required": false,
|
|
734
|
+
"optional": false,
|
|
735
|
+
"docs": {
|
|
736
|
+
"tags": [{
|
|
737
|
+
"name": "default",
|
|
738
|
+
"text": "null"
|
|
739
|
+
}],
|
|
740
|
+
"text": "The HTML name attribute used for form autocomplete."
|
|
741
|
+
},
|
|
742
|
+
"attribute": "name",
|
|
743
|
+
"reflect": false,
|
|
744
|
+
"defaultValue": "null"
|
|
745
|
+
},
|
|
692
746
|
"outlined": {
|
|
693
747
|
"type": "boolean",
|
|
694
748
|
"mutable": false,
|
|
@@ -61,12 +61,6 @@ export class KupTimePicker {
|
|
|
61
61
|
* Instance of the KupManager class.
|
|
62
62
|
*/
|
|
63
63
|
this.kupManager = kupManagerInstance();
|
|
64
|
-
this.hoursEl = undefined;
|
|
65
|
-
this.minutesEl = undefined;
|
|
66
|
-
this.secondsEl = undefined;
|
|
67
|
-
this.hoursCircleEl = undefined;
|
|
68
|
-
this.minutesCircleEl = undefined;
|
|
69
|
-
this.secondsCircleEl = undefined;
|
|
70
64
|
this.hoursActive = true;
|
|
71
65
|
this.minutesActive = false;
|
|
72
66
|
this.secondsActive = false;
|
|
@@ -19,6 +19,7 @@ import { KupPointerEventTypes } from '../../managers/kup-interact/kup-interact-d
|
|
|
19
19
|
import { FCellPadding, } from '../../f-components/f-cell/f-cell-declarations';
|
|
20
20
|
import { FCell } from '../../f-components/f-cell/f-cell';
|
|
21
21
|
import { KupDebugCategory } from '../../managers/kup-debug/kup-debug-declarations';
|
|
22
|
+
import { FTextFieldMDC } from '../../f-components/f-text-field/f-text-field-mdc';
|
|
22
23
|
export class KupTree {
|
|
23
24
|
constructor() {
|
|
24
25
|
/*-------------------------------------------------*/
|
|
@@ -173,7 +174,6 @@ export class KupTree {
|
|
|
173
174
|
* Reference to the column menu card.
|
|
174
175
|
*/
|
|
175
176
|
this.columnMenuCard = null;
|
|
176
|
-
this.selectedColumn = '';
|
|
177
177
|
this.clickTimeout = [];
|
|
178
178
|
this.sizedColumns = undefined;
|
|
179
179
|
this.filtersColumnMenuInstance = new FiltersColumnMenu();
|
|
@@ -189,7 +189,6 @@ export class KupTree {
|
|
|
189
189
|
if (this.store && this.stateId) {
|
|
190
190
|
const state = this.store.getState(this.stateId);
|
|
191
191
|
if (state != null) {
|
|
192
|
-
console.log('Initialize with state for stateId ' + this.stateId, state);
|
|
193
192
|
this.density = state.density;
|
|
194
193
|
this.showFilters = state.showFilters;
|
|
195
194
|
this.showFooter = state.showFooter;
|
|
@@ -236,7 +235,6 @@ export class KupTree {
|
|
|
236
235
|
return;
|
|
237
236
|
}
|
|
238
237
|
if (somethingChanged) {
|
|
239
|
-
console.log('Persisting state for stateId ' + this.stateId + ': ', this.state);
|
|
240
238
|
this.store.persistState(this.stateId, this.state);
|
|
241
239
|
}
|
|
242
240
|
}
|
|
@@ -545,7 +543,7 @@ export class KupTree {
|
|
|
545
543
|
this.closeTotalMenu();
|
|
546
544
|
this.openTotalMenu(column);
|
|
547
545
|
}
|
|
548
|
-
getEventDetails(path) {
|
|
546
|
+
getEventDetails(path, e) {
|
|
549
547
|
let isHeader, isBody, isFooter, td, th, tr, filterRemove;
|
|
550
548
|
if (path) {
|
|
551
549
|
for (let i = path.length - 1; i >= 0; i--) {
|
|
@@ -617,6 +615,7 @@ export class KupTree {
|
|
|
617
615
|
cell: cell ? cell : null,
|
|
618
616
|
column: column ? column : null,
|
|
619
617
|
filterRemove: filterRemove ? filterRemove : null,
|
|
618
|
+
originalEvent: e,
|
|
620
619
|
row: row ? row : null,
|
|
621
620
|
td: td ? td : null,
|
|
622
621
|
th: th ? th : null,
|
|
@@ -625,7 +624,7 @@ export class KupTree {
|
|
|
625
624
|
}
|
|
626
625
|
contextMenuHandler(e) {
|
|
627
626
|
e.preventDefault();
|
|
628
|
-
const details = this.getEventDetails(this.getEventPath(e.target));
|
|
627
|
+
const details = this.getEventDetails(this.getEventPath(e.target), e);
|
|
629
628
|
if (details.area === 'header') {
|
|
630
629
|
if (details.th && details.column) {
|
|
631
630
|
this.openColumnMenu(details.column.name);
|
|
@@ -659,6 +658,12 @@ export class KupTree {
|
|
|
659
658
|
KupTreeExpansionMode.DROPDOWN ||
|
|
660
659
|
(this.expansionMode.toLowerCase() === KupTreeExpansionMode.NODE &&
|
|
661
660
|
!treeNodeData.expandable)) {
|
|
661
|
+
const td = e
|
|
662
|
+
? this.getEventPath(e.target).find((el) => {
|
|
663
|
+
if (el.tagName === 'TD')
|
|
664
|
+
return el;
|
|
665
|
+
})
|
|
666
|
+
: null;
|
|
662
667
|
// If this TreeNode is not disabled, then it can be selected and an event is emitted
|
|
663
668
|
if (treeNodeData && !treeNodeData.disabled) {
|
|
664
669
|
if (this.autoSelectionNodeMode)
|
|
@@ -672,11 +677,10 @@ export class KupTree {
|
|
|
672
677
|
.split(',')
|
|
673
678
|
.map((treeNodeIndex) => parseInt(treeNodeIndex)),
|
|
674
679
|
treeNode: treeNodeData,
|
|
675
|
-
columnName:
|
|
680
|
+
columnName: td ? td.dataset.column : null,
|
|
676
681
|
auto: auto,
|
|
677
682
|
});
|
|
678
683
|
}
|
|
679
|
-
this.selectedColumn = '';
|
|
680
684
|
}
|
|
681
685
|
// If KupTreeExpansionMode.NODE then click is a collapse/expand click
|
|
682
686
|
if (this.expansionMode.toLowerCase() === KupTreeExpansionMode.NODE) {
|
|
@@ -1014,13 +1018,20 @@ export class KupTree {
|
|
|
1014
1018
|
}
|
|
1015
1019
|
// When can be expanded OR selected
|
|
1016
1020
|
if (!treeNodeData.disabled) {
|
|
1017
|
-
treeNodeOptions['onClick'] = () => {
|
|
1018
|
-
|
|
1021
|
+
treeNodeOptions['onClick'] = (e) => {
|
|
1022
|
+
// Note: event must be cloned
|
|
1023
|
+
// otherwise inside setTimeout will be exiting the Shadow DOM scope(causing loss of information, including target).
|
|
1024
|
+
const clone = {};
|
|
1025
|
+
for (const key in e) {
|
|
1026
|
+
clone[key] = e[key];
|
|
1027
|
+
}
|
|
1028
|
+
this.clickTimeout.push(setTimeout(() => this.hdlTreeNodeClick(clone, treeNodeData, treeNodePath, false), 300));
|
|
1019
1029
|
};
|
|
1020
1030
|
}
|
|
1021
1031
|
// When a tree node is displayed as a table
|
|
1022
1032
|
let treeNodeCells = null;
|
|
1023
1033
|
let visibleCols = this.getVisibleColumns();
|
|
1034
|
+
const _hasTooltip = !this.kupManager.objects.isEmptyKupObj(treeNodeData.obj);
|
|
1024
1035
|
if (this.showColumns && visibleCols && visibleCols.length) {
|
|
1025
1036
|
treeNodeCells = [];
|
|
1026
1037
|
// Renders all the cells
|
|
@@ -1373,6 +1384,12 @@ export class KupTree {
|
|
|
1373
1384
|
}
|
|
1374
1385
|
}
|
|
1375
1386
|
}
|
|
1387
|
+
if (root) {
|
|
1388
|
+
const fs = root.querySelectorAll('.f-text-field');
|
|
1389
|
+
for (let index = 0; index < fs.length; index++) {
|
|
1390
|
+
FTextFieldMDC(fs[index]);
|
|
1391
|
+
}
|
|
1392
|
+
}
|
|
1376
1393
|
if (this.preventXScroll) {
|
|
1377
1394
|
this.setEllipsis();
|
|
1378
1395
|
}
|
|
@@ -58,7 +58,7 @@ function renderButton(props) {
|
|
|
58
58
|
const styleSpinnerContainer = {
|
|
59
59
|
'--kup_button_spinner_height': propsFImage.sizeY,
|
|
60
60
|
};
|
|
61
|
-
return (h("button", { class: classObj, disabled: props.disabled, onBlur: props.onBlur, onClick: props.onClick, onFocus: props.onFocus, style: styleSpinnerContainer, type: "button" },
|
|
61
|
+
return (h("button", { class: classObj, disabled: props.disabled, onBlur: props.onBlur, onClick: props.onClick, onFocus: props.onFocus, style: styleSpinnerContainer, "aria-label": props.title, type: "button" },
|
|
62
62
|
props.trailingIcon
|
|
63
63
|
? [
|
|
64
64
|
h("span", { class: classLabelObj }, props.label),
|
|
@@ -93,7 +93,7 @@ function renderIconButton(props) {
|
|
|
93
93
|
const iconOff = props.iconOff
|
|
94
94
|
? props.iconOff
|
|
95
95
|
: props.icon + '_border';
|
|
96
|
-
return (h("button", { class: classObj, disabled: props.disabled, onClick: props.onClick, style: styleSpinnerContainer, type: "button", value: props.checked ? 'on' : 'off' },
|
|
96
|
+
return (h("button", { class: classObj, disabled: props.disabled, onClick: props.onClick, style: styleSpinnerContainer, type: "button", value: props.checked ? 'on' : 'off', "aria-label": props.title },
|
|
97
97
|
!props.showSpinner || props.disabled ? (h(FImage, Object.assign({}, propsFImage, { resource: props.toggable && !props.checked ? iconOff : props.icon, wrapperClass: `icon-button__icon kup-icon` }))) : null,
|
|
98
98
|
props.toggable && !props.showSpinner ? (h(FImage, Object.assign({}, propsFImage, { resource: props.icon, wrapperClass: `icon-button__icon icon-button__icon--on kup-icon` }))) : null,
|
|
99
99
|
props.showSpinner && !props.disabled ? (h("div", { class: "icon-button__spinner-container" },
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { KupTagNames, } from '../../types/GenericTypes';
|
|
2
|
-
export const
|
|
2
|
+
export const autoCenterComps = [KupTagNames.DATA_TABLE, KupTagNames.TREE];
|
|
3
|
+
export const fullWidthFieldsComps = [KupTagNames.DATA_TABLE, KupTagNames.TREE];
|
|
3
4
|
/**
|
|
4
5
|
* Supported cell events.
|
|
5
6
|
*/
|
|
@@ -88,6 +89,7 @@ export var FCellShapes;
|
|
|
88
89
|
FCellShapes["PROGRESS_BAR"] = "PGB";
|
|
89
90
|
FCellShapes["RADIO"] = "RAD";
|
|
90
91
|
FCellShapes["RATING"] = "RTG";
|
|
92
|
+
FCellShapes["SWITCH"] = "SWT";
|
|
91
93
|
FCellShapes["TEXT_FIELD"] = "ITX";
|
|
92
94
|
})(FCellShapes || (FCellShapes = {}));
|
|
93
95
|
/**
|
|
@@ -117,6 +119,7 @@ export var FCellTypes;
|
|
|
117
119
|
FCellTypes["RADIO"] = "radio";
|
|
118
120
|
FCellTypes["RATING"] = "rating";
|
|
119
121
|
FCellTypes["STRING"] = "string";
|
|
122
|
+
FCellTypes["SWITCH"] = "switch";
|
|
120
123
|
FCellTypes["TIME"] = "time";
|
|
121
124
|
})(FCellTypes || (FCellTypes = {}));
|
|
122
125
|
export const editableTypes = [
|
|
@@ -128,6 +131,7 @@ export const editableTypes = [
|
|
|
128
131
|
FCellTypes.NUMBER,
|
|
129
132
|
FCellTypes.RATING,
|
|
130
133
|
FCellTypes.STRING,
|
|
134
|
+
FCellTypes.SWITCH,
|
|
131
135
|
FCellTypes.TIME,
|
|
132
136
|
];
|
|
133
137
|
export const kupTypes = [
|