@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.umd.js
CHANGED
|
@@ -20381,7 +20381,7 @@
|
|
|
20381
20381
|
if(optionColor){
|
|
20382
20382
|
const background = optionColor.charAt(0) === '#' ? optionColor : '#'+optionColor;
|
|
20383
20383
|
const color = getContrastColor(background);
|
|
20384
|
-
const optionColorStyle = 'background:'+background+';color:'+color;
|
|
20384
|
+
const optionColorStyle = 'background:'+background+';color:'+color+';line-height:1.5rem';
|
|
20385
20385
|
map[optionValue] = `<span class="rounded-xl px-2 py-1" style='${optionColorStyle}'>${option.label}</span>`;
|
|
20386
20386
|
}else {
|
|
20387
20387
|
map[optionValue] = option.label;
|
|
@@ -20642,17 +20642,17 @@
|
|
|
20642
20642
|
}
|
|
20643
20643
|
|
|
20644
20644
|
const countQuery = options.count === false ? "" : `,count:${object.name}__count(filters:{__filters})`;
|
|
20645
|
-
const moreQuerie = options.moreQueries?.length ? ("," + options.moreQueries.map(function(item){
|
|
20646
|
-
|
|
20647
|
-
|
|
20648
|
-
}).join(",")) : "";
|
|
20645
|
+
// const moreQuerie = options.moreQueries?.length ? ("," + options.moreQueries.map(function(item){
|
|
20646
|
+
// // 把最外层的{}去除
|
|
20647
|
+
// return item.replace(/^{/,"").replace(/}$/,"");
|
|
20648
|
+
// }).join(",")) : "";
|
|
20649
20649
|
|
|
20650
20650
|
return {
|
|
20651
20651
|
orderBy: "${orderBy}",
|
|
20652
20652
|
orderDir: "${orderDir}",
|
|
20653
20653
|
pageNo: "${page}",
|
|
20654
20654
|
pageSize: "${perPage}",
|
|
20655
|
-
query: `{${alias}:${object.name}${queryOptions}{${await getFieldsTemplate(fields, options.expand)}${treeFields}${cfsFields}}${countQuery}
|
|
20655
|
+
query: `{${alias}:${object.name}${queryOptions}{${await getFieldsTemplate(fields, options.expand)}${treeFields}${cfsFields}}${countQuery}}`
|
|
20656
20656
|
}
|
|
20657
20657
|
}
|
|
20658
20658
|
|
|
@@ -23924,10 +23924,10 @@ crudService && crudService.setData({showFieldsFilter: toShowFieldsFilter});
|
|
|
23924
23924
|
// const labelFieldKey = referenceTo && referenceTo.labelField?.name || 'name';
|
|
23925
23925
|
|
|
23926
23926
|
let apiInfo;
|
|
23927
|
-
|
|
23927
|
+
let defaultValueOptionsQueryData;
|
|
23928
23928
|
if(referenceTo){
|
|
23929
23929
|
// 字段值单独走一个请求合并到source的同一个GraphQL接口中
|
|
23930
|
-
|
|
23930
|
+
defaultValueOptionsQueryData = await getFindQuery({ name: referenceTo.objectName }, null, [
|
|
23931
23931
|
Object.assign({}, referenceTo.labelField, {alias: 'label'}),
|
|
23932
23932
|
Object.assign({}, referenceTo.valueField, {alias: 'value'})
|
|
23933
23933
|
], {
|
|
@@ -23940,7 +23940,7 @@ crudService && crudService.setData({showFieldsFilter: toShowFieldsFilter});
|
|
|
23940
23940
|
}, null, [
|
|
23941
23941
|
Object.assign({}, referenceTo.labelField, {alias: 'label'}),
|
|
23942
23942
|
Object.assign({}, referenceTo.valueField, {alias: 'value'})
|
|
23943
|
-
], {expand: false, alias: 'options', queryOptions: `filters: {__filters}, top: {__top}, sort: "{__sort}"
|
|
23943
|
+
], {expand: false, alias: 'options', queryOptions: `filters: {__filters}, top: {__top}, sort: "{__sort}"`});
|
|
23944
23944
|
|
|
23945
23945
|
apiInfo.adaptor = `
|
|
23946
23946
|
const data = payload.data;
|
|
@@ -24034,13 +24034,16 @@ crudService && crudService.setData({showFieldsFilter: toShowFieldsFilter});
|
|
|
24034
24034
|
var optionsFiltersOp = "${field.multiple ? "in" : "="}";
|
|
24035
24035
|
var optionsFilters = [["${valueFieldKey}", optionsFiltersOp, []]];
|
|
24036
24036
|
if (defaultValue && !api.data.$term) {
|
|
24037
|
+
const defaultValueOptionsQueryData = ${JSON.stringify(defaultValueOptionsQueryData)};
|
|
24038
|
+
const defaultValueOptionsQuery = defaultValueOptionsQueryData.query.replace(/^{/,"").replace(/}$/,"");
|
|
24037
24039
|
// 字段值单独请求,没值的时候在请求中返回空
|
|
24038
24040
|
optionsFilters = [["${valueFieldKey}", optionsFiltersOp, defaultValue]];
|
|
24039
24041
|
if(filters.length > 0){
|
|
24040
24042
|
optionsFilters = [filters, optionsFilters];
|
|
24041
24043
|
}
|
|
24044
|
+
api.data.query = "{"+api.data.query.replace(/^{/,"").replace(/}$/,"")+","+defaultValueOptionsQuery+"}";
|
|
24045
|
+
api.data.query = api.data.query.replace(/{__options_filters}/g, JSON.stringify(optionsFilters))
|
|
24042
24046
|
}
|
|
24043
|
-
api.data.query = api.data.query.replace(/{__options_filters}/g, JSON.stringify(optionsFilters));
|
|
24044
24047
|
return api;
|
|
24045
24048
|
`;
|
|
24046
24049
|
referenceTo ? referenceTo.labelField.name : '';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@steedos-widgets/sortable",
|
|
3
|
-
"version": "1.3.4-beta.
|
|
3
|
+
"version": "1.3.4-beta.12",
|
|
4
4
|
"main": "dist/sortable.cjs.js",
|
|
5
5
|
"module": "dist/sortable.esm.js",
|
|
6
6
|
"unpkg": "dist/sortable.umd.js",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"dependencies": {
|
|
46
46
|
"@dnd-kit/core": "^6.0.5",
|
|
47
47
|
"@dnd-kit/sortable": "^7.0.1",
|
|
48
|
-
"@steedos-widgets/amis-lib": "1.3.4-beta.
|
|
48
|
+
"@steedos-widgets/amis-lib": "1.3.4-beta.12"
|
|
49
49
|
},
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "355e004eca0928c2e1ed468e9f6a3eed67dfcf62"
|
|
51
51
|
}
|