@beseif-solutions/prow-core 1.2.2 → 1.2.4
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/minified-utils/fields.d.ts +1 -1
- package/dist/minified-utils/locales.d.ts +1 -0
- package/dist/minified-utils/locales.js +1 -0
- package/dist/minified-utils/validation.js +2 -1
- package/package.json +1 -1
- package/src/minified-utils/fields.ts +3 -1
- package/src/minified-utils/locales.ts +2 -0
- package/src/minified-utils/validation.ts +10 -3
|
@@ -106,7 +106,7 @@ export type SelectFieldChoice<Values = string | number | boolean | File, Extend
|
|
|
106
106
|
key: string;
|
|
107
107
|
value: Values;
|
|
108
108
|
group?: string;
|
|
109
|
-
} & Extend;
|
|
109
|
+
} & Record<`experimental_${string}`, any> & Extend;
|
|
110
110
|
export type CustomDisplayTextField = {
|
|
111
111
|
format: `textarea` | `rich-text` | `markdown`;
|
|
112
112
|
};
|
|
@@ -137,6 +137,7 @@ const localizeProperties = (t, element) => {
|
|
|
137
137
|
return {
|
|
138
138
|
name: t(`${element.id}.name`, { fallback: true }),
|
|
139
139
|
description: t(`${element.id}.description`),
|
|
140
|
+
information: t(`${element.id}.information`),
|
|
140
141
|
...help && { help: help },
|
|
141
142
|
...instructions && { instructions: instructions },
|
|
142
143
|
};
|
|
@@ -50,7 +50,8 @@ const choiceSchema = (type) => joi_1.default.object({
|
|
|
50
50
|
key: joi_1.default.string().required(),
|
|
51
51
|
value: type.required(),
|
|
52
52
|
group: joi_1.default.string(),
|
|
53
|
-
}).
|
|
53
|
+
}).concat(joi_1.default.object()
|
|
54
|
+
.pattern(joi_1.default.string().regex(/^experimental_/), joi_1.default.any())).unknown();
|
|
54
55
|
const choicesSchema = (type) => joi_1.default.alternatives(joi_1.default.string(), joi_1.default.array().min(1)
|
|
55
56
|
.items(choiceSchema(type)));
|
|
56
57
|
const defaultSchema = (type) => joi_1.default.when(`as_array`, {
|
package/package.json
CHANGED
|
@@ -160,7 +160,9 @@ export type SelectFieldChoice<Values = string | number | boolean | File, Extend
|
|
|
160
160
|
key: string,
|
|
161
161
|
value: Values,
|
|
162
162
|
group?: string,
|
|
163
|
-
}
|
|
163
|
+
}
|
|
164
|
+
& Record<`experimental_${string}`, any>
|
|
165
|
+
& Extend;
|
|
164
166
|
|
|
165
167
|
/* custom display configuration */
|
|
166
168
|
export type CustomDisplayTextField = {
|
|
@@ -18,6 +18,7 @@ export type LocalizedField = {
|
|
|
18
18
|
export type LocalizedProperties = {
|
|
19
19
|
name: string,
|
|
20
20
|
description: string,
|
|
21
|
+
information?: string,
|
|
21
22
|
help?: Record<string, string>,
|
|
22
23
|
instructions?: string,
|
|
23
24
|
};
|
|
@@ -192,6 +193,7 @@ export const localizeProperties = (
|
|
|
192
193
|
return {
|
|
193
194
|
name: t(`${element.id}.name`, { fallback: true }),
|
|
194
195
|
description: t(`${element.id}.description`),
|
|
196
|
+
information: t(`${element.id}.information`),
|
|
195
197
|
...help && { help: help },
|
|
196
198
|
...instructions && { instructions: instructions },
|
|
197
199
|
};
|
|
@@ -50,8 +50,11 @@ const commonFieldSchema = () =>
|
|
|
50
50
|
then: Joi.number(),
|
|
51
51
|
otherwise: Joi.forbidden(),
|
|
52
52
|
}),
|
|
53
|
-
}).concat(
|
|
54
|
-
|
|
53
|
+
}).concat(
|
|
54
|
+
// experimental properties for custom front features
|
|
55
|
+
Joi.object()
|
|
56
|
+
.pattern(Joi.string().regex(/^experimental_/), Joi.any())
|
|
57
|
+
);
|
|
55
58
|
|
|
56
59
|
const types = [`any`, `string`, `number`, `boolean`, `date`, `datetime`, `time`, `dict`, `file`];
|
|
57
60
|
|
|
@@ -69,7 +72,11 @@ const choiceSchema = (type: Joi.Schema) =>
|
|
|
69
72
|
key: Joi.string().required(),
|
|
70
73
|
value: type.required(),
|
|
71
74
|
group: Joi.string(),
|
|
72
|
-
}).
|
|
75
|
+
}).concat(
|
|
76
|
+
// experimental properties for custom front features
|
|
77
|
+
Joi.object()
|
|
78
|
+
.pattern(Joi.string().regex(/^experimental_/), Joi.any())
|
|
79
|
+
).unknown();
|
|
73
80
|
|
|
74
81
|
const choicesSchema = (type: Joi.Schema) =>
|
|
75
82
|
Joi.alternatives(
|