@controleonline/ui-default 1.0.263 → 1.0.265

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 (61) hide show
  1. package/AGENTS.md +47 -45
  2. package/package.json +20 -20
  3. package/src/react/components/errors/DefaultErrors.js +307 -325
  4. package/src/react/components/files/DefaultFile.js +46 -46
  5. package/src/react/components/filters/CompactFilterSelector.js +78 -24
  6. package/src/react/components/filters/CompactFilterSelector.styles.js +17 -5
  7. package/src/react/components/filters/DefaultColumnFilter.js +191 -57
  8. package/src/react/components/filters/DefaultExternalFilters.js +245 -182
  9. package/src/react/components/filters/DefaultSearch.js +131 -92
  10. package/src/react/components/filters/DefaultSearch.styles.js +65 -70
  11. package/src/react/components/form/DefaultForm.js +172 -151
  12. package/src/react/components/form/DefaultForm.styles.js +71 -66
  13. package/src/react/components/help/DefaultTooltip.js +87 -87
  14. package/src/react/components/help/DefaultTooltip.styles.js +61 -61
  15. package/src/react/components/inputs/DefaultDateInput.js +150 -0
  16. package/src/react/components/inputs/DefaultInput.js +162 -127
  17. package/src/react/components/inputs/DefaultInput.styles.js +6 -0
  18. package/src/react/components/inputs/DefaultSelect.js +320 -152
  19. package/src/react/components/inputs/defaultInputUtils.js +40 -19
  20. package/src/react/components/map/DefaultGoogleMap.styles.js +115 -9
  21. package/src/react/components/map/DefaultGoogleMap.web.js +560 -446
  22. package/src/react/components/map/DefaultMap.native.js +73 -71
  23. package/src/react/components/map/DefaultMap.styles.js +16 -16
  24. package/src/react/components/map/DefaultMap.web.js +68 -66
  25. package/src/react/components/map/DefaultNativeMap.native.js +307 -183
  26. package/src/react/components/map/DefaultNativeMap.shared.js +439 -340
  27. package/src/react/components/map/DefaultNativeMap.styles.js +156 -122
  28. package/src/react/components/table/DefaultColumnMenu.js +108 -0
  29. package/src/react/components/table/DefaultDebug.js +233 -0
  30. package/src/react/components/table/DefaultFiltersModal.js +142 -0
  31. package/src/react/components/table/DefaultModalButton.js +18 -0
  32. package/src/react/components/table/DefaultSearchModal.js +49 -0
  33. package/src/react/components/table/DefaultTable.js +345 -1846
  34. package/src/react/components/table/DefaultTable.styles.js +247 -136
  35. package/src/react/components/table/DefaultTable.utils.js +502 -0
  36. package/src/react/components/table/DefaultTableBody.js +26 -0
  37. package/src/react/components/table/DefaultTableCards.js +171 -0
  38. package/src/react/components/table/DefaultTableControls.js +208 -0
  39. package/src/react/components/table/DefaultTableEmptyState.js +22 -0
  40. package/src/react/components/table/DefaultTableFooter.js +172 -0
  41. package/src/react/components/table/DefaultTableInput.js +145 -0
  42. package/src/react/components/table/DefaultTableRows.js +340 -0
  43. package/src/react/components/table/DefaultTableSearch.js +100 -0
  44. package/src/react/components/table/DefaultTableToolbar.js +98 -0
  45. package/src/react/components/table/DefaultToolbarAction.js +56 -0
  46. package/src/react/components/table/useDefaultTablePagination.js +370 -0
  47. package/src/react/components/table/useDefaultTableSorting.js +126 -0
  48. package/src/react/components/table/useDefaultTableTheme.js +58 -0
  49. package/src/react/index.js +10 -10
  50. package/src/react/utils/tableVisibleColumnsPreferences.js +239 -211
  51. package/src/store/default/actions.js +51 -13
  52. package/src/store/default/getters.js +10 -8
  53. package/src/store/default/mutation_types.js +4 -2
  54. package/src/store/default/mutations.js +10 -1
  55. package/src/tests/react/components/errors/DefaultErrors.test.js +162 -162
  56. package/src/tests/react/components/files/DefaultFile.test.js +80 -80
  57. package/src/tests/react/components/form/DefaultForm.test.js +81 -0
  58. package/src/tests/react/components/inputs/DefaultSelect.test.js +185 -0
  59. package/src/tests/react/components/table/DefaultTable.test.js +1183 -0
  60. package/src/tests/react/store/defaultActions.test.js +59 -0
  61. package/src/tests/react/utils/tableVisibleColumnsPreferences.test.js +247 -168
@@ -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
+ }