@aeris-ui/core 22.0.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +189 -0
- package/fesm2022/aeris-ui-core-accordion.mjs +412 -0
- package/fesm2022/aeris-ui-core-accordion.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-animate-on-scroll.mjs +107 -0
- package/fesm2022/aeris-ui-core-animate-on-scroll.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-auto-complete.mjs +754 -0
- package/fesm2022/aeris-ui-core-auto-complete.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-auto-focus.mjs +63 -0
- package/fesm2022/aeris-ui-core-auto-focus.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-avatar.mjs +133 -0
- package/fesm2022/aeris-ui-core-avatar.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-badge.mjs +163 -0
- package/fesm2022/aeris-ui-core-badge.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-block-ui.mjs +139 -0
- package/fesm2022/aeris-ui-core-block-ui.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-breadcrumb.mjs +433 -0
- package/fesm2022/aeris-ui-core-breadcrumb.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-button-group.mjs +39 -0
- package/fesm2022/aeris-ui-core-button-group.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-button.mjs +246 -0
- package/fesm2022/aeris-ui-core-button.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-card.mjs +134 -0
- package/fesm2022/aeris-ui-core-card.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-carousel.mjs +542 -0
- package/fesm2022/aeris-ui-core-carousel.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-cascade-select.mjs +673 -0
- package/fesm2022/aeris-ui-core-cascade-select.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-chart.mjs +296 -0
- package/fesm2022/aeris-ui-core-chart.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-checkbox.mjs +220 -0
- package/fesm2022/aeris-ui-core-checkbox.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-chip.mjs +200 -0
- package/fesm2022/aeris-ui-core-chip.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-class-names.mjs +67 -0
- package/fesm2022/aeris-ui-core-class-names.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-color-picker.mjs +1192 -0
- package/fesm2022/aeris-ui-core-color-picker.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-compare.mjs +508 -0
- package/fesm2022/aeris-ui-core-compare.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-confirm-dialog.mjs +818 -0
- package/fesm2022/aeris-ui-core-confirm-dialog.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-confirm-popup.mjs +1010 -0
- package/fesm2022/aeris-ui-core-confirm-popup.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-context-menu.mjs +720 -0
- package/fesm2022/aeris-ui-core-context-menu.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-date-picker.mjs +1471 -0
- package/fesm2022/aeris-ui-core-date-picker.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-dialog.mjs +574 -0
- package/fesm2022/aeris-ui-core-dialog.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-divider.mjs +51 -0
- package/fesm2022/aeris-ui-core-divider.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-drawer.mjs +549 -0
- package/fesm2022/aeris-ui-core-drawer.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-dynamic-dialog.mjs +333 -0
- package/fesm2022/aeris-ui-core-dynamic-dialog.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-editor.mjs +1548 -0
- package/fesm2022/aeris-ui-core-editor.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-file-upload.mjs +965 -0
- package/fesm2022/aeris-ui-core-file-upload.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-filter-service.mjs +304 -0
- package/fesm2022/aeris-ui-core-filter-service.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-fluid.mjs +23 -0
- package/fesm2022/aeris-ui-core-fluid.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-focus-trap.mjs +185 -0
- package/fesm2022/aeris-ui-core-focus-trap.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-galleria.mjs +1657 -0
- package/fesm2022/aeris-ui-core-galleria.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-glass.mjs +35 -0
- package/fesm2022/aeris-ui-core-glass.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-icon-field.mjs +113 -0
- package/fesm2022/aeris-ui-core-icon-field.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-inplace.mjs +243 -0
- package/fesm2022/aeris-ui-core-inplace.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-input-group.mjs +110 -0
- package/fesm2022/aeris-ui-core-input-group.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-input-mask.mjs +343 -0
- package/fesm2022/aeris-ui-core-input-mask.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-input-number.mjs +497 -0
- package/fesm2022/aeris-ui-core-input-number.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-input-otp.mjs +361 -0
- package/fesm2022/aeris-ui-core-input-otp.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-input-text.mjs +226 -0
- package/fesm2022/aeris-ui-core-input-text.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-key-filter.mjs +208 -0
- package/fesm2022/aeris-ui-core-key-filter.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-mega-menu.mjs +835 -0
- package/fesm2022/aeris-ui-core-mega-menu.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-menu.mjs +796 -0
- package/fesm2022/aeris-ui-core-menu.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-menubar.mjs +729 -0
- package/fesm2022/aeris-ui-core-menubar.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-message.mjs +225 -0
- package/fesm2022/aeris-ui-core-message.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-meter-group.mjs +377 -0
- package/fesm2022/aeris-ui-core-meter-group.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-multi-select.mjs +1033 -0
- package/fesm2022/aeris-ui-core-multi-select.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-order-list.mjs +351 -0
- package/fesm2022/aeris-ui-core-order-list.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-organization-chart.mjs +382 -0
- package/fesm2022/aeris-ui-core-organization-chart.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-paginator.mjs +254 -0
- package/fesm2022/aeris-ui-core-paginator.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-panel.mjs +352 -0
- package/fesm2022/aeris-ui-core-panel.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-password.mjs +479 -0
- package/fesm2022/aeris-ui-core-password.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-pick-list.mjs +939 -0
- package/fesm2022/aeris-ui-core-pick-list.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-popover.mjs +535 -0
- package/fesm2022/aeris-ui-core-popover.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-progress-bar.mjs +260 -0
- package/fesm2022/aeris-ui-core-progress-bar.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-progress-spinner.mjs +218 -0
- package/fesm2022/aeris-ui-core-progress-spinner.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-radio-button.mjs +194 -0
- package/fesm2022/aeris-ui-core-radio-button.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-rating.mjs +385 -0
- package/fesm2022/aeris-ui-core-rating.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-scroll-panel.mjs +211 -0
- package/fesm2022/aeris-ui-core-scroll-panel.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-scroll-top.mjs +94 -0
- package/fesm2022/aeris-ui-core-scroll-top.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-select.mjs +1134 -0
- package/fesm2022/aeris-ui-core-select.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-skeleton.mjs +47 -0
- package/fesm2022/aeris-ui-core-skeleton.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-slider.mjs +724 -0
- package/fesm2022/aeris-ui-core-slider.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-speed-dial.mjs +589 -0
- package/fesm2022/aeris-ui-core-speed-dial.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-split-button.mjs +532 -0
- package/fesm2022/aeris-ui-core-split-button.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-splitter.mjs +488 -0
- package/fesm2022/aeris-ui-core-splitter.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-stepper.mjs +437 -0
- package/fesm2022/aeris-ui-core-stepper.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-style-class.mjs +344 -0
- package/fesm2022/aeris-ui-core-style-class.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-table.mjs +1580 -0
- package/fesm2022/aeris-ui-core-table.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-tabs.mjs +438 -0
- package/fesm2022/aeris-ui-core-tabs.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-textarea.mjs +349 -0
- package/fesm2022/aeris-ui-core-textarea.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-theme-builder.mjs +1565 -0
- package/fesm2022/aeris-ui-core-theme-builder.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-theming.mjs +150 -0
- package/fesm2022/aeris-ui-core-theming.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-tiered-menu.mjs +718 -0
- package/fesm2022/aeris-ui-core-tiered-menu.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-timeline.mjs +278 -0
- package/fesm2022/aeris-ui-core-timeline.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-toast.mjs +422 -0
- package/fesm2022/aeris-ui-core-toast.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-toggle-switch.mjs +202 -0
- package/fesm2022/aeris-ui-core-toggle-switch.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-toolbar.mjs +136 -0
- package/fesm2022/aeris-ui-core-toolbar.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-tooltip.mjs +365 -0
- package/fesm2022/aeris-ui-core-tooltip.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-tree-select.mjs +995 -0
- package/fesm2022/aeris-ui-core-tree-select.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-tree-table.mjs +1600 -0
- package/fesm2022/aeris-ui-core-tree-table.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-tree.mjs +962 -0
- package/fesm2022/aeris-ui-core-tree.mjs.map +1 -0
- package/fesm2022/aeris-ui-core.mjs +360 -0
- package/fesm2022/aeris-ui-core.mjs.map +1 -0
- package/package.json +432 -0
- package/schematics/aeris-setup.schema.json +52 -0
- package/schematics/collection.json +10 -0
- package/schematics/ng-add/schema.json +64 -0
- package/schematics/runtime/package.json +3 -0
- package/schematics/runtime/schematics/ng-add/index.js +13 -0
- package/schematics/runtime/schematics/ng-add/index.js.map +1 -0
- package/schematics/runtime/schematics/ng-add/options.js +338 -0
- package/schematics/runtime/schematics/ng-add/options.js.map +1 -0
- package/schematics/runtime/schematics/ng-add/schema.js +3 -0
- package/schematics/runtime/schematics/ng-add/schema.js.map +1 -0
- package/schematics/runtime/schematics/ng-add/workspace.js +273 -0
- package/schematics/runtime/schematics/ng-add/workspace.js.map +1 -0
- package/schematics/runtime/theme-builder/aeris-color-derivation.js +12 -0
- package/schematics/runtime/theme-builder/aeris-color-derivation.js.map +1 -0
- package/schematics/runtime/theme-builder/aeris-color.js +263 -0
- package/schematics/runtime/theme-builder/aeris-color.js.map +1 -0
- package/schematics/runtime/theme-builder/aeris-contrast.js +245 -0
- package/schematics/runtime/theme-builder/aeris-contrast.js.map +1 -0
- package/schematics/runtime/theme-builder/aeris-foundation.js +47 -0
- package/schematics/runtime/theme-builder/aeris-foundation.js.map +1 -0
- package/schematics/runtime/theme-builder/aeris-semantic-tones.js +121 -0
- package/schematics/runtime/theme-builder/aeris-semantic-tones.js.map +1 -0
- package/schematics/runtime/theme-builder/aeris-theme-generator.js +238 -0
- package/schematics/runtime/theme-builder/aeris-theme-generator.js.map +1 -0
- package/schematics/runtime/theme-builder/aeris-theme-resolver.js +101 -0
- package/schematics/runtime/theme-builder/aeris-theme-resolver.js.map +1 -0
- package/schematics/runtime/theme-builder/aeris-theme-tokens.js +82 -0
- package/schematics/runtime/theme-builder/aeris-theme-tokens.js.map +1 -0
- package/schematics/runtime/theme-builder/aeris-theme-validation.js +183 -0
- package/schematics/runtime/theme-builder/aeris-theme-validation.js.map +1 -0
- package/schematics/runtime/theme-builder/aeris-theme.js +322 -0
- package/schematics/runtime/theme-builder/aeris-theme.js.map +1 -0
- package/schematics/runtime/theme-builder/public-api.js +17 -0
- package/schematics/runtime/theme-builder/public-api.js.map +1 -0
- package/styles/_index.scss +1 -0
- package/styles/_tokens.scss +13 -0
- package/styles/aeris.css +555 -0
- package/styles/controls.css +169 -0
- package/tools/aeris-theme.mjs +149 -0
- package/tools/aeris-theme.schema.json +143 -0
- package/types/aeris-ui-core-accordion.d.ts +101 -0
- package/types/aeris-ui-core-animate-on-scroll.d.ts +34 -0
- package/types/aeris-ui-core-auto-complete.d.ts +154 -0
- package/types/aeris-ui-core-auto-focus.d.ts +17 -0
- package/types/aeris-ui-core-avatar.d.ts +44 -0
- package/types/aeris-ui-core-badge.d.ts +48 -0
- package/types/aeris-ui-core-block-ui.d.ts +28 -0
- package/types/aeris-ui-core-breadcrumb.d.ts +104 -0
- package/types/aeris-ui-core-button-group.d.ts +17 -0
- package/types/aeris-ui-core-button.d.ts +71 -0
- package/types/aeris-ui-core-card.d.ts +43 -0
- package/types/aeris-ui-core-carousel.d.ts +126 -0
- package/types/aeris-ui-core-cascade-select.d.ts +130 -0
- package/types/aeris-ui-core-chart.d.ts +92 -0
- package/types/aeris-ui-core-checkbox.d.ts +55 -0
- package/types/aeris-ui-core-chip.d.ts +56 -0
- package/types/aeris-ui-core-class-names.d.ts +21 -0
- package/types/aeris-ui-core-color-picker.d.ts +149 -0
- package/types/aeris-ui-core-compare.d.ts +109 -0
- package/types/aeris-ui-core-confirm-dialog.d.ts +263 -0
- package/types/aeris-ui-core-confirm-popup.d.ts +281 -0
- package/types/aeris-ui-core-context-menu.d.ts +156 -0
- package/types/aeris-ui-core-date-picker.d.ts +226 -0
- package/types/aeris-ui-core-dialog.d.ts +124 -0
- package/types/aeris-ui-core-divider.d.ts +21 -0
- package/types/aeris-ui-core-drawer.d.ts +119 -0
- package/types/aeris-ui-core-dynamic-dialog.d.ts +148 -0
- package/types/aeris-ui-core-editor.d.ts +130 -0
- package/types/aeris-ui-core-file-upload.d.ts +199 -0
- package/types/aeris-ui-core-filter-service.d.ts +54 -0
- package/types/aeris-ui-core-fluid.d.ts +10 -0
- package/types/aeris-ui-core-focus-trap.d.ts +32 -0
- package/types/aeris-ui-core-galleria.d.ts +273 -0
- package/types/aeris-ui-core-glass.d.ts +17 -0
- package/types/aeris-ui-core-icon-field.d.ts +36 -0
- package/types/aeris-ui-core-inplace.d.ts +68 -0
- package/types/aeris-ui-core-input-group.d.ts +38 -0
- package/types/aeris-ui-core-input-mask.d.ts +73 -0
- package/types/aeris-ui-core-input-number.d.ts +87 -0
- package/types/aeris-ui-core-input-otp.d.ts +88 -0
- package/types/aeris-ui-core-input-text.d.ts +63 -0
- package/types/aeris-ui-core-key-filter.d.ts +41 -0
- package/types/aeris-ui-core-mega-menu.d.ts +130 -0
- package/types/aeris-ui-core-menu.d.ts +182 -0
- package/types/aeris-ui-core-menubar.d.ts +145 -0
- package/types/aeris-ui-core-message.d.ts +65 -0
- package/types/aeris-ui-core-meter-group.d.ts +100 -0
- package/types/aeris-ui-core-multi-select.d.ts +193 -0
- package/types/aeris-ui-core-order-list.d.ts +73 -0
- package/types/aeris-ui-core-organization-chart.d.ts +85 -0
- package/types/aeris-ui-core-paginator.d.ts +39 -0
- package/types/aeris-ui-core-panel.d.ts +85 -0
- package/types/aeris-ui-core-password.d.ts +110 -0
- package/types/aeris-ui-core-pick-list.d.ts +193 -0
- package/types/aeris-ui-core-popover.d.ts +112 -0
- package/types/aeris-ui-core-progress-bar.d.ts +81 -0
- package/types/aeris-ui-core-progress-spinner.d.ts +51 -0
- package/types/aeris-ui-core-radio-button.d.ts +51 -0
- package/types/aeris-ui-core-rating.d.ts +80 -0
- package/types/aeris-ui-core-scroll-panel.d.ts +66 -0
- package/types/aeris-ui-core-scroll-top.d.ts +29 -0
- package/types/aeris-ui-core-select.d.ts +223 -0
- package/types/aeris-ui-core-skeleton.d.ts +18 -0
- package/types/aeris-ui-core-slider.d.ts +117 -0
- package/types/aeris-ui-core-speed-dial.d.ts +119 -0
- package/types/aeris-ui-core-split-button.d.ts +122 -0
- package/types/aeris-ui-core-splitter.d.ts +113 -0
- package/types/aeris-ui-core-stepper.d.ts +99 -0
- package/types/aeris-ui-core-style-class.d.ts +73 -0
- package/types/aeris-ui-core-table.d.ts +333 -0
- package/types/aeris-ui-core-tabs.d.ts +82 -0
- package/types/aeris-ui-core-textarea.d.ts +80 -0
- package/types/aeris-ui-core-theme-builder.d.ts +499 -0
- package/types/aeris-ui-core-theming.d.ts +47 -0
- package/types/aeris-ui-core-tiered-menu.d.ts +152 -0
- package/types/aeris-ui-core-timeline.d.ts +80 -0
- package/types/aeris-ui-core-toast.d.ts +127 -0
- package/types/aeris-ui-core-toggle-switch.d.ts +52 -0
- package/types/aeris-ui-core-toolbar.d.ts +47 -0
- package/types/aeris-ui-core-tooltip.d.ts +92 -0
- package/types/aeris-ui-core-tree-select.d.ts +187 -0
- package/types/aeris-ui-core-tree-table.d.ts +311 -0
- package/types/aeris-ui-core-tree.d.ts +179 -0
- package/types/aeris-ui-core.d.ts +85 -0
|
@@ -0,0 +1,1010 @@
|
|
|
1
|
+
import { DOCUMENT, NgTemplateOutlet } from '@angular/common';
|
|
2
|
+
import * as i0 from '@angular/core';
|
|
3
|
+
import { inject, TemplateRef, Directive, ApplicationRef, EnvironmentInjector, signal, createComponent, Service, input, computed, viewChild, contentChild, model, booleanAttribute, output, effect, Component } from '@angular/core';
|
|
4
|
+
import { AerisButtonDirective } from '@aeris-ui/core/button';
|
|
5
|
+
import { aerisInternalCreateFrameScheduler, aerisInternalPositionAnchoredOverlay, aerisInternalFocusInitialElement, aerisInternalTrapTabFocus } from '@aeris-ui/core';
|
|
6
|
+
|
|
7
|
+
class AerisConfirmPopupEventStream {
|
|
8
|
+
listeners = new Set();
|
|
9
|
+
completed = false;
|
|
10
|
+
subscribe(next) {
|
|
11
|
+
if (this.completed)
|
|
12
|
+
return { unsubscribe: () => undefined };
|
|
13
|
+
this.listeners.add(next);
|
|
14
|
+
return {
|
|
15
|
+
unsubscribe: () => {
|
|
16
|
+
this.listeners.delete(next);
|
|
17
|
+
},
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
next(event) {
|
|
21
|
+
if (this.completed)
|
|
22
|
+
return;
|
|
23
|
+
for (const listener of [...this.listeners])
|
|
24
|
+
listener(event);
|
|
25
|
+
}
|
|
26
|
+
complete() {
|
|
27
|
+
this.completed = true;
|
|
28
|
+
this.listeners.clear();
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
class AerisConfirmPopupIconTemplate {
|
|
32
|
+
template = inject(TemplateRef);
|
|
33
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: AerisConfirmPopupIconTemplate, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
34
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.6", type: AerisConfirmPopupIconTemplate, isStandalone: true, selector: "ng-template[aerisConfirmPopupIcon]", ngImport: i0 });
|
|
35
|
+
}
|
|
36
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: AerisConfirmPopupIconTemplate, decorators: [{
|
|
37
|
+
type: Directive,
|
|
38
|
+
args: [{ selector: 'ng-template[aerisConfirmPopupIcon]' }]
|
|
39
|
+
}] });
|
|
40
|
+
class AerisConfirmPopupMessageTemplate {
|
|
41
|
+
template = inject(TemplateRef);
|
|
42
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: AerisConfirmPopupMessageTemplate, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
43
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.6", type: AerisConfirmPopupMessageTemplate, isStandalone: true, selector: "ng-template[aerisConfirmPopupMessage]", ngImport: i0 });
|
|
44
|
+
}
|
|
45
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: AerisConfirmPopupMessageTemplate, decorators: [{
|
|
46
|
+
type: Directive,
|
|
47
|
+
args: [{ selector: 'ng-template[aerisConfirmPopupMessage]' }]
|
|
48
|
+
}] });
|
|
49
|
+
class AerisConfirmPopupFooterTemplate {
|
|
50
|
+
template = inject(TemplateRef);
|
|
51
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: AerisConfirmPopupFooterTemplate, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
52
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.6", type: AerisConfirmPopupFooterTemplate, isStandalone: true, selector: "ng-template[aerisConfirmPopupFooter]", ngImport: i0 });
|
|
53
|
+
}
|
|
54
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: AerisConfirmPopupFooterTemplate, decorators: [{
|
|
55
|
+
type: Directive,
|
|
56
|
+
args: [{ selector: 'ng-template[aerisConfirmPopupFooter]' }]
|
|
57
|
+
}] });
|
|
58
|
+
class AerisConfirmPopupHeadlessTemplate {
|
|
59
|
+
template = inject(TemplateRef);
|
|
60
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: AerisConfirmPopupHeadlessTemplate, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
61
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.6", type: AerisConfirmPopupHeadlessTemplate, isStandalone: true, selector: "ng-template[aerisConfirmPopupHeadless]", ngImport: i0 });
|
|
62
|
+
}
|
|
63
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: AerisConfirmPopupHeadlessTemplate, decorators: [{
|
|
64
|
+
type: Directive,
|
|
65
|
+
args: [{ selector: 'ng-template[aerisConfirmPopupHeadless]' }]
|
|
66
|
+
}] });
|
|
67
|
+
class AerisConfirmPopupRef {
|
|
68
|
+
acceptedStream = new AerisConfirmPopupEventStream();
|
|
69
|
+
rejectedStream = new AerisConfirmPopupEventStream();
|
|
70
|
+
closedStream = new AerisConfirmPopupEventStream();
|
|
71
|
+
shownStream = new AerisConfirmPopupEventStream();
|
|
72
|
+
controller = null;
|
|
73
|
+
closedOnce = false;
|
|
74
|
+
accepted = this.acceptedStream;
|
|
75
|
+
rejected = this.rejectedStream;
|
|
76
|
+
closed = this.closedStream;
|
|
77
|
+
shown = this.shownStream;
|
|
78
|
+
accept(originalEvent = null) {
|
|
79
|
+
if (this.closedOnce)
|
|
80
|
+
return;
|
|
81
|
+
this.controller?.accept(originalEvent);
|
|
82
|
+
}
|
|
83
|
+
reject(originalEvent = null) {
|
|
84
|
+
if (this.closedOnce)
|
|
85
|
+
return;
|
|
86
|
+
this.controller?.reject(originalEvent);
|
|
87
|
+
}
|
|
88
|
+
close(originalEvent = null) {
|
|
89
|
+
if (this.closedOnce)
|
|
90
|
+
return;
|
|
91
|
+
this.controller?.close(originalEvent);
|
|
92
|
+
}
|
|
93
|
+
focus(options) {
|
|
94
|
+
this.controller?.focus(options);
|
|
95
|
+
}
|
|
96
|
+
reposition() {
|
|
97
|
+
this.controller?.reposition();
|
|
98
|
+
}
|
|
99
|
+
attach(controller) {
|
|
100
|
+
this.controller = controller;
|
|
101
|
+
}
|
|
102
|
+
notifyShown(event) {
|
|
103
|
+
if (this.closedOnce)
|
|
104
|
+
return;
|
|
105
|
+
this.shownStream.next(event);
|
|
106
|
+
}
|
|
107
|
+
notifyAccepted(event) {
|
|
108
|
+
if (this.closedOnce)
|
|
109
|
+
return;
|
|
110
|
+
this.acceptedStream.next(event);
|
|
111
|
+
}
|
|
112
|
+
notifyRejected(event) {
|
|
113
|
+
if (this.closedOnce)
|
|
114
|
+
return;
|
|
115
|
+
this.rejectedStream.next(event);
|
|
116
|
+
}
|
|
117
|
+
notifyClosed(event) {
|
|
118
|
+
if (this.closedOnce)
|
|
119
|
+
return;
|
|
120
|
+
this.closedOnce = true;
|
|
121
|
+
this.closedStream.next(event);
|
|
122
|
+
this.acceptedStream.complete();
|
|
123
|
+
this.rejectedStream.complete();
|
|
124
|
+
this.closedStream.complete();
|
|
125
|
+
this.shownStream.complete();
|
|
126
|
+
this.controller = null;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
class AerisConfirmPopupService {
|
|
130
|
+
appRef = inject(ApplicationRef);
|
|
131
|
+
document = inject(DOCUMENT);
|
|
132
|
+
environmentInjector = inject(EnvironmentInjector);
|
|
133
|
+
requestState = signal(null, /* @ts-ignore */
|
|
134
|
+
...(ngDevMode ? [{ debugName: "requestState" }] : /* istanbul ignore next */ []));
|
|
135
|
+
closeState = signal(0, /* @ts-ignore */
|
|
136
|
+
...(ngDevMode ? [{ debugName: "closeState" }] : /* istanbul ignore next */ []));
|
|
137
|
+
activeRefs = new Set();
|
|
138
|
+
dynamicHosts = new Map();
|
|
139
|
+
nextId = 0;
|
|
140
|
+
request = this.requestState.asReadonly();
|
|
141
|
+
closeSignal = this.closeState.asReadonly();
|
|
142
|
+
confirm(config) {
|
|
143
|
+
const ref = new AerisConfirmPopupRef();
|
|
144
|
+
const resolvedConfig = this.resolveConfig(config);
|
|
145
|
+
if (!resolvedConfig.key) {
|
|
146
|
+
this.openDynamicHost(resolvedConfig, ref);
|
|
147
|
+
return ref;
|
|
148
|
+
}
|
|
149
|
+
const request = {
|
|
150
|
+
id: ++this.nextId,
|
|
151
|
+
config: resolvedConfig,
|
|
152
|
+
ref,
|
|
153
|
+
};
|
|
154
|
+
this.activeRefs.add(ref);
|
|
155
|
+
ref.closed.subscribe(() => this.activeRefs.delete(ref));
|
|
156
|
+
this.requestState.set(request);
|
|
157
|
+
return ref;
|
|
158
|
+
}
|
|
159
|
+
closeAll() {
|
|
160
|
+
for (const ref of [...this.activeRefs])
|
|
161
|
+
ref.close();
|
|
162
|
+
this.closeState.update((value) => value + 1);
|
|
163
|
+
}
|
|
164
|
+
openDynamicHost(config, ref) {
|
|
165
|
+
const hostRef = createComponent(AerisConfirmPopup, {
|
|
166
|
+
environmentInjector: this.environmentInjector,
|
|
167
|
+
});
|
|
168
|
+
const cleanup = () => {
|
|
169
|
+
if (!this.activeRefs.delete(ref))
|
|
170
|
+
return;
|
|
171
|
+
this.dynamicHosts.delete(ref);
|
|
172
|
+
this.appRef.detachView(hostRef.hostView);
|
|
173
|
+
hostRef.destroy();
|
|
174
|
+
};
|
|
175
|
+
this.activeRefs.add(ref);
|
|
176
|
+
this.dynamicHosts.set(ref, hostRef);
|
|
177
|
+
ref.closed.subscribe(() => queueMicrotask(cleanup));
|
|
178
|
+
this.appRef.attachView(hostRef.hostView);
|
|
179
|
+
this.document.body.appendChild(this.rootNode(hostRef));
|
|
180
|
+
hostRef.changeDetectorRef.detectChanges();
|
|
181
|
+
hostRef.instance.openWithConfig(config, ref);
|
|
182
|
+
ref.attach({
|
|
183
|
+
accept: (originalEvent) => {
|
|
184
|
+
hostRef.instance.accept(originalEvent);
|
|
185
|
+
hostRef.changeDetectorRef.detectChanges();
|
|
186
|
+
},
|
|
187
|
+
reject: (originalEvent) => {
|
|
188
|
+
hostRef.instance.reject(originalEvent);
|
|
189
|
+
hostRef.changeDetectorRef.detectChanges();
|
|
190
|
+
},
|
|
191
|
+
close: (originalEvent) => {
|
|
192
|
+
hostRef.instance.close(originalEvent);
|
|
193
|
+
hostRef.changeDetectorRef.detectChanges();
|
|
194
|
+
},
|
|
195
|
+
focus: (options) => hostRef.instance.focus(options),
|
|
196
|
+
reposition: () => hostRef.instance.reposition(),
|
|
197
|
+
});
|
|
198
|
+
hostRef.changeDetectorRef.detectChanges();
|
|
199
|
+
}
|
|
200
|
+
rootNode(hostRef) {
|
|
201
|
+
const [node] = hostRef.hostView.rootNodes;
|
|
202
|
+
return node instanceof Node ? node : this.document.createTextNode('');
|
|
203
|
+
}
|
|
204
|
+
resolveConfig(config) {
|
|
205
|
+
return {
|
|
206
|
+
key: config.key ?? '',
|
|
207
|
+
target: this.resolveTarget(config.target),
|
|
208
|
+
header: config.header ?? 'Confirm action',
|
|
209
|
+
message: config.message ?? '',
|
|
210
|
+
data: config.data,
|
|
211
|
+
icon: config.icon ?? 'question',
|
|
212
|
+
severity: config.severity ?? 'primary',
|
|
213
|
+
acceptLabel: config.acceptLabel ?? 'Confirm',
|
|
214
|
+
rejectLabel: config.rejectLabel ?? 'Cancel',
|
|
215
|
+
acceptVisible: config.acceptVisible ?? true,
|
|
216
|
+
rejectVisible: config.rejectVisible ?? true,
|
|
217
|
+
acceptDisabled: config.acceptDisabled ?? false,
|
|
218
|
+
rejectDisabled: config.rejectDisabled ?? false,
|
|
219
|
+
acceptAriaLabel: config.acceptAriaLabel ?? config.acceptLabel ?? 'Confirm',
|
|
220
|
+
rejectAriaLabel: config.rejectAriaLabel ?? config.rejectLabel ?? 'Cancel',
|
|
221
|
+
defaultFocus: config.defaultFocus ?? 'accept',
|
|
222
|
+
placement: config.placement ?? 'auto',
|
|
223
|
+
alignment: config.alignment ?? 'center',
|
|
224
|
+
width: config.width ?? '',
|
|
225
|
+
maxWidth: config.maxWidth ?? '',
|
|
226
|
+
offset: config.offset ?? 10,
|
|
227
|
+
viewportMargin: config.viewportMargin ?? 8,
|
|
228
|
+
dismissible: config.dismissible ?? true,
|
|
229
|
+
closeOnEscape: config.closeOnEscape ?? true,
|
|
230
|
+
focusTrap: config.focusTrap ?? true,
|
|
231
|
+
restoreFocus: config.restoreFocus ?? true,
|
|
232
|
+
autoFocus: config.autoFocus ?? true,
|
|
233
|
+
initialFocus: config.initialFocus ?? '',
|
|
234
|
+
showArrow: config.showArrow ?? true,
|
|
235
|
+
ariaLabel: config.ariaLabel ?? '',
|
|
236
|
+
ariaLabelledBy: config.ariaLabelledBy ?? '',
|
|
237
|
+
ariaDescribedBy: config.ariaDescribedBy ?? '',
|
|
238
|
+
accept: config.accept,
|
|
239
|
+
reject: config.reject,
|
|
240
|
+
};
|
|
241
|
+
}
|
|
242
|
+
resolveTarget(target) {
|
|
243
|
+
const element = this.targetElement(target);
|
|
244
|
+
if (!element) {
|
|
245
|
+
throw new Error('AerisConfirmPopup requires a target Element or trigger Event.');
|
|
246
|
+
}
|
|
247
|
+
return element;
|
|
248
|
+
}
|
|
249
|
+
targetElement(target) {
|
|
250
|
+
if (target instanceof Element)
|
|
251
|
+
return target;
|
|
252
|
+
if (target instanceof Event) {
|
|
253
|
+
return this.targetElement(target.currentTarget ?? target.target);
|
|
254
|
+
}
|
|
255
|
+
return target instanceof Element ? target : null;
|
|
256
|
+
}
|
|
257
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: AerisConfirmPopupService, deps: [], target: i0.ɵɵFactoryTarget.Service });
|
|
258
|
+
static ɵprov = i0.ɵɵngDeclareService({ minVersion: "22.0.0", version: "22.0.6", ngImport: i0, type: AerisConfirmPopupService });
|
|
259
|
+
}
|
|
260
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: AerisConfirmPopupService, decorators: [{
|
|
261
|
+
type: Service
|
|
262
|
+
}] });
|
|
263
|
+
let nextPopupId = 0;
|
|
264
|
+
class AerisConfirmPopup {
|
|
265
|
+
service = inject(AerisConfirmPopupService);
|
|
266
|
+
document = inject(DOCUMENT);
|
|
267
|
+
repositionFrame = aerisInternalCreateFrameScheduler(() => this.reposition());
|
|
268
|
+
activeRequest = signal(null, /* @ts-ignore */
|
|
269
|
+
...(ngDevMode ? [{ debugName: "activeRequest" }] : /* istanbul ignore next */ []));
|
|
270
|
+
target = input(null, /* @ts-ignore */
|
|
271
|
+
...(ngDevMode ? [{ debugName: "target" }] : /* istanbul ignore next */ []));
|
|
272
|
+
localConfig = computed(() => ({
|
|
273
|
+
key: this.key(),
|
|
274
|
+
target: this.localTarget(),
|
|
275
|
+
header: this.header(),
|
|
276
|
+
message: this.message(),
|
|
277
|
+
data: this.data(),
|
|
278
|
+
icon: this.icon(),
|
|
279
|
+
severity: this.severity(),
|
|
280
|
+
acceptLabel: this.acceptLabel(),
|
|
281
|
+
rejectLabel: this.rejectLabel(),
|
|
282
|
+
acceptVisible: this.acceptVisible(),
|
|
283
|
+
rejectVisible: this.rejectVisible(),
|
|
284
|
+
acceptDisabled: this.acceptDisabled(),
|
|
285
|
+
rejectDisabled: this.rejectDisabled(),
|
|
286
|
+
acceptAriaLabel: this.acceptAriaLabel() || this.acceptLabel(),
|
|
287
|
+
rejectAriaLabel: this.rejectAriaLabel() || this.rejectLabel(),
|
|
288
|
+
defaultFocus: this.defaultFocus(),
|
|
289
|
+
placement: this.placement(),
|
|
290
|
+
alignment: this.alignment(),
|
|
291
|
+
width: this.width(),
|
|
292
|
+
maxWidth: this.maxWidth(),
|
|
293
|
+
offset: this.offset(),
|
|
294
|
+
viewportMargin: this.viewportMargin(),
|
|
295
|
+
dismissible: this.dismissible(),
|
|
296
|
+
closeOnEscape: this.closeOnEscape(),
|
|
297
|
+
focusTrap: this.focusTrap(),
|
|
298
|
+
restoreFocus: this.restoreFocus(),
|
|
299
|
+
autoFocus: this.autoFocus(),
|
|
300
|
+
initialFocus: this.initialFocus(),
|
|
301
|
+
showArrow: this.showArrow(),
|
|
302
|
+
ariaLabel: this.ariaLabel(),
|
|
303
|
+
ariaLabelledBy: this.ariaLabelledBy(),
|
|
304
|
+
ariaDescribedBy: this.ariaDescribedBy(),
|
|
305
|
+
}), /* @ts-ignore */
|
|
306
|
+
...(ngDevMode ? [{ debugName: "localConfig" }] : /* istanbul ignore next */ []));
|
|
307
|
+
triggerAttributes = signal(null, /* @ts-ignore */
|
|
308
|
+
...(ngDevMode ? [{ debugName: "triggerAttributes" }] : /* istanbul ignore next */ []));
|
|
309
|
+
lastRequestId = 0;
|
|
310
|
+
lastCloseSignal = 0;
|
|
311
|
+
previousVisible = false;
|
|
312
|
+
pendingResult = null;
|
|
313
|
+
pendingReason = 'api';
|
|
314
|
+
pendingOriginalEvent = null;
|
|
315
|
+
popupPanel = viewChild('popupPanel', /* @ts-ignore */
|
|
316
|
+
...(ngDevMode ? [{ debugName: "popupPanel" }] : /* istanbul ignore next */ []));
|
|
317
|
+
iconTemplate = contentChild(AerisConfirmPopupIconTemplate, /* @ts-ignore */
|
|
318
|
+
...(ngDevMode ? [{ debugName: "iconTemplate" }] : /* istanbul ignore next */ []));
|
|
319
|
+
messageTemplate = contentChild(AerisConfirmPopupMessageTemplate, /* @ts-ignore */
|
|
320
|
+
...(ngDevMode ? [{ debugName: "messageTemplate" }] : /* istanbul ignore next */ []));
|
|
321
|
+
footerTemplate = contentChild(AerisConfirmPopupFooterTemplate, /* @ts-ignore */
|
|
322
|
+
...(ngDevMode ? [{ debugName: "footerTemplate" }] : /* istanbul ignore next */ []));
|
|
323
|
+
headlessTemplate = contentChild(AerisConfirmPopupHeadlessTemplate, /* @ts-ignore */
|
|
324
|
+
...(ngDevMode ? [{ debugName: "headlessTemplate" }] : /* istanbul ignore next */ []));
|
|
325
|
+
positioned = signal(false, /* @ts-ignore */
|
|
326
|
+
...(ngDevMode ? [{ debugName: "positioned" }] : /* istanbul ignore next */ []));
|
|
327
|
+
actualPlacement = signal('bottom', /* @ts-ignore */
|
|
328
|
+
...(ngDevMode ? [{ debugName: "actualPlacement" }] : /* istanbul ignore next */ []));
|
|
329
|
+
coordinates = signal({ x: 0, y: 0 }, /* @ts-ignore */
|
|
330
|
+
...(ngDevMode ? [{ debugName: "coordinates" }] : /* istanbul ignore next */ []));
|
|
331
|
+
settings = computed(() => this.activeRequest()?.config ?? this.localConfig(), /* @ts-ignore */
|
|
332
|
+
...(ngDevMode ? [{ debugName: "settings" }] : /* istanbul ignore next */ []));
|
|
333
|
+
acceptButtonSeverity = computed(() => {
|
|
334
|
+
const severity = this.settings().severity;
|
|
335
|
+
return severity === 'neutral' ? 'secondary' : severity;
|
|
336
|
+
}, /* @ts-ignore */
|
|
337
|
+
...(ngDevMode ? [{ debugName: "acceptButtonSeverity" }] : /* istanbul ignore next */ []));
|
|
338
|
+
templateContext = computed(() => ({
|
|
339
|
+
$implicit: this,
|
|
340
|
+
config: this.settings(),
|
|
341
|
+
data: this.settings().data,
|
|
342
|
+
accept: (event) => this.accept(event ?? null),
|
|
343
|
+
reject: (event) => this.reject(event ?? null),
|
|
344
|
+
close: (event) => this.close(event ?? null),
|
|
345
|
+
}), /* @ts-ignore */
|
|
346
|
+
...(ngDevMode ? [{ debugName: "templateContext" }] : /* istanbul ignore next */ []));
|
|
347
|
+
computedAriaLabelledBy = computed(() => {
|
|
348
|
+
const labelledBy = this.settings().ariaLabelledBy;
|
|
349
|
+
if (labelledBy)
|
|
350
|
+
return labelledBy;
|
|
351
|
+
if (this.settings().ariaLabel)
|
|
352
|
+
return null;
|
|
353
|
+
return this.settings().header && !this.headlessTemplate() ? this.titleId : null;
|
|
354
|
+
}, /* @ts-ignore */
|
|
355
|
+
...(ngDevMode ? [{ debugName: "computedAriaLabelledBy" }] : /* istanbul ignore next */ []));
|
|
356
|
+
computedAriaDescribedBy = computed(() => {
|
|
357
|
+
const describedBy = this.settings().ariaDescribedBy;
|
|
358
|
+
if (describedBy)
|
|
359
|
+
return describedBy;
|
|
360
|
+
return this.settings().message || this.messageTemplate() ? this.messageId : null;
|
|
361
|
+
}, /* @ts-ignore */
|
|
362
|
+
...(ngDevMode ? [{ debugName: "computedAriaDescribedBy" }] : /* istanbul ignore next */ []));
|
|
363
|
+
initialFocusTarget = computed(() => {
|
|
364
|
+
const settings = this.settings();
|
|
365
|
+
if (settings.initialFocus)
|
|
366
|
+
return settings.initialFocus;
|
|
367
|
+
switch (settings.defaultFocus) {
|
|
368
|
+
case 'accept':
|
|
369
|
+
return '.aeris-confirm-popup__accept';
|
|
370
|
+
case 'reject':
|
|
371
|
+
return '.aeris-confirm-popup__reject';
|
|
372
|
+
case 'popup':
|
|
373
|
+
return '.aeris-confirm-popup__panel';
|
|
374
|
+
case 'none':
|
|
375
|
+
return '';
|
|
376
|
+
default:
|
|
377
|
+
return '';
|
|
378
|
+
}
|
|
379
|
+
}, /* @ts-ignore */
|
|
380
|
+
...(ngDevMode ? [{ debugName: "initialFocusTarget" }] : /* istanbul ignore next */ []));
|
|
381
|
+
autoFocusTarget = computed(() => this.settings().autoFocus && this.settings().defaultFocus !== 'none', /* @ts-ignore */
|
|
382
|
+
...(ngDevMode ? [{ debugName: "autoFocusTarget" }] : /* istanbul ignore next */ []));
|
|
383
|
+
visible = model(false, /* @ts-ignore */
|
|
384
|
+
...(ngDevMode ? [{ debugName: "visible" }] : /* istanbul ignore next */ []));
|
|
385
|
+
key = input('', /* @ts-ignore */
|
|
386
|
+
...(ngDevMode ? [{ debugName: "key" }] : /* istanbul ignore next */ []));
|
|
387
|
+
header = input('Confirm action', /* @ts-ignore */
|
|
388
|
+
...(ngDevMode ? [{ debugName: "header" }] : /* istanbul ignore next */ []));
|
|
389
|
+
message = input('', /* @ts-ignore */
|
|
390
|
+
...(ngDevMode ? [{ debugName: "message" }] : /* istanbul ignore next */ []));
|
|
391
|
+
data = input(/* @ts-ignore */
|
|
392
|
+
...(ngDevMode ? [undefined, { debugName: "data" }] : /* istanbul ignore next */ []));
|
|
393
|
+
icon = input('question', /* @ts-ignore */
|
|
394
|
+
...(ngDevMode ? [{ debugName: "icon" }] : /* istanbul ignore next */ []));
|
|
395
|
+
severity = input('primary', /* @ts-ignore */
|
|
396
|
+
...(ngDevMode ? [{ debugName: "severity" }] : /* istanbul ignore next */ []));
|
|
397
|
+
acceptLabel = input('Confirm', /* @ts-ignore */
|
|
398
|
+
...(ngDevMode ? [{ debugName: "acceptLabel" }] : /* istanbul ignore next */ []));
|
|
399
|
+
rejectLabel = input('Cancel', /* @ts-ignore */
|
|
400
|
+
...(ngDevMode ? [{ debugName: "rejectLabel" }] : /* istanbul ignore next */ []));
|
|
401
|
+
acceptVisible = input(true, { ...(ngDevMode ? { debugName: "acceptVisible" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
402
|
+
rejectVisible = input(true, { ...(ngDevMode ? { debugName: "rejectVisible" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
403
|
+
acceptDisabled = input(false, { ...(ngDevMode ? { debugName: "acceptDisabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
404
|
+
rejectDisabled = input(false, { ...(ngDevMode ? { debugName: "rejectDisabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
405
|
+
acceptAriaLabel = input('', /* @ts-ignore */
|
|
406
|
+
...(ngDevMode ? [{ debugName: "acceptAriaLabel" }] : /* istanbul ignore next */ []));
|
|
407
|
+
rejectAriaLabel = input('', /* @ts-ignore */
|
|
408
|
+
...(ngDevMode ? [{ debugName: "rejectAriaLabel" }] : /* istanbul ignore next */ []));
|
|
409
|
+
defaultFocus = input('accept', /* @ts-ignore */
|
|
410
|
+
...(ngDevMode ? [{ debugName: "defaultFocus" }] : /* istanbul ignore next */ []));
|
|
411
|
+
placement = input('auto', /* @ts-ignore */
|
|
412
|
+
...(ngDevMode ? [{ debugName: "placement" }] : /* istanbul ignore next */ []));
|
|
413
|
+
alignment = input('center', /* @ts-ignore */
|
|
414
|
+
...(ngDevMode ? [{ debugName: "alignment" }] : /* istanbul ignore next */ []));
|
|
415
|
+
width = input('', /* @ts-ignore */
|
|
416
|
+
...(ngDevMode ? [{ debugName: "width" }] : /* istanbul ignore next */ []));
|
|
417
|
+
maxWidth = input('', /* @ts-ignore */
|
|
418
|
+
...(ngDevMode ? [{ debugName: "maxWidth" }] : /* istanbul ignore next */ []));
|
|
419
|
+
offset = input(10, /* @ts-ignore */
|
|
420
|
+
...(ngDevMode ? [{ debugName: "offset" }] : /* istanbul ignore next */ []));
|
|
421
|
+
viewportMargin = input(8, /* @ts-ignore */
|
|
422
|
+
...(ngDevMode ? [{ debugName: "viewportMargin" }] : /* istanbul ignore next */ []));
|
|
423
|
+
dismissible = input(true, { ...(ngDevMode ? { debugName: "dismissible" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
424
|
+
closeOnEscape = input(true, { ...(ngDevMode ? { debugName: "closeOnEscape" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
425
|
+
focusTrap = input(true, { ...(ngDevMode ? { debugName: "focusTrap" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
426
|
+
restoreFocus = input(true, { ...(ngDevMode ? { debugName: "restoreFocus" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
427
|
+
autoFocus = input(true, { ...(ngDevMode ? { debugName: "autoFocus" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
428
|
+
initialFocus = input('', /* @ts-ignore */
|
|
429
|
+
...(ngDevMode ? [{ debugName: "initialFocus" }] : /* istanbul ignore next */ []));
|
|
430
|
+
showArrow = input(true, { ...(ngDevMode ? { debugName: "showArrow" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
431
|
+
ariaLabel = input('', /* @ts-ignore */
|
|
432
|
+
...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
433
|
+
ariaLabelledBy = input('', /* @ts-ignore */
|
|
434
|
+
...(ngDevMode ? [{ debugName: "ariaLabelledBy" }] : /* istanbul ignore next */ []));
|
|
435
|
+
ariaDescribedBy = input('', /* @ts-ignore */
|
|
436
|
+
...(ngDevMode ? [{ debugName: "ariaDescribedBy" }] : /* istanbul ignore next */ []));
|
|
437
|
+
shown = output();
|
|
438
|
+
accepted = output();
|
|
439
|
+
rejected = output();
|
|
440
|
+
closed = output();
|
|
441
|
+
popupId = `aeris-confirm-popup-${nextPopupId++}`;
|
|
442
|
+
titleId = `${this.popupId}-title`;
|
|
443
|
+
messageId = `${this.popupId}-message`;
|
|
444
|
+
constructor() {
|
|
445
|
+
effect(() => {
|
|
446
|
+
const request = this.service.request();
|
|
447
|
+
if (!request || request.id === this.lastRequestId)
|
|
448
|
+
return;
|
|
449
|
+
if (request.config.key !== this.key())
|
|
450
|
+
return;
|
|
451
|
+
this.lastRequestId = request.id;
|
|
452
|
+
this.openRequest(request);
|
|
453
|
+
});
|
|
454
|
+
effect(() => {
|
|
455
|
+
const closeSignal = this.service.closeSignal();
|
|
456
|
+
if (closeSignal === this.lastCloseSignal)
|
|
457
|
+
return;
|
|
458
|
+
this.lastCloseSignal = closeSignal;
|
|
459
|
+
this.close();
|
|
460
|
+
});
|
|
461
|
+
effect(() => {
|
|
462
|
+
const visible = this.visible();
|
|
463
|
+
if (visible === this.previousVisible)
|
|
464
|
+
return;
|
|
465
|
+
if (visible) {
|
|
466
|
+
this.handleShown();
|
|
467
|
+
}
|
|
468
|
+
else {
|
|
469
|
+
this.handleHidden();
|
|
470
|
+
}
|
|
471
|
+
this.previousVisible = visible;
|
|
472
|
+
});
|
|
473
|
+
effect((onCleanup) => {
|
|
474
|
+
if (!this.visible())
|
|
475
|
+
return;
|
|
476
|
+
const keydown = (event) => this.handleDocumentKeydown(event);
|
|
477
|
+
const pointerdown = (event) => this.handleDocumentPointerdown(event);
|
|
478
|
+
const reposition = this.repositionFrame.schedule;
|
|
479
|
+
const view = this.document.defaultView;
|
|
480
|
+
this.document.addEventListener('keydown', keydown);
|
|
481
|
+
this.document.addEventListener('pointerdown', pointerdown);
|
|
482
|
+
view?.addEventListener('resize', reposition);
|
|
483
|
+
view?.addEventListener('scroll', reposition);
|
|
484
|
+
onCleanup(() => {
|
|
485
|
+
this.document.removeEventListener('keydown', keydown);
|
|
486
|
+
this.document.removeEventListener('pointerdown', pointerdown);
|
|
487
|
+
view?.removeEventListener('resize', reposition);
|
|
488
|
+
view?.removeEventListener('scroll', reposition);
|
|
489
|
+
this.repositionFrame.cancel();
|
|
490
|
+
});
|
|
491
|
+
});
|
|
492
|
+
}
|
|
493
|
+
openWithConfig(config, ref) {
|
|
494
|
+
this.openRequest({
|
|
495
|
+
id: ++this.lastRequestId,
|
|
496
|
+
config,
|
|
497
|
+
ref,
|
|
498
|
+
});
|
|
499
|
+
}
|
|
500
|
+
accept(originalEvent = null) {
|
|
501
|
+
const settings = this.settings();
|
|
502
|
+
if (!this.visible() || settings.acceptDisabled || !settings.acceptVisible)
|
|
503
|
+
return;
|
|
504
|
+
const event = this.actionEvent(originalEvent);
|
|
505
|
+
settings.accept?.(event);
|
|
506
|
+
this.accepted.emit(event);
|
|
507
|
+
this.activeRequest()?.ref.notifyAccepted(event);
|
|
508
|
+
this.closeWithResult('accept', 'accept', originalEvent);
|
|
509
|
+
}
|
|
510
|
+
reject(originalEvent = null) {
|
|
511
|
+
const settings = this.settings();
|
|
512
|
+
if (!this.visible() || settings.rejectDisabled || !settings.rejectVisible)
|
|
513
|
+
return;
|
|
514
|
+
const event = this.actionEvent(originalEvent);
|
|
515
|
+
settings.reject?.(event);
|
|
516
|
+
this.rejected.emit(event);
|
|
517
|
+
this.activeRequest()?.ref.notifyRejected(event);
|
|
518
|
+
this.closeWithResult('reject', 'reject', originalEvent);
|
|
519
|
+
}
|
|
520
|
+
close(originalEvent = null) {
|
|
521
|
+
if (!this.visible())
|
|
522
|
+
return;
|
|
523
|
+
this.closeWithResult('dismiss', 'api', originalEvent);
|
|
524
|
+
}
|
|
525
|
+
focus(options) {
|
|
526
|
+
this.focusInitial(options);
|
|
527
|
+
}
|
|
528
|
+
reposition() {
|
|
529
|
+
if (!this.visible())
|
|
530
|
+
return;
|
|
531
|
+
const panel = this.popupPanel()?.nativeElement;
|
|
532
|
+
const target = this.settings().target;
|
|
533
|
+
const view = target.ownerDocument.defaultView;
|
|
534
|
+
if (!panel || !view)
|
|
535
|
+
return;
|
|
536
|
+
const targetRect = target.getBoundingClientRect();
|
|
537
|
+
const panelRect = panel.getBoundingClientRect();
|
|
538
|
+
const width = panelRect.width || panel.offsetWidth || 320;
|
|
539
|
+
const height = panelRect.height || panel.offsetHeight || 160;
|
|
540
|
+
const settings = this.settings();
|
|
541
|
+
const { placement, x, y } = aerisInternalPositionAnchoredOverlay({
|
|
542
|
+
target: targetRect,
|
|
543
|
+
width,
|
|
544
|
+
height,
|
|
545
|
+
placement: settings.placement,
|
|
546
|
+
alignment: settings.alignment,
|
|
547
|
+
offset: settings.offset,
|
|
548
|
+
margin: settings.viewportMargin,
|
|
549
|
+
viewportWidth: view.innerWidth,
|
|
550
|
+
viewportHeight: view.innerHeight,
|
|
551
|
+
});
|
|
552
|
+
this.actualPlacement.set(placement);
|
|
553
|
+
this.coordinates.set({ x, y });
|
|
554
|
+
this.positioned.set(true);
|
|
555
|
+
panel.style.left = `${x}px`;
|
|
556
|
+
panel.style.top = `${y}px`;
|
|
557
|
+
panel.setAttribute('data-placement', placement);
|
|
558
|
+
panel.parentElement?.setAttribute('data-positioned', 'true');
|
|
559
|
+
}
|
|
560
|
+
handlePanelKeydown(event) {
|
|
561
|
+
if (event.key !== 'Tab' || !this.settings().focusTrap)
|
|
562
|
+
return;
|
|
563
|
+
this.trapTab(event);
|
|
564
|
+
}
|
|
565
|
+
handleDocumentKeydown(event) {
|
|
566
|
+
if (!this.visible() || event.key !== 'Escape' || !this.settings().closeOnEscape)
|
|
567
|
+
return;
|
|
568
|
+
event.preventDefault();
|
|
569
|
+
this.closeWithResult('dismiss', 'escape', event);
|
|
570
|
+
}
|
|
571
|
+
handleDocumentPointerdown(event) {
|
|
572
|
+
if (!this.visible() || !this.settings().dismissible)
|
|
573
|
+
return;
|
|
574
|
+
const target = event.target;
|
|
575
|
+
if (!(target instanceof Node))
|
|
576
|
+
return;
|
|
577
|
+
const panel = this.popupPanel()?.nativeElement;
|
|
578
|
+
if (panel?.contains(target) || this.settings().target.contains(target))
|
|
579
|
+
return;
|
|
580
|
+
this.closeWithResult('dismiss', 'outside', event);
|
|
581
|
+
}
|
|
582
|
+
handleShown() {
|
|
583
|
+
this.positioned.set(false);
|
|
584
|
+
this.updateTriggerAttributes(true);
|
|
585
|
+
const event = this.actionEvent(null);
|
|
586
|
+
this.shown.emit(event);
|
|
587
|
+
this.activeRequest()?.ref.notifyShown(event);
|
|
588
|
+
queueMicrotask(() => {
|
|
589
|
+
this.reposition();
|
|
590
|
+
if (this.autoFocusTarget())
|
|
591
|
+
this.focusInitial();
|
|
592
|
+
});
|
|
593
|
+
}
|
|
594
|
+
handleHidden() {
|
|
595
|
+
const restoreFocus = this.settings().restoreFocus;
|
|
596
|
+
const focusTarget = this.settings().target;
|
|
597
|
+
const result = this.pendingResult ?? 'dismiss';
|
|
598
|
+
const reason = this.pendingReason;
|
|
599
|
+
const originalEvent = this.pendingOriginalEvent;
|
|
600
|
+
const closeEvent = {
|
|
601
|
+
...this.actionEvent(originalEvent),
|
|
602
|
+
result,
|
|
603
|
+
reason,
|
|
604
|
+
};
|
|
605
|
+
const ref = this.activeRequest()?.ref;
|
|
606
|
+
this.updateTriggerAttributes(false);
|
|
607
|
+
this.visible.set(false);
|
|
608
|
+
this.positioned.set(false);
|
|
609
|
+
this.pendingResult = null;
|
|
610
|
+
this.pendingReason = 'api';
|
|
611
|
+
this.pendingOriginalEvent = null;
|
|
612
|
+
this.activeRequest.set(null);
|
|
613
|
+
this.closed.emit(closeEvent);
|
|
614
|
+
ref?.notifyClosed(closeEvent);
|
|
615
|
+
if (restoreFocus) {
|
|
616
|
+
queueMicrotask(() => this.focusTarget(focusTarget));
|
|
617
|
+
}
|
|
618
|
+
}
|
|
619
|
+
openRequest(request) {
|
|
620
|
+
this.pendingResult = null;
|
|
621
|
+
this.pendingReason = 'api';
|
|
622
|
+
this.pendingOriginalEvent = null;
|
|
623
|
+
this.activeRequest.set(request);
|
|
624
|
+
request.ref.attach({
|
|
625
|
+
accept: (originalEvent) => this.accept(originalEvent),
|
|
626
|
+
reject: (originalEvent) => this.reject(originalEvent),
|
|
627
|
+
close: (originalEvent) => this.close(originalEvent),
|
|
628
|
+
focus: (options) => this.focus(options),
|
|
629
|
+
reposition: () => this.reposition(),
|
|
630
|
+
});
|
|
631
|
+
this.visible.set(true);
|
|
632
|
+
}
|
|
633
|
+
closeWithResult(result, reason, originalEvent) {
|
|
634
|
+
this.pendingResult = result;
|
|
635
|
+
this.pendingReason = reason;
|
|
636
|
+
this.pendingOriginalEvent = originalEvent;
|
|
637
|
+
this.visible.set(false);
|
|
638
|
+
}
|
|
639
|
+
actionEvent(originalEvent) {
|
|
640
|
+
const settings = this.settings();
|
|
641
|
+
return {
|
|
642
|
+
originalEvent,
|
|
643
|
+
data: settings.data,
|
|
644
|
+
config: settings,
|
|
645
|
+
};
|
|
646
|
+
}
|
|
647
|
+
updateTriggerAttributes(open) {
|
|
648
|
+
const target = this.settings().target;
|
|
649
|
+
if (open) {
|
|
650
|
+
this.triggerAttributes.set({
|
|
651
|
+
target,
|
|
652
|
+
expanded: target.getAttribute('aria-expanded'),
|
|
653
|
+
controls: target.getAttribute('aria-controls'),
|
|
654
|
+
haspopup: target.getAttribute('aria-haspopup'),
|
|
655
|
+
});
|
|
656
|
+
target.setAttribute('aria-haspopup', 'dialog');
|
|
657
|
+
target.setAttribute('aria-expanded', 'true');
|
|
658
|
+
target.setAttribute('aria-controls', this.popupId);
|
|
659
|
+
return;
|
|
660
|
+
}
|
|
661
|
+
const previous = this.triggerAttributes();
|
|
662
|
+
if (!previous)
|
|
663
|
+
return;
|
|
664
|
+
if (previous.expanded === null) {
|
|
665
|
+
previous.target.removeAttribute('aria-expanded');
|
|
666
|
+
}
|
|
667
|
+
else {
|
|
668
|
+
previous.target.setAttribute('aria-expanded', previous.expanded);
|
|
669
|
+
}
|
|
670
|
+
if (previous.controls === null) {
|
|
671
|
+
previous.target.removeAttribute('aria-controls');
|
|
672
|
+
}
|
|
673
|
+
else {
|
|
674
|
+
previous.target.setAttribute('aria-controls', previous.controls);
|
|
675
|
+
}
|
|
676
|
+
if (previous.haspopup === null) {
|
|
677
|
+
previous.target.removeAttribute('aria-haspopup');
|
|
678
|
+
}
|
|
679
|
+
else {
|
|
680
|
+
previous.target.setAttribute('aria-haspopup', previous.haspopup);
|
|
681
|
+
}
|
|
682
|
+
this.triggerAttributes.set(null);
|
|
683
|
+
}
|
|
684
|
+
focusInitial(options) {
|
|
685
|
+
const panel = this.popupPanel()?.nativeElement;
|
|
686
|
+
if (!panel)
|
|
687
|
+
return;
|
|
688
|
+
aerisInternalFocusInitialElement(panel, this.initialFocusTarget(), options);
|
|
689
|
+
}
|
|
690
|
+
trapTab(event) {
|
|
691
|
+
const panel = this.popupPanel()?.nativeElement;
|
|
692
|
+
if (!panel)
|
|
693
|
+
return;
|
|
694
|
+
aerisInternalTrapTabFocus(event, panel, this.activeHtmlElement());
|
|
695
|
+
}
|
|
696
|
+
activeHtmlElement() {
|
|
697
|
+
const active = this.settings().target.ownerDocument.activeElement;
|
|
698
|
+
return active instanceof HTMLElement ? active : null;
|
|
699
|
+
}
|
|
700
|
+
focusTarget(target) {
|
|
701
|
+
if (target instanceof HTMLElement)
|
|
702
|
+
target.focus();
|
|
703
|
+
}
|
|
704
|
+
localTarget() {
|
|
705
|
+
const target = this.target();
|
|
706
|
+
if (target instanceof Element)
|
|
707
|
+
return target;
|
|
708
|
+
if (target instanceof Event) {
|
|
709
|
+
const eventTarget = target.currentTarget ?? target.target;
|
|
710
|
+
if (eventTarget instanceof Element)
|
|
711
|
+
return eventTarget;
|
|
712
|
+
}
|
|
713
|
+
throw new Error('AerisConfirmPopup requires a target Element or trigger Event.');
|
|
714
|
+
}
|
|
715
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: AerisConfirmPopup, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
716
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: AerisConfirmPopup, isStandalone: true, selector: "aeris-confirm-popup", inputs: { target: { classPropertyName: "target", publicName: "target", isSignal: true, isRequired: false, transformFunction: null }, visible: { classPropertyName: "visible", publicName: "visible", isSignal: true, isRequired: false, transformFunction: null }, key: { classPropertyName: "key", publicName: "key", isSignal: true, isRequired: false, transformFunction: null }, header: { classPropertyName: "header", publicName: "header", isSignal: true, isRequired: false, transformFunction: null }, message: { classPropertyName: "message", publicName: "message", isSignal: true, isRequired: false, transformFunction: null }, data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, severity: { classPropertyName: "severity", publicName: "severity", isSignal: true, isRequired: false, transformFunction: null }, acceptLabel: { classPropertyName: "acceptLabel", publicName: "acceptLabel", isSignal: true, isRequired: false, transformFunction: null }, rejectLabel: { classPropertyName: "rejectLabel", publicName: "rejectLabel", isSignal: true, isRequired: false, transformFunction: null }, acceptVisible: { classPropertyName: "acceptVisible", publicName: "acceptVisible", isSignal: true, isRequired: false, transformFunction: null }, rejectVisible: { classPropertyName: "rejectVisible", publicName: "rejectVisible", isSignal: true, isRequired: false, transformFunction: null }, acceptDisabled: { classPropertyName: "acceptDisabled", publicName: "acceptDisabled", isSignal: true, isRequired: false, transformFunction: null }, rejectDisabled: { classPropertyName: "rejectDisabled", publicName: "rejectDisabled", isSignal: true, isRequired: false, transformFunction: null }, acceptAriaLabel: { classPropertyName: "acceptAriaLabel", publicName: "acceptAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, rejectAriaLabel: { classPropertyName: "rejectAriaLabel", publicName: "rejectAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, defaultFocus: { classPropertyName: "defaultFocus", publicName: "defaultFocus", isSignal: true, isRequired: false, transformFunction: null }, placement: { classPropertyName: "placement", publicName: "placement", isSignal: true, isRequired: false, transformFunction: null }, alignment: { classPropertyName: "alignment", publicName: "alignment", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, maxWidth: { classPropertyName: "maxWidth", publicName: "maxWidth", isSignal: true, isRequired: false, transformFunction: null }, offset: { classPropertyName: "offset", publicName: "offset", isSignal: true, isRequired: false, transformFunction: null }, viewportMargin: { classPropertyName: "viewportMargin", publicName: "viewportMargin", isSignal: true, isRequired: false, transformFunction: null }, dismissible: { classPropertyName: "dismissible", publicName: "dismissible", isSignal: true, isRequired: false, transformFunction: null }, closeOnEscape: { classPropertyName: "closeOnEscape", publicName: "closeOnEscape", isSignal: true, isRequired: false, transformFunction: null }, focusTrap: { classPropertyName: "focusTrap", publicName: "focusTrap", isSignal: true, isRequired: false, transformFunction: null }, restoreFocus: { classPropertyName: "restoreFocus", publicName: "restoreFocus", isSignal: true, isRequired: false, transformFunction: null }, autoFocus: { classPropertyName: "autoFocus", publicName: "autoFocus", isSignal: true, isRequired: false, transformFunction: null }, initialFocus: { classPropertyName: "initialFocus", publicName: "initialFocus", isSignal: true, isRequired: false, transformFunction: null }, showArrow: { classPropertyName: "showArrow", publicName: "showArrow", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledBy: { classPropertyName: "ariaLabelledBy", publicName: "ariaLabelledBy", isSignal: true, isRequired: false, transformFunction: null }, ariaDescribedBy: { classPropertyName: "ariaDescribedBy", publicName: "ariaDescribedBy", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { visible: "visibleChange", shown: "shown", accepted: "accepted", rejected: "rejected", closed: "closed" }, host: { properties: { "attr.data-open": "visible() || null" }, classAttribute: "aeris-confirm-popup" }, queries: [{ propertyName: "iconTemplate", first: true, predicate: AerisConfirmPopupIconTemplate, descendants: true, isSignal: true }, { propertyName: "messageTemplate", first: true, predicate: AerisConfirmPopupMessageTemplate, descendants: true, isSignal: true }, { propertyName: "footerTemplate", first: true, predicate: AerisConfirmPopupFooterTemplate, descendants: true, isSignal: true }, { propertyName: "headlessTemplate", first: true, predicate: AerisConfirmPopupHeadlessTemplate, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "popupPanel", first: true, predicate: ["popupPanel"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
717
|
+
@if (visible()) {
|
|
718
|
+
<div class="aeris-confirm-popup__layer" [attr.data-positioned]="positioned() || null">
|
|
719
|
+
<section
|
|
720
|
+
#popupPanel
|
|
721
|
+
class="aeris-confirm-popup__panel"
|
|
722
|
+
role="alertdialog"
|
|
723
|
+
tabindex="-1"
|
|
724
|
+
[id]="popupId"
|
|
725
|
+
[attr.aria-modal]="true"
|
|
726
|
+
[attr.aria-label]="settings().ariaLabel || null"
|
|
727
|
+
[attr.aria-labelledby]="computedAriaLabelledBy()"
|
|
728
|
+
[attr.aria-describedby]="computedAriaDescribedBy()"
|
|
729
|
+
[attr.data-placement]="actualPlacement()"
|
|
730
|
+
[attr.data-severity]="settings().severity"
|
|
731
|
+
[attr.data-headless]="headlessTemplate() ? true : null"
|
|
732
|
+
[style.left.px]="coordinates().x"
|
|
733
|
+
[style.top.px]="coordinates().y"
|
|
734
|
+
[style.--aeris-confirm-popup-width]="settings().width || null"
|
|
735
|
+
[style.--aeris-confirm-popup-max-width]="settings().maxWidth || null"
|
|
736
|
+
(keydown)="handlePanelKeydown($event)"
|
|
737
|
+
>
|
|
738
|
+
@if (settings().showArrow) {
|
|
739
|
+
<span class="aeris-confirm-popup__arrow" aria-hidden="true"></span>
|
|
740
|
+
}
|
|
741
|
+
|
|
742
|
+
@if (headlessTemplate(); as headlessTemplateRef) {
|
|
743
|
+
<ng-container
|
|
744
|
+
[ngTemplateOutlet]="headlessTemplateRef.template"
|
|
745
|
+
[ngTemplateOutletContext]="templateContext()"
|
|
746
|
+
/>
|
|
747
|
+
} @else {
|
|
748
|
+
<div class="aeris-confirm-popup__body">
|
|
749
|
+
@if (iconTemplate(); as iconTemplateRef) {
|
|
750
|
+
<div class="aeris-confirm-popup__icon" aria-hidden="true">
|
|
751
|
+
<ng-container
|
|
752
|
+
[ngTemplateOutlet]="iconTemplateRef.template"
|
|
753
|
+
[ngTemplateOutletContext]="templateContext()"
|
|
754
|
+
/>
|
|
755
|
+
</div>
|
|
756
|
+
} @else if (settings().icon !== 'none') {
|
|
757
|
+
<span
|
|
758
|
+
class="aeris-confirm-popup__icon"
|
|
759
|
+
[attr.data-icon]="settings().icon"
|
|
760
|
+
aria-hidden="true"
|
|
761
|
+
>
|
|
762
|
+
<svg viewBox="0 0 24 24" focusable="false">
|
|
763
|
+
@switch (settings().icon) {
|
|
764
|
+
@case ('info') {
|
|
765
|
+
<path d="M12 17v-6" />
|
|
766
|
+
<path d="M12 7.5h.01" />
|
|
767
|
+
<path d="M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18Z" />
|
|
768
|
+
}
|
|
769
|
+
@case ('warning') {
|
|
770
|
+
<path d="M12 4.5 21 19H3L12 4.5Z" />
|
|
771
|
+
<path d="M12 10v4" />
|
|
772
|
+
<path d="M12 17h.01" />
|
|
773
|
+
}
|
|
774
|
+
@case ('danger') {
|
|
775
|
+
<path d="M12 4.5 21 19H3L12 4.5Z" />
|
|
776
|
+
<path d="M12 10v4" />
|
|
777
|
+
<path d="M12 17h.01" />
|
|
778
|
+
}
|
|
779
|
+
@case ('success') {
|
|
780
|
+
<path d="M20 7 10 17l-5-5" />
|
|
781
|
+
}
|
|
782
|
+
@default {
|
|
783
|
+
<path d="M9.75 9a2.25 2.25 0 1 1 3.15 2.07c-.61.28-.9.82-.9 1.43v.5" />
|
|
784
|
+
<path d="M12 17h.01" />
|
|
785
|
+
<path d="M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18Z" />
|
|
786
|
+
}
|
|
787
|
+
}
|
|
788
|
+
</svg>
|
|
789
|
+
</span>
|
|
790
|
+
}
|
|
791
|
+
|
|
792
|
+
<div class="aeris-confirm-popup__copy">
|
|
793
|
+
@if (settings().header) {
|
|
794
|
+
<div class="aeris-confirm-popup__title" [id]="titleId">
|
|
795
|
+
{{ settings().header }}
|
|
796
|
+
</div>
|
|
797
|
+
}
|
|
798
|
+
<div class="aeris-confirm-popup__message" [id]="messageId">
|
|
799
|
+
@if (messageTemplate(); as messageTemplateRef) {
|
|
800
|
+
<ng-container
|
|
801
|
+
[ngTemplateOutlet]="messageTemplateRef.template"
|
|
802
|
+
[ngTemplateOutletContext]="templateContext()"
|
|
803
|
+
/>
|
|
804
|
+
} @else {
|
|
805
|
+
{{ settings().message }}
|
|
806
|
+
}
|
|
807
|
+
</div>
|
|
808
|
+
</div>
|
|
809
|
+
</div>
|
|
810
|
+
|
|
811
|
+
@if (footerTemplate(); as footerTemplateRef) {
|
|
812
|
+
<ng-container
|
|
813
|
+
[ngTemplateOutlet]="footerTemplateRef.template"
|
|
814
|
+
[ngTemplateOutletContext]="templateContext()"
|
|
815
|
+
/>
|
|
816
|
+
} @else {
|
|
817
|
+
<div class="aeris-confirm-popup__actions">
|
|
818
|
+
@if (settings().rejectVisible) {
|
|
819
|
+
<button
|
|
820
|
+
aerisButton
|
|
821
|
+
type="button"
|
|
822
|
+
variant="secondary"
|
|
823
|
+
class="aeris-confirm-popup__button aeris-confirm-popup__reject"
|
|
824
|
+
[disabled]="settings().rejectDisabled"
|
|
825
|
+
[attr.aria-label]="settings().rejectAriaLabel"
|
|
826
|
+
(click)="reject($event)"
|
|
827
|
+
>
|
|
828
|
+
{{ settings().rejectLabel }}
|
|
829
|
+
</button>
|
|
830
|
+
}
|
|
831
|
+
|
|
832
|
+
@if (settings().acceptVisible) {
|
|
833
|
+
<button
|
|
834
|
+
aerisButton
|
|
835
|
+
type="button"
|
|
836
|
+
class="aeris-confirm-popup__button aeris-confirm-popup__accept"
|
|
837
|
+
[severity]="acceptButtonSeverity()"
|
|
838
|
+
[attr.data-severity]="settings().severity"
|
|
839
|
+
[disabled]="settings().acceptDisabled"
|
|
840
|
+
[attr.aria-label]="settings().acceptAriaLabel"
|
|
841
|
+
(click)="accept($event)"
|
|
842
|
+
>
|
|
843
|
+
{{ settings().acceptLabel }}
|
|
844
|
+
</button>
|
|
845
|
+
}
|
|
846
|
+
</div>
|
|
847
|
+
}
|
|
848
|
+
}
|
|
849
|
+
</section>
|
|
850
|
+
</div>
|
|
851
|
+
}
|
|
852
|
+
`, isInline: true, styles: [":host{--_aeris-confirm-popup-icon-size: 2rem;--_aeris-confirm-popup-shadow: 0 18px 50px color-mix(in srgb, var(--aeris-text, #222222) 20%, transparent);display:contents}.aeris-confirm-popup__layer{position:fixed;z-index:var(--aeris-confirm-popup-z-index, 1040);inset:0;pointer-events:none}.aeris-confirm-popup__panel{position:fixed;width:var(--aeris-confirm-popup-width, min(22rem, 100vw - 1rem));max-width:var(--aeris-confirm-popup-max-width, calc(100vw - 1rem) );display:grid;gap:.875rem;padding:var(--aeris-confirm-popup-padding, 1rem);border:1px solid var(--aeris-confirm-popup-border, var(--aeris-border, #deddd7));border-radius:var(--aeris-confirm-popup-radius, var(--aeris-radius-lg, .875rem));background:var(--aeris-confirm-popup-background, var(--aeris-surface, #fff));color:var(--aeris-confirm-popup-color, var(--aeris-text, #222222));box-shadow:var(--aeris-confirm-popup-shadow, var(--_aeris-confirm-popup-shadow));opacity:0;pointer-events:auto;transform:translateY(.25rem) scale(.98);transform-origin:var(--_aeris-confirm-popup-origin, top center);transition:opacity .13s ease,transform .13s ease}.aeris-confirm-popup__layer[data-positioned=true] .aeris-confirm-popup__panel{opacity:1;transform:translateY(0) scale(1)}.aeris-confirm-popup__panel:focus{outline:none}.aeris-confirm-popup__panel:focus-visible{outline:2px solid var(--aeris-confirm-popup-focus, var(--aeris-focus, #536437));outline-offset:2px}.aeris-confirm-popup__panel[data-placement=top]{--_aeris-confirm-popup-origin: bottom center}.aeris-confirm-popup__panel[data-placement=right]{--_aeris-confirm-popup-origin: left center}.aeris-confirm-popup__panel[data-placement=bottom]{--_aeris-confirm-popup-origin: top center}.aeris-confirm-popup__panel[data-placement=left]{--_aeris-confirm-popup-origin: right center}.aeris-confirm-popup__arrow{position:absolute;width:.75rem;height:.75rem;border:inherit;border-right:0;border-bottom:0;background:inherit}.aeris-confirm-popup__panel[data-placement=bottom] .aeris-confirm-popup__arrow{top:-.41rem;left:calc(50% - .375rem);transform:rotate(45deg)}.aeris-confirm-popup__panel[data-placement=top] .aeris-confirm-popup__arrow{bottom:-.41rem;left:calc(50% - .375rem);transform:rotate(225deg)}.aeris-confirm-popup__panel[data-placement=right] .aeris-confirm-popup__arrow{top:calc(50% - .375rem);left:-.41rem;transform:rotate(-45deg)}.aeris-confirm-popup__panel[data-placement=left] .aeris-confirm-popup__arrow{top:calc(50% - .375rem);right:-.41rem;transform:rotate(135deg)}.aeris-confirm-popup__body{display:grid;grid-template-columns:auto minmax(0,1fr);gap:.75rem;align-items:start}.aeris-confirm-popup__body:not(:has(.aeris-confirm-popup__icon)){grid-template-columns:1fr}.aeris-confirm-popup__icon{width:var(--aeris-confirm-popup-icon-size, var(--_aeris-confirm-popup-icon-size));height:var(--aeris-confirm-popup-icon-size, var(--_aeris-confirm-popup-icon-size));display:inline-grid;place-items:center;border-radius:var(--aeris-confirm-popup-icon-radius, 999px);background:var(--aeris-confirm-popup-icon-background, color-mix(in srgb, var(--aeris-primary, #6f7f49) 14%, transparent));color:var(--aeris-confirm-popup-icon-color, var(--aeris-primary-text, #4c5f27));flex:0 0 auto}.aeris-confirm-popup__icon svg{width:1.125rem;height:1.125rem;display:block;fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:2}.aeris-confirm-popup__panel[data-severity=success] .aeris-confirm-popup__icon{background:color-mix(in srgb,var(--aeris-success, #5d7d3f) 16%,transparent);color:var(--aeris-success-text, #3e6124)}.aeris-confirm-popup__panel[data-severity=info] .aeris-confirm-popup__icon{background:color-mix(in srgb,var(--aeris-info, #58789d) 16%,transparent);color:var(--aeris-info-text, #2f5c87)}.aeris-confirm-popup__panel[data-severity=warning] .aeris-confirm-popup__icon{background:color-mix(in srgb,var(--aeris-warning, #c38600) 18%,transparent);color:var(--aeris-warning-text, #8a6100)}.aeris-confirm-popup__panel[data-severity=danger] .aeris-confirm-popup__icon{background:color-mix(in srgb,var(--aeris-danger, #c81e2a) 16%,transparent);color:var(--aeris-danger-text, #a31722)}.aeris-confirm-popup__copy{min-width:0;display:grid;gap:.25rem}.aeris-confirm-popup__title{color:var(--aeris-confirm-popup-title-color, var(--aeris-text, #222222));font-size:.9375rem;font-weight:800;line-height:1.25}.aeris-confirm-popup__message{color:var(--aeris-confirm-popup-message-color, var(--aeris-text-2, #555555));font-size:.875rem;line-height:1.5}.aeris-confirm-popup__message:empty{display:none}.aeris-confirm-popup__actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:.5rem}@media(prefers-reduced-motion:reduce){.aeris-confirm-popup__panel{transition:none}}@media(max-width:34rem){.aeris-confirm-popup__panel{width:min(var(--aeris-confirm-popup-width, 22rem),100vw - 1rem)}.aeris-confirm-popup__body{grid-template-columns:1fr}.aeris-confirm-popup__actions,.aeris-confirm-popup__actions .aeris-button{width:100%}}\n"], dependencies: [{ kind: "component", type: AerisButtonDirective, selector: "button[aerisButton], a[aerisButton]", inputs: ["variant", "text", "outlined", "link", "plain", "size", "severity", "iconPosition", "loading", "showSpinner", "iconOnly", "raised", "rounded", "fluid"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
|
|
853
|
+
}
|
|
854
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: AerisConfirmPopup, decorators: [{
|
|
855
|
+
type: Component,
|
|
856
|
+
args: [{ selector: 'aeris-confirm-popup', imports: [AerisButtonDirective, NgTemplateOutlet], template: `
|
|
857
|
+
@if (visible()) {
|
|
858
|
+
<div class="aeris-confirm-popup__layer" [attr.data-positioned]="positioned() || null">
|
|
859
|
+
<section
|
|
860
|
+
#popupPanel
|
|
861
|
+
class="aeris-confirm-popup__panel"
|
|
862
|
+
role="alertdialog"
|
|
863
|
+
tabindex="-1"
|
|
864
|
+
[id]="popupId"
|
|
865
|
+
[attr.aria-modal]="true"
|
|
866
|
+
[attr.aria-label]="settings().ariaLabel || null"
|
|
867
|
+
[attr.aria-labelledby]="computedAriaLabelledBy()"
|
|
868
|
+
[attr.aria-describedby]="computedAriaDescribedBy()"
|
|
869
|
+
[attr.data-placement]="actualPlacement()"
|
|
870
|
+
[attr.data-severity]="settings().severity"
|
|
871
|
+
[attr.data-headless]="headlessTemplate() ? true : null"
|
|
872
|
+
[style.left.px]="coordinates().x"
|
|
873
|
+
[style.top.px]="coordinates().y"
|
|
874
|
+
[style.--aeris-confirm-popup-width]="settings().width || null"
|
|
875
|
+
[style.--aeris-confirm-popup-max-width]="settings().maxWidth || null"
|
|
876
|
+
(keydown)="handlePanelKeydown($event)"
|
|
877
|
+
>
|
|
878
|
+
@if (settings().showArrow) {
|
|
879
|
+
<span class="aeris-confirm-popup__arrow" aria-hidden="true"></span>
|
|
880
|
+
}
|
|
881
|
+
|
|
882
|
+
@if (headlessTemplate(); as headlessTemplateRef) {
|
|
883
|
+
<ng-container
|
|
884
|
+
[ngTemplateOutlet]="headlessTemplateRef.template"
|
|
885
|
+
[ngTemplateOutletContext]="templateContext()"
|
|
886
|
+
/>
|
|
887
|
+
} @else {
|
|
888
|
+
<div class="aeris-confirm-popup__body">
|
|
889
|
+
@if (iconTemplate(); as iconTemplateRef) {
|
|
890
|
+
<div class="aeris-confirm-popup__icon" aria-hidden="true">
|
|
891
|
+
<ng-container
|
|
892
|
+
[ngTemplateOutlet]="iconTemplateRef.template"
|
|
893
|
+
[ngTemplateOutletContext]="templateContext()"
|
|
894
|
+
/>
|
|
895
|
+
</div>
|
|
896
|
+
} @else if (settings().icon !== 'none') {
|
|
897
|
+
<span
|
|
898
|
+
class="aeris-confirm-popup__icon"
|
|
899
|
+
[attr.data-icon]="settings().icon"
|
|
900
|
+
aria-hidden="true"
|
|
901
|
+
>
|
|
902
|
+
<svg viewBox="0 0 24 24" focusable="false">
|
|
903
|
+
@switch (settings().icon) {
|
|
904
|
+
@case ('info') {
|
|
905
|
+
<path d="M12 17v-6" />
|
|
906
|
+
<path d="M12 7.5h.01" />
|
|
907
|
+
<path d="M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18Z" />
|
|
908
|
+
}
|
|
909
|
+
@case ('warning') {
|
|
910
|
+
<path d="M12 4.5 21 19H3L12 4.5Z" />
|
|
911
|
+
<path d="M12 10v4" />
|
|
912
|
+
<path d="M12 17h.01" />
|
|
913
|
+
}
|
|
914
|
+
@case ('danger') {
|
|
915
|
+
<path d="M12 4.5 21 19H3L12 4.5Z" />
|
|
916
|
+
<path d="M12 10v4" />
|
|
917
|
+
<path d="M12 17h.01" />
|
|
918
|
+
}
|
|
919
|
+
@case ('success') {
|
|
920
|
+
<path d="M20 7 10 17l-5-5" />
|
|
921
|
+
}
|
|
922
|
+
@default {
|
|
923
|
+
<path d="M9.75 9a2.25 2.25 0 1 1 3.15 2.07c-.61.28-.9.82-.9 1.43v.5" />
|
|
924
|
+
<path d="M12 17h.01" />
|
|
925
|
+
<path d="M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18Z" />
|
|
926
|
+
}
|
|
927
|
+
}
|
|
928
|
+
</svg>
|
|
929
|
+
</span>
|
|
930
|
+
}
|
|
931
|
+
|
|
932
|
+
<div class="aeris-confirm-popup__copy">
|
|
933
|
+
@if (settings().header) {
|
|
934
|
+
<div class="aeris-confirm-popup__title" [id]="titleId">
|
|
935
|
+
{{ settings().header }}
|
|
936
|
+
</div>
|
|
937
|
+
}
|
|
938
|
+
<div class="aeris-confirm-popup__message" [id]="messageId">
|
|
939
|
+
@if (messageTemplate(); as messageTemplateRef) {
|
|
940
|
+
<ng-container
|
|
941
|
+
[ngTemplateOutlet]="messageTemplateRef.template"
|
|
942
|
+
[ngTemplateOutletContext]="templateContext()"
|
|
943
|
+
/>
|
|
944
|
+
} @else {
|
|
945
|
+
{{ settings().message }}
|
|
946
|
+
}
|
|
947
|
+
</div>
|
|
948
|
+
</div>
|
|
949
|
+
</div>
|
|
950
|
+
|
|
951
|
+
@if (footerTemplate(); as footerTemplateRef) {
|
|
952
|
+
<ng-container
|
|
953
|
+
[ngTemplateOutlet]="footerTemplateRef.template"
|
|
954
|
+
[ngTemplateOutletContext]="templateContext()"
|
|
955
|
+
/>
|
|
956
|
+
} @else {
|
|
957
|
+
<div class="aeris-confirm-popup__actions">
|
|
958
|
+
@if (settings().rejectVisible) {
|
|
959
|
+
<button
|
|
960
|
+
aerisButton
|
|
961
|
+
type="button"
|
|
962
|
+
variant="secondary"
|
|
963
|
+
class="aeris-confirm-popup__button aeris-confirm-popup__reject"
|
|
964
|
+
[disabled]="settings().rejectDisabled"
|
|
965
|
+
[attr.aria-label]="settings().rejectAriaLabel"
|
|
966
|
+
(click)="reject($event)"
|
|
967
|
+
>
|
|
968
|
+
{{ settings().rejectLabel }}
|
|
969
|
+
</button>
|
|
970
|
+
}
|
|
971
|
+
|
|
972
|
+
@if (settings().acceptVisible) {
|
|
973
|
+
<button
|
|
974
|
+
aerisButton
|
|
975
|
+
type="button"
|
|
976
|
+
class="aeris-confirm-popup__button aeris-confirm-popup__accept"
|
|
977
|
+
[severity]="acceptButtonSeverity()"
|
|
978
|
+
[attr.data-severity]="settings().severity"
|
|
979
|
+
[disabled]="settings().acceptDisabled"
|
|
980
|
+
[attr.aria-label]="settings().acceptAriaLabel"
|
|
981
|
+
(click)="accept($event)"
|
|
982
|
+
>
|
|
983
|
+
{{ settings().acceptLabel }}
|
|
984
|
+
</button>
|
|
985
|
+
}
|
|
986
|
+
</div>
|
|
987
|
+
}
|
|
988
|
+
}
|
|
989
|
+
</section>
|
|
990
|
+
</div>
|
|
991
|
+
}
|
|
992
|
+
`, host: {
|
|
993
|
+
class: 'aeris-confirm-popup',
|
|
994
|
+
'[attr.data-open]': 'visible() || null',
|
|
995
|
+
}, styles: [":host{--_aeris-confirm-popup-icon-size: 2rem;--_aeris-confirm-popup-shadow: 0 18px 50px color-mix(in srgb, var(--aeris-text, #222222) 20%, transparent);display:contents}.aeris-confirm-popup__layer{position:fixed;z-index:var(--aeris-confirm-popup-z-index, 1040);inset:0;pointer-events:none}.aeris-confirm-popup__panel{position:fixed;width:var(--aeris-confirm-popup-width, min(22rem, 100vw - 1rem));max-width:var(--aeris-confirm-popup-max-width, calc(100vw - 1rem) );display:grid;gap:.875rem;padding:var(--aeris-confirm-popup-padding, 1rem);border:1px solid var(--aeris-confirm-popup-border, var(--aeris-border, #deddd7));border-radius:var(--aeris-confirm-popup-radius, var(--aeris-radius-lg, .875rem));background:var(--aeris-confirm-popup-background, var(--aeris-surface, #fff));color:var(--aeris-confirm-popup-color, var(--aeris-text, #222222));box-shadow:var(--aeris-confirm-popup-shadow, var(--_aeris-confirm-popup-shadow));opacity:0;pointer-events:auto;transform:translateY(.25rem) scale(.98);transform-origin:var(--_aeris-confirm-popup-origin, top center);transition:opacity .13s ease,transform .13s ease}.aeris-confirm-popup__layer[data-positioned=true] .aeris-confirm-popup__panel{opacity:1;transform:translateY(0) scale(1)}.aeris-confirm-popup__panel:focus{outline:none}.aeris-confirm-popup__panel:focus-visible{outline:2px solid var(--aeris-confirm-popup-focus, var(--aeris-focus, #536437));outline-offset:2px}.aeris-confirm-popup__panel[data-placement=top]{--_aeris-confirm-popup-origin: bottom center}.aeris-confirm-popup__panel[data-placement=right]{--_aeris-confirm-popup-origin: left center}.aeris-confirm-popup__panel[data-placement=bottom]{--_aeris-confirm-popup-origin: top center}.aeris-confirm-popup__panel[data-placement=left]{--_aeris-confirm-popup-origin: right center}.aeris-confirm-popup__arrow{position:absolute;width:.75rem;height:.75rem;border:inherit;border-right:0;border-bottom:0;background:inherit}.aeris-confirm-popup__panel[data-placement=bottom] .aeris-confirm-popup__arrow{top:-.41rem;left:calc(50% - .375rem);transform:rotate(45deg)}.aeris-confirm-popup__panel[data-placement=top] .aeris-confirm-popup__arrow{bottom:-.41rem;left:calc(50% - .375rem);transform:rotate(225deg)}.aeris-confirm-popup__panel[data-placement=right] .aeris-confirm-popup__arrow{top:calc(50% - .375rem);left:-.41rem;transform:rotate(-45deg)}.aeris-confirm-popup__panel[data-placement=left] .aeris-confirm-popup__arrow{top:calc(50% - .375rem);right:-.41rem;transform:rotate(135deg)}.aeris-confirm-popup__body{display:grid;grid-template-columns:auto minmax(0,1fr);gap:.75rem;align-items:start}.aeris-confirm-popup__body:not(:has(.aeris-confirm-popup__icon)){grid-template-columns:1fr}.aeris-confirm-popup__icon{width:var(--aeris-confirm-popup-icon-size, var(--_aeris-confirm-popup-icon-size));height:var(--aeris-confirm-popup-icon-size, var(--_aeris-confirm-popup-icon-size));display:inline-grid;place-items:center;border-radius:var(--aeris-confirm-popup-icon-radius, 999px);background:var(--aeris-confirm-popup-icon-background, color-mix(in srgb, var(--aeris-primary, #6f7f49) 14%, transparent));color:var(--aeris-confirm-popup-icon-color, var(--aeris-primary-text, #4c5f27));flex:0 0 auto}.aeris-confirm-popup__icon svg{width:1.125rem;height:1.125rem;display:block;fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:2}.aeris-confirm-popup__panel[data-severity=success] .aeris-confirm-popup__icon{background:color-mix(in srgb,var(--aeris-success, #5d7d3f) 16%,transparent);color:var(--aeris-success-text, #3e6124)}.aeris-confirm-popup__panel[data-severity=info] .aeris-confirm-popup__icon{background:color-mix(in srgb,var(--aeris-info, #58789d) 16%,transparent);color:var(--aeris-info-text, #2f5c87)}.aeris-confirm-popup__panel[data-severity=warning] .aeris-confirm-popup__icon{background:color-mix(in srgb,var(--aeris-warning, #c38600) 18%,transparent);color:var(--aeris-warning-text, #8a6100)}.aeris-confirm-popup__panel[data-severity=danger] .aeris-confirm-popup__icon{background:color-mix(in srgb,var(--aeris-danger, #c81e2a) 16%,transparent);color:var(--aeris-danger-text, #a31722)}.aeris-confirm-popup__copy{min-width:0;display:grid;gap:.25rem}.aeris-confirm-popup__title{color:var(--aeris-confirm-popup-title-color, var(--aeris-text, #222222));font-size:.9375rem;font-weight:800;line-height:1.25}.aeris-confirm-popup__message{color:var(--aeris-confirm-popup-message-color, var(--aeris-text-2, #555555));font-size:.875rem;line-height:1.5}.aeris-confirm-popup__message:empty{display:none}.aeris-confirm-popup__actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:.5rem}@media(prefers-reduced-motion:reduce){.aeris-confirm-popup__panel{transition:none}}@media(max-width:34rem){.aeris-confirm-popup__panel{width:min(var(--aeris-confirm-popup-width, 22rem),100vw - 1rem)}.aeris-confirm-popup__body{grid-template-columns:1fr}.aeris-confirm-popup__actions,.aeris-confirm-popup__actions .aeris-button{width:100%}}\n"] }]
|
|
996
|
+
}], ctorParameters: () => [], propDecorators: { target: [{ type: i0.Input, args: [{ isSignal: true, alias: "target", required: false }] }], popupPanel: [{ type: i0.ViewChild, args: ['popupPanel', { isSignal: true }] }], iconTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => AerisConfirmPopupIconTemplate), { isSignal: true }] }], messageTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => AerisConfirmPopupMessageTemplate), { isSignal: true }] }], footerTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => AerisConfirmPopupFooterTemplate), { isSignal: true }] }], headlessTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => AerisConfirmPopupHeadlessTemplate), { isSignal: true }] }], visible: [{ type: i0.Input, args: [{ isSignal: true, alias: "visible", required: false }] }, { type: i0.Output, args: ["visibleChange"] }], key: [{ type: i0.Input, args: [{ isSignal: true, alias: "key", required: false }] }], header: [{ type: i0.Input, args: [{ isSignal: true, alias: "header", required: false }] }], message: [{ type: i0.Input, args: [{ isSignal: true, alias: "message", required: false }] }], data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], severity: [{ type: i0.Input, args: [{ isSignal: true, alias: "severity", required: false }] }], acceptLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "acceptLabel", required: false }] }], rejectLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "rejectLabel", required: false }] }], acceptVisible: [{ type: i0.Input, args: [{ isSignal: true, alias: "acceptVisible", required: false }] }], rejectVisible: [{ type: i0.Input, args: [{ isSignal: true, alias: "rejectVisible", required: false }] }], acceptDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "acceptDisabled", required: false }] }], rejectDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "rejectDisabled", required: false }] }], acceptAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "acceptAriaLabel", required: false }] }], rejectAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "rejectAriaLabel", required: false }] }], defaultFocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultFocus", required: false }] }], placement: [{ type: i0.Input, args: [{ isSignal: true, alias: "placement", required: false }] }], alignment: [{ type: i0.Input, args: [{ isSignal: true, alias: "alignment", required: false }] }], width: [{ type: i0.Input, args: [{ isSignal: true, alias: "width", required: false }] }], maxWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxWidth", required: false }] }], offset: [{ type: i0.Input, args: [{ isSignal: true, alias: "offset", required: false }] }], viewportMargin: [{ type: i0.Input, args: [{ isSignal: true, alias: "viewportMargin", required: false }] }], dismissible: [{ type: i0.Input, args: [{ isSignal: true, alias: "dismissible", required: false }] }], closeOnEscape: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOnEscape", required: false }] }], focusTrap: [{ type: i0.Input, args: [{ isSignal: true, alias: "focusTrap", required: false }] }], restoreFocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "restoreFocus", required: false }] }], autoFocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoFocus", required: false }] }], initialFocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "initialFocus", required: false }] }], showArrow: [{ type: i0.Input, args: [{ isSignal: true, alias: "showArrow", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], ariaLabelledBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabelledBy", required: false }] }], ariaDescribedBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaDescribedBy", required: false }] }], shown: [{ type: i0.Output, args: ["shown"] }], accepted: [{ type: i0.Output, args: ["accepted"] }], rejected: [{ type: i0.Output, args: ["rejected"] }], closed: [{ type: i0.Output, args: ["closed"] }] } });
|
|
997
|
+
const AerisConfirmPopupModule = [
|
|
998
|
+
AerisConfirmPopup,
|
|
999
|
+
AerisConfirmPopupIconTemplate,
|
|
1000
|
+
AerisConfirmPopupMessageTemplate,
|
|
1001
|
+
AerisConfirmPopupFooterTemplate,
|
|
1002
|
+
AerisConfirmPopupHeadlessTemplate,
|
|
1003
|
+
];
|
|
1004
|
+
|
|
1005
|
+
/**
|
|
1006
|
+
* Generated bundle index. Do not edit.
|
|
1007
|
+
*/
|
|
1008
|
+
|
|
1009
|
+
export { AerisConfirmPopup, AerisConfirmPopupFooterTemplate, AerisConfirmPopupHeadlessTemplate, AerisConfirmPopupIconTemplate, AerisConfirmPopupMessageTemplate, AerisConfirmPopupModule, AerisConfirmPopupRef, AerisConfirmPopupService };
|
|
1010
|
+
//# sourceMappingURL=aeris-ui-core-confirm-popup.mjs.map
|