@theseam/ui-common 1.0.0-beta.0 → 1.0.0-beta.10

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.
Files changed (153) hide show
  1. package/breadcrumbs/index.d.ts +1 -2
  2. package/buttons/index.d.ts +20 -13
  3. package/datatable/index.d.ts +77 -39
  4. package/dynamic/index.d.ts +5 -5
  5. package/fesm2022/theseam-ui-common-asset-reader.mjs +28 -29
  6. package/fesm2022/theseam-ui-common-asset-reader.mjs.map +1 -1
  7. package/fesm2022/theseam-ui-common-breadcrumbs.mjs +25 -31
  8. package/fesm2022/theseam-ui-common-breadcrumbs.mjs.map +1 -1
  9. package/fesm2022/theseam-ui-common-buttons.mjs +108 -66
  10. package/fesm2022/theseam-ui-common-buttons.mjs.map +1 -1
  11. package/fesm2022/theseam-ui-common-card.mjs +21 -21
  12. package/fesm2022/theseam-ui-common-card.mjs.map +1 -1
  13. package/fesm2022/theseam-ui-common-carousel.mjs +28 -30
  14. package/fesm2022/theseam-ui-common-carousel.mjs.map +1 -1
  15. package/fesm2022/theseam-ui-common-checkbox.mjs +27 -27
  16. package/fesm2022/theseam-ui-common-checkbox.mjs.map +1 -1
  17. package/fesm2022/theseam-ui-common-confirm-dialog.mjs +23 -27
  18. package/fesm2022/theseam-ui-common-confirm-dialog.mjs.map +1 -1
  19. package/fesm2022/theseam-ui-common-core.mjs +31 -11
  20. package/fesm2022/theseam-ui-common-core.mjs.map +1 -1
  21. package/fesm2022/theseam-ui-common-data-exporter.mjs +18 -19
  22. package/fesm2022/theseam-ui-common-data-exporter.mjs.map +1 -1
  23. package/fesm2022/theseam-ui-common-data-filters.mjs +80 -64
  24. package/fesm2022/theseam-ui-common-data-filters.mjs.map +1 -1
  25. package/fesm2022/theseam-ui-common-datatable-alterations-display.mjs +51 -49
  26. package/fesm2022/theseam-ui-common-datatable-alterations-display.mjs.map +1 -1
  27. package/fesm2022/theseam-ui-common-datatable-dynamic.mjs +145 -112
  28. package/fesm2022/theseam-ui-common-datatable-dynamic.mjs.map +1 -1
  29. package/fesm2022/theseam-ui-common-datatable.mjs +727 -420
  30. package/fesm2022/theseam-ui-common-datatable.mjs.map +1 -1
  31. package/fesm2022/theseam-ui-common-dynamic-component-loader.mjs +12 -14
  32. package/fesm2022/theseam-ui-common-dynamic-component-loader.mjs.map +1 -1
  33. package/fesm2022/theseam-ui-common-dynamic.mjs +60 -48
  34. package/fesm2022/theseam-ui-common-dynamic.mjs.map +1 -1
  35. package/fesm2022/theseam-ui-common-footer-bar.mjs +9 -15
  36. package/fesm2022/theseam-ui-common-footer-bar.mjs.map +1 -1
  37. package/fesm2022/theseam-ui-common-form-field-error.mjs +60 -43
  38. package/fesm2022/theseam-ui-common-form-field-error.mjs.map +1 -1
  39. package/fesm2022/theseam-ui-common-form-field.mjs +129 -76
  40. package/fesm2022/theseam-ui-common-form-field.mjs.map +1 -1
  41. package/fesm2022/theseam-ui-common-framework.mjs +669 -543
  42. package/fesm2022/theseam-ui-common-framework.mjs.map +1 -1
  43. package/fesm2022/theseam-ui-common-google-maps.mjs +206 -149
  44. package/fesm2022/theseam-ui-common-google-maps.mjs.map +1 -1
  45. package/fesm2022/theseam-ui-common-graphql.mjs +311 -254
  46. package/fesm2022/theseam-ui-common-graphql.mjs.map +1 -1
  47. package/fesm2022/theseam-ui-common-icon.mjs +125 -89
  48. package/fesm2022/theseam-ui-common-icon.mjs.map +1 -1
  49. package/fesm2022/theseam-ui-common-layout.mjs +18 -26
  50. package/fesm2022/theseam-ui-common-layout.mjs.map +1 -1
  51. package/fesm2022/theseam-ui-common-loading.mjs +19 -28
  52. package/fesm2022/theseam-ui-common-loading.mjs.map +1 -1
  53. package/fesm2022/theseam-ui-common-menu.mjs +124 -95
  54. package/fesm2022/theseam-ui-common-menu.mjs.map +1 -1
  55. package/fesm2022/theseam-ui-common-modal.mjs +178 -129
  56. package/fesm2022/theseam-ui-common-modal.mjs.map +1 -1
  57. package/fesm2022/theseam-ui-common-models.mjs +3 -3
  58. package/fesm2022/theseam-ui-common-models.mjs.map +1 -1
  59. package/fesm2022/theseam-ui-common-navigation-reload.mjs +13 -11
  60. package/fesm2022/theseam-ui-common-navigation-reload.mjs.map +1 -1
  61. package/fesm2022/theseam-ui-common-popover.mjs +81 -88
  62. package/fesm2022/theseam-ui-common-popover.mjs.map +1 -1
  63. package/fesm2022/theseam-ui-common-progress.mjs +15 -19
  64. package/fesm2022/theseam-ui-common-progress.mjs.map +1 -1
  65. package/fesm2022/theseam-ui-common-rich-text.mjs +65 -52
  66. package/fesm2022/theseam-ui-common-rich-text.mjs.map +1 -1
  67. package/fesm2022/theseam-ui-common-scrollbar.mjs +12 -9
  68. package/fesm2022/theseam-ui-common-scrollbar.mjs.map +1 -1
  69. package/fesm2022/theseam-ui-common-services.mjs +41 -26
  70. package/fesm2022/theseam-ui-common-services.mjs.map +1 -1
  71. package/fesm2022/theseam-ui-common-shared.mjs +149 -159
  72. package/fesm2022/theseam-ui-common-shared.mjs.map +1 -1
  73. package/fesm2022/theseam-ui-common-storage.mjs +9 -6
  74. package/fesm2022/theseam-ui-common-storage.mjs.map +1 -1
  75. package/fesm2022/theseam-ui-common-story-helpers.mjs +148 -86
  76. package/fesm2022/theseam-ui-common-story-helpers.mjs.map +1 -1
  77. package/fesm2022/theseam-ui-common-tabbed.mjs +43 -39
  78. package/fesm2022/theseam-ui-common-tabbed.mjs.map +1 -1
  79. package/fesm2022/theseam-ui-common-table-cell-type.mjs +63 -39
  80. package/fesm2022/theseam-ui-common-table-cell-type.mjs.map +1 -1
  81. package/fesm2022/theseam-ui-common-table-cell-types.mjs +182 -144
  82. package/fesm2022/theseam-ui-common-table-cell-types.mjs.map +1 -1
  83. package/fesm2022/theseam-ui-common-table.mjs +62 -41
  84. package/fesm2022/theseam-ui-common-table.mjs.map +1 -1
  85. package/fesm2022/theseam-ui-common-tel-input.mjs +98 -63
  86. package/fesm2022/theseam-ui-common-tel-input.mjs.map +1 -1
  87. package/fesm2022/theseam-ui-common-testing.mjs +13 -10
  88. package/fesm2022/theseam-ui-common-testing.mjs.map +1 -1
  89. package/fesm2022/theseam-ui-common-tiled-select.mjs +54 -50
  90. package/fesm2022/theseam-ui-common-tiled-select.mjs.map +1 -1
  91. package/fesm2022/theseam-ui-common-toggle-edit.mjs +41 -37
  92. package/fesm2022/theseam-ui-common-toggle-edit.mjs.map +1 -1
  93. package/fesm2022/theseam-ui-common-toggle-group.mjs +30 -31
  94. package/fesm2022/theseam-ui-common-toggle-group.mjs.map +1 -1
  95. package/fesm2022/theseam-ui-common-tooltip.mjs +225 -66
  96. package/fesm2022/theseam-ui-common-tooltip.mjs.map +1 -1
  97. package/fesm2022/theseam-ui-common-unsaved-changes-dialog.mjs +14 -12
  98. package/fesm2022/theseam-ui-common-unsaved-changes-dialog.mjs.map +1 -1
  99. package/fesm2022/theseam-ui-common-utils.mjs +113 -77
  100. package/fesm2022/theseam-ui-common-utils.mjs.map +1 -1
  101. package/fesm2022/theseam-ui-common-validators.mjs +10 -9
  102. package/fesm2022/theseam-ui-common-validators.mjs.map +1 -1
  103. package/fesm2022/theseam-ui-common-vertical-list-filter.mjs +39 -17
  104. package/fesm2022/theseam-ui-common-vertical-list-filter.mjs.map +1 -1
  105. package/fesm2022/theseam-ui-common-viewers.mjs +80 -53
  106. package/fesm2022/theseam-ui-common-viewers.mjs.map +1 -1
  107. package/fesm2022/theseam-ui-common-widget.mjs +288 -314
  108. package/fesm2022/theseam-ui-common-widget.mjs.map +1 -1
  109. package/form-field/index.d.ts +1 -1
  110. package/framework/base-layout/base-layout.component.scss +9 -4
  111. package/framework/base-layout/styles/_variables.scss +4 -9
  112. package/framework/dashboard/dashboard-widgets/dashboard-widgets.component.scss +6 -4
  113. package/framework/index.d.ts +6 -6
  114. package/framework/nav/nav-item/nav-item.component.scss +7 -6
  115. package/framework/nav/styles/_themes/light/_variables.scss +21 -5
  116. package/framework/nav/styles/_themes/primary/_variables.scss +21 -5
  117. package/framework/side-nav/side-nav-item/side-nav-item.component.scss +5 -2
  118. package/framework/side-nav/styles/_themes/light/_variables.scss +5 -1
  119. package/framework/side-nav/styles/_themes/primary/_variables.scss +25 -5
  120. package/graphql/index.d.ts +49 -7
  121. package/modal/README.md +5 -5
  122. package/modal/index.d.ts +1 -1
  123. package/models/index.d.ts +1 -1
  124. package/package.json +59 -60
  125. package/popover/index.d.ts +0 -2
  126. package/progress/progress-circle/styles/_variables.scss +15 -3
  127. package/shared/index.d.ts +0 -13
  128. package/story-helpers/index.d.ts +11 -1
  129. package/styles/bootstrap/_bootstrap.scss +34 -34
  130. package/styles/bootstrap/_bs-styles.scss +4 -8
  131. package/styles/bootstrap/_bs-utilities.scss +4 -4
  132. package/styles/bootstrap/_bs-variables.scss +65 -70
  133. package/styles/common/_forms.scss +9 -10
  134. package/styles/common/_global.scss +0 -1
  135. package/styles/common/_hacks.scss +1 -1
  136. package/styles/common/_table.scss +0 -1
  137. package/styles/common/_text.scss +3 -1
  138. package/styles/theme.scss +1 -1
  139. package/styles/vendor/ng-select/_ng-select-bs4.scss +292 -294
  140. package/styles/vendor/ngx-datatable/_ngx-datatable.scss +63 -32
  141. package/styles/vendor/ngx-datatable/_themes/bootstrap/_variables.scss +37 -10
  142. package/styles/vendor/ngx-datatable/_themes/material/_variables.scss +3 -1
  143. package/styles/vendor/quill/_quill.scss +15 -9
  144. package/table/index.d.ts +4 -1
  145. package/table-cell-type/index.d.ts +27 -2
  146. package/tel-input/README.md +27 -27
  147. package/utils/index.d.ts +3 -3
  148. package/viewers/index.d.ts +9 -2
  149. package/widget/_widget-theme.scss +1 -1
  150. package/widget/styles/_variables.scss +2 -2
  151. package/widget/widget/widget.component.scss +0 -2
  152. package/widget/widget-content-components/widget-tile/widget-tile.component.scss +1 -3
  153. package/widget/widget-footer/widget-footer.component.scss +0 -1
@@ -35,10 +35,9 @@ function getClosestModal(element, openDialogs) {
35
35
  parent = parent.parentElement;
36
36
  }
37
37
  const parentId = parent ? parent.id : null;
38
- return parentId ? openDialogs.find(dialog => dialog.id === parentId) : null;
38
+ return parentId ? openDialogs.find((dialog) => dialog.id === parentId) : null;
39
39
  }
40
40
 
41
- // tslint:disable:no-inferrable-types
42
41
  class ModalConfig {
43
42
  /** Component to use as the container for the dialog. */
44
43
  containerComponent;
@@ -92,7 +91,6 @@ class ModalConfig {
92
91
  /** Bootstrap modal sizes */
93
92
  modalSize;
94
93
  }
95
- // tslint:enable:no-inferrable-types
96
94
  function mergeModalConfigs(a, b) {
97
95
  return { ...a, ...b };
98
96
  }
@@ -112,14 +110,21 @@ class ModalContainerComponent extends BasePortalOutlet {
112
110
  _changeDetectorRef;
113
111
  _document;
114
112
  _config;
115
- get _idAttr() { return this._id; }
113
+ get _idAttr() {
114
+ return this._id;
115
+ }
116
116
  // @HostBinding is used in the class as it is expected to be extended. Since @Component decorator
117
117
  // metadata is not inherited by child classes, instead the host binding data is defined in a way
118
118
  // that can be inherited.
119
- // tslint:disable:no-host-decorator-in-concrete
120
- get _ariaLabel() { return this._config.ariaLabel || null; }
121
- get _ariaDescribedBy() { return this._config.ariaDescribedBy; }
122
- get _role() { return this._config.role; }
119
+ get _ariaLabel() {
120
+ return this._config.ariaLabel || null;
121
+ }
122
+ get _ariaDescribedBy() {
123
+ return this._config.ariaDescribedBy;
124
+ }
125
+ get _role() {
126
+ return this._config.role;
127
+ }
123
128
  // @HostBinding('attr.tabindex') get _tabindex() { return -1 }
124
129
  _seamModalContainer = true;
125
130
  _id;
@@ -138,16 +143,19 @@ class ModalContainerComponent extends BasePortalOutlet {
138
143
  // We use a Subject with a distinctUntilChanged, rather than a callback attached to .done,
139
144
  // because some browsers fire the done event twice and we don't want to emit duplicate events.
140
145
  // See: https://github.com/angular/angular/issues/24084
141
- this._animationDone.pipe(distinctUntilChanged((x, y) => {
146
+ this._animationDone
147
+ .pipe(distinctUntilChanged((x, y) => {
142
148
  return x.fromState === y.fromState && x.toState === y.toState;
143
- })).subscribe(event => {
149
+ }))
150
+ .subscribe((event) => {
144
151
  // Emit lifecycle events based on animation `done` callback.
145
152
  if (event.toState === 'enter') {
146
153
  this._autoFocusFirstTabbableElement();
147
154
  this._afterEnter.next();
148
155
  this._afterEnter.complete();
149
156
  }
150
- if (event.fromState === 'enter' && (event.toState === 'void' || event.toState === 'exit')) {
157
+ if (event.fromState === 'enter' &&
158
+ (event.toState === 'void' || event.toState === 'exit')) {
151
159
  this._returnFocusAfterDialog();
152
160
  this._afterExit.next();
153
161
  this._afterExit.complete();
@@ -162,9 +170,15 @@ class ModalContainerComponent extends BasePortalOutlet {
162
170
  _focusTrap;
163
171
  _modalDialog = true;
164
172
  _modalDialogCentered = true;
165
- get _modalDialogSm() { return this._config.modalSize === 'sm'; }
166
- get _modalDialogLg() { return this._config.modalSize === 'lg'; }
167
- get _modalDialogXl() { return this._config.modalSize === 'xl'; }
173
+ get _modalDialogSm() {
174
+ return this._config.modalSize === 'sm';
175
+ }
176
+ get _modalDialogLg() {
177
+ return this._config.modalSize === 'lg';
178
+ }
179
+ get _modalDialogXl() {
180
+ return this._config.modalSize === 'xl';
181
+ }
168
182
  /** The portal host inside of this container into which the dialog content will be loaded. */
169
183
  _portalHost;
170
184
  /** A subject emitting before the dialog enters the view. */
@@ -220,7 +234,8 @@ class ModalContainerComponent extends BasePortalOutlet {
220
234
  this._beforeEnter.next();
221
235
  this._beforeEnter.complete();
222
236
  }
223
- if (event.fromState === 'enter' && (event.toState === 'void' || event.toState === 'exit')) {
237
+ if (event.fromState === 'enter' &&
238
+ (event.toState === 'void' || event.toState === 'exit')) {
224
239
  this._beforeExit.next();
225
240
  this._beforeExit.complete();
226
241
  }
@@ -235,7 +250,8 @@ class ModalContainerComponent extends BasePortalOutlet {
235
250
  /** Saves a reference to the element that was focused before the dialog was opened. */
236
251
  _savePreviouslyFocusedElement() {
237
252
  if (this._document) {
238
- this._elementFocusedBeforeDialogWasOpened = this._document.activeElement;
253
+ this._elementFocusedBeforeDialogWasOpened = this._document
254
+ .activeElement;
239
255
  // Move focus onto the dialog immediately in order to prevent the user from accidentally
240
256
  // opening multiple dialogs at the same time. Needs to be async, because the element
241
257
  // may not be focusable immediately.
@@ -251,7 +267,7 @@ class ModalContainerComponent extends BasePortalOutlet {
251
267
  // ready in instances where change detection has to run first. To deal with this, we simply
252
268
  // wait for the microtask queue to be empty.
253
269
  if (this._config.autoFocus) {
254
- this._focusTrap.focusInitialElementWhenReady().then(hasMovedFocus => {
270
+ this._focusTrap.focusInitialElementWhenReady().then((hasMovedFocus) => {
255
271
  // If we didn't find any focusable elements inside the dialog, focus the
256
272
  // container so the user can't tab into other elements behind it.
257
273
  if (!hasMovedFocus) {
@@ -271,17 +287,17 @@ class ModalContainerComponent extends BasePortalOutlet {
271
287
  getNativeElement() {
272
288
  return this._elementRef.nativeElement;
273
289
  }
274
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: ModalContainerComponent, deps: [{ token: i0.ElementRef }, { token: i1.ConfigurableFocusTrapFactory }, { token: i0.ChangeDetectorRef }, { token: DOCUMENT, optional: true }, { token: ModalConfig }], target: i0.ɵɵFactoryTarget.Component });
275
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.0", type: ModalContainerComponent, isStandalone: false, selector: "seam-modal-container", host: { listeners: { "@dialog.start": "_onAnimationStart($event)", "@dialog.done": "_animationDone.next($event)", "click": "_onClick($event)" }, properties: { "@dialog": "{\n value: _state,\n params: {\n enterAnimationDuration: _config.enterAnimationDuration,\n exitAnimationDuration: _config.exitAnimationDuration\n }\n }", "attr.id": "this._idAttr", "attr.aria-label": "this._ariaLabel", "attr.aria-describedby": "this._ariaDescribedBy", "attr.role": "this._role", "class.seam-modal-container": "this._seamModalContainer", "class.modal-dialog": "this._modalDialog", "class.modal-dialog-centered": "this._modalDialogCentered", "class.modal-sm": "this._modalDialogSm", "class.modal-lg": "this._modalDialogLg", "class.modal-xl": "this._modalDialogXl" } }, viewQueries: [{ propertyName: "_portalHost", first: true, predicate: CdkPortalOutlet /*, { static: true }*/, descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"modal-content\" [tabindex]=\"-1\">\n <ng-template cdkPortalOutlet></ng-template>\n</div>\n", styles: [":host[tabindex=\"-1\"]:focus:not(:focus-visible){outline:0!important}\n"], dependencies: [{ kind: "directive", type: i3.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }], animations: [
290
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.7", ngImport: i0, type: ModalContainerComponent, deps: [{ token: i0.ElementRef }, { token: i1.ConfigurableFocusTrapFactory }, { token: i0.ChangeDetectorRef }, { token: DOCUMENT, optional: true }, { token: ModalConfig }], target: i0.ɵɵFactoryTarget.Component });
291
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.7", type: ModalContainerComponent, isStandalone: false, selector: "seam-modal-container", host: { listeners: { "@dialog.start": "_onAnimationStart($event)", "@dialog.done": "_animationDone.next($event)", "click": "_onClick($event)" }, properties: { "@dialog": "{\n value: _state,\n params: {\n enterAnimationDuration: _config.enterAnimationDuration,\n exitAnimationDuration: _config.exitAnimationDuration\n }\n }", "attr.id": "this._idAttr", "attr.aria-label": "this._ariaLabel", "attr.aria-describedby": "this._ariaDescribedBy", "attr.role": "this._role", "class.seam-modal-container": "this._seamModalContainer", "class.modal-dialog": "this._modalDialog", "class.modal-dialog-centered": "this._modalDialogCentered", "class.modal-sm": "this._modalDialogSm", "class.modal-lg": "this._modalDialogLg", "class.modal-xl": "this._modalDialogXl" } }, viewQueries: [{ propertyName: "_portalHost", first: true, predicate: CdkPortalOutlet /*, { static: true }*/, descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"modal-content\" [tabindex]=\"-1\">\n <ng-template cdkPortalOutlet></ng-template>\n</div>\n", styles: [":host[tabindex=\"-1\"]:focus:not(:focus-visible){outline:0!important}\n"], dependencies: [{ kind: "directive", type: i3.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }], animations: [
276
292
  trigger('dialog', [
277
293
  state('enter', style({ opacity: 1 })),
278
294
  state('exit, void', style({ opacity: 0 })),
279
295
  transition('* => enter', animate('{{enterAnimationDuration}}')),
280
296
  transition('* => exit, * => void', animate('{{exitAnimationDuration}}')),
281
- ])
297
+ ]),
282
298
  ] });
283
299
  }
284
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: ModalContainerComponent, decorators: [{
300
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.7", ngImport: i0, type: ModalContainerComponent, decorators: [{
285
301
  type: Component,
286
302
  args: [{ selector: 'seam-modal-container', animations: [
287
303
  trigger('dialog', [
@@ -289,7 +305,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
289
305
  state('exit, void', style({ opacity: 0 })),
290
306
  transition('* => enter', animate('{{enterAnimationDuration}}')),
291
307
  transition('* => exit, * => void', animate('{{exitAnimationDuration}}')),
292
- ])
308
+ ]),
293
309
  ], host: {
294
310
  '[@dialog]': `{
295
311
  value: _state,
@@ -410,9 +426,9 @@ class ModalRef {
410
426
  this.componentInstance = null;
411
427
  });
412
428
  // Close when escape keydown event occurs
413
- _overlayRef.keydownEvents()
414
- // tslint:disable-next-line:deprecation
415
- .pipe(filter(event => event.keyCode === ESCAPE && !this.disableClose))
429
+ _overlayRef
430
+ .keydownEvents()
431
+ .pipe(filter((event) => event.keyCode === ESCAPE && !this.disableClose))
416
432
  .subscribe(() => this.close());
417
433
  }
418
434
  _initCloseOnClickOutside() {
@@ -428,7 +444,7 @@ class ModalRef {
428
444
  return { x: event.clientX, y: event.clientY };
429
445
  };
430
446
  const dist = (x1, y1, x2, y2) => {
431
- return Math.sqrt(Math.pow((x2 - x1), 2) + Math.pow((y2 - y1), 2));
447
+ return Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2));
432
448
  };
433
449
  let pressed = false;
434
450
  let pressedPosition = null;
@@ -486,13 +502,23 @@ class ModalRef {
486
502
  updatePosition(position) {
487
503
  const strategy = this._getPositionStrategy();
488
504
  if (position && (position.left || position.right)) {
489
- position.left ? strategy.left(position.left) : strategy.right(position.right);
505
+ if (position.left) {
506
+ strategy.left(position.left);
507
+ }
508
+ else {
509
+ strategy.right(position.right);
510
+ }
490
511
  }
491
512
  else {
492
513
  strategy.centerHorizontally();
493
514
  }
494
515
  if (position && (position.top || position.bottom)) {
495
- position.top ? strategy.top(position.top) : strategy.bottom(position.bottom);
516
+ if (position.top) {
517
+ strategy.top(position.top);
518
+ }
519
+ else {
520
+ strategy.bottom(position.bottom);
521
+ }
496
522
  }
497
523
  else {
498
524
  strategy.centerVertically();
@@ -512,11 +538,9 @@ class ModalRef {
512
538
  */
513
539
  updateSize(size) {
514
540
  if (size.width) {
515
- // tslint:disable-next-line:deprecation
516
541
  this._getPositionStrategy().width(size.width.toString());
517
542
  }
518
543
  if (size.height) {
519
- // tslint:disable-next-line:deprecation
520
544
  this._getPositionStrategy().height(size.height.toString());
521
545
  }
522
546
  this._overlayRef.updateSize(size);
@@ -525,7 +549,8 @@ class ModalRef {
525
549
  }
526
550
  /** Fetches the position strategy object from the overlay ref. */
527
551
  _getPositionStrategy() {
528
- return this._overlayRef.getConfig().positionStrategy;
552
+ return this._overlayRef.getConfig()
553
+ .positionStrategy;
529
554
  }
530
555
  /** Gets an observable that emits when dialog begins opening. */
531
556
  beforeOpened() {
@@ -558,19 +583,26 @@ class Modal {
558
583
  _dialogRefConstructor = ModalRef;
559
584
  /** Stream that emits when all dialogs are closed. */
560
585
  get _afterAllClosed() {
561
- return this._parentDialog ? this._parentDialog.afterAllClosed : this._afterAllClosedBase;
586
+ return this._parentDialog
587
+ ? this._parentDialog.afterAllClosed
588
+ : this._afterAllClosedBase;
562
589
  }
563
590
  _afterAllClosedBase = new Subject();
564
591
  afterAllClosed = defer(() => this.openDialogs.length
565
- ? this._afterAllClosed : this._afterAllClosed.pipe(startWith(undefined)));
592
+ ? this._afterAllClosed
593
+ : this._afterAllClosed.pipe(startWith(undefined)));
566
594
  /** Stream that emits when a dialog is opened. */
567
595
  get afterOpened() {
568
- return this._parentDialog ? this._parentDialog.afterOpened : this._afterOpened;
596
+ return this._parentDialog
597
+ ? this._parentDialog.afterOpened
598
+ : this._afterOpened;
569
599
  }
570
600
  _afterOpened = new Subject();
571
601
  /** Stream that emits when a dialog is opened. */
572
602
  get openDialogs() {
573
- return this._parentDialog ? this._parentDialog.openDialogs : this._openDialogs;
603
+ return this._parentDialog
604
+ ? this._parentDialog.openDialogs
605
+ : this._openDialogs;
574
606
  }
575
607
  _openDialogs = [];
576
608
  constructor(overlay, injector, scrollStrategy, _parentDialog, location, _scrollbars, _dynamicComponentLoaderModule) {
@@ -589,11 +621,11 @@ class Modal {
589
621
  }
590
622
  /** Gets an open dialog by id. */
591
623
  getById(id) {
592
- return this._openDialogs.find(ref => ref.id === id);
624
+ return this._openDialogs.find((ref) => ref.id === id);
593
625
  }
594
626
  /** Closes all open dialogs. */
595
627
  closeAll() {
596
- this.openDialogs.forEach(ref => ref.close());
628
+ this.openDialogs.forEach((ref) => ref.close());
597
629
  }
598
630
  /** Opens a dialog from a component. */
599
631
  openFromComponent(component, config) {
@@ -627,14 +659,14 @@ class Modal {
627
659
  }
628
660
  return this._dynamicComponentLoaderModule
629
661
  .getComponentFactory(componentId)
630
- .pipe(switchMap(componentFactory => {
662
+ .pipe(switchMap((componentFactory) => {
631
663
  const modalRef = this.openFromComponent(componentFactory.componentType, _config);
632
664
  return of(modalRef);
633
665
  }));
634
666
  }
635
667
  ngOnDestroy() {
636
668
  // Only close all the dialogs at this level.
637
- this._openDialogs.forEach(ref => ref.close());
669
+ this._openDialogs.forEach((ref) => ref.close());
638
670
  }
639
671
  /**
640
672
  * Forwards emitting events for when dialogs are opened and all dialogs are closed.
@@ -680,9 +712,11 @@ class Modal {
680
712
  }
681
713
  };
682
714
  const _scrollbarMouseUpListener = () => {
683
- setTimeout(() => { if (dialogRef) {
684
- dialogRef.disableClose = false;
685
- } });
715
+ setTimeout(() => {
716
+ if (dialogRef) {
717
+ dialogRef.disableClose = false;
718
+ }
719
+ });
686
720
  };
687
721
  let verticalHandleElement;
688
722
  let horizontalHandleElement;
@@ -693,12 +727,14 @@ class Modal {
693
727
  setTimeout(() => {
694
728
  const instance = this._scrollbars.getInstance(dialogRef._overlayRef.overlayElement);
695
729
  if (instance) {
696
- verticalHandleElement = instance.getElements().scrollbarVertical.handle;
730
+ verticalHandleElement =
731
+ instance.getElements().scrollbarVertical.handle;
697
732
  if (verticalHandleElement) {
698
733
  verticalHandleElement.addEventListener('mousedown', _scrollbarMouseDownListener);
699
734
  verticalHandleElement.addEventListener('touchstart', _scrollbarMouseDownListener);
700
735
  }
701
- horizontalHandleElement = instance.getElements().scrollbarHorizontal.handle;
736
+ horizontalHandleElement =
737
+ instance.getElements().scrollbarHorizontal.handle;
702
738
  if (horizontalHandleElement) {
703
739
  horizontalHandleElement.addEventListener('mousedown', _scrollbarMouseDownListener);
704
740
  horizontalHandleElement.addEventListener('touchstart', _scrollbarMouseDownListener);
@@ -728,8 +764,8 @@ class Modal {
728
764
  // document.removeEventListener('touchend', _scrollbarMouseUpListener)
729
765
  // document.removeEventListener('touchcancel', _scrollbarMouseUpListener)
730
766
  // }
731
- }
732
- }
767
+ },
768
+ },
733
769
  });
734
770
  // Cleans up the registered events.
735
771
  return () => {
@@ -757,7 +793,7 @@ class Modal {
757
793
  * @returns The overlay configuration.
758
794
  */
759
795
  _createOverlay(config) {
760
- let panelClass = (config.panelClass || []);
796
+ let panelClass = config.panelClass || [];
761
797
  if (typeof panelClass === 'string') {
762
798
  panelClass = [panelClass];
763
799
  }
@@ -771,7 +807,7 @@ class Modal {
771
807
  minWidth: config.minWidth,
772
808
  minHeight: config.minHeight,
773
809
  maxWidth: config.maxWidth,
774
- maxHeight: config.maxHeight
810
+ maxHeight: config.maxHeight,
775
811
  });
776
812
  if (config.backdropClass) {
777
813
  overlayConfig.backdropClass = config.backdropClass;
@@ -785,13 +821,12 @@ class Modal {
785
821
  * @returns A promise resolving to a ComponentRef for the attached container.
786
822
  */
787
823
  _attachDialogContainer(overlay, config) {
788
- const container = config.containerComponent || this.injector.get(MODAL_CONTAINER, ModalContainerComponent);
824
+ const container = config.containerComponent ||
825
+ this.injector.get(MODAL_CONTAINER, ModalContainerComponent);
789
826
  const userInjector = config && config.viewContainerRef && config.viewContainerRef.injector;
790
827
  const injector = Injector.create({
791
828
  parent: userInjector || this.injector,
792
- providers: [
793
- { provide: ModalConfig, useValue: config },
794
- ],
829
+ providers: [{ provide: ModalConfig, useValue: config }],
795
830
  });
796
831
  const containerPortal = new ComponentPortal(container, config.viewContainerRef, injector);
797
832
  const containerRef = overlay.attach(containerPortal);
@@ -810,13 +845,13 @@ class Modal {
810
845
  _attachDialogContentForComponent(componentOrTemplateRef, dialogContainer, overlayRef, config) {
811
846
  // Create a reference to the dialog we're creating in order to give the user a handle
812
847
  // to modify and close it.
813
- // eslint-disable-next-line new-cap
814
848
  const dialogRef = new this._dialogRefConstructor(overlayRef, dialogContainer, config.id);
815
849
  const injector = this._createInjector(config, dialogRef, dialogContainer);
816
850
  const contentRef = dialogContainer.attachComponentPortal(new ComponentPortal(componentOrTemplateRef, undefined, injector));
817
851
  dialogRef.componentInstance = contentRef.instance;
818
852
  dialogRef.disableClose = config.disableClose;
819
- dialogRef.updateSize({ width: config.width, height: config.height })
853
+ dialogRef
854
+ .updateSize({ width: config.width, height: config.height })
820
855
  .updatePosition(config.position);
821
856
  return dialogRef;
822
857
  }
@@ -832,10 +867,10 @@ class Modal {
832
867
  _attachDialogContentForTemplate(componentOrTemplateRef, dialogContainer, overlayRef, config) {
833
868
  // Create a reference to the dialog we're creating in order to give the user a handle
834
869
  // to modify and close it.
835
- // eslint-disable-next-line new-cap
836
870
  const dialogRef = new this._dialogRefConstructor(overlayRef, dialogContainer, config.id);
837
871
  dialogContainer.attachTemplatePortal(new TemplatePortal(componentOrTemplateRef, null, { $implicit: config.data, dialogRef }));
838
- dialogRef.updateSize({ width: config.width, height: config.height })
872
+ dialogRef
873
+ .updateSize({ width: config.width, height: config.height })
839
874
  .updatePosition(config.position);
840
875
  return dialogRef;
841
876
  }
@@ -850,11 +885,13 @@ class Modal {
850
885
  _createInjector(config, dialogRef, dialogContainer) {
851
886
  const userInjector = config && config.viewContainerRef && config.viewContainerRef.injector;
852
887
  const providers = [
888
+ { provide: ModalRef, useValue: dialogRef },
853
889
  { provide: MODAL_CONTAINER, useValue: dialogContainer },
854
890
  { provide: MODAL_DATA, useValue: config.data },
855
891
  ];
856
892
  if (config.direction &&
857
- (!userInjector || !userInjector.get(Directionality, null))) {
893
+ (!userInjector ||
894
+ !userInjector.get(Directionality, null))) {
858
895
  providers.push({
859
896
  provide: Directionality,
860
897
  useValue: {
@@ -874,10 +911,10 @@ class Modal {
874
911
  // eslint-disable-next-line new-cap
875
912
  return { ...new dialogConfig(), ...config };
876
913
  }
877
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: Modal, deps: [{ token: i1$1.Overlay }, { token: i0.Injector }, { token: MODAL_SCROLL_STRATEGY }, { token: Modal, optional: true, skipSelf: true }, { token: i3$1.Location, optional: true }, { token: i3$2.TheSeamOverlayScrollbarsService }, { token: i4.TheSeamDynamicComponentLoader }], target: i0.ɵɵFactoryTarget.Injectable });
878
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: Modal, providedIn: 'root' });
914
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.7", ngImport: i0, type: Modal, deps: [{ token: i1$1.Overlay }, { token: i0.Injector }, { token: MODAL_SCROLL_STRATEGY }, { token: Modal, optional: true, skipSelf: true }, { token: i3$1.Location, optional: true }, { token: i3$2.TheSeamOverlayScrollbarsService }, { token: i4.TheSeamDynamicComponentLoader }], target: i0.ɵɵFactoryTarget.Injectable });
915
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.7", ngImport: i0, type: Modal, providedIn: 'root' });
879
916
  }
880
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: Modal, decorators: [{
917
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.7", ngImport: i0, type: Modal, decorators: [{
881
918
  type: Injectable,
882
919
  args: [{ providedIn: 'root' }]
883
920
  }], ctorParameters: () => [{ type: i1$1.Overlay }, { type: i0.Injector }, { type: undefined, decorators: [{
@@ -897,9 +934,13 @@ class ModalCloseDirective {
897
934
  _modalRef;
898
935
  modalRef;
899
936
  // @HostBinding('class.close') _closeCss = true
900
- get _attrType() { return this.type; }
937
+ get _attrType() {
938
+ return this.type;
939
+ }
901
940
  type = 'button';
902
- get _attrAriaLabel() { return this.ariaLabel || null; }
941
+ get _attrAriaLabel() {
942
+ return this.ariaLabel || null;
943
+ }
903
944
  /** Screenreader label for the button. */
904
945
  ariaLabel;
905
946
  seamModalClose;
@@ -911,7 +952,9 @@ class ModalCloseDirective {
911
952
  if (this.seamModalNext) {
912
953
  this.modalRef.afterClosed().subscribe(() => {
913
954
  if (typeof this.seamModalNext === 'string') {
914
- this._modal.openFromLazyComponent(this.seamModalNext, this.seamModalNextConfig).subscribe();
955
+ this._modal
956
+ .openFromLazyComponent(this.seamModalNext, this.seamModalNextConfig)
957
+ .subscribe();
915
958
  }
916
959
  else {
917
960
  this._modal.openFromComponent(this.seamModalNext, this.seamModalNextConfig);
@@ -937,15 +980,15 @@ class ModalCloseDirective {
937
980
  this.modalRef = getClosestModal(this._elementRef, this._modal.openDialogs);
938
981
  }
939
982
  }
940
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: ModalCloseDirective, deps: [{ token: i0.ElementRef }, { token: Modal }, { token: ModalRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
941
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.0", type: ModalCloseDirective, isStandalone: false, selector: "button[seamModalClose]", inputs: { type: "type", ariaLabel: ["aria-label", "ariaLabel"], seamModalClose: "seamModalClose", seamModalNext: "seamModalNext", seamModalNextConfig: "seamModalNextConfig" }, host: { listeners: { "click": "_onClick()" }, properties: { "attr.type": "this._attrType", "attr.aria-label": "this._attrAriaLabel" } }, exportAs: ["seamModalClose"], ngImport: i0 });
983
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.7", ngImport: i0, type: ModalCloseDirective, deps: [{ token: i0.ElementRef }, { token: Modal }, { token: ModalRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
984
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.7", type: ModalCloseDirective, isStandalone: false, selector: "button[seamModalClose]", inputs: { type: "type", ariaLabel: ["aria-label", "ariaLabel"], seamModalClose: "seamModalClose", seamModalNext: "seamModalNext", seamModalNextConfig: "seamModalNextConfig" }, host: { listeners: { "click": "_onClick()" }, properties: { "attr.type": "this._attrType", "attr.aria-label": "this._attrAriaLabel" } }, exportAs: ["seamModalClose"], ngImport: i0 });
942
985
  }
943
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: ModalCloseDirective, decorators: [{
986
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.7", ngImport: i0, type: ModalCloseDirective, decorators: [{
944
987
  type: Directive,
945
988
  args: [{
946
989
  selector: 'button[seamModalClose]',
947
990
  exportAs: 'seamModalClose',
948
- standalone: false
991
+ standalone: false,
949
992
  }]
950
993
  }], ctorParameters: () => [{ type: i0.ElementRef }, { type: Modal }, { type: ModalRef, decorators: [{
951
994
  type: Optional
@@ -976,14 +1019,14 @@ class ModalFooterTplDirective {
976
1019
  constructor(template) {
977
1020
  this.template = template;
978
1021
  }
979
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: ModalFooterTplDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
980
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.0", type: ModalFooterTplDirective, isStandalone: false, selector: "[seamModalFooterTpl]", ngImport: i0 });
1022
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.7", ngImport: i0, type: ModalFooterTplDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
1023
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.7", type: ModalFooterTplDirective, isStandalone: false, selector: "[seamModalFooterTpl]", ngImport: i0 });
981
1024
  }
982
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: ModalFooterTplDirective, decorators: [{
1025
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.7", ngImport: i0, type: ModalFooterTplDirective, decorators: [{
983
1026
  type: Directive,
984
1027
  args: [{
985
1028
  selector: '[seamModalFooterTpl]',
986
- standalone: false
1029
+ standalone: false,
987
1030
  }]
988
1031
  }], ctorParameters: () => [{ type: i0.TemplateRef }] });
989
1032
 
@@ -992,14 +1035,14 @@ class ModalHeaderIconTplDirective {
992
1035
  constructor(template) {
993
1036
  this.template = template;
994
1037
  }
995
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: ModalHeaderIconTplDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
996
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.0", type: ModalHeaderIconTplDirective, isStandalone: false, selector: "[seamModalHeaderIconTpl]", ngImport: i0 });
1038
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.7", ngImport: i0, type: ModalHeaderIconTplDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
1039
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.7", type: ModalHeaderIconTplDirective, isStandalone: false, selector: "[seamModalHeaderIconTpl]", ngImport: i0 });
997
1040
  }
998
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: ModalHeaderIconTplDirective, decorators: [{
1041
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.7", ngImport: i0, type: ModalHeaderIconTplDirective, decorators: [{
999
1042
  type: Directive,
1000
1043
  args: [{
1001
1044
  selector: '[seamModalHeaderIconTpl]',
1002
- standalone: false
1045
+ standalone: false,
1003
1046
  }]
1004
1047
  }], ctorParameters: () => [{ type: i0.TemplateRef }] });
1005
1048
 
@@ -1008,14 +1051,14 @@ class ModalHeaderTitleTplDirective {
1008
1051
  constructor(template) {
1009
1052
  this.template = template;
1010
1053
  }
1011
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: ModalHeaderTitleTplDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
1012
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.0", type: ModalHeaderTitleTplDirective, isStandalone: false, selector: "[seamModalHeaderTitleTpl]", ngImport: i0 });
1054
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.7", ngImport: i0, type: ModalHeaderTitleTplDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
1055
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.7", type: ModalHeaderTitleTplDirective, isStandalone: false, selector: "[seamModalHeaderTitleTpl]", ngImport: i0 });
1013
1056
  }
1014
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: ModalHeaderTitleTplDirective, decorators: [{
1057
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.7", ngImport: i0, type: ModalHeaderTitleTplDirective, decorators: [{
1015
1058
  type: Directive,
1016
1059
  args: [{
1017
1060
  selector: '[seamModalHeaderTitleTpl]',
1018
- standalone: false
1061
+ standalone: false,
1019
1062
  }]
1020
1063
  }], ctorParameters: () => [{ type: i0.TemplateRef }] });
1021
1064
 
@@ -1025,14 +1068,14 @@ class ModalTitleDirective {
1025
1068
  constructor(_elementRef) {
1026
1069
  this._elementRef = _elementRef;
1027
1070
  }
1028
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: ModalTitleDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
1029
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.0", type: ModalTitleDirective, isStandalone: false, selector: "[seamModalTitle]", host: { properties: { "class.modal-title": "this._modalTitleCss" } }, ngImport: i0 });
1071
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.7", ngImport: i0, type: ModalTitleDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
1072
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.7", type: ModalTitleDirective, isStandalone: false, selector: "[seamModalTitle]", host: { properties: { "class.modal-title": "this._modalTitleCss" } }, ngImport: i0 });
1030
1073
  }
1031
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: ModalTitleDirective, decorators: [{
1074
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.7", ngImport: i0, type: ModalTitleDirective, decorators: [{
1032
1075
  type: Directive,
1033
1076
  args: [{
1034
1077
  selector: '[seamModalTitle]',
1035
- standalone: false
1078
+ standalone: false,
1036
1079
  }]
1037
1080
  }], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { _modalTitleCss: [{
1038
1081
  type: HostBinding,
@@ -1052,25 +1095,25 @@ class ModalDirective {
1052
1095
  const ref = this.modal.openFromTemplate(this.template);
1053
1096
  // ref.backdropClick().subscribe(e => console.log('backdropClick', e))
1054
1097
  }
1055
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: ModalDirective, deps: [{ token: i0.TemplateRef }, { token: Modal }], target: i0.ɵɵFactoryTarget.Directive });
1056
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.0", type: ModalDirective, isStandalone: false, selector: "[seamModal]", exportAs: ["seamModal"], ngImport: i0 });
1098
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.7", ngImport: i0, type: ModalDirective, deps: [{ token: i0.TemplateRef }, { token: Modal }], target: i0.ɵɵFactoryTarget.Directive });
1099
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.7", type: ModalDirective, isStandalone: false, selector: "[seamModal]", exportAs: ["seamModal"], ngImport: i0 });
1057
1100
  }
1058
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: ModalDirective, decorators: [{
1101
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.7", ngImport: i0, type: ModalDirective, decorators: [{
1059
1102
  type: Directive,
1060
1103
  args: [{
1061
1104
  selector: '[seamModal]',
1062
1105
  exportAs: 'seamModal',
1063
- standalone: false
1106
+ standalone: false,
1064
1107
  }]
1065
1108
  }], ctorParameters: () => [{ type: i0.TemplateRef }, { type: Modal }] });
1066
1109
 
1067
1110
  class ModalBodyComponent {
1068
1111
  _modalBodyCss = true;
1069
1112
  _paddingCss = true;
1070
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: ModalBodyComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1071
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.0", type: ModalBodyComponent, isStandalone: false, selector: "seam-modal-body", host: { properties: { "class.modal-body": "this._modalBodyCss", "class.p-3": "this._paddingCss" } }, ngImport: i0, template: "<ng-content></ng-content>\n", styles: [":host{display:block}\n"] });
1113
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.7", ngImport: i0, type: ModalBodyComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1114
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.7", type: ModalBodyComponent, isStandalone: false, selector: "seam-modal-body", host: { properties: { "class.modal-body": "this._modalBodyCss", "class.p-3": "this._paddingCss" } }, ngImport: i0, template: "<ng-content></ng-content>\n", styles: [":host{display:block}\n"] });
1072
1115
  }
1073
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: ModalBodyComponent, decorators: [{
1116
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.7", ngImport: i0, type: ModalBodyComponent, decorators: [{
1074
1117
  type: Component,
1075
1118
  args: [{ selector: 'seam-modal-body', standalone: false, template: "<ng-content></ng-content>\n", styles: [":host{display:block}\n"] }]
1076
1119
  }], propDecorators: { _modalBodyCss: [{
@@ -1083,10 +1126,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
1083
1126
 
1084
1127
  class ModalFooterComponent {
1085
1128
  _modalFooterCss = true;
1086
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: ModalFooterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1087
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.0", type: ModalFooterComponent, isStandalone: false, selector: "seam-modal-footer", host: { properties: { "class.modal-footer": "this._modalFooterCss" } }, ngImport: i0, template: "<ng-content></ng-content>\n", styles: [""] });
1129
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.7", ngImport: i0, type: ModalFooterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1130
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.7", type: ModalFooterComponent, isStandalone: false, selector: "seam-modal-footer", host: { properties: { "class.modal-footer": "this._modalFooterCss" } }, ngImport: i0, template: "<ng-content></ng-content>\n", styles: [""] });
1088
1131
  }
1089
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: ModalFooterComponent, decorators: [{
1132
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.7", ngImport: i0, type: ModalFooterComponent, decorators: [{
1090
1133
  type: Component,
1091
1134
  args: [{ selector: 'seam-modal-footer', standalone: false, template: "<ng-content></ng-content>\n" }]
1092
1135
  }], propDecorators: { _modalFooterCss: [{
@@ -1099,10 +1142,10 @@ class ModalHeaderComponent {
1099
1142
  hasCloseBtn = true;
1100
1143
  _titleDirective;
1101
1144
  _closeDirective;
1102
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: ModalHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1103
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.0", type: ModalHeaderComponent, isStandalone: false, selector: "seam-modal-header", inputs: { hasCloseBtn: "hasCloseBtn" }, host: { properties: { "class.modal-header": "this._modalHeaderCss" } }, queries: [{ propertyName: "_titleDirective", first: true, predicate: ModalTitleDirective, descendants: true, static: true }, { propertyName: "_closeDirective", first: true, predicate: ModalCloseDirective, descendants: true, static: true }], ngImport: i0, template: "<ng-content></ng-content>\n\n<!-- <button seamModalClose>\n <span aria-hidden=\"true\">&times;</span>\n</button> -->\n\n<!-- seam-modal-header-close -->\n", styles: [""] });
1145
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.7", ngImport: i0, type: ModalHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1146
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.7", type: ModalHeaderComponent, isStandalone: false, selector: "seam-modal-header", inputs: { hasCloseBtn: "hasCloseBtn" }, host: { properties: { "class.modal-header": "this._modalHeaderCss" } }, queries: [{ propertyName: "_titleDirective", first: true, predicate: ModalTitleDirective, descendants: true, static: true }, { propertyName: "_closeDirective", first: true, predicate: ModalCloseDirective, descendants: true, static: true }], ngImport: i0, template: "<ng-content></ng-content>\n\n<!-- <button seamModalClose>\n <span aria-hidden=\"true\">&times;</span>\n</button> -->\n\n<!-- seam-modal-header-close -->\n", styles: [""] });
1104
1147
  }
1105
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: ModalHeaderComponent, decorators: [{
1148
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.7", ngImport: i0, type: ModalHeaderComponent, decorators: [{
1106
1149
  type: Component,
1107
1150
  args: [{ selector: 'seam-modal-header', standalone: false, template: "<ng-content></ng-content>\n\n<!-- <button seamModalClose>\n <span aria-hidden=\"true\">&times;</span>\n</button> -->\n\n<!-- seam-modal-header-close -->\n" }]
1108
1151
  }], propDecorators: { _modalHeaderCss: [{
@@ -1122,7 +1165,6 @@ const THESEAM_MODAL_CONTAINER = new InjectionToken('seamModalContainer');
1122
1165
 
1123
1166
  const LIB_MODAL = {
1124
1167
  provide: THESEAM_MODAL_CONTAINER,
1125
- // tslint:disable-next-line:no-use-before-declare
1126
1168
  useExisting: forwardRef(() => ModalComponent),
1127
1169
  multi: true,
1128
1170
  };
@@ -1131,12 +1173,18 @@ class ModalComponent {
1131
1173
  _overlay;
1132
1174
  _route;
1133
1175
  static ngAcceptInputType_showCloseBtn;
1134
- set closeOnKeyPressed(value) { this._closeOnKeyPressed = Array.isArray(value) ? value : []; }
1135
- get closeOnKeyPressed() { return this._closeOnKeyPressed; }
1176
+ set closeOnKeyPressed(value) {
1177
+ this._closeOnKeyPressed = Array.isArray(value) ? value : [];
1178
+ }
1179
+ get closeOnKeyPressed() {
1180
+ return this._closeOnKeyPressed;
1181
+ }
1136
1182
  _closeOnKeyPressed = [ESCAPE];
1137
1183
  showCloseBtn = true;
1138
1184
  titleText;
1139
- get icon() { return this._iconUrl || this._iconObj; }
1185
+ get icon() {
1186
+ return this._iconUrl || this._iconObj;
1187
+ }
1140
1188
  set icon(value) {
1141
1189
  if (typeof value === 'string') {
1142
1190
  this._iconUrl = value;
@@ -1157,14 +1205,14 @@ class ModalComponent {
1157
1205
  }
1158
1206
  _iconTpl;
1159
1207
  get titleTpl() {
1160
- return this._titleTpl || (this._queryTitleTpl && this._queryTitleTpl.template);
1208
+ return (this._titleTpl || (this._queryTitleTpl && this._queryTitleTpl.template));
1161
1209
  }
1162
1210
  set titleTpl(value) {
1163
1211
  this._titleTpl = value;
1164
1212
  }
1165
1213
  _titleTpl;
1166
1214
  get footerTpl() {
1167
- return this._footerTpl || (this._queryFooterTpl && this._queryFooterTpl.template);
1215
+ return (this._footerTpl || (this._queryFooterTpl && this._queryFooterTpl.template));
1168
1216
  }
1169
1217
  set footerTpl(value) {
1170
1218
  this._footerTpl = value;
@@ -1202,20 +1250,21 @@ class ModalComponent {
1202
1250
  if (this._overlayRef && this._overlayRef.hasAttached()) {
1203
1251
  return;
1204
1252
  }
1205
- const positionStrategy = this._overlay.position()
1253
+ const positionStrategy = this._overlay
1254
+ .position()
1206
1255
  .global()
1207
1256
  .centerHorizontally()
1208
1257
  .centerVertically();
1209
1258
  this._overlayRef = this._overlay.create({
1210
1259
  hasBackdrop: true,
1211
- positionStrategy
1260
+ positionStrategy,
1212
1261
  });
1213
- this._overlayRef.detachments().subscribe(_ => this.overlayDetached.emit());
1214
- this._overlayRef.backdropClick().subscribe(_ => this.close());
1215
- this._overlayRef.keydownEvents()
1216
- // tslint:disable-next-line:deprecation
1217
- .pipe(filter(e => e.keyCode === ESCAPE))
1218
- .subscribe(_ => this.close());
1262
+ this._overlayRef.detachments().subscribe((_) => this.overlayDetached.emit());
1263
+ this._overlayRef.backdropClick().subscribe((_) => this.close());
1264
+ this._overlayRef
1265
+ .keydownEvents()
1266
+ .pipe(filter((e) => e.keyCode === ESCAPE))
1267
+ .subscribe((_) => this.close());
1219
1268
  let portalToAttach = portal;
1220
1269
  if (!portalToAttach) {
1221
1270
  if (!this._modalTpl) {
@@ -1238,15 +1287,15 @@ class ModalComponent {
1238
1287
  isRouteModal() {
1239
1288
  return this._route.outlet === 'modal';
1240
1289
  }
1241
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: ModalComponent, deps: [{ token: i0.ViewContainerRef }, { token: i1$1.Overlay }, { token: i1$2.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component });
1242
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.0", type: ModalComponent, isStandalone: false, selector: "seam-modal", inputs: { closeOnKeyPressed: "closeOnKeyPressed", showCloseBtn: "showCloseBtn", titleText: "titleText", icon: "icon", iconTpl: "iconTpl", titleTpl: "titleTpl", footerTpl: "footerTpl", form: "form" }, outputs: { modalClosed: "modalClosed", overlayDetached: "overlayDetached", formSubmit: "formSubmit" }, providers: [LIB_MODAL], queries: [{ propertyName: "_queryIconTpl", first: true, predicate: ModalHeaderIconTplDirective, descendants: true, static: true }, { propertyName: "_queryTitleTpl", first: true, predicate: ModalHeaderTitleTplDirective, descendants: true, static: true }, { propertyName: "_queryFooterTpl", first: true, predicate: ModalFooterTplDirective, descendants: true, static: true }], viewQueries: [{ propertyName: "_modalTpl", first: true, predicate: ["modalTpl"], descendants: true, static: true }], ngImport: i0, template: "<ng-template #modalTpl>\n <form *ngIf=\"form\" [formGroup]=\"form\" (ngSubmit)=\"_onSubmit()\" class=\"p-4\" style=\"max-width: 800px\">\n <ng-container *ngTemplateOutlet=\"modalContent\"></ng-container>\n </form>\n\n <div *ngIf=\"!form\" class=\"p-4\" style=\"max-width: 800px\">\n <ng-container *ngTemplateOutlet=\"modalContent\"></ng-container>\n </div>\n\n <ng-template #modalContent>\n <div class=\"modal-content\">\n <div class=\"modal-header py-2\">\n <h4 class=\"modal-title\">\n <span class=\"pr-2 modal-header-icon\">\n <ng-container *ngIf=\"iconTpl; else noIconTpl\">\n <ng-template\n [ngTemplateOutlet]=\"iconTpl\"\n [ngTemplateOutletContext]=\"{ $implicit: icon, icon: icon }\">\n </ng-template>\n </ng-container>\n <ng-template #noIconTpl>\n <fa-icon *ngIf=\"_iconObj\"\n class=\"modal-header-icon--fa\"\n [icon]=\"_iconObj\"\n size=\"sm\"></fa-icon>\n <img *ngIf=\"_iconUrl\"\n class=\"modal-header-icon--img\"\n [src]=\"_iconUrl\" [alt]=\"titleText\">\n </ng-template>\n </span>\n\n <span class=\"modal-header-title\">\n <ng-container *ngIf=\"titleTpl; else noTitleTpl\">\n <ng-template\n [ngTemplateOutlet]=\"titleTpl\"\n [ngTemplateOutletContext]=\"{ $implicit: titleText, title: titleText }\">\n </ng-template>\n </ng-container>\n <ng-template #noTitleTpl>{{ titleText }}</ng-template>\n </span>\n </h4>\n <button *ngIf=\"showCloseBtn\"\n type=\"button\"\n class=\"close\"\n (click)=\"close()\"\n aria-label=\"Close\">\n <span aria-hidden=\"true\">&times;</span>\n </button>\n </div>\n <div class=\"modal-body\">\n <ng-content></ng-content>\n </div>\n <div *ngIf=\"_queryFooterTpl\" class=\"modal-footer p-2\">\n <ng-container *ngComponentOutlet=\"$any(_queryFooterTpl.template)\"></ng-container>\n </div>\n </div>\n </ng-template>\n</ng-template>\n", styles: [""], dependencies: [{ kind: "directive", type: i3$1.NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletEnvironmentInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"], exportAs: ["ngComponentOutlet"] }, { kind: "directive", type: i3$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i4$1.FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "animation", "spin", "pulse", "mask", "styles", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "classes", "transform", "a11yRole"] }, { kind: "directive", type: i5.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i5.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i5.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }] });
1290
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.7", ngImport: i0, type: ModalComponent, deps: [{ token: i0.ViewContainerRef }, { token: i1$1.Overlay }, { token: i1$2.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component });
1291
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.7", type: ModalComponent, isStandalone: false, selector: "seam-modal", inputs: { closeOnKeyPressed: "closeOnKeyPressed", showCloseBtn: "showCloseBtn", titleText: "titleText", icon: "icon", iconTpl: "iconTpl", titleTpl: "titleTpl", footerTpl: "footerTpl", form: "form" }, outputs: { modalClosed: "modalClosed", overlayDetached: "overlayDetached", formSubmit: "formSubmit" }, providers: [LIB_MODAL], queries: [{ propertyName: "_queryIconTpl", first: true, predicate: ModalHeaderIconTplDirective, descendants: true, static: true }, { propertyName: "_queryTitleTpl", first: true, predicate: ModalHeaderTitleTplDirective, descendants: true, static: true }, { propertyName: "_queryFooterTpl", first: true, predicate: ModalFooterTplDirective, descendants: true, static: true }], viewQueries: [{ propertyName: "_modalTpl", first: true, predicate: ["modalTpl"], descendants: true, static: true }], ngImport: i0, template: "<ng-template #modalTpl>\n <form\n *ngIf=\"form\"\n [formGroup]=\"form\"\n (ngSubmit)=\"_onSubmit()\"\n class=\"p-4\"\n style=\"max-width: 800px\"\n >\n <ng-container *ngTemplateOutlet=\"modalContent\"></ng-container>\n </form>\n\n <div *ngIf=\"!form\" class=\"p-4\" style=\"max-width: 800px\">\n <ng-container *ngTemplateOutlet=\"modalContent\"></ng-container>\n </div>\n\n <ng-template #modalContent>\n <div class=\"modal-content\">\n <div class=\"modal-header py-2\">\n <h4 class=\"modal-title\">\n <span class=\"pr-2 modal-header-icon\">\n <ng-container *ngIf=\"iconTpl; else noIconTpl\">\n <ng-template\n [ngTemplateOutlet]=\"iconTpl\"\n [ngTemplateOutletContext]=\"{ $implicit: icon, icon: icon }\"\n >\n </ng-template>\n </ng-container>\n <ng-template #noIconTpl>\n <fa-icon\n *ngIf=\"_iconObj\"\n class=\"modal-header-icon--fa\"\n [icon]=\"_iconObj\"\n size=\"sm\"\n ></fa-icon>\n <img\n *ngIf=\"_iconUrl\"\n class=\"modal-header-icon--img\"\n [src]=\"_iconUrl\"\n [alt]=\"titleText\"\n />\n </ng-template>\n </span>\n\n <span class=\"modal-header-title\">\n <ng-container *ngIf=\"titleTpl; else noTitleTpl\">\n <ng-template\n [ngTemplateOutlet]=\"titleTpl\"\n [ngTemplateOutletContext]=\"{\n $implicit: titleText,\n title: titleText,\n }\"\n >\n </ng-template>\n </ng-container>\n <ng-template #noTitleTpl>{{ titleText }}</ng-template>\n </span>\n </h4>\n <button\n *ngIf=\"showCloseBtn\"\n type=\"button\"\n class=\"close\"\n (click)=\"close()\"\n aria-label=\"Close\"\n >\n <span aria-hidden=\"true\">&times;</span>\n </button>\n </div>\n <div class=\"modal-body\">\n <ng-content></ng-content>\n </div>\n <div *ngIf=\"_queryFooterTpl\" class=\"modal-footer p-2\">\n <ng-container\n *ngComponentOutlet=\"$any(_queryFooterTpl.template)\"\n ></ng-container>\n </div>\n </div>\n </ng-template>\n</ng-template>\n", styles: [""], dependencies: [{ kind: "directive", type: i3$1.NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletEnvironmentInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"], exportAs: ["ngComponentOutlet"] }, { kind: "directive", type: i3$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i4$1.FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "animation", "spin", "pulse", "mask", "styles", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "classes", "transform", "a11yRole"] }, { kind: "directive", type: i5.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i5.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i5.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }] });
1243
1292
  }
1244
1293
  __decorate([
1245
1294
  InputBoolean()
1246
1295
  ], ModalComponent.prototype, "showCloseBtn", void 0);
1247
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: ModalComponent, decorators: [{
1296
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.7", ngImport: i0, type: ModalComponent, decorators: [{
1248
1297
  type: Component,
1249
- args: [{ selector: 'seam-modal', providers: [LIB_MODAL], standalone: false, template: "<ng-template #modalTpl>\n <form *ngIf=\"form\" [formGroup]=\"form\" (ngSubmit)=\"_onSubmit()\" class=\"p-4\" style=\"max-width: 800px\">\n <ng-container *ngTemplateOutlet=\"modalContent\"></ng-container>\n </form>\n\n <div *ngIf=\"!form\" class=\"p-4\" style=\"max-width: 800px\">\n <ng-container *ngTemplateOutlet=\"modalContent\"></ng-container>\n </div>\n\n <ng-template #modalContent>\n <div class=\"modal-content\">\n <div class=\"modal-header py-2\">\n <h4 class=\"modal-title\">\n <span class=\"pr-2 modal-header-icon\">\n <ng-container *ngIf=\"iconTpl; else noIconTpl\">\n <ng-template\n [ngTemplateOutlet]=\"iconTpl\"\n [ngTemplateOutletContext]=\"{ $implicit: icon, icon: icon }\">\n </ng-template>\n </ng-container>\n <ng-template #noIconTpl>\n <fa-icon *ngIf=\"_iconObj\"\n class=\"modal-header-icon--fa\"\n [icon]=\"_iconObj\"\n size=\"sm\"></fa-icon>\n <img *ngIf=\"_iconUrl\"\n class=\"modal-header-icon--img\"\n [src]=\"_iconUrl\" [alt]=\"titleText\">\n </ng-template>\n </span>\n\n <span class=\"modal-header-title\">\n <ng-container *ngIf=\"titleTpl; else noTitleTpl\">\n <ng-template\n [ngTemplateOutlet]=\"titleTpl\"\n [ngTemplateOutletContext]=\"{ $implicit: titleText, title: titleText }\">\n </ng-template>\n </ng-container>\n <ng-template #noTitleTpl>{{ titleText }}</ng-template>\n </span>\n </h4>\n <button *ngIf=\"showCloseBtn\"\n type=\"button\"\n class=\"close\"\n (click)=\"close()\"\n aria-label=\"Close\">\n <span aria-hidden=\"true\">&times;</span>\n </button>\n </div>\n <div class=\"modal-body\">\n <ng-content></ng-content>\n </div>\n <div *ngIf=\"_queryFooterTpl\" class=\"modal-footer p-2\">\n <ng-container *ngComponentOutlet=\"$any(_queryFooterTpl.template)\"></ng-container>\n </div>\n </div>\n </ng-template>\n</ng-template>\n" }]
1298
+ args: [{ selector: 'seam-modal', providers: [LIB_MODAL], standalone: false, template: "<ng-template #modalTpl>\n <form\n *ngIf=\"form\"\n [formGroup]=\"form\"\n (ngSubmit)=\"_onSubmit()\"\n class=\"p-4\"\n style=\"max-width: 800px\"\n >\n <ng-container *ngTemplateOutlet=\"modalContent\"></ng-container>\n </form>\n\n <div *ngIf=\"!form\" class=\"p-4\" style=\"max-width: 800px\">\n <ng-container *ngTemplateOutlet=\"modalContent\"></ng-container>\n </div>\n\n <ng-template #modalContent>\n <div class=\"modal-content\">\n <div class=\"modal-header py-2\">\n <h4 class=\"modal-title\">\n <span class=\"pr-2 modal-header-icon\">\n <ng-container *ngIf=\"iconTpl; else noIconTpl\">\n <ng-template\n [ngTemplateOutlet]=\"iconTpl\"\n [ngTemplateOutletContext]=\"{ $implicit: icon, icon: icon }\"\n >\n </ng-template>\n </ng-container>\n <ng-template #noIconTpl>\n <fa-icon\n *ngIf=\"_iconObj\"\n class=\"modal-header-icon--fa\"\n [icon]=\"_iconObj\"\n size=\"sm\"\n ></fa-icon>\n <img\n *ngIf=\"_iconUrl\"\n class=\"modal-header-icon--img\"\n [src]=\"_iconUrl\"\n [alt]=\"titleText\"\n />\n </ng-template>\n </span>\n\n <span class=\"modal-header-title\">\n <ng-container *ngIf=\"titleTpl; else noTitleTpl\">\n <ng-template\n [ngTemplateOutlet]=\"titleTpl\"\n [ngTemplateOutletContext]=\"{\n $implicit: titleText,\n title: titleText,\n }\"\n >\n </ng-template>\n </ng-container>\n <ng-template #noTitleTpl>{{ titleText }}</ng-template>\n </span>\n </h4>\n <button\n *ngIf=\"showCloseBtn\"\n type=\"button\"\n class=\"close\"\n (click)=\"close()\"\n aria-label=\"Close\"\n >\n <span aria-hidden=\"true\">&times;</span>\n </button>\n </div>\n <div class=\"modal-body\">\n <ng-content></ng-content>\n </div>\n <div *ngIf=\"_queryFooterTpl\" class=\"modal-footer p-2\">\n <ng-container\n *ngComponentOutlet=\"$any(_queryFooterTpl.template)\"\n ></ng-container>\n </div>\n </div>\n </ng-template>\n</ng-template>\n" }]
1250
1299
  }], ctorParameters: () => [{ type: i0.ViewContainerRef }, { type: i1$1.Overlay }, { type: i1$2.ActivatedRoute }], propDecorators: { closeOnKeyPressed: [{
1251
1300
  type: Input
1252
1301
  }], showCloseBtn: [{
@@ -1295,15 +1344,13 @@ class RouteModalComponent {
1295
1344
  this._modal = _modal;
1296
1345
  }
1297
1346
  ngOnInit() {
1298
- this._route.data
1299
- .pipe(takeUntil(this._ngUnsubscribe))
1300
- .subscribe(data => {
1347
+ this._route.data.pipe(takeUntil(this._ngUnsubscribe)).subscribe((data) => {
1301
1348
  // console.log('data', data)
1302
1349
  if (data.routeComponent) {
1303
1350
  // console.log(this._route.snapshot)
1304
1351
  const modalRef = this._modal.openFromComponent(data.routeComponent, {
1305
1352
  modalSize: 'lg',
1306
- data
1353
+ data,
1307
1354
  });
1308
1355
  modalRef.afterClosed().subscribe(() => {
1309
1356
  const parent = this.getOutletParent();
@@ -1327,23 +1374,25 @@ class RouteModalComponent {
1327
1374
  }
1328
1375
  _onDetached() {
1329
1376
  if (this.isRouteModal()) {
1330
- this._router.navigate([{ outlets: { modal: null, primary: ['.'] } }], { relativeTo: this._route.parent });
1377
+ this._router.navigate([{ outlets: { modal: null, primary: ['.'] } }], {
1378
+ relativeTo: this._route.parent,
1379
+ });
1331
1380
  }
1332
1381
  }
1333
1382
  isRouteModal() {
1334
1383
  return this._route.outlet === 'modal';
1335
1384
  }
1336
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: RouteModalComponent, deps: [{ token: i1$2.ActivatedRoute }, { token: i1$2.Router }, { token: Modal }], target: i0.ɵɵFactoryTarget.Component });
1337
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.0", type: RouteModalComponent, isStandalone: false, selector: "seam-route-modal", ngImport: i0, template: "<!-- <seam-modal (overlayDetached)=\"_onDetached()\">\n <router-outlet></router-outlet>\n</seam-modal> -->\n", styles: [""] });
1385
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.7", ngImport: i0, type: RouteModalComponent, deps: [{ token: i1$2.ActivatedRoute }, { token: i1$2.Router }, { token: Modal }], target: i0.ɵɵFactoryTarget.Component });
1386
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.7", type: RouteModalComponent, isStandalone: false, selector: "seam-route-modal", ngImport: i0, template: "<!-- <seam-modal (overlayDetached)=\"_onDetached()\">\n <router-outlet></router-outlet>\n</seam-modal> -->\n", styles: [""] });
1338
1387
  }
1339
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: RouteModalComponent, decorators: [{
1388
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.7", ngImport: i0, type: RouteModalComponent, decorators: [{
1340
1389
  type: Component,
1341
1390
  args: [{ selector: 'seam-route-modal', standalone: false, template: "<!-- <seam-modal (overlayDetached)=\"_onDetached()\">\n <router-outlet></router-outlet>\n</seam-modal> -->\n" }]
1342
1391
  }], ctorParameters: () => [{ type: i1$2.ActivatedRoute }, { type: i1$2.Router }, { type: Modal }] });
1343
1392
 
1344
1393
  class TheSeamModalModule {
1345
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: TheSeamModalModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1346
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.0", ngImport: i0, type: TheSeamModalModule, declarations: [ModalComponent,
1394
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.7", ngImport: i0, type: TheSeamModalModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1395
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.7", ngImport: i0, type: TheSeamModalModule, declarations: [ModalComponent,
1347
1396
  ModalFooterTplDirective,
1348
1397
  ModalHeaderIconTplDirective,
1349
1398
  ModalHeaderTitleTplDirective,
@@ -1374,7 +1423,7 @@ class TheSeamModalModule {
1374
1423
  ModalBodyComponent,
1375
1424
  ModalFooterComponent,
1376
1425
  ModalCloseDirective] });
1377
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: TheSeamModalModule, providers: [
1426
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.7", ngImport: i0, type: TheSeamModalModule, providers: [
1378
1427
  THESEAM_MODAL_SCROLL_STRATEGY_PROVIDER,
1379
1428
  { provide: MODAL_CONTAINER, useValue: ModalContainerComponent },
1380
1429
  { provide: MODAL_CONFIG, useValue: ModalConfig },
@@ -1389,7 +1438,7 @@ class TheSeamModalModule {
1389
1438
  // don't have to remember to import it or be faced with an unhelpful error.
1390
1439
  PortalModule] });
1391
1440
  }
1392
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: TheSeamModalModule, decorators: [{
1441
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.7", ngImport: i0, type: TheSeamModalModule, decorators: [{
1393
1442
  type: NgModule,
1394
1443
  args: [{
1395
1444
  declarations: [
@@ -1404,7 +1453,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
1404
1453
  ModalTitleDirective,
1405
1454
  ModalBodyComponent,
1406
1455
  ModalFooterComponent,
1407
- ModalCloseDirective
1456
+ ModalCloseDirective,
1408
1457
  ],
1409
1458
  imports: [
1410
1459
  CommonModule,
@@ -1429,13 +1478,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
1429
1478
  ModalTitleDirective,
1430
1479
  ModalBodyComponent,
1431
1480
  ModalFooterComponent,
1432
- ModalCloseDirective
1481
+ ModalCloseDirective,
1433
1482
  ],
1434
1483
  providers: [
1435
1484
  THESEAM_MODAL_SCROLL_STRATEGY_PROVIDER,
1436
1485
  { provide: MODAL_CONTAINER, useValue: ModalContainerComponent },
1437
1486
  { provide: MODAL_CONFIG, useValue: ModalConfig },
1438
- ]
1487
+ ],
1439
1488
  }]
1440
1489
  }] });
1441
1490