@steedos-widgets/sortable 1.3.4-beta.1 → 1.3.4-beta.10
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-dev.json +25 -0
- package/dist/assets.json +25 -0
- package/dist/components/MultipleContainers.d.ts +7 -0
- package/dist/components/components/Container/Container.d.ts +19 -0
- package/dist/components/components/Container/index.d.ts +2 -0
- package/dist/components/components/Grid/Grid.d.ts +7 -0
- package/dist/components/components/Grid/index.d.ts +1 -0
- package/dist/components/components/GridContainer/GridContainer.d.ts +6 -0
- package/dist/components/components/GridContainer/index.d.ts +1 -0
- package/dist/components/components/Item/Item.d.ts +38 -0
- package/dist/components/components/Item/components/Action/Action.d.ts +9 -0
- package/dist/components/components/Item/components/Action/index.d.ts +2 -0
- package/dist/components/components/Item/components/Handle/Handle.d.ts +3 -0
- package/dist/components/components/Item/components/Handle/index.d.ts +1 -0
- package/dist/components/components/Item/components/Remove/Remove.d.ts +3 -0
- package/dist/components/components/Item/components/Remove/index.d.ts +1 -0
- package/dist/components/components/Item/components/index.d.ts +3 -0
- package/dist/components/components/Item/index.d.ts +2 -0
- package/dist/components/components/index.d.ts +5 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/multipleContainersKeyboardCoordinates.d.ts +2 -0
- package/dist/index.d.ts +1 -0
- package/dist/meta.d.ts +9 -0
- package/dist/meta.js +227 -0
- package/dist/metas/MultipleContainers.d.ts +2 -0
- package/dist/sortable.cjs.css +332 -0
- package/dist/sortable.cjs.js +65574 -0
- package/dist/sortable.cjs.js.map +1 -0
- package/dist/sortable.esm.css +332 -0
- package/dist/sortable.esm.js +65570 -0
- package/dist/sortable.esm.js.map +1 -0
- package/dist/sortable.umd.css +332 -0
- package/dist/sortable.umd.js +31878 -0
- package/dist/utilities/createRange.d.ts +1 -0
- package/dist/utilities/index.d.ts +1 -0
- package/package.json +4 -4
- package/src/components/MultipleContainers.tsx +63 -27
- package/src/components/components/Container/Container.module.css +19 -16
- package/src/components/components/Container/Container.tsx +7 -1
- package/src/components/components/Grid/Grid.module.css +1 -1
- package/src/components/components/Item/Item.module.css +21 -19
- package/src/components/components/Item/Item.tsx +4 -1
- package/src/metas/MultipleContainers.tsx +52 -5
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"packages": [
|
|
3
|
+
{
|
|
4
|
+
"package": "@steedos-widgets/sortable",
|
|
5
|
+
"urls": [
|
|
6
|
+
"http://127.0.0.1:8080/@steedos-widgets/sortable/dist/sortable.umd.js",
|
|
7
|
+
"http://127.0.0.1:8080/@steedos-widgets/sortable/dist/sortable.umd.css"
|
|
8
|
+
],
|
|
9
|
+
"library": "BuilderSortable"
|
|
10
|
+
}
|
|
11
|
+
],
|
|
12
|
+
"components": [
|
|
13
|
+
{
|
|
14
|
+
"exportName": "BuilderSortableMeta",
|
|
15
|
+
"npm": {
|
|
16
|
+
"package": "@steedos-widgets/sortable"
|
|
17
|
+
},
|
|
18
|
+
"url": "http://127.0.0.1:8080/@steedos-widgets/sortable/dist/meta.js",
|
|
19
|
+
"urls": {
|
|
20
|
+
"default": "http://127.0.0.1:8080/@steedos-widgets/sortable/dist/meta.js",
|
|
21
|
+
"design": "http://127.0.0.1:8080/@steedos-widgets/sortable/dist/meta.js"
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
}
|
package/dist/assets.json
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"packages": [
|
|
3
|
+
{
|
|
4
|
+
"package": "@steedos-widgets/sortable",
|
|
5
|
+
"urls": [
|
|
6
|
+
"https://unpkg.com/@steedos-widgets/sortable@1.3.4-beta.10/dist/sortable.umd.js",
|
|
7
|
+
"https://unpkg.com/@steedos-widgets/sortable@1.3.4-beta.10/dist/sortable.umd.css"
|
|
8
|
+
],
|
|
9
|
+
"library": "BuilderSortable"
|
|
10
|
+
}
|
|
11
|
+
],
|
|
12
|
+
"components": [
|
|
13
|
+
{
|
|
14
|
+
"exportName": "BuilderSortableMeta",
|
|
15
|
+
"npm": {
|
|
16
|
+
"package": "@steedos-widgets/sortable"
|
|
17
|
+
},
|
|
18
|
+
"url": "https://unpkg.com/@steedos-widgets/sortable@1.3.4-beta.10/dist/meta.js",
|
|
19
|
+
"urls": {
|
|
20
|
+
"default": "https://unpkg.com/@steedos-widgets/sortable@1.3.4-beta.10/dist/meta.js",
|
|
21
|
+
"design": "https://unpkg.com/@steedos-widgets/sortable@1.3.4-beta.10/dist/meta.js"
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface Props {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
columns?: number;
|
|
5
|
+
label?: string;
|
|
6
|
+
footer?: any;
|
|
7
|
+
style?: React.CSSProperties;
|
|
8
|
+
horizontal?: boolean;
|
|
9
|
+
hover?: boolean;
|
|
10
|
+
handleProps?: React.HTMLAttributes<any>;
|
|
11
|
+
scrollable?: boolean;
|
|
12
|
+
shadow?: boolean;
|
|
13
|
+
placeholder?: boolean;
|
|
14
|
+
unstyled?: boolean;
|
|
15
|
+
className: string;
|
|
16
|
+
onClick?(): void;
|
|
17
|
+
onRemove?(): void;
|
|
18
|
+
}
|
|
19
|
+
export declare const Container: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Grid } from './Grid';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { GridContainer } from './GridContainer';
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { DraggableSyntheticListeners } from '@dnd-kit/core';
|
|
3
|
+
import type { Transform } from '@dnd-kit/utilities';
|
|
4
|
+
export interface Props {
|
|
5
|
+
dragOverlay?: boolean;
|
|
6
|
+
color?: string;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
dragging?: boolean;
|
|
9
|
+
handle?: boolean;
|
|
10
|
+
handleProps?: any;
|
|
11
|
+
height?: number;
|
|
12
|
+
index?: number;
|
|
13
|
+
columnSpan?: number;
|
|
14
|
+
fadeIn?: boolean;
|
|
15
|
+
transform?: Transform | null;
|
|
16
|
+
listeners?: DraggableSyntheticListeners;
|
|
17
|
+
sorting?: boolean;
|
|
18
|
+
style?: React.CSSProperties;
|
|
19
|
+
transition?: string | null;
|
|
20
|
+
wrapperStyle?: React.CSSProperties;
|
|
21
|
+
value: React.ReactNode;
|
|
22
|
+
className: string;
|
|
23
|
+
onRemove?(): void;
|
|
24
|
+
renderItem?(args: {
|
|
25
|
+
dragOverlay: boolean;
|
|
26
|
+
dragging: boolean;
|
|
27
|
+
sorting: boolean;
|
|
28
|
+
index: number | undefined;
|
|
29
|
+
fadeIn: boolean;
|
|
30
|
+
listeners: DraggableSyntheticListeners;
|
|
31
|
+
ref: React.Ref<HTMLElement>;
|
|
32
|
+
style: React.CSSProperties | undefined;
|
|
33
|
+
transform: Props['transform'];
|
|
34
|
+
transition: Props['transition'];
|
|
35
|
+
value: Props['value'];
|
|
36
|
+
}): React.ReactElement;
|
|
37
|
+
}
|
|
38
|
+
export declare const Item: React.MemoExoticComponent<React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLLIElement>>>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React, { CSSProperties } from 'react';
|
|
2
|
+
export interface Props extends React.HTMLAttributes<HTMLButtonElement> {
|
|
3
|
+
active?: {
|
|
4
|
+
fill: string;
|
|
5
|
+
background: string;
|
|
6
|
+
};
|
|
7
|
+
cursor?: CSSProperties['cursor'];
|
|
8
|
+
}
|
|
9
|
+
export declare const Action: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Handle } from './Handle';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Remove } from './Remove';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { MultipleContainers } from './MultipleContainers';
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './components';
|
package/dist/meta.d.ts
ADDED
package/dist/meta.js
ADDED
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
(function (global, factory) {
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
|
3
|
+
typeof define === 'function' && define.amd ? define(factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.BuilderSortableMeta = factory());
|
|
5
|
+
})(this, (function () { 'use strict';
|
|
6
|
+
|
|
7
|
+
/******************************************************************************
|
|
8
|
+
Copyright (c) Microsoft Corporation.
|
|
9
|
+
|
|
10
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
11
|
+
purpose with or without fee is hereby granted.
|
|
12
|
+
|
|
13
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
14
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
15
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
16
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
17
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
18
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
19
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
20
|
+
***************************************************************************** */
|
|
21
|
+
|
|
22
|
+
var __assign = function() {
|
|
23
|
+
__assign = Object.assign || function __assign(t) {
|
|
24
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
25
|
+
s = arguments[i];
|
|
26
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
27
|
+
}
|
|
28
|
+
return t;
|
|
29
|
+
};
|
|
30
|
+
return __assign.apply(this, arguments);
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
var config = {
|
|
34
|
+
group: "华炎魔方-原子组件",
|
|
35
|
+
componentName: "MultipleContainers",
|
|
36
|
+
title: "看板",
|
|
37
|
+
docUrl: "",
|
|
38
|
+
screenshot: "",
|
|
39
|
+
npm: {
|
|
40
|
+
package: "@steedos-widgets/sortable",
|
|
41
|
+
version: "{{version}}",
|
|
42
|
+
exportName: "MultipleContainers",
|
|
43
|
+
main: "",
|
|
44
|
+
destructuring: true,
|
|
45
|
+
subName: ""
|
|
46
|
+
},
|
|
47
|
+
// props: [
|
|
48
|
+
// {
|
|
49
|
+
// name: "title",
|
|
50
|
+
// propType: "string",
|
|
51
|
+
// description: '标题',
|
|
52
|
+
// }
|
|
53
|
+
// ],
|
|
54
|
+
preview: {},
|
|
55
|
+
targets: ["steedos__RecordPage", "steedos__AppPage", "steedos__HomePage"],
|
|
56
|
+
engines: ["amis"],
|
|
57
|
+
// settings for amis.
|
|
58
|
+
amis: {
|
|
59
|
+
name: 'steedos-board',
|
|
60
|
+
icon: "fa-fw fa fa-list-alt"
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
var MultipleContainers = __assign(__assign({}, config), { snippets: [
|
|
64
|
+
{
|
|
65
|
+
title: config.title,
|
|
66
|
+
screenshot: "",
|
|
67
|
+
schema: {
|
|
68
|
+
componentName: config.componentName,
|
|
69
|
+
props: config.preview
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
], amis: {
|
|
73
|
+
render: {
|
|
74
|
+
type: config.amis.name,
|
|
75
|
+
usage: "formitem",
|
|
76
|
+
weight: 1,
|
|
77
|
+
framework: "react"
|
|
78
|
+
},
|
|
79
|
+
plugin: {
|
|
80
|
+
rendererName: config.amis.name,
|
|
81
|
+
$schema: '/schemas/UnkownSchema.json',
|
|
82
|
+
name: config.title,
|
|
83
|
+
description: config.title,
|
|
84
|
+
tags: [config.group],
|
|
85
|
+
order: -9999,
|
|
86
|
+
icon: config.amis.icon,
|
|
87
|
+
scaffold: {
|
|
88
|
+
type: config.amis.name,
|
|
89
|
+
label: config.title,
|
|
90
|
+
name: 'board',
|
|
91
|
+
columns: 1,
|
|
92
|
+
vertical: false,
|
|
93
|
+
"value": {
|
|
94
|
+
"A": [
|
|
95
|
+
"A1",
|
|
96
|
+
"B1"
|
|
97
|
+
],
|
|
98
|
+
"B": [
|
|
99
|
+
"A2",
|
|
100
|
+
"B2"
|
|
101
|
+
]
|
|
102
|
+
},
|
|
103
|
+
"boardSource": [
|
|
104
|
+
{
|
|
105
|
+
"id": "A",
|
|
106
|
+
"label": "Board A"
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"id": "B",
|
|
110
|
+
"label": "Board B"
|
|
111
|
+
}
|
|
112
|
+
],
|
|
113
|
+
"boardClassName": "bg-gray-50 p-2 border rounded shadow",
|
|
114
|
+
"boardHeader": {
|
|
115
|
+
"type": "tpl",
|
|
116
|
+
"tpl": "Board ${label}"
|
|
117
|
+
},
|
|
118
|
+
"boardFooter": {
|
|
119
|
+
"type": "tpl",
|
|
120
|
+
"tpl": "Board ${label} Footer"
|
|
121
|
+
},
|
|
122
|
+
"cardClassName": "bg-white border w-full p-2 rounded shadow",
|
|
123
|
+
"cardSchema": {
|
|
124
|
+
"type": "card",
|
|
125
|
+
"header": {
|
|
126
|
+
"className": "items-center",
|
|
127
|
+
"title": "${label}",
|
|
128
|
+
},
|
|
129
|
+
"toolbar": [
|
|
130
|
+
{
|
|
131
|
+
"type": "dropdown-button",
|
|
132
|
+
"level": "link",
|
|
133
|
+
"icon": "fa fa-ellipsis-h",
|
|
134
|
+
"className": "pr-1 flex",
|
|
135
|
+
"hideCaret": true,
|
|
136
|
+
"buttons": [
|
|
137
|
+
{
|
|
138
|
+
"type": "button",
|
|
139
|
+
"label": "编辑",
|
|
140
|
+
"actionType": "dialog",
|
|
141
|
+
"dialog": {
|
|
142
|
+
"title": "编辑",
|
|
143
|
+
"body": "你正在编辑该卡片"
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
"type": "button",
|
|
148
|
+
"label": "删除",
|
|
149
|
+
"actionType": "dialog",
|
|
150
|
+
"dialog": {
|
|
151
|
+
"title": "提示",
|
|
152
|
+
"body": "你删掉了该卡片"
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
]
|
|
156
|
+
}
|
|
157
|
+
],
|
|
158
|
+
"className": "mb-0"
|
|
159
|
+
},
|
|
160
|
+
"cardSource": [
|
|
161
|
+
{
|
|
162
|
+
"id": "A1",
|
|
163
|
+
"label": "Item A1",
|
|
164
|
+
"columnSpan": 2,
|
|
165
|
+
"color": "red"
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
"id": "A2",
|
|
169
|
+
"label": "Item A2",
|
|
170
|
+
"columnSpan": 1,
|
|
171
|
+
"color": "blue"
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
"id": "B1",
|
|
175
|
+
"label": "Item B1",
|
|
176
|
+
"color": "green"
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
"id": "B2",
|
|
180
|
+
"label": "Item B2",
|
|
181
|
+
"color": "silver"
|
|
182
|
+
}
|
|
183
|
+
],
|
|
184
|
+
},
|
|
185
|
+
previewSchema: {
|
|
186
|
+
type: config.amis.name,
|
|
187
|
+
},
|
|
188
|
+
panelTitle: "设置",
|
|
189
|
+
panelControls: [,
|
|
190
|
+
{
|
|
191
|
+
"name": "columns",
|
|
192
|
+
"type": "input-number",
|
|
193
|
+
"label": "列数",
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
"name": "vertical",
|
|
197
|
+
"type": "checkbox",
|
|
198
|
+
"label": "布局",
|
|
199
|
+
"option": "纵向"
|
|
200
|
+
}
|
|
201
|
+
]
|
|
202
|
+
}
|
|
203
|
+
} });
|
|
204
|
+
|
|
205
|
+
/*
|
|
206
|
+
* @Author: baozhoutao@steedos.com
|
|
207
|
+
* @Date: 2022-08-31 16:32:35
|
|
208
|
+
* @LastEditors: baozhoutao@steedos.com
|
|
209
|
+
* @LastEditTime: 2022-09-01 18:46:29
|
|
210
|
+
* @Description:
|
|
211
|
+
*/
|
|
212
|
+
var components = [MultipleContainers];
|
|
213
|
+
var componentList = [
|
|
214
|
+
{
|
|
215
|
+
title: "Steedos",
|
|
216
|
+
icon: "",
|
|
217
|
+
children: [MultipleContainers]
|
|
218
|
+
}
|
|
219
|
+
];
|
|
220
|
+
var meta = {
|
|
221
|
+
componentList: componentList,
|
|
222
|
+
components: components
|
|
223
|
+
};
|
|
224
|
+
|
|
225
|
+
return meta;
|
|
226
|
+
|
|
227
|
+
}));
|