@steedos-widgets/amis-object 3.6.4-beta.8 → 3.6.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.
@@ -20,6 +20,7 @@ export declare const AmisInputTable: (props: any) => Promise<{
20
20
  pipeOut: (value: any, data: any) => any;
21
21
  }[];
22
22
  id: string;
23
+ className: string;
23
24
  };
24
25
  label: any;
25
26
  labelClassName: any;
@@ -431,6 +431,11 @@ fieldset.antd-Collapse > legend{
431
431
  .antd-Transfer.antd-TabsTransfer .antd-GroupedSelection-item label.antd-Checkbox {
432
432
  position: relative;
433
433
  }
434
+
435
+ /* input-table表头不要分隔线,统一风格 */
436
+ .antd-InputTable .antd-Table-table > thead > tr > th:not(:last-child) {
437
+ border-right: none;
438
+ }
434
439
  .ant-dropdown{
435
440
  z-index: 1400;
436
441
  }
@@ -686,9 +691,6 @@ fieldset.antd-Collapse > legend{
686
691
  .mt-2 {
687
692
  margin-top: 0.5rem
688
693
  }
689
- .mt-3 {
690
- margin-top: 0.75rem
691
- }
692
694
  .mt-\[50px\] {
693
695
  margin-top: 50px
694
696
  }
@@ -797,9 +799,6 @@ fieldset.antd-Collapse > legend{
797
799
  .w-8 {
798
800
  width: 2rem
799
801
  }
800
- .w-80 {
801
- width: 20rem
802
- }
803
802
  .w-96 {
804
803
  width: 24rem
805
804
  }
@@ -2651,9 +2650,6 @@ body.sidebar #sidebar {
2651
2650
  .steedos-input-table .steedos-delete-button:hover {
2652
2651
  color: rgb(239 68 68) !important;
2653
2652
  }
2654
- .steedos-input-table .antd-DropDown-popover .antd-PopOver-overlay {
2655
- display: none;
2656
- }
2657
2653
  .steedos-input-table .antd-Table-table .antd-Table-placeholder {
2658
2654
  display: none;
2659
2655
  }
@@ -2671,6 +2667,9 @@ body.sidebar #sidebar {
2671
2667
  .steedos-input-table.steedos-show-index tbody tr td:nth-child(1) {
2672
2668
  text-align: center;
2673
2669
  }
2670
+ .steedos-input-table.steedos-show-index thead tr th:nth-child(1) .antd-TableCell--title {
2671
+ visibility: hidden;
2672
+ }
2674
2673
  .steedos-input-table .antd-OperationField {
2675
2674
  width: 50px;
2676
2675
  }
@@ -15149,6 +15149,8 @@ async function lookupToAmis(field, readonly, ctx){
15149
15149
  const autoFill = await getAutoFill(field);
15150
15150
  if(autoFill){
15151
15151
  amisSchema.autoFill = autoFill;
15152
+ // 这里不配置initAutoFill值,按amis规则initAutoFill默认值为fillIfNotSet处理--需要amis sdk 版本 > 3.6.3-patch.6(不包括)版本
15153
+ // amisSchema.initAutoFill = false;
15152
15154
  }
15153
15155
  return amisSchema;
15154
15156
  }
@@ -17944,48 +17946,38 @@ async function getButtonView(props) {
17944
17946
 
17945
17947
  async function getButtonDelete(props) {
17946
17948
  return {
17947
- "type": "dropdown-button",
17949
+ "type": "button",
17948
17950
  "level": "link",
17949
- "btnClassName": "text-gray-400 steedos-delete-button",
17951
+ "className": "text-gray-400 steedos-delete-button",
17950
17952
  "icon": "fa fa-trash-alt",
17951
- "size": "xs",
17952
- "hideCaret": true,
17953
- "closeOnClick": true,
17954
- "body": [
17955
- {
17956
- "type": "wrapper",
17957
- "size": "md",
17958
- "className": "w-80",
17959
- "body": [
17960
- {
17961
- "tpl": "确定要删除吗?",
17962
- "type": "tpl"
17953
+ "actionType": "dialog",
17954
+ "dialog": {
17955
+ "title": "系统信息",
17956
+ "actions": [
17957
+ {
17958
+ "type": "button",
17959
+ "label": "取消",
17960
+ "close": true
17961
+ },
17962
+ {
17963
+ "type": "button",
17964
+ "label": "删除",
17965
+ "level": "danger",
17966
+ "onEvent": {
17967
+ "click": {
17968
+ "actions": await getButtonActions(props, "delete")
17969
+ }
17963
17970
  },
17964
- {
17965
- "type": "flex",
17966
- "justify": "flex-end",
17967
- "className": "mt-3",
17968
- "items": [
17969
- {
17970
- "type": "button",
17971
- "label": "取消",
17972
- "className": "mr-2"
17973
- },
17974
- {
17975
- "type": "button",
17976
- "label": "删除",
17977
- "level": "danger",
17978
- "onEvent": {
17979
- "click": {
17980
- "actions": await getButtonActions(props, "delete")
17981
- }
17982
- }
17983
- }
17984
- ]
17985
- }
17986
- ]
17987
- }
17988
- ]
17971
+ "close": true
17972
+ }
17973
+ ],
17974
+ "body": [
17975
+ {
17976
+ "tpl": "确定要删除吗?",
17977
+ "type": "tpl"
17978
+ }
17979
+ ]
17980
+ }
17989
17981
  }
17990
17982
  }
17991
17983
 
@@ -18188,7 +18180,8 @@ const getAmisInputTableSchema = async (props) => {
18188
18180
  "body": {
18189
18181
  "type": "service",
18190
18182
  "body": schemaBody,
18191
- "id": serviceId
18183
+ "id": serviceId,
18184
+ "className": "w-full",
18192
18185
  },
18193
18186
  "label": props.label,
18194
18187
  "labelClassName": props.label ? props.labelClassName : "none",
@@ -23640,7 +23633,7 @@ var AmisSteedosField = function (props) { return __awaiter(void 0, void 0, void
23640
23633
  static: true,
23641
23634
  label: steedosField.label
23642
23635
  });
23643
- if (!(steedosField.type === "time")) return [3 /*break*/, 10];
23636
+ if (!(steedosField.type === "time" || steedosField.type === "input-time-range")) return [3 /*break*/, 10];
23644
23637
  Object.assign(schema, {
23645
23638
  inputFormat: 'HH:mm',
23646
23639
  timeFormat: 'HH:mm',
@@ -23677,7 +23670,8 @@ var AmisSteedosField = function (props) { return __awaiter(void 0, void 0, void
23677
23670
  if (!(steedosField.type === "number" || steedosField.type === 'currency')) return [3 /*break*/, 15];
23678
23671
  // amis input-number和number组件中的precision表示小数位数,并不是魔方平台的精度概念,要转换下,否则小数点后会显示很多的0
23679
23672
  Object.assign(schema, {
23680
- "precision": steedosField.scale || 0
23673
+ "precision": steedosField.scale || 0,
23674
+ "kilobitSeparator": steedosField.enable_thousands //识别enable_thousands,控制千分位分隔符
23681
23675
  });
23682
23676
  return [3 /*break*/, 20];
23683
23677
  case 15:
@@ -23797,6 +23791,24 @@ var AmisSteedosField = function (props) { return __awaiter(void 0, void 0, void
23797
23791
  }
23798
23792
  });
23799
23793
  }
23794
+ else if (steedosField.type === 'input-date-range' || steedosField.type === 'date') {
23795
+ Object.assign(schema, {
23796
+ inputFormat: "YYYY-MM-DD",
23797
+ format: 'YYYY-MM-DDT00:00:00.000[Z]'
23798
+ });
23799
+ }
23800
+ else if (steedosField.type === 'input-datetime-range' || steedosField.type === 'datetime') {
23801
+ Object.assign(schema, {
23802
+ inputFormat: "YYYY-MM-DD HH:mm",
23803
+ format: 'YYYY-MM-DDTHH:mm:ss.SSSZ'
23804
+ });
23805
+ }
23806
+ else if (steedosField.type === 'toggle') {
23807
+ Object.assign(schema, {
23808
+ static: false,
23809
+ disabled: true
23810
+ });
23811
+ }
23800
23812
  _o.label = 20;
23801
23813
  case 20:
23802
23814
  Object.assign(schema, steedosField.amis || {});
@@ -24124,6 +24136,11 @@ var AmisInputTable = function (props) { return __awaiter(void 0, void 0, void 0,
24124
24136
  if (props.enableDialog === false) {
24125
24137
  extendProps["inlineEditMode"] = true;
24126
24138
  }
24139
+ //showIndex默认为true
24140
+ extendProps["showIndex"] = true;
24141
+ if (props.showIndex == false || props.enableTree == true) {
24142
+ extendProps["showIndex"] = false;
24143
+ }
24127
24144
  return [4 /*yield*/, getAmisInputTableSchema(Object.assign({}, props, extendProps))];
24128
24145
  case 1:
24129
24146
  amisSchema = _a.sent();