@truedat/dd 4.36.4 → 4.36.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## [4.36.5] 2022-01-20
4
+
5
+ ### Added
6
+
7
+ - [TD-4100] Long Alert error message CSV download link
8
+
3
9
  ## [4.36.3] 2022-01-18
4
10
 
5
11
  ### Added
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@truedat/dd",
3
- "version": "4.36.4",
3
+ "version": "4.36.8",
4
4
  "description": "Truedat Web Data Dictionary",
5
5
  "sideEffects": false,
6
6
  "jsnext:main": "src/index.js",
@@ -47,7 +47,7 @@
47
47
  "jest": "^27.0.6",
48
48
  "react": "^16.14.0",
49
49
  "react-dom": "^16.14.0",
50
- "redux-saga-test-plan": "^4.0.1",
50
+ "redux-saga-test-plan": "^4.0.4",
51
51
  "rimraf": "^3.0.2",
52
52
  "semantic-ui-react": "^2.0.3"
53
53
  },
@@ -84,9 +84,9 @@
84
84
  ]
85
85
  },
86
86
  "dependencies": {
87
- "@truedat/auth": "4.36.4",
88
- "@truedat/core": "4.36.4",
89
- "@truedat/df": "4.36.4",
87
+ "@truedat/auth": "4.36.8",
88
+ "@truedat/core": "4.36.8",
89
+ "@truedat/df": "4.36.8",
90
90
  "lodash": "^4.17.21",
91
91
  "path-to-regexp": "^1.7.0",
92
92
  "prop-types": "^15.7.2",
@@ -107,5 +107,5 @@
107
107
  "react-dom": ">= 16.8.6 < 17",
108
108
  "semantic-ui-react": ">= 0.88.2 < 2.1"
109
109
  },
110
- "gitHead": "4dbf4f9e5188b82b17d053b65e76506e60aa6722"
110
+ "gitHead": "b9b8ee80998b230697593b5d207d187971bc0724"
111
111
  }
@@ -1,6 +1,5 @@
1
1
  import React from "react";
2
2
  import PropTypes from "prop-types";
3
- import { bindActionCreators } from "redux";
4
3
  import { connect } from "react-redux";
5
4
  import { useIntl } from "react-intl";
6
5
  import { Button, Icon } from "semantic-ui-react";
@@ -24,11 +23,7 @@ export const StructureDeleteButton = ({ structure, deleteStructure }) => {
24
23
  content={formatMessage({
25
24
  id: "structure.actions.delete.confirmation.content",
26
25
  })}
27
- handleSubmit={() =>
28
- deleteStructure({
29
- id: structure.id,
30
- })
31
- }
26
+ onConfirm={() => deleteStructure({ id: structure.id })}
32
27
  onOpen={(e) => e.stopPropagation()}
33
28
  onClone={(e) => e.stopPropagation()}
34
29
  />
@@ -39,14 +34,11 @@ StructureDeleteButton.propTypes = {
39
34
  structure: PropTypes.object,
40
35
  deleteStructure: PropTypes.func,
41
36
  };
42
- const mapDispatchToProps = (dispatch) =>
43
- bindActionCreators({ deleteStructure }, dispatch);
44
37
 
45
38
  const mapStateToProps = ({ structure }) => ({
46
39
  structure,
47
40
  });
48
41
 
49
- export default connect(
50
- mapStateToProps,
51
- mapDispatchToProps
52
- )(StructureDeleteButton);
42
+ export default connect(mapStateToProps, { deleteStructure })(
43
+ StructureDeleteButton
44
+ );
@@ -9,7 +9,7 @@ import { ConfirmModal, GroupActions } from "@truedat/core/components";
9
9
  import { linkTo } from "@truedat/core/routes";
10
10
  import { doStructureNoteAction } from "../routines";
11
11
 
12
- export const ModalDelete = ({ modalOnClick, modalAction, modalIcon }) => (
12
+ export const ModalDelete = ({ modalOnConfirm, modalAction, modalIcon }) => (
13
13
  <ConfirmModal
14
14
  icon="trash"
15
15
  trigger={
@@ -34,11 +34,12 @@ export const ModalDelete = ({ modalOnClick, modalAction, modalIcon }) => (
34
34
  id={`structure.notes.actions.${modalAction}.confirmation.content`}
35
35
  />
36
36
  }
37
- handleSubmit={modalOnClick}
37
+ onConfirm={modalOnConfirm}
38
38
  />
39
39
  );
40
+
40
41
  ModalDelete.propTypes = {
41
- modalOnClick: PropTypes.func,
42
+ modalOnConfirm: PropTypes.func,
42
43
  modalText: PropTypes.object,
43
44
  modalAction: PropTypes.string,
44
45
  };
@@ -89,7 +90,7 @@ export const StructureNoteActions = ({
89
90
  return withModal(action)
90
91
  ? {
91
92
  ...baseAction,
92
- modalOnClick: () =>
93
+ modalOnConfirm: () =>
93
94
  doStructureNoteAction({
94
95
  action: data,
95
96
  dataStructureId: structure?.id,
@@ -65,9 +65,7 @@ export const StructureTagsCards = ({
65
65
  />
66
66
  )
67
67
  }
68
- handleSubmit={() =>
69
- deleteStructureTag({ id: structureTag.id })
70
- }
68
+ onConfirm={() => deleteStructureTag({ id: structureTag.id })}
71
69
  />
72
70
  </div>
73
71
  </Card.Content>
@@ -186,7 +186,7 @@ export class StructuresBulkUpdate extends React.Component {
186
186
  values={{ structures_count: structureCount }}
187
187
  />
188
188
  }
189
- handleSubmit={this.handleSubmit}
189
+ onConfirm={this.handleSubmit}
190
190
  />
191
191
  <HistoryBackButton
192
192
  content={<FormattedMessage id="actions.cancel" />}
@@ -46,13 +46,13 @@ exports[`<StructureTagsCards /> matches the latest snapshot 1`] = `
46
46
  }
47
47
  />
48
48
  }
49
- handleSubmit={[Function]}
50
49
  header={
51
50
  <Memo(MemoizedFormattedMessage)
52
51
  id="structureTags.actions.delete.confirmation.header"
53
52
  />
54
53
  }
55
54
  icon="trash"
55
+ onConfirm={[Function]}
56
56
  trigger={
57
57
  <Button
58
58
  as="button"
@@ -109,13 +109,13 @@ exports[`<StructureTagsCards /> matches the latest snapshot 1`] = `
109
109
  }
110
110
  />
111
111
  }
112
- handleSubmit={[Function]}
113
112
  header={
114
113
  <Memo(MemoizedFormattedMessage)
115
114
  id="structureTags.actions.delete.confirmation.header"
116
115
  />
117
116
  }
118
117
  icon="trash"
118
+ onConfirm={[Function]}
119
119
  trigger={
120
120
  <Button
121
121
  as="button"
@@ -81,12 +81,12 @@ exports[`<StructuresBulkUpdate /> matches the latest snapshot 1`] = `
81
81
  }
82
82
  />
83
83
  }
84
- handleSubmit={[Function]}
85
84
  header={
86
85
  <Memo(MemoizedFormattedMessage)
87
86
  id="structures.edit.bulk.confirmation.header"
88
87
  />
89
88
  }
89
+ onConfirm={[Function]}
90
90
  trigger={
91
91
  <Button
92
92
  as="button"
@@ -1,7 +1,9 @@
1
1
  export default {
2
2
  "alert.createStructureTag.failed.header": "Error creating structure tag",
3
+ "alert.export.csv": "Export to CSV",
3
4
  "alert.linkStructureTag.failed.header": "Error linking tag to structure",
4
5
  "alert.saveStructureUserFilters.failed.header": "Error saving filter",
6
+ "alert.show.more": "Show more",
5
7
  "alert.updateStructureTag.failed.header": "Error editing structure tag",
6
8
  "alert.updateSystem.failed.header": "Error updating system",
7
9
  "createStructureTag.error.name.has already been taken":
@@ -363,15 +365,21 @@ export default {
363
365
  "structures.bulkUpdate.success.content":
364
366
  "Updated {count} structures successfully",
365
367
  "structures.bulkUpdate.success.header": "Succeded Bulk Update",
368
+ "structures.bulkUpdateStructures.failed.note.df_content.default":
369
+ "External id: {externalId} The field <{field}> is invalid",
370
+ "structures.bulkUpdateStructures.failed.note.df_content.inclusion":
371
+ "External id: {externalId} The field <{field}> does not have a permitted value",
372
+ "structures.bulkUpdateStructures.failed.note.df_content.required":
373
+ "External id: {externalId} The field <{field}> is required",
366
374
  "structures.bulkUpdateStructures.no.structures.body":
367
375
  "No structures selected",
368
376
  "structures.bulkUpdateStructures.no.structures.header": "Empty Search",
369
377
  "structures.bulkUpdateStructures.success.header":
370
- "Bulk update success! Loaded {count_ids} omitted {count_errors}",
378
+ "Bulk update completed. Loaded {count_ids} errors {count_errors}",
371
379
  "structures.bulkUpdateStructures.success.errors":
372
- "Error in id {id}, in {name} attribute: {key} message: {message}",
380
+ "Error in external id {externalId}, message: {message}",
373
381
  "structures.bulkUploadStructures.success.errors":
374
- "Error in line {row}, in {name} attribute: {key} message: {message}",
382
+ "Error in line {row}, in external id {externalId}, message: {message}",
375
383
  "structures.bulkUpdateStructures.success.unchanged":
376
384
  "{unchanged} structures remained unchanged.",
377
385
  "structures.bulkUpdateStructures.success.updated":
@@ -427,11 +435,11 @@ export default {
427
435
  "structures.uploadStructures.failed.invalid_file_format":
428
436
  "Invalid file format",
429
437
  "structures.uploadStructures.failed.note.df_content.default":
430
- "The field <{field}> in row {row} is invalid",
438
+ "External id: {externalId} The field <{field}> in row {row} is invalid",
431
439
  "structures.uploadStructures.failed.note.df_content.inclusion":
432
- "The field <{field}> in row {row} does not have a permitted value",
440
+ "External id: {externalId} The field <{field}> in row {row} does not have a permitted value",
433
441
  "structures.uploadStructures.failed.note.df_content.required":
434
- "The field <{field}> in row {row} is required",
442
+ "External id: {externalId} The field <{field}> in row {row} is required",
435
443
  "structures.uploadStructures.failed.note.insufficient_permissions":
436
444
  "Insufficient permissions to edit the structure in row {row}",
437
445
  "structures.uploadStructures.failed.note.only_draft_are_editable":
@@ -1,8 +1,10 @@
1
1
  export default {
2
2
  "alert.createStructureTag.failed.header": "Error al crear Etiqueta",
3
+ "alert.export.csv": "Exportar a CSV",
3
4
  "alert.linkStructureTag.failed.header":
4
5
  "Error asociando etiqueta a estructura",
5
6
  "alert.saveStructureUserFilters.failed.header": "Error guardando filtro",
7
+ "alert.show.more": "Mostrar más",
6
8
  "alert.updateStructureTag.failed.header": "Error al editar Etiqueta",
7
9
  "alert.updateSystem.failed.header": "Error actualizando sistema",
8
10
  "createStructureTag.error.name.has already been taken":
@@ -368,13 +370,19 @@ export default {
368
370
  "structures.bulkUpdate.success.header": "Actualización terminada con éxito",
369
371
  "structures.bulkUpdateStructures.no.structures.body":
370
372
  "Ninguna estructura seleccionada",
373
+ "structures.bulkUpdateStructures.failed.note.df_content.default":
374
+ "External id: {externalId} El campo <{field}> es inválido",
375
+ "structures.bulkUpdateStructures.failed.note.df_content.inclusion":
376
+ "External id: {externalId} El campo <{field}> no tiene un valor permitido",
377
+ "structures.bulkUpdateStructures.failed.note.df_content.required":
378
+ "External id: {externalId} El campo <{field}> es necesario",
371
379
  "structures.bulkUpdateStructures.no.structures.header": "Búsqueda vacía",
372
380
  "structures.bulkUpdateStructures.success.header":
373
- "¡Actualización realizada correctamente! subidos {count_ids} errores {count_errors}",
381
+ "¡Actualización finalizada! subidos {count_ids} errores {count_errors}",
374
382
  "structures.bulkUpdateStructures.success.errors":
375
- "Error en id {id}, en {name} atributo: {key} mensaje: {message}",
383
+ "Error en external id {externalId}, mensaje: {message}",
376
384
  "structures.bulkUploadStructures.success.errors":
377
- "Error en linea {row}, en {name} atributo: {key} mensaje: {message}",
385
+ "Error en linea {row}, en external id {externalId} mensaje: {message}",
378
386
  "structures.bulkUpdateStructures.success.unchanged":
379
387
  "{unchanged} se han mantenido sin cambios.",
380
388
  "structures.bulkUpdateStructures.success.updated":
@@ -20,17 +20,19 @@ const ddMessage = (state = initialState, { type, payload }) => {
20
20
  _.map((error) => ({
21
21
  id:
22
22
  type == bulkUpdateStructures.SUCCESS
23
- ? "structures.bulkUpdateStructures.success.errors"
24
- : "structures.bulkUploadStructures.success.errors",
23
+ ? `structures.bulkUpdateStructures.failed.note.${error.message}`
24
+ : `structures.uploadStructures.failed.note.${error.message}`,
25
25
  fields: {
26
- name: error.implementation_key,
27
- key: Object.keys(error.message)[0],
28
- message: error.message[Object.keys(error.message)[0]][0],
29
26
  row: error.row,
30
27
  id: error.id,
28
+ field: error.field,
29
+ externalId: error.external_id,
30
+ message: error.message,
31
31
  },
32
32
  defaultMessage:
33
- "structures.bulkUpdateStructures.success.errors.default",
33
+ type == bulkUpdateStructures.SUCCESS
34
+ ? "structures.bulkUpdateStructures.success.errors"
35
+ : "structures.bulkUploadStructures.success.errors",
34
36
  }))
35
37
  )(payload.data)
36
38
  : "";
@@ -45,6 +47,8 @@ const ddMessage = (state = initialState, { type, payload }) => {
45
47
  count_ids: payload.data.ids.length,
46
48
  count_errors: payload.data.errors.length,
47
49
  },
50
+ downloadable: true,
51
+ initialMaxListItems: 5,
48
52
  };
49
53
  }
50
54
  case updateStructureType.SUCCESS: