@steedos-widgets/sortable 1.3.22-beta.3 → 3.6.0-beta.4

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@1.3.22-beta.3/dist/sortable.umd.js",
7
- "https://unpkg.com/@steedos-widgets/sortable@1.3.22-beta.3/dist/sortable.umd.css"
6
+ "https://unpkg.com/@steedos-widgets/sortable@3.6.0-beta.4/dist/sortable.umd.js",
7
+ "https://unpkg.com/@steedos-widgets/sortable@3.6.0-beta.4/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@1.3.22-beta.3/dist/meta.js",
18
+ "url": "https://unpkg.com/@steedos-widgets/sortable@3.6.0-beta.4/dist/meta.js",
19
19
  "urls": {
20
- "default": "https://unpkg.com/@steedos-widgets/sortable@1.3.22-beta.3/dist/meta.js",
21
- "design": "https://unpkg.com/@steedos-widgets/sortable@1.3.22-beta.3/dist/meta.js"
20
+ "default": "https://unpkg.com/@steedos-widgets/sortable@3.6.0-beta.4/dist/meta.js",
21
+ "design": "https://unpkg.com/@steedos-widgets/sortable@3.6.0-beta.4/dist/meta.js"
22
22
  }
23
23
  }
24
24
  ]
@@ -53979,8 +53979,8 @@ const Router = {
53979
53979
  /*
53980
53980
  * @Author: baozhoutao@steedos.com
53981
53981
  * @Date: 2022-07-20 16:29:22
53982
- * @LastEditors: liaodaxue
53983
- * @LastEditTime: 2023-09-11 17:19:53
53982
+ * @LastEditors: 殷亮辉 yinlianghui@hotoa.com
53983
+ * @LastEditTime: 2023-12-28 14:59:08
53984
53984
  * @Description:
53985
53985
  */
53986
53986
 
@@ -54037,6 +54037,21 @@ function getLookupListView(refObjectConfig) {
54037
54037
  return listView;
54038
54038
  }
54039
54039
 
54040
+
54041
+ /**
54042
+ * 获取可比较的amis版本号
54043
+ * @returns 只返回前两位版本,第三位忽略,比如3.6.3返回3.6
54044
+ */
54045
+ function getComparableAmisVersion() {
54046
+ let amis = (window.amisRequire && window.amisRequire('amis')) || window.Amis;
54047
+ let amisVersion = amis && amis.version;
54048
+ if(amisVersion){
54049
+ let comparableVersions = amisVersion.split(".");
54050
+ let comparableVersion = parseFloat(comparableVersions[0].toString() + "." + comparableVersions[1].toString());
54051
+ return comparableVersion;
54052
+ }
54053
+ }
54054
+
54040
54055
  function getNumberTpl(field){
54041
54056
  return `<span>\${_display.${field.name}}</span>`
54042
54057
  }
@@ -55141,7 +55156,7 @@ async function getQuickEditSchema(field, options){
55141
55156
  "actions":[
55142
55157
  {
55143
55158
  "actionType": "setValue",
55144
- "componentId": `service_listview_${options.objectName}`,
55159
+ "componentId": quickEditId,
55145
55160
  "args": {
55146
55161
  "value":{
55147
55162
  "quickedit_record_permissions_loading": true
@@ -55166,7 +55181,7 @@ async function getQuickEditSchema(field, options){
55166
55181
  },
55167
55182
  {
55168
55183
  "actionType": "setValue",
55169
- "componentId": `service_listview_${options.objectName}`,
55184
+ "componentId": quickEditId,
55170
55185
  "args": {
55171
55186
  "value":{
55172
55187
  "quickedit_record_permissions_loading": false
@@ -55175,7 +55190,7 @@ async function getQuickEditSchema(field, options){
55175
55190
  },
55176
55191
  {
55177
55192
  "actionType": "setValue",
55178
- "componentId": `service_listview_${options.objectName}`,
55193
+ "componentId": quickEditId,
55179
55194
  "args": {
55180
55195
  "value":{
55181
55196
  "quickedit_record_permissions": "${event.data}"
@@ -55354,8 +55369,6 @@ function getFieldWidth(width){
55354
55369
  async function getTableColumns(fields, options){
55355
55370
  const columns = [];
55356
55371
  if(!options.isLookup && !options.isInputTable){
55357
- //将_display放入crud的columns中,可以通过setvalue修改行内数据域的_display,而不影响上层items的_display,用于批量编辑
55358
- columns.push({name: '_display',type: 'static', width: 32, placeholder: "",id: "_display_${_index}", className: "hidden"});
55359
55372
  if(!options.enable_tree){
55360
55373
  columns.push({name: '_index',type: 'text', width: 32, placeholder: ""});
55361
55374
  }
@@ -55513,8 +55526,8 @@ async function getTableColumns(fields, options){
55513
55526
  const href = Router.getObjectDetailPath({
55514
55527
  ...options, formFactor: options.formFactor, appId: "${appId}", objectName: options.objectName || "${objectName}", recordId: `\${${options.idFieldName}}`
55515
55528
  });
55516
- columns[1].type = "tpl";
55517
- columns[1].tpl = `<a href="${href}">\${${columns[1].name}}</a>`;
55529
+ columns[0].type = "tpl";
55530
+ columns[0].tpl = `<a href="${href}">\${${columns[0].name}}</a>`;
55518
55531
  }
55519
55532
  return columns;
55520
55533
  }
@@ -55900,6 +55913,7 @@ async function getTableSchema$1(fields, options){
55900
55913
  if(!isLookup && !hiddenColumnOperation){
55901
55914
  columns.push(await getTableOperation(options));
55902
55915
  }
55916
+
55903
55917
  }
55904
55918
 
55905
55919
  return {
@@ -59179,6 +59193,9 @@ async function lookupToAmisPicker(field, readonly, ctx){
59179
59193
  */
59180
59194
  return payload;
59181
59195
  }
59196
+ if(!payload.data.rows){
59197
+ payload.data.rows = [];
59198
+ }
59182
59199
  if(enable_tree){
59183
59200
  const records = payload.data.rows;
59184
59201
  const treeRecords = [];
@@ -59459,7 +59476,7 @@ async function lookupToAmisSelect(field, readonly, ctx){
59459
59476
  sendOn.push(`this.${fName}`);
59460
59477
  });
59461
59478
  if(depend_on.length > 0){
59462
- apiInfo.url = `${apiInfo.url}?${depend_on.join('&')}`;
59479
+ apiInfo.url = `${apiInfo.url}&${depend_on.join('&')}`;
59463
59480
  apiInfo.sendOn = `${sendOn.join(' && ')}`;
59464
59481
  }
59465
59482
  }
@@ -59567,6 +59584,13 @@ async function lookupToAmisSelect(field, readonly, ctx){
59567
59584
  autoComplete: apiInfo,
59568
59585
  searchable: true,
59569
59586
  };
59587
+ let amisVersion = getComparableAmisVersion();
59588
+ if(amisVersion >= 3.6){
59589
+ // amis 3.6中不加source会造成子表组件中弹出行编辑窗口的lookup字段有时不请求接口(概率现象,同一个地方反复操作有时请求有时不请求)
59590
+ // 但是同时配置autoComplete和source会多请求一次接口
59591
+ // TODO:应该想办法把是否字段在子表组件内,即ctx.isInputTable,如果不在子表组件内不需要加source
59592
+ data.source = apiInfo;
59593
+ }
59570
59594
  //删除xlink:href中的rootUrl前缀,解决客户端svg为空的问题
59571
59595
  const select_menuTpl = `<span class='flex items-center mt-0.5'>
59572
59596
  <span role='img' aria-label='smile' class='anticon anticon-smile'>
@@ -60529,9 +60553,9 @@ async function convertSFieldToAmisField(field, readonly, ctx) {
60529
60553
  }
60530
60554
  if(!lodash.exports.isEmpty(convertData)){
60531
60555
  if(field.is_wide || convertData.type === 'group'){
60532
- convertData.className = 'col-span-2 m-1';
60556
+ convertData.className = 'col-span-2 m-0';
60533
60557
  }else {
60534
- convertData.className = 'm-1';
60558
+ convertData.className = 'm-0';
60535
60559
  }
60536
60560
  if(readonly){
60537
60561
  convertData.className = `${convertData.className} border-b`;