@steedos-widgets/sortable 6.3.4 → 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 CHANGED
@@ -3,8 +3,8 @@
3
3
  {
4
4
  "package": "@steedos-widgets/sortable",
5
5
  "urls": [
6
- "https://unpkg.com/@steedos-widgets/sortable@6.3.4/dist/sortable.umd.js",
7
- "https://unpkg.com/@steedos-widgets/sortable@6.3.4/dist/sortable.umd.css"
6
+ "https://unpkg.com/@steedos-widgets/sortable@6.3.5/dist/sortable.umd.js",
7
+ "https://unpkg.com/@steedos-widgets/sortable@6.3.5/dist/sortable.umd.css"
8
8
  ],
9
9
  "library": "BuilderSortable"
10
10
  }
@@ -15,10 +15,10 @@
15
15
  "npm": {
16
16
  "package": "@steedos-widgets/sortable"
17
17
  },
18
- "url": "https://unpkg.com/@steedos-widgets/sortable@6.3.4/dist/meta.js",
18
+ "url": "https://unpkg.com/@steedos-widgets/sortable@6.3.5/dist/meta.js",
19
19
  "urls": {
20
- "default": "https://unpkg.com/@steedos-widgets/sortable@6.3.4/dist/meta.js",
21
- "design": "https://unpkg.com/@steedos-widgets/sortable@6.3.4/dist/meta.js"
20
+ "default": "https://unpkg.com/@steedos-widgets/sortable@6.3.5/dist/meta.js",
21
+ "design": "https://unpkg.com/@steedos-widgets/sortable@6.3.5/dist/meta.js"
22
22
  }
23
23
  }
24
24
  ]
@@ -54503,12 +54503,18 @@ function getAmisStaticFieldType(type, readonly, options){
54503
54503
  * @Author: baozhoutao@steedos.com
54504
54504
  * @Date: 2022-07-13 15:18:03
54505
54505
  * @LastEditors: baozhoutao@steedos.com
54506
- * @LastEditTime: 2023-04-11 10:34:26
54506
+ * @LastEditTime: 2024-08-15 12:12:08
54507
54507
  * @Description:
54508
54508
  */
54509
+ let pageCache = {};
54509
54510
 
54510
54511
  async function getPage({type, pageId = '', appId, objectName = '', recordId = '', formFactor = 'LARGE'}){
54511
54512
  const api = `/api/pageSchema/${type}?app=${appId}&objectApiName=${objectName}&recordId=${recordId}&pageId=${pageId}&formFactor=${formFactor}`;
54513
+
54514
+ if(lodash.exports.has(pageCache, api)) {
54515
+ return pageCache[api];
54516
+ }
54517
+
54512
54518
  const page = await fetchAPI(api);
54513
54519
  if (page && page.schema) {
54514
54520
  page.schema = JSON.parse(page.schema);
@@ -54518,8 +54524,10 @@ async function getPage({type, pageId = '', appId, objectName = '', recordId = ''
54518
54524
  delete page.schema.data.context;
54519
54525
  delete page.schema.data.global;
54520
54526
  }
54521
- return page;
54527
+ pageCache[api] = page;
54528
+ return JSON.parse(JSON.stringify(page)); //clone page;
54522
54529
  }
54530
+ pageCache[api] = null;
54523
54531
  }
54524
54532
 
54525
54533
  /*
@@ -58327,7 +58335,7 @@ const getSettingListviewToolbarButtonSchema = ()=>{
58327
58335
  // "tooltip": i18next.t('frontend_button_listview_control_tooltip'),
58328
58336
  "btnClassName": "antd-Button--iconOnly bg-white !p-2 rounded text-gray-500",
58329
58337
  "align": "right",
58330
- "visibleOn": "${!isLookup}",
58338
+ "visibleOn": "${!isLookup && !!isObjectListview}",
58331
58339
  "buttons": [
58332
58340
  {
58333
58341
  "label": instance.t('frontend_button_listview_control_label'),
@@ -58372,7 +58380,7 @@ const getDisplayAsButton = function(objectName, defaultEnableSplit){
58372
58380
  // "tooltip": `${i18next.t('frontend_display_as')} ${displayAsLabel}`,
58373
58381
  "btnClassName": "antd-Button--iconOnly bg-white !p-2 rounded text-gray-500",
58374
58382
  "align": "right",
58375
- "visibleOn": "${window:innerWidth > 768 && !!!isLookup}",
58383
+ "visibleOn": "${window:innerWidth > 768 && !!!isLookup && !!isObjectListview}",
58376
58384
  "buttons": [
58377
58385
  {
58378
58386
  "label": instance.t('frontend_display_as'),
@@ -61205,9 +61213,21 @@ async function convertSFieldToAmisField(field, readonly, ctx) {
61205
61213
  break;
61206
61214
  case 'percent':
61207
61215
  if(readonly){
61216
+ // convertData = {
61217
+ // type: 'static-tpl',
61218
+ // tpl: Tpl.getUiFieldTpl(field)
61219
+ // }
61208
61220
  convertData = {
61209
- type: 'static-tpl',
61210
- tpl: getUiFieldTpl(field)
61221
+ "type": "static-progress",
61222
+ "name": "progress",
61223
+ pipeIn: (value, data) => {
61224
+ if(value){
61225
+ // 因为例如 1.11 * 100 的值不是111,所以调整下。
61226
+ const result = value*100;
61227
+ return Number(result.toFixed(field.scale));
61228
+ }
61229
+ return value;
61230
+ }
61211
61231
  };
61212
61232
  }else {
61213
61233
  convertData = {