@steedos-widgets/sortable 1.3.4-beta.11 → 1.3.4-beta.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/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/assets.json
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
{
|
|
4
4
|
"package": "@steedos-widgets/sortable",
|
|
5
5
|
"urls": [
|
|
6
|
-
"https://unpkg.com/@steedos-widgets/sortable@1.3.4-beta.
|
|
7
|
-
"https://unpkg.com/@steedos-widgets/sortable@1.3.4-beta.
|
|
6
|
+
"https://unpkg.com/@steedos-widgets/sortable@1.3.4-beta.13/dist/sortable.umd.js",
|
|
7
|
+
"https://unpkg.com/@steedos-widgets/sortable@1.3.4-beta.13/dist/sortable.umd.css"
|
|
8
8
|
],
|
|
9
9
|
"library": "BuilderSortable"
|
|
10
10
|
}
|
|
@@ -15,10 +15,10 @@
|
|
|
15
15
|
"npm": {
|
|
16
16
|
"package": "@steedos-widgets/sortable"
|
|
17
17
|
},
|
|
18
|
-
"url": "https://unpkg.com/@steedos-widgets/sortable@1.3.4-beta.
|
|
18
|
+
"url": "https://unpkg.com/@steedos-widgets/sortable@1.3.4-beta.13/dist/meta.js",
|
|
19
19
|
"urls": {
|
|
20
|
-
"default": "https://unpkg.com/@steedos-widgets/sortable@1.3.4-beta.
|
|
21
|
-
"design": "https://unpkg.com/@steedos-widgets/sortable@1.3.4-beta.
|
|
20
|
+
"default": "https://unpkg.com/@steedos-widgets/sortable@1.3.4-beta.13/dist/meta.js",
|
|
21
|
+
"design": "https://unpkg.com/@steedos-widgets/sortable@1.3.4-beta.13/dist/meta.js"
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
]
|
package/dist/sortable.cjs.js
CHANGED
|
@@ -54080,7 +54080,7 @@ function getSelectMap(selectOptions){
|
|
|
54080
54080
|
if(optionColor){
|
|
54081
54081
|
const background = optionColor.charAt(0) === '#' ? optionColor : '#'+optionColor;
|
|
54082
54082
|
const color = getContrastColor(background);
|
|
54083
|
-
const optionColorStyle = 'background:'+background+';color:'+color;
|
|
54083
|
+
const optionColorStyle = 'background:'+background+';color:'+color+';line-height:1.5rem';
|
|
54084
54084
|
map[optionValue] = `<span class="rounded-xl px-2 py-1" style='${optionColorStyle}'>${option.label}</span>`;
|
|
54085
54085
|
}else {
|
|
54086
54086
|
map[optionValue] = option.label;
|
|
@@ -54341,17 +54341,17 @@ async function getFindQuery(object, recordId, fields, options){
|
|
|
54341
54341
|
}
|
|
54342
54342
|
|
|
54343
54343
|
const countQuery = options.count === false ? "" : `,count:${object.name}__count(filters:{__filters})`;
|
|
54344
|
-
const moreQuerie = options.moreQueries?.length ? ("," + options.moreQueries.map(function(item){
|
|
54345
|
-
|
|
54346
|
-
|
|
54347
|
-
}).join(",")) : "";
|
|
54344
|
+
// const moreQuerie = options.moreQueries?.length ? ("," + options.moreQueries.map(function(item){
|
|
54345
|
+
// // 把最外层的{}去除
|
|
54346
|
+
// return item.replace(/^{/,"").replace(/}$/,"");
|
|
54347
|
+
// }).join(",")) : "";
|
|
54348
54348
|
|
|
54349
54349
|
return {
|
|
54350
54350
|
orderBy: "${orderBy}",
|
|
54351
54351
|
orderDir: "${orderDir}",
|
|
54352
54352
|
pageNo: "${page}",
|
|
54353
54353
|
pageSize: "${perPage}",
|
|
54354
|
-
query: `{${alias}:${object.name}${queryOptions}{${await getFieldsTemplate(fields, options.expand)}${treeFields}${cfsFields}}${countQuery}
|
|
54354
|
+
query: `{${alias}:${object.name}${queryOptions}{${await getFieldsTemplate(fields, options.expand)}${treeFields}${cfsFields}}${countQuery}}`
|
|
54355
54355
|
}
|
|
54356
54356
|
}
|
|
54357
54357
|
|
|
@@ -57623,10 +57623,10 @@ async function lookupToAmisSelect(field, readonly, ctx){
|
|
|
57623
57623
|
// const labelFieldKey = referenceTo && referenceTo.labelField?.name || 'name';
|
|
57624
57624
|
|
|
57625
57625
|
let apiInfo;
|
|
57626
|
-
|
|
57626
|
+
let defaultValueOptionsQueryData;
|
|
57627
57627
|
if(referenceTo){
|
|
57628
57628
|
// 字段值单独走一个请求合并到source的同一个GraphQL接口中
|
|
57629
|
-
|
|
57629
|
+
defaultValueOptionsQueryData = await getFindQuery({ name: referenceTo.objectName }, null, [
|
|
57630
57630
|
Object.assign({}, referenceTo.labelField, {alias: 'label'}),
|
|
57631
57631
|
Object.assign({}, referenceTo.valueField, {alias: 'value'})
|
|
57632
57632
|
], {
|
|
@@ -57639,7 +57639,7 @@ async function lookupToAmisSelect(field, readonly, ctx){
|
|
|
57639
57639
|
}, null, [
|
|
57640
57640
|
Object.assign({}, referenceTo.labelField, {alias: 'label'}),
|
|
57641
57641
|
Object.assign({}, referenceTo.valueField, {alias: 'value'})
|
|
57642
|
-
], {expand: false, alias: 'options', queryOptions: `filters: {__filters}, top: {__top}, sort: "{__sort}"
|
|
57642
|
+
], {expand: false, alias: 'options', queryOptions: `filters: {__filters}, top: {__top}, sort: "{__sort}"`});
|
|
57643
57643
|
|
|
57644
57644
|
apiInfo.adaptor = `
|
|
57645
57645
|
const data = payload.data;
|
|
@@ -57733,13 +57733,16 @@ async function lookupToAmisSelect(field, readonly, ctx){
|
|
|
57733
57733
|
var optionsFiltersOp = "${field.multiple ? "in" : "="}";
|
|
57734
57734
|
var optionsFilters = [["${valueFieldKey}", optionsFiltersOp, []]];
|
|
57735
57735
|
if (defaultValue && !api.data.$term) {
|
|
57736
|
+
const defaultValueOptionsQueryData = ${JSON.stringify(defaultValueOptionsQueryData)};
|
|
57737
|
+
const defaultValueOptionsQuery = defaultValueOptionsQueryData.query.replace(/^{/,"").replace(/}$/,"");
|
|
57736
57738
|
// 字段值单独请求,没值的时候在请求中返回空
|
|
57737
57739
|
optionsFilters = [["${valueFieldKey}", optionsFiltersOp, defaultValue]];
|
|
57738
57740
|
if(filters.length > 0){
|
|
57739
57741
|
optionsFilters = [filters, optionsFilters];
|
|
57740
57742
|
}
|
|
57743
|
+
api.data.query = "{"+api.data.query.replace(/^{/,"").replace(/}$/,"")+","+defaultValueOptionsQuery+"}";
|
|
57744
|
+
api.data.query = api.data.query.replace(/{__options_filters}/g, JSON.stringify(optionsFilters))
|
|
57741
57745
|
}
|
|
57742
|
-
api.data.query = api.data.query.replace(/{__options_filters}/g, JSON.stringify(optionsFilters));
|
|
57743
57746
|
return api;
|
|
57744
57747
|
`;
|
|
57745
57748
|
referenceTo ? referenceTo.labelField.name : '';
|