@steedos-widgets/sortable 1.3.4-beta.10 → 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 +14 -10
- package/dist/sortable.cjs.js.map +1 -1
- package/dist/sortable.esm.js +14 -10
- package/dist/sortable.esm.js.map +1 -1
- package/dist/sortable.umd.js +14 -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
|
|
|
@@ -23132,6 +23132,7 @@ crudService && crudService.setData({showFieldsFilter: toShowFieldsFilter});
|
|
|
23132
23132
|
]
|
|
23133
23133
|
}else {
|
|
23134
23134
|
return [
|
|
23135
|
+
"statistics",
|
|
23135
23136
|
{
|
|
23136
23137
|
"type": "pagination",
|
|
23137
23138
|
"maxButtons": 5
|
|
@@ -23923,10 +23924,10 @@ crudService && crudService.setData({showFieldsFilter: toShowFieldsFilter});
|
|
|
23923
23924
|
// const labelFieldKey = referenceTo && referenceTo.labelField?.name || 'name';
|
|
23924
23925
|
|
|
23925
23926
|
let apiInfo;
|
|
23926
|
-
|
|
23927
|
+
let defaultValueOptionsQueryData;
|
|
23927
23928
|
if(referenceTo){
|
|
23928
23929
|
// 字段值单独走一个请求合并到source的同一个GraphQL接口中
|
|
23929
|
-
|
|
23930
|
+
defaultValueOptionsQueryData = await getFindQuery({ name: referenceTo.objectName }, null, [
|
|
23930
23931
|
Object.assign({}, referenceTo.labelField, {alias: 'label'}),
|
|
23931
23932
|
Object.assign({}, referenceTo.valueField, {alias: 'value'})
|
|
23932
23933
|
], {
|
|
@@ -23939,7 +23940,7 @@ crudService && crudService.setData({showFieldsFilter: toShowFieldsFilter});
|
|
|
23939
23940
|
}, null, [
|
|
23940
23941
|
Object.assign({}, referenceTo.labelField, {alias: 'label'}),
|
|
23941
23942
|
Object.assign({}, referenceTo.valueField, {alias: 'value'})
|
|
23942
|
-
], {expand: false, alias: 'options', queryOptions: `filters: {__filters}, top: {__top}, sort: "{__sort}"
|
|
23943
|
+
], {expand: false, alias: 'options', queryOptions: `filters: {__filters}, top: {__top}, sort: "{__sort}"`});
|
|
23943
23944
|
|
|
23944
23945
|
apiInfo.adaptor = `
|
|
23945
23946
|
const data = payload.data;
|
|
@@ -24033,13 +24034,16 @@ crudService && crudService.setData({showFieldsFilter: toShowFieldsFilter});
|
|
|
24033
24034
|
var optionsFiltersOp = "${field.multiple ? "in" : "="}";
|
|
24034
24035
|
var optionsFilters = [["${valueFieldKey}", optionsFiltersOp, []]];
|
|
24035
24036
|
if (defaultValue && !api.data.$term) {
|
|
24037
|
+
const defaultValueOptionsQueryData = ${JSON.stringify(defaultValueOptionsQueryData)};
|
|
24038
|
+
const defaultValueOptionsQuery = defaultValueOptionsQueryData.query.replace(/^{/,"").replace(/}$/,"");
|
|
24036
24039
|
// 字段值单独请求,没值的时候在请求中返回空
|
|
24037
24040
|
optionsFilters = [["${valueFieldKey}", optionsFiltersOp, defaultValue]];
|
|
24038
24041
|
if(filters.length > 0){
|
|
24039
24042
|
optionsFilters = [filters, optionsFilters];
|
|
24040
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))
|
|
24041
24046
|
}
|
|
24042
|
-
api.data.query = api.data.query.replace(/{__options_filters}/g, JSON.stringify(optionsFilters));
|
|
24043
24047
|
return api;
|
|
24044
24048
|
`;
|
|
24045
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
|
}
|