@contentful/field-editor-markdown 1.10.1 → 1.10.3

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.
@@ -19,6 +19,7 @@ _export(exports, {
19
19
  const _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
20
20
  const _f36components = require("@contentful/f36-components");
21
21
  const _f36tokens = /*#__PURE__*/ _interop_require_default(require("@contentful/f36-tokens"));
22
+ const _core = require("@lingui/core");
22
23
  const _emotion = require("emotion");
23
24
  const _types = require("../types");
24
25
  const _isValidUrl = require("../utils/isValidUrl");
@@ -116,7 +117,10 @@ const EmbedExternalContentModal = ({ onClose })=>{
116
117
  id: "external-link-url-field",
117
118
  isRequired: true,
118
119
  isInvalid: !urlIsValid
119
- }, /*#__PURE__*/ _react.default.createElement(_f36components.FormControl.Label, null, "Content URL"), /*#__PURE__*/ _react.default.createElement(_f36components.TextInput, {
120
+ }, /*#__PURE__*/ _react.default.createElement(_f36components.FormControl.Label, null, _core.i18n._({
121
+ id: "FieldEditors.Markdown.EmbedExternalContent.ContentURL",
122
+ message: "Content URL"
123
+ })), /*#__PURE__*/ _react.default.createElement(_f36components.TextInput, {
120
124
  name: "external-link-url",
121
125
  value: url,
122
126
  onChange: (e)=>{
@@ -127,7 +131,13 @@ const EmbedExternalContentModal = ({ onClose })=>{
127
131
  testId: "external-link-url-field",
128
132
  placeholder: "https://example.com",
129
133
  ref: mainInputRef
130
- }), /*#__PURE__*/ _react.default.createElement(_f36components.FormControl.HelpText, null, "Include protocol (e.g. https://)"), !urlIsValid && /*#__PURE__*/ _react.default.createElement(_f36components.FormControl.ValidationMessage, null, "URL is invalid")), /*#__PURE__*/ _react.default.createElement(_f36components.TextLink, {
134
+ }), /*#__PURE__*/ _react.default.createElement(_f36components.FormControl.HelpText, null, _core.i18n._({
135
+ id: "FieldEditors.Markdown.EmbedExternalContent.ProtocolHelpText",
136
+ message: "Include protocol (e.g. https://"
137
+ })), !urlIsValid && /*#__PURE__*/ _react.default.createElement(_f36components.FormControl.ValidationMessage, null, _core.i18n._({
138
+ id: "FieldEditors.Markdown.EmbedExternalContent.URLInvalidMessage",
139
+ message: "URL is invalid"
140
+ }))), /*#__PURE__*/ _react.default.createElement(_f36components.TextLink, {
131
141
  href: "http://embed.ly/providers",
132
142
  target: "_blank",
133
143
  rel: "noopener noreferrer"
@@ -1,6 +1,7 @@
1
1
  import React, { useState, useRef, useEffect } from 'react';
2
2
  import { ModalContent, ModalControls, Text, TextLink, Button, Checkbox, Radio, Form, FormControl, TextInput } from '@contentful/f36-components';
3
3
  import tokens from '@contentful/f36-tokens';
4
+ import { i18n as $_i18n } from "@lingui/core";
4
5
  import { css } from 'emotion';
5
6
  import { MarkdownDialogType } from '../types';
6
7
  import { isValidUrl } from '../utils/isValidUrl';
@@ -52,7 +53,10 @@ export const EmbedExternalContentModal = ({ onClose })=>{
52
53
  id: "external-link-url-field",
53
54
  isRequired: true,
54
55
  isInvalid: !urlIsValid
55
- }, /*#__PURE__*/ React.createElement(FormControl.Label, null, "Content URL"), /*#__PURE__*/ React.createElement(TextInput, {
56
+ }, /*#__PURE__*/ React.createElement(FormControl.Label, null, $_i18n._({
57
+ id: "FieldEditors.Markdown.EmbedExternalContent.ContentURL",
58
+ message: "Content URL"
59
+ })), /*#__PURE__*/ React.createElement(TextInput, {
56
60
  name: "external-link-url",
57
61
  value: url,
58
62
  onChange: (e)=>{
@@ -63,7 +67,13 @@ export const EmbedExternalContentModal = ({ onClose })=>{
63
67
  testId: "external-link-url-field",
64
68
  placeholder: "https://example.com",
65
69
  ref: mainInputRef
66
- }), /*#__PURE__*/ React.createElement(FormControl.HelpText, null, "Include protocol (e.g. https://)"), !urlIsValid && /*#__PURE__*/ React.createElement(FormControl.ValidationMessage, null, "URL is invalid")), /*#__PURE__*/ React.createElement(TextLink, {
70
+ }), /*#__PURE__*/ React.createElement(FormControl.HelpText, null, $_i18n._({
71
+ id: "FieldEditors.Markdown.EmbedExternalContent.ProtocolHelpText",
72
+ message: "Include protocol (e.g. https://"
73
+ })), !urlIsValid && /*#__PURE__*/ React.createElement(FormControl.ValidationMessage, null, $_i18n._({
74
+ id: "FieldEditors.Markdown.EmbedExternalContent.URLInvalidMessage",
75
+ message: "URL is invalid"
76
+ }))), /*#__PURE__*/ React.createElement(TextLink, {
67
77
  href: "http://embed.ly/providers",
68
78
  target: "_blank",
69
79
  rel: "noopener noreferrer"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentful/field-editor-markdown",
3
- "version": "1.10.1",
3
+ "version": "1.10.3",
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.10.0",
42
42
  "@types/codemirror": "0.0.109",
43
43
  "codemirror": "^5.65.11",
44
44
  "constate": "^3.3.2",
@@ -63,5 +63,5 @@
63
63
  "publishConfig": {
64
64
  "registry": "https://npm.pkg.github.com/"
65
65
  },
66
- "gitHead": "44e5546797a12db4d96f290e039a483297265ffa"
66
+ "gitHead": "be09f0d73046834685814d083141f5166cb64457"
67
67
  }