@theseam/ui-common 0.4.5 → 0.4.7

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.
@@ -1,26 +1,26 @@
1
1
  import { coerceBooleanProperty } from '@angular/cdk/coercion';
2
2
  import * as i0 from '@angular/core';
3
- import { InjectionToken, Directive, Optional, Inject, Input, Component, ChangeDetectionStrategy, NgModule, ViewEncapsulation, HostBinding, ContentChild, EventEmitter, Output, Injectable, isDevMode } from '@angular/core';
3
+ import { InjectionToken, Directive, Optional, Inject, Input, Injectable, Component, ChangeDetectionStrategy, NgModule, ViewEncapsulation, HostBinding, ContentChild, EventEmitter, Output, isDevMode } from '@angular/core';
4
4
  import { Subject, BehaviorSubject, of, tap as tap$1, takeUntil as takeUntil$1, throwError } from 'rxjs';
5
5
  import { auditTime, takeUntil, take, switchMap, filter, map, tap } from 'rxjs/operators';
6
6
  import { getClosestWidgetCdkDrag, hasProperty } from '@theseam/ui-common/utils';
7
7
  import * as i1 from '@angular/cdk/drag-drop';
8
8
  import { DragDropModule } from '@angular/cdk/drag-drop';
9
+ import * as i1$1 from '@theseam/ui-common/services';
9
10
  import * as i2 from '@angular/common';
10
11
  import { CommonModule } from '@angular/common';
11
12
  import * as i6 from '@theseam/ui-common/buttons';
12
13
  import { TheSeamButtonsModule } from '@theseam/ui-common/buttons';
13
14
  import { mixinTheme, mixinActive, mixinDisabled, InputBoolean, mixinTabIndex } from '@theseam/ui-common/core';
14
- import * as i1$1 from '@angular/cdk/a11y';
15
+ import * as i1$2 from '@angular/cdk/a11y';
15
16
  import * as i3 from '@theseam/ui-common/icon';
16
17
  import { TheSeamIconModule } from '@theseam/ui-common/icon';
17
18
  import { __decorate } from 'tslib';
18
- import * as i1$2 from '@theseam/ui-common/table';
19
+ import * as i1$3 from '@theseam/ui-common/table';
19
20
  import { TheSeamTableModule } from '@theseam/ui-common/table';
20
21
  import { TheSeamTableCellTypesModule } from '@theseam/ui-common/table-cell-types';
21
22
  import { trigger, transition, style, animate, state } from '@angular/animations';
22
23
  import { faCog, faAngleDown } from '@fortawesome/free-solid-svg-icons';
23
- import * as i1$3 from '@theseam/ui-common/services';
24
24
  import * as i3$1 from '@fortawesome/angular-fontawesome';
25
25
  import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';
26
26
  import * as i5 from '@theseam/ui-common/loading';
@@ -203,6 +203,86 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImpor
203
203
  }]
204
204
  }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });
205
205
 
206
+ const CURRENT_WIDGET_PREFERENCES_VERSION = 1;
207
+ const EMPTY_WIDGET_PREFERENCES = {
208
+ version: 1,
209
+ };
210
+
211
+ const THESEAM_WIDGET_PREFERENCES_ACCESSOR = new InjectionToken('TheSeamWidgetPreferencesAccessor');
212
+
213
+ // TODO: Rethink this. I originally implemented this to be shared widget's then
214
+ // changed it to be per widget, for the accessor injection.
215
+ // @Injectable({ providedIn: 'root' })
216
+ class WidgetPreferencesService {
217
+ constructor(_preferencesManager, _prefsAccessor) {
218
+ this._preferencesManager = _preferencesManager;
219
+ this._prefsAccessor = _prefsAccessor;
220
+ this._pendingPatches = {};
221
+ }
222
+ isPatchPending(preferenceKey) {
223
+ return this._pendingPatches[preferenceKey] && this._pendingPatches[preferenceKey].length > 0;
224
+ }
225
+ isPending(preferenceKey) {
226
+ return this._preferencesManager.isPending(preferenceKey);
227
+ }
228
+ isLoaded(preferenceKey) {
229
+ return this._preferencesManager.isLoaded(preferenceKey);
230
+ }
231
+ preferences(preferenceKey) {
232
+ if (!this._prefsAccessor) {
233
+ return of(JSON.parse(JSON.stringify(EMPTY_WIDGET_PREFERENCES)));
234
+ }
235
+ return this._preferencesManager.preferences(preferenceKey, this._prefsAccessor, EMPTY_WIDGET_PREFERENCES).pipe(map(prefs => {
236
+ if (this._isValidPreferences(prefs)) {
237
+ return prefs;
238
+ }
239
+ throw Error(`Preferences for key '${preferenceKey}' is not a valid widget preferences.`);
240
+ }));
241
+ }
242
+ refresh(preferenceKey) {
243
+ this._preferencesManager.refresh(preferenceKey);
244
+ }
245
+ patchPreferences(preferenceKey, preferences) {
246
+ if (!this._prefsAccessor) {
247
+ return;
248
+ }
249
+ if (!this._pendingPatches[preferenceKey]) {
250
+ this._pendingPatches[preferenceKey] = [];
251
+ }
252
+ if (this._pendingPatches[preferenceKey].length > 0) {
253
+ this._pendingPatches[preferenceKey].push(preferences);
254
+ return;
255
+ }
256
+ this._pendingPatches[preferenceKey].push(preferences);
257
+ this.preferences(preferenceKey).pipe(take(1), map(prefs => {
258
+ const pendingPatches = this._pendingPatches[preferenceKey];
259
+ this._pendingPatches[preferenceKey] = [];
260
+ const newPrefs = pendingPatches.reduce((acc, patch) => {
261
+ return Object.assign(Object.assign({}, acc), patch);
262
+ }, prefs); // Typescript isn't recognizing that 'version' is included in the initial value.
263
+ if (!this._isValidPreferences(newPrefs)) {
264
+ throw Error(`Attempted to patch preferences for key '${preferenceKey}' with invalid preferences.`);
265
+ }
266
+ this._preferencesManager.update(preferenceKey, newPrefs);
267
+ }), tap(() => this.refresh(preferenceKey))).subscribe();
268
+ }
269
+ _isValidPreferences(prefs) {
270
+ return prefs.version === CURRENT_WIDGET_PREFERENCES_VERSION;
271
+ }
272
+ }
273
+ WidgetPreferencesService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: WidgetPreferencesService, deps: [{ token: i1$1.TheSeamPreferencesManagerService }, { token: THESEAM_WIDGET_PREFERENCES_ACCESSOR, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
274
+ WidgetPreferencesService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: WidgetPreferencesService });
275
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: WidgetPreferencesService, decorators: [{
276
+ type: Injectable
277
+ }], ctorParameters: function () {
278
+ return [{ type: i1$1.TheSeamPreferencesManagerService }, { type: undefined, decorators: [{
279
+ type: Optional
280
+ }, {
281
+ type: Inject,
282
+ args: [THESEAM_WIDGET_PREFERENCES_ACCESSOR]
283
+ }] }];
284
+ } });
285
+
206
286
  class WidgetButtonGroupComponent {
207
287
  }
208
288
  WidgetButtonGroupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: WidgetButtonGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
@@ -499,11 +579,11 @@ class WidgetListGroupItemActionableBase extends WidgetListGroupItemBase {
499
579
  this._focusMonitor.stopMonitoring(this._elementRef);
500
580
  }
501
581
  }
502
- WidgetListGroupItemActionableBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: WidgetListGroupItemActionableBase, deps: [{ token: i0.ElementRef }, { token: i1$1.FocusMonitor }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
582
+ WidgetListGroupItemActionableBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: WidgetListGroupItemActionableBase, deps: [{ token: i0.ElementRef }, { token: i1$2.FocusMonitor }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
503
583
  WidgetListGroupItemActionableBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.7", type: WidgetListGroupItemActionableBase, usesInheritance: true, ngImport: i0 });
504
584
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: WidgetListGroupItemActionableBase, decorators: [{
505
585
  type: Directive
506
- }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1$1.FocusMonitor }, { type: i0.Renderer2 }]; } });
586
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1$2.FocusMonitor }, { type: i0.Renderer2 }]; } });
507
587
  const _WidgetListGroupItemBase = mixinActive(mixinTheme(mixinDisabled(WidgetListGroupItemBase), 'list-group-item'));
508
588
  const _WidgetListGroupItemActionableBase = mixinActive(mixinTheme(mixinDisabled(WidgetListGroupItemActionableBase), 'list-group-item'));
509
589
  class WidgetListGroupItemComponent extends _WidgetListGroupItemBase {
@@ -535,7 +615,7 @@ class WidgetListGroupItemButtonComponent extends _WidgetListGroupItemActionableB
535
615
  }
536
616
  ngOnDestroy() { super.ngOnDestroy(); }
537
617
  }
538
- WidgetListGroupItemButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: WidgetListGroupItemButtonComponent, deps: [{ token: i0.ElementRef }, { token: i1$1.FocusMonitor }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
618
+ WidgetListGroupItemButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: WidgetListGroupItemButtonComponent, deps: [{ token: i0.ElementRef }, { token: i1$2.FocusMonitor }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
539
619
  WidgetListGroupItemButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.7", type: WidgetListGroupItemButtonComponent, selector: "button[seam-widget-list-group-item],button[seamWidgetListGroupItem]", inputs: { disabled: "disabled", theme: "theme", active: "active", icon: "icon", iconClass: "iconClass", label: "label", secondaryIcon: "secondaryIcon", secondaryIconClass: "secondaryIconClass", secondaryIconTitle: "secondaryIconTitle", type: "type" }, host: { properties: { "attr.type": "type", "class.active": "active", "attr.aria-disabled": "disabled.toString()", "attr.disabled": "disabled || null" }, classAttribute: "list-group-item list-group-item-action" }, exportAs: ["seamWidgetListGroupItem"], usesInheritance: true, ngImport: i0, template: "<div class=\"d-flex flex-row\">\n <ng-container *ngIf=\"iconTpl; else noIconTpl\">\n <span class=\"pr-2\">\n <ng-container *ngTemplateOutlet=\"$any(iconTpl)\"></ng-container>\n </span>\n </ng-container>\n <ng-template #noIconTpl>\n <span class=\"pr-2\">\n <seam-icon *ngIf=\"icon\"\n [icon]=\"icon\"\n [iconClass]=\"iconClass\"\n iconType=\"borderless-styled-square\">\n </seam-icon>\n </span>\n </ng-template>\n\n <div class=\"d-flex flex-column justify-content-center flex-grow-1\">\n {{ label }}\n </div>\n\n <seam-icon *ngIf=\"secondaryIcon\"\n iconType=\"borderless-styled-square\"\n class=\"secondary-icon align-self-center ml-1\"\n [icon]=\"secondaryIcon\"\n [iconClass]=\"secondaryIconClass\"\n [title]=\"secondaryIconTitle\"\n size=\"lg\">\n </seam-icon>\n</div>\n", styles: [""], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i3.IconComponent, selector: "seam-icon", inputs: ["grayscaleOnDisable", "disabled", "iconClass", "icon", "size", "showDefaultOnError", "defaultIcon", "iconType"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
540
620
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: WidgetListGroupItemButtonComponent, decorators: [{
541
621
  type: Component,
@@ -546,7 +626,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImpor
546
626
  '[attr.aria-disabled]': 'disabled.toString()',
547
627
  '[attr.disabled]': 'disabled || null',
548
628
  }, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"d-flex flex-row\">\n <ng-container *ngIf=\"iconTpl; else noIconTpl\">\n <span class=\"pr-2\">\n <ng-container *ngTemplateOutlet=\"$any(iconTpl)\"></ng-container>\n </span>\n </ng-container>\n <ng-template #noIconTpl>\n <span class=\"pr-2\">\n <seam-icon *ngIf=\"icon\"\n [icon]=\"icon\"\n [iconClass]=\"iconClass\"\n iconType=\"borderless-styled-square\">\n </seam-icon>\n </span>\n </ng-template>\n\n <div class=\"d-flex flex-column justify-content-center flex-grow-1\">\n {{ label }}\n </div>\n\n <seam-icon *ngIf=\"secondaryIcon\"\n iconType=\"borderless-styled-square\"\n class=\"secondary-icon align-self-center ml-1\"\n [icon]=\"secondaryIcon\"\n [iconClass]=\"secondaryIconClass\"\n [title]=\"secondaryIconTitle\"\n size=\"lg\">\n </seam-icon>\n</div>\n" }]
549
- }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1$1.FocusMonitor }, { type: i0.Renderer2 }]; }, propDecorators: { type: [{
629
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1$2.FocusMonitor }, { type: i0.Renderer2 }]; }, propDecorators: { type: [{
550
630
  type: Input
551
631
  }] } });
552
632
  class WidgetListGroupItemAnchorComponent extends _WidgetListGroupItemActionableBase {
@@ -565,7 +645,7 @@ class WidgetListGroupItemAnchorComponent extends _WidgetListGroupItemActionableB
565
645
  }
566
646
  }
567
647
  }
568
- WidgetListGroupItemAnchorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: WidgetListGroupItemAnchorComponent, deps: [{ token: i0.ElementRef }, { token: i1$1.FocusMonitor }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
648
+ WidgetListGroupItemAnchorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: WidgetListGroupItemAnchorComponent, deps: [{ token: i0.ElementRef }, { token: i1$2.FocusMonitor }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
569
649
  WidgetListGroupItemAnchorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.7", type: WidgetListGroupItemAnchorComponent, selector: "a[seam-widget-list-group-item],a[seamWidgetListGroupItem]", inputs: { disabled: "disabled", theme: "theme", active: "active", icon: "icon", iconClass: "iconClass", label: "label", secondaryIcon: "secondaryIcon", secondaryIconClass: "secondaryIconClass", secondaryIconTitle: "secondaryIconTitle", tabIndex: "tabIndex" }, host: { listeners: { "click": "_haltDisabledEvents($event)" }, properties: { "class.active": "active", "attr.tabindex": "disabled ? -1 : (tabIndex || 0)", "attr.aria-disabled": "disabled.toString()", "attr.disabled": "disabled || null" }, classAttribute: "list-group-item list-group-item-action" }, exportAs: ["seamWidgetListGroupItem"], usesInheritance: true, ngImport: i0, template: "<div class=\"d-flex flex-row\">\n <ng-container *ngIf=\"iconTpl; else noIconTpl\">\n <span class=\"pr-2\">\n <ng-container *ngTemplateOutlet=\"$any(iconTpl)\"></ng-container>\n </span>\n </ng-container>\n <ng-template #noIconTpl>\n <span class=\"pr-2\">\n <seam-icon *ngIf=\"icon\"\n [icon]=\"icon\"\n [iconClass]=\"iconClass\"\n iconType=\"borderless-styled-square\">\n </seam-icon>\n </span>\n </ng-template>\n\n <div class=\"d-flex flex-column justify-content-center flex-grow-1\">\n {{ label }}\n </div>\n\n <seam-icon *ngIf=\"secondaryIcon\"\n iconType=\"borderless-styled-square\"\n class=\"secondary-icon align-self-center ml-1\"\n [icon]=\"secondaryIcon\"\n [iconClass]=\"secondaryIconClass\"\n [title]=\"secondaryIconTitle\"\n size=\"lg\">\n </seam-icon>\n</div>\n", styles: [""], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i3.IconComponent, selector: "seam-icon", inputs: ["grayscaleOnDisable", "disabled", "iconClass", "icon", "size", "showDefaultOnError", "defaultIcon", "iconType"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
570
650
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: WidgetListGroupItemAnchorComponent, decorators: [{
571
651
  type: Component,
@@ -577,7 +657,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImpor
577
657
  '[attr.disabled]': 'disabled || null',
578
658
  '(click)': '_haltDisabledEvents($event)',
579
659
  }, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"d-flex flex-row\">\n <ng-container *ngIf=\"iconTpl; else noIconTpl\">\n <span class=\"pr-2\">\n <ng-container *ngTemplateOutlet=\"$any(iconTpl)\"></ng-container>\n </span>\n </ng-container>\n <ng-template #noIconTpl>\n <span class=\"pr-2\">\n <seam-icon *ngIf=\"icon\"\n [icon]=\"icon\"\n [iconClass]=\"iconClass\"\n iconType=\"borderless-styled-square\">\n </seam-icon>\n </span>\n </ng-template>\n\n <div class=\"d-flex flex-column justify-content-center flex-grow-1\">\n {{ label }}\n </div>\n\n <seam-icon *ngIf=\"secondaryIcon\"\n iconType=\"borderless-styled-square\"\n class=\"secondary-icon align-self-center ml-1\"\n [icon]=\"secondaryIcon\"\n [iconClass]=\"secondaryIconClass\"\n [title]=\"secondaryIconTitle\"\n size=\"lg\">\n </seam-icon>\n</div>\n" }]
580
- }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1$1.FocusMonitor }, { type: i0.Renderer2 }]; }, propDecorators: { tabIndex: [{
660
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1$2.FocusMonitor }, { type: i0.Renderer2 }]; }, propDecorators: { tabIndex: [{
581
661
  type: Input
582
662
  }] } });
583
663
 
@@ -644,7 +724,7 @@ class WidgetTableComponent {
644
724
  }
645
725
  }
646
726
  WidgetTableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: WidgetTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
647
- WidgetTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.7", type: WidgetTableComponent, selector: "seam-widget-table", inputs: { columns: "columns", rows: "rows", trackBy: "trackBy", size: "size", hasHeader: "hasHeader" }, outputs: { actionRefreshRequest: "actionRefreshRequest" }, ngImport: i0, template: "<seam-table\n [columns]=\"columns\"\n [rows]=\"rows\"\n [trackBy]=\"trackBy\"\n [size]=\"size\"\n [hasHeader]=\"hasHeader\"\n (actionRefreshRequest)=\"_actionRefreshRequest()\">\n</seam-table>\n", styles: [""], dependencies: [{ kind: "component", type: i1$2.TableComponent, selector: "seam-table", inputs: ["columns", "rows", "trackBy", "size", "hasHeader"], outputs: ["actionRefreshRequest"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
727
+ WidgetTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.7", type: WidgetTableComponent, selector: "seam-widget-table", inputs: { columns: "columns", rows: "rows", trackBy: "trackBy", size: "size", hasHeader: "hasHeader" }, outputs: { actionRefreshRequest: "actionRefreshRequest" }, ngImport: i0, template: "<seam-table\n [columns]=\"columns\"\n [rows]=\"rows\"\n [trackBy]=\"trackBy\"\n [size]=\"size\"\n [hasHeader]=\"hasHeader\"\n (actionRefreshRequest)=\"_actionRefreshRequest()\">\n</seam-table>\n", styles: [""], dependencies: [{ kind: "component", type: i1$3.TableComponent, selector: "seam-table", inputs: ["columns", "rows", "trackBy", "size", "hasHeader"], outputs: ["actionRefreshRequest"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
648
728
  __decorate([
649
729
  InputBoolean()
650
730
  ], WidgetTableComponent.prototype, "hasHeader", void 0);
@@ -781,12 +861,12 @@ class TheSeamWidgetTileBase {
781
861
  return this._elementRef.nativeElement;
782
862
  }
783
863
  }
784
- TheSeamWidgetTileBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: TheSeamWidgetTileBase, deps: [{ token: i0.ElementRef }, { token: i1$1.FocusMonitor }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
864
+ TheSeamWidgetTileBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: TheSeamWidgetTileBase, deps: [{ token: i0.ElementRef }, { token: i1$2.FocusMonitor }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
785
865
  TheSeamWidgetTileBase.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.7", type: TheSeamWidgetTileBase, selector: "ng-component", ngImport: i0, template: '', isInline: true });
786
866
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: TheSeamWidgetTileBase, decorators: [{
787
867
  type: Component,
788
868
  args: [{ template: '' }]
789
- }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1$1.FocusMonitor }, { type: i0.Renderer2 }]; } });
869
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1$2.FocusMonitor }, { type: i0.Renderer2 }]; } });
790
870
  const _TheSeamWidgetTileMixinBase = mixinTabIndex(mixinDisabled(TheSeamWidgetTileBase));
791
871
  // TODO: Should this component be split into separate components for button and anchor.
792
872
  class WidgetTileComponent extends _TheSeamWidgetTileMixinBase {
@@ -832,7 +912,7 @@ class WidgetTileComponent extends _TheSeamWidgetTileMixinBase {
832
912
  return this._elementRef.nativeElement.nodeName.toLowerCase() === 'a';
833
913
  }
834
914
  }
835
- WidgetTileComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: WidgetTileComponent, deps: [{ token: i0.ElementRef }, { token: i1$1.FocusMonitor }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
915
+ WidgetTileComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: WidgetTileComponent, deps: [{ token: i0.ElementRef }, { token: i1$2.FocusMonitor }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
836
916
  WidgetTileComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.7", type: WidgetTileComponent, selector: "seam-widget-tile, a[seam-widget-tile], button[seam-widget-tile]", inputs: { disabled: "disabled", type: "type", icon: "icon", grayscaleOnDisable: "grayscaleOnDisable", iconClass: "iconClass", iconType: "iconType", notificationIcon: "notificationIcon", notificationIconClass: "notificationIconClass" }, host: { properties: { "attr.type": "this._attrType", "class.btn": "this._btnCss", "class.disabled": "this._disabledCss", "attr.aria-disabled": "this._ariaDisabled", "attr.disabled": "this._attrDisabled", "attr.tabindex": "this._attrTabIndex" } }, queries: [{ propertyName: "secondaryIcon", first: true, predicate: WidgetTileSecondaryIconDirective, descendants: true, static: true }], exportAs: ["seamWidgetTile"], usesInheritance: true, ngImport: i0, template: "<div class=\"d-flex flex-row\">\n <div style=\"position: relative\">\n <seam-icon\n [icon]=\"icon\"\n [iconType]=\"iconType\"\n [iconClass]=\"iconClass\"\n [disabled]=\"disabled\">\n </seam-icon>\n\n <seam-icon *ngIf=\"notificationIcon\"\n class=\"widget-tile--notification-icon\"\n [icon]=\"notificationIcon\"\n iconType=\"image-fill\"\n [iconClass]=\"notificationIconClass\"\n [disabled]=\"disabled\">\n </seam-icon>\n </div>\n <div class=\"flex-grow-1 text-left pl-2\" style=\"margin: auto 0;\">\n <ng-content></ng-content>\n </div>\n <div *ngIf=\"secondaryIcon\">\n <ng-template [ngTemplateOutlet]=\"secondaryIcon.template\"></ng-template>\n </div>\n</div>\n", styles: ["seam-widget-tile,a[seam-widget-tile],button[seam-widget-tile]{display:block;width:100%;padding:4px;text-decoration:none;color:#212529;font-size:14px;font-weight:400;line-height:18px;border:1px solid #dee2e6;border-radius:10px;margin-bottom:.5rem;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}seam-widget-tile:hover,a[seam-widget-tile]:hover,button[seam-widget-tile]:hover{color:#212529;background-color:#f4f4f4;text-decoration:none}seam-widget-tile:focus,seam-widget-tile.focus,a[seam-widget-tile]:focus,a[seam-widget-tile].focus,button[seam-widget-tile]:focus,button[seam-widget-tile].focus{box-shadow:0 0 0 .2rem #357ebd40;outline:0}seam-widget-tile.disabled,seam-widget-tile:disabled,a[seam-widget-tile].disabled,a[seam-widget-tile]:disabled,button[seam-widget-tile].disabled,button[seam-widget-tile]:disabled{opacity:.65;pointer-events:none;cursor:default;filter:grayscale(1)}seam-widget-tile:last-child,a[seam-widget-tile]:last-child,button[seam-widget-tile]:last-child{margin-bottom:0}seam-widget-tile .widget-tile--notification-icon,a[seam-widget-tile] .widget-tile--notification-icon,button[seam-widget-tile] .widget-tile--notification-icon{position:absolute;bottom:-3px;right:-3px;width:15px!important;height:15px!important}seam-widget-tile seam-icon img[src$=\".svg\"],a[seam-widget-tile] seam-icon img[src$=\".svg\"],button[seam-widget-tile] seam-icon img[src$=\".svg\"]{height:100%}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i3.IconComponent, selector: "seam-icon", inputs: ["grayscaleOnDisable", "disabled", "iconClass", "icon", "size", "showDefaultOnError", "defaultIcon", "iconType"] }], encapsulation: i0.ViewEncapsulation.None });
837
917
  __decorate([
838
918
  InputBoolean()
@@ -840,7 +920,7 @@ __decorate([
840
920
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: WidgetTileComponent, decorators: [{
841
921
  type: Component,
842
922
  args: [{ selector: 'seam-widget-tile, a[seam-widget-tile], button[seam-widget-tile]', inputs: ['disabled'], exportAs: 'seamWidgetTile', encapsulation: ViewEncapsulation.None, template: "<div class=\"d-flex flex-row\">\n <div style=\"position: relative\">\n <seam-icon\n [icon]=\"icon\"\n [iconType]=\"iconType\"\n [iconClass]=\"iconClass\"\n [disabled]=\"disabled\">\n </seam-icon>\n\n <seam-icon *ngIf=\"notificationIcon\"\n class=\"widget-tile--notification-icon\"\n [icon]=\"notificationIcon\"\n iconType=\"image-fill\"\n [iconClass]=\"notificationIconClass\"\n [disabled]=\"disabled\">\n </seam-icon>\n </div>\n <div class=\"flex-grow-1 text-left pl-2\" style=\"margin: auto 0;\">\n <ng-content></ng-content>\n </div>\n <div *ngIf=\"secondaryIcon\">\n <ng-template [ngTemplateOutlet]=\"secondaryIcon.template\"></ng-template>\n </div>\n</div>\n", styles: ["seam-widget-tile,a[seam-widget-tile],button[seam-widget-tile]{display:block;width:100%;padding:4px;text-decoration:none;color:#212529;font-size:14px;font-weight:400;line-height:18px;border:1px solid #dee2e6;border-radius:10px;margin-bottom:.5rem;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}seam-widget-tile:hover,a[seam-widget-tile]:hover,button[seam-widget-tile]:hover{color:#212529;background-color:#f4f4f4;text-decoration:none}seam-widget-tile:focus,seam-widget-tile.focus,a[seam-widget-tile]:focus,a[seam-widget-tile].focus,button[seam-widget-tile]:focus,button[seam-widget-tile].focus{box-shadow:0 0 0 .2rem #357ebd40;outline:0}seam-widget-tile.disabled,seam-widget-tile:disabled,a[seam-widget-tile].disabled,a[seam-widget-tile]:disabled,button[seam-widget-tile].disabled,button[seam-widget-tile]:disabled{opacity:.65;pointer-events:none;cursor:default;filter:grayscale(1)}seam-widget-tile:last-child,a[seam-widget-tile]:last-child,button[seam-widget-tile]:last-child{margin-bottom:0}seam-widget-tile .widget-tile--notification-icon,a[seam-widget-tile] .widget-tile--notification-icon,button[seam-widget-tile] .widget-tile--notification-icon{position:absolute;bottom:-3px;right:-3px;width:15px!important;height:15px!important}seam-widget-tile seam-icon img[src$=\".svg\"],a[seam-widget-tile] seam-icon img[src$=\".svg\"],button[seam-widget-tile] seam-icon img[src$=\".svg\"]{height:100%}\n"] }]
843
- }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1$1.FocusMonitor }, { type: i0.Renderer2 }]; }, propDecorators: { _attrType: [{
923
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1$2.FocusMonitor }, { type: i0.Renderer2 }]; }, propDecorators: { _attrType: [{
844
924
  type: HostBinding,
845
925
  args: ['attr.type']
846
926
  }], _btnCss: [{
@@ -947,88 +1027,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImpor
947
1027
  }]
948
1028
  }] });
949
1029
 
950
- const THESEAM_WIDGET_PREFERENCES_ACCESSOR = new InjectionToken('TheSeamWidgetPreferencesAccessor');
951
-
952
- const CURRENT_WIDGET_PREFERENCES_VERSION = 1;
953
- const EMPTY_WIDGET_PREFERENCES = {
954
- version: 1,
955
- };
956
-
957
- // TODO: Rethink this. I originally implemented this to be shared widget's then
958
- // changed it to be per widget, for the accessor injection.
959
- // @Injectable({ providedIn: 'root' })
960
- class WidgetPreferencesService {
961
- constructor(_preferencesManager, _prefsAccessor) {
962
- this._preferencesManager = _preferencesManager;
963
- this._prefsAccessor = _prefsAccessor;
964
- this._pendingPatches = {};
965
- }
966
- isPatchPending(preferenceKey) {
967
- return this._pendingPatches[preferenceKey] && this._pendingPatches[preferenceKey].length > 0;
968
- }
969
- isPending(preferenceKey) {
970
- return this._preferencesManager.isPending(preferenceKey);
971
- }
972
- isLoaded(preferenceKey) {
973
- return this._preferencesManager.isLoaded(preferenceKey);
974
- }
975
- preferences(preferenceKey) {
976
- if (!this._prefsAccessor) {
977
- return of(JSON.parse(JSON.stringify(EMPTY_WIDGET_PREFERENCES)));
978
- }
979
- return this._preferencesManager.preferences(preferenceKey, this._prefsAccessor, EMPTY_WIDGET_PREFERENCES).pipe(map(prefs => {
980
- if (this._isValidPreferences(prefs)) {
981
- return prefs;
982
- }
983
- throw Error(`Preferences for key '${preferenceKey}' is not a valid widget preferences.`);
984
- }));
985
- }
986
- refresh(preferenceKey) {
987
- this._preferencesManager.refresh(preferenceKey);
988
- }
989
- patchPreferences(preferenceKey, preferences) {
990
- if (!this._prefsAccessor) {
991
- return;
992
- }
993
- if (!this._pendingPatches[preferenceKey]) {
994
- this._pendingPatches[preferenceKey] = [];
995
- }
996
- if (this._pendingPatches[preferenceKey].length > 0) {
997
- this._pendingPatches[preferenceKey].push(preferences);
998
- return;
999
- }
1000
- this._pendingPatches[preferenceKey].push(preferences);
1001
- this.preferences(preferenceKey).pipe(take(1), map(prefs => {
1002
- const pendingPatches = this._pendingPatches[preferenceKey];
1003
- this._pendingPatches[preferenceKey] = [];
1004
- const newPrefs = pendingPatches.reduce((acc, patch) => {
1005
- return Object.assign(Object.assign({}, acc), patch);
1006
- }, prefs); // Typescript isn't recognizing that 'version' is included in the initial value.
1007
- if (!this._isValidPreferences(newPrefs)) {
1008
- throw Error(`Attempted to patch preferences for key '${preferenceKey}' with invalid preferences.`);
1009
- }
1010
- this._preferencesManager.update(preferenceKey, newPrefs);
1011
- }), tap(() => this.refresh(preferenceKey))).subscribe();
1012
- }
1013
- _isValidPreferences(prefs) {
1014
- return prefs.version === CURRENT_WIDGET_PREFERENCES_VERSION;
1015
- }
1016
- }
1017
- WidgetPreferencesService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: WidgetPreferencesService, deps: [{ token: i1$3.TheSeamPreferencesManagerService }, { token: THESEAM_WIDGET_PREFERENCES_ACCESSOR, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
1018
- WidgetPreferencesService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: WidgetPreferencesService });
1019
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: WidgetPreferencesService, decorators: [{
1020
- type: Injectable
1021
- }], ctorParameters: function () {
1022
- return [{ type: i1$3.TheSeamPreferencesManagerService }, { type: undefined, decorators: [{
1023
- type: Optional
1024
- }, {
1025
- type: Inject,
1026
- args: [THESEAM_WIDGET_PREFERENCES_ACCESSOR]
1027
- }] }];
1028
- } });
1029
-
1030
1030
  const THESEAM_WIDGETS = new InjectionToken('TheSeamWidgets');
1031
- const THESEAM_WIDGET_DATA = new InjectionToken('TheSeamWidgetData');
1031
+ const THESEAM_WIDGET_DATA = new InjectionToken('TheSeamWidgetData');
1032
+ const THESEAM_WIDGET_DEFAULTS = new InjectionToken('TheSeamWidgetDefaults');
1032
1033
 
1033
1034
  const EXPANDED_STATE = 'expanded';
1034
1035
  const COLLAPSED_STATE = 'collapsed';
@@ -1090,8 +1091,9 @@ class WidgetComponent {
1090
1091
  this._iconObj = value;
1091
1092
  }
1092
1093
  }
1093
- constructor(_widgetPreferences, _data) {
1094
+ constructor(_widgetPreferences, _defaults, _data) {
1094
1095
  this._widgetPreferences = _widgetPreferences;
1096
+ this._defaults = _defaults;
1095
1097
  this._data = _data;
1096
1098
  this.configIcon = faCog;
1097
1099
  this.collapseIcon = faAngleDown;
@@ -1115,6 +1117,14 @@ class WidgetComponent {
1115
1117
  * header to toggle the collapsed state.
1116
1118
  */
1117
1119
  this.canCollapse = false;
1120
+ if (this._defaults) {
1121
+ if (hasProperty(this._defaults, 'canCollapse')) {
1122
+ this.canCollapse = this._defaults.canCollapse;
1123
+ }
1124
+ if (hasProperty(this._defaults, 'collapsed')) {
1125
+ this.collapsed = this._defaults.collapsed;
1126
+ }
1127
+ }
1118
1128
  if (this._data && this._data.widgetId) {
1119
1129
  this._preferencesKey = `widget:${this._data.widgetId}`;
1120
1130
  this._widgetPreferences.preferences(this._preferencesKey).pipe(tap$1(prefs => {
@@ -1150,7 +1160,7 @@ class WidgetComponent {
1150
1160
  }
1151
1161
  get collapseState() { return this.collapsed ? COLLAPSED_STATE : EXPANDED_STATE; }
1152
1162
  }
1153
- WidgetComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: WidgetComponent, deps: [{ token: WidgetPreferencesService }, { token: THESEAM_WIDGET_DATA, optional: true }], target: i0.ɵɵFactoryTarget.Component });
1163
+ WidgetComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: WidgetComponent, deps: [{ token: WidgetPreferencesService }, { token: THESEAM_WIDGET_DEFAULTS, optional: true }, { token: THESEAM_WIDGET_DATA, optional: true }], target: i0.ɵɵFactoryTarget.Component });
1154
1164
  WidgetComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.7", type: WidgetComponent, selector: "seam-widget", inputs: { collapsed: "collapsed", hasHeader: "hasHeader", titleText: "titleText", icon: "icon", iconClass: "iconClass", loading: "loading", hasConfig: "hasConfig", canCollapse: "canCollapse" }, providers: [
1155
1165
  WidgetPreferencesService,
1156
1166
  ], queries: [{ propertyName: "iconTpl", first: true, predicate: WidgetIconTplDirective, descendants: true, static: true }, { propertyName: "titleTpl", first: true, predicate: WidgetTitleTplDirective, descendants: true, static: true }], ngImport: i0, template: "<div class=\"seam-widget border rounded overflow-hidden\">\n <div class=\"widget-header\" seamWidgetDragHandle *ngIf=\"hasHeader\">\n <div class=\"widget-header-content p-2 text-nowrap\">\n <span class=\"mr-1 widget-header-icon\">\n <ng-container *ngIf=\"iconTpl; else noIconTpl\">\n <ng-template\n [ngTemplateOutlet]=\"iconTpl.template\"\n [ngTemplateOutletContext]=\"{ $implicit: icon, icon: icon, title: titleText }\">\n </ng-template>\n </ng-container>\n <ng-template #noIconTpl>\n <fa-icon *ngIf=\"_iconObj\"\n class=\"widget-header-icon--fa {{ iconClass }}\"\n [icon]=\"_iconObj\"></fa-icon>\n <img *ngIf=\"_iconUrl\"\n class=\"widget-header-icon--img {{ iconClass }}\"\n [src]=\"_iconUrl\" [alt]=\"titleText\">\n </ng-template>\n </span>\n <span class=\"widget-header-title text-truncate\">\n <ng-container *ngIf=\"titleTpl; else noTitleTpl\">\n <ng-template\n [ngTemplateOutlet]=\"titleTpl.template\"\n [ngTemplateOutletContext]=\"{ $implicit: titleText, icon: icon, title: titleText }\">\n </ng-template>\n </ng-container>\n <ng-template #noTitleTpl>{{ titleText }}</ng-template>\n </span>\n </div>\n <div class=\"widget-header-btns-container\" *ngIf=\"hasConfig || canCollapse\">\n <!-- <div *ngIf=\"hasConfig\">\n <button seamIconBtn [icon]=\"configIcon\"\n class=\"widget-header-btn-config\"\n [iconType]=\"null\">\n <span class=\"sr-only\">Widget configuration menu</span>\n </button>\n <button seamButton class=\"widget-header-btn-config p-0\">\n <seam-icon class=\"d-block\" [icon]=\"configIcon\" iconClass=\"text-secondary\"></seam-icon>\n <span class=\"sr-only\">Widget configuration menu</span>\n </button>\n </div> -->\n\n <div *ngIf=\"canCollapse\" class=\"px-0\">\n\n <button seamButton class=\"widget-header-btn-collapse p-0 mr-1 h-100\" (click)=\"collapse()\" [class.widget-header-btn-collapse--active]=\"collapsed\">\n <seam-icon class=\"d-block\"\n [icon]=\"collapseIcon\"\n iconClass=\"text-secondary\">\n </seam-icon>\n <span class=\"sr-only\">Widget collapse</span>\n </button>\n <!-- iconType=\"borderless-styled-square\" -->\n <!-- style=\"margin-left: -10px; margin-right: -5px;\" -->\n\n <!-- <button seamIconBtn class=\"widget-header-btn-collapse\" (click)=\"collapse()\" [class.widget-header-btn-collapse--active]=\"collapsed\"\n btnTheme=\"secondary\"\n [icon]=\"collapseIcon\"\n iconType=\"borderless-styled-square\"\n size=\"xs\"\n btnSize=\"sm\"\n >\n <seam-icon class=\"d-block\"\n [icon]=\"collapseIcon\"\n iconClass=\"text-secondary\"\n style=\"margin-left: -10px; margin-right: -5px;\"\n iconType=\"borderless-styled-square\"></seam-icon>\n <span class=\"sr-only\">Widget collapse</span>\n </button> -->\n </div>\n </div>\n </div>\n <div class=\"position-relative overflow-hidden\" [style.height.px]=\"loading ? 150 : undefined\" [@collapseAnim]=\"collapseState\">\n <ng-container *ngIf=\"!collapsed\">\n <div class=\"p-2\" *ngIf=\"!loading else loadingTpl\" @keepContentAnim>\n <ng-content></ng-content>\n </div>\n <ng-content select=\"seam-widget-footer\"></ng-content>\n <ng-template #loadingTpl>\n <div class=\"position-absolute\" @loadingAnim style=\"top:0;right:0;bottom:0;left:0\">\n <seam-loading [theme]=\"'primary'\"></seam-loading>\n </div>\n </ng-template>\n </ng-container>\n </div>\n</div>\n", styles: ["seam-widget{display:block;font-size:15px}seam-widget .seam-widget{background:#FFFFFF;box-shadow:none}seam-widget .widget-header{display:flex;flex-direction:row;border-bottom:1px solid #dee2e6;background:#F4F4F4;font-size:17px}seam-widget .widget-header .widget-header-content{flex:1 1 100%}seam-widget .widget-header .widget-header-btns-container{display:flex;flex-direction:row}seam-widget .widget-header .widget-header-btns-container>div{display:flex;flex-direction:column;justify-content:center;padding:4px}seam-widget .widget-header .widget-header-btns-container .widget-header-btn-config .seam-icon--fa{display:flex;flex-direction:row;justify-content:center;text-align:center;height:25px;width:30px}seam-widget .widget-header .widget-header-btns-container .widget-header-btn-config .seam-icon--fa .svg-inline--fa{max-width:100%;height:100%;width:100%}seam-widget .widget-header .widget-header-btns-container .widget-header-btn-collapse .seam-icon--fa{display:flex;flex-direction:row;justify-content:center;text-align:center;height:25px;width:30px}seam-widget .widget-header .widget-header-btns-container .widget-header-btn-collapse .seam-icon--fa .svg-inline--fa{max-width:100%;height:100%;width:100%}seam-widget .widget-header .widget-header-btns-container .widget-header-btn-collapse .svg-inline--fa{transform:rotate(0);transition:.3s ease-in-out transform}seam-widget .widget-header .widget-header-btns-container .widget-header-btn-collapse.widget-header-btn-collapse--active .svg-inline--fa{transform:rotate(90deg)}seam-widget .widget-header .widget-header-title{font-size:17px}seam-widget .widget-header-icon{display:inline-block;vertical-align:top;max-height:20px;max-width:20px;height:20px;width:20px;color:currentColor}seam-widget .widget-header-icon .widget-header-icon--fa{display:flex;flex-direction:row;justify-content:center;text-align:center;max-height:20px;max-width:20px;height:20px;width:20px}seam-widget .widget-header-icon .widget-header-icon--fa .svg-inline--fa{max-width:100%;height:100%;width:100%}seam-widget .widget-header-icon .widget-header-icon--img{height:100%;max-height:20px;max-width:20px}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i3$1.FaIconComponent, selector: "fa-icon", inputs: ["classes", "icon", "title", "spin", "pulse", "mask", "styles", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "transform", "a11yRole"] }, { kind: "component", type: i3.IconComponent, selector: "seam-icon", inputs: ["grayscaleOnDisable", "disabled", "iconClass", "icon", "size", "showDefaultOnError", "defaultIcon", "iconType"] }, { kind: "component", type: i5.LoadingComponent, selector: "seam-loading", inputs: ["theme"] }, { kind: "component", type: i6.ButtonComponent, selector: "button[seamButton]", inputs: ["disabled", "theme", "size", "type"], exportAs: ["seamButton"] }, { kind: "directive", type: WidgetDragHandleDirective, selector: "[seamWidgetDragHandle]", inputs: ["cdkDragHandleDisabled"] }], animations: [
@@ -1185,6 +1195,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImpor
1185
1195
  }], ctorParameters: function () {
1186
1196
  return [{ type: WidgetPreferencesService }, { type: undefined, decorators: [{
1187
1197
  type: Optional
1198
+ }, {
1199
+ type: Inject,
1200
+ args: [THESEAM_WIDGET_DEFAULTS]
1201
+ }] }, { type: undefined, decorators: [{
1202
+ type: Optional
1188
1203
  }, {
1189
1204
  type: Inject,
1190
1205
  args: [THESEAM_WIDGET_DATA]
@@ -1376,5 +1391,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImpor
1376
1391
  * Generated bundle index. Do not edit.
1377
1392
  */
1378
1393
 
1379
- export { THESEAM_WIDGETS, THESEAM_WIDGET_ACCESSOR, THESEAM_WIDGET_DATA, TheSeamWidgetButtonGroupModule, TheSeamWidgetContentHeaderModule, TheSeamWidgetDescriptionModule, TheSeamWidgetEmptyLabelModule, TheSeamWidgetFooterLinkModule, TheSeamWidgetFooterTextModule, TheSeamWidgetHeaderBadgeModule, TheSeamWidgetListGroupModule, TheSeamWidgetModule, TheSeamWidgetTableModule, TheSeamWidgetTileListModule, TheSeamWidgetTileModule, WidgetButtonGroupComponent, WidgetComponent, WidgetContentHeaderComponent, WidgetDescriptionComponent, WidgetDragHandleDirective, WidgetEmptyLabelComponent, WidgetFooterComponent, WidgetFooterLinkComponent, WidgetFooterTextComponent, WidgetHeaderBadgeComponent, WidgetIconTplDirective, WidgetListGroupComponent, WidgetListGroupItemAnchorComponent, WidgetListGroupItemButtonComponent, WidgetListGroupItemComponent, WidgetListGroupItemIconTplDirective, WidgetRegistryService, WidgetTableComponent, WidgetTileComponent, WidgetTileFooterComponent, WidgetTileFooterItemComponent, WidgetTileGroupComponent, WidgetTileListComponent, WidgetTileSecondaryIconDirective, WidgetTitleTplDirective, extendStyles, toggleNativeDragInteractions };
1394
+ export { CURRENT_WIDGET_PREFERENCES_VERSION, EMPTY_WIDGET_PREFERENCES, THESEAM_WIDGETS, THESEAM_WIDGET_ACCESSOR, THESEAM_WIDGET_DATA, THESEAM_WIDGET_DEFAULTS, THESEAM_WIDGET_PREFERENCES_ACCESSOR, TheSeamWidgetButtonGroupModule, TheSeamWidgetContentHeaderModule, TheSeamWidgetDescriptionModule, TheSeamWidgetEmptyLabelModule, TheSeamWidgetFooterLinkModule, TheSeamWidgetFooterTextModule, TheSeamWidgetHeaderBadgeModule, TheSeamWidgetListGroupModule, TheSeamWidgetModule, TheSeamWidgetTableModule, TheSeamWidgetTileListModule, TheSeamWidgetTileModule, WidgetButtonGroupComponent, WidgetComponent, WidgetContentHeaderComponent, WidgetDescriptionComponent, WidgetDragHandleDirective, WidgetEmptyLabelComponent, WidgetFooterComponent, WidgetFooterLinkComponent, WidgetFooterTextComponent, WidgetHeaderBadgeComponent, WidgetIconTplDirective, WidgetListGroupComponent, WidgetListGroupItemAnchorComponent, WidgetListGroupItemButtonComponent, WidgetListGroupItemComponent, WidgetListGroupItemIconTplDirective, WidgetPreferencesService, WidgetRegistryService, WidgetTableComponent, WidgetTileComponent, WidgetTileFooterComponent, WidgetTileFooterItemComponent, WidgetTileGroupComponent, WidgetTileListComponent, WidgetTileSecondaryIconDirective, WidgetTitleTplDirective, extendStyles, toggleNativeDragInteractions };
1380
1395
  //# sourceMappingURL=theseam-ui-common-widget.mjs.map