@intlayer/design-system 5.4.1 → 5.5.0-canary.0

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 (216) hide show
  1. package/dist/.vite/manifest.json +66 -98
  2. package/dist/components/DictionaryEditor/DictionaryEditor.cjs +14 -2
  3. package/dist/components/DictionaryEditor/DictionaryEditor.cjs.map +1 -1
  4. package/dist/components/DictionaryEditor/DictionaryEditor.d.ts +1 -0
  5. package/dist/components/DictionaryEditor/DictionaryEditor.d.ts.map +1 -1
  6. package/dist/components/DictionaryEditor/DictionaryEditor.mjs +14 -2
  7. package/dist/components/DictionaryEditor/DictionaryEditor.mjs.map +1 -1
  8. package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.cjs +13 -2
  9. package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.cjs.map +1 -1
  10. package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.d.ts +1 -0
  11. package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.d.ts.map +1 -1
  12. package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.mjs +13 -2
  13. package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.mjs.map +1 -1
  14. package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.cjs +30 -4
  15. package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.cjs.map +1 -1
  16. package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.d.ts +2 -1
  17. package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.d.ts.map +1 -1
  18. package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.mjs +32 -6
  19. package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.mjs.map +1 -1
  20. package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.cjs +32 -0
  21. package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.cjs.map +1 -1
  22. package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.d.ts +68 -0
  23. package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.d.ts.map +1 -1
  24. package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.mjs +32 -0
  25. package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.mjs.map +1 -1
  26. package/dist/components/Footer/index.cjs +3 -3
  27. package/dist/components/Footer/index.cjs.map +1 -1
  28. package/dist/components/Footer/index.mjs +3 -3
  29. package/dist/components/Footer/index.mjs.map +1 -1
  30. package/dist/components/Link/Link.cjs +2 -2
  31. package/dist/components/Link/Link.cjs.map +1 -1
  32. package/dist/components/Link/Link.d.ts +1 -1
  33. package/dist/components/Link/Link.d.ts.map +1 -1
  34. package/dist/components/Link/Link.mjs +2 -2
  35. package/dist/components/Link/Link.mjs.map +1 -1
  36. package/dist/components/Logo/Logo.cjs +43 -0
  37. package/dist/components/Logo/Logo.cjs.map +1 -0
  38. package/dist/components/Logo/Logo.d.ts +6 -0
  39. package/dist/components/Logo/Logo.d.ts.map +1 -0
  40. package/dist/components/Logo/Logo.mjs +43 -0
  41. package/dist/components/Logo/Logo.mjs.map +1 -0
  42. package/dist/components/Logo/LogoTextOnly.cjs +14 -82
  43. package/dist/components/Logo/LogoTextOnly.cjs.map +1 -1
  44. package/dist/components/Logo/LogoTextOnly.d.ts +2 -3
  45. package/dist/components/Logo/LogoTextOnly.d.ts.map +1 -1
  46. package/dist/components/Logo/LogoTextOnly.mjs +14 -82
  47. package/dist/components/Logo/LogoTextOnly.mjs.map +1 -1
  48. package/dist/components/Logo/LogoWithText.cjs +43 -0
  49. package/dist/components/Logo/LogoWithText.cjs.map +1 -0
  50. package/dist/components/Logo/LogoWithText.d.ts +3 -0
  51. package/dist/components/Logo/LogoWithText.d.ts.map +1 -0
  52. package/dist/components/Logo/LogoWithText.mjs +43 -0
  53. package/dist/components/Logo/LogoWithText.mjs.map +1 -0
  54. package/dist/components/Logo/LogoWithTextBelow.cjs +43 -0
  55. package/dist/components/Logo/LogoWithTextBelow.cjs.map +1 -0
  56. package/dist/components/Logo/LogoWithTextBelow.d.ts +6 -0
  57. package/dist/components/Logo/LogoWithTextBelow.d.ts.map +1 -0
  58. package/dist/components/Logo/LogoWithTextBelow.mjs +43 -0
  59. package/dist/components/Logo/LogoWithTextBelow.mjs.map +1 -0
  60. package/dist/components/Logo/index.cjs +7 -63
  61. package/dist/components/Logo/index.cjs.map +1 -1
  62. package/dist/components/Logo/index.d.ts +4 -19
  63. package/dist/components/Logo/index.d.ts.map +1 -1
  64. package/dist/components/Logo/index.mjs +7 -63
  65. package/dist/components/Logo/index.mjs.map +1 -1
  66. package/dist/components/SocialNetworks/{Facebook.cjs → FacebookLogo.cjs} +1 -1
  67. package/dist/components/SocialNetworks/FacebookLogo.cjs.map +1 -0
  68. package/dist/components/SocialNetworks/{Facebook.d.ts → FacebookLogo.d.ts} +1 -1
  69. package/dist/components/SocialNetworks/FacebookLogo.d.ts.map +1 -0
  70. package/dist/components/SocialNetworks/{Facebook.mjs → FacebookLogo.mjs} +1 -1
  71. package/dist/components/SocialNetworks/FacebookLogo.mjs.map +1 -0
  72. package/dist/components/SocialNetworks/InstagramLogo.cjs +16 -0
  73. package/dist/components/SocialNetworks/InstagramLogo.cjs.map +1 -0
  74. package/dist/components/SocialNetworks/{Instagram.d.ts → InstagramLogo.d.ts} +1 -1
  75. package/dist/components/SocialNetworks/InstagramLogo.d.ts.map +1 -0
  76. package/dist/components/SocialNetworks/InstagramLogo.mjs +16 -0
  77. package/dist/components/SocialNetworks/InstagramLogo.mjs.map +1 -0
  78. package/dist/components/SocialNetworks/{LinkedIn.cjs → LinkedInLogo.cjs} +2 -2
  79. package/dist/components/SocialNetworks/LinkedInLogo.cjs.map +1 -0
  80. package/dist/components/SocialNetworks/{LinkedIn.d.ts → LinkedInLogo.d.ts} +1 -1
  81. package/dist/components/SocialNetworks/LinkedInLogo.d.ts.map +1 -0
  82. package/dist/components/SocialNetworks/{LinkedIn.mjs → LinkedInLogo.mjs} +2 -2
  83. package/dist/components/SocialNetworks/LinkedInLogo.mjs.map +1 -0
  84. package/dist/components/SocialNetworks/ProductHuntLogo.cjs +17 -0
  85. package/dist/components/SocialNetworks/ProductHuntLogo.cjs.map +1 -0
  86. package/dist/components/SocialNetworks/ProductHuntLogo.d.ts +3 -0
  87. package/dist/components/SocialNetworks/ProductHuntLogo.d.ts.map +1 -0
  88. package/dist/components/SocialNetworks/ProductHuntLogo.mjs +17 -0
  89. package/dist/components/SocialNetworks/ProductHuntLogo.mjs.map +1 -0
  90. package/dist/components/SocialNetworks/{Tiktok.cjs → TiktokLogo.cjs} +1 -1
  91. package/dist/components/SocialNetworks/TiktokLogo.cjs.map +1 -0
  92. package/dist/components/SocialNetworks/{Tiktok.d.ts → TiktokLogo.d.ts} +1 -1
  93. package/dist/components/SocialNetworks/TiktokLogo.d.ts.map +1 -0
  94. package/dist/components/SocialNetworks/{Tiktok.mjs → TiktokLogo.mjs} +1 -1
  95. package/dist/components/SocialNetworks/TiktokLogo.mjs.map +1 -0
  96. package/dist/components/SocialNetworks/{X.cjs → XLogo.cjs} +1 -1
  97. package/dist/components/SocialNetworks/XLogo.cjs.map +1 -0
  98. package/dist/components/SocialNetworks/{X.d.ts → XLogo.d.ts} +1 -1
  99. package/dist/components/SocialNetworks/XLogo.d.ts.map +1 -0
  100. package/dist/components/SocialNetworks/{X.mjs → XLogo.mjs} +1 -1
  101. package/dist/components/SocialNetworks/XLogo.mjs.map +1 -0
  102. package/dist/components/SocialNetworks/{Youtube.cjs → YoutubeLogo.cjs} +1 -1
  103. package/dist/components/SocialNetworks/YoutubeLogo.cjs.map +1 -0
  104. package/dist/components/SocialNetworks/{Youtube.d.ts → YoutubeLogo.d.ts} +1 -1
  105. package/dist/components/SocialNetworks/YoutubeLogo.d.ts.map +1 -0
  106. package/dist/components/SocialNetworks/{Youtube.mjs → YoutubeLogo.mjs} +1 -1
  107. package/dist/components/SocialNetworks/YoutubeLogo.mjs.map +1 -0
  108. package/dist/components/SocialNetworks/index.cjs +28 -14
  109. package/dist/components/SocialNetworks/index.cjs.map +1 -1
  110. package/dist/components/SocialNetworks/index.d.ts +7 -1
  111. package/dist/components/SocialNetworks/index.d.ts.map +1 -1
  112. package/dist/components/SocialNetworks/index.mjs +23 -9
  113. package/dist/components/SocialNetworks/index.mjs.map +1 -1
  114. package/dist/components/SwitchSelector/index.cjs +1 -1
  115. package/dist/components/SwitchSelector/index.cjs.map +1 -1
  116. package/dist/components/SwitchSelector/index.d.ts +1 -1
  117. package/dist/components/SwitchSelector/index.d.ts.map +1 -1
  118. package/dist/components/SwitchSelector/index.mjs +1 -1
  119. package/dist/components/SwitchSelector/index.mjs.map +1 -1
  120. package/dist/components/index.cjs +22 -2
  121. package/dist/components/index.cjs.map +1 -1
  122. package/dist/components/index.mjs +21 -1
  123. package/dist/components/index.mjs.map +1 -1
  124. package/dist/hooks/index.cjs +1 -0
  125. package/dist/hooks/index.cjs.map +1 -1
  126. package/dist/hooks/index.mjs +2 -1
  127. package/dist/hooks/intlayerAPIHooks.cjs +6 -0
  128. package/dist/hooks/intlayerAPIHooks.cjs.map +1 -1
  129. package/dist/hooks/intlayerAPIHooks.d.ts +2 -1
  130. package/dist/hooks/intlayerAPIHooks.d.ts.map +1 -1
  131. package/dist/hooks/intlayerAPIHooks.mjs +6 -0
  132. package/dist/hooks/intlayerAPIHooks.mjs.map +1 -1
  133. package/dist/hooks/useIntlayerAPI.d.ts +2 -1
  134. package/dist/hooks/useIntlayerAPI.d.ts.map +1 -1
  135. package/dist/tailwind.css +1 -1
  136. package/package.json +18 -18
  137. package/dist/components/Logo/LogoCircle.cjs +0 -28
  138. package/dist/components/Logo/LogoCircle.cjs.map +0 -1
  139. package/dist/components/Logo/LogoCircle.d.ts +0 -4
  140. package/dist/components/Logo/LogoCircle.d.ts.map +0 -1
  141. package/dist/components/Logo/LogoCircle.mjs +0 -28
  142. package/dist/components/Logo/LogoCircle.mjs.map +0 -1
  143. package/dist/components/Logo/LogoNoFrame.cjs +0 -111
  144. package/dist/components/Logo/LogoNoFrame.cjs.map +0 -1
  145. package/dist/components/Logo/LogoNoFrame.d.ts +0 -4
  146. package/dist/components/Logo/LogoNoFrame.d.ts.map +0 -1
  147. package/dist/components/Logo/LogoNoFrame.mjs +0 -111
  148. package/dist/components/Logo/LogoNoFrame.mjs.map +0 -1
  149. package/dist/components/Logo/LogoSquare.cjs +0 -28
  150. package/dist/components/Logo/LogoSquare.cjs.map +0 -1
  151. package/dist/components/Logo/LogoSquare.d.ts +0 -4
  152. package/dist/components/Logo/LogoSquare.d.ts.map +0 -1
  153. package/dist/components/Logo/LogoSquare.mjs +0 -28
  154. package/dist/components/Logo/LogoSquare.mjs.map +0 -1
  155. package/dist/components/Logo/LogoSquircle.cjs +0 -65
  156. package/dist/components/Logo/LogoSquircle.cjs.map +0 -1
  157. package/dist/components/Logo/LogoSquircle.d.ts +0 -4
  158. package/dist/components/Logo/LogoSquircle.d.ts.map +0 -1
  159. package/dist/components/Logo/LogoSquircle.mjs +0 -65
  160. package/dist/components/Logo/LogoSquircle.mjs.map +0 -1
  161. package/dist/components/Logo/LogoWithTextBelowCircle.cjs +0 -115
  162. package/dist/components/Logo/LogoWithTextBelowCircle.cjs.map +0 -1
  163. package/dist/components/Logo/LogoWithTextBelowCircle.d.ts +0 -4
  164. package/dist/components/Logo/LogoWithTextBelowCircle.d.ts.map +0 -1
  165. package/dist/components/Logo/LogoWithTextBelowCircle.mjs +0 -115
  166. package/dist/components/Logo/LogoWithTextBelowCircle.mjs.map +0 -1
  167. package/dist/components/Logo/LogoWithTextBelowNoFrame.cjs +0 -114
  168. package/dist/components/Logo/LogoWithTextBelowNoFrame.cjs.map +0 -1
  169. package/dist/components/Logo/LogoWithTextBelowNoFrame.d.ts +0 -4
  170. package/dist/components/Logo/LogoWithTextBelowNoFrame.d.ts.map +0 -1
  171. package/dist/components/Logo/LogoWithTextBelowNoFrame.mjs +0 -114
  172. package/dist/components/Logo/LogoWithTextBelowNoFrame.mjs.map +0 -1
  173. package/dist/components/Logo/LogoWithTextBelowSquircle.cjs +0 -68
  174. package/dist/components/Logo/LogoWithTextBelowSquircle.cjs.map +0 -1
  175. package/dist/components/Logo/LogoWithTextBelowSquircle.d.ts +0 -4
  176. package/dist/components/Logo/LogoWithTextBelowSquircle.d.ts.map +0 -1
  177. package/dist/components/Logo/LogoWithTextBelowSquircle.mjs +0 -68
  178. package/dist/components/Logo/LogoWithTextBelowSquircle.mjs.map +0 -1
  179. package/dist/components/Logo/LogoWithTextCircle.cjs +0 -202
  180. package/dist/components/Logo/LogoWithTextCircle.cjs.map +0 -1
  181. package/dist/components/Logo/LogoWithTextCircle.d.ts +0 -4
  182. package/dist/components/Logo/LogoWithTextCircle.d.ts.map +0 -1
  183. package/dist/components/Logo/LogoWithTextCircle.mjs +0 -202
  184. package/dist/components/Logo/LogoWithTextCircle.mjs.map +0 -1
  185. package/dist/components/Logo/LogoWithTextNoFrame.cjs +0 -114
  186. package/dist/components/Logo/LogoWithTextNoFrame.cjs.map +0 -1
  187. package/dist/components/Logo/LogoWithTextNoFrame.d.ts +0 -4
  188. package/dist/components/Logo/LogoWithTextNoFrame.d.ts.map +0 -1
  189. package/dist/components/Logo/LogoWithTextNoFrame.mjs +0 -114
  190. package/dist/components/Logo/LogoWithTextNoFrame.mjs.map +0 -1
  191. package/dist/components/Logo/LogoWithTextSquircle.cjs +0 -68
  192. package/dist/components/Logo/LogoWithTextSquircle.cjs.map +0 -1
  193. package/dist/components/Logo/LogoWithTextSquircle.d.ts +0 -4
  194. package/dist/components/Logo/LogoWithTextSquircle.d.ts.map +0 -1
  195. package/dist/components/Logo/LogoWithTextSquircle.mjs +0 -68
  196. package/dist/components/Logo/LogoWithTextSquircle.mjs.map +0 -1
  197. package/dist/components/SocialNetworks/Facebook.cjs.map +0 -1
  198. package/dist/components/SocialNetworks/Facebook.d.ts.map +0 -1
  199. package/dist/components/SocialNetworks/Facebook.mjs.map +0 -1
  200. package/dist/components/SocialNetworks/Instagram.cjs +0 -16
  201. package/dist/components/SocialNetworks/Instagram.cjs.map +0 -1
  202. package/dist/components/SocialNetworks/Instagram.d.ts.map +0 -1
  203. package/dist/components/SocialNetworks/Instagram.mjs +0 -16
  204. package/dist/components/SocialNetworks/Instagram.mjs.map +0 -1
  205. package/dist/components/SocialNetworks/LinkedIn.cjs.map +0 -1
  206. package/dist/components/SocialNetworks/LinkedIn.d.ts.map +0 -1
  207. package/dist/components/SocialNetworks/LinkedIn.mjs.map +0 -1
  208. package/dist/components/SocialNetworks/Tiktok.cjs.map +0 -1
  209. package/dist/components/SocialNetworks/Tiktok.d.ts.map +0 -1
  210. package/dist/components/SocialNetworks/Tiktok.mjs.map +0 -1
  211. package/dist/components/SocialNetworks/X.cjs.map +0 -1
  212. package/dist/components/SocialNetworks/X.d.ts.map +0 -1
  213. package/dist/components/SocialNetworks/X.mjs.map +0 -1
  214. package/dist/components/SocialNetworks/Youtube.cjs.map +0 -1
  215. package/dist/components/SocialNetworks/Youtube.d.ts.map +0 -1
  216. package/dist/components/SocialNetworks/Youtube.mjs.map +0 -1
@@ -1079,6 +1079,7 @@
1079
1079
  "src": "src/components/DictionaryFieldEditor/SaveForm/SaveForm.tsx",
1080
1080
  "isEntry": true,
1081
1081
  "imports": [
1082
+ "src/components/Modal/Modal.tsx",
1082
1083
  "src/hooks/useScrollBlockage/useScrollBlockageStore.ts",
1083
1084
  "src/hooks/useAsync/useAsyncStateStore.tsx",
1084
1085
  "src/hooks/intlayerAPIHooks.ts",
@@ -1096,7 +1097,6 @@
1096
1097
  "src/components/Auth/ChangePasswordForm/useChangePasswordSchema.content.ts",
1097
1098
  "src/components/Auth/ResetPasswordForm/resetPasswordContent.content.ts",
1098
1099
  "src/components/Auth/ResetPasswordForm/useResetPasswordSchema.content.ts",
1099
- "src/components/Modal/Modal.tsx",
1100
1100
  "src/components/Auth/VerifyEmailForm/index.content.ts",
1101
1101
  "src/components/Auth/DefineNewPasswordForm/defineNewPasswordForm.content.ts",
1102
1102
  "src/components/Auth/DefineNewPasswordForm/useDefineNewPasswordSchema.content.ts",
@@ -1295,7 +1295,7 @@
1295
1295
  "src": "src/components/Footer/index.tsx",
1296
1296
  "isEntry": true,
1297
1297
  "imports": [
1298
- "src/components/Logo/index.tsx",
1298
+ "src/components/Logo/LogoWithTextBelow.tsx",
1299
1299
  "src/components/SocialNetworks/index.tsx"
1300
1300
  ]
1301
1301
  },
@@ -1938,28 +1938,10 @@
1938
1938
  "src": "src/components/LocaleSwitcherDropDown/localeSwitcher.content.ts",
1939
1939
  "isEntry": true
1940
1940
  },
1941
- "src/components/Logo/LogoCircle.tsx": {
1942
- "file": "components/Logo/LogoCircle.cjs",
1943
- "name": "components/Logo/LogoCircle",
1944
- "src": "src/components/Logo/LogoCircle.tsx",
1945
- "isEntry": true
1946
- },
1947
- "src/components/Logo/LogoNoFrame.tsx": {
1948
- "file": "components/Logo/LogoNoFrame.cjs",
1949
- "name": "components/Logo/LogoNoFrame",
1950
- "src": "src/components/Logo/LogoNoFrame.tsx",
1951
- "isEntry": true
1952
- },
1953
- "src/components/Logo/LogoSquare.tsx": {
1954
- "file": "components/Logo/LogoSquare.cjs",
1955
- "name": "components/Logo/LogoSquare",
1956
- "src": "src/components/Logo/LogoSquare.tsx",
1957
- "isEntry": true
1958
- },
1959
- "src/components/Logo/LogoSquircle.tsx": {
1960
- "file": "components/Logo/LogoSquircle.cjs",
1961
- "name": "components/Logo/LogoSquircle",
1962
- "src": "src/components/Logo/LogoSquircle.tsx",
1941
+ "src/components/Logo/Logo.tsx": {
1942
+ "file": "components/Logo/Logo.cjs",
1943
+ "name": "components/Logo/Logo",
1944
+ "src": "src/components/Logo/Logo.tsx",
1963
1945
  "isEntry": true
1964
1946
  },
1965
1947
  "src/components/Logo/LogoTextOnly.tsx": {
@@ -1968,40 +1950,16 @@
1968
1950
  "src": "src/components/Logo/LogoTextOnly.tsx",
1969
1951
  "isEntry": true
1970
1952
  },
1971
- "src/components/Logo/LogoWithTextBelowCircle.tsx": {
1972
- "file": "components/Logo/LogoWithTextBelowCircle.cjs",
1973
- "name": "components/Logo/LogoWithTextBelowCircle",
1974
- "src": "src/components/Logo/LogoWithTextBelowCircle.tsx",
1975
- "isEntry": true
1976
- },
1977
- "src/components/Logo/LogoWithTextBelowNoFrame.tsx": {
1978
- "file": "components/Logo/LogoWithTextBelowNoFrame.cjs",
1979
- "name": "components/Logo/LogoWithTextBelowNoFrame",
1980
- "src": "src/components/Logo/LogoWithTextBelowNoFrame.tsx",
1953
+ "src/components/Logo/LogoWithText.tsx": {
1954
+ "file": "components/Logo/LogoWithText.cjs",
1955
+ "name": "components/Logo/LogoWithText",
1956
+ "src": "src/components/Logo/LogoWithText.tsx",
1981
1957
  "isEntry": true
1982
1958
  },
1983
- "src/components/Logo/LogoWithTextBelowSquircle.tsx": {
1984
- "file": "components/Logo/LogoWithTextBelowSquircle.cjs",
1985
- "name": "components/Logo/LogoWithTextBelowSquircle",
1986
- "src": "src/components/Logo/LogoWithTextBelowSquircle.tsx",
1987
- "isEntry": true
1988
- },
1989
- "src/components/Logo/LogoWithTextCircle.tsx": {
1990
- "file": "components/Logo/LogoWithTextCircle.cjs",
1991
- "name": "components/Logo/LogoWithTextCircle",
1992
- "src": "src/components/Logo/LogoWithTextCircle.tsx",
1993
- "isEntry": true
1994
- },
1995
- "src/components/Logo/LogoWithTextNoFrame.tsx": {
1996
- "file": "components/Logo/LogoWithTextNoFrame.cjs",
1997
- "name": "components/Logo/LogoWithTextNoFrame",
1998
- "src": "src/components/Logo/LogoWithTextNoFrame.tsx",
1999
- "isEntry": true
2000
- },
2001
- "src/components/Logo/LogoWithTextSquircle.tsx": {
2002
- "file": "components/Logo/LogoWithTextSquircle.cjs",
2003
- "name": "components/Logo/LogoWithTextSquircle",
2004
- "src": "src/components/Logo/LogoWithTextSquircle.tsx",
1959
+ "src/components/Logo/LogoWithTextBelow.tsx": {
1960
+ "file": "components/Logo/LogoWithTextBelow.cjs",
1961
+ "name": "components/Logo/LogoWithTextBelow",
1962
+ "src": "src/components/Logo/LogoWithTextBelow.tsx",
2005
1963
  "isEntry": true
2006
1964
  },
2007
1965
  "src/components/Logo/index.tsx": {
@@ -2010,17 +1968,10 @@
2010
1968
  "src": "src/components/Logo/index.tsx",
2011
1969
  "isEntry": true,
2012
1970
  "imports": [
2013
- "src/components/Logo/LogoCircle.tsx",
2014
- "src/components/Logo/LogoNoFrame.tsx",
2015
- "src/components/Logo/LogoSquare.tsx",
2016
- "src/components/Logo/LogoSquircle.tsx",
1971
+ "src/components/Logo/Logo.tsx",
2017
1972
  "src/components/Logo/LogoTextOnly.tsx",
2018
- "src/components/Logo/LogoWithTextBelowCircle.tsx",
2019
- "src/components/Logo/LogoWithTextBelowNoFrame.tsx",
2020
- "src/components/Logo/LogoWithTextBelowSquircle.tsx",
2021
- "src/components/Logo/LogoWithTextCircle.tsx",
2022
- "src/components/Logo/LogoWithTextNoFrame.tsx",
2023
- "src/components/Logo/LogoWithTextSquircle.tsx"
1973
+ "src/components/Logo/LogoWithText.tsx",
1974
+ "src/components/Logo/LogoWithTextBelow.tsx"
2024
1975
  ]
2025
1976
  },
2026
1977
  "src/components/MarkDownRender/index.tsx": {
@@ -2268,40 +2219,46 @@
2268
2219
  "src/components/Select/Select.tsx"
2269
2220
  ]
2270
2221
  },
2271
- "src/components/SocialNetworks/Facebook.tsx": {
2272
- "file": "components/SocialNetworks/Facebook.cjs",
2273
- "name": "components/SocialNetworks/Facebook",
2274
- "src": "src/components/SocialNetworks/Facebook.tsx",
2222
+ "src/components/SocialNetworks/FacebookLogo.tsx": {
2223
+ "file": "components/SocialNetworks/FacebookLogo.cjs",
2224
+ "name": "components/SocialNetworks/FacebookLogo",
2225
+ "src": "src/components/SocialNetworks/FacebookLogo.tsx",
2226
+ "isEntry": true
2227
+ },
2228
+ "src/components/SocialNetworks/InstagramLogo.tsx": {
2229
+ "file": "components/SocialNetworks/InstagramLogo.cjs",
2230
+ "name": "components/SocialNetworks/InstagramLogo",
2231
+ "src": "src/components/SocialNetworks/InstagramLogo.tsx",
2275
2232
  "isEntry": true
2276
2233
  },
2277
- "src/components/SocialNetworks/Instagram.tsx": {
2278
- "file": "components/SocialNetworks/Instagram.cjs",
2279
- "name": "components/SocialNetworks/Instagram",
2280
- "src": "src/components/SocialNetworks/Instagram.tsx",
2234
+ "src/components/SocialNetworks/LinkedInLogo.tsx": {
2235
+ "file": "components/SocialNetworks/LinkedInLogo.cjs",
2236
+ "name": "components/SocialNetworks/LinkedInLogo",
2237
+ "src": "src/components/SocialNetworks/LinkedInLogo.tsx",
2281
2238
  "isEntry": true
2282
2239
  },
2283
- "src/components/SocialNetworks/LinkedIn.tsx": {
2284
- "file": "components/SocialNetworks/LinkedIn.cjs",
2285
- "name": "components/SocialNetworks/LinkedIn",
2286
- "src": "src/components/SocialNetworks/LinkedIn.tsx",
2240
+ "src/components/SocialNetworks/ProductHuntLogo.tsx": {
2241
+ "file": "components/SocialNetworks/ProductHuntLogo.cjs",
2242
+ "name": "components/SocialNetworks/ProductHuntLogo",
2243
+ "src": "src/components/SocialNetworks/ProductHuntLogo.tsx",
2287
2244
  "isEntry": true
2288
2245
  },
2289
- "src/components/SocialNetworks/Tiktok.tsx": {
2290
- "file": "components/SocialNetworks/Tiktok.cjs",
2291
- "name": "components/SocialNetworks/Tiktok",
2292
- "src": "src/components/SocialNetworks/Tiktok.tsx",
2246
+ "src/components/SocialNetworks/TiktokLogo.tsx": {
2247
+ "file": "components/SocialNetworks/TiktokLogo.cjs",
2248
+ "name": "components/SocialNetworks/TiktokLogo",
2249
+ "src": "src/components/SocialNetworks/TiktokLogo.tsx",
2293
2250
  "isEntry": true
2294
2251
  },
2295
- "src/components/SocialNetworks/X.tsx": {
2296
- "file": "components/SocialNetworks/X.cjs",
2297
- "name": "components/SocialNetworks/X",
2298
- "src": "src/components/SocialNetworks/X.tsx",
2252
+ "src/components/SocialNetworks/XLogo.tsx": {
2253
+ "file": "components/SocialNetworks/XLogo.cjs",
2254
+ "name": "components/SocialNetworks/XLogo",
2255
+ "src": "src/components/SocialNetworks/XLogo.tsx",
2299
2256
  "isEntry": true
2300
2257
  },
2301
- "src/components/SocialNetworks/Youtube.tsx": {
2302
- "file": "components/SocialNetworks/Youtube.cjs",
2303
- "name": "components/SocialNetworks/Youtube",
2304
- "src": "src/components/SocialNetworks/Youtube.tsx",
2258
+ "src/components/SocialNetworks/YoutubeLogo.tsx": {
2259
+ "file": "components/SocialNetworks/YoutubeLogo.cjs",
2260
+ "name": "components/SocialNetworks/YoutubeLogo",
2261
+ "src": "src/components/SocialNetworks/YoutubeLogo.tsx",
2305
2262
  "isEntry": true
2306
2263
  },
2307
2264
  "src/components/SocialNetworks/index.tsx": {
@@ -2310,12 +2267,13 @@
2310
2267
  "src": "src/components/SocialNetworks/index.tsx",
2311
2268
  "isEntry": true,
2312
2269
  "imports": [
2313
- "src/components/SocialNetworks/Facebook.tsx",
2314
- "src/components/SocialNetworks/Instagram.tsx",
2315
- "src/components/SocialNetworks/LinkedIn.tsx",
2316
- "src/components/SocialNetworks/Tiktok.tsx",
2317
- "src/components/SocialNetworks/X.tsx",
2318
- "src/components/SocialNetworks/Youtube.tsx"
2270
+ "src/components/SocialNetworks/FacebookLogo.tsx",
2271
+ "src/components/SocialNetworks/InstagramLogo.tsx",
2272
+ "src/components/SocialNetworks/LinkedInLogo.tsx",
2273
+ "src/components/SocialNetworks/ProductHuntLogo.tsx",
2274
+ "src/components/SocialNetworks/TiktokLogo.tsx",
2275
+ "src/components/SocialNetworks/XLogo.tsx",
2276
+ "src/components/SocialNetworks/YoutubeLogo.tsx"
2319
2277
  ]
2320
2278
  },
2321
2279
  "src/components/SwitchSelector/index.tsx": {
@@ -2549,7 +2507,10 @@
2549
2507
  "src/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.tsx",
2550
2508
  "src/components/LocaleSwitcherContentDropDown/LocaleSwitcherContentContext.tsx",
2551
2509
  "src/components/LocaleSwitcherDropDown/LocaleSwitcher.tsx",
2552
- "src/components/Logo/index.tsx",
2510
+ "src/components/Logo/Logo.tsx",
2511
+ "src/components/Logo/LogoTextOnly.tsx",
2512
+ "src/components/Logo/LogoWithText.tsx",
2513
+ "src/components/Logo/LogoWithTextBelow.tsx",
2553
2514
  "src/components/MarkDownRender/index.tsx",
2554
2515
  "src/components/MaxHeightSmoother/index.tsx",
2555
2516
  "src/components/MaxWidthSmoother/index.tsx",
@@ -2578,7 +2539,14 @@
2578
2539
  "src/components/Toaster/Toast.tsx",
2579
2540
  "src/components/Toaster/useToast.tsx",
2580
2541
  "src/components/Toaster/Toaster.tsx",
2581
- "src/components/WithResizer/index.tsx"
2542
+ "src/components/WithResizer/index.tsx",
2543
+ "src/components/SocialNetworks/FacebookLogo.tsx",
2544
+ "src/components/SocialNetworks/InstagramLogo.tsx",
2545
+ "src/components/SocialNetworks/LinkedInLogo.tsx",
2546
+ "src/components/SocialNetworks/ProductHuntLogo.tsx",
2547
+ "src/components/SocialNetworks/TiktokLogo.tsx",
2548
+ "src/components/SocialNetworks/XLogo.tsx",
2549
+ "src/components/SocialNetworks/YoutubeLogo.tsx"
2582
2550
  ]
2583
2551
  },
2584
2552
  "src/hooks/index.ts": {
@@ -9,10 +9,11 @@ const components_DictionaryEditor_NodeWrapper_ArrayWrapper = require("../../inde
9
9
  const DictionaryEditor = ({
10
10
  dictionary,
11
11
  mode,
12
+ onDelete,
12
13
  ...props
13
14
  }) => {
14
15
  const { editedContent, addEditedContent } = editorReact.useEditedContent();
15
- const { focusedContent, setFocusedContentKeyPath } = editorReact.useFocusDictionary();
16
+ const { focusedContent, setFocusedContentKeyPath, setFocusedContent } = editorReact.useFocusDictionary();
16
17
  const focusedKeyPath = focusedContent?.keyPath;
17
18
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-1 flex-col justify-between gap-2", children: [
18
19
  /* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ ReactExports.createElement(
@@ -33,7 +34,18 @@ const DictionaryEditor = ({
33
34
  onFocusKeyPath: setFocusedContentKeyPath
34
35
  }
35
36
  ) }),
36
- /* @__PURE__ */ jsxRuntime.jsx(components_DictionaryFieldEditor_SaveForm_SaveForm.SaveForm, { dictionary, mode, className: "mb-4 flex-col" })
37
+ /* @__PURE__ */ jsxRuntime.jsx(
38
+ components_DictionaryFieldEditor_SaveForm_SaveForm.SaveForm,
39
+ {
40
+ dictionary,
41
+ mode,
42
+ className: "mb-4 flex-col",
43
+ onDelete: () => {
44
+ setFocusedContent(null);
45
+ onDelete?.();
46
+ }
47
+ }
48
+ )
37
49
  ] });
38
50
  };
39
51
  exports.DictionaryEditor = DictionaryEditor;
@@ -1 +1 @@
1
- {"version":3,"file":"DictionaryEditor.cjs","sources":["../../../src/components/DictionaryEditor/DictionaryEditor.tsx"],"sourcesContent":["'use client';\n\nimport type { Locales } from '@intlayer/config/client';\nimport type { Dictionary } from '@intlayer/core';\nimport { useEditedContent, useFocusDictionary } from '@intlayer/editor-react';\nimport type { FC } from 'react';\nimport { SaveForm } from '../DictionaryFieldEditor/SaveForm/SaveForm';\nimport { NodeWrapper } from './NodeWrapper';\n\ntype DictionaryEditorProps = {\n dictionary: Dictionary;\n locale: Locales;\n mode: ('local' | 'remote')[];\n};\n\nexport const DictionaryEditor: FC<DictionaryEditorProps> = ({\n dictionary,\n mode,\n ...props\n}) => {\n const { editedContent, addEditedContent } = useEditedContent();\n const { focusedContent, setFocusedContentKeyPath } = useFocusDictionary();\n\n const focusedKeyPath = focusedContent?.keyPath;\n\n return (\n <div className=\"flex flex-1 flex-col justify-between gap-2\">\n <div>\n <NodeWrapper\n {...props}\n keyPath={[]}\n dictionary={dictionary}\n key={JSON.stringify(\n (editedContent?.[dictionary.key] ?? dictionary).content\n )}\n editedContent={editedContent?.[dictionary.key]?.content}\n focusedKeyPath={focusedKeyPath}\n section={dictionary.content}\n onContentChange={(content) => {\n addEditedContent(dictionary.key, content.newValue, content.keyPath);\n }}\n onFocusKeyPath={setFocusedContentKeyPath}\n />\n </div>\n <SaveForm dictionary={dictionary} mode={mode} className=\"mb-4 flex-col\" />\n </div>\n );\n};\n"],"names":["useEditedContent","useFocusDictionary","jsxs","jsx","createElement","NodeWrapper","SaveForm"],"mappings":";;;;;;;;AAeO,MAAM,mBAA8C,CAAC;AAAA,EAC1D;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAM;AACJ,QAAM,EAAE,eAAe,iBAAiB,IAAIA,6BAAiB;AAC7D,QAAM,EAAE,gBAAgB,yBAAyB,IAAIC,+BAAmB;AAExE,QAAM,iBAAiB,gBAAgB;AAGrC,SAAAC,2BAAA,KAAC,OAAI,EAAA,WAAU,8CACb,UAAA;AAAA,IAAAC,+BAAC,OACC,EAAA,UAAAC,6BAAA;AAAA,MAACC,qDAAA;AAAA,MAAA;AAAA,QACE,GAAG;AAAA,QACJ,SAAS,CAAC;AAAA,QACV;AAAA,QACA,KAAK,KAAK;AAAA,WACP,gBAAgB,WAAW,GAAG,KAAK,YAAY;AAAA,QAClD;AAAA,QACA,eAAe,gBAAgB,WAAW,GAAG,GAAG;AAAA,QAChD;AAAA,QACA,SAAS,WAAW;AAAA,QACpB,iBAAiB,CAAC,YAAY;AAC5B,2BAAiB,WAAW,KAAK,QAAQ,UAAU,QAAQ,OAAO;AAAA,QACpE;AAAA,QACA,gBAAgB;AAAA,MAAA;AAAA,IAAA,GAEpB;AAAA,IACCF,2BAAA,IAAAG,mDAAA,UAAA,EAAS,YAAwB,MAAY,WAAU,gBAAgB,CAAA;AAAA,EAAA,GAC1E;AAEJ;;"}
1
+ {"version":3,"file":"DictionaryEditor.cjs","sources":["../../../src/components/DictionaryEditor/DictionaryEditor.tsx"],"sourcesContent":["'use client';\n\nimport type { Locales } from '@intlayer/config/client';\nimport type { Dictionary } from '@intlayer/core';\nimport { useEditedContent, useFocusDictionary } from '@intlayer/editor-react';\nimport type { FC } from 'react';\nimport { SaveForm } from '../DictionaryFieldEditor/SaveForm/SaveForm';\nimport { NodeWrapper } from './NodeWrapper';\n\ntype DictionaryEditorProps = {\n dictionary: Dictionary;\n locale: Locales;\n mode: ('local' | 'remote')[];\n onDelete?: () => void;\n};\n\nexport const DictionaryEditor: FC<DictionaryEditorProps> = ({\n dictionary,\n mode,\n onDelete,\n ...props\n}) => {\n const { editedContent, addEditedContent } = useEditedContent();\n const { focusedContent, setFocusedContentKeyPath, setFocusedContent } =\n useFocusDictionary();\n\n const focusedKeyPath = focusedContent?.keyPath;\n\n return (\n <div className=\"flex flex-1 flex-col justify-between gap-2\">\n <div>\n <NodeWrapper\n {...props}\n keyPath={[]}\n dictionary={dictionary}\n key={JSON.stringify(\n (editedContent?.[dictionary.key] ?? dictionary).content\n )}\n editedContent={editedContent?.[dictionary.key]?.content}\n focusedKeyPath={focusedKeyPath}\n section={dictionary.content}\n onContentChange={(content) => {\n addEditedContent(dictionary.key, content.newValue, content.keyPath);\n }}\n onFocusKeyPath={setFocusedContentKeyPath}\n />\n </div>\n <SaveForm\n dictionary={dictionary}\n mode={mode}\n className=\"mb-4 flex-col\"\n onDelete={() => {\n setFocusedContent(null);\n onDelete?.();\n }}\n />\n </div>\n );\n};\n"],"names":["useEditedContent","useFocusDictionary","jsxs","jsx","createElement","NodeWrapper","SaveForm"],"mappings":";;;;;;;;AAgBO,MAAM,mBAA8C,CAAC;AAAA,EAC1D;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAM;AACJ,QAAM,EAAE,eAAe,iBAAiB,IAAIA,6BAAiB;AAC7D,QAAM,EAAE,gBAAgB,0BAA0B,kBAAA,IAChDC,YAAAA,mBAAmB;AAErB,QAAM,iBAAiB,gBAAgB;AAGrC,SAAAC,2BAAA,KAAC,OAAI,EAAA,WAAU,8CACb,UAAA;AAAA,IAAAC,+BAAC,OACC,EAAA,UAAAC,6BAAA;AAAA,MAACC,qDAAA;AAAA,MAAA;AAAA,QACE,GAAG;AAAA,QACJ,SAAS,CAAC;AAAA,QACV;AAAA,QACA,KAAK,KAAK;AAAA,WACP,gBAAgB,WAAW,GAAG,KAAK,YAAY;AAAA,QAClD;AAAA,QACA,eAAe,gBAAgB,WAAW,GAAG,GAAG;AAAA,QAChD;AAAA,QACA,SAAS,WAAW;AAAA,QACpB,iBAAiB,CAAC,YAAY;AAC5B,2BAAiB,WAAW,KAAK,QAAQ,UAAU,QAAQ,OAAO;AAAA,QACpE;AAAA,QACA,gBAAgB;AAAA,MAAA;AAAA,IAAA,GAEpB;AAAA,IACAF,2BAAA;AAAA,MAACG,mDAAA;AAAA,MAAA;AAAA,QACC;AAAA,QACA;AAAA,QACA,WAAU;AAAA,QACV,UAAU,MAAM;AACd,4BAAkB,IAAI;AACX,qBAAA;AAAA,QAAA;AAAA,MACb;AAAA,IAAA;AAAA,EACF,GACF;AAEJ;;"}
@@ -5,6 +5,7 @@ type DictionaryEditorProps = {
5
5
  dictionary: Dictionary;
6
6
  locale: Locales;
7
7
  mode: ('local' | 'remote')[];
8
+ onDelete?: () => void;
8
9
  };
9
10
  export declare const DictionaryEditor: FC<DictionaryEditorProps>;
10
11
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"DictionaryEditor.d.ts","sourceRoot":"","sources":["../../../src/components/DictionaryEditor/DictionaryEditor.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAEjD,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAIhC,KAAK,qBAAqB,GAAG;IAC3B,UAAU,EAAE,UAAU,CAAC;IACvB,MAAM,EAAE,OAAO,CAAC;IAChB,IAAI,EAAE,CAAC,OAAO,GAAG,QAAQ,CAAC,EAAE,CAAC;CAC9B,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,EAAE,CAAC,qBAAqB,CAgCtD,CAAC"}
1
+ {"version":3,"file":"DictionaryEditor.d.ts","sourceRoot":"","sources":["../../../src/components/DictionaryEditor/DictionaryEditor.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAEjD,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAIhC,KAAK,qBAAqB,GAAG;IAC3B,UAAU,EAAE,UAAU,CAAC;IACvB,MAAM,EAAE,OAAO,CAAC;IAChB,IAAI,EAAE,CAAC,OAAO,GAAG,QAAQ,CAAC,EAAE,CAAC;IAC7B,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,EAAE,CAAC,qBAAqB,CA0CtD,CAAC"}
@@ -7,10 +7,11 @@ import { N as NodeWrapper } from "../../index-aPP3MzPT.js";
7
7
  const DictionaryEditor = ({
8
8
  dictionary,
9
9
  mode,
10
+ onDelete,
10
11
  ...props
11
12
  }) => {
12
13
  const { editedContent, addEditedContent } = useEditedContent();
13
- const { focusedContent, setFocusedContentKeyPath } = useFocusDictionary();
14
+ const { focusedContent, setFocusedContentKeyPath, setFocusedContent } = useFocusDictionary();
14
15
  const focusedKeyPath = focusedContent?.keyPath;
15
16
  return /* @__PURE__ */ jsxs("div", { className: "flex flex-1 flex-col justify-between gap-2", children: [
16
17
  /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ createElement(
@@ -31,7 +32,18 @@ const DictionaryEditor = ({
31
32
  onFocusKeyPath: setFocusedContentKeyPath
32
33
  }
33
34
  ) }),
34
- /* @__PURE__ */ jsx(SaveForm, { dictionary, mode, className: "mb-4 flex-col" })
35
+ /* @__PURE__ */ jsx(
36
+ SaveForm,
37
+ {
38
+ dictionary,
39
+ mode,
40
+ className: "mb-4 flex-col",
41
+ onDelete: () => {
42
+ setFocusedContent(null);
43
+ onDelete?.();
44
+ }
45
+ }
46
+ )
35
47
  ] });
36
48
  };
37
49
  export {
@@ -1 +1 @@
1
- {"version":3,"file":"DictionaryEditor.mjs","sources":["../../../src/components/DictionaryEditor/DictionaryEditor.tsx"],"sourcesContent":["'use client';\n\nimport type { Locales } from '@intlayer/config/client';\nimport type { Dictionary } from '@intlayer/core';\nimport { useEditedContent, useFocusDictionary } from '@intlayer/editor-react';\nimport type { FC } from 'react';\nimport { SaveForm } from '../DictionaryFieldEditor/SaveForm/SaveForm';\nimport { NodeWrapper } from './NodeWrapper';\n\ntype DictionaryEditorProps = {\n dictionary: Dictionary;\n locale: Locales;\n mode: ('local' | 'remote')[];\n};\n\nexport const DictionaryEditor: FC<DictionaryEditorProps> = ({\n dictionary,\n mode,\n ...props\n}) => {\n const { editedContent, addEditedContent } = useEditedContent();\n const { focusedContent, setFocusedContentKeyPath } = useFocusDictionary();\n\n const focusedKeyPath = focusedContent?.keyPath;\n\n return (\n <div className=\"flex flex-1 flex-col justify-between gap-2\">\n <div>\n <NodeWrapper\n {...props}\n keyPath={[]}\n dictionary={dictionary}\n key={JSON.stringify(\n (editedContent?.[dictionary.key] ?? dictionary).content\n )}\n editedContent={editedContent?.[dictionary.key]?.content}\n focusedKeyPath={focusedKeyPath}\n section={dictionary.content}\n onContentChange={(content) => {\n addEditedContent(dictionary.key, content.newValue, content.keyPath);\n }}\n onFocusKeyPath={setFocusedContentKeyPath}\n />\n </div>\n <SaveForm dictionary={dictionary} mode={mode} className=\"mb-4 flex-col\" />\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;;AAeO,MAAM,mBAA8C,CAAC;AAAA,EAC1D;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAM;AACJ,QAAM,EAAE,eAAe,iBAAiB,IAAI,iBAAiB;AAC7D,QAAM,EAAE,gBAAgB,yBAAyB,IAAI,mBAAmB;AAExE,QAAM,iBAAiB,gBAAgB;AAGrC,SAAA,qBAAC,OAAI,EAAA,WAAU,8CACb,UAAA;AAAA,IAAA,oBAAC,OACC,EAAA,UAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACE,GAAG;AAAA,QACJ,SAAS,CAAC;AAAA,QACV;AAAA,QACA,KAAK,KAAK;AAAA,WACP,gBAAgB,WAAW,GAAG,KAAK,YAAY;AAAA,QAClD;AAAA,QACA,eAAe,gBAAgB,WAAW,GAAG,GAAG;AAAA,QAChD;AAAA,QACA,SAAS,WAAW;AAAA,QACpB,iBAAiB,CAAC,YAAY;AAC5B,2BAAiB,WAAW,KAAK,QAAQ,UAAU,QAAQ,OAAO;AAAA,QACpE;AAAA,QACA,gBAAgB;AAAA,MAAA;AAAA,IAAA,GAEpB;AAAA,IACC,oBAAA,UAAA,EAAS,YAAwB,MAAY,WAAU,gBAAgB,CAAA;AAAA,EAAA,GAC1E;AAEJ;"}
1
+ {"version":3,"file":"DictionaryEditor.mjs","sources":["../../../src/components/DictionaryEditor/DictionaryEditor.tsx"],"sourcesContent":["'use client';\n\nimport type { Locales } from '@intlayer/config/client';\nimport type { Dictionary } from '@intlayer/core';\nimport { useEditedContent, useFocusDictionary } from '@intlayer/editor-react';\nimport type { FC } from 'react';\nimport { SaveForm } from '../DictionaryFieldEditor/SaveForm/SaveForm';\nimport { NodeWrapper } from './NodeWrapper';\n\ntype DictionaryEditorProps = {\n dictionary: Dictionary;\n locale: Locales;\n mode: ('local' | 'remote')[];\n onDelete?: () => void;\n};\n\nexport const DictionaryEditor: FC<DictionaryEditorProps> = ({\n dictionary,\n mode,\n onDelete,\n ...props\n}) => {\n const { editedContent, addEditedContent } = useEditedContent();\n const { focusedContent, setFocusedContentKeyPath, setFocusedContent } =\n useFocusDictionary();\n\n const focusedKeyPath = focusedContent?.keyPath;\n\n return (\n <div className=\"flex flex-1 flex-col justify-between gap-2\">\n <div>\n <NodeWrapper\n {...props}\n keyPath={[]}\n dictionary={dictionary}\n key={JSON.stringify(\n (editedContent?.[dictionary.key] ?? dictionary).content\n )}\n editedContent={editedContent?.[dictionary.key]?.content}\n focusedKeyPath={focusedKeyPath}\n section={dictionary.content}\n onContentChange={(content) => {\n addEditedContent(dictionary.key, content.newValue, content.keyPath);\n }}\n onFocusKeyPath={setFocusedContentKeyPath}\n />\n </div>\n <SaveForm\n dictionary={dictionary}\n mode={mode}\n className=\"mb-4 flex-col\"\n onDelete={() => {\n setFocusedContent(null);\n onDelete?.();\n }}\n />\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;;AAgBO,MAAM,mBAA8C,CAAC;AAAA,EAC1D;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAM;AACJ,QAAM,EAAE,eAAe,iBAAiB,IAAI,iBAAiB;AAC7D,QAAM,EAAE,gBAAgB,0BAA0B,kBAAA,IAChD,mBAAmB;AAErB,QAAM,iBAAiB,gBAAgB;AAGrC,SAAA,qBAAC,OAAI,EAAA,WAAU,8CACb,UAAA;AAAA,IAAA,oBAAC,OACC,EAAA,UAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACE,GAAG;AAAA,QACJ,SAAS,CAAC;AAAA,QACV;AAAA,QACA,KAAK,KAAK;AAAA,WACP,gBAAgB,WAAW,GAAG,KAAK,YAAY;AAAA,QAClD;AAAA,QACA,eAAe,gBAAgB,WAAW,GAAG,GAAG;AAAA,QAChD;AAAA,QACA,SAAS,WAAW;AAAA,QACpB,iBAAiB,CAAC,YAAY;AAC5B,2BAAiB,WAAW,KAAK,QAAQ,UAAU,QAAQ,OAAO;AAAA,QACpE;AAAA,QACA,gBAAgB;AAAA,MAAA;AAAA,IAAA,GAEpB;AAAA,IACA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC;AAAA,QACA;AAAA,QACA,WAAU;AAAA,QACV,UAAU,MAAM;AACd,4BAAkB,IAAI;AACX,qBAAA;AAAA,QAAA;AAAA,MACb;AAAA,IAAA;AAAA,EACF,GACF;AAEJ;"}
@@ -33,7 +33,8 @@ const DictionaryFieldEditor = ({
33
33
  dictionary,
34
34
  onClickDictionaryList,
35
35
  isDarkMode,
36
- mode
36
+ mode,
37
+ onDelete
37
38
  }) => {
38
39
  const config = editorReact.useConfiguration();
39
40
  const [editorView, setEditorView] = ReactExports.useState(
@@ -110,7 +111,17 @@ const DictionaryFieldEditor = ({
110
111
  editorView === 2 && /* @__PURE__ */ jsxRuntime.jsx(components_DictionaryFieldEditor_StructureEditor.StructureEditor, { dictionary }),
111
112
  editorView === 1 && /* @__PURE__ */ jsxRuntime.jsx(components_DictionaryFieldEditor_ContentEditor.ContentEditor, { dictionary, isDarkMode }),
112
113
  editorView === 3 && /* @__PURE__ */ jsxRuntime.jsx(components_DictionaryFieldEditor_JSONEditor.JSONEditor, { dictionary, isDarkMode }),
113
- /* @__PURE__ */ jsxRuntime.jsx(components_DictionaryFieldEditor_SaveForm_SaveForm.SaveForm, { dictionary, mode })
114
+ /* @__PURE__ */ jsxRuntime.jsx(
115
+ components_DictionaryFieldEditor_SaveForm_SaveForm.SaveForm,
116
+ {
117
+ dictionary,
118
+ mode,
119
+ onDelete: () => {
120
+ setFocusedContent(null);
121
+ onDelete?.();
122
+ }
123
+ }
124
+ )
114
125
  ] })
115
126
  }
116
127
  );
@@ -1 +1 @@
1
- {"version":3,"file":"DictionaryFieldEditor.cjs","sources":["../../../src/components/DictionaryFieldEditor/DictionaryFieldEditor.tsx"],"sourcesContent":["'use client';\n\nimport type { Dictionary } from '@intlayer/core';\nimport {\n useConfiguration,\n useDictionariesRecordActions,\n useFocusDictionaryActions,\n} from '@intlayer/editor-react';\nimport { ArrowLeft } from 'lucide-react';\nimport { useEffect, useState, type FC } from 'react';\nimport { useDictionary } from 'react-intlayer';\nimport { Button } from '../Button';\nimport { LocaleSwitcherContentProvider } from '../LocaleSwitcherContentDropDown';\nimport { SwitchSelector } from '../SwitchSelector';\nimport { ContentEditor } from './ContentEditor';\nimport { DictionaryDetailsForm } from './DictionaryDetails/DictionaryDetailsForm';\nimport { dictionaryFieldEditorContent } from './dictionaryFieldEditor.content';\nimport { JSONEditor } from './JSONEditor';\nimport { SaveForm } from './SaveForm/SaveForm';\nimport { StructureEditor } from './StructureEditor';\n\ntype DictionaryFieldEditorProps = {\n dictionary: Dictionary;\n onClickDictionaryList?: () => void;\n isDarkMode?: boolean;\n mode: ('local' | 'remote')[];\n};\n\nenum EditorViewType {\n DetailsEditor,\n ContentEditor,\n StructureEditor,\n JSONEditor,\n}\n\nexport const DictionaryFieldEditor: FC<DictionaryFieldEditorProps> = ({\n dictionary,\n onClickDictionaryList,\n isDarkMode,\n mode,\n}) => {\n const config = useConfiguration();\n const [editorView, setEditorView] = useState<EditorViewType>(\n EditorViewType.ContentEditor\n );\n const { returnToDictionaryList } = useDictionary(\n dictionaryFieldEditorContent\n );\n const { setFocusedContent } = useFocusDictionaryActions();\n const { setLocaleDictionaries } = useDictionariesRecordActions();\n\n useEffect(() => {\n // Focus the dictionary if not focused\n setFocusedContent((prev) => ({\n ...(prev ?? {}),\n dictionaryKey: dictionary.key,\n }));\n setLocaleDictionaries((prev) => ({\n ...prev,\n [dictionary.key]: dictionary,\n }));\n }, []);\n\n return (\n <LocaleSwitcherContentProvider\n availableLocales={config?.internationalization.locales ?? []}\n >\n <div className=\"flex size-full flex-col gap-6 px-2\">\n <Button\n onClick={onClickDictionaryList}\n variant=\"hoverable\"\n className=\"z-10 ml-5 mr-auto\"\n color=\"text\"\n Icon={ArrowLeft}\n label={returnToDictionaryList.label.value}\n >\n {returnToDictionaryList.text}\n </Button>\n\n <SwitchSelector\n defaultValue={editorView}\n onChange={(value) => setEditorView(value)}\n color=\"text\"\n size=\"sm\"\n className=\"m-auto w-full max-w-xl\"\n choices={[\n {\n content: 'Details',\n value: EditorViewType.DetailsEditor,\n },\n {\n content: 'Structure',\n value: EditorViewType.StructureEditor,\n },\n {\n content: 'Content',\n value: EditorViewType.ContentEditor,\n },\n {\n content: 'JSON',\n value: EditorViewType.JSONEditor,\n },\n ].filter(\n ({ value }) =>\n !(\n !mode.includes('remote') &&\n value === EditorViewType.DetailsEditor\n )\n )}\n />\n\n {editorView === EditorViewType.DetailsEditor && (\n <DictionaryDetailsForm dictionary={dictionary} />\n )}\n {editorView === EditorViewType.StructureEditor && (\n <StructureEditor dictionary={dictionary} />\n )}\n {editorView === EditorViewType.ContentEditor && (\n <ContentEditor dictionary={dictionary} isDarkMode={isDarkMode} />\n )}\n {editorView === EditorViewType.JSONEditor && (\n <JSONEditor dictionary={dictionary} isDarkMode={isDarkMode} />\n )}\n\n <SaveForm dictionary={dictionary} mode={mode} />\n </div>\n </LocaleSwitcherContentProvider>\n );\n};\n"],"names":["useConfiguration","useState","useDictionary","dictionaryFieldEditorContent","useFocusDictionaryActions","useDictionariesRecordActions","useEffect","jsx","LocaleSwitcherContentProvider","jsxs","Button","ArrowLeft","SwitchSelector","DictionaryDetailsForm","StructureEditor","ContentEditor","JSONEditor","SaveForm"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmCO,MAAM,wBAAwD,CAAC;AAAA,EACpE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAAM;AACJ,QAAM,SAASA,YAAAA,iBAAiB;AAC1B,QAAA,CAAC,YAAY,aAAa,IAAIC,aAAA;AAAA,IAClC;AAAA;AAAA,EACF;AACM,QAAA,EAAE,2BAA2BC,cAAA;AAAA,IACjCC,+DAAAA;AAAAA,EACF;AACM,QAAA,EAAE,kBAAkB,IAAIC,sCAA0B;AAClD,QAAA,EAAE,sBAAsB,IAAIC,yCAA6B;AAE/DC,eAAAA,UAAU,MAAM;AAEd,sBAAkB,CAAC,UAAU;AAAA,MAC3B,GAAI,QAAQ,CAAC;AAAA,MACb,eAAe,WAAW;AAAA,IAAA,EAC1B;AACF,0BAAsB,CAAC,UAAU;AAAA,MAC/B,GAAG;AAAA,MACH,CAAC,WAAW,GAAG,GAAG;AAAA,IAAA,EAClB;AAAA,EACJ,GAAG,EAAE;AAGH,SAAAC,2BAAA;AAAA,IAACC,sEAAA;AAAA,IAAA;AAAA,MACC,kBAAkB,QAAQ,qBAAqB,WAAW,CAAC;AAAA,MAE3D,UAAAC,2BAAA,KAAC,OAAI,EAAA,WAAU,sCACb,UAAA;AAAA,QAAAF,2BAAA;AAAA,UAACG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src/components/DictionaryFieldEditor/DictionaryFieldEditor.tsx"],"sourcesContent":["'use client';\n\nimport type { Dictionary } from '@intlayer/core';\nimport {\n useConfiguration,\n useDictionariesRecordActions,\n useFocusDictionaryActions,\n} from '@intlayer/editor-react';\nimport { ArrowLeft } from 'lucide-react';\nimport { useEffect, useState, type FC } from 'react';\nimport { useDictionary } from 'react-intlayer';\nimport { Button } from '../Button';\nimport { LocaleSwitcherContentProvider } from '../LocaleSwitcherContentDropDown';\nimport { SwitchSelector } from '../SwitchSelector';\nimport { ContentEditor } from './ContentEditor';\nimport { DictionaryDetailsForm } from './DictionaryDetails/DictionaryDetailsForm';\nimport { dictionaryFieldEditorContent } from './dictionaryFieldEditor.content';\nimport { JSONEditor } from './JSONEditor';\nimport { SaveForm } from './SaveForm/SaveForm';\nimport { StructureEditor } from './StructureEditor';\n\ntype DictionaryFieldEditorProps = {\n dictionary: Dictionary;\n onClickDictionaryList?: () => void;\n onDelete?: () => void;\n isDarkMode?: boolean;\n mode: ('local' | 'remote')[];\n};\n\nenum EditorViewType {\n DetailsEditor,\n ContentEditor,\n StructureEditor,\n JSONEditor,\n}\n\nexport const DictionaryFieldEditor: FC<DictionaryFieldEditorProps> = ({\n dictionary,\n onClickDictionaryList,\n isDarkMode,\n mode,\n onDelete,\n}) => {\n const config = useConfiguration();\n const [editorView, setEditorView] = useState<EditorViewType>(\n EditorViewType.ContentEditor\n );\n const { returnToDictionaryList } = useDictionary(\n dictionaryFieldEditorContent\n );\n const { setFocusedContent } = useFocusDictionaryActions();\n const { setLocaleDictionaries } = useDictionariesRecordActions();\n\n useEffect(() => {\n // Focus the dictionary if not focused\n setFocusedContent((prev) => ({\n ...(prev ?? {}),\n dictionaryKey: dictionary.key,\n }));\n setLocaleDictionaries((prev) => ({\n ...prev,\n [dictionary.key]: dictionary,\n }));\n }, []);\n\n return (\n <LocaleSwitcherContentProvider\n availableLocales={config?.internationalization.locales ?? []}\n >\n <div className=\"flex size-full flex-col gap-6 px-2\">\n <Button\n onClick={onClickDictionaryList}\n variant=\"hoverable\"\n className=\"z-10 ml-5 mr-auto\"\n color=\"text\"\n Icon={ArrowLeft}\n label={returnToDictionaryList.label.value}\n >\n {returnToDictionaryList.text}\n </Button>\n\n <SwitchSelector\n defaultValue={editorView}\n onChange={(value) => setEditorView(value)}\n color=\"text\"\n size=\"sm\"\n className=\"m-auto w-full max-w-xl\"\n choices={[\n {\n content: 'Details',\n value: EditorViewType.DetailsEditor,\n },\n {\n content: 'Structure',\n value: EditorViewType.StructureEditor,\n },\n {\n content: 'Content',\n value: EditorViewType.ContentEditor,\n },\n {\n content: 'JSON',\n value: EditorViewType.JSONEditor,\n },\n ].filter(\n ({ value }) =>\n !(\n !mode.includes('remote') &&\n value === EditorViewType.DetailsEditor\n )\n )}\n />\n\n {editorView === EditorViewType.DetailsEditor && (\n <DictionaryDetailsForm dictionary={dictionary} />\n )}\n {editorView === EditorViewType.StructureEditor && (\n <StructureEditor dictionary={dictionary} />\n )}\n {editorView === EditorViewType.ContentEditor && (\n <ContentEditor dictionary={dictionary} isDarkMode={isDarkMode} />\n )}\n {editorView === EditorViewType.JSONEditor && (\n <JSONEditor dictionary={dictionary} isDarkMode={isDarkMode} />\n )}\n\n <SaveForm\n dictionary={dictionary}\n mode={mode}\n onDelete={() => {\n setFocusedContent(null);\n onDelete?.();\n }}\n />\n </div>\n </LocaleSwitcherContentProvider>\n );\n};\n"],"names":["useConfiguration","useState","useDictionary","dictionaryFieldEditorContent","useFocusDictionaryActions","useDictionariesRecordActions","useEffect","jsx","LocaleSwitcherContentProvider","jsxs","Button","ArrowLeft","SwitchSelector","DictionaryDetailsForm","StructureEditor","ContentEditor","JSONEditor","SaveForm"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoCO,MAAM,wBAAwD,CAAC;AAAA,EACpE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAAM;AACJ,QAAM,SAASA,YAAAA,iBAAiB;AAC1B,QAAA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;AAAA,gBACE,SAAS;AAAA,gBACT,OAAO;AAAA;AAAA,cAAA;AAAA,YACT,EACA;AAAA,cACA,CAAC,EAAE,MACD,MAAA,EACE,CAAC,KAAK,SAAS,QAAQ,KACvB,UAAU;AAAA,YAAA;AAAA,UAEhB;AAAA,QACF;AAAA,QAEC,eAAe,KACbL,2BAAAA,IAAAM,yEAAAA,uBAAA,EAAsB,WAAwB,CAAA;AAAA,QAEhD,eAAe,KACbN,2BAAAA,IAAAO,iDAAAA,iBAAA,EAAgB,WAAwB,CAAA;AAAA,QAE1C,eAAe,KACbP,2BAAA,IAAAQ,+CAAA,eAAA,EAAc,YAAwB,YAAwB;AAAA,QAEhE,eAAe,KACbR,2BAAA,IAAAS,4CAAA,YAAA,EAAW,YAAwB,YAAwB;AAAA,QAG9DT,2BAAA;AAAA,UAACU,mDAAA;AAAA,UAAA;AAAA,YACC;AAAA,YACA;AAAA,YACA,UAAU,MAAM;AACd,gCAAkB,IAAI;AACX,yBAAA;AAAA,YAAA;AAAA,UACb;AAAA,QAAA;AAAA,MACF,EACF,CAAA;AAAA,IAAA;AAAA,EACF;AAEJ;;"}
@@ -3,6 +3,7 @@ import { FC } from 'react';
3
3
  type DictionaryFieldEditorProps = {
4
4
  dictionary: Dictionary;
5
5
  onClickDictionaryList?: () => void;
6
+ onDelete?: () => void;
6
7
  isDarkMode?: boolean;
7
8
  mode: ('local' | 'remote')[];
8
9
  };
@@ -1 +1 @@
1
- {"version":3,"file":"DictionaryFieldEditor.d.ts","sourceRoot":"","sources":["../../../src/components/DictionaryFieldEditor/DictionaryFieldEditor.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAOjD,OAAO,EAAuB,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAYrD,KAAK,0BAA0B,GAAG;IAChC,UAAU,EAAE,UAAU,CAAC;IACvB,qBAAqB,CAAC,EAAE,MAAM,IAAI,CAAC;IACnC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,IAAI,EAAE,CAAC,OAAO,GAAG,QAAQ,CAAC,EAAE,CAAC;CAC9B,CAAC;AASF,eAAO,MAAM,qBAAqB,EAAE,EAAE,CAAC,0BAA0B,CA6FhE,CAAC"}
1
+ {"version":3,"file":"DictionaryFieldEditor.d.ts","sourceRoot":"","sources":["../../../src/components/DictionaryFieldEditor/DictionaryFieldEditor.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAOjD,OAAO,EAAuB,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAYrD,KAAK,0BAA0B,GAAG;IAChC,UAAU,EAAE,UAAU,CAAC;IACvB,qBAAqB,CAAC,EAAE,MAAM,IAAI,CAAC;IACnC,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,IAAI,EAAE,CAAC,OAAO,GAAG,QAAQ,CAAC,EAAE,CAAC;CAC9B,CAAC;AASF,eAAO,MAAM,qBAAqB,EAAE,EAAE,CAAC,0BAA0B,CAqGhE,CAAC"}
@@ -31,7 +31,8 @@ const DictionaryFieldEditor = ({
31
31
  dictionary,
32
32
  onClickDictionaryList,
33
33
  isDarkMode,
34
- mode
34
+ mode,
35
+ onDelete
35
36
  }) => {
36
37
  const config = useConfiguration();
37
38
  const [editorView, setEditorView] = useState(
@@ -108,7 +109,17 @@ const DictionaryFieldEditor = ({
108
109
  editorView === 2 && /* @__PURE__ */ jsx(StructureEditor, { dictionary }),
109
110
  editorView === 1 && /* @__PURE__ */ jsx(ContentEditor, { dictionary, isDarkMode }),
110
111
  editorView === 3 && /* @__PURE__ */ jsx(JSONEditor, { dictionary, isDarkMode }),
111
- /* @__PURE__ */ jsx(SaveForm, { dictionary, mode })
112
+ /* @__PURE__ */ jsx(
113
+ SaveForm,
114
+ {
115
+ dictionary,
116
+ mode,
117
+ onDelete: () => {
118
+ setFocusedContent(null);
119
+ onDelete?.();
120
+ }
121
+ }
122
+ )
112
123
  ] })
113
124
  }
114
125
  );
@@ -1 +1 @@
1
- {"version":3,"file":"DictionaryFieldEditor.mjs","sources":["../../../src/components/DictionaryFieldEditor/DictionaryFieldEditor.tsx"],"sourcesContent":["'use client';\n\nimport type { Dictionary } from '@intlayer/core';\nimport {\n useConfiguration,\n useDictionariesRecordActions,\n useFocusDictionaryActions,\n} from '@intlayer/editor-react';\nimport { ArrowLeft } from 'lucide-react';\nimport { useEffect, useState, type FC } from 'react';\nimport { useDictionary } from 'react-intlayer';\nimport { Button } from '../Button';\nimport { LocaleSwitcherContentProvider } from '../LocaleSwitcherContentDropDown';\nimport { SwitchSelector } from '../SwitchSelector';\nimport { ContentEditor } from './ContentEditor';\nimport { DictionaryDetailsForm } from './DictionaryDetails/DictionaryDetailsForm';\nimport { dictionaryFieldEditorContent } from './dictionaryFieldEditor.content';\nimport { JSONEditor } from './JSONEditor';\nimport { SaveForm } from './SaveForm/SaveForm';\nimport { StructureEditor } from './StructureEditor';\n\ntype DictionaryFieldEditorProps = {\n dictionary: Dictionary;\n onClickDictionaryList?: () => void;\n isDarkMode?: boolean;\n mode: ('local' | 'remote')[];\n};\n\nenum EditorViewType {\n DetailsEditor,\n ContentEditor,\n StructureEditor,\n JSONEditor,\n}\n\nexport const DictionaryFieldEditor: FC<DictionaryFieldEditorProps> = ({\n dictionary,\n onClickDictionaryList,\n isDarkMode,\n mode,\n}) => {\n const config = useConfiguration();\n const [editorView, setEditorView] = useState<EditorViewType>(\n EditorViewType.ContentEditor\n );\n const { returnToDictionaryList } = useDictionary(\n dictionaryFieldEditorContent\n );\n const { setFocusedContent } = useFocusDictionaryActions();\n const { setLocaleDictionaries } = useDictionariesRecordActions();\n\n useEffect(() => {\n // Focus the dictionary if not focused\n setFocusedContent((prev) => ({\n ...(prev ?? {}),\n dictionaryKey: dictionary.key,\n }));\n setLocaleDictionaries((prev) => ({\n ...prev,\n [dictionary.key]: dictionary,\n }));\n }, []);\n\n return (\n <LocaleSwitcherContentProvider\n availableLocales={config?.internationalization.locales ?? []}\n >\n <div className=\"flex size-full flex-col gap-6 px-2\">\n <Button\n onClick={onClickDictionaryList}\n variant=\"hoverable\"\n className=\"z-10 ml-5 mr-auto\"\n color=\"text\"\n Icon={ArrowLeft}\n label={returnToDictionaryList.label.value}\n >\n {returnToDictionaryList.text}\n </Button>\n\n <SwitchSelector\n defaultValue={editorView}\n onChange={(value) => setEditorView(value)}\n color=\"text\"\n size=\"sm\"\n className=\"m-auto w-full max-w-xl\"\n choices={[\n {\n content: 'Details',\n value: EditorViewType.DetailsEditor,\n },\n {\n content: 'Structure',\n value: EditorViewType.StructureEditor,\n },\n {\n content: 'Content',\n value: EditorViewType.ContentEditor,\n },\n {\n content: 'JSON',\n value: EditorViewType.JSONEditor,\n },\n ].filter(\n ({ value }) =>\n !(\n !mode.includes('remote') &&\n value === EditorViewType.DetailsEditor\n )\n )}\n />\n\n {editorView === EditorViewType.DetailsEditor && (\n <DictionaryDetailsForm dictionary={dictionary} />\n )}\n {editorView === EditorViewType.StructureEditor && (\n <StructureEditor dictionary={dictionary} />\n )}\n {editorView === EditorViewType.ContentEditor && (\n <ContentEditor dictionary={dictionary} isDarkMode={isDarkMode} />\n )}\n {editorView === EditorViewType.JSONEditor && (\n <JSONEditor dictionary={dictionary} isDarkMode={isDarkMode} />\n )}\n\n <SaveForm dictionary={dictionary} mode={mode} />\n </div>\n </LocaleSwitcherContentProvider>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmCO,MAAM,wBAAwD,CAAC;AAAA,EACpE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAAM;AACJ,QAAM,SAAS,iBAAiB;AAC1B,QAAA,CAAC,YAAY,aAAa,IAAI;AAAA,IAClC;AAAA;AAAA,EACF;AACM,QAAA,EAAE,2BAA2B;AAAA,IACjC;AAAA,EACF;AACM,QAAA,EAAE,kBAAkB,IAAI,0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,CAAA;AAAA,QAEhD,eAAe,KACb,oBAAA,iBAAA,EAAgB,WAAwB,CAAA;AAAA,QAE1C,eAAe,KACb,oBAAA,eAAA,EAAc,YAAwB,YAAwB;AAAA,QAEhE,eAAe,KACb,oBAAA,YAAA,EAAW,YAAwB,YAAwB;AAAA,QAG9D,oBAAC,UAAS,EAAA,YAAwB,KAAY,CAAA;AAAA,MAAA,EAChD,CAAA;AAAA,IAAA;AAAA,EACF;AAEJ;"}
1
+ {"version":3,"file":"DictionaryFieldEditor.mjs","sources":["../../../src/components/DictionaryFieldEditor/DictionaryFieldEditor.tsx"],"sourcesContent":["'use client';\n\nimport type { Dictionary } from '@intlayer/core';\nimport {\n useConfiguration,\n useDictionariesRecordActions,\n useFocusDictionaryActions,\n} from '@intlayer/editor-react';\nimport { ArrowLeft } from 'lucide-react';\nimport { useEffect, useState, type FC } from 'react';\nimport { useDictionary } from 'react-intlayer';\nimport { Button } from '../Button';\nimport { LocaleSwitcherContentProvider } from '../LocaleSwitcherContentDropDown';\nimport { SwitchSelector } from '../SwitchSelector';\nimport { ContentEditor } from './ContentEditor';\nimport { DictionaryDetailsForm } from './DictionaryDetails/DictionaryDetailsForm';\nimport { dictionaryFieldEditorContent } from './dictionaryFieldEditor.content';\nimport { JSONEditor } from './JSONEditor';\nimport { SaveForm } from './SaveForm/SaveForm';\nimport { StructureEditor } from './StructureEditor';\n\ntype DictionaryFieldEditorProps = {\n dictionary: Dictionary;\n onClickDictionaryList?: () => void;\n onDelete?: () => void;\n isDarkMode?: boolean;\n mode: ('local' | 'remote')[];\n};\n\nenum EditorViewType {\n DetailsEditor,\n ContentEditor,\n StructureEditor,\n JSONEditor,\n}\n\nexport const DictionaryFieldEditor: FC<DictionaryFieldEditorProps> = ({\n dictionary,\n onClickDictionaryList,\n isDarkMode,\n mode,\n onDelete,\n}) => {\n const config = useConfiguration();\n const [editorView, setEditorView] = useState<EditorViewType>(\n EditorViewType.ContentEditor\n );\n const { returnToDictionaryList } = useDictionary(\n dictionaryFieldEditorContent\n );\n const { setFocusedContent } = useFocusDictionaryActions();\n const { setLocaleDictionaries } = useDictionariesRecordActions();\n\n useEffect(() => {\n // Focus the dictionary if not focused\n setFocusedContent((prev) => ({\n ...(prev ?? {}),\n dictionaryKey: dictionary.key,\n }));\n setLocaleDictionaries((prev) => ({\n ...prev,\n [dictionary.key]: dictionary,\n }));\n }, []);\n\n return (\n <LocaleSwitcherContentProvider\n availableLocales={config?.internationalization.locales ?? []}\n >\n <div className=\"flex size-full flex-col gap-6 px-2\">\n <Button\n onClick={onClickDictionaryList}\n variant=\"hoverable\"\n className=\"z-10 ml-5 mr-auto\"\n color=\"text\"\n Icon={ArrowLeft}\n label={returnToDictionaryList.label.value}\n >\n {returnToDictionaryList.text}\n </Button>\n\n <SwitchSelector\n defaultValue={editorView}\n onChange={(value) => setEditorView(value)}\n color=\"text\"\n size=\"sm\"\n className=\"m-auto w-full max-w-xl\"\n choices={[\n {\n content: 'Details',\n value: EditorViewType.DetailsEditor,\n },\n {\n content: 'Structure',\n value: EditorViewType.StructureEditor,\n },\n {\n content: 'Content',\n value: EditorViewType.ContentEditor,\n },\n {\n content: 'JSON',\n value: EditorViewType.JSONEditor,\n },\n ].filter(\n ({ value }) =>\n !(\n !mode.includes('remote') &&\n value === EditorViewType.DetailsEditor\n )\n )}\n />\n\n {editorView === EditorViewType.DetailsEditor && (\n <DictionaryDetailsForm dictionary={dictionary} />\n )}\n {editorView === EditorViewType.StructureEditor && (\n <StructureEditor dictionary={dictionary} />\n )}\n {editorView === EditorViewType.ContentEditor && (\n <ContentEditor dictionary={dictionary} isDarkMode={isDarkMode} />\n )}\n {editorView === EditorViewType.JSONEditor && (\n <JSONEditor dictionary={dictionary} isDarkMode={isDarkMode} />\n )}\n\n <SaveForm\n dictionary={dictionary}\n mode={mode}\n onDelete={() => {\n setFocusedContent(null);\n onDelete?.();\n }}\n />\n </div>\n </LocaleSwitcherContentProvider>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;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,gBACE,SAAS;AAAA,gBACT,OAAO;AAAA;AAAA,cACT;AAAA,cACA;AAAA,gBACE,SAAS;AAAA,gBACT,OAAO;AAAA;AAAA,cAAA;AAAA,YACT,EACA;AAAA,cACA,CAAC,EAAE,MACD,MAAA,EACE,CAAC,KAAK,SAAS,QAAQ,KACvB,UAAU;AAAA,YAAA;AAAA,UAEhB;AAAA,QACF;AAAA,QAEC,eAAe,KACb,oBAAA,uBAAA,EAAsB,WAAwB,CAAA;AAAA,QAEhD,eAAe,KACb,oBAAA,iBAAA,EAAgB,WAAwB,CAAA;AAAA,QAE1C,eAAe,KACb,oBAAA,eAAA,EAAc,YAAwB,YAAwB;AAAA,QAEhE,eAAe,KACb,oBAAA,YAAA,EAAW,YAAwB,YAAwB;AAAA,QAG9D;AAAA,UAAC;AAAA,UAAA;AAAA,YACC;AAAA,YACA;AAAA,YACA,UAAU,MAAM;AACd,gCAAkB,IAAI;AACX,yBAAA;AAAA,YAAA;AAAA,UACb;AAAA,QAAA;AAAA,MACF,EACF,CAAA;AAAA,IAAA;AAAA,EACF;AAEJ;"}
@@ -6,6 +6,7 @@ const editorReact = require("@intlayer/editor-react");
6
6
  const lucideReact = require("lucide-react");
7
7
  const ReactExports = require("react");
8
8
  const reactIntlayer = require("react-intlayer");
9
+ const components_Modal_Modal = require("../../Modal/Modal.cjs");
9
10
  require("../../../hooks/useScrollBlockage/useScrollBlockageStore.cjs");
10
11
  require("../../../hooks/useAsync/useAsyncStateStore.cjs");
11
12
  const hooks_intlayerAPIHooks = require("../../../hooks/intlayerAPIHooks.cjs");
@@ -28,7 +29,6 @@ require("../../Auth/ChangePasswordForm/changePasswordForm.content.cjs");
28
29
  require("../../Auth/ChangePasswordForm/useChangePasswordSchema.content.cjs");
29
30
  require("../../Auth/ResetPasswordForm/resetPasswordContent.content.cjs");
30
31
  require("../../Auth/ResetPasswordForm/useResetPasswordSchema.content.cjs");
31
- const components_Modal_Modal = require("../../Modal/Modal.cjs");
32
32
  require("@intlayer/config/built");
33
33
  require("../../Auth/VerifyEmailForm/index.content.cjs");
34
34
  require("../../Auth/DefineNewPasswordForm/defineNewPasswordForm.content.cjs");
@@ -38,16 +38,19 @@ const SaveForm = ({
38
38
  dictionary,
39
39
  mode,
40
40
  className,
41
+ onDelete,
41
42
  ...props
42
43
  }) => {
43
44
  const [isFormatAlertModalOpen, setIsFormatAlertModalOpen] = ReactExports.useState(false);
44
45
  const { setLocaleDictionary } = editorReact.useDictionariesRecordActions();
46
+ const { deleteDictionary, isLoading: isDeleting } = hooks_intlayerAPIHooks.useDeleteDictionary();
45
47
  const { writeDictionary, isLoading: isWriting } = hooks_intlayerAPIHooks.useWriteDictionary();
46
48
  const { pushDictionaries, isLoading: isPushing } = hooks_intlayerAPIHooks.usePushDictionaries();
47
49
  const isLoading = isWriting || isPushing;
48
50
  const isJsonFormat = mode.includes("local") && dictionary.filePath?.endsWith(".json");
49
51
  const { editedContent, restoreEditedContent } = editorReact.useEditedContent();
50
52
  const {
53
+ deleteButton,
51
54
  resetButton,
52
55
  saveButton,
53
56
  publishButton,
@@ -57,7 +60,7 @@ const SaveForm = ({
57
60
  const { isAuthenticated } = components_Auth_useAuth_index.useAuth();
58
61
  const editedDictionary = editedContent?.[dictionary.key];
59
62
  const isEdited = editedDictionary && JSON.stringify(editedDictionary) !== JSON.stringify(dictionary);
60
- const isLocalDictionary = typeof dictionary?._id === "undefined";
63
+ const isDistantDictionary = typeof dictionary?._id !== "undefined";
61
64
  const handleSaveDictionaryConfirmation = async () => {
62
65
  if (!editedContent?.[dictionary.key]) return;
63
66
  const updatedDictionary = {
@@ -82,6 +85,16 @@ const SaveForm = ({
82
85
  }
83
86
  });
84
87
  };
88
+ const handleDeleteDictionary = async () => {
89
+ if (!dictionary._id) return;
90
+ await deleteDictionary(
91
+ dictionary._id.toString()
92
+ ).then((res) => {
93
+ if (res) {
94
+ onDelete?.();
95
+ }
96
+ });
97
+ };
85
98
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
86
99
  /* @__PURE__ */ jsxRuntime.jsx(
87
100
  components_Modal_Modal.Modal,
@@ -127,6 +140,19 @@ const SaveForm = ({
127
140
  className: utils_cn.cn("flex justify-end gap-2 max-md:flex-col", className),
128
141
  ...props,
129
142
  children: [
143
+ mode.includes("remote") && isDistantDictionary && onDelete && isAuthenticated && /* @__PURE__ */ jsxRuntime.jsx(
144
+ components_Form_layout_FormItemLayout.Form.Button,
145
+ {
146
+ label: deleteButton.label.value,
147
+ Icon: lucideReact.Trash,
148
+ color: "error",
149
+ variant: "outline",
150
+ className: "max-md:w-full",
151
+ isLoading: isDeleting,
152
+ onClick: handleDeleteDictionary,
153
+ children: deleteButton.text
154
+ }
155
+ ),
130
156
  isEdited && /* @__PURE__ */ jsxRuntime.jsx(
131
157
  components_Form_layout_FormItemLayout.Form.Button,
132
158
  {
@@ -154,7 +180,7 @@ const SaveForm = ({
154
180
  children: downloadButton.text
155
181
  }
156
182
  ),
157
- mode.includes("remote") && isAuthenticated && isLocalDictionary && /* @__PURE__ */ jsxRuntime.jsx(
183
+ mode.includes("remote") && isAuthenticated && !isDistantDictionary && /* @__PURE__ */ jsxRuntime.jsx(
158
184
  components_Form_layout_FormItemLayout.Form.Button,
159
185
  {
160
186
  label: publishButton.label.value,
@@ -167,7 +193,7 @@ const SaveForm = ({
167
193
  children: publishButton.text
168
194
  }
169
195
  ),
170
- mode.includes("remote") && isAuthenticated && !isLocalDictionary && isEdited && /* @__PURE__ */ jsxRuntime.jsx(
196
+ mode.includes("remote") && isAuthenticated && isDistantDictionary && isEdited && /* @__PURE__ */ jsxRuntime.jsx(
171
197
  components_Form_layout_FormItemLayout.Form.Button,
172
198
  {
173
199
  label: saveButton.label.value,