swoop-common 2.1.30 → 2.1.32

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.
@@ -17,4 +17,6 @@ export type ComponentInstance = {
17
17
  endDate?: string | null;
18
18
  isNew?: boolean;
19
19
  bookingStatus?: BookingStatus;
20
+ negotiatedDiscount?: number;
21
+ nonCommissionableAmount?: number;
20
22
  };
@@ -17,4 +17,6 @@ export type ComponentInstance = {
17
17
  endDate?: string | null;
18
18
  isNew?: boolean;
19
19
  bookingStatus?: BookingStatus;
20
+ negotiatedDiscount?: number;
21
+ nonCommissionableAmount?: number;
20
22
  };
@@ -27,7 +27,7 @@ export const generateJsonSchema = (formSchema, stage, onlyEditableFields) => {
27
27
  }
28
28
  };
29
29
  const defaultConverter = (field, stage, omitTitle, isChild) => {
30
- var _a, _b, _c, _d, _e;
30
+ var _a, _b, _c, _d;
31
31
  // Default field type
32
32
  field.fieldType = (_a = field.fieldType) !== null && _a !== void 0 ? _a : "string";
33
33
  let schema = getType(field.fieldType);
@@ -71,8 +71,9 @@ const defaultConverter = (field, stage, omitTitle, isChild) => {
71
71
  : undefined;
72
72
  // Component (probably should change this)
73
73
  let templates = field.fieldType === "component"
74
- ? { "x-templateIds": (_e = field.componentOptions) === null || _e === void 0 ? void 0 : _e.templateIds }
74
+ ? { "x-templateIds": field.componentOptions["x-templateIds"] }
75
75
  : {};
76
+ console.log(templates);
76
77
  let title = omitTitle ? undefined : field.name;
77
78
  return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, (!isChild && !(Array.isArray(field.editableIn) ? 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 })), (field.fieldType === "object" && { required: requiredFields })), (enumOpts && { enum: enumOpts })), (stagedEnumOpts && { items: { enum: stagedEnumOpts, type: "string" } })), (arrayItems && { items: arrayItems })), (field.fieldType === "object" && { properties }));
78
79
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "swoop-common",
3
- "version": "2.1.30",
3
+ "version": "2.1.32",
4
4
  "main": "dist/api/index.js",
5
5
  "types": "dist/api/index.d.ts",
6
6
  "exports": {