@ngx-formly/core 10.0.1 → 11.1.0-rc.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.
@@ -1,135 +1,193 @@
1
- import * as i0 from '@angular/core';
2
- import { Pipe, NgModule } from '@angular/core';
3
- import { isObservable, BehaviorSubject } from 'rxjs';
4
- import { map, filter, tap } from 'rxjs/operators';
5
-
6
- class FormlySelectOptionsPipe {
7
- transform(options, field) {
8
- if (!isObservable(options)) {
9
- options = this.observableOf(options, field);
10
- }
11
- else {
12
- this.dispose();
13
- }
14
- return options.pipe(map((value) => this.transformOptions(value, field)));
15
- }
16
- ngOnDestroy() {
17
- this.dispose();
18
- }
19
- transformOptions(options, field) {
20
- const to = this.transformSelectProps(field);
21
- const opts = [];
22
- const groups = {};
23
- options?.forEach((option) => {
24
- if (to.mapProp) {
25
- const mapped = to.mapProp(option);
26
- opts.push(mapped);
27
- }
28
- else {
29
- const o = this.transformOption(option, to);
30
- if (o.group) {
31
- const id = groups[o.label];
32
- if (id === undefined) {
33
- groups[o.label] = opts.push(o) - 1;
34
- }
35
- else {
36
- o.group.forEach((o) => opts[id].group.push(o));
37
- }
38
- }
39
- else {
40
- opts.push(o);
41
- }
42
- }
43
- });
44
- return opts;
45
- }
46
- transformOption(option, props) {
47
- const group = props.groupProp(option);
48
- if (Array.isArray(group)) {
49
- return {
50
- label: props.labelProp(option),
51
- group: group.map((opt) => this.transformOption(opt, props)),
52
- };
53
- }
54
- option = {
55
- label: props.labelProp(option),
56
- value: props.valueProp(option),
57
- disabled: !!props.disabledProp(option),
58
- };
59
- if (group) {
60
- return { label: group, group: [option] };
61
- }
62
- return option;
63
- }
64
- transformSelectProps(field) {
65
- const props = field?.props || field?.templateOptions || {};
66
- const selectPropFn = (prop) => (typeof prop === 'function' ? prop : (o) => o[prop]);
67
- return {
68
- groupProp: selectPropFn(props.groupProp || 'group'),
69
- labelProp: selectPropFn(props.labelProp || 'label'),
70
- valueProp: selectPropFn(props.valueProp || 'value'),
71
- disabledProp: selectPropFn(props.disabledProp || 'disabled'),
72
- mapProp: props.mapProp,
73
- };
74
- }
75
- dispose() {
76
- if (this._options) {
77
- this._options.complete();
78
- this._options = null;
79
- }
80
- if (this._subscription) {
81
- this._subscription.unsubscribe();
82
- this._subscription = null;
83
- }
84
- }
85
- observableOf(options, f) {
86
- this.dispose();
87
- if (f && f.options && f.options.fieldChanges) {
88
- this._subscription = f.options.fieldChanges
89
- .pipe(filter(({ property, type, field }) => {
90
- return (type === 'expressionChanges' &&
91
- (property.indexOf('templateOptions.options') === 0 || property.indexOf('props.options') === 0) &&
92
- field === f &&
93
- Array.isArray(field.props.options) &&
94
- !!this._options);
95
- }), tap(() => this._options.next(f.props.options)))
96
- .subscribe();
97
- }
98
- this._options = new BehaviorSubject(options);
99
- return this._options.asObservable();
100
- }
101
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: FormlySelectOptionsPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
102
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.25", ngImport: i0, type: FormlySelectOptionsPipe, isStandalone: true, name: "formlySelectOptions" }); }
103
- }
104
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: FormlySelectOptionsPipe, decorators: [{
105
- type: Pipe,
106
- args: [{ name: 'formlySelectOptions', standalone: true }]
107
- }] });
108
- class LegacyFormlySelectOptionsPipe extends FormlySelectOptionsPipe {
109
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: LegacyFormlySelectOptionsPipe, deps: null, target: i0.ɵɵFactoryTarget.Pipe }); }
110
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.25", ngImport: i0, type: LegacyFormlySelectOptionsPipe, isStandalone: false, name: "formlySelectOptions" }); }
111
- }
112
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: LegacyFormlySelectOptionsPipe, decorators: [{
113
- type: Pipe,
114
- args: [{ name: 'formlySelectOptions', standalone: false }]
115
- }] });
116
-
117
- class FormlySelectModule {
118
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: FormlySelectModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
119
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.25", ngImport: i0, type: FormlySelectModule, declarations: [LegacyFormlySelectOptionsPipe], exports: [LegacyFormlySelectOptionsPipe] }); }
120
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: FormlySelectModule }); }
121
- }
122
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: FormlySelectModule, decorators: [{
123
- type: NgModule,
124
- args: [{
125
- declarations: [LegacyFormlySelectOptionsPipe],
126
- exports: [LegacyFormlySelectOptionsPipe],
127
- }]
128
- }] });
129
-
130
- /**
131
- * Generated bundle index. Do not edit.
132
- */
133
-
1
+ import * as i0 from "@angular/core";
2
+ import { NgModule, Pipe } from "@angular/core";
3
+ import { BehaviorSubject, isObservable } from "rxjs";
4
+ import { filter, map, tap } from "rxjs/operators";
5
+ var FormlySelectOptionsPipe = class FormlySelectOptionsPipe {
6
+ transform(options, field) {
7
+ if (!isObservable(options)) options = this.observableOf(options, field);
8
+ else this.dispose();
9
+ return options.pipe(map((value) => this.transformOptions(value, field)));
10
+ }
11
+ ngOnDestroy() {
12
+ this.dispose();
13
+ }
14
+ transformOptions(options, field) {
15
+ const to = this.transformSelectProps(field);
16
+ const opts = [];
17
+ const groups = {};
18
+ options?.forEach((option) => {
19
+ if (to.mapProp) {
20
+ const mapped = to.mapProp(option);
21
+ opts.push(mapped);
22
+ } else {
23
+ const o = this.transformOption(option, to);
24
+ if (o.group) {
25
+ const id = groups[o.label];
26
+ if (id === void 0) groups[o.label] = opts.push(o) - 1;
27
+ else o.group.forEach((o) => opts[id].group.push(o));
28
+ } else opts.push(o);
29
+ }
30
+ });
31
+ return opts;
32
+ }
33
+ transformOption(option, props) {
34
+ const group = props.groupProp(option);
35
+ if (Array.isArray(group)) return {
36
+ label: props.labelProp(option),
37
+ group: group.map((opt) => this.transformOption(opt, props))
38
+ };
39
+ option = {
40
+ label: props.labelProp(option),
41
+ value: props.valueProp(option),
42
+ disabled: !!props.disabledProp(option)
43
+ };
44
+ if (group) return {
45
+ label: group,
46
+ group: [option]
47
+ };
48
+ return option;
49
+ }
50
+ transformSelectProps(field) {
51
+ const props = field?.props || field?.templateOptions || {};
52
+ const selectPropFn = (prop) => typeof prop === "function" ? prop : (o) => o[prop];
53
+ return {
54
+ groupProp: selectPropFn(props.groupProp || "group"),
55
+ labelProp: selectPropFn(props.labelProp || "label"),
56
+ valueProp: selectPropFn(props.valueProp || "value"),
57
+ disabledProp: selectPropFn(props.disabledProp || "disabled"),
58
+ mapProp: props.mapProp
59
+ };
60
+ }
61
+ dispose() {
62
+ if (this._options) {
63
+ this._options.complete();
64
+ this._options = null;
65
+ }
66
+ if (this._subscription) {
67
+ this._subscription.unsubscribe();
68
+ this._subscription = null;
69
+ }
70
+ }
71
+ observableOf(options, f) {
72
+ this.dispose();
73
+ if (f && f.options && f.options.fieldChanges) this._subscription = f.options.fieldChanges.pipe(filter(({ property, type, field }) => {
74
+ return type === "expressionChanges" && (property.indexOf("templateOptions.options") === 0 || property.indexOf("props.options") === 0) && field === f && Array.isArray(field.props.options) && !!this._options;
75
+ }), tap(() => this._options.next(f.props.options))).subscribe();
76
+ this._options = new BehaviorSubject(options);
77
+ return this._options.asObservable();
78
+ }
79
+ static {
80
+ this.ɵfac = i0.ɵɵngDeclareFactory({
81
+ minVersion: "12.0.0",
82
+ version: "22.2.2",
83
+ ngImport: i0,
84
+ type: FormlySelectOptionsPipe,
85
+ deps: [],
86
+ target: i0.ɵɵFactoryTarget.Pipe
87
+ });
88
+ }
89
+ static {
90
+ this.ɵpipe = i0.ɵɵngDeclarePipe({
91
+ minVersion: "14.0.0",
92
+ version: "22.2.2",
93
+ ngImport: i0,
94
+ type: FormlySelectOptionsPipe,
95
+ isStandalone: true,
96
+ name: "formlySelectOptions"
97
+ });
98
+ }
99
+ };
100
+ i0.ɵɵngDeclareClassMetadata({
101
+ minVersion: "12.0.0",
102
+ version: "22.2.2",
103
+ ngImport: i0,
104
+ type: FormlySelectOptionsPipe,
105
+ decorators: [{
106
+ type: Pipe,
107
+ args: [{
108
+ name: "formlySelectOptions",
109
+ standalone: true
110
+ }]
111
+ }]
112
+ });
113
+ var LegacyFormlySelectOptionsPipe = class LegacyFormlySelectOptionsPipe extends FormlySelectOptionsPipe {
114
+ static {
115
+ this.ɵfac = i0.ɵɵngDeclareFactory({
116
+ minVersion: "12.0.0",
117
+ version: "22.2.2",
118
+ ngImport: i0,
119
+ type: LegacyFormlySelectOptionsPipe,
120
+ deps: null,
121
+ target: i0.ɵɵFactoryTarget.Pipe
122
+ });
123
+ }
124
+ static {
125
+ this.ɵpipe = i0.ɵɵngDeclarePipe({
126
+ minVersion: "14.0.0",
127
+ version: "22.2.2",
128
+ ngImport: i0,
129
+ type: LegacyFormlySelectOptionsPipe,
130
+ isStandalone: false,
131
+ name: "formlySelectOptions"
132
+ });
133
+ }
134
+ };
135
+ i0.ɵɵngDeclareClassMetadata({
136
+ minVersion: "12.0.0",
137
+ version: "22.2.2",
138
+ ngImport: i0,
139
+ type: LegacyFormlySelectOptionsPipe,
140
+ decorators: [{
141
+ type: Pipe,
142
+ args: [{
143
+ name: "formlySelectOptions",
144
+ standalone: false
145
+ }]
146
+ }]
147
+ });
148
+ var FormlySelectModule = class FormlySelectModule {
149
+ static {
150
+ this.ɵfac = i0.ɵɵngDeclareFactory({
151
+ minVersion: "12.0.0",
152
+ version: "22.2.2",
153
+ ngImport: i0,
154
+ type: FormlySelectModule,
155
+ deps: [],
156
+ target: i0.ɵɵFactoryTarget.NgModule
157
+ });
158
+ }
159
+ static {
160
+ this.ɵmod = i0.ɵɵngDeclareNgModule({
161
+ minVersion: "14.0.0",
162
+ version: "22.2.2",
163
+ ngImport: i0,
164
+ type: FormlySelectModule,
165
+ declarations: [LegacyFormlySelectOptionsPipe],
166
+ exports: [LegacyFormlySelectOptionsPipe]
167
+ });
168
+ }
169
+ static {
170
+ this.ɵinj = i0.ɵɵngDeclareInjector({
171
+ minVersion: "12.0.0",
172
+ version: "22.2.2",
173
+ ngImport: i0,
174
+ type: FormlySelectModule
175
+ });
176
+ }
177
+ };
178
+ i0.ɵɵngDeclareClassMetadata({
179
+ minVersion: "12.0.0",
180
+ version: "22.2.2",
181
+ ngImport: i0,
182
+ type: FormlySelectModule,
183
+ decorators: [{
184
+ type: NgModule,
185
+ args: [{
186
+ declarations: [LegacyFormlySelectOptionsPipe],
187
+ exports: [LegacyFormlySelectOptionsPipe]
188
+ }]
189
+ }]
190
+ });
134
191
  export { FormlySelectModule, FormlySelectOptionsPipe, LegacyFormlySelectOptionsPipe };
135
- //# sourceMappingURL=ngx-formly-core-select.mjs.map
192
+
193
+ //# sourceMappingURL=ngx-formly-core-select.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"ngx-formly-core-select.mjs","sources":["../../../../src/core/select/src/select-options.pipe.ts","../../../../src/core/select/src/select.module.ts","../../../../src/core/select/src/ngx-formly-core-select.ts"],"sourcesContent":["import { OnDestroy, Pipe, PipeTransform } from '@angular/core';\nimport { BehaviorSubject, isObservable, Observable, Subscription } from 'rxjs';\nimport { filter, map, tap } from 'rxjs/operators';\nimport { FormlyFieldConfig, FormlyFieldProps } from '@ngx-formly/core';\n\nexport interface FormlySelectOption {\n label: string;\n disabled?: boolean;\n value?: any;\n group?: FormlySelectOption[];\n}\n\nexport interface FormlyFieldSelectProps extends FormlyFieldProps {\n groupProp?: string | ((option: any) => string);\n labelProp?: string | ((option: any) => string);\n valueProp?: string | ((option: any) => any);\n disabledProp?: string | ((option: any) => boolean);\n mapProp?: (option: any) => FormlySelectOption;\n}\n\ntype ITransformOption = {\n labelProp: (option: any) => string;\n valueProp: (option: any) => any;\n disabledProp: (option: any) => boolean;\n groupProp: (option: any) => string;\n mapProp?: (option: any) => FormlySelectOption;\n};\n\n@Pipe({ name: 'formlySelectOptions', standalone: true })\nexport class FormlySelectOptionsPipe implements PipeTransform, OnDestroy {\n private _subscription: Subscription;\n private _options: BehaviorSubject<any[]>;\n\n transform(options: any, field?: FormlyFieldConfig): Observable<FormlySelectOption[]> {\n if (!isObservable(options)) {\n options = this.observableOf(options, field);\n } else {\n this.dispose();\n }\n\n return (options as Observable<any>).pipe(map((value) => this.transformOptions(value, field)));\n }\n\n ngOnDestroy(): void {\n this.dispose();\n }\n\n private transformOptions(options: any[], field?: FormlyFieldConfig): FormlySelectOption[] {\n const to = this.transformSelectProps(field);\n\n const opts: FormlySelectOption[] = [];\n const groups: { [id: string]: number } = {};\n\n options?.forEach((option) => {\n if (to.mapProp) {\n const mapped = to.mapProp(option);\n opts.push(mapped);\n } else {\n const o = this.transformOption(option, to);\n if (o.group) {\n const id = groups[o.label];\n if (id === undefined) {\n groups[o.label] = opts.push(o) - 1;\n } else {\n o.group.forEach((o) => opts[id].group.push(o));\n }\n } else {\n opts.push(o);\n }\n }\n });\n\n return opts;\n }\n\n private transformOption(option: any, props: ITransformOption): FormlySelectOption {\n const group = props.groupProp(option);\n if (Array.isArray(group)) {\n return {\n label: props.labelProp(option),\n group: group.map((opt) => this.transformOption(opt, props)),\n };\n }\n\n option = {\n label: props.labelProp(option),\n value: props.valueProp(option),\n disabled: !!props.disabledProp(option),\n };\n\n if (group) {\n return { label: group, group: [option] };\n }\n\n return option;\n }\n\n private transformSelectProps(field?: FormlyFieldConfig): ITransformOption {\n const props = field?.props || field?.templateOptions || {};\n const selectPropFn = (prop: any) => (typeof prop === 'function' ? prop : (o: any) => o[prop]);\n\n return {\n groupProp: selectPropFn(props.groupProp || 'group'),\n labelProp: selectPropFn(props.labelProp || 'label'),\n valueProp: selectPropFn(props.valueProp || 'value'),\n disabledProp: selectPropFn(props.disabledProp || 'disabled'),\n mapProp: props.mapProp,\n };\n }\n\n private dispose() {\n if (this._options) {\n this._options.complete();\n this._options = null;\n }\n\n if (this._subscription) {\n this._subscription.unsubscribe();\n this._subscription = null;\n }\n }\n\n private observableOf(options: any, f?: FormlyFieldConfig) {\n this.dispose();\n if (f && f.options && f.options.fieldChanges) {\n this._subscription = f.options.fieldChanges\n .pipe(\n filter(({ property, type, field }) => {\n return (\n type === 'expressionChanges' &&\n (property.indexOf('templateOptions.options') === 0 || property.indexOf('props.options') === 0) &&\n field === f &&\n Array.isArray(field.props.options) &&\n !!this._options\n );\n }),\n tap(() => this._options.next(f.props.options as any)),\n )\n .subscribe();\n }\n\n this._options = new BehaviorSubject(options);\n return this._options.asObservable();\n }\n}\n\n@Pipe({ name: 'formlySelectOptions', standalone: false })\nexport class LegacyFormlySelectOptionsPipe extends FormlySelectOptionsPipe implements PipeTransform, OnDestroy {}\n","import { NgModule } from '@angular/core';\nimport { LegacyFormlySelectOptionsPipe } from './select-options.pipe';\n\n@NgModule({\n declarations: [LegacyFormlySelectOptionsPipe],\n exports: [LegacyFormlySelectOptionsPipe],\n})\nexport class FormlySelectModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;MA6Ba,uBAAuB,CAAA;IAIlC,SAAS,CAAC,OAAY,EAAE,KAAyB,EAAA;AAC/C,QAAA,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,EAAE;YAC1B,OAAO,GAAG,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE,KAAK,CAAC;QAC7C;aAAO;YACL,IAAI,CAAC,OAAO,EAAE;QAChB;QAEA,OAAQ,OAA2B,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,KAAK,KA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A,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAAA;6GAAvB,uBAAuB,EAAA,YAAA,EAAA,IAAA,EAAA,IAAA,EAAA,qBAAA,EAAA,CAAA,CAAA;;4FAAvB,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBADnC,IAAI;AAAC,YAAA,IAAA,EAAA,CAAA,EAAE,IAAI,EAAE,qBAAqB,EAAE,UAAU,EAAE,IAAI,EAAE;;AAuHjD,MAAO,6BAA8B,SAAQ,uBAAuB,CAAA;+GAA7D,6BAA6B,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAAA;6GAA7B,6BAA6B,EAAA,YAAA,EAAA,KAAA,EAAA,IAAA,EAAA,qBAAA,EAAA,CAAA,CAAA;;4FAA7B,6BAA6B,EAAA,UAAA,EAAA,CAAA;kBADzC,IAAI;AAAC,YAAA,IAAA,EAAA,CAAA,EAAE,IAAI,EAAE,qBAAqB,EAAE,UAAU,EAAE,KAAK,EAAE;;;MC3I3C,kBAAkB,CAAA;+GAAlB,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;gHAAlB,kBAAkB,EAAA,YAAA,EAAA,CAHd,6BAA6B,CAAA,EAAA,OAAA,EAAA,CAClC,6BAA6B,CAAA,EAAA,CAAA,CAAA;gHAE5B,kBAAkB,EAAA,CAAA,CAAA;;4FAAlB,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAJ9B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,6BAA6B,CAAC;oBAC7C,OAAO,EAAE,CAAC,6BAA6B,CAAC;AACzC,iBAAA;;;ACND;;AAEG;;;;"}
1
+ {"version":3,"file":"ngx-formly-core-select.mjs","names":[],"sources":["../../../../src/core/select/src/select-options.pipe.ts","../../../../src/core/select/src/select.module.ts"],"sourcesContent":["import { OnDestroy, Pipe, PipeTransform } from '@angular/core';\nimport { BehaviorSubject, isObservable, Observable, Subscription } from 'rxjs';\nimport { filter, map, tap } from 'rxjs/operators';\nimport { FormlyFieldConfig, FormlyFieldProps } from '@ngx-formly/core';\n\nexport interface FormlySelectOption {\n label: string;\n disabled?: boolean;\n value?: any;\n group?: FormlySelectOption[];\n}\n\nexport interface FormlyFieldSelectProps extends FormlyFieldProps {\n groupProp?: string | ((option: any) => string);\n labelProp?: string | ((option: any) => string);\n valueProp?: string | ((option: any) => any);\n disabledProp?: string | ((option: any) => boolean);\n mapProp?: (option: any) => FormlySelectOption;\n}\n\ntype ITransformOption = {\n labelProp: (option: any) => string;\n valueProp: (option: any) => any;\n disabledProp: (option: any) => boolean;\n groupProp: (option: any) => string;\n mapProp?: (option: any) => FormlySelectOption;\n};\n\n@Pipe({ name: 'formlySelectOptions', standalone: true })\nexport class FormlySelectOptionsPipe implements PipeTransform, OnDestroy {\n private _subscription: Subscription;\n private _options: BehaviorSubject<any[]>;\n\n transform(options: any, field?: FormlyFieldConfig): Observable<FormlySelectOption[]> {\n if (!isObservable(options)) {\n options = this.observableOf(options, field);\n } else {\n this.dispose();\n }\n\n return (options as Observable<any>).pipe(map((value) => this.transformOptions(value, field)));\n }\n\n ngOnDestroy(): void {\n this.dispose();\n }\n\n private transformOptions(options: any[], field?: FormlyFieldConfig): FormlySelectOption[] {\n const to = this.transformSelectProps(field);\n\n const opts: FormlySelectOption[] = [];\n const groups: { [id: string]: number } = {};\n\n options?.forEach((option) => {\n if (to.mapProp) {\n const mapped = to.mapProp(option);\n opts.push(mapped);\n } else {\n const o = this.transformOption(option, to);\n if (o.group) {\n const id = groups[o.label];\n if (id === undefined) {\n groups[o.label] = opts.push(o) - 1;\n } else {\n o.group.forEach((o) => opts[id].group.push(o));\n }\n } else {\n opts.push(o);\n }\n }\n });\n\n return opts;\n }\n\n private transformOption(option: any, props: ITransformOption): FormlySelectOption {\n const group = props.groupProp(option);\n if (Array.isArray(group)) {\n return {\n label: props.labelProp(option),\n group: group.map((opt) => this.transformOption(opt, props)),\n };\n }\n\n option = {\n label: props.labelProp(option),\n value: props.valueProp(option),\n disabled: !!props.disabledProp(option),\n };\n\n if (group) {\n return { label: group, group: [option] };\n }\n\n return option;\n }\n\n private transformSelectProps(field?: FormlyFieldConfig): ITransformOption {\n const props = field?.props || field?.templateOptions || {};\n const selectPropFn = (prop: any) => (typeof prop === 'function' ? prop : (o: any) => o[prop]);\n\n return {\n groupProp: selectPropFn(props.groupProp || 'group'),\n labelProp: selectPropFn(props.labelProp || 'label'),\n valueProp: selectPropFn(props.valueProp || 'value'),\n disabledProp: selectPropFn(props.disabledProp || 'disabled'),\n mapProp: props.mapProp,\n };\n }\n\n private dispose() {\n if (this._options) {\n this._options.complete();\n this._options = null;\n }\n\n if (this._subscription) {\n this._subscription.unsubscribe();\n this._subscription = null;\n }\n }\n\n private observableOf(options: any, f?: FormlyFieldConfig) {\n this.dispose();\n if (f && f.options && f.options.fieldChanges) {\n this._subscription = f.options.fieldChanges\n .pipe(\n filter(({ property, type, field }) => {\n return (\n type === 'expressionChanges' &&\n (property.indexOf('templateOptions.options') === 0 || property.indexOf('props.options') === 0) &&\n field === f &&\n Array.isArray(field.props.options) &&\n !!this._options\n );\n }),\n tap(() => this._options.next(f.props.options as any)),\n )\n .subscribe();\n }\n\n this._options = new BehaviorSubject(options);\n return this._options.asObservable();\n }\n}\n\n@Pipe({ name: 'formlySelectOptions', standalone: false })\nexport class LegacyFormlySelectOptionsPipe extends FormlySelectOptionsPipe implements PipeTransform, OnDestroy {}\n","import { NgModule } from '@angular/core';\nimport { LegacyFormlySelectOptionsPipe } from './select-options.pipe';\n\n@NgModule({\n declarations: [LegacyFormlySelectOptionsPipe],\n exports: [LegacyFormlySelectOptionsPipe],\n})\nexport class FormlySelectModule {}\n"],"mappings":";;;;AA6BA,IAAa,0BAAb,MAAa,wBAAuB;CAIlC,UAAU,SAAc,OAAyB;EAC/C,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1,118 @@
1
- import { TestBed } from '@angular/core/testing';
2
- import * as i0 from '@angular/core';
3
- import { Component } from '@angular/core';
4
- import * as i1 from '@ngx-formly/core';
5
- import { FormlyModule, FormlyFormBuilder } from '@ngx-formly/core';
6
- import { ReactiveFormsModule } from '@angular/forms';
7
- import { By } from '@angular/platform-browser';
8
-
1
+ import { TestBed } from "@angular/core/testing";
2
+ import * as i0 from "@angular/core";
3
+ import { ChangeDetectionStrategy, Component } from "@angular/core";
4
+ import * as i1 from "@ngx-formly/core";
5
+ import { FormlyFormBuilder, FormlyModule } from "@ngx-formly/core";
6
+ import { ReactiveFormsModule } from "@angular/forms";
7
+ import { By } from "@angular/platform-browser";
9
8
  function setInputs(fixture, inputs, detectChanges = true) {
10
- Object.keys(inputs).forEach((input) => {
11
- fixture.componentInstance[input] = inputs[input];
12
- });
13
- if (detectChanges !== false) {
14
- fixture.detectChanges();
15
- }
9
+ Object.keys(inputs).forEach((input) => {
10
+ fixture.componentInstance[input] = inputs[input];
11
+ });
12
+ if (detectChanges !== false) fixture.detectChanges();
16
13
  }
17
- function createComponent({ template, inputs, config, detectChanges, imports, declarations, providers, }) {
18
- TestBed.configureTestingModule({
19
- declarations: [TestComponent, ...(declarations || [])],
20
- imports: [ReactiveFormsModule, FormlyModule.forRoot(config), ...(imports || [])],
21
- providers: providers || [],
22
- teardown: { destroyAfterEach: false },
23
- }).overrideComponent(TestComponent, {
24
- set: {
25
- template,
26
- inputs: Object.keys(inputs),
27
- },
28
- });
29
- const fixture = TestBed.createComponent(TestComponent);
30
- Object.keys(inputs).forEach((input) => {
31
- fixture.componentInstance[input] = inputs[input];
32
- });
33
- setInputs(fixture, inputs, detectChanges);
34
- const utils = {
35
- fixture,
36
- detectChanges: () => fixture.detectChanges(),
37
- setInputs: (props) => setInputs(fixture, props),
38
- query: (selector) => fixture.debugElement.query(By.css(selector)),
39
- queryAll: (selector) => fixture.debugElement.queryAll(By.css(selector)),
40
- };
41
- Object.keys(inputs).forEach((input) => {
42
- Object.defineProperty(utils, input, {
43
- get: () => fixture.componentInstance[input],
44
- });
45
- });
46
- return utils;
14
+ function createComponent({ template, inputs, config, detectChanges, imports, declarations, providers }) {
15
+ TestBed.configureTestingModule({
16
+ declarations: [TestComponent, ...declarations || []],
17
+ imports: [
18
+ ReactiveFormsModule,
19
+ FormlyModule.forRoot(config),
20
+ ...imports || []
21
+ ],
22
+ providers: providers || [],
23
+ teardown: { destroyAfterEach: false }
24
+ }).overrideComponent(TestComponent, { set: {
25
+ template,
26
+ inputs: Object.keys(inputs)
27
+ } });
28
+ const fixture = TestBed.createComponent(TestComponent);
29
+ Object.keys(inputs).forEach((input) => {
30
+ fixture.componentInstance[input] = inputs[input];
31
+ });
32
+ setInputs(fixture, inputs, detectChanges);
33
+ const utils = {
34
+ fixture,
35
+ detectChanges: () => fixture.detectChanges(),
36
+ setInputs: (props) => setInputs(fixture, props),
37
+ query: (selector) => fixture.debugElement.query(By.css(selector)),
38
+ queryAll: (selector) => fixture.debugElement.queryAll(By.css(selector))
39
+ };
40
+ Object.keys(inputs).forEach((input) => {
41
+ Object.defineProperty(utils, input, { get: () => fixture.componentInstance[input] });
42
+ });
43
+ return utils;
47
44
  }
48
45
  function createFieldComponent(field, config = {}) {
49
- const model = field?.model || {};
50
- const options = field?.options || {};
51
- delete field?.model;
52
- delete field?.options;
53
- const utils = createComponent({
54
- template: '<formly-field [field]="field"></formly-field>',
55
- inputs: { field },
56
- ...config,
57
- detectChanges: false,
58
- });
59
- const builder = utils.fixture.componentRef.instance.builder;
60
- builder.build({ model, options, fieldGroup: [field] });
61
- utils.detectChanges();
62
- const setInputs = utils.setInputs;
63
- utils.setInputs = (props) => {
64
- if (props.field) {
65
- builder.build(props.field);
66
- }
67
- setInputs(props);
68
- };
69
- return utils;
70
- }
71
- class TestComponent {
72
- constructor(builder) {
73
- this.builder = builder;
74
- }
75
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: TestComponent, deps: [{ token: i1.FormlyFormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
76
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.25", type: TestComponent, isStandalone: false, selector: "formly-test-component", providers: [FormlyFormBuilder], ngImport: i0, template: '', isInline: true }); }
46
+ const model = field?.model || {};
47
+ const options = field?.options || {};
48
+ delete field?.model;
49
+ delete field?.options;
50
+ const utils = createComponent({
51
+ template: "<formly-field [field]=\"field\"></formly-field>",
52
+ inputs: { field },
53
+ ...config,
54
+ detectChanges: false
55
+ });
56
+ const builder = utils.fixture.componentRef.instance.builder;
57
+ builder.build({
58
+ model,
59
+ options,
60
+ fieldGroup: [field]
61
+ });
62
+ utils.detectChanges();
63
+ const setInputs = utils.setInputs;
64
+ utils.setInputs = (props) => {
65
+ if (props.field) builder.build(props.field);
66
+ setInputs(props);
67
+ };
68
+ return utils;
77
69
  }
78
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: TestComponent, decorators: [{
79
- type: Component,
80
- args: [{
81
- selector: 'formly-test-component',
82
- template: '',
83
- providers: [FormlyFormBuilder],
84
- standalone: false,
85
- }]
86
- }], ctorParameters: () => [{ type: i1.FormlyFormBuilder }] });
87
-
88
- /**
89
- * Generated bundle index. Do not edit.
90
- */
91
-
70
+ var TestComponent = class TestComponent {
71
+ constructor(builder) {
72
+ this.builder = builder;
73
+ }
74
+ static {
75
+ this.ɵfac = i0.ɵɵngDeclareFactory({
76
+ minVersion: "12.0.0",
77
+ version: "22.2.2",
78
+ ngImport: i0,
79
+ type: TestComponent,
80
+ deps: [{ token: i1.FormlyFormBuilder }],
81
+ target: i0.ɵɵFactoryTarget.Component
82
+ });
83
+ }
84
+ static {
85
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
86
+ minVersion: "14.0.0",
87
+ version: "22.2.2",
88
+ type: TestComponent,
89
+ isStandalone: false,
90
+ selector: "formly-test-component",
91
+ providers: [FormlyFormBuilder],
92
+ ngImport: i0,
93
+ template: "",
94
+ isInline: true,
95
+ changeDetection: i0.ChangeDetectionStrategy.Eager
96
+ });
97
+ }
98
+ };
99
+ i0.ɵɵngDeclareClassMetadata({
100
+ minVersion: "12.0.0",
101
+ version: "22.2.2",
102
+ ngImport: i0,
103
+ type: TestComponent,
104
+ decorators: [{
105
+ type: Component,
106
+ args: [{
107
+ selector: "formly-test-component",
108
+ template: "",
109
+ providers: [FormlyFormBuilder],
110
+ changeDetection: ChangeDetectionStrategy.Eager,
111
+ standalone: false
112
+ }]
113
+ }],
114
+ ctorParameters: () => [{ type: i1.FormlyFormBuilder }]
115
+ });
92
116
  export { createComponent, createFieldComponent };
93
- //# sourceMappingURL=ngx-formly-core-testing.mjs.map
117
+
118
+ //# sourceMappingURL=ngx-formly-core-testing.mjs.map