@sme.up/ketchup 6.2.0 → 6.4.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-5b69d882.js → f-button-826a470e.js} +4 -4
- package/dist/cjs/{f-cell-3a740c48.js → f-cell-2d5bcf0c.js} +13 -15
- package/dist/cjs/{f-checkbox-57443ca3.js → f-checkbox-cd977193.js} +1 -1
- package/dist/cjs/{f-chip-02e83f82.js → f-chip-2fd3363e.js} +3 -3
- package/dist/cjs/{f-image-2a61ece2.js → f-image-0f17d599.js} +2 -2
- package/dist/cjs/{f-paginator-utils-09126bdd.js → f-paginator-utils-946b579d.js} +80 -403
- package/dist/cjs/{f-text-field-9ee20a67.js → f-text-field-d243e4d8.js} +13 -3
- package/dist/cjs/{index-06b131ea.js → index-31125378.js} +9 -4
- package/dist/cjs/ketchup.cjs.js +3 -3
- package/dist/cjs/kup-accordion.cjs.entry.js +5 -6
- package/dist/cjs/kup-autocomplete_25.cjs.entry.js +129 -115
- package/dist/cjs/kup-box.cjs.entry.js +20 -20
- package/dist/cjs/kup-calendar.cjs.entry.js +9 -11
- package/dist/cjs/kup-cell.cjs.entry.js +9 -11
- package/dist/cjs/kup-dash-list.cjs.entry.js +5 -7
- package/dist/cjs/kup-dash_2.cjs.entry.js +4 -5
- package/dist/cjs/kup-dashboard.cjs.entry.js +76 -17
- package/dist/cjs/kup-drawer.cjs.entry.js +4 -5
- package/dist/cjs/kup-echart.cjs.entry.js +42 -34
- package/dist/cjs/kup-family-tree.cjs.entry.js +140 -64
- package/dist/cjs/kup-form.cjs.entry.js +21 -15
- package/dist/cjs/kup-iframe.cjs.entry.js +4 -5
- package/dist/cjs/kup-image-list.cjs.entry.js +10 -12
- package/dist/cjs/kup-lazy.cjs.entry.js +5 -6
- package/dist/cjs/kup-magic-box.cjs.entry.js +5 -6
- package/dist/cjs/{kup-manager-02acbb37.js → kup-manager-a8eecc60.js} +1419 -375
- package/dist/cjs/kup-nav-bar.cjs.entry.js +4 -5
- package/dist/cjs/kup-numeric-picker.cjs.entry.js +3 -3
- package/dist/cjs/kup-photo-frame.cjs.entry.js +4 -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 -7
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/collection/assets/dashboard.js +48 -0
- package/dist/collection/assets/family-tree.js +236 -19
- package/dist/collection/assets/form.js +41 -0
- package/dist/collection/assets/index.js +4 -0
- package/dist/collection/assets/kupinteract.js +68 -0
- package/dist/collection/collection-manifest.json +5 -5
- package/dist/collection/components/kup-box/kup-box.js +5 -3
- 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-dashboard/kup-dashboard.css +7 -0
- package/dist/collection/components/kup-dashboard/kup-dashboard.js +67 -7
- package/dist/collection/components/kup-data-table/kup-data-table-helper.js +42 -30
- package/dist/collection/components/kup-data-table/kup-data-table.js +3 -1
- package/dist/collection/components/kup-echart/kup-echart.js +34 -24
- package/dist/collection/components/kup-family-tree/kup-family-tree-declarations.js +3 -1
- package/dist/collection/components/kup-family-tree/kup-family-tree.css +79 -9
- package/dist/collection/components/kup-family-tree/kup-family-tree.js +253 -65
- 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 +11 -1
- package/dist/collection/managers/kup-data/kup-data-cell-helper.js +49 -15
- package/dist/collection/managers/kup-data/kup-data.js +9 -11
- package/dist/collection/managers/kup-dates/kup-dates.js +14 -0
- package/dist/collection/managers/kup-interact/kup-interact.js +3 -5
- package/dist/collection/managers/kup-scroll-on-hover/kup-scroll-on-hover-declarations.js +2 -0
- package/dist/collection/managers/kup-scroll-on-hover/kup-scroll-on-hover.js +131 -45
- package/dist/collection/utils/filters/filters-rows.js +4 -23
- package/dist/collection/utils/filters/filters-tree-items.js +4 -3
- package/dist/esm/{f-button-fd44ef70.js → f-button-2d0a5f21.js} +4 -4
- package/dist/esm/{f-cell-7b159a22.js → f-cell-ee7d7b5c.js} +7 -9
- package/dist/esm/{f-checkbox-c51c4a75.js → f-checkbox-e06cf07b.js} +1 -1
- package/dist/esm/{f-chip-c2e4c522.js → f-chip-0d29f91f.js} +3 -3
- package/dist/esm/{f-image-2ab4b9aa.js → f-image-ab131d59.js} +2 -2
- package/dist/esm/{f-paginator-utils-ef537d82.js → f-paginator-utils-aa52af0f.js} +44 -366
- package/dist/esm/{f-text-field-41c575eb.js → f-text-field-0729b19f.js} +13 -3
- package/dist/esm/{index-ad6ab214.js → index-e41330a5.js} +9 -4
- package/dist/esm/ketchup.js +3 -3
- package/dist/esm/kup-accordion.entry.js +3 -4
- package/dist/esm/kup-autocomplete_25.entry.js +30 -16
- package/dist/esm/kup-box.entry.js +14 -14
- package/dist/esm/kup-calendar.entry.js +5 -7
- package/dist/esm/kup-cell.entry.js +7 -9
- package/dist/esm/kup-dash-list.entry.js +2 -4
- package/dist/esm/kup-dash_2.entry.js +2 -3
- package/dist/esm/kup-dashboard.entry.js +74 -15
- package/dist/esm/kup-drawer.entry.js +2 -3
- package/dist/esm/kup-echart.entry.js +36 -28
- package/dist/esm/kup-family-tree.entry.js +138 -62
- package/dist/esm/kup-form.entry.js +18 -12
- package/dist/esm/kup-iframe.entry.js +2 -3
- package/dist/esm/kup-image-list.entry.js +8 -10
- package/dist/esm/kup-lazy.entry.js +3 -4
- package/dist/esm/kup-magic-box.entry.js +3 -4
- package/dist/esm/{kup-manager-22a475e6.js → kup-manager-13b4f989.js} +1398 -376
- package/dist/esm/kup-nav-bar.entry.js +2 -3
- package/dist/esm/kup-numeric-picker.entry.js +3 -3
- package/dist/esm/kup-photo-frame.entry.js +2 -3
- 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 +4 -5
- package/dist/esm/loader.js +3 -3
- package/dist/ketchup/assets/svg/azure.svg +1 -0
- package/dist/ketchup/ketchup.esm.js +1 -1
- package/dist/ketchup/p-0986ad5d.js +1 -0
- package/dist/ketchup/{p-38d7584e.js → p-0cf10db0.js} +1 -1
- package/dist/ketchup/p-13666119.entry.js +27 -0
- package/dist/ketchup/p-18b68e86.entry.js +1 -0
- package/dist/ketchup/{p-1959f835.entry.js → p-28d514d0.entry.js} +1 -1
- package/dist/ketchup/p-2ffdbee1.entry.js +1 -0
- package/dist/ketchup/p-3dcfffbe.entry.js +1 -0
- package/dist/ketchup/p-3fe35411.entry.js +1 -0
- package/dist/ketchup/{p-cd5cfa7c.js → p-5552f156.js} +1 -1
- package/dist/ketchup/p-5f51009b.entry.js +1 -0
- package/dist/ketchup/{p-264b1b19.entry.js → p-816f0938.entry.js} +1 -1
- package/dist/ketchup/p-83c214d7.entry.js +1 -0
- package/dist/ketchup/p-84957bbf.entry.js +1 -0
- package/dist/ketchup/p-86795579.entry.js +1 -0
- package/dist/ketchup/p-8f85b8bb.entry.js +9 -0
- package/dist/ketchup/p-982d3e3a.entry.js +1 -0
- package/dist/ketchup/{p-e9366aaf.entry.js → p-adcfcd4f.entry.js} +4 -4
- package/dist/ketchup/p-b0b3989b.js +2 -0
- package/dist/ketchup/{p-dc62a30f.js → p-b705be3b.js} +1 -1
- package/dist/ketchup/{p-fc2b1229.js → p-b8c921ee.js} +3 -3
- package/dist/ketchup/{p-edae3076.js → p-bfe88b03.js} +1 -1
- package/dist/ketchup/p-d7091875.entry.js +1 -0
- package/dist/ketchup/p-d8656956.entry.js +1 -0
- package/dist/ketchup/p-dc69549c.entry.js +1 -0
- package/dist/ketchup/p-e01fa411.entry.js +1 -0
- package/dist/ketchup/p-e0f659c9.entry.js +1 -0
- package/dist/ketchup/p-e1d82570.entry.js +1 -0
- package/dist/ketchup/p-e21c744a.js +1 -0
- package/dist/ketchup/p-e5a9d60a.entry.js +1 -0
- package/dist/ketchup/p-f50cbed9.js +1 -0
- package/dist/ketchup/{p-42080355.entry.js → p-fa9f161a.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-dashboard/kup-dashboard.d.ts +6 -1
- package/dist/types/components/kup-family-tree/kup-family-tree-declarations.d.ts +7 -3
- package/dist/types/components/kup-family-tree/kup-family-tree.d.ts +26 -5
- 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 +69 -7
- 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 +13 -6
- package/dist/types/managers/kup-data/kup-data.d.ts +3 -1
- package/dist/types/managers/kup-scroll-on-hover/kup-scroll-on-hover-declarations.d.ts +9 -1
- package/dist/types/managers/kup-scroll-on-hover/kup-scroll-on-hover.d.ts +7 -5
- package/dist/types/utils/filters/filters-rows.d.ts +0 -2
- package/dist/types/utils/filters/filters-tree-items.d.ts +1 -1
- package/package.json +2 -2
- package/dist/cjs/cell-utils-fe64a28c.js +0 -168
- package/dist/cjs/utils-4b208b48.js +0 -447
- package/dist/esm/cell-utils-cb5d4149.js +0 -160
- package/dist/esm/utils-2c1f4122.js +0 -428
- package/dist/ketchup/p-06c6cc68.js +0 -1
- package/dist/ketchup/p-0dacd4bc.entry.js +0 -1
- package/dist/ketchup/p-1c44dc62.entry.js +0 -1
- package/dist/ketchup/p-4bc9f98b.entry.js +0 -1
- package/dist/ketchup/p-578583db.entry.js +0 -1
- package/dist/ketchup/p-5866d507.entry.js +0 -1
- package/dist/ketchup/p-61059e9d.entry.js +0 -9
- package/dist/ketchup/p-664be494.entry.js +0 -1
- package/dist/ketchup/p-67cd575d.entry.js +0 -1
- package/dist/ketchup/p-682a367a.js +0 -1
- package/dist/ketchup/p-6ccf7eb2.entry.js +0 -1
- package/dist/ketchup/p-7230ab97.entry.js +0 -1
- package/dist/ketchup/p-752b4cef.entry.js +0 -1
- package/dist/ketchup/p-7de3e7ac.entry.js +0 -1
- package/dist/ketchup/p-928c5c36.js +0 -1
- package/dist/ketchup/p-9b36497d.entry.js +0 -1
- package/dist/ketchup/p-b982d137.entry.js +0 -1
- package/dist/ketchup/p-c0219e5e.js +0 -1
- package/dist/ketchup/p-c55fd0a7.entry.js +0 -1
- package/dist/ketchup/p-d154b3a0.entry.js +0 -1
- package/dist/ketchup/p-d2affb6f.entry.js +0 -27
- package/dist/ketchup/p-d3b542b3.js +0 -2
- package/dist/ketchup/p-d6c12c6c.js +0 -1
- package/dist/ketchup/p-da0eab60.entry.js +0 -1
|
@@ -2,20 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
6
|
-
const kupManager = require('./kup-manager-
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const fImage = require('./f-image-2a61ece2.js');
|
|
11
|
-
const fChip = require('./f-chip-02e83f82.js');
|
|
5
|
+
const index = require('./index-31125378.js');
|
|
6
|
+
const kupManager = require('./kup-manager-a8eecc60.js');
|
|
7
|
+
const fPaginatorUtils = require('./f-paginator-utils-946b579d.js');
|
|
8
|
+
const fImage = require('./f-image-0f17d599.js');
|
|
9
|
+
const fChip = require('./f-chip-2fd3363e.js');
|
|
12
10
|
const GenericVariables = require('./GenericVariables-a9ed17ee.js');
|
|
13
|
-
const fCell = require('./f-cell-
|
|
11
|
+
const fCell = require('./f-cell-2d5bcf0c.js');
|
|
14
12
|
const fTextFieldMdc = require('./f-text-field-mdc-85997738.js');
|
|
15
|
-
require('./f-button-
|
|
13
|
+
require('./f-button-826a470e.js');
|
|
16
14
|
require('./f-button-declarations-b611587f.js');
|
|
17
|
-
require('./f-checkbox-
|
|
18
|
-
require('./f-text-field-
|
|
15
|
+
require('./f-checkbox-cd977193.js');
|
|
16
|
+
require('./f-text-field-d243e4d8.js');
|
|
19
17
|
require('./tslib.es6-0ee02c67.js');
|
|
20
18
|
require('./component-72a5b626.js');
|
|
21
19
|
|
|
@@ -280,7 +278,7 @@ const KupBox = class {
|
|
|
280
278
|
this.initRows();
|
|
281
279
|
}
|
|
282
280
|
onDataChanged() {
|
|
283
|
-
|
|
281
|
+
kupManager.identify(this.getRows());
|
|
284
282
|
this.initVisibleColumns();
|
|
285
283
|
this.initRows();
|
|
286
284
|
this.checkLayout();
|
|
@@ -300,7 +298,7 @@ const KupBox = class {
|
|
|
300
298
|
* @returns {Promise<GenericObject>} List of props as object, each key will be a prop.
|
|
301
299
|
*/
|
|
302
300
|
async getProps(descriptions) {
|
|
303
|
-
return
|
|
301
|
+
return kupManager.getProps(this, KupBoxProps, descriptions);
|
|
304
302
|
}
|
|
305
303
|
async loadRowActions(row, actions) {
|
|
306
304
|
row.actions = actions;
|
|
@@ -318,7 +316,7 @@ const KupBox = class {
|
|
|
318
316
|
* @param {GenericObject} props - Object containing props that will be set to the component.
|
|
319
317
|
*/
|
|
320
318
|
async setProps(props) {
|
|
321
|
-
|
|
319
|
+
kupManager.setProps(this, KupBoxProps, props);
|
|
322
320
|
}
|
|
323
321
|
/*-------------------------------------------------*/
|
|
324
322
|
/* P r i v a t e M e t h o d s */
|
|
@@ -403,7 +401,7 @@ const KupBox = class {
|
|
|
403
401
|
};
|
|
404
402
|
}
|
|
405
403
|
onSortChange(e) {
|
|
406
|
-
let column =
|
|
404
|
+
let column = kupManager.getColumnByName(this.visibleColumns, e.detail.value);
|
|
407
405
|
this.sortBy = column.name;
|
|
408
406
|
}
|
|
409
407
|
onGlobalFilterChange({ detail }) {
|
|
@@ -450,7 +448,7 @@ const KupBox = class {
|
|
|
450
448
|
if (boxObject) {
|
|
451
449
|
cell = boxObject['data-cell'];
|
|
452
450
|
row = boxObject['data-row'];
|
|
453
|
-
column =
|
|
451
|
+
column = kupManager.getColumnByName(this.visibleColumns, boxObject.dataset.column);
|
|
454
452
|
}
|
|
455
453
|
return {
|
|
456
454
|
boxObject: boxObject ? boxObject : null,
|
|
@@ -1057,9 +1055,11 @@ const KupBox = class {
|
|
|
1057
1055
|
return {
|
|
1058
1056
|
jsx: kanbanJSX,
|
|
1059
1057
|
style: {
|
|
1060
|
-
'grid-template-columns': this.kanban.
|
|
1061
|
-
?
|
|
1062
|
-
:
|
|
1058
|
+
'grid-template-columns': this.kanban.isStacked
|
|
1059
|
+
? 'repeat(1fr)'
|
|
1060
|
+
: this.kanban.size
|
|
1061
|
+
? `repeat(${Object.keys(kanbanSections).length}, ${this.kanban.size})`
|
|
1062
|
+
: `repeat(${Object.keys(kanbanSections).length}, 1fr)`,
|
|
1063
1063
|
},
|
|
1064
1064
|
};
|
|
1065
1065
|
}
|
|
@@ -1101,7 +1101,7 @@ const KupBox = class {
|
|
|
1101
1101
|
const cellEl = this.rootElement.shadowRoot.querySelector('.box-object:hover');
|
|
1102
1102
|
return {
|
|
1103
1103
|
cell: cellEl['data-cell'],
|
|
1104
|
-
column:
|
|
1104
|
+
column: kupManager.getColumnByName(this.visibleColumns, cellEl.dataset.column),
|
|
1105
1105
|
id: this.rootElement.id,
|
|
1106
1106
|
multiple: this.multiSelection,
|
|
1107
1107
|
row: cellEl['data-row'],
|
|
@@ -2,16 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-31125378.js');
|
|
6
6
|
const tslib_es6 = require('./tslib.es6-0ee02c67.js');
|
|
7
|
-
const kupManager = require('./kup-manager-
|
|
8
|
-
const cellUtils = require('./cell-utils-fe64a28c.js');
|
|
7
|
+
const kupManager = require('./kup-manager-a8eecc60.js');
|
|
9
8
|
const GenericVariables = require('./GenericVariables-a9ed17ee.js');
|
|
10
|
-
const fButton = require('./f-button-
|
|
11
|
-
const
|
|
12
|
-
const fChip = require('./f-chip-02e83f82.js');
|
|
9
|
+
const fButton = require('./f-button-826a470e.js');
|
|
10
|
+
const fChip = require('./f-chip-2fd3363e.js');
|
|
13
11
|
require('./f-button-declarations-b611587f.js');
|
|
14
|
-
require('./f-image-
|
|
12
|
+
require('./f-image-0f17d599.js');
|
|
15
13
|
|
|
16
14
|
var n,l,u$1,t,o,r$1,f$1,e$1={},c$1=[],s=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function a$1(n,l){for(var u in l)n[u]=l[u];return n}function h(n){var l=n.parentNode;l&&l.removeChild(n);}function v$1(l,u,i){var t,o,r,f={};for(r in u)"key"==r?t=u[r]:"ref"==r?o=u[r]:f[r]=u[r];if(arguments.length>2&&(f.children=arguments.length>3?n.call(arguments,2):i),"function"==typeof l&&null!=l.defaultProps)for(r in l.defaultProps)void 0===f[r]&&(f[r]=l.defaultProps[r]);return y(l,f,t,o,null)}function y(n,i,t,o,r){var f={type:n,props:i,key:t,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==r?++u$1:r};return null==r&&null!=l.vnode&&l.vnode(f),f}function p(){return {current:null}}function d(n){return n.children}function _(n,l){this.props=n,this.context=l;}function k(n,l){if(null==l)return n.__?k(n.__,n.__.__k.indexOf(n)+1):null;for(var u;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e)return u.__e;return "function"==typeof n.type?k(n):null}function b$1(n){var l,u;if(null!=(n=n.__)&&null!=n.__c){for(n.__e=n.__c.base=null,l=0;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e){n.__e=n.__c.base=u.__e;break}return b$1(n)}}function m(n){(!n.__d&&(n.__d=!0)&&t.push(n)&&!g$1.__r++||r$1!==l.debounceRendering)&&((r$1=l.debounceRendering)||o)(g$1);}function g$1(){for(var n;g$1.__r=t.length;)n=t.sort(function(n,l){return n.__v.__b-l.__v.__b}),t=[],n.some(function(n){var l,u,i,t,o,r;n.__d&&(o=(t=(l=n).__v).__e,(r=l.__P)&&(u=[],(i=a$1({},t)).__v=t.__v+1,j$2(r,t,i,l.__n,void 0!==r.ownerSVGElement,null!=t.__h?[o]:null,u,null==o?k(t):o,t.__h),z$1(u,t),t.__e!=o&&b$1(t)));});}function w$1(n,l,u,i,t,o,r,f,s,a){var h,v,p,_,b,m,g,w=i&&i.__k||c$1,A=w.length;for(u.__k=[],h=0;h<l.length;h++)if(null!=(_=u.__k[h]=null==(_=l[h])||"boolean"==typeof _?null:"string"==typeof _||"number"==typeof _||"bigint"==typeof _?y(null,_,null,null,_):Array.isArray(_)?y(d,{children:_},null,null,null):_.__b>0?y(_.type,_.props,_.key,null,_.__v):_)){if(_.__=u,_.__b=u.__b+1,null===(p=w[h])||p&&_.key==p.key&&_.type===p.type)w[h]=void 0;else for(v=0;v<A;v++){if((p=w[v])&&_.key==p.key&&_.type===p.type){w[v]=void 0;break}p=null;}j$2(n,_,p=p||e$1,t,o,r,f,s,a),b=_.__e,(v=_.ref)&&p.ref!=v&&(g||(g=[]),p.ref&&g.push(p.ref,null,_),g.push(v,_.__c||b,_)),null!=b?(null==m&&(m=b),"function"==typeof _.type&&_.__k===p.__k?_.__d=s=x$1(_,s,n):s=P$1(n,_,p,w,b,s),"function"==typeof u.type&&(u.__d=s)):s&&p.__e==s&&s.parentNode!=n&&(s=k(p));}for(u.__e=m,h=A;h--;)null!=w[h]&&("function"==typeof u.type&&null!=w[h].__e&&w[h].__e==u.__d&&(u.__d=k(i,h+1)),N(w[h],w[h]));if(g)for(h=0;h<g.length;h++)M$1(g[h],g[++h],g[++h]);}function x$1(n,l,u){for(var i,t=n.__k,o=0;t&&o<t.length;o++)(i=t[o])&&(i.__=n,l="function"==typeof i.type?x$1(i,l,u):P$1(u,i,i,t,i.__e,l));return l}function A$1(n,l){return l=l||[],null==n||"boolean"==typeof n||(Array.isArray(n)?n.some(function(n){A$1(n,l);}):l.push(n)),l}function P$1(n,l,u,i,t,o){var r,f,e;if(void 0!==l.__d)r=l.__d,l.__d=void 0;else if(null==u||t!=o||null==t.parentNode)n:if(null==o||o.parentNode!==n)n.appendChild(t),r=null;else {for(f=o,e=0;(f=f.nextSibling)&&e<i.length;e+=2)if(f==t)break n;n.insertBefore(t,o),r=o;}return void 0!==r?r:t.nextSibling}function C$1(n,l,u,i,t){var o;for(o in u)"children"===o||"key"===o||o in l||H$1(n,o,null,u[o],i);for(o in l)t&&"function"!=typeof l[o]||"children"===o||"key"===o||"value"===o||"checked"===o||u[o]===l[o]||H$1(n,o,l[o],u[o],i);}function $(n,l,u){"-"===l[0]?n.setProperty(l,u):n[l]=null==u?"":"number"!=typeof u||s.test(l)?u:u+"px";}function H$1(n,l,u,i,t){var o;n:if("style"===l)if("string"==typeof u)n.style.cssText=u;else {if("string"==typeof i&&(n.style.cssText=i=""),i)for(l in i)u&&l in u||$(n.style,l,"");if(u)for(l in u)i&&u[l]===i[l]||$(n.style,l,u[l]);}else if("o"===l[0]&&"n"===l[1])o=l!==(l=l.replace(/Capture$/,"")),l=l.toLowerCase()in n?l.toLowerCase().slice(2):l.slice(2),n.l||(n.l={}),n.l[l+o]=u,u?i||n.addEventListener(l,o?T$1:I$1,o):n.removeEventListener(l,o?T$1:I$1,o);else if("dangerouslySetInnerHTML"!==l){if(t)l=l.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("href"!==l&&"list"!==l&&"form"!==l&&"tabIndex"!==l&&"download"!==l&&l in n)try{n[l]=null==u?"":u;break n}catch(n){}"function"==typeof u||(null!=u&&(!1!==u||"a"===l[0]&&"r"===l[1])?n.setAttribute(l,u):n.removeAttribute(l));}}function I$1(n){this.l[n.type+!1](l.event?l.event(n):n);}function T$1(n){this.l[n.type+!0](l.event?l.event(n):n);}function j$2(n,u,i,t,o,r,f,e,c){var s,h,v,y,p,k,b,m,g,x,A,P=u.type;if(void 0!==u.constructor)return null;null!=i.__h&&(c=i.__h,e=u.__e=i.__e,u.__h=null,r=[e]),(s=l.__b)&&s(u);try{n:if("function"==typeof P){if(m=u.props,g=(s=P.contextType)&&t[s.__c],x=s?g?g.props.value:s.__:t,i.__c?b=(h=u.__c=i.__c).__=h.__E:("prototype"in P&&P.prototype.render?u.__c=h=new P(m,x):(u.__c=h=new _(m,x),h.constructor=P,h.render=O$1),g&&g.sub(h),h.props=m,h.state||(h.state={}),h.context=x,h.__n=t,v=h.__d=!0,h.__h=[]),null==h.__s&&(h.__s=h.state),null!=P.getDerivedStateFromProps&&(h.__s==h.state&&(h.__s=a$1({},h.__s)),a$1(h.__s,P.getDerivedStateFromProps(m,h.__s))),y=h.props,p=h.state,v)null==P.getDerivedStateFromProps&&null!=h.componentWillMount&&h.componentWillMount(),null!=h.componentDidMount&&h.__h.push(h.componentDidMount);else {if(null==P.getDerivedStateFromProps&&m!==y&&null!=h.componentWillReceiveProps&&h.componentWillReceiveProps(m,x),!h.__e&&null!=h.shouldComponentUpdate&&!1===h.shouldComponentUpdate(m,h.__s,x)||u.__v===i.__v){h.props=m,h.state=h.__s,u.__v!==i.__v&&(h.__d=!1),h.__v=u,u.__e=i.__e,u.__k=i.__k,u.__k.forEach(function(n){n&&(n.__=u);}),h.__h.length&&f.push(h);break n}null!=h.componentWillUpdate&&h.componentWillUpdate(m,h.__s,x),null!=h.componentDidUpdate&&h.__h.push(function(){h.componentDidUpdate(y,p,k);});}h.context=x,h.props=m,h.state=h.__s,(s=l.__r)&&s(u),h.__d=!1,h.__v=u,h.__P=n,s=h.render(h.props,h.state,h.context),h.state=h.__s,null!=h.getChildContext&&(t=a$1(a$1({},t),h.getChildContext())),v||null==h.getSnapshotBeforeUpdate||(k=h.getSnapshotBeforeUpdate(y,p)),A=null!=s&&s.type===d&&null==s.key?s.props.children:s,w$1(n,Array.isArray(A)?A:[A],u,i,t,o,r,f,e,c),h.base=u.__e,u.__h=null,h.__h.length&&f.push(h),b&&(h.__E=h.__=null),h.__e=!1;}else null==r&&u.__v===i.__v?(u.__k=i.__k,u.__e=i.__e):u.__e=L$1(i.__e,u,i,t,o,r,f,c);(s=l.diffed)&&s(u);}catch(n){u.__v=null,(c||null!=r)&&(u.__e=e,u.__h=!!c,r[r.indexOf(e)]=null),l.__e(n,u,i);}}function z$1(n,u){l.__c&&l.__c(u,n),n.some(function(u){try{n=u.__h,u.__h=[],n.some(function(n){n.call(u);});}catch(n){l.__e(n,u.__v);}});}function L$1(l,u,i,t,o,r,f,c){var s,a,v,y=i.props,p=u.props,d=u.type,_=0;if("svg"===d&&(o=!0),null!=r)for(;_<r.length;_++)if((s=r[_])&&"setAttribute"in s==!!d&&(d?s.localName===d:3===s.nodeType)){l=s,r[_]=null;break}if(null==l){if(null===d)return document.createTextNode(p);l=o?document.createElementNS("http://www.w3.org/2000/svg",d):document.createElement(d,p.is&&p),r=null,c=!1;}if(null===d)y===p||c&&l.data===p||(l.data=p);else {if(r=r&&n.call(l.childNodes),a=(y=i.props||e$1).dangerouslySetInnerHTML,v=p.dangerouslySetInnerHTML,!c){if(null!=r)for(y={},_=0;_<l.attributes.length;_++)y[l.attributes[_].name]=l.attributes[_].value;(v||a)&&(v&&(a&&v.__html==a.__html||v.__html===l.innerHTML)||(l.innerHTML=v&&v.__html||""));}if(C$1(l,p,y,o,c),v)u.__k=[];else if(_=u.props.children,w$1(l,Array.isArray(_)?_:[_],u,i,t,o&&"foreignObject"!==d,r,f,r?r[0]:i.__k&&k(i,0),c),null!=r)for(_=r.length;_--;)null!=r[_]&&h(r[_]);c||("value"in p&&void 0!==(_=p.value)&&(_!==l.value||"progress"===d&&!_||"option"===d&&_!==y.value)&&H$1(l,"value",_,y.value,!1),"checked"in p&&void 0!==(_=p.checked)&&_!==l.checked&&H$1(l,"checked",_,y.checked,!1));}return l}function M$1(n,u,i){try{"function"==typeof n?n(u):n.current=u;}catch(n){l.__e(n,i);}}function N(n,u,i){var t,o;if(l.unmount&&l.unmount(n),(t=n.ref)&&(t.current&&t.current!==n.__e||M$1(t,null,u)),null!=(t=n.__c)){if(t.componentWillUnmount)try{t.componentWillUnmount();}catch(n){l.__e(n,u);}t.base=t.__P=null;}if(t=n.__k)for(o=0;o<t.length;o++)t[o]&&N(t[o],u,"function"!=typeof n.type);i||null==n.__e||h(n.__e),n.__e=n.__d=void 0;}function O$1(n,l,u){return this.constructor(n,u)}function S$1(u,i,t){var o,r,f;l.__&&l.__(u,i),r=(o="function"==typeof t)?null:t&&t.__k||i.__k,f=[],j$2(i,u=(!o&&t||i).__k=v$1(d,null,[u]),r||e$1,e$1,void 0!==i.ownerSVGElement,!o&&t?[t]:r?null:i.firstChild?n.call(i.childNodes):null,f,!o&&t?t:r?r.__e:i.firstChild,o),z$1(f,u);}function D$1(n,l){var u={__c:l="__cC"+f$1++,__:n,Consumer:function(n,l){return n.children(l)},Provider:function(n){var u,i;return this.getChildContext||(u=[],(i={})[l]=this,this.getChildContext=function(){return i},this.shouldComponentUpdate=function(n){this.props.value!==n.value&&u.some(m);},this.sub=function(n){u.push(n);var l=n.componentWillUnmount;n.componentWillUnmount=function(){u.splice(u.indexOf(n),1),l&&l.call(n);};}),n.children}};return u.Provider.__=u.Consumer.contextType=u}n=c$1.slice,l={__e:function(n,l,u,i){for(var t,o,r;l=l.__;)if((t=l.__c)&&!t.__)try{if((o=t.constructor)&&null!=o.getDerivedStateFromError&&(t.setState(o.getDerivedStateFromError(n)),r=t.__d),null!=t.componentDidCatch&&(t.componentDidCatch(n,i||{}),r=t.__d),r)return t.__E=t}catch(l){n=l;}throw n}},u$1=0,_.prototype.setState=function(n,l){var u;u=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=a$1({},this.state),"function"==typeof n&&(n=n(a$1({},u),this.props)),n&&a$1(u,n),null!=n&&this.__v&&(l&&this.__h.push(l),m(this));},_.prototype.forceUpdate=function(n){this.__v&&(this.__e=!0,n&&this.__h.push(n),m(this));},_.prototype.render=d,t=[],o="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,g$1.__r=0,f$1=0;
|
|
17
15
|
|
|
@@ -14498,7 +14496,7 @@ const KupCalendar = class {
|
|
|
14498
14496
|
* @returns {Promise<GenericObject>} List of props as object, each key will be a prop.
|
|
14499
14497
|
*/
|
|
14500
14498
|
async getProps(descriptions) {
|
|
14501
|
-
return
|
|
14499
|
+
return kupManager.getProps(this, KupCalendarProps, descriptions);
|
|
14502
14500
|
}
|
|
14503
14501
|
/**
|
|
14504
14502
|
* This method is used to trigger a new render of the component.
|
|
@@ -14520,7 +14518,7 @@ const KupCalendar = class {
|
|
|
14520
14518
|
* @param {GenericObject} props - Object containing props that will be set to the component.
|
|
14521
14519
|
*/
|
|
14522
14520
|
async setProps(props) {
|
|
14523
|
-
|
|
14521
|
+
kupManager.setProps(this, KupCalendarProps, props);
|
|
14524
14522
|
}
|
|
14525
14523
|
/*-------------------------------------------------*/
|
|
14526
14524
|
/* P r i v a t e M e t h o d s */
|
|
@@ -14582,8 +14580,8 @@ const KupCalendar = class {
|
|
|
14582
14580
|
getEvents() {
|
|
14583
14581
|
const isHourRange = this.startCol &&
|
|
14584
14582
|
this.endCol &&
|
|
14585
|
-
|
|
14586
|
-
|
|
14583
|
+
kupManager.getColumnByName(this.getColumns(), this.startCol) &&
|
|
14584
|
+
kupManager.getColumnByName(this.getColumns(), this.endCol);
|
|
14587
14585
|
return this.getRows().map((row) => {
|
|
14588
14586
|
const cell = row.cells[this.dateCol];
|
|
14589
14587
|
let startDate = this.kupManager.dates.toDayjs(cell.value);
|
|
@@ -2,16 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
6
|
-
const kupManager = require('./kup-manager-
|
|
7
|
-
const utils = require('./utils-4b208b48.js');
|
|
5
|
+
const index = require('./index-31125378.js');
|
|
6
|
+
const kupManager = require('./kup-manager-a8eecc60.js');
|
|
8
7
|
const GenericVariables = require('./GenericVariables-a9ed17ee.js');
|
|
9
|
-
const fCell = require('./f-cell-
|
|
10
|
-
require('./
|
|
11
|
-
require('./f-
|
|
12
|
-
require('./f-
|
|
13
|
-
require('./f-
|
|
14
|
-
require('./f-chip-02e83f82.js');
|
|
8
|
+
const fCell = require('./f-cell-2d5bcf0c.js');
|
|
9
|
+
require('./f-checkbox-cd977193.js');
|
|
10
|
+
require('./f-text-field-d243e4d8.js');
|
|
11
|
+
require('./f-image-0f17d599.js');
|
|
12
|
+
require('./f-chip-2fd3363e.js');
|
|
15
13
|
|
|
16
14
|
/**
|
|
17
15
|
* Props of the kup-cell component.
|
|
@@ -88,7 +86,7 @@ const KupCell = class {
|
|
|
88
86
|
* @returns {Promise<GenericObject>} List of props as object, each key will be a prop.
|
|
89
87
|
*/
|
|
90
88
|
async getProps(descriptions) {
|
|
91
|
-
return
|
|
89
|
+
return kupManager.getProps(this, KupCellProps, descriptions);
|
|
92
90
|
}
|
|
93
91
|
/**
|
|
94
92
|
* This method is used to trigger a new render of the component.
|
|
@@ -119,7 +117,7 @@ const KupCell = class {
|
|
|
119
117
|
* @param {GenericObject} props - Object containing props that will be set to the component.
|
|
120
118
|
*/
|
|
121
119
|
async setProps(props) {
|
|
122
|
-
|
|
120
|
+
kupManager.setProps(this, KupCellProps, props);
|
|
123
121
|
}
|
|
124
122
|
/*-------------------------------------------------*/
|
|
125
123
|
/* P r i v a t e M e t h o d s */
|
|
@@ -2,10 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
6
|
-
const
|
|
7
|
-
const kupManager = require('./kup-manager-02acbb37.js');
|
|
8
|
-
const utils = require('./utils-4b208b48.js');
|
|
5
|
+
const index = require('./index-31125378.js');
|
|
6
|
+
const kupManager = require('./kup-manager-a8eecc60.js');
|
|
9
7
|
|
|
10
8
|
const kupDashListCss = ".horizontal{display:inline-block;min-width:300px;max-width:100%;overflow:visible;white-space:nowrap;border:solid;border-width:1px;margin:2px}";
|
|
11
9
|
|
|
@@ -70,7 +68,7 @@ const KupDashList = class {
|
|
|
70
68
|
if (this.data.columns[3]) {
|
|
71
69
|
let col = this.data.columns[3];
|
|
72
70
|
col.obj = r.cells[this.data.columns[3].name].obj;
|
|
73
|
-
let newValue =
|
|
71
|
+
let newValue = kupManager.getCellValueForDisplay(col, r.cells[this.data.columns[3].name]);
|
|
74
72
|
value = (index.h("div", { slot: "value", style: valueColor }, newValue));
|
|
75
73
|
}
|
|
76
74
|
else {
|
|
@@ -79,12 +77,12 @@ const KupDashList = class {
|
|
|
79
77
|
if (this.data.columns[5]) {
|
|
80
78
|
let col = this.data.columns[5];
|
|
81
79
|
col.obj = r.cells[this.data.columns[5].name].obj;
|
|
82
|
-
let newValue =
|
|
80
|
+
let newValue = kupManager.getCellValueForDisplay(col, r.cells[this.data.columns[5].name]);
|
|
83
81
|
if (this.data.columns[6] &&
|
|
84
82
|
r.cells[this.data.columns[6].name].obj.k) {
|
|
85
83
|
newValue =
|
|
86
84
|
newValue +
|
|
87
|
-
|
|
85
|
+
kupManager.getDecimalSeparator(this.kupManager.dates.getLocale());
|
|
88
86
|
}
|
|
89
87
|
valueInt = (index.h("div", { slot: "value-int", style: valueColor }, newValue));
|
|
90
88
|
}
|
|
@@ -2,9 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
6
|
-
const kupManager = require('./kup-manager-
|
|
7
|
-
const utils = require('./utils-4b208b48.js');
|
|
5
|
+
const index = require('./index-31125378.js');
|
|
6
|
+
const kupManager = require('./kup-manager-a8eecc60.js');
|
|
8
7
|
const GenericVariables = require('./GenericVariables-a9ed17ee.js');
|
|
9
8
|
|
|
10
9
|
const kupDashCss = "#dash{color:var(--kup-text-color);font-size:2vw;display:flex;align-items:center;justify-content:center;position:relative;text-align:center;position:relative;word-break:normal}#dash.with-dyn{cursor:pointer}#dash #content .icon{margin:auto;font-size:90%}#dash #content.layout-1,#dash #content.layout-3{text-align:center}#dash #content.layout-1 .descr,#dash #content.layout-3 .descr{font-size:70%;width:100%}#dash #content.layout-1 .value,#dash #content.layout-3 .value{font-size:220%}#dash #content.layout-2>div{display:flex}#dash #content.layout-2>div .icon{margin:auto;font-size:150%;margin-right:5%}#dash #content.layout-2>div .value-int{font-size:250%}#dash #content.layout-2>div .value-dec,#dash #content.layout-2>div .unit{font-size:130%;margin-top:auto;margin-bottom:7%}#dash #content.layout-2>div .value-dec{margin-left:2%}#dash #content.layout-2>div .unit{margin-left:4%}#dash #content.layout-4>div{display:grid;grid-template-columns:2fr 5fr}#dash #content.layout-4>div .icon{margin:auto;font-size:150%;margin-right:5%}#dash #content.layout-4>div .value-and-unit{display:flex}#dash #content.layout-4>div .value-and-unit .value-int{font-size:250%}#dash #content.layout-4>div .value-and-unit .value-dec,#dash #content.layout-4>div .value-and-unit .unit{font-size:130%;margin-top:auto;margin-bottom:7%}#dash #content.layout-4>div .value-and-unit .value-dec{margin-left:2%}#dash #content.layout-4>div .value-and-unit .unit{margin-left:4%}#dash #content.layout-4>div .descr{margin-left:4%;text-align:left;font-size:80%;width:100%;min-width:max-content}#dash #content.layout-5>div,#dash #content.layout-7>div{display:flex}#dash #content.layout-5>div .icon,#dash #content.layout-7>div .icon{font-size:150%;margin:auto;margin-left:10%}#dash #content.layout-5>div .value,#dash #content.layout-7>div .value{font-size:200%}#dash #content.layout-5>div .descr,#dash #content.layout-7>div .descr{text-align:right;font-size:65%;width:100%;min-width:max-content}#dash #content.layout-6>div{display:flex;justify-content:space-between}#dash #content.layout-6>div .icon{font-size:150%;margin-right:10%}#dash #content.layout-6>div .value{font-size:220%;text-align:right}#dash #content.layout-6>div .descr{font-size:80%;text-align:right;width:100%;min-width:max-content}#dash #content.layout-8>div{display:flex;align-items:center}#dash #content.layout-8>div .icon{margin-right:4%;font-size:75%}#dash #content.layout-8>div .value{margin:0 10%;font-size:250%}#dash #content.layout-8>div .descr{font-size:60%;text-align:left}";
|
|
@@ -140,7 +139,7 @@ const KupGrid = class {
|
|
|
140
139
|
* @returns {Promise<GenericObject>} List of props as object, each key will be a prop.
|
|
141
140
|
*/
|
|
142
141
|
async getProps(descriptions) {
|
|
143
|
-
return
|
|
142
|
+
return kupManager.getProps(this, KupGridProps, descriptions);
|
|
144
143
|
}
|
|
145
144
|
/**
|
|
146
145
|
* This method is used to trigger a new render of the component.
|
|
@@ -153,7 +152,7 @@ const KupGrid = class {
|
|
|
153
152
|
* @param {GenericObject} props - Object containing props that will be set to the component.
|
|
154
153
|
*/
|
|
155
154
|
async setProps(props) {
|
|
156
|
-
|
|
155
|
+
kupManager.setProps(this, KupGridProps, props);
|
|
157
156
|
}
|
|
158
157
|
/*-------------------------------------------------*/
|
|
159
158
|
/* L i f e c y c l e H o o k s */
|
|
@@ -2,16 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
6
|
-
const fButton = require('./f-button-
|
|
7
|
-
const fCheckbox = require('./f-checkbox-
|
|
8
|
-
const fTextField = require('./f-text-field-
|
|
5
|
+
const index = require('./index-31125378.js');
|
|
6
|
+
const fButton = require('./f-button-826a470e.js');
|
|
7
|
+
const fCheckbox = require('./f-checkbox-cd977193.js');
|
|
8
|
+
const fTextField = require('./f-text-field-d243e4d8.js');
|
|
9
9
|
const fTextFieldMdc = require('./f-text-field-mdc-85997738.js');
|
|
10
|
-
const kupManager = require('./kup-manager-
|
|
11
|
-
const utils = require('./utils-4b208b48.js');
|
|
10
|
+
const kupManager = require('./kup-manager-a8eecc60.js');
|
|
12
11
|
const GenericVariables = require('./GenericVariables-a9ed17ee.js');
|
|
13
12
|
require('./f-button-declarations-b611587f.js');
|
|
14
|
-
require('./f-image-
|
|
13
|
+
require('./f-image-0f17d599.js');
|
|
15
14
|
require('./tslib.es6-0ee02c67.js');
|
|
16
15
|
require('./component-72a5b626.js');
|
|
17
16
|
|
|
@@ -26,7 +25,7 @@ var KupDashboardProps;
|
|
|
26
25
|
KupDashboardProps["enableDesign"] = "When set to true, the component is in design mode and it is draggable.";
|
|
27
26
|
})(KupDashboardProps || (KupDashboardProps = {}));
|
|
28
27
|
|
|
29
|
-
const kupDashboardCss = ":host{width:100%;height:100%}#kup-component{height:100%}.header{display:flex;flex-direction:row;justify-content:center}.header>*{margin-left:0.5em}.form{display:grid;height:100%}.form-dropzone{padding:1em;grid-gap:0.5em;border:1px solid var(--kup-primary-color)}.section{display:flex;flex-direction:column;overflow:auto}.section-header{display:flex;flex-direction:column}.section-header>*{width:100%;display:flex;flex-direction:row}.section-header>*>.section-header-actions{display:flex;justify-content:end}.section-header>*>.section-header-actions>*{margin-top:auto;margin-bottom:auto}.section-body{display:grid}.section-dropzone{border:1px solid var(--kup-primary-color)}.section-draggable{border:1px solid var(--kup-secondary-color);padding:1em}.component{height:fit-content;padding:1em;margin:0.5em}.layout-row{grid-auto-flow:column;grid-template-columns:min-content}.layout-column{grid-auto-flow:row;grid-template-rows:min-content}";
|
|
28
|
+
const kupDashboardCss = ":host{width:100%;height:100%}#kup-component{height:100%}.header{display:flex;flex-direction:row;justify-content:center}.header>*{margin-left:0.5em}.form{display:grid;height:100%}.form-dropzone{padding:1em;grid-gap:0.5em;border:1px solid var(--kup-primary-color);height:auto}.section{display:flex;flex-direction:column;overflow:auto}.section-header{display:flex;flex-direction:column}.section-header>*{width:100%;display:flex;flex-direction:row}.section-header>*>.section-header-actions{display:flex;justify-content:end}.section-header>*>.section-header-actions>*{margin-top:auto;margin-bottom:auto}.section-body{display:grid}.section-dropzone{border:1px solid var(--kup-primary-color)}.section-draggable{border:1px solid var(--kup-secondary-color);padding:1em}.section-placeholder{background-color:rgba(var(--kup-secondary-color-rgb), 0.5);min-height:1em;min-width:1em}.component{height:fit-content;padding:1em;margin:0.5em}.layout-row{grid-auto-flow:column;grid-template-columns:min-content}.layout-column{grid-auto-flow:row;grid-template-rows:min-content}";
|
|
30
29
|
|
|
31
30
|
const KupDashboard = class {
|
|
32
31
|
constructor(hostRef) {
|
|
@@ -96,7 +95,7 @@ const KupDashboard = class {
|
|
|
96
95
|
* @returns {Promise<GenericObject>} List of props as object, each key will be a prop.
|
|
97
96
|
*/
|
|
98
97
|
async getProps(descriptions) {
|
|
99
|
-
return
|
|
98
|
+
return kupManager.getProps(this, KupDashboardProps, descriptions);
|
|
100
99
|
}
|
|
101
100
|
/**
|
|
102
101
|
* This method is used to trigger a new render of the component.
|
|
@@ -109,7 +108,7 @@ const KupDashboard = class {
|
|
|
109
108
|
* @param {GenericObject} props - Object containing props that will be set to the component.
|
|
110
109
|
*/
|
|
111
110
|
async setProps(props) {
|
|
112
|
-
|
|
111
|
+
kupManager.setProps(this, KupDashboardProps, props);
|
|
113
112
|
}
|
|
114
113
|
/*-------------------------------------------------*/
|
|
115
114
|
/* P r i v a t e M e t h o d s */
|
|
@@ -160,6 +159,7 @@ const KupDashboard = class {
|
|
|
160
159
|
onChange: (e) => {
|
|
161
160
|
const { target } = e;
|
|
162
161
|
section.dim = target.value;
|
|
162
|
+
this.refresh();
|
|
163
163
|
},
|
|
164
164
|
};
|
|
165
165
|
const addButtonProp = {
|
|
@@ -230,6 +230,25 @@ const KupDashboard = class {
|
|
|
230
230
|
? section.sections.map((childSection) => this.buildSection(childSection, section))
|
|
231
231
|
: undefined)));
|
|
232
232
|
}
|
|
233
|
+
calcSectionPosition(pointerY, pointerX, vertical, sectionCount, elements) {
|
|
234
|
+
let idx = sectionCount;
|
|
235
|
+
for (let index = 0; index < elements.length; index++) {
|
|
236
|
+
const element = elements[index];
|
|
237
|
+
const srect = element.getBoundingClientRect();
|
|
238
|
+
if (vertical && pointerY < srect.y) {
|
|
239
|
+
idx = index;
|
|
240
|
+
break;
|
|
241
|
+
}
|
|
242
|
+
else if (!vertical && pointerX < srect.x) {
|
|
243
|
+
idx = index;
|
|
244
|
+
break;
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
//console.log(
|
|
248
|
+
// `pointer: ${pointerX}:${pointerY} - vertical: ${vertical} - index: ${idx}`
|
|
249
|
+
//);
|
|
250
|
+
return idx;
|
|
251
|
+
}
|
|
233
252
|
didRenderInteractables() {
|
|
234
253
|
try {
|
|
235
254
|
const items = [];
|
|
@@ -252,9 +271,17 @@ const KupDashboard = class {
|
|
|
252
271
|
.querySelectorAll('.form-dropzone')
|
|
253
272
|
.forEach((x) => items.push(x));
|
|
254
273
|
items.forEach((item) => {
|
|
255
|
-
this.kupManager.interact.dropzone(item,
|
|
274
|
+
this.kupManager.interact.dropzone(item, {
|
|
275
|
+
ondropdeactivate: () => {
|
|
276
|
+
this.removeSectionPlaceHolder();
|
|
277
|
+
},
|
|
278
|
+
ondropmove: (ev) => {
|
|
279
|
+
this.removeSectionPlaceHolder();
|
|
280
|
+
this.dragEnter(ev.dragEvent.clientY, ev.dragEvent.clientX, ev.currentTarget);
|
|
281
|
+
},
|
|
282
|
+
}, null, {
|
|
256
283
|
drop: (ev) => {
|
|
257
|
-
this.dropped(ev.currentTarget, ev.relatedTarget);
|
|
284
|
+
this.dropped(ev, ev.currentTarget, ev.relatedTarget);
|
|
258
285
|
},
|
|
259
286
|
});
|
|
260
287
|
});
|
|
@@ -263,14 +290,33 @@ const KupDashboard = class {
|
|
|
263
290
|
this.kupManager.debug.logMessage(this, error, kupManager.KupDebugCategory.ERROR);
|
|
264
291
|
}
|
|
265
292
|
}
|
|
266
|
-
|
|
293
|
+
dragEnter(clientY, clientX, parent) {
|
|
294
|
+
if (parent.kupData.form) {
|
|
295
|
+
// form is the target of drop.
|
|
296
|
+
// calculate a new position for the section.
|
|
297
|
+
const nidx = this.calcSectionPosition(clientY, clientX, parent.kupData.form.layout == 'column', parent.kupData.form.sections.length, parent.children);
|
|
298
|
+
// set placeholder into target area.
|
|
299
|
+
this.setSectionPlaceHolder(parent, nidx);
|
|
300
|
+
}
|
|
301
|
+
else if (parent.kupData.section) {
|
|
302
|
+
// section is the target of drop.
|
|
303
|
+
// calculate a new position for the section.
|
|
304
|
+
const nidx = this.calcSectionPosition(clientY, clientX, parent.kupData.section.layout == 'column', parent.kupData.section.sections.length, parent.lastElementChild.children);
|
|
305
|
+
// set placeholder into target area.
|
|
306
|
+
this.setSectionPlaceHolder(parent.lastElementChild, nidx);
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
dropped(event, parent, child) {
|
|
267
310
|
const idx = child.kupData.parent.sections.indexOf(child.kupData.section);
|
|
268
311
|
child.kupData.parent.sections.splice(idx, 1);
|
|
269
312
|
if (parent.kupData.form) {
|
|
270
313
|
// form is the target of drop.
|
|
271
314
|
if (!parent.kupData.form.sections)
|
|
272
315
|
parent.kupData.form.sections = [];
|
|
273
|
-
|
|
316
|
+
// calculate a new position for the section.
|
|
317
|
+
const nidx = this.calcSectionPosition(event.dragEvent.clientY, event.dragEvent.clientX, parent.kupData.form.layout == 'column', parent.kupData.form.sections.length, parent.children);
|
|
318
|
+
// set the section in 'nidx' position.
|
|
319
|
+
parent.kupData.form.sections.splice(nidx, 0, child.kupData.section);
|
|
274
320
|
child.kupData.parent = parent.kupData.form;
|
|
275
321
|
}
|
|
276
322
|
else if (parent.kupData.section) {
|
|
@@ -285,17 +331,20 @@ const KupDashboard = class {
|
|
|
285
331
|
parent.kupData.section.sections = [];
|
|
286
332
|
parent.kupData.section.sections.push(newSec);
|
|
287
333
|
}
|
|
288
|
-
|
|
334
|
+
// calculate a new position for the section.
|
|
335
|
+
const nidx = this.calcSectionPosition(event.dragEvent.clientY, event.dragEvent.clientX, parent.kupData.section.layout == 'column', parent.kupData.section.sections.length, parent.lastElementChild.children);
|
|
336
|
+
// set the section in 'nidx' position.
|
|
337
|
+
parent.kupData.section.sections.splice(nidx, 0, child.kupData.section);
|
|
289
338
|
child.kupData.parent = parent.kupData.section;
|
|
290
339
|
}
|
|
291
340
|
this.resetData(this.internalData);
|
|
292
341
|
}
|
|
293
342
|
getGridStyle(entity) {
|
|
294
343
|
let bodyStyles = {};
|
|
295
|
-
if (
|
|
344
|
+
if (entity.sections) {
|
|
296
345
|
let gridTemplate = '';
|
|
297
346
|
entity.sections.forEach((childSection) => {
|
|
298
|
-
if (!childSection.dim)
|
|
347
|
+
if (this.enableDesign || !childSection.dim)
|
|
299
348
|
gridTemplate += ' 1fr';
|
|
300
349
|
else
|
|
301
350
|
gridTemplate +=
|
|
@@ -310,6 +359,16 @@ const KupDashboard = class {
|
|
|
310
359
|
}
|
|
311
360
|
return bodyStyles;
|
|
312
361
|
}
|
|
362
|
+
setSectionPlaceHolder(element, index) {
|
|
363
|
+
const ph = document.createElement('div');
|
|
364
|
+
ph.className = 'section-placeholder';
|
|
365
|
+
element.insertBefore(ph, element.childNodes[index]);
|
|
366
|
+
}
|
|
367
|
+
removeSectionPlaceHolder() {
|
|
368
|
+
const ph = this.rootElement.shadowRoot.querySelector('.section-placeholder');
|
|
369
|
+
if (ph)
|
|
370
|
+
ph.parentElement.removeChild(ph);
|
|
371
|
+
}
|
|
313
372
|
resetData(form = null) {
|
|
314
373
|
if (form)
|
|
315
374
|
this.internalDataBackup = form;
|
|
@@ -2,9 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
6
|
-
const kupManager = require('./kup-manager-
|
|
7
|
-
const utils = require('./utils-4b208b48.js');
|
|
5
|
+
const index = require('./index-31125378.js');
|
|
6
|
+
const kupManager = require('./kup-manager-a8eecc60.js');
|
|
8
7
|
const GenericVariables = require('./GenericVariables-a9ed17ee.js');
|
|
9
8
|
|
|
10
9
|
const drawerClass = 'drawer';
|
|
@@ -67,7 +66,7 @@ const KupDrawer = class {
|
|
|
67
66
|
* @returns {Promise<GenericObject>} List of props as object, each key will be a prop.
|
|
68
67
|
*/
|
|
69
68
|
async getProps(descriptions) {
|
|
70
|
-
return
|
|
69
|
+
return kupManager.getProps(this, KupDrawerProps, descriptions);
|
|
71
70
|
}
|
|
72
71
|
/**
|
|
73
72
|
* Returns the state of the drawer.
|
|
@@ -94,7 +93,7 @@ const KupDrawer = class {
|
|
|
94
93
|
* @param {GenericObject} props - Object containing props that will be set to the component.
|
|
95
94
|
*/
|
|
96
95
|
async setProps(props) {
|
|
97
|
-
|
|
96
|
+
kupManager.setProps(this, KupDrawerProps, props);
|
|
98
97
|
}
|
|
99
98
|
/**
|
|
100
99
|
* Opens the drawer when closed and vice-versa.
|