@truedat/dd 4.58.3 → 4.58.5

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.58.5] 2022-12-23
4
+
5
+ ### Added
6
+
7
+ - [TD-5368] IsModification for editable templates
8
+
3
9
  ## [4.58.1] 2022-12-19
4
10
 
5
11
  ### Added
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@truedat/dd",
3
- "version": "4.58.3",
3
+ "version": "4.58.5",
4
4
  "description": "Truedat Web Data Dictionary",
5
5
  "sideEffects": false,
6
6
  "jsnext:main": "src/index.js",
@@ -34,7 +34,7 @@
34
34
  "@testing-library/jest-dom": "^5.16.5",
35
35
  "@testing-library/react": "^12.0.0",
36
36
  "@testing-library/user-event": "^13.2.1",
37
- "@truedat/test": "4.58.3",
37
+ "@truedat/test": "4.58.5",
38
38
  "babel-jest": "^28.1.0",
39
39
  "babel-plugin-dynamic-import-node": "^2.3.3",
40
40
  "babel-plugin-lodash": "^3.3.4",
@@ -87,9 +87,9 @@
87
87
  },
88
88
  "dependencies": {
89
89
  "@apollo/client": "^3.7.1",
90
- "@truedat/auth": "4.58.3",
91
- "@truedat/core": "4.58.3",
92
- "@truedat/df": "4.58.3",
90
+ "@truedat/auth": "4.58.5",
91
+ "@truedat/core": "4.58.5",
92
+ "@truedat/df": "4.58.5",
93
93
  "lodash": "^4.17.21",
94
94
  "moment": "^2.29.4",
95
95
  "path-to-regexp": "^1.7.0",
@@ -114,5 +114,5 @@
114
114
  "react-dom": ">= 16.8.6 < 17",
115
115
  "semantic-ui-react": ">= 2.0.3 < 2.2"
116
116
  },
117
- "gitHead": "d6ce0fa41e1d1ca09130b8beab9e21019314726e"
117
+ "gitHead": "4b4fcb2726e4ab83f5b70bf91010ed1aea4fcee7"
118
118
  }
@@ -69,7 +69,9 @@ export const StructureGrantCartCheckout = ({
69
69
  </Grid.Row>
70
70
  <Grid.Row>
71
71
  <Grid.Column width={5}>
72
- <StructureGrantCartInformation />
72
+ <StructureGrantCartInformation
73
+ isModification={!!modificationGrant}
74
+ />
73
75
  </Grid.Column>
74
76
  <Grid.Column width={11}>
75
77
  <StructureGrantCart />
@@ -18,6 +18,7 @@ const SelectableDynamicForm = React.lazy(() =>
18
18
 
19
19
  export const StructureGrantCartInformation = ({
20
20
  grantRequestsCart,
21
+ isModification,
21
22
  selectGrantRequestTemplate,
22
23
  updateGrantRequestTemplateContent,
23
24
  }) => {
@@ -43,14 +44,15 @@ export const StructureGrantCartInformation = ({
43
44
  ) : null}
44
45
  <SelectableDynamicForm
45
46
  scope="gr"
46
- required
47
47
  content={templateContent}
48
+ hideLabel
49
+ isModification={isModification}
48
50
  onChange={updateGrantRequestTemplateContent}
49
51
  onNameChange={selectGrantRequestTemplate}
50
52
  placeholder={formatMessage({
51
53
  id: `structure.grant.cart.template.placeholder`,
52
54
  })}
53
- hideLabel
55
+ required
54
56
  />
55
57
  </Form>
56
58
  </Segment>
@@ -61,6 +63,7 @@ StructureGrantCartInformation.propTypes = {
61
63
  grantRequestsCart: PropTypes.object,
62
64
  selectGrantRequestTemplate: PropTypes.func,
63
65
  updateGrantRequestTemplateContent: PropTypes.func,
66
+ isModification: PropTypes.bool,
64
67
  };
65
68
 
66
69
  const mapStateToProps = ({ grantRequestsCart }) => ({ grantRequestsCart });
@@ -71,7 +71,11 @@ export const StructureNotesEdit = ({
71
71
  <Segment attached="bottom">
72
72
  <TemplateLoader />
73
73
  <Form>
74
- <DynamicForm onChange={setContent} content={content} />
74
+ <DynamicForm
75
+ onChange={setContent}
76
+ content={content}
77
+ isModification={true}
78
+ />
75
79
  <Button
76
80
  primary
77
81
  onClick={handleSubmit}
@@ -49,6 +49,7 @@ exports[`<StructuresBulkUpdate /> Publish button is available with autoPublish a
49
49
  </h4>
50
50
  <div
51
51
  class="field"
52
+ data-testid="form-field"
52
53
  >
53
54
  <label>
54
55
  field1
@@ -135,6 +136,7 @@ exports[`<StructuresBulkUpdate /> Publish button is not available without autoPu
135
136
  </h4>
136
137
  <div
137
138
  class="field"
139
+ data-testid="form-field"
138
140
  >
139
141
  <label>
140
142
  field1
@@ -222,6 +224,7 @@ exports[`<StructuresBulkUpdate /> matches the latest snapshot 1`] = `
222
224
  </h4>
223
225
  <div
224
226
  class="field"
227
+ data-testid="form-field"
225
228
  >
226
229
  <label>
227
230
  field1
@@ -59,7 +59,7 @@ describe("sagas: fetchStructureSaga", () => {
59
59
  const meta = { version };
60
60
  const url = compile(API_DATA_STRUCTURE_VERSION)({
61
61
  id,
62
- version
62
+ version,
63
63
  });
64
64
  expect(() => {
65
65
  testSaga(fetchStructureSaga, { payload })