@yuuvis/client-framework 2.0.11 → 2.0.13
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-framework-autocomplete.mjs +2 -2
- package/fesm2022/yuuvis-client-framework-autocomplete.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-common.mjs +3 -5
- package/fesm2022/yuuvis-client-framework-common.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-datepicker.mjs +4 -4
- package/fesm2022/yuuvis-client-framework-datepicker.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-forms.mjs +103 -55
- package/fesm2022/yuuvis-client-framework-forms.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-icons.mjs +1 -0
- package/fesm2022/yuuvis-client-framework-icons.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-metadata-form-defaults.mjs +1 -1
- package/fesm2022/yuuvis-client-framework-metadata-form-defaults.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-object-form.mjs +1 -1
- package/fesm2022/yuuvis-client-framework-object-form.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-pagination.mjs +3 -0
- package/fesm2022/yuuvis-client-framework-pagination.mjs.map +1 -1
- package/fesm2022/yuuvis-client-framework-widget-grid.mjs +924 -0
- package/fesm2022/yuuvis-client-framework-widget-grid.mjs.map +1 -0
- package/forms/lib/elements/number-range/number-range.component.d.ts +2 -1
- package/icons/lib/icon.service.d.ts +1 -0
- package/lib/assets/i18n/de.json +22 -3
- package/lib/assets/i18n/en.json +24 -5
- package/package.json +10 -5
- package/pagination/lib/pagination.component.d.ts +3 -0
- package/widget-grid/README.md +48 -0
- package/widget-grid/index.d.ts +7 -0
- package/widget-grid/lib/widget-grid-event.service.d.ts +10 -0
- package/widget-grid/lib/widget-grid-registry.service.d.ts +80 -0
- package/widget-grid/lib/widget-grid-workspaces/widget-grid-workspaces.component.d.ts +51 -0
- package/widget-grid/lib/widget-grid-workspaces/widget-grid-workspaces.interface.d.ts +16 -0
- package/widget-grid/lib/widget-grid-workspaces/workspace-edit/workspace-edit.component.d.ts +10 -0
- package/widget-grid/lib/widget-grid.component.d.ts +51 -0
- package/widget-grid/lib/widget-grid.interface.d.ts +50 -0
- package/widget-grid/lib/widget-grid.module.d.ts +8 -0
- package/widget-grid/lib/widget-grid.service.d.ts +45 -0
- package/widget-grid/lib/widget-grid.utils.d.ts +18 -0
- package/widget-grid/lib/widget-picker/widget-picker.component.d.ts +38 -0
- package/widget-grid/lib/widgets/noop/noop.component.d.ts +7 -0
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { TemplateRef } from '@angular/core';
|
|
2
|
+
import { GridsterConfig, GridsterItemComponent } from 'angular-gridster2';
|
|
3
|
+
import { GridItemEvent, WidgetGridConfig, WidgetGridItem, WidgetGridItemConfig, WidgetPickerData } from './widget-grid.interface';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class YuvWidgetGridComponent {
|
|
6
|
+
#private;
|
|
7
|
+
gridsterItems: import("@angular/core").Signal<GridsterItemComponent>;
|
|
8
|
+
widgetPicker: import("@angular/core").Signal<TemplateRef<any>>;
|
|
9
|
+
options: GridsterConfig;
|
|
10
|
+
gridConfig: import("@angular/core").InputSignal<WidgetGridConfig | undefined>;
|
|
11
|
+
/**
|
|
12
|
+
* Whether or not to enable edit mode. In edit mode controls
|
|
13
|
+
* for editing existing tiles and creating new ones are shown.
|
|
14
|
+
* This mode also enables positioning and resizing of the tiles.
|
|
15
|
+
*/
|
|
16
|
+
editMode: import("@angular/core").InputSignal<boolean>;
|
|
17
|
+
gridItemConfig: import("@angular/core").InputSignal<WidgetGridItemConfig[] | undefined>;
|
|
18
|
+
/**
|
|
19
|
+
* Collection of buckets to load available widgets from. Wildcards are also posssible:
|
|
20
|
+
* `[buckets]="['app.default', '*.public.*', 'app.no?.widgets']"`
|
|
21
|
+
*
|
|
22
|
+
* `*` represents any character 0-n times
|
|
23
|
+
* `?` represents exactly one character
|
|
24
|
+
*/
|
|
25
|
+
buckets: import("@angular/core").InputSignal<string[] | undefined>;
|
|
26
|
+
/**
|
|
27
|
+
* Emitted when the grid has been changed
|
|
28
|
+
*/
|
|
29
|
+
gridChange: import("@angular/core").OutputEmitterRef<WidgetGridItemConfig[]>;
|
|
30
|
+
gridItemEvent: import("@angular/core").OutputEmitterRef<GridItemEvent>;
|
|
31
|
+
/**
|
|
32
|
+
* Emitted when the widget picker is opened or closed in edit mode
|
|
33
|
+
*/
|
|
34
|
+
widgetPickerOpen: import("@angular/core").OutputEmitterRef<boolean>;
|
|
35
|
+
widgetGrid: Array<WidgetGridItem>;
|
|
36
|
+
widgetPickerData: WidgetPickerData | undefined;
|
|
37
|
+
constructor();
|
|
38
|
+
openWidgetPicker(item?: WidgetGridItem): void;
|
|
39
|
+
/**
|
|
40
|
+
* Removes a widget from the grid
|
|
41
|
+
* @param item The widget to be removed
|
|
42
|
+
*/
|
|
43
|
+
removeItem(item: WidgetGridItem): void;
|
|
44
|
+
/**
|
|
45
|
+
* Add a new widget to the grid by opening the widget picker
|
|
46
|
+
*/
|
|
47
|
+
addItem(): void;
|
|
48
|
+
private emitChange;
|
|
49
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<YuvWidgetGridComponent, never>;
|
|
50
|
+
static ɵcmp: i0.ɵɵ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, never, true, never>;
|
|
51
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { InputSignal, OutputEmitterRef, Type } from '@angular/core';
|
|
2
|
+
import { FormControlStatus } from '@angular/forms';
|
|
3
|
+
import { GridsterItem } from 'angular-gridster2';
|
|
4
|
+
import { AttributesMap } from 'ng-dynamic-component';
|
|
5
|
+
export interface GridWidget<T> {
|
|
6
|
+
id: string;
|
|
7
|
+
label: string;
|
|
8
|
+
setupComponent?: Type<IWidgetComponent<T>>;
|
|
9
|
+
widgetComponent: Type<IWidgetComponent<T>>;
|
|
10
|
+
}
|
|
11
|
+
export interface WidgetGridItemConfig extends GridsterItem {
|
|
12
|
+
id: string;
|
|
13
|
+
widgetName: string;
|
|
14
|
+
widgetConfig: any;
|
|
15
|
+
}
|
|
16
|
+
export interface WidgetGridItem extends WidgetGridItemConfig {
|
|
17
|
+
widget: Type<any>;
|
|
18
|
+
widgetConfigMap: AttributesMap;
|
|
19
|
+
}
|
|
20
|
+
export interface IWidgetComponent<T> {
|
|
21
|
+
widgetConfig: InputSignal<T>;
|
|
22
|
+
}
|
|
23
|
+
export interface IWidgetSetupComponent<T> extends IWidgetComponent<T> {
|
|
24
|
+
widgetConfigChange: OutputEmitterRef<T>;
|
|
25
|
+
widgetConfigStateChange: OutputEmitterRef<FormControlStatus>;
|
|
26
|
+
}
|
|
27
|
+
export interface WidgetPickerData {
|
|
28
|
+
widgetId: string | undefined;
|
|
29
|
+
widgetName: string;
|
|
30
|
+
widgetConfigMap?: AttributesMap;
|
|
31
|
+
}
|
|
32
|
+
export interface AddItemSize {
|
|
33
|
+
rows: number;
|
|
34
|
+
cols: number;
|
|
35
|
+
}
|
|
36
|
+
export interface GridItemEvent {
|
|
37
|
+
action: string;
|
|
38
|
+
data: any;
|
|
39
|
+
}
|
|
40
|
+
export interface WidgetGridConfig {
|
|
41
|
+
rows?: number;
|
|
42
|
+
columns?: number;
|
|
43
|
+
gap?: number;
|
|
44
|
+
newItemWidth?: number;
|
|
45
|
+
newItemHeight?: number;
|
|
46
|
+
}
|
|
47
|
+
export interface WidgetPickerOptions {
|
|
48
|
+
pickerData?: WidgetPickerData;
|
|
49
|
+
buckets?: string[];
|
|
50
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./widget-grid.component";
|
|
3
|
+
import * as i2 from "./widget-grid-workspaces/widget-grid-workspaces.component";
|
|
4
|
+
export declare class YuvWidgetGridModule {
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<YuvWidgetGridModule, never>;
|
|
6
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<YuvWidgetGridModule, never, [typeof i1.YuvWidgetGridComponent, typeof i2.YuvWidgetGridWorkspacesComponent], [typeof i1.YuvWidgetGridComponent, typeof i2.YuvWidgetGridWorkspacesComponent]>;
|
|
7
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<YuvWidgetGridModule>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
import { WidgetGridRegistry } from './widget-grid-registry.service';
|
|
3
|
+
import { WidgetGridItem, WidgetGridItemConfig } from './widget-grid.interface';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
/**
|
|
6
|
+
* Service managing a widget grid. Also includes a set of labels that will be
|
|
7
|
+
* used by the grid and its widgets. Default labels are provided out of the
|
|
8
|
+
* box. But if you want to use custom ones or add i18n you could overwrite
|
|
9
|
+
* them. The grid as well as the widgets will use those labels or fall back
|
|
10
|
+
* to their default ones. If you are developing own widgets you should
|
|
11
|
+
* consider using those labels as well.
|
|
12
|
+
*/
|
|
13
|
+
export declare class WidgetGridService {
|
|
14
|
+
private widgetGridRegistry;
|
|
15
|
+
private widgetGrid;
|
|
16
|
+
private widgetGridSource;
|
|
17
|
+
widgetGrid$: Observable<WidgetGridItem[]>;
|
|
18
|
+
private widgetGridUpdateSource;
|
|
19
|
+
/**
|
|
20
|
+
* Emitted when the widget grid has been updated
|
|
21
|
+
*/
|
|
22
|
+
widgetGridUpdate$: Observable<string>;
|
|
23
|
+
addItemSize: {
|
|
24
|
+
rows: number;
|
|
25
|
+
cols: number;
|
|
26
|
+
};
|
|
27
|
+
constructor(widgetGridRegistry: WidgetGridRegistry);
|
|
28
|
+
setWidgetGrid(gridItemConfig: Array<WidgetGridItemConfig> | undefined): void;
|
|
29
|
+
/**
|
|
30
|
+
* Update config of an existing widget
|
|
31
|
+
* @param widgetId ID of the widget to be updated
|
|
32
|
+
* @param setupWidgetConfig The updated configuration for that widget
|
|
33
|
+
*/
|
|
34
|
+
updateWidget(widgetId: string, setupWidgetConfig: any): void;
|
|
35
|
+
replaceWidget(widgetId: string, widgetName: string, setupWidgetConfig?: any): void;
|
|
36
|
+
/**
|
|
37
|
+
* Add a new grid item to the widget grid.
|
|
38
|
+
* @param widgetName The name of the grid item to be added
|
|
39
|
+
* @param setupWidgetConfig
|
|
40
|
+
*/
|
|
41
|
+
addWidget(widgetName: string, setupWidgetConfig?: any): void;
|
|
42
|
+
removeWidget(gridItemId: string): void;
|
|
43
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<WidgetGridService, never>;
|
|
44
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<WidgetGridService>;
|
|
45
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare class WidgetGridUtils {
|
|
2
|
+
static PREF_FUNCTION: string;
|
|
3
|
+
static PREF_RANGEVALUE: string;
|
|
4
|
+
/**
|
|
5
|
+
* Takes a `WidgetGridItemConfig` and stringifies it. The challenge
|
|
6
|
+
* here is that callback functions should also be stringified.
|
|
7
|
+
* @param gridItemConfig the config object
|
|
8
|
+
*/
|
|
9
|
+
static gridConfigStringify(o: any): string;
|
|
10
|
+
/**
|
|
11
|
+
* Takes a string stringified with `gridConfigStringify()` and parses it
|
|
12
|
+
* to output a proper WidgetGridItemConfig.
|
|
13
|
+
* @param stringifiedConfig stringified widget grid config
|
|
14
|
+
*/
|
|
15
|
+
static gridConfigParse(stringifiedConfig: string): any;
|
|
16
|
+
static uuid(): string;
|
|
17
|
+
private static _p8;
|
|
18
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
2
|
+
import { AttributesMap, OutputsType } from 'ng-dynamic-component';
|
|
3
|
+
import { FormControl, FormControlStatus } from '@angular/forms';
|
|
4
|
+
import { GridWidget, WidgetPickerData } from '../widget-grid.interface';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class WidgetPickerComponent implements OnInit {
|
|
7
|
+
#private;
|
|
8
|
+
pickerFormControl: FormControl<any>;
|
|
9
|
+
widgetId: string | undefined;
|
|
10
|
+
selectedWidget: GridWidget<any> | undefined;
|
|
11
|
+
widgetConfigMap: AttributesMap;
|
|
12
|
+
setupWidgetConfig: any;
|
|
13
|
+
widgetConfigDirty: boolean;
|
|
14
|
+
widgetConfigState?: FormControlStatus;
|
|
15
|
+
registeredWidgets: Array<GridWidget<any>>;
|
|
16
|
+
setupWidgetDynamicOutputs: OutputsType;
|
|
17
|
+
pickerData: import("@angular/core").InputSignal<WidgetPickerData | undefined>;
|
|
18
|
+
/**
|
|
19
|
+
* Collection of buckets to load available widgets from. Wildcards are also posssible:
|
|
20
|
+
* `[buckets]="['app.default', '*.public.*', 'app.no?.widgets']"`
|
|
21
|
+
*
|
|
22
|
+
* `*` represents any character 0-n times
|
|
23
|
+
* `?` represents exactly one character
|
|
24
|
+
*/
|
|
25
|
+
buckets: import("@angular/core").InputSignal<string[] | undefined>;
|
|
26
|
+
picked: import("@angular/core").OutputEmitterRef<void>;
|
|
27
|
+
canceled: import("@angular/core").OutputEmitterRef<void>;
|
|
28
|
+
constructor();
|
|
29
|
+
pick(widget: GridWidget<any>): void;
|
|
30
|
+
private onSetupConfigChange;
|
|
31
|
+
setupComponentSave(): void;
|
|
32
|
+
setupComponentCancel(): void;
|
|
33
|
+
cancel(): void;
|
|
34
|
+
reset(): void;
|
|
35
|
+
ngOnInit(): void;
|
|
36
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<WidgetPickerComponent, never>;
|
|
37
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<WidgetPickerComponent, "yuv-widget-picker", never, { "pickerData": { "alias": "pickerData"; "required": false; "isSignal": true; }; "buckets": { "alias": "buckets"; "required": false; "isSignal": true; }; }, { "picked": "picked"; "canceled": "canceled"; }, never, never, true, never>;
|
|
38
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { IWidgetComponent } from '../../widget-grid.interface';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class NoopComponent implements IWidgetComponent<any> {
|
|
4
|
+
widgetConfig: any;
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NoopComponent, never>;
|
|
6
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NoopComponent, "yuv-noop", never, { "widgetConfig": { "alias": "widgetConfig"; "required": false; }; }, {}, never, never, true, never>;
|
|
7
|
+
}
|