ngx-formly-zorro-antd 16.1.2 → 16.1.4

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.
@@ -0,0 +1,2 @@
1
+ export { FormlyRefTemplateModule } from './ref-template.module';
2
+ export { FormlyFieldRefTemplate, FormlyRefTemplateFieldConfig } from './ref-template.type';
@@ -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 {};