@steedos-widgets/sortable 3.6.3-beta.1 → 3.6.4-beta.1
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 +5 -5
- package/dist/sortable.cjs.js +92 -29
- package/dist/sortable.cjs.js.map +1 -1
- package/dist/sortable.esm.js +92 -29
- package/dist/sortable.esm.js.map +1 -1
- package/dist/sortable.umd.js +92 -29
- package/package.json +3 -3
package/dist/sortable.esm.js
CHANGED
|
@@ -54141,7 +54141,11 @@ function getNameTpl(field, ctx){
|
|
|
54141
54141
|
if(ctx && ctx.isLookup){
|
|
54142
54142
|
linkTarget = "target='_blank'";
|
|
54143
54143
|
}
|
|
54144
|
-
|
|
54144
|
+
if(ctx.isRelated){
|
|
54145
|
+
return `<a href="${href}" ${linkTarget} onclick="return false;">\${${field.name} | raw}</a>`
|
|
54146
|
+
}else {
|
|
54147
|
+
return `<a href="${href}" ${linkTarget}>\${${field.name} | raw}</a>`
|
|
54148
|
+
}
|
|
54145
54149
|
}
|
|
54146
54150
|
|
|
54147
54151
|
function getRelatedFieldTpl(field, ctx){
|
|
@@ -54170,6 +54174,9 @@ function getRelatedFieldTpl(field, ctx){
|
|
|
54170
54174
|
if(_.isString(field.reference_to) || !field.reference_to){
|
|
54171
54175
|
if(field.multiple){
|
|
54172
54176
|
let labelTpl = `<%=item.label%>`;
|
|
54177
|
+
if(ctx.isRelated){
|
|
54178
|
+
linkTarget = "target='_blank'";
|
|
54179
|
+
}
|
|
54173
54180
|
if(!onlyDisplayLookLabel){
|
|
54174
54181
|
const href = Router.getObjectDetailPath({
|
|
54175
54182
|
formFactor: ctx.formFactor, appId: "<%=data.appId%>", objectName: `<%=item.objectName%>`, recordId: `<%=item.value%>`, _templateType: "JavaScript"
|
|
@@ -54192,7 +54199,12 @@ function getRelatedFieldTpl(field, ctx){
|
|
|
54192
54199
|
const href = Router.getObjectDetailPath({
|
|
54193
54200
|
formFactor: ctx.formFactor, appId: "${appId}", objectName: `${objectNameTpl}`, recordId: `${recordIdTpl}`
|
|
54194
54201
|
});
|
|
54195
|
-
|
|
54202
|
+
if(ctx.isRelated){
|
|
54203
|
+
labelTpl = `<a href="${href}" ${linkTarget} onclick="return false;">${labelTpl}</a>`;
|
|
54204
|
+
}else {
|
|
54205
|
+
labelTpl = `<a href="${href}" ${linkTarget}>${labelTpl}</a>`;
|
|
54206
|
+
}
|
|
54207
|
+
|
|
54196
54208
|
}
|
|
54197
54209
|
tpl = labelTpl;
|
|
54198
54210
|
}
|
|
@@ -54307,27 +54319,29 @@ async function getFieldsTemplate(fields, display){
|
|
|
54307
54319
|
fieldsArr = lodash.exports.values(fields);
|
|
54308
54320
|
}
|
|
54309
54321
|
for (const field of fieldsArr) {
|
|
54310
|
-
|
|
54311
|
-
|
|
54312
|
-
|
|
54313
|
-
|
|
54314
|
-
|
|
54315
|
-
if(
|
|
54316
|
-
|
|
54317
|
-
|
|
54322
|
+
if(field.name){
|
|
54323
|
+
//graphql 的 ui\display 中使用的字段需要先在query中查询. 否则会返回null
|
|
54324
|
+
if(field.expand){
|
|
54325
|
+
expandFields.push(field);
|
|
54326
|
+
}else {
|
|
54327
|
+
if(field.name.indexOf('.') < 0){
|
|
54328
|
+
if(display && (field.type == 'lookup' || field.type == 'master_detail')){
|
|
54329
|
+
fieldsName.push(`${field.name}`);
|
|
54330
|
+
displayFields.push(`${field.name}`);
|
|
54331
|
+
}else {
|
|
54332
|
+
fieldsName.push( field.alias ? `${field.alias}:${field.name}` : field.name);
|
|
54333
|
+
}
|
|
54334
|
+
if(lodash.exports.includes(['time','date','datetime','boolean','number','currency'], field.type)){
|
|
54335
|
+
fieldsName.push(`${field.name}`);
|
|
54336
|
+
}
|
|
54337
|
+
if(lodash.exports.includes(['percent','time','filesize','date','datetime','boolean','number','currency', 'select', 'file', 'image', 'avatar', 'formula', 'summary', 'object', 'grid'], field.type)){
|
|
54338
|
+
displayFields.push(`${field.name}`);
|
|
54339
|
+
}
|
|
54318
54340
|
}else {
|
|
54319
|
-
|
|
54320
|
-
|
|
54321
|
-
|
|
54322
|
-
fieldsName.push(`${field.name}`);
|
|
54341
|
+
objectFieldName = field.name.split('.')[0];
|
|
54342
|
+
fieldsName.push(objectFieldName);
|
|
54343
|
+
displayFields.push(objectFieldName);
|
|
54323
54344
|
}
|
|
54324
|
-
if(lodash.exports.includes(['percent','time','filesize','date','datetime','boolean','number','currency', 'select', 'file', 'image', 'avatar', 'formula', 'summary', 'object', 'grid'], field.type)){
|
|
54325
|
-
displayFields.push(`${field.name}`);
|
|
54326
|
-
}
|
|
54327
|
-
}else {
|
|
54328
|
-
objectFieldName = field.name.split('.')[0];
|
|
54329
|
-
fieldsName.push(objectFieldName);
|
|
54330
|
-
displayFields.push(objectFieldName);
|
|
54331
54345
|
}
|
|
54332
54346
|
}
|
|
54333
54347
|
}
|
|
@@ -55609,6 +55623,54 @@ async function getTableColumns(fields, options){
|
|
|
55609
55623
|
columnItem.type = 'color';
|
|
55610
55624
|
columnItem.defaultColor = null;
|
|
55611
55625
|
}
|
|
55626
|
+
|
|
55627
|
+
if(((field.is_name || field.name === options.labelFieldName) || ((field.type == 'lookup' || field.type == 'master_detail') && lodash.exports.isString(field.reference_to) && field.multiple != true)) && options.isRelated){
|
|
55628
|
+
|
|
55629
|
+
const drawerRecordDetailSchema = {
|
|
55630
|
+
"type": "steedos-record-detail",
|
|
55631
|
+
"objectApiName": "${objectName}",
|
|
55632
|
+
"recordId": `\${${options.idFieldName}}`,
|
|
55633
|
+
"showBackButton": false,
|
|
55634
|
+
"showButtons": true,
|
|
55635
|
+
"data": {
|
|
55636
|
+
"_inDrawer": true, // 用于判断是否在抽屉中
|
|
55637
|
+
"recordLoaded": false, // 重置数据加载状态
|
|
55638
|
+
}
|
|
55639
|
+
};
|
|
55640
|
+
|
|
55641
|
+
|
|
55642
|
+
if(!(field.is_name || field.name === options.labelFieldName)){
|
|
55643
|
+
drawerRecordDetailSchema.objectApiName = field.reference_to;
|
|
55644
|
+
drawerRecordDetailSchema.recordId = `\${_display.${field.name}.value}`;
|
|
55645
|
+
}
|
|
55646
|
+
|
|
55647
|
+
columnItem.onEvent = {
|
|
55648
|
+
"click": {
|
|
55649
|
+
"actions": [
|
|
55650
|
+
{
|
|
55651
|
+
"actionType": "drawer",
|
|
55652
|
+
"drawer": {
|
|
55653
|
+
"type": "drawer",
|
|
55654
|
+
"title": " ",
|
|
55655
|
+
"headerClassName": "",
|
|
55656
|
+
"size": "lg",
|
|
55657
|
+
"bodyClassName": "p-0 m-0 border-t",
|
|
55658
|
+
"closeOnEsc": true,
|
|
55659
|
+
"resizable": true,
|
|
55660
|
+
"actions": [],
|
|
55661
|
+
"body": [
|
|
55662
|
+
drawerRecordDetailSchema
|
|
55663
|
+
],
|
|
55664
|
+
"className": "app-popover",
|
|
55665
|
+
"id": "u:fc5f055afa8c"
|
|
55666
|
+
},
|
|
55667
|
+
"preventDefault": true
|
|
55668
|
+
}
|
|
55669
|
+
]
|
|
55670
|
+
}
|
|
55671
|
+
};
|
|
55672
|
+
}
|
|
55673
|
+
|
|
55612
55674
|
}
|
|
55613
55675
|
}
|
|
55614
55676
|
if(columnItem){
|
|
@@ -56258,8 +56320,8 @@ async function getListSchema$1(fields, options){
|
|
|
56258
56320
|
/*
|
|
56259
56321
|
* @Author: baozhoutao@steedos.com
|
|
56260
56322
|
* @Date: 2022-11-01 15:51:00
|
|
56261
|
-
* @LastEditors:
|
|
56262
|
-
* @LastEditTime:
|
|
56323
|
+
* @LastEditors: baozhoutao@steedos.com
|
|
56324
|
+
* @LastEditTime: 2024-02-18 18:37:35
|
|
56263
56325
|
* @Description:
|
|
56264
56326
|
*/
|
|
56265
56327
|
|
|
@@ -56299,13 +56361,13 @@ const getSchema$5 = async (uiSchema, ctx) => {
|
|
|
56299
56361
|
const recordId = _master.recordId;
|
|
56300
56362
|
let relatedKeySaveValue = recordId;
|
|
56301
56363
|
const relatedField = fields[relatedKey];
|
|
56302
|
-
if(relatedField.reference_to_field && relatedField.reference_to_field !== '_id'){
|
|
56364
|
+
if(relatedField && relatedField.reference_to_field && relatedField.reference_to_field !== '_id'){
|
|
56303
56365
|
relatedKeySaveValue = _master.record[relatedField.reference_to_field];
|
|
56304
56366
|
}
|
|
56305
56367
|
let relatedKeyValue;
|
|
56306
|
-
if(!_.isString(relatedField.reference_to)){
|
|
56368
|
+
if(relatedField && !_.isString(relatedField.reference_to)){
|
|
56307
56369
|
relatedKeyValue = { o: masterObjectName, ids: [relatedKeySaveValue] };
|
|
56308
|
-
}else if (relatedField.multiple) {
|
|
56370
|
+
}else if (relatedField && relatedField.multiple) {
|
|
56309
56371
|
relatedKeyValue = [relatedKeySaveValue];
|
|
56310
56372
|
} else {
|
|
56311
56373
|
relatedKeyValue = relatedKeySaveValue;
|
|
@@ -58640,8 +58702,8 @@ async function getObjectFilter(objectSchema, fields, options) {
|
|
|
58640
58702
|
/*
|
|
58641
58703
|
* @Author: baozhoutao@steedos.com
|
|
58642
58704
|
* @Date: 2022-07-05 15:55:39
|
|
58643
|
-
* @LastEditors:
|
|
58644
|
-
* @LastEditTime: 2024-02-
|
|
58705
|
+
* @LastEditors: baozhoutao@steedos.com
|
|
58706
|
+
* @LastEditTime: 2024-02-18 16:05:21
|
|
58645
58707
|
* @Description:
|
|
58646
58708
|
*/
|
|
58647
58709
|
|
|
@@ -60864,8 +60926,9 @@ async function convertSFieldToAmisField(field, readonly, ctx) {
|
|
|
60864
60926
|
"Authorization": "Bearer ${context.tenantId},${context.authToken}"
|
|
60865
60927
|
},
|
|
60866
60928
|
"adaptor": `
|
|
60867
|
-
|
|
60929
|
+
var tempValue = payload.data && payload.data.autonumber;
|
|
60868
60930
|
delete payload.data.autonumber;
|
|
60931
|
+
payload.data["${field.name}"] = tempValue;
|
|
60869
60932
|
return payload;
|
|
60870
60933
|
`
|
|
60871
60934
|
},
|