drf-react-by-schema 0.28.6 → 0.28.8
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 +7 -12
- package/dist/@types/index.d.ts +0 -408
- package/dist/@types/index.d.ts.map +0 -1
- package/dist/@types/index.js +0 -9
- package/dist/@types/string-mask.d.ts +0 -10
- package/dist/@types/string-mask.d.ts.map +0 -1
- package/dist/@types/string-mask.js +0 -1
- package/dist/api.d.ts +0 -81
- package/dist/api.d.ts.map +0 -1
- package/dist/api.js +0 -1118
- package/dist/components/DataGridBySchemaEditable/BooleanInputCell.d.ts +0 -8
- package/dist/components/DataGridBySchemaEditable/BooleanInputCell.d.ts.map +0 -1
- package/dist/components/DataGridBySchemaEditable/BooleanInputCell.js +0 -86
- package/dist/components/DataGridBySchemaEditable/ConditionalEditWrapper.d.ts +0 -12
- package/dist/components/DataGridBySchemaEditable/ConditionalEditWrapper.d.ts.map +0 -1
- package/dist/components/DataGridBySchemaEditable/ConditionalEditWrapper.js +0 -71
- package/dist/components/DataGridBySchemaEditable/ConfirmDialog.d.ts +0 -9
- package/dist/components/DataGridBySchemaEditable/ConfirmDialog.d.ts.map +0 -1
- package/dist/components/DataGridBySchemaEditable/ConfirmDialog.js +0 -21
- package/dist/components/DataGridBySchemaEditable/CustomToolbar.d.ts +0 -26
- package/dist/components/DataGridBySchemaEditable/CustomToolbar.d.ts.map +0 -1
- package/dist/components/DataGridBySchemaEditable/CustomToolbar.js +0 -146
- package/dist/components/DataGridBySchemaEditable/DataGridDesktop.d.ts +0 -72
- package/dist/components/DataGridBySchemaEditable/DataGridDesktop.d.ts.map +0 -1
- package/dist/components/DataGridBySchemaEditable/DataGridDesktop.js +0 -416
- package/dist/components/DataGridBySchemaEditable/DataGridMobile.d.ts +0 -18
- package/dist/components/DataGridBySchemaEditable/DataGridMobile.d.ts.map +0 -1
- package/dist/components/DataGridBySchemaEditable/DataGridMobile.js +0 -105
- package/dist/components/DataGridBySchemaEditable/FileInputCell.d.ts +0 -11
- package/dist/components/DataGridBySchemaEditable/FileInputCell.d.ts.map +0 -1
- package/dist/components/DataGridBySchemaEditable/FileInputCell.js +0 -155
- package/dist/components/DataGridBySchemaEditable/FooterToolbar.d.ts +0 -12
- package/dist/components/DataGridBySchemaEditable/FooterToolbar.d.ts.map +0 -1
- package/dist/components/DataGridBySchemaEditable/FooterToolbar.js +0 -36
- package/dist/components/DataGridBySchemaEditable/GeoEditCell.d.ts +0 -10
- package/dist/components/DataGridBySchemaEditable/GeoEditCell.d.ts.map +0 -1
- package/dist/components/DataGridBySchemaEditable/GeoEditCell.js +0 -85
- package/dist/components/DataGridBySchemaEditable/GeoThumbCell.d.ts +0 -11
- package/dist/components/DataGridBySchemaEditable/GeoThumbCell.d.ts.map +0 -1
- package/dist/components/DataGridBySchemaEditable/GeoThumbCell.js +0 -87
- package/dist/components/DataGridBySchemaEditable/GridActionsCellItemLink.d.ts +0 -18
- package/dist/components/DataGridBySchemaEditable/GridActionsCellItemLink.d.ts.map +0 -1
- package/dist/components/DataGridBySchemaEditable/GridActionsCellItemLink.js +0 -24
- package/dist/components/DataGridBySchemaEditable/GridDateInput.d.ts +0 -8
- package/dist/components/DataGridBySchemaEditable/GridDateInput.d.ts.map +0 -1
- package/dist/components/DataGridBySchemaEditable/GridDateInput.js +0 -166
- package/dist/components/DataGridBySchemaEditable/GridDateTimeInput.d.ts +0 -6
- package/dist/components/DataGridBySchemaEditable/GridDateTimeInput.d.ts.map +0 -1
- package/dist/components/DataGridBySchemaEditable/GridDateTimeInput.js +0 -154
- package/dist/components/DataGridBySchemaEditable/GridDecimalInput.d.ts +0 -10
- package/dist/components/DataGridBySchemaEditable/GridDecimalInput.d.ts.map +0 -1
- package/dist/components/DataGridBySchemaEditable/GridDecimalInput.js +0 -78
- package/dist/components/DataGridBySchemaEditable/GridGenericInput.d.ts +0 -8
- package/dist/components/DataGridBySchemaEditable/GridGenericInput.d.ts.map +0 -1
- package/dist/components/DataGridBySchemaEditable/GridGenericInput.js +0 -30
- package/dist/components/DataGridBySchemaEditable/GridPatternInput.d.ts +0 -7
- package/dist/components/DataGridBySchemaEditable/GridPatternInput.d.ts.map +0 -1
- package/dist/components/DataGridBySchemaEditable/GridPatternInput.js +0 -74
- package/dist/components/DataGridBySchemaEditable/InputInterval.d.ts +0 -21
- package/dist/components/DataGridBySchemaEditable/InputInterval.d.ts.map +0 -1
- package/dist/components/DataGridBySchemaEditable/InputInterval.js +0 -131
- package/dist/components/DataGridBySchemaEditable/MobileSearchBar.d.ts +0 -9
- package/dist/components/DataGridBySchemaEditable/MobileSearchBar.d.ts.map +0 -1
- package/dist/components/DataGridBySchemaEditable/MobileSearchBar.js +0 -70
- package/dist/components/DataGridBySchemaEditable/RowEditingWatcher.d.ts +0 -7
- package/dist/components/DataGridBySchemaEditable/RowEditingWatcher.d.ts.map +0 -1
- package/dist/components/DataGridBySchemaEditable/RowEditingWatcher.js +0 -41
- package/dist/components/DataGridBySchemaEditable/SelectEditInputCell.d.ts +0 -24
- package/dist/components/DataGridBySchemaEditable/SelectEditInputCell.d.ts.map +0 -1
- package/dist/components/DataGridBySchemaEditable/SelectEditInputCell.js +0 -259
- package/dist/components/DataGridBySchemaEditable/geoConstants.d.ts +0 -5
- package/dist/components/DataGridBySchemaEditable/geoConstants.d.ts.map +0 -1
- package/dist/components/DataGridBySchemaEditable/geoConstants.js +0 -6
- package/dist/components/DataGridBySchemaEditable/hooks/useDataGridActions.d.ts +0 -33
- package/dist/components/DataGridBySchemaEditable/hooks/useDataGridActions.d.ts.map +0 -1
- package/dist/components/DataGridBySchemaEditable/hooks/useDataGridActions.js +0 -161
- package/dist/components/DataGridBySchemaEditable/hooks/useOptionsAC.d.ts +0 -14
- package/dist/components/DataGridBySchemaEditable/hooks/useOptionsAC.d.ts.map +0 -1
- package/dist/components/DataGridBySchemaEditable/hooks/useOptionsAC.js +0 -69
- package/dist/components/DataGridBySchemaEditable/hooks/usePreparedColumns.d.ts +0 -9
- package/dist/components/DataGridBySchemaEditable/hooks/usePreparedColumns.d.ts.map +0 -1
- package/dist/components/DataGridBySchemaEditable/hooks/usePreparedColumns.js +0 -73
- package/dist/components/DataGridBySchemaEditable/hooks/useProcessRowUpdate.d.ts +0 -30
- package/dist/components/DataGridBySchemaEditable/hooks/useProcessRowUpdate.d.ts.map +0 -1
- package/dist/components/DataGridBySchemaEditable/hooks/useProcessRowUpdate.js +0 -199
- package/dist/components/DataGridBySchemaEditable/utils/columnFactory.d.ts +0 -33
- package/dist/components/DataGridBySchemaEditable/utils/columnFactory.d.ts.map +0 -1
- package/dist/components/DataGridBySchemaEditable/utils/columnFactory.js +0 -270
- package/dist/components/DataGridBySchemaEditable/utils.d.ts +0 -40
- package/dist/components/DataGridBySchemaEditable/utils.d.ts.map +0 -1
- package/dist/components/DataGridBySchemaEditable/utils.js +0 -181
- package/dist/components/DataGridBySchemaEditable.d.ts +0 -63
- package/dist/components/DataGridBySchemaEditable.d.ts.map +0 -1
- package/dist/components/DataGridBySchemaEditable.js +0 -172
- package/dist/components/DataTotals.d.ts +0 -12
- package/dist/components/DataTotals.d.ts.map +0 -1
- package/dist/components/DataTotals.js +0 -32
- package/dist/components/DataTotalsServer.d.ts +0 -10
- package/dist/components/DataTotalsServer.d.ts.map +0 -1
- package/dist/components/DataTotalsServer.js +0 -18
- package/dist/components/DialogActions.d.ts +0 -11
- package/dist/components/DialogActions.d.ts.map +0 -1
- package/dist/components/DialogActions.js +0 -20
- package/dist/components/FileTypeIcon.d.ts +0 -18
- package/dist/components/FileTypeIcon.d.ts.map +0 -1
- package/dist/components/FileTypeIcon.js +0 -48
- package/dist/components/GenericModelList.d.ts +0 -52
- package/dist/components/GenericModelList.d.ts.map +0 -1
- package/dist/components/GenericModelList.js +0 -194
- package/dist/components/GenericRelatedModelList.d.ts +0 -54
- package/dist/components/GenericRelatedModelList.d.ts.map +0 -1
- package/dist/components/GenericRelatedModelList.js +0 -181
- package/dist/components/GenericRelatedModelListTable.d.ts +0 -55
- package/dist/components/GenericRelatedModelListTable.d.ts.map +0 -1
- package/dist/components/GenericRelatedModelListTable.js +0 -31
- package/dist/components/Image.d.ts +0 -10
- package/dist/components/Image.d.ts.map +0 -1
- package/dist/components/Image.js +0 -111
- package/dist/components/details/DetailBySchema.d.ts +0 -4
- package/dist/components/details/DetailBySchema.d.ts.map +0 -1
- package/dist/components/details/DetailBySchema.js +0 -175
- package/dist/components/details/DetailFieldBySchema.d.ts +0 -4
- package/dist/components/details/DetailFieldBySchema.d.ts.map +0 -1
- package/dist/components/details/DetailFieldBySchema.js +0 -88
- package/dist/components/forms/ChangePasswordForm.d.ts +0 -7
- package/dist/components/forms/ChangePasswordForm.d.ts.map +0 -1
- package/dist/components/forms/ChangePasswordForm.js +0 -93
- package/dist/components/forms/DialogFormBySchema.d.ts +0 -22
- package/dist/components/forms/DialogFormBySchema.d.ts.map +0 -1
- package/dist/components/forms/DialogFormBySchema.js +0 -97
- package/dist/components/forms/FieldBySchema.d.ts +0 -4
- package/dist/components/forms/FieldBySchema.d.ts.map +0 -1
- package/dist/components/forms/FieldBySchema.js +0 -80
- package/dist/components/forms/ForgotPasswordForm.d.ts +0 -11
- package/dist/components/forms/ForgotPasswordForm.d.ts.map +0 -1
- package/dist/components/forms/ForgotPasswordForm.js +0 -114
- package/dist/components/forms/Form.d.ts +0 -61
- package/dist/components/forms/Form.d.ts.map +0 -1
- package/dist/components/forms/Form.js +0 -264
- package/dist/components/forms/FormActions.d.ts +0 -20
- package/dist/components/forms/FormActions.d.ts.map +0 -1
- package/dist/components/forms/FormActions.js +0 -55
- package/dist/components/forms/FormBySchema.d.ts +0 -21
- package/dist/components/forms/FormBySchema.d.ts.map +0 -1
- package/dist/components/forms/FormBySchema.js +0 -280
- package/dist/components/forms/FormWatcher.d.ts +0 -10
- package/dist/components/forms/FormWatcher.d.ts.map +0 -1
- package/dist/components/forms/FormWatcher.js +0 -25
- package/dist/components/forms/inputs/AutocompleteFieldBySchema.d.ts +0 -13
- package/dist/components/forms/inputs/AutocompleteFieldBySchema.d.ts.map +0 -1
- package/dist/components/forms/inputs/AutocompleteFieldBySchema.js +0 -133
- package/dist/components/forms/inputs/BooleanFieldBySchema.d.ts +0 -4
- package/dist/components/forms/inputs/BooleanFieldBySchema.d.ts.map +0 -1
- package/dist/components/forms/inputs/BooleanFieldBySchema.js +0 -39
- package/dist/components/forms/inputs/DesktopDatePickerBySchema.d.ts +0 -5
- package/dist/components/forms/inputs/DesktopDatePickerBySchema.d.ts.map +0 -1
- package/dist/components/forms/inputs/DesktopDatePickerBySchema.js +0 -54
- package/dist/components/forms/inputs/DesktopDateTimePickerBySchema.d.ts +0 -5
- package/dist/components/forms/inputs/DesktopDateTimePickerBySchema.d.ts.map +0 -1
- package/dist/components/forms/inputs/DesktopDateTimePickerBySchema.js +0 -47
- package/dist/components/forms/inputs/EditableAutocompleteFieldBySchema.d.ts +0 -14
- package/dist/components/forms/inputs/EditableAutocompleteFieldBySchema.d.ts.map +0 -1
- package/dist/components/forms/inputs/EditableAutocompleteFieldBySchema.js +0 -272
- package/dist/components/forms/inputs/FileFieldBySchema.d.ts +0 -4
- package/dist/components/forms/inputs/FileFieldBySchema.d.ts.map +0 -1
- package/dist/components/forms/inputs/FileFieldBySchema.js +0 -144
- package/dist/components/forms/inputs/FloatFieldBySchema.d.ts +0 -4
- package/dist/components/forms/inputs/FloatFieldBySchema.d.ts.map +0 -1
- package/dist/components/forms/inputs/FloatFieldBySchema.js +0 -64
- package/dist/components/forms/inputs/GeometryFieldBySchema.d.ts +0 -8
- package/dist/components/forms/inputs/GeometryFieldBySchema.d.ts.map +0 -1
- package/dist/components/forms/inputs/GeometryFieldBySchema.js +0 -57
- package/dist/components/forms/inputs/MapGeometryPicker.d.ts +0 -19
- package/dist/components/forms/inputs/MapGeometryPicker.d.ts.map +0 -1
- package/dist/components/forms/inputs/MapGeometryPicker.js +0 -322
- package/dist/components/forms/inputs/PatternFieldBySchema.d.ts +0 -4
- package/dist/components/forms/inputs/PatternFieldBySchema.d.ts.map +0 -1
- package/dist/components/forms/inputs/PatternFieldBySchema.js +0 -56
- package/dist/components/forms/inputs/TextFieldBySchema.d.ts +0 -4
- package/dist/components/forms/inputs/TextFieldBySchema.d.ts.map +0 -1
- package/dist/components/forms/inputs/TextFieldBySchema.js +0 -56
- package/dist/components/forms/inputs/leafletMarker.d.ts +0 -12
- package/dist/components/forms/inputs/leafletMarker.d.ts.map +0 -1
- package/dist/components/forms/inputs/leafletMarker.js +0 -52
- package/dist/context/APIWrapper.d.ts +0 -18
- package/dist/context/APIWrapper.d.ts.map +0 -1
- package/dist/context/APIWrapper.js +0 -593
- package/dist/context/APIWrapperContext.d.ts +0 -132
- package/dist/context/APIWrapperContext.d.ts.map +0 -1
- package/dist/context/APIWrapperContext.js +0 -63
- package/dist/context/DRFReactBySchemaContext.d.ts +0 -31
- package/dist/context/DRFReactBySchemaContext.d.ts.map +0 -1
- package/dist/context/DRFReactBySchemaContext.js +0 -20
- package/dist/context/DRFReactBySchemaProvider.d.ts +0 -5
- package/dist/context/DRFReactBySchemaProvider.d.ts.map +0 -1
- package/dist/context/DRFReactBySchemaProvider.js +0 -105
- package/dist/context/Overlays.d.ts +0 -5
- package/dist/context/Overlays.d.ts.map +0 -1
- package/dist/context/Overlays.js +0 -114
- package/dist/context/PrivateContext.d.ts +0 -10
- package/dist/context/PrivateContext.d.ts.map +0 -1
- package/dist/context/PrivateContext.js +0 -16
- package/dist/hooks/useDeepMemo.d.ts +0 -2
- package/dist/hooks/useDeepMemo.d.ts.map +0 -1
- package/dist/hooks/useDeepMemo.js +0 -13
- package/dist/hooks/useWhyDidYouUpdate.d.ts +0 -4
- package/dist/hooks/useWhyDidYouUpdate.d.ts.map +0 -1
- package/dist/hooks/useWhyDidYouUpdate.js +0 -26
- package/dist/index.d.ts +0 -37
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -108
- package/dist/styles/grid.d.ts +0 -3
- package/dist/styles/grid.d.ts.map +0 -1
- package/dist/styles/grid.js +0 -38
- package/dist/styles/index.d.ts +0 -3
- package/dist/styles/index.d.ts.map +0 -1
- package/dist/styles/index.js +0 -38
- package/dist/styles/layout.d.ts +0 -23
- package/dist/styles/layout.d.ts.map +0 -1
- package/dist/styles/layout.js +0 -71
- package/dist/styles/texts.d.ts +0 -66
- package/dist/styles/texts.d.ts.map +0 -1
- package/dist/styles/texts.js +0 -73
- package/dist/styles/theme.d.ts +0 -29
- package/dist/styles/theme.d.ts.map +0 -1
- package/dist/styles/theme.js +0 -226
- package/dist/utils/index.d.ts +0 -2
- package/dist/utils/index.d.ts.map +0 -1
- package/dist/utils/index.js +0 -17
- package/dist/utils/utils.d.ts +0 -107
- package/dist/utils/utils.d.ts.map +0 -1
- package/dist/utils/utils.js +0 -957
package/dist/styles/theme.js
DELETED
|
@@ -1,226 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const styles_1 = require("@mui/material/styles");
|
|
4
|
-
const locale_1 = require("@mui/material/locale");
|
|
5
|
-
const locales_1 = require("@mui/x-data-grid/locales");
|
|
6
|
-
const locales_2 = require("@mui/x-date-pickers/locales");
|
|
7
|
-
const texts_1 = require("./texts");
|
|
8
|
-
locales_1.ptBR.components.MuiDataGrid.defaultProps.localeText = Object.assign(Object.assign({}, locales_1.ptBR.components.MuiDataGrid.defaultProps.localeText), { toolbarQuickFilterPlaceholder: 'Buscar...', toolbarQuickFilterLabel: 'Buscar', toolbarQuickFilterDeleteIconLabel: 'Limpar busca' });
|
|
9
|
-
const palette = {
|
|
10
|
-
avatars: [
|
|
11
|
-
'#e60049',
|
|
12
|
-
'#0bb4ff',
|
|
13
|
-
'#50e991',
|
|
14
|
-
'#e6d800',
|
|
15
|
-
'#9b19f5',
|
|
16
|
-
'#ffa300',
|
|
17
|
-
'#dc0ab4',
|
|
18
|
-
'#b3d4ff',
|
|
19
|
-
'#00bfa0',
|
|
20
|
-
],
|
|
21
|
-
avatarsMore: [
|
|
22
|
-
'#023fa5',
|
|
23
|
-
'#8e063b',
|
|
24
|
-
'#d33f6a',
|
|
25
|
-
'#11c638',
|
|
26
|
-
'#ef9708',
|
|
27
|
-
'#0fcfc0',
|
|
28
|
-
'#f79cd4',
|
|
29
|
-
'#7d87b9',
|
|
30
|
-
'#bb7784',
|
|
31
|
-
'#4a6fe3',
|
|
32
|
-
'#8595e1',
|
|
33
|
-
'#b5bbe3',
|
|
34
|
-
'#e6afb9',
|
|
35
|
-
'#e07b91',
|
|
36
|
-
'#8dd593',
|
|
37
|
-
'#c6dec7',
|
|
38
|
-
'#ead3c6',
|
|
39
|
-
'#f0b98d',
|
|
40
|
-
'#9cded6',
|
|
41
|
-
'#d5eae7',
|
|
42
|
-
'#f3e1eb',
|
|
43
|
-
'#f6c4e1',
|
|
44
|
-
'#bec1d4',
|
|
45
|
-
'#d6bcc0',
|
|
46
|
-
],
|
|
47
|
-
topBarButton: {
|
|
48
|
-
main: '#ffffff',
|
|
49
|
-
},
|
|
50
|
-
producao: {
|
|
51
|
-
main: '#e60049',
|
|
52
|
-
contrastText: '#fff',
|
|
53
|
-
},
|
|
54
|
-
empreendimento: {
|
|
55
|
-
main: '#0bb4ff',
|
|
56
|
-
contrastText: '#fff',
|
|
57
|
-
},
|
|
58
|
-
comercializacao: {
|
|
59
|
-
main: '#ffa300',
|
|
60
|
-
contrastText: '#fff',
|
|
61
|
-
},
|
|
62
|
-
credito: {
|
|
63
|
-
main: '#dc0ab4',
|
|
64
|
-
contrastText: '#fff',
|
|
65
|
-
},
|
|
66
|
-
certificacao: {
|
|
67
|
-
main: '#9b19f5',
|
|
68
|
-
contrastText: '#fff',
|
|
69
|
-
},
|
|
70
|
-
background: {
|
|
71
|
-
default: '#D9D9D9',
|
|
72
|
-
},
|
|
73
|
-
primary: {
|
|
74
|
-
main: '#3949AB',
|
|
75
|
-
},
|
|
76
|
-
secondary: {
|
|
77
|
-
main: '#9ca4d5',
|
|
78
|
-
contrastText: '#fff',
|
|
79
|
-
},
|
|
80
|
-
successButton: {
|
|
81
|
-
main: '#CDDC39',
|
|
82
|
-
contrastText: '#fff',
|
|
83
|
-
},
|
|
84
|
-
success: {
|
|
85
|
-
main: '#0e0',
|
|
86
|
-
contrastText: '#fff',
|
|
87
|
-
semaphoric: '#0e0',
|
|
88
|
-
},
|
|
89
|
-
error: {
|
|
90
|
-
main: '#d32f2f',
|
|
91
|
-
semaphoric: '#f66',
|
|
92
|
-
},
|
|
93
|
-
warning: {
|
|
94
|
-
main: '#ee0',
|
|
95
|
-
semaphoric: '#ee0',
|
|
96
|
-
},
|
|
97
|
-
selectedItem: {
|
|
98
|
-
main: '#2962FF',
|
|
99
|
-
},
|
|
100
|
-
tableColumnHeader: {
|
|
101
|
-
main: '#ECEFF1',
|
|
102
|
-
},
|
|
103
|
-
formCard: {
|
|
104
|
-
main: '#FFF',
|
|
105
|
-
},
|
|
106
|
-
};
|
|
107
|
-
const defaultTheme = (0, styles_1.createTheme)({
|
|
108
|
-
palette,
|
|
109
|
-
texts: texts_1.DEFAULT_TEXTS,
|
|
110
|
-
components: {
|
|
111
|
-
MuiButton: {
|
|
112
|
-
styleOverrides: {
|
|
113
|
-
contained: {
|
|
114
|
-
// borderRadius: 50
|
|
115
|
-
},
|
|
116
|
-
},
|
|
117
|
-
},
|
|
118
|
-
MuiTextField: {
|
|
119
|
-
styleOverrides: {
|
|
120
|
-
root: {
|
|
121
|
-
'&.Mui-required .MuiFormLabel-asterisk': {
|
|
122
|
-
// color: '#F00'
|
|
123
|
-
},
|
|
124
|
-
},
|
|
125
|
-
},
|
|
126
|
-
},
|
|
127
|
-
MuiListItemButton: {
|
|
128
|
-
styleOverrides: {
|
|
129
|
-
root: {
|
|
130
|
-
'&.Mui-selected, :hover': {
|
|
131
|
-
color: palette.selectedItem.main,
|
|
132
|
-
'& .MuiListItemIcon-root': {
|
|
133
|
-
color: palette.selectedItem.main,
|
|
134
|
-
},
|
|
135
|
-
},
|
|
136
|
-
'&.Mui-selected:hover': {
|
|
137
|
-
color: palette.selectedItem.main,
|
|
138
|
-
'& .MuiListItemIcon-root': {
|
|
139
|
-
color: palette.selectedItem.main,
|
|
140
|
-
},
|
|
141
|
-
},
|
|
142
|
-
'&.disabled': {
|
|
143
|
-
opacity: 0.5,
|
|
144
|
-
},
|
|
145
|
-
},
|
|
146
|
-
},
|
|
147
|
-
},
|
|
148
|
-
MuiDataGrid: {
|
|
149
|
-
styleOverrides: {
|
|
150
|
-
root: {
|
|
151
|
-
backgroundColor: palette.formCard.main,
|
|
152
|
-
// Target the Virtual Scroller directly
|
|
153
|
-
'& .MuiDataGrid-virtualScroller': {
|
|
154
|
-
transition: 'outline 0.2s ease-in-out, outline-offset 0.2s ease-in-out',
|
|
155
|
-
'&:focus-visible': {
|
|
156
|
-
outline: `2px solid ${palette.primary.main}`,
|
|
157
|
-
outlineOffset: '-2px',
|
|
158
|
-
zIndex: 1,
|
|
159
|
-
},
|
|
160
|
-
'&:focus': {
|
|
161
|
-
outline: 'none',
|
|
162
|
-
},
|
|
163
|
-
},
|
|
164
|
-
},
|
|
165
|
-
columnHeader: {
|
|
166
|
-
backgroundColor: palette.tableColumnHeader.main,
|
|
167
|
-
'& .MuiDataGrid-columnHeaderTitle': {
|
|
168
|
-
overflow: 'visible',
|
|
169
|
-
lineHeight: '1.43rem',
|
|
170
|
-
whiteSpace: 'normal',
|
|
171
|
-
},
|
|
172
|
-
},
|
|
173
|
-
row: {
|
|
174
|
-
'&.Mui-editing': {
|
|
175
|
-
maxHeight: 'none !important',
|
|
176
|
-
},
|
|
177
|
-
'&.MuiDataGrid-row--editing': {
|
|
178
|
-
backgroundColor: 'rgba(57, 73, 171, 0.08)',
|
|
179
|
-
zIndex: 1,
|
|
180
|
-
'& .MuiDataGrid-cell': {
|
|
181
|
-
boxShadow: `inset 0 2px 0 0 ${palette.primary.main}, inset 0 -2px 0 0 ${palette.primary.main}`,
|
|
182
|
-
'&.MuiDataGrid-cell--editing': {
|
|
183
|
-
backgroundColor: 'transparent',
|
|
184
|
-
// '&:focus-within': { outline: 'none' },
|
|
185
|
-
},
|
|
186
|
-
'&.cell--error': {
|
|
187
|
-
border: '0 1px solid red',
|
|
188
|
-
boxShadow: `inset 0 2px 0 0 ${palette.error.main}, inset 0 -2px 0 0 ${palette.error.main}`,
|
|
189
|
-
height: 'auto !important',
|
|
190
|
-
minHeight: 'var(--DataGrid-rowHeight)',
|
|
191
|
-
display: 'flex',
|
|
192
|
-
flexDirection: 'column',
|
|
193
|
-
justifyContent: 'center',
|
|
194
|
-
alignItems: 'stretch !important',
|
|
195
|
-
backgroundColor: (0, styles_1.alpha)(palette.error.main, 0.1),
|
|
196
|
-
'& .MuiFormHelperText-root': {
|
|
197
|
-
margin: 0,
|
|
198
|
-
borderTop: '1px solid red',
|
|
199
|
-
padding: '2px 4px',
|
|
200
|
-
fontSize: '0.75rem',
|
|
201
|
-
whiteSpace: 'normal',
|
|
202
|
-
lineHeight: 1.2,
|
|
203
|
-
backgroundColor: 'transparent',
|
|
204
|
-
},
|
|
205
|
-
},
|
|
206
|
-
},
|
|
207
|
-
},
|
|
208
|
-
},
|
|
209
|
-
},
|
|
210
|
-
},
|
|
211
|
-
MuiTabs: {
|
|
212
|
-
styleOverrides: {
|
|
213
|
-
root: {
|
|
214
|
-
backgroundColor: palette.formCard.main,
|
|
215
|
-
marginTop: 20,
|
|
216
|
-
},
|
|
217
|
-
},
|
|
218
|
-
},
|
|
219
|
-
MuiCircularProgress: {
|
|
220
|
-
defaultProps: {
|
|
221
|
-
'aria-label': 'Carregando...',
|
|
222
|
-
},
|
|
223
|
-
},
|
|
224
|
-
},
|
|
225
|
-
}, locale_1.ptBR, locales_1.ptBR, locales_2.ptBR);
|
|
226
|
-
exports.default = defaultTheme;
|
package/dist/utils/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC"}
|
package/dist/utils/index.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./utils"), exports);
|
package/dist/utils/utils.d.ts
DELETED
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
import * as Yup from 'yup';
|
|
2
|
-
import { GridFilterModel } from '@mui/x-data-grid';
|
|
3
|
-
import * as geojson from 'geojson';
|
|
4
|
-
import { ChoiceItem, ChoiceValue, ConditionalVisible, CustomFormField, ExtraValidators, Field, FormFieldLayout, GenericValue, GeometryFieldType, GridEnrichedBySchemaColDef, Item, SchemaType, TField } from '../@types';
|
|
5
|
-
export declare const emptyByType: GenericValue;
|
|
6
|
-
export declare const getChoiceByValue: (value: ChoiceValue, choices: ChoiceItem[] | undefined) => string | null | undefined;
|
|
7
|
-
export declare const toChoiceItem: (rawValue: GenericValue, choices: ChoiceItem[] | undefined) => any;
|
|
8
|
-
export declare function enrichChoices<T extends TField = void>(rawData: Item, schema: SchemaType<T>): Item<T>;
|
|
9
|
-
export declare function populateValues({ data, schema }: {
|
|
10
|
-
data: Item;
|
|
11
|
-
schema: SchemaType;
|
|
12
|
-
}): Record<string, any>;
|
|
13
|
-
export declare function buildGenericYupValidationSchema({ data, schema, many, skipFields, extraValidators, uiFields, }: {
|
|
14
|
-
data: Item;
|
|
15
|
-
schema: SchemaType;
|
|
16
|
-
many?: boolean;
|
|
17
|
-
skipFields?: string[];
|
|
18
|
-
extraValidators?: ExtraValidators;
|
|
19
|
-
uiFields?: string[];
|
|
20
|
-
}): Yup.ObjectSchema<{
|
|
21
|
-
[x: string]: any;
|
|
22
|
-
}, Yup.AnyObject, {
|
|
23
|
-
[x: string]: any;
|
|
24
|
-
}, ""> | Yup.ArraySchema<{
|
|
25
|
-
[x: string]: any;
|
|
26
|
-
}[] | undefined, Yup.AnyObject, "", "">;
|
|
27
|
-
export declare function loadSinglePageDataHelper({ data, schema, columns, fieldsLayout, defaults, extraValidators, }: {
|
|
28
|
-
data: Item;
|
|
29
|
-
schema: SchemaType;
|
|
30
|
-
columns?: GridEnrichedBySchemaColDef[];
|
|
31
|
-
fieldsLayout: FormFieldLayout[] | undefined;
|
|
32
|
-
defaults?: Item;
|
|
33
|
-
extraValidators?: ExtraValidators;
|
|
34
|
-
}): {
|
|
35
|
-
values: Record<string, any>;
|
|
36
|
-
finalSchema: {
|
|
37
|
-
[x: string]: Field;
|
|
38
|
-
};
|
|
39
|
-
validationSchema: Yup.ObjectSchema<Record<string, any>, Yup.AnyObject, any, ""> | null;
|
|
40
|
-
};
|
|
41
|
-
export declare const errorProps: ({ errors, fieldKey, fieldKeyProp, index, }: {
|
|
42
|
-
errors: Item;
|
|
43
|
-
fieldKey: string;
|
|
44
|
-
fieldKeyProp: string;
|
|
45
|
-
index?: number;
|
|
46
|
-
}) => {
|
|
47
|
-
error: any;
|
|
48
|
-
helperText: any;
|
|
49
|
-
};
|
|
50
|
-
/**
|
|
51
|
-
* Normalizes a DRF (Django REST Framework) validation error payload into a
|
|
52
|
-
* react-hook-form `setError`-compatible map: `{ fieldKey: { type, message } }`.
|
|
53
|
-
*
|
|
54
|
-
* DRF returns per-field errors both as `{ field: "message" }` and
|
|
55
|
-
* `{ field: ["message 1", "message 2"] }`, plus `{ non_field_errors: [...] }`.
|
|
56
|
-
* Only fields present in the given `schema` are mapped, so backend-only keys
|
|
57
|
-
* (or `non_field_errors`) are skipped and remain surfaced through the generic
|
|
58
|
-
* error message instead. This is what allows a `validate()` raised
|
|
59
|
-
* `ValidationError({"field": "..."})` to be rendered under the offending field,
|
|
60
|
-
* exactly like a yup validation error.
|
|
61
|
-
*/
|
|
62
|
-
export declare function getFieldErrorsFromResponse<T extends TField = void>(response: unknown, schema?: SchemaType<T>): Record<string, {
|
|
63
|
-
type: string;
|
|
64
|
-
message: string;
|
|
65
|
-
}>;
|
|
66
|
-
export declare const getTmpId: () => string;
|
|
67
|
-
export declare const isTmpId: (id: string | number | undefined | null) => boolean;
|
|
68
|
-
export declare function reducer<T>(state: T | null, newState: Partial<T> | null): T | null;
|
|
69
|
-
export declare const getPatternFormat: (type: string) => string;
|
|
70
|
-
export declare function buildDateFormatBySchema(dateViews: string[] | null | undefined): "DD/MM/YYYY" | "MM/YYYY" | "YYYY" | "MM" | "DD";
|
|
71
|
-
export declare const slugToCamelCase: (str: string, includeFirst?: boolean) => string;
|
|
72
|
-
export declare const slugify: (text: string | null) => string;
|
|
73
|
-
export declare function mergeFilterItems(defaultFilter: GridFilterModel | undefined, filter: GridFilterModel | undefined): GridFilterModel | undefined;
|
|
74
|
-
export declare function initViewColumns({ schema, columns, customColumnOperations, }: {
|
|
75
|
-
schema: SchemaType;
|
|
76
|
-
columns: GridEnrichedBySchemaColDef[];
|
|
77
|
-
customColumnOperations?: (p: GridEnrichedBySchemaColDef) => GridEnrichedBySchemaColDef | Promise<GridEnrichedBySchemaColDef>;
|
|
78
|
-
}): Promise<(Omit<import("@mui/x-data-grid").GridColDef<Record<string, any>>, "field"> & {
|
|
79
|
-
field: string;
|
|
80
|
-
isIndexField?: boolean;
|
|
81
|
-
creatable?: boolean;
|
|
82
|
-
disabled?: boolean;
|
|
83
|
-
orderable?: boolean;
|
|
84
|
-
patternFormat?: string;
|
|
85
|
-
uiRequired?: boolean;
|
|
86
|
-
})[]>;
|
|
87
|
-
export declare function deepEqual(a: unknown, b: unknown, maxIterations?: number): boolean;
|
|
88
|
-
export declare function shouldMemoUpdate<T extends object>(prevProps: Readonly<T>, nextProps: Readonly<T>): boolean;
|
|
89
|
-
export declare const convertToFormData: (data: Item) => FormData;
|
|
90
|
-
export declare function formatFileSize(bytes: number): string;
|
|
91
|
-
export declare function getFieldsFromFieldsLayout(fieldsLayout: FormFieldLayout[]): string[];
|
|
92
|
-
export declare function isFieldRequired(fieldSchema?: Field, isInForm?: boolean): boolean;
|
|
93
|
-
export declare function extractFieldValue(genericValue: GenericValue): any;
|
|
94
|
-
export declare function buildConditionalVisibleBySchema<T extends TField = void>(schema?: SchemaType<T> | null): ConditionalVisible[];
|
|
95
|
-
export declare function showConditionalVisibleField(field: string | CustomFormField, conditionalVisible?: ConditionalVisible[], values?: GenericValue[]): boolean;
|
|
96
|
-
export declare function showConditionalVisibleFieldObj<T extends TField = void>(field: string | CustomFormField, conditionalVisible?: ConditionalVisible[], values?: Item<T>): boolean;
|
|
97
|
-
/**
|
|
98
|
-
* Detect whether the consuming app has installed leaflet + leaflet-draw.
|
|
99
|
-
* Uses CJS require so that the bundler does not fail to build when they are
|
|
100
|
-
* absent; returns null so callers can fall back to text inputs.
|
|
101
|
-
*/
|
|
102
|
-
export declare function getMapLibraries(): any;
|
|
103
|
-
/** Normalize a GeoJSON value (object, JSON string or null) to a string. */
|
|
104
|
-
export declare function geometryValueToString(value: GenericValue): string;
|
|
105
|
-
/** Parse a GeoJSON value (object or JSON string) into an object, or null. */
|
|
106
|
-
export declare function parseGeoJSON(geoType: GeometryFieldType, rawValue: GenericValue): geojson.GeoJsonObject | geojson.GeoJsonObject[] | null;
|
|
107
|
-
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +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