@steedos-widgets/amis-object 1.2.5 → 1.2.6-beta.11
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/AmisGlobalFooter.d.ts +2 -0
- package/dist/amis/AmisGlobalHeader.d.ts +157 -4
- package/dist/amis/AmisGlobalHeaderToolbar.d.ts +8 -0
- package/dist/amis/index.d.ts +2 -0
- package/dist/amis-object.cjs.css +181 -3
- package/dist/amis-object.cjs.js +331 -67
- package/dist/amis-object.cjs.js.map +1 -1
- package/dist/amis-object.esm.css +181 -3
- package/dist/amis-object.esm.js +330 -68
- package/dist/amis-object.esm.js.map +1 -1
- package/dist/amis-object.umd.css +181 -3
- package/dist/amis-object.umd.js +331 -67
- package/dist/amis-object.umd.js.map +1 -1
- package/dist/assets.json +11 -11
- package/dist/meta.js +406 -253
- package/dist/metas/AmisGlobalFooter.d.ts +2 -0
- package/dist/metas/AmisGlobalHeaderToolbar.d.ts +2 -0
- package/dist/pages/PageListView.d.ts +4 -1
- package/package.json +3 -3
package/dist/amis-object.umd.js
CHANGED
|
@@ -1753,8 +1753,8 @@
|
|
|
1753
1753
|
/*
|
|
1754
1754
|
* @Author: baozhoutao@steedos.com
|
|
1755
1755
|
* @Date: 2022-11-01 15:51:00
|
|
1756
|
-
* @LastEditors:
|
|
1757
|
-
* @LastEditTime: 2023-04-
|
|
1756
|
+
* @LastEditors: Please set LastEditors
|
|
1757
|
+
* @LastEditTime: 2023-04-26 11:52:04
|
|
1758
1758
|
* @Description:
|
|
1759
1759
|
*/
|
|
1760
1760
|
|
|
@@ -1846,7 +1846,8 @@
|
|
|
1846
1846
|
"schemaApi": {
|
|
1847
1847
|
"data": {
|
|
1848
1848
|
"isLookup": "${isLookup}",
|
|
1849
|
-
"_master": "${_master}"
|
|
1849
|
+
"_master": "${_master}",
|
|
1850
|
+
"url": "${context.rootUrl}/api/pageSchema/form?app=${appId}&objectApiName=${objectName}&formFactor=${formFactor}"
|
|
1850
1851
|
},
|
|
1851
1852
|
"url": "${context.rootUrl}/api/pageSchema/form?app=${appId}&objectApiName=${objectName}&formFactor=${formFactor}",
|
|
1852
1853
|
"method": "get",
|
|
@@ -1855,7 +1856,7 @@
|
|
|
1855
1856
|
"headers": {
|
|
1856
1857
|
"Authorization": "Bearer ${context.tenantId},${context.authToken}"
|
|
1857
1858
|
},
|
|
1858
|
-
"requestAdaptor": "",
|
|
1859
|
+
"requestAdaptor": "return { ...api, url: api.body.url }",
|
|
1859
1860
|
"adaptor": schemaApiAdaptor
|
|
1860
1861
|
}
|
|
1861
1862
|
}
|
|
@@ -3796,6 +3797,7 @@ setTimeout(()=>{
|
|
|
3796
3797
|
`;
|
|
3797
3798
|
return [
|
|
3798
3799
|
// "bulkActions",
|
|
3800
|
+
...(headerToolbarItems || []),
|
|
3799
3801
|
hiddenCount ? {} :{
|
|
3800
3802
|
"type": "tpl",
|
|
3801
3803
|
"tpl": "${count} 个项目"
|
|
@@ -4892,13 +4894,16 @@ setTimeout(()=>{
|
|
|
4892
4894
|
var sort = orderBy + ' ' + orderDir;
|
|
4893
4895
|
sort = orderBy ? sort : "${sort}";
|
|
4894
4896
|
var allowSearchFields = ${JSON.stringify(searchableFields)};
|
|
4897
|
+
let fieldValue;
|
|
4895
4898
|
if(api.data.$term){
|
|
4896
4899
|
filters = [["name", "contains", "'+ api.data.$term +'"]];
|
|
4897
4900
|
}else if(selfData.op === 'loadOptions' && selfData.value){
|
|
4898
4901
|
if(selfData.value?.indexOf(',') > 0){
|
|
4899
|
-
|
|
4902
|
+
fieldValue = selfData.value.split(',');
|
|
4903
|
+
filters = [["${referenceTo.valueField.name}", "=", fieldValue]];
|
|
4900
4904
|
}else{
|
|
4901
|
-
|
|
4905
|
+
fieldValue = selfData.value;
|
|
4906
|
+
filters = [["${referenceTo.valueField.name}", "=", fieldValue]];
|
|
4902
4907
|
}
|
|
4903
4908
|
}
|
|
4904
4909
|
|
|
@@ -4952,6 +4957,9 @@ setTimeout(()=>{
|
|
|
4952
4957
|
if(enable_tree){
|
|
4953
4958
|
pageSize = 10000;
|
|
4954
4959
|
}
|
|
4960
|
+
if(fieldValue && _.isArray(fieldValue) && fieldValue.length > pageSize){
|
|
4961
|
+
pageSize = fieldValue.length;
|
|
4962
|
+
}
|
|
4955
4963
|
api.data.query = api.data.query.replace(/{__filters}/g, JSON.stringify(filters)).replace('{__top}', pageSize).replace('{__skip}', skip).replace('{__sort}', sort.trim());
|
|
4956
4964
|
return api;
|
|
4957
4965
|
`;
|
|
@@ -6033,7 +6041,7 @@ setTimeout(()=>{
|
|
|
6033
6041
|
columnsTogglable: false,
|
|
6034
6042
|
strictMode:false,
|
|
6035
6043
|
affixHeader: false, // 是否固定表头, 不固定表头, 否则form有y轴滚动条时, 表头会跟随滚动条滚动.
|
|
6036
|
-
|
|
6044
|
+
needConfirm: false,
|
|
6037
6045
|
editable: !readonly,
|
|
6038
6046
|
addable: !readonly,
|
|
6039
6047
|
removable: !readonly,
|
|
@@ -6387,12 +6395,12 @@ setTimeout(()=>{
|
|
|
6387
6395
|
});
|
|
6388
6396
|
}
|
|
6389
6397
|
}else{
|
|
6390
|
-
data[item] = {
|
|
6398
|
+
data[item] = [{
|
|
6391
6399
|
value: fileFieldValue,
|
|
6392
6400
|
name: fileFieldDisplayValue.name,
|
|
6393
6401
|
url: fileFieldDisplayValue.url + "?download=true",
|
|
6394
6402
|
state: "uploaded"
|
|
6395
|
-
};
|
|
6403
|
+
}];
|
|
6396
6404
|
}
|
|
6397
6405
|
}
|
|
6398
6406
|
})
|
|
@@ -7119,6 +7127,13 @@ setTimeout(()=>{
|
|
|
7119
7127
|
}else if(field.type === 'html'){
|
|
7120
7128
|
type = 'markdown';
|
|
7121
7129
|
}
|
|
7130
|
+
let className = "";
|
|
7131
|
+
if(field.type === 'textarea'){
|
|
7132
|
+
className = 'min-w-56';
|
|
7133
|
+
}
|
|
7134
|
+
if(field.wrap === false){
|
|
7135
|
+
className += " whitespace-nowrap";
|
|
7136
|
+
}
|
|
7122
7137
|
if(!field.hidden && !field.extra){
|
|
7123
7138
|
columns.push(Object.assign({}, {
|
|
7124
7139
|
name: field.name,
|
|
@@ -7129,7 +7144,7 @@ setTimeout(()=>{
|
|
|
7129
7144
|
type: type,
|
|
7130
7145
|
tpl: tpl,
|
|
7131
7146
|
toggled: field.toggled,
|
|
7132
|
-
className
|
|
7147
|
+
className,
|
|
7133
7148
|
html: field.type === 'html' ? true : null
|
|
7134
7149
|
// toggled: true
|
|
7135
7150
|
}, field.amis, {name: field.name}));
|
|
@@ -7625,7 +7640,6 @@ setTimeout(()=>{
|
|
|
7625
7640
|
if(_.isEmpty(filters)){
|
|
7626
7641
|
filters = userFilters;
|
|
7627
7642
|
}else{
|
|
7628
|
-
filters.push('and');
|
|
7629
7643
|
filters.push(userFilters)
|
|
7630
7644
|
}
|
|
7631
7645
|
}
|
|
@@ -8053,7 +8067,6 @@ setTimeout(()=>{
|
|
|
8053
8067
|
// ObjectForm会认作用域下的变量值
|
|
8054
8068
|
// TODO: 待组件支持initValues属性后应该改掉,不应该通过data直接传值
|
|
8055
8069
|
// TODO: 全天事件属性传入doc了但是没有生效,需要手动在ObjectForm中勾选全天事件
|
|
8056
|
-
event.data = doc;
|
|
8057
8070
|
const title = "新建 ${objectSchema.label}";
|
|
8058
8071
|
doAction(
|
|
8059
8072
|
{
|
|
@@ -8066,6 +8079,7 @@ setTimeout(()=>{
|
|
|
8066
8079
|
"type": "steedos-object-form",
|
|
8067
8080
|
"objectApiName": "\${objectName}",
|
|
8068
8081
|
"mode": "edit",
|
|
8082
|
+
"defaultData": doc,
|
|
8069
8083
|
"onEvent": {
|
|
8070
8084
|
"submitSucc": {
|
|
8071
8085
|
"weight": 0,
|
|
@@ -12754,7 +12768,7 @@ setTimeout(()=>{
|
|
|
12754
12768
|
return [2 /*return*/, {
|
|
12755
12769
|
type: "service",
|
|
12756
12770
|
data: serviceData,
|
|
12757
|
-
className: "".concat(className, " steedos-object-listview"),
|
|
12771
|
+
className: "".concat(className, " sm:bg-gray-100 h-full sm:shadow sm:rounded-tl sm:rounded-tr steedos-object-listview"),
|
|
12758
12772
|
body: [{
|
|
12759
12773
|
"type": "wrapper",
|
|
12760
12774
|
"size": "none",
|
|
@@ -12957,12 +12971,11 @@ setTimeout(()=>{
|
|
|
12957
12971
|
* @Description:
|
|
12958
12972
|
*/
|
|
12959
12973
|
var AmisRecordDetail = function (props) { return __awaiter(void 0, void 0, void 0, function () {
|
|
12960
|
-
var className, appId, _a, objectApiName, body, schema;
|
|
12974
|
+
var className, $schema, appId, _a, objectApiName, body, schema;
|
|
12961
12975
|
return __generator(this, function (_b) {
|
|
12962
12976
|
switch (_b.label) {
|
|
12963
12977
|
case 0:
|
|
12964
|
-
|
|
12965
|
-
className = props.className, props.$schema, appId = props.appId, _a = props.objectApiName, objectApiName = _a === void 0 ? "space_users" : _a, props.recordId, props.onEvent, props.defaultData, body = props.body;
|
|
12978
|
+
className = props.className, $schema = props.$schema, appId = props.appId, _a = props.objectApiName, objectApiName = _a === void 0 ? "space_users" : _a, props.recordId, props.onEvent, props.defaultData, body = props.body;
|
|
12966
12979
|
return [4 /*yield*/, getRecordDetailSchema(objectApiName, appId)];
|
|
12967
12980
|
case 1:
|
|
12968
12981
|
schema = (_b.sent()).amisSchema;
|
|
@@ -12972,11 +12985,14 @@ setTimeout(()=>{
|
|
|
12972
12985
|
// recordDetailData.recordId = recordId;
|
|
12973
12986
|
// }
|
|
12974
12987
|
// schema.data = Object.assign({}, schema.data, recordDetailData);
|
|
12988
|
+
if (___default.has(props, "recordId") && $schema.recordId !== "${recordId}") {
|
|
12989
|
+
schema.data.recordId = props.recordId;
|
|
12990
|
+
}
|
|
12975
12991
|
schema.className = className;
|
|
12976
12992
|
if (body) {
|
|
12977
12993
|
schema.body = body;
|
|
12978
12994
|
}
|
|
12979
|
-
console.log(
|
|
12995
|
+
// console.log(`AmisRecordDetail====schema==>`, schema)
|
|
12980
12996
|
return [2 /*return*/, schema];
|
|
12981
12997
|
}
|
|
12982
12998
|
});
|
|
@@ -13492,6 +13508,58 @@ setTimeout(()=>{
|
|
|
13492
13508
|
});
|
|
13493
13509
|
}); };
|
|
13494
13510
|
|
|
13511
|
+
/*
|
|
13512
|
+
* @Author: baozhoutao@steedos.com
|
|
13513
|
+
* @Date: 2022-09-01 14:44:57
|
|
13514
|
+
* @LastEditors: baozhoutao@steedos.com
|
|
13515
|
+
* @LastEditTime: 2023-04-11 13:51:50
|
|
13516
|
+
* @Description:
|
|
13517
|
+
*/
|
|
13518
|
+
var AmisGlobalFooter = function (props) { return __awaiter(void 0, void 0, void 0, function () {
|
|
13519
|
+
var _a, stacked, overflow, appId, data, _b, links, _c, showIcon, _d, indentSize, selectedId, isMobile, className, className1, schema;
|
|
13520
|
+
return __generator(this, function (_e) {
|
|
13521
|
+
_a = props.stacked, stacked = _a === void 0 ? false : _a, overflow = props.overflow, appId = props.appId, data = props.data, _b = props.links, links = _b === void 0 ? null : _b, _c = props.showIcon, showIcon = _c === void 0 ? true : _c, _d = props.indentSize, indentSize = _d === void 0 ? 12 : _d, selectedId = props.selectedId;
|
|
13522
|
+
if (!appId) {
|
|
13523
|
+
appId = data.context.appId || 'admin';
|
|
13524
|
+
}
|
|
13525
|
+
isMobile = window.innerWidth <= 768;
|
|
13526
|
+
className = 'fixed bottom-0 z-20 flex justify-evenly w-full h-16 bg-gray-100 steedos-global-footer';
|
|
13527
|
+
className1 = 'fixed bottom-0 z-20 flex justify-center w-full h-16 bg-gray-100 steedos-global-footer';
|
|
13528
|
+
schema = {};
|
|
13529
|
+
if (links) {
|
|
13530
|
+
schema = {
|
|
13531
|
+
type: 'service',
|
|
13532
|
+
mobile: {
|
|
13533
|
+
body: [
|
|
13534
|
+
{
|
|
13535
|
+
"type": "nav",
|
|
13536
|
+
"className": links.length == 1 ? "".concat(className1) : "".concat(className),
|
|
13537
|
+
"stacked": stacked,
|
|
13538
|
+
"overflow": overflow,
|
|
13539
|
+
"indentSize": indentSize,
|
|
13540
|
+
"links": links
|
|
13541
|
+
}
|
|
13542
|
+
]
|
|
13543
|
+
}
|
|
13544
|
+
};
|
|
13545
|
+
}
|
|
13546
|
+
else if (isMobile) {
|
|
13547
|
+
schema = {
|
|
13548
|
+
type: 'service',
|
|
13549
|
+
schemaApi: {
|
|
13550
|
+
"method": "get",
|
|
13551
|
+
"url": "${context.rootUrl}/service/api/apps/".concat(appId, "/menus?mobile=true"),
|
|
13552
|
+
"adaptor": "\n try {\n\n if(payload.children.length == 0){\n payload.data = {};\n return payload\n }\n const data = { nav: [] };\n const stacked = ".concat(stacked, ";\n const showIcon = ").concat(showIcon, ";\n const selectedId = '").concat(selectedId, "';\n _.each(payload.children, (tab)=>{\n const classIcon = tab.icon.replace(/_/g,\"-\");\n data.nav.push({\n \"label\": {\n type: 'tpl',\n tpl: `<span class='fill-slate-500 text-slate-700 block -ml-px no-underline group flex items-center text-[13px] font-medium rounded-md flex-col leading-3 nav-label'><svg class=\"slds-icon slds-icon_container slds-icon-standard-`+classIcon+` flex-shrink-0 h-10 w-10\"><use xlink:href=\"/assets/icons/standard-sprite/svg/symbols.svg#${tab.icon || 'account'}\"></use></svg>${tab.name}</span>`,\n className:'h-full flex items-center'\n },\n \"to\": tab.path,\n \"target\":tab.target\n // active: selectedId === tab.id,\n });\n })\n\n payload.data = {\n \"type\": \"nav\",\n className: payload.children.length ==1 ? '").concat(className1, "' : '").concat(className, "',\n \"stacked\": ").concat(stacked, ",\n \"overflow\": {\n \"enable\": true,\n \"maxVisibleCount\": 4,\n \"overflowPopoverClassName\": \"steedos-global-footer-popup\",\n \"overflowLabel\":{\n \"type\": 'tpl',\n \"tpl\": `<span class='fill-slate-500 text-slate-700 block -ml-px no-underline group flex items-center text-[13px] font-medium rounded-md flex-col leading-3 nav-label'><svg class=\" flex-shrink-0 h-10 w-10\"><use xlink:href=\"/assets/icons/standard-sprite/svg/symbols.svg#lead_list\"></use></svg>\u83DC\u5355</span>`,\n \"className\":'h-full flex items-center'\n },\n \"overflowIndicator\":\"\"\n },\n \"indentSize\": ").concat(indentSize, ",\n \"links\": data.nav,\n };\n } catch (error) {\n console.log(`error`, error)\n }\n return payload;\n "),
|
|
13553
|
+
"headers": {
|
|
13554
|
+
"Authorization": "Bearer ${context.tenantId},${context.authToken}"
|
|
13555
|
+
}
|
|
13556
|
+
}
|
|
13557
|
+
};
|
|
13558
|
+
}
|
|
13559
|
+
return [2 /*return*/, schema];
|
|
13560
|
+
});
|
|
13561
|
+
}); };
|
|
13562
|
+
|
|
13495
13563
|
/*
|
|
13496
13564
|
* @Author: baozhoutao@steedos.com
|
|
13497
13565
|
* @Date: 2022-09-01 14:44:57
|
|
@@ -13499,7 +13567,7 @@ setTimeout(()=>{
|
|
|
13499
13567
|
* @LastEditTime: 2023-03-17 14:09:53
|
|
13500
13568
|
* @Description:
|
|
13501
13569
|
*/
|
|
13502
|
-
var
|
|
13570
|
+
var AmisGlobalHeaderToolbar = function (props) { return __awaiter(void 0, void 0, void 0, function () {
|
|
13503
13571
|
var _a, className, data, _b, logoutScript, _c, customButtons, avatarSrc;
|
|
13504
13572
|
var _d, _e;
|
|
13505
13573
|
return __generator(this, function (_f) {
|
|
@@ -13511,7 +13579,7 @@ setTimeout(()=>{
|
|
|
13511
13579
|
return [2 /*return*/, {
|
|
13512
13580
|
"type": "wrapper",
|
|
13513
13581
|
"id": "u:9c3d279be31a",
|
|
13514
|
-
"className": "steedos-global-header leading-3\t".concat(className),
|
|
13582
|
+
"className": "steedos-global-header-toolbar leading-3\t".concat(className),
|
|
13515
13583
|
"size": "xs",
|
|
13516
13584
|
"body": __spreadArray(__spreadArray([], __read(customButtons), false), [
|
|
13517
13585
|
{
|
|
@@ -13809,25 +13877,25 @@ setTimeout(()=>{
|
|
|
13809
13877
|
},
|
|
13810
13878
|
"level": "link"
|
|
13811
13879
|
},
|
|
13812
|
-
|
|
13813
|
-
|
|
13814
|
-
|
|
13815
|
-
|
|
13816
|
-
|
|
13817
|
-
|
|
13818
|
-
|
|
13819
|
-
|
|
13820
|
-
|
|
13821
|
-
|
|
13822
|
-
|
|
13823
|
-
|
|
13824
|
-
|
|
13825
|
-
|
|
13826
|
-
|
|
13827
|
-
|
|
13828
|
-
|
|
13829
|
-
|
|
13830
|
-
|
|
13880
|
+
{
|
|
13881
|
+
"type": "button",
|
|
13882
|
+
"label": "关于",
|
|
13883
|
+
"className": "flex",
|
|
13884
|
+
"onEvent": {
|
|
13885
|
+
"click": {
|
|
13886
|
+
"actions": [
|
|
13887
|
+
{
|
|
13888
|
+
"args": {
|
|
13889
|
+
"url": "/app/-/page/about",
|
|
13890
|
+
"blank": false
|
|
13891
|
+
},
|
|
13892
|
+
"actionType": "link"
|
|
13893
|
+
}
|
|
13894
|
+
]
|
|
13895
|
+
}
|
|
13896
|
+
},
|
|
13897
|
+
"level": "link"
|
|
13898
|
+
},
|
|
13831
13899
|
{
|
|
13832
13900
|
"type": "button",
|
|
13833
13901
|
"label": "注销",
|
|
@@ -13856,6 +13924,194 @@ setTimeout(()=>{
|
|
|
13856
13924
|
});
|
|
13857
13925
|
}); };
|
|
13858
13926
|
|
|
13927
|
+
/*
|
|
13928
|
+
* @Author: baozhoutao@steedos.com
|
|
13929
|
+
* @Date: 2022-09-01 14:44:57
|
|
13930
|
+
* @LastEditors: baozhoutao@steedos.com
|
|
13931
|
+
* @LastEditTime: 2023-04-11 13:51:50
|
|
13932
|
+
* @Description:
|
|
13933
|
+
*/
|
|
13934
|
+
var AmisGlobalHeader = function (props) { return __awaiter(void 0, void 0, void 0, function () {
|
|
13935
|
+
var logoSrc, isMobile, schema;
|
|
13936
|
+
return __generator(this, function (_a) {
|
|
13937
|
+
logoSrc = props.logoSrc;
|
|
13938
|
+
isMobile = window.innerWidth <= 768;
|
|
13939
|
+
schema = {
|
|
13940
|
+
"type": "wrapper",
|
|
13941
|
+
"className": 'p-0',
|
|
13942
|
+
body: [
|
|
13943
|
+
{
|
|
13944
|
+
"type": "wrapper",
|
|
13945
|
+
"className": "bg-white sticky p-0 top-0 z-40 w-full flex-none backdrop-blur transition-colors duration-500 lg:z-50 sm:shadow border-b-[3px] border-sky-500 border-solid steedos-header-container",
|
|
13946
|
+
body: [
|
|
13947
|
+
{
|
|
13948
|
+
"type": "wrapper",
|
|
13949
|
+
"className": 'flex w-full px-4 h-[50px] p-0 justify-between items-center steedos-header-container-line-one',
|
|
13950
|
+
"body": [
|
|
13951
|
+
{
|
|
13952
|
+
type: "wrapper",
|
|
13953
|
+
className: 'p-0 flex flex-1 items-center',
|
|
13954
|
+
body: [
|
|
13955
|
+
{
|
|
13956
|
+
"type": "button",
|
|
13957
|
+
"className": "toggle-sidebar flex items-center pr-4",
|
|
13958
|
+
"hiddenOn": "true",
|
|
13959
|
+
"onEvent": {
|
|
13960
|
+
"click": {
|
|
13961
|
+
"actions": [
|
|
13962
|
+
{
|
|
13963
|
+
"actionType": "custom",
|
|
13964
|
+
"script": "document.body.classList.toggle('sidebar-open')",
|
|
13965
|
+
}
|
|
13966
|
+
]
|
|
13967
|
+
}
|
|
13968
|
+
},
|
|
13969
|
+
"body": [
|
|
13970
|
+
{
|
|
13971
|
+
"type": "steedos-icon",
|
|
13972
|
+
"category": "utility",
|
|
13973
|
+
"name": "rows",
|
|
13974
|
+
"colorVariant": "default",
|
|
13975
|
+
"id": "u:afc3a08e8cf3",
|
|
13976
|
+
"className": "slds-button_icon slds-global-header__icon"
|
|
13977
|
+
}
|
|
13978
|
+
],
|
|
13979
|
+
},
|
|
13980
|
+
{
|
|
13981
|
+
"className": 'block h-10 w-auto mr-4',
|
|
13982
|
+
"type": "tpl",
|
|
13983
|
+
"tpl": "<a href='/app' class='flex items-center '><img class='block h-10 w-auto' src='".concat(logoSrc, "'></a>"),
|
|
13984
|
+
},
|
|
13985
|
+
],
|
|
13986
|
+
},
|
|
13987
|
+
{
|
|
13988
|
+
"type": "steedos-global-header-toolbar",
|
|
13989
|
+
"label": "Global Header",
|
|
13990
|
+
className: 'flex flex-nowrap gap-x-3 items-center',
|
|
13991
|
+
logoutScript: "window.signOut();",
|
|
13992
|
+
customButtons: [
|
|
13993
|
+
{
|
|
13994
|
+
"type": "button",
|
|
13995
|
+
"className": "toggle-sidebar",
|
|
13996
|
+
"visibleOn": "${AND(app.showSidebar,!" + isMobile + ")}",
|
|
13997
|
+
"onEvent": {
|
|
13998
|
+
"click": {
|
|
13999
|
+
"actions": [
|
|
14000
|
+
{
|
|
14001
|
+
"actionType": "custom",
|
|
14002
|
+
"script": "document.body.classList.toggle('sidebar-open')",
|
|
14003
|
+
}
|
|
14004
|
+
]
|
|
14005
|
+
}
|
|
14006
|
+
},
|
|
14007
|
+
"body": [
|
|
14008
|
+
{
|
|
14009
|
+
"type": "steedos-icon",
|
|
14010
|
+
"category": "utility",
|
|
14011
|
+
"name": "rows",
|
|
14012
|
+
"colorVariant": "default",
|
|
14013
|
+
"id": "u:afc3a08e8cf3",
|
|
14014
|
+
"className": "slds-button_icon slds-global-header__icon"
|
|
14015
|
+
}
|
|
14016
|
+
],
|
|
14017
|
+
},
|
|
14018
|
+
{
|
|
14019
|
+
"type": "steedos-app-launcher",
|
|
14020
|
+
"showAppName": false,
|
|
14021
|
+
"appId": "${app.id}",
|
|
14022
|
+
"visibleOn": "${isMobile}"
|
|
14023
|
+
}
|
|
14024
|
+
]
|
|
14025
|
+
}
|
|
14026
|
+
],
|
|
14027
|
+
},
|
|
14028
|
+
{
|
|
14029
|
+
"type": "grid",
|
|
14030
|
+
"className": 'steedos-context-bar flex flex-nowrap h-10 leading-5 pl-4 mb-[-3px] steedos-header-container-line-two',
|
|
14031
|
+
"hiddenOn": "${" + isMobile + "}",
|
|
14032
|
+
"columns": [
|
|
14033
|
+
{
|
|
14034
|
+
"columnClassName": "items-center flex pb-0",
|
|
14035
|
+
"body": [
|
|
14036
|
+
{
|
|
14037
|
+
"type": "steedos-app-launcher",
|
|
14038
|
+
"showAppName": true,
|
|
14039
|
+
"appId": "${app.id}",
|
|
14040
|
+
}
|
|
14041
|
+
],
|
|
14042
|
+
"md": "auto",
|
|
14043
|
+
"valign": "middle"
|
|
14044
|
+
},
|
|
14045
|
+
{
|
|
14046
|
+
"columnClassName": "flex overflow-hidden",
|
|
14047
|
+
"hiddenOn": "${app.showSidebar === true}",
|
|
14048
|
+
"body": [
|
|
14049
|
+
{
|
|
14050
|
+
"visibleOn": "${AND(!app.showSidebar,!" + isMobile + ")}",
|
|
14051
|
+
"type": "steedos-app-menu",
|
|
14052
|
+
"stacked": false,
|
|
14053
|
+
showIcon: false,
|
|
14054
|
+
"appId": "${app.id}",
|
|
14055
|
+
overflow: {
|
|
14056
|
+
enable: false,
|
|
14057
|
+
itemWidth: 80,
|
|
14058
|
+
},
|
|
14059
|
+
"id": "u:77851eb4aa89",
|
|
14060
|
+
}
|
|
14061
|
+
],
|
|
14062
|
+
"id": "u:5367229505d8",
|
|
14063
|
+
"md": "",
|
|
14064
|
+
"valign": "middle",
|
|
14065
|
+
}
|
|
14066
|
+
],
|
|
14067
|
+
},
|
|
14068
|
+
],
|
|
14069
|
+
},
|
|
14070
|
+
{
|
|
14071
|
+
"type": "button",
|
|
14072
|
+
"className": 'p-0 absolute inset-0 mt-[50px] sm:mt-[90px]',
|
|
14073
|
+
hiddenOn: "${OR(app.showSidebar != true,isMobile)}",
|
|
14074
|
+
body: [
|
|
14075
|
+
{
|
|
14076
|
+
type: "wrapper",
|
|
14077
|
+
className: 'sidebar-wrapper px-0 pt-4 pb-16 fixed z-20 h-full h-fill ease-in-out duration-300 flex flex-col border-r overflow-y-auto bg-white border-slate-200 block -translate-x-0 sm:w-[220px] w-64',
|
|
14078
|
+
body: [
|
|
14079
|
+
{
|
|
14080
|
+
"type": "steedos-app-launcher",
|
|
14081
|
+
"className": "px-4 pb-4",
|
|
14082
|
+
"visibleOn": "${isMobile}",
|
|
14083
|
+
"showAppName": true
|
|
14084
|
+
},
|
|
14085
|
+
{
|
|
14086
|
+
"type": "steedos-app-menu",
|
|
14087
|
+
"stacked": true,
|
|
14088
|
+
"appId": "${app.id}",
|
|
14089
|
+
},
|
|
14090
|
+
]
|
|
14091
|
+
},
|
|
14092
|
+
{
|
|
14093
|
+
"type": "wrapper",
|
|
14094
|
+
"className": 'sidebar-overlay',
|
|
14095
|
+
"hiddenOn": "${!isMobile}",
|
|
14096
|
+
}
|
|
14097
|
+
],
|
|
14098
|
+
"onEvent": {
|
|
14099
|
+
"click": {
|
|
14100
|
+
"actions": [
|
|
14101
|
+
{
|
|
14102
|
+
"actionType": "custom",
|
|
14103
|
+
"script": "console.log(event.target); if(window.innerWidth < 768){ document.body.classList.remove('sidebar-open'); }",
|
|
14104
|
+
}
|
|
14105
|
+
]
|
|
14106
|
+
}
|
|
14107
|
+
},
|
|
14108
|
+
},
|
|
14109
|
+
],
|
|
14110
|
+
};
|
|
14111
|
+
return [2 /*return*/, schema];
|
|
14112
|
+
});
|
|
14113
|
+
}); };
|
|
14114
|
+
|
|
13859
14115
|
var AmisSteedosField = function (props) { return __awaiter(void 0, void 0, void 0, function () {
|
|
13860
14116
|
var steedosField, field, _a, readonly, _b, ctx, config, $schema, schema, error_1;
|
|
13861
14117
|
return __generator(this, function (_c) {
|
|
@@ -13904,39 +14160,42 @@ setTimeout(()=>{
|
|
|
13904
14160
|
* @Author: baozhoutao@steedos.com
|
|
13905
14161
|
* @Date: 2023-01-14 16:41:24
|
|
13906
14162
|
* @LastEditors: baozhoutao@steedos.com
|
|
13907
|
-
* @LastEditTime: 2023-
|
|
14163
|
+
* @LastEditTime: 2023-04-21 11:50:26
|
|
13908
14164
|
* @Description:
|
|
13909
14165
|
*/
|
|
13910
14166
|
var getSelectFlowSchema = function (id, props) {
|
|
13911
14167
|
var label = props.label, data = props.data, name = props.name, required = props.required, _a = props.action, action = _a === void 0 ? 'query' : _a, _b = props.distributeInstanceId, distributeInstanceId = _b === void 0 ? "" : _b, _c = props.distributeStepId, distributeStepId = _c === void 0 ? "" : _c, _d = props.mode, mode = _d === void 0 ? 'input-tree' : _d, className = props.className, onEvent = props.onEvent, _e = props.multiple, multiple = _e === void 0 ? false : _e, delimiter = props.delimiter, joinValues = props.joinValues, extractValue = props.extractValue, searchable = props.searchable, _f = props.showIcon, showIcon = _f === void 0 ? true : _f, _g = props.showRadio, showRadio = _g === void 0 ? false : _g, showOutline = props.showOutline, initiallyOpen = props.initiallyOpen, unfoldedLevel = props.unfoldedLevel, treeContainerClassName = props.treeContainerClassName, _h = props.amis, amis = _h === void 0 ? {} : _h;
|
|
13912
14168
|
console.log("=====onEvent", onEvent);
|
|
13913
|
-
return __assign$2({ "type": mode, "id": id, "label": label, "name": name, "options": [], "multiple": multiple, "delimiter": delimiter, "joinValues": joinValues, "extractValue": extractValue, "searchable": searchable, "showOutline": showOutline, "initiallyOpen": initiallyOpen, "unfoldedLevel": unfoldedLevel, "className": className, "required": required, "treeContainerClassName": treeContainerClassName,
|
|
13914
|
-
|
|
13915
|
-
|
|
13916
|
-
|
|
13917
|
-
|
|
13918
|
-
|
|
13919
|
-
|
|
13920
|
-
|
|
13921
|
-
|
|
13922
|
-
|
|
13923
|
-
|
|
13924
|
-
|
|
13925
|
-
|
|
13926
|
-
|
|
13927
|
-
|
|
13928
|
-
|
|
13929
|
-
|
|
13930
|
-
|
|
13931
|
-
|
|
13932
|
-
|
|
13933
|
-
|
|
13934
|
-
|
|
13935
|
-
|
|
13936
|
-
|
|
13937
|
-
|
|
13938
|
-
|
|
13939
|
-
}
|
|
14169
|
+
return __assign$2({ "type": mode, "id": id, "label": label, "name": name, "options": [], "multiple": multiple, "delimiter": delimiter, "joinValues": joinValues, "extractValue": extractValue, "searchable": searchable, "showOutline": showOutline, "initiallyOpen": initiallyOpen, "unfoldedLevel": unfoldedLevel, "className": className, "required": required, "treeContainerClassName": treeContainerClassName,
|
|
14170
|
+
// "menuTpl": {
|
|
14171
|
+
// // type: "button",
|
|
14172
|
+
// type: "tpl",
|
|
14173
|
+
// tpl: "<div class='flex justify-between'><span>${label}</span><span class='rounded p-1 text-xs text-center w-14 ${children != null ? \'hidden\' : \'\'}'><button><i class='fa-regular fa-star'></i></button></span></div>",
|
|
14174
|
+
// "onEvent": {
|
|
14175
|
+
// "click": {
|
|
14176
|
+
// "weight": 0,
|
|
14177
|
+
// "actions": [
|
|
14178
|
+
// {
|
|
14179
|
+
// actionType: 'custom',
|
|
14180
|
+
// script: "console.log('====event', event), event.preventDefault(); event.stopPropagation()"
|
|
14181
|
+
// },
|
|
14182
|
+
// {
|
|
14183
|
+
// "args": {
|
|
14184
|
+
// "api": {
|
|
14185
|
+
// "url": "/aaa",
|
|
14186
|
+
// "method": "get",
|
|
14187
|
+
// "messages": {
|
|
14188
|
+
// }
|
|
14189
|
+
// }
|
|
14190
|
+
// },
|
|
14191
|
+
// "actionType": "download",
|
|
14192
|
+
// "stopPropagation": true
|
|
14193
|
+
// }
|
|
14194
|
+
// ]
|
|
14195
|
+
// }
|
|
14196
|
+
// }
|
|
14197
|
+
// },
|
|
14198
|
+
"source": {
|
|
13940
14199
|
"method": "post",
|
|
13941
14200
|
"url": "${context.rootUrl}/graphql?keywords=${keywords}",
|
|
13942
14201
|
"requestAdaptor": "\n const keywords = api.body.keywords || '';\n const appId = '".concat(data.app_id || '', "';\n api.data = {\n query: `\n {\n options: flows__getList(action: \"").concat(action, "\", keywords: \"${keywords}\", appId: \"${appId}\", distributeInstanceId: \"").concat(distributeInstanceId, "\", distributeStepId: \"").concat(distributeStepId, "\"){\n value:_id\n label:name\n children: flows{\n value: _id,\n label: name\n }\n }\n }\n `\n }\n "),
|
|
@@ -14062,7 +14321,10 @@ setTimeout(()=>{
|
|
|
14062
14321
|
// const pageSplitClassName = listSchema.pageSplitClassName || 'p-0 flex flex-1 overflow-hidden h-full'
|
|
14063
14322
|
return [2 /*return*/, {
|
|
14064
14323
|
type: 'service',
|
|
14065
|
-
className:
|
|
14324
|
+
className: {
|
|
14325
|
+
"h-full": "true",
|
|
14326
|
+
"sm:px-3 sm:pt-3": "${display != 'split'}"
|
|
14327
|
+
},
|
|
14066
14328
|
body: listSchema
|
|
14067
14329
|
}];
|
|
14068
14330
|
}
|
|
@@ -14189,7 +14451,9 @@ setTimeout(()=>{
|
|
|
14189
14451
|
|
|
14190
14452
|
exports.AmisAppLauncher = AmisAppLauncher;
|
|
14191
14453
|
exports.AmisAppMenu = AmisAppMenu;
|
|
14454
|
+
exports.AmisGlobalFooter = AmisGlobalFooter;
|
|
14192
14455
|
exports.AmisGlobalHeader = AmisGlobalHeader;
|
|
14456
|
+
exports.AmisGlobalHeaderToolbar = AmisGlobalHeaderToolbar;
|
|
14193
14457
|
exports.AmisInstanceDetail = AmisInstanceDetail;
|
|
14194
14458
|
exports.AmisLib = index_esm$1;
|
|
14195
14459
|
exports.AmisLogo = AmisLogo;
|