@steedos-widgets/sortable 6.3.10 → 6.3.11-beta.10

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.10/dist/sortable.umd.js",
7
- "https://unpkg.com/@steedos-widgets/sortable@6.3.10/dist/sortable.umd.css"
6
+ "https://unpkg.com/@steedos-widgets/sortable@6.3.11-beta.10/dist/sortable.umd.js",
7
+ "https://unpkg.com/@steedos-widgets/sortable@6.3.11-beta.10/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.10/dist/meta.js",
18
+ "url": "https://unpkg.com/@steedos-widgets/sortable@6.3.11-beta.10/dist/meta.js",
19
19
  "urls": {
20
- "default": "https://unpkg.com/@steedos-widgets/sortable@6.3.10/dist/meta.js",
21
- "design": "https://unpkg.com/@steedos-widgets/sortable@6.3.10/dist/meta.js"
20
+ "default": "https://unpkg.com/@steedos-widgets/sortable@6.3.11-beta.10/dist/meta.js",
21
+ "design": "https://unpkg.com/@steedos-widgets/sortable@6.3.11-beta.10/dist/meta.js"
22
22
  }
23
23
  }
24
24
  ]
@@ -53985,18 +53985,24 @@ const Router = {
53985
53985
  /*
53986
53986
  * @Author: baozhoutao@steedos.com
53987
53987
  * @Date: 2022-07-20 16:29:22
53988
- * @LastEditors: liaodaxue
53989
- * @LastEditTime: 2024-01-25 14:44:17
53988
+ * @LastEditors: baozhoutao@steedos.com
53989
+ * @LastEditTime: 2024-10-14 13:33:27
53990
53990
  * @Description:
53991
53991
  */
53992
53992
 
53993
- function getImageFieldUrl(url) {
53994
- if (window.Meteor && window.Meteor.isCordova != true) {
53995
- // '//'的位置
53996
- const doubleSlashIndex = url.indexOf('//');
53997
- const urlIndex = url.indexOf('/', doubleSlashIndex + 2);
53998
- const rootUrl = url.substring(urlIndex);
53999
- return rootUrl;
53993
+ function getImageFieldUrl(url, readonly) {
53994
+ if (window.Meteor) {
53995
+ if(window.Meteor.isCordova != true){
53996
+ // '//'的位置
53997
+ const doubleSlashIndex = url.indexOf('//');
53998
+ const urlIndex = url.indexOf('/', doubleSlashIndex + 2);
53999
+ const rootUrl = url.substring(urlIndex);
54000
+ return rootUrl;
54001
+ }else {
54002
+ if(readonly || url.startsWith('http')){
54003
+ return `${url}?token=${window.btoa(JSON.stringify({ authToken : Builder.settings.context.authToken }))}`
54004
+ }
54005
+ }
54000
54006
  }
54001
54007
  return url;
54002
54008
  }
@@ -54534,7 +54540,7 @@ async function getPage({type, pageId = '', appId, objectName = '', recordId = ''
54534
54540
  * @Author: baozhoutao@steedos.com
54535
54541
  * @Date: 2022-10-28 14:15:09
54536
54542
  * @LastEditors: baozhoutao@steedos.com
54537
- * @LastEditTime: 2024-08-19 16:26:58
54543
+ * @LastEditTime: 2024-10-14 14:01:15
54538
54544
  * @Description:
54539
54545
  */
54540
54546
 
@@ -54632,13 +54638,13 @@ const getAmisFileReadonlySchema = async (steedosField,ctx = {})=>{
54632
54638
  if(type === 'file'){
54633
54639
  return window.Meteor?.isCordova ? {
54634
54640
  "type": "control",
54635
- "body": {
54641
+ "body": steedosField.multiple ? {
54636
54642
  "type": "each",
54637
54643
  "name": "_display." + steedosField.name,
54638
54644
  "items": {
54639
54645
  "type": "tpl",
54640
54646
  "tpl": "${name}",
54641
- "className": "antd-Button--link inline-block",
54647
+ "className": "antd-Button--link inline-block mr-2",
54642
54648
  "onEvent": {
54643
54649
  "click": {
54644
54650
  "actions": [
@@ -54653,6 +54659,24 @@ const getAmisFileReadonlySchema = async (steedosField,ctx = {})=>{
54653
54659
  }
54654
54660
  }
54655
54661
  }
54662
+ } : {
54663
+ "type": "tpl",
54664
+ "tpl": "${_display." + steedosField.name + ".name}",
54665
+ "className": "antd-Button--link inline-block",
54666
+ "onEvent": {
54667
+ "click": {
54668
+ "actions": [
54669
+ {
54670
+ "script": `
54671
+ const data = event.data._display.${steedosField.name};
54672
+ Steedos.cordovaDownload(encodeURI(data.url), data.name);
54673
+ `,
54674
+ "actionType": "custom"
54675
+ }
54676
+ ],
54677
+ "weight": 0
54678
+ }
54679
+ }
54656
54680
  }
54657
54681
  } : {
54658
54682
  // type: amisFieldType,
@@ -56320,7 +56344,7 @@ async function getTableSchema$1(object, fields, options){
56320
56344
  /*
56321
56345
  img/avatar字段值添加URL前缀使其在amis中正常显示图片。
56322
56346
  */
56323
- function getScriptForAddUrlPrefixForImgFields(fields){
56347
+ function getScriptForAddUrlPrefixForImgFields(fields, readonly){
56324
56348
  let imgFieldsKeys = [];
56325
56349
  let imgFields = {};
56326
56350
  fields.forEach((item)=>{
@@ -56348,12 +56372,12 @@ function getScriptForAddUrlPrefixForImgFields(fields){
56348
56372
  if(fieldProps.multiple){
56349
56373
  if(imgFieldDisplayValue instanceof Array){
56350
56374
  data[item] = imgFieldDisplayValue.map((i)=>{
56351
- const url = window.getImageFieldUrl(i.url);
56375
+ const url = window.getImageFieldUrl(i.url, ${readonly});
56352
56376
  return url;
56353
56377
  });
56354
56378
  }
56355
56379
  }else{
56356
- const url = imgFieldDisplayValue && window.getImageFieldUrl(imgFieldDisplayValue.url);
56380
+ const url = imgFieldDisplayValue && window.getImageFieldUrl(imgFieldDisplayValue.url, ${readonly});
56357
56381
  data[item] = url;
56358
56382
  }
56359
56383
  }
@@ -61073,7 +61097,7 @@ async function convertSFieldToAmisField(field, readonly, ctx) {
61073
61097
  // }
61074
61098
  // 日期时间字段,按日期方式展现显示控件,用户不用关心小时分钟
61075
61099
  convertData = {
61076
- type: "input-date-range",
61100
+ type: "input-datetime-range",
61077
61101
  inputFormat: "YYYY-MM-DD HH:mm",
61078
61102
  format:'YYYY-MM-DDTHH:mm:ss.SSSZ',
61079
61103
  tpl: readonly ? getDateTimeTpl(field) : null,