@steedos-widgets/sortable 6.3.4 → 6.3.6

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.6/dist/sortable.umd.js",
7
+ "https://unpkg.com/@steedos-widgets/sortable@6.3.6/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.6/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.6/dist/meta.js",
21
+ "design": "https://unpkg.com/@steedos-widgets/sortable@6.3.6/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,15 +54524,17 @@ 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
  /*
54526
54534
  * @Author: baozhoutao@steedos.com
54527
54535
  * @Date: 2022-10-28 14:15:09
54528
- * @LastEditors: liaodaxue
54529
- * @LastEditTime: 2023-12-29 10:46:50
54536
+ * @LastEditors: baozhoutao@steedos.com
54537
+ * @LastEditTime: 2024-08-19 16:26:58
54530
54538
  * @Description:
54531
54539
  */
54532
54540
 
@@ -54732,6 +54740,11 @@ const getAmisFileEditSchema = (steedosField)=>{
54732
54740
  convertData.multiple = true;
54733
54741
  convertData.joinValues = false;
54734
54742
  convertData.extractValue = true;
54743
+ if(steedosField.type === 'image'){
54744
+ if(Steedos.isCordova() && Steedos.isCordova()){
54745
+ convertData.accept = "";
54746
+ }
54747
+ }
54735
54748
  }
54736
54749
  return convertData;
54737
54750
  };
@@ -58327,7 +58340,7 @@ const getSettingListviewToolbarButtonSchema = ()=>{
58327
58340
  // "tooltip": i18next.t('frontend_button_listview_control_tooltip'),
58328
58341
  "btnClassName": "antd-Button--iconOnly bg-white !p-2 rounded text-gray-500",
58329
58342
  "align": "right",
58330
- "visibleOn": "${!isLookup}",
58343
+ "visibleOn": "${!isLookup && !!isObjectListview}",
58331
58344
  "buttons": [
58332
58345
  {
58333
58346
  "label": instance.t('frontend_button_listview_control_label'),
@@ -58372,7 +58385,7 @@ const getDisplayAsButton = function(objectName, defaultEnableSplit){
58372
58385
  // "tooltip": `${i18next.t('frontend_display_as')} ${displayAsLabel}`,
58373
58386
  "btnClassName": "antd-Button--iconOnly bg-white !p-2 rounded text-gray-500",
58374
58387
  "align": "right",
58375
- "visibleOn": "${window:innerWidth > 768 && !!!isLookup}",
58388
+ "visibleOn": "${window:innerWidth > 768 && !!!isLookup && !!isObjectListview}",
58376
58389
  "buttons": [
58377
58390
  {
58378
58391
  "label": instance.t('frontend_display_as'),
@@ -61205,9 +61218,21 @@ async function convertSFieldToAmisField(field, readonly, ctx) {
61205
61218
  break;
61206
61219
  case 'percent':
61207
61220
  if(readonly){
61221
+ // convertData = {
61222
+ // type: 'static-tpl',
61223
+ // tpl: Tpl.getUiFieldTpl(field)
61224
+ // }
61208
61225
  convertData = {
61209
- type: 'static-tpl',
61210
- tpl: getUiFieldTpl(field)
61226
+ "type": "static-progress",
61227
+ "name": "progress",
61228
+ pipeIn: (value, data) => {
61229
+ if(value){
61230
+ // 因为例如 1.11 * 100 的值不是111,所以调整下。
61231
+ const result = value*100;
61232
+ return Number(result.toFixed(field.scale));
61233
+ }
61234
+ return value;
61235
+ }
61211
61236
  };
61212
61237
  }else {
61213
61238
  convertData = {