@steedos-widgets/amis-lib 6.10.27 → 6.10.29
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 +76 -27
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +76 -27
- package/dist/index.esm.js.map +1 -1
- package/dist/index.umd.js +17 -25
- package/dist/index.umd.js.map +1 -1
- package/dist/types/lib/input_table.d.ts +1 -0
- 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.cjs.js
CHANGED
|
@@ -10448,7 +10448,7 @@ async function getObjectRelatedListsMiniSchema(objectApiName){
|
|
|
10448
10448
|
* @Author: baozhoutao@steedos.com
|
|
10449
10449
|
* @Date: 2022-07-05 15:55:39
|
|
10450
10450
|
* @LastEditors: 殷亮辉 yinlianghui@hotoa.com
|
|
10451
|
-
* @LastEditTime: 2025-12-04
|
|
10451
|
+
* @LastEditTime: 2025-12-04 23:20:29
|
|
10452
10452
|
* @Description:
|
|
10453
10453
|
*/
|
|
10454
10454
|
|
|
@@ -10734,6 +10734,10 @@ async function getViewSchema(objectName, recordId, ctx) {
|
|
|
10734
10734
|
|
|
10735
10735
|
function isListViewSupported(listView) {
|
|
10736
10736
|
if(listView.type === "calendar" || listView.type === "timeline"){
|
|
10737
|
+
var isEnterprise = window.Builder?.settings.platform && ["platform-standard", "platform-enterprise", "platform-professional"].includes(window.Builder.settings.platform.product);
|
|
10738
|
+
if (!isEnterprise) {
|
|
10739
|
+
return false;
|
|
10740
|
+
}
|
|
10737
10741
|
return listView.type === "timeline" ? (!!window.BuilderFullCalendarScheduler) : (!!window.BuilderFullCalendar || !!window.BuilderFullCalendarScheduler);
|
|
10738
10742
|
}
|
|
10739
10743
|
return true;
|
|
@@ -14580,7 +14584,7 @@ function uuidv4() {
|
|
|
14580
14584
|
* @Author: 殷亮辉 yinlianghui@hotoa.com
|
|
14581
14585
|
* @Date: 2023-11-15 09:50:22
|
|
14582
14586
|
* @LastEditors: 殷亮辉 yinlianghui@hotoa.com
|
|
14583
|
-
* @LastEditTime: 2025-
|
|
14587
|
+
* @LastEditTime: 2025-12-04 22:52:15
|
|
14584
14588
|
*/
|
|
14585
14589
|
|
|
14586
14590
|
/**
|
|
@@ -16181,10 +16185,11 @@ const getAmisInputTableSchema = async (props) => {
|
|
|
16181
16185
|
"visible": props.$schema.visible,
|
|
16182
16186
|
"hiddenOn": props.$schema.hiddenOn,
|
|
16183
16187
|
"hidden": props.$schema.hidden,
|
|
16188
|
+
"requiredOn": props.$schema.requiredOn,
|
|
16184
16189
|
"required": props.required,
|
|
16185
16190
|
className,
|
|
16186
16191
|
};
|
|
16187
|
-
// console.log("
|
|
16192
|
+
// console.log("=inputtable==schema===", schema);
|
|
16188
16193
|
return schema;
|
|
16189
16194
|
};
|
|
16190
16195
|
|
|
@@ -17652,21 +17657,21 @@ const getApprovalDrawerSchema = async (instance, events) => {
|
|
|
17652
17657
|
placeholder: i18next__default["default"].t('frontend_workflow_suggestion_placeholder'),//"请填写意见",
|
|
17653
17658
|
requiredOn: "${judge === 'rejected'}",
|
|
17654
17659
|
value: userApprove?.description,
|
|
17655
|
-
|
|
17656
|
-
|
|
17657
|
-
|
|
17658
|
-
|
|
17659
|
-
|
|
17660
|
-
|
|
17661
|
-
|
|
17662
|
-
|
|
17663
|
-
|
|
17664
|
-
|
|
17665
|
-
|
|
17666
|
-
|
|
17667
|
-
|
|
17668
|
-
|
|
17669
|
-
|
|
17660
|
+
"onEvent": {
|
|
17661
|
+
"blur": {
|
|
17662
|
+
"actions": [
|
|
17663
|
+
{
|
|
17664
|
+
"componentId": "u:instancePage",
|
|
17665
|
+
"actionType": "setValue",
|
|
17666
|
+
"args": {
|
|
17667
|
+
"value": {
|
|
17668
|
+
"instance_my_approve_description": "${value}"
|
|
17669
|
+
}
|
|
17670
|
+
}
|
|
17671
|
+
}
|
|
17672
|
+
]
|
|
17673
|
+
}
|
|
17674
|
+
}
|
|
17670
17675
|
},
|
|
17671
17676
|
await getNextStepInput(instance, nextStepChangeEvents),
|
|
17672
17677
|
await getNextStepUsersInput(instance, nextStepUserChangeEvents),
|
|
@@ -17991,7 +17996,7 @@ const getInstanceApprovalHistory = async ()=>{
|
|
|
17991
17996
|
* @Author: baozhoutao@steedos.com
|
|
17992
17997
|
* @Date: 2022-09-07 16:20:45
|
|
17993
17998
|
* @LastEditors: 殷亮辉 yinlianghui@hotoa.com
|
|
17994
|
-
* @LastEditTime: 2025-
|
|
17999
|
+
* @LastEditTime: 2025-12-04 13:47:10
|
|
17995
18000
|
* @Description:
|
|
17996
18001
|
*/
|
|
17997
18002
|
|
|
@@ -18786,6 +18791,22 @@ const getApplicantTableView = async (instance) => {
|
|
|
18786
18791
|
"onEvent": {
|
|
18787
18792
|
"change": {
|
|
18788
18793
|
"actions": [
|
|
18794
|
+
{
|
|
18795
|
+
"actionType": "ajax",
|
|
18796
|
+
"api": {
|
|
18797
|
+
"url": "/api/workflow/v2/instance/save",
|
|
18798
|
+
"method": "post",
|
|
18799
|
+
"sendOn": "",
|
|
18800
|
+
"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;",
|
|
18801
|
+
"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')};",
|
|
18802
|
+
"headers": {
|
|
18803
|
+
"Authorization": "Bearer ${context.tenantId},${context.authToken}"
|
|
18804
|
+
},
|
|
18805
|
+
"data": {
|
|
18806
|
+
"&": "$$"
|
|
18807
|
+
}
|
|
18808
|
+
}
|
|
18809
|
+
},
|
|
18789
18810
|
{
|
|
18790
18811
|
"actionType": "ajax",
|
|
18791
18812
|
"api": {
|
|
@@ -18818,7 +18839,7 @@ const getApplicantTableView = async (instance) => {
|
|
|
18818
18839
|
id: "u:2016b04355f4",
|
|
18819
18840
|
};
|
|
18820
18841
|
}
|
|
18821
|
-
|
|
18842
|
+
// console.log('applicantInput', applicantInput);
|
|
18822
18843
|
if(applicantInput){
|
|
18823
18844
|
if(applicantInput.className){
|
|
18824
18845
|
applicantInput.className = `${applicantInput.className} inline-left`;
|
|
@@ -18997,8 +19018,7 @@ const getFlowFormSchema = async (instance, box) => {
|
|
|
18997
19018
|
nextStepUserChangeEvents = onEvent?.nextStepUserChange?.actions || [];
|
|
18998
19019
|
}
|
|
18999
19020
|
// if (box == 'inbox' || box == 'draft') {
|
|
19000
|
-
|
|
19001
|
-
if ((box == 'inbox' || box == 'draft') && window.enableAutoOpenApproveDrawer) {
|
|
19021
|
+
if ((box == 'inbox' || box == 'draft') && !!!window.disableAutoOpenApproveDrawer) {
|
|
19002
19022
|
// 滚动条滚动到底部弹出底部签批drawer窗口
|
|
19003
19023
|
initedEvents.push({
|
|
19004
19024
|
"actionType": "custom",
|
|
@@ -21903,6 +21923,17 @@ var widget_zh = {
|
|
|
21903
21923
|
* @LastEditTime: 2025-08-26 10:17:05
|
|
21904
21924
|
*/
|
|
21905
21925
|
|
|
21926
|
+
const resources = {
|
|
21927
|
+
"en": {
|
|
21928
|
+
translation: en_us$1,
|
|
21929
|
+
'widgets-meta': widget_en
|
|
21930
|
+
},
|
|
21931
|
+
"zh-CN": {
|
|
21932
|
+
translation: zh_cn$1,
|
|
21933
|
+
'widgets-meta': widget_zh
|
|
21934
|
+
}
|
|
21935
|
+
};
|
|
21936
|
+
|
|
21906
21937
|
const getUserLanguage$1 = () => {
|
|
21907
21938
|
var lan = Builder.settings.context?.user?.language || Builder.settings.locale || window.navigator.language;
|
|
21908
21939
|
if(lan === 'en' || lan.startsWith('en-')){
|
|
@@ -21910,15 +21941,33 @@ const getUserLanguage$1 = () => {
|
|
|
21910
21941
|
}
|
|
21911
21942
|
return lan;
|
|
21912
21943
|
};
|
|
21944
|
+
|
|
21945
|
+
var locale$1 = "zh-CN";
|
|
21913
21946
|
if (typeof window != 'undefined') {
|
|
21914
21947
|
window.steedosI18next = i18next__namespace;
|
|
21915
|
-
getUserLanguage
|
|
21948
|
+
// locale = getUserLanguage();
|
|
21916
21949
|
}
|
|
21917
21950
|
|
|
21918
|
-
i18next__namespace.
|
|
21919
|
-
i18next__namespace
|
|
21920
|
-
|
|
21921
|
-
|
|
21951
|
+
if (!i18next__namespace.isInitialized) {
|
|
21952
|
+
i18next__namespace
|
|
21953
|
+
// .use(LanguageDetector)
|
|
21954
|
+
.init({
|
|
21955
|
+
// lng: locale,
|
|
21956
|
+
fallbackLng: 'zh-CN',
|
|
21957
|
+
resources,
|
|
21958
|
+
}, ()=>{
|
|
21959
|
+
console.log("i18next initialized:", locale$1);
|
|
21960
|
+
// i18next.addResources('en', 'translation', en_us);
|
|
21961
|
+
// i18next.addResources('en', 'widgets-meta', widget_en);
|
|
21962
|
+
// i18next.addResources('zh-CN', 'translation', zh_cn);
|
|
21963
|
+
// i18next.addResources('zh-CN', 'widgets-meta', widget_zh);
|
|
21964
|
+
});
|
|
21965
|
+
} else {
|
|
21966
|
+
i18next__namespace.addResources('en', 'translation', en_us$1);
|
|
21967
|
+
i18next__namespace.addResources('en', 'widgets-meta', widget_en);
|
|
21968
|
+
i18next__namespace.addResources('zh-CN', 'translation', zh_cn$1);
|
|
21969
|
+
i18next__namespace.addResources('zh-CN', 'widgets-meta', widget_zh);
|
|
21970
|
+
}
|
|
21922
21971
|
|
|
21923
21972
|
var asc$1 = "Asc";
|
|
21924
21973
|
var cancel$1 = "Cancel";
|