@selfcommunity/react-core 0.6.7-payments.221 → 0.6.7-payments.223
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/cjs/constants/Preferences.d.ts +4 -0
- package/lib/cjs/constants/Preferences.js +8 -2
- package/lib/cjs/index.d.ts +1 -5
- package/lib/cjs/index.js +2 -7
- package/lib/esm/constants/Preferences.d.ts +4 -0
- package/lib/esm/constants/Preferences.js +6 -0
- package/lib/esm/index.d.ts +1 -5
- package/lib/esm/index.js +1 -5
- package/lib/umd/react-core.js +1 -1
- package/package.json +5 -5
- package/lib/cjs/components/context/index.d.ts +0 -1
- package/lib/cjs/components/context/index.js +0 -24
- package/lib/esm/components/context/index.d.ts +0 -1
- package/lib/esm/components/context/index.js +0 -20
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@selfcommunity/react-core",
|
|
3
|
-
"version": "0.6.7-payments.
|
|
3
|
+
"version": "0.6.7-payments.223+71d7f2c5a",
|
|
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",
|
|
@@ -68,10 +68,10 @@
|
|
|
68
68
|
"react-intl": "^6.4.7"
|
|
69
69
|
},
|
|
70
70
|
"dependencies": {
|
|
71
|
-
"@selfcommunity/api-services": "0.6.7-payments.
|
|
71
|
+
"@selfcommunity/api-services": "0.6.7-payments.223+71d7f2c5a",
|
|
72
72
|
"@selfcommunity/react-i18n": "0.7.7-payments.158",
|
|
73
|
-
"@selfcommunity/types": "0.7.7-payments.
|
|
74
|
-
"@selfcommunity/utils": "0.2.64-payments.
|
|
73
|
+
"@selfcommunity/types": "0.7.7-payments.223+71d7f2c5a",
|
|
74
|
+
"@selfcommunity/utils": "0.2.64-payments.223+71d7f2c5a",
|
|
75
75
|
"js-cookie": "^3.0.5",
|
|
76
76
|
"pubsub-js": "^1.9.5",
|
|
77
77
|
"use-deep-compare-effect": "^1.8.1",
|
|
@@ -130,5 +130,5 @@
|
|
|
130
130
|
"bugs": {
|
|
131
131
|
"url": "https://github.com/selfcommunity/community-js/issues"
|
|
132
132
|
},
|
|
133
|
-
"gitHead": "
|
|
133
|
+
"gitHead": "71d7f2c5ae22e67fd00325901a906ad43192e455"
|
|
134
134
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default function SCContextMenu(): any;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const SCPreferencesProvider_1 = require("../provider/SCPreferencesProvider");
|
|
6
|
-
const SCPreferences = tslib_1.__importStar(require("../../constants/Preferences"));
|
|
7
|
-
const react_1 = require("react");
|
|
8
|
-
function SCContextMenu() {
|
|
9
|
-
const { preferences } = (0, SCPreferencesProvider_1.useSCPreferences)();
|
|
10
|
-
const contextMenuEnabled = SCPreferences.CONFIGURATIONS_CONTEXT_MENU_ENABLED in preferences && preferences[SCPreferences.CONFIGURATIONS_CONTEXT_MENU_ENABLED].value;
|
|
11
|
-
(0, react_1.useEffect)(() => {
|
|
12
|
-
const handleContextMenu = (e) => {
|
|
13
|
-
e.preventDefault();
|
|
14
|
-
};
|
|
15
|
-
if (!contextMenuEnabled) {
|
|
16
|
-
document.addEventListener('contextmenu', handleContextMenu);
|
|
17
|
-
return () => {
|
|
18
|
-
document.removeEventListener('contextmenu', handleContextMenu);
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
}, [contextMenuEnabled]);
|
|
22
|
-
return null;
|
|
23
|
-
}
|
|
24
|
-
exports.default = SCContextMenu;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default function SCContextMenu(): any;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { useSCPreferences } from '../provider/SCPreferencesProvider';
|
|
3
|
-
import * as SCPreferences from '../../constants/Preferences';
|
|
4
|
-
import { useEffect } from 'react';
|
|
5
|
-
export default function SCContextMenu() {
|
|
6
|
-
const { preferences } = useSCPreferences();
|
|
7
|
-
const contextMenuEnabled = SCPreferences.CONFIGURATIONS_CONTEXT_MENU_ENABLED in preferences && preferences[SCPreferences.CONFIGURATIONS_CONTEXT_MENU_ENABLED].value;
|
|
8
|
-
useEffect(() => {
|
|
9
|
-
const handleContextMenu = (e) => {
|
|
10
|
-
e.preventDefault();
|
|
11
|
-
};
|
|
12
|
-
if (!contextMenuEnabled) {
|
|
13
|
-
document.addEventListener('contextmenu', handleContextMenu);
|
|
14
|
-
return () => {
|
|
15
|
-
document.removeEventListener('contextmenu', handleContextMenu);
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
}, [contextMenuEnabled]);
|
|
19
|
-
return null;
|
|
20
|
-
}
|