@intlayer/design-system 5.1.3 → 5.1.5

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 (197) hide show
  1. package/dist/.vite/manifest.json +37 -102
  2. package/dist/Form-BZUDRfoN.js.map +1 -1
  3. package/dist/Form-yi0CMK-a.cjs.map +1 -1
  4. package/dist/components/Auth/ExternalsLoginButtons/ExternalsLoginButtons.cjs +1 -1
  5. package/dist/components/Auth/ExternalsLoginButtons/ExternalsLoginButtons.mjs +1 -1
  6. package/dist/components/Command/index.d.ts +1 -1
  7. package/dist/components/Container/index.cjs +6 -7
  8. package/dist/components/Container/index.cjs.map +1 -1
  9. package/dist/components/Container/index.mjs +6 -7
  10. package/dist/components/Container/index.mjs.map +1 -1
  11. package/dist/components/DictionaryEditor/DictionaryEditor.cjs +3 -3
  12. package/dist/components/DictionaryEditor/DictionaryEditor.cjs.map +1 -1
  13. package/dist/components/DictionaryEditor/DictionaryEditor.d.ts +1 -1
  14. package/dist/components/DictionaryEditor/DictionaryEditor.d.ts.map +1 -1
  15. package/dist/components/DictionaryEditor/DictionaryEditor.mjs +3 -3
  16. package/dist/components/DictionaryEditor/DictionaryEditor.mjs.map +1 -1
  17. package/dist/components/DictionaryEditor/ValidDictionaryChangeButtons.cjs +33 -20
  18. package/dist/components/DictionaryEditor/ValidDictionaryChangeButtons.cjs.map +1 -1
  19. package/dist/components/DictionaryEditor/ValidDictionaryChangeButtons.d.ts.map +1 -1
  20. package/dist/components/DictionaryEditor/ValidDictionaryChangeButtons.mjs +34 -21
  21. package/dist/components/DictionaryEditor/ValidDictionaryChangeButtons.mjs.map +1 -1
  22. package/dist/components/DictionaryFieldEditor/ContentEditor.cjs +20 -9
  23. package/dist/components/DictionaryFieldEditor/ContentEditor.cjs.map +1 -1
  24. package/dist/components/DictionaryFieldEditor/ContentEditor.d.ts.map +1 -1
  25. package/dist/components/DictionaryFieldEditor/ContentEditor.mjs +21 -10
  26. package/dist/components/DictionaryFieldEditor/ContentEditor.mjs.map +1 -1
  27. package/dist/components/DictionaryFieldEditor/ContentEditorView/TextEditor.cjs +241 -209
  28. package/dist/components/DictionaryFieldEditor/ContentEditorView/TextEditor.cjs.map +1 -1
  29. package/dist/components/DictionaryFieldEditor/ContentEditorView/TextEditor.d.ts +1 -0
  30. package/dist/components/DictionaryFieldEditor/ContentEditorView/TextEditor.d.ts.map +1 -1
  31. package/dist/components/DictionaryFieldEditor/ContentEditorView/TextEditor.mjs +245 -213
  32. package/dist/components/DictionaryFieldEditor/ContentEditorView/TextEditor.mjs.map +1 -1
  33. package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.cjs.map +1 -1
  34. package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.d.ts +1 -1
  35. package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.d.ts.map +1 -1
  36. package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.mjs.map +1 -1
  37. package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.cjs +1 -1
  38. package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.mjs +1 -1
  39. package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.cjs +92 -120
  40. package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.cjs.map +1 -1
  41. package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.d.ts +1 -1
  42. package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.d.ts.map +1 -1
  43. package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.mjs +94 -122
  44. package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.mjs.map +1 -1
  45. package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.cjs +0 -143
  46. package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.cjs.map +1 -1
  47. package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.d.ts +0 -143
  48. package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.d.ts.map +1 -1
  49. package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.mjs +0 -143
  50. package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.mjs.map +1 -1
  51. package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.cjs +1 -2
  52. package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.cjs.map +1 -1
  53. package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.d.ts +0 -3
  54. package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.d.ts.map +1 -1
  55. package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.mjs +1 -2
  56. package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.mjs.map +1 -1
  57. package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.cjs +51 -70
  58. package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.cjs.map +1 -1
  59. package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.d.ts +1 -1
  60. package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.d.ts.map +1 -1
  61. package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.mjs +51 -70
  62. package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.mjs.map +1 -1
  63. package/dist/components/DictionaryFieldEditor/EnumKeyInput.cjs +1 -1
  64. package/dist/components/DictionaryFieldEditor/EnumKeyInput.cjs.map +1 -1
  65. package/dist/components/DictionaryFieldEditor/EnumKeyInput.mjs +1 -1
  66. package/dist/components/DictionaryFieldEditor/EnumKeyInput.mjs.map +1 -1
  67. package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.cjs +18 -12
  68. package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.cjs.map +1 -1
  69. package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.d.ts.map +1 -1
  70. package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.mjs +19 -13
  71. package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.mjs.map +1 -1
  72. package/dist/components/DictionaryFieldEditor/NavigationView/navigationViewNode.content.cjs +64 -0
  73. package/dist/components/DictionaryFieldEditor/NavigationView/navigationViewNode.content.cjs.map +1 -1
  74. package/dist/components/DictionaryFieldEditor/NavigationView/navigationViewNode.content.d.ts +64 -0
  75. package/dist/components/DictionaryFieldEditor/NavigationView/navigationViewNode.content.d.ts.map +1 -1
  76. package/dist/components/DictionaryFieldEditor/NavigationView/navigationViewNode.content.mjs +64 -0
  77. package/dist/components/DictionaryFieldEditor/NavigationView/navigationViewNode.content.mjs.map +1 -1
  78. package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.cjs +52 -103
  79. package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.cjs.map +1 -1
  80. package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.d.ts +3 -3
  81. package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.d.ts.map +1 -1
  82. package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.mjs +56 -107
  83. package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.mjs.map +1 -1
  84. package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.cjs +0 -32
  85. package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.cjs.map +1 -1
  86. package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.d.ts +0 -32
  87. package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.d.ts.map +1 -1
  88. package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.mjs +0 -32
  89. package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.mjs.map +1 -1
  90. package/dist/components/DictionaryFieldEditor/StructureEditor.cjs +4 -4
  91. package/dist/components/DictionaryFieldEditor/StructureEditor.cjs.map +1 -1
  92. package/dist/components/DictionaryFieldEditor/StructureEditor.d.ts.map +1 -1
  93. package/dist/components/DictionaryFieldEditor/StructureEditor.mjs +4 -4
  94. package/dist/components/DictionaryFieldEditor/StructureEditor.mjs.map +1 -1
  95. package/dist/components/DictionaryFieldEditor/StructureView/StructureView.cjs +3 -2
  96. package/dist/components/DictionaryFieldEditor/StructureView/StructureView.cjs.map +1 -1
  97. package/dist/components/DictionaryFieldEditor/StructureView/StructureView.d.ts.map +1 -1
  98. package/dist/components/DictionaryFieldEditor/StructureView/StructureView.mjs +3 -2
  99. package/dist/components/DictionaryFieldEditor/StructureView/StructureView.mjs.map +1 -1
  100. package/dist/components/DictionaryFieldEditor/index.cjs +0 -2
  101. package/dist/components/DictionaryFieldEditor/index.cjs.map +1 -1
  102. package/dist/components/DictionaryFieldEditor/index.d.ts +0 -1
  103. package/dist/components/DictionaryFieldEditor/index.d.ts.map +1 -1
  104. package/dist/components/DictionaryFieldEditor/index.mjs +0 -2
  105. package/dist/components/DictionaryFieldEditor/index.mjs.map +1 -1
  106. package/dist/components/Form/FormBase.cjs +0 -1
  107. package/dist/components/Form/FormBase.cjs.map +1 -1
  108. package/dist/components/Form/FormBase.d.ts +1 -4
  109. package/dist/components/Form/FormBase.d.ts.map +1 -1
  110. package/dist/components/Form/FormBase.mjs +0 -1
  111. package/dist/components/Form/FormBase.mjs.map +1 -1
  112. package/dist/components/Form/elements/EditableFieldInputElement.d.ts +1 -1
  113. package/dist/components/Form/elements/EditableFieldInputElement.d.ts.map +1 -1
  114. package/dist/components/Form/elements/EditableFieldTextAreaElement.d.ts +1 -1
  115. package/dist/components/Form/elements/EditableFieldTextAreaElement.d.ts.map +1 -1
  116. package/dist/components/Input/Checkbox.cjs +0 -1
  117. package/dist/components/Input/Checkbox.cjs.map +1 -1
  118. package/dist/components/Input/Checkbox.mjs +0 -1
  119. package/dist/components/Input/Checkbox.mjs.map +1 -1
  120. package/dist/components/Input/Input.cjs +1 -1
  121. package/dist/components/Input/Input.cjs.map +1 -1
  122. package/dist/components/Input/Input.mjs +1 -1
  123. package/dist/components/Input/Input.mjs.map +1 -1
  124. package/dist/components/KeyboardScreenAdapter/index.cjs +25 -0
  125. package/dist/components/KeyboardScreenAdapter/index.cjs.map +1 -0
  126. package/dist/components/KeyboardScreenAdapter/index.d.ts +3 -0
  127. package/dist/components/KeyboardScreenAdapter/index.d.ts.map +1 -0
  128. package/dist/components/KeyboardScreenAdapter/index.mjs +25 -0
  129. package/dist/components/KeyboardScreenAdapter/index.mjs.map +1 -0
  130. package/dist/components/MaxHeightSmoother/index.cjs +3 -1
  131. package/dist/components/MaxHeightSmoother/index.cjs.map +1 -1
  132. package/dist/components/MaxHeightSmoother/index.d.ts.map +1 -1
  133. package/dist/components/MaxHeightSmoother/index.mjs +3 -1
  134. package/dist/components/MaxHeightSmoother/index.mjs.map +1 -1
  135. package/dist/components/Modal/Modal.cjs +15 -13
  136. package/dist/components/Modal/Modal.cjs.map +1 -1
  137. package/dist/components/Modal/Modal.d.ts.map +1 -1
  138. package/dist/components/Modal/Modal.mjs +15 -13
  139. package/dist/components/Modal/Modal.mjs.map +1 -1
  140. package/dist/components/RightDrawer/RightDrawer.cjs +1 -1
  141. package/dist/components/RightDrawer/RightDrawer.cjs.map +1 -1
  142. package/dist/components/RightDrawer/RightDrawer.mjs +1 -1
  143. package/dist/components/RightDrawer/RightDrawer.mjs.map +1 -1
  144. package/dist/components/Select/Multiselect.cjs +0 -1
  145. package/dist/components/Select/Multiselect.cjs.map +1 -1
  146. package/dist/components/Select/Multiselect.d.ts.map +1 -1
  147. package/dist/components/Select/Multiselect.mjs +1 -2
  148. package/dist/components/Select/Multiselect.mjs.map +1 -1
  149. package/dist/components/Select/Select.cjs +0 -1
  150. package/dist/components/Select/Select.cjs.map +1 -1
  151. package/dist/components/Select/Select.d.ts.map +1 -1
  152. package/dist/components/Select/Select.mjs +0 -1
  153. package/dist/components/Select/Select.mjs.map +1 -1
  154. package/dist/components/index.cjs +2 -2
  155. package/dist/components/index.d.ts +1 -0
  156. package/dist/components/index.d.ts.map +1 -1
  157. package/dist/components/index.mjs +2 -2
  158. package/dist/hooks/index.cjs +2 -0
  159. package/dist/hooks/index.cjs.map +1 -1
  160. package/dist/hooks/index.d.ts +1 -0
  161. package/dist/hooks/index.d.ts.map +1 -1
  162. package/dist/hooks/index.mjs +2 -0
  163. package/dist/hooks/index.mjs.map +1 -1
  164. package/dist/hooks/intlayerAPIHooks.cjs +1 -1
  165. package/dist/hooks/intlayerAPIHooks.cjs.map +1 -1
  166. package/dist/hooks/intlayerAPIHooks.d.ts.map +1 -1
  167. package/dist/hooks/intlayerAPIHooks.mjs +1 -1
  168. package/dist/hooks/intlayerAPIHooks.mjs.map +1 -1
  169. package/dist/hooks/useAsync/useAsyncStateStore.cjs +8 -14
  170. package/dist/hooks/useAsync/useAsyncStateStore.cjs.map +1 -1
  171. package/dist/hooks/useAsync/useAsyncStateStore.d.ts.map +1 -1
  172. package/dist/hooks/useAsync/useAsyncStateStore.mjs +8 -14
  173. package/dist/hooks/useAsync/useAsyncStateStore.mjs.map +1 -1
  174. package/dist/hooks/useKeyboardDetector.cjs +27 -0
  175. package/dist/hooks/useKeyboardDetector.cjs.map +1 -0
  176. package/dist/hooks/useKeyboardDetector.d.ts +5 -0
  177. package/dist/hooks/useKeyboardDetector.d.ts.map +1 -0
  178. package/dist/hooks/useKeyboardDetector.mjs +27 -0
  179. package/dist/hooks/useKeyboardDetector.mjs.map +1 -0
  180. package/dist/{index-BTDHuTxL.js → index-B1w5h_6-.js} +7 -7
  181. package/dist/index-B1w5h_6-.js.map +1 -0
  182. package/dist/index-BCuMWKyy.js.map +1 -1
  183. package/dist/index-BYzBot7l.cjs.map +1 -1
  184. package/dist/{index-Db5Dym4h.cjs → index-U1U6ySIn.cjs} +7 -7
  185. package/dist/index-U1U6ySIn.cjs.map +1 -0
  186. package/dist/tailwind.css +1 -1
  187. package/dist/zod-BV4nCGJE.js.map +1 -1
  188. package/dist/zod-DSrtTSD_.cjs.map +1 -1
  189. package/package.json +19 -19
  190. package/dist/components/DictionaryFieldEditor/ContentEditorView/EditorView.cjs +0 -49
  191. package/dist/components/DictionaryFieldEditor/ContentEditorView/EditorView.cjs.map +0 -1
  192. package/dist/components/DictionaryFieldEditor/ContentEditorView/EditorView.d.ts +0 -10
  193. package/dist/components/DictionaryFieldEditor/ContentEditorView/EditorView.d.ts.map +0 -1
  194. package/dist/components/DictionaryFieldEditor/ContentEditorView/EditorView.mjs +0 -49
  195. package/dist/components/DictionaryFieldEditor/ContentEditorView/EditorView.mjs.map +0 -1
  196. package/dist/index-BTDHuTxL.js.map +0 -1
  197. package/dist/index-Db5Dym4h.cjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"navigationViewNode.content.mjs","sources":["../../../../src/components/DictionaryFieldEditor/NavigationView/navigationViewNode.content.ts"],"sourcesContent":["import { t, type Dictionary } from 'intlayer';\n\nexport const navigationViewContent = {\n key: 'navigation-view',\n content: {\n tsxNotEditable: t({\n en: 'React node is not editable',\n 'en-GB': 'React node is not editable',\n fr: 'Node React non éditable',\n es: 'Nodo React no editable',\n de: 'React-Knoten ist nicht bearbeitbar',\n ja: '編集できないReactノードです',\n ko: '편집할 수 없는 React 노드입니다',\n zh: '不可编辑的 React 节点',\n it: 'Node React non modificabile',\n pt: 'Nó React não editável',\n hi: 'सम्पादित न करने योग्य React नोड',\n ar: 'عقدة React غير قابلة للتحرير',\n ru: 'React-узел не редактируемый',\n }),\n goToField: {\n label: t({\n en: 'Go to field',\n 'en-GB': 'Go to field',\n fr: 'Aller au champ',\n es: 'Ir al campo',\n de: 'Zum Feld gehen',\n ja: 'フィールドに移動',\n ko: '필드로 이동',\n zh: '转到字段',\n it: 'Vai al campo',\n pt: 'Ir para o campo',\n hi: 'फ़ील्ड पर जाएं',\n ar: 'اذهب إلى الحقل',\n ru: 'Перейти к полю',\n }),\n },\n\n goToElement: {\n label: t({\n en: 'Go to element',\n 'en-GB': 'Go to element',\n fr: \"Aller à l'élément\",\n es: 'Ir al elemento',\n de: 'Zum Element gehen',\n ja: '要素に移動',\n ko: '요소로 이동',\n zh: '转到元素',\n it: 'Vai all’elemento',\n pt: 'Ir para o elemento',\n hi: 'तत्व पर जाएं',\n ar: 'اذهب إلى العنصر',\n ru: 'Перейти к элементу',\n }),\n },\n addNewElement: {\n label: t({\n en: 'Click to add element',\n 'en-GB': 'Click to add element',\n fr: 'Cliquez pour ajouter un élément',\n es: 'Haga clic para agregar un elemento',\n de: 'Klicken Sie, um ein Element hinzuzufügen',\n ja: '要素を追加するにはクリック',\n ko: '요소를 추가하려면 클릭하세요',\n zh: '点击添加元素',\n it: 'Clicca per aggiungere un elemento',\n pt: 'Clique para adicionar um elemento',\n hi: 'तत्व जोड़ने के लिए क्लिक करें',\n ar: 'انقر لإضافة عنصر',\n ru: 'Нажмите, чтобы добавить элемент',\n }),\n text: t({\n en: 'Add new element',\n 'en-GB': 'Add new element',\n fr: 'Ajouter un nouvel élément',\n es: 'Agregar nuevo elemento',\n de: 'Neues Element hinzufügen',\n ja: '新しい要素を追加',\n ko: '새 요소 추가',\n zh: '添加新元素',\n it: 'Aggiungi nuovo elemento',\n pt: 'Adicionar novo elemento',\n hi: 'नया तत्व जोड़ें',\n ar: 'أضف عنصرًا جديدًا',\n ru: 'Добавить новый элемент',\n }),\n },\n goToTranslation: {\n label: t({\n en: 'Go to translation',\n 'en-GB': 'Go to translation',\n fr: 'Aller à la traduction',\n es: 'Ir a la traducción',\n de: 'Zur Übersetzung gehen',\n ja: '翻訳に移動',\n ko: '번역으로 이동',\n zh: '转到翻译',\n it: 'Vai alla traduzione',\n pt: 'Ir para a tradução',\n hi: 'अनुवाद पर जाएं',\n ar: 'اذهب إلى الترجمة',\n ru: 'Перейти к переводу',\n }),\n },\n goToEnumeration: {\n label: t({\n en: 'Go to enumeration',\n 'en-GB': 'Go to enumeration',\n fr: \"Aller à l'énumération\",\n es: 'Ir a la enumeración',\n de: 'Zur Aufzählung gehen',\n ja: '列挙に移動',\n ko: '열거로 이동',\n zh: '转到枚举',\n it: 'Vai all ENUMERAZIONE',\n pt: 'Ir para a enumeração',\n hi: 'सूची में जाएं',\n ar: 'اذهب إلى التعداد',\n ru: 'Перейти к перечислению',\n }),\n },\n addNewEnumeration: {\n label: t({\n en: 'Click to add enumeration',\n 'en-GB': 'Click to add enumeration',\n fr: 'Cliquez pour ajouter une énumération',\n es: 'Haga clic para agregar una enumeración',\n de: 'Klicken Sie, um eine Aufzählung hinzuzufügen',\n ja: '列挙を追加するにはクリック',\n ko: '열거를 추가하려면 클릭하세요',\n zh: '点击添加枚举',\n it: 'Clicca per aggiungere un enumerazione',\n pt: 'Clique para adicionar uma enumeração',\n hi: 'सूची जोड़ने के लिए क्लिक करें',\n ar: 'انقر لإضافة تعداد',\n ru: 'Нажмите, чтобы добавить перечисление',\n }),\n text: t({\n en: 'Add new enumeration',\n 'en-GB': 'Add new enumeration',\n fr: 'Ajouter une nouvelle énumération',\n es: 'Agregar nueva enumeración',\n de: 'Neue Aufzählung hinzufügen',\n ja: '新しい列挙を追加',\n ko: '새 목록 추가',\n zh: '添加新枚举',\n it: 'Aggiungi nuova enumerazione',\n pt: 'Adicionar nova enumeração',\n hi: 'नया सूची जोड़ें',\n ar: 'أضف تعدادًا جديدًا',\n ru: 'Добавить новое перечисление',\n }),\n },\n addNewCondition: {\n label: t({\n en: 'Click to add condition',\n 'en-GB': 'Click to add condition',\n fr: 'Cliquez pour ajouter une condition',\n es: 'Haga clic para agregar una condición',\n de: 'Klicken Sie, um eine Bedingung hinzuzufügen',\n ja: '条件を追加するにはクリック',\n ko: '조건을 추가하려면 클릭하세요',\n zh: '点击添加条件',\n it: 'Clicca per aggiungere una condizione',\n pt: 'Clique para adicionar uma condição',\n hi: 'शर्ते जोड़ने के लिए क्लिक करें',\n ar: 'انقر لإضافة شرط',\n ru: 'Нажмите, чтобы добавить условие',\n }),\n text: t({\n en: 'Add new condition',\n 'en-GB': 'Add new condition',\n fr: 'Ajouter une nouvelle condition',\n es: 'Agregar nueva condición',\n de: 'Neue Bedingung hinzufügen',\n ja: '新しい条件を追加',\n ko: '새 조건 추가',\n zh: '添加新条件',\n it: 'Aggiungi nuova condizione',\n pt: 'Adicionar nova condição',\n hi: 'नया शर्ते जोड़ें',\n ar: 'أضف شرطًا جديدًا',\n ru: 'Добавить новое условие',\n }),\n },\n },\n} satisfies Dictionary;\n"],"names":[],"mappings":";AAEO,MAAM,wBAAwB;AAAA,EACnC,KAAK;AAAA,EACL,SAAS;AAAA,IACP,gBAAgB,EAAE;AAAA,MAChB,IAAI;AAAA,MACJ,SAAS;AAAA,MACT,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,IAAA,CACL;AAAA,IACD,WAAW;AAAA,MACT,OAAO,EAAE;AAAA,QACP,IAAI;AAAA,QACJ,SAAS;AAAA,QACT,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,MACL,CAAA;AAAA,IACH;AAAA,IAEA,aAAa;AAAA,MACX,OAAO,EAAE;AAAA,QACP,IAAI;AAAA,QACJ,SAAS;AAAA,QACT,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AA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ieldEditor/NavigationView/navigationViewNode.content.ts"],"sourcesContent":["import { t, type Dictionary } from 'intlayer';\n\nexport const navigationViewContent = {\n key: 'navigation-view',\n content: {\n tsxNotEditable: t({\n en: 'React node is not editable',\n 'en-GB': 'React node is not editable',\n fr: 'Node React non éditable',\n es: 'Nodo React no editable',\n de: 'React-Knoten ist nicht bearbeitbar',\n ja: '編集できないReactノードです',\n ko: '편집할 수 없는 React 노드입니다',\n zh: '不可编辑的 React 节点',\n it: 'Node React non modificabile',\n pt: 'Nó React não editável',\n hi: 'सम्पादित न करने योग्य React नोड',\n ar: 'عقدة React غير قابلة للتحرير',\n ru: 'React-узел не редактируемый',\n }),\n goToField: {\n label: t({\n en: 'Go to field',\n 'en-GB': 'Go to field',\n fr: 'Aller au champ',\n es: 'Ir al campo',\n de: 'Zum Feld gehen',\n ja: 'フィールドに移動',\n ko: '필드로 이동',\n zh: '转到字段',\n it: 'Vai al campo',\n pt: 'Ir para o campo',\n hi: 'फ़ील्ड पर जाएं',\n ar: 'اذهب إلى الحقل',\n ru: 'Перейти к полю',\n }),\n },\n\n goToElement: {\n label: t({\n en: 'Go to element',\n 'en-GB': 'Go to element',\n fr: \"Aller à l'élément\",\n es: 'Ir al elemento',\n de: 'Zum Element gehen',\n ja: '要素に移動',\n ko: '요소로 이동',\n zh: '转到元素',\n it: 'Vai all’elemento',\n pt: 'Ir para o elemento',\n hi: 'तत्व पर जाएं',\n ar: 'اذهب إلى العنصر',\n ru: 'Перейти к элементу',\n }),\n },\n addNewElement: {\n label: t({\n en: 'Click to add element',\n 'en-GB': 'Click to add element',\n fr: 'Cliquez pour ajouter un élément',\n es: 'Haga clic para agregar un elemento',\n de: 'Klicken Sie, um ein Element hinzuzufügen',\n ja: '要素を追加するにはクリック',\n ko: '요소를 추가하려면 클릭하세요',\n zh: '点击添加元素',\n it: 'Clicca per aggiungere un elemento',\n pt: 'Clique para adicionar um elemento',\n hi: 'तत्व जोड़ने के लिए क्लिक करें',\n ar: 'انقر لإضافة عنصر',\n ru: 'Нажмите, чтобы добавить элемент',\n }),\n text: t({\n en: 'Add new element',\n 'en-GB': 'Add new element',\n fr: 'Ajouter un nouvel élément',\n es: 'Agregar nuevo elemento',\n de: 'Neues Element hinzufügen',\n ja: '新しい要素を追加',\n ko: '새 요소 추가',\n zh: '添加新元素',\n it: 'Aggiungi nuovo elemento',\n pt: 'Adicionar novo elemento',\n hi: 'नया तत्व जोड़ें',\n ar: 'أضف عنصرًا جديدًا',\n ru: 'Добавить новый элемент',\n }),\n },\n removeElement: {\n label: t({\n en: 'Click to remove element',\n 'en-GB': 'Click to remove element',\n fr: 'Cliquez pour supprimer un élément',\n es: 'Haga clic para eliminar un elemento',\n de: 'Klicken Sie, um ein Element zu entfernen',\n ja: '要素を削除するにはクリック',\n ko: '요소를 제거하려면 클릭하세요',\n zh: '点击删除元素',\n it: 'Clicca per rimuovere un elemento',\n pt: 'Clique para remover um elemento',\n hi: 'तत्व निकालने के लिए क्लिक करें',\n ar: 'انقر لإزالة عنصر',\n ru: 'Нажмите, чтобы удалить элемент',\n }),\n text: t({\n en: 'Remove element',\n 'en-GB': 'Remove element',\n fr: 'Supprimer l’élément',\n es: 'Eliminar elemento',\n de: 'Element entfernen',\n ja: '要素を削除',\n ko: '요소 제거',\n zh: '删除元素',\n it: 'Rimuovi elemento',\n pt: 'Remover elemento',\n hi: 'तत्व निकालें',\n ar: 'إزالة عنصر',\n ru: 'Удалить элемент',\n }),\n },\n goToTranslation: {\n label: t({\n en: 'Go to translation',\n 'en-GB': 'Go to translation',\n fr: 'Aller à la traduction',\n es: 'Ir a la traducción',\n de: 'Zur Übersetzung gehen',\n ja: '翻訳に移動',\n ko: '번역으로 이동',\n zh: '转到翻译',\n it: 'Vai alla traduzione',\n pt: 'Ir para a tradução',\n hi: 'अनुवाद पर जाएं',\n ar: 'اذهب إلى الترجمة',\n ru: 'Перейти к переводу',\n }),\n },\n goToEnumeration: {\n label: t({\n en: 'Go to enumeration',\n 'en-GB': 'Go to enumeration',\n fr: \"Aller à l'énumération\",\n es: 'Ir a la enumeración',\n de: 'Zur Aufzählung gehen',\n ja: '列挙に移動',\n ko: '열거로 이동',\n zh: '转到枚举',\n it: 'Vai all ENUMERAZIONE',\n pt: 'Ir para a enumeração',\n hi: 'सूची में जाएं',\n ar: 'اذهب إلى التعداد',\n ru: 'Перейти к перечислению',\n }),\n },\n addNewEnumeration: {\n label: t({\n en: 'Click to add enumeration',\n 'en-GB': 'Click to add enumeration',\n fr: 'Cliquez pour ajouter une énumération',\n es: 'Haga clic para agregar una enumeración',\n de: 'Klicken Sie, um eine Aufzählung hinzuzufügen',\n ja: '列挙を追加するにはクリック',\n ko: '열거를 추가하려면 클릭하세요',\n zh: '点击添加枚举',\n it: 'Clicca per aggiungere un enumerazione',\n pt: 'Clique para adicionar uma enumeração',\n hi: 'सूची जोड़ने के लिए क्लिक करें',\n ar: 'انقر لإضافة تعداد',\n ru: 'Нажмите, чтобы добавить перечисление',\n }),\n text: t({\n en: 'Add new enumeration',\n 'en-GB': 'Add new enumeration',\n fr: 'Ajouter une nouvelle énumération',\n es: 'Agregar nueva enumeración',\n de: 'Neue Aufzählung hinzufügen',\n ja: '新しい列挙を追加',\n ko: '새 목록 추가',\n zh: '添加新枚举',\n it: 'Aggiungi nuova enumerazione',\n pt: 'Adicionar nova enumeração',\n hi: 'नया सूची जोड़ें',\n ar: 'أضف تعدادًا جديدًا',\n ru: 'Добавить новое перечисление',\n }),\n },\n removeEnumeration: {\n label: t({\n en: 'Click to remove enumeration',\n 'en-GB': 'Click to remove enumeration',\n fr: 'Cliquez pour supprimer une énumération',\n es: 'Haga clic para eliminar una enumeración',\n de: 'Klicken Sie, um eine Aufzählung zu entfernen',\n ja: '列挙を削除するにはクリック',\n ko: '목록을 제거하려면 클릭하세요',\n zh: '点击删除枚举',\n it: \"Clicca per rimuovere un'enumerazione\",\n pt: 'Clique para remover uma enumeração',\n hi: 'सूची निकालने के लिए क्लिक करें',\n ar: 'انقر لإزالة تعداد',\n ru: 'Нажмите, чтобы удалить перечисление',\n }),\n text: t({\n en: 'Remove enumeration',\n 'en-GB': 'Remove enumeration',\n fr: 'Supprimer l’énumération',\n es: 'Eliminar enumeración',\n de: 'Aufzählung entfernen',\n ja: '列挙を削除',\n ko: '목록 제거',\n zh: '删除枚举',\n it: 'Rimuovi enumerazione',\n pt: 'Remover enumeração',\n hi: 'सूची निकालें',\n ar: 'إزالة تعداد',\n ru: 'Удалить перечисление',\n }),\n },\n addNewCondition: {\n label: t({\n en: 'Click to add condition',\n 'en-GB': 'Click to add condition',\n fr: 'Cliquez pour ajouter une condition',\n es: 'Haga clic para agregar una condición',\n de: 'Klicken Sie, um eine Bedingung hinzuzufügen',\n ja: '条件を追加するにはクリック',\n ko: '조건을 추가하려면 클릭하세요',\n zh: '点击添加条件',\n it: 'Clicca per aggiungere una condizione',\n pt: 'Clique para adicionar uma condição',\n hi: 'शर्ते जोड़ने के लिए क्लिक करें',\n ar: 'انقر لإضافة شرط',\n ru: 'Нажмите, чтобы добавить условие',\n }),\n text: t({\n en: 'Add new condition',\n 'en-GB': 'Add new condition',\n fr: 'Ajouter une nouvelle condition',\n es: 'Agregar nueva condición',\n de: 'Neue Bedingung hinzufügen',\n ja: '新しい条件を追加',\n ko: '새 조건 추가',\n zh: '添加新条件',\n it: 'Aggiungi nuova condizione',\n pt: 'Adicionar nova condição',\n hi: 'नया शर्ते जोड़ें',\n ar: 'أضف شرطًا جديدًا',\n ru: 'Добавить новое условие',\n }),\n },\n },\n} satisfies Dictionary;\n"],"names":[],"mappings":";AAEO,MAAM,wBAAwB;AAAA,EACnC,KAAK;AAAA,EACL,SAAS;AAAA,IACP,gBAAgB,EAAE;AAAA,MAChB,IAAI;AAAA,MACJ,SAAS;AAAA,MACT,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ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ACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,MAAA,CACL;AAAA,MACD,MAAM,EAAE;AAAA,QACN,IAAI;AAAA,QACJ,SAAS;AAAA,QACT,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,MACL,CAAA;AAAA,IAAA;AAAA,EACH;AAEJ;"}
@@ -3,7 +3,6 @@
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
4
4
  const jsxRuntime = require("react/jsx-runtime");
5
5
  const editorReact = require("@intlayer/editor-react");
6
- const intlayer = require("intlayer");
7
6
  const lucideReact = require("lucide-react");
8
7
  const ReactExports = require("react");
9
8
  const reactIntlayer = require("react-intlayer");
@@ -11,123 +10,71 @@ require("../../../hooks/useScrollBlockage/useScrollBlockageStore.cjs");
11
10
  require("../../../hooks/useAsync/useAsyncStateStore.cjs");
12
11
  const hooks_intlayerAPIHooks = require("../../../hooks/intlayerAPIHooks.cjs");
13
12
  require("deepmerge");
14
- require("../../../index-Db5Dym4h.cjs");
15
- require("@intlayer/config/client");
16
- require("../../Button/Button.cjs");
17
- require("../../Auth/ExternalsLoginButtons/externalsLoginButtons.content.cjs");
18
- const components_Form_FormBase = require("../../Form/FormBase.cjs");
13
+ const utils_cn = require("../../../utils/cn.cjs");
14
+ require("@hookform/resolvers");
15
+ require("react-hook-form");
19
16
  require("../../Form/FormField.cjs");
20
17
  const components_Form_layout_FormItemLayout = require("../../../Form-yi0CMK-a.cjs");
21
- require("../../Auth/SignInForm/signIn.content.cjs");
22
- require("zod");
23
- require("../../Auth/SignInForm/useSignInSchema.content.cjs");
24
- require("../../Auth/SignUpForm/signUpForm.content.cjs");
25
- require("../../Auth/SignUpForm/useSignUpSchema.content.cjs");
26
- const components_Auth_useAuth_index = require("../../Auth/useAuth/index.cjs");
27
- require("../../Auth/ChangePasswordForm/changePasswordForm.content.cjs");
28
- require("../../Auth/ChangePasswordForm/useChangePasswordSchema.content.cjs");
29
- require("../../Auth/ResetPasswordForm/resetPasswordContent.content.cjs");
30
- require("../../Auth/ResetPasswordForm/useResetPasswordSchema.content.cjs");
31
- require("../../Modal/Modal.cjs");
32
- require("clsx");
33
- require("tailwind-merge");
34
- require("@intlayer/api");
35
- require("../../Auth/VerifyEmailForm/index.content.cjs");
36
18
  const components_DictionaryFieldEditor_SaveForm_saveForm_content = require("./saveForm.content.cjs");
37
- const components_DictionaryFieldEditor_SaveForm_SaveFormSchema = require("./SaveFormSchema.cjs");
38
- const SaveForm = ({ dictionary, mode }) => {
39
- const { session } = components_Auth_useAuth_index.useAuth();
40
- const project = session?.project;
19
+ const SaveForm = ({
20
+ dictionary,
21
+ mode,
22
+ className,
23
+ ...props
24
+ }) => {
25
+ const { editor } = editorReact.useConfiguration();
41
26
  const { setLocaleDictionary } = editorReact.useDictionariesRecordActions();
42
- const { pushDictionaries } = hooks_intlayerAPIHooks.usePushDictionaries();
43
- const { writeDictionary } = hooks_intlayerAPIHooks.useWriteDictionary();
44
- const SaveFormSchema = components_DictionaryFieldEditor_SaveForm_SaveFormSchema.getSaveFormSchema();
45
- const { isLoading: isAuditing, auditContentDeclaration } = hooks_intlayerAPIHooks.useAuditContentDeclaration();
46
- const { editedContent, restoreEditedContent, setEditedContent } = editorReact.useEditedContent();
47
- const { form, isSubmitting } = components_Form_FormBase.useForm(SaveFormSchema);
48
- const {
49
- auditButton,
50
- resetButton,
51
- saveButton,
52
- publishButton,
53
- downloadButton
54
- } = reactIntlayer.useDictionary(components_DictionaryFieldEditor_SaveForm_saveForm_content.saveDictionaryContent);
27
+ const { writeDictionary, isLoading: isWriting } = hooks_intlayerAPIHooks.useWriteDictionary();
28
+ const { pushDictionaries, isLoading: isPushing } = hooks_intlayerAPIHooks.usePushDictionaries();
29
+ const isLoading = isWriting || isPushing;
30
+ const { editedContent, restoreEditedContent } = editorReact.useEditedContent();
31
+ const { resetButton, saveButton, publishButton, downloadButton } = reactIntlayer.useDictionary(components_DictionaryFieldEditor_SaveForm_saveForm_content.saveDictionaryContent);
32
+ const hasIntlayerAccessKey = Boolean(editor.clientId && editor.clientSecret);
55
33
  const editedDictionary = ReactExports.useMemo(
56
34
  () => editedContent?.[dictionary.key],
57
35
  [editedContent, dictionary.key]
58
36
  );
59
37
  const isEdited = ReactExports.useMemo(
60
- () => editedDictionary && JSON.stringify(editedDictionary.content) !== JSON.stringify(dictionary.content),
38
+ () => editedDictionary && JSON.stringify(editedDictionary) !== JSON.stringify(dictionary),
61
39
  [editedDictionary, dictionary, mode]
62
40
  );
63
41
  const isLocalDictionary = ReactExports.useMemo(
64
42
  () => typeof dictionary?._id === "undefined",
65
43
  [dictionary]
66
44
  );
67
- const onSubmitSuccess = ReactExports.useCallback(async () => {
45
+ const handleSaveDictionary = async () => {
68
46
  if (!editedContent?.[dictionary.key]) return;
69
47
  const updatedDictionary = {
70
48
  ...dictionary,
71
49
  ...editedContent?.[dictionary.key]
72
50
  };
73
- if (mode === "remote") {
74
- await pushDictionaries([updatedDictionary]);
75
- } else {
76
- await writeDictionary(updatedDictionary);
77
- }
78
- setLocaleDictionary(editedContent?.[dictionary.key]);
79
- restoreEditedContent(dictionary.key);
80
- }, [
81
- dictionary,
82
- editedContent,
83
- pushDictionaries,
84
- setLocaleDictionary,
85
- writeDictionary,
86
- restoreEditedContent,
87
- mode
88
- ]);
89
- const handleOnAuditFile = async () => await auditContentDeclaration({
90
- defaultLocale: project?.configuration?.internationalization?.defaultLocale ?? intlayer.Locales.ENGLISH,
91
- locales: project?.configuration?.internationalization?.locales ?? [
92
- intlayer.Locales.ENGLISH
93
- ],
94
- fileContent: JSON.stringify(editedDictionary ?? dictionary)
95
- }).then((response) => {
96
- if (!response.data) return;
97
- const editedDictionary2 = JSON.parse(
98
- response.data.fileContent
99
- );
100
- setEditedContent(dictionary.key, editedDictionary2.content);
101
- });
51
+ await writeDictionary(updatedDictionary).then(() => {
52
+ setLocaleDictionary(editedContent?.[dictionary.key]);
53
+ restoreEditedContent(dictionary.key);
54
+ });
55
+ };
56
+ const handlePushDictionary = async () => {
57
+ if (!editedContent?.[dictionary.key]) return;
58
+ const updatedDictionary = {
59
+ ...dictionary,
60
+ ...editedContent?.[dictionary.key]
61
+ };
62
+ await pushDictionaries([updatedDictionary]).then(() => {
63
+ setLocaleDictionary(editedContent?.[dictionary.key]);
64
+ restoreEditedContent(dictionary.key);
65
+ });
66
+ };
102
67
  return /* @__PURE__ */ jsxRuntime.jsxs(
103
- components_Form_layout_FormItemLayout.Form,
68
+ "form",
104
69
  {
105
- className: "flex w-full flex-1 flex-row flex-wrap justify-end gap-3",
106
- ...form,
107
- schema: SaveFormSchema,
108
- onSubmitSuccess,
70
+ className: utils_cn.cn("flex justify-end gap-2 max-md:flex-col", className),
71
+ ...props,
109
72
  children: [
110
- /* @__PURE__ */ jsxRuntime.jsx(
111
- components_Form_layout_FormItemLayout.Form.Button,
112
- {
113
- type: "button",
114
- label: auditButton.label.value,
115
- disabled: isSubmitting,
116
- Icon: lucideReact.WandSparkles,
117
- variant: "outline",
118
- color: "text",
119
- className: "ml-auto max-md:w-full",
120
- isLoading: isAuditing,
121
- onClick: handleOnAuditFile,
122
- children: auditButton.text
123
- }
124
- ),
125
73
  isEdited && /* @__PURE__ */ jsxRuntime.jsx(
126
74
  components_Form_layout_FormItemLayout.Form.Button,
127
75
  {
128
- type: "button",
129
76
  label: resetButton.label.value,
130
- disabled: !isEdited || isSubmitting,
77
+ disabled: !isEdited,
131
78
  Icon: lucideReact.RotateCcw,
132
79
  variant: "outline",
133
80
  color: "text",
@@ -136,40 +83,42 @@ const SaveForm = ({ dictionary, mode }) => {
136
83
  children: resetButton.text
137
84
  }
138
85
  ),
139
- mode === "remote" ? isLocalDictionary ? /* @__PURE__ */ jsxRuntime.jsx(
86
+ mode.includes("remote") && hasIntlayerAccessKey && isLocalDictionary && /* @__PURE__ */ jsxRuntime.jsx(
140
87
  components_Form_layout_FormItemLayout.Form.Button,
141
88
  {
142
- type: "submit",
143
89
  label: publishButton.label.value,
144
- disabled: !isEdited || isSubmitting,
90
+ disabled: !isEdited,
145
91
  Icon: lucideReact.ArrowUpFromLine,
146
92
  color: "text",
147
93
  className: "max-md:w-full",
148
- isLoading: isSubmitting,
94
+ isLoading: isPushing,
95
+ onClick: handlePushDictionary,
149
96
  children: publishButton.text
150
97
  }
151
- ) : isEdited && /* @__PURE__ */ jsxRuntime.jsx(
98
+ ),
99
+ mode.includes("remote") && hasIntlayerAccessKey && isEdited && /* @__PURE__ */ jsxRuntime.jsx(
152
100
  components_Form_layout_FormItemLayout.Form.Button,
153
101
  {
154
- type: "submit",
155
102
  label: saveButton.label.value,
156
- disabled: !isEdited || isSubmitting,
103
+ disabled: !isEdited || isLoading,
157
104
  Icon: lucideReact.Save,
158
105
  color: "text",
159
106
  className: "max-md:w-full",
160
- isLoading: isSubmitting,
107
+ isLoading: isPushing,
108
+ onClick: handlePushDictionary,
161
109
  children: saveButton.text
162
110
  }
163
- ) : /* @__PURE__ */ jsxRuntime.jsx(
111
+ ),
112
+ mode.includes("local") && /* @__PURE__ */ jsxRuntime.jsx(
164
113
  components_Form_layout_FormItemLayout.Form.Button,
165
114
  {
166
- type: "submit",
167
115
  label: downloadButton.label.value,
168
- disabled: !isEdited || isSubmitting,
116
+ disabled: !isEdited || isLoading,
169
117
  Icon: lucideReact.Download,
170
118
  color: "text",
171
119
  className: "max-md:w-full",
172
- isLoading: isSubmitting,
120
+ isLoading: isWriting,
121
+ onClick: handleSaveDictionary,
173
122
  children: downloadButton.text
174
123
  }
175
124
  )
@@ -1 +1 @@
1
- {"version":3,"file":"SaveForm.cjs","sources":["../../../../src/components/DictionaryFieldEditor/SaveForm/SaveForm.tsx"],"sourcesContent":["'use client';\n\nimport type { Dictionary as DistantDictionary } from '@intlayer/backend';\nimport type { Dictionary } from '@intlayer/core';\nimport {\n useDictionariesRecordActions,\n useEditedContent,\n} from '@intlayer/editor-react';\nimport { Locales } from 'intlayer';\nimport {\n ArrowUpFromLine,\n Download,\n RotateCcw,\n Save,\n WandSparkles,\n} from 'lucide-react';\nimport { useCallback, useMemo, type FC } from 'react';\nimport { useDictionary } from 'react-intlayer';\nimport {\n usePushDictionaries,\n useAuditContentDeclaration,\n useWriteDictionary,\n} from '../../../hooks';\nimport { useAuth } from '../../Auth';\nimport { Form, useForm } from '../../Form';\nimport { saveDictionaryContent } from './saveForm.content';\nimport { getSaveFormSchema } from './SaveFormSchema';\n\ntype DictionaryDetailsProps = {\n dictionary: Dictionary;\n mode: 'local' | 'remote';\n};\n\nexport const SaveForm: FC<DictionaryDetailsProps> = ({ dictionary, mode }) => {\n const { session } = useAuth();\n const project = session?.project;\n const { setLocaleDictionary } = useDictionariesRecordActions();\n const { pushDictionaries } = usePushDictionaries();\n const { writeDictionary } = useWriteDictionary();\n const SaveFormSchema = getSaveFormSchema();\n const { isLoading: isAuditing, auditContentDeclaration } =\n useAuditContentDeclaration();\n\n const { editedContent, restoreEditedContent, setEditedContent } =\n useEditedContent();\n const { form, isSubmitting } = useForm(SaveFormSchema);\n const {\n auditButton,\n resetButton,\n saveButton,\n publishButton,\n downloadButton,\n } = useDictionary(saveDictionaryContent);\n\n const editedDictionary = useMemo(\n () => editedContent?.[dictionary.key],\n [editedContent, dictionary.key]\n );\n\n const isEdited = useMemo(\n () =>\n editedDictionary &&\n JSON.stringify(editedDictionary.content) !==\n JSON.stringify(dictionary.content),\n [editedDictionary, dictionary, mode]\n );\n\n const isLocalDictionary = useMemo(\n () => typeof (dictionary as DistantDictionary)?._id === 'undefined',\n [dictionary]\n );\n\n const onSubmitSuccess = useCallback(async () => {\n if (!editedContent?.[dictionary.key]) return;\n\n const updatedDictionary = {\n ...dictionary,\n ...editedContent?.[dictionary.key],\n };\n\n if (mode === 'remote') {\n await pushDictionaries([updatedDictionary]);\n } else {\n await writeDictionary(updatedDictionary);\n }\n setLocaleDictionary(editedContent?.[dictionary.key]);\n restoreEditedContent(dictionary.key);\n }, [\n dictionary,\n editedContent,\n pushDictionaries,\n setLocaleDictionary,\n writeDictionary,\n restoreEditedContent,\n mode,\n ]);\n\n const handleOnAuditFile = async () =>\n await auditContentDeclaration({\n defaultLocale:\n project?.configuration?.internationalization?.defaultLocale ??\n Locales.ENGLISH,\n locales: project?.configuration?.internationalization?.locales ?? [\n Locales.ENGLISH,\n ],\n fileContent: JSON.stringify(editedDictionary ?? dictionary),\n }).then((response) => {\n if (!response.data) return;\n\n const editedDictionary = JSON.parse(\n response.data.fileContent\n ) as Dictionary;\n\n setEditedContent(dictionary.key, editedDictionary.content);\n });\n\n return (\n <Form\n className=\"flex w-full flex-1 flex-row flex-wrap justify-end gap-3\"\n {...form}\n schema={SaveFormSchema}\n onSubmitSuccess={onSubmitSuccess}\n >\n <Form.Button\n type=\"button\"\n label={auditButton.label.value}\n disabled={isSubmitting}\n Icon={WandSparkles}\n variant=\"outline\"\n color=\"text\"\n className=\"ml-auto max-md:w-full\"\n isLoading={isAuditing}\n onClick={handleOnAuditFile}\n >\n {auditButton.text}\n </Form.Button>\n {isEdited && (\n <Form.Button\n type=\"button\"\n label={resetButton.label.value}\n disabled={!isEdited || isSubmitting}\n Icon={RotateCcw}\n variant=\"outline\"\n color=\"text\"\n className=\"max-md:w-full\"\n onClick={() => restoreEditedContent(dictionary.key)}\n >\n {resetButton.text}\n </Form.Button>\n )}\n {mode === 'remote' ? (\n isLocalDictionary ? (\n <Form.Button\n type=\"submit\"\n label={publishButton.label.value}\n disabled={!isEdited || isSubmitting}\n Icon={ArrowUpFromLine}\n color=\"text\"\n className=\"max-md:w-full\"\n isLoading={isSubmitting}\n >\n {publishButton.text}\n </Form.Button>\n ) : (\n isEdited && (\n <Form.Button\n type=\"submit\"\n label={saveButton.label.value}\n disabled={!isEdited || isSubmitting}\n Icon={Save}\n color=\"text\"\n className=\"max-md:w-full\"\n isLoading={isSubmitting}\n >\n {saveButton.text}\n </Form.Button>\n )\n )\n ) : (\n <Form.Button\n type=\"submit\"\n label={downloadButton.label.value}\n disabled={!isEdited || isSubmitting}\n Icon={Download}\n color=\"text\"\n className=\"max-md:w-full\"\n isLoading={isSubmitting}\n >\n {downloadButton.text}\n </Form.Button>\n )}\n </Form>\n );\n};\n"],"names":["useAuth","useDictionariesRecordActions","usePushDictionaries","useWriteDictionary","getSaveFormSchema","useAuditContentDeclaration","useEditedContent","useForm","useDictionary","saveDictionaryContent","useMemo","useCallback","Locales","editedDictionary","jsxs","Form","jsx","WandSparkles","RotateCcw","ArrowUpFromLine","Save","Download"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiCO,MAAM,WAAuC,CAAC,EAAE,YAAY,WAAW;AACtE,QAAA,EAAE,QAAQ,IAAIA,sCAAQ;AAC5B,QAAM,UAAU,SAAS;AACnB,QAAA,EAAE,oBAAoB,IAAIC,yCAA6B;AACvD,QAAA,EAAE,iBAAiB,IAAIC,2CAAoB;AAC3C,QAAA,EAAE,gBAAgB,IAAIC,0CAAmB;AAC/C,QAAM,iBAAiBC,yDAAAA,kBAAkB;AACzC,QAAM,EAAE,WAAW,YAAY,wBAAA,IAC7BC,uBAAAA,2BAA2B;AAE7B,QAAM,EAAE,eAAe,sBAAsB,iBAAA,IAC3CC,YAAAA,iBAAiB;AACnB,QAAM,EAAE,MAAM,iBAAiBC,yBAAAA,QAAQ,cAAc;AAC/C,QAAA;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EAAA,IACEC,cAAAA,cAAcC,2DAAAA,qBAAqB;AAEvC,QAAM,mBAAmBC,aAAA;AAAA,IACvB,MAAM,gBAAgB,WAAW,GAAG;AAAA,IACpC,CAAC,eAAe,WAAW,GAAG;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;AAAA,YACC,MAAK;AAAA,YACL,OAAO,eAAe,MAAM;AAAA,YAC5B,UAAU,CAAC,YAAY;AAAA,YACvB,MAAMM,YAAA;AAAA,YACN,OAAM;AAAA,YACN,WAAU;AAAA,YACV,WAAW;AAAA,YAEV,UAAe,eAAA;AAAA,UAAA;AAAA,QAAA;AAAA,MAClB;AAAA,IAAA;AAAA,EAEJ;AAEJ;;"}
1
+ {"version":3,"file":"SaveForm.cjs","sources":["../../../../src/components/DictionaryFieldEditor/SaveForm/SaveForm.tsx"],"sourcesContent":["'use client';\n\nimport type { Dictionary as DistantDictionary } from '@intlayer/backend';\nimport type { Dictionary } from '@intlayer/core';\nimport {\n useConfiguration,\n useDictionariesRecordActions,\n useEditedContent,\n} from '@intlayer/editor-react';\nimport { ArrowUpFromLine, Download, RotateCcw, Save } from 'lucide-react';\nimport {\n type DetailedHTMLProps,\n type FormHTMLAttributes,\n useMemo,\n type FC,\n} from 'react';\nimport { useDictionary } from 'react-intlayer';\nimport { usePushDictionaries, useWriteDictionary } from '../../../hooks';\nimport { cn } from '../../../utils/cn';\nimport { Form } from '../../Form';\nimport { saveDictionaryContent } from './saveForm.content';\n\ntype DictionaryDetailsProps = {\n dictionary: Dictionary;\n mode: ('local' | 'remote')[];\n} & DetailedHTMLProps<FormHTMLAttributes<HTMLFormElement>, HTMLFormElement>;\n\nexport const SaveForm: FC<DictionaryDetailsProps> = ({\n dictionary,\n mode,\n className,\n ...props\n}) => {\n const { editor } = useConfiguration();\n const { setLocaleDictionary } = useDictionariesRecordActions();\n const { writeDictionary, isLoading: isWriting } = useWriteDictionary();\n const { pushDictionaries, isLoading: isPushing } = usePushDictionaries();\n const isLoading = isWriting || isPushing;\n\n const { editedContent, restoreEditedContent } = useEditedContent();\n const { resetButton, saveButton, publishButton, downloadButton } =\n useDictionary(saveDictionaryContent);\n\n const hasIntlayerAccessKey = Boolean(editor.clientId && editor.clientSecret);\n\n const editedDictionary = useMemo(\n () => editedContent?.[dictionary.key],\n [editedContent, dictionary.key]\n );\n\n const isEdited = useMemo(\n () =>\n editedDictionary &&\n JSON.stringify(editedDictionary) !== JSON.stringify(dictionary),\n [editedDictionary, dictionary, mode]\n );\n\n const isLocalDictionary = useMemo(\n () => typeof (dictionary as DistantDictionary)?._id === 'undefined',\n [dictionary]\n );\n\n const handleSaveDictionary = async () => {\n if (!editedContent?.[dictionary.key]) return;\n\n const updatedDictionary = {\n ...dictionary,\n ...editedContent?.[dictionary.key],\n };\n\n await writeDictionary(updatedDictionary).then(() => {\n setLocaleDictionary(editedContent?.[dictionary.key]);\n restoreEditedContent(dictionary.key);\n });\n };\n\n const handlePushDictionary = async () => {\n if (!editedContent?.[dictionary.key]) return;\n\n const updatedDictionary = {\n ...dictionary,\n ...editedContent?.[dictionary.key],\n };\n\n await pushDictionaries([updatedDictionary]).then(() => {\n setLocaleDictionary(editedContent?.[dictionary.key]);\n restoreEditedContent(dictionary.key);\n });\n };\n\n return (\n <form\n className={cn('flex justify-end gap-2 max-md:flex-col', className)}\n {...props}\n >\n {isEdited && (\n <Form.Button\n label={resetButton.label.value}\n disabled={!isEdited}\n Icon={RotateCcw}\n variant=\"outline\"\n color=\"text\"\n className=\"max-md:w-full\"\n onClick={() => restoreEditedContent(dictionary.key)}\n >\n {resetButton.text}\n </Form.Button>\n )}\n {mode.includes('remote') && hasIntlayerAccessKey && isLocalDictionary && (\n <Form.Button\n label={publishButton.label.value}\n disabled={!isEdited}\n Icon={ArrowUpFromLine}\n color=\"text\"\n className=\"max-md:w-full\"\n isLoading={isPushing}\n onClick={handlePushDictionary}\n >\n {publishButton.text}\n </Form.Button>\n )}\n {mode.includes('remote') && hasIntlayerAccessKey && isEdited && (\n <Form.Button\n label={saveButton.label.value}\n disabled={!isEdited || isLoading}\n Icon={Save}\n color=\"text\"\n className=\"max-md:w-full\"\n isLoading={isPushing}\n onClick={handlePushDictionary}\n >\n {saveButton.text}\n </Form.Button>\n )}\n {mode.includes('local') && (\n <Form.Button\n label={downloadButton.label.value}\n disabled={!isEdited || isLoading}\n Icon={Download}\n color=\"text\"\n className=\"max-md:w-full\"\n isLoading={isWriting}\n onClick={handleSaveDictionary}\n >\n {downloadButton.text}\n </Form.Button>\n )}\n </form>\n );\n};\n"],"names":["useConfiguration","useDictionariesRecordActions","useWriteDictionary","usePushDictionaries","useEditedContent","useDictionary","saveDictionaryContent","useMemo","jsxs","cn","jsx","Form","RotateCcw","ArrowUpFromLine","Save","Download"],"mappings":";;;;;;;;;;;;;;;;;;AA2BO,MAAM,WAAuC,CAAC;AAAA,EACnD;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAM;AACE,QAAA,EAAE,OAAO,IAAIA,6BAAiB;AAC9B,QAAA,EAAE,oBAAoB,IAAIC,yCAA6B;AAC7D,QAAM,EAAE,iBAAiB,WAAW,UAAA,IAAcC,uBAAAA,mBAAmB;AACrE,QAAM,EAAE,kBAAkB,WAAW,UAAA,IAAcC,uBAAAA,oBAAoB;AACvE,QAAM,YAAY,aAAa;AAE/B,QAAM,EAAE,eAAe,qBAAqB,IAAIC,6BAAiB;AACjE,QAAM,EAAE,aAAa,YAAY,eAAe,eAAe,IAC7DC,4BAAcC,gFAAqB;AAErC,QAAM,uBAAuB,QAAQ,OAAO,YAAY,OAAO,YAAY;AAE3E,QAAM,mBAAmBC,aAAA;AAAA,IACvB,MAAM,gBAAgB,WAAW,GAAG;AAAA,IACpC,CAAC,eAAe,WAAW,GAAG;AAAA,EAChC;AAEA,QAAM,WAAWA,aAAA;AAAA,IACf,MACE,oBACA,KAAK,UAAU,gBAAgB,MAAM,KAAK,UAAU,UAAU;AAAA,IAChE,CAAC,kBAAkB,YAAY,IAAI;AAAA,EACrC;AAEA,QAAM,oBAAoBA,aAAA;AAAA,IACxB,MAAM,OAAQ,YAAkC,QAAQ;AAAA,IACxD,CAAC,UAAU;AAAA,EACb;AAEA,QAAM,uBAAuB,YAAY;AACvC,QAAI,CAAC,gBAAgB,WAAW,GAAG,EAAG;AAEtC,U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QACjB;AAAA,QAED,KAAK,SAAS,QAAQ,KAAK,wBAAwB,YAClDH,2BAAA;AAAA,UAACC,sCAAAA,KAAK;AAAA,UAAL;AAAA,YACC,OAAO,WAAW,MAAM;AAAA,YACxB,UAAU,CAAC,YAAY;AAAA,YACvB,MAAMG,YAAA;AAAA,YACN,OAAM;AAAA,YACN,WAAU;AAAA,YACV,WAAW;AAAA,YACX,SAAS;AAAA,YAER,UAAW,WAAA;AAAA,UAAA;AAAA,QACd;AAAA,QAED,KAAK,SAAS,OAAO,KACpBJ,2BAAA;AAAA,UAACC,sCAAAA,KAAK;AAAA,UAAL;AAAA,YACC,OAAO,eAAe,MAAM;AAAA,YAC5B,UAAU,CAAC,YAAY;AAAA,YACvB,MAAMI,YAAA;AAAA,YACN,OAAM;AAAA,YACN,WAAU;AAAA,YACV,WAAW;AAAA,YACX,SAAS;AAAA,YAER,UAAe,eAAA;AAAA,UAAA;AAAA,QAAA;AAAA,MAClB;AAAA,IAAA;AAAA,EAEJ;AAEJ;;"}
@@ -1,9 +1,9 @@
1
1
  import { Dictionary } from '@intlayer/core';
2
- import { FC } from 'react';
2
+ import { DetailedHTMLProps, FormHTMLAttributes, FC } from 'react';
3
3
  type DictionaryDetailsProps = {
4
4
  dictionary: Dictionary;
5
- mode: 'local' | 'remote';
6
- };
5
+ mode: ('local' | 'remote')[];
6
+ } & DetailedHTMLProps<FormHTMLAttributes<HTMLFormElement>, HTMLFormElement>;
7
7
  export declare const SaveForm: FC<DictionaryDetailsProps>;
8
8
  export {};
9
9
  //# sourceMappingURL=SaveForm.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SaveForm.d.ts","sourceRoot":"","sources":["../../../../src/components/DictionaryFieldEditor/SaveForm/SaveForm.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAajD,OAAO,EAAwB,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAYtD,KAAK,sBAAsB,GAAG;IAC5B,UAAU,EAAE,UAAU,CAAC;IACvB,IAAI,EAAE,OAAO,GAAG,QAAQ,CAAC;CAC1B,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,EAAE,CAAC,sBAAsB,CAgK/C,CAAC"}
1
+ {"version":3,"file":"SaveForm.d.ts","sourceRoot":"","sources":["../../../../src/components/DictionaryFieldEditor/SaveForm/SaveForm.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAOjD,OAAO,EACL,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EAEvB,KAAK,EAAE,EACR,MAAM,OAAO,CAAC;AAOf,KAAK,sBAAsB,GAAG;IAC5B,UAAU,EAAE,UAAU,CAAC;IACvB,IAAI,EAAE,CAAC,OAAO,GAAG,QAAQ,CAAC,EAAE,CAAC;CAC9B,GAAG,iBAAiB,CAAC,kBAAkB,CAAC,eAAe,CAAC,EAAE,eAAe,CAAC,CAAC;AAE5E,eAAO,MAAM,QAAQ,EAAE,EAAE,CAAC,sBAAsB,CA0H/C,CAAC"}
@@ -1,131 +1,78 @@
1
1
  "use client";
2
2
  import { jsxs, jsx } from "react/jsx-runtime";
3
- import { useDictionariesRecordActions, useEditedContent } from "@intlayer/editor-react";
4
- import { Locales } from "intlayer";
5
- import { WandSparkles, RotateCcw, ArrowUpFromLine, Save, Download } from "lucide-react";
6
- import { useMemo, useCallback } from "react";
3
+ import { useConfiguration, useDictionariesRecordActions, useEditedContent } from "@intlayer/editor-react";
4
+ import { RotateCcw, ArrowUpFromLine, Save, Download } from "lucide-react";
5
+ import { useMemo } from "react";
7
6
  import { useDictionary } from "react-intlayer";
8
7
  import "../../../hooks/useScrollBlockage/useScrollBlockageStore.mjs";
9
8
  import "../../../hooks/useAsync/useAsyncStateStore.mjs";
10
- import { usePushDictionaries, useWriteDictionary, useAuditContentDeclaration } from "../../../hooks/intlayerAPIHooks.mjs";
9
+ import { useWriteDictionary, usePushDictionaries } from "../../../hooks/intlayerAPIHooks.mjs";
11
10
  import "deepmerge";
12
- import "../../../index-BTDHuTxL.js";
13
- import "@intlayer/config/client";
14
- import "../../Button/Button.mjs";
15
- import "../../Auth/ExternalsLoginButtons/externalsLoginButtons.content.mjs";
16
- import { useForm } from "../../Form/FormBase.mjs";
11
+ import { cn } from "../../../utils/cn.mjs";
12
+ import "@hookform/resolvers";
13
+ import "react-hook-form";
17
14
  import "../../Form/FormField.mjs";
18
15
  import { F as Form } from "../../../Form-BZUDRfoN.js";
19
- import "../../Auth/SignInForm/signIn.content.mjs";
20
- import "zod";
21
- import "../../Auth/SignInForm/useSignInSchema.content.mjs";
22
- import "../../Auth/SignUpForm/signUpForm.content.mjs";
23
- import "../../Auth/SignUpForm/useSignUpSchema.content.mjs";
24
- import { useAuth } from "../../Auth/useAuth/index.mjs";
25
- import "../../Auth/ChangePasswordForm/changePasswordForm.content.mjs";
26
- import "../../Auth/ChangePasswordForm/useChangePasswordSchema.content.mjs";
27
- import "../../Auth/ResetPasswordForm/resetPasswordContent.content.mjs";
28
- import "../../Auth/ResetPasswordForm/useResetPasswordSchema.content.mjs";
29
- import "../../Modal/Modal.mjs";
30
- import "clsx";
31
- import "tailwind-merge";
32
- import "@intlayer/api";
33
- import "../../Auth/VerifyEmailForm/index.content.mjs";
34
16
  import { saveDictionaryContent } from "./saveForm.content.mjs";
35
- import { getSaveFormSchema } from "./SaveFormSchema.mjs";
36
- const SaveForm = ({ dictionary, mode }) => {
37
- const { session } = useAuth();
38
- const project = session?.project;
17
+ const SaveForm = ({
18
+ dictionary,
19
+ mode,
20
+ className,
21
+ ...props
22
+ }) => {
23
+ const { editor } = useConfiguration();
39
24
  const { setLocaleDictionary } = useDictionariesRecordActions();
40
- const { pushDictionaries } = usePushDictionaries();
41
- const { writeDictionary } = useWriteDictionary();
42
- const SaveFormSchema = getSaveFormSchema();
43
- const { isLoading: isAuditing, auditContentDeclaration } = useAuditContentDeclaration();
44
- const { editedContent, restoreEditedContent, setEditedContent } = useEditedContent();
45
- const { form, isSubmitting } = useForm(SaveFormSchema);
46
- const {
47
- auditButton,
48
- resetButton,
49
- saveButton,
50
- publishButton,
51
- downloadButton
52
- } = useDictionary(saveDictionaryContent);
25
+ const { writeDictionary, isLoading: isWriting } = useWriteDictionary();
26
+ const { pushDictionaries, isLoading: isPushing } = usePushDictionaries();
27
+ const isLoading = isWriting || isPushing;
28
+ const { editedContent, restoreEditedContent } = useEditedContent();
29
+ const { resetButton, saveButton, publishButton, downloadButton } = useDictionary(saveDictionaryContent);
30
+ const hasIntlayerAccessKey = Boolean(editor.clientId && editor.clientSecret);
53
31
  const editedDictionary = useMemo(
54
32
  () => editedContent?.[dictionary.key],
55
33
  [editedContent, dictionary.key]
56
34
  );
57
35
  const isEdited = useMemo(
58
- () => editedDictionary && JSON.stringify(editedDictionary.content) !== JSON.stringify(dictionary.content),
36
+ () => editedDictionary && JSON.stringify(editedDictionary) !== JSON.stringify(dictionary),
59
37
  [editedDictionary, dictionary, mode]
60
38
  );
61
39
  const isLocalDictionary = useMemo(
62
40
  () => typeof dictionary?._id === "undefined",
63
41
  [dictionary]
64
42
  );
65
- const onSubmitSuccess = useCallback(async () => {
43
+ const handleSaveDictionary = async () => {
66
44
  if (!editedContent?.[dictionary.key]) return;
67
45
  const updatedDictionary = {
68
46
  ...dictionary,
69
47
  ...editedContent?.[dictionary.key]
70
48
  };
71
- if (mode === "remote") {
72
- await pushDictionaries([updatedDictionary]);
73
- } else {
74
- await writeDictionary(updatedDictionary);
75
- }
76
- setLocaleDictionary(editedContent?.[dictionary.key]);
77
- restoreEditedContent(dictionary.key);
78
- }, [
79
- dictionary,
80
- editedContent,
81
- pushDictionaries,
82
- setLocaleDictionary,
83
- writeDictionary,
84
- restoreEditedContent,
85
- mode
86
- ]);
87
- const handleOnAuditFile = async () => await auditContentDeclaration({
88
- defaultLocale: project?.configuration?.internationalization?.defaultLocale ?? Locales.ENGLISH,
89
- locales: project?.configuration?.internationalization?.locales ?? [
90
- Locales.ENGLISH
91
- ],
92
- fileContent: JSON.stringify(editedDictionary ?? dictionary)
93
- }).then((response) => {
94
- if (!response.data) return;
95
- const editedDictionary2 = JSON.parse(
96
- response.data.fileContent
97
- );
98
- setEditedContent(dictionary.key, editedDictionary2.content);
99
- });
49
+ await writeDictionary(updatedDictionary).then(() => {
50
+ setLocaleDictionary(editedContent?.[dictionary.key]);
51
+ restoreEditedContent(dictionary.key);
52
+ });
53
+ };
54
+ const handlePushDictionary = async () => {
55
+ if (!editedContent?.[dictionary.key]) return;
56
+ const updatedDictionary = {
57
+ ...dictionary,
58
+ ...editedContent?.[dictionary.key]
59
+ };
60
+ await pushDictionaries([updatedDictionary]).then(() => {
61
+ setLocaleDictionary(editedContent?.[dictionary.key]);
62
+ restoreEditedContent(dictionary.key);
63
+ });
64
+ };
100
65
  return /* @__PURE__ */ jsxs(
101
- Form,
66
+ "form",
102
67
  {
103
- className: "flex w-full flex-1 flex-row flex-wrap justify-end gap-3",
104
- ...form,
105
- schema: SaveFormSchema,
106
- onSubmitSuccess,
68
+ className: cn("flex justify-end gap-2 max-md:flex-col", className),
69
+ ...props,
107
70
  children: [
108
- /* @__PURE__ */ jsx(
109
- Form.Button,
110
- {
111
- type: "button",
112
- label: auditButton.label.value,
113
- disabled: isSubmitting,
114
- Icon: WandSparkles,
115
- variant: "outline",
116
- color: "text",
117
- className: "ml-auto max-md:w-full",
118
- isLoading: isAuditing,
119
- onClick: handleOnAuditFile,
120
- children: auditButton.text
121
- }
122
- ),
123
71
  isEdited && /* @__PURE__ */ jsx(
124
72
  Form.Button,
125
73
  {
126
- type: "button",
127
74
  label: resetButton.label.value,
128
- disabled: !isEdited || isSubmitting,
75
+ disabled: !isEdited,
129
76
  Icon: RotateCcw,
130
77
  variant: "outline",
131
78
  color: "text",
@@ -134,40 +81,42 @@ const SaveForm = ({ dictionary, mode }) => {
134
81
  children: resetButton.text
135
82
  }
136
83
  ),
137
- mode === "remote" ? isLocalDictionary ? /* @__PURE__ */ jsx(
84
+ mode.includes("remote") && hasIntlayerAccessKey && isLocalDictionary && /* @__PURE__ */ jsx(
138
85
  Form.Button,
139
86
  {
140
- type: "submit",
141
87
  label: publishButton.label.value,
142
- disabled: !isEdited || isSubmitting,
88
+ disabled: !isEdited,
143
89
  Icon: ArrowUpFromLine,
144
90
  color: "text",
145
91
  className: "max-md:w-full",
146
- isLoading: isSubmitting,
92
+ isLoading: isPushing,
93
+ onClick: handlePushDictionary,
147
94
  children: publishButton.text
148
95
  }
149
- ) : isEdited && /* @__PURE__ */ jsx(
96
+ ),
97
+ mode.includes("remote") && hasIntlayerAccessKey && isEdited && /* @__PURE__ */ jsx(
150
98
  Form.Button,
151
99
  {
152
- type: "submit",
153
100
  label: saveButton.label.value,
154
- disabled: !isEdited || isSubmitting,
101
+ disabled: !isEdited || isLoading,
155
102
  Icon: Save,
156
103
  color: "text",
157
104
  className: "max-md:w-full",
158
- isLoading: isSubmitting,
105
+ isLoading: isPushing,
106
+ onClick: handlePushDictionary,
159
107
  children: saveButton.text
160
108
  }
161
- ) : /* @__PURE__ */ jsx(
109
+ ),
110
+ mode.includes("local") && /* @__PURE__ */ jsx(
162
111
  Form.Button,
163
112
  {
164
- type: "submit",
165
113
  label: downloadButton.label.value,
166
- disabled: !isEdited || isSubmitting,
114
+ disabled: !isEdited || isLoading,
167
115
  Icon: Download,
168
116
  color: "text",
169
117
  className: "max-md:w-full",
170
- isLoading: isSubmitting,
118
+ isLoading: isWriting,
119
+ onClick: handleSaveDictionary,
171
120
  children: downloadButton.text
172
121
  }
173
122
  )