@steedos-widgets/amis-object 3.6.2-beta.18 → 3.6.2-beta.19

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.
@@ -361,6 +361,10 @@ fieldset.antd-Collapse > legend{
361
361
  .antd-Table-footToolbar {
362
362
  background: white;
363
363
  }
364
+
365
+ .antd-Tabs-linksWrapper {
366
+ border-right: var(--Table-borderWidth) solid var(--Table-borderColor)
367
+ }
364
368
  .ant-dropdown{
365
369
  z-index: 1400;
366
370
  }
@@ -711,9 +715,6 @@ fieldset.antd-Collapse > legend{
711
715
  .w-4 {
712
716
  width: 1rem
713
717
  }
714
- .w-40 {
715
- width: 10rem
716
- }
717
718
  .w-6 {
718
719
  width: 1.5rem
719
720
  }
@@ -876,6 +877,9 @@ fieldset.antd-Collapse > legend{
876
877
  .rounded-xl {
877
878
  border-radius: 0.75rem
878
879
  }
880
+ .border {
881
+ border-width: 1px
882
+ }
879
883
  .border-0 {
880
884
  border-width: 0px
881
885
  }
@@ -886,12 +890,12 @@ fieldset.antd-Collapse > legend{
886
890
  .border-b {
887
891
  border-bottom-width: 1px
888
892
  }
889
- .border-b-0 {
890
- border-bottom-width: 0px
891
- }
892
893
  .border-b-\[3px\] {
893
894
  border-bottom-width: 3px
894
895
  }
896
+ .border-l {
897
+ border-left-width: 1px
898
+ }
895
899
  .border-r {
896
900
  border-right-width: 1px
897
901
  }
@@ -970,6 +974,10 @@ fieldset.antd-Collapse > legend{
970
974
  padding-left: 0.5rem;
971
975
  padding-right: 0.5rem
972
976
  }
977
+ .px-3 {
978
+ padding-left: 0.75rem;
979
+ padding-right: 0.75rem
980
+ }
973
981
  .px-4 {
974
982
  padding-left: 1rem;
975
983
  padding-right: 1rem
@@ -1170,11 +1178,8 @@ fieldset.antd-Collapse > legend{
1170
1178
  .ease-in-out {
1171
1179
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1)
1172
1180
  }
1173
- .first\:pt-0:first-child {
1174
- padding-top: 0px
1175
- }
1176
- .last\:border-b-0:last-child {
1177
- border-bottom-width: 0px
1181
+ .last\:mb-0:last-child {
1182
+ margin-bottom: 0px
1178
1183
  }
1179
1184
  .hover\:bg-sky-50:hover {
1180
1185
  --tw-bg-opacity: 1;
@@ -5308,7 +5308,7 @@ async function getTableColumns$1(fields, options){
5308
5308
  const previewFileScript = `
5309
5309
  var data = event.data;
5310
5310
  var file_name = data.versions ? data.name : "${field.label}";
5311
- var file_id = data._id;
5311
+ var file_id = data.versions && data.versions[0] && data.versions[0]._id;
5312
5312
  window.previewFile && window.previewFile({file_name, file_id});
5313
5313
  `;
5314
5314
  columnItem = {
@@ -6157,7 +6157,13 @@ async function getTableApi(mainObject, fields, options){
6157
6157
  value = [value]
6158
6158
  };
6159
6159
  if(field.type === 'file'){
6160
- item[key] = value
6160
+ // item[key] = value
6161
+ // PC客户端附件子表列表点击标题预览附件功能依赖了_id,所以这里拼出来
6162
+ let itemKeyValue = item[key];
6163
+ item[key] = value.map(function(item, index){
6164
+ item._id = itemKeyValue[index];
6165
+ return item;
6166
+ });
6161
6167
  }else{
6162
6168
  item[key] = _.map(value, (item)=>{
6163
6169
  if(field.type === 'image'){
@@ -10111,7 +10117,7 @@ async function getObjectRecordDetailRelatedListHeader(relatedObjectSchema, relat
10111
10117
  "className": "flex justify-between"
10112
10118
  }
10113
10119
  ],
10114
- "className": "steedos-record-related-header py-2 px-0"
10120
+ "className": "steedos-record-related-header py-2 px-3 bg-gray-50 border"
10115
10121
  };
10116
10122
  return recordRelatedListHeader;
10117
10123
  }
@@ -12410,7 +12416,7 @@ async function getRecordDetailRelatedListSchema(objectName, recordId, relatedObj
12410
12416
  setDataToComponentId: componentId,
12411
12417
  // tableHiddenOn: hiddenEmptyTable ? "this.$count === 0" : null,
12412
12418
  appId: appId,
12413
- crudClassName: 'steedos-record-related-crud hidden',
12419
+ crudClassName: 'steedos-record-related-crud border-l border-r hidden',
12414
12420
  refField,
12415
12421
  ...ctx
12416
12422
  };
@@ -12423,7 +12429,7 @@ async function getRecordDetailRelatedListSchema(objectName, recordId, relatedObj
12423
12429
  amisSchema: {
12424
12430
  type: "service",
12425
12431
  id: componentId,
12426
- className: `steedos-record-related-list py-2 first:pt-0 border-b-0 last:border-b-0 ${componentId} ${className}`,
12432
+ className: `steedos-record-related-list mb-4 last:mb-0 ${componentId} ${className}`,
12427
12433
  data: {
12428
12434
  relatedKey: relatedKey,
12429
12435
  listViewId: `amis-\${appId}-${relatedObjectName}-listview`,
@@ -13169,7 +13175,7 @@ async function getRecordDetailSchema(objectName, appId, props = {}){
13169
13175
  };
13170
13176
  const content = {
13171
13177
  "type": "tabs",
13172
- "className": "steedos-record-tabs bg-white p-4 m-0 border-b",
13178
+ "className": "steedos-record-tabs bg-white p-4 mt-3 border-y",
13173
13179
  "contentClassName": "bg-none",
13174
13180
  "tabs": [
13175
13181
  detailed
@@ -22070,7 +22076,7 @@ var AmisGlobalFooter = function (props) { return __awaiter(void 0, void 0, void
22070
22076
  * @Author: baozhoutao@steedos.com
22071
22077
  * @Date: 2022-09-01 14:44:57
22072
22078
  * @LastEditors: baozhoutao@steedos.com
22073
- * @LastEditTime: 2024-01-29 10:58:34
22079
+ * @LastEditTime: 2024-01-31 14:43:14
22074
22080
  * @Description:
22075
22081
  */
22076
22082
  var AmisGlobalHeaderToolbar = function (props) { return __awaiter(void 0, void 0, void 0, function () {
@@ -22118,122 +22124,108 @@ var AmisGlobalHeaderToolbar = function (props) { return __awaiter(void 0, void 0
22118
22124
  "label": instance.t('frontend_help')
22119
22125
  },
22120
22126
  {
22121
- "type": "steedos-dropdown",
22122
- "placement": "bottomRight",
22123
- "trigger": [
22124
- "click"
22125
- ],
22126
- "body": [
22127
- {
22128
- "type": "steedos-icon",
22129
- "category": "utility",
22130
- "name": "setup",
22131
- "colorVariant": "default",
22132
- "id": "u:793a86f8a9e4",
22133
- "className": "slds-button_icon slds-global-header__icon"
22134
- }
22135
- ],
22136
- "overlay": [
22127
+ "type": "dropdown-button",
22128
+ "label": false,
22129
+ "trigger": "click",
22130
+ "level": "link",
22131
+ "btnClassName": "p-0 m-0",
22132
+ "icon": "fa fa-cog text-xl slds-button_icon m-0",
22133
+ "align": "right",
22134
+ "hideCaret": true,
22135
+ "buttons": [
22137
22136
  {
22138
- "type": "wrapper",
22139
- "className": "p-0 w-40",
22140
- "body": [
22141
- {
22142
- "type": "button",
22143
- "hiddenOn": "window.innerWidth < 768",
22144
- "onEvent": {
22145
- "click": {
22146
- "actions": [
22147
- {
22148
- "args": {
22149
- "url": "/app/admin"
22150
- },
22151
- "actionType": "url"
22152
- }
22153
- ]
22137
+ "type": "button",
22138
+ "hiddenOn": "window.innerWidth < 768",
22139
+ "onEvent": {
22140
+ "click": {
22141
+ "actions": [
22142
+ {
22143
+ "args": {
22144
+ "url": "/app/admin"
22145
+ },
22146
+ "actionType": "url"
22154
22147
  }
22155
- },
22156
- "id": "u:b5d0ab3a32b5",
22157
- "level": "link",
22158
- "label": instance.t('frontend_setup')
22159
- },
22160
- {
22161
- "type": "divider",
22162
- "className": "m-0",
22163
- "visibleOn": "${window:Meteor.settings.public.enable_saas != true && global.user.is_space_admin == true}"
22164
- },
22165
- {
22166
- "type": "button",
22167
- "label": "编辑对象",
22168
- "className": "flex",
22169
- "onEvent": {
22170
- "click": {
22171
- "actions": [
22172
- {
22173
- "actionType": "ajax",
22174
- "outputVar": "responseResult",
22175
- "args": {
22176
- "api": {
22177
- "url": "/api/v1/objects/search",
22178
- "data": {
22179
- "filters": ["name", "=", "${window:FlowRouter|routerParams|pick:object_name}"],
22180
- "fields": ["_id"]
22181
- },
22182
- "method": "post",
22183
- "messages": {}
22184
- }
22185
- }
22186
- },
22187
- {
22188
- "args": {
22189
- "url": "/app/admin/objects/view/${responseResult.items[0]._id}",
22148
+ ]
22149
+ }
22150
+ },
22151
+ "id": "u:b5d0ab3a32b5",
22152
+ "level": "link",
22153
+ "label": instance.t('frontend_setup')
22154
+ },
22155
+ // {
22156
+ // "type": "divider",
22157
+ // "className": "m-0",
22158
+ // "visibleOn": "${window:Meteor.settings.public.enable_saas != true && global.user.is_space_admin == true}"
22159
+ // },
22160
+ {
22161
+ "type": "button",
22162
+ "label": "编辑对象",
22163
+ "className": "flex",
22164
+ "onEvent": {
22165
+ "click": {
22166
+ "actions": [
22167
+ {
22168
+ "actionType": "ajax",
22169
+ "outputVar": "responseResult",
22170
+ "args": {
22171
+ "api": {
22172
+ "url": "/api/v1/objects/search",
22173
+ "data": {
22174
+ "filters": ["name", "=", "${window:FlowRouter|routerParams|pick:object_name}"],
22175
+ "fields": ["_id"]
22190
22176
  },
22191
- "actionType": "url"
22177
+ "method": "post",
22178
+ "messages": {}
22192
22179
  }
22193
- ]
22180
+ }
22181
+ },
22182
+ {
22183
+ "args": {
22184
+ "url": "/app/admin/objects/view/${responseResult.items[0]._id}",
22185
+ },
22186
+ "actionType": "url"
22194
22187
  }
22195
- },
22196
- "level": "link",
22197
- "visibleOn": "${window:Meteor.settings.public.enable_saas != true && global.user.is_space_admin == true && window:FlowRouter|isObjectRouter}"
22198
- },
22199
- {
22200
- "type": "button",
22201
- "label": "编辑页面",
22202
- "className": "flex",
22203
- "onEvent": {
22204
- "click": {
22205
- "actions": [
22206
- {
22207
- "actionType": "ajax",
22208
- "outputVar": "responseResult",
22209
- "args": {
22210
- "api": {
22211
- "url": "/api/v1/pages/search",
22212
- "data": {
22213
- "filters": ["name", "=", "${window:FlowRouter|routerParams|pick:page_id}"],
22214
- "fields": ["_id"]
22215
- },
22216
- "method": "post",
22217
- "messages": {}
22218
- }
22219
- }
22220
- },
22221
- {
22222
- "args": {
22223
- "url": "/app/admin/pages/view/${responseResult.items[0]._id}"
22188
+ ]
22189
+ }
22190
+ },
22191
+ "level": "link",
22192
+ "visibleOn": "${window:Meteor.settings.public.enable_saas != true && global.user.is_space_admin == true && window:FlowRouter|isObjectRouter}"
22193
+ },
22194
+ {
22195
+ "type": "button",
22196
+ "label": "编辑页面",
22197
+ "className": "flex",
22198
+ "onEvent": {
22199
+ "click": {
22200
+ "actions": [
22201
+ {
22202
+ "actionType": "ajax",
22203
+ "outputVar": "responseResult",
22204
+ "args": {
22205
+ "api": {
22206
+ "url": "/api/v1/pages/search",
22207
+ "data": {
22208
+ "filters": ["name", "=", "${window:FlowRouter|routerParams|pick:page_id}"],
22209
+ "fields": ["_id"]
22224
22210
  },
22225
- "actionType": "url"
22211
+ "method": "post",
22212
+ "messages": {}
22226
22213
  }
22227
- ]
22214
+ }
22215
+ },
22216
+ {
22217
+ "args": {
22218
+ "url": "/app/admin/pages/view/${responseResult.items[0]._id}"
22219
+ },
22220
+ "actionType": "url"
22228
22221
  }
22229
- },
22230
- "level": "link",
22231
- "visibleOn": "${window:Meteor.settings.public.enable_saas != true && global.user.is_space_admin == true && window:FlowRouter|isPageRouter}"
22222
+ ]
22232
22223
  }
22233
- ],
22224
+ },
22225
+ "level": "link",
22226
+ "visibleOn": "${window:Meteor.settings.public.enable_saas != true && global.user.is_space_admin == true && window:FlowRouter|isPageRouter}"
22234
22227
  }
22235
- ],
22236
- "className": "antd-Action"
22228
+ ]
22237
22229
  },
22238
22230
  {
22239
22231
  "type": "steedos-dropdown",