@sme.up/ketchup 6.1.0-SNAPSHOT → 6.2.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/{cell-utils-a78d6fac.js → cell-utils-d894e802.js} +2 -2
- package/dist/cjs/{f-button-ac179257.js → f-button-414b3bc3.js} +4 -4
- package/dist/cjs/f-cell-c8983ec7.js +418 -0
- package/dist/cjs/f-checkbox-57443ca3.js +29 -0
- package/dist/cjs/{f-chip-b00897d7.js → f-chip-ef81bf51.js} +3 -3
- package/dist/cjs/{f-image-89f25556.js → f-image-0618c795.js} +2 -2
- package/dist/cjs/{f-paginator-utils-8fa501b3.js → f-paginator-utils-c9dd5173.js} +5 -5
- package/dist/cjs/{f-text-field-e1e45ade.js → f-text-field-7d31190f.js} +3 -3
- package/dist/cjs/{index-eb556444.js → index-06b131ea.js} +6 -4
- package/dist/cjs/ketchup.cjs.js +3 -3
- package/dist/cjs/kup-accordion.cjs.entry.js +4 -4
- package/dist/cjs/kup-autocomplete_25.cjs.entry.js +200 -187
- package/dist/cjs/kup-box_2.cjs.entry.js +23 -12
- package/dist/cjs/kup-calendar.cjs.entry.js +7 -7
- package/dist/cjs/kup-cell.cjs.entry.js +10 -9
- package/dist/cjs/kup-dash-list.cjs.entry.js +4 -4
- package/dist/cjs/kup-dash_2.cjs.entry.js +4 -7
- package/dist/cjs/{kup-form-editor.cjs.entry.js → kup-dashboard.cjs.entry.js} +123 -148
- package/dist/cjs/kup-drawer.cjs.entry.js +4 -4
- package/dist/cjs/kup-field.cjs.entry.js +2 -2
- package/dist/cjs/kup-form.cjs.entry.js +469 -0
- package/dist/cjs/kup-iframe.cjs.entry.js +3 -3
- package/dist/cjs/kup-image-list.cjs.entry.js +11 -10
- package/dist/cjs/kup-lazy.cjs.entry.js +3 -3
- package/dist/cjs/kup-magic-box.cjs.entry.js +4 -4
- package/dist/cjs/{kup-manager-7a941909.js → kup-manager-2fee8cf3.js} +324 -6
- package/dist/cjs/kup-nav-bar.cjs.entry.js +3 -3
- package/dist/cjs/kup-numeric-picker.cjs.entry.js +3 -3
- package/dist/cjs/kup-photo-frame.cjs.entry.js +7 -9
- package/dist/cjs/kup-probe.cjs.entry.js +2 -2
- package/dist/cjs/kup-qlik.cjs.entry.js +2 -2
- package/dist/cjs/kup-snackbar.cjs.entry.js +5 -5
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/{utils-6287d878.js → utils-8470184d.js} +1 -1
- package/dist/collection/assets/dashboard.js +113 -0
- package/dist/collection/assets/data-table.js +15 -0
- package/dist/collection/assets/form.js +179 -0
- package/dist/collection/assets/grid.js +17 -0
- package/dist/collection/assets/index.js +10 -6
- package/dist/collection/collection-manifest.json +3 -2
- 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-combobox/kup-combobox.js +16 -13
- package/dist/collection/components/kup-dashboard/kup-dashboard-declarations.js +10 -0
- package/dist/collection/components/{kup-form-editor/kup-form-editor.css → kup-dashboard/kup-dashboard.css} +7 -6
- package/dist/collection/components/{kup-form-editor/kup-form-editor.js → kup-dashboard/kup-dashboard.js} +148 -149
- package/dist/collection/components/kup-drawer/kup-drawer.css +5 -8
- package/dist/collection/components/kup-form/kup-form-declarations.js +19 -0
- package/dist/collection/components/kup-form/kup-form.css +86 -0
- package/dist/collection/components/kup-form/kup-form.js +668 -0
- package/dist/collection/components/kup-grid/kup-grid.js +1 -4
- package/dist/collection/components/kup-list/kup-list-helper.js +9 -3
- package/dist/collection/components/kup-photo-frame/kup-photo-frame.css +10 -7
- package/dist/collection/components/kup-photo-frame/kup-photo-frame.js +3 -5
- package/dist/collection/components/kup-text-field/kup-text-field-declarations.js +3 -0
- package/dist/collection/components/kup-text-field/kup-text-field.js +27 -0
- package/dist/collection/components/kup-time-picker/kup-time-picker.js +0 -6
- package/dist/collection/components/kup-tree/kup-tree.js +10 -4
- package/dist/collection/f-components/f-button/f-button.js +2 -2
- package/dist/collection/f-components/f-cell/f-cell-declarations.js +5 -1
- package/dist/collection/f-components/f-cell/f-cell.js +34 -114
- package/dist/collection/f-components/f-text-field/f-text-field.js +1 -1
- package/dist/collection/managers/kup-data/kup-data.js +94 -0
- package/dist/collection/managers/kup-language/kup-language-declarations.js +11 -0
- package/dist/collection/managers/kup-objects/kup-objects.js +10 -0
- package/dist/collection/managers/kup-theme/kup-theme-declarations.js +18 -3
- package/dist/collection/types/GenericTypes.js +2 -1
- package/dist/esm/{cell-utils-964da6b5.js → cell-utils-7fc84d4e.js} +2 -2
- package/dist/esm/{f-button-871a544b.js → f-button-2f6cc296.js} +4 -4
- package/dist/esm/{f-cell-521ef17a.js → f-cell-4428481c.js} +48 -283
- package/dist/esm/f-checkbox-c51c4a75.js +27 -0
- package/dist/esm/{f-chip-1dda722f.js → f-chip-b39eb49a.js} +3 -3
- package/dist/esm/{f-image-c468d8ae.js → f-image-b08ebeb2.js} +2 -2
- package/dist/esm/{f-paginator-utils-7dff8ff0.js → f-paginator-utils-4fda6086.js} +5 -5
- package/dist/esm/{f-text-field-d6c61c73.js → f-text-field-184a5fb3.js} +3 -3
- package/dist/esm/{index-baeab1ac.js → index-ad6ab214.js} +6 -4
- package/dist/esm/ketchup.js +3 -3
- package/dist/esm/kup-accordion.entry.js +4 -4
- package/dist/esm/kup-autocomplete_25.entry.js +190 -177
- package/dist/esm/kup-box_2.entry.js +23 -12
- package/dist/esm/kup-calendar.entry.js +7 -7
- package/dist/esm/kup-cell.entry.js +9 -8
- package/dist/esm/kup-dash-list.entry.js +4 -4
- package/dist/esm/kup-dash_2.entry.js +4 -7
- package/dist/esm/{kup-form-editor.entry.js → kup-dashboard.entry.js} +123 -148
- package/dist/esm/kup-drawer.entry.js +4 -4
- package/dist/esm/kup-field.entry.js +2 -2
- package/dist/esm/kup-form.entry.js +465 -0
- package/dist/esm/kup-iframe.entry.js +3 -3
- package/dist/esm/kup-image-list.entry.js +10 -9
- package/dist/esm/kup-lazy.entry.js +3 -3
- package/dist/esm/kup-magic-box.entry.js +4 -4
- package/dist/esm/{kup-manager-58b075b4.js → kup-manager-3325b2d8.js} +321 -7
- package/dist/esm/kup-nav-bar.entry.js +3 -3
- package/dist/esm/kup-numeric-picker.entry.js +3 -3
- package/dist/esm/kup-photo-frame.entry.js +7 -9
- package/dist/esm/kup-probe.entry.js +2 -2
- package/dist/esm/kup-qlik.entry.js +2 -2
- package/dist/esm/kup-snackbar.entry.js +5 -5
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{utils-d7e4b3c2.js → utils-6373a07e.js} +1 -1
- package/dist/ketchup/ketchup.esm.js +1 -1
- package/dist/ketchup/p-006bc4d0.entry.js +1 -0
- package/dist/ketchup/{p-8cdf61a4.js → p-0741da57.js} +1 -1
- package/dist/ketchup/{p-44ec4f03.js → p-13e08580.js} +1 -1
- package/dist/ketchup/p-153697fb.entry.js +1 -0
- package/dist/ketchup/{p-a615a92b.entry.js → p-175edb62.entry.js} +1 -1
- package/dist/ketchup/{p-fac1a08b.entry.js → p-1db1d42b.entry.js} +1 -1
- package/dist/ketchup/{p-f09f2f98.entry.js → p-30820f8f.entry.js} +1 -1
- package/dist/ketchup/p-35325834.entry.js +9 -0
- package/dist/ketchup/{p-65b46587.entry.js → p-359e8bec.entry.js} +4 -4
- package/dist/ketchup/{p-6dff70f8.entry.js → p-3c7c92c0.entry.js} +1 -1
- package/dist/ketchup/{p-954cc340.entry.js → p-41cf8703.entry.js} +1 -1
- package/dist/ketchup/{p-3c11e615.entry.js → p-6127fccf.entry.js} +1 -1
- package/dist/ketchup/{p-f71a1675.entry.js → p-6b82e4e2.entry.js} +1 -1
- package/dist/ketchup/p-704e60eb.js +30 -0
- package/dist/ketchup/p-70660fe2.js +1 -0
- package/dist/ketchup/{p-ea10176c.entry.js → p-762c0382.entry.js} +1 -1
- package/dist/ketchup/{p-c5ce8951.entry.js → p-76947316.entry.js} +1 -1
- package/dist/ketchup/{p-d2ee56dd.entry.js → p-8103b80a.entry.js} +1 -1
- package/dist/ketchup/{p-99e0d768.entry.js → p-9fa457d4.entry.js} +1 -1
- package/dist/ketchup/{p-65974e48.entry.js → p-a0ce8075.entry.js} +1 -1
- package/dist/ketchup/p-a804fe83.entry.js +27 -0
- package/dist/ketchup/{p-7454cb92.js → p-ca9fd099.js} +1 -1
- package/dist/ketchup/p-caabb9ab.entry.js +1 -0
- package/dist/ketchup/p-cc3abf84.entry.js +1 -0
- package/dist/ketchup/p-cd5cfa7c.js +1 -0
- package/dist/ketchup/p-d2e76960.entry.js +1 -0
- package/dist/ketchup/p-d3b542b3.js +2 -0
- package/dist/ketchup/p-d7004ae4.js +1 -0
- package/dist/ketchup/{p-e0035c58.js → p-d95c904b.js} +1 -1
- package/dist/ketchup/{p-7eff4eee.js → p-ddce3430.js} +1 -1
- package/dist/ketchup/p-ee580b3a.entry.js +1 -0
- package/dist/ketchup/p-f49cb68e.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} +12 -9
- package/dist/types/components/kup-form/kup-form-declarations.d.ts +48 -0
- package/dist/types/components/kup-form/kup-form.d.ts +68 -0
- package/dist/types/components/kup-text-field/kup-text-field-declarations.d.ts +3 -0
- package/dist/types/components/kup-text-field/kup-text-field.d.ts +5 -0
- package/dist/types/components/kup-time-picker/kup-time-picker.d.ts +0 -6
- package/dist/types/components/kup-tree/kup-tree-declarations.d.ts +2 -0
- package/dist/types/components.d.ts +412 -159
- package/dist/types/f-components/f-cell/f-cell-declarations.d.ts +4 -1
- package/dist/types/f-components/f-text-field/f-text-field-declarations.d.ts +1 -0
- package/dist/types/managers/kup-data/kup-data.d.ts +2 -0
- package/dist/types/managers/kup-language/kup-language-declarations.d.ts +11 -1
- package/dist/types/managers/kup-objects/kup-objects.d.ts +6 -0
- package/dist/types/types/GenericTypes.d.ts +2 -1
- package/package.json +2 -2
- package/dist/cjs/f-cell-69294bca.js +0 -653
- package/dist/collection/assets/form-editor.js +0 -338
- package/dist/collection/components/kup-form-editor/kup-form-editor-declarations.js +0 -23
- package/dist/ketchup/p-1ae66cc5.js +0 -1
- package/dist/ketchup/p-34b74425.js +0 -1
- package/dist/ketchup/p-4ffbc3ff.js +0 -1
- package/dist/ketchup/p-5264a3e6.entry.js +0 -1
- package/dist/ketchup/p-80968627.entry.js +0 -1
- package/dist/ketchup/p-976244f9.entry.js +0 -9
- package/dist/ketchup/p-a0f6e25c.entry.js +0 -1
- package/dist/ketchup/p-aca0e54b.js +0 -30
- package/dist/ketchup/p-b8939a8b.entry.js +0 -1
- package/dist/ketchup/p-bfc3bac7.js +0 -1
- package/dist/ketchup/p-db71436b.entry.js +0 -27
- package/dist/ketchup/p-e1039cf2.entry.js +0 -1
|
@@ -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,22 @@ 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
|
-
|
|
40
|
+
will-change: opacity;
|
|
41
|
+
}
|
|
42
|
+
.placeholder--loaded {
|
|
43
|
+
display: block;
|
|
41
44
|
}
|
|
42
45
|
.placeholder--fade-out {
|
|
46
|
+
left: 0;
|
|
43
47
|
opacity: 0;
|
|
48
|
+
position: absolute;
|
|
49
|
+
top: 0;
|
|
44
50
|
}
|
|
45
51
|
|
|
46
52
|
.resource {
|
|
47
|
-
|
|
48
|
-
position: absolute;
|
|
49
|
-
top: 0;
|
|
50
|
-
z-index: -1;
|
|
53
|
+
display: block;
|
|
51
54
|
}
|
|
52
55
|
|
|
53
56
|
/*-------------------------------------------------*/
|
|
@@ -9,7 +9,7 @@ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (
|
|
|
9
9
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
10
10
|
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
11
11
|
};
|
|
12
|
-
var _KupPhotoFrame_intObserver, _KupPhotoFrame_kupManager, _KupPhotoFrame_placeholderEl,
|
|
12
|
+
var _KupPhotoFrame_intObserver, _KupPhotoFrame_kupManager, _KupPhotoFrame_placeholderEl, _KupPhotoFrame_renderResource, _KupPhotoFrame_wrapperEl;
|
|
13
13
|
import { Component, Element, Event, forceUpdate, h, Host, Prop, State, } from '@stencil/core';
|
|
14
14
|
import { Method } from '@stencil/core/internal';
|
|
15
15
|
import { kupManagerInstance } from '../../managers/kup-manager/kup-manager';
|
|
@@ -52,7 +52,6 @@ export class KupPhotoFrame {
|
|
|
52
52
|
_KupPhotoFrame_intObserver.set(this, null);
|
|
53
53
|
_KupPhotoFrame_kupManager.set(this, kupManagerInstance());
|
|
54
54
|
_KupPhotoFrame_placeholderEl.set(this, null);
|
|
55
|
-
_KupPhotoFrame_resourceEl.set(this, null);
|
|
56
55
|
_KupPhotoFrame_renderResource.set(this, false);
|
|
57
56
|
_KupPhotoFrame_wrapperEl.set(this, null);
|
|
58
57
|
}
|
|
@@ -138,8 +137,7 @@ export class KupPhotoFrame {
|
|
|
138
137
|
id: this.rootElement.id,
|
|
139
138
|
});
|
|
140
139
|
} })),
|
|
141
|
-
__classPrivateFieldGet(this, _KupPhotoFrame_renderResource, "f") ? (h("img", Object.assign({}, this.resourceAttrs, { class: "resource",
|
|
142
|
-
__classPrivateFieldGet(this, _KupPhotoFrame_resourceEl, "f").classList.add('resource--fade-in');
|
|
140
|
+
__classPrivateFieldGet(this, _KupPhotoFrame_renderResource, "f") ? (h("img", Object.assign({}, this.resourceAttrs, { class: "resource", onLoad: () => {
|
|
143
141
|
__classPrivateFieldGet(this, _KupPhotoFrame_placeholderEl, "f").classList.add('placeholder--fade-out');
|
|
144
142
|
this.kupPhotoFrameResourceLoad.emit({
|
|
145
143
|
comp: this,
|
|
@@ -379,4 +377,4 @@ export class KupPhotoFrame {
|
|
|
379
377
|
}; }
|
|
380
378
|
static get elementRef() { return "rootElement"; }
|
|
381
379
|
}
|
|
382
|
-
_KupPhotoFrame_intObserver = new WeakMap(), _KupPhotoFrame_kupManager = new WeakMap(), _KupPhotoFrame_placeholderEl = new WeakMap(),
|
|
380
|
+
_KupPhotoFrame_intObserver = new WeakMap(), _KupPhotoFrame_kupManager = new WeakMap(), _KupPhotoFrame_placeholderEl = new WeakMap(), _KupPhotoFrame_renderResource = new WeakMap(), _KupPhotoFrame_wrapperEl = new WeakMap();
|
|
@@ -17,7 +17,10 @@ export var KupTextFieldProps;
|
|
|
17
17
|
KupTextFieldProps["isClearable"] = "Enables a clear trailing icon.";
|
|
18
18
|
KupTextFieldProps["label"] = "When set, its content will be shown as a label.";
|
|
19
19
|
KupTextFieldProps["leadingLabel"] = "When set to true, the label will be on the left of the component.";
|
|
20
|
+
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
21
|
KupTextFieldProps["maxLength"] = "When set, the helper will display a character counter.";
|
|
22
|
+
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.";
|
|
23
|
+
KupTextFieldProps["name"] = "The HTML name attribute used for form autocomplete.";
|
|
21
24
|
KupTextFieldProps["outlined"] = "When set to true, the component will be rendered as an outlined field.";
|
|
22
25
|
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
26
|
KupTextFieldProps["step"] = "The HTML step of the input element. It has effect only with number input type.";
|
|
@@ -102,6 +102,11 @@ export class KupTextField {
|
|
|
102
102
|
* @default null
|
|
103
103
|
*/
|
|
104
104
|
this.min = null;
|
|
105
|
+
/**
|
|
106
|
+
* The HTML name attribute used for form autocomplete.
|
|
107
|
+
* @default null
|
|
108
|
+
*/
|
|
109
|
+
this.name = null;
|
|
105
110
|
/**
|
|
106
111
|
* When set to true, the component will be rendered as an outlined field.
|
|
107
112
|
* @default false
|
|
@@ -305,6 +310,7 @@ export class KupTextField {
|
|
|
305
310
|
max: this.max,
|
|
306
311
|
maxLength: this.maxLength,
|
|
307
312
|
min: this.min,
|
|
313
|
+
name: this.name,
|
|
308
314
|
outlined: this.outlined,
|
|
309
315
|
readOnly: this.readOnly,
|
|
310
316
|
secondary: this.rootElement.classList.contains('kup-secondary')
|
|
@@ -689,6 +695,27 @@ export class KupTextField {
|
|
|
689
695
|
"reflect": false,
|
|
690
696
|
"defaultValue": "null"
|
|
691
697
|
},
|
|
698
|
+
"name": {
|
|
699
|
+
"type": "string",
|
|
700
|
+
"mutable": false,
|
|
701
|
+
"complexType": {
|
|
702
|
+
"original": "string",
|
|
703
|
+
"resolved": "string",
|
|
704
|
+
"references": {}
|
|
705
|
+
},
|
|
706
|
+
"required": false,
|
|
707
|
+
"optional": false,
|
|
708
|
+
"docs": {
|
|
709
|
+
"tags": [{
|
|
710
|
+
"name": "default",
|
|
711
|
+
"text": "null"
|
|
712
|
+
}],
|
|
713
|
+
"text": "The HTML name attribute used for form autocomplete."
|
|
714
|
+
},
|
|
715
|
+
"attribute": "name",
|
|
716
|
+
"reflect": false,
|
|
717
|
+
"defaultValue": "null"
|
|
718
|
+
},
|
|
692
719
|
"outlined": {
|
|
693
720
|
"type": "boolean",
|
|
694
721
|
"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
|
/*-------------------------------------------------*/
|
|
@@ -189,7 +190,6 @@ export class KupTree {
|
|
|
189
190
|
if (this.store && this.stateId) {
|
|
190
191
|
const state = this.store.getState(this.stateId);
|
|
191
192
|
if (state != null) {
|
|
192
|
-
console.log('Initialize with state for stateId ' + this.stateId, state);
|
|
193
193
|
this.density = state.density;
|
|
194
194
|
this.showFilters = state.showFilters;
|
|
195
195
|
this.showFooter = state.showFooter;
|
|
@@ -236,7 +236,6 @@ export class KupTree {
|
|
|
236
236
|
return;
|
|
237
237
|
}
|
|
238
238
|
if (somethingChanged) {
|
|
239
|
-
console.log('Persisting state for stateId ' + this.stateId + ': ', this.state);
|
|
240
239
|
this.store.persistState(this.stateId, this.state);
|
|
241
240
|
}
|
|
242
241
|
}
|
|
@@ -545,7 +544,7 @@ export class KupTree {
|
|
|
545
544
|
this.closeTotalMenu();
|
|
546
545
|
this.openTotalMenu(column);
|
|
547
546
|
}
|
|
548
|
-
getEventDetails(path) {
|
|
547
|
+
getEventDetails(path, e) {
|
|
549
548
|
let isHeader, isBody, isFooter, td, th, tr, filterRemove;
|
|
550
549
|
if (path) {
|
|
551
550
|
for (let i = path.length - 1; i >= 0; i--) {
|
|
@@ -617,6 +616,7 @@ export class KupTree {
|
|
|
617
616
|
cell: cell ? cell : null,
|
|
618
617
|
column: column ? column : null,
|
|
619
618
|
filterRemove: filterRemove ? filterRemove : null,
|
|
619
|
+
originalEvent: e,
|
|
620
620
|
row: row ? row : null,
|
|
621
621
|
td: td ? td : null,
|
|
622
622
|
th: th ? th : null,
|
|
@@ -625,7 +625,7 @@ export class KupTree {
|
|
|
625
625
|
}
|
|
626
626
|
contextMenuHandler(e) {
|
|
627
627
|
e.preventDefault();
|
|
628
|
-
const details = this.getEventDetails(this.getEventPath(e.target));
|
|
628
|
+
const details = this.getEventDetails(this.getEventPath(e.target), e);
|
|
629
629
|
if (details.area === 'header') {
|
|
630
630
|
if (details.th && details.column) {
|
|
631
631
|
this.openColumnMenu(details.column.name);
|
|
@@ -1373,6 +1373,12 @@ export class KupTree {
|
|
|
1373
1373
|
}
|
|
1374
1374
|
}
|
|
1375
1375
|
}
|
|
1376
|
+
if (root) {
|
|
1377
|
+
const fs = root.querySelectorAll('.f-text-field');
|
|
1378
|
+
for (let index = 0; index < fs.length; index++) {
|
|
1379
|
+
FTextFieldMDC(fs[index]);
|
|
1380
|
+
}
|
|
1381
|
+
}
|
|
1376
1382
|
if (this.preventXScroll) {
|
|
1377
1383
|
this.setEllipsis();
|
|
1378
1384
|
}
|
|
@@ -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 = [
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { KupTagNames } from '../../types/GenericTypes';
|
|
2
|
-
import {
|
|
1
|
+
import { KupTagNames, } from '../../types/GenericTypes';
|
|
2
|
+
import { autoCenterComps, editableTypes, FCellClasses, FCellEvents, FCellTypes, fullWidthFieldsComps, kupTypes, } from './f-cell-declarations';
|
|
3
3
|
import { h } from '@stencil/core';
|
|
4
4
|
import { getCellValueForDisplay } from '../../utils/cell-utils';
|
|
5
5
|
import { FCheckbox } from '../f-checkbox/f-checkbox';
|
|
@@ -8,6 +8,7 @@ import { stringToNumber } from '../../utils/utils';
|
|
|
8
8
|
import { FImage } from '../f-image/f-image';
|
|
9
9
|
import { FChip } from '../f-chip/f-chip';
|
|
10
10
|
import { KupThemeColorValues } from '../../managers/kup-theme/kup-theme-declarations';
|
|
11
|
+
import { FSwitch } from '../f-switch/f-switch';
|
|
11
12
|
const dom = document.documentElement;
|
|
12
13
|
/*-------------------------------------------------*/
|
|
13
14
|
/* C o m p o n e n t */
|
|
@@ -26,7 +27,7 @@ export const FCell = (props, children) => {
|
|
|
26
27
|
const hasObj = !dom.ketchup.objects.isEmptyKupObj(cell.obj);
|
|
27
28
|
const isEditable = cell.isEditable && props.editable ? true : false;
|
|
28
29
|
const valueToDisplay = props.previousValue !== cell.value ? cell.value : '';
|
|
29
|
-
const cellType =
|
|
30
|
+
const cellType = dom.ketchup.data.cell.getType(cell, shape);
|
|
30
31
|
const subcomponentProps = Object.assign({}, cell.data);
|
|
31
32
|
let cssClasses = cell.cssClass
|
|
32
33
|
? cell.cssClass
|
|
@@ -201,27 +202,28 @@ function setCellSizeKup(cellType, subcomponentProps, cell) {
|
|
|
201
202
|
function setEditableCell(cellType, classObj, cell, column, props) {
|
|
202
203
|
switch (cellType) {
|
|
203
204
|
case FCellTypes.AUTOCOMPLETE:
|
|
204
|
-
return (h("kup-autocomplete", Object.assign({}, cell.data, { class:
|
|
205
|
+
return (h("kup-autocomplete", Object.assign({ initialValue: cell.value }, cell.data, { class: isFullWidth(props) ? 'kup-full-width' : '', "onkup-autocomplete-change": (e) => cellEvent(e, props, cellType, FCellEvents.UPDATE), "onkup-autocomplete-input": (e) => cellEvent(e, props, cellType, FCellEvents.INPUT), "onkup-autocomplete-iconclick": (e) => cellEvent(e, props, cellType, FCellEvents.ICON_CLICK) })));
|
|
205
206
|
case FCellTypes.CHECKBOX:
|
|
206
|
-
if (
|
|
207
|
-
.tagName)) {
|
|
207
|
+
if (isAutoCentered(props)) {
|
|
208
208
|
classObj[FCellClasses.C_CENTERED] = true;
|
|
209
209
|
}
|
|
210
210
|
return (h(FCheckbox, Object.assign({}, cell.data, { onChange: (e) => cellEvent(e, props, cellType, FCellEvents.UPDATE) })));
|
|
211
211
|
case FCellTypes.COLOR_PICKER:
|
|
212
|
-
return (h("kup-color-picker", Object.assign({}, cell.data, { class:
|
|
212
|
+
return (h("kup-color-picker", Object.assign({ initialValue: cell.value }, cell.data, { class: isFullWidth(props) ? 'kup-full-width' : '', disabled: false, "onkup-colorpicker-change": (e) => cellEvent(e, props, cellType, FCellEvents.UPDATE) })));
|
|
213
213
|
case FCellTypes.COMBOBOX:
|
|
214
|
-
return (h("kup-combobox", Object.assign({}, cell.data, { class:
|
|
214
|
+
return (h("kup-combobox", Object.assign({ initialValue: cell.value }, cell.data, { class: isFullWidth(props) ? 'kup-full-width' : '', "onkup-combobox-change": (e) => cellEvent(e, props, cellType, FCellEvents.UPDATE), "onkup-combobox-input": (e) => cellEvent(e, props, cellType, FCellEvents.INPUT), "onkup-combobox-iconclick": (e) => cellEvent(e, props, cellType, FCellEvents.ICON_CLICK) })));
|
|
215
215
|
case FCellTypes.DATE:
|
|
216
|
-
return (h("kup-date-picker", Object.assign({ initialValue: cell.value }, cell.data, { class:
|
|
216
|
+
return (h("kup-date-picker", Object.assign({ initialValue: cell.value }, cell.data, { class: isFullWidth(props) ? 'kup-full-width' : '', "onkup-datepicker-change": (e) => cellEvent(e, props, cellType, FCellEvents.UPDATE), "onkup-datepicker-input": (e) => cellEvent(e, props, cellType, FCellEvents.INPUT) })));
|
|
217
217
|
case FCellTypes.RATING:
|
|
218
218
|
return (h("kup-rating", Object.assign({}, cell.data, { disabled: false, "onkup-rating-click": (e) => cellEvent(e, props, cellType, FCellEvents.UPDATE) })));
|
|
219
|
+
case FCellTypes.SWITCH:
|
|
220
|
+
return (h(FSwitch, Object.assign({}, cell.data, { disabled: false, onChange: (e) => cellEvent(e, props, cellType, FCellEvents.UPDATE) })));
|
|
219
221
|
case FCellTypes.TIME:
|
|
220
|
-
return (h("kup-time-picker", Object.assign({ initialValue: cell.value }, cell.data, { class:
|
|
222
|
+
return (h("kup-time-picker", Object.assign({ initialValue: cell.value }, cell.data, { class: isFullWidth(props) ? 'kup-full-width' : '', "onkup-timepicker-change": (e) => cellEvent(e, props, cellType, FCellEvents.UPDATE), "onkup-timepicker-input": (e) => cellEvent(e, props, cellType, FCellEvents.INPUT) })));
|
|
221
223
|
case FCellTypes.NUMBER:
|
|
222
224
|
classObj[FCellClasses.C_RIGHT_ALIGNED] = true;
|
|
223
225
|
case FCellTypes.STRING:
|
|
224
|
-
return (h(FTextField, Object.assign({}, cell.data, { icon: cell.icon ? cell.icon : column.icon ? column.icon : null, fullWidth: true, inputType: cellType === FCellTypes.NUMBER ? 'number' : null, value: cellType === FCellTypes.NUMBER
|
|
226
|
+
return (h(FTextField, Object.assign({}, cell.data, { icon: cell.icon ? cell.icon : column.icon ? column.icon : null, fullWidth: isFullWidth(props) ? true : false, inputType: cellType === FCellTypes.NUMBER ? 'number' : null, value: cellType === FCellTypes.NUMBER
|
|
225
227
|
? stringToNumber(cell.value).toString()
|
|
226
228
|
: cell.value, onChange: (e) => cellEvent(e, props, cellType, FCellEvents.UPDATE), onInput: (e) => cellEvent(e, props, cellType, FCellEvents.INPUT), onIconClick: (e) => cellEvent(e, props, cellType, FCellEvents.ICON_CLICK) })));
|
|
227
229
|
}
|
|
@@ -239,8 +241,7 @@ function setCell(cellType, subcomponentProps, content, classObj, cell, column, p
|
|
|
239
241
|
}
|
|
240
242
|
return content;
|
|
241
243
|
case FCellTypes.CHECKBOX:
|
|
242
|
-
if (
|
|
243
|
-
.tagName)) {
|
|
244
|
+
if (isAutoCentered(props)) {
|
|
244
245
|
classObj[FCellClasses.C_CENTERED] = true;
|
|
245
246
|
}
|
|
246
247
|
return (h(FImage, { resource: subcomponentProps.checked
|
|
@@ -250,8 +251,7 @@ function setCell(cellType, subcomponentProps, content, classObj, cell, column, p
|
|
|
250
251
|
return h("div", { innerHTML: cell.value });
|
|
251
252
|
case FCellTypes.ICON:
|
|
252
253
|
case FCellTypes.IMAGE:
|
|
253
|
-
if (
|
|
254
|
-
.tagName)) {
|
|
254
|
+
if (isAutoCentered(props)) {
|
|
255
255
|
classObj[FCellClasses.C_CENTERED] = true;
|
|
256
256
|
}
|
|
257
257
|
if (subcomponentProps.badgeData) {
|
|
@@ -267,13 +267,18 @@ function setCell(cellType, subcomponentProps, content, classObj, cell, column, p
|
|
|
267
267
|
if (cellValueNumber < 0) {
|
|
268
268
|
classObj[FCellClasses.TEXT_DANGER] = true;
|
|
269
269
|
}
|
|
270
|
-
if (
|
|
271
|
-
.tagName)) {
|
|
270
|
+
if (isAutoCentered(props)) {
|
|
272
271
|
classObj[FCellClasses.C_RIGHT_ALIGNED] = true;
|
|
273
272
|
}
|
|
274
273
|
return h("div", { class: "f-cell__text" }, cellValue);
|
|
275
274
|
}
|
|
276
275
|
return h("div", { class: "f-cell__text" }, content);
|
|
276
|
+
case FCellTypes.SWITCH:
|
|
277
|
+
if (isAutoCentered(props)) {
|
|
278
|
+
classObj[FCellClasses.C_CENTERED] = true;
|
|
279
|
+
}
|
|
280
|
+
subcomponentProps['disabled'] = true;
|
|
281
|
+
return h(FSwitch, Object.assign({}, subcomponentProps));
|
|
277
282
|
default:
|
|
278
283
|
return h("div", { class: "f-cell__text" }, content);
|
|
279
284
|
}
|
|
@@ -293,14 +298,12 @@ function setKupCell(cellType, classObj, subcomponentProps, cell, row, column, pr
|
|
|
293
298
|
h(FImage, Object.assign({}, subcomponentProps))));
|
|
294
299
|
}
|
|
295
300
|
case FCellTypes.BUTTON:
|
|
296
|
-
if (
|
|
297
|
-
.tagName)) {
|
|
301
|
+
if (isAutoCentered(props)) {
|
|
298
302
|
classObj[FCellClasses.C_CENTERED] = true;
|
|
299
303
|
}
|
|
300
304
|
return (h("kup-button", Object.assign({}, subcomponentProps, { "onkup-button-click": (e) => cellEvent(e, props, cellType, FCellEvents.CLICK) })));
|
|
301
305
|
case FCellTypes.BUTTON_LIST:
|
|
302
|
-
if (
|
|
303
|
-
.tagName)) {
|
|
306
|
+
if (isAutoCentered(props)) {
|
|
304
307
|
classObj[FCellClasses.C_CENTERED] = true;
|
|
305
308
|
}
|
|
306
309
|
subcomponentProps['data-storage'] = {
|
|
@@ -310,23 +313,21 @@ function setKupCell(cellType, classObj, subcomponentProps, cell, row, column, pr
|
|
|
310
313
|
};
|
|
311
314
|
return h("kup-button-list", Object.assign({}, subcomponentProps));
|
|
312
315
|
case FCellTypes.CHART:
|
|
313
|
-
if (
|
|
314
|
-
.tagName)) {
|
|
316
|
+
if (isAutoCentered(props)) {
|
|
315
317
|
classObj[FCellClasses.C_CENTERED] = true;
|
|
316
318
|
}
|
|
317
319
|
return h("kup-chart", Object.assign({}, subcomponentProps));
|
|
318
320
|
case FCellTypes.CHIP:
|
|
319
321
|
return h(FChip, Object.assign({}, subcomponentProps));
|
|
320
322
|
case FCellTypes.COLOR_PICKER:
|
|
321
|
-
return (h("kup-color-picker", Object.assign({}, subcomponentProps, { class:
|
|
323
|
+
return (h("kup-color-picker", Object.assign({}, subcomponentProps, { class: isFullWidth(props) ? 'kup-full-width' : '', disabled: true })));
|
|
322
324
|
case FCellTypes.GAUGE:
|
|
323
325
|
return (h("kup-gauge", Object.assign({ value: stringToNumber(cell.value), "width-component": "280px" }, subcomponentProps)));
|
|
324
326
|
case FCellTypes.KNOB:
|
|
325
327
|
case FCellTypes.PROGRESS_BAR:
|
|
326
328
|
return h("kup-progress-bar", Object.assign({}, subcomponentProps));
|
|
327
329
|
case FCellTypes.RADIO:
|
|
328
|
-
if (
|
|
329
|
-
.tagName)) {
|
|
330
|
+
if (isAutoCentered(props)) {
|
|
330
331
|
classObj[FCellClasses.C_CENTERED] = true;
|
|
331
332
|
}
|
|
332
333
|
subcomponentProps['disabled'] = row.readOnly;
|
|
@@ -335,94 +336,6 @@ function setKupCell(cellType, classObj, subcomponentProps, cell, row, column, pr
|
|
|
335
336
|
return h("kup-rating", Object.assign({}, subcomponentProps, { disabled: true }));
|
|
336
337
|
}
|
|
337
338
|
}
|
|
338
|
-
function getCellType(cell, shape) {
|
|
339
|
-
const obj = cell.obj;
|
|
340
|
-
if (shape) {
|
|
341
|
-
switch (shape.toUpperCase()) {
|
|
342
|
-
case FCellShapes.AUTOCOMPLETE:
|
|
343
|
-
return FCellTypes.AUTOCOMPLETE;
|
|
344
|
-
case FCellShapes.BUTTON_LIST:
|
|
345
|
-
return FCellTypes.BUTTON_LIST;
|
|
346
|
-
case FCellShapes.CHART:
|
|
347
|
-
return FCellTypes.CHART;
|
|
348
|
-
case FCellShapes.CHECKBOX:
|
|
349
|
-
return FCellTypes.CHECKBOX;
|
|
350
|
-
case FCellShapes.CHIP:
|
|
351
|
-
return FCellTypes.CHIP;
|
|
352
|
-
case FCellShapes.COLOR_PICKER:
|
|
353
|
-
return FCellTypes.COLOR_PICKER;
|
|
354
|
-
case FCellShapes.COMBOBOX:
|
|
355
|
-
return FCellTypes.COMBOBOX;
|
|
356
|
-
case FCellShapes.EDITOR:
|
|
357
|
-
return FCellTypes.EDITOR;
|
|
358
|
-
case FCellShapes.GAUGE:
|
|
359
|
-
return FCellTypes.GAUGE;
|
|
360
|
-
case FCellShapes.IMAGE:
|
|
361
|
-
return FCellTypes.IMAGE;
|
|
362
|
-
case FCellShapes.KNOB:
|
|
363
|
-
return FCellTypes.KNOB;
|
|
364
|
-
case FCellShapes.PROGRESS_BAR:
|
|
365
|
-
return FCellTypes.PROGRESS_BAR;
|
|
366
|
-
case FCellShapes.RADIO:
|
|
367
|
-
return FCellTypes.RADIO;
|
|
368
|
-
case FCellShapes.RATING:
|
|
369
|
-
return FCellTypes.RATING;
|
|
370
|
-
case FCellShapes.TEXT_FIELD:
|
|
371
|
-
return FCellTypes.STRING;
|
|
372
|
-
}
|
|
373
|
-
}
|
|
374
|
-
if (dom.ketchup.objects.isBar(obj)) {
|
|
375
|
-
return FCellTypes.BAR;
|
|
376
|
-
}
|
|
377
|
-
else if (dom.ketchup.objects.isButton(obj)) {
|
|
378
|
-
return FCellTypes.BUTTON;
|
|
379
|
-
}
|
|
380
|
-
else if (dom.ketchup.objects.isChart(obj)) {
|
|
381
|
-
return FCellTypes.CHART;
|
|
382
|
-
}
|
|
383
|
-
else if (dom.ketchup.objects.isCheckbox(obj)) {
|
|
384
|
-
return FCellTypes.CHECKBOX;
|
|
385
|
-
}
|
|
386
|
-
else if (dom.ketchup.objects.isColor(obj)) {
|
|
387
|
-
return FCellTypes.COLOR_PICKER;
|
|
388
|
-
}
|
|
389
|
-
else if (dom.ketchup.objects.isIcon(obj)) {
|
|
390
|
-
return FCellTypes.ICON;
|
|
391
|
-
}
|
|
392
|
-
else if (dom.ketchup.objects.isImage(obj)) {
|
|
393
|
-
return FCellTypes.IMAGE;
|
|
394
|
-
}
|
|
395
|
-
else if (dom.ketchup.objects.isLink(obj)) {
|
|
396
|
-
return FCellTypes.LINK;
|
|
397
|
-
}
|
|
398
|
-
else if (dom.ketchup.objects.isProgressBar(obj)) {
|
|
399
|
-
return FCellTypes.PROGRESS_BAR;
|
|
400
|
-
}
|
|
401
|
-
else if (dom.ketchup.objects.isRadio(obj)) {
|
|
402
|
-
return FCellTypes.RADIO;
|
|
403
|
-
}
|
|
404
|
-
else if (dom.ketchup.objects.isKupObjList(obj)) {
|
|
405
|
-
return FCellTypes.CHIP;
|
|
406
|
-
}
|
|
407
|
-
else if (dom.ketchup.objects.isNumber(obj)) {
|
|
408
|
-
return FCellTypes.NUMBER;
|
|
409
|
-
}
|
|
410
|
-
else if (dom.ketchup.objects.isDate(obj)) {
|
|
411
|
-
return FCellTypes.DATE;
|
|
412
|
-
}
|
|
413
|
-
else if (dom.ketchup.objects.isTimestamp(obj)) {
|
|
414
|
-
return FCellTypes.DATETIME;
|
|
415
|
-
}
|
|
416
|
-
else if (dom.ketchup.objects.isTime(obj)) {
|
|
417
|
-
return FCellTypes.TIME;
|
|
418
|
-
}
|
|
419
|
-
else if (dom.ketchup.objects.isVoCodver(obj)) {
|
|
420
|
-
return FCellTypes.ICON;
|
|
421
|
-
}
|
|
422
|
-
else {
|
|
423
|
-
return FCellTypes.STRING;
|
|
424
|
-
}
|
|
425
|
-
}
|
|
426
339
|
function cellEvent(e, props, cellType, cellEventName) {
|
|
427
340
|
const cell = props.cell;
|
|
428
341
|
const column = props.column;
|
|
@@ -443,6 +356,7 @@ function cellEvent(e, props, cellType, cellEventName) {
|
|
|
443
356
|
}
|
|
444
357
|
break;
|
|
445
358
|
case FCellTypes.CHECKBOX:
|
|
359
|
+
case FCellTypes.SWITCH:
|
|
446
360
|
value = value === 'on' ? '0' : '1';
|
|
447
361
|
if (cell.data) {
|
|
448
362
|
cell.data.checked =
|
|
@@ -479,3 +393,9 @@ function cellEvent(e, props, cellType, cellEventName) {
|
|
|
479
393
|
catch (error) { }
|
|
480
394
|
}
|
|
481
395
|
}
|
|
396
|
+
function isAutoCentered(props) {
|
|
397
|
+
return autoCenterComps.includes(props.component.rootElement.tagName);
|
|
398
|
+
}
|
|
399
|
+
function isFullWidth(props) {
|
|
400
|
+
return fullWidthFieldsComps.includes(props.component.rootElement.tagName);
|
|
401
|
+
}
|
|
@@ -55,7 +55,7 @@ function setContent(props) {
|
|
|
55
55
|
props.maxLength)) : undefined,
|
|
56
56
|
!props.trailingIcon ? iconEl : undefined,
|
|
57
57
|
props.textArea ? (h("span", { class: "mdc-text-field__resizer" },
|
|
58
|
-
h("textarea", { class: "mdc-text-field__input", disabled: props.disabled, readOnly: props.readOnly, maxlength: props.maxLength, value: props.value, onBlur: props.onBlur, onClick: props.onClick, onChange: props.onChange, onFocus: props.onFocus, onInput: props.onInput, onKeyDown: props.onKeyDown }))) : (h("input", { type: props.inputType ? props.inputType : 'text', step: props.step, min: props.min, max: props.max, class: "mdc-text-field__input", disabled: props.disabled, readOnly: props.readOnly, placeholder: props.fullWidth ? props.label : undefined, maxlength: props.maxLength, value: props.value, onBlur: props.onBlur, onClick: props.onClick, onChange: props.onChange, onFocus: props.onFocus, onInput: props.onInput, onKeyDown: props.onKeyDown })),
|
|
58
|
+
h("textarea", { class: "mdc-text-field__input", disabled: props.disabled, readOnly: props.readOnly, maxlength: props.maxLength, value: props.value, onBlur: props.onBlur, onClick: props.onClick, onChange: props.onChange, onFocus: props.onFocus, onInput: props.onInput, onKeyDown: props.onKeyDown }))) : (h("input", { type: props.inputType ? props.inputType : 'text', step: props.step, min: props.min, max: props.max, name: props.name, class: "mdc-text-field__input", disabled: props.disabled, readOnly: props.readOnly, placeholder: props.fullWidth ? props.label : undefined, maxlength: props.maxLength, value: props.value, onBlur: props.onBlur, onClick: props.onClick, onChange: props.onChange, onFocus: props.onFocus, onInput: props.onInput, onKeyDown: props.onKeyDown })),
|
|
59
59
|
props.isClearable ? (h("span", { class: `mdc-text-field__icon kup-icon ${KupThemeIconValues.CLEAR.replace('--', '')}`, onClick: props.onClearIconClick })) : undefined,
|
|
60
60
|
props.trailingIcon ? iconEl : undefined,
|
|
61
61
|
!props.fullWidth && !isOutlined ? labelEl : undefined,
|
|
@@ -5,6 +5,7 @@ import { findRow, toNode } from './kup-data-row-helper';
|
|
|
5
5
|
import { getParentNode, removeNode, setPropertiesNode, toStreamNode, } from './kup-data-node-helper';
|
|
6
6
|
import { fieldColumn } from '../../components/kup-data-table/kup-data-table-declarations';
|
|
7
7
|
import { KupDebugCategory } from '../kup-debug/kup-debug-declarations';
|
|
8
|
+
import { FCellShapes, FCellTypes, } from '../../f-components/f-cell/f-cell-declarations';
|
|
8
9
|
const dom = document.documentElement;
|
|
9
10
|
/**
|
|
10
11
|
* Handles data operations.
|
|
@@ -22,6 +23,99 @@ export class KupData {
|
|
|
22
23
|
replace(dataset, cell, columns) {
|
|
23
24
|
return replaceCell(dataset, cell, columns);
|
|
24
25
|
},
|
|
26
|
+
getType(cell, shape) {
|
|
27
|
+
const obj = cell.obj;
|
|
28
|
+
if (shape) {
|
|
29
|
+
switch (shape.toUpperCase()) {
|
|
30
|
+
case FCellShapes.AUTOCOMPLETE:
|
|
31
|
+
return FCellTypes.AUTOCOMPLETE;
|
|
32
|
+
case FCellShapes.BUTTON_LIST:
|
|
33
|
+
return FCellTypes.BUTTON_LIST;
|
|
34
|
+
case FCellShapes.CHART:
|
|
35
|
+
return FCellTypes.CHART;
|
|
36
|
+
case FCellShapes.CHECKBOX:
|
|
37
|
+
return FCellTypes.CHECKBOX;
|
|
38
|
+
case FCellShapes.CHIP:
|
|
39
|
+
return FCellTypes.CHIP;
|
|
40
|
+
case FCellShapes.COLOR_PICKER:
|
|
41
|
+
return FCellTypes.COLOR_PICKER;
|
|
42
|
+
case FCellShapes.COMBOBOX:
|
|
43
|
+
return FCellTypes.COMBOBOX;
|
|
44
|
+
case FCellShapes.EDITOR:
|
|
45
|
+
return FCellTypes.EDITOR;
|
|
46
|
+
case FCellShapes.GAUGE:
|
|
47
|
+
return FCellTypes.GAUGE;
|
|
48
|
+
case FCellShapes.IMAGE:
|
|
49
|
+
return FCellTypes.IMAGE;
|
|
50
|
+
case FCellShapes.KNOB:
|
|
51
|
+
return FCellTypes.KNOB;
|
|
52
|
+
case FCellShapes.PROGRESS_BAR:
|
|
53
|
+
return FCellTypes.PROGRESS_BAR;
|
|
54
|
+
case FCellShapes.RADIO:
|
|
55
|
+
return FCellTypes.RADIO;
|
|
56
|
+
case FCellShapes.RATING:
|
|
57
|
+
return FCellTypes.RATING;
|
|
58
|
+
case FCellShapes.SWITCH:
|
|
59
|
+
return FCellTypes.SWITCH;
|
|
60
|
+
case FCellShapes.TEXT_FIELD:
|
|
61
|
+
return FCellTypes.STRING;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
if (dom.ketchup.objects.isBar(obj)) {
|
|
65
|
+
return FCellTypes.BAR;
|
|
66
|
+
}
|
|
67
|
+
else if (dom.ketchup.objects.isButton(obj)) {
|
|
68
|
+
return FCellTypes.BUTTON;
|
|
69
|
+
}
|
|
70
|
+
else if (dom.ketchup.objects.isChart(obj)) {
|
|
71
|
+
return FCellTypes.CHART;
|
|
72
|
+
}
|
|
73
|
+
else if (dom.ketchup.objects.isCheckbox(obj)) {
|
|
74
|
+
return FCellTypes.CHECKBOX;
|
|
75
|
+
}
|
|
76
|
+
else if (dom.ketchup.objects.isColor(obj)) {
|
|
77
|
+
return FCellTypes.COLOR_PICKER;
|
|
78
|
+
}
|
|
79
|
+
else if (dom.ketchup.objects.isIcon(obj)) {
|
|
80
|
+
return FCellTypes.ICON;
|
|
81
|
+
}
|
|
82
|
+
else if (dom.ketchup.objects.isImage(obj)) {
|
|
83
|
+
return FCellTypes.IMAGE;
|
|
84
|
+
}
|
|
85
|
+
else if (dom.ketchup.objects.isLink(obj)) {
|
|
86
|
+
return FCellTypes.LINK;
|
|
87
|
+
}
|
|
88
|
+
else if (dom.ketchup.objects.isProgressBar(obj)) {
|
|
89
|
+
return FCellTypes.PROGRESS_BAR;
|
|
90
|
+
}
|
|
91
|
+
else if (dom.ketchup.objects.isRadio(obj)) {
|
|
92
|
+
return FCellTypes.RADIO;
|
|
93
|
+
}
|
|
94
|
+
else if (dom.ketchup.objects.isSwitch(obj)) {
|
|
95
|
+
return FCellTypes.SWITCH;
|
|
96
|
+
}
|
|
97
|
+
else if (dom.ketchup.objects.isKupObjList(obj)) {
|
|
98
|
+
return FCellTypes.CHIP;
|
|
99
|
+
}
|
|
100
|
+
else if (dom.ketchup.objects.isNumber(obj)) {
|
|
101
|
+
return FCellTypes.NUMBER;
|
|
102
|
+
}
|
|
103
|
+
else if (dom.ketchup.objects.isDate(obj)) {
|
|
104
|
+
return FCellTypes.DATE;
|
|
105
|
+
}
|
|
106
|
+
else if (dom.ketchup.objects.isTimestamp(obj)) {
|
|
107
|
+
return FCellTypes.DATETIME;
|
|
108
|
+
}
|
|
109
|
+
else if (dom.ketchup.objects.isTime(obj)) {
|
|
110
|
+
return FCellTypes.TIME;
|
|
111
|
+
}
|
|
112
|
+
else if (dom.ketchup.objects.isVoCodver(obj)) {
|
|
113
|
+
return FCellTypes.ICON;
|
|
114
|
+
}
|
|
115
|
+
else {
|
|
116
|
+
return FCellTypes.STRING;
|
|
117
|
+
}
|
|
118
|
+
},
|
|
25
119
|
};
|
|
26
120
|
this.column = {
|
|
27
121
|
find(dataset, filters) {
|
|
@@ -36,6 +36,17 @@ export var KupLanguageColumn;
|
|
|
36
36
|
KupLanguageColumn["NON_NUMERICAL_IN_TABLE"] = "columnNonNumericalInTable";
|
|
37
37
|
KupLanguageColumn["SWAP"] = "columnSwap";
|
|
38
38
|
})(KupLanguageColumn || (KupLanguageColumn = {}));
|
|
39
|
+
/**
|
|
40
|
+
* Dashboard related decodes.
|
|
41
|
+
*/
|
|
42
|
+
export var KupLanguageDashboard;
|
|
43
|
+
(function (KupLanguageDashboard) {
|
|
44
|
+
KupLanguageDashboard["DIMENSION"] = "dashboardDimension";
|
|
45
|
+
KupLanguageDashboard["LOADED"] = "dashboardLoaded";
|
|
46
|
+
KupLanguageDashboard["RESET"] = "dashboardReset";
|
|
47
|
+
KupLanguageDashboard["SAVE"] = "dashboardSave";
|
|
48
|
+
KupLanguageDashboard["VERTICAL"] = "dashboardVertical";
|
|
49
|
+
})(KupLanguageDashboard || (KupLanguageDashboard = {}));
|
|
39
50
|
/**
|
|
40
51
|
* Debug widget decodes.
|
|
41
52
|
*/
|