@myrtex-org/form 1.0.32 → 1.0.33
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/esm2022/lib/modules/object-form/components/elements/base/base-field/base-field.component.mjs +10 -1
- package/esm2022/lib/modules/object-form/components/elements/input/checkbox-group/input-checkbox-group.component.mjs +3 -3
- package/esm2022/lib/modules/object-form/components/elements/input/date/input-date.component.mjs +3 -3
- package/esm2022/lib/modules/object-form/components/elements/input/file/input-file.component.mjs +3 -3
- package/esm2022/lib/modules/object-form/components/elements/input/inn/input-inn.component.mjs +3 -3
- package/esm2022/lib/modules/object-form/components/elements/input/link/input-link.component.mjs +3 -3
- package/esm2022/lib/modules/object-form/components/elements/input/number/input-number.component.mjs +3 -3
- package/esm2022/lib/modules/object-form/components/elements/input/phone/input-phone.component.mjs +3 -3
- package/esm2022/lib/modules/object-form/components/elements/input/radio-group/input-radio-group.component.mjs +3 -3
- package/esm2022/lib/modules/object-form/components/elements/input/select/input-select.component.mjs +3 -3
- package/esm2022/lib/modules/object-form/components/elements/input/switch/input-switch.component.mjs +3 -3
- package/esm2022/lib/modules/object-form/components/elements/input/table/input-table.component.mjs +12 -3
- package/esm2022/lib/modules/object-form/components/elements/input/text/input-text.component.mjs +3 -3
- package/esm2022/lib/modules/object-form/components/elements/input/textarea/input-textarea.component.mjs +3 -3
- package/esm2022/lib/modules/object-form/components/object-form-content/object-form-content.component.mjs +3 -6
- package/esm2022/lib/modules/object-form/constants.mjs +2 -1
- package/esm2022/lib/modules/object-form/helpers/get-menu-model.mjs +3 -2
- package/esm2022/lib/modules/object-form/services/object-form.service.mjs +13 -9
- package/esm2022/lib/modules/object-form/store/object-form.actions.mjs +2 -1
- package/esm2022/lib/modules/object-form/store/object-form.effects.mjs +20 -16
- package/esm2022/lib/modules/object-form/store/object-form.reducers.mjs +6 -5
- package/esm2022/lib/modules/object-form/store/object-form.selector.mjs +12 -1
- package/esm2022/lib/modules/object-form/store/object-form.state.mjs +2 -1
- package/esm2022/lib/modules/shared-form/helpers/common.helpers.mjs +4 -1
- package/esm2022/lib/modules/shared-form/store/shared-form.selector.mjs +3 -2
- package/fesm2022/myrtex-org-form.mjs +115 -72
- package/fesm2022/myrtex-org-form.mjs.map +1 -1
- package/lib/modules/object-form/components/elements/base/base-field/base-field.component.d.ts +2 -0
- package/lib/modules/object-form/components/elements/input/table/input-table.component.d.ts +2 -0
- package/lib/modules/object-form/components/object-form-content/object-form-content.component.d.ts +0 -1
- package/lib/modules/object-form/constants.d.ts +1 -0
- package/lib/modules/object-form/helpers/get-menu-model.d.ts +1 -1
- package/lib/modules/object-form/services/object-form.service.d.ts +5 -4
- package/lib/modules/object-form/store/object-form.actions.d.ts +7 -0
- package/lib/modules/object-form/store/object-form.effects.d.ts +4 -1
- package/lib/modules/object-form/store/object-form.selector.d.ts +2 -0
- package/lib/modules/object-form/store/object-form.state.d.ts +1 -0
- package/lib/modules/shared-form/helpers/common.helpers.d.ts +1 -0
- package/lib/modules/shared-form/store/shared-form.selector.d.ts +1 -0
- package/package.json +1 -1
package/lib/modules/object-form/components/elements/base/base-field/base-field.component.d.ts
CHANGED
|
@@ -15,6 +15,7 @@ export declare abstract class BaseFieldComponent<TModel extends ComponentModelBa
|
|
|
15
15
|
private _changeSubject$;
|
|
16
16
|
private _autoSaveStore;
|
|
17
17
|
private _isCheckRequired;
|
|
18
|
+
private _canEditObject;
|
|
18
19
|
model: ComponentValueModel;
|
|
19
20
|
settings: TModel;
|
|
20
21
|
manualValues: ValueModel[];
|
|
@@ -27,6 +28,7 @@ export declare abstract class BaseFieldComponent<TModel extends ComponentModelBa
|
|
|
27
28
|
get autosaveFields(): Field[];
|
|
28
29
|
get getInvalid(): boolean;
|
|
29
30
|
get getInvalidMessage(): string;
|
|
31
|
+
get disabled(): boolean;
|
|
30
32
|
private _requiredValidate;
|
|
31
33
|
protected _initSubscriptionForValue(): void;
|
|
32
34
|
protected _updateValue(): void;
|
|
@@ -14,6 +14,7 @@ export declare class InputTableComponent implements OnInit, OnDestroy {
|
|
|
14
14
|
private _changeSubject$;
|
|
15
15
|
private _subscriptions$;
|
|
16
16
|
private _isCheckRequired;
|
|
17
|
+
private _canEditObject;
|
|
17
18
|
model: TableValueModel;
|
|
18
19
|
settings: InputTableModel;
|
|
19
20
|
dataSource: {
|
|
@@ -29,6 +30,7 @@ export declare class InputTableComponent implements OnInit, OnDestroy {
|
|
|
29
30
|
ngOnDestroy(): void;
|
|
30
31
|
createRow(): void;
|
|
31
32
|
deleteRow(event: any): void;
|
|
33
|
+
get disabled(): boolean;
|
|
32
34
|
editRow(event: any): void;
|
|
33
35
|
getFormat(component: ComponentModelBase): "" | "dd.MM.yyyy hh:mm" | "dd.MM.yyyy";
|
|
34
36
|
getDataType(component: ComponentModelBase): "date" | "string";
|
package/lib/modules/object-form/components/object-form-content/object-form-content.component.d.ts
CHANGED
|
@@ -5,7 +5,6 @@ import * as i0 from "@angular/core";
|
|
|
5
5
|
export declare class ApplicationContent {
|
|
6
6
|
private _store;
|
|
7
7
|
sectionSettings$: Observable<SectionModel | null>;
|
|
8
|
-
changeCheckRequiredState(): void;
|
|
9
8
|
componentValueChanged(model: ComponentValueModel | ComponentValueModel[]): void;
|
|
10
9
|
static ɵfac: i0.ɵɵFactoryDeclaration<ApplicationContent, never>;
|
|
11
10
|
static ɵcmp: i0.ɵɵComponentDeclaration<ApplicationContent, "app-object-form-content", never, {}, {}, never, never, false, never>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export declare const STATE_NAME = "object-form";
|
|
2
2
|
export declare const OBJECT_ID_NAME = "objectId";
|
|
3
|
+
export declare const OBJECT_VERSION_ID_NAME = "versionId";
|
|
3
4
|
export declare const SECTION_SYS_NAME_NAME = "sectionSysName";
|
|
4
5
|
export declare const TEMPLATE_SYS_NAME_NAME = "templateSysName";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { MenuAdminModel } from '@myrtex-org/templates';
|
|
2
2
|
import { TemplateModel, SectionValueModel } from '../models';
|
|
3
|
-
export declare const getMenuModel: (apiPrefix: string, settings: TemplateModel | null, sectionValues: SectionValueModel[], applicationId: string) => MenuAdminModel;
|
|
3
|
+
export declare const getMenuModel: (apiPrefix: string, settings: TemplateModel | null, sectionValues: SectionValueModel[], applicationId: string, versionId?: string | number | null) => MenuAdminModel;
|
|
4
4
|
export declare const getPreviewMenuModel: (apiPrefix: string, settings: TemplateModel | null, templateSysName: string) => MenuAdminModel;
|
|
@@ -12,17 +12,18 @@ export declare class ObjectFormService {
|
|
|
12
12
|
getTemplate(objectId: string): Observable<{
|
|
13
13
|
templateSysName: string;
|
|
14
14
|
}>;
|
|
15
|
-
getSectionValues(applicationId: string): Observable<ObjectValuesDto>;
|
|
15
|
+
getSectionValues(applicationId: string, versionId?: string | number | null): Observable<ObjectValuesDto>;
|
|
16
16
|
getTemplateSettings(templateSysName: string): Observable<TemplateModel>;
|
|
17
|
-
updateApplicationValues(applicationId: string, sectionValues: SectionValueModel[]): Observable<UpdateValueResult>;
|
|
18
|
-
saveApplication(applicationId: string): Observable<void>;
|
|
17
|
+
updateApplicationValues(applicationId: string, sectionValues: SectionValueModel[], versionId?: string | number | null): Observable<UpdateValueResult>;
|
|
18
|
+
saveApplication(applicationId: string, versionId?: string | number | null): Observable<void>;
|
|
19
19
|
copyApplication(copyCommand: {
|
|
20
20
|
sourceId: string;
|
|
21
21
|
targetTemplateSysName: string;
|
|
22
22
|
}): Observable<{
|
|
23
23
|
id: string;
|
|
24
24
|
}>;
|
|
25
|
-
getSectionFiles(applicationId: string, sectionSysName: string): Observable<FileModel[]>;
|
|
25
|
+
getSectionFiles(applicationId: string, sectionSysName: string, versionId?: string | number | null): Observable<FileModel[]>;
|
|
26
|
+
canEditObject(applicationId: string, versionId?: string | number | null): Observable<boolean>;
|
|
26
27
|
private getHeaders;
|
|
27
28
|
private mapResult;
|
|
28
29
|
static ɵfac: i0.ɵɵFactoryDeclaration<ObjectFormService, never>;
|
|
@@ -9,6 +9,7 @@ export declare enum EApplicationActions {
|
|
|
9
9
|
LoadObjectPending = "[Object Form] Load Object Pending",
|
|
10
10
|
LoadObjectSuccess = "[Object Form] Load Object Success",
|
|
11
11
|
LoadObjectError = "[Object Form] Load Object Error",
|
|
12
|
+
SetCanEditObject = "[Object Form] Set Can Edit Object",
|
|
12
13
|
SaveObjectPending = "[Object Form] Save Object Pending",
|
|
13
14
|
SaveObjectSuccess = "[Object Form] Save Object Success",
|
|
14
15
|
SaveObjectError = "[Object Form] Save Object Error",
|
|
@@ -56,11 +57,15 @@ export declare const loadObjectSuccess: import("@ngrx/store").ActionCreator<EApp
|
|
|
56
57
|
sectionValues: SectionValueModel[];
|
|
57
58
|
applicationId: string;
|
|
58
59
|
isDraft: boolean;
|
|
60
|
+
canEditObject: boolean;
|
|
61
|
+
versionId?: string | number | null | undefined;
|
|
59
62
|
}) => {
|
|
60
63
|
templateSettings: TemplateModel;
|
|
61
64
|
sectionValues: SectionValueModel[];
|
|
62
65
|
applicationId: string;
|
|
63
66
|
isDraft: boolean;
|
|
67
|
+
canEditObject: boolean;
|
|
68
|
+
versionId?: string | number | null | undefined;
|
|
64
69
|
} & import("@ngrx/store/src/models").TypedAction<EApplicationActions.LoadObjectSuccess>>;
|
|
65
70
|
export declare const loadObjectError: import("@ngrx/store").ActionCreator<EApplicationActions.LoadObjectError, () => import("@ngrx/store/src/models").TypedAction<EApplicationActions.LoadObjectError>>;
|
|
66
71
|
export declare const saveObjectPending: import("@ngrx/store").ActionCreator<EApplicationActions.SaveObjectPending, () => import("@ngrx/store/src/models").TypedAction<EApplicationActions.SaveObjectPending>>;
|
|
@@ -85,9 +90,11 @@ export declare const saveValuesPending: import("@ngrx/store").ActionCreator<EApp
|
|
|
85
90
|
export declare const saveValuesSuccess: import("@ngrx/store").ActionCreator<EApplicationActions.SaveValuesSuccess, (props: {
|
|
86
91
|
result: UpdateValueResult;
|
|
87
92
|
objectId: string;
|
|
93
|
+
versionId?: string | number | null | undefined;
|
|
88
94
|
}) => {
|
|
89
95
|
result: UpdateValueResult;
|
|
90
96
|
objectId: string;
|
|
97
|
+
versionId?: string | number | null | undefined;
|
|
91
98
|
} & import("@ngrx/store/src/models").TypedAction<EApplicationActions.SaveValuesSuccess>>;
|
|
92
99
|
export declare const saveValuesError: import("@ngrx/store").ActionCreator<EApplicationActions.SaveValuesError, () => import("@ngrx/store/src/models").TypedAction<EApplicationActions.SaveValuesError>>;
|
|
93
100
|
export declare const updateSelectedSectionSysName: import("@ngrx/store").ActionCreator<EApplicationActions.UpdateSelectedSectionSysName, (props: {
|
|
@@ -37,19 +37,22 @@ export declare class ObjectFormEffects {
|
|
|
37
37
|
sectionValues: import("../models").SectionValueModel[];
|
|
38
38
|
applicationId: string;
|
|
39
39
|
isDraft: boolean;
|
|
40
|
+
canEditObject: boolean;
|
|
41
|
+
versionId?: string | number | null | undefined;
|
|
40
42
|
} & import("@ngrx/store/src/models").TypedAction<objectFormActions.EApplicationActions.LoadObjectSuccess>)> & import("@ngrx/effects").CreateEffectMetadata;
|
|
41
43
|
checkCanUpdateValues$: Observable<[ValueModel | ValueModel[], any]> & import("@ngrx/effects").CreateEffectMetadata;
|
|
42
44
|
saveValuesDebounced$: Observable<never> & import("@ngrx/effects").CreateEffectMetadata;
|
|
43
45
|
updateApplicationValues$: Observable<import("@ngrx/store/src/models").TypedAction<objectFormActions.EApplicationActions.SaveValuesError> | ({
|
|
44
46
|
result: import("../models").UpdateValueResult;
|
|
45
47
|
objectId: string;
|
|
48
|
+
versionId?: string | number | null | undefined;
|
|
46
49
|
} & import("@ngrx/store/src/models").TypedAction<objectFormActions.EApplicationActions.SaveValuesSuccess>)> & import("@ngrx/effects").CreateEffectMetadata;
|
|
47
50
|
saveApplicationPending$: Observable<import("@ngrx/store/src/models").TypedAction<objectFormActions.EApplicationActions.SaveObjectSuccess> | import("@ngrx/store/src/models").TypedAction<objectFormActions.EApplicationActions.SaveObjectError>> & import("@ngrx/effects").CreateEffectMetadata;
|
|
48
51
|
copyApplicationPending$: Observable<import("@ngrx/store/src/models").TypedAction<objectFormActions.EApplicationActions.CopyObjectSuccess> | import("@ngrx/store/src/models").TypedAction<objectFormActions.EApplicationActions.CopyObjectError>> & import("@ngrx/effects").CreateEffectMetadata;
|
|
49
52
|
loadSectionFilesPending$: Observable<import("@ngrx/store/src/models").TypedAction<objectFormActions.EApplicationActions.LoadSectionFilesError> | ({
|
|
50
53
|
sectionFiles: FileModel[];
|
|
51
54
|
} & import("@ngrx/store/src/models").TypedAction<objectFormActions.EApplicationActions.LoadSectionFilesSuccess>)> & import("@ngrx/effects").CreateEffectMetadata;
|
|
52
|
-
printDocument$: Observable<[never, string, any]> & import("@ngrx/effects").CreateEffectMetadata;
|
|
55
|
+
printDocument$: Observable<[never, string, any, string | number | null]> & import("@ngrx/effects").CreateEffectMetadata;
|
|
53
56
|
static ɵfac: i0.ɵɵFactoryDeclaration<ObjectFormEffects, never>;
|
|
54
57
|
static ɵprov: i0.ɵɵInjectableDeclaration<ObjectFormEffects>;
|
|
55
58
|
}
|
|
@@ -4,11 +4,13 @@ export declare const selectApiPrefix: import("@ngrx/store").MemoizedSelector<obj
|
|
|
4
4
|
export declare const selectApiUrl: import("@ngrx/store").MemoizedSelector<object, string, (s1: ObjectFormState) => string>;
|
|
5
5
|
export declare const selectIsLoading: import("@ngrx/store").MemoizedSelector<object, boolean, (s1: ObjectFormState) => boolean>;
|
|
6
6
|
export declare const selectIsObjectSaveLoading: import("@ngrx/store").MemoizedSelector<object, boolean, (s1: ObjectFormState) => boolean>;
|
|
7
|
+
export declare const selectCanEditObject: import("@ngrx/store").MemoizedSelector<object, boolean, (s1: ObjectFormState) => boolean>;
|
|
7
8
|
export declare const selectIsEdited: import("@ngrx/store").MemoizedSelector<object, boolean, (s1: ObjectFormState) => boolean>;
|
|
8
9
|
export declare const selectIsCheckRequired: import("@ngrx/store").MemoizedSelector<object, boolean, (s1: ObjectFormState) => boolean>;
|
|
9
10
|
export declare const selectMenuModel: import("@ngrx/store").MemoizedSelector<object, import("@myrtex-org/templates").MenuAdminModel, (s1: ObjectFormState) => import("@myrtex-org/templates").MenuAdminModel>;
|
|
10
11
|
export declare const selectSectionSettings: import("@ngrx/store").MemoizedSelector<object, ComponentModelBase | null, (s1: ObjectFormState, s2: string) => ComponentModelBase | null>;
|
|
11
12
|
export declare const selectSectionValues: import("@ngrx/store").MemoizedSelector<object, import("@myrtex-org/form").SectionValueModel[], (s1: ObjectFormState) => import("@myrtex-org/form").SectionValueModel[]>;
|
|
13
|
+
export declare const selectUnfilledSections: import("@ngrx/store").MemoizedSelector<object, string[], (s1: ObjectFormState) => string[]>;
|
|
12
14
|
export declare const selectObjectId: import("@ngrx/store").MemoizedSelector<object, string, (s1: string) => string>;
|
|
13
15
|
export declare const selectSectionFiles: import("@ngrx/store").MemoizedSelector<object, import("../../shared-form/models").FileModel[], (s1: ObjectFormState) => import("../../shared-form/models").FileModel[]>;
|
|
14
16
|
export declare const selectTemplateSysName: import("@ngrx/store").MemoizedSelector<object, string | undefined, (s1: ObjectFormState) => string | undefined>;
|
|
@@ -3,4 +3,5 @@ export declare const selectRouteNestedParams: import("@ngrx/store").MemoizedSele
|
|
|
3
3
|
export declare const selectRouteNestedParam: (param: string) => import("@ngrx/store").MemoizedSelector<object, any, (s1: Params) => any>;
|
|
4
4
|
export declare const selectTemplateSysName: import("@ngrx/store").MemoizedSelector<object, string | null, (s1: string | undefined) => string | null>;
|
|
5
5
|
export declare const selectIdFromQuery: import("@ngrx/store").MemoizedSelector<object, string | number | null, (s1: string | undefined) => string | number | null>;
|
|
6
|
+
export declare const selectVersionIdFromQuery: import("@ngrx/store").MemoizedSelector<object, string | number | null, (s1: string | undefined) => string | number | null>;
|
|
6
7
|
export declare const selectSectionSysName: import("@ngrx/store").MemoizedSelector<object, string | null, (s1: string | undefined) => string | null>;
|