@fto-consult/expo-ui 2.3.2 → 2.3.3

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/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { registerRootComponent } from "expo";
2
- import {Platform } from 'react-native';
2
+ import {AppRegistry, Platform } from 'react-native';
3
3
  import { createRoot } from 'react-dom/client';
4
4
  import appConfig from "$capp/config";
5
5
  import { activateKeepAwake } from 'expo-keep-awake';
@@ -17,8 +17,8 @@ export default function ExpoUIApp (options){
17
17
  options = options && typeof options =='object' && !Array.isArray(options)? options : {};
18
18
  appConfig.current = options.config;
19
19
  const App = require('./src/App').default(options);
20
- if (Platform.OS === "web") {
21
- const root = createRoot(document.getElementById("root") ?? document.getElementById("main"));
20
+ if (false && Platform.OS === "web") {
21
+ const root = createRoot(document.getElementById("root") || document.getElementById("main"));
22
22
  root.render(<App />);
23
23
  } else {
24
24
  registerRootComponent(App);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fto-consult/expo-ui",
3
- "version": "2.3.2",
3
+ "version": "2.3.3",
4
4
  "description": "Bibliothèque de composants UI Expo,react-native",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -27,13 +27,15 @@ const ChipComponent = React.forwardRef(({
27
27
  onLongPress,
28
28
  onClose,
29
29
  closeIcon,
30
- textStyle,
30
+ labelStyle,
31
+ labelProps,
31
32
  style,
32
33
  testID,
33
34
  selectedColor,
34
35
  ellipsizeMode,
35
36
  ...rest
36
37
  },ref) => {
38
+ labelProps = Object.assign({},labelProps);
37
39
  testID =defaultStr(testID,"RN_ChipComponent");
38
40
  const { current: elevation } = React.useRef(
39
41
  new Animated.Value(0)
@@ -66,7 +68,7 @@ const ChipComponent = React.forwardRef(({
66
68
  const borderColor =
67
69
  mode === 'outlined'? (selectedColor !== undefined ? selectedColor : Colors.setAlpha(dark ? white : black,0.29)) : backgroundColor;
68
70
  const textColor = Colors.isValid(customColor)?customColor
69
- : Colors.setAlpha(selectedColor !== undefined ? selectedColor : colors.text,0.87);
71
+ : Colors.setAlpha(selectedColor !== undefined ? selectedColor : theme.colors.text,0.87);
70
72
  const iconColor = Colors.setAlpha(textColor,theme.ALPHA);
71
73
 
72
74
  const backgroundColorString = typeof backgroundColor === 'string' ? backgroundColor : defaultBackgroundColor;
@@ -173,7 +175,8 @@ const ChipComponent = React.forwardRef(({
173
175
  selectable={false}
174
176
  numberOfLines={1}
175
177
  testID={testID+"_Text"}
176
- style={[
178
+ {...labelProps}
179
+ style={StyleSheet.flatten([
177
180
  styles.text,
178
181
  {
179
182
  ...theme.fonts.regular,
@@ -181,8 +184,9 @@ const ChipComponent = React.forwardRef(({
181
184
  marginHorizontal : 4,
182
185
  marginLeft: avatar || icon || selected ? 4 : 8,
183
186
  },
184
- textStyle,
185
- ]}
187
+ labelProps.style,
188
+ labelStyle,
189
+ ])}
186
190
  ellipsizeMode={ellipsizeMode}
187
191
  >
188
192
  {children}
@@ -332,7 +336,7 @@ ChipComponent.propTypes = {
332
336
  /**
333
337
  * Style of chip's text
334
338
  */
335
- textStyle: StyleProps,
339
+ labelStyle: StyleProps,
336
340
  style: StyleProps,
337
341
 
338
342
  /**
@@ -347,4 +351,5 @@ ChipComponent.propTypes = {
347
351
  * Ellipsize Mode for the children text
348
352
  */
349
353
  ellipsizeMode: PropTypes.object,
354
+ labelProps : PropTypes.object,
350
355
  };
@@ -273,7 +273,7 @@ const styles = StyleSheet.create({
273
273
  container : {
274
274
  marginVertical : 10,
275
275
  paddingVertical : 5,
276
- paddingHorizontal : 5,
276
+ paddingHorizontal : 15,
277
277
  marginHorizontal : 5,
278
278
  flexWrap : 'nowrap',
279
279
  justifyContent : 'center',
@@ -1554,7 +1554,7 @@ export default class CommonDatagridComponent extends AppComponent {
1554
1554
  v1.map((v)=>{
1555
1555
  for(let i in columnDef.items){
1556
1556
  let it = columnDef.items[i];
1557
- if(isObj(it) && defaultStr(it.code,i) == v){
1557
+ if(isObj(it) && defaultVal(it.code,i) == v){
1558
1558
  _render+=(_render?arrayValueSeparator:"")+defaultStr(it.label,it.text,v);
1559
1559
  } else if(isNonNullString(it) && i == v){
1560
1560
  _render+=(_render?arrayValueSeparator:"")+it;
@@ -1567,7 +1567,7 @@ export default class CommonDatagridComponent extends AppComponent {
1567
1567
  } else {
1568
1568
  for(let i in columnDef.items){
1569
1569
  let it = columnDef.items[i];
1570
- if(isObj(it) && defaultStr(it.code,i) == v1){
1570
+ if(isObj(it) && defaultVal(it.code,i) == v1){
1571
1571
  _render =defaultStr(it.label,it.text,v1);
1572
1572
  break;
1573
1573
  } else if(isNonNullString(it) && i == v1){