drf-react-by-schema 0.28.0 → 0.28.2
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/README.md +11 -0
- package/dist/@types/index.d.ts +3 -5
- package/dist/@types/index.d.ts.map +1 -1
- package/dist/api.d.ts +17 -15
- package/dist/api.d.ts.map +1 -1
- package/dist/components/DataGridBySchemaEditable/BooleanInputCell.d.ts +3 -3
- package/dist/components/DataGridBySchemaEditable/BooleanInputCell.d.ts.map +1 -1
- package/dist/components/DataGridBySchemaEditable/BooleanInputCell.js +1 -1
- package/dist/components/DataGridBySchemaEditable/ConditionalEditWrapper.d.ts +2 -2
- package/dist/components/DataGridBySchemaEditable/ConditionalEditWrapper.d.ts.map +1 -1
- package/dist/components/DataGridBySchemaEditable/ConditionalEditWrapper.js +3 -3
- package/dist/components/DataGridBySchemaEditable/DataGridDesktop.d.ts.map +1 -1
- package/dist/components/DataGridBySchemaEditable/DataGridDesktop.js +18 -11
- package/dist/components/DataGridBySchemaEditable/FileInputCell.d.ts +3 -3
- package/dist/components/DataGridBySchemaEditable/FileInputCell.d.ts.map +1 -1
- package/dist/components/DataGridBySchemaEditable/FileInputCell.js +1 -1
- package/dist/components/DataGridBySchemaEditable/GeoEditCell.d.ts +10 -0
- package/dist/components/DataGridBySchemaEditable/GeoEditCell.d.ts.map +1 -0
- package/dist/components/DataGridBySchemaEditable/GeoEditCell.js +81 -0
- package/dist/components/DataGridBySchemaEditable/GeoThumbCell.d.ts +11 -0
- package/dist/components/DataGridBySchemaEditable/GeoThumbCell.d.ts.map +1 -0
- package/dist/components/DataGridBySchemaEditable/GeoThumbCell.js +84 -0
- package/dist/components/DataGridBySchemaEditable/GridDateInput.d.ts +2 -2
- package/dist/components/DataGridBySchemaEditable/GridDateInput.d.ts.map +1 -1
- package/dist/components/DataGridBySchemaEditable/GridDateInput.js +4 -5
- package/dist/components/DataGridBySchemaEditable/GridDateTimeInput.d.ts +2 -2
- package/dist/components/DataGridBySchemaEditable/GridDateTimeInput.d.ts.map +1 -1
- package/dist/components/DataGridBySchemaEditable/GridDateTimeInput.js +4 -5
- package/dist/components/DataGridBySchemaEditable/GridDecimalInput.d.ts +2 -2
- package/dist/components/DataGridBySchemaEditable/GridDecimalInput.d.ts.map +1 -1
- package/dist/components/DataGridBySchemaEditable/GridDecimalInput.js +4 -5
- package/dist/components/DataGridBySchemaEditable/GridGenericInput.d.ts +1 -1
- package/dist/components/DataGridBySchemaEditable/GridGenericInput.d.ts.map +1 -1
- package/dist/components/DataGridBySchemaEditable/GridGenericInput.js +1 -1
- package/dist/components/DataGridBySchemaEditable/GridPatternInput.d.ts +2 -2
- package/dist/components/DataGridBySchemaEditable/GridPatternInput.d.ts.map +1 -1
- package/dist/components/DataGridBySchemaEditable/GridPatternInput.js +4 -5
- package/dist/components/DataGridBySchemaEditable/SelectEditInputCell.d.ts +1 -1
- package/dist/components/DataGridBySchemaEditable/SelectEditInputCell.d.ts.map +1 -1
- package/dist/components/DataGridBySchemaEditable/SelectEditInputCell.js +1 -1
- package/dist/components/DataGridBySchemaEditable/geoConstants.d.ts +5 -0
- package/dist/components/DataGridBySchemaEditable/geoConstants.d.ts.map +1 -0
- package/dist/components/DataGridBySchemaEditable/geoConstants.js +6 -0
- package/dist/components/DataGridBySchemaEditable/hooks/useProcessRowUpdate.d.ts +1 -1
- package/dist/components/DataGridBySchemaEditable/hooks/useProcessRowUpdate.d.ts.map +1 -1
- package/dist/components/DataGridBySchemaEditable/hooks/useProcessRowUpdate.js +17 -20
- package/dist/components/DataGridBySchemaEditable/utils/columnFactory.d.ts +1 -1
- package/dist/components/DataGridBySchemaEditable/utils/columnFactory.d.ts.map +1 -1
- package/dist/components/DataGridBySchemaEditable/utils/columnFactory.js +45 -26
- package/dist/components/DataGridBySchemaEditable/utils.d.ts +3 -2
- package/dist/components/DataGridBySchemaEditable/utils.d.ts.map +1 -1
- package/dist/components/FileTypeIcon.d.ts +18 -0
- package/dist/components/FileTypeIcon.d.ts.map +1 -0
- package/dist/components/FileTypeIcon.js +48 -0
- package/dist/components/details/DetailFieldBySchema.d.ts.map +1 -1
- package/dist/components/details/DetailFieldBySchema.js +18 -3
- package/dist/components/forms/FieldBySchema.d.ts.map +1 -1
- package/dist/components/forms/FieldBySchema.js +7 -0
- package/dist/components/forms/Form.d.ts.map +1 -1
- package/dist/components/forms/Form.js +20 -3
- package/dist/components/forms/inputs/EditableAutocompleteFieldBySchema.d.ts +4 -5
- package/dist/components/forms/inputs/EditableAutocompleteFieldBySchema.d.ts.map +1 -1
- package/dist/components/forms/inputs/EditableAutocompleteFieldBySchema.js +2 -2
- package/dist/components/forms/inputs/GeometryFieldBySchema.d.ts +8 -0
- package/dist/components/forms/inputs/GeometryFieldBySchema.d.ts.map +1 -0
- package/dist/components/forms/inputs/GeometryFieldBySchema.js +57 -0
- package/dist/components/forms/inputs/MapGeometryPicker.d.ts +19 -0
- package/dist/components/forms/inputs/MapGeometryPicker.d.ts.map +1 -0
- package/dist/components/forms/inputs/MapGeometryPicker.js +250 -0
- package/dist/index.d.ts +7 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +13 -11
- package/dist/styles/theme.d.ts +1 -1
- package/dist/styles/theme.d.ts.map +1 -1
- package/dist/utils/utils.d.ts +23 -5
- package/dist/utils/utils.d.ts.map +1 -1
- package/dist/utils/utils.js +92 -19
- package/package.json +36 -2
package/dist/index.d.ts
CHANGED
|
@@ -9,11 +9,12 @@ import GenericModelList from './components/GenericModelList';
|
|
|
9
9
|
import GenericRelatedModelList from './components/GenericRelatedModelList';
|
|
10
10
|
import DataTotals from './components/DataTotals';
|
|
11
11
|
import DialogActions from './components/DialogActions';
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
12
|
+
import FileTypeIcon from './components/FileTypeIcon';
|
|
13
|
+
import SelectEditInputCell from './components/DataGridBySchemaEditable/SelectEditInputCell';
|
|
14
|
+
import GridDateInput from './components/DataGridBySchemaEditable/GridDateInput';
|
|
15
|
+
import GridDecimalInput from './components/DataGridBySchemaEditable/GridDecimalInput';
|
|
16
|
+
import GridPatternInput from './components/DataGridBySchemaEditable/GridPatternInput';
|
|
17
|
+
import BooleanInputCell from './components/DataGridBySchemaEditable/BooleanInputCell';
|
|
17
18
|
import FormWatcher from './components/forms/FormWatcher';
|
|
18
19
|
import FormBySchema from './components/forms/FormBySchema';
|
|
19
20
|
import FieldBySchema from './components/forms/FieldBySchema';
|
|
@@ -26,6 +27,6 @@ import AutocompleteFieldBySchema from './components/forms/inputs/AutocompleteFie
|
|
|
26
27
|
import FloatFieldBySchema from './components/forms/inputs/FloatFieldBySchema';
|
|
27
28
|
import DetailBySchema from './components/details/DetailBySchema';
|
|
28
29
|
import DetailFieldBySchema from './components/details/DetailFieldBySchema';
|
|
29
|
-
export { DRFReactBySchemaProvider, useAPIWrapper, Form, DialogFormBySchema, DataGridBySchemaEditable, GenericModelList, GenericRelatedModelList, DataTotals, DialogActions, SelectEditInputCell, GridDateInput, GridDecimalInput, GridPatternInput, BooleanInputCell, FormWatcher, FormBySchema, FieldBySchema, TextFieldBySchema, BooleanFieldBySchema, DesktopDatePickerBySchema, DesktopDateTimePickerBySchema, EditableAutocompleteFieldBySchema, AutocompleteFieldBySchema, FloatFieldBySchema, DetailBySchema, DetailFieldBySchema, setAuthToken, emptyByType, getChoiceByValue, populateValues, buildGenericYupValidationSchema, errorProps, getFieldErrorsFromResponse, getTmpId, isTmpId, getPatternFormat, clearJWT, hasJWT, slugToCamelCase, AUTH_EXPIRED_EVENT, };
|
|
30
|
+
export { DRFReactBySchemaProvider, useAPIWrapper, Form, DialogFormBySchema, DataGridBySchemaEditable, GenericModelList, GenericRelatedModelList, DataTotals, DialogActions, FileTypeIcon, SelectEditInputCell, GridDateInput, GridDecimalInput, GridPatternInput, BooleanInputCell, FormWatcher, FormBySchema, FieldBySchema, TextFieldBySchema, BooleanFieldBySchema, DesktopDatePickerBySchema, DesktopDateTimePickerBySchema, EditableAutocompleteFieldBySchema, AutocompleteFieldBySchema, FloatFieldBySchema, DetailBySchema, DetailFieldBySchema, setAuthToken, emptyByType, getChoiceByValue, populateValues, buildGenericYupValidationSchema, errorProps, getFieldErrorsFromResponse, getTmpId, isTmpId, getPatternFormat, clearJWT, hasJWT, slugToCamelCase, AUTH_EXPIRED_EVENT, };
|
|
30
31
|
export * from './@types/index';
|
|
31
32
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,kBAAkB,EAAE,MAAM,OAAO,CAAC;AAC3E,OAAO,EACL,WAAW,EACX,gBAAgB,EAChB,cAAc,EACd,+BAA+B,EAC/B,UAAU,EACV,0BAA0B,EAC1B,QAAQ,EACR,OAAO,EACP,gBAAgB,EAChB,eAAe,EAChB,MAAM,SAAS,CAAC;AAGjB,OAAO,wBAAwB,MAAM,oCAAoC,CAAC;AAG1E,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAG5D,OAAO,IAAI,MAAM,yBAAyB,CAAC;AAC3C,OAAO,kBAAkB,MAAM,uCAAuC,CAAC;AAGvE,OAAO,wBAAwB,MAAM,uCAAuC,CAAC;AAC7E,OAAO,gBAAgB,MAAM,+BAA+B,CAAC;AAC7D,OAAO,uBAAuB,MAAM,sCAAsC,CAAC;AAC3E,OAAO,UAAU,MAAM,yBAAyB,CAAC;AACjD,OAAO,aAAa,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,kBAAkB,EAAE,MAAM,OAAO,CAAC;AAC3E,OAAO,EACL,WAAW,EACX,gB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0CAA0C,CAAC;AAE3E,OAAO,EAEL,wBAAwB,EAGxB,aAAa,EAGb,IAAI,EACJ,kBAAkB,EAGlB,wBAAwB,EACxB,gBAAgB,EAChB,uBAAuB,EACvB,UAAU,EACV,aAAa,EAGb,YAAY,EAGZ,mBAAmB,EACnB,aAAa,EACb,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAGhB,WAAW,EACX,YAAY,EACZ,aAAa,EACb,iBAAiB,EACjB,oBAAoB,EACpB,yBAAyB,EACzB,6BAA6B,EAC7B,iCAAiC,EACjC,yBAAyB,EACzB,kBAAkB,EAGlB,cAAc,EACd,mBAAmB,EAGnB,YAAY,EACZ,WAAW,EACX,gBAAgB,EAChB,cAAc,EACd,+BAA+B,EAC/B,UAAU,EACV,0BAA0B,EAC1B,QAAQ,EACR,OAAO,EACP,gBAAgB,EAChB,QAAQ,EACR,MAAM,EACN,eAAe,EACf,kBAAkB,GACnB,CAAC;AAEF,cAAc,gBAAgB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -17,7 +17,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
17
17
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
18
18
|
};
|
|
19
19
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
-
exports.AUTH_EXPIRED_EVENT = exports.slugToCamelCase = exports.hasJWT = exports.clearJWT = exports.getPatternFormat = exports.isTmpId = exports.getTmpId = exports.getFieldErrorsFromResponse = exports.errorProps = exports.buildGenericYupValidationSchema = exports.populateValues = exports.getChoiceByValue = exports.emptyByType = exports.setAuthToken = exports.DetailFieldBySchema = exports.DetailBySchema = exports.FloatFieldBySchema = exports.AutocompleteFieldBySchema = exports.EditableAutocompleteFieldBySchema = exports.DesktopDateTimePickerBySchema = exports.DesktopDatePickerBySchema = exports.BooleanFieldBySchema = exports.TextFieldBySchema = exports.FieldBySchema = exports.FormBySchema = exports.FormWatcher = exports.BooleanInputCell = exports.GridPatternInput = exports.GridDecimalInput = exports.GridDateInput = exports.SelectEditInputCell = exports.DialogActions = exports.DataTotals = exports.GenericRelatedModelList = exports.GenericModelList = exports.DataGridBySchemaEditable = exports.DialogFormBySchema = exports.Form = exports.useAPIWrapper = exports.DRFReactBySchemaProvider = void 0;
|
|
20
|
+
exports.AUTH_EXPIRED_EVENT = exports.slugToCamelCase = exports.hasJWT = exports.clearJWT = exports.getPatternFormat = exports.isTmpId = exports.getTmpId = exports.getFieldErrorsFromResponse = exports.errorProps = exports.buildGenericYupValidationSchema = exports.populateValues = exports.getChoiceByValue = exports.emptyByType = exports.setAuthToken = exports.DetailFieldBySchema = exports.DetailBySchema = exports.FloatFieldBySchema = exports.AutocompleteFieldBySchema = exports.EditableAutocompleteFieldBySchema = exports.DesktopDateTimePickerBySchema = exports.DesktopDatePickerBySchema = exports.BooleanFieldBySchema = exports.TextFieldBySchema = exports.FieldBySchema = exports.FormBySchema = exports.FormWatcher = exports.BooleanInputCell = exports.GridPatternInput = exports.GridDecimalInput = exports.GridDateInput = exports.SelectEditInputCell = exports.FileTypeIcon = exports.DialogActions = exports.DataTotals = exports.GenericRelatedModelList = exports.GenericModelList = exports.DataGridBySchemaEditable = exports.DialogFormBySchema = exports.Form = exports.useAPIWrapper = exports.DRFReactBySchemaProvider = void 0;
|
|
21
21
|
// Methods:
|
|
22
22
|
const api_1 = require("./api");
|
|
23
23
|
Object.defineProperty(exports, "setAuthToken", { enumerable: true, get: function () { return api_1.setAuthToken; } });
|
|
@@ -57,17 +57,19 @@ const DataTotals_1 = __importDefault(require("./components/DataTotals"));
|
|
|
57
57
|
exports.DataTotals = DataTotals_1.default;
|
|
58
58
|
const DialogActions_1 = __importDefault(require("./components/DialogActions"));
|
|
59
59
|
exports.DialogActions = DialogActions_1.default;
|
|
60
|
+
const FileTypeIcon_1 = __importDefault(require("./components/FileTypeIcon"));
|
|
61
|
+
exports.FileTypeIcon = FileTypeIcon_1.default;
|
|
60
62
|
// DataGridBySchema Components:
|
|
61
|
-
const SelectEditInputCell_1 = require("./components/DataGridBySchemaEditable/SelectEditInputCell");
|
|
62
|
-
|
|
63
|
-
const GridDateInput_1 = require("./components/DataGridBySchemaEditable/GridDateInput");
|
|
64
|
-
|
|
65
|
-
const GridDecimalInput_1 = require("./components/DataGridBySchemaEditable/GridDecimalInput");
|
|
66
|
-
|
|
67
|
-
const GridPatternInput_1 = require("./components/DataGridBySchemaEditable/GridPatternInput");
|
|
68
|
-
|
|
69
|
-
const BooleanInputCell_1 = require("./components/DataGridBySchemaEditable/BooleanInputCell");
|
|
70
|
-
|
|
63
|
+
const SelectEditInputCell_1 = __importDefault(require("./components/DataGridBySchemaEditable/SelectEditInputCell"));
|
|
64
|
+
exports.SelectEditInputCell = SelectEditInputCell_1.default;
|
|
65
|
+
const GridDateInput_1 = __importDefault(require("./components/DataGridBySchemaEditable/GridDateInput"));
|
|
66
|
+
exports.GridDateInput = GridDateInput_1.default;
|
|
67
|
+
const GridDecimalInput_1 = __importDefault(require("./components/DataGridBySchemaEditable/GridDecimalInput"));
|
|
68
|
+
exports.GridDecimalInput = GridDecimalInput_1.default;
|
|
69
|
+
const GridPatternInput_1 = __importDefault(require("./components/DataGridBySchemaEditable/GridPatternInput"));
|
|
70
|
+
exports.GridPatternInput = GridPatternInput_1.default;
|
|
71
|
+
const BooleanInputCell_1 = __importDefault(require("./components/DataGridBySchemaEditable/BooleanInputCell"));
|
|
72
|
+
exports.BooleanInputCell = BooleanInputCell_1.default;
|
|
71
73
|
// FormComponents
|
|
72
74
|
const FormWatcher_1 = __importDefault(require("./components/forms/FormWatcher"));
|
|
73
75
|
exports.FormWatcher = FormWatcher_1.default;
|
package/dist/styles/theme.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../src/styles/theme.ts"],"names":[],"mappings":"AAMA,OAAO,QAAQ,sBAAsB,CAAC;IAMpC,UAAU,OAAO;QACf,OAAO,EAAE,MAAM,EAAE,CAAC;Q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E,OAAO,CAAC,SAAS,CAAC,CAAC;QACtC,QAAQ,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC;KAC9B;IAKD,UAAU,YAAY;QACpB,UAAU,CAAC,EAAE,MAAM,CAAC;KACrB;CASF;AA4GD,QAAA,MAAM,YAAY,sCA0HjB,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
package/dist/utils/utils.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import * as Yup from 'yup';
|
|
1
2
|
import { GridFilterModel } from '@mui/x-data-grid';
|
|
2
|
-
import
|
|
3
|
+
import * as geojson from 'geojson';
|
|
4
|
+
import { ChoiceItem, ChoiceValue, ConditionalVisible, CustomFormField, ExtraValidators, Field, FormFieldLayout, GenericValue, GeometryFieldType, GridEnrichedBySchemaColDef, Item, SchemaType, TField } from '../@types';
|
|
3
5
|
export declare const emptyByType: GenericValue;
|
|
4
6
|
export declare const getChoiceByValue: (value: ChoiceValue, choices: ChoiceItem[] | undefined) => string | null | undefined;
|
|
5
7
|
export declare function populateValues({ data, schema }: {
|
|
@@ -13,7 +15,13 @@ export declare function buildGenericYupValidationSchema({ data, schema, many, sk
|
|
|
13
15
|
skipFields?: string[];
|
|
14
16
|
extraValidators?: ExtraValidators;
|
|
15
17
|
uiFields?: string[];
|
|
16
|
-
}):
|
|
18
|
+
}): Yup.ObjectSchema<{
|
|
19
|
+
[x: string]: any;
|
|
20
|
+
}, Yup.AnyObject, {
|
|
21
|
+
[x: string]: any;
|
|
22
|
+
}, ""> | Yup.ArraySchema<{
|
|
23
|
+
[x: string]: any;
|
|
24
|
+
}[] | undefined, Yup.AnyObject, "", "">;
|
|
17
25
|
export declare function loadSinglePageDataHelper({ data, schema, columns, fieldsLayout, defaults, extraValidators, }: {
|
|
18
26
|
data: Item;
|
|
19
27
|
schema: SchemaType;
|
|
@@ -26,7 +34,7 @@ export declare function loadSinglePageDataHelper({ data, schema, columns, fields
|
|
|
26
34
|
finalSchema: {
|
|
27
35
|
[x: string]: Field;
|
|
28
36
|
};
|
|
29
|
-
validationSchema: any;
|
|
37
|
+
validationSchema: Yup.ObjectSchema<Record<string, any>, Yup.AnyObject, any, ""> | null;
|
|
30
38
|
};
|
|
31
39
|
export declare const errorProps: ({ errors, fieldKey, fieldKeyProp, index, }: {
|
|
32
40
|
errors: Item;
|
|
@@ -60,12 +68,12 @@ export declare const getPatternFormat: (type: string) => string;
|
|
|
60
68
|
export declare function buildDateFormatBySchema(dateViews: string[] | null | undefined): "DD/MM/YYYY" | "MM/YYYY" | "YYYY" | "MM" | "DD";
|
|
61
69
|
export declare const slugToCamelCase: (str: string, includeFirst?: boolean) => string;
|
|
62
70
|
export declare const slugify: (text: string | null) => string;
|
|
63
|
-
export declare function mergeFilterItems(defaultFilter: GridFilterModel | undefined, filter: GridFilterModel | undefined):
|
|
71
|
+
export declare function mergeFilterItems(defaultFilter: GridFilterModel | undefined, filter: GridFilterModel | undefined): GridFilterModel | undefined;
|
|
64
72
|
export declare function initViewColumns({ schema, columns, customColumnOperations, }: {
|
|
65
73
|
schema: SchemaType;
|
|
66
74
|
columns: GridEnrichedBySchemaColDef[];
|
|
67
75
|
customColumnOperations?: (p: GridEnrichedBySchemaColDef) => GridEnrichedBySchemaColDef | Promise<GridEnrichedBySchemaColDef>;
|
|
68
|
-
}): Promise<(Omit<GridColDef<
|
|
76
|
+
}): Promise<(Omit<import("@mui/x-data-grid").GridColDef<Record<string, any>>, "field"> & {
|
|
69
77
|
field: string;
|
|
70
78
|
isIndexField?: boolean;
|
|
71
79
|
creatable?: boolean;
|
|
@@ -84,4 +92,14 @@ export declare function extractFieldValue(genericValue: GenericValue): any;
|
|
|
84
92
|
export declare function buildConditionalVisibleBySchema<T extends TField = void>(schema?: SchemaType<T> | null): ConditionalVisible[];
|
|
85
93
|
export declare function showConditionalVisibleField(field: string | CustomFormField, conditionalVisible?: ConditionalVisible[], values?: GenericValue[]): boolean;
|
|
86
94
|
export declare function showConditionalVisibleFieldObj<T extends TField = void>(field: string | CustomFormField, conditionalVisible?: ConditionalVisible[], values?: Item<T>): boolean;
|
|
95
|
+
/**
|
|
96
|
+
* Detect whether the consuming app has installed leaflet + leaflet-draw.
|
|
97
|
+
* Uses CJS require so that the bundler does not fail to build when they are
|
|
98
|
+
* absent; returns null so callers can fall back to text inputs.
|
|
99
|
+
*/
|
|
100
|
+
export declare function getMapLibraries(): any;
|
|
101
|
+
/** Normalize a GeoJSON value (object, JSON string or null) to a string. */
|
|
102
|
+
export declare function geometryValueToString(value: GenericValue): string;
|
|
103
|
+
/** Parse a GeoJSON value (object or JSON string) into an object, or null. */
|
|
104
|
+
export declare function parseGeoJSON(geoType: GeometryFieldType, rawValue: GenericValue): geojson.GeoJsonObject | geojson.GeoJsonObject[] | null;
|
|
87
105
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/utils/utils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/utils/utils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,GAAG,MAAM,KAAK,CAAC;AAC3B,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAEnD,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AAEnC,OAAO,EACL,UAAU,EACV,WAAW,EACX,kBAAkB,EAClB,eAAe,EACf,eAAe,EACf,KAAK,EAEL,eAAe,EACf,YAAY,EAEZ,iBAAiB,EACjB,0BAA0B,EAC1B,IAAI,EACJ,UAAU,EACV,MAAM,EACP,MAAM,WAAW,CAAC;AAEnB,eAAO,MAAM,WAAW,EAAE,YA4BzB,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAI,OAAO,WAAW,EAAE,SAAS,UAAU,EAAE,GAAG,SAAS,8BASrF,CAAC;AAEF,wBAAgB,cAAc,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;IAAE,IAAI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AAgB,cAAc,CAAC,KAAK,EAAE,MAAM,UAgB3C;AAED,wBAAgB,yBAAyB,CAAC,YAAY,EAAE,eAAe,EAAE,YAwBxE;AAED,wBAAgB,eAAe,CAAC,WAAW,CAAC,EAAE,KAAK,EAAE,QAAQ,CAAC,EAAE,OAAO,WAetE;AAED,wBAAgB,iBAAiB,CAAC,YAAY,EAAE,YAAY,OAsB3D;AAED,wBAAgB,+BAA+B,CAAC,CAAC,SAAS,MAAM,GAAG,IAAI,EACrE,MAAM,CAAC,EAAE,UAAU,CAAC,CAAC,CAAC,GAAG,IAAI,wBAgC9B;AAED,wBAAgB,2BAA2B,CACzC,KAAK,EAAE,MAAM,GAAG,eAAe,EAC/B,kBAAkB,CAAC,EAAE,kBAAkB,EAAE,EACzC,MAAM,CAAC,EAAE,YAAY,EAAE,WA+BxB;AAED,wBAAgB,8BAA8B,CAAC,CAAC,SAAS,MAAM,GAAG,IAAI,EACpE,KAAK,EAAE,MAAM,GAAG,eAAe,EAC/B,kBAAkB,CAAC,EAAE,kBAAkB,EAAE,EACzC,MAAM,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,WAwBjB;AAOD;;;;GAIG;AAEH,wBAAgB,eAAe,IAAI,GAAG,CAerC;AAED,2EAA2E;AAC3E,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,YAAY,GAAG,MAAM,CAQjE;AAED,6EAA6E;AAC7E,wBAAgB,YAAY,CAC1B,OAAO,EAAE,iBAAiB,EAC1B,QAAQ,EAAE,YAAY,GACrB,OAAO,CAAC,aAAa,GAAG,OAAO,CAAC,aAAa,EAAE,GAAG,IAAI,CAaxD"}
|
package/dist/utils/utils.js
CHANGED
|
@@ -63,6 +63,9 @@ exports.extractFieldValue = extractFieldValue;
|
|
|
63
63
|
exports.buildConditionalVisibleBySchema = buildConditionalVisibleBySchema;
|
|
64
64
|
exports.showConditionalVisibleField = showConditionalVisibleField;
|
|
65
65
|
exports.showConditionalVisibleFieldObj = showConditionalVisibleFieldObj;
|
|
66
|
+
exports.getMapLibraries = getMapLibraries;
|
|
67
|
+
exports.geometryValueToString = geometryValueToString;
|
|
68
|
+
exports.parseGeoJSON = parseGeoJSON;
|
|
66
69
|
const dayjs_1 = __importDefault(require("dayjs"));
|
|
67
70
|
const Yup = __importStar(require("yup"));
|
|
68
71
|
const string_mask_1 = __importDefault(require("string-mask"));
|
|
@@ -202,6 +205,16 @@ const getYupValidator = (type) => {
|
|
|
202
205
|
case 'file upload':
|
|
203
206
|
yupFunc = Yup.object();
|
|
204
207
|
break;
|
|
208
|
+
// PostGIS geometry fields arrive as GeoJSON objects (e.g.
|
|
209
|
+
// { type: 'Point', coordinates: [...] }), so they must validate as
|
|
210
|
+
// objects rather than falling through to the default string schema.
|
|
211
|
+
case 'point':
|
|
212
|
+
case 'polygon':
|
|
213
|
+
case 'multipoint':
|
|
214
|
+
case 'multipolygon':
|
|
215
|
+
case 'geometrycollection':
|
|
216
|
+
yupFunc = Yup.object();
|
|
217
|
+
break;
|
|
205
218
|
// String-like types produced by SimpleMetadata but not needing
|
|
206
219
|
// specialized validation behave as plain strings:
|
|
207
220
|
case 'url':
|
|
@@ -223,14 +236,14 @@ const getYupValidator = (type) => {
|
|
|
223
236
|
return yupFunc.transform((v) => (v === '' ? null : v)).nullable();
|
|
224
237
|
};
|
|
225
238
|
function buildGenericYupValidationSchema({ data, schema, many = false, skipFields = [], extraValidators, uiFields, }) {
|
|
226
|
-
var _a;
|
|
239
|
+
var _a, _b;
|
|
227
240
|
const yupValidator = {};
|
|
228
241
|
for (const entry of Object.entries(schema)) {
|
|
229
242
|
const [field, fieldSchema] = entry;
|
|
230
243
|
if (!data || !(field in data) || field === 'id' || skipFields.includes(field)) {
|
|
231
244
|
continue;
|
|
232
245
|
}
|
|
233
|
-
// OneToMany or ManyToMany:
|
|
246
|
+
// OneToMany or ManyToMany (built as an array-of-object schema):
|
|
234
247
|
if (fieldSchema.type === 'field' && ((_a = fieldSchema.child) === null || _a === void 0 ? void 0 : _a.children)) {
|
|
235
248
|
yupValidator[field] =
|
|
236
249
|
extraValidators && field in extraValidators
|
|
@@ -241,27 +254,20 @@ function buildGenericYupValidationSchema({ data, schema, many = false, skipField
|
|
|
241
254
|
data: data[field],
|
|
242
255
|
uiFields,
|
|
243
256
|
});
|
|
244
|
-
continue;
|
|
245
257
|
}
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
// data: data[key],
|
|
252
|
-
// extraValidators: key in extraValidators ? extraValidators[key] : {}
|
|
253
|
-
// });
|
|
254
|
-
// if (!field.model_required) {
|
|
255
|
-
// yupValidator[key] = yupValidator[key].nullable();
|
|
256
|
-
// }
|
|
257
|
-
// continue;
|
|
258
|
+
else {
|
|
259
|
+
yupValidator[field] =
|
|
260
|
+
extraValidators && field in extraValidators
|
|
261
|
+
? extraValidators[field]
|
|
262
|
+
: getYupValidator(fieldSchema.type);
|
|
258
263
|
}
|
|
259
|
-
yupValidator[field] =
|
|
260
|
-
extraValidators && field in extraValidators
|
|
261
|
-
? extraValidators[field]
|
|
262
|
-
: getYupValidator(fieldSchema.type);
|
|
263
264
|
if (isFieldRequired(fieldSchema, (uiFields || []).includes(field))) {
|
|
264
265
|
yupValidator[field] = yupValidator[field].required('Este campo é obrigatório');
|
|
266
|
+
// For required many-fields the selected items live in an array, and yup's
|
|
267
|
+
// `.required()` still allows `[]`; enforce at least one selection instead.
|
|
268
|
+
if (fieldSchema.type === 'field' && ((_b = fieldSchema.child) === null || _b === void 0 ? void 0 : _b.children)) {
|
|
269
|
+
yupValidator[field] = yupValidator[field].min(1, 'Este campo é obrigatório');
|
|
270
|
+
}
|
|
265
271
|
}
|
|
266
272
|
if (fieldSchema.max_length && fieldSchema.type === 'string') {
|
|
267
273
|
yupValidator[field] = yupValidator[field].max(parseInt(fieldSchema.max_length), `Este campo só pode ter no máximo ${fieldSchema.max_length} caracteres`);
|
|
@@ -563,6 +569,16 @@ function initViewColumns(_a) {
|
|
|
563
569
|
column.valueFormatter = (value) => {
|
|
564
570
|
return !value ? '' : `${value.name.split('/').pop()} (${formatFileSize(value.size)})`;
|
|
565
571
|
};
|
|
572
|
+
break;
|
|
573
|
+
case 'point':
|
|
574
|
+
case 'polygon':
|
|
575
|
+
case 'multipoint':
|
|
576
|
+
case 'multipolygon':
|
|
577
|
+
case 'geometrycollection':
|
|
578
|
+
// PostGIS geometry (GeoJSON object) is not a renderable React child;
|
|
579
|
+
// stringify it for read-only views (detail page / mobile list).
|
|
580
|
+
column.valueFormatter = (value) => !value ? '' : typeof value === 'string' ? value : JSON.stringify(value);
|
|
581
|
+
break;
|
|
566
582
|
default:
|
|
567
583
|
if (fieldSchema.pattern_format) {
|
|
568
584
|
column.patternFormat = fieldSchema.pattern_format;
|
|
@@ -847,3 +863,60 @@ function showConditionalVisibleFieldObj(field, conditionalVisible, values) {
|
|
|
847
863
|
.filter((item) => item.target === field);
|
|
848
864
|
return sources.length > 0;
|
|
849
865
|
}
|
|
866
|
+
// --- Optional OSM (leaflet) geometry support --------------------------------
|
|
867
|
+
// PostGIS geometry fields arrive from the backend as GeoJSON (type point /
|
|
868
|
+
// polygon / multipoint / multipolygon / geometrycollection). Editing them uses
|
|
869
|
+
// leaflet + leaflet-draw when those optional libraries are installed in the
|
|
870
|
+
// consuming app; otherwise the UI falls back to plain text editing.
|
|
871
|
+
/**
|
|
872
|
+
* Detect whether the consuming app has installed leaflet + leaflet-draw.
|
|
873
|
+
* Uses CJS require so that the bundler does not fail to build when they are
|
|
874
|
+
* absent; returns null so callers can fall back to text inputs.
|
|
875
|
+
*/
|
|
876
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
877
|
+
function getMapLibraries() {
|
|
878
|
+
try {
|
|
879
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
880
|
+
const L = require('leaflet');
|
|
881
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
882
|
+
require('leaflet-draw');
|
|
883
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
884
|
+
require('react-leaflet');
|
|
885
|
+
if (L && L.map && L.Control && typeof L.Control.Draw === 'function') {
|
|
886
|
+
return L;
|
|
887
|
+
}
|
|
888
|
+
}
|
|
889
|
+
catch (_a) {
|
|
890
|
+
// leaflet / leaflet-draw / react-leaflet not installed -> no map support
|
|
891
|
+
}
|
|
892
|
+
return null;
|
|
893
|
+
}
|
|
894
|
+
/** Normalize a GeoJSON value (object, JSON string or null) to a string. */
|
|
895
|
+
function geometryValueToString(value) {
|
|
896
|
+
if (value === null || value === undefined)
|
|
897
|
+
return '';
|
|
898
|
+
if (typeof value === 'string')
|
|
899
|
+
return value;
|
|
900
|
+
try {
|
|
901
|
+
return JSON.stringify(value);
|
|
902
|
+
}
|
|
903
|
+
catch (_a) {
|
|
904
|
+
return '';
|
|
905
|
+
}
|
|
906
|
+
}
|
|
907
|
+
/** Parse a GeoJSON value (object or JSON string) into an object, or null. */
|
|
908
|
+
function parseGeoJSON(geoType, rawValue) {
|
|
909
|
+
const text = geometryValueToString(rawValue);
|
|
910
|
+
if (!text) {
|
|
911
|
+
return null;
|
|
912
|
+
}
|
|
913
|
+
try {
|
|
914
|
+
const parsed = JSON.parse(text);
|
|
915
|
+
return parsed && typeof parsed.type === 'string' && (0, exports.slugify)(parsed.type) === geoType
|
|
916
|
+
? parsed
|
|
917
|
+
: null;
|
|
918
|
+
}
|
|
919
|
+
catch (_a) {
|
|
920
|
+
return null;
|
|
921
|
+
}
|
|
922
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "drf-react-by-schema",
|
|
3
|
-
"version": "0.28.
|
|
3
|
+
"version": "0.28.2",
|
|
4
4
|
"description": "Components and Tools for building a React App having Django Rest Framework (DRF) as server",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -42,25 +42,45 @@
|
|
|
42
42
|
"@babel/preset-env": "^7.20.2",
|
|
43
43
|
"@babel/preset-react": "^7.18.6",
|
|
44
44
|
"@babel/preset-typescript": "^7.18.6",
|
|
45
|
+
"@emotion/react": "^11",
|
|
46
|
+
"@emotion/styled": "^11",
|
|
45
47
|
"@eslint/compat": "^1.3.0",
|
|
46
48
|
"@eslint/eslintrc": "^3.3.1",
|
|
47
49
|
"@eslint/js": "^9.29.0",
|
|
50
|
+
"@hookform/resolvers": "^3",
|
|
51
|
+
"@mui/icons-material": "^6",
|
|
52
|
+
"@mui/material": "^6",
|
|
53
|
+
"@mui/x-data-grid": "^7",
|
|
54
|
+
"@mui/x-date-pickers": "^7",
|
|
55
|
+
"@types/leaflet": "^1.9.22",
|
|
56
|
+
"@types/leaflet-draw": "^1.0.13",
|
|
48
57
|
"@types/node": "^18.11.15",
|
|
49
58
|
"@types/react": "^19.1.8",
|
|
50
59
|
"@types/react-dom": "^19.1.6",
|
|
51
60
|
"@typescript-eslint/eslint-plugin": "^8.34.1",
|
|
52
61
|
"@typescript-eslint/parser": "8.34.1",
|
|
62
|
+
"axios": "^1",
|
|
63
|
+
"dayjs": "^1",
|
|
53
64
|
"eslint": "^9.29.0",
|
|
54
65
|
"eslint-config-prettier": "^8.5.0",
|
|
55
66
|
"eslint-plugin-prettier": "^5.0.0",
|
|
56
67
|
"eslint-plugin-react": "^7.37.5",
|
|
57
68
|
"eslint-plugin-react-hooks": "^5.2.0",
|
|
69
|
+
"leaflet": "^1.9.4",
|
|
70
|
+
"leaflet-draw": "^1.0.4",
|
|
58
71
|
"prettier": "^3.0.0",
|
|
72
|
+
"react": "^19",
|
|
59
73
|
"react-docgen-typescript": "^2.2.2",
|
|
74
|
+
"react-dom": "^19",
|
|
75
|
+
"react-hook-form": "^7",
|
|
76
|
+
"react-leaflet": "^5.0.0",
|
|
77
|
+
"react-number-format": "^5",
|
|
60
78
|
"semver": "^7.5.1",
|
|
79
|
+
"string-mask": "^0.3.0",
|
|
61
80
|
"ts-loader": "^9.4.2",
|
|
62
81
|
"typescript": "^5.7.3",
|
|
63
|
-
"webpack": "^5.75.0"
|
|
82
|
+
"webpack": "^5.75.0",
|
|
83
|
+
"yup": "^1"
|
|
64
84
|
},
|
|
65
85
|
"peerDependencies": {
|
|
66
86
|
"@emotion/react": "^11",
|
|
@@ -72,13 +92,27 @@
|
|
|
72
92
|
"@mui/x-date-pickers": "^7",
|
|
73
93
|
"axios": "^1",
|
|
74
94
|
"dayjs": "^1",
|
|
95
|
+
"leaflet": "^1.9.0",
|
|
96
|
+
"leaflet-draw": "^1.0.4",
|
|
75
97
|
"react": "^18 || ^19",
|
|
76
98
|
"react-dom": "^18 || ^19",
|
|
77
99
|
"react-hook-form": "^7",
|
|
100
|
+
"react-leaflet": "^5.0.0",
|
|
78
101
|
"react-number-format": "^5",
|
|
79
102
|
"string-mask": "^0.3.0",
|
|
80
103
|
"yup": "^1"
|
|
81
104
|
},
|
|
105
|
+
"peerDependenciesMeta": {
|
|
106
|
+
"leaflet": {
|
|
107
|
+
"optional": true
|
|
108
|
+
},
|
|
109
|
+
"react-leaflet": {
|
|
110
|
+
"optional": true
|
|
111
|
+
},
|
|
112
|
+
"leaflet-draw": {
|
|
113
|
+
"optional": true
|
|
114
|
+
}
|
|
115
|
+
},
|
|
82
116
|
"browserslist": [
|
|
83
117
|
">1%",
|
|
84
118
|
"last 1 version",
|