@pisell/materials 1.0.606 → 1.0.608
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/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +3 -3
- package/build/lowcode/preview.js +154 -146
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +37 -23
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +38 -24
- package/es/components/Pagination/index.d.ts +1 -1
- package/es/components/appVersionControl/index.less +3 -0
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useFormat.d.ts +6 -2
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useFormat.js +15 -1
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +4 -4
- package/es/components/dataSourceComponents/fields/Select/index.js +2 -1
- package/es/components/dataSourceComponents/fields/index.d.ts +1 -1
- package/es/components/dataSourceComponents/provider/variables/VariablesProvider.js +3 -0
- package/es/components/pisellDraggable/components/Action/Action.d.ts +10 -0
- package/es/components/pisellDraggable/components/Action/Action.js +31 -0
- package/es/components/pisellDraggable/components/Action/Action.less +50 -0
- package/es/components/pisellDraggable/components/Action/index.d.ts +2 -0
- package/es/components/pisellDraggable/components/Action/index.js +1 -0
- package/es/components/pisellDraggable/components/Handle/Handle.d.ts +3 -0
- package/es/components/pisellDraggable/components/Handle/Handle.js +15 -0
- package/es/components/pisellDraggable/components/Handle/index.d.ts +1 -0
- package/es/components/pisellDraggable/components/Handle/index.js +1 -0
- package/es/components/pisellDraggable/components/Remove/Remove.d.ts +3 -0
- package/es/components/pisellDraggable/components/Remove/Remove.js +17 -0
- package/es/components/pisellDraggable/components/Remove/index.d.ts +1 -0
- package/es/components/pisellDraggable/components/Remove/index.js +1 -0
- package/es/components/pisellDraggable/components/TreeItem/SortableTreeItem.d.ts +8 -0
- package/es/components/pisellDraggable/components/TreeItem/SortableTreeItem.js +51 -0
- package/es/components/pisellDraggable/components/TreeItem/TreeItem.d.ts +21 -0
- package/es/components/pisellDraggable/components/TreeItem/TreeItem.js +57 -0
- package/es/components/pisellDraggable/components/TreeItem/TreeItem.less +128 -0
- package/es/components/pisellDraggable/components/TreeItem/index.d.ts +2 -0
- package/es/components/pisellDraggable/components/TreeItem/index.js +2 -0
- package/es/components/pisellDraggable/components/index.d.ts +4 -0
- package/es/components/pisellDraggable/components/index.js +4 -0
- package/es/components/pisellDraggable/index.d.ts +28 -3
- package/es/components/pisellDraggable/index.js +380 -2
- package/es/components/pisellDraggable/types.d.ts +15 -99
- package/es/components/pisellDraggable/utilities.d.ts +17 -0
- package/es/components/pisellDraggable/utilities.js +230 -0
- package/es/components/pisellDropSort/PisellDropSort.d.ts +5 -0
- package/es/components/pisellDropSort/PisellDropSort.js +102 -0
- package/es/components/pisellDropSort/PisellDropSort.less +92 -0
- package/es/components/pisellDropSort/components/SortableItem/index.d.ts +19 -0
- package/es/components/pisellDropSort/components/SortableItem/index.js +93 -0
- package/es/components/pisellDropSort/components/SortableItem/index.less +155 -0
- package/es/components/pisellDropSort/index.d.ts +3 -0
- package/es/components/pisellDropSort/index.js +2 -0
- package/es/components/pisellDropSort/types.d.ts +42 -0
- package/es/components/pisellDropSort/types.js +1 -0
- package/es/components/pisellModal/components/Information/index.js +0 -1
- package/es/components/versionModal/index.js +3 -1
- package/es/components/versionModal/index.less +9 -2
- package/es/index.d.ts +1 -0
- package/es/index.js +2 -1
- package/es/locales/en-US.d.ts +7 -6
- package/es/locales/en-US.js +16 -22
- package/es/locales/zh-CN.d.ts +7 -6
- package/es/locales/zh-CN.js +15 -21
- package/es/locales/zh-TW.d.ts +7 -6
- package/es/locales/zh-TW.js +17 -23
- package/lib/components/Pagination/index.d.ts +1 -1
- package/lib/components/appVersionControl/index.less +3 -0
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useFormat.d.ts +6 -2
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useFormat.js +16 -1
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +4 -4
- package/lib/components/dataSourceComponents/fields/Select/index.js +2 -1
- package/lib/components/dataSourceComponents/fields/index.d.ts +1 -1
- package/lib/components/dataSourceComponents/provider/variables/VariablesProvider.js +3 -0
- package/lib/components/pisellDraggable/components/Action/Action.d.ts +10 -0
- package/lib/components/pisellDraggable/components/Action/Action.js +60 -0
- package/lib/components/pisellDraggable/components/Action/Action.less +50 -0
- package/lib/components/pisellDraggable/components/Action/index.d.ts +2 -0
- package/lib/components/pisellDraggable/components/Action/index.js +29 -0
- package/lib/components/pisellDraggable/components/Handle/Handle.d.ts +3 -0
- package/lib/components/pisellDraggable/components/Handle/Handle.js +54 -0
- package/lib/components/pisellDraggable/components/Handle/index.d.ts +1 -0
- package/lib/components/pisellDraggable/components/Handle/index.js +29 -0
- package/lib/components/pisellDraggable/components/Remove/Remove.d.ts +3 -0
- package/lib/components/pisellDraggable/components/Remove/Remove.js +53 -0
- package/lib/components/pisellDraggable/components/Remove/index.d.ts +1 -0
- package/lib/components/pisellDraggable/components/Remove/index.js +29 -0
- package/lib/components/pisellDraggable/components/TreeItem/SortableTreeItem.d.ts +8 -0
- package/lib/components/pisellDraggable/components/TreeItem/SortableTreeItem.js +83 -0
- package/lib/components/pisellDraggable/components/TreeItem/TreeItem.d.ts +21 -0
- package/lib/components/pisellDraggable/components/TreeItem/TreeItem.js +93 -0
- package/lib/components/pisellDraggable/components/TreeItem/TreeItem.less +128 -0
- package/lib/components/pisellDraggable/components/TreeItem/index.d.ts +2 -0
- package/lib/components/pisellDraggable/components/TreeItem/index.js +32 -0
- package/lib/components/pisellDraggable/components/index.d.ts +4 -0
- package/lib/components/pisellDraggable/components/index.js +40 -0
- package/lib/components/pisellDraggable/index.d.ts +28 -3
- package/lib/components/pisellDraggable/index.js +237 -2
- package/lib/components/pisellDraggable/types.d.ts +15 -99
- package/lib/components/pisellDraggable/utilities.d.ts +17 -0
- package/lib/components/pisellDraggable/utilities.js +190 -0
- package/lib/components/pisellDropSort/PisellDropSort.d.ts +5 -0
- package/lib/components/pisellDropSort/PisellDropSort.js +147 -0
- package/lib/components/pisellDropSort/PisellDropSort.less +92 -0
- package/lib/components/pisellDropSort/components/SortableItem/index.d.ts +19 -0
- package/lib/components/pisellDropSort/components/SortableItem/index.js +164 -0
- package/lib/components/pisellDropSort/components/SortableItem/index.less +155 -0
- package/lib/components/pisellDropSort/index.d.ts +3 -0
- package/lib/components/pisellDropSort/index.js +36 -0
- package/lib/components/pisellDropSort/types.d.ts +42 -0
- package/lib/components/pisellDropSort/types.js +17 -0
- package/lib/components/pisellModal/components/Information/index.js +0 -1
- package/lib/components/versionModal/index.js +1 -1
- package/lib/components/versionModal/index.less +9 -2
- package/lib/index.d.ts +1 -0
- package/lib/index.js +3 -0
- package/lib/locales/en-US.d.ts +7 -6
- package/lib/locales/en-US.js +11 -1
- package/lib/locales/zh-CN.d.ts +7 -6
- package/lib/locales/zh-CN.js +10 -1
- package/lib/locales/zh-TW.d.ts +7 -6
- package/lib/locales/zh-TW.js +10 -1
- package/lowcode/custom-select/meta.ts +11 -15
- package/lowcode/form-item-translation/meta.ts +59 -1
- package/lowcode/pisell-drop-sort/meta.ts +343 -0
- package/package.json +2 -2
- package/es/components/pisellDraggable/PisellDraggable.d.ts +0 -18
- package/es/components/pisellDraggable/PisellDraggable.js +0 -190
- package/es/components/pisellDraggable/PisellDraggable.less +0 -154
- package/es/components/pisellDraggable/SortableItem.d.ts +0 -41
- package/es/components/pisellDraggable/SortableItem.js +0 -115
- package/lib/components/pisellDraggable/PisellDraggable.d.ts +0 -18
- package/lib/components/pisellDraggable/PisellDraggable.js +0 -175
- package/lib/components/pisellDraggable/PisellDraggable.less +0 -154
- package/lib/components/pisellDraggable/SortableItem.d.ts +0 -41
- package/lib/components/pisellDraggable/SortableItem.js +0 -127
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
+
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
3
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
4
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
5
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
6
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
7
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
8
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
9
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
10
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
11
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
12
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
13
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
14
|
+
import { arrayMove } from '@dnd-kit/sortable';
|
|
15
|
+
export var iOS = /iPad|iPhone|iPod/.test(navigator.platform);
|
|
16
|
+
function getDragDepth(offset, indentationWidth) {
|
|
17
|
+
return Math.round(offset / indentationWidth);
|
|
18
|
+
}
|
|
19
|
+
export function getProjection(items, activeId, overId, dragOffset, indentationWidth) {
|
|
20
|
+
var overItemIndex = items.findIndex(function (_ref) {
|
|
21
|
+
var id = _ref.id;
|
|
22
|
+
return id === overId;
|
|
23
|
+
});
|
|
24
|
+
var activeItemIndex = items.findIndex(function (_ref2) {
|
|
25
|
+
var id = _ref2.id;
|
|
26
|
+
return id === activeId;
|
|
27
|
+
});
|
|
28
|
+
var activeItem = items[activeItemIndex];
|
|
29
|
+
var newItems = arrayMove(items, activeItemIndex, overItemIndex);
|
|
30
|
+
var previousItem = newItems[overItemIndex - 1];
|
|
31
|
+
var nextItem = newItems[overItemIndex + 1];
|
|
32
|
+
var dragDepth = getDragDepth(dragOffset, indentationWidth);
|
|
33
|
+
var projectedDepth = activeItem.depth + dragDepth;
|
|
34
|
+
var maxDepth = getMaxDepth({
|
|
35
|
+
previousItem: previousItem
|
|
36
|
+
});
|
|
37
|
+
var minDepth = getMinDepth({
|
|
38
|
+
nextItem: nextItem
|
|
39
|
+
});
|
|
40
|
+
var depth = projectedDepth;
|
|
41
|
+
if (projectedDepth >= maxDepth) {
|
|
42
|
+
depth = maxDepth;
|
|
43
|
+
} else if (projectedDepth < minDepth) {
|
|
44
|
+
depth = minDepth;
|
|
45
|
+
}
|
|
46
|
+
return {
|
|
47
|
+
depth: depth,
|
|
48
|
+
maxDepth: maxDepth,
|
|
49
|
+
minDepth: minDepth,
|
|
50
|
+
parentId: getParentId()
|
|
51
|
+
};
|
|
52
|
+
function getParentId() {
|
|
53
|
+
var _newItems$slice$rever;
|
|
54
|
+
if (depth === 0 || !previousItem) {
|
|
55
|
+
return null;
|
|
56
|
+
}
|
|
57
|
+
if (depth === previousItem.depth) {
|
|
58
|
+
return previousItem.parentId;
|
|
59
|
+
}
|
|
60
|
+
if (depth > previousItem.depth) {
|
|
61
|
+
return previousItem.id;
|
|
62
|
+
}
|
|
63
|
+
var newParent = (_newItems$slice$rever = newItems.slice(0, overItemIndex).reverse().find(function (item) {
|
|
64
|
+
return item.depth === depth;
|
|
65
|
+
})) === null || _newItems$slice$rever === void 0 ? void 0 : _newItems$slice$rever.parentId;
|
|
66
|
+
return newParent !== null && newParent !== void 0 ? newParent : null;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
function getMaxDepth(_ref3) {
|
|
70
|
+
var previousItem = _ref3.previousItem;
|
|
71
|
+
if (previousItem) {
|
|
72
|
+
return previousItem.depth + 1;
|
|
73
|
+
}
|
|
74
|
+
return 0;
|
|
75
|
+
}
|
|
76
|
+
function getMinDepth(_ref4) {
|
|
77
|
+
var nextItem = _ref4.nextItem;
|
|
78
|
+
if (nextItem) {
|
|
79
|
+
return nextItem.depth;
|
|
80
|
+
}
|
|
81
|
+
return 0;
|
|
82
|
+
}
|
|
83
|
+
function flatten(items) {
|
|
84
|
+
var parentId = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
85
|
+
var depth = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
|
86
|
+
return items.reduce(function (acc, item, index) {
|
|
87
|
+
return [].concat(_toConsumableArray(acc), [_objectSpread(_objectSpread({}, item), {}, {
|
|
88
|
+
parentId: parentId,
|
|
89
|
+
depth: depth,
|
|
90
|
+
index: index
|
|
91
|
+
})], _toConsumableArray(flatten(item.children, item.id, depth + 1)));
|
|
92
|
+
}, []);
|
|
93
|
+
}
|
|
94
|
+
export function flattenTree(items) {
|
|
95
|
+
return flatten(items);
|
|
96
|
+
}
|
|
97
|
+
export function buildTree(flattenedItems) {
|
|
98
|
+
var root = {
|
|
99
|
+
id: 'root',
|
|
100
|
+
children: []
|
|
101
|
+
};
|
|
102
|
+
var nodes = _defineProperty({}, root.id, root);
|
|
103
|
+
var items = flattenedItems.map(function (item) {
|
|
104
|
+
return _objectSpread(_objectSpread({}, item), {}, {
|
|
105
|
+
children: []
|
|
106
|
+
});
|
|
107
|
+
});
|
|
108
|
+
var _iterator = _createForOfIteratorHelper(items),
|
|
109
|
+
_step;
|
|
110
|
+
try {
|
|
111
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
112
|
+
var _item$parentId, _nodes$parentId;
|
|
113
|
+
var item = _step.value;
|
|
114
|
+
var id = item.id,
|
|
115
|
+
children = item.children;
|
|
116
|
+
var parentId = (_item$parentId = item.parentId) !== null && _item$parentId !== void 0 ? _item$parentId : root.id;
|
|
117
|
+
var parent = (_nodes$parentId = nodes[parentId]) !== null && _nodes$parentId !== void 0 ? _nodes$parentId : findItem(items, parentId);
|
|
118
|
+
nodes[id] = {
|
|
119
|
+
id: id,
|
|
120
|
+
children: children
|
|
121
|
+
};
|
|
122
|
+
parent.children.push(item);
|
|
123
|
+
}
|
|
124
|
+
} catch (err) {
|
|
125
|
+
_iterator.e(err);
|
|
126
|
+
} finally {
|
|
127
|
+
_iterator.f();
|
|
128
|
+
}
|
|
129
|
+
return root.children;
|
|
130
|
+
}
|
|
131
|
+
export function findItem(items, itemId) {
|
|
132
|
+
return items.find(function (_ref5) {
|
|
133
|
+
var id = _ref5.id;
|
|
134
|
+
return id === itemId;
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
export function findItemDeep(items, itemId) {
|
|
138
|
+
var _iterator2 = _createForOfIteratorHelper(items),
|
|
139
|
+
_step2;
|
|
140
|
+
try {
|
|
141
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
142
|
+
var item = _step2.value;
|
|
143
|
+
var id = item.id,
|
|
144
|
+
children = item.children;
|
|
145
|
+
if (id === itemId) {
|
|
146
|
+
return item;
|
|
147
|
+
}
|
|
148
|
+
if (children.length) {
|
|
149
|
+
var child = findItemDeep(children, itemId);
|
|
150
|
+
if (child) {
|
|
151
|
+
return child;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
} catch (err) {
|
|
156
|
+
_iterator2.e(err);
|
|
157
|
+
} finally {
|
|
158
|
+
_iterator2.f();
|
|
159
|
+
}
|
|
160
|
+
return undefined;
|
|
161
|
+
}
|
|
162
|
+
export function removeItem(items, id) {
|
|
163
|
+
var newItems = [];
|
|
164
|
+
var _iterator3 = _createForOfIteratorHelper(items),
|
|
165
|
+
_step3;
|
|
166
|
+
try {
|
|
167
|
+
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
|
|
168
|
+
var item = _step3.value;
|
|
169
|
+
if (item.id === id) {
|
|
170
|
+
continue;
|
|
171
|
+
}
|
|
172
|
+
if (item.children.length) {
|
|
173
|
+
item.children = removeItem(item.children, id);
|
|
174
|
+
}
|
|
175
|
+
newItems.push(item);
|
|
176
|
+
}
|
|
177
|
+
} catch (err) {
|
|
178
|
+
_iterator3.e(err);
|
|
179
|
+
} finally {
|
|
180
|
+
_iterator3.f();
|
|
181
|
+
}
|
|
182
|
+
return newItems;
|
|
183
|
+
}
|
|
184
|
+
export function setProperty(items, id, property, setter) {
|
|
185
|
+
var _iterator4 = _createForOfIteratorHelper(items),
|
|
186
|
+
_step4;
|
|
187
|
+
try {
|
|
188
|
+
for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
|
|
189
|
+
var item = _step4.value;
|
|
190
|
+
if (item.id === id) {
|
|
191
|
+
item[property] = setter(item[property]);
|
|
192
|
+
continue;
|
|
193
|
+
}
|
|
194
|
+
if (item.children.length) {
|
|
195
|
+
item.children = setProperty(item.children, id, property, setter);
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
} catch (err) {
|
|
199
|
+
_iterator4.e(err);
|
|
200
|
+
} finally {
|
|
201
|
+
_iterator4.f();
|
|
202
|
+
}
|
|
203
|
+
return _toConsumableArray(items);
|
|
204
|
+
}
|
|
205
|
+
function countChildren(items) {
|
|
206
|
+
var count = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
207
|
+
return items.reduce(function (acc, _ref6) {
|
|
208
|
+
var children = _ref6.children;
|
|
209
|
+
if (children.length) {
|
|
210
|
+
return countChildren(children, acc + 1);
|
|
211
|
+
}
|
|
212
|
+
return acc + 1;
|
|
213
|
+
}, count);
|
|
214
|
+
}
|
|
215
|
+
export function getChildCount(items, id) {
|
|
216
|
+
var item = findItemDeep(items, id);
|
|
217
|
+
return item ? countChildren(item.children) : 0;
|
|
218
|
+
}
|
|
219
|
+
export function removeChildrenOf(items, ids) {
|
|
220
|
+
var excludeParentIds = _toConsumableArray(ids);
|
|
221
|
+
return items.filter(function (item) {
|
|
222
|
+
if (item.parentId && excludeParentIds.includes(item.parentId)) {
|
|
223
|
+
if (item.children.length) {
|
|
224
|
+
excludeParentIds.push(item.id);
|
|
225
|
+
}
|
|
226
|
+
return false;
|
|
227
|
+
}
|
|
228
|
+
return true;
|
|
229
|
+
});
|
|
230
|
+
}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import React, { useCallback, useMemo } from 'react';
|
|
2
|
+
import { PlusOutlined } from '@ant-design/icons';
|
|
3
|
+
import classNames from 'classnames';
|
|
4
|
+
import Button from "../button";
|
|
5
|
+
import SortableItem from "./components/SortableItem";
|
|
6
|
+
import { SortableTree } from "../pisellDraggable";
|
|
7
|
+
import "./PisellDropSort.less";
|
|
8
|
+
import { getText } from "../../locales";
|
|
9
|
+
var PisellDropSort = function PisellDropSort(_ref) {
|
|
10
|
+
var _ref$value = _ref.value,
|
|
11
|
+
value = _ref$value === void 0 ? [] : _ref$value,
|
|
12
|
+
_ref$allowDrag = _ref.allowDrag,
|
|
13
|
+
allowDrag = _ref$allowDrag === void 0 ? true : _ref$allowDrag,
|
|
14
|
+
_ref$allowDelete = _ref.allowDelete,
|
|
15
|
+
allowDelete = _ref$allowDelete === void 0 ? true : _ref$allowDelete,
|
|
16
|
+
_ref$allowAddChild = _ref.allowAddChild,
|
|
17
|
+
allowAddChild = _ref$allowAddChild === void 0 ? true : _ref$allowAddChild,
|
|
18
|
+
_ref$allowAddRoot = _ref.allowAddRoot,
|
|
19
|
+
allowAddRoot = _ref$allowAddRoot === void 0 ? true : _ref$allowAddRoot,
|
|
20
|
+
_ref$disabled = _ref.disabled,
|
|
21
|
+
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
22
|
+
_ref$spacing = _ref.spacing,
|
|
23
|
+
spacing = _ref$spacing === void 0 ? 8 : _ref$spacing,
|
|
24
|
+
_ref$maxLevel = _ref.maxLevel,
|
|
25
|
+
maxLevel = _ref$maxLevel === void 0 ? 3 : _ref$maxLevel,
|
|
26
|
+
_ref$showBorder = _ref.showBorder,
|
|
27
|
+
showBorder = _ref$showBorder === void 0 ? true : _ref$showBorder,
|
|
28
|
+
style = _ref.style,
|
|
29
|
+
className = _ref.className,
|
|
30
|
+
onChange = _ref.onChange,
|
|
31
|
+
onDelete = _ref.onDelete,
|
|
32
|
+
onAdd = _ref.onAdd,
|
|
33
|
+
propsRenderItem = _ref.renderItem,
|
|
34
|
+
leftContent = _ref.leftContent,
|
|
35
|
+
onAddRoot = _ref.onAddRoot;
|
|
36
|
+
// 转换数据格式
|
|
37
|
+
var treeItems = useMemo(function () {
|
|
38
|
+
return value.map(function (item) {
|
|
39
|
+
var _item$children;
|
|
40
|
+
return {
|
|
41
|
+
id: item.id,
|
|
42
|
+
children: ((_item$children = item.children) === null || _item$children === void 0 ? void 0 : _item$children.map(function (child) {
|
|
43
|
+
return {
|
|
44
|
+
id: child.id,
|
|
45
|
+
children: []
|
|
46
|
+
};
|
|
47
|
+
})) || []
|
|
48
|
+
};
|
|
49
|
+
});
|
|
50
|
+
}, [value]);
|
|
51
|
+
|
|
52
|
+
// 自定义渲染节点
|
|
53
|
+
var renderItem = useCallback(function (itemProps, ref) {
|
|
54
|
+
return /*#__PURE__*/React.createElement(SortableItem, {
|
|
55
|
+
itemProps: itemProps,
|
|
56
|
+
domRef: ref,
|
|
57
|
+
render: propsRenderItem,
|
|
58
|
+
allowAddChild: allowAddChild,
|
|
59
|
+
allowDelete: allowDelete,
|
|
60
|
+
allowDrag: allowDrag,
|
|
61
|
+
disabled: disabled,
|
|
62
|
+
onAdd: onAdd,
|
|
63
|
+
onDelete: onDelete,
|
|
64
|
+
showBorder: showBorder,
|
|
65
|
+
spacing: spacing,
|
|
66
|
+
maxLevel: maxLevel
|
|
67
|
+
});
|
|
68
|
+
}, [allowAddChild, allowDelete, allowDrag, value, disabled, maxLevel, onAdd, onDelete, showBorder, spacing, treeItems]);
|
|
69
|
+
|
|
70
|
+
// 处理拖拽完成
|
|
71
|
+
var handleChange = useCallback(function (items) {
|
|
72
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(items);
|
|
73
|
+
}, [onChange]);
|
|
74
|
+
var containerClassName = classNames('pisell-lowcode-drop-sort-container', className);
|
|
75
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
76
|
+
className: containerClassName,
|
|
77
|
+
style: style
|
|
78
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
79
|
+
className: "pisell-lowcode-drop-sort-container-header"
|
|
80
|
+
}, /*#__PURE__*/React.createElement("span", null, leftContent), allowAddRoot && !disabled && /*#__PURE__*/React.createElement(Button, {
|
|
81
|
+
icon: /*#__PURE__*/React.createElement(PlusOutlined, null),
|
|
82
|
+
type: "primary",
|
|
83
|
+
onClick: function onClick() {
|
|
84
|
+
return onAddRoot === null || onAddRoot === void 0 ? void 0 : onAddRoot();
|
|
85
|
+
},
|
|
86
|
+
size: "large"
|
|
87
|
+
}, getText('pisell-lowcode-drop-sort-add'))), /*#__PURE__*/React.createElement("div", {
|
|
88
|
+
className: "pisell-lowcode-drop-sort-container-content",
|
|
89
|
+
style: {
|
|
90
|
+
gap: spacing !== null && spacing !== void 0 ? spacing : 8
|
|
91
|
+
}
|
|
92
|
+
}, /*#__PURE__*/React.createElement(SortableTree, {
|
|
93
|
+
value: treeItems,
|
|
94
|
+
collapsible: true,
|
|
95
|
+
indicator: false,
|
|
96
|
+
indentationWidth: 24,
|
|
97
|
+
removable: allowDelete,
|
|
98
|
+
renderItem: renderItem,
|
|
99
|
+
onChange: handleChange
|
|
100
|
+
})));
|
|
101
|
+
};
|
|
102
|
+
export default PisellDropSort;
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
.pisell-lowcode-drop-sort-container {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
gap: 12px;
|
|
5
|
+
|
|
6
|
+
&-header {
|
|
7
|
+
display: flex;
|
|
8
|
+
justify-content: space-between;
|
|
9
|
+
align-items: center;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
&-content {
|
|
13
|
+
display: flex;
|
|
14
|
+
flex-direction: column;
|
|
15
|
+
gap: 8px;
|
|
16
|
+
flex: 1;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
&-item {
|
|
20
|
+
display: flex;
|
|
21
|
+
padding: 12px;
|
|
22
|
+
align-items: center;
|
|
23
|
+
gap: 8px;
|
|
24
|
+
align-self: stretch;
|
|
25
|
+
|
|
26
|
+
border-radius: 12px;
|
|
27
|
+
border: 1px solid var(--Gray-200, #eaecf0);
|
|
28
|
+
background: var(--Base-White, #fff);
|
|
29
|
+
/* Shadow/xs */
|
|
30
|
+
box-shadow: 0px 1px 2px 0px rgba(16, 24, 40, 0.05);
|
|
31
|
+
|
|
32
|
+
transition: all 0.3s;
|
|
33
|
+
|
|
34
|
+
&.with-border {
|
|
35
|
+
border: 1px solid #f0f0f0;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
&.dragging {
|
|
39
|
+
opacity: 0.5;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
&-content {
|
|
43
|
+
padding: 12px;
|
|
44
|
+
display: flex;
|
|
45
|
+
align-items: center;
|
|
46
|
+
justify-content: space-between;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&-title {
|
|
50
|
+
flex: 1;
|
|
51
|
+
margin: 0 12px;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
&-actions {
|
|
55
|
+
display: flex;
|
|
56
|
+
gap: 8px;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
&-children {
|
|
61
|
+
padding-left: 24px;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
&-disabled {
|
|
65
|
+
cursor: not-allowed;
|
|
66
|
+
opacity: 0.5;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.drag-handle {
|
|
70
|
+
cursor: move;
|
|
71
|
+
color: #999;
|
|
72
|
+
|
|
73
|
+
&:hover {
|
|
74
|
+
color: #666;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.action-button {
|
|
79
|
+
cursor: pointer;
|
|
80
|
+
color: #999;
|
|
81
|
+
|
|
82
|
+
&:hover {
|
|
83
|
+
color: #666;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
&.delete {
|
|
87
|
+
&:hover {
|
|
88
|
+
color: #ff4d4f;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { Props as TreeItem } from '../../../pisellDraggable/components/TreeItem/TreeItem';
|
|
3
|
+
import './index.less';
|
|
4
|
+
interface SortableItemProps {
|
|
5
|
+
itemProps: TreeItem;
|
|
6
|
+
render?: (itemProps: TreeItem) => React.ReactNode;
|
|
7
|
+
domRef: React.RefObject<HTMLDivElement>;
|
|
8
|
+
allowAddChild?: boolean;
|
|
9
|
+
allowDelete?: boolean;
|
|
10
|
+
allowDrag?: boolean;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
onAdd?: (itemProps: TreeItem) => void;
|
|
13
|
+
onDelete?: (itemProps: TreeItem) => void;
|
|
14
|
+
showBorder?: boolean;
|
|
15
|
+
spacing?: number;
|
|
16
|
+
maxLevel?: number;
|
|
17
|
+
}
|
|
18
|
+
declare const SortableItem: (props: SortableItemProps) => React.JSX.Element;
|
|
19
|
+
export default SortableItem;
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
var _excluded = ["item", "depth", "clone", "ghost", "indicator", "disableSelection", "disableInteraction", "wrapperRef", "style", "onCollapse", "onRemove", "childCount", "indentationWidth", "handleProps", "collapsed"];
|
|
2
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
3
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
4
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
5
|
+
import React from 'react';
|
|
6
|
+
import classNames from 'classnames';
|
|
7
|
+
import DotsSix from '@pisell/icon/es/DotsSix';
|
|
8
|
+
import Button from "../../../button";
|
|
9
|
+
import Icon from "../../../icon";
|
|
10
|
+
import "./index.less";
|
|
11
|
+
var SortableItem = function SortableItem(props) {
|
|
12
|
+
var itemProps = props.itemProps,
|
|
13
|
+
render = props.render,
|
|
14
|
+
domRef = props.domRef,
|
|
15
|
+
allowAddChild = props.allowAddChild,
|
|
16
|
+
allowDelete = props.allowDelete,
|
|
17
|
+
allowDrag = props.allowDrag,
|
|
18
|
+
disabled = props.disabled,
|
|
19
|
+
onAdd = props.onAdd,
|
|
20
|
+
onDelete = props.onDelete,
|
|
21
|
+
showBorder = props.showBorder,
|
|
22
|
+
spacing = props.spacing,
|
|
23
|
+
maxLevel = props.maxLevel;
|
|
24
|
+
var item = itemProps.item,
|
|
25
|
+
depth = itemProps.depth,
|
|
26
|
+
clone = itemProps.clone,
|
|
27
|
+
ghost = itemProps.ghost,
|
|
28
|
+
indicator = itemProps.indicator,
|
|
29
|
+
disableSelection = itemProps.disableSelection,
|
|
30
|
+
disableInteraction = itemProps.disableInteraction,
|
|
31
|
+
wrapperRef = itemProps.wrapperRef,
|
|
32
|
+
style = itemProps.style,
|
|
33
|
+
onCollapse = itemProps.onCollapse,
|
|
34
|
+
onRemove = itemProps.onRemove,
|
|
35
|
+
childCount = itemProps.childCount,
|
|
36
|
+
indentationWidth = itemProps.indentationWidth,
|
|
37
|
+
handleProps = itemProps.handleProps,
|
|
38
|
+
collapsed = itemProps.collapsed,
|
|
39
|
+
otherProps = _objectWithoutProperties(itemProps, _excluded);
|
|
40
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
41
|
+
className: classNames('pisell-lowcode-drop-sort-item', clone && 'clone', ghost && 'ghost', indicator && 'indicator', disableSelection && 'disableSelection', disableInteraction && 'disableInteraction'),
|
|
42
|
+
ref: wrapperRef,
|
|
43
|
+
style: {
|
|
44
|
+
'--spacing': "".concat(indentationWidth * depth, "px")
|
|
45
|
+
}
|
|
46
|
+
}, otherProps), /*#__PURE__*/React.createElement("div", {
|
|
47
|
+
className: classNames('pisell-lowcode-drop-sort-item-tree-item', {
|
|
48
|
+
'pisell-lowcode-drop-sort-item-tree-item-border': showBorder,
|
|
49
|
+
disabled: disabled
|
|
50
|
+
}),
|
|
51
|
+
ref: domRef,
|
|
52
|
+
style: style
|
|
53
|
+
}, allowDrag && !disabled && /*#__PURE__*/React.createElement(Button, _extends({
|
|
54
|
+
icon: /*#__PURE__*/React.createElement(DotsSix, {
|
|
55
|
+
className: "pisell-lowcode-drop-sort-item-drag-handle-icon"
|
|
56
|
+
}),
|
|
57
|
+
type: "text",
|
|
58
|
+
className: "pisell-lowcode-drop-sort-item-button"
|
|
59
|
+
}, handleProps)), onCollapse && /*#__PURE__*/React.createElement(Button, {
|
|
60
|
+
icon: /*#__PURE__*/React.createElement(Icon, {
|
|
61
|
+
type: "pisell2-chevron-down",
|
|
62
|
+
className: "pisell-lowcode-drop-sort-item-icon"
|
|
63
|
+
}),
|
|
64
|
+
onClick: onCollapse,
|
|
65
|
+
type: "text",
|
|
66
|
+
className: classNames('Collapse', collapsed && 'collapsed', 'pisell-lowcode-drop-sort-item-button')
|
|
67
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
68
|
+
className: "pisell-lowcode-drop-sort-item-content"
|
|
69
|
+
}, render && render(itemProps)), !clone && allowAddChild && !disabled && /*#__PURE__*/React.createElement(Button, {
|
|
70
|
+
icon: /*#__PURE__*/React.createElement(Icon, {
|
|
71
|
+
type: "pisell2-plus",
|
|
72
|
+
className: "pisell-lowcode-drop-sort-item-icon"
|
|
73
|
+
}),
|
|
74
|
+
onClick: function onClick() {
|
|
75
|
+
return onAdd === null || onAdd === void 0 ? void 0 : onAdd(itemProps);
|
|
76
|
+
},
|
|
77
|
+
type: "text",
|
|
78
|
+
className: "pisell-lowcode-drop-sort-item-button"
|
|
79
|
+
}), !clone && allowDelete && !disabled && /*#__PURE__*/React.createElement(Button, {
|
|
80
|
+
icon: /*#__PURE__*/React.createElement(Icon, {
|
|
81
|
+
type: "pisell2-trash-01",
|
|
82
|
+
className: "pisell-lowcode-drop-sort-item-icon"
|
|
83
|
+
}),
|
|
84
|
+
onClick: function onClick() {
|
|
85
|
+
return onDelete === null || onDelete === void 0 ? void 0 : onDelete(itemProps);
|
|
86
|
+
},
|
|
87
|
+
type: "text",
|
|
88
|
+
className: "pisell-lowcode-drop-sort-item-button"
|
|
89
|
+
}), clone && childCount && childCount > 1 ? /*#__PURE__*/React.createElement("span", {
|
|
90
|
+
className: 'pisell-lowcode-drop-sort-item-count'
|
|
91
|
+
}, childCount) : null));
|
|
92
|
+
};
|
|
93
|
+
export default SortableItem;
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
.pisell-lowcode-drop-sort-item {
|
|
2
|
+
box-sizing: border-box;
|
|
3
|
+
padding-left: var(--spacing);
|
|
4
|
+
|
|
5
|
+
&.clone {
|
|
6
|
+
display: inline-block;
|
|
7
|
+
pointer-events: none;
|
|
8
|
+
padding: 0;
|
|
9
|
+
padding-left: 10px;
|
|
10
|
+
padding-top: 5px;
|
|
11
|
+
|
|
12
|
+
.pisell-lowcode-drop-sort-item-tree-item {
|
|
13
|
+
--vertical-padding: 5px;
|
|
14
|
+
|
|
15
|
+
padding-right: 24px;
|
|
16
|
+
box-shadow: 0px 15px 15px 0 rgba(34, 33, 81, 0.1);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
&.ghost {
|
|
21
|
+
&.indicator {
|
|
22
|
+
opacity: 1;
|
|
23
|
+
position: relative;
|
|
24
|
+
z-index: 1;
|
|
25
|
+
margin-bottom: -1px;
|
|
26
|
+
|
|
27
|
+
.pisell-lowcode-drop-sort-item-tree-item {
|
|
28
|
+
position: relative;
|
|
29
|
+
padding: 0;
|
|
30
|
+
height: 8px;
|
|
31
|
+
border-color: #2389ff;
|
|
32
|
+
background-color: #56a1f8;
|
|
33
|
+
|
|
34
|
+
&:before {
|
|
35
|
+
position: absolute;
|
|
36
|
+
left: -8px;
|
|
37
|
+
top: -4px;
|
|
38
|
+
display: block;
|
|
39
|
+
content: '';
|
|
40
|
+
width: 12px;
|
|
41
|
+
height: 12px;
|
|
42
|
+
border-radius: 50%;
|
|
43
|
+
border: 1px solid #2389ff;
|
|
44
|
+
background-color: #ffffff;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
> * {
|
|
48
|
+
/* Items are hidden using height and opacity to retain focus */
|
|
49
|
+
opacity: 0;
|
|
50
|
+
height: 0;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
&:not(.indicator) {
|
|
56
|
+
opacity: 0.5;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.pisell-lowcode-drop-sort-item-tree-item > * {
|
|
60
|
+
box-shadow: none;
|
|
61
|
+
background-color: transparent;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.pisell-lowcode-drop-sort-item-tree-item {
|
|
68
|
+
position: relative;
|
|
69
|
+
display: flex;
|
|
70
|
+
padding: 12px;
|
|
71
|
+
align-items: center;
|
|
72
|
+
gap: 16px;
|
|
73
|
+
align-self: stretch;
|
|
74
|
+
border-radius: 12px;
|
|
75
|
+
background: var(--Base-White, #fff);
|
|
76
|
+
|
|
77
|
+
--vertical-padding: 10px;
|
|
78
|
+
box-sizing: border-box;
|
|
79
|
+
// transition: all 0.25s;
|
|
80
|
+
|
|
81
|
+
.pisell-lowcode-drop-sort-item-content {
|
|
82
|
+
flex: 1;
|
|
83
|
+
height: 48px;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.pisell-lowcode-drop-sort-item-button {
|
|
87
|
+
&:hover {
|
|
88
|
+
background: var(--Gray-100, #F2F4F7);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
&:hover {
|
|
93
|
+
background: var(--Gray-25, #FCFCFD);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
&.disabled {
|
|
97
|
+
border: 1px solid var(--Gray-200, #EAECF0);
|
|
98
|
+
background: var(--Gray-100, #F2F4F7);
|
|
99
|
+
cursor: not-allowed;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.pisell-lowcode-drop-sort-item-tree-item-border {
|
|
104
|
+
border: 1px solid var(--Gray-200, #eaecf0);
|
|
105
|
+
/* Shadow/xs */
|
|
106
|
+
box-shadow: 0px 1px 2px 0px rgba(16, 24, 40, 0.05);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.pisell-lowcode-drop-sort-item-icon {
|
|
110
|
+
font-size: 20px;
|
|
111
|
+
color: #101828;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.pisell-lowcode-drop-sort-item-drag-handle-icon {
|
|
115
|
+
font-size: 20px;
|
|
116
|
+
color: #98a2b3;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.pisell-lowcode-drop-sort-item-count {
|
|
120
|
+
position: absolute;
|
|
121
|
+
top: -10px;
|
|
122
|
+
right: -10px;
|
|
123
|
+
display: flex;
|
|
124
|
+
align-items: center;
|
|
125
|
+
justify-content: center;
|
|
126
|
+
width: 24px;
|
|
127
|
+
height: 24px;
|
|
128
|
+
border-radius: 50%;
|
|
129
|
+
background-color: #2389ff;
|
|
130
|
+
font-size: 0.8rem;
|
|
131
|
+
font-weight: 600;
|
|
132
|
+
color: #fff;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.disableInteraction {
|
|
136
|
+
pointer-events: none;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.disableSelection,
|
|
140
|
+
.clone {
|
|
141
|
+
.pisell-lowcode-drop-sort-item-count {
|
|
142
|
+
user-select: none;
|
|
143
|
+
-webkit-user-select: none;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.Collapse {
|
|
148
|
+
svg {
|
|
149
|
+
transition: transform 250ms ease;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
&.collapsed svg {
|
|
153
|
+
transform: rotate(-90deg);
|
|
154
|
+
}
|
|
155
|
+
}
|