ngx-formly-zorro-antd 19.1.0 → 19.2.0
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/common/formly-box-templates.directive.d.ts +2 -2
- package/fesm2022/ngx-formly-zorro-antd-common.mjs +2 -4
- package/fesm2022/ngx-formly-zorro-antd-common.mjs.map +1 -1
- package/fesm2022/ngx-formly-zorro-antd-helpers.mjs +28 -18
- package/fesm2022/ngx-formly-zorro-antd-helpers.mjs.map +1 -1
- package/fesm2022/ngx-formly-zorro-antd-space-compact.mjs.map +1 -1
- package/grid/public_api.d.ts +1 -1
- package/helpers/common.d.ts +6 -8
- package/helpers/formly.d.ts +9 -9
- package/helpers/public_api.d.ts +2 -1
- package/package.json +1 -1
- package/space-compact/space-compact.type.d.ts +3 -3
@@ -1,4 +1,4 @@
|
|
1
|
-
import { AfterContentInit,
|
1
|
+
import { AfterContentInit, OnChanges, QueryList, SimpleChange, SimpleChanges, TemplateRef } from '@angular/core';
|
2
2
|
import { NamedTemplate } from '@pkt/ng.core';
|
3
3
|
import type { NzSafeAny } from 'ng-zorro-antd/core/types';
|
4
4
|
import * as i0 from "@angular/core";
|
@@ -8,7 +8,7 @@ import * as i0 from "@angular/core";
|
|
8
8
|
export declare class FormlyBoxTemplates implements AfterContentInit, OnChanges {
|
9
9
|
private tplMap;
|
10
10
|
templateList?: TemplateList;
|
11
|
-
templateChange:
|
11
|
+
templateChange: import("@angular/core").OutputEmitterRef<Map<string, TemplateRef<any>>>;
|
12
12
|
namedTemplate: QueryList<NamedTemplate<NzSafeAny>>;
|
13
13
|
get templates(): Map<string, TemplateRef<NzSafeAny>>;
|
14
14
|
/**
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import * as i0 from '@angular/core';
|
2
|
-
import {
|
2
|
+
import { output, TemplateRef, Directive, Input, ContentChildren, NgModule } from '@angular/core';
|
3
3
|
import { NamedTemplate } from '@pkt/ng.core';
|
4
4
|
import { CommonModule } from '@angular/common';
|
5
5
|
|
@@ -9,7 +9,7 @@ import { CommonModule } from '@angular/common';
|
|
9
9
|
class FormlyBoxTemplates {
|
10
10
|
constructor() {
|
11
11
|
this.tplMap = new Map();
|
12
|
-
this.templateChange =
|
12
|
+
this.templateChange = output();
|
13
13
|
}
|
14
14
|
get templates() {
|
15
15
|
return this.tplMap;
|
@@ -102,8 +102,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.8", ngImpor
|
|
102
102
|
}], propDecorators: { templateList: [{
|
103
103
|
type: Input,
|
104
104
|
args: ['formly-box']
|
105
|
-
}], templateChange: [{
|
106
|
-
type: Output
|
107
105
|
}], namedTemplate: [{
|
108
106
|
type: ContentChildren,
|
109
107
|
args: [NamedTemplate]
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ngx-formly-zorro-antd-common.mjs","sources":["../../../../packages/formlyantd/common/formly-box-templates.directive.ts","../../../../packages/formlyantd/common/common.module.ts","../../../../packages/formlyantd/common/formly-utils.ts","../../../../packages/formlyantd/common/ngx-formly-zorro-antd-common.ts"],"sourcesContent":["import {\n AfterContentInit,\n ContentChildren,\n Directive,\n EventEmitter,\n Input,\n OnChanges,\n Output,\n QueryList,\n SimpleChange,\n SimpleChanges,\n TemplateRef\n} from '@angular/core';\nimport { NamedTemplate } from '@pkt/ng.core';\nimport type { NzSafeAny } from 'ng-zorro-antd/core/types';\n\n/**\n * @private\n */\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: '[formly-box]',\n standalone: true,\n exportAs: 'FormlyBox'\n})\nexport class FormlyBoxTemplates implements AfterContentInit, OnChanges {\n private tplMap = new Map<string, TemplateRef<NzSafeAny>>();\n @Input('formly-box') templateList?: TemplateList;\n @Output() templateChange = new EventEmitter<Map<string, TemplateRef<NzSafeAny>>>();\n @ContentChildren(NamedTemplate) namedTemplate!: QueryList<NamedTemplate<NzSafeAny>>;\n\n get templates(): Map<string, TemplateRef<NzSafeAny>> {\n return this.tplMap;\n }\n\n /**\n * 根据模板名称获取TemplateRef\n * @param templateName 模板名称\n */\n get(templateName: string): TemplateRef<NzSafeAny> | undefined {\n return this.tplMap.get(templateName);\n }\n\n ngAfterContentInit(): void {\n this.update();\n this.namedTemplate.changes.subscribe(() => {\n this.update();\n });\n }\n update(emitChange = true) {\n this.tplMap.clear();\n this.mergeTemplate(this.tplMap, emitChange);\n }\n\n ngOnChanges(changes: { [K in keyof this]?: SimpleChange } & SimpleChanges): void {\n if (changes.templateList && !changes.templateList.isFirstChange()) {\n this.update();\n }\n }\n\n /**\n * 合并参数模板\n * @param tplMap\n * @param emitChange\n */\n mergeTemplate(tplMap: Map<string, TemplateRef<NzSafeAny>>, emitChange = true) {\n this.mergeTemplates(tplMap, this.templateList);\n this.mergeQueryTemplate(tplMap, this.namedTemplate);\n\n if (emitChange) {\n this.templateChange.emit(tplMap);\n }\n }\n\n /**\n * 合并content 模板\n * @param tplMap\n * @param templateList\n * @private\n */\n private mergeQueryTemplate(\n tplMap: Map<string, TemplateRef<NzSafeAny>>,\n templateList?: QueryList<NamedTemplate<NzSafeAny>>\n ): void {\n if (templateList) {\n templateList.forEach(v => {\n tplMap.set(v.named ?? '', v.template);\n });\n }\n }\n\n /**\n * 合并模板列表\n * @param tplMap 模板Map\n * @param templateList\n */\n private mergeTemplates(tplMap: Map<string, TemplateRef<NzSafeAny>>, templateList?: TemplateList): void {\n if (!templateList) {\n return;\n }\n\n if (templateList instanceof TemplateRef) {\n const namedTpl = new NamedTemplate(templateList);\n namedTpl.resolveName();\n tplMap.set(namedTpl.named ?? '', namedTpl.template);\n return;\n }\n\n templateList.forEach(v => {\n if (v instanceof NamedTemplate) {\n tplMap.set(v.named ?? '', v.template);\n } else {\n const namedTpl = new NamedTemplate(v);\n namedTpl.resolveName();\n tplMap.set(namedTpl.named ?? '', namedTpl.template);\n }\n });\n\n return;\n }\n}\n\n/**\n * 模板列表\n */\nexport type TemplateList =\n | QueryList<TemplateRef<NzSafeAny>>\n | QueryList<NamedTemplate<NzSafeAny>>\n | NamedTemplate<NzSafeAny>[]\n | TemplateRef<NzSafeAny>;\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormlyBoxTemplates } from './formly-box-templates.directive';\nimport { NamedTemplate } from '@pkt/ng.core';\n\nconst COMPONENT = [FormlyBoxTemplates, NamedTemplate];\n\n@NgModule({\n imports: [CommonModule, ...COMPONENT],\n exports: COMPONENT\n})\nexport class FormlyCommonModule {}\n","import { TemplateRef } from '@angular/core';\nimport type { NzSafeAny } from 'ng-zorro-antd/core/types';\nimport { FormlyBoxTemplates } from './formly-box-templates.directive';\n\n/**\n * 根据属性名获取模板名称\n * @param propName 属性名\n */\nexport function getTplName(propName: string) {\n return `${propName}Name`;\n}\n\n/**\n * 获取模板名称\n * @param value\n * @param propName\n * @param propTemplateName 模板属性名称\n */\nexport function hasTplNameValue(\n value: NzSafeAny,\n propName: string,\n propTemplateName?: string\n): boolean {\n const tplName = propTemplateName || getTplName(propName);\n return value[propName] || value[tplName];\n}\n\n/**\n * 处理属性为模板类型, 根据模板名称处理成模板对象\n * @param value 数据对象\n * @param fieldTemplates 模板容器\n * @param propName 属性名\n * @param propTemplateName 模板属性名称\n */\nexport function resolveTplName<T = NzSafeAny>(\n value: NzSafeAny,\n fieldTemplates: FormlyBoxTemplates,\n propName: string,\n propTemplateName?: string\n): TemplateRef<T> | undefined {\n if (value[propName]) {\n return value[propName];\n }\n if (!fieldTemplates) {\n return undefined;\n }\n const tplName = propTemplateName || getTplName(propName);\n return fieldTemplates.get(value[tplName]);\n}\n\n/**\n * 处理属性为模板类型, 根据模板名称处理成模板对象列表\n * @param value 数据对象\n * @param fieldTemplates 模板容器\n * @param propName 属性名\n * @param propTemplateName 模板属性名称\n */\nexport function resolveTplNameArray<T = NzSafeAny>(\n value: NzSafeAny,\n fieldTemplates: FormlyBoxTemplates,\n propName: string,\n propTemplateName?: string\n): TemplateRef<T>[] {\n if (value[propName] != null) {\n return value[propName];\n }\n if (!fieldTemplates) {\n return [];\n }\n const tplName = propTemplateName || getTplName(propName);\n const tplValue = value[tplName];\n if (Array.isArray(tplValue)) {\n return tplValue.map(key => fieldTemplates.get(key)).filter(tpl => tpl) as TemplateRef<T>[];\n }\n return [];\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;AAgBA;;AAEG;MAOU,kBAAkB,CAAA;AAN/B,IAAA,WAAA,GAAA;AAOU,QAAA,IAAA,CAAA,MAAM,GAAG,IAAI,GAAG,EAAkC;AAEhD,QAAA,IAAA,CAAA,cAAc,GAAG,IAAI,YAAY,EAAuC;AA4FnF;AAzFC,IAAA,IAAI,SAAS,GAAA;QACX,OAAO,IAAI,CAAC,MAAM;;AAGpB;;;AAGG;AACH,IAAA,GAAG,CAAC,YAAoB,EAAA;QACtB,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,YAAY,CAAC;;IAGtC,kBAAkB,GAAA;QAChB,IAAI,CAAC,MAAM,EAAE;QACb,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,SAAS,CAAC,MAAK;YACxC,IAAI,CAAC,MAAM,EAAE;AACf,SAAC,CAAC;;IAEJ,MAAM,CAAC,UAAU,GAAG,IAAI,EAAA;AACtB,QAAA,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE;QACnB,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,MAAM,EAAE,UAAU,CAAC;;AAG7C,IAAA,WAAW,CAAC,OAA6D,EAAA;AACvE,QAAA,IAAI,OAAO,CAAC,YAAY,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,aAAa,EAAE,EAAE;YACjE,IAAI,CAAC,MAAM,EAAE;;;AAIjB;;;;AAIG;AACH,IAAA,aAAa,CAAC,MAA2C,EAAE,UAAU,GAAG,IAAI,EAAA;QAC1E,IAAI,CAAC,cAAc,CAAC,MAAM,EAAE,IAAI,CAAC,YAAY,CAAC;QAC9C,IAAI,CAAC,k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I,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE;QAC3B,OAAO,QAAQ,CAAC,GAAG,CAAC,GAAG,IAAI,cAAc,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,IAAI,GAAG,CAAqB;;AAE5F,IAAA,OAAO,EAAE;AACX;;AC3EA;;AAEG;;;;"}
|
1
|
+
{"version":3,"file":"ngx-formly-zorro-antd-common.mjs","sources":["../../../../packages/formlyantd/common/formly-box-templates.directive.ts","../../../../packages/formlyantd/common/common.module.ts","../../../../packages/formlyantd/common/formly-utils.ts","../../../../packages/formlyantd/common/ngx-formly-zorro-antd-common.ts"],"sourcesContent":["import {\n AfterContentInit,\n ContentChildren,\n Directive,\n Input,\n OnChanges,\n output,\n QueryList,\n SimpleChange,\n SimpleChanges,\n TemplateRef\n} from '@angular/core';\nimport { NamedTemplate } from '@pkt/ng.core';\nimport type { NzSafeAny } from 'ng-zorro-antd/core/types';\n\n/**\n * @private\n */\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: '[formly-box]',\n standalone: true,\n exportAs: 'FormlyBox'\n})\nexport class FormlyBoxTemplates implements AfterContentInit, OnChanges {\n private tplMap = new Map<string, TemplateRef<NzSafeAny>>();\n @Input('formly-box') templateList?: TemplateList;\n templateChange = output<Map<string, TemplateRef<NzSafeAny>>>();\n @ContentChildren(NamedTemplate) namedTemplate!: QueryList<NamedTemplate<NzSafeAny>>;\n\n get templates(): Map<string, TemplateRef<NzSafeAny>> {\n return this.tplMap;\n }\n\n /**\n * 根据模板名称获取TemplateRef\n * @param templateName 模板名称\n */\n get(templateName: string): TemplateRef<NzSafeAny> | undefined {\n return this.tplMap.get(templateName);\n }\n\n ngAfterContentInit(): void {\n this.update();\n this.namedTemplate.changes.subscribe(() => {\n this.update();\n });\n }\n update(emitChange = true) {\n this.tplMap.clear();\n this.mergeTemplate(this.tplMap, emitChange);\n }\n\n ngOnChanges(changes: { [K in keyof this]?: SimpleChange } & SimpleChanges): void {\n if (changes.templateList && !changes.templateList.isFirstChange()) {\n this.update();\n }\n }\n\n /**\n * 合并参数模板\n * @param tplMap\n * @param emitChange\n */\n mergeTemplate(tplMap: Map<string, TemplateRef<NzSafeAny>>, emitChange = true) {\n this.mergeTemplates(tplMap, this.templateList);\n this.mergeQueryTemplate(tplMap, this.namedTemplate);\n\n if (emitChange) {\n this.templateChange.emit(tplMap);\n }\n }\n\n /**\n * 合并content 模板\n * @param tplMap\n * @param templateList\n * @private\n */\n private mergeQueryTemplate(\n tplMap: Map<string, TemplateRef<NzSafeAny>>,\n templateList?: QueryList<NamedTemplate<NzSafeAny>>\n ): void {\n if (templateList) {\n templateList.forEach(v => {\n tplMap.set(v.named ?? '', v.template);\n });\n }\n }\n\n /**\n * 合并模板列表\n * @param tplMap 模板Map\n * @param templateList\n */\n private mergeTemplates(tplMap: Map<string, TemplateRef<NzSafeAny>>, templateList?: TemplateList): void {\n if (!templateList) {\n return;\n }\n\n if (templateList instanceof TemplateRef) {\n const namedTpl = new NamedTemplate(templateList);\n namedTpl.resolveName();\n tplMap.set(namedTpl.named ?? '', namedTpl.template);\n return;\n }\n\n templateList.forEach(v => {\n if (v instanceof NamedTemplate) {\n tplMap.set(v.named ?? '', v.template);\n } else {\n const namedTpl = new NamedTemplate(v);\n namedTpl.resolveName();\n tplMap.set(namedTpl.named ?? '', namedTpl.template);\n }\n });\n\n return;\n }\n}\n\n/**\n * 模板列表\n */\nexport type TemplateList =\n | QueryList<TemplateRef<NzSafeAny>>\n | QueryList<NamedTemplate<NzSafeAny>>\n | NamedTemplate<NzSafeAny>[]\n | TemplateRef<NzSafeAny>;\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormlyBoxTemplates } from './formly-box-templates.directive';\nimport { NamedTemplate } from '@pkt/ng.core';\n\nconst COMPONENT = [FormlyBoxTemplates, NamedTemplate];\n\n@NgModule({\n imports: [CommonModule, ...COMPONENT],\n exports: COMPONENT\n})\nexport class FormlyCommonModule {}\n","import { TemplateRef } from '@angular/core';\nimport type { NzSafeAny } from 'ng-zorro-antd/core/types';\nimport { FormlyBoxTemplates } from './formly-box-templates.directive';\n\n/**\n * 根据属性名获取模板名称\n * @param propName 属性名\n */\nexport function getTplName(propName: string) {\n return `${propName}Name`;\n}\n\n/**\n * 获取模板名称\n * @param value\n * @param propName\n * @param propTemplateName 模板属性名称\n */\nexport function hasTplNameValue(\n value: NzSafeAny,\n propName: string,\n propTemplateName?: string\n): boolean {\n const tplName = propTemplateName || getTplName(propName);\n return value[propName] || value[tplName];\n}\n\n/**\n * 处理属性为模板类型, 根据模板名称处理成模板对象\n * @param value 数据对象\n * @param fieldTemplates 模板容器\n * @param propName 属性名\n * @param propTemplateName 模板属性名称\n */\nexport function resolveTplName<T = NzSafeAny>(\n value: NzSafeAny,\n fieldTemplates: FormlyBoxTemplates,\n propName: string,\n propTemplateName?: string\n): TemplateRef<T> | undefined {\n if (value[propName]) {\n return value[propName];\n }\n if (!fieldTemplates) {\n return undefined;\n }\n const tplName = propTemplateName || getTplName(propName);\n return fieldTemplates.get(value[tplName]);\n}\n\n/**\n * 处理属性为模板类型, 根据模板名称处理成模板对象列表\n * @param value 数据对象\n * @param fieldTemplates 模板容器\n * @param propName 属性名\n * @param propTemplateName 模板属性名称\n */\nexport function resolveTplNameArray<T = NzSafeAny>(\n value: NzSafeAny,\n fieldTemplates: FormlyBoxTemplates,\n propName: string,\n propTemplateName?: string\n): TemplateRef<T>[] {\n if (value[propName] != null) {\n return value[propName];\n }\n if (!fieldTemplates) {\n return [];\n }\n const tplName = propTemplateName || getTplName(propName);\n const tplValue = value[tplName];\n if (Array.isArray(tplValue)) {\n return tplValue.map(key => fieldTemplates.get(key)).filter(tpl => tpl) as TemplateRef<T>[];\n }\n return [];\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;AAeA;;AAEG;MAOU,kBAAkB,CAAA;AAN/B,IAAA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? `${otherOptions.className} ${className}` : className;
|
6
6
|
return { ...returner, ...otherOptions };
|
7
7
|
}
|
8
|
+
function fieldSingle(key, type = 'input', label = '', options = {}) {
|
9
|
+
return field(key, type, label, {}, options);
|
10
|
+
}
|
8
11
|
function requiredField(key, type = 'input', label = '', props = {}, otherOptions = {}) {
|
9
12
|
return field(key, type, label, { ...props, required: true }, otherOptions);
|
10
13
|
}
|
11
|
-
function
|
12
|
-
return
|
14
|
+
function requiredFieldSingle(key, type = 'input', label = '', options = {}) {
|
15
|
+
return field(key, type, label, { required: true }, options);
|
16
|
+
}
|
17
|
+
function hide(key, type = 'input', options = {}) {
|
18
|
+
return { key, type, hide: true, ...options };
|
19
|
+
}
|
20
|
+
function hidden(key, type = 'input', options = {}) {
|
21
|
+
return { key, type, className: 'hidden', ...options };
|
13
22
|
}
|
14
23
|
|
15
24
|
function treeSelect(key, label = '', props = {}, otherOptions = {}) {
|
@@ -111,40 +120,40 @@ function requiredSlide(key, label = '', props = {}, otherOptions = {}) {
|
|
111
120
|
return requiredField(key, 'slider', label, props, otherOptions);
|
112
121
|
}
|
113
122
|
/** 文本显示 */
|
114
|
-
function text(
|
115
|
-
return
|
123
|
+
function text(options = {}) {
|
124
|
+
return fieldSingle('', 'text', '', options);
|
116
125
|
}
|
117
126
|
/** 输入组 */
|
118
|
-
function inputGroup(
|
119
|
-
return
|
127
|
+
function inputGroup(options = {}) {
|
128
|
+
return fieldSingle('', 'input-group', '', options);
|
120
129
|
}
|
121
130
|
/** 间距 */
|
122
|
-
function space(
|
123
|
-
return
|
131
|
+
function space(options = {}) {
|
132
|
+
return fieldSingle('', 'space', '', options);
|
124
133
|
}
|
125
134
|
/** 紧凑布局组合 */
|
126
|
-
function spaceCompact(
|
127
|
-
return
|
135
|
+
function spaceCompact(options = {}) {
|
136
|
+
return fieldSingle('', 'space-compact', '', options);
|
128
137
|
}
|
129
138
|
/** 模板 */
|
130
139
|
function ref(props = {}, otherOptions = {}) {
|
131
140
|
return field('', 'ref-template', '', props, otherOptions);
|
132
141
|
}
|
133
142
|
/** 栅格 */
|
134
|
-
function grid(
|
135
|
-
return
|
143
|
+
function grid(options = {}) {
|
144
|
+
return fieldSingle('', 'grid', '', options);
|
136
145
|
}
|
137
146
|
/** 弹性布局 */
|
138
|
-
function flex(
|
139
|
-
return
|
147
|
+
function flex(options = {}) {
|
148
|
+
return fieldSingle('', 'flex', '', options);
|
140
149
|
}
|
141
150
|
/** 卡片 */
|
142
|
-
function card(
|
143
|
-
return
|
151
|
+
function card(options = {}) {
|
152
|
+
return fieldSingle('', 'card', '', options);
|
144
153
|
}
|
145
154
|
/** 按钮组 */
|
146
|
-
function buttonGroup(
|
147
|
-
return
|
155
|
+
function buttonGroup(options = {}) {
|
156
|
+
return fieldSingle('', 'button-group', '', options);
|
148
157
|
}
|
149
158
|
function button(text = '', props = {}, otherOptions = {}) {
|
150
159
|
return field('', 'button', '', { text, ...props }, otherOptions);
|
@@ -159,6 +168,7 @@ function reset(text = '', props = {}, otherOptions = {}) {
|
|
159
168
|
const formly = {
|
160
169
|
field,
|
161
170
|
requiredField,
|
171
|
+
hide,
|
162
172
|
hidden,
|
163
173
|
input,
|
164
174
|
requiredInput,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ngx-formly-zorro-antd-helpers.mjs","sources":["../../../../packages/formlyantd/helpers/common.ts","../../../../packages/formlyantd/helpers/formly.ts","../../../../packages/formlyantd/helpers/public_api.ts","../../../../packages/formlyantd/helpers/ngx-formly-zorro-antd-helpers.ts"],"sourcesContent":["import type { NzFormlyFieldConfig, ControlOptions } from 'ngx-formly-zorro-antd/common';\nimport type { NzSafeAny } from 'ng-zorro-antd/core/types';\n\nexport function field<T = NzFormlyFieldConfig>(\n key: string,\n type = 'input',\n label: string = '',\n props: ControlOptions & {\n [key: string]: NzSafeAny;\n } = {},\n otherOptions: NzFormlyFieldConfig = {}\n): T {\n const returner: NzFormlyFieldConfig = { key, type };\n returner.props = Object.assign({ label, ...props });\n\n const className = key ? `formly-${key}` : '';\n otherOptions.className = otherOptions.className ? `${otherOptions.className} ${className}` : className;\n\n return { ...returner, ...otherOptions } as T;\n}\nexport function requiredField<T = NzFormlyFieldConfig>(\n key: string,\n type = 'input',\n label: string = '',\n props: ControlOptions & {\n [key: string]: NzSafeAny;\n } = {},\n otherOptions: NzFormlyFieldConfig = {}\n) {\n return field<T>(key, type, label, { ...props, required: true }, otherOptions);\n}\nexport function hidden(key: string): NzFormlyFieldConfig {\n return { key, type: 'input', hide: true };\n}\n","import { FormlyFieldConfig } from '@ngx-formly/core';\nimport { field, requiredField } from './common';\nimport type { FormlyButtonFieldConfig, ButtonProps } from 'ngx-formly-zorro-antd/button';\nimport type { FormlyButtonGroupFieldConfig, ButtonGroupProps } from 'ngx-formly-zorro-antd/button-group';\nimport type { FormlyCardFieldConfig, CardProps } from 'ngx-formly-zorro-antd/card';\nimport type { FormlyCascaderFieldConfig, CascaderProps } from 'ngx-formly-zorro-antd/cascader';\nimport type { FormlyCheckboxFieldConfig, CheckboxProps } from 'ngx-formly-zorro-antd/checkbox';\nimport type { FormlyDatepickerFieldConfig, DatepickerProps } from 'ngx-formly-zorro-antd/datepicker';\nimport type { FormlyFlexFieldConfig, FlexProps } from 'ngx-formly-zorro-antd/flex';\nimport type { FormlyGridFieldConfig, GridColProps } from 'ngx-formly-zorro-antd/grid';\nimport type { FormlyInputFieldConfig, FormlyInputProps } from 'ngx-formly-zorro-antd/input';\nimport type { FormlyInputGroupFieldConfig, FormlyInputGroupProps } from 'ngx-formly-zorro-antd/input-group';\nimport type { FormlyInputNumberFieldConfig, InputNumberProps } from 'ngx-formly-zorro-antd/input-number';\nimport type { FormlyRadioFieldConfig, RadioProps } from 'ngx-formly-zorro-antd/radio';\nimport type { FormlyRateFieldConfig, RateProps } from 'ngx-formly-zorro-antd/rate';\nimport type { FormlyRefTemplateFieldConfig, RefTemplateProps } from 'ngx-formly-zorro-antd/ref-template';\nimport type { FormlySelectFieldConfig, SelectProps } from 'ngx-formly-zorro-antd/select';\nimport type { FormlySlideFieldConfig, SlideProps } from 'ngx-formly-zorro-antd/slider';\nimport type { FormlySpaceFieldConfig, SpaceProps } from 'ngx-formly-zorro-antd/space';\nimport type { FormlySpaceCompactFieldConfig, SpaceCompactProps } from 'ngx-formly-zorro-antd/space-compact';\nimport type { FormlySwitchFieldConfig, SwitchProps } from 'ngx-formly-zorro-antd/switch';\nimport type { FormlyTextValueFieldConfig, TextValueProps } from 'ngx-formly-zorro-antd/text-value';\nimport type { FormlyTextareaFieldConfig, TextareaProps } from 'ngx-formly-zorro-antd/textarea';\nimport type { FormlyTimepickerFieldConfig, TimepickerProps } from 'ngx-formly-zorro-antd/timepicker';\nimport type { FormlyTransferFieldConfig, TransferProps } from 'ngx-formly-zorro-antd/transfer';\nimport type { FormlyTreeSelectFieldConfig, TreeSelectProps } from 'ngx-formly-zorro-antd/tree-select';\nimport type { FormlyUploadFieldConfig, UploadProps } from 'ngx-formly-zorro-antd/upload';\n\nexport function treeSelect(\n key: string,\n label = '',\n props: TreeSelectProps = {},\n otherOptions: FormlyFieldConfig = {}\n): FormlyTreeSelectFieldConfig {\n return field<FormlyTreeSelectFieldConfig>(key, 'tree-select', label, props, otherOptions);\n}\nexport function requiredTreeSelect(\n key: string,\n label = '',\n props: TreeSelectProps = {},\n otherOptions: FormlyFieldConfig = {}\n): FormlyTreeSelectFieldConfig {\n return requiredField<FormlyTreeSelectFieldConfig>(key, 'tree-select', label, props, otherOptions);\n}\nexport function transfer(\n key: string,\n label = '',\n props: TransferProps = {},\n otherOptions: FormlyFieldConfig = {}\n): FormlyTransferFieldConfig {\n return field<FormlyTransferFieldConfig>(key, 'transfer', label, props, otherOptions);\n}\nexport function requiredTransfer(\n key: string,\n label = '',\n props: TransferProps = {},\n otherOptions: FormlyFieldConfig = {}\n): FormlyTransferFieldConfig {\n return requiredField<FormlyTransferFieldConfig>(key, 'transfer', label, props, otherOptions);\n}\nexport function timepicker(\n key: string,\n label = '',\n props: TimepickerProps = {},\n otherOptions: FormlyFieldConfig = {}\n): FormlyTimepickerFieldConfig {\n return field<FormlyTimepickerFieldConfig>(key, 'timepicker', label, props, otherOptions);\n}\nexport function requiredTimepicker(\n key: string,\n label = '',\n props: TimepickerProps = {},\n otherOptions: FormlyFieldConfig = {}\n): FormlyTimepickerFieldConfig {\n return requiredField<FormlyTimepickerFieldConfig>(key, 'timepicker', label, props, otherOptions);\n}\nexport function input(\n key: string,\n label = '',\n props: FormlyInputProps = {},\n otherOptions: FormlyFieldConfig = {}\n): FormlyInputFieldConfig {\n return field<FormlyInputFieldConfig>(key, 'input', label, props, otherOptions);\n}\nexport function requiredInput(\n key: string,\n label = '',\n props: FormlyInputProps = {},\n otherOptions: FormlyFieldConfig = {}\n): FormlyInputFieldConfig {\n return requiredField<FormlyInputFieldConfig>(key, 'input', label, props, otherOptions);\n}\nexport function textArea(\n key: string,\n label = '',\n props: TextareaProps = {},\n otherOptions: FormlyFieldConfig = {}\n): FormlyTextareaFieldConfig {\n return field<FormlyTextareaFieldConfig>(key, 'textarea', label, props, otherOptions);\n}\nexport function requiredTextArea(\n key: string,\n label = '',\n props: TextareaProps = {},\n otherOptions: FormlyFieldConfig = {}\n): FormlyTextareaFieldConfig {\n return requiredField<FormlyTextareaFieldConfig>(key, 'textarea', label, props, otherOptions);\n}\nexport function checkbox(\n key: string,\n label = '',\n props: CheckboxProps = {},\n otherOptions: FormlyFieldConfig = {}\n): FormlyCheckboxFieldConfig {\n return field<FormlyCheckboxFieldConfig>(key, 'checkbox', label, props, otherOptions);\n}\nexport function requiredCheckbox(\n key: string,\n label = '',\n props: CheckboxProps = {},\n otherOptions: FormlyFieldConfig = {}\n): FormlyCheckboxFieldConfig {\n return requiredField<FormlyCheckboxFieldConfig>(key, 'checkbox', label, props, otherOptions);\n}\nexport function cascader(\n key: string,\n label = '',\n props: CascaderProps = {},\n otherOptions: FormlyFieldConfig = {}\n): FormlyCascaderFieldConfig {\n return field<FormlyCascaderFieldConfig>(key, 'cascader', label, props, otherOptions);\n}\nexport function requiredCascader(\n key: string,\n label = '',\n props: CascaderProps = {},\n otherOptions: FormlyFieldConfig = {}\n): FormlyCascaderFieldConfig {\n return requiredField<FormlyCascaderFieldConfig>(key, 'cascader', label, props, otherOptions);\n}\nexport function datepicker(\n key: string,\n label = '',\n props: DatepickerProps = {},\n otherOptions: FormlyFieldConfig = {}\n): FormlyDatepickerFieldConfig {\n return field<FormlyDatepickerFieldConfig>(key, 'datepicker', label, props, otherOptions);\n}\nexport function requiredDatepicker(\n key: string,\n label = '',\n props: DatepickerProps = {},\n otherOptions: FormlyFieldConfig = {}\n): FormlyDatepickerFieldConfig {\n return requiredField<FormlyDatepickerFieldConfig>(key, 'datepicker', label, props, otherOptions);\n}\nexport function number(\n key: string,\n label = '',\n props: InputNumberProps = {},\n otherOptions: FormlyFieldConfig = {}\n): FormlyInputNumberFieldConfig {\n return field<FormlyInputNumberFieldConfig>(key, 'number', label, props, otherOptions);\n}\nexport function requiredNumber(\n key: string,\n label = '',\n props: InputNumberProps = {},\n otherOptions: FormlyFieldConfig = {}\n): FormlyInputNumberFieldConfig {\n return requiredField<FormlyInputNumberFieldConfig>(key, 'number', label, props, otherOptions);\n}\n/** 选择器 */\nexport function select(\n key: string,\n label = '',\n props: SelectProps = {},\n otherOptions: FormlyFieldConfig = {}\n): FormlySelectFieldConfig {\n return field<FormlySelectFieldConfig>(key, 'select', label, props, otherOptions);\n}\n/** 选择器 */\nexport function requiredSelect(\n key: string,\n label = '',\n props: SelectProps = {},\n otherOptions: FormlyFieldConfig = {}\n): FormlySelectFieldConfig {\n return requiredField<FormlySelectFieldConfig>(key, 'select', label, props, otherOptions);\n}\n/** 上传 */\nexport function upload(\n key: string,\n label = '',\n props: UploadProps = { fileList: [] },\n otherOptions: FormlyFieldConfig = {}\n): FormlyUploadFieldConfig {\n return field<FormlyUploadFieldConfig>(key, 'upload', label, props, otherOptions);\n}\n/** 上传 */\nexport function requiredUpload(\n key: string,\n label = '',\n props: UploadProps = { fileList: [] },\n otherOptions: FormlyFieldConfig = {}\n): FormlyUploadFieldConfig {\n return requiredField<FormlyUploadFieldConfig>(key, 'upload', label, props, otherOptions);\n}\n/** 单选框 */\nexport function radio(\n key: string,\n label = '',\n props: RadioProps = {},\n otherOptions: FormlyFieldConfig = {}\n): FormlyRadioFieldConfig {\n return field<FormlyRadioFieldConfig>(key, 'radio', label, props, otherOptions);\n}\n/** 单选框 */\nexport function requiredRadio(\n key: string,\n label = '',\n props: RadioProps = {},\n otherOptions: FormlyFieldConfig = {}\n): FormlyRadioFieldConfig {\n return requiredField<FormlyRadioFieldConfig>(key, 'radio', label, props, otherOptions);\n}\n/** 评分 */\nexport function rate(\n key: string,\n label = '',\n props: RateProps = {},\n otherOptions: FormlyFieldConfig = {}\n): FormlyRateFieldConfig {\n return field<FormlyRateFieldConfig>(key, 'rate', label, props, otherOptions);\n}\n/** 评分 */\nexport function requiredRate(\n key: string,\n label = '',\n props: RateProps = {},\n otherOptions: FormlyFieldConfig = {}\n): FormlyRateFieldConfig {\n return requiredField<FormlyRateFieldConfig>(key, 'rate', label, props, otherOptions);\n}\n/** 开关 */\nexport function requiredSwitch(\n key: string,\n label = '',\n props: SwitchProps = {},\n otherOptions: FormlyFieldConfig = {}\n): FormlySwitchFieldConfig {\n return requiredField<FormlySwitchFieldConfig>(key, 'switch', label, props, otherOptions);\n}\n/** 滑动输入条 */\nexport function slider(\n key: string,\n label = '',\n props: SlideProps = {},\n otherOptions: FormlyFieldConfig = {}\n): FormlySlideFieldConfig {\n return field<FormlySlideFieldConfig>(key, 'slider', label, props, otherOptions);\n}\n/** 滑动输入条 */\nexport function requiredSlide(\n key: string,\n label = '',\n props: SlideProps = {},\n otherOptions: FormlyFieldConfig = {}\n): FormlySlideFieldConfig {\n return requiredField<FormlySlideFieldConfig>(key, 'slider', label, props, otherOptions);\n}\n\n/** 文本显示 */\nexport function text(props: TextValueProps = {}, otherOptions: FormlyFieldConfig = {}): FormlyTextValueFieldConfig {\n return field<FormlyTextValueFieldConfig>('', 'text', '', props, otherOptions);\n}\n/** 输入组 */\nexport function inputGroup(\n props: FormlyInputGroupProps = {},\n otherOptions: FormlyFieldConfig = {}\n): FormlyInputGroupFieldConfig {\n return field<FormlyInputGroupFieldConfig>('', 'input-group', '', props, otherOptions);\n}\n/** 间距 */\nexport function space(props: SpaceProps = {}, otherOptions: FormlyFieldConfig = {}): FormlySpaceFieldConfig {\n return field<FormlySpaceFieldConfig>('', 'space', '', props, otherOptions);\n}\n/** 紧凑布局组合 */\nexport function spaceCompact(\n props: SpaceCompactProps = {},\n otherOptions: FormlyFieldConfig = {}\n): FormlySpaceCompactFieldConfig {\n return field<FormlySpaceCompactFieldConfig>('', 'space-compact', '', props, otherOptions);\n}\n/** 模板 */\nexport function ref(props: RefTemplateProps = {}, otherOptions: FormlyFieldConfig = {}): FormlyRefTemplateFieldConfig {\n return field<FormlyRefTemplateFieldConfig>('', 'ref-template', '', props, otherOptions);\n}\n/** 栅格 */\nexport function grid(props: GridColProps = {}, otherOptions: FormlyFieldConfig = {}): FormlyGridFieldConfig {\n return field<FormlyGridFieldConfig>('', 'grid', '', props, otherOptions);\n}\n/** 弹性布局 */\nexport function flex(props: FlexProps = {}, otherOptions: FormlyFieldConfig = {}): FormlyFlexFieldConfig {\n return field<FormlyFlexFieldConfig>('', 'flex', '', props, otherOptions);\n}\n/** 卡片 */\nexport function card(props: CardProps = {}, otherOptions: FormlyFieldConfig = {}): FormlyCardFieldConfig {\n return field<FormlyCardFieldConfig>('', 'card', '', props, otherOptions);\n}\n/** 按钮组 */\nexport function buttonGroup(\n props: ButtonGroupProps = {},\n otherOptions: FormlyFieldConfig = {}\n): FormlyButtonGroupFieldConfig {\n return field<FormlyButtonGroupFieldConfig>('', 'button-group', '', props, otherOptions);\n}\nexport function button(\n text = '',\n props: ButtonProps = {},\n otherOptions: FormlyFieldConfig = {}\n): FormlyButtonFieldConfig {\n return field<FormlyButtonFieldConfig>('', 'button', '', { text, ...props }, otherOptions);\n}\nexport function submit(\n text = '',\n props: ButtonProps = {},\n otherOptions: FormlyFieldConfig = {}\n): FormlyButtonFieldConfig {\n return field<FormlyButtonFieldConfig>('', 'submit', '', { text, ...props }, otherOptions);\n}\nexport function reset(\n text = '',\n props: ButtonProps = {},\n otherOptions: FormlyFieldConfig = {}\n): FormlyButtonFieldConfig {\n return field<FormlyButtonFieldConfig>('', 'reset', '', { text, ...props }, otherOptions);\n}\n","import { field, requiredField, hidden } from './common';\nimport { FormlyFieldConfig } from '@ngx-formly/core';\nimport {\n input,\n requiredInput,\n textArea,\n requiredTextArea,\n checkbox,\n requiredCheckbox,\n cascader,\n requiredCascader,\n number,\n requiredNumber,\n radio,\n requiredRadio,\n rate,\n requiredRate,\n datepicker,\n requiredDatepicker,\n requiredSwitch,\n upload,\n requiredUpload,\n slider,\n requiredSlide,\n select,\n requiredSelect,\n treeSelect,\n requiredTreeSelect,\n transfer,\n requiredTransfer,\n timepicker,\n requiredTimepicker,\n text,\n button,\n buttonGroup,\n submit,\n reset,\n space,\n ref,\n grid,\n flex,\n card,\n inputGroup\n} from './formly';\nimport type { FormlySwitchFieldConfig, SwitchProps } from 'ngx-formly-zorro-antd/switch';\n\nexport const formly = {\n field,\n requiredField,\n hidden,\n input,\n requiredInput,\n textArea,\n requiredTextArea,\n checkbox,\n requiredCheckbox,\n cascader,\n requiredCascader,\n number,\n requiredNumber,\n radio,\n requiredRadio,\n rate,\n requiredRate,\n datepicker,\n requiredDatepicker,\n /** 开关 */\n switch: (key: string, label = '', props: SwitchProps = {}, otherOptions: FormlyFieldConfig = {}) => {\n return field<FormlySwitchFieldConfig>(key, 'switch', label, props, otherOptions);\n },\n requiredSwitch,\n upload,\n requiredUpload,\n slider,\n requiredSlide,\n select,\n requiredSelect,\n treeSelect,\n requiredTreeSelect,\n transfer,\n requiredTransfer,\n timepicker,\n requiredTimepicker,\n text,\n space,\n inputGroup,\n ref,\n grid,\n flex,\n card,\n button,\n buttonGroup,\n submit,\n reset\n};\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WAAW;IACX,MAAM;IACN;;;AC7FF;;AAEG;;;;"}
|
1
|
+
{"version":3,"file":"ngx-formly-zorro-antd-helpers.mjs","sources":["../../../../packages/formlyantd/helpers/common.ts","../../../../packages/formlyantd/helpers/formly.ts","../../../../packages/formlyantd/helpers/public_api.ts","../../../../packages/formlyantd/helpers/ngx-formly-zorro-antd-helpers.ts"],"sourcesContent":["import type { NzFormlyFieldConfig, ControlOptions } from 'ngx-formly-zorro-antd/common';\n\nexport function field<T = NzFormlyFieldConfig>(\n key: string,\n type = 'input',\n label = '',\n props: ControlOptions = {},\n otherOptions: NzFormlyFieldConfig = {}\n): T {\n const returner: NzFormlyFieldConfig = { key, type };\n returner.props = Object.assign({ label, ...props });\n\n const className = key ? `formly-${key}` : '';\n otherOptions.className = otherOptions.className ? `${otherOptions.className} ${className}` : className;\n\n return { ...returner, ...otherOptions } as T;\n}\nexport function fieldSingle<T = NzFormlyFieldConfig>(\n key: string,\n type = 'input',\n label = '',\n options: NzFormlyFieldConfig<ControlOptions> = {}\n): T {\n return field<T>(key, type, label, {}, options);\n}\nexport function requiredField<T = NzFormlyFieldConfig>(\n key: string,\n type = 'input',\n label = '',\n props: ControlOptions = {},\n otherOptions: NzFormlyFieldConfig = {}\n) {\n return field<T>(key, type, label, { ...props, required: true }, otherOptions);\n}\nexport function requiredFieldSingle<T = NzFormlyFieldConfig>(\n key: string,\n type = 'input',\n label = '',\n options: NzFormlyFieldConfig<ControlOptions> = {}\n) {\n return field<T>(key, type, label, { required: true }, options);\n}\n\nexport function hide(key: string, type = 'input', options: NzFormlyFieldConfig = {}): NzFormlyFieldConfig {\n return { key, type, hide: true, ...options };\n}\n\nexport function hidden(key: string, type = 'input', options: NzFormlyFieldConfig = {}): NzFormlyFieldConfig {\n return { key, type, className: 'hidden', ...options };\n}\n","import { FormlyFieldConfig } from '@ngx-formly/core';\nimport { field, fieldSingle, requiredField } from './common';\nimport type { FormlyButtonFieldConfig, ButtonProps } from 'ngx-formly-zorro-antd/button';\nimport type { FormlyButtonGroupFieldConfig, ButtonGroupProps } from 'ngx-formly-zorro-antd/button-group';\nimport type { FormlyCardFieldConfig, CardProps } from 'ngx-formly-zorro-antd/card';\nimport type { FormlyCascaderFieldConfig, CascaderProps } from 'ngx-formly-zorro-antd/cascader';\nimport type { FormlyCheckboxFieldConfig, CheckboxProps } from 'ngx-formly-zorro-antd/checkbox';\nimport type { FormlyDatepickerFieldConfig, DatepickerProps } from 'ngx-formly-zorro-antd/datepicker';\nimport type { FormlyFlexFieldConfig, FlexProps } from 'ngx-formly-zorro-antd/flex';\nimport type { FormlyGridFieldConfig, GridProps } from 'ngx-formly-zorro-antd/grid';\nimport type { FormlyInputFieldConfig, FormlyInputProps } from 'ngx-formly-zorro-antd/input';\nimport type { FormlyInputGroupFieldConfig, FormlyInputGroupProps } from 'ngx-formly-zorro-antd/input-group';\nimport type { FormlyInputNumberFieldConfig, InputNumberProps } from 'ngx-formly-zorro-antd/input-number';\nimport type { FormlyRadioFieldConfig, RadioProps } from 'ngx-formly-zorro-antd/radio';\nimport type { FormlyRateFieldConfig, RateProps } from 'ngx-formly-zorro-antd/rate';\nimport type { FormlyRefTemplateFieldConfig, RefTemplateProps } from 'ngx-formly-zorro-antd/ref-template';\nimport type { FormlySelectFieldConfig, SelectProps } from 'ngx-formly-zorro-antd/select';\nimport type { FormlySlideFieldConfig, SlideProps } from 'ngx-formly-zorro-antd/slider';\nimport type { FormlySpaceFieldConfig, SpaceProps } from 'ngx-formly-zorro-antd/space';\nimport type { FormlySpaceCompactFieldConfig, SpaceCompactProps } from 'ngx-formly-zorro-antd/space-compact';\nimport type { FormlySwitchFieldConfig, SwitchProps } from 'ngx-formly-zorro-antd/switch';\nimport type { FormlyTextValueFieldConfig, TextValueProps } from 'ngx-formly-zorro-antd/text-value';\nimport type { FormlyTextareaFieldConfig, TextareaProps } from 'ngx-formly-zorro-antd/textarea';\nimport type { FormlyTimepickerFieldConfig, TimepickerProps } from 'ngx-formly-zorro-antd/timepicker';\nimport type { FormlyTransferFieldConfig, TransferProps } from 'ngx-formly-zorro-antd/transfer';\nimport type { FormlyTreeSelectFieldConfig, TreeSelectProps } from 'ngx-formly-zorro-antd/tree-select';\nimport type { FormlyUploadFieldConfig, UploadProps } from 'ngx-formly-zorro-antd/upload';\n\nexport function treeSelect(\n key: string,\n label = '',\n props: TreeSelectProps = {},\n otherOptions: FormlyFieldConfig = {}\n): FormlyTreeSelectFieldConfig {\n return field<FormlyTreeSelectFieldConfig>(key, 'tree-select', label, props, otherOptions);\n}\nexport function requiredTreeSelect(\n key: string,\n label = '',\n props: TreeSelectProps = {},\n otherOptions: FormlyFieldConfig = {}\n): FormlyTreeSelectFieldConfig {\n return requiredField<FormlyTreeSelectFieldConfig>(key, 'tree-select', label, props, otherOptions);\n}\nexport function transfer(\n key: string,\n label = '',\n props: TransferProps = {},\n otherOptions: FormlyFieldConfig = {}\n): FormlyTransferFieldConfig {\n return field<FormlyTransferFieldConfig>(key, 'transfer', label, props, otherOptions);\n}\nexport function requiredTransfer(\n key: string,\n label = '',\n props: TransferProps = {},\n otherOptions: FormlyFieldConfig = {}\n): FormlyTransferFieldConfig {\n return requiredField<FormlyTransferFieldConfig>(key, 'transfer', label, props, otherOptions);\n}\nexport function timepicker(\n key: string,\n label = '',\n props: TimepickerProps = {},\n otherOptions: FormlyFieldConfig = {}\n): FormlyTimepickerFieldConfig {\n return field<FormlyTimepickerFieldConfig>(key, 'timepicker', label, props, otherOptions);\n}\nexport function requiredTimepicker(\n key: string,\n label = '',\n props: TimepickerProps = {},\n otherOptions: FormlyFieldConfig = {}\n): FormlyTimepickerFieldConfig {\n return requiredField<FormlyTimepickerFieldConfig>(key, 'timepicker', label, props, otherOptions);\n}\nexport function input(\n key: string,\n label = '',\n props: FormlyInputProps = {},\n otherOptions: FormlyFieldConfig = {}\n): FormlyInputFieldConfig {\n return field<FormlyInputFieldConfig>(key, 'input', label, props, otherOptions);\n}\nexport function requiredInput(\n key: string,\n label = '',\n props: FormlyInputProps = {},\n otherOptions: FormlyFieldConfig = {}\n): FormlyInputFieldConfig {\n return requiredField<FormlyInputFieldConfig>(key, 'input', label, props, otherOptions);\n}\nexport function textArea(\n key: string,\n label = '',\n props: TextareaProps = {},\n otherOptions: FormlyFieldConfig = {}\n): FormlyTextareaFieldConfig {\n return field<FormlyTextareaFieldConfig>(key, 'textarea', label, props, otherOptions);\n}\nexport function requiredTextArea(\n key: string,\n label = '',\n props: TextareaProps = {},\n otherOptions: FormlyFieldConfig = {}\n): FormlyTextareaFieldConfig {\n return requiredField<FormlyTextareaFieldConfig>(key, 'textarea', label, props, otherOptions);\n}\nexport function checkbox(\n key: string,\n label = '',\n props: CheckboxProps = {},\n otherOptions: FormlyFieldConfig = {}\n): FormlyCheckboxFieldConfig {\n return field<FormlyCheckboxFieldConfig>(key, 'checkbox', label, props, otherOptions);\n}\nexport function requiredCheckbox(\n key: string,\n label = '',\n props: CheckboxProps = {},\n otherOptions: FormlyFieldConfig = {}\n): FormlyCheckboxFieldConfig {\n return requiredField<FormlyCheckboxFieldConfig>(key, 'checkbox', label, props, otherOptions);\n}\nexport function cascader(\n key: string,\n label = '',\n props: CascaderProps = {},\n otherOptions: FormlyFieldConfig = {}\n): FormlyCascaderFieldConfig {\n return field<FormlyCascaderFieldConfig>(key, 'cascader', label, props, otherOptions);\n}\nexport function requiredCascader(\n key: string,\n label = '',\n props: CascaderProps = {},\n otherOptions: FormlyFieldConfig = {}\n): FormlyCascaderFieldConfig {\n return requiredField<FormlyCascaderFieldConfig>(key, 'cascader', label, props, otherOptions);\n}\nexport function datepicker(\n key: string,\n label = '',\n props: DatepickerProps = {},\n otherOptions: FormlyFieldConfig = {}\n): FormlyDatepickerFieldConfig {\n return field<FormlyDatepickerFieldConfig>(key, 'datepicker', label, props, otherOptions);\n}\nexport function requiredDatepicker(\n key: string,\n label = '',\n props: DatepickerProps = {},\n otherOptions: FormlyFieldConfig = {}\n): FormlyDatepickerFieldConfig {\n return requiredField<FormlyDatepickerFieldConfig>(key, 'datepicker', label, props, otherOptions);\n}\nexport function number(\n key: string,\n label = '',\n props: InputNumberProps = {},\n otherOptions: FormlyFieldConfig = {}\n): FormlyInputNumberFieldConfig {\n return field<FormlyInputNumberFieldConfig>(key, 'number', label, props, otherOptions);\n}\nexport function requiredNumber(\n key: string,\n label = '',\n props: InputNumberProps = {},\n otherOptions: FormlyFieldConfig = {}\n): FormlyInputNumberFieldConfig {\n return requiredField<FormlyInputNumberFieldConfig>(key, 'number', label, props, otherOptions);\n}\n/** 选择器 */\nexport function select(\n key: string,\n label = '',\n props: SelectProps = {},\n otherOptions: FormlyFieldConfig = {}\n): FormlySelectFieldConfig {\n return field<FormlySelectFieldConfig>(key, 'select', label, props, otherOptions);\n}\n/** 选择器 */\nexport function requiredSelect(\n key: string,\n label = '',\n props: SelectProps = {},\n otherOptions: FormlyFieldConfig = {}\n): FormlySelectFieldConfig {\n return requiredField<FormlySelectFieldConfig>(key, 'select', label, props, otherOptions);\n}\n/** 上传 */\nexport function upload(\n key: string,\n label = '',\n props: UploadProps = { fileList: [] },\n otherOptions: FormlyFieldConfig = {}\n): FormlyUploadFieldConfig {\n return field<FormlyUploadFieldConfig>(key, 'upload', label, props, otherOptions);\n}\n/** 上传 */\nexport function requiredUpload(\n key: string,\n label = '',\n props: UploadProps = { fileList: [] },\n otherOptions: FormlyFieldConfig = {}\n): FormlyUploadFieldConfig {\n return requiredField<FormlyUploadFieldConfig>(key, 'upload', label, props, otherOptions);\n}\n/** 单选框 */\nexport function radio(\n key: string,\n label = '',\n props: RadioProps = {},\n otherOptions: FormlyFieldConfig = {}\n): FormlyRadioFieldConfig {\n return field<FormlyRadioFieldConfig>(key, 'radio', label, props, otherOptions);\n}\n/** 单选框 */\nexport function requiredRadio(\n key: string,\n label = '',\n props: RadioProps = {},\n otherOptions: FormlyFieldConfig = {}\n): FormlyRadioFieldConfig {\n return requiredField<FormlyRadioFieldConfig>(key, 'radio', label, props, otherOptions);\n}\n/** 评分 */\nexport function rate(\n key: string,\n label = '',\n props: RateProps = {},\n otherOptions: FormlyFieldConfig = {}\n): FormlyRateFieldConfig {\n return field<FormlyRateFieldConfig>(key, 'rate', label, props, otherOptions);\n}\n/** 评分 */\nexport function requiredRate(\n key: string,\n label = '',\n props: RateProps = {},\n otherOptions: FormlyFieldConfig = {}\n): FormlyRateFieldConfig {\n return requiredField<FormlyRateFieldConfig>(key, 'rate', label, props, otherOptions);\n}\n/** 开关 */\nexport function requiredSwitch(\n key: string,\n label = '',\n props: SwitchProps = {},\n otherOptions: FormlyFieldConfig = {}\n): FormlySwitchFieldConfig {\n return requiredField<FormlySwitchFieldConfig>(key, 'switch', label, props, otherOptions);\n}\n/** 滑动输入条 */\nexport function slider(\n key: string,\n label = '',\n props: SlideProps = {},\n otherOptions: FormlyFieldConfig = {}\n): FormlySlideFieldConfig {\n return field<FormlySlideFieldConfig>(key, 'slider', label, props, otherOptions);\n}\n/** 滑动输入条 */\nexport function requiredSlide(\n key: string,\n label = '',\n props: SlideProps = {},\n otherOptions: FormlyFieldConfig = {}\n): FormlySlideFieldConfig {\n return requiredField<FormlySlideFieldConfig>(key, 'slider', label, props, otherOptions);\n}\n\n/** 文本显示 */\nexport function text(options: FormlyFieldConfig<TextValueProps> = {}): FormlyTextValueFieldConfig {\n return fieldSingle<FormlyTextValueFieldConfig>('', 'text', '', options);\n}\n/** 输入组 */\nexport function inputGroup(options: FormlyFieldConfig<FormlyInputGroupProps> = {}): FormlyInputGroupFieldConfig {\n return fieldSingle<FormlyInputGroupFieldConfig>('', 'input-group', '', options);\n}\n/** 间距 */\nexport function space(options: FormlyFieldConfig<SpaceProps> = {}): FormlySpaceFieldConfig {\n return fieldSingle<FormlySpaceFieldConfig>('', 'space', '', options);\n}\n/** 紧凑布局组合 */\nexport function spaceCompact(options: FormlyFieldConfig<SpaceCompactProps> = {}): FormlySpaceCompactFieldConfig {\n return fieldSingle<FormlySpaceCompactFieldConfig>('', 'space-compact', '', options);\n}\n/** 模板 */\nexport function ref(props: RefTemplateProps = {}, otherOptions: FormlyFieldConfig = {}): FormlyRefTemplateFieldConfig {\n return field<FormlyRefTemplateFieldConfig>('', 'ref-template', '', props, otherOptions);\n}\n/** 栅格 */\nexport function grid(options: FormlyFieldConfig<GridProps> = {}): FormlyGridFieldConfig {\n return fieldSingle<FormlyGridFieldConfig>('', 'grid', '', options);\n}\n/** 弹性布局 */\nexport function flex(options: FormlyFieldConfig<FlexProps> = {}): FormlyFlexFieldConfig {\n return fieldSingle<FormlyFlexFieldConfig>('', 'flex', '', options);\n}\n/** 卡片 */\nexport function card(options: FormlyFieldConfig<CardProps> = {}): FormlyCardFieldConfig {\n return fieldSingle<FormlyCardFieldConfig>('', 'card', '', options);\n}\n/** 按钮组 */\nexport function buttonGroup(options: FormlyFieldConfig<ButtonGroupProps> = {}): FormlyButtonGroupFieldConfig {\n return fieldSingle<FormlyButtonGroupFieldConfig>('', 'button-group', '', options);\n}\nexport function button(\n text = '',\n props: ButtonProps = {},\n otherOptions: FormlyFieldConfig = {}\n): FormlyButtonFieldConfig {\n return field<FormlyButtonFieldConfig>('', 'button', '', { text, ...props }, otherOptions);\n}\nexport function submit(\n text = '',\n props: ButtonProps = {},\n otherOptions: FormlyFieldConfig = {}\n): FormlyButtonFieldConfig {\n return field<FormlyButtonFieldConfig>('', 'submit', '', { text, ...props }, otherOptions);\n}\nexport function reset(\n text = '',\n props: ButtonProps = {},\n otherOptions: FormlyFieldConfig = {}\n): FormlyButtonFieldConfig {\n return field<FormlyButtonFieldConfig>('', 'reset', '', { text, ...props }, otherOptions);\n}\n","import { field, requiredField, hide, hidden } from './common';\nimport { FormlyFieldConfig } from '@ngx-formly/core';\nimport {\n input,\n requiredInput,\n textArea,\n requiredTextArea,\n checkbox,\n requiredCheckbox,\n cascader,\n requiredCascader,\n number,\n requiredNumber,\n radio,\n requiredRadio,\n rate,\n requiredRate,\n datepicker,\n requiredDatepicker,\n requiredSwitch,\n upload,\n requiredUpload,\n slider,\n requiredSlide,\n select,\n requiredSelect,\n treeSelect,\n requiredTreeSelect,\n transfer,\n requiredTransfer,\n timepicker,\n requiredTimepicker,\n text,\n button,\n buttonGroup,\n submit,\n reset,\n space,\n ref,\n grid,\n flex,\n card,\n inputGroup\n} from './formly';\nimport type { FormlySwitchFieldConfig, SwitchProps } from 'ngx-formly-zorro-antd/switch';\n\nexport const formly = {\n field,\n requiredField,\n hide,\n hidden,\n input,\n requiredInput,\n textArea,\n requiredTextArea,\n checkbox,\n requiredCheckbox,\n cascader,\n requiredCascader,\n number,\n requiredNumber,\n radio,\n requiredRadio,\n rate,\n requiredRate,\n datepicker,\n requiredDatepicker,\n /** 开关 */\n switch: (key: string, label = '', props: SwitchProps = {}, otherOptions: FormlyFieldConfig = {}) => {\n return field<FormlySwitchFieldConfig>(key, 'switch', label, props, otherOptions);\n },\n requiredSwitch,\n upload,\n requiredUpload,\n slider,\n requiredSlide,\n select,\n requiredSelect,\n treeSelect,\n requiredTreeSelect,\n transfer,\n requiredTransfer,\n timepicker,\n requiredTimepicker,\n text,\n space,\n inputGroup,\n ref,\n grid,\n flex,\n card,\n button,\n buttonGroup,\n submit,\n reset\n};\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":"SAEgB,KAAK,CACnB,GAAW,EACX,IAAI,GAAG,OAAO,EACd,KAAK,GAAG,EAAE,EACV,QAAwB,EAAE,EAC1B,eAAoC,EAAE,EAAA;AAEtC,IAAA,MAAM,QAAQ,GAAwB,EAAE,GAAG,EAAE,IAAI,EAAE;AACnD,IAAA,QAAQ,CAAC,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,CAAC;AAEnD,IAAA,MAAM,SAAS,GAAG,GAAG,GAAG,CAAU,OAAA,EAAA,GAAG,CAAE,CAAA,GAAG,EAAE;IAC5C,YAAY,CAAC,SAAS,GAAG,YAAY,CAAC,SAAS,GAAG,CAAA,EAAG,YAAY,CAAC,SAAS,IA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|
|
1
|
-
{"version":3,"file":"ngx-formly-zorro-antd-space-compact.mjs","sources":["../../../../packages/formlyantd/space-compact/src/space-compact.type.ts","../../../../packages/formlyantd/space-compact/src/space-compact.module.ts","../../../../packages/formlyantd/space-compact/src/ngx-formly-zorro-antd-space-compact.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy, Type } 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 type { NzSizeLDSType } from 'ng-zorro-antd/core/types';\nimport type { NzSpaceDirection } from 'ng-zorro-antd/space';\n\n/**\n * @publicApi\n */\nexport interface SpaceCompactProps extends FormlyFieldProps {\n /**\n *
|
1
|
+
{"version":3,"file":"ngx-formly-zorro-antd-space-compact.mjs","sources":["../../../../packages/formlyantd/space-compact/src/space-compact.type.ts","../../../../packages/formlyantd/space-compact/src/space-compact.module.ts","../../../../packages/formlyantd/space-compact/src/ngx-formly-zorro-antd-space-compact.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy, Type } 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 type { NzSizeLDSType } from 'ng-zorro-antd/core/types';\nimport type { NzSpaceDirection } from 'ng-zorro-antd/space';\n\n/**\n * @publicApi\n */\nexport interface SpaceCompactProps extends FormlyFieldProps {\n /**\n * 子组件大小\n * @default default\n */\n size?: NzSizeLDSType;\n /**\n * 指定排列方向\n * @default horizontal\n */\n direction?: NzSpaceDirection;\n /**\n * 将宽度调整为父元素宽度的选项\n */\n block?: boolean;\n}\n\nexport interface FormlySpaceCompactFieldConfig extends NzFormlyFieldConfig<SpaceCompactProps> {\n type: 'space-compact' | Type<FormlyFieldSpaceCompact>;\n}\n/** @private */\n@Component({\n selector: 'formly-field-space-compact',\n template: `\n <nz-space-compact [nzSize]=\"props.size!\" [nzDirection]=\"props.direction!\" [nzBlock]=\"!!props.block\">\n @for (g of field.fieldGroup; track g.id) {\n <formly-field [field]=\"g\"></formly-field>\n }\n </nz-space-compact>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: false\n})\nexport class FormlyFieldSpaceCompact extends FieldType<FieldTypeConfig<SpaceCompactProps>> {\n override defaultOptions = {\n props: {\n size: 'default' as const,\n direction: 'horizontal' as const,\n block: false\n }\n };\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormlyModule } from '@ngx-formly/core';\nimport { FormlyFieldSpaceCompact } from './space-compact.type';\n\nimport { NzSpaceModule } from 'ng-zorro-antd/space';\n\n@NgModule({\n declarations: [FormlyFieldSpaceCompact],\n imports: [\n CommonModule,\n NzSpaceModule,\n FormlyModule.forChild({\n types: [\n {\n name: 'space-compact',\n component: FormlyFieldSpaceCompact\n }\n ]\n })\n ]\n})\nexport class FormlyNzSpaceCompactModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1"],"mappings":";;;;;;;;AA8BA;AAaM,MAAO,uBAAwB,SAAQ,SAA6C,CAAA;AAZ1F,IAAA,WAAA,GAAA;;AAaW,QAAA,IAAA,CAAA,cAAc,GAAG;AACxB,YAAA,KAAK,EAAE;AACL,gBAAA,IAAI,EAAE,SAAkB;AACxB,gBAAA,SAAS,EAAE,YAAqB;AAChC,gBAAA,KAAK,EAAE;AACR;SACF;AACF;8GARY,uBAAuB,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAvB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,uBAAuB,EAV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AAA,EAAA,EAAA,EAAA,IAAA,EAAA,0BAA0B,YAZnC,YAAY;YACZ,aAAa;YACb,YAAY,CAAC,QAAQ,CAAC;AACpB,gBAAA,KAAK,EAAE;AACL,oBAAA;AACE,wBAAA,IAAI,EAAE,eAAe;AACrB,wBAAA,SAAS,EAAE;AACZ;AACF;aACF,CAAC,CAAA,EAAA,CAAA,CAAA;;2FAGO,0BAA0B,EAAA,UAAA,EAAA,CAAA;kBAftC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,uBAAuB,CAAC;AACvC,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,aAAa;wBACb,YAAY,CAAC,QAAQ,CAAC;AACpB,4BAAA,KAAK,EAAE;AACL,gCAAA;AACE,oCAAA,IAAI,EAAE,eAAe;AACrB,oCAAA,SAAS,EAAE;AACZ;AACF;yBACF;AACF;AACF,iBAAA;;;ACrBD;;AAEG;;;;"}
|
package/grid/public_api.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
1
|
export { FormlyNzGridModule } from './grid.module';
|
2
2
|
export { FormlyFieldGrid } from './grid.type';
|
3
3
|
export type { FormlyGridFieldConfig } from './grid.type';
|
4
|
-
export type { GridColProps } from './grid.props';
|
4
|
+
export type { GridColProps, GridProps } from './grid.props';
|
package/helpers/common.d.ts
CHANGED
@@ -1,9 +1,7 @@
|
|
1
1
|
import type { NzFormlyFieldConfig, ControlOptions } from 'ngx-formly-zorro-antd/common';
|
2
|
-
|
3
|
-
export declare function
|
4
|
-
|
5
|
-
|
6
|
-
export declare function
|
7
|
-
|
8
|
-
}, otherOptions?: NzFormlyFieldConfig): T;
|
9
|
-
export declare function hidden(key: string): NzFormlyFieldConfig;
|
2
|
+
export declare function field<T = NzFormlyFieldConfig>(key: string, type?: string, label?: string, props?: ControlOptions, otherOptions?: NzFormlyFieldConfig): T;
|
3
|
+
export declare function fieldSingle<T = NzFormlyFieldConfig>(key: string, type?: string, label?: string, options?: NzFormlyFieldConfig<ControlOptions>): T;
|
4
|
+
export declare function requiredField<T = NzFormlyFieldConfig>(key: string, type?: string, label?: string, props?: ControlOptions, otherOptions?: NzFormlyFieldConfig): T;
|
5
|
+
export declare function requiredFieldSingle<T = NzFormlyFieldConfig>(key: string, type?: string, label?: string, options?: NzFormlyFieldConfig<ControlOptions>): T;
|
6
|
+
export declare function hide(key: string, type?: string, options?: NzFormlyFieldConfig): NzFormlyFieldConfig;
|
7
|
+
export declare function hidden(key: string, type?: string, options?: NzFormlyFieldConfig): NzFormlyFieldConfig;
|
package/helpers/formly.d.ts
CHANGED
@@ -6,7 +6,7 @@ import type { FormlyCascaderFieldConfig, CascaderProps } from 'ngx-formly-zorro-
|
|
6
6
|
import type { FormlyCheckboxFieldConfig, CheckboxProps } from 'ngx-formly-zorro-antd/checkbox';
|
7
7
|
import type { FormlyDatepickerFieldConfig, DatepickerProps } from 'ngx-formly-zorro-antd/datepicker';
|
8
8
|
import type { FormlyFlexFieldConfig, FlexProps } from 'ngx-formly-zorro-antd/flex';
|
9
|
-
import type { FormlyGridFieldConfig,
|
9
|
+
import type { FormlyGridFieldConfig, GridProps } from 'ngx-formly-zorro-antd/grid';
|
10
10
|
import type { FormlyInputFieldConfig, FormlyInputProps } from 'ngx-formly-zorro-antd/input';
|
11
11
|
import type { FormlyInputGroupFieldConfig, FormlyInputGroupProps } from 'ngx-formly-zorro-antd/input-group';
|
12
12
|
import type { FormlyInputNumberFieldConfig, InputNumberProps } from 'ngx-formly-zorro-antd/input-number';
|
@@ -65,23 +65,23 @@ export declare function slider(key: string, label?: string, props?: SlideProps,
|
|
65
65
|
/** 滑动输入条 */
|
66
66
|
export declare function requiredSlide(key: string, label?: string, props?: SlideProps, otherOptions?: FormlyFieldConfig): FormlySlideFieldConfig;
|
67
67
|
/** 文本显示 */
|
68
|
-
export declare function text(
|
68
|
+
export declare function text(options?: FormlyFieldConfig<TextValueProps>): FormlyTextValueFieldConfig;
|
69
69
|
/** 输入组 */
|
70
|
-
export declare function inputGroup(
|
70
|
+
export declare function inputGroup(options?: FormlyFieldConfig<FormlyInputGroupProps>): FormlyInputGroupFieldConfig;
|
71
71
|
/** 间距 */
|
72
|
-
export declare function space(
|
72
|
+
export declare function space(options?: FormlyFieldConfig<SpaceProps>): FormlySpaceFieldConfig;
|
73
73
|
/** 紧凑布局组合 */
|
74
|
-
export declare function spaceCompact(
|
74
|
+
export declare function spaceCompact(options?: FormlyFieldConfig<SpaceCompactProps>): FormlySpaceCompactFieldConfig;
|
75
75
|
/** 模板 */
|
76
76
|
export declare function ref(props?: RefTemplateProps, otherOptions?: FormlyFieldConfig): FormlyRefTemplateFieldConfig;
|
77
77
|
/** 栅格 */
|
78
|
-
export declare function grid(
|
78
|
+
export declare function grid(options?: FormlyFieldConfig<GridProps>): FormlyGridFieldConfig;
|
79
79
|
/** 弹性布局 */
|
80
|
-
export declare function flex(
|
80
|
+
export declare function flex(options?: FormlyFieldConfig<FlexProps>): FormlyFlexFieldConfig;
|
81
81
|
/** 卡片 */
|
82
|
-
export declare function card(
|
82
|
+
export declare function card(options?: FormlyFieldConfig<CardProps>): FormlyCardFieldConfig;
|
83
83
|
/** 按钮组 */
|
84
|
-
export declare function buttonGroup(
|
84
|
+
export declare function buttonGroup(options?: FormlyFieldConfig<ButtonGroupProps>): FormlyButtonGroupFieldConfig;
|
85
85
|
export declare function button(text?: string, props?: ButtonProps, otherOptions?: FormlyFieldConfig): FormlyButtonFieldConfig;
|
86
86
|
export declare function submit(text?: string, props?: ButtonProps, otherOptions?: FormlyFieldConfig): FormlyButtonFieldConfig;
|
87
87
|
export declare function reset(text?: string, props?: ButtonProps, otherOptions?: FormlyFieldConfig): FormlyButtonFieldConfig;
|
package/helpers/public_api.d.ts
CHANGED
@@ -1,10 +1,11 @@
|
|
1
|
-
import { field, requiredField, hidden } from './common';
|
1
|
+
import { field, requiredField, hide, hidden } from './common';
|
2
2
|
import { FormlyFieldConfig } from '@ngx-formly/core';
|
3
3
|
import { input, requiredInput, textArea, requiredTextArea, checkbox, requiredCheckbox, cascader, requiredCascader, number, requiredNumber, radio, requiredRadio, rate, requiredRate, datepicker, requiredDatepicker, requiredSwitch, upload, requiredUpload, slider, requiredSlide, select, requiredSelect, treeSelect, requiredTreeSelect, transfer, requiredTransfer, timepicker, requiredTimepicker, text, button, buttonGroup, submit, reset, space, ref, grid, flex, card, inputGroup } from './formly';
|
4
4
|
import type { FormlySwitchFieldConfig, SwitchProps } from 'ngx-formly-zorro-antd/switch';
|
5
5
|
export declare const formly: {
|
6
6
|
field: typeof field;
|
7
7
|
requiredField: typeof requiredField;
|
8
|
+
hide: typeof hide;
|
8
9
|
hidden: typeof hidden;
|
9
10
|
input: typeof input;
|
10
11
|
requiredInput: typeof requiredInput;
|
package/package.json
CHANGED
@@ -10,17 +10,17 @@ import * as i0 from "@angular/core";
|
|
10
10
|
*/
|
11
11
|
export interface SpaceCompactProps extends FormlyFieldProps {
|
12
12
|
/**
|
13
|
-
*
|
13
|
+
* 子组件大小
|
14
14
|
* @default default
|
15
15
|
*/
|
16
16
|
size?: NzSizeLDSType;
|
17
17
|
/**
|
18
|
-
*
|
18
|
+
* 指定排列方向
|
19
19
|
* @default horizontal
|
20
20
|
*/
|
21
21
|
direction?: NzSpaceDirection;
|
22
22
|
/**
|
23
|
-
*
|
23
|
+
* 将宽度调整为父元素宽度的选项
|
24
24
|
*/
|
25
25
|
block?: boolean;
|
26
26
|
}
|