@admin-layout/client 7.0.1-alpha.0 → 7.0.1-alpha.17
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/lib/graphql/link/error-link.d.ts.map +1 -1
- package/lib/graphql/link/error-link.js +17 -14
- package/lib/graphql/link/error-link.js.map +1 -1
- package/lib/index.js +1 -1
- package/lib/index.native.js +1 -1
- package/lib/utils/index.d.ts +1 -0
- package/lib/utils/index.d.ts.map +1 -1
- package/lib/utils/parentRoute.d.ts +2 -0
- package/lib/utils/parentRoute.d.ts.map +1 -0
- package/lib/utils/parentRoute.js +21 -0
- package/lib/utils/parentRoute.js.map +1 -0
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error-link.d.ts","sourceRoot":"","sources":["../../../src/graphql/link/error-link.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAe,MAAM,yBAAyB,CAAC;AAClE,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAKvC,KAAK,aAAa,GAAG,CAAC,SAAS,EAAE,UAAU,CAAC,SAAS,KAAK,UAAU,
|
|
1
|
+
{"version":3,"file":"error-link.d.ts","sourceRoot":"","sources":["../../../src/graphql/link/error-link.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAe,MAAM,yBAAyB,CAAC;AAClE,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAKvC,KAAK,aAAa,GAAG,CAAC,SAAS,EAAE,UAAU,CAAC,SAAS,KAAK,UAAU,CAAC;AACrE,UAAU,UAAU;IAChB,YAAY,EAAE,aAAa,CAAC;CAC/B;AAED,qBAAa,SAAU,YAAW,UAAU;IACxC,OAAO,EAAE,MAAM,CAAC;IAEhB,mBAAmB,CAAC,SAAS,EAAE,UAAU,CAAC,SAAS,EAAE,KAAK,KAAA;IAoB1D,YAAY,CAAC,SAAS,EAAE,UAAU,CAAC,SAAS;CAoB/C;AAED,eAAO,MAAM,cAAc,cAAe,WAAW,SAAS,eAE7D,CAAC"}
|
|
@@ -1,23 +1,26 @@
|
|
|
1
1
|
import {onError}from'@apollo/client/link/error/index.js';import {LOG_APPLICATION_ERROR,BACKEND_ERROR}from'../../constants/error.js';import {serializeError}from'serialize-error';class ErrorLink {
|
|
2
|
+
idToken;
|
|
2
3
|
dispatchErrorAction(container, error) {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
if (!action?.type) {
|
|
9
|
-
action = {
|
|
10
|
-
type: LOG_APPLICATION_ERROR,
|
|
11
|
-
payload: {
|
|
12
|
-
type: BACKEND_ERROR,
|
|
13
|
-
payload: serializeError(error)
|
|
14
|
-
}
|
|
4
|
+
if (container.isBound('ReduxStore')) {
|
|
5
|
+
const reduxStore = container.get('ReduxStore');
|
|
6
|
+
let action = {
|
|
7
|
+
type: error?.extensions?.actionName,
|
|
8
|
+
payload: error?.extensions?.payload,
|
|
15
9
|
};
|
|
10
|
+
if (!action?.type) {
|
|
11
|
+
action = {
|
|
12
|
+
type: LOG_APPLICATION_ERROR,
|
|
13
|
+
payload: {
|
|
14
|
+
type: BACKEND_ERROR,
|
|
15
|
+
payload: serializeError(error),
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
reduxStore.dispatch(action);
|
|
16
20
|
}
|
|
17
|
-
reduxStore.dispatch(action);
|
|
18
21
|
}
|
|
19
22
|
getErrorLink(container) {
|
|
20
|
-
return onError(err => {
|
|
23
|
+
return onError((err) => {
|
|
21
24
|
const { networkError, graphQLErrors } = err;
|
|
22
25
|
if (graphQLErrors?.length) {
|
|
23
26
|
graphQLErrors.forEach((error) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error-link.js","sources":["../../../src/graphql/link/error-link.ts"],"sourcesContent":[null],"names":[],"mappings":"iLAQA,MAAoB,SAAA,CAAA;
|
|
1
|
+
{"version":3,"file":"error-link.js","sources":["../../../src/graphql/link/error-link.ts"],"sourcesContent":[null],"names":[],"mappings":"iLAQA,MAAoB,SAAA,CAAA;IAChB,OAAY,CAAA;AACf,IAAA,mBAAA,CAAA,SAAA,EAAA,KAAA,EAAA;AAED,QAAa,IAAA,SAAA,CAAA,OAAA,CAAU,YAAW,CAAU,EAAA;YACjC,gBAAS,GAAA,SAAA,CAAA,GAAA,CAAA,YAAA,CAAA,CAAA;YAEG,IAAA,MAAA;AAoBnB,gBAAY,IAAC,EAAA,KAAW,EAAA,UAAW,EAAS,UAAA;AAoB/C,gBAAA,OAAA,EAAA,KAAA,EAAA,UAAA,EAAA,OAAA;AAED,aAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{APPLICATION_ERROR_SLOT_FILL,CHANGE_LANGUAGE,CHANGE_SETTINGS_ACTION}from'./constants/constants.js';export{BACKEND_ERROR,CLEAR_APPLICATION_ERRORS,DISMISS_APPLICATION_ERROR,LOG_APPLICATION_ERROR,RESTORE_APPLICATION_ERRORS}from'./constants/error.js';export{dismissApplicationError,restoreApplicationError,setApplicationError}from'./redux/actions/error-actions.js';export{settingsReducer}from'./redux/settings.js';export{applicationErrors,initialErrorsState}from'./redux/reducers/error.js';export{getMenuSeparation}from'./utils/seperatedMenus.js';export{useComponentSize,useIsomorphicLayoutEffect}from'./utils/componentSize.js';export{ApplicationErrorHandlerCommon}from'./components/ApplicationErrorHandlerCommon.js';export{ErrorBoundaryCommon}from'./components/ErrorBoundaryCommon.js';export{ApplicationErrorFillWrapper}from'./components/ApplicationErrorFillWrapper.js';export{ErrorLink,errorReduxLink}from'./graphql/link/error-link.js';export{systemFont}from'./themes/systemFont/index.js';export{borderRadius,colors,lightLayoutTheme,lightNavigationBarTheme,lightTabBarTheme,shadows,sizes,spacings,textVariants}from'./themes/templates/lightLayoutTheme.js';export{createLayoutTheme}from'./themes/templates/createLayoutTheme.js';export{darkColors,darkLayoutTheme,darkNavigationBarTheme,darkTabBarTheme}from'./themes/templates/darkLayoutTheme.js';//# sourceMappingURL=index.js.map
|
|
1
|
+
export{APPLICATION_ERROR_SLOT_FILL,CHANGE_LANGUAGE,CHANGE_SETTINGS_ACTION}from'./constants/constants.js';export{BACKEND_ERROR,CLEAR_APPLICATION_ERRORS,DISMISS_APPLICATION_ERROR,LOG_APPLICATION_ERROR,RESTORE_APPLICATION_ERRORS}from'./constants/error.js';export{dismissApplicationError,restoreApplicationError,setApplicationError}from'./redux/actions/error-actions.js';export{settingsReducer}from'./redux/settings.js';export{applicationErrors,initialErrorsState}from'./redux/reducers/error.js';export{getMenuSeparation}from'./utils/seperatedMenus.js';export{useComponentSize,useIsomorphicLayoutEffect}from'./utils/componentSize.js';export{matchParentRoute}from'./utils/parentRoute.js';export{ApplicationErrorHandlerCommon}from'./components/ApplicationErrorHandlerCommon.js';export{ErrorBoundaryCommon}from'./components/ErrorBoundaryCommon.js';export{ApplicationErrorFillWrapper}from'./components/ApplicationErrorFillWrapper.js';export{ErrorLink,errorReduxLink}from'./graphql/link/error-link.js';export{systemFont}from'./themes/systemFont/index.js';export{borderRadius,colors,lightLayoutTheme,lightNavigationBarTheme,lightTabBarTheme,shadows,sizes,spacings,textVariants}from'./themes/templates/lightLayoutTheme.js';export{createLayoutTheme}from'./themes/templates/createLayoutTheme.js';export{darkColors,darkLayoutTheme,darkNavigationBarTheme,darkTabBarTheme}from'./themes/templates/darkLayoutTheme.js';//# sourceMappingURL=index.js.map
|
package/lib/index.native.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{APPLICATION_ERROR_SLOT_FILL,CHANGE_LANGUAGE,CHANGE_SETTINGS_ACTION}from'./constants/constants.js';export{BACKEND_ERROR,CLEAR_APPLICATION_ERRORS,DISMISS_APPLICATION_ERROR,LOG_APPLICATION_ERROR,RESTORE_APPLICATION_ERRORS}from'./constants/error.js';export{dismissApplicationError,restoreApplicationError,setApplicationError}from'./redux/actions/error-actions.js';export{settingsReducer}from'./redux/settings.js';export{applicationErrors,initialErrorsState}from'./redux/reducers/error.js';export{getMenuSeparation}from'./utils/seperatedMenus.js';export{useComponentSize,useIsomorphicLayoutEffect}from'./utils/componentSize.js';export{ApplicationErrorHandlerCommon}from'./components/ApplicationErrorHandlerCommon.js';export{ErrorBoundaryCommon}from'./components/ErrorBoundaryCommon.js';export{ApplicationErrorFillWrapper}from'./components/ApplicationErrorFillWrapper.js';export{ErrorLink,errorReduxLink}from'./graphql/link/error-link.js';export{systemFont}from'./themes/systemFont/index.js';export{borderRadius,colors,lightLayoutTheme,lightNavigationBarTheme,lightTabBarTheme,shadows,sizes,spacings,textVariants}from'./themes/templates/lightLayoutTheme.js';export{createLayoutTheme}from'./themes/templates/createLayoutTheme.js';export{darkColors,darkLayoutTheme,darkNavigationBarTheme,darkTabBarTheme}from'./themes/templates/darkLayoutTheme.js';//# sourceMappingURL=index.native.js.map
|
|
1
|
+
export{APPLICATION_ERROR_SLOT_FILL,CHANGE_LANGUAGE,CHANGE_SETTINGS_ACTION}from'./constants/constants.js';export{BACKEND_ERROR,CLEAR_APPLICATION_ERRORS,DISMISS_APPLICATION_ERROR,LOG_APPLICATION_ERROR,RESTORE_APPLICATION_ERRORS}from'./constants/error.js';export{dismissApplicationError,restoreApplicationError,setApplicationError}from'./redux/actions/error-actions.js';export{settingsReducer}from'./redux/settings.js';export{applicationErrors,initialErrorsState}from'./redux/reducers/error.js';export{getMenuSeparation}from'./utils/seperatedMenus.js';export{useComponentSize,useIsomorphicLayoutEffect}from'./utils/componentSize.js';export{matchParentRoute}from'./utils/parentRoute.js';export{ApplicationErrorHandlerCommon}from'./components/ApplicationErrorHandlerCommon.js';export{ErrorBoundaryCommon}from'./components/ErrorBoundaryCommon.js';export{ApplicationErrorFillWrapper}from'./components/ApplicationErrorFillWrapper.js';export{ErrorLink,errorReduxLink}from'./graphql/link/error-link.js';export{systemFont}from'./themes/systemFont/index.js';export{borderRadius,colors,lightLayoutTheme,lightNavigationBarTheme,lightTabBarTheme,shadows,sizes,spacings,textVariants}from'./themes/templates/lightLayoutTheme.js';export{createLayoutTheme}from'./themes/templates/createLayoutTheme.js';export{darkColors,darkLayoutTheme,darkNavigationBarTheme,darkTabBarTheme}from'./themes/templates/darkLayoutTheme.js';//# sourceMappingURL=index.native.js.map
|
package/lib/utils/index.d.ts
CHANGED
package/lib/utils/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parentRoute.d.ts","sourceRoot":"","sources":["../../src/utils/parentRoute.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,4CAqB5B,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
const matchParentRoute = function (allRoutes, selectedPath) {
|
|
2
|
+
// Helper function to recursively search for the route
|
|
3
|
+
const findRoute = (routes, path) => {
|
|
4
|
+
for (const route of routes) {
|
|
5
|
+
// Check if the current route's path matches the selected path
|
|
6
|
+
if (route.path === path) {
|
|
7
|
+
return route;
|
|
8
|
+
}
|
|
9
|
+
// If the current route has nested routes, search within them recursively
|
|
10
|
+
if (route.routes) {
|
|
11
|
+
const found = findRoute(route.routes, path);
|
|
12
|
+
if (found) {
|
|
13
|
+
return found;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
return null; // Return null if no matching route is found
|
|
18
|
+
};
|
|
19
|
+
// Start the recursive search from the top-level routes
|
|
20
|
+
return findRoute(allRoutes, selectedPath);
|
|
21
|
+
};export{matchParentRoute};//# sourceMappingURL=parentRoute.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parentRoute.js","sources":["../../src/utils/parentRoute.ts"],"sourcesContent":[null],"names":[],"mappings":"AAAO,MAAA,gBAAsB,GAAA,UAAA,SAAA,EAAA,YAAA,EAAA;;;;;;;;;;;;;;;;;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@admin-layout/client",
|
|
3
|
-
"version": "7.0.1-alpha.
|
|
3
|
+
"version": "7.0.1-alpha.17",
|
|
4
4
|
"description": "Sample client for higher packages to depend on",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"author": "CDMBase LLC",
|
|
@@ -36,5 +36,5 @@
|
|
|
36
36
|
"typescript": {
|
|
37
37
|
"definition": "lib/index.d.ts"
|
|
38
38
|
},
|
|
39
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "ddc66ac3c72ae24ff732b821450d4957a2348ec9"
|
|
40
40
|
}
|