pds-dev-kit-web 2.2.252 → 2.2.253

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.
@@ -99,7 +99,10 @@ function LocalizedContentModal(_a) {
99
99
  if (isOpen && initialValues) {
100
100
  form.reset(initialValues);
101
101
  }
102
- }, [isOpen, initialValues]);
102
+ }, [isOpen, initialValues, form]);
103
+ var createHandleChange = (0, react_1.useCallback)(function (languageCode) { return function (value) {
104
+ form.setValue(languageCode, value);
105
+ }; }, [form]);
103
106
  var handleImageUpload = function (e, lang) { return __awaiter(_this, void 0, void 0, function () {
104
107
  var file, isValid, result, error_1;
105
108
  var _a;
@@ -147,12 +150,26 @@ function LocalizedContentModal(_a) {
147
150
  var handleCancel = function () {
148
151
  onClose();
149
152
  };
153
+ var memoizedRichEditorConfig = (0, react_1.useMemo)(function () {
154
+ return (richEditorConfig || {
155
+ toolbar: [
156
+ 'blocks',
157
+ 'bold italic underline strikethrough',
158
+ 'alignleft aligncenter alignright alignjustify',
159
+ 'outdent indent',
160
+ 'forecolor backcolor numlist bullist blockquote',
161
+ 'link insertfile image media',
162
+ 'undo redo',
163
+ 'code'
164
+ ]
165
+ });
166
+ }, [richEditorConfig]);
150
167
  if (!isOpen)
151
168
  return null;
152
169
  return ((0, jsx_runtime_1.jsx)(DesktopBasicModal_1.DesktopBasicModal, __assign({ titleText: t('str_multilingual_settings'), btnMode: readonly ? 'mbtn_amount1' : 'mbtn_amount2', mBtn1Text: readonly ? t('str_confirm') : t('str_apply'), mBtn2Text: t('str_cancel'), size: size, onClickMBtn1: handleApply, onClickMBtn2: handleCancel }, { children: (0, jsx_runtime_1.jsxs)(react_hook_form_1.FormProvider, __assign({}, form, { children: [originalText && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(components_1.TextLabel, { text: t('str_original_text'), wordBreak: "keep_all", styleTheme: "subTitleBold", colorTheme: "sysTextPrimary" }), originalFieldType === 'text' && ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: textFieldLineType === 'tinyeditor' ? ((0, jsx_runtime_1.jsx)(S_ReadonlyContent, { children: (0, jsx_runtime_1.jsx)(HTMLReader_1.HTMLReader, { data: originalText }) })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(components_2.Spacing, { size: "spacing_d" }), (0, jsx_runtime_1.jsx)(components_1.TextLabel, { text: originalText, wordBreak: "keep_all", styleTheme: "body2Regular", colorTheme: "sysTextPrimary" })] })) })), originalFieldType === 'image' && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(components_2.Spacing, { size: "spacing_d" }), (0, jsx_runtime_1.jsx)(components_3.ImageView, __assign({ width: "responsive", height: "responsive" }, imageConfig, { src: originalText }))] })), (0, jsx_runtime_1.jsx)(components_2.Spacing, { size: "spacing_f" }), (0, jsx_runtime_1.jsx)(components_2.Divider, {}), (0, jsx_runtime_1.jsx)(components_2.Spacing, { size: "spacing_f" })] })), visibleLanguages === null || visibleLanguages === void 0 ? void 0 : visibleLanguages.map(function (languageCode, index) {
153
170
  return ((0, jsx_runtime_1.jsxs)(S_LanguageField, { children: [(0, jsx_runtime_1.jsx)(components_1.TextLabel, { text: t(LANGUAGE_I18N_KEYS[languageCode]), styleTheme: "subTitleBold", colorTheme: "sysTextPrimary" }), (0, jsx_runtime_1.jsx)(components_2.Spacing, { size: "spacing_b" }), (0, jsx_runtime_1.jsx)(components_1.TextLabel, { text: t(LANGUAGE_DESC_TEXT_KEYS[languageCode]), styleTheme: "caption1Regular", colorTheme: "sysTextSecondary" }), (0, jsx_runtime_1.jsx)(components_2.Spacing, { size: "spacing_b" }), originalFieldType === 'text' && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [textFieldLineType === 'tinyeditor' && readonly && ((0, jsx_runtime_1.jsx)(AnnotationSheet_1.AnnotationSheet, __assign({ width: "100%", height: "240px", backgroundColorTheme: "base3", shapeType: "round", radius: 16, paddingTop: "spacing_d", paddingRight: "spacing_d", paddingBottom: "spacing_d", paddingLeft: "spacing_d" }, { children: (0, jsx_runtime_1.jsx)(S_ReadonlyContent, { dangerouslySetInnerHTML: {
154
171
  __html: (initialValues === null || initialValues === void 0 ? void 0 : initialValues[languageCode]) || ''
155
- } }) }))), textFieldLineType === 'tinyeditor' && !readonly && ((0, jsx_runtime_1.jsx)(components_1.RichTextEditor, __assign({}, richEditorConfig, { onChange: function (value) { return form.setValue(languageCode, value); }, defaultText: form.getValues(languageCode), toolbar: (richEditorConfig === null || richEditorConfig === void 0 ? void 0 : richEditorConfig.toolbar) || [
172
+ } }) }))), textFieldLineType === 'tinyeditor' && !readonly && ((0, jsx_runtime_1.jsx)(components_1.RichTextEditor, __assign({}, memoizedRichEditorConfig, { onChange: createHandleChange(languageCode), defaultText: initialValues === null || initialValues === void 0 ? void 0 : initialValues[languageCode], toolbar: (memoizedRichEditorConfig === null || memoizedRichEditorConfig === void 0 ? void 0 : memoizedRichEditorConfig.toolbar) || [
156
173
  'blocks',
157
174
  'bold italic underline strikethrough',
158
175
  'alignleft aligncenter alignright alignjustify',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pds-dev-kit-web",
3
- "version": "2.2.252",
3
+ "version": "2.2.253",
4
4
  "license": "MIT",
5
5
  "private": false,
6
6
  "main": "dist/index.js",
package/release-note.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # PDS-DEV-KIT-WEB Release Notes
2
- ## [v2.2.252]
2
+ ## [v2.2.253]
3
3
  ## daily|https://design.storybook.publ.biz/
4
4
 
5
5
  ### 업데이트 사항
6
6
 
7
- * [PDS-1376] ContextBubble 삭제 SpeechBubble 생성
7
+ * [PDS-1378] 다국어 설정 모달 - RichTextEditor 입력 오류