@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.esm.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.esm.js
CHANGED
|
@@ -8379,19 +8379,19 @@ crudService && crudService.setData({showFieldsFilter: toShowFieldsFilter});
|
|
|
8379
8379
|
`;
|
|
8380
8380
|
|
|
8381
8381
|
|
|
8382
|
-
function getObjectHeaderToolbar(mainObject, fields, formFactor, {showDisplayAs = false, hiddenCount = false, headerToolbarItems, filterVisible = true} = {}){
|
|
8382
|
+
function getObjectHeaderToolbar(mainObject, fields, formFactor, { showDisplayAs = false, hiddenCount = false, headerToolbarItems, filterVisible = true, isLookup = false } = {}){
|
|
8383
8383
|
// console.log(`getObjectHeaderToolbar====>`, filterVisible)
|
|
8384
8384
|
// console.log(`getObjectHeaderToolbar`, mainObject)
|
|
8385
8385
|
const searchableFieldsLabel = [];
|
|
8386
8386
|
_.each(fields, function (field) {
|
|
8387
|
-
if (field.searchable) {
|
|
8387
|
+
if (field.searchable && SEARCHABLE_FIELD_TYPES.indexOf(field.type) > -1) {
|
|
8388
8388
|
searchableFieldsLabel.push(field.label);
|
|
8389
8389
|
}
|
|
8390
8390
|
});
|
|
8391
8391
|
const listViewPropsStoreKey = location.pathname + "/crud";
|
|
8392
8392
|
let localListViewProps = sessionStorage.getItem(listViewPropsStoreKey);
|
|
8393
8393
|
let crudKeywords = "";
|
|
8394
|
-
if(localListViewProps){
|
|
8394
|
+
if(localListViewProps && !isLookup){
|
|
8395
8395
|
localListViewProps = JSON.parse(localListViewProps);
|
|
8396
8396
|
crudKeywords = (localListViewProps && localListViewProps.__keywords) || "";
|
|
8397
8397
|
}
|
|
@@ -8451,7 +8451,7 @@ function getObjectHeaderToolbar(mainObject, fields, formFactor, {showDisplayAs =
|
|
|
8451
8451
|
],
|
|
8452
8452
|
"size":8,
|
|
8453
8453
|
"animation": true,
|
|
8454
|
-
"visibleOn": "${isFieldsFilterEmpty == false}"
|
|
8454
|
+
"visibleOn": "${isFieldsFilterEmpty == false && isLookup != true}"
|
|
8455
8455
|
},
|
|
8456
8456
|
"align": "right",
|
|
8457
8457
|
"className": "bg-white p-2 rounded border-gray-300 text-gray-500",
|
|
@@ -8466,7 +8466,27 @@ function getObjectHeaderToolbar(mainObject, fields, formFactor, {showDisplayAs =
|
|
|
8466
8466
|
}
|
|
8467
8467
|
}
|
|
8468
8468
|
} : {},
|
|
8469
|
-
getDisplayAsButton(mainObject?.name)
|
|
8469
|
+
getDisplayAsButton(mainObject?.name),
|
|
8470
|
+
{
|
|
8471
|
+
"type": "tooltip-wrapper",
|
|
8472
|
+
"align": "right",
|
|
8473
|
+
"title": "",
|
|
8474
|
+
"content": "可搜索字段:" + searchableFieldsLabel.join(","),
|
|
8475
|
+
"placement": "bottom",
|
|
8476
|
+
"tooltipTheme": "dark",
|
|
8477
|
+
"trigger": "click",
|
|
8478
|
+
// "className": "mr-1",
|
|
8479
|
+
"body": [
|
|
8480
|
+
{
|
|
8481
|
+
"type": "search-box",
|
|
8482
|
+
"name": "__keywords",
|
|
8483
|
+
"placeholder": "请输入关键字",
|
|
8484
|
+
"value": crudKeywords,
|
|
8485
|
+
"clearable": true,
|
|
8486
|
+
"clearAndSubmit": true
|
|
8487
|
+
}
|
|
8488
|
+
]
|
|
8489
|
+
},
|
|
8470
8490
|
]
|
|
8471
8491
|
}else {
|
|
8472
8492
|
return [
|
|
@@ -8499,7 +8519,7 @@ function getObjectHeaderToolbar(mainObject, fields, formFactor, {showDisplayAs =
|
|
|
8499
8519
|
],
|
|
8500
8520
|
"size":8,
|
|
8501
8521
|
"animation": true,
|
|
8502
|
-
"visibleOn": "${isFieldsFilterEmpty == false}"
|
|
8522
|
+
"visibleOn": "${isFieldsFilterEmpty == false && isLookup != true}"
|
|
8503
8523
|
},
|
|
8504
8524
|
"align": "right",
|
|
8505
8525
|
"className": "bg-white p-2 rounded border-gray-300 text-gray-500",
|
|
@@ -8530,7 +8550,7 @@ function getObjectHeaderToolbar(mainObject, fields, formFactor, {showDisplayAs =
|
|
|
8530
8550
|
"type": "tooltip-wrapper",
|
|
8531
8551
|
"align": "right",
|
|
8532
8552
|
"title": "",
|
|
8533
|
-
"content": "
|
|
8553
|
+
"content": "可搜索字段:" + searchableFieldsLabel.join(","),
|
|
8534
8554
|
"placement": "bottom",
|
|
8535
8555
|
"tooltipTheme": "dark",
|
|
8536
8556
|
"trigger": "click",
|
|
@@ -8896,8 +8916,8 @@ function getLookupSapceUserTreeSchema(){
|
|
|
8896
8916
|
"style": {
|
|
8897
8917
|
"max-height": "100%",
|
|
8898
8918
|
"position": "absolute",
|
|
8899
|
-
"left": "-
|
|
8900
|
-
"width": "
|
|
8919
|
+
"left": "-330px",
|
|
8920
|
+
"width": "320px",
|
|
8901
8921
|
"bottom": 0,
|
|
8902
8922
|
"top": "0",
|
|
8903
8923
|
"overflow": "auto",
|
|
@@ -8963,7 +8983,7 @@ async function lookupToAmisPicker(field, readonly, ctx){
|
|
|
8963
8983
|
})){
|
|
8964
8984
|
i++;
|
|
8965
8985
|
tableFields.push(field);
|
|
8966
|
-
if(field.searchable){
|
|
8986
|
+
if(field.searchable && SEARCHABLE_FIELD_TYPES.indexOf(field.type) > -1){
|
|
8967
8987
|
searchableFields.push(field.name);
|
|
8968
8988
|
}
|
|
8969
8989
|
}
|
|
@@ -9182,13 +9202,13 @@ async function lookupToAmisPicker(field, readonly, ctx){
|
|
|
9182
9202
|
if(referenceTo.objectName === "space_users" && field.reference_to_field === "user" && !isMobile){
|
|
9183
9203
|
headerToolbarItems = getLookupSapceUserTreeSchema();
|
|
9184
9204
|
pickerSchema["style"] = {
|
|
9185
|
-
"margin-left":"
|
|
9205
|
+
"margin-left":"330px",
|
|
9186
9206
|
"min-height": "300px"
|
|
9187
9207
|
};
|
|
9188
9208
|
pickerSchema.className = pickerSchema.className || "" + " steedos-select-user";
|
|
9189
9209
|
}
|
|
9190
9210
|
|
|
9191
|
-
pickerSchema.headerToolbar = getObjectHeaderToolbar(refObjectConfig, ctx.formFactor, { headerToolbarItems });
|
|
9211
|
+
pickerSchema.headerToolbar = getObjectHeaderToolbar(refObjectConfig, fieldsArr, ctx.formFactor, { headerToolbarItems, isLookup: true });
|
|
9192
9212
|
const isAllowCreate = refObjectConfig.permissions.allowCreate;
|
|
9193
9213
|
if (isAllowCreate) {
|
|
9194
9214
|
const new_button = await getSchema$5(refObjectConfig, { appId: ctx.appId, objectName: refObjectConfig.name, formFactor: ctx.formFactor });
|
|
@@ -9911,6 +9931,7 @@ const getAmisFileSchema = (steedosField, readonly)=>{
|
|
|
9911
9931
|
return readonly ? getAmisFileReadonlySchema(steedosField) : getAmisFileEditSchema(steedosField);
|
|
9912
9932
|
};
|
|
9913
9933
|
|
|
9934
|
+
const SEARCHABLE_FIELD_TYPES = ["text", "textarea", "autonumber", "url", "email"];
|
|
9914
9935
|
const OMIT_FIELDS = ['created', 'created_by', 'modified', 'modified_by'];
|
|
9915
9936
|
// const Lookup = require('./lookup');
|
|
9916
9937
|
|
|
@@ -10685,6 +10706,7 @@ if (typeof window != 'undefined') {
|
|
|
10685
10706
|
|
|
10686
10707
|
var index = /*#__PURE__*/Object.freeze({
|
|
10687
10708
|
__proto__: null,
|
|
10709
|
+
SEARCHABLE_FIELD_TYPES: SEARCHABLE_FIELD_TYPES,
|
|
10688
10710
|
OMIT_FIELDS: OMIT_FIELDS,
|
|
10689
10711
|
getBaseFields: getBaseFields,
|
|
10690
10712
|
getAmisFieldType: getAmisFieldType,
|
|
@@ -11472,7 +11494,7 @@ async function getTableApi(mainObject, fields, options){
|
|
|
11472
11494
|
baseFilters = filter;
|
|
11473
11495
|
}
|
|
11474
11496
|
___default.each(fields,function(field){
|
|
11475
|
-
if(field.searchable){
|
|
11497
|
+
if(field.searchable && SEARCHABLE_FIELD_TYPES.indexOf(field.type) > -1){
|
|
11476
11498
|
searchableFields.push(field.name);
|
|
11477
11499
|
}
|
|
11478
11500
|
});
|
|
@@ -19672,7 +19694,8 @@ var PageListView = function (props) { return __awaiter(void 0, void 0, void 0, f
|
|
|
19672
19694
|
type: 'service',
|
|
19673
19695
|
className: {
|
|
19674
19696
|
"h-full": "true",
|
|
19675
|
-
"sm:px-3 sm:pt-3": "${display != 'split'}"
|
|
19697
|
+
"sm:px-3 sm:pt-3 page-list-grid": "${display != 'split'}",
|
|
19698
|
+
"page-list-split": "${display == 'split'}"
|
|
19676
19699
|
},
|
|
19677
19700
|
body: listSchema
|
|
19678
19701
|
}];
|