swoop-common 2.0.27 → 2.0.28
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/api/generated/core/models/DTOComponentCreate.d.ts +1 -2
- package/dist/api/generated/core/models/DTOComponentRead.d.ts +1 -1
- package/dist/api/generated/core/models/DTOComponentUpdate.d.ts +6 -6
- package/dist/api/generated/core/models/DTOItineraryCreate.d.ts +1 -1
- package/dist/api/generated/core/models/DTOItineraryEntity.d.ts +1 -1
- package/dist/api/generated/core/models/DTOItineraryRead.d.ts +1 -1
- package/dist/api/generated/core/models/DTOItineraryUpdate.d.ts +1 -1
- package/dist/api/generated/itinerary/models/DTOComponentCreate.d.ts +1 -2
- package/dist/api/generated/itinerary/models/DTOComponentRead.d.ts +1 -1
- package/dist/api/generated/itinerary/models/DTOComponentUpdate.d.ts +6 -6
- package/dist/api/generated/itinerary/models/DTOItineraryCreate.d.ts +1 -1
- package/dist/api/generated/itinerary/models/DTOItineraryEntity.d.ts +1 -1
- package/dist/api/generated/itinerary/models/DTOItineraryRead.d.ts +1 -1
- package/dist/api/generated/itinerary/models/DTOItineraryUpdate.d.ts +1 -1
- package/dist/rendering/renderers/ComponentPicker.d.ts +1 -1
- package/dist/rendering/schema/formBuilders/formBuilderJsonSchema.js +1 -1
- package/dist/rendering/schema/generate/jsonSchemaGenerate.js +2 -2
- package/dist/rendering/schema/generate/uiSchemaGenerate.js +1 -1
- package/package.json +1 -1
|
@@ -7,10 +7,9 @@ export type DTOComponentCreate = {
|
|
|
7
7
|
componentFields: Array<Field>;
|
|
8
8
|
partners: Array<string>;
|
|
9
9
|
details: ComponentDetails;
|
|
10
|
-
bundle
|
|
10
|
+
bundle: Bundle;
|
|
11
11
|
startDate?: string | null;
|
|
12
12
|
endDate?: string | null;
|
|
13
13
|
duration?: number | null;
|
|
14
14
|
state: string;
|
|
15
|
-
templateId?: string;
|
|
16
15
|
};
|
|
@@ -2,13 +2,13 @@ import type { Bundle } from './Bundle';
|
|
|
2
2
|
import type { ComponentDetails } from './ComponentDetails';
|
|
3
3
|
import type { Field } from './Field';
|
|
4
4
|
export type DTOComponentUpdate = {
|
|
5
|
-
name
|
|
6
|
-
componentFields
|
|
7
|
-
partners
|
|
8
|
-
details
|
|
9
|
-
bundle
|
|
5
|
+
name: string;
|
|
6
|
+
componentFields: Array<Field>;
|
|
7
|
+
partners: Array<string>;
|
|
8
|
+
details: ComponentDetails;
|
|
9
|
+
bundle: Bundle;
|
|
10
10
|
startDate?: string | null;
|
|
11
11
|
endDate?: string | null;
|
|
12
12
|
duration?: number | null;
|
|
13
|
-
state
|
|
13
|
+
state: string;
|
|
14
14
|
};
|
|
@@ -7,10 +7,9 @@ export type DTOComponentCreate = {
|
|
|
7
7
|
componentFields: Array<Field>;
|
|
8
8
|
partners: Array<string>;
|
|
9
9
|
details: ComponentDetails;
|
|
10
|
-
bundle
|
|
10
|
+
bundle: Bundle;
|
|
11
11
|
startDate?: string | null;
|
|
12
12
|
endDate?: string | null;
|
|
13
13
|
duration?: number | null;
|
|
14
14
|
state: string;
|
|
15
|
-
templateId?: string;
|
|
16
15
|
};
|
|
@@ -2,13 +2,13 @@ import type { Bundle } from './Bundle';
|
|
|
2
2
|
import type { ComponentDetails } from './ComponentDetails';
|
|
3
3
|
import type { Field } from './Field';
|
|
4
4
|
export type DTOComponentUpdate = {
|
|
5
|
-
name
|
|
6
|
-
componentFields
|
|
7
|
-
partners
|
|
8
|
-
details
|
|
9
|
-
bundle
|
|
5
|
+
name: string;
|
|
6
|
+
componentFields: Array<Field>;
|
|
7
|
+
partners: Array<string>;
|
|
8
|
+
details: ComponentDetails;
|
|
9
|
+
bundle: Bundle;
|
|
10
10
|
startDate?: string | null;
|
|
11
11
|
endDate?: string | null;
|
|
12
12
|
duration?: number | null;
|
|
13
|
-
state
|
|
13
|
+
state: string;
|
|
14
14
|
};
|
|
@@ -12,7 +12,7 @@ export declare const fetchComponents: () => Promise<{
|
|
|
12
12
|
componentFields: Array<import("../../api/generated/core").Field>;
|
|
13
13
|
partners: Array<string>;
|
|
14
14
|
details: import("../../api/generated/core").ComponentDetails;
|
|
15
|
-
bundle
|
|
15
|
+
bundle: import("../../api/generated/core").Bundle;
|
|
16
16
|
startDate?: string | null;
|
|
17
17
|
endDate?: string | null;
|
|
18
18
|
duration?: number | null;
|
|
@@ -12,7 +12,7 @@ export const generateJsonSchema = (formSchema, stage, onlyEditableFields) => {
|
|
|
12
12
|
formSchema.forEach((s) => {
|
|
13
13
|
if (stage < +s.existsFrom)
|
|
14
14
|
return;
|
|
15
|
-
if (onlyEditableFields && !
|
|
15
|
+
if (onlyEditableFields && !s.editableIn.map(Number).includes(stage))
|
|
16
16
|
return;
|
|
17
17
|
const fieldSchema = defaultConverter(s, stage);
|
|
18
18
|
built.properties[generateFieldId(s.name)] = fieldSchema;
|
|
@@ -76,5 +76,5 @@ const defaultConverter = (field, stage, omitTitle, isChild) => {
|
|
|
76
76
|
? { "x-templateIds": (_e = field.componentOptions) === null || _e === void 0 ? void 0 : _e.templateIds }
|
|
77
77
|
: {};
|
|
78
78
|
let title = omitTitle ? undefined : field.name;
|
|
79
|
-
return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, (!isChild && !
|
|
79
|
+
return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, (!isChild && !field.editableIn.map(Number).includes(stage) && { readOnly: true })), { title, type: schema.schema.type, "x-type": schema.schema["x-type"] }), templates), (schema.schema.type === "object" && { properties })), { required: requiredFields }), (enumOpts && { enum: enumOpts })), (stagedEnumOpts && { items: { enum: stagedEnumOpts, type: "string" } })), (arrayItems && { items: arrayItems })), (field.fieldType === "object" && { properties }));
|
|
80
80
|
};
|
|
@@ -5,7 +5,7 @@ export const generateUiSchema = (formSchema, stage, onlyEditableFields) => {
|
|
|
5
5
|
formSchema.forEach((field) => {
|
|
6
6
|
if (stage < +field.existsFrom)
|
|
7
7
|
return;
|
|
8
|
-
if (onlyEditableFields && !
|
|
8
|
+
if (onlyEditableFields && !field.editableIn.map(Number).includes(stage))
|
|
9
9
|
return;
|
|
10
10
|
uiSchema.elements.push(uiFieldSchemaFromFieldDefinition(field));
|
|
11
11
|
});
|