@yuuvis/client-components 3.2.1 → 3.3.0
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/fesm2022/yuuvis-client-components-widget-grid.mjs +586 -418
- package/fesm2022/yuuvis-client-components-widget-grid.mjs.map +1 -1
- package/lib/assets/i18n/de.json +1 -0
- package/lib/assets/i18n/en.json +1 -0
- package/package.json +2 -2
- package/types/yuuvis-client-components-widget-grid.d.ts +162 -127
|
@@ -1,48 +1,37 @@
|
|
|
1
|
-
import * as _angular_core from '@angular/core';
|
|
2
|
-
import { Type, InputSignal, OutputEmitterRef, TemplateRef } from '@angular/core';
|
|
3
|
-
import { GridType, GridsterItemConfig, Gridster, GridsterConfig } from 'angular-gridster2';
|
|
4
1
|
import * as _angular_forms from '@angular/forms';
|
|
5
2
|
import { FormControlStatus, FormControl } from '@angular/forms';
|
|
6
|
-
import
|
|
3
|
+
import * as _angular_core from '@angular/core';
|
|
4
|
+
import { InputSignal, Type, OutputEmitterRef, TemplateRef, OnInit } from '@angular/core';
|
|
7
5
|
import { MatDialogRef } from '@angular/material/dialog';
|
|
8
6
|
import { TranslateService } from '@yuuvis/client-core';
|
|
7
|
+
import { GridType, GridsterItemConfig, Gridster, GridsterConfig } from 'angular-gridster2';
|
|
8
|
+
import { InputsType } from 'ng-dynamic-component';
|
|
9
9
|
import { Observable } from 'rxjs';
|
|
10
10
|
|
|
11
|
-
interface GridWidget<T> {
|
|
12
|
-
id: string;
|
|
13
|
-
label: string;
|
|
14
|
-
setupComponent?: Type<IWidgetComponent<T>>;
|
|
15
|
-
widgetComponent: Type<IWidgetComponent<T>>;
|
|
16
|
-
}
|
|
17
|
-
interface WidgetGridItemConfig extends GridsterItemConfig {
|
|
18
|
-
id: string;
|
|
19
|
-
widgetName: string;
|
|
20
|
-
widgetConfig: any;
|
|
21
|
-
}
|
|
22
|
-
interface WidgetGridItem extends WidgetGridItemConfig {
|
|
23
|
-
widget: Type<any>;
|
|
24
|
-
widgetConfigMap: AttributesMap;
|
|
25
|
-
}
|
|
26
|
-
interface IWidgetComponent<T> {
|
|
27
|
-
widgetConfig: InputSignal<T>;
|
|
28
|
-
}
|
|
29
|
-
interface IWidgetSetupComponent<T> extends IWidgetComponent<T> {
|
|
30
|
-
widgetConfigChange: OutputEmitterRef<T>;
|
|
31
|
-
widgetConfigStateChange: OutputEmitterRef<FormControlStatus>;
|
|
32
|
-
}
|
|
33
|
-
interface WidgetPickerData {
|
|
34
|
-
widgetId: string | undefined;
|
|
35
|
-
widgetName: string;
|
|
36
|
-
widgetConfigMap?: AttributesMap;
|
|
37
|
-
}
|
|
38
11
|
interface AddItemSize {
|
|
39
12
|
rows: number;
|
|
40
13
|
cols: number;
|
|
41
14
|
}
|
|
42
|
-
|
|
15
|
+
|
|
16
|
+
interface GridItemEvent<T = unknown> {
|
|
43
17
|
action: string;
|
|
44
|
-
data:
|
|
18
|
+
data: T;
|
|
45
19
|
}
|
|
20
|
+
|
|
21
|
+
interface IWidgetComponent<T> {
|
|
22
|
+
widgetConfig: InputSignal<T>;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
interface GridWidget<T> {
|
|
26
|
+
id: string;
|
|
27
|
+
label: string;
|
|
28
|
+
description?: string;
|
|
29
|
+
group?: string;
|
|
30
|
+
setupComponent?: Type<IWidgetComponent<T>>;
|
|
31
|
+
widgetComponent: Type<IWidgetComponent<T>>;
|
|
32
|
+
isApplicable?: () => boolean;
|
|
33
|
+
}
|
|
34
|
+
|
|
46
35
|
interface WidgetGridConfig {
|
|
47
36
|
rows?: number;
|
|
48
37
|
columns?: number;
|
|
@@ -51,58 +40,33 @@ interface WidgetGridConfig {
|
|
|
51
40
|
newItemHeight?: number;
|
|
52
41
|
gridType?: GridType;
|
|
53
42
|
}
|
|
43
|
+
|
|
44
|
+
interface WidgetGridItemConfig<T = unknown> extends GridsterItemConfig {
|
|
45
|
+
id: string;
|
|
46
|
+
widgetName: string;
|
|
47
|
+
widgetConfig: T;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
interface WidgetGridItem<T extends IWidgetComponent<unknown> = IWidgetComponent<unknown>> extends WidgetGridItemConfig {
|
|
51
|
+
widget: Type<T>;
|
|
52
|
+
widgetConfigMap: InputsType;
|
|
53
|
+
isApplicable: boolean;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
interface WidgetPickerData {
|
|
57
|
+
widgetId: string | undefined;
|
|
58
|
+
widgetName: string;
|
|
59
|
+
widgetConfigMap?: InputsType;
|
|
60
|
+
}
|
|
61
|
+
|
|
54
62
|
interface WidgetPickerOptions {
|
|
55
63
|
pickerData?: WidgetPickerData;
|
|
56
64
|
buckets?: string[];
|
|
57
65
|
}
|
|
58
66
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
widgetPicker: _angular_core.Signal<TemplateRef<any>>;
|
|
63
|
-
options: GridsterConfig;
|
|
64
|
-
gridConfig: _angular_core.InputSignal<Partial<WidgetGridConfig> | undefined>;
|
|
65
|
-
_editMode: _angular_core.WritableSignal<boolean>;
|
|
66
|
-
/**
|
|
67
|
-
* Whether or not to enable edit mode. In edit mode controls
|
|
68
|
-
* for editing existing tiles and creating new ones are shown.
|
|
69
|
-
* This mode also enables positioning and resizing of the tiles.
|
|
70
|
-
*/
|
|
71
|
-
editMode: _angular_core.InputSignal<boolean>;
|
|
72
|
-
gridItemConfig: _angular_core.InputSignal<WidgetGridItemConfig[] | undefined>;
|
|
73
|
-
/**
|
|
74
|
-
* Collection of buckets to load available widgets from. Wildcards are also posssible:
|
|
75
|
-
* `[buckets]="['app.default', '*.public.*', 'app.no?.widgets']"`
|
|
76
|
-
*
|
|
77
|
-
* `*` represents any character 0-n times
|
|
78
|
-
* `?` represents exactly one character
|
|
79
|
-
*/
|
|
80
|
-
buckets: _angular_core.InputSignal<string[] | undefined>;
|
|
81
|
-
/**
|
|
82
|
-
* Emitted when the grid has been changed
|
|
83
|
-
*/
|
|
84
|
-
gridChange: _angular_core.OutputEmitterRef<WidgetGridItemConfig[]>;
|
|
85
|
-
gridItemEvent: _angular_core.OutputEmitterRef<GridItemEvent>;
|
|
86
|
-
/**
|
|
87
|
-
* Emitted when the widget picker is opened or closed in edit mode
|
|
88
|
-
*/
|
|
89
|
-
widgetPickerOpen: _angular_core.OutputEmitterRef<boolean>;
|
|
90
|
-
widgetGrid: Array<WidgetGridItem>;
|
|
91
|
-
widgetPickerData: WidgetPickerData | undefined;
|
|
92
|
-
constructor();
|
|
93
|
-
openWidgetPicker(item?: WidgetGridItem): void;
|
|
94
|
-
/**
|
|
95
|
-
* Removes a widget from the grid
|
|
96
|
-
* @param item The widget to be removed
|
|
97
|
-
*/
|
|
98
|
-
removeItem(item: WidgetGridItem): void;
|
|
99
|
-
/**
|
|
100
|
-
* Add a new widget to the grid by opening the widget picker
|
|
101
|
-
*/
|
|
102
|
-
addItem(): void;
|
|
103
|
-
private emitChange;
|
|
104
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<YuvWidgetGridComponent, never>;
|
|
105
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<YuvWidgetGridComponent, "yuv-widget-grid", never, { "gridConfig": { "alias": "gridConfig"; "required": false; "isSignal": true; }; "editMode": { "alias": "editMode"; "required": false; "isSignal": true; }; "gridItemConfig": { "alias": "gridItemConfig"; "required": false; "isSignal": true; }; "buckets": { "alias": "buckets"; "required": false; "isSignal": true; }; }, { "gridChange": "gridChange"; "gridItemEvent": "gridItemEvent"; "widgetPickerOpen": "widgetPickerOpen"; }, never, [".empty"], true, never>;
|
|
67
|
+
interface IWidgetSetupComponent<T> extends IWidgetComponent<T> {
|
|
68
|
+
widgetConfigChange: OutputEmitterRef<T>;
|
|
69
|
+
widgetConfigStateChange: OutputEmitterRef<FormControlStatus>;
|
|
106
70
|
}
|
|
107
71
|
|
|
108
72
|
interface WidgetGridWorkspace {
|
|
@@ -114,10 +78,12 @@ interface WidgetGridWorkspace {
|
|
|
114
78
|
preventEdit?: boolean;
|
|
115
79
|
preventRename?: boolean;
|
|
116
80
|
}
|
|
81
|
+
|
|
117
82
|
interface WidgetGridWorkspaceConfig {
|
|
118
83
|
currentWorkspace?: string;
|
|
119
84
|
workspaces: WidgetGridWorkspace[];
|
|
120
85
|
}
|
|
86
|
+
|
|
121
87
|
interface WidgetGridWorkspaceOptions {
|
|
122
88
|
gridConfig?: Partial<WidgetGridConfig>;
|
|
123
89
|
}
|
|
@@ -130,16 +96,6 @@ interface WidgetGridWorkspaceOptions {
|
|
|
130
96
|
declare class YuvWidgetGridWorkspacesComponent {
|
|
131
97
|
#private;
|
|
132
98
|
readonly translate: TranslateService;
|
|
133
|
-
workspaceDialogRef?: MatDialogRef<any, any>;
|
|
134
|
-
workspaceForm: _angular_forms.FormGroup<{
|
|
135
|
-
id: FormControl<string | null>;
|
|
136
|
-
label: FormControl<string | null>;
|
|
137
|
-
}>;
|
|
138
|
-
get workspaceLabelControl(): FormControl;
|
|
139
|
-
options: _angular_core.InputSignal<WidgetGridWorkspaceOptions>;
|
|
140
|
-
_workspaceOptions: _angular_core.Signal<WidgetGridWorkspaceOptions>;
|
|
141
|
-
workspaceConfig: _angular_core.InputSignal<WidgetGridWorkspaceConfig | undefined>;
|
|
142
|
-
_workspaceConfig: _angular_core.WritableSignal<WidgetGridWorkspaceConfig | undefined>;
|
|
143
99
|
/**
|
|
144
100
|
* Collection of buckets to load available widgets from. Wildcards are also posssible:
|
|
145
101
|
* `[buckets]="['app.default', '*.public.*', 'app.no?.widgets']"`
|
|
@@ -149,30 +105,47 @@ declare class YuvWidgetGridWorkspacesComponent {
|
|
|
149
105
|
*/
|
|
150
106
|
buckets: _angular_core.InputSignal<string[] | undefined>;
|
|
151
107
|
configChange: _angular_core.OutputEmitterRef<WidgetGridWorkspaceConfig | undefined>;
|
|
152
|
-
gridItemEvent: _angular_core.OutputEmitterRef<GridItemEvent
|
|
108
|
+
gridItemEvent: _angular_core.OutputEmitterRef<GridItemEvent<unknown>>;
|
|
153
109
|
editModeChange: _angular_core.OutputEmitterRef<boolean>;
|
|
110
|
+
workspaceDialogRef?: MatDialogRef<unknown, unknown>;
|
|
111
|
+
workspaceForm: _angular_forms.FormGroup<{
|
|
112
|
+
id: FormControl<string | null>;
|
|
113
|
+
label: FormControl<string | null>;
|
|
114
|
+
}>;
|
|
115
|
+
get workspaceLabelControl(): FormControl;
|
|
116
|
+
options: _angular_core.InputSignal<WidgetGridWorkspaceOptions>;
|
|
117
|
+
_workspaceOptions: _angular_core.Signal<WidgetGridWorkspaceOptions>;
|
|
118
|
+
workspaceConfig: _angular_core.InputSignal<WidgetGridWorkspaceConfig | undefined>;
|
|
119
|
+
_workspaceConfig: _angular_core.WritableSignal<WidgetGridWorkspaceConfig | undefined>;
|
|
154
120
|
editMode: _angular_core.WritableSignal<boolean>;
|
|
155
121
|
workspace: _angular_core.WritableSignal<WidgetGridWorkspace | undefined>;
|
|
156
122
|
workspaceLabel: _angular_core.WritableSignal<string>;
|
|
157
|
-
gridItemConfig: _angular_core.WritableSignal<WidgetGridItemConfig[] | undefined>;
|
|
123
|
+
gridItemConfig: _angular_core.WritableSignal<WidgetGridItemConfig<unknown>[] | undefined>;
|
|
124
|
+
constructor();
|
|
158
125
|
getLabel(workspace: WidgetGridWorkspace): string;
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
126
|
+
onSetWorkspace(id: string, silent?: boolean): void;
|
|
127
|
+
onOpenWorkspaceDialog(create: boolean, tplRef: TemplateRef<unknown>): void;
|
|
128
|
+
onDeleteCurrentWorkspace(): void;
|
|
129
|
+
onToggleEditMode(): void;
|
|
130
|
+
onRevertWorkspaceConfig(): void;
|
|
131
|
+
/**
|
|
132
|
+
* Emit current changes and reset original workspace config internally
|
|
133
|
+
*
|
|
134
|
+
* @returns void
|
|
135
|
+
*/
|
|
136
|
+
onPersistWorkspaceConfig(): void;
|
|
137
|
+
onGridChange(grid: WidgetGridItemConfig[]): void;
|
|
138
|
+
onGridEvent(gridItemEvent: GridItemEvent): void;
|
|
139
|
+
onEnableEditMode(): void;
|
|
140
|
+
onSaveWorkspace(): void;
|
|
168
141
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<YuvWidgetGridWorkspacesComponent, never>;
|
|
169
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<YuvWidgetGridWorkspacesComponent, "yuv-widget-grid-workspaces", never, { "
|
|
142
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<YuvWidgetGridWorkspacesComponent, "yuv-widget-grid-workspaces", never, { "buckets": { "alias": "buckets"; "required": false; "isSignal": true; }; "options": { "alias": "options"; "required": false; "isSignal": true; }; "workspaceConfig": { "alias": "workspaceConfig"; "required": false; "isSignal": true; }; }, { "configChange": "configChange"; "gridItemEvent": "gridItemEvent"; "editModeChange": "editModeChange"; }, never, never, true, never>;
|
|
170
143
|
}
|
|
171
144
|
|
|
172
|
-
declare class
|
|
173
|
-
|
|
174
|
-
static
|
|
175
|
-
static
|
|
145
|
+
declare class NoopComponent implements IWidgetComponent<any> {
|
|
146
|
+
widgetConfig: any;
|
|
147
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NoopComponent, never>;
|
|
148
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NoopComponent, "yuv-noop", never, { "widgetConfig": { "alias": "widgetConfig"; "required": false; }; }, {}, never, never, true, never>;
|
|
176
149
|
}
|
|
177
150
|
|
|
178
151
|
/**
|
|
@@ -190,7 +163,7 @@ declare class WidgetGridRegistry {
|
|
|
190
163
|
private registeredWidgets;
|
|
191
164
|
/**
|
|
192
165
|
* Buckets are collection of widget references.
|
|
193
|
-
* You can put any widget registered
|
|
166
|
+
* You can put any widget registered globally into a bucket. Later on you can grab
|
|
194
167
|
* widgets from a certain bucket. This enables apps to structure their widgets when e.g.
|
|
195
168
|
* using multiple widget grids with their own set of available widgets.
|
|
196
169
|
*/
|
|
@@ -203,7 +176,7 @@ declare class WidgetGridRegistry {
|
|
|
203
176
|
* existing component from the widget grid.
|
|
204
177
|
* @returns NoopComponent
|
|
205
178
|
*/
|
|
206
|
-
getNoopWidget(): GridWidget<
|
|
179
|
+
getNoopWidget(): GridWidget<unknown>;
|
|
207
180
|
/**
|
|
208
181
|
* Setup components are the administrative part of a widget. They
|
|
209
182
|
* are used to set up a widget. Not all the widgets will have a setup
|
|
@@ -212,7 +185,7 @@ declare class WidgetGridRegistry {
|
|
|
212
185
|
* @returns The setup component of a widget. Throws error if there
|
|
213
186
|
* is not widget registered with the given name
|
|
214
187
|
*/
|
|
215
|
-
getWidgetSetupComponent(widgetName: string): Type<
|
|
188
|
+
getWidgetSetupComponent(widgetName: string): Type<unknown> | undefined;
|
|
216
189
|
/**
|
|
217
190
|
* Get the component for a widget. This is the component that will
|
|
218
191
|
* be rendered in a grid tile.
|
|
@@ -220,7 +193,15 @@ declare class WidgetGridRegistry {
|
|
|
220
193
|
* @returns The widget component or noop component if there is
|
|
221
194
|
* no component registered with the given name
|
|
222
195
|
*/
|
|
223
|
-
getWidgetComponent(widgetName: string): Type<
|
|
196
|
+
getWidgetComponent(widgetName: string): typeof NoopComponent | Type<IWidgetComponent<unknown>>;
|
|
197
|
+
/**
|
|
198
|
+
* Evaluates whether the widget with the given name is applicable for
|
|
199
|
+
* the current runtime context. Widgets without an `isApplicable`
|
|
200
|
+
* predicate are considered applicable. Unknown widgets are reported
|
|
201
|
+
* as applicable so the noop fallback can still render.
|
|
202
|
+
* @param widgetName The widgets name
|
|
203
|
+
*/
|
|
204
|
+
isWidgetApplicable(widgetName: string): boolean;
|
|
224
205
|
/**
|
|
225
206
|
* Adds a new widget to the list of registered widgets. That way
|
|
226
207
|
* you can create custom widgets that are then available to be
|
|
@@ -229,15 +210,14 @@ declare class WidgetGridRegistry {
|
|
|
229
210
|
* @param bucket List of buckets to register to. If a bucket does
|
|
230
211
|
* not exist it'll be created.
|
|
231
212
|
*/
|
|
232
|
-
registerGridWidget(widget: GridWidget<
|
|
213
|
+
registerGridWidget(widget: GridWidget<unknown>, buckets?: string[]): void;
|
|
233
214
|
/**
|
|
234
215
|
* Register a collection of widgets
|
|
235
216
|
* @param widgets The widgets to be registered
|
|
236
217
|
* @param bucket List of buckets to register to. If a bucket does
|
|
237
218
|
* not exist it'll be created.
|
|
238
219
|
*/
|
|
239
|
-
registerGridWidgets(widgets: GridWidget<
|
|
240
|
-
private _addToBucket;
|
|
220
|
+
registerGridWidgets(widgets: GridWidget<unknown>[], buckets?: string[]): void;
|
|
241
221
|
removeRegisteredWidget(id: string): void;
|
|
242
222
|
clearRegisteredWidget(): void;
|
|
243
223
|
/**
|
|
@@ -247,8 +227,9 @@ declare class WidgetGridRegistry {
|
|
|
247
227
|
* @param buckets name of buckets to restrict the widgets to
|
|
248
228
|
* @returns Array of grid widgets
|
|
249
229
|
*/
|
|
250
|
-
getRegisteredWidgets(buckets?: string[]):
|
|
230
|
+
getRegisteredWidgets(buckets?: string[]): GridWidget<unknown>[];
|
|
251
231
|
private _wildcardMatch;
|
|
232
|
+
private _addToBucket;
|
|
252
233
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<WidgetGridRegistry, never>;
|
|
253
234
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<WidgetGridRegistry>;
|
|
254
235
|
}
|
|
@@ -262,38 +243,92 @@ declare class WidgetGridRegistry {
|
|
|
262
243
|
* consider using those labels as well.
|
|
263
244
|
*/
|
|
264
245
|
declare class WidgetGridService {
|
|
265
|
-
private
|
|
266
|
-
private widgetGrid;
|
|
267
|
-
private widgetGridSource;
|
|
246
|
+
#private;
|
|
268
247
|
widgetGrid$: Observable<WidgetGridItem[]>;
|
|
269
|
-
private widgetGridUpdateSource;
|
|
270
248
|
/**
|
|
271
249
|
* Emitted when the widget grid has been updated
|
|
272
250
|
*/
|
|
273
251
|
widgetGridUpdate$: Observable<string>;
|
|
274
|
-
addItemSize:
|
|
275
|
-
|
|
276
|
-
cols: number;
|
|
277
|
-
};
|
|
278
|
-
constructor(widgetGridRegistry: WidgetGridRegistry);
|
|
279
|
-
setWidgetGrid(gridItemConfig: Array<WidgetGridItemConfig> | undefined): void;
|
|
252
|
+
addItemSize: AddItemSize;
|
|
253
|
+
setWidgetGrid(gridItemConfig: WidgetGridItemConfig[] | undefined): void;
|
|
280
254
|
/**
|
|
281
255
|
* Update config of an existing widget
|
|
282
256
|
* @param widgetId ID of the widget to be updated
|
|
283
257
|
* @param setupWidgetConfig The updated configuration for that widget
|
|
284
258
|
*/
|
|
285
|
-
updateWidget(widgetId: string, setupWidgetConfig:
|
|
286
|
-
replaceWidget(widgetId: string, widgetName: string, setupWidgetConfig?:
|
|
259
|
+
updateWidget(widgetId: string, setupWidgetConfig: unknown): void;
|
|
260
|
+
replaceWidget(widgetId: string, widgetName: string, setupWidgetConfig?: unknown): void;
|
|
287
261
|
/**
|
|
288
262
|
* Add a new grid item to the widget grid.
|
|
289
263
|
* @param widgetName The name of the grid item to be added
|
|
290
264
|
* @param setupWidgetConfig
|
|
291
265
|
*/
|
|
292
|
-
addWidget(widgetName: string, setupWidgetConfig?:
|
|
266
|
+
addWidget(widgetName: string, setupWidgetConfig?: unknown): void;
|
|
293
267
|
removeWidget(gridItemId: string): void;
|
|
294
268
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<WidgetGridService, never>;
|
|
295
269
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<WidgetGridService>;
|
|
296
270
|
}
|
|
297
271
|
|
|
272
|
+
declare class YuvWidgetGridComponent implements OnInit {
|
|
273
|
+
#private;
|
|
274
|
+
gridster: _angular_core.Signal<Gridster | undefined>;
|
|
275
|
+
widgetPicker: _angular_core.Signal<TemplateRef<any>>;
|
|
276
|
+
gridConfig: _angular_core.InputSignal<Partial<WidgetGridConfig> | undefined>;
|
|
277
|
+
_editMode: _angular_core.WritableSignal<boolean>;
|
|
278
|
+
/**
|
|
279
|
+
* Whether or not to enable edit mode. In edit mode controls
|
|
280
|
+
* for editing existing tiles and creating new ones are shown.
|
|
281
|
+
* This mode also enables positioning and resizing of the tiles.
|
|
282
|
+
*/
|
|
283
|
+
editMode: _angular_core.InputSignal<boolean>;
|
|
284
|
+
gridItemConfig: _angular_core.InputSignal<WidgetGridItemConfig<unknown>[] | undefined>;
|
|
285
|
+
/**
|
|
286
|
+
* Collection of buckets to load available widgets from. Wildcards are also possible:
|
|
287
|
+
* `[buckets]="['app.default', '*.public.*', 'app.no?.widgets']"`
|
|
288
|
+
*
|
|
289
|
+
* `*` represents any character 0-n times
|
|
290
|
+
* `?` represents exactly one character
|
|
291
|
+
*/
|
|
292
|
+
buckets: _angular_core.InputSignal<string[] | undefined>;
|
|
293
|
+
/**
|
|
294
|
+
* Emitted when the grid has been changed
|
|
295
|
+
*/
|
|
296
|
+
gridChange: _angular_core.OutputEmitterRef<WidgetGridItemConfig<unknown>[]>;
|
|
297
|
+
gridItemEvent: _angular_core.OutputEmitterRef<GridItemEvent<unknown>>;
|
|
298
|
+
/**
|
|
299
|
+
* Emitted when the widget picker is opened or closed in edit mode
|
|
300
|
+
*/
|
|
301
|
+
widgetPickerOpen: _angular_core.OutputEmitterRef<boolean>;
|
|
302
|
+
/**
|
|
303
|
+
* Held as a signal so gridster's `options` InputSignal sees a new reference
|
|
304
|
+
* whenever edit mode or grid config changes. Mutating the inner object would
|
|
305
|
+
* keep the same reference and gridster's `$options` computed would never
|
|
306
|
+
* recompute — leaving draggable/resizable stuck at their initial `false`.
|
|
307
|
+
*/
|
|
308
|
+
options: _angular_core.WritableSignal<GridsterConfig>;
|
|
309
|
+
widgetGrid: WidgetGridItem[];
|
|
310
|
+
widgetPickerData: WidgetPickerData | undefined;
|
|
311
|
+
constructor();
|
|
312
|
+
ngOnInit(): void;
|
|
313
|
+
onOpenWidgetPicker(item?: WidgetGridItem): void;
|
|
314
|
+
/**
|
|
315
|
+
* Removes a widget from the grid
|
|
316
|
+
* @param item The widget to be removed
|
|
317
|
+
*/
|
|
318
|
+
onRemoveItem(item: WidgetGridItem): void;
|
|
319
|
+
/**
|
|
320
|
+
* Add a new widget to the grid by opening the widget picker
|
|
321
|
+
*/
|
|
322
|
+
onAddItem(): void;
|
|
323
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<YuvWidgetGridComponent, never>;
|
|
324
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<YuvWidgetGridComponent, "yuv-widget-grid", never, { "gridConfig": { "alias": "gridConfig"; "required": false; "isSignal": true; }; "editMode": { "alias": "editMode"; "required": false; "isSignal": true; }; "gridItemConfig": { "alias": "gridItemConfig"; "required": false; "isSignal": true; }; "buckets": { "alias": "buckets"; "required": false; "isSignal": true; }; }, { "gridChange": "gridChange"; "gridItemEvent": "gridItemEvent"; "widgetPickerOpen": "widgetPickerOpen"; }, never, [".empty"], true, never>;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
declare class YuvWidgetGridModule {
|
|
328
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<YuvWidgetGridModule, never>;
|
|
329
|
+
static ɵmod: _angular_core.ɵɵNgModuleDeclaration<YuvWidgetGridModule, never, [typeof YuvWidgetGridComponent, typeof YuvWidgetGridWorkspacesComponent], [typeof YuvWidgetGridComponent, typeof YuvWidgetGridWorkspacesComponent]>;
|
|
330
|
+
static ɵinj: _angular_core.ɵɵInjectorDeclaration<YuvWidgetGridModule>;
|
|
331
|
+
}
|
|
332
|
+
|
|
298
333
|
export { WidgetGridRegistry, WidgetGridService, YuvWidgetGridComponent, YuvWidgetGridModule, YuvWidgetGridWorkspacesComponent };
|
|
299
334
|
export type { AddItemSize, GridItemEvent, GridWidget, IWidgetComponent, IWidgetSetupComponent, WidgetGridConfig, WidgetGridItem, WidgetGridItemConfig, WidgetGridWorkspace, WidgetGridWorkspaceConfig, WidgetGridWorkspaceOptions, WidgetPickerData, WidgetPickerOptions };
|