@selfcommunity/react-core 0.7.0-alpha.9 → 0.7.0-mui7.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.
Files changed (48) hide show
  1. package/lib/cjs/components/provider/SCLocaleProvider/index.d.ts +1 -1
  2. package/lib/cjs/components/provider/SCThemeProvider/index.d.ts +1 -1
  3. package/lib/cjs/components/router/index.d.ts +2 -2
  4. package/lib/cjs/constants/Preferences.d.ts +2 -0
  5. package/lib/cjs/constants/Preferences.js +7 -2
  6. package/lib/cjs/hooks/useFetchMenuFooter.d.ts +5 -0
  7. package/lib/cjs/hooks/useFetchMenuFooter.js +36 -0
  8. package/lib/cjs/hooks/useSCFeature.d.ts +22 -0
  9. package/lib/cjs/hooks/useSCFeature.js +38 -0
  10. package/lib/cjs/hooks/useSCFetchUsers.d.ts +3 -4
  11. package/lib/cjs/hooks/useSCFetchUsers.js +15 -44
  12. package/lib/cjs/hooks/useSCPreference.d.ts +36 -0
  13. package/lib/cjs/hooks/useSCPreference.js +69 -0
  14. package/lib/cjs/hooks/useSCPreferencesAndFeaturesEnabled.d.ts +17 -0
  15. package/lib/cjs/hooks/useSCPreferencesAndFeaturesEnabled.js +35 -0
  16. package/lib/cjs/index.d.ts +5 -2
  17. package/lib/cjs/index.js +12 -3
  18. package/lib/cjs/utils/hooks/usePreviousValue.d.ts +1 -1
  19. package/lib/cjs/utils/hooks/usePreviousValue.js +1 -1
  20. package/lib/esm/components/provider/SCLocaleProvider/index.d.ts +1 -1
  21. package/lib/esm/components/provider/SCThemeProvider/index.d.ts +1 -1
  22. package/lib/esm/components/router/index.d.ts +2 -2
  23. package/lib/esm/constants/Preferences.d.ts +2 -0
  24. package/lib/esm/constants/Preferences.js +5 -0
  25. package/lib/esm/hooks/useFetchMenuFooter.d.ts +5 -0
  26. package/lib/esm/hooks/useFetchMenuFooter.js +33 -0
  27. package/lib/esm/hooks/useSCFeature.d.ts +22 -0
  28. package/lib/esm/hooks/useSCFeature.js +33 -0
  29. package/lib/esm/hooks/useSCFetchUsers.d.ts +3 -4
  30. package/lib/esm/hooks/useSCFetchUsers.js +16 -45
  31. package/lib/esm/hooks/useSCPreference.d.ts +36 -0
  32. package/lib/esm/hooks/useSCPreference.js +65 -0
  33. package/lib/esm/hooks/useSCPreferencesAndFeaturesEnabled.d.ts +17 -0
  34. package/lib/esm/hooks/useSCPreferencesAndFeaturesEnabled.js +32 -0
  35. package/lib/esm/index.d.ts +5 -2
  36. package/lib/esm/index.js +5 -2
  37. package/lib/esm/utils/hooks/usePreviousValue.d.ts +1 -1
  38. package/lib/esm/utils/hooks/usePreviousValue.js +1 -1
  39. package/lib/umd/0.js +2 -0
  40. package/lib/umd/{440.js.LICENSE.txt → 0.js.LICENSE.txt} +2 -0
  41. package/lib/umd/react-core.js +1 -1
  42. package/lib/umd/react-core.js.LICENSE.txt +1 -1
  43. package/package.json +12 -12
  44. package/lib/cjs/hooks/useSCPreferenceEnabled.d.ts +0 -6
  45. package/lib/cjs/hooks/useSCPreferenceEnabled.js +0 -16
  46. package/lib/esm/hooks/useSCPreferenceEnabled.d.ts +0 -6
  47. package/lib/esm/hooks/useSCPreferenceEnabled.js +0 -13
  48. package/lib/umd/440.js +0 -2
@@ -1,3 +1,3 @@
1
1
  /*! (c) 2023 - present: Quentral Srl | https://github.com/selfcommunity/community-js/blob/master/LICENSE.md */
2
2
 
3
- /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
3
+ /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@selfcommunity/react-core",
3
- "version": "0.7.0-alpha.9",
3
+ "version": "0.7.0-mui7.17+4e47173b0",
4
4
  "description": "React Core Components useful for integrating UI Community components (react-ui).",
5
5
  "author": "SelfCommunity <https://www.selfcommunity.com>",
6
6
  "homepage": "https://www.selfcommunity.com",
@@ -61,17 +61,17 @@
61
61
  "access": "public"
62
62
  },
63
63
  "peerDependencies": {
64
- "@mui/material": "^5.14.12",
64
+ "@mui/material": "^7.3.4",
65
65
  "notistack": "^3.0.1",
66
- "react": "^17.0.2 || 18",
67
- "react-dom": "17 || 18",
66
+ "react": "^19.2.0",
67
+ "react-dom": "^19.2.0",
68
68
  "react-intl": "^6.4.7"
69
69
  },
70
70
  "dependencies": {
71
- "@selfcommunity/api-services": "^0.7.0-alpha.1",
72
- "@selfcommunity/react-i18n": "^0.8.0-alpha.19",
73
- "@selfcommunity/types": "^0.8.0-alpha.4",
74
- "@selfcommunity/utils": "^0.2.64-alpha.2",
71
+ "@selfcommunity/api-services": "0.7.0-mui7.17+4e47173b0",
72
+ "@selfcommunity/react-i18n": "0.8.0-mui7.40+4e47173b0",
73
+ "@selfcommunity/types": "0.8.0-mui7.17+4e47173b0",
74
+ "@selfcommunity/utils": "0.2.64-mui7.117+4e47173b0",
75
75
  "js-cookie": "^3.0.5",
76
76
  "pubsub-js": "^1.9.5",
77
77
  "use-deep-compare-effect": "^1.8.1",
@@ -85,8 +85,8 @@
85
85
  "@types/chai": "^4.2.14",
86
86
  "@types/enzyme": "^3.10.8",
87
87
  "@types/jest": "^26.0.20",
88
- "@types/react": "17 || 18",
89
- "@types/react-dom": "17 || 18",
88
+ "@types/react": "18",
89
+ "@types/react-dom": "18",
90
90
  "@types/sinon": "^9.0.10",
91
91
  "@typescript-eslint/eslint-plugin": "^4.14.2",
92
92
  "@typescript-eslint/parser": "^4.14.2",
@@ -115,7 +115,7 @@
115
115
  "sass": "^1.32.6",
116
116
  "sinon": "^9.2.4",
117
117
  "tslib": "^2.6.2",
118
- "typescript": "^4.1.3",
118
+ "typescript": "^4.9.5",
119
119
  "webpack": "^5.20.1",
120
120
  "webpack-bundle-analyzer": "^4.9.0",
121
121
  "webpack-cli": "^4.5.0"
@@ -130,5 +130,5 @@
130
130
  "bugs": {
131
131
  "url": "https://github.com/selfcommunity/community-js/issues"
132
132
  },
133
- "gitHead": "6d4721f5dc0ab192046df56b21eff8c9a30b8847"
133
+ "gitHead": "4e47173b01162255615fdf697e971eeacd411567"
134
134
  }
@@ -1,6 +0,0 @@
1
- /**
2
- * Custom hook to check if a given preference is present and has a value.
3
- * @param preference - full preference key (e.g., 'section.name')
4
- * @returns boolean - true if the preference exists and has a value
5
- */
6
- export default function useSCPreferenceEnabled(preference: string): boolean;
@@ -1,16 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const react_1 = require("react");
4
- const SCPreferencesProvider_1 = require("../components/provider/SCPreferencesProvider");
5
- /**
6
- * Custom hook to check if a given preference is present and has a value.
7
- * @param preference - full preference key (e.g., 'section.name')
8
- * @returns boolean - true if the preference exists and has a value
9
- */
10
- function useSCPreferenceEnabled(preference) {
11
- const { preferences } = (0, SCPreferencesProvider_1.useSCPreferences)();
12
- return (0, react_1.useMemo)(() => {
13
- return preferences && preference in preferences && preferences[preference].value;
14
- }, [preferences, preference]);
15
- }
16
- exports.default = useSCPreferenceEnabled;
@@ -1,6 +0,0 @@
1
- /**
2
- * Custom hook to check if a given preference is present and has a value.
3
- * @param preference - full preference key (e.g., 'section.name')
4
- * @returns boolean - true if the preference exists and has a value
5
- */
6
- export default function useSCPreferenceEnabled(preference: string): boolean;
@@ -1,13 +0,0 @@
1
- import { useMemo } from 'react';
2
- import { useSCPreferences } from '../components/provider/SCPreferencesProvider';
3
- /**
4
- * Custom hook to check if a given preference is present and has a value.
5
- * @param preference - full preference key (e.g., 'section.name')
6
- * @returns boolean - true if the preference exists and has a value
7
- */
8
- export default function useSCPreferenceEnabled(preference) {
9
- const { preferences } = useSCPreferences();
10
- return useMemo(() => {
11
- return preferences && preference in preferences && preferences[preference].value;
12
- }, [preferences, preference]);
13
- }