@sme.up/ketchup 6.9.0-SNAPSHOT → 7.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{f-button-e48df7ac.js → f-button-40953600.js} +1 -1
- package/dist/cjs/{f-cell-73b2fd86.js → f-cell-e603ae4f.js} +11 -8
- package/dist/cjs/{f-chip-1d499dc9.js → f-chip-01efabde.js} +2 -2
- package/dist/cjs/{f-image-9be73458.js → f-image-f741cb4c.js} +1 -1
- package/dist/cjs/{f-paginator-utils-b1f44f04.js → f-paginator-utils-35a6a848.js} +15 -12
- package/dist/cjs/{f-text-field-43439612.js → f-text-field-60a2f24c.js} +1 -1
- package/dist/cjs/ketchup.cjs.js +1 -1
- package/dist/cjs/kup-accordion.cjs.entry.js +2 -2
- package/dist/cjs/kup-autocomplete_26.cjs.entry.js +237 -35
- package/dist/cjs/kup-box.cjs.entry.js +7 -7
- package/dist/cjs/kup-calendar.cjs.entry.js +4 -4
- package/dist/cjs/kup-cell.cjs.entry.js +5 -5
- package/dist/cjs/kup-dash-list.cjs.entry.js +1 -1
- package/dist/cjs/kup-dash_2.cjs.entry.js +1 -1
- package/dist/cjs/kup-dashboard.cjs.entry.js +4 -4
- package/dist/cjs/kup-drawer.cjs.entry.js +1 -1
- package/dist/cjs/kup-echart.cjs.entry.js +6 -4
- package/dist/cjs/kup-family-tree.cjs.entry.js +3 -3
- package/dist/cjs/kup-iframe.cjs.entry.js +1 -1
- package/dist/cjs/kup-image-list.cjs.entry.js +6 -6
- package/dist/cjs/kup-lazy.cjs.entry.js +1 -1
- package/dist/cjs/kup-magic-box.cjs.entry.js +2 -2
- package/dist/cjs/{kup-manager-58ba55f4.js → kup-manager-6f05ebe1.js} +7 -2
- package/dist/cjs/kup-nav-bar.cjs.entry.js +1 -1
- package/dist/cjs/kup-numeric-picker.cjs.entry.js +2 -2
- package/dist/cjs/kup-photo-frame.cjs.entry.js +1 -1
- package/dist/cjs/kup-probe.cjs.entry.js +1 -1
- package/dist/cjs/kup-qlik.cjs.entry.js +1 -1
- package/dist/cjs/kup-snackbar.cjs.entry.js +3 -3
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/assets/card.js +9 -2
- package/dist/collection/assets/data-table.js +4 -1
- package/dist/collection/components/kup-card/box/kup-card-box.js +114 -5
- package/dist/collection/components/kup-card/built-in/kup-card-calendar.js +7 -2
- package/dist/collection/components/kup-card/kup-card.css +171 -21
- package/dist/collection/components/kup-data-table/kup-data-table-declarations.js +1 -0
- package/dist/collection/components/kup-data-table/kup-data-table-helper.js +11 -9
- package/dist/collection/components/kup-data-table/kup-data-table.css +2 -1
- package/dist/collection/components/kup-data-table/kup-data-table.js +94 -14
- package/dist/collection/components/kup-echart/kup-echart.js +5 -3
- package/dist/collection/components/kup-form/kup-form-declarations.js +3 -0
- package/dist/collection/components/kup-form/kup-form.js +57 -4
- package/dist/collection/f-components/f-button/f-button.js +0 -1
- package/dist/collection/f-components/f-cell/f-cell-declarations.js +2 -0
- package/dist/collection/f-components/f-cell/f-cell.js +7 -4
- package/dist/collection/managers/kup-data/kup-data.js +3 -1
- package/dist/collection/utils/filters/filters-rows.js +2 -1
- package/dist/components/kup-autocomplete2.js +259 -44
- package/dist/components/kup-echart2.js +5 -3
- package/dist/esm/{f-button-b902ad65.js → f-button-9aec1bc5.js} +1 -1
- package/dist/esm/{f-cell-b11d0d5d.js → f-cell-556937d0.js} +11 -8
- package/dist/esm/{f-chip-6b8cd306.js → f-chip-677db32a.js} +2 -2
- package/dist/esm/{f-image-983805af.js → f-image-52bb5950.js} +1 -1
- package/dist/esm/{f-paginator-utils-b22bec1f.js → f-paginator-utils-d472e336.js} +15 -12
- package/dist/esm/{f-text-field-3f9a7ba7.js → f-text-field-88f92118.js} +1 -1
- package/dist/esm/ketchup.js +1 -1
- package/dist/esm/kup-accordion.entry.js +2 -2
- package/dist/esm/kup-autocomplete_26.entry.js +237 -35
- package/dist/esm/kup-box.entry.js +7 -7
- package/dist/esm/kup-calendar.entry.js +4 -4
- package/dist/esm/kup-cell.entry.js +5 -5
- package/dist/esm/kup-dash-list.entry.js +1 -1
- package/dist/esm/kup-dash_2.entry.js +1 -1
- package/dist/esm/kup-dashboard.entry.js +4 -4
- package/dist/esm/kup-drawer.entry.js +1 -1
- package/dist/esm/kup-echart.entry.js +6 -4
- package/dist/esm/kup-family-tree.entry.js +3 -3
- package/dist/esm/kup-iframe.entry.js +1 -1
- package/dist/esm/kup-image-list.entry.js +6 -6
- package/dist/esm/kup-lazy.entry.js +1 -1
- package/dist/esm/kup-magic-box.entry.js +2 -2
- package/dist/esm/{kup-manager-a1976c1f.js → kup-manager-12e99c22.js} +7 -2
- package/dist/esm/kup-nav-bar.entry.js +1 -1
- package/dist/esm/kup-numeric-picker.entry.js +2 -2
- package/dist/esm/kup-photo-frame.entry.js +1 -1
- package/dist/esm/kup-probe.entry.js +1 -1
- package/dist/esm/kup-qlik.entry.js +1 -1
- package/dist/esm/kup-snackbar.entry.js +3 -3
- package/dist/esm/loader.js +1 -1
- package/dist/ketchup/ketchup.esm.js +1 -1
- package/dist/ketchup/{p-b8de542a.entry.js → p-053824eb.entry.js} +1 -1
- package/dist/ketchup/{p-fc1f1a63.entry.js → p-1c371df3.entry.js} +2 -2
- package/dist/ketchup/{p-59a78bb2.js → p-25617855.js} +1 -1
- package/dist/ketchup/p-278188bf.js +1 -0
- package/dist/ketchup/{p-6686f614.entry.js → p-3a7a05a7.entry.js} +1 -1
- package/dist/ketchup/{p-bb172702.entry.js → p-4021d751.entry.js} +1 -1
- package/dist/ketchup/{p-c1d3332f.entry.js → p-485883cb.entry.js} +1 -1
- package/dist/ketchup/{p-751a87a6.js → p-4f7302a9.js} +1 -1
- package/dist/ketchup/{p-2f274bd1.entry.js → p-52f19c4f.entry.js} +1 -1
- package/dist/ketchup/{p-1df3f4b3.js → p-5483f20e.js} +1 -1
- package/dist/ketchup/{p-0e34943f.entry.js → p-584369be.entry.js} +1 -1
- package/dist/ketchup/{p-913d78b8.entry.js → p-60609877.entry.js} +1 -1
- package/dist/ketchup/{p-ca42bab6.entry.js → p-6a6c3e69.entry.js} +1 -1
- package/dist/ketchup/p-751b5708.js +1 -0
- package/dist/ketchup/{p-a4c30e9a.entry.js → p-775e0d34.entry.js} +1 -1
- package/dist/ketchup/{p-fe4d6234.entry.js → p-7e013c24.entry.js} +1 -1
- package/dist/ketchup/{p-f08ba5cd.js → p-85c7a3a4.js} +1 -1
- package/dist/ketchup/{p-b2bb0feb.entry.js → p-88adddcf.entry.js} +1 -1
- package/dist/ketchup/{p-5c6798dc.entry.js → p-94290b09.entry.js} +1 -1
- package/dist/ketchup/{p-34fb0757.js → p-9570ebfa.js} +1 -1
- package/dist/ketchup/{p-67c86b4a.entry.js → p-ac33139e.entry.js} +1 -1
- package/dist/ketchup/{p-1f1c3e90.entry.js → p-ad3e7b2b.entry.js} +1 -1
- package/dist/ketchup/p-b0f22298.entry.js +9 -0
- package/dist/ketchup/{p-9003c78d.entry.js → p-c59e6bc7.entry.js} +1 -1
- package/dist/ketchup/{p-7d223413.entry.js → p-ce1da4a8.entry.js} +1 -1
- package/dist/ketchup/{p-8bed854e.entry.js → p-e0135ce0.entry.js} +1 -1
- package/dist/ketchup/{p-6154123c.entry.js → p-e094ebb8.entry.js} +1 -1
- package/dist/ketchup/{p-ca723973.entry.js → p-f44aba79.entry.js} +1 -1
- package/dist/types/adoptedStyleSheet-shim.d.ts +3 -3
- package/dist/types/components/kup-box/kup-box-declarations.d.ts +9 -9
- package/dist/types/components/kup-card/box/kup-card-box.d.ts +24 -0
- package/dist/types/components/kup-data-table/kup-data-table-declarations.d.ts +3 -1
- package/dist/types/components/kup-data-table/kup-data-table.d.ts +4 -0
- package/dist/types/components/kup-form/kup-form-declarations.d.ts +4 -1
- package/dist/types/components/kup-form/kup-form.d.ts +11 -1
- package/dist/types/components.d.ts +25 -1
- package/dist/types/f-components/f-cell/f-cell-declarations.d.ts +2 -1
- package/package.json +1 -1
- package/dist/ketchup/p-43d52a62.js +0 -1
- package/dist/ketchup/p-5d4503ff.entry.js +0 -9
- package/dist/ketchup/p-657eb6db.js +0 -1
|
@@ -19,7 +19,9 @@ export class KupForm {
|
|
|
19
19
|
this.customStyle = '';
|
|
20
20
|
this.data = null;
|
|
21
21
|
this.hiddenSubmitButton = false;
|
|
22
|
+
this.labelPlacement = KupFormLabelPlacement.LEFT;
|
|
22
23
|
this.layout = null;
|
|
24
|
+
this.submitCb = null;
|
|
23
25
|
}
|
|
24
26
|
/*-------------------------------------------------*/
|
|
25
27
|
/* W a t c h e r s */
|
|
@@ -153,7 +155,7 @@ export class KupForm {
|
|
|
153
155
|
form: true,
|
|
154
156
|
'form--column': !horizontal,
|
|
155
157
|
};
|
|
156
|
-
return (h("form", { class: classObj, name: this.rootElement.id }, formContent, this.hiddenSubmitButton ? (h(FButton, { buttonType: "submit", label: this.kupManager.language.translate(KupLanguageGeneric.CONFIRM), wrapperClass: "form__submit" })) : null));
|
|
158
|
+
return (h("form", { class: classObj, name: this.rootElement.id, onSubmit: this.submitCb }, formContent, this.hiddenSubmitButton ? (h(FButton, { buttonType: "submit", label: this.kupManager.language.translate(KupLanguageGeneric.CONFIRM), wrapperClass: "form__submit" })) : null));
|
|
157
159
|
}
|
|
158
160
|
renderSection(section, parent, row, visibleColumns) {
|
|
159
161
|
var _a;
|
|
@@ -198,7 +200,7 @@ export class KupForm {
|
|
|
198
200
|
});
|
|
199
201
|
}
|
|
200
202
|
const isGrid = !!section.columns;
|
|
201
|
-
const labelPlacement = ((_a = section === null || section === void 0 ? void 0 : section.label) === null || _a === void 0 ? void 0 : _a.placement) ||
|
|
203
|
+
const labelPlacement = ((_a = section === null || section === void 0 ? void 0 : section.label) === null || _a === void 0 ? void 0 : _a.placement) || this.labelPlacement;
|
|
202
204
|
const sectionClass = {
|
|
203
205
|
form__section: true,
|
|
204
206
|
'form__section--column': !isGrid && !section.horizontal,
|
|
@@ -220,7 +222,7 @@ export class KupForm {
|
|
|
220
222
|
if (isGrid) {
|
|
221
223
|
sectionStyle['grid-template-columns'] = `repeat(${section.columns}, 1fr)`;
|
|
222
224
|
}
|
|
223
|
-
return (h("div", { class: sectionClass, style: sectionStyle }, section.title ? h("h3", null, section.title) : null,
|
|
225
|
+
return (h("div", { class: sectionClass, style: sectionStyle }, section.title ? h("h3", null, section.title) : null, section.horizontal ? (sectionContent) : (h("table", null, h("tbody", null, sectionContent)))));
|
|
224
226
|
}
|
|
225
227
|
renderFormField({ formField, row, visibleColumns, }, section) {
|
|
226
228
|
var _a;
|
|
@@ -275,10 +277,12 @@ export class KupForm {
|
|
|
275
277
|
};
|
|
276
278
|
const label = formField.label || column.title;
|
|
277
279
|
resetLabel();
|
|
278
|
-
|
|
280
|
+
const labelPlacement = ((_a = section === null || section === void 0 ? void 0 : section.label) === null || _a === void 0 ? void 0 : _a.placement) || this.labelPlacement;
|
|
281
|
+
switch (labelPlacement) {
|
|
279
282
|
case KupFormLabelPlacement.BOTTOM:
|
|
280
283
|
return [h("tr", null, fieldCell()), h("tr", null, labelCell(label))];
|
|
281
284
|
case KupFormLabelPlacement.PLACEHOLDER:
|
|
285
|
+
case KupFormLabelPlacement.WATERMARK:
|
|
282
286
|
setPlaceholderLabel();
|
|
283
287
|
case KupFormLabelPlacement.HIDDEN: {
|
|
284
288
|
if (section) {
|
|
@@ -500,6 +504,32 @@ export class KupForm {
|
|
|
500
504
|
"reflect": false,
|
|
501
505
|
"defaultValue": "false"
|
|
502
506
|
},
|
|
507
|
+
"labelPlacement": {
|
|
508
|
+
"type": "string",
|
|
509
|
+
"mutable": false,
|
|
510
|
+
"complexType": {
|
|
511
|
+
"original": "KupFormLabelPlacement",
|
|
512
|
+
"resolved": "KupFormLabelPlacement.BOTTOM | KupFormLabelPlacement.HIDDEN | KupFormLabelPlacement.LEFT | KupFormLabelPlacement.PLACEHOLDER | KupFormLabelPlacement.RIGHT | KupFormLabelPlacement.TOP | KupFormLabelPlacement.WATERMARK",
|
|
513
|
+
"references": {
|
|
514
|
+
"KupFormLabelPlacement": {
|
|
515
|
+
"location": "import",
|
|
516
|
+
"path": "./kup-form-declarations"
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
},
|
|
520
|
+
"required": false,
|
|
521
|
+
"optional": false,
|
|
522
|
+
"docs": {
|
|
523
|
+
"tags": [{
|
|
524
|
+
"name": "default",
|
|
525
|
+
"text": "KupFormLabelPlacement.LEFT"
|
|
526
|
+
}],
|
|
527
|
+
"text": "Sets the label placement for 'all' fields in form"
|
|
528
|
+
},
|
|
529
|
+
"attribute": "label-placement",
|
|
530
|
+
"reflect": false,
|
|
531
|
+
"defaultValue": "KupFormLabelPlacement.LEFT"
|
|
532
|
+
},
|
|
503
533
|
"layout": {
|
|
504
534
|
"type": "unknown",
|
|
505
535
|
"mutable": false,
|
|
@@ -523,6 +553,29 @@ export class KupForm {
|
|
|
523
553
|
"text": "How the form will arrange its content."
|
|
524
554
|
},
|
|
525
555
|
"defaultValue": "null"
|
|
556
|
+
},
|
|
557
|
+
"submitCb": {
|
|
558
|
+
"type": "unknown",
|
|
559
|
+
"mutable": false,
|
|
560
|
+
"complexType": {
|
|
561
|
+
"original": "(e: SubmitEvent) => unknown",
|
|
562
|
+
"resolved": "(e: SubmitEvent) => unknown",
|
|
563
|
+
"references": {
|
|
564
|
+
"SubmitEvent": {
|
|
565
|
+
"location": "global"
|
|
566
|
+
}
|
|
567
|
+
}
|
|
568
|
+
},
|
|
569
|
+
"required": false,
|
|
570
|
+
"optional": false,
|
|
571
|
+
"docs": {
|
|
572
|
+
"tags": [{
|
|
573
|
+
"name": "default",
|
|
574
|
+
"text": "null"
|
|
575
|
+
}],
|
|
576
|
+
"text": "Sets the callback function on submit form"
|
|
577
|
+
},
|
|
578
|
+
"defaultValue": "null"
|
|
526
579
|
}
|
|
527
580
|
};
|
|
528
581
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { h } from '@stencil/core';
|
|
2
2
|
import { FButtonStyling } from './f-button-declarations';
|
|
3
3
|
import { FImage } from '../f-image/f-image';
|
|
4
|
-
const dom = document.documentElement;
|
|
5
4
|
/*-------------------------------------------------*/
|
|
6
5
|
/* C o m p o n e n t */
|
|
7
6
|
/*-------------------------------------------------*/
|
|
@@ -9,6 +9,7 @@ export var FCellEvents;
|
|
|
9
9
|
FCellEvents["CLICK"] = "kup-cell-click";
|
|
10
10
|
FCellEvents["ICON_CLICK"] = "kup-cell-iconclick";
|
|
11
11
|
FCellEvents["INPUT"] = "kup-cell-input";
|
|
12
|
+
FCellEvents["KEYUP"] = "kup-cell-keyup";
|
|
12
13
|
FCellEvents["UPDATE"] = "kup-cell-update";
|
|
13
14
|
})(FCellEvents || (FCellEvents = {}));
|
|
14
15
|
/**
|
|
@@ -128,6 +129,7 @@ export const editableTypes = [
|
|
|
128
129
|
FCellTypes.COLOR_PICKER,
|
|
129
130
|
FCellTypes.COMBOBOX,
|
|
130
131
|
FCellTypes.DATE,
|
|
132
|
+
FCellTypes.LINK,
|
|
131
133
|
FCellTypes.NUMBER,
|
|
132
134
|
FCellTypes.RATING,
|
|
133
135
|
FCellTypes.STRING,
|
|
@@ -101,7 +101,7 @@ export const FCell = (props, children) => {
|
|
|
101
101
|
};
|
|
102
102
|
infoEl = h(FImage, Object.assign({}, fProps));
|
|
103
103
|
}
|
|
104
|
-
return (h("div", { class: classObj, "kup-get-cell-props": () => {
|
|
104
|
+
return (h("div", { onKeyUp: (e) => cellEvent(e, props, cellType, FCellEvents.KEYUP), class: classObj, "kup-get-cell-props": () => {
|
|
105
105
|
return props;
|
|
106
106
|
}, style: cell.style }, h("div", { class: "f-cell__content", style: cell.styleContent, title: cellTitle }, children && children.length > 0
|
|
107
107
|
? children
|
|
@@ -221,6 +221,7 @@ function setEditableCell(cellType, classObj, cell, column, props) {
|
|
|
221
221
|
return (h("kup-time-picker", Object.assign({ key: column.name + props.row.id, initialValue: cell.value }, cell.data, { class: isFullWidth(props) ? 'kup-full-width' : '', "onkup-timepicker-change": (e) => cellEvent(e, props, cellType, FCellEvents.UPDATE), "onkup-timepicker-input": (e) => cellEvent(e, props, cellType, FCellEvents.INPUT) })));
|
|
222
222
|
case FCellTypes.NUMBER:
|
|
223
223
|
classObj[FCellClasses.C_RIGHT_ALIGNED] = true;
|
|
224
|
+
case FCellTypes.LINK:
|
|
224
225
|
case FCellTypes.STRING:
|
|
225
226
|
return (h(FTextField, Object.assign({ inputType: cellType === FCellTypes.NUMBER ? 'number' : null, fullWidth: isFullWidth(props) ? true : false }, cell.data, { icon: cell.icon ? cell.icon : column.icon ? column.icon : null, value: cellType === FCellTypes.NUMBER
|
|
226
227
|
? stringToNumber(cell.value).toString()
|
|
@@ -385,10 +386,12 @@ function cellEvent(e, props, cellType, cellEventName) {
|
|
|
385
386
|
},
|
|
386
387
|
});
|
|
387
388
|
comp.rootElement.dispatchEvent(cellEvent);
|
|
388
|
-
|
|
389
|
-
|
|
389
|
+
if (cellEventName === FCellEvents.UPDATE) {
|
|
390
|
+
try {
|
|
391
|
+
comp.refresh();
|
|
392
|
+
}
|
|
393
|
+
catch (error) { }
|
|
390
394
|
}
|
|
391
|
-
catch (error) { }
|
|
392
395
|
}
|
|
393
396
|
}
|
|
394
397
|
function isAutoCentered(props) {
|
|
@@ -185,7 +185,8 @@ export class FiltersRows extends Filters {
|
|
|
185
185
|
isUsingGlobalFilter) {
|
|
186
186
|
for (let i = 0; i < rows.length; i++) {
|
|
187
187
|
let r = rows[i];
|
|
188
|
-
if (
|
|
188
|
+
if ((r.id && r.id.indexOf('insert_') > -1) ||
|
|
189
|
+
this.isRowCompliant(r, filters, globalFilter, isUsingGlobalFilter, columns, columnFilters)) {
|
|
189
190
|
filteredRows[filteredRows.length] = r;
|
|
190
191
|
}
|
|
191
192
|
}
|