ngx-formly-zorro-antd 16.1.2 → 16.1.4
Sign up to get free protection for your applications and to get access to all the features.
- package/cascader/cascader.module.d.ts +4 -3
- package/cascader/cascader.type.d.ts +18 -5
- package/esm2022/cascader/cascader.module.mjs +5 -1
- package/esm2022/cascader/cascader.type.mjs +41 -21
- package/esm2022/lib/ui-ng-zorro-antd.module.mjs +8 -4
- package/esm2022/radio/radio.type.mjs +1 -3
- package/esm2022/ref-template/ngx-formly-zorro-antd-ref-template.mjs +5 -0
- package/esm2022/ref-template/public_api.mjs +3 -0
- package/esm2022/ref-template/ref-template.module.mjs +44 -0
- package/esm2022/ref-template/ref-template.type.mjs +89 -0
- package/esm2022/space/space.type.mjs +1 -1
- package/fesm2022/ngx-formly-zorro-antd-cascader.mjs +44 -21
- package/fesm2022/ngx-formly-zorro-antd-cascader.mjs.map +1 -1
- package/fesm2022/ngx-formly-zorro-antd-radio.mjs +0 -2
- package/fesm2022/ngx-formly-zorro-antd-radio.mjs.map +1 -1
- package/fesm2022/ngx-formly-zorro-antd-ref-template.mjs +136 -0
- package/fesm2022/ngx-formly-zorro-antd-ref-template.mjs.map +1 -0
- package/fesm2022/ngx-formly-zorro-antd-space.mjs.map +1 -1
- package/fesm2022/ngx-formly-zorro-antd.mjs +7 -3
- package/fesm2022/ngx-formly-zorro-antd.mjs.map +1 -1
- package/lib/ui-ng-zorro-antd.module.d.ts +2 -1
- package/package.json +20 -14
- package/ref-template/index.d.ts +5 -0
- package/ref-template/public_api.d.ts +2 -0
- package/ref-template/ref-template.module.d.ts +11 -0
- package/ref-template/ref-template.type.d.ts +79 -0
@@ -1,18 +1,21 @@
|
|
1
1
|
import * as i0 from '@angular/core';
|
2
|
-
import { Component, ChangeDetectionStrategy, NgModule } from '@angular/core';
|
3
|
-
import * as
|
2
|
+
import { Component, ChangeDetectionStrategy, Optional, NgModule } from '@angular/core';
|
3
|
+
import * as i2 from '@angular/common';
|
4
4
|
import { CommonModule } from '@angular/common';
|
5
|
-
import * as
|
5
|
+
import * as i5 from '@ngx-formly/core';
|
6
6
|
import { FieldType, FormlyModule } from '@ngx-formly/core';
|
7
|
-
import * as
|
7
|
+
import * as i3 from '@angular/forms';
|
8
8
|
import { ReactiveFormsModule } from '@angular/forms';
|
9
9
|
import { FormlyNzFormFieldModule } from 'ngx-formly-zorro-antd/form-field';
|
10
|
-
import * as
|
10
|
+
import * as i1 from 'ngx-formly-zorro-antd/common';
|
11
|
+
import { resolveTplName, FormlyCommonModule } from 'ngx-formly-zorro-antd/common';
|
12
|
+
import * as i4 from 'ng-zorro-antd/cascader';
|
11
13
|
import { NzCascaderModule } from 'ng-zorro-antd/cascader';
|
12
14
|
|
13
15
|
class FormlyFieldCascader extends FieldType {
|
14
|
-
constructor() {
|
15
|
-
super(
|
16
|
+
constructor(fieldTemplates) {
|
17
|
+
super();
|
18
|
+
this.fieldTemplates = fieldTemplates;
|
16
19
|
this.defaultOptions = {
|
17
20
|
props: {
|
18
21
|
placeholder: '请选择',
|
@@ -31,13 +34,28 @@ class FormlyFieldCascader extends FieldType {
|
|
31
34
|
}
|
32
35
|
};
|
33
36
|
}
|
37
|
+
get nzNotFoundContent() {
|
38
|
+
return resolveTplName(this.props, this.fieldTemplates, 'notFoundContent');
|
39
|
+
}
|
40
|
+
get nzExpandIcon() {
|
41
|
+
return resolveTplName(this.props, this.fieldTemplates, 'expandIcon');
|
42
|
+
}
|
43
|
+
get nzLabelRender() {
|
44
|
+
return resolveTplName(this.props, this.fieldTemplates, 'labelRender');
|
45
|
+
}
|
46
|
+
get nzOptionRender() {
|
47
|
+
return resolveTplName(this.props, this.fieldTemplates, 'optionRender');
|
48
|
+
}
|
49
|
+
get nzSuffixIcon() {
|
50
|
+
return resolveTplName(this.props, this.fieldTemplates, 'suffixIcon');
|
51
|
+
}
|
34
52
|
ngOnInit() {
|
35
53
|
const options = this.props['cascaderOptions'];
|
36
54
|
if (!options || options.length === 0) {
|
37
55
|
this.props['cascaderOptions'] = this.props.options;
|
38
56
|
}
|
39
57
|
}
|
40
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: FormlyFieldCascader, deps:
|
58
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: FormlyFieldCascader, deps: [{ token: i1.FormlyBoxTemplates, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
41
59
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.5", type: FormlyFieldCascader, selector: "formly-field-cascader", usesInheritance: true, ngImport: i0, template: `<nz-cascader
|
42
60
|
#cascader
|
43
61
|
[nzPlaceHolder]="props.placeholder ?? ''"
|
@@ -50,27 +68,27 @@ class FormlyFieldCascader extends FieldType {
|
|
50
68
|
[nzChangeOn]="props['changeOn']"
|
51
69
|
[nzChangeOnSelect]="props['changeOnSelect']!!"
|
52
70
|
[nzColumnClassName]="props['columnClassName']"
|
53
|
-
[nzExpandIcon]="
|
71
|
+
[nzExpandIcon]="nzExpandIcon!"
|
54
72
|
[nzExpandTrigger]="props['expandTrigger']!"
|
55
73
|
[nzLabelProperty]="props['labelProperty']"
|
56
|
-
[nzLabelRender]="
|
74
|
+
[nzLabelRender]="nzLabelRender ?? null"
|
57
75
|
[nzLoadData]="props['loadData']"
|
58
76
|
[nzMenuClassName]="props['menuClassName']"
|
59
77
|
[nzMenuStyle]="props['menuStyle'] ?? null"
|
60
|
-
[nzNotFoundContent]="
|
61
|
-
[nzOptionRender]="
|
78
|
+
[nzNotFoundContent]="nzNotFoundContent"
|
79
|
+
[nzOptionRender]="nzOptionRender ?? null"
|
62
80
|
[nzOptions]="props['cascaderOptions'] ?? null"
|
63
81
|
[nzShowArrow]="props['showArrow']!!"
|
64
82
|
[nzShowInput]="props['showInput']!!"
|
65
83
|
[nzShowSearch]="props['showSearch']!!"
|
66
84
|
[nzSize]="props['size']!"
|
67
85
|
[nzStatus]="props['status'] ?? ''"
|
68
|
-
[nzSuffixIcon]="
|
86
|
+
[nzSuffixIcon]="nzSuffixIcon!"
|
69
87
|
[nzValueProperty]="props['valueProperty']!"
|
70
88
|
(nzClear)="props['onClear'] && props['onClear'](field)"
|
71
89
|
(nzVisibleChange)="props['visibleChange'] && props['visibleChange'](field, $event)"
|
72
90
|
(nzSelectionChange)="props['selectionChange'] && props['selectionChange'](field, $event)"
|
73
|
-
></nz-cascader>`, isInline: true, dependencies: [{ kind: "directive", type:
|
91
|
+
></nz-cascader>`, isInline: true, dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i4.NzCascaderComponent, selector: "nz-cascader, [nz-cascader]", inputs: ["nzOptionRender", "nzShowInput", "nzShowArrow", "nzAllowClear", "nzAutoFocus", "nzChangeOnSelect", "nzDisabled", "nzColumnClassName", "nzExpandTrigger", "nzValueProperty", "nzLabelRender", "nzLabelProperty", "nzNotFoundContent", "nzSize", "nzBackdrop", "nzShowSearch", "nzPlaceHolder", "nzMenuClassName", "nzMenuStyle", "nzMouseEnterDelay", "nzMouseLeaveDelay", "nzStatus", "nzTriggerAction", "nzChangeOn", "nzLoadData", "nzSuffixIcon", "nzExpandIcon", "nzOptions"], outputs: ["nzVisibleChange", "nzSelectionChange", "nzSelect", "nzClear"], exportAs: ["nzCascader"] }, { kind: "directive", type: i5.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
74
92
|
}
|
75
93
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: FormlyFieldCascader, decorators: [{
|
76
94
|
type: Component,
|
@@ -88,22 +106,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImpor
|
|
88
106
|
[nzChangeOn]="props['changeOn']"
|
89
107
|
[nzChangeOnSelect]="props['changeOnSelect']!!"
|
90
108
|
[nzColumnClassName]="props['columnClassName']"
|
91
|
-
[nzExpandIcon]="
|
109
|
+
[nzExpandIcon]="nzExpandIcon!"
|
92
110
|
[nzExpandTrigger]="props['expandTrigger']!"
|
93
111
|
[nzLabelProperty]="props['labelProperty']"
|
94
|
-
[nzLabelRender]="
|
112
|
+
[nzLabelRender]="nzLabelRender ?? null"
|
95
113
|
[nzLoadData]="props['loadData']"
|
96
114
|
[nzMenuClassName]="props['menuClassName']"
|
97
115
|
[nzMenuStyle]="props['menuStyle'] ?? null"
|
98
|
-
[nzNotFoundContent]="
|
99
|
-
[nzOptionRender]="
|
116
|
+
[nzNotFoundContent]="nzNotFoundContent"
|
117
|
+
[nzOptionRender]="nzOptionRender ?? null"
|
100
118
|
[nzOptions]="props['cascaderOptions'] ?? null"
|
101
119
|
[nzShowArrow]="props['showArrow']!!"
|
102
120
|
[nzShowInput]="props['showInput']!!"
|
103
121
|
[nzShowSearch]="props['showSearch']!!"
|
104
122
|
[nzSize]="props['size']!"
|
105
123
|
[nzStatus]="props['status'] ?? ''"
|
106
|
-
[nzSuffixIcon]="
|
124
|
+
[nzSuffixIcon]="nzSuffixIcon!"
|
107
125
|
[nzValueProperty]="props['valueProperty']!"
|
108
126
|
(nzClear)="props['onClear'] && props['onClear'](field)"
|
109
127
|
(nzVisibleChange)="props['visibleChange'] && props['visibleChange'](field, $event)"
|
@@ -111,17 +129,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImpor
|
|
111
129
|
></nz-cascader>`,
|
112
130
|
changeDetection: ChangeDetectionStrategy.OnPush
|
113
131
|
}]
|
114
|
-
}]
|
132
|
+
}], ctorParameters: function () { return [{ type: i1.FormlyBoxTemplates, decorators: [{
|
133
|
+
type: Optional
|
134
|
+
}] }]; } });
|
115
135
|
|
116
136
|
class FormlyNzCascaderModule {
|
117
137
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: FormlyNzCascaderModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
118
138
|
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.5", ngImport: i0, type: FormlyNzCascaderModule, declarations: [FormlyFieldCascader], imports: [CommonModule,
|
119
139
|
ReactiveFormsModule,
|
120
140
|
FormlyNzFormFieldModule,
|
121
|
-
|
141
|
+
FormlyCommonModule,
|
142
|
+
NzCascaderModule, i5.FormlyModule] }); }
|
122
143
|
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: FormlyNzCascaderModule, imports: [CommonModule,
|
123
144
|
ReactiveFormsModule,
|
124
145
|
FormlyNzFormFieldModule,
|
146
|
+
FormlyCommonModule,
|
125
147
|
NzCascaderModule,
|
126
148
|
FormlyModule.forChild({
|
127
149
|
types: [
|
@@ -141,6 +163,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImpor
|
|
141
163
|
CommonModule,
|
142
164
|
ReactiveFormsModule,
|
143
165
|
FormlyNzFormFieldModule,
|
166
|
+
FormlyCommonModule,
|
144
167
|
NzCascaderModule,
|
145
168
|
FormlyModule.forChild({
|
146
169
|
types: [
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ngx-formly-zorro-antd-cascader.mjs","sources":["../../../../packages/formlyantd/cascader/src/cascader.type.ts","../../../../packages/formlyantd/cascader/src/cascader.module.ts","../../../../packages/formlyantd/cascader/src/ngx-formly-zorro-antd-cascader.ts"],"sourcesContent":["import { Component, TemplateRef, Type, ChangeDetectionStrategy, OnInit } from '@angular/core';\nimport { FieldType, FieldTypeConfig } from '@ngx-formly/core';\nimport { FormlyFieldProps } from 'ngx-formly-zorro-antd/form-field';\n\nimport type {\n NzCascaderOption,\n NzShowSearchOptions,\n NzCascaderExpandTrigger,\n NzCascaderSize\n} from 'ng-zorro-antd/cascader';\nimport type { NzSafeAny, NzStatus, NgStyleInterface } from 'ng-zorro-antd/core/types';\nimport type { NzFormlyFieldConfig } from 'ngx-formly-zorro-antd/common';\n\ninterface CascaderProps extends FormlyFieldProps {\n /**\n * 是否支持清除\n * @default true\n */\n allowClear?: boolean;\n\n /**\n * 是否自动聚焦,当存在输入框时\n * @default false\n */\n autoFocus?: boolean;\n\n /**\n * 浮层是否应带有背景板\n * @default false\n */\n backdrop?: boolean;\n\n /**\n * 点击父级菜单选项时,可通过该函数判断是否允许值的变化\n */\n changeOn?: (option: NzSafeAny, index: number) => boolean;\n\n /**\n * 当此项为 true 时,点选每级菜单选项值都会发生变化,具体见上面的演示\n * @default false\n */\n changeOnSelect?: boolean;\n\n /**\n * 自定义浮层列类名\n */\n columnClassName?: string;\n\n /**\n * 自定义次级菜单展开图标\n */\n expandIcon?: string | TemplateRef<void>;\n\n /**\n * 次级菜单的展开方式\n * @default 'click'\n */\n expandTrigger?: NzCascaderExpandTrigger;\n\n /**\n * 选项的显示值的属性名\n * @default 'label'\n */\n labelProperty: string;\n\n /**\n * 选择后展示的渲染模板\n */\n labelRender?: TemplateRef<NzSafeAny> | null;\n\n /**\n * 用于动态加载选项。如果提供了ngModel初始值,且未提供nzOptions值,则会立即触发动态加载。\n */\n loadData?: (option: NzSafeAny, index?: number) => PromiseLike<NzSafeAny>;\n\n /**\n * 自定义浮层类名\n */\n menuClassName?: string;\n\n /**\n * 自定义浮层样式\n */\n menuStyle?: NgStyleInterface | null;\n\n /**\n * 当下拉列表为空时显示的内容\n */\n notFoundContent?: string | TemplateRef<void>;\n\n /**\n * 选项的渲染模板\n */\n optionRender?: TemplateRef<{ $implicit: NzCascaderOption; index: number }> | null;\n\n /**\n * 是否显示箭头\n * @default true\n */\n showArrow?: boolean;\n\n /**\n * 显示输入框\n * @default true\n */\n showInput?: boolean;\n\n /**\n * 是否支持搜索,默认情况下对 label 进行全匹配搜索,不能和 [nzLoadData] 同时使用\n * @default false\n */\n showSearch?: boolean | NzShowSearchOptions;\n\n /**\n * 输入框大小\n * @default default\n */\n size?: NzCascaderSize;\n\n /**\n * 设置校验状态\n */\n status?: NzStatus;\n\n /**\n * 自定义的选择框后缀图标\n */\n suffixIcon?: string | TemplateRef<void>;\n\n /**\n * 选项的实际值的属性名\n * @default 'value'\n */\n valueProperty?: string;\n\n /**\n * 可选项数据源\n */\n cascaderOptions?: NzCascaderOption[] | null;\n\n /**\n * 清除值时触发\n */\n onClear?: (field: NzFormlyFieldConfig) => void;\n /**\n * 菜单浮层的显示/隐藏\n */\n visibleChange?: (field: NzFormlyFieldConfig, visible: boolean) => void;\n\n /**\n * 值发生变化时触发\n */\n selectionChange?: (field: NzFormlyFieldConfig, value: NzCascaderOption[]) => void;\n}\n\nexport interface FormlyCascaderFieldConfig extends NzFormlyFieldConfig<CascaderProps> {\n type: 'cascader' | Type<FormlyFieldCascader>;\n}\n\n@Component({\n selector: 'formly-field-cascader',\n template: `<nz-cascader\n #cascader\n [nzPlaceHolder]=\"props.placeholder ?? ''\"\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\"\n [ngClass]=\"props['className']!\"\n [nzAllowClear]=\"props['allowClear']!!\"\n [nzAutoFocus]=\"props['autoFocus']!!\"\n [nzBackdrop]=\"props['backdrop']!!\"\n [nzChangeOn]=\"props['changeOn']\"\n [nzChangeOnSelect]=\"props['changeOnSelect']!!\"\n [nzColumnClassName]=\"props['columnClassName']\"\n [nzExpandIcon]=\"props['expandIcon']!\"\n [nzExpandTrigger]=\"props['expandTrigger']!\"\n [nzLabelProperty]=\"props['labelProperty']\"\n [nzLabelRender]=\"props['labelRender'] ?? null\"\n [nzLoadData]=\"props['loadData']\"\n [nzMenuClassName]=\"props['menuClassName']\"\n [nzMenuStyle]=\"props['menuStyle'] ?? null\"\n [nzNotFoundContent]=\"props['notFoundContent']\"\n [nzOptionRender]=\"props['optionRender'] ?? null\"\n [nzOptions]=\"props['cascaderOptions'] ?? null\"\n [nzShowArrow]=\"props['showArrow']!!\"\n [nzShowInput]=\"props['showInput']!!\"\n [nzShowSearch]=\"props['showSearch']!!\"\n [nzSize]=\"props['size']!\"\n [nzStatus]=\"props['status'] ?? ''\"\n [nzSuffixIcon]=\"props['suffixIcon']!\"\n [nzValueProperty]=\"props['valueProperty']!\"\n (nzClear)=\"props['onClear'] && props['onClear'](field)\"\n (nzVisibleChange)=\"props['visibleChange'] && props['visibleChange'](field, $event)\"\n (nzSelectionChange)=\"props['selectionChange'] && props['selectionChange'](field, $event)\"\n ></nz-cascader>`,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class FormlyFieldCascader\n extends FieldType<FieldTypeConfig<CascaderProps>>\n implements OnInit\n{\n override defaultOptions = {\n props: {\n placeholder: '请选择',\n allowClear: true,\n backdrop: false,\n changeOnSelect: false,\n expandTrigger: 'click' as const,\n labelProperty: 'label',\n showArrow: true,\n showInput: true,\n showSearch: false,\n size: 'default' as const,\n status: '' as const,\n valueProperty: 'value',\n cascaderOptions: []\n }\n };\n ngOnInit(): void {\n const options = this.props['cascaderOptions'];\n if (!options || options.length === 0) {\n this.props['cascaderOptions'] = this.props.options as NzSafeAny;\n }\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormlyModule } from '@ngx-formly/core';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { FormlyNzFormFieldModule } from 'ngx-formly-zorro-antd/form-field';\n\nimport { NzCascaderModule } from 'ng-zorro-antd/cascader';\nimport { FormlyFieldCascader } from './cascader.type';\n\n@NgModule({\n declarations: [FormlyFieldCascader],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n FormlyNzFormFieldModule,\n\n NzCascaderModule,\n\n FormlyModule.forChild({\n types: [\n {\n name: 'cascader',\n component: FormlyFieldCascader,\n wrappers: ['form-field']\n }\n ]\n })\n ]\n})\nexport class FormlyNzCascaderModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;AAoMM,MAAO,mBACX,SAAQ,SAAyC,CAAA;AAtCnD,IAAA,WAAA,GAAA;;AAyCW,QAAA,IAAA,CAAA,cAAc,GAAG;AACxB,YAAA,KAAK,EAAE;AACL,gBAAA,WAAW,EAAE,KAAK;AAClB,gBAAA,UAAU,EAAE,IAAI;AAChB,gBAAA,QAAQ,EAAE,KAAK;AACf,gBAAA,cAAc,EAAE,KAAK;AACrB,gBAAA,aAAa,EAAE,OAAgB;AAC/B,gBAAA,aAAa,EAAE,OAAO;AACtB,gBAAA,SAAS,EAAE,IAAI;AACf,gBAAA,SAAS,EAAE,IAAI;AACf,gBAAA,UAAU,EAAE,KAAK;AACjB,gBAAA,IAAI,EAAE,SAAkB;AACxB,gBAAA,MAAM,EAAE,EAAW;AACnB,gBAAA,aAAa,EAAE,OAAO;AACtB,gBAAA,eAAe,EAAE,EAAE;AACpB,aAAA;SACF,CAAC;AAOH,KAAA;IANC,QAAQ,GAAA;QACN,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC;QAC9C,IAAI,CAAC,OAAO,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE;YACpC,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,OAAoB,CAAC;AACjE,SAAA;KACF;8GA1BU,mBAAmB,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;AAAnB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,mBAAmB,EAnCpB,QAAA,EAAA,uBAA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ACF,iBAAA;aACF,CAAC,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAGO,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBApBlC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,mBAAmB,CAAC;AACnC,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,mBAAmB;wBACnB,uBAAuB;wBAEvB,gBAAgB;wBAEhB,YAAY,CAAC,QAAQ,CAAC;AACpB,4BAAA,KAAK,EAAE;AACL,gCAAA;AACE,oCAAA,IAAI,EAAE,UAAU;AAChB,oCAAA,SAAS,EAAE,mBAAmB;oCAC9B,QAAQ,EAAE,CAAC,YAAY,CAAC;AACzB,iCAAA;AACF,6BAAA;yBACF,CAAC;AACH,qBAAA;AACF,iBAAA,CAAA;;;AC5BD;;AAEG;;;;"}
|
1
|
+
{"version":3,"file":"ngx-formly-zorro-antd-cascader.mjs","sources":["../../../../packages/formlyantd/cascader/src/cascader.type.ts","../../../../packages/formlyantd/cascader/src/cascader.module.ts","../../../../packages/formlyantd/cascader/src/ngx-formly-zorro-antd-cascader.ts"],"sourcesContent":["import {\n Component,\n TemplateRef,\n Optional,\n Type,\n ChangeDetectionStrategy,\n OnInit\n} from '@angular/core';\nimport { FieldType, FieldTypeConfig } from '@ngx-formly/core';\nimport { FormlyFieldProps } from 'ngx-formly-zorro-antd/form-field';\n\nimport type {\n NzCascaderOption,\n NzShowSearchOptions,\n NzCascaderExpandTrigger,\n NzCascaderSize\n} from 'ng-zorro-antd/cascader';\nimport type { NzSafeAny, NzStatus, NgStyleInterface } from 'ng-zorro-antd/core/types';\nimport type { NzFormlyFieldConfig, FormlyAttributeEvent } from 'ngx-formly-zorro-antd/common';\nimport { resolveTplName, FormlyBoxTemplates } from 'ngx-formly-zorro-antd/common';\n\ninterface CascaderProps extends FormlyFieldProps {\n /**\n * 是否支持清除\n * @default true\n */\n allowClear?: boolean;\n\n /**\n * 是否自动聚焦,当存在输入框时\n * @default false\n */\n autoFocus?: boolean;\n\n /**\n * 浮层是否应带有背景板\n * @default false\n */\n backdrop?: boolean;\n\n /**\n * 点击父级菜单选项时,可通过该函数判断是否允许值的变化\n */\n changeOn?: (option: NzSafeAny, index: number) => boolean;\n\n /**\n * 当此项为 true 时,点选每级菜单选项值都会发生变化,具体见上面的演示\n * @default false\n */\n changeOnSelect?: boolean;\n\n /**\n * 自定义浮层列类名\n */\n columnClassName?: string;\n\n /**\n * 自定义次级菜单展开图标\n */\n expandIcon?: string | TemplateRef<void>;\n expandIconName?: string;\n\n /**\n * 次级菜单的展开方式\n * @default 'click'\n */\n expandTrigger?: NzCascaderExpandTrigger;\n\n /**\n * 选项的显示值的属性名\n * @default 'label'\n */\n labelProperty: string;\n\n /**\n * 选择后展示的渲染模板\n */\n labelRender?: TemplateRef<NzSafeAny> | null;\n labelRenderName?: string;\n\n /**\n * 用于动态加载选项。如果提供了ngModel初始值,且未提供nzOptions值,则会立即触发动态加载。\n */\n loadData?: (option: NzSafeAny, index?: number) => PromiseLike<NzSafeAny>;\n\n /**\n * 自定义浮层类名\n */\n menuClassName?: string;\n\n /**\n * 自定义浮层样式\n */\n menuStyle?: NgStyleInterface | null;\n\n /**\n * 当下拉列表为空时显示的内容\n */\n notFoundContent?: string | TemplateRef<void>;\n notFoundContentName?: string;\n\n /**\n * 选项的渲染模板\n */\n optionRender?: TemplateRef<{ $implicit: NzCascaderOption; index: number }> | null;\n optionRenderName?: string;\n\n /**\n * 是否显示箭头\n * @default true\n */\n showArrow?: boolean;\n\n /**\n * 显示输入框\n * @default true\n */\n showInput?: boolean;\n\n /**\n * 是否支持搜索,默认情况下对 label 进行全匹配搜索,不能和 [nzLoadData] 同时使用\n * @default false\n */\n showSearch?: boolean | NzShowSearchOptions;\n\n /**\n * 输入框大小\n * @default default\n */\n size?: NzCascaderSize;\n\n /**\n * 设置校验状态\n */\n status?: NzStatus;\n\n /**\n * 自定义的选择框后缀图标\n */\n suffixIcon?: string | TemplateRef<void>;\n suffixIconName?: string;\n\n /**\n * 选项的实际值的属性名\n * @default 'value'\n */\n valueProperty?: string;\n\n /**\n * 可选项数据源\n */\n cascaderOptions?: NzCascaderOption[] | null;\n\n /**\n * 清除值时触发\n */\n onClear?: FormlyAttributeEvent;\n /**\n * 菜单浮层的显示/隐藏\n */\n visibleChange?: FormlyAttributeEvent<boolean>;\n\n /**\n * 值发生变化时触发\n */\n selectionChange?: FormlyAttributeEvent<NzCascaderOption[]>;\n}\n\nexport interface FormlyCascaderFieldConfig extends NzFormlyFieldConfig<CascaderProps> {\n type: 'cascader' | Type<FormlyFieldCascader>;\n}\n\n@Component({\n selector: 'formly-field-cascader',\n template: `<nz-cascader\n #cascader\n [nzPlaceHolder]=\"props.placeholder ?? ''\"\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\"\n [ngClass]=\"props['className']!\"\n [nzAllowClear]=\"props['allowClear']!!\"\n [nzAutoFocus]=\"props['autoFocus']!!\"\n [nzBackdrop]=\"props['backdrop']!!\"\n [nzChangeOn]=\"props['changeOn']\"\n [nzChangeOnSelect]=\"props['changeOnSelect']!!\"\n [nzColumnClassName]=\"props['columnClassName']\"\n [nzExpandIcon]=\"nzExpandIcon!\"\n [nzExpandTrigger]=\"props['expandTrigger']!\"\n [nzLabelProperty]=\"props['labelProperty']\"\n [nzLabelRender]=\"nzLabelRender ?? null\"\n [nzLoadData]=\"props['loadData']\"\n [nzMenuClassName]=\"props['menuClassName']\"\n [nzMenuStyle]=\"props['menuStyle'] ?? null\"\n [nzNotFoundContent]=\"nzNotFoundContent\"\n [nzOptionRender]=\"nzOptionRender ?? null\"\n [nzOptions]=\"props['cascaderOptions'] ?? null\"\n [nzShowArrow]=\"props['showArrow']!!\"\n [nzShowInput]=\"props['showInput']!!\"\n [nzShowSearch]=\"props['showSearch']!!\"\n [nzSize]=\"props['size']!\"\n [nzStatus]=\"props['status'] ?? ''\"\n [nzSuffixIcon]=\"nzSuffixIcon!\"\n [nzValueProperty]=\"props['valueProperty']!\"\n (nzClear)=\"props['onClear'] && props['onClear'](field)\"\n (nzVisibleChange)=\"props['visibleChange'] && props['visibleChange'](field, $event)\"\n (nzSelectionChange)=\"props['selectionChange'] && props['selectionChange'](field, $event)\"\n ></nz-cascader>`,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class FormlyFieldCascader\n extends FieldType<FieldTypeConfig<CascaderProps>>\n implements OnInit\n{\n override defaultOptions = {\n props: {\n placeholder: '请选择',\n allowClear: true,\n backdrop: false,\n changeOnSelect: false,\n expandTrigger: 'click' as const,\n labelProperty: 'label',\n showArrow: true,\n showInput: true,\n showSearch: false,\n size: 'default' as const,\n status: '' as const,\n valueProperty: 'value',\n cascaderOptions: []\n }\n };\n constructor(@Optional() public fieldTemplates: FormlyBoxTemplates) {\n super();\n }\n\n get nzNotFoundContent() {\n return resolveTplName(this.props, this.fieldTemplates, 'notFoundContent');\n }\n\n get nzExpandIcon() {\n return resolveTplName(this.props, this.fieldTemplates, 'expandIcon');\n }\n\n get nzLabelRender() {\n return resolveTplName(this.props, this.fieldTemplates, 'labelRender');\n }\n\n get nzOptionRender() {\n return resolveTplName(this.props, this.fieldTemplates, 'optionRender');\n }\n\n get nzSuffixIcon() {\n return resolveTplName(this.props, this.fieldTemplates, 'suffixIcon');\n }\n\n ngOnInit(): void {\n const options = this.props['cascaderOptions'];\n if (!options || options.length === 0) {\n this.props['cascaderOptions'] = this.props.options as NzSafeAny;\n }\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormlyModule } from '@ngx-formly/core';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { FormlyNzFormFieldModule } from 'ngx-formly-zorro-antd/form-field';\nimport { FormlyCommonModule } from 'ngx-formly-zorro-antd/common';\nimport { NzCascaderModule } from 'ng-zorro-antd/cascader';\nimport { FormlyFieldCascader } from './cascader.type';\n\n@NgModule({\n declarations: [FormlyFieldCascader],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n FormlyNzFormFieldModule,\n FormlyCommonModule,\n NzCascaderModule,\n\n FormlyModule.forChild({\n types: [\n {\n name: 'cascader',\n component: FormlyFieldCascader,\n wrappers: ['form-field']\n }\n ]\n })\n ]\n})\nexport class FormlyNzCascaderModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;;;AAiNM,MAAO,mBACX,SAAQ,SAAyC,CAAA;AAoBjD,IAAA,WAAA,CAA+B,cAAkC,EAAA;AAC/D,QAAA,KAAK,EAAE,CAAC;QADqB,IAAc,CAAA,cAAA,GAAd,cAAc,CAAoB;AAjBxD,QAAA,IAAA,CAAA,cAAc,GAAG;AACxB,YAAA,KAAK,EAAE;AACL,gBAAA,WAAW,EAAE,KAAK;AAClB,gBAAA,UAAU,EAAE,IAAI;AAChB,gBAAA,QAAQ,EAAE,KAAK;AACf,gBAAA,cAAc,EAAE,KAAK;AACrB,gBAAA,aAAa,EAAE,OAAgB;AAC/B,gBAAA,aAAa,EAAE,OAAO;AACtB,gBAAA,SAAS,EAAE,IAAI;AACf,gBAAA,SAAS,EAAE,IAAI;AACf,gBAAA,UAAU,EAAE,KAAK;AACjB,gBAAA,IAAI,EAAE,SAAkB;AACxB,gBAAA,MAAM,EAAE,EAAW;AACnB,gBAAA,aAAa,EAAE,OAAO;AACtB,gBAAA,eAAe,EAAE,EAAE;AACpB,aAAA;SACF,CAAC;KAGD;AAED,IAAA,IAAI,iBAAiB,GAAA;AACnB,QAAA,OAAO,cAAc,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,cAAc,EAAE,iBAAiB,CAAC,CAAC;KAC3E;AAED,IAAA,IAAI,YAAY,GAAA;AACd,QAAA,OAAO,cAAc,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,cAAc,EAAE,YAAY,CAAC,CAAC;KACtE;AAED,IAAA,IAAI,aAAa,GAAA;AACf,QAAA,OAAO,cAAc,CAAC,IAAI,CAAC,KAAK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;wBAClB,gBAAgB;wBAEhB,YAAY,CAAC,QAAQ,CAAC;AACpB,4BAAA,KAAK,EAAE;AACL,gCAAA;AACE,oCAAA,IAAI,EAAE,UAAU;AAChB,oCAAA,SAAS,EAAE,mBAAmB;oCAC9B,QAAQ,EAAE,CAAC,YAAY,CAAC;AACzB,iCAAA;AACF,6BAAA;yBACF,CAAC;AACH,qBAAA;AACF,iBAAA,CAAA;;;AC5BD;;AAEG;;;;"}
|
@@ -31,7 +31,6 @@ class FormlyFieldRadio extends FieldType {
|
|
31
31
|
[nzName]="field.name ?? null"
|
32
32
|
[nzSize]="props['size']!"
|
33
33
|
[nzButtonStyle]="props['buttonStyle']!"
|
34
|
-
(ngModelChange)="props.change && props.change(field, $event)"
|
35
34
|
>
|
36
35
|
<ng-container *ngIf="props.type !== 'button'; else button">
|
37
36
|
<label
|
@@ -70,7 +69,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImpor
|
|
70
69
|
[nzName]="field.name ?? null"
|
71
70
|
[nzSize]="props['size']!"
|
72
71
|
[nzButtonStyle]="props['buttonStyle']!"
|
73
|
-
(ngModelChange)="props.change && props.change(field, $event)"
|
74
72
|
>
|
75
73
|
<ng-container *ngIf="props.type !== 'button'; else button">
|
76
74
|
<label
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ngx-formly-zorro-antd-radio.mjs","sources":["../../../../packages/formlyantd/radio/src/radio.type.ts","../../../../packages/formlyantd/radio/src/radio.module.ts","../../../../packages/formlyantd/radio/src/ngx-formly-zorro-antd-radio.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy, Type } from '@angular/core';\nimport { FieldType, FieldTypeConfig } from '@ngx-formly/core';\nimport type { NzFormlyFieldConfig } from 'ngx-formly-zorro-antd/common';\nimport type { FormlyFieldProps } from 'ngx-formly-zorro-antd/form-field';\n\nimport type { FormlyFieldSelectProps } from '@ngx-formly/core/select';\nimport type { NzSizeLDSType } from 'ng-zorro-antd/core/types';\nimport type { NzRadioButtonStyle } from 'ng-zorro-antd/radio';\n\ninterface RadioProps extends FormlyFieldProps, FormlyFieldSelectProps {\n type?: 'button';\n\n /**\n * nz-radio-group 下所有 input[type=\"radio\"] 的 name 属性\n */\n name?: string | null;\n /**\n * 大小,只对按钮样式生效\n * @default default\n */\n size?: NzSizeLDSType;\n /**\n * RadioButton 的风格样式,目前有描边和填色两种风格\n * @default outline\n */\n buttonStyle?: NzRadioButtonStyle;\n}\n\nexport interface FormlyRadioFieldConfig extends NzFormlyFieldConfig<RadioProps> {\n type: 'radio' | Type<FormlyFieldRadio>;\n}\n\n@Component({\n selector: 'formly-field-radio',\n template: `\n <nz-radio-group\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\"\n [nzName]=\"field.name ?? null\"\n [nzSize]=\"props['size']!\"\n [nzButtonStyle]=\"props['buttonStyle']!\"\n
|
1
|
+
{"version":3,"file":"ngx-formly-zorro-antd-radio.mjs","sources":["../../../../packages/formlyantd/radio/src/radio.type.ts","../../../../packages/formlyantd/radio/src/radio.module.ts","../../../../packages/formlyantd/radio/src/ngx-formly-zorro-antd-radio.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy, Type } from '@angular/core';\nimport { FieldType, FieldTypeConfig } from '@ngx-formly/core';\nimport type { NzFormlyFieldConfig } from 'ngx-formly-zorro-antd/common';\nimport type { FormlyFieldProps } from 'ngx-formly-zorro-antd/form-field';\n\nimport type { FormlyFieldSelectProps } from '@ngx-formly/core/select';\nimport type { NzSizeLDSType } from 'ng-zorro-antd/core/types';\nimport type { NzRadioButtonStyle } from 'ng-zorro-antd/radio';\n\ninterface RadioProps extends FormlyFieldProps, FormlyFieldSelectProps {\n type?: 'button';\n\n /**\n * nz-radio-group 下所有 input[type=\"radio\"] 的 name 属性\n */\n name?: string | null;\n /**\n * 大小,只对按钮样式生效\n * @default default\n */\n size?: NzSizeLDSType;\n /**\n * RadioButton 的风格样式,目前有描边和填色两种风格\n * @default outline\n */\n buttonStyle?: NzRadioButtonStyle;\n}\n\nexport interface FormlyRadioFieldConfig extends NzFormlyFieldConfig<RadioProps> {\n type: 'radio' | Type<FormlyFieldRadio>;\n}\n\n@Component({\n selector: 'formly-field-radio',\n template: `\n <nz-radio-group\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\"\n [nzName]=\"field.name ?? null\"\n [nzSize]=\"props['size']!\"\n [nzButtonStyle]=\"props['buttonStyle']!\"\n >\n <ng-container *ngIf=\"props.type !== 'button'; else button\">\n <label\n *ngFor=\"let option of props.options | formlySelectOptions: field | async; let i = index\"\n [id]=\"id + '_' + i\"\n [nzDisabled]=\"option.disabled === true\"\n [nzValue]=\"option.value\"\n nz-radio\n >\n {{ option.label }}\n </label>\n </ng-container>\n\n <ng-template #button>\n <label\n *ngFor=\"let option of props.options | formlySelectOptions: field | async; let i = index\"\n [id]=\"id + '_' + i\"\n [nzDisabled]=\"option.disabled === true\"\n [nzValue]=\"option.value\"\n nz-radio-button\n >\n {{ option.label }}\n </label>\n </ng-template>\n </nz-radio-group>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class FormlyFieldRadio extends FieldType<FieldTypeConfig<RadioProps>> {\n override defaultOptions = {\n props: {\n size: 'default' as const,\n buttonStyle: 'outline' as const\n }\n };\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { FormlyModule } from '@ngx-formly/core';\nimport { FormlySelectModule } from '@ngx-formly/core/select';\n\nimport { FormlyNzFormFieldModule } from 'ngx-formly-zorro-antd/form-field';\nimport { FormlyFieldRadio } from './radio.type';\n\nimport { NzFormModule } from 'ng-zorro-antd/form';\nimport { NzRadioModule } from 'ng-zorro-antd/radio';\n\n@NgModule({\n declarations: [FormlyFieldRadio],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n FormlyNzFormFieldModule,\n FormlySelectModule,\n NzFormModule,\n\n NzRadioModule,\n FormlyModule.forChild({\n types: [\n {\n name: 'radio',\n component: FormlyFieldRadio,\n wrappers: ['form-field']\n }\n ]\n })\n ]\n})\nexport class FormlyNzRadioModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;;;;AAqEM,MAAO,gBAAiB,SAAQ,SAAsC,CAAA;AArC5E,IAAA,WAAA,GAAA;;AAsCW,QAAA,IAAA,CAAA,cAAc,GAAG;AACxB,YAAA,KAAK,EAAE;AACL,gBAAA,IAAI,EAAE,SAAkB;AACxB,gBAAA,WAAW,EAAE,SAAkB;AAChC,aAAA;SACF,CAAC;AACH,KAAA;8GAPY,gBAAgB,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;AAAhB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,gBAAgB,EAnCjB,QAAA,EAAA,oBAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,OAAA,EAAA,QAAA,EAAA,kBAAA,EAAA,MAAA,EAAA,CAAA,SAAA,EAAA,cAAA,EAAA,eAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,IAAA,EAAA,QAAA,EAAA,QAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,UAAA,EAAA,UAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,eAAA,EAA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B,uBAAuB;wBACvB,kBAAkB;wBAClB,YAAY;wBAEZ,aAAa;wBACb,YAAY,CAAC,QAAQ,CAAC;AACpB,4BAAA,KAAK,EAAE;AACL,gCAAA;AACE,oCAAA,IAAI,EAAE,OAAO;AACb,oCAAA,SAAS,EAAE,gBAAgB;oCAC3B,QAAQ,EAAE,CAAC,YAAY,CAAC;AACzB,iCAAA;AACF,6BAAA;yBACF,CAAC;AACH,qBAAA;AACF,iBAAA,CAAA;;;AChCD;;AAEG;;;;"}
|
@@ -0,0 +1,136 @@
|
|
1
|
+
import * as i0 from '@angular/core';
|
2
|
+
import { Component, ChangeDetectionStrategy, Optional, NgModule } from '@angular/core';
|
3
|
+
import { CommonModule } from '@angular/common';
|
4
|
+
import * as i1$1 from '@ngx-formly/core';
|
5
|
+
import { FieldType, FormlyModule } from '@ngx-formly/core';
|
6
|
+
import * as i2 from 'ng-zorro-antd/core/outlet';
|
7
|
+
import { NzOutletModule } from 'ng-zorro-antd/core/outlet';
|
8
|
+
import * as i3 from '@pkt/ng.core';
|
9
|
+
import { TrustedHtmlPipe } from '@pkt/ng.core';
|
10
|
+
import * as i1 from 'ngx-formly-zorro-antd/common';
|
11
|
+
import { resolveTplName } from 'ngx-formly-zorro-antd/common';
|
12
|
+
|
13
|
+
/**
|
14
|
+
* 引用模板,支持HTML,TemplateRef对象,或者NamedTemplate
|
15
|
+
* @example
|
16
|
+
*
|
17
|
+
* 用法1: 使用NamedTemplate(推荐)
|
18
|
+
*
|
19
|
+
* html
|
20
|
+
* ```html
|
21
|
+
* <formly-form formly-box>
|
22
|
+
* <ng-template named="test"></ng-template>
|
23
|
+
* </formly-form>
|
24
|
+
* ```
|
25
|
+
*
|
26
|
+
* 配置
|
27
|
+
* ```js
|
28
|
+
* {
|
29
|
+
* type: 'ref-template',
|
30
|
+
* props: {
|
31
|
+
* refName: 'test'
|
32
|
+
* }
|
33
|
+
* }
|
34
|
+
* ```
|
35
|
+
*
|
36
|
+
* 用法2:TemplateRef对象
|
37
|
+
* ```html
|
38
|
+
* <ng-template #test2></ng-template>
|
39
|
+
* ```
|
40
|
+
*
|
41
|
+
* 配置
|
42
|
+
* @viewChild('test2') test2: TemplateRef<{}>;
|
43
|
+
*
|
44
|
+
* ```js
|
45
|
+
* {
|
46
|
+
* type: 'ref-template',
|
47
|
+
* props: {
|
48
|
+
* ref: this.test2
|
49
|
+
* }
|
50
|
+
* }
|
51
|
+
* ```
|
52
|
+
*
|
53
|
+
* 用法3: 使用html
|
54
|
+
*
|
55
|
+
* 配置
|
56
|
+
* ```js
|
57
|
+
* {
|
58
|
+
* type: 'ref-template',
|
59
|
+
* props: {
|
60
|
+
* ref: '<div>test text</div>'
|
61
|
+
* }
|
62
|
+
* }
|
63
|
+
* ```
|
64
|
+
*/
|
65
|
+
class FormlyFieldRefTemplate extends FieldType {
|
66
|
+
constructor(fieldTemplates) {
|
67
|
+
super();
|
68
|
+
this.fieldTemplates = fieldTemplates;
|
69
|
+
}
|
70
|
+
get ref() {
|
71
|
+
return resolveTplName(this.props, this.fieldTemplates, 'ref');
|
72
|
+
}
|
73
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: FormlyFieldRefTemplate, deps: [{ token: i1.FormlyBoxTemplates, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
74
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.5", type: FormlyFieldRefTemplate, selector: "formly-ref-template", usesInheritance: true, ngImport: i0, template: `
|
75
|
+
<ng-container *nzStringTemplateOutlet="ref; context: { $implicit: field, props: props }">
|
76
|
+
<div [innerHTML]="$any(ref) | trustedHtml"></div>
|
77
|
+
</ng-container>
|
78
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: i2.NzStringTemplateOutletDirective, selector: "[nzStringTemplateOutlet]", inputs: ["nzStringTemplateOutletContext", "nzStringTemplateOutlet"], exportAs: ["nzStringTemplateOutlet"] }, { kind: "pipe", type: i3.TrustedHtmlPipe, name: "trustedHtml" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
79
|
+
}
|
80
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: FormlyFieldRefTemplate, decorators: [{
|
81
|
+
type: Component,
|
82
|
+
args: [{
|
83
|
+
selector: 'formly-ref-template',
|
84
|
+
template: `
|
85
|
+
<ng-container *nzStringTemplateOutlet="ref; context: { $implicit: field, props: props }">
|
86
|
+
<div [innerHTML]="$any(ref) | trustedHtml"></div>
|
87
|
+
</ng-container>
|
88
|
+
`,
|
89
|
+
changeDetection: ChangeDetectionStrategy.OnPush
|
90
|
+
}]
|
91
|
+
}], ctorParameters: function () { return [{ type: i1.FormlyBoxTemplates, decorators: [{
|
92
|
+
type: Optional
|
93
|
+
}] }]; } });
|
94
|
+
|
95
|
+
class FormlyRefTemplateModule {
|
96
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: FormlyRefTemplateModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
97
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.5", ngImport: i0, type: FormlyRefTemplateModule, declarations: [FormlyFieldRefTemplate], imports: [CommonModule,
|
98
|
+
NzOutletModule,
|
99
|
+
TrustedHtmlPipe, i1$1.FormlyModule] }); }
|
100
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: FormlyRefTemplateModule, imports: [CommonModule,
|
101
|
+
NzOutletModule,
|
102
|
+
FormlyModule.forChild({
|
103
|
+
types: [
|
104
|
+
{
|
105
|
+
name: 'ref-template',
|
106
|
+
component: FormlyFieldRefTemplate
|
107
|
+
}
|
108
|
+
]
|
109
|
+
})] }); }
|
110
|
+
}
|
111
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: FormlyRefTemplateModule, decorators: [{
|
112
|
+
type: NgModule,
|
113
|
+
args: [{
|
114
|
+
declarations: [FormlyFieldRefTemplate],
|
115
|
+
imports: [
|
116
|
+
CommonModule,
|
117
|
+
NzOutletModule,
|
118
|
+
TrustedHtmlPipe,
|
119
|
+
FormlyModule.forChild({
|
120
|
+
types: [
|
121
|
+
{
|
122
|
+
name: 'ref-template',
|
123
|
+
component: FormlyFieldRefTemplate
|
124
|
+
}
|
125
|
+
]
|
126
|
+
})
|
127
|
+
]
|
128
|
+
}]
|
129
|
+
}] });
|
130
|
+
|
131
|
+
/**
|
132
|
+
* Generated bundle index. Do not edit.
|
133
|
+
*/
|
134
|
+
|
135
|
+
export { FormlyFieldRefTemplate, FormlyRefTemplateModule };
|
136
|
+
//# sourceMappingURL=ngx-formly-zorro-antd-ref-template.mjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ngx-formly-zorro-antd-ref-template.mjs","sources":["../../../../packages/formlyantd/ref-template/src/ref-template.type.ts","../../../../packages/formlyantd/ref-template/src/ref-template.module.ts","../../../../packages/formlyantd/ref-template/src/ngx-formly-zorro-antd-ref-template.ts"],"sourcesContent":["import { Component, TemplateRef, Optional, Type, ChangeDetectionStrategy } from '@angular/core';\nimport { FieldType, FieldTypeConfig } from '@ngx-formly/core';\nimport type { FormlyFieldProps } from 'ngx-formly-zorro-antd/form-field';\nimport type { NzFormlyFieldConfig } from 'ngx-formly-zorro-antd/common';\nimport { FormlyBoxTemplates, resolveTplName } from 'ngx-formly-zorro-antd/common';\n\ninterface RefTemplateProps extends FormlyFieldProps {\n ref?: string | TemplateRef<{ $implicit: FormlyRefTemplateFieldConfig; props: RefTemplateProps }>;\n refName?: string;\n}\n\n/**\n * RefTemplate 配置\n */\nexport interface FormlyRefTemplateFieldConfig extends NzFormlyFieldConfig<RefTemplateProps> {\n type: 'ref-template' | Type<FormlyFieldRefTemplate>;\n}\n\n/**\n * 引用模板,支持HTML,TemplateRef对象,或者NamedTemplate\n * @example\n *\n * 用法1: 使用NamedTemplate(推荐)\n *\n * html\n * ```html\n * <formly-form formly-box>\n * <ng-template named=\"test\"></ng-template>\n * </formly-form>\n * ```\n *\n * 配置\n * ```js\n * {\n * type: 'ref-template',\n * props: {\n * refName: 'test'\n * }\n * }\n * ```\n *\n * 用法2:TemplateRef对象\n * ```html\n * <ng-template #test2></ng-template>\n * ```\n *\n * 配置\n * @viewChild('test2') test2: TemplateRef<{}>;\n *\n * ```js\n * {\n * type: 'ref-template',\n * props: {\n * ref: this.test2\n * }\n * }\n * ```\n *\n * 用法3: 使用html\n *\n * 配置\n * ```js\n * {\n * type: 'ref-template',\n * props: {\n * ref: '<div>test text</div>'\n * }\n * }\n * ```\n */\n@Component({\n selector: 'formly-ref-template',\n template: `\n <ng-container *nzStringTemplateOutlet=\"ref; context: { $implicit: field, props: props }\">\n <div [innerHTML]=\"$any(ref) | trustedHtml\"></div>\n </ng-container>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class FormlyFieldRefTemplate extends FieldType<FieldTypeConfig<RefTemplateProps>> {\n constructor(@Optional() public fieldTemplates: FormlyBoxTemplates) {\n super();\n }\n\n get ref() {\n return resolveTplName(this.props, this.fieldTemplates, 'ref');\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormlyModule } from '@ngx-formly/core';\nimport { NzOutletModule } from 'ng-zorro-antd/core/outlet';\n\nimport { TrustedHtmlPipe } from '@pkt/ng.core';\nimport { FormlyFieldRefTemplate } from './ref-template.type';\n\n@NgModule({\n declarations: [FormlyFieldRefTemplate],\n imports: [\n CommonModule,\n NzOutletModule,\n TrustedHtmlPipe,\n FormlyModule.forChild({\n types: [\n {\n name: 'ref-template',\n component: FormlyFieldRefTemplate\n }\n ]\n })\n ]\n})\nexport class FormlyRefTemplateModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names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AAE,cAAc;AACpB,oCAAA,SAAS,EAAE,sBAAsB;AAClC,iCAAA;AACF,6BAAA;yBACF,CAAC;AACH,qBAAA;AACF,iBAAA,CAAA;;;ACvBD;;AAEG;;;;"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ngx-formly-zorro-antd-space.mjs","sources":["../../../../packages/formlyantd/space/src/space.type.ts","../../../../packages/formlyantd/space/src/space.module.ts","../../../../packages/formlyantd/space/src/ngx-formly-zorro-antd-space.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy, Type, TemplateRef, Optional } from '@angular/core';\nimport { FieldType, FieldTypeConfig } from '@ngx-formly/core';\nimport type { FormlyFieldProps } from 'ngx-formly-zorro-antd/form-field';\nimport { FormlyBoxTemplates, resolveTplName } from 'ngx-formly-zorro-antd/common';\nimport type { NzFormlyFieldConfig } from 'ngx-formly-zorro-antd/common';\nimport type { NzSpaceDirection, NzSpaceSize, NzSpaceAlign } from 'ng-zorro-antd/space';\n\ninterface SpaceProps extends FormlyFieldProps {\n type?: 'space';\n\n /**\n * 间距大小\n */\n size?: NzSpaceSize;\n /**\n * 间距方向\n */\n direction?: NzSpaceDirection;\n /**\n * 对齐方式\n */\n align?: NzSpaceAlign;\n /**\n * 是否自动换行,仅在 horizontal 时有效\n */\n wrap?: boolean;\n /**\n * 设置分隔符\n */\n split?: TemplateRef<{\n $implicit: number;\n }> | null;\n
|
1
|
+
{"version":3,"file":"ngx-formly-zorro-antd-space.mjs","sources":["../../../../packages/formlyantd/space/src/space.type.ts","../../../../packages/formlyantd/space/src/space.module.ts","../../../../packages/formlyantd/space/src/ngx-formly-zorro-antd-space.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy, Type, TemplateRef, Optional } from '@angular/core';\nimport { FieldType, FieldTypeConfig } from '@ngx-formly/core';\nimport type { FormlyFieldProps } from 'ngx-formly-zorro-antd/form-field';\nimport { FormlyBoxTemplates, resolveTplName } from 'ngx-formly-zorro-antd/common';\nimport type { NzFormlyFieldConfig } from 'ngx-formly-zorro-antd/common';\nimport type { NzSpaceDirection, NzSpaceSize, NzSpaceAlign } from 'ng-zorro-antd/space';\n\ninterface SpaceProps extends FormlyFieldProps {\n type?: 'space';\n\n /**\n * 间距大小\n */\n size?: NzSpaceSize;\n /**\n * 间距方向\n */\n direction?: NzSpaceDirection;\n /**\n * 对齐方式\n */\n align?: NzSpaceAlign;\n /**\n * 是否自动换行,仅在 horizontal 时有效\n */\n wrap?: boolean;\n /**\n * 设置分隔符\n */\n split?: TemplateRef<{\n $implicit: number;\n }> | null;\n splitName?: string;\n}\n\nexport interface FormlySpaceFieldConfig extends NzFormlyFieldConfig<SpaceProps> {\n type: 'space' | Type<FormlyFieldSpace>;\n}\n\n@Component({\n selector: 'formly-field-space',\n template: `\n <nz-space\n [nzSize]=\"props.size!\"\n [nzAlign]=\"props.align\"\n [nzDirection]=\"props.direction!\"\n [nzSplit]=\"nzSplit ?? null\"\n [nzWrap]=\"props.wrap\"\n [formlyAttributes]=\"field\"\n >\n <ng-container *ngFor=\"let item of field.fieldGroup\">\n <formly-field *nzSpaceItem [field]=\"item\"></formly-field>\n </ng-container>\n </nz-space>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class FormlyFieldSpace extends FieldType<FieldTypeConfig<SpaceProps>> {\n override defaultOptions = {\n props: {\n size: 'small' as const,\n direction: 'horizontal' as const,\n wrap: false\n }\n };\n constructor(@Optional() public fieldTemplates: FormlyBoxTemplates) {\n super();\n }\n get nzSplit() {\n return resolveTplName(this.props, this.fieldTemplates, 'split');\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormlyModule } from '@ngx-formly/core';\nimport { FormlyCommonModule } from 'ngx-formly-zorro-antd/common';\nimport { FormlyFieldSpace } from './space.type';\n\nimport { NzSpaceModule } from 'ng-zorro-antd/space';\n\n@NgModule({\n declarations: [FormlyFieldSpace],\n imports: [\n CommonModule,\n FormlyCommonModule,\n NzSpaceModule,\n FormlyModule.forChild({\n types: [\n {\n name: 'space',\n component: FormlyFieldSpace\n }\n ]\n })\n ]\n})\nexport class FormlyNzSpaceModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1"],"mappings":";;;;;;;;;;;AAyDM,MAAO,gBAAiB,SAAQ,SAAsC,CAAA;AAQ1E,IAAA,WAAA,CAA+B,cAAkC,EAAA;AAC/D,QAAA,KAAK,EAAE,CAAC;QADqB,IAAc,CAAA,cAAA,GAAd,cAAc,CAAoB;AAPxD,QAAA,IAAA,CAAA,cAAc,GAAG;AACxB,YAAA,KAAK,EAAE;AACL,gBAAA,IAAI,EAAE,OAAgB;AACtB,gBAAA,SAAS,EAAE,YAAqB;AAChC,gBAAA,IAAI,EAAE,KAAK;AACZ,aAAA;SACF,CAAC;KAGD;AACD,IAAA,IAAI,OAAO,GAAA;AACT,QAAA,OAAO,cAAc,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,cAAc,EAAE,OAAO,CAAC,CAAC;KACjE;8GAbU,gBAAgB,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,kBAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;AAAhB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,gBAAgB,EAhBjB,QAAA,EAAA,oBAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,CAAA;;;;;;;;;;;;;AAaT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,OAAA,EAAA,QAAA,EAAA,kB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,kBAAkB;YAClB,aAAa,EAAAA,EAAA,CAAA,YAAA,CAAA,EAAA,CAAA,CAAA,EAAA;AAWJ,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,mBAAmB,YAb5B,YAAY;YACZ,kBAAkB;YAClB,aAAa;YACb,YAAY,CAAC,QAAQ,CAAC;AACpB,gBAAA,KAAK,EAAE;AACL,oBAAA;AACE,wBAAA,IAAI,EAAE,OAAO;AACb,wBAAA,SAAS,EAAE,gBAAgB;AAC5B,qBAAA;AACF,iBAAA;aACF,CAAC,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAGO,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAhB/B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,gBAAgB,CAAC;AAChC,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,kBAAkB;wBAClB,aAAa;wBACb,YAAY,CAAC,QAAQ,CAAC;AACpB,4BAAA,KAAK,EAAE;AACL,gCAAA;AACE,oCAAA,IAAI,EAAE,OAAO;AACb,oCAAA,SAAS,EAAE,gBAAgB;AAC5B,iCAAA;AACF,6BAAA;yBACF,CAAC;AACH,qBAAA;AACF,iBAAA,CAAA;;;ACvBD;;AAEG;;;;"}
|
@@ -24,6 +24,7 @@ import { FormlyNzCardWrapperModule } from 'ngx-formly-zorro-antd/card-wrapper';
|
|
24
24
|
import { FormlyNzButtonModule } from 'ngx-formly-zorro-antd/button';
|
25
25
|
import { FormlyNzGridModule } from 'ngx-formly-zorro-antd/grid';
|
26
26
|
import { FormlyNzSpaceModule } from 'ngx-formly-zorro-antd/space';
|
27
|
+
import { FormlyRefTemplateModule } from 'ngx-formly-zorro-antd/ref-template';
|
27
28
|
|
28
29
|
class FormlyNgAntdModule {
|
29
30
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: FormlyNgAntdModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
@@ -50,7 +51,8 @@ class FormlyNgAntdModule {
|
|
50
51
|
FormlyNzCardWrapperModule,
|
51
52
|
FormlyNzButtonModule,
|
52
53
|
FormlyNzGridModule,
|
53
|
-
FormlyNzSpaceModule
|
54
|
+
FormlyNzSpaceModule,
|
55
|
+
FormlyRefTemplateModule] }); }
|
54
56
|
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: FormlyNgAntdModule, imports: [FormlyNzFormFieldModule,
|
55
57
|
FormlyCommonModule,
|
56
58
|
FormlyNzInputModule,
|
@@ -74,7 +76,8 @@ class FormlyNgAntdModule {
|
|
74
76
|
FormlyNzCardWrapperModule,
|
75
77
|
FormlyNzButtonModule,
|
76
78
|
FormlyNzGridModule,
|
77
|
-
FormlyNzSpaceModule
|
79
|
+
FormlyNzSpaceModule,
|
80
|
+
FormlyRefTemplateModule] }); }
|
78
81
|
}
|
79
82
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: FormlyNgAntdModule, decorators: [{
|
80
83
|
type: NgModule,
|
@@ -103,7 +106,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImpor
|
|
103
106
|
FormlyNzCardWrapperModule,
|
104
107
|
FormlyNzButtonModule,
|
105
108
|
FormlyNzGridModule,
|
106
|
-
FormlyNzSpaceModule
|
109
|
+
FormlyNzSpaceModule,
|
110
|
+
FormlyRefTemplateModule
|
107
111
|
]
|
108
112
|
}]
|
109
113
|
}] });
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ngx-formly-zorro-antd.mjs","sources":["../../../../packages/formlyantd/src/lib/ui-ng-zorro-antd.module.ts","../../../../packages/formlyantd/src/ngx-formly-zorro-antd.ts"],"sourcesContent":["import { NgModule } from '@angular/core';\n\nimport { FormlyNzFormFieldModule } from 'ngx-formly-zorro-antd/form-field';\nimport { FormlyCommonModule } from 'ngx-formly-zorro-antd/common';\nimport { FormlyNzInputModule } from 'ngx-formly-zorro-antd/input';\nimport { FormlyNzInputNumberModule } from 'ngx-formly-zorro-antd/input-number';\nimport { FormlyNzInputGroupModule } from 'ngx-formly-zorro-antd/input-group';\nimport { FormlyNzTextareaModule } from 'ngx-formly-zorro-antd/textarea';\nimport { FormlyNzRadioModule } from 'ngx-formly-zorro-antd/radio';\nimport { FormlyNzCheckboxModule } from 'ngx-formly-zorro-antd/checkbox';\nimport { FormlyNzSelectModule } from 'ngx-formly-zorro-antd/select';\nimport { FormlyNzSwitchModule } from 'ngx-formly-zorro-antd/switch';\nimport { FormlyNzCascaderModule } from 'ngx-formly-zorro-antd/cascader';\nimport { FormlyNzDatepickerModule } from 'ngx-formly-zorro-antd/datepicker';\nimport { FormlyNzRateModule } from 'ngx-formly-zorro-antd/rate';\nimport { FormlyNzSliderModule } from 'ngx-formly-zorro-antd/slider';\nimport { FormlyNzTimepickerModule } from 'ngx-formly-zorro-antd/timepicker';\nimport { FormlyNzTransferModule } from 'ngx-formly-zorro-antd/transfer';\nimport { FormlyNzTreeSelectModule } from 'ngx-formly-zorro-antd/tree-select';\nimport { FormlyNzUploadModule } from 'ngx-formly-zorro-antd/upload';\nimport { FormlyNzTabsModule } from 'ngx-formly-zorro-antd/tabs';\nimport { FormlyNzCardModule } from 'ngx-formly-zorro-antd/card';\nimport { FormlyNzCardWrapperModule } from 'ngx-formly-zorro-antd/card-wrapper';\nimport { FormlyNzButtonModule } from 'ngx-formly-zorro-antd/button';\nimport { FormlyNzGridModule } from 'ngx-formly-zorro-antd/grid';\nimport { FormlyNzSpaceModule } from 'ngx-formly-zorro-antd/space';\n\n@NgModule({\n imports: [\n FormlyNzFormFieldModule,\n FormlyCommonModule,\n FormlyNzInputModule,\n FormlyNzInputNumberModule,\n FormlyNzInputGroupModule,\n FormlyNzTextareaModule,\n FormlyNzRadioModule,\n FormlyNzCheckboxModule,\n FormlyNzSelectModule,\n FormlyNzSwitchModule,\n FormlyNzCascaderModule,\n FormlyNzDatepickerModule,\n FormlyNzRateModule,\n FormlyNzSliderModule,\n FormlyNzTimepickerModule,\n FormlyNzTransferModule,\n FormlyNzTreeSelectModule,\n FormlyNzUploadModule,\n FormlyNzTabsModule,\n FormlyNzCardModule,\n FormlyNzCardWrapperModule,\n FormlyNzButtonModule,\n FormlyNzGridModule,\n FormlyNzSpaceModule\n ]\n})\nexport class FormlyNgAntdModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"ngx-formly-zorro-antd.mjs","sources":["../../../../packages/formlyantd/src/lib/ui-ng-zorro-antd.module.ts","../../../../packages/formlyantd/src/ngx-formly-zorro-antd.ts"],"sourcesContent":["import { NgModule } from '@angular/core';\n\nimport { FormlyNzFormFieldModule } from 'ngx-formly-zorro-antd/form-field';\nimport { FormlyCommonModule } from 'ngx-formly-zorro-antd/common';\nimport { FormlyNzInputModule } from 'ngx-formly-zorro-antd/input';\nimport { FormlyNzInputNumberModule } from 'ngx-formly-zorro-antd/input-number';\nimport { FormlyNzInputGroupModule } from 'ngx-formly-zorro-antd/input-group';\nimport { FormlyNzTextareaModule } from 'ngx-formly-zorro-antd/textarea';\nimport { FormlyNzRadioModule } from 'ngx-formly-zorro-antd/radio';\nimport { FormlyNzCheckboxModule } from 'ngx-formly-zorro-antd/checkbox';\nimport { FormlyNzSelectModule } from 'ngx-formly-zorro-antd/select';\nimport { FormlyNzSwitchModule } from 'ngx-formly-zorro-antd/switch';\nimport { FormlyNzCascaderModule } from 'ngx-formly-zorro-antd/cascader';\nimport { FormlyNzDatepickerModule } from 'ngx-formly-zorro-antd/datepicker';\nimport { FormlyNzRateModule } from 'ngx-formly-zorro-antd/rate';\nimport { FormlyNzSliderModule } from 'ngx-formly-zorro-antd/slider';\nimport { FormlyNzTimepickerModule } from 'ngx-formly-zorro-antd/timepicker';\nimport { FormlyNzTransferModule } from 'ngx-formly-zorro-antd/transfer';\nimport { FormlyNzTreeSelectModule } from 'ngx-formly-zorro-antd/tree-select';\nimport { FormlyNzUploadModule } from 'ngx-formly-zorro-antd/upload';\nimport { FormlyNzTabsModule } from 'ngx-formly-zorro-antd/tabs';\nimport { FormlyNzCardModule } from 'ngx-formly-zorro-antd/card';\nimport { FormlyNzCardWrapperModule } from 'ngx-formly-zorro-antd/card-wrapper';\nimport { FormlyNzButtonModule } from 'ngx-formly-zorro-antd/button';\nimport { FormlyNzGridModule } from 'ngx-formly-zorro-antd/grid';\nimport { FormlyNzSpaceModule } from 'ngx-formly-zorro-antd/space';\nimport { FormlyRefTemplateModule } from 'ngx-formly-zorro-antd/ref-template';\n\n@NgModule({\n imports: [\n FormlyNzFormFieldModule,\n FormlyCommonModule,\n FormlyNzInputModule,\n FormlyNzInputNumberModule,\n FormlyNzInputGroupModule,\n FormlyNzTextareaModule,\n FormlyNzRadioModule,\n FormlyNzCheckboxModule,\n FormlyNzSelectModule,\n FormlyNzSwitchModule,\n FormlyNzCascaderModule,\n FormlyNzDatepickerModule,\n FormlyNzRateModule,\n FormlyNzSliderModule,\n FormlyNzTimepickerModule,\n FormlyNzTransferModule,\n FormlyNzTreeSelectModule,\n FormlyNzUploadModule,\n FormlyNzTabsModule,\n FormlyNzCardModule,\n FormlyNzCardWrapperModule,\n FormlyNzButtonModule,\n FormlyNzGridModule,\n FormlyNzSpaceModule,\n FormlyRefTemplateModule\n ]\n})\nexport class FormlyNgAntdModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;MAyDa,kBAAkB,CAAA;8GAAlB,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,C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AAO,EAAE;wBACP,uBAAuB;wBACvB,kBAAkB;wBAClB,mBAAmB;wBACnB,yBAAyB;wBACzB,wBAAwB;wBACxB,sBAAsB;wBACtB,mBAAmB;wBACnB,sBAAsB;wBACtB,oBAAoB;wBACpB,oBAAoB;wBACpB,sBAAsB;wBACtB,wBAAwB;wBACxB,kBAAkB;wBAClB,oBAAoB;wBACpB,wBAAwB;wBACxB,sBAAsB;wBACtB,wBAAwB;wBACxB,oBAAoB;wBACpB,kBAAkB;wBAClB,kBAAkB;wBAClB,yBAAyB;wBACzB,oBAAoB;wBACpB,kBAAkB;wBAClB,mBAAmB;wBACnB,uBAAuB;AACxB,qBAAA;AACF,iBAAA,CAAA;;;ACxDD;;AAEG;;;;"}
|
@@ -23,8 +23,9 @@ import * as i21 from "ngx-formly-zorro-antd/card-wrapper";
|
|
23
23
|
import * as i22 from "ngx-formly-zorro-antd/button";
|
24
24
|
import * as i23 from "ngx-formly-zorro-antd/grid";
|
25
25
|
import * as i24 from "ngx-formly-zorro-antd/space";
|
26
|
+
import * as i25 from "ngx-formly-zorro-antd/ref-template";
|
26
27
|
export declare class FormlyNgAntdModule {
|
27
28
|
static ɵfac: i0.ɵɵFactoryDeclaration<FormlyNgAntdModule, never>;
|
28
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<FormlyNgAntdModule, never, [typeof i1.FormlyNzFormFieldModule, typeof i2.FormlyCommonModule, typeof i3.FormlyNzInputModule, typeof i4.FormlyNzInputNumberModule, typeof i5.FormlyNzInputGroupModule, typeof i6.FormlyNzTextareaModule, typeof i7.FormlyNzRadioModule, typeof i8.FormlyNzCheckboxModule, typeof i9.FormlyNzSelectModule, typeof i10.FormlyNzSwitchModule, typeof i11.FormlyNzCascaderModule, typeof i12.FormlyNzDatepickerModule, typeof i13.FormlyNzRateModule, typeof i14.FormlyNzSliderModule, typeof i15.FormlyNzTimepickerModule, typeof i16.FormlyNzTransferModule, typeof i17.FormlyNzTreeSelectModule, typeof i18.FormlyNzUploadModule, typeof i19.FormlyNzTabsModule, typeof i20.FormlyNzCardModule, typeof i21.FormlyNzCardWrapperModule, typeof i22.FormlyNzButtonModule, typeof i23.FormlyNzGridModule, typeof i24.FormlyNzSpaceModule], never>;
|
29
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<FormlyNgAntdModule, never, [typeof i1.FormlyNzFormFieldModule, typeof i2.FormlyCommonModule, typeof i3.FormlyNzInputModule, typeof i4.FormlyNzInputNumberModule, typeof i5.FormlyNzInputGroupModule, typeof i6.FormlyNzTextareaModule, typeof i7.FormlyNzRadioModule, typeof i8.FormlyNzCheckboxModule, typeof i9.FormlyNzSelectModule, typeof i10.FormlyNzSwitchModule, typeof i11.FormlyNzCascaderModule, typeof i12.FormlyNzDatepickerModule, typeof i13.FormlyNzRateModule, typeof i14.FormlyNzSliderModule, typeof i15.FormlyNzTimepickerModule, typeof i16.FormlyNzTransferModule, typeof i17.FormlyNzTreeSelectModule, typeof i18.FormlyNzUploadModule, typeof i19.FormlyNzTabsModule, typeof i20.FormlyNzCardModule, typeof i21.FormlyNzCardWrapperModule, typeof i22.FormlyNzButtonModule, typeof i23.FormlyNzGridModule, typeof i24.FormlyNzSpaceModule, typeof i25.FormlyRefTemplateModule], never>;
|
29
30
|
static ɵinj: i0.ɵɵInjectorDeclaration<FormlyNgAntdModule>;
|
30
31
|
}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "ngx-formly-zorro-antd",
|
3
|
-
"version": "16.1.
|
3
|
+
"version": "16.1.4",
|
4
4
|
"publishConfig": {
|
5
5
|
"registry": "https://registry.npmjs.org",
|
6
6
|
"access": "public"
|
@@ -13,8 +13,8 @@
|
|
13
13
|
"@angular/platform-browser": "^16.0.0",
|
14
14
|
"ng-zorro-antd": "^16.1.0",
|
15
15
|
"@ngx-formly/core": "^6.0.0",
|
16
|
+
"@pkt/ng.core": "^4.0.3",
|
16
17
|
"rxjs": "^6.5.3 || ^7.4.0",
|
17
|
-
"@pkt/ng.core": "4.0.2",
|
18
18
|
"@ant-design/icons-angular": "16.0.0"
|
19
19
|
},
|
20
20
|
"dependencies": {
|
@@ -38,18 +38,18 @@
|
|
38
38
|
"esm": "./esm2022/autocomplete/ngx-formly-zorro-antd-autocomplete.mjs",
|
39
39
|
"default": "./fesm2022/ngx-formly-zorro-antd-autocomplete.mjs"
|
40
40
|
},
|
41
|
-
"./button": {
|
42
|
-
"types": "./button/index.d.ts",
|
43
|
-
"esm2022": "./esm2022/button/ngx-formly-zorro-antd-button.mjs",
|
44
|
-
"esm": "./esm2022/button/ngx-formly-zorro-antd-button.mjs",
|
45
|
-
"default": "./fesm2022/ngx-formly-zorro-antd-button.mjs"
|
46
|
-
},
|
47
41
|
"./card-wrapper": {
|
48
42
|
"types": "./card-wrapper/index.d.ts",
|
49
43
|
"esm2022": "./esm2022/card-wrapper/ngx-formly-zorro-antd-card-wrapper.mjs",
|
50
44
|
"esm": "./esm2022/card-wrapper/ngx-formly-zorro-antd-card-wrapper.mjs",
|
51
45
|
"default": "./fesm2022/ngx-formly-zorro-antd-card-wrapper.mjs"
|
52
46
|
},
|
47
|
+
"./button": {
|
48
|
+
"types": "./button/index.d.ts",
|
49
|
+
"esm2022": "./esm2022/button/ngx-formly-zorro-antd-button.mjs",
|
50
|
+
"esm": "./esm2022/button/ngx-formly-zorro-antd-button.mjs",
|
51
|
+
"default": "./fesm2022/ngx-formly-zorro-antd-button.mjs"
|
52
|
+
},
|
53
53
|
"./cascader": {
|
54
54
|
"types": "./cascader/index.d.ts",
|
55
55
|
"esm2022": "./esm2022/cascader/ngx-formly-zorro-antd-cascader.mjs",
|
@@ -62,18 +62,18 @@
|
|
62
62
|
"esm": "./esm2022/checkbox/ngx-formly-zorro-antd-checkbox.mjs",
|
63
63
|
"default": "./fesm2022/ngx-formly-zorro-antd-checkbox.mjs"
|
64
64
|
},
|
65
|
-
"./card": {
|
66
|
-
"types": "./card/index.d.ts",
|
67
|
-
"esm2022": "./esm2022/card/ngx-formly-zorro-antd-card.mjs",
|
68
|
-
"esm": "./esm2022/card/ngx-formly-zorro-antd-card.mjs",
|
69
|
-
"default": "./fesm2022/ngx-formly-zorro-antd-card.mjs"
|
70
|
-
},
|
71
65
|
"./common": {
|
72
66
|
"types": "./common/index.d.ts",
|
73
67
|
"esm2022": "./esm2022/common/ngx-formly-zorro-antd-common.mjs",
|
74
68
|
"esm": "./esm2022/common/ngx-formly-zorro-antd-common.mjs",
|
75
69
|
"default": "./fesm2022/ngx-formly-zorro-antd-common.mjs"
|
76
70
|
},
|
71
|
+
"./card": {
|
72
|
+
"types": "./card/index.d.ts",
|
73
|
+
"esm2022": "./esm2022/card/ngx-formly-zorro-antd-card.mjs",
|
74
|
+
"esm": "./esm2022/card/ngx-formly-zorro-antd-card.mjs",
|
75
|
+
"default": "./fesm2022/ngx-formly-zorro-antd-card.mjs"
|
76
|
+
},
|
77
77
|
"./datepicker": {
|
78
78
|
"types": "./datepicker/index.d.ts",
|
79
79
|
"esm2022": "./esm2022/datepicker/ngx-formly-zorro-antd-datepicker.mjs",
|
@@ -128,6 +128,12 @@
|
|
128
128
|
"esm": "./esm2022/rate/ngx-formly-zorro-antd-rate.mjs",
|
129
129
|
"default": "./fesm2022/ngx-formly-zorro-antd-rate.mjs"
|
130
130
|
},
|
131
|
+
"./ref-template": {
|
132
|
+
"types": "./ref-template/index.d.ts",
|
133
|
+
"esm2022": "./esm2022/ref-template/ngx-formly-zorro-antd-ref-template.mjs",
|
134
|
+
"esm": "./esm2022/ref-template/ngx-formly-zorro-antd-ref-template.mjs",
|
135
|
+
"default": "./fesm2022/ngx-formly-zorro-antd-ref-template.mjs"
|
136
|
+
},
|
131
137
|
"./select": {
|
132
138
|
"types": "./select/index.d.ts",
|
133
139
|
"esm2022": "./esm2022/select/ngx-formly-zorro-antd-select.mjs",
|