@theseam/ui-common 0.4.6 → 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.
- package/esm2020/widget/public-api.mjs +4 -1
- package/fesm2015/theseam-ui-common-widget.mjs +96 -96
- package/fesm2015/theseam-ui-common-widget.mjs.map +1 -1
- package/fesm2020/theseam-ui-common-widget.mjs +94 -94
- package/fesm2020/theseam-ui-common-widget.mjs.map +1 -1
- package/package.json +1 -1
- package/widget/public-api.d.ts +3 -0
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
export * from './directives/widget-drag-handle.directive';
|
|
2
2
|
export * from './directives/widget-icon-tpl.directive';
|
|
3
3
|
export * from './directives/widget-title-tpl.directive';
|
|
4
|
+
export * from './preferences/widget-preferences.models';
|
|
5
|
+
export * from './preferences/widget-preferences.service';
|
|
6
|
+
export * from './preferences/widget-preferences.token';
|
|
4
7
|
export * from './widget-content-components/widget-button-group/widget-button-group.component';
|
|
5
8
|
export * from './widget-content-components/widget-button-group/widget-button-group.module';
|
|
6
9
|
export * from './widget-content-components/widget-content-header/widget-content-header.component';
|
|
@@ -36,4 +39,4 @@ export * from './widget-registry.service';
|
|
|
36
39
|
export * from './widget-token';
|
|
37
40
|
export * from './widget.module';
|
|
38
41
|
export * from './widget.models';
|
|
39
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
42
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3Byb2plY3RzL3VpLWNvbW1vbi93aWRnZXQvcHVibGljLWFwaS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLDJDQUEyQyxDQUFBO0FBQ3pELGNBQWMsd0NBQXdDLENBQUE7QUFDdEQsY0FBYyx5Q0FBeUMsQ0FBQTtBQUV2RCxjQUFjLH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9tICcuL3dpZGdldC1yZWdpc3RyeS5zZXJ2aWNlJ1xuZXhwb3J0ICogZnJvbSAnLi93aWRnZXQtdG9rZW4nXG5leHBvcnQgKiBmcm9tICcuL3dpZGdldC5tb2R1bGUnXG5leHBvcnQgKiBmcm9tICcuL3dpZGdldC5tb2RlbHMnXG4iXX0=
|
|
@@ -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,
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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,86 +1027,6 @@ 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
1031
|
const THESEAM_WIDGET_DATA = new InjectionToken('TheSeamWidgetData');
|
|
1032
1032
|
const THESEAM_WIDGET_DEFAULTS = new InjectionToken('TheSeamWidgetDefaults');
|
|
@@ -1391,5 +1391,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImpor
|
|
|
1391
1391
|
* Generated bundle index. Do not edit.
|
|
1392
1392
|
*/
|
|
1393
1393
|
|
|
1394
|
-
export { THESEAM_WIDGETS, THESEAM_WIDGET_ACCESSOR, THESEAM_WIDGET_DATA, THESEAM_WIDGET_DEFAULTS, 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 };
|
|
1395
1395
|
//# sourceMappingURL=theseam-ui-common-widget.mjs.map
|