@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.
@@ -5,6 +5,7 @@ import { SeamIcon } from '@theseam/ui-common/icon';
5
5
  import { WidgetIconTplDirective } from '../directives/widget-icon-tpl.directive';
6
6
  import { WidgetTitleTplDirective } from '../directives/widget-title-tpl.directive';
7
7
  import { WidgetPreferencesService } from '../preferences/widget-preferences.service';
8
+ import { TheSeamWidgetData, TheSeamWidgetDefaults } from '../widget.models';
8
9
  import * as i0 from "@angular/core";
9
10
  /**
10
11
  * Widget
@@ -19,7 +20,8 @@ import * as i0 from "@angular/core";
19
20
  */
20
21
  export declare class WidgetComponent implements OnDestroy {
21
22
  private readonly _widgetPreferences;
22
- private readonly _data;
23
+ private readonly _defaults?;
24
+ private readonly _data?;
23
25
  static ngAcceptInputType_hasHeader: BooleanInput;
24
26
  static ngAcceptInputType_loading: BooleanInput;
25
27
  static ngAcceptInputType_hasConfig: BooleanInput;
@@ -71,13 +73,13 @@ export declare class WidgetComponent implements OnDestroy {
71
73
  canCollapse: boolean;
72
74
  iconTpl?: WidgetIconTplDirective;
73
75
  titleTpl?: WidgetTitleTplDirective;
74
- constructor(_widgetPreferences: WidgetPreferencesService, _data: any);
76
+ constructor(_widgetPreferences: WidgetPreferencesService, _defaults?: TheSeamWidgetDefaults | undefined, _data?: TheSeamWidgetData | undefined);
75
77
  ngOnDestroy(): void;
76
78
  /**
77
79
  * Toggles a widget's collapsed state.
78
80
  */
79
81
  collapse(): void;
80
82
  get collapseState(): string;
81
- static ɵfac: i0.ɵɵFactoryDeclaration<WidgetComponent, [null, { optional: true; }]>;
83
+ static ɵfac: i0.ɵɵFactoryDeclaration<WidgetComponent, [null, { optional: true; }, { optional: true; }]>;
82
84
  static ɵcmp: i0.ɵɵComponentDeclaration<WidgetComponent, "seam-widget", never, { "collapsed": "collapsed"; "hasHeader": "hasHeader"; "titleText": "titleText"; "icon": "icon"; "iconClass": "iconClass"; "loading": "loading"; "hasConfig": "hasConfig"; "canCollapse": "canCollapse"; }, {}, ["iconTpl", "titleTpl"], ["*", "seam-widget-footer"], false, never>;
83
85
  }
@@ -1,4 +1,6 @@
1
1
  import { InjectionToken } from '@angular/core';
2
2
  import { IWidgetRegistryRecord } from './widget-registry.models';
3
+ import { TheSeamWidgetData, TheSeamWidgetDefaults } from './widget.models';
3
4
  export declare const THESEAM_WIDGETS: InjectionToken<IWidgetRegistryRecord<any, any>>;
4
- export declare const THESEAM_WIDGET_DATA: InjectionToken<any>;
5
+ export declare const THESEAM_WIDGET_DATA: InjectionToken<TheSeamWidgetData>;
6
+ export declare const THESEAM_WIDGET_DEFAULTS: InjectionToken<TheSeamWidgetDefaults>;
@@ -0,0 +1,7 @@
1
+ export interface TheSeamWidgetData {
2
+ widgetId?: string;
3
+ }
4
+ export interface TheSeamWidgetDefaults {
5
+ canCollapse?: boolean;
6
+ collapsed?: boolean;
7
+ }