@sme.up/ketchup 6.0.0 → 6.2.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-a78d6fac.js → cell-utils-fe64a28c.js} +2 -2
- package/dist/cjs/{f-button-ac179257.js → f-button-5b69d882.js} +4 -4
- package/dist/cjs/f-cell-3a740c48.js +418 -0
- package/dist/cjs/f-checkbox-57443ca3.js +29 -0
- package/dist/cjs/{f-chip-b00897d7.js → f-chip-02e83f82.js} +3 -3
- package/dist/cjs/{f-image-89f25556.js → f-image-2a61ece2.js} +2 -2
- package/dist/cjs/{f-paginator-utils-8fa501b3.js → f-paginator-utils-09126bdd.js} +5 -5
- package/dist/cjs/{f-text-field-e1e45ade.js → f-text-field-9ee20a67.js} +3 -3
- package/dist/cjs/{index-eb556444.js → index-06b131ea.js} +6 -4
- package/dist/cjs/ketchup.cjs.js +3 -3
- package/dist/cjs/kup-accordion.cjs.entry.js +4 -4
- package/dist/cjs/kup-autocomplete_25.cjs.entry.js +209 -193
- package/dist/cjs/kup-box.cjs.entry.js +1306 -0
- package/dist/cjs/kup-calendar.cjs.entry.js +7 -7
- package/dist/cjs/kup-cell.cjs.entry.js +10 -9
- package/dist/cjs/kup-dash-list.cjs.entry.js +4 -4
- package/dist/cjs/kup-dash_2.cjs.entry.js +4 -7
- package/dist/cjs/{kup-form-editor.cjs.entry.js → kup-dashboard.cjs.entry.js} +123 -148
- package/dist/cjs/kup-drawer.cjs.entry.js +4 -4
- package/dist/cjs/{kup-box_2.cjs.entry.js → kup-echart.cjs.entry.js} +53 -1338
- package/dist/cjs/kup-family-tree.cjs.entry.js +410 -0
- package/dist/cjs/kup-form.cjs.entry.js +480 -0
- package/dist/cjs/kup-iframe.cjs.entry.js +3 -3
- package/dist/cjs/kup-image-list.cjs.entry.js +73 -11
- package/dist/cjs/kup-lazy.cjs.entry.js +4 -4
- package/dist/cjs/kup-magic-box.cjs.entry.js +4 -4
- package/dist/cjs/{kup-manager-7a941909.js → kup-manager-02acbb37.js} +407 -7
- package/dist/cjs/kup-nav-bar.cjs.entry.js +3 -3
- package/dist/cjs/kup-numeric-picker.cjs.entry.js +3 -3
- package/dist/cjs/kup-photo-frame.cjs.entry.js +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 +5 -5
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/{utils-6287d878.js → utils-4b208b48.js} +1 -1
- package/dist/collection/assets/dashboard.js +113 -0
- package/dist/collection/assets/data-table.js +15 -0
- package/dist/collection/assets/family-tree.js +2437 -0
- package/dist/collection/assets/form.js +433 -0
- package/dist/collection/assets/grid.js +17 -0
- package/dist/collection/assets/index.js +14 -6
- package/dist/collection/collection-manifest.json +4 -3
- package/dist/collection/components/kup-autocomplete/kup-autocomplete.js +135 -129
- package/dist/collection/components/kup-box/kup-box.js +13 -2
- package/dist/collection/components/kup-button/kup-button.js +1 -0
- package/dist/collection/components/kup-combobox/kup-combobox.js +16 -13
- package/dist/collection/components/kup-dashboard/kup-dashboard-declarations.js +10 -0
- package/dist/collection/components/{kup-form-editor/kup-form-editor.css → kup-dashboard/kup-dashboard.css} +7 -6
- package/dist/collection/components/{kup-form-editor/kup-form-editor.js → kup-dashboard/kup-dashboard.js} +148 -149
- package/dist/collection/components/kup-data-table/kup-data-table.js +7 -6
- package/dist/collection/components/kup-drawer/kup-drawer.css +5 -8
- package/dist/collection/components/kup-dropdown-button/kup-dropdown-button.js +1 -0
- package/dist/collection/components/kup-family-tree/kup-family-tree-declarations.js +12 -0
- package/dist/collection/components/kup-family-tree/kup-family-tree.css +101 -0
- package/dist/collection/components/kup-family-tree/kup-family-tree.js +666 -0
- package/dist/collection/components/kup-form/kup-form-declarations.js +25 -0
- package/dist/collection/components/kup-form/kup-form.css +99 -0
- package/dist/collection/components/kup-form/kup-form.js +647 -0
- package/dist/collection/components/kup-grid/kup-grid.js +1 -4
- package/dist/collection/components/kup-image-list/kup-image-list-state.js +9 -0
- package/dist/collection/components/kup-image-list/kup-image-list.css +0 -6
- package/dist/collection/components/kup-image-list/kup-image-list.js +113 -1
- package/dist/collection/components/kup-lazy/kup-lazy.css +13 -6
- package/dist/collection/components/kup-list/kup-list-helper.js +9 -3
- package/dist/collection/components/kup-photo-frame/kup-photo-frame.css +13 -3
- package/dist/collection/components/kup-photo-frame/kup-photo-frame.js +1 -1
- package/dist/collection/components/kup-text-field/kup-text-field-declarations.js +3 -0
- package/dist/collection/components/kup-text-field/kup-text-field.js +27 -0
- package/dist/collection/components/kup-time-picker/kup-time-picker.js +0 -6
- package/dist/collection/components/kup-tree/kup-tree.js +10 -4
- package/dist/collection/f-components/f-button/f-button.js +2 -2
- package/dist/collection/f-components/f-cell/f-cell-declarations.js +5 -1
- package/dist/collection/f-components/f-cell/f-cell.js +34 -114
- package/dist/collection/f-components/f-text-field/f-text-field.js +1 -1
- package/dist/collection/managers/kup-data/kup-data-node-helper.js +69 -0
- package/dist/collection/managers/kup-data/kup-data.js +109 -1
- package/dist/collection/managers/kup-language/kup-language-declarations.js +11 -0
- package/dist/collection/managers/kup-objects/kup-objects.js +10 -0
- package/dist/collection/managers/kup-theme/kup-theme-declarations.js +20 -3
- package/dist/collection/types/GenericTypes.js +3 -2
- package/dist/esm/{cell-utils-964da6b5.js → cell-utils-cb5d4149.js} +2 -2
- package/dist/esm/{f-button-871a544b.js → f-button-fd44ef70.js} +4 -4
- package/dist/esm/{f-cell-521ef17a.js → f-cell-7b159a22.js} +48 -283
- package/dist/esm/f-checkbox-c51c4a75.js +27 -0
- package/dist/esm/{f-chip-1dda722f.js → f-chip-c2e4c522.js} +3 -3
- package/dist/esm/{f-image-c468d8ae.js → f-image-2ab4b9aa.js} +2 -2
- package/dist/esm/{f-paginator-utils-7dff8ff0.js → f-paginator-utils-ef537d82.js} +5 -5
- package/dist/esm/{f-text-field-d6c61c73.js → f-text-field-41c575eb.js} +3 -3
- package/dist/esm/{index-baeab1ac.js → index-ad6ab214.js} +6 -4
- package/dist/esm/ketchup.js +3 -3
- package/dist/esm/kup-accordion.entry.js +4 -4
- package/dist/esm/kup-autocomplete_25.entry.js +199 -183
- package/dist/esm/kup-box.entry.js +1302 -0
- package/dist/esm/kup-calendar.entry.js +7 -7
- package/dist/esm/kup-cell.entry.js +9 -8
- package/dist/esm/kup-dash-list.entry.js +4 -4
- package/dist/esm/kup-dash_2.entry.js +4 -7
- package/dist/esm/{kup-form-editor.entry.js → kup-dashboard.entry.js} +123 -148
- package/dist/esm/kup-drawer.entry.js +4 -4
- package/dist/esm/{kup-box_2.entry.js → kup-echart.entry.js} +54 -1338
- package/dist/esm/kup-family-tree.entry.js +406 -0
- package/dist/esm/kup-form.entry.js +476 -0
- package/dist/esm/kup-iframe.entry.js +3 -3
- package/dist/esm/kup-image-list.entry.js +72 -10
- package/dist/esm/kup-lazy.entry.js +4 -4
- package/dist/esm/kup-magic-box.entry.js +4 -4
- package/dist/esm/{kup-manager-58b075b4.js → kup-manager-22a475e6.js} +404 -8
- package/dist/esm/kup-nav-bar.entry.js +3 -3
- package/dist/esm/kup-numeric-picker.entry.js +3 -3
- package/dist/esm/kup-photo-frame.entry.js +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 +5 -5
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{utils-d7e4b3c2.js → utils-2c1f4122.js} +1 -1
- package/dist/ketchup/ketchup.esm.js +1 -1
- package/dist/ketchup/p-06c6cc68.js +1 -0
- package/dist/ketchup/{p-3c11e615.entry.js → p-0dacd4bc.entry.js} +1 -1
- package/dist/ketchup/{p-fac1a08b.entry.js → p-1959f835.entry.js} +1 -1
- package/dist/ketchup/p-1c44dc62.entry.js +1 -0
- package/dist/ketchup/{p-f09f2f98.entry.js → p-264b1b19.entry.js} +1 -1
- package/dist/ketchup/p-38d7584e.js +1 -0
- package/dist/ketchup/{p-f71a1675.entry.js → p-42080355.entry.js} +1 -1
- package/dist/ketchup/p-4bc9f98b.entry.js +1 -0
- package/dist/ketchup/p-578583db.entry.js +1 -0
- package/dist/ketchup/p-5866d507.entry.js +1 -0
- package/dist/ketchup/p-61059e9d.entry.js +9 -0
- package/dist/ketchup/{p-a615a92b.entry.js → p-664be494.entry.js} +1 -1
- package/dist/ketchup/{p-d2ee56dd.entry.js → p-67cd575d.entry.js} +1 -1
- package/dist/ketchup/{p-e0035c58.js → p-682a367a.js} +1 -1
- package/dist/ketchup/p-6ccf7eb2.entry.js +1 -0
- package/dist/ketchup/p-7230ab97.entry.js +1 -0
- package/dist/ketchup/p-752b4cef.entry.js +1 -0
- package/dist/ketchup/{p-954cc340.entry.js → p-7de3e7ac.entry.js} +1 -1
- package/dist/ketchup/p-928c5c36.js +1 -0
- package/dist/ketchup/{p-6dff70f8.entry.js → p-9b36497d.entry.js} +1 -1
- package/dist/ketchup/{p-99e0d768.entry.js → p-b982d137.entry.js} +1 -1
- package/dist/ketchup/{p-8cdf61a4.js → p-c0219e5e.js} +1 -1
- package/dist/ketchup/p-c55fd0a7.entry.js +1 -0
- package/dist/ketchup/p-cd5cfa7c.js +1 -0
- package/dist/ketchup/p-d154b3a0.entry.js +1 -0
- package/dist/ketchup/p-d2affb6f.entry.js +27 -0
- package/dist/ketchup/p-d3b542b3.js +2 -0
- package/dist/ketchup/{p-7454cb92.js → p-d6c12c6c.js} +1 -1
- package/dist/ketchup/p-da0eab60.entry.js +1 -0
- package/dist/ketchup/{p-7eff4eee.js → p-dc62a30f.js} +1 -1
- package/dist/ketchup/p-e9366aaf.entry.js +39 -0
- package/dist/ketchup/{p-44ec4f03.js → p-edae3076.js} +1 -1
- package/dist/ketchup/p-fc2b1229.js +30 -0
- package/dist/types/components/kup-autocomplete/kup-autocomplete.d.ts +1 -16
- package/dist/types/components/{kup-form-editor/kup-form-editor-declarations.d.ts → kup-dashboard/kup-dashboard-declarations.d.ts} +9 -27
- package/dist/types/components/{kup-form-editor/kup-form-editor.d.ts → kup-dashboard/kup-dashboard.d.ts} +12 -9
- package/dist/types/components/kup-family-tree/kup-family-tree-declarations.d.ts +33 -0
- package/dist/types/components/kup-family-tree/kup-family-tree.d.ts +61 -0
- package/dist/types/components/kup-form/kup-form-declarations.d.ts +60 -0
- package/dist/types/components/kup-form/kup-form.d.ts +63 -0
- package/dist/types/components/kup-image-list/kup-image-list-state.d.ts +6 -0
- package/dist/types/components/kup-image-list/kup-image-list.d.ts +17 -0
- package/dist/types/components/kup-text-field/kup-text-field-declarations.d.ts +3 -0
- package/dist/types/components/kup-text-field/kup-text-field.d.ts +5 -0
- package/dist/types/components/kup-time-picker/kup-time-picker.d.ts +0 -6
- package/dist/types/components/kup-tree/kup-tree-declarations.d.ts +2 -0
- package/dist/types/components.d.ts +460 -241
- package/dist/types/f-components/f-cell/f-cell-declarations.d.ts +4 -1
- package/dist/types/f-components/f-text-field/f-text-field-declarations.d.ts +1 -0
- package/dist/types/managers/kup-data/kup-data-declarations.d.ts +8 -0
- package/dist/types/managers/kup-data/kup-data-node-helper.d.ts +15 -1
- package/dist/types/managers/kup-data/kup-data.d.ts +7 -1
- package/dist/types/managers/kup-language/kup-language-declarations.d.ts +11 -1
- package/dist/types/managers/kup-objects/kup-objects.d.ts +6 -0
- package/dist/types/types/GenericTypes.d.ts +3 -2
- package/package.json +2 -2
- package/dist/cjs/f-cell-69294bca.js +0 -653
- package/dist/cjs/kup-field.cjs.entry.js +0 -241
- package/dist/collection/assets/form-editor.js +0 -338
- package/dist/collection/components/kup-field/kup-field-declarations.js +0 -15
- package/dist/collection/components/kup-field/kup-field.css +0 -48
- package/dist/collection/components/kup-field/kup-field.js +0 -514
- package/dist/collection/components/kup-form-editor/kup-form-editor-declarations.js +0 -23
- package/dist/esm/kup-field.entry.js +0 -237
- package/dist/ketchup/p-1ae66cc5.js +0 -1
- package/dist/ketchup/p-34b74425.js +0 -1
- package/dist/ketchup/p-4ffbc3ff.js +0 -1
- package/dist/ketchup/p-5264a3e6.entry.js +0 -1
- package/dist/ketchup/p-65974e48.entry.js +0 -1
- package/dist/ketchup/p-65b46587.entry.js +0 -40
- package/dist/ketchup/p-80968627.entry.js +0 -1
- package/dist/ketchup/p-a0f6e25c.entry.js +0 -1
- package/dist/ketchup/p-aca0e54b.js +0 -30
- package/dist/ketchup/p-b8939a8b.entry.js +0 -1
- package/dist/ketchup/p-bfc3bac7.js +0 -1
- package/dist/ketchup/p-c5ce8951.entry.js +0 -1
- package/dist/ketchup/p-cad1e097.entry.js +0 -9
- package/dist/ketchup/p-db71436b.entry.js +0 -27
- package/dist/ketchup/p-e1039cf2.entry.js +0 -1
- package/dist/ketchup/p-ea10176c.entry.js +0 -1
- package/dist/types/components/kup-field/kup-field-declarations.d.ts +0 -25
- package/dist/types/components/kup-field/kup-field.d.ts +0 -90
|
@@ -1,514 +0,0 @@
|
|
|
1
|
-
import { Component, Element, h, Host, Event, forceUpdate, Method, Prop, } from '@stencil/core';
|
|
2
|
-
import { KupFieldProps, } from './kup-field-declarations';
|
|
3
|
-
import { kupManagerInstance, } from '../../managers/kup-manager/kup-manager';
|
|
4
|
-
import { KupDebugCategory } from '../../managers/kup-debug/kup-debug-declarations';
|
|
5
|
-
import { componentWrapperId } from '../../variables/GenericVariables';
|
|
6
|
-
export class KupField {
|
|
7
|
-
constructor() {
|
|
8
|
-
/*-------------------------------------------------*/
|
|
9
|
-
/* P r o p s */
|
|
10
|
-
/*-------------------------------------------------*/
|
|
11
|
-
/**
|
|
12
|
-
* Custom style of the component.
|
|
13
|
-
* @default ""
|
|
14
|
-
* @see https://ketchup.smeup.com/ketchup-showcase/#/customization
|
|
15
|
-
*/
|
|
16
|
-
this.customStyle = '';
|
|
17
|
-
/**
|
|
18
|
-
* Effective data to pass to the component.
|
|
19
|
-
* @default {}
|
|
20
|
-
*/
|
|
21
|
-
this.data = {};
|
|
22
|
-
/**
|
|
23
|
-
* The text of the label. If set to empty or has only white space chars, the label will be removed.
|
|
24
|
-
* @default ""
|
|
25
|
-
*/
|
|
26
|
-
this.label = '';
|
|
27
|
-
/**
|
|
28
|
-
* Sets the label's position, left right or top.
|
|
29
|
-
* @default "left"
|
|
30
|
-
*/
|
|
31
|
-
this.labelPos = 'left';
|
|
32
|
-
/**
|
|
33
|
-
* Sets whether the submit button must be displayed or not.
|
|
34
|
-
* @default false
|
|
35
|
-
*/
|
|
36
|
-
this.showSubmit = false;
|
|
37
|
-
/**
|
|
38
|
-
* Sets the submit button's label.
|
|
39
|
-
* @default ""
|
|
40
|
-
*/
|
|
41
|
-
this.submitLabel = '';
|
|
42
|
-
/**
|
|
43
|
-
* Sets the submit button's position, top right bottom or left.
|
|
44
|
-
* @default "right"
|
|
45
|
-
*/
|
|
46
|
-
this.submitPos = 'right';
|
|
47
|
-
/**
|
|
48
|
-
* The type of the FLD
|
|
49
|
-
* @default undefined
|
|
50
|
-
*/
|
|
51
|
-
this.type = undefined;
|
|
52
|
-
/*-------------------------------------------------*/
|
|
53
|
-
/* I n t e r n a l V a r i a b l e s */
|
|
54
|
-
/*-------------------------------------------------*/
|
|
55
|
-
/**
|
|
56
|
-
* Instance of the KupManager class.
|
|
57
|
-
*/
|
|
58
|
-
this.kupManager = kupManagerInstance();
|
|
59
|
-
this.currentValue = null;
|
|
60
|
-
this.previousValue = null;
|
|
61
|
-
// Generates an instance of the event handler while binding the current component as its this value
|
|
62
|
-
// This is done once per component to improve performance speed
|
|
63
|
-
this.onChangeInstance = this.onChange.bind(this);
|
|
64
|
-
this.onSubmitInstance = this.onSubmit.bind(this);
|
|
65
|
-
}
|
|
66
|
-
// When a change or update event must be launched as if it's coming from the FLD itself
|
|
67
|
-
onChange(event) {
|
|
68
|
-
const { value, info } = event.detail;
|
|
69
|
-
this.kupChange.emit({
|
|
70
|
-
originalEvent: event,
|
|
71
|
-
oldValue: this.currentValue,
|
|
72
|
-
value,
|
|
73
|
-
info,
|
|
74
|
-
});
|
|
75
|
-
this.previousValue = this.currentValue;
|
|
76
|
-
this.currentValue = value;
|
|
77
|
-
}
|
|
78
|
-
// When a submit event must be launched as if it's coming from the FLD itself
|
|
79
|
-
onSubmit(event) {
|
|
80
|
-
this.kupSubmit.emit({
|
|
81
|
-
originalEvent: event,
|
|
82
|
-
oldValue: this.previousValue,
|
|
83
|
-
value: this.currentValue,
|
|
84
|
-
info: {
|
|
85
|
-
obj: event.detail.info && event.detail.info.obj
|
|
86
|
-
? event.detail.info.obj
|
|
87
|
-
: undefined,
|
|
88
|
-
},
|
|
89
|
-
});
|
|
90
|
-
}
|
|
91
|
-
/*-------------------------------------------------*/
|
|
92
|
-
/* P u b l i c M e t h o d s */
|
|
93
|
-
/*-------------------------------------------------*/
|
|
94
|
-
/**
|
|
95
|
-
* Provides an interface to get the current value programmatically
|
|
96
|
-
* @method getCurrentValue
|
|
97
|
-
* @returns {any}
|
|
98
|
-
*/
|
|
99
|
-
async getCurrentValue() {
|
|
100
|
-
return this.currentValue;
|
|
101
|
-
}
|
|
102
|
-
/**
|
|
103
|
-
* Used to retrieve component's props values.
|
|
104
|
-
* @param {boolean} descriptions - When provided and true, the result will be the list of props with their description.
|
|
105
|
-
* @returns {Promise<GenericObject>} List of props as object, each key will be a prop.
|
|
106
|
-
*/
|
|
107
|
-
async getProps(descriptions) {
|
|
108
|
-
let props = {};
|
|
109
|
-
if (descriptions) {
|
|
110
|
-
props = KupFieldProps;
|
|
111
|
-
}
|
|
112
|
-
else {
|
|
113
|
-
for (const key in KupFieldProps) {
|
|
114
|
-
if (Object.prototype.hasOwnProperty.call(KupFieldProps, key)) {
|
|
115
|
-
props[key] = this[key];
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
return props;
|
|
120
|
-
}
|
|
121
|
-
/**
|
|
122
|
-
* This method is used to trigger a new render of the component.
|
|
123
|
-
*/
|
|
124
|
-
async refresh() {
|
|
125
|
-
forceUpdate(this);
|
|
126
|
-
}
|
|
127
|
-
/*-------------------------------------------------*/
|
|
128
|
-
/* L i f e c y c l e H o o k s */
|
|
129
|
-
/*-------------------------------------------------*/
|
|
130
|
-
componentWillLoad() {
|
|
131
|
-
this.kupManager.debug.logLoad(this, false);
|
|
132
|
-
this.kupManager.theme.register(this);
|
|
133
|
-
}
|
|
134
|
-
componentDidLoad() {
|
|
135
|
-
this.kupManager.debug.logLoad(this, true);
|
|
136
|
-
}
|
|
137
|
-
componentWillRender() {
|
|
138
|
-
this.kupManager.debug.logRender(this, false);
|
|
139
|
-
}
|
|
140
|
-
componentDidRender() {
|
|
141
|
-
this.kupManager.debug.logRender(this, true);
|
|
142
|
-
}
|
|
143
|
-
render() {
|
|
144
|
-
let toRender = [];
|
|
145
|
-
const baseClass = 'kup-field';
|
|
146
|
-
let label = null;
|
|
147
|
-
let submit = null;
|
|
148
|
-
let wrapperClass = '';
|
|
149
|
-
let propList = Object.assign({}, this.data);
|
|
150
|
-
if (this.label.trim().length) {
|
|
151
|
-
wrapperClass += ' label-' + this.labelPos;
|
|
152
|
-
label = (h("label", { class: baseClass +
|
|
153
|
-
'__label' +
|
|
154
|
-
' ' +
|
|
155
|
-
baseClass +
|
|
156
|
-
'--' +
|
|
157
|
-
this.labelPos }, this.label));
|
|
158
|
-
}
|
|
159
|
-
if (this.showSubmit) {
|
|
160
|
-
wrapperClass += ' submit-' + this.submitPos;
|
|
161
|
-
submit = (h("kup-button", { class: baseClass + '__submit', label: this.submitLabel, "onkup-button-click": this.onSubmitInstance }));
|
|
162
|
-
}
|
|
163
|
-
//-- If a component must be positioned on top of the dynamic one --
|
|
164
|
-
const labelIsTop = this.labelPos === 'top';
|
|
165
|
-
const labelIsLeft = this.labelPos === 'left';
|
|
166
|
-
const labelIsRight = this.labelPos === 'right';
|
|
167
|
-
const submitIsTop = this.submitPos === 'top';
|
|
168
|
-
const submitIsLeft = this.submitPos === 'left';
|
|
169
|
-
const submitIsRight = this.submitPos === 'right';
|
|
170
|
-
const submitIsBottom = this.submitPos === 'bottom';
|
|
171
|
-
if (labelIsTop || submitIsTop) {
|
|
172
|
-
toRender.push(h("div", { class: baseClass + '__top-container' },
|
|
173
|
-
labelIsTop && label ? label : null,
|
|
174
|
-
submitIsTop && submit ? submit : null));
|
|
175
|
-
}
|
|
176
|
-
if (labelIsLeft && label) {
|
|
177
|
-
toRender.push(label);
|
|
178
|
-
}
|
|
179
|
-
if (submitIsLeft && submit) {
|
|
180
|
-
toRender.push(submit);
|
|
181
|
-
}
|
|
182
|
-
let comp = undefined;
|
|
183
|
-
if (this.type === undefined) {
|
|
184
|
-
this.kupManager.debug.logMessage(this, 'Type (state) is undefined!', KupDebugCategory.WARNING);
|
|
185
|
-
}
|
|
186
|
-
else {
|
|
187
|
-
switch (this.type.toLowerCase()) {
|
|
188
|
-
case 'cmb':
|
|
189
|
-
comp = 'kup-combobox';
|
|
190
|
-
propList.onKupComboboxChange = this.onChangeInstance;
|
|
191
|
-
break;
|
|
192
|
-
case 'itx':
|
|
193
|
-
comp = 'kup-text-field';
|
|
194
|
-
propList.onkupTextFieldChange = this.onChangeInstance;
|
|
195
|
-
break;
|
|
196
|
-
case 'rad':
|
|
197
|
-
comp = 'kup-radio';
|
|
198
|
-
propList.onkupRadioChange = this.onChangeInstance;
|
|
199
|
-
break;
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
const $DynamicComponent = comp; // TODO check if there is a better typing
|
|
203
|
-
toRender.push(h($DynamicComponent, Object.assign({ class: baseClass + '__component' }, propList)));
|
|
204
|
-
if (labelIsRight && label) {
|
|
205
|
-
toRender.push(label);
|
|
206
|
-
}
|
|
207
|
-
if ((submitIsRight || submitIsBottom) && submit) {
|
|
208
|
-
toRender.push(submit);
|
|
209
|
-
}
|
|
210
|
-
return (h(Host, null,
|
|
211
|
-
h("style", null, this.kupManager.theme.setKupStyle(this.rootElement)),
|
|
212
|
-
h("div", { id: componentWrapperId, class: wrapperClass }, toRender)));
|
|
213
|
-
}
|
|
214
|
-
disconnectedCallback() {
|
|
215
|
-
this.kupManager.theme.unregister(this);
|
|
216
|
-
}
|
|
217
|
-
static get is() { return "kup-field"; }
|
|
218
|
-
static get encapsulation() { return "shadow"; }
|
|
219
|
-
static get originalStyleUrls() { return {
|
|
220
|
-
"$": ["kup-field.scss"]
|
|
221
|
-
}; }
|
|
222
|
-
static get styleUrls() { return {
|
|
223
|
-
"$": ["kup-field.css"]
|
|
224
|
-
}; }
|
|
225
|
-
static get properties() { return {
|
|
226
|
-
"customStyle": {
|
|
227
|
-
"type": "string",
|
|
228
|
-
"mutable": false,
|
|
229
|
-
"complexType": {
|
|
230
|
-
"original": "string",
|
|
231
|
-
"resolved": "string",
|
|
232
|
-
"references": {}
|
|
233
|
-
},
|
|
234
|
-
"required": false,
|
|
235
|
-
"optional": false,
|
|
236
|
-
"docs": {
|
|
237
|
-
"tags": [{
|
|
238
|
-
"name": "default",
|
|
239
|
-
"text": "\"\""
|
|
240
|
-
}, {
|
|
241
|
-
"name": "see",
|
|
242
|
-
"text": "https://ketchup.smeup.com/ketchup-showcase/#/customization"
|
|
243
|
-
}],
|
|
244
|
-
"text": "Custom style of the component."
|
|
245
|
-
},
|
|
246
|
-
"attribute": "custom-style",
|
|
247
|
-
"reflect": false,
|
|
248
|
-
"defaultValue": "''"
|
|
249
|
-
},
|
|
250
|
-
"data": {
|
|
251
|
-
"type": "unknown",
|
|
252
|
-
"mutable": false,
|
|
253
|
-
"complexType": {
|
|
254
|
-
"original": "Object",
|
|
255
|
-
"resolved": "Object",
|
|
256
|
-
"references": {
|
|
257
|
-
"Object": {
|
|
258
|
-
"location": "global"
|
|
259
|
-
}
|
|
260
|
-
}
|
|
261
|
-
},
|
|
262
|
-
"required": false,
|
|
263
|
-
"optional": false,
|
|
264
|
-
"docs": {
|
|
265
|
-
"tags": [{
|
|
266
|
-
"name": "default",
|
|
267
|
-
"text": "{}"
|
|
268
|
-
}],
|
|
269
|
-
"text": "Effective data to pass to the component."
|
|
270
|
-
},
|
|
271
|
-
"defaultValue": "{}"
|
|
272
|
-
},
|
|
273
|
-
"label": {
|
|
274
|
-
"type": "string",
|
|
275
|
-
"mutable": false,
|
|
276
|
-
"complexType": {
|
|
277
|
-
"original": "string",
|
|
278
|
-
"resolved": "string",
|
|
279
|
-
"references": {}
|
|
280
|
-
},
|
|
281
|
-
"required": false,
|
|
282
|
-
"optional": false,
|
|
283
|
-
"docs": {
|
|
284
|
-
"tags": [{
|
|
285
|
-
"name": "default",
|
|
286
|
-
"text": "\"\""
|
|
287
|
-
}],
|
|
288
|
-
"text": "The text of the label. If set to empty or has only white space chars, the label will be removed."
|
|
289
|
-
},
|
|
290
|
-
"attribute": "label",
|
|
291
|
-
"reflect": false,
|
|
292
|
-
"defaultValue": "''"
|
|
293
|
-
},
|
|
294
|
-
"labelPos": {
|
|
295
|
-
"type": "string",
|
|
296
|
-
"mutable": false,
|
|
297
|
-
"complexType": {
|
|
298
|
-
"original": "string",
|
|
299
|
-
"resolved": "string",
|
|
300
|
-
"references": {}
|
|
301
|
-
},
|
|
302
|
-
"required": false,
|
|
303
|
-
"optional": false,
|
|
304
|
-
"docs": {
|
|
305
|
-
"tags": [{
|
|
306
|
-
"name": "default",
|
|
307
|
-
"text": "\"left\""
|
|
308
|
-
}],
|
|
309
|
-
"text": "Sets the label's position, left right or top."
|
|
310
|
-
},
|
|
311
|
-
"attribute": "label-pos",
|
|
312
|
-
"reflect": false,
|
|
313
|
-
"defaultValue": "'left'"
|
|
314
|
-
},
|
|
315
|
-
"showSubmit": {
|
|
316
|
-
"type": "boolean",
|
|
317
|
-
"mutable": false,
|
|
318
|
-
"complexType": {
|
|
319
|
-
"original": "boolean",
|
|
320
|
-
"resolved": "boolean",
|
|
321
|
-
"references": {}
|
|
322
|
-
},
|
|
323
|
-
"required": false,
|
|
324
|
-
"optional": false,
|
|
325
|
-
"docs": {
|
|
326
|
-
"tags": [{
|
|
327
|
-
"name": "default",
|
|
328
|
-
"text": "false"
|
|
329
|
-
}],
|
|
330
|
-
"text": "Sets whether the submit button must be displayed or not."
|
|
331
|
-
},
|
|
332
|
-
"attribute": "show-submit",
|
|
333
|
-
"reflect": false,
|
|
334
|
-
"defaultValue": "false"
|
|
335
|
-
},
|
|
336
|
-
"submitLabel": {
|
|
337
|
-
"type": "string",
|
|
338
|
-
"mutable": false,
|
|
339
|
-
"complexType": {
|
|
340
|
-
"original": "string",
|
|
341
|
-
"resolved": "string",
|
|
342
|
-
"references": {}
|
|
343
|
-
},
|
|
344
|
-
"required": false,
|
|
345
|
-
"optional": false,
|
|
346
|
-
"docs": {
|
|
347
|
-
"tags": [{
|
|
348
|
-
"name": "default",
|
|
349
|
-
"text": "\"\""
|
|
350
|
-
}],
|
|
351
|
-
"text": "Sets the submit button's label."
|
|
352
|
-
},
|
|
353
|
-
"attribute": "submit-label",
|
|
354
|
-
"reflect": false,
|
|
355
|
-
"defaultValue": "''"
|
|
356
|
-
},
|
|
357
|
-
"submitPos": {
|
|
358
|
-
"type": "string",
|
|
359
|
-
"mutable": false,
|
|
360
|
-
"complexType": {
|
|
361
|
-
"original": "string",
|
|
362
|
-
"resolved": "string",
|
|
363
|
-
"references": {}
|
|
364
|
-
},
|
|
365
|
-
"required": false,
|
|
366
|
-
"optional": false,
|
|
367
|
-
"docs": {
|
|
368
|
-
"tags": [{
|
|
369
|
-
"name": "default",
|
|
370
|
-
"text": "\"right\""
|
|
371
|
-
}],
|
|
372
|
-
"text": "Sets the submit button's position, top right bottom or left."
|
|
373
|
-
},
|
|
374
|
-
"attribute": "submit-pos",
|
|
375
|
-
"reflect": false,
|
|
376
|
-
"defaultValue": "'right'"
|
|
377
|
-
},
|
|
378
|
-
"type": {
|
|
379
|
-
"type": "string",
|
|
380
|
-
"mutable": false,
|
|
381
|
-
"complexType": {
|
|
382
|
-
"original": "string",
|
|
383
|
-
"resolved": "string",
|
|
384
|
-
"references": {}
|
|
385
|
-
},
|
|
386
|
-
"required": false,
|
|
387
|
-
"optional": false,
|
|
388
|
-
"docs": {
|
|
389
|
-
"tags": [{
|
|
390
|
-
"name": "default",
|
|
391
|
-
"text": "undefined"
|
|
392
|
-
}],
|
|
393
|
-
"text": "The type of the FLD"
|
|
394
|
-
},
|
|
395
|
-
"attribute": "type",
|
|
396
|
-
"reflect": false,
|
|
397
|
-
"defaultValue": "undefined"
|
|
398
|
-
}
|
|
399
|
-
}; }
|
|
400
|
-
static get events() { return [{
|
|
401
|
-
"method": "kupChange",
|
|
402
|
-
"name": "kup-field-change",
|
|
403
|
-
"bubbles": true,
|
|
404
|
-
"cancelable": false,
|
|
405
|
-
"composed": true,
|
|
406
|
-
"docs": {
|
|
407
|
-
"tags": [],
|
|
408
|
-
"text": "Launched when the value of the current FLD changes."
|
|
409
|
-
},
|
|
410
|
-
"complexType": {
|
|
411
|
-
"original": "KupFieldChangeEvent",
|
|
412
|
-
"resolved": "KupFieldChangeEvent",
|
|
413
|
-
"references": {
|
|
414
|
-
"KupFieldChangeEvent": {
|
|
415
|
-
"location": "import",
|
|
416
|
-
"path": "./kup-field-declarations"
|
|
417
|
-
}
|
|
418
|
-
}
|
|
419
|
-
}
|
|
420
|
-
}, {
|
|
421
|
-
"method": "kupSubmit",
|
|
422
|
-
"name": "kup-field-submit",
|
|
423
|
-
"bubbles": true,
|
|
424
|
-
"cancelable": false,
|
|
425
|
-
"composed": true,
|
|
426
|
-
"docs": {
|
|
427
|
-
"tags": [],
|
|
428
|
-
"text": "Launched when the FLD values are confirmed and a submit event is triggered."
|
|
429
|
-
},
|
|
430
|
-
"complexType": {
|
|
431
|
-
"original": "KupFieldSubmitEvent",
|
|
432
|
-
"resolved": "KupFieldSubmitEvent",
|
|
433
|
-
"references": {
|
|
434
|
-
"KupFieldSubmitEvent": {
|
|
435
|
-
"location": "import",
|
|
436
|
-
"path": "./kup-field-declarations"
|
|
437
|
-
}
|
|
438
|
-
}
|
|
439
|
-
}
|
|
440
|
-
}]; }
|
|
441
|
-
static get methods() { return {
|
|
442
|
-
"getCurrentValue": {
|
|
443
|
-
"complexType": {
|
|
444
|
-
"signature": "() => Promise<string | object>",
|
|
445
|
-
"parameters": [],
|
|
446
|
-
"references": {
|
|
447
|
-
"Promise": {
|
|
448
|
-
"location": "global"
|
|
449
|
-
}
|
|
450
|
-
},
|
|
451
|
-
"return": "Promise<string | object>"
|
|
452
|
-
},
|
|
453
|
-
"docs": {
|
|
454
|
-
"text": "Provides an interface to get the current value programmatically",
|
|
455
|
-
"tags": [{
|
|
456
|
-
"name": "method",
|
|
457
|
-
"text": "getCurrentValue"
|
|
458
|
-
}, {
|
|
459
|
-
"name": "returns",
|
|
460
|
-
"text": undefined
|
|
461
|
-
}]
|
|
462
|
-
}
|
|
463
|
-
},
|
|
464
|
-
"getProps": {
|
|
465
|
-
"complexType": {
|
|
466
|
-
"signature": "(descriptions?: boolean) => Promise<GenericObject>",
|
|
467
|
-
"parameters": [{
|
|
468
|
-
"tags": [{
|
|
469
|
-
"name": "param",
|
|
470
|
-
"text": "descriptions - When provided and true, the result will be the list of props with their description."
|
|
471
|
-
}],
|
|
472
|
-
"text": "- When provided and true, the result will be the list of props with their description."
|
|
473
|
-
}],
|
|
474
|
-
"references": {
|
|
475
|
-
"Promise": {
|
|
476
|
-
"location": "global"
|
|
477
|
-
},
|
|
478
|
-
"GenericObject": {
|
|
479
|
-
"location": "import",
|
|
480
|
-
"path": "../../types/GenericTypes"
|
|
481
|
-
}
|
|
482
|
-
},
|
|
483
|
-
"return": "Promise<GenericObject>"
|
|
484
|
-
},
|
|
485
|
-
"docs": {
|
|
486
|
-
"text": "Used to retrieve component's props values.",
|
|
487
|
-
"tags": [{
|
|
488
|
-
"name": "param",
|
|
489
|
-
"text": "descriptions - When provided and true, the result will be the list of props with their description."
|
|
490
|
-
}, {
|
|
491
|
-
"name": "returns",
|
|
492
|
-
"text": "List of props as object, each key will be a prop."
|
|
493
|
-
}]
|
|
494
|
-
}
|
|
495
|
-
},
|
|
496
|
-
"refresh": {
|
|
497
|
-
"complexType": {
|
|
498
|
-
"signature": "() => Promise<void>",
|
|
499
|
-
"parameters": [],
|
|
500
|
-
"references": {
|
|
501
|
-
"Promise": {
|
|
502
|
-
"location": "global"
|
|
503
|
-
}
|
|
504
|
-
},
|
|
505
|
-
"return": "Promise<void>"
|
|
506
|
-
},
|
|
507
|
-
"docs": {
|
|
508
|
-
"text": "This method is used to trigger a new render of the component.",
|
|
509
|
-
"tags": []
|
|
510
|
-
}
|
|
511
|
-
}
|
|
512
|
-
}; }
|
|
513
|
-
static get elementRef() { return "rootElement"; }
|
|
514
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Props of the kup-form-editor component.
|
|
3
|
-
* Used to export every prop in an object.
|
|
4
|
-
*/
|
|
5
|
-
export var KupFormEditorProps;
|
|
6
|
-
(function (KupFormEditorProps) {
|
|
7
|
-
KupFormEditorProps["customStyle"] = "Custom style of the component.";
|
|
8
|
-
KupFormEditorProps["data"] = "The data of the component.";
|
|
9
|
-
})(KupFormEditorProps || (KupFormEditorProps = {}));
|
|
10
|
-
export var KupFormEditorDragTypes;
|
|
11
|
-
(function (KupFormEditorDragTypes) {
|
|
12
|
-
KupFormEditorDragTypes["Components"] = "1";
|
|
13
|
-
KupFormEditorDragTypes["Sections"] = "2";
|
|
14
|
-
})(KupFormEditorDragTypes || (KupFormEditorDragTypes = {}));
|
|
15
|
-
export var KupFormEditorLabels;
|
|
16
|
-
(function (KupFormEditorLabels) {
|
|
17
|
-
KupFormEditorLabels["Loaded"] = "Loaded";
|
|
18
|
-
KupFormEditorLabels["Reset"] = "Reset";
|
|
19
|
-
KupFormEditorLabels["Save"] = "Save";
|
|
20
|
-
KupFormEditorLabels["Components"] = "Components";
|
|
21
|
-
KupFormEditorLabels["Sections"] = "Sections";
|
|
22
|
-
KupFormEditorLabels["Column"] = "Column";
|
|
23
|
-
})(KupFormEditorLabels || (KupFormEditorLabels = {}));
|