@suntelecoms/ngx-dynamic-form 1.2.8 → 1.2.9
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/README.md +127 -138
- package/fesm2022/suntelecoms-ngx-dynamic-form.mjs +75 -32
- package/fesm2022/suntelecoms-ngx-dynamic-form.mjs.map +1 -1
- package/lib/components/form-builder/form-builder.component.d.ts +1 -0
- package/lib/components/form-loader/form-loader.component.d.ts +3 -3
- package/lib/models/saved-form.model.d.ts +2 -0
- package/lib/services/form-config.service.d.ts +4 -3
- package/lib/storage/form-storage.adapter.d.ts +3 -1
- package/lib/storage/http-storage.adapter.d.ts +3 -1
- package/lib/storage/local-storage.adapter.d.ts +3 -1
- package/package.json +1 -1
|
@@ -34,6 +34,7 @@ export declare class FormBuilderComponent {
|
|
|
34
34
|
stepperShowSummary: import("@angular/core").WritableSignal<boolean>;
|
|
35
35
|
formAppearance: import("@angular/core").WritableSignal<"outline" | "fill" | "simple">;
|
|
36
36
|
formFloatLabel: import("@angular/core").WritableSignal<"auto" | "always">;
|
|
37
|
+
formCode: import("@angular/core").WritableSignal<string>;
|
|
37
38
|
currentId: import("@angular/core").WritableSignal<string | null>;
|
|
38
39
|
showExport: import("@angular/core").WritableSignal<boolean>;
|
|
39
40
|
exportContent: import("@angular/core").WritableSignal<string>;
|
|
@@ -4,7 +4,7 @@ import type { AnyFormConfig } from '../../models/saved-form.model';
|
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
export declare class FormLoaderComponent implements OnInit {
|
|
6
6
|
/** Passé directement si le composant est utilisé sans ActivatedRoute */
|
|
7
|
-
|
|
7
|
+
formCode?: string;
|
|
8
8
|
/** Route du lien "Retour" */
|
|
9
9
|
backRoute: string;
|
|
10
10
|
/** Route vers le builder */
|
|
@@ -15,7 +15,7 @@ export declare class FormLoaderComponent implements OnInit {
|
|
|
15
15
|
flatConfig: import("@angular/core").Signal<DynamicFormConfig | null>;
|
|
16
16
|
stepperConfig: import("@angular/core").Signal<StepperFormConfig | null>;
|
|
17
17
|
formTitle: import("@angular/core").WritableSignal<string>;
|
|
18
|
-
|
|
18
|
+
schemaCode: import("@angular/core").WritableSignal<string>;
|
|
19
19
|
submitted: import("@angular/core").WritableSignal<boolean>;
|
|
20
20
|
submitData: import("@angular/core").WritableSignal<Record<string, unknown>>;
|
|
21
21
|
notFound: import("@angular/core").WritableSignal<boolean>;
|
|
@@ -23,5 +23,5 @@ export declare class FormLoaderComponent implements OnInit {
|
|
|
23
23
|
onSubmit(event: DynamicFormSubmitEvent): void;
|
|
24
24
|
reset(): void;
|
|
25
25
|
static ɵfac: i0.ɵɵFactoryDeclaration<FormLoaderComponent, never>;
|
|
26
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<FormLoaderComponent, "ngx-form-loader", never, { "
|
|
26
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FormLoaderComponent, "ngx-form-loader", never, { "formCode": { "alias": "formCode"; "required": false; }; "backRoute": { "alias": "backRoute"; "required": false; }; "builderRoute": { "alias": "builderRoute"; "required": false; }; }, {}, never, never, true, never>;
|
|
27
27
|
}
|
|
@@ -2,7 +2,9 @@ import type { DynamicFormConfig, StepperFormConfig } from './form-field.model';
|
|
|
2
2
|
export type AnyFormConfig = DynamicFormConfig | StepperFormConfig;
|
|
3
3
|
export interface SavedFormSchema {
|
|
4
4
|
id: string;
|
|
5
|
+
code: string;
|
|
5
6
|
title: string;
|
|
6
7
|
config: AnyFormConfig;
|
|
8
|
+
createdAt: string;
|
|
7
9
|
updatedAt: string;
|
|
8
10
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Observable } from 'rxjs';
|
|
2
|
-
import type { SavedFormSchema } from '../models/saved-form.model';
|
|
3
|
-
import type { AnyFormConfig } from '../models/saved-form.model';
|
|
2
|
+
import type { SavedFormSchema, AnyFormConfig } from '../models/saved-form.model';
|
|
4
3
|
import * as i0 from "@angular/core";
|
|
5
4
|
export declare class FormConfigService {
|
|
6
5
|
private adapter;
|
|
@@ -8,7 +7,9 @@ export declare class FormConfigService {
|
|
|
8
7
|
readonly schemas: import("@angular/core").Signal<SavedFormSchema[]>;
|
|
9
8
|
constructor();
|
|
10
9
|
get(id: string): SavedFormSchema | null;
|
|
11
|
-
|
|
10
|
+
getByCode(code: string): SavedFormSchema | null;
|
|
11
|
+
create(code: string, title: string, config: AnyFormConfig): Observable<SavedFormSchema>;
|
|
12
|
+
update(schema: SavedFormSchema, title: string, config: AnyFormConfig): Observable<SavedFormSchema>;
|
|
12
13
|
delete(id: string): Observable<void>;
|
|
13
14
|
generateId(): string;
|
|
14
15
|
static ɵfac: i0.ɵɵFactoryDeclaration<FormConfigService, never>;
|
|
@@ -3,7 +3,9 @@ import type { SavedFormSchema } from '../models/saved-form.model';
|
|
|
3
3
|
export declare abstract class FormStorageAdapter {
|
|
4
4
|
abstract list(): Observable<SavedFormSchema[]>;
|
|
5
5
|
abstract get(id: string): Observable<SavedFormSchema | null>;
|
|
6
|
-
abstract
|
|
6
|
+
abstract getByCode(code: string): Observable<SavedFormSchema | null>;
|
|
7
|
+
abstract create(schema: Omit<SavedFormSchema, 'id'>): Observable<SavedFormSchema>;
|
|
8
|
+
abstract update(schema: SavedFormSchema): Observable<SavedFormSchema>;
|
|
7
9
|
abstract delete(id: string): Observable<void>;
|
|
8
10
|
generateId(): string;
|
|
9
11
|
}
|
|
@@ -9,7 +9,9 @@ export declare class HttpStorageAdapter extends FormStorageAdapter {
|
|
|
9
9
|
private apiUrl;
|
|
10
10
|
list(): Observable<SavedFormSchema[]>;
|
|
11
11
|
get(id: string): Observable<SavedFormSchema | null>;
|
|
12
|
-
|
|
12
|
+
getByCode(code: string): Observable<SavedFormSchema | null>;
|
|
13
|
+
create(schema: Omit<SavedFormSchema, 'id'>): Observable<SavedFormSchema>;
|
|
14
|
+
update(schema: SavedFormSchema): Observable<SavedFormSchema>;
|
|
13
15
|
delete(id: string): Observable<void>;
|
|
14
16
|
static ɵfac: i0.ɵɵFactoryDeclaration<HttpStorageAdapter, never>;
|
|
15
17
|
static ɵprov: i0.ɵɵInjectableDeclaration<HttpStorageAdapter>;
|
|
@@ -5,7 +5,9 @@ import * as i0 from "@angular/core";
|
|
|
5
5
|
export declare class LocalStorageAdapter extends FormStorageAdapter {
|
|
6
6
|
list(): Observable<SavedFormSchema[]>;
|
|
7
7
|
get(id: string): Observable<SavedFormSchema | null>;
|
|
8
|
-
|
|
8
|
+
getByCode(code: string): Observable<SavedFormSchema | null>;
|
|
9
|
+
create(schema: Omit<SavedFormSchema, 'id'>): Observable<SavedFormSchema>;
|
|
10
|
+
update(schema: SavedFormSchema): Observable<SavedFormSchema>;
|
|
9
11
|
delete(id: string): Observable<void>;
|
|
10
12
|
private _read;
|
|
11
13
|
private _write;
|
package/package.json
CHANGED