@admin-layout/client 7.0.1-alpha.1 → 7.0.1-alpha.24

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.
@@ -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,CAAA;AACpE,UAAU,UAAU;IAClB,YAAY,EAAE,aAAa,CAAA;CAC5B;AAED,qBAAa,SAAU,YAAW,UAAU;IAC1C,OAAO,EAAE,MAAM,CAAA;IAEf,mBAAmB,CAAC,SAAS,EAAE,UAAU,CAAC,SAAS,EAAE,KAAK,KAAA;IAkB1D,YAAY,CAAC,SAAS,EAAE,UAAU,CAAC,SAAS;CAoB7C;AAGD,eAAO,MAAM,cAAc,cAAe,WAAW,SAAS,eAE7D,CAAA"}
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
- const reduxStore = container.get('ReduxStore');
4
- let action = {
5
- type: error?.extensions?.actionName,
6
- payload: error?.extensions?.payload
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;IAClB,6BAA2B,EAAA,KAAA,EAAA;AAC5B,QAAA,MAAA,UAAA,GAAA,SAAA,CAAA,GAAA,CAAA,YAAA,CAAA,CAAA;AAED,QAAa,IAAA,MAAA,GAAA;YACJ,WAAQ,EAAA,UAAA,EAAA,UAAA;YAEI,OAAA,EAAA,iBAAY,EAAA,OAAoB;AAkBnD,SAAA,CAAA;AAoBD,QAAA,IAAA,CAAA,MAAA,EAAA,IAAA,EAAA;AAGD,YAAA,SAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
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
@@ -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
@@ -1,3 +1,4 @@
1
1
  export * from './seperatedMenus';
2
2
  export * from './componentSize';
3
+ export * from './parentRoute';
3
4
  //# sourceMappingURL=index.d.ts.map
@@ -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,2 @@
1
+ export declare const matchParentRoute: (allRoutes: any, selectedPath: any) => any;
2
+ //# sourceMappingURL=parentRoute.d.ts.map
@@ -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.1",
3
+ "version": "7.0.1-alpha.24",
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": "c23d47a980f5e1d646ec8f0df5b21bf786da31de"
39
+ "gitHead": "6d4497cdb7041ac1768dba69cf364ed0bfa50b3a"
40
40
  }