@intlayer/design-system 5.2.9 → 5.3.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.
Files changed (90) hide show
  1. package/dist/.vite/manifest.json +15 -12
  2. package/dist/components/ContentEditor/ContentEditorInput.cjs +1 -0
  3. package/dist/components/ContentEditor/ContentEditorInput.cjs.map +1 -1
  4. package/dist/components/ContentEditor/ContentEditorInput.d.ts.map +1 -1
  5. package/dist/components/ContentEditor/ContentEditorInput.mjs +1 -0
  6. package/dist/components/ContentEditor/ContentEditorInput.mjs.map +1 -1
  7. package/dist/components/DictionaryEditor/DictionaryEditor.cjs +1 -1
  8. package/dist/components/DictionaryEditor/DictionaryEditor.mjs +1 -1
  9. package/dist/components/DictionaryEditor/NodeWrapper/ArrayWrapper.cjs +1 -1
  10. package/dist/components/DictionaryEditor/NodeWrapper/ArrayWrapper.mjs +1 -1
  11. package/dist/components/DictionaryEditor/NodeWrapper/ConditionWrapper.cjs +1 -1
  12. package/dist/components/DictionaryEditor/NodeWrapper/ConditionWrapper.mjs +1 -1
  13. package/dist/components/DictionaryEditor/NodeWrapper/EnumerationWrapper.cjs +1 -1
  14. package/dist/components/DictionaryEditor/NodeWrapper/EnumerationWrapper.mjs +1 -1
  15. package/dist/components/DictionaryEditor/NodeWrapper/MarkdownWrapper.cjs +15 -4
  16. package/dist/components/DictionaryEditor/NodeWrapper/MarkdownWrapper.cjs.map +1 -1
  17. package/dist/components/DictionaryEditor/NodeWrapper/MarkdownWrapper.d.ts.map +1 -1
  18. package/dist/components/DictionaryEditor/NodeWrapper/MarkdownWrapper.mjs +15 -4
  19. package/dist/components/DictionaryEditor/NodeWrapper/MarkdownWrapper.mjs.map +1 -1
  20. package/dist/components/DictionaryEditor/NodeWrapper/NestedObjectWrapper.cjs +1 -1
  21. package/dist/components/DictionaryEditor/NodeWrapper/NestedObjectWrapper.mjs +1 -1
  22. package/dist/components/DictionaryEditor/NodeWrapper/StringWrapper.cjs +1 -1
  23. package/dist/components/DictionaryEditor/NodeWrapper/StringWrapper.cjs.map +1 -1
  24. package/dist/components/DictionaryEditor/NodeWrapper/StringWrapper.d.ts.map +1 -1
  25. package/dist/components/DictionaryEditor/NodeWrapper/StringWrapper.mjs +1 -1
  26. package/dist/components/DictionaryEditor/NodeWrapper/StringWrapper.mjs.map +1 -1
  27. package/dist/components/DictionaryEditor/NodeWrapper/TranslationWrapper.cjs +1 -1
  28. package/dist/components/DictionaryEditor/NodeWrapper/TranslationWrapper.mjs +1 -1
  29. package/dist/components/DictionaryEditor/NodeWrapper/index.cjs +2 -1
  30. package/dist/components/DictionaryEditor/NodeWrapper/index.cjs.map +1 -1
  31. package/dist/components/DictionaryEditor/NodeWrapper/index.mjs +2 -1
  32. package/dist/components/DictionaryEditor/NodeWrapper/index.mjs.map +1 -1
  33. package/dist/components/DictionaryFieldEditor/EnumKeyInput.cjs +1 -0
  34. package/dist/components/DictionaryFieldEditor/EnumKeyInput.cjs.map +1 -1
  35. package/dist/components/DictionaryFieldEditor/EnumKeyInput.d.ts.map +1 -1
  36. package/dist/components/DictionaryFieldEditor/EnumKeyInput.mjs +1 -0
  37. package/dist/components/DictionaryFieldEditor/EnumKeyInput.mjs.map +1 -1
  38. package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.cjs +1 -5
  39. package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.cjs.map +1 -1
  40. package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.d.ts.map +1 -1
  41. package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.mjs +2 -6
  42. package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.mjs.map +1 -1
  43. package/dist/components/Form/FormBase.cjs +2 -1
  44. package/dist/components/Form/FormBase.cjs.map +1 -1
  45. package/dist/components/Form/FormBase.d.ts.map +1 -1
  46. package/dist/components/Form/FormBase.mjs +2 -1
  47. package/dist/components/Form/FormBase.mjs.map +1 -1
  48. package/dist/components/Input/Input.cjs.map +1 -1
  49. package/dist/components/Input/Input.d.ts +7 -1
  50. package/dist/components/Input/Input.d.ts.map +1 -1
  51. package/dist/components/Input/Input.mjs.map +1 -1
  52. package/dist/components/Input/InputPassword.cjs +8 -1
  53. package/dist/components/Input/InputPassword.cjs.map +1 -1
  54. package/dist/components/Input/InputPassword.d.ts.map +1 -1
  55. package/dist/components/Input/InputPassword.mjs +8 -1
  56. package/dist/components/Input/InputPassword.mjs.map +1 -1
  57. package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.cjs +1 -0
  58. package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.cjs.map +1 -1
  59. package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.d.ts.map +1 -1
  60. package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.mjs +1 -0
  61. package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.mjs.map +1 -1
  62. package/dist/components/LocaleSwitcherContentDropDown/localeSwitcher.content.cjs +15 -0
  63. package/dist/components/LocaleSwitcherContentDropDown/localeSwitcher.content.cjs.map +1 -1
  64. package/dist/components/LocaleSwitcherContentDropDown/localeSwitcher.content.d.ts +15 -0
  65. package/dist/components/LocaleSwitcherContentDropDown/localeSwitcher.content.d.ts.map +1 -1
  66. package/dist/components/LocaleSwitcherContentDropDown/localeSwitcher.content.mjs +15 -0
  67. package/dist/components/LocaleSwitcherContentDropDown/localeSwitcher.content.mjs.map +1 -1
  68. package/dist/components/LocaleSwitcherDropDown/LocaleSwitcher.cjs +1 -0
  69. package/dist/components/LocaleSwitcherDropDown/LocaleSwitcher.cjs.map +1 -1
  70. package/dist/components/LocaleSwitcherDropDown/LocaleSwitcher.d.ts.map +1 -1
  71. package/dist/components/LocaleSwitcherDropDown/LocaleSwitcher.mjs +1 -0
  72. package/dist/components/LocaleSwitcherDropDown/LocaleSwitcher.mjs.map +1 -1
  73. package/dist/components/LocaleSwitcherDropDown/localeSwitcher.content.cjs +15 -0
  74. package/dist/components/LocaleSwitcherDropDown/localeSwitcher.content.cjs.map +1 -1
  75. package/dist/components/LocaleSwitcherDropDown/localeSwitcher.content.d.ts +15 -0
  76. package/dist/components/LocaleSwitcherDropDown/localeSwitcher.content.d.ts.map +1 -1
  77. package/dist/components/LocaleSwitcherDropDown/localeSwitcher.content.mjs +15 -0
  78. package/dist/components/LocaleSwitcherDropDown/localeSwitcher.content.mjs.map +1 -1
  79. package/dist/components/TextArea/TextArea.cjs.map +1 -1
  80. package/dist/components/TextArea/TextArea.d.ts +7 -1
  81. package/dist/components/TextArea/TextArea.d.ts.map +1 -1
  82. package/dist/components/TextArea/TextArea.mjs.map +1 -1
  83. package/dist/{index-D02c1QrF.cjs → index-BpCAhDMe.cjs} +3 -12
  84. package/dist/index-BpCAhDMe.cjs.map +1 -0
  85. package/dist/{index-C57uA6Lk.js → index-CVTE3oHq.js} +2 -11
  86. package/dist/index-CVTE3oHq.js.map +1 -0
  87. package/dist/tailwind.css +1 -1
  88. package/package.json +20 -19
  89. package/dist/index-C57uA6Lk.js.map +0 -1
  90. package/dist/index-D02c1QrF.cjs.map +0 -1
@@ -63,19 +63,21 @@
63
63
  "src/hooks/useScrollBlockage/useScrollBlockageStore.ts"
64
64
  ]
65
65
  },
66
- "_index-C57uA6Lk.js": {
67
- "file": "index-C57uA6Lk.js",
66
+ "_index-BpCAhDMe.cjs": {
67
+ "file": "index-BpCAhDMe.cjs",
68
68
  "name": "index",
69
69
  "imports": [
70
70
  "src/components/DictionaryEditor/ItemLayout.tsx",
71
+ "src/components/DictionaryEditor/NodeWrapper/MarkdownWrapper.tsx",
71
72
  "src/components/DictionaryEditor/NodeWrapper/StringWrapper.tsx"
72
73
  ]
73
74
  },
74
- "_index-D02c1QrF.cjs": {
75
- "file": "index-D02c1QrF.cjs",
75
+ "_index-CVTE3oHq.js": {
76
+ "file": "index-CVTE3oHq.js",
76
77
  "name": "index",
77
78
  "imports": [
78
79
  "src/components/DictionaryEditor/ItemLayout.tsx",
80
+ "src/components/DictionaryEditor/NodeWrapper/MarkdownWrapper.tsx",
79
81
  "src/components/DictionaryEditor/NodeWrapper/StringWrapper.tsx"
80
82
  ]
81
83
  },
@@ -714,7 +716,7 @@
714
716
  "isEntry": true,
715
717
  "imports": [
716
718
  "src/components/DictionaryFieldEditor/SaveForm/SaveForm.tsx",
717
- "_index-D02c1QrF.cjs"
719
+ "_index-BpCAhDMe.cjs"
718
720
  ]
719
721
  },
720
722
  "src/components/DictionaryEditor/ItemLayout.tsx": {
@@ -734,7 +736,7 @@
734
736
  "isEntry": true,
735
737
  "imports": [
736
738
  "src/components/DictionaryEditor/ItemLayout.tsx",
737
- "_index-D02c1QrF.cjs"
739
+ "_index-BpCAhDMe.cjs"
738
740
  ]
739
741
  },
740
742
  "src/components/DictionaryEditor/NodeWrapper/ConditionWrapper.tsx": {
@@ -743,7 +745,7 @@
743
745
  "src": "src/components/DictionaryEditor/NodeWrapper/ConditionWrapper.tsx",
744
746
  "isEntry": true,
745
747
  "imports": [
746
- "_index-D02c1QrF.cjs"
748
+ "_index-BpCAhDMe.cjs"
747
749
  ]
748
750
  },
749
751
  "src/components/DictionaryEditor/NodeWrapper/EnumerationWrapper.tsx": {
@@ -752,7 +754,7 @@
752
754
  "src": "src/components/DictionaryEditor/NodeWrapper/EnumerationWrapper.tsx",
753
755
  "isEntry": true,
754
756
  "imports": [
755
- "_index-D02c1QrF.cjs"
757
+ "_index-BpCAhDMe.cjs"
756
758
  ]
757
759
  },
758
760
  "src/components/DictionaryEditor/NodeWrapper/MarkdownWrapper.tsx": {
@@ -761,7 +763,7 @@
761
763
  "src": "src/components/DictionaryEditor/NodeWrapper/MarkdownWrapper.tsx",
762
764
  "isEntry": true,
763
765
  "imports": [
764
- "_index-D02c1QrF.cjs"
766
+ "src/components/DictionaryEditor/NodeWrapper/StringWrapper.tsx"
765
767
  ]
766
768
  },
767
769
  "src/components/DictionaryEditor/NodeWrapper/NestedObjectWrapper.tsx": {
@@ -771,7 +773,7 @@
771
773
  "isEntry": true,
772
774
  "imports": [
773
775
  "src/components/DictionaryEditor/ItemLayout.tsx",
774
- "_index-D02c1QrF.cjs"
776
+ "_index-BpCAhDMe.cjs"
775
777
  ]
776
778
  },
777
779
  "src/components/DictionaryEditor/NodeWrapper/StringWrapper.tsx": {
@@ -793,7 +795,7 @@
793
795
  "src": "src/components/DictionaryEditor/NodeWrapper/TranslationWrapper.tsx",
794
796
  "isEntry": true,
795
797
  "imports": [
796
- "_index-D02c1QrF.cjs"
798
+ "_index-BpCAhDMe.cjs"
797
799
  ]
798
800
  },
799
801
  "src/components/DictionaryEditor/NodeWrapper/index.tsx": {
@@ -802,7 +804,8 @@
802
804
  "src": "src/components/DictionaryEditor/NodeWrapper/index.tsx",
803
805
  "isEntry": true,
804
806
  "imports": [
805
- "_index-D02c1QrF.cjs",
807
+ "_index-BpCAhDMe.cjs",
808
+ "src/components/DictionaryEditor/NodeWrapper/MarkdownWrapper.tsx",
806
809
  "src/components/DictionaryEditor/NodeWrapper/StringWrapper.tsx"
807
810
  ]
808
811
  },
@@ -41,6 +41,7 @@ const ContentEditorInput = ({
41
41
  components_Input_Input.Input,
42
42
  {
43
43
  onChange: handleOnContentChange,
44
+ "aria-label": "value",
44
45
  variant: "invisible",
45
46
  className: "size-full",
46
47
  defaultValue: children,
@@ -1 +1 @@
1
- {"version":3,"file":"ContentEditorInput.cjs","sources":["../../../src/components/ContentEditor/ContentEditorInput.tsx"],"sourcesContent":["'use client';\n\nimport { Check, X } from 'lucide-react';\nimport {\n type ReactNode,\n useState,\n type FC,\n type ChangeEventHandler,\n useEffect,\n} from 'react';\nimport { Button } from '../Button';\nimport { type InputProps, Input } from '../Input';\n\nexport type ContentEditorInputProps = {\n children: InputProps['value'];\n onContentChange: (content: InputProps['value']) => void;\n disabled?: boolean;\n validate?: (content: InputProps['value']) => boolean;\n additionalButtons?: ReactNode;\n} & Omit<InputProps, 'children'>;\n\nexport const ContentEditorInput: FC<ContentEditorInputProps> = ({\n children,\n onContentChange,\n disabled,\n validate,\n additionalButtons,\n ...props\n}) => {\n const [newValue, setNewValue] = useState<InputProps['value']>(children);\n const [resetIncrementor, setResetIncrementor] = useState<number>(0); // To reset the div on cancel\n const isEdited: boolean = newValue !== children;\n\n const handleCancel = () => {\n setNewValue(children);\n setResetIncrementor((prev) => prev + 1);\n };\n const handleValid = () => {\n onContentChange(newValue);\n };\n\n const handleOnContentChange: ChangeEventHandler<HTMLInputElement> = (e) => {\n setNewValue(e.currentTarget.value);\n };\n\n useEffect(() => {\n setNewValue(children);\n }, [children]);\n\n const isValid = validate?.(newValue) ?? true;\n\n return (\n <div\n className=\"flex size-full flex-col items-center justify-between gap-2\"\n key={String(children)}\n >\n <Input\n onChange={handleOnContentChange}\n key={resetIncrementor}\n variant=\"invisible\"\n className=\"size-full\"\n defaultValue={children}\n {...props}\n />\n {(isEdited || additionalButtons) && (\n <div className=\"flex w-full items-center justify-end gap-2\">\n {isEdited && (\n <>\n <Button\n Icon={Check}\n label=\"Validate\"\n variant=\"hoverable\"\n color=\"text\"\n size=\"icon-sm\"\n className=\"cursor-pointer hover:scale-110\"\n disabled={disabled || !isValid}\n onClick={handleValid}\n />\n <Button\n Icon={X}\n label=\"Cancel\"\n variant=\"hoverable\"\n size=\"icon-sm\"\n color=\"text\"\n className=\"cursor-pointer hover:scale-110\"\n onClick={handleCancel}\n />\n </>\n )}\n {additionalButtons}\n </div>\n )}\n </div>\n );\n};\n"],"names":["useState","useEffect","jsxs","jsx","Input","Fragment","Button","Check","X"],"mappings":";;;;;;;;;AAqBO,MAAM,qBAAkD,CAAC;AAAA,EAC9D;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAM;AACJ,QAAM,CAAC,UAAU,WAAW,IAAIA,aAAAA,SAA8B,QAAQ;AACtE,QAAM,CAAC,kBAAkB,mBAAmB,IAAIA,aAAAA,SAAiB,CAAC;AAClE,QAAM,WAAoB,aAAa;AAEvC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AAA,IAAA;AAAA,IApCG,OAAO,QAAQ;AAAA,EAsCtB;AAEJ;;"}
1
+ {"version":3,"file":"ContentEditorInput.cjs","sources":["../../../src/components/ContentEditor/ContentEditorInput.tsx"],"sourcesContent":["'use client';\n\nimport { Check, X } from 'lucide-react';\nimport {\n type ReactNode,\n useState,\n type FC,\n type ChangeEventHandler,\n useEffect,\n} from 'react';\nimport { Button } from '../Button';\nimport { type InputProps, Input } from '../Input';\n\nexport type ContentEditorInputProps = {\n children: InputProps['value'];\n onContentChange: (content: InputProps['value']) => void;\n disabled?: boolean;\n validate?: (content: InputProps['value']) => boolean;\n additionalButtons?: ReactNode;\n} & Omit<InputProps, 'children'>;\n\nexport const ContentEditorInput: FC<ContentEditorInputProps> = ({\n children,\n onContentChange,\n disabled,\n validate,\n additionalButtons,\n ...props\n}) => {\n const [newValue, setNewValue] = useState<InputProps['value']>(children);\n const [resetIncrementor, setResetIncrementor] = useState<number>(0); // To reset the div on cancel\n const isEdited: boolean = newValue !== children;\n\n const handleCancel = () => {\n setNewValue(children);\n setResetIncrementor((prev) => prev + 1);\n };\n const handleValid = () => {\n onContentChange(newValue);\n };\n\n const handleOnContentChange: ChangeEventHandler<HTMLInputElement> = (e) => {\n setNewValue(e.currentTarget.value);\n };\n\n useEffect(() => {\n setNewValue(children);\n }, [children]);\n\n const isValid = validate?.(newValue) ?? true;\n\n return (\n <div\n className=\"flex size-full flex-col items-center justify-between gap-2\"\n key={String(children)}\n >\n <Input\n onChange={handleOnContentChange}\n key={resetIncrementor}\n aria-label=\"value\"\n variant=\"invisible\"\n className=\"size-full\"\n defaultValue={children}\n {...props}\n />\n {(isEdited || additionalButtons) && (\n <div className=\"flex w-full items-center justify-end gap-2\">\n {isEdited && (\n <>\n <Button\n Icon={Check}\n label=\"Validate\"\n variant=\"hoverable\"\n color=\"text\"\n size=\"icon-sm\"\n className=\"cursor-pointer hover:scale-110\"\n disabled={disabled || !isValid}\n onClick={handleValid}\n />\n <Button\n Icon={X}\n label=\"Cancel\"\n variant=\"hoverable\"\n size=\"icon-sm\"\n color=\"text\"\n className=\"cursor-pointer hover:scale-110\"\n onClick={handleCancel}\n />\n </>\n )}\n {additionalButtons}\n </div>\n )}\n </div>\n );\n};\n"],"names":["useState","useEffect","jsxs","jsx","Input","Fragment","Button","Check","X"],"mappings":";;;;;;;;;AAqBO,MAAM,qBAAkD,CAAC;AAAA,EAC9D;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAM;AACJ,QAAM,CAAC,UAAU,WAAW,IAAIA,aAAAA,SAA8B,QAAQ;AACtE,QAAM,CAAC,kBAAkB,mBAAmB,IAAIA,aAAAA,SAAiB,CAAC;AAClE,QAAM,WAAoB,aAAa;AAEvC,QAAM,eAAe,MAAM;AACzB,gBAAY,QAAQ;AACA,wBAAA,CAAC,SAAS,OAAO,CAAC;AAAA,EACxC;AACA,QAAM,cAAc,MAAM;AACxB,oBAAgB,QAAQ;AAAA,EAC1B;AAEM,QAAA,wBAA8D,CAAC,MAAM;AAC7D,gBAAA,EAAE,cAAc,KAAK;AAAA,EACnC;AAEAC,eAAAA,UAAU,MAAM;AACd,gBAAY,QAAQ;AAAA,EAAA,GACnB,CAAC,QAAQ,CAAC;AAEP,QAAA,UAAU,WAAW,QAAQ,KAAK;AAGtC,SAAAC,2BAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAU;AAAA,MAGV,UAAA;AAAA,QAAAC,2BAAA;AAAA,UAACC,uBAAA;AAAA,UAAA;AAAA,YACC,UAAU;AAAA,YAEV,cAAW;AAAA,YACX,SAAQ;AAAA,YACR,WAAU;AAAA,YACV,cAAc;AAAA,YACb,GAAG;AAAA,UAAA;AAAA,UALC;AAAA,QAMP;AAAA,SACE,YAAY,sBACXF,2BAAA,KAAA,OAAA,EAAI,WAAU,8CACZ,UAAA;AAAA,UAAA,YAEGA,2BAAA,KAAAG,qBAAA,EAAA,UAAA;AAAA,YAAAF,2BAAA;AAAA,cAACG,yBAAA;AAAA,cAAA;AAAA,gBACC,MAAMC,YAAA;AAAA,gBACN,OAAM;AAAA,gBACN,SAAQ;AAAA,gBACR,OAAM;AAAA,gBACN,MAAK;AAAA,gBACL,WAAU;AAAA,gBACV,UAAU,YAAY,CAAC;AAAA,gBACvB,SAAS;AAAA,cAAA;AAAA,YACX;AAAA,YACAJ,2BAAA;AAAA,cAACG,yBAAA;AAAA,cAAA;AAAA,gBACC,MAAME,YAAA;AAAA,gBACN,OAAM;AAAA,gBACN,SAAQ;AAAA,gBACR,MAAK;AAAA,gBACL,OAAM;AAAA,gBACN,WAAU;AAAA,gBACV,SAAS;AAAA,cAAA;AAAA,YAAA;AAAA,UACX,GACF;AAAA,UAED;AAAA,QAAA,EACH,CAAA;AAAA,MAAA;AAAA,IAAA;AAAA,IArCG,OAAO,QAAQ;AAAA,EAuCtB;AAEJ;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"ContentEditorInput.d.ts","sourceRoot":"","sources":["../../../src/components/ContentEditor/ContentEditorInput.tsx"],"names":[],"mappings":"AAGA,OAAO,EACL,KAAK,SAAS,EAEd,KAAK,EAAE,EAGR,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,KAAK,UAAU,EAAS,MAAM,UAAU,CAAC;AAElD,MAAM,MAAM,uBAAuB,GAAG;IACpC,QAAQ,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC;IAC9B,eAAe,EAAE,CAAC,OAAO,EAAE,UAAU,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC;IACxD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,UAAU,CAAC,OAAO,CAAC,KAAK,OAAO,CAAC;IACrD,iBAAiB,CAAC,EAAE,SAAS,CAAC;CAC/B,GAAG,IAAI,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;AAEjC,eAAO,MAAM,kBAAkB,EAAE,EAAE,CAAC,uBAAuB,CAyE1D,CAAC"}
1
+ {"version":3,"file":"ContentEditorInput.d.ts","sourceRoot":"","sources":["../../../src/components/ContentEditor/ContentEditorInput.tsx"],"names":[],"mappings":"AAGA,OAAO,EACL,KAAK,SAAS,EAEd,KAAK,EAAE,EAGR,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,KAAK,UAAU,EAAS,MAAM,UAAU,CAAC;AAElD,MAAM,MAAM,uBAAuB,GAAG;IACpC,QAAQ,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC;IAC9B,eAAe,EAAE,CAAC,OAAO,EAAE,UAAU,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC;IACxD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,UAAU,CAAC,OAAO,CAAC,KAAK,OAAO,CAAC;IACrD,iBAAiB,CAAC,EAAE,SAAS,CAAC;CAC/B,GAAG,IAAI,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;AAEjC,eAAO,MAAM,kBAAkB,EAAE,EAAE,CAAC,uBAAuB,CA0E1D,CAAC"}
@@ -39,6 +39,7 @@ const ContentEditorInput = ({
39
39
  Input,
40
40
  {
41
41
  onChange: handleOnContentChange,
42
+ "aria-label": "value",
42
43
  variant: "invisible",
43
44
  className: "size-full",
44
45
  defaultValue: children,
@@ -1 +1 @@
1
- {"version":3,"file":"ContentEditorInput.mjs","sources":["../../../src/components/ContentEditor/ContentEditorInput.tsx"],"sourcesContent":["'use client';\n\nimport { Check, X } from 'lucide-react';\nimport {\n type ReactNode,\n useState,\n type FC,\n type ChangeEventHandler,\n useEffect,\n} from 'react';\nimport { Button } from '../Button';\nimport { type InputProps, Input } from '../Input';\n\nexport type ContentEditorInputProps = {\n children: InputProps['value'];\n onContentChange: (content: InputProps['value']) => void;\n disabled?: boolean;\n validate?: (content: InputProps['value']) => boolean;\n additionalButtons?: ReactNode;\n} & Omit<InputProps, 'children'>;\n\nexport const ContentEditorInput: FC<ContentEditorInputProps> = ({\n children,\n onContentChange,\n disabled,\n validate,\n additionalButtons,\n ...props\n}) => {\n const [newValue, setNewValue] = useState<InputProps['value']>(children);\n const [resetIncrementor, setResetIncrementor] = useState<number>(0); // To reset the div on cancel\n const isEdited: boolean = newValue !== children;\n\n const handleCancel = () => {\n setNewValue(children);\n setResetIncrementor((prev) => prev + 1);\n };\n const handleValid = () => {\n onContentChange(newValue);\n };\n\n const handleOnContentChange: ChangeEventHandler<HTMLInputElement> = (e) => {\n setNewValue(e.currentTarget.value);\n };\n\n useEffect(() => {\n setNewValue(children);\n }, [children]);\n\n const isValid = validate?.(newValue) ?? true;\n\n return (\n <div\n className=\"flex size-full flex-col items-center justify-between gap-2\"\n key={String(children)}\n >\n <Input\n onChange={handleOnContentChange}\n key={resetIncrementor}\n variant=\"invisible\"\n className=\"size-full\"\n defaultValue={children}\n {...props}\n />\n {(isEdited || additionalButtons) && (\n <div className=\"flex w-full items-center justify-end gap-2\">\n {isEdited && (\n <>\n <Button\n Icon={Check}\n label=\"Validate\"\n variant=\"hoverable\"\n color=\"text\"\n size=\"icon-sm\"\n className=\"cursor-pointer hover:scale-110\"\n disabled={disabled || !isValid}\n onClick={handleValid}\n />\n <Button\n Icon={X}\n label=\"Cancel\"\n variant=\"hoverable\"\n size=\"icon-sm\"\n color=\"text\"\n className=\"cursor-pointer hover:scale-110\"\n onClick={handleCancel}\n />\n </>\n )}\n {additionalButtons}\n </div>\n )}\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;;;AAqBO,MAAM,qBAAkD,CAAC;AAAA,EAC9D;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAM;AACJ,QAAM,CAAC,UAAU,WAAW,IAAI,SAA8B,QAAQ;AACtE,QAAM,CAAC,kBAAkB,mBAAmB,IAAI,SAAiB,CAAC;AAClE,QAAM,WAAoB,aAAa;AAEvC,QAAM,eAAe,MAAM;AACzB,gBAAY,QAAQ;AACA,wBAAA,CAAC,SAAS,OAAO,CAAC;AAAA,EACxC;AACA,QAAM,cAAc,MAAM;AACxB,oBAAgB,QAAQ;AAAA,EAC1B;AAEM,QAAA,wBAA8D,CAAC,MAAM;AAC7D,gBAAA,EAAE,cAAc,KAAK;AAAA,EACnC;AAEA,YAAU,MAAM;AACd,gBAAY,QAAQ;AAAA,EAAA,GACnB,CAAC,QAAQ,CAAC;AAEP,QAAA,UAAU,WAAW,QAAQ,KAAK;AAGtC,SAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAU;AAAA,MAGV,UAAA;AAAA,QAAA;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,UAAU;AAAA,YAEV,SAAQ;AAAA,YACR,WAAU;AAAA,YACV,cAAc;AAAA,YACb,GAAG;AAAA,UAAA;AAAA,UAJC;AAAA,QAKP;AAAA,SACE,YAAY,sBACX,qBAAA,OAAA,EAAI,WAAU,8CACZ,UAAA;AAAA,UAAA,YAEG,qBAAA,UAAA,EAAA,UAAA;AAAA,YAAA;AAAA,cAAC;AAAA,cAAA;AAAA,gBACC,MAAM;AAAA,gBACN,OAAM;AAAA,gBACN,SAAQ;AAAA,gBACR,OAAM;AAAA,gBACN,MAAK;AAAA,gBACL,WAAU;AAAA,gBACV,UAAU,YAAY,CAAC;AAAA,gBACvB,SAAS;AAAA,cAAA;AAAA,YACX;AAAA,YACA;AAAA,cAAC;AAAA,cAAA;AAAA,gBACC,MAAM;AAAA,gBACN,OAAM;AAAA,gBACN,SAAQ;AAAA,gBACR,MAAK;AAAA,gBACL,OAAM;AAAA,gBACN,WAAU;AAAA,gBACV,SAAS;AAAA,cAAA;AAAA,YAAA;AAAA,UACX,GACF;AAAA,UAED;AAAA,QAAA,EACH,CAAA;AAAA,MAAA;AAAA,IAAA;AAAA,IApCG,OAAO,QAAQ;AAAA,EAsCtB;AAEJ;"}
1
+ {"version":3,"file":"ContentEditorInput.mjs","sources":["../../../src/components/ContentEditor/ContentEditorInput.tsx"],"sourcesContent":["'use client';\n\nimport { Check, X } from 'lucide-react';\nimport {\n type ReactNode,\n useState,\n type FC,\n type ChangeEventHandler,\n useEffect,\n} from 'react';\nimport { Button } from '../Button';\nimport { type InputProps, Input } from '../Input';\n\nexport type ContentEditorInputProps = {\n children: InputProps['value'];\n onContentChange: (content: InputProps['value']) => void;\n disabled?: boolean;\n validate?: (content: InputProps['value']) => boolean;\n additionalButtons?: ReactNode;\n} & Omit<InputProps, 'children'>;\n\nexport const ContentEditorInput: FC<ContentEditorInputProps> = ({\n children,\n onContentChange,\n disabled,\n validate,\n additionalButtons,\n ...props\n}) => {\n const [newValue, setNewValue] = useState<InputProps['value']>(children);\n const [resetIncrementor, setResetIncrementor] = useState<number>(0); // To reset the div on cancel\n const isEdited: boolean = newValue !== children;\n\n const handleCancel = () => {\n setNewValue(children);\n setResetIncrementor((prev) => prev + 1);\n };\n const handleValid = () => {\n onContentChange(newValue);\n };\n\n const handleOnContentChange: ChangeEventHandler<HTMLInputElement> = (e) => {\n setNewValue(e.currentTarget.value);\n };\n\n useEffect(() => {\n setNewValue(children);\n }, [children]);\n\n const isValid = validate?.(newValue) ?? true;\n\n return (\n <div\n className=\"flex size-full flex-col items-center justify-between gap-2\"\n key={String(children)}\n >\n <Input\n onChange={handleOnContentChange}\n key={resetIncrementor}\n aria-label=\"value\"\n variant=\"invisible\"\n className=\"size-full\"\n defaultValue={children}\n {...props}\n />\n {(isEdited || additionalButtons) && (\n <div className=\"flex w-full items-center justify-end gap-2\">\n {isEdited && (\n <>\n <Button\n Icon={Check}\n label=\"Validate\"\n variant=\"hoverable\"\n color=\"text\"\n size=\"icon-sm\"\n className=\"cursor-pointer hover:scale-110\"\n disabled={disabled || !isValid}\n onClick={handleValid}\n />\n <Button\n Icon={X}\n label=\"Cancel\"\n variant=\"hoverable\"\n size=\"icon-sm\"\n color=\"text\"\n className=\"cursor-pointer hover:scale-110\"\n onClick={handleCancel}\n />\n </>\n )}\n {additionalButtons}\n </div>\n )}\n </div>\n );\n};\n"],"names":[],"mapp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;AAAA,gBACN,SAAQ;AAAA,gBACR,MAAK;AAAA,gBACL,OAAM;AAAA,gBACN,WAAU;AAAA,gBACV,SAAS;AAAA,cAAA;AAAA,YAAA;AAAA,UACX,GACF;AAAA,UAED;AAAA,QAAA,EACH,CAAA;AAAA,MAAA;AAAA,IAAA;AAAA,IArCG,OAAO,QAAQ;AAAA,EAuCtB;AAEJ;"}
@@ -5,7 +5,7 @@ const jsxRuntime = require("react/jsx-runtime");
5
5
  const ReactExports = require("react");
6
6
  const editorReact = require("@intlayer/editor-react");
7
7
  const components_DictionaryFieldEditor_SaveForm_SaveForm = require("../DictionaryFieldEditor/SaveForm/SaveForm.cjs");
8
- const components_DictionaryEditor_NodeWrapper_ArrayWrapper = require("../../index-D02c1QrF.cjs");
8
+ const components_DictionaryEditor_NodeWrapper_ArrayWrapper = require("../../index-BpCAhDMe.cjs");
9
9
  const DictionaryEditor = ({
10
10
  dictionary,
11
11
  mode,
@@ -3,7 +3,7 @@ import { jsxs, jsx } from "react/jsx-runtime";
3
3
  import { createElement } from "react";
4
4
  import { useEditedContent, useFocusDictionary } from "@intlayer/editor-react";
5
5
  import { SaveForm } from "../DictionaryFieldEditor/SaveForm/SaveForm.mjs";
6
- import { N as NodeWrapper } from "../../index-C57uA6Lk.js";
6
+ import { N as NodeWrapper } from "../../index-CVTE3oHq.js";
7
7
  const DictionaryEditor = ({
8
8
  dictionary,
9
9
  mode,
@@ -3,6 +3,6 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  require("react/jsx-runtime");
4
4
  require("@intlayer/core");
5
5
  require("../ItemLayout.cjs");
6
- const components_DictionaryEditor_NodeWrapper_ArrayWrapper = require("../../../index-D02c1QrF.cjs");
6
+ const components_DictionaryEditor_NodeWrapper_ArrayWrapper = require("../../../index-BpCAhDMe.cjs");
7
7
  exports.ArrayWrapper = components_DictionaryEditor_NodeWrapper_ArrayWrapper.ArrayWrapper;
8
8
  //# sourceMappingURL=ArrayWrapper.cjs.map
@@ -1,7 +1,7 @@
1
1
  import "react/jsx-runtime";
2
2
  import "@intlayer/core";
3
3
  import "../ItemLayout.mjs";
4
- import { A } from "../../../index-C57uA6Lk.js";
4
+ import { A } from "../../../index-CVTE3oHq.js";
5
5
  export {
6
6
  A as ArrayWrapper
7
7
  };
@@ -3,6 +3,6 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  require("react/jsx-runtime");
4
4
  require("react");
5
5
  require("@intlayer/core");
6
- const components_DictionaryEditor_NodeWrapper_ArrayWrapper = require("../../../index-D02c1QrF.cjs");
6
+ const components_DictionaryEditor_NodeWrapper_ArrayWrapper = require("../../../index-BpCAhDMe.cjs");
7
7
  exports.ConditionWrapper = components_DictionaryEditor_NodeWrapper_ArrayWrapper.ConditionWrapper;
8
8
  //# sourceMappingURL=ConditionWrapper.cjs.map
@@ -1,7 +1,7 @@
1
1
  import "react/jsx-runtime";
2
2
  import "react";
3
3
  import "@intlayer/core";
4
- import { C } from "../../../index-C57uA6Lk.js";
4
+ import { C } from "../../../index-CVTE3oHq.js";
5
5
  export {
6
6
  C as ConditionWrapper
7
7
  };
@@ -3,6 +3,6 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  require("react/jsx-runtime");
4
4
  require("react");
5
5
  require("@intlayer/core");
6
- const components_DictionaryEditor_NodeWrapper_ArrayWrapper = require("../../../index-D02c1QrF.cjs");
6
+ const components_DictionaryEditor_NodeWrapper_ArrayWrapper = require("../../../index-BpCAhDMe.cjs");
7
7
  exports.EnumerationWrapper = components_DictionaryEditor_NodeWrapper_ArrayWrapper.EnumerationWrapper;
8
8
  //# sourceMappingURL=EnumerationWrapper.cjs.map
@@ -1,7 +1,7 @@
1
1
  import "react/jsx-runtime";
2
2
  import "react";
3
3
  import "@intlayer/core";
4
- import { E } from "../../../index-C57uA6Lk.js";
4
+ import { E } from "../../../index-CVTE3oHq.js";
5
5
  export {
6
6
  E as EnumerationWrapper
7
7
  };
@@ -1,7 +1,18 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- require("react/jsx-runtime");
4
- require("@intlayer/core");
5
- const components_DictionaryEditor_NodeWrapper_ArrayWrapper = require("../../../index-D02c1QrF.cjs");
6
- exports.MarkdownWrapper = components_DictionaryEditor_NodeWrapper_ArrayWrapper.MarkdownWrapper;
3
+ const jsxRuntime = require("react/jsx-runtime");
4
+ const core = require("@intlayer/core");
5
+ const components_DictionaryEditor_NodeWrapper_StringWrapper = require("./StringWrapper.cjs");
6
+ const MarkdownWrapper = (props) => {
7
+ const { keyPath, section } = props;
8
+ const newKeyPath = [
9
+ ...keyPath,
10
+ {
11
+ type: core.NodeType.Markdown
12
+ }
13
+ ];
14
+ const subSection = section[core.NodeType.Markdown];
15
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "ml-2 grid grid-cols-[auto,1fr] gap-2", children: /* @__PURE__ */ jsxRuntime.jsx(components_DictionaryEditor_NodeWrapper_StringWrapper.StringWrapper, { ...props, keyPath: newKeyPath, section: subSection }) });
16
+ };
17
+ exports.MarkdownWrapper = MarkdownWrapper;
7
18
  //# sourceMappingURL=MarkdownWrapper.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"MarkdownWrapper.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
1
+ {"version":3,"file":"MarkdownWrapper.cjs","sources":["../../../../src/components/DictionaryEditor/NodeWrapper/MarkdownWrapper.tsx"],"sourcesContent":["import { type KeyPath, NodeType, type MarkdownContent } from '@intlayer/core';\nimport type { FC } from 'react';\nimport { type NodeWrapperProps } from './index';\nimport { StringWrapper } from './StringWrapper';\n\ntype MarkdownWrapperProps = Omit<NodeWrapperProps, 'section'> & {\n section: MarkdownContent;\n};\n\nexport const MarkdownWrapper: FC<MarkdownWrapperProps> = (props) => {\n const { keyPath, section } = props;\n\n const newKeyPath: KeyPath[] = [\n ...keyPath,\n {\n type: NodeType.Markdown,\n },\n ];\n\n const subSection = section[NodeType.Markdown];\n\n return (\n <div className=\"ml-2 grid grid-cols-[auto,1fr] gap-2\">\n <StringWrapper {...props} keyPath={newKeyPath} section={subSection} />\n </div>\n );\n};\n"],"names":["NodeType","jsx","StringWrapper"],"mappings":";;;;;AASa,MAAA,kBAA4C,CAAC,UAAU;AAC5D,QAAA,EAAE,SAAS,QAAA,IAAY;AAE7B,QAAM,aAAwB;AAAA,IAC5B,GAAG;AAAA,IACH;AAAA,MACE,MAAMA,KAAAA,SAAS;AAAA,IAAA;AAAA,EAEnB;AAEM,QAAA,aAAa,QAAQA,KAAA,SAAS,QAAQ;AAE5C,SACGC,2BAAAA,IAAA,OAAA,EAAI,WAAU,wCACb,UAACA,+BAAAC,sDAAAA,eAAA,EAAe,GAAG,OAAO,SAAS,YAAY,SAAS,WAAY,CAAA,GACtE;AAEJ;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"MarkdownWrapper.d.ts","sourceRoot":"","sources":["../../../../src/components/DictionaryEditor/NodeWrapper/MarkdownWrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA0B,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAC9E,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,EAAe,KAAK,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAE7D,KAAK,oBAAoB,GAAG,IAAI,CAAC,gBAAgB,EAAE,SAAS,CAAC,GAAG;IAC9D,OAAO,EAAE,eAAe,CAAC;CAC1B,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,EAAE,CAAC,oBAAoB,CAepD,CAAC"}
1
+ {"version":3,"file":"MarkdownWrapper.d.ts","sourceRoot":"","sources":["../../../../src/components/DictionaryEditor/NodeWrapper/MarkdownWrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA0B,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAC9E,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAGhD,KAAK,oBAAoB,GAAG,IAAI,CAAC,gBAAgB,EAAE,SAAS,CAAC,GAAG;IAC9D,OAAO,EAAE,eAAe,CAAC;CAC1B,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,EAAE,CAAC,oBAAoB,CAiBpD,CAAC"}
@@ -1,7 +1,18 @@
1
- import "react/jsx-runtime";
2
- import "@intlayer/core";
3
- import { M } from "../../../index-C57uA6Lk.js";
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { NodeType } from "@intlayer/core";
3
+ import { StringWrapper } from "./StringWrapper.mjs";
4
+ const MarkdownWrapper = (props) => {
5
+ const { keyPath, section } = props;
6
+ const newKeyPath = [
7
+ ...keyPath,
8
+ {
9
+ type: NodeType.Markdown
10
+ }
11
+ ];
12
+ const subSection = section[NodeType.Markdown];
13
+ return /* @__PURE__ */ jsx("div", { className: "ml-2 grid grid-cols-[auto,1fr] gap-2", children: /* @__PURE__ */ jsx(StringWrapper, { ...props, keyPath: newKeyPath, section: subSection }) });
14
+ };
4
15
  export {
5
- M as MarkdownWrapper
16
+ MarkdownWrapper
6
17
  };
7
18
  //# sourceMappingURL=MarkdownWrapper.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"MarkdownWrapper.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
1
+ {"version":3,"file":"MarkdownWrapper.mjs","sources":["../../../../src/components/DictionaryEditor/NodeWrapper/MarkdownWrapper.tsx"],"sourcesContent":["import { type KeyPath, NodeType, type MarkdownContent } from '@intlayer/core';\nimport type { FC } from 'react';\nimport { type NodeWrapperProps } from './index';\nimport { StringWrapper } from './StringWrapper';\n\ntype MarkdownWrapperProps = Omit<NodeWrapperProps, 'section'> & {\n section: MarkdownContent;\n};\n\nexport const MarkdownWrapper: FC<MarkdownWrapperProps> = (props) => {\n const { keyPath, section } = props;\n\n const newKeyPath: KeyPath[] = [\n ...keyPath,\n {\n type: NodeType.Markdown,\n },\n ];\n\n const subSection = section[NodeType.Markdown];\n\n return (\n <div className=\"ml-2 grid grid-cols-[auto,1fr] gap-2\">\n <StringWrapper {...props} keyPath={newKeyPath} section={subSection} />\n </div>\n );\n};\n"],"names":[],"mappings":";;;AASa,MAAA,kBAA4C,CAAC,UAAU;AAC5D,QAAA,EAAE,SAAS,QAAA,IAAY;AAE7B,QAAM,aAAwB;AAAA,IAC5B,GAAG;AAAA,IACH;AAAA,MACE,MAAM,SAAS;AAAA,IAAA;AAAA,EAEnB;AAEM,QAAA,aAAa,QAAQ,SAAS,QAAQ;AAE5C,SACG,oBAAA,OAAA,EAAI,WAAU,wCACb,UAAC,oBAAA,eAAA,EAAe,GAAG,OAAO,SAAS,YAAY,SAAS,WAAY,CAAA,GACtE;AAEJ;"}
@@ -3,6 +3,6 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  require("react/jsx-runtime");
4
4
  require("@intlayer/core");
5
5
  require("../ItemLayout.cjs");
6
- const components_DictionaryEditor_NodeWrapper_ArrayWrapper = require("../../../index-D02c1QrF.cjs");
6
+ const components_DictionaryEditor_NodeWrapper_ArrayWrapper = require("../../../index-BpCAhDMe.cjs");
7
7
  exports.NestedObjectWrapper = components_DictionaryEditor_NodeWrapper_ArrayWrapper.NestedObjectWrapper;
8
8
  //# sourceMappingURL=NestedObjectWrapper.cjs.map
@@ -1,7 +1,7 @@
1
1
  import "react/jsx-runtime";
2
2
  import "@intlayer/core";
3
3
  import "../ItemLayout.mjs";
4
- import { a } from "../../../index-C57uA6Lk.js";
4
+ import { a } from "../../../index-CVTE3oHq.js";
5
5
  export {
6
6
  a as NestedObjectWrapper
7
7
  };
@@ -18,7 +18,7 @@ const StringWrapper = ({
18
18
  }) => {
19
19
  const editedContentValue = core.getContentNodeByKeyPath(editedContent, keyPath);
20
20
  if (editedContentValue && typeof editedContentValue !== "string") {
21
- return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: "Error loading section" });
21
+ return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: "Error loading section - Edited content Incoherence with the original content format" });
22
22
  }
23
23
  const level = keyPath.length;
24
24
  const content = editedContentValue ?? section;
@@ -1 +1 @@
1
- {"version":3,"file":"StringWrapper.cjs","sources":["../../../../src/components/DictionaryEditor/NodeWrapper/StringWrapper.tsx"],"sourcesContent":["import { getContentNodeByKeyPath } from '@intlayer/core';\nimport type { FC } from 'react';\nimport { cn } from '../../../utils/cn';\nimport { EditableFieldTextArea } from '../../EditableField';\nimport type { NodeWrapperProps } from './index';\n\ntype StringWrapperProps = Omit<NodeWrapperProps, 'section'> & {\n section: string;\n};\n\nexport const StringWrapper: FC<StringWrapperProps> = ({\n keyPath,\n section,\n editedContent,\n onContentChange,\n onFocusKeyPath,\n}) => {\n const editedContentValue = getContentNodeByKeyPath(editedContent, keyPath);\n\n if (editedContentValue && typeof editedContentValue !== 'string') {\n return <>Error loading section</>;\n }\n\n const level = keyPath.length;\n\n const content = editedContentValue ?? section;\n\n return (\n <span\n role=\"button\"\n tabIndex={0}\n className={cn(\n 'w-full rounded-md p-2 text-left transition',\n 'hover:bg-card/30 [&:has(.section:hover)]:bg-transparent',\n level === 2 && 'hover:bg-card/30',\n level >= 3 && ''\n )}\n onClick={(e) => {\n e.stopPropagation();\n onFocusKeyPath(keyPath);\n }}\n >\n <EditableFieldTextArea\n defaultValue={String(content)}\n onSave={(newValue) => onContentChange({ keyPath, newValue })}\n onCancel={() => null}\n />\n </span>\n );\n};\n"],"names":["getContentNodeByKeyPath","jsx","cn","EditableFieldTextArea"],"mappings":";;;;;;;;;;;AAUO,MAAM,gBAAwC,CAAC;AAAA,EACpD;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAAM;AACE,QAAA,qBAAqBA,KAAAA,wBAAwB,eAAe,OAAO;AAErE,MAAA,sBAAsB,OAAO,uBAAuB,UAAU;AAChE,iEAAS,UAAqB,wBAAA,CAAA;AAAA,EAAA;AAGhC,QAAM,QAAQ,QAAQ;AAEtB,QAAM,UAAU,sBAAsB;AAGpC,SAAAC,2BAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,MAAK;AAAA,MACL,UAAU;AAAA,MACV,WAAWC,SAAA;AAAA,QACT;AAAA,QACA;AAAA,QACA,UAAU,KAAK;AAAA,QACf,SAAS,KAAK;AAAA,MAChB;AAAA,MACA,SAAS,CAAC,MAAM;AACd,UAAE,gBAAgB;AAClB,uBAAe,OAAO;AAAA,MACxB;AAAA,MAEA,UAAAD,2BAAA;AAAA,QAACE,+CAAA;AAAA,QAAA;AAAA,UACC,cAAc,OAAO,OAAO;AAAA,UAC5B,QAAQ,CAAC,aAAa,gBAAgB,EAAE,SAAS,UAAU;AAAA,UAC3D,UAAU,MAAM;AAAA,QAAA;AAAA,MAAA;AAAA,IAClB;AAAA,EACF;AAEJ;;"}
1
+ {"version":3,"file":"StringWrapper.cjs","sources":["../../../../src/components/DictionaryEditor/NodeWrapper/StringWrapper.tsx"],"sourcesContent":["import { getContentNodeByKeyPath } from '@intlayer/core';\nimport type { FC } from 'react';\nimport { cn } from '../../../utils/cn';\nimport { EditableFieldTextArea } from '../../EditableField';\nimport type { NodeWrapperProps } from './index';\n\ntype StringWrapperProps = Omit<NodeWrapperProps, 'section'> & {\n section: string;\n};\n\nexport const StringWrapper: FC<StringWrapperProps> = ({\n keyPath,\n section,\n editedContent,\n onContentChange,\n onFocusKeyPath,\n}) => {\n const editedContentValue = getContentNodeByKeyPath(editedContent, keyPath);\n\n if (editedContentValue && typeof editedContentValue !== 'string') {\n return (\n <>\n Error loading section - Edited content Incoherence with the original\n content format\n </>\n );\n }\n\n const level = keyPath.length;\n\n const content = editedContentValue ?? section;\n\n return (\n <span\n role=\"button\"\n tabIndex={0}\n className={cn(\n 'w-full rounded-md p-2 text-left transition',\n 'hover:bg-card/30 [&:has(.section:hover)]:bg-transparent',\n level === 2 && 'hover:bg-card/30',\n level >= 3 && ''\n )}\n onClick={(e) => {\n e.stopPropagation();\n onFocusKeyPath(keyPath);\n }}\n >\n <EditableFieldTextArea\n defaultValue={String(content)}\n onSave={(newValue) => onContentChange({ keyPath, newValue })}\n onCancel={() => null}\n />\n </span>\n );\n};\n"],"names":["getContentNodeByKeyPath","jsx","cn","EditableFieldTextArea"],"mappings":";;;;;;;;;;;AAUO,MAAM,gBAAwC,CAAC;AAAA,EACpD;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAAM;AACE,QAAA,qBAAqBA,KAAAA,wBAAwB,eAAe,OAAO;AAErE,MAAA,sBAAsB,OAAO,uBAAuB,UAAU;AAChE,iEACI,UAGF,sFAAA,CAAA;AAAA,EAAA;AAIJ,QAAM,QAAQ,QAAQ;AAEtB,QAAM,UAAU,sBAAsB;AAGpC,SAAAC,2BAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,MAAK;AAAA,MACL,UAAU;AAAA,MACV,WAAWC,SAAA;AAAA,QACT;AAAA,QACA;AAAA,QACA,UAAU,KAAK;AAAA,QACf,SAAS,KAAK;AAAA,MAChB;AAAA,MACA,SAAS,CAAC,MAAM;AACd,UAAE,gBAAgB;AAClB,uBAAe,OAAO;AAAA,MACxB;AAAA,MAEA,UAAAD,2BAAA;AAAA,QAACE,+CAAA;AAAA,QAAA;AAAA,UACC,cAAc,OAAO,OAAO;AAAA,UAC5B,QAAQ,CAAC,aAAa,gBAAgB,EAAE,SAAS,UAAU;AAAA,UAC3D,UAAU,MAAM;AAAA,QAAA;AAAA,MAAA;AAAA,IAClB;AAAA,EACF;AAEJ;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"StringWrapper.d.ts","sourceRoot":"","sources":["../../../../src/components/DictionaryEditor/NodeWrapper/StringWrapper.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAGhC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEhD,KAAK,kBAAkB,GAAG,IAAI,CAAC,gBAAgB,EAAE,SAAS,CAAC,GAAG;IAC5D,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC,kBAAkB,CAuChD,CAAC"}
1
+ {"version":3,"file":"StringWrapper.d.ts","sourceRoot":"","sources":["../../../../src/components/DictionaryEditor/NodeWrapper/StringWrapper.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAGhC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEhD,KAAK,kBAAkB,GAAG,IAAI,CAAC,gBAAgB,EAAE,SAAS,CAAC,GAAG;IAC5D,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC,kBAAkB,CA4ChD,CAAC"}
@@ -16,7 +16,7 @@ const StringWrapper = ({
16
16
  }) => {
17
17
  const editedContentValue = getContentNodeByKeyPath(editedContent, keyPath);
18
18
  if (editedContentValue && typeof editedContentValue !== "string") {
19
- return /* @__PURE__ */ jsx(Fragment, { children: "Error loading section" });
19
+ return /* @__PURE__ */ jsx(Fragment, { children: "Error loading section - Edited content Incoherence with the original content format" });
20
20
  }
21
21
  const level = keyPath.length;
22
22
  const content = editedContentValue ?? section;
@@ -1 +1 @@
1
- {"version":3,"file":"StringWrapper.mjs","sources":["../../../../src/components/DictionaryEditor/NodeWrapper/StringWrapper.tsx"],"sourcesContent":["import { getContentNodeByKeyPath } from '@intlayer/core';\nimport type { FC } from 'react';\nimport { cn } from '../../../utils/cn';\nimport { EditableFieldTextArea } from '../../EditableField';\nimport type { NodeWrapperProps } from './index';\n\ntype StringWrapperProps = Omit<NodeWrapperProps, 'section'> & {\n section: string;\n};\n\nexport const StringWrapper: FC<StringWrapperProps> = ({\n keyPath,\n section,\n editedContent,\n onContentChange,\n onFocusKeyPath,\n}) => {\n const editedContentValue = getContentNodeByKeyPath(editedContent, keyPath);\n\n if (editedContentValue && typeof editedContentValue !== 'string') {\n return <>Error loading section</>;\n }\n\n const level = keyPath.length;\n\n const content = editedContentValue ?? section;\n\n return (\n <span\n role=\"button\"\n tabIndex={0}\n className={cn(\n 'w-full rounded-md p-2 text-left transition',\n 'hover:bg-card/30 [&:has(.section:hover)]:bg-transparent',\n level === 2 && 'hover:bg-card/30',\n level >= 3 && ''\n )}\n onClick={(e) => {\n e.stopPropagation();\n onFocusKeyPath(keyPath);\n }}\n >\n <EditableFieldTextArea\n defaultValue={String(content)}\n onSave={(newValue) => onContentChange({ keyPath, newValue })}\n onCancel={() => null}\n />\n </span>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;AAUO,MAAM,gBAAwC,CAAC;AAAA,EACpD;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAAM;AACE,QAAA,qBAAqB,wBAAwB,eAAe,OAAO;AAErE,MAAA,sBAAsB,OAAO,uBAAuB,UAAU;AAChE,2CAAS,UAAqB,wBAAA,CAAA;AAAA,EAAA;AAGhC,QAAM,QAAQ,QAAQ;AAEtB,QAAM,UAAU,sBAAsB;AAGpC,SAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,MAAK;AAAA,MACL,UAAU;AAAA,MACV,WAAW;AAAA,QACT;AAAA,QACA;AAAA,QACA,UAAU,KAAK;AAAA,QACf,SAAS,KAAK;AAAA,MAChB;AAAA,MACA,SAAS,CAAC,MAAM;AACd,UAAE,gBAAgB;AAClB,uBAAe,OAAO;AAAA,MACxB;AAAA,MAEA,UAAA;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,cAAc,OAAO,OAAO;AAAA,UAC5B,QAAQ,CAAC,aAAa,gBAAgB,EAAE,SAAS,UAAU;AAAA,UAC3D,UAAU,MAAM;AAAA,QAAA;AAAA,MAAA;AAAA,IAClB;AAAA,EACF;AAEJ;"}
1
+ {"version":3,"file":"StringWrapper.mjs","sources":["../../../../src/components/DictionaryEditor/NodeWrapper/StringWrapper.tsx"],"sourcesContent":["import { getContentNodeByKeyPath } from '@intlayer/core';\nimport type { FC } from 'react';\nimport { cn } from '../../../utils/cn';\nimport { EditableFieldTextArea } from '../../EditableField';\nimport type { NodeWrapperProps } from './index';\n\ntype StringWrapperProps = Omit<NodeWrapperProps, 'section'> & {\n section: string;\n};\n\nexport const StringWrapper: FC<StringWrapperProps> = ({\n keyPath,\n section,\n editedContent,\n onContentChange,\n onFocusKeyPath,\n}) => {\n const editedContentValue = getContentNodeByKeyPath(editedContent, keyPath);\n\n if (editedContentValue && typeof editedContentValue !== 'string') {\n return (\n <>\n Error loading section - Edited content Incoherence with the original\n content format\n </>\n );\n }\n\n const level = keyPath.length;\n\n const content = editedContentValue ?? section;\n\n return (\n <span\n role=\"button\"\n tabIndex={0}\n className={cn(\n 'w-full rounded-md p-2 text-left transition',\n 'hover:bg-card/30 [&:has(.section:hover)]:bg-transparent',\n level === 2 && 'hover:bg-card/30',\n level >= 3 && ''\n )}\n onClick={(e) => {\n e.stopPropagation();\n onFocusKeyPath(keyPath);\n }}\n >\n <EditableFieldTextArea\n defaultValue={String(content)}\n onSave={(newValue) => onContentChange({ keyPath, newValue })}\n onCancel={() => null}\n />\n </span>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;AAUO,MAAM,gBAAwC,CAAC;AAAA,EACpD;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAAM;AACE,QAAA,qBAAqB,wBAAwB,eAAe,OAAO;AAErE,MAAA,sBAAsB,OAAO,uBAAuB,UAAU;AAChE,2CACI,UAGF,sFAAA,CAAA;AAAA,EAAA;AAIJ,QAAM,QAAQ,QAAQ;AAEtB,QAAM,UAAU,sBAAsB;AAGpC,SAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,MAAK;AAAA,MACL,UAAU;AAAA,MACV,WAAW;AAAA,QACT;AAAA,QACA;AAAA,QACA,UAAU,KAAK;AAAA,QACf,SAAS,KAAK;AAAA,MAChB;AAAA,MACA,SAAS,CAAC,MAAM;AACd,UAAE,gBAAgB;AAClB,uBAAe,OAAO;AAAA,MACxB;AAAA,MAEA,UAAA;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,cAAc,OAAO,OAAO;AAAA,UAC5B,QAAQ,CAAC,aAAa,gBAAgB,EAAE,SAAS,UAAU;AAAA,UAC3D,UAAU,MAAM;AAAA,QAAA;AAAA,MAAA;AAAA,IAClB;AAAA,EACF;AAEJ;"}
@@ -2,6 +2,6 @@
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  require("react/jsx-runtime");
4
4
  require("@intlayer/core");
5
- const components_DictionaryEditor_NodeWrapper_ArrayWrapper = require("../../../index-D02c1QrF.cjs");
5
+ const components_DictionaryEditor_NodeWrapper_ArrayWrapper = require("../../../index-BpCAhDMe.cjs");
6
6
  exports.TranslationWrapper = components_DictionaryEditor_NodeWrapper_ArrayWrapper.TranslationWrapper;
7
7
  //# sourceMappingURL=TranslationWrapper.cjs.map
@@ -1,6 +1,6 @@
1
1
  import "react/jsx-runtime";
2
2
  import "@intlayer/core";
3
- import { T } from "../../../index-C57uA6Lk.js";
3
+ import { T } from "../../../index-CVTE3oHq.js";
4
4
  export {
5
5
  T as TranslationWrapper
6
6
  };
@@ -2,7 +2,8 @@
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  require("react/jsx-runtime");
4
4
  require("@intlayer/core");
5
- const components_DictionaryEditor_NodeWrapper_ArrayWrapper = require("../../../index-D02c1QrF.cjs");
5
+ const components_DictionaryEditor_NodeWrapper_ArrayWrapper = require("../../../index-BpCAhDMe.cjs");
6
+ require("./MarkdownWrapper.cjs");
6
7
  require("./StringWrapper.cjs");
7
8
  exports.NodeWrapper = components_DictionaryEditor_NodeWrapper_ArrayWrapper.NodeWrapper;
8
9
  exports.traceKeys = components_DictionaryEditor_NodeWrapper_ArrayWrapper.traceKeys;
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
1
+ {"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;"}
@@ -1,6 +1,7 @@
1
1
  import "react/jsx-runtime";
2
2
  import "@intlayer/core";
3
- import { N, t } from "../../../index-C57uA6Lk.js";
3
+ import { N, t } from "../../../index-CVTE3oHq.js";
4
+ import "./MarkdownWrapper.mjs";
4
5
  import "./StringWrapper.mjs";
5
6
  export {
6
7
  N as NodeWrapper,
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
1
+ {"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
@@ -61,6 +61,7 @@ const EnumKeyInput = ({ value, onChange }) => {
61
61
  components_Input_Input.Input,
62
62
  {
63
63
  type: "number",
64
+ "aria-label": "Quantity",
64
65
  defaultValue: numberValue ?? void 0,
65
66
  onChange: (e) => setNumberValue(e.target.value),
66
67
  className: "min-w-4"
@@ -1 +1 @@
1
- {"version":3,"file":"EnumKeyInput.cjs","sources":["../../../src/components/DictionaryFieldEditor/EnumKeyInput.tsx"],"sourcesContent":["'use client';\n\nimport { useEffect, useMemo, useState, type FC } from 'react';\nimport { Input } from '../Input';\nimport { Select } from '../Select';\n\nconst extractInitialState = (\n value: string | number\n): { comparator: string | undefined; numberValue: string | undefined } => {\n let comparator;\n let numberValue;\n\n if (typeof value === 'number' || !isNaN(Number(value))) {\n // If value is a number or numeric string, set comparator to '=' and numberValue accordingly\n comparator = '=';\n numberValue = value.toString();\n } else if (typeof value === 'string') {\n // Define possible comparators\n const comparators = ['<=', '>=', '<', '>', '='];\n // Find the comparator that matches the start of the string\n const matchedComparator = comparators.find((comp) =>\n value.startsWith(comp)\n );\n if (matchedComparator) {\n comparator = matchedComparator;\n numberValue = value.slice(matchedComparator.length);\n }\n }\n\n return { comparator, numberValue };\n};\n\ntype EnumKeyInputProps = {\n value: string | number;\n onChange: (value: string) => void;\n};\n\n/**\n * Example of values:\n * - `<1`\n * - `>-44.3`\n * - `=999`\n * - `<=1`\n * - `>=1`\n * - 88\n * - `-1`\n *\n */\nexport const EnumKeyInput: FC<EnumKeyInputProps> = ({ value, onChange }) => {\n const { comparator: initialComparator, numberValue: initialNumberValue } =\n useMemo(() => extractInitialState(value), [value]);\n const [comparator, setComparator] = useState<string | null>(\n initialComparator ?? null\n );\n const [numberValue, setNumberValue] = useState<string | null>(\n initialNumberValue ?? null\n );\n\n useEffect(() => {\n if (\n comparator &&\n numberValue &&\n (comparator !== initialComparator || numberValue !== initialNumberValue)\n ) {\n const newValue = `${comparator}${numberValue}`;\n\n onChange(newValue);\n }\n }, [\n comparator,\n initialComparator,\n initialNumberValue,\n numberValue,\n onChange,\n ]);\n\n return (\n <div className=\"flex gap-1\">\n <Select onValueChange={setComparator} defaultValue={initialComparator}>\n <Select.Trigger className=\"w-20\">\n <Select.Value placeholder=\"Select a comparator\" />\n </Select.Trigger>\n <Select.Content>\n <Select.Item value=\"<\">{`<`}</Select.Item>\n <Select.Item value=\"<=\">{`<=`}</Select.Item>\n <Select.Item value=\"=\">{`=`}</Select.Item>\n <Select.Item value=\">=\">{`>=`}</Select.Item>\n <Select.Item value=\">\">{`>`}</Select.Item>\n </Select.Content>\n </Select>\n <Input\n type=\"number\"\n defaultValue={numberValue ?? undefined}\n onChange={(e) => setNumberValue(e.target.value)}\n className=\"min-w-4\"\n />\n </div>\n );\n};\n"],"names":["useMemo","useState","useEffect","jsxs","Select","jsx","Input"],"mappings":";;;;;;;;;;AAMA,MAAM,sBAAsB,CAC1B,UACwE;AACpE,MAAA;AACA,MAAA;AAEA,MAAA,OAAO,UAAU,YAAY,CAAC,MAAM,OAAO,KAAK,CAAC,GAAG;AAEzC,iBAAA;AACb,kBAAc,MAAM,SAAS;AAAA,EAAA,WACpB,OAAO,UAAU,UAAU;AAEpC,UAAM,cAAc,CAAC,MAAM,MAAM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K,MAAA;AAAA,uCAC7BA,yBAAAA,OAAO,MAAP,EAAY,OAAM,KAAK,UAAI,KAAA;AAAA,uCAC3BA,yBAAAA,OAAO,MAAP,EAAY,OAAM,MAAM,UAAK,MAAA;AAAA,uCAC7BA,yBAAAA,OAAO,MAAP,EAAY,OAAM,KAAK,UAAI,IAAA,CAAA;AAAA,MAAA,EAC9B,CAAA;AAAA,IAAA,GACF;AAAA,IACAC,2BAAA;AAAA,MAACC,uBAAA;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,cAAc,eAAe;AAAA,QAC7B,UAAU,CAAC,MAAM,eAAe,EAAE,OAAO,KAAK;AAAA,QAC9C,WAAU;AAAA,MAAA;AAAA,IAAA;AAAA,EACZ,GACF;AAEJ;;"}
1
+ {"version":3,"file":"EnumKeyInput.cjs","sources":["../../../src/components/DictionaryFieldEditor/EnumKeyInput.tsx"],"sourcesContent":["'use client';\n\nimport { useEffect, useMemo, useState, type FC } from 'react';\nimport { Input } from '../Input';\nimport { Select } from '../Select';\n\nconst extractInitialState = (\n value: string | number\n): { comparator: string | undefined; numberValue: string | undefined } => {\n let comparator;\n let numberValue;\n\n if (typeof value === 'number' || !isNaN(Number(value))) {\n // If value is a number or numeric string, set comparator to '=' and numberValue accordingly\n comparator = '=';\n numberValue = value.toString();\n } else if (typeof value === 'string') {\n // Define possible comparators\n const comparators = ['<=', '>=', '<', '>', '='];\n // Find the comparator that matches the start of the string\n const matchedComparator = comparators.find((comp) =>\n value.startsWith(comp)\n );\n if (matchedComparator) {\n comparator = matchedComparator;\n numberValue = value.slice(matchedComparator.length);\n }\n }\n\n return { comparator, numberValue };\n};\n\ntype EnumKeyInputProps = {\n value: string | number;\n onChange: (value: string) => void;\n};\n\n/**\n * Example of values:\n * - `<1`\n * - `>-44.3`\n * - `=999`\n * - `<=1`\n * - `>=1`\n * - 88\n * - `-1`\n *\n */\nexport const EnumKeyInput: FC<EnumKeyInputProps> = ({ value, onChange }) => {\n const { comparator: initialComparator, numberValue: initialNumberValue } =\n useMemo(() => extractInitialState(value), [value]);\n const [comparator, setComparator] = useState<string | null>(\n initialComparator ?? null\n );\n const [numberValue, setNumberValue] = useState<string | null>(\n initialNumberValue ?? null\n );\n\n useEffect(() => {\n if (\n comparator &&\n numberValue &&\n (comparator !== initialComparator || numberValue !== initialNumberValue)\n ) {\n const newValue = `${comparator}${numberValue}`;\n\n onChange(newValue);\n }\n }, [\n comparator,\n initialComparator,\n initialNumberValue,\n numberValue,\n onChange,\n ]);\n\n return (\n <div className=\"flex gap-1\">\n <Select onValueChange={setComparator} defaultValue={initialComparator}>\n <Select.Trigger className=\"w-20\">\n <Select.Value placeholder=\"Select a comparator\" />\n </Select.Trigger>\n <Select.Content>\n <Select.Item value=\"<\">{`<`}</Select.Item>\n <Select.Item value=\"<=\">{`<=`}</Select.Item>\n <Select.Item value=\"=\">{`=`}</Select.Item>\n <Select.Item value=\">=\">{`>=`}</Select.Item>\n <Select.Item value=\">\">{`>`}</Select.Item>\n </Select.Content>\n </Select>\n <Input\n type=\"number\"\n aria-label=\"Quantity\"\n defaultValue={numberValue ?? undefined}\n onChange={(e) => setNumberValue(e.target.value)}\n className=\"min-w-4\"\n />\n </div>\n );\n};\n"],"names":["useMemo","useState","useEffect","jsxs","Select","jsx","Input"],"mappings":";;;;;;;;;;AAMA,MAAM,sBAAsB,CAC1B,UACwE;AACpE,MAAA;AACA,MAAA;AAEA,MAAA,OAAO,UAAU,YAAY,CAAC,MAAM,OAAO,KAAK,CAAC,GAAG;AAEzC,iBAAA;AACb,kBAAc,MAAM,SAAS;AAAA,EAAA,WACpB,OAAO,UAAU,UAAU;AAEpC,UAAM,cAAc,CAAC,MAAM,MAAM,KAAK,KAAK,GAAG;AAE9C,UAAM,oBAAoB,YAAY;AAAA,MAAK,CAAC,SAC1C,MAAM,WAAW,IAAI;AAAA,IACvB;AACA,QAAI,mBAAmB;AACR,mBAAA;AACC,oBAAA,MAAM,MAAM,kBAAkB,MAAM;AAAA,IAAA;AA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M,KAAK,UAAI,IAAA,CAAA;AAAA,MAAA,EAC9B,CAAA;AAAA,IAAA,GACF;AAAA,IACAC,2BAAA;AAAA,MAACC,uBAAA;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,cAAW;AAAA,QACX,cAAc,eAAe;AAAA,QAC7B,UAAU,CAAC,MAAM,eAAe,EAAE,OAAO,KAAK;AAAA,QAC9C,WAAU;AAAA,MAAA;AAAA,IAAA;AAAA,EACZ,GACF;AAEJ;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"EnumKeyInput.d.ts","sourceRoot":"","sources":["../../../src/components/DictionaryFieldEditor/EnumKeyInput.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAgC,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AA8B9D,KAAK,iBAAiB,GAAG;IACvB,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACnC,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,YAAY,EAAE,EAAE,CAAC,iBAAiB,CAkD9C,CAAC"}
1
+ {"version":3,"file":"EnumKeyInput.d.ts","sourceRoot":"","sources":["../../../src/components/DictionaryFieldEditor/EnumKeyInput.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAgC,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AA8B9D,KAAK,iBAAiB,GAAG;IACvB,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACnC,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,YAAY,EAAE,EAAE,CAAC,iBAAiB,CAmD9C,CAAC"}
@@ -59,6 +59,7 @@ const EnumKeyInput = ({ value, onChange }) => {
59
59
  Input,
60
60
  {
61
61
  type: "number",
62
+ "aria-label": "Quantity",
62
63
  defaultValue: numberValue ?? void 0,
63
64
  onChange: (e) => setNumberValue(e.target.value),
64
65
  className: "min-w-4"
@@ -1 +1 @@
1
- {"version":3,"file":"EnumKeyInput.mjs","sources":["../../../src/components/DictionaryFieldEditor/EnumKeyInput.tsx"],"sourcesContent":["'use client';\n\nimport { useEffect, useMemo, useState, type FC } from 'react';\nimport { Input } from '../Input';\nimport { Select } from '../Select';\n\nconst extractInitialState = (\n value: string | number\n): { comparator: string | undefined; numberValue: string | undefined } => {\n let comparator;\n let numberValue;\n\n if (typeof value === 'number' || !isNaN(Number(value))) {\n // If value is a number or numeric string, set comparator to '=' and numberValue accordingly\n comparator = '=';\n numberValue = value.toString();\n } else if (typeof value === 'string') {\n // Define possible comparators\n const comparators = ['<=', '>=', '<', '>', '='];\n // Find the comparator that matches the start of the string\n const matchedComparator = comparators.find((comp) =>\n value.startsWith(comp)\n );\n if (matchedComparator) {\n comparator = matchedComparator;\n numberValue = value.slice(matchedComparator.length);\n }\n }\n\n return { comparator, numberValue };\n};\n\ntype EnumKeyInputProps = {\n value: string | number;\n onChange: (value: string) => void;\n};\n\n/**\n * Example of values:\n * - `<1`\n * - `>-44.3`\n * - `=999`\n * - `<=1`\n * - `>=1`\n * - 88\n * - `-1`\n *\n */\nexport const EnumKeyInput: FC<EnumKeyInputProps> = ({ value, onChange }) => {\n const { comparator: initialComparator, numberValue: initialNumberValue } =\n useMemo(() => extractInitialState(value), [value]);\n const [comparator, setComparator] = useState<string | null>(\n initialComparator ?? null\n );\n const [numberValue, setNumberValue] = useState<string | null>(\n initialNumberValue ?? null\n );\n\n useEffect(() => {\n if (\n comparator &&\n numberValue &&\n (comparator !== initialComparator || numberValue !== initialNumberValue)\n ) {\n const newValue = `${comparator}${numberValue}`;\n\n onChange(newValue);\n }\n }, [\n comparator,\n initialComparator,\n initialNumberValue,\n numberValue,\n onChange,\n ]);\n\n return (\n <div className=\"flex gap-1\">\n <Select onValueChange={setComparator} defaultValue={initialComparator}>\n <Select.Trigger className=\"w-20\">\n <Select.Value placeholder=\"Select a comparator\" />\n </Select.Trigger>\n <Select.Content>\n <Select.Item value=\"<\">{`<`}</Select.Item>\n <Select.Item value=\"<=\">{`<=`}</Select.Item>\n <Select.Item value=\"=\">{`=`}</Select.Item>\n <Select.Item value=\">=\">{`>=`}</Select.Item>\n <Select.Item value=\">\">{`>`}</Select.Item>\n </Select.Content>\n </Select>\n <Input\n type=\"number\"\n defaultValue={numberValue ?? undefined}\n onChange={(e) => setNumberValue(e.target.value)}\n className=\"min-w-4\"\n />\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;;;;AAMA,MAAM,sBAAsB,CAC1B,UACwE;AACpE,MAAA;AACA,MAAA;AAEA,MAAA,OAAO,UAAU,YAAY,CAAC,MAAM,OAAO,KAAK,CAAC,GAAG;AAEzC,iBAAA;AACb,kBAAc,MAAM,SAAS;AAAA,EAAA,WACpB,OAAO,UAAU,UAAU;AAEpC,UAAM,cAAc,CAAC,MAAM,MAAM,KAAK,KAAK,GAAG;AAE9C,UAAM,oBAAoB,YAAY;AAAA,MAAK,CAAC,SAC1C,MAAM,WAAW,IAAI;AAAA,IACvB;AACA,QAAI,mBAAmB;AACR,mBAAA;AACC,oBAAA,MAAM,MAAM,kBAAkB,MAAM;AAAA,IAAA;AAAA,EACpD;AAGK,SAAA,EAAE,YAAY,YAAY;AACnC;AAkBO,MAAM,eAAsC,CAAC,EAAE,OAAO,eAAe;AAC1E,QAAM,EAAE,YAAY,mBAAmB,aAAa,mBAAmB,IACrE,QAAQ,MAAM,oBAAoB,KAAK,GAAG,CAAC,KAAK,CAAC;AAC7C,QAAA,CAAC,YAAY,aAAa,IAAI;AAAA,IAClC,qBAAqB;AAAA,EACvB;AACM,QAAA,CAAC,aAAa,cAAc,IAAI;AAAA,IACpC,sBAAsB;AAAA,EACxB;AAEA,YAAU,MAAM;AACd,QACE,cACA,gBACC,eAAe,qBAAqB,gBAAgB,qBACrD;AACA,YAAM,WAAW,GAAG,UAAU,GAAG,WAAW;AAE5C,eAAS,QAAQ;AAAA,IAAA;AAAA,EACnB,GACC;AAAA,IACD;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EAAA,CACD;AAGC,SAAA,qBAAC,OAAI,EAAA,WAAU,cACb,UAAA;AAAA,IAAA,qBAAC,QAAO,EAAA,eAAe,eAAe,cAAc,mBAClD,UAAA;AAAA,MAAC,oBAAA,OAAO,SAAP,EAAe,WAAU,QACxB,UAAC,oBAAA,OAAO,OAAP,EAAa,aAAY,sBAAA,CAAsB,EAClD,CAAA;AAAA,MACA,qBAAC,OAAO,SAAP,EACC,UAAA;AAAA,QAAA,oBAAC,OAAO,MAAP,EAAY,OAAM,KAAK,UAAI,KAAA;AAAA,4BAC3B,OAAO,MAAP,EAAY,OAAM,MAAM,UAAK,MAAA;AAAA,4BAC7B,OAAO,MAAP,EAAY,OAAM,KAAK,UAAI,KAAA;AAAA,4BAC3B,OAAO,MAAP,EAAY,OAAM,MAAM,UAAK,MAAA;AAAA,4BAC7B,OAAO,MAAP,EAAY,OAAM,KAAK,UAAI,IAAA,CAAA;AAAA,MAAA,EAC9B,CAAA;AAAA,IAAA,GACF;AAAA,IACA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,cAAc,eAAe;AAAA,QAC7B,UAAU,CAAC,MAAM,eAAe,EAAE,OAAO,KAAK;AAAA,QAC9C,WAAU;AAAA,MAAA;AAAA,IAAA;AAAA,EACZ,GACF;AAEJ;"}
1
+ {"version":3,"file":"EnumKeyInput.mjs","sources":["../../../src/components/DictionaryFieldEditor/EnumKeyInput.tsx"],"sourcesContent":["'use client';\n\nimport { useEffect, useMemo, useState, type FC } from 'react';\nimport { Input } from '../Input';\nimport { Select } from '../Select';\n\nconst extractInitialState = (\n value: string | number\n): { comparator: string | undefined; numberValue: string | undefined } => {\n let comparator;\n let numberValue;\n\n if (typeof value === 'number' || !isNaN(Number(value))) {\n // If value is a number or numeric string, set comparator to '=' and numberValue accordingly\n comparator = '=';\n numberValue = value.toString();\n } else if (typeof value === 'string') {\n // Define possible comparators\n const comparators = ['<=', '>=', '<', '>', '='];\n // Find the comparator that matches the start of the string\n const matchedComparator = comparators.find((comp) =>\n value.startsWith(comp)\n );\n if (matchedComparator) {\n comparator = matchedComparator;\n numberValue = value.slice(matchedComparator.length);\n }\n }\n\n return { comparator, numberValue };\n};\n\ntype EnumKeyInputProps = {\n value: string | number;\n onChange: (value: string) => void;\n};\n\n/**\n * Example of values:\n * - `<1`\n * - `>-44.3`\n * - `=999`\n * - `<=1`\n * - `>=1`\n * - 88\n * - `-1`\n *\n */\nexport const EnumKeyInput: FC<EnumKeyInputProps> = ({ value, onChange }) => {\n const { comparator: initialComparator, numberValue: initialNumberValue } =\n useMemo(() => extractInitialState(value), [value]);\n const [comparator, setComparator] = useState<string | null>(\n initialComparator ?? null\n );\n const [numberValue, setNumberValue] = useState<string | null>(\n initialNumberValue ?? null\n );\n\n useEffect(() => {\n if (\n comparator &&\n numberValue &&\n (comparator !== initialComparator || numberValue !== initialNumberValue)\n ) {\n const newValue = `${comparator}${numberValue}`;\n\n onChange(newValue);\n }\n }, [\n comparator,\n initialComparator,\n initialNumberValue,\n numberValue,\n onChange,\n ]);\n\n return (\n <div className=\"flex gap-1\">\n <Select onValueChange={setComparator} defaultValue={initialComparator}>\n <Select.Trigger className=\"w-20\">\n <Select.Value placeholder=\"Select a comparator\" />\n </Select.Trigger>\n <Select.Content>\n <Select.Item value=\"<\">{`<`}</Select.Item>\n <Select.Item value=\"<=\">{`<=`}</Select.Item>\n <Select.Item value=\"=\">{`=`}</Select.Item>\n <Select.Item value=\">=\">{`>=`}</Select.Item>\n <Select.Item value=\">\">{`>`}</Select.Item>\n </Select.Content>\n </Select>\n <Input\n type=\"number\"\n aria-label=\"Quantity\"\n defaultValue={numberValue ?? undefined}\n onChange={(e) => setNumberValue(e.target.value)}\n className=\"min-w-4\"\n />\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;;;;AAMA,MAAM,sBAAsB,CAC1B,UACwE;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,OAAO,MAAP,EAAY,OAAM,KAAK,UAAI,KAAA;AAAA,4BAC3B,OAAO,MAAP,EAAY,OAAM,MAAM,UAAK,MAAA;AAAA,4BAC7B,OAAO,MAAP,EAAY,OAAM,KAAK,UAAI,KAAA;AAAA,4BAC3B,OAAO,MAAP,EAAY,OAAM,MAAM,UAAK,MAAA;AAAA,4BAC7B,OAAO,MAAP,EAAY,OAAM,KAAK,UAAI,IAAA,CAAA;AAAA,MAAA,EAC9B,CAAA;AAAA,IAAA,GACF;AAAA,IACA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,cAAW;AAAA,QACX,cAAc,eAAe;AAAA,QAC7B,UAAU,CAAC,MAAM,eAAe,EAAE,OAAO,KAAK;AAAA,QAC9C,WAAU;AAAA,MAAA;AAAA,IAAA;AAAA,EACZ,GACF;AAEJ;"}
@@ -5,7 +5,6 @@ const defaultConfiguration = require("@intlayer/config/built");
5
5
  const core = require("@intlayer/core");
6
6
  const editorReact = require("@intlayer/editor-react");
7
7
  const lucideReact = require("lucide-react");
8
- const ReactExports = require("react");
9
8
  const reactIntlayer = require("react-intlayer");
10
9
  const utils_camelCase = require("../../../utils/camelCase.cjs");
11
10
  const components_Accordion_Accordion = require("../../Accordion/Accordion.cjs");
@@ -30,10 +29,7 @@ const NavigationViewNode = ({
30
29
  goToTranslation
31
30
  } = reactIntlayer.useDictionary(components_DictionaryFieldEditor_NavigationView_navigationViewNode_content.navigationViewContent);
32
31
  const nodeType = core.getNodeType(section);
33
- const getIsSelected = ReactExports.useCallback(
34
- (keyPath2) => (focusedContent?.keyPath?.length ?? 0) > 0 && core.isSameKeyPath(keyPath2, focusedContent?.keyPath ?? []),
35
- [focusedContent?.keyPath]
36
- );
32
+ const getIsSelected = (keyPath2) => (focusedContent?.keyPath?.length ?? 0) > 0 && core.isSameKeyPath(keyPath2, focusedContent?.keyPath ?? []);
37
33
  if (!section) return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, {});
38
34
  if (typeof section === "object") {
39
35
  if (nodeType === core.NodeType.ReactNode) {