next-data-kit 9.1.0 → 9.2.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.
Files changed (38) hide show
  1. package/README.md +65 -0
  2. package/dist/client/components/data-kit-infinity.js +1 -1
  3. package/dist/client/components/data-kit-infinity.js.map +1 -1
  4. package/dist/client/components/data-kit-table.d.ts.map +1 -1
  5. package/dist/client/components/data-kit-table.js +4 -2
  6. package/dist/client/components/data-kit-table.js.map +1 -1
  7. package/dist/client/components/data-kit.js +1 -1
  8. package/dist/client/components/data-kit.js.map +1 -1
  9. package/dist/client/components/ui/button.js +13 -13
  10. package/dist/client/components/ui/button.js.map +1 -1
  11. package/dist/client/components/ui/checkbox.js +1 -1
  12. package/dist/client/components/ui/checkbox.js.map +1 -1
  13. package/dist/client/components/ui/dropdown-menu.js +9 -9
  14. package/dist/client/components/ui/dropdown-menu.js.map +1 -1
  15. package/dist/client/components/ui/pagination.js +5 -5
  16. package/dist/client/components/ui/pagination.js.map +1 -1
  17. package/dist/client/components/ui/popover.js +1 -1
  18. package/dist/client/components/ui/popover.js.map +1 -1
  19. package/dist/client/components/ui/select.js +9 -9
  20. package/dist/client/components/ui/select.js.map +1 -1
  21. package/dist/client/components/ui/table.js +8 -8
  22. package/dist/client/components/ui/table.js.map +1 -1
  23. package/dist/client/hooks/useDataKit.d.ts.map +1 -1
  24. package/dist/client/hooks/useDataKit.js +47 -0
  25. package/dist/client/hooks/useDataKit.js.map +1 -1
  26. package/dist/index.cjs +1367 -114
  27. package/dist/index.cjs.map +1 -1
  28. package/dist/index.d.cts +24 -0
  29. package/dist/index.d.ts +24 -0
  30. package/dist/index.js +1367 -114
  31. package/dist/index.js.map +1 -1
  32. package/dist/styles.css +1 -1
  33. package/dist/types/client/component.d.ts +12 -0
  34. package/dist/types/client/component.d.ts.map +1 -1
  35. package/dist/types/client/hook.d.ts +12 -0
  36. package/dist/types/client/hook.d.ts.map +1 -1
  37. package/dist/types/index.d.cts +24 -0
  38. package/package.json +2 -2
package/dist/index.d.cts CHANGED
@@ -234,7 +234,19 @@ type TDataKitActions<T = unknown, R = unknown> = {
234
234
  getInput: () => TDataKitInput<T>;
235
235
  setItems: (items: R[]) => void;
236
236
  setItemAt: (index: number, item: R) => void;
237
+ itemUpdate: (props: {
238
+ index: number;
239
+ data: Partial<R>;
240
+ } | {
241
+ id: string | number;
242
+ data: Partial<R>;
243
+ }) => void;
237
244
  deleteItemAt: (index: number) => void;
245
+ itemDelete: (props: {
246
+ index: number;
247
+ } | {
248
+ id: string | number;
249
+ }) => void;
238
250
  itemPush: (item: R, position?: 0 | 1) => void;
239
251
  deleteBulk: (items: R[]) => void;
240
252
  };
@@ -437,6 +449,18 @@ type TDataKitBulkAction<TItem> = {
437
449
  */
438
450
  type TDataKitController<TItem> = {
439
451
  itemPush: (item: TItem, position?: 0 | 1) => void;
452
+ itemUpdate: (props: {
453
+ index: number;
454
+ data: Partial<TItem>;
455
+ } | {
456
+ id: string | number;
457
+ data: Partial<TItem>;
458
+ }) => void;
459
+ itemDelete: (props: {
460
+ index: number;
461
+ } | {
462
+ id: string | number;
463
+ }) => void;
440
464
  refetchData: () => void;
441
465
  deleteBulk: (items: TItem[]) => void;
442
466
  getSelectedItems: () => TItem[];
package/dist/index.d.ts CHANGED
@@ -234,7 +234,19 @@ type TDataKitActions<T = unknown, R = unknown> = {
234
234
  getInput: () => TDataKitInput<T>;
235
235
  setItems: (items: R[]) => void;
236
236
  setItemAt: (index: number, item: R) => void;
237
+ itemUpdate: (props: {
238
+ index: number;
239
+ data: Partial<R>;
240
+ } | {
241
+ id: string | number;
242
+ data: Partial<R>;
243
+ }) => void;
237
244
  deleteItemAt: (index: number) => void;
245
+ itemDelete: (props: {
246
+ index: number;
247
+ } | {
248
+ id: string | number;
249
+ }) => void;
238
250
  itemPush: (item: R, position?: 0 | 1) => void;
239
251
  deleteBulk: (items: R[]) => void;
240
252
  };
@@ -437,6 +449,18 @@ type TDataKitBulkAction<TItem> = {
437
449
  */
438
450
  type TDataKitController<TItem> = {
439
451
  itemPush: (item: TItem, position?: 0 | 1) => void;
452
+ itemUpdate: (props: {
453
+ index: number;
454
+ data: Partial<TItem>;
455
+ } | {
456
+ id: string | number;
457
+ data: Partial<TItem>;
458
+ }) => void;
459
+ itemDelete: (props: {
460
+ index: number;
461
+ } | {
462
+ id: string | number;
463
+ }) => void;
440
464
  refetchData: () => void;
441
465
  deleteBulk: (items: TItem[]) => void;
442
466
  getSelectedItems: () => TItem[];