@steedos-widgets/amis-object 3.6.13 → 3.6.14
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-object.cjs.css +6 -3
- package/dist/amis-object.cjs.js +70 -62
- package/dist/amis-object.cjs.js.map +1 -1
- package/dist/amis-object.esm.css +6 -3
- package/dist/amis-object.esm.js +70 -62
- package/dist/amis-object.esm.js.map +1 -1
- package/dist/amis-object.umd.css +6 -3
- package/dist/amis-object.umd.js +5 -5
- package/dist/amis-object.umd.js.map +1 -1
- package/dist/assets.json +21 -21
- package/package.json +3 -3
package/dist/amis-object.cjs.css
CHANGED
|
@@ -1913,9 +1913,6 @@ body.steedos {
|
|
|
1913
1913
|
-moz-column-gap: 1rem;
|
|
1914
1914
|
column-gap: 1rem;
|
|
1915
1915
|
}
|
|
1916
|
-
.steedos-object-form .antd-Collapse .antd-Collapse-header.hidden {
|
|
1917
|
-
display: none !important;
|
|
1918
|
-
}
|
|
1919
1916
|
.steedos-object-form .antd-Tabs-pane.is-active {
|
|
1920
1917
|
display: grid;
|
|
1921
1918
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
@@ -1942,6 +1939,9 @@ body.steedos {
|
|
|
1942
1939
|
overflow: visible;
|
|
1943
1940
|
}
|
|
1944
1941
|
}
|
|
1942
|
+
.steedos-object-form .antd-Collapse .antd-Collapse-header.hidden {
|
|
1943
|
+
display: none !important;
|
|
1944
|
+
}
|
|
1945
1945
|
.steedos-object-form .steedos-input-rich-text-readonly .antd-RichTextControl {
|
|
1946
1946
|
border: 0;
|
|
1947
1947
|
}
|
|
@@ -1949,6 +1949,9 @@ body.steedos {
|
|
|
1949
1949
|
.steedos-object-form .antd-Form-item .antd-Form-label + .antd-Form-item-controlBox {
|
|
1950
1950
|
max-width: unset;
|
|
1951
1951
|
}
|
|
1952
|
+
.steedos-object-form .antd-Collapse::before {
|
|
1953
|
+
content: unset;
|
|
1954
|
+
}
|
|
1952
1955
|
}
|
|
1953
1956
|
|
|
1954
1957
|
@media (max-width: 767px) {
|
package/dist/amis-object.cjs.js
CHANGED
|
@@ -4253,7 +4253,7 @@ function getRecordPermissionsQuery(object, recordId, options){
|
|
|
4253
4253
|
function getApi$2 (isMobile){
|
|
4254
4254
|
if(isMobile);else {
|
|
4255
4255
|
// return __meteor_runtime_config__.ROOT_URL_PATH_PREFIX + "/graphql"
|
|
4256
|
-
return `\${context.rootUrl}/graphql?reload=\${additionalFilters}`
|
|
4256
|
+
return `\${context.rootUrl}/graphql?reload=\${additionalFilters|join}`
|
|
4257
4257
|
}
|
|
4258
4258
|
}
|
|
4259
4259
|
|
|
@@ -11464,6 +11464,10 @@ function getObjectHeaderQuickSearchBox(mainObject, fields, formFactor, { isLooku
|
|
|
11464
11464
|
// const scope = event.context.scoped;
|
|
11465
11465
|
// 如果点击过顶部搜索栏表单的取消按钮,会把此处event.data.__super.__super.__super中的搜索表单项的所有字段设置为null
|
|
11466
11466
|
// 点击取消按钮后继续在表单项中输入过滤条件且最后没有点击回车按键或点击表单项搜索按钮的话,在快速搜索中点击回车按钮提交搜索会所顶部搜索表单中的字段值清空
|
|
11467
|
+
let filterForm = SteedosUI.getClosestAmisComponentByType(scope, "form");
|
|
11468
|
+
if(!filterForm){
|
|
11469
|
+
return;
|
|
11470
|
+
}
|
|
11467
11471
|
let isLookup = event.data.isLookup;
|
|
11468
11472
|
let __lookupField = event.data.__lookupField;
|
|
11469
11473
|
let __changedFilterFormValuesKey = "__changedFilterFormValues";
|
|
@@ -11474,9 +11478,8 @@ function getObjectHeaderQuickSearchBox(mainObject, fields, formFactor, { isLooku
|
|
|
11474
11478
|
}
|
|
11475
11479
|
__changedFilterFormValuesKey += lookupTag;
|
|
11476
11480
|
}
|
|
11477
|
-
let filterForm = SteedosUI.getClosestAmisComponentByType(scope, "form");
|
|
11478
11481
|
setTimeout(function(){
|
|
11479
|
-
filterForm.setValues(event.data[__changedFilterFormValuesKey]);
|
|
11482
|
+
filterForm && filterForm.setValues(event.data[__changedFilterFormValuesKey]);
|
|
11480
11483
|
}, 500);
|
|
11481
11484
|
`;
|
|
11482
11485
|
|
|
@@ -22213,12 +22216,12 @@ var AmisProvider = function (props) { return __awaiter(void 0, void 0, void 0, f
|
|
|
22213
22216
|
/*
|
|
22214
22217
|
* @Author: baozhoutao@steedos.com
|
|
22215
22218
|
* @Date: 2022-09-01 14:44:57
|
|
22216
|
-
* @LastEditors:
|
|
22217
|
-
* @LastEditTime: 2024-
|
|
22219
|
+
* @LastEditors: 殷亮辉 yinlianghui@hotoa.com
|
|
22220
|
+
* @LastEditTime: 2024-05-14 13:30:24
|
|
22218
22221
|
* @Description:
|
|
22219
22222
|
*/
|
|
22220
22223
|
var AmisAppLauncher = function (props) { return __awaiter(void 0, void 0, void 0, function () {
|
|
22221
|
-
var app, data, className, _a, showAppName, _b, appNameClassName, _c, customElements, _d, showAppIcon, formFactor, isMobile, on_click_script, mobile_blank_script, dialogSchema, badgeText;
|
|
22224
|
+
var app, data, className, _a, showAppName, _b, appNameClassName, _c, customElements, _d, showAppIcon, formFactor, isMobile, on_click_script, mobile_blank_script, convertAppVisibleOnScript, pcInitApiAdaptorScript, mobileInitApiAdaptorScript, dialogSchema, badgeText;
|
|
22222
22225
|
return __generator(this, function (_e) {
|
|
22223
22226
|
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, _c = props.customElements, customElements = _c === void 0 ? [] : _c, _d = props.showAppIcon, showAppIcon = _d === void 0 ? true : _d;
|
|
22224
22227
|
if (!app) {
|
|
@@ -22228,6 +22231,9 @@ var AmisAppLauncher = function (props) { return __awaiter(void 0, void 0, void 0
|
|
|
22228
22231
|
isMobile = formFactor === "SMALL" ? true : false;
|
|
22229
22232
|
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 ";
|
|
22230
22233
|
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 ";
|
|
22234
|
+
convertAppVisibleOnScript = "\n var currentAmis = amisRequire('amis');\n app_items.forEach((item) => {\n let visible_on = item.visible_on && item.visible_on.trim();\n if(visible_on){\n // amis visibleOn\u5C5E\u6027\u4E2D\u7684\u8868\u8FBE\u5F0F\u6765\u81EA\u4F5C\u7528\u57DF\u4E2D\u53D8\u91CF\u65F6,amis\u4E0D\u8BA4,\u6240\u4EE5\u8FD9\u91CC\u628A\u516C\u5F0F\u8868\u8FBE\u5F0F\u63D0\u524D\u8FD0\u884C\u4E0B\n try{\n visible_on = currentAmis.evaluate(visible_on, BuilderAmisObject.AmisLib.createObject(context, item));\n item.visible_on = visible_on;\n }\n catch(ex){\n console.error(\"\u8FD0\u884C\u5E94\u7528\u201C\" + item.name + \"\u201D\u7684\u663E\u793A\u516C\u5F0F\u8868\u8FBE\u5F0F\u65F6\u51FA\u73B0\u9519\u8BEF:\",ex);\n item.visible_on = false;\n }\n }\n });\n ";
|
|
22235
|
+
pcInitApiAdaptorScript = "\n let app_items = payload;\n let object_items = [];\n let objects = [];\n app_items.forEach((item) => {\n item.children.forEach((i) => {\n if (objects.indexOf(i.id) < 0) {\n objects.push(i.id);\n if(i.type != 'url' && i.type != 'page'){object_items.push(i);}\n }\n })\n })\n ".concat(convertAppVisibleOnScript, "\n payload = {\n app_items,\n object_items\n }\n return payload;\n ");
|
|
22236
|
+
mobileInitApiAdaptorScript = "\n let app_items = payload;\n ".concat(convertAppVisibleOnScript, "\n payload = {\n app_items\n }\n return payload;\n ");
|
|
22231
22237
|
dialogSchema = {};
|
|
22232
22238
|
badgeText = "${IF(${id} == 'approve_workflow',${ss:keyvalues.badge.value|pick:'workflow'},${ss:keyvalues.badge.value|pick:${id}}) | toInt}";
|
|
22233
22239
|
if (isMobile) {
|
|
@@ -22288,6 +22294,7 @@ var AmisAppLauncher = function (props) { return __awaiter(void 0, void 0, void 0
|
|
|
22288
22294
|
]
|
|
22289
22295
|
}
|
|
22290
22296
|
},
|
|
22297
|
+
"visibleOn": "${visible_on}",
|
|
22291
22298
|
"className": "block w-1/3 py-4",
|
|
22292
22299
|
"style": {
|
|
22293
22300
|
"display": "inline-flex",
|
|
@@ -22307,7 +22314,7 @@ var AmisAppLauncher = function (props) { return __awaiter(void 0, void 0, void 0
|
|
|
22307
22314
|
"headers": {
|
|
22308
22315
|
"Authorization": "Bearer ${context.tenantId},${context.authToken}"
|
|
22309
22316
|
},
|
|
22310
|
-
"adaptor":
|
|
22317
|
+
"adaptor": mobileInitApiAdaptorScript,
|
|
22311
22318
|
"messages": {}
|
|
22312
22319
|
},
|
|
22313
22320
|
"onEvent": {
|
|
@@ -22356,63 +22363,64 @@ var AmisAppLauncher = function (props) { return __awaiter(void 0, void 0, void 0
|
|
|
22356
22363
|
{
|
|
22357
22364
|
"type": "each",
|
|
22358
22365
|
"name": "app_items",
|
|
22359
|
-
"items": {
|
|
22360
|
-
|
|
22361
|
-
|
|
22362
|
-
|
|
22363
|
-
|
|
22364
|
-
|
|
22365
|
-
|
|
22366
|
-
|
|
22367
|
-
|
|
22368
|
-
|
|
22369
|
-
|
|
22370
|
-
|
|
22371
|
-
|
|
22372
|
-
|
|
22373
|
-
|
|
22374
|
-
|
|
22375
|
-
|
|
22376
|
-
|
|
22377
|
-
|
|
22378
|
-
|
|
22379
|
-
|
|
22366
|
+
"items": [{
|
|
22367
|
+
"type": "button",
|
|
22368
|
+
"level": "link",
|
|
22369
|
+
"body": [{
|
|
22370
|
+
"type": "tpl",
|
|
22371
|
+
"tpl": "<div class='slds-app-launcher__tile slds-text-link_reset'><div class='slds-app-launcher__tile-figure'><svg class='w-12 h-12 slds-icon slds-icon_container slds-icon-standard-${REPLACE(icon, '_', '-')}' aria-hidden='true'><use xlink:href='/assets/icons/standard-sprite/svg/symbols.svg#${icon}'></use></svg><span class='slds-assistive-text'>${name}</span></div><div class='slds-app-launcher__tile-body'><span class='slds-link text-blue-600 text-lg'><span title='${name}'>${name}</span></span><div style='display: -webkit-box; -webkit-line-clamp: 1;-webkit-box-orient: vertical;overflow: hidden;'><span title='${description}'>${description}</span></div></div></div>",
|
|
22372
|
+
"badge": {
|
|
22373
|
+
"mode": "text",
|
|
22374
|
+
"text": badgeText,
|
|
22375
|
+
"visibleOn": badgeText,
|
|
22376
|
+
"className": "w-full",
|
|
22377
|
+
"overflowCount": 99,
|
|
22378
|
+
"style": {
|
|
22379
|
+
"top": "20px",
|
|
22380
|
+
"left": "37px",
|
|
22381
|
+
"height": "20px",
|
|
22382
|
+
"border-radius": "10px",
|
|
22383
|
+
"line-height": "18px",
|
|
22384
|
+
"margin-left": "${" + badgeText + ">9?(" + badgeText + ">99?'-21px':'-11px'):'0'}",
|
|
22385
|
+
"right": "auto",
|
|
22386
|
+
"font-size": "16px"
|
|
22387
|
+
}
|
|
22380
22388
|
}
|
|
22381
|
-
}
|
|
22382
|
-
|
|
22383
|
-
|
|
22384
|
-
|
|
22385
|
-
|
|
22386
|
-
|
|
22387
|
-
"actionType": "closeDialog"
|
|
22388
|
-
},
|
|
22389
|
-
{
|
|
22390
|
-
"actionType": "link",
|
|
22391
|
-
"args": {
|
|
22392
|
-
"link": "${path}"
|
|
22389
|
+
}],
|
|
22390
|
+
"onEvent": {
|
|
22391
|
+
"click": {
|
|
22392
|
+
"actions": [
|
|
22393
|
+
{
|
|
22394
|
+
"actionType": "closeDialog"
|
|
22393
22395
|
},
|
|
22394
|
-
|
|
22395
|
-
|
|
22396
|
-
|
|
22397
|
-
|
|
22398
|
-
|
|
22399
|
-
"
|
|
22400
|
-
"blank": true
|
|
22396
|
+
{
|
|
22397
|
+
"actionType": "link",
|
|
22398
|
+
"args": {
|
|
22399
|
+
"link": "${path}"
|
|
22400
|
+
},
|
|
22401
|
+
"expression": "${AND(!blank , !on_click)}"
|
|
22401
22402
|
},
|
|
22402
|
-
|
|
22403
|
-
|
|
22404
|
-
|
|
22405
|
-
|
|
22406
|
-
|
|
22407
|
-
|
|
22408
|
-
|
|
22409
|
-
|
|
22410
|
-
|
|
22411
|
-
|
|
22412
|
-
|
|
22413
|
-
|
|
22414
|
-
|
|
22415
|
-
|
|
22403
|
+
{
|
|
22404
|
+
"actionType": "url",
|
|
22405
|
+
"args": {
|
|
22406
|
+
"url": "${path}",
|
|
22407
|
+
"blank": true
|
|
22408
|
+
},
|
|
22409
|
+
"expression": "${AND(blank , !on_click)}"
|
|
22410
|
+
},
|
|
22411
|
+
{
|
|
22412
|
+
"actionType": "custom",
|
|
22413
|
+
"script": on_click_script,
|
|
22414
|
+
"expression": "${!!on_click}"
|
|
22415
|
+
}
|
|
22416
|
+
]
|
|
22417
|
+
}
|
|
22418
|
+
},
|
|
22419
|
+
"inline": true,
|
|
22420
|
+
"style": {},
|
|
22421
|
+
"visibleOn": "${visible_on}",
|
|
22422
|
+
"className": "slds-p-horizontal_small slds-size_1-of-1 slds-medium-size_1-of-3"
|
|
22423
|
+
}],
|
|
22416
22424
|
"className": "slds-grid slds-wrap slds-grid_pull-padded"
|
|
22417
22425
|
}
|
|
22418
22426
|
]
|
|
@@ -22502,7 +22510,7 @@ var AmisAppLauncher = function (props) { return __awaiter(void 0, void 0, void 0
|
|
|
22502
22510
|
"headers": {
|
|
22503
22511
|
"Authorization": "Bearer ${context.tenantId},${context.authToken}"
|
|
22504
22512
|
},
|
|
22505
|
-
"adaptor":
|
|
22513
|
+
"adaptor": pcInitApiAdaptorScript
|
|
22506
22514
|
}
|
|
22507
22515
|
};
|
|
22508
22516
|
}
|