@controleonline/ui-default 1.0.263 → 1.0.264

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.
Files changed (29) hide show
  1. package/AGENTS.md +48 -47
  2. package/package.json +3 -6
  3. package/src/react/components/errors/DefaultErrors.js +360 -360
  4. package/src/react/components/files/DefaultFile.js +46 -46
  5. package/src/react/components/filters/CompactFilterSelector.js +22 -3
  6. package/src/react/components/filters/DefaultColumnFilter.js +15 -13
  7. package/src/react/components/filters/DefaultExternalFilters.js +44 -39
  8. package/src/react/components/filters/DefaultSearch.js +140 -103
  9. package/src/react/components/filters/DefaultSearch.styles.js +65 -70
  10. package/src/react/components/form/DefaultForm.js +200 -198
  11. package/src/react/components/help/DefaultTooltip.js +87 -87
  12. package/src/react/components/help/DefaultTooltip.styles.js +61 -61
  13. package/src/react/components/inputs/DefaultInput.js +162 -160
  14. package/src/react/components/inputs/DefaultSelect.js +203 -192
  15. package/src/react/components/map/DefaultGoogleMap.styles.js +115 -9
  16. package/src/react/components/map/DefaultGoogleMap.web.js +560 -446
  17. package/src/react/components/map/DefaultMap.native.js +73 -71
  18. package/src/react/components/map/DefaultMap.styles.js +16 -16
  19. package/src/react/components/map/DefaultMap.web.js +68 -66
  20. package/src/react/components/map/DefaultNativeMap.native.js +307 -183
  21. package/src/react/components/map/DefaultNativeMap.shared.js +439 -340
  22. package/src/react/components/map/DefaultNativeMap.styles.js +156 -122
  23. package/src/react/components/table/DefaultTable.js +529 -355
  24. package/src/react/components/table/DefaultTable.styles.js +30 -39
  25. package/src/react/index.js +10 -10
  26. package/src/tests/react/components/errors/DefaultErrors.test.js +162 -162
  27. package/src/tests/react/components/files/DefaultFile.test.js +80 -80
  28. package/src/tests/react/components/inputs/DefaultSelect.test.js +93 -0
  29. package/src/tests/react/components/table/DefaultTable.test.js +334 -0
@@ -1,71 +1,73 @@
1
- import React, {useMemo} from 'react';
2
- import {View} from 'react-native';
3
- import {WebView} from 'react-native-webview';
4
-
5
- import DefaultNativeMap from './DefaultNativeMap.native';
6
-
7
- import styles from './DefaultMap.styles';
8
- import {
9
- buildOpenStreetMapHtml,
10
- resolveDefaultMapPayload,
11
- } from './DefaultMap.shared';
12
-
13
- export default function DefaultMap({
14
- config = null,
15
- addresses = null,
16
- markerPayloads = [],
17
- paths = [],
18
- userCoordinates = null,
19
- apiKey = '',
20
- }) {
21
- const resolvedPayload = useMemo(
22
- () =>
23
- resolveDefaultMapPayload({
24
- config,
25
- addresses,
26
- markerPayloads,
27
- paths,
28
- userCoordinates,
29
- apiKey,
30
- }),
31
- [apiKey, addresses, config, markerPayloads, paths, userCoordinates],
32
- );
33
-
34
- if (
35
- resolvedPayload.markerPayloads.length === 0 &&
36
- !resolvedPayload.userCoordinates &&
37
- resolvedPayload.paths.length === 0
38
- ) {
39
- return null;
40
- }
41
-
42
- if (resolvedPayload.apiKey) {
43
- return (
44
- <DefaultNativeMap
45
- apiKey={resolvedPayload.apiKey}
46
- markerPayloads={resolvedPayload.markerPayloads}
47
- userCoordinates={resolvedPayload.userCoordinates}
48
- paths={resolvedPayload.paths}
49
- />
50
- );
51
- }
52
-
53
- return (
54
- <View style={styles.mapContainer}>
55
- <WebView
56
- source={{
57
- html: buildOpenStreetMapHtml({
58
- markerPayloads: resolvedPayload.markerPayloads,
59
- paths: resolvedPayload.paths,
60
- userCoordinates: resolvedPayload.userCoordinates,
61
- routeColor: '#0EA5E9',
62
- }),
63
- }}
64
- style={styles.mapViewport}
65
- originWhitelist={['*']}
66
- javaScriptEnabled
67
- domStorageEnabled
68
- />
69
- </View>
70
- );
71
- }
1
+ import React, {useMemo} from 'react';
2
+ import {View} from 'react-native';
3
+ import {WebView} from 'react-native-webview';
4
+
5
+ import DefaultNativeMap from './DefaultNativeMap.native';
6
+
7
+ import styles from './DefaultMap.styles';
8
+ import {
9
+ buildOpenStreetMapHtml,
10
+ resolveDefaultMapPayload,
11
+ } from './DefaultMap.shared';
12
+
13
+ export default function DefaultMap({
14
+ config = null,
15
+ addresses = null,
16
+ markerPayloads = [],
17
+ paths = [],
18
+ userCoordinates = null,
19
+ apiKey = '',
20
+ popupTheme = null,
21
+ }) {
22
+ const resolvedPayload = useMemo(
23
+ () =>
24
+ resolveDefaultMapPayload({
25
+ config,
26
+ addresses,
27
+ markerPayloads,
28
+ paths,
29
+ userCoordinates,
30
+ apiKey,
31
+ }),
32
+ [apiKey, addresses, config, markerPayloads, paths, userCoordinates],
33
+ );
34
+
35
+ if (
36
+ resolvedPayload.markerPayloads.length === 0 &&
37
+ !resolvedPayload.userCoordinates &&
38
+ resolvedPayload.paths.length === 0
39
+ ) {
40
+ return null;
41
+ }
42
+
43
+ if (resolvedPayload.apiKey) {
44
+ return (
45
+ <DefaultNativeMap
46
+ apiKey={resolvedPayload.apiKey}
47
+ markerPayloads={resolvedPayload.markerPayloads}
48
+ userCoordinates={resolvedPayload.userCoordinates}
49
+ paths={resolvedPayload.paths}
50
+ popupTheme={popupTheme}
51
+ />
52
+ );
53
+ }
54
+
55
+ return (
56
+ <View style={styles.mapContainer}>
57
+ <WebView
58
+ source={{
59
+ html: buildOpenStreetMapHtml({
60
+ markerPayloads: resolvedPayload.markerPayloads,
61
+ paths: resolvedPayload.paths,
62
+ userCoordinates: resolvedPayload.userCoordinates,
63
+ routeColor: '#0EA5E9',
64
+ }),
65
+ }}
66
+ style={styles.mapViewport}
67
+ originWhitelist={['*']}
68
+ javaScriptEnabled
69
+ domStorageEnabled
70
+ />
71
+ </View>
72
+ );
73
+ }
@@ -1,16 +1,16 @@
1
- import {StyleSheet} from 'react-native';
2
-
3
- export default StyleSheet.create({
4
- mapContainer: {
5
- width: '100%',
6
- height: '100%',
7
- position: 'relative',
8
- backgroundColor: '#E5EEF5',
9
- },
10
- mapViewport: {
11
- width: '100%',
12
- height: '100%',
13
- borderWidth: 0,
14
- backgroundColor: '#E5EEF5',
15
- },
16
- });
1
+ import {StyleSheet} from 'react-native';
2
+
3
+ export default StyleSheet.create({
4
+ mapContainer: {
5
+ width: '100%',
6
+ height: '100%',
7
+ position: 'relative',
8
+ backgroundColor: '#E5EEF5',
9
+ },
10
+ mapViewport: {
11
+ width: '100%',
12
+ height: '100%',
13
+ borderWidth: 0,
14
+ backgroundColor: '#E5EEF5',
15
+ },
16
+ });
@@ -1,66 +1,68 @@
1
- import React, {useMemo} from 'react';
2
- import {View} from 'react-native';
3
-
4
- import DefaultGoogleMap from './DefaultGoogleMap.web';
5
-
6
- import styles from './DefaultMap.styles';
7
- import {
8
- buildOpenStreetMapHtml,
9
- resolveDefaultMapPayload,
10
- } from './DefaultMap.shared';
11
-
12
- export default function DefaultMap({
13
- config = null,
14
- addresses = null,
15
- markerPayloads = [],
16
- paths = [],
17
- userCoordinates = null,
18
- apiKey = '',
19
- }) {
20
- const resolvedPayload = useMemo(
21
- () =>
22
- resolveDefaultMapPayload({
23
- config,
24
- addresses,
25
- markerPayloads,
26
- paths,
27
- userCoordinates,
28
- apiKey,
29
- }),
30
- [apiKey, addresses, config, markerPayloads, paths, userCoordinates],
31
- );
32
-
33
- if (
34
- resolvedPayload.markerPayloads.length === 0 &&
35
- !resolvedPayload.userCoordinates &&
36
- resolvedPayload.paths.length === 0
37
- ) {
38
- return null;
39
- }
40
-
41
- if (resolvedPayload.apiKey) {
42
- return (
43
- <DefaultGoogleMap
44
- apiKey={resolvedPayload.apiKey}
45
- markerPayloads={resolvedPayload.markerPayloads}
46
- userCoordinates={resolvedPayload.userCoordinates}
47
- paths={resolvedPayload.paths}
48
- />
49
- );
50
- }
51
-
52
- return (
53
- <View style={styles.mapContainer}>
54
- <iframe
55
- title="Mapa"
56
- srcDoc={buildOpenStreetMapHtml({
57
- markerPayloads: resolvedPayload.markerPayloads,
58
- paths: resolvedPayload.paths,
59
- userCoordinates: resolvedPayload.userCoordinates,
60
- routeColor: '#0EA5E9',
61
- })}
62
- style={{width: '100%', height: '100%', border: 0}}
63
- />
64
- </View>
65
- );
66
- }
1
+ import React, {useMemo} from 'react';
2
+ import {View} from 'react-native';
3
+
4
+ import DefaultGoogleMap from './DefaultGoogleMap.web';
5
+
6
+ import styles from './DefaultMap.styles';
7
+ import {
8
+ buildOpenStreetMapHtml,
9
+ resolveDefaultMapPayload,
10
+ } from './DefaultMap.shared';
11
+
12
+ export default function DefaultMap({
13
+ config = null,
14
+ addresses = null,
15
+ markerPayloads = [],
16
+ paths = [],
17
+ userCoordinates = null,
18
+ apiKey = '',
19
+ popupTheme = null,
20
+ }) {
21
+ const resolvedPayload = useMemo(
22
+ () =>
23
+ resolveDefaultMapPayload({
24
+ config,
25
+ addresses,
26
+ markerPayloads,
27
+ paths,
28
+ userCoordinates,
29
+ apiKey,
30
+ }),
31
+ [apiKey, addresses, config, markerPayloads, paths, userCoordinates],
32
+ );
33
+
34
+ if (
35
+ resolvedPayload.markerPayloads.length === 0 &&
36
+ !resolvedPayload.userCoordinates &&
37
+ resolvedPayload.paths.length === 0
38
+ ) {
39
+ return null;
40
+ }
41
+
42
+ if (resolvedPayload.apiKey) {
43
+ return (
44
+ <DefaultGoogleMap
45
+ apiKey={resolvedPayload.apiKey}
46
+ markerPayloads={resolvedPayload.markerPayloads}
47
+ userCoordinates={resolvedPayload.userCoordinates}
48
+ paths={resolvedPayload.paths}
49
+ popupTheme={popupTheme}
50
+ />
51
+ );
52
+ }
53
+
54
+ return (
55
+ <View style={styles.mapContainer}>
56
+ <iframe
57
+ title="Mapa"
58
+ srcDoc={buildOpenStreetMapHtml({
59
+ markerPayloads: resolvedPayload.markerPayloads,
60
+ paths: resolvedPayload.paths,
61
+ userCoordinates: resolvedPayload.userCoordinates,
62
+ routeColor: '#0EA5E9',
63
+ })}
64
+ style={{width: '100%', height: '100%', border: 0}}
65
+ />
66
+ </View>
67
+ );
68
+ }