@theseam/ui-common 1.0.0-beta.6 → 1.0.0-beta.8

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 (149) hide show
  1. package/breadcrumbs/index.d.ts +1 -2
  2. package/buttons/index.d.ts +20 -13
  3. package/datatable/index.d.ts +8 -8
  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 +592 -388
  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 +120 -74
  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 +252 -195
  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 +177 -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 +123 -67
  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 +34 -38
  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 +50 -39
  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 +79 -56
  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/framework/base-layout/base-layout.component.scss +9 -4
  110. package/framework/base-layout/styles/_variables.scss +4 -9
  111. package/framework/dashboard/dashboard-widgets/dashboard-widgets.component.scss +6 -4
  112. package/framework/index.d.ts +6 -6
  113. package/framework/nav/nav-item/nav-item.component.scss +7 -6
  114. package/framework/nav/styles/_themes/light/_variables.scss +21 -5
  115. package/framework/nav/styles/_themes/primary/_variables.scss +21 -5
  116. package/framework/side-nav/side-nav-item/side-nav-item.component.scss +5 -2
  117. package/framework/side-nav/styles/_themes/light/_variables.scss +5 -1
  118. package/framework/side-nav/styles/_themes/primary/_variables.scss +25 -5
  119. package/graphql/index.d.ts +5 -5
  120. package/modal/README.md +5 -5
  121. package/modal/index.d.ts +1 -1
  122. package/models/index.d.ts +1 -1
  123. package/package.json +41 -41
  124. package/popover/index.d.ts +0 -2
  125. package/progress/progress-circle/styles/_variables.scss +15 -3
  126. package/story-helpers/index.d.ts +11 -1
  127. package/styles/bootstrap/_bootstrap.scss +34 -34
  128. package/styles/bootstrap/_bs-styles.scss +4 -8
  129. package/styles/bootstrap/_bs-utilities.scss +4 -4
  130. package/styles/bootstrap/_bs-variables.scss +65 -70
  131. package/styles/common/_forms.scss +9 -10
  132. package/styles/common/_global.scss +0 -1
  133. package/styles/common/_hacks.scss +1 -1
  134. package/styles/common/_table.scss +0 -1
  135. package/styles/common/_text.scss +3 -1
  136. package/styles/theme.scss +1 -1
  137. package/styles/vendor/ng-select/_ng-select-bs4.scss +292 -294
  138. package/styles/vendor/ngx-datatable/_ngx-datatable.scss +63 -32
  139. package/styles/vendor/ngx-datatable/_themes/bootstrap/_variables.scss +37 -10
  140. package/styles/vendor/ngx-datatable/_themes/material/_variables.scss +3 -1
  141. package/styles/vendor/quill/_quill.scss +15 -9
  142. package/tel-input/README.md +27 -27
  143. package/utils/index.d.ts +3 -3
  144. package/viewers/index.d.ts +9 -2
  145. package/widget/_widget-theme.scss +1 -1
  146. package/widget/styles/_variables.scss +2 -2
  147. package/widget/widget/widget.component.scss +0 -2
  148. package/widget/widget-content-components/widget-tile/widget-tile.component.scss +1 -3
  149. package/widget/widget-footer/widget-footer.component.scss +0 -1
@@ -19,10 +19,10 @@ import { TheSeamLoadingComponent } from '@theseam/ui-common/loading';
19
19
 
20
20
  class ToggleEditDisplayTplDirective {
21
21
  template = inject((TemplateRef));
22
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: ToggleEditDisplayTplDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
23
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.1", type: ToggleEditDisplayTplDirective, isStandalone: true, selector: "[seamToggleEditDisplayTpl]", exportAs: ["seamToggleEditDisplayTpl"], ngImport: i0 });
22
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: ToggleEditDisplayTplDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
23
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.6", type: ToggleEditDisplayTplDirective, isStandalone: true, selector: "[seamToggleEditDisplayTpl]", exportAs: ["seamToggleEditDisplayTpl"], ngImport: i0 });
24
24
  }
25
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: ToggleEditDisplayTplDirective, decorators: [{
25
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: ToggleEditDisplayTplDirective, decorators: [{
26
26
  type: Directive,
27
27
  args: [{
28
28
  selector: '[seamToggleEditDisplayTpl]',
@@ -39,7 +39,7 @@ class TheSeamToggleEditKeyboardListenerService {
39
39
  this._startListening();
40
40
  }
41
41
  remove(element) {
42
- this._elements = this._elements.filter(v => v !== element);
42
+ this._elements = this._elements.filter((v) => v !== element);
43
43
  if (this._elements.length === 0) {
44
44
  this._stopListening();
45
45
  }
@@ -68,19 +68,19 @@ class TheSeamToggleEditKeyboardListenerService {
68
68
  }
69
69
  }
70
70
  };
71
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: TheSeamToggleEditKeyboardListenerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
72
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: TheSeamToggleEditKeyboardListenerService, providedIn: 'root' });
71
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: TheSeamToggleEditKeyboardListenerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
72
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: TheSeamToggleEditKeyboardListenerService, providedIn: 'root' });
73
73
  }
74
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: TheSeamToggleEditKeyboardListenerService, decorators: [{
74
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: TheSeamToggleEditKeyboardListenerService, decorators: [{
75
75
  type: Injectable,
76
76
  args: [{ providedIn: 'root' }]
77
77
  }] });
78
78
 
79
79
  class TheSeamToggleEditActionsContainerComponent {
80
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: TheSeamToggleEditActionsContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
81
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.1", type: TheSeamToggleEditActionsContainerComponent, isStandalone: true, selector: "seam-toggle-edit-actions-container", ngImport: i0, template: "<ng-content></ng-content>\n", styles: [":host{display:block}\n"] });
80
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: TheSeamToggleEditActionsContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
81
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.6", type: TheSeamToggleEditActionsContainerComponent, isStandalone: true, selector: "seam-toggle-edit-actions-container", ngImport: i0, template: "<ng-content></ng-content>\n", styles: [":host{display:block}\n"] });
82
82
  }
83
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: TheSeamToggleEditActionsContainerComponent, decorators: [{
83
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: TheSeamToggleEditActionsContainerComponent, decorators: [{
84
84
  type: Component,
85
85
  args: [{ selector: 'seam-toggle-edit-actions-container', template: "<ng-content></ng-content>\n", styles: [":host{display:block}\n"] }]
86
86
  }] });
@@ -89,8 +89,14 @@ class TheSeamToggleEditComponent {
89
89
  static ngAcceptInputType_cancelOnBlur;
90
90
  static ngAcceptInputType_waitOnSubmit;
91
91
  _elementRef = inject((ElementRef));
92
- _controlContainer = inject(ControlContainer, { optional: true, self: true });
93
- _formFieldComponent = inject(TheSeamFormFieldComponent, { optional: true, host: true });
92
+ _controlContainer = inject(ControlContainer, {
93
+ optional: true,
94
+ self: true,
95
+ });
96
+ _formFieldComponent = inject(TheSeamFormFieldComponent, {
97
+ optional: true,
98
+ host: true,
99
+ });
94
100
  _kbListener = inject(TheSeamToggleEditKeyboardListenerService);
95
101
  _focusMonitor = inject(FocusMonitor);
96
102
  _ngZone = inject(NgZone);
@@ -113,11 +119,15 @@ class TheSeamToggleEditComponent {
113
119
  * value.
114
120
  */
115
121
  _beforeEditValue = null;
116
- get _toggleEditActiveClass() { return this.editing; }
122
+ get _toggleEditActiveClass() {
123
+ return this.editing;
124
+ }
117
125
  cancelOnBlur = true;
118
126
  waitOnSubmit = false;
119
127
  placeholder = '';
120
- get editing() { return this._editing; }
128
+ get editing() {
129
+ return this._editing;
130
+ }
121
131
  set editing(value) {
122
132
  if (this.disabled && value) {
123
133
  return;
@@ -165,7 +175,7 @@ class TheSeamToggleEditComponent {
165
175
  }
166
176
  ngAfterViewInit() {
167
177
  if (this._formFieldComponent && this._formFieldComponent.contentInput) {
168
- this._formFieldComponent.contentInput.stateChanges.subscribe(_ => {
178
+ this._formFieldComponent.contentInput.stateChanges.subscribe((_) => {
169
179
  this._checkDisabledChange();
170
180
  });
171
181
  }
@@ -186,7 +196,7 @@ class TheSeamToggleEditComponent {
186
196
  attributes: true,
187
197
  attributeFilter: ['class'],
188
198
  childList: false,
189
- characterData: false
199
+ characterData: false,
190
200
  });
191
201
  }
192
202
  _destroyMonitors() {
@@ -274,7 +284,8 @@ class TheSeamToggleEditComponent {
274
284
  if (!this._formFieldComponent?.contentInput) {
275
285
  return null;
276
286
  }
277
- return this._formFieldComponent.contentInput.ngControl.control;
287
+ return this._formFieldComponent.contentInput.ngControl
288
+ .control;
278
289
  }
279
290
  hasControl() {
280
291
  return !!this.getControl();
@@ -406,7 +417,8 @@ class TheSeamToggleEditComponent {
406
417
  }
407
418
  }
408
419
  getOverlayPosition(origin) {
409
- const positionStrategy = this._overlay.position()
420
+ const positionStrategy = this._overlay
421
+ .position()
410
422
  .flexibleConnectedTo(origin)
411
423
  .withPositions(this.getPositions())
412
424
  .withFlexibleDimensions(false)
@@ -431,7 +443,7 @@ class TheSeamToggleEditComponent {
431
443
  originX: 'end',
432
444
  originY: 'top',
433
445
  overlayX: 'end',
434
- overlayY: 'bottom'
446
+ overlayY: 'bottom',
435
447
  },
436
448
  ];
437
449
  }
@@ -443,8 +455,8 @@ class TheSeamToggleEditComponent {
443
455
  actionsFocusChange(event) {
444
456
  this._actionsFocused = !!event;
445
457
  }
446
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: TheSeamToggleEditComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
447
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.1", type: TheSeamToggleEditComponent, isStandalone: true, selector: "seam-toggle-edit", inputs: { cancelOnBlur: "cancelOnBlur", waitOnSubmit: "waitOnSubmit", placeholder: "placeholder", editing: "editing" }, outputs: { changeAccepted: "changeAccepted", changeDeclined: "changeDeclined", editingChange: "editingChange" }, host: { properties: { "class.toggle-edit-active": "this._toggleEditActiveClass" } }, queries: [{ propertyName: "displayTpl", first: true, predicate: ToggleEditDisplayTplDirective, descendants: true, static: true }], viewQueries: [{ propertyName: "templatePortalContent", first: true, predicate: ["templatePortalContent"], descendants: true, static: true }], ngImport: i0, template: "<div class=\"toggle-edit-not-editing rounded\"\n [class.w-100]=\"editing\"\n [class.toggle-edit-editing]=\"editing\"\n [class.is-disabled]=\"disabled\"\n (seamElemResized)=\"resized()\">\n <div class=\"toggle-edit-content-container\">\n <div class=\"toggle-edit-content\" (click)=\"toggleEditing(true)\">\n <ng-container *ngIf=\"editing; else notEditingTpl\">\n <ng-content></ng-content>\n </ng-container>\n <ng-template #notEditingTpl>\n <ng-container *ngIf=\"displayTpl; else noDisplayTpl\">\n <ng-template [ngTemplateOutlet]=\"displayTpl.template\" [ngTemplateOutletContext]=\"{ $implicit: getValue() || placeholder }\"></ng-template>\n </ng-container>\n <ng-template #noDisplayTpl>\n <div class=\"pl-1 pr-1\">\n {{ getValue() || placeholder }}\n </div>\n </ng-template>\n </ng-template>\n </div>\n <div>\n <ng-template *ngIf=\"!editing\" [cdkPortalOutlet]=\"templatePortal\"></ng-template>\n <ng-template #templatePortalContent>\n <seam-toggle-edit-actions-container\n [class.bg-light]=\"editing\"\n tabindex=\"-1\"\n cdkMonitorSubtreeFocus\n (cdkFocusChange)=\"actionsFocusChange($event)\">\n <button *ngIf=\"!editing\"\n type=\"button\"\n class=\"toggle-edit-edit-btn btn text-secondary bg-transparent p-1 border-0\"\n (click)=\"toggleEditing(true)\">\n <fa-icon [icon]=\"faPen\"></fa-icon>\n </button>\n <button *ngIf=\"editing\"\n type=\"button\"\n [disabled]=\"!canSubmit()\"\n class=\"toggle-edit-submit-btn btn text-secondary bg-transparent p-1 border-0\"\n (click)=\"submitEdit()\">\n <fa-icon [icon]=\"faCheck\"></fa-icon>\n </button>\n <button *ngIf=\"editing\"\n type=\"button\"\n class=\"toggle-edit-cancel-btn btn text-secondary bg-transparent p-1 border-0\"\n (click)=\"cancelEdit()\">\n <fa-icon [icon]=\"faTimes\"></fa-icon>\n </button>\n </seam-toggle-edit-actions-container>\n </ng-template>\n </div>\n </div>\n</div>\n\n<seam-loading *ngIf=\"isSubmitting()\"></seam-loading>\n", styles: [":host{display:block;position:relative}.toggle-edit-not-editing{transition:.25s ease-in-out background-color}.toggle-edit-not-editing .toggle-edit-content-container{display:flex;flex-direction:row}.toggle-edit-not-editing .toggle-edit-content-container .toggle-edit-content{flex:1 1 auto;display:flex;align-items:center}.toggle-edit-not-editing:not(.is-disabled):hover,.toggle-edit-not-editing:not(.is-disabled).toggle-edit-editing{background-color:#f8f9fa}.toggle-edit-not-editing:not(.is-disabled):hover .toggle-edit-edit-btn,.toggle-edit-not-editing:not(.is-disabled).toggle-edit-editing .toggle-edit-edit-btn{opacity:1;visibility:visible}.toggle-edit-not-editing .toggle-edit-edit-btn{opacity:0;visibility:hidden}.toggle-edit-not-editing .toggle-edit-edit-btn,.toggle-edit-not-editing .toggle-edit-submit-btn,.toggle-edit-not-editing .toggle-edit-cancel-btn{transition:.25s ease-in-out}.toggle-edit-not-editing .toggle-edit-edit-btn{border-top-left-radius:0;border-bottom-left-radius:0}.toggle-edit-not-editing .toggle-edit-submit-btn{border-radius:0}.toggle-edit-not-editing .toggle-edit-cancel-btn{border-top-left-radius:0;border-bottom-left-radius:0}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: PortalModule }, { kind: "directive", type: i1.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }, { kind: "ngmodule", type: A11yModule }, { kind: "directive", type: i2.CdkMonitorFocus, selector: "[cdkMonitorElementFocus], [cdkMonitorSubtreeFocus]", outputs: ["cdkFocusChange"], exportAs: ["cdkMonitorFocus"] }, { kind: "ngmodule", type: FontAwesomeModule }, { kind: "component", type: i3.FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "animation", "spin", "pulse", "mask", "styles", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "classes", "transform", "a11yRole"] }, { kind: "component", type: TheSeamLoadingComponent, selector: "seam-loading", inputs: ["theme"] }, { kind: "component", type: TheSeamToggleEditActionsContainerComponent, selector: "seam-toggle-edit-actions-container" }] });
458
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: TheSeamToggleEditComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
459
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.6", type: TheSeamToggleEditComponent, isStandalone: true, selector: "seam-toggle-edit", inputs: { cancelOnBlur: "cancelOnBlur", waitOnSubmit: "waitOnSubmit", placeholder: "placeholder", editing: "editing" }, outputs: { changeAccepted: "changeAccepted", changeDeclined: "changeDeclined", editingChange: "editingChange" }, host: { properties: { "class.toggle-edit-active": "this._toggleEditActiveClass" } }, queries: [{ propertyName: "displayTpl", first: true, predicate: ToggleEditDisplayTplDirective, descendants: true, static: true }], viewQueries: [{ propertyName: "templatePortalContent", first: true, predicate: ["templatePortalContent"], descendants: true, static: true }], ngImport: i0, template: "<div\n class=\"toggle-edit-not-editing rounded\"\n [class.w-100]=\"editing\"\n [class.toggle-edit-editing]=\"editing\"\n [class.is-disabled]=\"disabled\"\n (seamElemResized)=\"resized()\"\n>\n <div class=\"toggle-edit-content-container\">\n <div class=\"toggle-edit-content\" (click)=\"toggleEditing(true)\">\n <ng-container *ngIf=\"editing; else notEditingTpl\">\n <ng-content></ng-content>\n </ng-container>\n <ng-template #notEditingTpl>\n <ng-container *ngIf=\"displayTpl; else noDisplayTpl\">\n <ng-template\n [ngTemplateOutlet]=\"displayTpl.template\"\n [ngTemplateOutletContext]=\"{ $implicit: getValue() || placeholder }\"\n ></ng-template>\n </ng-container>\n <ng-template #noDisplayTpl>\n <div class=\"pl-1 pr-1\">\n {{ getValue() || placeholder }}\n </div>\n </ng-template>\n </ng-template>\n </div>\n <div>\n <ng-template\n *ngIf=\"!editing\"\n [cdkPortalOutlet]=\"templatePortal\"\n ></ng-template>\n <ng-template #templatePortalContent>\n <seam-toggle-edit-actions-container\n [class.bg-light]=\"editing\"\n tabindex=\"-1\"\n cdkMonitorSubtreeFocus\n (cdkFocusChange)=\"actionsFocusChange($event)\"\n >\n <button\n *ngIf=\"!editing\"\n type=\"button\"\n class=\"toggle-edit-edit-btn btn text-secondary bg-transparent p-1 border-0\"\n (click)=\"toggleEditing(true)\"\n >\n <fa-icon [icon]=\"faPen\"></fa-icon>\n </button>\n <button\n *ngIf=\"editing\"\n type=\"button\"\n [disabled]=\"!canSubmit()\"\n class=\"toggle-edit-submit-btn btn text-secondary bg-transparent p-1 border-0\"\n (click)=\"submitEdit()\"\n >\n <fa-icon [icon]=\"faCheck\"></fa-icon>\n </button>\n <button\n *ngIf=\"editing\"\n type=\"button\"\n class=\"toggle-edit-cancel-btn btn text-secondary bg-transparent p-1 border-0\"\n (click)=\"cancelEdit()\"\n >\n <fa-icon [icon]=\"faTimes\"></fa-icon>\n </button>\n </seam-toggle-edit-actions-container>\n </ng-template>\n </div>\n </div>\n</div>\n\n<seam-loading *ngIf=\"isSubmitting()\"></seam-loading>\n", styles: [":host{display:block;position:relative}.toggle-edit-not-editing{transition:.25s ease-in-out background-color}.toggle-edit-not-editing .toggle-edit-content-container{display:flex;flex-direction:row}.toggle-edit-not-editing .toggle-edit-content-container .toggle-edit-content{flex:1 1 auto;display:flex;align-items:center}.toggle-edit-not-editing:not(.is-disabled):hover,.toggle-edit-not-editing:not(.is-disabled).toggle-edit-editing{background-color:#f8f9fa}.toggle-edit-not-editing:not(.is-disabled):hover .toggle-edit-edit-btn,.toggle-edit-not-editing:not(.is-disabled).toggle-edit-editing .toggle-edit-edit-btn{opacity:1;visibility:visible}.toggle-edit-not-editing .toggle-edit-edit-btn{opacity:0;visibility:hidden}.toggle-edit-not-editing .toggle-edit-edit-btn,.toggle-edit-not-editing .toggle-edit-submit-btn,.toggle-edit-not-editing .toggle-edit-cancel-btn{transition:.25s ease-in-out}.toggle-edit-not-editing .toggle-edit-edit-btn{border-top-left-radius:0;border-bottom-left-radius:0}.toggle-edit-not-editing .toggle-edit-submit-btn{border-radius:0}.toggle-edit-not-editing .toggle-edit-cancel-btn{border-top-left-radius:0;border-bottom-left-radius:0}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: PortalModule }, { kind: "directive", type: i1.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }, { kind: "ngmodule", type: A11yModule }, { kind: "directive", type: i2.CdkMonitorFocus, selector: "[cdkMonitorElementFocus], [cdkMonitorSubtreeFocus]", outputs: ["cdkFocusChange"], exportAs: ["cdkMonitorFocus"] }, { kind: "ngmodule", type: FontAwesomeModule }, { kind: "component", type: i3.FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "animation", "spin", "pulse", "mask", "styles", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "classes", "transform", "a11yRole"] }, { kind: "component", type: TheSeamLoadingComponent, selector: "seam-loading", inputs: ["theme"] }, { kind: "component", type: TheSeamToggleEditActionsContainerComponent, selector: "seam-toggle-edit-actions-container" }] });
448
460
  }
449
461
  __decorate([
450
462
  InputBoolean()
@@ -452,7 +464,7 @@ __decorate([
452
464
  __decorate([
453
465
  InputBoolean()
454
466
  ], TheSeamToggleEditComponent.prototype, "waitOnSubmit", void 0);
455
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: TheSeamToggleEditComponent, decorators: [{
467
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: TheSeamToggleEditComponent, decorators: [{
456
468
  type: Component,
457
469
  args: [{ selector: 'seam-toggle-edit', imports: [
458
470
  NgIf,
@@ -462,7 +474,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
462
474
  FontAwesomeModule,
463
475
  TheSeamLoadingComponent,
464
476
  TheSeamToggleEditActionsContainerComponent,
465
- ], template: "<div class=\"toggle-edit-not-editing rounded\"\n [class.w-100]=\"editing\"\n [class.toggle-edit-editing]=\"editing\"\n [class.is-disabled]=\"disabled\"\n (seamElemResized)=\"resized()\">\n <div class=\"toggle-edit-content-container\">\n <div class=\"toggle-edit-content\" (click)=\"toggleEditing(true)\">\n <ng-container *ngIf=\"editing; else notEditingTpl\">\n <ng-content></ng-content>\n </ng-container>\n <ng-template #notEditingTpl>\n <ng-container *ngIf=\"displayTpl; else noDisplayTpl\">\n <ng-template [ngTemplateOutlet]=\"displayTpl.template\" [ngTemplateOutletContext]=\"{ $implicit: getValue() || placeholder }\"></ng-template>\n </ng-container>\n <ng-template #noDisplayTpl>\n <div class=\"pl-1 pr-1\">\n {{ getValue() || placeholder }}\n </div>\n </ng-template>\n </ng-template>\n </div>\n <div>\n <ng-template *ngIf=\"!editing\" [cdkPortalOutlet]=\"templatePortal\"></ng-template>\n <ng-template #templatePortalContent>\n <seam-toggle-edit-actions-container\n [class.bg-light]=\"editing\"\n tabindex=\"-1\"\n cdkMonitorSubtreeFocus\n (cdkFocusChange)=\"actionsFocusChange($event)\">\n <button *ngIf=\"!editing\"\n type=\"button\"\n class=\"toggle-edit-edit-btn btn text-secondary bg-transparent p-1 border-0\"\n (click)=\"toggleEditing(true)\">\n <fa-icon [icon]=\"faPen\"></fa-icon>\n </button>\n <button *ngIf=\"editing\"\n type=\"button\"\n [disabled]=\"!canSubmit()\"\n class=\"toggle-edit-submit-btn btn text-secondary bg-transparent p-1 border-0\"\n (click)=\"submitEdit()\">\n <fa-icon [icon]=\"faCheck\"></fa-icon>\n </button>\n <button *ngIf=\"editing\"\n type=\"button\"\n class=\"toggle-edit-cancel-btn btn text-secondary bg-transparent p-1 border-0\"\n (click)=\"cancelEdit()\">\n <fa-icon [icon]=\"faTimes\"></fa-icon>\n </button>\n </seam-toggle-edit-actions-container>\n </ng-template>\n </div>\n </div>\n</div>\n\n<seam-loading *ngIf=\"isSubmitting()\"></seam-loading>\n", styles: [":host{display:block;position:relative}.toggle-edit-not-editing{transition:.25s ease-in-out background-color}.toggle-edit-not-editing .toggle-edit-content-container{display:flex;flex-direction:row}.toggle-edit-not-editing .toggle-edit-content-container .toggle-edit-content{flex:1 1 auto;display:flex;align-items:center}.toggle-edit-not-editing:not(.is-disabled):hover,.toggle-edit-not-editing:not(.is-disabled).toggle-edit-editing{background-color:#f8f9fa}.toggle-edit-not-editing:not(.is-disabled):hover .toggle-edit-edit-btn,.toggle-edit-not-editing:not(.is-disabled).toggle-edit-editing .toggle-edit-edit-btn{opacity:1;visibility:visible}.toggle-edit-not-editing .toggle-edit-edit-btn{opacity:0;visibility:hidden}.toggle-edit-not-editing .toggle-edit-edit-btn,.toggle-edit-not-editing .toggle-edit-submit-btn,.toggle-edit-not-editing .toggle-edit-cancel-btn{transition:.25s ease-in-out}.toggle-edit-not-editing .toggle-edit-edit-btn{border-top-left-radius:0;border-bottom-left-radius:0}.toggle-edit-not-editing .toggle-edit-submit-btn{border-radius:0}.toggle-edit-not-editing .toggle-edit-cancel-btn{border-top-left-radius:0;border-bottom-left-radius:0}\n"] }]
477
+ ], template: "<div\n class=\"toggle-edit-not-editing rounded\"\n [class.w-100]=\"editing\"\n [class.toggle-edit-editing]=\"editing\"\n [class.is-disabled]=\"disabled\"\n (seamElemResized)=\"resized()\"\n>\n <div class=\"toggle-edit-content-container\">\n <div class=\"toggle-edit-content\" (click)=\"toggleEditing(true)\">\n <ng-container *ngIf=\"editing; else notEditingTpl\">\n <ng-content></ng-content>\n </ng-container>\n <ng-template #notEditingTpl>\n <ng-container *ngIf=\"displayTpl; else noDisplayTpl\">\n <ng-template\n [ngTemplateOutlet]=\"displayTpl.template\"\n [ngTemplateOutletContext]=\"{ $implicit: getValue() || placeholder }\"\n ></ng-template>\n </ng-container>\n <ng-template #noDisplayTpl>\n <div class=\"pl-1 pr-1\">\n {{ getValue() || placeholder }}\n </div>\n </ng-template>\n </ng-template>\n </div>\n <div>\n <ng-template\n *ngIf=\"!editing\"\n [cdkPortalOutlet]=\"templatePortal\"\n ></ng-template>\n <ng-template #templatePortalContent>\n <seam-toggle-edit-actions-container\n [class.bg-light]=\"editing\"\n tabindex=\"-1\"\n cdkMonitorSubtreeFocus\n (cdkFocusChange)=\"actionsFocusChange($event)\"\n >\n <button\n *ngIf=\"!editing\"\n type=\"button\"\n class=\"toggle-edit-edit-btn btn text-secondary bg-transparent p-1 border-0\"\n (click)=\"toggleEditing(true)\"\n >\n <fa-icon [icon]=\"faPen\"></fa-icon>\n </button>\n <button\n *ngIf=\"editing\"\n type=\"button\"\n [disabled]=\"!canSubmit()\"\n class=\"toggle-edit-submit-btn btn text-secondary bg-transparent p-1 border-0\"\n (click)=\"submitEdit()\"\n >\n <fa-icon [icon]=\"faCheck\"></fa-icon>\n </button>\n <button\n *ngIf=\"editing\"\n type=\"button\"\n class=\"toggle-edit-cancel-btn btn text-secondary bg-transparent p-1 border-0\"\n (click)=\"cancelEdit()\"\n >\n <fa-icon [icon]=\"faTimes\"></fa-icon>\n </button>\n </seam-toggle-edit-actions-container>\n </ng-template>\n </div>\n </div>\n</div>\n\n<seam-loading *ngIf=\"isSubmitting()\"></seam-loading>\n", styles: [":host{display:block;position:relative}.toggle-edit-not-editing{transition:.25s ease-in-out background-color}.toggle-edit-not-editing .toggle-edit-content-container{display:flex;flex-direction:row}.toggle-edit-not-editing .toggle-edit-content-container .toggle-edit-content{flex:1 1 auto;display:flex;align-items:center}.toggle-edit-not-editing:not(.is-disabled):hover,.toggle-edit-not-editing:not(.is-disabled).toggle-edit-editing{background-color:#f8f9fa}.toggle-edit-not-editing:not(.is-disabled):hover .toggle-edit-edit-btn,.toggle-edit-not-editing:not(.is-disabled).toggle-edit-editing .toggle-edit-edit-btn{opacity:1;visibility:visible}.toggle-edit-not-editing .toggle-edit-edit-btn{opacity:0;visibility:hidden}.toggle-edit-not-editing .toggle-edit-edit-btn,.toggle-edit-not-editing .toggle-edit-submit-btn,.toggle-edit-not-editing .toggle-edit-cancel-btn{transition:.25s ease-in-out}.toggle-edit-not-editing .toggle-edit-edit-btn{border-top-left-radius:0;border-bottom-left-radius:0}.toggle-edit-not-editing .toggle-edit-submit-btn{border-radius:0}.toggle-edit-not-editing .toggle-edit-cancel-btn{border-top-left-radius:0;border-bottom-left-radius:0}\n"] }]
466
478
  }], ctorParameters: () => [], propDecorators: { _toggleEditActiveClass: [{
467
479
  type: HostBinding,
468
480
  args: ['class.toggle-edit-active']
@@ -489,23 +501,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
489
501
  }] } });
490
502
 
491
503
  class TheSeamToggleEditModule {
492
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: TheSeamToggleEditModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
493
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.1", ngImport: i0, type: TheSeamToggleEditModule, imports: [ToggleEditDisplayTplDirective,
494
- TheSeamToggleEditComponent], exports: [ToggleEditDisplayTplDirective,
495
- TheSeamToggleEditComponent] });
496
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: TheSeamToggleEditModule, imports: [TheSeamToggleEditComponent] });
504
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: TheSeamToggleEditModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
505
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.6", ngImport: i0, type: TheSeamToggleEditModule, imports: [ToggleEditDisplayTplDirective, TheSeamToggleEditComponent], exports: [ToggleEditDisplayTplDirective, TheSeamToggleEditComponent] });
506
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: TheSeamToggleEditModule, imports: [TheSeamToggleEditComponent] });
497
507
  }
498
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: TheSeamToggleEditModule, decorators: [{
508
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: TheSeamToggleEditModule, decorators: [{
499
509
  type: NgModule,
500
510
  args: [{
501
- imports: [
502
- ToggleEditDisplayTplDirective,
503
- TheSeamToggleEditComponent,
504
- ],
505
- exports: [
506
- ToggleEditDisplayTplDirective,
507
- TheSeamToggleEditComponent,
508
- ],
511
+ imports: [ToggleEditDisplayTplDirective, TheSeamToggleEditComponent],
512
+ exports: [ToggleEditDisplayTplDirective, TheSeamToggleEditComponent],
509
513
  }]
510
514
  }] });
511
515
 
@@ -1 +1 @@
1
- {"version":3,"file":"theseam-ui-common-toggle-edit.mjs","sources":["../../../projects/ui-common/toggle-edit/toggle-edit-display-tpl.directive.ts","../../../projects/ui-common/toggle-edit/toggle-edit-keyboard-listener.service.ts","../../../projects/ui-common/toggle-edit/toggle-edit-actions-container/toggle-edit-actions-container.component.ts","../../../projects/ui-common/toggle-edit/toggle-edit-actions-container/toggle-edit-actions-container.component.html","../../../projects/ui-common/toggle-edit/toggle-edit.component.ts","../../../projects/ui-common/toggle-edit/toggle-edit.component.html","../../../projects/ui-common/toggle-edit/toggle-edit.module.ts","../../../projects/ui-common/toggle-edit/theseam-ui-common-toggle-edit.ts"],"sourcesContent":["import { Directive, inject, TemplateRef } from '@angular/core'\n\n@Directive({\n selector: '[seamToggleEditDisplayTpl]',\n exportAs: 'seamToggleEditDisplayTpl',\n})\nexport class ToggleEditDisplayTplDirective {\n public readonly template = inject(TemplateRef<any>)\n}\n","import { DOCUMENT } from '@angular/common'\nimport { inject, Injectable } from '@angular/core'\n\nimport { TheSeamCanToggleEdit } from './models'\n\n@Injectable({ providedIn: 'root' })\nexport class TheSeamToggleEditKeyboardListenerService {\n\n private readonly _document: Document = inject(DOCUMENT)\n\n private _elements: TheSeamCanToggleEdit[] = []\n\n private _isListening = false\n\n public add(element: TheSeamCanToggleEdit): void {\n this._elements.push(element)\n this._startListening()\n }\n\n public remove(element: TheSeamCanToggleEdit): void {\n this._elements = this._elements.filter(v => v !== element)\n if (this._elements.length === 0) {\n this._stopListening()\n }\n }\n\n public isListening(): boolean {\n return this._isListening\n }\n\n private _startListening(): void {\n if (this.isListening()) {\n return\n }\n\n this._document.body.addEventListener('keydown', this._keydownListener, true)\n\n this._isListening = true\n }\n\n private _stopListening(): void {\n if (!this.isListening()) {\n return\n }\n\n this._document.body.removeEventListener('keydown', this._keydownListener, true)\n\n this._isListening = false\n }\n\n private _keydownListener = (event: KeyboardEvent): boolean | void => {\n for (const element of this._elements) {\n if (element.isEditing()) {\n element.keydownEvent(event)\n }\n }\n }\n\n}\n","import { Component } from '@angular/core'\n\n@Component({\n selector: 'seam-toggle-edit-actions-container',\n templateUrl: './toggle-edit-actions-container.component.html',\n styleUrls: ['./toggle-edit-actions-container.component.scss'],\n})\nexport class TheSeamToggleEditActionsContainerComponent { }\n","<ng-content></ng-content>\n","import { A11yModule, FocusMonitor } from '@angular/cdk/a11y'\nimport { BooleanInput, coerceBooleanProperty } from '@angular/cdk/coercion'\nimport { ENTER, ESCAPE } from '@angular/cdk/keycodes'\nimport { ConnectionPositionPair, Overlay, OverlayRef, PositionStrategy } from '@angular/cdk/overlay'\nimport { PortalModule, TemplatePortal } from '@angular/cdk/portal'\nimport {\n AfterViewInit,\n Component,\n ContentChild,\n DoCheck,\n ElementRef,\n EventEmitter,\n HostBinding,\n inject,\n Input,\n NgZone,\n OnDestroy,\n OnInit,\n Output,\n Renderer2,\n TemplateRef,\n ViewChild,\n ViewContainerRef,\n} from '@angular/core'\nimport { AbstractControl, ControlContainer, FormControl, FormGroup } from '@angular/forms'\nimport { NgIf, NgTemplateOutlet } from '@angular/common'\n\nimport { faCheck, faPen, faTimes } from '@fortawesome/free-solid-svg-icons'\nimport { FontAwesomeModule } from '@fortawesome/angular-fontawesome'\nimport { InputBoolean } from '@theseam/ui-common/core'\nimport { TheSeamFormFieldComponent } from '@theseam/ui-common/form-field'\nimport { TheSeamLoadingComponent } from '@theseam/ui-common/loading'\n\nimport { TheSeamCanToggleEdit } from './models/can-toggle-edit'\nimport { TheSeamToggleEditRef } from './models/toggle-edit-ref'\nimport { ToggleEditDisplayTplDirective } from './toggle-edit-display-tpl.directive'\nimport { TheSeamToggleEditKeyboardListenerService } from './toggle-edit-keyboard-listener.service'\nimport { TheSeamToggleEditActionsContainerComponent } from './toggle-edit-actions-container/toggle-edit-actions-container.component'\n\n@Component({\n selector: 'seam-toggle-edit',\n templateUrl: './toggle-edit.component.html',\n styleUrls: ['./toggle-edit.component.scss'],\n imports: [\n NgIf,\n NgTemplateOutlet,\n PortalModule,\n A11yModule,\n FontAwesomeModule,\n TheSeamLoadingComponent,\n TheSeamToggleEditActionsContainerComponent,\n ],\n})\nexport class TheSeamToggleEditComponent implements OnInit, OnDestroy, AfterViewInit, DoCheck, TheSeamCanToggleEdit, TheSeamToggleEditRef {\n static ngAcceptInputType_cancelOnBlur: BooleanInput\n static ngAcceptInputType_waitOnSubmit: BooleanInput\n\n private readonly _elementRef = inject(ElementRef<HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement>)\n private readonly _controlContainer = inject(ControlContainer, { optional: true, self: true })\n private readonly _formFieldComponent = inject(TheSeamFormFieldComponent, { optional: true, host: true })\n private readonly _kbListener = inject(TheSeamToggleEditKeyboardListenerService)\n private readonly _focusMonitor = inject(FocusMonitor)\n private readonly _ngZone = inject(NgZone)\n private readonly _renderer = inject(Renderer2)\n private readonly _viewContainerRef = inject(ViewContainerRef)\n private readonly _overlay = inject(Overlay)\n\n readonly faPen = faPen\n readonly faTimes = faTimes\n readonly faCheck = faCheck\n\n private _previousDisabled = false\n\n /** Use `hasFocus()` to check for focus. This is only for monitoring focus lost. */\n private _focused = false\n private _focusObserver?: MutationObserver\n private _actionsFocused = false\n private _submitting = false\n\n /**\n * Input value before editing.\n *\n * If the edit change is canceled the input value will be reset back to this\n * value.\n */\n private _beforeEditValue = null\n\n @HostBinding('class.toggle-edit-active') get _toggleEditActiveClass() { return this.editing }\n\n @Input() @InputBoolean() cancelOnBlur = true\n @Input() @InputBoolean() waitOnSubmit = false\n\n @Input() placeholder = ''\n\n @Input()\n get editing(): boolean { return this._editing }\n set editing(value: boolean) {\n if (this.disabled && value) { return }\n\n if (!this._editing) {\n this.updateBeforeEditValue()\n }\n this._editing = coerceBooleanProperty(value)\n this.editingChange.emit(value)\n }\n private _editing = false\n\n @Output() readonly changeAccepted = new EventEmitter<TheSeamToggleEditRef>()\n @Output() readonly changeDeclined = new EventEmitter<TheSeamToggleEditRef>()\n @Output() readonly editingChange = new EventEmitter<boolean>()\n\n @ViewChild('templatePortalContent', { static: true }) templatePortalContent?: TemplateRef<any>\n public templatePortal?: TemplatePortal<any>\n\n public modalRef?: OverlayRef\n\n @ContentChild(ToggleEditDisplayTplDirective, { static: true }) displayTpl?: ToggleEditDisplayTplDirective\n\n constructor() {\n this._ngZone.runOutsideAngular(() => {\n this._focusObserver = new MutationObserver(() => {\n this._ngZone.run(() => {\n if (this.hasFocus()) {\n if (this.disabled) { return }\n this._onFocus()\n } else {\n this._onBlur()\n }\n })\n })\n })\n }\n\n ngOnInit() {\n this._initMonitors()\n if (this._formFieldComponent) {\n // TODO: Consider making this smarter, such as avoiding overwritting when input set.\n this._formFieldComponent.numPaddingErrors = 0\n }\n }\n\n ngOnDestroy() {\n this._destroyMonitors()\n }\n\n ngAfterViewInit() {\n if (this._formFieldComponent && this._formFieldComponent.contentInput) {\n this._formFieldComponent.contentInput.stateChanges.subscribe(_ => {\n this._checkDisabledChange()\n })\n }\n setTimeout(() => {\n if (this.templatePortalContent) {\n this.templatePortal = new TemplatePortal(this.templatePortalContent, this._viewContainerRef)\n }\n })\n this._checkDisabledChange()\n }\n\n ngDoCheck() {\n this._checkDisabledChange()\n }\n\n private _initMonitors() {\n this._kbListener.add(this)\n\n this._focusMonitor.monitor(this._elementRef.nativeElement, true)\n this._focusObserver?.observe(this._elementRef.nativeElement, {\n attributes: true,\n attributeFilter: ['class'],\n childList: false,\n characterData: false\n })\n }\n\n private _destroyMonitors() {\n this._kbListener.remove(this)\n\n this._focusObserver?.disconnect()\n this._focused = false\n this._focusMonitor.stopMonitoring(this._elementRef.nativeElement)\n this._renderer.removeAttribute(this._elementRef.nativeElement, 'tabindex')\n }\n\n // Make this disabled checking implementation better. It gets called to much\n // trying to be accurate.\n private _checkDisabledChange() {\n // const isDisabled = this.disabled\n // if (isDisabled !== this._previousDisabled) {\n\n // }\n }\n\n public get disabled() {\n const control = this.getControl()\n if (control) {\n return control.disabled\n }\n return false\n }\n\n public canSubmit(): boolean {\n const control = this.getControl()\n if (control) {\n return control.valid\n }\n return true\n }\n\n public isSubmitting(): boolean {\n return this._submitting\n }\n\n public submitComplete(error?: any): void {\n const control = this.getControl()\n if (control) {\n control.enable()\n }\n this._submitting = false\n\n if (!error) {\n this.stopEditing()\n }\n }\n\n public updateBeforeEditValue(): void {\n const control = this.getControl()\n if (control) {\n this._beforeEditValue = control.value\n }\n }\n\n public getValue(): string | null {\n const control = this.getControl()\n if (control) {\n return control.value\n }\n\n return null\n }\n\n public resetValue(): void {\n const control = this.getControl()\n if (control) {\n // Reset without emitting then update which will emit, because reset will\n // emit changes before setting pristine\n control.reset(this._beforeEditValue, { emitEvent: false })\n control.updateValueAndValidity()\n }\n }\n\n public isFormGroup(): boolean {\n return !!this._controlContainer\n }\n\n public getFormGroup(): FormGroup | null {\n if (!this.isFormGroup()) { return null }\n if (!this._controlContainer?.control) { return null }\n return this._controlContainer.control as FormGroup\n }\n\n public isInFormField(): boolean {\n return !!this._formFieldComponent\n }\n\n public getFormControl(): FormControl | null {\n if (!this.isInFormField()) { return null }\n if (!this._formFieldComponent?.contentInput) { return null }\n return this._formFieldComponent.contentInput.ngControl.control as FormControl\n }\n\n public hasControl(): boolean {\n return !!this.getControl()\n }\n\n public getControl(): AbstractControl | null {\n if (this.isFormGroup()) {\n return this.getFormGroup()\n } else if (this.isInFormField()) {\n return this.getFormControl()\n }\n return null\n }\n\n public submitEdit(): void {\n if (!this.canSubmit()) {\n return\n }\n\n if (this.waitOnSubmit) {\n const control = this.getControl()\n if (control) {\n control.disable()\n }\n this._submitting = true\n }\n\n this.stopEditing()\n\n this.changeAccepted.emit(this as TheSeamToggleEditRef)\n }\n\n public cancelEdit(): void {\n // Reset without emitting then update which will emit, because reset will\n // emit changes before setting pristine\n this.resetValue()\n this.stopEditing()\n\n this.changeDeclined.emit(this as TheSeamToggleEditRef)\n }\n\n private _onFocus(): void {\n // Return if already focused\n if (this._focused) { return }\n\n this._focused = true\n this._actionsFocused = false\n }\n\n private _onBlur(): void {\n // Return if focus hasn't been detected\n if (!this._focused) { return }\n\n if (this.editing && this.cancelOnBlur) {\n setTimeout(() => {\n if (!this._actionsFocused) {\n this.cancelEdit()\n }\n })\n }\n\n this._focused = false\n }\n\n public hasFocus(): boolean {\n return this._elementRef.nativeElement.classList.contains('cdk-focused')\n }\n\n public focusContent(): void {\n // Set the tab index to `-1` to allow the root element of the component to\n // receive `focus` event from javascript, but not get focused by keyboard\n // navigation. This is for the focus monitor. If a button is clicked the\n // focus monitor emits a blur before the focus of the input. This will avoid\n // the blur by letting the component itself receive focus events.\n this._renderer.setAttribute(this._elementRef.nativeElement, 'tabindex', '-1')\n this._elementRef.nativeElement.focus()\n }\n\n public toggleEditing(isEditing?: boolean): void {\n if (this.editing === isEditing) { return }\n const _editing = isEditing === undefined ? !this.editing : !!isEditing\n if (_editing) {\n this.startEditing()\n } else {\n this.stopEditing()\n }\n }\n\n public isEditing(): boolean {\n return this.editing\n }\n\n public startEditing(): void {\n if (this.disabled) { return }\n if (this.isEditing()) {\n return\n }\n\n this.updateBeforeEditValue()\n\n this.focusContent()\n\n this.editing = true\n\n this.modalRef = this._overlay.create({\n hasBackdrop: false,\n positionStrategy: this.getOverlayPosition(this._elementRef.nativeElement),\n })\n\n this.modalRef.attach(this.templatePortal)\n }\n\n public stopEditing(): void {\n if (!this.isEditing()) {\n return\n }\n\n if (this.isSubmitting()) {\n return\n }\n\n if (this.modalRef?.hasAttached()) {\n this.modalRef.detach()\n }\n\n // NOTE: This is a hack to avoid a focus lost issue introduced by a focus\n // acuired issue's hack.\n this._elementRef.nativeElement.focus()\n this._elementRef.nativeElement.blur()\n this._focusMonitor.stopMonitoring(this._elementRef.nativeElement)\n this._renderer.removeAttribute(this._elementRef.nativeElement, 'tabindex')\n this._focusMonitor.monitor(this._elementRef.nativeElement, true)\n\n this.editing = false\n }\n\n public keydownEvent(event: KeyboardEvent): void {\n switch (event.keyCode) {\n case ESCAPE: {\n this.cancelEdit()\n break\n }\n case ENTER: {\n this.submitEdit()\n break\n }\n }\n }\n\n private getOverlayPosition(origin: HTMLElement): PositionStrategy {\n const positionStrategy = this._overlay.position()\n .flexibleConnectedTo(origin)\n .withPositions(this.getPositions())\n .withFlexibleDimensions(false)\n .withPush(false)\n\n return positionStrategy\n }\n\n private getPositions(): ConnectionPositionPair[] {\n return [\n {\n originX: 'end',\n originY: 'top',\n overlayX: 'start',\n overlayY: 'top',\n },\n {\n originX: 'end',\n originY: 'bottom',\n overlayX: 'end',\n overlayY: 'top',\n },\n {\n originX: 'end',\n originY: 'top',\n overlayX: 'end',\n overlayY: 'bottom'\n },\n ]\n }\n\n public resized(): void {\n if (this.modalRef && this.modalRef.hasAttached()) {\n this.modalRef.updatePosition()\n }\n }\n\n public actionsFocusChange(event: any): void {\n this._actionsFocused = !!event\n }\n\n}\n","<div class=\"toggle-edit-not-editing rounded\"\n [class.w-100]=\"editing\"\n [class.toggle-edit-editing]=\"editing\"\n [class.is-disabled]=\"disabled\"\n (seamElemResized)=\"resized()\">\n <div class=\"toggle-edit-content-container\">\n <div class=\"toggle-edit-content\" (click)=\"toggleEditing(true)\">\n <ng-container *ngIf=\"editing; else notEditingTpl\">\n <ng-content></ng-content>\n </ng-container>\n <ng-template #notEditingTpl>\n <ng-container *ngIf=\"displayTpl; else noDisplayTpl\">\n <ng-template [ngTemplateOutlet]=\"displayTpl.template\" [ngTemplateOutletContext]=\"{ $implicit: getValue() || placeholder }\"></ng-template>\n </ng-container>\n <ng-template #noDisplayTpl>\n <div class=\"pl-1 pr-1\">\n {{ getValue() || placeholder }}\n </div>\n </ng-template>\n </ng-template>\n </div>\n <div>\n <ng-template *ngIf=\"!editing\" [cdkPortalOutlet]=\"templatePortal\"></ng-template>\n <ng-template #templatePortalContent>\n <seam-toggle-edit-actions-container\n [class.bg-light]=\"editing\"\n tabindex=\"-1\"\n cdkMonitorSubtreeFocus\n (cdkFocusChange)=\"actionsFocusChange($event)\">\n <button *ngIf=\"!editing\"\n type=\"button\"\n class=\"toggle-edit-edit-btn btn text-secondary bg-transparent p-1 border-0\"\n (click)=\"toggleEditing(true)\">\n <fa-icon [icon]=\"faPen\"></fa-icon>\n </button>\n <button *ngIf=\"editing\"\n type=\"button\"\n [disabled]=\"!canSubmit()\"\n class=\"toggle-edit-submit-btn btn text-secondary bg-transparent p-1 border-0\"\n (click)=\"submitEdit()\">\n <fa-icon [icon]=\"faCheck\"></fa-icon>\n </button>\n <button *ngIf=\"editing\"\n type=\"button\"\n class=\"toggle-edit-cancel-btn btn text-secondary bg-transparent p-1 border-0\"\n (click)=\"cancelEdit()\">\n <fa-icon [icon]=\"faTimes\"></fa-icon>\n </button>\n </seam-toggle-edit-actions-container>\n </ng-template>\n </div>\n </div>\n</div>\n\n<seam-loading *ngIf=\"isSubmitting()\"></seam-loading>\n","import { NgModule } from '@angular/core'\n\nimport { ToggleEditDisplayTplDirective } from './toggle-edit-display-tpl.directive'\nimport { TheSeamToggleEditComponent } from './toggle-edit.component'\n\n@NgModule({\n imports: [\n ToggleEditDisplayTplDirective,\n TheSeamToggleEditComponent,\n ],\n exports: [\n ToggleEditDisplayTplDirective,\n TheSeamToggleEditComponent,\n ],\n})\nexport class TheSeamToggleEditModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;MAMa,6BAA6B,CAAA;AACxB,IAAA,QAAQ,GAAG,MAAM,EAAC,WAAgB,EAAC;uGADxC,6BAA6B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAA7B,6BAA6B,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,4BAAA,EAAA,QAAA,EAAA,CAAA,0BAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAA7B,6BAA6B,EAAA,UAAA,EAAA,CAAA;kBAJzC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,4BAA4B;AACtC,oBAAA,QAAQ,EAAE,0BAA0B;AACrC,iBAAA;;;MCCY,wCAAwC,CAAA;AAElC,IAAA,SAAS,GAAa,MAAM,CAAC,QAAQ,CAAC;IAE/C,SAAS,GAA2B,EAAE;IAEtC,YAAY,GAAG,KAAK;AAErB,IAAA,GAAG,CAAC,OAA6B,EAAA;AACtC,QAAA,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC;QAC5B,IAAI,CAAC,eAAe,EAAE;IACxB;AAEO,IAAA,MAAM,CAAC,OAA6B,EAAA;AACzC,QAAA,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,KAAK,OAAO,CAAC;QAC1D,IAAI,IAAI,CAAC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AA,EAAA,CAAA;AAGjB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,uBAAuB,YAPhC,0BAA0B,CAAA,EAAA,CAAA;;2FAOjB,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBAVnC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,6BAA6B;wBAC7B,0BAA0B;AAC3B,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,6BAA6B;wBAC7B,0BAA0B;AAC3B,qBAAA;AACF,iBAAA;;;ACdD;;AAEG;;;;"}
1
+ {"version":3,"file":"theseam-ui-common-toggle-edit.mjs","sources":["../../../projects/ui-common/toggle-edit/toggle-edit-display-tpl.directive.ts","../../../projects/ui-common/toggle-edit/toggle-edit-keyboard-listener.service.ts","../../../projects/ui-common/toggle-edit/toggle-edit-actions-container/toggle-edit-actions-container.component.ts","../../../projects/ui-common/toggle-edit/toggle-edit-actions-container/toggle-edit-actions-container.component.html","../../../projects/ui-common/toggle-edit/toggle-edit.component.ts","../../../projects/ui-common/toggle-edit/toggle-edit.component.html","../../../projects/ui-common/toggle-edit/toggle-edit.module.ts","../../../projects/ui-common/toggle-edit/theseam-ui-common-toggle-edit.ts"],"sourcesContent":["import { Directive, inject, TemplateRef } from '@angular/core'\n\n@Directive({\n selector: '[seamToggleEditDisplayTpl]',\n exportAs: 'seamToggleEditDisplayTpl',\n})\nexport class ToggleEditDisplayTplDirective {\n public readonly template = inject(TemplateRef<any>)\n}\n","import { DOCUMENT } from '@angular/common'\nimport { inject, Injectable } from '@angular/core'\n\nimport { TheSeamCanToggleEdit } from './models'\n\n@Injectable({ providedIn: 'root' })\nexport class TheSeamToggleEditKeyboardListenerService {\n private readonly _document: Document = inject(DOCUMENT)\n\n private _elements: TheSeamCanToggleEdit[] = []\n\n private _isListening = false\n\n public add(element: TheSeamCanToggleEdit): void {\n this._elements.push(element)\n this._startListening()\n }\n\n public remove(element: TheSeamCanToggleEdit): void {\n this._elements = this._elements.filter((v) => v !== element)\n if (this._elements.length === 0) {\n this._stopListening()\n }\n }\n\n public isListening(): boolean {\n return this._isListening\n }\n\n private _startListening(): void {\n if (this.isListening()) {\n return\n }\n\n this._document.body.addEventListener('keydown', this._keydownListener, true)\n\n this._isListening = true\n }\n\n private _stopListening(): void {\n if (!this.isListening()) {\n return\n }\n\n this._document.body.removeEventListener(\n 'keydown',\n this._keydownListener,\n true,\n )\n\n this._isListening = false\n }\n\n private _keydownListener = (event: KeyboardEvent): boolean | void => {\n for (const element of this._elements) {\n if (element.isEditing()) {\n element.keydownEvent(event)\n }\n }\n }\n}\n","import { Component } from '@angular/core'\n\n@Component({\n selector: 'seam-toggle-edit-actions-container',\n templateUrl: './toggle-edit-actions-container.component.html',\n styleUrls: ['./toggle-edit-actions-container.component.scss'],\n})\nexport class TheSeamToggleEditActionsContainerComponent {}\n","<ng-content></ng-content>\n","import { A11yModule, FocusMonitor } from '@angular/cdk/a11y'\nimport { BooleanInput, coerceBooleanProperty } from '@angular/cdk/coercion'\nimport { ENTER, ESCAPE } from '@angular/cdk/keycodes'\nimport {\n ConnectionPositionPair,\n Overlay,\n OverlayRef,\n PositionStrategy,\n} from '@angular/cdk/overlay'\nimport { PortalModule, TemplatePortal } from '@angular/cdk/portal'\nimport {\n AfterViewInit,\n Component,\n ContentChild,\n DoCheck,\n ElementRef,\n EventEmitter,\n HostBinding,\n inject,\n Input,\n NgZone,\n OnDestroy,\n OnInit,\n Output,\n Renderer2,\n TemplateRef,\n ViewChild,\n ViewContainerRef,\n} from '@angular/core'\nimport {\n AbstractControl,\n ControlContainer,\n FormControl,\n FormGroup,\n} from '@angular/forms'\nimport { NgIf, NgTemplateOutlet } from '@angular/common'\n\nimport { faCheck, faPen, faTimes } from '@fortawesome/free-solid-svg-icons'\nimport { FontAwesomeModule } from '@fortawesome/angular-fontawesome'\nimport { InputBoolean } from '@theseam/ui-common/core'\nimport { TheSeamFormFieldComponent } from '@theseam/ui-common/form-field'\nimport { TheSeamLoadingComponent } from '@theseam/ui-common/loading'\n\nimport { TheSeamCanToggleEdit } from './models/can-toggle-edit'\nimport { TheSeamToggleEditRef } from './models/toggle-edit-ref'\nimport { ToggleEditDisplayTplDirective } from './toggle-edit-display-tpl.directive'\nimport { TheSeamToggleEditKeyboardListenerService } from './toggle-edit-keyboard-listener.service'\nimport { TheSeamToggleEditActionsContainerComponent } from './toggle-edit-actions-container/toggle-edit-actions-container.component'\n\n@Component({\n selector: 'seam-toggle-edit',\n templateUrl: './toggle-edit.component.html',\n styleUrls: ['./toggle-edit.component.scss'],\n imports: [\n NgIf,\n NgTemplateOutlet,\n PortalModule,\n A11yModule,\n FontAwesomeModule,\n TheSeamLoadingComponent,\n TheSeamToggleEditActionsContainerComponent,\n ],\n})\nexport class TheSeamToggleEditComponent\n implements\n OnInit,\n OnDestroy,\n AfterViewInit,\n DoCheck,\n TheSeamCanToggleEdit,\n TheSeamToggleEditRef\n{\n static ngAcceptInputType_cancelOnBlur: BooleanInput\n static ngAcceptInputType_waitOnSubmit: BooleanInput\n\n private readonly _elementRef = inject(\n ElementRef<HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement>,\n )\n private readonly _controlContainer = inject(ControlContainer, {\n optional: true,\n self: true,\n })\n private readonly _formFieldComponent = inject(TheSeamFormFieldComponent, {\n optional: true,\n host: true,\n })\n private readonly _kbListener = inject(\n TheSeamToggleEditKeyboardListenerService,\n )\n private readonly _focusMonitor = inject(FocusMonitor)\n private readonly _ngZone = inject(NgZone)\n private readonly _renderer = inject(Renderer2)\n private readonly _viewContainerRef = inject(ViewContainerRef)\n private readonly _overlay = inject(Overlay)\n\n readonly faPen = faPen\n readonly faTimes = faTimes\n readonly faCheck = faCheck\n\n private _previousDisabled = false\n\n /** Use `hasFocus()` to check for focus. This is only for monitoring focus lost. */\n private _focused = false\n private _focusObserver?: MutationObserver\n private _actionsFocused = false\n private _submitting = false\n\n /**\n * Input value before editing.\n *\n * If the edit change is canceled the input value will be reset back to this\n * value.\n */\n private _beforeEditValue = null\n\n @HostBinding('class.toggle-edit-active') get _toggleEditActiveClass() {\n return this.editing\n }\n\n @Input() @InputBoolean() cancelOnBlur = true\n @Input() @InputBoolean() waitOnSubmit = false\n\n @Input() placeholder = ''\n\n @Input()\n get editing(): boolean {\n return this._editing\n }\n set editing(value: boolean) {\n if (this.disabled && value) {\n return\n }\n\n if (!this._editing) {\n this.updateBeforeEditValue()\n }\n this._editing = coerceBooleanProperty(value)\n this.editingChange.emit(value)\n }\n private _editing = false\n\n @Output() readonly changeAccepted = new EventEmitter<TheSeamToggleEditRef>()\n @Output() readonly changeDeclined = new EventEmitter<TheSeamToggleEditRef>()\n @Output() readonly editingChange = new EventEmitter<boolean>()\n\n @ViewChild('templatePortalContent', { static: true })\n templatePortalContent?: TemplateRef<any>\n public templatePortal?: TemplatePortal<any>\n\n public modalRef?: OverlayRef\n\n @ContentChild(ToggleEditDisplayTplDirective, { static: true })\n displayTpl?: ToggleEditDisplayTplDirective\n\n constructor() {\n this._ngZone.runOutsideAngular(() => {\n this._focusObserver = new MutationObserver(() => {\n this._ngZone.run(() => {\n if (this.hasFocus()) {\n if (this.disabled) {\n return\n }\n this._onFocus()\n } else {\n this._onBlur()\n }\n })\n })\n })\n }\n\n ngOnInit() {\n this._initMonitors()\n if (this._formFieldComponent) {\n // TODO: Consider making this smarter, such as avoiding overwritting when input set.\n this._formFieldComponent.numPaddingErrors = 0\n }\n }\n\n ngOnDestroy() {\n this._destroyMonitors()\n }\n\n ngAfterViewInit() {\n if (this._formFieldComponent && this._formFieldComponent.contentInput) {\n this._formFieldComponent.contentInput.stateChanges.subscribe((_) => {\n this._checkDisabledChange()\n })\n }\n setTimeout(() => {\n if (this.templatePortalContent) {\n this.templatePortal = new TemplatePortal(\n this.templatePortalContent,\n this._viewContainerRef,\n )\n }\n })\n this._checkDisabledChange()\n }\n\n ngDoCheck() {\n this._checkDisabledChange()\n }\n\n private _initMonitors() {\n this._kbListener.add(this)\n\n this._focusMonitor.monitor(this._elementRef.nativeElement, true)\n this._focusObserver?.observe(this._elementRef.nativeElement, {\n attributes: true,\n attributeFilter: ['class'],\n childList: false,\n characterData: false,\n })\n }\n\n private _destroyMonitors() {\n this._kbListener.remove(this)\n\n this._focusObserver?.disconnect()\n this._focused = false\n this._focusMonitor.stopMonitoring(this._elementRef.nativeElement)\n this._renderer.removeAttribute(this._elementRef.nativeElement, 'tabindex')\n }\n\n // Make this disabled checking implementation better. It gets called to much\n // trying to be accurate.\n private _checkDisabledChange() {\n // const isDisabled = this.disabled\n // if (isDisabled !== this._previousDisabled) {\n // }\n }\n\n public get disabled() {\n const control = this.getControl()\n if (control) {\n return control.disabled\n }\n return false\n }\n\n public canSubmit(): boolean {\n const control = this.getControl()\n if (control) {\n return control.valid\n }\n return true\n }\n\n public isSubmitting(): boolean {\n return this._submitting\n }\n\n public submitComplete(error?: any): void {\n const control = this.getControl()\n if (control) {\n control.enable()\n }\n this._submitting = false\n\n if (!error) {\n this.stopEditing()\n }\n }\n\n public updateBeforeEditValue(): void {\n const control = this.getControl()\n if (control) {\n this._beforeEditValue = control.value\n }\n }\n\n public getValue(): string | null {\n const control = this.getControl()\n if (control) {\n return control.value\n }\n\n return null\n }\n\n public resetValue(): void {\n const control = this.getControl()\n if (control) {\n // Reset without emitting then update which will emit, because reset will\n // emit changes before setting pristine\n control.reset(this._beforeEditValue, { emitEvent: false })\n control.updateValueAndValidity()\n }\n }\n\n public isFormGroup(): boolean {\n return !!this._controlContainer\n }\n\n public getFormGroup(): FormGroup | null {\n if (!this.isFormGroup()) {\n return null\n }\n if (!this._controlContainer?.control) {\n return null\n }\n return this._controlContainer.control as FormGroup\n }\n\n public isInFormField(): boolean {\n return !!this._formFieldComponent\n }\n\n public getFormControl(): FormControl | null {\n if (!this.isInFormField()) {\n return null\n }\n if (!this._formFieldComponent?.contentInput) {\n return null\n }\n return this._formFieldComponent.contentInput.ngControl\n .control as FormControl\n }\n\n public hasControl(): boolean {\n return !!this.getControl()\n }\n\n public getControl(): AbstractControl | null {\n if (this.isFormGroup()) {\n return this.getFormGroup()\n } else if (this.isInFormField()) {\n return this.getFormControl()\n }\n return null\n }\n\n public submitEdit(): void {\n if (!this.canSubmit()) {\n return\n }\n\n if (this.waitOnSubmit) {\n const control = this.getControl()\n if (control) {\n control.disable()\n }\n this._submitting = true\n }\n\n this.stopEditing()\n\n this.changeAccepted.emit(this as TheSeamToggleEditRef)\n }\n\n public cancelEdit(): void {\n // Reset without emitting then update which will emit, because reset will\n // emit changes before setting pristine\n this.resetValue()\n this.stopEditing()\n\n this.changeDeclined.emit(this as TheSeamToggleEditRef)\n }\n\n private _onFocus(): void {\n // Return if already focused\n if (this._focused) {\n return\n }\n\n this._focused = true\n this._actionsFocused = false\n }\n\n private _onBlur(): void {\n // Return if focus hasn't been detected\n if (!this._focused) {\n return\n }\n\n if (this.editing && this.cancelOnBlur) {\n setTimeout(() => {\n if (!this._actionsFocused) {\n this.cancelEdit()\n }\n })\n }\n\n this._focused = false\n }\n\n public hasFocus(): boolean {\n return this._elementRef.nativeElement.classList.contains('cdk-focused')\n }\n\n public focusContent(): void {\n // Set the tab index to `-1` to allow the root element of the component to\n // receive `focus` event from javascript, but not get focused by keyboard\n // navigation. This is for the focus monitor. If a button is clicked the\n // focus monitor emits a blur before the focus of the input. This will avoid\n // the blur by letting the component itself receive focus events.\n this._renderer.setAttribute(\n this._elementRef.nativeElement,\n 'tabindex',\n '-1',\n )\n this._elementRef.nativeElement.focus()\n }\n\n public toggleEditing(isEditing?: boolean): void {\n if (this.editing === isEditing) {\n return\n }\n const _editing = isEditing === undefined ? !this.editing : !!isEditing\n if (_editing) {\n this.startEditing()\n } else {\n this.stopEditing()\n }\n }\n\n public isEditing(): boolean {\n return this.editing\n }\n\n public startEditing(): void {\n if (this.disabled) {\n return\n }\n if (this.isEditing()) {\n return\n }\n\n this.updateBeforeEditValue()\n\n this.focusContent()\n\n this.editing = true\n\n this.modalRef = this._overlay.create({\n hasBackdrop: false,\n positionStrategy: this.getOverlayPosition(this._elementRef.nativeElement),\n })\n\n this.modalRef.attach(this.templatePortal)\n }\n\n public stopEditing(): void {\n if (!this.isEditing()) {\n return\n }\n\n if (this.isSubmitting()) {\n return\n }\n\n if (this.modalRef?.hasAttached()) {\n this.modalRef.detach()\n }\n\n // NOTE: This is a hack to avoid a focus lost issue introduced by a focus\n // acuired issue's hack.\n this._elementRef.nativeElement.focus()\n this._elementRef.nativeElement.blur()\n this._focusMonitor.stopMonitoring(this._elementRef.nativeElement)\n this._renderer.removeAttribute(this._elementRef.nativeElement, 'tabindex')\n this._focusMonitor.monitor(this._elementRef.nativeElement, true)\n\n this.editing = false\n }\n\n public keydownEvent(event: KeyboardEvent): void {\n switch (event.keyCode) {\n case ESCAPE: {\n this.cancelEdit()\n break\n }\n case ENTER: {\n this.submitEdit()\n break\n }\n }\n }\n\n private getOverlayPosition(origin: HTMLElement): PositionStrategy {\n const positionStrategy = this._overlay\n .position()\n .flexibleConnectedTo(origin)\n .withPositions(this.getPositions())\n .withFlexibleDimensions(false)\n .withPush(false)\n\n return positionStrategy\n }\n\n private getPositions(): ConnectionPositionPair[] {\n return [\n {\n originX: 'end',\n originY: 'top',\n overlayX: 'start',\n overlayY: 'top',\n },\n {\n originX: 'end',\n originY: 'bottom',\n overlayX: 'end',\n overlayY: 'top',\n },\n {\n originX: 'end',\n originY: 'top',\n overlayX: 'end',\n overlayY: 'bottom',\n },\n ]\n }\n\n public resized(): void {\n if (this.modalRef && this.modalRef.hasAttached()) {\n this.modalRef.updatePosition()\n }\n }\n\n public actionsFocusChange(event: any): void {\n this._actionsFocused = !!event\n }\n}\n","<div\n class=\"toggle-edit-not-editing rounded\"\n [class.w-100]=\"editing\"\n [class.toggle-edit-editing]=\"editing\"\n [class.is-disabled]=\"disabled\"\n (seamElemResized)=\"resized()\"\n>\n <div class=\"toggle-edit-content-container\">\n <div class=\"toggle-edit-content\" (click)=\"toggleEditing(true)\">\n <ng-container *ngIf=\"editing; else notEditingTpl\">\n <ng-content></ng-content>\n </ng-container>\n <ng-template #notEditingTpl>\n <ng-container *ngIf=\"displayTpl; else noDisplayTpl\">\n <ng-template\n [ngTemplateOutlet]=\"displayTpl.template\"\n [ngTemplateOutletContext]=\"{ $implicit: getValue() || placeholder }\"\n ></ng-template>\n </ng-container>\n <ng-template #noDisplayTpl>\n <div class=\"pl-1 pr-1\">\n {{ getValue() || placeholder }}\n </div>\n </ng-template>\n </ng-template>\n </div>\n <div>\n <ng-template\n *ngIf=\"!editing\"\n [cdkPortalOutlet]=\"templatePortal\"\n ></ng-template>\n <ng-template #templatePortalContent>\n <seam-toggle-edit-actions-container\n [class.bg-light]=\"editing\"\n tabindex=\"-1\"\n cdkMonitorSubtreeFocus\n (cdkFocusChange)=\"actionsFocusChange($event)\"\n >\n <button\n *ngIf=\"!editing\"\n type=\"button\"\n class=\"toggle-edit-edit-btn btn text-secondary bg-transparent p-1 border-0\"\n (click)=\"toggleEditing(true)\"\n >\n <fa-icon [icon]=\"faPen\"></fa-icon>\n </button>\n <button\n *ngIf=\"editing\"\n type=\"button\"\n [disabled]=\"!canSubmit()\"\n class=\"toggle-edit-submit-btn btn text-secondary bg-transparent p-1 border-0\"\n (click)=\"submitEdit()\"\n >\n <fa-icon [icon]=\"faCheck\"></fa-icon>\n </button>\n <button\n *ngIf=\"editing\"\n type=\"button\"\n class=\"toggle-edit-cancel-btn btn text-secondary bg-transparent p-1 border-0\"\n (click)=\"cancelEdit()\"\n >\n <fa-icon [icon]=\"faTimes\"></fa-icon>\n </button>\n </seam-toggle-edit-actions-container>\n </ng-template>\n </div>\n </div>\n</div>\n\n<seam-loading *ngIf=\"isSubmitting()\"></seam-loading>\n","import { NgModule } from '@angular/core'\n\nimport { ToggleEditDisplayTplDirective } from './toggle-edit-display-tpl.directive'\nimport { TheSeamToggleEditComponent } from './toggle-edit.component'\n\n@NgModule({\n imports: [ToggleEditDisplayTplDirective, TheSeamToggleEditComponent],\n exports: [ToggleEditDisplayTplDirective, TheSeamToggleEditComponent],\n})\nexport class TheSeamToggleEditModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;MAMa,6BAA6B,CAAA;AACxB,IAAA,QAAQ,GAAG,MAAM,EAAC,WAAgB,EAAC;uGADxC,6BAA6B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAA7B,6BAA6B,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,4BAAA,EAAA,QAAA,EAAA,CAAA,0BAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAA7B,6BAA6B,EAAA,UAAA,EAAA,CAAA;kBAJzC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,4BAA4B;AACtC,oBAAA,QAAQ,EAAE,0BAA0B;AACrC,iBAAA;;;MCCY,wCAAwC,CAAA;AAClC,IAAA,SAAS,GAAa,MAAM,CAAC,QAAQ,CAAC;IAE/C,SAAS,GAA2B,EAAE;IAEtC,YAAY,GAAG,KAAK;AAErB,IAAA,GAAG,CAAC,OAA6B,EAAA;AACtC,QAAA,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC;QAC5B,IAAI,CAAC,eAAe,EAAE;IACxB;AAEO,IAAA,MAAM,CAAC,OAA6B,EAAA;AACzC,QAAA,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,OAAO,CAAC;QAC5D,IAAI,IAAI,CAAC,SAAS,CAAC,MAAM,KAAK,CAAC,EAAE;YAC/B,IAAI,CAAC,cAAc,EAAE;QACvB;IACF;IAEO,WAAW,GAAA;Q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,EAAE,CAAC,6BAA6B,EAAE,0BAA0B,CAAC;AACpE,oBAAA,OAAO,EAAE,CAAC,6BAA6B,EAAE,0BAA0B,CAAC;AACrE,iBAAA;;;ACRD;;AAEG;;;;"}
@@ -10,7 +10,9 @@ import { InputBoolean } from '@theseam/ui-common/core';
10
10
  class ToggleGroupOptionDirective {
11
11
  _cdr = inject(ChangeDetectorRef);
12
12
  seamToggleGroupOption;
13
- get selected() { return this._selected; }
13
+ get selected() {
14
+ return this._selected;
15
+ }
14
16
  set selected(value) {
15
17
  if (!this._canUnselect && !value) {
16
18
  return;
@@ -29,10 +31,10 @@ class ToggleGroupOptionDirective {
29
31
  get value() {
30
32
  return this.seamToggleGroupOption;
31
33
  }
32
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: ToggleGroupOptionDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
33
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.1", type: ToggleGroupOptionDirective, isStandalone: true, selector: "[seamToggleGroupOption]", inputs: { seamToggleGroupOption: "seamToggleGroupOption", selected: "selected" }, outputs: { selectionChange: "selectionChange" }, host: { properties: { "class.lib-toggle-group-option-selected": "this._checkioSelectedClass" } }, exportAs: ["seamToggleGroupOption"], ngImport: i0 });
34
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: ToggleGroupOptionDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
35
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.6", type: ToggleGroupOptionDirective, isStandalone: true, selector: "[seamToggleGroupOption]", inputs: { seamToggleGroupOption: "seamToggleGroupOption", selected: "selected" }, outputs: { selectionChange: "selectionChange" }, host: { properties: { "class.lib-toggle-group-option-selected": "this._checkioSelectedClass" } }, exportAs: ["seamToggleGroupOption"], ngImport: i0 });
34
36
  }
35
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: ToggleGroupOptionDirective, decorators: [{
37
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: ToggleGroupOptionDirective, decorators: [{
36
38
  type: Directive,
37
39
  args: [{
38
40
  selector: '[seamToggleGroupOption]',
@@ -79,13 +81,14 @@ class ToggleGroupDirective {
79
81
  setTimeout(() => {
80
82
  this._updateDirectiveStates();
81
83
  if (this.optionDirectives) {
82
- this.options = this.optionDirectives.changes.pipe(startWith(this.optionDirectives), map(v => v.toArray()), takeUntil(this._ngUnsubscribe));
83
- this.options.pipe(switchMap(opts => {
84
+ this.options = this.optionDirectives.changes.pipe(startWith(this.optionDirectives), map((v) => v.toArray()), takeUntil(this._ngUnsubscribe));
85
+ this.options
86
+ .pipe(switchMap((opts) => {
84
87
  const _tmp = of(undefined);
85
88
  if (opts) {
86
89
  const _v = [];
87
90
  for (const opt of opts) {
88
- _v.push(opt.selectionChange.pipe(filter(v => opt.selected !== this.isSelected(opt.value)), tap(v => {
91
+ _v.push(opt.selectionChange.pipe(filter((v) => opt.selected !== this.isSelected(opt.value)), tap((v) => {
89
92
  if (this.isSelected(opt.value)) {
90
93
  this.unselectValue(opt.value);
91
94
  }
@@ -97,9 +100,14 @@ class ToggleGroupDirective {
97
100
  return combineLatest(_v);
98
101
  }
99
102
  return _tmp;
100
- }), takeUntil(this._ngUnsubscribe)).subscribe();
103
+ }), takeUntil(this._ngUnsubscribe))
104
+ .subscribe();
101
105
  }
102
- this.change.pipe(switchMap(_ => from(this.optionDirectives?.toArray() || []).pipe(tap(opt => { this._updateDirectiveState(opt); }))), takeUntil(this._ngUnsubscribe)).subscribe();
106
+ this.change
107
+ .pipe(switchMap((_) => from(this.optionDirectives?.toArray() || []).pipe(tap((opt) => {
108
+ this._updateDirectiveState(opt);
109
+ }))), takeUntil(this._ngUnsubscribe))
110
+ .subscribe();
103
111
  });
104
112
  this.optionDirectives?.changes.subscribe(() => this._updateDirectiveStates());
105
113
  }
@@ -112,7 +120,7 @@ class ToggleGroupDirective {
112
120
  ? coerceArray(value)
113
121
  : value
114
122
  : value;
115
- this.val = (this.multiple) ? [...(_value || [])] : _value || '';
123
+ this.val = this.multiple ? [...(_value || [])] : _value || '';
116
124
  this.change.emit(this.val);
117
125
  if (this.onChange) {
118
126
  this.onChange(_value);
@@ -135,7 +143,7 @@ class ToggleGroupDirective {
135
143
  }
136
144
  isSelected(value) {
137
145
  if (this.multiple) {
138
- const idx = (this.value || []).findIndex(v => v === value);
146
+ const idx = (this.value || []).findIndex((v) => v === value);
139
147
  return idx !== -1;
140
148
  }
141
149
  else {
@@ -148,7 +156,7 @@ class ToggleGroupDirective {
148
156
  }
149
157
  unselectValue(value) {
150
158
  if (this.multiple) {
151
- this.value = (this.value || []).filter(v => v !== value);
159
+ this.value = (this.value || []).filter((v) => v !== value);
152
160
  }
153
161
  else {
154
162
  this.value = undefined;
@@ -167,8 +175,7 @@ class ToggleGroupDirective {
167
175
  if (!this.optionDirectives || this.optionDirectives.length < 1) {
168
176
  return null;
169
177
  }
170
- return this.optionDirectives.toArray()
171
- .find(opt => opt.value === value);
178
+ return this.optionDirectives.toArray().find((opt) => opt.value === value);
172
179
  }
173
180
  _updateDirectiveStates() {
174
181
  if (this.optionDirectives) {
@@ -205,8 +212,8 @@ class ToggleGroupDirective {
205
212
  }
206
213
  }
207
214
  }
208
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: ToggleGroupDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
209
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.1", type: ToggleGroupDirective, isStandalone: true, selector: "[seamToggleGroup]", inputs: { val: ["value", "val"], disabled: "disabled", multiple: "multiple", selectionToggleable: "selectionToggleable" }, outputs: { change: "change" }, providers: [TOGGLE_GROUP_VALUE_ACCESSOR], queries: [{ propertyName: "optionDirectives", predicate: ToggleGroupOptionDirective }], exportAs: ["seamToggleGroup"], ngImport: i0 });
215
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: ToggleGroupDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
216
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.6", type: ToggleGroupDirective, isStandalone: true, selector: "[seamToggleGroup]", inputs: { val: ["value", "val"], disabled: "disabled", multiple: "multiple", selectionToggleable: "selectionToggleable" }, outputs: { change: "change" }, providers: [TOGGLE_GROUP_VALUE_ACCESSOR], queries: [{ propertyName: "optionDirectives", predicate: ToggleGroupOptionDirective }], exportAs: ["seamToggleGroup"], ngImport: i0 });
210
217
  }
211
218
  __decorate([
212
219
  InputBoolean()
@@ -217,7 +224,7 @@ __decorate([
217
224
  __decorate([
218
225
  InputBoolean()
219
226
  ], ToggleGroupDirective.prototype, "selectionToggleable", void 0);
220
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: ToggleGroupDirective, decorators: [{
227
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: ToggleGroupDirective, decorators: [{
221
228
  type: Directive,
222
229
  args: [{
223
230
  selector: '[seamToggleGroup]',
@@ -241,23 +248,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
241
248
  }] } });
242
249
 
243
250
  class TheSeamToggleGroupModule {
244
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: TheSeamToggleGroupModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
245
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.1", ngImport: i0, type: TheSeamToggleGroupModule, imports: [ToggleGroupDirective,
246
- ToggleGroupOptionDirective], exports: [ToggleGroupDirective,
247
- ToggleGroupOptionDirective] });
248
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: TheSeamToggleGroupModule });
251
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: TheSeamToggleGroupModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
252
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.6", ngImport: i0, type: TheSeamToggleGroupModule, imports: [ToggleGroupDirective, ToggleGroupOptionDirective], exports: [ToggleGroupDirective, ToggleGroupOptionDirective] });
253
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: TheSeamToggleGroupModule });
249
254
  }
250
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: TheSeamToggleGroupModule, decorators: [{
255
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: TheSeamToggleGroupModule, decorators: [{
251
256
  type: NgModule,
252
257
  args: [{
253
- imports: [
254
- ToggleGroupDirective,
255
- ToggleGroupOptionDirective
256
- ],
257
- exports: [
258
- ToggleGroupDirective,
259
- ToggleGroupOptionDirective
260
- ]
258
+ imports: [ToggleGroupDirective, ToggleGroupOptionDirective],
259
+ exports: [ToggleGroupDirective, ToggleGroupOptionDirective],
261
260
  }]
262
261
  }] });
263
262