@steedos-widgets/amis-lib 1.2.18 → 1.2.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.
package/dist/index.esm.js CHANGED
@@ -2421,15 +2421,15 @@ const getSchema = async (uiSchema, ctx) => {
2421
2421
  let filename = uiSchema.label + "-" + list_views[list_views_name].label;
2422
2422
 
2423
2423
  url_tmp = api.url.split('?')[0];
2424
- api.url = url_tmp + "?$select=" + select.toString() + "&filename=" + filename;
2424
+ api.url = url_tmp + "?$select=" + encodeURIComponent(select.toString()) + "&filename=" + encodeURIComponent(filename);
2425
2425
 
2426
2426
  // 判断sort 和 filters
2427
2427
  if (sort.length > 0) {
2428
- api.url += "&$orderby=" + order;
2428
+ api.url += "&$orderby=" + encodeURIComponent(order);
2429
2429
  }
2430
2430
  let filters = list_views[list_views_name].filters;
2431
2431
  if (filters && filters.length > 0) {
2432
- api.url = api.url + "&filters=" + JSON.stringify(filters);
2432
+ api.url = api.url + "&filters=" + encodeURIComponent(JSON.stringify(filters));
2433
2433
  }
2434
2434
  return api;
2435
2435
  `;
@@ -4108,97 +4108,6 @@ async function getObjectRecordDetailRelatedListHeader(relatedObjectSchema, relat
4108
4108
  async function getObjectRelatedListHeader(objectSchema, recordId, relatedObjectName) {
4109
4109
  }
4110
4110
 
4111
- const getExportExcelToolbarButtonSchema = ()=>{
4112
- return {
4113
- "type": "button",
4114
- "icon": "fa fa-download",
4115
- "align": "right",
4116
- "className": "bg-white p-2 rounded border-gray-300 text-gray-500",
4117
- "tooltipPlacement": "bottom",
4118
- "visibleOn": "${!isLookup && global.user.is_space_admin}",
4119
- "tooltip": i18next.t('frontend_export_excel'),
4120
- "onEvent": {
4121
- "click": {
4122
- "weight": 0,
4123
- "actions": [
4124
- {
4125
- "args": {
4126
- "api": {
4127
- "url": "${context.rootUrl}/api/record/export/${objectName}",
4128
- "method": "get",
4129
- "messages": {},
4130
- "requestAdaptor": `${requestAdaptor$1()}`,
4131
- "data": {
4132
- "uiSchema": "${uiSchema}",
4133
- "listName": "${listName}"
4134
- },
4135
- "headers": {
4136
- "Authorization": "Bearer ${context.tenantId},${context.authToken}"
4137
- }
4138
- }
4139
- },
4140
- "actionType": "download"
4141
- }
4142
- ]
4143
- }
4144
- }
4145
- }
4146
- };
4147
-
4148
- function requestAdaptor$1(){
4149
- return `
4150
- // 获取列表视图的属性
4151
- let uiSchema = api.body.uiSchema;
4152
- let list_views = uiSchema.list_views;
4153
- let list_views_name = api.body.listName;
4154
- let col = list_views[list_views_name].columns;
4155
- let sort_test = list_views[list_views_name].sort;
4156
-
4157
- // 获取下载字段
4158
- let select = [];
4159
- _.each(col, (col) => {
4160
- if (col.field == undefined)
4161
- select.push(col);
4162
- else select.push(col.field);
4163
- });
4164
-
4165
- // 获取排序字段
4166
-
4167
- let sort = [];
4168
- _.forEach(sort_test, (sortField) => {
4169
- if (sortField.field_name == undefined)
4170
- sort.push(sortField);
4171
- else sort.push([sortField.field_name, sortField.order]);
4172
- })
4173
-
4174
- let orders = [];
4175
- _.map(sort, (value) => {
4176
- let order_tmp = [];
4177
- if (value[1] == "desc")
4178
- order_tmp = value[0] + ' desc';
4179
- else
4180
- order_tmp = value[0];
4181
- orders.push(order_tmp);
4182
- });
4183
- let order = orders.join(',');
4184
-
4185
- let filename = uiSchema.label + "-" + list_views[list_views_name].label;
4186
-
4187
- url_tmp = api.url.split('?')[0];
4188
- api.url = url_tmp + "?$select=" + select.toString() + "&filename=" + filename;
4189
-
4190
- // 判断sort 和 filters
4191
- if (sort.length > 0) {
4192
- api.url += "&$orderby=" + order;
4193
- }
4194
- let filters = list_views[list_views_name].filters;
4195
- if (filters && filters.length > 0) {
4196
- api.url = api.url + "&filters=" + JSON.stringify(filters);
4197
- }
4198
- return api;
4199
- `
4200
- }
4201
-
4202
4111
  const getNewListviewButtonSchema = ()=>{
4203
4112
  return {
4204
4113
  "type": "button",
@@ -5288,7 +5197,7 @@ function getObjectHeaderToolbar(mainObject, formFactor, {showDisplayAs = false,
5288
5197
  "tooltipPlacement": "bottom",
5289
5198
  "className": "bg-white p-2 rounded border-gray-300 text-gray-500"
5290
5199
  },
5291
- getExportExcelToolbarButtonSchema(),
5200
+ // getExportExcelToolbarButtonSchema(),
5292
5201
  filterVisible ? {
5293
5202
  "label": "",
5294
5203
  "icon": "fa fa-search",
@@ -7662,7 +7571,10 @@ async function getMobileTableColumns(fields, options){
7662
7571
  level: "link",
7663
7572
  actionType: "link",
7664
7573
  link: url,
7665
- innerClassName: "steedos-listview-item block text-gray-500",
7574
+ innerClassName: {
7575
+ "steedos-listview-item block text-gray-500":"true",
7576
+ "max-w-[360px]": "${display == 'split'}",
7577
+ },
7666
7578
  body: {
7667
7579
  "type": "wrapper",
7668
7580
  "body": columnLines,