@fto-consult/expo-ui 7.13.7 → 7.15.0
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.
|
3
|
+
"version": "7.15.0",
|
4
4
|
"description": "Bibliothèque de composants UI Expo,react-native",
|
5
5
|
"scripts": {
|
6
6
|
"clear-npx-cache": "npx clear-npx-cache",
|
@@ -46,7 +46,7 @@
|
|
46
46
|
"delete-node-modules": "rimraf ./**/node_modules",
|
47
47
|
"dev": "npx expo start --no-dev --minify -c",
|
48
48
|
"modifier-url-remote-git": "git remote set-url origin 'https://borispipo@github.com/borispipo/smart-eneo.git'",
|
49
|
-
"update": "npm i @fto-consult/electron-gen@latest pdfmake@latest expo @emotion/native@latest react-native-big-list@latest apexcharts@latest file-saver@latest fs-extra@latest google-libphonenumber@latest @pchmn/expo-material3-theme@latest @emotion/native@latest @fto-consult/common@latest @react-navigation/stack react-native-blob-util react-native-iphone-x-helper@latest react-native-mime-types@latest react-native-paper@
|
49
|
+
"update": "npm i @fto-consult/electron-gen@latest pdfmake@latest expo @emotion/native@latest react-native-big-list@latest apexcharts@latest file-saver@latest fs-extra@latest google-libphonenumber@latest @pchmn/expo-material3-theme@latest @emotion/native@latest @fto-consult/common@latest @react-navigation/stack react-native-blob-util react-native-iphone-x-helper@latest react-native-mime-types@latest react-native-paper@5 react-native-paper-dates@latest @react-navigation/native@latest @react-navigation/native-stack@latest react-virtuoso@latest tippy.js@latest websql@latest xlsx@latest react-native-web@latest react-dom@latest && npx expo install --fix && npm run update-apexchart && npm run update-pdfmake && npm run find-licenses"
|
50
50
|
},
|
51
51
|
"bin": {
|
52
52
|
"expo-ui": "./bin/index.js"
|
@@ -71,7 +71,7 @@
|
|
71
71
|
"@expo/html-elements": "^0.5.1",
|
72
72
|
"@expo/vector-icons": "^13.0.0",
|
73
73
|
"@faker-js/faker": "^8.0.2",
|
74
|
-
"@fto-consult/common": "^4.0.
|
74
|
+
"@fto-consult/common": "^4.0.5",
|
75
75
|
"@fto-consult/electron-gen": "^2.2.0",
|
76
76
|
"@pchmn/expo-material3-theme": "^1.3.1",
|
77
77
|
"@react-native-async-storage/async-storage": "1.18.2",
|
@@ -113,7 +113,7 @@
|
|
113
113
|
"react-native-get-random-values": "~1.9.0",
|
114
114
|
"react-native-iphone-x-helper": "^1.3.1",
|
115
115
|
"react-native-mime-types": "^2.4.0",
|
116
|
-
"react-native-paper": "^
|
116
|
+
"react-native-paper": "^5.11.5",
|
117
117
|
"react-native-paper-dates": "^0.21.7",
|
118
118
|
"react-native-reanimated": "~3.3.0",
|
119
119
|
"react-native-safe-area-context": "4.6.3",
|
@@ -2209,10 +2209,10 @@ export default class CommonDatagridComponent extends AppComponent {
|
|
2209
2209
|
}
|
2210
2210
|
}
|
2211
2211
|
getDefaultChartHeight(){
|
2212
|
-
return defaultNumber(this.props.chartProps?.height,this.props.chartConfig?.height,this.isDashboard()?
|
2212
|
+
return defaultNumber(this.props.chartProps?.height,this.props.chartConfig?.height,this.isDashboard()?100:350);
|
2213
2213
|
}
|
2214
2214
|
getDefaultChartWidth(){
|
2215
|
-
return defaultNumber(this.props.chartProps?.width);
|
2215
|
+
return defaultNumber(this.props.chartProps?.width,this.props.chartConfig?.width);
|
2216
2216
|
}
|
2217
2217
|
/*** permet de formatter les valeurs de la courbe en fonction du type passé en paramètre */
|
2218
2218
|
chartValueFormattter(value,columnType){
|
@@ -2326,6 +2326,10 @@ export default class CommonDatagridComponent extends AppComponent {
|
|
2326
2326
|
const mappedColumns = {};
|
2327
2327
|
const abreviateValues = defaultVal(config.abreviateValues,true) || this.state.abreviateValues;
|
2328
2328
|
const dataLabelFormatter = typeof chartProps.dataLabels?.formatter =="function"? chartProps.dataLabels.formatter : undefined;
|
2329
|
+
let chartWidth = defaultNumber(config.width) || this.getDefaultChartWidth() || undefined;
|
2330
|
+
if(chartWidth ===0){
|
2331
|
+
chartWidth = undefined;
|
2332
|
+
}
|
2329
2333
|
const chartOptions = {
|
2330
2334
|
...chartProps,
|
2331
2335
|
dataLabels : extendObj(true,{enabled:false},chartProps.dataLabels,{
|
@@ -2363,14 +2367,14 @@ export default class CommonDatagridComponent extends AppComponent {
|
|
2363
2367
|
chartProps.chart,
|
2364
2368
|
{
|
2365
2369
|
height : defaultNumber(config.height,this.getDefaultChartHeight()),
|
2366
|
-
width :
|
2370
|
+
width : chartWidth,
|
2367
2371
|
type : chartType.type
|
2368
2372
|
},
|
2369
2373
|
)
|
2370
2374
|
}
|
2371
|
-
const labelColor = theme.Colors.isValid(config.labelColor)? config.labelColor : theme.colors.text;
|
2375
|
+
const labelColor = theme.Colors.isValid(config.labelColor)? config.labelColor : theme.setAlphaColor(theme.colors.text);
|
2372
2376
|
if(!isDonut){
|
2373
|
-
chartOptions.xaxis = extendObj(true,{},{type: 'category'},chartProps.xaxis,
|
2377
|
+
chartOptions.xaxis = extendObj(true,{},{type: 'category'},chartProps.xaxis,xaxis);
|
2374
2378
|
const xLabels = chartOptions.xaxis.labels = defaultObj(chartOptions.xaxis.labels);
|
2375
2379
|
xLabels.style = defaultObj(xLabels.style)
|
2376
2380
|
xLabels.style.colors = (Array.isArray(xLabels.style.colors) && xLabels.style.colors.length || theme.Colors.isValid(xLabels.style.colors)) ? xLabels.style.colors : labelColor;
|
@@ -2380,6 +2384,7 @@ export default class CommonDatagridComponent extends AppComponent {
|
|
2380
2384
|
}
|
2381
2385
|
chartOptions.yaxis = extendObj(true,{},{type: 'category'},defaultObj(chartProps.yaxis));
|
2382
2386
|
const yLabels = chartOptions.yaxis.labels = defaultObj(chartOptions.yaxis.labels);
|
2387
|
+
yLabels.align = "right";
|
2383
2388
|
yLabels.style = defaultObj(yLabels.style)
|
2384
2389
|
yLabels.style.colors = (Array.isArray(yLabels.style.colors) && yLabels.style.colors.length || theme.Colors.isValid(yLabels.style.colors)) ? yLabels.style.colors : labelColor;
|
2385
2390
|
const yLabelsSerieName = series?.length == 1 && series[0] && series[0].name ? series[0].name : undefined;
|
@@ -2406,20 +2411,23 @@ export default class CommonDatagridComponent extends AppComponent {
|
|
2406
2411
|
if(!chartType.isDonut){
|
2407
2412
|
delete chartOptions.labels;
|
2408
2413
|
}
|
2409
|
-
|
2410
|
-
|
2411
|
-
}
|
2412
|
-
if(chartOptions.chart.sparkline){
|
2413
|
-
chartOptions.chart.sparkline = {enabled: true}
|
2414
|
-
} else delete chartOptions.chart.sparkline;
|
2415
|
-
//const spackLine = chartOptions.chart.sparkline;
|
2416
|
-
chartOptions.xaxis = defaultObj(chartOptions.xaxis);
|
2417
|
-
chartOptions.xaxis.labels = defaultObj(chartOptions.xaxis.labels);
|
2418
|
-
chartOptions.xaxis.labels.show = ("showXaxis" in config) ? !!config.showXaxis : !this.isDashboard();
|
2414
|
+
const sparkline = !!(typeof config.sparkline !==undefined ? (isObj(config.sparkline)? config.sparkline.enabled : config.sparkline) : (isObj(chartOptions.chart.sparkline)? chartOptions.chart.sparkline.enabled:chartOptions.chart.sparkline));
|
2415
|
+
chartOptions.chart.sparkline = {enabled: sparkline}
|
2419
2416
|
|
2417
|
+
chartOptions.xaxis = defaultObj(chartOptions.xaxis,config.xaxis);
|
2418
|
+
chartOptions.xaxis.labels = defaultObj(chartOptions.xaxis.labels);
|
2419
|
+
const xLabels = chartOptions.xaxis.labels;
|
2420
|
+
const showXaxis = sparkline ? false : ("showXaxis" in config) ? !!config.showXaxis : !this.isDashboard();
|
2421
|
+
xLabels.show = showXaxis;
|
2422
|
+
chartOptions.xaxis.show = sparkline ? false : "show" in chartOptions.xaxis ? !! chartOptions.xaxis.show : showXaxis;
|
2423
|
+
xLabels.style = Object.assign({},xLabels.style);
|
2424
|
+
xLabels.style.colors = (Array.isArray(xLabels.style.colors) && xLabels.style.colors.length || theme.Colors.isValid(xLabels.style.colors)) ? xLabels.style.colors : labelColor;
|
2420
2425
|
|
2421
2426
|
chartOptions.yaxis.labels = defaultObj(chartOptions.yaxis.labels);
|
2422
|
-
|
2427
|
+
const showYaxis = sparkline ? false : ("showYaxis" in config) ? !!config.showYaxis : !this.isDashboard();
|
2428
|
+
chartOptions.yaxis.show = sparkline ? false : "show" in chartOptions.yaxis ? !! chartOptions.yaxis.show : showYaxis;
|
2429
|
+
chartOptions.yaxis.labels.show = showYaxis;
|
2430
|
+
chartOptions.yaxis.show = "show" in chartOptions.yaxis ? !!chartOptions.yaxis : showYaxis;
|
2423
2431
|
|
2424
2432
|
chartOptions.legend = defaultObj(chartOptions.legend);
|
2425
2433
|
chartOptions.legend.show = ("showLegend" in config) ? !!config.showLegend : !this.isDashboard();
|
@@ -1,7 +1,7 @@
|
|
1
1
|
module.exports = {
|
2
2
|
"@fto-consult/expo-ui": {
|
3
3
|
"name": "@fto-consult/expo-ui",
|
4
|
-
"version": "7.
|
4
|
+
"version": "7.15.0",
|
5
5
|
"repository": {
|
6
6
|
"type": "git",
|
7
7
|
"url": "git+https://github.com/borispipo/expo-ui.git"
|
@@ -19,7 +19,7 @@ module.exports = {
|
|
19
19
|
"license": "MIT"
|
20
20
|
},
|
21
21
|
"@emotion/react": {
|
22
|
-
"version": "11.11.
|
22
|
+
"version": "11.11.3",
|
23
23
|
"url": "https://github.com/emotion-js/emotion/tree/main/packages/react",
|
24
24
|
"license": "MIT"
|
25
25
|
},
|
@@ -44,12 +44,12 @@ module.exports = {
|
|
44
44
|
"license": "MIT"
|
45
45
|
},
|
46
46
|
"@faker-js/faker": {
|
47
|
-
"version": "8.
|
47
|
+
"version": "8.3.1",
|
48
48
|
"url": "https://github.com/faker-js/faker.git",
|
49
49
|
"license": "MIT"
|
50
50
|
},
|
51
51
|
"@fto-consult/common": {
|
52
|
-
"version": "4.0.
|
52
|
+
"version": "4.0.5",
|
53
53
|
"url": "https://github.com/borispipo/common#readme",
|
54
54
|
"license": "ISC"
|
55
55
|
},
|
@@ -263,7 +263,7 @@ module.exports = {
|
|
263
263
|
"license": "MIT"
|
264
264
|
},
|
265
265
|
"react-native-paper": {
|
266
|
-
"version": "
|
266
|
+
"version": "5.11.5",
|
267
267
|
"url": "https://callstack.github.io/react-native-paper",
|
268
268
|
"license": "MIT"
|
269
269
|
},
|
@@ -313,7 +313,7 @@ module.exports = {
|
|
313
313
|
"license": "WTFPL OR ISC"
|
314
314
|
},
|
315
315
|
"sharp-cli": {
|
316
|
-
"version": "2.1.
|
316
|
+
"version": "2.1.1",
|
317
317
|
"url": "https://github.com/vseventer/sharp-cli",
|
318
318
|
"license": "MIT"
|
319
319
|
},
|