@admin-layout/client 7.0.1-alpha.3 → 7.0.2-alpha.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.
@@ -2,7 +2,7 @@ const white = {
2
2
  base100: '#FFF',
3
3
  base200: '#999',
4
4
  base300: '#C3C3C3',
5
- base400: '#F7F7F7', // #F2F2F2
5
+ base400: '#F7F7F7',
6
6
  base: '#FFF',
7
7
  base600: '#000',
8
8
  base700: '#FFF',
@@ -1,8 +1,8 @@
1
1
  const defaultSettings = {
2
2
  logo: 'https://cdmbase.s3.ca-central-1.amazonaws.com/favicon-new-128.svg',
3
- navTheme: 'light', // 'dark'
4
- primaryColor: '#1890ff', // '#1890ff'
5
- colorPrimary: '#1677FF', // '#1890ff'
3
+ navTheme: 'light',
4
+ primaryColor: '#1890ff',
5
+ colorPrimary: '#1677FF',
6
6
  layout: 'mix',
7
7
  contentWidth: 'Fluid',
8
8
  fixedHeader: true,
@@ -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,24 +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
2
  idToken;
3
3
  dispatchErrorAction(container, error) {
4
- const reduxStore = container.get('ReduxStore');
5
- let action = {
6
- type: error?.extensions?.actionName,
7
- payload: error?.extensions?.payload
8
- };
9
- if (!action?.type) {
10
- action = {
11
- type: LOG_APPLICATION_ERROR,
12
- payload: {
13
- type: BACKEND_ERROR,
14
- payload: serializeError(error)
15
- }
4
+ if (container.isBound('ReduxStore')) {
5
+ const reduxStore = container.get('ReduxStore');
6
+ let action = {
7
+ type: error?.extensions?.actionName,
8
+ payload: error?.extensions?.payload,
16
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);
17
20
  }
18
- reduxStore.dispatch(action);
19
21
  }
20
22
  getErrorLink(container) {
21
- return onError(err => {
23
+ return onError((err) => {
22
24
  const { networkError, graphQLErrors } = err;
23
25
  if (graphQLErrors?.length) {
24
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,OAAY,CAAA;AACb,IAAA,mBAAA,CAAA,SAAA,EAAA,KAAA,EAAA;AAED,QAAa,MAAA,UAAA,GAAA,0BAA+B,CAAA,CAAA;QACnC,IAAA,SAAQ;YAEI,IAAA,EAAA,KAAA,YAAY,EAAA,UAAoB;AAkBnD,YAAA,OAAa,EAAA,KAAS,EAAE,UAAU,EAAU,OAAA;AAoB7C,SAAA,CAAA;AAGD,QAAA,IAAA,CAAA,QAAa,IAAc,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../src/redux/settings.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAmBhD,QAAA,MAAM,eAAe,8CAEO;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,eAAe,CAAA;CAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyBrE,CAAC;AAEF,OAAO,EAAE,eAAe,EAAE,CAAC"}
1
+ {"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../src/redux/settings.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAmBhD,QAAA,MAAM,eAAe;UAEe,MAAM;aAAW,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyBnE,CAAC;AAEF,OAAO,EAAE,eAAe,EAAE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"parentRoute.d.ts","sourceRoot":"","sources":["../../src/utils/parentRoute.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,4CAE5B,CAAC"}
1
+ {"version":3,"file":"parentRoute.d.ts","sourceRoot":"","sources":["../../src/utils/parentRoute.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,4CAqB5B,CAAC"}
@@ -1,3 +1,21 @@
1
1
  const matchParentRoute = function (allRoutes, selectedPath) {
2
- return allRoutes?.find(obj => obj.path === 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);
3
21
  };export{matchParentRoute};//# sourceMappingURL=parentRoute.js.map
@@ -1 +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;;"}
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",
3
+ "version": "7.0.2-alpha.0",
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": "aaa7ef6ca4d3488b846fb620af9422f766f5d6eb"
39
+ "gitHead": "ee54ddb53f43010605863e32ab8644de4b597e4d"
40
40
  }