@uxf/wysiwyg 11.73.0 → 11.74.1

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.
@@ -1,6 +1,406 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.defaultTranslationFunction = void 0;
4
- const cs_1 = require("./cs");
5
- const defaultTranslationFunction = (key) => cs_1.cs[key];
6
- exports.defaultTranslationFunction = defaultTranslationFunction;
3
+ exports.default = {
4
+ "uxf-wysiwyg": {
5
+ common: {
6
+ placeholder: {
7
+ cs: "Napište něco hezkého...",
8
+ en: "Write something nice...",
9
+ sk: "Napíšte niečo pekné...",
10
+ de: "Schreiben Sie etwas Schönes...",
11
+ },
12
+ },
13
+ components: {
14
+ modal: {
15
+ "button-cancel": {
16
+ cs: "Zrušit",
17
+ en: "Cancel",
18
+ sk: "Zrušiť",
19
+ de: "Abbrechen",
20
+ },
21
+ },
22
+ },
23
+ plugins: {
24
+ formatting: {
25
+ bold: {
26
+ tooltip: {
27
+ cs: "Tučné (Ctrl+B)",
28
+ en: "Bold (Ctrl+B)",
29
+ sk: "Tučné (Ctrl+B)",
30
+ de: "Fett (Ctrl+B)",
31
+ },
32
+ },
33
+ italic: {
34
+ tooltip: {
35
+ cs: "Kurzíva (Ctrl+I)",
36
+ en: "Italic (Ctrl+I)",
37
+ sk: "Kurzíva (Ctrl+I)",
38
+ de: "Kursiv (Ctrl+I)",
39
+ },
40
+ },
41
+ underline: {
42
+ tooltip: {
43
+ cs: "Podtržení (Ctrl+U)",
44
+ en: "Underline (Ctrl+U)",
45
+ sk: "Podčiarknutie (Ctrl+U)",
46
+ de: "Unterstrichen (Ctrl+U)",
47
+ },
48
+ },
49
+ code: {
50
+ tooltip: {
51
+ cs: "Kód",
52
+ en: "Code",
53
+ sk: "Kód",
54
+ de: "Code",
55
+ },
56
+ },
57
+ highlight: {
58
+ tooltip: {
59
+ cs: "Zvýraznění (Ctrl+Shift+H)",
60
+ en: "Highlight (Ctrl+Shift+H)",
61
+ sk: "Zvýraznenie (Ctrl+Shift+H)",
62
+ de: "Hervorheben (Ctrl+Shift+H)",
63
+ },
64
+ },
65
+ },
66
+ headings: {
67
+ h1: {
68
+ tooltip: {
69
+ cs: "Nadpis H1",
70
+ en: "Heading H1",
71
+ sk: "Nadpis H1",
72
+ de: "Überschrift H1",
73
+ },
74
+ },
75
+ h2: {
76
+ tooltip: {
77
+ cs: "Nadpis H2",
78
+ en: "Heading H2",
79
+ sk: "Nadpis H2",
80
+ de: "Überschrift H2",
81
+ },
82
+ },
83
+ h3: {
84
+ tooltip: {
85
+ cs: "Nadpis H3",
86
+ en: "Heading H3",
87
+ sk: "Nadpis H3",
88
+ de: "Überschrift H3",
89
+ },
90
+ },
91
+ h4: {
92
+ tooltip: {
93
+ cs: "Nadpis H4",
94
+ en: "Heading H4",
95
+ sk: "Nadpis H4",
96
+ de: "Überschrift H4",
97
+ },
98
+ },
99
+ h5: {
100
+ tooltip: {
101
+ cs: "Nadpis H5",
102
+ en: "Heading H5",
103
+ sk: "Nadpis H5",
104
+ de: "Überschrift H5",
105
+ },
106
+ },
107
+ h6: {
108
+ tooltip: {
109
+ cs: "Nadpis H6",
110
+ en: "Heading H6",
111
+ sk: "Nadpis H6",
112
+ de: "Überschrift H6",
113
+ },
114
+ },
115
+ },
116
+ link: {
117
+ "url-address": {
118
+ invalid: {
119
+ cs: "Neplatná URL adresa",
120
+ en: "Invalid URL address",
121
+ sk: "Neplatná URL adresa",
122
+ de: "Ungültige URL-Adresse",
123
+ },
124
+ required: {
125
+ cs: "URL adresa je povinná",
126
+ en: "URL address is required",
127
+ sk: "URL adresa je povinná",
128
+ de: "URL-Adresse ist erforderlich",
129
+ },
130
+ label: {
131
+ cs: "URL adresa",
132
+ en: "URL address",
133
+ sk: "URL adresa",
134
+ de: "URL-Adresse",
135
+ },
136
+ placeholder: {
137
+ cs: "Zadejte URL adresu",
138
+ en: "Enter URL address",
139
+ sk: "Zadajte URL adresu",
140
+ de: "URL-Adresse eingeben",
141
+ },
142
+ },
143
+ "link-text": {
144
+ label: {
145
+ cs: "Text odkazu",
146
+ en: "Link text",
147
+ sk: "Text odkazu",
148
+ de: "Link-Text",
149
+ },
150
+ placeholder: {
151
+ cs: "Zadejte text odkazu",
152
+ en: "Enter link text",
153
+ sk: "Zadajte text odkazu",
154
+ de: "Link-Text eingeben",
155
+ },
156
+ },
157
+ "open-in-new-tab": {
158
+ cs: "Otevřít v nové záložce",
159
+ en: "Open in new tab",
160
+ sk: "Otvoriť v novej karte",
161
+ de: "In neuem Tab öffnen",
162
+ },
163
+ tooltip: {
164
+ cs: "Vložit odkaz",
165
+ en: "Insert link",
166
+ sk: "Vložiť odkaz",
167
+ de: "Link einfügen",
168
+ },
169
+ "button-save": {
170
+ cs: "Uložit",
171
+ en: "Save",
172
+ sk: "Uložiť",
173
+ de: "Speichern",
174
+ },
175
+ "button-close": {
176
+ cs: "Zavřít",
177
+ en: "Close",
178
+ sk: "Zatvoriť",
179
+ de: "Schließen",
180
+ },
181
+ },
182
+ blocks: {
183
+ quote: {
184
+ tooltip: {
185
+ cs: "Citace",
186
+ en: "Quote",
187
+ sk: "Citácia",
188
+ de: "Zitat",
189
+ },
190
+ },
191
+ },
192
+ lists: {
193
+ ul: {
194
+ tooltip: {
195
+ cs: "Vložit odrážkový seznam",
196
+ en: "Insert bullet list",
197
+ sk: "Vložiť odrážkový zoznam",
198
+ de: "Aufzählung einfügen",
199
+ },
200
+ },
201
+ ol: {
202
+ tooltip: {
203
+ cs: "Vložit číslovaný seznam",
204
+ en: "Insert numbered list",
205
+ sk: "Vložiť číslovaný zoznam",
206
+ de: "Nummerierte Liste einfügen",
207
+ },
208
+ },
209
+ },
210
+ button: {
211
+ tooltip: {
212
+ cs: "Vložit tlačítko",
213
+ en: "Insert button",
214
+ sk: "Vložiť tlačidlo",
215
+ de: "Schaltfläche einfügen",
216
+ },
217
+ "button-text": {
218
+ label: {
219
+ cs: "Text tlačítka",
220
+ en: "Button text",
221
+ sk: "Text tlačidla",
222
+ de: "Schaltflächen-Text",
223
+ },
224
+ placeholder: {
225
+ cs: "Zadejte text tlačítka",
226
+ en: "Enter button text",
227
+ sk: "Zadajte text tlačidla",
228
+ de: "Schaltflächen-Text eingeben",
229
+ },
230
+ required: {
231
+ cs: "Toto pole je povinné",
232
+ en: "This field is required",
233
+ sk: "Toto pole je povinné",
234
+ de: "Dieses Feld ist erforderlich",
235
+ },
236
+ },
237
+ "url-address": {
238
+ label: {
239
+ cs: "URL adresa",
240
+ en: "URL address",
241
+ sk: "URL adresa",
242
+ de: "URL-Adresse",
243
+ },
244
+ placeholder: {
245
+ cs: "Zadejte URL adresu",
246
+ en: "Enter URL address",
247
+ sk: "Zadajte URL adresu",
248
+ de: "URL-Adresse eingeben",
249
+ },
250
+ required: {
251
+ cs: "Toto pole je povinné",
252
+ en: "This field is required",
253
+ sk: "Toto pole je povinné",
254
+ de: "Dieses Feld ist erforderlich",
255
+ },
256
+ },
257
+ "button-insert": {
258
+ cs: "Vložit tlačítko",
259
+ en: "Insert button",
260
+ sk: "Vložiť tlačidlo",
261
+ de: "Schaltfläche einfügen",
262
+ },
263
+ "button-edit": {
264
+ cs: "Upravit tlačítko",
265
+ en: "Edit button",
266
+ sk: "Upraviť tlačidlo",
267
+ de: "Schaltfläche bearbeiten",
268
+ },
269
+ },
270
+ image: {
271
+ tooltip: {
272
+ cs: "Vložit obrázek",
273
+ en: "Insert image",
274
+ sk: "Vložiť obrázok",
275
+ de: "Bild einfügen",
276
+ },
277
+ alt: {
278
+ label: {
279
+ cs: "Alt obrázku",
280
+ en: "Image alt",
281
+ sk: "Alt obrázka",
282
+ de: "Alt-Text des Bildes",
283
+ },
284
+ placeholder: {
285
+ cs: "Zadejte alt obrázku",
286
+ en: "Enter image alt",
287
+ sk: "Zadajte alt obrázka",
288
+ de: "Alt-Text des Bildes eingeben",
289
+ },
290
+ },
291
+ caption: {
292
+ label: {
293
+ cs: "Popisek obrázku",
294
+ en: "Image caption",
295
+ sk: "Popis obrázka",
296
+ de: "Bildunterschrift",
297
+ },
298
+ placeholder: {
299
+ cs: "Zadejte popisek obrázku",
300
+ en: "Enter image caption",
301
+ sk: "Zadajte popis obrázka",
302
+ de: "Bildunterschrift eingeben",
303
+ },
304
+ },
305
+ source: {
306
+ label: {
307
+ cs: "Zdroj obrázku",
308
+ en: "Image source",
309
+ sk: "Zdroj obrázka",
310
+ de: "Bildquelle",
311
+ },
312
+ placeholder: {
313
+ cs: "Zadejte zdroj obrázku",
314
+ en: "Enter image source",
315
+ sk: "Zadajte zdroj obrázka",
316
+ de: "Bildquelle eingeben",
317
+ },
318
+ },
319
+ "file-upload": {
320
+ label: {
321
+ cs: "Obrázek",
322
+ en: "Image",
323
+ sk: "Obrázok",
324
+ de: "Bild",
325
+ },
326
+ },
327
+ "button-insert": {
328
+ cs: "Vložit obrázek",
329
+ en: "Insert image",
330
+ sk: "Vložiť obrázok",
331
+ de: "Bild einfügen",
332
+ },
333
+ "button-edit": {
334
+ cs: "Upravit obrázek",
335
+ en: "Edit image",
336
+ sk: "Upraviť obrázok",
337
+ de: "Bild bearbeiten",
338
+ },
339
+ },
340
+ video: {
341
+ tooltip: {
342
+ cs: "Vložit video",
343
+ en: "Insert video",
344
+ sk: "Vložiť video",
345
+ de: "Video einfügen",
346
+ },
347
+ "url-address": {
348
+ label: {
349
+ cs: "URL adresa",
350
+ en: "URL address",
351
+ sk: "URL adresa",
352
+ de: "URL-Adresse",
353
+ },
354
+ placeholder: {
355
+ cs: "Zadejte URL adresu",
356
+ en: "Enter URL address",
357
+ sk: "Zadajte URL adresu",
358
+ de: "URL-Adresse eingeben",
359
+ },
360
+ invalid: {
361
+ cs: "Neplatná URL adresa.",
362
+ en: "Invalid URL address.",
363
+ sk: "Neplatná URL adresa.",
364
+ de: "Ungültige URL-Adresse.",
365
+ },
366
+ },
367
+ "iframe-title": {
368
+ cs: "Video",
369
+ en: "Video",
370
+ sk: "Video",
371
+ de: "Video",
372
+ },
373
+ "button-insert": {
374
+ cs: "Vložit video",
375
+ en: "Insert video",
376
+ sk: "Vložiť video",
377
+ de: "Video einfügen",
378
+ },
379
+ "button-edit": {
380
+ cs: "Upravit video",
381
+ en: "Edit video",
382
+ sk: "Upraviť video",
383
+ de: "Video bearbeiten",
384
+ },
385
+ },
386
+ actions: {
387
+ undo: {
388
+ tooltip: {
389
+ cs: "Vrátit zpět (Ctrl+Z)",
390
+ en: "Undo (Ctrl+Z)",
391
+ sk: "Vrátiť späť (Ctrl+Z)",
392
+ de: "Rückgängig (Ctrl+Z)",
393
+ },
394
+ },
395
+ redo: {
396
+ tooltip: {
397
+ cs: "Opakovat (Ctrl+Y)",
398
+ en: "Redo (Ctrl+Y)",
399
+ sk: "Opakovať (Ctrl+Y)",
400
+ de: "Wiederholen (Ctrl+Y)",
401
+ },
402
+ },
403
+ },
404
+ },
405
+ },
406
+ };
@@ -24,17 +24,17 @@ var __importStar = (this && this.__importStar) || function (mod) {
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
26
  exports.InsertButtonModalContent = void 0;
27
+ const translations_1 = require("@uxf/core-react/translations");
27
28
  const text_input_1 = require("@uxf/ui/text-input");
28
29
  const react_1 = __importStar(require("react"));
29
30
  const button_1 = require("../../plugins/button");
30
- const context_1 = require("../../translations/context");
31
31
  const modal_buttons_1 = require("../components/modal/modal-buttons");
32
32
  const modal_content_1 = require("../components/modal/modal-content");
33
33
  const utils_1 = require("../utils");
34
34
  const CLASS_NAME = "uxf-wysiwyg__insert-modal-button";
35
35
  const InsertButtonModalContent = (props) => {
36
36
  var _a, _b, _c, _d;
37
- const t = (0, context_1.useTranslation)();
37
+ const t = (0, translations_1.useUxfTranslation)();
38
38
  const [buttonText, setButtonText] = (0, react_1.useState)((_b = (_a = props.buttonToEdit) === null || _a === void 0 ? void 0 : _a.buttonText) !== null && _b !== void 0 ? _b : "");
39
39
  const [buttonUrl, setButtonUrl] = (0, react_1.useState)((_d = (_c = props.buttonToEdit) === null || _c === void 0 ? void 0 : _c.buttonUrl) !== null && _d !== void 0 ? _d : "");
40
40
  const [error, setError] = (0, react_1.useState)({
@@ -42,21 +42,21 @@ const InsertButtonModalContent = (props) => {
42
42
  url: undefined,
43
43
  });
44
44
  const title = props.buttonToEdit
45
- ? t("wysiwyg:plugins.button.button-edit")
46
- : t("wysiwyg:plugins.button.button-insert");
45
+ ? t("uxf-wysiwyg:plugins.button.button-edit")
46
+ : t("uxf-wysiwyg:plugins.button.button-insert");
47
47
  const onSubmit = (0, react_1.useCallback)(async (e) => {
48
48
  e.preventDefault();
49
49
  if (buttonText.length === 0) {
50
50
  setError((prevError) => ({
51
51
  ...prevError,
52
- text: "Toto pole je povinné",
52
+ text: t("uxf-wysiwyg:plugins.button.button-text.required"),
53
53
  }));
54
54
  }
55
55
  if (buttonUrl.length === 0) {
56
56
  setError((prevError) => {
57
57
  return {
58
58
  ...prevError,
59
- url: "Toto pole je povinné",
59
+ url: t("uxf-wysiwyg:plugins.button.url-address.required"),
60
60
  };
61
61
  });
62
62
  }
@@ -69,12 +69,12 @@ const InsertButtonModalContent = (props) => {
69
69
  }
70
70
  (0, utils_1.closeModalWithFocus)(props.editor);
71
71
  }
72
- }, [buttonText, buttonUrl, props.buttonToEdit, props.editor]);
72
+ }, [buttonText, buttonUrl, props.buttonToEdit, props.editor, t]);
73
73
  return (react_1.default.createElement(modal_content_1.ModalContent, { title: title },
74
74
  react_1.default.createElement("form", { className: `${CLASS_NAME}__form`, id: "insert-button-form", onSubmit: onSubmit },
75
75
  react_1.default.createElement("div", { className: `${CLASS_NAME}__form-inputs` },
76
- react_1.default.createElement(text_input_1.TextInput, { helperText: error.text, isInvalid: Boolean(error.text), isRequired: true, label: t("wysiwyg:plugins.button.button-text.label"), name: "button-text", onChange: setButtonText, placeholder: t("wysiwyg:plugins.button.button-text.placeholder"), type: "text", value: buttonText }),
77
- react_1.default.createElement(text_input_1.TextInput, { helperText: error.url, isInvalid: Boolean(error.url), isRequired: true, label: t("wysiwyg:plugins.button.url-address.label"), name: "url-address", onChange: setButtonUrl, placeholder: t("wysiwyg:plugins.button.url-address.placeholder"), type: "text", value: buttonUrl })),
76
+ react_1.default.createElement(text_input_1.TextInput, { helperText: error.text, isInvalid: Boolean(error.text), isRequired: true, label: t("uxf-wysiwyg:plugins.button.button-text.label"), name: "button-text", onChange: setButtonText, placeholder: t("uxf-wysiwyg:plugins.button.button-text.placeholder"), type: "text", value: buttonText }),
77
+ react_1.default.createElement(text_input_1.TextInput, { helperText: error.url, isInvalid: Boolean(error.url), isRequired: true, label: t("uxf-wysiwyg:plugins.button.url-address.label"), name: "url-address", onChange: setButtonUrl, placeholder: t("uxf-wysiwyg:plugins.button.url-address.placeholder"), type: "text", value: buttonUrl })),
78
78
  react_1.default.createElement(modal_buttons_1.ModalButtons, { className: `${CLASS_NAME}__form-buttons`, editor: props.editor, submitText: title }),
79
79
  react_1.default.createElement("button", { hidden: true, type: "submit" }))));
80
80
  };
@@ -24,13 +24,13 @@ var __importStar = (this && this.__importStar) || function (mod) {
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
26
  exports.ModalButtonCancel = void 0;
27
+ const translations_1 = require("@uxf/core-react/translations");
27
28
  const button_1 = require("@uxf/ui/button");
28
29
  const react_1 = __importStar(require("react"));
29
- const context_1 = require("../../../translations/context");
30
30
  const utils_1 = require("../../utils");
31
31
  const ModalButtonCancel = (props) => {
32
32
  var _a;
33
- const t = (0, context_1.useTranslation)();
33
+ const t = (0, translations_1.useUxfTranslation)();
34
34
  const onCancel = props.onCancel;
35
35
  const cancelHandler = (0, react_1.useCallback)(() => {
36
36
  if (onCancel) {
@@ -40,6 +40,6 @@ const ModalButtonCancel = (props) => {
40
40
  (0, utils_1.closeModalWithFocus)(props.editor);
41
41
  }
42
42
  }, [onCancel, props.editor]);
43
- return (react_1.default.createElement(button_1.Button, { className: "uxf-wysiwyg__modal-button-cancel", color: "default", onClick: cancelHandler, variant: "secondary" }, (_a = props.cancelText) !== null && _a !== void 0 ? _a : t("wysiwyg:components.modal.button-cancel")));
43
+ return (react_1.default.createElement(button_1.Button, { className: "uxf-wysiwyg__modal-button-cancel", color: "default", onClick: cancelHandler, variant: "secondary" }, (_a = props.cancelText) !== null && _a !== void 0 ? _a : t("uxf-wysiwyg:components.modal.button-cancel")));
44
44
  };
45
45
  exports.ModalButtonCancel = ModalButtonCancel;
@@ -26,6 +26,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
26
26
  exports.FloatingLink = void 0;
27
27
  const plate_floating_1 = require("@udecode/plate-floating");
28
28
  const plate_link_1 = require("@udecode/plate-link");
29
+ const translations_1 = require("@uxf/core-react/translations");
29
30
  const button_1 = require("@uxf/ui/button");
30
31
  const button_group_1 = require("@uxf/ui/button-group");
31
32
  const checkbox_input_1 = require("@uxf/ui/checkbox-input");
@@ -37,7 +38,6 @@ const floating_link_wrapper_1 = require("../plugins/link/floating-link-wrapper")
37
38
  const hooks_2 = require("../plugins/link/hooks");
38
39
  const get_active_link_1 = require("../plugins/link/transforms/get-active-link");
39
40
  const unwrap_link_1 = require("../plugins/link/transforms/unwrap-link");
40
- const context_1 = require("../translations/context");
41
41
  const url_helper_1 = require("../utils/url-helper");
42
42
  const CLASS_NAME = "uxf-wysiwyg__floating-link";
43
43
  const EDIT_CLASS_NAME = `${CLASS_NAME}-edit`;
@@ -70,7 +70,7 @@ function useInsertLinkFormAutoFocus() {
70
70
  }
71
71
  const INSERT_CLASS_NAME = `${CLASS_NAME}-insert`;
72
72
  const Insert = () => {
73
- const t = (0, context_1.useTranslation)();
73
+ const t = (0, translations_1.useUxfTranslation)();
74
74
  const linkActions = (0, hooks_2.useLinkActions)();
75
75
  const editor = (0, hooks_1.useUxfEditorRef)();
76
76
  const [isSubmitted, setIsSubmitted] = (0, react_1.useState)(false);
@@ -90,14 +90,14 @@ const Insert = () => {
90
90
  react_1.default.createElement("form", { className: `${INSERT_CLASS_NAME}__form`, id: "insert-link-form", onSubmit: onSubmit },
91
91
  react_1.default.createElement("div", { className: `${INSERT_CLASS_NAME}__form-inputs` },
92
92
  react_1.default.createElement(text_input_1.TextInput, { helperText: emptyUrl
93
- ? t("wysiwyg:plugins.link.url-address.required")
93
+ ? t("uxf-wysiwyg:plugins.link.url-address.required")
94
94
  : invalidUrl
95
- ? t("wysiwyg:plugins.link.url-address.invalid")
96
- : undefined, hiddenLabel: true, id: firstInputId, isInvalid: emptyUrl || invalidUrl, isRequired: true, label: t("wysiwyg:plugins.link.url-address.label"), leftAddon: t("wysiwyg:plugins.link.url-address.label"), name: "url-address", onChange: linkActions.setUrl, placeholder: t("wysiwyg:plugins.link.url-address.placeholder"), value: linkActions.getUrl }),
97
- react_1.default.createElement(text_input_1.TextInput, { hiddenLabel: true, label: t("wysiwyg:plugins.link.link-text.label"), leftAddon: t("wysiwyg:plugins.link.link-text.label"), name: "link-text", onChange: linkActions.setText, placeholder: t("wysiwyg:plugins.link.link-text.placeholder"), value: linkActions.getText }),
98
- react_1.default.createElement(checkbox_input_1.CheckboxInput, { label: t("wysiwyg:plugins.link.open-in-new-tab"), name: "open-in-new-tab", onChange: (checked) => linkActions.setTarget(checked ? "_blank" : "_self"), value: linkActions.getTarget === "_blank" })),
95
+ ? t("uxf-wysiwyg:plugins.link.url-address.invalid")
96
+ : undefined, hiddenLabel: true, id: firstInputId, isInvalid: emptyUrl || invalidUrl, isRequired: true, label: t("uxf-wysiwyg:plugins.link.url-address.label"), leftAddon: t("uxf-wysiwyg:plugins.link.url-address.label"), name: "url-address", onChange: linkActions.setUrl, placeholder: t("uxf-wysiwyg:plugins.link.url-address.placeholder"), value: linkActions.getUrl }),
97
+ react_1.default.createElement(text_input_1.TextInput, { hiddenLabel: true, label: t("uxf-wysiwyg:plugins.link.link-text.label"), leftAddon: t("uxf-wysiwyg:plugins.link.link-text.label"), name: "link-text", onChange: linkActions.setText, placeholder: t("uxf-wysiwyg:plugins.link.link-text.placeholder"), value: linkActions.getText }),
98
+ react_1.default.createElement(checkbox_input_1.CheckboxInput, { label: t("uxf-wysiwyg:plugins.link.open-in-new-tab"), name: "open-in-new-tab", onChange: (checked) => linkActions.setTarget(checked ? "_blank" : "_self"), value: linkActions.getTarget === "_blank" })),
99
99
  react_1.default.createElement("div", { className: `${INSERT_CLASS_NAME}__form-buttons` },
100
- react_1.default.createElement(button_1.Button, { className: `${INSERT_CLASS_NAME}__form-submit-button`, type: "submit" }, t("wysiwyg:plugins.link.button-save"))),
100
+ react_1.default.createElement(button_1.Button, { className: `${INSERT_CLASS_NAME}__form-submit-button`, type: "submit" }, t("uxf-wysiwyg:plugins.link.button-save"))),
101
101
  react_1.default.createElement("button", { hidden: true, type: "submit" }))));
102
102
  };
103
103
  const FloatingLink = () => {
@@ -24,6 +24,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
26
  exports.InsertImageModalContent = void 0;
27
+ const translations_1 = require("@uxf/core-react/translations");
27
28
  const file_input_1 = require("@uxf/ui/file-input");
28
29
  const modal_service_1 = require("@uxf/ui/modal/modal-service");
29
30
  const text_input_1 = require("@uxf/ui/text-input");
@@ -31,20 +32,21 @@ const react_1 = __importStar(require("react"));
31
32
  const use_image_handlers_1 = require("../../plugins/image/hooks/use-image-handlers");
32
33
  const insert_image_1 = require("../../plugins/image/transforms/insert-image");
33
34
  const update_image_1 = require("../../plugins/image/transforms/update-image");
34
- const context_1 = require("../../translations/context");
35
35
  const modal_buttons_1 = require("../components/modal/modal-buttons");
36
36
  const modal_content_1 = require("../components/modal/modal-content");
37
37
  const utils_1 = require("../utils");
38
38
  const CLASS_NAME = "uxf-wysiwyg__insert-modal";
39
39
  const InsertImageModalContent = (props) => {
40
40
  var _a, _b, _c, _d, _e, _f, _g, _h;
41
- const t = (0, context_1.useTranslation)();
41
+ const t = (0, translations_1.useUxfTranslation)();
42
42
  const imageHandlers = (0, use_image_handlers_1.useImageHandlers)(props.editor);
43
43
  const [selectedFile, setSelectedFile] = (0, react_1.useState)((_b = (_a = props.imageToEdit) === null || _a === void 0 ? void 0 : _a.file) !== null && _b !== void 0 ? _b : null);
44
44
  const [alt, setAlt] = (0, react_1.useState)((_d = (_c = props.imageToEdit) === null || _c === void 0 ? void 0 : _c.alt) !== null && _d !== void 0 ? _d : "");
45
45
  const [caption, setCaption] = (0, react_1.useState)((_f = (_e = props.imageToEdit) === null || _e === void 0 ? void 0 : _e.caption) !== null && _f !== void 0 ? _f : "");
46
46
  const [source, setSource] = (0, react_1.useState)((_h = (_g = props.imageToEdit) === null || _g === void 0 ? void 0 : _g.source) !== null && _h !== void 0 ? _h : "");
47
- const title = props.imageToEdit ? t("wysiwyg:plugins.image.button-edit") : t("wysiwyg:plugins.image.button-insert");
47
+ const title = props.imageToEdit
48
+ ? t("uxf-wysiwyg:plugins.image.button-edit")
49
+ : t("uxf-wysiwyg:plugins.image.button-insert");
48
50
  const fileUploadHandler = (0, react_1.useCallback)(async (file) => {
49
51
  const fileResponse = await imageHandlers.uploadImage(file);
50
52
  setSelectedFile(fileResponse);
@@ -76,10 +78,10 @@ const InsertImageModalContent = (props) => {
76
78
  return (react_1.default.createElement(modal_content_1.ModalContent, { title: title },
77
79
  react_1.default.createElement("form", { className: `${CLASS_NAME}-image__form`, id: "insert-image-form", onSubmit: onAddHandler },
78
80
  react_1.default.createElement("div", { className: `${CLASS_NAME}-image__form-inputs` },
79
- react_1.default.createElement(file_input_1.FileInput, { label: "Obr\u00E1zek", name: "image", onChange: setSelectedFile, onUploadFile: fileUploadHandler, value: selectedFile }),
80
- react_1.default.createElement(text_input_1.TextInput, { className: `${CLASS_NAME}-image__optional-input`, label: t("wysiwyg:plugins.image.alt.label"), name: "alt", onChange: setAlt, placeholder: t("wysiwyg:plugins.image.alt.placeholder"), type: "text", value: alt }),
81
- react_1.default.createElement(text_input_1.TextInput, { className: `${CLASS_NAME}-image__optional-input`, label: t("wysiwyg:plugins.image.caption.label"), name: "caption", onChange: setCaption, placeholder: t("wysiwyg:plugins.image.caption.placeholder"), type: "text", value: caption }),
82
- react_1.default.createElement(text_input_1.TextInput, { className: `${CLASS_NAME}-image__optional-input`, label: t("wysiwyg:plugins.image.source.label"), name: "source", onChange: setSource, placeholder: t("wysiwyg:plugins.image.source.placeholder"), type: "text", value: source })),
81
+ react_1.default.createElement(file_input_1.FileInput, { label: t("uxf-wysiwyg:plugins.image.file-upload.label"), name: "image", onChange: setSelectedFile, onUploadFile: fileUploadHandler, value: selectedFile }),
82
+ react_1.default.createElement(text_input_1.TextInput, { className: `${CLASS_NAME}-image__optional-input`, label: t("uxf-wysiwyg:plugins.image.alt.label"), name: "alt", onChange: setAlt, placeholder: t("uxf-wysiwyg:plugins.image.alt.placeholder"), type: "text", value: alt }),
83
+ react_1.default.createElement(text_input_1.TextInput, { className: `${CLASS_NAME}-image__optional-input`, label: t("uxf-wysiwyg:plugins.image.caption.label"), name: "caption", onChange: setCaption, placeholder: t("uxf-wysiwyg:plugins.image.caption.placeholder"), type: "text", value: caption }),
84
+ react_1.default.createElement(text_input_1.TextInput, { className: `${CLASS_NAME}-image__optional-input`, label: t("uxf-wysiwyg:plugins.image.source.label"), name: "source", onChange: setSource, placeholder: t("uxf-wysiwyg:plugins.image.source.placeholder"), type: "text", value: source })),
83
85
  selectedFile && (react_1.default.createElement("img", { alt: alt, className: `${CLASS_NAME}-image__selected-img`, src: imageHandlers.getImageUrl(selectedFile) })),
84
86
  react_1.default.createElement(modal_buttons_1.ModalButtons, { className: `${CLASS_NAME}__form-buttons`, editor: props.editor, onCancel: onCloseHandler, submitText: title }),
85
87
  react_1.default.createElement("button", { hidden: true, type: "submit" }))));
@@ -4,17 +4,17 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.ButtonToolbarButton = void 0;
7
+ const translations_1 = require("@uxf/core-react/translations");
7
8
  const react_1 = __importDefault(require("react"));
8
9
  const hooks_1 = require("../../../hooks");
9
10
  const button_1 = require("../../../plugins/button");
10
- const context_1 = require("../../../translations/context");
11
11
  const insert_button_modal_content_1 = require("../../button/insert-button-modal-content");
12
12
  const modal_toolbar_button_1 = require("./modal-toolbar-button");
13
13
  const CLASS_NAME = "uxf-wysiwyg__toolbar-button";
14
14
  const ButtonToolbarButton = (props) => {
15
15
  var _a, _b;
16
- const t = (0, context_1.useTranslation)();
16
+ const t = (0, translations_1.useUxfTranslation)();
17
17
  const editor = (0, hooks_1.useUxfPlateEditorState)(props.plateId);
18
- return (react_1.default.createElement(modal_toolbar_button_1.ModalToolbarButton, { Modal: react_1.default.createElement(insert_button_modal_content_1.InsertButtonModalContent, { editor: editor }), className: `${CLASS_NAME} ${CLASS_NAME}-button ${(_a = props.className) !== null && _a !== void 0 ? _a : ""}`, editor: editor, iconName: (_b = props.iconName) !== null && _b !== void 0 ? _b : "rectangle-wide", pluginKey: button_1.PLUGIN_BUTTON_KEY, tooltipText: t("wysiwyg:plugins.button.tooltip") }));
18
+ return (react_1.default.createElement(modal_toolbar_button_1.ModalToolbarButton, { Modal: react_1.default.createElement(insert_button_modal_content_1.InsertButtonModalContent, { editor: editor }), className: `${CLASS_NAME} ${CLASS_NAME}-button ${(_a = props.className) !== null && _a !== void 0 ? _a : ""}`, editor: editor, iconName: (_b = props.iconName) !== null && _b !== void 0 ? _b : "rectangle-wide", pluginKey: button_1.PLUGIN_BUTTON_KEY, tooltipText: t("uxf-wysiwyg:plugins.button.tooltip") }));
19
19
  };
20
20
  exports.ButtonToolbarButton = ButtonToolbarButton;
@@ -4,17 +4,17 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.ImageToolbarButton = void 0;
7
+ const translations_1 = require("@uxf/core-react/translations");
7
8
  const react_1 = __importDefault(require("react"));
8
9
  const hooks_1 = require("../../../hooks");
9
10
  const types_1 = require("../../../plugins/image/types");
10
- const context_1 = require("../../../translations/context");
11
11
  const insert_image_modal_content_1 = require("../../image/insert-image-modal-content");
12
12
  const modal_toolbar_button_1 = require("./modal-toolbar-button");
13
13
  const CLASS_NAME = "uxf-wysiwyg__toolbar-button";
14
14
  const ImageToolbarButton = (props) => {
15
15
  var _a, _b;
16
- const t = (0, context_1.useTranslation)();
16
+ const t = (0, translations_1.useUxfTranslation)();
17
17
  const editor = (0, hooks_1.useUxfPlateEditorRef)(props.plateId);
18
- return (react_1.default.createElement(modal_toolbar_button_1.ModalToolbarButton, { Modal: react_1.default.createElement(insert_image_modal_content_1.InsertImageModalContent, { editor: editor }), className: `${CLASS_NAME} ${CLASS_NAME}-image ${(_a = props.className) !== null && _a !== void 0 ? _a : ""}`, editor: editor, iconName: (_b = props.iconName) !== null && _b !== void 0 ? _b : "image", pluginKey: types_1.IMAGE_PLUGIN_KEY, tooltipText: t("wysiwyg:plugins.image.tooltip") }));
18
+ return (react_1.default.createElement(modal_toolbar_button_1.ModalToolbarButton, { Modal: react_1.default.createElement(insert_image_modal_content_1.InsertImageModalContent, { editor: editor }), className: `${CLASS_NAME} ${CLASS_NAME}-image ${(_a = props.className) !== null && _a !== void 0 ? _a : ""}`, editor: editor, iconName: (_b = props.iconName) !== null && _b !== void 0 ? _b : "image", pluginKey: types_1.IMAGE_PLUGIN_KEY, tooltipText: t("uxf-wysiwyg:plugins.image.tooltip") }));
19
19
  };
20
20
  exports.ImageToolbarButton = ImageToolbarButton;