@zango-core/appbuilder 1.0.0-rc.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.
- package/dist/ConfigurePage-DRzSb06z.js +29 -0
- package/dist/ConfigurePage-DRzSb06z.js.map +1 -0
- package/dist/LoginPageWithRoleSelection-xTr_eIWh.js +662 -0
- package/dist/LoginPageWithRoleSelection-xTr_eIWh.js.map +1 -0
- package/dist/PageTypeRegistry-5269IpiS.js +53 -0
- package/dist/PageTypeRegistry-5269IpiS.js.map +1 -0
- package/dist/index.framework-B8SMzgN1.js +28005 -0
- package/dist/index.framework-B8SMzgN1.js.map +1 -0
- package/dist/types/App.d.ts +14 -0
- package/dist/types/__tests__/mocks/data/appInitData.d.ts +197 -0
- package/dist/types/__tests__/mocks/data/authConfigData.d.ts +356 -0
- package/dist/types/__tests__/mocks/externalPackages.d.ts +42 -0
- package/dist/types/__tests__/mocks/handlers/appInit.handlers.d.ts +3 -0
- package/dist/types/__tests__/mocks/handlers/auth.handlers.d.ts +1 -0
- package/dist/types/__tests__/mocks/handlers/index.d.ts +5 -0
- package/dist/types/__tests__/mocks/handlers/profile.handlers.d.ts +15 -0
- package/dist/types/__tests__/mocks/handlers/session.handlers.d.ts +2 -0
- package/dist/types/__tests__/setup/setupDOMMatchers.d.ts +0 -0
- package/dist/types/__tests__/setup/setupMSW.d.ts +1 -0
- package/dist/types/__tests__/setup/setupTests.d.ts +34 -0
- package/dist/types/__tests__/utils/mockRouterUtils.d.ts +62 -0
- package/dist/types/__tests__/utils/renderWithProviders.d.ts +22 -0
- package/dist/types/__tests__/utils/waitForHelpers.d.ts +36 -0
- package/dist/types/auth/components/AuthMobileShell.d.ts +8 -0
- package/dist/types/auth/components/AuthProvider.d.ts +30 -0
- package/dist/types/auth/components/DynamicLoginForm.d.ts +9 -0
- package/dist/types/auth/components/ForgotPasswordForm.d.ts +11 -0
- package/dist/types/auth/components/LoginForm.d.ts +7 -0
- package/dist/types/auth/components/LoginRouter.d.ts +197 -0
- package/dist/types/auth/components/OAuthCallback.d.ts +19 -0
- package/dist/types/auth/components/OTPForm.d.ts +11 -0
- package/dist/types/auth/components/OTPInput.d.ts +8 -0
- package/dist/types/auth/components/PasswordResetRequired.d.ts +23 -0
- package/dist/types/auth/components/ProviderButton.d.ts +17 -0
- package/dist/types/auth/components/ResetPasswordForm.d.ts +12 -0
- package/dist/types/auth/components/RoleSelection.d.ts +25 -0
- package/dist/types/auth/components/SecondFactorAuth.d.ts +21 -0
- package/dist/types/auth/components/composable/OTPLoginForm.d.ts +17 -0
- package/dist/types/auth/components/composable/PasswordLoginForm.d.ts +17 -0
- package/dist/types/auth/components/composable/SSOButtons.d.ts +61 -0
- package/dist/types/auth/components/composable/index.d.ts +42 -0
- package/dist/types/auth/contexts/LoginContext.d.ts +6 -0
- package/dist/types/auth/hocs/withMultiStepAuth.d.ts +35 -0
- package/dist/types/auth/index.d.ts +23 -0
- package/dist/types/auth/pages/CompleteAuthFlow.d.ts +24 -0
- package/dist/types/auth/pages/LoginPage.d.ts +8 -0
- package/dist/types/auth/pages/LoginPageWithRoleSelection.d.ts +13 -0
- package/dist/types/auth/pages/OAuthCallbackPage.d.ts +17 -0
- package/dist/types/auth/pages/SAMLCallbackPage.d.ts +16 -0
- package/dist/types/auth/services/authService.d.ts +87 -0
- package/dist/types/auth/services/internal/apiClients.d.ts +9 -0
- package/dist/types/auth/services/internal/authState.d.ts +12 -0
- package/dist/types/auth/services/internal/errorHelper.d.ts +1 -0
- package/dist/types/auth/services/internal/oauthSamlService.d.ts +46 -0
- package/dist/types/auth/services/internal/passwordValidator.d.ts +17 -0
- package/dist/types/auth/services/network/api.d.ts +1629 -0
- package/dist/types/auth/services/network/base.d.ts +31 -0
- package/dist/types/auth/services/network/configuration.d.ts +74 -0
- package/dist/types/auth/services/network/index.d.ts +13 -0
- package/dist/types/auth/stores/index.d.ts +1 -0
- package/dist/types/auth/stores/useAuthStore.d.ts +6 -0
- package/dist/types/auth/types/index.d.ts +57 -0
- package/dist/types/auth/utils/authFlowHandler.d.ts +72 -0
- package/dist/types/auth/utils/authUtils.d.ts +21 -0
- package/dist/types/auth/utils/validators.d.ts +18 -0
- package/dist/types/components/ErrorBoundary.d.ts +23 -0
- package/dist/types/components/ErrorFallback.d.ts +8 -0
- package/dist/types/components/index.d.ts +1 -0
- package/dist/types/components/ui/avatar.d.ts +11 -0
- package/dist/types/components/ui/button.d.ts +10 -0
- package/dist/types/components/ui/collapsible.d.ts +5 -0
- package/dist/types/components/ui/dialog.d.ts +13 -0
- package/dist/types/components/ui/dropdown-menu.d.ts +10 -0
- package/dist/types/components/ui/empty.d.ts +8 -0
- package/dist/types/components/ui/index.d.ts +12 -0
- package/dist/types/components/ui/input.d.ts +3 -0
- package/dist/types/components/ui/separator.d.ts +4 -0
- package/dist/types/components/ui/sheet.d.ts +14 -0
- package/dist/types/components/ui/sidebar.d.ts +69 -0
- package/dist/types/components/ui/skeleton.d.ts +2 -0
- package/dist/types/components/ui/tooltip.d.ts +7 -0
- package/dist/types/framework/ZangoApp.d.ts +19 -0
- package/dist/types/framework/components/CachedLogo.d.ts +9 -0
- package/dist/types/framework/components/CustomPageFallback.d.ts +13 -0
- package/dist/types/framework/components/CustomPageLoader.d.ts +10 -0
- package/dist/types/framework/components/DocumentHead.d.ts +5 -0
- package/dist/types/framework/components/RouteErrorBoundary.d.ts +16 -0
- package/dist/types/framework/components/SessionSecurityDialog.d.ts +10 -0
- package/dist/types/framework/components/SessionSecurityProvider.d.ts +8 -0
- package/dist/types/framework/components/SmartLink.d.ts +13 -0
- package/dist/types/framework/components/layout/AppSidebar.d.ts +36 -0
- package/dist/types/framework/components/layout/Breadcrumbs.d.ts +2 -0
- package/dist/types/framework/components/layout/CommandPalette.d.ts +2 -0
- package/dist/types/framework/components/layout/Layout.d.ts +2 -0
- package/dist/types/framework/components/layout/Navbar.d.ts +9 -0
- package/dist/types/framework/components/layout/NavbarIcon.d.ts +12 -0
- package/dist/types/framework/components/layout/Topbar.d.ts +50 -0
- package/dist/types/framework/components/layout/UserProfileDrawer.d.ts +7 -0
- package/dist/types/framework/components/layout/profile/PasswordCard.d.ts +18 -0
- package/dist/types/framework/components/layout/profile/PersonalInfoCard.d.ts +12 -0
- package/dist/types/framework/components/layout/profile/ProfileRail.d.ts +23 -0
- package/dist/types/framework/components/layout/profile/SessionsCard.d.ts +8 -0
- package/dist/types/framework/components/layout/profile/TokensCard.d.ts +11 -0
- package/dist/types/framework/components/layout/profile/TwoFactorCard.d.ts +7 -0
- package/dist/types/framework/config/defaultLayoutConfig.d.ts +34 -0
- package/dist/types/framework/constants/routes.d.ts +5 -0
- package/dist/types/framework/contexts/AppContext.d.ts +57 -0
- package/dist/types/framework/contexts/AuthConfigContext.d.ts +22 -0
- package/dist/types/framework/hooks/useProfileData.d.ts +73 -0
- package/dist/types/framework/hooks/useRoutes.d.ts +10 -0
- package/dist/types/framework/hooks/useSessionSecurity.d.ts +17 -0
- package/dist/types/framework/hooks/useSmartNavigation.d.ts +15 -0
- package/dist/types/framework/index.d.ts +35 -0
- package/dist/types/framework/pages/ConfigurePage.d.ts +2 -0
- package/dist/types/framework/pages/CrudPage.d.ts +6 -0
- package/dist/types/framework/pages/LoginPage.d.ts +5 -0
- package/dist/types/framework/pages/LogoutPage.d.ts +2 -0
- package/dist/types/framework/pages/NotFoundPage.d.ts +6 -0
- package/dist/types/framework/pages/TrainingPage.d.ts +6 -0
- package/dist/types/framework/routing/PageTypeRegistry.d.ts +43 -0
- package/dist/types/framework/routing/PageTypeRouter.d.ts +12 -0
- package/dist/types/framework/routing/dynamicPageRegistry.d.ts +41 -0
- package/dist/types/framework/routing/getRenderComponent.d.ts +6 -0
- package/dist/types/framework/types/layout.types.d.ts +107 -0
- package/dist/types/framework/utils/apiConfig.d.ts +41 -0
- package/dist/types/framework/utils/apiInterceptor.d.ts +12 -0
- package/dist/types/framework/utils/apiUrlUtils.d.ts +9 -0
- package/dist/types/framework/utils/authThemeUtils.d.ts +64 -0
- package/dist/types/framework/utils/colorUtils.d.ts +53 -0
- package/dist/types/framework/utils/cookieUtils.d.ts +20 -0
- package/dist/types/framework/utils/csrf.d.ts +27 -0
- package/dist/types/framework/utils/logoCache.d.ts +21 -0
- package/dist/types/framework/utils/logoutUtils.d.ts +15 -0
- package/dist/types/framework/utils/redirectUtils.d.ts +48 -0
- package/dist/types/framework/utils/safeRedirect.d.ts +21 -0
- package/dist/types/framework/utils/storageKeys.d.ts +44 -0
- package/dist/types/framework/utils/storageSanitizer.d.ts +20 -0
- package/dist/types/hooks/index.d.ts +2 -0
- package/dist/types/hooks/queries/index.d.ts +4 -0
- package/dist/types/hooks/queries/useAppInitQuery.d.ts +1 -0
- package/dist/types/hooks/queries/useAuthConfigQuery.d.ts +1 -0
- package/dist/types/hooks/queries/useProfileQuery.d.ts +8 -0
- package/dist/types/hooks/useBreakpoint.d.ts +2 -0
- package/dist/types/hooks/useMobile.d.ts +1 -0
- package/dist/types/index.d.ts +0 -0
- package/dist/types/index.framework.d.ts +39 -0
- package/dist/types/index.zango.d.ts +12 -0
- package/dist/types/lib/index.d.ts +1 -0
- package/dist/types/lib/utils.d.ts +2 -0
- package/dist/types/schemas/appInit.schema.d.ts +61 -0
- package/dist/types/schemas/index.d.ts +10 -0
- package/dist/types/schemas/profile.schema.d.ts +18 -0
- package/dist/types/schemas/route.schema.d.ts +9 -0
- package/dist/types/schemas/session.schema.d.ts +8 -0
- package/dist/types/schemas/theme.schema.d.ts +27 -0
- package/dist/types/services/api/index.d.ts +2 -0
- package/dist/types/services/api.d.ts +109 -0
- package/dist/types/services/index.d.ts +7 -0
- package/dist/types/services/legacyAdapter.d.ts +10 -0
- package/dist/types/services/logger.d.ts +32 -0
- package/dist/types/services/normalizeResponse.d.ts +29 -0
- package/dist/types/types/auth.d.ts +103 -0
- package/dist/types/types/common.d.ts +343 -0
- package/dist/types/types/index.d.ts +278 -0
- package/dist/zango-appbuilder.js +99 -0
- package/dist/zango-appbuilder.js.map +1 -0
- package/dist/zango-appbuilder.umd.cjs +247 -0
- package/dist/zango-appbuilder.umd.cjs.map +1 -0
- package/package.json +140 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { jsx as e, jsxs as t } from "react/jsx-runtime";
|
|
2
|
+
import { Button as r } from "@zango-core/components";
|
|
3
|
+
import { u as o, R as l } from "./index.framework-B8SMzgN1.js";
|
|
4
|
+
const a = () => {
|
|
5
|
+
const { initializerEndpoint: i } = o();
|
|
6
|
+
return /* @__PURE__ */ e("div", { className: "flex flex-col items-center justify-center h-screen text-center p-6 bg-muted", children: /* @__PURE__ */ t("div", { className: "bg-white rounded-xl p-6 sm:p-12 shadow-md max-w-2xl w-full", children: [
|
|
7
|
+
/* @__PURE__ */ e("h1", { className: "text-[40px] m-0 text-destructive font-bold leading-none", children: "⚙️" }),
|
|
8
|
+
/* @__PURE__ */ e("h2", { className: "text-2xl my-4 text-foreground font-semibold", children: "Configuration Error" }),
|
|
9
|
+
/* @__PURE__ */ e("p", { className: "text-base text-muted-foreground mb-6 leading-relaxed", children: "The application is trying to fetch configuration from:" }),
|
|
10
|
+
/* @__PURE__ */ e("div", { className: "overflow-x-auto mb-6", children: /* @__PURE__ */ e("code", { className: "block bg-muted/50 border border-border rounded-md p-3 text-sm text-foreground font-mono break-all", children: i }) }),
|
|
11
|
+
/* @__PURE__ */ t("div", { className: "text-left mb-8 p-4 bg-muted/50 rounded-lg", children: [
|
|
12
|
+
/* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground mb-3 font-semibold", children: "The response is either missing or invalid. Please check:" }),
|
|
13
|
+
/* @__PURE__ */ t("ul", { className: "text-sm text-muted-foreground pl-5 m-0 list-disc space-y-2 pl-4", children: [
|
|
14
|
+
/* @__PURE__ */ e("li", { children: "Appbuilder package routes are configured correctly" }),
|
|
15
|
+
/* @__PURE__ */ e("li", { children: "Required policies are properly mapped" }),
|
|
16
|
+
/* @__PURE__ */ e("li", { children: "The endpoint is accessible and returns valid data" })
|
|
17
|
+
] })
|
|
18
|
+
] }),
|
|
19
|
+
/* @__PURE__ */ t("div", { className: "flex flex-col sm:flex-row gap-3 justify-center", children: [
|
|
20
|
+
/* @__PURE__ */ e(r, { type: "primary", onClick: () => window.location.reload(), children: "Retry" }),
|
|
21
|
+
/* @__PURE__ */ e(r, { onClick: () => window.location.href = l.APP, children: "Go Home" })
|
|
22
|
+
] }),
|
|
23
|
+
/* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground mt-6", children: "Contact your administrator if this issue persists." })
|
|
24
|
+
] }) });
|
|
25
|
+
};
|
|
26
|
+
export {
|
|
27
|
+
a as ConfigurePage
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=ConfigurePage-DRzSb06z.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConfigurePage-DRzSb06z.js","sources":["../src/framework/pages/ConfigurePage.tsx"],"sourcesContent":["import { Button } from '@zango-core/components';\nimport type React from 'react';\nimport { ROUTES } from '../constants/routes';\nimport { useAppContext } from '../contexts/AppContext';\n\nexport const ConfigurePage: React.FC = () => {\n const { initializerEndpoint } = useAppContext();\n\n return (\n <div className=\"flex flex-col items-center justify-center h-screen text-center p-6 bg-muted\">\n <div className=\"bg-white rounded-xl p-6 sm:p-12 shadow-md max-w-2xl w-full\">\n <h1 className=\"text-[40px] m-0 text-destructive font-bold leading-none\">⚙️</h1>\n <h2 className=\"text-2xl my-4 text-foreground font-semibold\">Configuration Error</h2>\n <p className=\"text-base text-muted-foreground mb-6 leading-relaxed\">\n The application is trying to fetch configuration from:\n </p>\n <div className=\"overflow-x-auto mb-6\">\n <code className=\"block bg-muted/50 border border-border rounded-md p-3 text-sm text-foreground font-mono break-all\">\n {initializerEndpoint}\n </code>\n </div>\n <div className=\"text-left mb-8 p-4 bg-muted/50 rounded-lg\">\n <p className=\"text-sm text-muted-foreground mb-3 font-semibold\">\n The response is either missing or invalid. Please check:\n </p>\n <ul className=\"text-sm text-muted-foreground pl-5 m-0 list-disc space-y-2 pl-4\">\n <li>Appbuilder package routes are configured correctly</li>\n <li>Required policies are properly mapped</li>\n <li>The endpoint is accessible and returns valid data</li>\n </ul>\n </div>\n <div className=\"flex flex-col sm:flex-row gap-3 justify-center\">\n <Button type=\"primary\" onClick={() => window.location.reload()}>\n Retry\n </Button>\n <Button onClick={() => (window.location.href = ROUTES.APP)}>Go Home</Button>\n </div>\n <p className=\"text-xs text-muted-foreground mt-6\">Contact your administrator if this issue persists.</p>\n </div>\n </div>\n );\n};\n"],"names":["ConfigurePage","initializerEndpoint","useAppContext","jsxs","jsx","Button","ROUTES"],"mappings":";;;AAKO,MAAMA,IAA0B,MAAM;AAC3C,QAAM,EAAE,qBAAAC,EAAA,IAAwBC,EAAA;AAEhC,2BACG,OAAA,EAAI,WAAU,+EACb,UAAA,gBAAAC,EAAC,OAAA,EAAI,WAAU,8DACb,UAAA;AAAA,IAAA,gBAAAC,EAAC,MAAA,EAAG,WAAU,2DAA0D,UAAA,MAAE;AAAA,IAC1E,gBAAAA,EAAC,MAAA,EAAG,WAAU,+CAA8C,UAAA,uBAAmB;AAAA,IAC/E,gBAAAA,EAAC,KAAA,EAAE,WAAU,wDAAuD,UAAA,0DAEpE;AAAA,IACA,gBAAAA,EAAC,SAAI,WAAU,wBACb,4BAAC,QAAA,EAAK,WAAU,qGACb,UAAAH,EAAA,CACH,EAAA,CACF;AAAA,IACA,gBAAAE,EAAC,OAAA,EAAI,WAAU,6CACb,UAAA;AAAA,MAAA,gBAAAC,EAAC,KAAA,EAAE,WAAU,oDAAmD,UAAA,4DAEhE;AAAA,MACA,gBAAAD,EAAC,MAAA,EAAG,WAAU,mEACZ,UAAA;AAAA,QAAA,gBAAAC,EAAC,QAAG,UAAA,qDAAA,CAAkD;AAAA,QACtD,gBAAAA,EAAC,QAAG,UAAA,wCAAA,CAAqC;AAAA,QACzC,gBAAAA,EAAC,QAAG,UAAA,oDAAA,CAAiD;AAAA,MAAA,EAAA,CACvD;AAAA,IAAA,GACF;AAAA,IACA,gBAAAD,EAAC,OAAA,EAAI,WAAU,kDACb,UAAA;AAAA,MAAA,gBAAAC,EAACC,GAAA,EAAO,MAAK,WAAU,SAAS,MAAM,OAAO,SAAS,OAAA,GAAU,UAAA,QAAA,CAEhE;AAAA,MACA,gBAAAD,EAACC,KAAO,SAAS,MAAO,OAAO,SAAS,OAAOC,EAAO,KAAM,UAAA,UAAA,CAAO;AAAA,IAAA,GACrE;AAAA,IACA,gBAAAF,EAAC,KAAA,EAAE,WAAU,sCAAqC,UAAA,qDAAA,CAAkD;AAAA,EAAA,EAAA,CACtG,EAAA,CACF;AAEJ;"}
|