@dev-crew-berlin/enter-js-utils 0.47.1 → 0.47.2
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/dist/models/field-group.js +5 -2
- package/dist/models/field.d.ts +30 -10
- package/package.json +1 -1
|
@@ -8,9 +8,12 @@ export class FieldGroups {
|
|
|
8
8
|
}
|
|
9
9
|
get fields() {
|
|
10
10
|
const fields = new Map();
|
|
11
|
-
for (const group of this._groups) {
|
|
11
|
+
for (const [groupIndex, group] of this._groups.entries()) {
|
|
12
12
|
for (const field of group.questions) {
|
|
13
|
-
fields.set(field.name,
|
|
13
|
+
fields.set(field.name, {
|
|
14
|
+
...field,
|
|
15
|
+
group: groupIndex.toString()
|
|
16
|
+
});
|
|
14
17
|
}
|
|
15
18
|
}
|
|
16
19
|
return fields;
|
package/dist/models/field.d.ts
CHANGED
|
@@ -1,11 +1,31 @@
|
|
|
1
1
|
import { components } from '../generated/api-schema';
|
|
2
|
-
export declare type StaticField = components['schemas']['StaticField']
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export declare type
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
export declare type
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
export declare type
|
|
2
|
+
export declare type StaticField = components['schemas']['StaticField'] & {
|
|
3
|
+
group: string;
|
|
4
|
+
};
|
|
5
|
+
export declare type TextField = components['schemas']['TextField'] & {
|
|
6
|
+
group: string;
|
|
7
|
+
};
|
|
8
|
+
export declare type EmailField = components['schemas']['EmailField'] & {
|
|
9
|
+
group: string;
|
|
10
|
+
};
|
|
11
|
+
export declare type NumberField = components['schemas']['NumberField'] & {
|
|
12
|
+
group: string;
|
|
13
|
+
};
|
|
14
|
+
export declare type CheckboxField = components['schemas']['CheckboxGroupField'] & {
|
|
15
|
+
group: string;
|
|
16
|
+
};
|
|
17
|
+
export declare type SingleCheckboxField = components['schemas']['CheckboxField'] & {
|
|
18
|
+
group: string;
|
|
19
|
+
};
|
|
20
|
+
export declare type RadioField = components['schemas']['RadioButtonGroupField'] & {
|
|
21
|
+
group: string;
|
|
22
|
+
};
|
|
23
|
+
export declare type SingleRadioField = components['schemas']['RadioButtonField'] & {
|
|
24
|
+
group: string;
|
|
25
|
+
};
|
|
26
|
+
export declare type SelectField = components['schemas']['DropdownField'] & {
|
|
27
|
+
group: string;
|
|
28
|
+
};
|
|
29
|
+
export declare type Field = components['schemas']['FieldGroup']['questions'][number] & {
|
|
30
|
+
group: string;
|
|
31
|
+
};
|