@steedos-widgets/amis-object 1.3.4-beta.6 → 1.3.4-beta.7

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.
@@ -286,6 +286,12 @@ fieldset.antd-Collapse > legend{
286
286
  border-radius: var(--Form-input-borderRadius);
287
287
  }
288
288
 
289
+ .antd-Picker .antd-Picker-input .antd-Picker-values .antd-Picker-value{
290
+ /* lookup字段值选中项值字符很多超长时换行,包括单选和多选 */
291
+ white-space: break-spaces;
292
+ word-break: break-all;
293
+ }
294
+
289
295
  .ant-dropdown-menu {
290
296
  border: 1px solid #e5e5e5;
291
297
  border-radius: 0.25rem;
@@ -1321,6 +1327,127 @@ fieldset.antd-Collapse > legend{
1321
1327
  .antd-ButtonGroup--vertical .steedos-object-button + .steedos-object-button {
1322
1328
  margin-left: 0px;
1323
1329
  }
1330
+ .whitespace-nowrap-table-cell-text-overflow-ellipsis-content {
1331
+ overflow: hidden;
1332
+ text-overflow: ellipsis;
1333
+ }
1334
+ .whitespace-nowrap-table-cell-text-overflow-ellipsis-content > .antd-Form-static {
1335
+ /*上面的样式无法解决url类型字段省略号问题*/
1336
+ overflow: hidden;
1337
+ text-overflow: ellipsis;
1338
+ }
1339
+ .whitespace-nowrap-table-cell-text-overflow-ellipsis-content > .antd-Form-static > .antd-Form-control .antd-TplField > span > a {
1340
+ /*上面的样式无法解决附件类型字段省略号问题*/
1341
+ overflow: hidden;
1342
+ text-overflow: ellipsis;
1343
+ }
1344
+ .whitespace-nowrap-table-cell-text-overflow-ellipsis .antd-Crud .antd-Table .antd-Table-content tbody td.whitespace-nowrap > div {
1345
+ /*各种字段类型在不支持快速编辑的单元格中文字超长时显示省略号*/
1346
+ overflow: hidden;
1347
+ text-overflow: ellipsis;
1348
+ }
1349
+ .whitespace-nowrap-table-cell-text-overflow-ellipsis .antd-Crud .antd-Table .antd-Table-content tbody td.whitespace-nowrap > div > .antd-Form-static {
1350
+ /*上面的样式无法解决url类型字段省略号问题*/
1351
+ overflow: hidden;
1352
+ text-overflow: ellipsis;
1353
+ }
1354
+ .whitespace-nowrap-table-cell-text-overflow-ellipsis .antd-Crud .antd-Table .antd-Table-content tbody td.whitespace-nowrap > div > .antd-Form-static > .antd-Form-control .antd-TplField > span > a {
1355
+ /*上面的样式无法解决附件类型字段省略号问题*/
1356
+ overflow: hidden;
1357
+ text-overflow: ellipsis;
1358
+ }
1359
+ .whitespace-nowrap-table-cell-text-overflow-ellipsis .antd-Crud .antd-Table .antd-Table-content tbody td.whitespace-nowrap.antd-Field--quickEditable {
1360
+ /*各种字段类型在支持快速编辑的单元格中文字超长时显示省略号*/
1361
+ }
1362
+ .whitespace-nowrap-table-cell-text-overflow-ellipsis .antd-Crud .antd-Table .antd-Table-content tbody td.whitespace-nowrap.antd-Field--quickEditable > div > div {
1363
+ /*这里写在第二层div中是因为第一层div是display: flex;无法实现省略号*/
1364
+ overflow: hidden;
1365
+ text-overflow: ellipsis;
1366
+ }
1367
+ .whitespace-nowrap-table-cell-text-overflow-ellipsis .antd-Crud .antd-Table .antd-Table-content tbody td.whitespace-nowrap.antd-Field--quickEditable > div > div > .antd-Form-static {
1368
+ /*上面的样式无法解决url类型字段省略号问题*/
1369
+ overflow: hidden;
1370
+ text-overflow: ellipsis;
1371
+ }
1372
+ .whitespace-nowrap-table-cell-text-overflow-ellipsis .antd-Crud .antd-Table .antd-Table-content tbody td.whitespace-nowrap.antd-Field--quickEditable > div > div > .antd-Form-static > .antd-Form-control .antd-TplField > span > a {
1373
+ /*上面的样式无法解决附件类型字段省略号问题*/
1374
+ overflow: hidden;
1375
+ text-overflow: ellipsis;
1376
+ }
1377
+ @media (min-width: 767px) {
1378
+ .steedos-object-table {
1379
+ /*对象表格组件各种字段类型文字超长时显示省略号*/
1380
+ }
1381
+ .steedos-object-table .antd-Crud .antd-Table .antd-Table-content tbody td.whitespace-nowrap > div {
1382
+ /*各种字段类型在不支持快速编辑的单元格中文字超长时显示省略号*/
1383
+ overflow: hidden;
1384
+ text-overflow: ellipsis;
1385
+ }
1386
+ .steedos-object-table .antd-Crud .antd-Table .antd-Table-content tbody td.whitespace-nowrap > div > .antd-Form-static {
1387
+ /*上面的样式无法解决url类型字段省略号问题*/
1388
+ overflow: hidden;
1389
+ text-overflow: ellipsis;
1390
+ }
1391
+ .steedos-object-table .antd-Crud .antd-Table .antd-Table-content tbody td.whitespace-nowrap > div > .antd-Form-static > .antd-Form-control .antd-TplField > span > a {
1392
+ /*上面的样式无法解决附件类型字段省略号问题*/
1393
+ overflow: hidden;
1394
+ text-overflow: ellipsis;
1395
+ }
1396
+ .steedos-object-table .antd-Crud .antd-Table .antd-Table-content tbody td.whitespace-nowrap.antd-Field--quickEditable {
1397
+ /*各种字段类型在支持快速编辑的单元格中文字超长时显示省略号*/
1398
+ }
1399
+ .steedos-object-table .antd-Crud .antd-Table .antd-Table-content tbody td.whitespace-nowrap.antd-Field--quickEditable > div > div {
1400
+ /*这里写在第二层div中是因为第一层div是display: flex;无法实现省略号*/
1401
+ overflow: hidden;
1402
+ text-overflow: ellipsis;
1403
+ }
1404
+ .steedos-object-table .antd-Crud .antd-Table .antd-Table-content tbody td.whitespace-nowrap.antd-Field--quickEditable > div > div > .antd-Form-static {
1405
+ /*上面的样式无法解决url类型字段省略号问题*/
1406
+ overflow: hidden;
1407
+ text-overflow: ellipsis;
1408
+ }
1409
+ .steedos-object-table .antd-Crud .antd-Table .antd-Table-content tbody td.whitespace-nowrap.antd-Field--quickEditable > div > div > .antd-Form-static > .antd-Form-control .antd-TplField > span > a {
1410
+ /*上面的样式无法解决附件类型字段省略号问题*/
1411
+ overflow: hidden;
1412
+ text-overflow: ellipsis;
1413
+ }
1414
+ }
1415
+ .antd-Modal .antd-Modal-body {
1416
+ /*lookup字段弹出窗口中各种字段类型的列文字超长时显示省略号*/
1417
+ }
1418
+ .antd-Modal .antd-Modal-body .antd-Crud .antd-Table .antd-Table-content tbody td.whitespace-nowrap > div {
1419
+ /*各种字段类型在不支持快速编辑的单元格中文字超长时显示省略号*/
1420
+ overflow: hidden;
1421
+ text-overflow: ellipsis;
1422
+ }
1423
+ .antd-Modal .antd-Modal-body .antd-Crud .antd-Table .antd-Table-content tbody td.whitespace-nowrap > div > .antd-Form-static {
1424
+ /*上面的样式无法解决url类型字段省略号问题*/
1425
+ overflow: hidden;
1426
+ text-overflow: ellipsis;
1427
+ }
1428
+ .antd-Modal .antd-Modal-body .antd-Crud .antd-Table .antd-Table-content tbody td.whitespace-nowrap > div > .antd-Form-static > .antd-Form-control .antd-TplField > span > a {
1429
+ /*上面的样式无法解决附件类型字段省略号问题*/
1430
+ overflow: hidden;
1431
+ text-overflow: ellipsis;
1432
+ }
1433
+ .antd-Modal .antd-Modal-body .antd-Crud .antd-Table .antd-Table-content tbody td.whitespace-nowrap.antd-Field--quickEditable {
1434
+ /*各种字段类型在支持快速编辑的单元格中文字超长时显示省略号*/
1435
+ }
1436
+ .antd-Modal .antd-Modal-body .antd-Crud .antd-Table .antd-Table-content tbody td.whitespace-nowrap.antd-Field--quickEditable > div > div {
1437
+ /*这里写在第二层div中是因为第一层div是display: flex;无法实现省略号*/
1438
+ overflow: hidden;
1439
+ text-overflow: ellipsis;
1440
+ }
1441
+ .antd-Modal .antd-Modal-body .antd-Crud .antd-Table .antd-Table-content tbody td.whitespace-nowrap.antd-Field--quickEditable > div > div > .antd-Form-static {
1442
+ /*上面的样式无法解决url类型字段省略号问题*/
1443
+ overflow: hidden;
1444
+ text-overflow: ellipsis;
1445
+ }
1446
+ .antd-Modal .antd-Modal-body .antd-Crud .antd-Table .antd-Table-content tbody td.whitespace-nowrap.antd-Field--quickEditable > div > div > .antd-Form-static > .antd-Form-control .antd-TplField > span > a {
1447
+ /*上面的样式无法解决附件类型字段省略号问题*/
1448
+ overflow: hidden;
1449
+ text-overflow: ellipsis;
1450
+ }
1324
1451
 
1325
1452
 
1326
1453
  .steedos-dropdown-button-overlay .ant-dropdown-menu-item {
@@ -1435,6 +1562,9 @@ fieldset.antd-Collapse > legend{
1435
1562
  .steedos-object-form .steedos-markdown .antd-Tabs-pane.is-active {
1436
1563
  display: block;
1437
1564
  }
1565
+ .antd-Select-popover .antd-Select-menu .antd-Select-option .antd-Checkbox--checkbox {
1566
+ white-space: nowrap;
1567
+ }
1438
1568
  .antd-Select-popover .antd-Select-menu .antd-Select-option .antd-Checkbox--checkbox > span {
1439
1569
  vertical-align: text-top;
1440
1570
  }
@@ -1568,22 +1698,17 @@ fieldset.antd-Collapse > legend{
1568
1698
  }
1569
1699
 
1570
1700
  @media (min-width: 767px) {
1571
- .steedos-object-table tbody td.antd-Field--quickEditable div {
1701
+ .steedos-object-table tbody td.antd-Field--quickEditable > div {
1572
1702
  display: flex;
1573
1703
  align-items: center;
1574
1704
  justify-content: space-between;
1575
1705
  }
1576
- .steedos-object-table tbody td.antd-Field--quickEditable div .antd-Field-quickEditBtn {
1706
+ .steedos-object-table tbody td.antd-Field--quickEditable > div .antd-Field-quickEditBtn {
1577
1707
  padding-right: 13px;
1578
1708
  }
1579
- .steedos-object-table tbody td.antd-Field--quickEditable div .antd-Field-quickEditBtn svg {
1709
+ .steedos-object-table tbody td.antd-Field--quickEditable > div .antd-Field-quickEditBtn svg {
1580
1710
  display: none;
1581
1711
  }
1582
- .steedos-object-table tbody td.whitespace-nowrap span.antd-TplField {
1583
- width: 100%;
1584
- overflow: hidden;
1585
- text-overflow: ellipsis;
1586
- }
1587
1712
  .steedos-object-table tbody td.antd-Field--quickEditable:hover div .antd-Field-quickEditBtn {
1588
1713
  padding-right: 0;
1589
1714
  }
@@ -1683,7 +1808,7 @@ fieldset.antd-Collapse > legend{
1683
1808
  .antd-Nav-Menu-overflow-item {
1684
1809
  height: 100% !important;
1685
1810
  }
1686
- .steedos-global-footer .antd-Nav-Menu-light .antd-Nav-Menu-item.antd-Nav-Menu-item-selected {
1811
+ .steedos-global-footer .antd-Nav-Menu-item.antd-Nav-Menu-item-selected {
1687
1812
  background: transparent;
1688
1813
  }
1689
1814
  .steedos-global-footer-popup .antd-Nav-Menu-item-wrap {
@@ -4999,7 +4999,7 @@ const parseSingleExpression$1 = function (func, formData, dataPath, global, user
4999
4999
  * @Author: baozhoutao@steedos.com
5000
5000
  * @Date: 2022-11-01 15:51:00
5001
5001
  * @LastEditors: 殷亮辉 yinlianghui@hotoa.com
5002
- * @LastEditTime: 2023-09-23 11:25:18
5002
+ * @LastEditTime: 2023-09-25 14:53:05
5003
5003
  * @Description:
5004
5004
  */
5005
5005
 
@@ -5078,10 +5078,15 @@ const getSchema$5 = async (uiSchema, ctx) => {
5078
5078
  }, 200);
5079
5079
  `;
5080
5080
  const getSelectedRowsScript = `
5081
+ const isLookup = event.data.isLookup;
5082
+ if(isLookup){
5083
+ // lookup弹出窗口的新建功能不需要支持复制新建
5084
+ return;
5085
+ }
5081
5086
  const uiSchema = event.data.uiSchema;
5082
5087
  const objectName = event.data.objectName;
5083
5088
  const listViewRef = event.context.scoped.getComponentById("listview_" + objectName);
5084
- const selectedItems = listViewRef.props.store.toJSON().selectedItems || [];
5089
+ const selectedItems = listViewRef && listViewRef.props.store.toJSON().selectedItems || [];
5085
5090
  event.data.selectedIds = _.map(selectedItems, uiSchema.idFieldName || '_id');
5086
5091
  `;
5087
5092
  return {
@@ -13385,6 +13390,13 @@ async function getObjectCRUD(objectSchema, fields, options){
13385
13390
  Authorization: "Bearer ${context.tenantId},${context.authToken}",
13386
13391
  },
13387
13392
  requestAdaptor: quickSaveApiRequestAdaptor,
13393
+ adaptor: `
13394
+ if(payload.errors){
13395
+ payload.status = 2;
13396
+ payload.msg = window.t ? window.t(payload.errors[0].message) : payload.errors[0].message;
13397
+ }
13398
+ return payload;
13399
+ `
13388
13400
  },
13389
13401
  rowClassNameExpr: options.rowClassNameExpr
13390
13402
  }, bodyProps);
@@ -13729,7 +13741,7 @@ const getRecordPermissions = async (objectName, recordId)=>{
13729
13741
  * @Author: baozhoutao@steedos.com
13730
13742
  * @Date: 2022-07-05 15:55:39
13731
13743
  * @LastEditors: liaodaxue
13732
- * @LastEditTime: 2023-08-28 14:55:23
13744
+ * @LastEditTime: 2023-09-25 17:18:08
13733
13745
  * @Description:
13734
13746
  */
13735
13747
 
@@ -13905,6 +13917,7 @@ async function getRecordDetailRelatedListSchema(objectName, recordId, relatedObj
13905
13917
  // tableHiddenOn: hiddenEmptyTable ? "this.$count === 0" : null,
13906
13918
  appId: appId,
13907
13919
  crudClassName: 'border-t border-gray-300 hidden',
13920
+ refField,
13908
13921
  ...ctx
13909
13922
  };
13910
13923
  const amisSchema= (await getRelatedListSchema(relatedObjectName, 'all', options)).amisSchema;
@@ -14019,10 +14032,33 @@ async function getRelatedListSchema(
14019
14032
  ctx
14020
14033
  ) {
14021
14034
  const uiSchema = await getUISchema(objectName);
14022
- const listView = uiSchema.list_views;
14035
+ const listView = _$1.find(
14036
+ uiSchema.list_views,
14037
+ (listView, name) => {
14038
+ // 传入listViewName空值则取第一个
14039
+ if(!listViewName){
14040
+ listViewName = name;
14041
+ }
14042
+ return name === listViewName || listView._id === listViewName;
14043
+ }
14044
+ );
14023
14045
  const listViewProps = getRelatedListProps(uiSchema,listViewName, ctx);
14024
14046
  // console.log('listViewProps==>', listViewProps)
14025
14047
  const {columns: listViewColumns, sort: listViewSort, filter: listviewFilter, filtersFunction } = listViewProps;
14048
+
14049
+ const refFieldName = ctx.refField && ctx.refField.name;
14050
+
14051
+ let relatedListColumns = listViewColumns;
14052
+ if(refFieldName){
14053
+ relatedListColumns = listViewColumns.filter(function(columnItem){
14054
+ if(typeof columnItem === "string"){
14055
+ return columnItem !== refFieldName;
14056
+ }
14057
+ else {
14058
+ return columnItem.field !== refFieldName;
14059
+ }
14060
+ });
14061
+ }
14026
14062
 
14027
14063
  const defaults = ctx.defaults || {};
14028
14064
 
@@ -14060,7 +14096,7 @@ async function getRelatedListSchema(
14060
14096
  const amisSchema = {
14061
14097
  "type": "steedos-object-table",
14062
14098
  "objectApiName": objectName,
14063
- "columns": listViewColumns,
14099
+ "columns": relatedListColumns,
14064
14100
  "extraColumns": listView.extra_columns,
14065
14101
  "filters": listviewFilter,
14066
14102
  "filtersFunction": filtersFunction,