@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
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as s,f as i,h as o,H as a,g as n}from"./p-
|
|
1
|
+
import{r as t,c as s,f as i,h as o,H as a,g as n}from"./p-b5deb573.js";import{k as e,g as r,s as c}from"./p-6d46cbb0.js";import{c as l}from"./p-ad2e21d2.js";import{F as p}from"./p-1ca9aece.js";import"./p-0fd98ab4.js";import"./p-2ac2c05e.js";const h="snackbar";var u;!function(t){t.actionButton="Set of FButton props to set the action button.",t.closeButton="When true, the hide button will be displayed.",t.customStyle="Custom style of the component.",t.text="Sets the textual content of the snackbar.",t.timeout="Defaults at null, when set the snackbar will automatically disappear after the specified amount of milliseconds."}(u||(u={}));const b=class{constructor(i){t(this,i),this.kupActionClick=s(this,"kup-snackbar-actionclick",6),this.kupTimeoutComplete=s(this,"kup-snackbar-timeoutcomplete",6),this.kupManager=e(),this.visible=!1,this.actionButton=null,this.closeButton=!0,this.customStyle="",this.text="",this.timeout=null}onKupActionClick(){this.hide(),this.kupActionClick.emit({comp:this,id:this.rootElement.id})}onKupTimeoutComplete(){this.kupTimeoutComplete.emit({comp:this,id:this.rootElement.id})}async getProps(t){return r(this,u,t)}async hide(){this.visible=!1}async refresh(){i(this)}async setProps(t){c(this,u,t)}async show(){this.visible=!0}componentWillLoad(){this.kupManager.debug.logLoad(this,!1),this.kupManager.theme.register(this)}componentDidLoad(){this.kupManager.debug.logLoad(this,!0)}componentWillRender(){this.kupManager.debug.logRender(this,!1)}componentDidRender(){this.timeout&&this.visible&&setTimeout((()=>{this.hide(),this.onKupTimeoutComplete()}),this.timeout),this.kupManager.debug.logRender(this,!0)}render(){return o(a,{"kup-visible":this.visible},o("style",null,this.kupManager.theme.setKupStyle(this.rootElement)),o("div",{id:l},o("div",{class:h},o("div",{class:`${h}__text`},this.text),this.actionButton||this.closeButton?o("div",{class:`${h}__buttons`},this.actionButton?o("div",{class:`${h}__action`},o(p,Object.assign({},this.actionButton,{onClick:()=>this.onKupActionClick()}))):null,this.closeButton?o("div",{class:`${h}__close`},o(p,{icon:"close",onClick:()=>this.hide()})):null):null)))}disconnectedCallback(){this.kupManager.theme.unregister(this)}get rootElement(){return n(this)}};b.style=":host{animation:snackbar-show 125ms;bottom:0;box-sizing:border-box;display:block;left:0;outline:none;pointer-events:none;position:fixed;transition:opacity 0.15s cubic-bezier(0, 0, 0.2, 1) 0ms, transform 0.15s cubic-bezier(0, 0, 0.2, 1) 0ms, -webkit-transform 0.15s cubic-bezier(0, 0, 0.2, 1) 0ms;width:100%;z-index:calc(var(--kup-navbar-zindex) + 1)}:host(:not([kup-visible])){display:none}#kup-component{box-sizing:border-box;display:flex;justify-content:center;height:100%;padding:8px;width:100%}.snackbar{align-items:center;background:var(--kup-navbar-background-color);border-radius:5px;box-shadow:var(--kup-box-shadow);color:var(--kup-navbar-color);display:flex;justify-content:space-between;max-width:672px;min-height:48px;min-width:344px}.snackbar__text{padding:14px 16px;pointer-events:all;word-break:break-word}.snackbar__buttons{--kup-button-primary-color:var(--kup-navbar-color);--kup-button-primary-color-rgb:var(--kup-navbar-color-rgb);--kup-button-primary-color-h:var(--kup-navbar-color-h);--kup-button-primary-color-s:var(--kup-navbar-color-s);--kup-button-primary-color-l:var(--kup-navbar-color-l);align-items:center;display:flex;justify-content:flex-end;margin-right:8px;pointer-events:all;width:max-content}.snackbar__close{--kup-button-font-size:11px;margin-left:8px;pointer-events:all}@keyframes snackbar-show{from{transform:scale(0.5);opacity:0}to{transform:scale(1);opacity:1}}:host(.kup-top){bottom:unset;top:var(--kup-navbar-height, 0)}";export{b as kup_snackbar}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a9 as e,aa as t,b as c,a6 as s,ab as a,ac as n,ad as i,ae as o,af as l,ag as u}from"./p-6d46cbb0.js";import{h as r}from"./p-b5deb573.js";import{F as p}from"./p-fd1323da.js";import{F as d}from"./p-0143e942.js";import{F as b}from"./p-2ac2c05e.js";import{F as k,a as h}from"./p-349d4715.js";var f,m,w;!function(e){e.customStyle="Custom style of the component.",e.data="The data of the list.",e.displayMode="Selects how the items must display their label and how they can be filtered for.",e.filter="Keeps string for filtering elements when filter mode is active",e.hideText="Hides rows' text, ideally to display a list of icons only.",e.isMenu="Defines whether the list is a menu or not.",e.keyboardNavigation="When true, enables items' navigation through arrow keys.",e.menuVisible="Sets the status of the menu, when false it's hidden otherwise it's visible.",e.roleType="Defines the type of selection. Values accepted: listbox, radiogroup or group.",e.selectable="Defines whether items are selectable or not.",e.showIcons="Displays the icons associated to each row when set to true.",e.twoLine="The list elements descriptions will be arranged in two lines."}(f||(f={})),function(e){e.LISTBOX="listbox",e.RADIOGROUP="radiogroup",e.GROUP="group"}(m||(m={})),function(e){e.CODE="code",e.DESCRIPTION="description",e.DESCRIPTION_AND_CODE="both"}(w||(w={}));const y=e=>r("div",Object.assign({class:`f-switch ${e.danger?"kup-danger":""} ${e.info?"kup-info":""} ${e.secondary?"kup-secondary":""} ${e.success?"kup-success":""} ${e.warning?"kup-warning":""} ${e.wrapperClass?e.wrapperClass:""}`},e.dataSet,{id:e.id,title:e.title}),r("div",{class:"form-field "+(e.leadingLabel?"form-field--align-end":"")},r("div",{class:`switch ${e.checked?"switch--checked":""} ${e.disabled?"switch--disabled":""}`},r("div",{class:"switch__track"}),r("div",{class:"switch__thumb-underlay"},r("div",{class:"switch__thumb"},r("input",{type:"checkbox",class:"switch__native-control",role:"switch",checked:e.checked,disabled:e.disabled,value:e.checked?"on":"off",onBlur:e.onBlur,onChange:e.onChange,onFocus:e.onFocus})))),r("label",{onClick:e.onChange},e.label))),g=document.documentElement,j=(n,o)=>{const f=n.cell,m=n.column,j=n.row,_=n.shape?n.shape:f.shape?f.shape:m.shape?m.shape:null,C=!g.ketchup.objects.isEmptyKupObj(f.obj),I=!(!f.isEditable&&!m.isEditable||!n.editable),$=n.previousValue!==f.value?f.value:"",z=g.ketchup.data.cell.getType(f,_),D=Object.assign({},f.data);let F=f.cssClass?f.cssClass:m.cssClass?m.cssClass:"";const K={"f-cell":!0,[i.OBJ]:!!C,[z+"-cell"]:!0,[n.wrapperClass]:!!n.wrapperClass,[n.density]:!(!n.density||z===s.BAR),[F]:!!F};let V=$;I&&e.includes(z)?V=function(e,t,c,a,n){switch(e){case s.AUTOCOMPLETE:return r("kup-autocomplete",Object.assign({key:a.name+n.row.id,initialValue:c.value},c.data,{class:x(n)?"kup-full-width":"","onkup-autocomplete-change":t=>v(t,n,e,u.UPDATE),"onkup-autocomplete-input":t=>v(t,n,e,u.INPUT),"onkup-autocomplete-iconclick":t=>v(t,n,e,u.ICON_CLICK)}));case s.CHECKBOX:return O(n)&&(t[i.C_CENTERED]=!0),r(p,Object.assign({},c.data,{onChange:t=>v(t,n,e,u.UPDATE)}));case s.CHIP:return r("kup-chip",Object.assign({},c.data,{type:k.INPUT,enableInput:!0,"onKup-chip-change":t=>v(t,n,e,u.UPDATE)}),r("kup-text-field",Object.assign({fullWidth:!0,slot:"field"},c.slotData)));case s.COLOR_PICKER:return r("kup-color-picker",Object.assign({key:a.name+n.row.id,initialValue:c.value},c.data,{class:x(n)?"kup-full-width":"",disabled:!1,"onkup-colorpicker-change":t=>v(t,n,e,u.UPDATE)}));case s.COMBOBOX:return r("kup-combobox",Object.assign({key:a.name+n.row.id,initialValue:c.value},c.data,{class:x(n)?"kup-full-width":"","onkup-combobox-change":t=>v(t,n,e,u.UPDATE),"onkup-combobox-input":t=>v(t,n,e,u.INPUT),"onkup-combobox-iconclick":t=>v(t,n,e,u.ICON_CLICK)}));case s.DATE:return r("kup-date-picker",Object.assign({key:a.name+n.row.id,initialValue:c.value},c.data,{class:x(n)?"kup-full-width":"","onkup-datepicker-change":t=>v(t,n,e,u.UPDATE),"onkup-datepicker-input":t=>v(t,n,e,u.INPUT)}));case s.MULTI_AUTOCOMPLETE:return r("kup-chip",Object.assign({displayId:!0},c.data,{type:k.INPUT,enableInput:!0,"onKup-chip-change":t=>v(t,n,e,u.UPDATE)}),r("kup-autocomplete",Object.assign({class:"kup-full-width",slot:"field",displayMode:w.DESCRIPTION_AND_CODE,selectMode:w.DESCRIPTION_AND_CODE,"onkup-autocomplete-input":t=>v(t,n,e,u.INPUT),"onkup-autocomplete-iconclick":t=>v(t,n,e,u.ICON_CLICK),showDropDownIcon:!1},c.slotData)));case s.MULTI_COMBOBOX:return r("kup-chip",Object.assign({displayId:!0},c.data,{type:k.INPUT,enableInput:!0,"onKup-chip-change":t=>v(t,n,e,u.UPDATE)}),r("kup-combobox",Object.assign({class:"kup-full-width",slot:"field",displayMode:w.DESCRIPTION_AND_CODE,selectMode:w.DESCRIPTION_AND_CODE,"onkup-combobox-input":t=>v(t,n,e,u.INPUT),"onkup-combobox-iconclick":t=>v(t,n,e,u.ICON_CLICK)},c.slotData)));case s.RATING:return r("kup-rating",Object.assign({key:a.name+n.row.id},c.data,{disabled:!1,"onkup-rating-click":t=>v(t,n,e,u.UPDATE)}));case s.SWITCH:return r(y,Object.assign({},c.data,{disabled:!1,onChange:t=>v(t,n,e,u.UPDATE)}));case s.TIME:return r("kup-time-picker",Object.assign({key:a.name+n.row.id,initialValue:c.value},c.data,{class:x(n)?"kup-full-width":"","onkup-timepicker-change":t=>v(t,n,e,u.UPDATE),"onkup-timepicker-input":t=>v(t,n,e,u.INPUT)}));case s.NUMBER:t[i.C_RIGHT_ALIGNED]=!0;case s.LINK:case s.STRING:return r(d,Object.assign({inputType:e===s.NUMBER?"number":null,fullWidth:!!x(n)},c.data,{icon:c.data&&c.data.icon?c.data.icon:c.icon?c.icon:a.icon?a.icon:null,value:e===s.NUMBER?g.ketchup.math.numberifySafe(c.value).toString():c.value,onChange:t=>v(t,n,e,u.UPDATE),onInput:t=>v(t,n,e,u.INPUT),onIconClick:t=>v(t,n,e,u.ICON_CLICK)}))}}(z,K,f,m,n):f.data&&t.includes(z)?(n.setSizes&&function(e,t,c){switch(e){case s.BAR:t.sizeY||(t.sizeY="26px");break;case s.BUTTON:let e="";t.label&&(e="36px"),c.style?c.style.height||(c.style.minHeight=e):c.style={minHeight:e};break;case s.CHART:t.sizeX||(t.sizeX="100%"),t.sizeY||(t.sizeY="100%");break;case s.CHIP:case s.RADIO:c.style?c.style.height||(c.style.minHeight="40px"):c.style={minHeight:"40px"}}}(z,D,f),V=n.renderKup?function(e,t,c,a,n,o,l){switch(e){case s.BAR:return c.data?r("div",{style:{height:c.sizeY,width:"100%"}},r(b,Object.assign({},c))):r("kup-image",Object.assign({key:o.name+l.row.id},c));case s.BUTTON:return O(l)&&(t[i.C_CENTERED]=!0),r("kup-button",Object.assign({key:o.name+l.row.id},c,{"onkup-button-click":t=>v(t,l,e,u.CLICK)}));case s.BUTTON_LIST:return O(l)&&(t[i.C_CENTERED]=!0),c["data-storage"]={cell:a,row:n,column:o},r("kup-button-list",Object.assign({key:o.name+l.row.id},c));case s.CHART:return O(l)&&(t[i.C_CENTERED]=!0),r("kup-chart",Object.assign({key:o.name+l.row.id},c));case s.CHIP:return r(h,Object.assign({},c));case s.COLOR_PICKER:return r("kup-color-picker",Object.assign({key:o.name+l.row.id},c,{class:x(l)?"kup-full-width":"",disabled:!0}));case s.GAUGE:return r("kup-gauge",Object.assign({key:o.name+l.row.id,value:g.ketchup.math.numberifySafe(a.value),"width-component":"280px"},c));case s.KNOB:case s.PROGRESS_BAR:return r("kup-progress-bar",Object.assign({key:o.name+l.row.id},c));case s.RADIO:return O(l)&&(t[i.C_CENTERED]=!0),c.disabled=n.readOnly,r("kup-radio",Object.assign({key:o.name+l.row.id},c));case s.RATING:return r("kup-rating",Object.assign({key:o.name+l.row.id},c,{disabled:!0}))}}(z,K,D,f,j,m,n):r("span",{class:"cell-"+z+" placeholder"})):(n.setSizes&&function(e,t,c,n){switch(e){case s.CHECKBOX:case s.ICON:t.sizeX||(t.sizeX="18px"),t.sizeY||(t.sizeY="18px"),c.style?c.style.height||(c.style.minHeight=t.sizeY):c.style={minHeight:t.sizeY};break;case s.IMAGE:n.component.rootElement.tagName===a.BOX?(t.sizeY||(t.sizeY="auto"),void 0===t.fit&&(t.fit=!0)):t.sizeX||(t.sizeX="auto"),t.sizeY||(t.sizeY="64px")}}(z,D,f,n),V=function(e,t,c,a,n,o,u){switch(e){case s.AUTOCOMPLETE:case s.COMBOBOX:case s.DATE:case s.DATETIME:case s.TIME:if(c&&""!=c){const e=l(o,n);return r("div",{class:"f-cell__text"},e)}return c;case s.CHECKBOX:return O(u)&&(a[i.C_CENTERED]=!0),r(b,{resource:t.checked?"check_box":"check_box_outline_blank",sizeX:"18px",sizeY:"18px"});case s.EDITOR:return r("div",{innerHTML:n.value});case s.ICON:case s.IMAGE:return O(u)&&(a[i.C_CENTERED]=!0),t.badgeData&&(a[i.C_PADDED]=!0),r(b,Object.assign({},t));case s.LINK:return r("a",{href:c,target:"_blank"},n.value);case s.NUMBER:if(c&&""!=c){const e=g.ketchup.math.numberifySafe(n.value),t=l(o,n);return e<0&&(a[i.TEXT_DANGER]=!0),O(u)&&(a[i.C_RIGHT_ALIGNED]=!0),r("div",{class:"f-cell__text"},t)}return r("div",{class:"f-cell__text"},c);case s.SWITCH:return O(u)&&(a[i.C_CENTERED]=!0),t.disabled=!0,r(y,Object.assign({},t));default:return r("div",{class:"f-cell__text"},c)}}(z,D,V,K,f,m,n));let H=null;!I&&(m.icon||f.icon)&&V&&(H=r(b,Object.assign({},{color:`rgba(var(${c.TEXT}-rgb), 0.375)`,resource:f.icon?f.icon:m.icon,sizeX:"1.25em",sizeY:"1.25em",wrapperClass:"obj-icon"})));let M=null;g.ketchup.debug.isDebug()&&C?M=f.obj.t+"; "+f.obj.p+"; "+f.obj.k+";":null!=f.title&&""!=f.title.trim()&&(M=f.title);let T=null;if(f.info){const e=Object.assign({},f.info);e.color||(e.color=`var(${c.INFO})`),e.icon||(e.icon="info"),T=r(b,Object.assign({},{color:e.color,resource:e.icon,sizeX:"1.25em",sizeY:"1.25em",title:e.message?e.message:"",wrapperClass:"cell-info"}))}return r("div",{onKeyUp:e=>v(e,n,z,u.KEYUP),class:K,"kup-get-cell-props":()=>n,style:f.style},r("div",{class:"f-cell__content",style:f.styleContent,title:M},o&&o.length>0?o:[n.indents,T,H,V]))};function v(e,t,c,a){const n=t.cell,i=t.column,o=t.component,r=t.row;let p=function(e,t){const c=!("INPUT"!==e.target.tagName);let a=c?e.target.value:e.detail.value;return t===s.NUMBER&&c&&(a=g.ketchup.math.formattedStringToNumberString(a,"")),a}(e,c);if(a===u.UPDATE){switch(c){case s.AUTOCOMPLETE:case s.COMBOBOX:case s.DATE:case s.TIME:n.data&&(n.data.initialValue=p);break;case s.CHECKBOX:case s.SWITCH:p="on"===p?"0":"1",n.data&&(n.data.checked="0"!==p);break;case s.CHIP:case s.MULTI_AUTOCOMPLETE:case s.MULTI_COMBOBOX:p=e.detail.stringifiedValues,n.data&&(n.data.data=e.detail.comp.data)}n.obj&&(n.obj.k=p.toString()),n.value=p.toString(),n.displayedValue=null,n.displayedValue=l(i,n)}if(o&&o.rootElement){const t=new CustomEvent(a,{bubbles:!0,cancelable:!0,composed:!0,detail:{comp:o,id:o.rootElement.id,cell:n,column:i,event:e,row:r,type:c}});if(o.rootElement.dispatchEvent(t),a===u.UPDATE)try{o.refresh()}catch(e){}}}function O(e){var t;return o.includes(null===(t=e.component)||void 0===t?void 0:t.rootElement.tagName)}function x(e){var t;return n.includes(null===(t=e.component)||void 0===t?void 0:t.rootElement.tagName)}export{j as F,w as I,m as K,f as a,y as b}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as o,f as i,e,h as s,H as r,g as n}from"./p-b5deb573.js";import{k as a,A as l,g as h,s as c,v as p,m as b,K as d,c as u,Q as x,V as f,W as g,X as w,I as m,a2 as k}from"./p-6d46cbb0.js";import{f as v,p as y,s as _,d as j,r as C,h as P,b as A}from"./p-fb29ba2a.js";import{F as R}from"./p-2ac2c05e.js";import{a as z}from"./p-349d4715.js";import{c as I}from"./p-ad2e21d2.js";import{F as E}from"./p-e646523d.js";import{F as M}from"./p-fb03f2f5.js";import"./p-1ca9aece.js";import"./p-0fd98ab4.js";import"./p-fd1323da.js";import"./p-0143e942.js";import"./p-6507e9eb.js";var O;!function(t){t.cardData="Data of the card linked to the box when the latter's layout must be a premade template.",t.columns="Number of columns.",t.customStyle="Custom style of the component.",t.data="Actual data of the box.",t.dragEnabled="Enable dragging.",t.dropEnabled="Enable dropping.",t.dropOnSection="Drop can be done in section.",t.enableRowActions="If enabled, a button to load / display the row actions will be displayed on the right of every box.",t.globalFilter="When set to true it activates the global filter.",t.globalFilterValue="The value of the global filter.",t.kanban="Displays the boxlist as a Kanban.",t.layout="How the field will be displayed. If not present, a default one will be created.",t.lazyLoadRows="When set to true, extra rows will be automatically loaded once the last row enters the viewport.",t.multiSelection="Enable multi selection.",t.pageSelected="Current page number.",t.pagination="Enables pagination.",t.rowsPerPage="Number of current rows per page.",t.scrollOnHover="Activates the scroll on hover function.",t.selectBox="Automatically selects the box at the specified index.",t.selectedRowsState="Multiple selection.",t.showSelection="If enabled, highlights the selected box/boxes.",t.sortBy="If sorting is enabled, specifies which column to sort.",t.sortEnabled="Enable sorting.",t.stateId="",t.store="",t.swipeDisabled="Disable swipe."}(O||(O={}));class S{constructor(){this.globalFilterValue="",this.sortBy="",this.selectedRowsState="",this.pageSelected=1,this.rowsPerPage=0,this.load=!1}toDebugString(){return"box state"}}var B,D,W,$,T,F,L=function(t,o,i,e){if("a"===i&&!e)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof o?t!==o||!e:!o.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?e:"a"===i?e.call(t):e?e.value:o.get(t)},H=function(t,o,i,e,s){if("m"===e)throw new TypeError("Private method is not writable");if("a"===e&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof o?t!==o||!s:!o.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===e?s.call(t,i):s?s.value=i:o.set(t,i),i};const G=class{constructor(i){t(this,i),this.kupBoxClick=o(this,"kup-box-click",6),this.kupBoxSelected=o(this,"kup-box-selected",6),this.kupAutoBoxSelect=o(this,"kup-box-autoselect",6),this.kupRowActionMenuClick=o(this,"kup-box-rowactionmenuclick",6),this.kupRowActionClick=o(this,"kup-box-rowactionclick",6),this.kupDidLoad=o(this,"kup-box-didload",6),this.kupDidUnload=o(this,"kup-box-didunload",6),this.kupBoxContextMenu=o(this,"kup-box-contextmenu",6),B.add(this),this.state=new S,this.kupManager=a(),this.visibleColumns=[],this.rows=[],this.filteredRows=[],this.sectionRef=null,this.rowsRefs=[],this.hold=!1,this.interactableDrag=[],this.interactableDrop=[],this.interactableTouch=[],D.set(this,void 0),W.set(this,[]),$.set(this,0),this.collapsedSection={},this.selectedRows=[],this.rowActionMenuOpened=void 0,this.currentPage=1,this.currentRowsPerPage=10,this.cardData=null,this.columns=1,this.customStyle="",this.data=null,this.dragEnabled=!1,this.dropEnabled=!1,this.dropOnSection=!1,this.editableData=!1,this.enableRowActions=!1,this.globalFilter=!1,this.globalFilterValue="",this.kanban=null,this.layout=void 0,this.lazyLoadRows=!1,this.multiSelection=!1,this.pageSelected=1,this.pagination=!1,this.rowsPerPage=void 0,this.scrollOnHover=!1,this.selectBox=void 0,this.selectedRowsState=void 0,this.showSelection=!0,this.sortBy=void 0,this.sortEnabled=!1,this.stateId="",this.store=void 0,this.swipeDisabled=!1}initWithPersistedState(){if(this.store&&this.stateId){const t=this.store.getState(this.stateId);null!=t&&(this.kupManager.debug.logMessage(this,"Initialize with state for stateId "+this.stateId+": "+t),this.sortBy=this.state.sortBy,this.globalFilterValue=this.state.globalFilterValue,this.selectedRowsState=this.state.selectedRowsState,this.pageSelected=this.state.pageSelected,this.rowsPerPage=this.state.rowsPerPage)}}persistState(){if(this.store&&this.stateId){let t=!1;this.kupManager.objects.deepEqual(this.state.sortBy,this.sortBy)||(this.state.sortBy=this.sortBy,t=!0),this.kupManager.objects.deepEqual(this.state.globalFilterValue,this.globalFilterValue)||(this.state.globalFilterValue=this.globalFilterValue,t=!0),this.kupManager.objects.deepEqual(this.state.pageSelected,this.currentPage)||(this.state.pageSelected=this.currentPage,t=!0),this.kupManager.objects.deepEqual(this.state.rowsPerPage,this.currentRowsPerPage)||(this.state.rowsPerPage=this.currentRowsPerPage,t=!0);const o=this.selectedRows.reduce(((t,o,i)=>t+(i>0?";":"")+o.id),"");if(this.kupManager.objects.deepEqual(this.state.selectedRowsState,o)||(this.state.selectedRowsState=o,t=!0),!this.state.load)return void(this.state.load=!0);t&&(this.kupManager.debug.logMessage(this,"Persisting state for stateId "+this.stateId+": "+this.state),this.store.persistState(this.stateId,this.state))}}rowsPerPageHandler(t){this.currentRowsPerPage=t}recalculateRows(){this.initRows()}onDataChanged(){l(this.getRows()),this.initVisibleColumns(),this.initRows(),this.checkLayout()}onLayoutChanged(){this.checkLayout()}onSelectBoxChanged(){this.handleAutomaticBoxSelection()}async getProps(t){return h(this,O,t)}async loadRowActions(t,o){t.actions=o,this.rowActionMenuOpened=t}async refresh(){i(this)}async setProps(t){c(this,O,t)}getColumns(){return this.data&&this.data.columns?this.data.columns:[{title:"",name:"",size:void 0}]}initVisibleColumns(){this.visibleColumns=this.getColumns().filter((t=>!t.hasOwnProperty("visible")||t.visible))}getRows(){return this.data&&this.data.rows?this.data.rows:[]}initRows(){this.filteredRows=this.getRows(),this.globalFilter&&this.globalFilterValue&&(this.filteredRows=v(this.filteredRows,null,this.globalFilterValue,this.visibleColumns)),this.rows=this.sortRows(this.filteredRows),this.pagination&&(this.rows=y(this.rows,this.currentPage,this.currentRowsPerPage,!1))}sortRows(t){let o=t;return this.sortBy&&(o=_(o,[{column:this.sortBy,sortMode:k.A}])),o}checkScrollOnHover(){this.kupManager.scrollOnHover.isRegistered(this.boxContainer)?this.scrollOnHover||this.kupManager.scrollOnHover.unregister(this.boxContainer):this.scrollOnHover&&this.kupManager.scrollOnHover.register(this.boxContainer)}checkLayout(){if(this.layout)return void(this.boxLayout=this.layout);const t={horizontal:!1,sections:[]},o=this.visibleColumns;let i=o.length,e=[],s=0;for(;i-- >0;)e.push({column:o[s++].name});t.content=e,this.boxLayout={sections:[t]}}onSortChange(t){let o=p(this.visibleColumns,t.detail.value);this.sortBy=o.name}onGlobalFilterChange({detail:t}){let o="";t&&t.value&&(o=t.value),this.globalFilterValue=o}isSectionExpanded(t,o){return!(!t.id||!o.id)&&this.collapsedSection[o.id]&&this.collapsedSection[o.id][t.id]}handleAutomaticBoxSelection(){if(this.selectBox&&this.selectBox>0&&this.selectBox<=this.data.rows.length){this.selectedRows=[];for(let t of this.data.rows)if(t.id===(this.selectBox-1).toString()){this.selectedRows.push(t);break}this.kupAutoBoxSelect.emit({comp:this,id:this.rootElement.id,row:this.selectedRows[0]})}}getEventDetails(t,o){let i=null,e=null,s=null,r=null;if(t&&(i=t.closest(".box-object")||t.querySelector(".box-object")||t.closest(".f-cell")),i)if(i.classList.contains("f-cell")){const t=i["kup-get-cell-props"]();e=t.cell,r=t.column,s=t.row}else e=i["data-cell"],s=i["data-row"],r=p(this.visibleColumns,i.dataset.column);return{boxObject:i||null,column:r||null,cell:e||null,originalEvent:o,row:s||null}}contextMenuHandler(t){return this.getEventDetails(t.target,t)}checkIfElementIsActionMenuIcon(t){return!(!t.tagName||!t.parentElement)&&"svg"===t.tagName&&t.parentElement.classList.contains("row-actions-toggler")}onBoxClick({target:t},o){if(!(t instanceof e))return;let i=t,s=i.classList;for(;!s.contains("box-object")&&!s.contains("box-section")&&!s.contains("box")&&(i=i.parentElement,null!==i);)s=i.classList;let r=null;s.contains("box-object")&&(r=i.dataset.column),this.kupBoxClick.emit({comp:this,id:this.rootElement.id,row:o,column:r}),this.multiSelection?this.onSelectionCheckChange(o):this.selectedRows=[o]}onSelectionCheckChange(t){var o=-1;for(let i=0;i<this.selectedRows.length;i++)if(this.selectedRows[i].id===t.id){o=i;break}o>=0?(this.selectedRows.splice(o,1),this.selectedRows=[...this.selectedRows]):this.selectedRows=[...this.selectedRows,t],this.kupBoxSelected.emit({comp:this,id:this.rootElement.id,rows:this.selectedRows})}toggleSectionExpand(t,o){if(o.id)if(t.id){if(this.collapsedSection[o.id]){const i=this.collapsedSection[o.id];i[t.id]=!i[t.id]||!i[t.id]}else this.collapsedSection[o.id]={},this.collapsedSection[o.id][t.id]=!0;this.collapsedSection=Object.assign({},this.collapsedSection)}else console.error("cannot expand / collapse a section of a row without ad id");else console.error("cannot expand / collapse a section withoun an ID")}onRowAction(t){t&&(t!==this.rowActionMenuOpened?t.actions?this.rowActionMenuOpened=t:this.kupRowActionMenuClick.emit({comp:this,id:this.rootElement.id,row:t}):this.rowActionMenuOpened=null)}onRowActionClick(t,o,i){this.kupRowActionClick.emit({comp:this,id:this.rootElement.id,row:t,action:o,index:i})}clickFunction(t){try{const o=t.composedPath();for(let t of o)if(this.checkIfElementIsActionMenuIcon(t))return}catch(o){if(this.checkIfElementIsActionMenuIcon(t.target))return}this.rowActionMenuOpened=null}handlePageChange(t){const o=j(t,this.filteredRows.length,this.currentRowsPerPage);o&&(this.currentPage=o)}handleRowsPerPageChange(t){const o=C(t,this.filteredRows.length);o&&(this.currentRowsPerPage=o,this.adjustPaginator())}adjustPaginator(){const t=Math.ceil(this.rows.length/this.currentRowsPerPage);this.currentPage>t&&(this.currentPage=1)}renderSectionAsCard(t){let o=!1;const i={button:[],cell:[],columns:[],image:[],progressbar:[],text:[]};for(let o=0;o<this.data.columns.length;o++){const e=this.data.columns[o];!1!==e.visible&&(i.cell.push(t.cells[e.name]),i.columns.push(e))}for(const o in t.cells)if(t.cells.hasOwnProperty(o)){const e=t.cells[o];if(void 0!==e.cardID&&e.obj)switch(e.obj.p){case"BTN":do{i.button.push({})}while(i.button.length<e.cardID);i.button[e.cardID]={label:e.value};break;case"IMG":do{i.image.push({})}while(i.image.length<e.cardID);i.image[e.cardID]={resource:e.value};break;case"PGB":do{i.progressbar.push({})}while(i.progressbar.length<e.cardID);i.progressbar[e.cardID]={value:e.value};break;default:do{i.text.push("")}while(i.text.length<e.cardID);i.text[e.cardID]=e.value}}for(const e in t.cells)if(t.cells.hasOwnProperty(e)){const s=t.cells[e];if(void 0===s.cardID&&s.obj)switch(o=!1,s.obj.p){case"BTN":for(let t=0;t<i.button.length;t++)if(!Object.keys(i.button[t]).length){i.button[t]={label:s.value},o=!0;break}o||i.button.push({label:s.value});break;case"IMG":for(let t=0;t<i.image.length;t++)if(!Object.keys(i.image[t]).length){i.image[t]={resource:s.value},o=!0;break}o||i.image.push({resource:s.value});break;case"PGB":for(let t=0;t<i.progressbar.length;t++)if(!Object.keys(i.progressbar[t]).length){i.progressbar[t]={value:s.value},o=!0;break}o||i.progressbar.push({value:s.value});break;default:for(let t=0;t<i.text.length;t++)if(""===i.text[t]){i.text[t]=s.value,o=!0;break}o||i.text.push(s.value)}}return s("kup-card",Object.assign({data:i},this.cardData))}renderRow(t){const o=[...this.visibleColumns];let i=null,e=t.layout;e||(e=this.boxLayout);let r=!1;if(e){e.horizontal&&(r=!0);const s=e.sections;let n=s.length,a=0;n>0&&(i=[]);const l={horizontal:r};for(;n-- >0;)i.push(null!=this.cardData&&"object"==typeof this.cardData?this.renderSectionAsCard(t):this.renderSection(s[a++],l,t,o))}var n=!1;for(let o of this.selectedRows)o.id===t.id&&(n=!0);let a=null;this.multiSelection&&(a=s("div",{class:"box-selection"},s("kup-checkbox",{checked:n})));let l=null;if(this.enableRowActions&&!this.swipeDisabled){const o={"row-action-menu":!0,open:t===this.rowActionMenuOpened};let i=null;if(t.actions){const o=t.actions.map(((o,i)=>s("li",{tabindex:"0",onClick:()=>this.onRowActionClick(t,o,i)},s("div",{class:`icon ${o.icon}`}),s("div",{class:"text"},o.text))));i=s("ul",null,o)}l=s("div",{class:"row-actions-wrapper"},s("div",{class:"row-actions-toggler"},s("svg",{version:"1.1",width:"24",height:"24",viewBox:"0 0 24 24",onClick:()=>this.onRowAction(t)},s("path",{d:"M12,16A2,2 0 0,1 14,18A2,2 0 0,1 12,20A2,2 0 0,1 10,18A2,2 0 0,1 12,16M12,10A2,2 0 0,1 14,12A2,2 0 0,1 12,14A2,2 0 0,1 10,12A2,2 0 0,1 12,10M12,4A2,2 0 0,1 14,6A2,2 0 0,1 12,8A2,2 0 0,1 10,6A2,2 0 0,1 12,4Z"})),s("div",{class:o},i)))}let h=null;return t.badgeData&&t.badgeData.length>0&&(h=t.badgeData.map((t=>s("kup-badge",{text:t.text,class:t.className?`centered ${t.className}`:"centered",imageData:t.imageData})))),s("div",{class:"box-wrapper",style:t.style||{},ref:t=>L(this,W,"f").push(t)},s("div",{class:{box:!0,draggable:this.dragEnabled,selected:this.showSelection&&n,column:!r},onClick:o=>this.onBoxClick(o,t),ref:t=>this.rowsRefs.push(t)},a,i,h),l)}renderSection(t,o,i,e){let r=null;if(t.sections&&t.sections.length>0){const o=t.sections;let s=o.length,n=0;for(s>0&&(r=[]);s-- >0;)r.push(this.renderSection(o[n++],t,i,e))}else if(t.content){const o=t.content;let s=o.length,n=0;for(s>0&&(r=[]);s-- >0;)r.push(this.renderBoxObject({boxObject:o[n++],row:i,visibleColumns:e},!0))}else e.length>0&&(r=this.renderBoxObject({boxObject:{column:e[0].name},row:i,visibleColumns:e}));const n=this.isSectionExpanded(i,t),a=!!t.columns,l={"box-section":!0,open:n,column:!a&&!t.horizontal,grid:a,titled:!!t.title,"last-child":!t.sections||0===t.sections.length},h=t.style||{};t.dim&&o&&(h.flex=`0 0 ${t.dim}`,h.overflow="hidden",o.horizontal?h.maxWidth=t.dim:h.maxHeight=t.dim),a&&(h["grid-template-columns"]=`repeat(${t.columns}, 1fr)`);let c=null;if(t.collapsible){l["collapse-section"]=!0;const o={content:!0};let e="";e=t.title?t.title:this.kupManager.language.translate(n?b.COLLAPSE:b.EXPAND),c=s("div",{class:l,style:h},s("div",{class:o},r),s("div",{class:"header",role:"button",onClick:o=>{o.stopPropagation(),this.toggleSectionExpand(i,t)}},s("div",{class:"header-content"},s("span",null,e),s(R,{resource:`${d.DROPDOWN}`,sizeX:"1.25em",sizeY:"1.25em",wrapperClass:n?"toggled":""}))))}else{const o=t.title?s("h3",null,t.title):null;c=s("div",{class:l,style:h},o,r)}return c}renderBoxObject({boxObject:t,row:o,visibleColumns:i},e){const r={"box-object":!0};let n=null,a=-1;for(let o=0;o<i.length;o++)if(i[o].name===t.column){a=o;break}a>=0?(n=i[a],i.splice(a,1)):e&&(n=this.data.columns.find((o=>o.name===t.column)));const l=o.cells[t.column];let h;return l&&!this.kupManager.objects.isEmptyKupObj(l.obj)&&(r["is-obj"]=!0,this.kupManager.debug.isDebug()&&(h=l.obj.t+"; "+l.obj.p+"; "+l.obj.k+";")),s("div",{"data-cell":l,"data-row":o,"data-column":t.column,class:r,style:{},title:h},l&&n?s(E,Object.assign({},{cell:l,column:n,component:this,editable:this.editableData,renderKup:!0,row:o,setSizes:!0,shape:t.shape})):s("span",null,t.value))}kanbanMode(){if(!this.kanban.columns||0===this.kanban.columns.length)return this.kupManager.debug.logMessage(this,"No columns to group by detected.",u.ERROR),{jsx:s("div",{id:"empty-data-message",class:"box-wrapper"},s("div",{ref:t=>this.rowsRefs.push(t)}),this.kupManager.language.translate(b.EMPTY_DATA)),style:{"grid-template-columns":"repeat(1, 1fr)"}};const t=[];if(this.kanban.labels)for(let o=0;o<this.kanban.labels.length;o++)t.push({labels:this.kanban.labels[o],nodes:[]});for(let o=0;o<this.rows.length;o++){let i=[];for(let t=0;t<this.kanban.columns.length;t++)try{i.push(this.rows[o].cells[this.kanban.columns[t]].value)}catch(t){this.kupManager.debug.logMessage(this,t,u.WARNING)}const e={found:!1,index:null};for(let o=0;o<t.length;o++){let s=t[o].labels,r=!0;for(let t=0;t<s.length;t++)if(i[t]!==s[t]){r=!1;break}if(r){e.found=!0,e.index=o;break}}e.found?t[e.index].nodes.push(this.renderRow(this.rows[o])):t.push({labels:i,nodes:[this.renderRow(this.rows[o])]})}const o=[];for(let i=0;i<t.length;i++){const e=t[i].labels,r={data:[]};for(let t=0;t<e.length;t++)r.data.push({value:e[t],id:e[t]});o.push(s("div",{class:"kanban-section"},s(z,Object.assign({},r)),t[i].nodes))}return{jsx:o,style:{"grid-template-columns":this.kanban.isStacked?"repeat(1fr)":this.kanban.size?`repeat(${Object.keys(t).length}, ${this.kanban.size})`:`repeat(${Object.keys(t).length}, 1fr)`}}}didLoadInteractables(){this.interactableTouch.push(this.boxContainer),this.kupManager.interact.on(this.boxContainer,x.TAP,(t=>{this.hold?this.hold=!1:2===t.button&&this.kupBoxContextMenu.emit({comp:this,id:this.rootElement.id,details:this.contextMenuHandler(t)})})),this.kupManager.interact.on(this.boxContainer,x.HOLD,(t=>{"pen"!==t.pointerType&&"touch"!==t.pointerType||(this.hold=!0,this.kupBoxContextMenu.emit({comp:this,id:this.rootElement.id,details:this.contextMenuHandler(t)}))}))}didRenderInteractables(){if(this.dragEnabled)for(let t=0;t<this.rowsRefs.length;t++){const o=this.rowsRefs[t],i=()=>{const t=this.rootElement.shadowRoot.querySelector(".box-object:hover");return{cell:t["data-cell"],column:p(this.visibleColumns,t.dataset.column),id:this.rootElement.id,multiple:this.multiSelection,row:t["data-row"],selectedRows:this.selectedRows}};o&&!this.interactableDrag.includes(o)&&(this.interactableDrag.push(o),this.kupManager.interact.draggable(o,{allowFrom:".box-object",cursorChecker:()=>null},{callback:i},f.BADGE))}if(this.dropEnabled){const t=()=>{const t=this.getEventDetails(this.rootElement.shadowRoot.querySelector(".box:hover"));return{cell:t.cell,column:t.column,id:this.rootElement.id,row:t.row}};this.interactableDrop.includes(this.sectionRef)||(this.interactableDrop.push(this.sectionRef),this.kupManager.interact.dropzone(this.sectionRef,{accept:`[${g}]`},{dispatcher:this.rootElement,type:w.BOX}));for(let o=0;o<this.rowsRefs.length;o++){const i=this.rowsRefs[o];i&&!this.interactableDrop.includes(i)&&(this.interactableDrop.push(i),this.kupManager.interact.dropzone(i,{accept:`[${g}]`},{callback:t,dispatcher:this.rootElement,type:w.BOX}))}}}componentWillLoad(){this.kupManager.debug.logLoad(this,!1),this.rowsPerPage&&(this.currentRowsPerPage=this.rowsPerPage),this.data&&this.data.rows&&this.currentRowsPerPage>this.data.rows.length&&(this.currentRowsPerPage=this.data.rows.length),this.kupManager.language.register(this),this.kupManager.theme.register(this),this.onDataChanged(),this.adjustPaginator(),document.querySelector(".header")?H(this,$,document.querySelector(".header").clientHeight,"f"):H(this,$,0,"f"),document.querySelector(".topbar")&&H(this,$,L(this,$,"f")+document.querySelector(".topbar").clientHeight,"f"),L(this,B,"m",F).call(this)}componentDidLoad(){if(this.handleAutomaticBoxSelection(),document.addEventListener("click",this.clickFunction.bind(this)),this.currentPage=this.pageSelected,this.multiSelection&&this.selectedRowsState){this.selectedRows=[];let t=this.selectedRowsState.split(";");this.selectedRows=this.data.rows.filter((o=>t.indexOf(o.id)>=0))}this.didLoadInteractables(),this.kupDidLoad.emit({comp:this,id:this.rootElement.id}),this.kupManager.debug.logLoad(this,!0)}componentWillRender(){this.kupManager.debug.logRender(this,!1)}componentDidRender(){const t=this.rootElement.shadowRoot;if(t){const o=t.querySelectorAll(".f-text-field");for(let t=0;t<o.length;t++)M(o[t])}this.checkScrollOnHover(),this.persistState(),this.didRenderInteractables(),L(this,B,"m",T).call(this),this.kupManager.debug.logRender(this,!0)}render(){const t=!("object"!=typeof this.kanban||null===this.kanban);let o=null;if(this.sortEnabled){const t=[{value:"",id:""},...this.visibleColumns.map((t=>({value:t.title,id:t.name,selected:t.name===this.sortBy})))];let i={label:this.kupManager.language.translate(b.SORT_BY),trailingIcon:!0};o=s("div",{id:"sort-panel"},s("kup-combobox",{data:{"kup-text-field":i,"kup-list":{data:t,selectable:!0}},initialValue:this.sortBy,"onkup-combobox-itemclick":t=>this.onSortChange(t)}))}let i=null;this.globalFilter&&(i=s("div",{id:"global-filter"},s("kup-text-field",{fullWidth:!0,label:this.kupManager.language.translate(m.SEARCH),icon:d.SEARCH,initialValue:this.globalFilterValue,"onkup-textfield-input":t=>{window.clearTimeout(this.globalFilterTimeout),this.globalFilterTimeout=window.setTimeout((()=>this.onGlobalFilterChange(t)),600)}})));let e=null;this.pagination&&(e=s(A,{id:top?"top-paginator":"bottom-paginator",currentPage:this.currentPage,max:this.filteredRows.length,mode:P.SIMPLE,perPage:this.currentRowsPerPage?this.currentRowsPerPage:this.rowsPerPage,onPageChange:t=>this.handlePageChange(t.detail.value),onRowsChange:t=>this.handleRowsPerPageChange(t.detail.value)}));let n=null,a={};if(0===this.rows.length)n=s("div",{id:"empty-data-message",class:"box-wrapper"},s("div",{class:"box",ref:t=>this.rowsRefs.push(t)},this.kupManager.language.translate(b.EMPTY_DATA))),a={"grid-template-columns":"repeat(1, 1fr)"};else if(t){const t=this.kanbanMode();n=t.jsx,a=t.style}else{a={"grid-template-columns":`repeat(${this.columns}, 1fr)`};const t=this.rows;let o=t.length,i=0;for(n=[];o-- >0;)n.push(this.renderRow(t[i++]))}return s(r,null,s("style",null,this.kupManager.theme.setKupStyle(this.rootElement)),s("div",{id:I},s("div",{class:"box-component",ref:t=>this.sectionRef=t},o,i,e,s("div",{class:t?"is-kanban":"",id:"box-container",style:a,onContextMenu:t=>{t.preventDefault()},ref:t=>this.boxContainer=t},n))))}disconnectedCallback(){this.kupManager.interact.unregister(this.interactableDrag.concat(this.interactableDrop)),this.kupManager.language.unregister(this),this.kupManager.theme.unregister(this),this.scrollOnHover&&this.kupManager.scrollOnHover.unregister(this.boxContainer),document.removeEventListener("click",this.clickFunction.bind(this)),this.kupDidUnload.emit({comp:this,id:this.rootElement.id})}get rootElement(){return n(this)}static get watchers(){return{rowsPerPage:["rowsPerPageHandler","recalculateRows"],globalFilterValue:["recalculateRows"],sortBy:["recalculateRows"],pagination:["recalculateRows"],currentPage:["recalculateRows"],currentRowsPerPage:["recalculateRows"],data:["onDataChanged"],layout:["onLayoutChanged"],selectBox:["onSelectBoxChanged"]}}};D=new WeakMap,W=new WeakMap,$=new WeakMap,B=new WeakSet,T=function(){this.lazyLoadRows&&this.currentRowsPerPage<this.data.rows.length&&L(this,D,"f").observe(L(this,W,"f")[L(this,W,"f").length-1])},F=function(){const t={threshold:0,rootMargin:"-"+L(this,$,"f")+"px 0px 0px 0px"};H(this,D,new IntersectionObserver((t=>{t.forEach((t=>{if(t.isIntersecting){this.kupManager.debug.logMessage(this,"Last row entering the viewport, loading more elements.");const o=this.data.rows.length-this.currentRowsPerPage;this.currentRowsPerPage+=o<10?o:10,t.target.classList.remove("last-row"),L(this,D,"f").unobserve(t.target)}}))}),t),"f")},G.style=":host{--kup_box_background_color:var(\n --kup-box-background-color,\n var(--kup-background-color)\n );--kup_box_color:var(--kup-box-color, var(--kup-text-color));--kup_box_font_family:var(--kup-box-font-family, var(--kup-font-family));--kup_box_font_size:var(--kup-box-font-size, var(--kup-font-size));--kup_box_grid_gap:var(--kup-box-grid-gap, 1em);--kup_box_hover_box_shadow:var(\n --kup-box-hover-box-shadow,\n 0px 0px 7.5px 0px rgba(128, 128, 128, 0.5)\n );--kup_box_primary_color_rgb:var(\n --kup-box-primary-color-rgb,\n var(--kup-primary-color-rgb)\n );--kup_box_transition:var(--kup-box-transition, 0.25s);display:block;font-family:var(--kup_box_font_family);font-size:var(--kup_box_font_size)}.box-component{background:var(--kup_box_background_color);transition:border var(--kup_box_transition) ease}.box-component[kup-drag-over]{position:relative;border:3px dashed var(--kup-border-color)}#box-container{display:grid;grid-gap:var(--kup_box_grid_gap);color:var(--kup_box_color);overflow:auto}#box-container.is-kanban .kanban-section{overflow:auto}#box-container.is-kanban .box-wrapper{padding-top:1em}#box-container.is-kanban .box-wrapper .box{overflow:auto}#box-container *{box-sizing:border-box}#box-container .box-wrapper{display:flex;align-items:center}#box-container .box-wrapper .box{flex-grow:1;cursor:pointer;position:relative;display:flex;transition:background-color var(--kup_box_transition) ease, box-shadow var(--kup_box_transition) ease, border var(--kup_box_transition) ease}#box-container .box-wrapper .box.draggable{touch-action:none;user-select:none}#box-container .box-wrapper .box.column{flex-direction:column}#box-container .box-wrapper .box:hover{box-shadow:var(--kup_box_hover_box_shadow)}#box-container .box-wrapper .box.selected{background-color:rgba(var(--kup_box_primary_color_rgb), 0.175)}#box-container .box-wrapper .box.selected .box-section.titled>h3{background-color:transparent}#box-container .box-wrapper .box[kup-draggable]{opacity:0.5}#box-container .box-wrapper .box[kup-drag-over]{border:3px dashed var(--kup-border-color);position:relative;z-index:2}#box-container .box-wrapper .box .box-section{display:flex;flex-direction:row;flex:1 1 1%;flex-wrap:wrap}#box-container .box-wrapper .box .box-section.column{flex-direction:column;justify-content:center;flex-wrap:unset}#box-container .box-wrapper .box .box-section.column>.box-section{flex:0 0 auto}#box-container .box-wrapper .box .box-section.grid{display:grid}#box-container .box-wrapper .box .box-section .box-object{min-height:16px}#box-container .box-wrapper .box .box-section .box-object img{height:auto}#box-container .box-wrapper .box .box-section.collapse-section .header{border-top:1px solid var(--kup-border-color);color:rgba(var(--kup-text-color-rgb), 0.75);display:flex;justify-content:space-around;width:100%}#box-container .box-wrapper .box .box-section.collapse-section .header .header-content{margin:0.5em;display:flex;align-items:center}#box-container .box-wrapper .box .box-section.collapse-section .header .header-content .f-image{transition:transform 0.15s}#box-container .box-wrapper .box .box-section.collapse-section .header .header-content .f-image.toggled{transform:rotate(-180deg)}#box-container .box-wrapper .box .box-section.collapse-section .header .header-content .kup-icon.kup-dropdown-icon{margin:0;-webkit-mask:var(--kup-dropdown-icon);mask:var(--kup-dropdown-icon)}#box-container .box-wrapper .box .box-section.collapse-section .content{display:none;width:100%}#box-container .box-wrapper .box .box-section.collapse-section.open .content{display:block}#box-container .box-wrapper .box .box-section.titled{border:1px solid var(--kup-border-color);padding-top:5px;position:relative;margin:10px}#box-container .box-wrapper .box .box-section.titled>h3{background:var(--kup-background-color);font-size:calc(var(--kup-font-size) * 1.15);position:absolute;margin:0px;padding:0 8px;top:-11px;left:5px;transition:background-color 0.25s ease}#box-container .box-wrapper .box .box-selection{position:absolute;top:0.5em;right:0.5em;z-index:1}#box-container .box-wrapper .row-actions-wrapper .row-actions-toggler{position:relative;width:24px;height:24px;margin-left:3px}#box-container .box-wrapper .row-actions-wrapper .row-actions-toggler svg{cursor:pointer;opacity:0;fill:var(--kup-text-color);transition:opacity 500ms ease-out}#box-container .box-wrapper .row-actions-wrapper .row-actions-toggler .row-action-menu{background:var(--kup-background-color);border:1px solid var(--kup-border-color);box-shadow:0px 0px 7.5px 0px rgba(128, 128, 128, 0.5);position:absolute;top:0;right:24px;display:none;z-index:10}#box-container .box-wrapper .row-actions-wrapper .row-actions-toggler .row-action-menu ul{list-style-type:none;margin:0;padding:0}#box-container .box-wrapper .row-actions-wrapper .row-actions-toggler .row-action-menu ul>li{cursor:pointer;white-space:nowrap;padding:0 12px;display:flex;align-items:center;line-height:30px}#box-container .box-wrapper .row-actions-wrapper .row-actions-toggler .row-action-menu ul>li:not(:last-child){border-bottom:1px solid var(--kup-border-color)}#box-container .box-wrapper .row-actions-wrapper .row-actions-toggler .row-action-menu.open{display:block}#box-container .box-wrapper:hover .row-actions-wrapper .row-actions-toggler svg{opacity:1}#sort-panel,#global-filter{margin-bottom:1em}:host(.kup-center-aligned) #kup-component .box-section{text-align:center}:host(.kup-center-aligned) #kup-component .box-section .f-cell{justify-content:center;margin:auto;text-align:center}:host(.kup-center-aligned) #kup-component .box-section .f-cell .f-cell__content{justify-content:center;margin:auto;text-align:center}:host(.kup-center-aligned) #kup-component .box-section .f-cell img{margin:auto}:host(.kup-right-aligned) #kup-component .box-section{text-align:right}:host(.kup-right-aligned) #kup-component .box-section .f-cell{justify-content:flex-end;margin-left:auto;margin-right:0;text-align:right}:host(.kup-right-aligned) #kup-component .box-section .f-cell .f-cell__content{justify-content:flex-end;margin-left:auto;margin-right:0;text-align:right}:host(.kup-right-aligned) #kup-component .box-section .f-cell img{margin-left:auto;margin-right:0}:host(.kup-top-aligned) #box-container .box-wrapper .box .box-section .column{justify-content:flex-start}:host(.kup-bottom-aligned) #box-container .box-wrapper .box .box-section .column{justify-content:flex-end}:host(:not(.kup-borderless)) .box{border:1px solid var(--kup-border-color)}:host(.kup-flat-on-hover) #box-container .box-wrapper .box:hover{box-shadow:none}:host(.kup-shaped) .box{border-radius:10px}:host(.kup-round) .box{border-radius:25px}:host(.kup-dashed-sections) .box-section{border:2px dashed var(--kup-text-color)}:host(:not(.kup-paddingless)) #box-container .box{padding:3px}:host(:not(.kup-paddingless)) #box-container .box .box-section .box-object{padding:1px 4px}:host(:not(.kup-paddingless)) #box-container .box .box-section.last-child{margin:3px 4px}:host(.kup-danger){--kup-box-primary-color-rgb:var(--kup-danger-color-rgb)}:host(.kup-info){--kup-box-primary-color-rgb:var(--kup-info-color-rgb)}:host(.kup-secondary){--kup-box-primary-color-rgb:var(--kup-secondary-color-rgb)}:host(.kup-success){--kup-box-primary-color-rgb:var(--kup-success-color-rgb)}:host(.kup-warning){--kup-box-primary-color-rgb:var(--kup-warning-color-rgb)}";export{G as kup_box}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as t,a as n,b as i
|
|
1
|
+
import{_ as t,a as n,b as i,c as e,e as r,d as u,f as s,M as c,m as o,g as f}from"./p-6507e9eb.js";
|
|
2
2
|
/**
|
|
3
3
|
* @license
|
|
4
4
|
* Copyright 2016 Google Inc.
|
|
@@ -20,7 +20,7 @@ import{_ as t,a as n,b as i}from"./p-7f59211b.js";import{a as e,b as r,e as u,c
|
|
|
20
20
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
21
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
22
22
|
* THE SOFTWARE.
|
|
23
|
-
*/var a={LABEL_FLOAT_ABOVE:"mdc-floating-label--float-above",LABEL_REQUIRED:"mdc-floating-label--required",LABEL_SHAKE:"mdc-floating-label--shake",ROOT:"mdc-floating-label"},h=function(i){function e(t){var r=i.call(this,n(n({},e.defaultAdapter),t))||this;return r.shakeAnimationEndHandler=function(){r.handleShakeAnimationEnd()},r}return t(e,i),Object.defineProperty(e,"cssClasses",{get:function(){return a},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},getWidth:function(){return 0},registerInteractionHandler:function(){},deregisterInteractionHandler:function(){}}},enumerable:!1,configurable:!0}),e.prototype.init=function(){this.adapter.registerInteractionHandler("animationend",this.shakeAnimationEndHandler)},e.prototype.destroy=function(){this.adapter.deregisterInteractionHandler("animationend",this.shakeAnimationEndHandler)},e.prototype.getWidth=function(){return this.adapter.getWidth()},e.prototype.shake=function(t){var n=e.cssClasses.LABEL_SHAKE;t?this.adapter.addClass(n):this.adapter.removeClass(n)},e.prototype.float=function(t){var n=e.cssClasses,i=n.LABEL_FLOAT_ABOVE,r=n.LABEL_SHAKE;t?this.adapter.addClass(i):(this.adapter.removeClass(i),this.adapter.removeClass(r))},e.prototype.setRequired=function(t){var n=e.cssClasses.LABEL_REQUIRED;t?this.adapter.addClass(n):this.adapter.removeClass(n)},e.prototype.handleShakeAnimationEnd=function(){this.adapter.removeClass(e.cssClasses.LABEL_SHAKE)},e}(e),l=function(n){function i(){return null!==n&&n.apply(this,arguments)||this}return t(i,n),i.attachTo=function(t){return new i(t)},i.prototype.shake=function(t){this.foundation.shake(t)},i.prototype.float=function(t){this.foundation.float(t)},i.prototype.setRequired=function(t){this.foundation.setRequired(t)},i.prototype.getWidth=function(){return this.foundation.getWidth()},i.prototype.getDefaultFoundation=function(){var t=this;return new h({addClass:function(n){return t.root.classList.add(n)},removeClass:function(n){return t.root.classList.remove(n)},getWidth:function(){return u(t.root)},registerInteractionHandler:function(n,i){return t.listen(n,i)},deregisterInteractionHandler:function(n,i){return t.unlisten(n,i)}})},i}(r),d={LINE_RIPPLE_ACTIVE:"mdc-line-ripple--active",LINE_RIPPLE_DEACTIVATING:"mdc-line-ripple--deactivating"},b=function(i){function e(t){var r=i.call(this,n(n({},e.defaultAdapter),t))||this;return r.transitionEndHandler=function(t){r.handleTransitionEnd(t)},r}return t(e,i),Object.defineProperty(e,"cssClasses",{get:function(){return d},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},setStyle:function(){},registerEventHandler:function(){},deregisterEventHandler:function(){}}},enumerable:!1,configurable:!0}),e.prototype.init=function(){this.adapter.registerEventHandler("transitionend",this.transitionEndHandler)},e.prototype.destroy=function(){this.adapter.deregisterEventHandler("transitionend",this.transitionEndHandler)},e.prototype.activate=function(){this.adapter.removeClass(d.LINE_RIPPLE_DEACTIVATING),this.adapter.addClass(d.LINE_RIPPLE_ACTIVE)},e.prototype.setRippleCenter=function(t){this.adapter.setStyle("transform-origin",t+"px center")},e.prototype.deactivate=function(){this.adapter.addClass(d.LINE_RIPPLE_DEACTIVATING)},e.prototype.handleTransitionEnd=function(t){var n=this.adapter.hasClass(d.LINE_RIPPLE_DEACTIVATING);"opacity"===t.propertyName&&n&&(this.adapter.removeClass(d.LINE_RIPPLE_ACTIVE),this.adapter.removeClass(d.LINE_RIPPLE_DEACTIVATING))},e}(e),g=function(n){function i(){return null!==n&&n.apply(this,arguments)||this}return t(i,n),i.attachTo=function(t){return new i(t)},i.prototype.activate=function(){this.foundation.activate()},i.prototype.deactivate=function(){this.foundation.deactivate()},i.prototype.setRippleCenter=function(t){this.foundation.setRippleCenter(t)},i.prototype.getDefaultFoundation=function(){var t=this;return new b({addClass:function(n){return t.root.classList.add(n)},removeClass:function(n){return t.root.classList.remove(n)},hasClass:function(n){return t.root.classList.contains(n)},setStyle:function(n,i){return t.root.style.setProperty(n,i)},registerEventHandler:function(n,i){return t.listen(n,i)},deregisterEventHandler:function(n,i){return t.unlisten(n,i)}})},i}(r),m={NOTCH_ELEMENT_SELECTOR:".mdc-notched-outline__notch"},v={NOTCH_ELEMENT_PADDING:8},O={NO_LABEL:"mdc-notched-outline--no-label",OUTLINE_NOTCHED:"mdc-notched-outline--notched",OUTLINE_UPGRADED:"mdc-notched-outline--upgraded"},E=function(i){function e(t){return i.call(this,n(n({},e.defaultAdapter),t))||this}return t(e,i),Object.defineProperty(e,"strings",{get:function(){return m},enumerable:!1,configurable:!0}),Object.defineProperty(e,"cssClasses",{get:function(){return O},enumerable:!1,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return v},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},setNotchWidthProperty:function(){},removeNotchWidthProperty:function(){}}},enumerable:!1,configurable:!0}),e.prototype.notch=function(t){var n=e.cssClasses.OUTLINE_NOTCHED;t>0&&(t+=v.NOTCH_ELEMENT_PADDING),this.adapter.setNotchWidthProperty(t),this.adapter.addClass(n)},e.prototype.closeNotch=function(){this.adapter.removeClass(e.cssClasses.OUTLINE_NOTCHED),this.adapter.removeNotchWidthProperty()},e}(e),I=function(n){function i(){return null!==n&&n.apply(this,arguments)||this}return t(i,n),i.attachTo=function(t){return new i(t)},i.prototype.initialSyncWithDOM=function(){this.notchElement=this.root.querySelector(m.NOTCH_ELEMENT_SELECTOR);var t=this.root.querySelector("."+h.cssClasses.ROOT);t?(t.style.transitionDuration="0s",this.root.classList.add(O.OUTLINE_UPGRADED),requestAnimationFrame((function(){t.style.transitionDuration=""}))):this.root.classList.add(O.NO_LABEL)},i.prototype.notch=function(t){this.foundation.notch(t)},i.prototype.closeNotch=function(){this.foundation.closeNotch()},i.prototype.getDefaultFoundation=function(){var t=this;return new E({addClass:function(n){return t.root.classList.add(n)},removeClass:function(n){return t.root.classList.remove(n)},setNotchWidthProperty:function(n){t.notchElement.style.setProperty("width",n+"px")},removeNotchWidthProperty:function(){t.notchElement.style.removeProperty("width")}})},i}(r),p={ROOT:"mdc-text-field-character-counter"},L={ROOT_SELECTOR:"."+p.ROOT},C=function(i){function e(t){return i.call(this,n(n({},e.defaultAdapter),t))||this}return t(e,i),Object.defineProperty(e,"cssClasses",{get:function(){return p},enumerable:!1,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return L},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{setContent:function(){}}},enumerable:!1,configurable:!0}),e.prototype.setCounterValue=function(t,n){t=Math.min(t,n),this.adapter.setContent(t+" / "+n)},e}(e),A=function(n){function i(){return null!==n&&n.apply(this,arguments)||this}return t(i,n),i.attachTo=function(t){return new i(t)},Object.defineProperty(i.prototype,"foundationForTextField",{get:function(){return this.foundation},enumerable:!1,configurable:!0}),i.prototype.getDefaultFoundation=function(){var t=this;return new C({setContent:function(n){t.root.textContent=n}})},i}(r),T={ARIA_CONTROLS:"aria-controls",ARIA_DESCRIBEDBY:"aria-describedby",INPUT_SELECTOR:".mdc-text-field__input",LABEL_SELECTOR:".mdc-floating-label",LEADING_ICON_SELECTOR:".mdc-text-field__icon--leading",LINE_RIPPLE_SELECTOR:".mdc-line-ripple",OUTLINE_SELECTOR:".mdc-notched-outline",PREFIX_SELECTOR:".mdc-text-field__affix--prefix",SUFFIX_SELECTOR:".mdc-text-field__affix--suffix",TRAILING_ICON_SELECTOR:".mdc-text-field__icon--trailing"},x={DISABLED:"mdc-text-field--disabled",FOCUSED:"mdc-text-field--focused",HELPER_LINE:"mdc-text-field-helper-line",INVALID:"mdc-text-field--invalid",LABEL_FLOATING:"mdc-text-field--label-floating",NO_LABEL:"mdc-text-field--no-label",OUTLINED:"mdc-text-field--outlined",ROOT:"mdc-text-field",TEXTAREA:"mdc-text-field--textarea",WITH_LEADING_ICON:"mdc-text-field--with-leading-icon",WITH_TRAILING_ICON:"mdc-text-field--with-trailing-icon",WITH_INTERNAL_COUNTER:"mdc-text-field--with-internal-counter"},_={LABEL_SCALE:.75},R=["pattern","min","max","required","step","minlength","maxlength"],j=["color","date","datetime-local","month","range","time","week"],w=["mousedown","touchstart"],N=["click","keydown"],H=function(e){function r(t,i){void 0===i&&(i={});var u=e.call(this,n(n({},r.defaultAdapter),t))||this;return u.isFocused=!1,u.receivedUserInput=!1,u.valid=!0,u.useNativeValidation=!0,u.validateOnValueChange=!0,u.helperText=i.helperText,u.characterCounter=i.characterCounter,u.leadingIcon=i.leadingIcon,u.trailingIcon=i.trailingIcon,u.inputFocusHandler=function(){u.activateFocus()},u.inputBlurHandler=function(){u.deactivateFocus()},u.inputInputHandler=function(){u.handleInput()},u.setPointerXOffset=function(t){u.setTransformOrigin(t)},u.textFieldInteractionHandler=function(){u.handleTextFieldInteraction()},u.validationAttributeChangeHandler=function(t){u.handleValidationAttributeChange(t)},u}return t(r,e),Object.defineProperty(r,"cssClasses",{get:function(){return x},enumerable:!1,configurable:!0}),Object.defineProperty(r,"strings",{get:function(){return T},enumerable:!1,configurable:!0}),Object.defineProperty(r,"numbers",{get:function(){return _},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"shouldAlwaysFloat",{get:function(){var t=this.getNativeInput().type;return j.indexOf(t)>=0},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"shouldFloat",{get:function(){return this.shouldAlwaysFloat||this.isFocused||!!this.getValue()||this.isBadInput()},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"shouldShake",{get:function(){return!this.isFocused&&!this.isValid()&&!!this.getValue()},enumerable:!1,configurable:!0}),Object.defineProperty(r,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!0},setInputAttr:function(){},removeInputAttr:function(){},registerTextFieldInteractionHandler:function(){},deregisterTextFieldInteractionHandler:function(){},registerInputInteractionHandler:function(){},deregisterInputInteractionHandler:function(){},registerValidationAttributeChangeHandler:function(){return new MutationObserver((function(){}))},deregisterValidationAttributeChangeHandler:function(){},getNativeInput:function(){return null},isFocused:function(){return!1},activateLineRipple:function(){},deactivateLineRipple:function(){},setLineRippleTransformOrigin:function(){},shakeLabel:function(){},floatLabel:function(){},setLabelRequired:function(){},hasLabel:function(){return!1},getLabelWidth:function(){return 0},hasOutline:function(){return!1},notchOutline:function(){},closeOutline:function(){}}},enumerable:!1,configurable:!0}),r.prototype.init=function(){var t,n,e,r;this.adapter.hasLabel()&&this.getNativeInput().required&&this.adapter.setLabelRequired(!0),this.adapter.isFocused()?this.inputFocusHandler():this.adapter.hasLabel()&&this.shouldFloat&&(this.notchOutline(!0),this.adapter.floatLabel(!0),this.styleFloating(!0)),this.adapter.registerInputInteractionHandler("focus",this.inputFocusHandler),this.adapter.registerInputInteractionHandler("blur",this.inputBlurHandler),this.adapter.registerInputInteractionHandler("input",this.inputInputHandler);try{for(var u=i(w),s=u.next();!s.done;s=u.next())this.adapter.registerInputInteractionHandler(s.value,this.setPointerXOffset)}catch(n){t={error:n}}finally{try{s&&!s.done&&(n=u.return)&&n.call(u)}finally{if(t)throw t.error}}try{for(var o=i(N),c=o.next();!c.done;c=o.next())this.adapter.registerTextFieldInteractionHandler(c.value,this.textFieldInteractionHandler)}catch(t){e={error:t}}finally{try{c&&!c.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}this.validationObserver=this.adapter.registerValidationAttributeChangeHandler(this.validationAttributeChangeHandler),this.setcharacterCounter(this.getValue().length)},r.prototype.destroy=function(){var t,n,e,r;this.adapter.deregisterInputInteractionHandler("focus",this.inputFocusHandler),this.adapter.deregisterInputInteractionHandler("blur",this.inputBlurHandler),this.adapter.deregisterInputInteractionHandler("input",this.inputInputHandler);try{for(var u=i(w),s=u.next();!s.done;s=u.next())this.adapter.deregisterInputInteractionHandler(s.value,this.setPointerXOffset)}catch(n){t={error:n}}finally{try{s&&!s.done&&(n=u.return)&&n.call(u)}finally{if(t)throw t.error}}try{for(var o=i(N),c=o.next();!c.done;c=o.next())this.adapter.deregisterTextFieldInteractionHandler(c.value,this.textFieldInteractionHandler)}catch(t){e={error:t}}finally{try{c&&!c.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}this.adapter.deregisterValidationAttributeChangeHandler(this.validationObserver)},r.prototype.handleTextFieldInteraction=function(){var t=this.adapter.getNativeInput();t&&t.disabled||(this.receivedUserInput=!0)},r.prototype.handleValidationAttributeChange=function(t){var n=this;t.some((function(t){return R.indexOf(t)>-1&&(n.styleValidity(!0),n.adapter.setLabelRequired(n.getNativeInput().required),!0)})),t.indexOf("maxlength")>-1&&this.setcharacterCounter(this.getValue().length)},r.prototype.notchOutline=function(t){if(this.adapter.hasOutline()&&this.adapter.hasLabel())if(t){var n=this.adapter.getLabelWidth()*_.LABEL_SCALE;this.adapter.notchOutline(n)}else this.adapter.closeOutline()},r.prototype.activateFocus=function(){this.isFocused=!0,this.styleFocused(this.isFocused),this.adapter.activateLineRipple(),this.adapter.hasLabel()&&(this.notchOutline(this.shouldFloat),this.adapter.floatLabel(this.shouldFloat),this.styleFloating(this.shouldFloat),this.adapter.shakeLabel(this.shouldShake)),!this.helperText||!this.helperText.isPersistent()&&this.helperText.isValidation()&&this.valid||this.helperText.showToScreenReader()},r.prototype.setTransformOrigin=function(t){if(!this.isDisabled()&&!this.adapter.hasOutline()){var n=t.touches,i=n?n[0]:t,e=i.target.getBoundingClientRect();this.adapter.setLineRippleTransformOrigin(i.clientX-e.left)}},r.prototype.handleInput=function(){this.autoCompleteFocus(),this.setcharacterCounter(this.getValue().length)},r.prototype.autoCompleteFocus=function(){this.receivedUserInput||this.activateFocus()},r.prototype.deactivateFocus=function(){this.isFocused=!1,this.adapter.deactivateLineRipple();var t=this.isValid();this.styleValidity(t),this.styleFocused(this.isFocused),this.adapter.hasLabel()&&(this.notchOutline(this.shouldFloat),this.adapter.floatLabel(this.shouldFloat),this.styleFloating(this.shouldFloat),this.adapter.shakeLabel(this.shouldShake)),this.shouldFloat||(this.receivedUserInput=!1)},r.prototype.getValue=function(){return this.getNativeInput().value},r.prototype.setValue=function(t){if(this.getValue()!==t&&(this.getNativeInput().value=t),this.setcharacterCounter(t.length),this.validateOnValueChange){var n=this.isValid();this.styleValidity(n)}this.adapter.hasLabel()&&(this.notchOutline(this.shouldFloat),this.adapter.floatLabel(this.shouldFloat),this.styleFloating(this.shouldFloat),this.validateOnValueChange&&this.adapter.shakeLabel(this.shouldShake))},r.prototype.isValid=function(){return this.useNativeValidation?this.isNativeInputValid():this.valid},r.prototype.setValid=function(t){this.valid=t,this.styleValidity(t);var n=!t&&!this.isFocused&&!!this.getValue();this.adapter.hasLabel()&&this.adapter.shakeLabel(n)},r.prototype.setValidateOnValueChange=function(t){this.validateOnValueChange=t},r.prototype.getValidateOnValueChange=function(){return this.validateOnValueChange},r.prototype.setUseNativeValidation=function(t){this.useNativeValidation=t},r.prototype.isDisabled=function(){return this.getNativeInput().disabled},r.prototype.setDisabled=function(t){this.getNativeInput().disabled=t,this.styleDisabled(t)},r.prototype.setHelperTextContent=function(t){this.helperText&&this.helperText.setContent(t)},r.prototype.setLeadingIconAriaLabel=function(t){this.leadingIcon&&this.leadingIcon.setAriaLabel(t)},r.prototype.setLeadingIconContent=function(t){this.leadingIcon&&this.leadingIcon.setContent(t)},r.prototype.setTrailingIconAriaLabel=function(t){this.trailingIcon&&this.trailingIcon.setAriaLabel(t)},r.prototype.setTrailingIconContent=function(t){this.trailingIcon&&this.trailingIcon.setContent(t)},r.prototype.setcharacterCounter=function(t){if(this.characterCounter){var n=this.getNativeInput().maxLength;if(-1===n)throw new Error("MDCTextFieldFoundation: Expected maxlength html property on text input or textarea.");this.characterCounter.setCounterValue(t,n)}},r.prototype.isBadInput=function(){return this.getNativeInput().validity.badInput||!1},r.prototype.isNativeInputValid=function(){return this.getNativeInput().validity.valid},r.prototype.styleValidity=function(t){var n=r.cssClasses.INVALID;if(t?this.adapter.removeClass(n):this.adapter.addClass(n),this.helperText){if(this.helperText.setValidity(t),!this.helperText.isValidation())return;var i=this.helperText.isVisible(),e=this.helperText.getId();i&&e?this.adapter.setInputAttr(T.ARIA_DESCRIBEDBY,e):this.adapter.removeInputAttr(T.ARIA_DESCRIBEDBY)}},r.prototype.styleFocused=function(t){var n=r.cssClasses.FOCUSED;t?this.adapter.addClass(n):this.adapter.removeClass(n)},r.prototype.styleDisabled=function(t){var n=r.cssClasses,i=n.DISABLED,e=n.INVALID;t?(this.adapter.addClass(i),this.adapter.removeClass(e)):this.adapter.removeClass(i),this.leadingIcon&&this.leadingIcon.setDisabled(t),this.trailingIcon&&this.trailingIcon.setDisabled(t)},r.prototype.styleFloating=function(t){var n=r.cssClasses.LABEL_FLOATING;t?this.adapter.addClass(n):this.adapter.removeClass(n)},r.prototype.getNativeInput=function(){return(this.adapter?this.adapter.getNativeInput():null)||{disabled:!1,maxLength:-1,required:!1,type:"input",validity:{badInput:!1,valid:!0},value:""}},r}(e),y={HELPER_TEXT_PERSISTENT:"mdc-text-field-helper-text--persistent",HELPER_TEXT_VALIDATION_MSG:"mdc-text-field-helper-text--validation-msg",ROOT:"mdc-text-field-helper-text"},F={ARIA_HIDDEN:"aria-hidden",ROLE:"role",ROOT_SELECTOR:"."+y.ROOT},S=function(i){function e(t){return i.call(this,n(n({},e.defaultAdapter),t))||this}return t(e,i),Object.defineProperty(e,"cssClasses",{get:function(){return y},enumerable:!1,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return F},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},getAttr:function(){return null},setAttr:function(){},removeAttr:function(){},setContent:function(){}}},enumerable:!1,configurable:!0}),e.prototype.getId=function(){return this.adapter.getAttr("id")},e.prototype.isVisible=function(){return"true"!==this.adapter.getAttr(F.ARIA_HIDDEN)},e.prototype.setContent=function(t){this.adapter.setContent(t)},e.prototype.isPersistent=function(){return this.adapter.hasClass(y.HELPER_TEXT_PERSISTENT)},e.prototype.setPersistent=function(t){t?this.adapter.addClass(y.HELPER_TEXT_PERSISTENT):this.adapter.removeClass(y.HELPER_TEXT_PERSISTENT)},e.prototype.isValidation=function(){return this.adapter.hasClass(y.HELPER_TEXT_VALIDATION_MSG)},e.prototype.setValidation=function(t){t?this.adapter.addClass(y.HELPER_TEXT_VALIDATION_MSG):this.adapter.removeClass(y.HELPER_TEXT_VALIDATION_MSG)},e.prototype.showToScreenReader=function(){this.adapter.removeAttr(F.ARIA_HIDDEN)},e.prototype.setValidity=function(t){var n=this.adapter.hasClass(y.HELPER_TEXT_PERSISTENT),i=this.adapter.hasClass(y.HELPER_TEXT_VALIDATION_MSG)&&!t;i?(this.showToScreenReader(),"alert"===this.adapter.getAttr(F.ROLE)?this.refreshAlertRole():this.adapter.setAttr(F.ROLE,"alert")):this.adapter.removeAttr(F.ROLE),n||i||this.hide()},e.prototype.hide=function(){this.adapter.setAttr(F.ARIA_HIDDEN,"true")},e.prototype.refreshAlertRole=function(){var t=this;this.adapter.removeAttr(F.ROLE),requestAnimationFrame((function(){t.adapter.setAttr(F.ROLE,"alert")}))},e}(e),D=function(n){function i(){return null!==n&&n.apply(this,arguments)||this}return t(i,n),i.attachTo=function(t){return new i(t)},Object.defineProperty(i.prototype,"foundationForTextField",{get:function(){return this.foundation},enumerable:!1,configurable:!0}),i.prototype.getDefaultFoundation=function(){var t=this;return new S({addClass:function(n){return t.root.classList.add(n)},removeClass:function(n){return t.root.classList.remove(n)},hasClass:function(n){return t.root.classList.contains(n)},getAttr:function(n){return t.root.getAttribute(n)},setAttr:function(n,i){return t.root.setAttribute(n,i)},removeAttr:function(n){return t.root.removeAttribute(n)},setContent:function(n){t.root.textContent=n}})},i}(r),P={ICON_EVENT:"MDCTextField:icon",ICON_ROLE:"button"},B={ROOT:"mdc-text-field__icon"},k=["click","keydown"],V=function(e){function r(t){var i=e.call(this,n(n({},r.defaultAdapter),t))||this;return i.savedTabIndex=null,i.interactionHandler=function(t){i.handleInteraction(t)},i}return t(r,e),Object.defineProperty(r,"strings",{get:function(){return P},enumerable:!1,configurable:!0}),Object.defineProperty(r,"cssClasses",{get:function(){return B},enumerable:!1,configurable:!0}),Object.defineProperty(r,"defaultAdapter",{get:function(){return{getAttr:function(){return null},setAttr:function(){},removeAttr:function(){},setContent:function(){},registerInteractionHandler:function(){},deregisterInteractionHandler:function(){},notifyIconAction:function(){}}},enumerable:!1,configurable:!0}),r.prototype.init=function(){var t,n;this.savedTabIndex=this.adapter.getAttr("tabindex");try{for(var e=i(k),r=e.next();!r.done;r=e.next())this.adapter.registerInteractionHandler(r.value,this.interactionHandler)}catch(n){t={error:n}}finally{try{r&&!r.done&&(n=e.return)&&n.call(e)}finally{if(t)throw t.error}}},r.prototype.destroy=function(){var t,n;try{for(var e=i(k),r=e.next();!r.done;r=e.next())this.adapter.deregisterInteractionHandler(r.value,this.interactionHandler)}catch(n){t={error:n}}finally{try{r&&!r.done&&(n=e.return)&&n.call(e)}finally{if(t)throw t.error}}},r.prototype.setDisabled=function(t){this.savedTabIndex&&(t?(this.adapter.setAttr("tabindex","-1"),this.adapter.removeAttr("role")):(this.adapter.setAttr("tabindex",this.savedTabIndex),this.adapter.setAttr("role",P.ICON_ROLE)))},r.prototype.setAriaLabel=function(t){this.adapter.setAttr("aria-label",t)},r.prototype.setContent=function(t){this.adapter.setContent(t)},r.prototype.handleInteraction=function(t){("click"===t.type||"Enter"===t.key||13===t.keyCode)&&(t.preventDefault(),this.adapter.notifyIconAction())},r}(e),W=function(n){function i(){return null!==n&&n.apply(this,arguments)||this}return t(i,n),i.attachTo=function(t){return new i(t)},Object.defineProperty(i.prototype,"foundationForTextField",{get:function(){return this.foundation},enumerable:!1,configurable:!0}),i.prototype.getDefaultFoundation=function(){var t=this;return new V({getAttr:function(n){return t.root.getAttribute(n)},setAttr:function(n,i){return t.root.setAttribute(n,i)},removeAttr:function(n){return t.root.removeAttribute(n)},setContent:function(n){t.root.textContent=n},registerInteractionHandler:function(n,i){return t.listen(n,i)},deregisterInteractionHandler:function(n,i){return t.unlisten(n,i)},notifyIconAction:function(){return t.emit(V.strings.ICON_EVENT,{},!0)}})},i}(r),U=function(i){function e(){return null!==i&&i.apply(this,arguments)||this}return t(e,i),e.attachTo=function(t){return new e(t)},e.prototype.initialize=function(t,n,i,e,r,u,s){void 0===t&&(t=function(t,n){return new o(t,n)}),void 0===n&&(n=function(t){return new g(t)}),void 0===i&&(i=function(t){return new D(t)}),void 0===e&&(e=function(t){return new A(t)}),void 0===r&&(r=function(t){return new W(t)}),void 0===u&&(u=function(t){return new l(t)}),void 0===s&&(s=function(t){return new I(t)}),this.input=this.root.querySelector(T.INPUT_SELECTOR);var c=this.root.querySelector(T.LABEL_SELECTOR);this.label=c?u(c):null;var f=this.root.querySelector(T.LINE_RIPPLE_SELECTOR);this.lineRipple=f?n(f):null;var a=this.root.querySelector(T.OUTLINE_SELECTOR);this.outline=a?s(a):null;var h=S.strings,d=this.root.nextElementSibling,b=d&&d.classList.contains(x.HELPER_LINE),m=b&&d&&d.querySelector(h.ROOT_SELECTOR);this.helperText=m?i(m):null;var v=C.strings,O=this.root.querySelector(v.ROOT_SELECTOR);!O&&b&&d&&(O=d.querySelector(v.ROOT_SELECTOR)),this.characterCounter=O?e(O):null;var E=this.root.querySelector(T.LEADING_ICON_SELECTOR);this.leadingIcon=E?r(E):null;var p=this.root.querySelector(T.TRAILING_ICON_SELECTOR);this.trailingIcon=p?r(p):null,this.prefix=this.root.querySelector(T.PREFIX_SELECTOR),this.suffix=this.root.querySelector(T.SUFFIX_SELECTOR),this.ripple=this.createRipple(t)},e.prototype.destroy=function(){this.ripple&&this.ripple.destroy(),this.lineRipple&&this.lineRipple.destroy(),this.helperText&&this.helperText.destroy(),this.characterCounter&&this.characterCounter.destroy(),this.leadingIcon&&this.leadingIcon.destroy(),this.trailingIcon&&this.trailingIcon.destroy(),this.label&&this.label.destroy(),this.outline&&this.outline.destroy(),i.prototype.destroy.call(this)},e.prototype.initialSyncWithDOM=function(){this.disabled=this.input.disabled},Object.defineProperty(e.prototype,"value",{get:function(){return this.foundation.getValue()},set:function(t){this.foundation.setValue(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"disabled",{get:function(){return this.foundation.isDisabled()},set:function(t){this.foundation.setDisabled(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"valid",{get:function(){return this.foundation.isValid()},set:function(t){this.foundation.setValid(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"required",{get:function(){return this.input.required},set:function(t){this.input.required=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"pattern",{get:function(){return this.input.pattern},set:function(t){this.input.pattern=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"minLength",{get:function(){return this.input.minLength},set:function(t){this.input.minLength=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"maxLength",{get:function(){return this.input.maxLength},set:function(t){t<0?this.input.removeAttribute("maxLength"):this.input.maxLength=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"min",{get:function(){return this.input.min},set:function(t){this.input.min=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"max",{get:function(){return this.input.max},set:function(t){this.input.max=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"step",{get:function(){return this.input.step},set:function(t){this.input.step=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"helperTextContent",{set:function(t){this.foundation.setHelperTextContent(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"leadingIconAriaLabel",{set:function(t){this.foundation.setLeadingIconAriaLabel(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"leadingIconContent",{set:function(t){this.foundation.setLeadingIconContent(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"trailingIconAriaLabel",{set:function(t){this.foundation.setTrailingIconAriaLabel(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"trailingIconContent",{set:function(t){this.foundation.setTrailingIconContent(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"useNativeValidation",{set:function(t){this.foundation.setUseNativeValidation(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"prefixText",{get:function(){return this.prefix?this.prefix.textContent:null},set:function(t){this.prefix&&(this.prefix.textContent=t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"suffixText",{get:function(){return this.suffix?this.suffix.textContent:null},set:function(t){this.suffix&&(this.suffix.textContent=t)},enumerable:!1,configurable:!0}),e.prototype.focus=function(){this.input.focus()},e.prototype.layout=function(){this.foundation.notchOutline(this.foundation.shouldFloat)},e.prototype.getDefaultFoundation=function(){var t=n(n(n(n(n({},this.getRootAdapterMethods()),this.getInputAdapterMethods()),this.getLabelAdapterMethods()),this.getLineRippleAdapterMethods()),this.getOutlineAdapterMethods());return new H(t,this.getFoundationMap())},e.prototype.getRootAdapterMethods=function(){var t=this;return{addClass:function(n){return t.root.classList.add(n)},removeClass:function(n){return t.root.classList.remove(n)},hasClass:function(n){return t.root.classList.contains(n)},registerTextFieldInteractionHandler:function(n,i){t.listen(n,i)},deregisterTextFieldInteractionHandler:function(n,i){t.unlisten(n,i)},registerValidationAttributeChangeHandler:function(n){var i=new MutationObserver((function(t){return n(function(t){return t.map((function(t){return t.attributeName})).filter((function(t){return t}))}(t))}));return i.observe(t.input,{attributes:!0}),i},deregisterValidationAttributeChangeHandler:function(t){t.disconnect()}}},e.prototype.getInputAdapterMethods=function(){var t=this;return{getNativeInput:function(){return t.input},setInputAttr:function(n,i){t.input.setAttribute(n,i)},removeInputAttr:function(n){t.input.removeAttribute(n)},isFocused:function(){return document.activeElement===t.input},registerInputInteractionHandler:function(n,i){t.input.addEventListener(n,i,s())},deregisterInputInteractionHandler:function(n,i){t.input.removeEventListener(n,i,s())}}},e.prototype.getLabelAdapterMethods=function(){var t=this;return{floatLabel:function(n){t.label&&t.label.float(n)},getLabelWidth:function(){return t.label?t.label.getWidth():0},hasLabel:function(){return Boolean(t.label)},shakeLabel:function(n){t.label&&t.label.shake(n)},setLabelRequired:function(n){t.label&&t.label.setRequired(n)}}},e.prototype.getLineRippleAdapterMethods=function(){var t=this;return{activateLineRipple:function(){t.lineRipple&&t.lineRipple.activate()},deactivateLineRipple:function(){t.lineRipple&&t.lineRipple.deactivate()},setLineRippleTransformOrigin:function(n){t.lineRipple&&t.lineRipple.setRippleCenter(n)}}},e.prototype.getOutlineAdapterMethods=function(){var t=this;return{closeOutline:function(){t.outline&&t.outline.closeNotch()},hasOutline:function(){return Boolean(t.outline)},notchOutline:function(n){t.outline&&t.outline.notch(n)}}},e.prototype.getFoundationMap=function(){return{characterCounter:this.characterCounter?this.characterCounter.foundationForTextField:void 0,helperText:this.helperText?this.helperText.foundationForTextField:void 0,leadingIcon:this.leadingIcon?this.leadingIcon.foundationForTextField:void 0,trailingIcon:this.trailingIcon?this.trailingIcon.foundationForTextField:void 0}},e.prototype.createRipple=function(t){var i=this,e=this.root.classList.contains(x.TEXTAREA),r=this.root.classList.contains(x.OUTLINED);if(e||r)return null;var u=n(n({},o.createAdapter(this)),{isSurfaceActive:function(){return c(i.input,":active")},registerInteractionHandler:function(t,n){i.input.addEventListener(t,n,s())},deregisterInteractionHandler:function(t,n){i.input.removeEventListener(t,n,s())}});return t(this.root,new f(u))},e}(r),q={ROOT:"mdc-form-field"},G={LABEL_SELECTOR:".mdc-form-field > label"},M=function(i){function e(t){var r=i.call(this,n(n({},e.defaultAdapter),t))||this;return r.click=function(){r.handleClick()},r}return t(e,i),Object.defineProperty(e,"cssClasses",{get:function(){return q},enumerable:!1,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return G},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{activateInputRipple:function(){},deactivateInputRipple:function(){},deregisterInteractionHandler:function(){},registerInteractionHandler:function(){}}},enumerable:!1,configurable:!0}),e.prototype.init=function(){this.adapter.registerInteractionHandler("click",this.click)},e.prototype.destroy=function(){this.adapter.deregisterInteractionHandler("click",this.click)},e.prototype.handleClick=function(){var t=this;this.adapter.activateInputRipple(),requestAnimationFrame((function(){t.adapter.deactivateInputRipple()}))},e}(e),X=function(n){function i(){return null!==n&&n.apply(this,arguments)||this}return t(i,n),i.attachTo=function(t){return new i(t)},i.prototype.labelEl=function(){return this.root.querySelector(M.strings.LABEL_SELECTOR)},i.prototype.getDefaultFoundation=function(){var t=this;return new M({activateInputRipple:function(){t.input&&t.input.ripple&&t.input.ripple.activate()},deactivateInputRipple:function(){t.input&&t.input.ripple&&t.input.ripple.deactivate()},deregisterInteractionHandler:function(n,i){var e=t.labelEl();e&&e.removeEventListener(n,i)},registerInteractionHandler:function(n,i){var e=t.labelEl();e&&e.addEventListener(n,i)}})},i}(r);
|
|
23
|
+
*/var a={LABEL_FLOAT_ABOVE:"mdc-floating-label--float-above",LABEL_REQUIRED:"mdc-floating-label--required",LABEL_SHAKE:"mdc-floating-label--shake",ROOT:"mdc-floating-label"},h=function(i){function e(t){var r=i.call(this,n(n({},e.defaultAdapter),t))||this;return r.shakeAnimationEndHandler=function(){r.handleShakeAnimationEnd()},r}return t(e,i),Object.defineProperty(e,"cssClasses",{get:function(){return a},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},getWidth:function(){return 0},registerInteractionHandler:function(){},deregisterInteractionHandler:function(){}}},enumerable:!1,configurable:!0}),e.prototype.init=function(){this.adapter.registerInteractionHandler("animationend",this.shakeAnimationEndHandler)},e.prototype.destroy=function(){this.adapter.deregisterInteractionHandler("animationend",this.shakeAnimationEndHandler)},e.prototype.getWidth=function(){return this.adapter.getWidth()},e.prototype.shake=function(t){var n=e.cssClasses.LABEL_SHAKE;t?this.adapter.addClass(n):this.adapter.removeClass(n)},e.prototype.float=function(t){var n=e.cssClasses,i=n.LABEL_FLOAT_ABOVE,r=n.LABEL_SHAKE;t?this.adapter.addClass(i):(this.adapter.removeClass(i),this.adapter.removeClass(r))},e.prototype.setRequired=function(t){var n=e.cssClasses.LABEL_REQUIRED;t?this.adapter.addClass(n):this.adapter.removeClass(n)},e.prototype.handleShakeAnimationEnd=function(){this.adapter.removeClass(e.cssClasses.LABEL_SHAKE)},e}(i),l=function(n){function i(){return null!==n&&n.apply(this,arguments)||this}return t(i,n),i.attachTo=function(t){return new i(t)},i.prototype.shake=function(t){this.foundation.shake(t)},i.prototype.float=function(t){this.foundation.float(t)},i.prototype.setRequired=function(t){this.foundation.setRequired(t)},i.prototype.getWidth=function(){return this.foundation.getWidth()},i.prototype.getDefaultFoundation=function(){var t=this;return new h({addClass:function(n){return t.root.classList.add(n)},removeClass:function(n){return t.root.classList.remove(n)},getWidth:function(){return r(t.root)},registerInteractionHandler:function(n,i){return t.listen(n,i)},deregisterInteractionHandler:function(n,i){return t.unlisten(n,i)}})},i}(e),d={LINE_RIPPLE_ACTIVE:"mdc-line-ripple--active",LINE_RIPPLE_DEACTIVATING:"mdc-line-ripple--deactivating"},b=function(i){function e(t){var r=i.call(this,n(n({},e.defaultAdapter),t))||this;return r.transitionEndHandler=function(t){r.handleTransitionEnd(t)},r}return t(e,i),Object.defineProperty(e,"cssClasses",{get:function(){return d},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},setStyle:function(){},registerEventHandler:function(){},deregisterEventHandler:function(){}}},enumerable:!1,configurable:!0}),e.prototype.init=function(){this.adapter.registerEventHandler("transitionend",this.transitionEndHandler)},e.prototype.destroy=function(){this.adapter.deregisterEventHandler("transitionend",this.transitionEndHandler)},e.prototype.activate=function(){this.adapter.removeClass(d.LINE_RIPPLE_DEACTIVATING),this.adapter.addClass(d.LINE_RIPPLE_ACTIVE)},e.prototype.setRippleCenter=function(t){this.adapter.setStyle("transform-origin",t+"px center")},e.prototype.deactivate=function(){this.adapter.addClass(d.LINE_RIPPLE_DEACTIVATING)},e.prototype.handleTransitionEnd=function(t){var n=this.adapter.hasClass(d.LINE_RIPPLE_DEACTIVATING);"opacity"===t.propertyName&&n&&(this.adapter.removeClass(d.LINE_RIPPLE_ACTIVE),this.adapter.removeClass(d.LINE_RIPPLE_DEACTIVATING))},e}(i),g=function(n){function i(){return null!==n&&n.apply(this,arguments)||this}return t(i,n),i.attachTo=function(t){return new i(t)},i.prototype.activate=function(){this.foundation.activate()},i.prototype.deactivate=function(){this.foundation.deactivate()},i.prototype.setRippleCenter=function(t){this.foundation.setRippleCenter(t)},i.prototype.getDefaultFoundation=function(){var t=this;return new b({addClass:function(n){return t.root.classList.add(n)},removeClass:function(n){return t.root.classList.remove(n)},hasClass:function(n){return t.root.classList.contains(n)},setStyle:function(n,i){return t.root.style.setProperty(n,i)},registerEventHandler:function(n,i){return t.listen(n,i)},deregisterEventHandler:function(n,i){return t.unlisten(n,i)}})},i}(e),m={NOTCH_ELEMENT_SELECTOR:".mdc-notched-outline__notch"},v={NOTCH_ELEMENT_PADDING:8},O={NO_LABEL:"mdc-notched-outline--no-label",OUTLINE_NOTCHED:"mdc-notched-outline--notched",OUTLINE_UPGRADED:"mdc-notched-outline--upgraded"},E=function(i){function e(t){return i.call(this,n(n({},e.defaultAdapter),t))||this}return t(e,i),Object.defineProperty(e,"strings",{get:function(){return m},enumerable:!1,configurable:!0}),Object.defineProperty(e,"cssClasses",{get:function(){return O},enumerable:!1,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return v},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},setNotchWidthProperty:function(){},removeNotchWidthProperty:function(){}}},enumerable:!1,configurable:!0}),e.prototype.notch=function(t){var n=e.cssClasses.OUTLINE_NOTCHED;t>0&&(t+=v.NOTCH_ELEMENT_PADDING),this.adapter.setNotchWidthProperty(t),this.adapter.addClass(n)},e.prototype.closeNotch=function(){this.adapter.removeClass(e.cssClasses.OUTLINE_NOTCHED),this.adapter.removeNotchWidthProperty()},e}(i),I=function(n){function i(){return null!==n&&n.apply(this,arguments)||this}return t(i,n),i.attachTo=function(t){return new i(t)},i.prototype.initialSyncWithDOM=function(){this.notchElement=this.root.querySelector(m.NOTCH_ELEMENT_SELECTOR);var t=this.root.querySelector("."+h.cssClasses.ROOT);t?(t.style.transitionDuration="0s",this.root.classList.add(O.OUTLINE_UPGRADED),requestAnimationFrame((function(){t.style.transitionDuration=""}))):this.root.classList.add(O.NO_LABEL)},i.prototype.notch=function(t){this.foundation.notch(t)},i.prototype.closeNotch=function(){this.foundation.closeNotch()},i.prototype.getDefaultFoundation=function(){var t=this;return new E({addClass:function(n){return t.root.classList.add(n)},removeClass:function(n){return t.root.classList.remove(n)},setNotchWidthProperty:function(n){t.notchElement.style.setProperty("width",n+"px")},removeNotchWidthProperty:function(){t.notchElement.style.removeProperty("width")}})},i}(e),p={ROOT:"mdc-text-field-character-counter"},L={ROOT_SELECTOR:"."+p.ROOT},C=function(i){function e(t){return i.call(this,n(n({},e.defaultAdapter),t))||this}return t(e,i),Object.defineProperty(e,"cssClasses",{get:function(){return p},enumerable:!1,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return L},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{setContent:function(){}}},enumerable:!1,configurable:!0}),e.prototype.setCounterValue=function(t,n){t=Math.min(t,n),this.adapter.setContent(t+" / "+n)},e}(i),A=function(n){function i(){return null!==n&&n.apply(this,arguments)||this}return t(i,n),i.attachTo=function(t){return new i(t)},Object.defineProperty(i.prototype,"foundationForTextField",{get:function(){return this.foundation},enumerable:!1,configurable:!0}),i.prototype.getDefaultFoundation=function(){var t=this;return new C({setContent:function(n){t.root.textContent=n}})},i}(e),T={ARIA_CONTROLS:"aria-controls",ARIA_DESCRIBEDBY:"aria-describedby",INPUT_SELECTOR:".mdc-text-field__input",LABEL_SELECTOR:".mdc-floating-label",LEADING_ICON_SELECTOR:".mdc-text-field__icon--leading",LINE_RIPPLE_SELECTOR:".mdc-line-ripple",OUTLINE_SELECTOR:".mdc-notched-outline",PREFIX_SELECTOR:".mdc-text-field__affix--prefix",SUFFIX_SELECTOR:".mdc-text-field__affix--suffix",TRAILING_ICON_SELECTOR:".mdc-text-field__icon--trailing"},x={DISABLED:"mdc-text-field--disabled",FOCUSED:"mdc-text-field--focused",HELPER_LINE:"mdc-text-field-helper-line",INVALID:"mdc-text-field--invalid",LABEL_FLOATING:"mdc-text-field--label-floating",NO_LABEL:"mdc-text-field--no-label",OUTLINED:"mdc-text-field--outlined",ROOT:"mdc-text-field",TEXTAREA:"mdc-text-field--textarea",WITH_LEADING_ICON:"mdc-text-field--with-leading-icon",WITH_TRAILING_ICON:"mdc-text-field--with-trailing-icon",WITH_INTERNAL_COUNTER:"mdc-text-field--with-internal-counter"},_={LABEL_SCALE:.75},R=["pattern","min","max","required","step","minlength","maxlength"],j=["color","date","datetime-local","month","range","time","week"],w=["mousedown","touchstart"],N=["click","keydown"],H=function(i){function e(t,r){void 0===r&&(r={});var u=i.call(this,n(n({},e.defaultAdapter),t))||this;return u.isFocused=!1,u.receivedUserInput=!1,u.valid=!0,u.useNativeValidation=!0,u.validateOnValueChange=!0,u.helperText=r.helperText,u.characterCounter=r.characterCounter,u.leadingIcon=r.leadingIcon,u.trailingIcon=r.trailingIcon,u.inputFocusHandler=function(){u.activateFocus()},u.inputBlurHandler=function(){u.deactivateFocus()},u.inputInputHandler=function(){u.handleInput()},u.setPointerXOffset=function(t){u.setTransformOrigin(t)},u.textFieldInteractionHandler=function(){u.handleTextFieldInteraction()},u.validationAttributeChangeHandler=function(t){u.handleValidationAttributeChange(t)},u}return t(e,i),Object.defineProperty(e,"cssClasses",{get:function(){return x},enumerable:!1,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return T},enumerable:!1,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return _},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"shouldAlwaysFloat",{get:function(){var t=this.getNativeInput().type;return j.indexOf(t)>=0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"shouldFloat",{get:function(){return this.shouldAlwaysFloat||this.isFocused||!!this.getValue()||this.isBadInput()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"shouldShake",{get:function(){return!this.isFocused&&!this.isValid()&&!!this.getValue()},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!0},setInputAttr:function(){},removeInputAttr:function(){},registerTextFieldInteractionHandler:function(){},deregisterTextFieldInteractionHandler:function(){},registerInputInteractionHandler:function(){},deregisterInputInteractionHandler:function(){},registerValidationAttributeChangeHandler:function(){return new MutationObserver((function(){}))},deregisterValidationAttributeChangeHandler:function(){},getNativeInput:function(){return null},isFocused:function(){return!1},activateLineRipple:function(){},deactivateLineRipple:function(){},setLineRippleTransformOrigin:function(){},shakeLabel:function(){},floatLabel:function(){},setLabelRequired:function(){},hasLabel:function(){return!1},getLabelWidth:function(){return 0},hasOutline:function(){return!1},notchOutline:function(){},closeOutline:function(){}}},enumerable:!1,configurable:!0}),e.prototype.init=function(){var t,n,i,e;this.adapter.hasLabel()&&this.getNativeInput().required&&this.adapter.setLabelRequired(!0),this.adapter.isFocused()?this.inputFocusHandler():this.adapter.hasLabel()&&this.shouldFloat&&(this.notchOutline(!0),this.adapter.floatLabel(!0),this.styleFloating(!0)),this.adapter.registerInputInteractionHandler("focus",this.inputFocusHandler),this.adapter.registerInputInteractionHandler("blur",this.inputBlurHandler),this.adapter.registerInputInteractionHandler("input",this.inputInputHandler);try{for(var r=u(w),s=r.next();!s.done;s=r.next())this.adapter.registerInputInteractionHandler(s.value,this.setPointerXOffset)}catch(n){t={error:n}}finally{try{s&&!s.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}try{for(var c=u(N),o=c.next();!o.done;o=c.next())this.adapter.registerTextFieldInteractionHandler(o.value,this.textFieldInteractionHandler)}catch(t){i={error:t}}finally{try{o&&!o.done&&(e=c.return)&&e.call(c)}finally{if(i)throw i.error}}this.validationObserver=this.adapter.registerValidationAttributeChangeHandler(this.validationAttributeChangeHandler),this.setcharacterCounter(this.getValue().length)},e.prototype.destroy=function(){var t,n,i,e;this.adapter.deregisterInputInteractionHandler("focus",this.inputFocusHandler),this.adapter.deregisterInputInteractionHandler("blur",this.inputBlurHandler),this.adapter.deregisterInputInteractionHandler("input",this.inputInputHandler);try{for(var r=u(w),s=r.next();!s.done;s=r.next())this.adapter.deregisterInputInteractionHandler(s.value,this.setPointerXOffset)}catch(n){t={error:n}}finally{try{s&&!s.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}try{for(var c=u(N),o=c.next();!o.done;o=c.next())this.adapter.deregisterTextFieldInteractionHandler(o.value,this.textFieldInteractionHandler)}catch(t){i={error:t}}finally{try{o&&!o.done&&(e=c.return)&&e.call(c)}finally{if(i)throw i.error}}this.adapter.deregisterValidationAttributeChangeHandler(this.validationObserver)},e.prototype.handleTextFieldInteraction=function(){var t=this.adapter.getNativeInput();t&&t.disabled||(this.receivedUserInput=!0)},e.prototype.handleValidationAttributeChange=function(t){var n=this;t.some((function(t){return R.indexOf(t)>-1&&(n.styleValidity(!0),n.adapter.setLabelRequired(n.getNativeInput().required),!0)})),t.indexOf("maxlength")>-1&&this.setcharacterCounter(this.getValue().length)},e.prototype.notchOutline=function(t){if(this.adapter.hasOutline()&&this.adapter.hasLabel())if(t){var n=this.adapter.getLabelWidth()*_.LABEL_SCALE;this.adapter.notchOutline(n)}else this.adapter.closeOutline()},e.prototype.activateFocus=function(){this.isFocused=!0,this.styleFocused(this.isFocused),this.adapter.activateLineRipple(),this.adapter.hasLabel()&&(this.notchOutline(this.shouldFloat),this.adapter.floatLabel(this.shouldFloat),this.styleFloating(this.shouldFloat),this.adapter.shakeLabel(this.shouldShake)),!this.helperText||!this.helperText.isPersistent()&&this.helperText.isValidation()&&this.valid||this.helperText.showToScreenReader()},e.prototype.setTransformOrigin=function(t){if(!this.isDisabled()&&!this.adapter.hasOutline()){var n=t.touches,i=n?n[0]:t,e=i.target.getBoundingClientRect();this.adapter.setLineRippleTransformOrigin(i.clientX-e.left)}},e.prototype.handleInput=function(){this.autoCompleteFocus(),this.setcharacterCounter(this.getValue().length)},e.prototype.autoCompleteFocus=function(){this.receivedUserInput||this.activateFocus()},e.prototype.deactivateFocus=function(){this.isFocused=!1,this.adapter.deactivateLineRipple();var t=this.isValid();this.styleValidity(t),this.styleFocused(this.isFocused),this.adapter.hasLabel()&&(this.notchOutline(this.shouldFloat),this.adapter.floatLabel(this.shouldFloat),this.styleFloating(this.shouldFloat),this.adapter.shakeLabel(this.shouldShake)),this.shouldFloat||(this.receivedUserInput=!1)},e.prototype.getValue=function(){return this.getNativeInput().value},e.prototype.setValue=function(t){if(this.getValue()!==t&&(this.getNativeInput().value=t),this.setcharacterCounter(t.length),this.validateOnValueChange){var n=this.isValid();this.styleValidity(n)}this.adapter.hasLabel()&&(this.notchOutline(this.shouldFloat),this.adapter.floatLabel(this.shouldFloat),this.styleFloating(this.shouldFloat),this.validateOnValueChange&&this.adapter.shakeLabel(this.shouldShake))},e.prototype.isValid=function(){return this.useNativeValidation?this.isNativeInputValid():this.valid},e.prototype.setValid=function(t){this.valid=t,this.styleValidity(t);var n=!t&&!this.isFocused&&!!this.getValue();this.adapter.hasLabel()&&this.adapter.shakeLabel(n)},e.prototype.setValidateOnValueChange=function(t){this.validateOnValueChange=t},e.prototype.getValidateOnValueChange=function(){return this.validateOnValueChange},e.prototype.setUseNativeValidation=function(t){this.useNativeValidation=t},e.prototype.isDisabled=function(){return this.getNativeInput().disabled},e.prototype.setDisabled=function(t){this.getNativeInput().disabled=t,this.styleDisabled(t)},e.prototype.setHelperTextContent=function(t){this.helperText&&this.helperText.setContent(t)},e.prototype.setLeadingIconAriaLabel=function(t){this.leadingIcon&&this.leadingIcon.setAriaLabel(t)},e.prototype.setLeadingIconContent=function(t){this.leadingIcon&&this.leadingIcon.setContent(t)},e.prototype.setTrailingIconAriaLabel=function(t){this.trailingIcon&&this.trailingIcon.setAriaLabel(t)},e.prototype.setTrailingIconContent=function(t){this.trailingIcon&&this.trailingIcon.setContent(t)},e.prototype.setcharacterCounter=function(t){if(this.characterCounter){var n=this.getNativeInput().maxLength;if(-1===n)throw new Error("MDCTextFieldFoundation: Expected maxlength html property on text input or textarea.");this.characterCounter.setCounterValue(t,n)}},e.prototype.isBadInput=function(){return this.getNativeInput().validity.badInput||!1},e.prototype.isNativeInputValid=function(){return this.getNativeInput().validity.valid},e.prototype.styleValidity=function(t){var n=e.cssClasses.INVALID;if(t?this.adapter.removeClass(n):this.adapter.addClass(n),this.helperText){if(this.helperText.setValidity(t),!this.helperText.isValidation())return;var i=this.helperText.isVisible(),r=this.helperText.getId();i&&r?this.adapter.setInputAttr(T.ARIA_DESCRIBEDBY,r):this.adapter.removeInputAttr(T.ARIA_DESCRIBEDBY)}},e.prototype.styleFocused=function(t){var n=e.cssClasses.FOCUSED;t?this.adapter.addClass(n):this.adapter.removeClass(n)},e.prototype.styleDisabled=function(t){var n=e.cssClasses,i=n.DISABLED,r=n.INVALID;t?(this.adapter.addClass(i),this.adapter.removeClass(r)):this.adapter.removeClass(i),this.leadingIcon&&this.leadingIcon.setDisabled(t),this.trailingIcon&&this.trailingIcon.setDisabled(t)},e.prototype.styleFloating=function(t){var n=e.cssClasses.LABEL_FLOATING;t?this.adapter.addClass(n):this.adapter.removeClass(n)},e.prototype.getNativeInput=function(){return(this.adapter?this.adapter.getNativeInput():null)||{disabled:!1,maxLength:-1,required:!1,type:"input",validity:{badInput:!1,valid:!0},value:""}},e}(i),y={HELPER_TEXT_PERSISTENT:"mdc-text-field-helper-text--persistent",HELPER_TEXT_VALIDATION_MSG:"mdc-text-field-helper-text--validation-msg",ROOT:"mdc-text-field-helper-text"},F={ARIA_HIDDEN:"aria-hidden",ROLE:"role",ROOT_SELECTOR:"."+y.ROOT},S=function(i){function e(t){return i.call(this,n(n({},e.defaultAdapter),t))||this}return t(e,i),Object.defineProperty(e,"cssClasses",{get:function(){return y},enumerable:!1,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return F},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},getAttr:function(){return null},setAttr:function(){},removeAttr:function(){},setContent:function(){}}},enumerable:!1,configurable:!0}),e.prototype.getId=function(){return this.adapter.getAttr("id")},e.prototype.isVisible=function(){return"true"!==this.adapter.getAttr(F.ARIA_HIDDEN)},e.prototype.setContent=function(t){this.adapter.setContent(t)},e.prototype.isPersistent=function(){return this.adapter.hasClass(y.HELPER_TEXT_PERSISTENT)},e.prototype.setPersistent=function(t){t?this.adapter.addClass(y.HELPER_TEXT_PERSISTENT):this.adapter.removeClass(y.HELPER_TEXT_PERSISTENT)},e.prototype.isValidation=function(){return this.adapter.hasClass(y.HELPER_TEXT_VALIDATION_MSG)},e.prototype.setValidation=function(t){t?this.adapter.addClass(y.HELPER_TEXT_VALIDATION_MSG):this.adapter.removeClass(y.HELPER_TEXT_VALIDATION_MSG)},e.prototype.showToScreenReader=function(){this.adapter.removeAttr(F.ARIA_HIDDEN)},e.prototype.setValidity=function(t){var n=this.adapter.hasClass(y.HELPER_TEXT_PERSISTENT),i=this.adapter.hasClass(y.HELPER_TEXT_VALIDATION_MSG)&&!t;i?(this.showToScreenReader(),"alert"===this.adapter.getAttr(F.ROLE)?this.refreshAlertRole():this.adapter.setAttr(F.ROLE,"alert")):this.adapter.removeAttr(F.ROLE),n||i||this.hide()},e.prototype.hide=function(){this.adapter.setAttr(F.ARIA_HIDDEN,"true")},e.prototype.refreshAlertRole=function(){var t=this;this.adapter.removeAttr(F.ROLE),requestAnimationFrame((function(){t.adapter.setAttr(F.ROLE,"alert")}))},e}(i),D=function(n){function i(){return null!==n&&n.apply(this,arguments)||this}return t(i,n),i.attachTo=function(t){return new i(t)},Object.defineProperty(i.prototype,"foundationForTextField",{get:function(){return this.foundation},enumerable:!1,configurable:!0}),i.prototype.getDefaultFoundation=function(){var t=this;return new S({addClass:function(n){return t.root.classList.add(n)},removeClass:function(n){return t.root.classList.remove(n)},hasClass:function(n){return t.root.classList.contains(n)},getAttr:function(n){return t.root.getAttribute(n)},setAttr:function(n,i){return t.root.setAttribute(n,i)},removeAttr:function(n){return t.root.removeAttribute(n)},setContent:function(n){t.root.textContent=n}})},i}(e),P={ICON_EVENT:"MDCTextField:icon",ICON_ROLE:"button"},B={ROOT:"mdc-text-field__icon"},k=["click","keydown"],V=function(i){function e(t){var r=i.call(this,n(n({},e.defaultAdapter),t))||this;return r.savedTabIndex=null,r.interactionHandler=function(t){r.handleInteraction(t)},r}return t(e,i),Object.defineProperty(e,"strings",{get:function(){return P},enumerable:!1,configurable:!0}),Object.defineProperty(e,"cssClasses",{get:function(){return B},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{getAttr:function(){return null},setAttr:function(){},removeAttr:function(){},setContent:function(){},registerInteractionHandler:function(){},deregisterInteractionHandler:function(){},notifyIconAction:function(){}}},enumerable:!1,configurable:!0}),e.prototype.init=function(){var t,n;this.savedTabIndex=this.adapter.getAttr("tabindex");try{for(var i=u(k),e=i.next();!e.done;e=i.next())this.adapter.registerInteractionHandler(e.value,this.interactionHandler)}catch(n){t={error:n}}finally{try{e&&!e.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}},e.prototype.destroy=function(){var t,n;try{for(var i=u(k),e=i.next();!e.done;e=i.next())this.adapter.deregisterInteractionHandler(e.value,this.interactionHandler)}catch(n){t={error:n}}finally{try{e&&!e.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}},e.prototype.setDisabled=function(t){this.savedTabIndex&&(t?(this.adapter.setAttr("tabindex","-1"),this.adapter.removeAttr("role")):(this.adapter.setAttr("tabindex",this.savedTabIndex),this.adapter.setAttr("role",P.ICON_ROLE)))},e.prototype.setAriaLabel=function(t){this.adapter.setAttr("aria-label",t)},e.prototype.setContent=function(t){this.adapter.setContent(t)},e.prototype.handleInteraction=function(t){("click"===t.type||"Enter"===t.key||13===t.keyCode)&&(t.preventDefault(),this.adapter.notifyIconAction())},e}(i),W=function(n){function i(){return null!==n&&n.apply(this,arguments)||this}return t(i,n),i.attachTo=function(t){return new i(t)},Object.defineProperty(i.prototype,"foundationForTextField",{get:function(){return this.foundation},enumerable:!1,configurable:!0}),i.prototype.getDefaultFoundation=function(){var t=this;return new V({getAttr:function(n){return t.root.getAttribute(n)},setAttr:function(n,i){return t.root.setAttribute(n,i)},removeAttr:function(n){return t.root.removeAttribute(n)},setContent:function(n){t.root.textContent=n},registerInteractionHandler:function(n,i){return t.listen(n,i)},deregisterInteractionHandler:function(n,i){return t.unlisten(n,i)},notifyIconAction:function(){return t.emit(V.strings.ICON_EVENT,{},!0)}})},i}(e),U=function(i){function e(){return null!==i&&i.apply(this,arguments)||this}return t(e,i),e.attachTo=function(t){return new e(t)},e.prototype.initialize=function(t,n,i,e,r,u,s){void 0===t&&(t=function(t,n){return new c(t,n)}),void 0===n&&(n=function(t){return new g(t)}),void 0===i&&(i=function(t){return new D(t)}),void 0===e&&(e=function(t){return new A(t)}),void 0===r&&(r=function(t){return new W(t)}),void 0===u&&(u=function(t){return new l(t)}),void 0===s&&(s=function(t){return new I(t)}),this.input=this.root.querySelector(T.INPUT_SELECTOR);var o=this.root.querySelector(T.LABEL_SELECTOR);this.label=o?u(o):null;var f=this.root.querySelector(T.LINE_RIPPLE_SELECTOR);this.lineRipple=f?n(f):null;var a=this.root.querySelector(T.OUTLINE_SELECTOR);this.outline=a?s(a):null;var h=S.strings,d=this.root.nextElementSibling,b=d&&d.classList.contains(x.HELPER_LINE),m=b&&d&&d.querySelector(h.ROOT_SELECTOR);this.helperText=m?i(m):null;var v=C.strings,O=this.root.querySelector(v.ROOT_SELECTOR);!O&&b&&d&&(O=d.querySelector(v.ROOT_SELECTOR)),this.characterCounter=O?e(O):null;var E=this.root.querySelector(T.LEADING_ICON_SELECTOR);this.leadingIcon=E?r(E):null;var p=this.root.querySelector(T.TRAILING_ICON_SELECTOR);this.trailingIcon=p?r(p):null,this.prefix=this.root.querySelector(T.PREFIX_SELECTOR),this.suffix=this.root.querySelector(T.SUFFIX_SELECTOR),this.ripple=this.createRipple(t)},e.prototype.destroy=function(){this.ripple&&this.ripple.destroy(),this.lineRipple&&this.lineRipple.destroy(),this.helperText&&this.helperText.destroy(),this.characterCounter&&this.characterCounter.destroy(),this.leadingIcon&&this.leadingIcon.destroy(),this.trailingIcon&&this.trailingIcon.destroy(),this.label&&this.label.destroy(),this.outline&&this.outline.destroy(),i.prototype.destroy.call(this)},e.prototype.initialSyncWithDOM=function(){this.disabled=this.input.disabled},Object.defineProperty(e.prototype,"value",{get:function(){return this.foundation.getValue()},set:function(t){this.foundation.setValue(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"disabled",{get:function(){return this.foundation.isDisabled()},set:function(t){this.foundation.setDisabled(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"valid",{get:function(){return this.foundation.isValid()},set:function(t){this.foundation.setValid(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"required",{get:function(){return this.input.required},set:function(t){this.input.required=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"pattern",{get:function(){return this.input.pattern},set:function(t){this.input.pattern=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"minLength",{get:function(){return this.input.minLength},set:function(t){this.input.minLength=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"maxLength",{get:function(){return this.input.maxLength},set:function(t){t<0?this.input.removeAttribute("maxLength"):this.input.maxLength=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"min",{get:function(){return this.input.min},set:function(t){this.input.min=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"max",{get:function(){return this.input.max},set:function(t){this.input.max=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"step",{get:function(){return this.input.step},set:function(t){this.input.step=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"helperTextContent",{set:function(t){this.foundation.setHelperTextContent(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"leadingIconAriaLabel",{set:function(t){this.foundation.setLeadingIconAriaLabel(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"leadingIconContent",{set:function(t){this.foundation.setLeadingIconContent(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"trailingIconAriaLabel",{set:function(t){this.foundation.setTrailingIconAriaLabel(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"trailingIconContent",{set:function(t){this.foundation.setTrailingIconContent(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"useNativeValidation",{set:function(t){this.foundation.setUseNativeValidation(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"prefixText",{get:function(){return this.prefix?this.prefix.textContent:null},set:function(t){this.prefix&&(this.prefix.textContent=t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"suffixText",{get:function(){return this.suffix?this.suffix.textContent:null},set:function(t){this.suffix&&(this.suffix.textContent=t)},enumerable:!1,configurable:!0}),e.prototype.focus=function(){this.input.focus()},e.prototype.layout=function(){this.foundation.notchOutline(this.foundation.shouldFloat)},e.prototype.getDefaultFoundation=function(){var t=n(n(n(n(n({},this.getRootAdapterMethods()),this.getInputAdapterMethods()),this.getLabelAdapterMethods()),this.getLineRippleAdapterMethods()),this.getOutlineAdapterMethods());return new H(t,this.getFoundationMap())},e.prototype.getRootAdapterMethods=function(){var t=this;return{addClass:function(n){return t.root.classList.add(n)},removeClass:function(n){return t.root.classList.remove(n)},hasClass:function(n){return t.root.classList.contains(n)},registerTextFieldInteractionHandler:function(n,i){t.listen(n,i)},deregisterTextFieldInteractionHandler:function(n,i){t.unlisten(n,i)},registerValidationAttributeChangeHandler:function(n){var i=new MutationObserver((function(t){return n(function(t){return t.map((function(t){return t.attributeName})).filter((function(t){return t}))}(t))}));return i.observe(t.input,{attributes:!0}),i},deregisterValidationAttributeChangeHandler:function(t){t.disconnect()}}},e.prototype.getInputAdapterMethods=function(){var t=this;return{getNativeInput:function(){return t.input},setInputAttr:function(n,i){t.input.setAttribute(n,i)},removeInputAttr:function(n){t.input.removeAttribute(n)},isFocused:function(){return document.activeElement===t.input},registerInputInteractionHandler:function(n,i){t.input.addEventListener(n,i,s())},deregisterInputInteractionHandler:function(n,i){t.input.removeEventListener(n,i,s())}}},e.prototype.getLabelAdapterMethods=function(){var t=this;return{floatLabel:function(n){t.label&&t.label.float(n)},getLabelWidth:function(){return t.label?t.label.getWidth():0},hasLabel:function(){return Boolean(t.label)},shakeLabel:function(n){t.label&&t.label.shake(n)},setLabelRequired:function(n){t.label&&t.label.setRequired(n)}}},e.prototype.getLineRippleAdapterMethods=function(){var t=this;return{activateLineRipple:function(){t.lineRipple&&t.lineRipple.activate()},deactivateLineRipple:function(){t.lineRipple&&t.lineRipple.deactivate()},setLineRippleTransformOrigin:function(n){t.lineRipple&&t.lineRipple.setRippleCenter(n)}}},e.prototype.getOutlineAdapterMethods=function(){var t=this;return{closeOutline:function(){t.outline&&t.outline.closeNotch()},hasOutline:function(){return Boolean(t.outline)},notchOutline:function(n){t.outline&&t.outline.notch(n)}}},e.prototype.getFoundationMap=function(){return{characterCounter:this.characterCounter?this.characterCounter.foundationForTextField:void 0,helperText:this.helperText?this.helperText.foundationForTextField:void 0,leadingIcon:this.leadingIcon?this.leadingIcon.foundationForTextField:void 0,trailingIcon:this.trailingIcon?this.trailingIcon.foundationForTextField:void 0}},e.prototype.createRipple=function(t){var i=this,e=this.root.classList.contains(x.TEXTAREA),r=this.root.classList.contains(x.OUTLINED);if(e||r)return null;var u=n(n({},c.createAdapter(this)),{isSurfaceActive:function(){return o(i.input,":active")},registerInteractionHandler:function(t,n){i.input.addEventListener(t,n,s())},deregisterInteractionHandler:function(t,n){i.input.removeEventListener(t,n,s())}});return t(this.root,new f(u))},e}(e),q={ROOT:"mdc-form-field"},G={LABEL_SELECTOR:".mdc-form-field > label"},M=function(i){function e(t){var r=i.call(this,n(n({},e.defaultAdapter),t))||this;return r.click=function(){r.handleClick()},r}return t(e,i),Object.defineProperty(e,"cssClasses",{get:function(){return q},enumerable:!1,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return G},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{activateInputRipple:function(){},deactivateInputRipple:function(){},deregisterInteractionHandler:function(){},registerInteractionHandler:function(){}}},enumerable:!1,configurable:!0}),e.prototype.init=function(){this.adapter.registerInteractionHandler("click",this.click)},e.prototype.destroy=function(){this.adapter.deregisterInteractionHandler("click",this.click)},e.prototype.handleClick=function(){var t=this;this.adapter.activateInputRipple(),requestAnimationFrame((function(){t.adapter.deactivateInputRipple()}))},e}(i),X=function(n){function i(){return null!==n&&n.apply(this,arguments)||this}return t(i,n),i.attachTo=function(t){return new i(t)},i.prototype.labelEl=function(){return this.root.querySelector(M.strings.LABEL_SELECTOR)},i.prototype.getDefaultFoundation=function(){var t=this;return new M({activateInputRipple:function(){t.input&&t.input.ripple&&t.input.ripple.activate()},deactivateInputRipple:function(){t.input&&t.input.ripple&&t.input.ripple.deactivate()},deregisterInteractionHandler:function(n,i){var e=t.labelEl();e&&e.removeEventListener(n,i)},registerInteractionHandler:function(n,i){var e=t.labelEl();e&&e.addEventListener(n,i)}})},i}(e);
|
|
24
24
|
/**
|
|
25
25
|
* @license
|
|
26
26
|
* Copyright 2016 Google Inc.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{E as e,J as t,H as l,D as n,af as r,v as i,z as o,ah as s,ai as a,N as u,h as c,a2 as f,aj as h,r as d,m as p}from"./p-36dac88e.js";import{h as b}from"./p-9dcfbb1e.js";import{F as m}from"./p-5f3680f2.js";import{F as v}from"./p-6c77a36c.js";class F extends e{getTextFilterValue(e={},t){return this._getTextFilterValue(e,t,!1)}getTextFilterValueTmp(e={},t){return this._getTextFilterValue(e,t,!0)}_getTextFilterValue(e={},t,l){let n="";if(null==e)return n;let r=e[t];return null==r||(n=l?r.textFieldTmp:r.textField),n}hasFiltersForColumn(e={},t){return this._hasFiltersForColumn(e,t,!1)}hasFiltersForColumnTmp(e={},t){return this._hasFiltersForColumn(e,t,!0)}_hasFiltersForColumn(e={},t,l){if(!t)return!1;let n=this._getTextFilterValue(e,t.name,l);if(null!=n&&""!=n.trim())return!0;if(this._hasIntervalTextFieldFilterValues(e,t,l))return!0;let r=this.getCheckBoxFilterValues(e,t.name);return!(null==r||r.length<1)}getCheckBoxFilterValues(e={},t){let l=[];if(null==e)return l;let n=e[t];return null==n||null==n.checkBoxes||(l=n.checkBoxes),l}hasIntervalTextFieldFilterValues(e={},t){return this._hasIntervalTextFieldFilterValues(e,t,!1)}hasIntervalTextFieldFilterValuesTmp(e={},t){return this._hasIntervalTextFieldFilterValues(e,t,!0)}_hasIntervalTextFieldFilterValues(e={},l,n){if(null==l)return!1;if(!this.isColumnFiltrableByInterval(l))return!1;let r=this._getIntervalTextFieldFilterValue(e,l.name,t.FROM,n);if(null!=r&&""!=r.trim())return!0;let i=this._getIntervalTextFieldFilterValue(e,l.name,t.TO,n);return null!=i&&""!=i.trim()}addCheckboxFilter(t={},l,n){if(null==t)return;let r=t[l];null==r&&(r={textField:"",textFieldTmp:"",checkBoxes:[],interval:null,intervalTmp:null},t[l]=r),null==r.checkBoxes&&(r.checkBoxes=[]),null==n||null==n.value?r.checkBoxes=[]:e.valuesArrayContainsValue(r.checkBoxes,n.value)||(r.checkBoxes[r.checkBoxes.length]=n)}removeCheckboxFilter(t={},l,n){if(null==t||null==n)return;let r=t[l];if(null==r)return;null==r.checkBoxes&&(r.checkBoxes=[]);let i=e.indexOfValueInValuesArray(r.checkBoxes,n);if(i>=0){let e=[];for(let t=0;t<r.checkBoxes.length;t++)t!=i&&(e[e.length]=r.checkBoxes[t]);r.checkBoxes=[...e]}}isColumnFiltrableByInterval(e){return this.isObjFiltrableByInterval(e.obj)}getIntervalTextFieldFilterValues(e={},t){return this._getIntervalTextFieldFilterValues(e,t,!1)}getIntervalTextFieldFilterValuesTmp(e={},t){return this._getIntervalTextFieldFilterValues(e,t,!0)}_getIntervalTextFieldFilterValues(e={},l,n){return this._hasIntervalTextFieldFilterValues(e,l,n)?[this._getIntervalTextFieldFilterValue(e,l.name,t.FROM,n),this._getIntervalTextFieldFilterValue(e,l.name,t.TO,n)]:["",""]}getIntervalTextFieldFilterValue(e={},t,l){return this._getIntervalTextFieldFilterValue(e,t,l,!1)}getIntervalTextFieldFilterValueTmp(e={},t,l){return this._getIntervalTextFieldFilterValue(e,t,l,!0)}_getIntervalTextFieldFilterValue(e={},t,l,n){let r="";if(null==e)return r;let i=e[t];return null==i||n&&null==i.intervalTmp?r:n||null!=i.interval?(r=n?i.intervalTmp[l]:i.interval[l],r):r}setTextFieldFilterValue(e={},t,l){this._setTextFieldFilterValue(e,t,l,!0)}_setTextFieldFilterValue(e={},t,l,n){if(null==e)return;let r=e[t];null==r&&(r={textField:"",textFieldTmp:"",checkBoxes:[],interval:null,intervalTmp:null},e[t]=r),n?r.textFieldTmp=null!=l?l.trim():l:r.textField=null!=l?l.trim():l}setIntervalTextFieldFilterValue(e={},t,l,n){this._setIntervalTextFieldFilterValue(e,t,l,n,!0)}_setIntervalTextFieldFilterValue(e={},t,l,n,r){if(null==e)return;let i=e[t];null==i&&(i={textField:"",textFieldTmp:"",checkBoxes:[],interval:null,intervalTmp:null},e[t]=i),null==i.interval&&(i.interval=[],i.interval.push("","")),null==i.intervalTmp&&(i.intervalTmp=[],i.intervalTmp.push("","")),r?i.intervalTmp[n]=null!=l?l.trim():l:i.interval[n]=null!=l?l.trim():l}saveTextualFilters(e={},l){this._setTextFieldFilterValue(e,l,this.getTextFilterValueTmp(e,l),!1),this._setIntervalTextFieldFilterValue(e,l,this.getIntervalTextFieldFilterValueTmp(e,l,t.FROM),t.FROM,!1),this._setIntervalTextFieldFilterValue(e,l,this.getIntervalTextFieldFilterValueTmp(e,l,t.TO),t.TO,!1)}resetTextualFilters(e={},l){this._setTextFieldFilterValue(e,l,this.getTextFilterValue(e,l),!0),this._setIntervalTextFieldFilterValue(e,l,this.getIntervalTextFieldFilterValue(e,l,t.FROM),t.FROM,!0),this._setIntervalTextFieldFilterValue(e,l,this.getIntervalTextFieldFilterValue(e,l,t.TO),t.TO,!0)}getFilterValueForTooltip(e={},r){let i=this.getTextFilterValue(e,r.name),o=this.getIntervalTextFieldFilterValues(e,r),s=this.getCheckBoxFilterValues(e,r.name),a="",u=l(i,r.obj,r.decimals);""!=i&&(a=" AND "),""!=o[t.FROM]&&(u+=a+"(>= "+l(o[t.FROM],r.obj,r.decimals)+")",a=" AND "),""!=o[t.TO]&&(u+=a+"(<= "+l(o[t.TO],r.obj,r.decimals)+")",a=" AND "),a="";let c="";return s.forEach((e=>{c+=a+n(e,r),a=" OR "})),""!=c&&(c="("+c+")",""!=u&&(c=" AND "+c)),c=u+c,c}removeFilter(e={},t){e[t]={textField:"",textFieldTmp:"",checkBoxes:[],interval:null,intervalTmp:null}}}var x;!function(e){e.asAccordion="When enabled, the first level of depth will give an accordion look to nodes.",e.columns="The columns of the tree when tree visualization is active.",e.customStyle="Custom style of the component.",e.data="The json data used to populate the tree view: the basic, always visible tree nodes.",e.density="The density of the rows, defaults at 'medium' and can also be set to 'dense' or 'wide'.",e.dynamicExpansionCallback="Function that gets invoked when a new set of nodes must be loaded as children of a node. When useDynamicExpansion is set, the tree component will have two different behaviors depending on the value of this prop. If this prop is set to null, no callback to download data is available: the component will emit an event requiring the parent to load the children of the given node. If this prop is set to have a callback, then the component will automatically make requests to load children of a given node. After the load has been completed, a different event will be fired to alert the parent of the change.",e.enableExtraColumns="Enables adding extra columns.",e.expanded="Flag: the nodes of the whole tree must be already expanded upon loading. Disabled nodes do NOT get expanded.",e.expansionMode="Behavior of nodes' expansion: it can be chosen between expanding a node by clicking on the dropdown icon, or by clicking on the whole node.",e.filters="List of filters set by the user.",e.globalFilter="When set to true it activates the global filter.",e.globalFilterValue="The value of the global filter.",e.globalFilterMode="The mode of the global filter.",e.removableColumns="Sets the possibility to remove the selected column.",e.preventXScroll="Experimental feature: when active, the tree will try to prevent horizontal overflowing elements by setting a width on the content of the table cells. It works only on cells of the main column.",e.ripple="When enabled displays Material's ripple effect on nodes (only when no columns are displayed).",e.scrollOnHover="Activates the scroll on hover function.",e.showColumns="Shows the tree data as a table.",e.showFilters="When set to true enables the column filters.",e.showFooter="When set to true shows the footer.",e.showHeader="Flag: shows the header of the tree when the tree is displayed as a table.",e.showIcons="Shows the icons of the nodes.",e.stateId="",e.store="",e.totals="Defines the current totals options.",e.useDynamicExpansion="When the component must use the dynamic expansion feature to open its nodes, it means that not all the nodes of the tree have been passed inside the data property. Therefore, when expanding a node, the tree must emit an event (or run a given callback) and wait for the child nodes to be downloaded from the server."}(x||(x={}));const w="TREE_COLUMN";var g;!function(e){e.DROPDOWN="dropdown",e.NODE="node"}(g||(g={}));const k=document.documentElement,T=k.ketchup?k.ketchup.objects:new o,y=k.ketchup?k.ketchup.data:new s;class j extends e{isFilterCompliantForCell(e,t,l){return!!e&&this.isFilterCompliantForSimpleValue(e.value,e.obj,t,l)}isFilterCompliantForCellObj(e,t,l){return!!e&&!!e.obj&&this.isFilterCompliantForSimpleValue(e.obj.k,e.obj,t,l)}isRowCompliant(e,t={},l="",n=!1,r=[],i){return this.areCellsCompliant(e.cells,t,l,n,r,i)}areCellsCompliant(e,t={},l="",n=!1,o=[],s){if(n){let t=!0;if(o&&null!=o&&o.length>0){t=!1;let n=this.filterIsNegative(l);for(let i=0;i<o.length;i++){if(0==o[i].visible)continue;const s=e[o[i].name];if(null==s)continue;t=this.isFilterCompliantForValue(s.value,l);let a=r(o[i],s);if(a!=s.value&&(t=t||this.isFilterCompliantForValue(a,l)),1==t&&!n)break;if(0==t&&n)break}}if(!t)return!1}if(null==s&&(s=new F),!this.hasFilters(t,o,s))return!0;let a=Object.keys(t);for(let l=0;l<a.length;l++){let n=a[l];const r=e[n];if(!r)return!1;let u=s.getTextFilterValue(t,n),c=s.getIntervalTextFieldFilterValues(t,i(o,n));const f=this.filterIsNegative(u);let h=this.isFilterCompliantForCell(r,u,c),d=f;if(T.isNumber(r.obj)||T.isDate(r.obj)||T.isTime(r.obj)||T.isTimestamp(r.obj)||(d=this.isFilterCompliantForCellObj(r,u,c)),f){if(!h||!d)return!1}else if(!h&&!d)return!1;let p=s.getCheckBoxFilterValues(t,n);if(0==p.length)continue;let b=!1;for(let e=0;e<p.length;e++){let t=p[e];if(null!=t&&null!=t.value){if(null!=r.value&&r.value.toLowerCase().trim()==t.value.toLowerCase().trim()){b=!0;break}if(null!=r.obj&&r.obj.k.toLowerCase().trim()==t.value.toLowerCase().trim()){b=!0;break}}}if(!b)return!1}return!0}hasFilters(e={},t,l){if(null==e)return!1;let n=Object.keys(e);if(null==n||n.length<1)return!1;null==l&&(l=new F);for(let r=0;r<n.length;r++){let o=n[r],s=null;if(s=o===w?{name:w,title:""}:i(t,o),l.hasFiltersForColumn(e,s))return!0}return!1}filterRows(e=[],t={},l="",n=[],r){if(!e||null==e)return[];let i=[];const o=!(!l||!n);if(this.hasFilters(t,n,r)||o)for(let s=0;s<e.length;s++){let a=e[s];(a.id&&a.id.indexOf("insert_")>-1||this.isRowCompliant(a,t,l,o,n,r))&&(i[i.length]=a)}else i=[...e];return i}getColumnValues(t,n,r,i){let o=new Array;null==i&&(i=new F);let s=i.getTextFilterValueTmp(t.filters,n.name),a=i.getIntervalTextFieldFilterValuesTmp(t.filters,n),u=i.getCheckBoxFilterValues(t.filters,n.name);if(null!=n.valuesForFilter&&n.valuesForFilter.length>0)return n.valuesForFilter.forEach((t=>{let r=t;(e.valuesArrayContainsValue(u,r)||""==s||i.isFilterCompliantForSimpleValue(r,n.obj,s,a))&&o.push({value:r,displayedValue:l(r,n.obj,n.decimals)})})),o;let c=Object.assign({},t.filters);c[n.name]={textField:s,textFieldTmp:s,checkBoxes:[],interval:a,intervalTmp:a};let f=this.filterRows(t.getRows(),c,r,t.getVisibleColumns(),i);for(let e=0;e<u.length;e++)o.push(u[e]);return y.cell.getUnivocalValue({rows:f},n,!0)}}const C=document.documentElement;function V(e=[],t=[]){if(!e||0===e.length)return[];if(e[0].group)return function(e=[],t=[]){if(!e||0===e.length)return[];const l=e[0].group.column;let n=function(e="",t=[]){if(!e||!t||0===t.length)return null;for(let l of t)if(l.column===e)return l;return null}(l,t);return n||(n={column:l,sortMode:f.A}),e.sort(((e,t)=>a({obj:e.group.obj,value:e.group.id},{obj:t.group.obj,value:t.group.id},n.sortMode))),e.forEach((e=>{e.group.children=V(e.group.children,t)})),e}(e,t);if(!t||0===t.length)return e;const l=t.length>1;return e.slice(0).sort(((e,n)=>{if(l){for(let l=0;l<t.length;l++){const r=O(e,n,t[l]);if(0!==r)return r}return 0}return O(e,n,t[0])}))}function O(e,t,l){const n=e.cells[l.column],r=t.cells[l.column];return n||r?n?r?a(n,r,l.sortMode):-1:1:0}function I(e=[],t={},l="",n=[],r,i){return null==i&&(i=new j),i.filterRows(e,t,l,n,r)}function M(e=[],t=[],l=[],n={}){if(!t)return[];if(!l||0===l.length||!e||0===e.length)return t;const o={},s=l.filter((({column:t})=>{for(let{name:l,title:n}of e)if(l===t)return o[l]=n,!0;return!1}));if(0===s.length)return t;const a=[];let c={};return t.forEach((t=>{const l=s[0].column,f=t.cells[l];if(f){const h=i(e,l),d=r(h,f),p=f.value;let b=null;for(let e of a)if(e.group.label===d){b=e;break}null===b&&(b={group:{id:p,parent:null,column:l,columnLabel:o[l],expanded:!1,label:d,children:[],obj:f.obj,totals:{}},cells:{}},a.push(b));for(let l=1;l<s.length;l++){const n=s[l],a=t.cells[n.column];if(a){const t=i(e,n.column),l=r(t,a),s=a.value;let u=null;for(let e=0;e<b.group.children.length;e++){const t=b.group.children[e];if(t.group.label===l){u=t;break}}u||(u={cells:{},group:{id:s,parent:b,column:n.column,columnLabel:o[n.column],children:[],expanded:!1,label:l,totals:{},obj:a.obj}},D(u),b.group.children.push(u)),b=u}}b.group.children.push(t),function(e,t,l,n){if(!e||!t)return;const r=Object.keys(t);0!==r.length&&r.forEach((r=>{const i=C.ketchup.math.numberify(e.group.totals[r]||0),o=l.cells[r];if(o){let l=C.ketchup.objects.isNumber(o.obj);const s=t[r];switch(s){case u.COUNT:e.group.totals[r]=i+1;let t=e.group.parent;for(;null!=t;)t.group.totals[r]=(t.group.totals[r]||0)+1,t=t.group.parent;break;case u.DISTINCT:let a;if(a=l?C.ketchup.math.numberify(C.ketchup.math.numberifySafe(o.value)):o.value,n[e.group.id]){let t=n[e.group.id][r];t?t.push(a):(n[e.group.id][r]=[],n[e.group.id][r].push(a))}else n[e.group.id]={},n[e.group.id][r]=[],n[e.group.id][r].push(a);let c=e.group.parent;for(;null!=c;){if(n[c.group.id]){let e=n[c.group.id][r];e?e.push(a):(n[c.group.id][r]=[],n[c.group.id][r].push(a))}else n[c.group.id]={},n[c.group.id][r]=[],n[c.group.id][r].push(a);c=c.group.parent}break;case u.SUM:case u.AVERAGE:if(l){const t=C.ketchup.math.numberify(C.ketchup.math.numberifySafe(o.value));e.group.totals[r]=t+i;let l=e.group.parent;for(;null!=l;){const e=C.ketchup.math.numberify(l.group.totals[r]||0);l.group.totals[r]=t+e,l=l.group.parent}}break;case u.MIN:if(l){const t=e.group.totals[r],l=C.ketchup.math.numberify(C.ketchup.math.numberifySafe(o.value));e.group.totals[r]=t?Math.min(t,l):l;let n=e.group.parent;for(;null!=n;){const e=n.group.totals[r];n.group.totals[r]=e?Math.min(e,l):l,n=n.group.parent}}else if(C.ketchup.objects.isDate(o.obj)){const t=o.obj?C.ketchup.objects.parseDate(o.obj):C.ketchup.dates.toDayjs(o.value);if(C.ketchup.dates.isValid(t)){const l=C.ketchup.dates.toDate(t),n=e.group.totals[r];if(n){let t=[];t.push(l),t.push(C.ketchup.dates.format(n)),e.group.totals[r]=C.ketchup.dates.format(C.ketchup.dates.min(t))}else e.group.totals[r]=l;let i=e.group.parent;for(;null!=i;){const e=i.group.totals[r];if(e){let t=[];t.push(l),t.push(C.ketchup.dates.format(e)),i.group.totals[r]=C.ketchup.dates.format(C.ketchup.dates.min(t))}else i.group.totals[r]=l;i=i.group.parent}}}break;case u.MAX:if(l){const t=e.group.totals[r],l=C.ketchup.math.numberify(C.ketchup.math.numberifySafe(o.value));e.group.totals[r]=t?Math.max(t,l):l;let n=e.group.parent;for(;null!=n;){const e=n.group.totals[r];n.group.totals[r]=e?Math.max(e,l):l,n=n.group.parent}}else if(C.ketchup.objects.isDate(o.obj)){const t=o.obj?C.ketchup.objects.parseDate(o.obj):C.ketchup.dates.toDayjs(o.value);if(C.ketchup.dates.isValid(t)){const l=C.ketchup.dates.toDate(t),n=e.group.totals[r];if(n){let t=[];t.push(l),t.push(C.ketchup.dates.format(n)),e.group.totals[r]=C.ketchup.dates.format(C.ketchup.dates.max(t))}else e.group.totals[r]=l;let i=e.group.parent;for(;null!=i;){const e=i.group.totals[r];if(e){let t=[];t.push(l),t.push(C.ketchup.dates.format(e)),i.group.totals[r]=C.ketchup.dates.format(C.ketchup.dates.max(t))}else i.group.totals[r]=l;i=i.group.parent}}}break;default:0!=s.indexOf(u.MATH)&&console.warn(`invalid total mode: ${s}`)}}}))}(b,n,t,c)}})),function(e,t,l){if(!e||!t)return;const n=Object.keys(t);if(0===e.length||!e[0].group||0===n.length)return;let r=n.filter((e=>u.DISTINCT===t[e]));r.length>0&&e.filter((e=>e.group.children.length>0)).forEach((e=>N(e,r,l)))}(a,n,c),_(a,u.AVERAGE,n),_(a,u.MATH,n),a}function _(e,t,l){if(!e||!l)return;const n=Object.keys(l);if(0===e.length||!e[0].group||0===n.length)return;let r;t==u.AVERAGE&&(r=n.filter((e=>u.AVERAGE===l[e]))),t==u.MATH&&(r=n.filter((e=>0==l[e].indexOf(u.MATH)))),r.length>0&&e.filter((e=>e.group.children.length>0)).forEach((e=>W(e,t,r,l)))}function N(e,t,l){const n=e.group.children;0!==n.length&&(n[0].group&&n.forEach((e=>{N(e,t,l)})),t.forEach((t=>{e.group.totals[t]=new Set(l[e.group.id][t]).size})))}function W(e,t,l,n){const r=e.group.children;if(0===r.length)return 0;let i=0;return r[0].group?r.forEach((e=>{i+=W(e,t,l,n)})):i=r.length,l.forEach((l=>{if(t==u.AVERAGE&&(e.group.totals[l]=C.ketchup.math.numberify(e.group.totals[l])/i),t==u.MATH){let t=n[l].substring(u.MATH.length);e.group.totals[l]=C.ketchup.math.formulas.custom(t,e.group.totals)}})),i}function A(e,t){if(t){const l=Object.assign(t);return t.forEach((t=>{e.forEach((e=>{if(t.cells){const l=t.cells[e.name];l&&e.obj&&!l.obj&&(l.obj={t:e.obj.t,p:e.obj.p,k:l.value})}}))})),l}}function B(e=[],t={}){if(C.ketchup.objects.isEmptyJsObject(e)||C.ketchup.objects.isEmptyJsObject(t))return{};const l=Object.keys(t),n={},r=new Array;if(0===l.length||l.every((e=>t[e]===u.COUNT)))l.forEach((t=>n[t]=e.length));else{let i={};e.forEach(((e,o,s)=>{l.filter((e=>u.COUNT!==t[e]&&0!=t[e].indexOf(u.MATH))).forEach((l=>{const a=e.cells[l];if(a)if(t[l]===u.DISTINCT){let e;e=C.ketchup.objects.isNumber(a.obj)?C.ketchup.math.numberify(C.ketchup.math.numberifySafe(a.value)):a.value;let t=i[l];t?t.push(e):(i[l]=[],i[l].push(e))}else if(C.ketchup.objects.isNumber(a.obj)){const e=C.ketchup.math.numberify(C.ketchup.math.numberifySafe(a.value));let r=n[l];switch(!0){case t[l]===u.MIN:n[l]=r?Math.min(r,e):e;break;case t[l]===u.MAX:n[l]=r?Math.max(r,e):e;break;default:r=n[l]||0,n[l]=e+C.ketchup.math.numberify(r)}}else if(C.ketchup.objects.isDate(a.obj)){-1==r.indexOf(l)&&r.push(l);const e=C.ketchup.dates.toDayjs(a.value);if(C.ketchup.dates.isValid(e)){const r=C.ketchup.dates.toDate(e),i=n[l]?C.ketchup.dates.toDate(C.ketchup.dates.toDayjs(n[l])):null;switch(!0){case t[l]===u.MIN:if(i){let e=[];e.push(r),e.push(i),n[l]=C.ketchup.dates.format(C.ketchup.dates.min(e),c.ISO_DATE)}else n[l]=C.ketchup.dates.format(r,c.ISO_DATE);break;case t[l]===u.MAX:if(i){let e=[];e.push(r),e.push(i),n[l]=C.ketchup.dates.format(C.ketchup.dates.max(e),c.ISO_DATE)}else n[l]=C.ketchup.dates.format(r,c.ISO_DATE)}}}o===s.length-1&&t[l]===u.DISTINCT&&(n[l]=new Set(i[l]).size,i[l]=[])}))}))}for(let i of l){switch(!0){case t[i]===u.AVERAGE:const l=n[i];l&&e.length>0&&(n[i]=l/e.length);break;case t[i]===u.COUNT:n[i]=e.length;break;case 0==t[i].indexOf(u.MATH):n[i]=C.ketchup.math.formulas.custom(t[i].substring(u.MATH.length),n)}n[i]&&(-1!=r.indexOf(i)?n[i]=C.ketchup.dates.format(n[i]):C.ketchup.math.isNumber(n[i])&&(n[i]=+n[i].toFixed(2)))}return n}function D(e){if(!e.group)return;let t=e.group.id,l=e.group.parent;for(;null!==l;)t=`${l.group.id};${t}`,l=l.group.parent;e.group.id=t}function $(e,t,l,n){const r=t*l-l,i=r+Number(l);if(0==n)return e.slice(r,i);let o=[];return E(e,o,r,Number(l),0),o}function E(e,t,l,n,r){let i=!1;for(let o=0;o<e.length;o++){let s=e[o],a=L(e[o]);if(null!=s.group&&null!=s.group.children&&s.group.children.length>0){a.group.children=[];let e=E(s.group.children,a.group.children,l,n,r);r=e.ci,i=e.added,1==i&&(t[t.length]=a)}else r>=l&&(t[t.length]=a,i=!0),r++;if(r>=l+n)break}return{ci:r,added:i}}function L(e){return null==e?null:{id:e.id,cells:Object.assign({},e.cells),actions:e.actions?[...e.actions]:null,group:R(e.group),clonedFrom:e,readOnly:e.readOnly,cssClass:e.cssClass}}function S(e){if(null==e)return null;let t=[];for(let l=0;l<e.length;l++)t[t.length]=L(e[l]);return t}function R(e){return null==e?null:{id:e.id,parent:Object.assign({},e.parent),column:e.column,columnLabel:e.columnLabel,expanded:e.expanded,label:e.label,children:S(e.children),obj:Object.assign({},e.obj),totals:Object.assign({},e.totals)}}var z;!function(e){e.SIMPLE="simple",e.FULL="full"}(z||(z={}));const q=document.documentElement,H=e=>{const t=Math.ceil(e.max/e.perPage),l=function(e,t){const l=[];for(let n=1;n<=t;n++){const t=n==e.currentPage;l.push({id:n.toString(),selected:t,value:n.toString()})}return l}(e,t),n=function(e){const t=[];let l=e.perPage;if(0===l)return t;for(;l<e.max;){const n=l==e.perPage;t.push({id:l.toString(),selected:n,value:l.toString()}),l*=2}const n=e.max==e.perPage;return t.push({id:e.max.toString(),selected:n,value:e.max.toString()}),t}(e),r={"kup-list":{data:l},"kup-text-field":{label:q.ketchup.language.translate(h.PAGE),helper:q.ketchup.language.translate(h.TOTAL)+`: ${t}`,helperWhenFocused:!0,inputType:"number",max:t,min:1}},i={"kup-list":{data:n},"kup-text-field":{label:q.ketchup.language.translate(d.ROWS)+" / "+q.ketchup.language.translate(h.PAGE),helper:q.ketchup.language.translate(d.TOTAL)+`: ${e.max}`,helperWhenFocused:!0,inputType:"number",max:e.max,min:1}};return b("div",Object.assign({class:`f-paginator ${e.mode?e.mode:""} ${e.wrapperClass?e.wrapperClass:""}`},e.dataSet,{id:e.id,title:e.title}),e.mode!==z.SIMPLE?b(m,{icon:"chevron_left",disabled:K(e),onClick:e.onPrevPage,wrapperClass:"prev-page"}):null,b("kup-combobox",{class:"page-selector",data:r,initialValue:e.currentPage.toString(),"onkup-combobox-change":e.onPageChange}),e.mode!==z.SIMPLE?b(m,{icon:"chevron_right",disabled:J(e),onClick:e.onNextPage,wrapperClass:"next-page"}):null,b("kup-combobox",{class:"rows-selector",data:i,initialValue:e.perPage.toString(),"onkup-combobox-change":e.onRowsChange}),e.onLoadMore?b(m,{icon:"plus",onClick:e.onLoadMore,label:q.ketchup.language.translate(p.LOAD_MORE),styling:v.FLAT,wrapperClass:"load-more-button"}):null)};function J(e){return e.currentPage*e.perPage>=e.max}function K(e){return 1==e.currentPage}const U=document.documentElement;function G(e,t,l){if(U.ketchup.math.isNumber(e)){const n=Math.ceil(t/l);let r=e;return r>n&&(r=n),r<1&&(r=1),r}return null}function P(e,t){if(U.ketchup.math.isNumber(e)){let l=e;return l>t&&(l=t),l<1&&(l=1),l}return null}export{F,g as K,j as a,H as b,B as c,G as d,x as e,I as f,M as g,z as h,A as n,$ as p,P as r,V as s,w as t}
|
|
1
|
+
import{E as e,J as t,H as l,D as n,af as r,v as i,z as o,ah as s,ai as a,N as u,h as c,a2 as f,aj as h,r as d,m as p}from"./p-6d46cbb0.js";import{h as b}from"./p-b5deb573.js";import{F as m}from"./p-1ca9aece.js";import{F as v}from"./p-0fd98ab4.js";class F extends e{getTextFilterValue(e={},t){return this._getTextFilterValue(e,t,!1)}getTextFilterValueTmp(e={},t){return this._getTextFilterValue(e,t,!0)}_getTextFilterValue(e={},t,l){let n="";if(null==e)return n;let r=e[t];return null==r||(n=l?r.textFieldTmp:r.textField),n}hasFiltersForColumn(e={},t){return this._hasFiltersForColumn(e,t,!1)}hasFiltersForColumnTmp(e={},t){return this._hasFiltersForColumn(e,t,!0)}_hasFiltersForColumn(e={},t,l){if(!t)return!1;let n=this._getTextFilterValue(e,t.name,l);if(null!=n&&""!=n.trim())return!0;if(this._hasIntervalTextFieldFilterValues(e,t,l))return!0;let r=this.getCheckBoxFilterValues(e,t.name);return!(null==r||r.length<1)}getCheckBoxFilterValues(e={},t){let l=[];if(null==e)return l;let n=e[t];return null==n||null==n.checkBoxes||(l=n.checkBoxes),l}hasIntervalTextFieldFilterValues(e={},t){return this._hasIntervalTextFieldFilterValues(e,t,!1)}hasIntervalTextFieldFilterValuesTmp(e={},t){return this._hasIntervalTextFieldFilterValues(e,t,!0)}_hasIntervalTextFieldFilterValues(e={},l,n){if(null==l)return!1;if(!this.isColumnFiltrableByInterval(l))return!1;let r=this._getIntervalTextFieldFilterValue(e,l.name,t.FROM,n);if(null!=r&&""!=r.trim())return!0;let i=this._getIntervalTextFieldFilterValue(e,l.name,t.TO,n);return null!=i&&""!=i.trim()}addCheckboxFilter(t={},l,n){if(null==t)return;let r=t[l];null==r&&(r={textField:"",textFieldTmp:"",checkBoxes:[],interval:null,intervalTmp:null},t[l]=r),null==r.checkBoxes&&(r.checkBoxes=[]),null==n||null==n.value?r.checkBoxes=[]:e.valuesArrayContainsValue(r.checkBoxes,n.value)||(r.checkBoxes[r.checkBoxes.length]=n)}removeCheckboxFilter(t={},l,n){if(null==t||null==n)return;let r=t[l];if(null==r)return;null==r.checkBoxes&&(r.checkBoxes=[]);let i=e.indexOfValueInValuesArray(r.checkBoxes,n);if(i>=0){let e=[];for(let t=0;t<r.checkBoxes.length;t++)t!=i&&(e[e.length]=r.checkBoxes[t]);r.checkBoxes=[...e]}}isColumnFiltrableByInterval(e){return this.isObjFiltrableByInterval(e.obj)}getIntervalTextFieldFilterValues(e={},t){return this._getIntervalTextFieldFilterValues(e,t,!1)}getIntervalTextFieldFilterValuesTmp(e={},t){return this._getIntervalTextFieldFilterValues(e,t,!0)}_getIntervalTextFieldFilterValues(e={},l,n){return this._hasIntervalTextFieldFilterValues(e,l,n)?[this._getIntervalTextFieldFilterValue(e,l.name,t.FROM,n),this._getIntervalTextFieldFilterValue(e,l.name,t.TO,n)]:["",""]}getIntervalTextFieldFilterValue(e={},t,l){return this._getIntervalTextFieldFilterValue(e,t,l,!1)}getIntervalTextFieldFilterValueTmp(e={},t,l){return this._getIntervalTextFieldFilterValue(e,t,l,!0)}_getIntervalTextFieldFilterValue(e={},t,l,n){let r="";if(null==e)return r;let i=e[t];return null==i||n&&null==i.intervalTmp?r:n||null!=i.interval?(r=n?i.intervalTmp[l]:i.interval[l],r):r}setTextFieldFilterValue(e={},t,l){this._setTextFieldFilterValue(e,t,l,!0)}_setTextFieldFilterValue(e={},t,l,n){if(null==e)return;let r=e[t];null==r&&(r={textField:"",textFieldTmp:"",checkBoxes:[],interval:null,intervalTmp:null},e[t]=r),n?r.textFieldTmp=null!=l?l.trim():l:r.textField=null!=l?l.trim():l}setIntervalTextFieldFilterValue(e={},t,l,n){this._setIntervalTextFieldFilterValue(e,t,l,n,!0)}_setIntervalTextFieldFilterValue(e={},t,l,n,r){if(null==e)return;let i=e[t];null==i&&(i={textField:"",textFieldTmp:"",checkBoxes:[],interval:null,intervalTmp:null},e[t]=i),null==i.interval&&(i.interval=[],i.interval.push("","")),null==i.intervalTmp&&(i.intervalTmp=[],i.intervalTmp.push("","")),r?i.intervalTmp[n]=null!=l?l.trim():l:i.interval[n]=null!=l?l.trim():l}saveTextualFilters(e={},l){this._setTextFieldFilterValue(e,l,this.getTextFilterValueTmp(e,l),!1),this._setIntervalTextFieldFilterValue(e,l,this.getIntervalTextFieldFilterValueTmp(e,l,t.FROM),t.FROM,!1),this._setIntervalTextFieldFilterValue(e,l,this.getIntervalTextFieldFilterValueTmp(e,l,t.TO),t.TO,!1)}resetTextualFilters(e={},l){this._setTextFieldFilterValue(e,l,this.getTextFilterValue(e,l),!0),this._setIntervalTextFieldFilterValue(e,l,this.getIntervalTextFieldFilterValue(e,l,t.FROM),t.FROM,!0),this._setIntervalTextFieldFilterValue(e,l,this.getIntervalTextFieldFilterValue(e,l,t.TO),t.TO,!0)}getFilterValueForTooltip(e={},r){let i=this.getTextFilterValue(e,r.name),o=this.getIntervalTextFieldFilterValues(e,r),s=this.getCheckBoxFilterValues(e,r.name),a="",u=l(i,r.obj,r.decimals);""!=i&&(a=" AND "),""!=o[t.FROM]&&(u+=a+"(>= "+l(o[t.FROM],r.obj,r.decimals)+")",a=" AND "),""!=o[t.TO]&&(u+=a+"(<= "+l(o[t.TO],r.obj,r.decimals)+")",a=" AND "),a="";let c="";return s.forEach((e=>{c+=a+n(e,r),a=" OR "})),""!=c&&(c="("+c+")",""!=u&&(c=" AND "+c)),c=u+c,c}removeFilter(e={},t){e[t]={textField:"",textFieldTmp:"",checkBoxes:[],interval:null,intervalTmp:null}}}var x;!function(e){e.asAccordion="When enabled, the first level of depth will give an accordion look to nodes.",e.columns="The columns of the tree when tree visualization is active.",e.customStyle="Custom style of the component.",e.data="The json data used to populate the tree view: the basic, always visible tree nodes.",e.density="The density of the rows, defaults at 'medium' and can also be set to 'dense' or 'wide'.",e.dynamicExpansionCallback="Function that gets invoked when a new set of nodes must be loaded as children of a node. When useDynamicExpansion is set, the tree component will have two different behaviors depending on the value of this prop. If this prop is set to null, no callback to download data is available: the component will emit an event requiring the parent to load the children of the given node. If this prop is set to have a callback, then the component will automatically make requests to load children of a given node. After the load has been completed, a different event will be fired to alert the parent of the change.",e.enableExtraColumns="Enables adding extra columns.",e.expanded="Flag: the nodes of the whole tree must be already expanded upon loading. Disabled nodes do NOT get expanded.",e.expansionMode="Behavior of nodes' expansion: it can be chosen between expanding a node by clicking on the dropdown icon, or by clicking on the whole node.",e.filters="List of filters set by the user.",e.globalFilter="When set to true it activates the global filter.",e.globalFilterValue="The value of the global filter.",e.globalFilterMode="The mode of the global filter.",e.removableColumns="Sets the possibility to remove the selected column.",e.preventXScroll="Experimental feature: when active, the tree will try to prevent horizontal overflowing elements by setting a width on the content of the table cells. It works only on cells of the main column.",e.ripple="When enabled displays Material's ripple effect on nodes (only when no columns are displayed).",e.scrollOnHover="Activates the scroll on hover function.",e.showColumns="Shows the tree data as a table.",e.showFilters="When set to true enables the column filters.",e.showFooter="When set to true shows the footer.",e.showHeader="Flag: shows the header of the tree when the tree is displayed as a table.",e.showIcons="Shows the icons of the nodes.",e.stateId="",e.store="",e.totals="Defines the current totals options.",e.useDynamicExpansion="When the component must use the dynamic expansion feature to open its nodes, it means that not all the nodes of the tree have been passed inside the data property. Therefore, when expanding a node, the tree must emit an event (or run a given callback) and wait for the child nodes to be downloaded from the server."}(x||(x={}));const w="TREE_COLUMN";var g;!function(e){e.DROPDOWN="dropdown",e.NODE="node"}(g||(g={}));const k=document.documentElement,T=k.ketchup?k.ketchup.objects:new o,y=k.ketchup?k.ketchup.data:new s;class j extends e{isFilterCompliantForCell(e,t,l){return!!e&&this.isFilterCompliantForSimpleValue(e.value,e.obj,t,l)}isFilterCompliantForCellObj(e,t,l){return!!e&&!!e.obj&&this.isFilterCompliantForSimpleValue(e.obj.k,e.obj,t,l)}isRowCompliant(e,t={},l="",n=!1,r=[],i){return this.areCellsCompliant(e.cells,t,l,n,r,i)}areCellsCompliant(e,t={},l="",n=!1,o=[],s){if(n){let t=!0;if(o&&null!=o&&o.length>0){t=!1;let n=this.filterIsNegative(l);for(let i=0;i<o.length;i++){if(0==o[i].visible)continue;const s=e[o[i].name];if(null==s)continue;t=this.isFilterCompliantForValue(s.value,l);let a=r(o[i],s);if(a!=s.value&&(t=t||this.isFilterCompliantForValue(a,l)),1==t&&!n)break;if(0==t&&n)break}}if(!t)return!1}if(null==s&&(s=new F),!this.hasFilters(t,o,s))return!0;let a=Object.keys(t);for(let l=0;l<a.length;l++){let n=a[l];const r=e[n];if(!r)return!1;let u=s.getTextFilterValue(t,n),c=s.getIntervalTextFieldFilterValues(t,i(o,n));const f=this.filterIsNegative(u);let h=this.isFilterCompliantForCell(r,u,c),d=f;if(T.isNumber(r.obj)||T.isDate(r.obj)||T.isTime(r.obj)||T.isTimestamp(r.obj)||(d=this.isFilterCompliantForCellObj(r,u,c)),f){if(!h||!d)return!1}else if(!h&&!d)return!1;let p=s.getCheckBoxFilterValues(t,n);if(0==p.length)continue;let b=!1;for(let e=0;e<p.length;e++){let t=p[e];if(null!=t&&null!=t.value){if(null!=r.value&&r.value.toLowerCase().trim()==t.value.toLowerCase().trim()){b=!0;break}if(null!=r.obj&&r.obj.k.toLowerCase().trim()==t.value.toLowerCase().trim()){b=!0;break}}}if(!b)return!1}return!0}hasFilters(e={},t,l){if(null==e)return!1;let n=Object.keys(e);if(null==n||n.length<1)return!1;null==l&&(l=new F);for(let r=0;r<n.length;r++){let o=n[r],s=null;if(s=o===w?{name:w,title:""}:i(t,o),l.hasFiltersForColumn(e,s))return!0}return!1}filterRows(e=[],t={},l="",n=[],r){if(!e||null==e)return[];let i=[];const o=!(!l||!n);if(this.hasFilters(t,n,r)||o)for(let s=0;s<e.length;s++){let a=e[s];(a.id&&a.id.indexOf("insert_")>-1||this.isRowCompliant(a,t,l,o,n,r))&&(i[i.length]=a)}else i=[...e];return i}getColumnValues(t,n,r,i){let o=new Array;null==i&&(i=new F);let s=i.getTextFilterValueTmp(t.filters,n.name),a=i.getIntervalTextFieldFilterValuesTmp(t.filters,n),u=i.getCheckBoxFilterValues(t.filters,n.name);if(null!=n.valuesForFilter&&n.valuesForFilter.length>0)return n.valuesForFilter.forEach((t=>{let r=t;(e.valuesArrayContainsValue(u,r)||""==s||i.isFilterCompliantForSimpleValue(r,n.obj,s,a))&&o.push({value:r,displayedValue:l(r,n.obj,n.decimals)})})),o;let c=Object.assign({},t.filters);c[n.name]={textField:s,textFieldTmp:s,checkBoxes:[],interval:a,intervalTmp:a};let f=this.filterRows(t.getRows(),c,r,t.getVisibleColumns(),i);for(let e=0;e<u.length;e++)o.push(u[e]);return y.cell.getUnivocalValue({rows:f},n,!0)}}const C=document.documentElement;function V(e=[],t=[]){if(!e||0===e.length)return[];if(e[0].group)return function(e=[],t=[]){if(!e||0===e.length)return[];const l=e[0].group.column;let n=function(e="",t=[]){if(!e||!t||0===t.length)return null;for(let l of t)if(l.column===e)return l;return null}(l,t);return n||(n={column:l,sortMode:f.A}),e.sort(((e,t)=>a({obj:e.group.obj,value:e.group.id},{obj:t.group.obj,value:t.group.id},n.sortMode))),e.forEach((e=>{e.group.children=V(e.group.children,t)})),e}(e,t);if(!t||0===t.length)return e;const l=t.length>1;return e.slice(0).sort(((e,n)=>{if(l){for(let l=0;l<t.length;l++){const r=O(e,n,t[l]);if(0!==r)return r}return 0}return O(e,n,t[0])}))}function O(e,t,l){const n=e.cells[l.column],r=t.cells[l.column];return n||r?n?r?a(n,r,l.sortMode):-1:1:0}function I(e=[],t={},l="",n=[],r,i){return null==i&&(i=new j),i.filterRows(e,t,l,n,r)}function M(e=[],t=[],l=[],n={}){if(!t)return[];if(!l||0===l.length||!e||0===e.length)return t;const o={},s=l.filter((({column:t})=>{for(let{name:l,title:n}of e)if(l===t)return o[l]=n,!0;return!1}));if(0===s.length)return t;const a=[];let c={};return t.forEach((t=>{const l=s[0].column,f=t.cells[l];if(f){const h=i(e,l),d=r(h,f),p=f.value;let b=null;for(let e of a)if(e.group.label===d){b=e;break}null===b&&(b={group:{id:p,parent:null,column:l,columnLabel:o[l],expanded:!1,label:d,children:[],obj:f.obj,totals:{}},cells:{}},a.push(b));for(let l=1;l<s.length;l++){const n=s[l],a=t.cells[n.column];if(a){const t=i(e,n.column),l=r(t,a),s=a.value;let u=null;for(let e=0;e<b.group.children.length;e++){const t=b.group.children[e];if(t.group.label===l){u=t;break}}u||(u={cells:{},group:{id:s,parent:b,column:n.column,columnLabel:o[n.column],children:[],expanded:!1,label:l,totals:{},obj:a.obj}},D(u),b.group.children.push(u)),b=u}}b.group.children.push(t),function(e,t,l,n){if(!e||!t)return;const r=Object.keys(t);0!==r.length&&r.forEach((r=>{const i=C.ketchup.math.numberify(e.group.totals[r]||0),o=l.cells[r];if(o){let l=C.ketchup.objects.isNumber(o.obj);const s=t[r];switch(s){case u.COUNT:e.group.totals[r]=i+1;let t=e.group.parent;for(;null!=t;)t.group.totals[r]=(t.group.totals[r]||0)+1,t=t.group.parent;break;case u.DISTINCT:let a;if(a=l?C.ketchup.math.numberify(C.ketchup.math.numberifySafe(o.value)):o.value,n[e.group.id]){let t=n[e.group.id][r];t?t.push(a):(n[e.group.id][r]=[],n[e.group.id][r].push(a))}else n[e.group.id]={},n[e.group.id][r]=[],n[e.group.id][r].push(a);let c=e.group.parent;for(;null!=c;){if(n[c.group.id]){let e=n[c.group.id][r];e?e.push(a):(n[c.group.id][r]=[],n[c.group.id][r].push(a))}else n[c.group.id]={},n[c.group.id][r]=[],n[c.group.id][r].push(a);c=c.group.parent}break;case u.SUM:case u.AVERAGE:if(l){const t=C.ketchup.math.numberify(C.ketchup.math.numberifySafe(o.value));e.group.totals[r]=t+i;let l=e.group.parent;for(;null!=l;){const e=C.ketchup.math.numberify(l.group.totals[r]||0);l.group.totals[r]=t+e,l=l.group.parent}}break;case u.MIN:if(l){const t=e.group.totals[r],l=C.ketchup.math.numberify(C.ketchup.math.numberifySafe(o.value));e.group.totals[r]=t?Math.min(t,l):l;let n=e.group.parent;for(;null!=n;){const e=n.group.totals[r];n.group.totals[r]=e?Math.min(e,l):l,n=n.group.parent}}else if(C.ketchup.objects.isDate(o.obj)){const t=o.obj?C.ketchup.objects.parseDate(o.obj):C.ketchup.dates.toDayjs(o.value);if(C.ketchup.dates.isValid(t)){const l=C.ketchup.dates.toDate(t),n=e.group.totals[r];if(n){let t=[];t.push(l),t.push(C.ketchup.dates.format(n)),e.group.totals[r]=C.ketchup.dates.format(C.ketchup.dates.min(t))}else e.group.totals[r]=l;let i=e.group.parent;for(;null!=i;){const e=i.group.totals[r];if(e){let t=[];t.push(l),t.push(C.ketchup.dates.format(e)),i.group.totals[r]=C.ketchup.dates.format(C.ketchup.dates.min(t))}else i.group.totals[r]=l;i=i.group.parent}}}break;case u.MAX:if(l){const t=e.group.totals[r],l=C.ketchup.math.numberify(C.ketchup.math.numberifySafe(o.value));e.group.totals[r]=t?Math.max(t,l):l;let n=e.group.parent;for(;null!=n;){const e=n.group.totals[r];n.group.totals[r]=e?Math.max(e,l):l,n=n.group.parent}}else if(C.ketchup.objects.isDate(o.obj)){const t=o.obj?C.ketchup.objects.parseDate(o.obj):C.ketchup.dates.toDayjs(o.value);if(C.ketchup.dates.isValid(t)){const l=C.ketchup.dates.toDate(t),n=e.group.totals[r];if(n){let t=[];t.push(l),t.push(C.ketchup.dates.format(n)),e.group.totals[r]=C.ketchup.dates.format(C.ketchup.dates.max(t))}else e.group.totals[r]=l;let i=e.group.parent;for(;null!=i;){const e=i.group.totals[r];if(e){let t=[];t.push(l),t.push(C.ketchup.dates.format(e)),i.group.totals[r]=C.ketchup.dates.format(C.ketchup.dates.max(t))}else i.group.totals[r]=l;i=i.group.parent}}}break;default:0!=s.indexOf(u.MATH)&&console.warn(`invalid total mode: ${s}`)}}}))}(b,n,t,c)}})),function(e,t,l){if(!e||!t)return;const n=Object.keys(t);if(0===e.length||!e[0].group||0===n.length)return;let r=n.filter((e=>u.DISTINCT===t[e]));r.length>0&&e.filter((e=>e.group.children.length>0)).forEach((e=>N(e,r,l)))}(a,n,c),_(a,u.AVERAGE,n),_(a,u.MATH,n),a}function _(e,t,l){if(!e||!l)return;const n=Object.keys(l);if(0===e.length||!e[0].group||0===n.length)return;let r;t==u.AVERAGE&&(r=n.filter((e=>u.AVERAGE===l[e]))),t==u.MATH&&(r=n.filter((e=>0==l[e].indexOf(u.MATH)))),r.length>0&&e.filter((e=>e.group.children.length>0)).forEach((e=>W(e,t,r,l)))}function N(e,t,l){const n=e.group.children;0!==n.length&&(n[0].group&&n.forEach((e=>{N(e,t,l)})),t.forEach((t=>{e.group.totals[t]=new Set(l[e.group.id][t]).size})))}function W(e,t,l,n){const r=e.group.children;if(0===r.length)return 0;let i=0;return r[0].group?r.forEach((e=>{i+=W(e,t,l,n)})):i=r.length,l.forEach((l=>{if(t==u.AVERAGE&&(e.group.totals[l]=C.ketchup.math.numberify(e.group.totals[l])/i),t==u.MATH){let t=n[l].substring(u.MATH.length);e.group.totals[l]=C.ketchup.math.formulas.custom(t,e.group.totals)}})),i}function A(e,t){if(t){const l=Object.assign(t);return t.forEach((t=>{e.forEach((e=>{if(t.cells){const l=t.cells[e.name];l&&e.obj&&!l.obj&&(l.obj={t:e.obj.t,p:e.obj.p,k:l.value})}}))})),l}}function B(e=[],t={}){if(C.ketchup.objects.isEmptyJsObject(e)||C.ketchup.objects.isEmptyJsObject(t))return{};const l=Object.keys(t),n={},r=new Array;if(0===l.length||l.every((e=>t[e]===u.COUNT)))l.forEach((t=>n[t]=e.length));else{let i={};e.forEach(((e,o,s)=>{l.filter((e=>u.COUNT!==t[e]&&0!=t[e].indexOf(u.MATH))).forEach((l=>{const a=e.cells[l];if(a)if(t[l]===u.DISTINCT){let e;e=C.ketchup.objects.isNumber(a.obj)?C.ketchup.math.numberify(C.ketchup.math.numberifySafe(a.value)):a.value;let t=i[l];t?t.push(e):(i[l]=[],i[l].push(e))}else if(C.ketchup.objects.isNumber(a.obj)){const e=C.ketchup.math.numberify(C.ketchup.math.numberifySafe(a.value));let r=n[l];switch(!0){case t[l]===u.MIN:n[l]=r?Math.min(r,e):e;break;case t[l]===u.MAX:n[l]=r?Math.max(r,e):e;break;default:r=n[l]||0,n[l]=e+C.ketchup.math.numberify(r)}}else if(C.ketchup.objects.isDate(a.obj)){-1==r.indexOf(l)&&r.push(l);const e=C.ketchup.dates.toDayjs(a.value);if(C.ketchup.dates.isValid(e)){const r=C.ketchup.dates.toDate(e),i=n[l]?C.ketchup.dates.toDate(C.ketchup.dates.toDayjs(n[l])):null;switch(!0){case t[l]===u.MIN:if(i){let e=[];e.push(r),e.push(i),n[l]=C.ketchup.dates.format(C.ketchup.dates.min(e),c.ISO_DATE)}else n[l]=C.ketchup.dates.format(r,c.ISO_DATE);break;case t[l]===u.MAX:if(i){let e=[];e.push(r),e.push(i),n[l]=C.ketchup.dates.format(C.ketchup.dates.max(e),c.ISO_DATE)}else n[l]=C.ketchup.dates.format(r,c.ISO_DATE)}}}o===s.length-1&&t[l]===u.DISTINCT&&(n[l]=new Set(i[l]).size,i[l]=[])}))}))}for(let i of l){switch(!0){case t[i]===u.AVERAGE:const l=n[i];l&&e.length>0&&(n[i]=l/e.length);break;case t[i]===u.COUNT:n[i]=e.length;break;case 0==t[i].indexOf(u.MATH):n[i]=C.ketchup.math.formulas.custom(t[i].substring(u.MATH.length),n)}n[i]&&(-1!=r.indexOf(i)?n[i]=C.ketchup.dates.format(n[i]):C.ketchup.math.isNumber(n[i])&&(n[i]=+n[i].toFixed(2)))}return n}function D(e){if(!e.group)return;let t=e.group.id,l=e.group.parent;for(;null!==l;)t=`${l.group.id};${t}`,l=l.group.parent;e.group.id=t}function $(e,t,l,n){const r=t*l-l,i=r+Number(l);if(0==n)return e.slice(r,i);let o=[];return E(e,o,r,Number(l),0),o}function E(e,t,l,n,r){let i=!1;for(let o=0;o<e.length;o++){let s=e[o],a=L(e[o]);if(null!=s.group&&null!=s.group.children&&s.group.children.length>0){a.group.children=[];let e=E(s.group.children,a.group.children,l,n,r);r=e.ci,i=e.added,1==i&&(t[t.length]=a)}else r>=l&&(t[t.length]=a,i=!0),r++;if(r>=l+n)break}return{ci:r,added:i}}function L(e){return null==e?null:{id:e.id,cells:Object.assign({},e.cells),actions:e.actions?[...e.actions]:null,group:R(e.group),clonedFrom:e,readOnly:e.readOnly,cssClass:e.cssClass}}function S(e){if(null==e)return null;let t=[];for(let l=0;l<e.length;l++)t[t.length]=L(e[l]);return t}function R(e){return null==e?null:{id:e.id,parent:Object.assign({},e.parent),column:e.column,columnLabel:e.columnLabel,expanded:e.expanded,label:e.label,children:S(e.children),obj:Object.assign({},e.obj),totals:Object.assign({},e.totals)}}var z;!function(e){e.SIMPLE="simple",e.FULL="full"}(z||(z={}));const q=document.documentElement,H=e=>{const t=Math.ceil(e.max/e.perPage),l=function(e,t){const l=[];for(let n=1;n<=t;n++){const t=n==e.currentPage;l.push({id:n.toString(),selected:t,value:n.toString()})}return l}(e,t),n=function(e){const t=[];let l=e.perPage;if(0===l)return t;for(;l<e.max;){const n=l==e.perPage;t.push({id:l.toString(),selected:n,value:l.toString()}),l*=2}const n=e.max==e.perPage;return t.push({id:e.max.toString(),selected:n,value:e.max.toString()}),t}(e),r={"kup-list":{data:l},"kup-text-field":{label:q.ketchup.language.translate(h.PAGE),helper:q.ketchup.language.translate(h.TOTAL)+`: ${t}`,helperWhenFocused:!0,inputType:"number",max:t,min:1}},i={"kup-list":{data:n},"kup-text-field":{label:q.ketchup.language.translate(d.ROWS)+" / "+q.ketchup.language.translate(h.PAGE),helper:q.ketchup.language.translate(d.TOTAL)+`: ${e.max}`,helperWhenFocused:!0,inputType:"number",max:e.max,min:1}};return b("div",Object.assign({class:`f-paginator ${e.mode?e.mode:""} ${e.wrapperClass?e.wrapperClass:""}`},e.dataSet,{id:e.id,title:e.title}),e.mode!==z.SIMPLE?b(m,{icon:"chevron_left",disabled:K(e),onClick:e.onPrevPage,wrapperClass:"prev-page"}):null,b("kup-combobox",{class:"page-selector",data:r,initialValue:e.currentPage.toString(),"onkup-combobox-change":e.onPageChange}),e.mode!==z.SIMPLE?b(m,{icon:"chevron_right",disabled:J(e),onClick:e.onNextPage,wrapperClass:"next-page"}):null,b("kup-combobox",{class:"rows-selector",data:i,initialValue:e.perPage.toString(),"onkup-combobox-change":e.onRowsChange}),e.onLoadMore?b(m,{icon:"plus",onClick:e.onLoadMore,label:q.ketchup.language.translate(p.LOAD_MORE),styling:v.FLAT,wrapperClass:"load-more-button"}):null)};function J(e){return e.currentPage*e.perPage>=e.max}function K(e){return 1==e.currentPage}const U=document.documentElement;function G(e,t,l){if(U.ketchup.math.isNumber(e)){const n=Math.ceil(t/l);let r=e;return r>n&&(r=n),r<1&&(r=1),r}return null}function P(e,t){if(U.ketchup.math.isNumber(e)){let l=e;return l>t&&(l=t),l<1&&(l=1),l}return null}export{F,g as K,j as a,H as b,B as c,G as d,x as e,I as f,M as g,z as h,A as n,$ as p,P as r,V as s,w as t}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as c}from"./p-
|
|
1
|
+
import{h as c}from"./p-b5deb573.js";const e=e=>{const o={"data-indeterminate":!!e.indeterminate},a={checkbox:!0,"checkbox--checked":!(!e.checked||e.indeterminate),"checkbox--disabled":!!e.disabled,"checkbox--indeterminate":!!e.indeterminate};return c("div",Object.assign({class:`f-checkbox ${e.danger?"kup-danger":""} ${e.info?"kup-info":""} ${e.secondary?"kup-secondary":""} ${e.success?"kup-success":""} ${e.warning?"kup-warning":""} ${e.wrapperClass?e.wrapperClass:""}`},e.dataSet,{id:e.id,title:e.title}),c("div",{class:"form-field "+(e.leadingLabel?"form-field--align-end":"")},c("div",{class:a},c("input",Object.assign({type:"checkbox",class:"checkbox__native-control",checked:e.checked,disabled:e.disabled,onBlur:e.onBlur,onChange:e.onChange,onFocus:e.onFocus},o,{value:e.checked?"on":"off"})),c("div",{class:"checkbox__background",onClick:e.onChange},c("svg",{class:"checkbox__checkmark",viewBox:"0 0 24 24"},c("path",{class:"checkbox__checkmark-path",fill:"none",d:"M1.73,12.91 8.1,19.28 22.79,4.59"})),c("div",{class:"checkbox__mixedmark"}))),e.label?c("label",null,e.label):void 0))};export{e as F}
|
package/dist/loader/index.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ export interface CustomElementsDefineOptions {
|
|
|
11
11
|
export declare function defineCustomElements(win?: Window, opts?: CustomElementsDefineOptions): Promise<void>;
|
|
12
12
|
export declare function applyPolyfills(): Promise<void>;
|
|
13
13
|
|
|
14
|
-
/**
|
|
14
|
+
/**
|
|
15
15
|
* Used to specify a nonce value that corresponds with an application's CSP.
|
|
16
16
|
* When set, the nonce will be added to all dynamically created script and style tags at runtime.
|
|
17
17
|
* Alternatively, the nonce value can be set on a meta tag in the DOM head
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { KupDataColumn } from '../../managers/kup-data/kup-data-declarations';
|
|
2
|
-
import { KupEventPayload } from '../../types/GenericTypes';
|
|
3
|
-
/**
|
|
4
|
-
* Props of the kup-accordion component.
|
|
5
|
-
* Used to export every prop in an object.
|
|
6
|
-
*/
|
|
7
|
-
export declare enum KupAccordionProps {
|
|
8
|
-
customStyle = "Custom style of the component. For more information: https://ketchup.smeup.com/ketchup-showcase/#/customization",
|
|
9
|
-
data = "Data of the accordion.",
|
|
10
|
-
ripple = "When enabled displays Material's ripple effect on item headers."
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Data of the accordion.
|
|
14
|
-
*/
|
|
15
|
-
export interface KupAccordionData {
|
|
16
|
-
columns: KupDataColumn[];
|
|
17
|
-
}
|
|
18
|
-
export interface KupAccordionItemSelectedEventPayload extends KupEventPayload {
|
|
19
|
-
itemName: string;
|
|
20
|
-
}
|
|
1
|
+
import { KupDataColumn } from '../../managers/kup-data/kup-data-declarations';
|
|
2
|
+
import { KupEventPayload } from '../../types/GenericTypes';
|
|
3
|
+
/**
|
|
4
|
+
* Props of the kup-accordion component.
|
|
5
|
+
* Used to export every prop in an object.
|
|
6
|
+
*/
|
|
7
|
+
export declare enum KupAccordionProps {
|
|
8
|
+
customStyle = "Custom style of the component. For more information: https://ketchup.smeup.com/ketchup-showcase/#/customization",
|
|
9
|
+
data = "Data of the accordion.",
|
|
10
|
+
ripple = "When enabled displays Material's ripple effect on item headers."
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Data of the accordion.
|
|
14
|
+
*/
|
|
15
|
+
export interface KupAccordionData {
|
|
16
|
+
columns: KupDataColumn[];
|
|
17
|
+
}
|
|
18
|
+
export interface KupAccordionItemSelectedEventPayload extends KupEventPayload {
|
|
19
|
+
itemName: string;
|
|
20
|
+
}
|