@steedos-widgets/amis-object 1.3.3 → 1.3.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/amis/AmisObjectTable.d.ts +2 -6
- package/dist/amis-object.cjs.css +3 -0
- package/dist/amis-object.cjs.js +228 -195
- package/dist/amis-object.cjs.js.map +1 -1
- package/dist/amis-object.esm.css +3 -0
- package/dist/amis-object.esm.js +228 -195
- package/dist/amis-object.esm.js.map +1 -1
- package/dist/amis-object.umd.css +3 -0
- package/dist/amis-object.umd.js +113 -116
- package/dist/amis-object.umd.js.map +1 -1
- package/dist/assets.json +16 -16
- package/dist/meta.js +43 -3
- package/package.json +3 -3
package/dist/amis-object.cjs.css
CHANGED
package/dist/amis-object.cjs.js
CHANGED
|
@@ -3613,7 +3613,7 @@ function getLookupListView(refObjectConfig) {
|
|
|
3613
3613
|
* @Author: baozhoutao@steedos.com
|
|
3614
3614
|
* @Date: 2022-05-23 09:53:08
|
|
3615
3615
|
* @LastEditors: 殷亮辉 yinlianghui@hotoa.com
|
|
3616
|
-
* @LastEditTime: 2023-
|
|
3616
|
+
* @LastEditTime: 2023-09-19 14:38:39
|
|
3617
3617
|
* @Description:
|
|
3618
3618
|
*/
|
|
3619
3619
|
|
|
@@ -3793,9 +3793,13 @@ async function getLookupTpl(field, ctx){
|
|
|
3793
3793
|
}
|
|
3794
3794
|
|
|
3795
3795
|
function getSwitchTpl(field){
|
|
3796
|
+
let fieldDataStrTpl = `data._display.${field.name}`;
|
|
3797
|
+
if(field.isTableField){
|
|
3798
|
+
fieldDataStrTpl = `data.${field.name}`;
|
|
3799
|
+
}
|
|
3796
3800
|
return `<% if (data.${field.name}) { %>
|
|
3797
|
-
<span class="slds-icon_container slds-icon-utility-check slds-current-color" title="
|
|
3798
|
-
<span ><%=
|
|
3801
|
+
<span class="slds-icon_container slds-icon-utility-check slds-current-color" title="<%=${fieldDataStrTpl}%>">
|
|
3802
|
+
<span ><%= ${fieldDataStrTpl} === "√" ? "<svg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='1.5' stroke='currentColor' class='w-4 h-4'><path stroke-linecap='round' stroke-linejoin='round' d='M4.5 12.75l6 6 9-13.5' /></svg>" : ${fieldDataStrTpl} %></span>
|
|
3799
3803
|
</span>
|
|
3800
3804
|
<% } %>`
|
|
3801
3805
|
}
|
|
@@ -10498,7 +10502,7 @@ async function convertSFieldToAmisField(field, readonly, ctx) {
|
|
|
10498
10502
|
label: subField.label,
|
|
10499
10503
|
quickEdit: readonly ? false : gridSub
|
|
10500
10504
|
};
|
|
10501
|
-
if(subField.type
|
|
10505
|
+
if(["lookup", "boolean", "toggle"].indexOf(subField.type) > -1){
|
|
10502
10506
|
gridItemSchema.type = gridSub.type;
|
|
10503
10507
|
gridItemSchema.tpl = gridSub.tpl;
|
|
10504
10508
|
}
|
|
@@ -11464,11 +11468,10 @@ async function getTableOperation(ctx){
|
|
|
11464
11468
|
}
|
|
11465
11469
|
|
|
11466
11470
|
async function getTableSchema$1(fields, options){
|
|
11467
|
-
let isLookup = options && options.isLookup;
|
|
11468
|
-
let hiddenColumnOperation = options && options.hiddenColumnOperation;
|
|
11469
11471
|
if(!options){
|
|
11470
11472
|
options = {};
|
|
11471
11473
|
}
|
|
11474
|
+
let { isLookup, hiddenColumnOperation } = options;
|
|
11472
11475
|
let columns = [];
|
|
11473
11476
|
let useMobileColumns = options.formFactor === 'SMALL' || ["split"].indexOf(options.displayAs) > -1;
|
|
11474
11477
|
if(isLookup){
|
|
@@ -11480,6 +11483,7 @@ async function getTableSchema$1(fields, options){
|
|
|
11480
11483
|
}
|
|
11481
11484
|
else {
|
|
11482
11485
|
columns = await getTableColumns$1(fields, options);
|
|
11486
|
+
|
|
11483
11487
|
if(!isLookup && !hiddenColumnOperation){
|
|
11484
11488
|
columns.push(await getTableOperation(options));
|
|
11485
11489
|
}
|
|
@@ -12784,6 +12788,161 @@ async function getObjectCalendar(objectSchema, calendarOptions, options) {
|
|
|
12784
12788
|
return amisSchema;
|
|
12785
12789
|
}
|
|
12786
12790
|
|
|
12791
|
+
/******************************************************************************
|
|
12792
|
+
Copyright (c) Microsoft Corporation.
|
|
12793
|
+
|
|
12794
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
12795
|
+
purpose with or without fee is hereby granted.
|
|
12796
|
+
|
|
12797
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
12798
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
12799
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
12800
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
12801
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
12802
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
12803
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
12804
|
+
***************************************************************************** */
|
|
12805
|
+
|
|
12806
|
+
var __assign$1 = function() {
|
|
12807
|
+
__assign$1 = Object.assign || function __assign(t) {
|
|
12808
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
12809
|
+
s = arguments[i];
|
|
12810
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
12811
|
+
}
|
|
12812
|
+
return t;
|
|
12813
|
+
};
|
|
12814
|
+
return __assign$1.apply(this, arguments);
|
|
12815
|
+
};
|
|
12816
|
+
|
|
12817
|
+
/**
|
|
12818
|
+
* 将例如像 a.b.c 或 a[1].b 的字符串转换为路径数组
|
|
12819
|
+
*
|
|
12820
|
+
* @param string 要转换的字符串
|
|
12821
|
+
*/
|
|
12822
|
+
var keyToPath = function (string) {
|
|
12823
|
+
var result = [];
|
|
12824
|
+
if (string.charCodeAt(0) === '.'.charCodeAt(0)) {
|
|
12825
|
+
result.push('');
|
|
12826
|
+
}
|
|
12827
|
+
string.replace(new RegExp('[^.[\\]]+|\\[(?:([^"\'][^[]*)|(["\'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))', 'g'), function (match, expression, quote, subString) {
|
|
12828
|
+
var key = match;
|
|
12829
|
+
if (quote) {
|
|
12830
|
+
key = subString.replace(/\\(\\)?/g, '$1');
|
|
12831
|
+
}
|
|
12832
|
+
else if (expression) {
|
|
12833
|
+
key = expression.trim();
|
|
12834
|
+
}
|
|
12835
|
+
result.push(key);
|
|
12836
|
+
return '';
|
|
12837
|
+
});
|
|
12838
|
+
return result;
|
|
12839
|
+
};
|
|
12840
|
+
|
|
12841
|
+
// 方便取值的时候能够把上层的取到,但是获取的时候不会全部把所有的数据获取到。
|
|
12842
|
+
function createObject(superProps, props, properties) {
|
|
12843
|
+
if (superProps && Object.isFrozen(superProps)) {
|
|
12844
|
+
superProps = cloneObject(superProps);
|
|
12845
|
+
}
|
|
12846
|
+
var obj = superProps
|
|
12847
|
+
? Object.create(superProps, __assign$1(__assign$1({}, properties), { __super: {
|
|
12848
|
+
value: superProps,
|
|
12849
|
+
writable: false,
|
|
12850
|
+
enumerable: false
|
|
12851
|
+
} }))
|
|
12852
|
+
: Object.create(Object.prototype, properties);
|
|
12853
|
+
props &&
|
|
12854
|
+
isObject(props) &&
|
|
12855
|
+
Object.keys(props).forEach(function (key) { return (obj[key] = props[key]); });
|
|
12856
|
+
return obj;
|
|
12857
|
+
}
|
|
12858
|
+
function cloneObject(target, persistOwnProps) {
|
|
12859
|
+
if (persistOwnProps === void 0) { persistOwnProps = true; }
|
|
12860
|
+
var obj = target && target.__super
|
|
12861
|
+
? Object.create(target.__super, {
|
|
12862
|
+
__super: {
|
|
12863
|
+
value: target.__super,
|
|
12864
|
+
writable: false,
|
|
12865
|
+
enumerable: false
|
|
12866
|
+
}
|
|
12867
|
+
})
|
|
12868
|
+
: Object.create(Object.prototype);
|
|
12869
|
+
persistOwnProps &&
|
|
12870
|
+
target &&
|
|
12871
|
+
Object.keys(target).forEach(function (key) { return (obj[key] = target[key]); });
|
|
12872
|
+
return obj;
|
|
12873
|
+
}
|
|
12874
|
+
function extendObject(target, src, persistOwnProps) {
|
|
12875
|
+
if (persistOwnProps === void 0) { persistOwnProps = true; }
|
|
12876
|
+
var obj = cloneObject(target, persistOwnProps);
|
|
12877
|
+
src && Object.keys(src).forEach(function (key) { return (obj[key] = src[key]); });
|
|
12878
|
+
return obj;
|
|
12879
|
+
}
|
|
12880
|
+
function isObject(obj) {
|
|
12881
|
+
var typename = typeof obj;
|
|
12882
|
+
return (obj &&
|
|
12883
|
+
typename !== 'string' &&
|
|
12884
|
+
typename !== 'number' &&
|
|
12885
|
+
typename !== 'boolean' &&
|
|
12886
|
+
typename !== 'function' &&
|
|
12887
|
+
!Array.isArray(obj));
|
|
12888
|
+
}
|
|
12889
|
+
function setVariable(data, key, value, convertKeyToPath) {
|
|
12890
|
+
data = data || {};
|
|
12891
|
+
if (key in data) {
|
|
12892
|
+
data[key] = value;
|
|
12893
|
+
return;
|
|
12894
|
+
}
|
|
12895
|
+
var parts = convertKeyToPath !== false ? keyToPath(key) : [key];
|
|
12896
|
+
var last = parts.pop();
|
|
12897
|
+
while (parts.length) {
|
|
12898
|
+
var key_1 = parts.shift();
|
|
12899
|
+
if (isPlainObject_1(data[key_1])) {
|
|
12900
|
+
data = data[key_1] = __assign$1({}, data[key_1]);
|
|
12901
|
+
}
|
|
12902
|
+
else if (Array.isArray(data[key_1])) {
|
|
12903
|
+
data[key_1] = data[key_1].concat();
|
|
12904
|
+
data = data[key_1];
|
|
12905
|
+
}
|
|
12906
|
+
else if (data[key_1]) {
|
|
12907
|
+
// throw new Error(`目标路径不是纯对象,不能覆盖`);
|
|
12908
|
+
// 强行转成对象
|
|
12909
|
+
data[key_1] = {};
|
|
12910
|
+
data = data[key_1];
|
|
12911
|
+
}
|
|
12912
|
+
else {
|
|
12913
|
+
data[key_1] = {};
|
|
12914
|
+
data = data[key_1];
|
|
12915
|
+
}
|
|
12916
|
+
}
|
|
12917
|
+
data[last] = value;
|
|
12918
|
+
}
|
|
12919
|
+
function deleteVariable(data, key) {
|
|
12920
|
+
if (!data) {
|
|
12921
|
+
return;
|
|
12922
|
+
}
|
|
12923
|
+
else if (data.hasOwnProperty(key)) {
|
|
12924
|
+
delete data[key];
|
|
12925
|
+
return;
|
|
12926
|
+
}
|
|
12927
|
+
var parts = keyToPath(key);
|
|
12928
|
+
var last = parts.pop();
|
|
12929
|
+
while (parts.length) {
|
|
12930
|
+
var key_2 = parts.shift();
|
|
12931
|
+
if (isPlainObject_1(data[key_2])) {
|
|
12932
|
+
data = data[key_2] = __assign$1({}, data[key_2]);
|
|
12933
|
+
}
|
|
12934
|
+
else if (data[key_2]) {
|
|
12935
|
+
throw new Error("\u76EE\u6807\u8DEF\u5F84\u4E0D\u662F\u7EAF\u5BF9\u8C61\uFF0C\u4E0D\u80FD\u4FEE\u6539");
|
|
12936
|
+
}
|
|
12937
|
+
else {
|
|
12938
|
+
break;
|
|
12939
|
+
}
|
|
12940
|
+
}
|
|
12941
|
+
if (data && data.hasOwnProperty && data.hasOwnProperty(last)) {
|
|
12942
|
+
delete data[last];
|
|
12943
|
+
}
|
|
12944
|
+
}
|
|
12945
|
+
|
|
12787
12946
|
/*
|
|
12788
12947
|
* @Author: baozhoutao@steedos.com
|
|
12789
12948
|
* @Date: 2022-05-26 16:02:08
|
|
@@ -13024,9 +13183,30 @@ function getBulkActions(objectSchema){
|
|
|
13024
13183
|
]
|
|
13025
13184
|
}
|
|
13026
13185
|
|
|
13186
|
+
async function getCrudSchemaWithDataFilter(crud, options = {}){
|
|
13187
|
+
const { crudDataFilter, amisData, env } = options;
|
|
13188
|
+
let onCrudDataFilter = options.onCrudDataFilter;
|
|
13189
|
+
if (!onCrudDataFilter && typeof crudDataFilter === 'string') {
|
|
13190
|
+
onCrudDataFilter = new Function(
|
|
13191
|
+
'crud',
|
|
13192
|
+
'env',
|
|
13193
|
+
'data',
|
|
13194
|
+
crudDataFilter
|
|
13195
|
+
);
|
|
13196
|
+
}
|
|
13197
|
+
|
|
13198
|
+
try {
|
|
13199
|
+
onCrudDataFilter && (crud = await onCrudDataFilter(crud, env, amisData) || crud);
|
|
13200
|
+
} catch (e) {
|
|
13201
|
+
console.warn(e);
|
|
13202
|
+
}
|
|
13203
|
+
return crud;
|
|
13204
|
+
}
|
|
13205
|
+
|
|
13027
13206
|
async function getObjectCRUD(objectSchema, fields, options){
|
|
13028
13207
|
// console.time('getObjectCRUD');
|
|
13029
|
-
const { top, perPage, showDisplayAs = false, displayAs, crudClassName = ""
|
|
13208
|
+
const { top, perPage, showDisplayAs = false, displayAs, crudClassName = "",
|
|
13209
|
+
crudDataFilter, onCrudDataFilter, amisData, env } = options;
|
|
13030
13210
|
const nonpaged = objectSchema.paging && objectSchema.paging.enabled === false;
|
|
13031
13211
|
const isTreeObject = objectSchema.enable_tree;
|
|
13032
13212
|
const bulkActions = getBulkActions(objectSchema);
|
|
@@ -13067,6 +13247,14 @@ async function getObjectCRUD(objectSchema, fields, options){
|
|
|
13067
13247
|
filterVisible: options.filterVisible
|
|
13068
13248
|
});
|
|
13069
13249
|
|
|
13250
|
+
options.amisData = createObject(options.amisData, {
|
|
13251
|
+
objectName: objectSchema.name,
|
|
13252
|
+
// _id: null,
|
|
13253
|
+
recordPermissions: objectSchema.permissions,
|
|
13254
|
+
uiSchema: objectSchema,
|
|
13255
|
+
// loaded: false //crud接收适配器中设置为true,否则就是刷新浏览器第一次加载
|
|
13256
|
+
});
|
|
13257
|
+
|
|
13070
13258
|
|
|
13071
13259
|
let body = null;
|
|
13072
13260
|
const id = `listview_${objectSchema.name}`;
|
|
@@ -13092,7 +13280,12 @@ async function getObjectCRUD(objectSchema, fields, options){
|
|
|
13092
13280
|
if(objectSchema.name === 'organizations'){
|
|
13093
13281
|
labelFieldName = 'name';
|
|
13094
13282
|
}
|
|
13095
|
-
|
|
13283
|
+
let tableOptions = Object.assign({
|
|
13284
|
+
idFieldName: objectSchema.idFieldName, labelFieldName: labelFieldName,
|
|
13285
|
+
permissions:objectSchema.permissions,enable_inline_edit:objectSchema.enable_inline_edit
|
|
13286
|
+
}, options);
|
|
13287
|
+
tableOptions.amisData = createObject(options.amisData || {}, {}).__super;
|
|
13288
|
+
const table = await getTableSchema$1(fields, tableOptions);
|
|
13096
13289
|
delete table.mode;
|
|
13097
13290
|
//image与avatar需要在提交修改时特别处理
|
|
13098
13291
|
const imageNames = _$1__default["default"].compact(_$1__default["default"].map(_$1__default["default"].filter(fields, (field) => ["image","avatar"].includes(field.type)), 'name'));
|
|
@@ -13152,9 +13345,9 @@ async function getObjectCRUD(objectSchema, fields, options){
|
|
|
13152
13345
|
requestAdaptor: quickSaveApiRequestAdaptor,
|
|
13153
13346
|
},
|
|
13154
13347
|
rowClassNameExpr: options.rowClassNameExpr
|
|
13155
|
-
},
|
|
13156
|
-
|
|
13157
|
-
|
|
13348
|
+
}, bodyProps);
|
|
13349
|
+
|
|
13350
|
+
body = await getCrudSchemaWithDataFilter(body, { crudDataFilter, onCrudDataFilter, amisData, env });
|
|
13158
13351
|
}
|
|
13159
13352
|
|
|
13160
13353
|
const defaults = options.defaults;
|
|
@@ -13189,16 +13382,10 @@ async function getObjectCRUD(objectSchema, fields, options){
|
|
|
13189
13382
|
return {
|
|
13190
13383
|
type: 'service',
|
|
13191
13384
|
className: '',
|
|
13192
|
-
//目前crud的service层id不认用户自定义id,只支持默认规则id
|
|
13385
|
+
//目前crud的service层id不认用户自定义id,只支持默认规则id,许多地方的格式都写死了service_listview_${objectname}
|
|
13193
13386
|
id: `service_${id}`,
|
|
13194
13387
|
name: `page`,
|
|
13195
|
-
data:
|
|
13196
|
-
objectName: objectSchema.name,
|
|
13197
|
-
// _id: null,
|
|
13198
|
-
recordPermissions: objectSchema.permissions,
|
|
13199
|
-
uiSchema: objectSchema,
|
|
13200
|
-
// loaded: false //crud接收适配器中设置为true,否则就是刷新浏览器第一次加载
|
|
13201
|
-
},
|
|
13388
|
+
data: options.amisData,
|
|
13202
13389
|
body: body
|
|
13203
13390
|
}
|
|
13204
13391
|
}
|
|
@@ -13850,7 +14037,7 @@ async function getRelatedListSchema(
|
|
|
13850
14037
|
* @Author: baozhoutao@steedos.com
|
|
13851
14038
|
* @Date: 2022-07-05 15:55:39
|
|
13852
14039
|
* @LastEditors: 殷亮辉 yinlianghui@hotoa.com
|
|
13853
|
-
* @LastEditTime: 2023-09-
|
|
14040
|
+
* @LastEditTime: 2023-09-15 09:04:49
|
|
13854
14041
|
* @Description:
|
|
13855
14042
|
*/
|
|
13856
14043
|
|
|
@@ -14183,7 +14370,9 @@ async function getListSchema(
|
|
|
14183
14370
|
"adaptor": listView.adaptor,
|
|
14184
14371
|
"headerToolbarItems": ctx.headerToolbarItems,
|
|
14185
14372
|
"filterVisible": ctx.filterVisible,
|
|
14186
|
-
"rowClassNameExpr": ctx.rowClassNameExpr
|
|
14373
|
+
"rowClassNameExpr": ctx.rowClassNameExpr,
|
|
14374
|
+
"crudDataFilter": ctx.crudDataFilter,
|
|
14375
|
+
"onCrudDataFilter": ctx.onCrudDataFilter
|
|
14187
14376
|
};
|
|
14188
14377
|
// console.log(`getListSchema===>`,amisSchema)
|
|
14189
14378
|
return {
|
|
@@ -14286,7 +14475,7 @@ async function getTableSchema(
|
|
|
14286
14475
|
fields = fields.concat(extraFields);
|
|
14287
14476
|
}
|
|
14288
14477
|
|
|
14289
|
-
|
|
14478
|
+
let crudOptions = {
|
|
14290
14479
|
tabId: objectName,
|
|
14291
14480
|
appId: appName,
|
|
14292
14481
|
objectName: objectName,
|
|
@@ -14295,8 +14484,9 @@ async function getTableSchema(
|
|
|
14295
14484
|
sort,
|
|
14296
14485
|
headerToolbarItems: ctx.headerToolbarItems,
|
|
14297
14486
|
buttons: await getListViewItemButtons(uiSchema, ctx)
|
|
14298
|
-
}
|
|
14299
|
-
|
|
14487
|
+
};
|
|
14488
|
+
crudOptions.amisData = createObject(ctx.amisData || {}, {}).__super;
|
|
14489
|
+
const amisSchema = await getObjectCRUD(uiSchema, fields, crudOptions);
|
|
14300
14490
|
// console.timeEnd('getTableSchema');
|
|
14301
14491
|
return {
|
|
14302
14492
|
uiSchema,
|
|
@@ -15080,161 +15270,6 @@ const registerRemoteAssets = async (assetUrls)=>{
|
|
|
15080
15270
|
}
|
|
15081
15271
|
};
|
|
15082
15272
|
|
|
15083
|
-
/******************************************************************************
|
|
15084
|
-
Copyright (c) Microsoft Corporation.
|
|
15085
|
-
|
|
15086
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
15087
|
-
purpose with or without fee is hereby granted.
|
|
15088
|
-
|
|
15089
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
15090
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
15091
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
15092
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
15093
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
15094
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
15095
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
15096
|
-
***************************************************************************** */
|
|
15097
|
-
|
|
15098
|
-
var __assign$1 = function() {
|
|
15099
|
-
__assign$1 = Object.assign || function __assign(t) {
|
|
15100
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
15101
|
-
s = arguments[i];
|
|
15102
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
15103
|
-
}
|
|
15104
|
-
return t;
|
|
15105
|
-
};
|
|
15106
|
-
return __assign$1.apply(this, arguments);
|
|
15107
|
-
};
|
|
15108
|
-
|
|
15109
|
-
/**
|
|
15110
|
-
* 将例如像 a.b.c 或 a[1].b 的字符串转换为路径数组
|
|
15111
|
-
*
|
|
15112
|
-
* @param string 要转换的字符串
|
|
15113
|
-
*/
|
|
15114
|
-
var keyToPath = function (string) {
|
|
15115
|
-
var result = [];
|
|
15116
|
-
if (string.charCodeAt(0) === '.'.charCodeAt(0)) {
|
|
15117
|
-
result.push('');
|
|
15118
|
-
}
|
|
15119
|
-
string.replace(new RegExp('[^.[\\]]+|\\[(?:([^"\'][^[]*)|(["\'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))', 'g'), function (match, expression, quote, subString) {
|
|
15120
|
-
var key = match;
|
|
15121
|
-
if (quote) {
|
|
15122
|
-
key = subString.replace(/\\(\\)?/g, '$1');
|
|
15123
|
-
}
|
|
15124
|
-
else if (expression) {
|
|
15125
|
-
key = expression.trim();
|
|
15126
|
-
}
|
|
15127
|
-
result.push(key);
|
|
15128
|
-
return '';
|
|
15129
|
-
});
|
|
15130
|
-
return result;
|
|
15131
|
-
};
|
|
15132
|
-
|
|
15133
|
-
// 方便取值的时候能够把上层的取到,但是获取的时候不会全部把所有的数据获取到。
|
|
15134
|
-
function createObject(superProps, props, properties) {
|
|
15135
|
-
if (superProps && Object.isFrozen(superProps)) {
|
|
15136
|
-
superProps = cloneObject(superProps);
|
|
15137
|
-
}
|
|
15138
|
-
var obj = superProps
|
|
15139
|
-
? Object.create(superProps, __assign$1(__assign$1({}, properties), { __super: {
|
|
15140
|
-
value: superProps,
|
|
15141
|
-
writable: false,
|
|
15142
|
-
enumerable: false
|
|
15143
|
-
} }))
|
|
15144
|
-
: Object.create(Object.prototype, properties);
|
|
15145
|
-
props &&
|
|
15146
|
-
isObject(props) &&
|
|
15147
|
-
Object.keys(props).forEach(function (key) { return (obj[key] = props[key]); });
|
|
15148
|
-
return obj;
|
|
15149
|
-
}
|
|
15150
|
-
function cloneObject(target, persistOwnProps) {
|
|
15151
|
-
if (persistOwnProps === void 0) { persistOwnProps = true; }
|
|
15152
|
-
var obj = target && target.__super
|
|
15153
|
-
? Object.create(target.__super, {
|
|
15154
|
-
__super: {
|
|
15155
|
-
value: target.__super,
|
|
15156
|
-
writable: false,
|
|
15157
|
-
enumerable: false
|
|
15158
|
-
}
|
|
15159
|
-
})
|
|
15160
|
-
: Object.create(Object.prototype);
|
|
15161
|
-
persistOwnProps &&
|
|
15162
|
-
target &&
|
|
15163
|
-
Object.keys(target).forEach(function (key) { return (obj[key] = target[key]); });
|
|
15164
|
-
return obj;
|
|
15165
|
-
}
|
|
15166
|
-
function extendObject(target, src, persistOwnProps) {
|
|
15167
|
-
if (persistOwnProps === void 0) { persistOwnProps = true; }
|
|
15168
|
-
var obj = cloneObject(target, persistOwnProps);
|
|
15169
|
-
src && Object.keys(src).forEach(function (key) { return (obj[key] = src[key]); });
|
|
15170
|
-
return obj;
|
|
15171
|
-
}
|
|
15172
|
-
function isObject(obj) {
|
|
15173
|
-
var typename = typeof obj;
|
|
15174
|
-
return (obj &&
|
|
15175
|
-
typename !== 'string' &&
|
|
15176
|
-
typename !== 'number' &&
|
|
15177
|
-
typename !== 'boolean' &&
|
|
15178
|
-
typename !== 'function' &&
|
|
15179
|
-
!Array.isArray(obj));
|
|
15180
|
-
}
|
|
15181
|
-
function setVariable(data, key, value, convertKeyToPath) {
|
|
15182
|
-
data = data || {};
|
|
15183
|
-
if (key in data) {
|
|
15184
|
-
data[key] = value;
|
|
15185
|
-
return;
|
|
15186
|
-
}
|
|
15187
|
-
var parts = convertKeyToPath !== false ? keyToPath(key) : [key];
|
|
15188
|
-
var last = parts.pop();
|
|
15189
|
-
while (parts.length) {
|
|
15190
|
-
var key_1 = parts.shift();
|
|
15191
|
-
if (isPlainObject_1(data[key_1])) {
|
|
15192
|
-
data = data[key_1] = __assign$1({}, data[key_1]);
|
|
15193
|
-
}
|
|
15194
|
-
else if (Array.isArray(data[key_1])) {
|
|
15195
|
-
data[key_1] = data[key_1].concat();
|
|
15196
|
-
data = data[key_1];
|
|
15197
|
-
}
|
|
15198
|
-
else if (data[key_1]) {
|
|
15199
|
-
// throw new Error(`目标路径不是纯对象,不能覆盖`);
|
|
15200
|
-
// 强行转成对象
|
|
15201
|
-
data[key_1] = {};
|
|
15202
|
-
data = data[key_1];
|
|
15203
|
-
}
|
|
15204
|
-
else {
|
|
15205
|
-
data[key_1] = {};
|
|
15206
|
-
data = data[key_1];
|
|
15207
|
-
}
|
|
15208
|
-
}
|
|
15209
|
-
data[last] = value;
|
|
15210
|
-
}
|
|
15211
|
-
function deleteVariable(data, key) {
|
|
15212
|
-
if (!data) {
|
|
15213
|
-
return;
|
|
15214
|
-
}
|
|
15215
|
-
else if (data.hasOwnProperty(key)) {
|
|
15216
|
-
delete data[key];
|
|
15217
|
-
return;
|
|
15218
|
-
}
|
|
15219
|
-
var parts = keyToPath(key);
|
|
15220
|
-
var last = parts.pop();
|
|
15221
|
-
while (parts.length) {
|
|
15222
|
-
var key_2 = parts.shift();
|
|
15223
|
-
if (isPlainObject_1(data[key_2])) {
|
|
15224
|
-
data = data[key_2] = __assign$1({}, data[key_2]);
|
|
15225
|
-
}
|
|
15226
|
-
else if (data[key_2]) {
|
|
15227
|
-
throw new Error("\u76EE\u6807\u8DEF\u5F84\u4E0D\u662F\u7EAF\u5BF9\u8C61\uFF0C\u4E0D\u80FD\u4FEE\u6539");
|
|
15228
|
-
}
|
|
15229
|
-
else {
|
|
15230
|
-
break;
|
|
15231
|
-
}
|
|
15232
|
-
}
|
|
15233
|
-
if (data && data.hasOwnProperty && data.hasOwnProperty(last)) {
|
|
15234
|
-
delete data[last];
|
|
15235
|
-
}
|
|
15236
|
-
}
|
|
15237
|
-
|
|
15238
15273
|
/*
|
|
15239
15274
|
* @Author: baozhoutao@steedos.com
|
|
15240
15275
|
* @Date: 2022-12-17 17:03:40
|
|
@@ -17895,14 +17930,14 @@ var AmisObjectForm = function (props) { return __awaiter(void 0, void 0, void 0,
|
|
|
17895
17930
|
}); };
|
|
17896
17931
|
|
|
17897
17932
|
var AmisObjectListView = function (props) { return __awaiter(void 0, void 0, void 0, function () {
|
|
17898
|
-
var $schema, top, perPage, _a, showHeader, data, defaultData, _b, crud, _c, className, crudClassName, _d, showDisplayAs, sideSchema, _f, filterVisible, headerToolbarItems, rowClassNameExpr, _g, hiddenColumnOperation, headerSchema, ctx, listName, defaults, objectApiName, displayAs, formFactor, isMobile, uiSchema, listView, schemaKeys, listSchema, setDataToComponentId, amisSchemaData, listViewId, listViewSchemaProps, serviceData;
|
|
17933
|
+
var $schema, top, perPage, _a, showHeader, data, defaultData, _b, crud, _c, className, crudClassName, _d, showDisplayAs, sideSchema, _f, filterVisible, headerToolbarItems, rowClassNameExpr, _g, hiddenColumnOperation, columns, crudDataFilter, onCrudDataFilter, env, rebuildOn, headerSchema, ctx, listName, defaults, objectApiName, displayAs, formFactor, isMobile, uiSchema, listView, schemaKeys, listSchema, setDataToComponentId, amisSchemaData, listViewId, listViewSchemaProps, serviceData;
|
|
17899
17934
|
var _h;
|
|
17900
17935
|
return __generator(this, function (_j) {
|
|
17901
17936
|
switch (_j.label) {
|
|
17902
17937
|
case 0:
|
|
17903
17938
|
// console.time('AmisObjectListView')
|
|
17904
17939
|
console.log("AmisObjectListView props", props);
|
|
17905
|
-
$schema = props.$schema, top = props.top, perPage = props.perPage, _a = props.showHeader, showHeader = _a === void 0 ? true : _a, data = props.data, defaultData = props.defaultData, _b = props.crud, crud = _b === void 0 ? {} : _b, _c = props.className, className = _c === void 0 ? "" : _c, crudClassName = props.crudClassName, _d = props.showDisplayAs, showDisplayAs = _d === void 0 ? false : _d, sideSchema = props.sideSchema, props.columnsTogglable, _f = props.filterVisible, filterVisible = _f === void 0 ? true : _f, headerToolbarItems = props.headerToolbarItems, rowClassNameExpr = props.rowClassNameExpr, _g = props.hiddenColumnOperation, hiddenColumnOperation = _g === void 0 ? false : _g;
|
|
17940
|
+
$schema = props.$schema, top = props.top, perPage = props.perPage, _a = props.showHeader, showHeader = _a === void 0 ? true : _a, data = props.data, defaultData = props.defaultData, _b = props.crud, crud = _b === void 0 ? {} : _b, _c = props.className, className = _c === void 0 ? "" : _c, crudClassName = props.crudClassName, _d = props.showDisplayAs, showDisplayAs = _d === void 0 ? false : _d, sideSchema = props.sideSchema, props.columnsTogglable, _f = props.filterVisible, filterVisible = _f === void 0 ? true : _f, headerToolbarItems = props.headerToolbarItems, rowClassNameExpr = props.rowClassNameExpr, _g = props.hiddenColumnOperation, hiddenColumnOperation = _g === void 0 ? false : _g, columns = props.columns, crudDataFilter = props.crudDataFilter, onCrudDataFilter = props.onCrudDataFilter, env = props.env, rebuildOn = props.rebuildOn;
|
|
17906
17941
|
headerSchema = props.headerSchema;
|
|
17907
17942
|
ctx = props.ctx;
|
|
17908
17943
|
listName = (defaultData === null || defaultData === void 0 ? void 0 : defaultData.listName) || (data === null || data === void 0 ? void 0 : data.listName) || (props === null || props === void 0 ? void 0 : props.listName);
|
|
@@ -17980,9 +18015,9 @@ var AmisObjectListView = function (props) { return __awaiter(void 0, void 0, voi
|
|
|
17980
18015
|
if (!setDataToComponentId) {
|
|
17981
18016
|
setDataToComponentId = "service_listview_".concat(objectApiName);
|
|
17982
18017
|
}
|
|
17983
|
-
amisSchemaData =
|
|
18018
|
+
amisSchemaData = createObject(data, defaultData);
|
|
17984
18019
|
listViewId = (ctx === null || ctx === void 0 ? void 0 : ctx.listViewId) || amisSchemaData.listViewId;
|
|
17985
|
-
listViewSchemaProps = __assign$2(__assign$2({ top: top, perPage: perPage, showHeader: showHeader, defaults: defaults }, ctx), { listViewId: listViewId, setDataToComponentId: setDataToComponentId, filterVisible: filterVisible, showDisplayAs: showDisplayAs, displayAs: displayAs, headerToolbarItems: headerToolbarItems, rowClassNameExpr: rowClassNameExpr, hiddenColumnOperation: hiddenColumnOperation });
|
|
18020
|
+
listViewSchemaProps = __assign$2(__assign$2({ top: top, perPage: perPage, showHeader: showHeader, defaults: defaults }, ctx), { listViewId: listViewId, setDataToComponentId: setDataToComponentId, filterVisible: filterVisible, showDisplayAs: showDisplayAs, displayAs: displayAs, headerToolbarItems: headerToolbarItems, rowClassNameExpr: rowClassNameExpr, hiddenColumnOperation: hiddenColumnOperation, columns: columns, crudDataFilter: crudDataFilter, onCrudDataFilter: onCrudDataFilter, amisData: amisSchemaData, env: env });
|
|
17986
18021
|
if (!headerSchema) {
|
|
17987
18022
|
headerSchema = getObjectListHeader$1(uiSchema, listName, ctx);
|
|
17988
18023
|
}
|
|
@@ -18025,16 +18060,17 @@ var AmisObjectListView = function (props) { return __awaiter(void 0, void 0, voi
|
|
|
18025
18060
|
body: __spreadArray(__spreadArray([], __read(headerSchema), false), [
|
|
18026
18061
|
{
|
|
18027
18062
|
"type": "service",
|
|
18063
|
+
"id": "service_schema_api_" + objectApiName,
|
|
18028
18064
|
"schemaApi": {
|
|
18029
18065
|
// 这里url上加objectApiName属性是因为设计器中切换对象时不会变更列表视图界面,不可以用objectName=${objectName}使用作用域中objectName变量是因为设计器那边不会监听识别data变化来render组件
|
|
18030
|
-
"url": "${context.rootUrl}/graphql?objectName=" + objectApiName + "&listName=${listName}&display=${display}",
|
|
18066
|
+
"url": "${context.rootUrl}/graphql?objectName=" + objectApiName + "&listName=${listName}&display=${display}&rebuildOn=" + rebuildOn,
|
|
18031
18067
|
"method": "post",
|
|
18032
18068
|
"messages": {},
|
|
18033
18069
|
"headers": {
|
|
18034
18070
|
"Authorization": "Bearer ${context.tenantId},${context.authToken}"
|
|
18035
18071
|
},
|
|
18036
18072
|
"requestAdaptor": "api.data={query: '{spaces__findOne(id: \"none\"){_id,name}}'};return api;",
|
|
18037
|
-
"adaptor": "\n // console.log('service listview schemaApi adaptor....', api.body); \n let { appId, objectName, defaultListName: listName, display, formFactor: defaultFormFactor} = api.body;\n if(api.body.listName){\n listName = api.body.listName;\n }\n return new Promise((resolve)=>{\n const listViewSchemaProps = ".concat(JSON.stringify(listViewSchemaProps), ";\n const formFactor = ([\"split\"].indexOf(display) > -1) ? 'SMALL': defaultFormFactor;\n listViewSchemaProps.formFactor = formFactor;\n listViewSchemaProps.displayAs = display;\n \n window.getListSchema(appId, objectName, listName, listViewSchemaProps).then((schema)=>{\n try{\n const uiSchema = schema.uiSchema;\n const listView = _.find(\n uiSchema.list_views,\n (listView, name) => {\n // \u4F20\u5165listViewName\u7A7A\u503C\u5219\u53D6\u7B2C\u4E00\u4E2A\n if(!listName){\n listName = name;\n }\n return name === listName || listView._id === listName;\n }\n );\n if(listView){\n window.Steedos && window.Steedos.setDocumentTitle && window.Steedos.setDocumentTitle({pageName: listView.label || listView.name})\n }\n }catch(e){\n console.error(e)\n }\n payload.data = schema.amisSchema;\n
|
|
18073
|
+
"adaptor": "\n // console.log('service listview schemaApi adaptor....', api.body); \n let { appId, objectName, defaultListName: listName, display, formFactor: defaultFormFactor} = api.body;\n if(api.body.listName){\n listName = api.body.listName;\n }\n return new Promise((resolve)=>{\n const listViewSchemaProps = ".concat(JSON.stringify(listViewSchemaProps), ";\n const formFactor = ([\"split\"].indexOf(display) > -1) ? 'SMALL': defaultFormFactor;\n listViewSchemaProps.formFactor = formFactor;\n listViewSchemaProps.displayAs = display;\n console.log(\"====listViewSchemaProps===>\", listName, display, listViewSchemaProps)\n window.getListSchema(appId, objectName, listName, listViewSchemaProps).then((schema)=>{\n try{\n const uiSchema = schema.uiSchema;\n const listView = _.find(\n uiSchema.list_views,\n (listView, name) => {\n // \u4F20\u5165listViewName\u7A7A\u503C\u5219\u53D6\u7B2C\u4E00\u4E2A\n if(!listName){\n listName = name;\n }\n return name === listName || listView._id === listName;\n }\n );\n if(listView){\n window.Steedos && window.Steedos.setDocumentTitle && window.Steedos.setDocumentTitle({pageName: listView.label || listView.name})\n }\n }catch(e){\n console.error(e)\n }\n payload.data = schema.amisSchema;\n console.log(\"payload================>\", payload)\n resolve(payload)\n });\n });\n ")
|
|
18038
18074
|
},
|
|
18039
18075
|
// "body": body,
|
|
18040
18076
|
// "data": serviceData
|
|
@@ -18077,13 +18113,11 @@ function getTableColumns(columns, includedFields, fieldsExtend) {
|
|
|
18077
18113
|
return tableColumns;
|
|
18078
18114
|
}
|
|
18079
18115
|
var AmisObjectTable = function (props) { return __awaiter(void 0, void 0, void 0, function () {
|
|
18080
|
-
var $schema, filters, filtersFunction, amisCondition, top, headerSchema, includedFields, fieldsExtend, sort, sortField, sortOrder, extraColumns, data, defaultData, _a, crud, _b, formFactor, _c, className, requestAdaptor, adaptor, _d, filterVisible, headerToolbarItems, ctx, columns, defaults, objectApiName, schemaKeys, listSchema, setDataToComponentId, amisFilters, tableFilters, amisSchemaData, appId, amisSchema;
|
|
18116
|
+
var $schema, filters, filtersFunction, amisCondition, top, headerSchema, includedFields, fieldsExtend, sort, sortField, sortOrder, extraColumns, data, defaultData, _a, crud, _b, formFactor, _c, className, requestAdaptor, adaptor, _d, filterVisible, headerToolbarItems, crudDataFilter, onCrudDataFilter, env, ctx, columns, defaults, objectApiName, schemaKeys, listSchema, setDataToComponentId, amisFilters, tableFilters, amisSchemaData, appId, amisSchema;
|
|
18081
18117
|
return __generator(this, function (_e) {
|
|
18082
18118
|
switch (_e.label) {
|
|
18083
18119
|
case 0:
|
|
18084
|
-
|
|
18085
|
-
console.log("AmisObjectTable props", props);
|
|
18086
|
-
$schema = props.$schema, filters = props.filters, filtersFunction = props.filtersFunction, amisCondition = props.amisCondition, top = props.top, headerSchema = props.headerSchema, includedFields = props.fields, fieldsExtend = props.fieldsExtend, sort = props.sort, sortField = props.sortField, sortOrder = props.sortOrder, extraColumns = props.extraColumns, data = props.data, defaultData = props.defaultData, _a = props.crud, crud = _a === void 0 ? {} : _a, _b = props.formFactor, formFactor = _b === void 0 ? window.innerWidth < 768 ? 'SMALL' : 'LARGE' : _b, _c = props.className, className = _c === void 0 ? "" : _c, requestAdaptor = props.requestAdaptor, adaptor = props.adaptor, _d = props.filterVisible, filterVisible = _d === void 0 ? true : _d, headerToolbarItems = props.headerToolbarItems;
|
|
18120
|
+
$schema = props.$schema, filters = props.filters, filtersFunction = props.filtersFunction, amisCondition = props.amisCondition, top = props.top, headerSchema = props.headerSchema, includedFields = props.fields, fieldsExtend = props.fieldsExtend, sort = props.sort, sortField = props.sortField, sortOrder = props.sortOrder, extraColumns = props.extraColumns, data = props.data, defaultData = props.defaultData, _a = props.crud, crud = _a === void 0 ? {} : _a, _b = props.formFactor, formFactor = _b === void 0 ? window.innerWidth < 768 ? 'SMALL' : 'LARGE' : _b, _c = props.className, className = _c === void 0 ? "" : _c, requestAdaptor = props.requestAdaptor, adaptor = props.adaptor, _d = props.filterVisible, filterVisible = _d === void 0 ? true : _d, headerToolbarItems = props.headerToolbarItems, crudDataFilter = props.crudDataFilter, onCrudDataFilter = props.onCrudDataFilter, env = props.env;
|
|
18087
18121
|
ctx = props.ctx;
|
|
18088
18122
|
if (!ctx) {
|
|
18089
18123
|
ctx = {};
|
|
@@ -18113,20 +18147,19 @@ var AmisObjectTable = function (props) { return __awaiter(void 0, void 0, void 0
|
|
|
18113
18147
|
}
|
|
18114
18148
|
amisFilters = amisCondition && conditionsToFilters(amisCondition);
|
|
18115
18149
|
tableFilters = filters || amisFilters;
|
|
18116
|
-
amisSchemaData =
|
|
18150
|
+
amisSchemaData = createObject(data, defaultData);
|
|
18117
18151
|
appId = (data === null || data === void 0 ? void 0 : data.appId) || (defaultData === null || defaultData === void 0 ? void 0 : defaultData.appId);
|
|
18118
18152
|
// ctx中值为undefined的属性不能保留,否则会导致 filters等被覆盖。
|
|
18119
18153
|
ctx = _$1.pickBy(ctx, function (value) { return value !== undefined; });
|
|
18120
|
-
return [4 /*yield*/, getTableSchema(appId, objectApiName, columns, __assign$2(__assign$2({ filters: tableFilters, filtersFunction: filtersFunction, top: top, sort: sort, sortField: sortField, sortOrder: sortOrder, extraColumns: extraColumns, defaults: defaults }, ctx), { setDataToComponentId: setDataToComponentId, requestAdaptor: requestAdaptor, adaptor: adaptor, filterVisible: filterVisible, headerToolbarItems: headerToolbarItems }))];
|
|
18154
|
+
return [4 /*yield*/, getTableSchema(appId, objectApiName, columns, __assign$2(__assign$2({ filters: tableFilters, filtersFunction: filtersFunction, top: top, sort: sort, sortField: sortField, sortOrder: sortOrder, extraColumns: extraColumns, defaults: defaults }, ctx), { setDataToComponentId: setDataToComponentId, requestAdaptor: requestAdaptor, adaptor: adaptor, filterVisible: filterVisible, headerToolbarItems: headerToolbarItems, crudDataFilter: crudDataFilter, onCrudDataFilter: onCrudDataFilter, amisData: amisSchemaData, env: env }))];
|
|
18121
18155
|
case 1:
|
|
18122
18156
|
amisSchema = (_e.sent()).amisSchema;
|
|
18123
|
-
amisSchema.data =
|
|
18157
|
+
amisSchema.data = createObject(amisSchema.data, amisSchemaData);
|
|
18124
18158
|
if (_$1.has(props, 'objectApiName')) {
|
|
18125
18159
|
amisSchema.data.objectName = objectApiName;
|
|
18126
18160
|
}
|
|
18127
18161
|
amisSchema.className = "steedos-object-table h-full flex flex-col ".concat(className);
|
|
18128
18162
|
amisSchema.objectApiName = objectApiName; //设计器中切换对象时画布中显示的列未同步变更
|
|
18129
|
-
// console.log(`AmisObjectTable===>amisSchema`, amisSchema)
|
|
18130
18163
|
// console.timeEnd('AmisObjectTable')
|
|
18131
18164
|
return [2 /*return*/, amisSchema];
|
|
18132
18165
|
}
|
|
@@ -18424,7 +18457,7 @@ var AmisProvider = function (props) { return __awaiter(void 0, void 0, void 0, f
|
|
|
18424
18457
|
* @Author: baozhoutao@steedos.com
|
|
18425
18458
|
* @Date: 2022-09-01 14:44:57
|
|
18426
18459
|
* @LastEditors: liaodaxue
|
|
18427
|
-
* @LastEditTime: 2023-09-19
|
|
18460
|
+
* @LastEditTime: 2023-09-19 15:20:58
|
|
18428
18461
|
* @Description:
|
|
18429
18462
|
*/
|
|
18430
18463
|
var AmisAppLauncher = function (props) { return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -18648,7 +18681,7 @@ var AmisAppLauncher = function (props) { return __awaiter(void 0, void 0, void 0
|
|
|
18648
18681
|
"actions": [
|
|
18649
18682
|
{
|
|
18650
18683
|
"actionType": "custom",
|
|
18651
|
-
"script": "\nconst path = context.props.data.path;\ndoAction({\n actionType: '
|
|
18684
|
+
"script": "\nconst path = context.props.data.path;\ndoAction({\n actionType: 'link',\n args: {\n \"url\": path,\n \"blank\": false\n }\n});"
|
|
18652
18685
|
},
|
|
18653
18686
|
{
|
|
18654
18687
|
"actionType": "broadcast",
|