@steedos-widgets/sortable 1.0.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/.env +1 -0
- package/.env.local +8 -0
- 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 +17 -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 +37 -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 +180 -0
- package/dist/metas/MultipleContainers.d.ts +2 -0
- package/dist/sortable.cjs.css +335 -0
- package/dist/sortable.cjs.js +56525 -0
- package/dist/sortable.cjs.js.map +1 -0
- package/dist/sortable.esm.css +335 -0
- package/dist/sortable.esm.js +56521 -0
- package/dist/sortable.esm.js.map +1 -0
- package/dist/sortable.umd.css +335 -0
- package/dist/sortable.umd.js +22829 -0
- package/dist/utilities/createRange.d.ts +1 -0
- package/dist/utilities/index.d.ts +1 -0
- package/package.json +51 -0
- package/rollup.config.ts +109 -0
- package/src/assets.json +25 -0
- package/src/components/MultipleContainers.tsx +802 -0
- package/src/components/components/Container/Container.module.css +103 -0
- package/src/components/components/Container/Container.tsx +83 -0
- package/src/components/components/Container/index.ts +2 -0
- package/src/components/components/Grid/Grid.module.css +30 -0
- package/src/components/components/Grid/Grid.tsx +22 -0
- package/src/components/components/Grid/index.ts +1 -0
- package/src/components/components/GridContainer/GridContainer.module.css +15 -0
- package/src/components/components/GridContainer/GridContainer.tsx +23 -0
- package/src/components/components/GridContainer/index.ts +1 -0
- package/src/components/components/Item/Item.module.css +145 -0
- package/src/components/components/Item/Item.tsx +157 -0
- package/src/components/components/Item/components/Action/Action.module.css +50 -0
- package/src/components/components/Item/components/Action/Action.tsx +33 -0
- package/src/components/components/Item/components/Action/index.ts +2 -0
- package/src/components/components/Item/components/Handle/Handle.tsx +20 -0
- package/src/components/components/Item/components/Handle/index.ts +1 -0
- package/src/components/components/Item/components/Remove/Remove.tsx +19 -0
- package/src/components/components/Item/components/Remove/index.ts +1 -0
- package/src/components/components/Item/components/index.ts +3 -0
- package/src/components/components/Item/index.ts +2 -0
- package/src/components/components/index.ts +6 -0
- package/src/components/index.ts +1 -0
- package/src/components/multipleContainersKeyboardCoordinates.ts +116 -0
- package/src/index.ts +1 -0
- package/src/meta.ts +20 -0
- package/src/metas/MultipleContainers.tsx +131 -0
- package/src/types/css.d.ts +4 -0
- package/src/types/global.d.ts +6 -0
- package/src/utilities/createRange.ts +15 -0
- package/src/utilities/index.ts +1 -0
- package/tsconfig.json +11 -0
package/.env
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
STEEDOS_UNPKG_URL=http://127.0.0.1:8080
|
package/.env.local
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
STEEDOS_UNPKG_URL=https://8080-coffee-crayfish-i7ky9rs9.ws.vscode.steedos.cn
|
|
2
|
+
STEEDOS_UNPKG_URL=https://8080-coffee-crayfish-i7ky9rs9.ws.vscode.steedos.cn
|
|
3
|
+
STEEDOS_UNPKG_URL=https://8080-coffee-crayfish-i7ky9rs9.ws.vscode.steedos.cn
|
|
4
|
+
STEEDOS_UNPKG_URL=https://8080-coffee-crayfish-i7ky9rs9.ws.vscode.steedos.cn
|
|
5
|
+
STEEDOS_UNPKG_URL=https://8080-coffee-crayfish-i7ky9rs9.ws.vscode.steedos.cn
|
|
6
|
+
STEEDOS_UNPKG_URL=https://8080-coffee-crayfish-i7ky9rs9.ws.vscode.steedos.cn
|
|
7
|
+
STEEDOS_UNPKG_URL=https://8080-coffee-crayfish-i7ky9rs9.ws.vscode.steedos.cn
|
|
8
|
+
STEEDOS_UNPKG_URL=https://8080-coffee-crayfish-i7ky9rs9.ws.vscode.steedos.cn
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"packages": [
|
|
3
|
+
{
|
|
4
|
+
"package": "@steedos-widgets/sortable",
|
|
5
|
+
"urls": [
|
|
6
|
+
"https://8080-coffee-crayfish-i7ky9rs9.ws.vscode.steedos.cn/@steedos-widgets/sortable/dist/sortable.umd.js",
|
|
7
|
+
"https://8080-coffee-crayfish-i7ky9rs9.ws.vscode.steedos.cn/@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": "https://8080-coffee-crayfish-i7ky9rs9.ws.vscode.steedos.cn/@steedos-widgets/sortable/dist/meta.js",
|
|
19
|
+
"urls": {
|
|
20
|
+
"default": "https://8080-coffee-crayfish-i7ky9rs9.ws.vscode.steedos.cn/@steedos-widgets/sortable/dist/meta.js",
|
|
21
|
+
"design": "https://8080-coffee-crayfish-i7ky9rs9.ws.vscode.steedos.cn/@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.0.1/dist/sortable.umd.js",
|
|
7
|
+
"https://unpkg.com/@steedos-widgets/sortable@1.0.1/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.0.1/dist/meta.js",
|
|
19
|
+
"urls": {
|
|
20
|
+
"default": "https://unpkg.com/@steedos-widgets/sortable@1.0.1/dist/meta.js",
|
|
21
|
+
"design": "https://unpkg.com/@steedos-widgets/sortable@1.0.1/dist/meta.js"
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface Props {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
columns?: number;
|
|
5
|
+
label?: string;
|
|
6
|
+
style?: React.CSSProperties;
|
|
7
|
+
horizontal?: boolean;
|
|
8
|
+
hover?: boolean;
|
|
9
|
+
handleProps?: React.HTMLAttributes<any>;
|
|
10
|
+
scrollable?: boolean;
|
|
11
|
+
shadow?: boolean;
|
|
12
|
+
placeholder?: boolean;
|
|
13
|
+
unstyled?: boolean;
|
|
14
|
+
onClick?(): void;
|
|
15
|
+
onRemove?(): void;
|
|
16
|
+
}
|
|
17
|
+
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,37 @@
|
|
|
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
|
+
onRemove?(): void;
|
|
23
|
+
renderItem?(args: {
|
|
24
|
+
dragOverlay: boolean;
|
|
25
|
+
dragging: boolean;
|
|
26
|
+
sorting: boolean;
|
|
27
|
+
index: number | undefined;
|
|
28
|
+
fadeIn: boolean;
|
|
29
|
+
listeners: DraggableSyntheticListeners;
|
|
30
|
+
ref: React.Ref<HTMLElement>;
|
|
31
|
+
style: React.CSSProperties | undefined;
|
|
32
|
+
transform: Props['transform'];
|
|
33
|
+
transition: Props['transition'];
|
|
34
|
+
value: Props['value'];
|
|
35
|
+
}): React.ReactElement;
|
|
36
|
+
}
|
|
37
|
+
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,180 @@
|
|
|
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: 'sortable-multiple-containers',
|
|
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
|
+
"containerSource": [
|
|
104
|
+
{
|
|
105
|
+
"id": "A",
|
|
106
|
+
"label": "Board A"
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"id": "B",
|
|
110
|
+
"label": "Board B"
|
|
111
|
+
}
|
|
112
|
+
],
|
|
113
|
+
"itemSource": [
|
|
114
|
+
{
|
|
115
|
+
"id": "A1",
|
|
116
|
+
"label": "Item A1",
|
|
117
|
+
"columnSpan": 2,
|
|
118
|
+
"color": "red"
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
"id": "A2",
|
|
122
|
+
"label": "Item A2",
|
|
123
|
+
"columnSpan": 1,
|
|
124
|
+
"color": "blue"
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
"id": "B1",
|
|
128
|
+
"label": "Item B1",
|
|
129
|
+
"color": "green"
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
"id": "B2",
|
|
133
|
+
"label": "Item B2",
|
|
134
|
+
"color": "silver"
|
|
135
|
+
}
|
|
136
|
+
],
|
|
137
|
+
},
|
|
138
|
+
previewSchema: {
|
|
139
|
+
type: config.amis.name,
|
|
140
|
+
},
|
|
141
|
+
panelTitle: "设置",
|
|
142
|
+
panelControls: [,
|
|
143
|
+
{
|
|
144
|
+
"name": "columns",
|
|
145
|
+
"type": "input-number",
|
|
146
|
+
"label": "列数",
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"name": "vertical",
|
|
150
|
+
"type": "checkbox",
|
|
151
|
+
"label": "布局",
|
|
152
|
+
"option": "纵向"
|
|
153
|
+
}
|
|
154
|
+
]
|
|
155
|
+
}
|
|
156
|
+
} });
|
|
157
|
+
|
|
158
|
+
/*
|
|
159
|
+
* @Author: baozhoutao@steedos.com
|
|
160
|
+
* @Date: 2022-08-31 16:32:35
|
|
161
|
+
* @LastEditors: baozhoutao@steedos.com
|
|
162
|
+
* @LastEditTime: 2022-09-01 18:46:29
|
|
163
|
+
* @Description:
|
|
164
|
+
*/
|
|
165
|
+
var components = [MultipleContainers];
|
|
166
|
+
var componentList = [
|
|
167
|
+
{
|
|
168
|
+
title: "Steedos",
|
|
169
|
+
icon: "",
|
|
170
|
+
children: [MultipleContainers]
|
|
171
|
+
}
|
|
172
|
+
];
|
|
173
|
+
var meta = {
|
|
174
|
+
componentList: componentList,
|
|
175
|
+
components: components
|
|
176
|
+
};
|
|
177
|
+
|
|
178
|
+
return meta;
|
|
179
|
+
|
|
180
|
+
}));
|