@steedos-widgets/sortable 1.3.4-beta.11 → 1.3.4-beta.12
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/assets.json +5 -5
- package/dist/sortable.cjs.js +13 -10
- package/dist/sortable.cjs.js.map +1 -1
- package/dist/sortable.esm.js +13 -10
- package/dist/sortable.esm.js.map +1 -1
- package/dist/sortable.umd.js +13 -10
- package/package.json +3 -3
package/dist/sortable.esm.js
CHANGED
|
@@ -54076,7 +54076,7 @@ function getSelectMap(selectOptions){
|
|
|
54076
54076
|
if(optionColor){
|
|
54077
54077
|
const background = optionColor.charAt(0) === '#' ? optionColor : '#'+optionColor;
|
|
54078
54078
|
const color = getContrastColor(background);
|
|
54079
|
-
const optionColorStyle = 'background:'+background+';color:'+color;
|
|
54079
|
+
const optionColorStyle = 'background:'+background+';color:'+color+';line-height:1.5rem';
|
|
54080
54080
|
map[optionValue] = `<span class="rounded-xl px-2 py-1" style='${optionColorStyle}'>${option.label}</span>`;
|
|
54081
54081
|
}else {
|
|
54082
54082
|
map[optionValue] = option.label;
|
|
@@ -54337,17 +54337,17 @@ async function getFindQuery(object, recordId, fields, options){
|
|
|
54337
54337
|
}
|
|
54338
54338
|
|
|
54339
54339
|
const countQuery = options.count === false ? "" : `,count:${object.name}__count(filters:{__filters})`;
|
|
54340
|
-
const moreQuerie = options.moreQueries?.length ? ("," + options.moreQueries.map(function(item){
|
|
54341
|
-
|
|
54342
|
-
|
|
54343
|
-
}).join(",")) : "";
|
|
54340
|
+
// const moreQuerie = options.moreQueries?.length ? ("," + options.moreQueries.map(function(item){
|
|
54341
|
+
// // 把最外层的{}去除
|
|
54342
|
+
// return item.replace(/^{/,"").replace(/}$/,"");
|
|
54343
|
+
// }).join(",")) : "";
|
|
54344
54344
|
|
|
54345
54345
|
return {
|
|
54346
54346
|
orderBy: "${orderBy}",
|
|
54347
54347
|
orderDir: "${orderDir}",
|
|
54348
54348
|
pageNo: "${page}",
|
|
54349
54349
|
pageSize: "${perPage}",
|
|
54350
|
-
query: `{${alias}:${object.name}${queryOptions}{${await getFieldsTemplate(fields, options.expand)}${treeFields}${cfsFields}}${countQuery}
|
|
54350
|
+
query: `{${alias}:${object.name}${queryOptions}{${await getFieldsTemplate(fields, options.expand)}${treeFields}${cfsFields}}${countQuery}}`
|
|
54351
54351
|
}
|
|
54352
54352
|
}
|
|
54353
54353
|
|
|
@@ -57619,10 +57619,10 @@ async function lookupToAmisSelect(field, readonly, ctx){
|
|
|
57619
57619
|
// const labelFieldKey = referenceTo && referenceTo.labelField?.name || 'name';
|
|
57620
57620
|
|
|
57621
57621
|
let apiInfo;
|
|
57622
|
-
|
|
57622
|
+
let defaultValueOptionsQueryData;
|
|
57623
57623
|
if(referenceTo){
|
|
57624
57624
|
// 字段值单独走一个请求合并到source的同一个GraphQL接口中
|
|
57625
|
-
|
|
57625
|
+
defaultValueOptionsQueryData = await getFindQuery({ name: referenceTo.objectName }, null, [
|
|
57626
57626
|
Object.assign({}, referenceTo.labelField, {alias: 'label'}),
|
|
57627
57627
|
Object.assign({}, referenceTo.valueField, {alias: 'value'})
|
|
57628
57628
|
], {
|
|
@@ -57635,7 +57635,7 @@ async function lookupToAmisSelect(field, readonly, ctx){
|
|
|
57635
57635
|
}, null, [
|
|
57636
57636
|
Object.assign({}, referenceTo.labelField, {alias: 'label'}),
|
|
57637
57637
|
Object.assign({}, referenceTo.valueField, {alias: 'value'})
|
|
57638
|
-
], {expand: false, alias: 'options', queryOptions: `filters: {__filters}, top: {__top}, sort: "{__sort}"
|
|
57638
|
+
], {expand: false, alias: 'options', queryOptions: `filters: {__filters}, top: {__top}, sort: "{__sort}"`});
|
|
57639
57639
|
|
|
57640
57640
|
apiInfo.adaptor = `
|
|
57641
57641
|
const data = payload.data;
|
|
@@ -57729,13 +57729,16 @@ async function lookupToAmisSelect(field, readonly, ctx){
|
|
|
57729
57729
|
var optionsFiltersOp = "${field.multiple ? "in" : "="}";
|
|
57730
57730
|
var optionsFilters = [["${valueFieldKey}", optionsFiltersOp, []]];
|
|
57731
57731
|
if (defaultValue && !api.data.$term) {
|
|
57732
|
+
const defaultValueOptionsQueryData = ${JSON.stringify(defaultValueOptionsQueryData)};
|
|
57733
|
+
const defaultValueOptionsQuery = defaultValueOptionsQueryData.query.replace(/^{/,"").replace(/}$/,"");
|
|
57732
57734
|
// 字段值单独请求,没值的时候在请求中返回空
|
|
57733
57735
|
optionsFilters = [["${valueFieldKey}", optionsFiltersOp, defaultValue]];
|
|
57734
57736
|
if(filters.length > 0){
|
|
57735
57737
|
optionsFilters = [filters, optionsFilters];
|
|
57736
57738
|
}
|
|
57739
|
+
api.data.query = "{"+api.data.query.replace(/^{/,"").replace(/}$/,"")+","+defaultValueOptionsQuery+"}";
|
|
57740
|
+
api.data.query = api.data.query.replace(/{__options_filters}/g, JSON.stringify(optionsFilters))
|
|
57737
57741
|
}
|
|
57738
|
-
api.data.query = api.data.query.replace(/{__options_filters}/g, JSON.stringify(optionsFilters));
|
|
57739
57742
|
return api;
|
|
57740
57743
|
`;
|
|
57741
57744
|
referenceTo ? referenceTo.labelField.name : '';
|