ngx-axis-appforge 0.0.76 → 0.0.77
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/axis-components/form/index.d.ts +1 -0
- package/axis-components/form-item/index.d.ts +4 -2
- package/core/index.d.ts +2 -1
- package/fesm2022/ngx-axis-appforge-axis-components-form-item.mjs +6 -1
- package/fesm2022/ngx-axis-appforge-axis-components-form-item.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-form.mjs +18 -1
- package/fesm2022/ngx-axis-appforge-axis-components-form.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-core.mjs +2 -1
- package/fesm2022/ngx-axis-appforge-core.mjs.map +1 -1
- package/package.json +97 -97
|
@@ -22,6 +22,7 @@ declare class Form extends ValueAccess<FormOptions> implements OnInit {
|
|
|
22
22
|
setInitValue(value: any): void;
|
|
23
23
|
ngOnInit(): void;
|
|
24
24
|
registerControl(opt: RegisteFormControlOptions): void;
|
|
25
|
+
unregisterControl(name: string): void;
|
|
25
26
|
reset(emitEvent?: boolean): void;
|
|
26
27
|
onEvents(e: EventHandlerOptions<any>): Observable<boolean> | undefined;
|
|
27
28
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<Form, never>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
|
-
import { OnInit } from '@angular/core';
|
|
2
|
+
import { OnInit, OnDestroy } from '@angular/core';
|
|
3
3
|
import * as _angular_forms from '@angular/forms';
|
|
4
4
|
import { ValidatorFn } from '@angular/forms';
|
|
5
5
|
import { BaseOptions, Base, RegisteValueAccessOptions } from 'ngx-axis-appforge/core';
|
|
@@ -12,10 +12,11 @@ declare class FormItemOptions extends BaseOptions {
|
|
|
12
12
|
readonly child: _angular_core.WritableSignal<any>;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
declare class FormItem extends Base<FormItemOptions> implements OnInit {
|
|
15
|
+
declare class FormItem extends Base<FormItemOptions> implements OnInit, OnDestroy {
|
|
16
16
|
constructor();
|
|
17
17
|
options: FormItemOptions;
|
|
18
18
|
private readonly registe;
|
|
19
|
+
private readonly unregiste;
|
|
19
20
|
private readonly fb;
|
|
20
21
|
readonly control: _angular_forms.FormControl<null | undefined>;
|
|
21
22
|
readonly value: _angular_core.ModelSignal<any>;
|
|
@@ -27,6 +28,7 @@ declare class FormItem extends Base<FormItemOptions> implements OnInit {
|
|
|
27
28
|
private buildSnapshotValidators;
|
|
28
29
|
private buildValidators;
|
|
29
30
|
registeValueAccess(opt: RegisteValueAccessOptions): void;
|
|
31
|
+
ngOnDestroy(): void;
|
|
30
32
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<FormItem, never>;
|
|
31
33
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<FormItem, "axis-form-item", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; }, never, never, true, never>;
|
|
32
34
|
}
|
package/core/index.d.ts
CHANGED
|
@@ -541,6 +541,7 @@ declare const AXIS_HTTP_CONTEXT_DATA_TOKEN: InjectionToken<{
|
|
|
541
541
|
[key: string]: any;
|
|
542
542
|
} | BehaviorSubject<any>>;
|
|
543
543
|
declare const AXIS_FORM_REGISTE_CONTROL_TOKEN: InjectionToken<(opt: RegisteFormControlOptions) => void>;
|
|
544
|
+
declare const AXIS_FORM_UNREGISTE_CONTROL_TOKEN: InjectionToken<(opt: string) => void>;
|
|
544
545
|
declare const AXIS_FILE_BASE_URL_TOKEN: InjectionToken<string | BehaviorSubject<string>>;
|
|
545
546
|
declare const AXIS_HTTP_CONTEXT_TOKEN: HttpContextToken<{
|
|
546
547
|
[key: string]: any;
|
|
@@ -862,5 +863,5 @@ declare function fn(fnBody: string, argsObj: any, ignoreUndefined?: boolean, pri
|
|
|
862
863
|
|
|
863
864
|
declare function sendApi(opt: ApiOptions, http: HttpClient): Observable<any>;
|
|
864
865
|
|
|
865
|
-
export { AXIS_COMPONENTS_LOADER_TOKEN, AXIS_COMPONENTS_TOKEN, AXIS_CURRENT_USER_PERMISSIONS_TOKEN, AXIS_DESIGN_ALL_PERMISSIONS_TOKEN, AXIS_DESIGN_CAN_LOOP_TOKEN, AXIS_DESIGN_CHOOSE_COMPONENT_FUNC_TOKEN, AXIS_DESIGN_CMPLIBS_TOKEN, AXIS_DESIGN_COMPONENT_INFO_FOR_SETTING_TOKEN, AXIS_DESIGN_COMPONENT_REF_FOR_SETTING_TOKEN, AXIS_DESIGN_COMPONENT_REF_GETTER_TOKEN, AXIS_DESIGN_OPTIONS_NODE_FOR_MENU, AXIS_DESIGN_SCOPE_INFOS_GETTER_TOKEN, AXIS_EVENT_HANDLERS_TOKEN, AXIS_EVENT_HANDLER_DESCS_TOKEN, AXIS_FILE_BASE_URL_TOKEN, AXIS_FORM_REGISTE_CONTROL_TOKEN, AXIS_HTTP_CONTEXT_DATA_TOKEN, AXIS_HTTP_CONTEXT_TOKEN, AXIS_INJECT_DATA_TOKEN, AXIS_INJECT_FUNC_TOKEN, AXIS_SCRIPTS_TOKEN, Base, BaseDesignSetting, BaseMenu, BaseOptions, CommonMenu, ComponentsLoader, DataHandler, DataOptions, DesignBuilder, DynamicDirective, ElementNode, FilteredTreeResult, FormValidators, FunField, FunFieldBase, FunFieldValueBase, HowLongPipe, InputTrigger, InputValidator, OptionsNode, ScopeDirective, SimpleMenu, ValueAccess, ValueAccessOptions, ValueDesignSetting, assignDefaultField, baseFbConfig, baseFunField, buildValidators, codeName, copy, deepMerge, fn, isEquals, listSort, nameCode, obj2Arr, objDiff, rebuildObject, recursionArray, recursionObject, sendApi, trackByFn, updateAndValidAll, valueFbConfig, valueFunField };
|
|
866
|
+
export { AXIS_COMPONENTS_LOADER_TOKEN, AXIS_COMPONENTS_TOKEN, AXIS_CURRENT_USER_PERMISSIONS_TOKEN, AXIS_DESIGN_ALL_PERMISSIONS_TOKEN, AXIS_DESIGN_CAN_LOOP_TOKEN, AXIS_DESIGN_CHOOSE_COMPONENT_FUNC_TOKEN, AXIS_DESIGN_CMPLIBS_TOKEN, AXIS_DESIGN_COMPONENT_INFO_FOR_SETTING_TOKEN, AXIS_DESIGN_COMPONENT_REF_FOR_SETTING_TOKEN, AXIS_DESIGN_COMPONENT_REF_GETTER_TOKEN, AXIS_DESIGN_OPTIONS_NODE_FOR_MENU, AXIS_DESIGN_SCOPE_INFOS_GETTER_TOKEN, AXIS_EVENT_HANDLERS_TOKEN, AXIS_EVENT_HANDLER_DESCS_TOKEN, AXIS_FILE_BASE_URL_TOKEN, AXIS_FORM_REGISTE_CONTROL_TOKEN, AXIS_FORM_UNREGISTE_CONTROL_TOKEN, AXIS_HTTP_CONTEXT_DATA_TOKEN, AXIS_HTTP_CONTEXT_TOKEN, AXIS_INJECT_DATA_TOKEN, AXIS_INJECT_FUNC_TOKEN, AXIS_SCRIPTS_TOKEN, Base, BaseDesignSetting, BaseMenu, BaseOptions, CommonMenu, ComponentsLoader, DataHandler, DataOptions, DesignBuilder, DynamicDirective, ElementNode, FilteredTreeResult, FormValidators, FunField, FunFieldBase, FunFieldValueBase, HowLongPipe, InputTrigger, InputValidator, OptionsNode, ScopeDirective, SimpleMenu, ValueAccess, ValueAccessOptions, ValueDesignSetting, assignDefaultField, baseFbConfig, baseFunField, buildValidators, codeName, copy, deepMerge, fn, isEquals, listSort, nameCode, obj2Arr, objDiff, rebuildObject, recursionArray, recursionObject, sendApi, trackByFn, updateAndValidAll, valueFbConfig, valueFunField };
|
|
866
867
|
export type { Cmplib, DataSourceOptions, DesignBindElementsResult, DesignBuildResult, DesignConfig, DynamicFnOptions, EventDesc, EventHandlerDesc, EventHandlerDescGroup, EventHandlerOptions, EventsHandler, Example, ExampleBuilder, ExampleDesc, ExampleGroup, FlatNode, FunFieldOptions, FunFieldValue, MyErrorsOptions, MyValidationErrors, NextInfo, OptionsChangeEvent, RegisteFormControlOptions, RegisteValueAccessOptions, ScopeInfo, TriggeEventsOptions };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { signal, effect, inject, model, computed, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
-
import { BaseOptions, Base, AXIS_FORM_REGISTE_CONTROL_TOKEN, FormValidators, buildValidators, DynamicDirective } from 'ngx-axis-appforge/core';
|
|
3
|
+
import { BaseOptions, Base, AXIS_FORM_REGISTE_CONTROL_TOKEN, AXIS_FORM_UNREGISTE_CONTROL_TOKEN, FormValidators, buildValidators, DynamicDirective } from 'ngx-axis-appforge/core';
|
|
4
4
|
import * as i2 from 'ng-zorro-antd/form';
|
|
5
5
|
import { NzFormModule } from 'ng-zorro-antd/form';
|
|
6
6
|
import * as i3 from '@angular/forms';
|
|
@@ -36,6 +36,7 @@ class FormItem extends Base {
|
|
|
36
36
|
}
|
|
37
37
|
options = new FormItemOptions();
|
|
38
38
|
registe = inject(AXIS_FORM_REGISTE_CONTROL_TOKEN, { optional: true });
|
|
39
|
+
unregiste = inject(AXIS_FORM_UNREGISTE_CONTROL_TOKEN, { optional: true });
|
|
39
40
|
fb = inject(FormBuilder);
|
|
40
41
|
control = this.fb.control(undefined);
|
|
41
42
|
value = model(...(ngDevMode ? [undefined, { debugName: "value" }] : []));
|
|
@@ -81,6 +82,10 @@ class FormItem extends Base {
|
|
|
81
82
|
this.validatorSignal.set(this.buildSnapshotValidators());
|
|
82
83
|
}
|
|
83
84
|
}
|
|
85
|
+
ngOnDestroy() {
|
|
86
|
+
super.ngOnDestroy();
|
|
87
|
+
this.unregiste?.(this.options.name);
|
|
88
|
+
}
|
|
84
89
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: FormItem, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
85
90
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: FormItem, isStandalone: true, selector: "axis-form-item", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, usesInheritance: true, ngImport: i0, template: "@if (options.label()) {\n<nz-form-item style=\"width: 100%;display:flex\">\n <nz-form-label [style.width]=\"options.labelWidth()\" [nzRequired]=\"isRequired()\">\n {{options.label()}}\n </nz-form-label>\n <nz-form-control style=\"flex:1;overflow: hidden;\" [nzValidateStatus]=\"control\">\n <ng-container [axisDynamic]=\"options.child()\" (onRegisteValueAccess)=\"registeValueAccess($event)\"\n [(ngModel)]=\"value\" (ngModelChange)=\"onModelChange($event)\"></ng-container>\n </nz-form-control>\n</nz-form-item>\n}@else {\n<nz-form-item class=\"nolabel-item\">\n <nz-form-control [nzValidateStatus]=\"control\">\n <ng-container [axisDynamic]=\"options.child()\" (onRegisteValueAccess)=\"registeValueAccess($event)\"\n [(ngModel)]=\"value\" (ngModelChange)=\"onModelChange($event)\"></ng-container>\n </nz-form-control>\n</nz-form-item>\n}", styles: [":host{display:block;width:100%}.nolabel-item{margin:0;height:100%}.nolabel-item ::ng-deep .ant-form-item-control-input,.nolabel-item ::ng-deep .ant-form-item-control-input-content{height:100%}\n"], dependencies: [{ kind: "ngmodule", type: NzFormModule }, { kind: "directive", type: i1.NzColDirective, selector: "[nz-col],nz-col,nz-form-control,nz-form-label", inputs: ["nzFlex", "nzSpan", "nzOrder", "nzOffset", "nzPush", "nzPull", "nzXs", "nzSm", "nzMd", "nzLg", "nzXl", "nzXXl"], exportAs: ["nzCol"] }, { kind: "directive", type: i1.NzRowDirective, selector: "[nz-row],nz-row,nz-form-item", inputs: ["nzAlign", "nzJustify", "nzGutter"], exportAs: ["nzRow"] }, { kind: "component", type: i2.NzFormItemComponent, selector: "nz-form-item", exportAs: ["nzFormItem"] }, { kind: "component", type: i2.NzFormLabelComponent, selector: "nz-form-label", inputs: ["nzFor", "nzRequired", "nzNoColon", "nzTooltipTitle", "nzTooltipIcon", "nzLabelAlign", "nzLabelWrap"], exportAs: ["nzFormLabel"] }, { kind: "component", type: i2.NzFormControlComponent, selector: "nz-form-control", inputs: ["nzSuccessTip", "nzWarningTip", "nzErrorTip", "nzValidatingTip", "nzExtra", "nzAutoTips", "nzDisableAutoTips", "nzHasFeedback", "nzValidateStatus"], exportAs: ["nzFormControl"] }, { kind: "directive", type: DynamicDirective, selector: "[axisDynamic]", inputs: ["axisDynamic", "standalone", "isDesign", "forceRenderOnChange"], outputs: ["onRegisteValueAccess"], exportAs: ["axisDynamic"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
86
91
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-axis-appforge-axis-components-form-item.mjs","sources":["../../../axis-components/form-item/form-item.options.ts","../../../axis-components/form-item/form-item.ts","../../../axis-components/form-item/form-item.html","../../../axis-components/form-item/ngx-axis-appforge-axis-components-form-item.ts"],"sourcesContent":["import { signal } from \"@angular/core\";\nimport { BaseOptions } from \"ngx-axis-appforge/core\";\n\nexport class FormItemOptions extends BaseOptions {\n\n readonly name = \"\";\n readonly label = signal(\"\");\n readonly labelWidth = signal(\"120px\");\n readonly validators = signal<any[]>([]);\n readonly child = signal<any>(undefined);\n\n}","import { ChangeDetectionStrategy, Component, computed, effect, inject, model, OnInit, signal } from '@angular/core';\nimport { FormItemOptions } from './form-item.options';\nimport { AXIS_FORM_REGISTE_CONTROL_TOKEN, Base, buildValidators, DynamicDirective, FormValidators, RegisteValueAccessOptions } from 'ngx-axis-appforge/core';\nimport { NzFormModule } from 'ng-zorro-antd/form';\nimport { FormBuilder, FormsModule, ValidatorFn } from '@angular/forms';\nimport { debounceTime, merge, NEVER } from 'rxjs';\
|
|
1
|
+
{"version":3,"file":"ngx-axis-appforge-axis-components-form-item.mjs","sources":["../../../axis-components/form-item/form-item.options.ts","../../../axis-components/form-item/form-item.ts","../../../axis-components/form-item/form-item.html","../../../axis-components/form-item/ngx-axis-appforge-axis-components-form-item.ts"],"sourcesContent":["import { signal } from \"@angular/core\";\nimport { BaseOptions } from \"ngx-axis-appforge/core\";\n\nexport class FormItemOptions extends BaseOptions {\n\n readonly name = \"\";\n readonly label = signal(\"\");\n readonly labelWidth = signal(\"120px\");\n readonly validators = signal<any[]>([]);\n readonly child = signal<any>(undefined);\n\n}","import { ChangeDetectionStrategy, Component, computed, effect, inject, model, OnDestroy, OnInit, signal } from '@angular/core';\nimport { FormItemOptions } from './form-item.options';\nimport { AXIS_FORM_REGISTE_CONTROL_TOKEN, AXIS_FORM_UNREGISTE_CONTROL_TOKEN, Base, buildValidators, DynamicDirective, FormValidators, RegisteValueAccessOptions } from 'ngx-axis-appforge/core';\nimport { NzFormModule } from 'ng-zorro-antd/form';\nimport { FormBuilder, FormsModule, ValidatorFn } from '@angular/forms';\nimport { debounceTime, merge, NEVER } from 'rxjs';\n\n@Component({\n selector: 'axis-form-item',\n imports: [NzFormModule, DynamicDirective, FormsModule],\n templateUrl: './form-item.html',\n styleUrl: './form-item.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class FormItem extends Base<FormItemOptions> implements OnInit, OnDestroy {\n\n constructor() {\n super();\n if (this.getScope()) {\n effect(() => {\n this.control.setValidators(this.validatorSignal() ?? null);\n });\n effect(() => {\n this.validatorSignal.set(this.buildSnapshotValidators());\n this.unsubscribe([\"validatorsChange\"]);\n this.addSubscribe(merge(...this.options.validators().map(v => this.getScope()!.dynamicOptions(v)?.obs ?? NEVER))\n .pipe(debounceTime(50))\n .subscribe(_ => {\n this.validatorSignal.set(this.buildSnapshotValidators());\n }), \"validatorsChange\");\n });\n }\n }\n\n override options: FormItemOptions = new FormItemOptions();\n private readonly registe = inject(AXIS_FORM_REGISTE_CONTROL_TOKEN, { optional: true });\n private readonly unregiste = inject(AXIS_FORM_UNREGISTE_CONTROL_TOKEN, { optional: true });\n private readonly fb = inject(FormBuilder);\n readonly control = this.fb.control(undefined);\n readonly value = model<any>();\n readonly validatorSignal = signal<ValidatorFn[]>([]);\n readonly isRequired = computed(() => this.validatorSignal().includes(FormValidators.required));\n private valueAccessValidFn?: ValidatorFn;\n\n ngOnInit(): void {\n if (this.options.name) {\n this.control.registerOnChange((v: any) => {\n this.value.set(v);\n });\n this.registe?.({\n name: this.options.name,\n control: this.control,\n });\n }\n }\n\n onModelChange(value: any) {\n if (this.options.name) {\n this.control.markAsDirty();\n this.control.setValue(value);\n }\n }\n\n private buildSnapshotValidators(): ValidatorFn[] {\n return this.buildValidators(this.options.validators().map(v => this.getScope()!.snapshotOptions(v)));\n }\n\n private buildValidators(validators: any[]): ValidatorFn[] {\n let output: ValidatorFn[] = [];\n if (this.valueAccessValidFn) {\n output.push(this.valueAccessValidFn);\n }\n return output.concat(buildValidators(validators));\n }\n\n registeValueAccess(opt: RegisteValueAccessOptions) {\n if (opt.initValue !== undefined) {\n this.registe?.({\n name: this.options.name,\n initValue: opt.initValue\n });\n }\n if (opt.validFn) {\n this.valueAccessValidFn = (c) => opt.validFn!(c) ? null : { error: true };\n this.validatorSignal.set(this.buildSnapshotValidators());\n }\n }\n\n override ngOnDestroy(): void {\n super.ngOnDestroy();\n this.unregiste?.(this.options.name);\n }\n\n}","@if (options.label()) {\n<nz-form-item style=\"width: 100%;display:flex\">\n <nz-form-label [style.width]=\"options.labelWidth()\" [nzRequired]=\"isRequired()\">\n {{options.label()}}\n </nz-form-label>\n <nz-form-control style=\"flex:1;overflow: hidden;\" [nzValidateStatus]=\"control\">\n <ng-container [axisDynamic]=\"options.child()\" (onRegisteValueAccess)=\"registeValueAccess($event)\"\n [(ngModel)]=\"value\" (ngModelChange)=\"onModelChange($event)\"></ng-container>\n </nz-form-control>\n</nz-form-item>\n}@else {\n<nz-form-item class=\"nolabel-item\">\n <nz-form-control [nzValidateStatus]=\"control\">\n <ng-container [axisDynamic]=\"options.child()\" (onRegisteValueAccess)=\"registeValueAccess($event)\"\n [(ngModel)]=\"value\" (ngModelChange)=\"onModelChange($event)\"></ng-container>\n </nz-form-control>\n</nz-form-item>\n}","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './form-item';\n"],"names":[],"mappings":";;;;;;;;;;AAGM,MAAO,eAAgB,SAAQ,WAAW,CAAA;IAEnC,IAAI,GAAG,EAAE;AACT,IAAA,KAAK,GAAG,MAAM,CAAC,EAAE,iDAAC;AAClB,IAAA,UAAU,GAAG,MAAM,CAAC,OAAO,sDAAC;AAC5B,IAAA,UAAU,GAAG,MAAM,CAAQ,EAAE,sDAAC;AAC9B,IAAA,KAAK,GAAG,MAAM,CAAM,SAAS,iDAAC;AAE1C;;ACGK,MAAO,QAAS,SAAQ,IAAqB,CAAA;AAEjD,IAAA,WAAA,GAAA;AACE,QAAA,KAAK,EAAE;AACP,QAAA,IAAI,IAAI,CAAC,QAAQ,EAAE,EAAE;YACnB,MAAM,CAAC,MAAK;AACV,gBAAA,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,IAAI,CAAC,eAAe,EAAE,IAAI,IAAI,CAAC;AAC5D,YAAA,CAAC,CAAC;YACF,MAAM,CAAC,MAAK;gBACV,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,IAAI,CAAC,uBAAuB,EAAE,CAAC;AACxD,gBAAA,IAAI,CAAC,WAAW,CAAC,CAAC,kBAAkB,CAAC,CAAC;AACtC,gBAAA,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC,GAAG,CAAC,CAAC,IAAI,IAAI,CAAC,QAAQ,EAAG,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE,GAAG,IAAI,KAAK,CAAC;AAC5G,qBAAA,IAAI,CAAC,YAAY,CAAC,EAAE,CAAC;qBACrB,SAAS,CAAC,CAAC,IAAG;oBACb,IAAI,CAAC,eAAe,CAAC,GA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AAA,EAAA,EAAA,CAAA,sBAAA,EAAA,QAAA,EAAA,iBAAA,EAAA,MAAA,EAAA,CAAA,cAAA,EAAA,cAAA,EAAA,YAAA,EAAA,iBAAA,EAAA,SAAA,EAAA,YAAA,EAAA,mBAAA,EAAA,eAAA,EAAA,kBAAA,CAAA,EAAA,QAAA,EAAA,CAAA,eAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,gBAAgB,iMAAE,WAAW,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,eAAA,EAAA,QAAA,EAAA,2CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,OAAA,EAAA,QAAA,EAAA,qDAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,UAAA,EAAA,SAAA,EAAA,gBAAA,CAAA,EAAA,OAAA,EAAA,CAAA,eAAA,CAAA,EAAA,QAAA,EAAA,CAAA,SAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FAK1C,QAAQ,EAAA,UAAA,EAAA,CAAA;kBAPpB,SAAS;+BACE,gBAAgB,EAAA,OAAA,EACjB,CAAC,YAAY,EAAE,gBAAgB,EAAE,WAAW,CAAC,EAAA,eAAA,EAGrC,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,s4BAAA,EAAA,MAAA,EAAA,CAAA,oMAAA,CAAA,EAAA;;;AEZjD;;AAEG;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { signal, inject, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
-
import { ValueAccessOptions, ValueAccess, updateAndValidAll, DynamicDirective, AXIS_FORM_REGISTE_CONTROL_TOKEN } from 'ngx-axis-appforge/core';
|
|
3
|
+
import { ValueAccessOptions, ValueAccess, updateAndValidAll, DynamicDirective, AXIS_FORM_REGISTE_CONTROL_TOKEN, AXIS_FORM_UNREGISTE_CONTROL_TOKEN } from 'ngx-axis-appforge/core';
|
|
4
4
|
import * as i1 from '@angular/forms';
|
|
5
5
|
import { FormBuilder, ReactiveFormsModule } from '@angular/forms';
|
|
6
6
|
import { bufferWhen, debounceTime, map, Subject, of } from 'rxjs';
|
|
@@ -76,6 +76,9 @@ class Form extends ValueAccess {
|
|
|
76
76
|
this.resetSubject.next(false);
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
|
+
unregisterControl(name) {
|
|
80
|
+
this.fg.removeControl(name);
|
|
81
|
+
}
|
|
79
82
|
reset(emitEvent = false) {
|
|
80
83
|
this.fg.reset(this.oriValue, { emitEvent: emitEvent, onlySelf: true });
|
|
81
84
|
if (!emitEvent && this.options.emitInitEvent()) {
|
|
@@ -127,6 +130,13 @@ class Form extends ValueAccess {
|
|
|
127
130
|
return form.registerControl.bind(form);
|
|
128
131
|
},
|
|
129
132
|
deps: [Form]
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
provide: AXIS_FORM_UNREGISTE_CONTROL_TOKEN,
|
|
136
|
+
useFactory: (form) => {
|
|
137
|
+
return form.unregisterControl.bind(form);
|
|
138
|
+
},
|
|
139
|
+
deps: [Form]
|
|
130
140
|
}
|
|
131
141
|
], usesInheritance: true, ngImport: i0, template: "<form [formGroup]=\"fg\" style=\"height: 100%;\">\n <ng-container [axisDynamic]=\"options.child()\"></ng-container>\n</form>", styles: [":host{display:block}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: DynamicDirective, selector: "[axisDynamic]", inputs: ["axisDynamic", "standalone", "isDesign", "forceRenderOnChange"], outputs: ["onRegisteValueAccess"], exportAs: ["axisDynamic"] }, { kind: "ngmodule", type: NzModalModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
132
142
|
}
|
|
@@ -139,6 +149,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImpor
|
|
|
139
149
|
return form.registerControl.bind(form);
|
|
140
150
|
},
|
|
141
151
|
deps: [Form]
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
provide: AXIS_FORM_UNREGISTE_CONTROL_TOKEN,
|
|
155
|
+
useFactory: (form) => {
|
|
156
|
+
return form.unregisterControl.bind(form);
|
|
157
|
+
},
|
|
158
|
+
deps: [Form]
|
|
142
159
|
}
|
|
143
160
|
], template: "<form [formGroup]=\"fg\" style=\"height: 100%;\">\n <ng-container [axisDynamic]=\"options.child()\"></ng-container>\n</form>", styles: [":host{display:block}\n"] }]
|
|
144
161
|
}], ctorParameters: () => [] });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-axis-appforge-axis-components-form.mjs","sources":["../../../axis-components/form/form.options.ts","../../../axis-components/form/form.ts","../../../axis-components/form/form.html","../../../axis-components/form/ngx-axis-appforge-axis-components-form.ts"],"sourcesContent":["import { signal } from \"@angular/core\";\nimport { ValueAccessOptions } from \"ngx-axis-appforge/core\";\n\nexport class FormOptions extends ValueAccessOptions {\n\n readonly submitConfirm = signal(true);\n readonly child = signal<any>(undefined);\n\n}","import { ChangeDetectionStrategy, Component, inject, OnInit } from '@angular/core';\nimport { AXIS_FORM_REGISTE_CONTROL_TOKEN, DynamicDirective, EventHandlerOptions, RegisteFormControlOptions, updateAndValidAll, ValueAccess } from 'ngx-axis-appforge/core';\nimport { FormOptions } from './form.options';\nimport { AbstractControl, FormBuilder, ReactiveFormsModule, UntypedFormGroup } from '@angular/forms';\nimport { bufferWhen, debounceTime, map, Observable, of, Subject } from 'rxjs';\nimport { NzModalModule, NzModalService } from 'ng-zorro-antd/modal';\n\n@Component({\n selector: 'axis-form',\n imports: [ReactiveFormsModule, DynamicDirective, NzModalModule],\n templateUrl: './form.html',\n styleUrl: './form.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: AXIS_FORM_REGISTE_CONTROL_TOKEN,\n useFactory: (form: Form) => {\n return form.registerControl.bind(form);\n },\n deps: [Form]\n }\n ]\n})\nexport class Form extends ValueAccess<FormOptions> implements OnInit {\n\n constructor() {\n super();\n this.addSubscribe(this.fg.valueChanges.subscribe(v => {\n this.value.set(v);\n this.onChange?.(v);\n }));\n this.addSubscribe(this.resetSubject.pipe(bufferWhen(() => this.resetSubject.pipe(debounceTime(50))), map(v => v.reduce((a, b) => a || b, false)))\n .subscribe(emitEvent => this.reset(emitEvent)));\n this.addSubscribe(this.fg.statusChanges.subscribe(_ => {\n const { valid, dirty } = this.fg\n this.triggeEvents(\"formStatusChange\", { status: { valid, dirty } }).subscribe();\n }))\n }\n\n override options: FormOptions = new FormOptions();\n private readonly fb = inject(FormBuilder);\n private readonly modal = inject(NzModalService);\n readonly fg: UntypedFormGroup = this.fb.group({});\n private oriFormValue: any;\n private oriValue: any;\n private resetSubject = new Subject<boolean>();\n\n override writeValue(value: any): void {\n super.writeValue(value);\n this.oriFormValue = value;\n this.oriValue = this.oriFormValue;\n this.resetSubject.next(false);\n }\n\n override setInitValue(value: any): void {\n super.setInitValue(value);\n if (this.options.initValue() !== undefined) {\n this.oriFormValue = this.options.initValue();\n this.oriValue = this.oriFormValue;\n this.resetSubject.next(false);\n }\n }\n\n ngOnInit(): void {\n this.registeValueAccess?.({\n validFn: (control: AbstractControl) => {\n return updateAndValidAll(this.fg, { markAsDirty: control.dirty })\n }\n })\n }\n\n registerControl(opt: RegisteFormControlOptions) {\n if (opt.control) {\n const oldControl = this.fg.get(opt.name);\n if (oldControl?.value != undefined) {\n opt.control.setValue(oldControl.value);\n }\n this.fg.setControl(opt.name, opt.control, { emitEvent: false });\n }\n if (this.fg.dirty) {\n if (opt.initValue !== undefined) {\n this.fg.patchValue({ [opt.name]: opt.initValue });\n }\n } else {\n if (this.oriFormValue?.[opt.name] === undefined && opt.initValue !== undefined) {\n this.oriValue = Object.assign({}, this.oriValue, { [opt.name]: opt.initValue });\n this.registeValueAccess?.({\n initValue: this.oriValue\n });\n }\n this.resetSubject.next(false);\n }\n }\n\n reset(emitEvent = false) {\n this.fg.reset(this.oriValue, { emitEvent: emitEvent, onlySelf: true });\n if (!emitEvent && this.options.emitInitEvent()) {\n this.triggeEvents(\"valueChange\", { value: this.fg.value }).subscribe();\n }\n if (!emitEvent) {\n const { valid, dirty } = this.fg\n this.triggeEvents(\"formStatusChange\", { status: { valid, dirty } }).subscribe();\n }\n }\n\n override onEvents(e: EventHandlerOptions<any>): Observable<boolean> | undefined {\n const obs = super.onEvents(e);\n if (obs) {\n return;\n }\n switch (e.name) {\n case \"validForm\":\n if (updateAndValidAll(this.fg)) {\n if (this.options.submitConfirm()) {\n const subject = new Subject<boolean>();\n this.modal.confirm({\n nzTitle: \"确定提交吗?\",\n nzOnOk: () => {\n this.triggeEvents(\"formValid\", { formValue: this.fg.value }, e.triggeEvents).subscribe(subject);\n },\n nzOnCancel: () => {\n subject.next(false);\n subject.complete();\n }\n });\n return subject.asObservable();\n } else {\n return this.triggeEvents(\"formValid\", { formValue: this.fg.value }, e.triggeEvents);\n }\n }\n return of(false);\n case \"resetForm\":\n this.reset(true);\n return of(true);\n }\n return undefined;\n }\n\n}\n","<form [formGroup]=\"fg\" style=\"height: 100%;\">\n <ng-container [axisDynamic]=\"options.child()\"></ng-container>\n</form>","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './form';\n"],"names":[],"mappings":";;;;;;;;AAGM,MAAO,WAAY,SAAQ,kBAAkB,CAAA;AAEtC,IAAA,aAAa,GAAG,MAAM,CAAC,IAAI,yDAA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AA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,gBAAgB,iMAAE,aAAa,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FAcnD,IAAI,EAAA,UAAA,EAAA,CAAA;kBAhBhB,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,WAAW,EAAA,OAAA,EACZ,CAAC,mBAAmB,EAAE,gBAAgB,EAAE,aAAa,CAAC,EAAA,eAAA,EAG9C,uBAAuB,CAAC,MAAM,EAAA,SAAA,EACpC;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,+BAA+B;AACxC,4BAAA,UAAU,EAAE,CAAC,IAAU,KAAI;gCACzB,OAAO,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC;4BACxC,CAAC;AACD,4BAAA,IAAI,EAAE,CAAA,IAAA;AACP;AACF,qBAAA,EAAA,QAAA,EAAA,iIAAA,EAAA,MAAA,EAAA,CAAA,wBAAA,CAAA,EAAA;;;AErBH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ngx-axis-appforge-axis-components-form.mjs","sources":["../../../axis-components/form/form.options.ts","../../../axis-components/form/form.ts","../../../axis-components/form/form.html","../../../axis-components/form/ngx-axis-appforge-axis-components-form.ts"],"sourcesContent":["import { signal } from \"@angular/core\";\nimport { ValueAccessOptions } from \"ngx-axis-appforge/core\";\n\nexport class FormOptions extends ValueAccessOptions {\n\n readonly submitConfirm = signal(true);\n readonly child = signal<any>(undefined);\n\n}","import { ChangeDetectionStrategy, Component, inject, OnInit } from '@angular/core';\nimport { AXIS_FORM_REGISTE_CONTROL_TOKEN, AXIS_FORM_UNREGISTE_CONTROL_TOKEN, DynamicDirective, EventHandlerOptions, RegisteFormControlOptions, updateAndValidAll, ValueAccess } from 'ngx-axis-appforge/core';\nimport { FormOptions } from './form.options';\nimport { AbstractControl, FormBuilder, ReactiveFormsModule, UntypedFormGroup } from '@angular/forms';\nimport { bufferWhen, debounceTime, map, Observable, of, Subject } from 'rxjs';\nimport { NzModalModule, NzModalService } from 'ng-zorro-antd/modal';\n\n@Component({\n selector: 'axis-form',\n imports: [ReactiveFormsModule, DynamicDirective, NzModalModule],\n templateUrl: './form.html',\n styleUrl: './form.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: AXIS_FORM_REGISTE_CONTROL_TOKEN,\n useFactory: (form: Form) => {\n return form.registerControl.bind(form);\n },\n deps: [Form]\n },\n {\n provide: AXIS_FORM_UNREGISTE_CONTROL_TOKEN,\n useFactory: (form: Form) => {\n return form.unregisterControl.bind(form);\n },\n deps: [Form]\n }\n ]\n})\nexport class Form extends ValueAccess<FormOptions> implements OnInit {\n\n constructor() {\n super();\n this.addSubscribe(this.fg.valueChanges.subscribe(v => {\n this.value.set(v);\n this.onChange?.(v);\n }));\n this.addSubscribe(this.resetSubject.pipe(bufferWhen(() => this.resetSubject.pipe(debounceTime(50))), map(v => v.reduce((a, b) => a || b, false)))\n .subscribe(emitEvent => this.reset(emitEvent)));\n this.addSubscribe(this.fg.statusChanges.subscribe(_ => {\n const { valid, dirty } = this.fg\n this.triggeEvents(\"formStatusChange\", { status: { valid, dirty } }).subscribe();\n }))\n }\n\n override options: FormOptions = new FormOptions();\n private readonly fb = inject(FormBuilder);\n private readonly modal = inject(NzModalService);\n readonly fg: UntypedFormGroup = this.fb.group({});\n private oriFormValue: any;\n private oriValue: any;\n private resetSubject = new Subject<boolean>();\n\n override writeValue(value: any): void {\n super.writeValue(value);\n this.oriFormValue = value;\n this.oriValue = this.oriFormValue;\n this.resetSubject.next(false);\n }\n\n override setInitValue(value: any): void {\n super.setInitValue(value);\n if (this.options.initValue() !== undefined) {\n this.oriFormValue = this.options.initValue();\n this.oriValue = this.oriFormValue;\n this.resetSubject.next(false);\n }\n }\n\n ngOnInit(): void {\n this.registeValueAccess?.({\n validFn: (control: AbstractControl) => {\n return updateAndValidAll(this.fg, { markAsDirty: control.dirty })\n }\n })\n }\n\n registerControl(opt: RegisteFormControlOptions) {\n if (opt.control) {\n const oldControl = this.fg.get(opt.name);\n if (oldControl?.value != undefined) {\n opt.control.setValue(oldControl.value);\n }\n this.fg.setControl(opt.name, opt.control, { emitEvent: false });\n }\n if (this.fg.dirty) {\n if (opt.initValue !== undefined) {\n this.fg.patchValue({ [opt.name]: opt.initValue });\n }\n } else {\n if (this.oriFormValue?.[opt.name] === undefined && opt.initValue !== undefined) {\n this.oriValue = Object.assign({}, this.oriValue, { [opt.name]: opt.initValue });\n this.registeValueAccess?.({\n initValue: this.oriValue\n });\n }\n this.resetSubject.next(false);\n }\n }\n\n unregisterControl(name: string) {\n this.fg.removeControl(name);\n }\n\n reset(emitEvent = false) {\n this.fg.reset(this.oriValue, { emitEvent: emitEvent, onlySelf: true });\n if (!emitEvent && this.options.emitInitEvent()) {\n this.triggeEvents(\"valueChange\", { value: this.fg.value }).subscribe();\n }\n if (!emitEvent) {\n const { valid, dirty } = this.fg\n this.triggeEvents(\"formStatusChange\", { status: { valid, dirty } }).subscribe();\n }\n }\n\n override onEvents(e: EventHandlerOptions<any>): Observable<boolean> | undefined {\n const obs = super.onEvents(e);\n if (obs) {\n return;\n }\n switch (e.name) {\n case \"validForm\":\n if (updateAndValidAll(this.fg)) {\n if (this.options.submitConfirm()) {\n const subject = new Subject<boolean>();\n this.modal.confirm({\n nzTitle: \"确定提交吗?\",\n nzOnOk: () => {\n this.triggeEvents(\"formValid\", { formValue: this.fg.value }, e.triggeEvents).subscribe(subject);\n },\n nzOnCancel: () => {\n subject.next(false);\n subject.complete();\n }\n });\n return subject.asObservable();\n } else {\n return this.triggeEvents(\"formValid\", { formValue: this.fg.value }, e.triggeEvents);\n }\n }\n return of(false);\n case \"resetForm\":\n this.reset(true);\n return of(true);\n }\n return undefined;\n }\n\n}\n","<form [formGroup]=\"fg\" style=\"height: 100%;\">\n <ng-container [axisDynamic]=\"options.child()\"></ng-container>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4BAC1C,CAAC;AACD,4BAAA,IAAI,EAAE,CAAA,IAAA;AACP;AACF,qBAAA,EAAA,QAAA,EAAA,iIAAA,EAAA,MAAA,EAAA,CAAA,wBAAA,CAAA,EAAA;;;AE5BH;;AAEG;;;;"}
|
|
@@ -81,6 +81,7 @@ const AXIS_INJECT_FUNC_TOKEN = new InjectionToken('axis.injectFunc');
|
|
|
81
81
|
const AXIS_CURRENT_USER_PERMISSIONS_TOKEN = new InjectionToken('axis.currentUserPermissions');
|
|
82
82
|
const AXIS_HTTP_CONTEXT_DATA_TOKEN = new InjectionToken('axis.httpContextData');
|
|
83
83
|
const AXIS_FORM_REGISTE_CONTROL_TOKEN = new InjectionToken('axis.form.registeControl');
|
|
84
|
+
const AXIS_FORM_UNREGISTE_CONTROL_TOKEN = new InjectionToken('axis.form.unregisteControl');
|
|
84
85
|
const AXIS_FILE_BASE_URL_TOKEN = new InjectionToken('axis.fileBaseUrl');
|
|
85
86
|
const AXIS_HTTP_CONTEXT_TOKEN = new HttpContextToken(() => ({}));
|
|
86
87
|
|
|
@@ -3824,5 +3825,5 @@ function nameCode(name, code) {
|
|
|
3824
3825
|
* Generated bundle index. Do not edit.
|
|
3825
3826
|
*/
|
|
3826
3827
|
|
|
3827
|
-
export { AXIS_COMPONENTS_LOADER_TOKEN, AXIS_COMPONENTS_TOKEN, AXIS_CURRENT_USER_PERMISSIONS_TOKEN, AXIS_DESIGN_ALL_PERMISSIONS_TOKEN, AXIS_DESIGN_CAN_LOOP_TOKEN, AXIS_DESIGN_CHOOSE_COMPONENT_FUNC_TOKEN, AXIS_DESIGN_CMPLIBS_TOKEN, AXIS_DESIGN_COMPONENT_INFO_FOR_SETTING_TOKEN, AXIS_DESIGN_COMPONENT_REF_FOR_SETTING_TOKEN, AXIS_DESIGN_COMPONENT_REF_GETTER_TOKEN, AXIS_DESIGN_OPTIONS_NODE_FOR_MENU, AXIS_DESIGN_SCOPE_INFOS_GETTER_TOKEN, AXIS_EVENT_HANDLERS_TOKEN, AXIS_EVENT_HANDLER_DESCS_TOKEN, AXIS_FILE_BASE_URL_TOKEN, AXIS_FORM_REGISTE_CONTROL_TOKEN, AXIS_HTTP_CONTEXT_DATA_TOKEN, AXIS_HTTP_CONTEXT_TOKEN, AXIS_INJECT_DATA_TOKEN, AXIS_INJECT_FUNC_TOKEN, AXIS_SCRIPTS_TOKEN, Base, BaseDesignSetting, BaseMenu, BaseOptions, CommonMenu, ComponentsLoader, DataHandler, DataOptions, DesignBuilder, DynamicDirective, ElementNode, FilteredTreeResult, FormValidators, FunField, FunFieldBase, FunFieldValueBase, HowLongPipe, InputTrigger, InputValidator, OptionsNode, ScopeDirective, SimpleMenu, ValueAccess, ValueAccessOptions, ValueDesignSetting, assignDefaultField, baseFbConfig, baseFunField, buildValidators, codeName, copy, deepMerge, fn, isEquals, listSort, nameCode, obj2Arr, objDiff, rebuildObject, recursionArray, recursionObject, sendApi, trackByFn, updateAndValidAll, valueFbConfig, valueFunField };
|
|
3828
|
+
export { AXIS_COMPONENTS_LOADER_TOKEN, AXIS_COMPONENTS_TOKEN, AXIS_CURRENT_USER_PERMISSIONS_TOKEN, AXIS_DESIGN_ALL_PERMISSIONS_TOKEN, AXIS_DESIGN_CAN_LOOP_TOKEN, AXIS_DESIGN_CHOOSE_COMPONENT_FUNC_TOKEN, AXIS_DESIGN_CMPLIBS_TOKEN, AXIS_DESIGN_COMPONENT_INFO_FOR_SETTING_TOKEN, AXIS_DESIGN_COMPONENT_REF_FOR_SETTING_TOKEN, AXIS_DESIGN_COMPONENT_REF_GETTER_TOKEN, AXIS_DESIGN_OPTIONS_NODE_FOR_MENU, AXIS_DESIGN_SCOPE_INFOS_GETTER_TOKEN, AXIS_EVENT_HANDLERS_TOKEN, AXIS_EVENT_HANDLER_DESCS_TOKEN, AXIS_FILE_BASE_URL_TOKEN, AXIS_FORM_REGISTE_CONTROL_TOKEN, AXIS_FORM_UNREGISTE_CONTROL_TOKEN, AXIS_HTTP_CONTEXT_DATA_TOKEN, AXIS_HTTP_CONTEXT_TOKEN, AXIS_INJECT_DATA_TOKEN, AXIS_INJECT_FUNC_TOKEN, AXIS_SCRIPTS_TOKEN, Base, BaseDesignSetting, BaseMenu, BaseOptions, CommonMenu, ComponentsLoader, DataHandler, DataOptions, DesignBuilder, DynamicDirective, ElementNode, FilteredTreeResult, FormValidators, FunField, FunFieldBase, FunFieldValueBase, HowLongPipe, InputTrigger, InputValidator, OptionsNode, ScopeDirective, SimpleMenu, ValueAccess, ValueAccessOptions, ValueDesignSetting, assignDefaultField, baseFbConfig, baseFunField, buildValidators, codeName, copy, deepMerge, fn, isEquals, listSort, nameCode, obj2Arr, objDiff, rebuildObject, recursionArray, recursionObject, sendApi, trackByFn, updateAndValidAll, valueFbConfig, valueFunField };
|
|
3828
3829
|
//# sourceMappingURL=ngx-axis-appforge-core.mjs.map
|