@sme.up/ketchup 8.0.2 → 8.2.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/{GenericVariables-a9ed17ee.js → GenericVariables-9cd88034.js} +3 -3
- package/dist/cjs/{component-85c2bd4d.js → component-2c7ddef7.js} +91 -10
- package/dist/cjs/{f-button-9524bbf7.js → f-button-797c8e7f.js} +99 -99
- package/dist/cjs/{f-button-declarations-b611587f.js → f-button-declarations-76b4fb4c.js} +16 -16
- package/dist/cjs/{f-cell-bcb75ade.js → f-cell-9c8ed48b.js} +478 -472
- package/dist/cjs/{f-checkbox-1148e791.js → f-checkbox-cff77b2c.js} +23 -23
- package/dist/cjs/{f-chip-2249b386.js → f-chip-318863df.js} +125 -125
- package/dist/cjs/{f-image-47d74999.js → f-image-f10144e9.js} +107 -107
- package/dist/cjs/{f-paginator-utils-b0a9ae5f.js → f-paginator-utils-8c44a37b.js} +1548 -1548
- package/dist/cjs/{f-text-field-579c0fc0.js → f-text-field-9610c198.js} +172 -172
- package/dist/cjs/{f-text-field-mdc-0e22f3e3.js → f-text-field-mdc-d38d80b5.js} +59 -60
- package/dist/cjs/{index-1f177abc.js → index-a9a3b467.js} +93 -24
- package/dist/cjs/ketchup.cjs.js +3 -3
- package/dist/cjs/kup-accordion.cjs.entry.js +199 -200
- package/dist/cjs/kup-autocomplete_27.cjs.entry.js +17557 -17508
- package/dist/cjs/kup-box.cjs.entry.js +1289 -1232
- package/dist/cjs/kup-calendar.cjs.entry.js +9542 -10035
- package/dist/cjs/kup-cell.cjs.entry.js +172 -172
- package/dist/cjs/kup-dash-list.cjs.entry.js +106 -106
- package/dist/cjs/kup-dash_2.cjs.entry.js +162 -162
- package/dist/cjs/kup-dashboard.cjs.entry.js +400 -401
- package/dist/cjs/kup-drawer.cjs.entry.js +138 -138
- package/dist/cjs/kup-echart.cjs.entry.js +7228 -6598
- package/dist/cjs/kup-family-tree.cjs.entry.js +439 -439
- package/dist/cjs/kup-iframe.cjs.entry.js +94 -94
- package/dist/cjs/kup-image-list.cjs.entry.js +255 -256
- package/dist/cjs/kup-lazy.cjs.entry.js +186 -186
- package/dist/cjs/kup-magic-box.cjs.entry.js +298 -298
- package/dist/cjs/{kup-manager-85b2a756.js → kup-manager-7747decd.js} +7287 -7287
- package/dist/cjs/kup-nav-bar.cjs.entry.js +130 -130
- package/dist/cjs/kup-numeric-picker.cjs.entry.js +367 -368
- package/dist/cjs/kup-photo-frame.cjs.entry.js +144 -144
- package/dist/cjs/kup-planner.cjs.entry.js +1185 -1027
- package/dist/cjs/kup-probe.cjs.entry.js +246 -246
- package/dist/cjs/kup-qlik.cjs.entry.js +138 -138
- package/dist/cjs/kup-snackbar.cjs.entry.js +116 -116
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/collection/assets/dash-list.js +466 -293
- package/dist/collection/assets/data-table.js +45 -0
- package/dist/collection/assets/echart.js +176 -0
- package/dist/collection/assets/index.js +4 -0
- package/dist/collection/assets/planner.js +8189 -0
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/kup-accordion/kup-accordion-declarations.js +10 -10
- package/dist/collection/components/kup-accordion/kup-accordion.js +445 -445
- package/dist/collection/components/kup-autocomplete/kup-autocomplete-declarations.js +27 -27
- package/dist/collection/components/kup-autocomplete/kup-autocomplete.js +908 -908
- package/dist/collection/components/kup-badge/kup-badge-declarations.js +10 -10
- package/dist/collection/components/kup-badge/kup-badge.js +276 -276
- package/dist/collection/components/kup-box/kup-box-declarations.js +33 -33
- package/dist/collection/components/kup-box/kup-box-state.js +15 -15
- package/dist/collection/components/kup-box/kup-box.js +2134 -2079
- package/dist/collection/components/kup-button/kup-button-declarations.js +18 -18
- package/dist/collection/components/kup-button/kup-button.js +580 -580
- package/dist/collection/components/kup-button-list/kup-button-list-declarations.js +13 -13
- package/dist/collection/components/kup-button-list/kup-button-list.e2e.js +144 -0
- package/dist/collection/components/kup-button-list/kup-button-list.js +527 -527
- package/dist/collection/components/kup-calendar/kup-calendar-declarations.js +35 -35
- package/dist/collection/components/kup-calendar/kup-calendar.css +0 -4
- package/dist/collection/components/kup-calendar/kup-calendar.js +690 -690
- package/dist/collection/components/kup-card/box/kup-card-box.js +227 -227
- package/dist/collection/components/kup-card/built-in/kup-card-built-in.js +56 -56
- package/dist/collection/components/kup-card/built-in/kup-card-calendar.js +393 -393
- package/dist/collection/components/kup-card/built-in/kup-card-clock.js +308 -308
- package/dist/collection/components/kup-card/built-in/kup-card-column-drop-menu.js +165 -165
- package/dist/collection/components/kup-card/built-in/kup-card-message-box.js +10 -10
- package/dist/collection/components/kup-card/built-in/kup-card-numeric.js +118 -118
- package/dist/collection/components/kup-card/collapsible/kup-card-collapsible.js +64 -64
- package/dist/collection/components/kup-card/dialog/kup-card-dialog.js +217 -217
- package/dist/collection/components/kup-card/free/kup-card-free.js +22 -22
- package/dist/collection/components/kup-card/kup-card-declarations.js +98 -98
- package/dist/collection/components/kup-card/kup-card-helper.js +196 -196
- package/dist/collection/components/kup-card/kup-card.js +809 -809
- package/dist/collection/components/kup-card/scalable/kup-card-scalable.js +251 -251
- package/dist/collection/components/kup-card/standard/kup-card-standard.js +593 -593
- package/dist/collection/components/kup-cell/kup-cell-declarations.js +11 -11
- package/dist/collection/components/kup-cell/kup-cell.js +401 -401
- package/dist/collection/components/kup-chart/kup-chart-builder.js +93 -93
- package/dist/collection/components/kup-chart/kup-chart-declarations.js +49 -49
- package/dist/collection/components/kup-chart/kup-chart.js +1080 -1080
- package/dist/collection/components/kup-checkbox/kup-checkbox-declarations.js +13 -13
- package/dist/collection/components/kup-checkbox/kup-checkbox.js +433 -433
- package/dist/collection/components/kup-chip/kup-chip-declarations.js +12 -12
- package/dist/collection/components/kup-chip/kup-chip.js +558 -558
- package/dist/collection/components/kup-color-picker/kup-color-picker-declarations.js +12 -12
- package/dist/collection/components/kup-color-picker/kup-color-picker.js +546 -546
- package/dist/collection/components/kup-combobox/kup-combobox-declarations.js +15 -15
- package/dist/collection/components/kup-combobox/kup-combobox.js +821 -821
- package/dist/collection/components/kup-dash/kup-dash.js +171 -171
- package/dist/collection/components/kup-dash-list/kup-dash-list.js +327 -327
- package/dist/collection/components/kup-dashboard/kup-dashboard-declarations.js +10 -10
- package/dist/collection/components/kup-dashboard/kup-dashboard.js +588 -588
- package/dist/collection/components/kup-data-table/kup-data-table-declarations.js +157 -156
- package/dist/collection/components/kup-data-table/kup-data-table-helper.js +808 -808
- package/dist/collection/components/kup-data-table/kup-data-table-state.js +36 -36
- package/dist/collection/components/kup-data-table/kup-data-table.css +1 -0
- package/dist/collection/components/kup-data-table/kup-data-table.js +5572 -5527
- package/dist/collection/components/kup-date-picker/kup-date-picker-declarations.js +18 -18
- package/dist/collection/components/kup-date-picker/kup-date-picker.js +816 -816
- package/dist/collection/components/kup-dialog/kup-dialog-declarations.js +14 -14
- package/dist/collection/components/kup-dialog/kup-dialog.js +467 -467
- package/dist/collection/components/kup-drawer/kup-drawer-declarations.js +10 -10
- package/dist/collection/components/kup-drawer/kup-drawer.e2e.js +9 -0
- package/dist/collection/components/kup-drawer/kup-drawer.js +383 -383
- package/dist/collection/components/kup-dropdown-button/kup-dropdown-button-declarations.js +18 -18
- package/dist/collection/components/kup-dropdown-button/kup-dropdown-button.js +800 -800
- package/dist/collection/components/kup-echart/kup-echart-declarations.js +53 -52
- package/dist/collection/components/kup-echart/kup-echart.js +1519 -1437
- package/dist/collection/components/kup-family-tree/kup-family-tree-declarations.js +15 -15
- package/dist/collection/components/kup-family-tree/kup-family-tree.js +829 -829
- package/dist/collection/components/kup-form/kup-form-declarations.js +29 -29
- package/dist/collection/components/kup-form/kup-form.js +734 -731
- package/dist/collection/components/kup-gauge/kup-gauge-declarations.js +26 -26
- package/dist/collection/components/kup-gauge/kup-gauge.js +764 -764
- package/dist/collection/components/kup-grid/kup-grid-declarations.js +10 -10
- package/dist/collection/components/kup-grid/kup-grid.js +253 -253
- package/dist/collection/components/kup-iframe/kup-iframe-declarations.js +10 -10
- package/dist/collection/components/kup-iframe/kup-iframe.js +281 -281
- package/dist/collection/components/kup-image/canvas/kup-image-canvas-declarations.js +184 -184
- package/dist/collection/components/kup-image/canvas/kup-image-canvas-helper.js +19 -19
- package/dist/collection/components/kup-image/canvas/kup-image-canvas.js +225 -225
- package/dist/collection/components/kup-image/kup-image-declarations.js +16 -16
- package/dist/collection/components/kup-image/kup-image.js +491 -491
- package/dist/collection/components/kup-image-list/kup-image-list-declarations.js +10 -10
- package/dist/collection/components/kup-image-list/kup-image-list-state.js +9 -9
- package/dist/collection/components/kup-image-list/kup-image-list.js +533 -533
- package/dist/collection/components/kup-lazy/kup-lazy-declarations.js +20 -20
- package/dist/collection/components/kup-lazy/kup-lazy.js +430 -430
- package/dist/collection/components/kup-list/kup-list-declarations.js +34 -34
- package/dist/collection/components/kup-list/kup-list-helper.js +121 -121
- package/dist/collection/components/kup-list/kup-list.js +949 -949
- package/dist/collection/components/kup-magic-box/kup-magic-box-declarations.js +23 -23
- package/dist/collection/components/kup-magic-box/kup-magic-box.js +431 -431
- package/dist/collection/components/kup-nav-bar/kup-nav-bar-declarations.js +21 -21
- package/dist/collection/components/kup-nav-bar/kup-nav-bar.js +315 -315
- package/dist/collection/components/kup-numeric-picker/kup-numeric-picker-declarations.js +16 -16
- package/dist/collection/components/kup-numeric-picker/kup-numeric-picker.js +864 -864
- package/dist/collection/components/kup-photo-frame/kup-photo-frame-declarations.js +10 -10
- package/dist/collection/components/kup-photo-frame/kup-photo-frame.js +372 -372
- package/dist/collection/components/kup-planner/kup-planner-declarations.js +83 -76
- package/dist/collection/components/kup-planner/kup-planner-helper.js +54 -54
- package/dist/collection/components/kup-planner/kup-planner-state.js +16 -0
- package/dist/collection/components/kup-planner/kup-planner.css +2 -2
- package/dist/collection/components/kup-planner/kup-planner.js +1732 -1352
- package/dist/collection/components/kup-probe/kup-probe.js +358 -358
- package/dist/collection/components/kup-progress-bar/kup-progress-bar-declarations.js +14 -14
- package/dist/collection/components/kup-progress-bar/kup-progress-bar.js +405 -405
- package/dist/collection/components/kup-qlik/kup-qlik-declarations.js +1 -1
- package/dist/collection/components/kup-qlik/kup-qlik.js +326 -326
- package/dist/collection/components/kup-radio/kup-radio-declarations.js +12 -12
- package/dist/collection/components/kup-radio/kup-radio.js +398 -398
- package/dist/collection/components/kup-rating/kup-rating-declarations.js +11 -11
- package/dist/collection/components/kup-rating/kup-rating.js +332 -332
- package/dist/collection/components/kup-snackbar/kup-snackbar-declarations.js +13 -13
- package/dist/collection/components/kup-snackbar/kup-snackbar.js +389 -389
- package/dist/collection/components/kup-spinner/kup-spinner-declarations.js +15 -15
- package/dist/collection/components/kup-spinner/kup-spinner.js +468 -468
- package/dist/collection/components/kup-state/kup-state.js +1 -1
- package/dist/collection/components/kup-state/kup-store.js +1 -1
- package/dist/collection/components/kup-state/mock-store.js +13 -13
- package/dist/collection/components/kup-switch/kup-switch-declarations.js +12 -12
- package/dist/collection/components/kup-switch/kup-switch.js +402 -402
- package/dist/collection/components/kup-tab-bar/kup-tab-bar-declarations.js +10 -10
- package/dist/collection/components/kup-tab-bar/kup-tab-bar.js +443 -443
- package/dist/collection/components/kup-text-field/kup-text-field-declarations.js +35 -35
- package/dist/collection/components/kup-text-field/kup-text-field.js +1193 -1189
- package/dist/collection/components/kup-time-picker/kup-time-picker-declarations.js +14 -14
- package/dist/collection/components/kup-time-picker/kup-time-picker.js +921 -921
- package/dist/collection/components/kup-tree/kup-tree-declarations.js +43 -43
- package/dist/collection/components/kup-tree/kup-tree-faker.js +305 -305
- package/dist/collection/components/kup-tree/kup-tree-state.js +15 -15
- package/dist/collection/components/kup-tree/kup-tree.js +2479 -2479
- package/dist/collection/f-components/f-button/f-button-declarations.js +17 -17
- package/dist/collection/f-components/f-button/f-button.js +91 -91
- package/dist/collection/f-components/f-cell/f-cell-declarations.js +158 -158
- package/dist/collection/f-components/f-cell/f-cell.js +435 -429
- package/dist/collection/f-components/f-checkbox/f-checkbox-declarations.js +1 -1
- package/dist/collection/f-components/f-checkbox/f-checkbox.js +16 -16
- package/dist/collection/f-components/f-chip/f-chip-declarations.js +15 -15
- package/dist/collection/f-components/f-chip/f-chip.js +101 -101
- package/dist/collection/f-components/f-image/f-image-declarations.js +8 -8
- package/dist/collection/f-components/f-image/f-image.js +100 -100
- package/dist/collection/f-components/f-paginator/f-paginator-declarations.js +5 -5
- package/dist/collection/f-components/f-paginator/f-paginator-utils.js +28 -28
- package/dist/collection/f-components/f-paginator/f-paginator.js +86 -86
- package/dist/collection/f-components/f-switch/f-switch-declarations.js +1 -1
- package/dist/collection/f-components/f-switch/f-switch.js +12 -12
- package/dist/collection/f-components/f-text-field/f-text-field-declarations.js +1 -1
- package/dist/collection/f-components/f-text-field/f-text-field-mdc.js +29 -29
- package/dist/collection/f-components/f-text-field/f-text-field.js +151 -151
- package/dist/collection/managers/kup-data/kup-data-cell-helper.js +86 -86
- package/dist/collection/managers/kup-data/kup-data-column-helper.js +300 -300
- package/dist/collection/managers/kup-data/kup-data-declarations.js +10 -10
- package/dist/collection/managers/kup-data/kup-data-node-helper.js +165 -165
- package/dist/collection/managers/kup-data/kup-data-row-helper.js +28 -28
- package/dist/collection/managers/kup-data/kup-data.js +499 -499
- package/dist/collection/managers/kup-dates/kup-dates-declarations.js +43 -43
- package/dist/collection/managers/kup-dates/kup-dates.js +654 -654
- package/dist/collection/managers/kup-debug/kup-debug-declarations.js +20 -20
- package/dist/collection/managers/kup-debug/kup-debug.js +670 -670
- package/dist/collection/managers/kup-dynamic-position/kup-dynamic-position-declarations.js +27 -27
- package/dist/collection/managers/kup-dynamic-position/kup-dynamic-position.js +244 -244
- package/dist/collection/managers/kup-interact/kup-interact-declarations.js +49 -49
- package/dist/collection/managers/kup-interact/kup-interact.js +397 -397
- package/dist/collection/managers/kup-language/kup-language-declarations.js +211 -211
- package/dist/collection/managers/kup-language/kup-language.js +151 -151
- package/dist/collection/managers/kup-manager/kup-manager-declarations.js +1 -1
- package/dist/collection/managers/kup-manager/kup-manager.js +303 -303
- package/dist/collection/managers/kup-math/kup-math-declarations.js +13 -13
- package/dist/collection/managers/kup-math/kup-math-helper.js +39 -39
- package/dist/collection/managers/kup-math/kup-math.js +413 -413
- package/dist/collection/managers/kup-objects/kup-objects-declarations.js +1 -1
- package/dist/collection/managers/kup-objects/kup-objects.js +387 -387
- package/dist/collection/managers/kup-scroll-on-hover/kup-scroll-on-hover-declarations.js +10 -10
- package/dist/collection/managers/kup-scroll-on-hover/kup-scroll-on-hover.js +334 -334
- package/dist/collection/managers/kup-search/kup-search-declarations.js +1 -1
- package/dist/collection/managers/kup-search/kup-search.js +75 -75
- package/dist/collection/managers/kup-theme/kup-theme-declarations.js +177 -177
- package/dist/collection/managers/kup-theme/kup-theme.js +715 -715
- package/dist/collection/managers/kup-toolbar/kup-toolbar-declarations.js +9 -9
- package/dist/collection/managers/kup-toolbar/kup-toolbar.js +111 -111
- package/dist/collection/managers/kup-tooltip/kup-tooltip-declarations.js +1 -1
- package/dist/collection/managers/kup-tooltip/kup-tooltip.js +229 -229
- package/dist/collection/types/GenericTypes.js +54 -54
- package/dist/collection/utils/cell-utils.js +156 -156
- package/dist/collection/utils/filters/filters-column-menu.js +360 -360
- package/dist/collection/utils/filters/filters-declarations.js +25 -25
- package/dist/collection/utils/filters/filters-rows.js +238 -238
- package/dist/collection/utils/filters/filters-tree-items.js +117 -117
- package/dist/collection/utils/filters/filters.js +287 -287
- package/dist/collection/utils/kup-column-menu/kup-column-menu-declarations.js +20 -20
- package/dist/collection/utils/kup-column-menu/kup-column-menu.js +751 -751
- package/dist/collection/utils/utils.js +84 -80
- package/dist/collection/variables/GenericVariables.js +4 -4
- package/dist/components/kup-accordion.js +355 -355
- package/dist/components/kup-autocomplete2.js +31821 -31763
- package/dist/components/kup-box2.js +1463 -1405
- package/dist/components/kup-calendar.js +9788 -10280
- package/dist/components/kup-card.js +1 -1
- package/dist/components/kup-cell.js +325 -325
- package/dist/components/kup-chart.js +1 -1
- package/dist/components/kup-checkbox.js +1 -1
- package/dist/components/kup-chip.js +1 -1
- package/dist/components/kup-color-picker.js +1 -1
- package/dist/components/kup-combobox.js +1 -1
- package/dist/components/kup-dash-list.js +276 -276
- package/dist/components/kup-dash2.js +220 -220
- package/dist/components/kup-dashboard.js +549 -549
- package/dist/components/kup-data-table.js +1 -1
- package/dist/components/kup-date-picker.js +1 -1
- package/dist/components/kup-dialog.js +1 -1
- package/dist/components/kup-drawer.js +295 -295
- package/dist/components/kup-dropdown-button.js +1 -1
- package/dist/components/kup-echart2.js +7395 -6765
- package/dist/components/kup-family-tree.js +604 -604
- package/dist/components/kup-form.js +1 -1
- package/dist/components/kup-gauge.js +1 -1
- package/dist/components/kup-grid2.js +251 -251
- package/dist/components/kup-iframe.js +249 -249
- package/dist/components/kup-image-list.js +407 -407
- package/dist/components/kup-image.js +1 -1
- package/dist/components/kup-lazy.js +344 -344
- package/dist/components/kup-list.js +1 -1
- package/dist/components/kup-magic-box.js +461 -461
- package/dist/components/kup-nav-bar.js +284 -284
- package/dist/components/kup-numeric-picker.js +529 -529
- package/dist/components/kup-photo-frame.js +300 -300
- package/dist/components/kup-planner.js +1376 -1207
- package/dist/components/kup-probe.js +399 -399
- package/dist/components/kup-progress-bar.js +1 -1
- package/dist/components/kup-qlik.js +296 -296
- package/dist/components/kup-radio.js +1 -1
- package/dist/components/kup-rating.js +1 -1
- package/dist/components/kup-snackbar.js +273 -273
- package/dist/components/kup-spinner.js +1 -1
- package/dist/components/kup-switch.js +1 -1
- package/dist/components/kup-tab-bar.js +1 -1
- package/dist/components/kup-text-field.js +1 -1
- package/dist/components/kup-time-picker.js +1 -1
- package/dist/components/kup-tree.js +1 -1
- package/dist/esm/{GenericVariables-665de00a.js → GenericVariables-6dfdd433.js} +3 -3
- package/dist/esm/{component-120651a0.js → component-e86c51ea.js} +81 -2
- package/dist/esm/{f-button-declarations-b1b4cac4.js → f-button-declarations-fd4965d1.js} +16 -16
- package/dist/esm/{f-button-024f0cfe.js → f-button-e0e6f65f.js} +99 -99
- package/dist/esm/{f-cell-90240a8c.js → f-cell-359dfe28.js} +478 -472
- package/dist/esm/{f-checkbox-9b3f5f5b.js → f-checkbox-91358c27.js} +23 -23
- package/dist/esm/{f-chip-2238ad43.js → f-chip-0fd043b4.js} +125 -125
- package/dist/esm/{f-image-f2e9bf79.js → f-image-b853b0cc.js} +107 -107
- package/dist/esm/{f-paginator-utils-8cb3c023.js → f-paginator-utils-124c146a.js} +1548 -1548
- package/dist/esm/{f-text-field-d231982c.js → f-text-field-92bb3a1f.js} +172 -172
- package/dist/esm/{f-text-field-mdc-cee583ea.js → f-text-field-mdc-a1b4a919.js} +27 -28
- package/dist/esm/{index-8bd38435.js → index-bb15ce14.js} +93 -25
- package/dist/esm/ketchup.js +4 -4
- package/dist/esm/kup-accordion.entry.js +199 -200
- package/dist/esm/kup-autocomplete_27.entry.js +17557 -17508
- package/dist/esm/kup-box.entry.js +1289 -1232
- package/dist/esm/kup-calendar.entry.js +9557 -10050
- package/dist/esm/kup-cell.entry.js +172 -172
- package/dist/esm/kup-dash-list.entry.js +106 -106
- package/dist/esm/kup-dash_2.entry.js +162 -162
- package/dist/esm/kup-dashboard.entry.js +400 -401
- package/dist/esm/kup-drawer.entry.js +138 -138
- package/dist/esm/kup-echart.entry.js +7228 -6598
- package/dist/esm/kup-family-tree.entry.js +439 -439
- package/dist/esm/kup-iframe.entry.js +94 -94
- package/dist/esm/kup-image-list.entry.js +255 -256
- package/dist/esm/kup-lazy.entry.js +186 -186
- package/dist/esm/kup-magic-box.entry.js +298 -298
- package/dist/esm/{kup-manager-d1da769e.js → kup-manager-1e6ea451.js} +7288 -7287
- package/dist/esm/kup-nav-bar.entry.js +130 -130
- package/dist/esm/kup-numeric-picker.entry.js +367 -368
- package/dist/esm/kup-photo-frame.entry.js +144 -144
- package/dist/esm/kup-planner.entry.js +1185 -1027
- package/dist/esm/kup-probe.entry.js +246 -246
- package/dist/esm/kup-qlik.entry.js +138 -138
- package/dist/esm/kup-snackbar.entry.js +116 -116
- package/dist/esm/loader.js +4 -4
- package/dist/ketchup/ketchup.esm.js +1 -1
- package/dist/ketchup/{p-3cf64473.js → p-0143e942.js} +1 -1
- package/dist/ketchup/{p-5f3680f2.js → p-1ca9aece.js} +1 -1
- package/dist/ketchup/p-1cd5785e.entry.js +9 -0
- package/dist/ketchup/{p-410c102a.js → p-2ac2c05e.js} +1 -1
- package/dist/ketchup/{p-8b46e7ce.js → p-349d4715.js} +1 -1
- package/dist/ketchup/{p-83435e6c.entry.js → p-374f867e.entry.js} +1 -1
- package/dist/ketchup/{p-c42b80c1.entry.js → p-41c00681.entry.js} +1 -1
- package/dist/ketchup/p-5dbd4402.entry.js +1 -0
- package/dist/ketchup/{p-89743989.entry.js → p-620faa59.entry.js} +1 -1
- package/dist/ketchup/{p-10d84b1b.js → p-6507e9eb.js} +7 -6
- package/dist/ketchup/{p-a84f1d24.entry.js → p-6837f725.entry.js} +1 -1
- package/dist/ketchup/p-6d46cbb0.js +30 -0
- package/dist/ketchup/{p-e1f1e661.entry.js → p-6e79b764.entry.js} +1 -1
- package/dist/ketchup/{p-1ad628fb.entry.js → p-818a4a09.entry.js} +1 -1
- package/dist/ketchup/p-81e20baa.entry.js +1 -0
- package/dist/ketchup/p-85d6bb1f.entry.js +1 -0
- package/dist/ketchup/p-8c1804d7.entry.js +1 -0
- package/dist/ketchup/{p-163b18b9.entry.js → p-ad919f87.entry.js} +1 -1
- package/dist/ketchup/{p-651d89c8.entry.js → p-adad6804.entry.js} +1 -1
- package/dist/ketchup/{p-37067ee6.entry.js → p-adebe276.entry.js} +1 -1
- package/dist/ketchup/p-b5deb573.js +2 -0
- package/dist/ketchup/{p-f876125d.entry.js → p-b73b3b52.entry.js} +1 -1
- package/dist/ketchup/{p-0d7d59c7.entry.js → p-ba0c4019.entry.js} +1 -1
- package/dist/ketchup/p-c010483d.entry.js +25 -0
- package/dist/ketchup/p-c1b10c9c.entry.js +1 -0
- package/dist/ketchup/{p-063d4c27.entry.js → p-c28be862.entry.js} +1 -1
- package/dist/ketchup/p-c6088459.entry.js +39 -0
- package/dist/ketchup/{p-43b67de4.entry.js → p-cf24193b.entry.js} +1 -1
- package/dist/ketchup/p-e646523d.js +1 -0
- package/dist/ketchup/p-e8977116.entry.js +1 -0
- package/dist/ketchup/{p-27a56c87.js → p-fb03f2f5.js} +2 -2
- package/dist/ketchup/{p-eda7f130.js → p-fb29ba2a.js} +1 -1
- package/dist/ketchup/{p-9f9b6656.js → p-fd1323da.js} +1 -1
- package/dist/loader/index.d.ts +1 -1
- package/dist/types/components/kup-accordion/kup-accordion-declarations.d.ts +20 -20
- package/dist/types/components/kup-accordion/kup-accordion.d.ts +80 -80
- package/dist/types/components/kup-autocomplete/kup-autocomplete-declarations.d.ts +35 -35
- package/dist/types/components/kup-autocomplete/kup-autocomplete.d.ts +119 -119
- package/dist/types/components/kup-badge/kup-badge-declarations.d.ts +9 -9
- package/dist/types/components/kup-badge/kup-badge.d.ts +51 -51
- package/dist/types/components/kup-box/kup-box-declarations.d.ts +113 -113
- package/dist/types/components/kup-box/kup-box-state.d.ts +10 -10
- package/dist/types/components/kup-box/kup-box.d.ts +270 -270
- package/dist/types/components/kup-button/kup-button-declarations.d.ts +24 -24
- package/dist/types/components/kup-button/kup-button.d.ts +111 -111
- package/dist/types/components/kup-button-list/kup-button-list-declarations.d.ts +24 -24
- package/dist/types/components/kup-button-list/kup-button-list.d.ts +82 -82
- package/dist/types/components/kup-calendar/kup-calendar-declarations.d.ts +70 -70
- package/dist/types/components/kup-calendar/kup-calendar.d.ts +100 -100
- package/dist/types/components/kup-card/box/kup-card-box.d.ts +50 -50
- package/dist/types/components/kup-card/built-in/kup-card-built-in.d.ts +39 -39
- package/dist/types/components/kup-card/built-in/kup-card-calendar.d.ts +2 -2
- package/dist/types/components/kup-card/built-in/kup-card-clock.d.ts +2 -2
- package/dist/types/components/kup-card/built-in/kup-card-column-drop-menu.d.ts +3 -3
- package/dist/types/components/kup-card/built-in/kup-card-message-box.d.ts +3 -3
- package/dist/types/components/kup-card/built-in/kup-card-numeric.d.ts +2 -2
- package/dist/types/components/kup-card/collapsible/kup-card-collapsible.d.ts +14 -14
- package/dist/types/components/kup-card/dialog/kup-card-dialog.d.ts +44 -44
- package/dist/types/components/kup-card/free/kup-card-free.d.ts +14 -14
- package/dist/types/components/kup-card/kup-card-declarations.d.ts +236 -236
- package/dist/types/components/kup-card/kup-card-helper.d.ts +27 -27
- package/dist/types/components/kup-card/kup-card.d.ts +159 -159
- package/dist/types/components/kup-card/scalable/kup-card-scalable.d.ts +56 -56
- package/dist/types/components/kup-card/standard/kup-card-standard.d.ts +92 -92
- package/dist/types/components/kup-cell/kup-cell-declarations.d.ts +10 -10
- package/dist/types/components/kup-cell/kup-cell.d.ts +67 -67
- package/dist/types/components/kup-chart/kup-chart-builder.d.ts +7 -7
- package/dist/types/components/kup-chart/kup-chart-declarations.d.ts +135 -135
- package/dist/types/components/kup-chart/kup-chart.d.ts +170 -170
- package/dist/types/components/kup-checkbox/kup-checkbox-declarations.d.ts +17 -17
- package/dist/types/components/kup-checkbox/kup-checkbox.d.ts +85 -85
- package/dist/types/components/kup-chip/kup-chip-declarations.d.ts +22 -22
- package/dist/types/components/kup-chip/kup-chip.d.ts +89 -89
- package/dist/types/components/kup-color-picker/kup-color-picker-declarations.d.ts +15 -15
- package/dist/types/components/kup-color-picker/kup-color-picker.d.ts +89 -89
- package/dist/types/components/kup-combobox/kup-combobox-declarations.d.ts +24 -24
- package/dist/types/components/kup-combobox/kup-combobox.d.ts +95 -95
- package/dist/types/components/kup-dash/kup-dash.d.ts +33 -33
- package/dist/types/components/kup-dash-list/kup-dash-list.d.ts +22 -22
- package/dist/types/components/kup-dashboard/kup-dashboard-declarations.d.ts +61 -61
- package/dist/types/components/kup-dashboard/kup-dashboard.d.ts +80 -80
- package/dist/types/components/kup-data-table/kup-data-table-declarations.d.ts +258 -254
- package/dist/types/components/kup-data-table/kup-data-table-helper.d.ts +25 -25
- package/dist/types/components/kup-data-table/kup-data-table-state.d.ts +36 -36
- package/dist/types/components/kup-data-table/kup-data-table.d.ts +452 -444
- package/dist/types/components/kup-date-picker/kup-date-picker-declarations.d.ts +20 -20
- package/dist/types/components/kup-date-picker/kup-date-picker.d.ts +110 -110
- package/dist/types/components/kup-dialog/kup-dialog-declarations.d.ts +26 -26
- package/dist/types/components/kup-dialog/kup-dialog.d.ts +77 -77
- package/dist/types/components/kup-drawer/kup-drawer-declarations.d.ts +9 -9
- package/dist/types/components/kup-drawer/kup-drawer.d.ts +74 -74
- package/dist/types/components/kup-dropdown-button/kup-dropdown-button-declarations.d.ts +21 -21
- package/dist/types/components/kup-dropdown-button/kup-dropdown-button.d.ts +161 -161
- package/dist/types/components/kup-echart/kup-echart-declarations.d.ts +63 -62
- package/dist/types/components/kup-echart/kup-echart.d.ts +111 -111
- package/dist/types/components/kup-family-tree/kup-family-tree-declarations.d.ts +38 -38
- package/dist/types/components/kup-family-tree/kup-family-tree.d.ts +87 -87
- package/dist/types/components/kup-form/kup-form-declarations.d.ts +64 -64
- package/dist/types/components/kup-form/kup-form.d.ts +83 -83
- package/dist/types/components/kup-gauge/kup-gauge-declarations.d.ts +25 -25
- package/dist/types/components/kup-gauge/kup-gauge.d.ts +147 -147
- package/dist/types/components/kup-grid/kup-grid-declarations.d.ts +9 -9
- package/dist/types/components/kup-grid/kup-grid.d.ts +48 -48
- package/dist/types/components/kup-iframe/kup-iframe-declarations.d.ts +9 -9
- package/dist/types/components/kup-iframe/kup-iframe.d.ts +49 -49
- package/dist/types/components/kup-image/canvas/kup-image-canvas-declarations.d.ts +23 -23
- package/dist/types/components/kup-image/canvas/kup-image-canvas-helper.d.ts +2 -2
- package/dist/types/components/kup-image/canvas/kup-image-canvas.d.ts +28 -28
- package/dist/types/components/kup-image/kup-image-declarations.d.ts +19 -19
- package/dist/types/components/kup-image/kup-image.d.ts +103 -103
- package/dist/types/components/kup-image-list/kup-image-list-declarations.d.ts +14 -14
- package/dist/types/components/kup-image-list/kup-image-list-state.d.ts +6 -6
- package/dist/types/components/kup-image-list/kup-image-list.d.ts +73 -73
- package/dist/types/components/kup-lazy/kup-lazy-declarations.d.ts +18 -18
- package/dist/types/components/kup-lazy/kup-lazy.d.ts +78 -78
- package/dist/types/components/kup-list/kup-list-declarations.d.ts +48 -48
- package/dist/types/components/kup-list/kup-list-helper.d.ts +6 -6
- package/dist/types/components/kup-list/kup-list.d.ts +128 -128
- package/dist/types/components/kup-magic-box/kup-magic-box-declarations.d.ts +21 -21
- package/dist/types/components/kup-magic-box/kup-magic-box.d.ts +65 -65
- package/dist/types/components/kup-nav-bar/kup-nav-bar-declarations.d.ts +19 -19
- package/dist/types/components/kup-nav-bar/kup-nav-bar.d.ts +65 -65
- package/dist/types/components/kup-numeric-picker/kup-numeric-picker-declarations.d.ts +19 -19
- package/dist/types/components/kup-numeric-picker/kup-numeric-picker.d.ts +121 -121
- package/dist/types/components/kup-photo-frame/kup-photo-frame-declarations.d.ts +9 -9
- package/dist/types/components/kup-photo-frame/kup-photo-frame.d.ts +61 -61
- package/dist/types/components/kup-planner/kup-planner-declarations.d.ts +127 -106
- package/dist/types/components/kup-planner/kup-planner-helper.d.ts +6 -6
- package/dist/types/components/kup-planner/kup-planner-state.d.ts +13 -0
- package/dist/types/components/kup-planner/kup-planner.d.ts +266 -212
- package/dist/types/components/kup-probe/kup-probe.d.ts +72 -72
- package/dist/types/components/kup-progress-bar/kup-progress-bar-declarations.d.ts +13 -13
- package/dist/types/components/kup-progress-bar/kup-progress-bar.d.ts +69 -69
- package/dist/types/components/kup-qlik/kup-qlik-declarations.d.ts +19 -19
- package/dist/types/components/kup-qlik/kup-qlik.d.ts +100 -100
- package/dist/types/components/kup-radio/kup-radio-declarations.d.ts +23 -23
- package/dist/types/components/kup-radio/kup-radio.d.ts +80 -80
- package/dist/types/components/kup-rating/kup-rating-declarations.d.ts +14 -14
- package/dist/types/components/kup-rating/kup-rating.d.ts +62 -62
- package/dist/types/components/kup-snackbar/kup-snackbar-declarations.d.ts +12 -12
- package/dist/types/components/kup-snackbar/kup-snackbar.d.ts +84 -84
- package/dist/types/components/kup-spinner/kup-spinner-declarations.d.ts +14 -14
- package/dist/types/components/kup-spinner/kup-spinner.d.ts +79 -79
- package/dist/types/components/kup-state/kup-state.d.ts +3 -3
- package/dist/types/components/kup-state/kup-store.d.ts +4 -4
- package/dist/types/components/kup-state/mock-store.d.ts +8 -8
- package/dist/types/components/kup-switch/kup-switch-declarations.d.ts +15 -15
- package/dist/types/components/kup-switch/kup-switch.d.ts +80 -80
- package/dist/types/components/kup-tab-bar/kup-tab-bar-declarations.d.ts +21 -21
- package/dist/types/components/kup-tab-bar/kup-tab-bar.d.ts +77 -77
- package/dist/types/components/kup-text-field/kup-text-field-declarations.d.ts +38 -38
- package/dist/types/components/kup-text-field/kup-text-field.d.ts +253 -253
- package/dist/types/components/kup-time-picker/kup-time-picker-declarations.d.ts +17 -17
- package/dist/types/components/kup-time-picker/kup-time-picker.d.ts +125 -125
- package/dist/types/components/kup-tree/kup-tree-declarations.d.ts +97 -97
- package/dist/types/components/kup-tree/kup-tree-faker.d.ts +54 -54
- package/dist/types/components/kup-tree/kup-tree-state.d.ts +14 -14
- package/dist/types/components/kup-tree/kup-tree.d.ts +362 -362
- package/dist/types/components.d.ts +112 -14
- package/dist/types/f-components/f-button/f-button-declarations.d.ts +41 -41
- package/dist/types/f-components/f-button/f-button.d.ts +3 -3
- package/dist/types/f-components/f-cell/f-cell-declarations.d.ts +162 -162
- package/dist/types/f-components/f-cell/f-cell.d.ts +3 -3
- package/dist/types/f-components/f-checkbox/f-checkbox-declarations.d.ts +15 -15
- package/dist/types/f-components/f-checkbox/f-checkbox.d.ts +3 -3
- package/dist/types/f-components/f-chip/f-chip-declarations.d.ts +29 -29
- package/dist/types/f-components/f-chip/f-chip.d.ts +3 -3
- package/dist/types/f-components/f-image/f-image-declarations.d.ts +36 -36
- package/dist/types/f-components/f-image/f-image.d.ts +3 -3
- package/dist/types/f-components/f-paginator/f-paginator-declarations.d.ts +22 -22
- package/dist/types/f-components/f-paginator/f-paginator-utils.d.ts +2 -2
- package/dist/types/f-components/f-paginator/f-paginator.d.ts +3 -3
- package/dist/types/f-components/f-switch/f-switch-declarations.d.ts +14 -14
- package/dist/types/f-components/f-switch/f-switch.d.ts +3 -3
- package/dist/types/f-components/f-text-field/f-text-field-declarations.d.ts +42 -42
- package/dist/types/f-components/f-text-field/f-text-field-mdc.d.ts +6 -6
- package/dist/types/f-components/f-text-field/f-text-field.d.ts +3 -3
- package/dist/types/managers/kup-data/kup-data-cell-helper.d.ts +31 -31
- package/dist/types/managers/kup-data/kup-data-column-helper.d.ts +39 -39
- package/dist/types/managers/kup-data/kup-data-declarations.d.ts +173 -173
- package/dist/types/managers/kup-data/kup-data-node-helper.d.ts +44 -44
- package/dist/types/managers/kup-data/kup-data-row-helper.d.ts +14 -14
- package/dist/types/managers/kup-data/kup-data.d.ts +86 -86
- package/dist/types/managers/kup-dates/kup-dates-declarations.d.ts +39 -39
- package/dist/types/managers/kup-dates/kup-dates.d.ts +207 -207
- package/dist/types/managers/kup-debug/kup-debug-declarations.d.ts +38 -38
- package/dist/types/managers/kup-debug/kup-debug.d.ts +95 -95
- package/dist/types/managers/kup-dynamic-position/kup-dynamic-position-declarations.d.ts +50 -50
- package/dist/types/managers/kup-dynamic-position/kup-dynamic-position.d.ts +61 -61
- package/dist/types/managers/kup-interact/kup-interact-declarations.d.ts +128 -128
- package/dist/types/managers/kup-interact/kup-interact.d.ts +105 -105
- package/dist/types/managers/kup-language/kup-language-declarations.d.ts +225 -225
- package/dist/types/managers/kup-language/kup-language.d.ts +52 -52
- package/dist/types/managers/kup-manager/kup-manager-declarations.d.ts +162 -162
- package/dist/types/managers/kup-manager/kup-manager.d.ts +95 -95
- package/dist/types/managers/kup-math/kup-math-declarations.d.ts +33 -33
- package/dist/types/managers/kup-math/kup-math-helper.d.ts +17 -17
- package/dist/types/managers/kup-math/kup-math.d.ts +147 -146
- package/dist/types/managers/kup-objects/kup-objects-declarations.d.ts +15 -15
- package/dist/types/managers/kup-objects/kup-objects.d.ts +210 -210
- package/dist/types/managers/kup-scroll-on-hover/kup-scroll-on-hover-declarations.d.ts +28 -28
- package/dist/types/managers/kup-scroll-on-hover/kup-scroll-on-hover.d.ts +62 -62
- package/dist/types/managers/kup-search/kup-search-declarations.d.ts +7 -7
- package/dist/types/managers/kup-search/kup-search.d.ts +20 -20
- package/dist/types/managers/kup-theme/kup-theme-declarations.d.ts +185 -185
- package/dist/types/managers/kup-theme/kup-theme.d.ts +127 -127
- package/dist/types/managers/kup-toolbar/kup-toolbar-declarations.d.ts +8 -8
- package/dist/types/managers/kup-toolbar/kup-toolbar.d.ts +39 -39
- package/dist/types/managers/kup-tooltip/kup-tooltip-declarations.d.ts +8 -8
- package/dist/types/managers/kup-tooltip/kup-tooltip.d.ts +51 -51
- package/dist/types/stencil-public-runtime.d.ts +3 -0
- package/dist/types/types/GenericTypes.d.ts +110 -110
- package/dist/types/utils/cell-utils.d.ts +10 -10
- package/dist/types/utils/filters/filters-column-menu.d.ts +96 -96
- package/dist/types/utils/filters/filters-declarations.d.ts +39 -39
- package/dist/types/utils/filters/filters-rows.d.ts +30 -30
- package/dist/types/utils/filters/filters-tree-items.d.ts +19 -19
- package/dist/types/utils/filters/filters.d.ts +72 -72
- package/dist/types/utils/kup-column-menu/kup-column-menu-declarations.d.ts +19 -19
- package/dist/types/utils/kup-column-menu/kup-column-menu.d.ts +142 -142
- package/dist/types/utils/utils.d.ts +37 -35
- package/dist/types/variables/GenericVariables.d.ts +4 -4
- package/package.json +21 -16
- package/dist/cjs/tslib.es6-386654de.js +0 -87
- package/dist/esm/tslib.es6-8c2af864.js +0 -82
- package/dist/ketchup/p-0bcda0e2.entry.js +0 -1
- package/dist/ketchup/p-33aff1ca.entry.js +0 -25
- package/dist/ketchup/p-3432ebaf.entry.js +0 -9
- package/dist/ketchup/p-35b29b22.entry.js +0 -1
- package/dist/ketchup/p-36dac88e.js +0 -30
- package/dist/ketchup/p-39a55c47.js +0 -1
- package/dist/ketchup/p-489d55ff.entry.js +0 -39
- package/dist/ketchup/p-73c8d651.entry.js +0 -1
- package/dist/ketchup/p-7f59211b.js +0 -1
- package/dist/ketchup/p-9dcfbb1e.js +0 -2
- package/dist/ketchup/p-b2fd2dbf.entry.js +0 -1
- package/dist/ketchup/p-d1b050d0.entry.js +0 -27
- package/dist/ketchup/p-d6ea709e.entry.js +0 -1
- /package/dist/ketchup/{p-6c77a36c.js → p-0fd98ab4.js} +0 -0
- /package/dist/ketchup/{p-97e8ea42.js → p-ad2e21d2.js} +0 -0
|
@@ -2,89 +2,95 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
6
|
-
const kupManager$1 = require('./kup-manager-
|
|
7
|
-
const GenericVariables = require('./GenericVariables-
|
|
8
|
-
const fTextField = require('./f-text-field-
|
|
9
|
-
const fTextFieldMdc = require('./f-text-field-mdc-
|
|
10
|
-
require('./
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
*
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
KupPlannerProps["
|
|
20
|
-
KupPlannerProps["
|
|
21
|
-
KupPlannerProps["
|
|
22
|
-
KupPlannerProps["
|
|
23
|
-
KupPlannerProps["
|
|
24
|
-
KupPlannerProps["
|
|
25
|
-
KupPlannerProps["detailHeight"] = "Height for detail gantt";
|
|
26
|
-
KupPlannerProps["detailIdCol"] = "Column containing unique detail identifier";
|
|
27
|
-
KupPlannerProps["detailNameCol"] = "Column containing detail name displayed";
|
|
28
|
-
KupPlannerProps["detailPrevDates"] = "Columns containing forecast detail duration, from (firstDate) to (secondDate)";
|
|
29
|
-
KupPlannerProps["
|
|
30
|
-
KupPlannerProps["
|
|
31
|
-
KupPlannerProps["
|
|
32
|
-
KupPlannerProps["
|
|
33
|
-
KupPlannerProps["
|
|
34
|
-
KupPlannerProps["
|
|
35
|
-
KupPlannerProps["
|
|
36
|
-
KupPlannerProps["
|
|
37
|
-
KupPlannerProps["
|
|
38
|
-
KupPlannerProps["
|
|
39
|
-
KupPlannerProps["
|
|
40
|
-
KupPlannerProps["
|
|
41
|
-
KupPlannerProps["
|
|
42
|
-
KupPlannerProps["
|
|
43
|
-
KupPlannerProps["
|
|
44
|
-
KupPlannerProps["
|
|
45
|
-
KupPlannerProps["
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
(
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
})(
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
5
|
+
const index = require('./index-a9a3b467.js');
|
|
6
|
+
const kupManager$1 = require('./kup-manager-7747decd.js');
|
|
7
|
+
const GenericVariables = require('./GenericVariables-9cd88034.js');
|
|
8
|
+
const fTextField = require('./f-text-field-9610c198.js');
|
|
9
|
+
const fTextFieldMdc = require('./f-text-field-mdc-d38d80b5.js');
|
|
10
|
+
require('./component-2c7ddef7.js');
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Props of the kup-gantt component.
|
|
14
|
+
* Used to export every prop in an object.
|
|
15
|
+
*/
|
|
16
|
+
var KupPlannerProps;
|
|
17
|
+
(function (KupPlannerProps) {
|
|
18
|
+
KupPlannerProps["customStyle"] = "Custom style of the component.";
|
|
19
|
+
KupPlannerProps["data"] = "Dataset containg the tasks list";
|
|
20
|
+
KupPlannerProps["detailData"] = "Dataset containg the details list";
|
|
21
|
+
KupPlannerProps["detailColorCol"] = "Column containing the detail color, in hex format";
|
|
22
|
+
KupPlannerProps["detailColumns"] = "Columns containing informations displayed in the left box, near the gantt of details";
|
|
23
|
+
KupPlannerProps["detailDates"] = "Columns containing detail duration, from (firstDate) to (secondDate)";
|
|
24
|
+
KupPlannerProps["detailFilter"] = "Sets the detail's filter.";
|
|
25
|
+
KupPlannerProps["detailHeight"] = "Height for detail gantt";
|
|
26
|
+
KupPlannerProps["detailIdCol"] = "Column containing unique detail identifier";
|
|
27
|
+
KupPlannerProps["detailNameCol"] = "Column containing detail name displayed";
|
|
28
|
+
KupPlannerProps["detailPrevDates"] = "Columns containing forecast detail duration, from (firstDate) to (secondDate)";
|
|
29
|
+
KupPlannerProps["detailInitialScrollX"] = "Sets the initial scroll X for the detail.";
|
|
30
|
+
KupPlannerProps["detailInitialScrollY"] = "Sets the initial scroll Y for the detail.";
|
|
31
|
+
KupPlannerProps["listCellWidth"] = "Total size of the cells inside to the left box, near the gantt";
|
|
32
|
+
KupPlannerProps["maxWidth"] = "Max width for component";
|
|
33
|
+
KupPlannerProps["phaseColorCol"] = "Column containing the phase color in hex format";
|
|
34
|
+
KupPlannerProps["phaseColumns"] = "Columns containing informations displayed in the left box ,near the gantt of phases";
|
|
35
|
+
KupPlannerProps["phaseColParDep"] = "Column containing the name of the parent phases";
|
|
36
|
+
KupPlannerProps["phaseDates"] = "Columns containing phase duration, from (firstDate) to (secondDate)";
|
|
37
|
+
KupPlannerProps["phaseIdCol"] = "Column containing unique phase identifier";
|
|
38
|
+
KupPlannerProps["phaseNameCol"] = "Column containing phase name displayed";
|
|
39
|
+
KupPlannerProps["phasePrevDates"] = "Columns containing forecast phase duration, from (firstDate) to (secondDate)";
|
|
40
|
+
KupPlannerProps["readOnly"] = "When true, the two gantts are not interactable.";
|
|
41
|
+
KupPlannerProps["showSecondaryDates"] = "Enable/disable display of secondary dates";
|
|
42
|
+
KupPlannerProps["taskColumns"] = "Columns containing informations displayed in the left box, near the gantt";
|
|
43
|
+
KupPlannerProps["taskDates"] = "Columns containing task duration, from (firstDate) to (secondDate)";
|
|
44
|
+
KupPlannerProps["taskFilter"] = "Sets the task's filter.";
|
|
45
|
+
KupPlannerProps["taskHeight"] = "Height for main gantt";
|
|
46
|
+
KupPlannerProps["taskIdCol"] = "Column containing unique task identifier";
|
|
47
|
+
KupPlannerProps["taskNameCol"] = "Column containing task name displayed";
|
|
48
|
+
KupPlannerProps["taskPrevDates"] = "Columns containing forecast task duration, from (firstDate) to (secondDate)";
|
|
49
|
+
KupPlannerProps["taskInitialScrollX"] = "Sets the initial scroll X for the task.";
|
|
50
|
+
KupPlannerProps["taskInitialScrollY"] = "Sets the initial scroll Y for the task.";
|
|
51
|
+
KupPlannerProps["titleMess"] = "Message displayed on top";
|
|
52
|
+
})(KupPlannerProps || (KupPlannerProps = {}));
|
|
53
|
+
var KupPlannerTaskAction;
|
|
54
|
+
(function (KupPlannerTaskAction) {
|
|
55
|
+
KupPlannerTaskAction["onTaskOpening"] = "onTaskOpening";
|
|
56
|
+
KupPlannerTaskAction["onTaskClosing"] = "onTaskClosing";
|
|
57
|
+
KupPlannerTaskAction["onClick"] = "onClick";
|
|
58
|
+
KupPlannerTaskAction["onResize"] = "onResize";
|
|
59
|
+
KupPlannerTaskAction["onRightClick"] = "onRightClick";
|
|
60
|
+
})(KupPlannerTaskAction || (KupPlannerTaskAction = {}));
|
|
61
|
+
var KupPlannerGanttRowType;
|
|
62
|
+
(function (KupPlannerGanttRowType) {
|
|
63
|
+
KupPlannerGanttRowType["TASK"] = "task";
|
|
64
|
+
KupPlannerGanttRowType["PHASE"] = "phase";
|
|
65
|
+
KupPlannerGanttRowType["DETAIL"] = "detail";
|
|
66
|
+
})(KupPlannerGanttRowType || (KupPlannerGanttRowType = {}));
|
|
67
|
+
class KupPlannerLastOnChangeReceived {
|
|
68
|
+
constructor(event, threshold = 100) {
|
|
69
|
+
this.dateTime = new Date();
|
|
70
|
+
this.event = event;
|
|
71
|
+
this.threshold = threshold;
|
|
72
|
+
}
|
|
73
|
+
isEquivalent(newEvent) {
|
|
74
|
+
const intervalTime = new Date().valueOf() - this.dateTime.valueOf();
|
|
75
|
+
const equals = JSON.stringify(this.event) === JSON.stringify(newEvent);
|
|
76
|
+
return equals && intervalTime < this.threshold;
|
|
77
|
+
}
|
|
78
|
+
resetDateTime() {
|
|
79
|
+
this.dateTime = new Date();
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
const defaultStylingOptions = {
|
|
83
|
+
listCellWidth: '300px',
|
|
84
|
+
rowHeight: 40,
|
|
85
|
+
barFill: 90,
|
|
86
|
+
projectProgressColor: '#CBCBCB',
|
|
87
|
+
projectProgressSelectedColor: '#CBCBCB',
|
|
88
|
+
projectBackgroundColor: '#CBCBCB',
|
|
89
|
+
projectBackgroundSelectedColor: '#CBCBCB',
|
|
90
|
+
barProgressColor: '#A2A415',
|
|
91
|
+
barProgressSelectedColor: '#A2A415',
|
|
92
|
+
barBackgroundColor: '#A2A415',
|
|
93
|
+
barBackgroundSelectedColor: '#A2A415',
|
|
88
94
|
};
|
|
89
95
|
|
|
90
96
|
/**
|
|
@@ -8958,25 +8964,6 @@ function _createForOfIteratorHelperLoose(o, allowArrayLike) {
|
|
|
8958
8964
|
}
|
|
8959
8965
|
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
8960
8966
|
}
|
|
8961
|
-
|
|
8962
|
-
var ViewMode;
|
|
8963
|
-
(function (ViewMode) {
|
|
8964
|
-
ViewMode["Hour"] = "Hour";
|
|
8965
|
-
ViewMode["QuarterDay"] = "Quarter Day";
|
|
8966
|
-
ViewMode["HalfDay"] = "Half Day";
|
|
8967
|
-
ViewMode["Day"] = "Day";
|
|
8968
|
-
ViewMode["Week"] = "Week";
|
|
8969
|
-
ViewMode["Month"] = "Month";
|
|
8970
|
-
ViewMode["Year"] = "Year";
|
|
8971
|
-
})(ViewMode || (ViewMode = {}));
|
|
8972
|
-
|
|
8973
|
-
var TimeUnit;
|
|
8974
|
-
(function (TimeUnit) {
|
|
8975
|
-
TimeUnit["DAY"] = "days";
|
|
8976
|
-
TimeUnit["WEEK"] = "weeks";
|
|
8977
|
-
TimeUnit["MONTH"] = "months";
|
|
8978
|
-
TimeUnit["YEAR"] = "YEAR";
|
|
8979
|
-
})(TimeUnit || (TimeUnit = {}));
|
|
8980
8967
|
var parseToDayStart = function parseToDayStart(ymd) {
|
|
8981
8968
|
return luxon.DateTime.fromISO(ymd).toJSDate();
|
|
8982
8969
|
};
|
|
@@ -9005,211 +8992,6 @@ function validDates(startDate, endDate, _name) {
|
|
|
9005
8992
|
};
|
|
9006
8993
|
}
|
|
9007
8994
|
|
|
9008
|
-
var MAIN_GANTT_ID = "main";
|
|
9009
|
-
var SECONDARY_GANTT_ID = "secondary";
|
|
9010
|
-
var toViewMode = function toViewMode(timeUnit) {
|
|
9011
|
-
switch (timeUnit) {
|
|
9012
|
-
case TimeUnit.DAY:
|
|
9013
|
-
return ViewMode.Day;
|
|
9014
|
-
case TimeUnit.WEEK:
|
|
9015
|
-
return ViewMode.Week;
|
|
9016
|
-
case TimeUnit.MONTH:
|
|
9017
|
-
return ViewMode.Month;
|
|
9018
|
-
case TimeUnit.YEAR:
|
|
9019
|
-
return ViewMode.Year;
|
|
9020
|
-
}
|
|
9021
|
-
};
|
|
9022
|
-
var columnWidthForTimeUnit = function columnWidthForTimeUnit(timeUnit) {
|
|
9023
|
-
switch (timeUnit) {
|
|
9024
|
-
case TimeUnit.YEAR:
|
|
9025
|
-
return 60 * 2;
|
|
9026
|
-
default:
|
|
9027
|
-
return 60;
|
|
9028
|
-
}
|
|
9029
|
-
};
|
|
9030
|
-
var convertPhaseToTask = function convertPhaseToTask(item) {
|
|
9031
|
-
var mapPhase = function mapPhase(_ref) {
|
|
9032
|
-
var phaseStart = _ref.startDate,
|
|
9033
|
-
phaseEnd = _ref.endDate,
|
|
9034
|
-
secondaryStartDate = _ref.secondaryStartDate,
|
|
9035
|
-
secondaryEndDate = _ref.secondaryEndDate,
|
|
9036
|
-
phaseName = _ref.name,
|
|
9037
|
-
phaseId = _ref.id,
|
|
9038
|
-
color = _ref.color,
|
|
9039
|
-
selectedColor = _ref.selectedColor,
|
|
9040
|
-
dependencies = _ref.dependencies,
|
|
9041
|
-
icon = _ref.icon;
|
|
9042
|
-
var _validDates = validDates(phaseStart, phaseEnd),
|
|
9043
|
-
start = _validDates.start,
|
|
9044
|
-
end = _validDates.end;
|
|
9045
|
-
var _validDates2 = validDates(secondaryStartDate, secondaryEndDate),
|
|
9046
|
-
phaseStart2 = _validDates2.start,
|
|
9047
|
-
phaseEnd2 = _validDates2.end;
|
|
9048
|
-
return {
|
|
9049
|
-
start: start,
|
|
9050
|
-
end: end,
|
|
9051
|
-
secondaryStart: phaseStart2,
|
|
9052
|
-
secondaryEnd: phaseEnd2,
|
|
9053
|
-
name: phaseName,
|
|
9054
|
-
valuesToShow: item.valuesToShow,
|
|
9055
|
-
id: phaseId,
|
|
9056
|
-
type: "task",
|
|
9057
|
-
progress: 100,
|
|
9058
|
-
dependencies: dependencies,
|
|
9059
|
-
styles: color ? {
|
|
9060
|
-
backgroundColor: color,
|
|
9061
|
-
progressColor: color,
|
|
9062
|
-
backgroundSelectedColor: selectedColor,
|
|
9063
|
-
progressSelectedColor: selectedColor
|
|
9064
|
-
} : {},
|
|
9065
|
-
icon: icon
|
|
9066
|
-
};
|
|
9067
|
-
};
|
|
9068
|
-
return mapPhase(item);
|
|
9069
|
-
};
|
|
9070
|
-
var convertDetailToTimeline = function convertDetailToTimeline(item, mainGanttStartDate, mainGanttEndDate) {
|
|
9071
|
-
var id = item.id,
|
|
9072
|
-
name = item.name,
|
|
9073
|
-
schedule = item.schedule;
|
|
9074
|
-
var getDatesForTask = function getDatesForTask(item) {
|
|
9075
|
-
var start = mainGanttStartDate != null ? mainGanttStartDate : "";
|
|
9076
|
-
var end = mainGanttEndDate != null ? mainGanttEndDate : "";
|
|
9077
|
-
for (var i = 0; i < item.schedule.length; i++) {
|
|
9078
|
-
var lstart = item.schedule[i].startDate;
|
|
9079
|
-
var lend = item.schedule[i].endDate;
|
|
9080
|
-
if (!start || lstart.localeCompare(start) < 0) {
|
|
9081
|
-
start = lstart;
|
|
9082
|
-
}
|
|
9083
|
-
if (!end || lend.localeCompare(end) > 0) {
|
|
9084
|
-
end = lend;
|
|
9085
|
-
}
|
|
9086
|
-
}
|
|
9087
|
-
return validDates(start, end);
|
|
9088
|
-
};
|
|
9089
|
-
var _getDatesForTask = getDatesForTask(item),
|
|
9090
|
-
start = _getDatesForTask.start,
|
|
9091
|
-
end = _getDatesForTask.end;
|
|
9092
|
-
var convertToFrame = function convertToFrame(x) {
|
|
9093
|
-
var startDate = x.startDate,
|
|
9094
|
-
endDate = x.endDate,
|
|
9095
|
-
color = x.color,
|
|
9096
|
-
selectedColor = x.selectedColor,
|
|
9097
|
-
icon = x.icon;
|
|
9098
|
-
var _validDates3 = validDates(startDate, endDate),
|
|
9099
|
-
start = _validDates3.start,
|
|
9100
|
-
end = _validDates3.end;
|
|
9101
|
-
return {
|
|
9102
|
-
start: start,
|
|
9103
|
-
end: end,
|
|
9104
|
-
backgroundColor: color != null ? color : "0xffffff",
|
|
9105
|
-
backgroundSelectedColor: selectedColor != null ? selectedColor : color,
|
|
9106
|
-
icon: icon
|
|
9107
|
-
};
|
|
9108
|
-
};
|
|
9109
|
-
var defaultColor = "#595959";
|
|
9110
|
-
return {
|
|
9111
|
-
id: id,
|
|
9112
|
-
type: "timeline",
|
|
9113
|
-
timeline: schedule.map(convertToFrame),
|
|
9114
|
-
name: name,
|
|
9115
|
-
valuesToShow: item.valuesToShow,
|
|
9116
|
-
start: start,
|
|
9117
|
-
end: end,
|
|
9118
|
-
progress: 100,
|
|
9119
|
-
styles: {
|
|
9120
|
-
backgroundColor: defaultColor,
|
|
9121
|
-
progressColor: defaultColor,
|
|
9122
|
-
backgroundSelectedColor: defaultColor,
|
|
9123
|
-
progressSelectedColor: defaultColor
|
|
9124
|
-
}
|
|
9125
|
-
};
|
|
9126
|
-
};
|
|
9127
|
-
var isDetail = function isDetail(row) {
|
|
9128
|
-
return row && row.schedule && row.schedule.length !== 0;
|
|
9129
|
-
};
|
|
9130
|
-
var convertProjectToTasks = function convertProjectToTasks(item, mainGanttStartDate, mainGanttEndDate) {
|
|
9131
|
-
if (!isDetail(item)) {
|
|
9132
|
-
var _row$phases;
|
|
9133
|
-
var row = item;
|
|
9134
|
-
var _validDates4 = validDates(row.startDate, row.endDate),
|
|
9135
|
-
start = _validDates4.start,
|
|
9136
|
-
end = _validDates4.end;
|
|
9137
|
-
var _validDates5 = validDates(row.secondaryStartDate, row.secondaryEndDate),
|
|
9138
|
-
start2 = _validDates5.start,
|
|
9139
|
-
end2 = _validDates5.end;
|
|
9140
|
-
var mainTask = {
|
|
9141
|
-
start: start,
|
|
9142
|
-
end: end,
|
|
9143
|
-
id: row.id,
|
|
9144
|
-
name: row.name,
|
|
9145
|
-
type: row.type,
|
|
9146
|
-
valuesToShow: row.valuesToShow,
|
|
9147
|
-
secondaryStart: start2,
|
|
9148
|
-
secondaryEnd: end2,
|
|
9149
|
-
progress: 100,
|
|
9150
|
-
isDisabled: false,
|
|
9151
|
-
hideChildren: false,
|
|
9152
|
-
icon: row.icon
|
|
9153
|
-
};
|
|
9154
|
-
var children1 = ((_row$phases = row.phases) != null ? _row$phases : []).map(convertPhaseToTask);
|
|
9155
|
-
return [mainTask].concat(children1);
|
|
9156
|
-
} else {
|
|
9157
|
-
var _row = item;
|
|
9158
|
-
return [_extends({}, convertDetailToTimeline(_row, mainGanttStartDate, mainGanttEndDate))];
|
|
9159
|
-
}
|
|
9160
|
-
};
|
|
9161
|
-
var mergeTaskIntoProjects = function mergeTaskIntoProjects(projects, _ref2) {
|
|
9162
|
-
var id = _ref2.id,
|
|
9163
|
-
start = _ref2.start,
|
|
9164
|
-
end = _ref2.end;
|
|
9165
|
-
return projects.map(function (project) {
|
|
9166
|
-
return project.id === id ? withNewDates(project, start, end) : project;
|
|
9167
|
-
});
|
|
9168
|
-
};
|
|
9169
|
-
var mergeTaskIntoPhases = function mergeTaskIntoPhases(phases, _ref3) {
|
|
9170
|
-
var id = _ref3.id,
|
|
9171
|
-
start = _ref3.start,
|
|
9172
|
-
end = _ref3.end;
|
|
9173
|
-
if (phases) {
|
|
9174
|
-
return phases.map(function (phase) {
|
|
9175
|
-
return phase.id === id ? withNewDates(phase, start, end) : phase;
|
|
9176
|
-
});
|
|
9177
|
-
}
|
|
9178
|
-
return undefined;
|
|
9179
|
-
};
|
|
9180
|
-
var withNewDates = function withNewDates(p, start, end) {
|
|
9181
|
-
var startDate = formatToIsoDate(start);
|
|
9182
|
-
var endDate = formatToIsoDate(end);
|
|
9183
|
-
var extra = {
|
|
9184
|
-
startDate: startDate,
|
|
9185
|
-
endDate: endDate
|
|
9186
|
-
};
|
|
9187
|
-
return _extends({}, p, extra);
|
|
9188
|
-
};
|
|
9189
|
-
var getProjectById = function getProjectById(id, items) {
|
|
9190
|
-
for (var i = 0; i < items.length; i++) {
|
|
9191
|
-
if (items[i].id === id) {
|
|
9192
|
-
return items[i];
|
|
9193
|
-
}
|
|
9194
|
-
}
|
|
9195
|
-
return undefined;
|
|
9196
|
-
};
|
|
9197
|
-
var getPhaseById = function getPhaseById(id, items) {
|
|
9198
|
-
for (var i = 0; i < items.length; i++) {
|
|
9199
|
-
if (isDetail(items[i])) {
|
|
9200
|
-
continue;
|
|
9201
|
-
}
|
|
9202
|
-
var item = items[i];
|
|
9203
|
-
if (!item.phases) {
|
|
9204
|
-
continue;
|
|
9205
|
-
}
|
|
9206
|
-
for (var j = 0; j < item.phases.length; j++) if (item.phases[j].id === id) {
|
|
9207
|
-
return item.phases[j];
|
|
9208
|
-
}
|
|
9209
|
-
}
|
|
9210
|
-
return undefined;
|
|
9211
|
-
};
|
|
9212
|
-
|
|
9213
8995
|
var intlDTCache = {};
|
|
9214
8996
|
var getCachedDateTimeFormat = function getCachedDateTimeFormat(locString, opts) {
|
|
9215
8997
|
if (opts === void 0) {
|
|
@@ -9257,9 +9039,9 @@ var ganttDateRangeFromTask = function ganttDateRangeFromTask(tasks, viewMode, pr
|
|
|
9257
9039
|
return ganttDateRangeGeneric(dates, viewMode, preStepsCount, showSecondaryDates);
|
|
9258
9040
|
};
|
|
9259
9041
|
var calculateDisplayedDateRange = function calculateDisplayedDateRange(mainGanttItems, timeUnit, mainGanttDoubleView, secondaryGanttItems, preStepsCount) {
|
|
9260
|
-
var dates = ganttDateRangeFromGanttTask(mainGanttItems,
|
|
9042
|
+
var dates = ganttDateRangeFromGanttTask(mainGanttItems, timeUnit, preStepsCount != null ? preStepsCount : 1, mainGanttDoubleView);
|
|
9261
9043
|
if (secondaryGanttItems) {
|
|
9262
|
-
var dates2 = ganttDateRangeFromDetail(secondaryGanttItems,
|
|
9044
|
+
var dates2 = ganttDateRangeFromDetail(secondaryGanttItems, timeUnit, preStepsCount != null ? preStepsCount : 1, mainGanttDoubleView);
|
|
9263
9045
|
if (dates2[0] < dates[0]) {
|
|
9264
9046
|
dates[0] = dates2[0];
|
|
9265
9047
|
}
|
|
@@ -9334,48 +9116,30 @@ var ganttDateRangeGeneric = function ganttDateRangeGeneric(dates, viewMode, preS
|
|
|
9334
9116
|
return [newStartDate, newEndDate];
|
|
9335
9117
|
}
|
|
9336
9118
|
switch (viewMode) {
|
|
9337
|
-
case
|
|
9119
|
+
case "year":
|
|
9338
9120
|
newStartDate = addToDate(newStartDate, -1, "year");
|
|
9339
9121
|
newStartDate = startOfDate(newStartDate, "year");
|
|
9340
9122
|
newEndDate = addToDate(newEndDate, 1, "year");
|
|
9341
9123
|
newEndDate = startOfDate(newEndDate, "year");
|
|
9342
9124
|
break;
|
|
9343
|
-
case
|
|
9125
|
+
case "month":
|
|
9344
9126
|
newStartDate = addToDate(newStartDate, -1 * preStepsCount, "month");
|
|
9345
9127
|
newStartDate = startOfDate(newStartDate, "month");
|
|
9346
9128
|
newEndDate = addToDate(newEndDate, 1, "year");
|
|
9347
9129
|
newEndDate = startOfDate(newEndDate, "year");
|
|
9348
9130
|
break;
|
|
9349
|
-
case
|
|
9131
|
+
case "week":
|
|
9350
9132
|
newStartDate = startOfDate(newStartDate, "day");
|
|
9351
9133
|
newStartDate = addToDate(getMonday(newStartDate), -7 * preStepsCount, "day");
|
|
9352
9134
|
newEndDate = startOfDate(newEndDate, "day");
|
|
9353
9135
|
newEndDate = addToDate(newEndDate, 1.5, "month");
|
|
9354
9136
|
break;
|
|
9355
|
-
case
|
|
9137
|
+
case "day":
|
|
9356
9138
|
newStartDate = startOfDate(newStartDate, "day");
|
|
9357
9139
|
newStartDate = addToDate(newStartDate, -1 * preStepsCount, "day");
|
|
9358
9140
|
newEndDate = startOfDate(newEndDate, "day");
|
|
9359
9141
|
newEndDate = addToDate(newEndDate, 19, "day");
|
|
9360
9142
|
break;
|
|
9361
|
-
case ViewMode.QuarterDay:
|
|
9362
|
-
newStartDate = startOfDate(newStartDate, "day");
|
|
9363
|
-
newStartDate = addToDate(newStartDate, -1 * preStepsCount, "day");
|
|
9364
|
-
newEndDate = startOfDate(newEndDate, "day");
|
|
9365
|
-
newEndDate = addToDate(newEndDate, 66, "hour");
|
|
9366
|
-
break;
|
|
9367
|
-
case ViewMode.HalfDay:
|
|
9368
|
-
newStartDate = startOfDate(newStartDate, "day");
|
|
9369
|
-
newStartDate = addToDate(newStartDate, -1 * preStepsCount, "day");
|
|
9370
|
-
newEndDate = startOfDate(newEndDate, "day");
|
|
9371
|
-
newEndDate = addToDate(newEndDate, 108, "hour");
|
|
9372
|
-
break;
|
|
9373
|
-
case ViewMode.Hour:
|
|
9374
|
-
newStartDate = startOfDate(newStartDate, "hour");
|
|
9375
|
-
newStartDate = addToDate(newStartDate, -1 * preStepsCount, "hour");
|
|
9376
|
-
newEndDate = startOfDate(newEndDate, "day");
|
|
9377
|
-
newEndDate = addToDate(newEndDate, 1, "day");
|
|
9378
|
-
break;
|
|
9379
9143
|
}
|
|
9380
9144
|
return [newStartDate, newEndDate];
|
|
9381
9145
|
};
|
|
@@ -9384,27 +9148,18 @@ var seedDates = function seedDates(startDate, endDate, viewMode) {
|
|
|
9384
9148
|
var dates = [currentDate];
|
|
9385
9149
|
while (currentDate < endDate) {
|
|
9386
9150
|
switch (viewMode) {
|
|
9387
|
-
case
|
|
9151
|
+
case "year":
|
|
9388
9152
|
currentDate = addToDate(currentDate, 1, "year");
|
|
9389
9153
|
break;
|
|
9390
|
-
case
|
|
9154
|
+
case "month":
|
|
9391
9155
|
currentDate = addToDate(currentDate, 1, "month");
|
|
9392
9156
|
break;
|
|
9393
|
-
case
|
|
9157
|
+
case "week":
|
|
9394
9158
|
currentDate = addToDate(currentDate, 7, "day");
|
|
9395
9159
|
break;
|
|
9396
|
-
case
|
|
9160
|
+
case "day":
|
|
9397
9161
|
currentDate = addToDate(currentDate, 1, "day");
|
|
9398
9162
|
break;
|
|
9399
|
-
case ViewMode.HalfDay:
|
|
9400
|
-
currentDate = addToDate(currentDate, 12, "hour");
|
|
9401
|
-
break;
|
|
9402
|
-
case ViewMode.QuarterDay:
|
|
9403
|
-
currentDate = addToDate(currentDate, 6, "hour");
|
|
9404
|
-
break;
|
|
9405
|
-
case ViewMode.Hour:
|
|
9406
|
-
currentDate = addToDate(currentDate, 1, "hour");
|
|
9407
|
-
break;
|
|
9408
9163
|
}
|
|
9409
9164
|
dates.push(currentDate);
|
|
9410
9165
|
}
|
|
@@ -9706,6 +9461,15 @@ var VerticalScroll = function VerticalScroll(_ref) {
|
|
|
9706
9461
|
rtl = _ref.rtl,
|
|
9707
9462
|
onScroll = _ref.onScroll;
|
|
9708
9463
|
var scrollRef = react.useRef(null);
|
|
9464
|
+
react.useEffect(function () {
|
|
9465
|
+
if (scrollRef.current) {
|
|
9466
|
+
var wrap = scrollRef.current;
|
|
9467
|
+
var setScrollTop = function setScrollTop() {
|
|
9468
|
+
wrap.scrollTop = scroll;
|
|
9469
|
+
};
|
|
9470
|
+
setTimeout(setScrollTop, 250);
|
|
9471
|
+
}
|
|
9472
|
+
}, []);
|
|
9709
9473
|
react.useEffect(function () {
|
|
9710
9474
|
if (scrollRef.current) {
|
|
9711
9475
|
scrollRef.current.scrollTop = scroll;
|
|
@@ -9748,12 +9512,12 @@ var TaskList = function TaskList(_ref) {
|
|
|
9748
9512
|
TaskListHeader = _ref.TaskListHeader,
|
|
9749
9513
|
TaskListTable = _ref.TaskListTable,
|
|
9750
9514
|
filter = _ref.filter;
|
|
9751
|
-
var horizontalContainerRef = react.
|
|
9515
|
+
var horizontalContainerRef = react.createRef();
|
|
9752
9516
|
react.useEffect(function () {
|
|
9753
9517
|
if (horizontalContainerRef.current) {
|
|
9754
9518
|
horizontalContainerRef.current.scrollTop = scrollY;
|
|
9755
9519
|
}
|
|
9756
|
-
}, [scrollY]);
|
|
9520
|
+
}, [horizontalContainerRef, scrollY]);
|
|
9757
9521
|
var headerProps = {
|
|
9758
9522
|
headerHeight: headerHeight,
|
|
9759
9523
|
fontFamily: fontFamily,
|
|
@@ -9909,10 +9673,9 @@ var SinglePartOfCalendar = function SinglePartOfCalendar(_ref) {
|
|
|
9909
9673
|
};
|
|
9910
9674
|
|
|
9911
9675
|
var Calendar = function Calendar(_ref) {
|
|
9912
|
-
var _dateTimeFormatters$y, _dateTimeFormatters$m, _dateTimeFormatters$m2, _dateTimeFormatters$w, _dateTimeFormatters$d
|
|
9676
|
+
var _dateTimeFormatters$y, _dateTimeFormatters$m, _dateTimeFormatters$m2, _dateTimeFormatters$w, _dateTimeFormatters$d;
|
|
9913
9677
|
var dateSetup = _ref.dateSetup,
|
|
9914
9678
|
locale = _ref.locale,
|
|
9915
|
-
viewMode = _ref.viewMode,
|
|
9916
9679
|
rtl = _ref.rtl,
|
|
9917
9680
|
headerHeight = _ref.headerHeight,
|
|
9918
9681
|
columnWidth = _ref.columnWidth,
|
|
@@ -9922,15 +9685,13 @@ var Calendar = function Calendar(_ref) {
|
|
|
9922
9685
|
_ref$singleLineHeader = _ref.singleLineHeader,
|
|
9923
9686
|
singleLineHeader = _ref$singleLineHeader === void 0 ? false : _ref$singleLineHeader,
|
|
9924
9687
|
currentDateIndicator = _ref.currentDateIndicator;
|
|
9925
|
-
var simplifiedHeader = singleLineHeader && dateSetup.viewMode !==
|
|
9688
|
+
var simplifiedHeader = singleLineHeader && dateSetup.viewMode !== "year";
|
|
9926
9689
|
var TopCal = simplifiedHeader ? SinglePartOfCalendar : TopPartOfCalendar;
|
|
9927
9690
|
var formatYear = (_dateTimeFormatters$y = dateTimeFormatters === null || dateTimeFormatters === void 0 ? void 0 : dateTimeFormatters.year) != null ? _dateTimeFormatters$y : defaultDateTimeFormatters.year;
|
|
9928
9691
|
var formatMonth = (_dateTimeFormatters$m = dateTimeFormatters === null || dateTimeFormatters === void 0 ? void 0 : dateTimeFormatters.month) != null ? _dateTimeFormatters$m : defaultDateTimeFormatters.month;
|
|
9929
9692
|
var formatMonthAndYear = (_dateTimeFormatters$m2 = dateTimeFormatters === null || dateTimeFormatters === void 0 ? void 0 : dateTimeFormatters.monthAndYear) != null ? _dateTimeFormatters$m2 : defaultDateTimeFormatters.monthAndYear;
|
|
9930
9693
|
var formatWeek = (_dateTimeFormatters$w = dateTimeFormatters === null || dateTimeFormatters === void 0 ? void 0 : dateTimeFormatters.week) != null ? _dateTimeFormatters$w : defaultDateTimeFormatters.week;
|
|
9931
9694
|
var formatDay = (_dateTimeFormatters$d = dateTimeFormatters === null || dateTimeFormatters === void 0 ? void 0 : dateTimeFormatters.day) != null ? _dateTimeFormatters$d : defaultDateTimeFormatters.day;
|
|
9932
|
-
var formatHour = (_dateTimeFormatters$h = dateTimeFormatters === null || dateTimeFormatters === void 0 ? void 0 : dateTimeFormatters.hour) != null ? _dateTimeFormatters$h : defaultDateTimeFormatters.hour;
|
|
9933
|
-
var formatDayAndMonth = (_dateTimeFormatters$d2 = dateTimeFormatters === null || dateTimeFormatters === void 0 ? void 0 : dateTimeFormatters.dayAndMonth) != null ? _dateTimeFormatters$d2 : defaultDateTimeFormatters.dayAndMonth;
|
|
9934
9695
|
var getCalendarValuesForYear = function getCalendarValuesForYear() {
|
|
9935
9696
|
var topValues = [];
|
|
9936
9697
|
var bottomValues = [];
|
|
@@ -10065,70 +9826,12 @@ var Calendar = function Calendar(_ref) {
|
|
|
10065
9826
|
}
|
|
10066
9827
|
return [topValues, bottomValues];
|
|
10067
9828
|
};
|
|
10068
|
-
var
|
|
10069
|
-
|
|
10070
|
-
|
|
10071
|
-
|
|
10072
|
-
|
|
10073
|
-
var dates = dateSetup.dates;
|
|
10074
|
-
for (var i = 0; i < dates.length; i++) {
|
|
10075
|
-
var date = dates[i];
|
|
10076
|
-
var bottomValue = formatHour(date, locale);
|
|
10077
|
-
bottomValues.push(react.createElement("text", {
|
|
10078
|
-
key: date.getTime(),
|
|
10079
|
-
y: headerHeight * 0.8,
|
|
10080
|
-
x: columnWidth * (i + +rtl),
|
|
10081
|
-
className: styles$5.calendarBottomText,
|
|
10082
|
-
fontFamily: fontFamily
|
|
10083
|
-
}, bottomValue));
|
|
10084
|
-
if (i === 0 || date.getDate() !== dates[i - 1].getDate()) {
|
|
10085
|
-
var topValue = formatDayAndMonth(date, locale);
|
|
10086
|
-
topValues.push(react.createElement(TopCal, {
|
|
10087
|
-
key: date.toISOString(),
|
|
10088
|
-
value: topValue,
|
|
10089
|
-
x1Line: columnWidth * i + ticks * columnWidth,
|
|
10090
|
-
y1Line: 0,
|
|
10091
|
-
y2Line: topDefaultHeight,
|
|
10092
|
-
xText: columnWidth * i + ticks * columnWidth * 0.5,
|
|
10093
|
-
yText: topDefaultHeight * 0.9
|
|
10094
|
-
}));
|
|
10095
|
-
}
|
|
10096
|
-
}
|
|
10097
|
-
return [topValues, bottomValues];
|
|
9829
|
+
var getters = {
|
|
9830
|
+
year: getCalendarValuesForYear,
|
|
9831
|
+
month: getCalendarValuesForMonth,
|
|
9832
|
+
week: getCalendarValuesForWeek,
|
|
9833
|
+
day: getCalendarValuesForDay
|
|
10098
9834
|
};
|
|
10099
|
-
var getCalendarValuesForHour = function getCalendarValuesForHour() {
|
|
10100
|
-
var topValues = [];
|
|
10101
|
-
var bottomValues = [];
|
|
10102
|
-
var topDefaultHeight = headerHeight * 0.5;
|
|
10103
|
-
var dates = dateSetup.dates;
|
|
10104
|
-
for (var i = 0; i < dates.length; i++) {
|
|
10105
|
-
var date = dates[i];
|
|
10106
|
-
var bottomValue = formatHour(date, locale);
|
|
10107
|
-
bottomValues.push(react.createElement("text", {
|
|
10108
|
-
key: date.getTime(),
|
|
10109
|
-
y: headerHeight * 0.8,
|
|
10110
|
-
x: columnWidth * (i + +rtl),
|
|
10111
|
-
className: styles$5.calendarBottomText,
|
|
10112
|
-
fontFamily: fontFamily
|
|
10113
|
-
}, bottomValue));
|
|
10114
|
-
if (i !== 0 && date.getDate() !== dates[i - 1].getDate()) {
|
|
10115
|
-
var displayDate = dates[i - 1];
|
|
10116
|
-
var topValue = formatDayAndMonth(date, locale);
|
|
10117
|
-
var topPosition = (date.getHours() - 24) / 2;
|
|
10118
|
-
topValues.push(react.createElement(TopCal, {
|
|
10119
|
-
key: topValue + displayDate.getFullYear(),
|
|
10120
|
-
value: topValue,
|
|
10121
|
-
x1Line: columnWidth * i,
|
|
10122
|
-
y1Line: 0,
|
|
10123
|
-
y2Line: topDefaultHeight,
|
|
10124
|
-
xText: columnWidth * (i + topPosition),
|
|
10125
|
-
yText: topDefaultHeight * 0.9
|
|
10126
|
-
}));
|
|
10127
|
-
}
|
|
10128
|
-
}
|
|
10129
|
-
return [topValues, bottomValues];
|
|
10130
|
-
};
|
|
10131
|
-
var getters = (_getters = {}, _getters[ViewMode.Year] = getCalendarValuesForYear, _getters[ViewMode.Month] = getCalendarValuesForMonth, _getters[ViewMode.Week] = getCalendarValuesForWeek, _getters[ViewMode.Day] = getCalendarValuesForDay, _getters[ViewMode.QuarterDay] = getCalendarValuesForPartOfDay, _getters[ViewMode.HalfDay] = getCalendarValuesForPartOfDay, _getters[ViewMode.Hour] = getCalendarValuesForHour, _getters);
|
|
10132
9835
|
var _getters$dateSetup$vi = getters[dateSetup.viewMode](),
|
|
10133
9836
|
topValues = _getters$dateSetup$vi[0],
|
|
10134
9837
|
bottomValues = _getters$dateSetup$vi[1];
|
|
@@ -10997,6 +10700,7 @@ var TaskGanttContent = function TaskGanttContent(_ref) {
|
|
|
10997
10700
|
showSecondaryDates = _ref$showSecondaryDat === void 0 ? false : _ref$showSecondaryDat,
|
|
10998
10701
|
currentDateIndicator = _ref.currentDateIndicator,
|
|
10999
10702
|
projection = _ref.projection,
|
|
10703
|
+
readOnly = _ref.readOnly,
|
|
11000
10704
|
setGanttEvent = _ref.setGanttEvent,
|
|
11001
10705
|
setFailedTask = _ref.setFailedTask,
|
|
11002
10706
|
setSelectedTask = _ref.setSelectedTask,
|
|
@@ -11113,6 +10817,9 @@ var TaskGanttContent = function TaskGanttContent(_ref) {
|
|
|
11113
10817
|
}
|
|
11114
10818
|
}, [ganttEvent, xStep, initEventX1Delta, onProgressChange, timeStep, onDateChange, svg, isMoving, point, rtl, setFailedTask, setGanttEvent]);
|
|
11115
10819
|
var hasMovedHorizontally = function hasMovedHorizontally(event) {
|
|
10820
|
+
if (readOnly) {
|
|
10821
|
+
return false;
|
|
10822
|
+
}
|
|
11116
10823
|
return initEventXClick !== (event === null || event === void 0 ? void 0 : event.clientX);
|
|
11117
10824
|
};
|
|
11118
10825
|
var handleBarEventStart = function handleBarEventStart(action, task, event) {
|
|
@@ -11164,8 +10871,8 @@ var TaskGanttContent = function TaskGanttContent(_ref) {
|
|
|
11164
10871
|
} else if (action === "dblclick") {
|
|
11165
10872
|
!!onDoubleClick && onDoubleClick(task);
|
|
11166
10873
|
} else if (action === "click") {
|
|
11167
|
-
var skipClick =
|
|
11168
|
-
skipClick && !!onClick && onClick(task);
|
|
10874
|
+
var skipClick = hasMovedHorizontally(event);
|
|
10875
|
+
!skipClick && !!onClick && onClick(task);
|
|
11169
10876
|
} else if (action === "contextmenu") {
|
|
11170
10877
|
event.preventDefault();
|
|
11171
10878
|
!!onContextMenu && onContextMenu(event, task);
|
|
@@ -11235,9 +10942,9 @@ var TaskGanttContent = function TaskGanttContent(_ref) {
|
|
|
11235
10942
|
task: task,
|
|
11236
10943
|
arrowIndent: arrowIndent,
|
|
11237
10944
|
taskHeight: taskHeight,
|
|
11238
|
-
isProgressChangeable: !!onProgressChange && !task.isDisabled,
|
|
11239
|
-
isDateMovable: !!onDateChange && !task.isDisabled,
|
|
11240
|
-
isDateResizable: !!onDateChange && !task.isDisabled && !forbidResize,
|
|
10945
|
+
isProgressChangeable: !readOnly && !!onProgressChange && !task.isDisabled,
|
|
10946
|
+
isDateMovable: !readOnly && !!onDateChange && !task.isDisabled,
|
|
10947
|
+
isDateResizable: !readOnly && !!onDateChange && !task.isDisabled && !forbidResize,
|
|
11241
10948
|
isDelete: !task.isDisabled,
|
|
11242
10949
|
onEventStart: handleBarEventStart,
|
|
11243
10950
|
key: task.id,
|
|
@@ -11260,8 +10967,8 @@ var TaskGantt = function TaskGantt(_ref) {
|
|
|
11260
10967
|
scrollY = _ref.scrollY,
|
|
11261
10968
|
scrollX = _ref.scrollX;
|
|
11262
10969
|
var ganttSVGRef = react.useRef(null);
|
|
11263
|
-
var horizontalContainerRef = react.
|
|
11264
|
-
var verticalGanttContainerRef = react.
|
|
10970
|
+
var horizontalContainerRef = react.createRef();
|
|
10971
|
+
var verticalGanttContainerRef = react.createRef();
|
|
11265
10972
|
var newBarProps = _extends({}, barProps, {
|
|
11266
10973
|
svg: ganttSVGRef
|
|
11267
10974
|
});
|
|
@@ -11269,12 +10976,12 @@ var TaskGantt = function TaskGantt(_ref) {
|
|
|
11269
10976
|
if (horizontalContainerRef.current) {
|
|
11270
10977
|
horizontalContainerRef.current.scrollTop = scrollY;
|
|
11271
10978
|
}
|
|
11272
|
-
}, [scrollY]);
|
|
10979
|
+
}, [horizontalContainerRef, scrollY]);
|
|
11273
10980
|
react.useEffect(function () {
|
|
11274
10981
|
if (verticalGanttContainerRef.current) {
|
|
11275
10982
|
verticalGanttContainerRef.current.scrollLeft = scrollX;
|
|
11276
10983
|
}
|
|
11277
|
-
}, [scrollX]);
|
|
10984
|
+
}, [verticalGanttContainerRef, scrollX]);
|
|
11278
10985
|
return react.createElement("div", {
|
|
11279
10986
|
className: styles$7.ganttContainer,
|
|
11280
10987
|
ref: taskGanttRef
|
|
@@ -11314,12 +11021,20 @@ var HorizontalScroll = function HorizontalScroll(_ref) {
|
|
|
11314
11021
|
taskGanttRef = _ref.taskGanttRef,
|
|
11315
11022
|
rtl = _ref.rtl,
|
|
11316
11023
|
onScroll = _ref.onScroll;
|
|
11317
|
-
var scrollRef = react.
|
|
11024
|
+
var scrollRef = react.createRef();
|
|
11318
11025
|
react.useEffect(function () {
|
|
11026
|
+
var id;
|
|
11319
11027
|
if (scrollRef.current) {
|
|
11320
|
-
scrollRef.current
|
|
11028
|
+
var wrap = scrollRef.current;
|
|
11029
|
+
var setScrollLeft = function setScrollLeft() {
|
|
11030
|
+
wrap.scrollLeft = scroll;
|
|
11031
|
+
};
|
|
11032
|
+
id = setTimeout(setScrollLeft, 50);
|
|
11321
11033
|
}
|
|
11322
|
-
|
|
11034
|
+
return function () {
|
|
11035
|
+
clearTimeout(id);
|
|
11036
|
+
};
|
|
11037
|
+
}, [scroll, scrollRef]);
|
|
11323
11038
|
var rect = (_taskGanttRef$current = taskGanttRef.current) === null || _taskGanttRef$current === void 0 ? void 0 : _taskGanttRef$current.getBoundingClientRect();
|
|
11324
11039
|
return react.createElement("div", {
|
|
11325
11040
|
dir: "ltr",
|
|
@@ -11328,6 +11043,7 @@ var HorizontalScroll = function HorizontalScroll(_ref) {
|
|
|
11328
11043
|
} : undefined,
|
|
11329
11044
|
className: styles$8.scrollWrapper,
|
|
11330
11045
|
onScroll: onScroll,
|
|
11046
|
+
"data-scrollx": "true",
|
|
11331
11047
|
ref: scrollRef
|
|
11332
11048
|
}, react.createElement("div", {
|
|
11333
11049
|
style: {
|
|
@@ -11351,8 +11067,6 @@ var Gantt = function Gantt(_ref) {
|
|
|
11351
11067
|
filter = _ref.filter,
|
|
11352
11068
|
_ref$ganttHeight = _ref.ganttHeight,
|
|
11353
11069
|
ganttHeight = _ref$ganttHeight === void 0 ? 0 : _ref$ganttHeight,
|
|
11354
|
-
_ref$viewMode = _ref.viewMode,
|
|
11355
|
-
viewMode = _ref$viewMode === void 0 ? ViewMode.Day : _ref$viewMode,
|
|
11356
11070
|
_ref$preStepsCount = _ref.preStepsCount,
|
|
11357
11071
|
preStepsCount = _ref$preStepsCount === void 0 ? 1 : _ref$preStepsCount,
|
|
11358
11072
|
_ref$locale = _ref.locale,
|
|
@@ -11416,6 +11130,12 @@ var Gantt = function Gantt(_ref) {
|
|
|
11416
11130
|
projection = _ref.projection,
|
|
11417
11131
|
displayedStartDate = _ref.displayedStartDate,
|
|
11418
11132
|
displayedEndDate = _ref.displayedEndDate,
|
|
11133
|
+
_ref$initialScrollX = _ref.initialScrollX,
|
|
11134
|
+
initialScrollX = _ref$initialScrollX === void 0 ? -1 : _ref$initialScrollX,
|
|
11135
|
+
_ref$initialScrollY = _ref.initialScrollY,
|
|
11136
|
+
initialScrollY = _ref$initialScrollY === void 0 ? 0 : _ref$initialScrollY,
|
|
11137
|
+
_ref$readOnly = _ref.readOnly,
|
|
11138
|
+
readOnly = _ref$readOnly === void 0 ? false : _ref$readOnly,
|
|
11419
11139
|
onDateChange = _ref.onDateChange,
|
|
11420
11140
|
onProgressChange = _ref.onProgressChange,
|
|
11421
11141
|
onDoubleClick = _ref.onDoubleClick,
|
|
@@ -11423,7 +11143,11 @@ var Gantt = function Gantt(_ref) {
|
|
|
11423
11143
|
onContextMenu = _ref.onContextMenu,
|
|
11424
11144
|
onDelete = _ref.onDelete,
|
|
11425
11145
|
onSelect = _ref.onSelect,
|
|
11426
|
-
onExpanderClick = _ref.onExpanderClick
|
|
11146
|
+
onExpanderClick = _ref.onExpanderClick,
|
|
11147
|
+
_ref$viewMode = _ref.viewMode,
|
|
11148
|
+
viewMode = _ref$viewMode === void 0 ? "month" : _ref$viewMode,
|
|
11149
|
+
onScrollX = _ref.onScrollX,
|
|
11150
|
+
onScrollY = _ref.onScrollY;
|
|
11427
11151
|
var wrapperRef = react.useRef(null);
|
|
11428
11152
|
var taskGanttRef = react.useRef(null);
|
|
11429
11153
|
var taskListRef = react.useRef(null);
|
|
@@ -11475,12 +11199,12 @@ var Gantt = function Gantt(_ref) {
|
|
|
11475
11199
|
setFailedTask = _useState5[1];
|
|
11476
11200
|
var svgWidth = dateSetup.dates.length * columnWidth;
|
|
11477
11201
|
var ganttFullHeight = barTasks.length * rowHeight;
|
|
11478
|
-
var _useState6 = react.useState(
|
|
11479
|
-
|
|
11480
|
-
|
|
11481
|
-
var _useState7 = react.useState(
|
|
11482
|
-
|
|
11483
|
-
|
|
11202
|
+
var _useState6 = react.useState(initialScrollX),
|
|
11203
|
+
scrollX = _useState6[0],
|
|
11204
|
+
setScrollX = _useState6[1];
|
|
11205
|
+
var _useState7 = react.useState(initialScrollY),
|
|
11206
|
+
scrollY = _useState7[0],
|
|
11207
|
+
setScrollY = _useState7[1];
|
|
11484
11208
|
var ignoreScrollEvent = react.useRef(false);
|
|
11485
11209
|
var setIgnoreScrollEvent = function setIgnoreScrollEvent(value) {
|
|
11486
11210
|
ignoreScrollEvent.current = value;
|
|
@@ -11495,9 +11219,12 @@ var Gantt = function Gantt(_ref) {
|
|
|
11495
11219
|
window.addEventListener("gantt-sync-scroll-event", function (e) {
|
|
11496
11220
|
if (e.detail.id !== id) {
|
|
11497
11221
|
setScrollX(e.detail.scrollX);
|
|
11222
|
+
if (onScrollX) {
|
|
11223
|
+
onScrollX(e.detail.scrollX);
|
|
11224
|
+
}
|
|
11498
11225
|
}
|
|
11499
11226
|
});
|
|
11500
|
-
}, [id]);
|
|
11227
|
+
}, [id, onScrollX]);
|
|
11501
11228
|
react.useEffect(function () {
|
|
11502
11229
|
var filteredTasks;
|
|
11503
11230
|
if (onExpanderClick) {
|
|
@@ -11537,9 +11264,9 @@ var Gantt = function Gantt(_ref) {
|
|
|
11537
11264
|
});
|
|
11538
11265
|
}
|
|
11539
11266
|
setBarTasks(convertToBarTasks(filteredTasks, newDates, columnWidth, rowHeight, taskHeight, projectHeight, timelineHeight, barCornerRadius, handleWidth, rtl, barProgressColor, barProgressSelectedColor, barBackgroundColor, barBackgroundSelectedColor, projectProgressColor, projectProgressSelectedColor, projectBackgroundColor, projectBackgroundSelectedColor, showSecondaryDates));
|
|
11540
|
-
}, [tasks, viewMode, preStepsCount, rowHeight, barCornerRadius, columnWidth, taskHeight, handleWidth, barProgressColor, barProgressSelectedColor, barBackgroundColor, barBackgroundSelectedColor, projectProgressColor, projectProgressSelectedColor, projectBackgroundColor, projectBackgroundSelectedColor, rtl, scrollX, onExpanderClick, showSecondaryDates, projectHeight, timelineHeight, displayedStartDate, displayedEndDate]);
|
|
11267
|
+
}, [tasks, viewMode, preStepsCount, rowHeight, barCornerRadius, columnWidth, taskHeight, handleWidth, barProgressColor, barProgressSelectedColor, barBackgroundColor, barBackgroundSelectedColor, projectProgressColor, projectProgressSelectedColor, projectBackgroundColor, projectBackgroundSelectedColor, rtl, scrollX, onExpanderClick, showSecondaryDates, projectHeight, timelineHeight, displayedStartDate, displayedEndDate, dateSetup]);
|
|
11541
11268
|
react.useEffect(function () {
|
|
11542
|
-
if (viewMode === dateSetup.viewMode && viewDate) {
|
|
11269
|
+
if (viewMode === dateSetup.viewMode && viewDate && initialScrollX < 1) {
|
|
11543
11270
|
var dates = dateSetup.dates;
|
|
11544
11271
|
var index = dates.findIndex(function (d, i) {
|
|
11545
11272
|
return viewDate.valueOf() >= d.valueOf() && i + 1 !== dates.length && viewDate.valueOf() < dates[i + 1].valueOf();
|
|
@@ -11550,7 +11277,7 @@ var Gantt = function Gantt(_ref) {
|
|
|
11550
11277
|
setIgnoreScrollEvent(true);
|
|
11551
11278
|
setScrollX(columnWidth * index);
|
|
11552
11279
|
}
|
|
11553
|
-
}, [viewDate, columnWidth, dateSetup.dates, dateSetup.viewMode, viewMode]);
|
|
11280
|
+
}, [viewDate, columnWidth, dateSetup.dates, dateSetup.viewMode, viewMode, initialScrollX]);
|
|
11554
11281
|
react.useEffect(function () {
|
|
11555
11282
|
var changedTask = ganttEvent.changedTask,
|
|
11556
11283
|
action = ganttEvent.action;
|
|
@@ -11591,6 +11318,24 @@ var Gantt = function Gantt(_ref) {
|
|
|
11591
11318
|
setTaskListWidth(taskListRef.current.offsetWidth);
|
|
11592
11319
|
}
|
|
11593
11320
|
}, [taskListRef, listCellWidth]);
|
|
11321
|
+
react.useEffect(function () {
|
|
11322
|
+
if (wrapperRef.current) {
|
|
11323
|
+
if (scrollX !== -1) {
|
|
11324
|
+
var wrap = wrapperRef.current;
|
|
11325
|
+
var setScrollLeft = function setScrollLeft() {
|
|
11326
|
+
wrap.scrollLeft = scrollX;
|
|
11327
|
+
};
|
|
11328
|
+
setTimeout(setScrollLeft, 125);
|
|
11329
|
+
}
|
|
11330
|
+
if (scrollY !== 0) {
|
|
11331
|
+
var _wrap = wrapperRef.current;
|
|
11332
|
+
var setScrollTop = function setScrollTop() {
|
|
11333
|
+
_wrap.scrollTop = scrollY;
|
|
11334
|
+
};
|
|
11335
|
+
setTimeout(setScrollTop, 125);
|
|
11336
|
+
}
|
|
11337
|
+
}
|
|
11338
|
+
}, []);
|
|
11594
11339
|
react.useEffect(function () {
|
|
11595
11340
|
if (wrapperRef.current) {
|
|
11596
11341
|
setSvgContainerWidth(wrapperRef.current.offsetWidth - taskListWidth.current);
|
|
@@ -11615,6 +11360,12 @@ var Gantt = function Gantt(_ref) {
|
|
|
11615
11360
|
newScrollX = svgWidth;
|
|
11616
11361
|
}
|
|
11617
11362
|
setScrollX(newScrollX);
|
|
11363
|
+
window.dispatchEvent(new CustomEvent("gantt-sync-scroll-event", {
|
|
11364
|
+
detail: {
|
|
11365
|
+
componentId: id,
|
|
11366
|
+
scrollX: newScrollX
|
|
11367
|
+
}
|
|
11368
|
+
}));
|
|
11618
11369
|
event.preventDefault();
|
|
11619
11370
|
} else if (ganttHeight) {
|
|
11620
11371
|
var newScrollY = scrollY + event.deltaY;
|
|
@@ -11638,9 +11389,16 @@ var Gantt = function Gantt(_ref) {
|
|
|
11638
11389
|
};
|
|
11639
11390
|
}, [wrapperRef, scrollY, scrollX, ganttHeight, svgWidth, rtl, ganttFullHeight]);
|
|
11640
11391
|
var handleScrollY = function handleScrollY(event) {
|
|
11641
|
-
if (scrollY !== event.currentTarget.scrollTop
|
|
11642
|
-
|
|
11643
|
-
|
|
11392
|
+
if (scrollY !== event.currentTarget.scrollTop) {
|
|
11393
|
+
if (onScrollY) {
|
|
11394
|
+
onScrollY(event.currentTarget.scrollTop);
|
|
11395
|
+
}
|
|
11396
|
+
if (!ignoreScrollEvent.current) {
|
|
11397
|
+
setScrollY(event.currentTarget.scrollTop);
|
|
11398
|
+
setIgnoreScrollEvent(true);
|
|
11399
|
+
} else {
|
|
11400
|
+
setIgnoreScrollEvent(false);
|
|
11401
|
+
}
|
|
11644
11402
|
} else {
|
|
11645
11403
|
setIgnoreScrollEvent(false);
|
|
11646
11404
|
}
|
|
@@ -11706,6 +11464,9 @@ var Gantt = function Gantt(_ref) {
|
|
|
11706
11464
|
} else if (newScrollY > ganttFullHeight - ganttHeight) {
|
|
11707
11465
|
newScrollY = ganttFullHeight - ganttHeight;
|
|
11708
11466
|
}
|
|
11467
|
+
if (onScrollY) {
|
|
11468
|
+
onScrollY(event.currentTarget.scrollTop);
|
|
11469
|
+
}
|
|
11709
11470
|
setScrollY(newScrollY);
|
|
11710
11471
|
}
|
|
11711
11472
|
setIgnoreScrollEvent(true);
|
|
@@ -11799,6 +11560,7 @@ var Gantt = function Gantt(_ref) {
|
|
|
11799
11560
|
ganttHeight: ganttHeight,
|
|
11800
11561
|
currentDateIndicator: currentDateIndicatorContent,
|
|
11801
11562
|
projection: projectionContent,
|
|
11563
|
+
readOnly: readOnly,
|
|
11802
11564
|
setGanttEvent: setGanttEvent,
|
|
11803
11565
|
setFailedTask: setFailedTask,
|
|
11804
11566
|
setSelectedTask: handleSelectedTask,
|
|
@@ -11829,7 +11591,7 @@ var Gantt = function Gantt(_ref) {
|
|
|
11829
11591
|
TaskListTable: TaskListTable
|
|
11830
11592
|
};
|
|
11831
11593
|
return react.createElement("div", null, react.createElement("div", {
|
|
11832
|
-
className: styles$7.wrapper,
|
|
11594
|
+
className: "" + styles$7.wrapper,
|
|
11833
11595
|
onKeyDown: handleKeyDown,
|
|
11834
11596
|
tabIndex: 0,
|
|
11835
11597
|
ref: wrapperRef
|
|
@@ -11873,6 +11635,199 @@ var Gantt = function Gantt(_ref) {
|
|
|
11873
11635
|
}));
|
|
11874
11636
|
};
|
|
11875
11637
|
|
|
11638
|
+
var MAIN_GANTT_ID = "main";
|
|
11639
|
+
var SECONDARY_GANTT_ID = "secondary";
|
|
11640
|
+
var columnWidthForTimeUnit = function columnWidthForTimeUnit(timeUnit) {
|
|
11641
|
+
switch (timeUnit) {
|
|
11642
|
+
case "year":
|
|
11643
|
+
return 60 * 2;
|
|
11644
|
+
default:
|
|
11645
|
+
return 60;
|
|
11646
|
+
}
|
|
11647
|
+
};
|
|
11648
|
+
var convertPhaseToTask = function convertPhaseToTask(item) {
|
|
11649
|
+
var mapPhase = function mapPhase(_ref) {
|
|
11650
|
+
var phaseStart = _ref.startDate,
|
|
11651
|
+
phaseEnd = _ref.endDate,
|
|
11652
|
+
secondaryStartDate = _ref.secondaryStartDate,
|
|
11653
|
+
secondaryEndDate = _ref.secondaryEndDate,
|
|
11654
|
+
phaseName = _ref.name,
|
|
11655
|
+
phaseId = _ref.id,
|
|
11656
|
+
color = _ref.color,
|
|
11657
|
+
selectedColor = _ref.selectedColor,
|
|
11658
|
+
dependencies = _ref.dependencies,
|
|
11659
|
+
icon = _ref.icon;
|
|
11660
|
+
var _validDates = validDates(phaseStart, phaseEnd),
|
|
11661
|
+
start = _validDates.start,
|
|
11662
|
+
end = _validDates.end;
|
|
11663
|
+
var _validDates2 = validDates(secondaryStartDate, secondaryEndDate),
|
|
11664
|
+
phaseStart2 = _validDates2.start,
|
|
11665
|
+
phaseEnd2 = _validDates2.end;
|
|
11666
|
+
return {
|
|
11667
|
+
start: start,
|
|
11668
|
+
end: end,
|
|
11669
|
+
secondaryStart: phaseStart2,
|
|
11670
|
+
secondaryEnd: phaseEnd2,
|
|
11671
|
+
name: phaseName,
|
|
11672
|
+
valuesToShow: item.valuesToShow,
|
|
11673
|
+
id: phaseId,
|
|
11674
|
+
type: "task",
|
|
11675
|
+
progress: 100,
|
|
11676
|
+
dependencies: dependencies,
|
|
11677
|
+
styles: color ? {
|
|
11678
|
+
backgroundColor: color,
|
|
11679
|
+
progressColor: color,
|
|
11680
|
+
backgroundSelectedColor: selectedColor,
|
|
11681
|
+
progressSelectedColor: selectedColor
|
|
11682
|
+
} : {},
|
|
11683
|
+
icon: icon
|
|
11684
|
+
};
|
|
11685
|
+
};
|
|
11686
|
+
return mapPhase(item);
|
|
11687
|
+
};
|
|
11688
|
+
var convertDetailToTimeline = function convertDetailToTimeline(item, mainGanttStartDate, mainGanttEndDate) {
|
|
11689
|
+
var id = item.id,
|
|
11690
|
+
name = item.name,
|
|
11691
|
+
schedule = item.schedule;
|
|
11692
|
+
var getDatesForTask = function getDatesForTask(item) {
|
|
11693
|
+
var start = mainGanttStartDate != null ? mainGanttStartDate : "";
|
|
11694
|
+
var end = mainGanttEndDate != null ? mainGanttEndDate : "";
|
|
11695
|
+
for (var i = 0; i < item.schedule.length; i++) {
|
|
11696
|
+
var lstart = item.schedule[i].startDate;
|
|
11697
|
+
var lend = item.schedule[i].endDate;
|
|
11698
|
+
if (!start || lstart.localeCompare(start) < 0) {
|
|
11699
|
+
start = lstart;
|
|
11700
|
+
}
|
|
11701
|
+
if (!end || lend.localeCompare(end) > 0) {
|
|
11702
|
+
end = lend;
|
|
11703
|
+
}
|
|
11704
|
+
}
|
|
11705
|
+
return validDates(start, end);
|
|
11706
|
+
};
|
|
11707
|
+
var _getDatesForTask = getDatesForTask(item),
|
|
11708
|
+
start = _getDatesForTask.start,
|
|
11709
|
+
end = _getDatesForTask.end;
|
|
11710
|
+
var convertToFrame = function convertToFrame(x) {
|
|
11711
|
+
var startDate = x.startDate,
|
|
11712
|
+
endDate = x.endDate,
|
|
11713
|
+
color = x.color,
|
|
11714
|
+
selectedColor = x.selectedColor,
|
|
11715
|
+
icon = x.icon;
|
|
11716
|
+
var _validDates3 = validDates(startDate, endDate),
|
|
11717
|
+
start = _validDates3.start,
|
|
11718
|
+
end = _validDates3.end;
|
|
11719
|
+
return {
|
|
11720
|
+
start: start,
|
|
11721
|
+
end: end,
|
|
11722
|
+
backgroundColor: color != null ? color : "0xffffff",
|
|
11723
|
+
backgroundSelectedColor: selectedColor != null ? selectedColor : color,
|
|
11724
|
+
icon: icon
|
|
11725
|
+
};
|
|
11726
|
+
};
|
|
11727
|
+
var defaultColor = "#595959";
|
|
11728
|
+
return {
|
|
11729
|
+
id: id,
|
|
11730
|
+
type: "timeline",
|
|
11731
|
+
timeline: schedule.map(convertToFrame),
|
|
11732
|
+
name: name,
|
|
11733
|
+
valuesToShow: item.valuesToShow,
|
|
11734
|
+
start: start,
|
|
11735
|
+
end: end,
|
|
11736
|
+
progress: 100,
|
|
11737
|
+
styles: {
|
|
11738
|
+
backgroundColor: defaultColor,
|
|
11739
|
+
progressColor: defaultColor,
|
|
11740
|
+
backgroundSelectedColor: defaultColor,
|
|
11741
|
+
progressSelectedColor: defaultColor
|
|
11742
|
+
}
|
|
11743
|
+
};
|
|
11744
|
+
};
|
|
11745
|
+
var isDetail = function isDetail(row) {
|
|
11746
|
+
return row && row.schedule && row.schedule.length !== 0;
|
|
11747
|
+
};
|
|
11748
|
+
var convertProjectToTasks = function convertProjectToTasks(item, mainGanttStartDate, mainGanttEndDate) {
|
|
11749
|
+
if (!isDetail(item)) {
|
|
11750
|
+
var _row$phases;
|
|
11751
|
+
var row = item;
|
|
11752
|
+
var _validDates4 = validDates(row.startDate, row.endDate),
|
|
11753
|
+
start = _validDates4.start,
|
|
11754
|
+
end = _validDates4.end;
|
|
11755
|
+
var _validDates5 = validDates(row.secondaryStartDate, row.secondaryEndDate),
|
|
11756
|
+
start2 = _validDates5.start,
|
|
11757
|
+
end2 = _validDates5.end;
|
|
11758
|
+
var mainTask = {
|
|
11759
|
+
start: start,
|
|
11760
|
+
end: end,
|
|
11761
|
+
id: row.id,
|
|
11762
|
+
name: row.name,
|
|
11763
|
+
type: row.type,
|
|
11764
|
+
valuesToShow: row.valuesToShow,
|
|
11765
|
+
secondaryStart: start2,
|
|
11766
|
+
secondaryEnd: end2,
|
|
11767
|
+
progress: 100,
|
|
11768
|
+
isDisabled: false,
|
|
11769
|
+
hideChildren: false,
|
|
11770
|
+
icon: row.icon
|
|
11771
|
+
};
|
|
11772
|
+
var children1 = ((_row$phases = row.phases) != null ? _row$phases : []).map(convertPhaseToTask);
|
|
11773
|
+
return [mainTask].concat(children1);
|
|
11774
|
+
} else {
|
|
11775
|
+
var _row = item;
|
|
11776
|
+
return [_extends({}, convertDetailToTimeline(_row, mainGanttStartDate, mainGanttEndDate))];
|
|
11777
|
+
}
|
|
11778
|
+
};
|
|
11779
|
+
var mergeTaskIntoProjects = function mergeTaskIntoProjects(projects, _ref2) {
|
|
11780
|
+
var id = _ref2.id,
|
|
11781
|
+
start = _ref2.start,
|
|
11782
|
+
end = _ref2.end;
|
|
11783
|
+
return projects.map(function (project) {
|
|
11784
|
+
return project.id === id ? withNewDates(project, start, end) : project;
|
|
11785
|
+
});
|
|
11786
|
+
};
|
|
11787
|
+
var mergeTaskIntoPhases = function mergeTaskIntoPhases(phases, _ref3) {
|
|
11788
|
+
var id = _ref3.id,
|
|
11789
|
+
start = _ref3.start,
|
|
11790
|
+
end = _ref3.end;
|
|
11791
|
+
if (phases) {
|
|
11792
|
+
return phases.map(function (phase) {
|
|
11793
|
+
return phase.id === id ? withNewDates(phase, start, end) : phase;
|
|
11794
|
+
});
|
|
11795
|
+
}
|
|
11796
|
+
return undefined;
|
|
11797
|
+
};
|
|
11798
|
+
var withNewDates = function withNewDates(p, start, end) {
|
|
11799
|
+
var startDate = formatToIsoDate(start);
|
|
11800
|
+
var endDate = formatToIsoDate(end);
|
|
11801
|
+
var extra = {
|
|
11802
|
+
startDate: startDate,
|
|
11803
|
+
endDate: endDate
|
|
11804
|
+
};
|
|
11805
|
+
return _extends({}, p, extra);
|
|
11806
|
+
};
|
|
11807
|
+
var getProjectById = function getProjectById(id, items) {
|
|
11808
|
+
for (var i = 0; i < items.length; i++) {
|
|
11809
|
+
if (items[i].id === id) {
|
|
11810
|
+
return items[i];
|
|
11811
|
+
}
|
|
11812
|
+
}
|
|
11813
|
+
return undefined;
|
|
11814
|
+
};
|
|
11815
|
+
var getPhaseById = function getPhaseById(id, items) {
|
|
11816
|
+
for (var i = 0; i < items.length; i++) {
|
|
11817
|
+
if (isDetail(items[i])) {
|
|
11818
|
+
continue;
|
|
11819
|
+
}
|
|
11820
|
+
var item = items[i];
|
|
11821
|
+
if (!item.phases) {
|
|
11822
|
+
continue;
|
|
11823
|
+
}
|
|
11824
|
+
for (var j = 0; j < item.phases.length; j++) if (item.phases[j].id === id) {
|
|
11825
|
+
return item.phases[j];
|
|
11826
|
+
}
|
|
11827
|
+
}
|
|
11828
|
+
return undefined;
|
|
11829
|
+
};
|
|
11830
|
+
|
|
11876
11831
|
var cachedFormats = {};
|
|
11877
11832
|
var getOrBuildCachedFormat = function getOrBuildCachedFormat(locale, options) {
|
|
11878
11833
|
var _cachedFormats$key;
|
|
@@ -12146,16 +12101,16 @@ var classes$2 = {"switcher":"_3P0WE","button":"_1oXbe","label":"_1R9mh"};
|
|
|
12146
12101
|
var Switcher = function Switcher(_ref) {
|
|
12147
12102
|
var onTimeUnitChange = _ref.onTimeUnitChange;
|
|
12148
12103
|
var day = function day() {
|
|
12149
|
-
return onTimeUnitChange(
|
|
12104
|
+
return onTimeUnitChange("day");
|
|
12150
12105
|
};
|
|
12151
12106
|
var week = function week() {
|
|
12152
|
-
return onTimeUnitChange(
|
|
12107
|
+
return onTimeUnitChange("week");
|
|
12153
12108
|
};
|
|
12154
12109
|
var month = function month() {
|
|
12155
|
-
return onTimeUnitChange(
|
|
12110
|
+
return onTimeUnitChange("month");
|
|
12156
12111
|
};
|
|
12157
12112
|
var year = function year() {
|
|
12158
|
-
return onTimeUnitChange(
|
|
12113
|
+
return onTimeUnitChange("year");
|
|
12159
12114
|
};
|
|
12160
12115
|
return react.createElement("div", {
|
|
12161
12116
|
className: classes$2.switcher
|
|
@@ -12188,7 +12143,7 @@ var Switcher = function Switcher(_ref) {
|
|
|
12188
12143
|
|
|
12189
12144
|
var Planner = function Planner(props) {
|
|
12190
12145
|
var _props$secondaryGantt, _props$mainGantt$show, _props$mainGantt$task, _props$mainGantt$task2, _props$mainGantt$tool, _props$secondaryGantt3, _props$secondaryGantt4, _props$secondaryGantt5, _props$secondaryGantt6;
|
|
12191
|
-
var _useState = react.useState(
|
|
12146
|
+
var _useState = react.useState(props.viewMode),
|
|
12192
12147
|
timeUnit = _useState[0],
|
|
12193
12148
|
setTimeUnit = _useState[1];
|
|
12194
12149
|
var currentTasks = react.useRef(props.mainGantt.items);
|
|
@@ -12199,19 +12154,22 @@ var Planner = function Planner(props) {
|
|
|
12199
12154
|
var setCurrentDetails = function setCurrentDetails(details) {
|
|
12200
12155
|
currentDetails.current = details;
|
|
12201
12156
|
};
|
|
12202
|
-
var _useState2 = react.useState(
|
|
12203
|
-
|
|
12204
|
-
|
|
12157
|
+
var _useState2 = react.useState(props.mainGantt.initialScrollX ? props.mainGantt.initialScrollX : -1),
|
|
12158
|
+
scrollX = _useState2[0],
|
|
12159
|
+
setScrollX = _useState2[1];
|
|
12160
|
+
var _useState3 = react.useState((_props$mainGantt$show = props.mainGantt.showSecondaryDates) != null ? _props$mainGantt$show : false),
|
|
12161
|
+
mainGanttDoubleView = _useState3[0],
|
|
12162
|
+
setMainGanttDoubleView = _useState3[1];
|
|
12205
12163
|
var displayedDates = react.useRef(calculateDisplayedDateRange(currentTasks.current, timeUnit, mainGanttDoubleView, currentDetails.current, props.preStepsCount));
|
|
12206
12164
|
var setDisplayedDates = function setDisplayedDates(dates) {
|
|
12207
12165
|
displayedDates.current = dates;
|
|
12208
12166
|
};
|
|
12209
|
-
var _useState3 = react.useState(),
|
|
12210
|
-
viewDate = _useState3[0],
|
|
12211
|
-
setViewDate = _useState3[1];
|
|
12212
12167
|
var _useState4 = react.useState(),
|
|
12213
|
-
|
|
12214
|
-
|
|
12168
|
+
viewDate = _useState4[0],
|
|
12169
|
+
setViewDate = _useState4[1];
|
|
12170
|
+
var _useState5 = react.useState(),
|
|
12171
|
+
projection = _useState5[0],
|
|
12172
|
+
setProjection = _useState5[1];
|
|
12215
12173
|
var locale = "it-IT";
|
|
12216
12174
|
var handleClick = function handleClick(row, onClick) {
|
|
12217
12175
|
if (!row) {
|
|
@@ -12301,6 +12259,17 @@ var Planner = function Planner(props) {
|
|
|
12301
12259
|
}
|
|
12302
12260
|
}
|
|
12303
12261
|
onDateChange === null || onDateChange === void 0 ? void 0 : onDateChange(row);
|
|
12262
|
+
var getScrollX = function getScrollX() {
|
|
12263
|
+
if (wrapperRef.current) {
|
|
12264
|
+
var _wrapperRef$current$q;
|
|
12265
|
+
var x = (_wrapperRef$current$q = wrapperRef.current.querySelector('[data-scrollx="true"]')) === null || _wrapperRef$current$q === void 0 ? void 0 : _wrapperRef$current$q.scrollLeft;
|
|
12266
|
+
if (x !== undefined) {
|
|
12267
|
+
var _props$onScrollX;
|
|
12268
|
+
(_props$onScrollX = props.onScrollX) === null || _props$onScrollX === void 0 ? void 0 : _props$onScrollX.call(props, x);
|
|
12269
|
+
}
|
|
12270
|
+
}
|
|
12271
|
+
};
|
|
12272
|
+
setTimeout(getScrollX, 500);
|
|
12304
12273
|
};
|
|
12305
12274
|
react.useEffect(function () {
|
|
12306
12275
|
var _props$secondaryGantt2;
|
|
@@ -12331,10 +12300,16 @@ var Planner = function Planner(props) {
|
|
|
12331
12300
|
}
|
|
12332
12301
|
}
|
|
12333
12302
|
console.log("PLANNER render");
|
|
12334
|
-
|
|
12303
|
+
var wrapperRef = react.useRef(null);
|
|
12304
|
+
return react.createElement("div", {
|
|
12305
|
+
ref: wrapperRef
|
|
12306
|
+
}, react.createElement(Switcher, {
|
|
12335
12307
|
onTimeUnitChange: function onTimeUnitChange(timeUnit) {
|
|
12308
|
+
var _props$onSetViewMode;
|
|
12309
|
+
(_props$onSetViewMode = props.onSetViewMode) === null || _props$onSetViewMode === void 0 ? void 0 : _props$onSetViewMode.call(props, timeUnit);
|
|
12336
12310
|
setTimeUnit(timeUnit);
|
|
12337
12311
|
setViewDate(undefined);
|
|
12312
|
+
setScrollX(-1);
|
|
12338
12313
|
}
|
|
12339
12314
|
}), react.createElement("div", {
|
|
12340
12315
|
style: {
|
|
@@ -12354,7 +12329,7 @@ var Planner = function Planner(props) {
|
|
|
12354
12329
|
viewDate: viewDate,
|
|
12355
12330
|
tasks: tasks,
|
|
12356
12331
|
columnWidth: columnWidthForTimeUnit(timeUnit),
|
|
12357
|
-
viewMode:
|
|
12332
|
+
viewMode: timeUnit
|
|
12358
12333
|
}, props.mainGantt.stylingOptions, {
|
|
12359
12334
|
TaskListHeader: (_props$mainGantt$task = props.mainGantt.taskListHeaderProject) != null ? _props$mainGantt$task : CustomTaskListHeaderHOC(props.mainGantt.title, mainGanttDoubleView != null ? mainGanttDoubleView : false, handleSetDoubleView),
|
|
12360
12335
|
TaskListTable: (_props$mainGantt$task2 = props.mainGantt.taskListTableProject) != null ? _props$mainGantt$task2 : CustomTaskListTableHOC(function (id) {
|
|
@@ -12397,7 +12372,12 @@ var Planner = function Planner(props) {
|
|
|
12397
12372
|
return handleDateChange(task, currentTasks.current, props.mainGantt.onDateChange);
|
|
12398
12373
|
},
|
|
12399
12374
|
locale: locale,
|
|
12400
|
-
dateTimeFormatters: ganttDateTimeFormatters
|
|
12375
|
+
dateTimeFormatters: ganttDateTimeFormatters,
|
|
12376
|
+
initialScrollX: scrollX,
|
|
12377
|
+
initialScrollY: props.mainGantt.initialScrollY,
|
|
12378
|
+
readOnly: props.mainGantt.readOnly,
|
|
12379
|
+
onScrollX: props.onScrollX,
|
|
12380
|
+
onScrollY: props.mainGantt.onScrollY
|
|
12401
12381
|
})), props.secondaryGantt && react.createElement(Gantt, Object.assign({
|
|
12402
12382
|
id: SECONDARY_GANTT_ID,
|
|
12403
12383
|
key: SECONDARY_GANTT_ID,
|
|
@@ -12411,7 +12391,7 @@ var Planner = function Planner(props) {
|
|
|
12411
12391
|
viewDate: viewDate,
|
|
12412
12392
|
tasks: details,
|
|
12413
12393
|
columnWidth: columnWidthForTimeUnit(timeUnit),
|
|
12414
|
-
viewMode:
|
|
12394
|
+
viewMode: timeUnit
|
|
12415
12395
|
}, props.mainGantt.stylingOptions, {
|
|
12416
12396
|
TaskListHeader: (_props$secondaryGantt3 = props.secondaryGantt.taskListHeaderProject) != null ? _props$secondaryGantt3 : CustomTaskListHeaderHOC(props.secondaryGantt.title),
|
|
12417
12397
|
TaskListTable: (_props$secondaryGantt4 = (_props$secondaryGantt5 = props.secondaryGantt) === null || _props$secondaryGantt5 === void 0 ? void 0 : _props$secondaryGantt5.taskListTableProject) != null ? _props$secondaryGantt4 : CustomTaskListTableHOC(function (id) {
|
|
@@ -12447,576 +12427,754 @@ var Planner = function Planner(props) {
|
|
|
12447
12427
|
return handleDateChange(task, currentDetails.current, (_props$secondaryGantt7 = props.secondaryGantt) === null || _props$secondaryGantt7 === void 0 ? void 0 : _props$secondaryGantt7.onDateChange);
|
|
12448
12428
|
},
|
|
12449
12429
|
locale: locale,
|
|
12450
|
-
dateTimeFormatters: ganttDateTimeFormatters
|
|
12430
|
+
dateTimeFormatters: ganttDateTimeFormatters,
|
|
12431
|
+
initialScrollX: scrollX,
|
|
12432
|
+
initialScrollY: props.secondaryGantt.initialScrollY,
|
|
12433
|
+
readOnly: props.secondaryGantt.readOnly,
|
|
12434
|
+
onScrollY: props.secondaryGantt.onScrollY
|
|
12451
12435
|
}))));
|
|
12452
12436
|
};
|
|
12453
12437
|
|
|
12454
|
-
const kupManager = kupManager$1.kupManagerInstance();
|
|
12455
|
-
function sanitizeAllDates(startDateCell, endDateCell, secStartDateCell, secEndDateCell) {
|
|
12456
|
-
const sanitizedDateValues = sanitizeDates(startDateCell, endDateCell);
|
|
12457
|
-
let sanitizedSecDateValues = [];
|
|
12458
|
-
if (secStartDateCell && secEndDateCell) {
|
|
12459
|
-
if (isAtLeastOneDateValid(secStartDateCell, secEndDateCell)) {
|
|
12460
|
-
sanitizedSecDateValues = sanitizeDates(secStartDateCell, secEndDateCell);
|
|
12461
|
-
}
|
|
12462
|
-
else {
|
|
12463
|
-
sanitizedSecDateValues = [...sanitizedDateValues];
|
|
12464
|
-
}
|
|
12465
|
-
}
|
|
12466
|
-
return {
|
|
12467
|
-
dateValues: sanitizedDateValues,
|
|
12468
|
-
secDateValues: sanitizedSecDateValues,
|
|
12469
|
-
};
|
|
12470
|
-
}
|
|
12471
|
-
function sanitizeDates(startDateCell, endDateCell) {
|
|
12472
|
-
let returnValues = [startDateCell.value, endDateCell.value];
|
|
12473
|
-
if (isDateValid(startDateCell) && isDateValid(endDateCell)) {
|
|
12474
|
-
return returnValues;
|
|
12475
|
-
}
|
|
12476
|
-
else if (isDateValid(startDateCell)) {
|
|
12477
|
-
return [startDateCell.value, startDateCell.value];
|
|
12478
|
-
}
|
|
12479
|
-
else if (isDateValid(endDateCell)) {
|
|
12480
|
-
return [endDateCell.value, endDateCell.value];
|
|
12481
|
-
}
|
|
12482
|
-
else {
|
|
12483
|
-
return returnValues;
|
|
12484
|
-
}
|
|
12485
|
-
}
|
|
12486
|
-
function isDateValid(dateCell) {
|
|
12487
|
-
return (kupManager.objects.isDate(dateCell.obj) &&
|
|
12488
|
-
kupManager.dates.isValid(dateCell.value, kupManager$1.KupDatesFormats.ISO_DATE));
|
|
12489
|
-
}
|
|
12490
|
-
function isAtLeastOneDateValid(startDateCell, endDateCell) {
|
|
12491
|
-
return isDateValid(startDateCell) || isDateValid(endDateCell);
|
|
12492
|
-
}
|
|
12493
|
-
function getValuesToShow(row, idCol, nameCol, dataColumns, columns, customToValuesFunction) {
|
|
12494
|
-
let toValuesFunction = () => columns.map((col) => {
|
|
12495
|
-
return kupManager$1.getCellValueForDisplay(dataColumns.find((kCol) => kCol.name == col), row.cells[col]);
|
|
12496
|
-
});
|
|
12497
|
-
if (customToValuesFunction) {
|
|
12498
|
-
toValuesFunction = customToValuesFunction;
|
|
12499
|
-
}
|
|
12500
|
-
const valuesToShow = (columns === null || columns === void 0 ? void 0 : columns.length) >= 2
|
|
12501
|
-
? toValuesFunction()
|
|
12502
|
-
: [row.cells[idCol].value, row.cells[nameCol].value];
|
|
12503
|
-
return valuesToShow;
|
|
12504
|
-
}
|
|
12505
|
-
|
|
12506
|
-
|
|
12507
|
-
|
|
12508
|
-
|
|
12509
|
-
|
|
12510
|
-
|
|
12511
|
-
|
|
12512
|
-
|
|
12513
|
-
|
|
12514
|
-
|
|
12515
|
-
|
|
12516
|
-
}
|
|
12517
|
-
|
|
12518
|
-
|
|
12519
|
-
|
|
12520
|
-
|
|
12521
|
-
|
|
12522
|
-
|
|
12523
|
-
};
|
|
12524
|
-
|
|
12525
|
-
|
|
12526
|
-
|
|
12527
|
-
|
|
12528
|
-
|
|
12529
|
-
|
|
12530
|
-
|
|
12531
|
-
|
|
12532
|
-
|
|
12533
|
-
|
|
12534
|
-
|
|
12535
|
-
|
|
12536
|
-
|
|
12537
|
-
|
|
12538
|
-
|
|
12539
|
-
|
|
12540
|
-
|
|
12541
|
-
|
|
12542
|
-
|
|
12543
|
-
|
|
12544
|
-
this
|
|
12545
|
-
this.
|
|
12546
|
-
this.
|
|
12547
|
-
this.
|
|
12548
|
-
this.
|
|
12549
|
-
this.
|
|
12550
|
-
this
|
|
12551
|
-
this.
|
|
12552
|
-
|
|
12553
|
-
|
|
12554
|
-
|
|
12555
|
-
this.
|
|
12556
|
-
this
|
|
12557
|
-
this
|
|
12558
|
-
this
|
|
12559
|
-
|
|
12560
|
-
this
|
|
12561
|
-
this.
|
|
12562
|
-
this.
|
|
12563
|
-
this.
|
|
12564
|
-
this.
|
|
12565
|
-
this.
|
|
12566
|
-
this.
|
|
12567
|
-
this.
|
|
12568
|
-
this.
|
|
12569
|
-
this.
|
|
12570
|
-
this.
|
|
12571
|
-
this.
|
|
12572
|
-
this.
|
|
12573
|
-
|
|
12574
|
-
|
|
12575
|
-
|
|
12576
|
-
|
|
12577
|
-
|
|
12578
|
-
|
|
12579
|
-
|
|
12580
|
-
|
|
12581
|
-
|
|
12582
|
-
|
|
12583
|
-
|
|
12584
|
-
|
|
12585
|
-
|
|
12586
|
-
|
|
12587
|
-
|
|
12588
|
-
|
|
12589
|
-
|
|
12590
|
-
|
|
12591
|
-
|
|
12592
|
-
|
|
12593
|
-
|
|
12594
|
-
|
|
12595
|
-
|
|
12596
|
-
|
|
12597
|
-
|
|
12598
|
-
|
|
12599
|
-
|
|
12600
|
-
|
|
12601
|
-
|
|
12602
|
-
|
|
12603
|
-
|
|
12604
|
-
|
|
12605
|
-
|
|
12606
|
-
|
|
12607
|
-
|
|
12608
|
-
|
|
12609
|
-
|
|
12610
|
-
|
|
12611
|
-
|
|
12612
|
-
|
|
12613
|
-
|
|
12614
|
-
|
|
12615
|
-
|
|
12616
|
-
|
|
12617
|
-
|
|
12618
|
-
|
|
12619
|
-
|
|
12620
|
-
|
|
12621
|
-
|
|
12622
|
-
|
|
12623
|
-
|
|
12624
|
-
|
|
12625
|
-
|
|
12626
|
-
|
|
12627
|
-
|
|
12628
|
-
|
|
12629
|
-
|
|
12630
|
-
|
|
12631
|
-
|
|
12632
|
-
|
|
12633
|
-
|
|
12634
|
-
|
|
12635
|
-
|
|
12636
|
-
|
|
12637
|
-
|
|
12638
|
-
|
|
12639
|
-
|
|
12640
|
-
|
|
12641
|
-
|
|
12642
|
-
|
|
12643
|
-
|
|
12644
|
-
|
|
12645
|
-
|
|
12646
|
-
|
|
12647
|
-
|
|
12648
|
-
|
|
12649
|
-
|
|
12650
|
-
|
|
12651
|
-
|
|
12652
|
-
|
|
12653
|
-
|
|
12654
|
-
|
|
12655
|
-
|
|
12656
|
-
|
|
12657
|
-
|
|
12658
|
-
|
|
12659
|
-
|
|
12660
|
-
|
|
12661
|
-
|
|
12662
|
-
|
|
12663
|
-
|
|
12664
|
-
|
|
12665
|
-
|
|
12666
|
-
|
|
12667
|
-
|
|
12668
|
-
|
|
12669
|
-
|
|
12670
|
-
|
|
12671
|
-
|
|
12672
|
-
|
|
12673
|
-
|
|
12674
|
-
|
|
12675
|
-
|
|
12676
|
-
|
|
12677
|
-
|
|
12678
|
-
|
|
12679
|
-
|
|
12680
|
-
|
|
12681
|
-
|
|
12682
|
-
|
|
12683
|
-
|
|
12684
|
-
|
|
12685
|
-
|
|
12686
|
-
|
|
12687
|
-
|
|
12688
|
-
|
|
12689
|
-
|
|
12690
|
-
|
|
12691
|
-
|
|
12692
|
-
|
|
12693
|
-
|
|
12694
|
-
|
|
12695
|
-
|
|
12696
|
-
|
|
12697
|
-
|
|
12698
|
-
|
|
12699
|
-
|
|
12700
|
-
|
|
12701
|
-
|
|
12702
|
-
|
|
12703
|
-
|
|
12704
|
-
|
|
12705
|
-
|
|
12706
|
-
|
|
12707
|
-
|
|
12708
|
-
|
|
12709
|
-
|
|
12710
|
-
|
|
12711
|
-
|
|
12712
|
-
|
|
12713
|
-
|
|
12714
|
-
|
|
12715
|
-
|
|
12716
|
-
|
|
12717
|
-
|
|
12718
|
-
|
|
12719
|
-
|
|
12720
|
-
|
|
12721
|
-
|
|
12722
|
-
|
|
12723
|
-
|
|
12724
|
-
|
|
12725
|
-
|
|
12726
|
-
|
|
12727
|
-
|
|
12728
|
-
|
|
12729
|
-
|
|
12730
|
-
|
|
12731
|
-
|
|
12732
|
-
|
|
12733
|
-
|
|
12734
|
-
|
|
12735
|
-
|
|
12736
|
-
|
|
12737
|
-
|
|
12738
|
-
|
|
12739
|
-
|
|
12740
|
-
|
|
12741
|
-
|
|
12742
|
-
|
|
12743
|
-
|
|
12744
|
-
|
|
12745
|
-
|
|
12746
|
-
|
|
12747
|
-
|
|
12748
|
-
|
|
12749
|
-
|
|
12750
|
-
|
|
12751
|
-
|
|
12752
|
-
|
|
12753
|
-
|
|
12754
|
-
|
|
12755
|
-
|
|
12756
|
-
|
|
12757
|
-
|
|
12758
|
-
|
|
12759
|
-
|
|
12760
|
-
|
|
12761
|
-
|
|
12762
|
-
|
|
12763
|
-
|
|
12764
|
-
|
|
12765
|
-
|
|
12766
|
-
|
|
12767
|
-
|
|
12768
|
-
|
|
12769
|
-
|
|
12770
|
-
|
|
12771
|
-
|
|
12772
|
-
|
|
12773
|
-
|
|
12774
|
-
|
|
12775
|
-
|
|
12776
|
-
|
|
12777
|
-
|
|
12778
|
-
|
|
12779
|
-
|
|
12780
|
-
|
|
12781
|
-
|
|
12782
|
-
|
|
12783
|
-
|
|
12784
|
-
|
|
12785
|
-
|
|
12786
|
-
|
|
12787
|
-
|
|
12788
|
-
|
|
12789
|
-
|
|
12790
|
-
|
|
12791
|
-
|
|
12792
|
-
|
|
12793
|
-
|
|
12794
|
-
|
|
12795
|
-
|
|
12796
|
-
|
|
12797
|
-
|
|
12798
|
-
|
|
12799
|
-
|
|
12800
|
-
|
|
12801
|
-
|
|
12802
|
-
|
|
12803
|
-
|
|
12804
|
-
|
|
12805
|
-
|
|
12806
|
-
|
|
12807
|
-
|
|
12808
|
-
|
|
12809
|
-
|
|
12810
|
-
|
|
12811
|
-
|
|
12812
|
-
|
|
12813
|
-
|
|
12814
|
-
|
|
12815
|
-
|
|
12816
|
-
|
|
12817
|
-
|
|
12818
|
-
|
|
12819
|
-
|
|
12820
|
-
|
|
12821
|
-
|
|
12822
|
-
|
|
12823
|
-
|
|
12824
|
-
|
|
12825
|
-
|
|
12826
|
-
|
|
12827
|
-
|
|
12828
|
-
|
|
12829
|
-
|
|
12830
|
-
|
|
12831
|
-
|
|
12832
|
-
|
|
12833
|
-
|
|
12834
|
-
|
|
12835
|
-
|
|
12836
|
-
|
|
12837
|
-
|
|
12838
|
-
|
|
12839
|
-
|
|
12840
|
-
|
|
12841
|
-
|
|
12842
|
-
|
|
12843
|
-
|
|
12844
|
-
|
|
12845
|
-
|
|
12846
|
-
|
|
12847
|
-
|
|
12848
|
-
|
|
12849
|
-
|
|
12850
|
-
|
|
12851
|
-
|
|
12852
|
-
|
|
12853
|
-
|
|
12854
|
-
|
|
12855
|
-
|
|
12856
|
-
|
|
12857
|
-
|
|
12858
|
-
|
|
12859
|
-
|
|
12860
|
-
|
|
12861
|
-
|
|
12862
|
-
|
|
12863
|
-
|
|
12864
|
-
|
|
12865
|
-
|
|
12866
|
-
|
|
12867
|
-
|
|
12868
|
-
|
|
12869
|
-
|
|
12870
|
-
|
|
12871
|
-
|
|
12872
|
-
|
|
12873
|
-
|
|
12874
|
-
|
|
12875
|
-
|
|
12876
|
-
|
|
12877
|
-
|
|
12878
|
-
|
|
12879
|
-
|
|
12880
|
-
|
|
12881
|
-
|
|
12882
|
-
|
|
12883
|
-
|
|
12884
|
-
|
|
12885
|
-
|
|
12886
|
-
|
|
12887
|
-
|
|
12888
|
-
|
|
12889
|
-
|
|
12890
|
-
|
|
12891
|
-
|
|
12892
|
-
|
|
12893
|
-
|
|
12894
|
-
|
|
12895
|
-
|
|
12896
|
-
|
|
12897
|
-
|
|
12898
|
-
|
|
12899
|
-
|
|
12900
|
-
|
|
12901
|
-
|
|
12902
|
-
|
|
12903
|
-
|
|
12904
|
-
|
|
12905
|
-
|
|
12906
|
-
|
|
12907
|
-
|
|
12908
|
-
|
|
12909
|
-
|
|
12910
|
-
|
|
12911
|
-
|
|
12912
|
-
|
|
12913
|
-
|
|
12914
|
-
|
|
12915
|
-
|
|
12916
|
-
|
|
12917
|
-
|
|
12918
|
-
|
|
12919
|
-
}
|
|
12920
|
-
}
|
|
12921
|
-
|
|
12922
|
-
|
|
12923
|
-
|
|
12924
|
-
|
|
12925
|
-
|
|
12926
|
-
|
|
12927
|
-
|
|
12928
|
-
|
|
12929
|
-
|
|
12930
|
-
|
|
12931
|
-
|
|
12932
|
-
|
|
12933
|
-
|
|
12934
|
-
|
|
12935
|
-
|
|
12936
|
-
|
|
12937
|
-
|
|
12938
|
-
|
|
12939
|
-
}
|
|
12940
|
-
|
|
12941
|
-
|
|
12942
|
-
|
|
12943
|
-
|
|
12944
|
-
|
|
12945
|
-
}
|
|
12946
|
-
|
|
12947
|
-
|
|
12948
|
-
|
|
12949
|
-
|
|
12950
|
-
|
|
12951
|
-
|
|
12952
|
-
|
|
12953
|
-
|
|
12954
|
-
|
|
12955
|
-
|
|
12956
|
-
|
|
12957
|
-
|
|
12958
|
-
|
|
12959
|
-
|
|
12960
|
-
|
|
12961
|
-
|
|
12962
|
-
|
|
12963
|
-
|
|
12964
|
-
|
|
12965
|
-
|
|
12966
|
-
|
|
12967
|
-
|
|
12968
|
-
|
|
12969
|
-
|
|
12970
|
-
|
|
12971
|
-
|
|
12972
|
-
|
|
12973
|
-
|
|
12974
|
-
|
|
12975
|
-
|
|
12976
|
-
|
|
12977
|
-
|
|
12978
|
-
|
|
12979
|
-
|
|
12980
|
-
|
|
12981
|
-
|
|
12982
|
-
|
|
12983
|
-
|
|
12984
|
-
}
|
|
12985
|
-
|
|
12986
|
-
|
|
12987
|
-
|
|
12988
|
-
|
|
12989
|
-
|
|
12990
|
-
|
|
12991
|
-
};
|
|
12992
|
-
|
|
12993
|
-
|
|
12994
|
-
|
|
12995
|
-
|
|
12996
|
-
|
|
12997
|
-
|
|
12998
|
-
|
|
12999
|
-
|
|
13000
|
-
|
|
13001
|
-
|
|
13002
|
-
|
|
13003
|
-
|
|
13004
|
-
|
|
13005
|
-
}
|
|
13006
|
-
|
|
13007
|
-
|
|
13008
|
-
|
|
13009
|
-
|
|
13010
|
-
|
|
13011
|
-
|
|
13012
|
-
|
|
13013
|
-
|
|
13014
|
-
|
|
13015
|
-
|
|
13016
|
-
|
|
13017
|
-
|
|
13018
|
-
|
|
13019
|
-
|
|
12438
|
+
const kupManager = kupManager$1.kupManagerInstance();
|
|
12439
|
+
function sanitizeAllDates(startDateCell, endDateCell, secStartDateCell, secEndDateCell) {
|
|
12440
|
+
const sanitizedDateValues = sanitizeDates(startDateCell, endDateCell);
|
|
12441
|
+
let sanitizedSecDateValues = [];
|
|
12442
|
+
if (secStartDateCell && secEndDateCell) {
|
|
12443
|
+
if (isAtLeastOneDateValid(secStartDateCell, secEndDateCell)) {
|
|
12444
|
+
sanitizedSecDateValues = sanitizeDates(secStartDateCell, secEndDateCell);
|
|
12445
|
+
}
|
|
12446
|
+
else {
|
|
12447
|
+
sanitizedSecDateValues = [...sanitizedDateValues];
|
|
12448
|
+
}
|
|
12449
|
+
}
|
|
12450
|
+
return {
|
|
12451
|
+
dateValues: sanitizedDateValues,
|
|
12452
|
+
secDateValues: sanitizedSecDateValues,
|
|
12453
|
+
};
|
|
12454
|
+
}
|
|
12455
|
+
function sanitizeDates(startDateCell, endDateCell) {
|
|
12456
|
+
let returnValues = [startDateCell.value, endDateCell.value];
|
|
12457
|
+
if (isDateValid(startDateCell) && isDateValid(endDateCell)) {
|
|
12458
|
+
return returnValues;
|
|
12459
|
+
}
|
|
12460
|
+
else if (isDateValid(startDateCell)) {
|
|
12461
|
+
return [startDateCell.value, startDateCell.value];
|
|
12462
|
+
}
|
|
12463
|
+
else if (isDateValid(endDateCell)) {
|
|
12464
|
+
return [endDateCell.value, endDateCell.value];
|
|
12465
|
+
}
|
|
12466
|
+
else {
|
|
12467
|
+
return returnValues;
|
|
12468
|
+
}
|
|
12469
|
+
}
|
|
12470
|
+
function isDateValid(dateCell) {
|
|
12471
|
+
return (kupManager.objects.isDate(dateCell.obj) &&
|
|
12472
|
+
kupManager.dates.isValid(dateCell.value, kupManager$1.KupDatesFormats.ISO_DATE));
|
|
12473
|
+
}
|
|
12474
|
+
function isAtLeastOneDateValid(startDateCell, endDateCell) {
|
|
12475
|
+
return isDateValid(startDateCell) || isDateValid(endDateCell);
|
|
12476
|
+
}
|
|
12477
|
+
function getValuesToShow(row, idCol, nameCol, dataColumns, columns, customToValuesFunction) {
|
|
12478
|
+
let toValuesFunction = () => columns.map((col) => {
|
|
12479
|
+
return kupManager$1.getCellValueForDisplay(dataColumns.find((kCol) => kCol.name == col), row.cells[col]);
|
|
12480
|
+
});
|
|
12481
|
+
if (customToValuesFunction) {
|
|
12482
|
+
toValuesFunction = customToValuesFunction;
|
|
12483
|
+
}
|
|
12484
|
+
const valuesToShow = (columns === null || columns === void 0 ? void 0 : columns.length) >= 2
|
|
12485
|
+
? toValuesFunction()
|
|
12486
|
+
: [row.cells[idCol].value, row.cells[nameCol].value];
|
|
12487
|
+
return valuesToShow;
|
|
12488
|
+
}
|
|
12489
|
+
|
|
12490
|
+
class KupPlannerState {
|
|
12491
|
+
constructor() {
|
|
12492
|
+
this.showSecondaryDates = false;
|
|
12493
|
+
this.detailFilter = "";
|
|
12494
|
+
this.detailInitialScrollX = 0;
|
|
12495
|
+
this.detailInitialScrollY = 0;
|
|
12496
|
+
this.taskFilter = "";
|
|
12497
|
+
this.taskInitialScrollX = 0;
|
|
12498
|
+
this.taskInitialScrollY = 0;
|
|
12499
|
+
this.viewMode = "day";
|
|
12500
|
+
}
|
|
12501
|
+
toDebugString() {
|
|
12502
|
+
// TODO
|
|
12503
|
+
return 'dt state';
|
|
12504
|
+
}
|
|
12505
|
+
}
|
|
12506
|
+
|
|
12507
|
+
const kupPlannerCss = "._3_ygE{display:table;border-bottom:#e6e4e4 1px solid;border-top:#e6e4e4 1px solid;border-left:#e6e4e4 1px solid}._1nBOt{display:table-row;list-style:none}._2eZzQ{border-right:1px solid rgb(196, 196, 196);opacity:1;margin-left:-2px}._WuQ0f{display:table-cell;vertical-align:-webkit-baseline-middle;vertical-align:middle}._3ZbQT{display:table;border-bottom:#e6e4e4 1px solid;border-left:#e6e4e4 1px solid}._34SS0{display:table-row;text-overflow:ellipsis}._34SS0:nth-of-type(even){}._3lLk3{display:table-cell;vertical-align:middle;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}._nI1Xw{display:flex}._2QjE6{color:rgb(86 86 86);font-size:0.6rem;padding:0.15rem 0.2rem 0 0.2rem;-webkit-user-select:none;-moz-user-select:none;user-select:none;cursor:pointer}._2TfEi{font-size:0.6rem;padding-left:1rem;-webkit-user-select:none;-moz-user-select:none;user-select:none}._3T42e{background:#fff;padding:12px;box-shadow:0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23)}._29NTg{font-size:12px;margin-bottom:6px;color:#666}._25P-K{position:absolute;display:flex;flex-shrink:0;pointer-events:none;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}._3gVAq{visibility:hidden;position:absolute;display:flex;pointer-events:none}._1eT-t{overflow:hidden auto;width:1rem;flex-shrink:0;scrollbar-width:thin}._1eT-t::-webkit-scrollbar{width:1.1rem;height:1.1rem}._1eT-t::-webkit-scrollbar-corner{background:transparent}._1eT-t::-webkit-scrollbar-thumb{border:6px solid transparent;background:rgba(0, 0, 0, 0.2);background:var(--palette-black-alpha-20, rgba(0, 0, 0, 0.2));border-radius:10px;background-clip:padding-box}._1eT-t::-webkit-scrollbar-thumb:hover{border:4px solid transparent;background:rgba(0, 0, 0, 0.3);background:var(--palette-black-alpha-30, rgba(0, 0, 0, 0.3));background-clip:padding-box}._EvhC1{border-radius:8px;background:#efefef;margin:12px;padding:12px}._2dZTy{fill:#fff}._2dZTy:nth-child(even){}._3rUKi{stroke:transparent}._RuwuK{stroke:#e6e4e4}._9w8d5{text-anchor:middle;fill:#333;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:none}._1rLuZ{stroke:#e6e4e4}._2q1Kt{text-anchor:middle;fill:#555;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:none}._35nLX{fill:#ffffff;stroke:#e0e0e0;stroke-width:1.4}._KxSXS{cursor:pointer;outline:none}._KxSXS:hover ._3w_5u{visibility:visible;opacity:1}._3w_5u{fill:#ddd;cursor:ew-resize;opacity:0;visibility:hidden}._31ERP{-webkit-user-select:none;-moz-user-select:none;user-select:none;stroke-width:0}._3zRJQ{fill:#fff;text-anchor:middle;font-weight:lighter;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:none}._3KcaM{fill:#555;text-anchor:start;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:none}._11iN9{background:#efefef;border-radius:8px;margin:12px;overflow:hidden;padding:12px}._CZjuD{overflow:hidden;font-size:0;margin:0;padding:0}._2B2zv{margin:0;padding:0;overflow:hidden}._3eULf{display:flex;padding:0;margin:0;list-style:none;outline:none;position:relative}._2k9Ys{overflow:auto;max-width:100%;scrollbar-width:thin;height:1.2rem}._2k9Ys::-webkit-scrollbar{width:1.1rem;height:1.1rem}._2k9Ys::-webkit-scrollbar-corner{background:transparent}._2k9Ys::-webkit-scrollbar-thumb{border:6px solid transparent;background:rgba(0, 0, 0, 0.2);background:var(--palette-black-alpha-20, rgba(0, 0, 0, 0.2));border-radius:10px;background-clip:padding-box}._2k9Ys::-webkit-scrollbar-thumb:hover{border:4px solid transparent;background:rgba(0, 0, 0, 0.3);background:var(--palette-black-alpha-30, rgba(0, 0, 0, 0.3));background-clip:padding-box}._19jgW{height:1px}._37E9D{display:flex;justify-content:space-around;max-width:330px;place-items:\"center\";text-align:center;align-items:center}._WrYI6{font-weight:bold;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._c53zr{max-width:-moz-max-content;max-width:max-content;padding:0 4px;text-align:right}._2eBO5{position:relative;display:inline-block;width:30px;height:17px}._hiyro{opacity:0;width:0;height:0}._hiyro:checked+._2HI58{background-color:#003b77}._hiyro:checked+._2HI58:before{transform:translateX(13px)}._hiyro:focus+._2HI58{box-shadow:0 0 1px #003b77}._2HI58{-webkit-transition:0.4s;cursor:pointer;background-color:#ccc;bottom:0;border-radius:17px;left:0;position:absolute;right:0;top:0;transition:0.4s}._2HI58:before{-webkit-transition:0.1s;background-color:white;border-radius:50%;bottom:2px;content:\"\";height:13px;left:2px;position:absolute;transition:0.1s;width:13px}._2gSdA{font-size:12px;padding:6px}._2cfRI{font-size:12px}._lEI6r{padding:0 10px;margin-right:10px}._RU6Aa{background:var(--kup-background-color, #ffffff);border:1px solid var(--kup-border-color, #acacac);border-radius:4px;box-sizing:border-box;color:var(--kup-text-color, #595959);cursor:pointer;display:grid;font-weight:400;grid-template-columns:var(--grid-project-columns, 1fr 1fr 1fr);place-items:center}._RU6Aa>*{font-size:14px;line-height:24px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%}._RU6Aa ._30j6y{font-weight:700;width:100%;padding-left:4px}._T0HQN{cursor:pointer;display:grid;border-width:1px;border-style:solid;border-color:#acacac;border-bottom-left-radius:4px;border-bottom-right-radius:4px;box-sizing:border-box;grid-template-columns:var(--grid-fasi-columns, 1fr 1fr 1fr);place-items:center;background:#ffffff;color:#595959;font-weight:400}._T0HQN>*{font-size:12px;line-height:14px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;width:100%}._T0HQN:has(+._T0HQN),._RU6Aa:has(+._T0HQN){border-bottom-left-radius:0;border-bottom-right-radius:0}._yp2DW{cursor:pointer;display:grid;border-width:1px;border-style:solid;border-color:#cbcbcb;border-radius:4px;grid-template-columns:var(--grid-fasi-columns, 1fr 1fr 1fr);place-items:center;background:#fff;color:#595959;font-weight:400;box-sizing:border-box}._yp2DW>*{font-size:14px;line-height:24px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%}._yp2DW ._30j6y{font-weight:700;width:100%;padding-left:4px}._3P0WE{display:grid;grid-auto-flow:column;grid-gap:8px;margin-left:12px;width:-moz-max-content;width:max-content}._1oXbe{background:transparent;border-color:var(--kup-primary-color, #003b77);border-radius:4px;border-width:1px;box-shadow:0 3px 1px -2px rgba(var(--kup-text-color-rgb, 51 51 51), 0.2), 0 2px 2px 0 rgba(var(--kup-text-color-rgb, 51 51 51), 0.14), 0 1px 5px 0 rgba(var(--kup-text-color-rgb, 51 51 51), 0.12);box-sizing:border-box;color:var(--kup-primary-color, #003b77);cursor:pointer;font-size:11px;height:32px;min-width:64px}._1R9mh{font-family:var(--kup-font-family, inherit);font-size:11px;letter-spacing:0.0892857143em;text-decoration:none;text-transform:uppercase;padding:0 6px}:host{display:block}.filter{margin:12px 10px 12px 0;padding:0 10px}";
|
|
12508
|
+
|
|
12509
|
+
var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
12510
|
+
if (kind === "a" && !f)
|
|
12511
|
+
throw new TypeError("Private accessor was defined without a getter");
|
|
12512
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
12513
|
+
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
12514
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
12515
|
+
};
|
|
12516
|
+
var __classPrivateFieldSet = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
12517
|
+
if (kind === "m")
|
|
12518
|
+
throw new TypeError("Private method is not writable");
|
|
12519
|
+
if (kind === "a" && !f)
|
|
12520
|
+
throw new TypeError("Private accessor was defined without a setter");
|
|
12521
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
12522
|
+
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
12523
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
12524
|
+
};
|
|
12525
|
+
var _KupPlanner_instances, _KupPlanner_kupManager, _KupPlanner_lastOnChangeReceived, _KupPlanner_rootPlanner, _KupPlanner_phases, _KupPlanner_storedSettings, _KupPlanner_renderReactPlannerElement, _KupPlanner_toTasks, _KupPlanner_toDetails, _KupPlanner_getTask, _KupPlanner_removePhases, _KupPlanner_handleOnClickOnTask, _KupPlanner_handleOnClickOnPhase, _KupPlanner_handleOnClickOnDetail, _KupPlanner_handleOnContextMenuOnTask, _KupPlanner_handleOnContextMenuOnPhase, _KupPlanner_handleOnContextMenuOnDetail, _KupPlanner_emitOnChangeEventsReceived, _KupPlanner_onFilter, _KupPlanner_getFilteredRows, _KupPlanner_getIconUrl, _KupPlanner_getIconColor;
|
|
12526
|
+
const KupPlanner = class {
|
|
12527
|
+
constructor(hostRef) {
|
|
12528
|
+
index.registerInstance(this, hostRef);
|
|
12529
|
+
this.kupClick = index.createEvent(this, "kup-planner-click", 6);
|
|
12530
|
+
this.kupDateChange = index.createEvent(this, "kup-planner-datechange", 6);
|
|
12531
|
+
this.kupReady = index.createEvent(this, "kup-planner-ready", 6);
|
|
12532
|
+
this.kupContextMenu = index.createEvent(this, "kup-planner-contextmenu", 6);
|
|
12533
|
+
this.kupDidUnload = index.createEvent(this, "kup-planner-didunload", 6);
|
|
12534
|
+
_KupPlanner_instances.add(this);
|
|
12535
|
+
this.state = new KupPlannerState();
|
|
12536
|
+
/*-------------------------------------------------*/
|
|
12537
|
+
/* I n t e r n a l V a r i a b l e s */
|
|
12538
|
+
/*-------------------------------------------------*/
|
|
12539
|
+
_KupPlanner_kupManager.set(this, kupManager$1.kupManagerInstance());
|
|
12540
|
+
_KupPlanner_lastOnChangeReceived.set(this, void 0);
|
|
12541
|
+
_KupPlanner_rootPlanner.set(this, void 0);
|
|
12542
|
+
_KupPlanner_phases.set(this, {});
|
|
12543
|
+
// no re-render
|
|
12544
|
+
_KupPlanner_storedSettings.set(this, void 0);
|
|
12545
|
+
this.stateId = '';
|
|
12546
|
+
this.store = undefined;
|
|
12547
|
+
this.customStyle = '';
|
|
12548
|
+
this.data = undefined;
|
|
12549
|
+
this.detailData = undefined;
|
|
12550
|
+
this.detailColorCol = undefined;
|
|
12551
|
+
this.detailColumns = undefined;
|
|
12552
|
+
this.detailDates = undefined;
|
|
12553
|
+
this.detailFilter = undefined;
|
|
12554
|
+
this.detailHeight = undefined;
|
|
12555
|
+
this.detailIconCol = undefined;
|
|
12556
|
+
this.detailIdCol = undefined;
|
|
12557
|
+
this.detailNameCol = undefined;
|
|
12558
|
+
this.detailPrevDates = undefined;
|
|
12559
|
+
this.detailInitialScrollX = undefined;
|
|
12560
|
+
this.detailInitialScrollY = undefined;
|
|
12561
|
+
this.listCellWidth = '300px';
|
|
12562
|
+
this.maxWidth = '90vw';
|
|
12563
|
+
this.phaseColorCol = undefined;
|
|
12564
|
+
this.phaseColumns = undefined;
|
|
12565
|
+
this.phaseColParDep = undefined;
|
|
12566
|
+
this.phaseDates = undefined;
|
|
12567
|
+
this.phaseIconCol = undefined;
|
|
12568
|
+
this.phaseIdCol = undefined;
|
|
12569
|
+
this.phaseNameCol = undefined;
|
|
12570
|
+
this.phasePrevDates = undefined;
|
|
12571
|
+
this.readOnly = false;
|
|
12572
|
+
this.showSecondaryDates = false;
|
|
12573
|
+
this.taskColumns = undefined;
|
|
12574
|
+
this.taskDates = undefined;
|
|
12575
|
+
this.taskFilter = undefined;
|
|
12576
|
+
this.taskHeight = undefined;
|
|
12577
|
+
this.taskIconCol = undefined;
|
|
12578
|
+
this.taskIdCol = undefined;
|
|
12579
|
+
this.taskInitialScrollX = undefined;
|
|
12580
|
+
this.taskInitialScrollY = undefined;
|
|
12581
|
+
this.taskNameCol = undefined;
|
|
12582
|
+
this.taskPrevDates = undefined;
|
|
12583
|
+
this.titleMess = undefined;
|
|
12584
|
+
this.viewMode = 'month';
|
|
12585
|
+
this.plannerProps = undefined;
|
|
12586
|
+
}
|
|
12587
|
+
initWithPersistedState() {
|
|
12588
|
+
if (this.store && this.stateId) {
|
|
12589
|
+
const state = this.store.getState(this.stateId);
|
|
12590
|
+
if (state != null) {
|
|
12591
|
+
__classPrivateFieldGet(this, _KupPlanner_kupManager, "f").debug.logMessage(this, 'Initializing stateId ' + this.stateId);
|
|
12592
|
+
// *** PROPS ***
|
|
12593
|
+
this.detailFilter = state.detailFilter;
|
|
12594
|
+
this.showSecondaryDates = state.showSecondaryDates;
|
|
12595
|
+
this.detailInitialScrollX = state.detailInitialScrollX;
|
|
12596
|
+
this.detailInitialScrollY = state.detailInitialScrollY;
|
|
12597
|
+
this.taskFilter = state.taskFilter;
|
|
12598
|
+
this.taskInitialScrollX = state.taskInitialScrollX;
|
|
12599
|
+
this.taskInitialScrollY = state.taskInitialScrollY;
|
|
12600
|
+
this.viewMode = state.viewMode;
|
|
12601
|
+
}
|
|
12602
|
+
}
|
|
12603
|
+
}
|
|
12604
|
+
persistState() {
|
|
12605
|
+
if (this.store && this.stateId) {
|
|
12606
|
+
let somethingChanged = false;
|
|
12607
|
+
if (!__classPrivateFieldGet(this, _KupPlanner_kupManager, "f").objects.deepEqual(this.state.detailFilter, __classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").detailFilter)) {
|
|
12608
|
+
this.state.detailFilter = __classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").detailFilter;
|
|
12609
|
+
somethingChanged = true;
|
|
12610
|
+
}
|
|
12611
|
+
if (!__classPrivateFieldGet(this, _KupPlanner_kupManager, "f").objects.deepEqual(this.state.showSecondaryDates, __classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").showSecondaryDates)) {
|
|
12612
|
+
this.state.showSecondaryDates =
|
|
12613
|
+
__classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").showSecondaryDates;
|
|
12614
|
+
somethingChanged = true;
|
|
12615
|
+
}
|
|
12616
|
+
if (!__classPrivateFieldGet(this, _KupPlanner_kupManager, "f").objects.deepEqual(this.state.detailInitialScrollX, __classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").detailInitialScrollX)) {
|
|
12617
|
+
this.state.detailInitialScrollX =
|
|
12618
|
+
__classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").detailInitialScrollX;
|
|
12619
|
+
somethingChanged = true;
|
|
12620
|
+
}
|
|
12621
|
+
if (!__classPrivateFieldGet(this, _KupPlanner_kupManager, "f").objects.deepEqual(this.state.detailInitialScrollY, __classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").detailInitialScrollY)) {
|
|
12622
|
+
this.state.detailInitialScrollY =
|
|
12623
|
+
__classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").detailInitialScrollY;
|
|
12624
|
+
somethingChanged = true;
|
|
12625
|
+
}
|
|
12626
|
+
if (!__classPrivateFieldGet(this, _KupPlanner_kupManager, "f").objects.deepEqual(this.state.taskFilter, __classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").taskFilter)) {
|
|
12627
|
+
this.state.taskFilter = __classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").taskFilter;
|
|
12628
|
+
somethingChanged = true;
|
|
12629
|
+
}
|
|
12630
|
+
if (!__classPrivateFieldGet(this, _KupPlanner_kupManager, "f").objects.deepEqual(this.state.taskInitialScrollX, __classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").taskInitialScrollX)) {
|
|
12631
|
+
this.state.taskInitialScrollX =
|
|
12632
|
+
__classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").taskInitialScrollX;
|
|
12633
|
+
somethingChanged = true;
|
|
12634
|
+
}
|
|
12635
|
+
if (!__classPrivateFieldGet(this, _KupPlanner_kupManager, "f").objects.deepEqual(this.state.taskInitialScrollY, __classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").taskInitialScrollY)) {
|
|
12636
|
+
this.state.taskInitialScrollY =
|
|
12637
|
+
__classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").taskInitialScrollY;
|
|
12638
|
+
somethingChanged = true;
|
|
12639
|
+
}
|
|
12640
|
+
if (!__classPrivateFieldGet(this, _KupPlanner_kupManager, "f").objects.deepEqual(this.state.viewMode, __classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").viewMode)) {
|
|
12641
|
+
this.state.viewMode = __classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").viewMode;
|
|
12642
|
+
somethingChanged = true;
|
|
12643
|
+
}
|
|
12644
|
+
if (somethingChanged) {
|
|
12645
|
+
__classPrivateFieldGet(this, _KupPlanner_kupManager, "f").debug.logMessage(this, 'Persisting stateId ' + this.stateId);
|
|
12646
|
+
this.store.persistState(this.stateId, this.state);
|
|
12647
|
+
}
|
|
12648
|
+
}
|
|
12649
|
+
}
|
|
12650
|
+
dataChanged() {
|
|
12651
|
+
__classPrivateFieldSet(this, _KupPlanner_phases, {}, "f");
|
|
12652
|
+
}
|
|
12653
|
+
/*-------------------------------------------------*/
|
|
12654
|
+
/* P u b l i c M e t h o d s */
|
|
12655
|
+
/*-------------------------------------------------*/
|
|
12656
|
+
/**
|
|
12657
|
+
* Used to retrieve component's props values.
|
|
12658
|
+
* @param {boolean} descriptions - When provided and true, the result will be the list of props with their description.
|
|
12659
|
+
* @returns {Promise<GenericObject>} List of props as object, each key will be a prop.
|
|
12660
|
+
*/
|
|
12661
|
+
async getProps(descriptions) {
|
|
12662
|
+
return kupManager$1.getProps(this, KupPlannerProps, descriptions);
|
|
12663
|
+
}
|
|
12664
|
+
/**
|
|
12665
|
+
* This method is used to trigger a new render of the component.
|
|
12666
|
+
*/
|
|
12667
|
+
async refresh() {
|
|
12668
|
+
index.forceUpdate(this);
|
|
12669
|
+
}
|
|
12670
|
+
/**
|
|
12671
|
+
* Sets the props to the component.
|
|
12672
|
+
* @param {GenericObject} props - Object containing props that will be set to the component.
|
|
12673
|
+
*/
|
|
12674
|
+
async setProps(props) {
|
|
12675
|
+
kupManager$1.setProps(this, KupPlannerProps, props);
|
|
12676
|
+
}
|
|
12677
|
+
/**
|
|
12678
|
+
* Add a list of phases to the project
|
|
12679
|
+
* @param taskId
|
|
12680
|
+
* @param data - Matrix which contains project phases
|
|
12681
|
+
*/
|
|
12682
|
+
async addPhases(taskId, data) {
|
|
12683
|
+
var _a;
|
|
12684
|
+
const task = __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_getTask).call(this, taskId);
|
|
12685
|
+
if (task) {
|
|
12686
|
+
__classPrivateFieldGet(this, _KupPlanner_phases, "f")[taskId] = data;
|
|
12687
|
+
task.phases = (_a = data.rows) === null || _a === void 0 ? void 0 : _a.filter((row) => isAtLeastOneDateValid(row.cells[this.phaseDates[0]], row.cells[this.phaseDates[1]])).map((row) => {
|
|
12688
|
+
const datesSanitized = sanitizeAllDates(row.cells[this.phaseDates[0]], row.cells[this.phaseDates[1]], row.cells[this.phasePrevDates[0]], row.cells[this.phasePrevDates[1]]);
|
|
12689
|
+
const valuesToShow = getValuesToShow(row, this.phaseIdCol, this.phaseNameCol, data.columns, this.phaseColumns, () => this.phaseColumns.map((col) => col == this.phaseDates[0]
|
|
12690
|
+
? '#START#'
|
|
12691
|
+
: col == this.phaseDates[1]
|
|
12692
|
+
? '#END#'
|
|
12693
|
+
: kupManager$1.getCellValueForDisplay(data.columns.find((kCol) => kCol.name == col), row.cells[col])));
|
|
12694
|
+
let iconUrl = __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_getIconUrl).call(this, row, this.phaseIconCol);
|
|
12695
|
+
let iconColor = __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_getIconColor).call(this, row, this.phaseIconCol);
|
|
12696
|
+
let phase = {
|
|
12697
|
+
taskRow: task.taskRow,
|
|
12698
|
+
phaseRow: row,
|
|
12699
|
+
id: task.id + '_' + row.cells[this.phaseIdCol].value,
|
|
12700
|
+
phaseRowId: row.id,
|
|
12701
|
+
taskRowId: task.taskRowId,
|
|
12702
|
+
name: row.cells[this.phaseNameCol].value,
|
|
12703
|
+
startDate: datesSanitized.dateValues[0],
|
|
12704
|
+
endDate: datesSanitized.dateValues[1],
|
|
12705
|
+
secondaryStartDate: datesSanitized.secDateValues[0],
|
|
12706
|
+
secondaryEndDate: datesSanitized.secDateValues[1],
|
|
12707
|
+
type: 'task',
|
|
12708
|
+
color: row.cells[this.phaseColorCol].value,
|
|
12709
|
+
selectedColor: row.cells[this.phaseColorCol].value,
|
|
12710
|
+
valuesToShow: valuesToShow,
|
|
12711
|
+
rowType: KupPlannerGanttRowType.PHASE,
|
|
12712
|
+
icon: iconUrl
|
|
12713
|
+
? { url: iconUrl, color: iconColor !== null && iconColor !== void 0 ? iconColor : '#595959' }
|
|
12714
|
+
: undefined,
|
|
12715
|
+
};
|
|
12716
|
+
return phase;
|
|
12717
|
+
});
|
|
12718
|
+
}
|
|
12719
|
+
this.plannerProps.mainGantt.initialScrollX =
|
|
12720
|
+
__classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").taskInitialScrollX;
|
|
12721
|
+
this.plannerProps.mainGantt.initialScrollY =
|
|
12722
|
+
__classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").taskInitialScrollY;
|
|
12723
|
+
if (this.plannerProps.secondaryGantt) {
|
|
12724
|
+
this.plannerProps.secondaryGantt.initialScrollX =
|
|
12725
|
+
__classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").detailInitialScrollX;
|
|
12726
|
+
this.plannerProps.secondaryGantt.initialScrollX =
|
|
12727
|
+
__classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").detailInitialScrollY;
|
|
12728
|
+
}
|
|
12729
|
+
this.plannerProps = Object.assign({}, this.plannerProps);
|
|
12730
|
+
}
|
|
12731
|
+
//---- Lifecycle hooks ----
|
|
12732
|
+
componentWillLoad() {
|
|
12733
|
+
__classPrivateFieldGet(this, _KupPlanner_kupManager, "f").debug.logLoad(this, false);
|
|
12734
|
+
__classPrivateFieldGet(this, _KupPlanner_kupManager, "f").theme.register(this);
|
|
12735
|
+
// *** Store
|
|
12736
|
+
this.initWithPersistedState();
|
|
12737
|
+
__classPrivateFieldSet(this, _KupPlanner_storedSettings, {
|
|
12738
|
+
detailFilter: this.detailFilter,
|
|
12739
|
+
detailInitialScrollX: this.detailInitialScrollX,
|
|
12740
|
+
detailInitialScrollY: this.detailInitialScrollY,
|
|
12741
|
+
showSecondaryDates: this.showSecondaryDates,
|
|
12742
|
+
taskFilter: this.taskFilter,
|
|
12743
|
+
taskInitialScrollX: this.taskInitialScrollX,
|
|
12744
|
+
taskInitialScrollY: this.taskInitialScrollY,
|
|
12745
|
+
viewMode: this.viewMode,
|
|
12746
|
+
}, "f");
|
|
12747
|
+
}
|
|
12748
|
+
componentDidLoad() {
|
|
12749
|
+
let details = __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_toDetails).call(this, __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_getFilteredRows).call(this, __classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").detailFilter, true));
|
|
12750
|
+
const mainFilter = this.rootElement.shadowRoot.querySelector('#main-filter');
|
|
12751
|
+
fTextFieldMdc.FTextFieldMDC(mainFilter);
|
|
12752
|
+
const secondaryFilter = this.rootElement.shadowRoot.querySelector('#secondary-filter');
|
|
12753
|
+
if (details) {
|
|
12754
|
+
fTextFieldMdc.FTextFieldMDC(secondaryFilter);
|
|
12755
|
+
}
|
|
12756
|
+
// timeout for scroll events
|
|
12757
|
+
let scrollXTimeout;
|
|
12758
|
+
let taskScrollYTimeout;
|
|
12759
|
+
let detailScrollYTimeout;
|
|
12760
|
+
const scrollDelay = 500;
|
|
12761
|
+
this.plannerProps = {
|
|
12762
|
+
mainGantt: {
|
|
12763
|
+
title: this.titleMess,
|
|
12764
|
+
items: __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_toTasks).call(this, __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_getFilteredRows).call(this, __classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").taskFilter, false)),
|
|
12765
|
+
stylingOptions: Object.assign(Object.assign({}, defaultStylingOptions), { listCellWidth: this.listCellWidth }),
|
|
12766
|
+
filter: mainFilter,
|
|
12767
|
+
hideLabel: true,
|
|
12768
|
+
ganttHeight: this.taskHeight,
|
|
12769
|
+
showSecondaryDates: __classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").showSecondaryDates,
|
|
12770
|
+
onClick: (nativeEvent) => this.handleOnClick(nativeEvent),
|
|
12771
|
+
onContextMenu: (event, row) => this.handleOnContextMenu(event, row),
|
|
12772
|
+
onDateChange: (nativeEvent) => this.handleOnDateChange(nativeEvent),
|
|
12773
|
+
initialScrollX: this.taskInitialScrollX,
|
|
12774
|
+
initialScrollY: this.taskInitialScrollY,
|
|
12775
|
+
readOnly: this.readOnly,
|
|
12776
|
+
onScrollY: (y) => {
|
|
12777
|
+
window.clearTimeout(taskScrollYTimeout);
|
|
12778
|
+
taskScrollYTimeout = window.setTimeout(() => this.handleTaskGanttScrollY(y), scrollDelay);
|
|
12779
|
+
},
|
|
12780
|
+
},
|
|
12781
|
+
secondaryGantt: details
|
|
12782
|
+
? {
|
|
12783
|
+
title: '',
|
|
12784
|
+
items: details,
|
|
12785
|
+
stylingOptions: Object.assign(Object.assign({}, defaultStylingOptions), { listCellWidth: this.listCellWidth }),
|
|
12786
|
+
filter: secondaryFilter,
|
|
12787
|
+
hideLabel: true,
|
|
12788
|
+
ganttHeight: this.detailHeight,
|
|
12789
|
+
onClick: (nativeEvent) => this.handleOnClick(nativeEvent),
|
|
12790
|
+
onContextMenu: (event, row) => this.handleOnContextMenu(event, row),
|
|
12791
|
+
onDateChange: (nativeEvent) => this.handleOnDateChange(nativeEvent),
|
|
12792
|
+
initialScrollX: this.detailInitialScrollX,
|
|
12793
|
+
initialScrollY: this.detailInitialScrollY,
|
|
12794
|
+
readOnly: this.readOnly,
|
|
12795
|
+
onScrollY: (y) => {
|
|
12796
|
+
window.clearTimeout(detailScrollYTimeout);
|
|
12797
|
+
detailScrollYTimeout = window.setTimeout(() => this.handleDetailGanttScrollY(y), scrollDelay);
|
|
12798
|
+
},
|
|
12799
|
+
}
|
|
12800
|
+
: undefined,
|
|
12801
|
+
onSetDoubleView: (checked) => this.handleOnSetDoubleView(checked),
|
|
12802
|
+
onSetViewMode: (value) => this.handleOnSetViewMode(value),
|
|
12803
|
+
viewMode: this.viewMode,
|
|
12804
|
+
onScrollX: (x) => {
|
|
12805
|
+
window.clearTimeout(scrollXTimeout);
|
|
12806
|
+
scrollXTimeout = window.setTimeout(() => this.handleOnScrollX(x), scrollDelay);
|
|
12807
|
+
},
|
|
12808
|
+
};
|
|
12809
|
+
__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_renderReactPlannerElement).call(this);
|
|
12810
|
+
this.kupReady.emit({
|
|
12811
|
+
comp: this,
|
|
12812
|
+
id: this.rootElement.id,
|
|
12813
|
+
value: undefined,
|
|
12814
|
+
});
|
|
12815
|
+
if (this.taskFilter) {
|
|
12816
|
+
__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_onFilter).call(this, this.taskFilter);
|
|
12817
|
+
}
|
|
12818
|
+
if (this.detailFilter) {
|
|
12819
|
+
__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_onFilter).call(this, this.detailFilter, true);
|
|
12820
|
+
}
|
|
12821
|
+
__classPrivateFieldGet(this, _KupPlanner_kupManager, "f").debug.logLoad(this, true);
|
|
12822
|
+
}
|
|
12823
|
+
componentWillRender() {
|
|
12824
|
+
__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_renderReactPlannerElement).call(this);
|
|
12825
|
+
}
|
|
12826
|
+
componentDidRender() {
|
|
12827
|
+
this.persistState();
|
|
12828
|
+
__classPrivateFieldGet(this, _KupPlanner_kupManager, "f").debug.logRender(this, true);
|
|
12829
|
+
}
|
|
12830
|
+
onKupClick(event, taskAction) {
|
|
12831
|
+
this.kupClick.emit({
|
|
12832
|
+
comp: this,
|
|
12833
|
+
id: this.rootElement.id,
|
|
12834
|
+
value: event,
|
|
12835
|
+
taskAction: taskAction,
|
|
12836
|
+
});
|
|
12837
|
+
}
|
|
12838
|
+
onKupContextMenu(event, ganttRow, taskAction) {
|
|
12839
|
+
let row;
|
|
12840
|
+
let cell;
|
|
12841
|
+
let column;
|
|
12842
|
+
switch (ganttRow.type) {
|
|
12843
|
+
case 'project': {
|
|
12844
|
+
row = ganttRow.taskRow;
|
|
12845
|
+
cell = row.cells[this.taskIdCol];
|
|
12846
|
+
column = this.data.columns[this.taskIdCol];
|
|
12847
|
+
break;
|
|
12848
|
+
}
|
|
12849
|
+
case 'task': {
|
|
12850
|
+
row = ganttRow.phaseRow;
|
|
12851
|
+
cell = row.cells[this.phaseIdCol];
|
|
12852
|
+
//column = this.data.columns[this.taskIdCol];
|
|
12853
|
+
break;
|
|
12854
|
+
}
|
|
12855
|
+
case 'timeline': {
|
|
12856
|
+
row = ganttRow.detailRow;
|
|
12857
|
+
cell = row.cells[this.detailIdCol];
|
|
12858
|
+
column = this.data.columns[this.detailIdCol];
|
|
12859
|
+
break;
|
|
12860
|
+
}
|
|
12861
|
+
}
|
|
12862
|
+
this.kupContextMenu.emit({
|
|
12863
|
+
comp: this,
|
|
12864
|
+
id: this.rootElement.id,
|
|
12865
|
+
value: ganttRow,
|
|
12866
|
+
taskAction: taskAction,
|
|
12867
|
+
details: {
|
|
12868
|
+
cell: cell,
|
|
12869
|
+
column: column,
|
|
12870
|
+
originalEvent: event,
|
|
12871
|
+
row: row,
|
|
12872
|
+
},
|
|
12873
|
+
});
|
|
12874
|
+
}
|
|
12875
|
+
onKupDateChange(event, taskAction) {
|
|
12876
|
+
this.kupDateChange.emit({
|
|
12877
|
+
comp: this,
|
|
12878
|
+
id: this.rootElement.id,
|
|
12879
|
+
value: event,
|
|
12880
|
+
taskAction: taskAction,
|
|
12881
|
+
});
|
|
12882
|
+
}
|
|
12883
|
+
handleOnClick(nativeEvent) {
|
|
12884
|
+
switch (nativeEvent.rowType) {
|
|
12885
|
+
case KupPlannerGanttRowType.TASK:
|
|
12886
|
+
const taskAction = nativeEvent.phases
|
|
12887
|
+
? KupPlannerTaskAction.onTaskClosing
|
|
12888
|
+
: KupPlannerTaskAction.onTaskOpening;
|
|
12889
|
+
if (__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_handleOnClickOnTask).call(this, nativeEvent)) {
|
|
12890
|
+
this.onKupClick(nativeEvent, taskAction);
|
|
12891
|
+
}
|
|
12892
|
+
break;
|
|
12893
|
+
case KupPlannerGanttRowType.PHASE:
|
|
12894
|
+
if (__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_handleOnClickOnPhase).call(this)) {
|
|
12895
|
+
this.onKupClick(nativeEvent, KupPlannerTaskAction.onClick);
|
|
12896
|
+
}
|
|
12897
|
+
break;
|
|
12898
|
+
case KupPlannerGanttRowType.DETAIL:
|
|
12899
|
+
if (__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_handleOnClickOnDetail).call(this)) {
|
|
12900
|
+
this.onKupClick(nativeEvent, KupPlannerTaskAction.onClick);
|
|
12901
|
+
}
|
|
12902
|
+
break;
|
|
12903
|
+
}
|
|
12904
|
+
}
|
|
12905
|
+
handleOnContextMenu(event, row) {
|
|
12906
|
+
switch (row.rowType) {
|
|
12907
|
+
case KupPlannerGanttRowType.TASK:
|
|
12908
|
+
if (__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_handleOnContextMenuOnTask).call(this)) {
|
|
12909
|
+
this.onKupContextMenu(event, row, KupPlannerTaskAction.onRightClick);
|
|
12910
|
+
}
|
|
12911
|
+
break;
|
|
12912
|
+
case KupPlannerGanttRowType.PHASE:
|
|
12913
|
+
if (__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_handleOnContextMenuOnPhase).call(this)) {
|
|
12914
|
+
this.onKupContextMenu(event, row, KupPlannerTaskAction.onRightClick);
|
|
12915
|
+
}
|
|
12916
|
+
break;
|
|
12917
|
+
case KupPlannerGanttRowType.DETAIL:
|
|
12918
|
+
if (__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_handleOnContextMenuOnDetail).call(this)) {
|
|
12919
|
+
this.onKupContextMenu(event, row, KupPlannerTaskAction.onRightClick);
|
|
12920
|
+
}
|
|
12921
|
+
break;
|
|
12922
|
+
}
|
|
12923
|
+
}
|
|
12924
|
+
handleOnSetDoubleView(checked) {
|
|
12925
|
+
var _a;
|
|
12926
|
+
__classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").showSecondaryDates = checked;
|
|
12927
|
+
if ((_a = this.plannerProps) === null || _a === void 0 ? void 0 : _a.mainGantt) {
|
|
12928
|
+
this.plannerProps.mainGantt.showSecondaryDates = checked;
|
|
12929
|
+
}
|
|
12930
|
+
this.persistState();
|
|
12931
|
+
}
|
|
12932
|
+
handleOnSetViewMode(value) {
|
|
12933
|
+
__classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").viewMode = value;
|
|
12934
|
+
this.plannerProps.viewMode = value;
|
|
12935
|
+
this.persistState();
|
|
12936
|
+
}
|
|
12937
|
+
handleOnScrollX(x) {
|
|
12938
|
+
__classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").taskInitialScrollX = x;
|
|
12939
|
+
__classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").detailInitialScrollX = x;
|
|
12940
|
+
this.persistState();
|
|
12941
|
+
}
|
|
12942
|
+
handleTaskGanttScrollY(y) {
|
|
12943
|
+
__classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").taskInitialScrollY = y;
|
|
12944
|
+
this.persistState();
|
|
12945
|
+
}
|
|
12946
|
+
handleDetailGanttScrollY(y) {
|
|
12947
|
+
__classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").detailInitialScrollY = y;
|
|
12948
|
+
this.persistState();
|
|
12949
|
+
}
|
|
12950
|
+
handleOnDateChange(nativeEvent) {
|
|
12951
|
+
if (__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_emitOnChangeEventsReceived).call(this, nativeEvent)) {
|
|
12952
|
+
if (nativeEvent.rowType != KupPlannerGanttRowType.DETAIL) {
|
|
12953
|
+
this.onKupDateChange(nativeEvent, KupPlannerTaskAction.onResize);
|
|
12954
|
+
}
|
|
12955
|
+
}
|
|
12956
|
+
}
|
|
12957
|
+
render() {
|
|
12958
|
+
var _a;
|
|
12959
|
+
return (index.h(index.Host, null, index.h("style", null, __classPrivateFieldGet(this, _KupPlanner_kupManager, "f").theme.setKupStyle(this.rootElement)), index.h("div", { id: GenericVariables.componentWrapperId, style: { maxWidth: this.maxWidth } }), index.h(fTextField.FTextField, { icon: kupManager$1.KupThemeIconValues.SEARCH, id: "main-filter", label: __classPrivateFieldGet(this, _KupPlanner_kupManager, "f").language.translate(kupManager$1.KupLanguageSearch.SEARCH), onKeyDown: (e) => {
|
|
12960
|
+
if (e.key === 'Enter') {
|
|
12961
|
+
__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_onFilter).call(this, e.target.value);
|
|
12962
|
+
}
|
|
12963
|
+
}, value: this.taskFilter, wrapperClass: "filter" }), ((_a = this.detailData) === null || _a === void 0 ? void 0 : _a.rows) && this.detailData.rows.length > 0 ? (index.h(fTextField.FTextField, { icon: kupManager$1.KupThemeIconValues.SEARCH, id: "secondary-filter", label: __classPrivateFieldGet(this, _KupPlanner_kupManager, "f").language.translate(kupManager$1.KupLanguageSearch.SEARCH), onKeyDown: (e) => {
|
|
12964
|
+
if (e.key === 'Enter') {
|
|
12965
|
+
__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_onFilter).call(this, e.target.value, true);
|
|
12966
|
+
}
|
|
12967
|
+
}, value: this.detailFilter, wrapperClass: "filter" })) : null));
|
|
12968
|
+
}
|
|
12969
|
+
disconnectedCallback() {
|
|
12970
|
+
__classPrivateFieldGet(this, _KupPlanner_kupManager, "f").theme.unregister(this);
|
|
12971
|
+
this.kupDidUnload.emit({
|
|
12972
|
+
comp: this,
|
|
12973
|
+
id: this.rootElement.id,
|
|
12974
|
+
storedSettings: __classPrivateFieldGet(this, _KupPlanner_storedSettings, "f"),
|
|
12975
|
+
});
|
|
12976
|
+
}
|
|
12977
|
+
get rootElement() { return index.getElement(this); }
|
|
12978
|
+
static get watchers() { return {
|
|
12979
|
+
"data": ["dataChanged"]
|
|
12980
|
+
}; }
|
|
12981
|
+
};
|
|
12982
|
+
_KupPlanner_kupManager = new WeakMap(), _KupPlanner_lastOnChangeReceived = new WeakMap(), _KupPlanner_rootPlanner = new WeakMap(), _KupPlanner_phases = new WeakMap(), _KupPlanner_storedSettings = new WeakMap(), _KupPlanner_instances = new WeakSet(), _KupPlanner_renderReactPlannerElement = function _KupPlanner_renderReactPlannerElement() {
|
|
12983
|
+
var _a;
|
|
12984
|
+
(_a = __classPrivateFieldGet(this, _KupPlanner_rootPlanner, "f")) === null || _a === void 0 ? void 0 : _a.unmount();
|
|
12985
|
+
const componentWrapperElement = this.rootElement.shadowRoot.getElementById(GenericVariables.componentWrapperId);
|
|
12986
|
+
if (componentWrapperElement) {
|
|
12987
|
+
__classPrivateFieldSet(this, _KupPlanner_rootPlanner, client.createRoot(componentWrapperElement), "f");
|
|
12988
|
+
__classPrivateFieldGet(this, _KupPlanner_rootPlanner, "f").render(react.createElement(Planner, this.plannerProps));
|
|
12989
|
+
}
|
|
12990
|
+
}, _KupPlanner_toTasks = function _KupPlanner_toTasks(data) {
|
|
12991
|
+
var _a;
|
|
12992
|
+
if (!data || !data.rows) {
|
|
12993
|
+
return [];
|
|
12994
|
+
}
|
|
12995
|
+
let tasks = (_a = data.rows) === null || _a === void 0 ? void 0 : _a.filter((row) => isAtLeastOneDateValid(row.cells[this.taskDates[0]], row.cells[this.taskDates[1]])).map((row) => {
|
|
12996
|
+
const datesSanitized = sanitizeAllDates(row.cells[this.taskDates[0]], row.cells[this.taskDates[1]], row.cells[this.taskPrevDates[0]], row.cells[this.taskPrevDates[1]]);
|
|
12997
|
+
const valuesToShow = getValuesToShow(row, this.taskIdCol, this.taskNameCol, data.columns, this.taskColumns, () => this.taskColumns.map((col) => col == this.taskDates[0]
|
|
12998
|
+
? '#START#'
|
|
12999
|
+
: col == this.taskDates[1]
|
|
13000
|
+
? '#END#'
|
|
13001
|
+
: kupManager$1.getCellValueForDisplay(data.columns.find((kCol) => kCol.name == col), row.cells[col])));
|
|
13002
|
+
let iconUrl = __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_getIconUrl).call(this, row, this.taskIconCol);
|
|
13003
|
+
let iconColor = __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_getIconColor).call(this, row, this.taskIconCol);
|
|
13004
|
+
let task = {
|
|
13005
|
+
taskRow: row,
|
|
13006
|
+
taskRowId: row.id,
|
|
13007
|
+
id: row.cells[this.taskIdCol].value,
|
|
13008
|
+
name: row.cells[this.taskNameCol].value,
|
|
13009
|
+
startDate: datesSanitized.dateValues[0],
|
|
13010
|
+
endDate: datesSanitized.dateValues[1],
|
|
13011
|
+
secondaryStartDate: datesSanitized.secDateValues[0],
|
|
13012
|
+
secondaryEndDate: datesSanitized.secDateValues[1],
|
|
13013
|
+
type: 'project',
|
|
13014
|
+
valuesToShow: valuesToShow,
|
|
13015
|
+
rowType: KupPlannerGanttRowType.TASK,
|
|
13016
|
+
icon: iconUrl
|
|
13017
|
+
? { url: iconUrl, color: iconColor !== null && iconColor !== void 0 ? iconColor : '#595959' }
|
|
13018
|
+
: undefined,
|
|
13019
|
+
};
|
|
13020
|
+
return task;
|
|
13021
|
+
});
|
|
13022
|
+
return tasks;
|
|
13023
|
+
}, _KupPlanner_toDetails = function _KupPlanner_toDetails(data) {
|
|
13024
|
+
if (!data || !data.rows) {
|
|
13025
|
+
return undefined;
|
|
13026
|
+
}
|
|
13027
|
+
let details = [];
|
|
13028
|
+
data.rows
|
|
13029
|
+
.filter((row) => isAtLeastOneDateValid(row.cells[this.detailDates[0]], row.cells[this.detailDates[1]]))
|
|
13030
|
+
.forEach((row) => {
|
|
13031
|
+
var _a, _b;
|
|
13032
|
+
const detailId = row.cells[this.detailIdCol].value;
|
|
13033
|
+
const detailNameId = row.cells[this.detailNameCol].value;
|
|
13034
|
+
const datesSanitized = sanitizeAllDates(row.cells[this.detailDates[0]], row.cells[this.detailDates[1]]);
|
|
13035
|
+
const valuesToShow = getValuesToShow(row, this.detailIdCol, this.detailNameCol, data.columns, this.detailColumns);
|
|
13036
|
+
let detail = details.find((det) => det.id == detailId);
|
|
13037
|
+
if (!detail) {
|
|
13038
|
+
detail = {
|
|
13039
|
+
id: detailId,
|
|
13040
|
+
name: detailNameId,
|
|
13041
|
+
detailRow: row,
|
|
13042
|
+
type: 'timeline',
|
|
13043
|
+
valuesToShow: valuesToShow,
|
|
13044
|
+
rowType: KupPlannerGanttRowType.DETAIL,
|
|
13045
|
+
schedule: [],
|
|
13046
|
+
};
|
|
13047
|
+
details.push(detail);
|
|
13048
|
+
}
|
|
13049
|
+
let iconUrl = __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_getIconUrl).call(this, row, this.detailIconCol);
|
|
13050
|
+
let iconColor = __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_getIconColor).call(this, row, this.detailIconCol);
|
|
13051
|
+
detail.schedule.push({
|
|
13052
|
+
startDate: datesSanitized.dateValues[0],
|
|
13053
|
+
endDate: datesSanitized.dateValues[1],
|
|
13054
|
+
color: this.detailColorCol
|
|
13055
|
+
? (_a = row.cells[this.detailColorCol].value) !== null && _a !== void 0 ? _a : '#D9D9D8'
|
|
13056
|
+
: '#D9D9D8',
|
|
13057
|
+
selectedColor: this.detailColorCol
|
|
13058
|
+
? (_b = row.cells[this.detailColorCol].value) !== null && _b !== void 0 ? _b : '#D9D9D8'
|
|
13059
|
+
: '#D9D9D8',
|
|
13060
|
+
icon: iconUrl
|
|
13061
|
+
? { url: iconUrl, color: iconColor !== null && iconColor !== void 0 ? iconColor : '#595959' }
|
|
13062
|
+
: undefined,
|
|
13063
|
+
});
|
|
13064
|
+
});
|
|
13065
|
+
return details;
|
|
13066
|
+
}, _KupPlanner_getTask = function _KupPlanner_getTask(taskId) {
|
|
13067
|
+
return this.plannerProps.mainGantt.items.find((task) => task.id == taskId);
|
|
13068
|
+
}, _KupPlanner_removePhases = function _KupPlanner_removePhases(taskId) {
|
|
13069
|
+
const task = __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_getTask).call(this, taskId);
|
|
13070
|
+
if (task)
|
|
13071
|
+
task.phases = undefined;
|
|
13072
|
+
this.plannerProps = Object.assign({}, this.plannerProps);
|
|
13073
|
+
}, _KupPlanner_handleOnClickOnTask = function _KupPlanner_handleOnClickOnTask(nativeEvent) {
|
|
13074
|
+
const task = __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_getTask).call(this, nativeEvent.id);
|
|
13075
|
+
if (task === null || task === void 0 ? void 0 : task.phases) {
|
|
13076
|
+
__classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_removePhases).call(this, task.id);
|
|
13077
|
+
}
|
|
13078
|
+
return true;
|
|
13079
|
+
}, _KupPlanner_handleOnClickOnPhase = function _KupPlanner_handleOnClickOnPhase() {
|
|
13080
|
+
return true;
|
|
13081
|
+
}, _KupPlanner_handleOnClickOnDetail = function _KupPlanner_handleOnClickOnDetail() {
|
|
13082
|
+
return true;
|
|
13083
|
+
}, _KupPlanner_handleOnContextMenuOnTask = function _KupPlanner_handleOnContextMenuOnTask() {
|
|
13084
|
+
return true;
|
|
13085
|
+
}, _KupPlanner_handleOnContextMenuOnPhase = function _KupPlanner_handleOnContextMenuOnPhase() {
|
|
13086
|
+
return true;
|
|
13087
|
+
}, _KupPlanner_handleOnContextMenuOnDetail = function _KupPlanner_handleOnContextMenuOnDetail() {
|
|
13088
|
+
return true;
|
|
13089
|
+
}, _KupPlanner_emitOnChangeEventsReceived = function _KupPlanner_emitOnChangeEventsReceived(nativeEvent) {
|
|
13090
|
+
let emitEvent = false;
|
|
13091
|
+
if (!__classPrivateFieldGet(this, _KupPlanner_lastOnChangeReceived, "f")) {
|
|
13092
|
+
emitEvent = true;
|
|
13093
|
+
__classPrivateFieldSet(this, _KupPlanner_lastOnChangeReceived, new KupPlannerLastOnChangeReceived(nativeEvent), "f");
|
|
13094
|
+
}
|
|
13095
|
+
else if (!__classPrivateFieldGet(this, _KupPlanner_lastOnChangeReceived, "f").isEquivalent(nativeEvent)) {
|
|
13096
|
+
__classPrivateFieldSet(this, _KupPlanner_lastOnChangeReceived, new KupPlannerLastOnChangeReceived(nativeEvent), "f");
|
|
13097
|
+
emitEvent = true;
|
|
13098
|
+
}
|
|
13099
|
+
return emitEvent;
|
|
13100
|
+
}, _KupPlanner_onFilter = function _KupPlanner_onFilter(value, isDetail) {
|
|
13101
|
+
if (isDetail) {
|
|
13102
|
+
__classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").detailFilter = value;
|
|
13103
|
+
}
|
|
13104
|
+
else {
|
|
13105
|
+
__classPrivateFieldGet(this, _KupPlanner_storedSettings, "f").taskFilter = value;
|
|
13106
|
+
}
|
|
13107
|
+
const newGantt = isDetail
|
|
13108
|
+
? {
|
|
13109
|
+
secondaryGantt: Object.assign(Object.assign({}, this.plannerProps.secondaryGantt), { items: __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_toDetails).call(this, __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_getFilteredRows).call(this, value, isDetail)) }),
|
|
13110
|
+
}
|
|
13111
|
+
: {
|
|
13112
|
+
mainGantt: Object.assign(Object.assign({}, this.plannerProps.mainGantt), { items: __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_toTasks).call(this, __classPrivateFieldGet(this, _KupPlanner_instances, "m", _KupPlanner_getFilteredRows).call(this, value, isDetail)) }),
|
|
13113
|
+
};
|
|
13114
|
+
this.plannerProps = Object.assign(Object.assign({}, this.plannerProps), newGantt);
|
|
13115
|
+
this.persistState();
|
|
13116
|
+
}, _KupPlanner_getFilteredRows = function _KupPlanner_getFilteredRows(value, isDetail) {
|
|
13117
|
+
const data = isDetail ? this.detailData : this.data;
|
|
13118
|
+
if (!data || !data.rows || data.rows.length == 0) {
|
|
13119
|
+
return undefined;
|
|
13120
|
+
}
|
|
13121
|
+
if (!value) {
|
|
13122
|
+
return data;
|
|
13123
|
+
}
|
|
13124
|
+
const tempData = {
|
|
13125
|
+
columns: this.data.columns,
|
|
13126
|
+
rows: [],
|
|
13127
|
+
};
|
|
13128
|
+
const tempRows = [];
|
|
13129
|
+
for (let index = 0; index < data.rows.length; index++) {
|
|
13130
|
+
const row = data.rows[index];
|
|
13131
|
+
const cells = row.cells;
|
|
13132
|
+
for (let index = 0; index < data.columns.length; index++) {
|
|
13133
|
+
const column = data.columns[index];
|
|
13134
|
+
const cell = cells[column.name];
|
|
13135
|
+
if (cell) {
|
|
13136
|
+
const dValue = kupManager$1.getCellValueForDisplay(data.columns[index], cell);
|
|
13137
|
+
const found = !!(dValue.toLowerCase().indexOf(value.toLowerCase()) > -1);
|
|
13138
|
+
if (found) {
|
|
13139
|
+
tempRows.push({ row, weight: index });
|
|
13140
|
+
break;
|
|
13141
|
+
}
|
|
13142
|
+
}
|
|
13143
|
+
}
|
|
13144
|
+
}
|
|
13145
|
+
tempRows
|
|
13146
|
+
.sort((a, b) => a.weight - b.weight)
|
|
13147
|
+
.forEach((tempRow) => {
|
|
13148
|
+
tempData.rows.push(tempRow.row);
|
|
13149
|
+
});
|
|
13150
|
+
return tempData;
|
|
13151
|
+
}, _KupPlanner_getIconUrl = function _KupPlanner_getIconUrl(row, columnName) {
|
|
13152
|
+
var _a;
|
|
13153
|
+
let iconUrl = undefined;
|
|
13154
|
+
if (columnName) {
|
|
13155
|
+
const iconCell = row.cells[columnName];
|
|
13156
|
+
let icon = (_a = iconCell === null || iconCell === void 0 ? void 0 : iconCell.data) === null || _a === void 0 ? void 0 : _a.resource;
|
|
13157
|
+
if (!icon) {
|
|
13158
|
+
icon = iconCell.value;
|
|
13159
|
+
}
|
|
13160
|
+
if (icon) {
|
|
13161
|
+
iconUrl = index.getAssetPath('./assets/svg/' + icon + '.svg');
|
|
13162
|
+
}
|
|
13163
|
+
}
|
|
13164
|
+
return iconUrl;
|
|
13165
|
+
}, _KupPlanner_getIconColor = function _KupPlanner_getIconColor(row, columnName) {
|
|
13166
|
+
var _a;
|
|
13167
|
+
let iconColor = undefined;
|
|
13168
|
+
if (columnName) {
|
|
13169
|
+
const iconCell = row.cells[columnName];
|
|
13170
|
+
iconColor = (_a = iconCell === null || iconCell === void 0 ? void 0 : iconCell.data) === null || _a === void 0 ? void 0 : _a.color;
|
|
13171
|
+
if (iconColor) {
|
|
13172
|
+
iconColor =
|
|
13173
|
+
__classPrivateFieldGet(this, _KupPlanner_kupManager, "f").theme.colorCheck(iconColor).hexColor;
|
|
13174
|
+
}
|
|
13175
|
+
}
|
|
13176
|
+
return iconColor;
|
|
13177
|
+
};
|
|
13020
13178
|
KupPlanner.style = kupPlannerCss;
|
|
13021
13179
|
|
|
13022
13180
|
exports.kup_planner = KupPlanner;
|