@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.esm.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.esm.js
CHANGED
|
@@ -4225,7 +4225,7 @@ function getRecordPermissionsQuery(object, recordId, options){
|
|
|
4225
4225
|
function getApi$2 (isMobile){
|
|
4226
4226
|
if(isMobile);else {
|
|
4227
4227
|
// return __meteor_runtime_config__.ROOT_URL_PATH_PREFIX + "/graphql"
|
|
4228
|
-
return `\${context.rootUrl}/graphql?reload=\${additionalFilters}`
|
|
4228
|
+
return `\${context.rootUrl}/graphql?reload=\${additionalFilters|join}`
|
|
4229
4229
|
}
|
|
4230
4230
|
}
|
|
4231
4231
|
|
|
@@ -11436,6 +11436,10 @@ function getObjectHeaderQuickSearchBox(mainObject, fields, formFactor, { isLooku
|
|
|
11436
11436
|
// const scope = event.context.scoped;
|
|
11437
11437
|
// 如果点击过顶部搜索栏表单的取消按钮,会把此处event.data.__super.__super.__super中的搜索表单项的所有字段设置为null
|
|
11438
11438
|
// 点击取消按钮后继续在表单项中输入过滤条件且最后没有点击回车按键或点击表单项搜索按钮的话,在快速搜索中点击回车按钮提交搜索会所顶部搜索表单中的字段值清空
|
|
11439
|
+
let filterForm = SteedosUI.getClosestAmisComponentByType(scope, "form");
|
|
11440
|
+
if(!filterForm){
|
|
11441
|
+
return;
|
|
11442
|
+
}
|
|
11439
11443
|
let isLookup = event.data.isLookup;
|
|
11440
11444
|
let __lookupField = event.data.__lookupField;
|
|
11441
11445
|
let __changedFilterFormValuesKey = "__changedFilterFormValues";
|
|
@@ -11446,9 +11450,8 @@ function getObjectHeaderQuickSearchBox(mainObject, fields, formFactor, { isLooku
|
|
|
11446
11450
|
}
|
|
11447
11451
|
__changedFilterFormValuesKey += lookupTag;
|
|
11448
11452
|
}
|
|
11449
|
-
let filterForm = SteedosUI.getClosestAmisComponentByType(scope, "form");
|
|
11450
11453
|
setTimeout(function(){
|
|
11451
|
-
filterForm.setValues(event.data[__changedFilterFormValuesKey]);
|
|
11454
|
+
filterForm && filterForm.setValues(event.data[__changedFilterFormValuesKey]);
|
|
11452
11455
|
}, 500);
|
|
11453
11456
|
`;
|
|
11454
11457
|
|
|
@@ -22185,12 +22188,12 @@ var AmisProvider = function (props) { return __awaiter(void 0, void 0, void 0, f
|
|
|
22185
22188
|
/*
|
|
22186
22189
|
* @Author: baozhoutao@steedos.com
|
|
22187
22190
|
* @Date: 2022-09-01 14:44:57
|
|
22188
|
-
* @LastEditors:
|
|
22189
|
-
* @LastEditTime: 2024-
|
|
22191
|
+
* @LastEditors: 殷亮辉 yinlianghui@hotoa.com
|
|
22192
|
+
* @LastEditTime: 2024-05-14 13:30:24
|
|
22190
22193
|
* @Description:
|
|
22191
22194
|
*/
|
|
22192
22195
|
var AmisAppLauncher = function (props) { return __awaiter(void 0, void 0, void 0, function () {
|
|
22193
|
-
var app, data, className, _a, showAppName, _b, appNameClassName, _c, customElements, _d, showAppIcon, formFactor, isMobile, on_click_script, mobile_blank_script, dialogSchema, badgeText;
|
|
22196
|
+
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;
|
|
22194
22197
|
return __generator(this, function (_e) {
|
|
22195
22198
|
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;
|
|
22196
22199
|
if (!app) {
|
|
@@ -22200,6 +22203,9 @@ var AmisAppLauncher = function (props) { return __awaiter(void 0, void 0, void 0
|
|
|
22200
22203
|
isMobile = formFactor === "SMALL" ? true : false;
|
|
22201
22204
|
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 ";
|
|
22202
22205
|
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 ";
|
|
22206
|
+
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 ";
|
|
22207
|
+
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 ");
|
|
22208
|
+
mobileInitApiAdaptorScript = "\n let app_items = payload;\n ".concat(convertAppVisibleOnScript, "\n payload = {\n app_items\n }\n return payload;\n ");
|
|
22203
22209
|
dialogSchema = {};
|
|
22204
22210
|
badgeText = "${IF(${id} == 'approve_workflow',${ss:keyvalues.badge.value|pick:'workflow'},${ss:keyvalues.badge.value|pick:${id}}) | toInt}";
|
|
22205
22211
|
if (isMobile) {
|
|
@@ -22260,6 +22266,7 @@ var AmisAppLauncher = function (props) { return __awaiter(void 0, void 0, void 0
|
|
|
22260
22266
|
]
|
|
22261
22267
|
}
|
|
22262
22268
|
},
|
|
22269
|
+
"visibleOn": "${visible_on}",
|
|
22263
22270
|
"className": "block w-1/3 py-4",
|
|
22264
22271
|
"style": {
|
|
22265
22272
|
"display": "inline-flex",
|
|
@@ -22279,7 +22286,7 @@ var AmisAppLauncher = function (props) { return __awaiter(void 0, void 0, void 0
|
|
|
22279
22286
|
"headers": {
|
|
22280
22287
|
"Authorization": "Bearer ${context.tenantId},${context.authToken}"
|
|
22281
22288
|
},
|
|
22282
|
-
"adaptor":
|
|
22289
|
+
"adaptor": mobileInitApiAdaptorScript,
|
|
22283
22290
|
"messages": {}
|
|
22284
22291
|
},
|
|
22285
22292
|
"onEvent": {
|
|
@@ -22328,63 +22335,64 @@ var AmisAppLauncher = function (props) { return __awaiter(void 0, void 0, void 0
|
|
|
22328
22335
|
{
|
|
22329
22336
|
"type": "each",
|
|
22330
22337
|
"name": "app_items",
|
|
22331
|
-
"items": {
|
|
22332
|
-
|
|
22333
|
-
|
|
22334
|
-
|
|
22335
|
-
|
|
22336
|
-
|
|
22337
|
-
|
|
22338
|
-
|
|
22339
|
-
|
|
22340
|
-
|
|
22341
|
-
|
|
22342
|
-
|
|
22343
|
-
|
|
22344
|
-
|
|
22345
|
-
|
|
22346
|
-
|
|
22347
|
-
|
|
22348
|
-
|
|
22349
|
-
|
|
22350
|
-
|
|
22351
|
-
|
|
22338
|
+
"items": [{
|
|
22339
|
+
"type": "button",
|
|
22340
|
+
"level": "link",
|
|
22341
|
+
"body": [{
|
|
22342
|
+
"type": "tpl",
|
|
22343
|
+
"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>",
|
|
22344
|
+
"badge": {
|
|
22345
|
+
"mode": "text",
|
|
22346
|
+
"text": badgeText,
|
|
22347
|
+
"visibleOn": badgeText,
|
|
22348
|
+
"className": "w-full",
|
|
22349
|
+
"overflowCount": 99,
|
|
22350
|
+
"style": {
|
|
22351
|
+
"top": "20px",
|
|
22352
|
+
"left": "37px",
|
|
22353
|
+
"height": "20px",
|
|
22354
|
+
"border-radius": "10px",
|
|
22355
|
+
"line-height": "18px",
|
|
22356
|
+
"margin-left": "${" + badgeText + ">9?(" + badgeText + ">99?'-21px':'-11px'):'0'}",
|
|
22357
|
+
"right": "auto",
|
|
22358
|
+
"font-size": "16px"
|
|
22359
|
+
}
|
|
22352
22360
|
}
|
|
22353
|
-
}
|
|
22354
|
-
|
|
22355
|
-
|
|
22356
|
-
|
|
22357
|
-
|
|
22358
|
-
|
|
22359
|
-
"actionType": "closeDialog"
|
|
22360
|
-
},
|
|
22361
|
-
{
|
|
22362
|
-
"actionType": "link",
|
|
22363
|
-
"args": {
|
|
22364
|
-
"link": "${path}"
|
|
22361
|
+
}],
|
|
22362
|
+
"onEvent": {
|
|
22363
|
+
"click": {
|
|
22364
|
+
"actions": [
|
|
22365
|
+
{
|
|
22366
|
+
"actionType": "closeDialog"
|
|
22365
22367
|
},
|
|
22366
|
-
|
|
22367
|
-
|
|
22368
|
-
|
|
22369
|
-
|
|
22370
|
-
|
|
22371
|
-
"
|
|
22372
|
-
"blank": true
|
|
22368
|
+
{
|
|
22369
|
+
"actionType": "link",
|
|
22370
|
+
"args": {
|
|
22371
|
+
"link": "${path}"
|
|
22372
|
+
},
|
|
22373
|
+
"expression": "${AND(!blank , !on_click)}"
|
|
22373
22374
|
},
|
|
22374
|
-
|
|
22375
|
-
|
|
22376
|
-
|
|
22377
|
-
|
|
22378
|
-
|
|
22379
|
-
|
|
22380
|
-
|
|
22381
|
-
|
|
22382
|
-
|
|
22383
|
-
|
|
22384
|
-
|
|
22385
|
-
|
|
22386
|
-
|
|
22387
|
-
|
|
22375
|
+
{
|
|
22376
|
+
"actionType": "url",
|
|
22377
|
+
"args": {
|
|
22378
|
+
"url": "${path}",
|
|
22379
|
+
"blank": true
|
|
22380
|
+
},
|
|
22381
|
+
"expression": "${AND(blank , !on_click)}"
|
|
22382
|
+
},
|
|
22383
|
+
{
|
|
22384
|
+
"actionType": "custom",
|
|
22385
|
+
"script": on_click_script,
|
|
22386
|
+
"expression": "${!!on_click}"
|
|
22387
|
+
}
|
|
22388
|
+
]
|
|
22389
|
+
}
|
|
22390
|
+
},
|
|
22391
|
+
"inline": true,
|
|
22392
|
+
"style": {},
|
|
22393
|
+
"visibleOn": "${visible_on}",
|
|
22394
|
+
"className": "slds-p-horizontal_small slds-size_1-of-1 slds-medium-size_1-of-3"
|
|
22395
|
+
}],
|
|
22388
22396
|
"className": "slds-grid slds-wrap slds-grid_pull-padded"
|
|
22389
22397
|
}
|
|
22390
22398
|
]
|
|
@@ -22474,7 +22482,7 @@ var AmisAppLauncher = function (props) { return __awaiter(void 0, void 0, void 0
|
|
|
22474
22482
|
"headers": {
|
|
22475
22483
|
"Authorization": "Bearer ${context.tenantId},${context.authToken}"
|
|
22476
22484
|
},
|
|
22477
|
-
"adaptor":
|
|
22485
|
+
"adaptor": pcInitApiAdaptorScript
|
|
22478
22486
|
}
|
|
22479
22487
|
};
|
|
22480
22488
|
}
|