@sme.up/ketchup 5.2.0-SNAPSHOT → 6.0.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/{cell-utils-5b16c180.js → cell-utils-a78d6fac.js} +2 -2
- package/dist/cjs/{component-d1496215.js → component-72a5b626.js} +30 -0
- package/dist/cjs/{f-button-3b9f32af.js → f-button-ac179257.js} +2 -2
- package/dist/cjs/{f-cell-c6ad973a.js → f-cell-69294bca.js} +33 -121
- package/dist/cjs/{f-chip-bed86c4a.js → f-chip-b00897d7.js} +5 -4
- package/dist/cjs/{f-image-08a3d340.js → f-image-89f25556.js} +2 -2
- package/dist/cjs/f-paginator-utils-8fa501b3.js +1898 -0
- package/dist/cjs/f-text-field-e1e45ade.js +94 -0
- package/dist/cjs/f-text-field-mdc-85997738.js +2570 -0
- package/dist/cjs/{index-8d7bb3be.js → index-eb556444.js} +2 -0
- 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 → kup-autocomplete_25.cjs.entry.js} +1788 -8378
- package/dist/cjs/{kup-echart.cjs.entry.js → kup-box_2.cjs.entry.js} +17102 -14788
- package/dist/cjs/kup-calendar.cjs.entry.js +42 -34
- package/dist/cjs/kup-cell.cjs.entry.js +8 -7
- package/dist/cjs/kup-dash-list.cjs.entry.js +4 -4
- package/dist/cjs/kup-dash_2.cjs.entry.js +3 -3
- package/dist/cjs/kup-drawer.cjs.entry.js +12 -5
- package/dist/cjs/kup-field.cjs.entry.js +2 -2
- package/dist/cjs/kup-form-editor.cjs.entry.js +404 -0
- package/dist/cjs/kup-iframe.cjs.entry.js +3 -3
- package/dist/cjs/kup-image-list.cjs.entry.js +228 -0
- package/dist/cjs/kup-lazy.cjs.entry.js +3 -3
- package/dist/cjs/kup-magic-box.cjs.entry.js +4 -4
- package/dist/cjs/kup-manager-7a941909.js +16703 -0
- package/dist/cjs/kup-nav-bar.cjs.entry.js +3 -3
- package/dist/cjs/kup-numeric-picker.cjs.entry.js +423 -0
- package/dist/cjs/kup-photo-frame.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 +6 -6
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/{utils-b9df398c.js → utils-6287d878.js} +1 -1
- package/dist/collection/assets/card.js +4 -5
- package/dist/collection/assets/data-table.js +44 -79
- package/dist/collection/assets/form-editor.js +338 -0
- package/dist/collection/assets/image-list.js +624 -0
- package/dist/collection/assets/index.js +16 -0
- package/dist/collection/assets/kupdata.js +0 -3
- package/dist/collection/assets/kuptooltip.js +654 -0
- package/dist/collection/assets/tree.js +0 -128
- package/dist/collection/collection-manifest.json +8 -6
- package/dist/collection/components/kup-autocomplete/kup-autocomplete.js +1 -1
- package/dist/collection/components/kup-box/kup-box-declarations.js +0 -4
- package/dist/collection/components/kup-box/kup-box.js +7 -135
- 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-clock.js +1 -1
- package/dist/collection/components/kup-card/built-in/kup-card-column-drop-menu.js +1 -2
- package/dist/collection/components/kup-card/built-in/kup-card-numeric.js +153 -0
- package/dist/collection/components/kup-card/kup-card.css +61 -8
- package/dist/collection/components/kup-card/kup-card.js +2 -2
- package/dist/collection/components/kup-card/standard/kup-card-standard.js +14 -6
- package/dist/collection/components/kup-combobox/kup-combobox.js +1 -1
- package/dist/collection/components/kup-data-table/kup-data-table-declarations.js +1 -3
- 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 +50 -138
- package/dist/collection/components/kup-date-picker/kup-date-picker.js +1 -1
- package/dist/collection/components/kup-drawer/kup-drawer.css +1 -0
- package/dist/collection/components/kup-drawer/kup-drawer.js +8 -1
- package/dist/collection/components/kup-form-editor/kup-form-editor-declarations.js +23 -0
- package/dist/collection/components/kup-form-editor/kup-form-editor.css +80 -0
- package/dist/collection/components/kup-form-editor/kup-form-editor.js +561 -0
- package/dist/collection/components/kup-image-list/kup-image-list-declarations.js +10 -0
- package/dist/collection/components/kup-image-list/kup-image-list.css +166 -0
- package/dist/collection/components/kup-image-list/kup-image-list.js +432 -0
- 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.css +3 -13
- package/dist/collection/components/kup-photo-frame/kup-photo-frame.js +1 -1
- package/dist/collection/components/kup-snackbar/kup-snackbar.css +4 -0
- package/dist/collection/components/kup-tab-bar/kup-tab-bar.js +18 -19
- package/dist/collection/components/kup-time-picker/kup-time-picker.js +2 -2
- package/dist/collection/components/kup-tree/kup-tree-declarations.js +0 -4
- package/dist/collection/components/kup-tree/kup-tree.css +10 -3
- package/dist/collection/components/kup-tree/kup-tree.js +81 -145
- package/dist/collection/f-components/f-cell/f-cell.js +7 -7
- package/dist/collection/f-components/f-chip/f-chip.js +2 -1
- package/dist/collection/managers/kup-data/kup-data-node-helper.js +24 -0
- package/dist/collection/managers/kup-data/kup-data.js +4 -1
- package/dist/collection/managers/kup-debug/kup-debug.js +1 -0
- package/dist/collection/managers/kup-dynamic-position/kup-dynamic-position.js +4 -2
- package/dist/collection/managers/kup-interact/kup-interact.js +1 -22
- package/dist/collection/managers/kup-language/kup-language-declarations.js +2 -0
- package/dist/collection/managers/kup-manager/kup-manager.js +31 -1
- package/dist/collection/managers/kup-math/kup-math.js +11 -1
- package/dist/collection/managers/kup-theme/kup-theme-declarations.js +6 -0
- package/dist/collection/managers/kup-tooltip/kup-tooltip-declarations.js +1 -0
- package/dist/collection/managers/kup-tooltip/kup-tooltip.js +224 -0
- package/dist/collection/types/GenericTypes.js +3 -0
- package/dist/collection/utils/kup-column-menu/kup-column-menu.js +8 -12
- package/dist/esm/{cell-utils-69f75e2e.js → cell-utils-964da6b5.js} +3 -3
- package/dist/esm/{component-c4eb6153.js → component-b1bedf1d.js} +27 -2
- package/dist/esm/{f-button-7e7607d8.js → f-button-871a544b.js} +2 -2
- package/dist/esm/{f-cell-e4d83c27.js → f-cell-521ef17a.js} +33 -120
- package/dist/esm/{f-chip-51dfefaf.js → f-chip-1dda722f.js} +6 -5
- package/dist/esm/{f-image-de331954.js → f-image-c468d8ae.js} +2 -2
- package/dist/esm/f-paginator-utils-7dff8ff0.js +1884 -0
- package/dist/esm/f-text-field-d6c61c73.js +92 -0
- package/dist/esm/f-text-field-mdc-d42d3f9e.js +2568 -0
- package/dist/esm/{index-aeec9835.js → index-baeab1ac.js} +2 -1
- package/dist/esm/ketchup.js +3 -3
- package/dist/esm/kup-accordion.entry.js +6 -6
- package/dist/esm/{kup-autocomplete_27.entry.js → kup-autocomplete_25.entry.js} +1724 -8312
- package/dist/esm/{kup-echart.entry.js → kup-box_2.entry.js} +17102 -14789
- package/dist/esm/kup-calendar.entry.js +43 -35
- package/dist/esm/kup-cell.entry.js +8 -7
- package/dist/esm/kup-dash-list.entry.js +4 -4
- package/dist/esm/kup-dash_2.entry.js +3 -3
- package/dist/esm/kup-drawer.entry.js +12 -5
- package/dist/esm/kup-field.entry.js +2 -2
- package/dist/esm/kup-form-editor.entry.js +400 -0
- package/dist/esm/kup-iframe.entry.js +3 -3
- package/dist/esm/kup-image-list.entry.js +224 -0
- package/dist/esm/kup-lazy.entry.js +3 -3
- package/dist/esm/kup-magic-box.entry.js +4 -4
- package/dist/esm/kup-manager-58b075b4.js +16686 -0
- package/dist/esm/kup-nav-bar.entry.js +3 -3
- package/dist/esm/kup-numeric-picker.entry.js +419 -0
- package/dist/esm/kup-photo-frame.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 +6 -6
- package/dist/esm/loader.js +3 -3
- package/dist/esm/polyfills/css-shim.js +1 -1
- package/dist/esm/{tslib.es6-8f2d44b6.js → tslib.es6-3eea2234.js} +1 -1
- package/dist/esm/{utils-35c7a90d.js → utils-d7e4b3c2.js} +2 -2
- package/dist/ketchup/ketchup.esm.js +1 -1
- package/dist/ketchup/{p-5d190cf5.js → p-1ae66cc5.js} +1 -1
- package/dist/ketchup/{p-8be1337b.js → p-34b74425.js} +1 -1
- package/dist/ketchup/{p-fea316ab.entry.js → p-3c11e615.entry.js} +1 -1
- package/dist/ketchup/p-44ec4f03.js +1 -0
- package/dist/ketchup/p-4ffbc3ff.js +1 -0
- package/dist/ketchup/p-5264a3e6.entry.js +1 -0
- package/dist/ketchup/{p-d7af8156.entry.js → p-65974e48.entry.js} +1 -1
- package/dist/ketchup/p-65b46587.entry.js +40 -0
- package/dist/ketchup/{p-3813281b.entry.js → p-6dff70f8.entry.js} +1 -1
- package/dist/ketchup/{p-33073f4a.js → p-7454cb92.js} +1 -1
- package/dist/ketchup/{p-a0b1d769.js → p-79b0730b.js} +1 -1
- package/dist/ketchup/p-7eff4eee.js +1 -0
- package/dist/ketchup/p-80968627.entry.js +1 -0
- package/dist/ketchup/{p-8c44c3b9.js → p-81605f08.js} +4 -5
- package/dist/ketchup/p-8cdf61a4.js +1 -0
- package/dist/ketchup/{p-f9c41e20.entry.js → p-954cc340.entry.js} +1 -1
- package/dist/ketchup/p-99e0d768.entry.js +1 -0
- package/dist/ketchup/{p-8f735633.entry.js → p-a0f6e25c.entry.js} +1 -1
- package/dist/ketchup/p-a203f78b.js +45 -0
- package/dist/ketchup/{p-9bcda66f.entry.js → p-a615a92b.entry.js} +1 -1
- package/dist/ketchup/p-aca0e54b.js +30 -0
- package/dist/ketchup/p-b8939a8b.entry.js +1 -0
- package/dist/ketchup/p-bfc3bac7.js +1 -0
- package/dist/ketchup/{p-67c64257.entry.js → p-c5ce8951.entry.js} +1 -1
- package/dist/ketchup/p-cad1e097.entry.js +9 -0
- package/dist/ketchup/{p-68fc1428.entry.js → p-d2ee56dd.entry.js} +1 -1
- package/dist/ketchup/p-db71436b.entry.js +27 -0
- package/dist/ketchup/{p-10c8d755.js → p-e0035c58.js} +1 -1
- package/dist/ketchup/p-e1039cf2.entry.js +1 -0
- package/dist/ketchup/{p-b5e1dbfa.entry.js → p-ea10176c.entry.js} +1 -1
- package/dist/ketchup/p-f09f2f98.entry.js +1 -0
- package/dist/ketchup/{p-0751aaf6.entry.js → p-f71a1675.entry.js} +1 -1
- package/dist/ketchup/{p-4081f5f7.entry.js → p-fac1a08b.entry.js} +1 -1
- package/dist/types/components/kup-box/kup-box-declarations.d.ts +3 -5
- package/dist/types/components/kup-box/kup-box.d.ts +0 -22
- 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 +4 -4
- 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 +5 -19
- package/dist/types/components/kup-form-editor/kup-form-editor-declarations.d.ts +79 -0
- package/dist/types/components/kup-form-editor/kup-form-editor.d.ts +72 -0
- package/dist/types/components/kup-image-list/kup-image-list-declarations.d.ts +14 -0
- package/dist/types/components/kup-image-list/kup-image-list.d.ts +56 -0
- 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-tab-bar/kup-tab-bar-declarations.d.ts +3 -9
- package/dist/types/components/kup-tab-bar/kup-tab-bar.d.ts +6 -6
- package/dist/types/components/kup-tree/kup-tree-declarations.d.ts +1 -5
- package/dist/types/components/kup-tree/kup-tree.d.ts +1 -25
- package/dist/types/components.d.ts +265 -232
- package/dist/types/managers/kup-data/kup-data-declarations.d.ts +1 -0
- package/dist/types/managers/kup-data/kup-data-node-helper.d.ts +7 -0
- package/dist/types/managers/kup-data/kup-data.d.ts +1 -0
- package/dist/types/managers/kup-language/kup-language-declarations.d.ts +2 -0
- package/dist/types/managers/kup-manager/kup-manager-declarations.d.ts +14 -0
- package/dist/types/managers/kup-manager/kup-manager.d.ts +14 -0
- package/dist/types/managers/kup-math/kup-math-declarations.d.ts +6 -0
- package/dist/types/managers/kup-math/kup-math.d.ts +2 -1
- package/dist/types/managers/kup-tooltip/kup-tooltip-declarations.d.ts +8 -0
- package/dist/types/managers/kup-tooltip/kup-tooltip.d.ts +51 -0
- package/dist/types/types/GenericTypes.d.ts +3 -0
- package/dist/types/utils/kup-column-menu/kup-column-menu.d.ts +1 -3
- package/package.json +16 -15
- package/dist/cjs/kup-manager-4227f0a2.js +0 -8582
- package/dist/collection/assets/tooltip.js +0 -73
- package/dist/collection/components/kup-tooltip/kup-tooltip-declarations.js +0 -20
- package/dist/collection/components/kup-tooltip/kup-tooltip.css +0 -149
- package/dist/collection/components/kup-tooltip/kup-tooltip.js +0 -1205
- package/dist/collection/utils/helpers.js +0 -38
- package/dist/esm/kup-manager-0ab94726.js +0 -8565
- package/dist/ketchup/p-24df4f29.entry.js +0 -27
- package/dist/ketchup/p-2d4f19f4.js +0 -1
- package/dist/ketchup/p-3445be1e.entry.js +0 -1
- package/dist/ketchup/p-3aab1f0d.entry.js +0 -1
- package/dist/ketchup/p-47b57d97.js +0 -1
- package/dist/ketchup/p-5186885c.entry.js +0 -1
- package/dist/ketchup/p-78223dc0.entry.js +0 -143
- package/dist/ketchup/p-96101f09.entry.js +0 -39
- package/dist/ketchup/p-c314b1e6.js +0 -1
- package/dist/ketchup/p-ee33cbe9.js +0 -9
- package/dist/types/components/kup-tooltip/kup-tooltip-declarations.d.ts +0 -93
- package/dist/types/components/kup-tooltip/kup-tooltip.d.ts +0 -142
- package/dist/types/utils/helpers.d.ts +0 -4
|
@@ -0,0 +1,895 @@
|
|
|
1
|
+
import { Component, Element, Event, forceUpdate, h, Host, Listen, Method, Prop, State, } from '@stencil/core';
|
|
2
|
+
import { kupManagerInstance, } from '../../managers/kup-manager/kup-manager';
|
|
3
|
+
import { KupNumericPickerProps, } from './kup-numeric-picker-declarations';
|
|
4
|
+
import { componentWrapperId } from '../../variables/GenericVariables';
|
|
5
|
+
import { FTextField } from '../../f-components/f-text-field/f-text-field';
|
|
6
|
+
import { FTextFieldMDC } from '../../f-components/f-text-field/f-text-field-mdc';
|
|
7
|
+
import { KupDynamicPositionPlacement } from '../../managers/kup-dynamic-position/kup-dynamic-position-declarations';
|
|
8
|
+
import { KupCardFamily, } from '../kup-card/kup-card-declarations';
|
|
9
|
+
export class KupNumericPicker {
|
|
10
|
+
constructor() {
|
|
11
|
+
/*-------------------------------------------------*/
|
|
12
|
+
/* S t a t e s */
|
|
13
|
+
/*-------------------------------------------------*/
|
|
14
|
+
this.stateSwitcher = false;
|
|
15
|
+
this.value = '';
|
|
16
|
+
/*-------------------------------------------------*/
|
|
17
|
+
/* P r o p s */
|
|
18
|
+
/*-------------------------------------------------*/
|
|
19
|
+
/**
|
|
20
|
+
* Custom style of the component.
|
|
21
|
+
* @default ""
|
|
22
|
+
* @see https://ketchup.smeup.com/ketchup-showcase/#/customization
|
|
23
|
+
*/
|
|
24
|
+
this.customStyle = '';
|
|
25
|
+
/**
|
|
26
|
+
* Props of the sub-components.
|
|
27
|
+
* @default null
|
|
28
|
+
*/
|
|
29
|
+
this.data = null;
|
|
30
|
+
/**
|
|
31
|
+
* Defaults at false. When set to true, the component has decimals.
|
|
32
|
+
* @default false
|
|
33
|
+
*/
|
|
34
|
+
this.decimals = false;
|
|
35
|
+
/**
|
|
36
|
+
* Defaults at false. When set to true, the component is disabled.
|
|
37
|
+
* @default false
|
|
38
|
+
*/
|
|
39
|
+
this.disabled = false;
|
|
40
|
+
/**
|
|
41
|
+
* Sets the initial value of the component
|
|
42
|
+
* @default ""
|
|
43
|
+
*/
|
|
44
|
+
this.initialValue = '';
|
|
45
|
+
/**
|
|
46
|
+
* when set, the component allows you to enter decimals with a maximum of characters.
|
|
47
|
+
* @default null
|
|
48
|
+
*/
|
|
49
|
+
this.maxDecimals = null;
|
|
50
|
+
/**
|
|
51
|
+
* When set, the component allows you to enter integer numbers with a maximum of characters.
|
|
52
|
+
* @default null
|
|
53
|
+
*/
|
|
54
|
+
this.maxIntegers = null;
|
|
55
|
+
/**
|
|
56
|
+
* When set, the component allows you to enter numbers with a maximum of characters, including decimals.
|
|
57
|
+
* @default null
|
|
58
|
+
*/
|
|
59
|
+
this.maxLength = null;
|
|
60
|
+
/**
|
|
61
|
+
* Defaults at false. When set to true, the component has negative number.
|
|
62
|
+
* @default false
|
|
63
|
+
*/
|
|
64
|
+
this.negative = false;
|
|
65
|
+
/*-------------------------------------------------*/
|
|
66
|
+
/* I n t e r n a l V a r i a b l e s */
|
|
67
|
+
/*-------------------------------------------------*/
|
|
68
|
+
/**
|
|
69
|
+
* Instance of the KupManager class.
|
|
70
|
+
*/
|
|
71
|
+
this.kupManager = kupManagerInstance();
|
|
72
|
+
this.textfieldEl = null;
|
|
73
|
+
this.pickerContainerEl = null;
|
|
74
|
+
this.pickerEl = {
|
|
75
|
+
value: new Date().toISOString(),
|
|
76
|
+
date: new Date(),
|
|
77
|
+
};
|
|
78
|
+
this.clickCb = null;
|
|
79
|
+
}
|
|
80
|
+
onKupPickerItemClick(value) {
|
|
81
|
+
this.setPickerValueSelected(value);
|
|
82
|
+
this.kupChange.emit({
|
|
83
|
+
comp: this,
|
|
84
|
+
id: this.rootElement.id,
|
|
85
|
+
value: this.value,
|
|
86
|
+
});
|
|
87
|
+
this.kupItemClick.emit({
|
|
88
|
+
comp: this,
|
|
89
|
+
id: this.rootElement.id,
|
|
90
|
+
value: this.value,
|
|
91
|
+
});
|
|
92
|
+
this.setFocus();
|
|
93
|
+
}
|
|
94
|
+
onKupClearIconClick() {
|
|
95
|
+
this.setPickerValueSelected('');
|
|
96
|
+
this.kupChange.emit({
|
|
97
|
+
comp: this,
|
|
98
|
+
id: this.rootElement.id,
|
|
99
|
+
value: this.value,
|
|
100
|
+
});
|
|
101
|
+
this.kupClearIconClick.emit({
|
|
102
|
+
comp: this,
|
|
103
|
+
id: this.rootElement.id,
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
onKupBlur() {
|
|
107
|
+
this.kupBlur.emit({
|
|
108
|
+
id: this.rootElement.id,
|
|
109
|
+
value: this.value,
|
|
110
|
+
comp: this,
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
onKupChange(e) {
|
|
114
|
+
this.refreshPickerValue(e.target.value, this.kupChange);
|
|
115
|
+
}
|
|
116
|
+
onKupClick() {
|
|
117
|
+
this.kupClick.emit({
|
|
118
|
+
comp: this,
|
|
119
|
+
id: this.rootElement.id,
|
|
120
|
+
value: this.value,
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
onKupFocus() {
|
|
124
|
+
this.kupFocus.emit({
|
|
125
|
+
comp: this,
|
|
126
|
+
id: this.rootElement.id,
|
|
127
|
+
value: this.value,
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
onKupInput(e) {
|
|
131
|
+
this.refreshPickerValue(e.target.value, this.kupInput, true);
|
|
132
|
+
}
|
|
133
|
+
onkupTextFieldSubmit(e) {
|
|
134
|
+
if (e.key === 'Enter') {
|
|
135
|
+
this.refreshPickerValue(e.target.value, this.kupTextFieldSubmit);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
onKupIconClick() {
|
|
139
|
+
if (this.isPickerOpened()) {
|
|
140
|
+
this.closePicker();
|
|
141
|
+
}
|
|
142
|
+
else {
|
|
143
|
+
this.openPicker();
|
|
144
|
+
}
|
|
145
|
+
this.kupIconClick.emit({
|
|
146
|
+
comp: this,
|
|
147
|
+
id: this.rootElement.id,
|
|
148
|
+
value: this.value,
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
/*-------------------------------------------------*/
|
|
152
|
+
/* L i s t e n e r s */
|
|
153
|
+
/*-------------------------------------------------*/
|
|
154
|
+
listenKeyup(e) {
|
|
155
|
+
if (this.isPickerOpened()) {
|
|
156
|
+
if (e.key === 'Escape') {
|
|
157
|
+
this.closePicker();
|
|
158
|
+
}
|
|
159
|
+
if (e.key === 'Enter') {
|
|
160
|
+
this.setPickerValueSelected();
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
/*-------------------------------------------------*/
|
|
165
|
+
/* P u b l i c M e t h o d s */
|
|
166
|
+
/*-------------------------------------------------*/
|
|
167
|
+
/**
|
|
168
|
+
* Retrieves the component's value.
|
|
169
|
+
* @returns {string} Value of the component.
|
|
170
|
+
*/
|
|
171
|
+
async getValue() {
|
|
172
|
+
return this.value;
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* Used to retrieve component's props values.
|
|
176
|
+
* @param {boolean} descriptions - When provided and true, the result will be the list of props with their description.
|
|
177
|
+
* @returns {Promise<GenericObject>} List of props as object, each key will be a prop.
|
|
178
|
+
*/
|
|
179
|
+
async getProps(descriptions) {
|
|
180
|
+
let props = {};
|
|
181
|
+
if (descriptions) {
|
|
182
|
+
props = KupNumericPickerProps;
|
|
183
|
+
}
|
|
184
|
+
else {
|
|
185
|
+
for (const key in KupNumericPickerProps) {
|
|
186
|
+
if (Object.prototype.hasOwnProperty.call(KupNumericPickerProps, key)) {
|
|
187
|
+
props[key] = this[key];
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
return props;
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* This method is used to trigger a new render of the component.
|
|
195
|
+
*/
|
|
196
|
+
async refresh() {
|
|
197
|
+
forceUpdate(this);
|
|
198
|
+
}
|
|
199
|
+
/**
|
|
200
|
+
* Sets the focus to the component.
|
|
201
|
+
*/
|
|
202
|
+
async setFocus() {
|
|
203
|
+
if (this.textfieldEl != null) {
|
|
204
|
+
this.textfieldEl.focus();
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
/**
|
|
208
|
+
* Sets the component's value.
|
|
209
|
+
* @param {string} value - Value to be set.
|
|
210
|
+
*/
|
|
211
|
+
async setValue(value) {
|
|
212
|
+
this.value = value;
|
|
213
|
+
}
|
|
214
|
+
/*-------------------------------------------------*/
|
|
215
|
+
/* P r i v a t e M e t h o d s */
|
|
216
|
+
/*-------------------------------------------------*/
|
|
217
|
+
refreshPickerValue(eventDetailValue, eventToRaise, isOnInputEvent) {
|
|
218
|
+
let newValue = this.kupManager.math.numberify(eventDetailValue, true);
|
|
219
|
+
if (newValue) {
|
|
220
|
+
let str = newValue.toString();
|
|
221
|
+
// here we check the input digits and fix with numeric picker rules.
|
|
222
|
+
const idx = str.indexOf('.');
|
|
223
|
+
let int = idx > -1 ? str.substring(0, idx) : str;
|
|
224
|
+
let dec = idx > -1 ? str.substring(idx + 1) : '';
|
|
225
|
+
if (this.maxIntegers && int.length > this.maxIntegers)
|
|
226
|
+
int = int.substring(int.length - this.maxIntegers);
|
|
227
|
+
if (this.maxDecimals && dec.length > this.maxDecimals)
|
|
228
|
+
dec = dec.substring(0, this.maxDecimals);
|
|
229
|
+
while (this.maxLength && int.length + dec.length > this.maxLength) {
|
|
230
|
+
if (dec.length > 1)
|
|
231
|
+
dec = dec.substring(0, dec.length - 1);
|
|
232
|
+
else if (int.length > 1)
|
|
233
|
+
int = int.substring(1);
|
|
234
|
+
}
|
|
235
|
+
str = idx > -1 ? `${int}.${dec}` : int;
|
|
236
|
+
if (isOnInputEvent != true) {
|
|
237
|
+
this.setValue(str);
|
|
238
|
+
}
|
|
239
|
+
if (eventToRaise != null) {
|
|
240
|
+
eventToRaise.emit({
|
|
241
|
+
id: this.rootElement.id,
|
|
242
|
+
value: str,
|
|
243
|
+
});
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
setPickerValueSelected(newValue) {
|
|
248
|
+
if (this.disabled == true) {
|
|
249
|
+
return;
|
|
250
|
+
}
|
|
251
|
+
if (newValue == null) {
|
|
252
|
+
newValue = this.getPickerValueSelected();
|
|
253
|
+
}
|
|
254
|
+
this.closePicker();
|
|
255
|
+
if (newValue == null) {
|
|
256
|
+
return;
|
|
257
|
+
}
|
|
258
|
+
this.setValue(newValue);
|
|
259
|
+
}
|
|
260
|
+
getPickerValueSelected() {
|
|
261
|
+
return this.pickerEl.value;
|
|
262
|
+
}
|
|
263
|
+
getValueForPickerComponent() {
|
|
264
|
+
return this.value;
|
|
265
|
+
}
|
|
266
|
+
openPicker() {
|
|
267
|
+
const textfieldEl = this.textfieldEl;
|
|
268
|
+
this.pickerContainerEl.menuVisible = true;
|
|
269
|
+
const elStyle = this.pickerContainerEl.style;
|
|
270
|
+
elStyle.height = 'auto';
|
|
271
|
+
elStyle.minWidth = this.textfieldEl.parentElement.clientWidth + 'px';
|
|
272
|
+
if (textfieldEl != null) {
|
|
273
|
+
textfieldEl.classList.add('toggled');
|
|
274
|
+
}
|
|
275
|
+
if (this.kupManager.dynamicPosition.isRegistered(this.pickerContainerEl)) {
|
|
276
|
+
this.kupManager.dynamicPosition.changeAnchor(this.pickerContainerEl, this.textfieldEl.parentElement);
|
|
277
|
+
}
|
|
278
|
+
else {
|
|
279
|
+
this.kupManager.dynamicPosition.register(this.pickerContainerEl, this.textfieldEl.parentElement, 0, KupDynamicPositionPlacement.AUTO, true);
|
|
280
|
+
}
|
|
281
|
+
this.kupManager.dynamicPosition.start(this.pickerContainerEl);
|
|
282
|
+
if (!this.clickCb) {
|
|
283
|
+
this.clickCb = {
|
|
284
|
+
cb: () => {
|
|
285
|
+
this.closePicker();
|
|
286
|
+
},
|
|
287
|
+
el: this.pickerContainerEl,
|
|
288
|
+
};
|
|
289
|
+
}
|
|
290
|
+
this.kupManager.addClickCallback(this.clickCb, true);
|
|
291
|
+
}
|
|
292
|
+
closePicker() {
|
|
293
|
+
this.kupManager.removeClickCallback(this.clickCb);
|
|
294
|
+
if (!this.isPickerOpened()) {
|
|
295
|
+
return;
|
|
296
|
+
}
|
|
297
|
+
let textfieldEl = this.textfieldEl;
|
|
298
|
+
if (textfieldEl != null) {
|
|
299
|
+
textfieldEl.classList.remove('toggled');
|
|
300
|
+
}
|
|
301
|
+
this.pickerContainerEl.menuVisible = false;
|
|
302
|
+
this.kupManager.dynamicPosition.stop(this.pickerContainerEl);
|
|
303
|
+
}
|
|
304
|
+
isPickerOpened() {
|
|
305
|
+
return this.pickerContainerEl.menuVisible == true;
|
|
306
|
+
}
|
|
307
|
+
getTextFieldId() {
|
|
308
|
+
return this.textfieldEl.id;
|
|
309
|
+
}
|
|
310
|
+
prepTextfield() {
|
|
311
|
+
if (!this.decimals && !this.maxIntegers)
|
|
312
|
+
this.maxIntegers = 17;
|
|
313
|
+
if (this.decimals && !this.maxIntegers && !this.maxDecimals) {
|
|
314
|
+
this.maxIntegers = 15;
|
|
315
|
+
this.maxDecimals = 2;
|
|
316
|
+
}
|
|
317
|
+
const fullHeight = this.rootElement.classList.contains('kup-full-height');
|
|
318
|
+
const fullWidth = this.rootElement.classList.contains('kup-full-width');
|
|
319
|
+
const textfieldData = Object.assign({}, this.data['kup-text-field']);
|
|
320
|
+
if (!textfieldData.icon) {
|
|
321
|
+
textfieldData.icon = 'calculator';
|
|
322
|
+
}
|
|
323
|
+
if (textfieldData.icon) {
|
|
324
|
+
textfieldData.trailingIcon = true;
|
|
325
|
+
}
|
|
326
|
+
return (h(FTextField, Object.assign({}, textfieldData, { disabled: this.disabled, fullHeight: fullHeight, fullWidth: fullWidth, id: this.rootElement.id + '_text-field', value: this.kupManager.math.numbers.toLocaleString(this.value), onBlur: () => this.onKupBlur(), onChange: (e) => this.onKupChange(e), onClearIconClick: () => this.onKupClearIconClick(), onClick: () => this.onKupClick(), onFocus: () => this.onKupFocus(), onIconClick: () => this.onKupIconClick(), onKeyDown: (e) => this.onkupTextFieldSubmit(e), onInput: (e) => this.onKupInput(e) }), this.prepPicker()));
|
|
327
|
+
}
|
|
328
|
+
prepPicker() {
|
|
329
|
+
const data = {
|
|
330
|
+
options: {
|
|
331
|
+
decimals: this.decimals,
|
|
332
|
+
initialValue: this.value,
|
|
333
|
+
maxDecimals: this.maxDecimals,
|
|
334
|
+
maxIntegers: this.maxIntegers,
|
|
335
|
+
maxLength: this.maxLength,
|
|
336
|
+
negative: this.negative,
|
|
337
|
+
resetStatus: true,
|
|
338
|
+
},
|
|
339
|
+
};
|
|
340
|
+
return (h("kup-card", { ref: (el) => (this.pickerContainerEl = el), data: data, layoutFamily: KupCardFamily.BUILT_IN, layoutNumber: 5, sizeX: "300px", sizeY: "auto", isMenu: true, "onkup-card-click": (ev) => {
|
|
341
|
+
if (ev.detail.value != null)
|
|
342
|
+
this.onKupPickerItemClick(ev.detail.value);
|
|
343
|
+
} }));
|
|
344
|
+
}
|
|
345
|
+
/*-------------------------------------------------*/
|
|
346
|
+
/* L i f e c y c l e H o o k s */
|
|
347
|
+
/*-------------------------------------------------*/
|
|
348
|
+
componentWillLoad() {
|
|
349
|
+
this.kupManager.dates.register(this);
|
|
350
|
+
this.kupManager.debug.logLoad(this, false);
|
|
351
|
+
this.kupManager.theme.register(this);
|
|
352
|
+
this.value = this.initialValue;
|
|
353
|
+
if (!this.data) {
|
|
354
|
+
this.data = {
|
|
355
|
+
'kup-text-field': {},
|
|
356
|
+
};
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
componentDidLoad() {
|
|
360
|
+
this.kupManager.debug.logLoad(this, true);
|
|
361
|
+
}
|
|
362
|
+
componentWillRender() {
|
|
363
|
+
this.kupManager.debug.logRender(this, false);
|
|
364
|
+
}
|
|
365
|
+
componentDidRender() {
|
|
366
|
+
const root = this.rootElement.shadowRoot;
|
|
367
|
+
if (root) {
|
|
368
|
+
const f = root.querySelector('.f-text-field');
|
|
369
|
+
if (f) {
|
|
370
|
+
this.textfieldEl = f.querySelector('input');
|
|
371
|
+
FTextFieldMDC(f);
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
this.kupManager.debug.logRender(this, true);
|
|
375
|
+
}
|
|
376
|
+
render() {
|
|
377
|
+
return (h(Host, null,
|
|
378
|
+
h("style", null, this.kupManager.theme.setKupStyle(this.rootElement)),
|
|
379
|
+
h("div", { id: componentWrapperId }, this.prepTextfield())));
|
|
380
|
+
}
|
|
381
|
+
disconnectedCallback() {
|
|
382
|
+
this.kupManager.dates.unregister(this);
|
|
383
|
+
this.kupManager.theme.unregister(this);
|
|
384
|
+
if (this.pickerContainerEl) {
|
|
385
|
+
this.pickerContainerEl.remove();
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
static get is() { return "kup-numeric-picker"; }
|
|
389
|
+
static get encapsulation() { return "shadow"; }
|
|
390
|
+
static get originalStyleUrls() { return {
|
|
391
|
+
"$": ["kup-numeric-picker.scss"]
|
|
392
|
+
}; }
|
|
393
|
+
static get styleUrls() { return {
|
|
394
|
+
"$": ["kup-numeric-picker.css"]
|
|
395
|
+
}; }
|
|
396
|
+
static get properties() { return {
|
|
397
|
+
"customStyle": {
|
|
398
|
+
"type": "string",
|
|
399
|
+
"mutable": false,
|
|
400
|
+
"complexType": {
|
|
401
|
+
"original": "string",
|
|
402
|
+
"resolved": "string",
|
|
403
|
+
"references": {}
|
|
404
|
+
},
|
|
405
|
+
"required": false,
|
|
406
|
+
"optional": false,
|
|
407
|
+
"docs": {
|
|
408
|
+
"tags": [{
|
|
409
|
+
"name": "default",
|
|
410
|
+
"text": "\"\""
|
|
411
|
+
}, {
|
|
412
|
+
"name": "see",
|
|
413
|
+
"text": "https://ketchup.smeup.com/ketchup-showcase/#/customization"
|
|
414
|
+
}],
|
|
415
|
+
"text": "Custom style of the component."
|
|
416
|
+
},
|
|
417
|
+
"attribute": "custom-style",
|
|
418
|
+
"reflect": false,
|
|
419
|
+
"defaultValue": "''"
|
|
420
|
+
},
|
|
421
|
+
"data": {
|
|
422
|
+
"type": "unknown",
|
|
423
|
+
"mutable": true,
|
|
424
|
+
"complexType": {
|
|
425
|
+
"original": "Object",
|
|
426
|
+
"resolved": "Object",
|
|
427
|
+
"references": {
|
|
428
|
+
"Object": {
|
|
429
|
+
"location": "global"
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
},
|
|
433
|
+
"required": false,
|
|
434
|
+
"optional": false,
|
|
435
|
+
"docs": {
|
|
436
|
+
"tags": [{
|
|
437
|
+
"name": "default",
|
|
438
|
+
"text": "null"
|
|
439
|
+
}],
|
|
440
|
+
"text": "Props of the sub-components."
|
|
441
|
+
},
|
|
442
|
+
"defaultValue": "null"
|
|
443
|
+
},
|
|
444
|
+
"decimals": {
|
|
445
|
+
"type": "boolean",
|
|
446
|
+
"mutable": false,
|
|
447
|
+
"complexType": {
|
|
448
|
+
"original": "boolean",
|
|
449
|
+
"resolved": "boolean",
|
|
450
|
+
"references": {}
|
|
451
|
+
},
|
|
452
|
+
"required": false,
|
|
453
|
+
"optional": false,
|
|
454
|
+
"docs": {
|
|
455
|
+
"tags": [{
|
|
456
|
+
"name": "default",
|
|
457
|
+
"text": "false"
|
|
458
|
+
}],
|
|
459
|
+
"text": "Defaults at false. When set to true, the component has decimals."
|
|
460
|
+
},
|
|
461
|
+
"attribute": "decimals",
|
|
462
|
+
"reflect": false,
|
|
463
|
+
"defaultValue": "false"
|
|
464
|
+
},
|
|
465
|
+
"disabled": {
|
|
466
|
+
"type": "boolean",
|
|
467
|
+
"mutable": false,
|
|
468
|
+
"complexType": {
|
|
469
|
+
"original": "boolean",
|
|
470
|
+
"resolved": "boolean",
|
|
471
|
+
"references": {}
|
|
472
|
+
},
|
|
473
|
+
"required": false,
|
|
474
|
+
"optional": false,
|
|
475
|
+
"docs": {
|
|
476
|
+
"tags": [{
|
|
477
|
+
"name": "default",
|
|
478
|
+
"text": "false"
|
|
479
|
+
}],
|
|
480
|
+
"text": "Defaults at false. When set to true, the component is disabled."
|
|
481
|
+
},
|
|
482
|
+
"attribute": "disabled",
|
|
483
|
+
"reflect": false,
|
|
484
|
+
"defaultValue": "false"
|
|
485
|
+
},
|
|
486
|
+
"initialValue": {
|
|
487
|
+
"type": "string",
|
|
488
|
+
"mutable": false,
|
|
489
|
+
"complexType": {
|
|
490
|
+
"original": "string",
|
|
491
|
+
"resolved": "string",
|
|
492
|
+
"references": {}
|
|
493
|
+
},
|
|
494
|
+
"required": false,
|
|
495
|
+
"optional": false,
|
|
496
|
+
"docs": {
|
|
497
|
+
"tags": [{
|
|
498
|
+
"name": "default",
|
|
499
|
+
"text": "\"\""
|
|
500
|
+
}],
|
|
501
|
+
"text": "Sets the initial value of the component"
|
|
502
|
+
},
|
|
503
|
+
"attribute": "initial-value",
|
|
504
|
+
"reflect": false,
|
|
505
|
+
"defaultValue": "''"
|
|
506
|
+
},
|
|
507
|
+
"maxDecimals": {
|
|
508
|
+
"type": "number",
|
|
509
|
+
"mutable": true,
|
|
510
|
+
"complexType": {
|
|
511
|
+
"original": "number",
|
|
512
|
+
"resolved": "number",
|
|
513
|
+
"references": {}
|
|
514
|
+
},
|
|
515
|
+
"required": false,
|
|
516
|
+
"optional": false,
|
|
517
|
+
"docs": {
|
|
518
|
+
"tags": [{
|
|
519
|
+
"name": "default",
|
|
520
|
+
"text": "null"
|
|
521
|
+
}],
|
|
522
|
+
"text": "when set, the component allows you to enter decimals with a maximum of characters."
|
|
523
|
+
},
|
|
524
|
+
"attribute": "max-decimals",
|
|
525
|
+
"reflect": false,
|
|
526
|
+
"defaultValue": "null"
|
|
527
|
+
},
|
|
528
|
+
"maxIntegers": {
|
|
529
|
+
"type": "number",
|
|
530
|
+
"mutable": true,
|
|
531
|
+
"complexType": {
|
|
532
|
+
"original": "number",
|
|
533
|
+
"resolved": "number",
|
|
534
|
+
"references": {}
|
|
535
|
+
},
|
|
536
|
+
"required": false,
|
|
537
|
+
"optional": false,
|
|
538
|
+
"docs": {
|
|
539
|
+
"tags": [{
|
|
540
|
+
"name": "default",
|
|
541
|
+
"text": "null"
|
|
542
|
+
}],
|
|
543
|
+
"text": "When set, the component allows you to enter integer numbers with a maximum of characters."
|
|
544
|
+
},
|
|
545
|
+
"attribute": "max-integers",
|
|
546
|
+
"reflect": false,
|
|
547
|
+
"defaultValue": "null"
|
|
548
|
+
},
|
|
549
|
+
"maxLength": {
|
|
550
|
+
"type": "number",
|
|
551
|
+
"mutable": false,
|
|
552
|
+
"complexType": {
|
|
553
|
+
"original": "number",
|
|
554
|
+
"resolved": "number",
|
|
555
|
+
"references": {}
|
|
556
|
+
},
|
|
557
|
+
"required": false,
|
|
558
|
+
"optional": false,
|
|
559
|
+
"docs": {
|
|
560
|
+
"tags": [{
|
|
561
|
+
"name": "default",
|
|
562
|
+
"text": "null"
|
|
563
|
+
}],
|
|
564
|
+
"text": "When set, the component allows you to enter numbers with a maximum of characters, including decimals."
|
|
565
|
+
},
|
|
566
|
+
"attribute": "max-length",
|
|
567
|
+
"reflect": false,
|
|
568
|
+
"defaultValue": "null"
|
|
569
|
+
},
|
|
570
|
+
"negative": {
|
|
571
|
+
"type": "boolean",
|
|
572
|
+
"mutable": false,
|
|
573
|
+
"complexType": {
|
|
574
|
+
"original": "boolean",
|
|
575
|
+
"resolved": "boolean",
|
|
576
|
+
"references": {}
|
|
577
|
+
},
|
|
578
|
+
"required": false,
|
|
579
|
+
"optional": false,
|
|
580
|
+
"docs": {
|
|
581
|
+
"tags": [{
|
|
582
|
+
"name": "default",
|
|
583
|
+
"text": "false"
|
|
584
|
+
}],
|
|
585
|
+
"text": "Defaults at false. When set to true, the component has negative number."
|
|
586
|
+
},
|
|
587
|
+
"attribute": "negative",
|
|
588
|
+
"reflect": false,
|
|
589
|
+
"defaultValue": "false"
|
|
590
|
+
}
|
|
591
|
+
}; }
|
|
592
|
+
static get states() { return {
|
|
593
|
+
"stateSwitcher": {},
|
|
594
|
+
"value": {}
|
|
595
|
+
}; }
|
|
596
|
+
static get events() { return [{
|
|
597
|
+
"method": "kupBlur",
|
|
598
|
+
"name": "kup-numericpicker-blur",
|
|
599
|
+
"bubbles": true,
|
|
600
|
+
"cancelable": false,
|
|
601
|
+
"composed": true,
|
|
602
|
+
"docs": {
|
|
603
|
+
"tags": [],
|
|
604
|
+
"text": ""
|
|
605
|
+
},
|
|
606
|
+
"complexType": {
|
|
607
|
+
"original": "KupNumericPickerEventPayload",
|
|
608
|
+
"resolved": "KupNumericPickerEventPayload",
|
|
609
|
+
"references": {
|
|
610
|
+
"KupNumericPickerEventPayload": {
|
|
611
|
+
"location": "import",
|
|
612
|
+
"path": "./kup-numeric-picker-declarations"
|
|
613
|
+
}
|
|
614
|
+
}
|
|
615
|
+
}
|
|
616
|
+
}, {
|
|
617
|
+
"method": "kupChange",
|
|
618
|
+
"name": "kup-numericpicker-change",
|
|
619
|
+
"bubbles": true,
|
|
620
|
+
"cancelable": false,
|
|
621
|
+
"composed": true,
|
|
622
|
+
"docs": {
|
|
623
|
+
"tags": [],
|
|
624
|
+
"text": ""
|
|
625
|
+
},
|
|
626
|
+
"complexType": {
|
|
627
|
+
"original": "KupNumericPickerEventPayload",
|
|
628
|
+
"resolved": "KupNumericPickerEventPayload",
|
|
629
|
+
"references": {
|
|
630
|
+
"KupNumericPickerEventPayload": {
|
|
631
|
+
"location": "import",
|
|
632
|
+
"path": "./kup-numeric-picker-declarations"
|
|
633
|
+
}
|
|
634
|
+
}
|
|
635
|
+
}
|
|
636
|
+
}, {
|
|
637
|
+
"method": "kupClick",
|
|
638
|
+
"name": "kup-numericpicker-click",
|
|
639
|
+
"bubbles": true,
|
|
640
|
+
"cancelable": false,
|
|
641
|
+
"composed": true,
|
|
642
|
+
"docs": {
|
|
643
|
+
"tags": [],
|
|
644
|
+
"text": ""
|
|
645
|
+
},
|
|
646
|
+
"complexType": {
|
|
647
|
+
"original": "KupNumericPickerEventPayload",
|
|
648
|
+
"resolved": "KupNumericPickerEventPayload",
|
|
649
|
+
"references": {
|
|
650
|
+
"KupNumericPickerEventPayload": {
|
|
651
|
+
"location": "import",
|
|
652
|
+
"path": "./kup-numeric-picker-declarations"
|
|
653
|
+
}
|
|
654
|
+
}
|
|
655
|
+
}
|
|
656
|
+
}, {
|
|
657
|
+
"method": "kupFocus",
|
|
658
|
+
"name": "kup-numericpicker-focus",
|
|
659
|
+
"bubbles": true,
|
|
660
|
+
"cancelable": false,
|
|
661
|
+
"composed": true,
|
|
662
|
+
"docs": {
|
|
663
|
+
"tags": [],
|
|
664
|
+
"text": ""
|
|
665
|
+
},
|
|
666
|
+
"complexType": {
|
|
667
|
+
"original": "KupNumericPickerEventPayload",
|
|
668
|
+
"resolved": "KupNumericPickerEventPayload",
|
|
669
|
+
"references": {
|
|
670
|
+
"KupNumericPickerEventPayload": {
|
|
671
|
+
"location": "import",
|
|
672
|
+
"path": "./kup-numeric-picker-declarations"
|
|
673
|
+
}
|
|
674
|
+
}
|
|
675
|
+
}
|
|
676
|
+
}, {
|
|
677
|
+
"method": "kupInput",
|
|
678
|
+
"name": "kup-numericpicker-input",
|
|
679
|
+
"bubbles": true,
|
|
680
|
+
"cancelable": false,
|
|
681
|
+
"composed": true,
|
|
682
|
+
"docs": {
|
|
683
|
+
"tags": [],
|
|
684
|
+
"text": ""
|
|
685
|
+
},
|
|
686
|
+
"complexType": {
|
|
687
|
+
"original": "KupNumericPickerEventPayload",
|
|
688
|
+
"resolved": "KupNumericPickerEventPayload",
|
|
689
|
+
"references": {
|
|
690
|
+
"KupNumericPickerEventPayload": {
|
|
691
|
+
"location": "import",
|
|
692
|
+
"path": "./kup-numeric-picker-declarations"
|
|
693
|
+
}
|
|
694
|
+
}
|
|
695
|
+
}
|
|
696
|
+
}, {
|
|
697
|
+
"method": "kupIconClick",
|
|
698
|
+
"name": "kup-numericpicker-iconclick",
|
|
699
|
+
"bubbles": true,
|
|
700
|
+
"cancelable": false,
|
|
701
|
+
"composed": true,
|
|
702
|
+
"docs": {
|
|
703
|
+
"tags": [],
|
|
704
|
+
"text": ""
|
|
705
|
+
},
|
|
706
|
+
"complexType": {
|
|
707
|
+
"original": "KupNumericPickerEventPayload",
|
|
708
|
+
"resolved": "KupNumericPickerEventPayload",
|
|
709
|
+
"references": {
|
|
710
|
+
"KupNumericPickerEventPayload": {
|
|
711
|
+
"location": "import",
|
|
712
|
+
"path": "./kup-numeric-picker-declarations"
|
|
713
|
+
}
|
|
714
|
+
}
|
|
715
|
+
}
|
|
716
|
+
}, {
|
|
717
|
+
"method": "kupItemClick",
|
|
718
|
+
"name": "kup-numericpicker-itemclick",
|
|
719
|
+
"bubbles": true,
|
|
720
|
+
"cancelable": false,
|
|
721
|
+
"composed": true,
|
|
722
|
+
"docs": {
|
|
723
|
+
"tags": [],
|
|
724
|
+
"text": ""
|
|
725
|
+
},
|
|
726
|
+
"complexType": {
|
|
727
|
+
"original": "KupNumericPickerEventPayload",
|
|
728
|
+
"resolved": "KupNumericPickerEventPayload",
|
|
729
|
+
"references": {
|
|
730
|
+
"KupNumericPickerEventPayload": {
|
|
731
|
+
"location": "import",
|
|
732
|
+
"path": "./kup-numeric-picker-declarations"
|
|
733
|
+
}
|
|
734
|
+
}
|
|
735
|
+
}
|
|
736
|
+
}, {
|
|
737
|
+
"method": "kupTextFieldSubmit",
|
|
738
|
+
"name": "kup-numericpicker-textfieldsubmit",
|
|
739
|
+
"bubbles": true,
|
|
740
|
+
"cancelable": false,
|
|
741
|
+
"composed": true,
|
|
742
|
+
"docs": {
|
|
743
|
+
"tags": [],
|
|
744
|
+
"text": ""
|
|
745
|
+
},
|
|
746
|
+
"complexType": {
|
|
747
|
+
"original": "KupNumericPickerEventPayload",
|
|
748
|
+
"resolved": "KupNumericPickerEventPayload",
|
|
749
|
+
"references": {
|
|
750
|
+
"KupNumericPickerEventPayload": {
|
|
751
|
+
"location": "import",
|
|
752
|
+
"path": "./kup-numeric-picker-declarations"
|
|
753
|
+
}
|
|
754
|
+
}
|
|
755
|
+
}
|
|
756
|
+
}, {
|
|
757
|
+
"method": "kupClearIconClick",
|
|
758
|
+
"name": "kup-numericpicker-cleariconclick",
|
|
759
|
+
"bubbles": true,
|
|
760
|
+
"cancelable": false,
|
|
761
|
+
"composed": true,
|
|
762
|
+
"docs": {
|
|
763
|
+
"tags": [],
|
|
764
|
+
"text": ""
|
|
765
|
+
},
|
|
766
|
+
"complexType": {
|
|
767
|
+
"original": "KupEventPayload",
|
|
768
|
+
"resolved": "KupEventPayload",
|
|
769
|
+
"references": {
|
|
770
|
+
"KupEventPayload": {
|
|
771
|
+
"location": "import",
|
|
772
|
+
"path": "../../types/GenericTypes"
|
|
773
|
+
}
|
|
774
|
+
}
|
|
775
|
+
}
|
|
776
|
+
}]; }
|
|
777
|
+
static get methods() { return {
|
|
778
|
+
"getValue": {
|
|
779
|
+
"complexType": {
|
|
780
|
+
"signature": "() => Promise<string>",
|
|
781
|
+
"parameters": [],
|
|
782
|
+
"references": {
|
|
783
|
+
"Promise": {
|
|
784
|
+
"location": "global"
|
|
785
|
+
}
|
|
786
|
+
},
|
|
787
|
+
"return": "Promise<string>"
|
|
788
|
+
},
|
|
789
|
+
"docs": {
|
|
790
|
+
"text": "Retrieves the component's value.",
|
|
791
|
+
"tags": [{
|
|
792
|
+
"name": "returns",
|
|
793
|
+
"text": "Value of the component."
|
|
794
|
+
}]
|
|
795
|
+
}
|
|
796
|
+
},
|
|
797
|
+
"getProps": {
|
|
798
|
+
"complexType": {
|
|
799
|
+
"signature": "(descriptions?: boolean) => Promise<GenericObject>",
|
|
800
|
+
"parameters": [{
|
|
801
|
+
"tags": [{
|
|
802
|
+
"name": "param",
|
|
803
|
+
"text": "descriptions - When provided and true, the result will be the list of props with their description."
|
|
804
|
+
}],
|
|
805
|
+
"text": "- When provided and true, the result will be the list of props with their description."
|
|
806
|
+
}],
|
|
807
|
+
"references": {
|
|
808
|
+
"Promise": {
|
|
809
|
+
"location": "global"
|
|
810
|
+
},
|
|
811
|
+
"GenericObject": {
|
|
812
|
+
"location": "import",
|
|
813
|
+
"path": "../../types/GenericTypes"
|
|
814
|
+
}
|
|
815
|
+
},
|
|
816
|
+
"return": "Promise<GenericObject>"
|
|
817
|
+
},
|
|
818
|
+
"docs": {
|
|
819
|
+
"text": "Used to retrieve component's props values.",
|
|
820
|
+
"tags": [{
|
|
821
|
+
"name": "param",
|
|
822
|
+
"text": "descriptions - When provided and true, the result will be the list of props with their description."
|
|
823
|
+
}, {
|
|
824
|
+
"name": "returns",
|
|
825
|
+
"text": "List of props as object, each key will be a prop."
|
|
826
|
+
}]
|
|
827
|
+
}
|
|
828
|
+
},
|
|
829
|
+
"refresh": {
|
|
830
|
+
"complexType": {
|
|
831
|
+
"signature": "() => Promise<void>",
|
|
832
|
+
"parameters": [],
|
|
833
|
+
"references": {
|
|
834
|
+
"Promise": {
|
|
835
|
+
"location": "global"
|
|
836
|
+
}
|
|
837
|
+
},
|
|
838
|
+
"return": "Promise<void>"
|
|
839
|
+
},
|
|
840
|
+
"docs": {
|
|
841
|
+
"text": "This method is used to trigger a new render of the component.",
|
|
842
|
+
"tags": []
|
|
843
|
+
}
|
|
844
|
+
},
|
|
845
|
+
"setFocus": {
|
|
846
|
+
"complexType": {
|
|
847
|
+
"signature": "() => Promise<void>",
|
|
848
|
+
"parameters": [],
|
|
849
|
+
"references": {
|
|
850
|
+
"Promise": {
|
|
851
|
+
"location": "global"
|
|
852
|
+
}
|
|
853
|
+
},
|
|
854
|
+
"return": "Promise<void>"
|
|
855
|
+
},
|
|
856
|
+
"docs": {
|
|
857
|
+
"text": "Sets the focus to the component.",
|
|
858
|
+
"tags": []
|
|
859
|
+
}
|
|
860
|
+
},
|
|
861
|
+
"setValue": {
|
|
862
|
+
"complexType": {
|
|
863
|
+
"signature": "(value: string) => Promise<void>",
|
|
864
|
+
"parameters": [{
|
|
865
|
+
"tags": [{
|
|
866
|
+
"name": "param",
|
|
867
|
+
"text": "value - Value to be set."
|
|
868
|
+
}],
|
|
869
|
+
"text": "- Value to be set."
|
|
870
|
+
}],
|
|
871
|
+
"references": {
|
|
872
|
+
"Promise": {
|
|
873
|
+
"location": "global"
|
|
874
|
+
}
|
|
875
|
+
},
|
|
876
|
+
"return": "Promise<void>"
|
|
877
|
+
},
|
|
878
|
+
"docs": {
|
|
879
|
+
"text": "Sets the component's value.",
|
|
880
|
+
"tags": [{
|
|
881
|
+
"name": "param",
|
|
882
|
+
"text": "value - Value to be set."
|
|
883
|
+
}]
|
|
884
|
+
}
|
|
885
|
+
}
|
|
886
|
+
}; }
|
|
887
|
+
static get elementRef() { return "rootElement"; }
|
|
888
|
+
static get listeners() { return [{
|
|
889
|
+
"name": "keyup",
|
|
890
|
+
"method": "listenKeyup",
|
|
891
|
+
"target": undefined,
|
|
892
|
+
"capture": false,
|
|
893
|
+
"passive": false
|
|
894
|
+
}]; }
|
|
895
|
+
}
|