@steedos-widgets/amis-lib 1.3.11 → 1.3.13
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/cjs/tsconfig.tsbuildinfo +1 -1
- package/dist/index.cjs.js +61 -6
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +61 -6
- package/dist/index.esm.js.map +1 -1
- package/dist/index.umd.js +10 -10
- package/dist/index.umd.js.map +1 -1
- package/package.json +2 -2
package/dist/index.esm.js
CHANGED
|
@@ -609,6 +609,8 @@ function getSaveDataTpl(fields){
|
|
|
609
609
|
delete formData.editFormInited;
|
|
610
610
|
delete formData.isLookup;
|
|
611
611
|
delete formData.selectedRowResponseResult;
|
|
612
|
+
delete formData.instance_state;
|
|
613
|
+
delete formData.instances;
|
|
612
614
|
${getScriptForReadonlyFields(fields)}
|
|
613
615
|
${getScriptForRemoveUrlPrefixForImgFields(fields)}
|
|
614
616
|
${getScriptForSimplifiedValueForFileFields(fields)}
|
|
@@ -5020,7 +5022,30 @@ function getObjectHeaderQuickSearchBox(mainObject, fields, formFactor, { isLooku
|
|
|
5020
5022
|
"value": crudKeywords,
|
|
5021
5023
|
"clearable": true,
|
|
5022
5024
|
"clearAndSubmit": true,
|
|
5023
|
-
"searchImediately": false
|
|
5025
|
+
"searchImediately": false,
|
|
5026
|
+
"onEvent": {
|
|
5027
|
+
"blur": {
|
|
5028
|
+
"actions": [
|
|
5029
|
+
{
|
|
5030
|
+
"actionType": "custom",
|
|
5031
|
+
"script": `
|
|
5032
|
+
try {
|
|
5033
|
+
const scope = event.context.scoped;
|
|
5034
|
+
const filterCrud = scope.parent.getComponents().find(function(n) {
|
|
5035
|
+
return n.props.type === "crud";
|
|
5036
|
+
});
|
|
5037
|
+
if (filterCrud && typeof filterCrud.reload === 'function') {
|
|
5038
|
+
const keyWords = { '${keywordsSearchBoxName}': event.data.value };
|
|
5039
|
+
filterCrud.reload(null, keyWords);
|
|
5040
|
+
}
|
|
5041
|
+
} catch (error) {
|
|
5042
|
+
console.error('An error occurred:', error);
|
|
5043
|
+
}
|
|
5044
|
+
`
|
|
5045
|
+
}
|
|
5046
|
+
]
|
|
5047
|
+
}
|
|
5048
|
+
}
|
|
5024
5049
|
}
|
|
5025
5050
|
]
|
|
5026
5051
|
}
|
|
@@ -5498,6 +5523,8 @@ async function lookupToAmisTreeSelect(field, readonly, ctx) {
|
|
|
5498
5523
|
return amisSchema;
|
|
5499
5524
|
}
|
|
5500
5525
|
|
|
5526
|
+
const keywordsSearchBoxName = `__keywords_lookup`;
|
|
5527
|
+
|
|
5501
5528
|
const getReferenceTo = async (field)=>{
|
|
5502
5529
|
let referenceTo = field.reference_to;
|
|
5503
5530
|
if(!referenceTo){
|
|
@@ -5741,8 +5768,6 @@ async function lookupToAmisPicker(field, readonly, ctx){
|
|
|
5741
5768
|
|
|
5742
5769
|
source.data.$term = "$term";
|
|
5743
5770
|
source.data.$self = "$$";
|
|
5744
|
-
|
|
5745
|
-
let keywordsSearchBoxName = `__keywords_lookup__${field.name}__to__${refObjectConfig.name}`;
|
|
5746
5771
|
|
|
5747
5772
|
source.requestAdaptor = `
|
|
5748
5773
|
const selfData = JSON.parse(JSON.stringify(api.data.$self));
|
|
@@ -7495,9 +7520,38 @@ async function getFieldSearchable(perField, permissionFields, ctx){
|
|
|
7495
7520
|
|
|
7496
7521
|
const amisField = await convertSFieldToAmisField(_field, false, Object.assign({}, ctx, {fieldNamePrefix: fieldNamePrefix, required: false, showSystemFields: true, inFilterForm: true}));
|
|
7497
7522
|
if(amisField){
|
|
7498
|
-
|
|
7499
|
-
|
|
7500
|
-
|
|
7523
|
+
const changeActionsFields = ['select', 'boolean', 'toggle', 'date', 'datetime', 'time', 'number', 'currency', 'lookup', 'master_detail'];
|
|
7524
|
+
const isChangeActions = changeActionsFields.indexOf(field.type) > -1;
|
|
7525
|
+
let additionalProps = {
|
|
7526
|
+
submitOnChange: false
|
|
7527
|
+
};
|
|
7528
|
+
if (isChangeActions) {
|
|
7529
|
+
additionalProps.submitOnChange = true;
|
|
7530
|
+
} else {
|
|
7531
|
+
additionalProps.onEvent = {
|
|
7532
|
+
blur: {
|
|
7533
|
+
actions: [
|
|
7534
|
+
{
|
|
7535
|
+
actionType: "custom",
|
|
7536
|
+
script: `
|
|
7537
|
+
try {
|
|
7538
|
+
const scope = event.context.scoped;
|
|
7539
|
+
const filterForm = scope.parent.parent.parent.getComponents().find(function(n) {
|
|
7540
|
+
return n.props.type === "form";
|
|
7541
|
+
});
|
|
7542
|
+
if (filterForm && typeof filterForm.handleFormSubmit === 'function') {
|
|
7543
|
+
filterForm.handleFormSubmit(event);
|
|
7544
|
+
}
|
|
7545
|
+
} catch (error) {
|
|
7546
|
+
console.error('An error occurred:', error);
|
|
7547
|
+
}
|
|
7548
|
+
`
|
|
7549
|
+
}
|
|
7550
|
+
]
|
|
7551
|
+
}
|
|
7552
|
+
};
|
|
7553
|
+
}
|
|
7554
|
+
return Object.assign({}, amisField, additionalProps);
|
|
7501
7555
|
}
|
|
7502
7556
|
}
|
|
7503
7557
|
}
|
|
@@ -11798,6 +11852,7 @@ async function getTableApi(mainObject, fields, options){
|
|
|
11798
11852
|
if(options.isRelated){
|
|
11799
11853
|
api.url += "&recordId=${_master.recordId}";
|
|
11800
11854
|
}
|
|
11855
|
+
api.cache = 3000;
|
|
11801
11856
|
|
|
11802
11857
|
api.data.$term = "$term";
|
|
11803
11858
|
api.data.term = "$term";
|