@steedos-widgets/amis-object 1.2.6-beta.9 → 1.2.7
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/amis/AmisAppLauncher.d.ts +0 -5
- package/dist/amis/AmisObjectListview.d.ts +1 -7
- package/dist/amis/AmisRecordDetailHeader.d.ts +39 -1
- package/dist/amis/AmisRecordDetailRelatedLists.d.ts +1 -14
- package/dist/amis/AmisSelectFlow.d.ts +1 -0
- package/dist/amis-object.cjs.css +170 -32
- package/dist/amis-object.cjs.js +705 -193
- package/dist/amis-object.cjs.js.map +1 -1
- package/dist/amis-object.esm.css +170 -32
- package/dist/amis-object.esm.js +706 -194
- package/dist/amis-object.esm.js.map +1 -1
- package/dist/amis-object.umd.css +170 -32
- package/dist/amis-object.umd.js +705 -193
- package/dist/amis-object.umd.js.map +1 -1
- package/dist/assets.json +11 -11
- package/dist/meta.js +1 -1
- package/dist/pages/PageListView.d.ts +4 -1
- package/package.json +3 -3
package/dist/amis-object.umd.js
CHANGED
|
@@ -1735,26 +1735,11 @@
|
|
|
1735
1735
|
}
|
|
1736
1736
|
};
|
|
1737
1737
|
|
|
1738
|
-
/*
|
|
1739
|
-
* @Author: baozhoutao@steedos.com
|
|
1740
|
-
* @Date: 2022-08-04 10:42:49
|
|
1741
|
-
* @LastEditors: baozhoutao@steedos.com
|
|
1742
|
-
* @LastEditTime: 2022-08-25 10:28:47
|
|
1743
|
-
* @Description:
|
|
1744
|
-
*/
|
|
1745
|
-
var config = {
|
|
1746
|
-
listView: {
|
|
1747
|
-
newRecordMode: 'modal',
|
|
1748
|
-
editRecordMode: 'modal',
|
|
1749
|
-
perPage: 20
|
|
1750
|
-
}
|
|
1751
|
-
};
|
|
1752
|
-
|
|
1753
1738
|
/*
|
|
1754
1739
|
* @Author: baozhoutao@steedos.com
|
|
1755
1740
|
* @Date: 2022-11-01 15:51:00
|
|
1756
|
-
* @LastEditors:
|
|
1757
|
-
* @LastEditTime: 2023-04-
|
|
1741
|
+
* @LastEditors: Please set LastEditors
|
|
1742
|
+
* @LastEditTime: 2023-04-26 11:52:04
|
|
1758
1743
|
* @Description:
|
|
1759
1744
|
*/
|
|
1760
1745
|
|
|
@@ -1846,7 +1831,8 @@
|
|
|
1846
1831
|
"schemaApi": {
|
|
1847
1832
|
"data": {
|
|
1848
1833
|
"isLookup": "${isLookup}",
|
|
1849
|
-
"_master": "${_master}"
|
|
1834
|
+
"_master": "${_master}",
|
|
1835
|
+
"url": "${context.rootUrl}/api/pageSchema/form?app=${appId}&objectApiName=${objectName}&formFactor=${formFactor}"
|
|
1850
1836
|
},
|
|
1851
1837
|
"url": "${context.rootUrl}/api/pageSchema/form?app=${appId}&objectApiName=${objectName}&formFactor=${formFactor}",
|
|
1852
1838
|
"method": "get",
|
|
@@ -1855,7 +1841,7 @@
|
|
|
1855
1841
|
"headers": {
|
|
1856
1842
|
"Authorization": "Bearer ${context.tenantId},${context.authToken}"
|
|
1857
1843
|
},
|
|
1858
|
-
"requestAdaptor": "",
|
|
1844
|
+
"requestAdaptor": "return { ...api, url: api.body.url }",
|
|
1859
1845
|
"adaptor": schemaApiAdaptor
|
|
1860
1846
|
}
|
|
1861
1847
|
}
|
|
@@ -2764,6 +2750,166 @@
|
|
|
2764
2750
|
|
|
2765
2751
|
const executeButton = execute;
|
|
2766
2752
|
|
|
2753
|
+
|
|
2754
|
+
const getObjectDetailHeaderButtons = (objectSchema, recordId)=>{
|
|
2755
|
+
const { name } = objectSchema;
|
|
2756
|
+
const buttons = getObjectDetailButtons(objectSchema, {});
|
|
2757
|
+
const moreButtons = getObjectDetailMoreButtons(objectSchema, {
|
|
2758
|
+
recordId: recordId,
|
|
2759
|
+
objectName: name
|
|
2760
|
+
});
|
|
2761
|
+
let amisButtonsSchema = ___default__default["default"].map(buttons, (button) => {
|
|
2762
|
+
return {
|
|
2763
|
+
type: 'steedos-object-button',
|
|
2764
|
+
name: button.name,
|
|
2765
|
+
objectName: button.objectName,
|
|
2766
|
+
visibleOn: getButtonVisibleOn$1(button),
|
|
2767
|
+
className: `button_${button.name}`
|
|
2768
|
+
}
|
|
2769
|
+
});
|
|
2770
|
+
let dropdownButtons = ___default__default["default"].map(moreButtons, (button) => {
|
|
2771
|
+
return {
|
|
2772
|
+
type: 'steedos-object-button',
|
|
2773
|
+
name: button.name,
|
|
2774
|
+
objectName: button.objectName,
|
|
2775
|
+
visibleOn: getButtonVisibleOn$1(button),
|
|
2776
|
+
}
|
|
2777
|
+
});
|
|
2778
|
+
return {
|
|
2779
|
+
buttons: amisButtonsSchema,
|
|
2780
|
+
moreButtons: dropdownButtons
|
|
2781
|
+
};
|
|
2782
|
+
};
|
|
2783
|
+
|
|
2784
|
+
const getObjectDetailButtonsSchemas = (objectSchema, recordId, ctx)=>{
|
|
2785
|
+
const { buttons, moreButtons } = getObjectDetailHeaderButtons(objectSchema, recordId);
|
|
2786
|
+
if(ctx.formFactor === 'SMALL'){
|
|
2787
|
+
return {
|
|
2788
|
+
"type": "button",
|
|
2789
|
+
"icon": "fa fa-angle-down",
|
|
2790
|
+
"onEvent": {
|
|
2791
|
+
"click": {
|
|
2792
|
+
"actions": [
|
|
2793
|
+
{
|
|
2794
|
+
"actionType": "drawer",
|
|
2795
|
+
"drawer": {
|
|
2796
|
+
"type": "drawer",
|
|
2797
|
+
"title": "操作",
|
|
2798
|
+
"body": [
|
|
2799
|
+
{
|
|
2800
|
+
"type": "button-group",
|
|
2801
|
+
"id": "u:fd837823be5b",
|
|
2802
|
+
"vertical": true,
|
|
2803
|
+
"tiled": true,
|
|
2804
|
+
"buttons": [
|
|
2805
|
+
...___default__default["default"].map(buttons, (button)=>{
|
|
2806
|
+
button.className += ' w-full';
|
|
2807
|
+
return button;
|
|
2808
|
+
}),
|
|
2809
|
+
...___default__default["default"].map(moreButtons, (button)=>{
|
|
2810
|
+
button.className += ' w-full';
|
|
2811
|
+
return button;
|
|
2812
|
+
})
|
|
2813
|
+
],
|
|
2814
|
+
"btnLevel": "enhance",
|
|
2815
|
+
"className": "w-full",
|
|
2816
|
+
"btnClassName": "w-full",
|
|
2817
|
+
"size": "lg"
|
|
2818
|
+
}
|
|
2819
|
+
],
|
|
2820
|
+
"id": "u:9815f7366b9f",
|
|
2821
|
+
"position": "bottom",
|
|
2822
|
+
"closeOnOutside": true,
|
|
2823
|
+
"resizable": false,
|
|
2824
|
+
"className": "buttons-drawer",
|
|
2825
|
+
"bodyClassName": "m-none p-none",
|
|
2826
|
+
"actions": []
|
|
2827
|
+
}
|
|
2828
|
+
}
|
|
2829
|
+
]
|
|
2830
|
+
}
|
|
2831
|
+
},
|
|
2832
|
+
"id": "u:ee7c7929e6ae"
|
|
2833
|
+
}
|
|
2834
|
+
}else {
|
|
2835
|
+
if(moreButtons.length > 0){
|
|
2836
|
+
const dropdownButtonsSchema = {
|
|
2837
|
+
type: "steedos-dropdown-button",
|
|
2838
|
+
label: "",
|
|
2839
|
+
buttons: moreButtons,
|
|
2840
|
+
className: 'slds-icon'
|
|
2841
|
+
};
|
|
2842
|
+
buttons.push(dropdownButtonsSchema);
|
|
2843
|
+
}
|
|
2844
|
+
return buttons;
|
|
2845
|
+
}
|
|
2846
|
+
};
|
|
2847
|
+
|
|
2848
|
+
|
|
2849
|
+
const getObjectListViewButtonsSchemas = (objectSchema, ctx)=>{
|
|
2850
|
+
const buttons = getListViewButtons(objectSchema, ctx);
|
|
2851
|
+
if(ctx.formFactor === 'SMALL'){
|
|
2852
|
+
return {
|
|
2853
|
+
"type": "button",
|
|
2854
|
+
"icon": "fa fa-angle-down",
|
|
2855
|
+
"onEvent": {
|
|
2856
|
+
"click": {
|
|
2857
|
+
"actions": [
|
|
2858
|
+
{
|
|
2859
|
+
"actionType": "drawer",
|
|
2860
|
+
"drawer": {
|
|
2861
|
+
"type": "drawer",
|
|
2862
|
+
"title": "操作",
|
|
2863
|
+
"body": [
|
|
2864
|
+
{
|
|
2865
|
+
"type": "button-group",
|
|
2866
|
+
"id": "u:fd837823be5b",
|
|
2867
|
+
"vertical": true,
|
|
2868
|
+
"tiled": true,
|
|
2869
|
+
"buttons": [
|
|
2870
|
+
...___default__default["default"].map(buttons, (button)=>{
|
|
2871
|
+
return {
|
|
2872
|
+
type: 'steedos-object-button',
|
|
2873
|
+
name: button.name,
|
|
2874
|
+
objectName: button.objectName,
|
|
2875
|
+
visibleOn: getButtonVisibleOn$1(button),
|
|
2876
|
+
className: `button_${button.name} w-full`
|
|
2877
|
+
}
|
|
2878
|
+
})
|
|
2879
|
+
],
|
|
2880
|
+
"btnLevel": "enhance",
|
|
2881
|
+
"className": "w-full",
|
|
2882
|
+
"btnClassName": "w-full",
|
|
2883
|
+
"size": "lg"
|
|
2884
|
+
}
|
|
2885
|
+
],
|
|
2886
|
+
"id": "u:9815f7366b9f",
|
|
2887
|
+
"position": "bottom",
|
|
2888
|
+
"closeOnOutside": true,
|
|
2889
|
+
"resizable": false,
|
|
2890
|
+
"className": "buttons-drawer",
|
|
2891
|
+
"bodyClassName": "m-none p-none",
|
|
2892
|
+
"actions": []
|
|
2893
|
+
}
|
|
2894
|
+
}
|
|
2895
|
+
]
|
|
2896
|
+
}
|
|
2897
|
+
},
|
|
2898
|
+
"id": "u:ee7c7929e6ae"
|
|
2899
|
+
}
|
|
2900
|
+
}else {
|
|
2901
|
+
return ___default__default["default"].map(buttons, (button) => {
|
|
2902
|
+
return {
|
|
2903
|
+
type: 'steedos-object-button',
|
|
2904
|
+
name: button.name,
|
|
2905
|
+
objectName: button.objectName,
|
|
2906
|
+
visibleOn: getButtonVisibleOn$1(button),
|
|
2907
|
+
className: `button_${button.name}`
|
|
2908
|
+
}
|
|
2909
|
+
});
|
|
2910
|
+
}
|
|
2911
|
+
};
|
|
2912
|
+
|
|
2767
2913
|
async function getObjectFieldsFilterButtonSchema(objectSchema) {
|
|
2768
2914
|
// const amisListViewId = `listview_${objectSchema.name}`;
|
|
2769
2915
|
return {
|
|
@@ -2896,6 +3042,43 @@
|
|
|
2896
3042
|
// }
|
|
2897
3043
|
// }
|
|
2898
3044
|
// listView.handleFilterSubmit(Object.assign({}, removedValues, filterFormValues));
|
|
3045
|
+
`;
|
|
3046
|
+
const onCancelScript = `
|
|
3047
|
+
const scope = event.context.scoped;
|
|
3048
|
+
var filterForm = scope.parent.parent.getComponents().find(function(n){
|
|
3049
|
+
return n.props.type === "form";
|
|
3050
|
+
});
|
|
3051
|
+
var filterFormValues = filterForm.getValues();
|
|
3052
|
+
var listView = scope.parent.parent.parent.getComponents().find(function(n){
|
|
3053
|
+
return n.props.type === "crud";
|
|
3054
|
+
});
|
|
3055
|
+
const removedValues = {};
|
|
3056
|
+
for(var k in filterFormValues){
|
|
3057
|
+
if(/^__searchable__/.test(k)){
|
|
3058
|
+
removedValues[k] = "";
|
|
3059
|
+
}
|
|
3060
|
+
}
|
|
3061
|
+
if(!event.data.isLookup){
|
|
3062
|
+
// 刷新浏览器后,filterFormValues值是空的,只能从本地存储中取出并重置为空值
|
|
3063
|
+
const listViewId = event.data.listViewId;
|
|
3064
|
+
const listViewPropsStoreKey = location.pathname + "/crud/" + listViewId ;
|
|
3065
|
+
let localListViewProps = sessionStorage.getItem(listViewPropsStoreKey);
|
|
3066
|
+
if(localListViewProps){
|
|
3067
|
+
localListViewProps = JSON.parse(localListViewProps);
|
|
3068
|
+
for(var k in localListViewProps){
|
|
3069
|
+
removedValues[k] = "";
|
|
3070
|
+
}
|
|
3071
|
+
}
|
|
3072
|
+
}
|
|
3073
|
+
listView.handleFilterSubmit(removedValues);
|
|
3074
|
+
const filterService = filterForm.context.getComponents().find(function(n){
|
|
3075
|
+
return n.props.type === "service";
|
|
3076
|
+
});
|
|
3077
|
+
filterService.setData({showFieldsFilter: !!!filterService.props.data.showFieldsFilter});
|
|
3078
|
+
//触发amis crud 高度重算
|
|
3079
|
+
setTimeout(()=>{
|
|
3080
|
+
window.dispatchEvent(new Event("resize"))
|
|
3081
|
+
}, 100);
|
|
2899
3082
|
`;
|
|
2900
3083
|
const dataProviderInited = `
|
|
2901
3084
|
const objectName = data.objectName;
|
|
@@ -3090,6 +3273,22 @@
|
|
|
3090
3273
|
}
|
|
3091
3274
|
}
|
|
3092
3275
|
},
|
|
3276
|
+
{
|
|
3277
|
+
"type": "button",
|
|
3278
|
+
"label": "取消",
|
|
3279
|
+
"name": "btn_filter_form_cancel",
|
|
3280
|
+
"visibleOn": "this.filterFormSearchableFields && this.filterFormSearchableFields.length",
|
|
3281
|
+
"onEvent": {
|
|
3282
|
+
"click": {
|
|
3283
|
+
"actions": [
|
|
3284
|
+
{
|
|
3285
|
+
"actionType": "custom",
|
|
3286
|
+
"script": onCancelScript
|
|
3287
|
+
}
|
|
3288
|
+
]
|
|
3289
|
+
}
|
|
3290
|
+
}
|
|
3291
|
+
},
|
|
3093
3292
|
{
|
|
3094
3293
|
"type": "button",
|
|
3095
3294
|
"label": "设置搜索项",
|
|
@@ -3246,17 +3445,7 @@
|
|
|
3246
3445
|
}
|
|
3247
3446
|
);
|
|
3248
3447
|
|
|
3249
|
-
|
|
3250
|
-
let amisButtonsSchema = ___default.map(buttons, (button) => {
|
|
3251
|
-
return {
|
|
3252
|
-
type: 'steedos-object-button',
|
|
3253
|
-
name: button.name,
|
|
3254
|
-
objectName: button.objectName,
|
|
3255
|
-
visibleOn: getButtonVisibleOn$1(button),
|
|
3256
|
-
className: `button_${button.name}`
|
|
3257
|
-
}
|
|
3258
|
-
});
|
|
3259
|
-
|
|
3448
|
+
let amisButtonsSchema = getObjectListViewButtonsSchemas(objectSchema, {formFactor: ctx.formFactor});
|
|
3260
3449
|
const reg = new RegExp('_', 'g');
|
|
3261
3450
|
const standardIcon = icon && icon.replace(reg, '-');
|
|
3262
3451
|
return {
|
|
@@ -3289,8 +3478,8 @@
|
|
|
3289
3478
|
},
|
|
3290
3479
|
{
|
|
3291
3480
|
"type": "dropdown-button",
|
|
3292
|
-
"className": "",
|
|
3293
|
-
"label": "\${uiSchema.list_views[listName].label}",
|
|
3481
|
+
"className": "",
|
|
3482
|
+
"label": "\${listName ? uiSchema.list_views[listName].label : uiSchema.list_views[defaultListName].label}",
|
|
3294
3483
|
"rightIcon": "fa fa-caret-down",
|
|
3295
3484
|
"size": "sm",
|
|
3296
3485
|
"hideCaret": true,
|
|
@@ -3438,7 +3627,10 @@
|
|
|
3438
3627
|
* @returns amisSchema
|
|
3439
3628
|
*/
|
|
3440
3629
|
function getObjectListHeader$1(objectSchema, listViewName, ctx) {
|
|
3441
|
-
|
|
3630
|
+
if (!ctx) {
|
|
3631
|
+
ctx = {};
|
|
3632
|
+
}
|
|
3633
|
+
let firstLineSchema = getObjectListHeaderFirstLine(objectSchema, listViewName, ctx);
|
|
3442
3634
|
let body = [firstLineSchema];
|
|
3443
3635
|
let headerSchema = [{
|
|
3444
3636
|
"type": "wrapper",
|
|
@@ -3459,35 +3651,11 @@
|
|
|
3459
3651
|
const { showRecordTitle = true } = options || {};
|
|
3460
3652
|
// console.log('getObjectRecordDetailHeader==>', objectSchema, recordId)
|
|
3461
3653
|
const { name, label, icon, NAME_FIELD_KEY } = objectSchema;
|
|
3462
|
-
|
|
3463
|
-
|
|
3464
|
-
|
|
3465
|
-
|
|
3466
|
-
|
|
3467
|
-
let amisButtonsSchema = ___default.map(buttons, (button) => {
|
|
3468
|
-
return {
|
|
3469
|
-
type: 'steedos-object-button',
|
|
3470
|
-
name: button.name,
|
|
3471
|
-
objectName: button.objectName,
|
|
3472
|
-
visibleOn: getButtonVisibleOn$1(button),
|
|
3473
|
-
className: `button_${button.name}`
|
|
3474
|
-
}
|
|
3475
|
-
});
|
|
3476
|
-
let dropdownButtons = ___default.map(moreButtons, (button) => {
|
|
3477
|
-
return {
|
|
3478
|
-
type: 'steedos-object-button',
|
|
3479
|
-
name: button.name,
|
|
3480
|
-
objectName: button.objectName,
|
|
3481
|
-
visibleOn: getButtonVisibleOn$1(button),
|
|
3482
|
-
}
|
|
3483
|
-
});
|
|
3484
|
-
const dropdownButtonsSchema = {
|
|
3485
|
-
type: "steedos-dropdown-button",
|
|
3486
|
-
label: "",
|
|
3487
|
-
buttons: dropdownButtons,
|
|
3488
|
-
className: 'slds-icon'
|
|
3489
|
-
};
|
|
3490
|
-
amisButtonsSchema.push(dropdownButtonsSchema);
|
|
3654
|
+
|
|
3655
|
+
let amisButtonsSchema = getObjectDetailButtonsSchemas(objectSchema, recordId, options);
|
|
3656
|
+
|
|
3657
|
+
// console.log(`getObjectRecordDetailHeader==>`, amisButtonsSchema)
|
|
3658
|
+
|
|
3491
3659
|
const reg = new RegExp('_', 'g');
|
|
3492
3660
|
const standardIcon = icon && icon.replace(reg, '-');
|
|
3493
3661
|
|
|
@@ -3698,8 +3866,8 @@
|
|
|
3698
3866
|
"icon": "fa fa-table-columns",
|
|
3699
3867
|
"btnClassName": "antd-Button--iconOnly bg-white p-2 rounded border-gray-300 text-gray-500",
|
|
3700
3868
|
"align": "right",
|
|
3701
|
-
"visibleOn": "${
|
|
3702
|
-
"buttons": [
|
|
3869
|
+
"visibleOn": "${window:innerWidth > 768 && !!!isLookup}",
|
|
3870
|
+
"buttons": [
|
|
3703
3871
|
{
|
|
3704
3872
|
"label": "显示为",
|
|
3705
3873
|
"children": buttons
|
|
@@ -3719,11 +3887,26 @@ const filterForm = scope.getComponents().find(function(n){
|
|
|
3719
3887
|
const filterService = filterForm.context.getComponents().find(function(n){
|
|
3720
3888
|
return n.props.type === "service";
|
|
3721
3889
|
});
|
|
3722
|
-
filterService.setData({showFieldsFilter: !!!filterService.props.data.showFieldsFilter});
|
|
3723
|
-
|
|
3724
|
-
|
|
3725
|
-
|
|
3726
|
-
|
|
3890
|
+
// filterService.setData({showFieldsFilter: !!!filterService.props.data.showFieldsFilter});
|
|
3891
|
+
let resizeWindow = function(){
|
|
3892
|
+
//触发amis crud 高度重算
|
|
3893
|
+
setTimeout(()=>{
|
|
3894
|
+
window.dispatchEvent(new Event("resize"))
|
|
3895
|
+
}, 500);
|
|
3896
|
+
}
|
|
3897
|
+
if(filterService.props.data.showFieldsFilter){
|
|
3898
|
+
let buttonCancel = SteedosUI.getClosestAmisComponentByType(filterForm.context, "button", {
|
|
3899
|
+
direction: "down",
|
|
3900
|
+
name: "btn_filter_form_cancel"
|
|
3901
|
+
});
|
|
3902
|
+
buttonCancel.props.dispatchEvent('click', {}).then(function(){
|
|
3903
|
+
resizeWindow();
|
|
3904
|
+
});
|
|
3905
|
+
}
|
|
3906
|
+
else{
|
|
3907
|
+
filterService.setData({showFieldsFilter: true});
|
|
3908
|
+
resizeWindow();
|
|
3909
|
+
}
|
|
3727
3910
|
`;
|
|
3728
3911
|
|
|
3729
3912
|
function getExportApiRequestAdaptorScript(){
|
|
@@ -3796,6 +3979,7 @@ setTimeout(()=>{
|
|
|
3796
3979
|
`;
|
|
3797
3980
|
return [
|
|
3798
3981
|
// "bulkActions",
|
|
3982
|
+
...(headerToolbarItems || []),
|
|
3799
3983
|
hiddenCount ? {} :{
|
|
3800
3984
|
"type": "tpl",
|
|
3801
3985
|
"tpl": "${count} 个项目"
|
|
@@ -3940,7 +4124,7 @@ setTimeout(()=>{
|
|
|
3940
4124
|
"list_view": "${uiSchema.list_views[listName]}",
|
|
3941
4125
|
"appId": "${appId}",
|
|
3942
4126
|
"global": "${global}",
|
|
3943
|
-
"
|
|
4127
|
+
"targetObjectName": "${objectName}",
|
|
3944
4128
|
},
|
|
3945
4129
|
"body": [
|
|
3946
4130
|
{
|
|
@@ -3980,7 +4164,7 @@ setTimeout(()=>{
|
|
|
3980
4164
|
{
|
|
3981
4165
|
"args": {
|
|
3982
4166
|
// 直接使用recordId不能拿到数据,只能通过result里面拿数据
|
|
3983
|
-
"url": "${context.rootUrl}/app/${appId}/${
|
|
4167
|
+
"url": "${context.rootUrl}/app/${appId}/${targetObjectName}/grid/listview_${result.data.recordId|lowerCase}",
|
|
3984
4168
|
"blank": false
|
|
3985
4169
|
},
|
|
3986
4170
|
"actionType": "url",
|
|
@@ -4021,7 +4205,7 @@ setTimeout(()=>{
|
|
|
4021
4205
|
"data": {
|
|
4022
4206
|
"&": "$$",
|
|
4023
4207
|
"listName": "${listName}",
|
|
4024
|
-
"
|
|
4208
|
+
"targetObjectName": "${objectName}",
|
|
4025
4209
|
"list_view": "${uiSchema.list_views[listName]}",
|
|
4026
4210
|
"appId": "${appId}",
|
|
4027
4211
|
"global": "${global}"
|
|
@@ -4064,7 +4248,7 @@ setTimeout(()=>{
|
|
|
4064
4248
|
"actions": [
|
|
4065
4249
|
{
|
|
4066
4250
|
"args": {
|
|
4067
|
-
"url": "${context.rootUrl}/app/${appId}/${
|
|
4251
|
+
"url": "${context.rootUrl}/app/${appId}/${targetObjectName}/grid/listview_${result.data.recordId|lowerCase}",
|
|
4068
4252
|
"blank": false
|
|
4069
4253
|
},
|
|
4070
4254
|
"actionType": "url",
|
|
@@ -4100,7 +4284,7 @@ setTimeout(()=>{
|
|
|
4100
4284
|
"type": "dialog",
|
|
4101
4285
|
"title": "重命名 列表视图",
|
|
4102
4286
|
"data": {
|
|
4103
|
-
"
|
|
4287
|
+
"targetObjectName": "${objectName}",
|
|
4104
4288
|
"recordId": "${uiSchema.list_views[listName]._id}",
|
|
4105
4289
|
"appId": "${appId}"
|
|
4106
4290
|
},
|
|
@@ -4121,7 +4305,7 @@ setTimeout(()=>{
|
|
|
4121
4305
|
"actions": [
|
|
4122
4306
|
{
|
|
4123
4307
|
"args": {
|
|
4124
|
-
"url": "${context.rootUrl}/app/${appId}/${
|
|
4308
|
+
"url": "${context.rootUrl}/app/${appId}/${targetObjectName}/grid/${name}",
|
|
4125
4309
|
"blank": false
|
|
4126
4310
|
},
|
|
4127
4311
|
"actionType": "url",
|
|
@@ -4195,6 +4379,7 @@ setTimeout(()=>{
|
|
|
4195
4379
|
"type": "dialog",
|
|
4196
4380
|
"title": "过滤设置",
|
|
4197
4381
|
"data": {
|
|
4382
|
+
"targetObjectName": "${objectName}",
|
|
4198
4383
|
"objectName": "${objectName}",
|
|
4199
4384
|
"recordId": "${uiSchema.list_views[listName]._id}",
|
|
4200
4385
|
"listName": "${listName}",
|
|
@@ -4220,7 +4405,7 @@ setTimeout(()=>{
|
|
|
4220
4405
|
"actions": [
|
|
4221
4406
|
{
|
|
4222
4407
|
"args": {
|
|
4223
|
-
"url": "${context.rootUrl}/app/${appId}/${
|
|
4408
|
+
"url": "${context.rootUrl}/app/${appId}/${targetObjectName}/grid/${listName}",
|
|
4224
4409
|
"blank": false
|
|
4225
4410
|
},
|
|
4226
4411
|
"actionType": "url",
|
|
@@ -4258,6 +4443,7 @@ setTimeout(()=>{
|
|
|
4258
4443
|
"title": "显示的列",
|
|
4259
4444
|
"data": {
|
|
4260
4445
|
"&": "$$",
|
|
4446
|
+
"targetObjectName": "${objectName}",
|
|
4261
4447
|
"objectName": "${objectName}",
|
|
4262
4448
|
"recordId": "${uiSchema.list_views[listName]._id}",
|
|
4263
4449
|
"listName": "${listName}",
|
|
@@ -4283,7 +4469,7 @@ setTimeout(()=>{
|
|
|
4283
4469
|
"actions": [
|
|
4284
4470
|
{
|
|
4285
4471
|
"args": {
|
|
4286
|
-
"url": "${context.rootUrl}/app/${appId}/${
|
|
4472
|
+
"url": "${context.rootUrl}/app/${appId}/${targetObjectName}/grid/${listName}",
|
|
4287
4473
|
"blank": false
|
|
4288
4474
|
},
|
|
4289
4475
|
"actionType": "url"
|
|
@@ -4319,6 +4505,7 @@ setTimeout(()=>{
|
|
|
4319
4505
|
"title": "弹框标题",
|
|
4320
4506
|
"data": {
|
|
4321
4507
|
"&": "$$",
|
|
4508
|
+
"targetObjectName": "${objectName}",
|
|
4322
4509
|
"objectName": "${objectName}",
|
|
4323
4510
|
"recordId": "${uiSchema.list_views[listName]._id}",
|
|
4324
4511
|
"listName": "${listName}",
|
|
@@ -4344,7 +4531,7 @@ setTimeout(()=>{
|
|
|
4344
4531
|
"actions": [
|
|
4345
4532
|
{
|
|
4346
4533
|
"args": {
|
|
4347
|
-
"url": "${context.rootUrl}/app/${appId}/${
|
|
4534
|
+
"url": "${context.rootUrl}/app/${appId}/${targetObjectName}/grid/${listName}",
|
|
4348
4535
|
"blank": false
|
|
4349
4536
|
},
|
|
4350
4537
|
"actionType": "url"
|
|
@@ -4458,8 +4645,8 @@ setTimeout(()=>{
|
|
|
4458
4645
|
}
|
|
4459
4646
|
else {
|
|
4460
4647
|
return [
|
|
4648
|
+
"switch-per-page",
|
|
4461
4649
|
"statistics",
|
|
4462
|
-
// "switch-per-page",
|
|
4463
4650
|
"pagination"
|
|
4464
4651
|
]
|
|
4465
4652
|
}
|
|
@@ -4892,13 +5079,16 @@ setTimeout(()=>{
|
|
|
4892
5079
|
var sort = orderBy + ' ' + orderDir;
|
|
4893
5080
|
sort = orderBy ? sort : "${sort}";
|
|
4894
5081
|
var allowSearchFields = ${JSON.stringify(searchableFields)};
|
|
5082
|
+
let fieldValue;
|
|
4895
5083
|
if(api.data.$term){
|
|
4896
5084
|
filters = [["name", "contains", "'+ api.data.$term +'"]];
|
|
4897
5085
|
}else if(selfData.op === 'loadOptions' && selfData.value){
|
|
4898
5086
|
if(selfData.value?.indexOf(',') > 0){
|
|
4899
|
-
|
|
5087
|
+
fieldValue = selfData.value.split(',');
|
|
5088
|
+
filters = [["${referenceTo.valueField.name}", "=", fieldValue]];
|
|
4900
5089
|
}else{
|
|
4901
|
-
|
|
5090
|
+
fieldValue = selfData.value;
|
|
5091
|
+
filters = [["${referenceTo.valueField.name}", "=", fieldValue]];
|
|
4902
5092
|
}
|
|
4903
5093
|
}
|
|
4904
5094
|
|
|
@@ -4952,6 +5142,9 @@ setTimeout(()=>{
|
|
|
4952
5142
|
if(enable_tree){
|
|
4953
5143
|
pageSize = 10000;
|
|
4954
5144
|
}
|
|
5145
|
+
if(fieldValue && _.isArray(fieldValue) && fieldValue.length > pageSize){
|
|
5146
|
+
pageSize = fieldValue.length;
|
|
5147
|
+
}
|
|
4955
5148
|
api.data.query = api.data.query.replace(/{__filters}/g, JSON.stringify(filters)).replace('{__top}', pageSize).replace('{__skip}', skip).replace('{__sort}', sort.trim());
|
|
4956
5149
|
return api;
|
|
4957
5150
|
`;
|
|
@@ -5032,6 +5225,8 @@ setTimeout(()=>{
|
|
|
5032
5225
|
...ctx
|
|
5033
5226
|
});
|
|
5034
5227
|
|
|
5228
|
+
pickerSchema.affixHeader = false;
|
|
5229
|
+
|
|
5035
5230
|
var headerToolbarItems = [];
|
|
5036
5231
|
const isMobile = window.innerWidth < 768;
|
|
5037
5232
|
if(referenceTo.objectName === "space_users" && field.reference_to_field === "user" && !isMobile){
|
|
@@ -5049,14 +5244,11 @@ setTimeout(()=>{
|
|
|
5049
5244
|
pickerSchema.headerToolbar.push(new_button);
|
|
5050
5245
|
}
|
|
5051
5246
|
pickerSchema.footerToolbar = refObjectConfig.enable_tree ? [] : getObjectFooterToolbar();
|
|
5052
|
-
|
|
5053
|
-
|
|
5054
|
-
|
|
5055
|
-
|
|
5056
|
-
|
|
5057
|
-
...ctx
|
|
5058
|
-
});
|
|
5059
|
-
}
|
|
5247
|
+
if (ctx.filterVisible !== false) {
|
|
5248
|
+
pickerSchema.filter = await getObjectFilter(refObjectConfig, fields, {
|
|
5249
|
+
isLookup: true,
|
|
5250
|
+
...ctx
|
|
5251
|
+
});
|
|
5060
5252
|
}
|
|
5061
5253
|
pickerSchema.data = Object.assign({}, pickerSchema.data, {
|
|
5062
5254
|
"&": "$$",
|
|
@@ -5240,11 +5432,12 @@ setTimeout(()=>{
|
|
|
5240
5432
|
autoComplete: apiInfo,
|
|
5241
5433
|
searchable: true,
|
|
5242
5434
|
};
|
|
5435
|
+
//删除xlink:href中的rootUrl前缀,解决客户端svg为空的问题
|
|
5243
5436
|
const select_menuTpl = `<span class='flex items-center mt-0.5'>
|
|
5244
5437
|
<span role='img' aria-label='smile' class='anticon anticon-smile'>
|
|
5245
5438
|
<span class='slds-icon_container slds-icon-standard-\${REPLACE(icon,'_','-')}'>
|
|
5246
5439
|
<svg class='slds-icon slds-icon_x-small' aria-hidden='true'>
|
|
5247
|
-
<use xlink:href='
|
|
5440
|
+
<use xlink:href='/assets/icons/standard-sprite/svg/symbols.svg#\${icon}'></use>
|
|
5248
5441
|
</svg>
|
|
5249
5442
|
</span>
|
|
5250
5443
|
</span>
|
|
@@ -5302,8 +5495,10 @@ setTimeout(()=>{
|
|
|
5302
5495
|
|
|
5303
5496
|
if(referenceTo.objectName === "space_users" && field.reference_to_field === "user"){
|
|
5304
5497
|
if(ctx.idsDependOn || field.amis){
|
|
5498
|
+
// ids人员点选模式
|
|
5305
5499
|
return await lookupToAmisIdsPicker(field, readonly, ctx);
|
|
5306
5500
|
}
|
|
5501
|
+
// 左侧树右侧人员列表的下拉框模式,不再支持,而是执行下面的lookupToAmisPicker函数弹出选人窗口
|
|
5307
5502
|
// return await lookupToAmisSelectUser(field, readonly, ctx);
|
|
5308
5503
|
}
|
|
5309
5504
|
|
|
@@ -5404,6 +5599,9 @@ setTimeout(()=>{
|
|
|
5404
5599
|
top: top,
|
|
5405
5600
|
...ctx
|
|
5406
5601
|
});
|
|
5602
|
+
|
|
5603
|
+
pickerSchema.affixHeader = false;
|
|
5604
|
+
|
|
5407
5605
|
}
|
|
5408
5606
|
|
|
5409
5607
|
const data = {
|
|
@@ -5433,7 +5631,6 @@ setTimeout(()=>{
|
|
|
5433
5631
|
if(readonly){
|
|
5434
5632
|
data.tpl = await getLookupTpl(field, ctx);
|
|
5435
5633
|
}
|
|
5436
|
-
|
|
5437
5634
|
return data;
|
|
5438
5635
|
}
|
|
5439
5636
|
|
|
@@ -5641,6 +5838,23 @@ setTimeout(()=>{
|
|
|
5641
5838
|
return readonly ? getAmisFileReadonlySchema(steedosField) : getAmisFileEditSchema(steedosField);
|
|
5642
5839
|
};
|
|
5643
5840
|
|
|
5841
|
+
/*
|
|
5842
|
+
* @Author: baozhoutao@steedos.com
|
|
5843
|
+
* @Date: 2022-07-20 16:29:22
|
|
5844
|
+
* @LastEditors: Please set LastEditors
|
|
5845
|
+
* @LastEditTime: 2023-05-11 11:19:54
|
|
5846
|
+
* @Description:
|
|
5847
|
+
*/
|
|
5848
|
+
|
|
5849
|
+
function getContrastColor(bgColor) {
|
|
5850
|
+
var backgroundColor = (bgColor.charAt(0) === '#') ? bgColor.substring(1, 7) : bgColor;
|
|
5851
|
+
var r = parseInt(backgroundColor.substr(0, 2), 16);
|
|
5852
|
+
var g = parseInt(backgroundColor.substr(2, 2), 16);
|
|
5853
|
+
var b = parseInt(backgroundColor.substr(4, 2), 16);
|
|
5854
|
+
var brightness = (r * 299 + g * 587 + b * 114) / 1000;
|
|
5855
|
+
return brightness >= 128 ? "#000000" : "#ffffff";
|
|
5856
|
+
}
|
|
5857
|
+
|
|
5644
5858
|
const OMIT_FIELDS = ['created', 'created_by', 'modified', 'modified_by'];
|
|
5645
5859
|
// const Lookup = require('./lookup');
|
|
5646
5860
|
|
|
@@ -5794,6 +6008,8 @@ setTimeout(()=>{
|
|
|
5794
6008
|
}
|
|
5795
6009
|
|
|
5796
6010
|
async function convertSFieldToAmisField(field, readonly, ctx) {
|
|
6011
|
+
// console.log('convertSFieldToAmisField====>', field, readonly, ctx)
|
|
6012
|
+
const isMobile = window.innerWidth <= 768;
|
|
5797
6013
|
// 创建人和修改人、创建时间和修改时间不显示
|
|
5798
6014
|
if(___default__namespace.includes(OMIT_FIELDS, field.name) && ctx.showSystemFields != true){
|
|
5799
6015
|
return;
|
|
@@ -5828,20 +6044,42 @@ setTimeout(()=>{
|
|
|
5828
6044
|
// }
|
|
5829
6045
|
// break;
|
|
5830
6046
|
case 'select':
|
|
5831
|
-
|
|
5832
|
-
|
|
5833
|
-
|
|
5834
|
-
|
|
5835
|
-
|
|
5836
|
-
|
|
5837
|
-
|
|
5838
|
-
|
|
5839
|
-
|
|
5840
|
-
|
|
5841
|
-
|
|
5842
|
-
|
|
5843
|
-
|
|
6047
|
+
if(readonly){
|
|
6048
|
+
const selectOptions = field.options;
|
|
6049
|
+
let map = {};
|
|
6050
|
+
___default__namespace.forEach(selectOptions,(option)=>{
|
|
6051
|
+
const optionValue = option.value + '';
|
|
6052
|
+
if(option.color){
|
|
6053
|
+
const background = '#'+option.color;
|
|
6054
|
+
const color = getContrastColor(background);
|
|
6055
|
+
const optionColorStyle = 'background:'+background+';color:'+color;
|
|
6056
|
+
map[optionValue] = `<span class="rounded-xl px-2 py-1" style='${optionColorStyle}'>${option.label}</span>`;
|
|
6057
|
+
}else {
|
|
6058
|
+
map[optionValue] = option.label;
|
|
6059
|
+
}
|
|
6060
|
+
});
|
|
6061
|
+
convertData = {
|
|
6062
|
+
type: "static-mapping",
|
|
6063
|
+
name: field.name,
|
|
6064
|
+
label: field.label,
|
|
6065
|
+
map: map
|
|
6066
|
+
};
|
|
6067
|
+
}else {
|
|
6068
|
+
convertData = {
|
|
6069
|
+
type: getAmisStaticFieldType('select', readonly),
|
|
6070
|
+
joinValues: false,
|
|
6071
|
+
options: getSelectFieldOptions(field),
|
|
6072
|
+
extractValue: true,
|
|
6073
|
+
clearable: true,
|
|
6074
|
+
labelField: 'label',
|
|
6075
|
+
valueField: 'value'
|
|
6076
|
+
};
|
|
6077
|
+
if(field.multiple){
|
|
6078
|
+
convertData.multiple = true;
|
|
6079
|
+
convertData.extractValue = true;
|
|
6080
|
+
}
|
|
5844
6081
|
}
|
|
6082
|
+
|
|
5845
6083
|
break;
|
|
5846
6084
|
case 'boolean':
|
|
5847
6085
|
convertData = {
|
|
@@ -5861,7 +6099,26 @@ setTimeout(()=>{
|
|
|
5861
6099
|
};
|
|
5862
6100
|
break;
|
|
5863
6101
|
case 'date':
|
|
5864
|
-
convertData = {
|
|
6102
|
+
convertData = isMobile && !readonly ? {
|
|
6103
|
+
type: "native-date",
|
|
6104
|
+
pipeIn: (value, data) => {
|
|
6105
|
+
if (value) {
|
|
6106
|
+
value = moment(value).utc().format('YYYY-MM-DD');
|
|
6107
|
+
return value;
|
|
6108
|
+
} else {
|
|
6109
|
+
return "";
|
|
6110
|
+
}
|
|
6111
|
+
|
|
6112
|
+
},
|
|
6113
|
+
pipeOut: (value, oldValue, data) => {
|
|
6114
|
+
if (value) {
|
|
6115
|
+
value = moment(value).format('YYYY-MM-DDT00:00:00.000[Z]');
|
|
6116
|
+
return value;
|
|
6117
|
+
} else {
|
|
6118
|
+
return "";
|
|
6119
|
+
}
|
|
6120
|
+
}
|
|
6121
|
+
} : {
|
|
5865
6122
|
type: getAmisStaticFieldType('date', readonly),
|
|
5866
6123
|
inputFormat: "YYYY-MM-DD",
|
|
5867
6124
|
format:'YYYY-MM-DDT00:00:00.000[Z]',
|
|
@@ -5880,12 +6137,48 @@ setTimeout(()=>{
|
|
|
5880
6137
|
};
|
|
5881
6138
|
break;
|
|
5882
6139
|
case 'datetime':
|
|
5883
|
-
convertData = {
|
|
6140
|
+
convertData = isMobile && !readonly ? {
|
|
6141
|
+
type: "combo",
|
|
6142
|
+
pipeIn: (value, data) => {
|
|
6143
|
+
let revalue = {};
|
|
6144
|
+
if (value && value != "Invalid date") {
|
|
6145
|
+
value = moment(value).format('YYYY-MM-DD HH:mm:ss');
|
|
6146
|
+
revalue[field.name + "-native-date"] = value.split(' ')[0];
|
|
6147
|
+
revalue[field.name + "-native-time"] = value.split(' ')[1];
|
|
6148
|
+
} else {
|
|
6149
|
+
revalue[field.name + "-native-date"] = "";
|
|
6150
|
+
revalue[field.name + "-native-time"] = "";
|
|
6151
|
+
}
|
|
6152
|
+
return revalue;
|
|
6153
|
+
},
|
|
6154
|
+
pipeOut: (value, oldValue, data) => {
|
|
6155
|
+
let revalue = "";
|
|
6156
|
+
if (value[field.name + "-native-date"] && value[field.name + "-native-time"]) {
|
|
6157
|
+
revalue = value[field.name + "-native-date"] + " " + value[field.name + "-native-time"];
|
|
6158
|
+
revalue = moment(revalue).utc().format('YYYY-MM-DDTHH:mm:ss.SSS[Z]');
|
|
6159
|
+
}
|
|
6160
|
+
return revalue;
|
|
6161
|
+
},
|
|
6162
|
+
items: [
|
|
6163
|
+
{
|
|
6164
|
+
type: "native-date",
|
|
6165
|
+
name: field.name + "-native-date",
|
|
6166
|
+
className: "steedos-native-date",
|
|
6167
|
+
value: ""
|
|
6168
|
+
},
|
|
6169
|
+
{
|
|
6170
|
+
type: "native-time",
|
|
6171
|
+
name: field.name + "-native-time",
|
|
6172
|
+
className: "steedos-native-time",
|
|
6173
|
+
value: ""
|
|
6174
|
+
}
|
|
6175
|
+
]
|
|
6176
|
+
} : {
|
|
5884
6177
|
type: getAmisStaticFieldType('datetime', readonly),
|
|
5885
6178
|
inputFormat: 'YYYY-MM-DD HH:mm',
|
|
5886
|
-
format:'YYYY-MM-DDTHH:mm:ss.SSSZ',
|
|
6179
|
+
format: 'YYYY-MM-DDTHH:mm:ss.SSSZ',
|
|
5887
6180
|
tpl: readonly ? getDateTimeTpl(field) : null,
|
|
5888
|
-
utc: true
|
|
6181
|
+
utc: true,
|
|
5889
6182
|
};
|
|
5890
6183
|
break;
|
|
5891
6184
|
case 'input-time-range':
|
|
@@ -5900,7 +6193,26 @@ setTimeout(()=>{
|
|
|
5900
6193
|
};
|
|
5901
6194
|
break;
|
|
5902
6195
|
case 'time':
|
|
5903
|
-
convertData = {
|
|
6196
|
+
convertData = isMobile && !readonly ? {
|
|
6197
|
+
type: "native-time",
|
|
6198
|
+
pipeIn: (value, data) => {
|
|
6199
|
+
if (value) {
|
|
6200
|
+
value = moment(value).utc().format('HH:mm');
|
|
6201
|
+
return value;
|
|
6202
|
+
} else {
|
|
6203
|
+
return "";
|
|
6204
|
+
}
|
|
6205
|
+
|
|
6206
|
+
},
|
|
6207
|
+
pipeOut: (value, oldValue, data) => {
|
|
6208
|
+
if (value) {
|
|
6209
|
+
value = moment('1970-01-01 ' + value).format('1970-01-01THH:mm:00.000[Z]');
|
|
6210
|
+
return value;
|
|
6211
|
+
} else {
|
|
6212
|
+
return "";
|
|
6213
|
+
}
|
|
6214
|
+
}
|
|
6215
|
+
} : {
|
|
5904
6216
|
type: getAmisStaticFieldType('time', readonly),
|
|
5905
6217
|
inputFormat: 'HH:mm',
|
|
5906
6218
|
timeFormat:'HH:mm',
|
|
@@ -6012,7 +6324,7 @@ setTimeout(()=>{
|
|
|
6012
6324
|
convertData = {
|
|
6013
6325
|
type: "editor",
|
|
6014
6326
|
language: field.language,
|
|
6015
|
-
|
|
6327
|
+
editorDidMount: new Function('editor', 'monaco', field.editorDidMount)
|
|
6016
6328
|
};
|
|
6017
6329
|
break;
|
|
6018
6330
|
case 'toggle':
|
|
@@ -6033,7 +6345,7 @@ setTimeout(()=>{
|
|
|
6033
6345
|
columnsTogglable: false,
|
|
6034
6346
|
strictMode:false,
|
|
6035
6347
|
affixHeader: false, // 是否固定表头, 不固定表头, 否则form有y轴滚动条时, 表头会跟随滚动条滚动.
|
|
6036
|
-
|
|
6348
|
+
needConfirm: false,
|
|
6037
6349
|
editable: !readonly,
|
|
6038
6350
|
addable: !readonly,
|
|
6039
6351
|
removable: !readonly,
|
|
@@ -6104,6 +6416,13 @@ setTimeout(()=>{
|
|
|
6104
6416
|
convertData.quickEdit = false;
|
|
6105
6417
|
}
|
|
6106
6418
|
|
|
6419
|
+
let fieldTypeClassName = ' steedos-' + convertData.type + (readonly ? '-readonly' : '-edit');
|
|
6420
|
+
if (convertData.className) {
|
|
6421
|
+
convertData.className = convertData.className + fieldTypeClassName;
|
|
6422
|
+
} else {
|
|
6423
|
+
convertData.className = fieldTypeClassName;
|
|
6424
|
+
}
|
|
6425
|
+
|
|
6107
6426
|
if(field.visible_on){
|
|
6108
6427
|
// convertData.visibleOn = `\$${field.visible_on.substring(1, field.visible_on.length -1).replace(/formData./g, '')}`;
|
|
6109
6428
|
if(field.visible_on.startsWith("{{")){
|
|
@@ -6263,6 +6582,12 @@ setTimeout(()=>{
|
|
|
6263
6582
|
// })
|
|
6264
6583
|
|
|
6265
6584
|
return `
|
|
6585
|
+
if(payload.data.data.length === 0){
|
|
6586
|
+
return {
|
|
6587
|
+
status: 2,
|
|
6588
|
+
msg: "无法找到记录"
|
|
6589
|
+
}
|
|
6590
|
+
}
|
|
6266
6591
|
if(payload.data.data){
|
|
6267
6592
|
var data = payload.data.data[0];
|
|
6268
6593
|
var gridAndObjectFieldsName = ${JSON.stringify(gridAndObjectFieldsName)};
|
|
@@ -6387,12 +6712,12 @@ setTimeout(()=>{
|
|
|
6387
6712
|
});
|
|
6388
6713
|
}
|
|
6389
6714
|
}else{
|
|
6390
|
-
data[item] = {
|
|
6715
|
+
data[item] = [{
|
|
6391
6716
|
value: fileFieldValue,
|
|
6392
6717
|
name: fileFieldDisplayValue.name,
|
|
6393
6718
|
url: fileFieldDisplayValue.url + "?download=true",
|
|
6394
6719
|
state: "uploaded"
|
|
6395
|
-
};
|
|
6720
|
+
}];
|
|
6396
6721
|
}
|
|
6397
6722
|
}
|
|
6398
6723
|
})
|
|
@@ -6410,7 +6735,7 @@ setTimeout(()=>{
|
|
|
6410
6735
|
|
|
6411
6736
|
return {
|
|
6412
6737
|
method: "post",
|
|
6413
|
-
url: getApi$2(),
|
|
6738
|
+
url: getApi$2() + '&objectName=${objectName}' ,
|
|
6414
6739
|
// sendOn: "!!this.recordId",
|
|
6415
6740
|
cache: API_CACHE,
|
|
6416
6741
|
requestAdaptor: `
|
|
@@ -6716,7 +7041,7 @@ setTimeout(()=>{
|
|
|
6716
7041
|
}),
|
|
6717
7042
|
filter: options.filterVisible !== false && await getObjectFilter(objectSchema, fields, options),
|
|
6718
7043
|
};
|
|
6719
|
-
if(options.formFactor !== 'SMALL'){
|
|
7044
|
+
if(options.formFactor !== 'SMALL' || ["split"].indexOf(options.displayAs) == -1){
|
|
6720
7045
|
Object.assign(bodyProps, {
|
|
6721
7046
|
bulkActions: options.bulkActions != false ? bulkActions : false
|
|
6722
7047
|
});
|
|
@@ -6781,7 +7106,7 @@ setTimeout(()=>{
|
|
|
6781
7106
|
api: await getTableApi(objectSchema, fields, options),
|
|
6782
7107
|
hiddenOn: options.tableHiddenOn,
|
|
6783
7108
|
autoFillHeight: options.isRelated ? false : true,
|
|
6784
|
-
className: `flex-auto ${crudClassName || ""}`,
|
|
7109
|
+
className: `flex-auto bg-white ${crudClassName || ""}`,
|
|
6785
7110
|
crudClassName: crudClassName,
|
|
6786
7111
|
},
|
|
6787
7112
|
bodyProps,
|
|
@@ -6930,7 +7255,8 @@ setTimeout(()=>{
|
|
|
6930
7255
|
"eventName": `@data.changed.${objectSchema.name}`
|
|
6931
7256
|
},
|
|
6932
7257
|
"data": {
|
|
6933
|
-
"objectName": `${objectSchema.name}
|
|
7258
|
+
"objectName": `${objectSchema.name}`,
|
|
7259
|
+
"displayAs": "${displayAs}"
|
|
6934
7260
|
}
|
|
6935
7261
|
},
|
|
6936
7262
|
{
|
|
@@ -7030,7 +7356,8 @@ setTimeout(()=>{
|
|
|
7030
7356
|
data: {
|
|
7031
7357
|
objectName: "${event.data.__objectName}",
|
|
7032
7358
|
record: "${event.data.__record}"
|
|
7033
|
-
}
|
|
7359
|
+
},
|
|
7360
|
+
expression: "${event.data.__response.error != true}"
|
|
7034
7361
|
},
|
|
7035
7362
|
{
|
|
7036
7363
|
"actionType": "setValue",
|
|
@@ -7038,7 +7365,8 @@ setTimeout(()=>{
|
|
|
7038
7365
|
value: {
|
|
7039
7366
|
"recordLoaded": true,
|
|
7040
7367
|
}
|
|
7041
|
-
}
|
|
7368
|
+
},
|
|
7369
|
+
expression: "${event.data.__response.error != true}"
|
|
7042
7370
|
}
|
|
7043
7371
|
]
|
|
7044
7372
|
}
|
|
@@ -7046,6 +7374,21 @@ setTimeout(()=>{
|
|
|
7046
7374
|
}
|
|
7047
7375
|
}
|
|
7048
7376
|
|
|
7377
|
+
/*
|
|
7378
|
+
* @Author: baozhoutao@steedos.com
|
|
7379
|
+
* @Date: 2022-08-04 10:42:49
|
|
7380
|
+
* @LastEditors: baozhoutao@steedos.com
|
|
7381
|
+
* @LastEditTime: 2022-08-25 10:28:47
|
|
7382
|
+
* @Description:
|
|
7383
|
+
*/
|
|
7384
|
+
var config = {
|
|
7385
|
+
listView: {
|
|
7386
|
+
newRecordMode: 'modal',
|
|
7387
|
+
editRecordMode: 'modal',
|
|
7388
|
+
perPage: 20
|
|
7389
|
+
}
|
|
7390
|
+
};
|
|
7391
|
+
|
|
7049
7392
|
async function getTableColumns$1(fields, options){
|
|
7050
7393
|
const columns = [{name: '_index',type: 'text', width: 32, placeholder: ""}];
|
|
7051
7394
|
for (const field of fields) {
|
|
@@ -7109,7 +7452,31 @@ setTimeout(()=>{
|
|
|
7109
7452
|
...getAmisFileReadonlySchema(field)
|
|
7110
7453
|
}, field.amis, {name: field.name}));
|
|
7111
7454
|
}
|
|
7112
|
-
|
|
7455
|
+
else if(field.type === 'select'){
|
|
7456
|
+
const selectOptions = field.options;
|
|
7457
|
+
let map = {};
|
|
7458
|
+
___default.forEach(selectOptions,(option)=>{
|
|
7459
|
+
const optionValue = option.value + '';
|
|
7460
|
+
if(option.color){
|
|
7461
|
+
const background = '#'+option.color;
|
|
7462
|
+
const color = getContrastColor(background);
|
|
7463
|
+
const optionColorStyle = 'background:'+background+';color:'+color;
|
|
7464
|
+
map[optionValue] = `<span class="rounded-xl px-2 py-1" style='${optionColorStyle}'>${option.label}</span>`;
|
|
7465
|
+
}else {
|
|
7466
|
+
map[optionValue] = option.label;
|
|
7467
|
+
}
|
|
7468
|
+
});
|
|
7469
|
+
columns.push(Object.assign({}, {
|
|
7470
|
+
type: "mapping",
|
|
7471
|
+
name: field.name,
|
|
7472
|
+
label: field.label,
|
|
7473
|
+
map: map,
|
|
7474
|
+
sortable: field.sortable,
|
|
7475
|
+
width: field.width,
|
|
7476
|
+
toggled: field.toggled,
|
|
7477
|
+
className:"whitespace-nowrap",
|
|
7478
|
+
}, field.amis, {name: field.name}));
|
|
7479
|
+
}
|
|
7113
7480
|
else {
|
|
7114
7481
|
const tpl = await getFieldTpl(field, options);
|
|
7115
7482
|
|
|
@@ -7119,6 +7486,13 @@ setTimeout(()=>{
|
|
|
7119
7486
|
}else if(field.type === 'html'){
|
|
7120
7487
|
type = 'markdown';
|
|
7121
7488
|
}
|
|
7489
|
+
let className = "";
|
|
7490
|
+
if(field.type === 'textarea'){
|
|
7491
|
+
className = 'min-w-56';
|
|
7492
|
+
}
|
|
7493
|
+
if(field.wrap === false){
|
|
7494
|
+
className += " whitespace-nowrap";
|
|
7495
|
+
}
|
|
7122
7496
|
if(!field.hidden && !field.extra){
|
|
7123
7497
|
columns.push(Object.assign({}, {
|
|
7124
7498
|
name: field.name,
|
|
@@ -7129,7 +7503,7 @@ setTimeout(()=>{
|
|
|
7129
7503
|
type: type,
|
|
7130
7504
|
tpl: tpl,
|
|
7131
7505
|
toggled: field.toggled,
|
|
7132
|
-
className
|
|
7506
|
+
className,
|
|
7133
7507
|
html: field.type === 'html' ? true : null
|
|
7134
7508
|
// toggled: true
|
|
7135
7509
|
}, field.amis, {name: field.name}));
|
|
@@ -7254,8 +7628,9 @@ setTimeout(()=>{
|
|
|
7254
7628
|
const url = getNameTplUrl(nameField, options);
|
|
7255
7629
|
|
|
7256
7630
|
const columnLines = getMobileLines(tpls);
|
|
7257
|
-
|
|
7258
|
-
|
|
7631
|
+
|
|
7632
|
+
|
|
7633
|
+
let column = {
|
|
7259
7634
|
name: nameField.name,
|
|
7260
7635
|
label: nameField.label,
|
|
7261
7636
|
sortable: nameField.sortable,
|
|
@@ -7264,13 +7639,66 @@ setTimeout(()=>{
|
|
|
7264
7639
|
actionType: "link",
|
|
7265
7640
|
link: url,
|
|
7266
7641
|
innerClassName: "steedos-listview-item block text-gray-500",
|
|
7267
|
-
body:{
|
|
7642
|
+
body: {
|
|
7268
7643
|
"type": "wrapper",
|
|
7269
7644
|
"body": columnLines,
|
|
7270
7645
|
"size": "none",
|
|
7271
7646
|
"className": "p-1"
|
|
7272
7647
|
}
|
|
7273
|
-
}
|
|
7648
|
+
};
|
|
7649
|
+
|
|
7650
|
+
if(options.objectName === 'cms_files'){
|
|
7651
|
+
if(window.Meteor?.isCordova){
|
|
7652
|
+
column = {
|
|
7653
|
+
...column,
|
|
7654
|
+
actionType: "",
|
|
7655
|
+
link: "",
|
|
7656
|
+
onEvent: {
|
|
7657
|
+
"click": {
|
|
7658
|
+
"actions": [
|
|
7659
|
+
{
|
|
7660
|
+
"script": `
|
|
7661
|
+
let cms_url = "/api/files/files/"+event.data.versions[0]+"?download=true"
|
|
7662
|
+
Steedos.cordovaDownload(encodeURI(Steedos.absoluteUrl(cms_url)), event.data.name);
|
|
7663
|
+
`,
|
|
7664
|
+
"actionType": "custom"
|
|
7665
|
+
}
|
|
7666
|
+
],
|
|
7667
|
+
"weight": 0
|
|
7668
|
+
}
|
|
7669
|
+
}
|
|
7670
|
+
};
|
|
7671
|
+
}else {
|
|
7672
|
+
column = {
|
|
7673
|
+
...column,
|
|
7674
|
+
actionType: "",
|
|
7675
|
+
link: "",
|
|
7676
|
+
onEvent: {
|
|
7677
|
+
"click": {
|
|
7678
|
+
"actions": [
|
|
7679
|
+
{
|
|
7680
|
+
"args": {
|
|
7681
|
+
"api": {
|
|
7682
|
+
"url": url,
|
|
7683
|
+
"method": "get",
|
|
7684
|
+
"headers": {
|
|
7685
|
+
"Authorization": "Bearer ${context.tenantId},${context.authToken}"
|
|
7686
|
+
}
|
|
7687
|
+
}
|
|
7688
|
+
},
|
|
7689
|
+
"actionType": "download"
|
|
7690
|
+
}
|
|
7691
|
+
],
|
|
7692
|
+
"weight": 0
|
|
7693
|
+
}
|
|
7694
|
+
}
|
|
7695
|
+
};
|
|
7696
|
+
}
|
|
7697
|
+
|
|
7698
|
+
}
|
|
7699
|
+
|
|
7700
|
+
columns.push(column);
|
|
7701
|
+
|
|
7274
7702
|
|
|
7275
7703
|
return columns;
|
|
7276
7704
|
}
|
|
@@ -7389,7 +7817,7 @@ setTimeout(()=>{
|
|
|
7389
7817
|
options = {};
|
|
7390
7818
|
}
|
|
7391
7819
|
let columns = [];
|
|
7392
|
-
if(options.formFactor === 'SMALL'){
|
|
7820
|
+
if(options.formFactor === 'SMALL' || ["split"].indexOf(options.displayAs) > -1){
|
|
7393
7821
|
columns = await getMobileTableColumns(fields, options);
|
|
7394
7822
|
}
|
|
7395
7823
|
else {
|
|
@@ -7592,7 +8020,11 @@ setTimeout(()=>{
|
|
|
7592
8020
|
filters = systemFilters;
|
|
7593
8021
|
};
|
|
7594
8022
|
if(api.data.$self.additionalFilters){
|
|
7595
|
-
|
|
8023
|
+
if(_.isString(api.data.$self.additionalFilters)){
|
|
8024
|
+
userFilters.push(eval(api.data.$self.additionalFilters))
|
|
8025
|
+
}else{
|
|
8026
|
+
userFilters.push(api.data.$self.additionalFilters)
|
|
8027
|
+
}
|
|
7596
8028
|
}
|
|
7597
8029
|
|
|
7598
8030
|
if(api.data.$self._isRelated){
|
|
@@ -7625,8 +8057,7 @@ setTimeout(()=>{
|
|
|
7625
8057
|
if(_.isEmpty(filters)){
|
|
7626
8058
|
filters = userFilters;
|
|
7627
8059
|
}else{
|
|
7628
|
-
filters
|
|
7629
|
-
filters.push(userFilters)
|
|
8060
|
+
filters = [filters, 'and', userFilters]
|
|
7630
8061
|
}
|
|
7631
8062
|
}
|
|
7632
8063
|
api.data = {
|
|
@@ -8053,7 +8484,6 @@ setTimeout(()=>{
|
|
|
8053
8484
|
// ObjectForm会认作用域下的变量值
|
|
8054
8485
|
// TODO: 待组件支持initValues属性后应该改掉,不应该通过data直接传值
|
|
8055
8486
|
// TODO: 全天事件属性传入doc了但是没有生效,需要手动在ObjectForm中勾选全天事件
|
|
8056
|
-
event.data = doc;
|
|
8057
8487
|
const title = "新建 ${objectSchema.label}";
|
|
8058
8488
|
doAction(
|
|
8059
8489
|
{
|
|
@@ -8066,6 +8496,7 @@ setTimeout(()=>{
|
|
|
8066
8496
|
"type": "steedos-object-form",
|
|
8067
8497
|
"objectApiName": "\${objectName}",
|
|
8068
8498
|
"mode": "edit",
|
|
8499
|
+
"defaultData": doc,
|
|
8069
8500
|
"onEvent": {
|
|
8070
8501
|
"submitSucc": {
|
|
8071
8502
|
"weight": 0,
|
|
@@ -8358,7 +8789,7 @@ setTimeout(()=>{
|
|
|
8358
8789
|
* @Author: baozhoutao@steedos.com
|
|
8359
8790
|
* @Date: 2022-07-05 15:55:39
|
|
8360
8791
|
* @LastEditors: Please set LastEditors
|
|
8361
|
-
* @LastEditTime: 2023-
|
|
8792
|
+
* @LastEditTime: 2023-05-08 16:34:25
|
|
8362
8793
|
* @Description:
|
|
8363
8794
|
*/
|
|
8364
8795
|
|
|
@@ -8612,7 +9043,7 @@ setTimeout(()=>{
|
|
|
8612
9043
|
}
|
|
8613
9044
|
function getRelatedListProps(uiSchema, listViewName, ctx) {
|
|
8614
9045
|
if (ctx.columns) {
|
|
8615
|
-
const sort = getListViewSort(ctx.sort);
|
|
9046
|
+
const sort = getListViewSort({sort: ctx.sort});
|
|
8616
9047
|
let { filters , filtersFunction} = ctx;
|
|
8617
9048
|
if(!filtersFunction && filters){
|
|
8618
9049
|
filtersFunction = str2function(
|
|
@@ -8701,7 +9132,7 @@ setTimeout(()=>{
|
|
|
8701
9132
|
* @Author: baozhoutao@steedos.com
|
|
8702
9133
|
* @Date: 2022-07-05 15:55:39
|
|
8703
9134
|
* @LastEditors: baozhoutao@steedos.com
|
|
8704
|
-
* @LastEditTime: 2023-04-
|
|
9135
|
+
* @LastEditTime: 2023-04-28 11:11:29
|
|
8705
9136
|
* @Description:
|
|
8706
9137
|
*/
|
|
8707
9138
|
|
|
@@ -8899,6 +9330,9 @@ setTimeout(()=>{
|
|
|
8899
9330
|
ctx = {}
|
|
8900
9331
|
) {
|
|
8901
9332
|
const uiSchema = await getUISchema(objectName);
|
|
9333
|
+
if(!uiSchema){
|
|
9334
|
+
return {}
|
|
9335
|
+
}
|
|
8902
9336
|
const listView = ___default.find(
|
|
8903
9337
|
uiSchema.list_views,
|
|
8904
9338
|
(listView, name) => {
|
|
@@ -9452,7 +9886,10 @@ setTimeout(()=>{
|
|
|
9452
9886
|
const defaults = ctx.defaults || {};
|
|
9453
9887
|
if(!defaults.headerSchema){
|
|
9454
9888
|
//传入isListviewInit是区别于对象列表类型的微页面,即getListPageInitSchema函数中该属性为false
|
|
9455
|
-
const headerSchema = await getObjectListHeader$1(uiSchema
|
|
9889
|
+
const headerSchema = await getObjectListHeader$1(uiSchema, listViewName, {
|
|
9890
|
+
onlySecordLine: true,
|
|
9891
|
+
isListviewInit: true
|
|
9892
|
+
});
|
|
9456
9893
|
defaults.headerSchema = headerSchema;
|
|
9457
9894
|
}
|
|
9458
9895
|
ctx.defaults = defaults;
|
|
@@ -12130,6 +12567,7 @@ setTimeout(()=>{
|
|
|
12130
12567
|
getLookupSapceUserTreeSchema: getLookupSapceUserTreeSchema,
|
|
12131
12568
|
getNotifications: getNotifications,
|
|
12132
12569
|
getObjectDetailButtons: getObjectDetailButtons,
|
|
12570
|
+
getObjectDetailButtonsSchemas: getObjectDetailButtonsSchemas,
|
|
12133
12571
|
getObjectDetailMoreButtons: getObjectDetailMoreButtons,
|
|
12134
12572
|
getObjectFieldsFilterBarSchema: getObjectFieldsFilterBarSchema,
|
|
12135
12573
|
getObjectFieldsFilterButtonSchema: getObjectFieldsFilterButtonSchema,
|
|
@@ -12138,6 +12576,7 @@ setTimeout(()=>{
|
|
|
12138
12576
|
getObjectListHeaderFieldsFilterBar: getObjectListHeaderFieldsFilterBar,
|
|
12139
12577
|
getObjectListHeaderFirstLine: getObjectListHeaderFirstLine,
|
|
12140
12578
|
getObjectListHeaderSecordLine: getObjectListHeaderSecordLine,
|
|
12579
|
+
getObjectListViewButtonsSchemas: getObjectListViewButtonsSchemas,
|
|
12141
12580
|
getObjectRecordDetailHeader: getObjectRecordDetailHeader,
|
|
12142
12581
|
getObjectRecordDetailRelatedListHeader: getObjectRecordDetailRelatedListHeader,
|
|
12143
12582
|
getObjectRelated: getObjectRelated,
|
|
@@ -12385,15 +12824,16 @@ setTimeout(()=>{
|
|
|
12385
12824
|
React__default["default"].createElement("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: "currentColor", className: "animate-spin w-4 h-4" },
|
|
12386
12825
|
React__default["default"].createElement("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0l3.181 3.183a8.25 8.25 0 0013.803-3.7M4.031 9.865a8.25 8.25 0 0113.803-3.7l3.181 3.182m0-4.991v4.99" }))));
|
|
12387
12826
|
}
|
|
12827
|
+
// console.log('AmisObjectButton===>', button, className);
|
|
12388
12828
|
if (button.type === "amis_button") {
|
|
12389
12829
|
var amisSchema = button.amis_schema;
|
|
12390
12830
|
var schema = ___default.isString(amisSchema) ? JSON.parse(amisSchema) : amisSchema;
|
|
12391
12831
|
if (schema && schema.body.length > 0) {
|
|
12392
12832
|
delete schema.body[0]['visibleOn'];
|
|
12393
12833
|
}
|
|
12394
|
-
|
|
12395
|
-
|
|
12396
|
-
|
|
12834
|
+
if (schema && className) {
|
|
12835
|
+
schema.className = schema.className + ' ' + className;
|
|
12836
|
+
}
|
|
12397
12837
|
var renderData = Object.assign(data, { objectName: objectName, app_id: appId, className: className });
|
|
12398
12838
|
if (data._id) {
|
|
12399
12839
|
renderData.recordId = data._id;
|
|
@@ -12419,7 +12859,10 @@ setTimeout(()=>{
|
|
|
12419
12859
|
|
|
12420
12860
|
var getMenu = function (render, buttons, btnClassName, props) {
|
|
12421
12861
|
return ___default.map(buttons, function (button) {
|
|
12422
|
-
|
|
12862
|
+
if (btnClassName) {
|
|
12863
|
+
button.className = "".concat(button.className, " ").concat(btnClassName);
|
|
12864
|
+
}
|
|
12865
|
+
delete button.className;
|
|
12423
12866
|
return {
|
|
12424
12867
|
key: button.name,
|
|
12425
12868
|
label: (React__default["default"].createElement(React__default["default"].Fragment, null, render('body', button, props)))
|
|
@@ -12654,7 +13097,9 @@ setTimeout(()=>{
|
|
|
12654
13097
|
}
|
|
12655
13098
|
amisSchema.className = "steedos-object-form ".concat(className);
|
|
12656
13099
|
amisSchema.data = Object.assign(amisSchema.data, formData, { global: globalData, uiSchema: uiSchema });
|
|
12657
|
-
|
|
13100
|
+
if (___default.has(props, 'objectApiName')) {
|
|
13101
|
+
amisSchema.data.objectName = objectApiName;
|
|
13102
|
+
}
|
|
12658
13103
|
return [2 /*return*/, amisSchema];
|
|
12659
13104
|
}
|
|
12660
13105
|
});
|
|
@@ -12662,8 +13107,9 @@ setTimeout(()=>{
|
|
|
12662
13107
|
|
|
12663
13108
|
var AmisObjectListView = function (props) { return __awaiter(void 0, void 0, void 0, function () {
|
|
12664
13109
|
var $schema, top, perPage, _a, showHeader, data, defaultData, _b, className, crudClassName, _c, showDisplayAs, sideSchema, _e, filterVisible, headerToolbarItems, headerSchema, ctx, listName, defaults, objectApiName, displayAs, formFactor, isMobile, uiSchema, listView, schemaKeys, listSchema, setDataToComponentId, amisSchemaData, listViewId, listViewSchemaProps, serviceData;
|
|
12665
|
-
|
|
12666
|
-
|
|
13110
|
+
var _f;
|
|
13111
|
+
return __generator(this, function (_g) {
|
|
13112
|
+
switch (_g.label) {
|
|
12667
13113
|
case 0:
|
|
12668
13114
|
// console.time('AmisObjectListView')
|
|
12669
13115
|
console.log("AmisObjectListView props", props);
|
|
@@ -12671,6 +13117,7 @@ setTimeout(()=>{
|
|
|
12671
13117
|
headerSchema = props.headerSchema;
|
|
12672
13118
|
ctx = props.ctx;
|
|
12673
13119
|
listName = (defaultData === null || defaultData === void 0 ? void 0 : defaultData.listName) || (data === null || data === void 0 ? void 0 : data.listName) || (props === null || props === void 0 ? void 0 : props.listName);
|
|
13120
|
+
console.log('AmisObjectListView ==listName=>', listName);
|
|
12674
13121
|
defaults = {};
|
|
12675
13122
|
objectApiName = props.objectApiName || "space_users";
|
|
12676
13123
|
if (!ctx) {
|
|
@@ -12687,15 +13134,16 @@ setTimeout(()=>{
|
|
|
12687
13134
|
formFactor = 'LARGE';
|
|
12688
13135
|
}
|
|
12689
13136
|
}
|
|
12690
|
-
|
|
12691
|
-
|
|
12692
|
-
|
|
13137
|
+
// 分栏模式不应该改变尺寸变量值
|
|
13138
|
+
// if(["split"].indexOf(displayAs) > -1){
|
|
13139
|
+
// formFactor = 'SMALL';
|
|
13140
|
+
// }
|
|
12693
13141
|
if (!ctx.formFactor) {
|
|
12694
13142
|
ctx.formFactor = formFactor;
|
|
12695
13143
|
}
|
|
12696
13144
|
return [4 /*yield*/, getUISchema(objectApiName, false)];
|
|
12697
13145
|
case 1:
|
|
12698
|
-
uiSchema =
|
|
13146
|
+
uiSchema = _g.sent();
|
|
12699
13147
|
listView = ___default.find(uiSchema.list_views, function (listView, name) {
|
|
12700
13148
|
// 传入listViewName空值则取第一个
|
|
12701
13149
|
if (!listName) {
|
|
@@ -12747,14 +13195,26 @@ setTimeout(()=>{
|
|
|
12747
13195
|
listViewId = (ctx === null || ctx === void 0 ? void 0 : ctx.listViewId) || amisSchemaData.listViewId;
|
|
12748
13196
|
listViewSchemaProps = __assign$2(__assign$2({ top: top, perPage: perPage, showHeader: showHeader, defaults: defaults }, ctx), { listViewId: listViewId, setDataToComponentId: setDataToComponentId, filterVisible: filterVisible, showDisplayAs: showDisplayAs, displayAs: displayAs, headerToolbarItems: headerToolbarItems });
|
|
12749
13197
|
if (!headerSchema) {
|
|
12750
|
-
headerSchema = getObjectListHeader$1(uiSchema);
|
|
13198
|
+
headerSchema = getObjectListHeader$1(uiSchema, listName, ctx);
|
|
12751
13199
|
}
|
|
12752
13200
|
serviceData = Object.assign({}, { showDisplayAs: showDisplayAs, displayAs: displayAs, recordPermissions: uiSchema.permissions, _id: null, $listviewId: listName });
|
|
13201
|
+
if (___default.has(props, 'objectApiName')) {
|
|
13202
|
+
serviceData.objectName = objectApiName;
|
|
13203
|
+
}
|
|
13204
|
+
if (___default.has(props, 'listName') && ___default.has(props, '$$editor')) {
|
|
13205
|
+
serviceData.listName = listName;
|
|
13206
|
+
}
|
|
13207
|
+
if (!___default.has(data, 'uiSchema')) {
|
|
13208
|
+
serviceData.uiSchema = uiSchema;
|
|
13209
|
+
}
|
|
13210
|
+
serviceData.defaultListName = listName ? listName : (_f = ___default.first(___default.values(uiSchema.list_views))) === null || _f === void 0 ? void 0 : _f.name;
|
|
12753
13211
|
// console.timeEnd('AmisObjectListView')
|
|
13212
|
+
// console.log('serviceData===>', serviceData)
|
|
13213
|
+
// console.log('headerSchema===>', headerSchema)
|
|
12754
13214
|
return [2 /*return*/, {
|
|
12755
13215
|
type: "service",
|
|
12756
13216
|
data: serviceData,
|
|
12757
|
-
className: "".concat(className, " steedos-object-listview"),
|
|
13217
|
+
className: "".concat(className, " sm:bg-gray-100 h-full sm:shadow sm:rounded-tl sm:rounded-tr steedos-object-listview"),
|
|
12758
13218
|
body: [{
|
|
12759
13219
|
"type": "wrapper",
|
|
12760
13220
|
"size": "none",
|
|
@@ -12783,8 +13243,8 @@ setTimeout(()=>{
|
|
|
12783
13243
|
"headers": {
|
|
12784
13244
|
"Authorization": "Bearer ${context.tenantId},${context.authToken}"
|
|
12785
13245
|
},
|
|
12786
|
-
"requestAdaptor": "console.log('service listview schemaApi requestAdaptor======>');api.data={query: '{spaces__findOne(id: \"
|
|
12787
|
-
"adaptor": "\n console.log('service listview schemaApi adaptor....', api.body); \n
|
|
13246
|
+
"requestAdaptor": "console.log('service listview schemaApi requestAdaptor======>');api.data={query: '{spaces__findOne(id: \"none\"){_id,name}}'};return api;",
|
|
13247
|
+
"adaptor": "\n // console.log('service listview schemaApi adaptor....', api.body); \n let { appId, objectName, defaultListName: listName, display, formFactor: defaultFormFactor} = api.body;\n if(api.body.listName){\n listName = api.body.listName;\n }\n return new Promise((resolve)=>{\n const listViewSchemaProps = ".concat(JSON.stringify(listViewSchemaProps), ";\n const formFactor = ([\"split\"].indexOf(display) > -1) ? 'SMALL': defaultFormFactor;\n listViewSchemaProps.formFactor = formFactor;\n // console.log(\"====listViewSchemaProps===>\", listName, listViewSchemaProps)\n window.getListSchema(appId, objectName, listName, listViewSchemaProps).then((schema)=>{\n payload.data = schema.amisSchema;\n // console.log(\"payload================>\", payload)\n resolve(payload)\n });\n });\n ")
|
|
12788
13248
|
},
|
|
12789
13249
|
// "body": body,
|
|
12790
13250
|
// "data": serviceData
|
|
@@ -12916,7 +13376,7 @@ setTimeout(()=>{
|
|
|
12916
13376
|
return __generator(this, function (_d) {
|
|
12917
13377
|
switch (_d.label) {
|
|
12918
13378
|
case 0:
|
|
12919
|
-
_a = props.className, className = _a === void 0 ? 'sticky top-0 z-10 bg-gray-100 border-b sm:shadow sm:rounded sm:border border-slate-300 p-4' : _a;
|
|
13379
|
+
_a = props.className, className = _a === void 0 ? 'sm:sticky top-0 z-10 bg-gray-100 border-b sm:shadow sm:rounded sm:border border-slate-300 p-4' : _a;
|
|
12920
13380
|
return [4 /*yield*/, getUISchema(props.objectApiName || "space_users", false)];
|
|
12921
13381
|
case 1:
|
|
12922
13382
|
objectUiSchema = _d.sent();
|
|
@@ -12939,7 +13399,7 @@ setTimeout(()=>{
|
|
|
12939
13399
|
};
|
|
12940
13400
|
props.$schema, recordId = props.recordId, _b = props.onEvent, onEvent = _b === void 0 ? defaultOnEvent : _b, _c = props.showRecordTitle, showRecordTitle = _c === void 0 ? true : _c;
|
|
12941
13401
|
objectApiName = props.objectApiName || "space_users";
|
|
12942
|
-
return [4 /*yield*/, getRecordDetailHeaderSchema(objectApiName, recordId, { showRecordTitle: showRecordTitle })];
|
|
13402
|
+
return [4 /*yield*/, getRecordDetailHeaderSchema(objectApiName, recordId, { showRecordTitle: showRecordTitle, formFactor: props.data.formFactor })];
|
|
12943
13403
|
case 2:
|
|
12944
13404
|
schema = (_d.sent()).amisSchema;
|
|
12945
13405
|
schema.className = className;
|
|
@@ -12957,12 +13417,11 @@ setTimeout(()=>{
|
|
|
12957
13417
|
* @Description:
|
|
12958
13418
|
*/
|
|
12959
13419
|
var AmisRecordDetail = function (props) { return __awaiter(void 0, void 0, void 0, function () {
|
|
12960
|
-
var className, appId, _a, objectApiName, body, schema;
|
|
13420
|
+
var className, $schema, appId, _a, objectApiName, body, schema;
|
|
12961
13421
|
return __generator(this, function (_b) {
|
|
12962
13422
|
switch (_b.label) {
|
|
12963
13423
|
case 0:
|
|
12964
|
-
|
|
12965
|
-
className = props.className, props.$schema, appId = props.appId, _a = props.objectApiName, objectApiName = _a === void 0 ? "space_users" : _a, props.recordId, props.onEvent, props.defaultData, body = props.body;
|
|
13424
|
+
className = props.className, $schema = props.$schema, appId = props.appId, _a = props.objectApiName, objectApiName = _a === void 0 ? "space_users" : _a, props.recordId, props.onEvent, props.defaultData, body = props.body;
|
|
12966
13425
|
return [4 /*yield*/, getRecordDetailSchema(objectApiName, appId)];
|
|
12967
13426
|
case 1:
|
|
12968
13427
|
schema = (_b.sent()).amisSchema;
|
|
@@ -12972,11 +13431,14 @@ setTimeout(()=>{
|
|
|
12972
13431
|
// recordDetailData.recordId = recordId;
|
|
12973
13432
|
// }
|
|
12974
13433
|
// schema.data = Object.assign({}, schema.data, recordDetailData);
|
|
13434
|
+
if (___default.has(props, "recordId") && $schema.recordId !== "${recordId}") {
|
|
13435
|
+
schema.data.recordId = props.recordId;
|
|
13436
|
+
}
|
|
12975
13437
|
schema.className = className;
|
|
12976
13438
|
if (body) {
|
|
12977
13439
|
schema.body = body;
|
|
12978
13440
|
}
|
|
12979
|
-
console.log(
|
|
13441
|
+
// console.log(`AmisRecordDetail====schema==>`, schema)
|
|
12980
13442
|
return [2 /*return*/, schema];
|
|
12981
13443
|
}
|
|
12982
13444
|
});
|
|
@@ -13013,11 +13475,11 @@ setTimeout(()=>{
|
|
|
13013
13475
|
}); };
|
|
13014
13476
|
|
|
13015
13477
|
var AmisRecordDetailRelatedList = function (props) { return __awaiter(void 0, void 0, void 0, function () {
|
|
13016
|
-
var objectApiName, recordId, relatedObjectApiName, relatedKey, top, perPage, hiddenEmptyTable, appId, relatedLabel, _a, className, columns, sort, filters, visible_on, requestAdaptor, adaptor, formFactor, schema;
|
|
13478
|
+
var $schema, objectApiName, recordId, relatedObjectApiName, relatedKey, top, perPage, hiddenEmptyTable, appId, relatedLabel, _a, className, columns, sort, filters, visible_on, requestAdaptor, adaptor, formFactor, formData, schema;
|
|
13017
13479
|
return __generator(this, function (_b) {
|
|
13018
13480
|
switch (_b.label) {
|
|
13019
13481
|
case 0:
|
|
13020
|
-
objectApiName = props.objectApiName, recordId = props.recordId, relatedObjectApiName = props.relatedObjectApiName, props.data, relatedKey = props.relatedKey, top = props.top, perPage = props.perPage, hiddenEmptyTable = props.hiddenEmptyTable, appId = props.appId, relatedLabel = props.relatedLabel, _a = props.className, className = _a === void 0 ? '' : _a, columns = props.columns, sort = props.sort, filters = props.filters, visible_on = props.visible_on, requestAdaptor = props.requestAdaptor, adaptor = props.adaptor;
|
|
13482
|
+
$schema = props.$schema, objectApiName = props.objectApiName, recordId = props.recordId, relatedObjectApiName = props.relatedObjectApiName, props.data, relatedKey = props.relatedKey, top = props.top, perPage = props.perPage, hiddenEmptyTable = props.hiddenEmptyTable, appId = props.appId, relatedLabel = props.relatedLabel, _a = props.className, className = _a === void 0 ? '' : _a, columns = props.columns, sort = props.sort, filters = props.filters, visible_on = props.visible_on, requestAdaptor = props.requestAdaptor, adaptor = props.adaptor;
|
|
13021
13483
|
formFactor = props.formFactor;
|
|
13022
13484
|
if (!formFactor) {
|
|
13023
13485
|
formFactor = window.innerWidth < 768 ? 'SMALL' : 'LARGE';
|
|
@@ -13032,20 +13494,25 @@ setTimeout(()=>{
|
|
|
13032
13494
|
"className": "mb-3"
|
|
13033
13495
|
}];
|
|
13034
13496
|
}
|
|
13497
|
+
formData = {};
|
|
13498
|
+
if (___default.has(props, "recordId") && $schema.recordId !== "${recordId}") {
|
|
13499
|
+
formData.recordId = recordId;
|
|
13500
|
+
}
|
|
13035
13501
|
return [4 /*yield*/, getRecordDetailRelatedListSchema(objectApiName, recordId, relatedObjectApiName, relatedKey, { top: top, perPage: perPage, appId: appId, relatedLabel: relatedLabel, className: className, formFactor: formFactor, columns: columns, sort: sort, filters: filters, visible_on: visible_on, isRelated: true, hiddenEmptyTable: hiddenEmptyTable, requestAdaptor: requestAdaptor, adaptor: adaptor })];
|
|
13036
13502
|
case 1:
|
|
13037
13503
|
schema = (_b.sent()).amisSchema;
|
|
13504
|
+
schema.data = Object.assign(schema.data, formData);
|
|
13038
13505
|
return [2 /*return*/, schema];
|
|
13039
13506
|
}
|
|
13040
13507
|
});
|
|
13041
13508
|
}); };
|
|
13042
13509
|
|
|
13043
13510
|
var AmisRecordDetailRelatedLists = function (props) { return __awaiter(void 0, void 0, void 0, function () {
|
|
13044
|
-
var objectApiName, _a, perPage, relatedLists;
|
|
13511
|
+
var $schema, objectApiName, recordId, _a, perPage, relatedLists, staticRecordId;
|
|
13045
13512
|
return __generator(this, function (_b) {
|
|
13046
13513
|
switch (_b.label) {
|
|
13047
13514
|
case 0:
|
|
13048
|
-
objectApiName = props.objectApiName, props.recordId, props.data, _a = props.perPage, perPage = _a === void 0 ? 5 : _a;
|
|
13515
|
+
$schema = props.$schema, objectApiName = props.objectApiName, recordId = props.recordId, props.data, _a = props.perPage, perPage = _a === void 0 ? 5 : _a;
|
|
13049
13516
|
if (!objectApiName) {
|
|
13050
13517
|
// if(!objectApiName || !recordId){
|
|
13051
13518
|
return [2 /*return*/, {
|
|
@@ -13069,11 +13536,15 @@ setTimeout(()=>{
|
|
|
13069
13536
|
"className": "mb-3"
|
|
13070
13537
|
}];
|
|
13071
13538
|
}
|
|
13539
|
+
staticRecordId = '';
|
|
13540
|
+
if (___default.has(props, "recordId") && $schema.recordId !== "${recordId}") {
|
|
13541
|
+
staticRecordId = recordId;
|
|
13542
|
+
}
|
|
13072
13543
|
return [2 /*return*/, {
|
|
13073
13544
|
type: 'service',
|
|
13074
13545
|
className: "steedos-record-detail-related-lists",
|
|
13075
13546
|
body: ___default.map(relatedLists, function (item) {
|
|
13076
|
-
|
|
13547
|
+
var relatedList = {
|
|
13077
13548
|
type: 'steedos-object-related-listview',
|
|
13078
13549
|
objectApiName: objectApiName,
|
|
13079
13550
|
// recordId: recordId,
|
|
@@ -13088,6 +13559,10 @@ setTimeout(()=>{
|
|
|
13088
13559
|
hiddenEmptyTable: true,
|
|
13089
13560
|
relatedLabel: item.label
|
|
13090
13561
|
};
|
|
13562
|
+
if (staticRecordId) {
|
|
13563
|
+
relatedList.recordId = staticRecordId;
|
|
13564
|
+
}
|
|
13565
|
+
return relatedList;
|
|
13091
13566
|
})
|
|
13092
13567
|
}];
|
|
13093
13568
|
}
|
|
@@ -13138,12 +13613,12 @@ setTimeout(()=>{
|
|
|
13138
13613
|
/*
|
|
13139
13614
|
* @Author: baozhoutao@steedos.com
|
|
13140
13615
|
* @Date: 2022-09-01 14:44:57
|
|
13141
|
-
* @LastEditors:
|
|
13142
|
-
* @LastEditTime: 2023-
|
|
13616
|
+
* @LastEditors: baozhoutao@steedos.com
|
|
13617
|
+
* @LastEditTime: 2023-05-08 15:05:32
|
|
13143
13618
|
* @Description:
|
|
13144
13619
|
*/
|
|
13145
13620
|
var AmisAppLauncher = function (props) { return __awaiter(void 0, void 0, void 0, function () {
|
|
13146
|
-
var app, data, className, _a, showAppName, _b, appNameClassName, formFactor, isMobile, dialogSchema;
|
|
13621
|
+
var app, data, className, _a, showAppName, _b, appNameClassName, formFactor, isMobile, on_click_script, mobile_blank_script, dialogSchema;
|
|
13147
13622
|
return __generator(this, function (_c) {
|
|
13148
13623
|
app = props.app, data = props.data, className = props.className, _a = props.showAppName, showAppName = _a === void 0 ? true : _a, _b = props.appNameClassName, appNameClassName = _b === void 0 ? '' : _b;
|
|
13149
13624
|
if (!app) {
|
|
@@ -13151,6 +13626,8 @@ setTimeout(()=>{
|
|
|
13151
13626
|
}
|
|
13152
13627
|
formFactor = window.innerWidth < 768 ? 'SMALL' : 'LARGE';
|
|
13153
13628
|
isMobile = formFactor === "SMALL" ? true : false;
|
|
13629
|
+
on_click_script = "\n var evalFunString = \"(function(){\" + event.data.on_click + \"})()\";\n try{\n eval(evalFunString);\n }\n catch(e){\n console.error(\"catch some error when eval the on_click script for app link:\");\n console.error(e.message + \"\\r\\n\" + e.stack);\n }\n ";
|
|
13630
|
+
mobile_blank_script = "\n if(event.data.path[0] == \"/\"){\n Steedos.openWindow(event.data.context.rootUrl + event.data.path)\n }else{\n Steedos.openWindow(event.data.path)\n }\n ";
|
|
13154
13631
|
dialogSchema = {};
|
|
13155
13632
|
if (isMobile) {
|
|
13156
13633
|
dialogSchema = {
|
|
@@ -13163,8 +13640,6 @@ setTimeout(()=>{
|
|
|
13163
13640
|
"items": {
|
|
13164
13641
|
"type": "button",
|
|
13165
13642
|
"level": "link",
|
|
13166
|
-
"actionType": "link",
|
|
13167
|
-
"link": "${path}",
|
|
13168
13643
|
"body": [
|
|
13169
13644
|
{
|
|
13170
13645
|
"type": "tpl",
|
|
@@ -13190,6 +13665,23 @@ setTimeout(()=>{
|
|
|
13190
13665
|
"actions": [
|
|
13191
13666
|
{
|
|
13192
13667
|
"actionType": "closeDialog"
|
|
13668
|
+
},
|
|
13669
|
+
{
|
|
13670
|
+
"actionType": "link",
|
|
13671
|
+
"args": {
|
|
13672
|
+
"link": "${path}"
|
|
13673
|
+
},
|
|
13674
|
+
"expression": "${AND(!blank , !on_click)}"
|
|
13675
|
+
},
|
|
13676
|
+
{
|
|
13677
|
+
"actionType": "custom",
|
|
13678
|
+
"script": mobile_blank_script,
|
|
13679
|
+
"expression": "${AND(blank , !on_click)}"
|
|
13680
|
+
},
|
|
13681
|
+
{
|
|
13682
|
+
"actionType": "custom",
|
|
13683
|
+
"script": on_click_script,
|
|
13684
|
+
"expression": "${on_click}"
|
|
13193
13685
|
}
|
|
13194
13686
|
]
|
|
13195
13687
|
}
|
|
@@ -13213,18 +13705,26 @@ setTimeout(()=>{
|
|
|
13213
13705
|
"headers": {
|
|
13214
13706
|
"Authorization": "Bearer ${context.tenantId},${context.authToken}"
|
|
13215
13707
|
},
|
|
13216
|
-
"adaptor": "\nlet app_items = payload;\npayload
|
|
13708
|
+
"adaptor": "\nlet app_items = payload;\npayload = {\n app_items\n}\nreturn payload;",
|
|
13217
13709
|
"messages": {}
|
|
13218
13710
|
},
|
|
13219
13711
|
"onEvent": {
|
|
13220
13712
|
"@data.changed.steedos_keyvalues": {
|
|
13221
13713
|
"actions": [
|
|
13222
13714
|
{
|
|
13223
|
-
"actionType": "
|
|
13715
|
+
"actionType": "reload"
|
|
13716
|
+
}
|
|
13717
|
+
]
|
|
13718
|
+
},
|
|
13719
|
+
"fetchInited": {
|
|
13720
|
+
"actions": [
|
|
13721
|
+
{
|
|
13722
|
+
"actionType": "broadcast",
|
|
13224
13723
|
"args": {
|
|
13225
|
-
"
|
|
13226
|
-
|
|
13227
|
-
|
|
13724
|
+
"eventName": "@appsLoaded"
|
|
13725
|
+
},
|
|
13726
|
+
"data": {
|
|
13727
|
+
"apps": "${event.data.app_items}"
|
|
13228
13728
|
}
|
|
13229
13729
|
}
|
|
13230
13730
|
]
|
|
@@ -13289,7 +13789,7 @@ setTimeout(()=>{
|
|
|
13289
13789
|
"args": {
|
|
13290
13790
|
"link": "${path}"
|
|
13291
13791
|
},
|
|
13292
|
-
"expression": "${!blank}"
|
|
13792
|
+
"expression": "${AND(!blank , !on_click)}"
|
|
13293
13793
|
},
|
|
13294
13794
|
{
|
|
13295
13795
|
"actionType": "url",
|
|
@@ -13297,7 +13797,12 @@ setTimeout(()=>{
|
|
|
13297
13797
|
"url": "${path}",
|
|
13298
13798
|
"blank": true
|
|
13299
13799
|
},
|
|
13300
|
-
"expression": "${blank}"
|
|
13800
|
+
"expression": "${AND(blank , !on_click)}"
|
|
13801
|
+
},
|
|
13802
|
+
{
|
|
13803
|
+
"actionType": "custom",
|
|
13804
|
+
"script": on_click_script,
|
|
13805
|
+
"expression": "${!!on_click}"
|
|
13301
13806
|
}
|
|
13302
13807
|
]
|
|
13303
13808
|
}
|
|
@@ -13359,11 +13864,19 @@ setTimeout(()=>{
|
|
|
13359
13864
|
"@data.changed.steedos_keyvalues": {
|
|
13360
13865
|
"actions": [
|
|
13361
13866
|
{
|
|
13362
|
-
"actionType": "
|
|
13867
|
+
"actionType": "reload"
|
|
13868
|
+
}
|
|
13869
|
+
]
|
|
13870
|
+
},
|
|
13871
|
+
"fetchInited": {
|
|
13872
|
+
"actions": [
|
|
13873
|
+
{
|
|
13874
|
+
"actionType": "broadcast",
|
|
13363
13875
|
"args": {
|
|
13364
|
-
"
|
|
13365
|
-
|
|
13366
|
-
|
|
13876
|
+
"eventName": "@appsLoaded"
|
|
13877
|
+
},
|
|
13878
|
+
"data": {
|
|
13879
|
+
"apps": "${event.data.app_items}"
|
|
13367
13880
|
}
|
|
13368
13881
|
}
|
|
13369
13882
|
]
|
|
@@ -13376,7 +13889,7 @@ setTimeout(()=>{
|
|
|
13376
13889
|
"headers": {
|
|
13377
13890
|
"Authorization": "Bearer ${context.tenantId},${context.authToken}"
|
|
13378
13891
|
},
|
|
13379
|
-
"adaptor": "\nlet app_items = payload;\nlet object_items = [];\nlet objects = [];\napp_items.forEach((item) => {\n item.children.forEach((i) => {\n if (objects.indexOf(i.id) < 0) {\n objects.push(i.id);\n object_items.push(i)\n }\n })\n})\npayload
|
|
13892
|
+
"adaptor": "\nlet app_items = payload;\nlet object_items = [];\nlet objects = [];\napp_items.forEach((item) => {\n item.children.forEach((i) => {\n if (objects.indexOf(i.id) < 0) {\n objects.push(i.id);\n object_items.push(i)\n }\n })\n})\npayload = {\n app_items,\n object_items\n}\nreturn payload;"
|
|
13380
13893
|
}
|
|
13381
13894
|
};
|
|
13382
13895
|
}
|
|
@@ -13430,12 +13943,7 @@ setTimeout(()=>{
|
|
|
13430
13943
|
"@data.changed.steedos_keyvalues": {
|
|
13431
13944
|
"actions": [
|
|
13432
13945
|
{
|
|
13433
|
-
"actionType": "
|
|
13434
|
-
"args": {
|
|
13435
|
-
"value": {
|
|
13436
|
-
"keyvalue": "${event.data.keyvalue.value}"
|
|
13437
|
-
}
|
|
13438
|
-
}
|
|
13946
|
+
"actionType": "reload"
|
|
13439
13947
|
}
|
|
13440
13948
|
]
|
|
13441
13949
|
}
|
|
@@ -13480,7 +13988,7 @@ setTimeout(()=>{
|
|
|
13480
13988
|
type: 'service',
|
|
13481
13989
|
schemaApi: {
|
|
13482
13990
|
"method": "get",
|
|
13483
|
-
"url": "${context.rootUrl}/service/api/apps/".concat(appId, "/menus
|
|
13991
|
+
"url": "${context.rootUrl}/service/api/apps/".concat(appId, "/menus"),
|
|
13484
13992
|
"adaptor": "\n try {\n console.log('payload====>', payload)\n if(payload.nav_schema){\n payload.data = payload.nav_schema;\n return payload\n }\n\n const data = { nav: [] };\n const stacked = ".concat(stacked, ";\n const showIcon = ").concat(showIcon, ";\n const selectedId = '").concat(selectedId, "';\n if(stacked){\n _.each(_.groupBy(payload.children, 'group'), (tabs, groupName) => {\n if (groupName === 'undefined' || groupName === '') {\n _.each(tabs, (tab) => {\n data.nav.push({\n \"label\": showIcon ? {\n type: 'tpl',\n tpl: `<span class='fill-slate-500 text-slate-700 block -ml-px no-underline group flex items-center text-[15px] font-medium rounded-md'><svg class=\"mr-1 flex-shrink-0 h-6 w-6\"><use xlink:href=\"/assets/icons/standard-sprite/svg/symbols.svg#${tab.icon || 'account'}\"></use></svg>${tab.name}</span>`\n } : tab.name,\n \"to\": tab.path,\n \"target\":tab.target\n // active: selectedId === tab.id,\n })\n })\n } else {\n data.nav.push({\n \"label\": groupName,\n \"unfolded\": true,\n \"children\": _.map(tabs, (tab) => {\n return {\n \"label\": showIcon ? {\n type: 'tpl',\n tpl: `<span class='fill-slate-500 text-slate-700 block -ml-px no-underline group flex items-center text-[15px] font-medium rounded-md'><svg class=\"mr-1 flex-shrink-0 h-6 w-6\"><use xlink:href=\"/assets/icons/standard-sprite/svg/symbols.svg#${tab.icon || 'account'}\"></use></svg>${tab.name}</span>`\n } : tab.name,\n \"to\": tab.path,\n \"target\":tab.target\n // active: selectedId === tab.id,\n }\n })\n }) \n }\n });\n }else{\n _.each(payload.children, (tab)=>{\n data.nav.push({\n \"label\": showIcon ? {\n type: 'tpl',\n tpl: `<span class='fill-slate-500 text-slate-700 block -ml-px no-underline group flex items-center text-[15px] font-medium rounded-md'><svg class=\"mr-1 flex-shrink-0 h-6 w-6\"><use xlink:href=\"/assets/icons/standard-sprite/svg/symbols.svg#${tab.icon || 'account'}\"></use></svg>${tab.name}</span>`\n } : tab.name,\n \"to\": tab.path,\n \"target\":tab.target\n // active: selectedId === tab.id,\n });\n })\n }\n payload.data = {\n \"type\": \"nav\",\n className: \"").concat(className, "\",\n \"stacked\": ").concat(stacked, ",\n \"overflow\": ").concat(JSON.stringify(overflow), ",\n \"indentSize\": ").concat(indentSize, ",\n \"links\": data.nav,\n };\n } catch (error) {\n console.log(`error`, error)\n }\n console.log('payload===2==>', payload)\n return payload;\n "),
|
|
13485
13993
|
"headers": {
|
|
13486
13994
|
"Authorization": "Bearer ${context.tenantId},${context.authToken}"
|
|
@@ -13496,7 +14004,7 @@ setTimeout(()=>{
|
|
|
13496
14004
|
* @Author: baozhoutao@steedos.com
|
|
13497
14005
|
* @Date: 2022-09-01 14:44:57
|
|
13498
14006
|
* @LastEditors: baozhoutao@steedos.com
|
|
13499
|
-
* @LastEditTime: 2023-04-
|
|
14007
|
+
* @LastEditTime: 2023-04-27 13:26:12
|
|
13500
14008
|
* @Description:
|
|
13501
14009
|
*/
|
|
13502
14010
|
var AmisGlobalFooter = function (props) { return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -13507,8 +14015,8 @@ setTimeout(()=>{
|
|
|
13507
14015
|
appId = data.context.appId || 'admin';
|
|
13508
14016
|
}
|
|
13509
14017
|
isMobile = window.innerWidth <= 768;
|
|
13510
|
-
className = 'fixed bottom-0 z-20 flex justify-evenly w-full h-16 bg-gray-100
|
|
13511
|
-
className1 = 'fixed bottom-0 z-20 flex justify-center w-full h-16 bg-gray-100
|
|
14018
|
+
className = 'fixed bottom-0 z-20 flex justify-evenly w-full h-16 bg-gray-100 steedos-global-footer';
|
|
14019
|
+
className1 = 'fixed bottom-0 z-20 flex justify-center w-full h-16 bg-gray-100 steedos-global-footer';
|
|
13512
14020
|
schema = {};
|
|
13513
14021
|
if (links) {
|
|
13514
14022
|
schema = {
|
|
@@ -13532,8 +14040,8 @@ setTimeout(()=>{
|
|
|
13532
14040
|
type: 'service',
|
|
13533
14041
|
schemaApi: {
|
|
13534
14042
|
"method": "get",
|
|
13535
|
-
"url": "${context.rootUrl}/service/api/apps/".concat(appId, "/menus?
|
|
13536
|
-
"adaptor": "\n
|
|
14043
|
+
"url": "${context.rootUrl}/service/api/apps/".concat(appId, "/menus?mobile=true"),
|
|
14044
|
+
"adaptor": "\n try {\n\n if(payload.children.length == 0){\n payload.data = {};\n return payload\n }\n const data = { nav: [] };\n const stacked = ".concat(stacked, ";\n const showIcon = ").concat(showIcon, ";\n const selectedId = '").concat(selectedId, "';\n let sum = 0;\n _.each(payload.children, (tab)=>{\n sum++;\n const classIcon = tab.icon.replace(/_/g,\"-\");\n if(sum >= 5){\n data.nav.push({\n \"label\": {\n type: 'tpl',\n tpl: `<span class='fill-slate-500 text-slate-700 block -ml-px no-underline group flex items-center text-[12px] font-medium rounded-md flex-col leading-3 nav-label'><svg class=\"slds-icon slds-icon_container slds-icon-standard-`+classIcon+` flex-shrink-0 h-10 w-10\"><use xlink:href=\"/assets/icons/standard-sprite/svg/symbols.svg#${tab.icon || 'account'}\"></use></svg><span>${tab.name}</span><i class=\"fa fa-angle-right\" aria-hidden=\"true\" style=\"position: absolute;right: 20px;color: #bababa;\"></i></span>`,\n className:'h-full flex items-center'\n },\n \"to\": tab.path,\n \"target\":tab.target\n });\n }else{\n data.nav.push({\n \"label\": {\n type: 'tpl',\n tpl: `<span class='fill-slate-500 text-slate-700 block -ml-px no-underline group flex items-center text-[12px] font-medium rounded-md flex-col leading-3 nav-label'><svg class=\"slds-icon slds-icon_container slds-icon-standard-`+classIcon+` flex-shrink-0 h-10 w-10\"><use xlink:href=\"/assets/icons/standard-sprite/svg/symbols.svg#${tab.icon || 'account'}\"></use></svg>${tab.name}</span>`,\n className:'h-full flex items-center'\n },\n \"to\": tab.path,\n \"target\":tab.target\n });\n }\n \n })\n\n payload.data = {\n \"type\": \"nav\",\n className: payload.children.length ==1 ? '").concat(className1, "' : '").concat(className, "',\n \"stacked\": ").concat(stacked, ",\n \"overflow\": {\n \"enable\": true,\n \"maxVisibleCount\": 4,\n \"overflowPopoverClassName\": \"steedos-global-footer-popup\",\n \"overflowLabel\":{\n \"type\": 'tpl',\n \"tpl\": `<span class='fill-slate-500 text-slate-700 block -ml-px no-underline group flex items-center text-[12px] font-medium rounded-md flex-col leading-3 nav-label'><svg class=\" flex-shrink-0 h-10 w-10\" style=\"padding:7px\"><use xlink:href=\"/assets/icons/utility-sprite/svg/symbols.svg#rows\"></use></svg>\u83DC\u5355</span>`,\n \"className\":'h-full flex items-center'\n },\n \"overflowIndicator\":\"\"\n },\n \"indentSize\": ").concat(indentSize, ",\n \"links\": data.nav,\n };\n } catch (error) {\n console.log(`error`, error)\n }\n return payload;\n "),
|
|
13537
14045
|
"headers": {
|
|
13538
14046
|
"Authorization": "Bearer ${context.tenantId},${context.authToken}"
|
|
13539
14047
|
}
|
|
@@ -14054,7 +14562,7 @@ setTimeout(()=>{
|
|
|
14054
14562
|
{
|
|
14055
14563
|
"type": "button",
|
|
14056
14564
|
"className": 'p-0 absolute inset-0 mt-[50px] sm:mt-[90px]',
|
|
14057
|
-
hiddenOn: "${app.showSidebar != true}",
|
|
14565
|
+
hiddenOn: "${OR(app.showSidebar != true,isMobile)}",
|
|
14058
14566
|
body: [
|
|
14059
14567
|
{
|
|
14060
14568
|
type: "wrapper",
|
|
@@ -14150,7 +14658,7 @@ setTimeout(()=>{
|
|
|
14150
14658
|
var getSelectFlowSchema = function (id, props) {
|
|
14151
14659
|
var label = props.label, data = props.data, name = props.name, required = props.required, _a = props.action, action = _a === void 0 ? 'query' : _a, _b = props.distributeInstanceId, distributeInstanceId = _b === void 0 ? "" : _b, _c = props.distributeStepId, distributeStepId = _c === void 0 ? "" : _c, _d = props.mode, mode = _d === void 0 ? 'input-tree' : _d, className = props.className, onEvent = props.onEvent, _e = props.multiple, multiple = _e === void 0 ? false : _e, delimiter = props.delimiter, joinValues = props.joinValues, extractValue = props.extractValue, searchable = props.searchable, _f = props.showIcon, showIcon = _f === void 0 ? true : _f, _g = props.showRadio, showRadio = _g === void 0 ? false : _g, showOutline = props.showOutline, initiallyOpen = props.initiallyOpen, unfoldedLevel = props.unfoldedLevel, treeContainerClassName = props.treeContainerClassName, _h = props.amis, amis = _h === void 0 ? {} : _h;
|
|
14152
14660
|
console.log("=====onEvent", onEvent);
|
|
14153
|
-
return __assign$2({ "type": mode, "id": id, "label": label, "name": name, "options": [], "multiple": multiple, "delimiter": delimiter, "joinValues": joinValues, "extractValue": extractValue, "searchable": searchable, "showOutline": showOutline, "initiallyOpen": initiallyOpen, "unfoldedLevel": unfoldedLevel, "className": className, "required": required, "treeContainerClassName": treeContainerClassName,
|
|
14661
|
+
return __assign$2({ "type": mode, "id": id, "label": label, "name": name, "options": [], "multiple": multiple, "delimiter": delimiter, "joinValues": joinValues, "extractValue": extractValue, "searchable": searchable, "showOutline": showOutline, "initiallyOpen": initiallyOpen, "unfoldedLevel": unfoldedLevel, "className": className, "required": required, "treeContainerClassName": treeContainerClassName, "heightAuto": true,
|
|
14154
14662
|
// "menuTpl": {
|
|
14155
14663
|
// // type: "button",
|
|
14156
14664
|
// type: "tpl",
|
|
@@ -14207,6 +14715,7 @@ setTimeout(()=>{
|
|
|
14207
14715
|
return {
|
|
14208
14716
|
"type": "service",
|
|
14209
14717
|
"id": "selectFlowService",
|
|
14718
|
+
"className": "steedos-select-flow-service",
|
|
14210
14719
|
"body": [
|
|
14211
14720
|
{
|
|
14212
14721
|
"type": "search-box",
|
|
@@ -14305,7 +14814,10 @@ setTimeout(()=>{
|
|
|
14305
14814
|
// const pageSplitClassName = listSchema.pageSplitClassName || 'p-0 flex flex-1 overflow-hidden h-full'
|
|
14306
14815
|
return [2 /*return*/, {
|
|
14307
14816
|
type: 'service',
|
|
14308
|
-
className:
|
|
14817
|
+
className: {
|
|
14818
|
+
"h-full": "true",
|
|
14819
|
+
"sm:px-3 sm:pt-3": "${display != 'split'}"
|
|
14820
|
+
},
|
|
14309
14821
|
body: listSchema
|
|
14310
14822
|
}];
|
|
14311
14823
|
}
|
|
@@ -14422,7 +14934,7 @@ setTimeout(()=>{
|
|
|
14422
14934
|
});
|
|
14423
14935
|
}); };
|
|
14424
14936
|
|
|
14425
|
-
var __assign=function(){return (__assign=Object.assign||function(e){for(var t,
|
|
14937
|
+
var __assign=function(){return (__assign=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},StandardObjects={Base:{Actions:{standard_query:{visible:function(e,t,n){return !1}},standard_new:{visible:function(e,t,n){return "cms_files"!==e&&"instances"!==e&&(n?n.allowCreate:void 0)}},standard_edit:{visible:function(e,t,n){if(n)return n.allowEdit}},standard_delete:{visible:function(e,t,n){if(n)return n.allowDelete}},standard_import_data:{visible:function(e,t,n){var r=this.object;if(n)return n.allowCreate&&r.hasImportTemplates}},standard_approve:{visible:function(e,t,n){return !1}},standard_view_instance:{visible:function(e,t,n){return !1}},standard_submit_for_approval:{visible:function(e,t,n){return window.Steedos.ProcessManager.allowSubmit.apply(this,[e,t])},todo:function(e,t){return window.Steedos.ProcessManager.submit.apply(this,[e,t])}},standard_follow:{visible:function(e,t,n){return !1}},standard_delete_many:{visible:function(e,t,n){return !RegExp("\\w+/view/\\w+").test(location.pathname)&&(n?n.allowDelete:void 0)}}}}},authRequest=function(e,t){var i=null;e=Steedos.absoluteUrl(e);try{var n=[{name:"Content-Type",value:"application/json"},{name:"Authorization",value:Steedos.getAuthorization()}],r={type:"get",url:e,dataType:"json",contentType:"application/json",beforeSend:function(t){if(n&&n.length)return n.forEach(function(e){return t.setRequestHeader(e.name,e.value)})},success:function(e){i=e;},error:function(e,t,n){var r,o;e.responseJSON&&e.responseJSON.error?(r=e.responseJSON.error,o=void(i={error:r}),o=r.reason||r.message||r,console.error(o)):console.error(e.responseJSON);}};return $.ajax(Object.assign({},r,t)),i}catch(e){console.error(e);}};function _extends(){return (_extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n,r=arguments[t];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n]);}return e}).apply(this,arguments)}const newFunctionComponent=o=>e=>{const[t,n]=React.useState(!0);var r=()=>{n(!1);};return ___default.has(e,"ref")||(window.SteedosUI.refs[e.name]={show:()=>{n(!0);},close:r}),React__default["default"].createElement(o,_extends({visible:t,onCancel:r,onClose:r},{width:"70%",style:{width:"70%",maxWidth:"950px",minWidth:"480px"}},e))},newComponentRender=(n,r)=>(e,t)=>{e.name||(e.name=n+"-"+(e.name||"default")),(t=t||document.getElementById(`steedos-${n}-root-`+e.name))||((t=document.createElement("div")).setAttribute("id",`steedos-${n}-root-`+e.name),document.body.appendChild(t));e=React__default["default"].createElement(newFunctionComponent(r),e);ReactDOM.createRoot(t).render(e);},Modal=___default.assign(newComponentRender("modal",antd.Modal),{info:antd.Modal.info,success:antd.Modal.success,error:antd.Modal.error,warning:antd.Modal.warning,confirm:antd.Modal.confirm}),Drawer=newComponentRender("drawer",antd.Drawer),getGraphqlFieldsQuery=e=>{const t=["_id"];return e.push("record_permissions"),___default.each(e,e=>{-1<e.indexOf(".")&&(e=e.split(".")[0]),t.push(""+e);}),""+t.join(" ")},getFindOneQuery=(e,t,n)=>{e=e.replace(/\./g,"_");n=getGraphqlFieldsQuery(n);let r="";t=[`id: "${t}"`];return `{record:${e}__findOne${r=0<t.length?`(${t.join(",")})`:r}{${n}}}`},SObject={getRecord:async(e,t,n)=>{return (await fetchAPI("/graphql",{method:"post",body:JSON.stringify({query:getFindOneQuery(e,t,n)})})).data.record},getUISchema:async(e,t)=>getUISchema(e,t)},canSaveFilter=e=>!(!e._id||e.owner!==getSteedosAuth()?.userId),ListView={showFilter:(e,{listView:t,data:n})=>{canSaveFilter(t);n.filters&&(n.filters=filtersToConditions(n.filters));},getVisibleFilter:(e,t)=>{return t||(canSaveFilter(e)?e.filters:void 0)},getQueryFilter:(e,t)=>{return canSaveFilter(e)?ListView.getVisibleFilter(e,t):___default.isEmpty(t)?e.filters:[e.filters,"and",t]},getFirstListView:async e=>{e=await window.getUISchema(e);return _.first(_.sortBy(_.values(e.list_views),"sort_no"))}},Router={getAppPath({appId:e}){return "/app/"+e},getPagePath(){},getObjectListViewPath({appId:e,objectName:t,listViewName:n}){return `/app/${e}/${t}/grid/`+n},getObjectDetailPath({appId:e,objectName:t,recordId:n}){return `/app/${e}/${t}/view/`+n},getObjectRelatedViewPath({appId:e,masterObjectName:t,masterRecordId:n,objectName:r,foreignKey:o}){return `/app/${e}/${t}/${n}/${r}/grid?related_field_name=`+o}};var withModalWrap=function(t,e){return function(e){return React.createElement(t,e)}},render=function(e,t,n,r){e=withModalWrap(e),e=React.createElement(e,__assign({},t));return ReactDOM__default["default"].render(e,n)};const safeRunFunction=(t,n,r,o)=>{try{var i=window.Creator;if(!!(!i||!i.getObjectUrl)&&/\bSteedos\b|\bCreator\b|\bMeteor\b|\bSession\b/.test(t))return console.info("调用了Creator|Steedos|Meteor|Session变量的脚本不执行,直接按空值处理。"),"";let e=[];return ___default.isNil(n)||(e=___default.isArray(n)?n:[n]),t.bind(o||{})(...e)}catch(e){return console.log(e),r}};function safeEval(js){try{return eval(js)}catch(e){console.error(e,js);}}const isExpression=function(e){var t,n;return "string"==typeof e&&(t=/^{{(function.+)}}$/,n=/^{{(.+=>.+)}}$/,!("string"!=typeof e||!e.match(/^{{(.+)}}$/)||e.match(t)||e.match(n)))},parseSingleExpression=function(t,e,n,r){var o,i=function(e,t){return "#"!==t&&t?"string"==typeof t?_.get(e,t):void console.error("path has to be a string"):e||{}}(e=void 0===e?{}:e,function(e){return "string"!=typeof e||1===(e=e.split(".")).length?"#":(e.pop(),e.join("."))}(n))||{};if("string"!=typeof t)return t;o="__G_L_O_B_A_L__",e="\n return "+t.substring(2,t.length-2).replace(/\bformData\b/g,JSON.stringify(e).replace(/\bglobal\b/g,o)).replace(/\bglobal\b/g,JSON.stringify(r)).replace(new RegExp("\\b"+o+"\\b","g"),"global").replace(/rootValue/g,JSON.stringify(i));try{return Function(e)()}catch(e){return console.log(e,t,n),t}};var Expression=Object.freeze({__proto__:null,isExpression:isExpression,parseSingleExpression:parseSingleExpression});const getCompatibleDefaultValueExpression=(e,t)=>{let n=e;return /^\{\w+(\.*\w+)*\}$/.test(e)&&(n=-1<e.indexOf("userId")||-1<e.indexOf("spaceId")||-1<e.indexOf("user.")||-1<e.indexOf("now")?`{${e}}`.replace("{{","{{global."):`{${e}}`.replace("{{","{{formData."),t&&(n=n.replace(/\{\{(.+)\}\}/,"{{[$1]}}"))),n},getFieldDefaultValue=(e,t)=>{if(!e)return null;let n=e.defaultValue;e._defaultValue&&(n=safeEval(`(${e._defaultValue})`)),___default.isFunction(n)&&(n=safeRunFunction(n,[],null,{name:e.name})),___default.isString(n)&&(n=getCompatibleDefaultValueExpression(n,e.multiple));var r=isExpression(n);return r&&(n=parseSingleExpression(n,{},"#",t)),"select"===e.type&&(t=e.data_type||"text",!n||r||e.multiple||("text"!==t||___default.isString(n)?"number"!==t||___default.isNumber(n)?"boolean"!==t||___default.isBoolean(n)||(n="true"===n):n=Number(n):n=String(n))),n};function getTreeOptions(t,e){const o=e?.valueField||"value";e?.labelField;const n=e?.unfoldedNum||1,r=[],i=(t,n,r)=>{var e;if(n)return e=_.filter(t,e=>_.includes(n,e[o])),_.each(e,e=>{1<=r?(e.unfolded=!0,e.children&&(e.children=i(t,e.children,r-1))):e.children&&(e.children=i(t,e.children,r));}),e};for(var a=t,s=0;s<a.length;s++)if(a[s].noParent=0,a[s].unfolded=!1,a[s].parent){let e=1;for(var l=0;l<a.length;l++)a[s].parent==a[l][o]&&(e=0);1==e&&(a[s].noParent=1);}else a[s].noParent=1;return _.each(t,e=>{1==e.noParent&&(1<=n?(e.unfolded=!0,r.push(Object.assign({},e,{children:i(t,e.children,n-1)}))):r.push(Object.assign({},e,{children:i(t,e.children,n)})));}),r}function getClosestAmisComponentByType(t,n,r){let o=(r=r||{}).name;var e=r.direction||"up";let i=t.getComponents().find(function(e){return e.props.type===n&&(!o||e.props.name===o)});if(i)return i;if("down"===e){if(t.children&&t.children.length){for(let e=0;e<t.children.length&&!(i=getClosestAmisComponentByType(t.children[e],n,r));e++);return i}}else if("up"===e&&t.parent)return getClosestAmisComponentByType(t.parent,n,r)}const SteedosUI$1=Object.assign({},{render:render,Router:Router,ListView:ListView,Object:SObject,Modal:Modal,Drawer:Drawer,refs:{},getRef(e){return SteedosUI$1.refs[e]},router:{go:(e,t)=>{var n=window.FlowRouter;if(t)return n?n.go(t):window.open(t);n?n.reload():console.warn("暂不支持自动跳转",e);},reload:()=>{console.log("reload");}},message:antd.message,notification:antd.notification,components:{Button:antd.Button,Space:antd.Space},getRefId:({type:e,appId:t,name:n})=>{switch(e){case"listview":return `amis-${t}-${n}-listview`;case"form":return `amis-${t}-${n}-form`;case"detail":return `amis-${t}-${n}-detail`;default:return `amis-${t}-${n}-`+e}},reloadRecord:()=>{if(window.FlowRouter)return window.FlowRouter.reload()},getFieldDefaultValue:getFieldDefaultValue,getTreeOptions:getTreeOptions,getClosestAmisComponentByType:getClosestAmisComponentByType});var getBuilderContext=function(){return "undefined"==typeof window?{}:Builder.settings.context||Builder.settings},Steedos$1=__assign({getRootUrl:function(e){var t=getBuilderContext();return t.rootUrl||("undefined"!=typeof window?window.localStorage.getItem("steedos:rootUrl"):"")||e},absoluteUrl:function(e){return void 0===e&&(e=""),"".concat(Steedos$1.getRootUrl()).concat(e)},getTenantId:function(){try{var e=getBuilderContext().tenantId;return (e=window.location.search&&!e?new URLSearchParams(window.location.search).get("X-Space-Id"):e)?e:null}catch(e){console.error(e);}},getAuthorization:function(){try{var e=getBuilderContext(),t=e.tenantId,n=e.authToken;return t&&n?"Bearer ".concat(t,",").concat(n):null}catch(e){console.error(e);}},authRequest:authRequest,StandardObjects:StandardObjects},Expression);"undefined"==typeof window||window.Steedos||(window.Steedos=Steedos$1),"undefined"==typeof window||window.SteedosUI||(window.SteedosUI=SteedosUI$1);
|
|
14426
14938
|
|
|
14427
14939
|
var index_esm = /*#__PURE__*/Object.freeze({
|
|
14428
14940
|
__proto__: null,
|