@carlonicora/nextjs-jsonapi 1.4.0 → 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.
- package/README.md +208 -127
- package/dist/{ApiResponseInterface-DDI7QQPR.d.ts → ApiResponseInterface-CfcC7pPC.d.mts} +11 -2
- package/dist/{ApiResponseInterface-BHN5D9r5.d.mts → ApiResponseInterface-DTBJaV5R.d.ts} +11 -2
- package/dist/{BlockNoteEditor-QV6ESIQA.js → BlockNoteEditor-7FM7B737.js} +19 -24
- package/dist/BlockNoteEditor-7FM7B737.js.map +1 -0
- package/dist/{BlockNoteEditor-U2IHUVUF.mjs → BlockNoteEditor-RVL76ZAS.mjs} +11 -16
- package/dist/BlockNoteEditor-RVL76ZAS.mjs.map +1 -0
- package/dist/JsonApiRequest-KOKGVPBI.js +25 -0
- package/dist/{JsonApiRequest-UJ7FGIVI.js.map → JsonApiRequest-KOKGVPBI.js.map} +1 -1
- package/dist/{JsonApiRequest-6UR7DIAR.mjs → JsonApiRequest-VCCRO732.mjs} +2 -2
- package/dist/chunk-2Z56AS2S.js +2723 -0
- package/dist/chunk-2Z56AS2S.js.map +1 -0
- package/dist/{chunk-HTLEKZND.mjs → chunk-37NJZ2VD.mjs} +281 -1019
- package/dist/chunk-37NJZ2VD.mjs.map +1 -0
- package/dist/{chunk-2K3Q24UF.js → chunk-3ZPK4QOB.js} +24 -14
- package/dist/chunk-3ZPK4QOB.js.map +1 -0
- package/dist/chunk-AGWQ75PQ.js +142 -0
- package/dist/chunk-AGWQ75PQ.js.map +1 -0
- package/dist/{chunk-32HM6MDD.js → chunk-CSM6AIAP.js} +1 -1
- package/dist/{chunk-32HM6MDD.js.map → chunk-CSM6AIAP.js.map} +1 -1
- package/dist/{chunk-IKBA4AHN.mjs → chunk-F4Y3GZG4.mjs} +3 -3
- package/dist/{chunk-YF5XQZDR.mjs → chunk-F5UNXZ3J.mjs} +1 -1
- package/dist/chunk-F5UNXZ3J.mjs.map +1 -0
- package/dist/chunk-IGOWVLJH.mjs +142 -0
- package/dist/chunk-IGOWVLJH.mjs.map +1 -0
- package/dist/{chunk-HAG77QBV.mjs → chunk-K4W5QXL5.mjs} +1 -1
- package/dist/chunk-KFL5ZFM4.mjs +2723 -0
- package/dist/chunk-KFL5ZFM4.mjs.map +1 -0
- package/dist/{chunk-HR4H2FP7.mjs → chunk-KJ4ETLJB.mjs} +24 -14
- package/dist/chunk-KJ4ETLJB.mjs.map +1 -0
- package/dist/chunk-LOSPCUCF.js +637 -0
- package/dist/chunk-LOSPCUCF.js.map +1 -0
- package/dist/{chunk-E2HRC2OG.js → chunk-SVX7E6RR.js} +10360 -6256
- package/dist/chunk-SVX7E6RR.js.map +1 -0
- package/dist/{chunk-EFJEWLRL.js → chunk-YUO55Q5A.js} +1 -1
- package/dist/chunk-YUO55Q5A.js.map +1 -0
- package/dist/chunk-ZQTFZKLJ.mjs +12089 -0
- package/dist/chunk-ZQTFZKLJ.mjs.map +1 -0
- package/dist/{chunk-PMXG5WBC.js → chunk-ZUEEIQHW.js} +3 -3
- package/dist/{chunk-PMXG5WBC.js.map → chunk-ZUEEIQHW.js.map} +1 -1
- package/dist/client/index.d.mts +161 -11
- package/dist/client/index.d.ts +161 -11
- package/dist/client/index.js +74 -12
- package/dist/client/index.js.map +1 -1
- package/dist/client/index.mjs +73 -11
- package/dist/components/index.d.mts +762 -73
- package/dist/components/index.d.ts +762 -73
- package/dist/components/index.js +465 -12
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +466 -13
- package/dist/config-B43zxEvn.d.mts +69 -0
- package/dist/config-D2OUrI_G.d.ts +69 -0
- package/dist/content.fields-Ck5lkQ5d.d.mts +47 -0
- package/dist/content.fields-Ck5lkQ5d.d.ts +47 -0
- package/dist/{content.interface-C_PGZMuy.d.ts → content.interface-Bs8a7uW6.d.mts} +2 -3
- package/dist/{content.interface-D_WS6CrB.d.mts → content.interface-UtsJ-mzs.d.ts} +2 -3
- package/dist/contexts/index.d.mts +13 -6
- package/dist/contexts/index.d.ts +13 -6
- package/dist/contexts/index.js +10 -12
- package/dist/contexts/index.js.map +1 -1
- package/dist/contexts/index.mjs +9 -11
- package/dist/core/index.d.mts +539 -8
- package/dist/core/index.d.ts +539 -8
- package/dist/core/index.js +104 -2
- package/dist/core/index.js.map +1 -1
- package/dist/core/index.mjs +105 -3
- package/dist/index.d.mts +131 -70
- package/dist/index.d.ts +131 -70
- package/dist/index.js +97 -7
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +118 -28
- package/dist/notification.interface-BdcwkuQE.d.mts +228 -0
- package/dist/notification.interface-BdcwkuQE.d.ts +228 -0
- package/dist/request-GBLBPYFM.js +8 -0
- package/dist/request-GBLBPYFM.js.map +1 -0
- package/dist/request-XABCMU25.mjs +8 -0
- package/dist/{AbstractService-wLid8dB0.d.ts → s3.interface-D7ttGatc.d.ts} +36 -26
- package/dist/{AbstractService-BsY6W3Ej.d.mts → s3.interface-DlaMDRTn.d.mts} +36 -26
- package/dist/scripts/generate-web-module/generator.d.ts.map +1 -1
- package/dist/scripts/generate-web-module/generator.js +8 -5
- package/dist/scripts/generate-web-module/generator.js.map +1 -1
- package/dist/scripts/generate-web-module/index.js +1 -1
- package/dist/scripts/generate-web-module/index.js.map +1 -1
- package/dist/scripts/generate-web-module/templates/components/editor.template.js +8 -1
- package/dist/scripts/generate-web-module/templates/components/editor.template.js.map +1 -1
- package/dist/scripts/generate-web-module/transformers/parent-detector.d.ts +4 -3
- package/dist/scripts/generate-web-module/transformers/parent-detector.d.ts.map +1 -1
- package/dist/scripts/generate-web-module/transformers/parent-detector.js +9 -3
- package/dist/scripts/generate-web-module/transformers/parent-detector.js.map +1 -1
- package/dist/scripts/generate-web-module/transformers/relationship-resolver.d.ts +11 -0
- package/dist/scripts/generate-web-module/transformers/relationship-resolver.d.ts.map +1 -1
- package/dist/scripts/generate-web-module/transformers/relationship-resolver.js +36 -9
- package/dist/scripts/generate-web-module/transformers/relationship-resolver.js.map +1 -1
- package/dist/scripts/generate-web-module/types/json-schema.interface.d.ts +2 -0
- package/dist/scripts/generate-web-module/types/json-schema.interface.d.ts.map +1 -1
- package/dist/scripts/generate-web-module/types/template-data.interface.d.ts +1 -0
- package/dist/scripts/generate-web-module/types/template-data.interface.d.ts.map +1 -1
- package/dist/scripts/generate-web-module/utils/i18n-updater.d.ts +4 -3
- package/dist/scripts/generate-web-module/utils/i18n-updater.d.ts.map +1 -1
- package/dist/scripts/generate-web-module/utils/i18n-updater.js +9 -9
- package/dist/scripts/generate-web-module/utils/i18n-updater.js.map +1 -1
- package/dist/scripts/generate-web-module/validators/json-schema-validator.js +3 -3
- package/dist/scripts/generate-web-module/validators/json-schema-validator.js.map +1 -1
- package/dist/server/index.d.mts +299 -4
- package/dist/server/index.d.ts +299 -4
- package/dist/server/index.js +215 -5
- package/dist/server/index.js.map +1 -1
- package/dist/server/index.mjs +214 -4
- package/dist/server/index.mjs.map +1 -1
- package/dist/token-2UWQJY5T.js +8 -0
- package/dist/token-2UWQJY5T.js.map +1 -0
- package/dist/token-EOK3N45S.mjs +8 -0
- package/dist/{useSocket-DzMKRKCA.d.ts → useSocket-8vwK_R_c.d.ts} +1 -1
- package/dist/{useSocket-Cn7fB_B1.d.mts → useSocket-BWJUXuOl.d.mts} +1 -1
- package/package.json +12 -52
- package/scripts/generate-web-module/generator.ts +8 -5
- package/scripts/generate-web-module/index.ts +1 -1
- package/scripts/generate-web-module/templates/components/editor.template.ts +7 -2
- package/scripts/generate-web-module/transformers/parent-detector.ts +10 -3
- package/scripts/generate-web-module/transformers/relationship-resolver.ts +36 -9
- package/scripts/generate-web-module/types/json-schema.interface.ts +2 -0
- package/scripts/generate-web-module/types/template-data.interface.ts +1 -0
- package/scripts/generate-web-module/utils/i18n-updater.ts +9 -9
- package/scripts/generate-web-module/validators/json-schema-validator.ts +3 -3
- package/src/client/JsonApiClient.ts +248 -0
- package/src/client/config.ts +78 -0
- package/src/client/index.ts +6 -1
- package/src/components/containers/TabsContainer.tsx +1 -1
- package/src/components/editors/BlockNoteEditor.tsx +3 -1
- package/src/components/index.ts +4 -0
- package/src/components/navigations/Breadcrumb.tsx +1 -1
- package/src/components/navigations/Header.tsx +2 -2
- package/src/contexts/CommonContext.tsx +1 -1
- package/src/contexts/SocketContext.tsx +1 -1
- package/src/contexts/index.ts +3 -0
- package/src/core/abstracts/ClientAbstractService.ts +255 -0
- package/src/core/abstracts/ServerAbstractService.ts +180 -0
- package/src/core/abstracts/index.ts +2 -0
- package/src/core/index.ts +32 -3
- package/src/discord/config.ts +15 -0
- package/src/discord/index.ts +1 -0
- package/src/features/auth/components/details/LandingComponent.tsx +2 -2
- package/src/features/auth/components/forms/AcceptInvitation.tsx +1 -1
- package/src/features/auth/components/forms/ActivateAccount.tsx +1 -1
- package/src/features/auth/components/forms/Cookies.tsx +2 -1
- package/src/features/auth/components/forms/ForgotPassword.tsx +1 -1
- package/src/features/auth/components/forms/Login.tsx +1 -1
- package/src/features/auth/components/forms/Logout.tsx +1 -1
- package/src/features/auth/components/forms/RefreshUser.tsx +2 -1
- package/src/features/auth/components/forms/Register.tsx +1 -1
- package/src/features/auth/components/forms/ResetPassword.tsx +1 -1
- package/src/features/auth/data/auth.service.ts +1 -1
- package/src/features/auth/data/index.ts +0 -1
- package/src/features/auth/utils/AuthCookies.ts +1 -1
- package/src/features/company/components/forms/CompanyConfigurationEditor.tsx +4 -2
- package/src/features/company/components/forms/CompanyDeleter.tsx +2 -1
- package/src/features/company/components/forms/CompanyEditor.tsx +6 -3
- package/src/features/company/components/forms/CompanyLicense.tsx +4 -2
- package/src/features/company/components/lists/CompaniesList.tsx +2 -1
- package/src/features/company/data/index.ts +0 -1
- package/src/features/content/components/lists/ContentsListById.tsx +2 -1
- package/src/features/content/components/lists/RelevantContentsList.tsx +2 -1
- package/src/features/content/data/index.ts +0 -1
- package/src/features/feature/data/index.ts +0 -1
- package/src/features/notification/components/lists/NotificationsList.tsx +2 -1
- package/src/features/notification/contexts/NotificationContext.tsx +2 -1
- package/src/features/notification/data/index.ts +0 -1
- package/src/features/push/data/index.ts +0 -1
- package/src/features/role/components/forms/RemoveUserFromRole.tsx +4 -2
- package/src/features/role/components/forms/UserRoleAdd.tsx +2 -1
- package/src/features/role/components/lists/RolesList.tsx +2 -1
- package/src/features/role/components/lists/UserRolesList.tsx +2 -1
- package/src/features/role/data/index.ts +0 -1
- package/src/features/s3/data/index.ts +0 -1
- package/src/features/user/components/forms/RoleUserAdd.tsx +4 -2
- package/src/features/user/components/forms/UserDeleter.tsx +2 -1
- package/src/features/user/components/forms/UserEditor.tsx +6 -3
- package/src/features/user/components/forms/UserMultiSelect.tsx +2 -1
- package/src/features/user/components/forms/UserReactivator.tsx +2 -1
- package/src/features/user/components/forms/UserResentInvitationEmail.tsx +2 -1
- package/src/features/user/components/forms/UserSelector.tsx +2 -1
- package/src/features/user/components/lists/AdminUsersList.tsx +2 -1
- package/src/features/user/components/lists/CompanyUsersList.tsx +2 -1
- package/src/features/user/components/lists/RelevantUsersList.tsx +2 -1
- package/src/features/user/components/lists/RoleUsersList.tsx +2 -1
- package/src/features/user/components/lists/UsersListByContentIds.tsx +2 -1
- package/src/features/user/data/index.ts +0 -1
- package/src/features/user/hooks/useUserSearch.ts +2 -1
- package/src/features/user/index.ts +1 -0
- package/src/hooks/useDataListRetriever.ts +4 -4
- package/src/hooks/usePageTracker.ts +1 -1
- package/src/hooks/usePushNotifications.ts +3 -2
- package/src/hooks/useSocket.ts +1 -1
- package/src/index.ts +7 -2
- package/src/roles/config.ts +0 -15
- package/src/roles/index.ts +1 -9
- package/src/server/JsonApiServer.ts +249 -0
- package/src/server/cache.ts +1 -1
- package/src/server/index.ts +13 -0
- package/src/server/request.ts +32 -18
- package/src/server/token.ts +1 -1
- package/dist/ApiData-DPKNfY-9.d.mts +0 -10
- package/dist/ApiData-DPKNfY-9.d.ts +0 -10
- package/dist/ApiDataInterface-DPP8s46n.d.mts +0 -21
- package/dist/ApiDataInterface-DPP8s46n.d.ts +0 -21
- package/dist/BlockNoteEditor-QV6ESIQA.js.map +0 -1
- package/dist/BlockNoteEditor-U2IHUVUF.mjs.map +0 -1
- package/dist/JsonApiRequest-UJ7FGIVI.js +0 -25
- package/dist/atoms/index.d.mts +0 -12
- package/dist/atoms/index.d.ts +0 -12
- package/dist/atoms/index.js +0 -9
- package/dist/atoms/index.js.map +0 -1
- package/dist/atoms/index.mjs +0 -9
- package/dist/chunk-2K3Q24UF.js.map +0 -1
- package/dist/chunk-3FBCC4G3.js +0 -8
- package/dist/chunk-3FBCC4G3.js.map +0 -1
- package/dist/chunk-3UELCPIN.js +0 -46
- package/dist/chunk-3UELCPIN.js.map +0 -1
- package/dist/chunk-5IET37O4.js +0 -4210
- package/dist/chunk-5IET37O4.js.map +0 -1
- package/dist/chunk-AYHKQWHH.js +0 -68
- package/dist/chunk-AYHKQWHH.js.map +0 -1
- package/dist/chunk-DEYKTLA3.js +0 -1131
- package/dist/chunk-DEYKTLA3.js.map +0 -1
- package/dist/chunk-E2HRC2OG.js.map +0 -1
- package/dist/chunk-EFJEWLRL.js.map +0 -1
- package/dist/chunk-FMBQZAIP.mjs +0 -490
- package/dist/chunk-FMBQZAIP.mjs.map +0 -1
- package/dist/chunk-HR4H2FP7.mjs.map +0 -1
- package/dist/chunk-HTLEKZND.mjs.map +0 -1
- package/dist/chunk-JGFWIT2E.mjs +0 -1131
- package/dist/chunk-JGFWIT2E.mjs.map +0 -1
- package/dist/chunk-P2F54I7Q.mjs +0 -4210
- package/dist/chunk-P2F54I7Q.mjs.map +0 -1
- package/dist/chunk-PO5Q3H5I.js +0 -1375
- package/dist/chunk-PO5Q3H5I.js.map +0 -1
- package/dist/chunk-Q2N6SQYW.mjs +0 -8
- package/dist/chunk-Q2N6SQYW.mjs.map +0 -1
- package/dist/chunk-Q4FXESVT.js +0 -490
- package/dist/chunk-Q4FXESVT.js.map +0 -1
- package/dist/chunk-R2ONK22M.mjs +0 -7985
- package/dist/chunk-R2ONK22M.mjs.map +0 -1
- package/dist/chunk-SM63SZCP.mjs +0 -68
- package/dist/chunk-SM63SZCP.mjs.map +0 -1
- package/dist/chunk-SZZYEG3P.mjs +0 -46
- package/dist/chunk-SZZYEG3P.mjs.map +0 -1
- package/dist/chunk-YF5XQZDR.mjs.map +0 -1
- package/dist/config-BmnK65TD.d.mts +0 -35
- package/dist/config-BmnK65TD.d.ts +0 -35
- package/dist/config-DQeAo9Kf.d.mts +0 -49
- package/dist/config-DQeAo9Kf.d.ts +0 -49
- package/dist/content.fields-cHPdM8GJ.d.mts +0 -27
- package/dist/content.fields-cHPdM8GJ.d.ts +0 -27
- package/dist/d3.link.interface-ClC4Irqp.d.mts +0 -21
- package/dist/d3.link.interface-ClC4Irqp.d.ts +0 -21
- package/dist/features/index.d.mts +0 -476
- package/dist/features/index.d.ts +0 -476
- package/dist/features/index.js +0 -87
- package/dist/features/index.js.map +0 -1
- package/dist/features/index.mjs +0 -87
- package/dist/hooks/index.d.mts +0 -69
- package/dist/hooks/index.d.ts +0 -69
- package/dist/hooks/index.js +0 -56
- package/dist/hooks/index.js.map +0 -1
- package/dist/hooks/index.mjs +0 -56
- package/dist/hooks/index.mjs.map +0 -1
- package/dist/interfaces/index.d.mts +0 -4
- package/dist/interfaces/index.d.ts +0 -4
- package/dist/interfaces/index.js +0 -2
- package/dist/interfaces/index.js.map +0 -1
- package/dist/interfaces/index.mjs +0 -2
- package/dist/interfaces/index.mjs.map +0 -1
- package/dist/notification.interface-BBgMUdLR.d.mts +0 -14
- package/dist/notification.interface-gyvT-Z2F.d.ts +0 -14
- package/dist/permissions/index.d.mts +0 -41
- package/dist/permissions/index.d.ts +0 -41
- package/dist/permissions/index.js +0 -14
- package/dist/permissions/index.js.map +0 -1
- package/dist/permissions/index.mjs +0 -14
- package/dist/permissions/index.mjs.map +0 -1
- package/dist/request-7FE3LJLV.mjs +0 -9
- package/dist/request-7FE3LJLV.mjs.map +0 -1
- package/dist/request-QFS7NEIE.js +0 -9
- package/dist/request-QFS7NEIE.js.map +0 -1
- package/dist/roles/index.d.mts +0 -39
- package/dist/roles/index.d.ts +0 -39
- package/dist/roles/index.js +0 -18
- package/dist/roles/index.js.map +0 -1
- package/dist/roles/index.mjs +0 -18
- package/dist/roles/index.mjs.map +0 -1
- package/dist/shadcnui/index.d.mts +0 -698
- package/dist/shadcnui/index.d.ts +0 -698
- package/dist/shadcnui/index.js +0 -468
- package/dist/shadcnui/index.js.map +0 -1
- package/dist/shadcnui/index.mjs +0 -467
- package/dist/shadcnui/index.mjs.map +0 -1
- package/dist/token-IJSPOMW6.mjs +0 -9
- package/dist/token-IJSPOMW6.mjs.map +0 -1
- package/dist/token-UYE7CV6X.js +0 -9
- package/dist/token-UYE7CV6X.js.map +0 -1
- package/dist/types-B2QRyqyK.d.ts +0 -39
- package/dist/types-CgvNmxTd.d.mts +0 -39
- package/dist/types-t2PyXhDu.d.mts +0 -116
- package/dist/types-t2PyXhDu.d.ts +0 -116
- package/dist/user.interface-CAsTIbuQ.d.mts +0 -85
- package/dist/user.interface-CbWqMaaU.d.ts +0 -85
- package/dist/utils/index.d.mts +0 -224
- package/dist/utils/index.d.ts +0 -224
- package/dist/utils/index.js +0 -46
- package/dist/utils/index.js.map +0 -1
- package/dist/utils/index.mjs +0 -46
- package/dist/utils/index.mjs.map +0 -1
- /package/dist/{JsonApiRequest-6UR7DIAR.mjs.map → JsonApiRequest-VCCRO732.mjs.map} +0 -0
- /package/dist/{chunk-IKBA4AHN.mjs.map → chunk-F4Y3GZG4.mjs.map} +0 -0
- /package/dist/{chunk-HAG77QBV.mjs.map → chunk-K4W5QXL5.mjs.map} +0 -0
- /package/dist/{atoms/index.mjs.map → request-XABCMU25.mjs.map} +0 -0
- /package/dist/{features/index.mjs.map → token-EOK3N45S.mjs.map} +0 -0
package/dist/chunk-SM63SZCP.mjs
DELETED
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
__name
|
|
3
|
-
} from "./chunk-PAWJFY3S.mjs";
|
|
4
|
-
|
|
5
|
-
// src/i18n/config.ts
|
|
6
|
-
var _config = null;
|
|
7
|
-
function configureI18n(config) {
|
|
8
|
-
_config = config;
|
|
9
|
-
}
|
|
10
|
-
__name(configureI18n, "configureI18n");
|
|
11
|
-
function useI18nRouter() {
|
|
12
|
-
if (!_config?.useRouter) {
|
|
13
|
-
throw new Error("i18n not configured. Call configureI18n() at app startup.");
|
|
14
|
-
}
|
|
15
|
-
return _config.useRouter();
|
|
16
|
-
}
|
|
17
|
-
__name(useI18nRouter, "useI18nRouter");
|
|
18
|
-
function useI18nTranslations(namespace) {
|
|
19
|
-
if (!_config?.useTranslations) {
|
|
20
|
-
return (key) => key;
|
|
21
|
-
}
|
|
22
|
-
return _config.useTranslations(namespace);
|
|
23
|
-
}
|
|
24
|
-
__name(useI18nTranslations, "useI18nTranslations");
|
|
25
|
-
function getI18nLink() {
|
|
26
|
-
if (!_config?.Link) {
|
|
27
|
-
throw new Error("i18n not configured. Call configureI18n() at app startup.");
|
|
28
|
-
}
|
|
29
|
-
return _config.Link;
|
|
30
|
-
}
|
|
31
|
-
__name(getI18nLink, "getI18nLink");
|
|
32
|
-
function useI18nLocale() {
|
|
33
|
-
if (_config?.useLocale) {
|
|
34
|
-
return _config.useLocale();
|
|
35
|
-
}
|
|
36
|
-
return "en";
|
|
37
|
-
}
|
|
38
|
-
__name(useI18nLocale, "useI18nLocale");
|
|
39
|
-
function useI18nDateFnsLocale() {
|
|
40
|
-
if (_config?.useDateFnsLocale) {
|
|
41
|
-
return _config.useDateFnsLocale();
|
|
42
|
-
}
|
|
43
|
-
return void 0;
|
|
44
|
-
}
|
|
45
|
-
__name(useI18nDateFnsLocale, "useI18nDateFnsLocale");
|
|
46
|
-
|
|
47
|
-
// src/features/auth/config.ts
|
|
48
|
-
var _tokenHandler = null;
|
|
49
|
-
function configureAuth(handler) {
|
|
50
|
-
_tokenHandler = handler;
|
|
51
|
-
}
|
|
52
|
-
__name(configureAuth, "configureAuth");
|
|
53
|
-
function getTokenHandler() {
|
|
54
|
-
return _tokenHandler;
|
|
55
|
-
}
|
|
56
|
-
__name(getTokenHandler, "getTokenHandler");
|
|
57
|
-
|
|
58
|
-
export {
|
|
59
|
-
configureI18n,
|
|
60
|
-
useI18nRouter,
|
|
61
|
-
useI18nTranslations,
|
|
62
|
-
getI18nLink,
|
|
63
|
-
useI18nLocale,
|
|
64
|
-
useI18nDateFnsLocale,
|
|
65
|
-
configureAuth,
|
|
66
|
-
getTokenHandler
|
|
67
|
-
};
|
|
68
|
-
//# sourceMappingURL=chunk-SM63SZCP.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/i18n/config.ts","../src/features/auth/config.ts"],"sourcesContent":["import { ComponentType } from \"react\";\n\n// Types for injected hooks\nexport interface I18nRouter {\n push: (href: string) => void;\n replace: (href: string) => void;\n back: () => void;\n forward: () => void;\n refresh: () => void;\n prefetch: (href: string) => void;\n}\n\nexport type UseRouterHook = () => I18nRouter;\nexport type UseTranslationsHook = (namespace?: string) => (key: string, values?: Record<string, any>) => string;\nexport type UseLocaleHook = () => string;\n\nexport type UseDateFnsLocaleHook = () => any; // date-fns Locale type\nexport type LinkComponent = ComponentType<{ href: string; children: React.ReactNode; [key: string]: any }>;\n\nexport interface I18nConfig {\n useRouter: UseRouterHook;\n useTranslations: UseTranslationsHook;\n useLocale?: UseLocaleHook;\n useDateFnsLocale?: UseDateFnsLocaleHook;\n Link: LinkComponent;\n usePathname: () => string;\n}\n\n// Private storage\nlet _config: I18nConfig | null = null;\n\n// Configuration function (called by app at startup)\nexport function configureI18n(config: I18nConfig): void {\n _config = config;\n}\n\n// Hooks for library components to use\nexport function useI18nRouter(): I18nRouter {\n if (!_config?.useRouter) {\n throw new Error(\"i18n not configured. Call configureI18n() at app startup.\");\n }\n return _config.useRouter();\n}\n\nexport function useI18nTranslations(namespace?: string): (key: string, values?: Record<string, any>) => string {\n if (!_config?.useTranslations) {\n // Fallback: return key as-is (safe for server/client)\n return (key: string) => key;\n }\n return _config.useTranslations(namespace);\n}\n\nexport function getI18nLink(): LinkComponent {\n if (!_config?.Link) {\n throw new Error(\"i18n not configured. Call configureI18n() at app startup.\");\n }\n return _config.Link;\n}\n\nexport function useI18nLocale(): string {\n if (_config?.useLocale) {\n return _config.useLocale();\n }\n // Fallback to English (safe for server/client)\n return \"en\";\n}\n\nexport function useI18nDateFnsLocale(): any {\n if (_config?.useDateFnsLocale) {\n return _config.useDateFnsLocale();\n }\n // Fallback to undefined (Calendar will use default)\n return undefined;\n}\n","/**\n * Token parameters for authentication cookie management\n */\nexport interface TokenParams {\n token?: string;\n refreshToken?: string;\n userId?: string;\n companyId?: string;\n licenseExpirationDate?: Date;\n roles?: string[];\n features?: string[];\n modules?: {\n id: string;\n permissions: {\n create: boolean | string;\n read: boolean | string;\n update: boolean | string;\n delete: boolean | string;\n };\n }[];\n}\n\n/**\n * Token handler interface for dependency injection\n * Apps must provide implementations of these functions via configureAuth()\n */\nexport interface TokenHandler {\n updateToken: (params: TokenParams) => Promise<void>;\n removeToken: () => Promise<void>;\n}\n\n// Private storage for the injected token handler\nlet _tokenHandler: TokenHandler | null = null;\n\n/**\n * Configure authentication token handling\n * Call this at app startup to provide Server Actions for cookie management\n *\n * @example\n * ```typescript\n * import { configureAuth } from \"@carlonicora/nextjs-jsonapi/features\";\n * import { updateToken, removeToken } from \"@/features/auth/utils/AuthCookies\";\n *\n * configureAuth({ updateToken, removeToken });\n * ```\n */\nexport function configureAuth(handler: TokenHandler): void {\n _tokenHandler = handler;\n}\n\n/**\n * Internal getter for AuthService to access the token handler\n * @internal\n */\nexport function getTokenHandler(): TokenHandler | null {\n return _tokenHandler;\n}\n"],"mappings":";;;;;AA6BA,IAAI,UAA6B;AAG1B,SAAS,cAAc,QAA0B;AACtD,YAAU;AACZ;AAFgB;AAKT,SAAS,gBAA4B;AAC1C,MAAI,CAAC,SAAS,WAAW;AACvB,UAAM,IAAI,MAAM,2DAA2D;AAAA,EAC7E;AACA,SAAO,QAAQ,UAAU;AAC3B;AALgB;AAOT,SAAS,oBAAoB,WAA2E;AAC7G,MAAI,CAAC,SAAS,iBAAiB;AAE7B,WAAO,CAAC,QAAgB;AAAA,EAC1B;AACA,SAAO,QAAQ,gBAAgB,SAAS;AAC1C;AANgB;AAQT,SAAS,cAA6B;AAC3C,MAAI,CAAC,SAAS,MAAM;AAClB,UAAM,IAAI,MAAM,2DAA2D;AAAA,EAC7E;AACA,SAAO,QAAQ;AACjB;AALgB;AAOT,SAAS,gBAAwB;AACtC,MAAI,SAAS,WAAW;AACtB,WAAO,QAAQ,UAAU;AAAA,EAC3B;AAEA,SAAO;AACT;AANgB;AAQT,SAAS,uBAA4B;AAC1C,MAAI,SAAS,kBAAkB;AAC7B,WAAO,QAAQ,iBAAiB;AAAA,EAClC;AAEA,SAAO;AACT;AANgB;;;ACnChB,IAAI,gBAAqC;AAclC,SAAS,cAAc,SAA6B;AACzD,kBAAgB;AAClB;AAFgB;AAQT,SAAS,kBAAuC;AACrD,SAAO;AACT;AAFgB;","names":[]}
|
package/dist/chunk-SZZYEG3P.mjs
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
__name
|
|
3
|
-
} from "./chunk-PAWJFY3S.mjs";
|
|
4
|
-
|
|
5
|
-
// src/roles/config.ts
|
|
6
|
-
var _roleId = null;
|
|
7
|
-
var _useDiscord = false;
|
|
8
|
-
var _useInternalAuth = true;
|
|
9
|
-
function configureRoles(roleId) {
|
|
10
|
-
_roleId = roleId;
|
|
11
|
-
}
|
|
12
|
-
__name(configureRoles, "configureRoles");
|
|
13
|
-
function configureDiscord(params) {
|
|
14
|
-
_useDiscord = params.useDiscord;
|
|
15
|
-
_useInternalAuth = params.useInternalAuth;
|
|
16
|
-
}
|
|
17
|
-
__name(configureDiscord, "configureDiscord");
|
|
18
|
-
function getRoleId() {
|
|
19
|
-
if (!_roleId) {
|
|
20
|
-
throw new Error("Roles not configured. Call configureRoles() at app startup.");
|
|
21
|
-
}
|
|
22
|
-
return _roleId;
|
|
23
|
-
}
|
|
24
|
-
__name(getRoleId, "getRoleId");
|
|
25
|
-
function isRolesConfigured() {
|
|
26
|
-
return _roleId !== null;
|
|
27
|
-
}
|
|
28
|
-
__name(isRolesConfigured, "isRolesConfigured");
|
|
29
|
-
function isDiscordConfigured() {
|
|
30
|
-
return _useDiscord;
|
|
31
|
-
}
|
|
32
|
-
__name(isDiscordConfigured, "isDiscordConfigured");
|
|
33
|
-
function isInternalAuthConfigured() {
|
|
34
|
-
return _useInternalAuth;
|
|
35
|
-
}
|
|
36
|
-
__name(isInternalAuthConfigured, "isInternalAuthConfigured");
|
|
37
|
-
|
|
38
|
-
export {
|
|
39
|
-
configureRoles,
|
|
40
|
-
configureDiscord,
|
|
41
|
-
getRoleId,
|
|
42
|
-
isRolesConfigured,
|
|
43
|
-
isDiscordConfigured,
|
|
44
|
-
isInternalAuthConfigured
|
|
45
|
-
};
|
|
46
|
-
//# sourceMappingURL=chunk-SZZYEG3P.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/roles/config.ts"],"sourcesContent":["/**\n * Role ID configuration interface\n * Apps provide their role IDs via configureRoles()\n */\nexport interface RoleIdConfig {\n Administrator: string;\n CompanyAdministrator: string;\n [key: string]: string; // Allow additional roles\n}\n\n// Private storage for the injected role IDs\nlet _roleId: RoleIdConfig | null = null;\nlet _useDiscord: boolean = false;\nlet _useInternalAuth: boolean = true;\n\n/**\n * Configure role IDs for the library\n * Call this at app startup to provide role ID constants\n *\n * @example\n * ```typescript\n * import { configureRoles } from \"@carlonicora/nextjs-jsonapi\";\n * import { RoleId } from \"@phlow/shared\";\n *\n * configureRoles(RoleId);\n * ```\n */\nexport function configureRoles(roleId: RoleIdConfig): void {\n _roleId = roleId;\n}\n\nexport function configureDiscord(params: { useDiscord: boolean; useInternalAuth: boolean }): void {\n _useDiscord = params.useDiscord;\n _useInternalAuth = params.useInternalAuth;\n}\n\n/**\n * Get configured role IDs\n * @throws Error if roles not configured\n */\nexport function getRoleId(): RoleIdConfig {\n if (!_roleId) {\n throw new Error(\"Roles not configured. Call configureRoles() at app startup.\");\n }\n return _roleId;\n}\n\n/**\n * Check if roles have been configured\n */\nexport function isRolesConfigured(): boolean {\n return _roleId !== null;\n}\n\nexport function isDiscordConfigured(): boolean {\n return _useDiscord;\n}\n\nexport function isInternalAuthConfigured(): boolean {\n return _useInternalAuth;\n}\n"],"mappings":";;;;;AAWA,IAAI,UAA+B;AACnC,IAAI,cAAuB;AAC3B,IAAI,mBAA4B;AAczB,SAAS,eAAe,QAA4B;AACzD,YAAU;AACZ;AAFgB;AAIT,SAAS,iBAAiB,QAAiE;AAChG,gBAAc,OAAO;AACrB,qBAAmB,OAAO;AAC5B;AAHgB;AAST,SAAS,YAA0B;AACxC,MAAI,CAAC,SAAS;AACZ,UAAM,IAAI,MAAM,6DAA6D;AAAA,EAC/E;AACA,SAAO;AACT;AALgB;AAUT,SAAS,oBAA6B;AAC3C,SAAO,YAAY;AACrB;AAFgB;AAIT,SAAS,sBAA+B;AAC7C,SAAO;AACT;AAFgB;AAIT,SAAS,2BAAoC;AAClD,SAAO;AACT;AAFgB;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/server/token.ts"],"sourcesContent":["\"use server\";\n\n/**\n * Get the authentication token from cookies (server-side)\n */\nexport async function getServerToken(): Promise<string | undefined> {\n const { cookies } = await import(\"next/headers\");\n const cookieStore = await cookies();\n return cookieStore.get(\"token\")?.value;\n}\n"],"mappings":";;;;;AAKA,eAAsB,iBAA8C;AAClE,QAAM,EAAE,QAAQ,IAAI,MAAM,OAAO,cAAc;AAC/C,QAAM,cAAc,MAAM,QAAQ;AAClC,SAAO,YAAY,IAAI,OAAO,GAAG;AACnC;AAJsB;","names":[]}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { ComponentType } from 'react';
|
|
2
|
-
|
|
3
|
-
interface I18nRouter {
|
|
4
|
-
push: (href: string) => void;
|
|
5
|
-
replace: (href: string) => void;
|
|
6
|
-
back: () => void;
|
|
7
|
-
forward: () => void;
|
|
8
|
-
refresh: () => void;
|
|
9
|
-
prefetch: (href: string) => void;
|
|
10
|
-
}
|
|
11
|
-
type UseRouterHook = () => I18nRouter;
|
|
12
|
-
type UseTranslationsHook = (namespace?: string) => (key: string, values?: Record<string, any>) => string;
|
|
13
|
-
type UseLocaleHook = () => string;
|
|
14
|
-
type UseDateFnsLocaleHook = () => any;
|
|
15
|
-
type LinkComponent = ComponentType<{
|
|
16
|
-
href: string;
|
|
17
|
-
children: React.ReactNode;
|
|
18
|
-
[key: string]: any;
|
|
19
|
-
}>;
|
|
20
|
-
interface I18nConfig {
|
|
21
|
-
useRouter: UseRouterHook;
|
|
22
|
-
useTranslations: UseTranslationsHook;
|
|
23
|
-
useLocale?: UseLocaleHook;
|
|
24
|
-
useDateFnsLocale?: UseDateFnsLocaleHook;
|
|
25
|
-
Link: LinkComponent;
|
|
26
|
-
usePathname: () => string;
|
|
27
|
-
}
|
|
28
|
-
declare function configureI18n(config: I18nConfig): void;
|
|
29
|
-
declare function useI18nRouter(): I18nRouter;
|
|
30
|
-
declare function useI18nTranslations(namespace?: string): (key: string, values?: Record<string, any>) => string;
|
|
31
|
-
declare function getI18nLink(): LinkComponent;
|
|
32
|
-
declare function useI18nLocale(): string;
|
|
33
|
-
declare function useI18nDateFnsLocale(): any;
|
|
34
|
-
|
|
35
|
-
export { type I18nConfig as I, type LinkComponent as L, type UseDateFnsLocaleHook as U, useI18nLocale as a, useI18nRouter as b, configureI18n as c, useI18nTranslations as d, type I18nRouter as e, type UseLocaleHook as f, getI18nLink as g, type UseRouterHook as h, type UseTranslationsHook as i, useI18nDateFnsLocale as u };
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { ComponentType } from 'react';
|
|
2
|
-
|
|
3
|
-
interface I18nRouter {
|
|
4
|
-
push: (href: string) => void;
|
|
5
|
-
replace: (href: string) => void;
|
|
6
|
-
back: () => void;
|
|
7
|
-
forward: () => void;
|
|
8
|
-
refresh: () => void;
|
|
9
|
-
prefetch: (href: string) => void;
|
|
10
|
-
}
|
|
11
|
-
type UseRouterHook = () => I18nRouter;
|
|
12
|
-
type UseTranslationsHook = (namespace?: string) => (key: string, values?: Record<string, any>) => string;
|
|
13
|
-
type UseLocaleHook = () => string;
|
|
14
|
-
type UseDateFnsLocaleHook = () => any;
|
|
15
|
-
type LinkComponent = ComponentType<{
|
|
16
|
-
href: string;
|
|
17
|
-
children: React.ReactNode;
|
|
18
|
-
[key: string]: any;
|
|
19
|
-
}>;
|
|
20
|
-
interface I18nConfig {
|
|
21
|
-
useRouter: UseRouterHook;
|
|
22
|
-
useTranslations: UseTranslationsHook;
|
|
23
|
-
useLocale?: UseLocaleHook;
|
|
24
|
-
useDateFnsLocale?: UseDateFnsLocaleHook;
|
|
25
|
-
Link: LinkComponent;
|
|
26
|
-
usePathname: () => string;
|
|
27
|
-
}
|
|
28
|
-
declare function configureI18n(config: I18nConfig): void;
|
|
29
|
-
declare function useI18nRouter(): I18nRouter;
|
|
30
|
-
declare function useI18nTranslations(namespace?: string): (key: string, values?: Record<string, any>) => string;
|
|
31
|
-
declare function getI18nLink(): LinkComponent;
|
|
32
|
-
declare function useI18nLocale(): string;
|
|
33
|
-
declare function useI18nDateFnsLocale(): any;
|
|
34
|
-
|
|
35
|
-
export { type I18nConfig as I, type LinkComponent as L, type UseDateFnsLocaleHook as U, useI18nLocale as a, useI18nRouter as b, configureI18n as c, useI18nTranslations as d, type I18nRouter as e, type UseLocaleHook as f, getI18nLink as g, type UseRouterHook as h, type UseTranslationsHook as i, useI18nDateFnsLocale as u };
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Token parameters for authentication cookie management
|
|
3
|
-
*/
|
|
4
|
-
interface TokenParams {
|
|
5
|
-
token?: string;
|
|
6
|
-
refreshToken?: string;
|
|
7
|
-
userId?: string;
|
|
8
|
-
companyId?: string;
|
|
9
|
-
licenseExpirationDate?: Date;
|
|
10
|
-
roles?: string[];
|
|
11
|
-
features?: string[];
|
|
12
|
-
modules?: {
|
|
13
|
-
id: string;
|
|
14
|
-
permissions: {
|
|
15
|
-
create: boolean | string;
|
|
16
|
-
read: boolean | string;
|
|
17
|
-
update: boolean | string;
|
|
18
|
-
delete: boolean | string;
|
|
19
|
-
};
|
|
20
|
-
}[];
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* Token handler interface for dependency injection
|
|
24
|
-
* Apps must provide implementations of these functions via configureAuth()
|
|
25
|
-
*/
|
|
26
|
-
interface TokenHandler {
|
|
27
|
-
updateToken: (params: TokenParams) => Promise<void>;
|
|
28
|
-
removeToken: () => Promise<void>;
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* Configure authentication token handling
|
|
32
|
-
* Call this at app startup to provide Server Actions for cookie management
|
|
33
|
-
*
|
|
34
|
-
* @example
|
|
35
|
-
* ```typescript
|
|
36
|
-
* import { configureAuth } from "@carlonicora/nextjs-jsonapi/features";
|
|
37
|
-
* import { updateToken, removeToken } from "@/features/auth/utils/AuthCookies";
|
|
38
|
-
*
|
|
39
|
-
* configureAuth({ updateToken, removeToken });
|
|
40
|
-
* ```
|
|
41
|
-
*/
|
|
42
|
-
declare function configureAuth(handler: TokenHandler): void;
|
|
43
|
-
/**
|
|
44
|
-
* Internal getter for AuthService to access the token handler
|
|
45
|
-
* @internal
|
|
46
|
-
*/
|
|
47
|
-
declare function getTokenHandler(): TokenHandler | null;
|
|
48
|
-
|
|
49
|
-
export { type TokenHandler as T, type TokenParams as a, configureAuth as c, getTokenHandler as g };
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Token parameters for authentication cookie management
|
|
3
|
-
*/
|
|
4
|
-
interface TokenParams {
|
|
5
|
-
token?: string;
|
|
6
|
-
refreshToken?: string;
|
|
7
|
-
userId?: string;
|
|
8
|
-
companyId?: string;
|
|
9
|
-
licenseExpirationDate?: Date;
|
|
10
|
-
roles?: string[];
|
|
11
|
-
features?: string[];
|
|
12
|
-
modules?: {
|
|
13
|
-
id: string;
|
|
14
|
-
permissions: {
|
|
15
|
-
create: boolean | string;
|
|
16
|
-
read: boolean | string;
|
|
17
|
-
update: boolean | string;
|
|
18
|
-
delete: boolean | string;
|
|
19
|
-
};
|
|
20
|
-
}[];
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* Token handler interface for dependency injection
|
|
24
|
-
* Apps must provide implementations of these functions via configureAuth()
|
|
25
|
-
*/
|
|
26
|
-
interface TokenHandler {
|
|
27
|
-
updateToken: (params: TokenParams) => Promise<void>;
|
|
28
|
-
removeToken: () => Promise<void>;
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* Configure authentication token handling
|
|
32
|
-
* Call this at app startup to provide Server Actions for cookie management
|
|
33
|
-
*
|
|
34
|
-
* @example
|
|
35
|
-
* ```typescript
|
|
36
|
-
* import { configureAuth } from "@carlonicora/nextjs-jsonapi/features";
|
|
37
|
-
* import { updateToken, removeToken } from "@/features/auth/utils/AuthCookies";
|
|
38
|
-
*
|
|
39
|
-
* configureAuth({ updateToken, removeToken });
|
|
40
|
-
* ```
|
|
41
|
-
*/
|
|
42
|
-
declare function configureAuth(handler: TokenHandler): void;
|
|
43
|
-
/**
|
|
44
|
-
* Internal getter for AuthService to access the token handler
|
|
45
|
-
* @internal
|
|
46
|
-
*/
|
|
47
|
-
declare function getTokenHandler(): TokenHandler | null;
|
|
48
|
-
|
|
49
|
-
export { type TokenHandler as T, type TokenParams as a, configureAuth as c, getTokenHandler as g };
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
declare enum RoleFields {
|
|
2
|
-
roleId = "roleId",
|
|
3
|
-
name = "name",
|
|
4
|
-
description = "description",
|
|
5
|
-
createdAt = "createdAt",
|
|
6
|
-
updatedAt = "updatedAt"
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
declare enum UserFields {
|
|
10
|
-
userId = "userId",
|
|
11
|
-
name = "name",
|
|
12
|
-
email = "email",
|
|
13
|
-
relevance = "relevance",
|
|
14
|
-
createdAt = "createdAt",
|
|
15
|
-
updatedAt = "updatedAt"
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
declare enum ContentFields {
|
|
19
|
-
contentId = "contentId",
|
|
20
|
-
name = "name",
|
|
21
|
-
relevance = "relevance",
|
|
22
|
-
authors = "authors",
|
|
23
|
-
createdAt = "createdAt",
|
|
24
|
-
updatedAt = "updatedAt"
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export { ContentFields as C, RoleFields as R, UserFields as U };
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
declare enum RoleFields {
|
|
2
|
-
roleId = "roleId",
|
|
3
|
-
name = "name",
|
|
4
|
-
description = "description",
|
|
5
|
-
createdAt = "createdAt",
|
|
6
|
-
updatedAt = "updatedAt"
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
declare enum UserFields {
|
|
10
|
-
userId = "userId",
|
|
11
|
-
name = "name",
|
|
12
|
-
email = "email",
|
|
13
|
-
relevance = "relevance",
|
|
14
|
-
createdAt = "createdAt",
|
|
15
|
-
updatedAt = "updatedAt"
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
declare enum ContentFields {
|
|
19
|
-
contentId = "contentId",
|
|
20
|
-
name = "name",
|
|
21
|
-
relevance = "relevance",
|
|
22
|
-
authors = "authors",
|
|
23
|
-
createdAt = "createdAt",
|
|
24
|
-
updatedAt = "updatedAt"
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export { ContentFields as C, RoleFields as R, UserFields as U };
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { SimulationLinkDatum } from 'd3';
|
|
2
|
-
import { LucideIcon } from 'lucide-react';
|
|
3
|
-
|
|
4
|
-
interface D3Node extends d3.SimulationNodeDatum {
|
|
5
|
-
id: string;
|
|
6
|
-
name: string;
|
|
7
|
-
instanceType: string;
|
|
8
|
-
relationshipType?: string;
|
|
9
|
-
isBrowsableNode?: boolean;
|
|
10
|
-
icon?: LucideIcon;
|
|
11
|
-
visible?: boolean;
|
|
12
|
-
washedOut?: boolean;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
interface D3Link extends SimulationLinkDatum<D3Node> {
|
|
16
|
-
source: string | D3Node;
|
|
17
|
-
target: string | D3Node;
|
|
18
|
-
relationshipType?: string;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export type { D3Link as D, D3Node as a };
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { SimulationLinkDatum } from 'd3';
|
|
2
|
-
import { LucideIcon } from 'lucide-react';
|
|
3
|
-
|
|
4
|
-
interface D3Node extends d3.SimulationNodeDatum {
|
|
5
|
-
id: string;
|
|
6
|
-
name: string;
|
|
7
|
-
instanceType: string;
|
|
8
|
-
relationshipType?: string;
|
|
9
|
-
isBrowsableNode?: boolean;
|
|
10
|
-
icon?: LucideIcon;
|
|
11
|
-
visible?: boolean;
|
|
12
|
-
washedOut?: boolean;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
interface D3Link extends SimulationLinkDatum<D3Node> {
|
|
16
|
-
source: string | D3Node;
|
|
17
|
-
target: string | D3Node;
|
|
18
|
-
relationshipType?: string;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export type { D3Link as D, D3Node as a };
|