drf-react-by-schema 0.28.4 → 0.28.6
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/api.d.ts +3 -0
- package/dist/api.d.ts.map +1 -1
- package/dist/api.js +75 -1
- package/dist/components/DataGridBySchemaEditable/hooks/useProcessRowUpdate.d.ts.map +1 -1
- package/dist/components/DataGridBySchemaEditable/hooks/useProcessRowUpdate.js +2 -17
- package/dist/components/DataGridBySchemaEditable/utils/columnFactory.js +10 -10
- package/dist/components/forms/ChangePasswordForm.d.ts +7 -0
- package/dist/components/forms/ChangePasswordForm.d.ts.map +1 -0
- package/dist/components/forms/ChangePasswordForm.js +93 -0
- package/dist/components/forms/ForgotPasswordForm.d.ts +11 -0
- package/dist/components/forms/ForgotPasswordForm.d.ts.map +1 -0
- package/dist/components/forms/ForgotPasswordForm.js +114 -0
- package/dist/components/forms/inputs/AutocompleteFieldBySchema.d.ts +10 -1
- package/dist/components/forms/inputs/AutocompleteFieldBySchema.d.ts.map +1 -1
- package/dist/components/forms/inputs/AutocompleteFieldBySchema.js +11 -2
- package/dist/context/APIWrapper.d.ts.map +1 -1
- package/dist/context/APIWrapper.js +9 -0
- package/dist/context/APIWrapperContext.d.ts +3 -0
- package/dist/context/APIWrapperContext.d.ts.map +1 -1
- package/dist/context/APIWrapperContext.js +3 -0
- package/dist/context/DRFReactBySchemaContext.d.ts +3 -0
- package/dist/context/DRFReactBySchemaContext.d.ts.map +1 -1
- package/dist/context/DRFReactBySchemaProvider.d.ts.map +1 -1
- package/dist/context/DRFReactBySchemaProvider.js +12 -0
- package/dist/index.d.ts +5 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -1
- package/dist/styles/texts.d.ts +18 -0
- package/dist/styles/texts.d.ts.map +1 -1
- package/dist/styles/texts.js +18 -0
- package/dist/utils/utils.d.ts +2 -0
- package/dist/utils/utils.d.ts.map +1 -1
- package/dist/utils/utils.js +40 -6
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -56,6 +56,17 @@ MUI components it renders (DataGrid, date pickers) to pt-BR.
|
|
|
56
56
|
See the full reference (namespaces, precedence, MUI locale setup, custom markers) in
|
|
57
57
|
**[`docs/localization.md`](docs/localization.md)**.
|
|
58
58
|
|
|
59
|
+
## Authentication, password reset & e-mail
|
|
60
|
+
|
|
61
|
+
The package ships ready-made pieces for a **forgot/change password** flow over the
|
|
62
|
+
JWT + simplejwt stack: the `ForgotPasswordForm` and `ChangePasswordForm` components,
|
|
63
|
+
plus `requestPasswordReset`, `confirmPasswordReset` and `changePassword` helpers on
|
|
64
|
+
`useAPIWrapper()`. They talk to the endpoints provided by the **Django** package
|
|
65
|
+
(`password_reset/request|confirm`, `my_account/change_password`).
|
|
66
|
+
|
|
67
|
+
See how to wire them up, the server contract, and how to set up e-mail/SMTP for the
|
|
68
|
+
reset link in **[`docs/password-reset-and-email.md`](docs/password-reset-and-email.md)**.
|
|
69
|
+
|
|
59
70
|
## Getting started
|
|
60
71
|
|
|
61
72
|
1. Build the Django model (a guide is available at https://pypi.org/project/drf-react-by-schema/)
|
package/dist/api.d.ts
CHANGED
|
@@ -64,6 +64,9 @@ export declare const getSignUpOptions: (serverEndPoint: ServerEndPoint | null) =
|
|
|
64
64
|
[x: string]: Field;
|
|
65
65
|
}>;
|
|
66
66
|
export declare const signUp: (data: Item, serverEndPoint: ServerEndPoint | null) => Promise<Record<string, any> | AxiosError<unknown, any, any>>;
|
|
67
|
+
export declare const requestPasswordReset: (email: string, serverEndPoint: ServerEndPoint | null) => Promise<Item | AxiosError>;
|
|
68
|
+
export declare const confirmPasswordReset: (data: Item, serverEndPoint: ServerEndPoint | null) => Promise<Item | AxiosError>;
|
|
69
|
+
export declare const changePassword: (data: Item, serverEndPoint: ServerEndPoint | null) => Promise<Item | AxiosError>;
|
|
67
70
|
export declare function getGenericModelList<T extends TField = void>({ model, serverEndPoint, id, relatedModel, relatedModelId, columnFields, creatableFields, disabledFields, isInBatches, loadedSchema, loadedModelOptions, page, filter, queryParams, sort, sumRows, schemas, }: GetGenericModelListProps<T>): Promise<AxiosError<unknown, any, any> | DataSchemaColumnsType<T>>;
|
|
68
71
|
export declare function getGenericModel<T extends TField = void>({ model, serverEndPoint, id, relatedModel, relatedModelId, schemas, }: GetGenericModelProps): Promise<ItemSchemaColumnsType<T> | AxiosError>;
|
|
69
72
|
export declare const getAllModels: (serverEndPoint: ServerEndPoint | null) => Promise<AxiosError<unknown, any, any> | Record<string, any>[]>;
|
package/dist/api.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"AAAA,OAAc,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAE1C,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACnE,OAAO,EACL,IAAI,EACJ,UAAU,EACV,qBAAqB,EACrB,qBAAqB,EACrB,eAAe,EACf,EAAE,EAGF,eAAe,EAEf,mBAAmB,EACnB,wBAAwB,EAExB,oBAAoB,EACpB,kBAAkB,EAClB,gBAAgB,EAGhB,KAAK,EAEL,MAAM,EACN,eAAe,EAChB,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"AAAA,OAAc,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAE1C,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACnE,OAAO,EACL,IAAI,EACJ,UAAU,EACV,qBAAqB,EACrB,qBAAqB,EACrB,eAAe,EACf,EAAE,EAGF,eAAe,EAEf,mBAAmB,EACnB,wBAAwB,EAExB,oBAAoB,EACpB,kBAAkB,EAClB,gBAAgB,EAGhB,KAAK,EAEL,MAAM,EACN,eAAe,EAChB,MAAM,UAAU,CAAC;AAelB;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,qCAAqC,CAAC;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GAAG,IAAI,mEASvE,CAAC;AAEF,eAAO,MAAM,eAAe,GAAU,yEAMnC;IACD,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,EAAE,CAAC;IACnB,eAAe,EAAE,eAAe,CAAC;IACjC,cAAc,EAAE,cAAc,GAAG,IAAI,CAAC;CACvC,KAAG,OAAO,CAAC,IAAI,GAAG,UAAU,CAiF5B,CAAC"}
|
package/dist/api.js
CHANGED
|
@@ -12,7 +12,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
12
12
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
13
|
};
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.exportExcelData = exports.getAllModels = exports.signUp = exports.getSignUpOptions = exports.isLoggedIn = exports.setAuthToken = exports.hasJWT = exports.clearJWT = exports.loginByPayload = exports.dispatchAuthExpired = exports.AUTH_EXPIRED_EVENT = void 0;
|
|
15
|
+
exports.exportExcelData = exports.getAllModels = exports.changePassword = exports.confirmPasswordReset = exports.requestPasswordReset = exports.signUp = exports.getSignUpOptions = exports.isLoggedIn = exports.setAuthToken = exports.hasJWT = exports.clearJWT = exports.loginByPayload = exports.dispatchAuthExpired = exports.AUTH_EXPIRED_EVENT = void 0;
|
|
16
16
|
exports.getRawData = getRawData;
|
|
17
17
|
exports.getData = getData;
|
|
18
18
|
exports.updateData = updateData;
|
|
@@ -536,6 +536,14 @@ function prepareDataBySchemaRecursive({ data: typedData, schema, }) {
|
|
|
536
536
|
dbData[key] = value.value;
|
|
537
537
|
continue;
|
|
538
538
|
}
|
|
539
|
+
// Multiple-choice lists: unwrap {value, display_name} objects to raw .value
|
|
540
|
+
// for the backend; raw values already present are passed through unchanged.
|
|
541
|
+
if ((field === null || field === void 0 ? void 0 : field.type) === 'list' || (field === null || field === void 0 ? void 0 : field.type) === 'multiple choice') {
|
|
542
|
+
dbData[key] = Array.isArray(value)
|
|
543
|
+
? value.map((choice) => typeof choice === 'object' && choice !== null ? choice.value : choice)
|
|
544
|
+
: value;
|
|
545
|
+
continue;
|
|
546
|
+
}
|
|
539
547
|
// Date:
|
|
540
548
|
if ((field === null || field === void 0 ? void 0 : field.type) === 'date') {
|
|
541
549
|
dbData[key] = (0, dayjs_1.default)(value).format('YYYY-MM-DD');
|
|
@@ -796,6 +804,66 @@ const signUp = (data, serverEndPoint) => __awaiter(void 0, void 0, void 0, funct
|
|
|
796
804
|
};
|
|
797
805
|
});
|
|
798
806
|
exports.signUp = signUp;
|
|
807
|
+
const requestPasswordReset = (email, serverEndPoint) => __awaiter(void 0, void 0, void 0, function* () {
|
|
808
|
+
if (!serverEndPoint || !serverEndPoint.requestPasswordReset) {
|
|
809
|
+
return {
|
|
810
|
+
message: noServerEndPointMessage,
|
|
811
|
+
isAxiosError: true,
|
|
812
|
+
};
|
|
813
|
+
}
|
|
814
|
+
const url = serverEndPoint.requestPasswordReset;
|
|
815
|
+
try {
|
|
816
|
+
const { data } = yield axios_1.default.post(url, { email });
|
|
817
|
+
return data;
|
|
818
|
+
}
|
|
819
|
+
catch (e) {
|
|
820
|
+
if (axios_1.default.isAxiosError(e)) {
|
|
821
|
+
return e;
|
|
822
|
+
}
|
|
823
|
+
}
|
|
824
|
+
return { message: unknownError, isAxiosError: true };
|
|
825
|
+
});
|
|
826
|
+
exports.requestPasswordReset = requestPasswordReset;
|
|
827
|
+
const confirmPasswordReset = (data, serverEndPoint) => __awaiter(void 0, void 0, void 0, function* () {
|
|
828
|
+
if (!serverEndPoint || !serverEndPoint.confirmPasswordReset) {
|
|
829
|
+
return {
|
|
830
|
+
message: noServerEndPointMessage,
|
|
831
|
+
isAxiosError: true,
|
|
832
|
+
};
|
|
833
|
+
}
|
|
834
|
+
const url = serverEndPoint.confirmPasswordReset;
|
|
835
|
+
try {
|
|
836
|
+
const { data: responseData } = yield axios_1.default.post(url, data);
|
|
837
|
+
return responseData;
|
|
838
|
+
}
|
|
839
|
+
catch (e) {
|
|
840
|
+
if (axios_1.default.isAxiosError(e)) {
|
|
841
|
+
return e;
|
|
842
|
+
}
|
|
843
|
+
}
|
|
844
|
+
return { message: unknownError, isAxiosError: true };
|
|
845
|
+
});
|
|
846
|
+
exports.confirmPasswordReset = confirmPasswordReset;
|
|
847
|
+
const changePassword = (data, serverEndPoint) => __awaiter(void 0, void 0, void 0, function* () {
|
|
848
|
+
if (!serverEndPoint || !serverEndPoint.changePassword) {
|
|
849
|
+
return {
|
|
850
|
+
message: noServerEndPointMessage,
|
|
851
|
+
isAxiosError: true,
|
|
852
|
+
};
|
|
853
|
+
}
|
|
854
|
+
const url = serverEndPoint.changePassword;
|
|
855
|
+
try {
|
|
856
|
+
const { data: responseData } = yield axios_1.default.post(url, data);
|
|
857
|
+
return responseData;
|
|
858
|
+
}
|
|
859
|
+
catch (e) {
|
|
860
|
+
if (axios_1.default.isAxiosError(e)) {
|
|
861
|
+
return e;
|
|
862
|
+
}
|
|
863
|
+
}
|
|
864
|
+
return { message: unknownError, isAxiosError: true };
|
|
865
|
+
});
|
|
866
|
+
exports.changePassword = changePassword;
|
|
799
867
|
function getGenericModelList(_a) {
|
|
800
868
|
return __awaiter(this, arguments, void 0, function* ({ model, serverEndPoint, id = '', relatedModel = '', relatedModelId = '', columnFields, creatableFields, disabledFields, isInBatches = false, loadedSchema, loadedModelOptions, page, filter, queryParams = [], sort, sumRows, schemas, }) {
|
|
801
869
|
const newQueryParams = [...queryParams];
|
|
@@ -903,6 +971,12 @@ function getGenericModelList(_a) {
|
|
|
903
971
|
: (0, utils_1.emptyByType)(field);
|
|
904
972
|
continue;
|
|
905
973
|
}
|
|
974
|
+
if ((field === null || field === void 0 ? void 0 : field.type) === 'list' || (field === null || field === void 0 ? void 0 : field.type) === 'multiple choice') {
|
|
975
|
+
newRow[key] = Array.isArray(row[key])
|
|
976
|
+
? row[key].map((entry) => { var _a; return (0, utils_1.toChoiceItem)(entry, (_a = field.child) === null || _a === void 0 ? void 0 : _a.choices); })
|
|
977
|
+
: (0, utils_1.emptyByType)(field);
|
|
978
|
+
continue;
|
|
979
|
+
}
|
|
906
980
|
newRow[key] = row[key] ? row[key] : (0, utils_1.emptyByType)(field);
|
|
907
981
|
}
|
|
908
982
|
return newRow;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useProcessRowUpdate.d.ts","sourceRoot":"","sources":["../../../../src/components/DataGridBySchemaEditable/hooks/useProcessRowUpdate.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAmB,MAAM,KAAK,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,8CAA8C,CAAC;AAChF,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,OAAO,EACL,IAAI,EACJ,UAAU,EACV,EAAE,EACF,eAAe,EACf,eAAe,EACf,0BAA0B,EAC1B,QAAQ,EACR,MAAM,EACP,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"useProcessRowUpdate.d.ts","sourceRoot":"","sources":["../../../../src/components/DataGridBySchemaEditable/hooks/useProcessRowUpdate.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAmB,MAAM,KAAK,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,8CAA8C,CAAC;AAChF,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,OAAO,EACL,IAAI,EACJ,UAAU,EACV,EAAE,EACF,eAAe,EACf,eAAe,EACf,0BAA0B,EAC1B,QAAQ,EACR,MAAM,EACP,MAAM,iBAAiB,CAAC;AAUzB,UAAU,wBAAwB,CAAC,CAAC,SAAS,MAAM,GAAG,IAAI;IACxD,eAAe,EAAE,0BAA0B,CAAC,CAAC,CAAC,EAAE,GAAG,IAAI,CAAC;I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AC,CAAC;CAoMzE,CAAC"}
|
|
@@ -21,21 +21,6 @@ const utils_2 = require("../utils");
|
|
|
21
21
|
function isYupValidationError(err) {
|
|
22
22
|
return err instanceof Error && err.name === 'ValidationError';
|
|
23
23
|
}
|
|
24
|
-
// Backends return choice fields as raw values; reshape them into
|
|
25
|
-
// {value, display_name} objects like populateValues does on list load, so every
|
|
26
|
-
// grid row (load + inline-save) stays consistent.
|
|
27
|
-
function enrichChoices(rawData, schema) {
|
|
28
|
-
const out = Object.assign({}, rawData);
|
|
29
|
-
for (const [key, field] of Object.entries(schema)) {
|
|
30
|
-
if (!(key in rawData) || (field === null || field === void 0 ? void 0 : field.type) !== 'choice')
|
|
31
|
-
continue;
|
|
32
|
-
const rawValue = rawData[key];
|
|
33
|
-
out[key] = rawValue
|
|
34
|
-
? { value: rawValue, display_name: (0, utils_1.getChoiceByValue)(rawValue, field.choices) }
|
|
35
|
-
: (0, utils_1.emptyByType)(field);
|
|
36
|
-
}
|
|
37
|
-
return out;
|
|
38
|
-
}
|
|
39
24
|
const useProcessRowUpdate = ({ preparedColumns, yupValidationSchema, setDataGridLoading, indexField, processingRow, setValidationErrors, modelParent, modelParentId, model, schema, addExistingModel, updateOptionsAC, apiRef, setDataGridRows, onProcessRow, handleStopEditing,
|
|
40
25
|
// extraValidators, // TODO: Check why this is missing
|
|
41
26
|
}) => {
|
|
@@ -148,7 +133,7 @@ const useProcessRowUpdate = ({ preparedColumns, yupValidationSchema, setDataGrid
|
|
|
148
133
|
return newState;
|
|
149
134
|
});
|
|
150
135
|
updateOptionsAC();
|
|
151
|
-
const newRow = enrichChoices('data' in response && 'schema' in response ? response.data : response, schema);
|
|
136
|
+
const newRow = (0, utils_1.enrichChoices)('data' in response && 'schema' in response ? response.data : response, schema);
|
|
152
137
|
if (onProcessRow) {
|
|
153
138
|
onProcessRow(newRow);
|
|
154
139
|
}
|
|
@@ -194,7 +179,7 @@ const useProcessRowUpdate = ({ preparedColumns, yupValidationSchema, setDataGrid
|
|
|
194
179
|
return newState;
|
|
195
180
|
});
|
|
196
181
|
updateOptionsAC();
|
|
197
|
-
const newRow = enrichChoices('data' in response && 'schema' in response ? response.data : response, schema);
|
|
182
|
+
const newRow = (0, utils_1.enrichChoices)('data' in response && 'schema' in response ? response.data : response, schema);
|
|
198
183
|
(0, utils_2.updateRow)({
|
|
199
184
|
newRow,
|
|
200
185
|
originalId: editedRow.id,
|
|
@@ -108,12 +108,16 @@ function buildPreparedColumns(_a) {
|
|
|
108
108
|
case 'choice':
|
|
109
109
|
case 'list':
|
|
110
110
|
column.minWidth = 150;
|
|
111
|
+
// Values are already option objects ({value, display_name} or {id,
|
|
112
|
+
// label}); single = one object, multiple = an array of objects.
|
|
113
|
+
const formatChoiceValue = (value) => {
|
|
114
|
+
if (Array.isArray(value)) {
|
|
115
|
+
return value.map((v) => (v === null || v === void 0 ? void 0 : v.label) || (v === null || v === void 0 ? void 0 : v.display_name) || '').join(', ');
|
|
116
|
+
}
|
|
117
|
+
return (value === null || value === void 0 ? void 0 : value.label) || (value === null || value === void 0 ? void 0 : value.display_name) || '';
|
|
118
|
+
};
|
|
111
119
|
if (isEditable && !col.disabled) {
|
|
112
|
-
column.valueFormatter =
|
|
113
|
-
if (Array.isArray(value))
|
|
114
|
-
return value.map((v) => v.label || v.display_name || v).join(', ');
|
|
115
|
-
return (value === null || value === void 0 ? void 0 : value.label) || (value === null || value === void 0 ? void 0 : value.display_name) || value || '';
|
|
116
|
-
};
|
|
120
|
+
column.valueFormatter = formatChoiceValue;
|
|
117
121
|
column.renderEditCell = (p) => {
|
|
118
122
|
var _a;
|
|
119
123
|
const err = (_a = validationErrors[p.id]) === null || _a === void 0 ? void 0 : _a[p.field];
|
|
@@ -125,11 +129,7 @@ function buildPreparedColumns(_a) {
|
|
|
125
129
|
};
|
|
126
130
|
}
|
|
127
131
|
else {
|
|
128
|
-
column.valueGetter =
|
|
129
|
-
if (Array.isArray(value))
|
|
130
|
-
return value.map((v) => v.label || v.display_name || v).join(', ');
|
|
131
|
-
return (value === null || value === void 0 ? void 0 : value.label) || (value === null || value === void 0 ? void 0 : value.display_name) || value || '';
|
|
132
|
-
};
|
|
132
|
+
column.valueGetter = formatChoiceValue;
|
|
133
133
|
}
|
|
134
134
|
break;
|
|
135
135
|
case 'boolean':
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface ChangePasswordFormProps {
|
|
3
|
+
onSuccess?: () => void;
|
|
4
|
+
submitLabel?: string;
|
|
5
|
+
}
|
|
6
|
+
export default function ChangePasswordForm({ onSuccess, submitLabel, }: ChangePasswordFormProps): React.JSX.Element;
|
|
7
|
+
//# sourceMappingURL=ChangePasswordForm.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChangePasswordForm.d.ts","sourceRoot":"","sources":["../../../src/components/forms/ChangePasswordForm.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAUxC,MAAM,WAAW,uBAAuB;IACtC,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,EACzC,SAAS,EACT,WAAW,GACZ,EAAE,uBAAuB,qBAgFzB"}
|
|
@@ -0,0 +1,93 @@
|
|
|
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 = ChangePasswordForm;
|
|
49
|
+
const react_1 = __importStar(require("react"));
|
|
50
|
+
const Box_1 = __importDefault(require("@mui/material/Box"));
|
|
51
|
+
const TextField_1 = __importDefault(require("@mui/material/TextField"));
|
|
52
|
+
const Button_1 = __importDefault(require("@mui/material/Button"));
|
|
53
|
+
const Alert_1 = __importDefault(require("@mui/material/Alert"));
|
|
54
|
+
const styles_1 = require("@mui/material/styles");
|
|
55
|
+
const APIWrapperContext_1 = require("../../context/APIWrapperContext");
|
|
56
|
+
const texts_1 = require("../../styles/texts");
|
|
57
|
+
function ChangePasswordForm({ onSuccess, submitLabel, }) {
|
|
58
|
+
const { changePassword } = (0, APIWrapperContext_1.useAPIWrapper)();
|
|
59
|
+
const texts = (0, texts_1.getThemeTexts)((0, styles_1.useTheme)()).auth;
|
|
60
|
+
const [currentPassword, setCurrentPassword] = (0, react_1.useState)('');
|
|
61
|
+
const [newPassword, setNewPassword] = (0, react_1.useState)('');
|
|
62
|
+
const [confirmPassword, setConfirmPassword] = (0, react_1.useState)('');
|
|
63
|
+
const [error, setError] = (0, react_1.useState)('');
|
|
64
|
+
const [loading, setLoading] = (0, react_1.useState)(false);
|
|
65
|
+
const handleSubmit = (e) => __awaiter(this, void 0, void 0, function* () {
|
|
66
|
+
e.preventDefault();
|
|
67
|
+
setError('');
|
|
68
|
+
if (newPassword !== confirmPassword) {
|
|
69
|
+
setError(texts.passwordsDoNotMatch);
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
setLoading(true);
|
|
73
|
+
const result = yield changePassword({
|
|
74
|
+
old_password: currentPassword,
|
|
75
|
+
new_password: newPassword,
|
|
76
|
+
});
|
|
77
|
+
setLoading(false);
|
|
78
|
+
if (result && result.isAxiosError) {
|
|
79
|
+
setError(texts.changePasswordError);
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
setCurrentPassword('');
|
|
83
|
+
setNewPassword('');
|
|
84
|
+
setConfirmPassword('');
|
|
85
|
+
onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess();
|
|
86
|
+
});
|
|
87
|
+
return (react_1.default.createElement(Box_1.default, { component: "form", onSubmit: handleSubmit, noValidate: true },
|
|
88
|
+
error && (react_1.default.createElement(Alert_1.default, { severity: "error", sx: { mb: 2 } }, error)),
|
|
89
|
+
react_1.default.createElement(TextField_1.default, { fullWidth: true, margin: "normal", type: "password", label: texts.currentPassword, value: currentPassword, onChange: (e) => setCurrentPassword(e.target.value), autoComplete: "current-password", required: true }),
|
|
90
|
+
react_1.default.createElement(TextField_1.default, { fullWidth: true, margin: "normal", type: "password", label: texts.newPassword, value: newPassword, onChange: (e) => setNewPassword(e.target.value), autoComplete: "new-password", required: true }),
|
|
91
|
+
react_1.default.createElement(TextField_1.default, { fullWidth: true, margin: "normal", type: "password", label: texts.confirmPassword, value: confirmPassword, onChange: (e) => setConfirmPassword(e.target.value), autoComplete: "new-password", required: true }),
|
|
92
|
+
react_1.default.createElement(Button_1.default, { type: "submit", variant: "contained", fullWidth: true, sx: { mt: 2 }, disabled: loading || !currentPassword || !newPassword || !confirmPassword }, loading ? texts.saving : submitLabel !== null && submitLabel !== void 0 ? submitLabel : texts.changePasswordSubmit)));
|
|
93
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface ForgotPasswordFormProps {
|
|
3
|
+
/** When provided, the form switches to the "confirm" step (new password). */
|
|
4
|
+
token?: string;
|
|
5
|
+
/** The user id (base64) that came with the reset link. */
|
|
6
|
+
uid?: string;
|
|
7
|
+
onSuccess?: () => void;
|
|
8
|
+
onBack?: () => void;
|
|
9
|
+
}
|
|
10
|
+
export default function ForgotPasswordForm({ token, uid, onSuccess, onBack, }: ForgotPasswordFormProps): React.JSX.Element;
|
|
11
|
+
//# sourceMappingURL=ForgotPasswordForm.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ForgotPasswordForm.d.ts","sourceRoot":"","sources":["../../../src/components/forms/ForgotPasswordForm.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAUxC,MAAM,WAAW,uBAAuB;IACtC,6EAA6E;IAC7E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,0DAA0D;IAC1D,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,EACzC,KAAK,EACL,GAAG,EACH,SAAS,EACT,MAAM,GACP,EAAE,uBAAuB,qBAoHzB"}
|
|
@@ -0,0 +1,114 @@
|
|
|
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 = ForgotPasswordForm;
|
|
49
|
+
const react_1 = __importStar(require("react"));
|
|
50
|
+
const Box_1 = __importDefault(require("@mui/material/Box"));
|
|
51
|
+
const TextField_1 = __importDefault(require("@mui/material/TextField"));
|
|
52
|
+
const Button_1 = __importDefault(require("@mui/material/Button"));
|
|
53
|
+
const Alert_1 = __importDefault(require("@mui/material/Alert"));
|
|
54
|
+
const styles_1 = require("@mui/material/styles");
|
|
55
|
+
const APIWrapperContext_1 = require("../../context/APIWrapperContext");
|
|
56
|
+
const texts_1 = require("../../styles/texts");
|
|
57
|
+
function ForgotPasswordForm({ token, uid, onSuccess, onBack, }) {
|
|
58
|
+
const { requestPasswordReset, confirmPasswordReset } = (0, APIWrapperContext_1.useAPIWrapper)();
|
|
59
|
+
const texts = (0, texts_1.getThemeTexts)((0, styles_1.useTheme)()).auth;
|
|
60
|
+
const isConfirm = Boolean(token && uid);
|
|
61
|
+
const [email, setEmail] = (0, react_1.useState)('');
|
|
62
|
+
const [newPassword, setNewPassword] = (0, react_1.useState)('');
|
|
63
|
+
const [confirmPassword, setConfirmPassword] = (0, react_1.useState)('');
|
|
64
|
+
const [message, setMessage] = (0, react_1.useState)('');
|
|
65
|
+
const [error, setError] = (0, react_1.useState)('');
|
|
66
|
+
const [loading, setLoading] = (0, react_1.useState)(false);
|
|
67
|
+
const handleRequest = (e) => __awaiter(this, void 0, void 0, function* () {
|
|
68
|
+
e.preventDefault();
|
|
69
|
+
setError('');
|
|
70
|
+
setMessage('');
|
|
71
|
+
setLoading(true);
|
|
72
|
+
const result = yield requestPasswordReset(email);
|
|
73
|
+
setLoading(false);
|
|
74
|
+
if (result && result.isAxiosError) {
|
|
75
|
+
setError(texts.forgotRequestError);
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
setMessage(texts.forgotRequestSuccess);
|
|
79
|
+
});
|
|
80
|
+
const handleConfirm = (e) => __awaiter(this, void 0, void 0, function* () {
|
|
81
|
+
e.preventDefault();
|
|
82
|
+
setError('');
|
|
83
|
+
setMessage('');
|
|
84
|
+
if (newPassword !== confirmPassword) {
|
|
85
|
+
setError(texts.passwordsDoNotMatch);
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
setLoading(true);
|
|
89
|
+
const result = yield confirmPasswordReset({
|
|
90
|
+
uid: uid,
|
|
91
|
+
token: token,
|
|
92
|
+
new_password: newPassword,
|
|
93
|
+
});
|
|
94
|
+
setLoading(false);
|
|
95
|
+
if (result && result.isAxiosError) {
|
|
96
|
+
setError(texts.forgotConfirmError);
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
setMessage(texts.forgotConfirmSuccess);
|
|
100
|
+
onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess();
|
|
101
|
+
});
|
|
102
|
+
return (react_1.default.createElement(Box_1.default, { component: "form", onSubmit: isConfirm ? handleConfirm : handleRequest, noValidate: true },
|
|
103
|
+
error && (react_1.default.createElement(Alert_1.default, { severity: "error", sx: { mb: 2 } }, error)),
|
|
104
|
+
message && (react_1.default.createElement(Alert_1.default, { severity: "success", sx: { mb: 2 } }, message)),
|
|
105
|
+
!isConfirm ? (react_1.default.createElement(TextField_1.default, { fullWidth: true, margin: "normal", type: "email", label: texts.email, value: email, onChange: (e) => setEmail(e.target.value), autoComplete: "email", required: true })) : (react_1.default.createElement(react_1.default.Fragment, null,
|
|
106
|
+
react_1.default.createElement(TextField_1.default, { fullWidth: true, margin: "normal", type: "password", label: texts.newPassword, value: newPassword, onChange: (e) => setNewPassword(e.target.value), autoComplete: "new-password", required: true }),
|
|
107
|
+
react_1.default.createElement(TextField_1.default, { fullWidth: true, margin: "normal", type: "password", label: texts.confirmPassword, value: confirmPassword, onChange: (e) => setConfirmPassword(e.target.value), autoComplete: "new-password", required: true }))),
|
|
108
|
+
react_1.default.createElement(Button_1.default, { type: "submit", variant: "contained", fullWidth: true, sx: { mt: 2 }, disabled: loading || (isConfirm ? !newPassword || !confirmPassword : !email) }, loading
|
|
109
|
+
? texts.saving
|
|
110
|
+
: isConfirm
|
|
111
|
+
? texts.forgotConfirmSubmit
|
|
112
|
+
: texts.forgotRequestSubmit),
|
|
113
|
+
onBack && (react_1.default.createElement(Button_1.default, { fullWidth: true, sx: { mt: 1 }, onClick: onBack }, texts.backToSignIn))));
|
|
114
|
+
}
|
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { FieldBySchemaProps } from '../../../@types';
|
|
3
|
-
|
|
3
|
+
/**
|
|
4
|
+
* Choice/list picker built on MUI Autocomplete.
|
|
5
|
+
*
|
|
6
|
+
* `options` must be objects, and the current form `value` must match them: a
|
|
7
|
+
* single option object, or (when `multiple`) an array of option objects. The
|
|
8
|
+
* option shape is defined by `optionIdKey`/`optionLabelKey` (defaults
|
|
9
|
+
* `'id'`/`'label'`); it is NOT raw values/strings. Seed forms with
|
|
10
|
+
* populateValues() so values are already objects in the same format as options.
|
|
11
|
+
*/
|
|
12
|
+
export default function AutocompleteFieldBySchema({ fieldKey, index, name, schema, control, errors, optionIdKey, optionLabelKey, options: optionsByProps, isSemaphoric, sx, onValueChange, autoFocus, disabled, autoComplete: _, multiple, ...other }: FieldBySchemaProps): React.JSX.Element | undefined;
|
|
4
13
|
//# sourceMappingURL=AutocompleteFieldBySchema.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AutocompleteFieldBySchema.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/inputs/AutocompleteFieldBySchema.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAMvC,OAAO,EAAE,kBAAkB,
|
|
1
|
+
{"version":3,"file":"AutocompleteFieldBySchema.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/inputs/AutocompleteFieldBySchema.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAMvC,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AA8DrD;;;;;;;;GAQG;AACH,MAAM,CAAC,OAAO,UAAU,yBAAyB,CAAC,EAChD,QAAQ,EACR,KAAK,EACL,IAAI,EACJ,MAAM,EACN,OAAO,EACP,MAAM,EACN,WAAkB,EAClB,cAAwB,EACxB,OAAO,EAAE,cAAc,EACvB,YAAoB,EACpB,EAAc,EACd,aAAa,EACb,SAAS,EACT,QAAQ,EACR,YAAY,EAAE,CAAC,EACf,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,kBAAkB,iCA+DpB"}
|
|
@@ -88,8 +88,17 @@ const renderInput = (_a) => {
|
|
|
88
88
|
}
|
|
89
89
|
return (react_1.default.createElement(TextField_1.default, Object.assign({}, params, { label: label || fieldSchema.label, required: (0, utils_1.isFieldRequired)(fieldSchema), margin: "normal", error: error, helperText: helperText, sx: sx })));
|
|
90
90
|
};
|
|
91
|
+
/**
|
|
92
|
+
* Choice/list picker built on MUI Autocomplete.
|
|
93
|
+
*
|
|
94
|
+
* `options` must be objects, and the current form `value` must match them: a
|
|
95
|
+
* single option object, or (when `multiple`) an array of option objects. The
|
|
96
|
+
* option shape is defined by `optionIdKey`/`optionLabelKey` (defaults
|
|
97
|
+
* `'id'`/`'label'`); it is NOT raw values/strings. Seed forms with
|
|
98
|
+
* populateValues() so values are already objects in the same format as options.
|
|
99
|
+
*/
|
|
91
100
|
function AutocompleteFieldBySchema(_a) {
|
|
92
|
-
var { fieldKey, index, name, schema, control, errors, optionIdKey = 'id', optionLabelKey = 'label', options: optionsByProps, isSemaphoric = false, sx = { mr: 2 }, onValueChange, autoFocus, disabled, autoComplete: _ } = _a, other = __rest(_a, ["fieldKey", "index", "name", "schema", "control", "errors", "optionIdKey", "optionLabelKey", "options", "isSemaphoric", "sx", "onValueChange", "autoFocus", "disabled", "autoComplete"]);
|
|
101
|
+
var { fieldKey, index, name, schema, control, errors, optionIdKey = 'id', optionLabelKey = 'label', options: optionsByProps, isSemaphoric = false, sx = { mr: 2 }, onValueChange, autoFocus, disabled, autoComplete: _, multiple } = _a, other = __rest(_a, ["fieldKey", "index", "name", "schema", "control", "errors", "optionIdKey", "optionLabelKey", "options", "isSemaphoric", "sx", "onValueChange", "autoFocus", "disabled", "autoComplete", "multiple"]);
|
|
93
102
|
const { theme } = (0, DRFReactBySchemaContext_1.useDRFReactBySchema)();
|
|
94
103
|
const fieldSchema = schema[name];
|
|
95
104
|
const options = (0, react_1.useMemo)(() => optionsByProps || fieldSchema.choices, [optionsByProps, fieldSchema]);
|
|
@@ -100,7 +109,7 @@ function AutocompleteFieldBySchema(_a) {
|
|
|
100
109
|
if (fieldKey && index && index >= 0) {
|
|
101
110
|
name = `${fieldKey}.${index}.${name}`;
|
|
102
111
|
}
|
|
103
|
-
return (react_1.default.createElement(react_hook_form_1.Controller, { name: name, control: control, render: ({ field }) => (react_1.default.createElement(Autocomplete_1.default, Object.assign({}, field, { key: name, id: name, options: options || [], disabled: fieldSchema.disabled === true || disabled === true, selectOnFocus: true, autoHighlight: true, autoFocus: autoFocus, isOptionEqualToValue: (option, value) => {
|
|
112
|
+
return (react_1.default.createElement(react_hook_form_1.Controller, { name: name, control: control, render: ({ field }) => (react_1.default.createElement(Autocomplete_1.default, Object.assign({}, field, { key: name, id: name, options: options || [], disabled: fieldSchema.disabled === true || disabled === true, selectOnFocus: true, autoHighlight: true, autoFocus: autoFocus, multiple: multiple, isOptionEqualToValue: (option, value) => {
|
|
104
113
|
return option[optionIdKey] === value[optionIdKey];
|
|
105
114
|
}, getOptionLabel: (option) => {
|
|
106
115
|
return option[optionLabelKey];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"APIWrapper.d.ts","sourceRoot":"","sources":["../../src/context/APIWrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwE,MAAM,OAAO,CAAC;AAM7F,OAAO,EAgBL,MAAM,EAGP,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"APIWrapper.d.ts","sourceRoot":"","sources":["../../src/context/APIWrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwE,MAAM,OAAO,CAAC;AAM7F,OAAO,EAgBL,MAAM,EAGP,MAAM,WAAW,CAAC;AAkCnB,OAAO,EAEL,UAAU,EAEV,SAAS,EAMT,YAAY,EACZ,YAAY,EACb,MAAM,qBAAqB,CAAC;AAI7B,UAAU,eAAe,CAAC,CAAC,SAAS,MAAM,GAAG,IAAI;IAC/C,aAAa,EAAE,CAAC,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IACpC,WAAW,EAAE,CAAC,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,KAAK,IAAI,CAAC;IAChD,SAAS,EAAE,CAAC,QAAQ,EAAE,OAAO,CAAC,UAAU,CAAC,GAAG,IAAI,KAAK,IAAI,CAAC;IAC1D,QAAQ,EAAE,YAAY,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;IACjC,WAAW,EAAE,CAAC,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC;IACnD,aAAa,EAAE,MAAM,IAAI,CAAC;IAC1B,SAAS,CAAC,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC;IACzB,YAAY,EAAE,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC;IACxC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,iBAAS,UAAU,CAAC,EAClB,aAAa,EACb,WAAW,EACX,SAAS,EACT,QAAQ,EACR,WAAW,EACX,aAAa,EACb,SAAS,EACT,YAAY,EACZ,QAAQ,GACT,EAAE,eAAe,qBA2uBjB;;AAED,wBAAsC"}
|
|
@@ -102,6 +102,9 @@ function APIWrapper({ handleLoading, setSnackBar, setDialog, pageForm, setPageFo
|
|
|
102
102
|
const response = yield (0, api_1.getSignUpOptions)(serverEndPoint);
|
|
103
103
|
return response;
|
|
104
104
|
}), [serverEndPoint]);
|
|
105
|
+
const localRequestPasswordReset = (0, react_1.useCallback)((email) => __awaiter(this, void 0, void 0, function* () { return (0, api_1.requestPasswordReset)(email, serverEndPoint); }), [serverEndPoint]);
|
|
106
|
+
const localConfirmPasswordReset = (0, react_1.useCallback)((data) => __awaiter(this, void 0, void 0, function* () { return (0, api_1.confirmPasswordReset)(data, serverEndPoint); }), [serverEndPoint]);
|
|
107
|
+
const localChangePassword = (0, react_1.useCallback)((data) => __awaiter(this, void 0, void 0, function* () { return (0, api_1.changePassword)(data, serverEndPoint); }), [serverEndPoint]);
|
|
105
108
|
const signOut = (0, react_1.useCallback)(() => {
|
|
106
109
|
(0, api_1.clearJWT)();
|
|
107
110
|
setUsuaria(null);
|
|
@@ -531,6 +534,9 @@ function APIWrapper({ handleLoading, setSnackBar, setDialog, pageForm, setPageFo
|
|
|
531
534
|
getSignUpOptions: localGetSignupOptions,
|
|
532
535
|
signUp: localSignUp,
|
|
533
536
|
signOut,
|
|
537
|
+
requestPasswordReset: localRequestPasswordReset,
|
|
538
|
+
confirmPasswordReset: localConfirmPasswordReset,
|
|
539
|
+
changePassword: localChangePassword,
|
|
534
540
|
postData: postData,
|
|
535
541
|
editModel,
|
|
536
542
|
updateModel: localUpdateModel,
|
|
@@ -550,6 +556,9 @@ function APIWrapper({ handleLoading, setSnackBar, setDialog, pageForm, setPageFo
|
|
|
550
556
|
localGetSignupOptions,
|
|
551
557
|
localLoginByPayload,
|
|
552
558
|
localSignUp,
|
|
559
|
+
localChangePassword,
|
|
560
|
+
localConfirmPasswordReset,
|
|
561
|
+
localRequestPasswordReset,
|
|
553
562
|
localUpdateModel,
|
|
554
563
|
onDeleteModel,
|
|
555
564
|
onDeleteRelatedModel,
|
|
@@ -117,6 +117,9 @@ export interface APIWrapperContextType<T extends TField = void> {
|
|
|
117
117
|
getSignUpOptions: () => Promise<SchemaType | AxiosError>;
|
|
118
118
|
signUp: <U extends TField = void>(data: Item<U>) => Promise<Item<U> | AxiosError>;
|
|
119
119
|
signOut: () => void;
|
|
120
|
+
requestPasswordReset: (email: string) => Promise<Item | AxiosError>;
|
|
121
|
+
confirmPasswordReset: (data: Item) => Promise<Item | AxiosError>;
|
|
122
|
+
changePassword: (data: Item) => Promise<Item | AxiosError>;
|
|
120
123
|
postData: <U extends TField = void>(params: TargetApiPostParamsLocal<U>) => Promise<Item<U> | AxiosError>;
|
|
121
124
|
editModel: React.RefObject<Item<T>>;
|
|
122
125
|
updateModel: <U extends TField = void>(p: TargetApiParamsLocal<U>) => Promise<Item<U> | AxiosError>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"APIWrapperContext.d.ts","sourceRoot":"","sources":["../../src/context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U,CAAC,CAAC;IACnC,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;IACpC,WAAW,EAAE,CAAC,CAAC,SAAS,MAAM,GAAG,IAAI,EACnC,CAAC,EAAE,oBAAoB,CAAC,CAAC,CAAC,KACvB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC;IACnC,iBAAiB,EAAE,CAAC,eAAe,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IACvD,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,eAAO,MAAM,iBAAiB,
|
|
1
|
+
{"version":3,"file":"APIWrapperContext.d.ts","sourceRoot":"","sources":["../../src/context/APIWrapperContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EACL,WAAW,EACX,WAAW,EACX,aAAa,EACb,gBAAgB,EAChB,YAAY,EACZ,eAAe,EAChB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,UAAU,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAC3E,OAAO,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AACnC,OAAO,EAAE,YAAY,EAAE,MAAM,KAAK,CAAC;AAEnC,OAAO,EACL,qBAAqB,EACrB,EAAE,EACF,IAAI,EACJ,UAAU,EACV,qBAAqB,EACrB,cAAc,EACd,SAAS,EACT,eAAe,EACf,oBAAoB,EACpB,wBAAwB,EACxB,6BAA6B,EAC7B,0BAA0B,EAC1B,eAAe,EACf,yBAAyB,EACzB,kBAAkB,EAClB,gBAAgB,EAChB,QAAQ,EACR,WAAW,EACX,MAAM,EACN,eAAe,EAChB,MAAM,WAAW,CAAC;AAEnB,MAAM,WAAW,uBAAuB,CAAC,CAAC,SAAS,MAAM,GAAG,IAAI;IAC9D,KAAK,EAAE,MAAM,CAAC;IACd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rapperContext = react_1.default.createContext({
|
|
|
48
48
|
getSignUpOptions: () => __awaiter(void 0, void 0, void 0, function* () { return ({ isAxiosError: true }); }),
|
|
49
49
|
signUp: () => __awaiter(void 0, void 0, void 0, function* () { return ({ isAxiosError: true }); }),
|
|
50
50
|
signOut: () => undefined,
|
|
51
|
+
requestPasswordReset: () => __awaiter(void 0, void 0, void 0, function* () { return ({ isAxiosError: true }); }),
|
|
52
|
+
confirmPasswordReset: () => __awaiter(void 0, void 0, void 0, function* () { return ({ isAxiosError: true }); }),
|
|
53
|
+
changePassword: () => __awaiter(void 0, void 0, void 0, function* () { return ({ isAxiosError: true }); }),
|
|
51
54
|
postData: () => __awaiter(void 0, void 0, void 0, function* () { return ({ isAxiosError: true }); }),
|
|
52
55
|
editModel: { current: {} },
|
|
53
56
|
updateModel: () => __awaiter(void 0, void 0, void 0, function* () { return ({ isAxiosError: true }); }),
|
|
@@ -11,6 +11,9 @@ export interface ServerEndPoint {
|
|
|
11
11
|
refreshToken?: string;
|
|
12
12
|
verifyToken?: string;
|
|
13
13
|
media?: string;
|
|
14
|
+
requestPasswordReset?: string;
|
|
15
|
+
confirmPasswordReset?: string;
|
|
16
|
+
changePassword?: string;
|
|
14
17
|
}
|
|
15
18
|
interface DRFReactBySchemaContextType {
|
|
16
19
|
serverEndPoint: ServerEndPoint | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DRFReactBySchemaContext.d.ts","sourceRoot":"","sources":["../../src/context/DRFReactBySchemaContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAI7C,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAGxC,MAAM,WAAW,cAAc;IAC7B,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,EAAE,MAAM,CAAC;IACpB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,E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C,CAAC;AAEH,eAAO,MAAM,mBAAmB,mCAG/B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DRFReactBySchemaProvider.d.ts","sourceRoot":"","sources":["../../src/context/DRFReactBySchemaProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAOvC,OAAO,EAGL,6BAA6B,EAC9B,MAAM,2BAA2B,CAAC;AAEnC,QAAA,MAAM,wBAAwB,GAAI,8EAO/B,6BAA6B,
|
|
1
|
+
{"version":3,"file":"DRFReactBySchemaProvider.d.ts","sourceRoot":"","sources":["../../src/context/DRFReactBySchemaProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAOvC,OAAO,EAGL,6BAA6B,EAC9B,MAAM,2BAA2B,CAAC;AAEnC,QAAA,MAAM,wBAAwB,GAAI,8EAO/B,6BAA6B,sBAwE/B,CAAC;AAEF,eAAe,wBAAwB,CAAC"}
|
|
@@ -71,6 +71,18 @@ const DRFReactBySchemaProvider = ({ serverEndPoint, theme, isInBatches, firstBat
|
|
|
71
71
|
? `${newServerEndPoint.apiTokenUrl}${hybridUrl}/`
|
|
72
72
|
: `${newServerEndPoint.url}/${hybridUrl}`;
|
|
73
73
|
}
|
|
74
|
+
// Password management endpoints (optional; derived from `api` unless provided).
|
|
75
|
+
const passwordRoutes = [
|
|
76
|
+
['requestPasswordReset', 'password_reset/request'],
|
|
77
|
+
['confirmPasswordReset', 'password_reset/confirm'],
|
|
78
|
+
['changePassword', 'my_account/change_password'],
|
|
79
|
+
];
|
|
80
|
+
for (const [key, path] of passwordRoutes) {
|
|
81
|
+
if (newServerEndPoint[key]) {
|
|
82
|
+
continue;
|
|
83
|
+
}
|
|
84
|
+
newServerEndPoint[key] = `${newServerEndPoint.api}/${path}/`;
|
|
85
|
+
}
|
|
74
86
|
return newServerEndPoint;
|
|
75
87
|
}, [serverEndPoint]);
|
|
76
88
|
const mergedTheme = (0, react_1.useMemo)(() => {
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { setAuthToken, hasJWT, clearJWT, AUTH_EXPIRED_EVENT } from './api';
|
|
2
|
-
import { emptyByType, getChoiceByValue, populateValues, buildGenericYupValidationSchema, errorProps, getFieldErrorsFromResponse, getTmpId, isTmpId, getPatternFormat, slugToCamelCase } from './utils';
|
|
2
|
+
import { emptyByType, getChoiceByValue, populateValues, enrichChoices, buildGenericYupValidationSchema, errorProps, getFieldErrorsFromResponse, getTmpId, isTmpId, getPatternFormat, slugToCamelCase } from './utils';
|
|
3
3
|
import DRFReactBySchemaProvider from './context/DRFReactBySchemaProvider';
|
|
4
4
|
import { useAPIWrapper } from './context/APIWrapperContext';
|
|
5
5
|
import Form from './components/forms/Form';
|
|
6
6
|
import DialogFormBySchema from './components/forms/DialogFormBySchema';
|
|
7
|
+
import ChangePasswordForm from './components/forms/ChangePasswordForm';
|
|
8
|
+
import ForgotPasswordForm from './components/forms/ForgotPasswordForm';
|
|
7
9
|
import DataGridBySchemaEditable from './components/DataGridBySchemaEditable';
|
|
8
10
|
import GenericModelList from './components/GenericModelList';
|
|
9
11
|
import GenericRelatedModelList from './components/GenericRelatedModelList';
|
|
@@ -27,9 +29,9 @@ import AutocompleteFieldBySchema from './components/forms/inputs/AutocompleteFie
|
|
|
27
29
|
import FloatFieldBySchema from './components/forms/inputs/FloatFieldBySchema';
|
|
28
30
|
export { applyDefaultLeafletIcon } from './components/forms/inputs/leafletMarker';
|
|
29
31
|
export { getThemeTexts } from './styles/texts';
|
|
30
|
-
export type { DRFReactBySchemaTexts, GeometryTexts, FormTexts } from './styles/texts';
|
|
32
|
+
export type { DRFReactBySchemaTexts, GeometryTexts, FormTexts, AuthTexts } from './styles/texts';
|
|
31
33
|
import DetailBySchema from './components/details/DetailBySchema';
|
|
32
34
|
import DetailFieldBySchema from './components/details/DetailFieldBySchema';
|
|
33
|
-
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, };
|
|
35
|
+
export { DRFReactBySchemaProvider, useAPIWrapper, Form, DialogFormBySchema, ChangePasswordForm, ForgotPasswordForm, 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, enrichChoices, buildGenericYupValidationSchema, errorProps, getFieldErrorsFromResponse, getTmpId, isTmpId, getPatternFormat, clearJWT, hasJWT, slugToCamelCase, AUTH_EXPIRED_EVENT, };
|
|
34
36
|
export * from './@types/index';
|
|
35
37
|
//# 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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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.FileTypeIcon = exports.DialogActions = exports.DataTotals = exports.GenericRelatedModelList = exports.GenericModelList = exports.DataGridBySchemaEditable = exports.DialogFormBySchema = exports.Form = exports.useAPIWrapper = exports.DRFReactBySchemaProvider = exports.getThemeTexts = exports.applyDefaultLeafletIcon = 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.enrichChoices = 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.ForgotPasswordForm = exports.ChangePasswordForm = exports.DialogFormBySchema = exports.Form = exports.useAPIWrapper = exports.DRFReactBySchemaProvider = exports.getThemeTexts = exports.applyDefaultLeafletIcon = 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; } });
|
|
@@ -28,6 +28,7 @@ const utils_1 = require("./utils");
|
|
|
28
28
|
Object.defineProperty(exports, "emptyByType", { enumerable: true, get: function () { return utils_1.emptyByType; } });
|
|
29
29
|
Object.defineProperty(exports, "getChoiceByValue", { enumerable: true, get: function () { return utils_1.getChoiceByValue; } });
|
|
30
30
|
Object.defineProperty(exports, "populateValues", { enumerable: true, get: function () { return utils_1.populateValues; } });
|
|
31
|
+
Object.defineProperty(exports, "enrichChoices", { enumerable: true, get: function () { return utils_1.enrichChoices; } });
|
|
31
32
|
Object.defineProperty(exports, "buildGenericYupValidationSchema", { enumerable: true, get: function () { return utils_1.buildGenericYupValidationSchema; } });
|
|
32
33
|
Object.defineProperty(exports, "errorProps", { enumerable: true, get: function () { return utils_1.errorProps; } });
|
|
33
34
|
Object.defineProperty(exports, "getFieldErrorsFromResponse", { enumerable: true, get: function () { return utils_1.getFieldErrorsFromResponse; } });
|
|
@@ -46,6 +47,10 @@ const Form_1 = __importDefault(require("./components/forms/Form"));
|
|
|
46
47
|
exports.Form = Form_1.default;
|
|
47
48
|
const DialogFormBySchema_1 = __importDefault(require("./components/forms/DialogFormBySchema"));
|
|
48
49
|
exports.DialogFormBySchema = DialogFormBySchema_1.default;
|
|
50
|
+
const ChangePasswordForm_1 = __importDefault(require("./components/forms/ChangePasswordForm"));
|
|
51
|
+
exports.ChangePasswordForm = ChangePasswordForm_1.default;
|
|
52
|
+
const ForgotPasswordForm_1 = __importDefault(require("./components/forms/ForgotPasswordForm"));
|
|
53
|
+
exports.ForgotPasswordForm = ForgotPasswordForm_1.default;
|
|
49
54
|
// Components:
|
|
50
55
|
const DataGridBySchemaEditable_1 = __importDefault(require("./components/DataGridBySchemaEditable"));
|
|
51
56
|
exports.DataGridBySchemaEditable = DataGridBySchemaEditable_1.default;
|
package/dist/styles/texts.d.ts
CHANGED
|
@@ -39,9 +39,27 @@ export interface FormTexts {
|
|
|
39
39
|
dialogCancel: string;
|
|
40
40
|
dialogSave: string;
|
|
41
41
|
}
|
|
42
|
+
export interface AuthTexts {
|
|
43
|
+
email: string;
|
|
44
|
+
currentPassword: string;
|
|
45
|
+
newPassword: string;
|
|
46
|
+
confirmPassword: string;
|
|
47
|
+
saving: string;
|
|
48
|
+
passwordsDoNotMatch: string;
|
|
49
|
+
backToSignIn: string;
|
|
50
|
+
changePasswordSubmit: string;
|
|
51
|
+
changePasswordError: string;
|
|
52
|
+
forgotRequestSubmit: string;
|
|
53
|
+
forgotConfirmSubmit: string;
|
|
54
|
+
forgotRequestError: string;
|
|
55
|
+
forgotRequestSuccess: string;
|
|
56
|
+
forgotConfirmError: string;
|
|
57
|
+
forgotConfirmSuccess: string;
|
|
58
|
+
}
|
|
42
59
|
export interface DRFReactBySchemaTexts {
|
|
43
60
|
geometry: GeometryTexts;
|
|
44
61
|
forms: FormTexts;
|
|
62
|
+
auth: AuthTexts;
|
|
45
63
|
}
|
|
46
64
|
export declare const DEFAULT_TEXTS: DRFReactBySchemaTexts;
|
|
47
65
|
export declare function getThemeTexts(theme: Theme): DRFReactBySchemaTexts;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"texts.d.ts","sourceRoot":"","sources":["../../src/styles/texts.ts"],"names":[],"mappings":"AAAA,OAAO,EAA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AAM,CAAC;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,SAAS;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,MAAM,CAAC;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,mBAAmB,EAAE,MAAM,CAAC;IAC5B,YAAY,EAAE,MAAM,CAAC;IAErB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,mBAAmB,EAAE,MAAM,CAAC;IAE5B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,oBAAoB,EAAE,MAAM,CAAC;IAC7B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,oBAAoB,EAAE,MAAM,CAAC;CAC9B;AAED,MAAM,WAAW,qBAAqB;IACpC,QAAQ,EAAE,aAAa,CAAC;IACxB,KAAK,EAAE,SAAS,CAAC;IACjB,IAAI,EAAE,SAAS,CAAC;CACjB;AAGD,eAAO,MAAM,aAAa,EAAE,qBA2D3B,CAAC;AAGF,wBAAgB,aAAa,CAAC,KAAK,EAAE,KAAK,GAAG,qBAAqB,CAOjE"}
|
package/dist/styles/texts.js
CHANGED
|
@@ -44,6 +44,23 @@ exports.DEFAULT_TEXTS = {
|
|
|
44
44
|
dialogCancel: 'Cancel',
|
|
45
45
|
dialogSave: 'Save',
|
|
46
46
|
},
|
|
47
|
+
auth: {
|
|
48
|
+
email: 'E-mail',
|
|
49
|
+
currentPassword: 'Current password',
|
|
50
|
+
newPassword: 'New password',
|
|
51
|
+
confirmPassword: 'Confirm new password',
|
|
52
|
+
saving: 'Saving…',
|
|
53
|
+
passwordsDoNotMatch: 'The new passwords do not match.',
|
|
54
|
+
backToSignIn: 'Back to sign in',
|
|
55
|
+
changePasswordSubmit: 'Update password',
|
|
56
|
+
changePasswordError: 'Could not update the password. Check the current password and try again.',
|
|
57
|
+
forgotRequestSubmit: 'Send reset link',
|
|
58
|
+
forgotConfirmSubmit: 'Set password',
|
|
59
|
+
forgotRequestError: 'Could not request a reset link. Check the e-mail and try again.',
|
|
60
|
+
forgotRequestSuccess: 'If that address is registered, a reset link was sent to it.',
|
|
61
|
+
forgotConfirmError: 'Invalid or expired reset link. Request a new one.',
|
|
62
|
+
forgotConfirmSuccess: 'Password updated. You can now sign in with your new password.',
|
|
63
|
+
},
|
|
47
64
|
};
|
|
48
65
|
// Merge theme.texts over the defaults; theme.texts is absent under a bare ThemeProvider.
|
|
49
66
|
function getThemeTexts(theme) {
|
|
@@ -51,5 +68,6 @@ function getThemeTexts(theme) {
|
|
|
51
68
|
return {
|
|
52
69
|
geometry: Object.assign(Object.assign({}, exports.DEFAULT_TEXTS.geometry), ((custom === null || custom === void 0 ? void 0 : custom.geometry) || {})),
|
|
53
70
|
forms: Object.assign(Object.assign({}, exports.DEFAULT_TEXTS.forms), ((custom === null || custom === void 0 ? void 0 : custom.forms) || {})),
|
|
71
|
+
auth: Object.assign(Object.assign({}, exports.DEFAULT_TEXTS.auth), ((custom === null || custom === void 0 ? void 0 : custom.auth) || {})),
|
|
54
72
|
};
|
|
55
73
|
}
|
package/dist/utils/utils.d.ts
CHANGED
|
@@ -4,6 +4,8 @@ import * as geojson from 'geojson';
|
|
|
4
4
|
import { ChoiceItem, ChoiceValue, ConditionalVisible, CustomFormField, ExtraValidators, Field, FormFieldLayout, GenericValue, GeometryFieldType, GridEnrichedBySchemaColDef, Item, SchemaType, TField } from '../@types';
|
|
5
5
|
export declare const emptyByType: GenericValue;
|
|
6
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>;
|
|
7
9
|
export declare function populateValues({ data, schema }: {
|
|
8
10
|
data: Item;
|
|
9
11
|
schema: SchemaType;
|
|
@@ -1 +1 @@
|
|
|
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;
|
|
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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Y,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
|
@@ -45,7 +45,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
45
45
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
46
46
|
};
|
|
47
47
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
48
|
-
exports.convertToFormData = exports.slugify = exports.slugToCamelCase = exports.getPatternFormat = exports.isTmpId = exports.getTmpId = exports.errorProps = exports.getChoiceByValue = exports.emptyByType = void 0;
|
|
48
|
+
exports.convertToFormData = exports.slugify = exports.slugToCamelCase = exports.getPatternFormat = exports.isTmpId = exports.getTmpId = exports.errorProps = exports.toChoiceItem = exports.getChoiceByValue = exports.emptyByType = void 0;
|
|
49
|
+
exports.enrichChoices = enrichChoices;
|
|
49
50
|
exports.populateValues = populateValues;
|
|
50
51
|
exports.buildGenericYupValidationSchema = buildGenericYupValidationSchema;
|
|
51
52
|
exports.loadSinglePageDataHelper = loadSinglePageDataHelper;
|
|
@@ -110,6 +111,38 @@ const getChoiceByValue = (value, choices) => {
|
|
|
110
111
|
}
|
|
111
112
|
};
|
|
112
113
|
exports.getChoiceByValue = getChoiceByValue;
|
|
114
|
+
// Shapes a raw choice value into a {value, display_name} object; objects that are
|
|
115
|
+
// already enriched pass through unchanged.
|
|
116
|
+
const toChoiceItem = (rawValue, choices) => typeof rawValue === 'object' && rawValue !== null
|
|
117
|
+
? rawValue
|
|
118
|
+
: {
|
|
119
|
+
value: rawValue,
|
|
120
|
+
display_name: (0, exports.getChoiceByValue)(rawValue, choices),
|
|
121
|
+
};
|
|
122
|
+
exports.toChoiceItem = toChoiceItem;
|
|
123
|
+
// Backends return choice fields as raw values. Reshape a single 'choice' into a
|
|
124
|
+
// {value, display_name} object and a 'list'/'multiple choice' into an array of
|
|
125
|
+
// them, so forms and grid rows are consistent. list options live under
|
|
126
|
+
// field.child?.choices (FieldBySchema reads the same source).
|
|
127
|
+
function enrichChoices(rawData, schema) {
|
|
128
|
+
const out = Object.assign({}, rawData);
|
|
129
|
+
for (const [key, field] of Object.entries(schema)) {
|
|
130
|
+
if (!(key in rawData)) {
|
|
131
|
+
continue;
|
|
132
|
+
}
|
|
133
|
+
if ((field === null || field === void 0 ? void 0 : field.type) === 'choice') {
|
|
134
|
+
const rawValue = rawData[key];
|
|
135
|
+
out[key] = rawValue ? (0, exports.toChoiceItem)(rawValue, field.choices) : (0, exports.emptyByType)(field);
|
|
136
|
+
}
|
|
137
|
+
else if ((field === null || field === void 0 ? void 0 : field.type) === 'list' || (field === null || field === void 0 ? void 0 : field.type) === 'multiple choice') {
|
|
138
|
+
const rawValue = rawData[key];
|
|
139
|
+
if (Array.isArray(rawValue)) {
|
|
140
|
+
out[key] = rawValue.map((entry) => { var _a; return (0, exports.toChoiceItem)(entry, (_a = field.child) === null || _a === void 0 ? void 0 : _a.choices); });
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
return out;
|
|
145
|
+
}
|
|
113
146
|
function populateValues({ data, schema }) {
|
|
114
147
|
var _a;
|
|
115
148
|
const values = {};
|
|
@@ -141,11 +174,12 @@ function populateValues({ data, schema }) {
|
|
|
141
174
|
continue;
|
|
142
175
|
}
|
|
143
176
|
if (field.type === 'choice') {
|
|
144
|
-
values[key] = data[key]
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
177
|
+
values[key] = data[key] ? (0, exports.toChoiceItem)(data[key], field.choices) : (0, exports.emptyByType)(field);
|
|
178
|
+
continue;
|
|
179
|
+
}
|
|
180
|
+
if (field.type === 'list' || field.type === 'multiple choice') {
|
|
181
|
+
values[key] = Array.isArray(data[key])
|
|
182
|
+
? data[key].map((entry) => { var _a; return (0, exports.toChoiceItem)(entry, (_a = field.child) === null || _a === void 0 ? void 0 : _a.choices); })
|
|
149
183
|
: (0, exports.emptyByType)(field);
|
|
150
184
|
continue;
|
|
151
185
|
}
|
package/package.json
CHANGED