@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
package/fesm2022/type.label.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 from '@
|
|
5
|
-
import { FieldType, FormlyModule } from '@
|
|
4
|
+
import * as i1 from '@ebuilding-form/core';
|
|
5
|
+
import { FieldType, FormlyModule } from '@ebuilding-form/core';
|
|
6
6
|
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
7
7
|
import { DeonNzFormFieldModule } from '@ebuilding/form/form-field';
|
|
8
8
|
|
|
@@ -27,6 +27,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
|
|
|
27
27
|
}]
|
|
28
28
|
}] });
|
|
29
29
|
|
|
30
|
+
function withFormlyFieldLabel() {
|
|
31
|
+
return {
|
|
32
|
+
types: [
|
|
33
|
+
{
|
|
34
|
+
name: 'label',
|
|
35
|
+
component: DeonNzFieldLabel,
|
|
36
|
+
}
|
|
37
|
+
],
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
|
|
30
41
|
class DeonNzLabelModule {
|
|
31
42
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DeonNzLabelModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
32
43
|
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.15", ngImport: i0, type: DeonNzLabelModule, imports: [CommonModule,
|
|
@@ -35,14 +46,7 @@ class DeonNzLabelModule {
|
|
|
35
46
|
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DeonNzLabelModule, imports: [CommonModule,
|
|
36
47
|
ReactiveFormsModule,
|
|
37
48
|
DeonNzFormFieldModule,
|
|
38
|
-
FormlyModule.forChild(
|
|
39
|
-
types: [
|
|
40
|
-
{
|
|
41
|
-
name: 'label',
|
|
42
|
-
component: DeonNzFieldLabel,
|
|
43
|
-
},
|
|
44
|
-
],
|
|
45
|
-
})] });
|
|
49
|
+
FormlyModule.forChild(withFormlyFieldLabel())] });
|
|
46
50
|
}
|
|
47
51
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DeonNzLabelModule, decorators: [{
|
|
48
52
|
type: NgModule,
|
|
@@ -51,14 +55,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
|
|
|
51
55
|
CommonModule,
|
|
52
56
|
ReactiveFormsModule,
|
|
53
57
|
DeonNzFormFieldModule,
|
|
54
|
-
FormlyModule.forChild(
|
|
55
|
-
types: [
|
|
56
|
-
{
|
|
57
|
-
name: 'label',
|
|
58
|
-
component: DeonNzFieldLabel,
|
|
59
|
-
},
|
|
60
|
-
],
|
|
61
|
-
}),
|
|
58
|
+
FormlyModule.forChild(withFormlyFieldLabel()),
|
|
62
59
|
],
|
|
63
60
|
}]
|
|
64
61
|
}] });
|
|
@@ -67,5 +64,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
|
|
|
67
64
|
* Generated bundle index. Do not edit.
|
|
68
65
|
*/
|
|
69
66
|
|
|
70
|
-
export { DeonNzFieldLabel, DeonNzLabelModule };
|
|
67
|
+
export { DeonNzFieldLabel, DeonNzLabelModule, withFormlyFieldLabel };
|
|
71
68
|
//# sourceMappingURL=type.label.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"type.label.mjs","sources":["../../../../packages/form/label/src/label.type.ts","../../../../packages/form/label/src/label.module.ts","../../../../packages/form/label/type.label.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { FieldType } from '@
|
|
1
|
+
{"version":3,"file":"type.label.mjs","sources":["../../../../packages/form/label/src/label.type.ts","../../../../packages/form/label/src/app.config.ts","../../../../packages/form/label/src/label.module.ts","../../../../packages/form/label/type.label.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { FieldType } from '@ebuilding-form/core';\n\n@Component({\n selector: 'deon-nz-field-label',\n template: ` {{ props.label }} `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n CommonModule,\n FormsModule,\n ReactiveFormsModule\n ]\n})\nexport class DeonNzFieldLabel extends FieldType {\n override defaultOptions = {\n props: {},\n };\n}\n","import { ConfigOption } from '@ebuilding-form/core';\nimport { DeonNzFieldLabel } from './label.type';\n\nexport function withFormlyFieldLabel(): ConfigOption {\n return {\n types: [\n {\n name: 'label',\n component: DeonNzFieldLabel,\n }\n ],\n };\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormlyModule } from '@ebuilding-form/core';\nimport { ReactiveFormsModule } from '@angular/forms';\n\nimport { DeonNzFormFieldModule } from '@ebuilding/form/form-field';\n\nimport { withFormlyFieldLabel } from './app.config';\n\n@NgModule({\n imports: [\n CommonModule,\n ReactiveFormsModule,\n DeonNzFormFieldModule,\n FormlyModule.forChild(withFormlyFieldLabel()),\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A,eAAA,CAAA,QAAA,EAAA,CAAA;AAAjB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,YAN1B,YAAY;YACZ,mBAAmB;YACnB,qBAAqB,EAAA,EAAA,CAAA,YAAA,CAAA,EAAA,CAAA;AAIZ,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,YAN1B,YAAY;YACZ,mBAAmB;YACnB,qBAAqB;AACrB,YAAA,YAAY,CAAC,QAAQ,CAAC,oBAAoB,EAAE,CAAC,CAAA,EAAA,CAAA;;4FAGpC,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAR7B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,mBAAmB;wBACnB,qBAAqB;AACrB,wBAAA,YAAY,CAAC,QAAQ,CAAC,oBAAoB,EAAE,CAAC;AAC9C,qBAAA;AACF,iBAAA;;;AChBD;;AAEG;;;;"}
|
package/fesm2022/type.line.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 { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
7
7
|
import * as i1 from 'ng-zorro-antd/divider';
|
|
8
8
|
import { NzDividerModule } from 'ng-zorro-antd/divider';
|
|
@@ -31,6 +31,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
|
|
|
31
31
|
}]
|
|
32
32
|
}] });
|
|
33
33
|
|
|
34
|
+
function withFormlyFieldLine() {
|
|
35
|
+
return {
|
|
36
|
+
types: [
|
|
37
|
+
{
|
|
38
|
+
name: 'line',
|
|
39
|
+
component: DeonNzFieldLine,
|
|
40
|
+
}
|
|
41
|
+
],
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
|
|
34
45
|
class DeonNzLineModule {
|
|
35
46
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DeonNzLineModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
36
47
|
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.15", ngImport: i0, type: DeonNzLineModule, imports: [CommonModule,
|
|
@@ -41,14 +52,7 @@ class DeonNzLineModule {
|
|
|
41
52
|
ReactiveFormsModule,
|
|
42
53
|
NzDividerModule,
|
|
43
54
|
DeonNzFormFieldModule,
|
|
44
|
-
FormlyModule.forChild(
|
|
45
|
-
types: [
|
|
46
|
-
{
|
|
47
|
-
name: 'line',
|
|
48
|
-
component: DeonNzFieldLine,
|
|
49
|
-
},
|
|
50
|
-
],
|
|
51
|
-
})] });
|
|
55
|
+
FormlyModule.forChild(withFormlyFieldLine())] });
|
|
52
56
|
}
|
|
53
57
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DeonNzLineModule, decorators: [{
|
|
54
58
|
type: NgModule,
|
|
@@ -58,14 +62,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
|
|
|
58
62
|
ReactiveFormsModule,
|
|
59
63
|
NzDividerModule,
|
|
60
64
|
DeonNzFormFieldModule,
|
|
61
|
-
FormlyModule.forChild(
|
|
62
|
-
types: [
|
|
63
|
-
{
|
|
64
|
-
name: 'line',
|
|
65
|
-
component: DeonNzFieldLine,
|
|
66
|
-
},
|
|
67
|
-
],
|
|
68
|
-
}),
|
|
65
|
+
FormlyModule.forChild(withFormlyFieldLine()),
|
|
69
66
|
],
|
|
70
67
|
}]
|
|
71
68
|
}] });
|
|
@@ -74,5 +71,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
|
|
|
74
71
|
* Generated bundle index. Do not edit.
|
|
75
72
|
*/
|
|
76
73
|
|
|
77
|
-
export { DeonNzFieldLine, DeonNzLineModule };
|
|
74
|
+
export { DeonNzFieldLine, DeonNzLineModule, withFormlyFieldLine };
|
|
78
75
|
//# sourceMappingURL=type.line.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"type.line.mjs","sources":["../../../../packages/form/line/src/line.type.ts","../../../../packages/form/line/src/line.module.ts","../../../../packages/form/line/type.line.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { NzDividerModule } from 'ng-zorro-antd/divider';\nimport { FormlyModule, FieldType, FieldTypeConfig } from '@
|
|
1
|
+
{"version":3,"file":"type.line.mjs","sources":["../../../../packages/form/line/src/line.type.ts","../../../../packages/form/line/src/app.config.ts","../../../../packages/form/line/src/line.module.ts","../../../../packages/form/line/type.line.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { NzDividerModule } from 'ng-zorro-antd/divider';\nimport { FormlyModule, FieldType, FieldTypeConfig } from '@ebuilding-form/core';\n\n@Component({\n selector: 'deon-nz-field-line',\n template: ` <nz-divider nzPlain [nzText]=\"props.label\" [nzOrientation]=\"props['orientation']\"></nz-divider> `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n CommonModule,\n FormsModule,\n ReactiveFormsModule,\n NzDividerModule,\n FormlyModule\n ]\n})\nexport class DeonNzFieldLine extends FieldType<FieldTypeConfig> {\n override defaultOptions = {\n props: { description: '' },\n };\n}\n","import { ConfigOption } from '@ebuilding-form/core';\nimport { DeonNzFieldLine } from './line.type';\n\nexport function withFormlyFieldLine(): ConfigOption {\n return {\n types: [\n {\n name: 'line',\n component: DeonNzFieldLine,\n }\n ],\n };\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormlyModule } from '@ebuilding-form/core';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { NzDividerModule } from 'ng-zorro-antd/divider';\nimport { DeonNzFormFieldModule } from '@ebuilding/form/form-field';\nimport { withFormlyFieldLine } from './app.config';\n\n@NgModule({\n imports: [\n CommonModule,\n ReactiveFormsModule,\n NzDividerModule,\n DeonNzFormFieldModule,\n FormlyModule.forChild(withFormlyFieldLine()),\n ],\n})\nexport class DeonNzLineModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1"],"mappings":";;;;;;;;;;AAkBM,MAAO,eAAgB,SAAQ,SAA0B,CAAA;AACpD,IAAA,cAAc,GAAG;AACxB,QAAA,KAAK,EAAE,EAAE,WAAW,EAAE,EAAE,EAAE;KAC3B;wGAHU,eAAe,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;4FAAf,eAAe,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,oBAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAVhB,CAAmG,iGAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAG3G,YAAY,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,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AAA,gBAAgB,YAPzB,YAAY;YACZ,mBAAmB;YACnB,eAAe;YACf,qBAAqB,EAAAA,IAAA,CAAA,YAAA,CAAA,EAAA,CAAA;AAIZ,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gBAAgB,YAPzB,YAAY;YACZ,mBAAmB;YACnB,eAAe;YACf,qBAAqB;AACrB,YAAA,YAAY,CAAC,QAAQ,CAAC,mBAAmB,EAAE,CAAC,CAAA,EAAA,CAAA;;4FAGnC,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAT5B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,mBAAmB;wBACnB,eAAe;wBACf,qBAAqB;AACrB,wBAAA,YAAY,CAAC,QAAQ,CAAC,mBAAmB,EAAE,CAAC;AAC7C,qBAAA;AACF,iBAAA;;;AChBD;;AAEG;;;;"}
|
package/fesm2022/type.list.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 from '@
|
|
5
|
-
import { FieldType, FormlyModule } from '@
|
|
4
|
+
import * as i1 from '@ebuilding-form/core';
|
|
5
|
+
import { FieldType, FormlyModule } from '@ebuilding-form/core';
|
|
6
6
|
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
7
7
|
import { NzGridModule } from 'ng-zorro-antd/grid';
|
|
8
8
|
import { DeonNzFormFieldModule } from '@ebuilding/form/form-field';
|
|
@@ -37,6 +37,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
|
|
|
37
37
|
}]
|
|
38
38
|
}] });
|
|
39
39
|
|
|
40
|
+
function withFormlyFieldList() {
|
|
41
|
+
return {
|
|
42
|
+
types: [
|
|
43
|
+
{
|
|
44
|
+
name: 'list',
|
|
45
|
+
component: DeonNzFieldList,
|
|
46
|
+
}
|
|
47
|
+
],
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
|
|
40
51
|
class DeonNzListModule {
|
|
41
52
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DeonNzListModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
42
53
|
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.15", ngImport: i0, type: DeonNzListModule, imports: [CommonModule,
|
|
@@ -47,14 +58,7 @@ class DeonNzListModule {
|
|
|
47
58
|
ReactiveFormsModule,
|
|
48
59
|
NzGridModule,
|
|
49
60
|
DeonNzFormFieldModule,
|
|
50
|
-
FormlyModule.forChild(
|
|
51
|
-
types: [
|
|
52
|
-
{
|
|
53
|
-
name: 'list',
|
|
54
|
-
component: DeonNzFieldList,
|
|
55
|
-
},
|
|
56
|
-
],
|
|
57
|
-
})] });
|
|
61
|
+
FormlyModule.forChild(withFormlyFieldList())] });
|
|
58
62
|
}
|
|
59
63
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DeonNzListModule, decorators: [{
|
|
60
64
|
type: NgModule,
|
|
@@ -64,14 +68,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
|
|
|
64
68
|
ReactiveFormsModule,
|
|
65
69
|
NzGridModule,
|
|
66
70
|
DeonNzFormFieldModule,
|
|
67
|
-
FormlyModule.forChild(
|
|
68
|
-
types: [
|
|
69
|
-
{
|
|
70
|
-
name: 'list',
|
|
71
|
-
component: DeonNzFieldList,
|
|
72
|
-
},
|
|
73
|
-
],
|
|
74
|
-
}),
|
|
71
|
+
FormlyModule.forChild(withFormlyFieldList()),
|
|
75
72
|
],
|
|
76
73
|
}]
|
|
77
74
|
}] });
|
|
@@ -80,5 +77,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
|
|
|
80
77
|
* Generated bundle index. Do not edit.
|
|
81
78
|
*/
|
|
82
79
|
|
|
83
|
-
export { DeonNzFieldList, DeonNzListModule };
|
|
80
|
+
export { DeonNzFieldList, DeonNzListModule, withFormlyFieldList };
|
|
84
81
|
//# sourceMappingURL=type.list.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"type.list.mjs","sources":["../../../../packages/form/list/src/list.type.ts","../../../../packages/form/list/src/list.module.ts","../../../../packages/form/list/type.list.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { FieldType } from '@
|
|
1
|
+
{"version":3,"file":"type.list.mjs","sources":["../../../../packages/form/list/src/list.type.ts","../../../../packages/form/list/src/app.config.ts","../../../../packages/form/list/src/list.module.ts","../../../../packages/form/list/type.list.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { FieldType } from '@ebuilding-form/core';\n\n@Component({\n selector: 'deon-nz-field-list',\n template: `\n <div nz-row>\n <div nz-col nzSpan=\"12\">col-12</div>\n <div nz-col nzSpan=\"12\">col-12</div>\n </div>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n CommonModule,\n FormsModule, ReactiveFormsModule\n ]\n})\nexport class DeonNzFieldList extends FieldType {\n override defaultOptions = {\n props: {},\n };\n\n}\n","import { ConfigOption } from '@ebuilding-form/core';\nimport { DeonNzFieldList } from './list.type';\n\nexport function withFormlyFieldList(): ConfigOption {\n return {\n types: [\n {\n name: 'list',\n component: DeonNzFieldList,\n }\n ],\n };\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormlyModule } from '@ebuilding-form/core';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { NzGridModule } from 'ng-zorro-antd/grid';\nimport { DeonNzFormFieldModule } from '@ebuilding/form/form-field';\nimport { withFormlyFieldList } from './app.config';\n\n@NgModule({\n imports: [\n CommonModule,\n ReactiveFormsModule,\n NzGridModule,\n DeonNzFormFieldModule,\n FormlyModule.forChild(withFormlyFieldList()),\n ],\n})\nexport class DeonNzListModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAmBM,MAAO,eAAgB,SAAQ,SAAS,CAAA;AACnC,IAAA,cAAc,GAAG;AACxB,QAAA,KAAK,EAAE,EAAE;KACV;wGAHU,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,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,eAAe,EAZhB,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,oBAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA;;;;;AAKT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAGC,YAAY,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EACZ,WAAW,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAE,mBAAmB,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;4FAGvB,eAAe,EAAA,UAAA,EAAA,CAAA;kBAd3B,SAAS;AAAC,YAAA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,QAAQ,CAAC,mBAAmB,EAAE,CAAC;AAC7C,qBAAA;AACF,iBAAA;;;AChBD;;AAEG;;;;"}
|
package/fesm2022/type.number.mjs
CHANGED
|
@@ -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 i5 from '@
|
|
6
|
-
import { FieldType, FormlyModule } from '@
|
|
5
|
+
import * as i5 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 { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
@@ -84,7 +84,7 @@ class DeonNzFieldNumber extends FieldType {
|
|
|
84
84
|
</ng-container>
|
|
85
85
|
|
|
86
86
|
<ng-template #tmpPwd> *** </ng-template>
|
|
87
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: NzInputModule }, { kind: "component", type: i3.NzInputGroupComponent, selector: "nz-input-group", inputs: ["nzAddOnBeforeIcon", "nzAddOnAfterIcon", "nzPrefixIcon", "nzSuffixIcon", "nzAddOnBefore", "nzAddOnAfter", "nzPrefix", "nzStatus", "nzSuffix", "nzSize", "nzSearch", "nzCompact"], exportAs: ["nzInputGroup"] }, { kind: "ngmodule", type: NzInputNumberModule }, { kind: "component", type: i4.NzInputNumberComponent, selector: "nz-input-number", inputs: ["nzId", "nzSize", "nzPlaceHolder", "nzStatus", "nzStep", "nzMin", "nzMax", "nzPrecision", "nzParser", "nzFormatter", "nzDisabled", "nzReadOnly", "nzAutoFocus", "nzBordered", "nzKeyboard", "nzControls"], outputs: ["nzBlur", "nzFocus", "nzOnStep"], exportAs: ["nzInputNumber"] }, { kind: "ngmodule", type: FormlyModule }, { kind: "directive", type: i5
|
|
87
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: NzInputModule }, { kind: "component", type: i3.NzInputGroupComponent, selector: "nz-input-group", inputs: ["nzAddOnBeforeIcon", "nzAddOnAfterIcon", "nzPrefixIcon", "nzSuffixIcon", "nzAddOnBefore", "nzAddOnAfter", "nzPrefix", "nzStatus", "nzSuffix", "nzSize", "nzSearch", "nzCompact"], exportAs: ["nzInputGroup"] }, { kind: "ngmodule", type: NzInputNumberModule }, { kind: "component", type: i4.NzInputNumberComponent, selector: "nz-input-number", inputs: ["nzId", "nzSize", "nzPlaceHolder", "nzStatus", "nzStep", "nzMin", "nzMax", "nzPrecision", "nzParser", "nzFormatter", "nzDisabled", "nzReadOnly", "nzAutoFocus", "nzBordered", "nzKeyboard", "nzControls"], outputs: ["nzBlur", "nzFocus", "nzOnStep"], exportAs: ["nzInputNumber"] }, { kind: "ngmodule", type: FormlyModule }, { kind: "directive", type: i5.LegacyFormlyAttributes, selector: "[formlyAttributes]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
88
88
|
}
|
|
89
89
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DeonNzFieldNumber, decorators: [{
|
|
90
90
|
type: Component,
|
|
@@ -141,7 +141,7 @@ class DeonNzFieldNumberRate extends FieldType {
|
|
|
141
141
|
}
|
|
142
142
|
ngOnInit() { }
|
|
143
143
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DeonNzFieldNumberRate, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
144
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: DeonNzFieldNumberRate, isStandalone: true, selector: "deon-nz-field-number", usesInheritance: true, ngImport: i0, template: ` <nz-rate [formControl]="formControl" [formlyAttributes]="field" [nzDisabled]="!editor" [nzAllowClear]="to?.required==true?false:true"> </nz-rate> `, isInline: true, dependencies: [{ 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: NzRateModule }, { kind: "component", type: i2$1.NzRateComponent, selector: "nz-rate", inputs: ["nzAllowClear", "nzAllowHalf", "nzDisabled", "nzAutoFocus", "nzCharacter", "nzCount", "nzTooltips"], outputs: ["nzOnBlur", "nzOnFocus", "nzOnHoverChange", "nzOnKeyDown"], exportAs: ["nzRate"] }, { kind: "ngmodule", type: FormlyModule }, { kind: "directive", type: i5
|
|
144
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: DeonNzFieldNumberRate, isStandalone: true, selector: "deon-nz-field-number", usesInheritance: true, ngImport: i0, template: ` <nz-rate [formControl]="formControl" [formlyAttributes]="field" [nzDisabled]="!editor" [nzAllowClear]="to?.required==true?false:true"> </nz-rate> `, isInline: true, dependencies: [{ 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: NzRateModule }, { kind: "component", type: i2$1.NzRateComponent, selector: "nz-rate", inputs: ["nzAllowClear", "nzAllowHalf", "nzDisabled", "nzAutoFocus", "nzCharacter", "nzCount", "nzTooltips"], outputs: ["nzOnBlur", "nzOnFocus", "nzOnHoverChange", "nzOnKeyDown"], exportAs: ["nzRate"] }, { kind: "ngmodule", type: FormlyModule }, { kind: "directive", type: i5.LegacyFormlyAttributes, selector: "[formlyAttributes]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
145
145
|
}
|
|
146
146
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DeonNzFieldNumberRate, decorators: [{
|
|
147
147
|
type: Component,
|
|
@@ -157,28 +157,32 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
|
|
|
157
157
|
}]
|
|
158
158
|
}], ctorParameters: () => [] });
|
|
159
159
|
|
|
160
|
+
function withFormlyFieldNumber() {
|
|
161
|
+
return {
|
|
162
|
+
types: [
|
|
163
|
+
{
|
|
164
|
+
name: 'number',
|
|
165
|
+
component: DeonNzFieldNumber,
|
|
166
|
+
wrappers: ['formly-form-field'],
|
|
167
|
+
},
|
|
168
|
+
{ name: 'eval_number', extends: 'number' },
|
|
169
|
+
{ name: 'finish_number', extends: 'number' },
|
|
170
|
+
{
|
|
171
|
+
name: 'rate_number',
|
|
172
|
+
component: DeonNzFieldNumberRate,
|
|
173
|
+
wrappers: ['formly-form-field'],
|
|
174
|
+
}
|
|
175
|
+
],
|
|
176
|
+
};
|
|
177
|
+
}
|
|
178
|
+
|
|
160
179
|
class DeonNzNumberModule {
|
|
161
180
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DeonNzNumberModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
162
181
|
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.15", ngImport: i0, type: DeonNzNumberModule, imports: [CommonModule,
|
|
163
182
|
DeonNzFormFieldModule, i5.FormlyModule] });
|
|
164
183
|
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DeonNzNumberModule, imports: [CommonModule,
|
|
165
184
|
DeonNzFormFieldModule,
|
|
166
|
-
FormlyModule.forChild(
|
|
167
|
-
types: [
|
|
168
|
-
{
|
|
169
|
-
name: 'number',
|
|
170
|
-
component: DeonNzFieldNumber,
|
|
171
|
-
wrappers: ['formly-form-field'],
|
|
172
|
-
},
|
|
173
|
-
{ name: 'eval_number', extends: 'number' },
|
|
174
|
-
{ name: 'finish_number', extends: 'number' },
|
|
175
|
-
{
|
|
176
|
-
name: 'rate_number',
|
|
177
|
-
component: DeonNzFieldNumberRate,
|
|
178
|
-
wrappers: ['formly-form-field'],
|
|
179
|
-
},
|
|
180
|
-
],
|
|
181
|
-
})] });
|
|
185
|
+
FormlyModule.forChild(withFormlyFieldNumber())] });
|
|
182
186
|
}
|
|
183
187
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DeonNzNumberModule, decorators: [{
|
|
184
188
|
type: NgModule,
|
|
@@ -186,22 +190,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
|
|
|
186
190
|
imports: [
|
|
187
191
|
CommonModule,
|
|
188
192
|
DeonNzFormFieldModule,
|
|
189
|
-
FormlyModule.forChild(
|
|
190
|
-
types: [
|
|
191
|
-
{
|
|
192
|
-
name: 'number',
|
|
193
|
-
component: DeonNzFieldNumber,
|
|
194
|
-
wrappers: ['formly-form-field'],
|
|
195
|
-
},
|
|
196
|
-
{ name: 'eval_number', extends: 'number' },
|
|
197
|
-
{ name: 'finish_number', extends: 'number' },
|
|
198
|
-
{
|
|
199
|
-
name: 'rate_number',
|
|
200
|
-
component: DeonNzFieldNumberRate,
|
|
201
|
-
wrappers: ['formly-form-field'],
|
|
202
|
-
},
|
|
203
|
-
],
|
|
204
|
-
}),
|
|
193
|
+
FormlyModule.forChild(withFormlyFieldNumber()),
|
|
205
194
|
],
|
|
206
195
|
}]
|
|
207
196
|
}] });
|
|
@@ -210,5 +199,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
|
|
|
210
199
|
* Generated bundle index. Do not edit.
|
|
211
200
|
*/
|
|
212
201
|
|
|
213
|
-
export { DeonNzFieldNumber, DeonNzFieldNumberRate, DeonNzNumberModule };
|
|
202
|
+
export { DeonNzFieldNumber, DeonNzFieldNumberRate, DeonNzNumberModule, withFormlyFieldNumber };
|
|
214
203
|
//# sourceMappingURL=type.number.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"type.number.mjs","sources":["../../../../packages/form/number/src/number.type.ts","../../../../packages/form/number/src/number_rate.type.ts","../../../../packages/form/number/src/number.module.ts","../../../../packages/form/number/type.number.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy, OnInit } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { NzInputModule } from 'ng-zorro-antd/input';\nimport { NzInputNumberModule } from 'ng-zorro-antd/input-number';\nimport { FormlyModule, FieldType, FieldTypeConfig } from '@kre-form/core';\n\n@Component({\n selector: 'deon-nz-field-number',\n template: `\n <ng-container *ngIf=\"!password; else tmpPwd\">\n <ng-container *ngIf=\"props['unit']; else tmpNumber\">\n <nz-input-group [nzAddOnAfter]=\"props['unit']\">\n <nz-input-number\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\"\n [nzDisabled]=\"!editor\"\n [nzPrecision]=\"precision\"\n [nzStep]=\"0\" \n [nzFormatter]=\"formatNumber\"\n [nzParser]=\"parseNumber\"\n (nzBlur)=\"onFormatPrecision()\"\n ></nz-input-number>\n </nz-input-group>\n </ng-container>\n <ng-template #tmpNumber>\n <nz-input-number\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\"\n [nzDisabled]=\"!editor\"\n [nzPrecision]=\"precision\"\n [nzStep]=\"precision == 0 ? 1 : 0.1\" \n [nzFormatter]=\"formatNumber\"\n [nzParser]=\"parseNumber\"\n (nzBlur)=\"onFormatPrecision()\"\n ></nz-input-number>\n </ng-template>\n </ng-container>\n\n <ng-template #tmpPwd> *** </ng-template>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n imports: [\n CommonModule,\n FormsModule,\n ReactiveFormsModule,\n NzInputModule,\n NzInputNumberModule,\n FormlyModule\n ]\n})\nexport class DeonNzFieldNumber extends FieldType<FieldTypeConfig> implements OnInit {\n get precision() {\n if (this.props[\"precision\"] && this.props[\"precision\"] > 0) {\n return this.props[\"precision\"];\n }\n return 0;\n }\n\n get password() {\n return this.props?.[\"password\"] === true;\n }\n\n constructor() {\n super();\n }\n\n ngOnInit() { }\n\n formatNumber = (value: number | string | null | undefined): string => {\n if (value === null || value === undefined || value === '') return '';\n return String(value); // 不要 format,小数位留给 blur 处理\n };\n\n parseNumber = (value: string): number | null => {\n const parsed = parseFloat(value);\n return isNaN(parsed) ? null : parsed;\n };\n\n onFormatPrecision() {\n let value = this.formControl.value;\n // 空值直接跳过,不格式化\n if (value === null || value === undefined || value === '') return;\n\n // 强制转成数字\n const num = Number(value);\n\n if (isNaN(num)) return;\n\n // 设置精度\n const fixed = num.toFixed(this.precision);\n\n // ⚠ 注意:toFixed 返回 string,但 formControl 可能希望是 number\n // 所以统一再转 number 避免下游报错\n this.formControl.setValue(\n this.precision > 0 ? Number(fixed) : parseInt(fixed),\n { emitEvent: false }\n );\n }\n\n\n}\n","import { Component, ChangeDetectionStrategy, OnInit } from '@angular/core';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { NzRateModule } from 'ng-zorro-antd/rate';\nimport { FormlyModule, FieldType, FieldTypeConfig } from '@kre-form/core';\nimport _ from 'lodash';\n@Component({\n selector: 'deon-nz-field-number',\n template: ` <nz-rate [formControl]=\"formControl\" [formlyAttributes]=\"field\" [nzDisabled]=\"!editor\" [nzAllowClear]=\"to?.required==true?false:true\"> </nz-rate> `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n ReactiveFormsModule,\n NzRateModule,\n FormlyModule\n ]\n})\nexport class DeonNzFieldNumberRate extends FieldType<FieldTypeConfig> implements OnInit {\n constructor() {\n super();\n }\n ngOnInit() { }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormlyModule } from '@kre-form/core';\n\nimport { DeonNzFormFieldModule } from '@ebuilding/form/form-field';\nimport { DeonNzFieldNumber } from './number.type';\nimport { DeonNzFieldNumberRate } from './number_rate.type';\n\n@NgModule({\n imports: [\n CommonModule,\n DeonNzFormFieldModule,\n FormlyModule.forChild({\n types: [\n {\n name: 'number',\n component: DeonNzFieldNumber,\n wrappers: ['formly-form-field'],\n },\n { name: 'eval_number', extends: 'number' },\n { name: 'finish_number', extends: 'number' },\n {\n name: 'rate_number',\n component: DeonNzFieldNumberRate,\n wrappers: ['formly-form-field'],\n },\n ],\n }),\n ],\n})\nexport class DeonNzNumberModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1","i3"],"mappings":";;;;;;;;;;;;;;;;AAoDM,MAAO,iBAAkB,SAAQ,SAA0B,CAAA;AAC/D,IAAA,IAAI,SAAS,GAAA;AACX,QAAA,IAAI,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,WAAW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ACd,oCAAA,SAAS,EAAE,iBAAiB;oCAC5B,QAAQ,EAAE,CAAC,mBAAmB,CAAC;AAChC,iCAAA;AACD,gCAAA,EAAE,IAAI,EAAE,aAAa,EAAE,OAAO,EAAE,QAAQ,EAAE;AAC1C,gCAAA,EAAE,IAAI,EAAE,eAAe,EAAE,OAAO,EAAE,QAAQ,EAAE;AAC5C,gCAAA;AACE,oCAAA,IAAI,EAAE,aAAa;AACnB,oCAAA,SAAS,EAAE,qBAAqB;oCAChC,QAAQ,EAAE,CAAC,mBAAmB,CAAC;AAChC,iCAAA;AACF,6BAAA;yBACF,CAAC;AACH,qBAAA;AACF,iBAAA;;;AC7BD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"type.number.mjs","sources":["../../../../packages/form/number/src/number.type.ts","../../../../packages/form/number/src/number_rate.type.ts","../../../../packages/form/number/src/app.config.ts","../../../../packages/form/number/src/number.module.ts","../../../../packages/form/number/type.number.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy, OnInit } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { NzInputModule } from 'ng-zorro-antd/input';\nimport { NzInputNumberModule } from 'ng-zorro-antd/input-number';\nimport { FormlyModule, FieldType, FieldTypeConfig } from '@ebuilding-form/core';\n\n@Component({\n selector: 'deon-nz-field-number',\n template: `\n <ng-container *ngIf=\"!password; else tmpPwd\">\n <ng-container *ngIf=\"props['unit']; else tmpNumber\">\n <nz-input-group [nzAddOnAfter]=\"props['unit']\">\n <nz-input-number\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\"\n [nzDisabled]=\"!editor\"\n [nzPrecision]=\"precision\"\n [nzStep]=\"0\" \n [nzFormatter]=\"formatNumber\"\n [nzParser]=\"parseNumber\"\n (nzBlur)=\"onFormatPrecision()\"\n ></nz-input-number>\n </nz-input-group>\n </ng-container>\n <ng-template #tmpNumber>\n <nz-input-number\n [formControl]=\"formControl\"\n [formlyAttributes]=\"field\"\n [nzDisabled]=\"!editor\"\n [nzPrecision]=\"precision\"\n [nzStep]=\"precision == 0 ? 1 : 0.1\" \n [nzFormatter]=\"formatNumber\"\n [nzParser]=\"parseNumber\"\n (nzBlur)=\"onFormatPrecision()\"\n ></nz-input-number>\n </ng-template>\n </ng-container>\n\n <ng-template #tmpPwd> *** </ng-template>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n imports: [\n CommonModule,\n FormsModule,\n ReactiveFormsModule,\n NzInputModule,\n NzInputNumberModule,\n FormlyModule\n ]\n})\nexport class DeonNzFieldNumber extends FieldType<FieldTypeConfig> implements OnInit {\n get precision() {\n if (this.props[\"precision\"] && this.props[\"precision\"] > 0) {\n return this.props[\"precision\"];\n }\n return 0;\n }\n\n get password() {\n return this.props?.[\"password\"] === true;\n }\n\n constructor() {\n super();\n }\n\n ngOnInit() { }\n\n formatNumber = (value: number | string | null | undefined): string => {\n if (value === null || value === undefined || value === '') return '';\n return String(value); // 不要 format,小数位留给 blur 处理\n };\n\n parseNumber = (value: string): number | null => {\n const parsed = parseFloat(value);\n return isNaN(parsed) ? null : parsed;\n };\n\n onFormatPrecision() {\n let value = this.formControl.value;\n // 空值直接跳过,不格式化\n if (value === null || value === undefined || value === '') return;\n\n // 强制转成数字\n const num = Number(value);\n\n if (isNaN(num)) return;\n\n // 设置精度\n const fixed = num.toFixed(this.precision);\n\n // ⚠ 注意:toFixed 返回 string,但 formControl 可能希望是 number\n // 所以统一再转 number 避免下游报错\n this.formControl.setValue(\n this.precision > 0 ? Number(fixed) : parseInt(fixed),\n { emitEvent: false }\n );\n }\n\n\n}\n","import { Component, ChangeDetectionStrategy, OnInit } from '@angular/core';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { NzRateModule } from 'ng-zorro-antd/rate';\nimport { FormlyModule, FieldType, FieldTypeConfig } from '@ebuilding-form/core';\nimport _ from 'lodash';\n@Component({\n selector: 'deon-nz-field-number',\n template: ` <nz-rate [formControl]=\"formControl\" [formlyAttributes]=\"field\" [nzDisabled]=\"!editor\" [nzAllowClear]=\"to?.required==true?false:true\"> </nz-rate> `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n ReactiveFormsModule,\n NzRateModule,\n FormlyModule\n ]\n})\nexport class DeonNzFieldNumberRate extends FieldType<FieldTypeConfig> implements OnInit {\n constructor() {\n super();\n }\n ngOnInit() { }\n}\n","import { ConfigOption } from '@ebuilding-form/core';\nimport { DeonNzFieldNumber } from './number.type';\nimport { DeonNzFieldNumberRate } from './number_rate.type';\n\nexport function withFormlyFieldNumber(): ConfigOption {\n return {\n types: [\n {\n name: 'number',\n component: DeonNzFieldNumber,\n wrappers: ['formly-form-field'],\n },\n { name: 'eval_number', extends: 'number' },\n { name: 'finish_number', extends: 'number' },\n {\n name: 'rate_number',\n component: DeonNzFieldNumberRate,\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';\n\nimport { DeonNzFormFieldModule } from '@ebuilding/form/form-field';\nimport { withFormlyFieldNumber } from './app.config';\n\n@NgModule({\n imports: [\n CommonModule,\n DeonNzFormFieldModule,\n FormlyModule.forChild(withFormlyFieldNumber()),\n ],\n})\nexport class DeonNzNumberModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1","i3"],"mappings":";;;;;;;;;;;;;;;;AAoDM,MAAO,iBAAkB,SAAQ,SAA0B,CAAA;AAC/D,IAAA,IAAI,SAAS,GAAA;AACX,QAAA,IAAI,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,GAAG,CAAC,EAAE;AAC1D,YAAA,OAAO,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC;;AAEhC,QAAA,OAAO,CAAC;;AAGV,IAAA,IAAI,QAAQ,GAAA;QACV,OAAO,IAAI,CAAC,KAAK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AAQ,EAAE;AAC5C,YAAA;AACE,gBAAA,IAAI,EAAE,aAAa;AACnB,gBAAA,SAAS,EAAE,qBAAqB;gBAChC,QAAQ,EAAE,CAAC,mBAAmB,CAAC;AAChC;AACF,SAAA;KACF;AACH;;MCPa,kBAAkB,CAAA;wGAAlB,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;AAAlB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kBAAkB,YAL3B,YAAY;YACZ,qBAAqB,EAAAD,EAAA,CAAA,YAAA,CAAA,EAAA,CAAA;AAIZ,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kBAAkB,YAL3B,YAAY;YACZ,qBAAqB;AACrB,YAAA,YAAY,CAAC,QAAQ,CAAC,qBAAqB,EAAE,CAAC,CAAA,EAAA,CAAA;;4FAGrC,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAP9B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,qBAAqB;AACrB,wBAAA,YAAY,CAAC,QAAQ,CAAC,qBAAqB,EAAE,CAAC;AAC/C,qBAAA;AACF,iBAAA;;;ACbD;;AAEG;;;;"}
|
|
@@ -2,8 +2,8 @@ import * as i0 from '@angular/core';
|
|
|
2
2
|
import { ChangeDetectionStrategy, Component, NO_ERRORS_SCHEMA, CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
|
|
3
3
|
import * as i1 from '@angular/common';
|
|
4
4
|
import { CommonModule } from '@angular/common';
|
|
5
|
-
import * as i1$1 from '@
|
|
6
|
-
import { FieldType, FormlyModule } from '@
|
|
5
|
+
import * as i1$1 from '@ebuilding-form/core';
|
|
6
|
+
import { FieldType, FormlyModule } from '@ebuilding-form/core';
|
|
7
7
|
import * as i2 from '@angular/forms';
|
|
8
8
|
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
9
9
|
import * as i3 from 'ng-zorro-antd/input';
|
|
@@ -242,6 +242,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
|
|
|
242
242
|
], template: "<ul class=\"first-box\">\n <li>\n <label>\u52A0\u73ED\u65E5\u671F</label>\n <nz-date-picker [(ngModel)]=\"happenValue\" nzPlaceHolder=\"\u8BF7\u9009\u62E9\u52A0\u73ED\u65E5\u671F\" [nzDisabled]=\"!pageEditor\"></nz-date-picker>\n </li>\n <li>\n <label>\u5F00\u59CB\u65F6\u95F4</label>\n <nz-date-picker [(ngModel)]=\"beginValue\" nzFormat=\"yyyy-MM-dd HH:mm\" [nzShowTime]=\"{ nzFormat: 'HH:mm' }\"\n nzPlaceHolder=\"\u8BF7\u9009\u62E9\u5F00\u59CB\u65F6\u95F4\" [nzDisabled]=\"!pageEditor\"></nz-date-picker>\n </li>\n <li>\n <label>\u7ED3\u675F\u65F6\u95F4</label>\n <nz-date-picker [(ngModel)]=\"endValue\" nzFormat=\"yyyy-MM-dd HH:mm\" [nzShowTime]=\"{ nzFormat: 'HH:mm' }\"\n nzPlaceHolder=\"\u8BF7\u9009\u62E9\u7ED3\u675F\u65F6\u95F4\" [nzDisabled]=\"!pageEditor\"></nz-date-picker>\n </li>\n <li>\n <ng-container *ngIf=\"!props['zeroSplit']\">\n <label>\u52A0\u73ED\u9879\u76EE</label>\n <nz-select [(ngModel)]=\"itemValue\" (ngModelChange)=\"itemChange($event)\" nzPlaceHolder=\"\u8BF7\u9009\u62E9\u52A0\u73ED\u9879\u76EE\"\n [nzDisabled]=\"!pageEditor\">\n <ng-container *ngIf=\"props['overtime'] && props['overtime']['itemId']\">\n <ng-container *ngFor=\"let item of props['overtime']['itemId']\">\n <nz-option [nzValue]=\"item.value\" [nzLabel]=\"item.label\"></nz-option>\n </ng-container>\n </ng-container>\n </nz-select>\n </ng-container>\n </li>\n <li>\n <ng-container *ngIf=\"!props['zeroSplit']\">\n <label>\u52A0\u73ED\u65F6\u957F</label>\n <input nz-input [disabled]=\"true\" [(ngModel)]=\"numValue\" />\n </ng-container>\n </li>\n</ul>\n\n<ul class=\"second-box\" *ngIf=\"props['shiftShow'] && !props['zeroSplit']\">\n <li>\n <label>\u73ED\u6B21</label>\n <nz-select [(ngModel)]=\"shiftValue\" (ngModelChange)=\"shiftChange($event)\" nzPlaceHolder=\"\u8BF7\u9009\u62E9\u73ED\u6B21\"\n [nzDisabled]=\"!pageEditor\">\n <ng-container *ngIf=\"props['overtime'] && props['overtime']['shiftId']\">\n <ng-container *ngFor=\"let item of props['overtime']['shiftId']\">\n <nz-option [nzValue]=\"item.value\" [nzLabel]=\"item.label\"></nz-option>\n </ng-container>\n </ng-container>\n </nz-select>\n </li>\n <li>\n <label>\u53EF\u7533\u8BF7\u65F6\u95F4\u6BB5</label>\n <nz-select [(ngModel)]=\"shiftPeriodValue\" (ngModelChange)=\"shiftPeriodChange($event)\" nzPlaceHolder=\"\u8BF7\u9009\u62E9\u53EF\u7533\u8BF7\u65F6\u95F4\u6BB5\"\n [nzDisabled]=\"!pageEditor\">\n <ng-container *ngIf=\"props['overtime'] && props['overtime']['shiftPeriod']\">\n <ng-container *ngFor=\"let item of props['overtime']['shiftPeriod']\">\n <nz-option [nzValue]=\"item.value\" [nzLabel]=\"item.label\"></nz-option>\n </ng-container>\n </ng-container>\n </nz-select>\n </li>\n <li></li>\n <li></li>\n <li></li>\n</ul>\n\n<div class=\"three-box\" *ngIf=\"props['zeroSplit'] === true\">\n <label class=\"title\">\u96F6\u70B9\u62C6\u5206\u8BE6\u60C5</label>\n <table>\n <thead>\n <tr>\n <th style=\"width: 60px;\">\u5E8F\u53F7</th>\n <th>\u52A0\u73ED\u65E5\u671F</th>\n <th>\u73ED\u6B21</th>\n <th>\u53EF\u7533\u8BF7\u65F6\u95F4\u6BB5</th>\n <th>\u52A0\u73ED\u9879\u76EE</th>\n <th>\u5F00\u59CB\u65F6\u95F4</th>\n <th>\u7ED3\u675F\u65F6\u95F4</th>\n <th>\u52A0\u73ED\u65F6\u957F</th>\n </tr>\n </thead>\n <tbody>\n <ng-container *ngIf=\"listChildValue && listChildValue.length > 0; else trEmpty\">\n <tr *ngFor=\"let item of listChildValue; let index = index\">\n <td>{{ index + 1 }}</td>\n <td>\n <nz-date-picker [(ngModel)]=\"item.happenData\" nzPlaceHolder=\"\u8BF7\u9009\u62E9\u52A0\u73ED\u65E5\u671F\"\n [nzDisabled]=\"!pageEditor\"></nz-date-picker>\n </td>\n <td>\n <nz-select [(ngModel)]=\"item.shiftId\" nzPlaceHolder=\"\u8BF7\u9009\u62E9\u73ED\u6B21\" [nzDisabled]=\"!pageEditor\">\n <ng-container\n *ngIf=\"props['overtime'] && props['overtime']['listChild']?.length > index && props['overtime']['listChild'][index]['shiftId']\">\n <ng-container *ngFor=\"let opt of props['overtime']['listChild'][index]['shiftId']\">\n <nz-option [nzValue]=\"opt.value\" [nzLabel]=\"opt.label\"></nz-option>\n </ng-container>\n </ng-container>\n </nz-select>\n </td>\n <td>\n <nz-select [(ngModel)]=\"item.shiftPeriod\" nzPlaceHolder=\"\u8BF7\u9009\u62E9\u53EF\u7533\u8BF7\u65F6\u95F4\u6BB5\" [nzDisabled]=\"!pageEditor\">\n <ng-container\n *ngIf=\"props['overtime'] && props['overtime']['listChild']?.length > index && props['overtime']['listChild'][index]['shiftPeriod']\">\n <ng-container *ngFor=\"let opt of props['overtime']['listChild'][index]['shiftPeriod']\">\n <nz-option [nzValue]=\"opt.value\" [nzLabel]=\"opt.label\"></nz-option>\n </ng-container>\n </ng-container>\n </nz-select>\n </td>\n <td>\n <nz-select [(ngModel)]=\"item.itemId\" nzPlaceHolder=\"\u8BF7\u9009\u62E9\u52A0\u73ED\u9879\u76EE\" [nzDisabled]=\"!pageEditor\">\n <ng-container\n *ngIf=\"props['overtime'] && props['overtime']['listChild']?.length > index && props['overtime']['listChild'][index]['itemId']\">\n <ng-container *ngFor=\"let opt of props['overtime']['listChild'][index]['itemId']\">\n <nz-option [nzValue]=\"opt.value\" [nzLabel]=\"opt.label\"></nz-option>\n </ng-container>\n </ng-container>\n </nz-select>\n </td>\n <td>\n <nz-date-picker [(ngModel)]=\"item.beginDate\" nzFormat=\"yyyy-MM-dd HH:mm\"\n [nzShowTime]=\"{ nzFormat: 'HH:mm' }\" nzPlaceHolder=\"\u8BF7\u9009\u62E9\u5F00\u59CB\u65F6\u95F4\"\n [nzDisabled]=\"!pageEditor\"></nz-date-picker>\n </td>\n <td>\n <nz-date-picker [(ngModel)]=\"item.endDate\" nzFormat=\"yyyy-MM-dd HH:mm\"\n [nzShowTime]=\"{ nzFormat: 'HH:mm' }\" nzPlaceHolder=\"\u8BF7\u9009\u62E9\u7ED3\u675F\u65F6\u95F4\"\n [nzDisabled]=\"!pageEditor\"></nz-date-picker>\n </td>\n <td>\n <input nz-input [disabled]=\"true\" [(ngModel)]=\"item.numValue\" />\n </td>\n </tr>\n </ng-container>\n\n <ng-template #trEmpty>\n <tr>\n <td colspan=\"8\" style=\"text-align: center; padding: 5px;\">\u6682\u65E0\u6570\u636E</td>\n </tr>\n </ng-template>\n </tbody>\n </table>\n</div>", styles: [":host ::ng-deep .first-box,:host ::ng-deep .second-box{display:flex;flex-direction:row;margin:0;padding:0;list-style:none}:host ::ng-deep .first-box li,:host ::ng-deep .second-box li{display:flex;flex:1;flex-direction:column}:host ::ng-deep .first-box li+li,:host ::ng-deep .second-box li+li{margin-left:15px}:host ::ng-deep .second-box{margin-top:15px}:host ::ng-deep .three-box{margin-top:15px}:host ::ng-deep .three-box .title{display:flex;margin-bottom:5px}:host ::ng-deep .three-box table{width:100%;border-top:1px solid #eaeaea;border-right:1px solid #eaeaea}:host ::ng-deep .three-box table tr th{padding:8px;font-weight:400;background:#edeff3;border-bottom:1px solid #eaeaea;border-left:1px solid #eaeaea}:host ::ng-deep .three-box table tr td{padding:6px 8px;border-bottom:1px solid #eaeaea;border-left:1px solid #eaeaea}:host ::ng-deep .three-box table nz-input-number{width:150px}\n"] }]
|
|
243
243
|
}] });
|
|
244
244
|
|
|
245
|
+
function withFormlyFieldOverTime() {
|
|
246
|
+
return {
|
|
247
|
+
types: [
|
|
248
|
+
{
|
|
249
|
+
name: 'overtime',
|
|
250
|
+
component: DeonNzFieldOverTime,
|
|
251
|
+
wrappers: ['formly-form-field'],
|
|
252
|
+
}
|
|
253
|
+
]
|
|
254
|
+
};
|
|
255
|
+
}
|
|
256
|
+
|
|
245
257
|
class DeonNzOverTimeModule {
|
|
246
258
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DeonNzOverTimeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
247
259
|
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.15", ngImport: i0, type: DeonNzOverTimeModule, imports: [CommonModule,
|
|
@@ -258,15 +270,7 @@ class DeonNzOverTimeModule {
|
|
|
258
270
|
NzInputModule,
|
|
259
271
|
NzSelectModule,
|
|
260
272
|
NzDatePickerModule,
|
|
261
|
-
FormlyModule.forChild(
|
|
262
|
-
types: [
|
|
263
|
-
{
|
|
264
|
-
name: 'overtime',
|
|
265
|
-
component: DeonNzFieldOverTime,
|
|
266
|
-
wrappers: ['formly-form-field'],
|
|
267
|
-
},
|
|
268
|
-
],
|
|
269
|
-
})] });
|
|
273
|
+
FormlyModule.forChild(withFormlyFieldOverTime())] });
|
|
270
274
|
}
|
|
271
275
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DeonNzOverTimeModule, decorators: [{
|
|
272
276
|
type: NgModule,
|
|
@@ -279,15 +283,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
|
|
|
279
283
|
NzInputModule,
|
|
280
284
|
NzSelectModule,
|
|
281
285
|
NzDatePickerModule,
|
|
282
|
-
FormlyModule.forChild(
|
|
283
|
-
types: [
|
|
284
|
-
{
|
|
285
|
-
name: 'overtime',
|
|
286
|
-
component: DeonNzFieldOverTime,
|
|
287
|
-
wrappers: ['formly-form-field'],
|
|
288
|
-
},
|
|
289
|
-
],
|
|
290
|
-
}),
|
|
286
|
+
FormlyModule.forChild(withFormlyFieldOverTime()),
|
|
291
287
|
],
|
|
292
288
|
schemas: [NO_ERRORS_SCHEMA, CUSTOM_ELEMENTS_SCHEMA],
|
|
293
289
|
}]
|
|
@@ -297,5 +293,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
|
|
|
297
293
|
* Generated bundle index. Do not edit.
|
|
298
294
|
*/
|
|
299
295
|
|
|
300
|
-
export { DeonNzFieldOverTime, DeonNzOverTimeModule };
|
|
296
|
+
export { DeonNzFieldOverTime, DeonNzOverTimeModule, withFormlyFieldOverTime };
|
|
301
297
|
//# sourceMappingURL=type.overtime.mjs.map
|