@sme.up/ketchup 5.0.0 → 5.2.1-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/README.md +1 -1
- package/dist/cjs/{cell-utils-720be0c8.js → cell-utils-d96b2993.js} +4 -4
- package/dist/cjs/{f-button-dbf3cd3a.js → f-button-2b9b99b1.js} +2 -2
- package/dist/cjs/{f-cell-93d984ad.js → f-cell-8351cb84.js} +8 -96
- package/dist/cjs/{f-chip-438213eb.js → f-chip-df59e1b0.js} +3 -3
- package/dist/cjs/{f-image-21865ab7.js → f-image-12bab3b5.js} +2 -2
- package/dist/cjs/f-text-field-e7c35b5b.js +94 -0
- package/dist/cjs/f-text-field-mdc-a67f5dfe.js +2852 -0
- package/dist/cjs/{index-ab119fad.js → index-eb556444.js} +6 -1
- package/dist/cjs/ketchup.cjs.js +3 -3
- package/dist/cjs/kup-accordion.cjs.entry.js +5 -5
- package/dist/cjs/kup-autocomplete_27.cjs.entry.js +641 -3331
- package/dist/cjs/kup-calendar.cjs.entry.js +8 -8
- package/dist/cjs/kup-cell.cjs.entry.js +9 -8
- package/dist/cjs/kup-dash-list.cjs.entry.js +5 -5
- package/dist/cjs/kup-dash_2.cjs.entry.js +5 -5
- package/dist/cjs/kup-drawer.cjs.entry.js +8 -5
- package/dist/cjs/kup-echart.cjs.entry.js +210 -60
- package/dist/cjs/kup-field.cjs.entry.js +3 -3
- package/dist/cjs/kup-iframe.cjs.entry.js +4 -4
- package/dist/cjs/kup-lazy.cjs.entry.js +4 -4
- package/dist/cjs/kup-magic-box.cjs.entry.js +7 -7
- package/dist/cjs/{kup-manager-09c0c1fc.js → kup-manager-5c03da64.js} +3061 -2642
- package/dist/cjs/kup-nav-bar.cjs.entry.js +6 -6
- package/dist/cjs/kup-numeric-picker.cjs.entry.js +423 -0
- package/dist/cjs/kup-photo-frame.cjs.entry.js +179 -0
- package/dist/cjs/kup-probe.cjs.entry.js +3 -3
- package/dist/cjs/kup-qlik.cjs.entry.js +3 -3
- package/dist/cjs/kup-snackbar.cjs.entry.js +6 -6
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/{utils-a60ab5fa.js → utils-e99921c1.js} +4 -38
- package/dist/collection/assets/card.js +30 -30
- package/dist/collection/assets/data-table.js +24 -74
- package/dist/collection/assets/echart.js +481 -0
- package/dist/collection/assets/index.js +87 -79
- package/dist/collection/assets/kupdata.js +29 -41
- package/dist/collection/assets/kuptooltip.js +608 -0
- package/dist/collection/assets/list.js +6 -6
- package/dist/collection/assets/nav-bar.js +4 -4
- package/dist/collection/assets/probe.js +18 -18
- package/dist/collection/collection-manifest.json +3 -1
- package/dist/collection/components/kup-autocomplete/kup-autocomplete.js +4 -4
- package/dist/collection/components/kup-box/kup-box.js +9 -9
- package/dist/collection/components/kup-button-list/kup-button-list.js +4 -4
- package/dist/collection/components/kup-card/built-in/kup-card-built-in.js +10 -0
- package/dist/collection/components/kup-card/built-in/kup-card-column-drop-menu.js +20 -20
- package/dist/collection/components/kup-card/built-in/kup-card-numeric.js +153 -0
- package/dist/collection/components/kup-card/kup-card.css +35 -0
- package/dist/collection/components/kup-card/kup-card.js +1 -0
- package/dist/collection/components/kup-chip/kup-chip.js +4 -4
- package/dist/collection/components/kup-combobox/kup-combobox.js +5 -5
- package/dist/collection/components/kup-data-table/kup-data-table-declarations.js +0 -2
- package/dist/collection/components/kup-data-table/kup-data-table-helper.js +31 -32
- 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 +112 -159
- package/dist/collection/components/kup-date-picker/kup-date-picker.js +1 -1
- package/dist/collection/components/kup-drawer/kup-drawer.js +4 -1
- package/dist/collection/components/kup-dropdown-button/kup-dropdown-button.css +3 -3
- package/dist/collection/components/kup-dropdown-button/kup-dropdown-button.js +14 -14
- package/dist/collection/components/kup-echart/kup-echart-declarations.js +3 -0
- package/dist/collection/components/kup-echart/kup-echart.js +246 -58
- package/dist/collection/components/kup-image/assets/svg/instagram.svg +1 -0
- package/dist/collection/components/kup-image/assets/svg/pinterest.svg +1 -0
- package/dist/collection/components/kup-image/assets/svg/reddit.svg +1 -0
- package/dist/collection/components/kup-list/kup-list-helper.js +26 -26
- package/dist/collection/components/kup-list/kup-list.css +35 -3
- package/dist/collection/components/kup-list/kup-list.js +52 -44
- package/dist/collection/components/kup-magic-box/kup-magic-box.js +3 -3
- package/dist/collection/components/kup-nav-bar/kup-nav-bar.js +2 -2
- package/dist/collection/components/kup-numeric-picker/kup-numeric-picker-declarations.js +16 -0
- package/dist/collection/components/kup-numeric-picker/kup-numeric-picker.css +50 -0
- package/dist/collection/components/kup-numeric-picker/kup-numeric-picker.js +895 -0
- package/dist/collection/components/kup-photo-frame/kup-photo-frame-declarations.js +10 -0
- package/dist/collection/components/kup-photo-frame/kup-photo-frame.css +70 -0
- package/dist/collection/components/kup-photo-frame/kup-photo-frame.js +382 -0
- package/dist/collection/components/kup-tab-bar/kup-tab-bar.css +1 -1
- package/dist/collection/components/kup-time-picker/kup-time-picker.js +8 -8
- package/dist/collection/components/kup-tree/kup-tree.js +25 -38
- package/dist/collection/f-components/f-paginator/f-paginator.js +6 -6
- package/dist/collection/managers/kup-data/kup-data-cell-helper.js +2 -2
- package/dist/collection/managers/kup-data/kup-data-column-helper.js +27 -3
- package/dist/collection/managers/kup-data/kup-data-declarations.js +2 -1
- package/dist/collection/managers/kup-data/kup-data-node-helper.js +1 -1
- package/dist/collection/managers/kup-data/kup-data-row-helper.js +2 -2
- package/dist/collection/managers/kup-data/kup-data.js +337 -155
- package/dist/collection/managers/kup-dates/kup-dates.js +2 -2
- package/dist/collection/managers/kup-debug/kup-debug.js +7 -6
- package/dist/collection/managers/kup-dynamic-position/kup-dynamic-position.js +1 -1
- package/dist/collection/managers/kup-language/kup-language.js +2 -2
- package/dist/collection/managers/kup-manager/kup-manager.js +25 -1
- package/dist/collection/managers/kup-math/kup-math-declarations.js +13 -0
- package/dist/collection/managers/kup-math/kup-math-helper.js +39 -0
- package/dist/collection/managers/kup-math/kup-math.js +161 -0
- package/dist/collection/managers/kup-objects/kup-objects.js +48 -1
- package/dist/collection/managers/kup-theme/kup-theme-declarations.js +1 -0
- package/dist/collection/managers/kup-theme/kup-theme.js +2 -2
- package/dist/collection/managers/kup-tooltip/kup-tooltip-declarations.js +1 -0
- package/dist/collection/managers/kup-tooltip/kup-tooltip.js +191 -0
- package/dist/collection/types/GenericTypes.js +1 -0
- package/dist/collection/utils/cell-utils.js +2 -3
- package/dist/collection/utils/kup-column-menu/kup-column-menu.js +1 -1
- package/dist/collection/utils/utils.js +3 -74
- package/dist/esm/{cell-utils-b80ccb8c.js → cell-utils-f4bdbbc8.js} +4 -4
- package/dist/esm/{f-button-9e835467.js → f-button-54a49fd8.js} +2 -2
- package/dist/esm/{f-cell-f8bb2e04.js → f-cell-d5dac50b.js} +8 -95
- package/dist/esm/{f-chip-953c6915.js → f-chip-a3035b4b.js} +3 -3
- package/dist/esm/{f-image-78c5265e.js → f-image-d32465e3.js} +2 -2
- package/dist/esm/f-text-field-c25cc63f.js +92 -0
- package/dist/esm/f-text-field-mdc-9fbbefc3.js +2850 -0
- package/dist/esm/{index-78f3699d.js → index-baeab1ac.js} +6 -2
- package/dist/esm/ketchup.js +3 -3
- package/dist/esm/kup-accordion.entry.js +5 -5
- package/dist/esm/kup-autocomplete_27.entry.js +625 -3315
- package/dist/esm/kup-calendar.entry.js +8 -8
- package/dist/esm/kup-cell.entry.js +9 -8
- package/dist/esm/kup-dash-list.entry.js +5 -5
- package/dist/esm/kup-dash_2.entry.js +5 -5
- package/dist/esm/kup-drawer.entry.js +8 -5
- package/dist/esm/kup-echart.entry.js +210 -60
- package/dist/esm/kup-field.entry.js +3 -3
- package/dist/esm/kup-iframe.entry.js +4 -4
- package/dist/esm/kup-lazy.entry.js +4 -4
- package/dist/esm/kup-magic-box.entry.js +7 -7
- package/dist/esm/{kup-manager-bba62291.js → kup-manager-9316a184.js} +3062 -2642
- package/dist/esm/kup-nav-bar.entry.js +6 -6
- package/dist/esm/kup-numeric-picker.entry.js +419 -0
- package/dist/esm/kup-photo-frame.entry.js +175 -0
- package/dist/esm/kup-probe.entry.js +3 -3
- package/dist/esm/kup-qlik.entry.js +3 -3
- package/dist/esm/kup-snackbar.entry.js +6 -6
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{utils-d1569956.js → utils-f24319a0.js} +5 -37
- package/dist/ketchup/assets/svg/instagram.svg +1 -0
- package/dist/ketchup/assets/svg/pinterest.svg +1 -0
- package/dist/ketchup/assets/svg/reddit.svg +1 -0
- package/dist/ketchup/ketchup.esm.js +1 -1
- package/dist/ketchup/p-09d708c4.entry.js +1 -0
- package/dist/ketchup/p-11e72a8c.entry.js +1 -0
- package/dist/ketchup/p-12773ca8.js +9 -0
- package/dist/ketchup/p-203d6295.entry.js +1 -0
- package/dist/ketchup/p-34748c91.js +1 -0
- package/dist/ketchup/p-34b74425.js +1 -0
- package/dist/ketchup/p-40f97429.js +1 -0
- package/dist/ketchup/p-4173422f.entry.js +1 -0
- package/dist/ketchup/p-41741c28.entry.js +1 -0
- package/dist/ketchup/p-44192f30.entry.js +1 -0
- package/dist/ketchup/{p-ebf4cf56.js → p-44f8da2a.js} +1 -1
- package/dist/ketchup/{p-fa540f82.js → p-4f56932b.js} +1 -1
- package/dist/ketchup/p-669bde31.js +1 -0
- package/dist/ketchup/p-67842f1e.entry.js +1 -0
- package/dist/ketchup/{p-f993f813.js → p-7a74ad17.js} +1 -1
- package/dist/ketchup/p-7ba8fa4a.entry.js +39 -0
- package/dist/ketchup/p-7de0d7e1.js +1 -0
- package/dist/ketchup/p-8418e8fa.entry.js +1 -0
- package/dist/ketchup/p-96bf19aa.entry.js +1 -0
- package/dist/ketchup/p-9a61d8dc.entry.js +1 -0
- package/dist/ketchup/p-b0ddcce9.entry.js +9 -0
- package/dist/ketchup/{p-aa27f9f7.entry.js → p-b6c21223.entry.js} +2 -2
- package/dist/ketchup/p-bb8844bf.entry.js +1 -0
- package/dist/ketchup/p-c58a2a81.entry.js +1 -0
- package/dist/ketchup/p-ca3d585b.entry.js +1 -0
- package/dist/ketchup/p-e6709c26.entry.js +1 -0
- package/dist/ketchup/p-e8e3c9da.entry.js +1 -0
- package/dist/ketchup/p-ecb7069b.js +135 -0
- package/dist/types/components/kup-button-list/kup-button-list-declarations.d.ts +2 -1
- package/dist/types/components/kup-card/built-in/kup-card-built-in.d.ts +7 -0
- package/dist/types/components/kup-card/built-in/kup-card-numeric.d.ts +2 -0
- package/dist/types/components/kup-card/kup-card-declarations.d.ts +26 -1
- package/dist/types/components/kup-data-table/kup-data-table-declarations.d.ts +2 -2
- package/dist/types/components/kup-data-table/kup-data-table-state.d.ts +1 -1
- package/dist/types/components/kup-data-table/kup-data-table.d.ts +7 -15
- package/dist/types/components/kup-dropdown-button/kup-dropdown-button.d.ts +1 -1
- package/dist/types/components/kup-echart/kup-echart-declarations.d.ts +3 -0
- package/dist/types/components/kup-echart/kup-echart.d.ts +12 -1
- package/dist/types/components/kup-list/kup-list-declarations.d.ts +3 -7
- package/dist/types/components/kup-list/kup-list-helper.d.ts +6 -6
- package/dist/types/components/kup-list/kup-list.d.ts +2 -2
- package/dist/types/components/kup-numeric-picker/kup-numeric-picker-declarations.d.ts +19 -0
- package/dist/types/components/kup-numeric-picker/kup-numeric-picker.d.ts +121 -0
- package/dist/types/components/kup-photo-frame/kup-photo-frame-declarations.d.ts +9 -0
- package/dist/types/components/kup-photo-frame/kup-photo-frame.d.ts +61 -0
- package/dist/types/components.d.ts +249 -28
- package/dist/types/managers/kup-data/kup-data-column-helper.d.ts +9 -1
- package/dist/types/managers/kup-data/kup-data-declarations.d.ts +4 -25
- package/dist/types/managers/kup-data/kup-data-node-helper.d.ts +1 -1
- package/dist/types/managers/kup-data/kup-data.d.ts +63 -27
- package/dist/types/managers/kup-manager/kup-manager-declarations.d.ts +21 -0
- package/dist/types/managers/kup-manager/kup-manager.d.ts +4 -0
- package/dist/types/managers/kup-math/kup-math-declarations.d.ts +27 -0
- package/dist/types/managers/kup-math/kup-math-helper.d.ts +17 -0
- package/dist/types/managers/kup-math/kup-math.d.ts +61 -0
- package/dist/types/managers/kup-objects/kup-objects.d.ts +22 -0
- package/dist/types/managers/kup-tooltip/kup-tooltip-declarations.d.ts +8 -0
- package/dist/types/managers/kup-tooltip/kup-tooltip.d.ts +40 -0
- package/dist/types/types/GenericTypes.d.ts +1 -0
- package/dist/types/utils/utils.d.ts +0 -18
- package/package.json +3 -3
- package/CHANGELOG.md +0 -5
- package/dist/collection/managers/kup-data/kup-data-dataset-helper.js +0 -262
- package/dist/collection/managers/kup-data/kup-data-helper.js +0 -61
- package/dist/collection/utils/state-utils.js +0 -9
- package/dist/ketchup/p-0032a782.entry.js +0 -1
- package/dist/ketchup/p-18c4d083.entry.js +0 -1
- package/dist/ketchup/p-199c972e.entry.js +0 -1
- package/dist/ketchup/p-29800a2e.js +0 -1
- package/dist/ketchup/p-34aa8d8a.entry.js +0 -1
- package/dist/ketchup/p-542279e9.entry.js +0 -1
- package/dist/ketchup/p-5b26a7a8.entry.js +0 -39
- package/dist/ketchup/p-5c97e7ab.js +0 -1
- package/dist/ketchup/p-6817ca85.entry.js +0 -1
- package/dist/ketchup/p-76e674ca.entry.js +0 -1
- package/dist/ketchup/p-78aa6f1b.js +0 -1
- package/dist/ketchup/p-842b66aa.entry.js +0 -1
- package/dist/ketchup/p-894981c0.entry.js +0 -143
- package/dist/ketchup/p-8ac2fa75.entry.js +0 -1
- package/dist/ketchup/p-907c9e11.entry.js +0 -1
- package/dist/ketchup/p-9ae9149b.entry.js +0 -1
- package/dist/ketchup/p-b0d1bdd8.js +0 -9
- package/dist/ketchup/p-e1e4c951.entry.js +0 -1
- package/dist/ketchup/p-eba369d9.entry.js +0 -1
- package/dist/ketchup/p-ed0b8666.js +0 -1
- package/dist/types/managers/kup-data/kup-data-dataset-helper.d.ts +0 -42
- package/dist/types/managers/kup-data/kup-data-helper.d.ts +0 -11
- package/dist/types/utils/state-utils.d.ts +0 -1
package/README.md
CHANGED
|
@@ -95,7 +95,7 @@ Distributed under the Apache 2.0 License. [Click here for more information](http
|
|
|
95
95
|
|
|
96
96
|
## Credits
|
|
97
97
|
|
|
98
|
-
List of open source
|
|
98
|
+
List of open source libraries/resources we used and which we'd like to thank:
|
|
99
99
|
|
|
100
100
|
- [Day.js](https://day.js.org/)
|
|
101
101
|
- [d3-shape](https://www.npmjs.com/package/d3-shape)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const
|
|
4
|
-
const
|
|
3
|
+
const utils = require('./utils-e99921c1.js');
|
|
4
|
+
const kupManager = require('./kup-manager-5c03da64.js');
|
|
5
5
|
|
|
6
6
|
const dom = document.documentElement;
|
|
7
7
|
// -------------
|
|
@@ -30,9 +30,9 @@ function getValueForDisplay2(values, column) {
|
|
|
30
30
|
}
|
|
31
31
|
function formatToNumber(cell) {
|
|
32
32
|
if (cell.obj) {
|
|
33
|
-
return
|
|
33
|
+
return dom.ketchup.math.numberify(cell.obj.k);
|
|
34
34
|
}
|
|
35
|
-
return
|
|
35
|
+
return dom.ketchup.math.numberify(cell.value);
|
|
36
36
|
}
|
|
37
37
|
function _getCellValueForDisplay(value, column, cell) {
|
|
38
38
|
let obj = column != null ? column.obj : null;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const index = require('./index-
|
|
3
|
+
const index = require('./index-eb556444.js');
|
|
4
4
|
const fButtonDeclarations = require('./f-button-declarations-b611587f.js');
|
|
5
|
-
const fImage = require('./f-image-
|
|
5
|
+
const fImage = require('./f-image-12bab3b5.js');
|
|
6
6
|
|
|
7
7
|
/*-------------------------------------------------*/
|
|
8
8
|
/* C o m p o n e n t */
|
|
@@ -1,99 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const kupManager = require('./kup-manager-
|
|
4
|
-
const index = require('./index-
|
|
5
|
-
const cellUtils = require('./cell-utils-
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
/*-------------------------------------------------*/
|
|
11
|
-
/* C o m p o n e n t */
|
|
12
|
-
/*-------------------------------------------------*/
|
|
13
|
-
const FTextField = (props, children) => {
|
|
14
|
-
return (index.h("div", Object.assign({ class: `f-text-field ${props.danger ? 'kup-danger' : ''} ${props.fullHeight ? 'kup-full-height' : ''} ${props.fullWidth ? 'kup-full-width' : ''} ${props.info ? 'kup-info' : ''} ${props.secondary ? 'kup-secondary' : ''} ${props.shaped ? 'kup-shaped' : ''} ${props.success ? 'kup-success' : ''} ${props.warning ? 'kup-warning' : ''} ${props.wrapperClass ? props.wrapperClass : ''}` }, props.dataSet, { id: props.id, title: props.title }),
|
|
15
|
-
props.leadingLabel || props.trailingLabel ? (index.h("div", { class: `mdc-form-field ${props.leadingLabel ? 'mdc-form-field--align-end' : ''}` }, [
|
|
16
|
-
setContent(props),
|
|
17
|
-
setHelper(props),
|
|
18
|
-
index.h("label", null, props.label),
|
|
19
|
-
])) : ([setContent(props), setHelper(props)]),
|
|
20
|
-
children));
|
|
21
|
-
};
|
|
22
|
-
/*-------------------------------------------------*/
|
|
23
|
-
/* M e t h o d s */
|
|
24
|
-
/*-------------------------------------------------*/
|
|
25
|
-
function setContent(props) {
|
|
26
|
-
const isOutlined = props.textArea || props.outlined;
|
|
27
|
-
let labelEl;
|
|
28
|
-
let iconEl;
|
|
29
|
-
if (props.label && !props.leadingLabel && !props.trailingLabel) {
|
|
30
|
-
labelEl = (index.h("label", { class: "mdc-floating-label", htmlFor: "kup-input" }, props.label));
|
|
31
|
-
}
|
|
32
|
-
if (props.icon) {
|
|
33
|
-
let iconStyle;
|
|
34
|
-
let iconClass = '';
|
|
35
|
-
if (Object.values(kupManager.KupThemeIconValues).indexOf(props.icon) > -1) {
|
|
36
|
-
iconClass = props.icon.replace('--', '');
|
|
37
|
-
}
|
|
38
|
-
else {
|
|
39
|
-
let svg = `url('${index.getAssetPath(`./assets/svg/${props.icon}.svg`)}') no-repeat center`;
|
|
40
|
-
iconStyle = {
|
|
41
|
-
mask: svg,
|
|
42
|
-
webkitMask: svg,
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
iconEl = (index.h("span", { style: iconStyle, onClick: props.onIconClick, class: `mdc-text-field__icon kup-icon action ${iconClass}` }));
|
|
46
|
-
}
|
|
47
|
-
const classObj = {
|
|
48
|
-
'is-clearable': props.isClearable,
|
|
49
|
-
'mdc-text-field': true,
|
|
50
|
-
'mdc-text-field--disabled': props.disabled,
|
|
51
|
-
'mdc-text-field--filled': !props.fullWidth && !isOutlined,
|
|
52
|
-
'mdc-text-field--no-label': !props.label,
|
|
53
|
-
'mdc-text-field--fullwidth': props.fullWidth,
|
|
54
|
-
'mdc-text-field--outlined': isOutlined,
|
|
55
|
-
'mdc-text-field--textarea': props.textArea,
|
|
56
|
-
'mdc-text-field--with-leading-icon': props.icon && !props.trailingIcon,
|
|
57
|
-
'mdc-text-field--with-trailing-icon': props.icon && props.trailingIcon,
|
|
58
|
-
};
|
|
59
|
-
return (index.h("div", { class: classObj },
|
|
60
|
-
props.textArea && props.maxLength ? (index.h("div", { class: "mdc-text-field-character-counter" },
|
|
61
|
-
"'0 / ' + ",
|
|
62
|
-
props.maxLength)) : undefined,
|
|
63
|
-
!props.trailingIcon ? iconEl : undefined,
|
|
64
|
-
props.textArea ? (index.h("span", { class: "mdc-text-field__resizer" },
|
|
65
|
-
index.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 }))) : (index.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 })),
|
|
66
|
-
props.isClearable ? (index.h("span", { class: `mdc-text-field__icon kup-icon ${kupManager.KupThemeIconValues.CLEAR.replace('--', '')}`, onClick: props.onClearIconClick })) : undefined,
|
|
67
|
-
props.trailingIcon ? iconEl : undefined,
|
|
68
|
-
!props.fullWidth && !isOutlined ? labelEl : undefined,
|
|
69
|
-
isOutlined ? (index.h("div", { class: "mdc-notched-outline" },
|
|
70
|
-
index.h("div", { class: "mdc-notched-outline__leading" }),
|
|
71
|
-
index.h("div", { class: "mdc-notched-outline__notch" }, labelEl),
|
|
72
|
-
index.h("div", { class: "mdc-notched-outline__trailing" }))) : (index.h("span", { class: "mdc-line-ripple" }))));
|
|
73
|
-
}
|
|
74
|
-
function setHelper(props) {
|
|
75
|
-
if (props.helperEnabled !== false) {
|
|
76
|
-
if (props.helper) {
|
|
77
|
-
const classObj = {
|
|
78
|
-
'mdc-text-field-helper-text': true,
|
|
79
|
-
'mdc-text-field-helper-text--persistent': !props.helperWhenFocused,
|
|
80
|
-
};
|
|
81
|
-
return (index.h("div", { class: "mdc-text-field-helper-line" },
|
|
82
|
-
index.h("div", { class: classObj }, props.helper),
|
|
83
|
-
props.maxLength && !props.textArea ? (index.h("div", { class: "mdc-text-field-character-counter" },
|
|
84
|
-
"'0 / ' + ",
|
|
85
|
-
props.maxLength.toString())) : undefined));
|
|
86
|
-
}
|
|
87
|
-
else {
|
|
88
|
-
if (props.maxLength && !props.textArea) {
|
|
89
|
-
return (index.h("div", { class: "mdc-text-field-helper-line" },
|
|
90
|
-
index.h("div", { class: "mdc-text-field-character-counter" },
|
|
91
|
-
"'0 / ' + ",
|
|
92
|
-
props.maxLength)));
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
}
|
|
3
|
+
const kupManager = require('./kup-manager-5c03da64.js');
|
|
4
|
+
const index = require('./index-eb556444.js');
|
|
5
|
+
const cellUtils = require('./cell-utils-d96b2993.js');
|
|
6
|
+
const fTextField = require('./f-text-field-e7c35b5b.js');
|
|
7
|
+
const utils = require('./utils-e99921c1.js');
|
|
8
|
+
const fImage = require('./f-image-12bab3b5.js');
|
|
9
|
+
const fChip = require('./f-chip-df59e1b0.js');
|
|
97
10
|
|
|
98
11
|
const autoAlignComps = [kupManager.KupTagNames.DATA_TABLE, kupManager.KupTagNames.TREE];
|
|
99
12
|
/**
|
|
@@ -477,7 +390,7 @@ function setEditableCell(cellType, classObj, cell, column, props) {
|
|
|
477
390
|
case FCellTypes.NUMBER:
|
|
478
391
|
classObj[FCellClasses.C_RIGHT_ALIGNED] = true;
|
|
479
392
|
case FCellTypes.STRING:
|
|
480
|
-
return (index.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
|
|
393
|
+
return (index.h(fTextField.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
|
|
481
394
|
? utils.stringToNumber(cell.value).toString()
|
|
482
395
|
: 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) })));
|
|
483
396
|
}
|
|
@@ -738,4 +651,3 @@ function cellEvent(e, props, cellType, cellEventName) {
|
|
|
738
651
|
|
|
739
652
|
exports.FCell = FCell;
|
|
740
653
|
exports.FCheckbox = FCheckbox;
|
|
741
|
-
exports.FTextField = FTextField;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const index = require('./index-
|
|
4
|
-
const fImage = require('./f-image-
|
|
5
|
-
const kupManager = require('./kup-manager-
|
|
3
|
+
const index = require('./index-eb556444.js');
|
|
4
|
+
const fImage = require('./f-image-12bab3b5.js');
|
|
5
|
+
const kupManager = require('./kup-manager-5c03da64.js');
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Types of the f-chip component.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const index = require('./index-
|
|
4
|
-
const kupManager = require('./kup-manager-
|
|
3
|
+
const index = require('./index-eb556444.js');
|
|
4
|
+
const kupManager = require('./kup-manager-5c03da64.js');
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* The type of a CSS step in CSS-drawing mode.
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const index = require('./index-eb556444.js');
|
|
4
|
+
const kupManager = require('./kup-manager-5c03da64.js');
|
|
5
|
+
|
|
6
|
+
/*-------------------------------------------------*/
|
|
7
|
+
/* C o m p o n e n t */
|
|
8
|
+
/*-------------------------------------------------*/
|
|
9
|
+
const FTextField = (props, children) => {
|
|
10
|
+
return (index.h("div", Object.assign({ class: `f-text-field ${props.danger ? 'kup-danger' : ''} ${props.fullHeight ? 'kup-full-height' : ''} ${props.fullWidth ? 'kup-full-width' : ''} ${props.info ? 'kup-info' : ''} ${props.secondary ? 'kup-secondary' : ''} ${props.shaped ? 'kup-shaped' : ''} ${props.success ? 'kup-success' : ''} ${props.warning ? 'kup-warning' : ''} ${props.wrapperClass ? props.wrapperClass : ''}` }, props.dataSet, { id: props.id, title: props.title }),
|
|
11
|
+
props.leadingLabel || props.trailingLabel ? (index.h("div", { class: `mdc-form-field ${props.leadingLabel ? 'mdc-form-field--align-end' : ''}` }, [
|
|
12
|
+
setContent(props),
|
|
13
|
+
setHelper(props),
|
|
14
|
+
index.h("label", null, props.label),
|
|
15
|
+
])) : ([setContent(props), setHelper(props)]),
|
|
16
|
+
children));
|
|
17
|
+
};
|
|
18
|
+
/*-------------------------------------------------*/
|
|
19
|
+
/* M e t h o d s */
|
|
20
|
+
/*-------------------------------------------------*/
|
|
21
|
+
function setContent(props) {
|
|
22
|
+
const isOutlined = props.textArea || props.outlined;
|
|
23
|
+
let labelEl;
|
|
24
|
+
let iconEl;
|
|
25
|
+
if (props.label && !props.leadingLabel && !props.trailingLabel) {
|
|
26
|
+
labelEl = (index.h("label", { class: "mdc-floating-label", htmlFor: "kup-input" }, props.label));
|
|
27
|
+
}
|
|
28
|
+
if (props.icon) {
|
|
29
|
+
let iconStyle;
|
|
30
|
+
let iconClass = '';
|
|
31
|
+
if (Object.values(kupManager.KupThemeIconValues).indexOf(props.icon) > -1) {
|
|
32
|
+
iconClass = props.icon.replace('--', '');
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
let svg = `url('${index.getAssetPath(`./assets/svg/${props.icon}.svg`)}') no-repeat center`;
|
|
36
|
+
iconStyle = {
|
|
37
|
+
mask: svg,
|
|
38
|
+
webkitMask: svg,
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
iconEl = (index.h("span", { style: iconStyle, onClick: props.onIconClick, class: `mdc-text-field__icon kup-icon action ${iconClass}` }));
|
|
42
|
+
}
|
|
43
|
+
const classObj = {
|
|
44
|
+
'is-clearable': props.isClearable,
|
|
45
|
+
'mdc-text-field': true,
|
|
46
|
+
'mdc-text-field--disabled': props.disabled,
|
|
47
|
+
'mdc-text-field--filled': !props.fullWidth && !isOutlined,
|
|
48
|
+
'mdc-text-field--no-label': !props.label,
|
|
49
|
+
'mdc-text-field--fullwidth': props.fullWidth,
|
|
50
|
+
'mdc-text-field--outlined': isOutlined,
|
|
51
|
+
'mdc-text-field--textarea': props.textArea,
|
|
52
|
+
'mdc-text-field--with-leading-icon': props.icon && !props.trailingIcon,
|
|
53
|
+
'mdc-text-field--with-trailing-icon': props.icon && props.trailingIcon,
|
|
54
|
+
};
|
|
55
|
+
return (index.h("div", { class: classObj },
|
|
56
|
+
props.textArea && props.maxLength ? (index.h("div", { class: "mdc-text-field-character-counter" },
|
|
57
|
+
"'0 / ' + ",
|
|
58
|
+
props.maxLength)) : undefined,
|
|
59
|
+
!props.trailingIcon ? iconEl : undefined,
|
|
60
|
+
props.textArea ? (index.h("span", { class: "mdc-text-field__resizer" },
|
|
61
|
+
index.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 }))) : (index.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 })),
|
|
62
|
+
props.isClearable ? (index.h("span", { class: `mdc-text-field__icon kup-icon ${kupManager.KupThemeIconValues.CLEAR.replace('--', '')}`, onClick: props.onClearIconClick })) : undefined,
|
|
63
|
+
props.trailingIcon ? iconEl : undefined,
|
|
64
|
+
!props.fullWidth && !isOutlined ? labelEl : undefined,
|
|
65
|
+
isOutlined ? (index.h("div", { class: "mdc-notched-outline" },
|
|
66
|
+
index.h("div", { class: "mdc-notched-outline__leading" }),
|
|
67
|
+
index.h("div", { class: "mdc-notched-outline__notch" }, labelEl),
|
|
68
|
+
index.h("div", { class: "mdc-notched-outline__trailing" }))) : (index.h("span", { class: "mdc-line-ripple" }))));
|
|
69
|
+
}
|
|
70
|
+
function setHelper(props) {
|
|
71
|
+
if (props.helperEnabled !== false) {
|
|
72
|
+
if (props.helper) {
|
|
73
|
+
const classObj = {
|
|
74
|
+
'mdc-text-field-helper-text': true,
|
|
75
|
+
'mdc-text-field-helper-text--persistent': !props.helperWhenFocused,
|
|
76
|
+
};
|
|
77
|
+
return (index.h("div", { class: "mdc-text-field-helper-line" },
|
|
78
|
+
index.h("div", { class: classObj }, props.helper),
|
|
79
|
+
props.maxLength && !props.textArea ? (index.h("div", { class: "mdc-text-field-character-counter" },
|
|
80
|
+
"'0 / ' + ",
|
|
81
|
+
props.maxLength.toString())) : undefined));
|
|
82
|
+
}
|
|
83
|
+
else {
|
|
84
|
+
if (props.maxLength && !props.textArea) {
|
|
85
|
+
return (index.h("div", { class: "mdc-text-field-helper-line" },
|
|
86
|
+
index.h("div", { class: "mdc-text-field-character-counter" },
|
|
87
|
+
"'0 / ' + ",
|
|
88
|
+
props.maxLength)));
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
exports.FTextField = FTextField;
|