@aeris-ui/core 22.0.0-alpha.7 → 22.0.0-alpha.9
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 +2 -2
- package/fesm2022/aeris-ui-core-accordion.mjs +646 -255
- 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 +1171 -428
- 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 +205 -101
- package/fesm2022/aeris-ui-core-block-ui.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-breadcrumb.mjs +547 -177
- package/fesm2022/aeris-ui-core-breadcrumb.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-button-group.mjs +153 -38
- package/fesm2022/aeris-ui-core-button-group.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-button.mjs +730 -110
- 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 +690 -353
- package/fesm2022/aeris-ui-core-carousel.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-cascade-select.mjs +915 -423
- package/fesm2022/aeris-ui-core-cascade-select.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-chart.mjs +455 -258
- package/fesm2022/aeris-ui-core-chart.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-checkbox.mjs +432 -135
- package/fesm2022/aeris-ui-core-checkbox.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-chip.mjs +430 -117
- 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-color-picker.mjs +1313 -683
- package/fesm2022/aeris-ui-core-color-picker.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-compare.mjs +819 -310
- package/fesm2022/aeris-ui-core-compare.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-confirm-dialog.mjs +1392 -551
- package/fesm2022/aeris-ui-core-confirm-dialog.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-confirm-popup.mjs +1447 -744
- package/fesm2022/aeris-ui-core-confirm-popup.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-context-menu.mjs +900 -450
- package/fesm2022/aeris-ui-core-context-menu.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-date-picker.mjs +1656 -863
- package/fesm2022/aeris-ui-core-date-picker.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-dialog.mjs +1066 -355
- 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 +1002 -326
- package/fesm2022/aeris-ui-core-drawer.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-dynamic-dialog.mjs +402 -249
- package/fesm2022/aeris-ui-core-dynamic-dialog.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-editor.mjs +934 -572
- package/fesm2022/aeris-ui-core-editor.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-file-upload.mjs +1339 -514
- 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 +672 -170
- package/fesm2022/aeris-ui-core-form-field.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-galleria.mjs +1987 -797
- 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 -103
- package/fesm2022/aeris-ui-core-icon-field.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-inplace.mjs +452 -130
- package/fesm2022/aeris-ui-core-inplace.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-input-group.mjs +413 -112
- package/fesm2022/aeris-ui-core-input-group.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-input-mask.mjs +650 -248
- package/fesm2022/aeris-ui-core-input-mask.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-input-number.mjs +902 -334
- package/fesm2022/aeris-ui-core-input-number.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-input-otp.mjs +667 -253
- package/fesm2022/aeris-ui-core-input-otp.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-input-text.mjs +618 -152
- package/fesm2022/aeris-ui-core-input-text.mjs.map +1 -1
- 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-mega-menu.mjs +601 -388
- package/fesm2022/aeris-ui-core-mega-menu.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-menu.mjs +1032 -495
- package/fesm2022/aeris-ui-core-menu.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-menubar.mjs +960 -491
- package/fesm2022/aeris-ui-core-menubar.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-message.mjs +477 -145
- package/fesm2022/aeris-ui-core-message.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-meter-group.mjs +587 -196
- package/fesm2022/aeris-ui-core-meter-group.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-multi-select.mjs +1550 -552
- package/fesm2022/aeris-ui-core-multi-select.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-order-list.mjs +518 -202
- package/fesm2022/aeris-ui-core-order-list.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-organization-chart.mjs +455 -177
- package/fesm2022/aeris-ui-core-organization-chart.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-paginator.mjs +329 -127
- package/fesm2022/aeris-ui-core-paginator.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-panel.mjs +596 -196
- package/fesm2022/aeris-ui-core-panel.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-password.mjs +894 -247
- package/fesm2022/aeris-ui-core-password.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-pick-list.mjs +1280 -659
- package/fesm2022/aeris-ui-core-pick-list.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-popover.mjs +892 -386
- package/fesm2022/aeris-ui-core-popover.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-progress-bar.mjs +549 -176
- package/fesm2022/aeris-ui-core-progress-bar.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-progress-spinner.mjs +410 -133
- package/fesm2022/aeris-ui-core-progress-spinner.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-radio-button.mjs +386 -119
- package/fesm2022/aeris-ui-core-radio-button.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-rating.mjs +502 -225
- 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 +204 -63
- package/fesm2022/aeris-ui-core-scroll-top.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-select.mjs +1794 -643
- package/fesm2022/aeris-ui-core-select.mjs.map +1 -1
- 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 +868 -404
- package/fesm2022/aeris-ui-core-slider.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-speed-dial.mjs +800 -329
- package/fesm2022/aeris-ui-core-speed-dial.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-split-button.mjs +918 -257
- package/fesm2022/aeris-ui-core-split-button.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-splitter.mjs +812 -352
- package/fesm2022/aeris-ui-core-splitter.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-stepper.mjs +697 -254
- 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 +1984 -865
- package/fesm2022/aeris-ui-core-table.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-tabs.mjs +686 -324
- package/fesm2022/aeris-ui-core-tabs.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-textarea.mjs +846 -212
- package/fesm2022/aeris-ui-core-textarea.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-theme-builder.mjs +1258 -1413
- package/fesm2022/aeris-ui-core-theme-builder.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-theming.mjs +132 -147
- package/fesm2022/aeris-ui-core-theming.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-tiered-menu.mjs +885 -465
- 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 +855 -615
- package/fesm2022/aeris-ui-core-toast.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-toggle-switch.mjs +390 -127
- package/fesm2022/aeris-ui-core-toggle-switch.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-toolbar.mjs +458 -121
- package/fesm2022/aeris-ui-core-toolbar.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-tooltip.mjs +623 -345
- package/fesm2022/aeris-ui-core-tooltip.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-tree-select.mjs +1356 -601
- package/fesm2022/aeris-ui-core-tree-select.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-tree-table.mjs +2001 -942
- package/fesm2022/aeris-ui-core-tree-table.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-tree.mjs +1103 -658
- package/fesm2022/aeris-ui-core-tree.mjs.map +1 -1
- package/fesm2022/aeris-ui-core.mjs +861 -842
- package/fesm2022/aeris-ui-core.mjs.map +1 -1
- package/package.json +1 -1
- package/schematics/runtime/theme-builder/aeris-theme.js +28 -16
- package/schematics/runtime/theme-builder/aeris-theme.js.map +1 -1
- package/styles/_fallback-colors.scss +3 -3
- package/styles/_tokens.scss +5 -5
- package/styles/aeris.css +12 -16
- package/styles/controls.css +1 -1
- package/types/aeris-ui-core-accordion.d.ts +166 -93
- package/types/aeris-ui-core-animate-on-scroll.d.ts +71 -31
- package/types/aeris-ui-core-auto-complete.d.ts +326 -149
- 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 -47
- package/types/aeris-ui-core-block-ui.d.ts +47 -27
- package/types/aeris-ui-core-breadcrumb.d.ts +162 -92
- package/types/aeris-ui-core-button-group.d.ts +37 -16
- package/types/aeris-ui-core-button.d.ts +226 -64
- package/types/aeris-ui-core-card.d.ts +74 -37
- package/types/aeris-ui-core-carousel.d.ts +197 -117
- package/types/aeris-ui-core-cascade-select.d.ts +252 -131
- package/types/aeris-ui-core-chart.d.ts +134 -84
- package/types/aeris-ui-core-checkbox.d.ts +139 -55
- package/types/aeris-ui-core-chip.d.ts +116 -51
- package/types/aeris-ui-core-class-names.d.ts +22 -20
- package/types/aeris-ui-core-color-picker.d.ts +347 -150
- package/types/aeris-ui-core-compare.d.ts +224 -101
- package/types/aeris-ui-core-confirm-dialog.d.ts +441 -249
- package/types/aeris-ui-core-confirm-popup.d.ts +440 -268
- package/types/aeris-ui-core-context-menu.d.ts +262 -150
- package/types/aeris-ui-core-date-picker.d.ts +488 -226
- package/types/aeris-ui-core-dialog.d.ts +288 -121
- package/types/aeris-ui-core-divider.d.ts +58 -20
- package/types/aeris-ui-core-drawer.d.ts +273 -116
- package/types/aeris-ui-core-dynamic-dialog.d.ts +157 -140
- package/types/aeris-ui-core-editor.d.ts +243 -124
- package/types/aeris-ui-core-file-upload.d.ts +366 -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 +158 -62
- package/types/aeris-ui-core-galleria.d.ts +589 -256
- package/types/aeris-ui-core-glass.d.ts +24 -11
- package/types/aeris-ui-core-icon-field.d.ts +94 -34
- package/types/aeris-ui-core-inplace.d.ts +123 -62
- package/types/aeris-ui-core-input-group.d.ts +84 -35
- package/types/aeris-ui-core-input-mask.d.ts +194 -71
- package/types/aeris-ui-core-input-number.d.ts +272 -90
- package/types/aeris-ui-core-input-otp.d.ts +190 -82
- package/types/aeris-ui-core-input-text.d.ts +185 -62
- package/types/aeris-ui-core-key-filter.d.ts +53 -39
- package/types/aeris-ui-core-mega-menu.d.ts +174 -123
- package/types/aeris-ui-core-menu.d.ts +275 -172
- package/types/aeris-ui-core-menubar.d.ts +272 -160
- package/types/aeris-ui-core-message.d.ts +132 -61
- package/types/aeris-ui-core-meter-group.d.ts +162 -90
- package/types/aeris-ui-core-multi-select.d.ts +435 -187
- package/types/aeris-ui-core-order-list.d.ts +143 -66
- package/types/aeris-ui-core-organization-chart.d.ts +132 -77
- package/types/aeris-ui-core-paginator.d.ts +92 -46
- package/types/aeris-ui-core-panel.d.ts +149 -78
- package/types/aeris-ui-core-password.d.ts +257 -108
- package/types/aeris-ui-core-pick-list.d.ts +373 -179
- package/types/aeris-ui-core-popover.d.ts +218 -107
- package/types/aeris-ui-core-progress-bar.d.ts +156 -73
- package/types/aeris-ui-core-progress-spinner.d.ts +110 -48
- package/types/aeris-ui-core-radio-button.d.ts +124 -51
- 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 +64 -29
- package/types/aeris-ui-core-select.d.ts +474 -226
- package/types/aeris-ui-core-skeleton.d.ts +39 -17
- package/types/aeris-ui-core-slider.d.ts +270 -116
- package/types/aeris-ui-core-speed-dial.d.ts +240 -112
- package/types/aeris-ui-core-split-button.d.ts +265 -115
- package/types/aeris-ui-core-splitter.d.ts +224 -106
- package/types/aeris-ui-core-stepper.d.ts +183 -91
- package/types/aeris-ui-core-style-class.d.ts +141 -71
- package/types/aeris-ui-core-table.d.ts +595 -308
- package/types/aeris-ui-core-tabs.d.ts +163 -90
- package/types/aeris-ui-core-textarea.d.ts +261 -81
- package/types/aeris-ui-core-theme-builder.d.ts +466 -451
- package/types/aeris-ui-core-theming.d.ts +42 -49
- package/types/aeris-ui-core-tiered-menu.d.ts +249 -147
- package/types/aeris-ui-core-timeline.d.ts +108 -71
- package/types/aeris-ui-core-toast.d.ts +219 -155
- package/types/aeris-ui-core-toggle-switch.d.ts +125 -52
- package/types/aeris-ui-core-toolbar.d.ts +98 -41
- package/types/aeris-ui-core-tooltip.d.ts +157 -92
- package/types/aeris-ui-core-tree-select.d.ts +359 -179
- package/types/aeris-ui-core-tree-table.d.ts +565 -290
- package/types/aeris-ui-core-tree.d.ts +269 -165
- package/types/aeris-ui-core.d.ts +161 -125
|
@@ -1,930 +1,949 @@
|
|
|
1
|
-
import { DOCUMENT } from
|
|
2
|
-
import * as i0 from
|
|
3
|
-
import {
|
|
4
|
-
|
|
1
|
+
import { DOCUMENT } from "@angular/common";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
import { DestroyRef, Directive, ElementRef, InjectionToken, Renderer2, effect, inject, input, output } from "@angular/core";
|
|
5
4
|
function aerisInternalDisplayInvalid(invalid, touched) {
|
|
6
|
-
|
|
5
|
+
return invalid && (touched ?? true);
|
|
7
6
|
}
|
|
8
|
-
|
|
9
7
|
function aerisInternalClampOverlayPoint(point, width, height, viewportWidth, viewportHeight, margin, viewportLeft = 0, viewportTop = 0) {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
8
|
+
const padding = normalizePadding(margin);
|
|
9
|
+
return {
|
|
10
|
+
x: clamp(point.x, viewportLeft + padding.left, Math.max(viewportLeft + padding.left, viewportLeft + viewportWidth - width - padding.right)),
|
|
11
|
+
y: clamp(point.y, viewportTop + padding.top, Math.max(viewportTop + padding.top, viewportTop + viewportHeight - height - padding.bottom))
|
|
12
|
+
};
|
|
15
13
|
}
|
|
16
14
|
function aerisInternalPositionAnchoredOverlay(options) {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
: clampedPoint),
|
|
26
|
-
};
|
|
15
|
+
const bounds = resolveBounds(options);
|
|
16
|
+
const placement = resolvePlacement(options, bounds);
|
|
17
|
+
const point = rawPosition(placement, options);
|
|
18
|
+
const clampedPoint = aerisInternalClampOverlayPoint(point, options.width, options.height, bounds.right - bounds.left, bounds.bottom - bounds.top, 0, bounds.left, bounds.top);
|
|
19
|
+
return {
|
|
20
|
+
placement,
|
|
21
|
+
...options.tetherToAnchor ? tetheredPoint(placement, point, clampedPoint) : clampedPoint
|
|
22
|
+
};
|
|
27
23
|
}
|
|
28
24
|
function tetheredPoint(placement, point, clampedPoint) {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
25
|
+
return placement === "top" || placement === "bottom" ? {
|
|
26
|
+
x: clampedPoint.x,
|
|
27
|
+
y: point.y
|
|
28
|
+
} : {
|
|
29
|
+
x: point.x,
|
|
30
|
+
y: clampedPoint.y
|
|
31
|
+
};
|
|
32
32
|
}
|
|
33
33
|
function resolvePlacement(options, bounds) {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
const fitting = candidates.find((placement) => spaces[placement] >=
|
|
43
|
-
(placement === 'top' || placement === 'bottom' ? options.height : options.width));
|
|
44
|
-
return (fitting ??
|
|
45
|
-
candidates.reduce((best, placement) => (spaces[placement] > spaces[best] ? placement : best)));
|
|
34
|
+
const spaces = {
|
|
35
|
+
bottom: bounds.bottom - options.target.bottom - options.offset,
|
|
36
|
+
top: options.target.top - bounds.top - options.offset,
|
|
37
|
+
right: bounds.right - options.target.right - options.offset,
|
|
38
|
+
left: options.target.left - bounds.left - options.offset
|
|
39
|
+
};
|
|
40
|
+
const candidates = placementCandidates(options.placement === "auto" ? "bottom" : options.placement, options.tetherToAnchor ?? false);
|
|
41
|
+
return candidates.find((placement) => spaces[placement] >= (placement === "top" || placement === "bottom" ? options.height : options.width)) ?? candidates.reduce((best, placement) => spaces[placement] > spaces[best] ? placement : best);
|
|
46
42
|
}
|
|
47
43
|
function resolveBounds(options) {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
44
|
+
const padding = normalizePadding(options.collisionPadding ?? options.margin);
|
|
45
|
+
const left = options.viewportLeft ?? 0;
|
|
46
|
+
const top = options.viewportTop ?? 0;
|
|
47
|
+
return {
|
|
48
|
+
top: top + padding.top,
|
|
49
|
+
right: left + options.viewportWidth - padding.right,
|
|
50
|
+
bottom: top + options.viewportHeight - padding.bottom,
|
|
51
|
+
left: left + padding.left
|
|
52
|
+
};
|
|
57
53
|
}
|
|
58
54
|
function normalizePadding(padding) {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
55
|
+
if (typeof padding === "number") {
|
|
56
|
+
const value = Math.max(0, padding);
|
|
57
|
+
return {
|
|
58
|
+
top: value,
|
|
59
|
+
right: value,
|
|
60
|
+
bottom: value,
|
|
61
|
+
left: value
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
return {
|
|
65
|
+
top: Math.max(0, padding.top ?? 0),
|
|
66
|
+
right: Math.max(0, padding.right ?? 0),
|
|
67
|
+
bottom: Math.max(0, padding.bottom ?? 0),
|
|
68
|
+
left: Math.max(0, padding.left ?? 0)
|
|
69
|
+
};
|
|
69
70
|
}
|
|
70
71
|
function placementCandidates(preferred, preserveAxis) {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
72
|
+
if (preserveAxis) {
|
|
73
|
+
if (preferred === "top") return ["top", "bottom"];
|
|
74
|
+
if (preferred === "bottom") return ["bottom", "top"];
|
|
75
|
+
if (preferred === "right") return ["right", "left"];
|
|
76
|
+
return ["left", "right"];
|
|
77
|
+
}
|
|
78
|
+
switch (preferred) {
|
|
79
|
+
case "top": return [
|
|
80
|
+
"top",
|
|
81
|
+
"bottom",
|
|
82
|
+
"right",
|
|
83
|
+
"left"
|
|
84
|
+
];
|
|
85
|
+
case "right": return [
|
|
86
|
+
"right",
|
|
87
|
+
"left",
|
|
88
|
+
"bottom",
|
|
89
|
+
"top"
|
|
90
|
+
];
|
|
91
|
+
case "bottom": return [
|
|
92
|
+
"bottom",
|
|
93
|
+
"top",
|
|
94
|
+
"right",
|
|
95
|
+
"left"
|
|
96
|
+
];
|
|
97
|
+
case "left": return [
|
|
98
|
+
"left",
|
|
99
|
+
"right",
|
|
100
|
+
"bottom",
|
|
101
|
+
"top"
|
|
102
|
+
];
|
|
103
|
+
}
|
|
90
104
|
}
|
|
91
105
|
function rawPosition(placement, options) {
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
return {
|
|
101
|
-
x: placement === 'right'
|
|
102
|
-
? options.target.right + options.offset
|
|
103
|
-
: options.target.left - options.width - options.offset,
|
|
104
|
-
y: aligned(options.target.top, options.target.height, options.height, options.alignment),
|
|
105
|
-
};
|
|
106
|
+
if (placement === "top" || placement === "bottom") return {
|
|
107
|
+
x: aligned(options.target.left, options.target.width, options.width, options.alignment),
|
|
108
|
+
y: placement === "bottom" ? options.target.bottom + options.offset : options.target.top - options.height - options.offset
|
|
109
|
+
};
|
|
110
|
+
return {
|
|
111
|
+
x: placement === "right" ? options.target.right + options.offset : options.target.left - options.width - options.offset,
|
|
112
|
+
y: aligned(options.target.top, options.target.height, options.height, options.alignment)
|
|
113
|
+
};
|
|
106
114
|
}
|
|
107
115
|
function aligned(start, targetSize, overlaySize, alignment) {
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
return start + targetSize - overlaySize;
|
|
112
|
-
return start + targetSize / 2 - overlaySize / 2;
|
|
116
|
+
if (alignment === "start") return start;
|
|
117
|
+
if (alignment === "end") return start + targetSize - overlaySize;
|
|
118
|
+
return start + targetSize / 2 - overlaySize / 2;
|
|
113
119
|
}
|
|
114
120
|
function clamp(value, minimum, maximum) {
|
|
115
|
-
|
|
121
|
+
return Math.min(Math.max(value, minimum), maximum);
|
|
116
122
|
}
|
|
117
|
-
|
|
118
123
|
let nextAppendToZIndex = 1100;
|
|
119
|
-
const positionedTargets = new WeakMap();
|
|
120
|
-
const AERIS_OVERLAY_APPEND_TO = new InjectionToken(
|
|
124
|
+
const positionedTargets = /* @__PURE__ */ new WeakMap();
|
|
125
|
+
const AERIS_OVERLAY_APPEND_TO = new InjectionToken("AERIS_OVERLAY_APPEND_TO", { factory: () => void 0 });
|
|
121
126
|
function aerisInternalResolveAppendTo(appendTo, document) {
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
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
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
127
|
+
if (!appendTo || appendTo === "self") return "self";
|
|
128
|
+
if (appendTo === "body") return document.body;
|
|
129
|
+
if (isHtmlElement(appendTo)) return appendTo;
|
|
130
|
+
const nativeElement = elementRefNativeElement(appendTo);
|
|
131
|
+
return isHtmlElement(nativeElement) ? nativeElement : "self";
|
|
132
|
+
}
|
|
133
|
+
var ɵAerisAppendTo = class ɵAerisAppendTo {
|
|
134
|
+
document = inject(DOCUMENT);
|
|
135
|
+
destroyRef = inject(DestroyRef);
|
|
136
|
+
element = inject(ElementRef).nativeElement;
|
|
137
|
+
renderer = inject(Renderer2);
|
|
138
|
+
defaultAppendTo = inject(AERIS_OVERLAY_APPEND_TO);
|
|
139
|
+
frame = null;
|
|
140
|
+
originCaptured = false;
|
|
141
|
+
originParent = null;
|
|
142
|
+
originNextSibling = null;
|
|
143
|
+
restoringToOrigin = false;
|
|
144
|
+
unconstrainedPanelWidth = 0;
|
|
145
|
+
unconstrainedPanelHeight = 0;
|
|
146
|
+
aerisInternalAppendTo = input(...ngDevMode ? [void 0, { debugName: "aerisInternalAppendTo" }] : /* istanbul ignore next */ []);
|
|
147
|
+
aerisInternalAppendToDefault = input("self", ...ngDevMode ? [{ debugName: "aerisInternalAppendToDefault" }] : /* istanbul ignore next */ []);
|
|
148
|
+
aerisInternalAppendToAnchor = input(null, ...ngDevMode ? [{ debugName: "aerisInternalAppendToAnchor" }] : /* istanbul ignore next */ []);
|
|
149
|
+
aerisInternalAppendToOffset = input(7, ...ngDevMode ? [{ debugName: "aerisInternalAppendToOffset" }] : /* istanbul ignore next */ []);
|
|
150
|
+
aerisInternalAppendToMatchWidth = input(false, ...ngDevMode ? [{ debugName: "aerisInternalAppendToMatchWidth" }] : /* istanbul ignore next */ []);
|
|
151
|
+
aerisInternalAppendToPlacement = input("auto", ...ngDevMode ? [{ debugName: "aerisInternalAppendToPlacement" }] : /* istanbul ignore next */ []);
|
|
152
|
+
aerisInternalAppendToAlignment = input("auto", ...ngDevMode ? [{ debugName: "aerisInternalAppendToAlignment" }] : /* istanbul ignore next */ []);
|
|
153
|
+
aerisInternalAppendToCollisionPadding = input(8, ...ngDevMode ? [{ debugName: "aerisInternalAppendToCollisionPadding" }] : /* istanbul ignore next */ []);
|
|
154
|
+
aerisInternalAppendToPositionSelf = input(true, ...ngDevMode ? [{ debugName: "aerisInternalAppendToPositionSelf" }] : /* istanbul ignore next */ []);
|
|
155
|
+
aerisInternalAppendToOutside = output();
|
|
156
|
+
constructor() {
|
|
157
|
+
effect((onCleanup) => {
|
|
158
|
+
const target = aerisInternalResolveAppendTo(this.aerisInternalAppendTo() ?? this.defaultAppendTo ?? this.aerisInternalAppendToDefault(), this.document);
|
|
159
|
+
const anchor = this.aerisInternalAppendToAnchor();
|
|
160
|
+
const automaticallyPortaled = this.aerisInternalAppendTo() === void 0 && target === "self" && !!anchor && this.hasClippingAncestor(anchor);
|
|
161
|
+
const effectiveTarget = automaticallyPortaled ? this.document.body : target;
|
|
162
|
+
this.captureOrigin();
|
|
163
|
+
if (effectiveTarget === "self") this.restoreToOrigin();
|
|
164
|
+
if (effectiveTarget === "self" && (!anchor || !this.aerisInternalAppendToPositionSelf())) {
|
|
165
|
+
this.element.removeAttribute("data-aeris-append-to");
|
|
166
|
+
this.element.removeAttribute("data-aeris-auto-portaled");
|
|
167
|
+
return;
|
|
168
|
+
}
|
|
169
|
+
const positioningTarget = effectiveTarget === "self" ? this.element.parentElement : effectiveTarget;
|
|
170
|
+
if (!positioningTarget) return;
|
|
171
|
+
const inheritedStyles = this.preserveInheritedStyles();
|
|
172
|
+
const positioningStyles = this.preserveInlineStyles([
|
|
173
|
+
"position",
|
|
174
|
+
"inset",
|
|
175
|
+
"inset-block-start",
|
|
176
|
+
"inset-inline-start",
|
|
177
|
+
"right",
|
|
178
|
+
"bottom",
|
|
179
|
+
"left",
|
|
180
|
+
"top",
|
|
181
|
+
"min-width",
|
|
182
|
+
"max-width",
|
|
183
|
+
"max-height",
|
|
184
|
+
"overflow-x",
|
|
185
|
+
"overflow-y",
|
|
186
|
+
"overscroll-behavior",
|
|
187
|
+
"z-index"
|
|
188
|
+
]);
|
|
189
|
+
const targetPosition = this.ensurePositionedTarget(positioningTarget);
|
|
190
|
+
if (effectiveTarget !== "self") {
|
|
191
|
+
this.renderer.appendChild(effectiveTarget, this.element);
|
|
192
|
+
this.applyInheritedStyles(inheritedStyles);
|
|
193
|
+
this.renderer.setAttribute(this.element, "data-aeris-append-to", effectiveTarget === this.document.body ? "body" : "target");
|
|
194
|
+
if (automaticallyPortaled) this.renderer.setAttribute(this.element, "data-aeris-auto-portaled", "true");
|
|
195
|
+
else this.element.removeAttribute("data-aeris-auto-portaled");
|
|
196
|
+
this.bringToFront();
|
|
197
|
+
} else {
|
|
198
|
+
this.element.removeAttribute("data-aeris-append-to");
|
|
199
|
+
this.element.removeAttribute("data-aeris-auto-portaled");
|
|
200
|
+
}
|
|
201
|
+
const reposition = () => this.schedulePosition(anchor, positioningTarget);
|
|
202
|
+
const pointerdown = (event) => {
|
|
203
|
+
const eventTarget = event.target;
|
|
204
|
+
if (!isDomNode(eventTarget)) return;
|
|
205
|
+
if (this.element.contains(eventTarget) || anchor?.contains(eventTarget)) return;
|
|
206
|
+
this.aerisInternalAppendToOutside.emit(event);
|
|
207
|
+
};
|
|
208
|
+
const view = this.document.defaultView;
|
|
209
|
+
const visualViewport = view?.visualViewport;
|
|
210
|
+
view?.addEventListener("resize", reposition);
|
|
211
|
+
visualViewport?.addEventListener("resize", reposition);
|
|
212
|
+
visualViewport?.addEventListener("scroll", reposition);
|
|
213
|
+
this.document.addEventListener("scroll", reposition, true);
|
|
214
|
+
this.document.addEventListener("pointerdown", pointerdown, true);
|
|
215
|
+
const resizeObserver = typeof ResizeObserver === "undefined" || !anchor ? null : new ResizeObserver(reposition);
|
|
216
|
+
if (anchor) resizeObserver?.observe(anchor);
|
|
217
|
+
resizeObserver?.observe(this.element);
|
|
218
|
+
if (anchor && view) this.positionConnectedOverlay(anchor, positioningTarget, view);
|
|
219
|
+
onCleanup(() => {
|
|
220
|
+
view?.removeEventListener("resize", reposition);
|
|
221
|
+
visualViewport?.removeEventListener("resize", reposition);
|
|
222
|
+
visualViewport?.removeEventListener("scroll", reposition);
|
|
223
|
+
this.document.removeEventListener("scroll", reposition, true);
|
|
224
|
+
this.document.removeEventListener("pointerdown", pointerdown, true);
|
|
225
|
+
resizeObserver?.disconnect();
|
|
226
|
+
this.cancelFrame();
|
|
227
|
+
this.restoreInlineStyles(positioningStyles);
|
|
228
|
+
this.element.removeAttribute("data-placement");
|
|
229
|
+
this.element.removeAttribute("data-positioned");
|
|
230
|
+
this.element.removeAttribute("data-viewport-constrained");
|
|
231
|
+
this.element.removeAttribute("data-viewport-constrained-width");
|
|
232
|
+
this.restoreInheritedStyles(inheritedStyles);
|
|
233
|
+
targetPosition.restore();
|
|
234
|
+
this.element.removeAttribute("data-aeris-append-to");
|
|
235
|
+
this.element.removeAttribute("data-aeris-auto-portaled");
|
|
236
|
+
if (effectiveTarget !== "self") this.element.remove();
|
|
237
|
+
});
|
|
238
|
+
});
|
|
239
|
+
this.destroyRef.onDestroy(() => {
|
|
240
|
+
this.element.remove();
|
|
241
|
+
queueMicrotask(() => this.element.remove());
|
|
242
|
+
});
|
|
243
|
+
}
|
|
244
|
+
restore() {
|
|
245
|
+
this.restoreToOrigin();
|
|
246
|
+
}
|
|
247
|
+
schedulePosition(anchor, target) {
|
|
248
|
+
if (!anchor || this.frame !== null) return;
|
|
249
|
+
const view = this.document.defaultView;
|
|
250
|
+
if (!view) return;
|
|
251
|
+
this.frame = view.requestAnimationFrame(() => {
|
|
252
|
+
this.frame = null;
|
|
253
|
+
this.positionConnectedOverlay(anchor, target, view);
|
|
254
|
+
});
|
|
255
|
+
}
|
|
256
|
+
positionConnectedOverlay(anchor, target, view) {
|
|
257
|
+
if (!anchor.isConnected || !this.element.isConnected) return;
|
|
258
|
+
const anchorRect = anchor.getBoundingClientRect();
|
|
259
|
+
this.element.style.position = target === this.document.body ? "fixed" : "absolute";
|
|
260
|
+
this.element.style.inset = "auto";
|
|
261
|
+
this.element.style.insetBlockStart = "auto";
|
|
262
|
+
this.element.style.insetInlineStart = "auto";
|
|
263
|
+
this.element.style.right = "auto";
|
|
264
|
+
this.element.style.bottom = "auto";
|
|
265
|
+
const viewport = view.visualViewport;
|
|
266
|
+
const viewportLeft = viewport?.offsetLeft ?? 0;
|
|
267
|
+
const viewportTop = viewport?.offsetTop ?? 0;
|
|
268
|
+
const collisionPadding = this.collisionPadding(view);
|
|
269
|
+
const availableWidth = Math.max(0, (viewport?.width ?? view.innerWidth) - (collisionPadding.left ?? 0) - (collisionPadding.right ?? 0));
|
|
270
|
+
if (this.aerisInternalAppendToMatchWidth()) this.element.style.minWidth = `${Math.min(anchorRect.width, availableWidth)}px`;
|
|
271
|
+
const availableHeight = Math.max(0, (viewport?.height ?? view.innerHeight) - (collisionPadding.top ?? 0) - (collisionPadding.bottom ?? 0));
|
|
272
|
+
let panelRect = this.element.getBoundingClientRect();
|
|
273
|
+
const wasWidthConstrained = this.element.hasAttribute("data-viewport-constrained-width");
|
|
274
|
+
const naturalWidth = wasWidthConstrained ? Math.max(this.unconstrainedPanelWidth, this.element.scrollWidth) : panelRect.width;
|
|
275
|
+
this.unconstrainedPanelWidth = naturalWidth;
|
|
276
|
+
if (naturalWidth > availableWidth && availableWidth > 0) {
|
|
277
|
+
this.element.style.maxWidth = `${availableWidth}px`;
|
|
278
|
+
this.element.style.overflowX = "auto";
|
|
279
|
+
this.element.style.overscrollBehavior = "contain";
|
|
280
|
+
this.element.setAttribute("data-viewport-constrained-width", "true");
|
|
281
|
+
panelRect = this.element.getBoundingClientRect();
|
|
282
|
+
} else if (wasWidthConstrained) {
|
|
283
|
+
this.element.style.removeProperty("max-width");
|
|
284
|
+
this.element.style.removeProperty("overflow-x");
|
|
285
|
+
this.element.removeAttribute("data-viewport-constrained-width");
|
|
286
|
+
panelRect = this.element.getBoundingClientRect();
|
|
287
|
+
}
|
|
288
|
+
const wasHeightConstrained = this.element.hasAttribute("data-viewport-constrained");
|
|
289
|
+
const naturalHeight = wasHeightConstrained ? Math.max(this.unconstrainedPanelHeight, this.element.scrollHeight) : panelRect.height;
|
|
290
|
+
this.unconstrainedPanelHeight = naturalHeight;
|
|
291
|
+
const direction = view.getComputedStyle(anchor).direction;
|
|
292
|
+
const configuredAlignment = this.aerisInternalAppendToAlignment();
|
|
293
|
+
const alignment = configuredAlignment === "auto" ? direction === "rtl" ? "end" : "start" : configuredAlignment;
|
|
294
|
+
const position = (height = panelRect.height || this.element.offsetHeight) => aerisInternalPositionAnchoredOverlay({
|
|
295
|
+
target: anchorRect,
|
|
296
|
+
width: panelRect.width || this.element.offsetWidth || anchorRect.width,
|
|
297
|
+
height,
|
|
298
|
+
placement: this.aerisInternalAppendToPlacement(),
|
|
299
|
+
alignment,
|
|
300
|
+
offset: this.aerisInternalAppendToOffset(),
|
|
301
|
+
margin: 8,
|
|
302
|
+
viewportWidth: viewport?.width ?? view.innerWidth,
|
|
303
|
+
viewportHeight: viewport?.height ?? view.innerHeight,
|
|
304
|
+
viewportLeft,
|
|
305
|
+
viewportTop,
|
|
306
|
+
collisionPadding,
|
|
307
|
+
tetherToAnchor: true
|
|
308
|
+
});
|
|
309
|
+
let point = position(naturalHeight);
|
|
310
|
+
const viewportBounds = {
|
|
311
|
+
top: viewportTop + (collisionPadding.top ?? 0),
|
|
312
|
+
bottom: viewportTop + (viewport?.height ?? view.innerHeight) - (collisionPadding.bottom ?? 0)
|
|
313
|
+
};
|
|
314
|
+
const anchorIntersectsViewport = anchorRect.bottom > viewportBounds.top && anchorRect.top < viewportBounds.bottom;
|
|
315
|
+
const placementHeight = anchorIntersectsViewport && point.placement === "bottom" ? viewportBounds.bottom - anchorRect.bottom - this.aerisInternalAppendToOffset() : anchorIntersectsViewport && point.placement === "top" ? anchorRect.top - viewportBounds.top - this.aerisInternalAppendToOffset() : availableHeight;
|
|
316
|
+
const constrainedHeight = Math.max(0, Math.min(availableHeight, placementHeight));
|
|
317
|
+
if (naturalHeight > constrainedHeight && constrainedHeight > 0) {
|
|
318
|
+
this.element.style.maxHeight = `${Math.floor(constrainedHeight)}px`;
|
|
319
|
+
this.element.style.overflowY = "auto";
|
|
320
|
+
this.element.style.overscrollBehavior = "contain";
|
|
321
|
+
this.element.setAttribute("data-viewport-constrained", "true");
|
|
322
|
+
panelRect = this.element.getBoundingClientRect();
|
|
323
|
+
} else if (wasHeightConstrained) {
|
|
324
|
+
this.element.style.removeProperty("max-height");
|
|
325
|
+
this.element.style.removeProperty("overflow-y");
|
|
326
|
+
this.element.removeAttribute("data-viewport-constrained");
|
|
327
|
+
panelRect = this.element.getBoundingClientRect();
|
|
328
|
+
}
|
|
329
|
+
point = position();
|
|
330
|
+
if (!this.element.hasAttribute("data-viewport-constrained") && !this.element.hasAttribute("data-viewport-constrained-width")) this.element.style.removeProperty("overscroll-behavior");
|
|
331
|
+
if (target === this.document.body) {
|
|
332
|
+
this.element.style.left = `${point.x}px`;
|
|
333
|
+
this.element.style.top = `${point.y}px`;
|
|
334
|
+
} else {
|
|
335
|
+
const targetRect = target.getBoundingClientRect();
|
|
336
|
+
this.element.style.left = `${point.x - targetRect.left - target.clientLeft + target.scrollLeft}px`;
|
|
337
|
+
this.element.style.top = `${point.y - targetRect.top - target.clientTop + target.scrollTop}px`;
|
|
338
|
+
}
|
|
339
|
+
this.element.setAttribute("data-placement", point.placement);
|
|
340
|
+
this.element.setAttribute("data-positioned", "true");
|
|
341
|
+
}
|
|
342
|
+
collisionPadding(view) {
|
|
343
|
+
const configured = this.aerisInternalAppendToCollisionPadding();
|
|
344
|
+
const padding = typeof configured === "number" ? {
|
|
345
|
+
top: configured,
|
|
346
|
+
right: configured,
|
|
347
|
+
bottom: configured,
|
|
348
|
+
left: configured
|
|
349
|
+
} : configured;
|
|
350
|
+
const rootStyles = view.getComputedStyle(this.document.documentElement);
|
|
351
|
+
const value = (side) => {
|
|
352
|
+
const safeArea = Number.parseFloat(rootStyles.getPropertyValue(`--aeris-safe-area-${side}`)) || 0;
|
|
353
|
+
return Math.max(0, padding[side] ?? 0) + safeArea;
|
|
354
|
+
};
|
|
355
|
+
return {
|
|
356
|
+
top: value("top"),
|
|
357
|
+
right: value("right"),
|
|
358
|
+
bottom: value("bottom"),
|
|
359
|
+
left: value("left")
|
|
360
|
+
};
|
|
361
|
+
}
|
|
362
|
+
preserveInheritedStyles() {
|
|
363
|
+
const view = this.document.defaultView;
|
|
364
|
+
if (!view) return /* @__PURE__ */ new Map();
|
|
365
|
+
const computed = view.getComputedStyle(this.element);
|
|
366
|
+
const preserved = /* @__PURE__ */ new Map();
|
|
367
|
+
const properties = [
|
|
368
|
+
"color",
|
|
369
|
+
"direction",
|
|
370
|
+
"font"
|
|
371
|
+
];
|
|
372
|
+
for (let index = 0; index < computed.length; index += 1) {
|
|
373
|
+
const property = computed.item(index);
|
|
374
|
+
if (property.startsWith("--aeris-") || property.startsWith("--_aeris-")) properties.push(property);
|
|
375
|
+
}
|
|
376
|
+
for (const property of properties) {
|
|
377
|
+
const value = computed.getPropertyValue(property);
|
|
378
|
+
if (!value) continue;
|
|
379
|
+
preserved.set(property, {
|
|
380
|
+
source: value,
|
|
381
|
+
previous: this.element.style.getPropertyValue(property)
|
|
382
|
+
});
|
|
383
|
+
}
|
|
384
|
+
return preserved;
|
|
385
|
+
}
|
|
386
|
+
applyInheritedStyles(preserved) {
|
|
387
|
+
const computed = this.document.defaultView?.getComputedStyle(this.element);
|
|
388
|
+
if (!computed) return;
|
|
389
|
+
for (const [property, value] of preserved) if (computed.getPropertyValue(property) !== value.source) this.element.style.setProperty(property, value.source);
|
|
390
|
+
}
|
|
391
|
+
restoreInheritedStyles(preserved) {
|
|
392
|
+
for (const [property, value] of preserved) if (value.previous) this.element.style.setProperty(property, value.previous);
|
|
393
|
+
else this.element.style.removeProperty(property);
|
|
394
|
+
}
|
|
395
|
+
preserveInlineStyles(properties) {
|
|
396
|
+
return new Map(properties.map((property) => [property, this.element.style.getPropertyValue(property)]));
|
|
397
|
+
}
|
|
398
|
+
restoreInlineStyles(previous) {
|
|
399
|
+
for (const [property, value] of previous) if (value) this.element.style.setProperty(property, value);
|
|
400
|
+
else this.element.style.removeProperty(property);
|
|
401
|
+
}
|
|
402
|
+
bringToFront() {
|
|
403
|
+
const computedZIndex = Number.parseInt(this.document.defaultView?.getComputedStyle(this.element).zIndex ?? "", 10);
|
|
404
|
+
const zIndex = Math.max(Number.isFinite(computedZIndex) ? computedZIndex : 0, nextAppendToZIndex);
|
|
405
|
+
nextAppendToZIndex = zIndex + 1;
|
|
406
|
+
this.element.style.zIndex = String(zIndex);
|
|
407
|
+
}
|
|
408
|
+
ensurePositionedTarget(target) {
|
|
409
|
+
if (target === this.document.body || !this.document.defaultView) return { restore: () => void 0 };
|
|
410
|
+
const existing = positionedTargets.get(target);
|
|
411
|
+
if (existing) {
|
|
412
|
+
existing.count += 1;
|
|
413
|
+
return { restore: () => this.releasePositionedTarget(target) };
|
|
414
|
+
}
|
|
415
|
+
if (this.document.defaultView.getComputedStyle(target).position !== "static") return { restore: () => void 0 };
|
|
416
|
+
const previous = target.style.position;
|
|
417
|
+
target.style.position = "relative";
|
|
418
|
+
positionedTargets.set(target, {
|
|
419
|
+
count: 1,
|
|
420
|
+
previous
|
|
421
|
+
});
|
|
422
|
+
return { restore: () => this.releasePositionedTarget(target) };
|
|
423
|
+
}
|
|
424
|
+
releasePositionedTarget(target) {
|
|
425
|
+
const entry = positionedTargets.get(target);
|
|
426
|
+
if (!entry) return;
|
|
427
|
+
entry.count -= 1;
|
|
428
|
+
if (entry.count > 0) return;
|
|
429
|
+
target.style.position = entry.previous;
|
|
430
|
+
positionedTargets.delete(target);
|
|
431
|
+
}
|
|
432
|
+
hasClippingAncestor(anchor) {
|
|
433
|
+
const view = this.document.defaultView;
|
|
434
|
+
if (!view) return false;
|
|
435
|
+
let ancestor = anchor.parentElement;
|
|
436
|
+
while (ancestor && ancestor !== this.document.body && ancestor !== this.document.documentElement) {
|
|
437
|
+
const style = view.getComputedStyle(ancestor);
|
|
438
|
+
if (isClippingOverflow(style.overflow) || isClippingOverflow(style.overflowX) || isClippingOverflow(style.overflowY) || hasPaintContainment(style.contain) || style.clipPath && style.clipPath !== "none") return true;
|
|
439
|
+
ancestor = ancestor.parentElement;
|
|
440
|
+
}
|
|
441
|
+
return false;
|
|
442
|
+
}
|
|
443
|
+
cancelFrame() {
|
|
444
|
+
if (this.frame === null) return;
|
|
445
|
+
this.document.defaultView?.cancelAnimationFrame(this.frame);
|
|
446
|
+
this.frame = null;
|
|
447
|
+
}
|
|
448
|
+
captureOrigin() {
|
|
449
|
+
if (this.originCaptured) return;
|
|
450
|
+
this.originCaptured = true;
|
|
451
|
+
this.originParent = this.element.parentNode;
|
|
452
|
+
this.originNextSibling = this.element.nextSibling;
|
|
453
|
+
}
|
|
454
|
+
restoreToOrigin() {
|
|
455
|
+
if (this.restoringToOrigin || !this.originParent || this.element.parentNode === this.originParent) return;
|
|
456
|
+
this.restoringToOrigin = true;
|
|
457
|
+
try {
|
|
458
|
+
this.renderer.insertBefore(this.originParent, this.element, this.originNextSibling?.parentNode === this.originParent ? this.originNextSibling : null);
|
|
459
|
+
} finally {
|
|
460
|
+
this.restoringToOrigin = false;
|
|
461
|
+
}
|
|
462
|
+
}
|
|
463
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
464
|
+
minVersion: "12.0.0",
|
|
465
|
+
version: "22.2.1",
|
|
466
|
+
ngImport: i0,
|
|
467
|
+
type: ɵAerisAppendTo,
|
|
468
|
+
deps: [],
|
|
469
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
470
|
+
});
|
|
471
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
472
|
+
minVersion: "17.1.0",
|
|
473
|
+
version: "22.2.1",
|
|
474
|
+
type: ɵAerisAppendTo,
|
|
475
|
+
isStandalone: true,
|
|
476
|
+
selector: "[aerisInternalAppendTo]",
|
|
477
|
+
inputs: {
|
|
478
|
+
aerisInternalAppendTo: {
|
|
479
|
+
classPropertyName: "aerisInternalAppendTo",
|
|
480
|
+
publicName: "aerisInternalAppendTo",
|
|
481
|
+
isSignal: true,
|
|
482
|
+
isRequired: false,
|
|
483
|
+
transformFunction: null
|
|
484
|
+
},
|
|
485
|
+
aerisInternalAppendToDefault: {
|
|
486
|
+
classPropertyName: "aerisInternalAppendToDefault",
|
|
487
|
+
publicName: "aerisInternalAppendToDefault",
|
|
488
|
+
isSignal: true,
|
|
489
|
+
isRequired: false,
|
|
490
|
+
transformFunction: null
|
|
491
|
+
},
|
|
492
|
+
aerisInternalAppendToAnchor: {
|
|
493
|
+
classPropertyName: "aerisInternalAppendToAnchor",
|
|
494
|
+
publicName: "aerisInternalAppendToAnchor",
|
|
495
|
+
isSignal: true,
|
|
496
|
+
isRequired: false,
|
|
497
|
+
transformFunction: null
|
|
498
|
+
},
|
|
499
|
+
aerisInternalAppendToOffset: {
|
|
500
|
+
classPropertyName: "aerisInternalAppendToOffset",
|
|
501
|
+
publicName: "aerisInternalAppendToOffset",
|
|
502
|
+
isSignal: true,
|
|
503
|
+
isRequired: false,
|
|
504
|
+
transformFunction: null
|
|
505
|
+
},
|
|
506
|
+
aerisInternalAppendToMatchWidth: {
|
|
507
|
+
classPropertyName: "aerisInternalAppendToMatchWidth",
|
|
508
|
+
publicName: "aerisInternalAppendToMatchWidth",
|
|
509
|
+
isSignal: true,
|
|
510
|
+
isRequired: false,
|
|
511
|
+
transformFunction: null
|
|
512
|
+
},
|
|
513
|
+
aerisInternalAppendToPlacement: {
|
|
514
|
+
classPropertyName: "aerisInternalAppendToPlacement",
|
|
515
|
+
publicName: "aerisInternalAppendToPlacement",
|
|
516
|
+
isSignal: true,
|
|
517
|
+
isRequired: false,
|
|
518
|
+
transformFunction: null
|
|
519
|
+
},
|
|
520
|
+
aerisInternalAppendToAlignment: {
|
|
521
|
+
classPropertyName: "aerisInternalAppendToAlignment",
|
|
522
|
+
publicName: "aerisInternalAppendToAlignment",
|
|
523
|
+
isSignal: true,
|
|
524
|
+
isRequired: false,
|
|
525
|
+
transformFunction: null
|
|
526
|
+
},
|
|
527
|
+
aerisInternalAppendToCollisionPadding: {
|
|
528
|
+
classPropertyName: "aerisInternalAppendToCollisionPadding",
|
|
529
|
+
publicName: "aerisInternalAppendToCollisionPadding",
|
|
530
|
+
isSignal: true,
|
|
531
|
+
isRequired: false,
|
|
532
|
+
transformFunction: null
|
|
533
|
+
},
|
|
534
|
+
aerisInternalAppendToPositionSelf: {
|
|
535
|
+
classPropertyName: "aerisInternalAppendToPositionSelf",
|
|
536
|
+
publicName: "aerisInternalAppendToPositionSelf",
|
|
537
|
+
isSignal: true,
|
|
538
|
+
isRequired: false,
|
|
539
|
+
transformFunction: null
|
|
540
|
+
}
|
|
541
|
+
},
|
|
542
|
+
outputs: { aerisInternalAppendToOutside: "aerisInternalAppendToOutside" },
|
|
543
|
+
ngImport: i0
|
|
544
|
+
});
|
|
545
|
+
};
|
|
546
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
547
|
+
minVersion: "12.0.0",
|
|
548
|
+
version: "22.2.1",
|
|
549
|
+
ngImport: i0,
|
|
550
|
+
type: ɵAerisAppendTo,
|
|
551
|
+
decorators: [{
|
|
552
|
+
type: Directive,
|
|
553
|
+
args: [{ selector: "[aerisInternalAppendTo]" }]
|
|
554
|
+
}],
|
|
555
|
+
ctorParameters: () => [],
|
|
556
|
+
propDecorators: {
|
|
557
|
+
aerisInternalAppendTo: [{
|
|
558
|
+
type: i0.Input,
|
|
559
|
+
args: [{
|
|
560
|
+
isSignal: true,
|
|
561
|
+
alias: "aerisInternalAppendTo",
|
|
562
|
+
required: false
|
|
563
|
+
}]
|
|
564
|
+
}],
|
|
565
|
+
aerisInternalAppendToDefault: [{
|
|
566
|
+
type: i0.Input,
|
|
567
|
+
args: [{
|
|
568
|
+
isSignal: true,
|
|
569
|
+
alias: "aerisInternalAppendToDefault",
|
|
570
|
+
required: false
|
|
571
|
+
}]
|
|
572
|
+
}],
|
|
573
|
+
aerisInternalAppendToAnchor: [{
|
|
574
|
+
type: i0.Input,
|
|
575
|
+
args: [{
|
|
576
|
+
isSignal: true,
|
|
577
|
+
alias: "aerisInternalAppendToAnchor",
|
|
578
|
+
required: false
|
|
579
|
+
}]
|
|
580
|
+
}],
|
|
581
|
+
aerisInternalAppendToOffset: [{
|
|
582
|
+
type: i0.Input,
|
|
583
|
+
args: [{
|
|
584
|
+
isSignal: true,
|
|
585
|
+
alias: "aerisInternalAppendToOffset",
|
|
586
|
+
required: false
|
|
587
|
+
}]
|
|
588
|
+
}],
|
|
589
|
+
aerisInternalAppendToMatchWidth: [{
|
|
590
|
+
type: i0.Input,
|
|
591
|
+
args: [{
|
|
592
|
+
isSignal: true,
|
|
593
|
+
alias: "aerisInternalAppendToMatchWidth",
|
|
594
|
+
required: false
|
|
595
|
+
}]
|
|
596
|
+
}],
|
|
597
|
+
aerisInternalAppendToPlacement: [{
|
|
598
|
+
type: i0.Input,
|
|
599
|
+
args: [{
|
|
600
|
+
isSignal: true,
|
|
601
|
+
alias: "aerisInternalAppendToPlacement",
|
|
602
|
+
required: false
|
|
603
|
+
}]
|
|
604
|
+
}],
|
|
605
|
+
aerisInternalAppendToAlignment: [{
|
|
606
|
+
type: i0.Input,
|
|
607
|
+
args: [{
|
|
608
|
+
isSignal: true,
|
|
609
|
+
alias: "aerisInternalAppendToAlignment",
|
|
610
|
+
required: false
|
|
611
|
+
}]
|
|
612
|
+
}],
|
|
613
|
+
aerisInternalAppendToCollisionPadding: [{
|
|
614
|
+
type: i0.Input,
|
|
615
|
+
args: [{
|
|
616
|
+
isSignal: true,
|
|
617
|
+
alias: "aerisInternalAppendToCollisionPadding",
|
|
618
|
+
required: false
|
|
619
|
+
}]
|
|
620
|
+
}],
|
|
621
|
+
aerisInternalAppendToPositionSelf: [{
|
|
622
|
+
type: i0.Input,
|
|
623
|
+
args: [{
|
|
624
|
+
isSignal: true,
|
|
625
|
+
alias: "aerisInternalAppendToPositionSelf",
|
|
626
|
+
required: false
|
|
627
|
+
}]
|
|
628
|
+
}],
|
|
629
|
+
aerisInternalAppendToOutside: [{
|
|
630
|
+
type: i0.Output,
|
|
631
|
+
args: ["aerisInternalAppendToOutside"]
|
|
632
|
+
}]
|
|
633
|
+
}
|
|
634
|
+
});
|
|
548
635
|
function elementRefNativeElement(value) {
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
return node.parentElement;
|
|
557
|
-
}
|
|
558
|
-
}
|
|
559
|
-
return null;
|
|
636
|
+
if ("nativeElement" in value) return value.nativeElement;
|
|
637
|
+
if ("elementRef" in value) {
|
|
638
|
+
const node = value.elementRef.nativeElement;
|
|
639
|
+
if (isHtmlElement(node)) return node;
|
|
640
|
+
if (typeof node === "object" && node !== null && "parentElement" in node) return node.parentElement;
|
|
641
|
+
}
|
|
642
|
+
return null;
|
|
560
643
|
}
|
|
561
644
|
function isHtmlElement(value) {
|
|
562
|
-
|
|
645
|
+
return typeof value === "object" && value !== null && "nodeType" in value && value.nodeType === 1;
|
|
563
646
|
}
|
|
564
647
|
function isDomNode(value) {
|
|
565
|
-
|
|
648
|
+
return typeof value === "object" && value !== null && "nodeType" in value;
|
|
566
649
|
}
|
|
567
650
|
function isClippingOverflow(value) {
|
|
568
|
-
|
|
651
|
+
return /^(auto|clip|hidden|overlay|scroll)$/.test(value.trim());
|
|
569
652
|
}
|
|
570
653
|
function hasPaintContainment(value) {
|
|
571
|
-
|
|
572
|
-
.trim()
|
|
573
|
-
.split(/\s+/)
|
|
574
|
-
.some((token) => token === 'paint' || token === 'content' || token === 'strict');
|
|
654
|
+
return value.trim().split(/\s+/).some((token) => token === "paint" || token === "content" || token === "strict");
|
|
575
655
|
}
|
|
576
|
-
|
|
577
656
|
function filterSelectOptions(options, query, fields, matchMode, locale) {
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
return matchesSelectFilter(candidate, normalizedQuery, matchMode);
|
|
584
|
-
}));
|
|
657
|
+
const normalizedQuery = query.trim().toLocaleLowerCase(locale);
|
|
658
|
+
if (!normalizedQuery) return options;
|
|
659
|
+
return options.filter((option) => fields.some((field) => {
|
|
660
|
+
return matchesSelectFilter(option[field]?.toLocaleLowerCase(locale) ?? "", normalizedQuery, matchMode);
|
|
661
|
+
}));
|
|
585
662
|
}
|
|
586
663
|
function groupSelectOptions(options) {
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
options: groupedOptions,
|
|
599
|
-
}));
|
|
664
|
+
const groups = /* @__PURE__ */ new Map();
|
|
665
|
+
for (const option of options) {
|
|
666
|
+
const label = option.group?.trim() || null;
|
|
667
|
+
const group = groups.get(label);
|
|
668
|
+
if (group) group.push(option);
|
|
669
|
+
else groups.set(label, [option]);
|
|
670
|
+
}
|
|
671
|
+
return Array.from(groups, ([label, groupedOptions]) => ({
|
|
672
|
+
label,
|
|
673
|
+
options: groupedOptions
|
|
674
|
+
}));
|
|
600
675
|
}
|
|
601
676
|
function selectVirtualRange(optionCount, start, panelMaxHeight, itemSize, buffer) {
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
677
|
+
const safeItemSize = Math.max(1, itemSize);
|
|
678
|
+
const safeBuffer = Math.max(0, buffer);
|
|
679
|
+
const safeStart = Math.max(0, Math.min(start, optionCount));
|
|
680
|
+
const visibleCount = Math.ceil(selectPanelPixels(panelMaxHeight) / safeItemSize) + safeBuffer * 2;
|
|
681
|
+
const end = Math.min(optionCount, safeStart + visibleCount);
|
|
682
|
+
return {
|
|
683
|
+
start: safeStart,
|
|
684
|
+
end,
|
|
685
|
+
topPadding: safeStart * safeItemSize,
|
|
686
|
+
bottomPadding: Math.max(0, (optionCount - end) * safeItemSize)
|
|
687
|
+
};
|
|
613
688
|
}
|
|
614
689
|
function nextEnabledSelectValue(options, currentValue, direction) {
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
} while (options[index]?.disabled);
|
|
623
|
-
return options[index]?.value ?? null;
|
|
690
|
+
if (!options.length || options.every((option) => option.disabled)) return null;
|
|
691
|
+
let index = options.findIndex((option) => option.value === currentValue);
|
|
692
|
+
if (index < 0) index = direction === 1 ? -1 : 0;
|
|
693
|
+
do
|
|
694
|
+
index = (index + direction + options.length) % options.length;
|
|
695
|
+
while (options[index]?.disabled);
|
|
696
|
+
return options[index]?.value ?? null;
|
|
624
697
|
}
|
|
625
698
|
function boundarySelectValue(options, boundary) {
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
return option.value;
|
|
633
|
-
}
|
|
634
|
-
return null;
|
|
699
|
+
if (boundary === "start") return options.find((option) => !option.disabled)?.value ?? null;
|
|
700
|
+
for (let index = options.length - 1; index >= 0; index -= 1) {
|
|
701
|
+
const option = options[index];
|
|
702
|
+
if (option && !option.disabled) return option.value;
|
|
703
|
+
}
|
|
704
|
+
return null;
|
|
635
705
|
}
|
|
636
706
|
function matchesSelectFilter(candidate, query, matchMode) {
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
case 'contains':
|
|
645
|
-
return candidate.includes(query);
|
|
646
|
-
default:
|
|
647
|
-
return false;
|
|
648
|
-
}
|
|
707
|
+
switch (matchMode) {
|
|
708
|
+
case "startsWith": return candidate.startsWith(query);
|
|
709
|
+
case "endsWith": return candidate.endsWith(query);
|
|
710
|
+
case "equals": return candidate === query;
|
|
711
|
+
case "contains": return candidate.includes(query);
|
|
712
|
+
default: return false;
|
|
713
|
+
}
|
|
649
714
|
}
|
|
650
715
|
function selectPanelPixels(value) {
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
return normalized.endsWith('rem') ? amount * 16 : amount;
|
|
716
|
+
const normalized = value.trim();
|
|
717
|
+
const amount = Number.parseFloat(normalized);
|
|
718
|
+
if (!Number.isFinite(amount)) return 288;
|
|
719
|
+
return normalized.endsWith("rem") ? amount * 16 : amount;
|
|
656
720
|
}
|
|
657
|
-
|
|
658
|
-
const
|
|
659
|
-
const overlayStacks = new WeakMap();
|
|
721
|
+
const scrollLockStates = /* @__PURE__ */ new WeakMap();
|
|
722
|
+
const overlayStacks = /* @__PURE__ */ new WeakMap();
|
|
660
723
|
function ɵregisterAerisOverlay(document, token) {
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
overlayStacks.set(document, stack);
|
|
724
|
+
const stack = overlayStacks.get(document) ?? [];
|
|
725
|
+
const existingIndex = stack.indexOf(token);
|
|
726
|
+
if (existingIndex >= 0) stack.splice(existingIndex, 1);
|
|
727
|
+
stack.push(token);
|
|
728
|
+
overlayStacks.set(document, stack);
|
|
667
729
|
}
|
|
668
730
|
function ɵunregisterAerisOverlay(document, token) {
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
stack.splice(index, 1);
|
|
675
|
-
if (stack.length === 0)
|
|
676
|
-
overlayStacks.delete(document);
|
|
731
|
+
const stack = overlayStacks.get(document);
|
|
732
|
+
if (!stack) return;
|
|
733
|
+
const index = stack.indexOf(token);
|
|
734
|
+
if (index >= 0) stack.splice(index, 1);
|
|
735
|
+
if (stack.length === 0) overlayStacks.delete(document);
|
|
677
736
|
}
|
|
678
737
|
function ɵisTopmostAerisOverlay(document, token) {
|
|
679
|
-
|
|
680
|
-
return stack?.at(-1) === token;
|
|
738
|
+
return overlayStacks.get(document)?.at(-1) === token;
|
|
681
739
|
}
|
|
682
740
|
function ɵlockAerisDocumentScroll(document) {
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
741
|
+
const existing = scrollLockStates.get(document);
|
|
742
|
+
if (existing) {
|
|
743
|
+
existing.count += 1;
|
|
744
|
+
return;
|
|
745
|
+
}
|
|
746
|
+
const body = document.body;
|
|
747
|
+
const state = {
|
|
748
|
+
count: 1,
|
|
749
|
+
overflow: body.style.overflow,
|
|
750
|
+
paddingInlineEnd: body.style.getPropertyValue("padding-inline-end")
|
|
751
|
+
};
|
|
752
|
+
scrollLockStates.set(document, state);
|
|
753
|
+
const view = document.defaultView;
|
|
754
|
+
const root = document.documentElement;
|
|
755
|
+
if (view && root.clientWidth) {
|
|
756
|
+
const scrollbarWidth = view.innerWidth - root.clientWidth;
|
|
757
|
+
if (scrollbarWidth > 0) {
|
|
758
|
+
const currentPadding = Number.parseFloat(view.getComputedStyle(body).paddingInlineEnd) || 0;
|
|
759
|
+
body.style.setProperty("padding-inline-end", `${currentPadding + scrollbarWidth}px`);
|
|
760
|
+
}
|
|
761
|
+
}
|
|
762
|
+
body.style.overflow = "hidden";
|
|
705
763
|
}
|
|
706
764
|
function ɵunlockAerisDocumentScroll(document) {
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
body.style.setProperty('padding-inline-end', state.paddingInlineEnd);
|
|
717
|
-
}
|
|
718
|
-
else {
|
|
719
|
-
body.style.removeProperty('padding-inline-end');
|
|
720
|
-
}
|
|
721
|
-
scrollLockStates.delete(document);
|
|
765
|
+
const state = scrollLockStates.get(document);
|
|
766
|
+
if (!state) return;
|
|
767
|
+
state.count -= 1;
|
|
768
|
+
if (state.count > 0) return;
|
|
769
|
+
const body = document.body;
|
|
770
|
+
body.style.overflow = state.overflow;
|
|
771
|
+
if (state.paddingInlineEnd) body.style.setProperty("padding-inline-end", state.paddingInlineEnd);
|
|
772
|
+
else body.style.removeProperty("padding-inline-end");
|
|
773
|
+
scrollLockStates.delete(document);
|
|
722
774
|
}
|
|
723
|
-
|
|
724
775
|
const BASE_FOCUSABLE_SELECTORS = [
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
776
|
+
"a[href]",
|
|
777
|
+
"area[href]",
|
|
778
|
+
"button",
|
|
779
|
+
"input",
|
|
780
|
+
"select",
|
|
781
|
+
"textarea",
|
|
782
|
+
"iframe",
|
|
783
|
+
"object",
|
|
784
|
+
"embed",
|
|
785
|
+
"audio[controls]",
|
|
786
|
+
"video[controls]",
|
|
787
|
+
"summary",
|
|
788
|
+
"[tabindex]"
|
|
738
789
|
];
|
|
739
790
|
function aerisInternalIsFocusable(element, options = {}) {
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
if (!summary?.contains(element))
|
|
754
|
-
return false;
|
|
755
|
-
}
|
|
756
|
-
if (!options.checkComputedVisibility)
|
|
757
|
-
return true;
|
|
758
|
-
const view = element.ownerDocument.defaultView;
|
|
759
|
-
for (let current = element; current; current = current.parentElement) {
|
|
760
|
-
const style = view?.getComputedStyle(current);
|
|
761
|
-
if (style?.visibility === 'hidden' ||
|
|
762
|
-
style?.visibility === 'collapse' ||
|
|
763
|
-
style?.display === 'none') {
|
|
764
|
-
return false;
|
|
765
|
-
}
|
|
766
|
-
}
|
|
767
|
-
return true;
|
|
791
|
+
if (!element || element.tabIndex < 0 || element.matches(":disabled") || element.hidden || element.inert || element.closest("[hidden], [inert], [aria-hidden=\"true\"]")) return false;
|
|
792
|
+
if (element instanceof HTMLInputElement && element.type === "hidden") return false;
|
|
793
|
+
const closedDetails = element.closest("details:not([open])");
|
|
794
|
+
if (closedDetails) {
|
|
795
|
+
if (!Array.from(closedDetails.children).find((child) => child instanceof HTMLElement && child.tagName === "SUMMARY")?.contains(element)) return false;
|
|
796
|
+
}
|
|
797
|
+
if (!options.checkComputedVisibility) return true;
|
|
798
|
+
const view = element.ownerDocument.defaultView;
|
|
799
|
+
for (let current = element; current; current = current.parentElement) {
|
|
800
|
+
const style = view?.getComputedStyle(current);
|
|
801
|
+
if (style?.visibility === "hidden" || style?.visibility === "collapse" || style?.display === "none") return false;
|
|
802
|
+
}
|
|
803
|
+
return true;
|
|
768
804
|
}
|
|
769
805
|
function aerisInternalFocusableElements(root, options = {}) {
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
.filter((element) => aerisInternalIsFocusable(element, options))
|
|
775
|
-
.sort((left, right) => {
|
|
776
|
-
const leftOrder = left.tabIndex > 0 ? left.tabIndex : Number.MAX_SAFE_INTEGER;
|
|
777
|
-
const rightOrder = right.tabIndex > 0 ? right.tabIndex : Number.MAX_SAFE_INTEGER;
|
|
778
|
-
return leftOrder - rightOrder;
|
|
779
|
-
});
|
|
806
|
+
const selectors = options.includeContentEditable ? [...BASE_FOCUSABLE_SELECTORS, "[contenteditable]:not([contenteditable=\"false\"])"] : BASE_FOCUSABLE_SELECTORS;
|
|
807
|
+
return Array.from(root.querySelectorAll(selectors.join(","))).filter((element) => aerisInternalIsFocusable(element, options)).sort((left, right) => {
|
|
808
|
+
return (left.tabIndex > 0 ? left.tabIndex : Number.MAX_SAFE_INTEGER) - (right.tabIndex > 0 ? right.tabIndex : Number.MAX_SAFE_INTEGER);
|
|
809
|
+
});
|
|
780
810
|
}
|
|
781
811
|
function aerisInternalFocusInitialElement(root, selector, focusOptions, options = {}) {
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
catch {
|
|
788
|
-
// Invalid consumer selectors fall back to the first focusable element.
|
|
789
|
-
}
|
|
790
|
-
}
|
|
791
|
-
const target = aerisInternalIsFocusable(requested, options)
|
|
792
|
-
? requested
|
|
793
|
-
: (aerisInternalFocusableElements(root, options)[0] ?? root);
|
|
794
|
-
target.focus(focusOptions);
|
|
812
|
+
let requested = null;
|
|
813
|
+
if (selector) try {
|
|
814
|
+
requested = root.querySelector(selector);
|
|
815
|
+
} catch {}
|
|
816
|
+
(aerisInternalIsFocusable(requested, options) ? requested : aerisInternalFocusableElements(root, options)[0] ?? root).focus(focusOptions);
|
|
795
817
|
}
|
|
796
818
|
function aerisInternalTrapTabFocus(event, root, activeElement, options = {}) {
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
}
|
|
819
|
+
const focusable = aerisInternalFocusableElements(root, options);
|
|
820
|
+
if (focusable.length === 0) {
|
|
821
|
+
event.preventDefault();
|
|
822
|
+
root.focus();
|
|
823
|
+
return;
|
|
824
|
+
}
|
|
825
|
+
const first = focusable[0];
|
|
826
|
+
const last = focusable.at(-1);
|
|
827
|
+
if (event.shiftKey && activeElement === first) {
|
|
828
|
+
event.preventDefault();
|
|
829
|
+
last?.focus();
|
|
830
|
+
} else if (!event.shiftKey && activeElement === last) {
|
|
831
|
+
event.preventDefault();
|
|
832
|
+
first?.focus();
|
|
833
|
+
}
|
|
813
834
|
}
|
|
814
|
-
|
|
815
835
|
function aerisInternalColumnSeparatorValues(widths, minColumnWidth) {
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
836
|
+
const percentages = widths.map((width) => width?.trim().endsWith("%") ? Number.parseFloat(width) : NaN);
|
|
837
|
+
if (percentages.every(Number.isFinite)) {
|
|
838
|
+
let position = 0;
|
|
839
|
+
return percentages.slice(0, -1).map((width) => {
|
|
840
|
+
position += width;
|
|
841
|
+
return {
|
|
842
|
+
min: 0,
|
|
843
|
+
max: 100,
|
|
844
|
+
now: Math.min(100, Math.max(0, position))
|
|
845
|
+
};
|
|
846
|
+
});
|
|
847
|
+
}
|
|
848
|
+
const pixels = widths.map(aerisInternalColumnWidthPixels);
|
|
849
|
+
const total = pixels.reduce((sum, width) => sum + width, 0);
|
|
850
|
+
let position = 0;
|
|
851
|
+
return pixels.slice(0, -1).map((width, index) => {
|
|
852
|
+
position += width;
|
|
853
|
+
return {
|
|
854
|
+
min: minColumnWidth * (index + 1),
|
|
855
|
+
max: Math.max(minColumnWidth * (index + 1), total - minColumnWidth * (pixels.length - index - 1)),
|
|
856
|
+
now: position
|
|
857
|
+
};
|
|
858
|
+
});
|
|
835
859
|
}
|
|
836
860
|
function aerisInternalPixelWidth(width) {
|
|
837
|
-
|
|
861
|
+
return `${Math.round(width * 100) / 100}px`;
|
|
838
862
|
}
|
|
839
863
|
function aerisInternalColumnWidthPixels(width) {
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
return 160;
|
|
845
|
-
return width.trim().endsWith('rem') ? value * 16 : value;
|
|
864
|
+
if (!width) return 160;
|
|
865
|
+
const value = Number.parseFloat(width);
|
|
866
|
+
if (!Number.isFinite(value)) return 160;
|
|
867
|
+
return width.trim().endsWith("rem") ? value * 16 : value;
|
|
846
868
|
}
|
|
847
869
|
function aerisInternalClampColumnResizeDelta(delta, width, adjacentWidth, minimumWidth) {
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
870
|
+
const minimum = Math.max(0, minimumWidth);
|
|
871
|
+
const minimumDelta = Math.min(0, minimum - width);
|
|
872
|
+
const maximumDelta = Math.max(0, adjacentWidth - minimum);
|
|
873
|
+
return Math.min(maximumDelta, Math.max(minimumDelta, delta));
|
|
852
874
|
}
|
|
853
875
|
function aerisInternalSetColumnPairWidths(columns, field, adjacentField, width, adjacentWidth) {
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
876
|
+
const nextWidth = aerisInternalPixelWidth(width);
|
|
877
|
+
const nextAdjacentWidth = aerisInternalPixelWidth(adjacentWidth);
|
|
878
|
+
return columns.map((column) => {
|
|
879
|
+
if (column.field === field) return {
|
|
880
|
+
...column,
|
|
881
|
+
width: nextWidth
|
|
882
|
+
};
|
|
883
|
+
if (column.field === adjacentField) return {
|
|
884
|
+
...column,
|
|
885
|
+
width: nextAdjacentWidth
|
|
886
|
+
};
|
|
887
|
+
return column;
|
|
888
|
+
});
|
|
863
889
|
}
|
|
864
890
|
function aerisInternalMeasureColumnWidths(header) {
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
});
|
|
875
|
-
return widths;
|
|
891
|
+
const widths = /* @__PURE__ */ new Map();
|
|
892
|
+
const row = header?.closest("tr");
|
|
893
|
+
if (!row) return widths;
|
|
894
|
+
row.querySelectorAll("th[data-field]").forEach((cell) => {
|
|
895
|
+
const field = cell.dataset["field"];
|
|
896
|
+
const width = cell.getBoundingClientRect().width;
|
|
897
|
+
if (field && width > 0) widths.set(field, width);
|
|
898
|
+
});
|
|
899
|
+
return widths;
|
|
876
900
|
}
|
|
877
901
|
function aerisInternalApplyMeasuredColumnWidths(columns, widths) {
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
902
|
+
return columns.map((column) => {
|
|
903
|
+
const width = widths.get(column.field);
|
|
904
|
+
return width == null ? column : {
|
|
905
|
+
...column,
|
|
906
|
+
width: aerisInternalPixelWidth(width)
|
|
907
|
+
};
|
|
908
|
+
});
|
|
882
909
|
}
|
|
883
910
|
function aerisInternalColumnResizeDirection(element) {
|
|
884
|
-
|
|
911
|
+
return element.ownerDocument.defaultView?.getComputedStyle(element).direction === "rtl" ? -1 : 1;
|
|
885
912
|
}
|
|
886
913
|
function aerisInternalListenForColumnResize(document, move, end) {
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
914
|
+
document.addEventListener("pointermove", move);
|
|
915
|
+
document.addEventListener("pointerup", end);
|
|
916
|
+
document.addEventListener("pointercancel", end);
|
|
917
|
+
return () => {
|
|
918
|
+
document.removeEventListener("pointermove", move);
|
|
919
|
+
document.removeEventListener("pointerup", end);
|
|
920
|
+
document.removeEventListener("pointercancel", end);
|
|
921
|
+
};
|
|
895
922
|
}
|
|
896
|
-
|
|
897
923
|
function aerisInternalCreateFrameScheduler(callback) {
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
}
|
|
922
|
-
|
|
923
|
-
const AERIS_UI_VERSION = '22.0.0-alpha.7';
|
|
924
|
-
|
|
925
|
-
/**
|
|
926
|
-
* Generated bundle index. Do not edit.
|
|
927
|
-
*/
|
|
928
|
-
|
|
924
|
+
let frame = null;
|
|
925
|
+
const request = globalThis.requestAnimationFrame?.bind(globalThis);
|
|
926
|
+
const cancelFrame = globalThis.cancelAnimationFrame?.bind(globalThis);
|
|
927
|
+
return {
|
|
928
|
+
schedule: () => {
|
|
929
|
+
if (!request) {
|
|
930
|
+
callback();
|
|
931
|
+
return;
|
|
932
|
+
}
|
|
933
|
+
if (frame !== null) return;
|
|
934
|
+
frame = request(() => {
|
|
935
|
+
frame = null;
|
|
936
|
+
callback();
|
|
937
|
+
});
|
|
938
|
+
},
|
|
939
|
+
cancel: () => {
|
|
940
|
+
if (frame === null) return;
|
|
941
|
+
cancelFrame?.(frame);
|
|
942
|
+
frame = null;
|
|
943
|
+
}
|
|
944
|
+
};
|
|
945
|
+
}
|
|
946
|
+
const AERIS_UI_VERSION = "22.0.0-alpha.9";
|
|
929
947
|
export { AERIS_OVERLAY_APPEND_TO, AERIS_UI_VERSION, aerisInternalApplyMeasuredColumnWidths, aerisInternalClampColumnResizeDelta, aerisInternalClampOverlayPoint, aerisInternalColumnResizeDirection, aerisInternalColumnSeparatorValues, aerisInternalColumnWidthPixels, aerisInternalCreateFrameScheduler, aerisInternalFocusInitialElement, aerisInternalFocusableElements, aerisInternalIsFocusable, aerisInternalListenForColumnResize, aerisInternalMeasureColumnWidths, aerisInternalPixelWidth, aerisInternalPositionAnchoredOverlay, aerisInternalSetColumnPairWidths, aerisInternalTrapTabFocus, boundarySelectValue, filterSelectOptions, groupSelectOptions, nextEnabledSelectValue, selectVirtualRange, ɵAerisAppendTo, aerisInternalDisplayInvalid as ɵaerisDisplayInvalid, aerisInternalResolveAppendTo as ɵaerisResolveAppendTo, ɵisTopmostAerisOverlay, ɵlockAerisDocumentScroll, ɵregisterAerisOverlay, ɵunlockAerisDocumentScroll, ɵunregisterAerisOverlay };
|
|
930
|
-
|
|
948
|
+
|
|
949
|
+
//# sourceMappingURL=aeris-ui-core.mjs.map
|