@isardsat/editorial-common 6.18.0 → 6.18.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/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @isardsat/editorial-common
2
2
 
3
+ ## 6.18.2
4
+
5
+ ### Patch Changes
6
+
7
+ - b3b3572: Fix backward select compatibility
8
+
9
+ ## 6.18.1
10
+
11
+ ### Patch Changes
12
+
13
+ - 2d743c4: Update content fetching to ensure real-time diff without caching
14
+
3
15
  ## 6.18.0
4
16
 
5
17
  ### Minor Changes
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Checks if the options value is a reference to another field.
2
+ * Checks if the choicesFixed value is a reference to another field.
3
3
  * References are in the format $key_field
4
4
  */
5
- export declare function getOptionsReference(options: string[] | undefined): string | null;
5
+ export declare function getChoicesReference(choices: string[] | undefined): string | null;
@@ -1,10 +1,10 @@
1
1
  /**
2
- * Checks if the options value is a reference to another field.
2
+ * Checks if the choicesFixed value is a reference to another field.
3
3
  * References are in the format $key_field
4
4
  */
5
- export function getOptionsReference(options) {
6
- if (!options || options.length !== 1)
5
+ export function getChoicesReference(choices) {
6
+ if (!choices || choices.length !== 1)
7
7
  return null;
8
- const match = options[0].match(/^\$(.+)$/);
8
+ const match = choices[0].match(/^\$(.+)$/);
9
9
  return match ? match[1] : null;
10
10
  }
package/dist/schemas.d.ts CHANGED
@@ -71,9 +71,9 @@ export declare const EditorialSchemaItemFieldSchema: z.ZodObject<{
71
71
  placeholder: z.ZodOptional<z.ZodString>;
72
72
  optional: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
73
73
  showInSummary: z.ZodOptional<z.ZodBoolean>;
74
- options: z.ZodOptional<z.ZodArray<z.ZodString>>;
75
- maxSelectedOptions: z.ZodOptional<z.ZodNumber>;
76
- minSelectedOptions: z.ZodOptional<z.ZodNumber>;
74
+ choicesFixed: z.ZodOptional<z.ZodArray<z.ZodString>>;
75
+ maxSelectedChoices: z.ZodOptional<z.ZodNumber>;
76
+ minSelectedChoices: z.ZodOptional<z.ZodNumber>;
77
77
  isUploadedFile: z.ZodOptional<z.ZodBoolean>;
78
78
  }, z.core.$loose>;
79
79
  export declare const EditorialSchemaItemSchema: z.ZodObject<{
@@ -98,9 +98,9 @@ export declare const EditorialSchemaItemSchema: z.ZodObject<{
98
98
  placeholder: z.ZodOptional<z.ZodString>;
99
99
  optional: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
100
100
  showInSummary: z.ZodOptional<z.ZodBoolean>;
101
- options: z.ZodOptional<z.ZodArray<z.ZodString>>;
102
- maxSelectedOptions: z.ZodOptional<z.ZodNumber>;
103
- minSelectedOptions: z.ZodOptional<z.ZodNumber>;
101
+ choicesFixed: z.ZodOptional<z.ZodArray<z.ZodString>>;
102
+ maxSelectedChoices: z.ZodOptional<z.ZodNumber>;
103
+ minSelectedChoices: z.ZodOptional<z.ZodNumber>;
104
104
  isUploadedFile: z.ZodOptional<z.ZodBoolean>;
105
105
  }, z.core.$loose>>;
106
106
  }, z.core.$strip>;
@@ -126,9 +126,9 @@ export declare const EditorialSchemaSchema: z.ZodRecord<z.ZodString, z.ZodObject
126
126
  placeholder: z.ZodOptional<z.ZodString>;
127
127
  optional: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
128
128
  showInSummary: z.ZodOptional<z.ZodBoolean>;
129
- options: z.ZodOptional<z.ZodArray<z.ZodString>>;
130
- maxSelectedOptions: z.ZodOptional<z.ZodNumber>;
131
- minSelectedOptions: z.ZodOptional<z.ZodNumber>;
129
+ choicesFixed: z.ZodOptional<z.ZodArray<z.ZodString>>;
130
+ maxSelectedChoices: z.ZodOptional<z.ZodNumber>;
131
+ minSelectedChoices: z.ZodOptional<z.ZodNumber>;
132
132
  isUploadedFile: z.ZodOptional<z.ZodBoolean>;
133
133
  }, z.core.$loose>>;
134
134
  }, z.core.$strip>>;
package/dist/schemas.js CHANGED
@@ -67,9 +67,9 @@ export const EditorialSchemaItemFieldSchema = z.looseObject({
67
67
  placeholder: z.string().optional(),
68
68
  optional: z.boolean().optional().default(false),
69
69
  showInSummary: z.boolean().optional(),
70
- options: z.array(z.string()).optional(),
71
- maxSelectedOptions: z.number().optional(),
72
- minSelectedOptions: z.number().optional(),
70
+ choicesFixed: z.array(z.string()).optional(),
71
+ maxSelectedChoices: z.number().optional(),
72
+ minSelectedChoices: z.number().optional(),
73
73
  isUploadedFile: z.boolean().optional(),
74
74
  });
75
75
  export const EditorialSchemaItemSchema = z.object({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@isardsat/editorial-common",
3
- "version": "6.18.0",
3
+ "version": "6.18.2",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/src/data-utils.ts CHANGED
@@ -1,12 +1,12 @@
1
1
  /**
2
- * Checks if the options value is a reference to another field.
2
+ * Checks if the choicesFixed value is a reference to another field.
3
3
  * References are in the format $key_field
4
4
  */
5
- export function getOptionsReference(
6
- options: string[] | undefined,
5
+ export function getChoicesReference(
6
+ choices: string[] | undefined,
7
7
  ): string | null {
8
- if (!options || options.length !== 1) return null;
8
+ if (!choices || choices.length !== 1) return null;
9
9
 
10
- const match = options[0].match(/^\$(.+)$/);
10
+ const match = choices[0].match(/^\$(.+)$/);
11
11
  return match ? match[1] : null;
12
12
  }
package/src/schemas.ts CHANGED
@@ -87,9 +87,9 @@ export const EditorialSchemaItemFieldSchema = z.looseObject({
87
87
  placeholder: z.string().optional(),
88
88
  optional: z.boolean().optional().default(false),
89
89
  showInSummary: z.boolean().optional(),
90
- options: z.array(z.string()).optional(),
91
- maxSelectedOptions: z.number().optional(),
92
- minSelectedOptions: z.number().optional(),
90
+ choicesFixed: z.array(z.string()).optional(),
91
+ maxSelectedChoices: z.number().optional(),
92
+ minSelectedChoices: z.number().optional(),
93
93
  isUploadedFile: z.boolean().optional(),
94
94
  });
95
95