pds-dev-kit-web 2.2.244 → 2.2.245

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.
@@ -92,6 +92,9 @@ function LocalizedContentModal(_a) {
92
92
  var form = (0, react_hook_form_1.useForm)({
93
93
  defaultValues: initialValues
94
94
  });
95
+ var watchedValues = (0, react_hook_form_1.useWatch)({
96
+ control: form.control
97
+ });
95
98
  (0, react_1.useLayoutEffect)(function () {
96
99
  if (isOpen && initialValues) {
97
100
  form.reset(initialValues);
@@ -131,6 +134,9 @@ function LocalizedContentModal(_a) {
131
134
  }
132
135
  });
133
136
  }); };
137
+ var handleDelete = function (code) {
138
+ form.setValue(code, '');
139
+ };
134
140
  var handleApply = function () {
135
141
  var formValues = form.getValues();
136
142
  if (onApply) {
@@ -155,7 +161,7 @@ function LocalizedContentModal(_a) {
155
161
  'link insertfile image media',
156
162
  'undo redo',
157
163
  'code'
158
- ] }))), textFieldLineType !== 'tinyeditor' && ((0, jsx_runtime_1.jsx)(components_1.TextField, { responsiveMode: "use", multiRows: textFieldLineType === 'multi' ? 5 : undefined, autoMaxRows: textFieldLineType === 'auto' ? 5 : undefined, autoMinRows: textFieldLineType === 'auto' ? 1 : undefined, name: languageCode, hintText: t('str_9071'), placeholder: "Input Text", textLineType: textFieldLineType, state: readonly ? 'disabled' : 'normal' }))] })), originalFieldType === 'image' && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [!readonly && ((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.jsxs)(S_ImageUploadButtonWrapper, { children: [(0, jsx_runtime_1.jsx)(index_1.D_UploadMainButton, { text: t('str_upload'), styleTheme: "secondary", size: "small", accept: (imageConfig === null || imageConfig === void 0 ? void 0 : imageConfig.accept) || 'image/png, image/jpg, image/jpeg, image/gif', onClick: function (e) { return handleImageUpload(e, languageCode); } }), (0, jsx_runtime_1.jsx)(components_2.Spacing, { size: "spacing_b", spacingType: "width" }), (0, jsx_runtime_1.jsx)(components_1.MainButton, { text: t('str_delete'), styleTheme: "secondary", size: "small", state: form.watch(languageCode) ? 'normal' : 'disabled', onClick: function () { return form.setValue(languageCode, ''); } })] })] })), (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {}), form.watch(languageCode) && ((0, jsx_runtime_1.jsxs)("div", { 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: form.watch(languageCode) }))] })), (0, jsx_runtime_1.jsx)(components_2.Spacing, { size: "spacing_f" })] })), index < ((visibleLanguages === null || visibleLanguages === void 0 ? void 0 : visibleLanguages.length) || 0) - 1 && (0, jsx_runtime_1.jsx)(components_2.Spacing, { size: "spacing_f" })] }, "".concat(languageCode, "_field")));
164
+ ] }))), textFieldLineType !== 'tinyeditor' && ((0, jsx_runtime_1.jsx)(components_1.TextField, { responsiveMode: "use", multiRows: textFieldLineType === 'multi' ? 5 : undefined, autoMaxRows: textFieldLineType === 'auto' ? 5 : undefined, autoMinRows: textFieldLineType === 'auto' ? 1 : undefined, name: languageCode, hintText: t('str_9071'), placeholder: "Input Text", textLineType: textFieldLineType, state: readonly ? 'disabled' : 'normal' }))] })), originalFieldType === 'image' && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [!readonly && ((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.jsxs)(S_ImageUploadButtonWrapper, { children: [(0, jsx_runtime_1.jsx)(index_1.D_UploadMainButton, { text: t('str_upload'), styleTheme: "secondary", size: "small", accept: (imageConfig === null || imageConfig === void 0 ? void 0 : imageConfig.accept) || 'image/png, image/jpg, image/jpeg, image/gif', onClick: function (e) { return handleImageUpload(e, languageCode); } }), (0, jsx_runtime_1.jsx)(components_2.Spacing, { size: "spacing_b", spacingType: "width" }), (0, jsx_runtime_1.jsx)(components_1.MainButton, { text: t('str_delete'), styleTheme: "secondary", size: "small", state: (watchedValues === null || watchedValues === void 0 ? void 0 : watchedValues[languageCode]) ? 'normal' : 'disabled', onClick: function () { return handleDelete(languageCode); } })] })] })), (watchedValues === null || watchedValues === void 0 ? void 0 : watchedValues[languageCode]) && ((0, jsx_runtime_1.jsxs)("div", { 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: watchedValues === null || watchedValues === void 0 ? void 0 : watchedValues[languageCode] }))] })), (0, jsx_runtime_1.jsx)(components_2.Spacing, { size: "spacing_f" })] })), index < ((visibleLanguages === null || visibleLanguages === void 0 ? void 0 : visibleLanguages.length) || 0) - 1 && (0, jsx_runtime_1.jsx)(components_2.Spacing, { size: "spacing_f" })] }, "".concat(languageCode, "_field")));
159
165
  })] })) })));
160
166
  }
161
167
  var S_LanguageField = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n width: 100%;\n"], ["\n width: 100%;\n"])));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pds-dev-kit-web",
3
- "version": "2.2.244",
3
+ "version": "2.2.245",
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.244]
2
+ ## [v2.2.245]
3
3
  ## daily|https://design.storybook.publ.biz/
4
4
 
5
5
  ### 업데이트 사항
6
6
 
7
- * [FIX] LocalizedButton type에 LocalizedContentModal type 업데이트가 자동 반영되도록 수정
7
+ * LocalizedButton - 이미지 업로드 삭제 이미지뷰 리렌더링 되도록 수정