@intlayer/design-system 6.1.0 → 6.1.1

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.
@@ -43,7 +43,6 @@ const SaveForm = ({
43
43
  confirmation
44
44
  } = reactIntlayer.useIntlayer("save-dictionary-details");
45
45
  const { isAuthenticated } = hooks_useAuth_useAuth.useAuth();
46
- const confirmButtonRef = ReactExports.useRef(null);
47
46
  const editedDictionary = editedContent?.[dictionary.localId];
48
47
  const isEdited = editedDictionary && JSON.stringify(editedDictionary) !== JSON.stringify(dictionary);
49
48
  const isDistantDictionary = typeof dictionary?.id !== "undefined";
@@ -93,13 +92,6 @@ const SaveForm = ({
93
92
  }
94
93
  );
95
94
  };
96
- ReactExports.useEffect(() => {
97
- setTimeout(() => {
98
- if (confirmButtonRef.current) {
99
- confirmButtonRef.current.focus();
100
- }
101
- }, 100);
102
- }, []);
103
95
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
104
96
  /* @__PURE__ */ jsxRuntime.jsx(
105
97
  components_Modal_Modal.Modal,
@@ -182,7 +174,6 @@ const SaveForm = ({
182
174
  className: "max-md:w-full",
183
175
  isLoading: isWriting,
184
176
  onClick: () => setIsFormatAlertModalOpen(true),
185
- ref: confirmButtonRef,
186
177
  children: downloadButton.text
187
178
  }
188
179
  ),
@@ -196,7 +187,6 @@ const SaveForm = ({
196
187
  className: "max-md:w-full",
197
188
  isLoading: isPushing,
198
189
  onClick: handlePushDictionary,
199
- ref: confirmButtonRef,
200
190
  children: publishButton.text
201
191
  }
202
192
  ),
@@ -210,7 +200,6 @@ const SaveForm = ({
210
200
  className: "max-md:w-full",
211
201
  isLoading: isPushing,
212
202
  onClick: handlePushDictionary,
213
- ref: confirmButtonRef,
214
203
  children: saveButton.text
215
204
  }
216
205
  )
@@ -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 {\n ArrowUpFromLine,\n Download,\n RotateCcw,\n Save,\n Trash,\n} from 'lucide-react';\nimport {\n type DetailedHTMLProps,\n type FC,\n type FormHTMLAttributes,\n useEffect,\n useRef,\n useState,\n} from 'react';\nimport { useIntlayer } from 'react-intlayer';\nimport { Modal, ModalSize } from '../../../components/Modal';\nimport {\n useAuth,\n useDeleteDictionary,\n usePushDictionaries,\n useWriteDictionary,\n} from '../../../hooks';\nimport { cn } from '../../../utils/cn';\nimport { ButtonColor, ButtonVariant } from '../../Button';\nimport { Form } from '../../Form';\n\ntype DictionaryDetailsProps = {\n dictionary: Dictionary;\n mode: ('local' | 'remote')[];\n onDelete?: () => void;\n} & DetailedHTMLProps<FormHTMLAttributes<HTMLFormElement>, HTMLFormElement>;\n\nexport const SaveForm: FC<DictionaryDetailsProps> = ({\n dictionary,\n mode,\n className,\n onDelete,\n ...props\n}) => {\n const [isFormatAlertModalOpen, setIsFormatAlertModalOpen] = useState(false);\n const { setLocaleDictionary } = useDictionariesRecordActions();\n const { mutate: deleteDictionary, isPending: isDeleting } =\n useDeleteDictionary();\n const { mutate: writeDictionary, isPending: isWriting } =\n useWriteDictionary();\n const { mutate: pushDictionaries, isPending: isPushing } =\n usePushDictionaries();\n const isLoading = isWriting || isPushing;\n\n const { editedContent, restoreEditedContent } = useEditedContent();\n const {\n deleteButton,\n resetButton,\n saveButton,\n publishButton,\n downloadButton,\n confirmation,\n } = useIntlayer('save-dictionary-details');\n const { isAuthenticated } = useAuth();\n const confirmButtonRef = useRef<HTMLButtonElement>(null);\n\n const editedDictionary = editedContent?.[dictionary.localId!];\n\n const isEdited =\n editedDictionary &&\n JSON.stringify(editedDictionary) !== JSON.stringify(dictionary);\n\n const isDistantDictionary =\n typeof (dictionary as unknown as DistantDictionary)?.id !== 'undefined';\n\n const handleSaveDictionaryConfirmation = async () => {\n if (!editedContent?.[dictionary.localId!]) return;\n\n const updatedDictionary = {\n ...dictionary,\n ...editedContent?.[dictionary.localId!],\n };\n\n writeDictionary(\n {\n dictionary: updatedDictionary,\n },\n {\n onSuccess: () => {\n setLocaleDictionary(editedContent?.[dictionary.localId!]);\n restoreEditedContent(dictionary.localId!);\n },\n }\n );\n };\n\n const handlePushDictionary = () => {\n if (!editedContent?.[dictionary.localId!]) return;\n\n const updatedDictionary = {\n ...dictionary,\n ...editedContent?.[dictionary.localId!],\n };\n\n pushDictionaries([updatedDictionary], {\n onSuccess: (res) => {\n if (res) {\n setLocaleDictionary(editedContent?.[dictionary.localId!]);\n restoreEditedContent(dictionary.localId!);\n }\n },\n });\n };\n\n const handleDeleteDictionary = () => {\n if (!(dictionary as unknown as DistantDictionary).id) return;\n\n deleteDictionary(\n (dictionary as unknown as DistantDictionary).id.toString(),\n {\n onSuccess: (res) => {\n if (res) {\n onDelete?.();\n }\n },\n }\n );\n };\n\n useEffect(() => {\n setTimeout(() => {\n if (confirmButtonRef.current) {\n confirmButtonRef.current.focus();\n }\n }, 100);\n }, []);\n\n return (\n <>\n <Modal\n isOpen={isFormatAlertModalOpen}\n title={confirmation.title.value}\n size={ModalSize.MD}\n >\n <form className=\"size-full px-3\">\n <p className=\"text-neutral py-4 text-sm\">{confirmation.message}</p>\n\n <div className=\"mt-12 flex justify-end gap-2 max-md:flex-col\">\n <Form.Button\n label={confirmation.cancelButton.label.value}\n disabled={!isEdited || isLoading}\n color={ButtonColor.TEXT}\n className=\"max-md:w-full\"\n variant={ButtonVariant.OUTLINE}\n onClick={() => setIsFormatAlertModalOpen(false)}\n >\n {confirmation.cancelButton.text}\n </Form.Button>\n <Form.Button\n label={confirmation.confirmButton.label.value}\n disabled={!isEdited || isLoading}\n Icon={Save}\n color={ButtonColor.TEXT}\n className=\"max-md:w-full\"\n isLoading={isPushing}\n onClick={handleSaveDictionaryConfirmation}\n >\n {confirmation.confirmButton.text}\n </Form.Button>\n </div>\n </form>\n </Modal>\n <form\n className={cn('flex justify-end gap-2 max-md:flex-col', className)}\n {...props}\n >\n {mode.includes('remote') &&\n isDistantDictionary &&\n onDelete &&\n isAuthenticated && (\n <Form.Button\n label={deleteButton.label.value}\n Icon={Trash}\n color={ButtonColor.ERROR}\n variant={ButtonVariant.OUTLINE}\n className=\"max-md:w-full\"\n isLoading={isDeleting}\n onClick={handleDeleteDictionary}\n >\n {deleteButton.text}\n </Form.Button>\n )}\n {isEdited && (\n <Form.Button\n label={resetButton.label.value}\n disabled={!isEdited}\n Icon={RotateCcw}\n variant={ButtonVariant.OUTLINE}\n color={ButtonColor.TEXT}\n className=\"max-md:w-full\"\n onClick={() => restoreEditedContent(dictionary.localId!)}\n >\n {resetButton.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={ButtonColor.TEXT}\n variant={\n isAuthenticated ? ButtonVariant.OUTLINE : ButtonVariant.DEFAULT\n }\n className=\"max-md:w-full\"\n isLoading={isWriting}\n onClick={() => setIsFormatAlertModalOpen(true)}\n ref={confirmButtonRef}\n >\n {downloadButton.text}\n </Form.Button>\n )}\n {mode.includes('remote') && isAuthenticated && !isDistantDictionary && (\n <Form.Button\n label={publishButton.label.value}\n disabled={isLoading}\n Icon={ArrowUpFromLine}\n color={ButtonColor.TEXT}\n className=\"max-md:w-full\"\n isLoading={isPushing}\n onClick={handlePushDictionary}\n ref={confirmButtonRef}\n >\n {publishButton.text}\n </Form.Button>\n )}\n {mode.includes('remote') &&\n isAuthenticated &&\n isDistantDictionary &&\n 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 ref={confirmButtonRef}\n >\n {saveButton.text}\n </Form.Button>\n )}\n </form>\n </>\n );\n};\n"],"names":["useState","useDictionariesRecordActions","useDeleteDictionary","useWriteDictionary","usePushDictionaries","useEditedContent","useIntlayer","useAuth","useRef","useEffect","jsxs","Fragment","jsx","Modal","ModalSize","Form","ButtonColor","ButtonVariant","Save","cn","Trash","RotateCcw","Download","ArrowUpFromLine"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAyCO,MAAM,WAAuC,CAAC;AAAA,EACnD;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAM;AACJ,QAAM,CAAC,wBAAwB,yBAAyB,IAAIA,aAAAA,SAAS,KAAK;AAC1E,QAAM,EAAE,oBAAA,IAAwBC,yCAAA;AAChC,QAAM,EAAE,QAAQ,kBAAkB,WAAW,WAAA,IAC3CC,iBAAAA,oBAAA;AACF,QAAM,EAAE,QAAQ,iBAAiB,WAAW,UAAA,IAC1CC,iBAAAA,mBAAA;AACF,QAAM,EAAE,QAAQ,kBAAkB,WAAW,UAAA,IAC3CC,iBAAAA,oBAAA;AACF,QAAM,YAAY,aAAa;AAE/B,QAAM,EAAE,eAAe,qBAAA,IAAyBC,6BAAA;AAChD,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EAAA,IACEC,cAAAA,YAAY,yBAAyB;AACzC,QAAM,EAAE,gBAAA,IAAoBC,8BAAA;AAC5B,QAAM,mBAAmBC,aAAAA,OAA0B,IAAI;AAEvD,QAAM,mBAAmB,gBAAgB,WAAW,OAAQ;AAE5D,QAAM,WACJ,oBACA,KAAK,UAAU,gBAAgB,MAAM,KAAK,UAAU,UAAU;AAEhE,QAAM,sBACJ,OAAQ,YAA6C,OAAO;AAE9D,QAAM,mCAAmC,YAAY;AACnD,QAAI,CAAC,gBAAgB,WAAW,OAAQ,EAAG;AAE3C,UAAM,oBAAoB;AAAA,MACxB,GAAG;AAAA,MACH,GAAG,gBAAgB,WAAW,OAAQ;AAAA,IAAA;AAGxC;AAAA,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A,cACvB,MAAMG,YAAAA;AAAAA,cACN,OAAM;AAAA,cACN,WAAU;AAAA,cACV,WAAW;AAAA,cACX,SAAS;AAAA,cACT,KAAK;AAAA,cAEJ,UAAA,WAAW;AAAA,YAAA;AAAA,UAAA;AAAA,QACd;AAAA,MAAA;AAAA,IAAA;AAAA,EAEN,GACF;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 useDictionariesRecordActions,\n useEditedContent,\n} from '@intlayer/editor-react';\nimport {\n ArrowUpFromLine,\n Download,\n RotateCcw,\n Save,\n Trash,\n} from 'lucide-react';\nimport {\n type DetailedHTMLProps,\n type FC,\n type FormHTMLAttributes,\n useState,\n} from 'react';\nimport { useIntlayer } from 'react-intlayer';\nimport { Modal, ModalSize } from '../../../components/Modal';\nimport {\n useAuth,\n useDeleteDictionary,\n usePushDictionaries,\n useWriteDictionary,\n} from '../../../hooks';\nimport { cn } from '../../../utils/cn';\nimport { ButtonColor, ButtonVariant } from '../../Button';\nimport { Form } from '../../Form';\n\ntype DictionaryDetailsProps = {\n dictionary: Dictionary;\n mode: ('local' | 'remote')[];\n onDelete?: () => void;\n} & DetailedHTMLProps<FormHTMLAttributes<HTMLFormElement>, HTMLFormElement>;\n\nexport const SaveForm: FC<DictionaryDetailsProps> = ({\n dictionary,\n mode,\n className,\n onDelete,\n ...props\n}) => {\n const [isFormatAlertModalOpen, setIsFormatAlertModalOpen] = useState(false);\n const { setLocaleDictionary } = useDictionariesRecordActions();\n const { mutate: deleteDictionary, isPending: isDeleting } =\n useDeleteDictionary();\n const { mutate: writeDictionary, isPending: isWriting } =\n useWriteDictionary();\n const { mutate: pushDictionaries, isPending: isPushing } =\n usePushDictionaries();\n const isLoading = isWriting || isPushing;\n\n const { editedContent, restoreEditedContent } = useEditedContent();\n const {\n deleteButton,\n resetButton,\n saveButton,\n publishButton,\n downloadButton,\n confirmation,\n } = useIntlayer('save-dictionary-details');\n const { isAuthenticated } = useAuth();\n\n const editedDictionary = editedContent?.[dictionary.localId!];\n\n const isEdited =\n editedDictionary &&\n JSON.stringify(editedDictionary) !== JSON.stringify(dictionary);\n\n const isDistantDictionary =\n typeof (dictionary as unknown as DistantDictionary)?.id !== 'undefined';\n\n const handleSaveDictionaryConfirmation = async () => {\n if (!editedContent?.[dictionary.localId!]) return;\n\n const updatedDictionary = {\n ...dictionary,\n ...editedContent?.[dictionary.localId!],\n };\n\n writeDictionary(\n {\n dictionary: updatedDictionary,\n },\n {\n onSuccess: () => {\n setLocaleDictionary(editedContent?.[dictionary.localId!]);\n restoreEditedContent(dictionary.localId!);\n },\n }\n );\n };\n\n const handlePushDictionary = () => {\n if (!editedContent?.[dictionary.localId!]) return;\n\n const updatedDictionary = {\n ...dictionary,\n ...editedContent?.[dictionary.localId!],\n };\n\n pushDictionaries([updatedDictionary], {\n onSuccess: (res) => {\n if (res) {\n setLocaleDictionary(editedContent?.[dictionary.localId!]);\n restoreEditedContent(dictionary.localId!);\n }\n },\n });\n };\n\n const handleDeleteDictionary = () => {\n if (!(dictionary as unknown as DistantDictionary).id) return;\n\n deleteDictionary(\n (dictionary as unknown as DistantDictionary).id.toString(),\n {\n onSuccess: (res) => {\n if (res) {\n onDelete?.();\n }\n },\n }\n );\n };\n\n return (\n <>\n <Modal\n isOpen={isFormatAlertModalOpen}\n title={confirmation.title.value}\n size={ModalSize.MD}\n >\n <form className=\"size-full px-3\">\n <p className=\"text-neutral py-4 text-sm\">{confirmation.message}</p>\n\n <div className=\"mt-12 flex justify-end gap-2 max-md:flex-col\">\n <Form.Button\n label={confirmation.cancelButton.label.value}\n disabled={!isEdited || isLoading}\n color={ButtonColor.TEXT}\n className=\"max-md:w-full\"\n variant={ButtonVariant.OUTLINE}\n onClick={() => setIsFormatAlertModalOpen(false)}\n >\n {confirmation.cancelButton.text}\n </Form.Button>\n <Form.Button\n label={confirmation.confirmButton.label.value}\n disabled={!isEdited || isLoading}\n Icon={Save}\n color={ButtonColor.TEXT}\n className=\"max-md:w-full\"\n isLoading={isPushing}\n onClick={handleSaveDictionaryConfirmation}\n >\n {confirmation.confirmButton.text}\n </Form.Button>\n </div>\n </form>\n </Modal>\n <form\n className={cn('flex justify-end gap-2 max-md:flex-col', className)}\n {...props}\n >\n {mode.includes('remote') &&\n isDistantDictionary &&\n onDelete &&\n isAuthenticated && (\n <Form.Button\n label={deleteButton.label.value}\n Icon={Trash}\n color={ButtonColor.ERROR}\n variant={ButtonVariant.OUTLINE}\n className=\"max-md:w-full\"\n isLoading={isDeleting}\n onClick={handleDeleteDictionary}\n >\n {deleteButton.text}\n </Form.Button>\n )}\n {isEdited && (\n <Form.Button\n label={resetButton.label.value}\n disabled={!isEdited}\n Icon={RotateCcw}\n variant={ButtonVariant.OUTLINE}\n color={ButtonColor.TEXT}\n className=\"max-md:w-full\"\n onClick={() => restoreEditedContent(dictionary.localId!)}\n >\n {resetButton.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={ButtonColor.TEXT}\n variant={\n isAuthenticated ? ButtonVariant.OUTLINE : ButtonVariant.DEFAULT\n }\n className=\"max-md:w-full\"\n isLoading={isWriting}\n onClick={() => setIsFormatAlertModalOpen(true)}\n >\n {downloadButton.text}\n </Form.Button>\n )}\n {mode.includes('remote') && isAuthenticated && !isDistantDictionary && (\n <Form.Button\n label={publishButton.label.value}\n disabled={isLoading}\n Icon={ArrowUpFromLine}\n color={ButtonColor.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') &&\n isAuthenticated &&\n isDistantDictionary &&\n 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 </form>\n </>\n );\n};\n"],"names":["useState","useDictionariesRecordActions","useDeleteDictionary","useWriteDictionary","usePushDictionaries","useEditedContent","useIntlayer","useAuth","jsxs","Fragment","jsx","Modal","ModalSize","Form","ButtonColor","ButtonVariant","Save","cn","Trash","RotateCcw","Download","ArrowUpFromLine"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAuCO,MAAM,WAAuC,CAAC;AAAA,EACnD;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAM;AACJ,QAAM,CAAC,wBAAwB,yBAAyB,IAAIA,aAAAA,SAAS,KAAK;AAC1E,QAAM,EAAE,oBAAA,IAAwBC,yCAAA;AAChC,QAAM,EAAE,QAAQ,kBAAkB,WAAW,WAAA,IAC3CC,iBAAAA,oBAAA;AACF,QAAM,EAAE,QAAQ,iBAAiB,WAAW,UAAA,IAC1CC,iBAAAA,mBAAA;AACF,QAAM,EAAE,QAAQ,kBAAkB,WAAW,UAAA,IAC3CC,iBAAAA,oBAAA;AACF,QAAM,YAAY,aAAa;AAE/B,QAAM,EAAE,eAAe,qBAAA,IAAyBC,6BAAA;AAChD,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EAAA,IACEC,cAAAA,YAAY,yBAAyB;AACzC,QAAM,EAAE,gBAAA,IAAoBC,8BAAA;AAE5B,QAAM,mBAAmB,gBAAgB,WAAW,OAAQ;AAE5D,QAAM,WACJ,oBACA,KAAK,UAAU,gBAAgB,MAAM,KAAK,UAAU,UAAU;AAEhE,QAAM,sBACJ,OAAQ,YAA6C,OAAO;AAE9D,QAAM,mCAAmC,YAAY;AACnD,QAAI,CAAC,gBAAgB,WAAW,OAAQ,EAAG;AAE3C,UAAM,oBAAoB;AAAA,MACxB,GAAG;AA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AAA,QACd;AAAA,MAAA;AAAA,IAAA;AAAA,EAEN,GACF;AAEJ;;"}
@@ -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;AAYjD,OAAO,EACL,KAAK,iBAAiB,EACtB,KAAK,EAAE,EACP,KAAK,kBAAkB,EAIxB,MAAM,OAAO,CAAC;AAaf,KAAK,sBAAsB,GAAG;IAC5B,UAAU,EAAE,UAAU,CAAC;IACvB,IAAI,EAAE,CAAC,OAAO,GAAG,QAAQ,CAAC,EAAE,CAAC;IAC7B,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB,GAAG,iBAAiB,CAAC,kBAAkB,CAAC,eAAe,CAAC,EAAE,eAAe,CAAC,CAAC;AAE5E,eAAO,MAAM,QAAQ,EAAE,EAAE,CAAC,sBAAsB,CA2N/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;AAYjD,OAAO,EACL,KAAK,iBAAiB,EACtB,KAAK,EAAE,EACP,KAAK,kBAAkB,EAExB,MAAM,OAAO,CAAC;AAaf,KAAK,sBAAsB,GAAG;IAC5B,UAAU,EAAE,UAAU,CAAC;IACvB,IAAI,EAAE,CAAC,OAAO,GAAG,QAAQ,CAAC,EAAE,CAAC;IAC7B,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB,GAAG,iBAAiB,CAAC,kBAAkB,CAAC,eAAe,CAAC,EAAE,eAAe,CAAC,CAAC;AAE5E,eAAO,MAAM,QAAQ,EAAE,EAAE,CAAC,sBAAsB,CA+M/C,CAAC"}
@@ -2,7 +2,7 @@
2
2
  import { jsxs, Fragment, jsx } from "react/jsx-runtime";
3
3
  import { useDictionariesRecordActions, useEditedContent } from "@intlayer/editor-react";
4
4
  import { Save, Trash, RotateCcw, Download, ArrowUpFromLine } from "lucide-react";
5
- import { useState, useRef, useEffect } from "react";
5
+ import { useState } from "react";
6
6
  import { useIntlayer } from "react-intlayer";
7
7
  import { Modal, ModalSize } from "../../Modal/Modal.mjs";
8
8
  import "@intlayer/config/built";
@@ -41,7 +41,6 @@ const SaveForm = ({
41
41
  confirmation
42
42
  } = useIntlayer("save-dictionary-details");
43
43
  const { isAuthenticated } = useAuth();
44
- const confirmButtonRef = useRef(null);
45
44
  const editedDictionary = editedContent?.[dictionary.localId];
46
45
  const isEdited = editedDictionary && JSON.stringify(editedDictionary) !== JSON.stringify(dictionary);
47
46
  const isDistantDictionary = typeof dictionary?.id !== "undefined";
@@ -91,13 +90,6 @@ const SaveForm = ({
91
90
  }
92
91
  );
93
92
  };
94
- useEffect(() => {
95
- setTimeout(() => {
96
- if (confirmButtonRef.current) {
97
- confirmButtonRef.current.focus();
98
- }
99
- }, 100);
100
- }, []);
101
93
  return /* @__PURE__ */ jsxs(Fragment, { children: [
102
94
  /* @__PURE__ */ jsx(
103
95
  Modal,
@@ -180,7 +172,6 @@ const SaveForm = ({
180
172
  className: "max-md:w-full",
181
173
  isLoading: isWriting,
182
174
  onClick: () => setIsFormatAlertModalOpen(true),
183
- ref: confirmButtonRef,
184
175
  children: downloadButton.text
185
176
  }
186
177
  ),
@@ -194,7 +185,6 @@ const SaveForm = ({
194
185
  className: "max-md:w-full",
195
186
  isLoading: isPushing,
196
187
  onClick: handlePushDictionary,
197
- ref: confirmButtonRef,
198
188
  children: publishButton.text
199
189
  }
200
190
  ),
@@ -208,7 +198,6 @@ const SaveForm = ({
208
198
  className: "max-md:w-full",
209
199
  isLoading: isPushing,
210
200
  onClick: handlePushDictionary,
211
- ref: confirmButtonRef,
212
201
  children: saveButton.text
213
202
  }
214
203
  )
@@ -1 +1 @@
1
- {"version":3,"file":"SaveForm.mjs","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 {\n ArrowUpFromLine,\n Download,\n RotateCcw,\n Save,\n Trash,\n} from 'lucide-react';\nimport {\n type DetailedHTMLProps,\n type FC,\n type FormHTMLAttributes,\n useEffect,\n useRef,\n useState,\n} from 'react';\nimport { useIntlayer } from 'react-intlayer';\nimport { Modal, ModalSize } from '../../../components/Modal';\nimport {\n useAuth,\n useDeleteDictionary,\n usePushDictionaries,\n useWriteDictionary,\n} from '../../../hooks';\nimport { cn } from '../../../utils/cn';\nimport { ButtonColor, ButtonVariant } from '../../Button';\nimport { Form } from '../../Form';\n\ntype DictionaryDetailsProps = {\n dictionary: Dictionary;\n mode: ('local' | 'remote')[];\n onDelete?: () => void;\n} & DetailedHTMLProps<FormHTMLAttributes<HTMLFormElement>, HTMLFormElement>;\n\nexport const SaveForm: FC<DictionaryDetailsProps> = ({\n dictionary,\n mode,\n className,\n onDelete,\n ...props\n}) => {\n const [isFormatAlertModalOpen, setIsFormatAlertModalOpen] = useState(false);\n const { setLocaleDictionary } = useDictionariesRecordActions();\n const { mutate: deleteDictionary, isPending: isDeleting } =\n useDeleteDictionary();\n const { mutate: writeDictionary, isPending: isWriting } =\n useWriteDictionary();\n const { mutate: pushDictionaries, isPending: isPushing } =\n usePushDictionaries();\n const isLoading = isWriting || isPushing;\n\n const { editedContent, restoreEditedContent } = useEditedContent();\n const {\n deleteButton,\n resetButton,\n saveButton,\n publishButton,\n downloadButton,\n confirmation,\n } = useIntlayer('save-dictionary-details');\n const { isAuthenticated } = useAuth();\n const confirmButtonRef = useRef<HTMLButtonElement>(null);\n\n const editedDictionary = editedContent?.[dictionary.localId!];\n\n const isEdited =\n editedDictionary &&\n JSON.stringify(editedDictionary) !== JSON.stringify(dictionary);\n\n const isDistantDictionary =\n typeof (dictionary as unknown as DistantDictionary)?.id !== 'undefined';\n\n const handleSaveDictionaryConfirmation = async () => {\n if (!editedContent?.[dictionary.localId!]) return;\n\n const updatedDictionary = {\n ...dictionary,\n ...editedContent?.[dictionary.localId!],\n };\n\n writeDictionary(\n {\n dictionary: updatedDictionary,\n },\n {\n onSuccess: () => {\n setLocaleDictionary(editedContent?.[dictionary.localId!]);\n restoreEditedContent(dictionary.localId!);\n },\n }\n );\n };\n\n const handlePushDictionary = () => {\n if (!editedContent?.[dictionary.localId!]) return;\n\n const updatedDictionary = {\n ...dictionary,\n ...editedContent?.[dictionary.localId!],\n };\n\n pushDictionaries([updatedDictionary], {\n onSuccess: (res) => {\n if (res) {\n setLocaleDictionary(editedContent?.[dictionary.localId!]);\n restoreEditedContent(dictionary.localId!);\n }\n },\n });\n };\n\n const handleDeleteDictionary = () => {\n if (!(dictionary as unknown as DistantDictionary).id) return;\n\n deleteDictionary(\n (dictionary as unknown as DistantDictionary).id.toString(),\n {\n onSuccess: (res) => {\n if (res) {\n onDelete?.();\n }\n },\n }\n );\n };\n\n useEffect(() => {\n setTimeout(() => {\n if (confirmButtonRef.current) {\n confirmButtonRef.current.focus();\n }\n }, 100);\n }, []);\n\n return (\n <>\n <Modal\n isOpen={isFormatAlertModalOpen}\n title={confirmation.title.value}\n size={ModalSize.MD}\n >\n <form className=\"size-full px-3\">\n <p className=\"text-neutral py-4 text-sm\">{confirmation.message}</p>\n\n <div className=\"mt-12 flex justify-end gap-2 max-md:flex-col\">\n <Form.Button\n label={confirmation.cancelButton.label.value}\n disabled={!isEdited || isLoading}\n color={ButtonColor.TEXT}\n className=\"max-md:w-full\"\n variant={ButtonVariant.OUTLINE}\n onClick={() => setIsFormatAlertModalOpen(false)}\n >\n {confirmation.cancelButton.text}\n </Form.Button>\n <Form.Button\n label={confirmation.confirmButton.label.value}\n disabled={!isEdited || isLoading}\n Icon={Save}\n color={ButtonColor.TEXT}\n className=\"max-md:w-full\"\n isLoading={isPushing}\n onClick={handleSaveDictionaryConfirmation}\n >\n {confirmation.confirmButton.text}\n </Form.Button>\n </div>\n </form>\n </Modal>\n <form\n className={cn('flex justify-end gap-2 max-md:flex-col', className)}\n {...props}\n >\n {mode.includes('remote') &&\n isDistantDictionary &&\n onDelete &&\n isAuthenticated && (\n <Form.Button\n label={deleteButton.label.value}\n Icon={Trash}\n color={ButtonColor.ERROR}\n variant={ButtonVariant.OUTLINE}\n className=\"max-md:w-full\"\n isLoading={isDeleting}\n onClick={handleDeleteDictionary}\n >\n {deleteButton.text}\n </Form.Button>\n )}\n {isEdited && (\n <Form.Button\n label={resetButton.label.value}\n disabled={!isEdited}\n Icon={RotateCcw}\n variant={ButtonVariant.OUTLINE}\n color={ButtonColor.TEXT}\n className=\"max-md:w-full\"\n onClick={() => restoreEditedContent(dictionary.localId!)}\n >\n {resetButton.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={ButtonColor.TEXT}\n variant={\n isAuthenticated ? ButtonVariant.OUTLINE : ButtonVariant.DEFAULT\n }\n className=\"max-md:w-full\"\n isLoading={isWriting}\n onClick={() => setIsFormatAlertModalOpen(true)}\n ref={confirmButtonRef}\n >\n {downloadButton.text}\n </Form.Button>\n )}\n {mode.includes('remote') && isAuthenticated && !isDistantDictionary && (\n <Form.Button\n label={publishButton.label.value}\n disabled={isLoading}\n Icon={ArrowUpFromLine}\n color={ButtonColor.TEXT}\n className=\"max-md:w-full\"\n isLoading={isPushing}\n onClick={handlePushDictionary}\n ref={confirmButtonRef}\n >\n {publishButton.text}\n </Form.Button>\n )}\n {mode.includes('remote') &&\n isAuthenticated &&\n isDistantDictionary &&\n 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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AAU,CAAC,YAAY;AAAA,cACvB,MAAM;AAAA,cACN,OAAO,YAAY;AAAA,cACnB,SACE,kBAAkB,cAAc,UAAU,cAAc;AAAA,cAE1D,WAAU;AAAA,cACV,WAAW;AAAA,cACX,SAAS,MAAM,0BAA0B,IAAI;AAAA,cAC7C,KAAK;AAAA,cAEJ,UAAA,eAAe;AAAA,YAAA;AAAA,UAAA;AAAA,UAGnB,KAAK,SAAS,QAAQ,KAAK,mBAAmB,CAAC,uBAC9C;AAAA,YAAC,KAAK;AAAA,YAAL;AAAA,cACC,OAAO,cAAc,MAAM;AAAA,cAC3B,UAAU;AAAA,cACV,MAAM;AAAA,cACN,OAAO,YAAY;AAAA,cACnB,WAAU;AAAA,cACV,WAAW;AAAA,cACX,SAAS;AAAA,cACT,KAAK;AAAA,cAEJ,UAAA,cAAc;AAAA,YAAA;AAAA,UAAA;AAAA,UAGlB,KAAK,SAAS,QAAQ,KACrB,mBACA,uBACA,YACE;AAAA,YAAC,KAAK;AAAA,YAAL;AAAA,cACC,OAAO,WAAW,MAAM;AAAA,cACxB,UAAU,CAAC,YAAY;AAAA,cACvB,MAAM;AAAA,cACN,OAAM;AAAA,cACN,WAAU;AAAA,cACV,WAAW;AAAA,cACX,SAAS;AAAA,cACT,KAAK;AAAA,cAEJ,UAAA,WAAW;AAAA,YAAA;AAAA,UAAA;AAAA,QACd;AAAA,MAAA;AAAA,IAAA;AAAA,EAEN,GACF;AAEJ;"}
1
+ {"version":3,"file":"SaveForm.mjs","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 {\n ArrowUpFromLine,\n Download,\n RotateCcw,\n Save,\n Trash,\n} from 'lucide-react';\nimport {\n type DetailedHTMLProps,\n type FC,\n type FormHTMLAttributes,\n useState,\n} from 'react';\nimport { useIntlayer } from 'react-intlayer';\nimport { Modal, ModalSize } from '../../../components/Modal';\nimport {\n useAuth,\n useDeleteDictionary,\n usePushDictionaries,\n useWriteDictionary,\n} from '../../../hooks';\nimport { cn } from '../../../utils/cn';\nimport { ButtonColor, ButtonVariant } from '../../Button';\nimport { Form } from '../../Form';\n\ntype DictionaryDetailsProps = {\n dictionary: Dictionary;\n mode: ('local' | 'remote')[];\n onDelete?: () => void;\n} & DetailedHTMLProps<FormHTMLAttributes<HTMLFormElement>, HTMLFormElement>;\n\nexport const SaveForm: FC<DictionaryDetailsProps> = ({\n dictionary,\n mode,\n className,\n onDelete,\n ...props\n}) => {\n const [isFormatAlertModalOpen, setIsFormatAlertModalOpen] = useState(false);\n const { setLocaleDictionary } = useDictionariesRecordActions();\n const { mutate: deleteDictionary, isPending: isDeleting } =\n useDeleteDictionary();\n const { mutate: writeDictionary, isPending: isWriting } =\n useWriteDictionary();\n const { mutate: pushDictionaries, isPending: isPushing } =\n usePushDictionaries();\n const isLoading = isWriting || isPushing;\n\n const { editedContent, restoreEditedContent } = useEditedContent();\n const {\n deleteButton,\n resetButton,\n saveButton,\n publishButton,\n downloadButton,\n confirmation,\n } = useIntlayer('save-dictionary-details');\n const { isAuthenticated } = useAuth();\n\n const editedDictionary = editedContent?.[dictionary.localId!];\n\n const isEdited =\n editedDictionary &&\n JSON.stringify(editedDictionary) !== JSON.stringify(dictionary);\n\n const isDistantDictionary =\n typeof (dictionary as unknown as DistantDictionary)?.id !== 'undefined';\n\n const handleSaveDictionaryConfirmation = async () => {\n if (!editedContent?.[dictionary.localId!]) return;\n\n const updatedDictionary = {\n ...dictionary,\n ...editedContent?.[dictionary.localId!],\n };\n\n writeDictionary(\n {\n dictionary: updatedDictionary,\n },\n {\n onSuccess: () => {\n setLocaleDictionary(editedContent?.[dictionary.localId!]);\n restoreEditedContent(dictionary.localId!);\n },\n }\n );\n };\n\n const handlePushDictionary = () => {\n if (!editedContent?.[dictionary.localId!]) return;\n\n const updatedDictionary = {\n ...dictionary,\n ...editedContent?.[dictionary.localId!],\n };\n\n pushDictionaries([updatedDictionary], {\n onSuccess: (res) => {\n if (res) {\n setLocaleDictionary(editedContent?.[dictionary.localId!]);\n restoreEditedContent(dictionary.localId!);\n }\n },\n });\n };\n\n const handleDeleteDictionary = () => {\n if (!(dictionary as unknown as DistantDictionary).id) return;\n\n deleteDictionary(\n (dictionary as unknown as DistantDictionary).id.toString(),\n {\n onSuccess: (res) => {\n if (res) {\n onDelete?.();\n }\n },\n }\n );\n };\n\n return (\n <>\n <Modal\n isOpen={isFormatAlertModalOpen}\n title={confirmation.title.value}\n size={ModalSize.MD}\n >\n <form className=\"size-full px-3\">\n <p className=\"text-neutral py-4 text-sm\">{confirmation.message}</p>\n\n <div className=\"mt-12 flex justify-end gap-2 max-md:flex-col\">\n <Form.Button\n label={confirmation.cancelButton.label.value}\n disabled={!isEdited || isLoading}\n color={ButtonColor.TEXT}\n className=\"max-md:w-full\"\n variant={ButtonVariant.OUTLINE}\n onClick={() => setIsFormatAlertModalOpen(false)}\n >\n {confirmation.cancelButton.text}\n </Form.Button>\n <Form.Button\n label={confirmation.confirmButton.label.value}\n disabled={!isEdited || isLoading}\n Icon={Save}\n color={ButtonColor.TEXT}\n className=\"max-md:w-full\"\n isLoading={isPushing}\n onClick={handleSaveDictionaryConfirmation}\n >\n {confirmation.confirmButton.text}\n </Form.Button>\n </div>\n </form>\n </Modal>\n <form\n className={cn('flex justify-end gap-2 max-md:flex-col', className)}\n {...props}\n >\n {mode.includes('remote') &&\n isDistantDictionary &&\n onDelete &&\n isAuthenticated && (\n <Form.Button\n label={deleteButton.label.value}\n Icon={Trash}\n color={ButtonColor.ERROR}\n variant={ButtonVariant.OUTLINE}\n className=\"max-md:w-full\"\n isLoading={isDeleting}\n onClick={handleDeleteDictionary}\n >\n {deleteButton.text}\n </Form.Button>\n )}\n {isEdited && (\n <Form.Button\n label={resetButton.label.value}\n disabled={!isEdited}\n Icon={RotateCcw}\n variant={ButtonVariant.OUTLINE}\n color={ButtonColor.TEXT}\n className=\"max-md:w-full\"\n onClick={() => restoreEditedContent(dictionary.localId!)}\n >\n {resetButton.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={ButtonColor.TEXT}\n variant={\n isAuthenticated ? ButtonVariant.OUTLINE : ButtonVariant.DEFAULT\n }\n className=\"max-md:w-full\"\n isLoading={isWriting}\n onClick={() => setIsFormatAlertModalOpen(true)}\n >\n {downloadButton.text}\n </Form.Button>\n )}\n {mode.includes('remote') && isAuthenticated && !isDistantDictionary && (\n <Form.Button\n label={publishButton.label.value}\n disabled={isLoading}\n Icon={ArrowUpFromLine}\n color={ButtonColor.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') &&\n isAuthenticated &&\n isDistantDictionary &&\n 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 </form>\n </>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAuCO,MAAM,WAAuC,CAAC;AAAA,EACnD;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAM;AACJ,QAAM,CAAC,wBAAwB,yBAAyB,IAAI,SAAS,KAAK;AAC1E,QAAM,EAAE,oBAAA,IAAwB,6BAAA;AAChC,QAAM,EAAE,QAAQ,kBAAkB,WAAW,WAAA,IAC3C,oBAAA;AACF,QAAM,EAAE,QAAQ,iBAAiB,WAAW,UAAA,IAC1C,mBAAA;AACF,QAAM,EAAE,QAAQ,kBAAkB,WAAW,UAAA,IAC3C,oBAAA;AACF,QAAM,YAAY,aAAa;AA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cACV,WAAW;AAAA,cACX,SAAS;AAAA,cAER,UAAA,WAAW;AAAA,YAAA;AAAA,UAAA;AAAA,QACd;AAAA,MAAA;AAAA,IAAA;AAAA,EAEN,GACF;AAEJ;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intlayer/design-system",
3
- "version": "6.1.0",
3
+ "version": "6.1.1",
4
4
  "private": false,
5
5
  "description": "Intlayer design system, including UI components used in the Intlayer editor, website, and visual editor/CMS.",
6
6
  "keywords": [
@@ -85,13 +85,13 @@
85
85
  "tailwind-merge": "^3.3.1",
86
86
  "zod": "^3.25.56",
87
87
  "zustand": "^4.5.6",
88
- "@intlayer/api": "6.1.0",
89
- "@intlayer/config": "6.1.0",
90
- "@intlayer/dictionaries-entry": "6.1.0",
91
- "@intlayer/core": "6.1.0",
92
- "intlayer": "6.1.0",
93
- "@intlayer/editor-react": "6.1.0",
94
- "react-intlayer": "6.1.0"
88
+ "@intlayer/api": "6.1.1",
89
+ "@intlayer/config": "6.1.1",
90
+ "@intlayer/dictionaries-entry": "6.1.1",
91
+ "@intlayer/core": "6.1.1",
92
+ "@intlayer/editor-react": "6.1.1",
93
+ "intlayer": "6.1.1",
94
+ "react-intlayer": "6.1.1"
95
95
  },
96
96
  "devDependencies": {
97
97
  "@chromatic-com/storybook": "^3.2.7",
@@ -130,12 +130,12 @@
130
130
  "vite": "^7.1.7",
131
131
  "vite-plugin-dts": "^4.5.3",
132
132
  "vitest": "^3.2.4",
133
- "@utils/eslint-config": "1.0.4",
134
- "@intlayer/backend": "6.1.0",
135
133
  "@utils/ts-config": "1.0.4",
136
- "@utils/tsup-config": "1.0.4",
134
+ "@intlayer/backend": "6.1.1",
135
+ "@utils/eslint-config": "1.0.4",
137
136
  "@utils/ts-config-types": "1.0.4",
138
- "vite-intlayer": "6.1.0"
137
+ "@utils/tsup-config": "1.0.4",
138
+ "vite-intlayer": "6.1.1"
139
139
  },
140
140
  "peerDependencies": {
141
141
  "@monaco-editor/react": "^4.7.0",
@@ -149,14 +149,14 @@
149
149
  "react-dom": ">=16.0.0",
150
150
  "tailwind-merge": "^3.3.1",
151
151
  "zustand": "^4.5.6",
152
- "@intlayer/api": "6.1.0",
153
- "@intlayer/backend": "6.1.0",
154
- "@intlayer/config": "6.1.0",
155
- "@intlayer/core": "6.1.0",
156
- "@intlayer/editor-react": "6.1.0",
157
- "@intlayer/dictionaries-entry": "6.1.0",
158
- "react-intlayer": "6.1.0",
159
- "intlayer": "6.1.0"
152
+ "@intlayer/api": "6.1.1",
153
+ "@intlayer/config": "6.1.1",
154
+ "@intlayer/core": "6.1.1",
155
+ "@intlayer/dictionaries-entry": "6.1.1",
156
+ "@intlayer/backend": "6.1.1",
157
+ "react-intlayer": "6.1.1",
158
+ "intlayer": "6.1.1",
159
+ "@intlayer/editor-react": "6.1.1"
160
160
  },
161
161
  "scripts": {
162
162
  "build": "pnpm clean & pnpm build:ci",