@sme.up/ketchup 6.2.0 → 6.3.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-94cb5f35.js} +2 -2
- package/dist/cjs/{f-cell-3a740c48.js → f-cell-76830a0d.js} +12 -14
- package/dist/cjs/{f-checkbox-57443ca3.js → f-checkbox-cd977193.js} +1 -1
- package/dist/cjs/{f-chip-02e83f82.js → f-chip-68d45fd3.js} +3 -3
- package/dist/cjs/{f-image-2a61ece2.js → f-image-0e71df7e.js} +2 -2
- package/dist/cjs/{f-paginator-utils-09126bdd.js → f-paginator-utils-46689c0a.js} +80 -403
- package/dist/cjs/{f-text-field-9ee20a67.js → f-text-field-b4229cef.js} +11 -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 +116 -111
- package/dist/cjs/kup-box.cjs.entry.js +15 -17
- 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 +17 -19
- package/dist/cjs/kup-family-tree.cjs.entry.js +140 -64
- package/dist/cjs/kup-form.cjs.entry.js +10 -12
- 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 +4 -5
- package/dist/cjs/kup-magic-box.cjs.entry.js +5 -6
- package/dist/cjs/{kup-manager-02acbb37.js → kup-manager-7c514a30.js} +1400 -369
- 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/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-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-echart/kup-echart.js +9 -9
- 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-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-text-field/f-text-field.js +9 -1
- package/dist/collection/managers/kup-data/kup-data-cell-helper.js +48 -15
- package/dist/collection/managers/kup-data/kup-data.js +5 -5
- 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 +2 -1
- package/dist/esm/{f-button-fd44ef70.js → f-button-cd948e50.js} +2 -2
- package/dist/esm/{f-cell-7b159a22.js → f-cell-474dd282.js} +6 -8
- package/dist/esm/{f-checkbox-c51c4a75.js → f-checkbox-e06cf07b.js} +1 -1
- package/dist/esm/{f-chip-c2e4c522.js → f-chip-d6f2eb94.js} +3 -3
- package/dist/esm/{f-image-2ab4b9aa.js → f-image-914a03ef.js} +2 -2
- package/dist/esm/{f-paginator-utils-ef537d82.js → f-paginator-utils-a4a52732.js} +44 -366
- package/dist/esm/{f-text-field-41c575eb.js → f-text-field-76341fe3.js} +11 -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 +17 -12
- package/dist/esm/kup-box.entry.js +9 -11
- 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 +11 -13
- package/dist/esm/kup-family-tree.entry.js +138 -62
- package/dist/esm/kup-form.entry.js +7 -9
- 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 +2 -3
- package/dist/esm/kup-magic-box.entry.js +3 -4
- package/dist/esm/{kup-manager-22a475e6.js → kup-manager-86f440c7.js} +1379 -370
- 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/ketchup.esm.js +1 -1
- package/dist/ketchup/p-00e1133d.entry.js +9 -0
- package/dist/ketchup/p-066f344a.entry.js +1 -0
- package/dist/ketchup/p-0c6e0647.entry.js +1 -0
- package/dist/ketchup/p-151f7c17.entry.js +27 -0
- package/dist/ketchup/p-1e9c03b0.entry.js +1 -0
- package/dist/ketchup/{p-fc2b1229.js → p-21ea11cb.js} +3 -3
- package/dist/ketchup/{p-1959f835.entry.js → p-2f4e6c50.entry.js} +1 -1
- package/dist/ketchup/p-3586f59c.js +1 -0
- package/dist/ketchup/p-359fd90d.entry.js +1 -0
- package/dist/ketchup/{p-38d7584e.js → p-389fd0bf.js} +1 -1
- package/dist/ketchup/{p-cd5cfa7c.js → p-5552f156.js} +1 -1
- package/dist/ketchup/{p-264b1b19.entry.js → p-77aff9c1.entry.js} +1 -1
- package/dist/ketchup/{p-e9366aaf.entry.js → p-7cfdf53c.entry.js} +4 -4
- package/dist/ketchup/p-853a5178.entry.js +1 -0
- package/dist/ketchup/{p-edae3076.js → p-8673bd4e.js} +1 -1
- package/dist/ketchup/p-8b55b786.entry.js +1 -0
- package/dist/ketchup/p-95f5834b.entry.js +1 -0
- package/dist/ketchup/p-a2c595c4.js +1 -0
- package/dist/ketchup/p-ae91f27e.entry.js +1 -0
- package/dist/ketchup/{p-928c5c36.js → p-af664379.js} +1 -1
- package/dist/ketchup/p-b0b3989b.js +2 -0
- package/dist/ketchup/p-b3b65a61.entry.js +1 -0
- package/dist/ketchup/p-bc306a53.entry.js +1 -0
- package/dist/ketchup/{p-42080355.entry.js → p-c3783b77.entry.js} +1 -1
- package/dist/ketchup/{p-dc62a30f.js → p-cd4fc3fb.js} +1 -1
- package/dist/ketchup/p-cee76b14.entry.js +1 -0
- package/dist/ketchup/p-cfaea29b.entry.js +1 -0
- package/dist/ketchup/p-d2f51e7b.entry.js +1 -0
- package/dist/ketchup/p-df8e6a4d.entry.js +1 -0
- package/dist/ketchup/p-e60a1170.entry.js +1 -0
- package/dist/ketchup/p-e9a1ba04.entry.js +1 -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-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 +49 -7
- 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 +2 -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/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-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,13 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
6
|
-
const fButton = require('./f-button-
|
|
5
|
+
const index = require('./index-31125378.js');
|
|
6
|
+
const fButton = require('./f-button-94cb5f35.js');
|
|
7
7
|
const fButtonDeclarations = require('./f-button-declarations-b611587f.js');
|
|
8
|
-
const
|
|
9
|
-
const
|
|
8
|
+
const fImage = require('./f-image-0e71df7e.js');
|
|
9
|
+
const kupManager = require('./kup-manager-7c514a30.js');
|
|
10
10
|
const GenericVariables = require('./GenericVariables-a9ed17ee.js');
|
|
11
|
-
require('./f-image-2a61ece2.js');
|
|
12
11
|
|
|
13
12
|
/**
|
|
14
13
|
* Props of the kup-family-tree component.
|
|
@@ -16,14 +15,16 @@ require('./f-image-2a61ece2.js');
|
|
|
16
15
|
*/
|
|
17
16
|
var KupFamilyTreeProps;
|
|
18
17
|
(function (KupFamilyTreeProps) {
|
|
19
|
-
KupFamilyTreeProps["
|
|
18
|
+
KupFamilyTreeProps["autofitOnExpand"] = "The component will autofit everytime a node is expanded.";
|
|
19
|
+
KupFamilyTreeProps["autofitOnLoad"] = "The component's initial render will fit the container by invoking the runAutofit method.";
|
|
20
20
|
KupFamilyTreeProps["collapsible"] = "Nodes can be expanded/collapsed.";
|
|
21
21
|
KupFamilyTreeProps["customStyle"] = "Custom style of the component.";
|
|
22
22
|
KupFamilyTreeProps["data"] = "Actual data of the component";
|
|
23
23
|
KupFamilyTreeProps["layout"] = "Layout of the boxes.";
|
|
24
|
+
KupFamilyTreeProps["stackedLeaves"] = "Child nodes that have no children are arranged vertically.";
|
|
24
25
|
})(KupFamilyTreeProps || (KupFamilyTreeProps = {}));
|
|
25
26
|
|
|
26
|
-
const kupFamilyTreeCss = ":host{--kup_familytree_item_background_color:var(\n --kup-familytree-item-background-color,\n var(--kup-
|
|
27
|
+
const kupFamilyTreeCss = ":host{--kup_familytree_item_background_color:var(\n --kup-familytree-item-background-color,\n var(--kup-background-color)\n );--kup_familytree_item_color:var(\n --kup-familytree-item-color,\n var(--kup-text-color)\n );--kup_familytree_item_height:var(--kup-familytree-item-height, 80px);--kup_familytree_item_h_padding:var(--kup-familytree-item-h-padding, 8px);--kup_familytree_item_v_padding:var(--kup-familytree-item-v-padding, 10px);--kup_familytree_item_width:var(--kup-familytree-item-width, 280px);--kup_familytree_lines_color:var(\n --kup-familytree-lines-color,\n var(--kup-border-color)\n );display:block;overflow:hidden}.family-tree{cursor:grab;display:flex;transform:scale(var(--kup_familytree_scale, 1));transform-origin:0px 0px}.family-tree--dragging{cursor:grabbing}.family-tree__node{border-collapse:collapse;margin:auto}.family-tree__node--stacked{margin-bottom:4px}.family-tree__node__staff{align-items:center;display:flex;flex-direction:column;height:0;transform:translateX(calc( ( var(--kup_familytree_item_width) + (var(--kup_familytree_item_h_padding) * 2) ) / 2 )) translateY(calc( 0px - ( var(--kup_familytree_staffchildren) * var(--kup_familytree_item_height) + var(--kup_familytree_staffchildren) * (var(--kup_familytree_item_v_padding) * 2) ) ))}.family-tree__node__staff__item{padding:var(--kup_familytree_item_v_padding);text-align:left}.family-tree__node__staff__item:before{border-top:2px solid var(--kup_familytree_lines_color);content:\"\";position:absolute;transform:translateX(calc(100% + 2px)) translateY(calc(var(--kup_familytree_item_height) / 2));width:var(--kup_familytree_item_h_padding)}.family-tree__node td{vertical-align:top;padding:0}.family-tree__line--left{border-left:2px solid var(--kup_familytree_lines_color)}.family-tree__line--placeholder{height:calc(var(--kup_familytree_item_height) / 2)}.family-tree__line--staff{height:calc( var(--kup_familytree_staffchildren) * var(--kup_familytree_item_height) + var(--kup_familytree_staffchildren) * (var(--kup_familytree_item_v_padding) * 2) )}.family-tree__line--right{border-right:2px solid var(--kup_familytree_lines_color)}.family-tree__line--top{border-top:2px solid var(--kup_familytree_lines_color)}.family-tree__line--vertical{background-color:var(--kup_familytree_lines_color);margin-left:auto;margin-right:auto;width:2px}.family-tree__item{display:flex}.family-tree__item__wrapper{margin:auto}.family-tree__item__wrapper kup-box{margin:0 auto;overflow:hidden;padding:0 18px;width:var(--kup_familytree_item_width);z-index:1}.family-tree__item__wrapper .f-button{--kup-button-primary-color:var(--kup-text-color);--kup-button-primary-color-rgb:var(--kup-text-color-rgb);--kup-button-primary-color-h:var(--kup-text-color-h);--kup-button-primary-color-s:var(--kup-text-color-s);--kup-button-primary-color-l:var(--kup-text-color-l);margin:0 auto;width:max-content}.family-tree__item__wrapper .f-button button{height:32px;width:32px}.family-tree__item__layout{background-color:var(--kup_familytree_item_background_color);border:1px solid var(--kup_familytree_lines_color);border-radius:8px;box-sizing:border-box;display:flex;height:var(--kup_familytree_item_height);margin:0 18px;width:var(--kup_familytree_item_width)}.family-tree__item__layout--1{justify-content:center;color:var(--kup_familytree_item_color)}.family-tree__item__layout--1>.family-tree__item__layout__text__title{margin-top:auto;margin-bottom:auto}.family-tree__item__layout--2{background-color:var(--kup_familytree_item_background_color);justify-content:flex-start}.family-tree__item__layout__color{background-color:var(--kup-secondary-color);border-bottom-left-radius:8px;border-top-left-radius:8px;height:100%;width:10px}.family-tree__item__layout__image{display:flex;margin:auto 10px}.family-tree__item__layout__image img{border-radius:50px;object-fit:cover}.family-tree__item__layout__text{display:flex;flex-direction:column;justify-content:center}.family-tree__item__layout__text__title{font-size:18px;margin-bottom:5px}.family-tree__item__layout__text__subtitle{font-size:14px}.family-tree__item__layout__text__title,.family-tree__item__layout__text__subtitle{max-width:calc(var(--kup_familytree_item_width) - 30%);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}";
|
|
27
28
|
|
|
28
29
|
var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
29
30
|
if (kind === "a" && !f)
|
|
@@ -41,7 +42,7 @@ var __classPrivateFieldSet = (undefined && undefined.__classPrivateFieldSet) ||
|
|
|
41
42
|
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
42
43
|
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
43
44
|
};
|
|
44
|
-
var _KupFamilyTree_instances, _KupFamilyTree_clickTimeout, _KupFamilyTree_hold, _KupFamilyTree_currentPanX, _KupFamilyTree_currentPanY, _KupFamilyTree_interactableTouch, _KupFamilyTree_kupManager, _KupFamilyTree_moveCb, _KupFamilyTree_wrapperEl, _KupFamilyTree_buildChildLine, _KupFamilyTree_buildNode, _KupFamilyTree_buildNodes, _KupFamilyTree_createTree, _KupFamilyTree_startPanning, _KupFamilyTree_getEventPath, _KupFamilyTree_getEventDetails, _KupFamilyTree_clickHandler, _KupFamilyTree_contextMenuHandler, _KupFamilyTree_dblClickHandler, _KupFamilyTree_didLoadInteractables, _KupFamilyTree_zoomTree
|
|
45
|
+
var _KupFamilyTree_instances, _KupFamilyTree_clickTimeout, _KupFamilyTree_hold, _KupFamilyTree_currentPanX, _KupFamilyTree_currentPanY, _KupFamilyTree_interactableTouch, _KupFamilyTree_kupManager, _KupFamilyTree_moveCb, _KupFamilyTree_shouldAutofit, _KupFamilyTree_wrapperEl, _KupFamilyTree_buildChildLine, _KupFamilyTree_buildNode, _KupFamilyTree_buildNodeLayout, _KupFamilyTree_buildNodeLayout1, _KupFamilyTree_buildNodeLayout2, _KupFamilyTree_buildNodes, _KupFamilyTree_createTree, _KupFamilyTree_isBoxLayout, _KupFamilyTree_startPanning, _KupFamilyTree_getEventPath, _KupFamilyTree_getEventDetails, _KupFamilyTree_clickHandler, _KupFamilyTree_contextMenuHandler, _KupFamilyTree_dblClickHandler, _KupFamilyTree_didLoadInteractables, _KupFamilyTree_zoomTree;
|
|
45
46
|
const KupFamilyTree = class {
|
|
46
47
|
constructor(hostRef) {
|
|
47
48
|
index.registerInstance(this, hostRef);
|
|
@@ -53,10 +54,15 @@ const KupFamilyTree = class {
|
|
|
53
54
|
/* P r o p s */
|
|
54
55
|
/*-------------------------------------------------*/
|
|
55
56
|
/**
|
|
56
|
-
* The component
|
|
57
|
+
* The component will autofit everytime a node is expanded.
|
|
57
58
|
* @default true
|
|
58
59
|
*/
|
|
59
|
-
this.
|
|
60
|
+
this.autofitOnExpand = true;
|
|
61
|
+
/**
|
|
62
|
+
* The component's initial render will fit the container by invoking the runAutofit method.
|
|
63
|
+
* @default true
|
|
64
|
+
*/
|
|
65
|
+
this.autofitOnLoad = true;
|
|
60
66
|
/**
|
|
61
67
|
* Nodes can be expanded/collapsed.
|
|
62
68
|
* @default true
|
|
@@ -78,6 +84,11 @@ const KupFamilyTree = class {
|
|
|
78
84
|
* @default null
|
|
79
85
|
*/
|
|
80
86
|
this.layout = null;
|
|
87
|
+
/**
|
|
88
|
+
* Child nodes that have no children are arranged vertically.
|
|
89
|
+
* @default false
|
|
90
|
+
*/
|
|
91
|
+
this.stackedLeaves = false;
|
|
81
92
|
/*-------------------------------------------------*/
|
|
82
93
|
/* I n t e r n a l V a r i a b l e s */
|
|
83
94
|
/*-------------------------------------------------*/
|
|
@@ -95,18 +106,33 @@ const KupFamilyTree = class {
|
|
|
95
106
|
__classPrivateFieldSet(this, _KupFamilyTree_currentPanX, e.clientX, "f");
|
|
96
107
|
__classPrivateFieldSet(this, _KupFamilyTree_currentPanY, e.clientY, "f");
|
|
97
108
|
});
|
|
109
|
+
_KupFamilyTree_shouldAutofit.set(this, false);
|
|
98
110
|
_KupFamilyTree_wrapperEl.set(this, null);
|
|
99
111
|
}
|
|
100
112
|
/*-------------------------------------------------*/
|
|
101
113
|
/* P u b l i c M e t h o d s */
|
|
102
114
|
/*-------------------------------------------------*/
|
|
115
|
+
/**
|
|
116
|
+
* Collapses all nodes.
|
|
117
|
+
*/
|
|
118
|
+
async collapseAll(nodes = this.data.rows) {
|
|
119
|
+
__classPrivateFieldGet(this, _KupFamilyTree_kupManager, "f").data.node.setProperties(nodes, { isExpanded: false }, true);
|
|
120
|
+
this.refresh();
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Expands all nodes.
|
|
124
|
+
*/
|
|
125
|
+
async expandAll(nodes = this.data.rows) {
|
|
126
|
+
__classPrivateFieldGet(this, _KupFamilyTree_kupManager, "f").data.node.setProperties(nodes, { isExpanded: true }, true);
|
|
127
|
+
this.refresh();
|
|
128
|
+
}
|
|
103
129
|
/**
|
|
104
130
|
* Used to retrieve component's props values.
|
|
105
131
|
* @param {boolean} descriptions - When provided and true, the result will be the list of props with their description.
|
|
106
132
|
* @returns {Promise<GenericObject>} List of props as object, each key will be a prop.
|
|
107
133
|
*/
|
|
108
134
|
async getProps(descriptions) {
|
|
109
|
-
return
|
|
135
|
+
return kupManager.getProps(this, KupFamilyTreeProps, descriptions);
|
|
110
136
|
}
|
|
111
137
|
/**
|
|
112
138
|
* This method is used to trigger a new render of the component.
|
|
@@ -114,12 +140,41 @@ const KupFamilyTree = class {
|
|
|
114
140
|
async refresh() {
|
|
115
141
|
index.forceUpdate(this);
|
|
116
142
|
}
|
|
143
|
+
/**
|
|
144
|
+
* This method causes the component to autofit its container's width.
|
|
145
|
+
*/
|
|
146
|
+
async runAutofit() {
|
|
147
|
+
const parentWidth = __classPrivateFieldGet(this, _KupFamilyTree_wrapperEl, "f").clientWidth;
|
|
148
|
+
const childWidth = __classPrivateFieldGet(this, _KupFamilyTree_wrapperEl, "f").children[0].clientWidth;
|
|
149
|
+
const multiplierStep = 0.01;
|
|
150
|
+
const minWidth = (85 / 100) * parentWidth;
|
|
151
|
+
const maxWidth = (95 / 100) * parentWidth;
|
|
152
|
+
let multiplier = 1;
|
|
153
|
+
let tooManyAttempts = 2000;
|
|
154
|
+
let tempWidth = childWidth;
|
|
155
|
+
while ((tempWidth < minWidth || tempWidth > maxWidth) &&
|
|
156
|
+
tooManyAttempts > 0 &&
|
|
157
|
+
multiplier > multiplierStep) {
|
|
158
|
+
tooManyAttempts--;
|
|
159
|
+
if (tempWidth < minWidth) {
|
|
160
|
+
multiplier = multiplier + multiplierStep;
|
|
161
|
+
}
|
|
162
|
+
else if (tempWidth > maxWidth) {
|
|
163
|
+
multiplier = multiplier - multiplierStep;
|
|
164
|
+
}
|
|
165
|
+
else {
|
|
166
|
+
tooManyAttempts = 0;
|
|
167
|
+
}
|
|
168
|
+
tempWidth = childWidth * multiplier;
|
|
169
|
+
}
|
|
170
|
+
__classPrivateFieldGet(this, _KupFamilyTree_wrapperEl, "f").style.setProperty('--kup_familytree_scale', multiplier <= 1 ? multiplier.toFixed(2) : '1');
|
|
171
|
+
}
|
|
117
172
|
/**
|
|
118
173
|
* Sets the props to the component.
|
|
119
174
|
* @param {GenericObject} props - Object containing props that will be set to the component.
|
|
120
175
|
*/
|
|
121
176
|
async setProps(props) {
|
|
122
|
-
|
|
177
|
+
kupManager.setProps(this, KupFamilyTreeProps, props);
|
|
123
178
|
}
|
|
124
179
|
/*-------------------------------------------------*/
|
|
125
180
|
/* L i f e c y c l e H o o k s */
|
|
@@ -131,12 +186,8 @@ const KupFamilyTree = class {
|
|
|
131
186
|
}
|
|
132
187
|
componentDidLoad() {
|
|
133
188
|
__classPrivateFieldGet(this, _KupFamilyTree_instances, "m", _KupFamilyTree_didLoadInteractables).call(this);
|
|
134
|
-
if (this.
|
|
135
|
-
|
|
136
|
-
const childWidth = __classPrivateFieldGet(this, _KupFamilyTree_wrapperEl, "f").children[0].clientWidth;
|
|
137
|
-
if (childWidth > parentWidth) {
|
|
138
|
-
__classPrivateFieldGet(this, _KupFamilyTree_instances, "m", _KupFamilyTree_autofit).call(this, parentWidth, childWidth);
|
|
139
|
-
}
|
|
189
|
+
if (this.autofitOnLoad) {
|
|
190
|
+
this.runAutofit();
|
|
140
191
|
}
|
|
141
192
|
__classPrivateFieldGet(this, _KupFamilyTree_kupManager, "f").debug.logLoad(this, true);
|
|
142
193
|
}
|
|
@@ -144,6 +195,10 @@ const KupFamilyTree = class {
|
|
|
144
195
|
__classPrivateFieldGet(this, _KupFamilyTree_kupManager, "f").debug.logRender(this, false);
|
|
145
196
|
}
|
|
146
197
|
componentDidRender() {
|
|
198
|
+
if (__classPrivateFieldGet(this, _KupFamilyTree_shouldAutofit, "f")) {
|
|
199
|
+
__classPrivateFieldSet(this, _KupFamilyTree_shouldAutofit, false, "f");
|
|
200
|
+
this.runAutofit();
|
|
201
|
+
}
|
|
147
202
|
__classPrivateFieldGet(this, _KupFamilyTree_kupManager, "f").debug.logRender(this, true);
|
|
148
203
|
}
|
|
149
204
|
render() {
|
|
@@ -151,7 +206,6 @@ const KupFamilyTree = class {
|
|
|
151
206
|
e.preventDefault();
|
|
152
207
|
__classPrivateFieldGet(this, _KupFamilyTree_instances, "m", _KupFamilyTree_startPanning).call(this, e);
|
|
153
208
|
}, onWheel: (e) => {
|
|
154
|
-
e.preventDefault();
|
|
155
209
|
__classPrivateFieldGet(this, _KupFamilyTree_instances, "m", _KupFamilyTree_zoomTree).call(this, e);
|
|
156
210
|
} }, index.h("style", null, __classPrivateFieldGet(this, _KupFamilyTree_kupManager, "f").theme.setKupStyle(this.rootElement)), index.h("div", { id: GenericVariables.componentWrapperId }, __classPrivateFieldGet(this, _KupFamilyTree_instances, "m", _KupFamilyTree_createTree).call(this))));
|
|
157
211
|
}
|
|
@@ -161,7 +215,7 @@ const KupFamilyTree = class {
|
|
|
161
215
|
}
|
|
162
216
|
get rootElement() { return index.getElement(this); }
|
|
163
217
|
};
|
|
164
|
-
_KupFamilyTree_clickTimeout = new WeakMap(), _KupFamilyTree_hold = new WeakMap(), _KupFamilyTree_currentPanX = new WeakMap(), _KupFamilyTree_currentPanY = new WeakMap(), _KupFamilyTree_interactableTouch = new WeakMap(), _KupFamilyTree_kupManager = new WeakMap(), _KupFamilyTree_moveCb = new WeakMap(), _KupFamilyTree_wrapperEl = new WeakMap(), _KupFamilyTree_instances = new WeakSet(), _KupFamilyTree_buildChildLine = function _KupFamilyTree_buildChildLine(first, last, alone, moreTwo) {
|
|
218
|
+
_KupFamilyTree_clickTimeout = new WeakMap(), _KupFamilyTree_hold = new WeakMap(), _KupFamilyTree_currentPanX = new WeakMap(), _KupFamilyTree_currentPanY = new WeakMap(), _KupFamilyTree_interactableTouch = new WeakMap(), _KupFamilyTree_kupManager = new WeakMap(), _KupFamilyTree_moveCb = new WeakMap(), _KupFamilyTree_shouldAutofit = new WeakMap(), _KupFamilyTree_wrapperEl = new WeakMap(), _KupFamilyTree_instances = new WeakSet(), _KupFamilyTree_buildChildLine = function _KupFamilyTree_buildChildLine(first, last, alone, moreTwo) {
|
|
165
219
|
const content = [];
|
|
166
220
|
content.push(index.h("td", { class: {
|
|
167
221
|
'family-tree__line': true,
|
|
@@ -194,6 +248,9 @@ _KupFamilyTree_clickTimeout = new WeakMap(), _KupFamilyTree_hold = new WeakMap()
|
|
|
194
248
|
}
|
|
195
249
|
});
|
|
196
250
|
}
|
|
251
|
+
const stacked = this.stackedLeaves &&
|
|
252
|
+
children &&
|
|
253
|
+
children.every((c) => !c.children || c.children.length == 0);
|
|
197
254
|
const span1 = children ? children.length * 2 : 1;
|
|
198
255
|
const styleVLine = {
|
|
199
256
|
'family-tree__line': true,
|
|
@@ -207,24 +264,43 @@ _KupFamilyTree_clickTimeout = new WeakMap(), _KupFamilyTree_hold = new WeakMap()
|
|
|
207
264
|
],
|
|
208
265
|
rows: [{ cells: Object.assign({ '*TREECOL': node }, node.cells) }],
|
|
209
266
|
};
|
|
210
|
-
const layout = node.layout || this.layout ||
|
|
211
|
-
const
|
|
267
|
+
const layout = node.layout || this.layout || 1;
|
|
268
|
+
const expandButtonProps = {
|
|
212
269
|
icon: node.isExpanded ? 'remove' : 'plus',
|
|
213
|
-
|
|
270
|
+
shaped: true,
|
|
214
271
|
slim: true,
|
|
215
|
-
|
|
272
|
+
styling: fButtonDeclarations.FButtonStyling.OUTLINED,
|
|
273
|
+
title: `${__classPrivateFieldGet(this, _KupFamilyTree_kupManager, "f").language.translate(kupManager.KupLanguageGeneric.EXPAND)}/${__classPrivateFieldGet(this, _KupFamilyTree_kupManager, "f").language.translate(kupManager.KupLanguageGeneric.COLLAPSE)} (CTRL + Click)`,
|
|
274
|
+
onClick: (e) => {
|
|
275
|
+
if (e.ctrlKey && node.children && node.children.length > 0) {
|
|
276
|
+
if (node.isExpanded) {
|
|
277
|
+
this.collapseAll(node.children);
|
|
278
|
+
}
|
|
279
|
+
else {
|
|
280
|
+
this.expandAll(node.children);
|
|
281
|
+
}
|
|
282
|
+
}
|
|
216
283
|
node.isExpanded = !node.isExpanded;
|
|
284
|
+
if (this.autofitOnExpand) {
|
|
285
|
+
__classPrivateFieldSet(this, _KupFamilyTree_shouldAutofit, true, "f");
|
|
286
|
+
}
|
|
217
287
|
this.refresh();
|
|
218
288
|
},
|
|
289
|
+
wrapperClass: 'family-tree__item__expand',
|
|
219
290
|
};
|
|
220
|
-
const box = (index.h("div", { class: 'family-tree__item' }, index.h("div", { class: 'family-tree__item__wrapper' }, index.h("kup-box", { class: "kup-borderless kup-paddingless", customStyle: "#kup-component { background: var(--kup_familytree_item_background_color); box-sizing: border-box; height: var(--kup_familytree_item_height); padding: 0 var(--kup_familytree_item_h_padding); } #kup-component .box-component { background: var(--kup_familytree_item_background_color); box-sizing: border-box; height: 100%;} #kup-component .f-cell__text { color: var(--kup_familytree_item_color); }", data: data, layout: layout }), this.collapsible &&
|
|
291
|
+
const box = (index.h("div", { class: 'family-tree__item' }, index.h("div", { class: 'family-tree__item__wrapper' }, __classPrivateFieldGet(this, _KupFamilyTree_instances, "m", _KupFamilyTree_isBoxLayout).call(this, layout) ? (index.h("kup-box", { class: "kup-borderless kup-paddingless", customStyle: "#kup-component { background: var(--kup_familytree_item_background_color); border: 2px solid var(--kup_familytree_lines_color); box-sizing: border-box; height: var(--kup_familytree_item_height); padding: 0 var(--kup_familytree_item_h_padding); } #kup-component .box-component { background: var(--kup_familytree_item_background_color); box-sizing: border-box; height: 100%;} #kup-component .f-cell__text { color: var(--kup_familytree_item_color); }", data: data, layout: layout, showSelection: false })) : (__classPrivateFieldGet(this, _KupFamilyTree_instances, "m", _KupFamilyTree_buildNodeLayout).call(this, node, layout)), this.collapsible &&
|
|
221
292
|
node.children &&
|
|
222
|
-
node.children.length > 0 ? (index.h(fButton.FButton, Object.assign({},
|
|
293
|
+
node.children.length > 0 ? (index.h(fButton.FButton, Object.assign({}, expandButtonProps))) : undefined)));
|
|
223
294
|
const staffStyle = {
|
|
224
295
|
['--kup_familytree_staffchildren']: (staffChildren === null || staffChildren === void 0 ? void 0 : staffChildren.length.toString()) || '0',
|
|
225
296
|
};
|
|
226
297
|
//TODO: set data-cell and data-column if needed inside events
|
|
227
|
-
return (index.h("table", { class:
|
|
298
|
+
return (index.h("table", { class: {
|
|
299
|
+
'family-tree__node': true,
|
|
300
|
+
'family-tree__node--stacked': this.stackedLeaves &&
|
|
301
|
+
!node.isStaff &&
|
|
302
|
+
(!node.children || node.children.length == 0),
|
|
303
|
+
} }, index.h("tr", null, index.h("td", { "data-row": node, colSpan: span1 }, box)), index.h("tr", null, index.h("td", { colSpan: span1 }, index.h("div", { class: styleVLine }))), staffChildren
|
|
228
304
|
? [
|
|
229
305
|
index.h("tr", null, index.h("td", { colSpan: span1 }, index.h("div", { class: Object.assign(Object.assign({}, styleVLine), { 'family-tree__line--staff': true }), style: staffStyle }), index.h("div", { class: "family-tree__node__staff", style: staffStyle }, staffChildren.map((inode) => [
|
|
230
306
|
index.h("div", { class: "family-tree__node__staff__item" }, __classPrivateFieldGet(this, _KupFamilyTree_instances, "m", _KupFamilyTree_buildNode).call(this, inode)),
|
|
@@ -233,15 +309,25 @@ _KupFamilyTree_clickTimeout = new WeakMap(), _KupFamilyTree_hold = new WeakMap()
|
|
|
233
309
|
: null, staffChildren && children
|
|
234
310
|
? [
|
|
235
311
|
index.h("tr", null, index.h("td", { colSpan: span1 }, index.h("div", { class: styleVLine }))),
|
|
236
|
-
index.h("tr", null, index.h("td", { colSpan: span1 }, index.h("div", { class: styleVLine }))),
|
|
237
312
|
]
|
|
238
313
|
: null, children
|
|
239
314
|
? [
|
|
240
|
-
index.h("tr", null, children.map((inode) => __classPrivateFieldGet(this, _KupFamilyTree_instances, "m", _KupFamilyTree_buildChildLine).call(this, children.indexOf(inode) == 0, children.indexOf(inode) ==
|
|
241
|
-
children.length - 1, children.length == 1, children.length > 2))),
|
|
242
|
-
index.h("tr", null, children.map((inode) => (index.h("td", { colSpan: 2 }, __classPrivateFieldGet(this, _KupFamilyTree_instances, "m", _KupFamilyTree_buildNode).call(this, inode))))),
|
|
315
|
+
index.h("tr", null, stacked ? (index.h("td", { colSpan: span1 }, index.h("div", { class: styleVLine }))) : (children.map((inode) => __classPrivateFieldGet(this, _KupFamilyTree_instances, "m", _KupFamilyTree_buildChildLine).call(this, children.indexOf(inode) == 0, children.indexOf(inode) ==
|
|
316
|
+
children.length - 1, children.length == 1, children.length > 2)))),
|
|
317
|
+
index.h("tr", null, stacked ? (index.h("td", { colSpan: span1 }, children.map((inode) => __classPrivateFieldGet(this, _KupFamilyTree_instances, "m", _KupFamilyTree_buildNode).call(this, inode)))) : (children.map((inode) => (index.h("td", { colSpan: 2 }, __classPrivateFieldGet(this, _KupFamilyTree_instances, "m", _KupFamilyTree_buildNode).call(this, inode)))))),
|
|
243
318
|
]
|
|
244
319
|
: undefined));
|
|
320
|
+
}, _KupFamilyTree_buildNodeLayout = function _KupFamilyTree_buildNodeLayout(node, layout) {
|
|
321
|
+
switch (layout) {
|
|
322
|
+
case 2:
|
|
323
|
+
return __classPrivateFieldGet(this, _KupFamilyTree_instances, "m", _KupFamilyTree_buildNodeLayout2).call(this, node);
|
|
324
|
+
default:
|
|
325
|
+
return __classPrivateFieldGet(this, _KupFamilyTree_instances, "m", _KupFamilyTree_buildNodeLayout1).call(this, node);
|
|
326
|
+
}
|
|
327
|
+
}, _KupFamilyTree_buildNodeLayout1 = function _KupFamilyTree_buildNodeLayout1(node) {
|
|
328
|
+
return (index.h("div", { class: `family-tree__item__layout family-tree__item__layout--1` }, index.h("div", { class: 'family-tree__item__layout__text__title' }, node.value)));
|
|
329
|
+
}, _KupFamilyTree_buildNodeLayout2 = function _KupFamilyTree_buildNodeLayout2(node) {
|
|
330
|
+
return (index.h("div", { class: `family-tree__item__layout family-tree__item__layout--2` }, index.h("div", { class: 'family-tree__item__layout__color' }), index.h("div", { class: 'family-tree__item__layout__image' }, index.h(fImage.FImage, { resource: node.icon, sizeX: "48px", sizeY: "48px" })), index.h("div", { class: 'family-tree__item__layout__text' }, index.h("div", { class: 'family-tree__item__layout__text__title' }, node.value), node.title ? (index.h("div", { class: 'family-tree__item__layout__text__subtitle' }, node.title)) : null)));
|
|
245
331
|
}, _KupFamilyTree_buildNodes = function _KupFamilyTree_buildNodes(nodes) {
|
|
246
332
|
return nodes.map((node) => __classPrivateFieldGet(this, _KupFamilyTree_instances, "m", _KupFamilyTree_buildNode).call(this, node));
|
|
247
333
|
}, _KupFamilyTree_createTree = function _KupFamilyTree_createTree() {
|
|
@@ -249,12 +335,17 @@ _KupFamilyTree_clickTimeout = new WeakMap(), _KupFamilyTree_hold = new WeakMap()
|
|
|
249
335
|
return (index.h("div", { class: "family-tree", onContextMenu: (e) => {
|
|
250
336
|
e.preventDefault();
|
|
251
337
|
}, ref: (el) => (__classPrivateFieldSet(this, _KupFamilyTree_wrapperEl, el, "f")) }, emptyData ? (index.h("div", null, __classPrivateFieldGet(this, _KupFamilyTree_kupManager, "f").language.translate(kupManager.KupLanguageGeneric.EMPTY_DATA))) : (__classPrivateFieldGet(this, _KupFamilyTree_instances, "m", _KupFamilyTree_buildNodes).call(this, this.data.rows))));
|
|
338
|
+
}, _KupFamilyTree_isBoxLayout = function _KupFamilyTree_isBoxLayout(layout) {
|
|
339
|
+
const tmp = layout;
|
|
340
|
+
return tmp && tmp.sections && tmp.sections.length > 0;
|
|
252
341
|
}, _KupFamilyTree_startPanning = function _KupFamilyTree_startPanning(e) {
|
|
253
342
|
__classPrivateFieldSet(this, _KupFamilyTree_currentPanX, e.clientX, "f");
|
|
254
343
|
__classPrivateFieldSet(this, _KupFamilyTree_currentPanY, e.clientY, "f");
|
|
344
|
+
__classPrivateFieldGet(this, _KupFamilyTree_wrapperEl, "f").classList.add('family-tree--dragging');
|
|
255
345
|
const endPanning = () => {
|
|
256
346
|
document.removeEventListener('pointermove', __classPrivateFieldGet(this, _KupFamilyTree_moveCb, "f"));
|
|
257
347
|
document.removeEventListener('pointerup', endPanning);
|
|
348
|
+
__classPrivateFieldGet(this, _KupFamilyTree_wrapperEl, "f").classList.remove('family-tree--dragging');
|
|
258
349
|
};
|
|
259
350
|
document.addEventListener('pointermove', __classPrivateFieldGet(this, _KupFamilyTree_moveCb, "f"));
|
|
260
351
|
document.addEventListener('pointerup', endPanning);
|
|
@@ -270,16 +361,20 @@ _KupFamilyTree_clickTimeout = new WeakMap(), _KupFamilyTree_hold = new WeakMap()
|
|
|
270
361
|
}
|
|
271
362
|
return path;
|
|
272
363
|
}, _KupFamilyTree_getEventDetails = function _KupFamilyTree_getEventDetails(path, e) {
|
|
364
|
+
let expandButton;
|
|
273
365
|
let td;
|
|
274
366
|
if (path) {
|
|
275
367
|
for (let i = path.length - 1; i >= 0; i--) {
|
|
276
|
-
|
|
277
|
-
if (!
|
|
368
|
+
const el = path[i];
|
|
369
|
+
if (!el.tagName) {
|
|
278
370
|
continue;
|
|
279
371
|
}
|
|
280
|
-
|
|
372
|
+
if (el.classList.contains('family-tree__item__expand')) {
|
|
373
|
+
expandButton = el;
|
|
374
|
+
}
|
|
375
|
+
switch (el.tagName.toUpperCase()) {
|
|
281
376
|
case 'TD': {
|
|
282
|
-
td =
|
|
377
|
+
td = el;
|
|
283
378
|
break;
|
|
284
379
|
}
|
|
285
380
|
}
|
|
@@ -294,6 +389,7 @@ _KupFamilyTree_clickTimeout = new WeakMap(), _KupFamilyTree_hold = new WeakMap()
|
|
|
294
389
|
return {
|
|
295
390
|
cell: cell ? cell : null,
|
|
296
391
|
column: column ? column : null,
|
|
392
|
+
expandButton: expandButton ? expandButton : null,
|
|
297
393
|
originalEvent: e,
|
|
298
394
|
row: row ? row : null,
|
|
299
395
|
td: td ? td : null,
|
|
@@ -373,37 +469,17 @@ _KupFamilyTree_clickTimeout = new WeakMap(), _KupFamilyTree_hold = new WeakMap()
|
|
|
373
469
|
__classPrivateFieldGet(this, _KupFamilyTree_kupManager, "f").interact.on(this.rootElement, kupManager.KupPointerEventTypes.TAP, tapCb);
|
|
374
470
|
__classPrivateFieldGet(this, _KupFamilyTree_kupManager, "f").interact.on(this.rootElement, kupManager.KupPointerEventTypes.DOUBLETAP, doubletapCb);
|
|
375
471
|
__classPrivateFieldGet(this, _KupFamilyTree_kupManager, "f").interact.on(this.rootElement, kupManager.KupPointerEventTypes.HOLD, holdCb);
|
|
376
|
-
}, _KupFamilyTree_zoomTree = function _KupFamilyTree_zoomTree(
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
value = delta;
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
}, _KupFamilyTree_autofit = function _KupFamilyTree_autofit(parentWidth, childWidth) {
|
|
385
|
-
const multiplierStep = 0.01;
|
|
386
|
-
const minWidth = (85 / 100) * parentWidth;
|
|
387
|
-
const maxWidth = (95 / 100) * parentWidth;
|
|
388
|
-
let multiplier = 1;
|
|
389
|
-
let tooManyAttempts = 2000;
|
|
390
|
-
let tempWidth = childWidth;
|
|
391
|
-
while ((tempWidth < minWidth || tempWidth > maxWidth) &&
|
|
392
|
-
tooManyAttempts > 0 &&
|
|
393
|
-
multiplier > multiplierStep) {
|
|
394
|
-
tooManyAttempts--;
|
|
395
|
-
if (tempWidth < minWidth) {
|
|
396
|
-
multiplier = multiplier + multiplierStep;
|
|
397
|
-
}
|
|
398
|
-
else if (tempWidth > maxWidth) {
|
|
399
|
-
multiplier = multiplier - multiplierStep;
|
|
400
|
-
}
|
|
401
|
-
else {
|
|
402
|
-
tooManyAttempts = 0;
|
|
472
|
+
}, _KupFamilyTree_zoomTree = function _KupFamilyTree_zoomTree(e) {
|
|
473
|
+
if (e.ctrlKey) {
|
|
474
|
+
e.preventDefault();
|
|
475
|
+
const currentScale = parseFloat(__classPrivateFieldGet(this, _KupFamilyTree_wrapperEl, "f").style.getPropertyValue('--kup_familytree_scale')) || 1;
|
|
476
|
+
const delta = 0.05;
|
|
477
|
+
let value = e.deltaY > 0 ? currentScale - delta : currentScale + delta;
|
|
478
|
+
if (value < delta) {
|
|
479
|
+
value = delta;
|
|
403
480
|
}
|
|
404
|
-
|
|
481
|
+
__classPrivateFieldGet(this, _KupFamilyTree_wrapperEl, "f").style.setProperty('--kup_familytree_scale', value.toFixed(2));
|
|
405
482
|
}
|
|
406
|
-
__classPrivateFieldGet(this, _KupFamilyTree_wrapperEl, "f").style.setProperty('--kup_familytree_scale', multiplier.toFixed(2));
|
|
407
483
|
};
|
|
408
484
|
KupFamilyTree.style = kupFamilyTreeCss;
|
|
409
485
|
|
|
@@ -2,17 +2,15 @@
|
|
|
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-7c514a30.js');
|
|
8
7
|
const GenericVariables = require('./GenericVariables-a9ed17ee.js');
|
|
9
|
-
const fCell = require('./f-cell-
|
|
8
|
+
const fCell = require('./f-cell-76830a0d.js');
|
|
10
9
|
const fTextFieldMdc = require('./f-text-field-mdc-85997738.js');
|
|
11
|
-
require('./
|
|
12
|
-
require('./f-
|
|
13
|
-
require('./f-
|
|
14
|
-
require('./f-
|
|
15
|
-
require('./f-chip-02e83f82.js');
|
|
10
|
+
require('./f-checkbox-cd977193.js');
|
|
11
|
+
require('./f-text-field-b4229cef.js');
|
|
12
|
+
require('./f-image-0e71df7e.js');
|
|
13
|
+
require('./f-chip-68d45fd3.js');
|
|
16
14
|
require('./tslib.es6-0ee02c67.js');
|
|
17
15
|
require('./component-72a5b626.js');
|
|
18
16
|
|
|
@@ -77,7 +75,7 @@ const KupForm = class {
|
|
|
77
75
|
/* W a t c h e r s */
|
|
78
76
|
/*-------------------------------------------------*/
|
|
79
77
|
onDataChanged() {
|
|
80
|
-
|
|
78
|
+
kupManager.identify(this.getRows());
|
|
81
79
|
this.initVisibleColumns();
|
|
82
80
|
this.checkLayout();
|
|
83
81
|
}
|
|
@@ -93,7 +91,7 @@ const KupForm = class {
|
|
|
93
91
|
* @returns {Promise<GenericObject>} List of props as object, each key will be a prop.
|
|
94
92
|
*/
|
|
95
93
|
async getProps(descriptions) {
|
|
96
|
-
return
|
|
94
|
+
return kupManager.getProps(this, KupFormProps, descriptions);
|
|
97
95
|
}
|
|
98
96
|
/**
|
|
99
97
|
* This method is used to trigger a new render of the component.
|
|
@@ -132,7 +130,7 @@ const KupForm = class {
|
|
|
132
130
|
* @param {GenericObject} props - Object containing props that will be set to the component.
|
|
133
131
|
*/
|
|
134
132
|
async setProps(props) {
|
|
135
|
-
|
|
133
|
+
kupManager.setProps(this, KupFormProps, props);
|
|
136
134
|
}
|
|
137
135
|
/*-------------------------------------------------*/
|
|
138
136
|
/* P r i v a t e M e t h o d s */
|
|
@@ -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-7c514a30.js');
|
|
8
7
|
|
|
9
8
|
/**
|
|
10
9
|
* Props of the kup-iframe component.
|
|
@@ -62,7 +61,7 @@ const KupIframe = class {
|
|
|
62
61
|
* @returns {Promise<GenericObject>} List of props as object, each key will be a prop.
|
|
63
62
|
*/
|
|
64
63
|
async getProps(descriptions) {
|
|
65
|
-
return
|
|
64
|
+
return kupManager.getProps(this, KupIframeProps, descriptions);
|
|
66
65
|
}
|
|
67
66
|
/**
|
|
68
67
|
* This method is used to trigger a new render of the component.
|
|
@@ -75,7 +74,7 @@ const KupIframe = class {
|
|
|
75
74
|
* @param {GenericObject} props - Object containing props that will be set to the component.
|
|
76
75
|
*/
|
|
77
76
|
async setProps(props) {
|
|
78
|
-
|
|
77
|
+
kupManager.setProps(this, KupIframeProps, props);
|
|
79
78
|
}
|
|
80
79
|
/*-------------------------------------------------*/
|
|
81
80
|
/* P r i v a t e M e t h o d s */
|
|
@@ -2,19 +2,17 @@
|
|
|
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-7c514a30.js');
|
|
8
7
|
const GenericVariables = require('./GenericVariables-a9ed17ee.js');
|
|
9
|
-
const fImage = require('./f-image-
|
|
10
|
-
const fButton = require('./f-button-
|
|
8
|
+
const fImage = require('./f-image-0e71df7e.js');
|
|
9
|
+
const fButton = require('./f-button-94cb5f35.js');
|
|
11
10
|
const fButtonDeclarations = require('./f-button-declarations-b611587f.js');
|
|
12
|
-
const fCell = require('./f-cell-
|
|
11
|
+
const fCell = require('./f-cell-76830a0d.js');
|
|
13
12
|
const component = require('./component-72a5b626.js');
|
|
14
|
-
require('./
|
|
15
|
-
require('./f-
|
|
16
|
-
require('./f-
|
|
17
|
-
require('./f-chip-02e83f82.js');
|
|
13
|
+
require('./f-checkbox-cd977193.js');
|
|
14
|
+
require('./f-text-field-b4229cef.js');
|
|
15
|
+
require('./f-chip-68d45fd3.js');
|
|
18
16
|
require('./tslib.es6-0ee02c67.js');
|
|
19
17
|
|
|
20
18
|
/**
|
|
@@ -197,7 +195,7 @@ const KupImageList = class {
|
|
|
197
195
|
* @returns {Promise<GenericObject>} List of props as object, each key will be a prop.
|
|
198
196
|
*/
|
|
199
197
|
async getProps(descriptions) {
|
|
200
|
-
return
|
|
198
|
+
return kupManager.getProps(this, KupImageListProps, descriptions);
|
|
201
199
|
}
|
|
202
200
|
/**
|
|
203
201
|
* This method is used to trigger a new render of the component.
|
|
@@ -210,7 +208,7 @@ const KupImageList = class {
|
|
|
210
208
|
* @param {GenericObject} props - Object containing props that will be set to the component.
|
|
211
209
|
*/
|
|
212
210
|
async setProps(props) {
|
|
213
|
-
|
|
211
|
+
kupManager.setProps(this, KupImageListProps, props);
|
|
214
212
|
}
|
|
215
213
|
/*-------------------------------------------------*/
|
|
216
214
|
/* L i f e c y c l e H o o k s */
|
|
@@ -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-7c514a30.js');
|
|
8
7
|
const GenericVariables = require('./GenericVariables-a9ed17ee.js');
|
|
9
8
|
|
|
10
9
|
/**
|
|
@@ -91,7 +90,7 @@ const KupLazy = class {
|
|
|
91
90
|
* @returns {Promise<GenericObject>} List of props as object, each key will be a prop.
|
|
92
91
|
*/
|
|
93
92
|
async getProps(descriptions) {
|
|
94
|
-
return
|
|
93
|
+
return kupManager.getProps(this, KupLazyProps, descriptions);
|
|
95
94
|
}
|
|
96
95
|
/**
|
|
97
96
|
* Returns the HTMLElement of the component to lazy load.
|
|
@@ -111,7 +110,7 @@ const KupLazy = class {
|
|
|
111
110
|
* @param {GenericObject} props - Object containing props that will be set to the component.
|
|
112
111
|
*/
|
|
113
112
|
async setProps(props) {
|
|
114
|
-
|
|
113
|
+
kupManager.setProps(this, KupLazyProps, props);
|
|
115
114
|
}
|
|
116
115
|
/*-------------------------------------------------*/
|
|
117
116
|
/* P r i v a t e M e t h o d s */
|
|
@@ -2,11 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
6
|
-
const kupManager = require('./kup-manager-
|
|
5
|
+
const index = require('./index-31125378.js');
|
|
6
|
+
const kupManager = require('./kup-manager-7c514a30.js');
|
|
7
7
|
const fButtonDeclarations = require('./f-button-declarations-b611587f.js');
|
|
8
|
-
const fImage = require('./f-image-
|
|
9
|
-
const utils = require('./utils-4b208b48.js');
|
|
8
|
+
const fImage = require('./f-image-0e71df7e.js');
|
|
10
9
|
const GenericVariables = require('./GenericVariables-a9ed17ee.js');
|
|
11
10
|
|
|
12
11
|
/**
|
|
@@ -77,7 +76,7 @@ const KupMagicBox = class {
|
|
|
77
76
|
* @returns {Promise<GenericObject>} List of props as object, each key will be a prop.
|
|
78
77
|
*/
|
|
79
78
|
async getProps(descriptions) {
|
|
80
|
-
return
|
|
79
|
+
return kupManager.getProps(this, KupMagicBoxProps, descriptions);
|
|
81
80
|
}
|
|
82
81
|
/**
|
|
83
82
|
* This method is used to trigger a new render of the component.
|
|
@@ -90,7 +89,7 @@ const KupMagicBox = class {
|
|
|
90
89
|
* @param {GenericObject} props - Object containing props that will be set to the component.
|
|
91
90
|
*/
|
|
92
91
|
async setProps(props) {
|
|
93
|
-
|
|
92
|
+
kupManager.setProps(this, KupMagicBoxProps, props);
|
|
94
93
|
}
|
|
95
94
|
/*-------------------------------------------------*/
|
|
96
95
|
/* P r i v a t e M e t h o d s */
|