@contentful/field-editor-validation-errors 1.5.1 → 1.5.2

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.
@@ -12,6 +12,7 @@ const _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
12
12
  const _f36components = require("@contentful/f36-components");
13
13
  const _f36icons = require("@contentful/f36-icons");
14
14
  const _fieldeditorshared = require("@contentful/field-editor-shared");
15
+ const _core = require("@lingui/core");
15
16
  const _styles = /*#__PURE__*/ _interop_require_wildcard(require("./styles"));
16
17
  function _getRequireWildcardCache(nodeInterop) {
17
18
  if (typeof WeakMap !== "function") return null;
@@ -67,7 +68,10 @@ function UniquenessError(props) {
67
68
  ]);
68
69
  const getTitle = _react.useCallback((entry)=>_fieldeditorshared.entityHelpers.getEntryTitle({
69
70
  entry,
70
- defaultTitle: 'Untitled',
71
+ defaultTitle: _core.i18n._({
72
+ id: "FieldEditors.ValidationErrors.UniquenessError.DefaultTitle",
73
+ message: "Untitled"
74
+ }),
71
75
  localeCode: props.localeCode,
72
76
  defaultLocaleCode: props.defaultLocaleCode,
73
77
  contentType: contentTypesById[entry.sys.contentType.sys.id]
@@ -116,7 +120,10 @@ function UniquenessError(props) {
116
120
  testId: "validation-errors-uniqueness"
117
121
  }, /*#__PURE__*/ _react.createElement(_f36components.ListItem, {
118
122
  className: _styles.entryLink
119
- }, state.loading ? /*#__PURE__*/ _react.createElement("div", null, "Loading title for conflicting entry…") : state.entries.map((entry)=>/*#__PURE__*/ _react.createElement(_f36components.TextLink, {
123
+ }, state.loading ? /*#__PURE__*/ _react.createElement("div", null, _core.i18n._({
124
+ id: "FieldEditors.ValidationErrors.UniquenessError.LoadingMessage",
125
+ message: "Loading title for conflicting entry…"
126
+ })) : state.entries.map((entry)=>/*#__PURE__*/ _react.createElement(_f36components.TextLink, {
120
127
  key: entry.id,
121
128
  href: entry.href,
122
129
  icon: /*#__PURE__*/ _react.createElement(_f36icons.ExternalLinkIcon, null),
@@ -2,6 +2,7 @@ import * as React from 'react';
2
2
  import { List, ListItem, TextLink } from '@contentful/f36-components';
3
3
  import { ExternalLinkIcon, InfoCircleIcon } from '@contentful/f36-icons';
4
4
  import { entityHelpers } from '@contentful/field-editor-shared';
5
+ import { i18n as $_i18n } from "@lingui/core";
5
6
  import * as styles from './styles';
6
7
  function UniquenessError(props) {
7
8
  const [state, setState] = React.useState({
@@ -16,7 +17,10 @@ function UniquenessError(props) {
16
17
  ]);
17
18
  const getTitle = React.useCallback((entry)=>entityHelpers.getEntryTitle({
18
19
  entry,
19
- defaultTitle: 'Untitled',
20
+ defaultTitle: $_i18n._({
21
+ id: "FieldEditors.ValidationErrors.UniquenessError.DefaultTitle",
22
+ message: "Untitled"
23
+ }),
20
24
  localeCode: props.localeCode,
21
25
  defaultLocaleCode: props.defaultLocaleCode,
22
26
  contentType: contentTypesById[entry.sys.contentType.sys.id]
@@ -65,7 +69,10 @@ function UniquenessError(props) {
65
69
  testId: "validation-errors-uniqueness"
66
70
  }, /*#__PURE__*/ React.createElement(ListItem, {
67
71
  className: styles.entryLink
68
- }, state.loading ? /*#__PURE__*/ React.createElement("div", null, "Loading title for conflicting entry…") : state.entries.map((entry)=>/*#__PURE__*/ React.createElement(TextLink, {
72
+ }, state.loading ? /*#__PURE__*/ React.createElement("div", null, $_i18n._({
73
+ id: "FieldEditors.ValidationErrors.UniquenessError.LoadingMessage",
74
+ message: "Loading title for conflicting entry…"
75
+ })) : state.entries.map((entry)=>/*#__PURE__*/ React.createElement(TextLink, {
69
76
  key: entry.id,
70
77
  href: entry.href,
71
78
  icon: /*#__PURE__*/ React.createElement(ExternalLinkIcon, null),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentful/field-editor-validation-errors",
3
- "version": "1.5.1",
3
+ "version": "1.5.2",
4
4
  "main": "dist/cjs/index.js",
5
5
  "module": "dist/esm/index.js",
6
6
  "types": "dist/types/index.d.ts",
@@ -38,7 +38,7 @@
38
38
  "@contentful/f36-components": "^4.70.0",
39
39
  "@contentful/f36-icons": "^4.29.0",
40
40
  "@contentful/f36-tokens": "^4.0.5",
41
- "@contentful/field-editor-shared": "^2.9.0",
41
+ "@contentful/field-editor-shared": "^2.9.1",
42
42
  "emotion": "^10.0.17"
43
43
  },
44
44
  "devDependencies": {
@@ -52,5 +52,5 @@
52
52
  "publishConfig": {
53
53
  "registry": "https://npm.pkg.github.com/"
54
54
  },
55
- "gitHead": "44e5546797a12db4d96f290e039a483297265ffa"
55
+ "gitHead": "4fa62eaa25b40c592cc3671df8626dd18013a206"
56
56
  }