@ebuilding/form 2.1.14 → 2.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/checkbox/src/app.config.d.ts +2 -0
- package/checkbox/src/checkbox.module.d.ts +1 -1
- package/checkbox/src/checkbox.type.d.ts +1 -1
- package/checkbox/src/public_api.d.ts +1 -0
- package/checkboxgroup/src/app.config.d.ts +2 -0
- package/checkboxgroup/src/checkboxgroup.module.d.ts +1 -1
- package/checkboxgroup/src/checkboxgroup.type.d.ts +1 -1
- package/checkboxgroup/src/public_api.d.ts +1 -0
- package/colors/src/app.config.d.ts +2 -0
- package/colors/src/default/index.d.ts +1 -1
- package/colors/src/index.module.d.ts +3 -2
- package/colors/src/public_api.d.ts +1 -0
- package/datetime/src/app.config.d.ts +2 -0
- package/datetime/src/datetime.module.d.ts +1 -1
- package/datetime/src/datetime.type.d.ts +1 -1
- package/datetime/src/public_api.d.ts +1 -0
- package/desc/src/app.config.d.ts +2 -0
- package/desc/src/desc.module.d.ts +1 -1
- package/desc/src/desc.type.d.ts +1 -1
- package/desc/src/public_api.d.ts +1 -0
- package/dim/src/app.config.d.ts +2 -0
- package/dim/src/default/index.d.ts +1 -1
- package/dim/src/dim.module.d.ts +1 -1
- package/dim/src/public_api.d.ts +1 -0
- package/dim-indicator/src/app.config.d.ts +2 -0
- package/dim-indicator/src/assess/index.d.ts +1 -1
- package/dim-indicator/src/default/index.d.ts +1 -1
- package/dim-indicator/src/finish/index.d.ts +1 -1
- package/dim-indicator/src/indicator.module.d.ts +1 -1
- package/dim-indicator/src/public_api.d.ts +1 -0
- package/fesm2022/ebuilding-form.mjs +472 -604
- package/fesm2022/ebuilding-form.mjs.map +1 -1
- package/fesm2022/type.checkbox.mjs +22 -30
- package/fesm2022/type.checkbox.mjs.map +1 -1
- package/fesm2022/type.checkboxgroup.mjs +18 -22
- package/fesm2022/type.checkboxgroup.mjs.map +1 -1
- package/fesm2022/type.colors.mjs +23 -23
- package/fesm2022/type.colors.mjs.map +1 -1
- package/fesm2022/type.datetime.mjs +18 -22
- package/fesm2022/type.datetime.mjs.map +1 -1
- package/fesm2022/type.desc.mjs +16 -19
- package/fesm2022/type.desc.mjs.map +1 -1
- package/fesm2022/type.dim-indicator.mjs +27 -38
- package/fesm2022/type.dim-indicator.mjs.map +1 -1
- package/fesm2022/type.dim.mjs +17 -20
- package/fesm2022/type.dim.mjs.map +1 -1
- package/fesm2022/type.form-field.mjs +17 -20
- package/fesm2022/type.form-field.mjs.map +1 -1
- package/fesm2022/type.grid.mjs +17 -20
- package/fesm2022/type.grid.mjs.map +1 -1
- package/fesm2022/type.group.mjs +21 -28
- package/fesm2022/type.group.mjs.map +1 -1
- package/fesm2022/type.html.mjs +17 -21
- package/fesm2022/type.html.mjs.map +1 -1
- package/fesm2022/type.icon.mjs +17 -21
- package/fesm2022/type.icon.mjs.map +1 -1
- package/fesm2022/type.label.mjs +16 -19
- package/fesm2022/type.label.mjs.map +1 -1
- package/fesm2022/type.line.mjs +16 -19
- package/fesm2022/type.line.mjs.map +1 -1
- package/fesm2022/type.list.mjs +16 -19
- package/fesm2022/type.list.mjs.map +1 -1
- package/fesm2022/type.number.mjs +26 -37
- package/fesm2022/type.number.mjs.map +1 -1
- package/fesm2022/type.overtime.mjs +17 -21
- package/fesm2022/type.overtime.mjs.map +1 -1
- package/fesm2022/type.panel.mjs +17 -20
- package/fesm2022/type.panel.mjs.map +1 -1
- package/fesm2022/type.radio.mjs +18 -22
- package/fesm2022/type.radio.mjs.map +1 -1
- package/fesm2022/type.radiogroup.mjs +17 -21
- package/fesm2022/type.radiogroup.mjs.map +1 -1
- package/fesm2022/type.reform.mjs +17 -20
- package/fesm2022/type.reform.mjs.map +1 -1
- package/fesm2022/type.repeat-card.mjs +17 -20
- package/fesm2022/type.repeat-card.mjs.map +1 -1
- package/fesm2022/type.repeat.mjs +21 -28
- package/fesm2022/type.repeat.mjs.map +1 -1
- package/fesm2022/type.select.mjs +21 -28
- package/fesm2022/type.select.mjs.map +1 -1
- package/fesm2022/type.switch.mjs +18 -22
- package/fesm2022/type.switch.mjs.map +1 -1
- package/fesm2022/type.tabs.mjs +42 -49
- package/fesm2022/type.tabs.mjs.map +1 -1
- package/fesm2022/type.text.mjs +29 -35
- package/fesm2022/type.text.mjs.map +1 -1
- package/fesm2022/type.textarea.mjs +18 -22
- package/fesm2022/type.textarea.mjs.map +1 -1
- package/fesm2022/type.textcode.mjs +18 -22
- package/fesm2022/type.textcode.mjs.map +1 -1
- package/form-field/src/form-field.config.d.ts +2 -0
- package/form-field/src/form-field.module.d.ts +1 -1
- package/form-field/src/form-field.wrapper.d.ts +1 -1
- package/form-field/src/public_api.d.ts +1 -0
- package/grid/src/app.config.d.ts +2 -0
- package/grid/src/grid.module.d.ts +1 -1
- package/grid/src/grid.type.d.ts +1 -1
- package/grid/src/public_api.d.ts +1 -0
- package/group/src/app.config.d.ts +2 -0
- package/group/src/group.module.d.ts +1 -1
- package/group/src/group.type.d.ts +1 -1
- package/group/src/public_api.d.ts +1 -0
- package/html/src/app.config.d.ts +2 -0
- package/html/src/html.module.d.ts +1 -1
- package/html/src/html.type.d.ts +1 -1
- package/html/src/public_api.d.ts +1 -0
- package/icon/src/app.config.d.ts +2 -0
- package/icon/src/default/index.d.ts +1 -1
- package/icon/src/index.module.d.ts +1 -1
- package/icon/src/public_api.d.ts +1 -0
- package/index.d.ts +28 -28
- package/label/src/app.config.d.ts +2 -0
- package/label/src/label.module.d.ts +1 -1
- package/label/src/label.type.d.ts +1 -1
- package/label/src/public_api.d.ts +1 -0
- package/line/src/app.config.d.ts +2 -0
- package/line/src/line.module.d.ts +1 -1
- package/line/src/line.type.d.ts +1 -1
- package/line/src/public_api.d.ts +1 -0
- package/list/src/app.config.d.ts +2 -0
- package/list/src/list.module.d.ts +1 -1
- package/list/src/list.type.d.ts +1 -1
- package/list/src/public_api.d.ts +1 -0
- package/number/src/app.config.d.ts +2 -0
- package/number/src/number.module.d.ts +1 -1
- package/number/src/number.type.d.ts +1 -1
- package/number/src/number_rate.type.d.ts +1 -1
- package/number/src/public_api.d.ts +1 -0
- package/overtime/src/app.config.d.ts +2 -0
- package/overtime/src/default/index.d.ts +1 -1
- package/overtime/src/index.module.d.ts +1 -1
- package/overtime/src/public_api.d.ts +1 -0
- package/package.json +38 -38
- package/panel/src/app.config.d.ts +2 -0
- package/panel/src/panel.module.d.ts +1 -1
- package/panel/src/panel.type.d.ts +1 -1
- package/panel/src/public_api.d.ts +1 -0
- package/radio/src/app.config.d.ts +2 -0
- package/radio/src/public_api.d.ts +1 -0
- package/radio/src/radio.module.d.ts +1 -1
- package/radio/src/radio.type.d.ts +1 -1
- package/radiogroup/src/app.config.d.ts +2 -0
- package/radiogroup/src/public_api.d.ts +1 -0
- package/radiogroup/src/radiogroup.module.d.ts +1 -1
- package/radiogroup/src/radiogroup.type.d.ts +1 -1
- package/reform/src/app.config.d.ts +2 -0
- package/reform/src/public_api.d.ts +1 -0
- package/reform/src/reform.module.d.ts +1 -1
- package/reform/src/reform.type.d.ts +1 -1
- package/repeat/src/app.config.d.ts +2 -0
- package/repeat/src/default/index.d.ts +1 -1
- package/repeat/src/index.module.d.ts +1 -1
- package/repeat/src/public_api.d.ts +1 -0
- package/repeat-card/src/app.config.d.ts +2 -0
- package/repeat-card/src/default/index.d.ts +1 -1
- package/repeat-card/src/index.module.d.ts +1 -1
- package/repeat-card/src/public_api.d.ts +1 -0
- package/select/src/app.config.d.ts +2 -0
- package/select/src/public_api.d.ts +1 -0
- package/select/src/select.module.d.ts +1 -1
- package/select/src/select.type.d.ts +1 -1
- package/switch/src/app.config.d.ts +2 -0
- package/switch/src/default/index.d.ts +1 -1
- package/switch/src/index.module.d.ts +1 -1
- package/switch/src/public_api.d.ts +1 -0
- package/tabs/src/app.config.d.ts +2 -0
- package/tabs/src/default/index.d.ts +1 -1
- package/tabs/src/index.module.d.ts +1 -1
- package/tabs/src/public_api.d.ts +1 -0
- package/tabs/src/tab/index.d.ts +1 -1
- package/text/src/public_api.d.ts +1 -0
- package/text/src/text.config.d.ts +2 -0
- package/text/src/text.module.d.ts +3 -2
- package/text/src/text.type.d.ts +1 -1
- package/text/src/text_ind.type.d.ts +1 -1
- package/textarea/src/app.config.d.ts +2 -0
- package/textarea/src/public_api.d.ts +1 -0
- package/textarea/src/textarea.module.d.ts +1 -1
- package/textarea/src/textarea.type.d.ts +1 -1
- package/textcode/src/app.config.d.ts +2 -0
- package/textcode/src/public_api.d.ts +1 -0
- package/textcode/src/text.module.d.ts +1 -1
- package/textcode/src/text.type.d.ts +1 -1
|
@@ -2,8 +2,8 @@ import * as i0 from '@angular/core';
|
|
|
2
2
|
import { ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
|
|
3
3
|
import * as i1 from '@angular/common';
|
|
4
4
|
import { CommonModule } from '@angular/common';
|
|
5
|
-
import * as i4 from '@
|
|
6
|
-
import { FieldType, FormlyModule } from '@
|
|
5
|
+
import * as i4 from '@ebuilding-form/core';
|
|
6
|
+
import { FieldType, FormlyModule } from '@ebuilding-form/core';
|
|
7
7
|
import { DeonNzFormFieldModule } from '@ebuilding/form/form-field';
|
|
8
8
|
import * as i2 from '@angular/forms';
|
|
9
9
|
import { ReactiveFormsModule } from '@angular/forms';
|
|
@@ -21,7 +21,7 @@ class DeonNzFieldCheckbox extends FieldType {
|
|
|
21
21
|
<label nz-checkbox [formControl]="formControl" [formlyAttributes]="field" [nzDisabled]="editor == false ? true : false">
|
|
22
22
|
<ng-container *ngIf="props?.['hideLabel'] == true && props?.['labelPosition'] == 'right'"> {{ props.label }} </ng-container>
|
|
23
23
|
</label>
|
|
24
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: NzCheckboxModule }, { kind: "component", type: i3.NzCheckboxComponent, selector: "[nz-checkbox]", inputs: ["nzValue", "nzAutoFocus", "nzDisabled", "nzIndeterminate", "nzChecked", "nzId", "nzName"], outputs: ["nzCheckedChange"], exportAs: ["nzCheckbox"] }, { kind: "ngmodule", type: FormlyModule }, { kind: "directive", type: i4
|
|
24
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: NzCheckboxModule }, { kind: "component", type: i3.NzCheckboxComponent, selector: "[nz-checkbox]", inputs: ["nzValue", "nzAutoFocus", "nzDisabled", "nzIndeterminate", "nzChecked", "nzId", "nzName"], outputs: ["nzCheckedChange"], exportAs: ["nzCheckbox"] }, { kind: "ngmodule", type: FormlyModule }, { kind: "directive", type: i4.LegacyFormlyAttributes, selector: "[formlyAttributes]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
25
25
|
}
|
|
26
26
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DeonNzFieldCheckbox, decorators: [{
|
|
27
27
|
type: Component,
|
|
@@ -42,25 +42,29 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
|
|
|
42
42
|
}]
|
|
43
43
|
}] });
|
|
44
44
|
|
|
45
|
+
function withFormlyFieldCheckbox() {
|
|
46
|
+
return {
|
|
47
|
+
types: [
|
|
48
|
+
{
|
|
49
|
+
name: 'checkbox',
|
|
50
|
+
component: DeonNzFieldCheckbox,
|
|
51
|
+
wrappers: ['formly-form-field'],
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
name: 'boolean',
|
|
55
|
+
extends: 'checkbox',
|
|
56
|
+
},
|
|
57
|
+
],
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
|
|
45
61
|
class DeonNzCheckboxModule {
|
|
46
62
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DeonNzCheckboxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
47
63
|
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.15", ngImport: i0, type: DeonNzCheckboxModule, imports: [CommonModule,
|
|
48
64
|
DeonNzFormFieldModule, i4.FormlyModule] });
|
|
49
65
|
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DeonNzCheckboxModule, imports: [CommonModule,
|
|
50
66
|
DeonNzFormFieldModule,
|
|
51
|
-
FormlyModule.forChild(
|
|
52
|
-
types: [
|
|
53
|
-
{
|
|
54
|
-
name: 'checkbox',
|
|
55
|
-
component: DeonNzFieldCheckbox,
|
|
56
|
-
wrappers: ['formly-form-field'],
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
name: 'boolean',
|
|
60
|
-
extends: 'checkbox',
|
|
61
|
-
},
|
|
62
|
-
],
|
|
63
|
-
})] });
|
|
67
|
+
FormlyModule.forChild(withFormlyFieldCheckbox())] });
|
|
64
68
|
}
|
|
65
69
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DeonNzCheckboxModule, decorators: [{
|
|
66
70
|
type: NgModule,
|
|
@@ -68,19 +72,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
|
|
|
68
72
|
imports: [
|
|
69
73
|
CommonModule,
|
|
70
74
|
DeonNzFormFieldModule,
|
|
71
|
-
FormlyModule.forChild(
|
|
72
|
-
types: [
|
|
73
|
-
{
|
|
74
|
-
name: 'checkbox',
|
|
75
|
-
component: DeonNzFieldCheckbox,
|
|
76
|
-
wrappers: ['formly-form-field'],
|
|
77
|
-
},
|
|
78
|
-
{
|
|
79
|
-
name: 'boolean',
|
|
80
|
-
extends: 'checkbox',
|
|
81
|
-
},
|
|
82
|
-
],
|
|
83
|
-
}),
|
|
75
|
+
FormlyModule.forChild(withFormlyFieldCheckbox()),
|
|
84
76
|
],
|
|
85
77
|
}]
|
|
86
78
|
}] });
|
|
@@ -89,5 +81,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
|
|
|
89
81
|
* Generated bundle index. Do not edit.
|
|
90
82
|
*/
|
|
91
83
|
|
|
92
|
-
export { DeonNzCheckboxModule, DeonNzFieldCheckbox };
|
|
84
|
+
export { DeonNzCheckboxModule, DeonNzFieldCheckbox, withFormlyFieldCheckbox };
|
|
93
85
|
//# sourceMappingURL=type.checkbox.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"type.checkbox.mjs","sources":["../../../../packages/form/checkbox/src/checkbox.type.ts","../../../../packages/form/checkbox/src/checkbox.module.ts","../../../../packages/form/checkbox/type.checkbox.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { NzCheckboxModule } from 'ng-zorro-antd/checkbox';\n\nimport { FormlyModule, FieldType, FieldTypeConfig } from '@
|
|
1
|
+
{"version":3,"file":"type.checkbox.mjs","sources":["../../../../packages/form/checkbox/src/checkbox.type.ts","../../../../packages/form/checkbox/src/app.config.ts","../../../../packages/form/checkbox/src/checkbox.module.ts","../../../../packages/form/checkbox/type.checkbox.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { NzCheckboxModule } from 'ng-zorro-antd/checkbox';\n\nimport { FormlyModule, FieldType, FieldTypeConfig } from '@ebuilding-form/core';\n\n@Component({\n selector: 'deon-nz-field-checkbox',\n template: `\n <label nz-checkbox [formControl]=\"formControl\" [formlyAttributes]=\"field\" [nzDisabled]=\"editor == false ? true : false\">\n <ng-container *ngIf=\"props?.['hideLabel'] == true && props?.['labelPosition'] == 'right'\"> {{ props.label }} </ng-container>\n </label>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n CommonModule,\n ReactiveFormsModule,\n NzCheckboxModule,\n FormlyModule\n ]\n})\nexport class DeonNzFieldCheckbox extends FieldType<FieldTypeConfig> {\n override defaultOptions = {\n props: {\n indeterminate: true,\n },\n };\n}\n","import { ConfigOption } from '@ebuilding-form/core';\nimport { DeonNzFieldCheckbox } from './checkbox.type';\n\nexport function withFormlyFieldCheckbox(): ConfigOption {\n return {\n types: [\n {\n name: 'checkbox',\n component: DeonNzFieldCheckbox,\n wrappers: ['formly-form-field'],\n },\n {\n name: 'boolean',\n extends: 'checkbox',\n },\n ],\n };\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormlyModule } from '@ebuilding-form/core';\nimport { DeonNzFormFieldModule } from '@ebuilding/form/form-field';\nimport { withFormlyFieldCheckbox } from './app.config';\n\n@NgModule({\n imports: [\n CommonModule,\n DeonNzFormFieldModule,\n FormlyModule.forChild(withFormlyFieldCheckbox()),\n ],\n})\nexport class DeonNzCheckboxModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;AAsBM,MAAO,mBAAoB,SAAQ,SAA0B,CAAA;AACxD,IAAA,cAAc,GAAG;AACxB,QAAA,KAAK,EAAE;AACL,YAAA,aAAa,EAAE,IAAI;AACpB,SAAA;KACF;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BAAoB,EAAA,UAAA,EAAA,CAAA;kBAPhC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,qBAAqB;AACrB,wBAAA,YAAY,CAAC,QAAQ,CAAC,uBAAuB,EAAE,CAAC;AACjD,qBAAA;AACF,iBAAA;;;ACZD;;AAEG;;;;"}
|
|
@@ -2,8 +2,8 @@ import * as i0 from '@angular/core';
|
|
|
2
2
|
import { ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
|
|
3
3
|
import * as i1 from '@angular/common';
|
|
4
4
|
import { CommonModule } from '@angular/common';
|
|
5
|
-
import * as i2 from '@
|
|
6
|
-
import { FieldType, FormlyModule } from '@
|
|
5
|
+
import * as i2 from '@ebuilding-form/core';
|
|
6
|
+
import { FieldType, FormlyModule } from '@ebuilding-form/core';
|
|
7
7
|
import { DeonNzFormFieldModule } from '@ebuilding/form/form-field';
|
|
8
8
|
import { ReactiveFormsModule } from '@angular/forms';
|
|
9
9
|
import { NzCheckboxModule } from 'ng-zorro-antd/checkbox';
|
|
@@ -75,7 +75,7 @@ class DeonNzFieldCheckboxGroup extends FieldType {
|
|
|
75
75
|
</label>
|
|
76
76
|
</div>
|
|
77
77
|
</div>
|
|
78
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: NzCheckboxModule }, { kind: "ngmodule", type: FormlyModule }, { kind: "directive", type: i2
|
|
78
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: NzCheckboxModule }, { kind: "ngmodule", type: FormlyModule }, { kind: "directive", type: i2.LegacyFormlyAttributes, selector: "[formlyAttributes]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
79
79
|
}
|
|
80
80
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DeonNzFieldCheckboxGroup, decorators: [{
|
|
81
81
|
type: Component,
|
|
@@ -125,21 +125,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
|
|
|
125
125
|
}]
|
|
126
126
|
}], ctorParameters: () => [] });
|
|
127
127
|
|
|
128
|
+
function withFormlyFieldCheckboxGroup() {
|
|
129
|
+
return {
|
|
130
|
+
types: [
|
|
131
|
+
{
|
|
132
|
+
name: 'checkboxgroup',
|
|
133
|
+
component: DeonNzFieldCheckboxGroup,
|
|
134
|
+
wrappers: ['formly-form-field'],
|
|
135
|
+
}
|
|
136
|
+
],
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
|
|
128
140
|
class DeonNzCheckboxGroupModule {
|
|
129
141
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DeonNzCheckboxGroupModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
130
142
|
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.15", ngImport: i0, type: DeonNzCheckboxGroupModule, imports: [CommonModule,
|
|
131
143
|
DeonNzFormFieldModule, i2.FormlyModule] });
|
|
132
144
|
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DeonNzCheckboxGroupModule, imports: [CommonModule,
|
|
133
145
|
DeonNzFormFieldModule,
|
|
134
|
-
FormlyModule.forChild(
|
|
135
|
-
types: [
|
|
136
|
-
{
|
|
137
|
-
name: 'checkboxgroup',
|
|
138
|
-
component: DeonNzFieldCheckboxGroup,
|
|
139
|
-
wrappers: ['formly-form-field'],
|
|
140
|
-
},
|
|
141
|
-
],
|
|
142
|
-
})] });
|
|
146
|
+
FormlyModule.forChild(withFormlyFieldCheckboxGroup())] });
|
|
143
147
|
}
|
|
144
148
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DeonNzCheckboxGroupModule, decorators: [{
|
|
145
149
|
type: NgModule,
|
|
@@ -147,15 +151,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
|
|
|
147
151
|
imports: [
|
|
148
152
|
CommonModule,
|
|
149
153
|
DeonNzFormFieldModule,
|
|
150
|
-
FormlyModule.forChild(
|
|
151
|
-
types: [
|
|
152
|
-
{
|
|
153
|
-
name: 'checkboxgroup',
|
|
154
|
-
component: DeonNzFieldCheckboxGroup,
|
|
155
|
-
wrappers: ['formly-form-field'],
|
|
156
|
-
},
|
|
157
|
-
],
|
|
158
|
-
}),
|
|
154
|
+
FormlyModule.forChild(withFormlyFieldCheckboxGroup()),
|
|
159
155
|
],
|
|
160
156
|
}]
|
|
161
157
|
}] });
|
|
@@ -164,5 +160,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
|
|
|
164
160
|
* Generated bundle index. Do not edit.
|
|
165
161
|
*/
|
|
166
162
|
|
|
167
|
-
export { DeonNzCheckboxGroupModule, DeonNzFieldCheckboxGroup };
|
|
163
|
+
export { DeonNzCheckboxGroupModule, DeonNzFieldCheckboxGroup, withFormlyFieldCheckboxGroup };
|
|
168
164
|
//# sourceMappingURL=type.checkboxgroup.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"type.checkboxgroup.mjs","sources":["../../../../packages/form/checkboxgroup/src/checkboxgroup.type.ts","../../../../packages/form/checkboxgroup/src/checkboxgroup.module.ts","../../../../packages/form/checkboxgroup/type.checkboxgroup.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy, OnInit } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { NzCheckboxModule } from 'ng-zorro-antd/checkbox';\nimport { FormlyModule, FieldType, FieldTypeConfig } from '@
|
|
1
|
+
{"version":3,"file":"type.checkboxgroup.mjs","sources":["../../../../packages/form/checkboxgroup/src/checkboxgroup.type.ts","../../../../packages/form/checkboxgroup/src/app.config.ts","../../../../packages/form/checkboxgroup/src/checkboxgroup.module.ts","../../../../packages/form/checkboxgroup/type.checkboxgroup.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy, OnInit } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { NzCheckboxModule } from 'ng-zorro-antd/checkbox';\nimport { FormlyModule, FieldType, FieldTypeConfig } from '@ebuilding-form/core';\nimport { Observable, of } from 'rxjs';\n\n@Component({\n selector: 'deon-nz-field-checkboxgroup',\n template: `\n <div>\n <!-- 使用 async 管道时,确保 props?.options 是 Observable 类型 -->\n <div\n *ngFor=\"let option of (options$ | async); let i = index\"\n [ngClass]=\"{\n 'form-check': props?.['formCheck']?.indexOf('custom') === -1,\n 'form-check-inline': props?.['formCheck'] === 'inline',\n 'custom-control': props?.['formCheck']?.indexOf('custom') === 0,\n 'custom-checkbox': props?.['formCheck'] === 'custom' || props?.['formCheck'] === 'custom-inline',\n 'custom-control-inline': props?.['formCheck'] === 'custom-inline',\n 'custom-switch': props?.['formCheck'] === 'custom-switch'\n }\"\n >\n <input\n type=\"checkbox\"\n [id]=\"id + '_' + i\"\n [class.form-check-input]=\"props?.['formCheck']?.indexOf('custom') === -1\"\n [class.custom-control-input]=\"props?.['formCheck']?.indexOf('custom') === 0\"\n [value]=\"option.value\"\n [checked]=\"isChecked(option)\"\n [formlyAttributes]=\"field\"\n (change)=\"onChange(option.value, $event.target?.['checked'] ?? false)\"\n />\n <label\n [class.form-check-label]=\"props?.['formCheck']?.indexOf('custom') === -1\"\n [class.custom-control-label]=\"props?.['formCheck']?.indexOf('custom') === 0\"\n [for]=\"id + '_' + i\"\n >\n {{ option.label }}\n </label>\n </div>\n </div>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n CommonModule,\n ReactiveFormsModule,\n NzCheckboxModule,\n FormlyModule\n ]\n})\nexport class DeonNzFieldCheckboxGroup extends FieldType<FieldTypeConfig> implements OnInit {\n override defaultOptions = {\n props: {\n options: [], // 默认值为空数组\n formCheck: 'custom', // 默认的 formCheck 样式\n },\n };\n\n // 将 options$ 定义为 Observable<any[]> 类型\n options$: Observable<any[]>;\n\n constructor() {\n super();\n }\n\n ngOnInit() {\n const opts = this.props?.options;\n this.options$ = Array.isArray(opts) ? of(opts) : opts ?? of([]);\n }\n\n onChange(value: any, checked: boolean) {\n if (this.props.type === 'array') {\n this.formControl.patchValue(\n checked ? [...(this.formControl.value || []), value] : [...(this.formControl.value || [])].filter((o) => o !== value),\n );\n } else {\n this.formControl.patchValue({\n ...this.formControl.value,\n [value]: checked,\n });\n }\n this.formControl.markAsTouched();\n }\n\n isChecked(option: any) {\n const value = this.formControl.value;\n\n return value && (this.props.type === 'array' ? value.indexOf(option.value) !== -1 : value[option.value]);\n }\n}\n","import { ConfigOption } from '@ebuilding-form/core';\nimport { DeonNzFieldCheckboxGroup } from './checkboxgroup.type';\n\nexport function withFormlyFieldCheckboxGroup(): ConfigOption {\n return {\n types: [\n {\n name: 'checkboxgroup',\n component: DeonNzFieldCheckboxGroup,\n wrappers: ['formly-form-field'],\n }\n ],\n };\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormlyModule } from '@ebuilding-form/core';\nimport { DeonNzFormFieldModule } from '@ebuilding/form/form-field';\nimport { withFormlyFieldCheckboxGroup } from './app.config';\n\n@NgModule({\n imports: [\n CommonModule,\n DeonNzFormFieldModule,\n FormlyModule.forChild(withFormlyFieldCheckboxGroup()),\n ],\n})\nexport class DeonNzCheckboxGroupModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1"],"mappings":";;;;;;;;;;;AAmDM,MAAO,wBAAyB,SAAQ,SAA0B,CAAA;AAC7D,IAAA,cAAc,GAAG;AACxB,QAAA,KAAK,EAAE;YACL,OAAO,EAAE,EAAE;YACX,SAAS,EAAE,QAAQ;AACpB,SAAA;KACF;;AAGD,IAAA,QAAQ;AAER,IAAA,WAAA,GAAA;AACE,QAAA,KAAK,EAAE;;IAGT,QAAQ,GAAA;AACN,QAAA,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,EAAE,OAAO;QAChC,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,GAAG,IAAI,IAAI,EAAE,CAAC,EAAE,CAAC;;IAGjE,QAAQ,CAAC,KAAU,EAAE,OAAgB,EAAA;QACnC,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,KAAK,OAAO,EAAE;YAC/B,IAAI,CAAC,WAAW,CAAC,UAAU,CACzB,OAAO,GAAG,CAAC,IAAI,IAAI,CAAC,WAAW,CAAC,KAAK,IAAI,EAAE,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC,WAAW,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,KAAK,CAAC,CACtH;;aACI;AACL,YAAA,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC;AAC1B,gBAAA,GAAG,IAAI,CAAC,WAAW,CAAC,KAAK;gBACzB,CAAC,KAAK,GAAG,OAAO;AACjB,aAAA,CAAC;;AAEJ,QAAA,IAAI,CAAC,WAAW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CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,yBAAyB,YALlC,YAAY;YACZ,qBAAqB;AACrB,YAAA,YAAY,CAAC,QAAQ,CAAC,4BAA4B,EAAE,CAAC,CAAA,EAAA,CAAA;;4FAG5C,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBAPrC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,qBAAqB;AACrB,wBAAA,YAAY,CAAC,QAAQ,CAAC,4BAA4B,EAAE,CAAC;AACtD,qBAAA;AACF,iBAAA;;;ACZD;;AAEG;;;;"}
|
package/fesm2022/type.colors.mjs
CHANGED
|
@@ -2,8 +2,9 @@ import * as i0 from '@angular/core';
|
|
|
2
2
|
import { ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
|
|
3
3
|
import * as i1 from '@angular/common';
|
|
4
4
|
import { CommonModule } from '@angular/common';
|
|
5
|
-
import * as i4 from '@
|
|
6
|
-
import { FieldType, FormlyModule } from '@
|
|
5
|
+
import * as i4 from '@ebuilding-form/core';
|
|
6
|
+
import { FieldType, FormlyModule } from '@ebuilding-form/core';
|
|
7
|
+
import { DeonNzFormFieldModule } from '@ebuilding/form/form-field';
|
|
7
8
|
import * as i2 from '@angular/forms';
|
|
8
9
|
import { ReactiveFormsModule } from '@angular/forms';
|
|
9
10
|
import * as i3 from 'ng-zorro-antd/input';
|
|
@@ -22,7 +23,7 @@ class DeonNzFieldColor extends FieldType {
|
|
|
22
23
|
return '';
|
|
23
24
|
}
|
|
24
25
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DeonNzFieldColor, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
25
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: DeonNzFieldColor, isStandalone: true, selector: "deon-nz-field-color", usesInheritance: true, ngImport: i0, template: "<div class=\"field-color deon-color deon-color-default\" *ngIf=\"editor == false; else tmpField\">\n <div class=\"color-control\">\n <div [style.background]=\"text\"></div>\n </div>\n</div>\n<ng-template #tmpField>\n <input nz-input [formControl]=\"formControl\" [type]=\"'color'\" [formlyAttributes]=\"field\" />\n</ng-template>", styles: [":host ::ng-deep .color-control{height:32px;border:1px solid #eaeaea;width:60px;background-color:#fff;padding:8px 13px}:host ::ng-deep .color-control div{width:100%;height:15px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: NzInputModule }, { kind: "directive", type: i3.NzInputDirective, selector: "input[nz-input],textarea[nz-input]", inputs: ["nzBorderless", "nzSize", "nzStepperless", "nzStatus", "disabled"], exportAs: ["nzInput"] }, { kind: "ngmodule", type: FormlyModule }, { kind: "directive", type: i4
|
|
26
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: DeonNzFieldColor, isStandalone: true, selector: "deon-nz-field-color", usesInheritance: true, ngImport: i0, template: "<div class=\"field-color deon-color deon-color-default\" *ngIf=\"editor == false; else tmpField\">\n <div class=\"color-control\">\n <div [style.background]=\"text\"></div>\n </div>\n</div>\n<ng-template #tmpField>\n <input nz-input [formControl]=\"formControl\" [type]=\"'color'\" [formlyAttributes]=\"field\" />\n</ng-template>", styles: [":host ::ng-deep .color-control{height:32px;border:1px solid #eaeaea;width:60px;background-color:#fff;padding:8px 13px}:host ::ng-deep .color-control div{width:100%;height:15px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: NzInputModule }, { kind: "directive", type: i3.NzInputDirective, selector: "input[nz-input],textarea[nz-input]", inputs: ["nzBorderless", "nzSize", "nzStepperless", "nzStatus", "disabled"], exportAs: ["nzInput"] }, { kind: "ngmodule", type: FormlyModule }, { kind: "directive", type: i4.LegacyFormlyAttributes, selector: "[formlyAttributes]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
26
27
|
}
|
|
27
28
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DeonNzFieldColor, decorators: [{
|
|
28
29
|
type: Component,
|
|
@@ -34,34 +35,33 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
|
|
|
34
35
|
], template: "<div class=\"field-color deon-color deon-color-default\" *ngIf=\"editor == false; else tmpField\">\n <div class=\"color-control\">\n <div [style.background]=\"text\"></div>\n </div>\n</div>\n<ng-template #tmpField>\n <input nz-input [formControl]=\"formControl\" [type]=\"'color'\" [formlyAttributes]=\"field\" />\n</ng-template>", styles: [":host ::ng-deep .color-control{height:32px;border:1px solid #eaeaea;width:60px;background-color:#fff;padding:8px 13px}:host ::ng-deep .color-control div{width:100%;height:15px}\n"] }]
|
|
35
36
|
}] });
|
|
36
37
|
|
|
38
|
+
function withFormlyFieldColor() {
|
|
39
|
+
return {
|
|
40
|
+
types: [
|
|
41
|
+
{
|
|
42
|
+
name: 'color',
|
|
43
|
+
component: DeonNzFieldColor,
|
|
44
|
+
wrappers: ['formly-form-field'],
|
|
45
|
+
}
|
|
46
|
+
],
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
|
|
37
50
|
class DeonNzColorModule {
|
|
38
51
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DeonNzColorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
39
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.15", ngImport: i0, type: DeonNzColorModule, imports: [CommonModule,
|
|
52
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.15", ngImport: i0, type: DeonNzColorModule, imports: [CommonModule,
|
|
53
|
+
DeonNzFormFieldModule, i4.FormlyModule] });
|
|
40
54
|
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DeonNzColorModule, imports: [CommonModule,
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
{
|
|
44
|
-
name: 'color',
|
|
45
|
-
component: DeonNzFieldColor,
|
|
46
|
-
wrappers: ['formly-form-field'],
|
|
47
|
-
},
|
|
48
|
-
],
|
|
49
|
-
})] });
|
|
55
|
+
DeonNzFormFieldModule,
|
|
56
|
+
FormlyModule.forChild(withFormlyFieldColor())] });
|
|
50
57
|
}
|
|
51
58
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DeonNzColorModule, decorators: [{
|
|
52
59
|
type: NgModule,
|
|
53
60
|
args: [{
|
|
54
61
|
imports: [
|
|
55
62
|
CommonModule,
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
{
|
|
59
|
-
name: 'color',
|
|
60
|
-
component: DeonNzFieldColor,
|
|
61
|
-
wrappers: ['formly-form-field'],
|
|
62
|
-
},
|
|
63
|
-
],
|
|
64
|
-
}),
|
|
63
|
+
DeonNzFormFieldModule,
|
|
64
|
+
FormlyModule.forChild(withFormlyFieldColor()),
|
|
65
65
|
],
|
|
66
66
|
}]
|
|
67
67
|
}] });
|
|
@@ -70,5 +70,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
|
|
|
70
70
|
* Generated bundle index. Do not edit.
|
|
71
71
|
*/
|
|
72
72
|
|
|
73
|
-
export { DeonNzColorModule, DeonNzFieldColor };
|
|
73
|
+
export { DeonNzColorModule, DeonNzFieldColor, withFormlyFieldColor };
|
|
74
74
|
//# sourceMappingURL=type.colors.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"type.colors.mjs","sources":["../../../../packages/form/colors/src/default/index.ts","../../../../packages/form/colors/src/default/index.html","../../../../packages/form/colors/src/index.module.ts","../../../../packages/form/colors/type.colors.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { NzInputModule } from 'ng-zorro-antd/input';\n\nimport { FormlyModule, FieldType, FieldTypeConfig } from '@
|
|
1
|
+
{"version":3,"file":"type.colors.mjs","sources":["../../../../packages/form/colors/src/default/index.ts","../../../../packages/form/colors/src/default/index.html","../../../../packages/form/colors/src/app.config.ts","../../../../packages/form/colors/src/index.module.ts","../../../../packages/form/colors/type.colors.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { NzInputModule } from 'ng-zorro-antd/input';\n\nimport { FormlyModule, FieldType, FieldTypeConfig } from '@ebuilding-form/core';\nimport _ from 'lodash';\n\n@Component({\n selector: 'deon-nz-field-color',\n templateUrl: './index.html',\n styleUrls: ['./index.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n CommonModule,\n ReactiveFormsModule,\n NzInputModule,\n FormlyModule\n ]\n})\nexport class DeonNzFieldColor extends FieldType<FieldTypeConfig> {\n override defaultOptions = {\n props: {},\n defaultValue: '#262626',\n };\n override get text() {\n if (this.model!! && this.model.hasOwnProperty(this.field.key)) {\n let key: any = this.field?.key;\n return this.model?.[key];\n }\n return '';\n }\n}\n","<div class=\"field-color deon-color deon-color-default\" *ngIf=\"editor == false; else tmpField\">\n <div class=\"color-control\">\n <div [style.background]=\"text\"></div>\n </div>\n</div>\n<ng-template #tmpField>\n <input nz-input [formControl]=\"formControl\" [type]=\"'color'\" [formlyAttributes]=\"field\" />\n</ng-template>","import { ConfigOption } from '@ebuilding-form/core';\nimport { DeonNzFieldColor } from './default';\n\nexport function withFormlyFieldColor(): ConfigOption {\n return {\n types: [\n {\n name: 'color',\n component: DeonNzFieldColor,\n wrappers: ['formly-form-field'],\n }\n ],\n };\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormlyModule } from '@ebuilding-form/core';\nimport { DeonNzFormFieldModule } from '@ebuilding/form/form-field';\nimport { withFormlyFieldColor } from './app.config';\n\n@NgModule({\n imports: [\n CommonModule,\n DeonNzFormFieldModule,\n FormlyModule.forChild(withFormlyFieldColor()),\n ],\n})\nexport class DeonNzColorModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;AAoBM,MAAO,gBAAiB,SAAQ,SAA0B,CAAA;AACrD,IAAA,cAAc,GAAG;AACxB,QAAA,KAAK,EAAE,EAAE;AACT,QAAA,YAAY,EAAE,SAAS;KACxB;AACD,IAAA,IAAa,IAAI,GAAA;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AAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,YAL1B,YAAY;YACZ,qBAAqB;AACrB,YAAA,YAAY,CAAC,QAAQ,CAAC,oBAAoB,EAAE,CAAC,CAAA,EAAA,CAAA;;4FAGpC,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAP7B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,qBAAqB;AACrB,wBAAA,YAAY,CAAC,QAAQ,CAAC,oBAAoB,EAAE,CAAC;AAC9C,qBAAA;AACF,iBAAA;;;ACZD;;AAEG;;;;"}
|
|
@@ -2,8 +2,8 @@ import * as i0 from '@angular/core';
|
|
|
2
2
|
import { ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
|
|
3
3
|
import * as i2 from '@angular/common';
|
|
4
4
|
import { CommonModule } from '@angular/common';
|
|
5
|
-
import * as i6 from '@
|
|
6
|
-
import { FieldType, FormlyModule } from '@
|
|
5
|
+
import * as i6 from '@ebuilding-form/core';
|
|
6
|
+
import { FieldType, FormlyModule } from '@ebuilding-form/core';
|
|
7
7
|
import { DeonNzFormFieldModule } from '@ebuilding/form/form-field';
|
|
8
8
|
import * as i3 from '@angular/forms';
|
|
9
9
|
import { ReactiveFormsModule } from '@angular/forms';
|
|
@@ -180,7 +180,7 @@ class DeonNzFieldDatetime extends FieldType {
|
|
|
180
180
|
<ng-container *ngSwitchDefault></ng-container>
|
|
181
181
|
</ng-container>
|
|
182
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
|
|
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.LegacyFormlyAttributes, selector: "[formlyAttributes]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
184
184
|
}
|
|
185
185
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DeonNzFieldDatetime, decorators: [{
|
|
186
186
|
type: Component,
|
|
@@ -269,21 +269,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
|
|
|
269
269
|
}]
|
|
270
270
|
}], ctorParameters: () => [{ type: i1.NzI18nService }] });
|
|
271
271
|
|
|
272
|
+
function withFormlyFieldDateTime() {
|
|
273
|
+
return {
|
|
274
|
+
types: [
|
|
275
|
+
{
|
|
276
|
+
name: 'datetime',
|
|
277
|
+
component: DeonNzFieldDatetime,
|
|
278
|
+
wrappers: ['formly-form-field'],
|
|
279
|
+
}
|
|
280
|
+
],
|
|
281
|
+
};
|
|
282
|
+
}
|
|
283
|
+
|
|
272
284
|
class DeonNzDateTimeModule {
|
|
273
285
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DeonNzDateTimeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
274
286
|
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.15", ngImport: i0, type: DeonNzDateTimeModule, imports: [CommonModule,
|
|
275
287
|
DeonNzFormFieldModule, i6.FormlyModule] });
|
|
276
288
|
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DeonNzDateTimeModule, imports: [CommonModule,
|
|
277
289
|
DeonNzFormFieldModule,
|
|
278
|
-
FormlyModule.forChild(
|
|
279
|
-
types: [
|
|
280
|
-
{
|
|
281
|
-
name: 'datetime',
|
|
282
|
-
component: DeonNzFieldDatetime,
|
|
283
|
-
wrappers: ['formly-form-field'],
|
|
284
|
-
},
|
|
285
|
-
],
|
|
286
|
-
})] });
|
|
290
|
+
FormlyModule.forChild(withFormlyFieldDateTime())] });
|
|
287
291
|
}
|
|
288
292
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DeonNzDateTimeModule, decorators: [{
|
|
289
293
|
type: NgModule,
|
|
@@ -291,15 +295,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
|
|
|
291
295
|
imports: [
|
|
292
296
|
CommonModule,
|
|
293
297
|
DeonNzFormFieldModule,
|
|
294
|
-
FormlyModule.forChild(
|
|
295
|
-
types: [
|
|
296
|
-
{
|
|
297
|
-
name: 'datetime',
|
|
298
|
-
component: DeonNzFieldDatetime,
|
|
299
|
-
wrappers: ['formly-form-field'],
|
|
300
|
-
},
|
|
301
|
-
],
|
|
302
|
-
}),
|
|
298
|
+
FormlyModule.forChild(withFormlyFieldDateTime()),
|
|
303
299
|
],
|
|
304
300
|
}]
|
|
305
301
|
}] });
|
|
@@ -308,5 +304,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
|
|
|
308
304
|
* Generated bundle index. Do not edit.
|
|
309
305
|
*/
|
|
310
306
|
|
|
311
|
-
export { DeonNzDateTimeModule, DeonNzFieldDatetime };
|
|
307
|
+
export { DeonNzDateTimeModule, DeonNzFieldDatetime, withFormlyFieldDateTime };
|
|
312
308
|
//# sourceMappingURL=type.datetime.mjs.map
|
|
@@ -1 +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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,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,qBAAqB;wBACrB,YAAY,CAAC,QAAQ,CAAC;AACpB,4BAAA,KAAK,EAAE;AACL,gCAAA;AACE,oCAAA,IAAI,EAAE,UAAU;AAChB,oCAAA,SAAS,EAAE,mBAAmB;oCAC9B,QAAQ,EAAE,CAAC,mBAAmB,CAAC;AAChC,iCAAA;AACF,6BAAA;yBACF,CAAC;AACH,qBAAA;AACF,iBAAA;;;ACrBD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"type.datetime.mjs","sources":["../../../../packages/form/datetime/src/datetime.type.ts","../../../../packages/form/datetime/src/app.config.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 '@ebuilding-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 { ConfigOption } from '@ebuilding-form/core';\nimport { DeonNzFieldDatetime } from './datetime.type';\n\nexport function withFormlyFieldDateTime(): ConfigOption {\n return {\n types: [\n {\n name: 'datetime',\n component: DeonNzFieldDatetime,\n wrappers: ['formly-form-field'],\n }\n ],\n };\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormlyModule } from '@ebuilding-form/core';\nimport { DeonNzFormFieldModule } from '@ebuilding/form/form-field';\nimport { withFormlyFieldDateTime } from './app.config';\n\n@NgModule({\n imports: [\n CommonModule,\n DeonNzFormFieldModule,\n FormlyModule.forChild(withFormlyFieldDateTime()),\n ],\n})\nex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AAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,oBAAoB,YAL7B,YAAY;YACZ,qBAAqB;AACrB,YAAA,YAAY,CAAC,QAAQ,CAAC,uBAAuB,EAAE,CAAC,CAAA,EAAA,CAAA;;4FAGvC,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAPhC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,qBAAqB;AACrB,wBAAA,YAAY,CAAC,QAAQ,CAAC,uBAAuB,EAAE,CAAC;AACjD,qBAAA;AACF,iBAAA;;;ACZD;;AAEG;;;;"}
|
package/fesm2022/type.desc.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
|
|
3
3
|
import { CommonModule } from '@angular/common';
|
|
4
|
-
import * as i1$1 from '@
|
|
5
|
-
import { FieldType, FormlyModule } from '@
|
|
4
|
+
import * as i1$1 from '@ebuilding-form/core';
|
|
5
|
+
import { FieldType, FormlyModule } from '@ebuilding-form/core';
|
|
6
6
|
import { DeonNzFormFieldModule } from '@ebuilding/form/form-field';
|
|
7
7
|
import { ReactiveFormsModule } from '@angular/forms';
|
|
8
8
|
import * as i1 from '@ebuilding/base/shared.pipe';
|
|
@@ -26,20 +26,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
|
|
|
26
26
|
}]
|
|
27
27
|
}] });
|
|
28
28
|
|
|
29
|
+
function withFormlyFieldDesc() {
|
|
30
|
+
return {
|
|
31
|
+
types: [
|
|
32
|
+
{
|
|
33
|
+
name: 'desc',
|
|
34
|
+
component: DeonNzFieldDesc,
|
|
35
|
+
}
|
|
36
|
+
],
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
|
|
29
40
|
class DeonNzDescModule {
|
|
30
41
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DeonNzDescModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
31
42
|
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.15", ngImport: i0, type: DeonNzDescModule, imports: [CommonModule,
|
|
32
43
|
DeonNzFormFieldModule, i1$1.FormlyModule] });
|
|
33
44
|
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DeonNzDescModule, imports: [CommonModule,
|
|
34
45
|
DeonNzFormFieldModule,
|
|
35
|
-
FormlyModule.forChild(
|
|
36
|
-
types: [
|
|
37
|
-
{
|
|
38
|
-
name: 'desc',
|
|
39
|
-
component: DeonNzFieldDesc,
|
|
40
|
-
},
|
|
41
|
-
],
|
|
42
|
-
})] });
|
|
46
|
+
FormlyModule.forChild(withFormlyFieldDesc())] });
|
|
43
47
|
}
|
|
44
48
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DeonNzDescModule, decorators: [{
|
|
45
49
|
type: NgModule,
|
|
@@ -47,14 +51,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
|
|
|
47
51
|
imports: [
|
|
48
52
|
CommonModule,
|
|
49
53
|
DeonNzFormFieldModule,
|
|
50
|
-
FormlyModule.forChild(
|
|
51
|
-
types: [
|
|
52
|
-
{
|
|
53
|
-
name: 'desc',
|
|
54
|
-
component: DeonNzFieldDesc,
|
|
55
|
-
},
|
|
56
|
-
],
|
|
57
|
-
}),
|
|
54
|
+
FormlyModule.forChild(withFormlyFieldDesc()),
|
|
58
55
|
]
|
|
59
56
|
}]
|
|
60
57
|
}] });
|
|
@@ -63,5 +60,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
|
|
|
63
60
|
* Generated bundle index. Do not edit.
|
|
64
61
|
*/
|
|
65
62
|
|
|
66
|
-
export { DeonNzDescModule, DeonNzFieldDesc };
|
|
63
|
+
export { DeonNzDescModule, DeonNzFieldDesc, withFormlyFieldDesc };
|
|
67
64
|
//# sourceMappingURL=type.desc.mjs.map
|