@truedat/bg 5.20.3 → 6.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@truedat/bg",
3
- "version": "5.20.3",
3
+ "version": "6.0.0",
4
4
  "description": "Truedat Web Business Glossary",
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": "5.12.2",
37
+ "@truedat/test": "6.0.0",
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",
@@ -86,9 +86,9 @@
86
86
  ]
87
87
  },
88
88
  "dependencies": {
89
- "@truedat/core": "5.20.3",
90
- "@truedat/df": "5.20.3",
91
- "@truedat/lm": "5.20.3",
89
+ "@truedat/core": "6.0.0",
90
+ "@truedat/df": "6.0.0",
91
+ "@truedat/lm": "6.0.0",
92
92
  "decode-uri-component": "^0.2.2",
93
93
  "file-saver": "^2.0.5",
94
94
  "moment": "^2.29.4",
@@ -111,5 +111,5 @@
111
111
  "react-dom": ">= 16.8.6 < 17",
112
112
  "semantic-ui-react": ">= 2.0.3 < 2.2"
113
113
  },
114
- "gitHead": "11ee6981b87a3c8f2b99c7101b42cafc29dc4896"
114
+ "gitHead": "3627c716252d2920a5b70ee1f8e84c7afd3a991a"
115
115
  }
@@ -13,10 +13,6 @@ export const ConceptDetails = ({
13
13
  concept: { content, description, template },
14
14
  }) => (
15
15
  <Segment attached="bottom">
16
- <Header as="h3">
17
- <FormattedMessage id="concepts.props.description" />
18
- </Header>
19
- <RichTextEditor readOnly value={description} />
20
16
  <DynamicFormViewer template={template} content={content} />
21
17
  </Segment>
22
18
  );
@@ -13,7 +13,7 @@ import {
13
13
  import { compose } from "redux";
14
14
  import { connect } from "react-redux";
15
15
  import { injectIntl, FormattedMessage } from "react-intl";
16
- import { HistoryBackButton, RichTextEditor } from "@truedat/core/components";
16
+ import { HistoryBackButton } from "@truedat/core/components";
17
17
  import { selectTemplate, selectDomain } from "@truedat/df/routines";
18
18
  import { applyTemplate } from "@truedat/df/utils";
19
19
  import { conceptAction } from "../routines";
@@ -28,18 +28,16 @@ const TemplateLoader = React.lazy(() =>
28
28
 
29
29
  const actionKey = "update";
30
30
 
31
- const staticFields = ["type", "name", "description"];
31
+ const staticFields = ["type", "name"];
32
32
 
33
33
  const initialState = {
34
34
  type: "",
35
35
  name: "",
36
- description: {},
37
36
  };
38
37
 
39
38
  const isNonEmptyString = _.flow(_.trim, _.negate(_.isEmpty));
40
39
  const isValid = _.conforms({
41
40
  name: isNonEmptyString,
42
- description: _.negate(_.isEmpty),
43
41
  });
44
42
 
45
43
  export class ConceptEdit extends React.Component {
@@ -71,19 +69,14 @@ export class ConceptEdit extends React.Component {
71
69
  _.isUndefined(this.state.content) &&
72
70
  !_.isUndefined(this.props.concept.content)
73
71
  ) {
74
- const { content, domain, name, description, type } = this.props.concept;
75
- this.setState({ content, name, description, type });
72
+ const { content, domain, name, type } = this.props.concept;
73
+ this.setState({ content, name, type });
76
74
  const { selectDomain, selectTemplate, templateId } = this.props;
77
75
  const domain_id = _.prop("id")(domain);
78
76
  selectDomain({ id: domain_id });
79
77
  selectTemplate({ id: templateId });
80
78
  }
81
79
  }
82
-
83
- handleEditorChange = (e, { value }) => {
84
- this.handleChange(null, { name: "description", value });
85
- };
86
-
87
80
  handleChange = (e, { name, value }) => {
88
81
  e && e.preventDefault();
89
82
 
@@ -99,9 +92,7 @@ export class ConceptEdit extends React.Component {
99
92
  handleSubmit = (e) => {
100
93
  e.preventDefault();
101
94
  const { action, concept, conceptAction, applyTemplate } = this.props;
102
- const businessConceptVersion = _.pick(["description", "name", "type"])(
103
- this.state
104
- );
95
+ const businessConceptVersion = _.pick(["name", "type"])(this.state);
105
96
 
106
97
  const content = applyTemplate(this.state?.content, concept?.domain?.id);
107
98
 
@@ -119,7 +110,7 @@ export class ConceptEdit extends React.Component {
119
110
  template,
120
111
  } = this.props;
121
112
 
122
- const { content, name, description } = this.state;
113
+ const { content, name } = this.state;
123
114
  if (_.isNil(content)) {
124
115
  return null;
125
116
  }
@@ -145,21 +136,6 @@ export class ConceptEdit extends React.Component {
145
136
  </label>
146
137
  <Form.Input name="name" value={name} onChange={this.handleChange} />
147
138
  </Form.Field>
148
- <Form.Field required>
149
- <label>
150
- {formatMessage({ id: "concepts.props.description" })}
151
- {_.isEmpty(description) ? (
152
- <Label pointing="left">
153
- <FormattedMessage id="template.form.validation.empty_required" />
154
- </Label>
155
- ) : null}
156
- </label>
157
- <RichTextEditor
158
- name="description"
159
- value={description}
160
- onChange={this.handleEditorChange}
161
- />
162
- </Form.Field>
163
139
  {_.isEmpty(template) || _.isNil(content) ? null : (
164
140
  <DynamicForm
165
141
  onChange={this.handleContentChange}
@@ -138,21 +138,6 @@ export class ConceptForm extends React.Component {
138
138
  </label>
139
139
  <Form.Input name="name" value={name} onChange={this.handleChange} />
140
140
  </Form.Field>
141
- <Form.Field required>
142
- <label>
143
- <FormattedMessage id="concepts.props.description" />
144
- {_.isEmpty(description) ? (
145
- <Label pointing="left">
146
- <FormattedMessage id="template.form.validation.empty_required" />
147
- </Label>
148
- ) : null}
149
- </label>
150
- <RichTextEditor
151
- name="description"
152
- value={description}
153
- onChange={this.handleEditorChange}
154
- />
155
- </Form.Field>
156
141
  <SelectableDynamicForm
157
142
  scope="bg"
158
143
  domainIds={_.isNil(domain_id) ? null : [domain_id]}
@@ -4,16 +4,6 @@ exports[`<ConceptDetails /> matches the latest snapshot 1`] = `
4
4
  <Segment
5
5
  attached="bottom"
6
6
  >
7
- <Header
8
- as="h3"
9
- >
10
- <MemoizedFormattedMessage
11
- id="concepts.props.description"
12
- />
13
- </Header>
14
- <injectIntl(RichTextEditor)
15
- readOnly={true}
16
- />
17
7
  <lazy
18
8
  template={
19
9
  {
@@ -51,136 +51,6 @@ exports[`<ConceptForm /> with a single template matches the latest snapshot 1`]
51
51
  </div>
52
52
  </div>
53
53
  </div>
54
- <div
55
- class="required field"
56
- >
57
- <label>
58
- Description
59
- <div
60
- class="ui left pointing label"
61
- >
62
- Empty required field
63
- </div>
64
- </label>
65
- <div>
66
- <div
67
- style="border: 1px solid rgba(34, 36, 38, 0.15); border-radius: 0.28571429rem;"
68
- >
69
- <div
70
- class="ui menu"
71
- >
72
- <div
73
- class="disabled icon item"
74
- >
75
- <i
76
- aria-hidden="true"
77
- class="bold icon"
78
- />
79
- </div>
80
- <div
81
- class="disabled icon item"
82
- >
83
- <i
84
- aria-hidden="true"
85
- class="italic icon"
86
- />
87
- </div>
88
- <div
89
- class="disabled icon item"
90
- >
91
- <i
92
- aria-hidden="true"
93
- class="underline icon"
94
- />
95
- </div>
96
- <div
97
- class="disabled icon item"
98
- >
99
- <i
100
- aria-hidden="true"
101
- class="header icon"
102
- />
103
- </div>
104
- <div
105
- class="disabled icon item"
106
- >
107
- <i
108
- aria-hidden="true"
109
- class="h icon"
110
- />
111
- </div>
112
- <div
113
- class="disabled icon item"
114
- >
115
- <i
116
- aria-hidden="true"
117
- class="list ol icon"
118
- />
119
- </div>
120
- <div
121
- class="disabled icon item"
122
- >
123
- <i
124
- aria-hidden="true"
125
- class="list ul icon"
126
- />
127
- </div>
128
- <div
129
- class="disabled icon item"
130
- >
131
- <i
132
- aria-hidden="true"
133
- class="linkify icon"
134
- />
135
- </div>
136
- </div>
137
- <div
138
- style="padding: 10px;"
139
- >
140
- <div
141
- autocorrect="on"
142
- contenteditable="true"
143
- data-gramm="false"
144
- data-key="8"
145
- data-slate-editor="true"
146
- role="textbox"
147
- spellcheck="true"
148
- style="outline: none; white-space: pre-wrap; word-wrap: break-word;"
149
- >
150
- <div
151
- data-key="9"
152
- data-slate-object="block"
153
- style="position: relative;"
154
- >
155
- <span
156
- data-key="11"
157
- data-slate-object="text"
158
- >
159
- <span
160
- data-offset-key="11:0"
161
- data-slate-leaf="true"
162
- >
163
- <span>
164
- <span
165
- contenteditable="false"
166
- style="pointer-events: none; display: inline-block; width: 0px; max-width: 100%; white-space: nowrap; opacity: 0.333; vertical-align: text-top;"
167
- />
168
- <span
169
- data-slate-length="0"
170
- data-slate-zero-width="n"
171
- >
172
- 
173
- <br />
174
- </span>
175
- </span>
176
- </span>
177
- </span>
178
- </div>
179
- </div>
180
- </div>
181
- </div>
182
- </div>
183
- </div>
184
54
  <div
185
55
  class="actions"
186
56
  >
@@ -355,136 +225,6 @@ exports[`<ConceptForm /> with multiple templates matches the latest snapshot 1`]
355
225
  </div>
356
226
  </div>
357
227
  </div>
358
- <div
359
- class="required field"
360
- >
361
- <label>
362
- Description
363
- <div
364
- class="ui left pointing label"
365
- >
366
- Empty required field
367
- </div>
368
- </label>
369
- <div>
370
- <div
371
- style="border: 1px solid rgba(34, 36, 38, 0.15); border-radius: 0.28571429rem;"
372
- >
373
- <div
374
- class="ui menu"
375
- >
376
- <div
377
- class="disabled icon item"
378
- >
379
- <i
380
- aria-hidden="true"
381
- class="bold icon"
382
- />
383
- </div>
384
- <div
385
- class="disabled icon item"
386
- >
387
- <i
388
- aria-hidden="true"
389
- class="italic icon"
390
- />
391
- </div>
392
- <div
393
- class="disabled icon item"
394
- >
395
- <i
396
- aria-hidden="true"
397
- class="underline icon"
398
- />
399
- </div>
400
- <div
401
- class="disabled icon item"
402
- >
403
- <i
404
- aria-hidden="true"
405
- class="header icon"
406
- />
407
- </div>
408
- <div
409
- class="disabled icon item"
410
- >
411
- <i
412
- aria-hidden="true"
413
- class="h icon"
414
- />
415
- </div>
416
- <div
417
- class="disabled icon item"
418
- >
419
- <i
420
- aria-hidden="true"
421
- class="list ol icon"
422
- />
423
- </div>
424
- <div
425
- class="disabled icon item"
426
- >
427
- <i
428
- aria-hidden="true"
429
- class="list ul icon"
430
- />
431
- </div>
432
- <div
433
- class="disabled icon item"
434
- >
435
- <i
436
- aria-hidden="true"
437
- class="linkify icon"
438
- />
439
- </div>
440
- </div>
441
- <div
442
- style="padding: 10px;"
443
- >
444
- <div
445
- autocorrect="on"
446
- contenteditable="true"
447
- data-gramm="false"
448
- data-key="0"
449
- data-slate-editor="true"
450
- role="textbox"
451
- spellcheck="true"
452
- style="outline: none; white-space: pre-wrap; word-wrap: break-word;"
453
- >
454
- <div
455
- data-key="1"
456
- data-slate-object="block"
457
- style="position: relative;"
458
- >
459
- <span
460
- data-key="3"
461
- data-slate-object="text"
462
- >
463
- <span
464
- data-offset-key="3:0"
465
- data-slate-leaf="true"
466
- >
467
- <span>
468
- <span
469
- contenteditable="false"
470
- style="pointer-events: none; display: inline-block; width: 0px; max-width: 100%; white-space: nowrap; opacity: 0.333; vertical-align: text-top;"
471
- />
472
- <span
473
- data-slate-length="0"
474
- data-slate-zero-width="n"
475
- >
476
- 
477
- <br />
478
- </span>
479
- </span>
480
- </span>
481
- </span>
482
- </div>
483
- </div>
484
- </div>
485
- </div>
486
- </div>
487
- </div>
488
228
  <div
489
229
  class="actions"
490
230
  >