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
@@ -0,0 +1,11 @@
|
|
1
|
+
import * as i0 from "@angular/core";
|
2
|
+
import * as i1 from "./ref-template.type";
|
3
|
+
import * as i2 from "@angular/common";
|
4
|
+
import * as i3 from "ng-zorro-antd/core/outlet";
|
5
|
+
import * as i4 from "@pkt/ng.core";
|
6
|
+
import * as i5 from "@ngx-formly/core";
|
7
|
+
export declare class FormlyRefTemplateModule {
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FormlyRefTemplateModule, never>;
|
9
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<FormlyRefTemplateModule, [typeof i1.FormlyFieldRefTemplate], [typeof i2.CommonModule, typeof i3.NzOutletModule, typeof i4.TrustedHtmlPipe, typeof i5.FormlyModule], never>;
|
10
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<FormlyRefTemplateModule>;
|
11
|
+
}
|
@@ -0,0 +1,79 @@
|
|
1
|
+
import { TemplateRef, Type } from '@angular/core';
|
2
|
+
import { FieldType, FieldTypeConfig } from '@ngx-formly/core';
|
3
|
+
import type { FormlyFieldProps } from 'ngx-formly-zorro-antd/form-field';
|
4
|
+
import type { NzFormlyFieldConfig } from 'ngx-formly-zorro-antd/common';
|
5
|
+
import { FormlyBoxTemplates } from 'ngx-formly-zorro-antd/common';
|
6
|
+
import * as i0 from "@angular/core";
|
7
|
+
interface RefTemplateProps extends FormlyFieldProps {
|
8
|
+
ref?: string | TemplateRef<{
|
9
|
+
$implicit: FormlyRefTemplateFieldConfig;
|
10
|
+
props: RefTemplateProps;
|
11
|
+
}>;
|
12
|
+
refName?: string;
|
13
|
+
}
|
14
|
+
/**
|
15
|
+
* RefTemplate 配置
|
16
|
+
*/
|
17
|
+
export interface FormlyRefTemplateFieldConfig extends NzFormlyFieldConfig<RefTemplateProps> {
|
18
|
+
type: 'ref-template' | Type<FormlyFieldRefTemplate>;
|
19
|
+
}
|
20
|
+
/**
|
21
|
+
* 引用模板,支持HTML,TemplateRef对象,或者NamedTemplate
|
22
|
+
* @example
|
23
|
+
*
|
24
|
+
* 用法1: 使用NamedTemplate(推荐)
|
25
|
+
*
|
26
|
+
* html
|
27
|
+
* ```html
|
28
|
+
* <formly-form formly-box>
|
29
|
+
* <ng-template named="test"></ng-template>
|
30
|
+
* </formly-form>
|
31
|
+
* ```
|
32
|
+
*
|
33
|
+
* 配置
|
34
|
+
* ```js
|
35
|
+
* {
|
36
|
+
* type: 'ref-template',
|
37
|
+
* props: {
|
38
|
+
* refName: 'test'
|
39
|
+
* }
|
40
|
+
* }
|
41
|
+
* ```
|
42
|
+
*
|
43
|
+
* 用法2:TemplateRef对象
|
44
|
+
* ```html
|
45
|
+
* <ng-template #test2></ng-template>
|
46
|
+
* ```
|
47
|
+
*
|
48
|
+
* 配置
|
49
|
+
* @viewChild('test2') test2: TemplateRef<{}>;
|
50
|
+
*
|
51
|
+
* ```js
|
52
|
+
* {
|
53
|
+
* type: 'ref-template',
|
54
|
+
* props: {
|
55
|
+
* ref: this.test2
|
56
|
+
* }
|
57
|
+
* }
|
58
|
+
* ```
|
59
|
+
*
|
60
|
+
* 用法3: 使用html
|
61
|
+
*
|
62
|
+
* 配置
|
63
|
+
* ```js
|
64
|
+
* {
|
65
|
+
* type: 'ref-template',
|
66
|
+
* props: {
|
67
|
+
* ref: '<div>test text</div>'
|
68
|
+
* }
|
69
|
+
* }
|
70
|
+
* ```
|
71
|
+
*/
|
72
|
+
export declare class FormlyFieldRefTemplate extends FieldType<FieldTypeConfig<RefTemplateProps>> {
|
73
|
+
fieldTemplates: FormlyBoxTemplates;
|
74
|
+
constructor(fieldTemplates: FormlyBoxTemplates);
|
75
|
+
get ref(): TemplateRef<any> | undefined;
|
76
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FormlyFieldRefTemplate, [{ optional: true; }]>;
|
77
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FormlyFieldRefTemplate, "formly-ref-template", never, {}, {}, never, never, false, never>;
|
78
|
+
}
|
79
|
+
export {};
|