@ebuilding/form 2.0.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/LICENSE +0 -0
- package/README.md +0 -0
- package/checkbox/index.d.ts +1 -0
- package/checkbox/src/checkbox.module.d.ts +9 -0
- package/checkbox/src/checkbox.type.d.ts +11 -0
- package/checkbox/src/public_api.d.ts +2 -0
- package/checkboxgroup/index.d.ts +1 -0
- package/checkboxgroup/src/checkboxgroup.module.d.ts +9 -0
- package/checkboxgroup/src/checkboxgroup.type.d.ts +19 -0
- package/checkboxgroup/src/public_api.d.ts +2 -0
- package/colors/index.d.ts +1 -0
- package/colors/src/default/index.d.ts +11 -0
- package/colors/src/index.module.d.ts +8 -0
- package/colors/src/public_api.d.ts +2 -0
- package/datetime/index.d.ts +1 -0
- package/datetime/src/datetime.module.d.ts +9 -0
- package/datetime/src/datetime.type.d.ts +18 -0
- package/datetime/src/public_api.d.ts +2 -0
- package/desc/index.d.ts +1 -0
- package/desc/src/desc.module.d.ts +9 -0
- package/desc/src/desc.type.d.ts +6 -0
- package/desc/src/public_api.d.ts +2 -0
- package/dim/index.d.ts +1 -0
- package/dim/src/default/index.d.ts +16 -0
- package/dim/src/dim.module.d.ts +9 -0
- package/dim/src/public_api.d.ts +2 -0
- package/dim-indicator/index.d.ts +1 -0
- package/dim-indicator/src/assess/index.d.ts +17 -0
- package/dim-indicator/src/default/index.d.ts +19 -0
- package/dim-indicator/src/finish/index.d.ts +16 -0
- package/dim-indicator/src/indicator.module.d.ts +8 -0
- package/dim-indicator/src/public_api.d.ts +2 -0
- package/fesm2022/ebuilding-form.mjs +3337 -0
- package/fesm2022/ebuilding-form.mjs.map +1 -0
- package/fesm2022/type.checkbox.mjs +93 -0
- package/fesm2022/type.checkbox.mjs.map +1 -0
- package/fesm2022/type.checkboxgroup.mjs +168 -0
- package/fesm2022/type.checkboxgroup.mjs.map +1 -0
- package/fesm2022/type.colors.mjs +74 -0
- package/fesm2022/type.colors.mjs.map +1 -0
- package/fesm2022/type.datetime.mjs +312 -0
- package/fesm2022/type.datetime.mjs.map +1 -0
- package/fesm2022/type.desc.mjs +67 -0
- package/fesm2022/type.desc.mjs.map +1 -0
- package/fesm2022/type.dim-indicator.mjs +187 -0
- package/fesm2022/type.dim-indicator.mjs.map +1 -0
- package/fesm2022/type.dim.mjs +101 -0
- package/fesm2022/type.dim.mjs.map +1 -0
- package/fesm2022/type.form-field.mjs +147 -0
- package/fesm2022/type.form-field.mjs.map +1 -0
- package/fesm2022/type.grid.mjs +126 -0
- package/fesm2022/type.grid.mjs.map +1 -0
- package/fesm2022/type.group.mjs +113 -0
- package/fesm2022/type.group.mjs.map +1 -0
- package/fesm2022/type.html.mjs +88 -0
- package/fesm2022/type.html.mjs.map +1 -0
- package/fesm2022/type.icon.mjs +143 -0
- package/fesm2022/type.icon.mjs.map +1 -0
- package/fesm2022/type.label.mjs +71 -0
- package/fesm2022/type.label.mjs.map +1 -0
- package/fesm2022/type.line.mjs +78 -0
- package/fesm2022/type.line.mjs.map +1 -0
- package/fesm2022/type.list.mjs +84 -0
- package/fesm2022/type.list.mjs.map +1 -0
- package/fesm2022/type.number.mjs +196 -0
- package/fesm2022/type.number.mjs.map +1 -0
- package/fesm2022/type.overtime.mjs +301 -0
- package/fesm2022/type.overtime.mjs.map +1 -0
- package/fesm2022/type.panel.mjs +117 -0
- package/fesm2022/type.panel.mjs.map +1 -0
- package/fesm2022/type.radio.mjs +71 -0
- package/fesm2022/type.radio.mjs.map +1 -0
- package/fesm2022/type.radiogroup.mjs +138 -0
- package/fesm2022/type.radiogroup.mjs.map +1 -0
- package/fesm2022/type.reform.mjs +91 -0
- package/fesm2022/type.reform.mjs.map +1 -0
- package/fesm2022/type.repeat-card.mjs +204 -0
- package/fesm2022/type.repeat-card.mjs.map +1 -0
- package/fesm2022/type.repeat.mjs +209 -0
- package/fesm2022/type.repeat.mjs.map +1 -0
- package/fesm2022/type.select.mjs +224 -0
- package/fesm2022/type.select.mjs.map +1 -0
- package/fesm2022/type.switch.mjs +73 -0
- package/fesm2022/type.switch.mjs.map +1 -0
- package/fesm2022/type.tabs.mjs +107 -0
- package/fesm2022/type.tabs.mjs.map +1 -0
- package/fesm2022/type.text.mjs +89 -0
- package/fesm2022/type.text.mjs.map +1 -0
- package/fesm2022/type.textarea.mjs +158 -0
- package/fesm2022/type.textarea.mjs.map +1 -0
- package/fesm2022/type.textcode.mjs +126 -0
- package/fesm2022/type.textcode.mjs.map +1 -0
- package/form-field/index.d.ts +1 -0
- package/form-field/src/form-field.module.d.ts +10 -0
- package/form-field/src/form-field.wrapper.d.ts +9 -0
- package/form-field/src/public_api.d.ts +2 -0
- package/grid/index.d.ts +1 -0
- package/grid/src/grid.module.d.ts +11 -0
- package/grid/src/grid.type.d.ts +11 -0
- package/grid/src/public_api.d.ts +2 -0
- package/group/index.d.ts +1 -0
- package/group/src/group.module.d.ts +11 -0
- package/group/src/group.type.d.ts +11 -0
- package/group/src/public_api.d.ts +2 -0
- package/html/index.d.ts +1 -0
- package/html/src/html.module.d.ts +10 -0
- package/html/src/html.type.d.ts +12 -0
- package/html/src/public_api.d.ts +2 -0
- package/icon/index.d.ts +1 -0
- package/icon/src/default/index.d.ts +14 -0
- package/icon/src/index.module.d.ts +14 -0
- package/icon/src/public_api.d.ts +2 -0
- package/index.d.ts +28 -0
- package/label/index.d.ts +1 -0
- package/label/src/label.module.d.ts +10 -0
- package/label/src/label.type.d.ts +9 -0
- package/label/src/public_api.d.ts +2 -0
- package/line/index.d.ts +1 -0
- package/line/src/line.module.d.ts +11 -0
- package/line/src/line.type.d.ts +11 -0
- package/line/src/public_api.d.ts +2 -0
- package/list/index.d.ts +1 -0
- package/list/src/list.module.d.ts +11 -0
- package/list/src/list.type.d.ts +9 -0
- package/list/src/public_api.d.ts +2 -0
- package/number/index.d.ts +1 -0
- package/number/src/number.module.d.ts +9 -0
- package/number/src/number.type.d.ts +19 -0
- package/number/src/number_rate.type.d.ts +9 -0
- package/number/src/public_api.d.ts +3 -0
- package/overtime/index.d.ts +1 -0
- package/overtime/src/default/index.d.ts +77 -0
- package/overtime/src/index.module.d.ts +13 -0
- package/overtime/src/public_api.d.ts +2 -0
- package/package.json +136 -0
- package/panel/index.d.ts +1 -0
- package/panel/src/panel.module.d.ts +11 -0
- package/panel/src/panel.type.d.ts +12 -0
- package/panel/src/public_api.d.ts +2 -0
- package/radio/index.d.ts +1 -0
- package/radio/src/public_api.d.ts +2 -0
- package/radio/src/radio.module.d.ts +8 -0
- package/radio/src/radio.type.d.ts +11 -0
- package/radiogroup/index.d.ts +1 -0
- package/radiogroup/src/public_api.d.ts +2 -0
- package/radiogroup/src/radiogroup.module.d.ts +8 -0
- package/radiogroup/src/radiogroup.type.d.ts +17 -0
- package/reform/index.d.ts +1 -0
- package/reform/src/public_api.d.ts +2 -0
- package/reform/src/reform.module.d.ts +11 -0
- package/reform/src/reform.type.d.ts +11 -0
- package/repeat/index.d.ts +1 -0
- package/repeat/src/default/index.d.ts +28 -0
- package/repeat/src/index.module.d.ts +17 -0
- package/repeat/src/public_api.d.ts +2 -0
- package/repeat-card/index.d.ts +1 -0
- package/repeat-card/src/default/index.d.ts +28 -0
- package/repeat-card/src/index.module.d.ts +18 -0
- package/repeat-card/src/public_api.d.ts +2 -0
- package/select/index.d.ts +1 -0
- package/select/src/public_api.d.ts +2 -0
- package/select/src/select.module.d.ts +9 -0
- package/select/src/select.type.d.ts +23 -0
- package/switch/index.d.ts +1 -0
- package/switch/src/default/index.d.ts +12 -0
- package/switch/src/index.module.d.ts +9 -0
- package/switch/src/public_api.d.ts +2 -0
- package/tabs/index.d.ts +1 -0
- package/tabs/src/default/index.d.ts +13 -0
- package/tabs/src/index.module.d.ts +7 -0
- package/tabs/src/public_api.d.ts +3 -0
- package/tabs/src/tab/index.d.ts +11 -0
- package/text/index.d.ts +1 -0
- package/text/src/public_api.d.ts +2 -0
- package/text/src/text.module.d.ts +8 -0
- package/text/src/text.type.d.ts +7 -0
- package/textarea/index.d.ts +1 -0
- package/textarea/src/public_api.d.ts +2 -0
- package/textarea/src/textarea.module.d.ts +7 -0
- package/textarea/src/textarea.type.d.ts +13 -0
- package/textcode/index.d.ts +1 -0
- package/textcode/src/public_api.d.ts +2 -0
- package/textcode/src/text.module.d.ts +7 -0
- package/textcode/src/text.type.d.ts +17 -0
|
@@ -0,0 +1,312 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
|
|
3
|
+
import * as i2 from '@angular/common';
|
|
4
|
+
import { CommonModule } from '@angular/common';
|
|
5
|
+
import * as i6 from '@kre-form/core';
|
|
6
|
+
import { FieldType, FormlyModule } from '@kre-form/core';
|
|
7
|
+
import { DeonNzFormFieldModule } from '@ebuilding/form/form-field';
|
|
8
|
+
import * as i3 from '@angular/forms';
|
|
9
|
+
import { ReactiveFormsModule } from '@angular/forms';
|
|
10
|
+
import * as i4 from 'ng-zorro-antd/date-picker';
|
|
11
|
+
import { NzDatePickerModule } from 'ng-zorro-antd/date-picker';
|
|
12
|
+
import * as i5 from 'ng-zorro-antd/time-picker';
|
|
13
|
+
import { NzTimePickerModule } from 'ng-zorro-antd/time-picker';
|
|
14
|
+
import * as i1 from 'ng-zorro-antd/i18n';
|
|
15
|
+
import { NZ_DATE_LOCALE } from 'ng-zorro-antd/i18n';
|
|
16
|
+
import moment from 'moment';
|
|
17
|
+
import { zhCN } from 'date-fns/locale';
|
|
18
|
+
|
|
19
|
+
class DeonNzFieldDatetime extends FieldType {
|
|
20
|
+
i18n;
|
|
21
|
+
constructor(i18n) {
|
|
22
|
+
super();
|
|
23
|
+
this.i18n = i18n;
|
|
24
|
+
this.i18n.setDateLocale(zhCN);
|
|
25
|
+
}
|
|
26
|
+
disabledDate = (endValue) => {
|
|
27
|
+
let minDate = null;
|
|
28
|
+
let maxDate = null;
|
|
29
|
+
let currentDate = null;
|
|
30
|
+
if (endValue) {
|
|
31
|
+
currentDate = new Date(moment(endValue).format('YYYY-MM-DD')).getTime();
|
|
32
|
+
}
|
|
33
|
+
if (currentDate && this.props && this.props["minDate"]) {
|
|
34
|
+
minDate = new Date(moment(this && this.props["minDate"]).format('YYYY-MM-DD')).getTime();
|
|
35
|
+
return currentDate < minDate;
|
|
36
|
+
}
|
|
37
|
+
if (currentDate && this.props && this.props["maxDate"]) {
|
|
38
|
+
maxDate = new Date(moment(this.props["maxDate"]).format('YYYY-MM-DD')).getTime();
|
|
39
|
+
return currentDate > maxDate;
|
|
40
|
+
}
|
|
41
|
+
return false;
|
|
42
|
+
};
|
|
43
|
+
defaultOptions = {
|
|
44
|
+
props: { options: [] },
|
|
45
|
+
};
|
|
46
|
+
get showType() {
|
|
47
|
+
let result = 'datetime';
|
|
48
|
+
if (this.props['type'] != undefined && this.props['type'] != null && this.props['type'] != '') {
|
|
49
|
+
result = this.props['type'].toLowerCase();
|
|
50
|
+
}
|
|
51
|
+
return result;
|
|
52
|
+
}
|
|
53
|
+
get format() {
|
|
54
|
+
let result = 'HH:mm:ss';
|
|
55
|
+
if (this.props['format'] != undefined && this.props['format'] != null && this.props['format'] != '') {
|
|
56
|
+
result = this.props['format'];
|
|
57
|
+
}
|
|
58
|
+
return result;
|
|
59
|
+
}
|
|
60
|
+
get dateText() {
|
|
61
|
+
let result = null;
|
|
62
|
+
if (this.text) {
|
|
63
|
+
switch (this.showType) {
|
|
64
|
+
case 'yyyy':
|
|
65
|
+
result = moment(this.dateText).format('YYYY').toString();
|
|
66
|
+
break;
|
|
67
|
+
case 'mm':
|
|
68
|
+
result = moment(this.dateText).format('MM').toString();
|
|
69
|
+
break;
|
|
70
|
+
case 'yyyymm':
|
|
71
|
+
result = moment(this.text).format('YYYY-MM').toString();
|
|
72
|
+
break;
|
|
73
|
+
case 'yyyymmdd':
|
|
74
|
+
result = moment(this.text).format('YYYY-MM-DD').toString();
|
|
75
|
+
break;
|
|
76
|
+
case 'yyyymmddhh':
|
|
77
|
+
result = moment(this.text).format('YYYY-MM-DD HH').toString();
|
|
78
|
+
break;
|
|
79
|
+
case 'yyyymmddhhmm':
|
|
80
|
+
result = moment(this.text).format('YYYY-MM-DD HH:mm').toString();
|
|
81
|
+
break;
|
|
82
|
+
case 'yyyymmddhhmmss':
|
|
83
|
+
result = moment(this.text).format('YYYY-MM-DD HH:mm:ss').toString();
|
|
84
|
+
break;
|
|
85
|
+
case 'hhmm':
|
|
86
|
+
result = moment(this.text).format('HH:mm').toString();
|
|
87
|
+
break;
|
|
88
|
+
case 'hhmmss':
|
|
89
|
+
result = moment(this.text).format('HH:mm:ss').toString();
|
|
90
|
+
break;
|
|
91
|
+
case 'datetime':
|
|
92
|
+
result = moment(this.text).format('YYYY-MM-DD HH:mm:ss').toString();
|
|
93
|
+
break;
|
|
94
|
+
case 'date':
|
|
95
|
+
result = moment(this.text).format('YYYY-MM-DD').toString();
|
|
96
|
+
break;
|
|
97
|
+
case 'year':
|
|
98
|
+
result = moment(this.text).format('YYYY').toString();
|
|
99
|
+
break;
|
|
100
|
+
case 'month':
|
|
101
|
+
result = moment(this.text).format('YYYY-MM').toString();
|
|
102
|
+
break;
|
|
103
|
+
case 'time':
|
|
104
|
+
result = moment(this.text).format(this.format).toString();
|
|
105
|
+
break;
|
|
106
|
+
default:
|
|
107
|
+
break;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
return result;
|
|
111
|
+
}
|
|
112
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DeonNzFieldDatetime, deps: [{ token: i1.NzI18nService }], target: i0.ɵɵFactoryTarget.Component });
|
|
113
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: DeonNzFieldDatetime, isStandalone: true, selector: "deon-nz-field-datetime", providers: [{ provide: NZ_DATE_LOCALE, useValue: zhCN }], usesInheritance: true, ngImport: i0, template: `
|
|
114
|
+
<div class="field-text deon-text deon-text-datetime" *ngIf="editor == false; else tmpField">
|
|
115
|
+
{{ dateText }}
|
|
116
|
+
</div>
|
|
117
|
+
<ng-template #tmpField>
|
|
118
|
+
<ng-container [ngSwitch]="showType">
|
|
119
|
+
<ng-container *ngSwitchCase="'yyyy'">
|
|
120
|
+
<nz-year-picker [formControl]="formControl" [formlyAttributes]="field"></nz-year-picker>
|
|
121
|
+
</ng-container>
|
|
122
|
+
<ng-container *ngSwitchCase="'mm'">
|
|
123
|
+
<nz-month-picker [formControl]="formControl" [formlyAttributes]="field"></nz-month-picker>
|
|
124
|
+
</ng-container>
|
|
125
|
+
<ng-container *ngSwitchCase="'mmdd'">
|
|
126
|
+
<nz-date-picker nzFormat="MM-dd" [formControl]="formControl" [formlyAttributes]="field"></nz-date-picker>
|
|
127
|
+
</ng-container>
|
|
128
|
+
<ng-container *ngSwitchCase="'yyyymm'">
|
|
129
|
+
<nz-month-picker [formControl]="formControl" [formlyAttributes]="field"></nz-month-picker>
|
|
130
|
+
</ng-container>
|
|
131
|
+
<ng-container *ngSwitchCase="'yyyymmdd'">
|
|
132
|
+
<nz-date-picker [formControl]="formControl" [formlyAttributes]="field" [nzDisabledDate]="disabledDate"></nz-date-picker>
|
|
133
|
+
</ng-container>
|
|
134
|
+
<ng-container *ngSwitchCase="'yyyymmddhh'">
|
|
135
|
+
<nz-date-picker
|
|
136
|
+
nzFormat="yyyy-MM-dd HH"
|
|
137
|
+
[nzShowTime]="{ nzFormat: 'HH' }"
|
|
138
|
+
[formControl]="formControl"
|
|
139
|
+
[formlyAttributes]="field"
|
|
140
|
+
></nz-date-picker>
|
|
141
|
+
</ng-container>
|
|
142
|
+
<ng-container *ngSwitchCase="'yyyymmddhhmm'">
|
|
143
|
+
<nz-date-picker
|
|
144
|
+
nzFormat="yyyy-MM-dd HH:mm"
|
|
145
|
+
[nzShowTime]="{ nzFormat: 'HH:mm' }"
|
|
146
|
+
[formControl]="formControl"
|
|
147
|
+
[formlyAttributes]="field"
|
|
148
|
+
></nz-date-picker>
|
|
149
|
+
</ng-container>
|
|
150
|
+
<ng-container *ngSwitchCase="'yyyymmddhhmmss'">
|
|
151
|
+
<nz-date-picker
|
|
152
|
+
nzFormat="yyyy-MM-dd HH:mm:ss"
|
|
153
|
+
[nzShowTime]="{ nzFormat: 'HH:mm:ss' }"
|
|
154
|
+
[formControl]="formControl"
|
|
155
|
+
[formlyAttributes]="field"
|
|
156
|
+
></nz-date-picker>
|
|
157
|
+
</ng-container>
|
|
158
|
+
<ng-container *ngSwitchCase="'hhmm'">
|
|
159
|
+
<nz-time-picker nzFormat="HH:mm" [formControl]="formControl" [formlyAttributes]="field"></nz-time-picker>
|
|
160
|
+
</ng-container>
|
|
161
|
+
<ng-container *ngSwitchCase="'hhmmss'">
|
|
162
|
+
<nz-time-picker nzFormat="HH:mm:ss" [formControl]="formControl" [formlyAttributes]="field"></nz-time-picker>
|
|
163
|
+
</ng-container>
|
|
164
|
+
|
|
165
|
+
<ng-container *ngSwitchCase="'datetime'">
|
|
166
|
+
<nz-date-picker nzFormat="yyyy-MM-dd HH:mm:ss" [formControl]="formControl" [formlyAttributes]="field"></nz-date-picker>
|
|
167
|
+
</ng-container>
|
|
168
|
+
<ng-container *ngSwitchCase="'date'">
|
|
169
|
+
<nz-date-picker [formControl]="formControl" [formlyAttributes]="field" [nzDisabledDate]="disabledDate"></nz-date-picker>
|
|
170
|
+
</ng-container>
|
|
171
|
+
<ng-container *ngSwitchCase="'year'">
|
|
172
|
+
<nz-year-picker [formControl]="formControl" [formlyAttributes]="field"></nz-year-picker>
|
|
173
|
+
</ng-container>
|
|
174
|
+
<ng-container *ngSwitchCase="'month'">
|
|
175
|
+
<nz-month-picker [formControl]="formControl" [formlyAttributes]="field"></nz-month-picker>
|
|
176
|
+
</ng-container>
|
|
177
|
+
<ng-container *ngSwitchCase="'time'">
|
|
178
|
+
<nz-time-picker [formControl]="formControl" [nzFormat]="format" [formlyAttributes]="field"></nz-time-picker>
|
|
179
|
+
</ng-container>
|
|
180
|
+
<ng-container *ngSwitchDefault></ng-container>
|
|
181
|
+
</ng-container>
|
|
182
|
+
</ng-template>
|
|
183
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i2.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i2.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { 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: "ngmodule", type: NzDatePickerModule }, { kind: "component", type: i4.NzDatePickerComponent, selector: "nz-date-picker,nz-week-picker,nz-month-picker,nz-quarter-picker,nz-year-picker,nz-range-picker", inputs: ["nzAllowClear", "nzAutoFocus", "nzDisabled", "nzBorderless", "nzInputReadOnly", "nzInline", "nzOpen", "nzDisabledDate", "nzLocale", "nzPlaceHolder", "nzPopupStyle", "nzDropdownClassName", "nzSize", "nzStatus", "nzFormat", "nzDateRender", "nzDisabledTime", "nzRenderExtraFooter", "nzShowToday", "nzMode", "nzShowNow", "nzRanges", "nzDefaultPickerValue", "nzSeparator", "nzSuffixIcon", "nzBackdrop", "nzId", "nzPlacement", "nzShowWeekNumber", "nzShowTime"], outputs: ["nzOnPanelChange", "nzOnCalendarChange", "nzOnOk", "nzOnOpenChange"], exportAs: ["nzDatePicker"] }, { kind: "directive", type: i4.NzMonthPickerComponent, selector: "nz-month-picker", exportAs: ["nzMonthPicker"] }, { kind: "directive", type: i4.NzYearPickerComponent, selector: "nz-year-picker", exportAs: ["nzYearPicker"] }, { kind: "ngmodule", type: NzTimePickerModule }, { kind: "component", type: i5.NzTimePickerComponent, selector: "nz-time-picker", inputs: ["nzId", "nzSize", "nzStatus", "nzHourStep", "nzMinuteStep", "nzSecondStep", "nzClearText", "nzNowText", "nzOkText", "nzPopupClassName", "nzPlaceHolder", "nzAddOn", "nzDefaultOpenValue", "nzDisabledHours", "nzDisabledMinutes", "nzDisabledSeconds", "nzFormat", "nzOpen", "nzUse12Hours", "nzSuffixIcon", "nzHideDisabledOptions", "nzAllowEmpty", "nzDisabled", "nzAutoFocus", "nzBackdrop", "nzBorderless", "nzInputReadOnly"], outputs: ["nzOpenChange"], exportAs: ["nzTimePicker"] }, { kind: "ngmodule", type: FormlyModule }, { kind: "directive", type: i6.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
184
|
+
}
|
|
185
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DeonNzFieldDatetime, decorators: [{
|
|
186
|
+
type: Component,
|
|
187
|
+
args: [{
|
|
188
|
+
selector: 'deon-nz-field-datetime',
|
|
189
|
+
template: `
|
|
190
|
+
<div class="field-text deon-text deon-text-datetime" *ngIf="editor == false; else tmpField">
|
|
191
|
+
{{ dateText }}
|
|
192
|
+
</div>
|
|
193
|
+
<ng-template #tmpField>
|
|
194
|
+
<ng-container [ngSwitch]="showType">
|
|
195
|
+
<ng-container *ngSwitchCase="'yyyy'">
|
|
196
|
+
<nz-year-picker [formControl]="formControl" [formlyAttributes]="field"></nz-year-picker>
|
|
197
|
+
</ng-container>
|
|
198
|
+
<ng-container *ngSwitchCase="'mm'">
|
|
199
|
+
<nz-month-picker [formControl]="formControl" [formlyAttributes]="field"></nz-month-picker>
|
|
200
|
+
</ng-container>
|
|
201
|
+
<ng-container *ngSwitchCase="'mmdd'">
|
|
202
|
+
<nz-date-picker nzFormat="MM-dd" [formControl]="formControl" [formlyAttributes]="field"></nz-date-picker>
|
|
203
|
+
</ng-container>
|
|
204
|
+
<ng-container *ngSwitchCase="'yyyymm'">
|
|
205
|
+
<nz-month-picker [formControl]="formControl" [formlyAttributes]="field"></nz-month-picker>
|
|
206
|
+
</ng-container>
|
|
207
|
+
<ng-container *ngSwitchCase="'yyyymmdd'">
|
|
208
|
+
<nz-date-picker [formControl]="formControl" [formlyAttributes]="field" [nzDisabledDate]="disabledDate"></nz-date-picker>
|
|
209
|
+
</ng-container>
|
|
210
|
+
<ng-container *ngSwitchCase="'yyyymmddhh'">
|
|
211
|
+
<nz-date-picker
|
|
212
|
+
nzFormat="yyyy-MM-dd HH"
|
|
213
|
+
[nzShowTime]="{ nzFormat: 'HH' }"
|
|
214
|
+
[formControl]="formControl"
|
|
215
|
+
[formlyAttributes]="field"
|
|
216
|
+
></nz-date-picker>
|
|
217
|
+
</ng-container>
|
|
218
|
+
<ng-container *ngSwitchCase="'yyyymmddhhmm'">
|
|
219
|
+
<nz-date-picker
|
|
220
|
+
nzFormat="yyyy-MM-dd HH:mm"
|
|
221
|
+
[nzShowTime]="{ nzFormat: 'HH:mm' }"
|
|
222
|
+
[formControl]="formControl"
|
|
223
|
+
[formlyAttributes]="field"
|
|
224
|
+
></nz-date-picker>
|
|
225
|
+
</ng-container>
|
|
226
|
+
<ng-container *ngSwitchCase="'yyyymmddhhmmss'">
|
|
227
|
+
<nz-date-picker
|
|
228
|
+
nzFormat="yyyy-MM-dd HH:mm:ss"
|
|
229
|
+
[nzShowTime]="{ nzFormat: 'HH:mm:ss' }"
|
|
230
|
+
[formControl]="formControl"
|
|
231
|
+
[formlyAttributes]="field"
|
|
232
|
+
></nz-date-picker>
|
|
233
|
+
</ng-container>
|
|
234
|
+
<ng-container *ngSwitchCase="'hhmm'">
|
|
235
|
+
<nz-time-picker nzFormat="HH:mm" [formControl]="formControl" [formlyAttributes]="field"></nz-time-picker>
|
|
236
|
+
</ng-container>
|
|
237
|
+
<ng-container *ngSwitchCase="'hhmmss'">
|
|
238
|
+
<nz-time-picker nzFormat="HH:mm:ss" [formControl]="formControl" [formlyAttributes]="field"></nz-time-picker>
|
|
239
|
+
</ng-container>
|
|
240
|
+
|
|
241
|
+
<ng-container *ngSwitchCase="'datetime'">
|
|
242
|
+
<nz-date-picker nzFormat="yyyy-MM-dd HH:mm:ss" [formControl]="formControl" [formlyAttributes]="field"></nz-date-picker>
|
|
243
|
+
</ng-container>
|
|
244
|
+
<ng-container *ngSwitchCase="'date'">
|
|
245
|
+
<nz-date-picker [formControl]="formControl" [formlyAttributes]="field" [nzDisabledDate]="disabledDate"></nz-date-picker>
|
|
246
|
+
</ng-container>
|
|
247
|
+
<ng-container *ngSwitchCase="'year'">
|
|
248
|
+
<nz-year-picker [formControl]="formControl" [formlyAttributes]="field"></nz-year-picker>
|
|
249
|
+
</ng-container>
|
|
250
|
+
<ng-container *ngSwitchCase="'month'">
|
|
251
|
+
<nz-month-picker [formControl]="formControl" [formlyAttributes]="field"></nz-month-picker>
|
|
252
|
+
</ng-container>
|
|
253
|
+
<ng-container *ngSwitchCase="'time'">
|
|
254
|
+
<nz-time-picker [formControl]="formControl" [nzFormat]="format" [formlyAttributes]="field"></nz-time-picker>
|
|
255
|
+
</ng-container>
|
|
256
|
+
<ng-container *ngSwitchDefault></ng-container>
|
|
257
|
+
</ng-container>
|
|
258
|
+
</ng-template>
|
|
259
|
+
`,
|
|
260
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
261
|
+
providers: [{ provide: NZ_DATE_LOCALE, useValue: zhCN }],
|
|
262
|
+
imports: [
|
|
263
|
+
CommonModule,
|
|
264
|
+
ReactiveFormsModule,
|
|
265
|
+
NzDatePickerModule,
|
|
266
|
+
NzTimePickerModule,
|
|
267
|
+
FormlyModule
|
|
268
|
+
]
|
|
269
|
+
}]
|
|
270
|
+
}], ctorParameters: () => [{ type: i1.NzI18nService }] });
|
|
271
|
+
|
|
272
|
+
class DeonNzDateTimeModule {
|
|
273
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DeonNzDateTimeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
274
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.15", ngImport: i0, type: DeonNzDateTimeModule, imports: [CommonModule,
|
|
275
|
+
DeonNzFormFieldModule, i6.FormlyModule] });
|
|
276
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DeonNzDateTimeModule, imports: [CommonModule,
|
|
277
|
+
DeonNzFormFieldModule,
|
|
278
|
+
FormlyModule.forChild({
|
|
279
|
+
types: [
|
|
280
|
+
{
|
|
281
|
+
name: 'datetime',
|
|
282
|
+
component: DeonNzFieldDatetime,
|
|
283
|
+
wrappers: ['formly-form-field'],
|
|
284
|
+
},
|
|
285
|
+
],
|
|
286
|
+
})] });
|
|
287
|
+
}
|
|
288
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DeonNzDateTimeModule, decorators: [{
|
|
289
|
+
type: NgModule,
|
|
290
|
+
args: [{
|
|
291
|
+
imports: [
|
|
292
|
+
CommonModule,
|
|
293
|
+
DeonNzFormFieldModule,
|
|
294
|
+
FormlyModule.forChild({
|
|
295
|
+
types: [
|
|
296
|
+
{
|
|
297
|
+
name: 'datetime',
|
|
298
|
+
component: DeonNzFieldDatetime,
|
|
299
|
+
wrappers: ['formly-form-field'],
|
|
300
|
+
},
|
|
301
|
+
],
|
|
302
|
+
}),
|
|
303
|
+
],
|
|
304
|
+
}]
|
|
305
|
+
}] });
|
|
306
|
+
|
|
307
|
+
/**
|
|
308
|
+
* Generated bundle index. Do not edit.
|
|
309
|
+
*/
|
|
310
|
+
|
|
311
|
+
export { DeonNzDateTimeModule, DeonNzFieldDatetime };
|
|
312
|
+
//# sourceMappingURL=type.datetime.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type.datetime.mjs","sources":["../../../../packages/form/datetime/src/datetime.type.ts","../../../../packages/form/datetime/src/datetime.module.ts","../../../../packages/form/datetime/type.datetime.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy } from '@angular/core';\n\nimport { CommonModule } from '@angular/common';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { NzDatePickerModule } from 'ng-zorro-antd/date-picker';\nimport { NzTimePickerModule } from 'ng-zorro-antd/time-picker';\nimport { NzI18nService, NZ_DATE_LOCALE } from 'ng-zorro-antd/i18n';\n\nimport { FormlyModule, FieldType, FieldTypeConfig } from '@kre-form/core';\nimport moment from 'moment';\nimport _ from 'lodash';\n\nimport { zhCN } from 'date-fns/locale';\n@Component({\n selector: 'deon-nz-field-datetime',\n template: `\n <div class=\"field-text deon-text deon-text-datetime\" *ngIf=\"editor == false; else tmpField\">\n {{ dateText }}\n </div>\n <ng-template #tmpField>\n <ng-container [ngSwitch]=\"showType\">\n <ng-container *ngSwitchCase=\"'yyyy'\">\n <nz-year-picker [formControl]=\"formControl\" [formlyAttributes]=\"field\"></nz-year-picker>\n </ng-container>\n <ng-container *ngSwitchCase=\"'mm'\">\n <nz-month-picker [formControl]=\"formControl\" [formlyAttributes]=\"field\"></nz-month-picker>\n </ng-container>\n <ng-container *ngSwitchCase=\"'mmdd'\">\n <nz-date-picker nzFormat=\"MM-dd\" [formControl]=\"formControl\" [formlyAttributes]=\"field\"></nz-date-picker>\n </ng-container>\n <ng-container *ngSwitchCase=\"'yyyymm'\">\n <nz-month-picker [formControl]=\"formControl\" [formlyAttributes]=\"field\"></nz-month-picker>\n </ng-container>\n <ng-container *ngSwitchCase=\"'yyyymmdd'\">\n <nz-date-picker [formControl]=\"formControl\" [formlyAttributes]=\"field\" [nzDisabledDate]=\"disabledDate\"></nz-date-picker>\n </ng-container>\n <ng-container *ngSwitchCase=\"'yyyymmddhh'\">\n <nz-date-picker\n nzFormat=\"yyyy-MM-dd HH\"\n [nzShowTime]=\"{ nzFormat: 'HH' }\"\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\"\n ></nz-date-picker>\n </ng-container>\n <ng-container *ngSwitchCase=\"'yyyymmddhhmm'\">\n <nz-date-picker\n nzFormat=\"yyyy-MM-dd HH:mm\"\n [nzShowTime]=\"{ nzFormat: 'HH:mm' }\"\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\"\n ></nz-date-picker>\n </ng-container>\n <ng-container *ngSwitchCase=\"'yyyymmddhhmmss'\">\n <nz-date-picker\n nzFormat=\"yyyy-MM-dd HH:mm:ss\"\n [nzShowTime]=\"{ nzFormat: 'HH:mm:ss' }\"\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\"\n ></nz-date-picker>\n </ng-container>\n <ng-container *ngSwitchCase=\"'hhmm'\">\n <nz-time-picker nzFormat=\"HH:mm\" [formControl]=\"formControl\" [formlyAttributes]=\"field\"></nz-time-picker>\n </ng-container>\n <ng-container *ngSwitchCase=\"'hhmmss'\">\n <nz-time-picker nzFormat=\"HH:mm:ss\" [formControl]=\"formControl\" [formlyAttributes]=\"field\"></nz-time-picker>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'datetime'\">\n <nz-date-picker nzFormat=\"yyyy-MM-dd HH:mm:ss\" [formControl]=\"formControl\" [formlyAttributes]=\"field\"></nz-date-picker>\n </ng-container>\n <ng-container *ngSwitchCase=\"'date'\">\n <nz-date-picker [formControl]=\"formControl\" [formlyAttributes]=\"field\" [nzDisabledDate]=\"disabledDate\"></nz-date-picker>\n </ng-container>\n <ng-container *ngSwitchCase=\"'year'\">\n <nz-year-picker [formControl]=\"formControl\" [formlyAttributes]=\"field\"></nz-year-picker>\n </ng-container>\n <ng-container *ngSwitchCase=\"'month'\">\n <nz-month-picker [formControl]=\"formControl\" [formlyAttributes]=\"field\"></nz-month-picker>\n </ng-container>\n <ng-container *ngSwitchCase=\"'time'\">\n <nz-time-picker [formControl]=\"formControl\" [nzFormat]=\"format\" [formlyAttributes]=\"field\"></nz-time-picker>\n </ng-container>\n <ng-container *ngSwitchDefault></ng-container>\n </ng-container>\n </ng-template>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [{ provide: NZ_DATE_LOCALE, useValue: zhCN }],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n NzDatePickerModule,\n NzTimePickerModule,\n FormlyModule\n ]\n})\nexport class DeonNzFieldDatetime extends FieldType<FieldTypeConfig> {\n constructor(public i18n: NzI18nService) {\n super();\n this.i18n.setDateLocale(zhCN);\n }\n disabledDate = (endValue: Date): boolean => {\n let minDate: any = null;\n let maxDate: any = null;\n let currentDate: any = null;\n if (endValue!!) {\n currentDate = new Date(moment(endValue).format('YYYY-MM-DD')).getTime();\n }\n\n if (currentDate!! && this.props && this.props[\"minDate\"]) {\n minDate = new Date(moment(this && this.props[\"minDate\"]).format('YYYY-MM-DD')).getTime();\n return currentDate < minDate;\n }\n if (currentDate!! && this.props && this.props[\"maxDate\"]) {\n maxDate = new Date(moment(this.props[\"maxDate\"]).format('YYYY-MM-DD')).getTime();\n return currentDate > maxDate;\n }\n return false;\n };\n\n override defaultOptions = {\n props: { options: [] },\n };\n get showType() {\n let result = 'datetime';\n if (this.props['type'] != undefined && this.props['type'] != null && this.props['type'] != '') {\n result = this.props['type'].toLowerCase();\n }\n return result;\n }\n\n get format() {\n let result = 'HH:mm:ss';\n if (this.props['format'] != undefined && this.props['format'] != null && this.props['format'] != '') {\n result = this.props['format'];\n }\n return result;\n }\n\n get dateText() {\n let result: any = null;\n if (this.text) {\n switch (this.showType) {\n case 'yyyy':\n result = moment(this.dateText).format('YYYY').toString();\n break;\n case 'mm':\n result = moment(this.dateText).format('MM').toString();\n break;\n case 'yyyymm':\n result = moment(this.text).format('YYYY-MM').toString();\n break;\n case 'yyyymmdd':\n result = moment(this.text).format('YYYY-MM-DD').toString();\n break;\n case 'yyyymmddhh':\n result = moment(this.text).format('YYYY-MM-DD HH').toString();\n break;\n case 'yyyymmddhhmm':\n result = moment(this.text).format('YYYY-MM-DD HH:mm').toString();\n break;\n case 'yyyymmddhhmmss':\n result = moment(this.text).format('YYYY-MM-DD HH:mm:ss').toString();\n break;\n case 'hhmm':\n result = moment(this.text).format('HH:mm').toString();\n break;\n case 'hhmmss':\n result = moment(this.text).format('HH:mm:ss').toString();\n break;\n case 'datetime':\n result = moment(this.text).format('YYYY-MM-DD HH:mm:ss').toString();\n break;\n case 'date':\n result = moment(this.text).format('YYYY-MM-DD').toString();\n break;\n case 'year':\n result = moment(this.text).format('YYYY').toString();\n break;\n case 'month':\n result = moment(this.text).format('YYYY-MM').toString();\n break;\n case 'time':\n result = moment(this.text).format(this.format).toString();\n break;\n default:\n break;\n }\n }\n return result;\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormlyModule } from '@kre-form/core';\nimport { DeonNzFormFieldModule } from '@ebuilding/form/form-field';\n\nimport { DeonNzFieldDatetime } from './datetime.type';\n\n@NgModule({\n imports: [\n CommonModule,\n DeonNzFormFieldModule,\n FormlyModule.forChild({\n types: [\n {\n name: 'datetime',\n component: DeonNzFieldDatetime,\n wrappers: ['formly-form-field'],\n },\n ],\n }),\n ],\n})\nexport class DeonNzDateTimeModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;;;;;;;AAgGM,MAAO,mBAAoB,SAAQ,SAA0B,CAAA;AAC9C,IAAA,IAAA;AAAnB,IAAA,WAAA,CAAmB,IAAmB,EAAA;AACpC,QAAA,KAAK,EAAE;QADU,IAAI,CAAA,IAAA,GAAJ,IAAI;AAErB,QAAA,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC;;AAE/B,IAAA,YAAY,GAAG,CAAC,QAAc,KAAa;QACzC,IAAI,OAAO,GAAQ,IAAI;QACvB,IAAI,OAAO,GAAQ,IAAI;QACvB,IAAI,WAAW,GAAQ,IAAI;QAC3B,IAAI,QAAU,EAAE;AACd,YAAA,WAAW,GAAG,IAA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9B,QAAQ,EAAE,CAAC,mBAAmB,CAAC;AAChC,iCAAA;AACF,6BAAA;yBACF,CAAC;AACH,qBAAA;AACF,iBAAA;;;ACrBD;;AAEG;;;;"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
|
|
3
|
+
import { CommonModule } from '@angular/common';
|
|
4
|
+
import * as i1$1 from '@kre-form/core';
|
|
5
|
+
import { FieldType, FormlyModule } from '@kre-form/core';
|
|
6
|
+
import { DeonNzFormFieldModule } from '@ebuilding/form/form-field';
|
|
7
|
+
import { ReactiveFormsModule } from '@angular/forms';
|
|
8
|
+
import * as i1 from '@ebuilding/base/shared.pipe';
|
|
9
|
+
import { GramPipeModule } from '@ebuilding/base/shared.pipe';
|
|
10
|
+
|
|
11
|
+
class DeonNzFieldDesc extends FieldType {
|
|
12
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DeonNzFieldDesc, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
13
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: DeonNzFieldDesc, isStandalone: true, selector: "deon-field-nz-desc", usesInheritance: true, ngImport: i0, template: `<div [innerHtml]="props?.label | safeHtml"></div>`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: GramPipeModule }, { kind: "pipe", type: i1.SafeHtmlPipe, name: "safeHtml" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
14
|
+
}
|
|
15
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DeonNzFieldDesc, decorators: [{
|
|
16
|
+
type: Component,
|
|
17
|
+
args: [{
|
|
18
|
+
selector: 'deon-field-nz-desc',
|
|
19
|
+
template: `<div [innerHtml]="props?.label | safeHtml"></div>`,
|
|
20
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
21
|
+
imports: [
|
|
22
|
+
CommonModule,
|
|
23
|
+
ReactiveFormsModule,
|
|
24
|
+
GramPipeModule
|
|
25
|
+
]
|
|
26
|
+
}]
|
|
27
|
+
}] });
|
|
28
|
+
|
|
29
|
+
class DeonNzDescModule {
|
|
30
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DeonNzDescModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
31
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.15", ngImport: i0, type: DeonNzDescModule, imports: [CommonModule,
|
|
32
|
+
DeonNzFormFieldModule, i1$1.FormlyModule] });
|
|
33
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DeonNzDescModule, imports: [CommonModule,
|
|
34
|
+
DeonNzFormFieldModule,
|
|
35
|
+
FormlyModule.forChild({
|
|
36
|
+
types: [
|
|
37
|
+
{
|
|
38
|
+
name: 'desc',
|
|
39
|
+
component: DeonNzFieldDesc,
|
|
40
|
+
},
|
|
41
|
+
],
|
|
42
|
+
})] });
|
|
43
|
+
}
|
|
44
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DeonNzDescModule, decorators: [{
|
|
45
|
+
type: NgModule,
|
|
46
|
+
args: [{
|
|
47
|
+
imports: [
|
|
48
|
+
CommonModule,
|
|
49
|
+
DeonNzFormFieldModule,
|
|
50
|
+
FormlyModule.forChild({
|
|
51
|
+
types: [
|
|
52
|
+
{
|
|
53
|
+
name: 'desc',
|
|
54
|
+
component: DeonNzFieldDesc,
|
|
55
|
+
},
|
|
56
|
+
],
|
|
57
|
+
}),
|
|
58
|
+
]
|
|
59
|
+
}]
|
|
60
|
+
}] });
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Generated bundle index. Do not edit.
|
|
64
|
+
*/
|
|
65
|
+
|
|
66
|
+
export { DeonNzDescModule, DeonNzFieldDesc };
|
|
67
|
+
//# sourceMappingURL=type.desc.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type.desc.mjs","sources":["../../../../packages/form/desc/src/desc.type.ts","../../../../packages/form/desc/src/desc.module.ts","../../../../packages/form/desc/type.desc.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FieldType } from '@kre-form/core';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { GramPipeModule } from '@ebuilding/base/shared.pipe';\n\n@Component({\n selector: 'deon-field-nz-desc',\n template: `<div [innerHtml]=\"props?.label | safeHtml\"></div>`,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n CommonModule,\n ReactiveFormsModule,\n GramPipeModule\n ]\n})\nexport class DeonNzFieldDesc extends FieldType { }\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormlyModule } from '@kre-form/core';\nimport { DeonNzFormFieldModule } from '@ebuilding/form/form-field';\n\nimport { DeonNzFieldDesc } from './desc.type';\n\n@NgModule({\n imports: [\n CommonModule,\n DeonNzFormFieldModule,\n FormlyModule.forChild({\n types: [\n {\n name: 'desc',\n component: DeonNzFieldDesc,\n },\n ],\n }),\n ]\n})\nexport class DeonNzDescModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1"],"mappings":";;;;;;;;;;AAgBM,MAAO,eAAgB,SAAQ,SAAS,CAAA;wGAAjC,eAAe,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAf,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,O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