@sme.up/ketchup 9.6.4 → 9.6.5
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/{bar.helpers-f46a5a83.js → bar.helpers-c481a535.js} +45 -13
- package/dist/cjs/{f-button-89de2403.js → f-button-23ec3db5.js} +1 -1
- package/dist/cjs/{f-cell-75dbd6eb.js → f-cell-bcc51c0f.js} +5 -5
- package/dist/cjs/{f-chip-08857345.js → f-chip-63363ecf.js} +2 -2
- package/dist/cjs/{f-image-a41d7f1e.js → f-image-f3944c01.js} +2 -5
- package/dist/cjs/{f-paginator-utils-ff07301e.js → f-paginator-utils-60e05759.js} +2 -2
- package/dist/cjs/{f-text-field-eb207a83.js → f-text-field-354b6c78.js} +1 -1
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/ketchup.cjs.js +1 -1
- package/dist/cjs/kup-accordion.cjs.entry.js +2 -2
- package/dist/cjs/kup-autocomplete_27.cjs.entry.js +46 -46
- package/dist/cjs/kup-box.cjs.entry.js +7 -7
- package/dist/cjs/kup-calendar.cjs.entry.js +4 -4
- package/dist/cjs/kup-card-list.cjs.entry.js +1 -1
- package/dist/cjs/kup-cell.cjs.entry.js +6 -6
- package/dist/cjs/kup-custom-task-list-header_4.cjs.entry.js +253 -37
- package/dist/cjs/kup-dashboard.cjs.entry.js +4 -4
- package/dist/cjs/kup-drawer.cjs.entry.js +1 -1
- package/dist/cjs/kup-echart.cjs.entry.js +1 -1
- package/dist/cjs/kup-editor.cjs.entry.js +1 -1
- package/dist/cjs/kup-family-tree.cjs.entry.js +3 -3
- package/dist/cjs/kup-gantt_10.cjs.entry.js +104 -38
- package/dist/cjs/kup-grid.cjs.entry.js +1 -1
- package/dist/cjs/kup-iframe.cjs.entry.js +1 -1
- package/dist/cjs/kup-image-list.cjs.entry.js +20 -13
- package/dist/cjs/kup-input-panel.cjs.entry.js +199 -53
- package/dist/cjs/kup-lazy.cjs.entry.js +1 -1
- package/dist/cjs/kup-magic-box.cjs.entry.js +2 -2
- package/dist/cjs/{kup-manager-abfe4ddd.js → kup-manager-e1bfd4f8.js} +647 -120
- package/dist/cjs/kup-nav-bar.cjs.entry.js +1 -1
- package/dist/cjs/kup-numeric-picker.cjs.entry.js +2 -2
- package/dist/cjs/kup-pdf.cjs.entry.js +1 -1
- package/dist/cjs/kup-photo-frame.cjs.entry.js +1 -1
- package/dist/cjs/{kup-planner-declarations-d3dec885.js → kup-planner-declarations-cb33663d.js} +3 -0
- package/dist/cjs/{kup-planner-renderer-helper-9f776d6e.js → kup-planner-renderer-helper-f001fad7.js} +55 -7
- package/dist/cjs/kup-planner-renderer.cjs.entry.js +43 -10
- package/dist/cjs/{kup-planner-time-formatter-a74e70f0.js → kup-planner-time-formatter-b7dca3ea.js} +3 -0
- package/dist/cjs/kup-planner.cjs.entry.js +80 -8
- 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 +4 -4
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/assets/image-list.js +332 -2
- package/dist/collection/assets/input-panel.js +307 -76
- package/dist/collection/assets/planner-example-5.js +19 -7
- package/dist/collection/assets/planner-example-6.js +3 -0
- package/dist/collection/assets/planner.js +4 -3
- package/dist/collection/components/kup-badge/kup-badge.css +4 -4
- package/dist/collection/components/kup-image-list/kup-image-list.css +37 -4
- package/dist/collection/components/kup-image-list/kup-image-list.js +15 -8
- package/dist/collection/components/kup-input-panel/kup-input-panel-declarations.js +1 -1
- package/dist/collection/components/kup-input-panel/kup-input-panel.css +38 -1
- package/dist/collection/components/kup-input-panel/kup-input-panel.e2e.js +69 -28
- package/dist/collection/components/kup-input-panel/kup-input-panel.js +206 -59
- package/dist/collection/components/kup-planner/kup-planner-declarations.js +3 -0
- package/dist/collection/components/kup-planner/kup-planner-helper.js +42 -1
- package/dist/collection/components/kup-planner/kup-planner.js +191 -5
- package/dist/collection/components/kup-planner/utils/custom-task-list-table.js +103 -11
- package/dist/collection/components/kup-planner/utils/gantt-table.module.css +80 -2
- package/dist/collection/components/kup-planner/utils/helpers/bar.helpers.js +41 -13
- package/dist/collection/components/kup-planner/utils/helpers/other.helpers.js +3 -0
- package/dist/collection/components/kup-planner/utils/kup-gantt/kup-gantt.css +10 -0
- package/dist/collection/components/kup-planner/utils/kup-gantt/kup-gantt.js +61 -6
- package/dist/collection/components/kup-planner/utils/kup-gantt-calendar/kup-gantt-calendar.js +32 -2
- package/dist/collection/components/kup-planner/utils/kup-grid-renderer/kup-grid-renderer.css +4 -0
- package/dist/collection/components/kup-planner/utils/kup-grid-renderer/kup-grid-renderer.js +208 -24
- package/dist/collection/components/kup-planner/utils/kup-horizontal-scroll/kup-horizontal-scroll.css +4 -0
- package/dist/collection/components/kup-planner/utils/kup-horizontal-scroll/kup-horizontal-scroll.js +131 -7
- package/dist/collection/components/kup-planner/utils/kup-planner-renderer-helper.js +55 -6
- package/dist/collection/components/kup-planner/utils/kup-planner-renderer.js +40 -7
- package/dist/collection/components/kup-planner/utils/kup-switcher/kup-switcher.css +22 -15
- package/dist/collection/components/kup-planner/utils/kup-switcher/kup-switcher.js +21 -5
- package/dist/collection/components/kup-planner/utils/kup-task-gantt/kup-task-gantt.js +19 -3
- package/dist/collection/components/kup-planner/utils/kup-task-list/kup-task-list-header.js +7 -7
- package/dist/collection/components/kup-planner/utils/kup-task-list/kup-task-list-table.js +1 -1
- package/dist/collection/components/kup-planner/utils/kup-task-list/kup-task-list.js +76 -2
- package/dist/collection/components/kup-planner/utils/kup-tooltip/kup-standard-tooltip.js +1 -1
- package/dist/collection/components/kup-planner/utils/kup-tooltip/kup-tooltip.js +1 -1
- package/dist/collection/components/kup-planner/utils/kup-vertical-scroll/kup-vertical-scroll.js +2 -2
- package/dist/collection/components/kup-probe/kup-probe.js +1 -1
- package/dist/collection/components/kup-progress-bar/kup-progress-bar.js +1 -1
- package/dist/collection/components/kup-qlik/kup-qlik.js +1 -1
- package/dist/collection/components/kup-rating/kup-rating.js +1 -1
- package/dist/collection/components/kup-snackbar/kup-snackbar.js +1 -1
- package/dist/collection/components/kup-spinner/kup-spinner.js +34 -34
- package/dist/collection/components/kup-switch/kup-switch.js +1 -1
- package/dist/collection/components/kup-time-picker/kup-time-picker.js +1 -1
- package/dist/collection/f-components/f-image/f-image.js +2 -5
- package/dist/components/_commonjsHelpers.js +26 -0
- package/dist/components/custom-task-list-table.js +58 -13
- package/dist/components/kup-autocomplete2.js +43 -45
- package/dist/components/kup-calendar.js +1 -1
- package/dist/components/kup-dates.js +2 -25
- package/dist/components/kup-editor.js +1 -1
- package/dist/components/kup-gantt-calendar2.js +31 -1
- package/dist/components/kup-gantt2.js +26 -7
- package/dist/components/kup-grid-renderer2.js +219 -81
- package/dist/components/kup-horizontal-scroll2.js +48 -10
- package/dist/components/kup-image-list.js +14 -7
- package/dist/components/kup-input-panel.js +192 -46
- package/dist/components/kup-manager.js +649 -121
- package/dist/components/kup-pdf.js +1 -1
- package/dist/components/kup-planner-declarations.js +91 -0
- package/dist/components/kup-planner-renderer2.js +42 -9
- package/dist/components/kup-planner.js +86 -6
- package/dist/components/kup-probe.js +1 -1
- package/dist/components/kup-qlik.js +1 -1
- package/dist/components/kup-snackbar.js +1 -1
- package/dist/components/kup-standard-tooltip2.js +1 -1
- package/dist/components/kup-switcher2.js +19 -7
- package/dist/components/kup-task-gantt2.js +6 -4
- package/dist/components/kup-task-list-header2.js +7 -7
- package/dist/components/kup-task-list-table2.js +1 -1
- package/dist/components/kup-task-list2.js +434 -84
- package/dist/components/kup-tooltip2.js +1 -1
- package/dist/components/kup-vertical-scroll2.js +2 -2
- package/dist/components/other.helpers.js +47 -0
- package/dist/esm/{bar.helpers-0898efb9.js → bar.helpers-23a51579.js} +45 -14
- package/dist/esm/{f-button-1eebd42e.js → f-button-d6dbcfd6.js} +1 -1
- package/dist/esm/{f-cell-af19d5c7.js → f-cell-7b41415c.js} +5 -5
- package/dist/esm/{f-chip-9e5fdb25.js → f-chip-68d27d7a.js} +2 -2
- package/dist/esm/{f-image-1e1ed567.js → f-image-a67229e5.js} +2 -5
- package/dist/esm/{f-paginator-utils-dede029b.js → f-paginator-utils-8773e358.js} +2 -2
- package/dist/esm/{f-text-field-802b45fb.js → f-text-field-d364ffd2.js} +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/ketchup.js +1 -1
- package/dist/esm/kup-accordion.entry.js +2 -2
- package/dist/esm/kup-autocomplete_27.entry.js +46 -46
- package/dist/esm/kup-box.entry.js +7 -7
- package/dist/esm/kup-calendar.entry.js +4 -4
- package/dist/esm/kup-card-list.entry.js +1 -1
- package/dist/esm/kup-cell.entry.js +6 -6
- package/dist/esm/kup-custom-task-list-header_4.entry.js +253 -37
- package/dist/esm/kup-dashboard.entry.js +4 -4
- package/dist/esm/kup-drawer.entry.js +1 -1
- package/dist/esm/kup-echart.entry.js +1 -1
- package/dist/esm/kup-editor.entry.js +1 -1
- package/dist/esm/kup-family-tree.entry.js +3 -3
- package/dist/esm/kup-gantt_10.entry.js +105 -39
- package/dist/esm/kup-grid.entry.js +1 -1
- package/dist/esm/kup-iframe.entry.js +1 -1
- package/dist/esm/kup-image-list.entry.js +20 -13
- package/dist/esm/kup-input-panel.entry.js +199 -53
- package/dist/esm/kup-lazy.entry.js +1 -1
- package/dist/esm/kup-magic-box.entry.js +2 -2
- package/dist/esm/{kup-manager-dd24fb5a.js → kup-manager-a316a70e.js} +647 -120
- package/dist/esm/kup-nav-bar.entry.js +1 -1
- package/dist/esm/kup-numeric-picker.entry.js +2 -2
- package/dist/esm/kup-pdf.entry.js +1 -1
- package/dist/esm/kup-photo-frame.entry.js +1 -1
- package/dist/esm/{kup-planner-declarations-b9345758.js → kup-planner-declarations-398babf9.js} +3 -0
- package/dist/esm/{kup-planner-renderer-helper-b4727e44.js → kup-planner-renderer-helper-a2ec9a1c.js} +56 -7
- package/dist/esm/kup-planner-renderer.entry.js +43 -10
- package/dist/esm/{kup-planner-time-formatter-a68e05ba.js → kup-planner-time-formatter-ddf84f9b.js} +1 -1
- package/dist/esm/kup-planner.entry.js +80 -8
- 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 -4
- package/dist/esm/loader.js +1 -1
- package/dist/ketchup/index.esm.js +1 -1
- package/dist/ketchup/ketchup.esm.js +1 -1
- package/dist/ketchup/p-008bdcdc.js +1 -0
- package/dist/ketchup/p-042e874a.entry.js +1 -0
- package/dist/ketchup/{p-b3b50bb5.entry.js → p-074ccd53.entry.js} +1 -1
- package/dist/ketchup/{p-26d42b88.entry.js → p-1088ab22.entry.js} +1 -1
- package/dist/ketchup/{p-201f8d7b.entry.js → p-1bcac01f.entry.js} +1 -1
- package/dist/ketchup/{p-3b544027.entry.js → p-1e028d95.entry.js} +1 -1
- package/dist/ketchup/p-25058baa.js +1 -0
- package/dist/ketchup/{p-dcf7e9b6.entry.js → p-2932e7e8.entry.js} +1 -1
- package/dist/ketchup/{p-b238cde7.entry.js → p-2b84db7b.entry.js} +1 -1
- package/dist/ketchup/{p-f998ff28.entry.js → p-2ef90f60.entry.js} +1 -1
- package/dist/ketchup/{p-8fcdf454.js → p-339bbeae.js} +1 -1
- package/dist/ketchup/{p-cd7fec02.entry.js → p-48e45ac0.entry.js} +1 -1
- package/dist/ketchup/p-53af4c87.js +1 -0
- package/dist/ketchup/{p-6972fa0c.entry.js → p-556f7ddc.entry.js} +1 -1
- package/dist/ketchup/{p-e7507dd6.entry.js → p-5f7d8c21.entry.js} +1 -1
- package/dist/ketchup/{p-e0e47ca9.entry.js → p-6362738c.entry.js} +1 -1
- package/dist/ketchup/{p-a2e14d8b.entry.js → p-65e363c6.entry.js} +1 -1
- package/dist/ketchup/p-6921bc81.entry.js +16 -0
- package/dist/ketchup/p-6961e0ce.entry.js +1 -0
- package/dist/ketchup/p-7123d2a4.entry.js +1 -0
- package/dist/ketchup/{p-6c888179.js → p-801776bc.js} +1 -1
- package/dist/ketchup/{p-4f69f6f9.entry.js → p-81645576.entry.js} +1 -1
- package/dist/ketchup/p-838dea62.js +1 -0
- package/dist/ketchup/{p-924b841b.js → p-84b511e1.js} +1 -1
- package/dist/ketchup/{p-8229b97a.js → p-8d4050ec.js} +4 -4
- package/dist/ketchup/{p-79f4dc5b.entry.js → p-9e2533e1.entry.js} +1 -1
- package/dist/ketchup/{p-158076de.entry.js → p-a06974a3.entry.js} +1 -1
- package/dist/ketchup/p-a6beb822.js +1 -0
- package/dist/ketchup/p-abe181d0.entry.js +1 -0
- package/dist/ketchup/{p-61e8d573.js → p-b3540f83.js} +1 -1
- package/dist/ketchup/{p-19a13672.entry.js → p-c702eb45.entry.js} +1 -1
- package/dist/ketchup/{p-2e04042b.entry.js → p-ccb6dbb0.entry.js} +1 -1
- package/dist/ketchup/{p-a2e691b8.entry.js → p-cf44485a.entry.js} +2 -2
- package/dist/ketchup/{p-8f3d400a.entry.js → p-d2001dec.entry.js} +1 -1
- package/dist/ketchup/{p-34d70475.entry.js → p-dbb6cd8d.entry.js} +1 -1
- package/dist/ketchup/{p-2d4a9235.js → p-f6c8f006.js} +1 -1
- package/dist/ketchup/{p-43ce397b.entry.js → p-f79ffe77.entry.js} +1 -1
- package/dist/ketchup/{p-489af77f.entry.js → p-fdcfaedd.entry.js} +1 -1
- package/dist/ketchup/p-fe75ede2.entry.js +1 -0
- package/dist/types/components/kup-image-list/kup-image-list.d.ts +1 -1
- package/dist/types/components/kup-input-panel/kup-input-panel-declarations.d.ts +9 -7
- package/dist/types/components/kup-input-panel/kup-input-panel.d.ts +4 -4
- package/dist/types/components/kup-planner/kup-planner-declarations.d.ts +29 -2
- package/dist/types/components/kup-planner/kup-planner-helper.d.ts +2 -1
- package/dist/types/components/kup-planner/kup-planner.d.ts +38 -0
- package/dist/types/components/kup-planner/utils/custom-task-list-table.d.ts +7 -0
- package/dist/types/components/kup-planner/utils/helpers/bar.helpers.d.ts +1 -1
- package/dist/types/components/kup-planner/utils/helpers/other.helpers.d.ts +1 -0
- package/dist/types/components/kup-planner/utils/kup-gantt/kup-gantt.d.ts +6 -0
- package/dist/types/components/kup-planner/utils/kup-gantt-calendar/kup-gantt-calendar.d.ts +1 -0
- package/dist/types/components/kup-planner/utils/kup-grid-renderer/kup-grid-renderer.d.ts +13 -1
- package/dist/types/components/kup-planner/utils/kup-horizontal-scroll/kup-horizontal-scroll.d.ts +7 -0
- package/dist/types/components/kup-planner/utils/kup-planner-renderer-helper.d.ts +6 -2
- package/dist/types/components/kup-planner/utils/kup-planner-renderer.d.ts +1 -0
- package/dist/types/components/kup-planner/utils/kup-switcher/kup-switcher.d.ts +3 -1
- package/dist/types/components/kup-planner/utils/kup-task-gantt/kup-task-gantt.d.ts +1 -0
- package/dist/types/components/kup-planner/utils/kup-task-list/kup-task-list.d.ts +4 -0
- package/dist/types/components.d.ts +122 -16
- package/package.json +1 -1
- package/dist/components/kup-planner-renderer-helper.js +0 -379
- package/dist/ketchup/p-14943de9.entry.js +0 -1
- package/dist/ketchup/p-180cd7ab.entry.js +0 -1
- package/dist/ketchup/p-636be6f1.entry.js +0 -16
- package/dist/ketchup/p-63c141d9.entry.js +0 -1
- package/dist/ketchup/p-818e61d5.entry.js +0 -1
- package/dist/ketchup/p-8e3b6de8.js +0 -1
- package/dist/ketchup/p-a46f99d4.js +0 -1
- package/dist/ketchup/p-c0f660d6.js +0 -1
- package/dist/ketchup/p-e4c63684.js +0 -1
- package/dist/ketchup/p-e841c2ae.js +0 -1
- package/dist/ketchup/p-f9a7c21c.entry.js +0 -1
|
@@ -5,17 +5,26 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
5
5
|
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
6
6
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
7
7
|
};
|
|
8
|
-
var
|
|
8
|
+
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
9
|
+
if (kind === "m")
|
|
10
|
+
throw new TypeError("Private method is not writable");
|
|
11
|
+
if (kind === "a" && !f)
|
|
12
|
+
throw new TypeError("Private accessor was defined without a setter");
|
|
13
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
14
|
+
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
15
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
16
|
+
};
|
|
17
|
+
var _KupInputPanel_instances, _KupInputPanel_kupManager, _KupInputPanel_optionsAdapterMap, _KupInputPanel_originalData, _KupInputPanel_renderRow, _KupInputPanel_renderCell, _KupInputPanel_renderSection, _KupInputPanel_renderField, _KupInputPanel_mapCells, _KupInputPanel_reverseMapCells, _KupInputPanel_mapData, _KupInputPanel_slotData, _KupInputPanel_CHIAdapter, _KupInputPanel_GRAAdapter, _KupInputPanel_BTNAdapter, _KupInputPanel_CMBandACPAdapter, _KupInputPanel_CHKAdapter, _KupInputPanel_CLPAdapter, _KupInputPanel_ITXAdapter, _KupInputPanel_RADAdapter, _KupInputPanel_optionsTreeComboAdapter, _KupInputPanel_treeOptionsNodeAdapter, _KupInputPanel_tableOptionsAdapter;
|
|
9
18
|
import { Host, forceUpdate, h, } from "@stencil/core";
|
|
10
|
-
import { KupInputPanelProps, } from "./kup-input-panel-declarations";
|
|
11
|
-
import { kupManagerInstance, } from "../../managers/kup-manager/kup-manager";
|
|
12
|
-
import { componentWrapperId } from "../../variables/GenericVariables";
|
|
13
19
|
import { FButton } from "../../f-components/f-button/f-button";
|
|
14
|
-
import {
|
|
20
|
+
import { FCell } from "../../f-components/f-cell/f-cell";
|
|
15
21
|
import { FCellTypes, } from "../../f-components/f-cell/f-cell-declarations";
|
|
16
22
|
import { FTextFieldMDC } from "../../f-components/f-text-field/f-text-field-mdc";
|
|
17
|
-
import {
|
|
23
|
+
import { KupLanguageGeneric } from "../../managers/kup-language/kup-language-declarations";
|
|
24
|
+
import { kupManagerInstance, } from "../../managers/kup-manager/kup-manager";
|
|
18
25
|
import { getProps, setProps } from "../../utils/utils";
|
|
26
|
+
import { componentWrapperId } from "../../variables/GenericVariables";
|
|
27
|
+
import { KupInputPanelProps, } from "./kup-input-panel-declarations";
|
|
19
28
|
const dom = document.documentElement;
|
|
20
29
|
export class KupInputPanel {
|
|
21
30
|
constructor() {
|
|
@@ -26,11 +35,16 @@ export class KupInputPanel {
|
|
|
26
35
|
/* I n t e r n a l V a r i a b l e s */
|
|
27
36
|
/*-------------------------------------------------*/
|
|
28
37
|
_KupInputPanel_kupManager.set(this, kupManagerInstance());
|
|
38
|
+
_KupInputPanel_optionsAdapterMap.set(this, new Map([
|
|
39
|
+
['SmeupTree', __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_treeOptionsNodeAdapter).bind(this)],
|
|
40
|
+
['SmeupTable', __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_tableOptionsAdapter).bind(this)],
|
|
41
|
+
]));
|
|
42
|
+
_KupInputPanel_originalData.set(this, null);
|
|
29
43
|
this.customStyle = '';
|
|
30
44
|
this.data = null;
|
|
31
45
|
this.hiddenSubmitButton = false;
|
|
32
46
|
this.submitCb = null;
|
|
33
|
-
this.
|
|
47
|
+
this.optionsHandler = null;
|
|
34
48
|
this.inputPanelCells = [];
|
|
35
49
|
}
|
|
36
50
|
//#endregion
|
|
@@ -39,6 +53,9 @@ export class KupInputPanel {
|
|
|
39
53
|
/* W a t c h e r s */
|
|
40
54
|
/*-------------------------------------------------*/
|
|
41
55
|
onDataChanged() {
|
|
56
|
+
if (!__classPrivateFieldGet(this, _KupInputPanel_originalData, "f")) {
|
|
57
|
+
__classPrivateFieldSet(this, _KupInputPanel_originalData, structuredClone(this.data), "f");
|
|
58
|
+
}
|
|
42
59
|
__classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_mapCells).call(this, this.data);
|
|
43
60
|
}
|
|
44
61
|
//#endregion
|
|
@@ -81,18 +98,22 @@ export class KupInputPanel {
|
|
|
81
98
|
componentDidLoad() {
|
|
82
99
|
this.kupReady.emit({ comp: this, id: this.rootElement.id });
|
|
83
100
|
__classPrivateFieldGet(this, _KupInputPanel_kupManager, "f").debug.logLoad(this, true);
|
|
84
|
-
this.handleEventsCallbacks.map((cbData) => {
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
}
|
|
101
|
+
// this.handleEventsCallbacks.map((cbData) => {
|
|
102
|
+
// this.rootElement.addEventListener(cbData.eventName, (e: any) => {
|
|
103
|
+
// const inputPanelEvent: InputPanelEvent = {
|
|
104
|
+
// state: this.inputPanelCells.find((data) =>
|
|
105
|
+
// data.cells.find(
|
|
106
|
+
// (cell) => cell.column.name === e.detail.id
|
|
107
|
+
// )
|
|
108
|
+
// ).cells,
|
|
109
|
+
// data: {
|
|
110
|
+
// field: e.detail.id,
|
|
111
|
+
// value: e.detail.inputValue || e.detail.value,
|
|
112
|
+
// },
|
|
113
|
+
// };
|
|
114
|
+
// cbData.eventCallback(inputPanelEvent);
|
|
115
|
+
// });
|
|
116
|
+
// });
|
|
96
117
|
}
|
|
97
118
|
componentWillRender() {
|
|
98
119
|
__classPrivateFieldGet(this, _KupInputPanel_kupManager, "f").debug.logRender(this, false);
|
|
@@ -114,7 +135,7 @@ export class KupInputPanel {
|
|
|
114
135
|
h("p", null, __classPrivateFieldGet(this, _KupInputPanel_kupManager, "f").language.translate(KupLanguageGeneric.EMPTY_DATA)),
|
|
115
136
|
]
|
|
116
137
|
: this.inputPanelCells.map((inputPanelCell) => __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_renderRow).call(this, inputPanelCell));
|
|
117
|
-
return (h(Host, { key: '
|
|
138
|
+
return (h(Host, { key: 'fb64cbdffc9e56a3318eaef42d7b71e815d21f58' }, h("style", { key: 'e3501f7c56bbb5058dd99c727b2813411b45e519' }, __classPrivateFieldGet(this, _KupInputPanel_kupManager, "f").theme.setKupStyle(this.rootElement)), h("div", { key: '06eb5a7b6822a9518d9d7ff75652df91f69fbd74', id: componentWrapperId }, inputPanelContent)));
|
|
118
139
|
}
|
|
119
140
|
disconnectedCallback() {
|
|
120
141
|
__classPrivateFieldGet(this, _KupInputPanel_kupManager, "f").language.unregister(this);
|
|
@@ -208,12 +229,13 @@ export class KupInputPanel {
|
|
|
208
229
|
"type": "unknown",
|
|
209
230
|
"mutable": false,
|
|
210
231
|
"complexType": {
|
|
211
|
-
"original": "(e:
|
|
212
|
-
"resolved": "(e:
|
|
232
|
+
"original": "(e: KupInputPanelSubmit) => unknown",
|
|
233
|
+
"resolved": "(e: KupInputPanelSubmit) => unknown",
|
|
213
234
|
"references": {
|
|
214
|
-
"
|
|
215
|
-
"location": "
|
|
216
|
-
"
|
|
235
|
+
"KupInputPanelSubmit": {
|
|
236
|
+
"location": "import",
|
|
237
|
+
"path": "./kup-input-panel-declarations",
|
|
238
|
+
"id": "src/components/kup-input-panel/kup-input-panel-declarations.ts::KupInputPanelSubmit"
|
|
217
239
|
}
|
|
218
240
|
}
|
|
219
241
|
},
|
|
@@ -228,17 +250,17 @@ export class KupInputPanel {
|
|
|
228
250
|
},
|
|
229
251
|
"defaultValue": "null"
|
|
230
252
|
},
|
|
231
|
-
"
|
|
253
|
+
"optionsHandler": {
|
|
232
254
|
"type": "unknown",
|
|
233
255
|
"mutable": false,
|
|
234
256
|
"complexType": {
|
|
235
|
-
"original": "
|
|
236
|
-
"resolved": "
|
|
257
|
+
"original": "InputPanelOptionsHandler",
|
|
258
|
+
"resolved": "(fun: string) => Promise<GenericObject>",
|
|
237
259
|
"references": {
|
|
238
|
-
"
|
|
260
|
+
"InputPanelOptionsHandler": {
|
|
239
261
|
"location": "import",
|
|
240
262
|
"path": "./kup-input-panel-declarations",
|
|
241
|
-
"id": "src/components/kup-input-panel/kup-input-panel-declarations.ts::
|
|
263
|
+
"id": "src/components/kup-input-panel/kup-input-panel-declarations.ts::InputPanelOptionsHandler"
|
|
242
264
|
}
|
|
243
265
|
}
|
|
244
266
|
},
|
|
@@ -249,9 +271,9 @@ export class KupInputPanel {
|
|
|
249
271
|
"name": "default",
|
|
250
272
|
"text": "[]"
|
|
251
273
|
}],
|
|
252
|
-
"text": "Sets the
|
|
274
|
+
"text": "Sets the callback function on loading options via FUN"
|
|
253
275
|
},
|
|
254
|
-
"defaultValue": "
|
|
276
|
+
"defaultValue": "null"
|
|
255
277
|
}
|
|
256
278
|
};
|
|
257
279
|
}
|
|
@@ -374,18 +396,29 @@ export class KupInputPanel {
|
|
|
374
396
|
}];
|
|
375
397
|
}
|
|
376
398
|
}
|
|
377
|
-
_KupInputPanel_kupManager = new WeakMap(), _KupInputPanel_instances = new WeakSet(), _KupInputPanel_renderRow = function _KupInputPanel_renderRow(inputPanelCell) {
|
|
399
|
+
_KupInputPanel_kupManager = new WeakMap(), _KupInputPanel_optionsAdapterMap = new WeakMap(), _KupInputPanel_originalData = new WeakMap(), _KupInputPanel_instances = new WeakSet(), _KupInputPanel_renderRow = function _KupInputPanel_renderRow(inputPanelCell) {
|
|
378
400
|
var _a;
|
|
379
|
-
|
|
380
|
-
const horizontal = (
|
|
381
|
-
|
|
401
|
+
const layout = inputPanelCell.row.layout;
|
|
402
|
+
const horizontal = (layout === null || layout === void 0 ? void 0 : layout.horizontal) || false;
|
|
403
|
+
let rowContent;
|
|
404
|
+
if (!((_a = layout === null || layout === void 0 ? void 0 : layout.sections) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
405
|
+
rowContent = inputPanelCell.cells.map((cell) => __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_renderCell).call(this, cell.cell, inputPanelCell.row, cell.column));
|
|
406
|
+
}
|
|
407
|
+
else {
|
|
408
|
+
rowContent = layout.sections.map((section) => __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_renderSection).call(this, inputPanelCell, section));
|
|
409
|
+
}
|
|
382
410
|
const classObj = {
|
|
383
|
-
form: true,
|
|
384
411
|
'input-panel': true,
|
|
385
|
-
'
|
|
412
|
+
'input-panel--column': !horizontal,
|
|
386
413
|
};
|
|
387
414
|
// We create a form for each row in data
|
|
388
|
-
return (h("form", { class: classObj, name: this.rootElement.id, onSubmit:
|
|
415
|
+
return (h("form", { class: classObj, name: this.rootElement.id, onSubmit: (e) => {
|
|
416
|
+
e.preventDefault();
|
|
417
|
+
this.submitCb({
|
|
418
|
+
before: Object.assign({}, __classPrivateFieldGet(this, _KupInputPanel_originalData, "f")),
|
|
419
|
+
after: __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_reverseMapCells).call(this),
|
|
420
|
+
});
|
|
421
|
+
} }, rowContent, !this.hiddenSubmitButton ? (h(FButton, { buttonType: "submit", label: __classPrivateFieldGet(this, _KupInputPanel_kupManager, "f").language.translate(KupLanguageGeneric.CONFIRM), wrapperClass: "form__submit" })) : null));
|
|
389
422
|
}, _KupInputPanel_renderCell = function _KupInputPanel_renderCell(cell, row, column) {
|
|
390
423
|
const cellProps = {
|
|
391
424
|
cell,
|
|
@@ -397,6 +430,52 @@ _KupInputPanel_kupManager = new WeakMap(), _KupInputPanel_instances = new WeakSe
|
|
|
397
430
|
setSizes: true,
|
|
398
431
|
};
|
|
399
432
|
return h(FCell, Object.assign({}, cellProps));
|
|
433
|
+
}, _KupInputPanel_renderSection = function _KupInputPanel_renderSection(cells, section) {
|
|
434
|
+
var _a, _b, _c, _d;
|
|
435
|
+
let content = [];
|
|
436
|
+
if ((_a = section.sections) === null || _a === void 0 ? void 0 : _a.length) {
|
|
437
|
+
content = section.sections.map((innerSection) => __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_renderSection).call(this, cells, innerSection));
|
|
438
|
+
}
|
|
439
|
+
else if ((_b = section.content) === null || _b === void 0 ? void 0 : _b.length) {
|
|
440
|
+
content = section.content.map((field) => __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_renderField).call(this, cells, field));
|
|
441
|
+
}
|
|
442
|
+
const classObj = {
|
|
443
|
+
'input-panel__section': !section.horizontal,
|
|
444
|
+
'input-panel__horizontal-section': section.horizontal,
|
|
445
|
+
};
|
|
446
|
+
const styleObj = {
|
|
447
|
+
gap: section.gap ? `${section.gap}rem` : '',
|
|
448
|
+
'grid-template-columns': section.gridCols
|
|
449
|
+
? `repeat(${section.gridCols}, 1fr)`
|
|
450
|
+
: '',
|
|
451
|
+
'grid-template-rows': section.gridRows
|
|
452
|
+
? `repeat(${section.gridRows}, 1fr)`
|
|
453
|
+
: '',
|
|
454
|
+
};
|
|
455
|
+
if ((_d = (_c = cells.row) === null || _c === void 0 ? void 0 : _c.layout) === null || _d === void 0 ? void 0 : _d.horizontal) {
|
|
456
|
+
styleObj.maxWidth = section.dim;
|
|
457
|
+
}
|
|
458
|
+
else {
|
|
459
|
+
styleObj.maxHeight = section.dim;
|
|
460
|
+
}
|
|
461
|
+
return (h("div", { class: classObj, style: styleObj }, content));
|
|
462
|
+
}, _KupInputPanel_renderField = function _KupInputPanel_renderField(cells, field) {
|
|
463
|
+
const fieldCell = cells.cells.find((cell) => cell.column.name === field.id);
|
|
464
|
+
const colStart = field.colSpan
|
|
465
|
+
? `span ${field.colSpan}`
|
|
466
|
+
: `${field.colStart}`;
|
|
467
|
+
const colEnd = field.colEnd ? `${field.colEnd}` : '';
|
|
468
|
+
const rowStart = field.rowSpan
|
|
469
|
+
? `span ${field.rowSpan}`
|
|
470
|
+
: `${field.rowStart}`;
|
|
471
|
+
const rowEnd = field.rowEnd ? `${field.rowEnd}` : '';
|
|
472
|
+
const styleObj = {
|
|
473
|
+
'grid-column-start': colStart,
|
|
474
|
+
'grid-column-end': colEnd,
|
|
475
|
+
'grid-row-start': rowStart,
|
|
476
|
+
'grid-row-end': rowEnd,
|
|
477
|
+
};
|
|
478
|
+
return (h("div", { style: styleObj }, __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_renderCell).call(this, fieldCell.cell, cells.row, fieldCell.column)));
|
|
400
479
|
}, _KupInputPanel_mapCells = function _KupInputPanel_mapCells(data) {
|
|
401
480
|
var _a;
|
|
402
481
|
const inpuPanelCells = ((_a = data === null || data === void 0 ? void 0 : data.rows) === null || _a === void 0 ? void 0 : _a.length)
|
|
@@ -404,7 +483,7 @@ _KupInputPanel_kupManager = new WeakMap(), _KupInputPanel_instances = new WeakSe
|
|
|
404
483
|
const cells = data.columns
|
|
405
484
|
.filter((column) => column.visible)
|
|
406
485
|
.map((column) => {
|
|
407
|
-
const cell = row.cells[column.name];
|
|
486
|
+
const cell = structuredClone(row.cells[column.name]);
|
|
408
487
|
const mappedCell = Object.assign(Object.assign({}, cell), { data: Object.assign(Object.assign({}, __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_mapData).call(this, cell, column)), { id: column.name }), slotData: __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_slotData).call(this, cell, column), isEditable: cell.editable });
|
|
409
488
|
return { column, cell: mappedCell };
|
|
410
489
|
});
|
|
@@ -412,24 +491,49 @@ _KupInputPanel_kupManager = new WeakMap(), _KupInputPanel_instances = new WeakSe
|
|
|
412
491
|
}, [])
|
|
413
492
|
: [];
|
|
414
493
|
this.inputPanelCells = inpuPanelCells;
|
|
494
|
+
}, _KupInputPanel_reverseMapCells = function _KupInputPanel_reverseMapCells() {
|
|
495
|
+
return this.inputPanelCells.reduce((data, curr) => {
|
|
496
|
+
const updatedCells = Object.keys(curr.row.cells).reduce((cells, key) => {
|
|
497
|
+
const cellState = curr.cells.find((c) => c.column.name === key).cell;
|
|
498
|
+
return Object.assign(Object.assign({}, cells), { [key]: Object.assign(Object.assign({}, curr.row.cells[key]), { value: cellState.value, obj: cellState.obj }) });
|
|
499
|
+
}, {});
|
|
500
|
+
return {
|
|
501
|
+
columns: [
|
|
502
|
+
...data.columns,
|
|
503
|
+
...curr.cells.map((cell) => cell.column),
|
|
504
|
+
],
|
|
505
|
+
rows: [
|
|
506
|
+
...data.rows,
|
|
507
|
+
{
|
|
508
|
+
cells: updatedCells,
|
|
509
|
+
layout: curr.row.layout,
|
|
510
|
+
},
|
|
511
|
+
],
|
|
512
|
+
};
|
|
513
|
+
}, {
|
|
514
|
+
columns: [],
|
|
515
|
+
rows: [],
|
|
516
|
+
});
|
|
415
517
|
}, _KupInputPanel_mapData = function _KupInputPanel_mapData(cell, col) {
|
|
416
518
|
const options = cell.options;
|
|
417
519
|
const fieldLabel = col.title;
|
|
418
520
|
const currentValue = cell.value;
|
|
419
521
|
const cellType = dom.ketchup.data.cell.getType(cell, cell.shape);
|
|
420
522
|
const dataAdapterMap = new Map([
|
|
421
|
-
[FCellTypes.AUTOCOMPLETE, __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_CMBandACPAdapter)],
|
|
422
|
-
[FCellTypes.BUTTON_LIST, __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_BTNAdapter)],
|
|
423
|
-
[FCellTypes.CHART, __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_GRAAdapter)],
|
|
424
|
-
[FCellTypes.CHIP, __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_CHIAdapter)],
|
|
425
|
-
[FCellTypes.CHECKBOX, __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_CHKAdapter)],
|
|
426
|
-
[FCellTypes.COLOR_PICKER, __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_CLPAdapter)],
|
|
427
|
-
[FCellTypes.COMBOBOX, __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_CMBandACPAdapter)],
|
|
428
|
-
[FCellTypes.RADIO, __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_RADAdapter)],
|
|
429
|
-
[FCellTypes.STRING, __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_ITXAdapter)],
|
|
523
|
+
[FCellTypes.AUTOCOMPLETE, __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_CMBandACPAdapter).bind(this)],
|
|
524
|
+
[FCellTypes.BUTTON_LIST, __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_BTNAdapter).bind(this)],
|
|
525
|
+
[FCellTypes.CHART, __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_GRAAdapter).bind(this)],
|
|
526
|
+
[FCellTypes.CHIP, __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_CHIAdapter).bind(this)],
|
|
527
|
+
[FCellTypes.CHECKBOX, __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_CHKAdapter).bind(this)],
|
|
528
|
+
[FCellTypes.COLOR_PICKER, __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_CLPAdapter).bind(this)],
|
|
529
|
+
[FCellTypes.COMBOBOX, __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_CMBandACPAdapter).bind(this)],
|
|
530
|
+
[FCellTypes.RADIO, __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_RADAdapter).bind(this)],
|
|
531
|
+
[FCellTypes.STRING, __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_ITXAdapter).bind(this)],
|
|
430
532
|
]);
|
|
431
533
|
const adapter = dataAdapterMap.get(cellType);
|
|
432
|
-
return adapter
|
|
534
|
+
return adapter
|
|
535
|
+
? adapter(options, fieldLabel, currentValue, cell.fun)
|
|
536
|
+
: null;
|
|
433
537
|
}, _KupInputPanel_slotData = function _KupInputPanel_slotData(cell, col) {
|
|
434
538
|
const cellType = dom.ketchup.data.cell.getType(cell, cell.shape);
|
|
435
539
|
if (cellType !== FCellTypes.CHIP &&
|
|
@@ -475,8 +579,8 @@ _KupInputPanel_kupManager = new WeakMap(), _KupInputPanel_instances = new WeakSe
|
|
|
475
579
|
{ data: { dropdownOnly: false, label: 'Valerio' } },
|
|
476
580
|
],
|
|
477
581
|
};
|
|
478
|
-
}, _KupInputPanel_CMBandACPAdapter = function _KupInputPanel_CMBandACPAdapter(
|
|
479
|
-
|
|
582
|
+
}, _KupInputPanel_CMBandACPAdapter = function _KupInputPanel_CMBandACPAdapter(rawOptions, fieldLabel, currentValue, fun) {
|
|
583
|
+
const configCMandACP = {
|
|
480
584
|
data: {
|
|
481
585
|
'kup-text-field': {
|
|
482
586
|
trailingIcon: true,
|
|
@@ -485,17 +589,24 @@ _KupInputPanel_kupManager = new WeakMap(), _KupInputPanel_instances = new WeakSe
|
|
|
485
589
|
},
|
|
486
590
|
'kup-list': {
|
|
487
591
|
showIcons: true,
|
|
488
|
-
data:
|
|
489
|
-
? options.map((option) => ({
|
|
490
|
-
value: option.label,
|
|
491
|
-
id: option.id,
|
|
492
|
-
selected: currentValue === option.id,
|
|
493
|
-
}))
|
|
494
|
-
: [],
|
|
592
|
+
data: [],
|
|
495
593
|
},
|
|
496
594
|
},
|
|
497
595
|
label: fieldLabel,
|
|
498
596
|
};
|
|
597
|
+
const options = fun ? this.optionsHandler(fun) : rawOptions;
|
|
598
|
+
if (options instanceof Promise) {
|
|
599
|
+
options.then((data) => {
|
|
600
|
+
var _a;
|
|
601
|
+
return (configCMandACP.data['kup-list'].data =
|
|
602
|
+
(_a = __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_optionsTreeComboAdapter).call(this, data, currentValue)) !== null && _a !== void 0 ? _a : []);
|
|
603
|
+
});
|
|
604
|
+
}
|
|
605
|
+
else if (options) {
|
|
606
|
+
configCMandACP.data['kup-list'].data =
|
|
607
|
+
__classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_optionsTreeComboAdapter).call(this, options, currentValue);
|
|
608
|
+
}
|
|
609
|
+
return configCMandACP;
|
|
499
610
|
}, _KupInputPanel_CHKAdapter = function _KupInputPanel_CHKAdapter(_options, fieldLabel, currentValue) {
|
|
500
611
|
return {
|
|
501
612
|
checked: currentValue === 'on' || currentValue === '1',
|
|
@@ -519,4 +630,40 @@ _KupInputPanel_kupManager = new WeakMap(), _KupInputPanel_instances = new WeakSe
|
|
|
519
630
|
checked: option.id === currentValue,
|
|
520
631
|
})),
|
|
521
632
|
};
|
|
633
|
+
}, _KupInputPanel_optionsTreeComboAdapter = function _KupInputPanel_optionsTreeComboAdapter(options, currentValue) {
|
|
634
|
+
const adapter = __classPrivateFieldGet(this, _KupInputPanel_optionsAdapterMap, "f").get(options.type);
|
|
635
|
+
if (adapter) {
|
|
636
|
+
return adapter(options, currentValue);
|
|
637
|
+
}
|
|
638
|
+
else {
|
|
639
|
+
return options.map((option) => ({
|
|
640
|
+
value: option.label,
|
|
641
|
+
id: option.id,
|
|
642
|
+
selected: currentValue === option.id,
|
|
643
|
+
}));
|
|
644
|
+
}
|
|
645
|
+
}, _KupInputPanel_treeOptionsNodeAdapter = function _KupInputPanel_treeOptionsNodeAdapter(options, currentValue) {
|
|
646
|
+
return options.children.map((child) => {
|
|
647
|
+
var _a;
|
|
648
|
+
return ({
|
|
649
|
+
id: child.content.codice,
|
|
650
|
+
value: child.content.testo,
|
|
651
|
+
selected: currentValue === child.content.codice,
|
|
652
|
+
children: ((_a = child.children) === null || _a === void 0 ? void 0 : _a.length)
|
|
653
|
+
? __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_treeOptionsNodeAdapter).call(this, child, currentValue)
|
|
654
|
+
: [],
|
|
655
|
+
});
|
|
656
|
+
});
|
|
657
|
+
}, _KupInputPanel_tableOptionsAdapter = function _KupInputPanel_tableOptionsAdapter(options, currentValue) {
|
|
658
|
+
return options.rows
|
|
659
|
+
.filter((row) => row.fields)
|
|
660
|
+
.map(({ fields }) => {
|
|
661
|
+
const keys = Object.keys(fields);
|
|
662
|
+
return keys.map((key) => ({
|
|
663
|
+
id: fields[key].smeupObject.codice,
|
|
664
|
+
value: fields[key].smeupObject.testo,
|
|
665
|
+
selected: currentValue === fields[key].smeupObject.codice,
|
|
666
|
+
}));
|
|
667
|
+
})
|
|
668
|
+
.flat();
|
|
522
669
|
};
|
|
@@ -47,6 +47,8 @@ export var KupPlannerTaskAction;
|
|
|
47
47
|
KupPlannerTaskAction["onDblClick"] = "onDblClick";
|
|
48
48
|
KupPlannerTaskAction["onResize"] = "onResize";
|
|
49
49
|
KupPlannerTaskAction["onRightClick"] = "onRightClick";
|
|
50
|
+
KupPlannerTaskAction["onPhase"] = "onPhase";
|
|
51
|
+
KupPlannerTaskAction["onTask"] = "onTask";
|
|
50
52
|
})(KupPlannerTaskAction || (KupPlannerTaskAction = {}));
|
|
51
53
|
export var KupPlannerGanttRowType;
|
|
52
54
|
(function (KupPlannerGanttRowType) {
|
|
@@ -81,6 +83,7 @@ export const defaultStylingOptions = {
|
|
|
81
83
|
barProgressSelectedColor: '#A2A415',
|
|
82
84
|
barBackgroundColor: '#A2A415',
|
|
83
85
|
barBackgroundSelectedColor: '#A2A415',
|
|
86
|
+
barDropZoneColor: '#4d9f0240'
|
|
84
87
|
};
|
|
85
88
|
export const KUP_PLANNER_MAIN_GANTT_ID = 'main';
|
|
86
89
|
export const KUP_PLANNER_SECONDARY_GANTT_ID = 'secondary';
|
|
@@ -2,7 +2,7 @@ import { KupDatesFormats } from "../../managers/kup-dates/kup-dates-declarations
|
|
|
2
2
|
import { kupManagerInstance } from "../../managers/kup-manager/kup-manager";
|
|
3
3
|
import { getCellValueForDisplay } from "../../utils/cell-utils";
|
|
4
4
|
const kupManager = kupManagerInstance();
|
|
5
|
-
export function sanitizeAllDates(startDateCell, endDateCell, secStartDateCell, secEndDateCell) {
|
|
5
|
+
export function sanitizeAllDates(startDateCell, endDateCell, secStartDateCell, secEndDateCell, startHourCell, endHourCell, secStartHourCell, secEndHourCell) {
|
|
6
6
|
const sanitizedDateValues = sanitizeDates(startDateCell, endDateCell);
|
|
7
7
|
let sanitizedSecDateValues = [];
|
|
8
8
|
if (secStartDateCell && secEndDateCell) {
|
|
@@ -13,9 +13,29 @@ export function sanitizeAllDates(startDateCell, endDateCell, secStartDateCell, s
|
|
|
13
13
|
sanitizedSecDateValues = [...sanitizedDateValues];
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
|
+
let sanitizedHourValues = [];
|
|
17
|
+
if (startHourCell && endHourCell) {
|
|
18
|
+
if (isAtLeastOneHourValid(startHourCell, endHourCell)) {
|
|
19
|
+
sanitizedHourValues = sanitizeHours(startHourCell, endHourCell);
|
|
20
|
+
}
|
|
21
|
+
else {
|
|
22
|
+
sanitizedSecDateValues = [...sanitizedDateValues];
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
let sanitizedSecHourValues = [];
|
|
26
|
+
if (secStartHourCell && secEndHourCell) {
|
|
27
|
+
if (isAtLeastOneHourValid(secStartHourCell, secEndHourCell)) {
|
|
28
|
+
sanitizedSecHourValues = sanitizeHours(secStartHourCell, secEndHourCell);
|
|
29
|
+
}
|
|
30
|
+
else {
|
|
31
|
+
sanitizedSecDateValues = [...sanitizedDateValues];
|
|
32
|
+
}
|
|
33
|
+
}
|
|
16
34
|
return {
|
|
17
35
|
dateValues: sanitizedDateValues,
|
|
18
36
|
secDateValues: sanitizedSecDateValues,
|
|
37
|
+
hourValues: sanitizedHourValues,
|
|
38
|
+
secHourValues: sanitizedSecHourValues
|
|
19
39
|
};
|
|
20
40
|
}
|
|
21
41
|
function sanitizeDates(startDateCell, endDateCell) {
|
|
@@ -33,13 +53,34 @@ function sanitizeDates(startDateCell, endDateCell) {
|
|
|
33
53
|
return returnValues;
|
|
34
54
|
}
|
|
35
55
|
}
|
|
56
|
+
function sanitizeHours(startHourCell, endHourCell) {
|
|
57
|
+
let returnValues = [startHourCell.value, endHourCell.value];
|
|
58
|
+
if (isHourValid(startHourCell) && isHourValid(endHourCell)) {
|
|
59
|
+
return returnValues;
|
|
60
|
+
}
|
|
61
|
+
else if (isHourValid(startHourCell)) {
|
|
62
|
+
return [startHourCell.value, startHourCell.value];
|
|
63
|
+
}
|
|
64
|
+
else if (isHourValid(endHourCell)) {
|
|
65
|
+
return [endHourCell.value, endHourCell.value];
|
|
66
|
+
}
|
|
67
|
+
else {
|
|
68
|
+
return returnValues;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
36
71
|
function isDateValid(dateCell) {
|
|
37
72
|
return (kupManager.objects.isDate(dateCell.obj) &&
|
|
38
73
|
kupManager.dates.isValid(dateCell.value, KupDatesFormats.ISO_DATE));
|
|
39
74
|
}
|
|
75
|
+
function isHourValid(dateCell) {
|
|
76
|
+
return (kupManager.objects.isTime(dateCell.obj) || kupManager.objects.isTimeWithSeconds(dateCell.obj));
|
|
77
|
+
}
|
|
40
78
|
export function isAtLeastOneDateValid(startDateCell, endDateCell) {
|
|
41
79
|
return isDateValid(startDateCell) || isDateValid(endDateCell);
|
|
42
80
|
}
|
|
81
|
+
export function isAtLeastOneHourValid(startHourCell, endHourCell) {
|
|
82
|
+
return isHourValid(startHourCell) || isHourValid(endHourCell);
|
|
83
|
+
}
|
|
43
84
|
export function getValuesToShow(row, idCol, nameCol, dataColumns, columns, customToValuesFunction) {
|
|
44
85
|
let toValuesFunction = () => columns.map((col) => {
|
|
45
86
|
return getCellValueForDisplay(dataColumns.find((kCol) => kCol.name == col), row.cells[col]);
|