@plusscommunities/pluss-core-app 8.0.1-beta.0 → 8.0.2
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/dist/module/index.js
CHANGED
|
@@ -9,5 +9,6 @@ import * as Apis from './apis';
|
|
|
9
9
|
import * as Components from './components';
|
|
10
10
|
import * as Fonts from './fonts';
|
|
11
11
|
import * as Constants from './constants';
|
|
12
|
-
|
|
12
|
+
import { withNavigationFocus } from './withNavigationFocus';
|
|
13
|
+
export { Config, Styles, Session, Helper, Colours, Actions, ActionTypes, Apis, Components, Fonts, Constants, withNavigationFocus };
|
|
13
14
|
//# sourceMappingURL=index.js.map
|
package/dist/module/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Config","Styles","Session","Helper","Colours","Actions","ActionTypes","Apis","Components","Fonts","Constants"],"sources":["index.js"],"sourcesContent":["import Config from './config';\nimport Styles from './styles';\nimport * as Session from './session';\nimport * as Helper from './helper';\nimport * as Colours from './colours';\nimport * as Actions from './actions';\nimport * as ActionTypes from './actions/types';\nimport * as Apis from './apis';\nimport * as Components from './components';\nimport * as Fonts from './fonts';\nimport * as Constants from './constants';\n\nexport { Config, Styles, Session, Helper, Colours, Actions, ActionTypes, Apis, Components, Fonts, Constants };\n"],"mappings":"AAAA,OAAOA,MAAM,MAAM,UAAU;AAC7B,OAAOC,MAAM,MAAM,UAAU;AAC7B,OAAO,KAAKC,OAAO,MAAM,WAAW;AACpC,OAAO,KAAKC,MAAM,MAAM,UAAU;AAClC,OAAO,KAAKC,OAAO,MAAM,WAAW;AACpC,OAAO,KAAKC,OAAO,MAAM,WAAW;AACpC,OAAO,KAAKC,WAAW,MAAM,iBAAiB;AAC9C,OAAO,KAAKC,IAAI,MAAM,QAAQ;AAC9B,OAAO,KAAKC,UAAU,MAAM,cAAc;AAC1C,OAAO,KAAKC,KAAK,MAAM,SAAS;AAChC,OAAO,KAAKC,SAAS,MAAM,aAAa;
|
|
1
|
+
{"version":3,"names":["Config","Styles","Session","Helper","Colours","Actions","ActionTypes","Apis","Components","Fonts","Constants","withNavigationFocus"],"sources":["index.js"],"sourcesContent":["import Config from './config';\nimport Styles from './styles';\nimport * as Session from './session';\nimport * as Helper from './helper';\nimport * as Colours from './colours';\nimport * as Actions from './actions';\nimport * as ActionTypes from './actions/types';\nimport * as Apis from './apis';\nimport * as Components from './components';\nimport * as Fonts from './fonts';\nimport * as Constants from './constants';\nimport { withNavigationFocus } from './withNavigationFocus';\n\nexport { Config, Styles, Session, Helper, Colours, Actions, ActionTypes, Apis, Components, Fonts, Constants, withNavigationFocus };\n"],"mappings":"AAAA,OAAOA,MAAM,MAAM,UAAU;AAC7B,OAAOC,MAAM,MAAM,UAAU;AAC7B,OAAO,KAAKC,OAAO,MAAM,WAAW;AACpC,OAAO,KAAKC,MAAM,MAAM,UAAU;AAClC,OAAO,KAAKC,OAAO,MAAM,WAAW;AACpC,OAAO,KAAKC,OAAO,MAAM,WAAW;AACpC,OAAO,KAAKC,WAAW,MAAM,iBAAiB;AAC9C,OAAO,KAAKC,IAAI,MAAM,QAAQ;AAC9B,OAAO,KAAKC,UAAU,MAAM,cAAc;AAC1C,OAAO,KAAKC,KAAK,MAAM,SAAS;AAChC,OAAO,KAAKC,SAAS,MAAM,aAAa;AACxC,SAASC,mBAAmB,QAAQ,uBAAuB;AAE3D,SAASX,MAAM,EAAEC,MAAM,EAAEC,OAAO,EAAEC,MAAM,EAAEC,OAAO,EAAEC,OAAO,EAAEC,WAAW,EAAEC,IAAI,EAAEC,UAAU,EAAEC,KAAK,EAAEC,SAAS,EAAEC,mBAAmB","ignoreList":[]}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { useIsFocused } from '@react-navigation/native';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Compatibility wrapper for React Navigation v4's withNavigationFocus HOC
|
|
7
|
+
*
|
|
8
|
+
* In v4: withNavigationFocus provided an 'isFocused' prop to class components
|
|
9
|
+
* In v7: useIsFocused hook is the recommended approach for functional components
|
|
10
|
+
*
|
|
11
|
+
* This HOC bridges the gap, allowing class components to continue using
|
|
12
|
+
* the withNavigationFocus pattern while using the v7 useIsFocused hook internally.
|
|
13
|
+
*
|
|
14
|
+
* Usage (unchanged from v4):
|
|
15
|
+
* import { withNavigationFocus } from '@plusscommunities/pluss-core-app';
|
|
16
|
+
* export default withNavigationFocus(connect(mapStateToProps)(MyComponent));
|
|
17
|
+
*
|
|
18
|
+
* The wrapped component receives an 'isFocused' prop that is true when the
|
|
19
|
+
* screen is currently focused and false when not focused.
|
|
20
|
+
*/
|
|
21
|
+
export function withNavigationFocus(Component) {
|
|
22
|
+
return function WithNavigationFocusWrapper(props) {
|
|
23
|
+
const isFocused = useIsFocused();
|
|
24
|
+
return /*#__PURE__*/React.createElement(Component, _extends({}, props, {
|
|
25
|
+
isFocused: isFocused
|
|
26
|
+
}));
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
export default withNavigationFocus;
|
|
30
|
+
//# sourceMappingURL=withNavigationFocus.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","useIsFocused","withNavigationFocus","Component","WithNavigationFocusWrapper","props","isFocused","createElement","_extends"],"sources":["withNavigationFocus.js"],"sourcesContent":["import React from 'react';\nimport { useIsFocused } from '@react-navigation/native';\n\n/**\n * Compatibility wrapper for React Navigation v4's withNavigationFocus HOC\n *\n * In v4: withNavigationFocus provided an 'isFocused' prop to class components\n * In v7: useIsFocused hook is the recommended approach for functional components\n *\n * This HOC bridges the gap, allowing class components to continue using\n * the withNavigationFocus pattern while using the v7 useIsFocused hook internally.\n *\n * Usage (unchanged from v4):\n * import { withNavigationFocus } from '@plusscommunities/pluss-core-app';\n * export default withNavigationFocus(connect(mapStateToProps)(MyComponent));\n *\n * The wrapped component receives an 'isFocused' prop that is true when the\n * screen is currently focused and false when not focused.\n */\nexport function withNavigationFocus(Component) {\n return function WithNavigationFocusWrapper(props) {\n const isFocused = useIsFocused();\n\n return <Component {...props} isFocused={isFocused} />;\n };\n}\n\nexport default withNavigationFocus;\n"],"mappings":";AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,YAAY,QAAQ,0BAA0B;;AAEvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,mBAAmBA,CAACC,SAAS,EAAE;EAC7C,OAAO,SAASC,0BAA0BA,CAACC,KAAK,EAAE;IAChD,MAAMC,SAAS,GAAGL,YAAY,CAAC,CAAC;IAEhC,oBAAOD,KAAA,CAAAO,aAAA,CAACJ,SAAS,EAAAK,QAAA,KAAKH,KAAK;MAAEC,SAAS,EAAEA;IAAU,EAAE,CAAC;EACvD,CAAC;AACH;AAEA,eAAeJ,mBAAmB","ignoreList":[]}
|
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -9,5 +9,6 @@ import * as Apis from './apis';
|
|
|
9
9
|
import * as Components from './components';
|
|
10
10
|
import * as Fonts from './fonts';
|
|
11
11
|
import * as Constants from './constants';
|
|
12
|
+
import { withNavigationFocus } from './withNavigationFocus';
|
|
12
13
|
|
|
13
|
-
export { Config, Styles, Session, Helper, Colours, Actions, ActionTypes, Apis, Components, Fonts, Constants };
|
|
14
|
+
export { Config, Styles, Session, Helper, Colours, Actions, ActionTypes, Apis, Components, Fonts, Constants, withNavigationFocus };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { useIsFocused } from '@react-navigation/native';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Compatibility wrapper for React Navigation v4's withNavigationFocus HOC
|
|
6
|
+
*
|
|
7
|
+
* In v4: withNavigationFocus provided an 'isFocused' prop to class components
|
|
8
|
+
* In v7: useIsFocused hook is the recommended approach for functional components
|
|
9
|
+
*
|
|
10
|
+
* This HOC bridges the gap, allowing class components to continue using
|
|
11
|
+
* the withNavigationFocus pattern while using the v7 useIsFocused hook internally.
|
|
12
|
+
*
|
|
13
|
+
* Usage (unchanged from v4):
|
|
14
|
+
* import { withNavigationFocus } from '@plusscommunities/pluss-core-app';
|
|
15
|
+
* export default withNavigationFocus(connect(mapStateToProps)(MyComponent));
|
|
16
|
+
*
|
|
17
|
+
* The wrapped component receives an 'isFocused' prop that is true when the
|
|
18
|
+
* screen is currently focused and false when not focused.
|
|
19
|
+
*/
|
|
20
|
+
export function withNavigationFocus(Component) {
|
|
21
|
+
return function WithNavigationFocusWrapper(props) {
|
|
22
|
+
const isFocused = useIsFocused();
|
|
23
|
+
|
|
24
|
+
return <Component {...props} isFocused={isFocused} />;
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export default withNavigationFocus;
|