@ldquocc/dynamic-form 0.0.6 → 0.0.8
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/ldquocc-dynamic-form.mjs +1013 -716
- package/fesm2022/ldquocc-dynamic-form.mjs.map +1 -1
- package/lib/shared/base/base-select.component.d.ts +19 -0
- package/lib/shared/base/base-value-accessor.d.ts +17 -10
- package/lib/shared/components/component.d.ts +2 -1
- package/lib/shared/components/field-user-config/field-user-config.component.d.ts +10 -0
- package/lib/shared/components/fields/date/date-picker/date-picker.component.d.ts +6 -4
- package/lib/shared/components/fields/date/date-range/date-range.component.d.ts +5 -4
- package/lib/shared/components/fields/input/input-formatted/input-formatted.component.d.ts +20 -0
- package/lib/shared/components/fields/input/input-password/input-password.component.d.ts +4 -3
- package/lib/shared/components/fields/input/input-text/input-text.component.d.ts +5 -5
- package/lib/shared/components/fields/select/multi-select/multi-select.component.d.ts +7 -11
- package/lib/shared/components/fields/select/single-select/single-select.component.d.ts +7 -12
- package/lib/shared/components/fields/select/tree-select/tree-select.component.d.ts +4 -3
- package/lib/shared/components/fields/textarea/textarea.component.d.ts +5 -4
- package/lib/shared/components/fields/upload/avatar-upload/avatar-upload.component.d.ts +12 -14
- package/lib/shared/components/fields/upload/multi-file-upload/multi-file-upload.component.d.ts +2 -4
- package/lib/shared/components/fields/upload/multi-image-upload/multi-image-upload.component.d.ts +10 -11
- package/lib/shared/components/fields/upload/single-file-upload/single-file-upload.component.d.ts +15 -16
- package/lib/shared/consts/common/common.const.d.ts +4 -0
- package/lib/shared/consts/fields/field.const.d.ts +1 -1
- package/lib/shared/consts/fields/index.d.ts +5 -4
- package/lib/shared/consts/fields/input-formatted-field.const.d.ts +4 -0
- package/lib/shared/enums/fields/field.enum.d.ts +1 -0
- package/lib/shared/enums/fields/index.d.ts +6 -5
- package/lib/shared/enums/fields/input-formatted-field.enum.d.ts +6 -0
- package/lib/shared/enums/validators/index.d.ts +2 -1
- package/lib/shared/enums/validators/regex.enum.d.ts +38 -0
- package/lib/shared/factories/auto-numeric-options.factory.d.ts +5 -0
- package/lib/shared/models/common/index.d.ts +7 -7
- package/lib/shared/models/fields/date/date-range-field.model.d.ts +3 -2
- package/lib/shared/models/fields/field-grid.model.d.ts +7 -7
- package/lib/shared/models/fields/field-user-config.model.d.ts +3 -0
- package/lib/shared/models/fields/field.model.d.ts +9 -7
- package/lib/shared/models/fields/index.d.ts +2 -0
- package/lib/shared/models/fields/input/index.d.ts +4 -3
- package/lib/shared/models/fields/input/input-formatted-field.model.d.ts +13 -0
- package/lib/shared/models/fields/select/select-base-field.model.d.ts +6 -6
- package/lib/shared/models/fields/upload/multi-image-upload-field.model.d.ts +1 -1
- package/lib/shared/services/field.service.d.ts +17 -5
- package/lib/shared/utils/dynamic-form/dynamic-form.d.ts +8 -4
- package/package.json +3 -4
- package/public-api.d.ts +2 -2
- package/styles/_common-form.scss +43 -0
- package/lib/shared/models/fields/index.model.d.ts +0 -1
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ApiResponse } from "../models/common/api-response.model";
|
|
2
|
+
import { SelectBaseField } from "../models/fields/select/select-base-field.model";
|
|
3
|
+
import { BaseValueAccessor } from "./base-value-accessor";
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare abstract class BaseSelectComponent<T> extends BaseValueAccessor<T> {
|
|
6
|
+
protected readonly selectField: import("@angular/core").Signal<SelectBaseField<any>>;
|
|
7
|
+
protected isFirstLoad: boolean;
|
|
8
|
+
private dependParams$;
|
|
9
|
+
private createDependencyStreams;
|
|
10
|
+
private evaluateDependencies;
|
|
11
|
+
private dependParamsSignal;
|
|
12
|
+
optionsResource: import("@angular/core").ResourceRef<ApiResponse<Record<string, unknown>[]> | undefined>;
|
|
13
|
+
disabled: import("@angular/core").Signal<boolean>;
|
|
14
|
+
options: import("@angular/core").Signal<Record<string, unknown>[]>;
|
|
15
|
+
constructor();
|
|
16
|
+
protected onApiOptionsLoaded(): void;
|
|
17
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BaseSelectComponent<any>, never>;
|
|
18
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<BaseSelectComponent<any>, never, never, {}, {}, never, never, true, never>;
|
|
19
|
+
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { AbstractControl, ControlValueAccessor } from
|
|
2
|
-
import { Subject } from
|
|
3
|
-
import { FormMode } from
|
|
4
|
-
import { FormModeEnum } from
|
|
5
|
-
import { DynamicFormService } from
|
|
6
|
-
import { FieldService } from
|
|
7
|
-
import { BaseField } from
|
|
8
|
-
import { ViewModeEnum } from
|
|
9
|
-
import { FormDataService } from
|
|
1
|
+
import { AbstractControl, ControlValueAccessor } from "@angular/forms";
|
|
2
|
+
import { Subject } from "rxjs";
|
|
3
|
+
import { FormMode } from "../models/form";
|
|
4
|
+
import { FormModeEnum } from "../enums/form";
|
|
5
|
+
import { DynamicFormService } from "../services/dynamic-form.service";
|
|
6
|
+
import { FieldService } from "../services/field.service";
|
|
7
|
+
import { BaseField } from "../models/fields/field.model";
|
|
8
|
+
import { ViewModeEnum } from "../enums/common";
|
|
9
|
+
import { FormDataService } from "../services/form-data.service";
|
|
10
10
|
import * as i0 from "@angular/core";
|
|
11
11
|
export declare abstract class BaseValueAccessor<T> implements ControlValueAccessor {
|
|
12
12
|
formId: string;
|
|
@@ -23,12 +23,18 @@ export declare abstract class BaseValueAccessor<T> implements ControlValueAccess
|
|
|
23
23
|
protected readonly viewModeEnum: typeof ViewModeEnum;
|
|
24
24
|
protected readonly destroy$: Subject<void>;
|
|
25
25
|
protected value: T | null;
|
|
26
|
+
protected readonly valueSignal: import("@angular/core").WritableSignal<T | null>;
|
|
26
27
|
protected onChange: (value: T | null) => void;
|
|
27
28
|
protected onTouched: () => void;
|
|
28
|
-
isDisabled: boolean;
|
|
29
|
+
protected isDisabled: boolean;
|
|
30
|
+
protected readonly disabledSignal: import("@angular/core").WritableSignal<boolean>;
|
|
29
31
|
protected dFormService: DynamicFormService;
|
|
30
32
|
protected formDataService: FormDataService;
|
|
31
33
|
protected fieldService: FieldService;
|
|
34
|
+
private readonly resetEffect;
|
|
35
|
+
protected readonly viewMode: import("@angular/core").Signal<import("@ldquocc/dynamic-form").ViewMode>;
|
|
36
|
+
protected readonly displayPlaceholder: import("@angular/core").Signal<string>;
|
|
37
|
+
protected resolvePlaceholderText(): string;
|
|
32
38
|
ngOnDestroy(): void;
|
|
33
39
|
protected takeUntilDestroy<T>(): import("rxjs").MonoTypeOperatorFunction<T>;
|
|
34
40
|
writeValue(value: T | null): void;
|
|
@@ -48,6 +54,7 @@ export declare abstract class BaseValueAccessor<T> implements ControlValueAccess
|
|
|
48
54
|
protected disableAndResetControl(): void;
|
|
49
55
|
protected disableControl(): void;
|
|
50
56
|
protected enableControl(): void;
|
|
57
|
+
protected resetControl(): void;
|
|
51
58
|
/**
|
|
52
59
|
* Optional: để component override riêng.
|
|
53
60
|
*/
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { DatePickerComponent } from "./fields/date/date-picker/date-picker.component";
|
|
2
2
|
import { DateRangeComponent } from "./fields/date/date-range/date-range.component";
|
|
3
|
+
import { InputFormattedComponent } from "./fields/input/input-formatted/input-formatted.component";
|
|
3
4
|
import { InputPasswordComponent } from "./fields/input/input-password/input-password.component";
|
|
4
5
|
import { InputTextComponent } from "./fields/input/input-text/input-text.component";
|
|
5
6
|
import { MultiSelectComponent } from "./fields/select/multi-select/multi-select.component";
|
|
@@ -10,4 +11,4 @@ import { AvatarUploadComponent } from "./fields/upload/avatar-upload/avatar-uplo
|
|
|
10
11
|
import { MultiFileUploadComponent } from "./fields/upload/multi-file-upload/multi-file-upload.component";
|
|
11
12
|
import { MultiImageUploadComponent } from "./fields/upload/multi-image-upload/multi-image-upload.component";
|
|
12
13
|
import { SingleFileUploadComponent } from "./fields/upload/single-file-upload/single-file-upload.component";
|
|
13
|
-
export declare const FIELD_COMPONENTS: (typeof DatePickerComponent | typeof DateRangeComponent | typeof InputPasswordComponent | typeof InputTextComponent | typeof MultiSelectComponent | typeof SingleSelectComponent | typeof TreeSelectComponent | typeof TextareaComponent | typeof AvatarUploadComponent | typeof MultiFileUploadComponent | typeof MultiImageUploadComponent | typeof SingleFileUploadComponent)[];
|
|
14
|
+
export declare const FIELD_COMPONENTS: (typeof DatePickerComponent | typeof DateRangeComponent | typeof InputFormattedComponent | typeof InputPasswordComponent | typeof InputTextComponent | typeof MultiSelectComponent | typeof SingleSelectComponent | typeof TreeSelectComponent | typeof TextareaComponent | typeof AvatarUploadComponent | typeof MultiFileUploadComponent | typeof MultiImageUploadComponent | typeof SingleFileUploadComponent)[];
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BaseField } from "../../models/fields/field.model";
|
|
2
|
+
import { AbstractControl } from "@angular/forms";
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class FieldUserConfigComponent {
|
|
5
|
+
readonly field: import("@angular/core").InputSignal<BaseField<any>>;
|
|
6
|
+
readonly control: import("@angular/core").InputSignal<AbstractControl<any, any>>;
|
|
7
|
+
onToggleUserRequired(isRequired: boolean): void;
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FieldUserConfigComponent, never>;
|
|
9
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FieldUserConfigComponent, "app-field-user-config", never, { "field": { "alias": "field"; "required": true; "isSignal": true; }; "control": { "alias": "control"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
10
|
+
}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import { BaseValueAccessor } from
|
|
2
|
-
import { DatePickerField } from
|
|
1
|
+
import { BaseValueAccessor } from "../../../../base/base-value-accessor";
|
|
2
|
+
import { DatePickerField } from "../../../../models/fields/date/date-picker-field.model";
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
export declare class DatePickerComponent extends BaseValueAccessor<string | Date> {
|
|
5
|
-
readonly
|
|
6
|
-
|
|
5
|
+
readonly field: import("@angular/core").Signal<DatePickerField>;
|
|
6
|
+
format: import("@angular/core").Signal<string>;
|
|
7
7
|
disabledDate: import("@angular/core").Signal<(current: Date) => boolean>;
|
|
8
|
+
readonly viewDisplayValue: import("@angular/core").Signal<string>;
|
|
8
9
|
constructor();
|
|
10
|
+
resolvePlaceholderText(): string;
|
|
9
11
|
handleChangeDate(date: Date): void;
|
|
10
12
|
protected writeValueToView(value: Date): void;
|
|
11
13
|
protected handleValueChange(value: Date): void;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import { BaseValueAccessor } from
|
|
2
|
-
import { DateRangeField } from
|
|
1
|
+
import { BaseValueAccessor } from "../../../../base/base-value-accessor";
|
|
2
|
+
import { DateRangeField } from "../../../../models/fields/date/date-range-field.model";
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
export declare class DateRangeComponent extends BaseValueAccessor<string | string[] | Date[]> {
|
|
5
|
-
readonly
|
|
5
|
+
readonly field: import("@angular/core").Signal<DateRangeField>;
|
|
6
|
+
format: import("@angular/core").Signal<string>;
|
|
7
|
+
placeholders: import("@angular/core").Signal<string[]>;
|
|
6
8
|
displayValueNoInfo: string;
|
|
7
9
|
disabledDate: import("@angular/core").Signal<(current: Date) => boolean>;
|
|
8
10
|
constructor();
|
|
9
|
-
getSelectedDateRangeFromFieldValue(fieldValue: string[] | Date[]): Date[];
|
|
10
11
|
handleChangeDateRange(dateRange: Date[]): void;
|
|
11
12
|
protected writeValueToView(value: Date[]): void;
|
|
12
13
|
protected handleValueChange(value: Date[]): void;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ElementRef } from "@angular/core";
|
|
2
|
+
import { BaseValueAccessor } from "../../../../base/base-value-accessor";
|
|
3
|
+
import { InputFormattedField } from "../../../../models/fields/input/input-formatted-field.model";
|
|
4
|
+
import AutoNumeric from "@zeedhi/autonumeric";
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class InputFormattedComponent extends BaseValueAccessor<string> {
|
|
7
|
+
readonly field: import("@angular/core").Signal<InputFormattedField>;
|
|
8
|
+
private autoNumeric?;
|
|
9
|
+
readonly inputFormattedEle: import("@angular/core").Signal<ElementRef<HTMLInputElement> | undefined>;
|
|
10
|
+
readonly autoNumericOptions: import("@angular/core").Signal<AutoNumeric.Options>;
|
|
11
|
+
readonly internalValue: import("@angular/core").WritableSignal<string>;
|
|
12
|
+
readonly inputDisplayValues: import("@angular/core").Signal<string>;
|
|
13
|
+
readonly autoNumericLifeCycleEffect: import("@angular/core").EffectRef;
|
|
14
|
+
constructor();
|
|
15
|
+
resolvePlaceholderText(): string;
|
|
16
|
+
handleChangeInputText(): void;
|
|
17
|
+
protected writeValueToView(value: string): void;
|
|
18
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<InputFormattedComponent, never>;
|
|
19
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<InputFormattedComponent, "app-input-formatted", never, {}, {}, never, never, true, never>;
|
|
20
|
+
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { InputPasswordField } from
|
|
2
|
-
import { BaseValueAccessor } from
|
|
1
|
+
import { InputPasswordField } from "../../../../models/fields/input";
|
|
2
|
+
import { BaseValueAccessor } from "../../../../base/base-value-accessor";
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
export declare class InputPasswordComponent extends BaseValueAccessor<string> {
|
|
5
|
-
readonly
|
|
5
|
+
readonly field: import("@angular/core").Signal<InputPasswordField>;
|
|
6
6
|
passwordVisible: boolean;
|
|
7
7
|
constructor();
|
|
8
|
+
resolvePlaceholderText(): string;
|
|
8
9
|
handleChangeInputPassword(event: Event): void;
|
|
9
10
|
static ɵfac: i0.ɵɵFactoryDeclaration<InputPasswordComponent, never>;
|
|
10
11
|
static ɵcmp: i0.ɵɵComponentDeclaration<InputPasswordComponent, "app-input-password", never, {}, {}, never, never, true, never>;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { InputTextField } from
|
|
2
|
-
import { BaseValueAccessor } from
|
|
1
|
+
import { InputTextField } from "../../../../models/fields/input";
|
|
2
|
+
import { BaseValueAccessor } from "../../../../base/base-value-accessor";
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
export declare class InputTextComponent extends BaseValueAccessor<string> {
|
|
5
|
-
readonly
|
|
6
|
-
|
|
7
|
-
displayNoValueText: string;
|
|
5
|
+
readonly field: import("@angular/core").Signal<InputTextField>;
|
|
6
|
+
readonly viewDisplayValue: import("@angular/core").Signal<string>;
|
|
8
7
|
constructor();
|
|
8
|
+
resolvePlaceholderText(): string;
|
|
9
9
|
handleChangeInputText(event: Event): void;
|
|
10
10
|
handleChangeFormValue(value: number): void;
|
|
11
11
|
protected writeValueToView(value: string): void;
|
|
@@ -1,17 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { MultiSelectField } from
|
|
1
|
+
import { BaseSelectComponent } from "../../../../base/base-select.component";
|
|
2
|
+
import { MultiSelectField } from "../../../../models/fields/select/multi-select-field.model";
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class MultiSelectComponent extends
|
|
5
|
-
readonly
|
|
4
|
+
export declare class MultiSelectComponent extends BaseSelectComponent<string[] | number[] | Record<string, unknown>[]> {
|
|
5
|
+
readonly field: import("@angular/core").Signal<MultiSelectField>;
|
|
6
6
|
displayNoValueText: string;
|
|
7
|
-
|
|
8
|
-
loading: import("@angular/core").WritableSignal<boolean>;
|
|
9
|
-
options: Record<string, unknown>[];
|
|
10
|
-
queryParams: Record<string, unknown>;
|
|
7
|
+
viewDisplayValue: import("@angular/core").Signal<string[]>;
|
|
11
8
|
constructor();
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
private getOptions;
|
|
9
|
+
protected onApiOptionsLoaded(): void;
|
|
10
|
+
resolvePlaceholderText(): string;
|
|
15
11
|
handleChangeOptions(optionValue: string[]): void;
|
|
16
12
|
protected writeValueToView(value: string[]): void;
|
|
17
13
|
protected handleValueChange(value: string[]): void;
|
|
@@ -1,20 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { SingleSelectField } from
|
|
1
|
+
import { BaseSelectComponent } from "../../../../base/base-select.component";
|
|
2
|
+
import { SingleSelectField } from "../../../../models/fields/select/single-select-field.model";
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class SingleSelectComponent extends
|
|
4
|
+
export declare class SingleSelectComponent extends BaseSelectComponent<string | Record<string, unknown>> {
|
|
5
5
|
isCustomInputText: boolean;
|
|
6
|
-
readonly
|
|
7
|
-
|
|
8
|
-
loadingSignal: import("@angular/core").WritableSignal<boolean>;
|
|
9
|
-
isDisabledSignal: import("@angular/core").WritableSignal<boolean>;
|
|
10
|
-
disabled: import("@angular/core").Signal<boolean>;
|
|
11
|
-
options: Record<string, unknown>[];
|
|
12
|
-
queryParams: Record<string, unknown>;
|
|
6
|
+
readonly field: import("@angular/core").Signal<SingleSelectField>;
|
|
7
|
+
readonly viewDisplayValue: import("@angular/core").Signal<string>;
|
|
13
8
|
constructor();
|
|
9
|
+
protected onApiOptionsLoaded(): void;
|
|
10
|
+
resolvePlaceholderText(): string;
|
|
14
11
|
protected writeValueToView(value: string | null): void;
|
|
15
12
|
protected handleValueChange(value: string): void;
|
|
16
|
-
private createFullApiUrl;
|
|
17
|
-
private getOptions;
|
|
18
13
|
handleChangeOptions(optionValue: string): void;
|
|
19
14
|
private getValueByOutputAs;
|
|
20
15
|
protected getDisplayValue(value: string | Record<string, unknown>): string;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { BaseValueAccessor } from
|
|
2
|
-
import { TreeSelectField } from
|
|
1
|
+
import { BaseValueAccessor } from "../../../../base/base-value-accessor";
|
|
2
|
+
import { TreeSelectField } from "../../../../models/fields/select/tree-select-field.model";
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
export declare class TreeSelectComponent extends BaseValueAccessor<string | Record<string, unknown>> {
|
|
5
5
|
isCustomInputText: boolean;
|
|
6
|
-
readonly
|
|
6
|
+
readonly field: import("@angular/core").Signal<TreeSelectField>;
|
|
7
7
|
displayValue: string | number;
|
|
8
8
|
loadingSignal: import("@angular/core").WritableSignal<boolean>;
|
|
9
9
|
isDisabledSignal: import("@angular/core").WritableSignal<boolean>;
|
|
@@ -11,6 +11,7 @@ export declare class TreeSelectComponent extends BaseValueAccessor<string | Reco
|
|
|
11
11
|
options: any[];
|
|
12
12
|
queryParams: Record<string, unknown>;
|
|
13
13
|
constructor();
|
|
14
|
+
resolvePlaceholderText(): string;
|
|
14
15
|
protected writeValueToView(value: string | null): void;
|
|
15
16
|
protected handleValueChange(value: string): void;
|
|
16
17
|
private createFullApiUrl;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { BaseValueAccessor } from
|
|
2
|
-
import { TextareaField } from
|
|
1
|
+
import { BaseValueAccessor } from "../../../base/base-value-accessor";
|
|
2
|
+
import { TextareaField } from "../../../models/fields/textarea/textarea-field.model";
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
export declare class TextareaComponent extends BaseValueAccessor<string> {
|
|
5
|
-
readonly
|
|
6
|
-
textareaDisplayValue: string;
|
|
5
|
+
readonly field: import("@angular/core").Signal<TextareaField>;
|
|
7
6
|
displayNoValueText: string;
|
|
7
|
+
readonly viewDisplayValue: import("@angular/core").Signal<string>;
|
|
8
8
|
constructor();
|
|
9
|
+
resolvePlaceholderText(): string;
|
|
9
10
|
handleChangeTextarea(event: Event): void;
|
|
10
11
|
protected writeValueToView(value: string): void;
|
|
11
12
|
static ɵfac: i0.ɵɵFactoryDeclaration<TextareaComponent, never>;
|
|
@@ -1,26 +1,24 @@
|
|
|
1
|
-
import { NzUploadFile, NzUploadXHRArgs } from
|
|
2
|
-
import { BaseValueAccessor } from
|
|
3
|
-
import { AvatarUploadField } from
|
|
4
|
-
import { ObjectStorage } from
|
|
5
|
-
import {
|
|
6
|
-
import { Observable, Subscription } from 'rxjs';
|
|
1
|
+
import { NzUploadFile, NzUploadXHRArgs } from "ng-zorro-antd/upload";
|
|
2
|
+
import { BaseValueAccessor } from "../../../../base/base-value-accessor";
|
|
3
|
+
import { AvatarUploadField } from "../../../../models/fields/upload/avatar-upload-field.model";
|
|
4
|
+
import { ObjectStorage } from "../../../../models/common";
|
|
5
|
+
import { Observable, Subscription } from "rxjs";
|
|
7
6
|
import * as i0 from "@angular/core";
|
|
8
7
|
export declare class AvatarUploadComponent extends BaseValueAccessor<string | File> {
|
|
9
8
|
size: number;
|
|
10
|
-
readonly
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
private
|
|
14
|
-
|
|
15
|
-
|
|
9
|
+
readonly field: import("@angular/core").Signal<AvatarUploadField>;
|
|
10
|
+
private readonly fileService;
|
|
11
|
+
private readonly formConfigService;
|
|
12
|
+
private readonly nzNotification;
|
|
13
|
+
readonly avatarUrl: import("@angular/core").WritableSignal<string | null>;
|
|
14
|
+
readonly uploading: import("@angular/core").WritableSignal<boolean>;
|
|
15
|
+
readonly objStorageList: import("@angular/core").WritableSignal<ObjectStorage[]>;
|
|
16
16
|
constructor();
|
|
17
17
|
protected writeValueToView(value: string): void;
|
|
18
18
|
private handleInitAllData;
|
|
19
19
|
beforeUpload: (file: NzUploadFile, fileList: NzUploadFile[]) => boolean | Observable<boolean>;
|
|
20
20
|
customRequest: (item: NzUploadXHRArgs) => Subscription;
|
|
21
21
|
private uploadFile;
|
|
22
|
-
handleDelete(file: MyUploadFile): void;
|
|
23
|
-
handlePreview(): void;
|
|
24
22
|
deleteObjStorage(id: string): Subscription;
|
|
25
23
|
static ɵfac: i0.ɵɵFactoryDeclaration<AvatarUploadComponent, never>;
|
|
26
24
|
static ɵcmp: i0.ɵɵComponentDeclaration<AvatarUploadComponent, "app-avatar-upload", never, { "size": { "alias": "size"; "required": false; }; }, {}, never, never, true, never>;
|
package/lib/shared/components/fields/upload/multi-file-upload/multi-file-upload.component.d.ts
CHANGED
|
@@ -6,16 +6,14 @@ import { ObjectStorage } from "../../../../models/common";
|
|
|
6
6
|
import { Observable, Subscription } from "rxjs";
|
|
7
7
|
import * as i0 from "@angular/core";
|
|
8
8
|
export declare class MultiFileUploadComponent extends BaseValueAccessor<string | File | NzUploadFile> {
|
|
9
|
-
readonly
|
|
9
|
+
readonly field: import("@angular/core").Signal<MultiFileUploadField>;
|
|
10
10
|
objStorageList: import("@angular/core").WritableSignal<ObjectStorage[]>;
|
|
11
11
|
allFiles: import("@angular/core").WritableSignal<MyUploadFile[]>;
|
|
12
|
-
fileExtensionGuide: import("@angular/core").
|
|
12
|
+
readonly fileExtensionGuide: import("@angular/core").Signal<string>;
|
|
13
13
|
pendingCount: import("@angular/core").WritableSignal<number>;
|
|
14
14
|
private _batchBuffer;
|
|
15
15
|
private _batchTimer;
|
|
16
16
|
private fileService;
|
|
17
|
-
private toast;
|
|
18
|
-
private translate;
|
|
19
17
|
private nzMessage;
|
|
20
18
|
private nzNotification;
|
|
21
19
|
private formConfigService;
|
package/lib/shared/components/fields/upload/multi-image-upload/multi-image-upload.component.d.ts
CHANGED
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
import { BaseValueAccessor } from
|
|
2
|
-
import { NzUploadFile, NzUploadXHRArgs } from
|
|
3
|
-
import { MultiImageUploadField } from
|
|
4
|
-
import { MyUploadFile } from
|
|
5
|
-
import { ObjectStorage } from
|
|
6
|
-
import { Observable, Subscription } from
|
|
1
|
+
import { BaseValueAccessor } from "../../../../base/base-value-accessor";
|
|
2
|
+
import { NzUploadFile, NzUploadXHRArgs } from "ng-zorro-antd/upload";
|
|
3
|
+
import { MultiImageUploadField } from "../../../../models/fields/upload/multi-image-upload-field.model";
|
|
4
|
+
import { MyUploadFile } from "../../../../models/common/common.model";
|
|
5
|
+
import { ObjectStorage } from "../../../../models/common";
|
|
6
|
+
import { Observable, Subscription } from "rxjs";
|
|
7
7
|
import * as i0 from "@angular/core";
|
|
8
8
|
export declare class MultiImageUploadComponent extends BaseValueAccessor<string | File | NzUploadFile> {
|
|
9
|
-
readonly
|
|
10
|
-
objStorageList: import("@angular/core").WritableSignal<ObjectStorage[]>;
|
|
11
|
-
allFiles: import("@angular/core").WritableSignal<MyUploadFile[]>;
|
|
9
|
+
readonly field: import("@angular/core").Signal<MultiImageUploadField>;
|
|
10
|
+
readonly objStorageList: import("@angular/core").WritableSignal<ObjectStorage[]>;
|
|
11
|
+
readonly allFiles: import("@angular/core").WritableSignal<MyUploadFile[]>;
|
|
12
|
+
readonly uploading: import("@angular/core").WritableSignal<boolean>;
|
|
12
13
|
private fileService;
|
|
13
|
-
private toast;
|
|
14
|
-
private translate;
|
|
15
14
|
private nzNotification;
|
|
16
15
|
private formConfigService;
|
|
17
16
|
constructor();
|
package/lib/shared/components/fields/upload/single-file-upload/single-file-upload.component.d.ts
CHANGED
|
@@ -1,22 +1,21 @@
|
|
|
1
|
-
import { BaseValueAccessor } from
|
|
2
|
-
import { SingleFileUploadField } from
|
|
3
|
-
import { NzUploadFile, NzUploadXHRArgs } from
|
|
4
|
-
import { Observable, Subscription } from
|
|
5
|
-
import { ObjectStorage } from
|
|
6
|
-
import { MyUploadFile } from
|
|
1
|
+
import { BaseValueAccessor } from "../../../../base/base-value-accessor";
|
|
2
|
+
import { SingleFileUploadField } from "../../../../models/fields/upload/single-file-upload-field.model";
|
|
3
|
+
import { NzUploadFile, NzUploadXHRArgs } from "ng-zorro-antd/upload";
|
|
4
|
+
import { Observable, Subscription } from "rxjs";
|
|
5
|
+
import { ObjectStorage } from "../../../../models/common/object-storage.model";
|
|
6
|
+
import { MyUploadFile } from "../../../../models/common/common.model";
|
|
7
7
|
import * as i0 from "@angular/core";
|
|
8
8
|
export declare class SingleFileUploadComponent extends BaseValueAccessor<string | File | NzUploadFile> {
|
|
9
|
-
readonly
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
readonly field: import("@angular/core").Signal<SingleFileUploadField>;
|
|
10
|
+
private readonly fileService;
|
|
11
|
+
private readonly nzNotification;
|
|
12
|
+
private readonly formConfigService;
|
|
13
|
+
readonly objStorageList: import("@angular/core").WritableSignal<ObjectStorage[]>;
|
|
14
|
+
readonly allFiles: import("@angular/core").WritableSignal<MyUploadFile[]>;
|
|
15
|
+
readonly fileExtensionGuide: import("@angular/core").Signal<string>;
|
|
16
|
+
readonly viewDisplayValue: import("@angular/core").Signal<string | undefined>;
|
|
17
|
+
readonly addEditDisplayValue: import("@angular/core").Signal<string | undefined>;
|
|
14
18
|
readonly uploading: import("@angular/core").WritableSignal<boolean>;
|
|
15
|
-
private fileService;
|
|
16
|
-
private toast;
|
|
17
|
-
private translate;
|
|
18
|
-
private nzNotification;
|
|
19
|
-
private formConfigService;
|
|
20
19
|
constructor();
|
|
21
20
|
protected writeValueToView(value: string): void;
|
|
22
21
|
private handleInitAllData;
|
|
@@ -1 +1,5 @@
|
|
|
1
1
|
export declare const NO_INFO_TEXT = "Kh\u00F4ng c\u00F3 th\u00F4ng tin";
|
|
2
|
+
export declare const UPLOAD_FILE_TEXT = "T\u1EA3i l\u00EAn t\u1EADp tin";
|
|
3
|
+
export declare const NO_FILE_NAME = "Ch\u01B0a c\u00F3 th\u00F4ng tin t\u00EAn t\u1EADp tin";
|
|
4
|
+
export declare const UPLOAD_FILE_ERROR = "L\u1ED7i trong qu\u00E1 tr\u00ECnh t\u1EA3i t\u1EADp tin \u0111\u1EBFn m\u00E1y ch\u1EE7!";
|
|
5
|
+
export declare const DELETE_FILE_ERROR = "L\u1ED7i trong qu\u00E1 tr\u00ECnh x\u00F3a t\u1EADp tin \u0111\u1EBFn m\u00E1y ch\u1EE7!";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* FIELD_TYPES là readonly ['input', 'select', 'checkbox',...]
|
|
3
3
|
*/
|
|
4
|
-
export declare const FIELD_TYPES: readonly ["input-text", "input-password", "textarea", "date-picker", "date-range", "single-select", "tree-select", "multi-select", "single-file-upload", "multi-file-upload", "multi-image-upload", "avatar-upload", "checkbox", "radio", "reminder-type-radio", "switch", "autocomplete"];
|
|
4
|
+
export declare const FIELD_TYPES: readonly ["input-text", "input-password", "input-formatted", "textarea", "date-picker", "date-range", "single-select", "tree-select", "multi-select", "single-file-upload", "multi-file-upload", "multi-image-upload", "avatar-upload", "checkbox", "radio", "reminder-type-radio", "switch", "autocomplete"];
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
1
|
+
export * from "./field.const";
|
|
2
|
+
export * from "./input-field.const";
|
|
3
|
+
export * from "./select-field.const";
|
|
4
|
+
export * from "./date-field.const";
|
|
5
|
+
export * from "./input-formatted-field.const";
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { Options } from "@zeedhi/autonumeric";
|
|
2
|
+
import { NumericPreset } from "../../enums/fields/input-formatted-field.enum";
|
|
3
|
+
export declare const BASE_OPTIONS: Partial<Options>;
|
|
4
|
+
export declare const NUMERIC_PRESETS: Record<Exclude<NumericPreset, NumericPreset.Manual>, Partial<Options>>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
5
|
-
export * from
|
|
1
|
+
export * from "./field.enum";
|
|
2
|
+
export * from "./input-field.enum";
|
|
3
|
+
export * from "./input-formatted-field.enum";
|
|
4
|
+
export * from "./date-field.enum";
|
|
5
|
+
export * from "./select-field.enum";
|
|
6
|
+
export * from "./upload-field.enum";
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export * from
|
|
1
|
+
export * from "./validators.enum";
|
|
2
|
+
export * from "./regex.enum";
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export declare enum RegexTypeEnum {
|
|
2
|
+
Alpha = "^[a-zA-Z]+$",
|
|
3
|
+
AlphaNumeric = "^[a-zA-Z0-9]+$",
|
|
4
|
+
Name = "^[0-9a-zA-Z_ \u00C0\u00C1\u00C2\u00C3\u00C8\u00C9\u00CA\u00CC\u00CD\u00D2\u00D3\u00D4\u00D5\u00D9\u00DA\u0102\u0110\u0128\u0168\u01A0\u00E0\u00E1\u00E2\u00E3\u00E8\u00E9\u00EA\u00EC\u00ED\u00F2\u00F3\u00F4\u00F5\u00F9\u00FA\u0103\u0111\u0129\u0169\u01A1\u01AF\u0102\u1EA0\u1EA2\u1EA4\u1EA6\u1EA8\u1EAA\u1EAC\u1EAE\u1EB0\u1EB2\u1EB4\u1EB6\u1EB8\u1EBA\u1EBC\u1EC0\u1EC0\u1EC2\u1EBE\u01B0\u0103\u1EA1\u1EA3\u1EA5\u1EA7\u1EA9\u1EAB\u1EAD\u1EAF\u1EB1\u1EB3\u1EB5\u1EB7\u1EB9\u1EBB\u1EBD\u1EC1\u1EC1\u1EC3\u1EBF\u1EC4\u1EC6\u1EC8\u1ECA\u1ECC\u1ECE\u1ED0\u1ED2\u1ED4\u1ED6\u1ED8\u1EDA\u1EDC\u1EDE\u1EE0\u1EE2\u1EE4\u1EE6\u1EE8\u1EEA\u1EC5\u1EC7\u1EC9\u1ECB\u1ECD\u1ECF\u1ED1\u1ED3\u1ED5\u1ED7\u1ED9\u1EDB\u1EDD\u1EDF\u1EE1\u1EE3\u1EE5\u1EE7\u1EE9\u1EEB\u1EEC\u1EEE\u1EF0\u1EF2\u1EF4\u00DD\u1EF6\u1EF8\u1EED\u1EEF\u1EF1\u1EF3\u1EF5\u00FD\u1EF7\u1EF9\\.+,:%&=;s.\\/\\-_'\\()]+$",
|
|
5
|
+
Username = "^[a-z0-9_.s]+$",
|
|
6
|
+
RegexPostCode = "^[a-zA-Z0-9-s]+$",
|
|
7
|
+
AlphaDash = "^[a-zA-Z0-9_-s.]+$",
|
|
8
|
+
AlphaVN = "^[a-zA-Z_ \u00C0\u00C1\u00C2\u00C3\u00C8\u00C9\u00CA\u00CC\u00CD\u00D2\u00D3\u00D4\u00D5\u00D9\u00DA\u0102\u0110\u0128\u0168\u01A0\u00E0\u00E1\u00E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u1EED\u1EEF\u1EF1\u1EF3\u1EF5\u1EF7\u1EF9s_-]+$",
|
|
12
|
+
Date = "([12]\\d{3}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01]))",
|
|
13
|
+
Time = "(?=[01]\\d|2[0123])=(?=[012345]\\d)=(?=[012345]\\d)",
|
|
14
|
+
DateTime = "[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1]) (2[0-3]|[01][0-9])=[0-5][0-9]=[0-5][0-9]",
|
|
15
|
+
DateVN = "^(?=0[1-9]|[12]d|3[01])([/.-])(?=0[1-9]|1[012])\\1(?=19|20)dd$",
|
|
16
|
+
DateTimeVN = "^(0?[1-9]|[12][0-9]|3[01])[\\/](0?[1-9]|1[012])[\\/]\\d{4} (\\d{2})=(\\d{2})=(\\d{2})$",
|
|
17
|
+
DateShortTimeVN = "^(0?[1-9]|[12][0-9]|3[01])[\\/](0?[1-9]|1[012])[\\/]\\d{4} (\\d{2})=(\\d{2})$",
|
|
18
|
+
Integer = "^\\-?[0-9]+$",
|
|
19
|
+
Decimal = "^\\-?[0-9]*\\.?[0-9]+$",
|
|
20
|
+
IpAddress = "^((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})\\.){3}(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})$",
|
|
21
|
+
Base64 = "[^a-zA-Z0-9\\/\\+=]",
|
|
22
|
+
Indentityid = "^\\d{12}$",
|
|
23
|
+
IntergerNotZero = "^[0-9]*[1-9][0-9]*$",
|
|
24
|
+
Code = "^['A-Z''0-9''./_\\-\\/\\\u0110']*$",
|
|
25
|
+
CodeHsda = "^['A-Z''0-9''./_\\-']*$",
|
|
26
|
+
LinkLocation = "(https?://)?([\\da-z.-]+)\\.([a-z.]{2,6})([/\\w .-]*)?(\\?[\\w=&,.%-]*)?",
|
|
27
|
+
Link = "(https?://)?([\\da-z.-]+)\\.([a-z.]{2,6})[/\\w .-]*/?",
|
|
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*[a-z])(?=.*[0-9])(?=.*[~`!@#$%^&*()--+={}\\[\\]|\\\\:;\"'<>,.?/_\u20B9]).{8,}$",
|
|
33
|
+
PhoneNumber = "^(\\+84|0)([235789])([0-9]{8,9})$",
|
|
34
|
+
SeqNum = "^(100|[0-9]{1,2})$",
|
|
35
|
+
LinkBasemap = "(https://www.|http://www.|https://|http://)?[a-zA-Z]{2,}(.[a-zA-Z]{2,})(.[a-zA-Z]{2,})?/[a-zA-Z0-9]{2,}|((https://www.|http://www.|https://|http://)?[a-zA-Z]{2,}(.[a-zA-Z]{2,})(.[a-zA-Z]{2,})?)|(https://www.|http://www.|https://|http://)?[a-zA-Z0-9]{2,}.[a-zA-Z0-9]{2,}.[a-zA-Z0-9]{2,}(.[a-zA-Z0-9]{2,})?",
|
|
36
|
+
AlphaDashBreakLineVN = "^[0-9a-zA-Z_ \u00C0\u00C1\u00C2\u00C3\u00C8\u00C9\u00CA\u00CC\u00CD\u00D2\u00D3\u00D4\u00D5\u00D9\u00DA\u0102\u0110\u0128\u0168\u01A0\u00E0\u00E1\u00E2\u00E3\u00E8\u00E9\u00EA\u00EC\u00ED\u00F2\u00F3\u00F4\u00F5\u00F9\u00FA\u0103\u0111\u0129\u0169\u01A1\u01AF\u0102\u1EA0\u1EA2\u1EA4\u1EA6\u1EA8\u1EAA\u1EAC\u1EAE\u1EB0\u1EB2\u1EB4\u1EB6\u1EB8\u1EBA\u1EBC\u1EC0\u1EC0\u1EC2\u1EBE\u01B0\u0103\u1EA1\u1EA3\u1EA5\u1EA7\u1EA9\u1EAB\u1EAD\u1EAF\u1EB1\u1EB3\u1EB5\u1EB7\u1EB9\u1EBB\u1EBD\u1EC1\u1EC1\u1EC3\u1EBF\u1EC4\u1EC6\u1EC8\u1ECA\u1ECC\u1ECE\u1ED0\u1ED2\u1ED4\u1ED6\u1ED8\u1EDA\u1EDC\u1EDE\u1EE0\u1EE2\u1EE4\u1EE6\u1EE8\u1EEA\u1EC5\u1EC7\u1EC9\u1ECB\u1ECD\u1ECF\u1ED1\u1ED3\u1ED5\u1ED7\u1ED9\u1EDB\u1EDD\u1EDF\u1EE1\u1EE3\u1EE5\u1EE7\u1EE9\u1EEB\u1EEC\u1EEE\u1EF0\u1EF2\u1EF4\u00DD\u1EF6\u1EF8\u1EED\u1EEF\u1EF1\u1EF3\u1EF5\u00FD\u1EF7\u1EF9\\.+,:%&=;s.\\/\\-_'\\(\\)\n]+$",
|
|
37
|
+
Fax = "^(\\+?\\d{1,4}[\\s-]?)?(\\(?\\d{2,4}\\)?[\\s-]?)?[\\d\\s-]{5,15}$"
|
|
38
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
5
|
-
export * from
|
|
6
|
-
export * from
|
|
7
|
-
export * from
|
|
1
|
+
export * from "./api-config.model";
|
|
2
|
+
export * from "./field-dependency.model";
|
|
3
|
+
export * from "./api-response.model";
|
|
4
|
+
export * from "./object-storage.model";
|
|
5
|
+
export * from "./output-value-type.model";
|
|
6
|
+
export * from "./file-config.model";
|
|
7
|
+
export * from "./view-mode.model";
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { DateRangeOutputValueType } from
|
|
2
|
-
import { BaseDateField } from
|
|
1
|
+
import { DateRangeOutputValueType } from "../../common";
|
|
2
|
+
import { BaseDateField } from "./base-date-field.model";
|
|
3
3
|
/**
|
|
4
4
|
* Interface của Date type là Range.
|
|
5
5
|
*/
|
|
6
6
|
export declare class DateRangeField extends BaseDateField<string | string[] | Date[]> {
|
|
7
7
|
outputAs: DateRangeOutputValueType;
|
|
8
|
+
placeholders?: string[];
|
|
8
9
|
constructor(init: Partial<DateRangeField>);
|
|
9
10
|
getDefaultValue(): string[] | Date[];
|
|
10
11
|
toFormValue(modelValue: unknown): string[] | Date[];
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { EmbeddedProperty } from
|
|
1
|
+
import { EmbeddedProperty } from "ng-zorro-antd/grid";
|
|
2
2
|
export interface FieldGrid {
|
|
3
|
-
xs?: string | number | EmbeddedProperty;
|
|
4
|
-
sm?: string | number | EmbeddedProperty;
|
|
5
|
-
md?: string | number | EmbeddedProperty;
|
|
6
|
-
lg?: string | number | EmbeddedProperty;
|
|
7
|
-
xl?: string | number | EmbeddedProperty;
|
|
8
|
-
xxl?: string | number | EmbeddedProperty;
|
|
3
|
+
xs?: string | number | EmbeddedProperty | null;
|
|
4
|
+
sm?: string | number | EmbeddedProperty | null;
|
|
5
|
+
md?: string | number | EmbeddedProperty | null;
|
|
6
|
+
lg?: string | number | EmbeddedProperty | null;
|
|
7
|
+
xl?: string | number | EmbeddedProperty | null;
|
|
8
|
+
xxl?: string | number | EmbeddedProperty | null;
|
|
9
9
|
}
|