@yuuvis/client-framework 2.2.0 → 2.3.1

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.
Files changed (25) hide show
  1. package/fesm2022/yuuvis-client-framework-forms.mjs +22 -12
  2. package/fesm2022/yuuvis-client-framework-forms.mjs.map +1 -1
  3. package/fesm2022/yuuvis-client-framework-metadata-form-defaults.mjs +2 -2
  4. package/fesm2022/yuuvis-client-framework-metadata-form-defaults.mjs.map +1 -1
  5. package/fesm2022/yuuvis-client-framework-metadata-form.mjs +53 -21
  6. package/fesm2022/yuuvis-client-framework-metadata-form.mjs.map +1 -1
  7. package/fesm2022/yuuvis-client-framework-object-form.mjs +13 -7
  8. package/fesm2022/yuuvis-client-framework-object-form.mjs.map +1 -1
  9. package/fesm2022/yuuvis-client-framework-tile-list.mjs +8 -3
  10. package/fesm2022/yuuvis-client-framework-tile-list.mjs.map +1 -1
  11. package/fesm2022/yuuvis-client-framework.mjs +88 -2
  12. package/fesm2022/yuuvis-client-framework.mjs.map +1 -1
  13. package/forms/index.d.ts +1 -0
  14. package/forms/lib/elements/data-grid/data-grid/data-grid.component.d.ts +3 -1
  15. package/forms/lib/forms.utils.d.ts +4 -0
  16. package/index.d.ts +2 -0
  17. package/lib/services/snack-bar/snack-bar.interface.d.ts +14 -0
  18. package/lib/services/snack-bar/snack-bar.service.d.ts +22 -0
  19. package/metadata-form/lib/metadata-form-field/metadata-form-field.component.d.ts +2 -2
  20. package/metadata-form/lib/metadata-form-field/metadata-form-field.interface.d.ts +7 -1
  21. package/metadata-form/lib/object-metadata-element-label.directive.d.ts +16 -5
  22. package/object-form/lib/object-form-element/object-form-element.component.d.ts +1 -1
  23. package/object-form/lib/object-form.service.d.ts +2 -1
  24. package/package.json +4 -4
  25. package/tile-list/lib/tile-list/tile-list.component.d.ts +3 -1
@@ -1,6 +1,9 @@
1
1
  import * as i0 from '@angular/core';
2
- import { NgModule } from '@angular/core';
2
+ import { NgModule, inject, Injectable, signal, Component } from '@angular/core';
3
3
  import { CommonModule } from '@angular/common';
4
+ import { MatSnackBar, MatSnackBarRef, MAT_SNACK_BAR_DATA, MatSnackBarLabel, MatSnackBarActions, MatSnackBarAction } from '@angular/material/snack-bar';
5
+ import * as i1 from '@angular/material/button';
6
+ import { MatButtonModule } from '@angular/material/button';
4
7
 
5
8
  class YuuvisClientFrameworkModule {
6
9
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: YuuvisClientFrameworkModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
@@ -14,9 +17,92 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
14
17
  }]
15
18
  }] });
16
19
 
20
+ class SnackBarService {
21
+ #snackBar = inject(MatSnackBar);
22
+ info(message, action) {
23
+ return this.snack(message, { action, level: 'info' });
24
+ }
25
+ success(message, action) {
26
+ return this.snack(message, { action, level: 'success' });
27
+ }
28
+ warning(message, action) {
29
+ return this.snack(message, { action, level: 'warning' });
30
+ }
31
+ danger(message, action) {
32
+ return this.snack(message, { action, level: 'danger' });
33
+ }
34
+ snack(message, options) {
35
+ return this.#snackBar.openFromComponent(SnackBarComponent, {
36
+ data: {
37
+ level: options.level,
38
+ message,
39
+ action: options.action
40
+ },
41
+ duration: options.duration,
42
+ horizontalPosition: options.horizontalPosition,
43
+ verticalPosition: options.verticalPosition,
44
+ panelClass: ['yuv-snack-bar', 'level-' + options.level]
45
+ });
46
+ }
47
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SnackBarService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
48
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SnackBarService, providedIn: 'root' }); }
49
+ }
50
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SnackBarService, decorators: [{
51
+ type: Injectable,
52
+ args: [{
53
+ providedIn: 'root'
54
+ }]
55
+ }] });
56
+ class SnackBarComponent {
57
+ constructor() {
58
+ this.#snackBarRef = inject(MatSnackBarRef);
59
+ this.#snackData = inject(MAT_SNACK_BAR_DATA);
60
+ this.level = signal(this.#snackData.level);
61
+ this.message = signal(this.#snackData.message);
62
+ this.action = signal(this.#snackData.action);
63
+ }
64
+ #snackBarRef;
65
+ #snackData;
66
+ dismiss(withAction = false) {
67
+ if (withAction) {
68
+ this.#snackBarRef.dismissWithAction();
69
+ }
70
+ else if (!this.action()) {
71
+ this.#snackBarRef.dismiss();
72
+ }
73
+ }
74
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SnackBarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
75
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: SnackBarComponent, isStandalone: true, selector: "yuv-snack-bar-component", host: { properties: { "class.info": "level() === 'info'", "class.success": "level() === 'success'", "class.warning": "level() === 'warning'", "class.danger": "level() === 'danger'" } }, ngImport: i0, template: `
76
+ <span matSnackBarLabel (click)="dismiss()"> {{ message() }} </span>
77
+ @let a = action();
78
+ @if (a) {
79
+ <span matSnackBarActions>
80
+ <button mat-button matSnackBarAction (click)="dismiss(!!a)">{{ action() }}</button>
81
+ </span>
82
+ }
83
+ `, isInline: true, styles: [":host{display:flex}\n"], dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "directive", type: MatSnackBarLabel, selector: "[matSnackBarLabel]" }, { kind: "directive", type: MatSnackBarActions, selector: "[matSnackBarActions]" }, { kind: "directive", type: MatSnackBarAction, selector: "[matSnackBarAction]" }] }); }
84
+ }
85
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: SnackBarComponent, decorators: [{
86
+ type: Component,
87
+ args: [{ selector: 'yuv-snack-bar-component', template: `
88
+ <span matSnackBarLabel (click)="dismiss()"> {{ message() }} </span>
89
+ @let a = action();
90
+ @if (a) {
91
+ <span matSnackBarActions>
92
+ <button mat-button matSnackBarAction (click)="dismiss(!!a)">{{ action() }}</button>
93
+ </span>
94
+ }
95
+ `, imports: [MatButtonModule, MatSnackBarLabel, MatSnackBarActions, MatSnackBarAction], host: {
96
+ '[class.info]': "level() === 'info'",
97
+ '[class.success]': "level() === 'success'",
98
+ '[class.warning]': "level() === 'warning'",
99
+ '[class.danger]': "level() === 'danger'"
100
+ }, styles: [":host{display:flex}\n"] }]
101
+ }] });
102
+
17
103
  /**
18
104
  * Generated bundle index. Do not edit.
19
105
  */
20
106
 
21
- export { YuuvisClientFrameworkModule };
107
+ export { SnackBarComponent, SnackBarService, YuuvisClientFrameworkModule };
22
108
  //# sourceMappingURL=yuuvis-client-framework.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"yuuvis-client-framework.mjs","sources":["../../../../../libs/yuuvis/client-framework/src/lib/yuuvis-client-framework.module.ts","../../../../../libs/yuuvis/client-framework/src/yuuvis-client-framework.ts"],"sourcesContent":["import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\n@NgModule({\n imports: [CommonModule],\n})\nexport class YuuvisClientFrameworkModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MAMa,2BAA2B,CAAA;+GAA3B,2BAA2B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAA3B,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,2BAA2B,YAF5B,YAAY,CAAA,EAAA,CAAA,CAAA;AAEX,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,2BAA2B,YAF5B,YAAY,CAAA,EAAA,CAAA,CAAA;;4FAEX,2BAA2B,EAAA,UAAA,EAAA,CAAA;kBAHvC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,YAAY,CAAC;AACxB,iBAAA;;;ACLD;;AAEG;;;;"}
1
+ {"version":3,"file":"yuuvis-client-framework.mjs","sources":["../../../../../libs/yuuvis/client-framework/src/lib/yuuvis-client-framework.module.ts","../../../../../libs/yuuvis/client-framework/src/lib/services/snack-bar/snack-bar.service.ts","../../../../../libs/yuuvis/client-framework/src/yuuvis-client-framework.ts"],"sourcesContent":["import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\n@NgModule({\n imports: [CommonModule],\n})\nexport class YuuvisClientFrameworkModule {}\n","import { Component, inject, Injectable, signal } from '@angular/core';\nimport { MAT_SNACK_BAR_DATA, MatSnackBar, MatSnackBarAction, MatSnackBarActions, MatSnackBarLabel, MatSnackBarRef } from '@angular/material/snack-bar';\nimport { SnackBarData, SnackBarLevel, SnackBarOptions } from './snack-bar.interface';\nimport { MatButtonModule } from '@angular/material/button';\n@Injectable({\n providedIn: 'root'\n})\nexport class SnackBarService {\n #snackBar = inject(MatSnackBar);\n\n info(message: string, action?: string): MatSnackBarRef<SnackBarComponent> {\n return this.snack(message, { action, level: 'info' });\n }\n\n success(message: string, action?: string): MatSnackBarRef<SnackBarComponent> {\n return this.snack(message, { action, level: 'success' });\n }\n\n warning(message: string, action?: string): MatSnackBarRef<SnackBarComponent> {\n return this.snack(message, { action, level: 'warning' });\n }\n\n danger(message: string, action?: string): MatSnackBarRef<SnackBarComponent> {\n return this.snack(message, { action, level: 'danger' });\n }\n\n snack(message: string, options: SnackBarOptions): MatSnackBarRef<SnackBarComponent> {\n return this.#snackBar.openFromComponent(SnackBarComponent, {\n data: {\n level: options.level,\n message,\n action: options.action\n },\n duration: options.duration,\n horizontalPosition: options.horizontalPosition,\n verticalPosition: options.verticalPosition,\n panelClass: ['yuv-snack-bar', 'level-' + options.level]\n });\n }\n}\n\n@Component({\n selector: 'yuv-snack-bar-component',\n template: `\n <span matSnackBarLabel (click)=\"dismiss()\"> {{ message() }} </span>\n @let a = action();\n @if (a) {\n <span matSnackBarActions>\n <button mat-button matSnackBarAction (click)=\"dismiss(!!a)\">{{ action() }}</button>\n </span>\n }\n `,\n styles: `\n :host {\n display: flex;\n }\n `,\n imports: [MatButtonModule, MatSnackBarLabel, MatSnackBarActions, MatSnackBarAction],\n host: {\n '[class.info]': \"level() === 'info'\",\n '[class.success]': \"level() === 'success'\",\n '[class.warning]': \"level() === 'warning'\",\n '[class.danger]': \"level() === 'danger'\"\n }\n})\nexport class SnackBarComponent {\n #snackBarRef = inject(MatSnackBarRef);\n #snackData = inject<SnackBarData>(MAT_SNACK_BAR_DATA);\n level = signal<SnackBarLevel>(this.#snackData.level);\n message = signal<string>(this.#snackData.message);\n action = signal<string | undefined>(this.#snackData.action);\n\n dismiss(withAction = false) {\n if (withAction) {\n this.#snackBarRef.dismissWithAction();\n } else if (!this.action()) {\n this.#snackBarRef.dismiss();\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;MAMa,2BAA2B,CAAA;+GAA3B,2BAA2B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAA3B,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,E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;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,yBAAyB,EACzB,QAAA,EAAA;;;;;;;;GAQT,EAMQ,OAAA,EAAA,CAAC,eAAe,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,iBAAiB,CAAC,EAC7E,IAAA,EAAA;AACJ,wBAAA,cAAc,EAAE,oBAAoB;AACpC,wBAAA,iBAAiB,EAAE,uBAAuB;AAC1C,wBAAA,iBAAiB,EAAE,uBAAuB;AAC1C,wBAAA,gBAAgB,EAAE;AACnB,qBAAA,EAAA,MAAA,EAAA,CAAA,uBAAA,CAAA,EAAA;;;AC/DH;;AAEG;;;;"}
package/forms/index.d.ts CHANGED
@@ -11,3 +11,4 @@ export * from './lib/elements/range-select-date/range-select-date.interface';
11
11
  export * from './lib/elements/range-select-filesize/range-select-filesize.component';
12
12
  export * from './lib/elements/range-select-filesize/range-select-filesize.interface';
13
13
  export * from './lib/elements/catalog/catalog.component';
14
+ export * from './lib/forms.utils';
@@ -2,6 +2,7 @@ import { ChangeDetectorRef, ElementRef } from '@angular/core';
2
2
  import { ControlValueAccessor, Validator } from '@angular/forms';
3
3
  import { ObjectFormControl, Situation, TranslateService } from '@yuuvis/client-core';
4
4
  import { DataGridSizeType } from '../model/data-grid.interface';
5
+ import { MetadataFormFieldContext } from '@yuuvis/client-framework/metadata-form';
5
6
  import * as i0 from "@angular/core";
6
7
  export declare class DataGridComponent implements ControlValueAccessor, Validator {
7
8
  #private;
@@ -13,6 +14,7 @@ export declare class DataGridComponent implements ControlValueAccessor, Validato
13
14
  formControl: import("@angular/core").InputSignal<any>;
14
15
  classifications: import("@angular/core").InputSignal<string[]>;
15
16
  readonly: import("@angular/core").InputSignal<boolean>;
17
+ formFieldContext: import("@angular/core").InputSignal<MetadataFormFieldContext | undefined>;
16
18
  size: import("@angular/core").InputSignal<DataGridSizeType>;
17
19
  displayedColumns: import("@angular/core").WritableSignal<any[]>;
18
20
  displayedColumnsWithActions: import("@angular/core").WritableSignal<string[]>;
@@ -41,5 +43,5 @@ export declare class DataGridComponent implements ControlValueAccessor, Validato
41
43
  validate(control: ObjectFormControl): null;
42
44
  onHostFocusOut(ev: FocusEvent): void;
43
45
  static ɵfac: i0.ɵɵFactoryDeclaration<DataGridComponent, never>;
44
- static ɵcmp: i0.ɵɵComponentDeclaration<DataGridComponent, "yuv-data-grid", never, { "situation": { "alias": "situation"; "required": false; "isSignal": true; }; "formElement": { "alias": "formElement"; "required": false; "isSignal": true; }; "formControl": { "alias": "formControl"; "required": false; "isSignal": true; }; "classifications": { "alias": "classifications"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
46
+ static ɵcmp: i0.ɵɵComponentDeclaration<DataGridComponent, "yuv-data-grid", never, { "situation": { "alias": "situation"; "required": false; "isSignal": true; }; "formElement": { "alias": "formElement"; "required": false; "isSignal": true; }; "formControl": { "alias": "formControl"; "required": false; "isSignal": true; }; "classifications": { "alias": "classifications"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "formFieldContext": { "alias": "formFieldContext"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
45
47
  }
@@ -0,0 +1,4 @@
1
+ import { AbstractControl } from "@angular/forms";
2
+ export declare class FormUtils {
3
+ static getErrorState(control: AbstractControl): boolean;
4
+ }
package/index.d.ts CHANGED
@@ -1 +1,3 @@
1
1
  export * from './lib/yuuvis-client-framework.module';
2
+ export * from './lib/services/snack-bar/snack-bar.service';
3
+ export * from './lib/services/snack-bar/snack-bar.interface';
@@ -0,0 +1,14 @@
1
+ import { MatSnackBarHorizontalPosition, MatSnackBarVerticalPosition } from "@angular/material/snack-bar";
2
+ export type SnackBarLevel = 'info' | 'success' | 'warning' | 'danger';
3
+ export interface SnackBarData {
4
+ level: SnackBarLevel;
5
+ message: string;
6
+ action?: string;
7
+ }
8
+ export interface SnackBarOptions {
9
+ duration?: number;
10
+ horizontalPosition?: MatSnackBarHorizontalPosition;
11
+ verticalPosition?: MatSnackBarVerticalPosition;
12
+ action?: string;
13
+ level?: SnackBarLevel;
14
+ }
@@ -0,0 +1,22 @@
1
+ import { MatSnackBarRef } from '@angular/material/snack-bar';
2
+ import { SnackBarLevel, SnackBarOptions } from './snack-bar.interface';
3
+ import * as i0 from "@angular/core";
4
+ export declare class SnackBarService {
5
+ #private;
6
+ info(message: string, action?: string): MatSnackBarRef<SnackBarComponent>;
7
+ success(message: string, action?: string): MatSnackBarRef<SnackBarComponent>;
8
+ warning(message: string, action?: string): MatSnackBarRef<SnackBarComponent>;
9
+ danger(message: string, action?: string): MatSnackBarRef<SnackBarComponent>;
10
+ snack(message: string, options: SnackBarOptions): MatSnackBarRef<SnackBarComponent>;
11
+ static ɵfac: i0.ɵɵFactoryDeclaration<SnackBarService, never>;
12
+ static ɵprov: i0.ɵɵInjectableDeclaration<SnackBarService>;
13
+ }
14
+ export declare class SnackBarComponent {
15
+ #private;
16
+ level: import("@angular/core").WritableSignal<SnackBarLevel>;
17
+ message: import("@angular/core").WritableSignal<string>;
18
+ action: import("@angular/core").WritableSignal<string | undefined>;
19
+ dismiss(withAction?: boolean): void;
20
+ static ɵfac: i0.ɵɵFactoryDeclaration<SnackBarComponent, never>;
21
+ static ɵcmp: i0.ɵɵComponentDeclaration<SnackBarComponent, "yuv-snack-bar-component", never, {}, {}, never, never, true, never>;
22
+ }
@@ -1,7 +1,7 @@
1
1
  import { TemplateRef } from '@angular/core';
2
2
  import { ObjectTypeField } from '@yuuvis/client-core';
3
- import { MetadataFormFieldContext } from './metadata-form-field.interface';
4
3
  import { Subject } from 'rxjs';
4
+ import { MetadataFormFieldContext, ParentFormChangedEvent } from './metadata-form-field.interface';
5
5
  import * as i0 from "@angular/core";
6
6
  import * as i1 from "@yuuvis/client-framework/common";
7
7
  /**
@@ -13,7 +13,7 @@ export declare class MetadataFormFieldComponent {
13
13
  #private;
14
14
  elementTemplate: import("@angular/core").WritableSignal<TemplateRef<any> | undefined>;
15
15
  readonly: boolean;
16
- formChangedSubject: import("@angular/core").InputSignal<Subject<void> | undefined>;
16
+ formChangedSubject: import("@angular/core").InputSignal<Subject<ParentFormChangedEvent> | undefined>;
17
17
  formField: import("@angular/core").InputSignal<ObjectTypeField>;
18
18
  context: import("@angular/core").Signal<MetadataFormFieldContext>;
19
19
  /**
@@ -9,5 +9,11 @@ export interface MetadataFormFieldContext {
9
9
  situation: string;
10
10
  field: ObjectTypeField;
11
11
  ctrl?: AbstractControl<any, any>;
12
- formChangedSubject?: Subject<void>;
12
+ formChangedSubject?: Subject<ParentFormChangedEvent>;
13
+ }
14
+ export interface ParentFormChangedEvent {
15
+ invalid: boolean;
16
+ dirty: boolean;
17
+ indexdataChanged: boolean;
18
+ data?: any;
13
19
  }
@@ -1,18 +1,29 @@
1
- import { OnInit } from '@angular/core';
1
+ import { AfterViewInit, OnInit } from '@angular/core';
2
2
  import { MetadataFormFieldContext } from './metadata-form-field/metadata-form-field.interface';
3
3
  import * as i0 from "@angular/core";
4
4
  /**
5
5
  * Directive to apply styles to an object metadata element label based on its control status.
6
- * Depending on the state of the control (dirty, error), it will add or remove specific classes
7
- * to the label element. Thes clases could then be used to style the label accordingly.
6
+ * Depending on the state of the control (dirty, error, required), it will add or remove specific classes
7
+ * to the label element. These classes could then be used to style the label accordingly.
8
+ *
9
+ * Could be placed on any HTML element, but is primarily intended for use on `<mat-label>` or `<label>` elements.
10
+ * If you would like to use it on any other element, make sure to add the class 'label' to it.
8
11
  *
9
12
  * @example
10
- * <mat-label [yuvObjectMetadataElementLabel]="myControl">My Label</mat-label>
13
+ * <mat-label [yuvObjectMetadataElementLabel]="ctx">My Label</mat-label>
14
+ * <label [yuvObjectMetadataElementLabel]="ctx">My Label</label>
15
+ * <div class="label" [yuvObjectMetadataElementLabel]="ctx">My Label</div>
11
16
  */
12
- export declare class ObjectMetadataElementLabelDirective implements OnInit {
17
+ export declare class ObjectMetadataElementLabelDirective implements OnInit, AfterViewInit {
13
18
  #private;
19
+ state: import("@angular/core").WritableSignal<{
20
+ dirty: boolean;
21
+ required: boolean;
22
+ invalid: boolean;
23
+ }>;
14
24
  yuvObjectMetadataElementLabel: import("@angular/core").InputSignal<MetadataFormFieldContext | undefined>;
15
25
  ngOnInit(): void;
26
+ ngAfterViewInit(): void;
16
27
  static ɵfac: i0.ɵɵFactoryDeclaration<ObjectMetadataElementLabelDirective, never>;
17
28
  static ɵdir: i0.ɵɵDirectiveDeclaration<ObjectMetadataElementLabelDirective, "[yuvObjectMetadataElementLabel]", never, { "yuvObjectMetadataElementLabel": { "alias": "yuvObjectMetadataElementLabel"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
18
29
  }
@@ -7,7 +7,7 @@ import * as i0 from "@angular/core";
7
7
  export declare class ObjectFormElementComponent {
8
8
  #private;
9
9
  createForm: import("@angular/core").WritableSignal<boolean>;
10
- formChangedSubject: import("rxjs").Subject<void>;
10
+ formChangedSubject: import("rxjs").Subject<import("@yuuvis/client-framework/object-form").FormStatusChangedEvent>;
11
11
  formControlName?: string;
12
12
  formElementRef: any;
13
13
  errors?: string[];
@@ -2,13 +2,14 @@ import { Type } from '@angular/core';
2
2
  import { ObjectFormControlWrapper, ObjectFormGroup } from '@yuuvis/client-core';
3
3
  import { IObjectFormElementExtension, ObjectFormElementExtension } from './object-form-extension.interface';
4
4
  import { Subject } from 'rxjs';
5
+ import { FormStatusChangedEvent } from './object-form.interface';
5
6
  import * as i0 from "@angular/core";
6
7
  /**
7
8
  * @ignore
8
9
  */
9
10
  export declare class ObjectFormService {
10
11
  #private;
11
- formStatusChanged: Subject<void>;
12
+ formChanged: Subject<FormStatusChangedEvent>;
12
13
  setElementExtensions(formExtensions: IObjectFormElementExtension[]): void;
13
14
  getElementExtensions(propertyName: string): Type<ObjectFormElementExtension>[];
14
15
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yuuvis/client-framework",
3
- "version": "2.2.0",
3
+ "version": "2.3.1",
4
4
  "author": "OPTIMAL SYSTEMS GmbH <npm@optimal-systems.de>",
5
5
  "license": "MIT",
6
6
  "peerDependencies": {
@@ -8,15 +8,15 @@
8
8
  "@angular/common": "^19.2.1",
9
9
  "@angular/core": "^19.2.1",
10
10
  "angular-gridster2": "^19.0.0",
11
- "@yuuvis/client-core": "^2.2.0",
12
- "@yuuvis/client-shell-core": "^2.2.0",
11
+ "@yuuvis/client-core": "^2.3.1",
12
+ "@yuuvis/client-shell-core": "^2.3.1",
13
13
  "ng-dynamic-component": "^10.8.2",
14
14
  "modern-normalize": "^3.0.1"
15
15
  },
16
16
  "dependencies": {
17
17
  "@angular/material": "^19.2.15",
18
18
  "@ngrx/signals": "^19.2.0",
19
- "@yuuvis/material": "2.2.0",
19
+ "@yuuvis/material": "2.3.1",
20
20
  "@yuuvis/media-viewer": "^2.0.7",
21
21
  "angular-split": "^19.0.0",
22
22
  "tslib": "^2.3.0"
@@ -66,6 +66,8 @@ export declare class TileListComponent implements OnInit, OnDestroy {
66
66
  preselect: import("@angular/core").InputSignal<string[]>;
67
67
  highlights: import("@angular/core").InputSignal<TileListHighlight[] | null>;
68
68
  highlightStyles: import("@angular/core").Signal<Record<string, Record<string, unknown>>>;
69
+ checkForPendingChanges: import("@angular/core").InputSignal<boolean>;
70
+ preventChangeUntil: import("@angular/core").InputSignal<() => boolean | void>;
69
71
  /**
70
72
  * Emitted when a list item has been selected
71
73
  */
@@ -114,5 +116,5 @@ export declare class TileListComponent implements OnInit, OnDestroy {
114
116
  ngOnInit(): void;
115
117
  ngOnDestroy(): void;
116
118
  static ɵfac: i0.ɵɵFactoryDeclaration<TileListComponent, never>;
117
- static ɵcmp: i0.ɵɵComponentDeclaration<TileListComponent, "yuv-tile-list", never, { "bucket": { "alias": "bucket"; "required": false; "isSignal": true; }; "pageSize": { "alias": "pageSize"; "required": false; "isSignal": true; }; "multiselect": { "alias": "multiselect"; "required": false; "isSignal": true; }; "options": { "alias": "options"; "required": false; "isSignal": true; }; "flavor": { "alias": "flavor"; "required": false; "isSignal": true; }; "query": { "alias": "query"; "required": false; "isSignal": true; }; "preselect": { "alias": "preselect"; "required": false; "isSignal": true; }; "highlights": { "alias": "highlights"; "required": false; "isSignal": true; }; }, { "itemSelect": "itemSelect"; "tileCopy": "tileCopy"; "tileCut": "tileCut"; "busy": "busy"; "queryResult": "queryResult"; "selectionChange": "selectionChange"; "itemDblClick": "itemDblClick"; "ctxMenu": "ctxMenu"; }, ["emptyContent"], ["*"], true, never>;
119
+ static ɵcmp: i0.ɵɵComponentDeclaration<TileListComponent, "yuv-tile-list", never, { "bucket": { "alias": "bucket"; "required": false; "isSignal": true; }; "pageSize": { "alias": "pageSize"; "required": false; "isSignal": true; }; "multiselect": { "alias": "multiselect"; "required": false; "isSignal": true; }; "options": { "alias": "options"; "required": false; "isSignal": true; }; "flavor": { "alias": "flavor"; "required": false; "isSignal": true; }; "query": { "alias": "query"; "required": false; "isSignal": true; }; "preselect": { "alias": "preselect"; "required": false; "isSignal": true; }; "highlights": { "alias": "highlights"; "required": false; "isSignal": true; }; "checkForPendingChanges": { "alias": "checkForPendingChanges"; "required": false; "isSignal": true; }; "preventChangeUntil": { "alias": "preventChangeUntil"; "required": false; "isSignal": true; }; }, { "itemSelect": "itemSelect"; "tileCopy": "tileCopy"; "tileCut": "tileCut"; "busy": "busy"; "queryResult": "queryResult"; "selectionChange": "selectionChange"; "itemDblClick": "itemDblClick"; "ctxMenu": "ctxMenu"; }, ["emptyContent"], ["*"], true, never>;
118
120
  }