@truedat/core 6.0.2 → 6.0.4

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/core",
3
- "version": "6.0.2",
3
+ "version": "6.0.4",
4
4
  "description": "Truedat Web Core",
5
5
  "sideEffects": false,
6
6
  "jsnext:main": "src/index.js",
@@ -35,7 +35,7 @@
35
35
  "@testing-library/jest-dom": "^5.16.5",
36
36
  "@testing-library/react": "^12.0.0",
37
37
  "@testing-library/user-event": "^13.2.1",
38
- "@truedat/test": "6.0.2",
38
+ "@truedat/test": "6.0.4",
39
39
  "babel-jest": "^28.1.0",
40
40
  "babel-plugin-dynamic-import-node": "^2.3.3",
41
41
  "babel-plugin-lodash": "^3.3.4",
@@ -117,5 +117,5 @@
117
117
  "react-dom": ">= 16.8.6 < 17",
118
118
  "semantic-ui-react": ">= 2.0.3 < 2.2"
119
119
  },
120
- "gitHead": "dab67cd6f569ca6de2fd8e0b5de260cb5ee261c3"
120
+ "gitHead": "eee544490dfa90647cfdf8a3d442054394027553"
121
121
  }
@@ -11,6 +11,7 @@ import {
11
11
  CONCEPTS_PENDING,
12
12
  CONCEPTS_DEPRECATED,
13
13
  CONCEPT_LINKS_MANAGEMENT,
14
+ CONCEPTS_BULK_UPLOAD_EVENTS,
14
15
  } from "../routes";
15
16
  import Submenu from "./Submenu";
16
17
 
@@ -36,6 +37,11 @@ const items = (bgSubscopes = []) => [
36
37
  routes: [CONCEPT_LINKS_MANAGEMENT],
37
38
  groups: ["business_glossary_management"],
38
39
  },
40
+ {
41
+ name: "concepts_upload_events",
42
+ routes: [CONCEPTS_BULK_UPLOAD_EVENTS],
43
+ groups: ["business_glossary_management"],
44
+ },
39
45
  ];
40
46
 
41
47
  const subscopeItems = _.flow(
@@ -1,5 +1,5 @@
1
1
  import _ from "lodash/fp";
2
- import React from "react";
2
+ import React, { useState, useEffect } from "react";
3
3
  import PropTypes from "prop-types";
4
4
  import { isKeyHotkey } from "is-hotkey";
5
5
  import isUrl from "is-url";
@@ -12,10 +12,6 @@ import SafeLink from "./SafeLink";
12
12
 
13
13
  const DEFAULT_NODE = "paragraph";
14
14
 
15
- const isBoldHotkey = isKeyHotkey("mod+b");
16
- const isItalicHotkey = isKeyHotkey("mod+i");
17
- const isUnderlinedHotkey = isKeyHotkey("mod+u");
18
-
19
15
  function wrapLink(change, value) {
20
16
  const href = validUrl(value);
21
17
  if (href) {
@@ -32,294 +28,153 @@ function unwrapLink(change) {
32
28
  change.unwrapInline("link");
33
29
  }
34
30
 
35
- export class RichTextEditor extends React.Component {
36
- constructor(props) {
37
- super(props);
38
- const { value } = this.props;
39
- const json = _.isEmpty(value)
40
- ? {
41
- document: {
42
- nodes: [
43
- {
44
- object: "block",
45
- type: "paragraph",
46
- nodes: [],
47
- },
48
- ],
49
- },
50
- }
51
- : value;
52
-
53
- this.state = { value: Value.fromJSON(json) };
31
+ function renderBlock(props, _editor, next) {
32
+ const { attributes, children, node } = props;
33
+
34
+ switch (node.type) {
35
+ // case 'block-quote':
36
+ // return <blockquote {...attributes}>{children}</blockquote>
37
+ case "bulleted-list":
38
+ return <ul {...attributes}>{children}</ul>;
39
+ case "heading-one":
40
+ return (
41
+ <h1 style={{ fontSize: "18px" }} {...attributes}>
42
+ {children}
43
+ </h1>
44
+ );
45
+ case "heading-two":
46
+ return (
47
+ <h2 style={{ fontSize: "15px" }} {...attributes}>
48
+ {children}
49
+ </h2>
50
+ );
51
+ case "list-item":
52
+ return <li {...attributes}>{children}</li>;
53
+ case "numbered-list":
54
+ return <ol {...attributes}> {children}</ol>;
55
+ case "link":
56
+ return (
57
+ <SafeLink href={node.data?.get("href")} {...attributes}>
58
+ {children}
59
+ </SafeLink>
60
+ );
61
+ default:
62
+ return next();
54
63
  }
64
+ }
55
65
 
56
- hasMark = (type) => {
57
- const { value } = this.state;
58
- return value.activeMarks.some((mark) => mark.type == type);
59
- };
60
-
61
- hasBlock = (type) => {
62
- const { value } = this.state;
63
- return value.blocks.some((node) => node.type == type);
64
- };
65
-
66
- ref = (editor) => {
67
- this.editor = editor;
68
- };
69
-
70
- renderLabel() {
71
- const { label, required } = this.props;
72
- if (!label) return null;
73
- const classname = required ? "required field" : "field";
74
- return (
75
- <div className={classname}>
76
- <label>{label}</label>
77
- </div>
78
- );
66
+ function renderMark(props, _editor, next) {
67
+ const { children, mark, attributes } = props;
68
+
69
+ switch (mark.type) {
70
+ case "bold":
71
+ return <strong {...attributes}>{children}</strong>;
72
+ // case 'code':
73
+ // return <code {...attributes}>{children}</code>
74
+ case "italic":
75
+ return <em {...attributes}>{children}</em>;
76
+ case "underlined":
77
+ return <u {...attributes}>{children}</u>;
78
+ default:
79
+ return next();
79
80
  }
81
+ }
80
82
 
81
- renderEditor() {
82
- return (
83
- <div>
84
- {this.renderLabel()}
85
- <div
86
- style={{
87
- border: "1px solid rgba(34, 36, 38, 0.15)",
88
- borderRadius: "0.28571429rem",
89
- }}
90
- >
91
- <Menu>
92
- {this.renderMarkButton("bold", "bold")}
93
- {this.renderMarkButton("italic", "italic")}
94
- {this.renderMarkButton("underlined", "underline")}
95
- {/* {this.renderMarkButton('code', 'file code')} */}
96
- {this.renderBlockButton("heading-one", "header")}
97
- {this.renderBlockButton("heading-two", "h")}
98
- {/* {this.renderBlockButton('block-quote', 'quote right')} */}
99
- {this.renderBlockButton("numbered-list", "list ol")}
100
- {this.renderBlockButton("bulleted-list", "list ul")}
101
- {this.renderLinkButton("link", "linkify")}
102
- </Menu>
103
- <div style={{ padding: "10px" }}>
104
- <Editor
105
- style={{ WebkitUserModify: "read-write !important" }}
106
- spellCheck
107
- autoFocus
108
- value={this.state.value}
109
- onChange={this.onChange}
110
- onPaste={this.onPaste}
111
- onKeyDown={this.onKeyDown}
112
- renderBlock={this.renderBlock}
113
- renderMark={this.renderMark}
114
- renderInline={this.renderInline}
115
- ref={this.ref}
116
- />
117
- </div>
118
- </div>
119
- </div>
120
- );
121
- }
83
+ function renderInline(props, _editor, next) {
84
+ const { attributes, children, node } = props;
85
+
86
+ switch (node.type) {
87
+ case "link": {
88
+ const props = _.omit(["ref"])(attributes);
89
+ return (
90
+ <SafeLink href={node.data?.get("href")} {...props}>
91
+ {children}
92
+ </SafeLink>
93
+ );
94
+ }
122
95
 
123
- renderReadOnly() {
124
- return (
125
- <div>
126
- <Editor
127
- readOnly
128
- value={this.state.value}
129
- renderBlock={this.renderBlock}
130
- renderMark={this.renderMark}
131
- renderInline={this.renderInline}
132
- />
133
- </div>
134
- );
96
+ default:
97
+ return next();
135
98
  }
99
+ }
136
100
 
137
- render() {
138
- const { readOnly } = this.props;
139
- if (readOnly) {
140
- return this.renderReadOnly();
141
- } else {
142
- return this.renderEditor();
143
- }
101
+ function onKeyDown(event, editor, next) {
102
+ const isBoldHotkey = isKeyHotkey("mod+b");
103
+ const isItalicHotkey = isKeyHotkey("mod+i");
104
+ const isUnderlinedHotkey = isKeyHotkey("mod+u");
105
+ const mark = isBoldHotkey(event)
106
+ ? "bold"
107
+ : isItalicHotkey(event)
108
+ ? "italic"
109
+ : isUnderlinedHotkey(event)
110
+ ? "underlined"
111
+ : undefined;
112
+ if (!_.isNil(mark)) {
113
+ event.preventDefault();
114
+ editor.toggleMark(mark);
115
+ return true;
116
+ } else {
117
+ next();
144
118
  }
119
+ }
145
120
 
146
- renderMarkButton = (type, icon) => {
147
- const isActive = this.hasMark(type);
148
-
149
- return (
150
- <Menu.Item
151
- icon
152
- disabled={!isActive}
153
- onMouseDown={(event) => this.onClickMark(event, type)}
154
- >
155
- <Icon name={icon} />
156
- </Menu.Item>
157
- );
158
- };
159
-
160
- renderBlockButton = (type, icon) => {
161
- const {
162
- value: { document, blocks },
163
- } = this.state;
164
- const parent =
165
- blocks.size != 0 ? document.getParent(blocks.first().key) : null;
166
- const isActive = _.includes(type)(["numbered-list", "bulleted-list"])
167
- ? this.hasBlock("list-item") && parent && parent.type === type
168
- : this.hasBlock(type);
121
+ const EMPTY_VALUE = {
122
+ document: {
123
+ nodes: [
124
+ {
125
+ object: "block",
126
+ type: "paragraph",
127
+ nodes: [],
128
+ },
129
+ ],
130
+ },
131
+ };
169
132
 
170
- return (
171
- <Menu.Item
172
- icon
173
- disabled={!isActive}
174
- onMouseDown={(event) => this.onClickBlock(event, type)}
175
- >
176
- <Icon name={icon} />
177
- </Menu.Item>
178
- );
179
- };
133
+ export const RichTextEditor = ({
134
+ readOnly,
135
+ value: propValue,
136
+ label,
137
+ required,
138
+ onChange,
139
+ name,
140
+ }) => {
141
+ const [jsonValue, setJsonValue] = useState(propValue || EMPTY_VALUE);
142
+ const [value, setValue] = useState(Value.fromJSON(jsonValue));
143
+ const [editor, setEditor] = useState();
144
+
145
+ useEffect(() => {
146
+ if (!_.equals(propValue)(jsonValue)) {
147
+ setValue(Value.fromJSON(propValue));
148
+ }
149
+ }, [propValue]);
180
150
 
181
- renderLinkButton = (type, icon) => {
182
- const isActive = this.hasLinks();
151
+ const renderMarkButton = (type, icon) => {
152
+ const isActive = value?.activeMarks.some((mark) => mark.type == type);
183
153
 
184
154
  return (
185
155
  <Menu.Item
186
156
  icon
187
- disabled={!isActive}
188
- onMouseDown={(event) => this.onClickLink(event, type)}
157
+ active={isActive}
158
+ onMouseDown={(e) => {
159
+ e.preventDefault();
160
+ editor?.toggleMark(type);
161
+ }}
162
+ onClick={() => {}}
189
163
  >
190
164
  <Icon name={icon} />
191
165
  </Menu.Item>
192
166
  );
193
167
  };
194
168
 
195
- renderBlock = (props, editor, next) => {
196
- const { attributes, children, node } = props;
197
-
198
- switch (node.type) {
199
- // case 'block-quote':
200
- // return <blockquote {...attributes}>{children}</blockquote>
201
- case "bulleted-list":
202
- return <ul {...attributes}>{children}</ul>;
203
- case "heading-one":
204
- return (
205
- <h1 style={{ fontSize: "18px" }} {...attributes}>
206
- {children}
207
- </h1>
208
- );
209
- case "heading-two":
210
- return (
211
- <h2 style={{ fontSize: "15px" }} {...attributes}>
212
- {children}
213
- </h2>
214
- );
215
- case "list-item":
216
- return <li {...attributes}>{children}</li>;
217
- case "numbered-list":
218
- return <ol {...attributes}> {children}</ol>;
219
- case "link":
220
- return (
221
- <SafeLink href={node.data?.get("href")} {...attributes}>
222
- {children}
223
- </SafeLink>
224
- );
225
- default:
226
- return next();
227
- }
228
- };
229
-
230
- renderMark = (props, editor, next) => {
231
- const { children, mark, attributes } = props;
232
-
233
- switch (mark.type) {
234
- case "bold":
235
- return <strong {...attributes}>{children}</strong>;
236
- // case 'code':
237
- // return <code {...attributes}>{children}</code>
238
- case "italic":
239
- return <em {...attributes}>{children}</em>;
240
- case "underlined":
241
- return <u {...attributes}>{children}</u>;
242
- default:
243
- return next();
244
- }
245
- };
246
-
247
- renderInline = (props, editor, next) => {
248
- const { attributes, children, node } = props;
249
-
250
- switch (node.type) {
251
- case "link": {
252
- const props = _.omit(["ref"])(attributes);
253
- return (
254
- <SafeLink href={node.data?.get("href")} {...props}>
255
- {children}
256
- </SafeLink>
257
- );
258
- }
259
-
260
- default:
261
- return next();
262
- }
263
- };
169
+ const hasBlock = (type) => value?.blocks.some((node) => node.type == type);
264
170
 
265
- onChange = ({ value }) => {
266
- this.setState({ value });
267
- const { onChange, name } = this.props;
268
- if (onChange) {
269
- const { text } = value.document;
270
- const json = text ? value.toJSON() : {};
271
- const event = undefined; // the onChange handler expects an event as the first argument
272
- onChange(event, { name, value: json });
273
- }
274
- };
275
-
276
- onKeyDown = (event, editor, next) => {
277
- const mark = isBoldHotkey(event)
278
- ? "bold"
279
- : isItalicHotkey(event)
280
- ? "italic"
281
- : isUnderlinedHotkey(event)
282
- ? "underlined"
283
- : undefined;
284
- if (!_.isNil(mark)) {
285
- event.preventDefault();
286
- editor.toggleMark(mark);
287
- return true;
288
- } else {
289
- next();
290
- }
291
- };
292
-
293
- onPaste = (event, editor, next) => {
294
- if (editor.value.selection.isCollapsed) return next();
295
-
296
- const transfer = getEventTransfer(event);
297
- const { type, text } = transfer;
298
- if (type !== "text" && type !== "html") return next();
299
- if (!isUrl(text)) return next();
300
-
301
- if (this.hasLinks()) {
302
- editor.command(unwrapLink);
303
- }
304
-
305
- editor.command(wrapLink, text);
306
- };
307
-
308
- onClickMark = (event, type) => {
309
- event.preventDefault();
310
- this.editor.toggleMark(type);
311
- };
312
-
313
- onClickBlock = (event, type) => {
314
- event.preventDefault();
315
-
316
- const { editor } = this;
317
- const { value } = editor;
318
- const { document } = value;
171
+ const onClickBlock = (type) => {
172
+ const { value } = editor || {};
173
+ const { document } = value || {};
319
174
 
320
175
  if (type != "bulleted-list" && type != "numbered-list") {
321
- const isActive = this.hasBlock(type);
322
- const isList = this.hasBlock("list-item");
176
+ const isActive = hasBlock(type);
177
+ const isList = hasBlock("list-item");
323
178
 
324
179
  if (isList) {
325
180
  editor
@@ -330,9 +185,9 @@ export class RichTextEditor extends React.Component {
330
185
  editor.setBlocks(isActive ? DEFAULT_NODE : type);
331
186
  }
332
187
  } else {
333
- const isList = this.hasBlock("list-item");
334
- const isType = value.blocks.some((block) => {
335
- return !!document.getClosest(
188
+ const isList = hasBlock("list-item");
189
+ const isType = value?.blocks.some((block) => {
190
+ return !!document?.getClosest(
336
191
  block.key,
337
192
  (parent) => parent.type == type
338
193
  );
@@ -355,22 +210,37 @@ export class RichTextEditor extends React.Component {
355
210
  }
356
211
  };
357
212
 
358
- hasLinks = () => {
359
- const { value } = this.state;
360
- return value.inlines.some((inline) => inline.type == "link");
361
- };
213
+ const renderBlockButton = (type, icon) => {
214
+ const { document, blocks } = value || {};
215
+ const parent =
216
+ blocks?.size != 0 ? document?.getParent(blocks?.first().key) : null;
217
+ const isActive = _.includes(type)(["numbered-list", "bulleted-list"])
218
+ ? hasBlock("list-item") && parent && parent?.type === type
219
+ : hasBlock(type);
362
220
 
363
- onClickLink = (event) => {
364
- event.preventDefault();
221
+ return (
222
+ <Menu.Item
223
+ icon
224
+ active={isActive}
225
+ onMouseDown={(e) => {
226
+ e.preventDefault();
227
+ onClickBlock(type);
228
+ }}
229
+ onClick={() => {}}
230
+ >
231
+ <Icon name={icon} />
232
+ </Menu.Item>
233
+ );
234
+ };
365
235
 
366
- const { editor } = this;
367
- const { value } = editor;
236
+ const hasLinks = () => value?.inlines.some((inline) => inline.type == "link");
368
237
 
369
- const hasLinks = this.hasLinks();
238
+ const onClickLink = () => {
239
+ const { value } = editor || {};
370
240
 
371
- if (hasLinks) {
241
+ if (hasLinks()) {
372
242
  editor.command(unwrapLink);
373
- } else if (value.selection.isExpanded) {
243
+ } else if (value?.selection.isExpanded) {
374
244
  const href = window.prompt("Introduzca la URL del Link:");
375
245
  editor.command(wrapLink, href);
376
246
  } else {
@@ -382,7 +252,102 @@ export class RichTextEditor extends React.Component {
382
252
  .command(wrapLink, href);
383
253
  }
384
254
  };
385
- }
255
+
256
+ const renderLinkButton = (icon) => {
257
+ const isActive = hasLinks();
258
+
259
+ return (
260
+ <Menu.Item
261
+ icon
262
+ active={isActive}
263
+ onMouseDown={(e) => {
264
+ e.preventDefault();
265
+ onClickLink();
266
+ }}
267
+ onClick={() => {}}
268
+ >
269
+ <Icon name={icon} />
270
+ </Menu.Item>
271
+ );
272
+ };
273
+
274
+ const handleChange = ({ value }) => {
275
+ const { text } = value?.document || {};
276
+ const json = text ? value?.toJSON() : {};
277
+ setJsonValue(json);
278
+ setValue(value);
279
+ if (onChange) {
280
+ onChange(undefined, { name, value: json });
281
+ }
282
+ };
283
+
284
+ const onPaste = (event, editor, next) => {
285
+ if (editor?.value?.selection?.isCollapsed) return next();
286
+
287
+ const transfer = getEventTransfer(event);
288
+ const { type, text } = transfer;
289
+ if (type !== "text" && type !== "html") return next();
290
+ if (!isUrl(text)) return next();
291
+
292
+ if (hasLinks()) {
293
+ editor.command(unwrapLink);
294
+ }
295
+
296
+ editor.command(wrapLink, text);
297
+ };
298
+
299
+ return readOnly ? (
300
+ <Editor
301
+ readOnly
302
+ value={value}
303
+ renderBlock={renderBlock}
304
+ renderMark={renderMark}
305
+ renderInline={renderInline}
306
+ />
307
+ ) : (
308
+ <div>
309
+ {label ? (
310
+ <div className={required ? "required field" : "field"}>
311
+ <label>{label}</label>
312
+ </div>
313
+ ) : null}
314
+ <div
315
+ style={{
316
+ border: "1px solid rgba(34, 36, 38, 0.15)",
317
+ borderRadius: "0.28571429rem",
318
+ }}
319
+ >
320
+ <Menu>
321
+ {renderMarkButton("bold", "bold")}
322
+ {renderMarkButton("italic", "italic")}
323
+ {renderMarkButton("underlined", "underline")}
324
+ {/* {renderMarkButton('code', 'file code')} */}
325
+ {renderBlockButton("heading-one", "header")}
326
+ {renderBlockButton("heading-two", "h")}
327
+ {/* {renderBlockButton('block-quote', 'quote right')} */}
328
+ {renderBlockButton("numbered-list", "list ol")}
329
+ {renderBlockButton("bulleted-list", "list ul")}
330
+ {renderLinkButton("linkify")}
331
+ </Menu>
332
+ <div style={{ padding: "10px" }}>
333
+ <Editor
334
+ style={{ WebkitUserModify: "read-write !important" }}
335
+ spellCheck
336
+ autoFocus
337
+ value={value}
338
+ onChange={handleChange}
339
+ onPaste={onPaste}
340
+ onKeyDown={onKeyDown}
341
+ renderBlock={renderBlock}
342
+ renderMark={renderMark}
343
+ renderInline={renderInline}
344
+ ref={setEditor}
345
+ />
346
+ </div>
347
+ </div>
348
+ </div>
349
+ );
350
+ };
386
351
 
387
352
  RichTextEditor.propTypes = {
388
353
  label: PropTypes.string,
@@ -27,6 +27,7 @@ export const TemplateSelector = ({
27
27
  templates,
28
28
  placeholder,
29
29
  hideLabel = false,
30
+ disabled,
30
31
  }) => {
31
32
  const { formatMessage } = useIntl();
32
33
  const options = makeOptions(formatMessage)(templates);
@@ -50,6 +51,7 @@ export const TemplateSelector = ({
50
51
  </label>
51
52
  )}
52
53
  <Form.Dropdown
54
+ disabled={disabled}
53
55
  clearable={clearable}
54
56
  loading={loading}
55
57
  name={name}
@@ -80,6 +82,7 @@ TemplateSelector.propTypes = {
80
82
  templates: PropTypes.array,
81
83
  placeholder: PropTypes.string,
82
84
  hideLabel: PropTypes.bool,
85
+ disabled: PropTypes.bool,
83
86
  };
84
87
 
85
88
  const emptyTemplates = [];
@@ -136,6 +136,7 @@ export class UploadModal extends React.Component {
136
136
  <Modal
137
137
  icon={icon}
138
138
  open={open}
139
+ role="presentation"
139
140
  onOpen={onOpen}
140
141
  onClose={onClose}
141
142
  actions={actions(
@@ -12,6 +12,7 @@ const messages = {
12
12
  en: {
13
13
  "sidemenu.concepts": "sidemenu.concepts",
14
14
  "sidemenu.concepts_management": "sidemenu.concepts_management",
15
+ "sidemenu.concepts_upload_events": "sidemenu.concepts_upload_events",
15
16
  },
16
17
  };
17
18
 
@@ -109,6 +109,19 @@ exports[`<GlossaryMenu /> matches the latest snapshot, finds fixed and subscopes
109
109
  concepts_links_management
110
110
  </span>
111
111
  </a>
112
+ <a
113
+ aria-checked="false"
114
+ class="item"
115
+ href="/concepts/bulk_upload_event"
116
+ name="concepts_upload_events"
117
+ role="option"
118
+ >
119
+ <span
120
+ class="text"
121
+ >
122
+ sidemenu.concepts_upload_events
123
+ </span>
124
+ </a>
112
125
  </div>
113
126
  </div>
114
127
  </div>
@@ -108,6 +108,7 @@ export default {
108
108
  "sidemenu.concepts_deprecated": "Deprecated",
109
109
  "sidemenu.concepts_links_management": "Links manager",
110
110
  "sidemenu.concepts_management": "Drafts",
111
+ "sidemenu.concepts_upload_events": "My loads",
111
112
  "sidemenu.concepts": "Glossary",
112
113
  "sidemenu.configurations": "Configuration",
113
114
  "sidemenu.dashboard": "Dashboard",
@@ -112,6 +112,7 @@ export default {
112
112
  "sidemenu.concepts_deprecated": "Archivados",
113
113
  "sidemenu.concepts_links_management": "Gestión de vínculos",
114
114
  "sidemenu.concepts_management": "Borradores",
115
+ "sidemenu.concepts_upload_events": "Mis cargas",
115
116
  "sidemenu.concepts": "Glosario",
116
117
  "sidemenu.configurations": "Configuración",
117
118
  "sidemenu.dashboard": "Dashboard",
package/src/routes.js CHANGED
@@ -9,6 +9,7 @@ export const BUCKET_VIEW_CONFIG_EDIT = "/bucketViewConfigs/:id/edit";
9
9
  export const BUCKET_VIEW_CONFIG_NEW = "/bucketViewConfigs/new";
10
10
  export const CONCEPTS = "/concepts";
11
11
  export const CONCEPTS_BULK_UPDATE = "/concepts/bulk_update";
12
+ export const CONCEPTS_BULK_UPLOAD_EVENTS = "/concepts/bulk_upload_event";
12
13
  export const CONCEPTS_NEW = "/concepts/new";
13
14
  export const CONCEPTS_PENDING = "/pendingConcepts";
14
15
  export const CONCEPTS_DEPRECATED = "/deprecatedConcepts";
@@ -1 +1,23 @@
1
1
  export const formatNumber = (value) => value?.toLocaleString();
2
+
3
+ export const toEnrichedTextFormat = (value) => ({
4
+ object: "value",
5
+ document: {
6
+ object: "document",
7
+ data: {},
8
+ nodes: [
9
+ {
10
+ object: "block",
11
+ type: "paragraph",
12
+ data: {},
13
+ nodes: [
14
+ {
15
+ object: "text",
16
+ text: value,
17
+ marks: [],
18
+ },
19
+ ],
20
+ },
21
+ ],
22
+ },
23
+ });