@steedos-widgets/amis-object 1.2.39-beta.1 → 1.2.39
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-object.cjs.css +39 -4
- package/dist/amis-object.cjs.js +37 -14
- package/dist/amis-object.cjs.js.map +1 -1
- package/dist/amis-object.esm.css +39 -4
- package/dist/amis-object.esm.js +37 -14
- package/dist/amis-object.esm.js.map +1 -1
- package/dist/amis-object.umd.css +39 -4
- package/dist/amis-object.umd.js +37 -14
- package/dist/amis-object.umd.js.map +1 -1
- package/dist/assets.json +16 -16
- package/dist/pages/PageListView.d.ts +2 -1
- package/package.json +3 -3
package/dist/amis-object.cjs.css
CHANGED
|
@@ -419,12 +419,12 @@ fieldset.antd-Collapse > legend{
|
|
|
419
419
|
.mr-4 {
|
|
420
420
|
margin-right: 1rem
|
|
421
421
|
}
|
|
422
|
-
.mr-2 {
|
|
423
|
-
margin-right: 0.5rem
|
|
424
|
-
}
|
|
425
422
|
.mr-1 {
|
|
426
423
|
margin-right: 0.25rem
|
|
427
424
|
}
|
|
425
|
+
.mr-2 {
|
|
426
|
+
margin-right: 0.5rem
|
|
427
|
+
}
|
|
428
428
|
.mt-0\.5 {
|
|
429
429
|
margin-top: 0.125rem
|
|
430
430
|
}
|
|
@@ -1185,7 +1185,7 @@ fieldset.antd-Collapse > legend{
|
|
|
1185
1185
|
position: unset;
|
|
1186
1186
|
}
|
|
1187
1187
|
.steedos-select-user .antd-Table .antd-Table-content {
|
|
1188
|
-
max-height: calc(100vh -
|
|
1188
|
+
max-height: calc(100vh - 343px);
|
|
1189
1189
|
}
|
|
1190
1190
|
.steedos-select-user .antd-Table .antd-SearchBox {
|
|
1191
1191
|
margin-top: 0;
|
|
@@ -1363,6 +1363,41 @@ fieldset.antd-Collapse > legend{
|
|
|
1363
1363
|
width: 100%;
|
|
1364
1364
|
justify-content: unset;
|
|
1365
1365
|
}
|
|
1366
|
+
/*
|
|
1367
|
+
列表快速搜索,手机端及PC端分栏模式需要独占一行
|
|
1368
|
+
*/
|
|
1369
|
+
.steedos-crud-mobile-search-box .antd-Crud .antd-Crud-toolbar .antd-Crud-toolbar-item--right:last-child {
|
|
1370
|
+
width: 100%;
|
|
1371
|
+
margin-top: 8px;
|
|
1372
|
+
}
|
|
1373
|
+
.steedos-crud-mobile-search-box .antd-Crud .antd-Crud-toolbar .antd-Crud-toolbar-item--right:last-child .antd-TooltipWrapper {
|
|
1374
|
+
width: 100%;
|
|
1375
|
+
}
|
|
1376
|
+
.steedos-crud-mobile-search-box .antd-Crud .antd-Crud-toolbar .antd-Crud-toolbar-item--right:last-child .antd-TooltipWrapper .antd-SearchBox.is-active {
|
|
1377
|
+
width: 100%;
|
|
1378
|
+
}
|
|
1379
|
+
.page-list-split .steedos-object-listview .antd-Crud .antd-Crud-toolbar .antd-Crud-toolbar-item--right:last-child {
|
|
1380
|
+
width: 100%;
|
|
1381
|
+
margin-top: 8px;
|
|
1382
|
+
}
|
|
1383
|
+
.page-list-split .steedos-object-listview .antd-Crud .antd-Crud-toolbar .antd-Crud-toolbar-item--right:last-child .antd-TooltipWrapper {
|
|
1384
|
+
width: 100%;
|
|
1385
|
+
}
|
|
1386
|
+
.page-list-split .steedos-object-listview .antd-Crud .antd-Crud-toolbar .antd-Crud-toolbar-item--right:last-child .antd-TooltipWrapper .antd-SearchBox.is-active {
|
|
1387
|
+
width: 100%;
|
|
1388
|
+
}
|
|
1389
|
+
@media (max-width: 768px) {
|
|
1390
|
+
.steedos-object-listview .antd-Crud .antd-Crud-toolbar .antd-Crud-toolbar-item--right:last-child {
|
|
1391
|
+
width: 100%;
|
|
1392
|
+
margin-top: 8px;
|
|
1393
|
+
}
|
|
1394
|
+
.steedos-object-listview .antd-Crud .antd-Crud-toolbar .antd-Crud-toolbar-item--right:last-child .antd-TooltipWrapper {
|
|
1395
|
+
width: 100%;
|
|
1396
|
+
}
|
|
1397
|
+
.steedos-object-listview .antd-Crud .antd-Crud-toolbar .antd-Crud-toolbar-item--right:last-child .antd-TooltipWrapper .antd-SearchBox.is-active {
|
|
1398
|
+
width: 100%;
|
|
1399
|
+
}
|
|
1400
|
+
}
|
|
1366
1401
|
|
|
1367
1402
|
@media (min-width: 767px) {
|
|
1368
1403
|
.steedos-object-table tbody td.antd-Field--quickEditable div {
|
package/dist/amis-object.cjs.js
CHANGED
|
@@ -8407,19 +8407,19 @@ crudService && crudService.setData({showFieldsFilter: toShowFieldsFilter});
|
|
|
8407
8407
|
`;
|
|
8408
8408
|
|
|
8409
8409
|
|
|
8410
|
-
function getObjectHeaderToolbar(mainObject, fields, formFactor, {showDisplayAs = false, hiddenCount = false, headerToolbarItems, filterVisible = true} = {}){
|
|
8410
|
+
function getObjectHeaderToolbar(mainObject, fields, formFactor, { showDisplayAs = false, hiddenCount = false, headerToolbarItems, filterVisible = true, isLookup = false } = {}){
|
|
8411
8411
|
// console.log(`getObjectHeaderToolbar====>`, filterVisible)
|
|
8412
8412
|
// console.log(`getObjectHeaderToolbar`, mainObject)
|
|
8413
8413
|
const searchableFieldsLabel = [];
|
|
8414
8414
|
_.each(fields, function (field) {
|
|
8415
|
-
if (field.searchable) {
|
|
8415
|
+
if (field.searchable && SEARCHABLE_FIELD_TYPES.indexOf(field.type) > -1) {
|
|
8416
8416
|
searchableFieldsLabel.push(field.label);
|
|
8417
8417
|
}
|
|
8418
8418
|
});
|
|
8419
8419
|
const listViewPropsStoreKey = location.pathname + "/crud";
|
|
8420
8420
|
let localListViewProps = sessionStorage.getItem(listViewPropsStoreKey);
|
|
8421
8421
|
let crudKeywords = "";
|
|
8422
|
-
if(localListViewProps){
|
|
8422
|
+
if(localListViewProps && !isLookup){
|
|
8423
8423
|
localListViewProps = JSON.parse(localListViewProps);
|
|
8424
8424
|
crudKeywords = (localListViewProps && localListViewProps.__keywords) || "";
|
|
8425
8425
|
}
|
|
@@ -8479,7 +8479,7 @@ function getObjectHeaderToolbar(mainObject, fields, formFactor, {showDisplayAs =
|
|
|
8479
8479
|
],
|
|
8480
8480
|
"size":8,
|
|
8481
8481
|
"animation": true,
|
|
8482
|
-
"visibleOn": "${isFieldsFilterEmpty == false}"
|
|
8482
|
+
"visibleOn": "${isFieldsFilterEmpty == false && isLookup != true}"
|
|
8483
8483
|
},
|
|
8484
8484
|
"align": "right",
|
|
8485
8485
|
"className": "bg-white p-2 rounded border-gray-300 text-gray-500",
|
|
@@ -8494,7 +8494,27 @@ function getObjectHeaderToolbar(mainObject, fields, formFactor, {showDisplayAs =
|
|
|
8494
8494
|
}
|
|
8495
8495
|
}
|
|
8496
8496
|
} : {},
|
|
8497
|
-
getDisplayAsButton(mainObject?.name)
|
|
8497
|
+
getDisplayAsButton(mainObject?.name),
|
|
8498
|
+
{
|
|
8499
|
+
"type": "tooltip-wrapper",
|
|
8500
|
+
"align": "right",
|
|
8501
|
+
"title": "",
|
|
8502
|
+
"content": "可搜索字段:" + searchableFieldsLabel.join(","),
|
|
8503
|
+
"placement": "bottom",
|
|
8504
|
+
"tooltipTheme": "dark",
|
|
8505
|
+
"trigger": "click",
|
|
8506
|
+
// "className": "mr-1",
|
|
8507
|
+
"body": [
|
|
8508
|
+
{
|
|
8509
|
+
"type": "search-box",
|
|
8510
|
+
"name": "__keywords",
|
|
8511
|
+
"placeholder": "请输入关键字",
|
|
8512
|
+
"value": crudKeywords,
|
|
8513
|
+
"clearable": true,
|
|
8514
|
+
"clearAndSubmit": true
|
|
8515
|
+
}
|
|
8516
|
+
]
|
|
8517
|
+
},
|
|
8498
8518
|
]
|
|
8499
8519
|
}else {
|
|
8500
8520
|
return [
|
|
@@ -8527,7 +8547,7 @@ function getObjectHeaderToolbar(mainObject, fields, formFactor, {showDisplayAs =
|
|
|
8527
8547
|
],
|
|
8528
8548
|
"size":8,
|
|
8529
8549
|
"animation": true,
|
|
8530
|
-
"visibleOn": "${isFieldsFilterEmpty == false}"
|
|
8550
|
+
"visibleOn": "${isFieldsFilterEmpty == false && isLookup != true}"
|
|
8531
8551
|
},
|
|
8532
8552
|
"align": "right",
|
|
8533
8553
|
"className": "bg-white p-2 rounded border-gray-300 text-gray-500",
|
|
@@ -8558,7 +8578,7 @@ function getObjectHeaderToolbar(mainObject, fields, formFactor, {showDisplayAs =
|
|
|
8558
8578
|
"type": "tooltip-wrapper",
|
|
8559
8579
|
"align": "right",
|
|
8560
8580
|
"title": "",
|
|
8561
|
-
"content": "
|
|
8581
|
+
"content": "可搜索字段:" + searchableFieldsLabel.join(","),
|
|
8562
8582
|
"placement": "bottom",
|
|
8563
8583
|
"tooltipTheme": "dark",
|
|
8564
8584
|
"trigger": "click",
|
|
@@ -8924,8 +8944,8 @@ function getLookupSapceUserTreeSchema(){
|
|
|
8924
8944
|
"style": {
|
|
8925
8945
|
"max-height": "100%",
|
|
8926
8946
|
"position": "absolute",
|
|
8927
|
-
"left": "-
|
|
8928
|
-
"width": "
|
|
8947
|
+
"left": "-330px",
|
|
8948
|
+
"width": "320px",
|
|
8929
8949
|
"bottom": 0,
|
|
8930
8950
|
"top": "0",
|
|
8931
8951
|
"overflow": "auto",
|
|
@@ -8991,7 +9011,7 @@ async function lookupToAmisPicker(field, readonly, ctx){
|
|
|
8991
9011
|
})){
|
|
8992
9012
|
i++;
|
|
8993
9013
|
tableFields.push(field);
|
|
8994
|
-
if(field.searchable){
|
|
9014
|
+
if(field.searchable && SEARCHABLE_FIELD_TYPES.indexOf(field.type) > -1){
|
|
8995
9015
|
searchableFields.push(field.name);
|
|
8996
9016
|
}
|
|
8997
9017
|
}
|
|
@@ -9210,13 +9230,13 @@ async function lookupToAmisPicker(field, readonly, ctx){
|
|
|
9210
9230
|
if(referenceTo.objectName === "space_users" && field.reference_to_field === "user" && !isMobile){
|
|
9211
9231
|
headerToolbarItems = getLookupSapceUserTreeSchema();
|
|
9212
9232
|
pickerSchema["style"] = {
|
|
9213
|
-
"margin-left":"
|
|
9233
|
+
"margin-left":"330px",
|
|
9214
9234
|
"min-height": "300px"
|
|
9215
9235
|
};
|
|
9216
9236
|
pickerSchema.className = pickerSchema.className || "" + " steedos-select-user";
|
|
9217
9237
|
}
|
|
9218
9238
|
|
|
9219
|
-
pickerSchema.headerToolbar = getObjectHeaderToolbar(refObjectConfig, ctx.formFactor, { headerToolbarItems });
|
|
9239
|
+
pickerSchema.headerToolbar = getObjectHeaderToolbar(refObjectConfig, fieldsArr, ctx.formFactor, { headerToolbarItems, isLookup: true });
|
|
9220
9240
|
const isAllowCreate = refObjectConfig.permissions.allowCreate;
|
|
9221
9241
|
if (isAllowCreate) {
|
|
9222
9242
|
const new_button = await getSchema$5(refObjectConfig, { appId: ctx.appId, objectName: refObjectConfig.name, formFactor: ctx.formFactor });
|
|
@@ -9939,6 +9959,7 @@ const getAmisFileSchema = (steedosField, readonly)=>{
|
|
|
9939
9959
|
return readonly ? getAmisFileReadonlySchema(steedosField) : getAmisFileEditSchema(steedosField);
|
|
9940
9960
|
};
|
|
9941
9961
|
|
|
9962
|
+
const SEARCHABLE_FIELD_TYPES = ["text", "textarea", "autonumber", "url", "email"];
|
|
9942
9963
|
const OMIT_FIELDS = ['created', 'created_by', 'modified', 'modified_by'];
|
|
9943
9964
|
// const Lookup = require('./lookup');
|
|
9944
9965
|
|
|
@@ -10713,6 +10734,7 @@ if (typeof window != 'undefined') {
|
|
|
10713
10734
|
|
|
10714
10735
|
var index = /*#__PURE__*/Object.freeze({
|
|
10715
10736
|
__proto__: null,
|
|
10737
|
+
SEARCHABLE_FIELD_TYPES: SEARCHABLE_FIELD_TYPES,
|
|
10716
10738
|
OMIT_FIELDS: OMIT_FIELDS,
|
|
10717
10739
|
getBaseFields: getBaseFields,
|
|
10718
10740
|
getAmisFieldType: getAmisFieldType,
|
|
@@ -11500,7 +11522,7 @@ async function getTableApi(mainObject, fields, options){
|
|
|
11500
11522
|
baseFilters = filter;
|
|
11501
11523
|
}
|
|
11502
11524
|
___default__namespace.each(fields,function(field){
|
|
11503
|
-
if(field.searchable){
|
|
11525
|
+
if(field.searchable && SEARCHABLE_FIELD_TYPES.indexOf(field.type) > -1){
|
|
11504
11526
|
searchableFields.push(field.name);
|
|
11505
11527
|
}
|
|
11506
11528
|
});
|
|
@@ -19700,7 +19722,8 @@ var PageListView = function (props) { return __awaiter(void 0, void 0, void 0, f
|
|
|
19700
19722
|
type: 'service',
|
|
19701
19723
|
className: {
|
|
19702
19724
|
"h-full": "true",
|
|
19703
|
-
"sm:px-3 sm:pt-3": "${display != 'split'}"
|
|
19725
|
+
"sm:px-3 sm:pt-3 page-list-grid": "${display != 'split'}",
|
|
19726
|
+
"page-list-split": "${display == 'split'}"
|
|
19704
19727
|
},
|
|
19705
19728
|
body: listSchema
|
|
19706
19729
|
}];
|