@carlonicora/nextjs-jsonapi 0.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.
Files changed (222) hide show
  1. package/README.md +889 -0
  2. package/dist/AbstractService-BKlpJA61.d.mts +109 -0
  3. package/dist/AbstractService-D9eSVKNa.d.ts +109 -0
  4. package/dist/ApiData-DPKNfY-9.d.mts +10 -0
  5. package/dist/ApiData-DPKNfY-9.d.ts +10 -0
  6. package/dist/ApiDataInterface-DPP8s46n.d.mts +21 -0
  7. package/dist/ApiDataInterface-DPP8s46n.d.ts +21 -0
  8. package/dist/ApiRequestDataTypeInterface-CUKFDBx2.d.mts +20 -0
  9. package/dist/ApiRequestDataTypeInterface-CUKFDBx2.d.ts +20 -0
  10. package/dist/ApiResponseInterface-BHN5D9r5.d.mts +16 -0
  11. package/dist/ApiResponseInterface-DDI7QQPR.d.ts +16 -0
  12. package/dist/BlockNoteEditor-UVO3VZZE.mjs +396 -0
  13. package/dist/BlockNoteEditor-UVO3VZZE.mjs.map +1 -0
  14. package/dist/BlockNoteEditor-VFWG6LXI.js +396 -0
  15. package/dist/BlockNoteEditor-VFWG6LXI.js.map +1 -0
  16. package/dist/JsonApiRequest-S3ICLM7B.mjs +20 -0
  17. package/dist/JsonApiRequest-S3ICLM7B.mjs.map +1 -0
  18. package/dist/JsonApiRequest-ZZLSP26T.js +20 -0
  19. package/dist/JsonApiRequest-ZZLSP26T.js.map +1 -0
  20. package/dist/atoms/index.d.mts +12 -0
  21. package/dist/atoms/index.d.ts +12 -0
  22. package/dist/atoms/index.js +9 -0
  23. package/dist/atoms/index.js.map +1 -0
  24. package/dist/atoms/index.mjs +9 -0
  25. package/dist/atoms/index.mjs.map +1 -0
  26. package/dist/breadcrumb.item.data.interface-CgB4_1EE.d.mts +6 -0
  27. package/dist/breadcrumb.item.data.interface-CgB4_1EE.d.ts +6 -0
  28. package/dist/chunk-2K3Q24UF.js +89 -0
  29. package/dist/chunk-2K3Q24UF.js.map +1 -0
  30. package/dist/chunk-2LM6LCJW.mjs +1091 -0
  31. package/dist/chunk-2LM6LCJW.mjs.map +1 -0
  32. package/dist/chunk-366S2JCC.mjs +31 -0
  33. package/dist/chunk-366S2JCC.mjs.map +1 -0
  34. package/dist/chunk-3FBCC4G3.js +8 -0
  35. package/dist/chunk-3FBCC4G3.js.map +1 -0
  36. package/dist/chunk-4HCRAOS5.js +28 -0
  37. package/dist/chunk-4HCRAOS5.js.map +1 -0
  38. package/dist/chunk-5W6AKZE6.mjs +131 -0
  39. package/dist/chunk-5W6AKZE6.mjs.map +1 -0
  40. package/dist/chunk-6GKHCVF6.js +98 -0
  41. package/dist/chunk-6GKHCVF6.js.map +1 -0
  42. package/dist/chunk-7QVYU63E.js +7 -0
  43. package/dist/chunk-7QVYU63E.js.map +1 -0
  44. package/dist/chunk-A3J3AAYM.mjs +97 -0
  45. package/dist/chunk-A3J3AAYM.mjs.map +1 -0
  46. package/dist/chunk-A5DDIABK.js +4209 -0
  47. package/dist/chunk-A5DDIABK.js.map +1 -0
  48. package/dist/chunk-AUXK7QSA.mjs +15 -0
  49. package/dist/chunk-AUXK7QSA.mjs.map +1 -0
  50. package/dist/chunk-AWONBQQP.js +97 -0
  51. package/dist/chunk-AWONBQQP.js.map +1 -0
  52. package/dist/chunk-BLWVZK6J.mjs +28 -0
  53. package/dist/chunk-BLWVZK6J.mjs.map +1 -0
  54. package/dist/chunk-C7C7VY4F.mjs +77 -0
  55. package/dist/chunk-C7C7VY4F.mjs.map +1 -0
  56. package/dist/chunk-CXQOWQSY.js +55 -0
  57. package/dist/chunk-CXQOWQSY.js.map +1 -0
  58. package/dist/chunk-DD3KISNB.mjs +98 -0
  59. package/dist/chunk-DD3KISNB.mjs.map +1 -0
  60. package/dist/chunk-DKKMWBP4.mjs +1 -0
  61. package/dist/chunk-DKKMWBP4.mjs.map +1 -0
  62. package/dist/chunk-DO2HLAZO.js +48 -0
  63. package/dist/chunk-DO2HLAZO.js.map +1 -0
  64. package/dist/chunk-DZXDB3K2.mjs +17 -0
  65. package/dist/chunk-DZXDB3K2.mjs.map +1 -0
  66. package/dist/chunk-ECDTZBYO.mjs +230 -0
  67. package/dist/chunk-ECDTZBYO.mjs.map +1 -0
  68. package/dist/chunk-EFJEWLRL.js +16 -0
  69. package/dist/chunk-EFJEWLRL.js.map +1 -0
  70. package/dist/chunk-FY4SXJGU.js +806 -0
  71. package/dist/chunk-FY4SXJGU.js.map +1 -0
  72. package/dist/chunk-GYWPEPOH.mjs +1354 -0
  73. package/dist/chunk-GYWPEPOH.mjs.map +1 -0
  74. package/dist/chunk-H6FMOA6B.js +1 -0
  75. package/dist/chunk-H6FMOA6B.js.map +1 -0
  76. package/dist/chunk-HR4H2FP7.mjs +89 -0
  77. package/dist/chunk-HR4H2FP7.mjs.map +1 -0
  78. package/dist/chunk-I2REI7OA.js +462 -0
  79. package/dist/chunk-I2REI7OA.js.map +1 -0
  80. package/dist/chunk-IBS6NI7D.js +77 -0
  81. package/dist/chunk-IBS6NI7D.js.map +1 -0
  82. package/dist/chunk-IWFGEPAA.mjs +4209 -0
  83. package/dist/chunk-IWFGEPAA.mjs.map +1 -0
  84. package/dist/chunk-J4Q36PMP.js +31 -0
  85. package/dist/chunk-J4Q36PMP.js.map +1 -0
  86. package/dist/chunk-JC3WJK65.js +1091 -0
  87. package/dist/chunk-JC3WJK65.js.map +1 -0
  88. package/dist/chunk-L6EQEAXU.mjs +462 -0
  89. package/dist/chunk-L6EQEAXU.mjs.map +1 -0
  90. package/dist/chunk-LXKSUWAV.js +15 -0
  91. package/dist/chunk-LXKSUWAV.js.map +1 -0
  92. package/dist/chunk-MFO27OHB.mjs +48 -0
  93. package/dist/chunk-MFO27OHB.mjs.map +1 -0
  94. package/dist/chunk-PAWJFY3S.mjs +7 -0
  95. package/dist/chunk-PAWJFY3S.mjs.map +1 -0
  96. package/dist/chunk-Q2N6SQYW.mjs +8 -0
  97. package/dist/chunk-Q2N6SQYW.mjs.map +1 -0
  98. package/dist/chunk-RAF7PNLG.js +131 -0
  99. package/dist/chunk-RAF7PNLG.js.map +1 -0
  100. package/dist/chunk-RUR22SVM.js +17 -0
  101. package/dist/chunk-RUR22SVM.js.map +1 -0
  102. package/dist/chunk-TEGF6ZWG.js +109 -0
  103. package/dist/chunk-TEGF6ZWG.js.map +1 -0
  104. package/dist/chunk-TMVHSY3Y.js +230 -0
  105. package/dist/chunk-TMVHSY3Y.js.map +1 -0
  106. package/dist/chunk-V2JJPI7N.js +1354 -0
  107. package/dist/chunk-V2JJPI7N.js.map +1 -0
  108. package/dist/chunk-WWWMJZEF.mjs +806 -0
  109. package/dist/chunk-WWWMJZEF.mjs.map +1 -0
  110. package/dist/chunk-X4BIHJ2B.mjs +55 -0
  111. package/dist/chunk-X4BIHJ2B.mjs.map +1 -0
  112. package/dist/chunk-YDVTFM7X.mjs +109 -0
  113. package/dist/chunk-YDVTFM7X.mjs.map +1 -0
  114. package/dist/chunk-YF5XQZDR.mjs +16 -0
  115. package/dist/chunk-YF5XQZDR.mjs.map +1 -0
  116. package/dist/client/index.d.mts +252 -0
  117. package/dist/client/index.d.ts +252 -0
  118. package/dist/client/index.js +275 -0
  119. package/dist/client/index.js.map +1 -0
  120. package/dist/client/index.mjs +274 -0
  121. package/dist/client/index.mjs.map +1 -0
  122. package/dist/components/index.d.mts +441 -0
  123. package/dist/components/index.d.ts +441 -0
  124. package/dist/components/index.js +2474 -0
  125. package/dist/components/index.js.map +1 -0
  126. package/dist/components/index.mjs +2474 -0
  127. package/dist/components/index.mjs.map +1 -0
  128. package/dist/config-hXufftVS.d.mts +34 -0
  129. package/dist/config-hXufftVS.d.ts +34 -0
  130. package/dist/content.interface-BhyAiOFq.d.ts +35 -0
  131. package/dist/content.interface-Dg2lt_An.d.mts +35 -0
  132. package/dist/contexts/index.d.mts +56 -0
  133. package/dist/contexts/index.d.ts +56 -0
  134. package/dist/contexts/index.js +21 -0
  135. package/dist/contexts/index.js.map +1 -0
  136. package/dist/contexts/index.mjs +21 -0
  137. package/dist/contexts/index.mjs.map +1 -0
  138. package/dist/core/index.d.mts +152 -0
  139. package/dist/core/index.d.ts +152 -0
  140. package/dist/core/index.js +47 -0
  141. package/dist/core/index.js.map +1 -0
  142. package/dist/core/index.mjs +47 -0
  143. package/dist/core/index.mjs.map +1 -0
  144. package/dist/d3.link.interface-QMdB22bC.d.mts +20 -0
  145. package/dist/d3.link.interface-QMdB22bC.d.ts +20 -0
  146. package/dist/features/index.d.mts +553 -0
  147. package/dist/features/index.d.ts +553 -0
  148. package/dist/features/index.js +94 -0
  149. package/dist/features/index.js.map +1 -0
  150. package/dist/features/index.mjs +94 -0
  151. package/dist/features/index.mjs.map +1 -0
  152. package/dist/hooks/index.d.mts +94 -0
  153. package/dist/hooks/index.d.ts +94 -0
  154. package/dist/hooks/index.js +43 -0
  155. package/dist/hooks/index.js.map +1 -0
  156. package/dist/hooks/index.mjs +43 -0
  157. package/dist/hooks/index.mjs.map +1 -0
  158. package/dist/index.d.mts +72 -0
  159. package/dist/index.d.ts +72 -0
  160. package/dist/index.js +84 -0
  161. package/dist/index.js.map +1 -0
  162. package/dist/index.mjs +84 -0
  163. package/dist/index.mjs.map +1 -0
  164. package/dist/interfaces/index.d.mts +3 -0
  165. package/dist/interfaces/index.d.ts +3 -0
  166. package/dist/interfaces/index.js +2 -0
  167. package/dist/interfaces/index.js.map +1 -0
  168. package/dist/interfaces/index.mjs +2 -0
  169. package/dist/interfaces/index.mjs.map +1 -0
  170. package/dist/permissions/index.d.mts +41 -0
  171. package/dist/permissions/index.d.ts +41 -0
  172. package/dist/permissions/index.js +14 -0
  173. package/dist/permissions/index.js.map +1 -0
  174. package/dist/permissions/index.mjs +14 -0
  175. package/dist/permissions/index.mjs.map +1 -0
  176. package/dist/request-7FE3LJLV.mjs +9 -0
  177. package/dist/request-7FE3LJLV.mjs.map +1 -0
  178. package/dist/request-FYMQK5CX.mjs +9 -0
  179. package/dist/request-FYMQK5CX.mjs.map +1 -0
  180. package/dist/request-QFS7NEIE.js +9 -0
  181. package/dist/request-QFS7NEIE.js.map +1 -0
  182. package/dist/request-ZYY6RI5X.js +9 -0
  183. package/dist/request-ZYY6RI5X.js.map +1 -0
  184. package/dist/roles/index.d.mts +33 -0
  185. package/dist/roles/index.d.ts +33 -0
  186. package/dist/roles/index.js +12 -0
  187. package/dist/roles/index.js.map +1 -0
  188. package/dist/roles/index.mjs +12 -0
  189. package/dist/roles/index.mjs.map +1 -0
  190. package/dist/server/index.d.mts +44 -0
  191. package/dist/server/index.d.ts +44 -0
  192. package/dist/server/index.js +29 -0
  193. package/dist/server/index.js.map +1 -0
  194. package/dist/server/index.mjs +29 -0
  195. package/dist/server/index.mjs.map +1 -0
  196. package/dist/shadcnui/index.d.mts +698 -0
  197. package/dist/shadcnui/index.d.ts +698 -0
  198. package/dist/shadcnui/index.js +466 -0
  199. package/dist/shadcnui/index.js.map +1 -0
  200. package/dist/shadcnui/index.mjs +465 -0
  201. package/dist/shadcnui/index.mjs.map +1 -0
  202. package/dist/token-IJSPOMW6.mjs +9 -0
  203. package/dist/token-IJSPOMW6.mjs.map +1 -0
  204. package/dist/token-MJMC26ON.js +9 -0
  205. package/dist/token-MJMC26ON.js.map +1 -0
  206. package/dist/token-UADJQ7VC.mjs +9 -0
  207. package/dist/token-UADJQ7VC.mjs.map +1 -0
  208. package/dist/token-UYE7CV6X.js +9 -0
  209. package/dist/token-UYE7CV6X.js.map +1 -0
  210. package/dist/types-DluCaP1I.d.ts +95 -0
  211. package/dist/types-lQVA8d_P.d.mts +95 -0
  212. package/dist/useDataListRetriever-futhx3OP.d.mts +32 -0
  213. package/dist/useDataListRetriever-futhx3OP.d.ts +32 -0
  214. package/dist/user.interface-CAsTIbuQ.d.mts +85 -0
  215. package/dist/user.interface-CbWqMaaU.d.ts +85 -0
  216. package/dist/utils/index.d.mts +201 -0
  217. package/dist/utils/index.d.ts +201 -0
  218. package/dist/utils/index.js +32 -0
  219. package/dist/utils/index.js.map +1 -0
  220. package/dist/utils/index.mjs +32 -0
  221. package/dist/utils/index.mjs.map +1 -0
  222. package/package.json +205 -0
@@ -0,0 +1,94 @@
1
+ import {
2
+ Auth,
3
+ AuthModule,
4
+ AuthService,
5
+ AuthorModule,
6
+ Company,
7
+ CompanyFields,
8
+ CompanyModule,
9
+ CompanyService,
10
+ Content,
11
+ ContentFields,
12
+ ContentModule,
13
+ ContentService,
14
+ Feature,
15
+ FeatureModule,
16
+ FeatureService,
17
+ Module,
18
+ ModuleModule,
19
+ Notification,
20
+ NotificationFields,
21
+ NotificationModule,
22
+ NotificationService,
23
+ Push,
24
+ PushModule,
25
+ PushService,
26
+ Role,
27
+ RoleFields,
28
+ RoleModule,
29
+ RoleService,
30
+ S3,
31
+ S3Module,
32
+ S3Service,
33
+ User,
34
+ UserFields,
35
+ UserService,
36
+ configureAuth
37
+ } from "../chunk-GYWPEPOH.mjs";
38
+ import "../chunk-DKKMWBP4.mjs";
39
+ import "../chunk-ECDTZBYO.mjs";
40
+ import {
41
+ ContributorsList,
42
+ UserAvatar
43
+ } from "../chunk-A3J3AAYM.mjs";
44
+ import "../chunk-IWFGEPAA.mjs";
45
+ import "../chunk-2LM6LCJW.mjs";
46
+ import "../chunk-WWWMJZEF.mjs";
47
+ import "../chunk-X4BIHJ2B.mjs";
48
+ import "../chunk-DD3KISNB.mjs";
49
+ import "../chunk-BLWVZK6J.mjs";
50
+ import "../chunk-L6EQEAXU.mjs";
51
+ import "../chunk-YDVTFM7X.mjs";
52
+ import "../chunk-366S2JCC.mjs";
53
+ import "../chunk-MFO27OHB.mjs";
54
+ import "../chunk-PAWJFY3S.mjs";
55
+ export {
56
+ Auth,
57
+ AuthModule,
58
+ AuthService,
59
+ AuthorModule,
60
+ Company,
61
+ CompanyFields,
62
+ CompanyModule,
63
+ CompanyService,
64
+ Content,
65
+ ContentFields,
66
+ ContentModule,
67
+ ContentService,
68
+ ContributorsList,
69
+ Feature,
70
+ FeatureModule,
71
+ FeatureService,
72
+ Module,
73
+ ModuleModule,
74
+ Notification,
75
+ NotificationFields,
76
+ NotificationModule,
77
+ NotificationService,
78
+ Push,
79
+ PushModule,
80
+ PushService,
81
+ Role,
82
+ RoleFields,
83
+ RoleModule,
84
+ RoleService,
85
+ S3,
86
+ S3Module,
87
+ S3Service,
88
+ User,
89
+ UserAvatar,
90
+ UserFields,
91
+ UserService,
92
+ configureAuth
93
+ };
94
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,94 @@
1
+ import { ColumnDef } from '@tanstack/react-table';
2
+ import { a as PageUrl, f as ModuleWithPermissions } from '../types-lQVA8d_P.mjs';
3
+ import { D as DataListRetriever } from '../useDataListRetriever-futhx3OP.mjs';
4
+ export { u as useDataListRetriever } from '../useDataListRetriever-futhx3OP.mjs';
5
+ export { I as I18nConfig, e as I18nRouter, L as LinkComponent, U as UseDateFnsLocaleHook, f as UseLocaleHook, h as UseRouterHook, i as UseTranslationsHook, c as configureI18n, g as getI18nLink, u as useI18nDateFnsLocale, a as useI18nLocale, b as useI18nRouter, d as useI18nTranslations } from '../config-hXufftVS.mjs';
6
+ import * as React from 'react';
7
+ import { a as D3Node, D as D3Link } from '../d3.link.interface-QMdB22bC.mjs';
8
+ import '../ApiRequestDataTypeInterface-CUKFDBx2.mjs';
9
+ import 'lucide-react';
10
+
11
+ type TableContent<T> = {
12
+ jsonApiData: T;
13
+ [key: string]: any;
14
+ };
15
+ interface TableStructureGeneratorInterface<T, U> {
16
+ generateTableStructure: (params: {
17
+ t: (key: string) => string;
18
+ generateUrl: (params: {
19
+ page: string | PageUrl | string;
20
+ id?: string;
21
+ }) => string;
22
+ data: T[];
23
+ fields: Array<U>;
24
+ checkedIds?: string[];
25
+ toggleId?: (id: string) => void;
26
+ }) => {
27
+ data: TableContent<T>[];
28
+ columns: ColumnDef<TableContent<T>>[];
29
+ };
30
+ }
31
+ type UseTableStructureHookParams<T, U> = {
32
+ data: T[];
33
+ fields: Array<U>;
34
+ checkedIds?: string[];
35
+ toggleId?: (id: string) => void;
36
+ dataRetriever?: DataListRetriever<T>;
37
+ context?: Record<string, any>;
38
+ };
39
+ type UseTableStructureHookReturn<T> = {
40
+ data: TableContent<T>[];
41
+ columns: ColumnDef<TableContent<T>>[];
42
+ };
43
+ type UseTableStructureHook<T, U> = (params: UseTableStructureHookParams<T, U>) => UseTableStructureHookReturn<T>;
44
+
45
+ declare class TableGeneratorRegistry {
46
+ private static instance;
47
+ private registry;
48
+ private constructor();
49
+ static getInstance(): TableGeneratorRegistry;
50
+ register<T, U>(type: string, hook: UseTableStructureHook<T, U>): void;
51
+ get<T, U>(type: string, params: UseTableStructureHookParams<T, U>): UseTableStructureHookReturn<T>;
52
+ isRegistered(type: string): boolean;
53
+ getRegisteredTypes(): string[];
54
+ unregister(type: string): boolean;
55
+ clear(): void;
56
+ }
57
+ declare const tableGeneratorRegistry: TableGeneratorRegistry;
58
+
59
+ declare function useUrlRewriter(): (params: {
60
+ page: ModuleWithPermissions | string;
61
+ id?: string;
62
+ childPage?: string;
63
+ }) => void;
64
+
65
+ declare function useDebounce<T extends (...args: any[]) => any>(callback: T, delay: number): T & {
66
+ cancel: () => void;
67
+ };
68
+
69
+ declare function usePageUrlGenerator(): (params: {
70
+ page?: PageUrl | string;
71
+ id?: string;
72
+ childPage?: PageUrl | string;
73
+ childId?: string;
74
+ additionalParameters?: {
75
+ [key: string]: string | string[] | undefined;
76
+ };
77
+ language?: string;
78
+ }) => string;
79
+
80
+ declare function registerTableGenerator<T, U>(type: ModuleWithPermissions, hook: UseTableStructureHook<T, U>): void;
81
+ declare function useTableGenerator<T, U>(type: ModuleWithPermissions, params: UseTableStructureHookParams<T, U>): UseTableStructureHookReturn<T>;
82
+
83
+ /**
84
+ * Custom hook for D3 graph visualization with larger circles and more interactive features
85
+ */
86
+ declare function useCustomD3Graph(nodes: D3Node[], links: D3Link[], onNodeClick: (nodeId: string) => void, visibleNodeIds?: Set<string>, loadingNodeIds?: Set<string>, containerKey?: string | number): {
87
+ svgRef: React.RefObject<SVGSVGElement | null>;
88
+ zoomIn: () => void;
89
+ zoomOut: () => void;
90
+ zoomToNode: (nodeId: string, childIds?: string[]) => void;
91
+ zoomToFitAll: () => void;
92
+ };
93
+
94
+ export { DataListRetriever, type TableContent, TableGeneratorRegistry, type TableStructureGeneratorInterface, type UseTableStructureHook, type UseTableStructureHookParams, type UseTableStructureHookReturn, registerTableGenerator, tableGeneratorRegistry, useCustomD3Graph, useDebounce, usePageUrlGenerator, useTableGenerator, useUrlRewriter };
@@ -0,0 +1,94 @@
1
+ import { ColumnDef } from '@tanstack/react-table';
2
+ import { a as PageUrl, f as ModuleWithPermissions } from '../types-DluCaP1I.js';
3
+ import { D as DataListRetriever } from '../useDataListRetriever-futhx3OP.js';
4
+ export { u as useDataListRetriever } from '../useDataListRetriever-futhx3OP.js';
5
+ export { I as I18nConfig, e as I18nRouter, L as LinkComponent, U as UseDateFnsLocaleHook, f as UseLocaleHook, h as UseRouterHook, i as UseTranslationsHook, c as configureI18n, g as getI18nLink, u as useI18nDateFnsLocale, a as useI18nLocale, b as useI18nRouter, d as useI18nTranslations } from '../config-hXufftVS.js';
6
+ import * as React from 'react';
7
+ import { a as D3Node, D as D3Link } from '../d3.link.interface-QMdB22bC.js';
8
+ import '../ApiRequestDataTypeInterface-CUKFDBx2.js';
9
+ import 'lucide-react';
10
+
11
+ type TableContent<T> = {
12
+ jsonApiData: T;
13
+ [key: string]: any;
14
+ };
15
+ interface TableStructureGeneratorInterface<T, U> {
16
+ generateTableStructure: (params: {
17
+ t: (key: string) => string;
18
+ generateUrl: (params: {
19
+ page: string | PageUrl | string;
20
+ id?: string;
21
+ }) => string;
22
+ data: T[];
23
+ fields: Array<U>;
24
+ checkedIds?: string[];
25
+ toggleId?: (id: string) => void;
26
+ }) => {
27
+ data: TableContent<T>[];
28
+ columns: ColumnDef<TableContent<T>>[];
29
+ };
30
+ }
31
+ type UseTableStructureHookParams<T, U> = {
32
+ data: T[];
33
+ fields: Array<U>;
34
+ checkedIds?: string[];
35
+ toggleId?: (id: string) => void;
36
+ dataRetriever?: DataListRetriever<T>;
37
+ context?: Record<string, any>;
38
+ };
39
+ type UseTableStructureHookReturn<T> = {
40
+ data: TableContent<T>[];
41
+ columns: ColumnDef<TableContent<T>>[];
42
+ };
43
+ type UseTableStructureHook<T, U> = (params: UseTableStructureHookParams<T, U>) => UseTableStructureHookReturn<T>;
44
+
45
+ declare class TableGeneratorRegistry {
46
+ private static instance;
47
+ private registry;
48
+ private constructor();
49
+ static getInstance(): TableGeneratorRegistry;
50
+ register<T, U>(type: string, hook: UseTableStructureHook<T, U>): void;
51
+ get<T, U>(type: string, params: UseTableStructureHookParams<T, U>): UseTableStructureHookReturn<T>;
52
+ isRegistered(type: string): boolean;
53
+ getRegisteredTypes(): string[];
54
+ unregister(type: string): boolean;
55
+ clear(): void;
56
+ }
57
+ declare const tableGeneratorRegistry: TableGeneratorRegistry;
58
+
59
+ declare function useUrlRewriter(): (params: {
60
+ page: ModuleWithPermissions | string;
61
+ id?: string;
62
+ childPage?: string;
63
+ }) => void;
64
+
65
+ declare function useDebounce<T extends (...args: any[]) => any>(callback: T, delay: number): T & {
66
+ cancel: () => void;
67
+ };
68
+
69
+ declare function usePageUrlGenerator(): (params: {
70
+ page?: PageUrl | string;
71
+ id?: string;
72
+ childPage?: PageUrl | string;
73
+ childId?: string;
74
+ additionalParameters?: {
75
+ [key: string]: string | string[] | undefined;
76
+ };
77
+ language?: string;
78
+ }) => string;
79
+
80
+ declare function registerTableGenerator<T, U>(type: ModuleWithPermissions, hook: UseTableStructureHook<T, U>): void;
81
+ declare function useTableGenerator<T, U>(type: ModuleWithPermissions, params: UseTableStructureHookParams<T, U>): UseTableStructureHookReturn<T>;
82
+
83
+ /**
84
+ * Custom hook for D3 graph visualization with larger circles and more interactive features
85
+ */
86
+ declare function useCustomD3Graph(nodes: D3Node[], links: D3Link[], onNodeClick: (nodeId: string) => void, visibleNodeIds?: Set<string>, loadingNodeIds?: Set<string>, containerKey?: string | number): {
87
+ svgRef: React.RefObject<SVGSVGElement | null>;
88
+ zoomIn: () => void;
89
+ zoomOut: () => void;
90
+ zoomToNode: (nodeId: string, childIds?: string[]) => void;
91
+ zoomToFitAll: () => void;
92
+ };
93
+
94
+ export { DataListRetriever, type TableContent, TableGeneratorRegistry, type TableStructureGeneratorInterface, type UseTableStructureHook, type UseTableStructureHookParams, type UseTableStructureHookReturn, registerTableGenerator, tableGeneratorRegistry, useCustomD3Graph, useDebounce, usePageUrlGenerator, useTableGenerator, useUrlRewriter };
@@ -0,0 +1,43 @@
1
+ "use client";
2
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
3
+
4
+
5
+
6
+
7
+
8
+
9
+
10
+
11
+
12
+ var _chunkFY4SXJGUjs = require('../chunk-FY4SXJGU.js');
13
+
14
+
15
+
16
+
17
+
18
+
19
+
20
+ var _chunkCXQOWQSYjs = require('../chunk-CXQOWQSY.js');
21
+ require('../chunk-I2REI7OA.js');
22
+ require('../chunk-TEGF6ZWG.js');
23
+ require('../chunk-J4Q36PMP.js');
24
+ require('../chunk-DO2HLAZO.js');
25
+ require('../chunk-7QVYU63E.js');
26
+
27
+
28
+
29
+
30
+
31
+
32
+
33
+
34
+
35
+
36
+
37
+
38
+
39
+
40
+
41
+
42
+ exports.TableGeneratorRegistry = _chunkFY4SXJGUjs.TableGeneratorRegistry; exports.configureI18n = _chunkCXQOWQSYjs.configureI18n; exports.getI18nLink = _chunkCXQOWQSYjs.getI18nLink; exports.registerTableGenerator = _chunkFY4SXJGUjs.registerTableGenerator; exports.tableGeneratorRegistry = _chunkFY4SXJGUjs.tableGeneratorRegistry; exports.useCustomD3Graph = _chunkFY4SXJGUjs.useCustomD3Graph; exports.useDataListRetriever = _chunkFY4SXJGUjs.useDataListRetriever; exports.useDebounce = _chunkFY4SXJGUjs.useDebounce; exports.useI18nDateFnsLocale = _chunkCXQOWQSYjs.useI18nDateFnsLocale; exports.useI18nLocale = _chunkCXQOWQSYjs.useI18nLocale; exports.useI18nRouter = _chunkCXQOWQSYjs.useI18nRouter; exports.useI18nTranslations = _chunkCXQOWQSYjs.useI18nTranslations; exports.usePageUrlGenerator = _chunkFY4SXJGUjs.usePageUrlGenerator; exports.useTableGenerator = _chunkFY4SXJGUjs.useTableGenerator; exports.useUrlRewriter = _chunkFY4SXJGUjs.useUrlRewriter;
43
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["/Users/carlo/Development/phlow2/packages/nextjs-jsonapi/dist/hooks/index.js"],"names":[],"mappings":"AAAA;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,uDAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACA;AACF,uDAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,y7BAAC","file":"/Users/carlo/Development/phlow2/packages/nextjs-jsonapi/dist/hooks/index.js"}
@@ -0,0 +1,43 @@
1
+ "use client";
2
+ import {
3
+ TableGeneratorRegistry,
4
+ registerTableGenerator,
5
+ tableGeneratorRegistry,
6
+ useCustomD3Graph,
7
+ useDataListRetriever,
8
+ useDebounce,
9
+ usePageUrlGenerator,
10
+ useTableGenerator,
11
+ useUrlRewriter
12
+ } from "../chunk-WWWMJZEF.mjs";
13
+ import {
14
+ configureI18n,
15
+ getI18nLink,
16
+ useI18nDateFnsLocale,
17
+ useI18nLocale,
18
+ useI18nRouter,
19
+ useI18nTranslations
20
+ } from "../chunk-X4BIHJ2B.mjs";
21
+ import "../chunk-L6EQEAXU.mjs";
22
+ import "../chunk-YDVTFM7X.mjs";
23
+ import "../chunk-366S2JCC.mjs";
24
+ import "../chunk-MFO27OHB.mjs";
25
+ import "../chunk-PAWJFY3S.mjs";
26
+ export {
27
+ TableGeneratorRegistry,
28
+ configureI18n,
29
+ getI18nLink,
30
+ registerTableGenerator,
31
+ tableGeneratorRegistry,
32
+ useCustomD3Graph,
33
+ useDataListRetriever,
34
+ useDebounce,
35
+ useI18nDateFnsLocale,
36
+ useI18nLocale,
37
+ useI18nRouter,
38
+ useI18nTranslations,
39
+ usePageUrlGenerator,
40
+ useTableGenerator,
41
+ useUrlRewriter
42
+ };
43
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,72 @@
1
+ import { A as ApiRequestDataTypeInterface } from './ApiRequestDataTypeInterface-CUKFDBx2.mjs';
2
+ export { F as FieldSelector, G as GetterKeys, c as createJsonApiInclusion } from './ApiRequestDataTypeInterface-CUKFDBx2.mjs';
3
+ import { A as ApiResponseInterface } from './ApiResponseInterface-BHN5D9r5.mjs';
4
+ export { A as ApiData } from './ApiData-DPKNfY-9.mjs';
5
+ export { A as ApiDataInterface, J as JsonApiHydratedDataInterface } from './ApiDataInterface-DPP8s46n.mjs';
6
+ export { A as AbstractApiData, a as AbstractService, H as HttpMethod, N as NextRef, P as PreviousRef, S as SelfRef, g as getGlobalErrorHandler, s as setGlobalErrorHandler } from './AbstractService-BKlpJA61.mjs';
7
+ export { AppModuleDefinitions, DataClass, DataClass as DataClassRegistry, EndpointCreator, EndpointQuery, FoundationModuleDefinitions, JsonApiDataFactory, ModuleDefinitions, ModuleRegistrar, ModuleRegistry, Modules, RehydrationFactory, rehydrate, rehydrateList, translateData, translateResponse } from './core/index.mjs';
8
+ export { A as Action, b as ModuleDefinition, g as ModuleFactory, M as ModulePermissionDefinition, f as ModuleWithPermissions, a as PageUrl, P as PermissionCheck, c as PermissionConfig, d as PermissionModule, e as PermissionUser } from './types-lQVA8d_P.mjs';
9
+ export { checkPermissions, checkPermissionsFromServer, getValueFromPath } from './permissions/index.mjs';
10
+ export { I as I18nConfig, c as configureI18n } from './config-hXufftVS.mjs';
11
+ export { RoleIdConfig, configureRoles, getRoleId, isRolesConfigured } from './roles/index.mjs';
12
+ import 'react';
13
+
14
+ /**
15
+ * Configure the JSON:API client for non-React contexts (e.g., server components).
16
+ * For React contexts, use JsonApiProvider instead.
17
+ */
18
+ declare function configureJsonApi(config: {
19
+ apiUrl: string;
20
+ bootstrapper?: () => void;
21
+ additionalHeaders?: Record<string, string>;
22
+ }): void;
23
+ declare function JsonApiGet(params: {
24
+ classKey: ApiRequestDataTypeInterface;
25
+ endpoint: string;
26
+ companyId?: string;
27
+ language: string;
28
+ }): Promise<ApiResponseInterface>;
29
+ declare function JsonApiPost(params: {
30
+ classKey: ApiRequestDataTypeInterface;
31
+ endpoint: string;
32
+ companyId?: string;
33
+ body?: any;
34
+ overridesJsonApiCreation?: boolean;
35
+ files?: {
36
+ [key: string]: File | Blob;
37
+ } | File | Blob;
38
+ language: string;
39
+ responseType?: ApiRequestDataTypeInterface;
40
+ }): Promise<ApiResponseInterface>;
41
+ declare function JsonApiPut(params: {
42
+ classKey: ApiRequestDataTypeInterface;
43
+ endpoint: string;
44
+ companyId?: string;
45
+ body?: any;
46
+ files?: {
47
+ [key: string]: File | Blob;
48
+ } | File | Blob;
49
+ language: string;
50
+ responseType?: ApiRequestDataTypeInterface;
51
+ }): Promise<ApiResponseInterface>;
52
+ declare function JsonApiPatch(params: {
53
+ classKey: ApiRequestDataTypeInterface;
54
+ endpoint: string;
55
+ companyId?: string;
56
+ body?: any;
57
+ files?: {
58
+ [key: string]: File | Blob;
59
+ } | File | Blob;
60
+ overridesJsonApiCreation?: boolean;
61
+ responseType?: ApiRequestDataTypeInterface;
62
+ language: string;
63
+ }): Promise<ApiResponseInterface>;
64
+ declare function JsonApiDelete(params: {
65
+ classKey: ApiRequestDataTypeInterface;
66
+ endpoint: string;
67
+ companyId?: string;
68
+ language: string;
69
+ responseType?: ApiRequestDataTypeInterface;
70
+ }): Promise<ApiResponseInterface>;
71
+
72
+ export { ApiRequestDataTypeInterface, ApiResponseInterface, JsonApiDelete, JsonApiGet, JsonApiPatch, JsonApiPost, JsonApiPut, configureJsonApi };
@@ -0,0 +1,72 @@
1
+ import { A as ApiRequestDataTypeInterface } from './ApiRequestDataTypeInterface-CUKFDBx2.js';
2
+ export { F as FieldSelector, G as GetterKeys, c as createJsonApiInclusion } from './ApiRequestDataTypeInterface-CUKFDBx2.js';
3
+ import { A as ApiResponseInterface } from './ApiResponseInterface-DDI7QQPR.js';
4
+ export { A as ApiData } from './ApiData-DPKNfY-9.js';
5
+ export { A as ApiDataInterface, J as JsonApiHydratedDataInterface } from './ApiDataInterface-DPP8s46n.js';
6
+ export { A as AbstractApiData, a as AbstractService, H as HttpMethod, N as NextRef, P as PreviousRef, S as SelfRef, g as getGlobalErrorHandler, s as setGlobalErrorHandler } from './AbstractService-D9eSVKNa.js';
7
+ export { AppModuleDefinitions, DataClass, DataClass as DataClassRegistry, EndpointCreator, EndpointQuery, FoundationModuleDefinitions, JsonApiDataFactory, ModuleDefinitions, ModuleRegistrar, ModuleRegistry, Modules, RehydrationFactory, rehydrate, rehydrateList, translateData, translateResponse } from './core/index.js';
8
+ export { A as Action, b as ModuleDefinition, g as ModuleFactory, M as ModulePermissionDefinition, f as ModuleWithPermissions, a as PageUrl, P as PermissionCheck, c as PermissionConfig, d as PermissionModule, e as PermissionUser } from './types-DluCaP1I.js';
9
+ export { checkPermissions, checkPermissionsFromServer, getValueFromPath } from './permissions/index.js';
10
+ export { I as I18nConfig, c as configureI18n } from './config-hXufftVS.js';
11
+ export { RoleIdConfig, configureRoles, getRoleId, isRolesConfigured } from './roles/index.js';
12
+ import 'react';
13
+
14
+ /**
15
+ * Configure the JSON:API client for non-React contexts (e.g., server components).
16
+ * For React contexts, use JsonApiProvider instead.
17
+ */
18
+ declare function configureJsonApi(config: {
19
+ apiUrl: string;
20
+ bootstrapper?: () => void;
21
+ additionalHeaders?: Record<string, string>;
22
+ }): void;
23
+ declare function JsonApiGet(params: {
24
+ classKey: ApiRequestDataTypeInterface;
25
+ endpoint: string;
26
+ companyId?: string;
27
+ language: string;
28
+ }): Promise<ApiResponseInterface>;
29
+ declare function JsonApiPost(params: {
30
+ classKey: ApiRequestDataTypeInterface;
31
+ endpoint: string;
32
+ companyId?: string;
33
+ body?: any;
34
+ overridesJsonApiCreation?: boolean;
35
+ files?: {
36
+ [key: string]: File | Blob;
37
+ } | File | Blob;
38
+ language: string;
39
+ responseType?: ApiRequestDataTypeInterface;
40
+ }): Promise<ApiResponseInterface>;
41
+ declare function JsonApiPut(params: {
42
+ classKey: ApiRequestDataTypeInterface;
43
+ endpoint: string;
44
+ companyId?: string;
45
+ body?: any;
46
+ files?: {
47
+ [key: string]: File | Blob;
48
+ } | File | Blob;
49
+ language: string;
50
+ responseType?: ApiRequestDataTypeInterface;
51
+ }): Promise<ApiResponseInterface>;
52
+ declare function JsonApiPatch(params: {
53
+ classKey: ApiRequestDataTypeInterface;
54
+ endpoint: string;
55
+ companyId?: string;
56
+ body?: any;
57
+ files?: {
58
+ [key: string]: File | Blob;
59
+ } | File | Blob;
60
+ overridesJsonApiCreation?: boolean;
61
+ responseType?: ApiRequestDataTypeInterface;
62
+ language: string;
63
+ }): Promise<ApiResponseInterface>;
64
+ declare function JsonApiDelete(params: {
65
+ classKey: ApiRequestDataTypeInterface;
66
+ endpoint: string;
67
+ companyId?: string;
68
+ language: string;
69
+ responseType?: ApiRequestDataTypeInterface;
70
+ }): Promise<ApiResponseInterface>;
71
+
72
+ export { ApiRequestDataTypeInterface, ApiResponseInterface, JsonApiDelete, JsonApiGet, JsonApiPatch, JsonApiPost, JsonApiPut, configureJsonApi };
package/dist/index.js ADDED
@@ -0,0 +1,84 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('./chunk-H6FMOA6B.js');
2
+
3
+
4
+
5
+
6
+
7
+
8
+
9
+ var _chunkTMVHSY3Yjs = require('./chunk-TMVHSY3Y.js');
10
+
11
+
12
+ var _chunkCXQOWQSYjs = require('./chunk-CXQOWQSY.js');
13
+
14
+
15
+
16
+
17
+
18
+ var _chunk6GKHCVF6js = require('./chunk-6GKHCVF6.js');
19
+
20
+
21
+
22
+
23
+ var _chunk4HCRAOS5js = require('./chunk-4HCRAOS5.js');
24
+
25
+
26
+
27
+
28
+
29
+
30
+
31
+
32
+
33
+
34
+
35
+
36
+
37
+ var _chunkI2REI7OAjs = require('./chunk-I2REI7OA.js');
38
+
39
+
40
+
41
+
42
+ var _chunkTEGF6ZWGjs = require('./chunk-TEGF6ZWG.js');
43
+
44
+
45
+ var _chunkJ4Q36PMPjs = require('./chunk-J4Q36PMP.js');
46
+
47
+
48
+ var _chunkDO2HLAZOjs = require('./chunk-DO2HLAZO.js');
49
+ require('./chunk-7QVYU63E.js');
50
+
51
+
52
+
53
+
54
+
55
+
56
+
57
+
58
+
59
+
60
+
61
+
62
+
63
+
64
+
65
+
66
+
67
+
68
+
69
+
70
+
71
+
72
+
73
+
74
+
75
+
76
+
77
+
78
+
79
+
80
+
81
+
82
+
83
+ exports.AbstractApiData = _chunkI2REI7OAjs.AbstractApiData; exports.AbstractService = _chunkI2REI7OAjs.AbstractService; exports.Action = _chunk6GKHCVF6js.Action; exports.DataClass = _chunkDO2HLAZOjs.DataClassRegistry; exports.DataClassRegistry = _chunkDO2HLAZOjs.DataClassRegistry; exports.EndpointCreator = _chunkI2REI7OAjs.EndpointCreator; exports.HttpMethod = _chunkI2REI7OAjs.HttpMethod; exports.JsonApiDataFactory = _chunkTEGF6ZWGjs.JsonApiDataFactory; exports.JsonApiDelete = _chunkTMVHSY3Yjs.JsonApiDelete; exports.JsonApiGet = _chunkTMVHSY3Yjs.JsonApiGet; exports.JsonApiPatch = _chunkTMVHSY3Yjs.JsonApiPatch; exports.JsonApiPost = _chunkTMVHSY3Yjs.JsonApiPost; exports.JsonApiPut = _chunkTMVHSY3Yjs.JsonApiPut; exports.ModuleRegistrar = _chunkI2REI7OAjs.ModuleRegistrar; exports.ModuleRegistry = _chunkI2REI7OAjs.ModuleRegistry; exports.Modules = _chunkI2REI7OAjs.Modules; exports.RehydrationFactory = _chunkJ4Q36PMPjs.RehydrationFactory; exports.checkPermissions = _chunk6GKHCVF6js.checkPermissions; exports.checkPermissionsFromServer = _chunk6GKHCVF6js.checkPermissionsFromServer; exports.configureI18n = _chunkCXQOWQSYjs.configureI18n; exports.configureJsonApi = _chunkTMVHSY3Yjs.configureJsonApi; exports.configureRoles = _chunk4HCRAOS5js.configureRoles; exports.createJsonApiInclusion = _chunkI2REI7OAjs.createJsonApiInclusion; exports.getGlobalErrorHandler = _chunkI2REI7OAjs.getGlobalErrorHandler; exports.getRoleId = _chunk4HCRAOS5js.getRoleId; exports.getValueFromPath = _chunk6GKHCVF6js.getValueFromPath; exports.isRolesConfigured = _chunk4HCRAOS5js.isRolesConfigured; exports.rehydrate = _chunkI2REI7OAjs.rehydrate; exports.rehydrateList = _chunkI2REI7OAjs.rehydrateList; exports.setGlobalErrorHandler = _chunkI2REI7OAjs.setGlobalErrorHandler; exports.translateData = _chunkTEGF6ZWGjs.translateData; exports.translateResponse = _chunkTEGF6ZWGjs.translateResponse;
84
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["/Users/carlo/Development/phlow2/packages/nextjs-jsonapi/dist/index.js"],"names":[],"mappings":"AAAA,wGAA4B;AAC5B;AACE;AACA;AACA;AACA;AACA;AACA;AACF,sDAA4B;AAC5B;AACE;AACF,sDAA4B;AAC5B;AACE;AACA;AACA;AACA;AACF,sDAA4B;AAC5B;AACE;AACA;AACA;AACF,sDAA4B;AAC5B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,sDAA4B;AAC5B;AACE;AACA;AACA;AACF,sDAA4B;AAC5B;AACE;AACF,sDAA4B;AAC5B;AACE;AACF,sDAA4B;AAC5B,+BAA4B;AAC5B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,21DAAC","file":"/Users/carlo/Development/phlow2/packages/nextjs-jsonapi/dist/index.js"}