@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.
Files changed (43) hide show
  1. package/dist/assets-dev.json +25 -0
  2. package/dist/assets.json +25 -0
  3. package/dist/components/MultipleContainers.d.ts +7 -0
  4. package/dist/components/components/Container/Container.d.ts +19 -0
  5. package/dist/components/components/Container/index.d.ts +2 -0
  6. package/dist/components/components/Grid/Grid.d.ts +7 -0
  7. package/dist/components/components/Grid/index.d.ts +1 -0
  8. package/dist/components/components/GridContainer/GridContainer.d.ts +6 -0
  9. package/dist/components/components/GridContainer/index.d.ts +1 -0
  10. package/dist/components/components/Item/Item.d.ts +38 -0
  11. package/dist/components/components/Item/components/Action/Action.d.ts +9 -0
  12. package/dist/components/components/Item/components/Action/index.d.ts +2 -0
  13. package/dist/components/components/Item/components/Handle/Handle.d.ts +3 -0
  14. package/dist/components/components/Item/components/Handle/index.d.ts +1 -0
  15. package/dist/components/components/Item/components/Remove/Remove.d.ts +3 -0
  16. package/dist/components/components/Item/components/Remove/index.d.ts +1 -0
  17. package/dist/components/components/Item/components/index.d.ts +3 -0
  18. package/dist/components/components/Item/index.d.ts +2 -0
  19. package/dist/components/components/index.d.ts +5 -0
  20. package/dist/components/index.d.ts +1 -0
  21. package/dist/components/multipleContainersKeyboardCoordinates.d.ts +2 -0
  22. package/dist/index.d.ts +1 -0
  23. package/dist/meta.d.ts +9 -0
  24. package/dist/meta.js +227 -0
  25. package/dist/metas/MultipleContainers.d.ts +2 -0
  26. package/dist/sortable.cjs.css +332 -0
  27. package/dist/sortable.cjs.js +65574 -0
  28. package/dist/sortable.cjs.js.map +1 -0
  29. package/dist/sortable.esm.css +332 -0
  30. package/dist/sortable.esm.js +65570 -0
  31. package/dist/sortable.esm.js.map +1 -0
  32. package/dist/sortable.umd.css +332 -0
  33. package/dist/sortable.umd.js +31878 -0
  34. package/dist/utilities/createRange.d.ts +1 -0
  35. package/dist/utilities/index.d.ts +1 -0
  36. package/package.json +4 -4
  37. package/src/components/MultipleContainers.tsx +63 -27
  38. package/src/components/components/Container/Container.module.css +19 -16
  39. package/src/components/components/Container/Container.tsx +7 -1
  40. package/src/components/components/Grid/Grid.module.css +1 -1
  41. package/src/components/components/Item/Item.module.css +21 -19
  42. package/src/components/components/Item/Item.tsx +4 -1
  43. package/src/metas/MultipleContainers.tsx +52 -5
@@ -0,0 +1 @@
1
+ export declare function createRange<T = number>(length: number, initializer?: (index: number) => any): T[];
@@ -0,0 +1 @@
1
+ export { createRange } from './createRange';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@steedos-widgets/sortable",
3
- "version": "1.3.4-beta.1",
3
+ "version": "1.3.4-beta.10",
4
4
  "main": "dist/sortable.cjs.js",
5
5
  "module": "dist/sortable.esm.js",
6
6
  "unpkg": "dist/sortable.umd.js",
@@ -8,7 +8,7 @@
8
8
  "license": "MIT",
9
9
  "scripts": {
10
10
  "prebuild": "rimraf dist",
11
- "build.disabled": "yarn build:rollup",
11
+ "build": "yarn build:rollup",
12
12
  "build:rollup": "rollup -c rollup.config.ts",
13
13
  "build:types": "tsc --emitDeclarationOnly --declaration --declarationDir dist/types"
14
14
  },
@@ -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": "1.3.4-beta.1"
48
+ "@steedos-widgets/amis-lib": "1.3.4-beta.10"
49
49
  },
50
- "gitHead": "9bdc96bf72620115fd444993bdd6eb842a25b640"
50
+ "gitHead": "a3588f996b1c8ee42deafdcf4eeb7fdb316d50c9"
51
51
  }
@@ -58,12 +58,14 @@ function DroppableContainer({
58
58
  id,
59
59
  items,
60
60
  style,
61
+ className,
61
62
  ...props
62
63
  }: ContainerProps & {
63
64
  disabled?: boolean;
64
65
  id: UniqueIdentifier;
65
66
  items: UniqueIdentifier[];
66
67
  style?: React.CSSProperties;
68
+ className: string
67
69
  }) {
68
70
  const {
69
71
  active,
@@ -96,6 +98,7 @@ function DroppableContainer({
96
98
  transform: CSS.Translate.toString(transform),
97
99
  opacity: isDragging ? 0.5 : undefined,
98
100
  }}
101
+ className={className}
99
102
  hover={isOverContainer}
100
103
  handleProps={{
101
104
  ...attributes,
@@ -148,14 +151,19 @@ interface Props {
148
151
  addable?: boolean;
149
152
  scrollable?: boolean;
150
153
  vertical?: boolean;
151
- containerSource: [{id:string, label:string}?],
152
- itemSource: [{id:string, label:string, color: string, columnSpan: number, body: [any]}?],
154
+ boardSource: [{id:string, label:string}?],
155
+ cardSource: [{id:string, label:string, color: string, columnSpan: number, body: [any]}?],
153
156
  defaultValue: any,
154
157
  onChange: Function,
155
158
  data: any,
156
159
  dispatchEvent: Function,
157
160
  render: Function,
158
- itemBody: any
161
+ cardSchema: any,
162
+ boardHeader: any,
163
+ boardFooter: any,
164
+ wrapperClassName: string,
165
+ boardClassName: string,
166
+ cardClassName: string,
159
167
  }
160
168
 
161
169
  export const TRASH_ID = 'void';
@@ -169,7 +177,7 @@ export function MultipleContainers(props) {
169
177
  itemCount = 3,
170
178
  cancelDrop,
171
179
  columns = 1,
172
- handle = false,
180
+ handle = true,
173
181
  containerStyle,
174
182
  coordinateGetter = multipleContainersCoordinateGetter,
175
183
  getItemStyles = () => ({}),
@@ -182,18 +190,26 @@ export function MultipleContainers(props) {
182
190
  trashable = false,
183
191
  vertical = false,
184
192
  scrollable,
185
- containerSource = [],
186
- itemSource = [],
193
+ boardSource = [],
194
+ cardSource = [],
187
195
  defaultValue,
188
196
  onChange: amisOnChange,
189
197
  data: amisData,
190
198
  dispatchEvent: amisDispatchEvent,
191
199
  render: amisRender,
192
- itemBody: amisItemBody = [{
200
+ cardSchema = [{
193
201
  "type": "tpl",
194
202
  "tpl": "${label}",
195
203
  "inline": false,
196
204
  }],
205
+ boardHeader = [{
206
+ "type": "tpl",
207
+ "tpl": "${label}",
208
+ }],
209
+ boardFooter = [],
210
+ wrapperClassName = "gap-2",
211
+ boardClassName = "border rounded",
212
+ cardClassName = "",
197
213
  }: Props = props
198
214
 
199
215
  defaultValue && delete(defaultValue.$$id);
@@ -469,7 +485,7 @@ export function MultipleContainers(props) {
469
485
  ),
470
486
  [newContainerId]: [active.id],
471
487
  }));
472
- console.log('拖动结束,更新form value')
488
+ // console.log('拖动结束,更新form value')
473
489
  handleChange()
474
490
  setActiveId(null);
475
491
  });
@@ -496,7 +512,7 @@ export function MultipleContainers(props) {
496
512
 
497
513
  setActiveId(null);
498
514
 
499
- console.log('拖动结束2,更新form value')
515
+ // console.log('拖动结束2,更新form value')
500
516
  handleChange()
501
517
  }}
502
518
  cancelDrop={cancelDrop}
@@ -510,6 +526,7 @@ export function MultipleContainers(props) {
510
526
  gridAutoFlow: vertical ? 'row' : 'column',
511
527
  width: vertical? '100%': 'auto'
512
528
  }}
529
+ className={wrapperClassName}
513
530
  >
514
531
  <SortableContext
515
532
  items={[...containers, PLACEHOLDER_ID]}
@@ -520,7 +537,7 @@ export function MultipleContainers(props) {
520
537
  }
521
538
  >
522
539
  {containers.map((containerId) => {
523
- const container = cloneDeep(keyBy(containerSource, 'id')[containerId]) || {id: containerId, label: 'Container ' + containerId}
540
+ const container = cloneDeep(keyBy(boardSource, 'id')[containerId]) || {id: containerId, label: 'Container ' + containerId}
524
541
  return (
525
542
  <DroppableContainer
526
543
  key={containerId}
@@ -530,20 +547,25 @@ export function MultipleContainers(props) {
530
547
  items={items[containerId]}
531
548
  scrollable={scrollable}
532
549
  style={containerStyle}
550
+ className={boardClassName}
533
551
  unstyled={minimal}
534
- onRemove={() => handleRemove(containerId)}
552
+ // onRemove={() => handleRemove(containerId)}
535
553
  {...container}
554
+ label={amisRender? amisRender('body', boardHeader, {data: {...container}}) : (
555
+ <span>{container.label}</span>
556
+ )}
557
+ footer={amisRender? amisRender('body', boardFooter, {data: {...container}}) : (<></>)}
536
558
  >
537
559
  <SortableContext
538
560
  items={items[containerId]}
539
561
  strategy={strategy}
540
562
  >
541
563
  {items[containerId].map((value, index) => {
542
- const item = cloneDeep(keyBy(itemSource, 'id')[value]) || {id: value, label: '' + value, columnSpan:1, body: amisItemBody}
564
+ const item = cloneDeep(keyBy(cardSource, 'id')[value]) || {id: value, label: '' + value, columnSpan:1, body: cardSchema}
543
565
  if (item.columnSpan && item.columnSpan > columns)
544
566
  item.columnSpan = columns
545
567
  if (!item.body)
546
- item.body = amisItemBody
568
+ item.body = cardSchema
547
569
  return (
548
570
  <SortableItem
549
571
  disabled={isSortingContainer}
@@ -558,6 +580,7 @@ export function MultipleContainers(props) {
558
580
  renderItem={renderItem}
559
581
  containerId={containerId}
560
582
  getIndex={getIndex}
583
+ className={cardClassName}
561
584
  {...item}
562
585
  />
563
586
  );
@@ -596,12 +619,12 @@ export function MultipleContainers(props) {
596
619
  );
597
620
 
598
621
  function renderSortableItemDragOverlay(id: UniqueIdentifier) {
599
- const item = cloneDeep(keyBy(itemSource, 'id')[id]) || {id: id, label: '' + id, columnSpan:1}
622
+ const item = cloneDeep(keyBy(cardSource, 'id')[id]) || {id: id, label: '' + id, columnSpan:1}
600
623
  if (item.columnSpan && item.columnSpan > columns)
601
624
  item.columnSpan = columns
602
625
  return (
603
626
  <Item
604
- value={amisRender? amisRender('body', amisItemBody, {data: {...item}}) : (
627
+ value={amisRender? amisRender('body', cardSchema, {data: {...item}}) : (
605
628
  <span>{item.label}</span>
606
629
  )}
607
630
  handle={handle}
@@ -622,36 +645,46 @@ export function MultipleContainers(props) {
622
645
  );
623
646
  }
624
647
 
625
- function renderContainerDragOverlay(containerId: UniqueIdentifier) {
648
+ function renderContainerDragOverlay(containerId: UniqueIdentifier) {
649
+ const container = cloneDeep(keyBy(boardSource, 'id')[containerId]) || {id: containerId, label: 'Container ' + containerId}
650
+
626
651
  return (
627
652
  <Container
628
- label={`Column ${containerId}`}
653
+ label={amisRender? amisRender('body', boardHeader, {data: {...container}}) : (
654
+ <span>{container.label}</span>
655
+ )}
629
656
  columns={columns}
630
657
  style={{
631
658
  height: '100%',
632
659
  }}
633
- shadow
660
+ className={boardClassName}
634
661
  unstyled={false}
635
662
  >
636
- {items[containerId].map((item, index) => (
663
+ {items[containerId].map((id, index) => {
664
+ const item = cloneDeep(keyBy(cardSource, 'id')[id]) || {id: id, label: '' + id, columnSpan:1}
665
+ return (
637
666
  <Item
638
- key={item}
639
- value={item}
667
+ key={id}
640
668
  handle={handle}
641
669
  style={getItemStyles({
642
670
  containerId,
643
671
  overIndex: -1,
644
- index: getIndex(item),
645
- value: item,
672
+ index: getIndex(id),
673
+ value: id,
646
674
  isDragging: false,
647
675
  isSorting: false,
648
676
  isDragOverlay: false,
649
677
  })}
650
- color={getColor(item)}
651
- wrapperStyle={wrapperStyle({ index })}
678
+ color={getColor(id)}
679
+ wrapperStyle={wrapperStyle({ id })}
652
680
  renderItem={renderItem}
681
+ className={cardClassName}
682
+ value={amisRender? amisRender('body', cardSchema, {data: {...item}}) : (
683
+ <span>{item.label}</span>
684
+ )}
653
685
  />
654
- ))}
686
+ )}
687
+ )}
655
688
  </Container>
656
689
  );
657
690
  }
@@ -682,7 +715,7 @@ export function MultipleContainers(props) {
682
715
  }
683
716
 
684
717
  function getColor(id: UniqueIdentifier) {
685
- const item = cloneDeep(keyBy(itemSource, 'id')[id])
718
+ const item = cloneDeep(keyBy(cardSource, 'id')[id])
686
719
  return item && item.color? item.color : undefined
687
720
  }
688
721
 
@@ -698,6 +731,7 @@ export function MultipleContainers(props) {
698
731
  getIndex,
699
732
  value,
700
733
  wrapperStyle,
734
+ className,
701
735
  ...props
702
736
  }: SortableItemProps) {
703
737
  const {
@@ -740,6 +774,7 @@ export function MultipleContainers(props) {
740
774
  fadeIn={mountedWhileDragging}
741
775
  listeners={listeners}
742
776
  renderItem={renderItem}
777
+ className={className}
743
778
  {...props}
744
779
  />
745
780
  );
@@ -783,6 +818,7 @@ interface SortableItemProps {
783
818
  handle: boolean;
784
819
  value: any;
785
820
  disabled?: boolean;
821
+ className: string;
786
822
  style(args: any): React.CSSProperties;
787
823
  getIndex(id: UniqueIdentifier): number;
788
824
  renderItem(): React.ReactElement;
@@ -2,25 +2,25 @@
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  grid-auto-rows: max-content;
5
- overflow: hidden;
5
+ /* overflow: hidden; */
6
6
  box-sizing: border-box;
7
7
  appearance: none;
8
8
  outline: none;
9
9
  min-width: 350px;
10
- margin: 10px;
11
- border-radius: 5px;
12
- min-height: 200px;
10
+ /* margin: 10px; */
11
+ /* border-radius: 5px; */
12
+ min-height: 100px;
13
13
  transition: background-color 350ms ease;
14
- background-color: rgba(246, 246, 246, 1);
14
+ /* background-color: rgba(246, 246, 246, 1);
15
15
  border: 1px solid rgba(0, 0, 0, 0.05);
16
- font-size: 1em;
16
+ font-size: 1em; */
17
17
 
18
18
  ul {
19
19
  display: grid;
20
20
  grid-gap: 10px;
21
21
  grid-template-columns: repeat(var(--columns, 1), 1fr);
22
22
  list-style: none;
23
- padding: 10px;
23
+ padding: 10px 0;
24
24
  margin: 0;
25
25
  }
26
26
 
@@ -50,8 +50,8 @@
50
50
 
51
51
  &.unstyled {
52
52
  overflow: visible;
53
- background-color: transparent !important;
54
- border: none !important;
53
+ /* background-color: transparent !important;
54
+ border: none !important; */
55
55
  }
56
56
 
57
57
  &.horizontal {
@@ -63,7 +63,7 @@
63
63
  }
64
64
 
65
65
  &.shadow {
66
- box-shadow: 0 1px 10px 0 rgba(34, 33, 81, 0.1);
66
+ /* box-shadow: 0 1px 10px 0 rgba(34, 33, 81, 0.1); */
67
67
  }
68
68
 
69
69
  &:focus-visible {
@@ -74,14 +74,15 @@
74
74
 
75
75
  .Header {
76
76
  display: flex;
77
- padding: 5px 20px;
78
- padding-right: 8px;
77
+ /* padding: 5px 20px;
78
+ padding-right: 8px; */
79
79
  align-items: center;
80
80
  justify-content: space-between;
81
- background-color: #fff;
82
- border-top-left-radius: 5px;
83
- border-top-right-radius: 5px;
84
- border-bottom: 1px solid rgba(0, 0, 0, 0.08);
81
+ position: relative;
82
+ /* background-color: #fff; */
83
+ /* border-top-left-radius: 5px;
84
+ border-top-right-radius: 5px; */
85
+ /* border-bottom: 1px solid rgba(0, 0, 0, 0.08); */
85
86
 
86
87
  &:hover {
87
88
  .Actions > * {
@@ -92,6 +93,8 @@
92
93
 
93
94
  .Actions {
94
95
  display: flex;
96
+ position: absolute;
97
+ right: 6px;
95
98
 
96
99
  > *:first-child:not(:last-child) {
97
100
  opacity: 0;
@@ -11,6 +11,7 @@ export interface Props {
11
11
  children: React.ReactNode;
12
12
  columns?: number;
13
13
  label?: string;
14
+ footer?: any;
14
15
  style?: React.CSSProperties;
15
16
  horizontal?: boolean;
16
17
  hover?: boolean;
@@ -19,6 +20,7 @@ export interface Props {
19
20
  shadow?: boolean;
20
21
  placeholder?: boolean;
21
22
  unstyled?: boolean;
23
+ className: string;
22
24
  onClick?(): void;
23
25
  onRemove?(): void;
24
26
  }
@@ -34,11 +36,13 @@ export const Container = forwardRef<HTMLDivElement, Props>(
34
36
  onClick,
35
37
  onRemove,
36
38
  label,
39
+ footer,
37
40
  placeholder,
38
41
  style,
39
42
  scrollable,
40
43
  shadow,
41
44
  unstyled,
45
+ className,
42
46
  ...props
43
47
  }: Props,
44
48
  ref
@@ -62,7 +66,8 @@ export const Container = forwardRef<HTMLDivElement, Props>(
62
66
  hover && styles.hover,
63
67
  placeholder && styles.placeholder,
64
68
  scrollable && styles.scrollable,
65
- shadow && styles.shadow
69
+ shadow && styles.shadow,
70
+ className
66
71
  )}
67
72
  onClick={onClick}
68
73
  tabIndex={onClick ? 0 : undefined}
@@ -77,6 +82,7 @@ export const Container = forwardRef<HTMLDivElement, Props>(
77
82
  </div>
78
83
  ) : null}
79
84
  {placeholder ? children : <ul>{children}</ul>}
85
+ {footer? footer : <></>}
80
86
  </Component>
81
87
  );
82
88
  }
@@ -19,7 +19,7 @@
19
19
  #ddd var(--grid-size)
20
20
  );
21
21
  background-size: var(--grid-size) var(--grid-size);
22
- z-index: -1;
22
+ /* z-index: -1; */
23
23
  pointer-events: none;
24
24
  }
25
25
 
@@ -55,21 +55,21 @@ $focused-outline-color: #4c9ffe;
55
55
  display: flex;
56
56
  flex-grow: 1;
57
57
  align-items: center;
58
- padding: 8px 10px;
59
- background-color: $background-color;
60
- box-shadow: $box-shadow;
61
- outline: none;
62
- border-radius: calc(4px / var(--scale-x, 1));
63
- box-sizing: border-box;
58
+ /* padding: 8px 10px; */
59
+ /* background-color: $background-color; */
60
+ /* box-shadow: $box-shadow; */
61
+ /* outline: none; */
62
+ /* border-radius: calc(4px / var(--scale-x, 1)); */
63
+ /* box-sizing: border-box; */
64
64
  list-style: none;
65
65
  transform-origin: 50% 50%;
66
66
 
67
67
  -webkit-tap-highlight-color: transparent;
68
68
 
69
- color: $text-color;
70
- font-weight: $font-weight;
71
- font-size: 1rem;
72
- white-space: nowrap;
69
+ /* color: $text-color; */
70
+ /* font-weight: $font-weight; */
71
+ /* font-size: 1rem; */
72
+ /* white-space: nowrap; */
73
73
 
74
74
  transform: scale(var(--scale, 1));
75
75
  transition: box-shadow 200ms cubic-bezier(0.18, 0.67, 0.6, 1.22);
@@ -85,7 +85,7 @@ $focused-outline-color: #4c9ffe;
85
85
 
86
86
  &.dragging:not(.dragOverlay) {
87
87
  opacity: var(--dragging-opacity, 0.5);
88
- z-index: 0;
88
+ /* z-index: -1; */
89
89
 
90
90
  &:focus {
91
91
  box-shadow: $box-shadow;
@@ -110,7 +110,7 @@ $focused-outline-color: #4c9ffe;
110
110
  opacity: 1;
111
111
  }
112
112
 
113
- &.color:before {
113
+ /* &.color:before {
114
114
  content: '';
115
115
  position: absolute;
116
116
  top: 50%;
@@ -122,7 +122,7 @@ $focused-outline-color: #4c9ffe;
122
122
  border-top-left-radius: 3px;
123
123
  border-bottom-left-radius: 3px;
124
124
  background-color: var(--color);
125
- }
125
+ } */
126
126
 
127
127
  &:hover {
128
128
  .Remove {
@@ -136,10 +136,12 @@ $focused-outline-color: #4c9ffe;
136
136
  }
137
137
 
138
138
  .Actions {
139
- display: flex;
140
- align-self: flex-start;
141
- margin-top: -12px;
142
- margin-left: auto;
143
- margin-bottom: -15px;
144
- margin-right: -10px;
139
+ /* display: flex;
140
+ align-self: flex-start; */
141
+ /* margin-top: -12px; */
142
+ /* margin-left: auto; */
143
+ /* margin-bottom: -15px;
144
+ margin-right: -10px; */
145
+ position:absolute;
146
+ right: 6px;
145
147
  }
@@ -25,6 +25,7 @@ export interface Props {
25
25
  transition?: string | null;
26
26
  wrapperStyle?: React.CSSProperties;
27
27
  value: React.ReactNode;
28
+ className: string;
28
29
  onRemove?(): void;
29
30
  renderItem?(args: {
30
31
  dragOverlay: boolean;
@@ -64,6 +65,7 @@ export const Item = React.memo(
64
65
  transform,
65
66
  value,
66
67
  wrapperStyle,
68
+ className,
67
69
  ...props
68
70
  },
69
71
  ref
@@ -100,7 +102,8 @@ export const Item = React.memo(
100
102
  styles.Wrapper,
101
103
  fadeIn && styles.fadeIn,
102
104
  sorting && styles.sorting,
103
- dragOverlay && styles.dragOverlay
105
+ dragOverlay && styles.dragOverlay,
106
+ className
104
107
  )}
105
108
  style={
106
109
  {
@@ -1,7 +1,7 @@
1
1
  const config: any = {
2
- group: "华炎魔方",
2
+ group: "华炎魔方-原子组件",
3
3
  componentName: "MultipleContainers",
4
- title: "容器排序",
4
+ title: "看板",
5
5
  docUrl: "",
6
6
  screenshot: "",
7
7
  npm: {
@@ -25,7 +25,7 @@ const config: any = {
25
25
  engines: ["amis"],
26
26
  // settings for amis.
27
27
  amis: {
28
- name: 'sortable-multiple-containers',
28
+ name: 'steedos-board',
29
29
  icon: "fa-fw fa fa-list-alt"
30
30
  }
31
31
  };
@@ -73,7 +73,7 @@ const config: any = {
73
73
  "B2"
74
74
  ]
75
75
  },
76
- "containerSource": [
76
+ "boardSource": [
77
77
  {
78
78
  "id": "A",
79
79
  "label": "Board A"
@@ -83,7 +83,54 @@ const config: any = {
83
83
  "label": "Board B"
84
84
  }
85
85
  ],
86
- "itemSource": [
86
+ "boardClassName": "bg-gray-50 p-2 border rounded shadow",
87
+ "boardHeader": {
88
+ "type": "tpl",
89
+ "tpl": "Board ${label}"
90
+ },
91
+ "boardFooter": {
92
+ "type": "tpl",
93
+ "tpl": "Board ${label} Footer"
94
+ },
95
+ "cardClassName": "bg-white border w-full p-2 rounded shadow",
96
+ "cardSchema": {
97
+ "type": "card",
98
+ "header": {
99
+ "className": "items-center",
100
+ "title": "${label}",
101
+ },
102
+ "toolbar": [
103
+ {
104
+ "type": "dropdown-button",
105
+ "level": "link",
106
+ "icon": "fa fa-ellipsis-h",
107
+ "className": "pr-1 flex",
108
+ "hideCaret": true,
109
+ "buttons": [
110
+ {
111
+ "type": "button",
112
+ "label": "编辑",
113
+ "actionType": "dialog",
114
+ "dialog": {
115
+ "title": "编辑",
116
+ "body": "你正在编辑该卡片"
117
+ }
118
+ },
119
+ {
120
+ "type": "button",
121
+ "label": "删除",
122
+ "actionType": "dialog",
123
+ "dialog": {
124
+ "title": "提示",
125
+ "body": "你删掉了该卡片"
126
+ }
127
+ }
128
+ ]
129
+ }
130
+ ],
131
+ "className": "mb-0"
132
+ },
133
+ "cardSource": [
87
134
  {
88
135
  "id": "A1",
89
136
  "label": "Item A1",