@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.esm.js
CHANGED
|
@@ -10421,7 +10421,7 @@ async function getObjectRelatedListsMiniSchema(objectApiName){
|
|
|
10421
10421
|
* @Author: baozhoutao@steedos.com
|
|
10422
10422
|
* @Date: 2022-07-05 15:55:39
|
|
10423
10423
|
* @LastEditors: 殷亮辉 yinlianghui@hotoa.com
|
|
10424
|
-
* @LastEditTime: 2025-12-04
|
|
10424
|
+
* @LastEditTime: 2025-12-04 23:20:29
|
|
10425
10425
|
* @Description:
|
|
10426
10426
|
*/
|
|
10427
10427
|
|
|
@@ -10707,6 +10707,10 @@ async function getViewSchema(objectName, recordId, ctx) {
|
|
|
10707
10707
|
|
|
10708
10708
|
function isListViewSupported(listView) {
|
|
10709
10709
|
if(listView.type === "calendar" || listView.type === "timeline"){
|
|
10710
|
+
var isEnterprise = window.Builder?.settings.platform && ["platform-standard", "platform-enterprise", "platform-professional"].includes(window.Builder.settings.platform.product);
|
|
10711
|
+
if (!isEnterprise) {
|
|
10712
|
+
return false;
|
|
10713
|
+
}
|
|
10710
10714
|
return listView.type === "timeline" ? (!!window.BuilderFullCalendarScheduler) : (!!window.BuilderFullCalendar || !!window.BuilderFullCalendarScheduler);
|
|
10711
10715
|
}
|
|
10712
10716
|
return true;
|
|
@@ -14553,7 +14557,7 @@ function uuidv4() {
|
|
|
14553
14557
|
* @Author: 殷亮辉 yinlianghui@hotoa.com
|
|
14554
14558
|
* @Date: 2023-11-15 09:50:22
|
|
14555
14559
|
* @LastEditors: 殷亮辉 yinlianghui@hotoa.com
|
|
14556
|
-
* @LastEditTime: 2025-
|
|
14560
|
+
* @LastEditTime: 2025-12-04 22:52:15
|
|
14557
14561
|
*/
|
|
14558
14562
|
|
|
14559
14563
|
/**
|
|
@@ -16154,10 +16158,11 @@ const getAmisInputTableSchema = async (props) => {
|
|
|
16154
16158
|
"visible": props.$schema.visible,
|
|
16155
16159
|
"hiddenOn": props.$schema.hiddenOn,
|
|
16156
16160
|
"hidden": props.$schema.hidden,
|
|
16161
|
+
"requiredOn": props.$schema.requiredOn,
|
|
16157
16162
|
"required": props.required,
|
|
16158
16163
|
className,
|
|
16159
16164
|
};
|
|
16160
|
-
// console.log("
|
|
16165
|
+
// console.log("=inputtable==schema===", schema);
|
|
16161
16166
|
return schema;
|
|
16162
16167
|
};
|
|
16163
16168
|
|
|
@@ -17625,21 +17630,21 @@ const getApprovalDrawerSchema = async (instance, events) => {
|
|
|
17625
17630
|
placeholder: i18next__default.t('frontend_workflow_suggestion_placeholder'),//"请填写意见",
|
|
17626
17631
|
requiredOn: "${judge === 'rejected'}",
|
|
17627
17632
|
value: userApprove?.description,
|
|
17628
|
-
|
|
17629
|
-
|
|
17630
|
-
|
|
17631
|
-
|
|
17632
|
-
|
|
17633
|
-
|
|
17634
|
-
|
|
17635
|
-
|
|
17636
|
-
|
|
17637
|
-
|
|
17638
|
-
|
|
17639
|
-
|
|
17640
|
-
|
|
17641
|
-
|
|
17642
|
-
|
|
17633
|
+
"onEvent": {
|
|
17634
|
+
"blur": {
|
|
17635
|
+
"actions": [
|
|
17636
|
+
{
|
|
17637
|
+
"componentId": "u:instancePage",
|
|
17638
|
+
"actionType": "setValue",
|
|
17639
|
+
"args": {
|
|
17640
|
+
"value": {
|
|
17641
|
+
"instance_my_approve_description": "${value}"
|
|
17642
|
+
}
|
|
17643
|
+
}
|
|
17644
|
+
}
|
|
17645
|
+
]
|
|
17646
|
+
}
|
|
17647
|
+
}
|
|
17643
17648
|
},
|
|
17644
17649
|
await getNextStepInput(instance, nextStepChangeEvents),
|
|
17645
17650
|
await getNextStepUsersInput(instance, nextStepUserChangeEvents),
|
|
@@ -17964,7 +17969,7 @@ const getInstanceApprovalHistory = async ()=>{
|
|
|
17964
17969
|
* @Author: baozhoutao@steedos.com
|
|
17965
17970
|
* @Date: 2022-09-07 16:20:45
|
|
17966
17971
|
* @LastEditors: 殷亮辉 yinlianghui@hotoa.com
|
|
17967
|
-
* @LastEditTime: 2025-
|
|
17972
|
+
* @LastEditTime: 2025-12-04 13:47:10
|
|
17968
17973
|
* @Description:
|
|
17969
17974
|
*/
|
|
17970
17975
|
|
|
@@ -18759,6 +18764,22 @@ const getApplicantTableView = async (instance) => {
|
|
|
18759
18764
|
"onEvent": {
|
|
18760
18765
|
"change": {
|
|
18761
18766
|
"actions": [
|
|
18767
|
+
{
|
|
18768
|
+
"actionType": "ajax",
|
|
18769
|
+
"api": {
|
|
18770
|
+
"url": "/api/workflow/v2/instance/save",
|
|
18771
|
+
"method": "post",
|
|
18772
|
+
"sendOn": "",
|
|
18773
|
+
"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;",
|
|
18774
|
+
"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')};",
|
|
18775
|
+
"headers": {
|
|
18776
|
+
"Authorization": "Bearer ${context.tenantId},${context.authToken}"
|
|
18777
|
+
},
|
|
18778
|
+
"data": {
|
|
18779
|
+
"&": "$$"
|
|
18780
|
+
}
|
|
18781
|
+
}
|
|
18782
|
+
},
|
|
18762
18783
|
{
|
|
18763
18784
|
"actionType": "ajax",
|
|
18764
18785
|
"api": {
|
|
@@ -18791,7 +18812,7 @@ const getApplicantTableView = async (instance) => {
|
|
|
18791
18812
|
id: "u:2016b04355f4",
|
|
18792
18813
|
};
|
|
18793
18814
|
}
|
|
18794
|
-
|
|
18815
|
+
// console.log('applicantInput', applicantInput);
|
|
18795
18816
|
if(applicantInput){
|
|
18796
18817
|
if(applicantInput.className){
|
|
18797
18818
|
applicantInput.className = `${applicantInput.className} inline-left`;
|
|
@@ -18970,8 +18991,7 @@ const getFlowFormSchema = async (instance, box) => {
|
|
|
18970
18991
|
nextStepUserChangeEvents = onEvent?.nextStepUserChange?.actions || [];
|
|
18971
18992
|
}
|
|
18972
18993
|
// if (box == 'inbox' || box == 'draft') {
|
|
18973
|
-
|
|
18974
|
-
if ((box == 'inbox' || box == 'draft') && window.enableAutoOpenApproveDrawer) {
|
|
18994
|
+
if ((box == 'inbox' || box == 'draft') && !!!window.disableAutoOpenApproveDrawer) {
|
|
18975
18995
|
// 滚动条滚动到底部弹出底部签批drawer窗口
|
|
18976
18996
|
initedEvents.push({
|
|
18977
18997
|
"actionType": "custom",
|
|
@@ -21876,6 +21896,17 @@ var widget_zh = {
|
|
|
21876
21896
|
* @LastEditTime: 2025-08-26 10:17:05
|
|
21877
21897
|
*/
|
|
21878
21898
|
|
|
21899
|
+
const resources = {
|
|
21900
|
+
"en": {
|
|
21901
|
+
translation: en_us$1,
|
|
21902
|
+
'widgets-meta': widget_en
|
|
21903
|
+
},
|
|
21904
|
+
"zh-CN": {
|
|
21905
|
+
translation: zh_cn$1,
|
|
21906
|
+
'widgets-meta': widget_zh
|
|
21907
|
+
}
|
|
21908
|
+
};
|
|
21909
|
+
|
|
21879
21910
|
const getUserLanguage$1 = () => {
|
|
21880
21911
|
var lan = Builder.settings.context?.user?.language || Builder.settings.locale || window.navigator.language;
|
|
21881
21912
|
if(lan === 'en' || lan.startsWith('en-')){
|
|
@@ -21883,15 +21914,33 @@ const getUserLanguage$1 = () => {
|
|
|
21883
21914
|
}
|
|
21884
21915
|
return lan;
|
|
21885
21916
|
};
|
|
21917
|
+
|
|
21918
|
+
var locale$1 = "zh-CN";
|
|
21886
21919
|
if (typeof window != 'undefined') {
|
|
21887
21920
|
window.steedosI18next = i18next;
|
|
21888
|
-
getUserLanguage
|
|
21921
|
+
// locale = getUserLanguage();
|
|
21889
21922
|
}
|
|
21890
21923
|
|
|
21891
|
-
i18next.
|
|
21892
|
-
i18next
|
|
21893
|
-
|
|
21894
|
-
|
|
21924
|
+
if (!i18next.isInitialized) {
|
|
21925
|
+
i18next
|
|
21926
|
+
// .use(LanguageDetector)
|
|
21927
|
+
.init({
|
|
21928
|
+
// lng: locale,
|
|
21929
|
+
fallbackLng: 'zh-CN',
|
|
21930
|
+
resources,
|
|
21931
|
+
}, ()=>{
|
|
21932
|
+
console.log("i18next initialized:", locale$1);
|
|
21933
|
+
// i18next.addResources('en', 'translation', en_us);
|
|
21934
|
+
// i18next.addResources('en', 'widgets-meta', widget_en);
|
|
21935
|
+
// i18next.addResources('zh-CN', 'translation', zh_cn);
|
|
21936
|
+
// i18next.addResources('zh-CN', 'widgets-meta', widget_zh);
|
|
21937
|
+
});
|
|
21938
|
+
} else {
|
|
21939
|
+
i18next.addResources('en', 'translation', en_us$1);
|
|
21940
|
+
i18next.addResources('en', 'widgets-meta', widget_en);
|
|
21941
|
+
i18next.addResources('zh-CN', 'translation', zh_cn$1);
|
|
21942
|
+
i18next.addResources('zh-CN', 'widgets-meta', widget_zh);
|
|
21943
|
+
}
|
|
21895
21944
|
|
|
21896
21945
|
var asc$1 = "Asc";
|
|
21897
21946
|
var cancel$1 = "Cancel";
|