@admin-layout/client 9.0.2-alpha.0 → 9.0.4-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,5 +2,6 @@ export declare const languages: {
2
2
  key: string;
3
3
  label: string;
4
4
  flag: string;
5
+ global: boolean;
5
6
  }[];
6
7
  //# sourceMappingURL=languages.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"languages.d.ts","sourceRoot":"","sources":["../../src/constants/languages.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS;;;;GAoDrB,CAAC"}
1
+ {"version":3,"file":"languages.d.ts","sourceRoot":"","sources":["../../src/constants/languages.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS;;;;;GAoDrB,CAAC"}
@@ -1,53 +1,53 @@
1
1
  const languages = [
2
- { key: 'en', label: 'English', flag: '🇬🇧' },
3
- { key: 'de', label: 'German', flag: '🇩🇪' },
4
- { key: 'es', label: 'Spanish', flag: '🇪🇸' },
5
- { key: 'fr', label: 'French', flag: '🇫🇷' },
6
- { key: 'it', label: 'Italian', flag: '🇮🇹' },
7
- { key: 'pt', label: 'Portuguese', flag: '🇵🇹' },
8
- { key: 'ru', label: 'Russian', flag: '🇷🇺' },
9
- { key: 'zh', label: 'Chinese', flag: '🇨🇳' },
10
- { key: 'ja', label: 'Japanese', flag: '🇯🇵' },
11
- { key: 'ko', label: 'Korean', flag: '🇰🇷' },
12
- { key: 'ar', label: 'Arabic', flag: '🇸🇦' },
13
- { key: 'hi', label: 'Hindi', flag: '🇮🇳' },
14
- { key: 'bn', label: 'Bengali', flag: '🇧🇩' },
15
- { key: 'ur', label: 'Urdu', flag: '🇵🇰' },
16
- { key: 'tr', label: 'Turkish', flag: '🇹🇷' },
17
- { key: 'vi', label: 'Vietnamese', flag: '🇻🇳' },
18
- { key: 'th', label: 'Thai', flag: '🇹🇭' },
19
- { key: 'ms', label: 'Malay', flag: '🇲🇾' },
20
- { key: 'id', label: 'Indonesian', flag: '🇮🇩' },
21
- { key: 'nl', label: 'Dutch', flag: '🇳🇱' },
22
- { key: 'sv', label: 'Swedish', flag: '🇸🇪' },
23
- { key: 'pl', label: 'Polish', flag: '🇵🇱' },
24
- { key: 'ro', label: 'Romanian', flag: '🇷🇴' },
25
- { key: 'el', label: 'Greek', flag: '🇬🇷' },
26
- { key: 'he', label: 'Hebrew', flag: '🇮🇱' },
27
- { key: 'fi', label: 'Finnish', flag: '🇫🇮' },
28
- { key: 'da', label: 'Danish', flag: '🇩🇰' },
29
- { key: 'no', label: 'Norwegian', flag: '🇳🇴' },
30
- { key: 'hu', label: 'Hungarian', flag: '🇭🇺' },
31
- { key: 'cs', label: 'Czech', flag: '🇨🇿' },
32
- { key: 'sk', label: 'Slovak', flag: '🇸🇰' },
33
- { key: 'bg', label: 'Bulgarian', flag: '🇧🇬' },
34
- { key: 'sr', label: 'Serbian', flag: '🇷🇸' },
35
- { key: 'hr', label: 'Croatian', flag: '🇭🇷' },
36
- { key: 'uk', label: 'Ukrainian', flag: '🇺🇦' },
37
- { key: 'ca', label: 'Catalan', flag: '🇪🇸' },
38
- { key: 'eu', label: 'Basque', flag: '🇪🇸' },
39
- { key: 'fa', label: 'Persian', flag: '🇮🇷' },
40
- { key: 'am', label: 'Amharic', flag: '🇪🇹' },
41
- { key: 'sw', label: 'Swahili', flag: '🇰🇪' },
42
- { key: 'zu', label: 'Zulu', flag: '🇿🇦' },
43
- { key: 'xh', label: 'Xhosa', flag: '🇿🇦' },
44
- { key: 'yo', label: 'Yoruba', flag: '🇳🇬' },
45
- { key: 'ig', label: 'Igbo', flag: '🇳🇬' },
46
- { key: 'so', label: 'Somali', flag: '🇸🇴' },
47
- { key: 'km', label: 'Khmer', flag: '🇰🇭' },
48
- { key: 'lo', label: 'Lao', flag: '🇱🇦' },
49
- { key: 'my', label: 'Burmese', flag: '🇲🇲' },
50
- { key: 'mn', label: 'Mongolian', flag: '🇲🇳' },
51
- { key: 'ka', label: 'Georgian', flag: '🇬🇪' },
52
- { key: 'hy', label: 'Armenian', flag: '🇦🇲' }
2
+ { key: 'en', label: 'English', flag: '🇬🇧', global: true },
3
+ { key: 'de', label: 'German', flag: '🇩🇪', global: false },
4
+ { key: 'es', label: 'Spanish', flag: '🇪🇸', global: true },
5
+ { key: 'fr', label: 'French', flag: '🇫🇷', global: false },
6
+ { key: 'it', label: 'Italian', flag: '🇮🇹', global: false },
7
+ { key: 'pt', label: 'Portuguese', flag: '🇵🇹', global: false },
8
+ { key: 'ru', label: 'Russian', flag: '🇷🇺', global: false },
9
+ { key: 'zh', label: 'Chinese', flag: '🇨🇳', global: false },
10
+ { key: 'ja', label: 'Japanese', flag: '🇯🇵', global: false },
11
+ { key: 'ko', label: 'Korean', flag: '🇰🇷', global: false },
12
+ { key: 'ar', label: 'Arabic', flag: '🇸🇦', global: true },
13
+ { key: 'hi', label: 'Hindi', flag: '🇮🇳', global: true },
14
+ { key: 'bn', label: 'Bengali', flag: '🇧🇩', global: false },
15
+ { key: 'ur', label: 'Urdu', flag: '🇵🇰', global: false },
16
+ { key: 'tr', label: 'Turkish', flag: '🇹🇷', global: false },
17
+ { key: 'vi', label: 'Vietnamese', flag: '🇻🇳', global: false },
18
+ { key: 'th', label: 'Thai', flag: '🇹🇭', global: false },
19
+ { key: 'ms', label: 'Malay', flag: '🇲🇾', global: false },
20
+ { key: 'id', label: 'Indonesian', flag: '🇮🇩', global: false },
21
+ { key: 'nl', label: 'Dutch', flag: '🇳🇱', global: false },
22
+ { key: 'sv', label: 'Swedish', flag: '🇸🇪', global: false },
23
+ { key: 'pl', label: 'Polish', flag: '🇵🇱', global: false },
24
+ { key: 'ro', label: 'Romanian', flag: '🇷🇴', global: false },
25
+ { key: 'el', label: 'Greek', flag: '🇬🇷', global: false },
26
+ { key: 'he', label: 'Hebrew', flag: '🇮🇱', global: false },
27
+ { key: 'fi', label: 'Finnish', flag: '🇫🇮', global: false },
28
+ { key: 'da', label: 'Danish', flag: '🇩🇰', global: false },
29
+ { key: 'no', label: 'Norwegian', flag: '🇳🇴', global: false },
30
+ { key: 'hu', label: 'Hungarian', flag: '🇭🇺', global: false },
31
+ { key: 'cs', label: 'Czech', flag: '🇨🇿', global: false },
32
+ { key: 'sk', label: 'Slovak', flag: '🇸🇰', global: false },
33
+ { key: 'bg', label: 'Bulgarian', flag: '🇧🇬', global: false },
34
+ { key: 'sr', label: 'Serbian', flag: '🇷🇸', global: false },
35
+ { key: 'hr', label: 'Croatian', flag: '🇭🇷', global: false },
36
+ { key: 'uk', label: 'Ukrainian', flag: '🇺🇦', global: false },
37
+ { key: 'ca', label: 'Catalan', flag: '🇪🇸', global: false },
38
+ { key: 'eu', label: 'Basque', flag: '🇪🇸', global: false },
39
+ { key: 'fa', label: 'Persian', flag: '🇮🇷', global: false },
40
+ { key: 'am', label: 'Amharic', flag: '🇪🇹', global: false },
41
+ { key: 'sw', label: 'Swahili', flag: '🇰🇪', global: false },
42
+ { key: 'zu', label: 'Zulu', flag: '🇿🇦', global: false },
43
+ { key: 'xh', label: 'Xhosa', flag: '🇿🇦', global: false },
44
+ { key: 'yo', label: 'Yoruba', flag: '🇳🇬', global: false },
45
+ { key: 'ig', label: 'Igbo', flag: '🇳🇬', global: false },
46
+ { key: 'so', label: 'Somali', flag: '🇸🇴', global: false },
47
+ { key: 'km', label: 'Khmer', flag: '🇰🇭', global: false },
48
+ { key: 'lo', label: 'Lao', flag: '🇱🇦', global: false },
49
+ { key: 'my', label: 'Burmese', flag: '🇲🇲', global: false },
50
+ { key: 'mn', label: 'Mongolian', flag: '🇲🇳', global: false },
51
+ { key: 'ka', label: 'Georgian', flag: '🇬🇪', global: false },
52
+ { key: 'hy', label: 'Armenian', flag: '🇦🇲', global: false },
53
53
  ];export{languages};//# sourceMappingURL=languages.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"languages.js","sources":["../../src/constants/languages.ts"],"sourcesContent":[null],"names":[],"mappings":"AAAA,MAAA,SAAsB,GAAA;;;;IAoDpB,EAAA,GAAA,EAAA,IAAA,EAAA,KAAA,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"languages.js","sources":["../../src/constants/languages.ts"],"sourcesContent":[null],"names":[],"mappings":"AAAA,MAAA,SAAsB,GAAA;;;;;IAoDpB,EAAA,GAAA,EAAA,IAAA,EAAA,KAAA,EAAA,SAAA,EAAA,IAAA,EAAA,MAAA,EAAA,MAAA,EAAA,KAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
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{HEADER_SEARCHBAR_FILL,HEADER_SEARCH_BUTTON_FILL,RIGHT_CONTENT_FILL,SCROLL_END_FILL}from'./constants/layout.js';export{languages}from'./constants/languages.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{addProLayoutParentKeys,filterRoutesWithLocale,menuDataRender,removeUnnecessaryProperties,setLocale,transformData}from'./utils/menuUtils.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{HEADER_SEARCHBAR_FILL,HEADER_SEARCH_BUTTON_FILL,RIGHT_CONTENT_FILL,SCROLL_END_FILL}from'./constants/layout.js';export{languages}from'./constants/languages.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{addProLayoutParentKeys,filterRoutesWithLocale,menuDataRender,removeUnnecessaryProperties,setLocale,transformData}from'./utils/menuUtils.js';export{getMatchMenuKeys}from'./utils/matchMenuKeys.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{HEADER_SEARCHBAR_FILL,HEADER_SEARCH_BUTTON_FILL,RIGHT_CONTENT_FILL,SCROLL_END_FILL}from'./constants/layout.js';export{languages}from'./constants/languages.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{addProLayoutParentKeys,filterRoutesWithLocale,menuDataRender,removeUnnecessaryProperties,setLocale,transformData}from'./utils/menuUtils.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{HEADER_SEARCHBAR_FILL,HEADER_SEARCH_BUTTON_FILL,RIGHT_CONTENT_FILL,SCROLL_END_FILL}from'./constants/layout.js';export{languages}from'./constants/languages.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{addProLayoutParentKeys,filterRoutesWithLocale,menuDataRender,removeUnnecessaryProperties,setLocale,transformData}from'./utils/menuUtils.js';export{getMatchMenuKeys}from'./utils/matchMenuKeys.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
@@ -2,4 +2,5 @@ export * from './seperatedMenus';
2
2
  export * from './componentSize';
3
3
  export * from './parentRoute';
4
4
  export * from './menuUtils';
5
+ export * from './matchMenuKeys';
5
6
  //# 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;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,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;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { MenuDataItem } from '../interfaces';
2
+ /**
3
+ * Custom getMatchMenuKeys function which generate the MatchMenuKeys
4
+ *
5
+ * Note: The matchMenuKeys function or method is commonly used within the context of the layout to
6
+ * determine which menu keys are selected or matched based on the current route.
7
+ * @param menuItems
8
+ * @param currentPath
9
+ */
10
+ export declare const getMatchMenuKeys: (menuItems: MenuDataItem[], currentPath: string) => string[];
11
+ //# sourceMappingURL=matchMenuKeys.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"matchMenuKeys.d.ts","sourceRoot":"","sources":["../../src/utils/matchMenuKeys.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE7C;;;;;;;GAOG;AAEH,eAAO,MAAM,gBAAgB,cAAe,YAAY,EAAE,eAAe,MAAM,KAAG,MAAM,EA2CvF,CAAC"}
@@ -0,0 +1,44 @@
1
+ /**
2
+ * Custom getMatchMenuKeys function which generate the MatchMenuKeys
3
+ *
4
+ * Note: The matchMenuKeys function or method is commonly used within the context of the layout to
5
+ * determine which menu keys are selected or matched based on the current route.
6
+ * @param menuItems
7
+ * @param currentPath
8
+ */
9
+ const getMatchMenuKeys = (menuItems, currentPath) => {
10
+ const matchKeys = [];
11
+ const currentPathSegments = currentPath.split('/').filter(Boolean);
12
+ function traverse(items, depth = 0) {
13
+ for (const item of items) {
14
+ if (!item.path)
15
+ continue;
16
+ const itemPathSegments = item.path.split('/').filter(Boolean);
17
+ let isMatch = true;
18
+ for (let i = 0; i < itemPathSegments.length; i++) {
19
+ const itemSegment = itemPathSegments[i];
20
+ const currentSegment = currentPathSegments[depth + i];
21
+ if (!currentSegment) {
22
+ isMatch = false;
23
+ break;
24
+ }
25
+ if (itemSegment.startsWith(':') || item.isDynamic) {
26
+ // This is a dynamic segment, so it always matches
27
+ continue;
28
+ }
29
+ if (itemSegment !== currentSegment) {
30
+ isMatch = false;
31
+ break;
32
+ }
33
+ }
34
+ if (isMatch) {
35
+ matchKeys.push(item.key);
36
+ }
37
+ if (item.children) {
38
+ traverse(item.children);
39
+ }
40
+ }
41
+ }
42
+ traverse(menuItems);
43
+ return matchKeys;
44
+ };export{getMatchMenuKeys};//# sourceMappingURL=matchMenuKeys.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"matchMenuKeys.js","sources":["../../src/utils/matchMenuKeys.ts"],"sourcesContent":[null],"names":[],"mappings":"AAAA;AAEA;;;;;;;AAOG,MAAA,gBAAA,GAAA,CAAA,SAAA,EAAA,WAAA,KAAA;AAEH,IAAO,MAAA,SAAA,GAAsB,EAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@admin-layout/client",
3
- "version": "9.0.2-alpha.0",
3
+ "version": "9.0.4-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": "bdcbbcf01b8543536e3eddf2a70db0b142489ce1"
39
+ "gitHead": "6f015732d0cf98163f4eb52e5b92002339757a62"
40
40
  }