drf-react-by-schema 0.28.6 → 0.28.7
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 +8 -21
- 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
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"GridDateTimeInput.d.ts","sourceRoot":"","sources":["../../../src/components/DataGridBySchemaEditable/GridDateTimeInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmD,MAAM,OAAO,CAAC;AACxE,OAAO,EAAE,wBAAwB,EAAqB,MAAM,kBAAkB,CAAC;AAS/E,MAAM,CAAC,OAAO,UAAU,iBAAiB,CACvC,KAAK,EAAE,wBAAwB,GAAG;IAChC,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,qBA6HF"}
|
|
@@ -1,154 +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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
36
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
37
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
38
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
39
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
40
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
41
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
42
|
-
});
|
|
43
|
-
};
|
|
44
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
45
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
46
|
-
};
|
|
47
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
48
|
-
exports.default = GridDateTimeInput;
|
|
49
|
-
const react_1 = __importStar(require("react"));
|
|
50
|
-
const x_data_grid_1 = require("@mui/x-data-grid");
|
|
51
|
-
const DesktopDateTimePicker_1 = require("@mui/x-date-pickers/DesktopDateTimePicker");
|
|
52
|
-
const LocalizationProvider_1 = require("@mui/x-date-pickers/LocalizationProvider");
|
|
53
|
-
const AdapterDayjs_1 = require("@mui/x-date-pickers/AdapterDayjs");
|
|
54
|
-
const dayjs_1 = __importDefault(require("dayjs"));
|
|
55
|
-
const grid_1 = require("../../styles/grid");
|
|
56
|
-
function GridDateTimeInput(props) {
|
|
57
|
-
const { id, value, field, error, helperText, hasFocus, colDef } = props;
|
|
58
|
-
const apiRef = (0, x_data_grid_1.useGridApiContext)();
|
|
59
|
-
const [openPicker, setOpenPicker] = (0, react_1.useState)(false);
|
|
60
|
-
const isShiftPressed = (0, react_1.useRef)(false);
|
|
61
|
-
// const inputRef = useRef<HTMLInputElement>(null);
|
|
62
|
-
// const buttonRef = useRef<HTMLButtonElement>(null);
|
|
63
|
-
const handleOpenPicker = () => {
|
|
64
|
-
setOpenPicker(true);
|
|
65
|
-
};
|
|
66
|
-
const handleCloseCalendar = () => {
|
|
67
|
-
setOpenPicker(false);
|
|
68
|
-
};
|
|
69
|
-
// useLayoutEffect(() => {
|
|
70
|
-
// if (hasFocus) {
|
|
71
|
-
// if (buttonRef.current) {
|
|
72
|
-
// buttonRef.current.focus();
|
|
73
|
-
// } else {
|
|
74
|
-
// inputRef.current?.focus();
|
|
75
|
-
// }
|
|
76
|
-
// }
|
|
77
|
-
// }, [hasFocus, field, apiRef]);
|
|
78
|
-
const inputCallbackRef = (0, react_1.useCallback)((node) => {
|
|
79
|
-
if (node && hasFocus) {
|
|
80
|
-
// Scenario: Forward Tab OR API setCellFocus
|
|
81
|
-
if (!isShiftPressed.current) {
|
|
82
|
-
requestAnimationFrame(() => {
|
|
83
|
-
node.focus();
|
|
84
|
-
node.select();
|
|
85
|
-
});
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
}, [hasFocus]);
|
|
89
|
-
const buttonCallbackRef = (0, react_1.useCallback)((node) => {
|
|
90
|
-
if (node && hasFocus) {
|
|
91
|
-
// Scenario: Backward Tab (Shift + Tab)
|
|
92
|
-
if (isShiftPressed.current) {
|
|
93
|
-
requestAnimationFrame(() => {
|
|
94
|
-
node.focus();
|
|
95
|
-
});
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
}, [hasFocus]);
|
|
99
|
-
const handleChange = (newValue) => __awaiter(this, void 0, void 0, function* () {
|
|
100
|
-
yield apiRef.current.setEditCellValue({ id, field, value: newValue });
|
|
101
|
-
// apiRef.current.stopCellEditMode({ id, field });
|
|
102
|
-
});
|
|
103
|
-
(0, react_1.useEffect)(() => {
|
|
104
|
-
const handleKeyDown = (e) => {
|
|
105
|
-
if (e.key === 'Shift')
|
|
106
|
-
isShiftPressed.current = true;
|
|
107
|
-
};
|
|
108
|
-
const handleKeyUp = (e) => {
|
|
109
|
-
if (e.key === 'Shift')
|
|
110
|
-
isShiftPressed.current = false;
|
|
111
|
-
};
|
|
112
|
-
window.addEventListener('keydown', handleKeyDown);
|
|
113
|
-
window.addEventListener('keyup', handleKeyUp);
|
|
114
|
-
return () => {
|
|
115
|
-
window.removeEventListener('keydown', handleKeyDown);
|
|
116
|
-
window.removeEventListener('keyup', handleKeyUp);
|
|
117
|
-
};
|
|
118
|
-
}, []);
|
|
119
|
-
return (react_1.default.createElement(LocalizationProvider_1.LocalizationProvider, { dateAdapter: AdapterDayjs_1.AdapterDayjs, adapterLocale: "pt-br" },
|
|
120
|
-
react_1.default.createElement(DesktopDateTimePicker_1.DesktopDateTimePicker, { key: field, open: openPicker, onOpen: handleOpenPicker, onClose: handleCloseCalendar, value: (0, dayjs_1.default)(value), onChange: handleChange, slotProps: {
|
|
121
|
-
textField: {
|
|
122
|
-
// margin: 'normal',
|
|
123
|
-
inputRef: inputCallbackRef,
|
|
124
|
-
sx: grid_1.seamlessTextFieldStyle,
|
|
125
|
-
error,
|
|
126
|
-
helperText,
|
|
127
|
-
inputProps: {
|
|
128
|
-
'aria-label': `Editar ${colDef.headerName || field}. Pressione Entre para escolher do calendário ou digite a data.`,
|
|
129
|
-
},
|
|
130
|
-
onKeyDown: (event) => {
|
|
131
|
-
if (event.key === 'Tab' && !event.shiftKey) {
|
|
132
|
-
// Force to go to the calendar icon menu
|
|
133
|
-
event.stopPropagation();
|
|
134
|
-
}
|
|
135
|
-
if (event.key === 'Enter') {
|
|
136
|
-
handleOpenPicker();
|
|
137
|
-
}
|
|
138
|
-
},
|
|
139
|
-
// ...other,
|
|
140
|
-
},
|
|
141
|
-
openPickerButton: {
|
|
142
|
-
ref: buttonCallbackRef,
|
|
143
|
-
onKeyDown: (event) => {
|
|
144
|
-
if (event.key === 'Tab' && event.shiftKey) {
|
|
145
|
-
// Force to go back to Input
|
|
146
|
-
event.stopPropagation();
|
|
147
|
-
}
|
|
148
|
-
if (event.key === 'Enter') {
|
|
149
|
-
event.stopPropagation();
|
|
150
|
-
}
|
|
151
|
-
},
|
|
152
|
-
},
|
|
153
|
-
} })));
|
|
154
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { GridRenderEditCellParams } from '@mui/x-data-grid';
|
|
3
|
-
export default function GridDecimalInput(props: GridRenderEditCellParams & {
|
|
4
|
-
decimalPlaces?: number;
|
|
5
|
-
prefix?: string;
|
|
6
|
-
suffix?: string;
|
|
7
|
-
isCurrency?: boolean;
|
|
8
|
-
helperText?: string;
|
|
9
|
-
}): React.JSX.Element;
|
|
10
|
-
//# sourceMappingURL=GridDecimalInput.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"GridDecimalInput.d.ts","sourceRoot":"","sources":["../../../src/components/DataGridBySchemaEditable/GridDecimalInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsB,MAAM,OAAO,CAAC;AAC3C,OAAO,EAAE,wBAAwB,EAAqB,MAAM,kBAAkB,CAAC;AAW/E,MAAM,CAAC,OAAO,UAAU,gBAAgB,CACtC,KAAK,EAAE,wBAAwB,GAAG;IAChC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,qBAiEF"}
|
|
@@ -1,78 +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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
36
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
37
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
38
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
39
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
40
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
41
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
42
|
-
});
|
|
43
|
-
};
|
|
44
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
45
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
46
|
-
};
|
|
47
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
48
|
-
exports.default = GridDecimalInput;
|
|
49
|
-
const react_1 = __importStar(require("react"));
|
|
50
|
-
const x_data_grid_1 = require("@mui/x-data-grid");
|
|
51
|
-
const react_number_format_1 = require("react-number-format");
|
|
52
|
-
const TextField_1 = __importDefault(require("@mui/material/TextField"));
|
|
53
|
-
const grid_1 = require("../../styles/grid");
|
|
54
|
-
function GridDecimalInput(props) {
|
|
55
|
-
const { id, value, field, decimalPlaces, prefix, suffix, isCurrency, colDef, error, helperText, hasFocus, } = props;
|
|
56
|
-
const apiRef = (0, x_data_grid_1.useGridApiContext)();
|
|
57
|
-
const inputCallbackRef = (0, react_1.useCallback)((node) => {
|
|
58
|
-
if (node !== null && hasFocus) {
|
|
59
|
-
requestAnimationFrame(() => {
|
|
60
|
-
node.focus();
|
|
61
|
-
node.select();
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
}, [hasFocus]);
|
|
65
|
-
const prefixFinal = isCurrency ? 'R$ ' : prefix !== '' ? `${prefix} ` : '';
|
|
66
|
-
const suffixFinal = suffix !== '' ? ` ${suffix}` : '';
|
|
67
|
-
const decimalScale = typeof decimalPlaces === 'undefined' ? 2 : decimalPlaces;
|
|
68
|
-
const handleChange = (newValue) => __awaiter(this, void 0, void 0, function* () {
|
|
69
|
-
yield apiRef.current.setEditCellValue({ id, field, value: newValue });
|
|
70
|
-
});
|
|
71
|
-
return (react_1.default.createElement(react_number_format_1.NumericFormat, { key: field, id: field, inputRef: inputCallbackRef, onValueChange: (values) => {
|
|
72
|
-
handleChange(values.value);
|
|
73
|
-
}, value: value, thousandSeparator: ".", decimalSeparator: ",", decimalScale: decimalScale, fixedDecimalScale: true, valueIsNumericString: true, prefix: prefixFinal, suffix: suffixFinal, customInput: TextField_1.default, slotProps: {
|
|
74
|
-
htmlInput: {
|
|
75
|
-
'aria-label': `Editar ${colDef.headerName || field}. Pressione Enter para salvar toda a linha.`,
|
|
76
|
-
},
|
|
77
|
-
}, error: error, helperText: helperText, sx: grid_1.seamlessTextFieldStyle }));
|
|
78
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { GridRenderCellParams } from '@mui/x-data-grid';
|
|
3
|
-
export interface GridGenericInputProps extends GridRenderCellParams {
|
|
4
|
-
error?: boolean;
|
|
5
|
-
helperText?: string;
|
|
6
|
-
}
|
|
7
|
-
export default function GridGenericInput(props: GridGenericInputProps): React.JSX.Element;
|
|
8
|
-
//# sourceMappingURL=GridGenericInput.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"GridGenericInput.d.ts","sourceRoot":"","sources":["../../../src/components/DataGridBySchemaEditable/GridGenericInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAqB,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAI3E,MAAM,WAAW,qBAAsB,SAAQ,oBAAoB;IACjE,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,qBAsBpE"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
-
var t = {};
|
|
4
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
-
t[p] = s[p];
|
|
6
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
-
t[p[i]] = s[p[i]];
|
|
10
|
-
}
|
|
11
|
-
return t;
|
|
12
|
-
};
|
|
13
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.default = GridGenericInput;
|
|
18
|
-
const react_1 = __importDefault(require("react"));
|
|
19
|
-
const x_data_grid_1 = require("@mui/x-data-grid");
|
|
20
|
-
const Box_1 = __importDefault(require("@mui/material/Box"));
|
|
21
|
-
const FormHelperText_1 = __importDefault(require("@mui/material/FormHelperText"));
|
|
22
|
-
function GridGenericInput(props) {
|
|
23
|
-
const { error, helperText, hasFocus } = props, other = __rest(props, ["error", "helperText", "hasFocus"]);
|
|
24
|
-
return (react_1.default.createElement(Box_1.default, { sx: { width: '100%', display: 'flex', flexDirection: 'column', justifyContent: 'center' } },
|
|
25
|
-
react_1.default.createElement(x_data_grid_1.GridEditInputCell, Object.assign({}, other, { error: error, hasFocus: hasFocus, autoFocus: hasFocus, sx: {
|
|
26
|
-
'& .MuiInputBase-root': { height: '100%' },
|
|
27
|
-
'& .MuiInputBase-input': { py: helperText ? '4px' : 'inherit' },
|
|
28
|
-
} })),
|
|
29
|
-
helperText && (react_1.default.createElement(FormHelperText_1.default, { error: error, sx: { px: 1, pb: 0.5, lineHeight: 1.2, m: 0 } }, helperText))));
|
|
30
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { GridRenderEditCellParams } from '@mui/x-data-grid';
|
|
3
|
-
export default function GridPatternInput({ id, value, field, patternFormat, error, helperText, hasFocus, colDef, }: GridRenderEditCellParams & {
|
|
4
|
-
patternFormat?: string;
|
|
5
|
-
helperText?: string;
|
|
6
|
-
}): React.JSX.Element;
|
|
7
|
-
//# sourceMappingURL=GridPatternInput.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"GridPatternInput.d.ts","sourceRoot":"","sources":["../../../src/components/DataGridBySchemaEditable/GridPatternInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsB,MAAM,OAAO,CAAC;AAC3C,OAAO,EAAE,wBAAwB,EAAqB,MAAM,kBAAkB,CAAC;AAK/E,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAC,EACvC,EAAE,EACF,KAAK,EACL,KAAK,EACL,aAAqB,EACrB,KAAK,EACL,UAAU,EACV,QAAQ,EACR,MAAM,GACP,EAAE,wBAAwB,GAAG;IAAE,aAAa,CAAC,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,CAAA;CAAE,qBAyC5E"}
|
|
@@ -1,74 +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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
36
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
37
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
38
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
39
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
40
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
41
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
42
|
-
});
|
|
43
|
-
};
|
|
44
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
45
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
46
|
-
};
|
|
47
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
48
|
-
exports.default = GridPatternInput;
|
|
49
|
-
const react_1 = __importStar(require("react"));
|
|
50
|
-
const x_data_grid_1 = require("@mui/x-data-grid");
|
|
51
|
-
const react_number_format_1 = require("react-number-format");
|
|
52
|
-
const TextField_1 = __importDefault(require("@mui/material/TextField"));
|
|
53
|
-
const grid_1 = require("../../styles/grid");
|
|
54
|
-
function GridPatternInput({ id, value, field, patternFormat = 'cpf', error, helperText, hasFocus, colDef, }) {
|
|
55
|
-
const apiRef = (0, x_data_grid_1.useGridApiContext)();
|
|
56
|
-
const inputCallbackRef = (0, react_1.useCallback)((node) => {
|
|
57
|
-
if (node !== null && hasFocus) {
|
|
58
|
-
requestAnimationFrame(() => {
|
|
59
|
-
node.focus();
|
|
60
|
-
node.select();
|
|
61
|
-
});
|
|
62
|
-
}
|
|
63
|
-
}, [hasFocus]);
|
|
64
|
-
const handleChange = (newValue) => __awaiter(this, void 0, void 0, function* () {
|
|
65
|
-
yield apiRef.current.setEditCellValue({ id, field, value: newValue });
|
|
66
|
-
});
|
|
67
|
-
return (react_1.default.createElement(react_number_format_1.PatternFormat, { key: field, id: field, inputRef: inputCallbackRef, onValueChange: (values) => {
|
|
68
|
-
handleChange(values.value);
|
|
69
|
-
}, value: value, valueIsNumericString: true, format: patternFormat, mask: "_", customInput: TextField_1.default, slotProps: {
|
|
70
|
-
htmlInput: {
|
|
71
|
-
'aria-label': `Editar ${colDef.headerName || field}. Pressione Enter para salvar toda a linha.`,
|
|
72
|
-
},
|
|
73
|
-
}, error: error, helperText: helperText, sx: grid_1.seamlessTextFieldStyle }));
|
|
74
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import React, { RefObject } from 'react';
|
|
2
|
-
import { Id } from '../../@types';
|
|
3
|
-
type FilterValue = [string | undefined, string | undefined] | string;
|
|
4
|
-
type GridFilterItem = {
|
|
5
|
-
columnField: string;
|
|
6
|
-
id: Id;
|
|
7
|
-
operatorValue: string;
|
|
8
|
-
value: FilterValue;
|
|
9
|
-
};
|
|
10
|
-
type InputIntervalProps = {
|
|
11
|
-
applyValue: (params: GridFilterItem) => void;
|
|
12
|
-
focusElementRef?: null | ((instance: HTMLInputElement | null) => void) | RefObject<HTMLInputElement>;
|
|
13
|
-
item: GridFilterItem;
|
|
14
|
-
type: string;
|
|
15
|
-
};
|
|
16
|
-
type WrapperProps = Omit<InputIntervalProps, 'type'>;
|
|
17
|
-
export declare const InputNumberInterval: (props: WrapperProps) => React.JSX.Element;
|
|
18
|
-
export declare const InputDateInterval: (props: WrapperProps) => React.JSX.Element;
|
|
19
|
-
export declare const InputFloatInterval: (props: WrapperProps) => React.JSX.Element;
|
|
20
|
-
export {};
|
|
21
|
-
//# sourceMappingURL=InputInterval.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"InputInterval.d.ts","sourceRoot":"","sources":["../../../src/components/DataGridBySchemaEditable/InputInterval.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAoB,SAAS,EAAU,MAAM,OAAO,CAAC;AAKnE,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAIlC,KAAK,WAAW,GAAG,CAAC,MAAM,GAAG,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC,GAAG,MAAM,CAAC;AAErE,KAAK,cAAc,GAAG;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,EAAE,EAAE,EAAE,CAAC;IACP,aAAa,EAAE,MAAM,CAAC;IACtB,KAAK,EAAE,WAAW,CAAC;CACpB,CAAC;AAEF,KAAK,kBAAkB,GAAG;IACxB,UAAU,EAAE,CAAC,MAAM,EAAE,cAAc,KAAK,IAAI,CAAC;IAC7C,eAAe,CAAC,EACd,IAAI,GACJ,CAAC,CAAC,QAAQ,EAAE,gBAAgB,GAAG,IAAI,KAAK,IAAI,CAAC,GAC7C,SAAS,CAAC,gBAAgB,CAAC,CAAC;IAC9B,IAAI,EAAE,cAAc,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAoKF,KAAK,YAAY,GAAG,IAAI,CAAC,kBAAkB,EAAE,MAAM,CAAC,CAAC;AAErD,eAAO,MAAM,mBAAmB,GAAI,OAAO,YAAY,sBAEtD,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,OAAO,YAAY,sBAEpD,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAI,OAAO,YAAY,sBAErD,CAAC"}
|
|
@@ -1,131 +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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
|
-
};
|
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.InputFloatInterval = exports.InputDateInterval = exports.InputNumberInterval = void 0;
|
|
40
|
-
const react_1 = __importStar(require("react"));
|
|
41
|
-
const Box_1 = __importDefault(require("@mui/system/Box"));
|
|
42
|
-
const TextField_1 = __importDefault(require("@mui/material/TextField"));
|
|
43
|
-
const react_number_format_1 = require("react-number-format");
|
|
44
|
-
const Sync_1 = __importDefault(require("@mui/icons-material/Sync"));
|
|
45
|
-
const SUBMIT_FILTER_STROKE_TIME = 500;
|
|
46
|
-
const InputInterval = ({ item, applyValue, focusElementRef = null, type }) => {
|
|
47
|
-
var _a;
|
|
48
|
-
const filterTimeout = (0, react_1.useRef)(undefined);
|
|
49
|
-
const [filterValueState, setFilterValueState] = react_1.default.useState((_a = item.value) !== null && _a !== void 0 ? _a : '');
|
|
50
|
-
const [applying, setIsApplying] = react_1.default.useState(false);
|
|
51
|
-
react_1.default.useEffect(() => {
|
|
52
|
-
return () => {
|
|
53
|
-
clearTimeout(filterTimeout.current);
|
|
54
|
-
};
|
|
55
|
-
}, []);
|
|
56
|
-
react_1.default.useEffect(() => {
|
|
57
|
-
var _a;
|
|
58
|
-
const itemValue = (_a = item.value) !== null && _a !== void 0 ? _a : [undefined, undefined];
|
|
59
|
-
setFilterValueState(itemValue);
|
|
60
|
-
}, [item.value]);
|
|
61
|
-
const updateFilterValue = (lowerBound, upperBound) => {
|
|
62
|
-
clearTimeout(filterTimeout.current);
|
|
63
|
-
setFilterValueState([lowerBound, upperBound]);
|
|
64
|
-
setIsApplying(true);
|
|
65
|
-
filterTimeout.current = setTimeout(() => {
|
|
66
|
-
setIsApplying(false);
|
|
67
|
-
applyValue(Object.assign(Object.assign({}, item), { value: [lowerBound, upperBound] }));
|
|
68
|
-
}, SUBMIT_FILTER_STROKE_TIME);
|
|
69
|
-
};
|
|
70
|
-
const handleUpperFilterChange = (event) => {
|
|
71
|
-
var _a;
|
|
72
|
-
const newUpperBound = (_a = event.target) === null || _a === void 0 ? void 0 : _a.value;
|
|
73
|
-
updateFilterValue(filterValueState[0], newUpperBound);
|
|
74
|
-
};
|
|
75
|
-
const handleLowerFilterChange = (event) => {
|
|
76
|
-
var _a;
|
|
77
|
-
const newLowerBound = (_a = event.target) === null || _a === void 0 ? void 0 : _a.value;
|
|
78
|
-
updateFilterValue(newLowerBound, filterValueState[1]);
|
|
79
|
-
};
|
|
80
|
-
return (react_1.default.createElement(Box_1.default, { sx: {
|
|
81
|
-
display: 'inline-flex',
|
|
82
|
-
flexDirection: 'row',
|
|
83
|
-
alignItems: 'end',
|
|
84
|
-
height: 48,
|
|
85
|
-
pl: '20px',
|
|
86
|
-
} },
|
|
87
|
-
type === 'number' && (react_1.default.createElement(react_1.default.Fragment, null,
|
|
88
|
-
react_1.default.createElement(TextField_1.default, { name: "lower-bound-input", placeholder: "De", label: "De", variant: "standard", value: Number(filterValueState[0]), onChange: handleLowerFilterChange, type: "number", inputRef: focusElementRef, sx: { mr: 2, minWidth: 130 } }),
|
|
89
|
-
react_1.default.createElement(TextField_1.default, { name: "upper-bound-input", placeholder: "At\u00E9", label: "At\u00E9", variant: "standard", value: Number(filterValueState[1]), onChange: handleUpperFilterChange, type: "number", sx: { minWidth: 130 }, slotProps: {
|
|
90
|
-
input: {
|
|
91
|
-
endAdornment: applying ? react_1.default.createElement(Sync_1.default, null) : undefined,
|
|
92
|
-
}
|
|
93
|
-
} }))),
|
|
94
|
-
type === 'float' && (react_1.default.createElement(react_1.default.Fragment, null,
|
|
95
|
-
react_1.default.createElement(react_number_format_1.NumericFormat, { name: "lower-bound-input", placeholder: "De", label: "De", variant: "standard", value: Number(filterValueState[0]), onValueChange: (values) => {
|
|
96
|
-
handleLowerFilterChange({ target: { value: values.value } });
|
|
97
|
-
}, thousandSeparator: ".", decimalSeparator: ",", decimalScale: 2, fixedDecimalScale: true, valueIsNumericString: true, inputRef: focusElementRef, sx: { mr: 2, minWidth: 130 }, customInput: TextField_1.default }),
|
|
98
|
-
react_1.default.createElement(react_number_format_1.NumericFormat, { name: "upper-bound-input", placeholder: "At\u00E9", label: "At\u00E9", variant: "standard", value: Number(filterValueState[1]), onValueChange: (values) => {
|
|
99
|
-
handleUpperFilterChange({ target: { value: values.value } });
|
|
100
|
-
}, thousandSeparator: ".", decimalSeparator: ",", decimalScale: 2, fixedDecimalScale: true, valueIsNumericString: true, sx: { minWidth: 130 }, customInput: TextField_1.default, slotProps: {
|
|
101
|
-
input: {
|
|
102
|
-
endAdornment: applying ? react_1.default.createElement(Sync_1.default, null) : undefined,
|
|
103
|
-
}
|
|
104
|
-
} }))),
|
|
105
|
-
type === 'date' && (react_1.default.createElement(react_1.default.Fragment, null,
|
|
106
|
-
react_1.default.createElement(TextField_1.default, { name: "lower-bound-input", label: "De", variant: "standard", value: filterValueState[0] || '', onChange: handleLowerFilterChange, type: "date", inputRef: focusElementRef, slotProps: {
|
|
107
|
-
inputLabel: {
|
|
108
|
-
shrink: true,
|
|
109
|
-
}
|
|
110
|
-
}, sx: { mr: 2, minWidth: 130 } }),
|
|
111
|
-
react_1.default.createElement(TextField_1.default, { name: "upper-bound-input", label: "At\u00E9", variant: "standard", value: filterValueState[1] || '', onChange: handleUpperFilterChange, type: "date", slotProps: {
|
|
112
|
-
input: {
|
|
113
|
-
endAdornment: applying ? react_1.default.createElement(Sync_1.default, null) : undefined,
|
|
114
|
-
},
|
|
115
|
-
inputLabel: {
|
|
116
|
-
shrink: true,
|
|
117
|
-
}
|
|
118
|
-
}, sx: { minWidth: 130 } })))));
|
|
119
|
-
};
|
|
120
|
-
const InputNumberInterval = (props) => {
|
|
121
|
-
return react_1.default.createElement(InputInterval, Object.assign({}, props, { type: "number" }));
|
|
122
|
-
};
|
|
123
|
-
exports.InputNumberInterval = InputNumberInterval;
|
|
124
|
-
const InputDateInterval = (props) => {
|
|
125
|
-
return react_1.default.createElement(InputInterval, Object.assign({}, props, { type: "date" }));
|
|
126
|
-
};
|
|
127
|
-
exports.InputDateInterval = InputDateInterval;
|
|
128
|
-
const InputFloatInterval = (props) => {
|
|
129
|
-
return react_1.default.createElement(InputInterval, Object.assign({}, props, { type: "float" }));
|
|
130
|
-
};
|
|
131
|
-
exports.InputFloatInterval = InputFloatInterval;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { PaginationModel } from '../../@types';
|
|
3
|
-
type MobileSearchBarProps = {
|
|
4
|
-
paginationModel: PaginationModel;
|
|
5
|
-
setPaginationModel: (x: PaginationModel) => void;
|
|
6
|
-
};
|
|
7
|
-
declare function MobileSearchBar({ paginationModel, setPaginationModel }: MobileSearchBarProps): React.JSX.Element;
|
|
8
|
-
export default MobileSearchBar;
|
|
9
|
-
//# sourceMappingURL=MobileSearchBar.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MobileSearchBar.d.ts","sourceRoot":"","sources":["../../../src/components/DataGridBySchemaEditable/MobileSearchBar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AASvC,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAE/C,KAAK,oBAAoB,GAAG;IAC1B,eAAe,EAAE,eAAe,CAAC;IACjC,kBAAkB,EAAE,CAAC,CAAC,EAAE,eAAe,KAAK,IAAI,CAAC;CAClD,CAAC;AAEF,iBAAS,eAAe,CAAC,EAAE,eAAe,EAAE,kBAAkB,EAAE,EAAE,oBAAoB,qBAmDrF;AAED,eAAe,eAAe,CAAC"}
|
|
@@ -1,70 +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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
|
-
};
|
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
const react_1 = __importStar(require("react"));
|
|
40
|
-
const styles_1 = require("@mui/material/styles");
|
|
41
|
-
const TextField_1 = __importDefault(require("@mui/material/TextField"));
|
|
42
|
-
const InputAdornment_1 = __importDefault(require("@mui/material/InputAdornment"));
|
|
43
|
-
const IconButton_1 = __importDefault(require("@mui/material/IconButton"));
|
|
44
|
-
const Search_1 = __importDefault(require("@mui/icons-material/Search"));
|
|
45
|
-
const Clear_1 = __importDefault(require("@mui/icons-material/Clear"));
|
|
46
|
-
function MobileSearchBar({ paginationModel, setPaginationModel }) {
|
|
47
|
-
var _a, _b, _c, _d, _e;
|
|
48
|
-
const theme = (0, styles_1.useTheme)();
|
|
49
|
-
const q = (0, react_1.useMemo)(() => {
|
|
50
|
-
var _a;
|
|
51
|
-
return (((_a = paginationModel.filter) === null || _a === void 0 ? void 0 : _a.quickFilterValues) || [''])[0];
|
|
52
|
-
}, [(_a = paginationModel.filter) === null || _a === void 0 ? void 0 : _a.quickFilterValues]);
|
|
53
|
-
const quickFilterLabel = (_e = (_d = (_c = (_b = theme.components) === null || _b === void 0 ? void 0 : _b.MuiDataGrid) === null || _c === void 0 ? void 0 : _c.defaultProps) === null || _d === void 0 ? void 0 : _d.localeText) === null || _e === void 0 ? void 0 : _e.toolbarQuickFilterLabel;
|
|
54
|
-
const handleSearchChange = (newQ) => {
|
|
55
|
-
setPaginationModel(Object.assign(Object.assign({}, paginationModel), { filter: Object.assign(Object.assign({ items: [] }, paginationModel.filter), { quickFilterValues: [newQ] }) }));
|
|
56
|
-
};
|
|
57
|
-
const handleChangeEvent = (event) => {
|
|
58
|
-
handleSearchChange(event.target.value);
|
|
59
|
-
};
|
|
60
|
-
return (react_1.default.createElement(TextField_1.default, { placeholder: quickFilterLabel, variant: "outlined", size: "small", value: q, InputProps: {
|
|
61
|
-
startAdornment: (react_1.default.createElement(InputAdornment_1.default, { position: "start" },
|
|
62
|
-
react_1.default.createElement(Search_1.default, null))),
|
|
63
|
-
endAdornment: (react_1.default.createElement(InputAdornment_1.default, { position: "end" },
|
|
64
|
-
react_1.default.createElement(IconButton_1.default, { onClick: () => handleSearchChange(''), "aria-label": "Limpar busca" },
|
|
65
|
-
react_1.default.createElement(Clear_1.default, null)))),
|
|
66
|
-
}, inputProps: {
|
|
67
|
-
'aria-label': quickFilterLabel,
|
|
68
|
-
}, fullWidth: true, onChange: handleChangeEvent }));
|
|
69
|
-
}
|
|
70
|
-
exports.default = MobileSearchBar;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { TField, WatchEditingRowValues } from '../../@types';
|
|
2
|
-
interface RowEditingWatcherProps<T extends TField> {
|
|
3
|
-
watchEditingRowValues: WatchEditingRowValues<T>;
|
|
4
|
-
}
|
|
5
|
-
declare function RowEditingWatcher<T extends TField>({ watchEditingRowValues }: RowEditingWatcherProps<T>): null;
|
|
6
|
-
export default RowEditingWatcher;
|
|
7
|
-
//# sourceMappingURL=RowEditingWatcher.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RowEditingWatcher.d.ts","sourceRoot":"","sources":["../../../src/components/DataGridBySchemaEditable/RowEditingWatcher.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAY,MAAM,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAGvE,UAAU,sBAAsB,CAAC,CAAC,SAAS,MAAM;IAC/C,qBAAqB,EAAE,qBAAqB,CAAC,CAAC,CAAC,CAAC;CACjD;AAED,iBAAS,iBAAiB,CAAC,CAAC,SAAS,MAAM,EAAE,EAAE,qBAAqB,EAAE,EAAE,sBAAsB,CAAC,CAAC,CAAC,QA6ChG;AAED,eAAe,iBAAiB,CAAC"}
|