@sme.up/ketchup 8.3.3 → 9.1.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/{component-24811409.js → component-cb3b32f5.js} +7 -2
- package/dist/cjs/{f-button-7687085a.js → f-button-733664a5.js} +2 -2
- package/dist/cjs/{f-cell-37ef6f00.js → f-cell-f37757a6.js} +201 -22
- package/dist/cjs/{f-checkbox-758d1d34.js → f-checkbox-556771e8.js} +1 -1
- package/dist/cjs/{f-chip-cf59bdb3.js → f-chip-3349d130.js} +3 -3
- package/dist/cjs/{f-image-1245b0cf.js → f-image-b7a5816b.js} +2 -2
- package/dist/cjs/{f-paginator-utils-b1af2a8f.js → f-paginator-utils-1fe1df76.js} +49 -50
- package/dist/cjs/{f-text-field-9c745112.js → f-text-field-8557fc3f.js} +38 -4
- package/dist/cjs/{f-text-field-mdc-b1fa6fd6.js → f-text-field-mdc-4fda9705.js} +1 -1
- package/dist/cjs/{index-eac07680.js → index-4b3a5567.js} +134 -26
- package/dist/cjs/ketchup.cjs.js +3 -3
- package/dist/cjs/kup-accordion.cjs.entry.js +4 -4
- package/dist/cjs/kup-autocomplete_27.cjs.entry.js +295 -338
- package/dist/cjs/kup-box.cjs.entry.js +25 -17
- package/dist/cjs/kup-calendar.cjs.entry.js +6 -6
- package/dist/cjs/kup-card-list.cjs.entry.js +244 -0
- package/dist/cjs/kup-cell.cjs.entry.js +9 -7
- package/dist/cjs/kup-dashboard.cjs.entry.js +8 -8
- package/dist/cjs/kup-drawer.cjs.entry.js +2 -2
- package/dist/cjs/kup-echart.cjs.entry.js +4579 -4431
- package/dist/cjs/kup-family-tree.cjs.entry.js +4 -4
- package/dist/cjs/kup-grid.cjs.entry.js +109 -0
- package/dist/cjs/kup-iframe.cjs.entry.js +2 -2
- package/dist/cjs/kup-image-list.cjs.entry.js +9 -9
- package/dist/cjs/kup-lazy.cjs.entry.js +2 -2
- package/dist/cjs/kup-magic-box.cjs.entry.js +3 -3
- package/dist/cjs/{kup-manager-38caaef3.js → kup-manager-cb73c128.js} +64 -14
- package/dist/cjs/kup-nav-bar.cjs.entry.js +2 -2
- package/dist/cjs/kup-numeric-picker.cjs.entry.js +5 -5
- package/dist/cjs/kup-photo-frame.cjs.entry.js +2 -2
- package/dist/cjs/kup-planner.cjs.entry.js +5 -5
- 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 +4 -4
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/assets/card-list.js +709 -0
- package/dist/collection/assets/data-table-performance.js +6 -0
- package/dist/collection/assets/data-table.js +44 -0
- package/dist/collection/assets/image-list.js +2 -12
- package/dist/collection/assets/index.js +8 -4
- package/dist/collection/assets/progress-bar.js +0 -0
- package/dist/collection/assets/radio.js +30 -0
- package/dist/collection/collection-manifest.json +3 -4
- package/dist/collection/components/kup-box/kup-box.js +14 -6
- package/dist/collection/components/kup-calendar/kup-calendar-declarations.js +1 -1
- package/dist/collection/components/kup-card/kup-card.css +34 -7
- package/dist/collection/components/kup-card/kup-card.js +25 -22
- package/dist/collection/components/kup-card/scalable/kup-card-scalable.js +45 -54
- package/dist/collection/components/kup-card/standard/kup-card-standard.js +10 -5
- package/dist/collection/components/kup-card-list/kup-card-list-declarations.js +13 -0
- package/dist/collection/components/kup-card-list/kup-card-list.css +34 -0
- package/dist/collection/components/kup-card-list/kup-card-list.js +481 -0
- package/dist/collection/components/kup-data-table/kup-data-table-helper.js +47 -48
- 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 +36 -22
- package/dist/collection/components/kup-echart/kup-echart.js +0 -2
- package/dist/collection/components/kup-grid/kup-grid.css +10 -0
- package/dist/collection/components/kup-progress-bar/kup-progress-bar.css +1 -242
- package/dist/collection/components/kup-progress-bar/kup-progress-bar.js +37 -84
- package/dist/collection/components/kup-radio/kup-radio.css +0 -161
- package/dist/collection/components/kup-radio/kup-radio.js +31 -26
- package/dist/collection/components/kup-rating/kup-rating.css +0 -8
- package/dist/collection/components/kup-rating/kup-rating.js +27 -52
- package/dist/collection/f-components/f-cell/f-cell-declarations.js +2 -0
- package/dist/collection/f-components/f-cell/f-cell.js +38 -17
- package/dist/collection/f-components/f-progress-bar/f-progress-bar-declarations.js +1 -0
- package/dist/collection/f-components/f-progress-bar/f-progress-bar.js +88 -0
- package/dist/collection/f-components/f-radio/f-radio-declarations.js +1 -0
- package/dist/collection/f-components/f-radio/f-radio.js +28 -0
- package/dist/collection/f-components/f-rating/f-rating-declarations.js +1 -0
- package/dist/collection/f-components/f-rating/f-rating.js +26 -0
- package/dist/collection/f-components/f-text-field/f-text-field.js +36 -2
- package/dist/collection/managers/kup-data/kup-data.js +2 -0
- package/dist/collection/managers/kup-math/kup-math.js +1 -1
- package/dist/collection/managers/kup-theme/kup-theme-declarations.js +33 -0
- package/dist/collection/managers/kup-theme/kup-theme.js +13 -1
- package/dist/collection/types/GenericTypes.js +1 -2
- package/dist/collection/utils/cell-utils.js +6 -7
- package/dist/components/index.d.ts +6 -0
- package/dist/components/index.js +1 -1
- package/dist/components/kup-accordion.js +2 -0
- package/dist/components/kup-autocomplete2.js +1555 -1387
- package/dist/components/kup-box2.js +24 -6
- package/dist/components/kup-calendar.js +4 -1
- package/dist/components/{kup-dash-list.d.ts → kup-card-list.d.ts} +4 -4
- package/dist/components/kup-card-list.js +408 -0
- package/dist/components/kup-cell.js +1 -1
- package/dist/components/kup-chart.js +1 -1
- package/dist/components/kup-checkbox.js +1 -1
- package/dist/components/kup-chip.js +1 -1
- package/dist/components/kup-color-picker.js +1 -1
- package/dist/components/kup-combobox.js +1 -1
- package/dist/components/kup-dashboard.js +3 -1
- package/dist/components/kup-data-table.js +1 -1
- package/dist/components/kup-date-picker.js +1 -1
- package/dist/components/kup-dialog.js +1 -1
- package/dist/components/kup-dropdown-button.js +1 -1
- package/dist/components/kup-echart2.js +4578 -4430
- package/dist/components/kup-family-tree.js +1 -1
- package/dist/components/kup-form.js +1 -1
- package/dist/components/kup-gauge.js +1 -1
- package/dist/components/kup-grid2.js +1 -1
- package/dist/components/kup-image-list.js +3 -1
- package/dist/components/kup-image.js +1 -1
- package/dist/components/kup-list.js +1 -1
- package/dist/components/kup-magic-box.js +1 -1
- package/dist/components/kup-numeric-picker.js +1 -1
- package/dist/components/kup-planner.js +3 -1
- package/dist/esm/{component-cc25b031.js → component-879e99bf.js} +7 -2
- package/dist/esm/{f-button-e54ce8d5.js → f-button-f247ce10.js} +2 -2
- package/dist/esm/{f-cell-4149a05d.js → f-cell-ba94f1b3.js} +199 -23
- package/dist/esm/{f-checkbox-7b113dd8.js → f-checkbox-cbf7b3de.js} +1 -1
- package/dist/esm/{f-chip-c3c86f7b.js → f-chip-104c4a64.js} +3 -3
- package/dist/esm/{f-image-adceee49.js → f-image-d2a9603c.js} +2 -2
- package/dist/esm/{f-paginator-utils-e559dac8.js → f-paginator-utils-743522fa.js} +49 -50
- package/dist/esm/{f-text-field-aa4497a8.js → f-text-field-4d91ccfc.js} +38 -4
- package/dist/esm/{f-text-field-mdc-32a1ffd9.js → f-text-field-mdc-1143cf21.js} +1 -1
- package/dist/esm/{index-d413187a.js → index-c161a33e.js} +134 -26
- package/dist/esm/ketchup.js +4 -4
- package/dist/esm/kup-accordion.entry.js +4 -4
- package/dist/esm/kup-autocomplete_27.entry.js +295 -338
- package/dist/esm/kup-box.entry.js +25 -17
- package/dist/esm/kup-calendar.entry.js +6 -6
- package/dist/esm/kup-card-list.entry.js +240 -0
- package/dist/esm/kup-cell.entry.js +9 -7
- package/dist/esm/kup-dashboard.entry.js +8 -8
- package/dist/esm/kup-drawer.entry.js +2 -2
- package/dist/esm/kup-echart.entry.js +4579 -4431
- package/dist/esm/kup-family-tree.entry.js +4 -4
- package/dist/esm/kup-grid.entry.js +105 -0
- package/dist/esm/kup-iframe.entry.js +2 -2
- package/dist/esm/kup-image-list.entry.js +9 -9
- package/dist/esm/kup-lazy.entry.js +2 -2
- package/dist/esm/kup-magic-box.entry.js +3 -3
- package/dist/esm/{kup-manager-a4153fb2.js → kup-manager-94b3d177.js} +64 -14
- package/dist/esm/kup-nav-bar.entry.js +2 -2
- package/dist/esm/kup-numeric-picker.entry.js +5 -5
- package/dist/esm/kup-photo-frame.entry.js +2 -2
- package/dist/esm/kup-planner.entry.js +5 -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 -4
- package/dist/esm/loader.js +3 -3
- package/dist/ketchup/ketchup.esm.js +1 -1
- package/dist/ketchup/p-12e47371.js +1 -0
- package/dist/ketchup/{p-3c44e838.entry.js → p-15548f51.entry.js} +1 -1
- package/dist/ketchup/p-20e8ab84.js +2 -0
- package/dist/ketchup/{p-2739b7ac.entry.js → p-21f1b22a.entry.js} +1 -1
- package/dist/ketchup/{p-e76b646c.js → p-2c47b88f.js} +3 -3
- package/dist/ketchup/{p-23d54fb2.entry.js → p-304f296e.entry.js} +1 -1
- package/dist/ketchup/p-48f8b0d5.entry.js +9 -0
- package/dist/ketchup/p-4ca502ce.entry.js +1 -0
- package/dist/ketchup/{p-698442ed.js → p-4d7c02f4.js} +1 -1
- package/dist/ketchup/{p-3d671241.entry.js → p-5abbf31b.entry.js} +1 -1
- package/dist/ketchup/{p-44b5c573.entry.js → p-5c9b10a5.entry.js} +1 -1
- package/dist/ketchup/{p-b415fe84.entry.js → p-5cb2dbf3.entry.js} +1 -1
- package/dist/ketchup/p-679ccbf8.js +1 -0
- package/dist/ketchup/p-6a0ac578.entry.js +1 -0
- package/dist/ketchup/{p-f3c8c1da.entry.js → p-87e13738.entry.js} +1 -1
- package/dist/ketchup/p-8e5db599.entry.js +1 -0
- package/dist/ketchup/{p-c0878519.entry.js → p-a14ede8c.entry.js} +1 -1
- package/dist/ketchup/{p-2f0798d3.js → p-a2007880.js} +1 -1
- package/dist/ketchup/p-a2b75445.entry.js +39 -0
- package/dist/ketchup/{p-47752f3b.js → p-b0678a34.js} +1 -1
- package/dist/ketchup/{p-7360a410.js → p-ba003975.js} +1 -1
- package/dist/ketchup/{p-d817be2a.js → p-bb80719e.js} +1 -1
- package/dist/ketchup/{p-c39ddeae.entry.js → p-bf41d71f.entry.js} +1 -1
- package/dist/ketchup/p-c32e8755.entry.js +1 -0
- package/dist/ketchup/p-c4b1bde1.entry.js +1 -0
- package/dist/ketchup/p-c6b58be6.entry.js +1 -0
- package/dist/ketchup/{p-6d9ffb32.js → p-cd2af1a6.js} +1 -1
- package/dist/ketchup/{p-124f3f42.js → p-d4a879fc.js} +1 -1
- package/dist/ketchup/{p-b623c774.entry.js → p-d56763cf.entry.js} +1 -1
- package/dist/ketchup/{p-3081ed82.entry.js → p-e7f57bee.entry.js} +1 -1
- package/dist/ketchup/{p-eec864dd.entry.js → p-eb12225c.entry.js} +1 -1
- package/dist/ketchup/{p-3bbcae45.entry.js → p-f22abf4e.entry.js} +1 -1
- package/dist/ketchup/{p-e917200c.entry.js → p-f82db512.entry.js} +1 -1
- package/dist/types/components/kup-box/kup-box.d.ts +1 -0
- package/dist/types/components/kup-calendar/kup-calendar-declarations.d.ts +1 -1
- package/dist/types/components/kup-calendar/kup-calendar.d.ts +1 -1
- package/dist/types/components/kup-card/kup-card.d.ts +3 -3
- package/dist/types/components/kup-card-list/kup-card-list-declarations.d.ts +35 -0
- package/dist/types/components/kup-card-list/kup-card-list.d.ts +62 -0
- package/dist/types/components/kup-data-table/kup-data-table-state.d.ts +1 -1
- package/dist/types/components/kup-progress-bar/kup-progress-bar.d.ts +0 -1
- package/dist/types/components/kup-radio/kup-radio-declarations.d.ts +1 -9
- package/dist/types/components/kup-radio/kup-radio.d.ts +3 -2
- package/dist/types/components/kup-rating/kup-rating.d.ts +2 -7
- package/dist/types/components.d.ts +103 -96
- package/dist/types/f-components/f-cell/f-cell-declarations.d.ts +2 -0
- package/dist/types/f-components/f-progress-bar/f-progress-bar-declarations.d.ts +16 -0
- package/dist/types/f-components/f-progress-bar/f-progress-bar.d.ts +3 -0
- package/dist/types/f-components/f-radio/f-radio-declarations.d.ts +22 -0
- package/dist/types/f-components/f-radio/f-radio.d.ts +3 -0
- package/dist/types/f-components/f-rating/f-rating-declarations.d.ts +10 -0
- package/dist/types/f-components/f-rating/f-rating.d.ts +3 -0
- package/dist/types/managers/kup-math/kup-math.d.ts +1 -1
- package/dist/types/managers/kup-theme/kup-theme-declarations.d.ts +12 -0
- package/dist/types/stencil-public-runtime.d.ts +16 -4
- package/dist/types/types/GenericTypes.d.ts +1 -2
- package/package.json +6 -3
- package/dist/cjs/kup-dash-list.cjs.entry.js +0 -116
- package/dist/cjs/kup-dash_2.cjs.entry.js +0 -179
- package/dist/collection/assets/dash-list.js +0 -474
- package/dist/collection/components/kup-dash/kup-dash.css +0 -136
- package/dist/collection/components/kup-dash/kup-dash.js +0 -171
- package/dist/collection/components/kup-dash-list/kup-dash-list.css +0 -10
- package/dist/collection/components/kup-dash-list/kup-dash-list.js +0 -331
- package/dist/components/kup-dash-list.js +0 -288
- package/dist/components/kup-dash.d.ts +0 -11
- package/dist/components/kup-dash.js +0 -6
- package/dist/components/kup-dash2.js +0 -228
- package/dist/esm/kup-dash-list.entry.js +0 -112
- package/dist/esm/kup-dash_2.entry.js +0 -174
- package/dist/ketchup/p-0848391f.entry.js +0 -1
- package/dist/ketchup/p-25d45dc9.entry.js +0 -1
- package/dist/ketchup/p-283ca113.entry.js +0 -1
- package/dist/ketchup/p-384137d7.entry.js +0 -39
- package/dist/ketchup/p-3972b97c.entry.js +0 -1
- package/dist/ketchup/p-5ce0e645.entry.js +0 -1
- package/dist/ketchup/p-b8fcbcc9.entry.js +0 -1
- package/dist/ketchup/p-be864593.entry.js +0 -9
- package/dist/ketchup/p-d680bdde.js +0 -1
- package/dist/ketchup/p-f79d544a.js +0 -1
- package/dist/ketchup/p-fd75d5bf.js +0 -2
- package/dist/types/components/kup-dash/kup-dash.d.ts +0 -33
- package/dist/types/components/kup-dash-list/kup-dash-list.d.ts +0 -22
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { forceUpdate,
|
|
1
|
+
import { forceUpdate, h, Host, } from "@stencil/core";
|
|
2
2
|
import { kupManagerInstance, } from "../../managers/kup-manager/kup-manager";
|
|
3
3
|
import { getProps, setProps } from "../../utils/utils";
|
|
4
4
|
import { componentWrapperId } from "../../variables/GenericVariables";
|
|
5
5
|
import { KupProgressBarProps } from "./kup-progress-bar-declarations";
|
|
6
|
+
import { FProgressBar } from "../../f-components/f-progress-bar/f-progress-bar";
|
|
6
7
|
export class KupProgressBar {
|
|
7
8
|
constructor() {
|
|
8
9
|
/*-------------------------------------------------*/
|
|
@@ -45,27 +46,6 @@ export class KupProgressBar {
|
|
|
45
46
|
setProps(this, KupProgressBarProps, props);
|
|
46
47
|
}
|
|
47
48
|
/*-------------------------------------------------*/
|
|
48
|
-
/* P r i v a t e M e t h o d s */
|
|
49
|
-
/*-------------------------------------------------*/
|
|
50
|
-
createIconElement() {
|
|
51
|
-
if (!this.icon) {
|
|
52
|
-
return undefined;
|
|
53
|
-
}
|
|
54
|
-
if (this.icon.indexOf('.') > -1 ||
|
|
55
|
-
this.icon.indexOf('/') > -1 ||
|
|
56
|
-
this.icon.indexOf('\\') > -1) {
|
|
57
|
-
return (h("span", { class: "label kup-icon is-image" }, h("img", { src: this.icon })));
|
|
58
|
-
}
|
|
59
|
-
else {
|
|
60
|
-
let svg = `url('${getAssetPath(`./assets/svg/${this.icon}.svg`)}') no-repeat center`;
|
|
61
|
-
let iconStyle = {
|
|
62
|
-
mask: svg,
|
|
63
|
-
webkitMask: svg,
|
|
64
|
-
};
|
|
65
|
-
return h("span", { style: iconStyle, class: "label kup-icon" });
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
/*-------------------------------------------------*/
|
|
69
49
|
/* L i f e c y c l e H o o k s */
|
|
70
50
|
/*-------------------------------------------------*/
|
|
71
51
|
componentWillLoad() {
|
|
@@ -87,69 +67,42 @@ export class KupProgressBar {
|
|
|
87
67
|
this.kupManager.debug.logRender(this, true);
|
|
88
68
|
}
|
|
89
69
|
render() {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
70
|
+
const props = {
|
|
71
|
+
animated: this.rootElement.classList.contains('kup-animated')
|
|
72
|
+
? true
|
|
73
|
+
: false,
|
|
74
|
+
danger: this.rootElement.classList.contains('kup-danger')
|
|
75
|
+
? true
|
|
76
|
+
: false,
|
|
77
|
+
centeredLabel: this.centeredLabel,
|
|
78
|
+
hideLabel: this.hideLabel,
|
|
79
|
+
icon: this.icon,
|
|
80
|
+
info: this.rootElement.classList.contains('kup-info')
|
|
81
|
+
? true
|
|
82
|
+
: false,
|
|
83
|
+
isRadial: this.isRadial,
|
|
84
|
+
label: this.label,
|
|
85
|
+
padded: this.rootElement.classList.contains('kup-padded')
|
|
86
|
+
? true
|
|
87
|
+
: false,
|
|
88
|
+
secondary: this.rootElement.classList.contains('kup-secondary')
|
|
89
|
+
? true
|
|
90
|
+
: false,
|
|
91
|
+
slim: this.rootElement.classList.contains('kup-slim')
|
|
92
|
+
? true
|
|
93
|
+
: false,
|
|
94
|
+
striped: this.rootElement.classList.contains('kup-striped')
|
|
95
|
+
? true
|
|
96
|
+
: false,
|
|
97
|
+
success: this.rootElement.classList.contains('kup-success')
|
|
98
|
+
? true
|
|
99
|
+
: false,
|
|
100
|
+
value: this.value,
|
|
101
|
+
warning: this.rootElement.classList.contains('kup-warning')
|
|
102
|
+
? true
|
|
103
|
+
: false,
|
|
102
104
|
};
|
|
103
|
-
|
|
104
|
-
labelStyle = valueStyle;
|
|
105
|
-
if (this.value > 2) {
|
|
106
|
-
componentClass += ' text-color-on-primary';
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
else if (this.value > 49) {
|
|
110
|
-
componentClass += ' text-color-on-primary';
|
|
111
|
-
}
|
|
112
|
-
let label = null;
|
|
113
|
-
if (this.icon) {
|
|
114
|
-
label = this.createIconElement();
|
|
115
|
-
}
|
|
116
|
-
else {
|
|
117
|
-
if (!this.hideLabel) {
|
|
118
|
-
if (this.isRadial) {
|
|
119
|
-
if (this.label) {
|
|
120
|
-
label = h("span", { class: "label" }, this.label);
|
|
121
|
-
}
|
|
122
|
-
else {
|
|
123
|
-
label = (h("span", { class: "label" }, this.value, h("span", { class: "smaller" }, "%")));
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
else {
|
|
127
|
-
if (this.label) {
|
|
128
|
-
label = this.label;
|
|
129
|
-
}
|
|
130
|
-
else {
|
|
131
|
-
label = this.value + '%';
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
if (this.value > 0) {
|
|
137
|
-
pieClass += ' has-value';
|
|
138
|
-
if (this.value > 50) {
|
|
139
|
-
pieClass += ' is-more-than-half';
|
|
140
|
-
}
|
|
141
|
-
else {
|
|
142
|
-
pieClass += ' is-less-than-half';
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
let el;
|
|
146
|
-
if (this.isRadial) {
|
|
147
|
-
el = (h("div", { class: componentClass }, label, h("div", { class: pieClass }, h("div", { style: radialStyle, class: "left-side half-circle" }), h("div", { class: "right-side half-circle" })), h("div", { class: "shadow" })));
|
|
148
|
-
}
|
|
149
|
-
else {
|
|
150
|
-
el = (h("div", { class: componentClass }, h("div", { class: "progress-bar-percentage", style: valueStyle }, h("span", { style: labelStyle }, label))));
|
|
151
|
-
}
|
|
152
|
-
return (h(Host, null, h("style", null, this.kupManager.theme.setKupStyle(this.rootElement)), h("div", { id: componentWrapperId }, el)));
|
|
105
|
+
return (h(Host, null, h("style", null, this.kupManager.theme.setKupStyle(this.rootElement)), h("div", { id: componentWrapperId }, h(FProgressBar, Object.assign({}, props)))));
|
|
153
106
|
}
|
|
154
107
|
disconnectedCallback() {
|
|
155
108
|
this.kupManager.theme.unregister(this);
|
|
@@ -8,166 +8,5 @@
|
|
|
8
8
|
* @prop --kup-radio-text-color: Sets text color of the radio's label.
|
|
9
9
|
*/
|
|
10
10
|
:host {
|
|
11
|
-
--kup_radio_font_family: var(--kup-radio-font-family, var(--kup-font-family));
|
|
12
|
-
--kup_radio_font_size: var(--kup-radio-font-size, var(--kup-font-size));
|
|
13
|
-
--kup_radio_font_weight: var(--kup-radio-font-weight, 400);
|
|
14
|
-
--kup_radio_outer_circle_color: var(
|
|
15
|
-
--kup-radio-outer-circle-color,
|
|
16
|
-
rgba(var(--kup-text-color-rgb), 0.5)
|
|
17
|
-
);
|
|
18
|
-
--kup_radio_primary_color: var(
|
|
19
|
-
--kup-radio-primary-color,
|
|
20
|
-
var(--kup-primary-color)
|
|
21
|
-
);
|
|
22
|
-
--kup_radio_primary_color_rgb: var(
|
|
23
|
-
--kup-radio-primary-color-rgb,
|
|
24
|
-
var(--kup-primary-color-rgb)
|
|
25
|
-
);
|
|
26
|
-
--kup_radio_text_color: var(--kup-radio-text-color, var(--kup-text-color));
|
|
27
11
|
display: block;
|
|
28
|
-
font-family: var(--kup_radio_font_family);
|
|
29
|
-
font-size: var(--kup_radio_font_size);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.form-field {
|
|
33
|
-
-moz-osx-font-smoothing: grayscale;
|
|
34
|
-
-webkit-font-smoothing: antialiased;
|
|
35
|
-
font-size: 0.875em;
|
|
36
|
-
line-height: 2em;
|
|
37
|
-
font-weight: var(--kup_radio_font_weight);
|
|
38
|
-
letter-spacing: 0.0178571429em;
|
|
39
|
-
display: inline-flex;
|
|
40
|
-
align-items: center;
|
|
41
|
-
vertical-align: middle;
|
|
42
|
-
}
|
|
43
|
-
.form-field label {
|
|
44
|
-
color: var(--kup_radio_text_color);
|
|
45
|
-
margin-left: 0px;
|
|
46
|
-
margin-right: auto;
|
|
47
|
-
padding-left: 4px;
|
|
48
|
-
padding-right: 0px;
|
|
49
|
-
order: 0;
|
|
50
|
-
}
|
|
51
|
-
.form-field.form-field--align-end label {
|
|
52
|
-
margin-left: auto;
|
|
53
|
-
margin-right: 0px;
|
|
54
|
-
padding-left: 0px;
|
|
55
|
-
padding-right: 4px;
|
|
56
|
-
order: -1 !important;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
.radio-wrapper.radio-wrapper--grid {
|
|
60
|
-
display: grid;
|
|
61
|
-
grid-gap: 1em;
|
|
62
|
-
grid-template-columns: var(--kup_radio_columns);
|
|
63
|
-
}
|
|
64
|
-
.radio-wrapper .radio {
|
|
65
|
-
border-radius: 50%;
|
|
66
|
-
padding: 10px;
|
|
67
|
-
position: relative;
|
|
68
|
-
flex: 0 0 auto;
|
|
69
|
-
box-sizing: content-box;
|
|
70
|
-
width: 20px;
|
|
71
|
-
height: 20px;
|
|
72
|
-
cursor: pointer;
|
|
73
|
-
will-change: opacity, transform, border-color, color;
|
|
74
|
-
will-change: transform, opacity;
|
|
75
|
-
}
|
|
76
|
-
.radio-wrapper .radio:hover {
|
|
77
|
-
background-color: rgba(var(--kup_radio_primary_color_rgb), 0.125);
|
|
78
|
-
}
|
|
79
|
-
.radio-wrapper .radio .radio__native-control {
|
|
80
|
-
position: absolute;
|
|
81
|
-
margin: 0px;
|
|
82
|
-
padding: 0px;
|
|
83
|
-
opacity: 0;
|
|
84
|
-
cursor: inherit;
|
|
85
|
-
z-index: 1;
|
|
86
|
-
top: 0px;
|
|
87
|
-
right: 0px;
|
|
88
|
-
left: 0px;
|
|
89
|
-
width: 40px;
|
|
90
|
-
height: 40px;
|
|
91
|
-
}
|
|
92
|
-
.radio-wrapper .radio .radio__background {
|
|
93
|
-
display: inline-block;
|
|
94
|
-
position: relative;
|
|
95
|
-
box-sizing: border-box;
|
|
96
|
-
width: 20px;
|
|
97
|
-
height: 20px;
|
|
98
|
-
transition: opacity 120ms cubic-bezier(0, 0, 0.2, 1) 0ms, transform 120ms cubic-bezier(0, 0, 0.2, 1) 0ms;
|
|
99
|
-
}
|
|
100
|
-
.radio-wrapper .radio .radio__background .radio__outer-circle {
|
|
101
|
-
border-color: var(--kup_radio_outer_circle_color);
|
|
102
|
-
position: absolute;
|
|
103
|
-
top: 0px;
|
|
104
|
-
left: 0px;
|
|
105
|
-
box-sizing: border-box;
|
|
106
|
-
width: 100%;
|
|
107
|
-
height: 100%;
|
|
108
|
-
border-width: 2px;
|
|
109
|
-
border-style: solid;
|
|
110
|
-
border-radius: 50%;
|
|
111
|
-
transition: border-color 120ms cubic-bezier(0.4, 0, 0.6, 1) 0ms;
|
|
112
|
-
}
|
|
113
|
-
.radio-wrapper .radio .radio__background .radio__inner-circle {
|
|
114
|
-
position: absolute;
|
|
115
|
-
top: 0px;
|
|
116
|
-
left: 0px;
|
|
117
|
-
box-sizing: border-box;
|
|
118
|
-
width: 100%;
|
|
119
|
-
height: 100%;
|
|
120
|
-
transform: scale(0, 0);
|
|
121
|
-
border-width: 10px;
|
|
122
|
-
border-style: solid;
|
|
123
|
-
border-radius: 50%;
|
|
124
|
-
transition: transform 120ms cubic-bezier(0.4, 0, 0.6, 1) 0ms, border-color 120ms cubic-bezier(0.4, 0, 0.6, 1) 0ms;
|
|
125
|
-
}
|
|
126
|
-
.radio-wrapper .radio.radio--checked .radio__outer-circle {
|
|
127
|
-
border-color: var(--kup_radio_primary_color);
|
|
128
|
-
}
|
|
129
|
-
.radio-wrapper .radio.radio--checked .radio__inner-circle {
|
|
130
|
-
border-color: var(--kup_radio_primary_color);
|
|
131
|
-
transform: scale(0.5);
|
|
132
|
-
transition: transform 120ms cubic-bezier(0, 0, 0.2, 1) 0ms, border-color 120ms cubic-bezier(0, 0, 0.2, 1) 0ms;
|
|
133
|
-
}
|
|
134
|
-
.radio-wrapper .radio.radio--disabled {
|
|
135
|
-
pointer-events: none;
|
|
136
|
-
}
|
|
137
|
-
.radio-wrapper .radio.radio--disabled + label {
|
|
138
|
-
pointer-events: none;
|
|
139
|
-
}
|
|
140
|
-
.radio-wrapper .radio.radio--disabled .radio__outer-circle {
|
|
141
|
-
border-color: var(--kup_radio_outer_circle_color);
|
|
142
|
-
}
|
|
143
|
-
.radio-wrapper .radio.radio--disabled .radio__inner-circle {
|
|
144
|
-
border-color: var(--kup_radio_outer_circle_color);
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
/*-------------------------------------------------*/
|
|
148
|
-
/* C o m p o n e n t C l a s s e s */
|
|
149
|
-
/*-------------------------------------------------*/
|
|
150
|
-
:host(.kup-danger) {
|
|
151
|
-
--kup-radio-primary-color: var(--kup-danger-color);
|
|
152
|
-
--kup-radio-primary-color-rgb: var(--kup-danger-color-rgb);
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
:host(.kup-info) {
|
|
156
|
-
--kup-radio-primary-color: var(--kup-info-color);
|
|
157
|
-
--kup-radio-primary-color-rgb: var(--kup-info-color-rgb);
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
:host(.kup-secondary) {
|
|
161
|
-
--kup-radio-primary-color: var(--kup-secondary-color);
|
|
162
|
-
--kup-radio-primary-color-rgb: var(--kup-secondary-color-rgb);
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
:host(.kup-success) {
|
|
166
|
-
--kup-radio-primary-color: var(--kup-success-color);
|
|
167
|
-
--kup-radio-primary-color-rgb: var(--kup-success-color-rgb);
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
:host(.kup-warning) {
|
|
171
|
-
--kup-radio-primary-color: var(--kup-warning-color);
|
|
172
|
-
--kup-radio-primary-color-rgb: var(--kup-warning-color-rgb);
|
|
173
12
|
}
|
|
@@ -3,6 +3,7 @@ import { kupManagerInstance, } from "../../managers/kup-manager/kup-manager";
|
|
|
3
3
|
import { KupRadioProps, } from "./kup-radio-declarations";
|
|
4
4
|
import { getProps, setProps } from "../../utils/utils";
|
|
5
5
|
import { componentWrapperId } from "../../variables/GenericVariables";
|
|
6
|
+
import { FRadio } from "../../f-components/f-radio/f-radio";
|
|
6
7
|
export class KupRadio {
|
|
7
8
|
constructor() {
|
|
8
9
|
/*-------------------------------------------------*/
|
|
@@ -41,6 +42,7 @@ export class KupRadio {
|
|
|
41
42
|
id: this.rootElement.id,
|
|
42
43
|
value: this.value,
|
|
43
44
|
});
|
|
45
|
+
this.refresh();
|
|
44
46
|
}
|
|
45
47
|
onKupFocus() {
|
|
46
48
|
this.kupFocus.emit({
|
|
@@ -92,28 +94,31 @@ export class KupRadio {
|
|
|
92
94
|
if (!this.data || this.data.length === 0) {
|
|
93
95
|
return;
|
|
94
96
|
}
|
|
95
|
-
const
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
97
|
+
const props = {
|
|
98
|
+
columns: this.columns,
|
|
99
|
+
danger: this.rootElement.classList.contains('kup-danger')
|
|
100
|
+
? true
|
|
101
|
+
: false,
|
|
102
|
+
data: this.data,
|
|
103
|
+
disabled: this.disabled,
|
|
104
|
+
info: this.rootElement.classList.contains('kup-info')
|
|
105
|
+
? true
|
|
106
|
+
: false,
|
|
107
|
+
leadingLabel: this.leadingLabel,
|
|
108
|
+
secondary: this.rootElement.classList.contains('kup-secondary')
|
|
109
|
+
? true
|
|
110
|
+
: false,
|
|
111
|
+
success: this.rootElement.classList.contains('kup-success')
|
|
112
|
+
? true
|
|
113
|
+
: false,
|
|
114
|
+
warning: this.rootElement.classList.contains('kup-warning')
|
|
115
|
+
? true
|
|
116
|
+
: false,
|
|
117
|
+
onBlur: () => this.onKupBlur(),
|
|
118
|
+
onChange: (i) => this.onKupChange(i),
|
|
119
|
+
onFocus: () => this.onKupFocus(),
|
|
115
120
|
};
|
|
116
|
-
return (h(Host,
|
|
121
|
+
return (h(Host, null, h("style", null, this.kupManager.theme.setKupStyle(this.rootElement)), h("div", { id: componentWrapperId }, h(FRadio, Object.assign({}, props)))));
|
|
117
122
|
}
|
|
118
123
|
disconnectedCallback() {
|
|
119
124
|
this.kupManager.theme.unregister(this);
|
|
@@ -181,13 +186,13 @@ export class KupRadio {
|
|
|
181
186
|
"type": "unknown",
|
|
182
187
|
"mutable": false,
|
|
183
188
|
"complexType": {
|
|
184
|
-
"original": "
|
|
185
|
-
"resolved": "
|
|
189
|
+
"original": "FRadioData[]",
|
|
190
|
+
"resolved": "FRadioData[]",
|
|
186
191
|
"references": {
|
|
187
|
-
"
|
|
192
|
+
"FRadioData": {
|
|
188
193
|
"location": "import",
|
|
189
|
-
"path": "
|
|
190
|
-
"id": "src/components/
|
|
194
|
+
"path": "../../f-components/f-radio/f-radio-declarations",
|
|
195
|
+
"id": "src/f-components/f-radio/f-radio-declarations.ts::FRadioData"
|
|
191
196
|
}
|
|
192
197
|
}
|
|
193
198
|
},
|
|
@@ -3,13 +3,5 @@
|
|
|
3
3
|
* @prop --kup-rating-font-size: Sets font size of the component.
|
|
4
4
|
*/
|
|
5
5
|
:host {
|
|
6
|
-
--kup_rating_color: var(--kup-rating-color, orange);
|
|
7
|
-
--kup_rating_font_size: var(--kup-rating-font-size, 30px);
|
|
8
6
|
display: block;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.rating {
|
|
12
|
-
color: var(--kup_rating_color);
|
|
13
|
-
cursor: pointer;
|
|
14
|
-
font-size: var(--kup_rating_font_size);
|
|
15
7
|
}
|
|
@@ -3,6 +3,7 @@ import { kupManagerInstance, } from "../../managers/kup-manager/kup-manager";
|
|
|
3
3
|
import { getProps, setProps } from "../../utils/utils";
|
|
4
4
|
import { componentWrapperId } from "../../variables/GenericVariables";
|
|
5
5
|
import { KupRatingProps, } from "./kup-rating-declarations";
|
|
6
|
+
import { FRating } from "../../f-components/f-rating/f-rating";
|
|
6
7
|
export class KupRating {
|
|
7
8
|
constructor() {
|
|
8
9
|
/*-------------------------------------------------*/
|
|
@@ -12,30 +13,23 @@ export class KupRating {
|
|
|
12
13
|
* Instance of the KupManager class.
|
|
13
14
|
*/
|
|
14
15
|
this.kupManager = kupManagerInstance();
|
|
15
|
-
this.stars = [];
|
|
16
16
|
this.customStyle = '';
|
|
17
17
|
this.disabled = false;
|
|
18
18
|
this.maxValue = 5;
|
|
19
19
|
this.value = 0;
|
|
20
20
|
}
|
|
21
|
-
|
|
21
|
+
onKupClick(newValue) {
|
|
22
22
|
if (!this.disabled) {
|
|
23
23
|
this.value = newValue;
|
|
24
|
-
this.
|
|
25
|
-
this.kupRatingClick.emit({
|
|
24
|
+
this.kupClick.emit({
|
|
26
25
|
comp: this,
|
|
27
26
|
id: this.rootElement.id,
|
|
28
27
|
value: this.value,
|
|
29
28
|
});
|
|
29
|
+
this.refresh();
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
/*-------------------------------------------------*/
|
|
33
|
-
/* W a t c h e r s */
|
|
34
|
-
/*-------------------------------------------------*/
|
|
35
|
-
onValueChanged() {
|
|
36
|
-
this.buildStars(this.value);
|
|
37
|
-
}
|
|
38
|
-
/*-------------------------------------------------*/
|
|
39
33
|
/* P u b l i c M e t h o d s */
|
|
40
34
|
/*-------------------------------------------------*/
|
|
41
35
|
/**
|
|
@@ -60,37 +54,11 @@ export class KupRating {
|
|
|
60
54
|
setProps(this, KupRatingProps, props);
|
|
61
55
|
}
|
|
62
56
|
/*-------------------------------------------------*/
|
|
63
|
-
/* P r i v a t e M e t h o d s */
|
|
64
|
-
/*-------------------------------------------------*/
|
|
65
|
-
onMouseOver(newValue) {
|
|
66
|
-
if (!this.disabled) {
|
|
67
|
-
this.buildStars(newValue);
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
onMouseOut() {
|
|
71
|
-
if (!this.disabled) {
|
|
72
|
-
this.buildStars(this.value);
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
buildStars(numberOfStars) {
|
|
76
|
-
let stars = [];
|
|
77
|
-
for (let i = 1; i <= this.maxValue; i++) {
|
|
78
|
-
if (i <= numberOfStars) {
|
|
79
|
-
stars.push(h("span", { class: "rating", onMouseOver: () => this.onMouseOver(i), onMouseOut: () => this.onMouseOut(), onClick: () => this.onStarClick(i) }, "\u2605"));
|
|
80
|
-
}
|
|
81
|
-
else {
|
|
82
|
-
stars.push(h("span", { class: "rating", onMouseOver: () => this.onMouseOver(i), onMouseOut: () => this.onMouseOut(), onClick: () => this.onStarClick(i) }, "\u2606"));
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
this.stars = stars;
|
|
86
|
-
}
|
|
87
|
-
/*-------------------------------------------------*/
|
|
88
57
|
/* L i f e c y c l e H o o k s */
|
|
89
58
|
/*-------------------------------------------------*/
|
|
90
59
|
componentWillLoad() {
|
|
91
60
|
this.kupManager.debug.logLoad(this, false);
|
|
92
61
|
this.kupManager.theme.register(this);
|
|
93
|
-
this.onValueChanged();
|
|
94
62
|
}
|
|
95
63
|
componentDidLoad() {
|
|
96
64
|
this.kupManager.debug.logLoad(this, true);
|
|
@@ -102,7 +70,28 @@ export class KupRating {
|
|
|
102
70
|
this.kupManager.debug.logRender(this, true);
|
|
103
71
|
}
|
|
104
72
|
render() {
|
|
105
|
-
|
|
73
|
+
const props = {
|
|
74
|
+
danger: this.rootElement.classList.contains('kup-danger')
|
|
75
|
+
? true
|
|
76
|
+
: false,
|
|
77
|
+
disabled: this.disabled,
|
|
78
|
+
info: this.rootElement.classList.contains('kup-info')
|
|
79
|
+
? true
|
|
80
|
+
: false,
|
|
81
|
+
maxValue: this.maxValue,
|
|
82
|
+
secondary: this.rootElement.classList.contains('kup-secondary')
|
|
83
|
+
? true
|
|
84
|
+
: false,
|
|
85
|
+
success: this.rootElement.classList.contains('kup-success')
|
|
86
|
+
? true
|
|
87
|
+
: false,
|
|
88
|
+
value: this.value,
|
|
89
|
+
warning: this.rootElement.classList.contains('kup-warning')
|
|
90
|
+
? true
|
|
91
|
+
: false,
|
|
92
|
+
onClick: (i) => this.onKupClick(i),
|
|
93
|
+
};
|
|
94
|
+
return (h(Host, null, h("style", null, this.kupManager.theme.setKupStyle(this.rootElement)), h("div", { id: componentWrapperId }, h(FRating, Object.assign({}, props)))));
|
|
106
95
|
}
|
|
107
96
|
disconnectedCallback() {
|
|
108
97
|
this.kupManager.theme.unregister(this);
|
|
@@ -210,14 +199,9 @@ export class KupRating {
|
|
|
210
199
|
}
|
|
211
200
|
};
|
|
212
201
|
}
|
|
213
|
-
static get states() {
|
|
214
|
-
return {
|
|
215
|
-
"stars": {}
|
|
216
|
-
};
|
|
217
|
-
}
|
|
218
202
|
static get events() {
|
|
219
203
|
return [{
|
|
220
|
-
"method": "
|
|
204
|
+
"method": "kupClick",
|
|
221
205
|
"name": "kup-rating-click",
|
|
222
206
|
"bubbles": true,
|
|
223
207
|
"cancelable": false,
|
|
@@ -326,13 +310,4 @@ export class KupRating {
|
|
|
326
310
|
};
|
|
327
311
|
}
|
|
328
312
|
static get elementRef() { return "rootElement"; }
|
|
329
|
-
static get watchers() {
|
|
330
|
-
return [{
|
|
331
|
-
"propName": "value",
|
|
332
|
-
"methodName": "onValueChanged"
|
|
333
|
-
}, {
|
|
334
|
-
"propName": "maxValue",
|
|
335
|
-
"methodName": "onValueChanged"
|
|
336
|
-
}];
|
|
337
|
-
}
|
|
338
313
|
}
|
|
@@ -86,6 +86,8 @@ export var FCellShapes;
|
|
|
86
86
|
FCellShapes["EDITOR"] = "EDT";
|
|
87
87
|
FCellShapes["GAUGE"] = "GAU";
|
|
88
88
|
FCellShapes["IMAGE"] = "IMG";
|
|
89
|
+
FCellShapes["INPUT_CHECKBOX"] = "INC";
|
|
90
|
+
FCellShapes["INPUT_FIELD"] = "INF";
|
|
89
91
|
FCellShapes["KNOB"] = "KNB";
|
|
90
92
|
FCellShapes["MULTI_AUTOCOMPLETE"] = "AML";
|
|
91
93
|
FCellShapes["MULTI_COMBOBOX"] = "CML";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { KupTagNames, } from "../../types/GenericTypes";
|
|
2
|
-
import { autoCenterComps, editableTypes, FCellClasses, FCellEvents, FCellTypes, fullWidthFieldsComps, kupTypes, } from "./f-cell-declarations";
|
|
2
|
+
import { autoCenterComps, editableTypes, FCellClasses, FCellEvents, FCellShapes, 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";
|
|
@@ -10,6 +10,10 @@ import { KupThemeColorValues } from "../../managers/kup-theme/kup-theme-declarat
|
|
|
10
10
|
import { FSwitch } from "../f-switch/f-switch";
|
|
11
11
|
import { FChipType } from "../f-chip/f-chip-declarations";
|
|
12
12
|
import { ItemsDisplayMode } from "../../components/kup-list/kup-list-declarations";
|
|
13
|
+
import { FButton } from "../f-button/f-button";
|
|
14
|
+
import { FProgressBar } from "../f-progress-bar/f-progress-bar";
|
|
15
|
+
import { FRadio } from "../f-radio/f-radio";
|
|
16
|
+
import { FRating } from "../f-rating/f-rating";
|
|
13
17
|
const dom = document.documentElement;
|
|
14
18
|
/*-------------------------------------------------*/
|
|
15
19
|
/* C o m p o n e n t */
|
|
@@ -207,7 +211,14 @@ function setEditableCell(cellType, classObj, cell, column, props) {
|
|
|
207
211
|
if (isAutoCentered(props)) {
|
|
208
212
|
classObj[FCellClasses.C_CENTERED] = true;
|
|
209
213
|
}
|
|
210
|
-
|
|
214
|
+
if (cell.shape === FCellShapes.INPUT_CHECKBOX) {
|
|
215
|
+
return (h("input", { checked: cell.value === 'on' || cell.value === '1'
|
|
216
|
+
? true
|
|
217
|
+
: false, class: "input-checkbox", onChange: (e) => cellEvent(e, props, cellType, FCellEvents.UPDATE), type: "checkbox" }));
|
|
218
|
+
}
|
|
219
|
+
else {
|
|
220
|
+
return (h(FCheckbox, Object.assign({}, cell.data, { onChange: (e) => cellEvent(e, props, cellType, FCellEvents.UPDATE) })));
|
|
221
|
+
}
|
|
211
222
|
case FCellTypes.CHIP:
|
|
212
223
|
return (h("kup-chip", Object.assign({}, cell.data, { type: FChipType.INPUT, enableInput: true, "onKup-chip-change": (e) => cellEvent(e, props, cellType, FCellEvents.UPDATE) }), h("kup-text-field", Object.assign({ fullWidth: true, slot: "field" }, cell.slotData))));
|
|
213
224
|
case FCellTypes.COLOR_PICKER:
|
|
@@ -230,17 +241,24 @@ function setEditableCell(cellType, classObj, cell, column, props) {
|
|
|
230
241
|
classObj[FCellClasses.C_RIGHT_ALIGNED] = true;
|
|
231
242
|
case FCellTypes.LINK:
|
|
232
243
|
case FCellTypes.STRING:
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
+
const onChange = (e) => cellEvent(e, props, cellType, FCellEvents.UPDATE);
|
|
245
|
+
const onInput = (e) => cellEvent(e, props, cellType, FCellEvents.INPUT);
|
|
246
|
+
const type = cellType === FCellTypes.NUMBER ? 'number' : null;
|
|
247
|
+
const value = cellType === FCellTypes.NUMBER && cell.value
|
|
248
|
+
? dom.ketchup.math.numberifySafe(cell.value).toString()
|
|
249
|
+
: cell.value;
|
|
250
|
+
if (cell.shape === FCellShapes.INPUT_FIELD) {
|
|
251
|
+
return (h("input", { class: 'input-field', onChange: onChange, onInput: onInput, type: type, value: value }));
|
|
252
|
+
}
|
|
253
|
+
else {
|
|
254
|
+
return (h(FTextField, Object.assign({ inputType: type, fullWidth: isFullWidth(props) ? true : false }, cell.data, { icon: cell.data && cell.data.icon
|
|
255
|
+
? cell.data.icon
|
|
256
|
+
: cell.icon
|
|
257
|
+
? cell.icon
|
|
258
|
+
: column.icon
|
|
259
|
+
? column.icon
|
|
260
|
+
: null, value: value, onChange: onChange, onInput: onInput, onIconClick: (e) => cellEvent(e, props, cellType, FCellEvents.ICON_CLICK) })));
|
|
261
|
+
}
|
|
244
262
|
}
|
|
245
263
|
}
|
|
246
264
|
function setCell(cellType, subcomponentProps, content, classObj, cell, column, props) {
|
|
@@ -315,7 +333,7 @@ function setKupCell(cellType, classObj, subcomponentProps, cell, row, column, pr
|
|
|
315
333
|
if (isAutoCentered(props)) {
|
|
316
334
|
classObj[FCellClasses.C_CENTERED] = true;
|
|
317
335
|
}
|
|
318
|
-
return (h(
|
|
336
|
+
return (h(FButton, Object.assign({}, subcomponentProps, { onClick: (e) => cellEvent(e, props, cellType, FCellEvents.CLICK) })));
|
|
319
337
|
case FCellTypes.BUTTON_LIST:
|
|
320
338
|
if (isAutoCentered(props)) {
|
|
321
339
|
classObj[FCellClasses.C_CENTERED] = true;
|
|
@@ -341,15 +359,15 @@ function setKupCell(cellType, classObj, subcomponentProps, cell, row, column, pr
|
|
|
341
359
|
return (h("kup-gauge", Object.assign({ key: column.name + props.row.id, value: dom.ketchup.math.numberifySafe(cell.value), "width-component": "280px" }, subcomponentProps)));
|
|
342
360
|
case FCellTypes.KNOB:
|
|
343
361
|
case FCellTypes.PROGRESS_BAR:
|
|
344
|
-
return (h("kup-progress-bar", Object.assign({ key: column.name + props.row.id }, subcomponentProps)));
|
|
362
|
+
return subcomponentProps.customStyle ? (h("kup-progress-bar", Object.assign({ key: column.name + props.row.id }, subcomponentProps))) : (h(FProgressBar, Object.assign({}, subcomponentProps)));
|
|
345
363
|
case FCellTypes.RADIO:
|
|
346
364
|
if (isAutoCentered(props)) {
|
|
347
365
|
classObj[FCellClasses.C_CENTERED] = true;
|
|
348
366
|
}
|
|
349
367
|
subcomponentProps['disabled'] = row.readOnly;
|
|
350
|
-
return
|
|
368
|
+
return h(FRadio, Object.assign({}, subcomponentProps));
|
|
351
369
|
case FCellTypes.RATING:
|
|
352
|
-
return
|
|
370
|
+
return h(FRating, Object.assign({}, subcomponentProps, { disabled: true }));
|
|
353
371
|
}
|
|
354
372
|
}
|
|
355
373
|
function cellEvent(e, props, cellType, cellEventName) {
|
|
@@ -422,6 +440,9 @@ function getValueFromEventTaget(e, cellType) {
|
|
|
422
440
|
let value = isInputEvent
|
|
423
441
|
? e.target.value
|
|
424
442
|
: e.detail.value;
|
|
443
|
+
if (cellType === FCellTypes.CHECKBOX && isInputEvent) {
|
|
444
|
+
value = e.target.checked ? 'off' : 'on';
|
|
445
|
+
}
|
|
425
446
|
if (cellType === FCellTypes.NUMBER && isInputEvent) {
|
|
426
447
|
value = dom.ketchup.math.formattedStringToNumberString(value, '');
|
|
427
448
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|