@sme.up/ketchup 6.3.0 → 6.5.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-94cb5f35.js → f-button-4e2a0bb6.js} +3 -3
- package/dist/cjs/{f-cell-76830a0d.js → f-cell-1fc8a8b6.js} +5 -5
- package/dist/cjs/{f-chip-68d45fd3.js → f-chip-7867f17b.js} +2 -2
- package/dist/cjs/{f-image-0e71df7e.js → f-image-6b7a6168.js} +1 -1
- package/dist/cjs/{f-paginator-utils-46689c0a.js → f-paginator-utils-b7712403.js} +3 -3
- package/dist/cjs/{f-text-field-b4229cef.js → f-text-field-153e827c.js} +4 -2
- package/dist/cjs/ketchup.cjs.js +1 -1
- package/dist/cjs/kup-accordion.cjs.entry.js +2 -2
- package/dist/cjs/kup-autocomplete_25.cjs.entry.js +57 -14
- package/dist/cjs/kup-box.cjs.entry.js +30 -18
- 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 +28 -18
- package/dist/cjs/kup-family-tree.cjs.entry.js +3 -3
- package/dist/cjs/kup-form.cjs.entry.js +16 -8
- 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 +2 -2
- package/dist/cjs/kup-magic-box.cjs.entry.js +2 -2
- package/dist/cjs/{kup-manager-7c514a30.js → kup-manager-cfe2f36e.js} +39 -16
- 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 +13 -0
- package/dist/collection/assets/form.js +41 -0
- package/dist/collection/components/kup-box/kup-box.js +23 -11
- package/dist/collection/components/kup-button/kup-button-declarations.js +1 -0
- package/dist/collection/components/kup-button/kup-button.js +27 -0
- package/dist/collection/components/kup-card/kup-card.css +20 -0
- package/dist/collection/components/kup-card/standard/kup-card-standard.js +28 -0
- package/dist/collection/components/kup-data-table/kup-data-table.js +3 -1
- package/dist/collection/components/kup-echart/kup-echart.js +27 -17
- package/dist/collection/components/kup-form/kup-form-declarations.js +1 -0
- package/dist/collection/components/kup-form/kup-form.css +8 -0
- package/dist/collection/components/kup-form/kup-form.js +31 -2
- package/dist/collection/components/kup-image/assets/svg/azure.svg +1 -0
- package/dist/collection/components/kup-lazy/kup-lazy.css +8 -2
- package/dist/collection/components/kup-progress-bar/kup-progress-bar.css +1 -0
- package/dist/collection/components/kup-text-field/kup-text-field-declarations.js +1 -0
- package/dist/collection/components/kup-text-field/kup-text-field.js +27 -0
- package/dist/collection/f-components/f-button/f-button.js +2 -2
- package/dist/collection/f-components/f-cell/f-cell.js +1 -1
- package/dist/collection/f-components/f-text-field/f-text-field.js +3 -1
- package/dist/collection/managers/kup-data/kup-data-cell-helper.js +7 -6
- package/dist/collection/managers/kup-data/kup-data.js +7 -9
- package/dist/collection/managers/kup-dates/kup-dates.js +14 -0
- package/dist/collection/managers/kup-objects/kup-objects.js +11 -1
- package/dist/collection/utils/filters/filters-rows.js +1 -1
- package/dist/collection/utils/filters/filters-tree-items.js +3 -3
- package/dist/esm/{f-button-cd948e50.js → f-button-a24e43dd.js} +3 -3
- package/dist/esm/{f-cell-474dd282.js → f-cell-ebbb0c06.js} +5 -5
- package/dist/esm/{f-chip-d6f2eb94.js → f-chip-e2c38ba8.js} +2 -2
- package/dist/esm/{f-image-914a03ef.js → f-image-7e02e88f.js} +1 -1
- package/dist/esm/{f-paginator-utils-a4a52732.js → f-paginator-utils-e6d2638f.js} +3 -3
- package/dist/esm/{f-text-field-76341fe3.js → f-text-field-8438a278.js} +4 -2
- package/dist/esm/ketchup.js +1 -1
- package/dist/esm/kup-accordion.entry.js +2 -2
- package/dist/esm/kup-autocomplete_25.entry.js +57 -14
- package/dist/esm/kup-box.entry.js +30 -18
- 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 +28 -18
- package/dist/esm/kup-family-tree.entry.js +3 -3
- package/dist/esm/kup-form.entry.js +16 -8
- 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 +2 -2
- package/dist/esm/kup-magic-box.entry.js +2 -2
- package/dist/esm/{kup-manager-86f440c7.js → kup-manager-7c27e90e.js} +40 -17
- 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/assets/svg/azure.svg +1 -0
- package/dist/ketchup/ketchup.esm.js +1 -1
- package/dist/ketchup/{p-cd4fc3fb.js → p-1468bf09.js} +1 -1
- package/dist/ketchup/{p-d2f51e7b.entry.js → p-191096ff.entry.js} +1 -1
- package/dist/ketchup/{p-77aff9c1.entry.js → p-2003a841.entry.js} +1 -1
- package/dist/ketchup/{p-e60a1170.entry.js → p-23111c8d.entry.js} +1 -1
- package/dist/ketchup/{p-bc306a53.entry.js → p-25875aa1.entry.js} +1 -1
- package/dist/ketchup/p-26acb448.js +1 -0
- package/dist/ketchup/{p-cee76b14.entry.js → p-2f009c42.entry.js} +1 -1
- package/dist/ketchup/{p-2f4e6c50.entry.js → p-3138cabb.entry.js} +1 -1
- package/dist/ketchup/{p-8673bd4e.js → p-3decc8e4.js} +1 -1
- package/dist/ketchup/{p-8b55b786.entry.js → p-45415b72.entry.js} +1 -1
- package/dist/ketchup/{p-066f344a.entry.js → p-52590a90.entry.js} +1 -1
- package/dist/ketchup/{p-95f5834b.entry.js → p-5a703573.entry.js} +1 -1
- package/dist/ketchup/{p-c3783b77.entry.js → p-601a50db.entry.js} +1 -1
- package/dist/ketchup/{p-0c6e0647.entry.js → p-69dd11da.entry.js} +1 -1
- package/dist/ketchup/p-753c82d8.js +1 -0
- package/dist/ketchup/p-77600efd.entry.js +9 -0
- package/dist/ketchup/p-88722265.js +1 -0
- package/dist/ketchup/{p-21ea11cb.js → p-9027e5ac.js} +2 -2
- package/dist/ketchup/{p-389fd0bf.js → p-92595296.js} +1 -1
- package/dist/ketchup/{p-151f7c17.entry.js → p-97f28bbd.entry.js} +1 -1
- package/dist/ketchup/{p-b3b65a61.entry.js → p-a782ebd1.entry.js} +1 -1
- package/dist/ketchup/p-aa564df8.entry.js +1 -0
- package/dist/ketchup/p-b131b257.entry.js +1 -0
- package/dist/ketchup/{p-1e9c03b0.entry.js → p-b238f9ea.entry.js} +1 -1
- package/dist/ketchup/{p-359fd90d.entry.js → p-b4f85d34.entry.js} +1 -1
- package/dist/ketchup/{p-df8e6a4d.entry.js → p-b502b91b.entry.js} +1 -1
- package/dist/ketchup/{p-e9a1ba04.entry.js → p-ca98059c.entry.js} +1 -1
- package/dist/ketchup/{p-7cfdf53c.entry.js → p-cc663bad.entry.js} +2 -2
- package/dist/ketchup/{p-cfaea29b.entry.js → p-e0ed3fd7.entry.js} +1 -1
- package/dist/types/components/kup-box/kup-box-declarations.d.ts +1 -0
- package/dist/types/components/kup-button/kup-button-declarations.d.ts +1 -0
- package/dist/types/components/kup-button/kup-button.d.ts +5 -0
- package/dist/types/components/kup-card/kup-card-declarations.d.ts +1 -0
- package/dist/types/components/kup-card/standard/kup-card-standard.d.ts +6 -0
- package/dist/types/components/kup-form/kup-form-declarations.d.ts +1 -0
- package/dist/types/components/kup-form/kup-form.d.ts +5 -0
- package/dist/types/components/kup-text-field/kup-text-field-declarations.d.ts +1 -0
- package/dist/types/components/kup-text-field/kup-text-field.d.ts +5 -0
- package/dist/types/components.d.ts +30 -0
- package/dist/types/f-components/f-button/f-button-declarations.d.ts +1 -0
- package/dist/types/f-components/f-text-field/f-text-field-declarations.d.ts +1 -0
- package/dist/types/managers/kup-data/kup-data-cell-helper.d.ts +2 -2
- package/dist/types/managers/kup-data/kup-data.d.ts +1 -0
- package/dist/types/managers/kup-objects/kup-objects.d.ts +6 -0
- package/dist/types/utils/filters/filters-tree-items.d.ts +1 -1
- package/package.json +1 -1
- package/dist/ketchup/p-00e1133d.entry.js +0 -9
- package/dist/ketchup/p-3586f59c.js +0 -1
- package/dist/ketchup/p-853a5178.entry.js +0 -1
- package/dist/ketchup/p-a2c595c4.js +0 -1
- package/dist/ketchup/p-ae91f27e.entry.js +0 -1
- package/dist/ketchup/p-af664379.js +0 -1
|
@@ -427,7 +427,48 @@ const layoutData = {
|
|
|
427
427
|
],
|
|
428
428
|
};
|
|
429
429
|
|
|
430
|
+
const dataAutocomplete = {
|
|
431
|
+
columns: [
|
|
432
|
+
{
|
|
433
|
+
name: 'ACC',
|
|
434
|
+
title: 'Username',
|
|
435
|
+
},
|
|
436
|
+
{
|
|
437
|
+
name: 'DES',
|
|
438
|
+
title: 'Password',
|
|
439
|
+
},
|
|
440
|
+
],
|
|
441
|
+
rows: [
|
|
442
|
+
{
|
|
443
|
+
cells: {
|
|
444
|
+
ACC: {
|
|
445
|
+
value: '',
|
|
446
|
+
isEditable: true,
|
|
447
|
+
data: {
|
|
448
|
+
label: 'Username',
|
|
449
|
+
name: 'something',
|
|
450
|
+
outlined: true,
|
|
451
|
+
},
|
|
452
|
+
},
|
|
453
|
+
DES: {
|
|
454
|
+
value: '',
|
|
455
|
+
isEditable: true,
|
|
456
|
+
data: {
|
|
457
|
+
inputType: 'password',
|
|
458
|
+
label: 'Password',
|
|
459
|
+
name: 'something-else',
|
|
460
|
+
outlined: true,
|
|
461
|
+
},
|
|
462
|
+
},
|
|
463
|
+
},
|
|
464
|
+
id: '0',
|
|
465
|
+
},
|
|
466
|
+
],
|
|
467
|
+
};
|
|
468
|
+
|
|
430
469
|
const form = document.getElementById('form');
|
|
431
470
|
form.data = data;
|
|
432
471
|
const formWithLayout = document.getElementById('form-with-layout');
|
|
433
472
|
formWithLayout.data = layoutData;
|
|
473
|
+
const formWithAutocomplete = document.getElementById('form-with-autocomplete');
|
|
474
|
+
formWithAutocomplete.data = dataAutocomplete;
|
|
@@ -579,16 +579,25 @@ export class KupBox {
|
|
|
579
579
|
// render methods
|
|
580
580
|
renderSectionAsCard(row) {
|
|
581
581
|
let skipPush = false;
|
|
582
|
-
|
|
582
|
+
const cardData = {
|
|
583
583
|
button: [],
|
|
584
|
+
cell: [],
|
|
585
|
+
columns: [],
|
|
584
586
|
image: [],
|
|
585
587
|
progressbar: [],
|
|
586
588
|
text: [],
|
|
587
589
|
};
|
|
590
|
+
for (let index = 0; index < this.data.columns.length; index++) {
|
|
591
|
+
const column = this.data.columns[index];
|
|
592
|
+
if (column.visible !== false) {
|
|
593
|
+
cardData.cell.push(row.cells[column.name]);
|
|
594
|
+
cardData.columns.push(column);
|
|
595
|
+
}
|
|
596
|
+
}
|
|
588
597
|
//First cycle sets specific binds between cardIDs and cells
|
|
589
|
-
for (
|
|
598
|
+
for (const key in row.cells) {
|
|
590
599
|
if (row.cells.hasOwnProperty(key)) {
|
|
591
|
-
|
|
600
|
+
const cell = row.cells[key];
|
|
592
601
|
if (cell.cardID !== undefined) {
|
|
593
602
|
switch (cell.obj.p) {
|
|
594
603
|
case 'BTN':
|
|
@@ -626,16 +635,16 @@ export class KupBox {
|
|
|
626
635
|
}
|
|
627
636
|
}
|
|
628
637
|
//Second cycle sets leftover binds automatically
|
|
629
|
-
for (
|
|
638
|
+
for (const key in row.cells) {
|
|
630
639
|
if (row.cells.hasOwnProperty(key)) {
|
|
631
|
-
|
|
640
|
+
const cell = row.cells[key];
|
|
632
641
|
if (cell.cardID === undefined) {
|
|
633
642
|
skipPush = false;
|
|
634
643
|
switch (cell.obj.p) {
|
|
635
644
|
case 'BTN':
|
|
636
645
|
for (let index = 0; index < cardData.button.length; index++) {
|
|
637
646
|
//If there are empty elements, the first one will be used
|
|
638
|
-
if (cardData.button[index]
|
|
647
|
+
if (!Object.keys(cardData.button[index]).length) {
|
|
639
648
|
cardData.button[index] = {
|
|
640
649
|
label: cell.value,
|
|
641
650
|
};
|
|
@@ -653,7 +662,7 @@ export class KupBox {
|
|
|
653
662
|
case 'IMG':
|
|
654
663
|
for (let index = 0; index < cardData.image.length; index++) {
|
|
655
664
|
//If there are empty elements, the first one will be used
|
|
656
|
-
if (cardData.image[index]
|
|
665
|
+
if (!Object.keys(cardData.image[index]).length) {
|
|
657
666
|
cardData.image[index] = {
|
|
658
667
|
resource: cell.value,
|
|
659
668
|
};
|
|
@@ -671,7 +680,8 @@ export class KupBox {
|
|
|
671
680
|
case 'PGB':
|
|
672
681
|
for (let index = 0; index < cardData.progressbar.length; index++) {
|
|
673
682
|
//If there are empty elements, the first one will be used
|
|
674
|
-
if (cardData.progressbar[index]
|
|
683
|
+
if (!Object.keys(cardData.progressbar[index])
|
|
684
|
+
.length) {
|
|
675
685
|
cardData.progressbar[index] = {
|
|
676
686
|
value: cell.value,
|
|
677
687
|
};
|
|
@@ -1018,9 +1028,11 @@ export class KupBox {
|
|
|
1018
1028
|
return {
|
|
1019
1029
|
jsx: kanbanJSX,
|
|
1020
1030
|
style: {
|
|
1021
|
-
'grid-template-columns': this.kanban.
|
|
1022
|
-
?
|
|
1023
|
-
:
|
|
1031
|
+
'grid-template-columns': this.kanban.isStacked
|
|
1032
|
+
? 'repeat(1fr)'
|
|
1033
|
+
: this.kanban.size
|
|
1034
|
+
? `repeat(${Object.keys(kanbanSections).length}, ${this.kanban.size})`
|
|
1035
|
+
: `repeat(${Object.keys(kanbanSections).length}, 1fr)`,
|
|
1024
1036
|
},
|
|
1025
1037
|
};
|
|
1026
1038
|
}
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
export var KupButtonProps;
|
|
6
6
|
(function (KupButtonProps) {
|
|
7
|
+
KupButtonProps["buttonType"] = "Sets the type of the button.";
|
|
7
8
|
KupButtonProps["checked"] = "When set to true, the icon button state will be on.";
|
|
8
9
|
KupButtonProps["customStyle"] = "Custom style of the component.";
|
|
9
10
|
KupButtonProps["disabled"] = "Defaults at false. When set to true, the component is disabled.";
|
|
@@ -19,6 +19,11 @@ export class KupButton {
|
|
|
19
19
|
/*-------------------------------------------------*/
|
|
20
20
|
/* P r o p s */
|
|
21
21
|
/*-------------------------------------------------*/
|
|
22
|
+
/**
|
|
23
|
+
* Sets the type of the button.
|
|
24
|
+
* @default null
|
|
25
|
+
*/
|
|
26
|
+
this.buttonType = null;
|
|
22
27
|
/**
|
|
23
28
|
* When set to true, the icon button state will be on.
|
|
24
29
|
* @default false
|
|
@@ -165,6 +170,7 @@ export class KupButton {
|
|
|
165
170
|
}
|
|
166
171
|
render() {
|
|
167
172
|
const props = {
|
|
173
|
+
buttonType: this.buttonType,
|
|
168
174
|
checked: this.checked,
|
|
169
175
|
danger: this.rootElement.classList.contains('kup-danger')
|
|
170
176
|
? true
|
|
@@ -233,6 +239,27 @@ export class KupButton {
|
|
|
233
239
|
"$": ["kup-button.css"]
|
|
234
240
|
}; }
|
|
235
241
|
static get properties() { return {
|
|
242
|
+
"buttonType": {
|
|
243
|
+
"type": "string",
|
|
244
|
+
"mutable": false,
|
|
245
|
+
"complexType": {
|
|
246
|
+
"original": "string",
|
|
247
|
+
"resolved": "string",
|
|
248
|
+
"references": {}
|
|
249
|
+
},
|
|
250
|
+
"required": false,
|
|
251
|
+
"optional": false,
|
|
252
|
+
"docs": {
|
|
253
|
+
"tags": [{
|
|
254
|
+
"name": "default",
|
|
255
|
+
"text": "null"
|
|
256
|
+
}],
|
|
257
|
+
"text": "Sets the type of the button."
|
|
258
|
+
},
|
|
259
|
+
"attribute": "button-type",
|
|
260
|
+
"reflect": false,
|
|
261
|
+
"defaultValue": "null"
|
|
262
|
+
},
|
|
236
263
|
"checked": {
|
|
237
264
|
"type": "boolean",
|
|
238
265
|
"mutable": true,
|
|
@@ -2499,6 +2499,26 @@
|
|
|
2499
2499
|
margin: 0 0 0.5em 0;
|
|
2500
2500
|
}
|
|
2501
2501
|
|
|
2502
|
+
.standard-layout-16 {
|
|
2503
|
+
background-color: var(--kup-background-color);
|
|
2504
|
+
border-radius: 4px;
|
|
2505
|
+
box-shadow: 0 2px 1px -1px rgba(128, 128, 128, 0.1), 0 1px 1px 0 rgba(128, 128, 128, 0.1), 0 1px 3px 0 rgba(128, 128, 128, 0.6);
|
|
2506
|
+
color: var(--kup-text-color);
|
|
2507
|
+
font-size: var(--kup-font-size);
|
|
2508
|
+
padding: 0.5em;
|
|
2509
|
+
}
|
|
2510
|
+
.standard-layout-16 > table {
|
|
2511
|
+
width: 100%;
|
|
2512
|
+
}
|
|
2513
|
+
.standard-layout-16 .label {
|
|
2514
|
+
padding: 0.5em;
|
|
2515
|
+
vertical-align: top;
|
|
2516
|
+
}
|
|
2517
|
+
.standard-layout-16 .value {
|
|
2518
|
+
padding: 0.5em;
|
|
2519
|
+
font-weight: bold;
|
|
2520
|
+
}
|
|
2521
|
+
|
|
2502
2522
|
/**
|
|
2503
2523
|
* @prop --kup-card-ripple-color: Sets color of ripple effect (for Material layouts).
|
|
2504
2524
|
*/
|
|
@@ -6,6 +6,8 @@ import { FChipType } from '../../../f-components/f-chip/f-chip-declarations';
|
|
|
6
6
|
import { KupCardCSSClasses, KupCardIds } from '../kup-card-declarations';
|
|
7
7
|
import { KupColumnMenuIds } from '../../../utils/kup-column-menu/kup-column-menu-declarations';
|
|
8
8
|
import { KupThemeColorValues } from '../../../managers/kup-theme/kup-theme-declarations';
|
|
9
|
+
import { FCell } from '../../../f-components/f-cell/f-cell';
|
|
10
|
+
import { FCellPadding, } from '../../../f-components/f-cell/f-cell-declarations';
|
|
9
11
|
const dom = document.documentElement;
|
|
10
12
|
/**
|
|
11
13
|
* 1st standard card layout, inspired by Material Design.
|
|
@@ -771,3 +773,29 @@ export function create15(component) {
|
|
|
771
773
|
compList(genericButtons.slice(0, 5), 'button'),
|
|
772
774
|
h("kup-button", { title: dom.ketchup.language.translate(KupLanguageGeneric.SHOW_ROW_OPTIONS), id: "view-selector", icon: "menu" }))) : null));
|
|
773
775
|
}
|
|
776
|
+
/**
|
|
777
|
+
* 16th standard card layout, it can be used as a key-value grid list.
|
|
778
|
+
* @param {KupCard} component - Card component.
|
|
779
|
+
* @returns {VNode} 16th standard layout virtual node.
|
|
780
|
+
*/
|
|
781
|
+
export function create16(component) {
|
|
782
|
+
const rows = [];
|
|
783
|
+
for (let index = 0; index < component.data.cell.length; index++) {
|
|
784
|
+
const cell = component.data.cell[index];
|
|
785
|
+
const column = component.data.columns[index];
|
|
786
|
+
const props = {
|
|
787
|
+
cell: cell,
|
|
788
|
+
column: column,
|
|
789
|
+
component: component,
|
|
790
|
+
density: FCellPadding.NONE,
|
|
791
|
+
renderKup: true,
|
|
792
|
+
row: { cells: { [column.name]: cell } },
|
|
793
|
+
};
|
|
794
|
+
rows.push(h("tr", null,
|
|
795
|
+
h("td", { class: "label" }, column.title),
|
|
796
|
+
h("td", { class: "value" },
|
|
797
|
+
h(FCell, Object.assign({}, props)))));
|
|
798
|
+
}
|
|
799
|
+
return (h("div", { class: `standard-layout-${component.layoutNumber}` },
|
|
800
|
+
h("table", null, rows)));
|
|
801
|
+
}
|
|
@@ -3350,7 +3350,9 @@ export class KupDataTable {
|
|
|
3350
3350
|
});
|
|
3351
3351
|
}
|
|
3352
3352
|
else {
|
|
3353
|
-
this.kupManager.debug.logMessage(this,
|
|
3353
|
+
this.kupManager.debug.logMessage(this, 'Grouped for a non-existent column! (' +
|
|
3354
|
+
group.column +
|
|
3355
|
+
')', KupDebugCategory.WARNING);
|
|
3354
3356
|
}
|
|
3355
3357
|
}
|
|
3356
3358
|
if (chipsData.length > 0) {
|
|
@@ -881,19 +881,21 @@ _KupEchart_chartContainer = new WeakMap(), _KupEchart_chartEl = new WeakMap(), _
|
|
|
881
881
|
}
|
|
882
882
|
const y = {};
|
|
883
883
|
let objKey;
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
const
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
if (this.
|
|
892
|
-
this.series
|
|
893
|
-
|
|
894
|
-
|
|
884
|
+
if (this.axis) {
|
|
885
|
+
for (const row of this.data.rows) {
|
|
886
|
+
objKey = row.cells[this.axis].value;
|
|
887
|
+
y[objKey] = [];
|
|
888
|
+
for (const key of Object.keys(row.cells)) {
|
|
889
|
+
const cell = row.cells[key];
|
|
890
|
+
const value = cell.value;
|
|
891
|
+
if (!this.axis.includes(key)) {
|
|
892
|
+
if (this.series &&
|
|
893
|
+
this.series.length > 0 &&
|
|
894
|
+
!this.series.includes(key)) {
|
|
895
|
+
continue;
|
|
896
|
+
}
|
|
897
|
+
y[objKey].push(value);
|
|
895
898
|
}
|
|
896
|
-
y[objKey].push(value);
|
|
897
899
|
}
|
|
898
900
|
}
|
|
899
901
|
}
|
|
@@ -957,6 +959,12 @@ _KupEchart_chartContainer = new WeakMap(), _KupEchart_chartEl = new WeakMap(), _
|
|
|
957
959
|
'</div>');
|
|
958
960
|
}
|
|
959
961
|
};
|
|
962
|
+
let axisColumn = __classPrivateFieldGet(this, _KupEchart_kupManager, "f").data.column.find(this.data, {
|
|
963
|
+
name: this.axis,
|
|
964
|
+
});
|
|
965
|
+
let serieTitle = axisColumn && axisColumn.length > 0
|
|
966
|
+
? axisColumn[0].title
|
|
967
|
+
: 'No title';
|
|
960
968
|
const echartOption = Object.assign({ emphasis: {
|
|
961
969
|
label: {
|
|
962
970
|
show: true,
|
|
@@ -989,9 +997,7 @@ _KupEchart_chartContainer = new WeakMap(), _KupEchart_chartEl = new WeakMap(), _
|
|
|
989
997
|
padding: 4,
|
|
990
998
|
},
|
|
991
999
|
map: this.rootElement.id ? this.rootElement.id : '',
|
|
992
|
-
name:
|
|
993
|
-
name: this.axis,
|
|
994
|
-
})[0].title,
|
|
1000
|
+
name: serieTitle,
|
|
995
1001
|
roam: true,
|
|
996
1002
|
select: {
|
|
997
1003
|
itemStyle: {
|
|
@@ -1063,11 +1069,15 @@ _KupEchart_chartContainer = new WeakMap(), _KupEchart_chartEl = new WeakMap(), _
|
|
|
1063
1069
|
if (type == KupEchartTypes.GAUSSIAN) {
|
|
1064
1070
|
if (!__classPrivateFieldGet(this, _KupEchart_kupManager, "f").objects.isNumber(column.obj)) {
|
|
1065
1071
|
const newDataset = __classPrivateFieldGet(this, _KupEchart_kupManager, "f").data.distinct(this.data, [column.name]);
|
|
1066
|
-
values = __classPrivateFieldGet(this, _KupEchart_kupManager, "f").data.cell.
|
|
1072
|
+
values = __classPrivateFieldGet(this, _KupEchart_kupManager, "f").data.cell.getUnivocalValue(newDataset, column);
|
|
1067
1073
|
__classPrivateFieldGet(this, _KupEchart_gaussianDatasets, "f")[column.name] = newDataset;
|
|
1068
1074
|
}
|
|
1069
1075
|
else {
|
|
1070
|
-
values = [
|
|
1076
|
+
values = [];
|
|
1077
|
+
for (let index = 0; index < y[key].length; index++) {
|
|
1078
|
+
const element = y[key][index];
|
|
1079
|
+
values.push({ value: element });
|
|
1080
|
+
}
|
|
1071
1081
|
}
|
|
1072
1082
|
}
|
|
1073
1083
|
else {
|
|
@@ -6,6 +6,7 @@ export var KupFormProps;
|
|
|
6
6
|
(function (KupFormProps) {
|
|
7
7
|
KupFormProps["customStyle"] = "Custom style of the component.";
|
|
8
8
|
KupFormProps["data"] = "Actual data of the form.";
|
|
9
|
+
KupFormProps["hiddenSubmitButton"] = "Creates a hidden submit button in order to submit the form with enter.";
|
|
9
10
|
KupFormProps["layout"] = "How the form will arrange its content.";
|
|
10
11
|
})(KupFormProps || (KupFormProps = {}));
|
|
11
12
|
export var KupFormLabelAlignment;
|
|
@@ -27,6 +27,7 @@
|
|
|
27
27
|
display: flex;
|
|
28
28
|
flex-grow: 1;
|
|
29
29
|
overflow: auto;
|
|
30
|
+
padding: 1em 0;
|
|
30
31
|
position: relative;
|
|
31
32
|
}
|
|
32
33
|
.form--column {
|
|
@@ -94,6 +95,13 @@
|
|
|
94
95
|
.form__field img {
|
|
95
96
|
height: auto;
|
|
96
97
|
}
|
|
98
|
+
.form__submit {
|
|
99
|
+
height: 0;
|
|
100
|
+
opacity: 0;
|
|
101
|
+
overflow: hidden;
|
|
102
|
+
position: absolute;
|
|
103
|
+
width: 0;
|
|
104
|
+
}
|
|
97
105
|
.form .f-cell.c-right-aligned:not(.c-centered) .f-cell__content {
|
|
98
106
|
justify-content: flex-start;
|
|
99
107
|
}
|
|
@@ -7,6 +7,7 @@ import { componentWrapperId } from '../../variables/GenericVariables';
|
|
|
7
7
|
import { FCell } from '../../f-components/f-cell/f-cell';
|
|
8
8
|
import { FCellTypes, } from '../../f-components/f-cell/f-cell-declarations';
|
|
9
9
|
import { FTextFieldMDC } from '../../f-components/f-text-field/f-text-field-mdc';
|
|
10
|
+
import { FButton } from '../../f-components/f-button/f-button';
|
|
10
11
|
const dom = document.documentElement;
|
|
11
12
|
export class KupForm {
|
|
12
13
|
constructor() {
|
|
@@ -24,6 +25,11 @@ export class KupForm {
|
|
|
24
25
|
* @default null
|
|
25
26
|
*/
|
|
26
27
|
this.data = null;
|
|
28
|
+
/**
|
|
29
|
+
* Creates a hidden submit button in order to submit the form with enter.
|
|
30
|
+
* @default false
|
|
31
|
+
*/
|
|
32
|
+
this.hiddenSubmitButton = false;
|
|
27
33
|
/**
|
|
28
34
|
* How the form will arrange its content.
|
|
29
35
|
* @default null
|
|
@@ -167,7 +173,9 @@ export class KupForm {
|
|
|
167
173
|
form: true,
|
|
168
174
|
'form--column': !horizontal,
|
|
169
175
|
};
|
|
170
|
-
return h("form", { class: classObj },
|
|
176
|
+
return (h("form", { class: classObj, name: this.rootElement.id },
|
|
177
|
+
formContent,
|
|
178
|
+
this.hiddenSubmitButton ? (h(FButton, { buttonType: "submit", label: "submit", wrapperClass: "form__submit" })) : null));
|
|
171
179
|
}
|
|
172
180
|
renderSection(section, parent, row, visibleColumns) {
|
|
173
181
|
var _a;
|
|
@@ -281,7 +289,7 @@ export class KupForm {
|
|
|
281
289
|
return null;
|
|
282
290
|
}
|
|
283
291
|
const cellProps = {
|
|
284
|
-
cell:
|
|
292
|
+
cell: cell,
|
|
285
293
|
column: column,
|
|
286
294
|
component: this,
|
|
287
295
|
editable: true,
|
|
@@ -498,6 +506,27 @@ export class KupForm {
|
|
|
498
506
|
},
|
|
499
507
|
"defaultValue": "null"
|
|
500
508
|
},
|
|
509
|
+
"hiddenSubmitButton": {
|
|
510
|
+
"type": "boolean",
|
|
511
|
+
"mutable": false,
|
|
512
|
+
"complexType": {
|
|
513
|
+
"original": "boolean",
|
|
514
|
+
"resolved": "boolean",
|
|
515
|
+
"references": {}
|
|
516
|
+
},
|
|
517
|
+
"required": false,
|
|
518
|
+
"optional": false,
|
|
519
|
+
"docs": {
|
|
520
|
+
"tags": [{
|
|
521
|
+
"name": "default",
|
|
522
|
+
"text": "false"
|
|
523
|
+
}],
|
|
524
|
+
"text": "Creates a hidden submit button in order to submit the form with enter."
|
|
525
|
+
},
|
|
526
|
+
"attribute": "hidden-submit-button",
|
|
527
|
+
"reflect": false,
|
|
528
|
+
"defaultValue": "false"
|
|
529
|
+
},
|
|
501
530
|
"layout": {
|
|
502
531
|
"type": "unknown",
|
|
503
532
|
"mutable": false,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M13.05,4.24L6.56,18.05L2,18L7.09,9.24L13.05,4.24M13.75,5.33L22,19.76H6.74L16.04,18.1L11.17,12.31L13.75,5.33Z" /></svg>
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @prop --kup-lazy-animation-time: Sets the duration of the animation.
|
|
3
|
+
* @prop --kup-lazy-height: Sets the height of the component and subcomponent.
|
|
3
4
|
* @prop --kup-lazy-hor-alignment: Sets the horizontal alignment of the subcomponent.
|
|
4
5
|
* @prop --kup-lazy-placeholder-color: Sets color of the placeholder icon.
|
|
5
6
|
* @prop --kup-lazy-ver-alignment: Sets the vertical alignment of the subcomponent.
|
|
@@ -12,10 +13,11 @@
|
|
|
12
13
|
--kup-lazy-placeholder-color,
|
|
13
14
|
var(--kup-icon-color)
|
|
14
15
|
);
|
|
16
|
+
--kup_lazy_height: var(--kup-lazy-height, 100%);
|
|
15
17
|
--kup_lazy_ver_alignment: var(--kup-lazy-ver-alignment, center);
|
|
16
18
|
--kup_lazy_width: var(--kup-lazy-width, 100%);
|
|
17
19
|
display: block;
|
|
18
|
-
height:
|
|
20
|
+
height: var(--kup_lazy_height);
|
|
19
21
|
width: var(--kup_lazy_width);
|
|
20
22
|
position: relative;
|
|
21
23
|
}
|
|
@@ -24,15 +26,19 @@
|
|
|
24
26
|
align-items: var(--kup_lazy_ver_alignment);
|
|
25
27
|
display: flex;
|
|
26
28
|
justify-content: var(--kup_lazy_hor_alignment);
|
|
27
|
-
height:
|
|
29
|
+
height: var(--kup_lazy_height);
|
|
28
30
|
width: var(--kup_lazy_width);
|
|
29
31
|
}
|
|
32
|
+
#kup-component > * {
|
|
33
|
+
height: var(--kup_lazy_height);
|
|
34
|
+
}
|
|
30
35
|
#kup-component kup-data-table {
|
|
31
36
|
min-width: 100%;
|
|
32
37
|
}
|
|
33
38
|
|
|
34
39
|
.kup-loaded,
|
|
35
40
|
.kup-to-be-loaded {
|
|
41
|
+
height: var(--kup_lazy_height);
|
|
36
42
|
width: var(--kup_lazy_width);
|
|
37
43
|
}
|
|
38
44
|
|
|
@@ -14,6 +14,7 @@ export var KupTextFieldProps;
|
|
|
14
14
|
KupTextFieldProps["helperWhenFocused"] = "When set, the helper will be shown only when the field is focused.";
|
|
15
15
|
KupTextFieldProps["icon"] = "When set, the text-field will show this icon.";
|
|
16
16
|
KupTextFieldProps["initialValue"] = "Sets the initial value of the component";
|
|
17
|
+
KupTextFieldProps["inputMode"] = "The HTML inputmode of the input element. It has no effect on text areas.";
|
|
17
18
|
KupTextFieldProps["inputType"] = "The HTML type of the input element. It has no effect on text areas.";
|
|
18
19
|
KupTextFieldProps["isClearable"] = "Enables a clear trailing icon.";
|
|
19
20
|
KupTextFieldProps["label"] = "When set, its content will be shown as a label.";
|
|
@@ -70,6 +70,11 @@ export class KupTextField {
|
|
|
70
70
|
* @default ""
|
|
71
71
|
*/
|
|
72
72
|
this.initialValue = '';
|
|
73
|
+
/**
|
|
74
|
+
* The HTML inputmode of the input element.
|
|
75
|
+
* @default null
|
|
76
|
+
*/
|
|
77
|
+
this.inputMode = null;
|
|
73
78
|
/**
|
|
74
79
|
* The HTML type of the input element. It has no effect on text areas.
|
|
75
80
|
* @default "text"
|
|
@@ -309,6 +314,7 @@ export class KupTextField {
|
|
|
309
314
|
info: this.rootElement.classList.contains('kup-info')
|
|
310
315
|
? true
|
|
311
316
|
: false,
|
|
317
|
+
inputMode: this.inputMode,
|
|
312
318
|
inputType: this.inputType,
|
|
313
319
|
isClearable: this.isClearable,
|
|
314
320
|
label: this.label,
|
|
@@ -575,6 +581,27 @@ export class KupTextField {
|
|
|
575
581
|
"reflect": false,
|
|
576
582
|
"defaultValue": "''"
|
|
577
583
|
},
|
|
584
|
+
"inputMode": {
|
|
585
|
+
"type": "string",
|
|
586
|
+
"mutable": false,
|
|
587
|
+
"complexType": {
|
|
588
|
+
"original": "string",
|
|
589
|
+
"resolved": "string",
|
|
590
|
+
"references": {}
|
|
591
|
+
},
|
|
592
|
+
"required": false,
|
|
593
|
+
"optional": false,
|
|
594
|
+
"docs": {
|
|
595
|
+
"tags": [{
|
|
596
|
+
"name": "default",
|
|
597
|
+
"text": "null"
|
|
598
|
+
}],
|
|
599
|
+
"text": "The HTML inputmode of the input element."
|
|
600
|
+
},
|
|
601
|
+
"attribute": "input-mode",
|
|
602
|
+
"reflect": false,
|
|
603
|
+
"defaultValue": "null"
|
|
604
|
+
},
|
|
578
605
|
"inputType": {
|
|
579
606
|
"type": "string",
|
|
580
607
|
"mutable": false,
|
|
@@ -58,7 +58,7 @@ function renderButton(props) {
|
|
|
58
58
|
const styleSpinnerContainer = {
|
|
59
59
|
'--kup_button_spinner_height': propsFImage.sizeY,
|
|
60
60
|
};
|
|
61
|
-
return (h("button", { class: classObj, disabled: props.disabled, onBlur: props.onBlur, onClick: props.onClick, onFocus: props.onFocus, style: styleSpinnerContainer, "aria-label": props.title
|
|
61
|
+
return (h("button", { type: props.buttonType ? props.buttonType : 'button', class: classObj, disabled: props.disabled, onBlur: props.onBlur, onClick: props.onClick, onFocus: props.onFocus, style: styleSpinnerContainer, "aria-label": props.title },
|
|
62
62
|
props.trailingIcon
|
|
63
63
|
? [
|
|
64
64
|
h("span", { class: classLabelObj }, props.label),
|
|
@@ -93,7 +93,7 @@ function renderIconButton(props) {
|
|
|
93
93
|
const iconOff = props.iconOff
|
|
94
94
|
? props.iconOff
|
|
95
95
|
: props.icon + '_border';
|
|
96
|
-
return (h("button", { class: classObj, disabled: props.disabled, onClick: props.onClick, style: styleSpinnerContainer,
|
|
96
|
+
return (h("button", { type: props.buttonType ? props.buttonType : 'button', class: classObj, disabled: props.disabled, onClick: props.onClick, style: styleSpinnerContainer, value: props.checked ? 'on' : 'off', "aria-label": props.title },
|
|
97
97
|
!props.showSpinner || props.disabled ? (h(FImage, Object.assign({}, propsFImage, { resource: props.toggable && !props.checked ? iconOff : props.icon, wrapperClass: `icon-button__icon kup-icon` }))) : null,
|
|
98
98
|
props.toggable && !props.showSpinner ? (h(FImage, Object.assign({}, propsFImage, { resource: props.icon, wrapperClass: `icon-button__icon icon-button__icon--on kup-icon` }))) : null,
|
|
99
99
|
props.showSpinner && !props.disabled ? (h("div", { class: "icon-button__spinner-container" },
|
|
@@ -223,7 +223,7 @@ function setEditableCell(cellType, classObj, cell, column, props) {
|
|
|
223
223
|
case FCellTypes.NUMBER:
|
|
224
224
|
classObj[FCellClasses.C_RIGHT_ALIGNED] = true;
|
|
225
225
|
case FCellTypes.STRING:
|
|
226
|
-
return (h(FTextField, Object.assign({
|
|
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
|
|
227
227
|
? stringToNumber(cell.value).toString()
|
|
228
228
|
: cell.value, onChange: (e) => cellEvent(e, props, cellType, FCellEvents.UPDATE), onInput: (e) => cellEvent(e, props, cellType, FCellEvents.INPUT), onIconClick: (e) => cellEvent(e, props, cellType, FCellEvents.ICON_CLICK) })));
|
|
229
229
|
}
|
|
@@ -55,7 +55,9 @@ function setContent(props) {
|
|
|
55
55
|
props.maxLength)) : undefined,
|
|
56
56
|
!props.trailingIcon ? iconEl : undefined,
|
|
57
57
|
props.textArea ? (h("span", { class: "mdc-text-field__resizer" },
|
|
58
|
-
h("textarea", { class: "mdc-text-field__input", disabled: props.disabled, readOnly: props.readOnly, maxlength: props.maxLength, value: props.value, onBlur: props.onBlur, onClick: props.onClick, onChange: props.onChange, onFocus: props.onFocus, onInput: props.onInput, onKeyDown: props.onKeyDown }))) : (h("input", { type: props.inputType ? props.inputType : 'text', step: props.step, min: props.min, max: props.max, name: props.name, class: "mdc-text-field__input", disabled: props.disabled, readOnly: props.readOnly, placeholder: props.fullWidth
|
|
58
|
+
h("textarea", { class: "mdc-text-field__input", disabled: props.disabled, readOnly: props.readOnly, maxlength: props.maxLength, value: props.value, onBlur: props.onBlur, onClick: props.onClick, onChange: props.onChange, onFocus: props.onFocus, onInput: props.onInput, onKeyDown: props.onKeyDown }))) : (h("input", { inputmode: props.inputMode ? props.inputMode : undefined, type: props.inputType ? props.inputType : 'text', step: props.step, min: props.min, max: props.max, name: props.name, class: "mdc-text-field__input", disabled: props.disabled, readOnly: props.readOnly, placeholder: props.fullWidth && !props.outlined
|
|
59
|
+
? props.label
|
|
60
|
+
: undefined, maxlength: props.maxLength, value: props.value, onBlur: props.onBlur, onChange: (e) => {
|
|
59
61
|
if (props.decimals !== null &&
|
|
60
62
|
props.inputType === 'number') {
|
|
61
63
|
e.target.value = parseFloat(e.target.value).toFixed(props.decimals);
|
|
@@ -21,14 +21,14 @@ export function findCell(dataset, filters) {
|
|
|
21
21
|
* @param {KupDataColumn} column - Column included in the search. When missing, returns empty array.
|
|
22
22
|
* @returns {ValueDisplayedValue[]} Values of the cells, sorted.
|
|
23
23
|
*/
|
|
24
|
-
export function getCellValue(dataset, column, sorted) {
|
|
24
|
+
export function getCellValue(dataset, column, sorted, univocal) {
|
|
25
25
|
const rows = dataset.rows;
|
|
26
26
|
const values = new Array();
|
|
27
27
|
const result = new Array();
|
|
28
28
|
if (!rows || rows.length == 0 || !column) {
|
|
29
29
|
return result;
|
|
30
30
|
}
|
|
31
|
-
extractColumnValues(rows, column, values);
|
|
31
|
+
extractColumnValues(rows, column, values, univocal);
|
|
32
32
|
if (sorted == true) {
|
|
33
33
|
values.sort((n1, n2) => {
|
|
34
34
|
return compareValues(null, kupObjects.isDate(n1.obj)
|
|
@@ -44,19 +44,20 @@ export function getCellValue(dataset, column, sorted) {
|
|
|
44
44
|
}
|
|
45
45
|
return result;
|
|
46
46
|
}
|
|
47
|
-
function extractColumnValues(rows, column, values) {
|
|
47
|
+
function extractColumnValues(rows, column, values, univocal) {
|
|
48
48
|
/** il valore delle righe attualmente filtrate, formattato */
|
|
49
|
-
rows.forEach((row) => addColumnValueFromRow(values, column, row.cells[column.name]));
|
|
49
|
+
rows.forEach((row) => addColumnValueFromRow(values, column, row.cells[column.name], univocal));
|
|
50
50
|
return values;
|
|
51
51
|
}
|
|
52
|
-
export function addColumnValueFromRow(values, column, cell) {
|
|
52
|
+
export function addColumnValueFromRow(values, column, cell, univocal) {
|
|
53
53
|
if (cell) {
|
|
54
54
|
let item = {
|
|
55
55
|
value: cell.value,
|
|
56
56
|
displayedValue: getCellValueForDisplay(column, cell),
|
|
57
57
|
obj: cell.obj ? cell.obj : column.obj,
|
|
58
58
|
};
|
|
59
|
-
if (
|
|
59
|
+
if (univocal != true ||
|
|
60
|
+
!Filters.valuesArrayContainsValue(values, cell.value)) {
|
|
60
61
|
values.push(item);
|
|
61
62
|
}
|
|
62
63
|
}
|