@wise/dynamic-flow-client 2.8.6 → 2.8.8
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/build/i18n/zh_CN.json +1 -1
- package/build/i18n/zh_HK.json +1 -1
- package/build/main.js +32 -23
- package/build/main.min.js +1 -1
- package/build/types/legacy/jsonSchemaForm/schemaFormControl/utils/mapping-utils.d.ts +1 -1
- package/build/types/legacy/layout/button/utils.d.ts +1 -1
- package/build/types/revamp/domain/components/FormComponent.d.ts +7 -0
- package/build/types/revamp/domain/components/HiddenComponent.d.ts +11 -0
- package/build/types/revamp/domain/mappers/layout/buttonLayoutToComponent.d.ts +1 -1
- package/build/types/revamp/domain/mappers/layout/formLayoutToComponent.d.ts +1 -1
- package/build/types/revamp/domain/mappers/schema/constSchemaToComponent.d.ts +5 -0
- package/build/types/revamp/domain/mappers/utils/legacy-utils.d.ts +3 -1
- package/build/types/revamp/domain/types.d.ts +4 -2
- package/build/types/revamp/renderers/mappers/formComponentToProps.d.ts +4 -0
- package/build/types/revamp/renderers/mappers/hiddenComponentToProps.d.ts +2 -0
- package/build/types/revamp/renderers/types.d.ts +9 -0
- package/build/types/revamp/utils/type-utils.d.ts +2 -1
- package/build/types/revamp/wise/renderers/FormRenderer.d.ts +3 -0
- package/package.json +2 -2
package/build/i18n/zh_CN.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"dynamicFlows.ArraySchema.minItemsError": "请至少添加 {minItems} 项。",
|
|
7
7
|
"dynamicFlows.ArraySchema.removeItem": "移除",
|
|
8
8
|
"dynamicFlows.CameraCapture.CameraConnectionIssue.action": "重试",
|
|
9
|
-
"dynamicFlows.CameraCapture.CameraConnectionIssue.paragraph": "
|
|
9
|
+
"dynamicFlows.CameraCapture.CameraConnectionIssue.paragraph": "请检查是否连接,然后重试。",
|
|
10
10
|
"dynamicFlows.CameraCapture.CameraConnectionIssue.title": "我们无法访问您的摄像头",
|
|
11
11
|
"dynamicFlows.CameraCapture.CameraNotSupported.paragraph": "您目前使用的浏览器不支持摄像头。请尝试其他浏览器、设备或下载我们的应用。",
|
|
12
12
|
"dynamicFlows.CameraCapture.CameraNotSupported.title": "不支持摄像头",
|
package/build/i18n/zh_HK.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"dynamicFlows.ArraySchema.minItemsError": "請至少添加{minItems}項。",
|
|
7
7
|
"dynamicFlows.ArraySchema.removeItem": "移除",
|
|
8
8
|
"dynamicFlows.CameraCapture.CameraConnectionIssue.action": "再試一次",
|
|
9
|
-
"dynamicFlows.CameraCapture.CameraConnectionIssue.paragraph": "
|
|
9
|
+
"dynamicFlows.CameraCapture.CameraConnectionIssue.paragraph": "請檢查連線狀態,然後再試一次。",
|
|
10
10
|
"dynamicFlows.CameraCapture.CameraConnectionIssue.title": "我們無法取用你的相機",
|
|
11
11
|
"dynamicFlows.CameraCapture.CameraNotSupported.paragraph": "你目前使用的瀏覽器不支持相機。請嘗試使用其他瀏覽器或其他裝置,或者你可以下載我們的應用程式。",
|
|
12
12
|
"dynamicFlows.CameraCapture.CameraNotSupported.title": "不支持相機",
|
package/build/main.js
CHANGED
|
@@ -2432,18 +2432,25 @@ var getButtonPriority = (component) => {
|
|
|
2432
2432
|
const actionType = component.action.type;
|
|
2433
2433
|
return (_a = component.control) != null ? _a : actionType ? priorities[actionType] : "secondary";
|
|
2434
2434
|
};
|
|
2435
|
-
var
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2435
|
+
var contextToType = {
|
|
2436
|
+
positive: "positive",
|
|
2437
|
+
negative: "negative",
|
|
2438
|
+
neutral: "accent",
|
|
2439
|
+
warning: "accent"
|
|
2440
|
+
};
|
|
2441
|
+
var actionTypeToType = {
|
|
2442
|
+
primary: "accent",
|
|
2443
|
+
secondary: "accent",
|
|
2444
|
+
link: "accent",
|
|
2439
2445
|
positive: "positive",
|
|
2440
2446
|
negative: "negative"
|
|
2441
2447
|
};
|
|
2442
2448
|
var getButtonType = (component) => {
|
|
2443
|
-
|
|
2449
|
+
if (component.context) {
|
|
2450
|
+
return contextToType[component.context];
|
|
2451
|
+
}
|
|
2444
2452
|
const actionType = component.action.type;
|
|
2445
|
-
|
|
2446
|
-
return type === "neutral" ? "accent" : type;
|
|
2453
|
+
return actionType ? actionTypeToType[actionType] : "accent";
|
|
2447
2454
|
};
|
|
2448
2455
|
var getButtonSize = (size) => {
|
|
2449
2456
|
switch (size) {
|
|
@@ -4161,20 +4168,16 @@ var mapConstSchemaToOption = (schema, controlType) => {
|
|
|
4161
4168
|
return mapConstSchemaToRadioOption(schema);
|
|
4162
4169
|
}
|
|
4163
4170
|
};
|
|
4164
|
-
var mapConstSchemaToRadioOption = (schema) => {
|
|
4165
|
-
|
|
4166
|
-
|
|
4167
|
-
|
|
4168
|
-
|
|
4169
|
-
|
|
4170
|
-
|
|
4171
|
-
|
|
4172
|
-
|
|
4173
|
-
|
|
4174
|
-
label: schema.title,
|
|
4175
|
-
value: schema.const
|
|
4176
|
-
}, getOptionDescription(schema.title, schema.description)), getIconPropertyForSelectOption(schema.icon)), mapImage(schema.image)), getDisabled(schema.disabled)), mapKeywordsToSearchStrings(schema.keywords));
|
|
4177
|
-
};
|
|
4171
|
+
var mapConstSchemaToRadioOption = (schema) => __spreadValues(__spreadValues(__spreadValues({
|
|
4172
|
+
// TODO: LOW avoid type assertion -- using || '' would fail some tests
|
|
4173
|
+
label: schema.title,
|
|
4174
|
+
value: schema.const
|
|
4175
|
+
}, getRadioOptionDescription(schema.title, schema.description)), getAvatarPropertyForRadioOption(schema)), getDisabled(schema.disabled));
|
|
4176
|
+
var mapConstSchemaToSelectOption = (schema) => __spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues({
|
|
4177
|
+
// TODO: LOW avoid type assertion -- using || '' would fail some tests
|
|
4178
|
+
label: schema.title,
|
|
4179
|
+
value: schema.const
|
|
4180
|
+
}, getOptionDescription(schema.title, schema.description)), getIconPropertyForSelectOption(schema.icon)), mapImage(schema.image)), getDisabled(schema.disabled)), mapKeywordsToSearchStrings(schema.keywords));
|
|
4178
4181
|
var mapKeywordsToSearchStrings = (searchStrings) => isArray(searchStrings) ? { searchStrings } : {};
|
|
4179
4182
|
var mapImage = (image) => {
|
|
4180
4183
|
if (image == null ? void 0 : image.url) {
|
|
@@ -4222,6 +4225,12 @@ var getOptionDescription = (title, description) => {
|
|
|
4222
4225
|
}
|
|
4223
4226
|
return void 0;
|
|
4224
4227
|
};
|
|
4228
|
+
var getRadioOptionDescription = (title, description) => {
|
|
4229
|
+
if (title && description) {
|
|
4230
|
+
return { note: description };
|
|
4231
|
+
}
|
|
4232
|
+
return void 0;
|
|
4233
|
+
};
|
|
4225
4234
|
var getDisabled = (disabled) => {
|
|
4226
4235
|
if (!isUndefined(disabled) && !isNull(disabled)) {
|
|
4227
4236
|
return { disabled };
|
|
@@ -8215,7 +8224,7 @@ var zh_CN_default = {
|
|
|
8215
8224
|
"dynamicFlows.ArraySchema.minItemsError": "\u8BF7\u81F3\u5C11\u6DFB\u52A0 {minItems} \u9879\u3002",
|
|
8216
8225
|
"dynamicFlows.ArraySchema.removeItem": "\u79FB\u9664",
|
|
8217
8226
|
"dynamicFlows.CameraCapture.CameraConnectionIssue.action": "\u91CD\u8BD5",
|
|
8218
|
-
"dynamicFlows.CameraCapture.CameraConnectionIssue.paragraph": "
|
|
8227
|
+
"dynamicFlows.CameraCapture.CameraConnectionIssue.paragraph": "\u8BF7\u68C0\u67E5\u662F\u5426\u8FDE\u63A5\uFF0C\u7136\u540E\u91CD\u8BD5\u3002",
|
|
8219
8228
|
"dynamicFlows.CameraCapture.CameraConnectionIssue.title": "\u6211\u4EEC\u65E0\u6CD5\u8BBF\u95EE\u60A8\u7684\u6444\u50CF\u5934",
|
|
8220
8229
|
"dynamicFlows.CameraCapture.CameraNotSupported.paragraph": "\u60A8\u76EE\u524D\u4F7F\u7528\u7684\u6D4F\u89C8\u5668\u4E0D\u652F\u6301\u6444\u50CF\u5934\u3002\u8BF7\u5C1D\u8BD5\u5176\u4ED6\u6D4F\u89C8\u5668\u3001\u8BBE\u5907\u6216\u4E0B\u8F7D\u6211\u4EEC\u7684\u5E94\u7528\u3002",
|
|
8221
8230
|
"dynamicFlows.CameraCapture.CameraNotSupported.title": "\u4E0D\u652F\u6301\u6444\u50CF\u5934",
|
|
@@ -8264,7 +8273,7 @@ var zh_HK_default = {
|
|
|
8264
8273
|
"dynamicFlows.ArraySchema.minItemsError": "\u8ACB\u81F3\u5C11\u6DFB\u52A0{minItems}\u9805\u3002",
|
|
8265
8274
|
"dynamicFlows.ArraySchema.removeItem": "\u79FB\u9664",
|
|
8266
8275
|
"dynamicFlows.CameraCapture.CameraConnectionIssue.action": "\u518D\u8A66\u4E00\u6B21",
|
|
8267
|
-
"dynamicFlows.CameraCapture.CameraConnectionIssue.paragraph": "
|
|
8276
|
+
"dynamicFlows.CameraCapture.CameraConnectionIssue.paragraph": "\u8ACB\u6AA2\u67E5\u9023\u7DDA\u72C0\u614B\uFF0C\u7136\u5F8C\u518D\u8A66\u4E00\u6B21\u3002",
|
|
8268
8277
|
"dynamicFlows.CameraCapture.CameraConnectionIssue.title": "\u6211\u5011\u7121\u6CD5\u53D6\u7528\u4F60\u7684\u76F8\u6A5F",
|
|
8269
8278
|
"dynamicFlows.CameraCapture.CameraNotSupported.paragraph": "\u4F60\u76EE\u524D\u4F7F\u7528\u7684\u700F\u89BD\u5668\u4E0D\u652F\u6301\u76F8\u6A5F\u3002\u8ACB\u5617\u8A66\u4F7F\u7528\u5176\u4ED6\u700F\u89BD\u5668\u6216\u5176\u4ED6\u88DD\u7F6E\uFF0C\u6216\u8005\u4F60\u53EF\u4EE5\u4E0B\u8F09\u6211\u5011\u7684\u61C9\u7528\u7A0B\u5F0F\u3002",
|
|
8270
8279
|
"dynamicFlows.CameraCapture.CameraNotSupported.title": "\u4E0D\u652F\u6301\u76F8\u6A5F",
|