@fto-consult/expo-ui 7.12.1 → 7.12.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fto-consult/expo-ui",
3
- "version": "7.12.1",
3
+ "version": "7.12.2",
4
4
  "description": "Bibliothèque de composants UI Expo,react-native",
5
5
  "scripts": {
6
6
  "clear-npx-cache": "npx clear-npx-cache",
@@ -96,22 +96,6 @@ const useGetItems = (options)=>{
96
96
  items[item.drawerSection.trim()].items.push(item);
97
97
  }
98
98
  });
99
- if(handleHelp){
100
- const dHelp = isObj(items.help)? Object.clone(items.help) : {};
101
- items.help = {
102
- key : 'help',
103
- label : 'Aide',
104
- section : true,
105
- divider : false,
106
- ...dHelp,
107
- items : Array.isArray(dHelp.items)? dHelp.items : [],
108
- };
109
- items.help.items.push({
110
- icon : 'help',
111
- label : 'A propos de '+APP.getName(),
112
- routeName : aboutScreenName,
113
- });
114
- }
115
99
  const dashboard = isObj(items.dashboard) ? Object.clone(items.dashboard) : {};
116
100
  const dash = {
117
101
  icon : 'view-dashboard',
@@ -134,16 +118,36 @@ const useGetItems = (options)=>{
134
118
  delete items[section];
135
119
  }
136
120
  });
121
+ let hasCapture = false;
137
122
  const captureSide = {
138
123
  label : <RecordingButton/>,
139
124
  style : [theme.styles.noPadding],
140
125
  labelProps : {style : [{flexShrink : 1},theme.styles.alignItemsFlexStart,theme.styles.w100]}
141
126
  };
142
- if(isObj(items.help) && Array.isArray(items.help.items)){
143
- items.help = Object.clone(items.help);
144
- items.help.items.push(captureSide);
145
- } else {
146
- items.desktopCapturer = captureSide;
127
+ if(handleHelp){
128
+ const dHelp = isObj(items.help)? Object.clone(items.help) : {};
129
+ items.help = {
130
+ key : 'help',
131
+ label : 'Aide',
132
+ section : true,
133
+ divider : false,
134
+ ...dHelp,
135
+ items : Array.isArray(dHelp.items)? dHelp.items : [],
136
+ };
137
+ items.help.items.push(captureSide,{
138
+ icon : 'help',
139
+ label : 'A propos de '+APP.getName(),
140
+ routeName : aboutScreenName,
141
+ });
142
+ hasCapture = true;
143
+ }
144
+ if(!hasCapture){
145
+ if(isObj(items.help) && Array.isArray(items.help.items)){
146
+ items.help = Object.clone(items.help);
147
+ items.help.items.push(captureSide);
148
+ } else {
149
+ items.desktopCapturer = captureSide;
150
+ }
147
151
  }
148
152
  return items;
149
153
  },[showProfilOnDrawer,handleHelp,theme.name,theme.colors.primary,theme.colors.secondary,refreshItemsRef.current,force,isSignedIn])