pds-dev-kit-web-test 2.5.520 → 2.5.522

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.
Files changed (336) hide show
  1. package/dist/index.d.ts +6 -6
  2. package/dist/index.js +3 -12
  3. package/dist/src/common/assets/icons/fill/index.d.ts +0 -1
  4. package/dist/src/common/assets/icons/fill/index.js +0 -2
  5. package/dist/src/common/assets/icons/line/index.d.ts +0 -1
  6. package/dist/src/common/assets/icons/line/index.js +0 -2
  7. package/dist/src/common/hooks/useTooltip.js +1 -1
  8. package/dist/src/common/index.d.ts +1 -1
  9. package/dist/src/common/services/i18n/resources/en.json +1 -59
  10. package/dist/src/common/services/i18n/resources/es.json +1 -59
  11. package/dist/src/common/services/i18n/resources/fil.json +1 -59
  12. package/dist/src/common/services/i18n/resources/index.d.ts +0 -406
  13. package/dist/src/common/services/i18n/resources/ja.json +1 -59
  14. package/dist/src/common/services/i18n/resources/ko.json +1 -59
  15. package/dist/src/common/services/i18n/resources/zh-cn.json +1 -59
  16. package/dist/src/common/services/i18n/resources/zh-tw.json +1 -59
  17. package/dist/src/common/styles/colorSet/PaletteColor_Dark.json +1 -4
  18. package/dist/src/common/styles/colorSet/PaletteColor_light.json +1 -4
  19. package/dist/src/common/styles/colorSet/UIColor.json +1 -5
  20. package/dist/src/common/styles/colorSet/index.d.ts +0 -10
  21. package/dist/src/common/styles/colorSet/ui-type.d.ts +0 -4
  22. package/dist/src/common/types/components.d.ts +0 -9
  23. package/dist/src/common/types/components.js +0 -8
  24. package/dist/src/common/types/form.d.ts +9 -0
  25. package/dist/src/common/types/form.js +10 -0
  26. package/dist/src/common/types/index.d.ts +1 -1
  27. package/dist/src/common/types/index.js +1 -1
  28. package/dist/src/common/types/text.d.ts +0 -2
  29. package/dist/src/common/utils/SystemUIPositionGenerator/hoverTypeSystemUICssGenerator.js +1 -1
  30. package/dist/src/common/utils/dateHelper.d.ts +0 -3
  31. package/dist/src/common/utils/dateHelper.js +0 -37
  32. package/dist/src/desktop/common/components/TextFieldBase/TextFieldBase.d.ts +1 -4
  33. package/dist/src/desktop/common/components/TextFieldBase/TextFieldBase.js +23 -32
  34. package/dist/src/desktop/components/AdminList/AdminList.js +11 -5
  35. package/dist/src/desktop/components/BasicButtonGroup/BasicButtonGroup.js +1 -1
  36. package/dist/src/desktop/components/BasicFormGroup/BasicFormGroup.d.ts +2 -6
  37. package/dist/src/desktop/components/BasicFormGroup/BasicFormGroup.js +6 -67
  38. package/dist/src/desktop/components/BodyTextGroup/BodyTextGroup.d.ts +1 -6
  39. package/dist/src/desktop/components/BodyTextGroup/BodyTextGroup.js +2 -70
  40. package/dist/src/desktop/components/ChatBubbleListItem/ChatBubbleListItem.d.ts +3 -2
  41. package/dist/src/desktop/components/ChatBubbleListItem/ChatBubbleListItem.js +8 -3
  42. package/dist/src/desktop/components/ChatList/Body.d.ts +1 -1
  43. package/dist/src/desktop/components/TextButton/TextButton.d.ts +1 -1
  44. package/dist/src/desktop/components/TextButton/TextButton.js +39 -56
  45. package/dist/src/desktop/components/TextField/TextField.d.ts +1 -2
  46. package/dist/src/desktop/components/TextField/TextField.js +7 -7
  47. package/dist/src/desktop/components/TextLabel/TextLabel.d.ts +3 -3
  48. package/dist/src/desktop/components/UploadTextButton/UploadTextButton.d.ts +1 -1
  49. package/dist/src/desktop/components/UploadTextButton/UploadTextButton.js +39 -56
  50. package/dist/src/desktop/components/index.d.ts +1 -6
  51. package/dist/src/desktop/components/index.js +1 -12
  52. package/dist/src/desktop/index.d.ts +1 -1
  53. package/dist/src/desktop/index.js +2 -7
  54. package/dist/src/desktop/panels/DesktopHeadlessModal/DesktopHeadlessModal.d.ts +2 -17
  55. package/dist/src/desktop/panels/DesktopHeadlessModal/DesktopHeadlessModal.js +6 -37
  56. package/dist/src/desktop/panels/index.d.ts +1 -2
  57. package/dist/src/desktop/panels/index.js +1 -6
  58. package/dist/src/hybrid/components/Divider/Divider.d.ts +1 -3
  59. package/dist/src/hybrid/components/Divider/Divider.js +7 -9
  60. package/dist/src/mobile/common/components/TextFieldBase/TextFieldBase.d.ts +1 -3
  61. package/dist/src/mobile/common/components/TextFieldBase/TextFieldBase.js +22 -26
  62. package/dist/src/mobile/components/ChatBubbleListItem/ChatBubbleListItem.d.ts +3 -2
  63. package/dist/src/mobile/components/ChatBubbleListItem/ChatBubbleListItem.js +8 -3
  64. package/dist/src/mobile/components/ChatList/Body.d.ts +1 -1
  65. package/dist/src/mobile/components/TextButton/TextButton.d.ts +1 -1
  66. package/dist/src/mobile/components/TextButton/TextButton.js +30 -44
  67. package/dist/src/mobile/components/TextField/TextField.d.ts +1 -2
  68. package/dist/src/mobile/components/TextField/TextField.js +7 -7
  69. package/dist/src/mobile/components/TextLabel/TextLabel.d.ts +3 -3
  70. package/dist/src/mobile/components/UploadTextButton/UploadTextButton.d.ts +1 -1
  71. package/dist/src/mobile/components/UploadTextButton/UploadTextButton.js +30 -44
  72. package/dist/src/mobile/components/index.d.ts +1 -5
  73. package/dist/src/mobile/components/index.js +1 -9
  74. package/dist/src/mobile/index.d.ts +1 -1
  75. package/dist/src/mobile/index.js +2 -6
  76. package/dist/src/sub/AdminList/AdminList/AdminList.js +11 -8
  77. package/dist/src/sub/DynamicLayout/CompositionEditor/CompositionEditor.d.ts +22 -0
  78. package/dist/src/sub/DynamicLayout/CompositionEditor/CompositionEditor.js +1133 -0
  79. package/dist/src/sub/DynamicLayout/CompositionRenderer/ComponentBlockMatcher.js +4 -1
  80. package/dist/src/sub/DynamicLayout/CompositionRenderer/Composition.d.ts +5 -3
  81. package/dist/src/sub/DynamicLayout/CompositionRenderer/Composition.js +53 -53
  82. package/dist/src/sub/DynamicLayout/CompositionRenderer/CompositionBackground.d.ts +11 -0
  83. package/dist/src/sub/DynamicLayout/CompositionRenderer/CompositionBackground.js +45 -0
  84. package/dist/src/sub/DynamicLayout/CompositionRenderer/createCompositions.d.ts +10 -0
  85. package/dist/src/sub/DynamicLayout/CompositionRenderer/createCompositions.js +79 -0
  86. package/dist/src/sub/DynamicLayout/DynamicLayout.d.ts +1 -1
  87. package/dist/src/sub/DynamicLayout/DynamicLayout.js +4 -2
  88. package/dist/src/sub/DynamicLayout/components/Section/components/CustomSectionBackgroundMedia.js +24 -2
  89. package/dist/src/sub/DynamicLayout/components/Section/sectionContext.d.ts +2 -2
  90. package/dist/src/sub/DynamicLayout/components/Section/util/parseSectionBackgroundMediaData.js +3 -1
  91. package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/assets/icons/line/editorNavigationIcons/downIcons.d.ts +12 -0
  92. package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/assets/icons/line/editorNavigationIcons/downIcons.js +76 -0
  93. package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/assets/icons/line/editorNavigationIcons/index.d.ts +4 -0
  94. package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/assets/icons/line/editorNavigationIcons/index.js +47 -0
  95. package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/assets/icons/line/editorNavigationIcons/leftIcons.d.ts +12 -0
  96. package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/assets/icons/line/editorNavigationIcons/leftIcons.js +76 -0
  97. package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/assets/icons/line/editorNavigationIcons/rightIcons.d.ts +12 -0
  98. package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/assets/icons/line/editorNavigationIcons/rightIcons.js +76 -0
  99. package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/assets/icons/line/editorNavigationIcons/upIcons.d.ts +12 -0
  100. package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/assets/icons/line/editorNavigationIcons/upIcons.js +76 -0
  101. package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/assets/icons/line/index.d.ts +40 -0
  102. package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/assets/icons/line/index.js +36 -177
  103. package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/styles/colorSet/PaletteColor_Dark.json +152 -4
  104. package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/styles/colorSet/PaletteColor_light.json +150 -2
  105. package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/styles/colorSet/SemanticColor.json +45 -1
  106. package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/styles/colorSet/UIColor.json +262 -9
  107. package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/styles/colorSet/index.d.ts +593 -0
  108. package/dist/src/sub/DynamicLayout/components/pdsOriginal/common/styles/colorSet/ui-type.d.ts +253 -0
  109. package/dist/src/sub/DynamicLayout/components/pdsOriginal/desktop/IconButton/IconButton.d.ts +3 -1
  110. package/dist/src/sub/DynamicLayout/components/pdsOriginal/desktop/IconButton/IconButton.js +5 -3
  111. package/dist/src/sub/DynamicLayout/components/pdsOriginal/hybrid/Icon/Icon.d.ts +2 -1
  112. package/dist/src/sub/DynamicLayout/components/pdsOriginal/hybrid/Icon/Icon.js +9 -2
  113. package/dist/src/sub/DynamicLayout/compositionActionTypes.d.ts +139 -0
  114. package/dist/src/sub/DynamicLayout/compositionQueryContext.d.ts +8 -0
  115. package/dist/src/sub/DynamicLayout/compositionQueryContext.js +14 -0
  116. package/dist/src/sub/DynamicLayout/mock_componentBlocks.d.ts +776 -0
  117. package/dist/src/sub/DynamicLayout/mock_componentBlocks.js +4236 -0
  118. package/dist/src/sub/DynamicLayout/mock_composition.d.ts +3 -0
  119. package/dist/src/sub/DynamicLayout/mock_composition.js +1607 -0
  120. package/dist/src/sub/DynamicLayout/mock_contentsCarousel.d.ts +1 -0
  121. package/dist/src/sub/DynamicLayout/mock_contentsCarousel.js +1111 -0
  122. package/dist/src/sub/DynamicLayout/mock_contentsList.d.ts +1 -0
  123. package/dist/src/sub/DynamicLayout/mock_contentsList.js +1091 -0
  124. package/dist/src/sub/DynamicLayout/mock_queryData.d.ts +96 -0
  125. package/dist/src/sub/DynamicLayout/mock_queryData.js +2639 -0
  126. package/dist/src/sub/DynamicLayout/mock_slideBanner.d.ts +842 -0
  127. package/dist/src/sub/DynamicLayout/mock_slideBanner.js +854 -0
  128. package/dist/src/sub/DynamicLayout/mock_video.d.ts +368 -0
  129. package/dist/src/sub/DynamicLayout/mock_video.js +371 -0
  130. package/dist/src/sub/DynamicLayout/mock_video_cb.d.ts +0 -1
  131. package/dist/src/sub/DynamicLayout/mock_video_cb.js +4 -5
  132. package/dist/src/sub/DynamicLayout/mocks.d.ts +8 -961
  133. package/dist/src/sub/DynamicLayout/mocks.js +55 -4239
  134. package/dist/src/sub/DynamicLayout/sectionActionTypes.d.ts +4 -4
  135. package/dist/src/sub/DynamicLayout/sections/CustomSection/CustomSection.d.ts +1 -1
  136. package/dist/src/sub/DynamicLayout/sections/CustomSection/CustomSection.js +7 -7
  137. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/ComponentBlockMatcher.js +13 -3
  138. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Button/Button.js +18 -2
  139. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/ContentsCarousel.d.ts +10 -4
  140. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/ContentsCarousel.js +134 -3
  141. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/ContentsCarouselCore.d.ts +12 -0
  142. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/ContentsCarouselCore.js +61 -0
  143. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/CustomNavigationNextBtn.d.ts +15 -0
  144. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/CustomNavigationNextBtn.js +69 -0
  145. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/CustomNavigationPrevBtn.d.ts +15 -0
  146. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/CustomNavigationPrevBtn.js +69 -0
  147. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/CustomProgressbar.d.ts +9 -0
  148. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/CustomProgressbar.js +87 -0
  149. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/navigationConfigs.d.ts +4 -0
  150. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/navigationConfigs.js +849 -0
  151. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/progressConfigs.d.ts +43 -0
  152. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/components/progressConfigs.js +162 -0
  153. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/contentsCarouselUtils.d.ts +39 -0
  154. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/contentsCarouselUtils.js +182 -0
  155. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/hooks/useFlexGridLayout.d.ts +18 -0
  156. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/hooks/useFlexGridLayout.js +229 -0
  157. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/hooks/useSwiper.d.ts +14 -0
  158. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/hooks/useSwiper.js +46 -0
  159. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/index.d.ts +1 -0
  160. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/index.js +8 -0
  161. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/types.d.ts +139 -0
  162. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/ContentsList.d.ts +14 -0
  163. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/ContentsList.js +206 -0
  164. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/ContentsListCore.d.ts +17 -0
  165. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/ContentsListCore.js +39 -0
  166. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/components/CustomPagination.d.ts +10 -0
  167. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/components/CustomPagination.js +85 -0
  168. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/components/paginationConfigs.d.ts +25 -0
  169. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/components/paginationConfigs.js +183 -0
  170. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/contentsListUtils.d.ts +29 -0
  171. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/contentsListUtils.js +128 -0
  172. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/hooks/useFlexGridLayout.d.ts +18 -0
  173. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/hooks/useFlexGridLayout.js +229 -0
  174. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/index.d.ts +1 -0
  175. package/dist/src/{desktop/panels/MultilingualModal → sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList}/index.js +3 -3
  176. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/types.d.ts +67 -0
  177. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsList/types.js +2 -0
  178. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Image/Image.js +39 -3
  179. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/SlideBanner.d.ts +14 -0
  180. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/SlideBanner.js +151 -0
  181. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/SlideBannerCore.d.ts +12 -0
  182. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/SlideBannerCore.js +39 -0
  183. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/CustomNavigationNextBtn.d.ts +15 -0
  184. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/CustomNavigationNextBtn.js +69 -0
  185. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/CustomNavigationPrevBtn.d.ts +15 -0
  186. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/CustomNavigationPrevBtn.js +69 -0
  187. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/CustomPagination.d.ts +20 -0
  188. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/CustomPagination.js +173 -0
  189. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/CustomProgressbar.d.ts +9 -0
  190. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/CustomProgressbar.js +87 -0
  191. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/navigationConfigs.d.ts +4 -0
  192. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/navigationConfigs.js +849 -0
  193. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/progressConfigs.d.ts +43 -0
  194. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/components/progressConfigs.js +162 -0
  195. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/hooks/useFlexGridLayout.d.ts +18 -0
  196. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/hooks/useFlexGridLayout.js +229 -0
  197. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/hooks/useSwiper.d.ts +16 -0
  198. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/hooks/useSwiper.js +63 -0
  199. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/index.d.ts +1 -0
  200. package/dist/src/{desktop/components/Snackbar → sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner}/index.js +3 -3
  201. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/slideBannerUtils.d.ts +46 -0
  202. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/slideBannerUtils.js +186 -0
  203. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/types.d.ts +163 -0
  204. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/SlideBanner/types.js +2 -0
  205. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Text/Text.js +38 -7
  206. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Text/textSpecFormatOptions.d.ts +7 -0
  207. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Text/textSpecFormatOptions.js +211 -0
  208. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/VideoPlayer/VideoPlayer.js +3 -28
  209. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/VideoPlayer/helper.d.ts +0 -1
  210. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/VideoPlayer/helper.js +5 -15
  211. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/types.d.ts +49 -3
  212. package/dist/src/sub/DynamicLayout/sections/CustomSection/newUtils/group.d.ts +1 -1
  213. package/dist/src/sub/DynamicLayout/sections/CustomSection/newUtils/replaceUndefinedValues.js +1 -1
  214. package/dist/src/sub/DynamicLayout/sections/CustomSection/types.d.ts +27 -10
  215. package/dist/src/sub/DynamicLayout/sections/CustomSection/types.js +3 -1
  216. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/effectPropParsers/parseEffectPropEntAnim.d.ts +4 -4
  217. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/layoutPropParsers/parseLayoutPropPadding.d.ts +2 -2
  218. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/parseCompositionPlacement.d.ts +14 -0
  219. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/parseCompositionPlacement.js +26 -0
  220. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/parseJsonProperties.d.ts +2 -2
  221. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/parsePlacement.d.ts +7 -2
  222. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/parsePlacement.js +10 -5
  223. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/parseProperties.d.ts +2 -2
  224. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/parseStylePropTextSpec.js +2 -0
  225. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/types.d.ts +53 -3
  226. package/dist/src/sub/DynamicLayout/sections/FlexGridCustomSection.d.ts +1 -1
  227. package/dist/src/sub/DynamicLayout/sections/FlexGridCustomSection.js +1 -0
  228. package/dist/src/sub/DynamicLayout/types.d.ts +64 -17
  229. package/package.json +3 -2
  230. package/release-note.md +2 -2
  231. package/dist/src/common/assets/icons/fill/Translate.d.ts +0 -4
  232. package/dist/src/common/assets/icons/fill/Translate.js +0 -30
  233. package/dist/src/common/assets/icons/line/Translate.d.ts +0 -4
  234. package/dist/src/common/assets/icons/line/Translate.js +0 -30
  235. package/dist/src/common/types/multilingual.d.ts +0 -16
  236. package/dist/src/core/pricing/formatter.d.ts +0 -4
  237. package/dist/src/core/pricing/formatter.js +0 -18
  238. package/dist/src/core/pricing/index.d.ts +0 -2
  239. package/dist/src/core/pricing/index.js +0 -18
  240. package/dist/src/core/pricing/policy.d.ts +0 -26
  241. package/dist/src/core/pricing/policy.js +0 -98
  242. package/dist/src/core/pricing/service.d.ts +0 -62
  243. package/dist/src/core/pricing/service.js +0 -157
  244. package/dist/src/core/pricing/translator.d.ts +0 -27
  245. package/dist/src/core/pricing/translator.js +0 -53
  246. package/dist/src/core/pricing/types.d.ts +0 -19
  247. package/dist/src/core/pricing/types.js +0 -31
  248. package/dist/src/core/pricing/validator.d.ts +0 -29
  249. package/dist/src/core/pricing/validator.js +0 -105
  250. package/dist/src/desktop/components/BoxItem/BoxItem.d.ts +0 -67
  251. package/dist/src/desktop/components/BoxItem/BoxItem.js +0 -107
  252. package/dist/src/desktop/components/BoxItem/LeftBox/Checkbox.d.ts +0 -7
  253. package/dist/src/desktop/components/BoxItem/LeftBox/Checkbox.js +0 -9
  254. package/dist/src/desktop/components/BoxItem/LeftBox/Image.d.ts +0 -11
  255. package/dist/src/desktop/components/BoxItem/LeftBox/Image.js +0 -9
  256. package/dist/src/desktop/components/BoxItem/LeftBox/LeftBox.d.ts +0 -11
  257. package/dist/src/desktop/components/BoxItem/LeftBox/LeftBox.js +0 -36
  258. package/dist/src/desktop/components/BoxItem/LeftBox/index.d.ts +0 -2
  259. package/dist/src/desktop/components/BoxItem/LeftBox/index.js +0 -8
  260. package/dist/src/desktop/components/BoxItem/index.d.ts +0 -1
  261. package/dist/src/desktop/components/BoxItem/index.js +0 -8
  262. package/dist/src/desktop/components/Calendar/AllDaySchedulesSection.d.ts +0 -13
  263. package/dist/src/desktop/components/Calendar/AllDaySchedulesSection.js +0 -132
  264. package/dist/src/desktop/components/Calendar/Calendar.d.ts +0 -4
  265. package/dist/src/desktop/components/Calendar/Calendar.js +0 -397
  266. package/dist/src/desktop/components/Calendar/CurrentTimeIndicator.d.ts +0 -7
  267. package/dist/src/desktop/components/Calendar/CurrentTimeIndicator.js +0 -48
  268. package/dist/src/desktop/components/Calendar/DailyView.d.ts +0 -19
  269. package/dist/src/desktop/components/Calendar/DailyView.js +0 -90
  270. package/dist/src/desktop/components/Calendar/MonthlyView.d.ts +0 -29
  271. package/dist/src/desktop/components/Calendar/MonthlyView.js +0 -314
  272. package/dist/src/desktop/components/Calendar/MultiWeekSchedulesLayer.d.ts +0 -20
  273. package/dist/src/desktop/components/Calendar/MultiWeekSchedulesLayer.js +0 -155
  274. package/dist/src/desktop/components/Calendar/ScheduleItem.d.ts +0 -17
  275. package/dist/src/desktop/components/Calendar/ScheduleItem.js +0 -56
  276. package/dist/src/desktop/components/Calendar/TimeBasedScheduleItem.d.ts +0 -12
  277. package/dist/src/desktop/components/Calendar/TimeBasedScheduleItem.js +0 -184
  278. package/dist/src/desktop/components/Calendar/WeeklyView.d.ts +0 -24
  279. package/dist/src/desktop/components/Calendar/WeeklyView.js +0 -118
  280. package/dist/src/desktop/components/Calendar/YearlyView.d.ts +0 -12
  281. package/dist/src/desktop/components/Calendar/YearlyView.js +0 -76
  282. package/dist/src/desktop/components/Calendar/calendarUtils.d.ts +0 -24
  283. package/dist/src/desktop/components/Calendar/calendarUtils.js +0 -87
  284. package/dist/src/desktop/components/Calendar/constants.d.ts +0 -1
  285. package/dist/src/desktop/components/Calendar/constants.js +0 -31
  286. package/dist/src/desktop/components/Calendar/index.d.ts +0 -10
  287. package/dist/src/desktop/components/Calendar/index.js +0 -37
  288. package/dist/src/desktop/components/Calendar/timeFormatUtils.d.ts +0 -16
  289. package/dist/src/desktop/components/Calendar/timeFormatUtils.js +0 -45
  290. package/dist/src/desktop/components/Calendar/types.d.ts +0 -61
  291. package/dist/src/desktop/components/PriceTextField/PriceTextField.d.ts +0 -42
  292. package/dist/src/desktop/components/PriceTextField/PriceTextField.js +0 -583
  293. package/dist/src/desktop/components/PriceTextField/index.d.ts +0 -1
  294. package/dist/src/desktop/components/PriceTextField/index.js +0 -8
  295. package/dist/src/desktop/components/PriceTextLabel/PriceTextLabel.d.ts +0 -14
  296. package/dist/src/desktop/components/PriceTextLabel/PriceTextLabel.js +0 -47
  297. package/dist/src/desktop/components/PriceTextLabel/index.d.ts +0 -1
  298. package/dist/src/desktop/components/PriceTextLabel/index.js +0 -8
  299. package/dist/src/desktop/components/Snackbar/Snackbar.d.ts +0 -17
  300. package/dist/src/desktop/components/Snackbar/Snackbar.js +0 -221
  301. package/dist/src/desktop/components/Snackbar/index.d.ts +0 -1
  302. package/dist/src/desktop/components/Snackbar/provider.d.ts +0 -11
  303. package/dist/src/desktop/components/Snackbar/provider.js +0 -43
  304. package/dist/src/desktop/panels/MultilingualModal/MultilingualModal.d.ts +0 -11
  305. package/dist/src/desktop/panels/MultilingualModal/MultilingualModal.js +0 -199
  306. package/dist/src/desktop/panels/MultilingualModal/index.d.ts +0 -1
  307. package/dist/src/mobile/components/BoxItem/BoxItem.d.ts +0 -67
  308. package/dist/src/mobile/components/BoxItem/BoxItem.js +0 -106
  309. package/dist/src/mobile/components/BoxItem/LeftBox/Checkbox.d.ts +0 -7
  310. package/dist/src/mobile/components/BoxItem/LeftBox/Checkbox.js +0 -9
  311. package/dist/src/mobile/components/BoxItem/LeftBox/Image.d.ts +0 -11
  312. package/dist/src/mobile/components/BoxItem/LeftBox/Image.js +0 -9
  313. package/dist/src/mobile/components/BoxItem/LeftBox/LeftBox.d.ts +0 -11
  314. package/dist/src/mobile/components/BoxItem/LeftBox/LeftBox.js +0 -36
  315. package/dist/src/mobile/components/BoxItem/LeftBox/index.d.ts +0 -2
  316. package/dist/src/mobile/components/BoxItem/LeftBox/index.js +0 -8
  317. package/dist/src/mobile/components/BoxItem/index.d.ts +0 -1
  318. package/dist/src/mobile/components/BoxItem/index.js +0 -8
  319. package/dist/src/mobile/components/PriceTextField/PriceTextField.d.ts +0 -41
  320. package/dist/src/mobile/components/PriceTextField/PriceTextField.js +0 -570
  321. package/dist/src/mobile/components/PriceTextField/index.d.ts +0 -1
  322. package/dist/src/mobile/components/PriceTextField/index.js +0 -8
  323. package/dist/src/mobile/components/PriceTextLabel/PriceTextLabel.d.ts +0 -14
  324. package/dist/src/mobile/components/PriceTextLabel/PriceTextLabel.js +0 -47
  325. package/dist/src/mobile/components/PriceTextLabel/index.d.ts +0 -1
  326. package/dist/src/mobile/components/PriceTextLabel/index.js +0 -8
  327. package/dist/src/mobile/components/Snackbar/Snackbar.d.ts +0 -17
  328. package/dist/src/mobile/components/Snackbar/Snackbar.js +0 -221
  329. package/dist/src/mobile/components/Snackbar/index.d.ts +0 -1
  330. package/dist/src/mobile/components/Snackbar/index.js +0 -8
  331. package/dist/src/mobile/components/Snackbar/provider.d.ts +0 -11
  332. package/dist/src/mobile/components/Snackbar/provider.js +0 -43
  333. package/dist/src/sub/DynamicLayout/CompositionRenderer/CompositionRenderer.d.ts +0 -6
  334. package/dist/src/sub/DynamicLayout/CompositionRenderer/CompositionRenderer.js +0 -27
  335. /package/dist/src/{common/types/multilingual.js → sub/DynamicLayout/compositionActionTypes.js} +0 -0
  336. /package/dist/src/{desktop/components/Calendar → sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel}/types.js +0 -0
@@ -1,570 +0,0 @@
1
- "use strict";
2
- var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
3
- if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
4
- return cooked;
5
- };
6
- var __assign = (this && this.__assign) || function () {
7
- __assign = Object.assign || function(t) {
8
- for (var s, i = 1, n = arguments.length; i < n; i++) {
9
- s = arguments[i];
10
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
11
- t[p] = s[p];
12
- }
13
- return t;
14
- };
15
- return __assign.apply(this, arguments);
16
- };
17
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
18
- if (k2 === undefined) k2 = k;
19
- var desc = Object.getOwnPropertyDescriptor(m, k);
20
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
21
- desc = { enumerable: true, get: function() { return m[k]; } };
22
- }
23
- Object.defineProperty(o, k2, desc);
24
- }) : (function(o, m, k, k2) {
25
- if (k2 === undefined) k2 = k;
26
- o[k2] = m[k];
27
- }));
28
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
29
- Object.defineProperty(o, "default", { enumerable: true, value: v });
30
- }) : function(o, v) {
31
- o["default"] = v;
32
- });
33
- var __importStar = (this && this.__importStar) || function (mod) {
34
- if (mod && mod.__esModule) return mod;
35
- var result = {};
36
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
37
- __setModuleDefault(result, mod);
38
- return result;
39
- };
40
- var __importDefault = (this && this.__importDefault) || function (mod) {
41
- return (mod && mod.__esModule) ? mod : { "default": mod };
42
- };
43
- Object.defineProperty(exports, "__esModule", { value: true });
44
- exports.DEFAULT_DECIMAL_PLACES = void 0;
45
- var jsx_runtime_1 = require("react/jsx-runtime");
46
- /* eslint-disable react/jsx-no-bind */
47
- var react_1 = require("react");
48
- var react_dom_1 = require("react-dom");
49
- var react_hook_form_1 = require("react-hook-form");
50
- var react_i18next_1 = require("react-i18next");
51
- var types_1 = require("../../../common/types");
52
- var clickTypeSystemUICssGenerator_1 = __importDefault(require("../../../common/utils/SystemUIPositionGenerator/clickTypeSystemUICssGenerator"));
53
- var pricing_1 = require("../../../core/pricing");
54
- var styled_components_1 = __importStar(require("styled-components"));
55
- var transitionStyle_1 = require("../../../common/styles/movement/transitionStyle");
56
- var hybrid_1 = require("../../../hybrid");
57
- var components_1 = require("../../common/components");
58
- var ContextMenu_1 = require("../ContextMenu");
59
- var ContextMenuItem_1 = require("../ContextMenuItem");
60
- var TextLabel_1 = require("../TextLabel");
61
- exports.DEFAULT_DECIMAL_PLACES = {
62
- KRW: 0,
63
- USD: 2
64
- };
65
- function PriceTextField(_a) {
66
- var _b;
67
- var _c;
68
- var name = _a.name, hintText = _a.hintText, defaultAmount = _a.defaultAmount, _d = _a.colorTheme, colorTheme = _d === void 0 ? 'none' : _d, _e = _a.size, size = _e === void 0 ? 'large' : _e, _f = _a.fontWeight, fontWeight = _f === void 0 ? 'bold' : _f, _g = _a.hintTextFontWeight, hintTextFontWeight = _g === void 0 ? 'normal' : _g, _h = _a.responsiveMode, responsiveMode = _h === void 0 ? 'none' : _h, _j = _a.state, state = _j === void 0 ? 'normal' : _j, _k = _a.dropdownState, dropdownState = _k === void 0 ? 'normal' : _k, customWidth = _a.customWidth, _l = _a.baseCurrency, baseCurrency = _l === void 0 ? pricing_1.CurrencyCode.KRW : _l, _m = _a.currencies, currencies = _m === void 0 ? [pricing_1.CurrencyCode.KRW, pricing_1.CurrencyCode.USD] : _m, _o = _a.decimalPlaces, decimalPlaces = _o === void 0 ? exports.DEFAULT_DECIMAL_PLACES : _o, _p = _a.exchangeRates, exchangeRates = _p === void 0 ? (_b = {}, _b[pricing_1.CurrencyCode.KRW] = 1300, _b[pricing_1.CurrencyCode.USD] = 1, _b) : _p, _q = _a.textAlign, textAlign = _q === void 0 ? 'right' : _q, validation = _a.validation, _r = _a.useRequiredValidation, useRequiredValidation = _r === void 0 ? 'use' : _r, _s = _a.returnType, returnType = _s === void 0 ? 'object' : _s, _t = _a.deleteBtnMode, deleteBtnMode = _t === void 0 ? 'use' : _t, minPriceAmount = _a.minPriceAmount, onChange = _a.onChange, onBlur = _a.onBlur, onFocus = _a.onFocus, onTarget = _a.onTarget, onCurrencyChange = _a.onCurrencyChange, onValueChange = _a.onValueChange;
69
- var t = (0, react_i18next_1.useTranslation)('translation').t;
70
- var _u = (0, react_1.useState)(defaultAmount ? String(defaultAmount) : ''), baseCurrencyValue = _u[0], setBaseCurrencyValue = _u[1];
71
- var _v = (0, react_1.useState)(''), displayValue = _v[0], setDisplayValue = _v[1];
72
- var _w = (0, react_1.useState)(baseCurrency), selectedCurrency = _w[0], setSelectedCurrency = _w[1];
73
- var _x = (0, react_1.useState)(false), isDropdownFocused = _x[0], setIsDropdownFocused = _x[1];
74
- var _y = (0, react_1.useState)(false), isInputFocused = _y[0], setIsInputFocused = _y[1];
75
- var _z = (0, react_1.useState)(null), contextMenuSizeOffset = _z[0], setContextMenuSizeOffset = _z[1];
76
- var _0 = (0, react_1.useState)(null), dropdownPositionOffset = _0[0], setDropdownPositionOffset = _0[1];
77
- var contextMenuRef = (0, react_1.useRef)(null);
78
- var dropdownRef = (0, react_1.useRef)(null);
79
- var _1 = (0, react_hook_form_1.useFormContext)(), register = _1.register, trigger = _1.trigger, errors = _1.formState.errors, setValue = _1.setValue;
80
- /** 기본 validation */
81
- var defaultValidation = (0, react_1.useMemo)(function () {
82
- var validationConfig = {};
83
- // Required validation
84
- if (useRequiredValidation === 'use') {
85
- validationConfig.required = t('str_please_enter_price');
86
- }
87
- validationConfig.validate = {};
88
- // Min validation (기본값: KRW 300, USD 5)
89
- validationConfig.validate.min = function (value) {
90
- var minAmount = baseCurrency === pricing_1.CurrencyCode.KRW ? 300 : 5;
91
- return pricing_1.PricingService.validate.min(value, {
92
- minAmount: minAmount,
93
- currency: baseCurrency
94
- });
95
- };
96
- // Max validation (기본값: KRW 10,000,000, USD 10,000)
97
- validationConfig.validate.max = function (value) {
98
- var maxAmount = baseCurrency === pricing_1.CurrencyCode.KRW ? 10000000 : 10000.0;
99
- return pricing_1.PricingService.validate.max(value, {
100
- maxAmount: maxAmount,
101
- currency: baseCurrency
102
- });
103
- };
104
- // Format validation (기본값: KRW 100, USD 1)
105
- validationConfig.validate.format = function (value) {
106
- return pricing_1.PricingService.validate.format(value, {
107
- paymentUnit: baseCurrency === pricing_1.CurrencyCode.KRW ? 100 : 1,
108
- currency: baseCurrency
109
- });
110
- };
111
- return validationConfig;
112
- }, [useRequiredValidation, baseCurrency]);
113
- /** 최종 validation */
114
- var finalValidation = (0, react_1.useMemo)(function () {
115
- if (!validation) {
116
- return defaultValidation;
117
- }
118
- var merged = {
119
- required: defaultValidation.required,
120
- validate: __assign({}, defaultValidation.validate)
121
- };
122
- // required 오버라이드
123
- if (validation.required !== undefined) {
124
- merged.required = validation.required;
125
- }
126
- // validate 오버라이드
127
- if (validation.validate) {
128
- Object.keys(validation.validate).forEach(function (key) {
129
- if (validation.validate[key]) {
130
- merged.validate[key] = validation.validate[key];
131
- }
132
- });
133
- }
134
- return merged;
135
- }, [defaultValidation, validation]);
136
- var validateOnChange = register(name, finalValidation).onChange;
137
- var isError = (0, types_1.getErrorByName)(errors, name);
138
- var deleteIconColor = 'ui_cpnt_button_icon_disabled';
139
- switch (colorTheme) {
140
- case 'dark': {
141
- deleteIconColor = 'ui_cpnt_textfield_icon_darktheme_disabled';
142
- break;
143
- }
144
- case 'transparent': {
145
- deleteIconColor = 'ui_cpnt_textfield_icon_colortheme_transparent_disabled';
146
- break;
147
- }
148
- }
149
- // 입력 필드 읽기 전용 여부 (baseCurrency가 아닌 경우)
150
- var isInputReadOnly = selectedCurrency !== baseCurrency;
151
- var currencyOptions = (0, react_1.useMemo)(function () {
152
- return currencies.map(function (currency) { return ({
153
- value: currency,
154
- text: currency,
155
- currency: currency,
156
- iconName: "ic_currency_".concat(currency.toLowerCase()),
157
- state: 'normal'
158
- }); });
159
- }, [currencies]);
160
- var contextMenuPositionCss = (0, clickTypeSystemUICssGenerator_1.default)({
161
- sizeOffset: contextMenuSizeOffset,
162
- positionOffset: dropdownPositionOffset
163
- });
164
- function formatCurrency(value, currency, decimalPlaces) {
165
- if (currency === void 0) { currency = 'KRW'; }
166
- var decimals;
167
- if (decimalPlaces && decimalPlaces[currency] !== undefined) {
168
- decimals = decimalPlaces[currency];
169
- }
170
- else {
171
- switch (currency) {
172
- case 'KRW':
173
- decimals = 0;
174
- break;
175
- case 'USD':
176
- decimals = 2;
177
- break;
178
- default:
179
- decimals = 0;
180
- break;
181
- }
182
- }
183
- var str = Number(value).toFixed(decimals);
184
- if (decimals) {
185
- return str.replace(/(\d)(?=(\d{3})+\.)/g, '$1,');
186
- }
187
- return str.replace(/(\d)(?=(\d{3})+$)/g, '$1,');
188
- }
189
- var removeCommas = function (value) {
190
- return value.replace(/,/g, '');
191
- };
192
- // 환율 계산된 값 계산 (항상 baseCurrency 기준으로)
193
- var calculatedValue = (0, react_1.useMemo)(function () {
194
- if (selectedCurrency === baseCurrency) {
195
- return Number(baseCurrencyValue);
196
- }
197
- return pricing_1.PricingService.exchangePrice(Number(baseCurrencyValue), baseCurrency, selectedCurrency, exchangeRates);
198
- }, [baseCurrencyValue, selectedCurrency, baseCurrency]);
199
- /** 표시되는 값 설정 */
200
- (0, react_1.useEffect)(function () {
201
- if (isInputFocused && selectedCurrency === baseCurrency) {
202
- setDisplayValue(addCommas(baseCurrencyValue) || '');
203
- }
204
- else if (!baseCurrencyValue || baseCurrencyValue === '') {
205
- setDisplayValue('');
206
- }
207
- else {
208
- setDisplayValue(formatCurrency(calculatedValue, selectedCurrency, decimalPlaces));
209
- }
210
- }, [
211
- baseCurrencyValue,
212
- calculatedValue,
213
- selectedCurrency,
214
- isInputFocused,
215
- baseCurrency,
216
- decimalPlaces
217
- ]);
218
- /** 드롭다운 위치 업데이트 */
219
- (0, react_1.useEffect)(function () {
220
- if (!isDropdownFocused && contextMenuRef.current) {
221
- setContextMenuSizeOffset(null);
222
- return;
223
- }
224
- if (dropdownRef.current) {
225
- var _a = dropdownRef.current.getBoundingClientRect(), top_1 = _a.top, right = _a.right, left = _a.left, bottom = _a.bottom;
226
- setDropdownPositionOffset({
227
- top: top_1 + window.scrollY,
228
- right: right + window.scrollX,
229
- bottom: bottom + window.scrollY,
230
- left: left + window.scrollX
231
- });
232
- }
233
- if (contextMenuRef.current) {
234
- setContextMenuSizeOffset({
235
- height: contextMenuRef.current.offsetHeight,
236
- width: contextMenuRef.current.offsetWidth
237
- });
238
- }
239
- }, [isDropdownFocused]);
240
- /** 포맷팅 값 */
241
- var formattedValue = (0, react_1.useMemo)(function () {
242
- if (!baseCurrencyValue || baseCurrencyValue === '') {
243
- return '';
244
- }
245
- return formatCurrency(calculatedValue || 0, selectedCurrency, decimalPlaces);
246
- }, [baseCurrencyValue, calculatedValue, selectedCurrency, decimalPlaces]);
247
- /** returnType에 따른 폼 값 */
248
- var formValue = (0, react_1.useMemo)(function () {
249
- if (!baseCurrencyValue || baseCurrencyValue === '') {
250
- return '';
251
- }
252
- switch (returnType) {
253
- case 'string':
254
- return formattedValue;
255
- case 'rawValue':
256
- return baseCurrencyValue;
257
- case 'object':
258
- default:
259
- return formattedValue;
260
- }
261
- }, [baseCurrencyValue, formattedValue, returnType]);
262
- /** 폼 값 업데이트 */
263
- (0, react_1.useEffect)(function () {
264
- setValue(name, formValue);
265
- }, [name, setValue, formValue]);
266
- /** onChange 콜백 처리 */
267
- (0, react_1.useEffect)(function () {
268
- if (!onChange)
269
- return;
270
- if (!baseCurrencyValue || baseCurrencyValue === '') {
271
- onChange('');
272
- return;
273
- }
274
- var callbackValue = returnType === 'object' ? formattedValue : formValue;
275
- onChange(callbackValue);
276
- }, [onChange, baseCurrencyValue, formattedValue, formValue, returnType]);
277
- /** onValueChange 콜백 처리 */
278
- (0, react_1.useEffect)(function () {
279
- if (!onValueChange)
280
- return;
281
- if (!baseCurrencyValue || baseCurrencyValue === '') {
282
- return;
283
- }
284
- onValueChange({
285
- selectedCurrency: selectedCurrency,
286
- baseCurrencyValue: Number(baseCurrencyValue),
287
- calculatedValue: calculatedValue || 0,
288
- displayValue: formattedValue
289
- });
290
- }, [baseCurrencyValue, selectedCurrency, calculatedValue, formattedValue]);
291
- /** 입력 시 천 단위 콤마 추가 함수 */
292
- var addCommas = function (value) {
293
- if (!value)
294
- return '';
295
- var parts = value.split('.');
296
- var integerPart = parts[0];
297
- var decimalPart = parts[1];
298
- // 정수 부분에 콤마 추가
299
- var formattedInteger = integerPart.replace(/\B(?=(\d{3})+(?!\d))/g, ',');
300
- // 소수점이 있으면 합치기
301
- return decimalPart !== undefined ? "".concat(formattedInteger, ".").concat(decimalPart) : formattedInteger;
302
- };
303
- var handleChange = function (e) {
304
- var _a = e.target, value = _a.value, selectionStart = _a.selectionStart;
305
- var prevValue = displayValue;
306
- if (selectedCurrency !== baseCurrency) {
307
- return;
308
- }
309
- var cleanValue = removeCommas(value);
310
- if (cleanValue === '' || /^\d*\.?\d*$/.test(cleanValue)) {
311
- setBaseCurrencyValue(cleanValue);
312
- validateOnChange(__assign(__assign({}, e), { target: __assign(__assign({}, e.target), { value: cleanValue }) }));
313
- setTimeout(function () {
314
- var input = e.target;
315
- if (input && selectionStart !== null) {
316
- var currentValue = input.value;
317
- var commaCount = (currentValue.match(/,/g) || []).length;
318
- var prevCommaCount = (prevValue.match(/,/g) || []).length;
319
- var newPosition = selectionStart + (commaCount - prevCommaCount);
320
- input.setSelectionRange(newPosition, newPosition);
321
- }
322
- }, 0);
323
- }
324
- };
325
- var handleBlur = function (e) {
326
- setIsInputFocused(false);
327
- if (selectedCurrency === baseCurrency && baseCurrencyValue) {
328
- var allowedDecimals = decimalPlaces[selectedCurrency];
329
- var numericValue = Number(baseCurrencyValue);
330
- if (isNaN(numericValue)) {
331
- setBaseCurrencyValue('');
332
- return;
333
- }
334
- var decimalCheckedValue = void 0;
335
- if (allowedDecimals === 0) {
336
- decimalCheckedValue = Math.round(Number(baseCurrencyValue)).toString();
337
- }
338
- else {
339
- decimalCheckedValue = numericValue.toFixed(allowedDecimals);
340
- }
341
- setBaseCurrencyValue(decimalCheckedValue);
342
- setValue(name, decimalCheckedValue, { shouldValidate: true });
343
- }
344
- if (onBlur) {
345
- onBlur(e);
346
- }
347
- trigger(name);
348
- };
349
- var handleFocus = function (e) {
350
- if (state !== 'read_only' && !isInputReadOnly) {
351
- setIsInputFocused(true);
352
- }
353
- if (onFocus) {
354
- onFocus(e);
355
- }
356
- };
357
- function handleTarget() {
358
- if (onTarget) {
359
- onTarget();
360
- }
361
- }
362
- var getArrowIconColorKey = function () {
363
- if (colorTheme === 'dark') {
364
- if (dropdownState === 'disabled' || dropdownState === 'read_only') {
365
- return 'ui_cpnt_dropdown_text_darktheme_disabled';
366
- }
367
- return 'ui_cpnt_dropdown_icon_darktheme_default';
368
- }
369
- if (colorTheme === 'transparent') {
370
- if (dropdownState === 'disabled' || dropdownState === 'read_only') {
371
- return 'ui_cpnt_dropdown_icon_02';
372
- }
373
- return 'ui_cpnt_dropdown_icon_white_default';
374
- }
375
- if (dropdownState === 'disabled' || dropdownState === 'read_only') {
376
- return 'ui_cpnt_dropdown_icon_02';
377
- }
378
- return 'ui_cpnt_dropdown_icon_01';
379
- };
380
- var getDropdownContextMenuCustomWidth = function () {
381
- var _a;
382
- if (customWidth) {
383
- return customWidth;
384
- }
385
- if ((_a = dropdownRef.current) === null || _a === void 0 ? void 0 : _a.offsetWidth) {
386
- return "".concat(dropdownRef.current.offsetWidth, "px");
387
- }
388
- return '';
389
- };
390
- var handleDropdownClick = function () {
391
- if (dropdownState === 'disabled' || dropdownState === 'read_only') {
392
- return;
393
- }
394
- setIsDropdownFocused(!isDropdownFocused);
395
- };
396
- var handleDropdownBlur = function () {
397
- if (isDropdownFocused) {
398
- setIsDropdownFocused(false);
399
- }
400
- setIsInputFocused(false);
401
- };
402
- var handleCurrencySelect = function (option) {
403
- setIsDropdownFocused(false);
404
- var newCurrency = option.currency;
405
- // 통화 변경 시에는 baseCurrencyValue는 그대로 유지하고 selectedCurrency만 변경
406
- setSelectedCurrency(newCurrency);
407
- if (onCurrencyChange) {
408
- onCurrencyChange(newCurrency);
409
- }
410
- };
411
- var handleDelete = (0, react_1.useCallback)(function () {
412
- setBaseCurrencyValue('');
413
- setDisplayValue('');
414
- setValue(name, '');
415
- }, [name, setValue]);
416
- return ((0, jsx_runtime_1.jsxs)(S_PriceTextField, __assign({ "x-pds-name": "PriceTextField", "x-pds-element-type": "component", "x-pds-device-type": "mobile", inputSize: size, responsiveMode: responsiveMode, customWidth: customWidth }, { children: [(0, jsx_runtime_1.jsxs)(S_ComponentBox, __assign({ inputSize: size, responsiveMode: responsiveMode, isFocused: isInputFocused, isError: Boolean(isError), state: state, customWidth: customWidth, isInputReadOnly: isInputReadOnly }, { children: [(0, jsx_runtime_1.jsx)(S_TextFieldBaseWrapper, __assign({ state: state, isError: Boolean(isError), isFocused: isInputFocused, inputSize: size, isInputReadOnly: isInputReadOnly }, { children: (0, jsx_runtime_1.jsx)(components_1.TextFieldBase, { name: name, hintText: hintText ||
417
- t('str_channel_min_price', {
418
- channelMinPrice: pricing_1.PricingService.format.price({
419
- amount: minPriceAmount || (baseCurrency === pricing_1.CurrencyCode.KRW ? 300 : 5),
420
- currency: baseCurrency
421
- })
422
- }), value: displayValue, textAlign: textAlign, validation: finalValidation, textLineType: "single", inputType: "text", inputMode: "decimal", preventBlankMode: "all", enterSubmitMode: "none", state: isInputReadOnly ? 'read_only' : state, colorTheme: colorTheme, textSize: "form2", textWeight: fontWeight === 'bold' ? 'bold' : 'normal', hintTextWeight: hintTextFontWeight === 'bold' ? 'bold' : 'normal', fieldPaddingRight: size === 'large' || size === 'rlarge' ? 12 : undefined, deleteIconMode: deleteBtnMode, deleteIconSize: size === 'large' || size === 'rlarge' ? 20 : 16, deleteIconColor: deleteIconColor, isFocused: isInputFocused, suffixTextRightSpacingMode: size === 'large' || size === 'rlarge' ? 'use' : 'none', onChange: handleChange, onFocus: handleFocus, onBlur: handleBlur, onTarget: handleTarget, onDelete: handleDelete }) })), (0, jsx_runtime_1.jsx)(S_DropdownWrapper, __assign({ ref: dropdownRef, inputSize: size, onClick: handleDropdownClick, onBlur: handleDropdownBlur, tabIndex: 0, isFocused: isDropdownFocused, state: dropdownState, isError: Boolean(isError) }, { children: (0, jsx_runtime_1.jsxs)(S_Select, __assign({ inputSize: size }, { children: [selectedCurrency === baseCurrency && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(S_Badge, {}), (0, jsx_runtime_1.jsx)(hybrid_1.Spacing, { size: "spacing_a", spacingType: "width" })] })), (0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: selectedCurrency, styleTheme: "form2Regular", singleLineMode: "use", colorTheme: "sysTextPrimary", ellipsisMode: "use", lineLimit: 1 }), (0, jsx_runtime_1.jsx)(hybrid_1.Spacing, { size: "spacing_a", spacingType: "width" }), (0, jsx_runtime_1.jsx)(hybrid_1.Icon, { size: 16, fillType: "line", iconName: isDropdownFocused ? 'ic_arrow_up' : 'ic_arrow_down', colorKey: getArrowIconColorKey() })] })) }))] })), isDropdownFocused &&
423
- (0, react_dom_1.createPortal)((0, jsx_runtime_1.jsx)(S_ContextMenuWrapper, __assign({ ref: contextMenuRef, contextMenuPositionCss: contextMenuPositionCss }, { children: (0, jsx_runtime_1.jsx)(ContextMenu_1.ContextMenu, __assign({ autoWidthMode: "use", customWidth: getDropdownContextMenuCustomWidth() }, { children: currencyOptions.map(function (el) { return ((0, jsx_runtime_1.jsx)("div", __assign({ onMouseDown: function () { return handleCurrencySelect(el); } }, { children: (0, jsx_runtime_1.jsx)(ContextMenuItem_1.ContextMenuItem, { option: el, size: "large", isSelected: selectedCurrency === el.currency, state: el.state, displayType: "text_only" }) }), el.value)); }) })) })), document.body), ((_c = (0, types_1.getErrorByName)(errors, name)) === null || _c === void 0 ? void 0 : _c.message) && state === 'normal' && ((0, jsx_runtime_1.jsx)(S_Error, { children: (0, types_1.getErrorByName)(errors, name).message }))] })));
424
- }
425
- var S_PriceTextField = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n ", ";\n ", ";\n ", "\n"], ["\n ", ";\n ", ";\n ", "\n"])), function (_a) {
426
- var inputSize = _a.inputSize;
427
- return inputSize &&
428
- {
429
- small: 'width: 188px;',
430
- medium: 'width: 188px;',
431
- large: 'width: 432px;',
432
- rlarge: 'width: 100%'
433
- }[inputSize];
434
- }, function (_a) {
435
- var responsiveMode = _a.responsiveMode;
436
- return responsiveMode === 'use' && 'width: 100%';
437
- }, function (_a) {
438
- var customWidth = _a.customWidth;
439
- return customWidth && "width: ".concat(customWidth, ";");
440
- });
441
- var small = (0, styled_components_1.css)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n border-radius: 10px;\n height: 32px;\n width: 188px;\n"], ["\n border-radius: 10px;\n height: 32px;\n width: 188px;\n"])));
442
- var medium = (0, styled_components_1.css)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n border-radius: 12px;\n height: 40px;\n width: 188px;\n"], ["\n border-radius: 12px;\n height: 40px;\n width: 188px;\n"])));
443
- var large = (0, styled_components_1.css)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n border-radius: 14px;\n height: 48px;\n width: ", ";\n"], ["\n border-radius: 14px;\n height: 48px;\n width: ", ";\n"])), function (_a) {
444
- var inputSize = _a.inputSize;
445
- return (inputSize === 'rlarge' ? '100%' : '432px');
446
- });
447
- var normalActionColor = (0, styled_components_1.css)(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n &:active {\n background-color: ", ";\n }\n"], ["\n &:active {\n background-color: ", ";\n }\n"])), function (_a) {
448
- var theme = _a.theme;
449
- return theme.ui_cpnt_textfield_base_pressed;
450
- });
451
- var S_Select = styled_components_1.default.div(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n align-items: center;\n display: flex;\n justify-content: space-between;\n width: 100%;\n"], ["\n align-items: center;\n display: flex;\n justify-content: space-between;\n width: 100%;\n"])));
452
- var S_ContextMenuWrapper = styled_components_1.default.div(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n display: block;\n position: absolute;\n ", ";\n"], ["\n display: block;\n position: absolute;\n ", ";\n"])), function (_a) {
453
- var contextMenuPositionCss = _a.contextMenuPositionCss;
454
- return contextMenuPositionCss;
455
- });
456
- var S_Error = styled_components_1.default.div(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n color: ", ";\n font-size: ", ";\n font-weight: ", ";\n line-height: ", ";\n margin-top: ", ";\n text-align: left;\n white-space: pre-wrap;\n"], ["\n color: ", ";\n font-size: ", ";\n font-weight: ", ";\n line-height: ", ";\n margin-top: ", ";\n text-align: left;\n white-space: pre-wrap;\n"])), function (_a) {
457
- var theme = _a.theme;
458
- return theme.ui_cpnt_textfield_text_error;
459
- }, function (_a) {
460
- var theme = _a.theme;
461
- return theme.desktopFontSize.caption2;
462
- }, function (_a) {
463
- var theme = _a.theme;
464
- return theme.fontWeight.normal;
465
- }, function (_a) {
466
- var theme = _a.theme;
467
- return theme.desktopLineHeight.caption2;
468
- }, function (_a) {
469
- var theme = _a.theme;
470
- return theme.spacing.spacingA;
471
- });
472
- var S_Badge = styled_components_1.default.div(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n background-color: ", ";\n border-radius: 8px;\n height: 6px;\n left: 0;\n width: 6px;\n"], ["\n background-color: ", ";\n border-radius: 8px;\n height: 6px;\n left: 0;\n width: 6px;\n"])), function (_a) {
473
- var theme = _a.theme;
474
- return theme.ui_69;
475
- });
476
- var S_ComponentBox = styled_components_1.default.div(templateObject_10 || (templateObject_10 = __makeTemplateObject(["\n align-items: center;\n border: solid 2px\n ", ";\n box-sizing: border-box;\n ", ";\n\n display: flex;\n\n ", "\n\n ", "\n ", ";\n ", "\n"], ["\n align-items: center;\n border: solid 2px\n ", ";\n box-sizing: border-box;\n ", ";\n\n display: flex;\n\n ", "\n\n ", "\n ", ";\n ", "\n"])), function (_a) {
477
- var theme = _a.theme, isError = _a.isError, isFocused = _a.isFocused, state = _a.state;
478
- if (state === 'disabled' || state === 'read_only') {
479
- return theme.ui_cpnt_textfield_border_disabled;
480
- }
481
- if (isError) {
482
- return theme.ui_cpnt_textfield_border_error;
483
- }
484
- if (isFocused) {
485
- return theme.ui_cpnt_textfield_border_focus;
486
- }
487
- return theme.ui_cpnt_textfield_border_normal;
488
- }, function (_a) {
489
- var inputSize = _a.inputSize;
490
- return inputSize &&
491
- {
492
- small: small,
493
- medium: medium,
494
- large: large,
495
- rlarge: large
496
- }[inputSize];
497
- }, transitionStyle_1.InputTransition, function (_a) {
498
- var state = _a.state;
499
- return state === 'normal' && normalActionColor;
500
- }, function (_a) {
501
- var responsiveMode = _a.responsiveMode;
502
- return responsiveMode === 'use' && 'width: 100%';
503
- }, function (_a) {
504
- var customWidth = _a.customWidth;
505
- return customWidth && "width: ".concat(customWidth, ";");
506
- });
507
- var S_TextFieldBaseWrapper = styled_components_1.default.div(templateObject_12 || (templateObject_12 = __makeTemplateObject(["\n align-items: center;\n background-color: ", ";\n border-radius: ", ";\n display: flex;\n flex: 1;\n height: 100%;\n\n min-width: 0;\n\n padding-left: ", ";\n\n ", "\n"], ["\n align-items: center;\n background-color: ", ";\n border-radius: ", ";\n display: flex;\n flex: 1;\n height: 100%;\n\n min-width: 0;\n\n padding-left: ", ";\n\n ", "\n"])), function (_a) {
508
- var theme = _a.theme, state = _a.state, isInputReadOnly = _a.isInputReadOnly;
509
- if (isInputReadOnly || state === 'disabled' || state === 'read_only') {
510
- return theme.ui_cpnt_textfield_base_disabled;
511
- }
512
- return theme.ui_cpnt_textfield_base_normal;
513
- }, function (_a) {
514
- var inputSize = _a.inputSize;
515
- switch (inputSize) {
516
- case 'small':
517
- return '8px 0 0 8px';
518
- case 'medium':
519
- return '10px 0 0 10px';
520
- case 'large':
521
- case 'rlarge':
522
- return '12px 0 0 12px';
523
- default:
524
- return '12px 0 0 12px';
525
- }
526
- }, function (_a) {
527
- var theme = _a.theme;
528
- return theme.spacing.spacingD;
529
- }, function (_a) {
530
- var state = _a.state, theme = _a.theme;
531
- return state === 'normal' && (0, styled_components_1.css)(templateObject_11 || (templateObject_11 = __makeTemplateObject(["\n &:hover {\n background-color: ", ";\n }\n\n &:active {\n background-color: ", ";\n }\n "], ["\n &:hover {\n background-color: ", ";\n }\n\n &:active {\n background-color: ", ";\n }\n "])), theme.ui_cpnt_textfield_base_hover, theme.ui_cpnt_textfield_base_pressed);
532
- });
533
- var S_DropdownWrapper = styled_components_1.default.div(templateObject_14 || (templateObject_14 = __makeTemplateObject(["\n align-items: center;\n background-color: ", ";\n border-radius: ", ";\n\n cursor: ", ";\n\n display: flex;\n height: 100%;\n min-width: 50px;\n outline: none;\n\n padding: 0 ", ";\n\n ", "\n"], ["\n align-items: center;\n background-color: ", ";\n border-radius: ", ";\n\n cursor: ", ";\n\n display: flex;\n height: 100%;\n min-width: 50px;\n outline: none;\n\n padding: 0 ", ";\n\n ", "\n"])), function (_a) {
534
- var theme = _a.theme, state = _a.state;
535
- if (state === 'disabled' || state === 'read_only') {
536
- return theme.ui_cpnt_textfield_base_disabled;
537
- }
538
- return theme.ui_cpnt_textfield_base_normal;
539
- }, function (_a) {
540
- var inputSize = _a.inputSize;
541
- switch (inputSize) {
542
- case 'small':
543
- return '0 8px 8px 0';
544
- case 'medium':
545
- return '0 10px 10px 0';
546
- case 'large':
547
- case 'rlarge':
548
- return '0 12px 12px 0';
549
- default:
550
- return '0 12px 12px 0';
551
- }
552
- }, function (_a) {
553
- var state = _a.state;
554
- switch (state) {
555
- case 'disabled':
556
- return 'not-allowed';
557
- case 'read_only':
558
- return 'auto';
559
- case 'normal':
560
- return 'pointer';
561
- }
562
- }, function (_a) {
563
- var theme = _a.theme;
564
- return theme.spacing.spacingD;
565
- }, function (_a) {
566
- var state = _a.state, theme = _a.theme;
567
- return state === 'normal' && (0, styled_components_1.css)(templateObject_13 || (templateObject_13 = __makeTemplateObject(["\n &:hover {\n background-color: ", ";\n }\n\n &:active {\n background-color: ", ";\n }\n "], ["\n &:hover {\n background-color: ", ";\n }\n\n &:active {\n background-color: ", ";\n }\n "])), theme.ui_cpnt_textfield_base_hover, theme.ui_cpnt_textfield_base_pressed);
568
- });
569
- exports.default = PriceTextField;
570
- var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8, templateObject_9, templateObject_10, templateObject_11, templateObject_12, templateObject_13, templateObject_14;
@@ -1 +0,0 @@
1
- export { default as PriceTextField } from './PriceTextField';
@@ -1,8 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.PriceTextField = void 0;
7
- var PriceTextField_1 = require("./PriceTextField");
8
- Object.defineProperty(exports, "PriceTextField", { enumerable: true, get: function () { return __importDefault(PriceTextField_1).default; } });
@@ -1,14 +0,0 @@
1
- /// <reference types="react" />
2
- import { CurrencyCode, ExchangeRateMap, Price } from '../../../core/pricing';
3
- import type { TextLabelProps } from '../TextLabel/TextLabel';
4
- type PriceTextLabelProps = Omit<TextLabelProps, 'text' | 'ellipsisMode' | 'lineLimit' | 'userSelectMode' | 'requirementMode' | 'bulletPointMode' | 'wordBreak'> & {
5
- price: Price;
6
- useFriendlyName?: 'none' | 'use';
7
- useMinus?: 'none' | 'use';
8
- };
9
- declare function PriceTextLabel({ price, useFriendlyName, useMinus, selectedCurrency, exchangeRates, userCountryCode, ...args }: PriceTextLabelProps & {
10
- selectedCurrency?: CurrencyCode;
11
- exchangeRates?: ExchangeRateMap;
12
- userCountryCode?: string;
13
- }): JSX.Element;
14
- export default PriceTextLabel;
@@ -1,47 +0,0 @@
1
- "use strict";
2
- var __assign = (this && this.__assign) || function () {
3
- __assign = Object.assign || function(t) {
4
- for (var s, i = 1, n = arguments.length; i < n; i++) {
5
- s = arguments[i];
6
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
- t[p] = s[p];
8
- }
9
- return t;
10
- };
11
- return __assign.apply(this, arguments);
12
- };
13
- var __rest = (this && this.__rest) || function (s, e) {
14
- var t = {};
15
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
16
- t[p] = s[p];
17
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
18
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
19
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
20
- t[p[i]] = s[p[i]];
21
- }
22
- return t;
23
- };
24
- Object.defineProperty(exports, "__esModule", { value: true });
25
- var jsx_runtime_1 = require("react/jsx-runtime");
26
- var react_i18next_1 = require("react-i18next");
27
- var pricing_1 = require("../../../core/pricing");
28
- var TextLabel_1 = require("../TextLabel");
29
- function PriceTextLabel(_a) {
30
- var price = _a.price, _b = _a.useFriendlyName, useFriendlyName = _b === void 0 ? 'none' : _b, _c = _a.useMinus, useMinus = _c === void 0 ? 'none' : _c, selectedCurrency = _a.selectedCurrency, exchangeRates = _a.exchangeRates, userCountryCode = _a.userCountryCode, args = __rest(_a, ["price", "useFriendlyName", "useMinus", "selectedCurrency", "exchangeRates", "userCountryCode"]);
31
- var t = (0, react_i18next_1.useTranslation)('translation').t;
32
- var targetPrice = price;
33
- var formattedAmount = useMinus === 'use' ? "-".concat(targetPrice.amount) : targetPrice.amount;
34
- var priceText = pricing_1.PricingService.translate.priceWithCurrency(exchangeRates && selectedCurrency
35
- ? pricing_1.PricingService.convertToPreferredPrice({ amount: formattedAmount, currency: price.currency }, selectedCurrency, exchangeRates)
36
- : {
37
- amount: formattedAmount,
38
- currency: userCountryCode
39
- ? pricing_1.PricingService.getDefaultPreferredCurrency(userCountryCode.toLocaleLowerCase())
40
- : price.currency
41
- }, {
42
- friendly: useFriendlyName === 'use' ? true : false,
43
- translation: t
44
- });
45
- return (0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, __assign({}, args, { text: priceText }));
46
- }
47
- exports.default = PriceTextLabel;
@@ -1 +0,0 @@
1
- export { default as PriceTextLabel } from './PriceTextLabel';
@@ -1,8 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.PriceTextLabel = void 0;
7
- var PriceTextLabel_1 = require("./PriceTextLabel");
8
- Object.defineProperty(exports, "PriceTextLabel", { enumerable: true, get: function () { return __importDefault(PriceTextLabel_1).default; } });