@chaibuilder/sdk 2.2.18 → 2.2.20

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/core.d.ts CHANGED
@@ -250,6 +250,18 @@ export declare interface ChaiBuilderEditorProps {
250
250
  * Search page type items
251
251
  */
252
252
  searchPageTypeItems?: (pageTypeKey: string, query: string) => Promise<PageTypeItem[] | Error>;
253
+ /**
254
+ * Collections
255
+ */
256
+ collections?: ChaiCollectoin[];
257
+ /**
258
+ * Get Block Async Props
259
+ */
260
+ getBlockAsyncProps?: (args: {
261
+ block: ChaiBlock;
262
+ }) => Promise<{
263
+ [key: string]: any;
264
+ }>;
253
265
  }
254
266
 
255
267
  declare type ChaiBuilderThemeOptions = {
@@ -261,6 +273,14 @@ declare type ChaiBuilderThemeOptions = {
261
273
  }[];
262
274
  };
263
275
 
276
+ declare type ChaiCollectoin = {
277
+ id: string;
278
+ name: string;
279
+ description?: string;
280
+ filters?: FilterOptions[];
281
+ sorts?: SortOptions[];
282
+ };
283
+
264
284
  export declare function ChaiDarkModeSwitcher(): JSX_2.Element;
265
285
 
266
286
  export declare const ChaiDefaultBlocks: ({ parentId, position, gridCols, }: {
@@ -375,6 +395,12 @@ declare type CopyFn = (text: string) => Promise<boolean>;
375
395
 
376
396
  declare type ExcludedBuilderProps = "blocks" | "subPages" | "brandingOptions" | "dataProviders";
377
397
 
398
+ declare type FilterOptions = {
399
+ id: string;
400
+ name: string;
401
+ description?: string;
402
+ };
403
+
378
404
  /**
379
405
  * Get the unique uuid
380
406
  */
@@ -466,6 +492,12 @@ declare type SaveToLibraryProps = {
466
492
  close: () => void;
467
493
  };
468
494
 
495
+ declare type SortOptions = {
496
+ id: string;
497
+ name: string;
498
+ description?: string;
499
+ };
500
+
469
501
  declare interface ThemeConfigProps {
470
502
  className?: string;
471
503
  }
@@ -728,12 +760,12 @@ export declare const useUILibraryBlocks: () => {
728
760
  };
729
761
 
730
762
  export declare const useUndoManager: () => {
731
- add: any;
732
- undo: any;
733
- redo: any;
734
- hasRedo: any;
735
- hasUndo: any;
736
- clear: any;
763
+ add: (action: any) => void;
764
+ undo: () => void;
765
+ redo: () => void;
766
+ hasUndo: () => boolean;
767
+ hasRedo: () => boolean;
768
+ clear: () => void;
737
769
  };
738
770
 
739
771
  /**