@steedos-widgets/amis-lib 6.10.27 → 6.10.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/cjs/tsconfig.tsbuildinfo +1 -1
- package/dist/index.cjs.js +68 -24
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +68 -24
- package/dist/index.esm.js.map +1 -1
- package/dist/index.umd.js +13 -21
- package/dist/index.umd.js.map +1 -1
- package/dist/types/workflow/approve.d.ts +14 -0
- package/dist/types/workflow/flow.d.ts +14 -0
- package/package.json +2 -2
package/dist/index.esm.js
CHANGED
|
@@ -17625,21 +17625,21 @@ const getApprovalDrawerSchema = async (instance, events) => {
|
|
|
17625
17625
|
placeholder: i18next__default.t('frontend_workflow_suggestion_placeholder'),//"请填写意见",
|
|
17626
17626
|
requiredOn: "${judge === 'rejected'}",
|
|
17627
17627
|
value: userApprove?.description,
|
|
17628
|
-
|
|
17629
|
-
|
|
17630
|
-
|
|
17631
|
-
|
|
17632
|
-
|
|
17633
|
-
|
|
17634
|
-
|
|
17635
|
-
|
|
17636
|
-
|
|
17637
|
-
|
|
17638
|
-
|
|
17639
|
-
|
|
17640
|
-
|
|
17641
|
-
|
|
17642
|
-
|
|
17628
|
+
"onEvent": {
|
|
17629
|
+
"blur": {
|
|
17630
|
+
"actions": [
|
|
17631
|
+
{
|
|
17632
|
+
"componentId": "u:instancePage",
|
|
17633
|
+
"actionType": "setValue",
|
|
17634
|
+
"args": {
|
|
17635
|
+
"value": {
|
|
17636
|
+
"instance_my_approve_description": "${value}"
|
|
17637
|
+
}
|
|
17638
|
+
}
|
|
17639
|
+
}
|
|
17640
|
+
]
|
|
17641
|
+
}
|
|
17642
|
+
}
|
|
17643
17643
|
},
|
|
17644
17644
|
await getNextStepInput(instance, nextStepChangeEvents),
|
|
17645
17645
|
await getNextStepUsersInput(instance, nextStepUserChangeEvents),
|
|
@@ -17964,7 +17964,7 @@ const getInstanceApprovalHistory = async ()=>{
|
|
|
17964
17964
|
* @Author: baozhoutao@steedos.com
|
|
17965
17965
|
* @Date: 2022-09-07 16:20:45
|
|
17966
17966
|
* @LastEditors: 殷亮辉 yinlianghui@hotoa.com
|
|
17967
|
-
* @LastEditTime: 2025-
|
|
17967
|
+
* @LastEditTime: 2025-12-04 13:47:10
|
|
17968
17968
|
* @Description:
|
|
17969
17969
|
*/
|
|
17970
17970
|
|
|
@@ -18759,6 +18759,22 @@ const getApplicantTableView = async (instance) => {
|
|
|
18759
18759
|
"onEvent": {
|
|
18760
18760
|
"change": {
|
|
18761
18761
|
"actions": [
|
|
18762
|
+
{
|
|
18763
|
+
"actionType": "ajax",
|
|
18764
|
+
"api": {
|
|
18765
|
+
"url": "/api/workflow/v2/instance/save",
|
|
18766
|
+
"method": "post",
|
|
18767
|
+
"sendOn": "",
|
|
18768
|
+
"requestAdaptor": "var _SteedosUI$getRef$get, _approveValues$next_s;\nconst formValues = context._scoped.getComponentById(\"instance_form\").getValues(); const _formValues = JSON.parse(JSON.stringify(formValues)); if(_formValues){delete _formValues.__applicant} \nconst approveValues = (_SteedosUI$getRef$get = context._scoped.getComponentById(\"instance_approval\")) === null || _SteedosUI$getRef$get === void 0 ? void 0 : _SteedosUI$getRef$get.getValues();\nlet nextUsers = approveValues === null || approveValues === void 0 ? void 0 : approveValues.next_users;\nif (_.isString(nextUsers)) {\n nextUsers = [approveValues.next_users];\n}\nconst instance = context.record;\nconst body = {\n instance: {\n _id: instance._id,\n applicant: context.__applicant,\n submitter: formValues.submitter,\n traces: [{\n _id: instance.trace._id,\n step: instance.step._id,\n approves: [{\n _id: instance.approve._id,\n next_steps: [{\n step: approveValues === null || approveValues === void 0 || (_approveValues$next_s = approveValues.next_step) === null || _approveValues$next_s === void 0 ? void 0 : _approveValues$next_s._id,\n users: nextUsers\n }],\n description: approveValues === null || approveValues === void 0 ? void 0 : approveValues.suggestion,\n values: _formValues\n }]\n }]\n }\n};\napi.data = body;\nreturn api;",
|
|
18769
|
+
"adaptor": "if (payload.instance == \"upgraded\") { window.setTimeout(function(){ window.location.reload(); }, 2000); return {...payload, status: 1, msg: t('instance_action_instance_save_msg_upgraded')}; } \n return payload.instance === true ? {...payload, status: 0, msg: ''} : {...payload, status: 1, msg: t('instance_action_instance_save_msg_failed')};",
|
|
18770
|
+
"headers": {
|
|
18771
|
+
"Authorization": "Bearer ${context.tenantId},${context.authToken}"
|
|
18772
|
+
},
|
|
18773
|
+
"data": {
|
|
18774
|
+
"&": "$$"
|
|
18775
|
+
}
|
|
18776
|
+
}
|
|
18777
|
+
},
|
|
18762
18778
|
{
|
|
18763
18779
|
"actionType": "ajax",
|
|
18764
18780
|
"api": {
|
|
@@ -18791,7 +18807,7 @@ const getApplicantTableView = async (instance) => {
|
|
|
18791
18807
|
id: "u:2016b04355f4",
|
|
18792
18808
|
};
|
|
18793
18809
|
}
|
|
18794
|
-
|
|
18810
|
+
// console.log('applicantInput', applicantInput);
|
|
18795
18811
|
if(applicantInput){
|
|
18796
18812
|
if(applicantInput.className){
|
|
18797
18813
|
applicantInput.className = `${applicantInput.className} inline-left`;
|
|
@@ -18970,8 +18986,7 @@ const getFlowFormSchema = async (instance, box) => {
|
|
|
18970
18986
|
nextStepUserChangeEvents = onEvent?.nextStepUserChange?.actions || [];
|
|
18971
18987
|
}
|
|
18972
18988
|
// if (box == 'inbox' || box == 'draft') {
|
|
18973
|
-
|
|
18974
|
-
if ((box == 'inbox' || box == 'draft') && window.enableAutoOpenApproveDrawer) {
|
|
18989
|
+
if ((box == 'inbox' || box == 'draft') && !!!window.disableAutoOpenApproveDrawer) {
|
|
18975
18990
|
// 滚动条滚动到底部弹出底部签批drawer窗口
|
|
18976
18991
|
initedEvents.push({
|
|
18977
18992
|
"actionType": "custom",
|
|
@@ -21876,6 +21891,17 @@ var widget_zh = {
|
|
|
21876
21891
|
* @LastEditTime: 2025-08-26 10:17:05
|
|
21877
21892
|
*/
|
|
21878
21893
|
|
|
21894
|
+
const resources = {
|
|
21895
|
+
"en": {
|
|
21896
|
+
translation: en_us$1,
|
|
21897
|
+
'widgets-meta': widget_en
|
|
21898
|
+
},
|
|
21899
|
+
"zh-CN": {
|
|
21900
|
+
translation: zh_cn$1,
|
|
21901
|
+
'widgets-meta': widget_zh
|
|
21902
|
+
}
|
|
21903
|
+
};
|
|
21904
|
+
|
|
21879
21905
|
const getUserLanguage$1 = () => {
|
|
21880
21906
|
var lan = Builder.settings.context?.user?.language || Builder.settings.locale || window.navigator.language;
|
|
21881
21907
|
if(lan === 'en' || lan.startsWith('en-')){
|
|
@@ -21883,15 +21909,33 @@ const getUserLanguage$1 = () => {
|
|
|
21883
21909
|
}
|
|
21884
21910
|
return lan;
|
|
21885
21911
|
};
|
|
21912
|
+
|
|
21913
|
+
var locale$1 = "zh-CN";
|
|
21886
21914
|
if (typeof window != 'undefined') {
|
|
21887
21915
|
window.steedosI18next = i18next;
|
|
21888
|
-
getUserLanguage
|
|
21916
|
+
// locale = getUserLanguage();
|
|
21889
21917
|
}
|
|
21890
21918
|
|
|
21891
|
-
i18next.
|
|
21892
|
-
i18next
|
|
21893
|
-
|
|
21894
|
-
|
|
21919
|
+
if (!i18next.isInitialized) {
|
|
21920
|
+
i18next
|
|
21921
|
+
// .use(LanguageDetector)
|
|
21922
|
+
.init({
|
|
21923
|
+
// lng: locale,
|
|
21924
|
+
fallbackLng: 'zh-CN',
|
|
21925
|
+
resources,
|
|
21926
|
+
}, ()=>{
|
|
21927
|
+
console.log("i18next initialized:", locale$1);
|
|
21928
|
+
// i18next.addResources('en', 'translation', en_us);
|
|
21929
|
+
// i18next.addResources('en', 'widgets-meta', widget_en);
|
|
21930
|
+
// i18next.addResources('zh-CN', 'translation', zh_cn);
|
|
21931
|
+
// i18next.addResources('zh-CN', 'widgets-meta', widget_zh);
|
|
21932
|
+
});
|
|
21933
|
+
} else {
|
|
21934
|
+
i18next.addResources('en', 'translation', en_us$1);
|
|
21935
|
+
i18next.addResources('en', 'widgets-meta', widget_en);
|
|
21936
|
+
i18next.addResources('zh-CN', 'translation', zh_cn$1);
|
|
21937
|
+
i18next.addResources('zh-CN', 'widgets-meta', widget_zh);
|
|
21938
|
+
}
|
|
21895
21939
|
|
|
21896
21940
|
var asc$1 = "Asc";
|
|
21897
21941
|
var cancel$1 = "Cancel";
|