@nocobase/plugin-kanban 1.6.0-beta.8 → 1.6.0

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.
@@ -10,10 +10,25 @@ import React from 'react';
10
10
  export declare const KanbanBlockContext: React.Context<any>;
11
11
  export declare const KanbanBlockProvider: (props: any) => React.JSX.Element;
12
12
  export declare const useKanbanBlockContext: () => any;
13
+ export declare const toColumns: (groupCollectionField: any, dataSource: Array<any>, primaryKey: any, options: any) => {
14
+ id: string;
15
+ title: string;
16
+ color: string;
17
+ cards: any[];
18
+ }[];
13
19
  export declare const useKanbanBlockProps: () => {
14
20
  setDataSource: React.Dispatch<React.SetStateAction<any[]>>;
15
21
  dataSource: any[];
16
22
  groupField: any;
17
23
  disableCardDrag: boolean;
18
- onCardDragEnd: ({ columns, groupField }: any, { fromColumnId, fromPosition }: any, { toColumnId, toPosition }: any) => Promise<void>;
24
+ onCardDragEnd: ({ columns, groupField }: {
25
+ columns: any;
26
+ groupField: any;
27
+ }, { fromColumnId, fromPosition }: {
28
+ fromColumnId: any;
29
+ fromPosition: any;
30
+ }, { toColumnId, toPosition }: {
31
+ toColumnId: any;
32
+ toPosition: any;
33
+ }) => Promise<void>;
19
34
  };
@@ -7,7 +7,32 @@
7
7
  * For more information, please refer to: https://www.nocobase.com/agreement.
8
8
  */
9
9
  import { Plugin } from '@nocobase/client';
10
+ type Option = {
11
+ color?: string;
12
+ label: string;
13
+ value: string;
14
+ };
15
+ type GroupOptions = {
16
+ options: Option[];
17
+ loading?: boolean;
18
+ };
19
+ type GetGroupOptions = (collectionField: string) => GroupOptions;
10
20
  declare class PluginKanbanClient extends Plugin {
21
+ groupFields: {
22
+ [T: string]: {
23
+ useGetGroupOptions: GetGroupOptions;
24
+ };
25
+ };
26
+ registerGroupFieldInterface(interfaceName: string, options: {
27
+ useGetGroupOptions: GetGroupOptions;
28
+ }): void;
29
+ getGroupFieldInterface(key: any): {
30
+ useGetGroupOptions: GetGroupOptions;
31
+ } | {
32
+ [T: string]: {
33
+ useGetGroupOptions: GetGroupOptions;
34
+ };
35
+ };
11
36
  load(): Promise<void>;
12
37
  }
13
38
  export default PluginKanbanClient;