@steedos-widgets/sortable 6.3.3 → 6.3.5
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/assets.json +5 -5
- package/dist/sortable.cjs.js +36 -15
- package/dist/sortable.cjs.js.map +1 -1
- package/dist/sortable.esm.js +36 -15
- package/dist/sortable.esm.js.map +1 -1
- package/dist/sortable.umd.js +36 -15
- package/package.json +3 -3
package/dist/sortable.esm.js
CHANGED
|
@@ -54499,12 +54499,18 @@ function getAmisStaticFieldType(type, readonly, options){
|
|
|
54499
54499
|
* @Author: baozhoutao@steedos.com
|
|
54500
54500
|
* @Date: 2022-07-13 15:18:03
|
|
54501
54501
|
* @LastEditors: baozhoutao@steedos.com
|
|
54502
|
-
* @LastEditTime:
|
|
54502
|
+
* @LastEditTime: 2024-08-15 12:12:08
|
|
54503
54503
|
* @Description:
|
|
54504
54504
|
*/
|
|
54505
|
+
let pageCache = {};
|
|
54505
54506
|
|
|
54506
54507
|
async function getPage({type, pageId = '', appId, objectName = '', recordId = '', formFactor = 'LARGE'}){
|
|
54507
54508
|
const api = `/api/pageSchema/${type}?app=${appId}&objectApiName=${objectName}&recordId=${recordId}&pageId=${pageId}&formFactor=${formFactor}`;
|
|
54509
|
+
|
|
54510
|
+
if(lodash.exports.has(pageCache, api)) {
|
|
54511
|
+
return pageCache[api];
|
|
54512
|
+
}
|
|
54513
|
+
|
|
54508
54514
|
const page = await fetchAPI(api);
|
|
54509
54515
|
if (page && page.schema) {
|
|
54510
54516
|
page.schema = JSON.parse(page.schema);
|
|
@@ -54514,8 +54520,10 @@ async function getPage({type, pageId = '', appId, objectName = '', recordId = ''
|
|
|
54514
54520
|
delete page.schema.data.context;
|
|
54515
54521
|
delete page.schema.data.global;
|
|
54516
54522
|
}
|
|
54517
|
-
|
|
54523
|
+
pageCache[api] = page;
|
|
54524
|
+
return JSON.parse(JSON.stringify(page)); //clone page;
|
|
54518
54525
|
}
|
|
54526
|
+
pageCache[api] = null;
|
|
54519
54527
|
}
|
|
54520
54528
|
|
|
54521
54529
|
/*
|
|
@@ -58323,7 +58331,7 @@ const getSettingListviewToolbarButtonSchema = ()=>{
|
|
|
58323
58331
|
// "tooltip": i18next.t('frontend_button_listview_control_tooltip'),
|
|
58324
58332
|
"btnClassName": "antd-Button--iconOnly bg-white !p-2 rounded text-gray-500",
|
|
58325
58333
|
"align": "right",
|
|
58326
|
-
"visibleOn": "${!isLookup}",
|
|
58334
|
+
"visibleOn": "${!isLookup && !!isObjectListview}",
|
|
58327
58335
|
"buttons": [
|
|
58328
58336
|
{
|
|
58329
58337
|
"label": instance.t('frontend_button_listview_control_label'),
|
|
@@ -58368,7 +58376,7 @@ const getDisplayAsButton = function(objectName, defaultEnableSplit){
|
|
|
58368
58376
|
// "tooltip": `${i18next.t('frontend_display_as')} ${displayAsLabel}`,
|
|
58369
58377
|
"btnClassName": "antd-Button--iconOnly bg-white !p-2 rounded text-gray-500",
|
|
58370
58378
|
"align": "right",
|
|
58371
|
-
"visibleOn": "${window:innerWidth > 768 && !!!isLookup}",
|
|
58379
|
+
"visibleOn": "${window:innerWidth > 768 && !!!isLookup && !!isObjectListview}",
|
|
58372
58380
|
"buttons": [
|
|
58373
58381
|
{
|
|
58374
58382
|
"label": instance.t('frontend_display_as'),
|
|
@@ -58569,18 +58577,19 @@ function getObjectHeaderToolbar(mainObject, fields, formFactor, {
|
|
|
58569
58577
|
}
|
|
58570
58578
|
let toolbarReloadButton;
|
|
58571
58579
|
const onReloadScript = `
|
|
58572
|
-
// const scope = event.context.scoped;
|
|
58573
|
-
// var listView = scope.parent.getComponents().find(function(n){
|
|
58574
|
-
// return n.props.type === "crud";
|
|
58575
|
-
// });
|
|
58576
|
-
// listView.handleChangePage(1);
|
|
58577
|
-
|
|
58578
|
-
|
|
58579
58580
|
// 触发搜索,而不是reload,因为使用search-box可以在amissdk是3.6.3-patch.8+实现在非第一页的情况下,快速搜索输入框中过滤条件变更时再点刷新可以自动跳转翻页到第一页
|
|
58580
58581
|
const scope = event.context.scoped;
|
|
58581
58582
|
const sb = SteedosUI.getClosestAmisComponentByType(scope, "search-box");
|
|
58582
|
-
|
|
58583
|
-
|
|
58583
|
+
if (sb) {
|
|
58584
|
+
const sbValue = sb.state.value;
|
|
58585
|
+
sb.handleSearch(sbValue);
|
|
58586
|
+
}else{
|
|
58587
|
+
var listView = scope.parent.getComponents().find(function(n){
|
|
58588
|
+
return n.props.type === "crud";
|
|
58589
|
+
});
|
|
58590
|
+
listView.handleChangePage(1);
|
|
58591
|
+
}
|
|
58592
|
+
|
|
58584
58593
|
`;
|
|
58585
58594
|
toolbarReloadButton = {
|
|
58586
58595
|
// "type": "reload",//不可以直接使用reload,因为它不会设置页码到第一页,这在加载更多按钮的翻页模式下会有问题
|
|
@@ -61200,9 +61209,21 @@ async function convertSFieldToAmisField(field, readonly, ctx) {
|
|
|
61200
61209
|
break;
|
|
61201
61210
|
case 'percent':
|
|
61202
61211
|
if(readonly){
|
|
61212
|
+
// convertData = {
|
|
61213
|
+
// type: 'static-tpl',
|
|
61214
|
+
// tpl: Tpl.getUiFieldTpl(field)
|
|
61215
|
+
// }
|
|
61203
61216
|
convertData = {
|
|
61204
|
-
type:
|
|
61205
|
-
|
|
61217
|
+
"type": "static-progress",
|
|
61218
|
+
"name": "progress",
|
|
61219
|
+
pipeIn: (value, data) => {
|
|
61220
|
+
if(value){
|
|
61221
|
+
// 因为例如 1.11 * 100 的值不是111,所以调整下。
|
|
61222
|
+
const result = value*100;
|
|
61223
|
+
return Number(result.toFixed(field.scale));
|
|
61224
|
+
}
|
|
61225
|
+
return value;
|
|
61226
|
+
}
|
|
61206
61227
|
};
|
|
61207
61228
|
}else {
|
|
61208
61229
|
convertData = {
|