@aeris-ui/core 22.0.0-alpha.1 → 22.0.0-alpha.11
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/README.md +232 -191
- package/THIRD_PARTY_LICENSES.md +48 -0
- package/fesm2022/aeris-ui-core-accordion.mjs +666 -273
- package/fesm2022/aeris-ui-core-accordion.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-animate-on-scroll.mjs +284 -103
- package/fesm2022/aeris-ui-core-animate-on-scroll.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-auto-complete.mjs +1301 -450
- package/fesm2022/aeris-ui-core-auto-complete.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-auto-focus.mjs +111 -61
- package/fesm2022/aeris-ui-core-auto-focus.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-avatar.mjs +383 -101
- package/fesm2022/aeris-ui-core-avatar.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-badge.mjs +562 -115
- package/fesm2022/aeris-ui-core-badge.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-block-ui.mjs +221 -101
- package/fesm2022/aeris-ui-core-block-ui.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-breadcrumb.mjs +609 -199
- package/fesm2022/aeris-ui-core-breadcrumb.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-button-forms.mjs +78 -0
- package/fesm2022/aeris-ui-core-button-forms.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-button-group.mjs +554 -36
- package/fesm2022/aeris-ui-core-button-group.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-button.mjs +911 -137
- package/fesm2022/aeris-ui-core-button.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-card.mjs +371 -101
- package/fesm2022/aeris-ui-core-card.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-carousel.mjs +835 -369
- package/fesm2022/aeris-ui-core-carousel.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-cascade-select.mjs +1294 -525
- package/fesm2022/aeris-ui-core-cascade-select.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-chart.mjs +594 -262
- package/fesm2022/aeris-ui-core-chart.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-checkbox.mjs +619 -150
- package/fesm2022/aeris-ui-core-checkbox.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-chip.mjs +1109 -121
- package/fesm2022/aeris-ui-core-chip.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-class-names.mjs +87 -65
- package/fesm2022/aeris-ui-core-class-names.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-code-block.mjs +687 -0
- package/fesm2022/aeris-ui-core-code-block.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-color-picker.mjs +2436 -1076
- package/fesm2022/aeris-ui-core-color-picker.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-command-palette.mjs +996 -0
- package/fesm2022/aeris-ui-core-command-palette.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-compare.mjs +870 -338
- package/fesm2022/aeris-ui-core-compare.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-confirm-dialog.mjs +1454 -575
- package/fesm2022/aeris-ui-core-confirm-dialog.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-confirm-popup.mjs +1499 -760
- package/fesm2022/aeris-ui-core-confirm-popup.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-context-menu.mjs +975 -449
- package/fesm2022/aeris-ui-core-context-menu.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-date-picker-aeris-date-picker-input-jAhzMzLQ.mjs +946 -0
- package/fesm2022/aeris-ui-core-date-picker-aeris-date-picker-input-jAhzMzLQ.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-date-picker.mjs +2538 -1183
- package/fesm2022/aeris-ui-core-date-picker.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-dialog.mjs +1187 -368
- package/fesm2022/aeris-ui-core-dialog.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-divider.mjs +204 -43
- package/fesm2022/aeris-ui-core-divider.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-drawer.mjs +1712 -345
- package/fesm2022/aeris-ui-core-drawer.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-dynamic-dialog.mjs +418 -254
- package/fesm2022/aeris-ui-core-dynamic-dialog.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-editor.mjs +1808 -783
- package/fesm2022/aeris-ui-core-editor.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-file-upload.mjs +1529 -536
- package/fesm2022/aeris-ui-core-file-upload.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-filter-service.mjs +258 -301
- package/fesm2022/aeris-ui-core-filter-service.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-fluid.mjs +68 -21
- package/fesm2022/aeris-ui-core-fluid.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-focus-trap.mjs +206 -182
- package/fesm2022/aeris-ui-core-focus-trap.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-form-field.mjs +688 -0
- package/fesm2022/aeris-ui-core-form-field.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-galleria.mjs +2821 -1143
- package/fesm2022/aeris-ui-core-galleria.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-glass.mjs +110 -33
- package/fesm2022/aeris-ui-core-glass.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-icon-field.mjs +426 -98
- package/fesm2022/aeris-ui-core-icon-field.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-inplace.mjs +496 -132
- package/fesm2022/aeris-ui-core-inplace.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-input-group.mjs +413 -107
- package/fesm2022/aeris-ui-core-input-group.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-input-mask.mjs +713 -257
- package/fesm2022/aeris-ui-core-input-mask.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-input-number.mjs +1095 -297
- package/fesm2022/aeris-ui-core-input-number.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-input-otp.mjs +678 -264
- package/fesm2022/aeris-ui-core-input-otp.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-input-text.mjs +703 -160
- package/fesm2022/aeris-ui-core-input-text.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-kbd.mjs +243 -0
- package/fesm2022/aeris-ui-core-kbd.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-key-filter.mjs +263 -201
- package/fesm2022/aeris-ui-core-key-filter.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-listbox.mjs +789 -0
- package/fesm2022/aeris-ui-core-listbox.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-mega-menu.mjs +662 -388
- package/fesm2022/aeris-ui-core-mega-menu.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-menu.mjs +1111 -478
- package/fesm2022/aeris-ui-core-menu.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-menubar.mjs +1081 -411
- package/fesm2022/aeris-ui-core-menubar.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-message.mjs +513 -147
- package/fesm2022/aeris-ui-core-message.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-meter-group.mjs +641 -230
- package/fesm2022/aeris-ui-core-meter-group.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-multi-select.mjs +1832 -577
- package/fesm2022/aeris-ui-core-multi-select.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-navbar.mjs +1407 -0
- package/fesm2022/aeris-ui-core-navbar.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-order-list.mjs +748 -220
- package/fesm2022/aeris-ui-core-order-list.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-organization-chart.mjs +521 -201
- package/fesm2022/aeris-ui-core-organization-chart.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-paginator.mjs +671 -127
- package/fesm2022/aeris-ui-core-paginator.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-panel.mjs +602 -210
- package/fesm2022/aeris-ui-core-panel.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-password.mjs +1046 -269
- package/fesm2022/aeris-ui-core-password.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-pick-list.mjs +1796 -703
- package/fesm2022/aeris-ui-core-pick-list.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-popover.mjs +1354 -385
- package/fesm2022/aeris-ui-core-popover.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-progress-bar.mjs +609 -182
- package/fesm2022/aeris-ui-core-progress-bar.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-progress-spinner.mjs +428 -133
- package/fesm2022/aeris-ui-core-progress-spinner.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-radio-button.mjs +502 -132
- package/fesm2022/aeris-ui-core-radio-button.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-rating.mjs +506 -231
- package/fesm2022/aeris-ui-core-rating.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-scroll-panel.mjs +457 -154
- package/fesm2022/aeris-ui-core-scroll-panel.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-scroll-top.mjs +279 -69
- package/fesm2022/aeris-ui-core-scroll-top.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-select-native.mjs +145 -0
- package/fesm2022/aeris-ui-core-select-native.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-select.mjs +1984 -668
- package/fesm2022/aeris-ui-core-select.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-sidebar.mjs +1293 -0
- package/fesm2022/aeris-ui-core-sidebar.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-skeleton.mjs +149 -45
- package/fesm2022/aeris-ui-core-skeleton.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-slider.mjs +884 -430
- package/fesm2022/aeris-ui-core-slider.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-speed-dial.mjs +882 -337
- package/fesm2022/aeris-ui-core-speed-dial.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-split-button.mjs +972 -268
- package/fesm2022/aeris-ui-core-split-button.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-splitter.mjs +831 -356
- package/fesm2022/aeris-ui-core-splitter.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-stepper.mjs +705 -256
- package/fesm2022/aeris-ui-core-stepper.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-style-class.mjs +587 -342
- package/fesm2022/aeris-ui-core-style-class.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-table.mjs +2927 -923
- package/fesm2022/aeris-ui-core-table.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-tabs.mjs +855 -283
- package/fesm2022/aeris-ui-core-tabs.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-textarea.mjs +919 -221
- package/fesm2022/aeris-ui-core-textarea.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-theme-builder.mjs +1368 -1407
- package/fesm2022/aeris-ui-core-theme-builder.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-theming.mjs +132 -144
- package/fesm2022/aeris-ui-core-theming.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-tiered-menu.mjs +966 -447
- package/fesm2022/aeris-ui-core-tiered-menu.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-timeline.mjs +407 -131
- package/fesm2022/aeris-ui-core-timeline.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-toast.mjs +1109 -384
- package/fesm2022/aeris-ui-core-toast.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-toggle-switch.mjs +398 -132
- package/fesm2022/aeris-ui-core-toggle-switch.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-toolbar.mjs +1340 -131
- package/fesm2022/aeris-ui-core-toolbar.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-tooltip.mjs +625 -330
- package/fesm2022/aeris-ui-core-tooltip.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-tree-select.mjs +1650 -627
- package/fesm2022/aeris-ui-core-tree-select.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-tree-table.mjs +2442 -994
- package/fesm2022/aeris-ui-core-tree-table.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-tree.mjs +1257 -670
- package/fesm2022/aeris-ui-core-tree.mjs.map +1 -1
- package/fesm2022/aeris-ui-core.mjs +1601 -312
- package/fesm2022/aeris-ui-core.mjs.map +1 -1
- package/package.json +48 -8
- package/schematics/ng-add/schema.json +1 -1
- package/schematics/runtime/schematics/ng-add/options.js +4 -4
- package/schematics/runtime/schematics/ng-add/options.js.map +1 -1
- package/schematics/runtime/schematics/ng-add/workspace.js +1 -1
- package/schematics/runtime/schematics/ng-add/workspace.js.map +1 -1
- package/schematics/runtime/theme-builder/aeris-color-derivation.js +1 -1
- package/schematics/runtime/theme-builder/aeris-contrast.js +38 -17
- package/schematics/runtime/theme-builder/aeris-contrast.js.map +1 -1
- package/schematics/runtime/theme-builder/aeris-foundation.js +13 -8
- package/schematics/runtime/theme-builder/aeris-foundation.js.map +1 -1
- package/schematics/runtime/theme-builder/aeris-semantic-tones.js +33 -23
- package/schematics/runtime/theme-builder/aeris-semantic-tones.js.map +1 -1
- package/schematics/runtime/theme-builder/aeris-theme-generator.js +8 -2
- package/schematics/runtime/theme-builder/aeris-theme-generator.js.map +1 -1
- package/schematics/runtime/theme-builder/aeris-theme-resolver.js +63 -76
- package/schematics/runtime/theme-builder/aeris-theme-resolver.js.map +1 -1
- package/schematics/runtime/theme-builder/aeris-theme-tokens.js +15 -5
- package/schematics/runtime/theme-builder/aeris-theme-tokens.js.map +1 -1
- package/schematics/runtime/theme-builder/aeris-theme-validation.js +18 -2
- package/schematics/runtime/theme-builder/aeris-theme-validation.js.map +1 -1
- package/schematics/runtime/theme-builder/aeris-theme.js +121 -34
- package/schematics/runtime/theme-builder/aeris-theme.js.map +1 -1
- package/styles/_choice-card.scss +93 -0
- package/styles/_fallback-colors.scss +10 -0
- package/styles/_icon-artwork.scss +14 -0
- package/styles/_icon-template.scss +42 -0
- package/styles/_mobile.scss +16 -0
- package/styles/_selection-icons.scss +12 -0
- package/styles/_table-pinning.scss +119 -0
- package/styles/_tokens.scss +5 -5
- package/styles/aeris.css +447 -137
- package/styles/controls.css +205 -35
- package/tools/aeris-theme.mjs +4 -4
- package/tools/aeris-theme.schema.json +18 -13
- package/types/aeris-ui-core-accordion.d.ts +167 -93
- package/types/aeris-ui-core-animate-on-scroll.d.ts +72 -31
- package/types/aeris-ui-core-auto-complete.d.ts +339 -140
- package/types/aeris-ui-core-auto-focus.d.ts +24 -16
- package/types/aeris-ui-core-avatar.d.ts +112 -42
- package/types/aeris-ui-core-badge.d.ts +160 -46
- package/types/aeris-ui-core-block-ui.d.ts +48 -27
- package/types/aeris-ui-core-breadcrumb.d.ts +163 -92
- package/types/aeris-ui-core-button-forms.d.ts +18 -0
- package/types/aeris-ui-core-button-group.d.ts +150 -16
- package/types/aeris-ui-core-button.d.ts +274 -67
- package/types/aeris-ui-core-card.d.ts +74 -37
- package/types/aeris-ui-core-carousel.d.ts +213 -117
- package/types/aeris-ui-core-cascade-select.d.ts +275 -123
- package/types/aeris-ui-core-chart.d.ts +150 -84
- package/types/aeris-ui-core-checkbox.d.ts +173 -54
- package/types/aeris-ui-core-chip.d.ts +316 -56
- package/types/aeris-ui-core-class-names.d.ts +22 -20
- package/types/aeris-ui-core-code-block.d.ts +201 -0
- package/types/aeris-ui-core-color-picker.d.ts +450 -143
- package/types/aeris-ui-core-command-palette.d.ts +267 -0
- package/types/aeris-ui-core-compare.d.ts +230 -102
- package/types/aeris-ui-core-confirm-dialog.d.ts +450 -245
- package/types/aeris-ui-core-confirm-popup.d.ts +442 -263
- package/types/aeris-ui-core-context-menu.d.ts +270 -146
- package/types/aeris-ui-core-date-picker.d.ts +594 -219
- package/types/aeris-ui-core-dialog.d.ts +301 -117
- package/types/aeris-ui-core-divider.d.ts +58 -20
- package/types/aeris-ui-core-drawer.d.ts +380 -112
- package/types/aeris-ui-core-dynamic-dialog.d.ts +162 -137
- package/types/aeris-ui-core-editor.d.ts +257 -123
- package/types/aeris-ui-core-file-upload.d.ts +385 -197
- package/types/aeris-ui-core-filter-service.d.ts +48 -52
- package/types/aeris-ui-core-fluid.d.ts +12 -9
- package/types/aeris-ui-core-focus-trap.d.ts +39 -31
- package/types/aeris-ui-core-form-field.d.ts +163 -0
- package/types/aeris-ui-core-galleria.d.ts +636 -256
- package/types/aeris-ui-core-glass.d.ts +24 -11
- package/types/aeris-ui-core-icon-field.d.ts +94 -32
- package/types/aeris-ui-core-inplace.d.ts +129 -62
- package/types/aeris-ui-core-input-group.d.ts +84 -33
- package/types/aeris-ui-core-input-mask.d.ts +201 -69
- package/types/aeris-ui-core-input-number.d.ts +291 -87
- package/types/aeris-ui-core-input-otp.d.ts +191 -81
- package/types/aeris-ui-core-input-text.d.ts +195 -60
- package/types/aeris-ui-core-kbd.d.ts +74 -0
- package/types/aeris-ui-core-key-filter.d.ts +53 -39
- package/types/aeris-ui-core-listbox.d.ts +222 -0
- package/types/aeris-ui-core-mega-menu.d.ts +181 -121
- package/types/aeris-ui-core-menu.d.ts +283 -168
- package/types/aeris-ui-core-menubar.d.ts +289 -135
- package/types/aeris-ui-core-message.d.ts +138 -60
- package/types/aeris-ui-core-meter-group.d.ts +169 -90
- package/types/aeris-ui-core-multi-select.d.ts +469 -180
- package/types/aeris-ui-core-navbar.d.ts +208 -0
- package/types/aeris-ui-core-order-list.d.ts +168 -66
- package/types/aeris-ui-core-organization-chart.d.ts +139 -77
- package/types/aeris-ui-core-paginator.d.ts +129 -38
- package/types/aeris-ui-core-panel.d.ts +149 -78
- package/types/aeris-ui-core-password.d.ts +276 -102
- package/types/aeris-ui-core-pick-list.d.ts +428 -179
- package/types/aeris-ui-core-popover.d.ts +294 -105
- package/types/aeris-ui-core-progress-bar.d.ts +163 -73
- package/types/aeris-ui-core-progress-spinner.d.ts +116 -48
- package/types/aeris-ui-core-radio-button.d.ts +146 -50
- package/types/aeris-ui-core-rating.d.ts +149 -76
- package/types/aeris-ui-core-scroll-panel.d.ts +142 -64
- package/types/aeris-ui-core-scroll-top.d.ts +73 -29
- package/types/aeris-ui-core-select-native.d.ts +40 -0
- package/types/aeris-ui-core-select.d.ts +487 -217
- package/types/aeris-ui-core-sidebar.d.ts +220 -0
- package/types/aeris-ui-core-skeleton.d.ts +39 -17
- package/types/aeris-ui-core-slider.d.ts +270 -115
- package/types/aeris-ui-core-speed-dial.d.ts +241 -111
- package/types/aeris-ui-core-split-button.d.ts +267 -113
- package/types/aeris-ui-core-splitter.d.ts +224 -106
- package/types/aeris-ui-core-stepper.d.ts +184 -91
- package/types/aeris-ui-core-style-class.d.ts +141 -71
- package/types/aeris-ui-core-table.d.ts +729 -304
- package/types/aeris-ui-core-tabs.d.ts +193 -76
- package/types/aeris-ui-core-textarea.d.ts +271 -78
- package/types/aeris-ui-core-theme-builder.d.ts +220 -463
- package/types/aeris-ui-core-theming.d.ts +42 -45
- package/types/aeris-ui-core-tiered-menu.d.ts +257 -142
- package/types/aeris-ui-core-timeline.d.ts +109 -71
- package/types/aeris-ui-core-toast.d.ts +231 -115
- package/types/aeris-ui-core-toggle-switch.d.ts +125 -51
- package/types/aeris-ui-core-toolbar.d.ts +314 -47
- package/types/aeris-ui-core-tooltip.d.ts +157 -88
- package/types/aeris-ui-core-tree-select.d.ts +394 -171
- package/types/aeris-ui-core-tree-table.d.ts +629 -288
- package/types/aeris-ui-core-tree.d.ts +294 -165
- package/types/aeris-ui-core.d.ts +338 -74
|
@@ -1,360 +1,1649 @@
|
|
|
1
|
+
import { DOCUMENT, NgComponentOutlet, NgTemplateOutlet } from "@angular/common";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
import { Component, DestroyRef, Directive, ElementRef, InjectionToken, Renderer2, afterNextRender, computed, effect, inject, input, output, signal } from "@angular/core";
|
|
4
|
+
const AERIS_ICONS = new InjectionToken("AERIS_ICONS");
|
|
5
|
+
function provideAerisIcons(icons) {
|
|
6
|
+
const overrides = { ...icons };
|
|
7
|
+
return {
|
|
8
|
+
provide: AERIS_ICONS,
|
|
9
|
+
useFactory: () => ({
|
|
10
|
+
...inject(AERIS_ICONS, {
|
|
11
|
+
optional: true,
|
|
12
|
+
skipSelf: true
|
|
13
|
+
}),
|
|
14
|
+
...overrides
|
|
15
|
+
})
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
var ɵAerisIcon = class ɵAerisIcon {
|
|
19
|
+
aerisInternalIcon = input.required(...ngDevMode ? [{ debugName: "aerisInternalIcon" }] : /* istanbul ignore next */ []);
|
|
20
|
+
aerisInternalIconFallback = input(...ngDevMode ? [void 0, { debugName: "aerisInternalIconFallback" }] : /* istanbul ignore next */ []);
|
|
21
|
+
icons = inject(AERIS_ICONS, { optional: true });
|
|
22
|
+
component = computed(() => {
|
|
23
|
+
const name = this.aerisInternalIcon();
|
|
24
|
+
return name ? this.icons?.[name] ?? null : null;
|
|
25
|
+
}, ...ngDevMode ? [{ debugName: "component" }] : /* istanbul ignore next */ []);
|
|
26
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
27
|
+
minVersion: "12.0.0",
|
|
28
|
+
version: "22.2.3",
|
|
29
|
+
ngImport: i0,
|
|
30
|
+
type: ɵAerisIcon,
|
|
31
|
+
deps: [],
|
|
32
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
33
|
+
});
|
|
34
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
35
|
+
minVersion: "17.0.0",
|
|
36
|
+
version: "22.2.3",
|
|
37
|
+
type: ɵAerisIcon,
|
|
38
|
+
isStandalone: true,
|
|
39
|
+
selector: "span[aerisInternalIcon]",
|
|
40
|
+
inputs: {
|
|
41
|
+
aerisInternalIcon: {
|
|
42
|
+
classPropertyName: "aerisInternalIcon",
|
|
43
|
+
publicName: "aerisInternalIcon",
|
|
44
|
+
isSignal: true,
|
|
45
|
+
isRequired: true,
|
|
46
|
+
transformFunction: null
|
|
47
|
+
},
|
|
48
|
+
aerisInternalIconFallback: {
|
|
49
|
+
classPropertyName: "aerisInternalIconFallback",
|
|
50
|
+
publicName: "aerisInternalIconFallback",
|
|
51
|
+
isSignal: true,
|
|
52
|
+
isRequired: false,
|
|
53
|
+
transformFunction: null
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
host: {
|
|
57
|
+
attributes: { "aria-hidden": "true" },
|
|
58
|
+
properties: {
|
|
59
|
+
"attr.data-aeris-global-icon": "component() ? aerisInternalIcon() : null",
|
|
60
|
+
"attr.data-aeris-custom-icon": "component() ? \"\" : null"
|
|
61
|
+
},
|
|
62
|
+
classAttribute: "aeris-internal-icon"
|
|
63
|
+
},
|
|
64
|
+
ngImport: i0,
|
|
65
|
+
template: `
|
|
66
|
+
@if (component(); as icon) {
|
|
67
|
+
<ng-container [ngComponentOutlet]="icon" />
|
|
68
|
+
} @else if (aerisInternalIconFallback(); as fallback) {
|
|
69
|
+
<ng-container [ngTemplateOutlet]="fallback" />
|
|
70
|
+
}
|
|
71
|
+
`,
|
|
72
|
+
isInline: true,
|
|
73
|
+
styles: [":host(.aeris-internal-icon[data-aeris-global-icon][data-aeris-custom-icon]){display:inline-flex;align-items:center;justify-content:center;line-height:0;pointer-events:none;background:transparent;border:0;box-shadow:none;-webkit-mask:none;mask:none}:host([data-aeris-global-icon][data-aeris-custom-icon]):before,:host([data-aeris-global-icon][data-aeris-custom-icon]):after{display:none}\n"],
|
|
74
|
+
dependencies: [{
|
|
75
|
+
kind: "directive",
|
|
76
|
+
type: NgComponentOutlet,
|
|
77
|
+
selector: "[ngComponentOutlet]",
|
|
78
|
+
inputs: [
|
|
79
|
+
"ngComponentOutlet",
|
|
80
|
+
"ngComponentOutletInputs",
|
|
81
|
+
"ngComponentOutletInjector",
|
|
82
|
+
"ngComponentOutletEnvironmentInjector",
|
|
83
|
+
"ngComponentOutletContent",
|
|
84
|
+
"ngComponentOutletNgModule"
|
|
85
|
+
],
|
|
86
|
+
exportAs: ["ngComponentOutlet"]
|
|
87
|
+
}, {
|
|
88
|
+
kind: "directive",
|
|
89
|
+
type: NgTemplateOutlet,
|
|
90
|
+
selector: "[ngTemplateOutlet]",
|
|
91
|
+
inputs: [
|
|
92
|
+
"ngTemplateOutletContext",
|
|
93
|
+
"ngTemplateOutlet",
|
|
94
|
+
"ngTemplateOutletInjector"
|
|
95
|
+
]
|
|
96
|
+
}]
|
|
97
|
+
});
|
|
98
|
+
};
|
|
99
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
100
|
+
minVersion: "12.0.0",
|
|
101
|
+
version: "22.2.3",
|
|
102
|
+
ngImport: i0,
|
|
103
|
+
type: ɵAerisIcon,
|
|
104
|
+
decorators: [{
|
|
105
|
+
type: Component,
|
|
106
|
+
args: [{
|
|
107
|
+
selector: "span[aerisInternalIcon]",
|
|
108
|
+
imports: [NgComponentOutlet, NgTemplateOutlet],
|
|
109
|
+
template: `
|
|
110
|
+
@if (component(); as icon) {
|
|
111
|
+
<ng-container [ngComponentOutlet]="icon" />
|
|
112
|
+
} @else if (aerisInternalIconFallback(); as fallback) {
|
|
113
|
+
<ng-container [ngTemplateOutlet]="fallback" />
|
|
114
|
+
}
|
|
115
|
+
`,
|
|
116
|
+
host: {
|
|
117
|
+
class: "aeris-internal-icon",
|
|
118
|
+
"aria-hidden": "true",
|
|
119
|
+
"[attr.data-aeris-global-icon]": "component() ? aerisInternalIcon() : null",
|
|
120
|
+
"[attr.data-aeris-custom-icon]": "component() ? \"\" : null"
|
|
121
|
+
},
|
|
122
|
+
styles: [":host(.aeris-internal-icon[data-aeris-global-icon][data-aeris-custom-icon]){display:inline-flex;align-items:center;justify-content:center;line-height:0;pointer-events:none;background:transparent;border:0;box-shadow:none;-webkit-mask:none;mask:none}:host([data-aeris-global-icon][data-aeris-custom-icon]):before,:host([data-aeris-global-icon][data-aeris-custom-icon]):after{display:none}\n"]
|
|
123
|
+
}]
|
|
124
|
+
}],
|
|
125
|
+
propDecorators: {
|
|
126
|
+
aerisInternalIcon: [{
|
|
127
|
+
type: i0.Input,
|
|
128
|
+
args: [{
|
|
129
|
+
isSignal: true,
|
|
130
|
+
alias: "aerisInternalIcon",
|
|
131
|
+
required: true
|
|
132
|
+
}]
|
|
133
|
+
}],
|
|
134
|
+
aerisInternalIconFallback: [{
|
|
135
|
+
type: i0.Input,
|
|
136
|
+
args: [{
|
|
137
|
+
isSignal: true,
|
|
138
|
+
alias: "aerisInternalIconFallback",
|
|
139
|
+
required: false
|
|
140
|
+
}]
|
|
141
|
+
}]
|
|
142
|
+
}
|
|
143
|
+
});
|
|
144
|
+
function aerisInternalDisplayInvalid(invalid, touched) {
|
|
145
|
+
return invalid && (touched ?? true);
|
|
146
|
+
}
|
|
147
|
+
function aerisInternalClampOverlayPoint(point, width, height, viewportWidth, viewportHeight, margin, viewportLeft = 0, viewportTop = 0) {
|
|
148
|
+
const padding = normalizePadding(margin);
|
|
149
|
+
return {
|
|
150
|
+
x: clamp(point.x, viewportLeft + padding.left, Math.max(viewportLeft + padding.left, viewportLeft + viewportWidth - width - padding.right)),
|
|
151
|
+
y: clamp(point.y, viewportTop + padding.top, Math.max(viewportTop + padding.top, viewportTop + viewportHeight - height - padding.bottom))
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
function aerisInternalPositionAnchoredOverlay(options) {
|
|
155
|
+
const bounds = resolveBounds(options);
|
|
156
|
+
const placement = resolvePlacement(options, bounds);
|
|
157
|
+
const point = rawPosition(placement, options);
|
|
158
|
+
const clampedPoint = aerisInternalClampOverlayPoint(point, options.width, options.height, bounds.right - bounds.left, bounds.bottom - bounds.top, 0, bounds.left, bounds.top);
|
|
159
|
+
return {
|
|
160
|
+
placement,
|
|
161
|
+
...options.tetherToAnchor ? tetheredPoint(placement, point, clampedPoint) : clampedPoint
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
function tetheredPoint(placement, point, clampedPoint) {
|
|
165
|
+
return placement === "top" || placement === "bottom" ? {
|
|
166
|
+
x: clampedPoint.x,
|
|
167
|
+
y: point.y
|
|
168
|
+
} : {
|
|
169
|
+
x: point.x,
|
|
170
|
+
y: clampedPoint.y
|
|
171
|
+
};
|
|
172
|
+
}
|
|
173
|
+
function resolvePlacement(options, bounds) {
|
|
174
|
+
const spaces = {
|
|
175
|
+
bottom: bounds.bottom - options.target.bottom - options.offset,
|
|
176
|
+
top: options.target.top - bounds.top - options.offset,
|
|
177
|
+
right: bounds.right - options.target.right - options.offset,
|
|
178
|
+
left: options.target.left - bounds.left - options.offset
|
|
179
|
+
};
|
|
180
|
+
const candidates = placementCandidates(options.placement === "auto" ? "bottom" : options.placement, options.tetherToAnchor ?? false);
|
|
181
|
+
return candidates.find((placement) => spaces[placement] >= (placement === "top" || placement === "bottom" ? options.height : options.width)) ?? candidates.reduce((best, placement) => spaces[placement] > spaces[best] ? placement : best);
|
|
182
|
+
}
|
|
183
|
+
function resolveBounds(options) {
|
|
184
|
+
const padding = normalizePadding(options.collisionPadding ?? options.margin);
|
|
185
|
+
const left = options.viewportLeft ?? 0;
|
|
186
|
+
const top = options.viewportTop ?? 0;
|
|
187
|
+
return {
|
|
188
|
+
top: top + padding.top,
|
|
189
|
+
right: left + options.viewportWidth - padding.right,
|
|
190
|
+
bottom: top + options.viewportHeight - padding.bottom,
|
|
191
|
+
left: left + padding.left
|
|
192
|
+
};
|
|
193
|
+
}
|
|
194
|
+
function normalizePadding(padding) {
|
|
195
|
+
if (typeof padding === "number") {
|
|
196
|
+
const value = Math.max(0, padding);
|
|
197
|
+
return {
|
|
198
|
+
top: value,
|
|
199
|
+
right: value,
|
|
200
|
+
bottom: value,
|
|
201
|
+
left: value
|
|
202
|
+
};
|
|
203
|
+
}
|
|
204
|
+
return {
|
|
205
|
+
top: Math.max(0, padding.top ?? 0),
|
|
206
|
+
right: Math.max(0, padding.right ?? 0),
|
|
207
|
+
bottom: Math.max(0, padding.bottom ?? 0),
|
|
208
|
+
left: Math.max(0, padding.left ?? 0)
|
|
209
|
+
};
|
|
210
|
+
}
|
|
211
|
+
function placementCandidates(preferred, preserveAxis) {
|
|
212
|
+
if (preserveAxis) {
|
|
213
|
+
if (preferred === "top") return ["top", "bottom"];
|
|
214
|
+
if (preferred === "bottom") return ["bottom", "top"];
|
|
215
|
+
if (preferred === "right") return ["right", "left"];
|
|
216
|
+
return ["left", "right"];
|
|
217
|
+
}
|
|
218
|
+
switch (preferred) {
|
|
219
|
+
case "top": return [
|
|
220
|
+
"top",
|
|
221
|
+
"bottom",
|
|
222
|
+
"right",
|
|
223
|
+
"left"
|
|
224
|
+
];
|
|
225
|
+
case "right": return [
|
|
226
|
+
"right",
|
|
227
|
+
"left",
|
|
228
|
+
"bottom",
|
|
229
|
+
"top"
|
|
230
|
+
];
|
|
231
|
+
case "bottom": return [
|
|
232
|
+
"bottom",
|
|
233
|
+
"top",
|
|
234
|
+
"right",
|
|
235
|
+
"left"
|
|
236
|
+
];
|
|
237
|
+
case "left": return [
|
|
238
|
+
"left",
|
|
239
|
+
"right",
|
|
240
|
+
"bottom",
|
|
241
|
+
"top"
|
|
242
|
+
];
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
function rawPosition(placement, options) {
|
|
246
|
+
if (placement === "top" || placement === "bottom") return {
|
|
247
|
+
x: aligned(options.target.left, options.target.width, options.width, options.direction === "rtl" && options.alignment !== "center" ? options.alignment === "start" ? "end" : "start" : options.alignment),
|
|
248
|
+
y: placement === "bottom" ? options.target.bottom + options.offset : options.target.top - options.height - options.offset
|
|
249
|
+
};
|
|
250
|
+
return {
|
|
251
|
+
x: placement === "right" ? options.target.right + options.offset : options.target.left - options.width - options.offset,
|
|
252
|
+
y: aligned(options.target.top, options.target.height, options.height, options.alignment)
|
|
253
|
+
};
|
|
254
|
+
}
|
|
255
|
+
function aligned(start, targetSize, overlaySize, alignment) {
|
|
256
|
+
if (alignment === "start") return start;
|
|
257
|
+
if (alignment === "end") return start + targetSize - overlaySize;
|
|
258
|
+
return start + targetSize / 2 - overlaySize / 2;
|
|
259
|
+
}
|
|
260
|
+
function clamp(value, minimum, maximum) {
|
|
261
|
+
return Math.min(Math.max(value, minimum), maximum);
|
|
262
|
+
}
|
|
263
|
+
function aerisInternalCreateFrameScheduler(callback) {
|
|
264
|
+
let frame = null;
|
|
265
|
+
const request = globalThis.requestAnimationFrame?.bind(globalThis);
|
|
266
|
+
const cancelFrame = globalThis.cancelAnimationFrame?.bind(globalThis);
|
|
267
|
+
return {
|
|
268
|
+
schedule: () => {
|
|
269
|
+
if (!request) {
|
|
270
|
+
callback();
|
|
271
|
+
return;
|
|
272
|
+
}
|
|
273
|
+
if (frame !== null) return;
|
|
274
|
+
frame = request(() => {
|
|
275
|
+
frame = null;
|
|
276
|
+
callback();
|
|
277
|
+
});
|
|
278
|
+
},
|
|
279
|
+
cancel: () => {
|
|
280
|
+
if (frame === null) return;
|
|
281
|
+
cancelFrame?.(frame);
|
|
282
|
+
frame = null;
|
|
283
|
+
}
|
|
284
|
+
};
|
|
285
|
+
}
|
|
286
|
+
function aerisInternalViewportBounds(view) {
|
|
287
|
+
const viewport = view.visualViewport;
|
|
288
|
+
const left = viewport?.offsetLeft ?? 0;
|
|
289
|
+
const top = viewport?.offsetTop ?? 0;
|
|
290
|
+
const width = viewport?.width ?? view.innerWidth;
|
|
291
|
+
const height = viewport?.height ?? view.innerHeight;
|
|
292
|
+
return {
|
|
293
|
+
left,
|
|
294
|
+
top,
|
|
295
|
+
width,
|
|
296
|
+
height,
|
|
297
|
+
right: Math.max(0, view.innerWidth - left - width),
|
|
298
|
+
bottom: Math.max(0, view.innerHeight - top - height)
|
|
299
|
+
};
|
|
300
|
+
}
|
|
301
|
+
function aerisInternalObserveViewport(element, document) {
|
|
302
|
+
const view = document.defaultView;
|
|
303
|
+
if (!view) return () => void 0;
|
|
304
|
+
const properties = [
|
|
305
|
+
"left",
|
|
306
|
+
"top",
|
|
307
|
+
"width",
|
|
308
|
+
"height",
|
|
309
|
+
"right",
|
|
310
|
+
"bottom"
|
|
311
|
+
];
|
|
312
|
+
const previous = properties.map((side) => element.style.getPropertyValue(`--_aeris-viewport-${side}`));
|
|
313
|
+
const update = () => {
|
|
314
|
+
const bounds = aerisInternalViewportBounds(view);
|
|
315
|
+
for (const side of properties) element.style.setProperty(`--_aeris-viewport-${side}`, `${bounds[side]}px`);
|
|
316
|
+
};
|
|
317
|
+
const frame = aerisInternalCreateFrameScheduler(update);
|
|
318
|
+
update();
|
|
319
|
+
view.addEventListener("resize", frame.schedule);
|
|
320
|
+
view.visualViewport?.addEventListener("resize", frame.schedule);
|
|
321
|
+
view.visualViewport?.addEventListener("scroll", frame.schedule);
|
|
322
|
+
return () => {
|
|
323
|
+
view.removeEventListener("resize", frame.schedule);
|
|
324
|
+
view.visualViewport?.removeEventListener("resize", frame.schedule);
|
|
325
|
+
view.visualViewport?.removeEventListener("scroll", frame.schedule);
|
|
326
|
+
frame.cancel();
|
|
327
|
+
properties.forEach((side, index) => {
|
|
328
|
+
const property = `--_aeris-viewport-${side}`;
|
|
329
|
+
const value = previous[index];
|
|
330
|
+
if (value) element.style.setProperty(property, value);
|
|
331
|
+
else element.style.removeProperty(property);
|
|
332
|
+
});
|
|
333
|
+
};
|
|
334
|
+
}
|
|
335
|
+
const scrollLockStates = /* @__PURE__ */ new WeakMap();
|
|
336
|
+
const overlayStacks = /* @__PURE__ */ new WeakMap();
|
|
337
|
+
const overlayDismissals = /* @__PURE__ */ new WeakMap();
|
|
338
|
+
function dismissTopAerisOverlay(document = globalThis.document) {
|
|
339
|
+
if (!document) return "none";
|
|
340
|
+
const token = overlayStacks.get(document)?.at(-1);
|
|
341
|
+
if (!token) return "none";
|
|
342
|
+
return overlayDismissals.get(token)?.() ? "dismissed" : "blocked";
|
|
343
|
+
}
|
|
344
|
+
function ɵregisterAerisOverlay(document, token, dismiss) {
|
|
345
|
+
const stack = overlayStacks.get(document) ?? [];
|
|
346
|
+
const existingIndex = stack.indexOf(token);
|
|
347
|
+
if (existingIndex >= 0) stack.splice(existingIndex, 1);
|
|
348
|
+
stack.push(token);
|
|
349
|
+
overlayStacks.set(document, stack);
|
|
350
|
+
if (dismiss) overlayDismissals.set(token, dismiss);
|
|
351
|
+
}
|
|
352
|
+
function ɵunregisterAerisOverlay(document, token) {
|
|
353
|
+
const stack = overlayStacks.get(document);
|
|
354
|
+
if (!stack) return;
|
|
355
|
+
const index = stack.indexOf(token);
|
|
356
|
+
if (index >= 0) stack.splice(index, 1);
|
|
357
|
+
overlayDismissals.delete(token);
|
|
358
|
+
if (stack.length === 0) overlayStacks.delete(document);
|
|
359
|
+
}
|
|
360
|
+
function ɵisTopmostAerisOverlay(document, token) {
|
|
361
|
+
return overlayStacks.get(document)?.at(-1) === token;
|
|
362
|
+
}
|
|
363
|
+
function ɵlockAerisDocumentScroll(document) {
|
|
364
|
+
const existing = scrollLockStates.get(document);
|
|
365
|
+
if (existing) {
|
|
366
|
+
existing.count += 1;
|
|
367
|
+
return;
|
|
368
|
+
}
|
|
369
|
+
const body = document.body;
|
|
370
|
+
const state = {
|
|
371
|
+
count: 1,
|
|
372
|
+
overflow: body.style.overflow,
|
|
373
|
+
paddingInlineEnd: body.style.getPropertyValue("padding-inline-end")
|
|
374
|
+
};
|
|
375
|
+
scrollLockStates.set(document, state);
|
|
376
|
+
const view = document.defaultView;
|
|
377
|
+
const root = document.documentElement;
|
|
378
|
+
if (view && root.clientWidth) {
|
|
379
|
+
const scrollbarWidth = view.innerWidth - root.clientWidth;
|
|
380
|
+
if (scrollbarWidth > 0) {
|
|
381
|
+
const currentPadding = Number.parseFloat(view.getComputedStyle(body).paddingInlineEnd) || 0;
|
|
382
|
+
body.style.setProperty("padding-inline-end", `${currentPadding + scrollbarWidth}px`);
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
body.style.overflow = "hidden";
|
|
386
|
+
}
|
|
387
|
+
function ɵunlockAerisDocumentScroll(document) {
|
|
388
|
+
const state = scrollLockStates.get(document);
|
|
389
|
+
if (!state) return;
|
|
390
|
+
state.count -= 1;
|
|
391
|
+
if (state.count > 0) return;
|
|
392
|
+
const body = document.body;
|
|
393
|
+
body.style.overflow = state.overflow;
|
|
394
|
+
if (state.paddingInlineEnd) body.style.setProperty("padding-inline-end", state.paddingInlineEnd);
|
|
395
|
+
else body.style.removeProperty("padding-inline-end");
|
|
396
|
+
scrollLockStates.delete(document);
|
|
397
|
+
}
|
|
398
|
+
let nextAppendToZIndex = 1100;
|
|
399
|
+
const positionedTargets = /* @__PURE__ */ new WeakMap();
|
|
400
|
+
const AERIS_OVERLAY_APPEND_TO = new InjectionToken("AERIS_OVERLAY_APPEND_TO", { factory: () => void 0 });
|
|
401
|
+
function aerisInternalResolveAppendTo(appendTo, document) {
|
|
402
|
+
if (!appendTo || appendTo === "self") return "self";
|
|
403
|
+
if (appendTo === "body") return document.body;
|
|
404
|
+
if (isHtmlElement(appendTo)) return appendTo;
|
|
405
|
+
const nativeElement = elementRefNativeElement(appendTo);
|
|
406
|
+
return isHtmlElement(nativeElement) ? nativeElement : "self";
|
|
407
|
+
}
|
|
408
|
+
var ɵAerisAppendTo = class ɵAerisAppendTo {
|
|
409
|
+
document = inject(DOCUMENT);
|
|
410
|
+
destroyRef = inject(DestroyRef);
|
|
411
|
+
element = inject(ElementRef).nativeElement;
|
|
412
|
+
renderer = inject(Renderer2);
|
|
413
|
+
defaultAppendTo = inject(AERIS_OVERLAY_APPEND_TO);
|
|
414
|
+
frame = null;
|
|
415
|
+
originCaptured = false;
|
|
416
|
+
originParent = null;
|
|
417
|
+
originNextSibling = null;
|
|
418
|
+
restoringToOrigin = false;
|
|
419
|
+
unconstrainedPanelWidth = 0;
|
|
420
|
+
unconstrainedPanelHeight = 0;
|
|
421
|
+
targetOverride = signal(void 0, ...ngDevMode ? [{ debugName: "targetOverride" }] : /* istanbul ignore next */ []);
|
|
422
|
+
setTarget(target) {
|
|
423
|
+
this.targetOverride.set(target);
|
|
424
|
+
}
|
|
425
|
+
aerisInternalAppendTo = input(...ngDevMode ? [void 0, { debugName: "aerisInternalAppendTo" }] : /* istanbul ignore next */ []);
|
|
426
|
+
aerisInternalAppendToDefault = input("self", ...ngDevMode ? [{ debugName: "aerisInternalAppendToDefault" }] : /* istanbul ignore next */ []);
|
|
427
|
+
aerisInternalAppendToAnchor = input(null, ...ngDevMode ? [{ debugName: "aerisInternalAppendToAnchor" }] : /* istanbul ignore next */ []);
|
|
428
|
+
aerisInternalAppendToOffset = input(7, ...ngDevMode ? [{ debugName: "aerisInternalAppendToOffset" }] : /* istanbul ignore next */ []);
|
|
429
|
+
aerisInternalAppendToMatchWidth = input(false, ...ngDevMode ? [{ debugName: "aerisInternalAppendToMatchWidth" }] : /* istanbul ignore next */ []);
|
|
430
|
+
aerisInternalAppendToPlacement = input("auto", ...ngDevMode ? [{ debugName: "aerisInternalAppendToPlacement" }] : /* istanbul ignore next */ []);
|
|
431
|
+
aerisInternalAppendToAlignment = input("auto", ...ngDevMode ? [{ debugName: "aerisInternalAppendToAlignment" }] : /* istanbul ignore next */ []);
|
|
432
|
+
aerisInternalAppendToCollisionPadding = input(8, ...ngDevMode ? [{ debugName: "aerisInternalAppendToCollisionPadding" }] : /* istanbul ignore next */ []);
|
|
433
|
+
aerisInternalAppendToPositionSelf = input(true, ...ngDevMode ? [{ debugName: "aerisInternalAppendToPositionSelf" }] : /* istanbul ignore next */ []);
|
|
434
|
+
aerisInternalAppendToDismiss = input(null, ...ngDevMode ? [{ debugName: "aerisInternalAppendToDismiss" }] : /* istanbul ignore next */ []);
|
|
435
|
+
aerisInternalAppendToOutside = output();
|
|
436
|
+
constructor() {
|
|
437
|
+
effect((onCleanup) => {
|
|
438
|
+
const dismiss = this.aerisInternalAppendToDismiss();
|
|
439
|
+
if (dismiss) {
|
|
440
|
+
ɵregisterAerisOverlay(this.document, this.element, dismiss);
|
|
441
|
+
onCleanup(() => ɵunregisterAerisOverlay(this.document, this.element));
|
|
442
|
+
}
|
|
443
|
+
const target = aerisInternalResolveAppendTo(this.targetOverride() ?? this.aerisInternalAppendTo() ?? this.defaultAppendTo ?? this.aerisInternalAppendToDefault(), this.document);
|
|
444
|
+
const anchor = this.aerisInternalAppendToAnchor();
|
|
445
|
+
const automaticallyPortaled = this.aerisInternalAppendTo() === void 0 && target === "self" && !!anchor && this.hasClippingAncestor(anchor);
|
|
446
|
+
const effectiveTarget = automaticallyPortaled ? this.document.body : target;
|
|
447
|
+
this.captureOrigin();
|
|
448
|
+
if (effectiveTarget === "self") this.restoreToOrigin();
|
|
449
|
+
if (effectiveTarget === "self" && (!anchor || !this.aerisInternalAppendToPositionSelf())) {
|
|
450
|
+
this.element.removeAttribute("data-aeris-append-to");
|
|
451
|
+
this.element.removeAttribute("data-aeris-auto-portaled");
|
|
452
|
+
return;
|
|
453
|
+
}
|
|
454
|
+
const positioningTarget = effectiveTarget === "self" ? this.element.parentElement : effectiveTarget;
|
|
455
|
+
if (!positioningTarget) return;
|
|
456
|
+
const inheritedStyles = this.preserveInheritedStyles();
|
|
457
|
+
const stopViewport = !anchor && effectiveTarget === this.document.body ? aerisInternalObserveViewport(this.element, this.document) : () => void 0;
|
|
458
|
+
const positioningStyles = this.preserveInlineStyles([
|
|
459
|
+
"position",
|
|
460
|
+
"inset",
|
|
461
|
+
"inset-block-start",
|
|
462
|
+
"inset-inline-start",
|
|
463
|
+
"right",
|
|
464
|
+
"bottom",
|
|
465
|
+
"left",
|
|
466
|
+
"top",
|
|
467
|
+
"min-width",
|
|
468
|
+
"max-width",
|
|
469
|
+
"max-height",
|
|
470
|
+
"overflow-x",
|
|
471
|
+
"overflow-y",
|
|
472
|
+
"overscroll-behavior",
|
|
473
|
+
"z-index"
|
|
474
|
+
]);
|
|
475
|
+
const targetPosition = this.ensurePositionedTarget(positioningTarget);
|
|
476
|
+
if (effectiveTarget !== "self") {
|
|
477
|
+
this.renderer.appendChild(effectiveTarget, this.element);
|
|
478
|
+
this.applyInheritedStyles(inheritedStyles);
|
|
479
|
+
this.renderer.setAttribute(this.element, "data-aeris-append-to", effectiveTarget === this.document.body ? "body" : "target");
|
|
480
|
+
if (automaticallyPortaled) this.renderer.setAttribute(this.element, "data-aeris-auto-portaled", "true");
|
|
481
|
+
else this.element.removeAttribute("data-aeris-auto-portaled");
|
|
482
|
+
this.bringToFront();
|
|
483
|
+
} else {
|
|
484
|
+
this.element.removeAttribute("data-aeris-append-to");
|
|
485
|
+
this.element.removeAttribute("data-aeris-auto-portaled");
|
|
486
|
+
}
|
|
487
|
+
const reposition = () => this.schedulePosition(anchor, positioningTarget);
|
|
488
|
+
const pointerdown = (event) => {
|
|
489
|
+
const eventTarget = event.target;
|
|
490
|
+
if (!isDomNode(eventTarget)) return;
|
|
491
|
+
if (this.element.contains(eventTarget) || anchor?.contains(eventTarget)) return;
|
|
492
|
+
this.aerisInternalAppendToOutside.emit(event);
|
|
493
|
+
};
|
|
494
|
+
const view = this.document.defaultView;
|
|
495
|
+
const visualViewport = view?.visualViewport;
|
|
496
|
+
view?.addEventListener("resize", reposition);
|
|
497
|
+
visualViewport?.addEventListener("resize", reposition);
|
|
498
|
+
visualViewport?.addEventListener("scroll", reposition);
|
|
499
|
+
this.document.addEventListener("scroll", reposition, true);
|
|
500
|
+
this.document.addEventListener("pointerdown", pointerdown, true);
|
|
501
|
+
const resizeObserver = typeof ResizeObserver === "undefined" || !anchor ? null : new ResizeObserver(reposition);
|
|
502
|
+
if (anchor) resizeObserver?.observe(anchor);
|
|
503
|
+
resizeObserver?.observe(this.element);
|
|
504
|
+
if (anchor && view) this.positionConnectedOverlay(anchor, positioningTarget, view);
|
|
505
|
+
onCleanup(() => {
|
|
506
|
+
stopViewport();
|
|
507
|
+
view?.removeEventListener("resize", reposition);
|
|
508
|
+
visualViewport?.removeEventListener("resize", reposition);
|
|
509
|
+
visualViewport?.removeEventListener("scroll", reposition);
|
|
510
|
+
this.document.removeEventListener("scroll", reposition, true);
|
|
511
|
+
this.document.removeEventListener("pointerdown", pointerdown, true);
|
|
512
|
+
resizeObserver?.disconnect();
|
|
513
|
+
this.cancelFrame();
|
|
514
|
+
this.restoreInlineStyles(positioningStyles);
|
|
515
|
+
this.element.removeAttribute("data-placement");
|
|
516
|
+
this.element.removeAttribute("data-positioned");
|
|
517
|
+
this.element.removeAttribute("data-viewport-constrained");
|
|
518
|
+
this.element.removeAttribute("data-viewport-constrained-width");
|
|
519
|
+
this.restoreInheritedStyles(inheritedStyles);
|
|
520
|
+
targetPosition.restore();
|
|
521
|
+
this.element.removeAttribute("data-aeris-append-to");
|
|
522
|
+
this.element.removeAttribute("data-aeris-auto-portaled");
|
|
523
|
+
if (effectiveTarget !== "self") this.element.remove();
|
|
524
|
+
});
|
|
525
|
+
});
|
|
526
|
+
this.destroyRef.onDestroy(() => {
|
|
527
|
+
this.element.remove();
|
|
528
|
+
queueMicrotask(() => this.element.remove());
|
|
529
|
+
});
|
|
530
|
+
}
|
|
531
|
+
restore() {
|
|
532
|
+
ɵunregisterAerisOverlay(this.document, this.element);
|
|
533
|
+
this.restoreToOrigin();
|
|
534
|
+
}
|
|
535
|
+
isTopmost() {
|
|
536
|
+
return ɵisTopmostAerisOverlay(this.document, this.element);
|
|
537
|
+
}
|
|
538
|
+
schedulePosition(anchor, target) {
|
|
539
|
+
if (!anchor || this.frame !== null) return;
|
|
540
|
+
const view = this.document.defaultView;
|
|
541
|
+
if (!view) return;
|
|
542
|
+
this.frame = view.requestAnimationFrame(() => {
|
|
543
|
+
this.frame = null;
|
|
544
|
+
this.positionConnectedOverlay(anchor, target, view);
|
|
545
|
+
});
|
|
546
|
+
}
|
|
547
|
+
positionConnectedOverlay(anchor, target, view) {
|
|
548
|
+
if (!anchor.isConnected || !this.element.isConnected) return;
|
|
549
|
+
const anchorRect = anchor.getBoundingClientRect();
|
|
550
|
+
this.element.style.position = target === this.document.body ? "fixed" : "absolute";
|
|
551
|
+
this.element.style.inset = "auto";
|
|
552
|
+
this.element.style.insetBlockStart = "auto";
|
|
553
|
+
this.element.style.insetInlineStart = "auto";
|
|
554
|
+
this.element.style.right = "auto";
|
|
555
|
+
this.element.style.bottom = "auto";
|
|
556
|
+
const viewport = aerisInternalViewportBounds(view);
|
|
557
|
+
const viewportLeft = viewport.left;
|
|
558
|
+
const viewportTop = viewport.top;
|
|
559
|
+
const collisionPadding = this.collisionPadding(view);
|
|
560
|
+
const availableWidth = Math.max(0, viewport.width - (collisionPadding.left ?? 0) - (collisionPadding.right ?? 0));
|
|
561
|
+
if (this.aerisInternalAppendToMatchWidth()) this.element.style.minWidth = `${Math.min(anchorRect.width, availableWidth)}px`;
|
|
562
|
+
const availableHeight = Math.max(0, viewport.height - (collisionPadding.top ?? 0) - (collisionPadding.bottom ?? 0));
|
|
563
|
+
let panelRect = this.element.getBoundingClientRect();
|
|
564
|
+
const wasWidthConstrained = this.element.hasAttribute("data-viewport-constrained-width");
|
|
565
|
+
const naturalWidth = wasWidthConstrained ? Math.max(this.unconstrainedPanelWidth, this.element.scrollWidth) : panelRect.width;
|
|
566
|
+
this.unconstrainedPanelWidth = naturalWidth;
|
|
567
|
+
if (naturalWidth > availableWidth && availableWidth > 0) {
|
|
568
|
+
this.element.style.maxWidth = `${availableWidth}px`;
|
|
569
|
+
this.element.style.overflowX = "auto";
|
|
570
|
+
this.element.style.overscrollBehavior = "contain";
|
|
571
|
+
this.element.setAttribute("data-viewport-constrained-width", "true");
|
|
572
|
+
panelRect = this.element.getBoundingClientRect();
|
|
573
|
+
} else if (wasWidthConstrained) {
|
|
574
|
+
this.element.style.removeProperty("max-width");
|
|
575
|
+
this.element.style.removeProperty("overflow-x");
|
|
576
|
+
this.element.removeAttribute("data-viewport-constrained-width");
|
|
577
|
+
panelRect = this.element.getBoundingClientRect();
|
|
578
|
+
}
|
|
579
|
+
const wasHeightConstrained = this.element.hasAttribute("data-viewport-constrained");
|
|
580
|
+
const naturalHeight = wasHeightConstrained ? Math.max(this.unconstrainedPanelHeight, this.element.scrollHeight) : panelRect.height;
|
|
581
|
+
this.unconstrainedPanelHeight = naturalHeight;
|
|
582
|
+
const direction = view.getComputedStyle(anchor).direction;
|
|
583
|
+
const configuredAlignment = this.aerisInternalAppendToAlignment();
|
|
584
|
+
const alignment = configuredAlignment === "auto" ? direction === "rtl" ? "end" : "start" : configuredAlignment;
|
|
585
|
+
const position = (height = panelRect.height || this.element.offsetHeight) => aerisInternalPositionAnchoredOverlay({
|
|
586
|
+
target: anchorRect,
|
|
587
|
+
width: panelRect.width || this.element.offsetWidth || anchorRect.width,
|
|
588
|
+
height,
|
|
589
|
+
placement: this.aerisInternalAppendToPlacement(),
|
|
590
|
+
alignment,
|
|
591
|
+
offset: this.aerisInternalAppendToOffset(),
|
|
592
|
+
margin: 8,
|
|
593
|
+
viewportWidth: viewport?.width ?? view.innerWidth,
|
|
594
|
+
viewportHeight: viewport?.height ?? view.innerHeight,
|
|
595
|
+
viewportLeft,
|
|
596
|
+
viewportTop,
|
|
597
|
+
collisionPadding,
|
|
598
|
+
tetherToAnchor: true
|
|
599
|
+
});
|
|
600
|
+
let point = position(naturalHeight);
|
|
601
|
+
const viewportBounds = {
|
|
602
|
+
top: viewportTop + (collisionPadding.top ?? 0),
|
|
603
|
+
bottom: viewportTop + (viewport?.height ?? view.innerHeight) - (collisionPadding.bottom ?? 0)
|
|
604
|
+
};
|
|
605
|
+
const anchorIntersectsViewport = anchorRect.bottom > viewportBounds.top && anchorRect.top < viewportBounds.bottom;
|
|
606
|
+
const placementHeight = anchorIntersectsViewport && point.placement === "bottom" ? viewportBounds.bottom - anchorRect.bottom - this.aerisInternalAppendToOffset() : anchorIntersectsViewport && point.placement === "top" ? anchorRect.top - viewportBounds.top - this.aerisInternalAppendToOffset() : availableHeight;
|
|
607
|
+
const constrainedHeight = Math.max(0, Math.min(availableHeight, placementHeight));
|
|
608
|
+
if (naturalHeight > constrainedHeight && constrainedHeight > 0) {
|
|
609
|
+
this.element.style.maxHeight = `${Math.floor(constrainedHeight)}px`;
|
|
610
|
+
this.element.style.overflowY = "auto";
|
|
611
|
+
this.element.style.overscrollBehavior = "contain";
|
|
612
|
+
this.element.setAttribute("data-viewport-constrained", "true");
|
|
613
|
+
panelRect = this.element.getBoundingClientRect();
|
|
614
|
+
} else if (wasHeightConstrained) {
|
|
615
|
+
this.element.style.removeProperty("max-height");
|
|
616
|
+
this.element.style.removeProperty("overflow-y");
|
|
617
|
+
this.element.removeAttribute("data-viewport-constrained");
|
|
618
|
+
panelRect = this.element.getBoundingClientRect();
|
|
619
|
+
}
|
|
620
|
+
point = position();
|
|
621
|
+
if (!this.element.hasAttribute("data-viewport-constrained") && !this.element.hasAttribute("data-viewport-constrained-width")) this.element.style.removeProperty("overscroll-behavior");
|
|
622
|
+
if (target === this.document.body) {
|
|
623
|
+
this.element.style.left = `${point.x}px`;
|
|
624
|
+
this.element.style.top = `${point.y}px`;
|
|
625
|
+
} else {
|
|
626
|
+
const targetRect = target.getBoundingClientRect();
|
|
627
|
+
this.element.style.left = `${point.x - targetRect.left - target.clientLeft + target.scrollLeft}px`;
|
|
628
|
+
this.element.style.top = `${point.y - targetRect.top - target.clientTop + target.scrollTop}px`;
|
|
629
|
+
}
|
|
630
|
+
this.element.setAttribute("data-placement", point.placement);
|
|
631
|
+
this.element.setAttribute("data-positioned", "true");
|
|
632
|
+
}
|
|
633
|
+
collisionPadding(view) {
|
|
634
|
+
const configured = this.aerisInternalAppendToCollisionPadding();
|
|
635
|
+
const padding = typeof configured === "number" ? {
|
|
636
|
+
top: configured,
|
|
637
|
+
right: configured,
|
|
638
|
+
bottom: configured,
|
|
639
|
+
left: configured
|
|
640
|
+
} : configured;
|
|
641
|
+
const rootStyles = view.getComputedStyle(this.document.documentElement);
|
|
642
|
+
const value = (side) => {
|
|
643
|
+
const safeArea = Number.parseFloat(rootStyles.getPropertyValue(`--aeris-safe-area-${side}`)) || 0;
|
|
644
|
+
return Math.max(0, padding[side] ?? 0) + safeArea;
|
|
645
|
+
};
|
|
646
|
+
return {
|
|
647
|
+
top: value("top"),
|
|
648
|
+
right: value("right"),
|
|
649
|
+
bottom: value("bottom"),
|
|
650
|
+
left: value("left")
|
|
651
|
+
};
|
|
652
|
+
}
|
|
653
|
+
preserveInheritedStyles() {
|
|
654
|
+
const view = this.document.defaultView;
|
|
655
|
+
if (!view) return /* @__PURE__ */ new Map();
|
|
656
|
+
const computed = view.getComputedStyle(this.element);
|
|
657
|
+
const preserved = /* @__PURE__ */ new Map();
|
|
658
|
+
const properties = [
|
|
659
|
+
"color",
|
|
660
|
+
"direction",
|
|
661
|
+
"font"
|
|
662
|
+
];
|
|
663
|
+
for (let index = 0; index < computed.length; index += 1) {
|
|
664
|
+
const property = computed.item(index);
|
|
665
|
+
if (property.startsWith("--aeris-") || property.startsWith("--_aeris-")) properties.push(property);
|
|
666
|
+
}
|
|
667
|
+
for (const property of properties) {
|
|
668
|
+
const value = computed.getPropertyValue(property);
|
|
669
|
+
if (!value) continue;
|
|
670
|
+
preserved.set(property, {
|
|
671
|
+
source: value,
|
|
672
|
+
previous: this.element.style.getPropertyValue(property)
|
|
673
|
+
});
|
|
674
|
+
}
|
|
675
|
+
return preserved;
|
|
676
|
+
}
|
|
677
|
+
applyInheritedStyles(preserved) {
|
|
678
|
+
const computed = this.document.defaultView?.getComputedStyle(this.element);
|
|
679
|
+
if (!computed) return;
|
|
680
|
+
for (const [property, value] of preserved) if (computed.getPropertyValue(property) !== value.source) this.element.style.setProperty(property, value.source);
|
|
681
|
+
}
|
|
682
|
+
restoreInheritedStyles(preserved) {
|
|
683
|
+
for (const [property, value] of preserved) if (value.previous) this.element.style.setProperty(property, value.previous);
|
|
684
|
+
else this.element.style.removeProperty(property);
|
|
685
|
+
}
|
|
686
|
+
preserveInlineStyles(properties) {
|
|
687
|
+
return new Map(properties.map((property) => [property, this.element.style.getPropertyValue(property)]));
|
|
688
|
+
}
|
|
689
|
+
restoreInlineStyles(previous) {
|
|
690
|
+
for (const [property, value] of previous) if (value) this.element.style.setProperty(property, value);
|
|
691
|
+
else this.element.style.removeProperty(property);
|
|
692
|
+
}
|
|
693
|
+
bringToFront() {
|
|
694
|
+
const computedZIndex = Number.parseInt(this.document.defaultView?.getComputedStyle(this.element).zIndex ?? "", 10);
|
|
695
|
+
const zIndex = Math.max(Number.isFinite(computedZIndex) ? computedZIndex : 0, nextAppendToZIndex);
|
|
696
|
+
nextAppendToZIndex = zIndex + 1;
|
|
697
|
+
this.element.style.zIndex = String(zIndex);
|
|
698
|
+
}
|
|
699
|
+
ensurePositionedTarget(target) {
|
|
700
|
+
if (target === this.document.body || !this.document.defaultView) return { restore: () => void 0 };
|
|
701
|
+
const existing = positionedTargets.get(target);
|
|
702
|
+
if (existing) {
|
|
703
|
+
existing.count += 1;
|
|
704
|
+
return { restore: () => this.releasePositionedTarget(target) };
|
|
705
|
+
}
|
|
706
|
+
if (this.document.defaultView.getComputedStyle(target).position !== "static") return { restore: () => void 0 };
|
|
707
|
+
const previous = target.style.position;
|
|
708
|
+
target.style.position = "relative";
|
|
709
|
+
positionedTargets.set(target, {
|
|
710
|
+
count: 1,
|
|
711
|
+
previous
|
|
712
|
+
});
|
|
713
|
+
return { restore: () => this.releasePositionedTarget(target) };
|
|
714
|
+
}
|
|
715
|
+
releasePositionedTarget(target) {
|
|
716
|
+
const entry = positionedTargets.get(target);
|
|
717
|
+
if (!entry) return;
|
|
718
|
+
entry.count -= 1;
|
|
719
|
+
if (entry.count > 0) return;
|
|
720
|
+
target.style.position = entry.previous;
|
|
721
|
+
positionedTargets.delete(target);
|
|
722
|
+
}
|
|
723
|
+
hasClippingAncestor(anchor) {
|
|
724
|
+
const view = this.document.defaultView;
|
|
725
|
+
if (!view) return false;
|
|
726
|
+
let ancestor = anchor.parentElement;
|
|
727
|
+
while (ancestor && ancestor !== this.document.body && ancestor !== this.document.documentElement) {
|
|
728
|
+
const style = view.getComputedStyle(ancestor);
|
|
729
|
+
if (isClippingOverflow(style.overflow) || isClippingOverflow(style.overflowX) || isClippingOverflow(style.overflowY) || hasPaintContainment(style.contain) || style.clipPath && style.clipPath !== "none") return true;
|
|
730
|
+
ancestor = ancestor.parentElement;
|
|
731
|
+
}
|
|
732
|
+
return false;
|
|
733
|
+
}
|
|
734
|
+
cancelFrame() {
|
|
735
|
+
if (this.frame === null) return;
|
|
736
|
+
this.document.defaultView?.cancelAnimationFrame(this.frame);
|
|
737
|
+
this.frame = null;
|
|
738
|
+
}
|
|
739
|
+
captureOrigin() {
|
|
740
|
+
if (this.originCaptured) return;
|
|
741
|
+
this.originCaptured = true;
|
|
742
|
+
this.originParent = this.element.parentNode;
|
|
743
|
+
this.originNextSibling = this.element.nextSibling;
|
|
744
|
+
}
|
|
745
|
+
restoreToOrigin() {
|
|
746
|
+
if (this.restoringToOrigin || !this.originParent || this.element.parentNode === this.originParent) return;
|
|
747
|
+
this.restoringToOrigin = true;
|
|
748
|
+
try {
|
|
749
|
+
this.renderer.insertBefore(this.originParent, this.element, this.originNextSibling?.parentNode === this.originParent ? this.originNextSibling : null);
|
|
750
|
+
} finally {
|
|
751
|
+
this.restoringToOrigin = false;
|
|
752
|
+
}
|
|
753
|
+
}
|
|
754
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
755
|
+
minVersion: "12.0.0",
|
|
756
|
+
version: "22.2.3",
|
|
757
|
+
ngImport: i0,
|
|
758
|
+
type: ɵAerisAppendTo,
|
|
759
|
+
deps: [],
|
|
760
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
761
|
+
});
|
|
762
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
763
|
+
minVersion: "17.1.0",
|
|
764
|
+
version: "22.2.3",
|
|
765
|
+
type: ɵAerisAppendTo,
|
|
766
|
+
isStandalone: true,
|
|
767
|
+
selector: "[aerisInternalAppendTo]",
|
|
768
|
+
inputs: {
|
|
769
|
+
aerisInternalAppendTo: {
|
|
770
|
+
classPropertyName: "aerisInternalAppendTo",
|
|
771
|
+
publicName: "aerisInternalAppendTo",
|
|
772
|
+
isSignal: true,
|
|
773
|
+
isRequired: false,
|
|
774
|
+
transformFunction: null
|
|
775
|
+
},
|
|
776
|
+
aerisInternalAppendToDefault: {
|
|
777
|
+
classPropertyName: "aerisInternalAppendToDefault",
|
|
778
|
+
publicName: "aerisInternalAppendToDefault",
|
|
779
|
+
isSignal: true,
|
|
780
|
+
isRequired: false,
|
|
781
|
+
transformFunction: null
|
|
782
|
+
},
|
|
783
|
+
aerisInternalAppendToAnchor: {
|
|
784
|
+
classPropertyName: "aerisInternalAppendToAnchor",
|
|
785
|
+
publicName: "aerisInternalAppendToAnchor",
|
|
786
|
+
isSignal: true,
|
|
787
|
+
isRequired: false,
|
|
788
|
+
transformFunction: null
|
|
789
|
+
},
|
|
790
|
+
aerisInternalAppendToOffset: {
|
|
791
|
+
classPropertyName: "aerisInternalAppendToOffset",
|
|
792
|
+
publicName: "aerisInternalAppendToOffset",
|
|
793
|
+
isSignal: true,
|
|
794
|
+
isRequired: false,
|
|
795
|
+
transformFunction: null
|
|
796
|
+
},
|
|
797
|
+
aerisInternalAppendToMatchWidth: {
|
|
798
|
+
classPropertyName: "aerisInternalAppendToMatchWidth",
|
|
799
|
+
publicName: "aerisInternalAppendToMatchWidth",
|
|
800
|
+
isSignal: true,
|
|
801
|
+
isRequired: false,
|
|
802
|
+
transformFunction: null
|
|
803
|
+
},
|
|
804
|
+
aerisInternalAppendToPlacement: {
|
|
805
|
+
classPropertyName: "aerisInternalAppendToPlacement",
|
|
806
|
+
publicName: "aerisInternalAppendToPlacement",
|
|
807
|
+
isSignal: true,
|
|
808
|
+
isRequired: false,
|
|
809
|
+
transformFunction: null
|
|
810
|
+
},
|
|
811
|
+
aerisInternalAppendToAlignment: {
|
|
812
|
+
classPropertyName: "aerisInternalAppendToAlignment",
|
|
813
|
+
publicName: "aerisInternalAppendToAlignment",
|
|
814
|
+
isSignal: true,
|
|
815
|
+
isRequired: false,
|
|
816
|
+
transformFunction: null
|
|
817
|
+
},
|
|
818
|
+
aerisInternalAppendToCollisionPadding: {
|
|
819
|
+
classPropertyName: "aerisInternalAppendToCollisionPadding",
|
|
820
|
+
publicName: "aerisInternalAppendToCollisionPadding",
|
|
821
|
+
isSignal: true,
|
|
822
|
+
isRequired: false,
|
|
823
|
+
transformFunction: null
|
|
824
|
+
},
|
|
825
|
+
aerisInternalAppendToPositionSelf: {
|
|
826
|
+
classPropertyName: "aerisInternalAppendToPositionSelf",
|
|
827
|
+
publicName: "aerisInternalAppendToPositionSelf",
|
|
828
|
+
isSignal: true,
|
|
829
|
+
isRequired: false,
|
|
830
|
+
transformFunction: null
|
|
831
|
+
},
|
|
832
|
+
aerisInternalAppendToDismiss: {
|
|
833
|
+
classPropertyName: "aerisInternalAppendToDismiss",
|
|
834
|
+
publicName: "aerisInternalAppendToDismiss",
|
|
835
|
+
isSignal: true,
|
|
836
|
+
isRequired: false,
|
|
837
|
+
transformFunction: null
|
|
838
|
+
}
|
|
839
|
+
},
|
|
840
|
+
outputs: { aerisInternalAppendToOutside: "aerisInternalAppendToOutside" },
|
|
841
|
+
ngImport: i0
|
|
842
|
+
});
|
|
843
|
+
};
|
|
844
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
845
|
+
minVersion: "12.0.0",
|
|
846
|
+
version: "22.2.3",
|
|
847
|
+
ngImport: i0,
|
|
848
|
+
type: ɵAerisAppendTo,
|
|
849
|
+
decorators: [{
|
|
850
|
+
type: Directive,
|
|
851
|
+
args: [{ selector: "[aerisInternalAppendTo]" }]
|
|
852
|
+
}],
|
|
853
|
+
ctorParameters: () => [],
|
|
854
|
+
propDecorators: {
|
|
855
|
+
aerisInternalAppendTo: [{
|
|
856
|
+
type: i0.Input,
|
|
857
|
+
args: [{
|
|
858
|
+
isSignal: true,
|
|
859
|
+
alias: "aerisInternalAppendTo",
|
|
860
|
+
required: false
|
|
861
|
+
}]
|
|
862
|
+
}],
|
|
863
|
+
aerisInternalAppendToDefault: [{
|
|
864
|
+
type: i0.Input,
|
|
865
|
+
args: [{
|
|
866
|
+
isSignal: true,
|
|
867
|
+
alias: "aerisInternalAppendToDefault",
|
|
868
|
+
required: false
|
|
869
|
+
}]
|
|
870
|
+
}],
|
|
871
|
+
aerisInternalAppendToAnchor: [{
|
|
872
|
+
type: i0.Input,
|
|
873
|
+
args: [{
|
|
874
|
+
isSignal: true,
|
|
875
|
+
alias: "aerisInternalAppendToAnchor",
|
|
876
|
+
required: false
|
|
877
|
+
}]
|
|
878
|
+
}],
|
|
879
|
+
aerisInternalAppendToOffset: [{
|
|
880
|
+
type: i0.Input,
|
|
881
|
+
args: [{
|
|
882
|
+
isSignal: true,
|
|
883
|
+
alias: "aerisInternalAppendToOffset",
|
|
884
|
+
required: false
|
|
885
|
+
}]
|
|
886
|
+
}],
|
|
887
|
+
aerisInternalAppendToMatchWidth: [{
|
|
888
|
+
type: i0.Input,
|
|
889
|
+
args: [{
|
|
890
|
+
isSignal: true,
|
|
891
|
+
alias: "aerisInternalAppendToMatchWidth",
|
|
892
|
+
required: false
|
|
893
|
+
}]
|
|
894
|
+
}],
|
|
895
|
+
aerisInternalAppendToPlacement: [{
|
|
896
|
+
type: i0.Input,
|
|
897
|
+
args: [{
|
|
898
|
+
isSignal: true,
|
|
899
|
+
alias: "aerisInternalAppendToPlacement",
|
|
900
|
+
required: false
|
|
901
|
+
}]
|
|
902
|
+
}],
|
|
903
|
+
aerisInternalAppendToAlignment: [{
|
|
904
|
+
type: i0.Input,
|
|
905
|
+
args: [{
|
|
906
|
+
isSignal: true,
|
|
907
|
+
alias: "aerisInternalAppendToAlignment",
|
|
908
|
+
required: false
|
|
909
|
+
}]
|
|
910
|
+
}],
|
|
911
|
+
aerisInternalAppendToCollisionPadding: [{
|
|
912
|
+
type: i0.Input,
|
|
913
|
+
args: [{
|
|
914
|
+
isSignal: true,
|
|
915
|
+
alias: "aerisInternalAppendToCollisionPadding",
|
|
916
|
+
required: false
|
|
917
|
+
}]
|
|
918
|
+
}],
|
|
919
|
+
aerisInternalAppendToPositionSelf: [{
|
|
920
|
+
type: i0.Input,
|
|
921
|
+
args: [{
|
|
922
|
+
isSignal: true,
|
|
923
|
+
alias: "aerisInternalAppendToPositionSelf",
|
|
924
|
+
required: false
|
|
925
|
+
}]
|
|
926
|
+
}],
|
|
927
|
+
aerisInternalAppendToDismiss: [{
|
|
928
|
+
type: i0.Input,
|
|
929
|
+
args: [{
|
|
930
|
+
isSignal: true,
|
|
931
|
+
alias: "aerisInternalAppendToDismiss",
|
|
932
|
+
required: false
|
|
933
|
+
}]
|
|
934
|
+
}],
|
|
935
|
+
aerisInternalAppendToOutside: [{
|
|
936
|
+
type: i0.Output,
|
|
937
|
+
args: ["aerisInternalAppendToOutside"]
|
|
938
|
+
}]
|
|
939
|
+
}
|
|
940
|
+
});
|
|
941
|
+
function elementRefNativeElement(value) {
|
|
942
|
+
if ("nativeElement" in value) return value.nativeElement;
|
|
943
|
+
if ("elementRef" in value) {
|
|
944
|
+
const node = value.elementRef.nativeElement;
|
|
945
|
+
if (isHtmlElement(node)) return node;
|
|
946
|
+
if (typeof node === "object" && node !== null && "parentElement" in node) return node.parentElement;
|
|
947
|
+
}
|
|
948
|
+
return null;
|
|
949
|
+
}
|
|
950
|
+
function isHtmlElement(value) {
|
|
951
|
+
return typeof value === "object" && value !== null && "nodeType" in value && value.nodeType === 1;
|
|
952
|
+
}
|
|
953
|
+
function isDomNode(value) {
|
|
954
|
+
return typeof value === "object" && value !== null && "nodeType" in value;
|
|
955
|
+
}
|
|
956
|
+
function isClippingOverflow(value) {
|
|
957
|
+
return /^(auto|clip|hidden|overlay|scroll)$/.test(value.trim());
|
|
958
|
+
}
|
|
959
|
+
function hasPaintContainment(value) {
|
|
960
|
+
return value.trim().split(/\s+/).some((token) => token === "paint" || token === "content" || token === "strict");
|
|
961
|
+
}
|
|
1
962
|
function filterSelectOptions(options, query, fields, matchMode, locale) {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
return matchesSelectFilter(candidate, normalizedQuery, matchMode);
|
|
8
|
-
}));
|
|
963
|
+
const normalizedQuery = query.trim().toLocaleLowerCase(locale);
|
|
964
|
+
if (!normalizedQuery) return options;
|
|
965
|
+
return options.filter((option) => fields.some((field) => {
|
|
966
|
+
return matchesSelectFilter(option[field]?.toLocaleLowerCase(locale) ?? "", normalizedQuery, matchMode);
|
|
967
|
+
}));
|
|
9
968
|
}
|
|
10
969
|
function groupSelectOptions(options) {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
options: groupedOptions,
|
|
23
|
-
}));
|
|
970
|
+
const groups = /* @__PURE__ */ new Map();
|
|
971
|
+
for (const option of options) {
|
|
972
|
+
const label = option.group?.trim() || null;
|
|
973
|
+
const group = groups.get(label);
|
|
974
|
+
if (group) group.push(option);
|
|
975
|
+
else groups.set(label, [option]);
|
|
976
|
+
}
|
|
977
|
+
return Array.from(groups, ([label, groupedOptions]) => ({
|
|
978
|
+
label,
|
|
979
|
+
options: groupedOptions
|
|
980
|
+
}));
|
|
24
981
|
}
|
|
25
982
|
function selectVirtualRange(optionCount, start, panelMaxHeight, itemSize, buffer) {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
983
|
+
const safeItemSize = Math.max(1, itemSize);
|
|
984
|
+
const safeBuffer = Math.max(0, buffer);
|
|
985
|
+
const safeStart = Math.max(0, Math.min(start, optionCount));
|
|
986
|
+
const visibleCount = Math.ceil(selectPanelPixels(panelMaxHeight) / safeItemSize) + safeBuffer * 2;
|
|
987
|
+
const end = Math.min(optionCount, safeStart + visibleCount);
|
|
988
|
+
return {
|
|
989
|
+
start: safeStart,
|
|
990
|
+
end,
|
|
991
|
+
topPadding: safeStart * safeItemSize,
|
|
992
|
+
bottomPadding: Math.max(0, (optionCount - end) * safeItemSize)
|
|
993
|
+
};
|
|
37
994
|
}
|
|
38
995
|
function nextEnabledSelectValue(options, currentValue, direction) {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
} while (options[index]?.disabled);
|
|
47
|
-
return options[index]?.value ?? null;
|
|
996
|
+
if (!options.length || options.every((option) => option.disabled)) return null;
|
|
997
|
+
let index = options.findIndex((option) => option.value === currentValue);
|
|
998
|
+
if (index < 0) index = direction === 1 ? -1 : 0;
|
|
999
|
+
do
|
|
1000
|
+
index = (index + direction + options.length) % options.length;
|
|
1001
|
+
while (options[index]?.disabled);
|
|
1002
|
+
return options[index]?.value ?? null;
|
|
48
1003
|
}
|
|
49
1004
|
function boundarySelectValue(options, boundary) {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
return option.value;
|
|
57
|
-
}
|
|
58
|
-
return null;
|
|
1005
|
+
if (boundary === "start") return options.find((option) => !option.disabled)?.value ?? null;
|
|
1006
|
+
for (let index = options.length - 1; index >= 0; index -= 1) {
|
|
1007
|
+
const option = options[index];
|
|
1008
|
+
if (option && !option.disabled) return option.value;
|
|
1009
|
+
}
|
|
1010
|
+
return null;
|
|
59
1011
|
}
|
|
60
1012
|
function matchesSelectFilter(candidate, query, matchMode) {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
case 'contains':
|
|
69
|
-
return candidate.includes(query);
|
|
70
|
-
default:
|
|
71
|
-
return false;
|
|
72
|
-
}
|
|
1013
|
+
switch (matchMode) {
|
|
1014
|
+
case "startsWith": return candidate.startsWith(query);
|
|
1015
|
+
case "endsWith": return candidate.endsWith(query);
|
|
1016
|
+
case "equals": return candidate === query;
|
|
1017
|
+
case "contains": return candidate.includes(query);
|
|
1018
|
+
default: return false;
|
|
1019
|
+
}
|
|
73
1020
|
}
|
|
74
1021
|
function selectPanelPixels(value) {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
return normalized.endsWith('rem') ? amount * 16 : amount;
|
|
1022
|
+
const normalized = value.trim();
|
|
1023
|
+
const amount = Number.parseFloat(normalized);
|
|
1024
|
+
if (!Number.isFinite(amount)) return 288;
|
|
1025
|
+
return normalized.endsWith("rem") ? amount * 16 : amount;
|
|
80
1026
|
}
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
const
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
if (existingIndex >= 0)
|
|
88
|
-
stack.splice(existingIndex, 1);
|
|
89
|
-
stack.push(token);
|
|
90
|
-
overlayStacks.set(document, stack);
|
|
1027
|
+
function aerisInternalLocalDate(year, monthIndex, day) {
|
|
1028
|
+
if (year < 0 || year >= 100) return new Date(year, monthIndex, day);
|
|
1029
|
+
const result = /* @__PURE__ */ new Date(0);
|
|
1030
|
+
result.setFullYear(year, monthIndex, day);
|
|
1031
|
+
result.setHours(0, 0, 0, 0);
|
|
1032
|
+
return result;
|
|
91
1033
|
}
|
|
92
|
-
function
|
|
93
|
-
|
|
94
|
-
if (!stack)
|
|
95
|
-
return;
|
|
96
|
-
const index = stack.indexOf(token);
|
|
97
|
-
if (index >= 0)
|
|
98
|
-
stack.splice(index, 1);
|
|
99
|
-
if (stack.length === 0)
|
|
100
|
-
overlayStacks.delete(document);
|
|
1034
|
+
function aerisInternalDateAtMidnight(date) {
|
|
1035
|
+
return aerisInternalLocalDate(date.getFullYear(), date.getMonth(), date.getDate());
|
|
101
1036
|
}
|
|
102
|
-
function
|
|
103
|
-
|
|
104
|
-
|
|
1037
|
+
function aerisInternalReadDate(date) {
|
|
1038
|
+
return {
|
|
1039
|
+
year: date.getFullYear(),
|
|
1040
|
+
month: date.getMonth() + 1,
|
|
1041
|
+
day: date.getDate()
|
|
1042
|
+
};
|
|
105
1043
|
}
|
|
106
|
-
function
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
const body = document.body;
|
|
113
|
-
const state = {
|
|
114
|
-
count: 1,
|
|
115
|
-
overflow: body.style.overflow,
|
|
116
|
-
paddingInlineEnd: body.style.getPropertyValue('padding-inline-end'),
|
|
117
|
-
};
|
|
118
|
-
scrollLockStates.set(document, state);
|
|
119
|
-
const view = document.defaultView;
|
|
120
|
-
const root = document.documentElement;
|
|
121
|
-
if (view && root.clientWidth) {
|
|
122
|
-
const scrollbarWidth = view.innerWidth - root.clientWidth;
|
|
123
|
-
if (scrollbarWidth > 0) {
|
|
124
|
-
const currentPadding = Number.parseFloat(view.getComputedStyle(body).paddingInlineEnd) || 0;
|
|
125
|
-
body.style.setProperty('padding-inline-end', `${currentPadding + scrollbarWidth}px`);
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
body.style.overflow = 'hidden';
|
|
1044
|
+
function aerisInternalReadTime(date) {
|
|
1045
|
+
return {
|
|
1046
|
+
hours: date.getHours(),
|
|
1047
|
+
minutes: date.getMinutes(),
|
|
1048
|
+
seconds: date.getSeconds()
|
|
1049
|
+
};
|
|
129
1050
|
}
|
|
130
|
-
function
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
1051
|
+
function aerisInternalDaysInMonth(year, month) {
|
|
1052
|
+
if (!Number.isInteger(year) || !Number.isInteger(month) || month < 1 || month > 12) return 0;
|
|
1053
|
+
if (month === 2) return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0) ? 29 : 28;
|
|
1054
|
+
return [
|
|
1055
|
+
4,
|
|
1056
|
+
6,
|
|
1057
|
+
9,
|
|
1058
|
+
11
|
|
1059
|
+
].includes(month) ? 30 : 31;
|
|
1060
|
+
}
|
|
1061
|
+
function validPart(value, minimum, maximum) {
|
|
1062
|
+
return value === null || Number.isInteger(value) && value >= minimum && value <= maximum;
|
|
1063
|
+
}
|
|
1064
|
+
function aerisInternalResolveDateDraft(draft) {
|
|
1065
|
+
const { year, month, day } = draft;
|
|
1066
|
+
if (year === null && month === null && day === null) return {
|
|
1067
|
+
state: "empty",
|
|
1068
|
+
value: null
|
|
1069
|
+
};
|
|
1070
|
+
if (!validPart(year, 1, 9999) || !validPart(month, 1, 12) || !validPart(day, 1, 31)) return {
|
|
1071
|
+
state: "invalid",
|
|
1072
|
+
value: null
|
|
1073
|
+
};
|
|
1074
|
+
if (year === null || month === null || day === null) return {
|
|
1075
|
+
state: "incomplete",
|
|
1076
|
+
value: null
|
|
1077
|
+
};
|
|
1078
|
+
if (day > aerisInternalDaysInMonth(year, month)) return {
|
|
1079
|
+
state: "invalid",
|
|
1080
|
+
value: null
|
|
1081
|
+
};
|
|
1082
|
+
return {
|
|
1083
|
+
state: "complete",
|
|
1084
|
+
value: {
|
|
1085
|
+
year,
|
|
1086
|
+
month,
|
|
1087
|
+
day
|
|
1088
|
+
}
|
|
1089
|
+
};
|
|
1090
|
+
}
|
|
1091
|
+
function aerisInternalResolveTimeDraft(draft) {
|
|
1092
|
+
const { hours, minutes, seconds } = draft;
|
|
1093
|
+
if (hours === null && minutes === null && seconds === null) return {
|
|
1094
|
+
state: "empty",
|
|
1095
|
+
value: null
|
|
1096
|
+
};
|
|
1097
|
+
if (!validPart(hours, 0, 23) || !validPart(minutes, 0, 59) || !validPart(seconds, 0, 59)) return {
|
|
1098
|
+
state: "invalid",
|
|
1099
|
+
value: null
|
|
1100
|
+
};
|
|
1101
|
+
if (hours === null || minutes === null || seconds === null) return {
|
|
1102
|
+
state: "incomplete",
|
|
1103
|
+
value: null
|
|
1104
|
+
};
|
|
1105
|
+
return {
|
|
1106
|
+
state: "complete",
|
|
1107
|
+
value: {
|
|
1108
|
+
hours,
|
|
1109
|
+
minutes,
|
|
1110
|
+
seconds
|
|
1111
|
+
}
|
|
1112
|
+
};
|
|
1113
|
+
}
|
|
1114
|
+
function aerisInternalFormatDateParts(parts) {
|
|
1115
|
+
return `${parts.year < 0 ? String(parts.year) : String(parts.year).padStart(4, "0")}-${String(parts.month).padStart(2, "0")}-${String(parts.day).padStart(2, "0")}`;
|
|
1116
|
+
}
|
|
1117
|
+
function aerisInternalFormatTimeParts(parts, showSeconds = false) {
|
|
1118
|
+
const time = `${String(parts.hours).padStart(2, "0")}:${String(parts.minutes).padStart(2, "0")}`;
|
|
1119
|
+
return showSeconds ? `${time}:${String(parts.seconds).padStart(2, "0")}` : time;
|
|
1120
|
+
}
|
|
1121
|
+
function aerisInternalParseDateParts(value) {
|
|
1122
|
+
const match = /^(\d{4})-(\d{2})-(\d{2})$/.exec(value.trim());
|
|
1123
|
+
if (!match) return null;
|
|
1124
|
+
return aerisInternalResolveDateDraft({
|
|
1125
|
+
year: Number(match[1]),
|
|
1126
|
+
month: Number(match[2]),
|
|
1127
|
+
day: Number(match[3])
|
|
1128
|
+
}).value;
|
|
1129
|
+
}
|
|
1130
|
+
function aerisInternalParseTimeParts(value) {
|
|
1131
|
+
const match = /^(\d{2}):(\d{2})(?::(\d{2}))?$/.exec(value.trim());
|
|
1132
|
+
if (!match) return null;
|
|
1133
|
+
return aerisInternalResolveTimeDraft({
|
|
1134
|
+
hours: Number(match[1]),
|
|
1135
|
+
minutes: Number(match[2]),
|
|
1136
|
+
seconds: Number(match[3] ?? 0)
|
|
1137
|
+
}).value;
|
|
1138
|
+
}
|
|
1139
|
+
function aerisInternalDateFromParts(date, time) {
|
|
1140
|
+
if (!aerisInternalResolveDateDraft(date).value || time && !aerisInternalResolveTimeDraft(time).value) return null;
|
|
1141
|
+
const result = aerisInternalLocalDate(date.year, date.month - 1, date.day);
|
|
1142
|
+
if (time) result.setHours(time.hours, time.minutes, time.seconds, 0);
|
|
1143
|
+
return result.getFullYear() === date.year && result.getMonth() === date.month - 1 && result.getDate() === date.day && (!time || result.getHours() === time.hours && result.getMinutes() === time.minutes && result.getSeconds() === time.seconds) ? result : null;
|
|
1144
|
+
}
|
|
1145
|
+
function aerisInternalToTwelveHour(hours) {
|
|
1146
|
+
return hours % 12 || 12;
|
|
1147
|
+
}
|
|
1148
|
+
function aerisInternalFromTwelveHour(hour, period) {
|
|
1149
|
+
return (hour === 12 ? 0 : hour) + (period === "PM" ? 12 : 0);
|
|
1150
|
+
}
|
|
1151
|
+
function aerisInternalCalendarDayIndex(date) {
|
|
1152
|
+
const utc = /* @__PURE__ */ new Date(0);
|
|
1153
|
+
utc.setUTCFullYear(date.getFullYear(), date.getMonth(), date.getDate());
|
|
1154
|
+
return utc.getTime() / 864e5;
|
|
1155
|
+
}
|
|
1156
|
+
function aerisInternalLocaleFirstDay(locale) {
|
|
1157
|
+
try {
|
|
1158
|
+
const value = new Intl.Locale(locale);
|
|
1159
|
+
return ((value.getWeekInfo?.() ?? value.weekInfo)?.firstDay ?? 7) % 7;
|
|
1160
|
+
} catch {
|
|
1161
|
+
return 0;
|
|
1162
|
+
}
|
|
1163
|
+
}
|
|
1164
|
+
function aerisInternalDateTimeLayout(locale, kind, hourCycle = "24", showSeconds = false) {
|
|
1165
|
+
const formatter = new Intl.DateTimeFormat(locale, {
|
|
1166
|
+
calendar: "gregory",
|
|
1167
|
+
timeZone: "UTC",
|
|
1168
|
+
...kind === "date" ? {
|
|
1169
|
+
year: "numeric",
|
|
1170
|
+
month: "2-digit",
|
|
1171
|
+
day: "2-digit"
|
|
1172
|
+
} : {
|
|
1173
|
+
hour: "2-digit",
|
|
1174
|
+
minute: "2-digit",
|
|
1175
|
+
second: showSeconds ? "2-digit" : void 0,
|
|
1176
|
+
hourCycle: hourCycle === "12" ? "h12" : "h23"
|
|
1177
|
+
}
|
|
1178
|
+
});
|
|
1179
|
+
const layout = [];
|
|
1180
|
+
for (const part of formatter.formatToParts(new Date(Date.UTC(2006, 10, 22, 13, 14, 15)))) if (part.type === "literal") layout.push({
|
|
1181
|
+
type: "literal",
|
|
1182
|
+
value: part.value
|
|
1183
|
+
});
|
|
1184
|
+
else if (part.type === "year" || part.type === "month" || part.type === "day" || part.type === "hour" || part.type === "minute" || part.type === "second" || part.type === "dayPeriod") layout.push({ type: part.type });
|
|
1185
|
+
return layout;
|
|
146
1186
|
}
|
|
147
|
-
|
|
148
1187
|
const BASE_FOCUSABLE_SELECTORS = [
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
1188
|
+
"a[href]",
|
|
1189
|
+
"area[href]",
|
|
1190
|
+
"button",
|
|
1191
|
+
"input",
|
|
1192
|
+
"select",
|
|
1193
|
+
"textarea",
|
|
1194
|
+
"iframe",
|
|
1195
|
+
"object",
|
|
1196
|
+
"embed",
|
|
1197
|
+
"audio[controls]",
|
|
1198
|
+
"video[controls]",
|
|
1199
|
+
"summary",
|
|
1200
|
+
"[tabindex]"
|
|
155
1201
|
];
|
|
156
1202
|
function aerisInternalIsFocusable(element, options = {}) {
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
1203
|
+
if (!element || element.tabIndex < 0 || element.matches(":disabled") || element.hidden || element.inert || element.closest("[hidden], [inert], [aria-hidden=\"true\"]")) return false;
|
|
1204
|
+
if (element instanceof HTMLInputElement && element.type === "hidden") return false;
|
|
1205
|
+
const closedDetails = element.closest("details:not([open])");
|
|
1206
|
+
if (closedDetails) {
|
|
1207
|
+
if (!Array.from(closedDetails.children).find((child) => child instanceof HTMLElement && child.tagName === "SUMMARY")?.contains(element)) return false;
|
|
1208
|
+
}
|
|
1209
|
+
if (!options.checkComputedVisibility) return true;
|
|
1210
|
+
const view = element.ownerDocument.defaultView;
|
|
1211
|
+
for (let current = element; current; current = current.parentElement) {
|
|
1212
|
+
const style = view?.getComputedStyle(current);
|
|
1213
|
+
if (style?.visibility === "hidden" || style?.visibility === "collapse" || style?.display === "none") return false;
|
|
1214
|
+
}
|
|
1215
|
+
return true;
|
|
164
1216
|
}
|
|
165
1217
|
function aerisInternalFocusableElements(root, options = {}) {
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
1218
|
+
const selectors = options.includeContentEditable ? [...BASE_FOCUSABLE_SELECTORS, "[contenteditable]:not([contenteditable=\"false\"])"] : BASE_FOCUSABLE_SELECTORS;
|
|
1219
|
+
return Array.from(root.querySelectorAll(selectors.join(","))).filter((element) => aerisInternalIsFocusable(element, options)).sort((left, right) => {
|
|
1220
|
+
return (left.tabIndex > 0 ? left.tabIndex : Number.MAX_SAFE_INTEGER) - (right.tabIndex > 0 ? right.tabIndex : Number.MAX_SAFE_INTEGER);
|
|
1221
|
+
});
|
|
170
1222
|
}
|
|
171
1223
|
function aerisInternalFocusInitialElement(root, selector, focusOptions, options = {}) {
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
catch {
|
|
178
|
-
// Invalid consumer selectors fall back to the first focusable element.
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
const target = aerisInternalIsFocusable(requested, options)
|
|
182
|
-
? requested
|
|
183
|
-
: (aerisInternalFocusableElements(root, options)[0] ?? root);
|
|
184
|
-
target.focus(focusOptions);
|
|
1224
|
+
let requested = null;
|
|
1225
|
+
if (selector) try {
|
|
1226
|
+
requested = root.querySelector(selector);
|
|
1227
|
+
} catch {}
|
|
1228
|
+
(aerisInternalIsFocusable(requested, options) ? requested : aerisInternalFocusableElements(root, options)[0] ?? root).focus(focusOptions);
|
|
185
1229
|
}
|
|
186
1230
|
function aerisInternalTrapTabFocus(event, root, activeElement, options = {}) {
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
}
|
|
1231
|
+
const focusable = aerisInternalFocusableElements(root, options);
|
|
1232
|
+
if (focusable.length === 0) {
|
|
1233
|
+
event.preventDefault();
|
|
1234
|
+
root.focus();
|
|
1235
|
+
return;
|
|
1236
|
+
}
|
|
1237
|
+
const first = focusable[0];
|
|
1238
|
+
const last = focusable.at(-1);
|
|
1239
|
+
if (event.shiftKey && activeElement === first) {
|
|
1240
|
+
event.preventDefault();
|
|
1241
|
+
last?.focus();
|
|
1242
|
+
} else if (!event.shiftKey && activeElement === last) {
|
|
1243
|
+
event.preventDefault();
|
|
1244
|
+
first?.focus();
|
|
1245
|
+
}
|
|
203
1246
|
}
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
1247
|
+
function aerisInternalColumnSeparatorValues(widths, minColumnWidth) {
|
|
1248
|
+
const percentages = widths.map((width) => width?.trim().endsWith("%") ? Number.parseFloat(width) : NaN);
|
|
1249
|
+
if (percentages.every(Number.isFinite)) {
|
|
1250
|
+
let position = 0;
|
|
1251
|
+
return percentages.slice(0, -1).map((width) => {
|
|
1252
|
+
position += width;
|
|
1253
|
+
return {
|
|
1254
|
+
min: 0,
|
|
1255
|
+
max: 100,
|
|
1256
|
+
now: Math.min(100, Math.max(0, position))
|
|
1257
|
+
};
|
|
1258
|
+
});
|
|
1259
|
+
}
|
|
1260
|
+
const pixels = widths.map(aerisInternalColumnWidthPixels);
|
|
1261
|
+
const total = pixels.reduce((sum, width) => sum + width, 0);
|
|
1262
|
+
let position = 0;
|
|
1263
|
+
return pixels.slice(0, -1).map((width, index) => {
|
|
1264
|
+
position += width;
|
|
1265
|
+
return {
|
|
1266
|
+
min: minColumnWidth * (index + 1),
|
|
1267
|
+
max: Math.max(minColumnWidth * (index + 1), total - minColumnWidth * (pixels.length - index - 1)),
|
|
1268
|
+
now: position
|
|
1269
|
+
};
|
|
1270
|
+
});
|
|
210
1271
|
}
|
|
211
|
-
function aerisInternalPositionAnchoredOverlay(options) {
|
|
212
|
-
const placement = resolvePlacement(options);
|
|
213
|
-
const point = rawPosition(placement, options);
|
|
214
|
-
return {
|
|
215
|
-
placement,
|
|
216
|
-
...aerisInternalClampOverlayPoint(point, options.width, options.height, options.viewportWidth, options.viewportHeight, options.margin),
|
|
217
|
-
};
|
|
218
|
-
}
|
|
219
|
-
function resolvePlacement(options) {
|
|
220
|
-
if (options.placement !== 'auto')
|
|
221
|
-
return options.placement;
|
|
222
|
-
const spaces = {
|
|
223
|
-
bottom: options.viewportHeight - options.target.bottom - options.offset,
|
|
224
|
-
top: options.target.top - options.offset,
|
|
225
|
-
right: options.viewportWidth - options.target.right - options.offset,
|
|
226
|
-
left: options.target.left - options.offset,
|
|
227
|
-
};
|
|
228
|
-
if (spaces.bottom >= options.height)
|
|
229
|
-
return 'bottom';
|
|
230
|
-
if (spaces.top >= options.height)
|
|
231
|
-
return 'top';
|
|
232
|
-
if (spaces.right >= options.width)
|
|
233
|
-
return 'right';
|
|
234
|
-
if (spaces.left >= options.width)
|
|
235
|
-
return 'left';
|
|
236
|
-
return (Object.entries(spaces).sort((left, right) => right[1] - left[1])[0]?.[0] ??
|
|
237
|
-
'bottom');
|
|
238
|
-
}
|
|
239
|
-
function rawPosition(placement, options) {
|
|
240
|
-
if (placement === 'top' || placement === 'bottom') {
|
|
241
|
-
return {
|
|
242
|
-
x: aligned(options.target.left, options.target.width, options.width, options.alignment),
|
|
243
|
-
y: placement === 'bottom'
|
|
244
|
-
? options.target.bottom + options.offset
|
|
245
|
-
: options.target.top - options.height - options.offset,
|
|
246
|
-
};
|
|
247
|
-
}
|
|
248
|
-
return {
|
|
249
|
-
x: placement === 'right'
|
|
250
|
-
? options.target.right + options.offset
|
|
251
|
-
: options.target.left - options.width - options.offset,
|
|
252
|
-
y: aligned(options.target.top, options.target.height, options.height, options.alignment),
|
|
253
|
-
};
|
|
254
|
-
}
|
|
255
|
-
function aligned(start, targetSize, overlaySize, alignment) {
|
|
256
|
-
if (alignment === 'start')
|
|
257
|
-
return start;
|
|
258
|
-
if (alignment === 'end')
|
|
259
|
-
return start + targetSize - overlaySize;
|
|
260
|
-
return start + targetSize / 2 - overlaySize / 2;
|
|
261
|
-
}
|
|
262
|
-
function clamp(value, minimum, maximum) {
|
|
263
|
-
return Math.min(Math.max(value, minimum), maximum);
|
|
264
|
-
}
|
|
265
|
-
|
|
266
1272
|
function aerisInternalPixelWidth(width) {
|
|
267
|
-
|
|
1273
|
+
return `${Math.round(width * 100) / 100}px`;
|
|
268
1274
|
}
|
|
269
1275
|
function aerisInternalColumnWidthPixels(width) {
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
return 160;
|
|
275
|
-
return width.trim().endsWith('rem') ? value * 16 : value;
|
|
1276
|
+
if (!width) return 160;
|
|
1277
|
+
const value = Number.parseFloat(width);
|
|
1278
|
+
if (!Number.isFinite(value)) return 160;
|
|
1279
|
+
return width.trim().endsWith("rem") ? value * 16 : value;
|
|
276
1280
|
}
|
|
277
1281
|
function aerisInternalClampColumnResizeDelta(delta, width, adjacentWidth, minimumWidth) {
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
1282
|
+
const minimum = Math.max(0, minimumWidth);
|
|
1283
|
+
const minimumDelta = Math.min(0, minimum - width);
|
|
1284
|
+
const maximumDelta = Math.max(0, adjacentWidth - minimum);
|
|
1285
|
+
return Math.min(maximumDelta, Math.max(minimumDelta, delta));
|
|
282
1286
|
}
|
|
283
1287
|
function aerisInternalSetColumnPairWidths(columns, field, adjacentField, width, adjacentWidth) {
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
1288
|
+
const nextWidth = aerisInternalPixelWidth(width);
|
|
1289
|
+
const nextAdjacentWidth = aerisInternalPixelWidth(adjacentWidth);
|
|
1290
|
+
return columns.map((column) => {
|
|
1291
|
+
if (column.field === field) return {
|
|
1292
|
+
...column,
|
|
1293
|
+
width: nextWidth
|
|
1294
|
+
};
|
|
1295
|
+
if (column.field === adjacentField) return {
|
|
1296
|
+
...column,
|
|
1297
|
+
width: nextAdjacentWidth
|
|
1298
|
+
};
|
|
1299
|
+
return column;
|
|
1300
|
+
});
|
|
293
1301
|
}
|
|
294
1302
|
function aerisInternalMeasureColumnWidths(header) {
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
});
|
|
305
|
-
return widths;
|
|
1303
|
+
const widths = /* @__PURE__ */ new Map();
|
|
1304
|
+
const row = header?.closest("tr");
|
|
1305
|
+
if (!row) return widths;
|
|
1306
|
+
row.querySelectorAll("th[data-field]").forEach((cell) => {
|
|
1307
|
+
const field = cell.dataset["field"];
|
|
1308
|
+
const width = cell.getBoundingClientRect().width;
|
|
1309
|
+
if (field && width > 0) widths.set(field, width);
|
|
1310
|
+
});
|
|
1311
|
+
return widths;
|
|
306
1312
|
}
|
|
307
1313
|
function aerisInternalApplyMeasuredColumnWidths(columns, widths) {
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
1314
|
+
return columns.map((column) => {
|
|
1315
|
+
const width = widths.get(column.field);
|
|
1316
|
+
return width == null ? column : {
|
|
1317
|
+
...column,
|
|
1318
|
+
width: aerisInternalPixelWidth(width)
|
|
1319
|
+
};
|
|
1320
|
+
});
|
|
312
1321
|
}
|
|
313
1322
|
function aerisInternalColumnResizeDirection(element) {
|
|
314
|
-
|
|
1323
|
+
return element.ownerDocument.defaultView?.getComputedStyle(element).direction === "rtl" ? -1 : 1;
|
|
315
1324
|
}
|
|
316
1325
|
function aerisInternalListenForColumnResize(document, move, end) {
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
1326
|
+
document.addEventListener("pointermove", move);
|
|
1327
|
+
document.addEventListener("pointerup", end);
|
|
1328
|
+
document.addEventListener("pointercancel", end);
|
|
1329
|
+
return () => {
|
|
1330
|
+
document.removeEventListener("pointermove", move);
|
|
1331
|
+
document.removeEventListener("pointerup", end);
|
|
1332
|
+
document.removeEventListener("pointercancel", end);
|
|
1333
|
+
};
|
|
325
1334
|
}
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
1335
|
+
var ɵAerisCellEditor = class ɵAerisCellEditor {
|
|
1336
|
+
element = inject(ElementRef).nativeElement;
|
|
1337
|
+
destroyRef = inject(DestroyRef);
|
|
1338
|
+
aerisInternalCellEditor = input.required(...ngDevMode ? [{ debugName: "aerisInternalCellEditor" }] : /* istanbul ignore next */ []);
|
|
1339
|
+
timer = null;
|
|
1340
|
+
constructor() {
|
|
1341
|
+
afterNextRender(() => {
|
|
1342
|
+
(aerisInternalFocusableElements(this.element, { checkComputedVisibility: true })[0] ?? this.element).focus({ preventScroll: true });
|
|
1343
|
+
const document = this.element.ownerDocument;
|
|
1344
|
+
const leave = (event) => {
|
|
1345
|
+
if (this.owns(event.target)) return;
|
|
1346
|
+
this.scheduleCommit(event);
|
|
1347
|
+
};
|
|
1348
|
+
document.addEventListener("pointerdown", leave, true);
|
|
1349
|
+
document.addEventListener("focusin", leave);
|
|
1350
|
+
this.destroyRef.onDestroy(() => {
|
|
1351
|
+
document.removeEventListener("pointerdown", leave, true);
|
|
1352
|
+
document.removeEventListener("focusin", leave);
|
|
1353
|
+
});
|
|
1354
|
+
});
|
|
1355
|
+
this.destroyRef.onDestroy(() => {
|
|
1356
|
+
if (this.timer !== null) clearTimeout(this.timer);
|
|
1357
|
+
});
|
|
1358
|
+
}
|
|
1359
|
+
handleKeydown(event) {
|
|
1360
|
+
if (event.defaultPrevented || event.isComposing) return;
|
|
1361
|
+
if (this.element.querySelector("[aria-expanded=\"true\"][aria-controls]")) return;
|
|
1362
|
+
if (event.key === "Enter") {
|
|
1363
|
+
if (event.target.closest("textarea,[contenteditable=\"true\"],button")) return;
|
|
1364
|
+
event.preventDefault();
|
|
1365
|
+
event.stopPropagation();
|
|
1366
|
+
this.aerisInternalCellEditor().commit(event);
|
|
1367
|
+
return;
|
|
1368
|
+
}
|
|
1369
|
+
if (event.key !== "Escape") return;
|
|
1370
|
+
event.preventDefault();
|
|
1371
|
+
event.stopPropagation();
|
|
1372
|
+
this.aerisInternalCellEditor().cancel(event);
|
|
1373
|
+
}
|
|
1374
|
+
handleFocusOut(event) {
|
|
1375
|
+
if (this.owns(event.relatedTarget)) return;
|
|
1376
|
+
if (!event.relatedTarget && this.element.querySelector("[aria-expanded=\"true\"][aria-controls]")) return;
|
|
1377
|
+
this.scheduleCommit(event);
|
|
1378
|
+
}
|
|
1379
|
+
scheduleCommit(event) {
|
|
1380
|
+
const editor = this.aerisInternalCellEditor();
|
|
1381
|
+
if (this.timer !== null) clearTimeout(this.timer);
|
|
1382
|
+
this.timer = setTimeout(() => {
|
|
1383
|
+
this.timer = null;
|
|
1384
|
+
if (this.destroyRef.destroyed || this.aerisInternalCellEditor() !== editor) return;
|
|
1385
|
+
if (event.type !== "pointerdown" && this.owns(this.element.ownerDocument.activeElement)) return;
|
|
1386
|
+
editor.commit(event);
|
|
1387
|
+
}, 0);
|
|
1388
|
+
}
|
|
1389
|
+
owns(target) {
|
|
1390
|
+
if (!(target instanceof Node)) return false;
|
|
1391
|
+
const roots = [this.element];
|
|
1392
|
+
const visited = /* @__PURE__ */ new Set();
|
|
1393
|
+
for (const root of roots) {
|
|
1394
|
+
if (visited.has(root)) continue;
|
|
1395
|
+
visited.add(root);
|
|
1396
|
+
if (root.contains(target)) return true;
|
|
1397
|
+
for (const controller of [root, ...root.querySelectorAll("[aria-controls], [aria-owns]")]) {
|
|
1398
|
+
const ids = `${controller.getAttribute("aria-controls") ?? ""} ${controller.getAttribute("aria-owns") ?? ""}`;
|
|
1399
|
+
for (const id of ids.split(/\s+/).filter(Boolean)) {
|
|
1400
|
+
const panel = this.element.ownerDocument.getElementById(id);
|
|
1401
|
+
if (panel && !visited.has(panel)) roots.push(panel);
|
|
1402
|
+
}
|
|
1403
|
+
}
|
|
1404
|
+
}
|
|
1405
|
+
return false;
|
|
1406
|
+
}
|
|
1407
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
1408
|
+
minVersion: "12.0.0",
|
|
1409
|
+
version: "22.2.3",
|
|
1410
|
+
ngImport: i0,
|
|
1411
|
+
type: ɵAerisCellEditor,
|
|
1412
|
+
deps: [],
|
|
1413
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
1414
|
+
});
|
|
1415
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
1416
|
+
minVersion: "17.1.0",
|
|
1417
|
+
version: "22.2.3",
|
|
1418
|
+
type: ɵAerisCellEditor,
|
|
1419
|
+
isStandalone: true,
|
|
1420
|
+
selector: "[aerisInternalCellEditor]",
|
|
1421
|
+
inputs: { aerisInternalCellEditor: {
|
|
1422
|
+
classPropertyName: "aerisInternalCellEditor",
|
|
1423
|
+
publicName: "aerisInternalCellEditor",
|
|
1424
|
+
isSignal: true,
|
|
1425
|
+
isRequired: true,
|
|
1426
|
+
transformFunction: null
|
|
1427
|
+
} },
|
|
1428
|
+
host: {
|
|
1429
|
+
attributes: { "tabindex": "-1" },
|
|
1430
|
+
listeners: {
|
|
1431
|
+
"keydown": "handleKeydown($event)",
|
|
1432
|
+
"focusout": "handleFocusOut($event)",
|
|
1433
|
+
"click": "$event.stopPropagation()",
|
|
1434
|
+
"dblclick": "$event.stopPropagation()"
|
|
1435
|
+
},
|
|
1436
|
+
classAttribute: "aeris-cell-editor"
|
|
1437
|
+
},
|
|
1438
|
+
ngImport: i0
|
|
1439
|
+
});
|
|
1440
|
+
};
|
|
1441
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1442
|
+
minVersion: "12.0.0",
|
|
1443
|
+
version: "22.2.3",
|
|
1444
|
+
ngImport: i0,
|
|
1445
|
+
type: ɵAerisCellEditor,
|
|
1446
|
+
decorators: [{
|
|
1447
|
+
type: Directive,
|
|
1448
|
+
args: [{
|
|
1449
|
+
selector: "[aerisInternalCellEditor]",
|
|
1450
|
+
host: {
|
|
1451
|
+
class: "aeris-cell-editor",
|
|
1452
|
+
tabindex: "-1",
|
|
1453
|
+
"(keydown)": "handleKeydown($event)",
|
|
1454
|
+
"(focusout)": "handleFocusOut($event)",
|
|
1455
|
+
"(click)": "$event.stopPropagation()",
|
|
1456
|
+
"(dblclick)": "$event.stopPropagation()"
|
|
1457
|
+
}
|
|
1458
|
+
}]
|
|
1459
|
+
}],
|
|
1460
|
+
ctorParameters: () => [],
|
|
1461
|
+
propDecorators: { aerisInternalCellEditor: [{
|
|
1462
|
+
type: i0.Input,
|
|
1463
|
+
args: [{
|
|
1464
|
+
isSignal: true,
|
|
1465
|
+
alias: "aerisInternalCellEditor",
|
|
1466
|
+
required: true
|
|
1467
|
+
}]
|
|
1468
|
+
}] }
|
|
1469
|
+
});
|
|
1470
|
+
function aerisInternalOrderPinnedColumns(columns) {
|
|
1471
|
+
if (!columns.some((column) => column.pinned)) return columns;
|
|
1472
|
+
return [
|
|
1473
|
+
...columns.filter((column) => column.pinned === "start"),
|
|
1474
|
+
...columns.filter((column) => !column.pinned),
|
|
1475
|
+
...columns.filter((column) => column.pinned === "end")
|
|
1476
|
+
];
|
|
351
1477
|
}
|
|
1478
|
+
function aerisInternalPinnedRowSides(pins) {
|
|
1479
|
+
const result = /* @__PURE__ */ new Map();
|
|
1480
|
+
for (const key of pins.bottom) if (key.trim()) result.set(key, "bottom");
|
|
1481
|
+
for (const key of pins.top) if (key.trim()) result.set(key, "top");
|
|
1482
|
+
return result;
|
|
1483
|
+
}
|
|
1484
|
+
function aerisInternalOrderPinnedRows(rows, sides, key) {
|
|
1485
|
+
if (!sides.size) return rows;
|
|
1486
|
+
const top = [], middle = [], bottom = [];
|
|
1487
|
+
for (const row of rows) {
|
|
1488
|
+
const side = sides.get(key(row));
|
|
1489
|
+
(side === "top" ? top : side === "bottom" ? bottom : middle).push(row);
|
|
1490
|
+
}
|
|
1491
|
+
return [
|
|
1492
|
+
...top,
|
|
1493
|
+
...middle,
|
|
1494
|
+
...bottom
|
|
1495
|
+
];
|
|
1496
|
+
}
|
|
1497
|
+
var ɵAerisTablePinning = class ɵAerisTablePinning {
|
|
1498
|
+
aerisInternalTablePinning = input(true, ...ngDevMode ? [{ debugName: "aerisInternalTablePinning" }] : /* istanbul ignore next */ []);
|
|
1499
|
+
viewport = inject(ElementRef).nativeElement;
|
|
1500
|
+
destroyRef = inject(DestroyRef);
|
|
1501
|
+
scheduler = aerisInternalCreateFrameScheduler(() => this.measure());
|
|
1502
|
+
resizeObserver = null;
|
|
1503
|
+
observed = /* @__PURE__ */ new Set();
|
|
1504
|
+
started = false;
|
|
1505
|
+
constructor() {
|
|
1506
|
+
effect(() => {
|
|
1507
|
+
this.aerisInternalTablePinning();
|
|
1508
|
+
if (this.started) this.scheduler.schedule();
|
|
1509
|
+
});
|
|
1510
|
+
afterNextRender(() => {
|
|
1511
|
+
this.started = true;
|
|
1512
|
+
if (typeof ResizeObserver !== "undefined") this.resizeObserver = new ResizeObserver(() => this.scheduler.schedule());
|
|
1513
|
+
const mutations = new MutationObserver(() => this.scheduler.schedule());
|
|
1514
|
+
mutations.observe(this.viewport, {
|
|
1515
|
+
childList: true,
|
|
1516
|
+
subtree: true,
|
|
1517
|
+
attributes: true,
|
|
1518
|
+
attributeFilter: ["data-pinned-column", "data-pinned-row"]
|
|
1519
|
+
});
|
|
1520
|
+
this.measure();
|
|
1521
|
+
this.destroyRef.onDestroy(() => mutations.disconnect());
|
|
1522
|
+
});
|
|
1523
|
+
this.destroyRef.onDestroy(() => {
|
|
1524
|
+
this.resizeObserver?.disconnect();
|
|
1525
|
+
this.observed.clear();
|
|
1526
|
+
this.scheduler.cancel();
|
|
1527
|
+
});
|
|
1528
|
+
}
|
|
1529
|
+
measure() {
|
|
1530
|
+
if (this.destroyRef.destroyed) return;
|
|
1531
|
+
const table = this.viewport.querySelector("table");
|
|
1532
|
+
if (!table) return;
|
|
1533
|
+
const headers = Array.from(table.tHead?.rows ?? []);
|
|
1534
|
+
const headerCells = Array.from(headers[0]?.cells ?? []);
|
|
1535
|
+
const pinnedRows = Array.from(table.tBodies[0]?.rows ?? []).filter((row) => row.hasAttribute("data-pinned-row"));
|
|
1536
|
+
const wanted = /* @__PURE__ */ new Set([
|
|
1537
|
+
this.viewport,
|
|
1538
|
+
table,
|
|
1539
|
+
...headers,
|
|
1540
|
+
...headerCells,
|
|
1541
|
+
...pinnedRows
|
|
1542
|
+
]);
|
|
1543
|
+
for (const element of this.observed) if (!wanted.has(element)) {
|
|
1544
|
+
this.resizeObserver?.unobserve(element);
|
|
1545
|
+
this.observed.delete(element);
|
|
1546
|
+
}
|
|
1547
|
+
for (const element of wanted) if (!this.observed.has(element)) {
|
|
1548
|
+
this.observed.add(element);
|
|
1549
|
+
this.resizeObserver?.observe(element);
|
|
1550
|
+
}
|
|
1551
|
+
const stacked = getComputedStyle(table).display === "block";
|
|
1552
|
+
let headerHeight = 0;
|
|
1553
|
+
for (const header of headers) {
|
|
1554
|
+
header.style.setProperty("--aeris-table-header-offset", `${headerHeight}px`);
|
|
1555
|
+
headerHeight += header.getBoundingClientRect().height;
|
|
1556
|
+
}
|
|
1557
|
+
const headerDisabled = stacked || headerHeight > Math.max(0, this.viewport.clientHeight - 44);
|
|
1558
|
+
this.viewport.toggleAttribute("data-pin-header-disabled", headerDisabled);
|
|
1559
|
+
if (!this.aerisInternalTablePinning() || headerDisabled) headerHeight = 0;
|
|
1560
|
+
const offsets = /* @__PURE__ */ new Map();
|
|
1561
|
+
let start = 0, end = 0;
|
|
1562
|
+
for (const cell of headerCells) if (cell.dataset["pinnedColumn"] === "start") {
|
|
1563
|
+
offsets.set(cell.dataset["field"] ?? "", {
|
|
1564
|
+
side: "start",
|
|
1565
|
+
offset: start
|
|
1566
|
+
});
|
|
1567
|
+
start += cell.getBoundingClientRect().width;
|
|
1568
|
+
}
|
|
1569
|
+
for (const cell of [...headerCells].reverse()) if (cell.dataset["pinnedColumn"] === "end") {
|
|
1570
|
+
offsets.set(cell.dataset["field"] ?? "", {
|
|
1571
|
+
side: "end",
|
|
1572
|
+
offset: end
|
|
1573
|
+
});
|
|
1574
|
+
end += cell.getBoundingClientRect().width;
|
|
1575
|
+
}
|
|
1576
|
+
const inlineDisabled = stacked || start + end > Math.max(0, this.viewport.clientWidth - 44);
|
|
1577
|
+
this.viewport.toggleAttribute("data-pin-inline-disabled", inlineDisabled);
|
|
1578
|
+
for (const cell of table.querySelectorAll(":scope > thead > tr > th[data-pinned-column], :scope > tbody > tr > td[data-pinned-column]")) {
|
|
1579
|
+
const pin = offsets.get(cell.dataset["field"] ?? "");
|
|
1580
|
+
cell.style.setProperty("--aeris-table-pin-start", pin?.side === "start" ? `${pin.offset}px` : "auto");
|
|
1581
|
+
cell.style.setProperty("--aeris-table-pin-end", pin?.side === "end" ? `${pin.offset}px` : "auto");
|
|
1582
|
+
}
|
|
1583
|
+
let top = 0, bottom = 0;
|
|
1584
|
+
for (const row of pinnedRows) if (row.dataset["pinnedRow"] === "top") {
|
|
1585
|
+
row.style.setProperty("--aeris-table-row-offset", `${headerHeight + top}px`);
|
|
1586
|
+
top += row.getBoundingClientRect().height;
|
|
1587
|
+
}
|
|
1588
|
+
for (const row of [...pinnedRows].reverse()) if (row.dataset["pinnedRow"] === "bottom") {
|
|
1589
|
+
row.style.setProperty("--aeris-table-row-offset", `${bottom}px`);
|
|
1590
|
+
bottom += row.getBoundingClientRect().height;
|
|
1591
|
+
}
|
|
1592
|
+
const blockDisabled = stacked || top + bottom > Math.max(0, this.viewport.clientHeight - headerHeight - 44);
|
|
1593
|
+
this.viewport.toggleAttribute("data-pin-block-disabled", blockDisabled);
|
|
1594
|
+
this.viewport.style.scrollPaddingBlockStart = `${headerHeight + (blockDisabled ? 0 : top)}px`;
|
|
1595
|
+
this.viewport.style.scrollPaddingBlockEnd = `${blockDisabled ? 0 : bottom}px`;
|
|
1596
|
+
this.viewport.style.scrollPaddingInlineStart = `${inlineDisabled ? 0 : start}px`;
|
|
1597
|
+
this.viewport.style.scrollPaddingInlineEnd = `${inlineDisabled ? 0 : end}px`;
|
|
1598
|
+
}
|
|
1599
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
1600
|
+
minVersion: "12.0.0",
|
|
1601
|
+
version: "22.2.3",
|
|
1602
|
+
ngImport: i0,
|
|
1603
|
+
type: ɵAerisTablePinning,
|
|
1604
|
+
deps: [],
|
|
1605
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
1606
|
+
});
|
|
1607
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
1608
|
+
minVersion: "17.1.0",
|
|
1609
|
+
version: "22.2.3",
|
|
1610
|
+
type: ɵAerisTablePinning,
|
|
1611
|
+
isStandalone: true,
|
|
1612
|
+
selector: "[aerisInternalTablePinning]",
|
|
1613
|
+
inputs: { aerisInternalTablePinning: {
|
|
1614
|
+
classPropertyName: "aerisInternalTablePinning",
|
|
1615
|
+
publicName: "aerisInternalTablePinning",
|
|
1616
|
+
isSignal: true,
|
|
1617
|
+
isRequired: false,
|
|
1618
|
+
transformFunction: null
|
|
1619
|
+
} },
|
|
1620
|
+
host: { properties: { "attr.data-sticky-header": "aerisInternalTablePinning()" } },
|
|
1621
|
+
ngImport: i0
|
|
1622
|
+
});
|
|
1623
|
+
};
|
|
1624
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1625
|
+
minVersion: "12.0.0",
|
|
1626
|
+
version: "22.2.3",
|
|
1627
|
+
ngImport: i0,
|
|
1628
|
+
type: ɵAerisTablePinning,
|
|
1629
|
+
decorators: [{
|
|
1630
|
+
type: Directive,
|
|
1631
|
+
args: [{
|
|
1632
|
+
selector: "[aerisInternalTablePinning]",
|
|
1633
|
+
host: { "[attr.data-sticky-header]": "aerisInternalTablePinning()" }
|
|
1634
|
+
}]
|
|
1635
|
+
}],
|
|
1636
|
+
ctorParameters: () => [],
|
|
1637
|
+
propDecorators: { aerisInternalTablePinning: [{
|
|
1638
|
+
type: i0.Input,
|
|
1639
|
+
args: [{
|
|
1640
|
+
isSignal: true,
|
|
1641
|
+
alias: "aerisInternalTablePinning",
|
|
1642
|
+
required: false
|
|
1643
|
+
}]
|
|
1644
|
+
}] }
|
|
1645
|
+
});
|
|
1646
|
+
const AERIS_UI_VERSION = "22.0.0-alpha.11";
|
|
1647
|
+
export { AERIS_OVERLAY_APPEND_TO, AERIS_UI_VERSION, aerisInternalApplyMeasuredColumnWidths, aerisInternalCalendarDayIndex, aerisInternalClampColumnResizeDelta, aerisInternalClampOverlayPoint, aerisInternalColumnResizeDirection, aerisInternalColumnSeparatorValues, aerisInternalColumnWidthPixels, aerisInternalCreateFrameScheduler, aerisInternalDateAtMidnight, aerisInternalDateFromParts, aerisInternalDateTimeLayout, aerisInternalDaysInMonth, aerisInternalFocusInitialElement, aerisInternalFocusableElements, aerisInternalFormatDateParts, aerisInternalFormatTimeParts, aerisInternalFromTwelveHour, aerisInternalIsFocusable, aerisInternalListenForColumnResize, aerisInternalLocalDate, aerisInternalLocaleFirstDay, aerisInternalMeasureColumnWidths, aerisInternalObserveViewport, aerisInternalOrderPinnedColumns, aerisInternalOrderPinnedRows, aerisInternalParseDateParts, aerisInternalParseTimeParts, aerisInternalPinnedRowSides, aerisInternalPixelWidth, aerisInternalPositionAnchoredOverlay, aerisInternalReadDate, aerisInternalReadTime, aerisInternalResolveDateDraft, aerisInternalSetColumnPairWidths, aerisInternalToTwelveHour, aerisInternalTrapTabFocus, aerisInternalViewportBounds, boundarySelectValue, dismissTopAerisOverlay, filterSelectOptions, groupSelectOptions, nextEnabledSelectValue, provideAerisIcons, selectVirtualRange, ɵAerisAppendTo, ɵAerisCellEditor, ɵAerisIcon, ɵAerisTablePinning, aerisInternalDisplayInvalid as ɵaerisDisplayInvalid, aerisInternalResolveAppendTo as ɵaerisResolveAppendTo, ɵisTopmostAerisOverlay, ɵlockAerisDocumentScroll, ɵregisterAerisOverlay, ɵunlockAerisDocumentScroll, ɵunregisterAerisOverlay };
|
|
352
1648
|
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
/**
|
|
356
|
-
* Generated bundle index. Do not edit.
|
|
357
|
-
*/
|
|
358
|
-
|
|
359
|
-
export { AERIS_UI_VERSION, aerisInternalApplyMeasuredColumnWidths, aerisInternalClampColumnResizeDelta, aerisInternalClampOverlayPoint, aerisInternalColumnResizeDirection, aerisInternalColumnWidthPixels, aerisInternalCreateFrameScheduler, aerisInternalFocusInitialElement, aerisInternalFocusableElements, aerisInternalIsFocusable, aerisInternalListenForColumnResize, aerisInternalMeasureColumnWidths, aerisInternalPixelWidth, aerisInternalPositionAnchoredOverlay, aerisInternalSetColumnPairWidths, aerisInternalTrapTabFocus, boundarySelectValue, filterSelectOptions, groupSelectOptions, nextEnabledSelectValue, selectVirtualRange, ɵisTopmostAerisOverlay, ɵlockAerisDocumentScroll, ɵregisterAerisOverlay, ɵunlockAerisDocumentScroll, ɵunregisterAerisOverlay };
|
|
360
|
-
//# sourceMappingURL=aeris-ui-core.mjs.map
|
|
1649
|
+
//# sourceMappingURL=aeris-ui-core.mjs.map
|