@kirbydesign/designsystem 11.11.4 → 12.0.0-dev-286cdc0
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 +7 -0
- package/fesm2022/kirbydesign-designsystem-accordion.mjs +246 -135
- package/fesm2022/kirbydesign-designsystem-accordion.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-action-group.mjs +229 -134
- package/fesm2022/kirbydesign-designsystem-action-group.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-avatar.mjs +102 -55
- package/fesm2022/kirbydesign-designsystem-avatar.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-badge.mjs +85 -42
- package/fesm2022/kirbydesign-designsystem-badge.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-button.mjs +203 -170
- package/fesm2022/kirbydesign-designsystem-button.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-calendar.mjs +524 -516
- package/fesm2022/kirbydesign-designsystem-calendar.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-card.mjs +439 -205
- package/fesm2022/kirbydesign-designsystem-card.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-chart.mjs +1388 -1469
- package/fesm2022/kirbydesign-designsystem-chart.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-checkbox.mjs +223 -176
- package/fesm2022/kirbydesign-designsystem-checkbox.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-config.mjs +50 -96
- package/fesm2022/kirbydesign-designsystem-config.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-data-table.mjs +180 -83
- package/fesm2022/kirbydesign-designsystem-data-table.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-divider.mjs +46 -19
- package/fesm2022/kirbydesign-designsystem-divider.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-dropdown.mjs +878 -752
- package/fesm2022/kirbydesign-designsystem-dropdown.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-empty-state.mjs +175 -91
- package/fesm2022/kirbydesign-designsystem-empty-state.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-fab-sheet.mjs +213 -85
- package/fesm2022/kirbydesign-designsystem-fab-sheet.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-flag.mjs +67 -33
- package/fesm2022/kirbydesign-designsystem-flag.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-form-field.mjs +1260 -891
- package/fesm2022/kirbydesign-designsystem-form-field.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-gesture.mjs +38 -23
- package/fesm2022/kirbydesign-designsystem-gesture.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-header.mjs +422 -182
- package/fesm2022/kirbydesign-designsystem-header.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-helpers-scss.mjs +16 -14
- package/fesm2022/kirbydesign-designsystem-helpers-scss.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-helpers.mjs +251 -361
- package/fesm2022/kirbydesign-designsystem-helpers.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-icon.mjs +881 -296
- package/fesm2022/kirbydesign-designsystem-icon.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-item-group.mjs +52 -23
- package/fesm2022/kirbydesign-designsystem-item-group.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-item-sliding.mjs +147 -43
- package/fesm2022/kirbydesign-designsystem-item-sliding.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-item.mjs +395 -151
- package/fesm2022/kirbydesign-designsystem-item.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-kirby-app.mjs +136 -54
- package/fesm2022/kirbydesign-designsystem-kirby-app.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-list.mjs +1188 -697
- package/fesm2022/kirbydesign-designsystem-list.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-loading-overlay.mjs +166 -76
- package/fesm2022/kirbydesign-designsystem-loading-overlay.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-menu.mjs +420 -311
- package/fesm2022/kirbydesign-designsystem-menu.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-modal.mjs +2476 -1912
- package/fesm2022/kirbydesign-designsystem-modal.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-page.mjs +1526 -905
- package/fesm2022/kirbydesign-designsystem-page.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-popover.mjs +204 -169
- package/fesm2022/kirbydesign-designsystem-popover.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-progress-circle.mjs +209 -158
- package/fesm2022/kirbydesign-designsystem-progress-circle.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-radio.mjs +537 -365
- package/fesm2022/kirbydesign-designsystem-radio.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-range.mjs +207 -150
- package/fesm2022/kirbydesign-designsystem-range.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-reorder-list.mjs +217 -104
- package/fesm2022/kirbydesign-designsystem-reorder-list.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-router-outlet.mjs +113 -38
- package/fesm2022/kirbydesign-designsystem-router-outlet.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-section-header.mjs +56 -18
- package/fesm2022/kirbydesign-designsystem-section-header.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-segmented-control.mjs +276 -232
- package/fesm2022/kirbydesign-designsystem-segmented-control.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-shared-floating.mjs +328 -382
- package/fesm2022/kirbydesign-designsystem-shared-floating.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-shared-portal.mjs +73 -84
- package/fesm2022/kirbydesign-designsystem-shared-portal.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-shared.mjs +665 -531
- package/fesm2022/kirbydesign-designsystem-shared.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-slide-button.mjs +140 -91
- package/fesm2022/kirbydesign-designsystem-slide-button.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-slide.mjs +360 -158
- package/fesm2022/kirbydesign-designsystem-slide.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-spinner.mjs +90 -32
- package/fesm2022/kirbydesign-designsystem-spinner.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-tab-navigation.mjs +348 -181
- package/fesm2022/kirbydesign-designsystem-tab-navigation.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-tabs.mjs +286 -121
- package/fesm2022/kirbydesign-designsystem-tabs.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-testing-base.mjs +6234 -3164
- package/fesm2022/kirbydesign-designsystem-testing-base.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-testing-jasmine.mjs +118 -95
- package/fesm2022/kirbydesign-designsystem-testing-jasmine.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-testing-jest.mjs +128 -101
- package/fesm2022/kirbydesign-designsystem-testing-jest.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-testing.mjs +236 -243
- package/fesm2022/kirbydesign-designsystem-testing.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-toast.mjs +98 -62
- package/fesm2022/kirbydesign-designsystem-toast.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-toggle-button.mjs +155 -127
- package/fesm2022/kirbydesign-designsystem-toggle-button.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-toggle.mjs +180 -150
- package/fesm2022/kirbydesign-designsystem-toggle.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-types.mjs +39 -24
- package/fesm2022/kirbydesign-designsystem-types.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem.mjs +516 -407
- package/fesm2022/kirbydesign-designsystem.mjs.map +1 -1
- package/icons/svg/megaphone.svg +3 -0
- package/icons/svg/person-blocked.svg +3 -0
- package/icons/svg/person-check.svg +3 -0
- package/icons/svg/person-close.svg +3 -0
- package/icons/svg/person-cloud.svg +3 -0
- package/icons/svg/person-power.svg +3 -0
- package/icons/svg/person-warning.svg +3 -0
- package/icons/svg/phone-device-pin.svg +3 -0
- package/icons/svg/phone-device.svg +3 -2
- package/package.json +10 -10
- package/readme.md +37 -0
- package/types/kirbydesign-designsystem-accordion.d.ts +72 -39
- package/types/kirbydesign-designsystem-accordion.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-action-group.d.ts +46 -39
- package/types/kirbydesign-designsystem-action-group.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-avatar.d.ts +62 -26
- package/types/kirbydesign-designsystem-avatar.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-badge.d.ts +30 -19
- package/types/kirbydesign-designsystem-badge.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-button.d.ts +70 -45
- package/types/kirbydesign-designsystem-button.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-calendar.d.ts +193 -132
- package/types/kirbydesign-designsystem-calendar.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-card.d.ts +130 -66
- package/types/kirbydesign-designsystem-card.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-chart.d.ts +198 -172
- package/types/kirbydesign-designsystem-chart.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-checkbox.d.ts +102 -68
- package/types/kirbydesign-designsystem-checkbox.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-config.d.ts +17 -21
- package/types/kirbydesign-designsystem-config.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-data-table.d.ts +46 -26
- package/types/kirbydesign-designsystem-data-table.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-divider.d.ts +11 -9
- package/types/kirbydesign-designsystem-divider.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-dropdown.d.ts +219 -166
- package/types/kirbydesign-designsystem-dropdown.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-empty-state.d.ts +58 -35
- package/types/kirbydesign-designsystem-empty-state.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-fab-sheet.d.ts +34 -28
- package/types/kirbydesign-designsystem-fab-sheet.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-flag.d.ts +18 -13
- package/types/kirbydesign-designsystem-flag.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-form-field.d.ts +409 -242
- package/types/kirbydesign-designsystem-form-field.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-gesture.d.ts +41 -46
- package/types/kirbydesign-designsystem-gesture.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-header.d.ts +102 -64
- package/types/kirbydesign-designsystem-header.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-helpers-scss.d.ts +6 -8
- package/types/kirbydesign-designsystem-helpers-scss.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-helpers.d.ts +83 -97
- package/types/kirbydesign-designsystem-helpers.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-icon.d.ts +63 -59
- package/types/kirbydesign-designsystem-icon.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-item-group.d.ts +6 -9
- package/types/kirbydesign-designsystem-item-group.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-item-sliding.d.ts +30 -26
- package/types/kirbydesign-designsystem-item-sliding.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-item.d.ts +93 -54
- package/types/kirbydesign-designsystem-item.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-kirby-app.d.ts +18 -19
- package/types/kirbydesign-designsystem-kirby-app.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-list.d.ts +392 -263
- package/types/kirbydesign-designsystem-list.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-loading-overlay.d.ts +35 -24
- package/types/kirbydesign-designsystem-loading-overlay.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-menu.d.ts +119 -69
- package/types/kirbydesign-designsystem-menu.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-modal.d.ts +578 -455
- package/types/kirbydesign-designsystem-modal.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-page.d.ts +308 -226
- package/types/kirbydesign-designsystem-page.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-popover.d.ts +48 -40
- package/types/kirbydesign-designsystem-popover.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-progress-circle.d.ts +59 -61
- package/types/kirbydesign-designsystem-progress-circle.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-radio.d.ts +147 -98
- package/types/kirbydesign-designsystem-radio.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-range.d.ts +90 -45
- package/types/kirbydesign-designsystem-range.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-reorder-list.d.ts +44 -32
- package/types/kirbydesign-designsystem-reorder-list.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-router-outlet.d.ts +23 -18
- package/types/kirbydesign-designsystem-router-outlet.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-section-header.d.ts +5 -8
- package/types/kirbydesign-designsystem-section-header.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-segmented-control.d.ts +123 -100
- package/types/kirbydesign-designsystem-segmented-control.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-shared-floating.d.ts +183 -128
- package/types/kirbydesign-designsystem-shared-floating.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-shared-portal.d.ts +29 -28
- package/types/kirbydesign-designsystem-shared-portal.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-shared.d.ts +143 -139
- package/types/kirbydesign-designsystem-shared.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-slide-button.d.ts +43 -34
- package/types/kirbydesign-designsystem-slide-button.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-slide.d.ts +80 -59
- package/types/kirbydesign-designsystem-slide.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-spinner.d.ts +13 -14
- package/types/kirbydesign-designsystem-spinner.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-tab-navigation.d.ts +78 -55
- package/types/kirbydesign-designsystem-tab-navigation.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-tabs.d.ts +50 -45
- package/types/kirbydesign-designsystem-tabs.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-testing-base.d.ts +2435 -815
- package/types/kirbydesign-designsystem-testing-base.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-testing-jasmine.d.ts +9 -10
- package/types/kirbydesign-designsystem-testing-jasmine.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-testing-jest.d.ts +9 -10
- package/types/kirbydesign-designsystem-testing-jest.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-testing.d.ts +52 -58
- package/types/kirbydesign-designsystem-testing.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-toast.d.ts +25 -31
- package/types/kirbydesign-designsystem-toast.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-toggle-button.d.ts +62 -56
- package/types/kirbydesign-designsystem-toggle-button.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-toggle.d.ts +71 -63
- package/types/kirbydesign-designsystem-toggle.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-types.d.ts +15 -22
- package/types/kirbydesign-designsystem-types.d.ts.map +1 -1
- package/types/kirbydesign-designsystem.d.ts +135 -123
- package/types/kirbydesign-designsystem.d.ts.map +1 -1
- package/accordion/package.json +0 -4
- package/action-group/package.json +0 -4
- package/avatar/package.json +0 -4
- package/badge/package.json +0 -4
- package/button/package.json +0 -4
- package/calendar/package.json +0 -4
- package/card/package.json +0 -4
- package/chart/package.json +0 -4
- package/checkbox/package.json +0 -4
- package/config/package.json +0 -4
- package/data-table/package.json +0 -4
- package/divider/package.json +0 -4
- package/dropdown/package.json +0 -4
- package/empty-state/package.json +0 -4
- package/fab-sheet/package.json +0 -4
- package/flag/package.json +0 -4
- package/form-field/package.json +0 -4
- package/gesture/package.json +0 -4
- package/header/package.json +0 -4
- package/helpers/package.json +0 -4
- package/helpers/scss/package.json +0 -4
- package/icon/package.json +0 -4
- package/item/package.json +0 -4
- package/item-group/package.json +0 -4
- package/item-sliding/package.json +0 -4
- package/kirby-app/package.json +0 -4
- package/list/package.json +0 -4
- package/loading-overlay/package.json +0 -4
- package/menu/package.json +0 -4
- package/modal/package.json +0 -4
- package/page/package.json +0 -4
- package/popover/package.json +0 -4
- package/progress-circle/package.json +0 -4
- package/radio/package.json +0 -4
- package/range/package.json +0 -4
- package/reorder-list/package.json +0 -4
- package/router-outlet/package.json +0 -4
- package/section-header/package.json +0 -4
- package/segmented-control/package.json +0 -4
- package/shared/floating/package.json +0 -4
- package/shared/package.json +0 -4
- package/shared/portal/package.json +0 -4
- package/slide/package.json +0 -4
- package/slide-button/package.json +0 -4
- package/spinner/package.json +0 -4
- package/tab-navigation/package.json +0 -4
- package/tabs/package.json +0 -4
- package/testing/package.json +0 -4
- package/testing-base/package.json +0 -4
- package/testing-jasmine/package.json +0 -4
- package/testing-jest/package.json +0 -4
- package/toast/package.json +0 -4
- package/toggle/package.json +0 -4
- package/toggle-button/package.json +0 -4
- package/types/package.json +0 -4
|
@@ -1,1919 +1,2483 @@
|
|
|
1
|
-
import * as i0 from
|
|
2
|
-
import {
|
|
3
|
-
import * as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { debounceTime,
|
|
7
|
-
import * as i3 from
|
|
8
|
-
import {
|
|
9
|
-
import * as
|
|
10
|
-
import { CommonModule } from
|
|
11
|
-
import { IconComponent } from
|
|
12
|
-
import { ButtonComponent } from
|
|
13
|
-
import * as i1$1 from
|
|
14
|
-
import {
|
|
15
|
-
import * as i1
|
|
16
|
-
import { ThemeColorDirective, inheritAriaLabelText } from
|
|
17
|
-
import * as i1 from
|
|
18
|
-
import { EmptyStateComponent } from
|
|
19
|
-
import { CardComponent, CardHeaderComponent } from
|
|
20
|
-
|
|
21
|
-
class Modal {
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* WARNING: This is for internal use only and should not be used outside of Kirby.
|
|
25
|
-
*/
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { ChangeDetectionStrategy, Component, ContentChild, ElementRef, EventEmitter, HostBinding, HostListener, Inject, Injectable, InjectionToken, Injector, Input, Optional, Output, RendererStyleFlags2, TemplateRef, ViewChild, ViewChildren, inject } from "@angular/core";
|
|
3
|
+
import * as i5 from "@angular/router";
|
|
4
|
+
import { NavigationEnd, NavigationStart, ROUTES, RouterModule, RouterOutlet } from "@angular/router";
|
|
5
|
+
import { EMPTY, Subject, defer, firstValueFrom, fromEvent, isObservable, merge, of } from "rxjs";
|
|
6
|
+
import { debounceTime, filter, first, map, pairwise, skipUntil, startWith, takeUntil } from "rxjs/operators";
|
|
7
|
+
import * as i3 from "@kirbydesign/designsystem/helpers";
|
|
8
|
+
import { DesignTokenHelper, KirbyAnimation, getIonModalDialogAncestor, observeContent } from "@kirbydesign/designsystem/helpers";
|
|
9
|
+
import * as i2 from "@angular/common";
|
|
10
|
+
import { CommonModule } from "@angular/common";
|
|
11
|
+
import { IconComponent } from "@kirbydesign/designsystem/icon";
|
|
12
|
+
import { ButtonComponent } from "@kirbydesign/designsystem/button";
|
|
13
|
+
import * as i1$1 from "@ionic/angular";
|
|
14
|
+
import { IonButtons, IonContent, IonFooter, IonHeader, IonModal, IonTitle, IonToolbar, ModalController as ModalController$1, createAnimation } from "@ionic/angular";
|
|
15
|
+
import * as i1 from "@kirbydesign/designsystem/shared";
|
|
16
|
+
import { ThemeColorDirective, inheritAriaLabelText } from "@kirbydesign/designsystem/shared";
|
|
17
|
+
import * as i1$2 from "@kirbydesign/designsystem/types";
|
|
18
|
+
import { EmptyStateComponent } from "@kirbydesign/designsystem/empty-state";
|
|
19
|
+
import { CardComponent, CardHeaderComponent } from "@kirbydesign/designsystem/card";
|
|
20
|
+
var Modal = class {};
|
|
26
21
|
var ModalElementType;
|
|
27
|
-
(function
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
22
|
+
(function(ModalElementType) {
|
|
23
|
+
ModalElementType[ModalElementType["PAGE_PROGRESS"] = 0] = "PAGE_PROGRESS";
|
|
24
|
+
ModalElementType[ModalElementType["FOOTER"] = 1] = "FOOTER";
|
|
25
|
+
ModalElementType[ModalElementType["TITLE"] = 2] = "TITLE";
|
|
31
26
|
})(ModalElementType || (ModalElementType = {}));
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
i0.ɵɵ
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
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
|
-
|
|
27
|
+
var ModalElementsAdvertiser = class {};
|
|
28
|
+
var ModalElementComponent = class ModalElementComponent {
|
|
29
|
+
get isContainedInModal() {
|
|
30
|
+
return this.modalElementsAdvertiser !== null;
|
|
31
|
+
}
|
|
32
|
+
constructor(modalElementType, elementRef, modalElementsAdvertiser) {
|
|
33
|
+
this.modalElementType = modalElementType;
|
|
34
|
+
this.elementRef = elementRef;
|
|
35
|
+
this.modalElementsAdvertiser = modalElementsAdvertiser;
|
|
36
|
+
}
|
|
37
|
+
ngAfterViewInit() {
|
|
38
|
+
if (this.isContainedInModal) this.modalElementsAdvertiser.addModalElement(this.modalElementType, this.elementRef);
|
|
39
|
+
}
|
|
40
|
+
ngOnDestroy() {
|
|
41
|
+
if (this.isContainedInModal) this.modalElementsAdvertiser.removeModalElement(this.modalElementType, this.elementRef);
|
|
42
|
+
}
|
|
43
|
+
static {
|
|
44
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
45
|
+
minVersion: "12.0.0",
|
|
46
|
+
version: "22.2.3",
|
|
47
|
+
ngImport: i0,
|
|
48
|
+
type: ModalElementComponent,
|
|
49
|
+
deps: [
|
|
50
|
+
{ token: ModalElementType },
|
|
51
|
+
{ token: i0.ElementRef },
|
|
52
|
+
{
|
|
53
|
+
token: ModalElementsAdvertiser,
|
|
54
|
+
optional: true
|
|
55
|
+
}
|
|
56
|
+
],
|
|
57
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
static {
|
|
61
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
62
|
+
minVersion: "14.0.0",
|
|
63
|
+
version: "22.2.3",
|
|
64
|
+
type: ModalElementComponent,
|
|
65
|
+
isStandalone: false,
|
|
66
|
+
selector: "ng-component",
|
|
67
|
+
ngImport: i0,
|
|
68
|
+
template: "",
|
|
69
|
+
isInline: true,
|
|
70
|
+
changeDetection: i0.ChangeDetectionStrategy.Eager
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
75
|
+
minVersion: "12.0.0",
|
|
76
|
+
version: "22.2.3",
|
|
77
|
+
ngImport: i0,
|
|
78
|
+
type: ModalElementComponent,
|
|
79
|
+
decorators: [{
|
|
80
|
+
type: Component,
|
|
81
|
+
args: [{
|
|
82
|
+
template: "",
|
|
83
|
+
standalone: false,
|
|
84
|
+
changeDetection: ChangeDetectionStrategy.Eager
|
|
85
|
+
}]
|
|
86
|
+
}],
|
|
87
|
+
ctorParameters: () => [
|
|
88
|
+
{ type: ModalElementType },
|
|
89
|
+
{ type: i0.ElementRef },
|
|
90
|
+
{
|
|
91
|
+
type: ModalElementsAdvertiser,
|
|
92
|
+
decorators: [{ type: Optional }]
|
|
93
|
+
}
|
|
94
|
+
]
|
|
95
|
+
});
|
|
96
|
+
const COMPONENT_PROPS = new InjectionToken("componentProps");
|
|
97
|
+
var ModalElementsMoverDelegate = class {
|
|
98
|
+
constructor(renderer, elementRef) {
|
|
99
|
+
this.renderer = renderer;
|
|
100
|
+
this.elementRef = elementRef;
|
|
101
|
+
}
|
|
102
|
+
addFooter(footerElementRef) {
|
|
103
|
+
this.moveChild(footerElementRef, this.elementRef);
|
|
104
|
+
}
|
|
105
|
+
removeFooter(footerElementRef) {
|
|
106
|
+
this.removeChild(footerElementRef);
|
|
107
|
+
}
|
|
108
|
+
addPageProgress(pageProgressElementRef, ionToolbarElement) {
|
|
109
|
+
this.moveChild(pageProgressElementRef, ionToolbarElement);
|
|
110
|
+
}
|
|
111
|
+
removePageProgress(pageProgressElementRef) {
|
|
112
|
+
this.removeChild(pageProgressElementRef);
|
|
113
|
+
}
|
|
114
|
+
addTitle(titleElementRef, contentTitleElement, hasCollapsibleTitle, ionTitleElement) {
|
|
115
|
+
this.moveChild(titleElementRef, ionTitleElement);
|
|
116
|
+
if (hasCollapsibleTitle) {
|
|
117
|
+
const titleElementClone = titleElementRef.nativeElement.cloneNode(true);
|
|
118
|
+
this.moveChild(new ElementRef(titleElementClone), contentTitleElement);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
removeTitle(titleElementRef, hasCollapsibleTitle, contentTitleElement) {
|
|
122
|
+
this.removeChild(titleElementRef);
|
|
123
|
+
if (hasCollapsibleTitle) {
|
|
124
|
+
const kirbyPageTitleElement = contentTitleElement.nativeElement.querySelector("kirby-page-title");
|
|
125
|
+
this.removeChild(new ElementRef(kirbyPageTitleElement));
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
moveChild(childElementRef, newParentElementRef) {
|
|
129
|
+
const child = childElementRef.nativeElement;
|
|
130
|
+
const newParent = newParentElementRef.nativeElement;
|
|
131
|
+
this.renderer.removeChild(child.parentElement, child);
|
|
132
|
+
this.renderer.appendChild(newParent, child);
|
|
133
|
+
}
|
|
134
|
+
removeChild(childElementRef, parentElement) {
|
|
135
|
+
const child = childElementRef.nativeElement;
|
|
136
|
+
if (child) this.renderer.removeChild(parentElement || child.parentElement, child);
|
|
137
|
+
}
|
|
138
|
+
};
|
|
139
|
+
var AlertComponent = class AlertComponent {
|
|
140
|
+
set title(title) {
|
|
141
|
+
this.title$ = typeof title === "string" ? of(title) : title;
|
|
142
|
+
}
|
|
143
|
+
set message(message) {
|
|
144
|
+
this.message$ = typeof message === "string" ? of(message) : message;
|
|
145
|
+
}
|
|
146
|
+
set okBtn(okBtn) {
|
|
147
|
+
this.okBtn$ = typeof okBtn === "string" ? of(okBtn) : okBtn;
|
|
148
|
+
}
|
|
149
|
+
set cancelBtn(cancelBtn) {
|
|
150
|
+
this.cancelBtn$ = typeof cancelBtn === "string" ? of(cancelBtn) : cancelBtn;
|
|
151
|
+
}
|
|
152
|
+
constructor(elementRef, windowRef) {
|
|
153
|
+
this.elementRef = elementRef;
|
|
154
|
+
this.windowRef = windowRef;
|
|
155
|
+
this.BLUR_WRAPPER_DELAY_IN_MS = 50;
|
|
156
|
+
this.scrollY = Math.abs(this.windowRef.nativeWindow.scrollY);
|
|
157
|
+
}
|
|
158
|
+
ngAfterViewInit() {
|
|
159
|
+
setTimeout(() => {
|
|
160
|
+
this.alertWrapper.nativeElement.focus();
|
|
161
|
+
this.alertWrapper.nativeElement.blur();
|
|
162
|
+
}, this.BLUR_WRAPPER_DELAY_IN_MS);
|
|
163
|
+
}
|
|
164
|
+
onFocusChange() {
|
|
165
|
+
this.windowRef.nativeWindow.scrollTo({ top: this.scrollY });
|
|
166
|
+
}
|
|
167
|
+
onCancel() {
|
|
168
|
+
this.elementRef.nativeElement.closest("ion-modal")?.dismiss(false);
|
|
169
|
+
}
|
|
170
|
+
onOk() {
|
|
171
|
+
this.elementRef.nativeElement.closest("ion-modal")?.dismiss(true);
|
|
172
|
+
}
|
|
173
|
+
static {
|
|
174
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
175
|
+
minVersion: "12.0.0",
|
|
176
|
+
version: "22.2.3",
|
|
177
|
+
ngImport: i0,
|
|
178
|
+
type: AlertComponent,
|
|
179
|
+
deps: [{ token: i0.ElementRef }, { token: i1$2.WindowRef }],
|
|
180
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
static {
|
|
184
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
185
|
+
minVersion: "17.0.0",
|
|
186
|
+
version: "22.2.3",
|
|
187
|
+
type: AlertComponent,
|
|
188
|
+
isStandalone: true,
|
|
189
|
+
selector: "kirby-alert",
|
|
190
|
+
inputs: {
|
|
191
|
+
title: "title",
|
|
192
|
+
message: "message",
|
|
193
|
+
iconName: "iconName",
|
|
194
|
+
iconThemeColor: "iconThemeColor",
|
|
195
|
+
okBtn: "okBtn",
|
|
196
|
+
okBtnIsDestructive: "okBtnIsDestructive",
|
|
197
|
+
cancelBtn: "cancelBtn"
|
|
198
|
+
},
|
|
199
|
+
host: { properties: { "class.ion-page": "false" } },
|
|
200
|
+
viewQueries: [{
|
|
201
|
+
propertyName: "alertWrapper",
|
|
202
|
+
first: true,
|
|
203
|
+
predicate: ["alertWrapper"],
|
|
204
|
+
descendants: true,
|
|
205
|
+
static: true
|
|
206
|
+
}],
|
|
207
|
+
ngImport: i0,
|
|
208
|
+
template: "<article #alertWrapper>\n <kirby-empty-state\n [iconName]=\"iconName\"\n [themeColor]=\"iconThemeColor\"\n [title]=\"title$ | async\"\n [subtitle]=\"message$ | async\"\n ></kirby-empty-state>\n <div class=\"buttongroup\">\n @if (cancelBtn$ | async; as cancelBtn) {\n <button kirby-button attentionLevel=\"3\" class=\"cancel-btn\" (click)=\"onCancel()\">\n {{ cancelBtn }}\n </button>\n }\n <button\n kirby-button\n [size]=\"(cancelBtn$ | async) ? null : 'lg'\"\n attentionLevel=\"1\"\n class=\"ok-btn\"\n [class.destructive]=\"okBtnIsDestructive\"\n (click)=\"onOk()\"\n >\n {{ okBtn$ | async }}\n </button>\n </div>\n</article>\n",
|
|
209
|
+
styles: [".kirby-line-clamp{display:-webkit-box;-webkit-line-clamp:var(--line-clamp, none);-webkit-box-orient:vertical;overflow:hidden}article{overflow:hidden;padding:var(--kirby-spacing-s);padding-top:var(--kirby-spacing-m);color:var(--kirby-color-content-base)}@media(max-width:320px){article{padding:var(--kirby-spacing-xxs)}}.buttongroup{display:flex;justify-content:center;column-gap:var(--kirby-spacing-xxs);flex-wrap:wrap}.buttongroup button{flex:0 1 calc(50% - var(--kirby-spacing-xxs) / 2);margin-inline:0}.buttongroup button:not(:only-child){flex-grow:1;min-width:unset}\n"],
|
|
210
|
+
dependencies: [
|
|
211
|
+
{
|
|
212
|
+
kind: "component",
|
|
213
|
+
type: EmptyStateComponent,
|
|
214
|
+
selector: "kirby-empty-state",
|
|
215
|
+
inputs: [
|
|
216
|
+
"iconName",
|
|
217
|
+
"title",
|
|
218
|
+
"subtitle",
|
|
219
|
+
"themeColor"
|
|
220
|
+
]
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
kind: "component",
|
|
224
|
+
type: ButtonComponent,
|
|
225
|
+
selector: "button[kirby-button],Button[kirby-button],a[kirby-button]",
|
|
226
|
+
inputs: [
|
|
227
|
+
"attentionLevel",
|
|
228
|
+
"noDecoration",
|
|
229
|
+
"themeColor",
|
|
230
|
+
"expand",
|
|
231
|
+
"isFloating",
|
|
232
|
+
"size",
|
|
233
|
+
"showIconOnly"
|
|
234
|
+
]
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
kind: "ngmodule",
|
|
238
|
+
type: CommonModule
|
|
239
|
+
},
|
|
240
|
+
{
|
|
241
|
+
kind: "directive",
|
|
242
|
+
type: ThemeColorDirective,
|
|
243
|
+
selector: "kirby-avatar[themeColor], kirby-card[themeColor], kirby-icon[themeColor], kirby-progress-circle-ring[themeColor], kirby-modal-footer[themeColor], kirby-empty-state[themeColor]",
|
|
244
|
+
inputs: ["themeColor"]
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
kind: "pipe",
|
|
248
|
+
type: i2.AsyncPipe,
|
|
249
|
+
name: "async"
|
|
250
|
+
}
|
|
251
|
+
],
|
|
252
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
253
|
+
});
|
|
254
|
+
}
|
|
255
|
+
};
|
|
256
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
257
|
+
minVersion: "12.0.0",
|
|
258
|
+
version: "22.2.3",
|
|
259
|
+
ngImport: i0,
|
|
260
|
+
type: AlertComponent,
|
|
261
|
+
decorators: [{
|
|
262
|
+
type: Component,
|
|
263
|
+
args: [{
|
|
264
|
+
imports: [
|
|
265
|
+
IconComponent,
|
|
266
|
+
EmptyStateComponent,
|
|
267
|
+
ButtonComponent,
|
|
268
|
+
CommonModule,
|
|
269
|
+
ThemeColorDirective
|
|
270
|
+
],
|
|
271
|
+
selector: "kirby-alert",
|
|
272
|
+
host: { "[class.ion-page]": "false" },
|
|
273
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
274
|
+
template: "<article #alertWrapper>\n <kirby-empty-state\n [iconName]=\"iconName\"\n [themeColor]=\"iconThemeColor\"\n [title]=\"title$ | async\"\n [subtitle]=\"message$ | async\"\n ></kirby-empty-state>\n <div class=\"buttongroup\">\n @if (cancelBtn$ | async; as cancelBtn) {\n <button kirby-button attentionLevel=\"3\" class=\"cancel-btn\" (click)=\"onCancel()\">\n {{ cancelBtn }}\n </button>\n }\n <button\n kirby-button\n [size]=\"(cancelBtn$ | async) ? null : 'lg'\"\n attentionLevel=\"1\"\n class=\"ok-btn\"\n [class.destructive]=\"okBtnIsDestructive\"\n (click)=\"onOk()\"\n >\n {{ okBtn$ | async }}\n </button>\n </div>\n</article>\n",
|
|
275
|
+
styles: [".kirby-line-clamp{display:-webkit-box;-webkit-line-clamp:var(--line-clamp, none);-webkit-box-orient:vertical;overflow:hidden}article{overflow:hidden;padding:var(--kirby-spacing-s);padding-top:var(--kirby-spacing-m);color:var(--kirby-color-content-base)}@media(max-width:320px){article{padding:var(--kirby-spacing-xxs)}}.buttongroup{display:flex;justify-content:center;column-gap:var(--kirby-spacing-xxs);flex-wrap:wrap}.buttongroup button{flex:0 1 calc(50% - var(--kirby-spacing-xxs) / 2);margin-inline:0}.buttongroup button:not(:only-child){flex-grow:1;min-width:unset}\n"]
|
|
276
|
+
}]
|
|
277
|
+
}],
|
|
278
|
+
ctorParameters: () => [{ type: i0.ElementRef }, { type: i1$2.WindowRef }],
|
|
279
|
+
propDecorators: {
|
|
280
|
+
alertWrapper: [{
|
|
281
|
+
type: ViewChild,
|
|
282
|
+
args: ["alertWrapper", { static: true }]
|
|
283
|
+
}],
|
|
284
|
+
title: [{ type: Input }],
|
|
285
|
+
message: [{ type: Input }],
|
|
286
|
+
iconName: [{ type: Input }],
|
|
287
|
+
iconThemeColor: [{ type: Input }],
|
|
288
|
+
okBtn: [{ type: Input }],
|
|
289
|
+
okBtnIsDestructive: [{ type: Input }],
|
|
290
|
+
cancelBtn: [{ type: Input }]
|
|
291
|
+
}
|
|
292
|
+
});
|
|
293
|
+
var AlertHelper = class AlertHelper {
|
|
294
|
+
constructor(ionicModalController) {
|
|
295
|
+
this.ionicModalController = ionicModalController;
|
|
296
|
+
}
|
|
297
|
+
async showAlert(config) {
|
|
298
|
+
const ionModal = await this.ionicModalController.create({
|
|
299
|
+
component: AlertComponent,
|
|
300
|
+
componentProps: this.getComponentProps(config),
|
|
301
|
+
cssClass: ["kirby-overlay", "kirby-alert"],
|
|
302
|
+
mode: "ios",
|
|
303
|
+
backdropDismiss: false
|
|
304
|
+
});
|
|
305
|
+
await ionModal.present();
|
|
306
|
+
return {
|
|
307
|
+
dismiss: ionModal.dismiss.bind(ionModal),
|
|
308
|
+
onWillDismiss: ionModal.onWillDismiss(),
|
|
309
|
+
onDidDismiss: ionModal.onDidDismiss()
|
|
310
|
+
};
|
|
311
|
+
}
|
|
312
|
+
getComponentProps(config) {
|
|
313
|
+
return {
|
|
314
|
+
...config,
|
|
315
|
+
okBtn: this.getOkBtn(config),
|
|
316
|
+
okBtnIsDestructive: this.getOkBtnIsDestructive(config),
|
|
317
|
+
iconName: config.icon && config.icon.name,
|
|
318
|
+
iconThemeColor: config.icon && config.icon.themeColor
|
|
319
|
+
};
|
|
320
|
+
}
|
|
321
|
+
getOkBtn(config) {
|
|
322
|
+
let text;
|
|
323
|
+
if (config.okBtn) {
|
|
324
|
+
if (typeof config.okBtn === "string" || isObservable(config.okBtn)) text = config.okBtn;
|
|
325
|
+
else text = config.okBtn?.text;
|
|
326
|
+
}
|
|
327
|
+
return text;
|
|
328
|
+
}
|
|
329
|
+
getOkBtnIsDestructive(config) {
|
|
330
|
+
return typeof config.okBtn === "object" ? config.okBtn.isDestructive : void 0;
|
|
331
|
+
}
|
|
332
|
+
static {
|
|
333
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
334
|
+
minVersion: "12.0.0",
|
|
335
|
+
version: "22.2.3",
|
|
336
|
+
ngImport: i0,
|
|
337
|
+
type: AlertHelper,
|
|
338
|
+
deps: [{ token: i1$1.ModalController }],
|
|
339
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
340
|
+
});
|
|
341
|
+
}
|
|
342
|
+
static {
|
|
343
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
344
|
+
minVersion: "12.0.0",
|
|
345
|
+
version: "22.2.3",
|
|
346
|
+
ngImport: i0,
|
|
347
|
+
type: AlertHelper
|
|
348
|
+
});
|
|
349
|
+
}
|
|
350
|
+
};
|
|
351
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
352
|
+
minVersion: "12.0.0",
|
|
353
|
+
version: "22.2.3",
|
|
354
|
+
ngImport: i0,
|
|
355
|
+
type: AlertHelper,
|
|
356
|
+
decorators: [{ type: Injectable }],
|
|
357
|
+
ctorParameters: () => [{ type: i1$1.ModalController }]
|
|
358
|
+
});
|
|
359
|
+
var CanDismissHelper = class CanDismissHelper {
|
|
360
|
+
constructor(alertHelper) {
|
|
361
|
+
this.alertHelper = alertHelper;
|
|
362
|
+
}
|
|
363
|
+
getCanDismissCallback(callback) {
|
|
364
|
+
return async () => {
|
|
365
|
+
const result = await callback();
|
|
366
|
+
if (typeof result === "boolean") return result;
|
|
367
|
+
return await this.showAlert(result);
|
|
368
|
+
};
|
|
369
|
+
}
|
|
370
|
+
async showAlert(config) {
|
|
371
|
+
return (await (await this.alertHelper.showAlert(config)).onWillDismiss).data;
|
|
372
|
+
}
|
|
373
|
+
static {
|
|
374
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
375
|
+
minVersion: "12.0.0",
|
|
376
|
+
version: "22.2.3",
|
|
377
|
+
ngImport: i0,
|
|
378
|
+
type: CanDismissHelper,
|
|
379
|
+
deps: [{ token: AlertHelper }],
|
|
380
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
381
|
+
});
|
|
382
|
+
}
|
|
383
|
+
static {
|
|
384
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
385
|
+
minVersion: "12.0.0",
|
|
386
|
+
version: "22.2.3",
|
|
387
|
+
ngImport: i0,
|
|
388
|
+
type: CanDismissHelper
|
|
389
|
+
});
|
|
390
|
+
}
|
|
391
|
+
};
|
|
392
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
393
|
+
minVersion: "12.0.0",
|
|
394
|
+
version: "22.2.3",
|
|
395
|
+
ngImport: i0,
|
|
396
|
+
type: CanDismissHelper,
|
|
397
|
+
decorators: [{ type: Injectable }],
|
|
398
|
+
ctorParameters: () => [{ type: AlertHelper }]
|
|
399
|
+
});
|
|
272
400
|
const contentScrollDebounceTimeInMS = 10;
|
|
273
401
|
const contentScrolledOffsetInPixels = 4;
|
|
274
|
-
class ModalWrapperComponent {
|
|
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
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
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
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
402
|
+
var ModalWrapperComponent = class ModalWrapperComponent {
|
|
403
|
+
get _hasCollapsibleTitle() {
|
|
404
|
+
return !!this.config?.collapseTitle;
|
|
405
|
+
}
|
|
406
|
+
static {
|
|
407
|
+
this.KEYBOARD_HIDE_DELAY_IN_MS = 100;
|
|
408
|
+
}
|
|
409
|
+
set scrollDisabled(disabled) {
|
|
410
|
+
this.ionContent.scrollY = !disabled;
|
|
411
|
+
}
|
|
412
|
+
set canDismiss(callback) {
|
|
413
|
+
this.ionModalElement.canDismiss = this.canDismissHelper.getCanDismissCallback(callback);
|
|
414
|
+
}
|
|
415
|
+
get contentTitleElement() {
|
|
416
|
+
if (!this._contentTitleElement && this._hasCollapsibleTitle) this.changeDetector.detectChanges();
|
|
417
|
+
return this._contentTitleElement;
|
|
418
|
+
}
|
|
419
|
+
get intersectionObserver() {
|
|
420
|
+
if (!this._intersectionObserver) this._intersectionObserver = this.createModalWrapperIntersectionObserver();
|
|
421
|
+
return this._intersectionObserver;
|
|
422
|
+
}
|
|
423
|
+
get _isDrawer() {
|
|
424
|
+
return this.config.flavor === "drawer";
|
|
425
|
+
}
|
|
426
|
+
constructor(changeDetector, injector, elementRef, renderer, zone, resizeObserverService, windowRef, platform, canDismissHelper, environmentInjector, translations) {
|
|
427
|
+
this.changeDetector = changeDetector;
|
|
428
|
+
this.injector = injector;
|
|
429
|
+
this.elementRef = elementRef;
|
|
430
|
+
this.renderer = renderer;
|
|
431
|
+
this.zone = zone;
|
|
432
|
+
this.resizeObserverService = resizeObserverService;
|
|
433
|
+
this.windowRef = windowRef;
|
|
434
|
+
this.platform = platform;
|
|
435
|
+
this.canDismissHelper = canDismissHelper;
|
|
436
|
+
this.environmentInjector = environmentInjector;
|
|
437
|
+
this.translations = translations;
|
|
438
|
+
this.scrollY = Math.abs(this.windowRef.nativeWindow.scrollY);
|
|
439
|
+
this.VIEWPORT_RESIZE_DEBOUNCE_TIME = 100;
|
|
440
|
+
this.keyboardVisible = false;
|
|
441
|
+
this.toolbarButtons = [];
|
|
442
|
+
this.delayedClose = () => {};
|
|
443
|
+
this.viewportResized = false;
|
|
444
|
+
this.ionModalDidPresent = new Subject();
|
|
445
|
+
this.didPresent = firstValueFrom(this.ionModalDidPresent);
|
|
446
|
+
this.ionModalWillDismiss = new Subject();
|
|
447
|
+
this.willClose = firstValueFrom(this.ionModalWillDismiss);
|
|
448
|
+
this.viewportResize = new Subject();
|
|
449
|
+
this.viewportResize$ = this.viewportResize.asObservable().pipe(debounceTime(this.VIEWPORT_RESIZE_DEBOUNCE_TIME));
|
|
450
|
+
this.destroy$ = new Subject();
|
|
451
|
+
this.willClose$ = this.ionModalWillDismiss.pipe(first());
|
|
452
|
+
this._currentFooter = null;
|
|
453
|
+
this.setAriaLabelFromTitleContent = () => {
|
|
454
|
+
const titleTextContent = this.ionTitleElement?.nativeElement.textContent;
|
|
455
|
+
if (this.ionModalDialog && titleTextContent) this.renderer.setAttribute(this.ionModalDialog, "aria-label", titleTextContent);
|
|
456
|
+
};
|
|
457
|
+
this.setViewportHeight();
|
|
458
|
+
this.observeViewportResize();
|
|
459
|
+
this.modalElementsMoverDelegate = new ModalElementsMoverDelegate(renderer, elementRef);
|
|
460
|
+
}
|
|
461
|
+
ngOnInit() {
|
|
462
|
+
this.ionModalElement = this.elementRef.nativeElement.closest("ion-modal");
|
|
463
|
+
this.ionModalDialog = getIonModalDialogAncestor(this.elementRef.nativeElement);
|
|
464
|
+
this.initializeSizing();
|
|
465
|
+
this.initializeModalRoute();
|
|
466
|
+
this.listenForIonModalDidPresent();
|
|
467
|
+
this.listenForIonModalWillDismiss();
|
|
468
|
+
this.listenForScroll();
|
|
469
|
+
this.initializeResizeModalToModalWrapper();
|
|
470
|
+
this.focusTitleOnDidPresent();
|
|
471
|
+
this.componentPropsInjector = Injector.create({
|
|
472
|
+
providers: [{
|
|
473
|
+
provide: COMPONENT_PROPS,
|
|
474
|
+
useValue: this.config.componentProps
|
|
475
|
+
}],
|
|
476
|
+
parent: this.injector
|
|
477
|
+
});
|
|
478
|
+
this.modalWrapperInjector = Injector.create({
|
|
479
|
+
providers: [{
|
|
480
|
+
provide: ModalElementsAdvertiser,
|
|
481
|
+
useExisting: ModalWrapperComponent
|
|
482
|
+
}],
|
|
483
|
+
parent: this.injector
|
|
484
|
+
});
|
|
485
|
+
}
|
|
486
|
+
ngAfterViewInit() {
|
|
487
|
+
if (this.toolbarButtonsQuery) this.toolbarButtons = this.toolbarButtonsQuery.map((buttonRef) => buttonRef.nativeElement);
|
|
488
|
+
this.setAriaLabel();
|
|
489
|
+
}
|
|
490
|
+
set currentFooter(footer) {
|
|
491
|
+
if (this._currentFooter) this.resizeObserverService.unobserve(this._currentFooter);
|
|
492
|
+
this._currentFooter = footer;
|
|
493
|
+
if (footer !== null) this.resizeObserverService.observe(footer, (entry) => {
|
|
494
|
+
const [property, pixelValue] = ["--footer-height", `${Math.floor(entry.contentRect.height)}px`];
|
|
495
|
+
this.setCssVar(this.elementRef.nativeElement, property, pixelValue);
|
|
496
|
+
});
|
|
497
|
+
}
|
|
498
|
+
get currentFooter() {
|
|
499
|
+
return this._currentFooter;
|
|
500
|
+
}
|
|
501
|
+
addModalElement(type, modalElement) {
|
|
502
|
+
const addModalElementFn = {
|
|
503
|
+
[ModalElementType.FOOTER]: () => {
|
|
504
|
+
this.modalElementsMoverDelegate.addFooter(modalElement);
|
|
505
|
+
this.currentFooter = modalElement.nativeElement;
|
|
506
|
+
},
|
|
507
|
+
[ModalElementType.TITLE]: () => this.modalElementsMoverDelegate.addTitle(modalElement, this.contentTitleElement, this._hasCollapsibleTitle, this.ionTitleElement),
|
|
508
|
+
[ModalElementType.PAGE_PROGRESS]: () => this.modalElementsMoverDelegate.addPageProgress(modalElement, this.ionToolbarElement)
|
|
509
|
+
}[type];
|
|
510
|
+
addModalElementFn();
|
|
511
|
+
}
|
|
512
|
+
removeModalElement(type, modalElement) {
|
|
513
|
+
const removeModalElementFn = {
|
|
514
|
+
[ModalElementType.FOOTER]: () => {
|
|
515
|
+
this.modalElementsMoverDelegate.removeFooter(modalElement);
|
|
516
|
+
this.currentFooter = null;
|
|
517
|
+
},
|
|
518
|
+
[ModalElementType.TITLE]: () => this.modalElementsMoverDelegate.removeTitle(modalElement, this._hasCollapsibleTitle, this.contentTitleElement),
|
|
519
|
+
[ModalElementType.PAGE_PROGRESS]: () => this.modalElementsMoverDelegate.removePageProgress(modalElement)
|
|
520
|
+
}[type];
|
|
521
|
+
removeModalElementFn();
|
|
522
|
+
}
|
|
523
|
+
initializeResizeModalToModalWrapper() {
|
|
524
|
+
if (this.config.flavor === "drawer" && this.config.interactWithBackground) merge(this.ionModalDidPresent, this.viewportResize$).pipe(takeUntil(this.destroy$)).subscribe(() => {
|
|
525
|
+
setTimeout(() => {
|
|
526
|
+
const domRect = this.elementRef.nativeElement.getBoundingClientRect();
|
|
527
|
+
const right = this.windowRef.nativeWindow.document.documentElement.clientWidth - domRect.right;
|
|
528
|
+
this.renderer.setStyle(this.ionModalElement, "top", `${domRect.top}px`);
|
|
529
|
+
this.renderer.setStyle(this.ionModalElement, "left", `${domRect.left}px`);
|
|
530
|
+
this.renderer.setStyle(this.ionModalElement, "right", `${right}px`);
|
|
531
|
+
});
|
|
532
|
+
});
|
|
533
|
+
}
|
|
534
|
+
initializeSizing() {
|
|
535
|
+
if (this.config.size === "full-height") return;
|
|
536
|
+
this.patchScrollElementSize();
|
|
537
|
+
this.observeHeaderResize();
|
|
538
|
+
this.observeModalFullHeight();
|
|
539
|
+
}
|
|
540
|
+
initializeModalRoute() {
|
|
541
|
+
if (this.config.modalRoute) {
|
|
542
|
+
this.onSiblingModalRouteActivated(this.config.siblingModalRouteActivated$);
|
|
543
|
+
this.routerOutlet.activateWith(this.config.modalRoute, this.environmentInjector);
|
|
544
|
+
}
|
|
545
|
+
}
|
|
546
|
+
onSiblingModalRouteActivated(siblingModalRouteActivated$) {
|
|
547
|
+
if (!siblingModalRouteActivated$) return;
|
|
548
|
+
siblingModalRouteActivated$.pipe(takeUntil(this.willClose$)).subscribe((route) => {
|
|
549
|
+
if (this.routerOutlet.isActivated) this.routerOutlet.deactivate();
|
|
550
|
+
this.routerOutlet.activateWith(route, this.environmentInjector);
|
|
551
|
+
this.focusTitle();
|
|
552
|
+
});
|
|
553
|
+
}
|
|
554
|
+
patchScrollElementSize() {
|
|
555
|
+
if ("part" in HTMLElement.prototype) return;
|
|
556
|
+
this.ionContent.getScrollElement().then((scrollElement) => {
|
|
557
|
+
this.renderer.setStyle(scrollElement, "height", "100%");
|
|
558
|
+
this.renderer.setStyle(scrollElement, "position", "relative");
|
|
559
|
+
if (this.config.flavor === "drawer") this.renderer.setStyle(scrollElement, "transition", "padding-bottom " + DesignTokenHelper.softKeyboardTransitionLeave);
|
|
560
|
+
});
|
|
561
|
+
}
|
|
562
|
+
observeModalFullHeight() {
|
|
563
|
+
const ionModalWrapper = this.getIonModalWrapperElement();
|
|
564
|
+
if (!ionModalWrapper) return;
|
|
565
|
+
this.didPresent.then(() => {
|
|
566
|
+
this.intersectionObserver.observe(ionModalWrapper);
|
|
567
|
+
});
|
|
568
|
+
}
|
|
569
|
+
getIonModalWrapperElement() {
|
|
570
|
+
return this.ionModalElement.shadowRoot.querySelector(".modal-wrapper");
|
|
571
|
+
}
|
|
572
|
+
observeHeaderResize() {
|
|
573
|
+
this.resizeObserverService.observe(this.ionHeaderElement.nativeElement, (entry) => {
|
|
574
|
+
const [property, pixelValue] = ["--header-height", `${entry.contentRect.height}px`];
|
|
575
|
+
this.setCssVar(this.elementRef.nativeElement, property, pixelValue);
|
|
576
|
+
});
|
|
577
|
+
}
|
|
578
|
+
listenForIonModalDidPresent() {
|
|
579
|
+
if (this.ionModalElement) this.ionModalElement.addEventListener("ionModalDidPresent", () => {
|
|
580
|
+
this.ionModalDidPresent.next();
|
|
581
|
+
this.ionModalDidPresent.complete();
|
|
582
|
+
});
|
|
583
|
+
}
|
|
584
|
+
listenForIonModalWillDismiss() {
|
|
585
|
+
if (this.ionModalElement) this.ionModalElement.addEventListener("ionModalWillDismiss", () => {
|
|
586
|
+
this.ionModalWillDismiss.next();
|
|
587
|
+
this.ionModalWillDismiss.complete();
|
|
588
|
+
});
|
|
589
|
+
}
|
|
590
|
+
listenForScroll() {
|
|
591
|
+
const query = `(min-width: ${DesignTokenHelper.breakpoints.medium})`;
|
|
592
|
+
const mediaQuery = this.windowRef.nativeWindow.matchMedia(query);
|
|
593
|
+
const enableScrollEvents = (listOrEvent) => {
|
|
594
|
+
const isDesktop = listOrEvent.matches;
|
|
595
|
+
this.scrollEventsEnabled = !isDesktop;
|
|
596
|
+
};
|
|
597
|
+
enableScrollEvents(mediaQuery);
|
|
598
|
+
mediaQuery.onchange = enableScrollEvents;
|
|
599
|
+
this.zone.runOutsideAngular(() => {
|
|
600
|
+
fromEvent(this.ionContentElement.nativeElement, "ionScroll").pipe(debounceTime(contentScrollDebounceTimeInMS), map((event) => event.detail), takeUntil(this.destroy$)).subscribe((scrollInfo) => {
|
|
601
|
+
const contentScrolledPastOffset = scrollInfo.scrollTop > contentScrolledOffsetInPixels;
|
|
602
|
+
if (contentScrolledPastOffset !== this.isContentScrolled) {
|
|
603
|
+
this.isContentScrolled = contentScrolledPastOffset;
|
|
604
|
+
this.changeDetector.detectChanges();
|
|
605
|
+
}
|
|
606
|
+
});
|
|
607
|
+
});
|
|
608
|
+
}
|
|
609
|
+
observeTitleContentChanges() {
|
|
610
|
+
this.mutationObserverUnobserveFn = observeContent(this.ionTitleElement.nativeElement, this.setAriaLabelFromTitleContent);
|
|
611
|
+
}
|
|
612
|
+
setAriaLabel() {
|
|
613
|
+
const ariaLabel = this.config.htmlAttributes?.["aria-label"];
|
|
614
|
+
const ionModalElementDialog = getIonModalDialogAncestor(this.ionModalElement);
|
|
615
|
+
if (ionModalElementDialog && ariaLabel) this.renderer.setAttribute(ionModalElementDialog, "aria-label", ariaLabel);
|
|
616
|
+
else {
|
|
617
|
+
this.setAriaLabelFromTitleContent();
|
|
618
|
+
this.observeTitleContentChanges();
|
|
619
|
+
}
|
|
620
|
+
}
|
|
621
|
+
focusTitleOnDidPresent() {
|
|
622
|
+
this.ionModalDidPresent.pipe(takeUntil(this.willClose$)).subscribe(() => {
|
|
623
|
+
this.focusTitle();
|
|
624
|
+
});
|
|
625
|
+
}
|
|
626
|
+
focusTitle() {
|
|
627
|
+
queueMicrotask(() => {
|
|
628
|
+
if (this.ionContentElement?.nativeElement.contains(document.activeElement)) return;
|
|
629
|
+
this.ionTitleElement?.nativeElement.focus();
|
|
630
|
+
});
|
|
631
|
+
}
|
|
632
|
+
scrollToTop(scrollDuration) {
|
|
633
|
+
this.ionContent.scrollToTop(scrollDuration || 0);
|
|
634
|
+
}
|
|
635
|
+
scrollToBottom(scrollDuration) {
|
|
636
|
+
this.ionContent.scrollToBottom(scrollDuration || 0);
|
|
637
|
+
}
|
|
638
|
+
async close(data) {
|
|
639
|
+
if (!this.ionModalElement) return;
|
|
640
|
+
if (!this.keyboardVisible || !this.viewportResized) {
|
|
641
|
+
clearTimeout(this.delayedCloseTimeoutId);
|
|
642
|
+
await this.ionModalElement.dismiss(data);
|
|
643
|
+
return;
|
|
644
|
+
}
|
|
645
|
+
this.blurActiveElement();
|
|
646
|
+
return new Promise((resolve) => {
|
|
647
|
+
this.delayedClose = async () => {
|
|
648
|
+
await this.ionModalElement.dismiss(data);
|
|
649
|
+
resolve();
|
|
650
|
+
};
|
|
651
|
+
this.delayedCloseTimeoutId = setTimeout(this.delayedClose, ModalWrapperComponent.KEYBOARD_HIDE_DELAY_IN_MS);
|
|
652
|
+
});
|
|
653
|
+
}
|
|
654
|
+
onFocusChange() {
|
|
655
|
+
this.windowRef.nativeWindow.scrollTo({ top: this.scrollY });
|
|
656
|
+
}
|
|
657
|
+
_onKeyboardShow(keyboardHeight) {
|
|
658
|
+
this.setKeyboardVisibility(keyboardHeight);
|
|
659
|
+
}
|
|
660
|
+
_onKeyboardHide() {
|
|
661
|
+
this.setKeyboardVisibility(0);
|
|
662
|
+
}
|
|
663
|
+
toggleContentMaxHeight(freeze) {
|
|
664
|
+
if (!(this.config.flavor === "modal" && this.platform.isPhabletOrBigger())) return;
|
|
665
|
+
const style = "max-height";
|
|
666
|
+
const contentElement = this.ionContentElement.nativeElement;
|
|
667
|
+
this.zone.run(() => {
|
|
668
|
+
if (freeze) {
|
|
669
|
+
const contentHeight = contentElement.offsetHeight;
|
|
670
|
+
this.renderer.setStyle(contentElement, style, `${contentHeight}px`);
|
|
671
|
+
} else this.renderer.removeStyle(contentElement, style);
|
|
672
|
+
});
|
|
673
|
+
}
|
|
674
|
+
setKeyboardVisibility(keyboardHeight) {
|
|
675
|
+
const keyboardAlreadyVisible = keyboardHeight > 0 && this.keyboardVisible;
|
|
676
|
+
const keyboardAlreadyHidden = keyboardHeight === 0 && !this.keyboardVisible;
|
|
677
|
+
if (keyboardAlreadyVisible || keyboardAlreadyHidden) return;
|
|
678
|
+
this.keyboardVisible = keyboardHeight > 0;
|
|
679
|
+
this.toggleContentMaxHeight(this.keyboardVisible);
|
|
680
|
+
this.setKeyboardOverlap(keyboardHeight);
|
|
681
|
+
}
|
|
682
|
+
getViewportHeight() {
|
|
683
|
+
return this.initialViewportHeight || this.windowRef.nativeWindow.innerHeight;
|
|
684
|
+
}
|
|
685
|
+
getKeyboardOverlap(keyboardHeight, element) {
|
|
686
|
+
const viewportHeight = this.getViewportHeight();
|
|
687
|
+
if (keyboardHeight <= 0 || !element || !viewportHeight) return 0;
|
|
688
|
+
const elementDistanceAboveBottomOfScreen = Math.floor(viewportHeight - element.getBoundingClientRect().bottom);
|
|
689
|
+
return Math.max(keyboardHeight - elementDistanceAboveBottomOfScreen, 0);
|
|
690
|
+
}
|
|
691
|
+
setCssVar(element, property, value) {
|
|
692
|
+
this.zone.run(() => this.renderer.setStyle(element, property, value, RendererStyleFlags2.DashCase));
|
|
693
|
+
}
|
|
694
|
+
toggleCssClass(element, klass, condition) {
|
|
695
|
+
this.zone.run(() => condition ? this.renderer.addClass(element, klass) : this.renderer.removeClass(element, klass));
|
|
696
|
+
}
|
|
697
|
+
setKeyboardOverlap(keyboardHeight) {
|
|
698
|
+
this.toggleCssClass(this.elementRef.nativeElement, "keyboard-visible", this.keyboardVisible);
|
|
699
|
+
this.liftFooterAboveKeyboard(keyboardHeight);
|
|
700
|
+
this.reserveContentScrollRoom(keyboardHeight);
|
|
701
|
+
}
|
|
702
|
+
liftFooterAboveKeyboard(keyboardHeight) {
|
|
703
|
+
const footer = this.currentFooter;
|
|
704
|
+
if (!footer) return;
|
|
705
|
+
const keyboardOverlap = this.getKeyboardOverlap(keyboardHeight, this.elementRef.nativeElement);
|
|
706
|
+
this.setCssVar(footer, "--keyboard-offset", `${keyboardOverlap}px`);
|
|
707
|
+
}
|
|
708
|
+
reserveContentScrollRoom(keyboardHeight) {
|
|
709
|
+
const contentKeyboardOverlap = this.currentFooter?.classList.contains("snap-to-keyboard") ?? false ? this.getKeyboardOverlap(keyboardHeight, this.elementRef.nativeElement) : this.getKeyboardOverlap(keyboardHeight, this.ionContentElement.nativeElement);
|
|
710
|
+
this.setCssVar(this.elementRef.nativeElement, "--kirby-keyboard-content-overlap", `${contentKeyboardOverlap}px`);
|
|
711
|
+
}
|
|
712
|
+
onHeaderTouchStart(event) {
|
|
713
|
+
if (this.keyboardVisible) {
|
|
714
|
+
if (!this.toolbarButtons.some((button) => {
|
|
715
|
+
return event.target instanceof HTMLElement && (event.target === button || button.contains(event.target));
|
|
716
|
+
})) this.blurActiveElement();
|
|
717
|
+
}
|
|
718
|
+
}
|
|
719
|
+
_onWindowResize() {
|
|
720
|
+
this.setViewportHeight();
|
|
721
|
+
}
|
|
722
|
+
setViewportHeight() {
|
|
723
|
+
const vh = (this.windowRef.nativeWindow.innerHeight * .01).toFixed(2);
|
|
724
|
+
this.setCssVar(this.elementRef.nativeElement, "--vh", `${vh}px`);
|
|
725
|
+
}
|
|
726
|
+
observeViewportResize() {
|
|
727
|
+
this.resizeObserverService.observe(this.windowRef.nativeWindow.document.body, (entry) => this.onViewportResize(entry));
|
|
728
|
+
}
|
|
729
|
+
onViewportResize(entry) {
|
|
730
|
+
if (!this.initialViewportHeight) {
|
|
731
|
+
this.initialViewportHeight = entry.contentRect.height;
|
|
732
|
+
return;
|
|
733
|
+
}
|
|
734
|
+
this.viewportResized = entry.contentRect.height !== this.initialViewportHeight;
|
|
735
|
+
if (!this.viewportResized) {
|
|
736
|
+
if (this.delayedCloseTimeoutId) {
|
|
737
|
+
clearTimeout(this.delayedCloseTimeoutId);
|
|
738
|
+
this.delayedClose();
|
|
739
|
+
}
|
|
740
|
+
}
|
|
741
|
+
this.viewportResize.next();
|
|
742
|
+
}
|
|
743
|
+
blurActiveElement() {
|
|
744
|
+
const BLUR_TARGET_SELECTOR = "input, textarea";
|
|
745
|
+
if (this.keyboardVisible) {
|
|
746
|
+
if (document.activeElement instanceof HTMLElement && document.activeElement.matches(BLUR_TARGET_SELECTOR)) document.activeElement.blur();
|
|
747
|
+
}
|
|
748
|
+
}
|
|
749
|
+
createModalWrapperIntersectionObserver() {
|
|
750
|
+
const callback = (entries) => {
|
|
751
|
+
if (entries[0].intersectionRatio < 1) this.ionModalElement.classList.add("full-height");
|
|
752
|
+
else this.ionModalElement.classList.remove("full-height");
|
|
753
|
+
};
|
|
754
|
+
const options = {
|
|
755
|
+
rootMargin: "0px 0px -1px 0px",
|
|
756
|
+
root: this.windowRef.nativeWindow.frameElement ? this.windowRef.nativeWindow.document : void 0,
|
|
757
|
+
threshold: [.99, 1]
|
|
758
|
+
};
|
|
759
|
+
return new IntersectionObserver(callback, options);
|
|
760
|
+
}
|
|
761
|
+
ngOnDestroy() {
|
|
762
|
+
if (this.routerOutlet.isActivated) this.routerOutlet.deactivate();
|
|
763
|
+
this.mutationObserverUnobserveFn?.();
|
|
764
|
+
this.intersectionObserver.disconnect();
|
|
765
|
+
delete this._intersectionObserver;
|
|
766
|
+
if (this.resizeObserverService) {
|
|
767
|
+
this.resizeObserverService.unobserve(this.windowRef.nativeWindow.document.body);
|
|
768
|
+
this.resizeObserverService.unobserve(this.ionHeaderElement.nativeElement);
|
|
769
|
+
this.resizeObserverService.unobserve(this.currentFooter);
|
|
770
|
+
}
|
|
771
|
+
this.destroy$.next();
|
|
772
|
+
this.destroy$.complete();
|
|
773
|
+
}
|
|
774
|
+
static {
|
|
775
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
776
|
+
minVersion: "12.0.0",
|
|
777
|
+
version: "22.2.3",
|
|
778
|
+
ngImport: i0,
|
|
779
|
+
type: ModalWrapperComponent,
|
|
780
|
+
deps: [
|
|
781
|
+
{ token: i0.ChangeDetectorRef },
|
|
782
|
+
{ token: i0.Injector },
|
|
783
|
+
{ token: i0.ElementRef },
|
|
784
|
+
{ token: i0.Renderer2 },
|
|
785
|
+
{ token: i0.NgZone },
|
|
786
|
+
{ token: i1.ResizeObserverService },
|
|
787
|
+
{ token: i1$2.WindowRef },
|
|
788
|
+
{ token: i3.PlatformService },
|
|
789
|
+
{ token: CanDismissHelper },
|
|
790
|
+
{ token: i0.EnvironmentInjector },
|
|
791
|
+
{ token: i1.TranslationService }
|
|
792
|
+
],
|
|
793
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
794
|
+
});
|
|
795
|
+
}
|
|
796
|
+
static {
|
|
797
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
798
|
+
minVersion: "17.0.0",
|
|
799
|
+
version: "22.2.3",
|
|
800
|
+
type: ModalWrapperComponent,
|
|
801
|
+
isStandalone: true,
|
|
802
|
+
selector: "kirby-modal-wrapper",
|
|
803
|
+
inputs: {
|
|
804
|
+
scrollDisabled: "scrollDisabled",
|
|
805
|
+
config: "config",
|
|
806
|
+
content: "content"
|
|
807
|
+
},
|
|
808
|
+
host: {
|
|
809
|
+
listeners: {
|
|
810
|
+
"window:focus": "onFocusChange()",
|
|
811
|
+
"window:focusout": "onFocusChange()",
|
|
812
|
+
"window:ionKeyboardDidShow": "_onKeyboardShow($event.detail.keyboardHeight)",
|
|
813
|
+
"window:keyboardWillShow": "_onKeyboardShow($event.keyboardHeight)",
|
|
814
|
+
"window:ionKeyboardDidHide": "_onKeyboardHide()",
|
|
815
|
+
"window:keyboardWillHide": "_onKeyboardHide()",
|
|
816
|
+
"window:resize": "_onWindowResize()"
|
|
817
|
+
},
|
|
818
|
+
properties: {
|
|
819
|
+
"class.collapsible-title": "this._hasCollapsibleTitle",
|
|
820
|
+
"class.drawer": "this._isDrawer"
|
|
821
|
+
}
|
|
822
|
+
},
|
|
823
|
+
providers: [{
|
|
824
|
+
provide: Modal,
|
|
825
|
+
useExisting: ModalWrapperComponent
|
|
826
|
+
}, {
|
|
827
|
+
provide: ModalElementsAdvertiser,
|
|
828
|
+
useExisting: ModalWrapperComponent
|
|
829
|
+
}],
|
|
830
|
+
queries: [{
|
|
831
|
+
propertyName: "templateRef",
|
|
832
|
+
first: true,
|
|
833
|
+
predicate: TemplateRef,
|
|
834
|
+
descendants: true
|
|
835
|
+
}],
|
|
836
|
+
viewQueries: [
|
|
837
|
+
{
|
|
838
|
+
propertyName: "ionContent",
|
|
839
|
+
first: true,
|
|
840
|
+
predicate: IonContent,
|
|
841
|
+
descendants: true,
|
|
842
|
+
static: true
|
|
843
|
+
},
|
|
844
|
+
{
|
|
845
|
+
propertyName: "ionContentElement",
|
|
846
|
+
first: true,
|
|
847
|
+
predicate: IonContent,
|
|
848
|
+
descendants: true,
|
|
849
|
+
read: ElementRef,
|
|
850
|
+
static: true
|
|
851
|
+
},
|
|
852
|
+
{
|
|
853
|
+
propertyName: "ionHeaderElement",
|
|
854
|
+
first: true,
|
|
855
|
+
predicate: IonHeader,
|
|
856
|
+
descendants: true,
|
|
857
|
+
read: ElementRef,
|
|
858
|
+
static: true
|
|
859
|
+
},
|
|
860
|
+
{
|
|
861
|
+
propertyName: "ionToolbarElement",
|
|
862
|
+
first: true,
|
|
863
|
+
predicate: IonToolbar,
|
|
864
|
+
descendants: true,
|
|
865
|
+
read: ElementRef,
|
|
866
|
+
static: true
|
|
867
|
+
},
|
|
868
|
+
{
|
|
869
|
+
propertyName: "ionTitleElement",
|
|
870
|
+
first: true,
|
|
871
|
+
predicate: IonTitle,
|
|
872
|
+
descendants: true,
|
|
873
|
+
read: ElementRef,
|
|
874
|
+
static: true
|
|
875
|
+
},
|
|
876
|
+
{
|
|
877
|
+
propertyName: "routerOutlet",
|
|
878
|
+
first: true,
|
|
879
|
+
predicate: RouterOutlet,
|
|
880
|
+
descendants: true,
|
|
881
|
+
static: true
|
|
882
|
+
},
|
|
883
|
+
{
|
|
884
|
+
propertyName: "_contentTitleElement",
|
|
885
|
+
first: true,
|
|
886
|
+
predicate: ["contentTitle"],
|
|
887
|
+
descendants: true,
|
|
888
|
+
read: ElementRef
|
|
889
|
+
},
|
|
890
|
+
{
|
|
891
|
+
propertyName: "toolbarButtonsQuery",
|
|
892
|
+
predicate: ButtonComponent,
|
|
893
|
+
descendants: true,
|
|
894
|
+
read: ElementRef
|
|
895
|
+
}
|
|
896
|
+
],
|
|
897
|
+
ngImport: i0,
|
|
898
|
+
template: "<ion-header\n role=\"presentation\"\n [class.content-scrolled]=\"isContentScrolled\"\n (touchstart)=\"onHeaderTouchStart($event)\"\n>\n <ion-toolbar>\n <ion-title role=\"heading\" aria-level=\"2\" tabindex=\"-1\"></ion-title>\n @if (config.flavor === 'drawer' && config.drawerSupplementaryAction) {\n <ion-buttons slot=\"secondary\">\n <button\n kirby-button\n attentionLevel=\"3\"\n size=\"md\"\n (click)=\"config.drawerSupplementaryAction.action($event)\"\n >\n <kirby-icon [name]=\"config.drawerSupplementaryAction.iconName\"></kirby-icon>\n </button>\n </ion-buttons>\n }\n <ion-buttons slot=\"primary\">\n <button\n kirby-button\n attentionLevel=\"3\"\n size=\"md\"\n [noDecoration]=\"config.interactWithBackground\"\n [attr.aria-label]=\"translations.get('close')\"\n (click)=\"close()\"\n >\n <kirby-icon name=\"close\"></kirby-icon>\n </button>\n </ion-buttons>\n </ion-toolbar>\n</ion-header>\n\n<ion-content [scrollEvents]=\"scrollEventsEnabled\">\n @if (_hasCollapsibleTitle) {\n <ion-header collapse=\"condense\">\n <ion-toolbar>\n <span class=\"kirby-text-xlarge\" #contentTitle></span>\n </ion-toolbar>\n </ion-header>\n }\n\n <!-- Outlet for ModalController -->\n <ng-container\n *ngComponentOutlet=\"config.component; injector: componentPropsInjector\"\n ></ng-container>\n\n <!-- Outlet for projected content -->\n <ng-container *ngTemplateOutlet=\"content; injector: modalWrapperInjector\"></ng-container>\n\n <!-- Outlet for route-based modal -->\n <router-outlet\n name=\"kirbyModalWrapperOutlet\"\n [style.visibility]=\"config.modalRoute ? 'visible' : 'hidden'\"\n ></router-outlet>\n</ion-content>\n",
|
|
899
|
+
styles: [".kirby-line-clamp{display:-webkit-box;-webkit-line-clamp:var(--line-clamp, none);-webkit-box-orient:vertical;overflow:hidden}ion-header{box-sizing:border-box}ion-header ion-toolbar{--padding-start: var(--kirby-spacing-xxs);--padding-end: var(--kirby-spacing-xxs);--padding-bottom: calc(var(--kirby-spacing-xxs) - var(--kirby-stroke-xs));--padding-top: var(--kirby-spacing-xxs);--border-width: 0;--background: transparent;--color: var(--kirby-modal-color, var(--kirby-color-content-base));border-bottom:var(--kirby-stroke-xs) solid transparent;transition:border-color var(--kirby-transition-duration-quick) linear}@media(min-width:768px){ion-header ion-toolbar{--padding-start: var(--kirby-spacing-m);--padding-end: var(--kirby-spacing-m);--padding-bottom: calc(var(--kirby-spacing-m) - var(--kirby-stroke-xs));--padding-top: var(--kirby-spacing-m);padding-inline:0}}ion-header ion-toolbar button{color:var(--color)}:host{--vh100: var(--vh, 1vh) * 100;--header-height: 0px;--footer-height: 0px;--kirby-modal-safe-area-bottom: var(--ion-safe-area-bottom)}@media(max-width:767px){:host.drawer ion-header ion-toolbar{--padding-top: var(--kirby-spacing-s)}:host.drawer ion-header ion-toolbar:first-of-type{padding-top:0}}@media(min-width:768px){ion-header ion-toolbar{border-bottom-color:var(--kirby-color-border-base-silent)}}ion-header.content-scrolled ion-toolbar{border-bottom-color:var(--kirby-color-border-base-silent)}:host-context(ion-modal.no-header-area-border) ion-header ion-toolbar{border-bottom-color:transparent}@media(max-width:767px){:host-context(ion-modal.kirby-drawer:not(.kirby-modal-full-height)){padding-top:0;position:relative;contain:inherit;min-height:min(var(--min-height),var(--vh100) - var(--kirby-modal-padding-top, 0px))}:host-context(ion-modal.kirby-drawer:not(.kirby-modal-full-height)) ion-content{contain:content;max-height:calc(var(--vh100) - var(--kirby-modal-padding-top, 0px) - var(--header-height) - var(--footer-height))}:host-context(ion-modal.kirby-drawer:not(.kirby-modal-full-height)) ion-content::part(scroll){height:\"100%\";position:relative}:host-context(ion-modal.kirby-drawer:not(.kirby-modal-full-height)).drawer ion-content::part(scroll){transition:padding-bottom var(--kirby-transition-soft-keyboard-leave)}:host-context(ion-modal.kirby-drawer:not(.kirby-modal-full-height)).drawer.keyboard-visible ion-content::part(scroll){transition:padding-bottom var(--kirby-transition-soft-keyboard-enter)}}:host-context(ion-modal.kirby-drawer.interact-with-background){padding-top:0;position:relative;contain:inherit;min-height:min(var(--min-height),var(--vh100) - var(--kirby-modal-padding-top, 0px))}:host-context(ion-modal.kirby-drawer.interact-with-background) ion-content{contain:content;max-height:calc(var(--vh100) - var(--kirby-modal-padding-top, 0px) - var(--header-height) - var(--footer-height))}:host-context(ion-modal.kirby-drawer.interact-with-background) ion-content::part(scroll){height:\"100%\";position:relative}:host-context(ion-modal.kirby-drawer.interact-with-background).drawer ion-content::part(scroll){transition:padding-bottom var(--kirby-transition-soft-keyboard-leave)}:host-context(ion-modal.kirby-drawer.interact-with-background).drawer.keyboard-visible ion-content::part(scroll){transition:padding-bottom var(--kirby-transition-soft-keyboard-enter)}:host-context(ion-modal.kirby-drawer.interact-with-background) ion-header ion-toolbar{border-bottom-color:transparent}:host-context(ion-modal.modal-card:not(.kirby-drawer)) ion-header ion-toolbar:first-of-type{padding-top:var(--kirby-safe-area-top, 0)}@media(min-width:768px){:host-context(ion-modal.modal-card:not(.kirby-drawer)) ion-header ion-toolbar:first-of-type{--padding-start: var(--kirby-spacing-m);--padding-end: var(--kirby-spacing-m);--padding-bottom: calc(var(--kirby-spacing-m) - var(--kirby-stroke-xs));--padding-top: var(--kirby-spacing-m);padding-inline:0}}ion-title{box-sizing:border-box;padding-inline:calc(48px + var(--padding-start)) calc(48px + var(--padding-end));font-size:min(var(--kirby-font-size-n),19.2px);font-weight:var(--kirby-font-weight-bold);outline:none}ion-content{--background: transparent;--color: var(--kirby-modal-color, var(--kirby-color-content-base));--padding-top: var(--kirby-spacing-m);--padding-bottom: calc(var(--kirby-spacing-m) + var(--kirby-modal-safe-area-bottom));--padding-start: var(--kirby-spacing-s);--padding-end: var(--kirby-spacing-s);display:flex;flex-direction:column;height:calc(var(--height) - var(--header-height) - var(--footer-height));max-height:calc(var(--max-height) - var(--header-height) - var(--footer-height))}ion-content ::ng-deep>*{box-sizing:border-box;display:block}:host(:has(kirby-modal-footer)) ion-content{--padding-bottom: var(--kirby-spacing-m)}:host(.keyboard-visible) ion-content{--padding-bottom: calc( var(--kirby-spacing-m) + var(--kirby-keyboard-content-overlap, 0px) - var(--keyboard-offset, 0px) )}@media(min-width:768px){ion-content{--padding-start: var(--kirby-spacing-xxl);--padding-end: var(--kirby-spacing-xxl)}}:host(.collapsible-title) ion-content ion-toolbar:first-of-type{--padding-top: 0px;--padding-bottom: var(--kirby-spacing-l);--padding-start: var(--kirby-spacing-xxs);--padding-end: var(--kirby-spacing-xxs);border:none}@media(min-width:768px){:host(.collapsible-title) ion-content ion-toolbar:first-of-type{--padding-start: var(--kirby-spacing-s);--padding-end: var(--kirby-spacing-s)}}\n"],
|
|
900
|
+
dependencies: [
|
|
901
|
+
{
|
|
902
|
+
kind: "ngmodule",
|
|
903
|
+
type: RouterModule
|
|
904
|
+
},
|
|
905
|
+
{
|
|
906
|
+
kind: "directive",
|
|
907
|
+
type: i5.RouterOutlet,
|
|
908
|
+
selector: "router-outlet",
|
|
909
|
+
inputs: ["name", "routerOutletData"],
|
|
910
|
+
outputs: [
|
|
911
|
+
"activate",
|
|
912
|
+
"deactivate",
|
|
913
|
+
"attach",
|
|
914
|
+
"detach"
|
|
915
|
+
],
|
|
916
|
+
exportAs: ["outlet"]
|
|
917
|
+
},
|
|
918
|
+
{
|
|
919
|
+
kind: "component",
|
|
920
|
+
type: ButtonComponent,
|
|
921
|
+
selector: "button[kirby-button],Button[kirby-button],a[kirby-button]",
|
|
922
|
+
inputs: [
|
|
923
|
+
"attentionLevel",
|
|
924
|
+
"noDecoration",
|
|
925
|
+
"themeColor",
|
|
926
|
+
"expand",
|
|
927
|
+
"isFloating",
|
|
928
|
+
"size",
|
|
929
|
+
"showIconOnly"
|
|
930
|
+
]
|
|
931
|
+
},
|
|
932
|
+
{
|
|
933
|
+
kind: "component",
|
|
934
|
+
type: IconComponent,
|
|
935
|
+
selector: "kirby-icon",
|
|
936
|
+
inputs: ["size", "name"]
|
|
937
|
+
},
|
|
938
|
+
{
|
|
939
|
+
kind: "ngmodule",
|
|
940
|
+
type: CommonModule
|
|
941
|
+
},
|
|
942
|
+
{
|
|
943
|
+
kind: "directive",
|
|
944
|
+
type: i2.NgComponentOutlet,
|
|
945
|
+
selector: "[ngComponentOutlet]",
|
|
946
|
+
inputs: [
|
|
947
|
+
"ngComponentOutlet",
|
|
948
|
+
"ngComponentOutletInputs",
|
|
949
|
+
"ngComponentOutletInjector",
|
|
950
|
+
"ngComponentOutletEnvironmentInjector",
|
|
951
|
+
"ngComponentOutletContent",
|
|
952
|
+
"ngComponentOutletNgModule"
|
|
953
|
+
],
|
|
954
|
+
exportAs: ["ngComponentOutlet"]
|
|
955
|
+
},
|
|
956
|
+
{
|
|
957
|
+
kind: "directive",
|
|
958
|
+
type: i2.NgTemplateOutlet,
|
|
959
|
+
selector: "[ngTemplateOutlet]",
|
|
960
|
+
inputs: [
|
|
961
|
+
"ngTemplateOutletContext",
|
|
962
|
+
"ngTemplateOutlet",
|
|
963
|
+
"ngTemplateOutletInjector"
|
|
964
|
+
]
|
|
965
|
+
},
|
|
966
|
+
{
|
|
967
|
+
kind: "component",
|
|
968
|
+
type: IonHeader,
|
|
969
|
+
selector: "ion-header",
|
|
970
|
+
inputs: [
|
|
971
|
+
"collapse",
|
|
972
|
+
"mode",
|
|
973
|
+
"translucent"
|
|
974
|
+
]
|
|
975
|
+
},
|
|
976
|
+
{
|
|
977
|
+
kind: "component",
|
|
978
|
+
type: IonToolbar,
|
|
979
|
+
selector: "ion-toolbar",
|
|
980
|
+
inputs: ["color", "mode"]
|
|
981
|
+
},
|
|
982
|
+
{
|
|
983
|
+
kind: "component",
|
|
984
|
+
type: IonTitle,
|
|
985
|
+
selector: "ion-title",
|
|
986
|
+
inputs: ["color", "size"]
|
|
987
|
+
},
|
|
988
|
+
{
|
|
989
|
+
kind: "component",
|
|
990
|
+
type: IonButtons,
|
|
991
|
+
selector: "ion-buttons",
|
|
992
|
+
inputs: ["collapse"]
|
|
993
|
+
},
|
|
994
|
+
{
|
|
995
|
+
kind: "component",
|
|
996
|
+
type: IonContent,
|
|
997
|
+
selector: "ion-content",
|
|
998
|
+
inputs: [
|
|
999
|
+
"color",
|
|
1000
|
+
"fixedSlotPlacement",
|
|
1001
|
+
"forceOverscroll",
|
|
1002
|
+
"fullscreen",
|
|
1003
|
+
"scrollEvents",
|
|
1004
|
+
"scrollX",
|
|
1005
|
+
"scrollY"
|
|
1006
|
+
],
|
|
1007
|
+
outputs: [
|
|
1008
|
+
"ionScrollStart",
|
|
1009
|
+
"ionScroll",
|
|
1010
|
+
"ionScrollEnd"
|
|
1011
|
+
]
|
|
1012
|
+
}
|
|
1013
|
+
],
|
|
1014
|
+
changeDetection: i0.ChangeDetectionStrategy.Eager
|
|
1015
|
+
});
|
|
1016
|
+
}
|
|
1017
|
+
};
|
|
1018
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1019
|
+
minVersion: "12.0.0",
|
|
1020
|
+
version: "22.2.3",
|
|
1021
|
+
ngImport: i0,
|
|
1022
|
+
type: ModalWrapperComponent,
|
|
1023
|
+
decorators: [{
|
|
1024
|
+
type: Component,
|
|
1025
|
+
args: [{
|
|
1026
|
+
imports: [
|
|
1027
|
+
RouterModule,
|
|
1028
|
+
ButtonComponent,
|
|
1029
|
+
IconComponent,
|
|
1030
|
+
CommonModule,
|
|
1031
|
+
IonHeader,
|
|
1032
|
+
IonToolbar,
|
|
1033
|
+
IonTitle,
|
|
1034
|
+
IonButtons,
|
|
1035
|
+
IonContent
|
|
1036
|
+
],
|
|
1037
|
+
selector: "kirby-modal-wrapper",
|
|
1038
|
+
changeDetection: ChangeDetectionStrategy.Eager,
|
|
1039
|
+
providers: [{
|
|
1040
|
+
provide: Modal,
|
|
1041
|
+
useExisting: ModalWrapperComponent
|
|
1042
|
+
}, {
|
|
1043
|
+
provide: ModalElementsAdvertiser,
|
|
1044
|
+
useExisting: ModalWrapperComponent
|
|
1045
|
+
}],
|
|
1046
|
+
template: "<ion-header\n role=\"presentation\"\n [class.content-scrolled]=\"isContentScrolled\"\n (touchstart)=\"onHeaderTouchStart($event)\"\n>\n <ion-toolbar>\n <ion-title role=\"heading\" aria-level=\"2\" tabindex=\"-1\"></ion-title>\n @if (config.flavor === 'drawer' && config.drawerSupplementaryAction) {\n <ion-buttons slot=\"secondary\">\n <button\n kirby-button\n attentionLevel=\"3\"\n size=\"md\"\n (click)=\"config.drawerSupplementaryAction.action($event)\"\n >\n <kirby-icon [name]=\"config.drawerSupplementaryAction.iconName\"></kirby-icon>\n </button>\n </ion-buttons>\n }\n <ion-buttons slot=\"primary\">\n <button\n kirby-button\n attentionLevel=\"3\"\n size=\"md\"\n [noDecoration]=\"config.interactWithBackground\"\n [attr.aria-label]=\"translations.get('close')\"\n (click)=\"close()\"\n >\n <kirby-icon name=\"close\"></kirby-icon>\n </button>\n </ion-buttons>\n </ion-toolbar>\n</ion-header>\n\n<ion-content [scrollEvents]=\"scrollEventsEnabled\">\n @if (_hasCollapsibleTitle) {\n <ion-header collapse=\"condense\">\n <ion-toolbar>\n <span class=\"kirby-text-xlarge\" #contentTitle></span>\n </ion-toolbar>\n </ion-header>\n }\n\n <!-- Outlet for ModalController -->\n <ng-container\n *ngComponentOutlet=\"config.component; injector: componentPropsInjector\"\n ></ng-container>\n\n <!-- Outlet for projected content -->\n <ng-container *ngTemplateOutlet=\"content; injector: modalWrapperInjector\"></ng-container>\n\n <!-- Outlet for route-based modal -->\n <router-outlet\n name=\"kirbyModalWrapperOutlet\"\n [style.visibility]=\"config.modalRoute ? 'visible' : 'hidden'\"\n ></router-outlet>\n</ion-content>\n",
|
|
1047
|
+
styles: [".kirby-line-clamp{display:-webkit-box;-webkit-line-clamp:var(--line-clamp, none);-webkit-box-orient:vertical;overflow:hidden}ion-header{box-sizing:border-box}ion-header ion-toolbar{--padding-start: var(--kirby-spacing-xxs);--padding-end: var(--kirby-spacing-xxs);--padding-bottom: calc(var(--kirby-spacing-xxs) - var(--kirby-stroke-xs));--padding-top: var(--kirby-spacing-xxs);--border-width: 0;--background: transparent;--color: var(--kirby-modal-color, var(--kirby-color-content-base));border-bottom:var(--kirby-stroke-xs) solid transparent;transition:border-color var(--kirby-transition-duration-quick) linear}@media(min-width:768px){ion-header ion-toolbar{--padding-start: var(--kirby-spacing-m);--padding-end: var(--kirby-spacing-m);--padding-bottom: calc(var(--kirby-spacing-m) - var(--kirby-stroke-xs));--padding-top: var(--kirby-spacing-m);padding-inline:0}}ion-header ion-toolbar button{color:var(--color)}:host{--vh100: var(--vh, 1vh) * 100;--header-height: 0px;--footer-height: 0px;--kirby-modal-safe-area-bottom: var(--ion-safe-area-bottom)}@media(max-width:767px){:host.drawer ion-header ion-toolbar{--padding-top: var(--kirby-spacing-s)}:host.drawer ion-header ion-toolbar:first-of-type{padding-top:0}}@media(min-width:768px){ion-header ion-toolbar{border-bottom-color:var(--kirby-color-border-base-silent)}}ion-header.content-scrolled ion-toolbar{border-bottom-color:var(--kirby-color-border-base-silent)}:host-context(ion-modal.no-header-area-border) ion-header ion-toolbar{border-bottom-color:transparent}@media(max-width:767px){:host-context(ion-modal.kirby-drawer:not(.kirby-modal-full-height)){padding-top:0;position:relative;contain:inherit;min-height:min(var(--min-height),var(--vh100) - var(--kirby-modal-padding-top, 0px))}:host-context(ion-modal.kirby-drawer:not(.kirby-modal-full-height)) ion-content{contain:content;max-height:calc(var(--vh100) - var(--kirby-modal-padding-top, 0px) - var(--header-height) - var(--footer-height))}:host-context(ion-modal.kirby-drawer:not(.kirby-modal-full-height)) ion-content::part(scroll){height:\"100%\";position:relative}:host-context(ion-modal.kirby-drawer:not(.kirby-modal-full-height)).drawer ion-content::part(scroll){transition:padding-bottom var(--kirby-transition-soft-keyboard-leave)}:host-context(ion-modal.kirby-drawer:not(.kirby-modal-full-height)).drawer.keyboard-visible ion-content::part(scroll){transition:padding-bottom var(--kirby-transition-soft-keyboard-enter)}}:host-context(ion-modal.kirby-drawer.interact-with-background){padding-top:0;position:relative;contain:inherit;min-height:min(var(--min-height),var(--vh100) - var(--kirby-modal-padding-top, 0px))}:host-context(ion-modal.kirby-drawer.interact-with-background) ion-content{contain:content;max-height:calc(var(--vh100) - var(--kirby-modal-padding-top, 0px) - var(--header-height) - var(--footer-height))}:host-context(ion-modal.kirby-drawer.interact-with-background) ion-content::part(scroll){height:\"100%\";position:relative}:host-context(ion-modal.kirby-drawer.interact-with-background).drawer ion-content::part(scroll){transition:padding-bottom var(--kirby-transition-soft-keyboard-leave)}:host-context(ion-modal.kirby-drawer.interact-with-background).drawer.keyboard-visible ion-content::part(scroll){transition:padding-bottom var(--kirby-transition-soft-keyboard-enter)}:host-context(ion-modal.kirby-drawer.interact-with-background) ion-header ion-toolbar{border-bottom-color:transparent}:host-context(ion-modal.modal-card:not(.kirby-drawer)) ion-header ion-toolbar:first-of-type{padding-top:var(--kirby-safe-area-top, 0)}@media(min-width:768px){:host-context(ion-modal.modal-card:not(.kirby-drawer)) ion-header ion-toolbar:first-of-type{--padding-start: var(--kirby-spacing-m);--padding-end: var(--kirby-spacing-m);--padding-bottom: calc(var(--kirby-spacing-m) - var(--kirby-stroke-xs));--padding-top: var(--kirby-spacing-m);padding-inline:0}}ion-title{box-sizing:border-box;padding-inline:calc(48px + var(--padding-start)) calc(48px + var(--padding-end));font-size:min(var(--kirby-font-size-n),19.2px);font-weight:var(--kirby-font-weight-bold);outline:none}ion-content{--background: transparent;--color: var(--kirby-modal-color, var(--kirby-color-content-base));--padding-top: var(--kirby-spacing-m);--padding-bottom: calc(var(--kirby-spacing-m) + var(--kirby-modal-safe-area-bottom));--padding-start: var(--kirby-spacing-s);--padding-end: var(--kirby-spacing-s);display:flex;flex-direction:column;height:calc(var(--height) - var(--header-height) - var(--footer-height));max-height:calc(var(--max-height) - var(--header-height) - var(--footer-height))}ion-content ::ng-deep>*{box-sizing:border-box;display:block}:host(:has(kirby-modal-footer)) ion-content{--padding-bottom: var(--kirby-spacing-m)}:host(.keyboard-visible) ion-content{--padding-bottom: calc( var(--kirby-spacing-m) + var(--kirby-keyboard-content-overlap, 0px) - var(--keyboard-offset, 0px) )}@media(min-width:768px){ion-content{--padding-start: var(--kirby-spacing-xxl);--padding-end: var(--kirby-spacing-xxl)}}:host(.collapsible-title) ion-content ion-toolbar:first-of-type{--padding-top: 0px;--padding-bottom: var(--kirby-spacing-l);--padding-start: var(--kirby-spacing-xxs);--padding-end: var(--kirby-spacing-xxs);border:none}@media(min-width:768px){:host(.collapsible-title) ion-content ion-toolbar:first-of-type{--padding-start: var(--kirby-spacing-s);--padding-end: var(--kirby-spacing-s)}}\n"]
|
|
1048
|
+
}]
|
|
1049
|
+
}],
|
|
1050
|
+
ctorParameters: () => [
|
|
1051
|
+
{ type: i0.ChangeDetectorRef },
|
|
1052
|
+
{ type: i0.Injector },
|
|
1053
|
+
{ type: i0.ElementRef },
|
|
1054
|
+
{ type: i0.Renderer2 },
|
|
1055
|
+
{ type: i0.NgZone },
|
|
1056
|
+
{ type: i1.ResizeObserverService },
|
|
1057
|
+
{ type: i1$2.WindowRef },
|
|
1058
|
+
{ type: i3.PlatformService },
|
|
1059
|
+
{ type: CanDismissHelper },
|
|
1060
|
+
{ type: i0.EnvironmentInjector },
|
|
1061
|
+
{ type: i1.TranslationService }
|
|
1062
|
+
],
|
|
1063
|
+
propDecorators: {
|
|
1064
|
+
_hasCollapsibleTitle: [{
|
|
1065
|
+
type: HostBinding,
|
|
1066
|
+
args: ["class.collapsible-title"]
|
|
1067
|
+
}],
|
|
1068
|
+
scrollDisabled: [{ type: Input }],
|
|
1069
|
+
config: [{ type: Input }],
|
|
1070
|
+
content: [{ type: Input }],
|
|
1071
|
+
templateRef: [{
|
|
1072
|
+
type: ContentChild,
|
|
1073
|
+
args: [TemplateRef]
|
|
1074
|
+
}],
|
|
1075
|
+
toolbarButtonsQuery: [{
|
|
1076
|
+
type: ViewChildren,
|
|
1077
|
+
args: [ButtonComponent, { read: ElementRef }]
|
|
1078
|
+
}],
|
|
1079
|
+
ionContent: [{
|
|
1080
|
+
type: ViewChild,
|
|
1081
|
+
args: [IonContent, { static: true }]
|
|
1082
|
+
}],
|
|
1083
|
+
ionContentElement: [{
|
|
1084
|
+
type: ViewChild,
|
|
1085
|
+
args: [IonContent, {
|
|
1086
|
+
static: true,
|
|
1087
|
+
read: ElementRef
|
|
1088
|
+
}]
|
|
1089
|
+
}],
|
|
1090
|
+
ionHeaderElement: [{
|
|
1091
|
+
type: ViewChild,
|
|
1092
|
+
args: [IonHeader, {
|
|
1093
|
+
static: true,
|
|
1094
|
+
read: ElementRef
|
|
1095
|
+
}]
|
|
1096
|
+
}],
|
|
1097
|
+
ionToolbarElement: [{
|
|
1098
|
+
type: ViewChild,
|
|
1099
|
+
args: [IonToolbar, {
|
|
1100
|
+
static: true,
|
|
1101
|
+
read: ElementRef
|
|
1102
|
+
}]
|
|
1103
|
+
}],
|
|
1104
|
+
ionTitleElement: [{
|
|
1105
|
+
type: ViewChild,
|
|
1106
|
+
args: [IonTitle, {
|
|
1107
|
+
static: true,
|
|
1108
|
+
read: ElementRef
|
|
1109
|
+
}]
|
|
1110
|
+
}],
|
|
1111
|
+
routerOutlet: [{
|
|
1112
|
+
type: ViewChild,
|
|
1113
|
+
args: [RouterOutlet, { static: true }]
|
|
1114
|
+
}],
|
|
1115
|
+
_contentTitleElement: [{
|
|
1116
|
+
type: ViewChild,
|
|
1117
|
+
args: ["contentTitle", { read: ElementRef }]
|
|
1118
|
+
}],
|
|
1119
|
+
_isDrawer: [{
|
|
1120
|
+
type: HostBinding,
|
|
1121
|
+
args: ["class.drawer"]
|
|
1122
|
+
}],
|
|
1123
|
+
onFocusChange: [{
|
|
1124
|
+
type: HostListener,
|
|
1125
|
+
args: ["window:focus"]
|
|
1126
|
+
}, {
|
|
1127
|
+
type: HostListener,
|
|
1128
|
+
args: ["window:focusout"]
|
|
1129
|
+
}],
|
|
1130
|
+
_onKeyboardShow: [{
|
|
1131
|
+
type: HostListener,
|
|
1132
|
+
args: ["window:ionKeyboardDidShow", ["$event.detail.keyboardHeight"]]
|
|
1133
|
+
}, {
|
|
1134
|
+
type: HostListener,
|
|
1135
|
+
args: ["window:keyboardWillShow", ["$event.keyboardHeight"]]
|
|
1136
|
+
}],
|
|
1137
|
+
_onKeyboardHide: [{
|
|
1138
|
+
type: HostListener,
|
|
1139
|
+
args: ["window:ionKeyboardDidHide"]
|
|
1140
|
+
}, {
|
|
1141
|
+
type: HostListener,
|
|
1142
|
+
args: ["window:keyboardWillHide"]
|
|
1143
|
+
}],
|
|
1144
|
+
_onWindowResize: [{
|
|
1145
|
+
type: HostListener,
|
|
1146
|
+
args: ["window:resize"]
|
|
1147
|
+
}]
|
|
1148
|
+
}
|
|
1149
|
+
});
|
|
1150
|
+
var DrawerSupplementaryAction = class {};
|
|
1151
|
+
var ModalCompactWrapperComponent = class ModalCompactWrapperComponent {
|
|
1152
|
+
constructor(injector, elementRef, windowRef, canDismissHelper, renderer) {
|
|
1153
|
+
this.injector = injector;
|
|
1154
|
+
this.elementRef = elementRef;
|
|
1155
|
+
this.windowRef = windowRef;
|
|
1156
|
+
this.canDismissHelper = canDismissHelper;
|
|
1157
|
+
this.renderer = renderer;
|
|
1158
|
+
this.scrollY = Math.abs(this.windowRef.nativeWindow.scrollY);
|
|
1159
|
+
this.scrollDisabled = false;
|
|
1160
|
+
this.ionModalDidPresent = new Subject();
|
|
1161
|
+
this.ionModalWillDismiss = new Subject();
|
|
1162
|
+
this.didPresent = firstValueFrom(this.ionModalDidPresent);
|
|
1163
|
+
this.willClose = firstValueFrom(this.ionModalWillDismiss);
|
|
1164
|
+
}
|
|
1165
|
+
ngOnInit() {
|
|
1166
|
+
this.ionModalElement = this.elementRef.nativeElement.closest("ion-modal");
|
|
1167
|
+
this.setAriaLabel();
|
|
1168
|
+
this.listenForIonModalDidPresent();
|
|
1169
|
+
this.listenForIonModalWillDismiss();
|
|
1170
|
+
this.componentPropsInjector = Injector.create({
|
|
1171
|
+
providers: [{
|
|
1172
|
+
provide: COMPONENT_PROPS,
|
|
1173
|
+
useValue: this.config.componentProps
|
|
1174
|
+
}],
|
|
1175
|
+
parent: this.injector
|
|
1176
|
+
});
|
|
1177
|
+
}
|
|
1178
|
+
listenForIonModalDidPresent() {
|
|
1179
|
+
if (this.ionModalElement) this.ionModalElement.addEventListener("ionModalDidPresent", () => {
|
|
1180
|
+
this.ionModalDidPresent.next();
|
|
1181
|
+
this.ionModalDidPresent.complete();
|
|
1182
|
+
});
|
|
1183
|
+
}
|
|
1184
|
+
listenForIonModalWillDismiss() {
|
|
1185
|
+
if (this.ionModalElement) this.ionModalElement.addEventListener("ionModalWillDismiss", () => {
|
|
1186
|
+
this.ionModalWillDismiss.next();
|
|
1187
|
+
this.ionModalWillDismiss.complete();
|
|
1188
|
+
});
|
|
1189
|
+
}
|
|
1190
|
+
setAriaLabel() {
|
|
1191
|
+
const ionModalElementDialog = getIonModalDialogAncestor(this.ionModalElement);
|
|
1192
|
+
const ariaLabel = this.config.htmlAttributes?.["aria-label"];
|
|
1193
|
+
if (ionModalElementDialog && ariaLabel) this.renderer.setAttribute(ionModalElementDialog, "aria-label", ariaLabel);
|
|
1194
|
+
}
|
|
1195
|
+
async close(data) {
|
|
1196
|
+
if (this.ionModalElement) await this.ionModalElement.dismiss(data);
|
|
1197
|
+
}
|
|
1198
|
+
set canDismiss(callback) {
|
|
1199
|
+
this.ionModalElement.canDismiss = this.canDismissHelper.getCanDismissCallback(callback);
|
|
1200
|
+
}
|
|
1201
|
+
onFocusChange() {
|
|
1202
|
+
this.windowRef.nativeWindow.scrollTo({ top: this.scrollY });
|
|
1203
|
+
}
|
|
1204
|
+
static {
|
|
1205
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
1206
|
+
minVersion: "12.0.0",
|
|
1207
|
+
version: "22.2.3",
|
|
1208
|
+
ngImport: i0,
|
|
1209
|
+
type: ModalCompactWrapperComponent,
|
|
1210
|
+
deps: [
|
|
1211
|
+
{ token: i0.Injector },
|
|
1212
|
+
{ token: i0.ElementRef },
|
|
1213
|
+
{ token: i1$2.WindowRef },
|
|
1214
|
+
{ token: CanDismissHelper },
|
|
1215
|
+
{ token: i0.Renderer2 }
|
|
1216
|
+
],
|
|
1217
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
1218
|
+
});
|
|
1219
|
+
}
|
|
1220
|
+
static {
|
|
1221
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
1222
|
+
minVersion: "14.0.0",
|
|
1223
|
+
version: "22.2.3",
|
|
1224
|
+
type: ModalCompactWrapperComponent,
|
|
1225
|
+
isStandalone: true,
|
|
1226
|
+
selector: "kirby-modal-compact-wrapper",
|
|
1227
|
+
inputs: {
|
|
1228
|
+
config: "config",
|
|
1229
|
+
content: "content"
|
|
1230
|
+
},
|
|
1231
|
+
host: {
|
|
1232
|
+
listeners: {
|
|
1233
|
+
"window:focus": "onFocusChange()",
|
|
1234
|
+
"window:focusout": "onFocusChange()"
|
|
1235
|
+
},
|
|
1236
|
+
properties: { "class.ion-page": "false" }
|
|
1237
|
+
},
|
|
1238
|
+
providers: [{
|
|
1239
|
+
provide: Modal,
|
|
1240
|
+
useExisting: ModalCompactWrapperComponent
|
|
1241
|
+
}],
|
|
1242
|
+
ngImport: i0,
|
|
1243
|
+
template: "<!-- Outlet for ModalController -->\n<ng-container\n *ngComponentOutlet=\"config.component; injector: componentPropsInjector\"\n></ng-container>\n\n<!-- Outlet for projected content -->\n<ng-container *ngTemplateOutlet=\"content\"></ng-container>\n",
|
|
1244
|
+
styles: [":host{display:block;padding:var(--kirby-spacing-m) var(--kirby-spacing-s)}\n"],
|
|
1245
|
+
dependencies: [
|
|
1246
|
+
{
|
|
1247
|
+
kind: "ngmodule",
|
|
1248
|
+
type: CommonModule
|
|
1249
|
+
},
|
|
1250
|
+
{
|
|
1251
|
+
kind: "directive",
|
|
1252
|
+
type: i2.NgComponentOutlet,
|
|
1253
|
+
selector: "[ngComponentOutlet]",
|
|
1254
|
+
inputs: [
|
|
1255
|
+
"ngComponentOutlet",
|
|
1256
|
+
"ngComponentOutletInputs",
|
|
1257
|
+
"ngComponentOutletInjector",
|
|
1258
|
+
"ngComponentOutletEnvironmentInjector",
|
|
1259
|
+
"ngComponentOutletContent",
|
|
1260
|
+
"ngComponentOutletNgModule"
|
|
1261
|
+
],
|
|
1262
|
+
exportAs: ["ngComponentOutlet"]
|
|
1263
|
+
},
|
|
1264
|
+
{
|
|
1265
|
+
kind: "directive",
|
|
1266
|
+
type: i2.NgTemplateOutlet,
|
|
1267
|
+
selector: "[ngTemplateOutlet]",
|
|
1268
|
+
inputs: [
|
|
1269
|
+
"ngTemplateOutletContext",
|
|
1270
|
+
"ngTemplateOutlet",
|
|
1271
|
+
"ngTemplateOutletInjector"
|
|
1272
|
+
]
|
|
1273
|
+
}
|
|
1274
|
+
],
|
|
1275
|
+
changeDetection: i0.ChangeDetectionStrategy.Eager
|
|
1276
|
+
});
|
|
1277
|
+
}
|
|
1278
|
+
};
|
|
1279
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1280
|
+
minVersion: "12.0.0",
|
|
1281
|
+
version: "22.2.3",
|
|
1282
|
+
ngImport: i0,
|
|
1283
|
+
type: ModalCompactWrapperComponent,
|
|
1284
|
+
decorators: [{
|
|
1285
|
+
type: Component,
|
|
1286
|
+
args: [{
|
|
1287
|
+
selector: "kirby-modal-compact-wrapper",
|
|
1288
|
+
providers: [{
|
|
1289
|
+
provide: Modal,
|
|
1290
|
+
useExisting: ModalCompactWrapperComponent
|
|
1291
|
+
}],
|
|
1292
|
+
imports: [CommonModule],
|
|
1293
|
+
host: { "[class.ion-page]": "false" },
|
|
1294
|
+
changeDetection: ChangeDetectionStrategy.Eager,
|
|
1295
|
+
template: "<!-- Outlet for ModalController -->\n<ng-container\n *ngComponentOutlet=\"config.component; injector: componentPropsInjector\"\n></ng-container>\n\n<!-- Outlet for projected content -->\n<ng-container *ngTemplateOutlet=\"content\"></ng-container>\n",
|
|
1296
|
+
styles: [":host{display:block;padding:var(--kirby-spacing-m) var(--kirby-spacing-s)}\n"]
|
|
1297
|
+
}]
|
|
1298
|
+
}],
|
|
1299
|
+
ctorParameters: () => [
|
|
1300
|
+
{ type: i0.Injector },
|
|
1301
|
+
{ type: i0.ElementRef },
|
|
1302
|
+
{ type: i1$2.WindowRef },
|
|
1303
|
+
{ type: CanDismissHelper },
|
|
1304
|
+
{ type: i0.Renderer2 }
|
|
1305
|
+
],
|
|
1306
|
+
propDecorators: {
|
|
1307
|
+
config: [{ type: Input }],
|
|
1308
|
+
content: [{ type: Input }],
|
|
1309
|
+
onFocusChange: [{
|
|
1310
|
+
type: HostListener,
|
|
1311
|
+
args: ["window:focus"]
|
|
1312
|
+
}, {
|
|
1313
|
+
type: HostListener,
|
|
1314
|
+
args: ["window:focusout"]
|
|
1315
|
+
}]
|
|
1316
|
+
}
|
|
1317
|
+
});
|
|
1318
|
+
var ModalAnimationBuilderService = class ModalAnimationBuilderService {
|
|
1319
|
+
constructor(platform) {
|
|
1320
|
+
this.platform = platform;
|
|
1321
|
+
this.easingEnter = KirbyAnimation.Easing.modal.enter;
|
|
1322
|
+
this.easingLeave = KirbyAnimation.Easing.modal.exit;
|
|
1323
|
+
this.duration = KirbyAnimation.Duration.LONG;
|
|
1324
|
+
this.SwipeToCloseDefaults = { MIN_PRESENTING_SCALE: .93 };
|
|
1325
|
+
this.createEnterAnimation = () => {
|
|
1326
|
+
return {
|
|
1327
|
+
backdropAnimation: createAnimation().fromTo("opacity", .01, "var(--backdrop-opacity)").beforeStyles({ "pointer-events": "none" }).afterClearStyles(["pointer-events"]),
|
|
1328
|
+
wrapperAnimation: createAnimation().fromTo("transform", "translateY(100vh)", "translateY(0vh)")
|
|
1329
|
+
};
|
|
1330
|
+
};
|
|
1331
|
+
this.createLeaveAnimation = () => {
|
|
1332
|
+
return {
|
|
1333
|
+
backdropAnimation: createAnimation().fromTo("opacity", "var(--backdrop-opacity)", 0),
|
|
1334
|
+
wrapperAnimation: createAnimation().fromTo("transform", "translateY(0vh)", "translateY(100vh)")
|
|
1335
|
+
};
|
|
1336
|
+
};
|
|
1337
|
+
this.getElementRoot = (el, fallback = el) => {
|
|
1338
|
+
return el.shadowRoot || fallback;
|
|
1339
|
+
};
|
|
1340
|
+
}
|
|
1341
|
+
enterAnimation(currentBackdrop) {
|
|
1342
|
+
return (baseEl, opts) => {
|
|
1343
|
+
const { presentingEl } = opts;
|
|
1344
|
+
const root = this.getElementRoot(baseEl);
|
|
1345
|
+
const { wrapperAnimation, backdropAnimation } = this.createEnterAnimation();
|
|
1346
|
+
backdropAnimation.addElement(root.querySelector("ion-backdrop"));
|
|
1347
|
+
wrapperAnimation.addElement(root.querySelectorAll(".modal-wrapper, .modal-shadow")).beforeStyles({ opacity: 1 });
|
|
1348
|
+
const baseAnimation = createAnimation("entering-base").addElement(baseEl).easing(this.easingEnter).duration(this.duration).addAnimation(wrapperAnimation);
|
|
1349
|
+
let currentBackdropAnimation;
|
|
1350
|
+
if (currentBackdrop) currentBackdropAnimation = createAnimation().addElement(currentBackdrop).fromTo("opacity", "var(--backdrop-opacity)", .01);
|
|
1351
|
+
if (presentingEl) {
|
|
1352
|
+
const isMobile = !this.platform.isPhabletOrBigger();
|
|
1353
|
+
const hasCardModal = presentingEl.tagName === "ION-MODAL" && presentingEl.presentingElement !== void 0;
|
|
1354
|
+
const presentingElRoot = this.getElementRoot(presentingEl);
|
|
1355
|
+
const presentingAnimation = createAnimation().beforeStyles({
|
|
1356
|
+
transform: "translateY(0)",
|
|
1357
|
+
"transform-origin": "top center",
|
|
1358
|
+
overflow: "hidden"
|
|
1359
|
+
});
|
|
1360
|
+
const bodyEl = document.body;
|
|
1361
|
+
if (isMobile) {
|
|
1362
|
+
const transformOffset = !CSS.supports("width", "max(0px, 1px)") ? "30px" : "max(30px, var(--ion-safe-area-top))";
|
|
1363
|
+
const finalTransform = `translateY(${hasCardModal ? "-10px" : transformOffset}) scale(${this.SwipeToCloseDefaults.MIN_PRESENTING_SCALE})`;
|
|
1364
|
+
presentingAnimation.afterStyles({ transform: finalTransform }).beforeAddWrite(() => bodyEl.style.setProperty("background-color", "black")).addElement(presentingEl).keyframes([{
|
|
1365
|
+
offset: 0,
|
|
1366
|
+
filter: "contrast(1)",
|
|
1367
|
+
transform: "translateY(0px) scale(1)",
|
|
1368
|
+
borderRadius: "0px"
|
|
1369
|
+
}, {
|
|
1370
|
+
offset: 1,
|
|
1371
|
+
filter: "contrast(0.85)",
|
|
1372
|
+
transform: finalTransform,
|
|
1373
|
+
borderRadius: "10px 10px 0 0"
|
|
1374
|
+
}]);
|
|
1375
|
+
baseAnimation.addAnimation(presentingAnimation);
|
|
1376
|
+
} else {
|
|
1377
|
+
baseAnimation.addAnimation(backdropAnimation);
|
|
1378
|
+
if (currentBackdropAnimation) baseAnimation.addAnimation(currentBackdropAnimation);
|
|
1379
|
+
if (!hasCardModal) wrapperAnimation.fromTo("opacity", "0", "1");
|
|
1380
|
+
else {
|
|
1381
|
+
const finalTransform = `translateY(-10px) scale(${hasCardModal ? this.SwipeToCloseDefaults.MIN_PRESENTING_SCALE : 1})`;
|
|
1382
|
+
presentingAnimation.afterStyles({ transform: finalTransform }).addElement(presentingElRoot.querySelector(".modal-wrapper")).keyframes([{
|
|
1383
|
+
offset: 0,
|
|
1384
|
+
filter: "contrast(1)",
|
|
1385
|
+
transform: "translateY(0) scale(1)"
|
|
1386
|
+
}, {
|
|
1387
|
+
offset: 1,
|
|
1388
|
+
filter: "contrast(0.85)",
|
|
1389
|
+
transform: finalTransform
|
|
1390
|
+
}]);
|
|
1391
|
+
const shadowAnimation = createAnimation().afterStyles({ transform: finalTransform }).addElement(presentingElRoot.querySelector(".modal-shadow")).keyframes([{
|
|
1392
|
+
offset: 0,
|
|
1393
|
+
opacity: "1",
|
|
1394
|
+
transform: "translateY(0) scale(1)"
|
|
1395
|
+
}, {
|
|
1396
|
+
offset: 1,
|
|
1397
|
+
opacity: "0",
|
|
1398
|
+
transform: finalTransform
|
|
1399
|
+
}]);
|
|
1400
|
+
baseAnimation.addAnimation([presentingAnimation, shadowAnimation]);
|
|
1401
|
+
}
|
|
1402
|
+
}
|
|
1403
|
+
} else {
|
|
1404
|
+
baseAnimation.addAnimation(backdropAnimation);
|
|
1405
|
+
if (currentBackdropAnimation) baseAnimation.addAnimation(currentBackdropAnimation);
|
|
1406
|
+
}
|
|
1407
|
+
return baseAnimation;
|
|
1408
|
+
};
|
|
1409
|
+
}
|
|
1410
|
+
leaveAnimation(currentBackdrop) {
|
|
1411
|
+
return (baseEl, opts, duration = this.duration) => {
|
|
1412
|
+
const { presentingEl } = opts;
|
|
1413
|
+
const root = this.getElementRoot(baseEl);
|
|
1414
|
+
const { wrapperAnimation, backdropAnimation } = this.createLeaveAnimation();
|
|
1415
|
+
backdropAnimation.addElement(root.querySelector("ion-backdrop"));
|
|
1416
|
+
wrapperAnimation.addElement(root.querySelectorAll(".modal-wrapper, .modal-shadow")).beforeStyles({ opacity: 1 });
|
|
1417
|
+
const baseAnimation = createAnimation("leaving-base").addElement(baseEl).easing(this.easingLeave).duration(duration).addAnimation(wrapperAnimation);
|
|
1418
|
+
let currentBackdropAnimation;
|
|
1419
|
+
if (currentBackdrop) currentBackdropAnimation = createAnimation().addElement(currentBackdrop).fromTo("opacity", .01, "var(--backdrop-opacity)").afterStyles({ opacity: "var(--backdrop-opacity)" });
|
|
1420
|
+
if (presentingEl) {
|
|
1421
|
+
const isMobile = !this.platform.isPhabletOrBigger();
|
|
1422
|
+
const hasCardModal = presentingEl.tagName === "ION-MODAL" && presentingEl.presentingElement !== void 0;
|
|
1423
|
+
const presentingElRoot = this.getElementRoot(presentingEl);
|
|
1424
|
+
const presentingAnimation = createAnimation().beforeClearStyles(["transform"]).afterClearStyles(["transform"]).onFinish((currentStep) => {
|
|
1425
|
+
if (currentStep !== 1) return;
|
|
1426
|
+
presentingEl.style.setProperty("overflow", "");
|
|
1427
|
+
if (Array.from(bodyEl.querySelectorAll("ion-modal")).filter((m) => m.presentingElement !== void 0).length <= 1) bodyEl.style.setProperty("background-color", "");
|
|
1428
|
+
});
|
|
1429
|
+
const bodyEl = document.body;
|
|
1430
|
+
if (isMobile) {
|
|
1431
|
+
const transformOffset = !CSS.supports("width", "max(0px, 1px)") ? "30px" : "max(30px, var(--ion-safe-area-top))";
|
|
1432
|
+
const finalTransform = `translateY(${hasCardModal ? "-10px" : transformOffset}) scale(${this.SwipeToCloseDefaults.MIN_PRESENTING_SCALE})`;
|
|
1433
|
+
presentingAnimation.addElement(presentingEl).keyframes([{
|
|
1434
|
+
offset: 0,
|
|
1435
|
+
filter: "contrast(0.85)",
|
|
1436
|
+
transform: finalTransform,
|
|
1437
|
+
borderRadius: "10px 10px 0 0"
|
|
1438
|
+
}, {
|
|
1439
|
+
offset: 1,
|
|
1440
|
+
filter: "contrast(1)",
|
|
1441
|
+
transform: "translateY(0px) scale(1)",
|
|
1442
|
+
borderRadius: "0px"
|
|
1443
|
+
}]);
|
|
1444
|
+
baseAnimation.addAnimation(presentingAnimation);
|
|
1445
|
+
} else {
|
|
1446
|
+
baseAnimation.addAnimation(backdropAnimation);
|
|
1447
|
+
if (currentBackdropAnimation) baseAnimation.addAnimation(currentBackdropAnimation);
|
|
1448
|
+
if (!hasCardModal) wrapperAnimation.fromTo("opacity", "1", "0");
|
|
1449
|
+
else {
|
|
1450
|
+
const finalTransform = `translateY(-10px) scale(${hasCardModal ? this.SwipeToCloseDefaults.MIN_PRESENTING_SCALE : 1})`;
|
|
1451
|
+
presentingAnimation.addElement(presentingElRoot.querySelector(".modal-wrapper")).afterStyles({ transform: "translate3d(0, 0, 0)" }).keyframes([{
|
|
1452
|
+
offset: 0,
|
|
1453
|
+
filter: "contrast(0.85)",
|
|
1454
|
+
transform: finalTransform
|
|
1455
|
+
}, {
|
|
1456
|
+
offset: 1,
|
|
1457
|
+
filter: "contrast(1)",
|
|
1458
|
+
transform: "translateY(0) scale(1)"
|
|
1459
|
+
}]);
|
|
1460
|
+
const shadowAnimation = createAnimation().addElement(presentingElRoot.querySelector(".modal-shadow")).afterStyles({ transform: "translateY(0) scale(1)" }).keyframes([{
|
|
1461
|
+
offset: 0,
|
|
1462
|
+
opacity: "0",
|
|
1463
|
+
transform: finalTransform
|
|
1464
|
+
}, {
|
|
1465
|
+
offset: 1,
|
|
1466
|
+
opacity: "1",
|
|
1467
|
+
transform: "translateY(0) scale(1)"
|
|
1468
|
+
}]);
|
|
1469
|
+
baseAnimation.addAnimation([presentingAnimation, shadowAnimation]);
|
|
1470
|
+
}
|
|
1471
|
+
}
|
|
1472
|
+
} else {
|
|
1473
|
+
baseAnimation.addAnimation(backdropAnimation);
|
|
1474
|
+
if (currentBackdropAnimation) baseAnimation.addAnimation(currentBackdropAnimation);
|
|
1475
|
+
}
|
|
1476
|
+
return baseAnimation;
|
|
1477
|
+
};
|
|
1478
|
+
}
|
|
1479
|
+
static {
|
|
1480
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
1481
|
+
minVersion: "12.0.0",
|
|
1482
|
+
version: "22.2.3",
|
|
1483
|
+
ngImport: i0,
|
|
1484
|
+
type: ModalAnimationBuilderService,
|
|
1485
|
+
deps: [{ token: i3.PlatformService }],
|
|
1486
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
1487
|
+
});
|
|
1488
|
+
}
|
|
1489
|
+
static {
|
|
1490
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
1491
|
+
minVersion: "12.0.0",
|
|
1492
|
+
version: "22.2.3",
|
|
1493
|
+
ngImport: i0,
|
|
1494
|
+
type: ModalAnimationBuilderService,
|
|
1495
|
+
providedIn: "root"
|
|
1496
|
+
});
|
|
1497
|
+
}
|
|
1498
|
+
};
|
|
1499
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1500
|
+
minVersion: "12.0.0",
|
|
1501
|
+
version: "22.2.3",
|
|
1502
|
+
ngImport: i0,
|
|
1503
|
+
type: ModalAnimationBuilderService,
|
|
1504
|
+
decorators: [{
|
|
1505
|
+
type: Injectable,
|
|
1506
|
+
args: [{ providedIn: "root" }]
|
|
1507
|
+
}],
|
|
1508
|
+
ctorParameters: () => [{ type: i3.PlatformService }]
|
|
1509
|
+
});
|
|
1510
|
+
var ModalNavigationService = class ModalNavigationService {
|
|
1511
|
+
constructor(router, route) {
|
|
1512
|
+
this.router = router;
|
|
1513
|
+
this.route = route;
|
|
1514
|
+
this.routerEvents$ = defer(() => {
|
|
1515
|
+
const events = this.router.events;
|
|
1516
|
+
return events.closed ? EMPTY : events;
|
|
1517
|
+
});
|
|
1518
|
+
this.navigationEndListener$ = this.routerEvents$.pipe(filter((event) => event instanceof NavigationEnd));
|
|
1519
|
+
}
|
|
1520
|
+
isModalRoute(url) {
|
|
1521
|
+
return url.includes("(modal:");
|
|
1522
|
+
}
|
|
1523
|
+
getCurrentActivatedRoute() {
|
|
1524
|
+
let childRoute = this.route.root;
|
|
1525
|
+
while (childRoute.firstChild) childRoute = childRoute.firstChild;
|
|
1526
|
+
return childRoute;
|
|
1527
|
+
}
|
|
1528
|
+
async getModalRoutes(routeConfig, moduleRootRoutePath) {
|
|
1529
|
+
const flattenedRoutes = [].concat(...routeConfig);
|
|
1530
|
+
let modalRoutes = [];
|
|
1531
|
+
const moduleRootPaths = await this.getModuleRootPath(flattenedRoutes, moduleRootRoutePath);
|
|
1532
|
+
if (moduleRootPaths) modalRoutes = this.getModalRoutePaths(flattenedRoutes, moduleRootPaths);
|
|
1533
|
+
return modalRoutes;
|
|
1534
|
+
}
|
|
1535
|
+
async getModuleRootPath(routes, moduleRootRoutePath) {
|
|
1536
|
+
if (moduleRootRoutePath) {
|
|
1537
|
+
const trimmedPaths = moduleRootRoutePath.trim().split("/").filter((path) => !!path);
|
|
1538
|
+
return [""].concat(trimmedPaths);
|
|
1539
|
+
}
|
|
1540
|
+
const currentRoutePaths = await this.getCurrentRoutePaths();
|
|
1541
|
+
return this.getRoutePathsWithoutChildSegments(currentRoutePaths, routes);
|
|
1542
|
+
}
|
|
1543
|
+
async getCurrentRoutePaths() {
|
|
1544
|
+
const rootPath = [""];
|
|
1545
|
+
const currentNavigation = this.router.currentNavigation();
|
|
1546
|
+
if (!this.router.navigated && !currentNavigation) return rootPath;
|
|
1547
|
+
if (currentNavigation) await firstValueFrom(this.navigationEndListener$);
|
|
1548
|
+
let childRoute = this.route.snapshot.root;
|
|
1549
|
+
while (childRoute.firstChild) childRoute = childRoute.firstChild;
|
|
1550
|
+
const currentBackdropRoutePath = childRoute.pathFromRoot.filter((route) => route.outlet !== "modal");
|
|
1551
|
+
return rootPath.concat(...currentBackdropRoutePath.map((route) => route.url.filter((segment) => !!segment.path).map((segment) => segment.path)));
|
|
1552
|
+
}
|
|
1553
|
+
getRoutePathsWithoutChildSegments(routePaths, routes) {
|
|
1554
|
+
if (!routePaths.length) return routePaths;
|
|
1555
|
+
const matchedChildRoute = this.findChildRouteForUrl(routePaths.join("/"), routes);
|
|
1556
|
+
if (!matchedChildRoute) return routePaths;
|
|
1557
|
+
const childSegmentCount = matchedChildRoute.replace(/^\//, "").split("/").length;
|
|
1558
|
+
return routePaths.slice(0, -childSegmentCount);
|
|
1559
|
+
}
|
|
1560
|
+
findChildRouteForUrl(url, routes) {
|
|
1561
|
+
const moduleRelativePaths = this.getRoutePaths(routes, [""]).sort().reverse();
|
|
1562
|
+
let matchedChildRoute = moduleRelativePaths.find((path) => url.endsWith(path));
|
|
1563
|
+
if (!matchedChildRoute) {
|
|
1564
|
+
const exactMatch = false;
|
|
1565
|
+
matchedChildRoute = moduleRelativePaths.find((path) => path.includes("/:") && this.pathContainsChildRouteWithUrlParams(url, path, exactMatch));
|
|
1566
|
+
}
|
|
1567
|
+
return matchedChildRoute;
|
|
1568
|
+
}
|
|
1569
|
+
pathContainsChildRouteWithUrlParams(path, childRouteWithUrlParams, exactMatch) {
|
|
1570
|
+
const pathSegments = path.split("/");
|
|
1571
|
+
const startSlashRegex = /^\//;
|
|
1572
|
+
let childRouteToMatch = childRouteWithUrlParams;
|
|
1573
|
+
if (!exactMatch) childRouteToMatch = childRouteWithUrlParams.replace(startSlashRegex, "");
|
|
1574
|
+
const pathContainsChildRoute = childRouteToMatch.split("/").reverse().every((childRouteSegment) => {
|
|
1575
|
+
const pathSegment = pathSegments.pop();
|
|
1576
|
+
return childRouteSegment.startsWith(":") || childRouteSegment === pathSegment;
|
|
1577
|
+
});
|
|
1578
|
+
if (exactMatch) return pathSegments.length === 0 && pathContainsChildRoute;
|
|
1579
|
+
return pathContainsChildRoute;
|
|
1580
|
+
}
|
|
1581
|
+
getRoutePaths(routes, parentPath) {
|
|
1582
|
+
return Array.isArray(routes) ? [].concat(...routes.map((route) => this.getRoutePath(route, parentPath))) : [];
|
|
1583
|
+
}
|
|
1584
|
+
getRoutePath(route, parentPath) {
|
|
1585
|
+
const routes = [];
|
|
1586
|
+
if (route.outlet) return routes;
|
|
1587
|
+
const currentPath = [...parentPath];
|
|
1588
|
+
if (route.path) {
|
|
1589
|
+
currentPath.push(route.path);
|
|
1590
|
+
routes.push(currentPath.join("/"));
|
|
1591
|
+
}
|
|
1592
|
+
return routes.concat(this.getRoutePaths(route.children, currentPath));
|
|
1593
|
+
}
|
|
1594
|
+
getModalRoutePath(route, parentPath) {
|
|
1595
|
+
const modalOutletName = "modal";
|
|
1596
|
+
if (!!route.path && route.outlet === modalOutletName) {
|
|
1597
|
+
const modalOutletPath = `(${modalOutletName}:${route.path})`;
|
|
1598
|
+
return [[...parentPath, modalOutletPath].join("/")];
|
|
1599
|
+
}
|
|
1600
|
+
const currentPath = [...parentPath];
|
|
1601
|
+
if (route.path) currentPath.push(route.path);
|
|
1602
|
+
return [].concat(...this.getModalRoutePaths(route.children, currentPath));
|
|
1603
|
+
}
|
|
1604
|
+
getModalRoutePaths(routes, parentPath) {
|
|
1605
|
+
return Array.isArray(routes) ? [].concat(...routes.map((route) => this.getModalRoutePath(route, parentPath))) : [];
|
|
1606
|
+
}
|
|
1607
|
+
isNewModalWindow(navigationEnd) {
|
|
1608
|
+
const currentNavigation = this.router.currentNavigation();
|
|
1609
|
+
if (!currentNavigation || !currentNavigation.previousNavigation) return true;
|
|
1610
|
+
const previousRoutePath = (currentNavigation.previousNavigation.finalUrl || currentNavigation.previousNavigation.extractedUrl).toString();
|
|
1611
|
+
const wasModalRoute = this.isModalRoute(previousRoutePath);
|
|
1612
|
+
const isModalRoute = this.isModalRoute(navigationEnd.urlAfterRedirects);
|
|
1613
|
+
if (!wasModalRoute && isModalRoute) return true;
|
|
1614
|
+
const currentModalRouteParent = navigationEnd.urlAfterRedirects.split("/(modal:")[0];
|
|
1615
|
+
return previousRoutePath.split("/(modal:")[0] !== currentModalRouteParent;
|
|
1616
|
+
}
|
|
1617
|
+
async waitForCurrentThenGetNavigationEndStream() {
|
|
1618
|
+
if (this.router.currentNavigation()) {
|
|
1619
|
+
const currentNavigationEnd = await firstValueFrom(this.navigationEndListener$);
|
|
1620
|
+
return this.navigationEndListener$.pipe(startWith(currentNavigationEnd));
|
|
1621
|
+
}
|
|
1622
|
+
return this.navigationEndListener$;
|
|
1623
|
+
}
|
|
1624
|
+
modalRouteActivatedFor(navigationEnd$, modalRouteSet, modalRoutesContainsUrlParams) {
|
|
1625
|
+
return navigationEnd$.pipe(filter((navigationEnd) => this.modalRouteSetContainsPath(modalRouteSet, navigationEnd, modalRoutesContainsUrlParams)), map((navigationEnd) => {
|
|
1626
|
+
return {
|
|
1627
|
+
route: this.getCurrentActivatedRoute(),
|
|
1628
|
+
isNewModal: this.isNewModalWindow(navigationEnd)
|
|
1629
|
+
};
|
|
1630
|
+
}));
|
|
1631
|
+
}
|
|
1632
|
+
modalRouteDeactivatedFor(navigationEnd$, modalRouteSet, modalRoutesContainsUrlParams) {
|
|
1633
|
+
return navigationEnd$.pipe(pairwise(), filter(([prevNavigation, _]) => this.modalRouteSetContainsPath(modalRouteSet, prevNavigation, modalRoutesContainsUrlParams)), map(([_, currentNavigation]) => {
|
|
1634
|
+
return !this.isModalRoute(currentNavigation.urlAfterRedirects) || this.isNewModalWindow(currentNavigation);
|
|
1635
|
+
}), filter((isDeactivation) => isDeactivation));
|
|
1636
|
+
}
|
|
1637
|
+
modalRouteSetContainsPath(modalRouteSet, navigationEnd, modalRoutesContainsUrlParams) {
|
|
1638
|
+
const pathname = navigationEnd.urlAfterRedirects.split("?")[0];
|
|
1639
|
+
let hasRoute = modalRouteSet.has(pathname);
|
|
1640
|
+
if (!hasRoute && modalRoutesContainsUrlParams) {
|
|
1641
|
+
for (const route of modalRouteSet) if (this.pathContainsChildRouteWithUrlParams(pathname, route, true)) {
|
|
1642
|
+
hasRoute = true;
|
|
1643
|
+
break;
|
|
1644
|
+
}
|
|
1645
|
+
}
|
|
1646
|
+
return hasRoute;
|
|
1647
|
+
}
|
|
1648
|
+
async getModalNavigation(routeConfig, moduleRootRoutePath) {
|
|
1649
|
+
if (Array.isArray(routeConfig)) {
|
|
1650
|
+
const navigationEnd$ = await this.waitForCurrentThenGetNavigationEndStream();
|
|
1651
|
+
const modalRoutes = await this.getModalRoutes(routeConfig, moduleRootRoutePath);
|
|
1652
|
+
if (modalRoutes.length > 0) {
|
|
1653
|
+
const modalRoutesContainsUrlParams = modalRoutes.some((route) => route.includes("/:"));
|
|
1654
|
+
const modalRouteSet = new Set(modalRoutes);
|
|
1655
|
+
return {
|
|
1656
|
+
activated$: this.modalRouteActivatedFor(navigationEnd$, modalRouteSet, modalRoutesContainsUrlParams),
|
|
1657
|
+
deactivated$: this.modalRouteDeactivatedFor(navigationEnd$, modalRouteSet, modalRoutesContainsUrlParams)
|
|
1658
|
+
};
|
|
1659
|
+
}
|
|
1660
|
+
}
|
|
1661
|
+
return {
|
|
1662
|
+
activated$: EMPTY,
|
|
1663
|
+
deactivated$: EMPTY
|
|
1664
|
+
};
|
|
1665
|
+
}
|
|
1666
|
+
async navigateToModal(path, queryParams) {
|
|
1667
|
+
const commands = Array.isArray(path) ? [...path] : path.split("/");
|
|
1668
|
+
const childPath = commands.pop();
|
|
1669
|
+
return await this.router.navigate([...commands, { outlets: { modal: [childPath] } }], {
|
|
1670
|
+
queryParams,
|
|
1671
|
+
relativeTo: this.getCurrentActivatedRoute()
|
|
1672
|
+
});
|
|
1673
|
+
}
|
|
1674
|
+
async navigateWithinModal(relativePath, queryParams) {
|
|
1675
|
+
return this.router.navigate([relativePath], {
|
|
1676
|
+
queryParams,
|
|
1677
|
+
relativeTo: this.getCurrentActivatedRoute()
|
|
1678
|
+
});
|
|
1679
|
+
}
|
|
1680
|
+
async navigateOutOfModalOutlet() {
|
|
1681
|
+
const currentActivatedRoute = this.getCurrentActivatedRoute();
|
|
1682
|
+
const currentNavigationFinalUrl = this.router.currentNavigation()?.finalUrl?.toString();
|
|
1683
|
+
const isCurrentlyNavigatingOutOfModalOutlet = currentNavigationFinalUrl && !this.isModalRoute(currentNavigationFinalUrl);
|
|
1684
|
+
if (currentActivatedRoute.outlet !== "modal" || isCurrentlyNavigatingOutOfModalOutlet) return Promise.resolve(true);
|
|
1685
|
+
const parentRoute = this.getBackdropRoute(currentActivatedRoute);
|
|
1686
|
+
return this.router.navigate(["./"], { relativeTo: parentRoute });
|
|
1687
|
+
}
|
|
1688
|
+
getBackdropRoute(currentActivatedRoute) {
|
|
1689
|
+
let parentRoute = currentActivatedRoute.parent;
|
|
1690
|
+
while (parentRoute && !parentRoute.component && !!parentRoute.parent) parentRoute = parentRoute.parent;
|
|
1691
|
+
return parentRoute;
|
|
1692
|
+
}
|
|
1693
|
+
handleBrowserBackButton(modal) {
|
|
1694
|
+
const popstateNavigationStart$ = this.routerEvents$.pipe(filter((event) => event instanceof NavigationStart && event.navigationTrigger === "popstate"));
|
|
1695
|
+
this.routerEvents$.pipe(filter((event) => event instanceof NavigationEnd)).pipe(skipUntil(popstateNavigationStart$), takeUntil(modal.onWillDismiss())).subscribe(() => {
|
|
1696
|
+
modal.dismiss();
|
|
1697
|
+
});
|
|
1698
|
+
}
|
|
1699
|
+
static {
|
|
1700
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
1701
|
+
minVersion: "12.0.0",
|
|
1702
|
+
version: "22.2.3",
|
|
1703
|
+
ngImport: i0,
|
|
1704
|
+
type: ModalNavigationService,
|
|
1705
|
+
deps: [{ token: i5.Router }, { token: i5.ActivatedRoute }],
|
|
1706
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
1707
|
+
});
|
|
1708
|
+
}
|
|
1709
|
+
static {
|
|
1710
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
1711
|
+
minVersion: "12.0.0",
|
|
1712
|
+
version: "22.2.3",
|
|
1713
|
+
ngImport: i0,
|
|
1714
|
+
type: ModalNavigationService,
|
|
1715
|
+
providedIn: "root"
|
|
1716
|
+
});
|
|
1717
|
+
}
|
|
1718
|
+
};
|
|
1719
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1720
|
+
minVersion: "12.0.0",
|
|
1721
|
+
version: "22.2.3",
|
|
1722
|
+
ngImport: i0,
|
|
1723
|
+
type: ModalNavigationService,
|
|
1724
|
+
decorators: [{
|
|
1725
|
+
type: Injectable,
|
|
1726
|
+
args: [{ providedIn: "root" }]
|
|
1727
|
+
}],
|
|
1728
|
+
ctorParameters: () => [{ type: i5.Router }, { type: i5.ActivatedRoute }]
|
|
1729
|
+
});
|
|
1730
|
+
var ModalHelper = class ModalHelper {
|
|
1731
|
+
constructor(ionicModalController, modalAnimationBuilder, modalNavigationService, windowRef, canDismissHelper) {
|
|
1732
|
+
this.ionicModalController = ionicModalController;
|
|
1733
|
+
this.modalAnimationBuilder = modalAnimationBuilder;
|
|
1734
|
+
this.modalNavigationService = modalNavigationService;
|
|
1735
|
+
this.windowRef = windowRef;
|
|
1736
|
+
this.canDismissHelper = canDismissHelper;
|
|
1737
|
+
this.isModalOpening = false;
|
|
1738
|
+
}
|
|
1739
|
+
async showModalWindow(config) {
|
|
1740
|
+
if (this.isModalOpening) return;
|
|
1741
|
+
config.flavor = config.flavor || "modal";
|
|
1742
|
+
let currentBackdrop;
|
|
1743
|
+
const topMostModal = await this.ionicModalController.getTop();
|
|
1744
|
+
if (topMostModal) currentBackdrop = topMostModal.shadowRoot.querySelector("ion-backdrop");
|
|
1745
|
+
const enterAnimation = this.modalAnimationBuilder.enterAnimation(currentBackdrop);
|
|
1746
|
+
const leaveAnimation = this.modalAnimationBuilder.leaveAnimation(currentBackdrop);
|
|
1747
|
+
const defaultModalSize = config.interactWithBackground ? null : "medium";
|
|
1748
|
+
const modalSize = config.size || defaultModalSize;
|
|
1749
|
+
const allow_scroll_class = "allow-background-scroll";
|
|
1750
|
+
let customCssClasses = [];
|
|
1751
|
+
if (config.cssClass) customCssClasses = Array.isArray(config.cssClass) ? config.cssClass : [config.cssClass];
|
|
1752
|
+
if (config.interactWithBackground) this.windowRef.nativeWindow.document.body.classList.add(allow_scroll_class);
|
|
1753
|
+
let canDismiss = true;
|
|
1754
|
+
if (config.canDismiss) canDismiss = this.canDismissHelper.getCanDismissCallback(config.canDismiss);
|
|
1755
|
+
this.isModalOpening = true;
|
|
1756
|
+
const ionModal = await this.ionicModalController.create({
|
|
1757
|
+
component: config.flavor === "compact" ? ModalCompactWrapperComponent : ModalWrapperComponent,
|
|
1758
|
+
cssClass: [
|
|
1759
|
+
"kirby-overlay",
|
|
1760
|
+
"kirby-modal",
|
|
1761
|
+
modalSize ? `kirby-modal-${modalSize}` : null,
|
|
1762
|
+
config.flavor === "drawer" ? "kirby-drawer" : null,
|
|
1763
|
+
config.flavor === "compact" ? "kirby-modal-compact" : null,
|
|
1764
|
+
config.interactWithBackground ? "interact-with-background" : null,
|
|
1765
|
+
...customCssClasses
|
|
1766
|
+
],
|
|
1767
|
+
backdropDismiss: config.flavor === "compact" || config.interactWithBackground ? false : true,
|
|
1768
|
+
showBackdrop: !config.interactWithBackground,
|
|
1769
|
+
componentProps: { config },
|
|
1770
|
+
htmlAttributes: { ...config.htmlAttributes },
|
|
1771
|
+
keyboardClose: false,
|
|
1772
|
+
canDismiss,
|
|
1773
|
+
enterAnimation,
|
|
1774
|
+
leaveAnimation
|
|
1775
|
+
});
|
|
1776
|
+
if (config.interactWithBackground) ionModal.onDidDismiss().then(() => {
|
|
1777
|
+
this.windowRef.nativeWindow.document.body.classList.remove(allow_scroll_class);
|
|
1778
|
+
});
|
|
1779
|
+
if (config.customHeight) ionModal.style.setProperty("--kirby-modal-height", config.customHeight);
|
|
1780
|
+
const onWillDismiss = ionModal.onWillDismiss();
|
|
1781
|
+
const overlay = {
|
|
1782
|
+
dismiss: ionModal.dismiss.bind(ionModal),
|
|
1783
|
+
onWillDismiss,
|
|
1784
|
+
onDidDismiss: ionModal.onDidDismiss(),
|
|
1785
|
+
isDismissing: false
|
|
1786
|
+
};
|
|
1787
|
+
onWillDismiss.then(() => {
|
|
1788
|
+
overlay.isDismissing = true;
|
|
1789
|
+
});
|
|
1790
|
+
await ionModal.present();
|
|
1791
|
+
if (!ionModal.contains(document.activeElement)) ionModal.focus();
|
|
1792
|
+
if (!config.modalRoute) this.modalNavigationService.handleBrowserBackButton(ionModal);
|
|
1793
|
+
this.isModalOpening = false;
|
|
1794
|
+
return overlay;
|
|
1795
|
+
}
|
|
1796
|
+
static {
|
|
1797
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
1798
|
+
minVersion: "12.0.0",
|
|
1799
|
+
version: "22.2.3",
|
|
1800
|
+
ngImport: i0,
|
|
1801
|
+
type: ModalHelper,
|
|
1802
|
+
deps: [
|
|
1803
|
+
{ token: i1$1.ModalController },
|
|
1804
|
+
{ token: ModalAnimationBuilderService },
|
|
1805
|
+
{ token: ModalNavigationService },
|
|
1806
|
+
{ token: i1$2.WindowRef },
|
|
1807
|
+
{ token: CanDismissHelper }
|
|
1808
|
+
],
|
|
1809
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
1810
|
+
});
|
|
1811
|
+
}
|
|
1812
|
+
static {
|
|
1813
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
1814
|
+
minVersion: "12.0.0",
|
|
1815
|
+
version: "22.2.3",
|
|
1816
|
+
ngImport: i0,
|
|
1817
|
+
type: ModalHelper
|
|
1818
|
+
});
|
|
1819
|
+
}
|
|
1820
|
+
};
|
|
1821
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1822
|
+
minVersion: "12.0.0",
|
|
1823
|
+
version: "22.2.3",
|
|
1824
|
+
ngImport: i0,
|
|
1825
|
+
type: ModalHelper,
|
|
1826
|
+
decorators: [{ type: Injectable }],
|
|
1827
|
+
ctorParameters: () => [
|
|
1828
|
+
{ type: i1$1.ModalController },
|
|
1829
|
+
{ type: ModalAnimationBuilderService },
|
|
1830
|
+
{ type: ModalNavigationService },
|
|
1831
|
+
{ type: i1$2.WindowRef },
|
|
1832
|
+
{ type: CanDismissHelper }
|
|
1833
|
+
]
|
|
1834
|
+
});
|
|
1835
|
+
const KIRBY_ACTION_SHEET_DEPRECATION_WARNING = "[Kirby action sheet] Deprecated - Use Menu component instead";
|
|
1836
|
+
var ActionSheetComponent = class ActionSheetComponent {
|
|
1837
|
+
constructor() {
|
|
1838
|
+
this.cancelButtonText = "Cancel";
|
|
1839
|
+
this.hideCancel = false;
|
|
1840
|
+
this.disabled = false;
|
|
1841
|
+
this.cancel = new EventEmitter();
|
|
1842
|
+
this.itemSelect = new EventEmitter();
|
|
1843
|
+
console.warn(KIRBY_ACTION_SHEET_DEPRECATION_WARNING);
|
|
1844
|
+
}
|
|
1845
|
+
onItemSelect(selection) {
|
|
1846
|
+
this.itemSelect.emit(selection);
|
|
1847
|
+
}
|
|
1848
|
+
onCancel() {
|
|
1849
|
+
this.cancel.emit();
|
|
1850
|
+
}
|
|
1851
|
+
static {
|
|
1852
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
1853
|
+
minVersion: "12.0.0",
|
|
1854
|
+
version: "22.2.3",
|
|
1855
|
+
ngImport: i0,
|
|
1856
|
+
type: ActionSheetComponent,
|
|
1857
|
+
deps: [],
|
|
1858
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
1859
|
+
});
|
|
1860
|
+
}
|
|
1861
|
+
static {
|
|
1862
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
1863
|
+
minVersion: "17.0.0",
|
|
1864
|
+
version: "22.2.3",
|
|
1865
|
+
type: ActionSheetComponent,
|
|
1866
|
+
isStandalone: true,
|
|
1867
|
+
selector: "kirby-action-sheet",
|
|
1868
|
+
inputs: {
|
|
1869
|
+
cancelButtonText: "cancelButtonText",
|
|
1870
|
+
hideCancel: "hideCancel",
|
|
1871
|
+
disabled: "disabled",
|
|
1872
|
+
header: "header",
|
|
1873
|
+
subheader: "subheader",
|
|
1874
|
+
items: "items"
|
|
1875
|
+
},
|
|
1876
|
+
outputs: {
|
|
1877
|
+
cancel: "cancel",
|
|
1878
|
+
itemSelect: "itemSelect"
|
|
1879
|
+
},
|
|
1880
|
+
ngImport: i0,
|
|
1881
|
+
template: "<kirby-card>\n @if (header) {\n <kirby-card-header\n [title]=\"header\"\n [isTitleBold]=\"true\"\n [subtitle]=\"subheader\"\n ></kirby-card-header>\n }\n @for (item of items; track item.id) {\n <button\n kirby-button\n expand=\"block\"\n size=\"lg\"\n [noDecoration]=\"true\"\n (click)=\"onItemSelect(item)\"\n >\n {{ item.text }}\n </button>\n }\n</kirby-card>\n@if (!hideCancel) {\n <button kirby-button class=\"cancel-btn\" size=\"lg\" attentionLevel=\"3\" (click)=\"onCancel()\">\n {{ cancelButtonText }}\n </button>\n}\n",
|
|
1882
|
+
styles: [".kirby-line-clamp{display:-webkit-box;-webkit-line-clamp:var(--line-clamp, none);-webkit-box-orient:vertical;overflow:hidden}:host{--kirby-internal-margin-horizontal-default: var(--kirby-spacing-l)}@media(max-width:320px){:host{--kirby-internal-margin-horizontal-default: var(--kirby-spacing-s)}}:host{--kirby-internal-margin-horizontal-total: calc( 2 * var(--kirby-action-sheet-margin-horizontal, var(--kirby-internal-margin-horizontal-default)) );display:flex;flex-direction:column;align-items:center;justify-content:flex-end;margin:0 auto;width:calc(100vw - var(--kirby-internal-margin-horizontal-total));max-width:calc(375px - var(--kirby-internal-margin-horizontal-total));padding-bottom:var(--kirby-safe-area-bottom, 0)}:host button[kirby-button].no-decoration:focus-visible{transition:all 80ms linear 0ms;box-shadow:var(--kirby-focus-ring-md-inset)}kirby-card{align-self:stretch;pointer-events:auto;box-shadow:var(--kirby-elevation-8)}kirby-card button[kirby-button]{margin:0;border-radius:0}kirby-card button[kirby-button]:not(:focus){border-top:1px solid var(--kirby-background-color)}.cancel-btn:focus-visible{transition:all 80ms linear 0ms;box-shadow:var(--kirby-elevation-8),var(--kirby-focus-ring-md-inset)}.cancel-btn{font-weight:var(--kirby-font-weight-bold);margin-top:var(--kirby-spacing-s);margin-bottom:var(--kirby-spacing-m);pointer-events:auto}\n"],
|
|
1883
|
+
dependencies: [
|
|
1884
|
+
{
|
|
1885
|
+
kind: "component",
|
|
1886
|
+
type: CardComponent,
|
|
1887
|
+
selector: "kirby-card",
|
|
1888
|
+
inputs: [
|
|
1889
|
+
"title",
|
|
1890
|
+
"subtitle",
|
|
1891
|
+
"backgroundImageUrl",
|
|
1892
|
+
"hasPadding",
|
|
1893
|
+
"sizes",
|
|
1894
|
+
"variant"
|
|
1895
|
+
]
|
|
1896
|
+
},
|
|
1897
|
+
{
|
|
1898
|
+
kind: "component",
|
|
1899
|
+
type: CardHeaderComponent,
|
|
1900
|
+
selector: "kirby-card-header",
|
|
1901
|
+
inputs: [
|
|
1902
|
+
"title",
|
|
1903
|
+
"subtitle",
|
|
1904
|
+
"isTitleBold",
|
|
1905
|
+
"flagged",
|
|
1906
|
+
"hasPadding"
|
|
1907
|
+
]
|
|
1908
|
+
},
|
|
1909
|
+
{
|
|
1910
|
+
kind: "component",
|
|
1911
|
+
type: ButtonComponent,
|
|
1912
|
+
selector: "button[kirby-button],Button[kirby-button],a[kirby-button]",
|
|
1913
|
+
inputs: [
|
|
1914
|
+
"attentionLevel",
|
|
1915
|
+
"noDecoration",
|
|
1916
|
+
"themeColor",
|
|
1917
|
+
"expand",
|
|
1918
|
+
"isFloating",
|
|
1919
|
+
"size",
|
|
1920
|
+
"showIconOnly"
|
|
1921
|
+
]
|
|
1922
|
+
}
|
|
1923
|
+
],
|
|
1924
|
+
changeDetection: i0.ChangeDetectionStrategy.Eager
|
|
1925
|
+
});
|
|
1926
|
+
}
|
|
1927
|
+
};
|
|
1928
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1929
|
+
minVersion: "12.0.0",
|
|
1930
|
+
version: "22.2.3",
|
|
1931
|
+
ngImport: i0,
|
|
1932
|
+
type: ActionSheetComponent,
|
|
1933
|
+
decorators: [{
|
|
1934
|
+
type: Component,
|
|
1935
|
+
args: [{
|
|
1936
|
+
imports: [
|
|
1937
|
+
CardComponent,
|
|
1938
|
+
CardHeaderComponent,
|
|
1939
|
+
ButtonComponent
|
|
1940
|
+
],
|
|
1941
|
+
selector: "kirby-action-sheet",
|
|
1942
|
+
changeDetection: ChangeDetectionStrategy.Eager,
|
|
1943
|
+
template: "<kirby-card>\n @if (header) {\n <kirby-card-header\n [title]=\"header\"\n [isTitleBold]=\"true\"\n [subtitle]=\"subheader\"\n ></kirby-card-header>\n }\n @for (item of items; track item.id) {\n <button\n kirby-button\n expand=\"block\"\n size=\"lg\"\n [noDecoration]=\"true\"\n (click)=\"onItemSelect(item)\"\n >\n {{ item.text }}\n </button>\n }\n</kirby-card>\n@if (!hideCancel) {\n <button kirby-button class=\"cancel-btn\" size=\"lg\" attentionLevel=\"3\" (click)=\"onCancel()\">\n {{ cancelButtonText }}\n </button>\n}\n",
|
|
1944
|
+
styles: [".kirby-line-clamp{display:-webkit-box;-webkit-line-clamp:var(--line-clamp, none);-webkit-box-orient:vertical;overflow:hidden}:host{--kirby-internal-margin-horizontal-default: var(--kirby-spacing-l)}@media(max-width:320px){:host{--kirby-internal-margin-horizontal-default: var(--kirby-spacing-s)}}:host{--kirby-internal-margin-horizontal-total: calc( 2 * var(--kirby-action-sheet-margin-horizontal, var(--kirby-internal-margin-horizontal-default)) );display:flex;flex-direction:column;align-items:center;justify-content:flex-end;margin:0 auto;width:calc(100vw - var(--kirby-internal-margin-horizontal-total));max-width:calc(375px - var(--kirby-internal-margin-horizontal-total));padding-bottom:var(--kirby-safe-area-bottom, 0)}:host button[kirby-button].no-decoration:focus-visible{transition:all 80ms linear 0ms;box-shadow:var(--kirby-focus-ring-md-inset)}kirby-card{align-self:stretch;pointer-events:auto;box-shadow:var(--kirby-elevation-8)}kirby-card button[kirby-button]{margin:0;border-radius:0}kirby-card button[kirby-button]:not(:focus){border-top:1px solid var(--kirby-background-color)}.cancel-btn:focus-visible{transition:all 80ms linear 0ms;box-shadow:var(--kirby-elevation-8),var(--kirby-focus-ring-md-inset)}.cancel-btn{font-weight:var(--kirby-font-weight-bold);margin-top:var(--kirby-spacing-s);margin-bottom:var(--kirby-spacing-m);pointer-events:auto}\n"]
|
|
1945
|
+
}]
|
|
1946
|
+
}],
|
|
1947
|
+
ctorParameters: () => [],
|
|
1948
|
+
propDecorators: {
|
|
1949
|
+
cancelButtonText: [{ type: Input }],
|
|
1950
|
+
hideCancel: [{ type: Input }],
|
|
1951
|
+
disabled: [{ type: Input }],
|
|
1952
|
+
header: [{ type: Input }],
|
|
1953
|
+
subheader: [{ type: Input }],
|
|
1954
|
+
items: [{ type: Input }],
|
|
1955
|
+
cancel: [{ type: Output }],
|
|
1956
|
+
itemSelect: [{ type: Output }]
|
|
1957
|
+
}
|
|
1958
|
+
});
|
|
1959
|
+
var ActionSheetHelper = class ActionSheetHelper {
|
|
1960
|
+
constructor(ionicModalController) {
|
|
1961
|
+
this.ionicModalController = ionicModalController;
|
|
1962
|
+
}
|
|
1963
|
+
async showActionSheet(config) {
|
|
1964
|
+
const cancel = new EventEmitter();
|
|
1965
|
+
const itemSelect = new EventEmitter();
|
|
1966
|
+
const ionModal = await this.ionicModalController.create({
|
|
1967
|
+
component: ActionSheetComponent,
|
|
1968
|
+
cssClass: ["kirby-overlay", "kirby-action-sheet"],
|
|
1969
|
+
componentProps: {
|
|
1970
|
+
...config,
|
|
1971
|
+
cancel,
|
|
1972
|
+
itemSelect
|
|
1973
|
+
},
|
|
1974
|
+
backdropDismiss: true
|
|
1975
|
+
});
|
|
1976
|
+
ionModal.shadowRoot.querySelector(".modal-shadow").remove();
|
|
1977
|
+
const cancelSubscription = cancel.subscribe(() => ionModal.dismiss());
|
|
1978
|
+
const itemSelectSubscription = itemSelect.subscribe((item) => ionModal.dismiss(item));
|
|
1979
|
+
ionModal.onDidDismiss().then(() => {
|
|
1980
|
+
cancelSubscription.unsubscribe();
|
|
1981
|
+
itemSelectSubscription.unsubscribe();
|
|
1982
|
+
});
|
|
1983
|
+
await ionModal.present();
|
|
1984
|
+
return {
|
|
1985
|
+
dismiss: ionModal.dismiss.bind(ionModal),
|
|
1986
|
+
onWillDismiss: ionModal.onWillDismiss(),
|
|
1987
|
+
onDidDismiss: ionModal.onDidDismiss()
|
|
1988
|
+
};
|
|
1989
|
+
}
|
|
1990
|
+
static {
|
|
1991
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
1992
|
+
minVersion: "12.0.0",
|
|
1993
|
+
version: "22.2.3",
|
|
1994
|
+
ngImport: i0,
|
|
1995
|
+
type: ActionSheetHelper,
|
|
1996
|
+
deps: [{ token: i1$1.ModalController }],
|
|
1997
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
1998
|
+
});
|
|
1999
|
+
}
|
|
2000
|
+
static {
|
|
2001
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
2002
|
+
minVersion: "12.0.0",
|
|
2003
|
+
version: "22.2.3",
|
|
2004
|
+
ngImport: i0,
|
|
2005
|
+
type: ActionSheetHelper
|
|
2006
|
+
});
|
|
2007
|
+
}
|
|
2008
|
+
};
|
|
2009
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
2010
|
+
minVersion: "12.0.0",
|
|
2011
|
+
version: "22.2.3",
|
|
2012
|
+
ngImport: i0,
|
|
2013
|
+
type: ActionSheetHelper,
|
|
2014
|
+
decorators: [{ type: Injectable }],
|
|
2015
|
+
ctorParameters: () => [{ type: i1$1.ModalController }]
|
|
2016
|
+
});
|
|
2017
|
+
var ModalController = class ModalController {
|
|
2018
|
+
constructor(modalHelper, actionSheetHelper, alertHelper, modalNavigationService, routeConfig) {
|
|
2019
|
+
this.modalHelper = modalHelper;
|
|
2020
|
+
this.actionSheetHelper = actionSheetHelper;
|
|
2021
|
+
this.alertHelper = alertHelper;
|
|
2022
|
+
this.modalNavigationService = modalNavigationService;
|
|
2023
|
+
this.routeConfig = routeConfig;
|
|
2024
|
+
this.overlays = [];
|
|
2025
|
+
this.noOverlayRegisteredErrorMessage = "No modal overlays are currently registered";
|
|
2026
|
+
this.destroy$ = new Subject();
|
|
2027
|
+
}
|
|
2028
|
+
async initialize(moduleRootRoutePath) {
|
|
2029
|
+
const modalNavigation = await this.modalNavigationService.getModalNavigation(this.routeConfig, moduleRootRoutePath);
|
|
2030
|
+
this.onModalRouteActivated(modalNavigation.activated$);
|
|
2031
|
+
this.onModalRouteDeactivated(modalNavigation.deactivated$);
|
|
2032
|
+
}
|
|
2033
|
+
onModalRouteActivated(modalRouteActivated$) {
|
|
2034
|
+
const navigateOnWillClose = () => {
|
|
2035
|
+
this.modalNavigationService.navigateOutOfModalOutlet();
|
|
2036
|
+
};
|
|
2037
|
+
const siblingModalRouteActivated$ = modalRouteActivated$.pipe(filter((modalRouteActivation) => !modalRouteActivation.isNewModal), map((modalRouteActivation) => modalRouteActivation.route));
|
|
2038
|
+
modalRouteActivated$.pipe(takeUntil(this.destroy$), filter(() => this.overlays.length === 0)).subscribe(async (modalRouteActivation) => {
|
|
2039
|
+
if (modalRouteActivation.isNewModal) await this.showModalRoute(modalRouteActivation.route, siblingModalRouteActivated$, navigateOnWillClose);
|
|
2040
|
+
});
|
|
2041
|
+
}
|
|
2042
|
+
onModalRouteDeactivated(modalRouteDeactivated$) {
|
|
2043
|
+
modalRouteDeactivated$.pipe(takeUntil(this.destroy$), filter(() => this.overlays.some((overlay) => overlay.isDismissing !== true))).subscribe(async () => {
|
|
2044
|
+
await this.hideAll();
|
|
2045
|
+
});
|
|
2046
|
+
}
|
|
2047
|
+
async showModal(config, onClose) {
|
|
2048
|
+
await this.showAndRegisterOverlay(() => this.modalHelper.showModalWindow(config), onClose);
|
|
2049
|
+
}
|
|
2050
|
+
async navigateToModal(path, queryParams) {
|
|
2051
|
+
return this.modalNavigationService.navigateToModal(path, queryParams);
|
|
2052
|
+
}
|
|
2053
|
+
async navigateWithinModal(relativePath, queryParams) {
|
|
2054
|
+
return this.modalNavigationService.navigateWithinModal(relativePath, queryParams);
|
|
2055
|
+
}
|
|
2056
|
+
async showModalRoute(modalRoute, siblingModalRouteActivated$, onWillClose) {
|
|
2057
|
+
const config = {
|
|
2058
|
+
...modalRoute.snapshot.data.modalConfig,
|
|
2059
|
+
component: null,
|
|
2060
|
+
modalRoute,
|
|
2061
|
+
siblingModalRouteActivated$
|
|
2062
|
+
};
|
|
2063
|
+
await this.showAndRegisterOverlay(() => this.modalHelper.showModalWindow(config), null, onWillClose);
|
|
2064
|
+
}
|
|
2065
|
+
async showActionSheet(config, onClose) {
|
|
2066
|
+
await this.showAndRegisterOverlay(() => this.actionSheetHelper.showActionSheet(config), onClose);
|
|
2067
|
+
}
|
|
2068
|
+
async showAlert(config, onClose) {
|
|
2069
|
+
await this.showAndRegisterOverlay(() => this.alertHelper.showAlert(config), onClose);
|
|
2070
|
+
}
|
|
2071
|
+
async showAndRegisterOverlay(showOverlay, onCloseOverlay, onWillCloseOverlay) {
|
|
2072
|
+
const overlay = await showOverlay();
|
|
2073
|
+
if (!overlay) return;
|
|
2074
|
+
this.overlays.push(overlay);
|
|
2075
|
+
if (typeof onWillCloseOverlay === "function") overlay.onWillDismiss.then((event) => onWillCloseOverlay(event.data));
|
|
2076
|
+
overlay.onDidDismiss.then((event) => {
|
|
2077
|
+
this.overlays.pop();
|
|
2078
|
+
if (typeof onCloseOverlay === "function") onCloseOverlay(event.data);
|
|
2079
|
+
});
|
|
2080
|
+
}
|
|
2081
|
+
async hideTopmost(data) {
|
|
2082
|
+
const overlay = this.overlays[this.overlays.length - 1];
|
|
2083
|
+
if (!overlay) throw new Error(this.noOverlayRegisteredErrorMessage);
|
|
2084
|
+
return overlay.dismiss(data);
|
|
2085
|
+
}
|
|
2086
|
+
async hideAll() {
|
|
2087
|
+
await Promise.all(this.overlays.filter((overlay) => overlay.isDismissing !== true).map(async (overlay) => {
|
|
2088
|
+
await overlay.dismiss();
|
|
2089
|
+
}));
|
|
2090
|
+
}
|
|
2091
|
+
getTopMost() {
|
|
2092
|
+
return this.overlays[this.overlays.length - 1];
|
|
2093
|
+
}
|
|
2094
|
+
ngOnDestroy() {
|
|
2095
|
+
this.destroy$.next();
|
|
2096
|
+
this.destroy$.complete();
|
|
2097
|
+
}
|
|
2098
|
+
static {
|
|
2099
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
2100
|
+
minVersion: "12.0.0",
|
|
2101
|
+
version: "22.2.3",
|
|
2102
|
+
ngImport: i0,
|
|
2103
|
+
type: ModalController,
|
|
2104
|
+
deps: [
|
|
2105
|
+
{ token: ModalHelper },
|
|
2106
|
+
{ token: ActionSheetHelper },
|
|
2107
|
+
{ token: AlertHelper },
|
|
2108
|
+
{ token: ModalNavigationService },
|
|
2109
|
+
{
|
|
2110
|
+
token: ROUTES,
|
|
2111
|
+
optional: true
|
|
2112
|
+
}
|
|
2113
|
+
],
|
|
2114
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
2115
|
+
});
|
|
2116
|
+
}
|
|
2117
|
+
static {
|
|
2118
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
2119
|
+
minVersion: "12.0.0",
|
|
2120
|
+
version: "22.2.3",
|
|
2121
|
+
ngImport: i0,
|
|
2122
|
+
type: ModalController
|
|
2123
|
+
});
|
|
2124
|
+
}
|
|
2125
|
+
};
|
|
2126
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
2127
|
+
minVersion: "12.0.0",
|
|
2128
|
+
version: "22.2.3",
|
|
2129
|
+
ngImport: i0,
|
|
2130
|
+
type: ModalController,
|
|
2131
|
+
decorators: [{ type: Injectable }],
|
|
2132
|
+
ctorParameters: () => [
|
|
2133
|
+
{ type: ModalHelper },
|
|
2134
|
+
{ type: ActionSheetHelper },
|
|
2135
|
+
{ type: AlertHelper },
|
|
2136
|
+
{ type: ModalNavigationService },
|
|
2137
|
+
{
|
|
2138
|
+
type: void 0,
|
|
2139
|
+
decorators: [{ type: Optional }, {
|
|
2140
|
+
type: Inject,
|
|
2141
|
+
args: [ROUTES]
|
|
2142
|
+
}]
|
|
2143
|
+
}
|
|
2144
|
+
]
|
|
2145
|
+
});
|
|
1719
2146
|
const CanDismissModalGuard = async (_component, _currentRoute, currentState, nextState) => {
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
return topMostModal.dismiss();
|
|
1734
|
-
}
|
|
1735
|
-
else {
|
|
1736
|
-
// Declarative modals are not created through Kirby Modalcontroller, let's try Ionic:
|
|
1737
|
-
const ionicModalController = inject(ModalController$1);
|
|
1738
|
-
const ionModal = await ionicModalController.getTop();
|
|
1739
|
-
if (ionModal) {
|
|
1740
|
-
return ionModal.dismiss();
|
|
1741
|
-
}
|
|
1742
|
-
}
|
|
1743
|
-
return true;
|
|
2147
|
+
const modalNavService = inject(ModalNavigationService);
|
|
2148
|
+
const currentRouteIsModal = modalNavService.isModalRoute(currentState.url);
|
|
2149
|
+
const nextRouteIsModal = modalNavService.isModalRoute(nextState.url);
|
|
2150
|
+
if (currentRouteIsModal && nextRouteIsModal) return true;
|
|
2151
|
+
const topMostModal = inject(ModalController).getTopMost();
|
|
2152
|
+
if (topMostModal) {
|
|
2153
|
+
if (topMostModal.isDismissing) return true;
|
|
2154
|
+
return topMostModal.dismiss();
|
|
2155
|
+
} else {
|
|
2156
|
+
const ionModal = await inject(ModalController$1).getTop();
|
|
2157
|
+
if (ionModal) return ionModal.dismiss();
|
|
2158
|
+
}
|
|
2159
|
+
return true;
|
|
1744
2160
|
};
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
class
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
2161
|
+
var ModalComponent = class ModalComponent {
|
|
2162
|
+
set canDismiss(canDismiss) {
|
|
2163
|
+
typeof canDismiss === "boolean" ? this._canDismiss = canDismiss : this._canDismiss = this.canDismissHelper.getCanDismissCallback(canDismiss);
|
|
2164
|
+
}
|
|
2165
|
+
constructor(canDismissHelper, modalNavigationService, windowRef, elementRef) {
|
|
2166
|
+
this.canDismissHelper = canDismissHelper;
|
|
2167
|
+
this.modalNavigationService = modalNavigationService;
|
|
2168
|
+
this.windowRef = windowRef;
|
|
2169
|
+
this.elementRef = elementRef;
|
|
2170
|
+
this.isOpen = false;
|
|
2171
|
+
this.size = "medium";
|
|
2172
|
+
this.scrollDisabled = false;
|
|
2173
|
+
this.collapseTitle = false;
|
|
2174
|
+
this.customHeight = void 0;
|
|
2175
|
+
this.flavor = "modal";
|
|
2176
|
+
this.drawerSupplementaryAction = void 0;
|
|
2177
|
+
this.interactWithBackground = false;
|
|
2178
|
+
this.willPresent = new EventEmitter();
|
|
2179
|
+
this.didPresent = new EventEmitter();
|
|
2180
|
+
this.didDismiss = new EventEmitter();
|
|
2181
|
+
this.willDismiss = new EventEmitter();
|
|
2182
|
+
this._config = {
|
|
2183
|
+
collapseTitle: this.collapseTitle,
|
|
2184
|
+
customHeight: this.customHeight,
|
|
2185
|
+
flavor: this.flavor,
|
|
2186
|
+
drawerSupplementaryAction: this.drawerSupplementaryAction,
|
|
2187
|
+
interactWithBackground: this.interactWithBackground
|
|
2188
|
+
};
|
|
2189
|
+
this._canDismiss = true;
|
|
2190
|
+
}
|
|
2191
|
+
ngOnInit() {
|
|
2192
|
+
this.forwardAriaLabel();
|
|
2193
|
+
}
|
|
2194
|
+
ngOnChanges(changes) {
|
|
2195
|
+
this.updateModalConfigOnChange(changes);
|
|
2196
|
+
}
|
|
2197
|
+
scrollToTop(scrollDuration) {
|
|
2198
|
+
this.ionContent.scrollToTop(scrollDuration);
|
|
2199
|
+
}
|
|
2200
|
+
scrollToBottom(scrollDuration) {
|
|
2201
|
+
this.ionContent.scrollToBottom(scrollDuration);
|
|
2202
|
+
}
|
|
2203
|
+
_onWillPresent(event) {
|
|
2204
|
+
this.willPresent.emit(event);
|
|
2205
|
+
if (this.interactWithBackground) this.windowRef.nativeWindow.document.body.classList.add("allow-background-scroll");
|
|
2206
|
+
}
|
|
2207
|
+
_onDidPresent(event) {
|
|
2208
|
+
this.modalNavigationService.handleBrowserBackButton(this.modalElement.nativeElement);
|
|
2209
|
+
this.didPresent.emit(event);
|
|
2210
|
+
}
|
|
2211
|
+
_onWillDismiss(event) {
|
|
2212
|
+
if (this.interactWithBackground) this.windowRef.nativeWindow.document.body.classList.remove("allow-background-scroll");
|
|
2213
|
+
this.willDismiss.emit(event);
|
|
2214
|
+
}
|
|
2215
|
+
_onDidDismiss(event) {
|
|
2216
|
+
this.didDismiss.emit(event);
|
|
2217
|
+
}
|
|
2218
|
+
updateModalConfigOnChange(changes) {
|
|
2219
|
+
Object.entries(changes).forEach(([key]) => {
|
|
2220
|
+
if (key in this._config) this._config[key] = changes[key].currentValue;
|
|
2221
|
+
});
|
|
2222
|
+
}
|
|
2223
|
+
forwardAriaLabel() {
|
|
2224
|
+
this._config.htmlAttributes = { "aria-label": inheritAriaLabelText(this.elementRef.nativeElement) };
|
|
2225
|
+
}
|
|
2226
|
+
static {
|
|
2227
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
2228
|
+
minVersion: "12.0.0",
|
|
2229
|
+
version: "22.2.3",
|
|
2230
|
+
ngImport: i0,
|
|
2231
|
+
type: ModalComponent,
|
|
2232
|
+
deps: [
|
|
2233
|
+
{ token: CanDismissHelper },
|
|
2234
|
+
{ token: ModalNavigationService },
|
|
2235
|
+
{ token: i1$2.WindowRef },
|
|
2236
|
+
{ token: i0.ElementRef }
|
|
2237
|
+
],
|
|
2238
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
2239
|
+
});
|
|
2240
|
+
}
|
|
2241
|
+
static {
|
|
2242
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
2243
|
+
minVersion: "17.0.0",
|
|
2244
|
+
version: "22.2.3",
|
|
2245
|
+
type: ModalComponent,
|
|
2246
|
+
isStandalone: true,
|
|
2247
|
+
selector: "kirby-modal",
|
|
2248
|
+
inputs: {
|
|
2249
|
+
isOpen: "isOpen",
|
|
2250
|
+
trigger: "trigger",
|
|
2251
|
+
size: "size",
|
|
2252
|
+
scrollDisabled: "scrollDisabled",
|
|
2253
|
+
canDismiss: "canDismiss",
|
|
2254
|
+
collapseTitle: "collapseTitle",
|
|
2255
|
+
customHeight: "customHeight",
|
|
2256
|
+
flavor: "flavor",
|
|
2257
|
+
drawerSupplementaryAction: "drawerSupplementaryAction",
|
|
2258
|
+
interactWithBackground: "interactWithBackground"
|
|
2259
|
+
},
|
|
2260
|
+
outputs: {
|
|
2261
|
+
willPresent: "willPresent",
|
|
2262
|
+
didPresent: "didPresent",
|
|
2263
|
+
didDismiss: "didDismiss",
|
|
2264
|
+
willDismiss: "willDismiss"
|
|
2265
|
+
},
|
|
2266
|
+
queries: [{
|
|
2267
|
+
propertyName: "template",
|
|
2268
|
+
first: true,
|
|
2269
|
+
predicate: TemplateRef,
|
|
2270
|
+
descendants: true,
|
|
2271
|
+
static: true
|
|
2272
|
+
}],
|
|
2273
|
+
viewQueries: [{
|
|
2274
|
+
propertyName: "modalElement",
|
|
2275
|
+
first: true,
|
|
2276
|
+
predicate: IonModal,
|
|
2277
|
+
descendants: true,
|
|
2278
|
+
read: ElementRef,
|
|
2279
|
+
static: true
|
|
2280
|
+
}, {
|
|
2281
|
+
propertyName: "ionContent",
|
|
2282
|
+
first: true,
|
|
2283
|
+
predicate: IonContent,
|
|
2284
|
+
descendants: true
|
|
2285
|
+
}],
|
|
2286
|
+
usesOnChanges: true,
|
|
2287
|
+
ngImport: i0,
|
|
2288
|
+
template: "<ion-modal\n class=\"kirby-modal kirby-overlay kirby-modal-{{ size }}\"\n [ngClass]=\"[\n flavor === 'compact' ? 'kirby-modal-compact' : 'kirby-' + flavor,\n interactWithBackground ? 'interact-with-background' : '',\n ]\"\n [isOpen]=\"isOpen\"\n [trigger]=\"trigger\"\n [canDismiss]=\"_canDismiss\"\n [showBackdrop]=\"!interactWithBackground\"\n [style.--kirby-modal-height]=\"customHeight\"\n (willPresent)=\"_onWillPresent($event)\"\n (didPresent)=\"_onDidPresent($event)\"\n (willDismiss)=\"_onWillDismiss($event)\"\n (didDismiss)=\"_onDidDismiss($event)\"\n>\n <ng-template>\n @if (flavor === 'compact') {\n <kirby-modal-compact-wrapper\n [config]=\"_config\"\n [content]=\"template\"\n ></kirby-modal-compact-wrapper>\n } @else {\n <kirby-modal-wrapper\n class=\"ion-page\"\n [config]=\"_config\"\n [content]=\"template\"\n [scrollDisabled]=\"scrollDisabled\"\n ></kirby-modal-wrapper>\n }\n </ng-template>\n</ion-modal>\n",
|
|
2289
|
+
dependencies: [
|
|
2290
|
+
{
|
|
2291
|
+
kind: "ngmodule",
|
|
2292
|
+
type: CommonModule
|
|
2293
|
+
},
|
|
2294
|
+
{
|
|
2295
|
+
kind: "directive",
|
|
2296
|
+
type: i2.NgClass,
|
|
2297
|
+
selector: "[ngClass]",
|
|
2298
|
+
inputs: ["class", "ngClass"]
|
|
2299
|
+
},
|
|
2300
|
+
{
|
|
2301
|
+
kind: "component",
|
|
2302
|
+
type: IonModal,
|
|
2303
|
+
selector: "ion-modal"
|
|
2304
|
+
},
|
|
2305
|
+
{
|
|
2306
|
+
kind: "component",
|
|
2307
|
+
type: ModalWrapperComponent,
|
|
2308
|
+
selector: "kirby-modal-wrapper",
|
|
2309
|
+
inputs: [
|
|
2310
|
+
"scrollDisabled",
|
|
2311
|
+
"config",
|
|
2312
|
+
"content"
|
|
2313
|
+
]
|
|
2314
|
+
},
|
|
2315
|
+
{
|
|
2316
|
+
kind: "component",
|
|
2317
|
+
type: ModalCompactWrapperComponent,
|
|
2318
|
+
selector: "kirby-modal-compact-wrapper",
|
|
2319
|
+
inputs: ["config", "content"]
|
|
2320
|
+
}
|
|
2321
|
+
],
|
|
2322
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
2323
|
+
});
|
|
2324
|
+
}
|
|
2325
|
+
};
|
|
2326
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
2327
|
+
minVersion: "12.0.0",
|
|
2328
|
+
version: "22.2.3",
|
|
2329
|
+
ngImport: i0,
|
|
2330
|
+
type: ModalComponent,
|
|
2331
|
+
decorators: [{
|
|
2332
|
+
type: Component,
|
|
2333
|
+
args: [{
|
|
2334
|
+
selector: "kirby-modal",
|
|
2335
|
+
imports: [
|
|
2336
|
+
CommonModule,
|
|
2337
|
+
IconComponent,
|
|
2338
|
+
IonModal,
|
|
2339
|
+
ModalWrapperComponent,
|
|
2340
|
+
ModalCompactWrapperComponent
|
|
2341
|
+
],
|
|
2342
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
2343
|
+
template: "<ion-modal\n class=\"kirby-modal kirby-overlay kirby-modal-{{ size }}\"\n [ngClass]=\"[\n flavor === 'compact' ? 'kirby-modal-compact' : 'kirby-' + flavor,\n interactWithBackground ? 'interact-with-background' : '',\n ]\"\n [isOpen]=\"isOpen\"\n [trigger]=\"trigger\"\n [canDismiss]=\"_canDismiss\"\n [showBackdrop]=\"!interactWithBackground\"\n [style.--kirby-modal-height]=\"customHeight\"\n (willPresent)=\"_onWillPresent($event)\"\n (didPresent)=\"_onDidPresent($event)\"\n (willDismiss)=\"_onWillDismiss($event)\"\n (didDismiss)=\"_onDidDismiss($event)\"\n>\n <ng-template>\n @if (flavor === 'compact') {\n <kirby-modal-compact-wrapper\n [config]=\"_config\"\n [content]=\"template\"\n ></kirby-modal-compact-wrapper>\n } @else {\n <kirby-modal-wrapper\n class=\"ion-page\"\n [config]=\"_config\"\n [content]=\"template\"\n [scrollDisabled]=\"scrollDisabled\"\n ></kirby-modal-wrapper>\n }\n </ng-template>\n</ion-modal>\n"
|
|
2344
|
+
}]
|
|
2345
|
+
}],
|
|
2346
|
+
ctorParameters: () => [
|
|
2347
|
+
{ type: CanDismissHelper },
|
|
2348
|
+
{ type: ModalNavigationService },
|
|
2349
|
+
{ type: i1$2.WindowRef },
|
|
2350
|
+
{ type: i0.ElementRef }
|
|
2351
|
+
],
|
|
2352
|
+
propDecorators: {
|
|
2353
|
+
modalElement: [{
|
|
2354
|
+
type: ViewChild,
|
|
2355
|
+
args: [IonModal, {
|
|
2356
|
+
static: true,
|
|
2357
|
+
read: ElementRef
|
|
2358
|
+
}]
|
|
2359
|
+
}],
|
|
2360
|
+
ionContent: [{
|
|
2361
|
+
type: ViewChild,
|
|
2362
|
+
args: [IonContent]
|
|
2363
|
+
}],
|
|
2364
|
+
template: [{
|
|
2365
|
+
type: ContentChild,
|
|
2366
|
+
args: [TemplateRef, { static: true }]
|
|
2367
|
+
}],
|
|
2368
|
+
isOpen: [{ type: Input }],
|
|
2369
|
+
trigger: [{ type: Input }],
|
|
2370
|
+
size: [{ type: Input }],
|
|
2371
|
+
scrollDisabled: [{ type: Input }],
|
|
2372
|
+
canDismiss: [{ type: Input }],
|
|
2373
|
+
collapseTitle: [{ type: Input }],
|
|
2374
|
+
customHeight: [{ type: Input }],
|
|
2375
|
+
flavor: [{ type: Input }],
|
|
2376
|
+
drawerSupplementaryAction: [{ type: Input }],
|
|
2377
|
+
interactWithBackground: [{ type: Input }],
|
|
2378
|
+
willPresent: [{ type: Output }],
|
|
2379
|
+
didPresent: [{ type: Output }],
|
|
2380
|
+
didDismiss: [{ type: Output }],
|
|
2381
|
+
willDismiss: [{ type: Output }]
|
|
2382
|
+
}
|
|
2383
|
+
});
|
|
2384
|
+
var ModalFooterComponent = class ModalFooterComponent extends ModalElementComponent {
|
|
2385
|
+
get _cssClass() {
|
|
2386
|
+
return [
|
|
2387
|
+
this.themeColor,
|
|
2388
|
+
this.type,
|
|
2389
|
+
this.surface
|
|
2390
|
+
].filter((cssClass) => !!cssClass);
|
|
2391
|
+
}
|
|
2392
|
+
get surface() {
|
|
2393
|
+
if (this.type === "inline") return null;
|
|
2394
|
+
return this.themeColor === "light" ? "kirby-surface-base" : "kirby-surface-raised";
|
|
2395
|
+
}
|
|
2396
|
+
constructor(elementRef, modalElementsAdvertiser) {
|
|
2397
|
+
super(ModalElementType.FOOTER, elementRef, modalElementsAdvertiser);
|
|
2398
|
+
this.snapToKeyboard = false;
|
|
2399
|
+
this.type = "fixed";
|
|
2400
|
+
this.themeColor = "white";
|
|
2401
|
+
}
|
|
2402
|
+
static {
|
|
2403
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
2404
|
+
minVersion: "12.0.0",
|
|
2405
|
+
version: "22.2.3",
|
|
2406
|
+
ngImport: i0,
|
|
2407
|
+
type: ModalFooterComponent,
|
|
2408
|
+
deps: [{ token: i0.ElementRef }, {
|
|
2409
|
+
token: ModalElementsAdvertiser,
|
|
2410
|
+
optional: true
|
|
2411
|
+
}],
|
|
2412
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
2413
|
+
});
|
|
2414
|
+
}
|
|
2415
|
+
static {
|
|
2416
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
2417
|
+
minVersion: "14.0.0",
|
|
2418
|
+
version: "22.2.3",
|
|
2419
|
+
type: ModalFooterComponent,
|
|
2420
|
+
isStandalone: true,
|
|
2421
|
+
selector: "kirby-modal-footer",
|
|
2422
|
+
inputs: {
|
|
2423
|
+
snapToKeyboard: "snapToKeyboard",
|
|
2424
|
+
type: "type",
|
|
2425
|
+
themeColor: "themeColor"
|
|
2426
|
+
},
|
|
2427
|
+
host: { properties: {
|
|
2428
|
+
"class.snap-to-keyboard": "this.snapToKeyboard",
|
|
2429
|
+
"class": "this._cssClass"
|
|
2430
|
+
} },
|
|
2431
|
+
usesInheritance: true,
|
|
2432
|
+
ngImport: i0,
|
|
2433
|
+
template: "<ion-footer role=\"presentation\">\n <ng-content></ng-content>\n</ion-footer>\n",
|
|
2434
|
+
styles: [".kirby-line-clamp{display:-webkit-box;-webkit-line-clamp:var(--line-clamp, none);-webkit-box-orient:vertical;overflow:hidden}ion-item-option.success{background-color:var(--kirby-color-fill-success);color:var(--kirby-color-content-success)}@media(hover:hover){ion-item-option.success:hover{background-color:var(--kirby-color-fill-success-hover);color:var(--kirby-color-content-success-hover)}}ion-item-option.success:active{background-color:var(--kirby-color-fill-success-active);color:var(--kirby-color-content-success-active)}ion-item-option.warning{background-color:var(--kirby-color-fill-warning);color:var(--kirby-color-content-warning)}@media(hover:hover){ion-item-option.warning:hover{background-color:var(--kirby-color-fill-warning-hover);color:var(--kirby-color-content-warning-hover)}}ion-item-option.warning:active{background-color:var(--kirby-color-fill-warning-active);color:var(--kirby-color-content-warning-active)}ion-item-option.danger{background-color:var(--kirby-color-fill-danger);color:var(--kirby-color-content-danger)}@media(hover:hover){ion-item-option.danger:hover{background-color:var(--kirby-color-fill-danger-hover);color:var(--kirby-color-content-danger-hover)}}ion-item-option.danger:active{background-color:var(--kirby-color-fill-danger-active);color:var(--kirby-color-content-danger-active)}ion-footer{--kirby-inputs-background-color: var(--kirby-dark-overlay);--kirby-inputs-background-color-hover: var(--kirby-dark-overlay-10);--kirby-inputs-background-color-active: var(--kirby-dark-overlay-20);--kirby-inputs-color: var(--kirby-black);--kirby-inputs-indicator-background-color: var(--kirby-black);--kirby-inputs-indicator-color: var(--kirby-white);--kirby-inputs-placeholder-color: var(--kirby-semi-dark);--kirby-inputs-color-hover: var(--kirby-semi-dark);--kirby-inputs-elevation: none;--kirby-divider-color: var(--kirby-background-color);box-shadow:var(--kirby-elevation-8);box-sizing:inherit;display:flex;justify-content:var(--kirby-modal-footer-justify-content, center);align-items:center;background-color:var(--kirby-modal-footer-background, var(--kirby-color-fill-base));color:var(--kirby-modal-footer-color, var(--kirby-color-content-base));padding:var(--kirby-spacing-s);padding-bottom:calc(var(--kirby-spacing-xs) + var(--kirby-modal-safe-area-bottom))}@media(min-width:768px){ion-footer{padding:var(--kirby-spacing-m)}}:host{box-sizing:border-box;display:block}:host(.snap-to-keyboard) ion-footer{transition:transform var(--kirby-transition-soft-keyboard-leave)}:host(.light) ion-footer{--kirby-inputs-background-color: var(--kirby-white);--kirby-inputs-background-color-hover: var(--kirby-dark-overlay-10);--kirby-inputs-background-color-active: var(--kirby-dark-overlay-20);--kirby-inputs-color: var(--kirby-black);--kirby-inputs-indicator-background-color: var(--kirby-black);--kirby-inputs-indicator-color: var(--kirby-white);--kirby-inputs-placeholder-color: var(--kirby-semi-dark);--kirby-inputs-color-hover: var(--kirby-semi-dark);--kirby-divider-color: var(--kirby-medium);--kirby-inputs-elevation: var(--kirby-elevation-2)}:host(.inline) ion-footer{--kirby-inputs-background-color: var(--kirby-white);--kirby-inputs-background-color-hover: var(--kirby-dark-overlay-10);--kirby-inputs-background-color-active: var(--kirby-dark-overlay-20);--kirby-inputs-color: var(--kirby-black);--kirby-inputs-indicator-background-color: var(--kirby-black);--kirby-inputs-indicator-color: var(--kirby-white);--kirby-inputs-placeholder-color: var(--kirby-semi-dark);--kirby-inputs-color-hover: var(--kirby-semi-dark);--kirby-divider-color: var(--kirby-medium);--kirby-inputs-elevation: var(--kirby-elevation-2);background:transparent;box-shadow:none}:host-context(.keyboard-visible).snap-to-keyboard ion-footer{transition:transform var(--kirby-transition-soft-keyboard-enter);transform:translateY(calc((var(--keyboard-offset, 0px) - var(--kirby-modal-safe-area-bottom)) * -1))}\n"],
|
|
2435
|
+
dependencies: [{
|
|
2436
|
+
kind: "component",
|
|
2437
|
+
type: IonFooter,
|
|
2438
|
+
selector: "ion-footer",
|
|
2439
|
+
inputs: [
|
|
2440
|
+
"collapse",
|
|
2441
|
+
"mode",
|
|
2442
|
+
"translucent"
|
|
2443
|
+
]
|
|
2444
|
+
}],
|
|
2445
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
2446
|
+
});
|
|
2447
|
+
}
|
|
2448
|
+
};
|
|
2449
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
2450
|
+
minVersion: "12.0.0",
|
|
2451
|
+
version: "22.2.3",
|
|
2452
|
+
ngImport: i0,
|
|
2453
|
+
type: ModalFooterComponent,
|
|
2454
|
+
decorators: [{
|
|
2455
|
+
type: Component,
|
|
2456
|
+
args: [{
|
|
2457
|
+
imports: [IonFooter],
|
|
2458
|
+
selector: "kirby-modal-footer",
|
|
2459
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
2460
|
+
template: "<ion-footer role=\"presentation\">\n <ng-content></ng-content>\n</ion-footer>\n",
|
|
2461
|
+
styles: [".kirby-line-clamp{display:-webkit-box;-webkit-line-clamp:var(--line-clamp, none);-webkit-box-orient:vertical;overflow:hidden}ion-item-option.success{background-color:var(--kirby-color-fill-success);color:var(--kirby-color-content-success)}@media(hover:hover){ion-item-option.success:hover{background-color:var(--kirby-color-fill-success-hover);color:var(--kirby-color-content-success-hover)}}ion-item-option.success:active{background-color:var(--kirby-color-fill-success-active);color:var(--kirby-color-content-success-active)}ion-item-option.warning{background-color:var(--kirby-color-fill-warning);color:var(--kirby-color-content-warning)}@media(hover:hover){ion-item-option.warning:hover{background-color:var(--kirby-color-fill-warning-hover);color:var(--kirby-color-content-warning-hover)}}ion-item-option.warning:active{background-color:var(--kirby-color-fill-warning-active);color:var(--kirby-color-content-warning-active)}ion-item-option.danger{background-color:var(--kirby-color-fill-danger);color:var(--kirby-color-content-danger)}@media(hover:hover){ion-item-option.danger:hover{background-color:var(--kirby-color-fill-danger-hover);color:var(--kirby-color-content-danger-hover)}}ion-item-option.danger:active{background-color:var(--kirby-color-fill-danger-active);color:var(--kirby-color-content-danger-active)}ion-footer{--kirby-inputs-background-color: var(--kirby-dark-overlay);--kirby-inputs-background-color-hover: var(--kirby-dark-overlay-10);--kirby-inputs-background-color-active: var(--kirby-dark-overlay-20);--kirby-inputs-color: var(--kirby-black);--kirby-inputs-indicator-background-color: var(--kirby-black);--kirby-inputs-indicator-color: var(--kirby-white);--kirby-inputs-placeholder-color: var(--kirby-semi-dark);--kirby-inputs-color-hover: var(--kirby-semi-dark);--kirby-inputs-elevation: none;--kirby-divider-color: var(--kirby-background-color);box-shadow:var(--kirby-elevation-8);box-sizing:inherit;display:flex;justify-content:var(--kirby-modal-footer-justify-content, center);align-items:center;background-color:var(--kirby-modal-footer-background, var(--kirby-color-fill-base));color:var(--kirby-modal-footer-color, var(--kirby-color-content-base));padding:var(--kirby-spacing-s);padding-bottom:calc(var(--kirby-spacing-xs) + var(--kirby-modal-safe-area-bottom))}@media(min-width:768px){ion-footer{padding:var(--kirby-spacing-m)}}:host{box-sizing:border-box;display:block}:host(.snap-to-keyboard) ion-footer{transition:transform var(--kirby-transition-soft-keyboard-leave)}:host(.light) ion-footer{--kirby-inputs-background-color: var(--kirby-white);--kirby-inputs-background-color-hover: var(--kirby-dark-overlay-10);--kirby-inputs-background-color-active: var(--kirby-dark-overlay-20);--kirby-inputs-color: var(--kirby-black);--kirby-inputs-indicator-background-color: var(--kirby-black);--kirby-inputs-indicator-color: var(--kirby-white);--kirby-inputs-placeholder-color: var(--kirby-semi-dark);--kirby-inputs-color-hover: var(--kirby-semi-dark);--kirby-divider-color: var(--kirby-medium);--kirby-inputs-elevation: var(--kirby-elevation-2)}:host(.inline) ion-footer{--kirby-inputs-background-color: var(--kirby-white);--kirby-inputs-background-color-hover: var(--kirby-dark-overlay-10);--kirby-inputs-background-color-active: var(--kirby-dark-overlay-20);--kirby-inputs-color: var(--kirby-black);--kirby-inputs-indicator-background-color: var(--kirby-black);--kirby-inputs-indicator-color: var(--kirby-white);--kirby-inputs-placeholder-color: var(--kirby-semi-dark);--kirby-inputs-color-hover: var(--kirby-semi-dark);--kirby-divider-color: var(--kirby-medium);--kirby-inputs-elevation: var(--kirby-elevation-2);background:transparent;box-shadow:none}:host-context(.keyboard-visible).snap-to-keyboard ion-footer{transition:transform var(--kirby-transition-soft-keyboard-enter);transform:translateY(calc((var(--keyboard-offset, 0px) - var(--kirby-modal-safe-area-bottom)) * -1))}\n"]
|
|
2462
|
+
}]
|
|
2463
|
+
}],
|
|
2464
|
+
ctorParameters: () => [{ type: i0.ElementRef }, {
|
|
2465
|
+
type: ModalElementsAdvertiser,
|
|
2466
|
+
decorators: [{ type: Optional }]
|
|
2467
|
+
}],
|
|
2468
|
+
propDecorators: {
|
|
2469
|
+
snapToKeyboard: [{
|
|
2470
|
+
type: HostBinding,
|
|
2471
|
+
args: ["class.snap-to-keyboard"]
|
|
2472
|
+
}, { type: Input }],
|
|
2473
|
+
type: [{ type: Input }],
|
|
2474
|
+
themeColor: [{ type: Input }],
|
|
2475
|
+
_cssClass: [{
|
|
2476
|
+
type: HostBinding,
|
|
2477
|
+
args: ["class"]
|
|
2478
|
+
}]
|
|
2479
|
+
}
|
|
2480
|
+
});
|
|
1918
2481
|
export { ActionSheetComponent, ActionSheetHelper, AlertComponent, AlertHelper, COMPONENT_PROPS, CanDismissHelper, CanDismissModalGuard, DrawerSupplementaryAction, Modal, ModalCompactWrapperComponent, ModalComponent, ModalController, ModalElementComponent, ModalElementType, ModalElementsAdvertiser, ModalFooterComponent, ModalHelper, ModalNavigationService, ModalWrapperComponent };
|
|
1919
|
-
|
|
2482
|
+
|
|
2483
|
+
//# sourceMappingURL=kirbydesign-designsystem-modal.mjs.map
|