@steedos-widgets/sortable 6.3.11-beta.9 → 6.3.12-beta.1
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 +24 -5
- package/dist/sortable.cjs.js.map +1 -1
- package/dist/sortable.esm.js +24 -5
- package/dist/sortable.esm.js.map +1 -1
- package/dist/sortable.umd.js +24 -5
- package/package.json +3 -3
package/dist/sortable.umd.js
CHANGED
|
@@ -20287,7 +20287,7 @@
|
|
|
20287
20287
|
* @Author: baozhoutao@steedos.com
|
|
20288
20288
|
* @Date: 2022-07-20 16:29:22
|
|
20289
20289
|
* @LastEditors: baozhoutao@steedos.com
|
|
20290
|
-
* @LastEditTime: 2024-
|
|
20290
|
+
* @LastEditTime: 2024-11-17 13:05:44
|
|
20291
20291
|
* @Description:
|
|
20292
20292
|
*/
|
|
20293
20293
|
|
|
@@ -20312,13 +20312,29 @@
|
|
|
20312
20312
|
window.getImageFieldUrl = getImageFieldUrl;
|
|
20313
20313
|
}
|
|
20314
20314
|
|
|
20315
|
+
|
|
20316
|
+
|
|
20317
|
+
// js color
|
|
20318
|
+
|
|
20319
|
+
function toGrayscale(r, g, b){
|
|
20320
|
+
return (
|
|
20321
|
+
0.2126 * r +
|
|
20322
|
+
0.7152 * g +
|
|
20323
|
+
0.0722 * b
|
|
20324
|
+
);
|
|
20325
|
+
}
|
|
20326
|
+
|
|
20327
|
+
function isLight(r, g, b){
|
|
20328
|
+
// 专业的亮度是 > 255 / 2. 此处的阈值调整为200
|
|
20329
|
+
return toGrayscale(r, g, b) > 200
|
|
20330
|
+
}
|
|
20331
|
+
|
|
20315
20332
|
function getContrastColor(bgColor) {
|
|
20316
20333
|
var backgroundColor = (bgColor.charAt(0) === '#') ? bgColor.substring(1, 7) : bgColor;
|
|
20317
20334
|
var r = parseInt(backgroundColor.substr(0, 2), 16);
|
|
20318
20335
|
var g = parseInt(backgroundColor.substr(2, 2), 16);
|
|
20319
20336
|
var b = parseInt(backgroundColor.substr(4, 2), 16);
|
|
20320
|
-
|
|
20321
|
-
return brightness < 128 ? "#ffffff" : "#000000";
|
|
20337
|
+
return isLight(r, g, b) ? "#000000" : "#ffffff";
|
|
20322
20338
|
}
|
|
20323
20339
|
|
|
20324
20340
|
function getLookupListView(refObjectConfig) {
|
|
@@ -20427,7 +20443,7 @@
|
|
|
20427
20443
|
if(optionColor && optionColor != "undefined"){
|
|
20428
20444
|
const background = optionColor.charAt(0) === '#' ? optionColor : '#'+optionColor;
|
|
20429
20445
|
const color = getContrastColor(background);
|
|
20430
|
-
const optionColorStyle = 'background:'+background+';color:'+color+';line-height:1.5rem';
|
|
20446
|
+
const optionColorStyle = 'background:'+background+';color:'+color+';line-height:1.5rem;font-size:14px';
|
|
20431
20447
|
map[optionValue] = `<span class="rounded-xl px-2 py-1" style='${optionColorStyle}'>${option.label}</span>`;
|
|
20432
20448
|
}else {
|
|
20433
20449
|
map[optionValue] = option.label;
|
|
@@ -20841,7 +20857,7 @@
|
|
|
20841
20857
|
* @Author: baozhoutao@steedos.com
|
|
20842
20858
|
* @Date: 2022-10-28 14:15:09
|
|
20843
20859
|
* @LastEditors: baozhoutao@steedos.com
|
|
20844
|
-
* @LastEditTime: 2024-
|
|
20860
|
+
* @LastEditTime: 2024-11-14 10:50:01
|
|
20845
20861
|
* @Description:
|
|
20846
20862
|
*/
|
|
20847
20863
|
|
|
@@ -20900,6 +20916,7 @@
|
|
|
20900
20916
|
"title": " ",
|
|
20901
20917
|
"headerClassName": "hidden",
|
|
20902
20918
|
"size": "lg",
|
|
20919
|
+
"width": "70%",
|
|
20903
20920
|
"bodyClassName": "p-0 m-0 bg-gray-100",
|
|
20904
20921
|
"closeOnEsc": true,
|
|
20905
20922
|
"closeOnOutside": true,
|
|
@@ -21992,6 +22009,7 @@
|
|
|
21992
22009
|
"title": " ",
|
|
21993
22010
|
"headerClassName": "hidden",
|
|
21994
22011
|
"size": "lg",
|
|
22012
|
+
"width": "70%",
|
|
21995
22013
|
"bodyClassName": "p-0 m-0 bg-gray-100",
|
|
21996
22014
|
"closeOnEsc": true,
|
|
21997
22015
|
"closeOnOutside": true,
|
|
@@ -27275,6 +27293,7 @@ crudService && crudService.setData({showFieldsFilter: toShowFieldsFilter});
|
|
|
27275
27293
|
type: "static-mapping",
|
|
27276
27294
|
name: field.name,
|
|
27277
27295
|
label: field.label,
|
|
27296
|
+
options: field.options,
|
|
27278
27297
|
map: map
|
|
27279
27298
|
};
|
|
27280
27299
|
}else {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@steedos-widgets/sortable",
|
|
3
|
-
"version": "6.3.
|
|
3
|
+
"version": "6.3.12-beta.1",
|
|
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": "6.3.
|
|
48
|
+
"@steedos-widgets/amis-lib": "6.3.12-beta.1"
|
|
49
49
|
},
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "98cb69b94cbb05678ff1a577e90053f38de98b8d"
|
|
51
51
|
}
|