@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
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { getAssetPath, h } from "@stencil/core";
|
|
2
|
+
/*-------------------------------------------------*/
|
|
3
|
+
/* C o m p o n e n t */
|
|
4
|
+
/*-------------------------------------------------*/
|
|
5
|
+
export const FProgressBar = (props) => {
|
|
6
|
+
if (!props.centeredLabel && !props.centeredLabel !== false) {
|
|
7
|
+
props.centeredLabel = true;
|
|
8
|
+
}
|
|
9
|
+
let componentClass = `f-progress-bar ${props.danger ? 'kup-danger' : ''} ${props.animated ? 'kup-animated' : ''} ${props.padded ? 'kup-padded' : ''} ${props.info ? 'kup-info' : ''} ${props.slim ? 'kup-slim' : ''} ${props.striped ? 'kup-striped' : ''} ${props.secondary ? 'kup-secondary' : ''} ${props.slim ? 'kup-slim' : ''} ${props.success ? 'kup-success' : ''} ${props.warning ? 'kup-warning' : ''} ${props.wrapperClass ? props.wrapperClass : ''}`;
|
|
10
|
+
let pieClass = 'pie';
|
|
11
|
+
let radialStyle = undefined;
|
|
12
|
+
if (props.isRadial) {
|
|
13
|
+
componentClass += ' pie-wrapper is-radial';
|
|
14
|
+
}
|
|
15
|
+
else {
|
|
16
|
+
componentClass += ' progress-bar';
|
|
17
|
+
}
|
|
18
|
+
let labelStyle = undefined;
|
|
19
|
+
const valueStyle = {
|
|
20
|
+
width: `${props.value}%`,
|
|
21
|
+
};
|
|
22
|
+
if (!props.centeredLabel) {
|
|
23
|
+
labelStyle = valueStyle;
|
|
24
|
+
if (props.value > 2) {
|
|
25
|
+
componentClass += ' text-color-on-primary';
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
else if (props.value > 49) {
|
|
29
|
+
componentClass += ' text-color-on-primary';
|
|
30
|
+
}
|
|
31
|
+
let label = null;
|
|
32
|
+
if (props.icon) {
|
|
33
|
+
label = createIconElement(props);
|
|
34
|
+
}
|
|
35
|
+
else {
|
|
36
|
+
if (!props.hideLabel) {
|
|
37
|
+
if (props.isRadial) {
|
|
38
|
+
if (props.label) {
|
|
39
|
+
label = h("span", { class: "label" }, props.label);
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
label = (h("span", { class: "label" }, props.value, h("span", { class: "smaller" }, "%")));
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
else {
|
|
46
|
+
if (props.label) {
|
|
47
|
+
label = props.label;
|
|
48
|
+
}
|
|
49
|
+
else {
|
|
50
|
+
label = props.value + '%';
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
if (props.value > 0) {
|
|
56
|
+
pieClass += ' has-value';
|
|
57
|
+
if (props.value > 50) {
|
|
58
|
+
pieClass += ' is-more-than-half';
|
|
59
|
+
}
|
|
60
|
+
else {
|
|
61
|
+
pieClass += ' is-less-than-half';
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
if (props.isRadial) {
|
|
65
|
+
return (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" })));
|
|
66
|
+
}
|
|
67
|
+
else {
|
|
68
|
+
return (h("div", { class: componentClass }, h("div", { class: "progress-bar-percentage", style: valueStyle }, h("span", { style: labelStyle }, label))));
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
function createIconElement(props) {
|
|
72
|
+
if (!props.icon) {
|
|
73
|
+
return undefined;
|
|
74
|
+
}
|
|
75
|
+
if (props.icon.indexOf('.') > -1 ||
|
|
76
|
+
props.icon.indexOf('/') > -1 ||
|
|
77
|
+
props.icon.indexOf('\\') > -1) {
|
|
78
|
+
return (h("span", { class: "label kup-icon is-image" }, h("img", { src: props.icon })));
|
|
79
|
+
}
|
|
80
|
+
else {
|
|
81
|
+
let svg = `url('${getAssetPath(`./assets/svg/${props.icon}.svg`)}') no-repeat center`;
|
|
82
|
+
let iconStyle = {
|
|
83
|
+
mask: svg,
|
|
84
|
+
webkitMask: svg,
|
|
85
|
+
};
|
|
86
|
+
return h("span", { style: iconStyle, class: "label kup-icon" });
|
|
87
|
+
}
|
|
88
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
/*-------------------------------------------------*/
|
|
3
|
+
/* C o m p o n e n t */
|
|
4
|
+
/*-------------------------------------------------*/
|
|
5
|
+
export const FRadio = (props) => {
|
|
6
|
+
var _a;
|
|
7
|
+
const hasColumns = !!props.columns;
|
|
8
|
+
const radioList = [];
|
|
9
|
+
for (let i = 0; i < ((_a = props.data) === null || _a === void 0 ? void 0 : _a.length); i++) {
|
|
10
|
+
const data = props.data[i];
|
|
11
|
+
const classObj = {
|
|
12
|
+
radio: true,
|
|
13
|
+
'radio--checked': data.checked ? true : false,
|
|
14
|
+
'radio--disabled': props.disabled ? true : false,
|
|
15
|
+
};
|
|
16
|
+
radioList.push(h("div", { class: `form-field ${props.leadingLabel ? ' form-field--align-end' : ''}` }, h("div", { class: classObj }, h("input", { class: "radio__native-control", type: "radio", name: "radio-element", value: data.value, checked: data.checked, disabled: props.disabled, onBlur: props.onBlur, onChange: props.onChange
|
|
17
|
+
? props.onChange.bind(props.onChange, i)
|
|
18
|
+
: null, onFocus: props.onFocus }), h("div", { class: "radio__background" }, h("div", { class: "radio__outer-circle" }), h("div", { class: "radio__inner-circle" }))), h("label", { htmlFor: 'radio-element', onClick: props.onChange
|
|
19
|
+
? props.onChange.bind(props.onChange, i)
|
|
20
|
+
: null }, data.label ? data.label : '')));
|
|
21
|
+
}
|
|
22
|
+
const styleObj = {
|
|
23
|
+
'--kup_radio_columns': hasColumns
|
|
24
|
+
? `repeat(${props.columns}, 1fr)`
|
|
25
|
+
: '',
|
|
26
|
+
};
|
|
27
|
+
return (h("div", { class: `f-radio radio-wrapper ${hasColumns ? 'radio-wrapper-grid' : ''} ${props.danger ? 'kup-danger' : ''} ${props.info ? 'kup-info' : ''} ${props.secondary ? 'kup-secondary' : ''} ${props.success ? 'kup-success' : ''} ${props.warning ? 'kup-warning' : ''} ${props.wrapperClass ? props.wrapperClass : ''}`, style: styleObj }, radioList));
|
|
28
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
/*-------------------------------------------------*/
|
|
3
|
+
/* C o m p o n e n t */
|
|
4
|
+
/*-------------------------------------------------*/
|
|
5
|
+
export const FRating = (props) => {
|
|
6
|
+
if (!props.maxValue) {
|
|
7
|
+
props.maxValue = 5;
|
|
8
|
+
}
|
|
9
|
+
return (h("div", { class: `f-rating ${props.disabled ? 'disabled' : ''} ${props.danger ? 'kup-danger' : ''} ${props.info ? 'kup-info' : ''} ${props.secondary ? 'kup-secondary' : ''} ${props.success ? 'kup-success' : ''} ${props.warning ? 'kup-warning' : ''} ${props.wrapperClass ? props.wrapperClass : ''}` }, buildStars(props)));
|
|
10
|
+
};
|
|
11
|
+
function buildStars(props) {
|
|
12
|
+
const stars = [];
|
|
13
|
+
for (let i = 1; i <= props.maxValue; i++) {
|
|
14
|
+
if (i <= props.value) {
|
|
15
|
+
stars.push(h("span", { class: "rating", onClick: props.onClick
|
|
16
|
+
? props.onClick.bind(props.onClick, i)
|
|
17
|
+
: null }, "\u2605"));
|
|
18
|
+
}
|
|
19
|
+
else {
|
|
20
|
+
stars.push(h("span", { class: "rating", onClick: props.onClick
|
|
21
|
+
? props.onClick.bind(props.onClick, i)
|
|
22
|
+
: null }, "\u2606"));
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
return stars;
|
|
26
|
+
}
|
|
@@ -52,7 +52,8 @@ function setContent(props) {
|
|
|
52
52
|
let value = props.value;
|
|
53
53
|
let inputType = (_a = props.inputType) !== null && _a !== void 0 ? _a : 'text';
|
|
54
54
|
let persManageForNumberFormat = false;
|
|
55
|
-
if (props.inputType === 'number' &&
|
|
55
|
+
if (props.inputType === 'number' &&
|
|
56
|
+
((props.decimals && props.decimals > 0) || props.group)) {
|
|
56
57
|
inputType = 'text';
|
|
57
58
|
persManageForNumberFormat = true;
|
|
58
59
|
}
|
|
@@ -90,7 +91,40 @@ function setContent(props) {
|
|
|
90
91
|
group: props.group,
|
|
91
92
|
integer: props.integers,
|
|
92
93
|
};
|
|
93
|
-
|
|
94
|
+
if (props.min !== undefined &&
|
|
95
|
+
props.min !== null &&
|
|
96
|
+
props.min >
|
|
97
|
+
parseFloat(e.target.value)) {
|
|
98
|
+
e.target.value =
|
|
99
|
+
formatValue(props.min.toString(), options, true);
|
|
100
|
+
}
|
|
101
|
+
else if (props.max !== undefined &&
|
|
102
|
+
props.max !== null &&
|
|
103
|
+
props.max <
|
|
104
|
+
parseFloat(e.target.value)) {
|
|
105
|
+
e.target.value =
|
|
106
|
+
formatValue(props.max.toString(), options, true);
|
|
107
|
+
}
|
|
108
|
+
else {
|
|
109
|
+
e.target.value =
|
|
110
|
+
formatValue(e.target.value, options, true);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
else {
|
|
114
|
+
if (props.min !== undefined &&
|
|
115
|
+
props.min !== null &&
|
|
116
|
+
props.min >
|
|
117
|
+
parseFloat(e.target.value)) {
|
|
118
|
+
e.target.value =
|
|
119
|
+
props.min.toString();
|
|
120
|
+
}
|
|
121
|
+
else if (props.max !== undefined &&
|
|
122
|
+
props.max !== null &&
|
|
123
|
+
props.max <
|
|
124
|
+
parseFloat(e.target.value)) {
|
|
125
|
+
e.target.value =
|
|
126
|
+
props.max.toString();
|
|
127
|
+
}
|
|
94
128
|
}
|
|
95
129
|
if (props.onChange) {
|
|
96
130
|
props.onChange(e);
|
|
@@ -50,6 +50,8 @@ export class KupData {
|
|
|
50
50
|
return FCellTypes.GAUGE;
|
|
51
51
|
case FCellShapes.IMAGE:
|
|
52
52
|
return FCellTypes.IMAGE;
|
|
53
|
+
case FCellShapes.INPUT_CHECKBOX:
|
|
54
|
+
return FCellTypes.CHECKBOX;
|
|
53
55
|
case FCellShapes.KNOB:
|
|
54
56
|
return FCellTypes.KNOB;
|
|
55
57
|
case FCellShapes.MULTI_AUTOCOMPLETE:
|
|
@@ -376,7 +376,7 @@ export class KupMath {
|
|
|
376
376
|
* @param {string} input number as string, formatted by locale US, decimal separator . (like java decimal numbers)
|
|
377
377
|
* @param {number} decimals number of significant decimal digits for output
|
|
378
378
|
* @param {string} type - type of number for calculate suffix
|
|
379
|
-
* @param {string} decSeparator decimal separator for
|
|
379
|
+
* @param {string} decSeparator decimal separator for output string
|
|
380
380
|
* @returns {string} number as string, formatted by actual browser locale (or using decimal separator param), with suffix by type
|
|
381
381
|
**/
|
|
382
382
|
numberStringToFormattedString(input, decimals, type, decSeparator) {
|
|
@@ -87,6 +87,39 @@ export const fImageUsers = [
|
|
|
87
87
|
* Components using the FPaginator functional component.
|
|
88
88
|
*/
|
|
89
89
|
export const fPaginatorUsers = [KupTagNames.BOX, KupTagNames.DATA_TABLE];
|
|
90
|
+
/**
|
|
91
|
+
* Components using the FProgressBar functional component.
|
|
92
|
+
*/
|
|
93
|
+
export const fProgressBarUsers = [
|
|
94
|
+
KupTagNames.BOX,
|
|
95
|
+
KupTagNames.CELL,
|
|
96
|
+
KupTagNames.DATA_TABLE,
|
|
97
|
+
KupTagNames.FORM,
|
|
98
|
+
KupTagNames.PROGRESS_BAR,
|
|
99
|
+
KupTagNames.TREE,
|
|
100
|
+
];
|
|
101
|
+
/**
|
|
102
|
+
* Components using the FRadio functional component.
|
|
103
|
+
*/
|
|
104
|
+
export const fRadioUsers = [
|
|
105
|
+
KupTagNames.BOX,
|
|
106
|
+
KupTagNames.CELL,
|
|
107
|
+
KupTagNames.DATA_TABLE,
|
|
108
|
+
KupTagNames.FORM,
|
|
109
|
+
KupTagNames.RADIO,
|
|
110
|
+
KupTagNames.TREE,
|
|
111
|
+
];
|
|
112
|
+
/**
|
|
113
|
+
* Components using the FRating functional component.
|
|
114
|
+
*/
|
|
115
|
+
export const fRatingUsers = [
|
|
116
|
+
KupTagNames.BOX,
|
|
117
|
+
KupTagNames.CELL,
|
|
118
|
+
KupTagNames.DATA_TABLE,
|
|
119
|
+
KupTagNames.FORM,
|
|
120
|
+
KupTagNames.RATING,
|
|
121
|
+
KupTagNames.TREE,
|
|
122
|
+
];
|
|
90
123
|
/**
|
|
91
124
|
* Components using the FSwitch functional component.
|
|
92
125
|
*/
|
|
@@ -8,10 +8,13 @@ import * as fCheckboxCSS from "../../f-components/f-checkbox/f-checkbox.css";
|
|
|
8
8
|
import * as fChipCSS from "../../f-components/f-chip/f-chip.css";
|
|
9
9
|
import * as fImageCSS from "../../f-components/f-image/f-image.css";
|
|
10
10
|
import * as fPaginatorCSS from "../../f-components/f-paginator/f-paginator.css";
|
|
11
|
+
import * as fProgressBarCSS from "../../f-components/f-progress-bar/f-progress-bar.css";
|
|
12
|
+
import * as fRadioCSS from "../../f-components/f-radio/f-radio.css";
|
|
13
|
+
import * as fRatingCSS from "../../f-components/f-rating/f-rating.css";
|
|
11
14
|
import * as fSwitchCSS from "../../f-components/f-switch/f-switch.css";
|
|
12
15
|
import * as fTextFieldCSS from "../../f-components/f-text-field/f-text-field.css";
|
|
13
16
|
import * as rippleCSS from "./mdc-ripple.css";
|
|
14
|
-
import { fButtonUsers, fCellUsers, fCheckboxUsers, fChipUsers, fImageUsers, fPaginatorUsers, fSwitchUsers, fTextFieldUsers, masterCustomStyle, rippleUsers, } from "./kup-theme-declarations";
|
|
17
|
+
import { fButtonUsers, fCellUsers, fCheckboxUsers, fChipUsers, fImageUsers, fPaginatorUsers, fProgressBarUsers, fRadioUsers, fRatingUsers, fSwitchUsers, fTextFieldUsers, masterCustomStyle, rippleUsers, } from "./kup-theme-declarations";
|
|
15
18
|
import { KupDebugCategory } from "../kup-debug/kup-debug-declarations";
|
|
16
19
|
const dom = document.documentElement;
|
|
17
20
|
/**
|
|
@@ -219,6 +222,15 @@ export class KupTheme {
|
|
|
219
222
|
if (fPaginatorUsers.includes(tagName)) {
|
|
220
223
|
completeStyle += fPaginatorCSS['default'];
|
|
221
224
|
}
|
|
225
|
+
if (fProgressBarUsers.includes(tagName)) {
|
|
226
|
+
completeStyle += fProgressBarCSS['default'];
|
|
227
|
+
}
|
|
228
|
+
if (fRadioUsers.includes(tagName)) {
|
|
229
|
+
completeStyle += fRadioCSS['default'];
|
|
230
|
+
}
|
|
231
|
+
if (fRatingUsers.includes(tagName)) {
|
|
232
|
+
completeStyle += fRatingCSS['default'];
|
|
233
|
+
}
|
|
222
234
|
if (fSwitchUsers.includes(tagName)) {
|
|
223
235
|
completeStyle += fSwitchCSS['default'];
|
|
224
236
|
}
|
|
@@ -11,14 +11,13 @@ export var KupTagNames;
|
|
|
11
11
|
KupTagNames["BUTTON_LIST"] = "KUP-BUTTON-LIST";
|
|
12
12
|
KupTagNames["CALENDAR"] = "KUP-CALENDAR";
|
|
13
13
|
KupTagNames["CARD"] = "KUP-CARD";
|
|
14
|
+
KupTagNames["CARD_LIST"] = "KUP-CARD-LIST";
|
|
14
15
|
KupTagNames["CELL"] = "KUP-CELL";
|
|
15
16
|
KupTagNames["CHART"] = "KUP-CHART";
|
|
16
17
|
KupTagNames["CHECKBOX"] = "KUP-CHECKBOX";
|
|
17
18
|
KupTagNames["CHIP"] = "KUP-CHIP";
|
|
18
19
|
KupTagNames["COLOR_PICKER"] = "KUP-COLOR-PICKER";
|
|
19
20
|
KupTagNames["COMBOBOX"] = "KUP-COMBOBOX";
|
|
20
|
-
KupTagNames["DASH"] = "KUP-DASH";
|
|
21
|
-
KupTagNames["DASH_LIST"] = "KUP-DASH-LIST";
|
|
22
21
|
KupTagNames["DASHBOARD"] = "KUP-DASHBOARD";
|
|
23
22
|
KupTagNames["DATA_TABLE"] = "KUP-DATA-TABLE";
|
|
24
23
|
KupTagNames["DATE_PICKER"] = "KUP-DATE-PICKER";
|
|
@@ -105,13 +105,12 @@ export function compareValues(obj1, value1, obj2, value2, sortMode) {
|
|
|
105
105
|
v2 = dom.ketchup.dates.toDate(dom.ketchup.dates.format(s2, KupDatesFormats.ISO_DATE));
|
|
106
106
|
}
|
|
107
107
|
else if (dom.ketchup.objects.isTime(obj1)) {
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
: KupDatesFormats.ISO_TIME_WITHOUT_SECONDS));
|
|
108
|
+
// Previous code could not work because dayjs
|
|
109
|
+
// returns an invalid date when it tries to parse a time
|
|
110
|
+
// This solution is simpler and it works because the time format
|
|
111
|
+
// was assumed to be equals to HH:mm:ss or HH:mm
|
|
112
|
+
v1 = Number(s1.replace(/:/g, ''));
|
|
113
|
+
v2 = Number(s2.replace(/:/g, ''));
|
|
115
114
|
}
|
|
116
115
|
else if (dom.ketchup.objects.isTimestamp(obj1)) {
|
|
117
116
|
v1 = dom.ketchup.dates.toDate(dom.ketchup.dates.format(s1, KupDatesFormats.ISO_DATE_TIME));
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Get the base path to where the assets can be found. Use "setAssetPath(path)"
|
|
3
|
+
* if the path needs to be customized.
|
|
4
|
+
*/
|
|
5
|
+
export declare const getAssetPath: (path: string) => string;
|
|
6
|
+
|
|
1
7
|
/**
|
|
2
8
|
* Used to manually set the base path where assets can be found.
|
|
3
9
|
* If the script is used as "module", it's recommended to use "import.meta.url",
|
package/dist/components/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { setAssetPath, setNonce, setPlatformOptions } from '@stencil/core/internal/client';
|
|
1
|
+
export { getAssetPath, setAssetPath, setNonce, setPlatformOptions } from '@stencil/core/internal/client';
|
|
@@ -212,6 +212,8 @@ const KupAccordion$1 = /*@__PURE__*/ proxyCustomElement(class KupAccordion exten
|
|
|
212
212
|
"refresh": [64],
|
|
213
213
|
"setProps": [64],
|
|
214
214
|
"toggleItem": [64]
|
|
215
|
+
}, undefined, {
|
|
216
|
+
"ripple": ["applyRipple"]
|
|
215
217
|
}]);
|
|
216
218
|
function defineCustomElement$1() {
|
|
217
219
|
if (typeof customElements === "undefined") {
|