@bigbinary/neeto-molecules 4.0.86 → 4.0.88

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 (147) hide show
  1. package/README.md +1 -0
  2. package/dist/BoardView.js +4 -4
  3. package/dist/BoardView.js.map +1 -1
  4. package/dist/Breadcrumbs.js +1 -1
  5. package/dist/BrowserPreview.js +1 -1
  6. package/dist/Builder.js +4 -4
  7. package/dist/Builder.js.map +1 -1
  8. package/dist/ButtonGroup.js +1 -1
  9. package/dist/CalendarView.js +2 -2
  10. package/dist/CalendarView.js.map +1 -1
  11. package/dist/CardLayout.js +1 -1
  12. package/dist/CardLayout.js.map +1 -1
  13. package/dist/Chevron-kr6SNbMJ.js +263 -0
  14. package/dist/{Chevron-DXA34GCh.js.map → Chevron-kr6SNbMJ.js.map} +1 -1
  15. package/dist/ConfigurePageSidebar.js +1 -1
  16. package/dist/DndTable.js +176 -0
  17. package/dist/DndTable.js.map +1 -0
  18. package/dist/DocumentEditor.js +3 -3
  19. package/dist/DocumentEditor.js.map +1 -1
  20. package/dist/DynamicVariables.js +1 -1
  21. package/dist/EmailPreview.js +1 -1
  22. package/dist/EmailPreview.js.map +1 -1
  23. package/dist/Engagements.js +4 -4
  24. package/dist/Engagements.js.map +1 -1
  25. package/dist/FileUpload.js +1 -1
  26. package/dist/FinderModal.js +3 -3
  27. package/dist/FinderModal.js.map +1 -1
  28. package/dist/FloatingActionMenu.js +7 -4
  29. package/dist/FloatingActionMenu.js.map +1 -1
  30. package/dist/Header.js +1 -1
  31. package/dist/InlineInput.js +1 -1
  32. package/dist/Insights.js +4 -4
  33. package/dist/Insights.js.map +1 -1
  34. package/dist/IpRestriction.js +3 -3
  35. package/dist/IpRestriction.js.map +1 -1
  36. package/dist/KeyboardShortcuts.js +2 -2
  37. package/dist/KeyboardShortcuts.js.map +1 -1
  38. package/dist/MenuBar.js +1 -1
  39. package/dist/Metadata.js +3 -3
  40. package/dist/Metadata.js.map +1 -1
  41. package/dist/NavigationHeader.js +1 -1
  42. package/dist/NeetoWidget.js +1 -1
  43. package/dist/NeetoWidget.js.map +1 -1
  44. package/dist/Onboarding.js +12 -2
  45. package/dist/Onboarding.js.map +1 -1
  46. package/dist/OptionFields.js +4 -4
  47. package/dist/OptionFields.js.map +1 -1
  48. package/dist/PageLoader.js +1 -1
  49. package/dist/ProductEmbed.js +5 -5
  50. package/dist/ProductEmbed.js.map +1 -1
  51. package/dist/PublishBlock.js +1 -1
  52. package/dist/PublishYourItem.js +1 -1
  53. package/dist/PublishYourItem.js.map +1 -1
  54. package/dist/Rename.js +1 -1
  55. package/dist/ResponsiveDevicePicker.js +1 -1
  56. package/dist/Schedule.js +6 -6
  57. package/dist/Schedule.js.map +1 -1
  58. package/dist/SendToFields.js +2 -2
  59. package/dist/SendToFields.js.map +1 -1
  60. package/dist/SessionEnvironment.js +2 -2
  61. package/dist/SessionEnvironment.js.map +1 -1
  62. package/dist/ShareViaLink.js +3 -3
  63. package/dist/ShareViaLink.js.map +1 -1
  64. package/dist/Sidebar.js +1 -1
  65. package/dist/SubHeader.js +1 -1
  66. package/dist/SuffixedInput.js +2 -2
  67. package/dist/SuffixedInput.js.map +1 -1
  68. package/dist/Taxonomy.js +3 -3
  69. package/dist/Taxonomy.js.map +1 -1
  70. package/dist/VersionHistory.js +2 -2
  71. package/dist/VersionHistory.js.map +1 -1
  72. package/dist/cjs/BoardView.js +4 -4
  73. package/dist/cjs/BoardView.js.map +1 -1
  74. package/dist/cjs/Breadcrumbs.js +1 -1
  75. package/dist/cjs/BrowserPreview.js +1 -1
  76. package/dist/cjs/Builder.js +4 -4
  77. package/dist/cjs/Builder.js.map +1 -1
  78. package/dist/cjs/ButtonGroup.js +1 -1
  79. package/dist/cjs/CalendarView.js +2 -2
  80. package/dist/cjs/CalendarView.js.map +1 -1
  81. package/dist/cjs/CardLayout.js +1 -1
  82. package/dist/cjs/CardLayout.js.map +1 -1
  83. package/dist/cjs/Chevron-7PZUWPKl.js +280 -0
  84. package/dist/cjs/{Chevron-C5y6R4rr.js.map → Chevron-7PZUWPKl.js.map} +1 -1
  85. package/dist/cjs/ConfigurePageSidebar.js +1 -1
  86. package/dist/cjs/DndTable.js +181 -0
  87. package/dist/cjs/DndTable.js.map +1 -0
  88. package/dist/cjs/DocumentEditor.js +3 -3
  89. package/dist/cjs/DocumentEditor.js.map +1 -1
  90. package/dist/cjs/DynamicVariables.js +1 -1
  91. package/dist/cjs/EmailPreview.js +1 -1
  92. package/dist/cjs/EmailPreview.js.map +1 -1
  93. package/dist/cjs/Engagements.js +4 -4
  94. package/dist/cjs/Engagements.js.map +1 -1
  95. package/dist/cjs/FileUpload.js +1 -1
  96. package/dist/cjs/FinderModal.js +3 -3
  97. package/dist/cjs/FinderModal.js.map +1 -1
  98. package/dist/cjs/FloatingActionMenu.js +7 -4
  99. package/dist/cjs/FloatingActionMenu.js.map +1 -1
  100. package/dist/cjs/Header.js +1 -1
  101. package/dist/cjs/InlineInput.js +1 -1
  102. package/dist/cjs/Insights.js +4 -4
  103. package/dist/cjs/Insights.js.map +1 -1
  104. package/dist/cjs/IpRestriction.js +3 -3
  105. package/dist/cjs/IpRestriction.js.map +1 -1
  106. package/dist/cjs/KeyboardShortcuts.js +2 -2
  107. package/dist/cjs/KeyboardShortcuts.js.map +1 -1
  108. package/dist/cjs/MenuBar.js +1 -1
  109. package/dist/cjs/Metadata.js +3 -3
  110. package/dist/cjs/Metadata.js.map +1 -1
  111. package/dist/cjs/NavigationHeader.js +1 -1
  112. package/dist/cjs/NeetoWidget.js +1 -1
  113. package/dist/cjs/NeetoWidget.js.map +1 -1
  114. package/dist/cjs/Onboarding.js +12 -2
  115. package/dist/cjs/Onboarding.js.map +1 -1
  116. package/dist/cjs/OptionFields.js +4 -4
  117. package/dist/cjs/OptionFields.js.map +1 -1
  118. package/dist/cjs/PageLoader.js +1 -1
  119. package/dist/cjs/ProductEmbed.js +5 -5
  120. package/dist/cjs/ProductEmbed.js.map +1 -1
  121. package/dist/cjs/PublishBlock.js +1 -1
  122. package/dist/cjs/PublishYourItem.js +1 -1
  123. package/dist/cjs/PublishYourItem.js.map +1 -1
  124. package/dist/cjs/Rename.js +1 -1
  125. package/dist/cjs/ResponsiveDevicePicker.js +1 -1
  126. package/dist/cjs/Schedule.js +6 -6
  127. package/dist/cjs/Schedule.js.map +1 -1
  128. package/dist/cjs/SendToFields.js +2 -2
  129. package/dist/cjs/SendToFields.js.map +1 -1
  130. package/dist/cjs/SessionEnvironment.js +2 -2
  131. package/dist/cjs/SessionEnvironment.js.map +1 -1
  132. package/dist/cjs/ShareViaLink.js +3 -3
  133. package/dist/cjs/ShareViaLink.js.map +1 -1
  134. package/dist/cjs/Sidebar.js +1 -1
  135. package/dist/cjs/SubHeader.js +1 -1
  136. package/dist/cjs/SuffixedInput.js +2 -2
  137. package/dist/cjs/SuffixedInput.js.map +1 -1
  138. package/dist/cjs/Taxonomy.js +3 -3
  139. package/dist/cjs/Taxonomy.js.map +1 -1
  140. package/dist/cjs/VersionHistory.js +2 -2
  141. package/dist/cjs/VersionHistory.js.map +1 -1
  142. package/dist/styles/page-loader.css +1 -1
  143. package/dist/styles/page-loader.js +1 -1
  144. package/package.json +4 -1
  145. package/types/DndTable.d.ts +168 -0
  146. package/dist/Chevron-DXA34GCh.js +0 -263
  147. package/dist/cjs/Chevron-C5y6R4rr.js +0 -280
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DndTable.js","sources":["../src/components/DndTable/Row.jsx","../src/components/DndTable/Table.jsx","../src/components/DndTable/useDndTable.js"],"sourcesContent":["import { useDraggable, useDroppable } from \"@dnd-kit/core\";\nimport classNames from \"classnames\";\n\nconst Row = ({ children, data, index, className, isDroppable, ...rest }) => {\n const {\n isDragging,\n attributes,\n listeners,\n setNodeRef: setDraggableNodeRef,\n } = useDraggable({\n data: { ...data, index },\n id: `draggable-${rest[\"data-row-key\"]}`,\n });\n\n const { isOver, setNodeRef: setDroppableNodeRef } = useDroppable({\n data: { ...data, index: index + 1 },\n id: `droppable-${rest[\"data-row-key\"]}`,\n disabled: !isDroppable || isDragging,\n });\n\n const isIndicatorVisible = !isDragging && isOver;\n\n return (\n <tr\n {...rest}\n {...attributes}\n {...listeners}\n className={classNames(className, {\n \"neeto-ui-rounded-lg hover:neeto-ui-bg-gray-100 w-full min-w-0 cursor-move transition-colors\": true,\n \"neeto-ui-bg-gray-100 opacity-50\": isDragging,\n \"neeto-ui-bg-primary-100 neeto-ui-shadow-2xs\": isIndicatorVisible,\n })}\n ref={node => {\n setDraggableNodeRef(node);\n setDroppableNodeRef(node);\n }}\n >\n {children}\n </tr>\n );\n};\n\nexport default Row;\n","import { useState } from \"react\";\n\nimport {\n DndContext,\n DragOverlay,\n PointerSensor,\n useSensor,\n useSensors,\n} from \"@dnd-kit/core\";\nimport { restrictToVerticalAxis } from \"@dnd-kit/modifiers\";\nimport { noop } from \"neetocist\";\nimport { Table } from \"neetoui\";\nimport PropTypes from \"prop-types\";\nimport { T } from \"ramda\";\nimport { createPortal } from \"react-dom\";\n\nimport Row from \"./Row\";\n\nconst sensorConfig = { activationConstraint: { distance: 8 } };\n\nconst DndTable = ({\n rowData,\n columnData,\n overlayColumnIndex = 0,\n isRowDroppable = T,\n onDrop = noop,\n ...rest\n}) => {\n const [dragState, setDragState] = useState(null);\n const sensors = useSensors(useSensor(PointerSensor, sensorConfig));\n\n const onDragEnd = ({ active, over }) => {\n setDragState(null);\n if (!active || !over) return;\n onDrop(active.data.current, over.data.current);\n };\n\n const renderOverlay = data => {\n const colData = columnData[overlayColumnIndex];\n const rowData = data[colData.dataIndex];\n\n return (\n <div className=\"flex px-20\">\n <div className=\"neeto-ui-rounded-lg neeto-ui-bg-white px-4\">\n {colData.render ? colData.render(rowData, data) : rowData}\n </div>\n </div>\n );\n };\n\n return (\n <DndContext {...{ onDragEnd, sensors }} onDragStart={setDragState}>\n <Table\n {...{ ...rest, columnData, rowData }}\n components={{ body: { row: Row } }}\n onRow={(data, index) => ({\n data,\n index,\n isDroppable: isRowDroppable(data),\n })}\n />\n {createPortal(\n <DragOverlay modifiers={[restrictToVerticalAxis]}>\n {dragState?.active && renderOverlay(dragState.active.data?.current)}\n </DragOverlay>,\n document.body\n )}\n </DndContext>\n );\n};\n\nDndTable.propTypes = {\n /** The data for the rows of the table. */\n rowData: PropTypes.arrayOf(PropTypes.object).isRequired,\n\n /** The data for the columns of the table. */\n columnData: PropTypes.arrayOf(PropTypes.object).isRequired,\n\n /** The index of the column to display the overlay for. */\n overlayColumnIndex: PropTypes.number,\n\n /** A function that determines if a row is droppable based on checks on the data. */\n isRowDroppable: PropTypes.func,\n\n /** A function that is called when a row is dropped. */\n onDrop: PropTypes.func.isRequired,\n};\n\nexport default DndTable;\n","import { useStateWithDependency } from \"neetocommons/react-utils\";\nimport { Toastr } from \"neetoui\";\nimport { path, remove } from \"ramda\";\n\nconst useDndTable = ({ rowData, onUpdate }) => {\n const [rowDataState, setRowDataState] = useStateWithDependency(rowData, [\n rowData,\n ]);\n\n const onDrop = async (active, over) => {\n const stateBefore = rowDataState;\n setRowDataState(remove(active.index, 1));\n\n try {\n await onUpdate(active, over);\n } catch (error) {\n setRowDataState(stateBefore);\n const errors = path([\"response\", \"data\", \"errors\"], error);\n const message = errors && Object.values(errors)[0]?.[0];\n if (message) Toastr.error(message);\n }\n };\n\n return { rowData: rowDataState, onDrop };\n};\n\nexport default useDndTable;\n"],"names":["Row","_ref","children","data","index","className","isDroppable","rest","_objectWithoutProperties","_excluded","_useDraggable","useDraggable","_objectSpread","id","concat","isDragging","attributes","listeners","setDraggableNodeRef","setNodeRef","_useDroppable","useDroppable","disabled","isOver","setDroppableNodeRef","isIndicatorVisible","_jsx","classNames","ref","node","sensorConfig","activationConstraint","distance","DndTable","_dragState$active$dat","rowData","columnData","_ref$overlayColumnInd","overlayColumnIndex","_ref$isRowDroppable","isRowDroppable","T","_ref$onDrop","onDrop","noop","_useState","useState","_useState2","_slicedToArray","dragState","setDragState","sensors","useSensors","useSensor","PointerSensor","onDragEnd","_ref2","active","over","current","renderOverlay","colData","dataIndex","render","_jsxs","DndContext","onDragStart","Table","components","body","row","onRow","createPortal","DragOverlay","modifiers","restrictToVerticalAxis","document","e","t","r","Symbol","n","iterator","o","toStringTag","i","c","prototype","Generator","u","Object","create","_regeneratorDefine2","f","p","y","G","v","a","d","bind","length","l","TypeError","call","done","value","GeneratorFunction","GeneratorFunctionPrototype","getPrototypeOf","setPrototypeOf","__proto__","displayName","_regenerator","w","m","defineProperty","_regeneratorDefine","_invoke","enumerable","configurable","writable","useDndTable","onUpdate","_useStateWithDependen","useStateWithDependency","_useStateWithDependen2","rowDataState","setRowDataState","_asyncToGenerator","_callee","stateBefore","_Object$values$","errors","message","_t","_context","remove","path","values","Toastr","error","_x","_x2","apply","arguments"],"mappings":";;;;;;;;;;;;;;;;;;;AAGA,IAAMA,GAAG,GAAG,SAANA,GAAGA,CAAAC,IAAA,EAAmE;AAAA,EAAA,IAA7DC,QAAQ,GAAAD,IAAA,CAARC,QAAQ;IAAEC,IAAI,GAAAF,IAAA,CAAJE,IAAI;IAAEC,KAAK,GAAAH,IAAA,CAALG,KAAK;IAAEC,SAAS,GAAAJ,IAAA,CAATI,SAAS;IAAEC,WAAW,GAAAL,IAAA,CAAXK,WAAW;AAAKC,IAAAA,IAAI,GAAAC,wBAAA,CAAAP,IAAA,EAAAQ,WAAA,CAAA;EACnE,IAAAC,aAAA,GAKIC,YAAY,CAAC;AACfR,MAAAA,IAAI,EAAAS,eAAA,CAAAA,eAAA,KAAOT,IAAI,CAAA,EAAA,EAAA,EAAA;AAAEC,QAAAA,KAAK,EAALA;OAAK,CAAE;AACxBS,MAAAA,EAAE,eAAAC,MAAA,CAAeP,IAAI,CAAC,cAAc,CAAC;AACvC,KAAC,CAAC;IAPAQ,UAAU,GAAAL,aAAA,CAAVK,UAAU;IACVC,UAAU,GAAAN,aAAA,CAAVM,UAAU;IACVC,SAAS,GAAAP,aAAA,CAATO,SAAS;IACGC,mBAAmB,GAAA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AM,EAAE,QAAQ,CAAC,EAAAH,EAAO,CAAC;YACpDD,OAAO,GAAGD,MAAM,KAAA,CAAAD,eAAA,GAAI1C,MAAM,CAACiD,MAAM,CAACN,MAAM,CAAC,CAAC,CAAC,CAAC,MAAA,IAAA,IAAAD,eAAA,uBAAxBA,eAAA,CAA2B,CAAC,CAAC,CAAA;AACvD,YAAA,IAAIE,OAAO,EAAEM,MAAM,CAACC,KAAK,CAACP,OAAO,CAAC;AAAC,UAAA,KAAA,CAAA;YAAA,OAAAE,QAAA,CAAAtC,CAAA,CAAA,CAAA,CAAA;AAAA;AAAA,MAAA,CAAA,EAAAgC,OAAA,EAAA,IAAA,EAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA;IAAA,CAEtC,CAAA,CAAA;AAAA,IAAA,OAAA,SAZKvF,MAAMA,CAAAmG,EAAA,EAAAC,GAAA,EAAA;AAAA,MAAA,OAAAvF,KAAA,CAAAwF,KAAA,CAAA,IAAA,EAAAC,SAAA,CAAA;AAAA,IAAA,CAAA;EAAA,CAAA,EAYX;EAED,OAAO;AAAE9G,IAAAA,OAAO,EAAE4F,YAAY;AAAEpF,IAAAA,MAAM,EAANA;GAAQ;AAC1C;;;;"}
@@ -35,7 +35,7 @@ var IMAGE_UPLOAD_CONFIG = {
35
35
  }
36
36
  };
37
37
 
38
- var css = ".neeto-molecules-document__wrapper{height:100%}@media screen and (max-width:768px){.neeto-molecules-document__wrapper{width:100%}}.neeto-molecules-document__wrapper .neeto-molecules-document__container{margin:0 auto;max-width:48rem!important;width:100%}.neeto-molecules-document__wrapper .neeto-molecules-document-editor__menubar{position:sticky;top:0;width:100%;z-index:20}.neeto-molecules-document__wrapper .neeto-molecules-document__title{margin:1.5rem 0 0;width:100%}.neeto-molecules-document__wrapper .neeto-molecules-document__title .neeto-ui-input{padding:0!important}.neeto-molecules-document__wrapper .neeto-molecules-document__title .neeto-ui-input textarea{color:rgb(var(--neeto-ui-black));font-size:2.625rem;font-weight:700;line-height:3rem;max-height:none;resize:none}.neeto-molecules-document__wrapper .neeto-molecules-document__title .neeto-ui-input textarea::-moz-placeholder{color:rgb(var(--neeto-ui-gray-300))}.neeto-molecules-document__wrapper .neeto-molecules-document__title .neeto-ui-input textarea::placeholder{color:rgb(var(--neeto-ui-gray-300))}@media screen and (max-width:1024px){.neeto-molecules-document__wrapper .neeto-molecules-document__title .neeto-ui-input textarea{font-size:2rem;line-height:1.25}}.neeto-molecules-document__wrapper .neeto-molecules-editor-content__error{margin:.75rem auto}.neeto-molecules-document__wrapper .ProseMirror{flex-grow:1;height:auto;max-height:none;overflow-y:hidden}.neeto-molecules-document__wrapper .neeto-editor-fixed-menu{border:thin solid rgb(var(--neeto-ui-gray-200));border-left:none;border-right:none}@media screen and (max-width:768px){.neeto-molecules-document__wrapper .neeto-editor-fixed-menu button.neeto-editor-fixed-menu__item{padding:.375rem}}.neeto-molecules-document__wrapper .neeto-editor-fixed-menu__wrapper{margin:0 auto;max-width:46.875rem;padding-left:0!important;padding-right:0!important}.neeto-molecules-document__wrapper .neeto-editor-fixed-menu__wrapper button.neeto-editor-fixed-menu__item{flex-shrink:0}@media screen and (max-width:768px){.neeto-molecules-document__wrapper .neeto-editor-fixed-menu__wrapper{overflow-x:auto}}.neeto-molecules-document__wrapper .editor-content__wrapper{border:none!important;padding:.75rem 1.5rem 2rem!important;width:100%!important}.neeto-molecules-document__wrapper .editor-content-attachments{border:none;margin:.75rem auto 0;max-width:48rem!important;padding-left:1rem;padding-right:1rem}.neeto-molecules-document__wrapper .editor-content-attachments--no-attachments{display:none!important}.neeto-molecules-document__wrapper .neeto-editor-character-count{margin:0 auto;max-width:48rem!important;padding-left:1rem;padding-right:1rem}.neeto-molecules-document__wrapper .ne-attachments__wrapper{width:100%}.neeto-molecules-document__wrapper ins{background-color:#c1f4cb!important;text-decoration:none!important}.neeto-molecules-document__wrapper del{background-color:#faa!important}.neeto-molecules-document__wrapper .neeto-molecules-document__thumbnail-image{border-radius:5px;overflow:hidden;padding-bottom:56.25%;position:relative;width:100%}.neeto-molecules-document__wrapper .neeto-molecules-document__thumbnail-image img{height:100%;left:0;-o-object-fit:cover;object-fit:cover;position:absolute;top:0;width:100%}@media screen and (max-width:767px){.ne-media-uploader-modal{width:95vw!important}}";
38
+ var css = ".neeto-molecules-document__wrapper{height:100%}@media screen and (max-width:768px){.neeto-molecules-document__wrapper{width:100%}}.neeto-molecules-document__wrapper .neeto-molecules-document__container{margin:0 auto;max-width:48rem!important;width:100%}.neeto-molecules-document__wrapper .neeto-molecules-document-editor__menubar{position:sticky;top:0;width:100%;z-index:20}.neeto-molecules-document__wrapper .neeto-molecules-document__title{margin:1.5rem 0 0;width:100%}.neeto-molecules-document__wrapper .neeto-molecules-document__title .neeto-ui-input{padding:0!important}.neeto-molecules-document__wrapper .neeto-molecules-document__title .neeto-ui-input textarea{color:rgb(var(--neeto-ui-black));font-size:2.625rem;font-weight:700;line-height:3rem;max-height:none;resize:none}.neeto-molecules-document__wrapper .neeto-molecules-document__title .neeto-ui-input textarea::-moz-placeholder{color:rgb(var(--neeto-ui-gray-300))}.neeto-molecules-document__wrapper .neeto-molecules-document__title .neeto-ui-input textarea::placeholder{color:rgb(var(--neeto-ui-gray-300))}@media screen and (max-width:1024px){.neeto-molecules-document__wrapper .neeto-molecules-document__title .neeto-ui-input textarea{font-size:2rem;line-height:1.25}}.neeto-molecules-document__wrapper .neeto-molecules-editor-content__error{margin:.75rem auto}.neeto-molecules-document__wrapper .ProseMirror{flex-grow:1;height:auto;max-height:none;overflow-y:hidden}.neeto-molecules-document__wrapper .neeto-editor-fixed-menu{border:thin solid rgb(var(--neeto-ui-gray-200));border-inline-end:none;border-inline-start:none}@media screen and (max-width:768px){.neeto-molecules-document__wrapper .neeto-editor-fixed-menu button.neeto-editor-fixed-menu__item{padding:.375rem}}.neeto-molecules-document__wrapper .neeto-editor-fixed-menu__wrapper{margin:0 auto;max-width:46.875rem;padding-inline-end:0!important;padding-inline-start:0!important}.neeto-molecules-document__wrapper .neeto-editor-fixed-menu__wrapper button.neeto-editor-fixed-menu__item{flex-shrink:0}@media screen and (max-width:768px){.neeto-molecules-document__wrapper .neeto-editor-fixed-menu__wrapper{overflow-x:auto}}.neeto-molecules-document__wrapper .editor-content__wrapper{border:none!important;padding:.75rem 1.5rem 2rem!important;width:100%!important}.neeto-molecules-document__wrapper .editor-content-attachments{border:none;margin:.75rem auto 0;max-width:48rem!important;padding-inline-end:1rem;padding-inline-start:1rem}.neeto-molecules-document__wrapper .editor-content-attachments--no-attachments{display:none!important}.neeto-molecules-document__wrapper .neeto-editor-character-count{margin:0 auto;max-width:48rem!important;padding-inline-end:1rem;padding-inline-start:1rem}.neeto-molecules-document__wrapper .ne-attachments__wrapper{width:100%}.neeto-molecules-document__wrapper ins{background-color:#c1f4cb!important;text-decoration:none!important}.neeto-molecules-document__wrapper del{background-color:#faa!important}.neeto-molecules-document__wrapper .neeto-molecules-document__thumbnail-image{border-radius:5px;overflow:hidden;padding-bottom:56.25%;position:relative;width:100%}.neeto-molecules-document__wrapper .neeto-molecules-document__thumbnail-image img{height:100%;inset-inline-start:0;-o-object-fit:cover;object-fit:cover;position:absolute;top:0;width:100%}@media screen and (max-width:767px){.ne-media-uploader-modal{width:95vw!important}}";
39
39
  n(css,{});
40
40
 
41
41
  var useEditor = function useEditor(_ref) {
@@ -270,7 +270,7 @@ var Editor = function Editor(_ref) {
270
270
  src: thumbnailImageUrl
271
271
  })
272
272
  }), /*#__PURE__*/jsx("div", {
273
- className: "neeto-ui-rounded-full absolute right-2 top-2",
273
+ className: "neeto-ui-rounded-full absolute end-2 top-2",
274
274
  children: /*#__PURE__*/jsx(Dropdown, {
275
275
  strategy: "fixed",
276
276
  buttonProps: {
@@ -301,7 +301,7 @@ var Editor = function Editor(_ref) {
301
301
  setIsThumbnailImageModalOpen(false);
302
302
  },
303
303
  children: [/*#__PURE__*/jsx(Modal.Header, {
304
- className: "ml-0 pl-0",
304
+ className: "ms-0 ps-0",
305
305
  children: /*#__PURE__*/jsx(Typography, {
306
306
  style: "h2",
307
307
  children: t("neetoMolecules.documentEditor.uploadThumbnailImage")
@@ -1 +1 @@
1
- {"version":3,"file":"DocumentEditor.js","sources":["../src/components/DocumentEditor/constants.js","../src/components/DocumentEditor/hooks/useEditor.js","../src/components/DocumentEditor/MediaUploader.jsx","../src/components/DocumentEditor/utils.js","../src/components/DocumentEditor/index.jsx"],"sourcesContent":["export const EDITOR_ADDONS = [\n \"highlight\",\n \"emoji\",\n \"video-upload\",\n \"code-block\",\n \"block-quote\",\n \"image-upload\",\n \"image-upload-unsplash\",\n \"divider\",\n \"video-embed\",\n \"undo\",\n \"redo\",\n \"table\",\n \"callout\",\n];\n\nexport const DEFAULT_EDITOR_PROPS = {\n isMenuIndependent: true,\n addons: [],\n size: \"medium\",\n};\n\nexport const IMAGE_UPLOAD_CONFIG = {\n maxImageSize: 1,\n allowedImageTypes: {\n \"image/jpg\": [\".jpg\", \".jpeg\"],\n \"image/png\": [\".png\"],\n \"image/svg\": [\".svg\"],\n },\n};\n","import { useCallback } from \"react\";\n\nimport { useFormikContext } from \"formik\";\nimport { isPresent } from \"neetocist\";\nimport useHotkeys from \"neetohotkeys\";\n\nconst useEditor = ({\n onContentChange,\n editorContentFieldName,\n onAttachmentChange,\n onTitleChange,\n titleFieldName,\n editorRef,\n titleRef,\n}) => {\n const { setFieldValue, errors } = useFormikContext();\n\n const handleContentChange = useCallback(\n content => {\n setFieldValue(editorContentFieldName, content);\n onContentChange?.(content);\n },\n [editorContentFieldName, onContentChange, setFieldValue]\n );\n\n const handleAttachmentChange = useCallback(\n attachments => {\n setFieldValue(\"attachments\", attachments);\n onAttachmentChange?.(attachments);\n },\n [onAttachmentChange, setFieldValue]\n );\n\n const handleTitleChange = event => {\n const title = event.target.value;\n setFieldValue(titleFieldName, title);\n onTitleChange?.(title);\n };\n\n const handleEditorBackspaceKeypress = () => {\n const editor = editorRef.current?.editor;\n const selection = editor?.state?.selection;\n if (\n editor?.isFocused &&\n isPresent(titleRef.current) &&\n selection?.anchor === 1\n ) {\n const title = titleRef.current.value;\n titleRef.current.focus();\n titleRef.current.setSelectionRange(title?.length, title?.length);\n }\n };\n\n const titleHotkeyRef = useHotkeys(\n \"return\",\n () => {\n editorRef.current?.editor?.commands?.insertContentAt(0, \"<p />\");\n editorRef.current?.editor?.commands?.focus(\"start\");\n },\n { mode: \"scoped\" }\n );\n\n const editorHotkeyRef = useHotkeys(\n \"backspace\",\n handleEditorBackspaceKeypress,\n { mode: \"scoped\" }\n );\n\n return {\n handleContentChange,\n handleAttachmentChange,\n handleTitleChange,\n editorHotkeyRef,\n titleHotkeyRef,\n errors,\n };\n};\n\nexport default useEditor;\n","import { ImageUploader } from \"@bigbinary/neeto-image-uploader-frontend\";\nimport { useFormikContext } from \"formik\";\nimport { Spinner } from \"neetoui\";\nimport { isEmpty } from \"ramda\";\n\nimport { IMAGE_UPLOAD_CONFIG } from \"./constants\";\n\nconst MediaUploader = ({ setIsThumbnailImageModalOpen }) => {\n const {\n values: { thumbnailImageUrl },\n setFieldValue,\n initialValues,\n submitForm,\n } = useFormikContext();\n\n const handleUpload = file => {\n const { url, signedId } = file;\n setFieldValue(\"thumbnailImage\", signedId);\n setFieldValue(\"thumbnailImageUrl\", url);\n setTimeout(() => {\n setIsThumbnailImageModalOpen(false);\n submitForm();\n });\n };\n\n if (isEmpty(initialValues)) {\n return <Spinner />;\n }\n\n return (\n <ImageUploader\n className=\"h-auto w-full\"\n key={thumbnailImageUrl}\n src={thumbnailImageUrl}\n uploadConfig={IMAGE_UPLOAD_CONFIG}\n onUploadComplete={handleUpload}\n />\n );\n};\n\nexport default MediaUploader;\n","import { t } from \"i18next\";\nimport { Image } from \"neetoicons\";\n\nexport const getThumbnailAddon = command => ({\n label: t(\"neetoMolecules.documentEditor.thumbnailImage\"),\n optionName: \"thumbnail-image\",\n command,\n icon: Image,\n isEnabled: true,\n \"data-testid\": \"thumbnail-image-addon\",\n});\n","import { memo, useCallback, useMemo, useRef, useState } from \"react\";\n\nimport classNames from \"classnames\";\nimport { useFormikContext } from \"formik\";\nimport { noop } from \"neetocist\";\nimport { FormikEditor } from \"neetoeditor\";\nimport { MenuHorizontal } from \"neetoicons\";\nimport { Modal, Typography, Dropdown } from \"neetoui\";\nimport { Textarea } from \"neetoui/formik\";\nimport PropTypes from \"prop-types\";\nimport { mergeRight } from \"ramda\";\nimport { useTranslation } from \"react-i18next\";\n\nimport { DEFAULT_EDITOR_PROPS, EDITOR_ADDONS } from \"./constants\";\nimport \"./editor.scss\";\nimport useEditor from \"./hooks/useEditor\";\nimport MediaUploader from \"./MediaUploader\";\nimport { getThumbnailAddon } from \"./utils\";\n\nconst Editor = ({\n attachments,\n onContentChange,\n onAttachmentChange,\n onTitleChange,\n getTitleRef = noop,\n getEditorRef = noop,\n menuClassName,\n editorContentFieldName = \"htmlContent\",\n titleFieldName = \"title\",\n editorProps: customEditorProps = {},\n titleProps = {},\n hasThumbnailImage = false,\n children,\n}) => {\n const { t } = useTranslation();\n const { values, setFieldValue, submitForm } = useFormikContext();\n const { thumbnailImageUrl } = values;\n\n const { Menu, MenuItem } = Dropdown;\n\n const titleRef = useRef();\n const editorRef = useRef();\n const [isThumbnailImageModalOpen, setIsThumbnailImageModalOpen] =\n useState(false);\n\n const editorProps = useMemo(() => {\n const baseProps = mergeRight(DEFAULT_EDITOR_PROPS, customEditorProps);\n\n if (!hasThumbnailImage) return baseProps;\n\n const thumbnailAddon = getThumbnailAddon(() =>\n setIsThumbnailImageModalOpen(true)\n );\n\n return mergeRight(baseProps, { addonCommands: [thumbnailAddon] });\n }, [customEditorProps, hasThumbnailImage]);\n\n const {\n handleContentChange,\n handleAttachmentChange,\n handleTitleChange,\n editorHotkeyRef,\n titleHotkeyRef,\n errors,\n } = useEditor({\n onContentChange,\n editorContentFieldName,\n onAttachmentChange,\n onTitleChange,\n titleFieldName,\n editorRef,\n titleRef,\n });\n\n const setTitleRef = node => {\n titleHotkeyRef.current = node;\n getTitleRef(node);\n titleRef.current = node;\n };\n\n const setEditorRef = useCallback(node => {\n editorRef.current = node;\n getEditorRef(node);\n }, []);\n\n const addons = useMemo(\n () => EDITOR_ADDONS.concat(editorProps.addons || []),\n [editorProps.addons]\n );\n\n const handleTab = () => {\n const isListActive =\n editorRef.current?.editor?.isActive(\"orderedList\") ||\n editorRef.current?.editor?.isActive(\"bulletList\");\n\n if (isListActive) {\n editorRef.current?.editor?.commands?.sinkListItem(\"listItem\");\n\n return true;\n }\n\n return true;\n };\n\n const handleDeleteThumbnail = () => {\n setFieldValue(\"thumbnailImage\", \"\");\n setFieldValue(\"thumbnailImageUrl\", \"\");\n setTimeout(submitForm);\n };\n\n return (\n <div\n className=\"neeto-molecules-document__wrapper\"\n data-testid=\"document-editor-container\"\n ref={editorHotkeyRef}\n >\n <FormikEditor\n attachmentsClassName=\"editor-content-attachments w-full flex-shrink-0\"\n className=\"h-full w-full\"\n contentClassName=\"editor-content__wrapper neeto-molecules-document__container\"\n data-cy=\"neeto-molecules-document-content-text-area\"\n error={undefined}\n errorWrapperClassName=\"w-full min-h-full flex flex-col items-center\"\n hideSlashCommands={false}\n name={editorContentFieldName}\n ref={setEditorRef}\n menuClassName={classNames(\n \"neeto-molecules-document-editor__menubar\",\n menuClassName\n )}\n {...{ attachments, ...editorProps, addons }}\n contentWrapperClassName=\"w-full flex flex-col flex-grow\"\n keyboardShortcuts={{ Tab: handleTab, ...editorProps.keyboardShortcuts }}\n onChange={handleContentChange}\n onChangeAttachments={handleAttachmentChange}\n >\n {children}\n <div className=\"neeto-molecules-document__container px-6\">\n <Textarea\n nakedTextarea\n className=\"neeto-molecules-document__title\"\n data-cy=\"neeto-molecules-document-title-text-field\"\n name={titleFieldName}\n ref={setTitleRef}\n rows={1}\n placeholder={\n titleProps.placeholder || t(\"neetoMolecules.documentEditor.title\")\n }\n onChange={handleTitleChange}\n onKeyDown={e =>\n e.key === \"Enter\" && !e.shiftKey && e.preventDefault()\n }\n {...titleProps}\n />\n {thumbnailImageUrl && (\n <div className=\"group relative mt-4\">\n <div className=\"neeto-molecules-document__thumbnail-image\">\n <img alt=\"Cover\" src={thumbnailImageUrl} />\n </div>\n <div className=\"neeto-ui-rounded-full absolute right-2 top-2\">\n <Dropdown\n strategy=\"fixed\"\n buttonProps={{\n style: \"secondary\",\n size: \"small\",\n icon: MenuHorizontal,\n }}\n >\n <Menu>\n <MenuItem.Button onClick={handleDeleteThumbnail}>\n {t(\"neetoMolecules.documentEditor.delete\")}\n </MenuItem.Button>\n </Menu>\n </Dropdown>\n </div>\n </div>\n )}\n {errors[editorContentFieldName] && (\n <Typography\n className=\"neeto-ui-input__error neeto-molecules-editor-content__error\"\n data-cy=\"articles-content-input-error\"\n style=\"body3\"\n >\n {errors[editorContentFieldName]}\n </Typography>\n )}\n </div>\n </FormikEditor>\n <Modal\n className=\"media-uploader-modal p-5 pt-0\"\n data-testid=\"thumbnail-image-modal\"\n isOpen={isThumbnailImageModalOpen}\n onClose={() => {\n setIsThumbnailImageModalOpen(false);\n }}\n >\n <Modal.Header className=\"ml-0 pl-0\">\n <Typography style=\"h2\">\n {t(\"neetoMolecules.documentEditor.uploadThumbnailImage\")}\n </Typography>\n </Modal.Header>\n <MediaUploader {...{ setIsThumbnailImageModalOpen }} />\n </Modal>\n </div>\n );\n};\n\nEditor.propTypes = {\n /**\n * List of initial attachments.\n */\n attachments: PropTypes.arrayOf(\n PropTypes.shape({\n contentType: PropTypes.string,\n filename: PropTypes.string,\n signedId: PropTypes.string,\n url: PropTypes.string,\n })\n ),\n /**\n * Callback that will be triggered when the editor content changes.\n * This function is not throttled.\n */\n onContentChange: PropTypes.func,\n /**\n * Callback that will be triggered when the attachments changes.\n */\n onAttachmentChange: PropTypes.func,\n /**\n * Callback that will be triggered when the article title changes.\n */\n onTitleChange: PropTypes.func,\n /**\n * This function will be called with the title node reference.\n */\n getTitleRef: PropTypes.func,\n /**\n * This function will be called with editor reference.\n */\n getEditorRef: PropTypes.func,\n /**\n * Formik field name of the editor. The default value is `htmlContent`.\n */\n editorContentFieldName: PropTypes.string,\n /**\n * Formik field name of the title. The default value is `title`.\n */\n titleFieldName: PropTypes.string,\n /**\n * These props will be passed down to the editor component.\n */\n editorProps: PropTypes.object,\n /**\n * These props will be passed down to the title text area component.\n */\n titleProps: PropTypes.object,\n /**\n * A prop to pass class names to the editor menubar.\n */\n menuClassName: PropTypes.string,\n /**\n * The children will be rendered above the title input field.\n */\n children: PropTypes.node,\n /**\n * A prop to enable the thumbnail image uploader.\n */\n hasThumbnailImage: PropTypes.bool,\n};\n\nEditor.displayName = \"DocumentEditor\";\n\nexport default memo(Editor);\n"],"names":["EDITOR_ADDONS","DEFAULT_EDITOR_PROPS","isMenuIndependent","addons","size","IMAGE_UPLOAD_CONFIG","maxImageSize","allowedImageTypes","useEditor","_ref","onContentChange","editorContentFieldName","onAttachmentChange","onTitleChange","titleFieldName","editorRef","titleRef","_useFormikContext","useFormikContext","setFieldValue","errors","handleContentChange","useCallback","content","handleAttachmentChange","attachments","handleTitleChange","event","title","target","value","handleEditorBackspaceKeypress","_editorRef$current","_editor$state","editor","current","selection","state","isFocused","isPresent","anchor","focus","setSelectionRange","length","titleHotkeyRef","useHotkeys","_editorRef$current2","_editorRef$current3","commands","insertContentAt","mode","editorHotkeyRef","MediaUploader","setIsThumbnailImageModalOpen","thumbnailImageUrl","values","initialValues","submitForm","handleUpload","file","url","signedId","setTimeout","isEmpty","_jsx","Spinner","ImageUploader","className","src","uploadConfig","onUploadComplete","getThumbnailAddon","command","label","t","optionName","icon","Image","isEnabled","Editor","_ref$getTitleRef","getTitleRef","noop","_ref$getEditorRef","getEditorRef","menuClassName","_ref$editorContentFie","_ref$titleFieldName","_ref$editorProps","editorProps","customEditorProps","_ref$titleProps","titleProps","_ref$hasThumbnailImag","hasThumbnailImage","children","_useTranslation","useTranslation","Menu","Dropdown","MenuItem","useRef","_useState","useState","_useState2","_slicedToArray","isThumbnailImageModalOpen","useMemo","baseProps","mergeRight","thumbnailAddon","addonCommands","_useEditor","setTitleRef","node","setEditorRef","concat","handleTab","isListActive","isActive","sinkListItem","handleDeleteThumbnail","_jsxs","ref","FormikEditor","_objectSpread","attachmentsClassName","contentClassName","error","undefined","errorWrapperClassName","hideSlashCommands","name","classNames","contentWrapperClassName","keyboardShortcuts","Tab","onChange","onChangeAttachments","Textarea","nakedTextarea","rows","placeholder","onKeyDown","e","key","shiftKey","preventDefault","alt","strategy","buttonProps","style","MenuHorizontal","Button","onClick","Typography","Modal","isOpen","onClose","Header","displayName","memo"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAO,IAAMA,aAAa,GAAG,CAC3B,WAAW,EACX,OAAO,EACP,cAAc,EACd,YAAY,EACZ,aAAa,EACb,cAAc,EACd,uBAAuB,EACvB,SAAS,EACT,aAAa,EACb,MAAM,EACN,MAAM,EACN,OAAO,EACP,SAAS,CACV;AAEM,IAAMC,oBAAoB,GAAG;AAClCC,EAAAA,iBAAiB,EAAE,IAAI;AACvBC,EAAAA,MAAM,EAAE,EAAE;AACVC,EAAAA,IAAI,EAAE;AACR,CAAC;AAEM,IAAMC,mBAAmB,GAAG;AACjCC,EAAAA,YAAY,EAAE,CAAC;AACfC,EAAAA,iBAAiB,EAAE;AACjB,IAAA,WAAW,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC;IAC9B,WAAW,EAAE,CAAC,MAAM,CAAC;IACrB,WAAW,EAAE,CAAC,MAAM;AACtB;AACF,CAAC;;;;;ACvBD,IAAMC,SAAS,GAAG,SAAZA,SAASA,CAAAC,IAAA,EAQT;AAAA,EAAA,IAPJC,eAAe,GAAAD,IAAA,CAAfC,eAAe;IACfC,sBAAsB,GAAAF,IAAA,CAAtBE,sBAAsB;IACtBC,kBAAkB,GAAAH,IAAA,CAAlBG,kBAAkB;IAClBC,aAAa,GAAAJ,IAAA,CAAbI,aAAa;IACbC,cAAc,GAAAL,IAAA,CAAdK,cAAc;IACdC,SAAS,GAAAN,IAAA,CAATM,SAAS;IACTC,QAAQ,GAAAP,IAA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;AAAA0C,MAAAA,QAAA,EAAA,cAEF/B,GAAA,CAAC4F,KAAK,CAACG,MAAM,EAAA;AAAC5F,QAAAA,SAAS,EAAC,WAAW;QAAA4B,QAAA,eACjC/B,GAAA,CAAC2F,UAAU,EAAA;AAACJ,UAAAA,KAAK,EAAC,IAAI;UAAAxD,QAAA,EACnBrB,CAAC,CAAC,oDAAoD;SAC7C;AAAC,OACD,CAAC,eACfV,GAAA,CAACZ,aAAa,EAAA;AAAOC,QAAAA,4BAA4B,EAA5BA;AAA4B,OAAK,CAAC;AAAA,KAClD,CAAC;AAAA,GACL,CAAC;AAEV,CAAC;AAiED0B,MAAM,CAACiF,WAAW,GAAG,gBAAgB;AAErC,YAAA,aAAeC,IAAI,CAAClF,MAAM,CAAC;;;;"}
1
+ {"version":3,"file":"DocumentEditor.js","sources":["../src/components/DocumentEditor/constants.js","../src/components/DocumentEditor/hooks/useEditor.js","../src/components/DocumentEditor/MediaUploader.jsx","../src/components/DocumentEditor/utils.js","../src/components/DocumentEditor/index.jsx"],"sourcesContent":["export const EDITOR_ADDONS = [\n \"highlight\",\n \"emoji\",\n \"video-upload\",\n \"code-block\",\n \"block-quote\",\n \"image-upload\",\n \"image-upload-unsplash\",\n \"divider\",\n \"video-embed\",\n \"undo\",\n \"redo\",\n \"table\",\n \"callout\",\n];\n\nexport const DEFAULT_EDITOR_PROPS = {\n isMenuIndependent: true,\n addons: [],\n size: \"medium\",\n};\n\nexport const IMAGE_UPLOAD_CONFIG = {\n maxImageSize: 1,\n allowedImageTypes: {\n \"image/jpg\": [\".jpg\", \".jpeg\"],\n \"image/png\": [\".png\"],\n \"image/svg\": [\".svg\"],\n },\n};\n","import { useCallback } from \"react\";\n\nimport { useFormikContext } from \"formik\";\nimport { isPresent } from \"neetocist\";\nimport useHotkeys from \"neetohotkeys\";\n\nconst useEditor = ({\n onContentChange,\n editorContentFieldName,\n onAttachmentChange,\n onTitleChange,\n titleFieldName,\n editorRef,\n titleRef,\n}) => {\n const { setFieldValue, errors } = useFormikContext();\n\n const handleContentChange = useCallback(\n content => {\n setFieldValue(editorContentFieldName, content);\n onContentChange?.(content);\n },\n [editorContentFieldName, onContentChange, setFieldValue]\n );\n\n const handleAttachmentChange = useCallback(\n attachments => {\n setFieldValue(\"attachments\", attachments);\n onAttachmentChange?.(attachments);\n },\n [onAttachmentChange, setFieldValue]\n );\n\n const handleTitleChange = event => {\n const title = event.target.value;\n setFieldValue(titleFieldName, title);\n onTitleChange?.(title);\n };\n\n const handleEditorBackspaceKeypress = () => {\n const editor = editorRef.current?.editor;\n const selection = editor?.state?.selection;\n if (\n editor?.isFocused &&\n isPresent(titleRef.current) &&\n selection?.anchor === 1\n ) {\n const title = titleRef.current.value;\n titleRef.current.focus();\n titleRef.current.setSelectionRange(title?.length, title?.length);\n }\n };\n\n const titleHotkeyRef = useHotkeys(\n \"return\",\n () => {\n editorRef.current?.editor?.commands?.insertContentAt(0, \"<p />\");\n editorRef.current?.editor?.commands?.focus(\"start\");\n },\n { mode: \"scoped\" }\n );\n\n const editorHotkeyRef = useHotkeys(\n \"backspace\",\n handleEditorBackspaceKeypress,\n { mode: \"scoped\" }\n );\n\n return {\n handleContentChange,\n handleAttachmentChange,\n handleTitleChange,\n editorHotkeyRef,\n titleHotkeyRef,\n errors,\n };\n};\n\nexport default useEditor;\n","import { ImageUploader } from \"@bigbinary/neeto-image-uploader-frontend\";\nimport { useFormikContext } from \"formik\";\nimport { Spinner } from \"neetoui\";\nimport { isEmpty } from \"ramda\";\n\nimport { IMAGE_UPLOAD_CONFIG } from \"./constants\";\n\nconst MediaUploader = ({ setIsThumbnailImageModalOpen }) => {\n const {\n values: { thumbnailImageUrl },\n setFieldValue,\n initialValues,\n submitForm,\n } = useFormikContext();\n\n const handleUpload = file => {\n const { url, signedId } = file;\n setFieldValue(\"thumbnailImage\", signedId);\n setFieldValue(\"thumbnailImageUrl\", url);\n setTimeout(() => {\n setIsThumbnailImageModalOpen(false);\n submitForm();\n });\n };\n\n if (isEmpty(initialValues)) {\n return <Spinner />;\n }\n\n return (\n <ImageUploader\n className=\"h-auto w-full\"\n key={thumbnailImageUrl}\n src={thumbnailImageUrl}\n uploadConfig={IMAGE_UPLOAD_CONFIG}\n onUploadComplete={handleUpload}\n />\n );\n};\n\nexport default MediaUploader;\n","import { t } from \"i18next\";\nimport { Image } from \"neetoicons\";\n\nexport const getThumbnailAddon = command => ({\n label: t(\"neetoMolecules.documentEditor.thumbnailImage\"),\n optionName: \"thumbnail-image\",\n command,\n icon: Image,\n isEnabled: true,\n \"data-testid\": \"thumbnail-image-addon\",\n});\n","import { memo, useCallback, useMemo, useRef, useState } from \"react\";\n\nimport classNames from \"classnames\";\nimport { useFormikContext } from \"formik\";\nimport { noop } from \"neetocist\";\nimport { FormikEditor } from \"neetoeditor\";\nimport { MenuHorizontal } from \"neetoicons\";\nimport { Modal, Typography, Dropdown } from \"neetoui\";\nimport { Textarea } from \"neetoui/formik\";\nimport PropTypes from \"prop-types\";\nimport { mergeRight } from \"ramda\";\nimport { useTranslation } from \"react-i18next\";\n\nimport { DEFAULT_EDITOR_PROPS, EDITOR_ADDONS } from \"./constants\";\nimport \"./editor.scss\";\nimport useEditor from \"./hooks/useEditor\";\nimport MediaUploader from \"./MediaUploader\";\nimport { getThumbnailAddon } from \"./utils\";\n\nconst Editor = ({\n attachments,\n onContentChange,\n onAttachmentChange,\n onTitleChange,\n getTitleRef = noop,\n getEditorRef = noop,\n menuClassName,\n editorContentFieldName = \"htmlContent\",\n titleFieldName = \"title\",\n editorProps: customEditorProps = {},\n titleProps = {},\n hasThumbnailImage = false,\n children,\n}) => {\n const { t } = useTranslation();\n const { values, setFieldValue, submitForm } = useFormikContext();\n const { thumbnailImageUrl } = values;\n\n const { Menu, MenuItem } = Dropdown;\n\n const titleRef = useRef();\n const editorRef = useRef();\n const [isThumbnailImageModalOpen, setIsThumbnailImageModalOpen] =\n useState(false);\n\n const editorProps = useMemo(() => {\n const baseProps = mergeRight(DEFAULT_EDITOR_PROPS, customEditorProps);\n\n if (!hasThumbnailImage) return baseProps;\n\n const thumbnailAddon = getThumbnailAddon(() =>\n setIsThumbnailImageModalOpen(true)\n );\n\n return mergeRight(baseProps, { addonCommands: [thumbnailAddon] });\n }, [customEditorProps, hasThumbnailImage]);\n\n const {\n handleContentChange,\n handleAttachmentChange,\n handleTitleChange,\n editorHotkeyRef,\n titleHotkeyRef,\n errors,\n } = useEditor({\n onContentChange,\n editorContentFieldName,\n onAttachmentChange,\n onTitleChange,\n titleFieldName,\n editorRef,\n titleRef,\n });\n\n const setTitleRef = node => {\n titleHotkeyRef.current = node;\n getTitleRef(node);\n titleRef.current = node;\n };\n\n const setEditorRef = useCallback(node => {\n editorRef.current = node;\n getEditorRef(node);\n }, []);\n\n const addons = useMemo(\n () => EDITOR_ADDONS.concat(editorProps.addons || []),\n [editorProps.addons]\n );\n\n const handleTab = () => {\n const isListActive =\n editorRef.current?.editor?.isActive(\"orderedList\") ||\n editorRef.current?.editor?.isActive(\"bulletList\");\n\n if (isListActive) {\n editorRef.current?.editor?.commands?.sinkListItem(\"listItem\");\n\n return true;\n }\n\n return true;\n };\n\n const handleDeleteThumbnail = () => {\n setFieldValue(\"thumbnailImage\", \"\");\n setFieldValue(\"thumbnailImageUrl\", \"\");\n setTimeout(submitForm);\n };\n\n return (\n <div\n className=\"neeto-molecules-document__wrapper\"\n data-testid=\"document-editor-container\"\n ref={editorHotkeyRef}\n >\n <FormikEditor\n attachmentsClassName=\"editor-content-attachments w-full flex-shrink-0\"\n className=\"h-full w-full\"\n contentClassName=\"editor-content__wrapper neeto-molecules-document__container\"\n data-cy=\"neeto-molecules-document-content-text-area\"\n error={undefined}\n errorWrapperClassName=\"w-full min-h-full flex flex-col items-center\"\n hideSlashCommands={false}\n name={editorContentFieldName}\n ref={setEditorRef}\n menuClassName={classNames(\n \"neeto-molecules-document-editor__menubar\",\n menuClassName\n )}\n {...{ attachments, ...editorProps, addons }}\n contentWrapperClassName=\"w-full flex flex-col flex-grow\"\n keyboardShortcuts={{ Tab: handleTab, ...editorProps.keyboardShortcuts }}\n onChange={handleContentChange}\n onChangeAttachments={handleAttachmentChange}\n >\n {children}\n <div className=\"neeto-molecules-document__container px-6\">\n <Textarea\n nakedTextarea\n className=\"neeto-molecules-document__title\"\n data-cy=\"neeto-molecules-document-title-text-field\"\n name={titleFieldName}\n ref={setTitleRef}\n rows={1}\n placeholder={\n titleProps.placeholder || t(\"neetoMolecules.documentEditor.title\")\n }\n onChange={handleTitleChange}\n onKeyDown={e =>\n e.key === \"Enter\" && !e.shiftKey && e.preventDefault()\n }\n {...titleProps}\n />\n {thumbnailImageUrl && (\n <div className=\"group relative mt-4\">\n <div className=\"neeto-molecules-document__thumbnail-image\">\n <img alt=\"Cover\" src={thumbnailImageUrl} />\n </div>\n <div className=\"neeto-ui-rounded-full absolute end-2 top-2\">\n <Dropdown\n strategy=\"fixed\"\n buttonProps={{\n style: \"secondary\",\n size: \"small\",\n icon: MenuHorizontal,\n }}\n >\n <Menu>\n <MenuItem.Button onClick={handleDeleteThumbnail}>\n {t(\"neetoMolecules.documentEditor.delete\")}\n </MenuItem.Button>\n </Menu>\n </Dropdown>\n </div>\n </div>\n )}\n {errors[editorContentFieldName] && (\n <Typography\n className=\"neeto-ui-input__error neeto-molecules-editor-content__error\"\n data-cy=\"articles-content-input-error\"\n style=\"body3\"\n >\n {errors[editorContentFieldName]}\n </Typography>\n )}\n </div>\n </FormikEditor>\n <Modal\n className=\"media-uploader-modal p-5 pt-0\"\n data-testid=\"thumbnail-image-modal\"\n isOpen={isThumbnailImageModalOpen}\n onClose={() => {\n setIsThumbnailImageModalOpen(false);\n }}\n >\n <Modal.Header className=\"ms-0 ps-0\">\n <Typography style=\"h2\">\n {t(\"neetoMolecules.documentEditor.uploadThumbnailImage\")}\n </Typography>\n </Modal.Header>\n <MediaUploader {...{ setIsThumbnailImageModalOpen }} />\n </Modal>\n </div>\n );\n};\n\nEditor.propTypes = {\n /**\n * List of initial attachments.\n */\n attachments: PropTypes.arrayOf(\n PropTypes.shape({\n contentType: PropTypes.string,\n filename: PropTypes.string,\n signedId: PropTypes.string,\n url: PropTypes.string,\n })\n ),\n /**\n * Callback that will be triggered when the editor content changes.\n * This function is not throttled.\n */\n onContentChange: PropTypes.func,\n /**\n * Callback that will be triggered when the attachments changes.\n */\n onAttachmentChange: PropTypes.func,\n /**\n * Callback that will be triggered when the article title changes.\n */\n onTitleChange: PropTypes.func,\n /**\n * This function will be called with the title node reference.\n */\n getTitleRef: PropTypes.func,\n /**\n * This function will be called with editor reference.\n */\n getEditorRef: PropTypes.func,\n /**\n * Formik field name of the editor. The default value is `htmlContent`.\n */\n editorContentFieldName: PropTypes.string,\n /**\n * Formik field name of the title. The default value is `title`.\n */\n titleFieldName: PropTypes.string,\n /**\n * These props will be passed down to the editor component.\n */\n editorProps: PropTypes.object,\n /**\n * These props will be passed down to the title text area component.\n */\n titleProps: PropTypes.object,\n /**\n * A prop to pass class names to the editor menubar.\n */\n menuClassName: PropTypes.string,\n /**\n * The children will be rendered above the title input field.\n */\n children: PropTypes.node,\n /**\n * A prop to enable the thumbnail image uploader.\n */\n hasThumbnailImage: PropTypes.bool,\n};\n\nEditor.displayName = \"DocumentEditor\";\n\nexport default memo(Editor);\n"],"names":["EDITOR_ADDONS","DEFAULT_EDITOR_PROPS","isMenuIndependent","addons","size","IMAGE_UPLOAD_CONFIG","maxImageSize","allowedImageTypes","useEditor","_ref","onContentChange","editorContentFieldName","onAttachmentChange","onTitleChange","titleFieldName","editorRef","titleRef","_useFormikContext","useFormikContext","setFieldValue","errors","handleContentChange","useCallback","content","handleAttachmentChange","attachments","handleTitleChange","event","title","target","value","handleEditorBackspaceKeypress","_editorRef$current","_editor$state","editor","current","selection","state","isFocused","isPresent","anchor","focus","setSelectionRange","length","titleHotkeyRef","useHotkeys","_editorRef$current2","_editorRef$current3","commands","insertContentAt","mode","editorHotkeyRef","MediaUploader","setIsThumbnailImageModalOpen","thumbnailImageUrl","values","initialValues","submitForm","handleUpload","file","url","signedId","setTimeout","isEmpty","_jsx","Spinner","ImageUploader","className","src","uploadConfig","onUploadComplete","getThumbnailAddon","command","label","t","optionName","icon","Image","isEnabled","Editor","_ref$getTitleRef","getTitleRef","noop","_ref$getEditorRef","getEditorRef","menuClassName","_ref$editorContentFie","_ref$titleFieldName","_ref$editorProps","editorProps","customEditorProps","_ref$titleProps","titleProps","_ref$hasThumbnailImag","hasThumbnailImage","children","_useTranslation","useTranslation","Menu","Dropdown","MenuItem","useRef","_useState","useState","_useState2","_slicedToArray","isThumbnailImageModalOpen","useMemo","baseProps","mergeRight","thumbnailAddon","addonCommands","_useEditor","setTitleRef","node","setEditorRef","concat","handleTab","isListActive","isActive","sinkListItem","handleDeleteThumbnail","_jsxs","ref","FormikEditor","_objectSpread","attachmentsClassName","contentClassName","error","undefined","errorWrapperClassName","hideSlashCommands","name","classNames","contentWrapperClassName","keyboardShortcuts","Tab","onChange","onChangeAttachments","Textarea","nakedTextarea","rows","placeholder","onKeyDown","e","key","shiftKey","preventDefault","alt","strategy","buttonProps","style","MenuHorizontal","Button","onClick","Typography","Modal","isOpen","onClose","Header","displayName","memo"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAO,IAAMA,aAAa,GAAG,CAC3B,WAAW,EACX,OAAO,EACP,cAAc,EACd,YAAY,EACZ,aAAa,EACb,cAAc,EACd,uBAAuB,EACvB,SAAS,EACT,aAAa,EACb,MAAM,EACN,MAAM,EACN,OAAO,EACP,SAAS,CACV;AAEM,IAAMC,oBAAoB,GAAG;AAClCC,EAAAA,iBAAiB,EAAE,IAAI;AACvBC,EAAAA,MAAM,EAAE,EAAE;AACVC,EAAAA,IAAI,EAAE;AACR,CAAC;AAEM,IAAMC,mBAAmB,GAAG;AACjCC,EAAAA,YAAY,EAAE,CAAC;AACfC,EAAAA,iBAAiB,EAAE;AACjB,IAAA,WAAW,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC;IAC9B,WAAW,EAAE,CAAC,MAAM,CAAC;IACrB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SAAA,EAAQ,8BAA8B;AACtCoF,UAAAA,KAAK,EAAC,OAAO;UAAAxD,QAAA,EAEZ3E,MAAM,CAACT,sBAAsB;AAAC,SACrB,CACb;AAAA,OACE,CAAC;AAAA,KAAA,CACM,CAAC,eACf+G,IAAA,CAACkC,KAAK,EAAA;AACJzF,MAAAA,SAAS,EAAC,+BAA+B;AACzC,MAAA,aAAA,EAAY,uBAAuB;AACnC0F,MAAAA,MAAM,EAAEnD,yBAA0B;AAClCoD,MAAAA,OAAO,EAAE,SAATA,OAAOA,GAAQ;QACbzG,4BAA4B,CAAC,KAAK,CAAC;MACrC,CAAE;AAAA0C,MAAAA,QAAA,EAAA,cAEF/B,GAAA,CAAC4F,KAAK,CAACG,MAAM,EAAA;AAAC5F,QAAAA,SAAS,EAAC,WAAW;QAAA4B,QAAA,eACjC/B,GAAA,CAAC2F,UAAU,EAAA;AAACJ,UAAAA,KAAK,EAAC,IAAI;UAAAxD,QAAA,EACnBrB,CAAC,CAAC,oDAAoD;SAC7C;AAAC,OACD,CAAC,eACfV,GAAA,CAACZ,aAAa,EAAA;AAAOC,QAAAA,4BAA4B,EAA5BA;AAA4B,OAAK,CAAC;AAAA,KAClD,CAAC;AAAA,GACL,CAAC;AAEV,CAAC;AAiED0B,MAAM,CAACiF,WAAW,GAAG,gBAAgB;AAErC,YAAA,aAAeC,IAAI,CAAClF,MAAM,CAAC;;;;"}
@@ -10,7 +10,7 @@ import { mergeLeft, uniqBy, prop, isEmpty } from 'ramda';
10
10
  import { n } from './inject-css-C2dztUxs.js';
11
11
  import { jsx, jsxs } from 'react/jsx-runtime';
12
12
 
13
- var css = ".neeto-molecules-dynamic-variables{display:flex;flex-direction:column;gap:.375rem;max-width:22.5rem;min-width:11.5rem;padding:.5rem}.neeto-molecules-dynamic-variables__list{align-items:center;display:flex;flex-wrap:wrap;gap:.5rem}.neeto-molecules-dynamic-variables__list button{border:1px solid rgb(var(--neeto-ui-gray-300));border-radius:var(--neeto-ui-rounded-md);color:rgb(var(--neeto-ui-black));padding:.375rem;text-align:left;transition:var(--neeto-ui-transition);-webkit-user-select:none;-moz-user-select:none;user-select:none}.neeto-molecules-dynamic-variables__list button:focus,.neeto-molecules-dynamic-variables__list button:focus-visible,.neeto-molecules-dynamic-variables__list button:hover{border-color:rgb(var(--neeto-ui-primary-800));box-shadow:none;color:rgb(var(--neeto-ui-primary-800));outline:none}";
13
+ var css = ".neeto-molecules-dynamic-variables{display:flex;flex-direction:column;gap:.375rem;max-width:22.5rem;min-width:11.5rem;padding:.5rem}.neeto-molecules-dynamic-variables__list{align-items:center;display:flex;flex-wrap:wrap;gap:.5rem}.neeto-molecules-dynamic-variables__list button{border:1px solid rgb(var(--neeto-ui-gray-300));border-radius:var(--neeto-ui-rounded-md);color:rgb(var(--neeto-ui-black));padding:.375rem;text-align:start;transition:var(--neeto-ui-transition);-webkit-user-select:none;-moz-user-select:none;user-select:none}.neeto-molecules-dynamic-variables__list button:focus,.neeto-molecules-dynamic-variables__list button:focus-visible,.neeto-molecules-dynamic-variables__list button:hover{border-color:rgb(var(--neeto-ui-primary-800));box-shadow:none;color:rgb(var(--neeto-ui-primary-800));outline:none}";
14
14
  n(css,{});
15
15
 
16
16
  var parseVariables = function parseVariables() {
@@ -77,7 +77,7 @@ var EmailPreview = withT(function (_ref) {
77
77
  })]
78
78
  })]
79
79
  }), /*#__PURE__*/jsxs("div", {
80
- className: "neeto-ui-text-gray-800 flex flex-1 flex-col justify-between gap-y-6 p-6 pr-10 text-base leading-relaxed",
80
+ className: "neeto-ui-text-gray-800 flex flex-1 flex-col justify-between gap-y-6 p-6 pe-10 text-base leading-relaxed",
81
81
  "data-cy": "email-body-preview-container",
82
82
  children: [body ? /*#__PURE__*/jsx(MemoizedEditorContent, {
83
83
  content: body
@@ -1 +1 @@
1
- {"version":3,"file":"EmailPreview.js","sources":["../src/components/EmailPreview.jsx"],"sourcesContent":["import { memo } from \"react\";\n\nimport classnames from \"classnames\";\nimport { isPresent } from \"neetocist\";\nimport withT from \"neetocommons/react-utils/withT\";\nimport { EditorContent } from \"neetoeditor\";\nimport { Typography, Button } from \"neetoui\";\nimport PropTypes from \"prop-types\";\n\nconst MemoizedEditorContent = memo(EditorContent);\n\nconst EmailPreview = withT(\n ({\n t,\n to = [],\n from,\n subject,\n body,\n actionButtonText,\n logo,\n className = \"\",\n customContent,\n }) => (\n <div\n data-cy=\"email-preview-card\"\n data-testid=\"email-preview\"\n className={classnames(\n \"neeto-ui-border-gray-300 neeto-ui-shadow-m neeto-ui-bg-white neeto-ui-theme--light neeto-notification-email-wrapper__preview flex flex-1 flex-col border\",\n className\n )}\n >\n <div className=\"neeto-ui-border-gray-300 flex flex-col gap-y-3 border-b p-6\">\n <div\n className=\"flex gap-2\"\n data-cy=\"email-send-to-preview\"\n data-testid=\"email-to-block\"\n >\n <Typography\n className=\"neeto-ui-text-gray-500\"\n lineHeight=\"normal\"\n style=\"body2\"\n >\n {t(\"neetoMolecules.emailPreview.to\")}:\n </Typography>\n {isPresent(to) ? (\n <Typography\n className=\"neeto-ui-text-gray-800 min-w-0 flex-grow break-words\"\n lineHeight=\"normal\"\n style=\"body2\"\n >\n {to.join(\", \")}\n </Typography>\n ) : (\n <div className=\"neeto-ui-bg-gray-300 neeto-ui-rounded-full mt-2 h-2 w-40\" />\n )}\n </div>\n {from && (\n <div className=\"neeto-ui-border-gray-200 flex items-center gap-2 border-t pt-3\">\n <Typography\n className=\"neeto-ui-text-gray-500\"\n lineHeight=\"normal\"\n style=\"body2\"\n >\n {t(\"neetoMolecules.emailPreview.from\")}:\n </Typography>\n <Typography\n className=\"neeto-ui-text-gray-800 min-w-0 flex-grow break-words\"\n data-cy=\"email-send-from-preview\"\n lineHeight=\"normal\"\n style=\"body2\"\n >\n {from}\n </Typography>\n </div>\n )}\n <div className=\"neeto-ui-border-gray-200 flex items-center gap-2 border-t pt-3\">\n <Typography\n className=\"neeto-ui-text-gray-500\"\n lineHeight=\"normal\"\n style=\"body2\"\n >\n {t(\"neetoMolecules.emailPreview.subject\")}:\n </Typography>\n <Typography\n className=\"neeto-ui-text-gray-800 min-w-0 flex-grow break-words\"\n data-cy=\"email-subject-preview\"\n lineHeight=\"normal\"\n style=\"body2\"\n >\n {subject || (\n <span className=\"neeto-ui-bg-gray-300 neeto-ui-rounded-full h-2 w-40\" />\n )}\n </Typography>\n </div>\n </div>\n <div\n className=\"neeto-ui-text-gray-800 flex flex-1 flex-col justify-between gap-y-6 p-6 pr-10 text-base leading-relaxed\"\n data-cy=\"email-body-preview-container\"\n >\n {body ? (\n <MemoizedEditorContent content={body} />\n ) : (\n <div className=\"flex flex-col gap-y-4\">\n <div className=\"neeto-ui-bg-gray-300 neeto-ui-rounded-full h-2 w-48 max-w-full md:w-80\" />\n <div className=\"neeto-ui-bg-gray-300 neeto-ui-rounded-full h-2 w-40 max-w-full md:w-72\" />\n <div className=\"neeto-ui-bg-gray-300 neeto-ui-rounded-full h-2 w-48 max-w-full md:w-80\" />\n </div>\n )}\n {customContent && customContent}\n {actionButtonText && (\n <div className=\"mt-6 flex w-full items-center justify-center\">\n <Button className=\"pointer-events-none\" label={actionButtonText} />\n </div>\n )}\n {logo && (\n <img\n alt={t(\"neetoMolecules.emailPreview.logoAltText\")}\n className=\"h-20 w-36 object-cover\"\n data-cy=\"company-logo-preview\"\n src={logo}\n />\n )}\n </div>\n </div>\n )\n);\n\nEmailPreview.propTypes = {\n /**\n * The value of the send-to field.\n */\n to: PropTypes.arrayOf(PropTypes.string),\n /**\n * The value of the send-from field.\n */\n from: PropTypes.string,\n /**\n * The subject of the email.\n */\n subject: PropTypes.string,\n /**\n * The body of the email.\n */\n body: PropTypes.string,\n /**\n * The text to be shown in the action button.\n */\n actionButtonText: PropTypes.string,\n /**\n * Source link for the company logo.\n */\n logo: PropTypes.string,\n /**\n * To pass custom content that will be rendered above the action button.\n */\n customContent: PropTypes.string,\n};\n\nexport default EmailPreview;\n"],"names":["MemoizedEditorContent","memo","EditorContent","EmailPreview","withT","_ref","t","_ref$to","to","from","subject","body","actionButtonText","logo","_ref$className","className","customContent","_jsxs","classnames","children","Typography","lineHeight","style","isPresent","_jsx","join","content","Button","label","alt","src","propTypes","PropTypes","arrayOf","string"],"mappings":";;;;;;;;;;;AASA,IAAMA,qBAAqB,gBAAGC,IAAI,CAACC,aAAa,CAAC;AAEjD,IAAMC,YAAY,GAAGC,KAAK,CACxB,UAAAC,IAAA,EAAA;AAAA,EAAA,IACEC,CAAC,GAAAD,IAAA,CAADC,CAAC;IAAAC,OAAA,GAAAF,IAAA,CACDG,EAAE;AAAFA,IAAAA,EAAE,GAAAD,OAAA,KAAA,MAAA,GAAG,EAAE,GAAAA,OAAA;IACPE,IAAI,GAAAJ,IAAA,CAAJI,IAAI;IACJC,OAAO,GAAAL,IAAA,CAAPK,OAAO;IACPC,IAAI,GAAAN,IAAA,CAAJM,IAAI;IACJC,gBAAgB,GAAAP,IAAA,CAAhBO,gBAAgB;IAChBC,IAAI,GAAAR,IAAA,CAAJQ,IAAI;IAAAC,cAAA,GAAAT,IAAA,CACJU,SAAS;AAATA,IAAAA,SAAS,GAAAD,cAAA,KAAA,MAAA,GAAG,EAAE,GAAAA,cAAA;IACdE,aAAa,GAAAX,IAAA,CAAbW,aAAa;AAAA,EAAA,oBAEbC,IAAA,CAAA,KAAA,EAAA;AACE,IAAA,SAAA,EAAQ,oBAAoB;AAC5B,IAAA,aAAA,EAAY,eAAe;AAC3BF,IAAAA,SAAS,EAAEG,UAAU,CACnB,0JAA0J,EAC1JH,SACF,CAAE;AAAAI,IAAAA,QAAA,gBAEFF,IAAA,CAAA,KAAA,EAAA;AAAKF,MAAAA,SAAS,EAAC,6DAA6D;AAAAI,MAAAA,QAAA,gBAC1EF,IAAA,CAAA,KAAA,EAAA;AACEF,QAAAA,SAAS,EAAC,YAAY;AACtB,QAAA,SAAA,EAAQ,uBAAuB;AAC/B,QAAA,aAAA,EAAY,gBAAgB;QAAAI,QAAA,EAAA,cAE5BF,IAAA,CAACG,UAAU,EAAA;AACTL,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AACEK,QAAAA,GAAG,EAAEvB,CAAC,CAAC,yCAAyC,CAAE;AAClDS,QAAAA,SAAS,EAAC,wBAAwB;AAClC,QAAA,SAAA,EAAQ,sBAAsB;AAC9Be,QAAAA,GAAG,EAAEjB;AAAK,OACX,CACF;AAAA,KACE,CAAC;AAAA,GACH,CAAC;AAAA,CAEV;AAEAV,YAAY,CAAC4B,SAAS,GAAG;AACvB;AACF;AACA;EACEvB,EAAE,EAAEwB,SAAS,CAACC,OAAO,CAACD,SAAS,CAACE,MAAM,CAAC;AACvC;AACF;AACA;EACEzB,IAAI,EAAEuB,SAAS,CAACE,MAAM;AACtB;AACF;AACA;EACExB,OAAO,EAAEsB,SAAS,CAACE,MAAM;AACzB;AACF;AACA;EACEvB,IAAI,EAAEqB,SAAS,CAACE,MAAM;AACtB;AACF;AACA;EACEtB,gBAAgB,EAAEoB,SAAS,CAACE,MAAM;AAClC;AACF;AACA;EACErB,IAAI,EAAEmB,SAAS,CAACE,MAAM;AACtB;AACF;AACA;EACElB,aAAa,EAAEgB,SAAS,CAACE;AAC3B,CAAC;;;;"}
1
+ {"version":3,"file":"EmailPreview.js","sources":["../src/components/EmailPreview.jsx"],"sourcesContent":["import { memo } from \"react\";\n\nimport classnames from \"classnames\";\nimport { isPresent } from \"neetocist\";\nimport withT from \"neetocommons/react-utils/withT\";\nimport { EditorContent } from \"neetoeditor\";\nimport { Typography, Button } from \"neetoui\";\nimport PropTypes from \"prop-types\";\n\nconst MemoizedEditorContent = memo(EditorContent);\n\nconst EmailPreview = withT(\n ({\n t,\n to = [],\n from,\n subject,\n body,\n actionButtonText,\n logo,\n className = \"\",\n customContent,\n }) => (\n <div\n data-cy=\"email-preview-card\"\n data-testid=\"email-preview\"\n className={classnames(\n \"neeto-ui-border-gray-300 neeto-ui-shadow-m neeto-ui-bg-white neeto-ui-theme--light neeto-notification-email-wrapper__preview flex flex-1 flex-col border\",\n className\n )}\n >\n <div className=\"neeto-ui-border-gray-300 flex flex-col gap-y-3 border-b p-6\">\n <div\n className=\"flex gap-2\"\n data-cy=\"email-send-to-preview\"\n data-testid=\"email-to-block\"\n >\n <Typography\n className=\"neeto-ui-text-gray-500\"\n lineHeight=\"normal\"\n style=\"body2\"\n >\n {t(\"neetoMolecules.emailPreview.to\")}:\n </Typography>\n {isPresent(to) ? (\n <Typography\n className=\"neeto-ui-text-gray-800 min-w-0 flex-grow break-words\"\n lineHeight=\"normal\"\n style=\"body2\"\n >\n {to.join(\", \")}\n </Typography>\n ) : (\n <div className=\"neeto-ui-bg-gray-300 neeto-ui-rounded-full mt-2 h-2 w-40\" />\n )}\n </div>\n {from && (\n <div className=\"neeto-ui-border-gray-200 flex items-center gap-2 border-t pt-3\">\n <Typography\n className=\"neeto-ui-text-gray-500\"\n lineHeight=\"normal\"\n style=\"body2\"\n >\n {t(\"neetoMolecules.emailPreview.from\")}:\n </Typography>\n <Typography\n className=\"neeto-ui-text-gray-800 min-w-0 flex-grow break-words\"\n data-cy=\"email-send-from-preview\"\n lineHeight=\"normal\"\n style=\"body2\"\n >\n {from}\n </Typography>\n </div>\n )}\n <div className=\"neeto-ui-border-gray-200 flex items-center gap-2 border-t pt-3\">\n <Typography\n className=\"neeto-ui-text-gray-500\"\n lineHeight=\"normal\"\n style=\"body2\"\n >\n {t(\"neetoMolecules.emailPreview.subject\")}:\n </Typography>\n <Typography\n className=\"neeto-ui-text-gray-800 min-w-0 flex-grow break-words\"\n data-cy=\"email-subject-preview\"\n lineHeight=\"normal\"\n style=\"body2\"\n >\n {subject || (\n <span className=\"neeto-ui-bg-gray-300 neeto-ui-rounded-full h-2 w-40\" />\n )}\n </Typography>\n </div>\n </div>\n <div\n className=\"neeto-ui-text-gray-800 flex flex-1 flex-col justify-between gap-y-6 p-6 pe-10 text-base leading-relaxed\"\n data-cy=\"email-body-preview-container\"\n >\n {body ? (\n <MemoizedEditorContent content={body} />\n ) : (\n <div className=\"flex flex-col gap-y-4\">\n <div className=\"neeto-ui-bg-gray-300 neeto-ui-rounded-full h-2 w-48 max-w-full md:w-80\" />\n <div className=\"neeto-ui-bg-gray-300 neeto-ui-rounded-full h-2 w-40 max-w-full md:w-72\" />\n <div className=\"neeto-ui-bg-gray-300 neeto-ui-rounded-full h-2 w-48 max-w-full md:w-80\" />\n </div>\n )}\n {customContent && customContent}\n {actionButtonText && (\n <div className=\"mt-6 flex w-full items-center justify-center\">\n <Button className=\"pointer-events-none\" label={actionButtonText} />\n </div>\n )}\n {logo && (\n <img\n alt={t(\"neetoMolecules.emailPreview.logoAltText\")}\n className=\"h-20 w-36 object-cover\"\n data-cy=\"company-logo-preview\"\n src={logo}\n />\n )}\n </div>\n </div>\n )\n);\n\nEmailPreview.propTypes = {\n /**\n * The value of the send-to field.\n */\n to: PropTypes.arrayOf(PropTypes.string),\n /**\n * The value of the send-from field.\n */\n from: PropTypes.string,\n /**\n * The subject of the email.\n */\n subject: PropTypes.string,\n /**\n * The body of the email.\n */\n body: PropTypes.string,\n /**\n * The text to be shown in the action button.\n */\n actionButtonText: PropTypes.string,\n /**\n * Source link for the company logo.\n */\n logo: PropTypes.string,\n /**\n * To pass custom content that will be rendered above the action button.\n */\n customContent: PropTypes.string,\n};\n\nexport default EmailPreview;\n"],"names":["MemoizedEditorContent","memo","EditorContent","EmailPreview","withT","_ref","t","_ref$to","to","from","subject","body","actionButtonText","logo","_ref$className","className","customContent","_jsxs","classnames","children","Typography","lineHeight","style","isPresent","_jsx","join","content","Button","label","alt","src","propTypes","PropTypes","arrayOf","string"],"mappings":";;;;;;;;;;;AASA,IAAMA,qBAAqB,gBAAGC,IAAI,CAACC,aAAa,CAAC;AAEjD,IAAMC,YAAY,GAAGC,KAAK,CACxB,UAAAC,IAAA,EAAA;AAAA,EAAA,IACEC,CAAC,GAAAD,IAAA,CAADC,CAAC;IAAAC,OAAA,GAAAF,IAAA,CACDG,EAAE;AAAFA,IAAAA,EAAE,GAAAD,OAAA,KAAA,MAAA,GAAG,EAAE,GAAAA,OAAA;IACPE,IAAI,GAAAJ,I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,CAACE,MAAM;AACzB;AACF;AACA;EACEvB,IAAI,EAAEqB,SAAS,CAACE,MAAM;AACtB;AACF;AACA;EACEtB,gBAAgB,EAAEoB,SAAS,CAACE,MAAM;AAClC;AACF;AACA;EACErB,IAAI,EAAEmB,SAAS,CAACE,MAAM;AACtB;AACF;AACA;EACElB,aAAa,EAAEgB,SAAS,CAACE;AAC3B,CAAC;;;;"}
@@ -39,7 +39,7 @@ var ActivityIcon = function ActivityIcon(_ref) {
39
39
  "neeto-ui-text-primary-600 neeto-ui-bg-primary-100": unread
40
40
  }),
41
41
  children: [icon, unread && /*#__PURE__*/jsx("span", {
42
- className: "neeto-ui-rounded-full neeto-ui-bg-primary-800 absolute -right-0.5 -top-0.5 h-2 w-2"
42
+ className: "neeto-ui-rounded-full neeto-ui-bg-primary-800 absolute -end-0.5 -top-0.5 h-2 w-2"
43
43
  })]
44
44
  })
45
45
  });
@@ -81,7 +81,7 @@ var CommentHeader = function CommentHeader(_ref) {
81
81
  imageUrl: user.profileImageUrl
82
82
  };
83
83
  return /*#__PURE__*/jsxs("div", {
84
- className: "neeto-ui-bg-gray-100 neeto-ui-border-gray-300 flex items-center justify-between rounded-t-md border-b py-1 pl-4 pr-1",
84
+ className: "neeto-ui-bg-gray-100 neeto-ui-border-gray-300 flex items-center justify-between rounded-t-md border-b py-1 pe-1 ps-4",
85
85
  children: [/*#__PURE__*/jsxs("div", {
86
86
  className: "flex min-w-0 flex-grow flex-wrap items-center gap-2",
87
87
  children: [/*#__PURE__*/jsx(Avatar, {
@@ -149,7 +149,7 @@ var Reactions = function Reactions(_ref) {
149
149
  return /*#__PURE__*/jsxs("div", {
150
150
  className: "mt-2 flex flex-wrap gap-0.5",
151
151
  children: [/*#__PURE__*/jsx("div", {
152
- className: "neeto-ui-rounded-full neeto-ui-bg-gray-200 mr-2",
152
+ className: "neeto-ui-rounded-full neeto-ui-bg-gray-200 me-2",
153
153
  children: /*#__PURE__*/jsx(EmojiPicker, {
154
154
  onSelect: onSelect
155
155
  })
@@ -264,7 +264,7 @@ Comment.propTypes = {
264
264
  onRemoveReaction: PropTypes.func
265
265
  };
266
266
 
267
- var css = ".neeto-molecules-comments-node{position:relative}.neeto-molecules-comments-node:before{background-color:rgb(var(--neeto-ui-gray-200));content:\"\";height:1rem;left:31px;position:absolute;top:calc(100% + 1px);transform:translateX(-50%);width:2px}.neeto-molecules-engagements-node{position:relative}.neeto-molecules-engagements-node .neeto-ui-avatar__container{--neeto-ui-avatar-container-width:1.125rem;--neeto-ui-avatar-container-height:1.125rem;--neeto-ui-avatar-width:1.125rem;--neeto-ui-avatar-height:1.125rem}.neeto-molecules-engagements-node .neeto-ui-avatar__container>div{height:1.125rem;width:1.125rem}.neeto-molecules-engagements-node:before{background-color:rgb(var(--neeto-ui-gray-200));content:\"\";height:100%;left:32px;position:absolute;top:0;transform:translateX(-50%);width:2px}.neeto-molecules-activity-node-icon svg{height:16px;width:16px}";
267
+ var css = ".neeto-molecules-comments-node{position:relative}.neeto-molecules-comments-node:before{background-color:rgb(var(--neeto-ui-gray-200));content:\"\";height:1rem;inset-inline-start:31px;position:absolute;top:calc(100% + 1px);transform:translateX(-50%);width:2px}.neeto-molecules-engagements-node{position:relative}.neeto-molecules-engagements-node .neeto-ui-avatar__container{--neeto-ui-avatar-container-width:1.125rem;--neeto-ui-avatar-container-height:1.125rem;--neeto-ui-avatar-width:1.125rem;--neeto-ui-avatar-height:1.125rem}.neeto-molecules-engagements-node .neeto-ui-avatar__container>div{height:1.125rem;width:1.125rem}.neeto-molecules-engagements-node:before{background-color:rgb(var(--neeto-ui-gray-200));content:\"\";height:100%;inset-inline-start:32px;position:absolute;top:0;transform:translateX(-50%);width:2px}.neeto-molecules-activity-node-icon svg{height:16px;width:16px}";
268
268
  n(css,{});
269
269
 
270
270
  var Engagements = function Engagements(_ref) {
@@ -1 +1 @@
1
- {"version":3,"file":"Engagements.js","sources":["../src/components/Engagements/Activity/Icon.jsx","../src/components/Engagements/Activity/index.jsx","../src/components/Engagements/Comment/Header.jsx","../src/components/Engagements/Comment/Reactions.jsx","../src/components/Engagements/constants.js","../src/components/Engagements/utils.js","../src/components/Engagements/Comment/index.jsx","../src/components/Engagements/index.jsx"],"sourcesContent":["import classNames from \"classnames\";\n\nconst ActivityIcon = ({ icon, unread }) => (\n <div className=\"mx-0.5 flex-shrink-0\">\n <span\n className={classNames(\n \"neeto-ui-bg-gray-200 neeto-ui-text-gray-600 neeto-ui-rounded-full neeto-molecules-activity-node-icon relative z-10 flex h-7 w-7 items-center justify-center p-1\",\n {\n \"neeto-ui-text-primary-600 neeto-ui-bg-primary-100\": unread,\n }\n )}\n >\n {icon}\n {unread && (\n <span className=\"neeto-ui-rounded-full neeto-ui-bg-primary-800 absolute -right-0.5 -top-0.5 h-2 w-2\" />\n )}\n </span>\n </div>\n);\n\nexport default ActivityIcon;\n","import classNames from \"classnames\";\nimport { Avatar } from \"neetoui\";\nimport PropTypes from \"prop-types\";\n\nimport ActivityIcon from \"./Icon\";\n\nconst Activity = ({\n user,\n icon,\n unread = false,\n className,\n children,\n userIcon,\n}) => (\n <div\n className={classNames(\n \"neeto-molecules-engagements-node relative -mt-4 flex items-center gap-2 px-4 py-4\",\n className\n )}\n >\n <ActivityIcon {...{ icon, unread }} />\n {userIcon || (\n <Avatar\n size=\"small\"\n user={{ name: user.name, imageUrl: user.profileImageUrl }}\n />\n )}\n <div className=\"neeto-molecules-engagements-node__children\">{children}</div>\n </div>\n);\n\nActivity.propTypes = {\n /** Object representing the user information */\n user: PropTypes.shape({ name: PropTypes.string.isRequired }).isRequired,\n\n /** Element to render as the icon */\n icon: PropTypes.oneOfType([PropTypes.string, PropTypes.object]).isRequired,\n\n /** Boolean indicating if the activity is unread to show unread badge */\n unread: PropTypes.bool,\n\n /** Additional classes passed on to the board view. */\n className: PropTypes.string,\n};\n\nexport default Activity;\n","import { isPresent } from \"neetocist\";\nimport { Avatar, Typography } from \"neetoui\";\n\nimport DateFormat from \"components/DateFormat\";\nimport MoreDropdown from \"components/MoreDropdown\";\n\nconst CommentHeader = ({ user, comment, info, actions }) => {\n const avatar = { name: user.name, imageUrl: user.profileImageUrl };\n\n return (\n <div className=\"neeto-ui-bg-gray-100 neeto-ui-border-gray-300 flex items-center justify-between rounded-t-md border-b py-1 pl-4 pr-1\">\n <div className=\"flex min-w-0 flex-grow flex-wrap items-center gap-2\">\n <Avatar size=\"medium\" user={avatar} />\n <Typography\n className=\"neeto-ui-text-gray-700\"\n style=\"body2\"\n weight=\"semibold\"\n >\n {user.name}\n </Typography>\n <Typography className=\"neeto-ui-text-gray-700\" style=\"body2\">\n •\n </Typography>\n {info && (\n <>\n <Typography\n className=\"neeto-ui-text-gray-500 lowercase\"\n style=\"body2\"\n >\n {info}\n </Typography>\n <Typography className=\"neeto-ui-text-gray-700\" style=\"body2\">\n •\n </Typography>\n </>\n )}\n {comment.createdAt && (\n <DateFormat.FromNow\n date={comment.createdAt}\n typographyProps={{\n style: \"body2\",\n className: \"neeto-ui-text-gray-500\",\n }}\n />\n )}\n </div>\n {isPresent(actions) && (\n <MoreDropdown\n dropdownButtonProps={{ className: \"self-start fles-shrink-0\" }}\n dropdownProps={{ position: \"bottom-start\" }}\n menuItems={actions}\n />\n )}\n </div>\n );\n};\n\nexport default CommentHeader;\n","import { memo } from \"react\";\n\nimport classNames from \"classnames\";\nimport { findIndexBy } from \"neetocist\";\nimport { globalProps } from \"neetocommons/initializers\";\nimport { Tooltip, Typography } from \"neetoui\";\nimport { collectBy, eqProps, pathEq, pluck, prop } from \"ramda\";\nimport { useTranslation } from \"react-i18next\";\n\nimport EmojiPicker from \"components/EmojiPicker\";\n\nconst findOwnIndex = findIndexBy({ userId: globalProps.user.id });\nconst groupReactions = collectBy(prop(\"unified\"));\n\nconst Reactions = ({ reactions, onAdd, onRemove }) => {\n const { t } = useTranslation();\n const groups = groupReactions(reactions);\n\n const onSelect = emoji => {\n // Try to find group to which emoji belongs in existing reactions.\n const group = groups.find(pathEq(emoji.unified, [0, \"unified\"]));\n if (group && findOwnIndex(group) >= 0) return; // User already reacted with same emoji.\n onAdd({ ...emoji, emoji: emoji.native });\n };\n\n return (\n <div className=\"mt-2 flex flex-wrap gap-0.5\">\n <div className=\"neeto-ui-rounded-full neeto-ui-bg-gray-200 mr-2\">\n <EmojiPicker {...{ onSelect }} />\n </div>\n {groups.map(reactions => {\n const ownIndex = findOwnIndex(reactions);\n const selected = ownIndex >= 0;\n const reaction = selected ? reactions[ownIndex] : reactions[0];\n const names = pluck(\"reactor\", reactions).join(\", \");\n\n return (\n <Tooltip\n key={reaction.unified}\n position=\"top\"\n content={\n <p className=\"text-center text-xs\">\n {t(\"neetoMolecules.engagements.namesReacted\", { names })}\n </p>\n }\n >\n <div\n className={classNames(\n \"neeto-ui-rounded-full mx-1 flex cursor-pointer items-center justify-center px-2 py-1\",\n {\n \"neeto-ui-bg-accent-100\": selected,\n \"neeto-ui-bg-gray-100\": !selected,\n }\n )}\n onClick={() => (selected ? onRemove : onAdd)(reaction)}\n >\n <Typography\n className=\"flex items-center gap-x-1 text-sm\"\n style=\"body2\"\n >\n <span className=\"text-sm\">{reaction.emoji}</span>\n <span className=\"text-sm\">{reactions.length}</span>\n </Typography>\n </div>\n </Tooltip>\n );\n })}\n </div>\n );\n};\n\nexport default memo(Reactions, eqProps(\"reactions\"));\n","export const ACTIVITY_TYPES = {\n TIMELINE: \"Timeline\",\n FIELD_VALUE: \"FieldValue\",\n TASK: \"Task\",\n ASSIGNEE: \"Assignee\",\n CHECKLIST: \"Checklist\",\n FIELD: \"Field\",\n PROJECT: \"Project\",\n COMMENT: \"Comment\",\n DOCUMENT: \"Document\",\n CHAT_MESSAGE: \"ChatMessage\",\n MESSAGE: \"Message\",\n SECTION: \"Section\",\n PROJECT_MEMBER: \"ProjectMember\",\n PULL_REQUEST: \"NeetoGithubEngine::PullRequest\",\n};\n\nexport const ENGAGEMENT_TYPES = {\n COMMENT: \"comment\",\n ACTIVITY: \"activity\",\n};\n","import { ENGAGEMENT_TYPES } from \"./constants\";\n\nexport const createCommentElementId = comment =>\n `neeto-molecules-engagement-comment--${comment.id}`;\n\nexport const defaultMatchType = engagement => {\n if (engagement.commenter) return ENGAGEMENT_TYPES.COMMENT;\n else if (engagement.creator) return ENGAGEMENT_TYPES.ACTIVITY;\n\n return null;\n};\n","import { forwardRef } from \"react\";\n\nimport classNames from \"classnames\";\nimport PropTypes from \"prop-types\";\n\nimport CommentHeader from \"./Header\";\nimport Reactions from \"./Reactions\";\n\nimport { createCommentElementId } from \"../utils\";\n\nconst Comment = forwardRef(\n (\n {\n user,\n comment,\n reactions,\n info,\n actions,\n className,\n children,\n onAddReaction,\n onRemoveReaction,\n },\n ref\n ) => (\n <div\n {...{ ref }}\n id={createCommentElementId(comment)}\n className={classNames(\n \"neeto-ui-bg-white neeto-ui-rounded-md neeto-ui-border-gray-300 neeto-molecules-comments-node mb-4 w-full border\",\n className\n )}\n >\n <CommentHeader {...{ actions, comment, info, user }} />\n <div className=\"neeto-molecules-comments-node__inner p-4\">\n {children}\n {reactions !== false && (\n <Reactions\n {...{ reactions }}\n onAdd={onAddReaction}\n onRemove={onRemoveReaction}\n />\n )}\n </div>\n </div>\n )\n);\n\nComment.displayName = \"Comment\";\nComment.propTypes = {\n /** Object representing the user information */\n user: PropTypes.shape({ name: PropTypes.string.isRequired }).isRequired,\n\n /** Object representing the comment item. */\n comment: PropTypes.shape({\n id: PropTypes.string.isRequired,\n createdAt: PropTypes.string.isRequired,\n }).isRequired,\n\n /** Array of reactions. Settings this to `false` will disable reactions for the item */\n reactions: PropTypes.oneOfType([PropTypes.array, PropTypes.bool]),\n\n /** Optional text label to be displayed in the header. */\n info: PropTypes.string,\n\n /** Optional action items to be passed to the menuItems prop of the actions dropdown */\n actions: PropTypes.arrayOf(\n PropTypes.shape({\n isVisible: PropTypes.bool,\n key: PropTypes.string.isRequired,\n label: PropTypes.string.isRequired,\n onClick: PropTypes.func.isRequired,\n })\n ),\n\n /** Additional classes passed on to the board view. */\n className: PropTypes.string,\n\n /** Callback function triggered when a reaction (emoji) is added */\n onAddReaction: PropTypes.func,\n\n /** Callback function triggered when a reaction (emoji) is removed*/\n onRemoveReaction: PropTypes.func,\n};\n\nexport default Comment;\n","import React from \"react\";\n\nimport { noop } from \"neetocist\";\nimport PropTypes from \"prop-types\";\n\nimport Activity from \"./Activity\";\nimport Comment from \"./Comment\";\nimport { ENGAGEMENT_TYPES } from \"./constants\";\nimport \"./engagements.scss\";\nimport { defaultMatchType } from \"./utils\";\n\nconst Engagements = ({\n data,\n isActivitiesEnabled = false,\n matchType = defaultMatchType,\n renderComment,\n renderActivity,\n}) => {\n const rendererHashmap = {\n [ENGAGEMENT_TYPES.COMMENT]: renderComment,\n [ENGAGEMENT_TYPES.ACTIVITY]: isActivitiesEnabled ? renderActivity : noop,\n };\n\n return (\n <>\n {data.map((engagement, index) => {\n const type = matchType(engagement);\n const renderer = rendererHashmap[type];\n if (!renderer) return null;\n\n return (\n <React.Fragment key={engagement.id}>\n {renderer(engagement, index)}\n </React.Fragment>\n );\n })}\n </>\n );\n};\n\nEngagements.displayName = \"Engagements\";\nEngagements.Comment = Comment;\nEngagements.Activity = Activity;\nEngagements.TYPES = ENGAGEMENT_TYPES;\n\nEngagements.propTypes = {\n /** An array of engagement items */\n data: PropTypes.arrayOf(PropTypes.shape({ id: PropTypes.string.isRequired }))\n .isRequired,\n\n /** Boolean, determines whether activities are rendered. Defaults to false */\n isActivitiesEnabled: PropTypes.bool,\n\n /** Optional function to match the item type. Receives item as argument and should return one of Engagements.TYPES.*/\n matchType: PropTypes.func,\n\n /** A function to render individual comment item. Receives comment and index as arguments */\n renderComment: PropTypes.func.isRequired,\n\n /** A function to render individual activity item. Receives comment and index as arguments */\n renderActivity: PropTypes.func.isRequired,\n};\n\nexport default Engagements;\n"],"names":["ActivityIcon","_ref","icon","unread","_jsx","className","children","_jsxs","classNames","Activity","user","_ref$unread","userIcon","Avatar","size","name","imageUrl","profileImageUrl","CommentHeader","comment","info","actions","avatar","Typography","style","weight","_Fragment","createdAt","DateFormat","FromNow","date","typographyProps","isPresent","MoreDropdown","dropdownButtonProps","dropdownProps","position","menuItems","findOwnIndex","findIndexBy","userId","globalProps","id","groupReactions","collectBy","prop","Reactions","reactions","onAdd","onRemove","_useTranslation","useTranslation","t","groups","onSelect","emoji","group","find","pathEq","unified","_objectSpread","EmojiPicker","map","ownIndex","selected","reaction","names","pluck","join","Tooltip","content","onClick","length","memo","eqProps","ENGAGEMENT_TYPES","COMMENT","ACTIVITY","createCommentElementId","concat","defaultMatchType","engagement","commenter","creator","Comment","forwardRef","ref","onAddReaction","onRemoveReaction","displayName","propTypes","PropTypes","shape","string","isRequired","oneOfType","array","bool","arrayOf","isVisible","key","label","func","Engagements","data","_ref$isActivitiesEnab","isActivitiesEnabled","_ref$matchType","matchType","renderComment","renderActivity","rendererHashmap","_defineProperty","noop","index","type","renderer","React","Fragment","TYPES"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,IAAMA,YAAY,GAAG,SAAfA,YAAYA,CAAAC,IAAA,EAAA;AAAA,EAAA,IAAMC,IAAI,GAAAD,IAAA,CAAJC,IAAI;IAAEC,MAAM,GAAAF,IAAA,CAANE,MAAM;AAAA,EAAA,oBAClCC,GAAA,CAAA,KAAA,EAAA;AAAKC,IAAAA,SAAS,EAAC,sBAAsB;AAAAC,IAAAA,QAAA,eACnCC,IAAA,CAAA,MAAA,EAAA;AACEF,MAAAA,SAAS,EAAEG,UAAU,CACnB,iKAAiK,EACjK;AACE,QAAA,mDAAmD,EAAEL;AACvD,OACF,CAAE;AAAAG,MAAAA,QAAA,EAAA,CAEDJ,IAAI,EACJC,MAAM,iBACLC,GAAA,CAAA,MAAA,EAAA;AAAMC,QAAAA,SAAS,EAAC;AAAoF,OAAE,CACvG;KACG;AAAC,GACJ,CAAC;AAAA,CACP;;ACZD,IAAMI,QAAQ,GAAG,SAAXA,QAAQA,CAAAR,IAAA,EAAA;AAAA,EAAA,IACZS,IAAI,GAAAT,IAA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MC,eAAe,GAAAC,eAAA,CAAAA,eAAA,CAAA,EAAA,EAClBrC,gBAAgB,CAACC,OAAO,EAAGiC,aAAa,CAAA,EACxClC,gBAAgB,CAACE,QAAQ,EAAG6B,mBAAmB,GAAGI,cAAc,GAAGG,IAAI,CACzE;EAED,oBACE7G,GAAA,CAAAsB,QAAA,EAAA;IAAApB,QAAA,EACGkG,IAAI,CAAC1C,GAAG,CAAC,UAACmB,UAAU,EAAEiC,KAAK,EAAK;AAC/B,MAAA,IAAMC,IAAI,GAAGP,SAAS,CAAC3B,UAAU,CAAC;AAClC,MAAA,IAAMmC,QAAQ,GAAGL,eAAe,CAACI,IAAI,CAAC;AACtC,MAAA,IAAI,CAACC,QAAQ,EAAE,OAAO,IAAI;AAE1B,MAAA,oBACEhH,GAAA,CAACiH,cAAK,CAACC,QAAQ,EAAA;AAAAhH,QAAAA,QAAA,EACZ8G,QAAQ,CAACnC,UAAU,EAAEiC,KAAK;OAAC,EADTjC,UAAU,CAACvC,EAEhB,CAAC;IAErB,CAAC;AAAC,GACF,CAAC;AAEP;AAEA6D,WAAW,CAACd,WAAW,GAAG,aAAa;AACvCc,WAAW,CAACnB,OAAO,GAAGA,OAAO;AAC7BmB,WAAW,CAAC9F,QAAQ,GAAGA,QAAQ;AAC/B8F,WAAW,CAACgB,KAAK,GAAG5C,gBAAgB;;;;"}
1
+ {"version":3,"file":"Engagements.js","sources":["../src/components/Engagements/Activity/Icon.jsx","../src/components/Engagements/Activity/index.jsx","../src/components/Engagements/Comment/Header.jsx","../src/components/Engagements/Comment/Reactions.jsx","../src/components/Engagements/constants.js","../src/components/Engagements/utils.js","../src/components/Engagements/Comment/index.jsx","../src/components/Engagements/index.jsx"],"sourcesContent":["import classNames from \"classnames\";\n\nconst ActivityIcon = ({ icon, unread }) => (\n <div className=\"mx-0.5 flex-shrink-0\">\n <span\n className={classNames(\n \"neeto-ui-bg-gray-200 neeto-ui-text-gray-600 neeto-ui-rounded-full neeto-molecules-activity-node-icon relative z-10 flex h-7 w-7 items-center justify-center p-1\",\n {\n \"neeto-ui-text-primary-600 neeto-ui-bg-primary-100\": unread,\n }\n )}\n >\n {icon}\n {unread && (\n <span className=\"neeto-ui-rounded-full neeto-ui-bg-primary-800 absolute -end-0.5 -top-0.5 h-2 w-2\" />\n )}\n </span>\n </div>\n);\n\nexport default ActivityIcon;\n","import classNames from \"classnames\";\nimport { Avatar } from \"neetoui\";\nimport PropTypes from \"prop-types\";\n\nimport ActivityIcon from \"./Icon\";\n\nconst Activity = ({\n user,\n icon,\n unread = false,\n className,\n children,\n userIcon,\n}) => (\n <div\n className={classNames(\n \"neeto-molecules-engagements-node relative -mt-4 flex items-center gap-2 px-4 py-4\",\n className\n )}\n >\n <ActivityIcon {...{ icon, unread }} />\n {userIcon || (\n <Avatar\n size=\"small\"\n user={{ name: user.name, imageUrl: user.profileImageUrl }}\n />\n )}\n <div className=\"neeto-molecules-engagements-node__children\">{children}</div>\n </div>\n);\n\nActivity.propTypes = {\n /** Object representing the user information */\n user: PropTypes.shape({ name: PropTypes.string.isRequired }).isRequired,\n\n /** Element to render as the icon */\n icon: PropTypes.oneOfType([PropTypes.string, PropTypes.object]).isRequired,\n\n /** Boolean indicating if the activity is unread to show unread badge */\n unread: PropTypes.bool,\n\n /** Additional classes passed on to the board view. */\n className: PropTypes.string,\n};\n\nexport default Activity;\n","import { isPresent } from \"neetocist\";\nimport { Avatar, Typography } from \"neetoui\";\n\nimport DateFormat from \"components/DateFormat\";\nimport MoreDropdown from \"components/MoreDropdown\";\n\nconst CommentHeader = ({ user, comment, info, actions }) => {\n const avatar = { name: user.name, imageUrl: user.profileImageUrl };\n\n return (\n <div className=\"neeto-ui-bg-gray-100 neeto-ui-border-gray-300 flex items-center justify-between rounded-t-md border-b py-1 pe-1 ps-4\">\n <div className=\"flex min-w-0 flex-grow flex-wrap items-center gap-2\">\n <Avatar size=\"medium\" user={avatar} />\n <Typography\n className=\"neeto-ui-text-gray-700\"\n style=\"body2\"\n weight=\"semibold\"\n >\n {user.name}\n </Typography>\n <Typography className=\"neeto-ui-text-gray-700\" style=\"body2\">\n •\n </Typography>\n {info && (\n <>\n <Typography\n className=\"neeto-ui-text-gray-500 lowercase\"\n style=\"body2\"\n >\n {info}\n </Typography>\n <Typography className=\"neeto-ui-text-gray-700\" style=\"body2\">\n •\n </Typography>\n </>\n )}\n {comment.createdAt && (\n <DateFormat.FromNow\n date={comment.createdAt}\n typographyProps={{\n style: \"body2\",\n className: \"neeto-ui-text-gray-500\",\n }}\n />\n )}\n </div>\n {isPresent(actions) && (\n <MoreDropdown\n dropdownButtonProps={{ className: \"self-start fles-shrink-0\" }}\n dropdownProps={{ position: \"bottom-start\" }}\n menuItems={actions}\n />\n )}\n </div>\n );\n};\n\nexport default CommentHeader;\n","import { memo } from \"react\";\n\nimport classNames from \"classnames\";\nimport { findIndexBy } from \"neetocist\";\nimport { globalProps } from \"neetocommons/initializers\";\nimport { Tooltip, Typography } from \"neetoui\";\nimport { collectBy, eqProps, pathEq, pluck, prop } from \"ramda\";\nimport { useTranslation } from \"react-i18next\";\n\nimport EmojiPicker from \"components/EmojiPicker\";\n\nconst findOwnIndex = findIndexBy({ userId: globalProps.user.id });\nconst groupReactions = collectBy(prop(\"unified\"));\n\nconst Reactions = ({ reactions, onAdd, onRemove }) => {\n const { t } = useTranslation();\n const groups = groupReactions(reactions);\n\n const onSelect = emoji => {\n // Try to find group to which emoji belongs in existing reactions.\n const group = groups.find(pathEq(emoji.unified, [0, \"unified\"]));\n if (group && findOwnIndex(group) >= 0) return; // User already reacted with same emoji.\n onAdd({ ...emoji, emoji: emoji.native });\n };\n\n return (\n <div className=\"mt-2 flex flex-wrap gap-0.5\">\n <div className=\"neeto-ui-rounded-full neeto-ui-bg-gray-200 me-2\">\n <EmojiPicker {...{ onSelect }} />\n </div>\n {groups.map(reactions => {\n const ownIndex = findOwnIndex(reactions);\n const selected = ownIndex >= 0;\n const reaction = selected ? reactions[ownIndex] : reactions[0];\n const names = pluck(\"reactor\", reactions).join(\", \");\n\n return (\n <Tooltip\n key={reaction.unified}\n position=\"top\"\n content={\n <p className=\"text-center text-xs\">\n {t(\"neetoMolecules.engagements.namesReacted\", { names })}\n </p>\n }\n >\n <div\n className={classNames(\n \"neeto-ui-rounded-full mx-1 flex cursor-pointer items-center justify-center px-2 py-1\",\n {\n \"neeto-ui-bg-accent-100\": selected,\n \"neeto-ui-bg-gray-100\": !selected,\n }\n )}\n onClick={() => (selected ? onRemove : onAdd)(reaction)}\n >\n <Typography\n className=\"flex items-center gap-x-1 text-sm\"\n style=\"body2\"\n >\n <span className=\"text-sm\">{reaction.emoji}</span>\n <span className=\"text-sm\">{reactions.length}</span>\n </Typography>\n </div>\n </Tooltip>\n );\n })}\n </div>\n );\n};\n\nexport default memo(Reactions, eqProps(\"reactions\"));\n","export const ACTIVITY_TYPES = {\n TIMELINE: \"Timeline\",\n FIELD_VALUE: \"FieldValue\",\n TASK: \"Task\",\n ASSIGNEE: \"Assignee\",\n CHECKLIST: \"Checklist\",\n FIELD: \"Field\",\n PROJECT: \"Project\",\n COMMENT: \"Comment\",\n DOCUMENT: \"Document\",\n CHAT_MESSAGE: \"ChatMessage\",\n MESSAGE: \"Message\",\n SECTION: \"Section\",\n PROJECT_MEMBER: \"ProjectMember\",\n PULL_REQUEST: \"NeetoGithubEngine::PullRequest\",\n};\n\nexport const ENGAGEMENT_TYPES = {\n COMMENT: \"comment\",\n ACTIVITY: \"activity\",\n};\n","import { ENGAGEMENT_TYPES } from \"./constants\";\n\nexport const createCommentElementId = comment =>\n `neeto-molecules-engagement-comment--${comment.id}`;\n\nexport const defaultMatchType = engagement => {\n if (engagement.commenter) return ENGAGEMENT_TYPES.COMMENT;\n else if (engagement.creator) return ENGAGEMENT_TYPES.ACTIVITY;\n\n return null;\n};\n","import { forwardRef } from \"react\";\n\nimport classNames from \"classnames\";\nimport PropTypes from \"prop-types\";\n\nimport CommentHeader from \"./Header\";\nimport Reactions from \"./Reactions\";\n\nimport { createCommentElementId } from \"../utils\";\n\nconst Comment = forwardRef(\n (\n {\n user,\n comment,\n reactions,\n info,\n actions,\n className,\n children,\n onAddReaction,\n onRemoveReaction,\n },\n ref\n ) => (\n <div\n {...{ ref }}\n id={createCommentElementId(comment)}\n className={classNames(\n \"neeto-ui-bg-white neeto-ui-rounded-md neeto-ui-border-gray-300 neeto-molecules-comments-node mb-4 w-full border\",\n className\n )}\n >\n <CommentHeader {...{ actions, comment, info, user }} />\n <div className=\"neeto-molecules-comments-node__inner p-4\">\n {children}\n {reactions !== false && (\n <Reactions\n {...{ reactions }}\n onAdd={onAddReaction}\n onRemove={onRemoveReaction}\n />\n )}\n </div>\n </div>\n )\n);\n\nComment.displayName = \"Comment\";\nComment.propTypes = {\n /** Object representing the user information */\n user: PropTypes.shape({ name: PropTypes.string.isRequired }).isRequired,\n\n /** Object representing the comment item. */\n comment: PropTypes.shape({\n id: PropTypes.string.isRequired,\n createdAt: PropTypes.string.isRequired,\n }).isRequired,\n\n /** Array of reactions. Settings this to `false` will disable reactions for the item */\n reactions: PropTypes.oneOfType([PropTypes.array, PropTypes.bool]),\n\n /** Optional text label to be displayed in the header. */\n info: PropTypes.string,\n\n /** Optional action items to be passed to the menuItems prop of the actions dropdown */\n actions: PropTypes.arrayOf(\n PropTypes.shape({\n isVisible: PropTypes.bool,\n key: PropTypes.string.isRequired,\n label: PropTypes.string.isRequired,\n onClick: PropTypes.func.isRequired,\n })\n ),\n\n /** Additional classes passed on to the board view. */\n className: PropTypes.string,\n\n /** Callback function triggered when a reaction (emoji) is added */\n onAddReaction: PropTypes.func,\n\n /** Callback function triggered when a reaction (emoji) is removed*/\n onRemoveReaction: PropTypes.func,\n};\n\nexport default Comment;\n","import React from \"react\";\n\nimport { noop } from \"neetocist\";\nimport PropTypes from \"prop-types\";\n\nimport Activity from \"./Activity\";\nimport Comment from \"./Comment\";\nimport { ENGAGEMENT_TYPES } from \"./constants\";\nimport \"./engagements.scss\";\nimport { defaultMatchType } from \"./utils\";\n\nconst Engagements = ({\n data,\n isActivitiesEnabled = false,\n matchType = defaultMatchType,\n renderComment,\n renderActivity,\n}) => {\n const rendererHashmap = {\n [ENGAGEMENT_TYPES.COMMENT]: renderComment,\n [ENGAGEMENT_TYPES.ACTIVITY]: isActivitiesEnabled ? renderActivity : noop,\n };\n\n return (\n <>\n {data.map((engagement, index) => {\n const type = matchType(engagement);\n const renderer = rendererHashmap[type];\n if (!renderer) return null;\n\n return (\n <React.Fragment key={engagement.id}>\n {renderer(engagement, index)}\n </React.Fragment>\n );\n })}\n </>\n );\n};\n\nEngagements.displayName = \"Engagements\";\nEngagements.Comment = Comment;\nEngagements.Activity = Activity;\nEngagements.TYPES = ENGAGEMENT_TYPES;\n\nEngagements.propTypes = {\n /** An array of engagement items */\n data: PropTypes.arrayOf(PropTypes.shape({ id: PropTypes.string.isRequired }))\n .isRequired,\n\n /** Boolean, determines whether activities are rendered. Defaults to false */\n isActivitiesEnabled: PropTypes.bool,\n\n /** Optional function to match the item type. Receives item as argument and should return one of Engagements.TYPES.*/\n matchType: PropTypes.func,\n\n /** A function to render individual comment item. Receives comment and index as arguments */\n renderComment: PropTypes.func.isRequired,\n\n /** A function to render individual activity item. Receives comment and index as arguments */\n renderActivity: PropTypes.func.isRequired,\n};\n\nexport default Engagements;\n"],"names":["ActivityIcon","_ref","icon","unread","_jsx","className","children","_jsxs","classNames","Activity","user","_ref$unread","userIcon","Avatar","size","name","imageUrl","profileImageUrl","CommentHeader","comment","info","actions","avatar","Typography","style","weight","_Fragment","createdAt","DateFormat","FromNow","date","typographyProps","isPresent","MoreDropdown","dropdownButtonProps","dropdownProps","position","menuItems","findOwnIndex","findIndexBy","userId","globalProps","id","groupReactions","collectBy","prop","Reactions","reactions","onAdd","onRemove","_useTranslation","useTranslation","t","groups","onSelect","emoji","group","find","pathEq","unified","_objectSpread","EmojiPicker","map","ownIndex","selected","reaction","names","pluck","join","Tooltip","content","onClick","length","memo","eqProps","ENGAGEMENT_TYPES","COMMENT","ACTIVITY","createCommentElementId","concat","defaultMatchType","engagement","commenter","creator","Comment","forwardRef","ref","onAddReaction","onRemoveReaction","displayName","propTypes","PropTypes","shape","string","isRequired","oneOfType","array","bool","arrayOf","isVisible","key","label","func","Engagements","data","_ref$isActivitiesEnab","isActivitiesEnabled","_ref$matchType","matchType","renderComment","renderActivity","rendererHashmap","_defineProperty","noop","index","type","renderer","React","Fragment","TYPES"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,IAAMA,YAAY,GAAG,SAAfA,YAAYA,CAAAC,IAAA,EAAA;AAAA,EAAA,IAAMC,IAAI,GAAAD,IAAA,CAAJC,IAAI;IAAEC,MAAM,GAAAF,IAAA,CAANE,MAAM;AAAA,EAAA,oBAClCC,GAAA,CAAA,KAAA,EAAA;AAAKC,IAAAA,SAAS,EAAC,sBAAsB;AAAAC,IAAAA,QAAA,eACnCC,IAAA,CAAA,MAAA,EAAA;AACEF,MAAAA,SAAS,EAAEG,UAAU,CACnB,iKAAiK,EACjK;AACE,QAAA,mDAAmD,EAAEL;AACvD,OACF,CAAE;AAAAG,MAAAA,QAAA,EAAA,CAEDJ,IAAI,EACJC,MAAM,iBACLC,GAAA,CAAA,MAAA,EAAA;AAAMC,QAAAA,SAAS,EAAC;AAAkF,OAAE,CACrG;KACG;AAAC,GACJ,CAAC;AAAA,CACP;;ACZD,IAAMI,QAAQ,GAAG,SAAXA,QAAQA,CAAAR,IAAA,EAAA;AAAA,EAAA,IACZS,IAAI,GAAAT,IAAA,CAAJS,IAAI;IACJR,IAAI,GAAAD,IAAA,CAAJC,IAAI;IAAAS,WAAA,GAAAV,IAAA,CACJE,MAAM;AAANA,IAAAA,MAAM,GAAAQ,WAAA,KAAA,MAAA,GAAG,KAAK,GAAAA,WAAA;IACdN,SAAS,GAAAJ,IAAA,CAATI,SAAS;IACTC,QAAQ,GAAAL,IAAA,CAARK,QAAQ;IACRM,QAAQ,GAAAX,IAAA,CAARW,QAAQ;AAAA,EAAA,oBAERL,IA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MAAA,IAAMC,IAAI,GAAGP,SAAS,CAAC3B,UAAU,CAAC;AAClC,MAAA,IAAMmC,QAAQ,GAAGL,eAAe,CAACI,IAAI,CAAC;AACtC,MAAA,IAAI,CAACC,QAAQ,EAAE,OAAO,IAAI;AAE1B,MAAA,oBACEhH,GAAA,CAACiH,cAAK,CAACC,QAAQ,EAAA;AAAAhH,QAAAA,QAAA,EACZ8G,QAAQ,CAACnC,UAAU,EAAEiC,KAAK;OAAC,EADTjC,UAAU,CAACvC,EAEhB,CAAC;IAErB,CAAC;AAAC,GACF,CAAC;AAEP;AAEA6D,WAAW,CAACd,WAAW,GAAG,aAAa;AACvCc,WAAW,CAACnB,OAAO,GAAGA,OAAO;AAC7BmB,WAAW,CAAC9F,QAAQ,GAAGA,QAAQ;AAC/B8F,WAAW,CAACgB,KAAK,GAAG5C,gBAAgB;;;;"}
@@ -201,7 +201,7 @@ var ErrorMessages = function ErrorMessages(_ref) {
201
201
  });
202
202
  };
203
203
 
204
- var css = ".neeto-ui-theme--dark,.neeto-ui-theme--light,:root{--neeto-molecules-file-upload-dropzone-color:var(--neeto-ui-gray-800),1;--neeto-molecules-file-upload-dropzone-help-text-color:var(--neeto-ui-gray-700),1;--neeto-molecules-file-upload-dropzone-icon-color:var(--neeto-ui-primary-500),1;--neeto-molecules-file-upload-dropzone-background-color:var(--neeto-ui-white),1;--neeto-molecules-file-upload-dropzone-hover-background-color:var(--neeto-ui-gray-100,1);--neeto-molecules-file-upload-dropzone-border-color:var(--neeto-ui-gray-400),1;--neeto-molecules-file-upload-border-radius:var(--neeto-ui-rounded-md);--neeto-molecules-file-upload-transition:var(--neeto-ui-transition);--neeto-molecules-file-upload-list-item-border-color:var(--neeto-ui-gray-400),1;--neeto-molecules-file-upload-list-item-background-color:var(--neeto-ui-white),1;--neeto-molecules-file-upload-preview-icon-color:var(--neeto-ui-gray-400),1;--neeto-molecules-file-upload-progress-ring-background-color:var(--neeto-ui-primary-500),1;--neeto-molecules-file-upload-success-background-color:var(--neeto-ui-primary-500),1;--neeto-molecules-file-upload-success-color:var(--neeto-ui-white),1;--neeto-molecules-file-upload-cancel-background-color:var(--neeto-ui-error-500),1;--neeto-molecules-file-upload-cancel-color:var(--neeto-ui-white),1;--neeto-molecules-file-upload-error-color:var(--neeto-ui-error-500),1;--neeto-molecules-file-upload-error-background-color:var(--neeto-ui-white),1}.neeto-molecules-file-upload__dropzone{background-color:rgba(var(--neeto-molecules-file-upload-dropzone-background-color));border:2px dashed rgba(var(--neeto-molecules-file-upload-dropzone-border-color));border-radius:var(--neeto-molecules-file-upload-border-radius);color:rgba(var(--neeto-molecules-file-upload-dropzone-color));padding:1.5em;transition:var(--neeto-molecules-file-upload-transition)}.neeto-molecules-file-upload__dropzone:hover{background-color:rgba(var(--neeto-molecules-file-upload-dropzone-hover-background-color))}.neeto-molecules-file-upload__dropzone-inner{text-align:center}.neeto-molecules-file-upload__upload-icon{color:rgba(var(--neeto-molecules-file-upload-dropzone-icon-color));display:block;margin-bottom:1.25em;margin-left:auto;margin-right:auto}.neeto-molecules-file-upload__upload-label{display:flex;font-size:1rem;gap:.3125em;justify-content:center}.neeto-molecules-file-upload__choose-file{font-weight:500}.neeto-molecules-file-upload__dropzone-helper-block{margin-top:.5em}.neeto-molecules-file-upload__dropzone-helper-text{color:rgba(var(--neeto-molecules-file-upload-dropzone-help-text-color));display:block;font-size:.75rem;line-height:1.2;margin-bottom:.5rem}.neeto-molecules-file-upload__uploaded-list{list-style:none;margin:1.25em 0;padding:0}.neeto-molecules-file-upload__uploaded-list-item{align-items:center;background-color:rgba(var(--neeto-molecules-file-upload-list-item-background-color));border:1px solid rgba(var(--neeto-molecules-file-upload-list-item-border-color));display:flex;gap:.75em;list-style:none;margin-bottom:-.0625rem;padding:.5em .75em}.neeto-molecules-file-upload__uploaded-list-item:first-of-type{border-top-left-radius:var(--neeto-molecules-file-upload-border-radius);border-top-right-radius:var(--neeto-molecules-file-upload-border-radius)}.neeto-molecules-file-upload__uploaded-list-item:last-of-type{border-bottom-left-radius:var(--neeto-molecules-file-upload-border-radius);border-bottom-right-radius:var(--neeto-molecules-file-upload-border-radius)}.neeto-molecules-file-upload__file-preview{color:rgba(var(--neeto-molecules-file-upload-preview-icon-color));position:relative}.neeto-molecules-file-upload__file-preview .neeto-molecules-progress{align-items:center;display:flex;height:100%;justify-content:center;left:0;position:absolute;top:0;width:100%}.neeto-molecules-file-upload__file-preview .neeto-molecules-progress__circle-wrapper{color:rgba(var(--neeto-molecules-file-upload-progress-ring-background-color));position:relative}.neeto-molecules-file-upload__file-info{word-wrap:break-word;display:flex;flex-direction:column;flex-grow:1;min-width:0;overflow-wrap:break-word}.neeto-molecules-file-upload__file-info-name{font-size:.875em;margin-bottom:.3125em}.neeto-molecules-file-upload__file-info-size{color:rgba(var(--neeto-molecules-file-upload-dropzone-help-text-color));font-size:.75em}.neeto-molecules-file-upload__actions{flex-shrink:0;margin-left:auto;position:relative}.neeto-molecules-file-upload__success-indicator{align-items:center;border-radius:100%;display:inline-flex;height:1.75em;justify-content:center;width:1.75em}.neeto-molecules-file-upload__success-indicator.neeto-molecules-file-upload__success-indicator--active{background-color:rgba(var(--neeto-molecules-file-upload-success-background-color));color:rgba(var(--neeto-molecules-file-upload-success-color))}.neeto-molecules-file-upload__button--red{align-items:center;background-color:rgba(var(--neeto-molecules-file-upload-cancel-background-color));border-radius:100%;color:rgba(var(--neeto-molecules-file-upload-cancel-color));display:inline-flex;height:1.75em;justify-content:center;width:1.75em}.neeto-molecules-file-upload__remove-button{left:0;opacity:0;position:absolute;top:0;transition:var(--neeto-molecules-file-upload-transition);visibility:hidden}.neeto-molecules-file-upload__actions:hover .neeto-molecules-file-upload__remove-button{opacity:1;visibility:visible}.neeto-molecules-invisible{visibility:hidden}.neeto-molecules-input__error-text{font-size:.875rem;line-height:1.2;margin-top:.5em}.neeto-molecules-input__error-text-style-handle{background-color:rgba(var(--neeto-molecules-file-upload-error-background-color));border-radius:.1875rem;color:rgba(var(--neeto-molecules-file-upload-error-color));display:inline-block;font-size:.875rem;line-height:1.2;padding:.1875rem .375rem}";
204
+ var css = ".neeto-ui-theme--dark,.neeto-ui-theme--light,:root{--neeto-molecules-file-upload-dropzone-color:var(--neeto-ui-gray-800),1;--neeto-molecules-file-upload-dropzone-help-text-color:var(--neeto-ui-gray-700),1;--neeto-molecules-file-upload-dropzone-icon-color:var(--neeto-ui-primary-500),1;--neeto-molecules-file-upload-dropzone-background-color:var(--neeto-ui-white),1;--neeto-molecules-file-upload-dropzone-hover-background-color:var(--neeto-ui-gray-100,1);--neeto-molecules-file-upload-dropzone-border-color:var(--neeto-ui-gray-400),1;--neeto-molecules-file-upload-border-radius:var(--neeto-ui-rounded-md);--neeto-molecules-file-upload-transition:var(--neeto-ui-transition);--neeto-molecules-file-upload-list-item-border-color:var(--neeto-ui-gray-400),1;--neeto-molecules-file-upload-list-item-background-color:var(--neeto-ui-white),1;--neeto-molecules-file-upload-preview-icon-color:var(--neeto-ui-gray-400),1;--neeto-molecules-file-upload-progress-ring-background-color:var(--neeto-ui-primary-500),1;--neeto-molecules-file-upload-success-background-color:var(--neeto-ui-primary-500),1;--neeto-molecules-file-upload-success-color:var(--neeto-ui-white),1;--neeto-molecules-file-upload-cancel-background-color:var(--neeto-ui-error-500),1;--neeto-molecules-file-upload-cancel-color:var(--neeto-ui-white),1;--neeto-molecules-file-upload-error-color:var(--neeto-ui-error-500),1;--neeto-molecules-file-upload-error-background-color:var(--neeto-ui-white),1}.neeto-molecules-file-upload__dropzone{background-color:rgba(var(--neeto-molecules-file-upload-dropzone-background-color));border:2px dashed rgba(var(--neeto-molecules-file-upload-dropzone-border-color));border-radius:var(--neeto-molecules-file-upload-border-radius);color:rgba(var(--neeto-molecules-file-upload-dropzone-color));padding:1.5em;transition:var(--neeto-molecules-file-upload-transition)}.neeto-molecules-file-upload__dropzone:hover{background-color:rgba(var(--neeto-molecules-file-upload-dropzone-hover-background-color))}.neeto-molecules-file-upload__dropzone-inner{text-align:center}.neeto-molecules-file-upload__upload-icon{color:rgba(var(--neeto-molecules-file-upload-dropzone-icon-color));display:block;margin-bottom:1.25em;margin-inline-end:auto;margin-inline-start:auto}.neeto-molecules-file-upload__upload-label{display:flex;font-size:1rem;gap:.3125em;justify-content:center}.neeto-molecules-file-upload__choose-file{font-weight:500}.neeto-molecules-file-upload__dropzone-helper-block{margin-top:.5em}.neeto-molecules-file-upload__dropzone-helper-text{color:rgba(var(--neeto-molecules-file-upload-dropzone-help-text-color));display:block;font-size:.75rem;line-height:1.2;margin-bottom:.5rem}.neeto-molecules-file-upload__uploaded-list{list-style:none;margin:1.25em 0;padding:0}.neeto-molecules-file-upload__uploaded-list-item{align-items:center;background-color:rgba(var(--neeto-molecules-file-upload-list-item-background-color));border:1px solid rgba(var(--neeto-molecules-file-upload-list-item-border-color));display:flex;gap:.75em;list-style:none;margin-bottom:-.0625rem;padding:.5em .75em}.neeto-molecules-file-upload__uploaded-list-item:first-of-type{border-start-end-radius:var(--neeto-molecules-file-upload-border-radius);border-start-start-radius:var(--neeto-molecules-file-upload-border-radius)}.neeto-molecules-file-upload__uploaded-list-item:last-of-type{border-end-end-radius:var(--neeto-molecules-file-upload-border-radius);border-end-start-radius:var(--neeto-molecules-file-upload-border-radius)}.neeto-molecules-file-upload__file-preview{color:rgba(var(--neeto-molecules-file-upload-preview-icon-color));position:relative}.neeto-molecules-file-upload__file-preview .neeto-molecules-progress{align-items:center;display:flex;height:100%;inset-inline-start:0;justify-content:center;position:absolute;top:0;width:100%}.neeto-molecules-file-upload__file-preview .neeto-molecules-progress__circle-wrapper{color:rgba(var(--neeto-molecules-file-upload-progress-ring-background-color));position:relative}.neeto-molecules-file-upload__file-info{word-wrap:break-word;display:flex;flex-direction:column;flex-grow:1;min-width:0;overflow-wrap:break-word}.neeto-molecules-file-upload__file-info-name{font-size:.875em;margin-bottom:.3125em}.neeto-molecules-file-upload__file-info-size{color:rgba(var(--neeto-molecules-file-upload-dropzone-help-text-color));font-size:.75em}.neeto-molecules-file-upload__actions{flex-shrink:0;margin-inline-start:auto;position:relative}.neeto-molecules-file-upload__success-indicator{align-items:center;border-radius:100%;display:inline-flex;height:1.75em;justify-content:center;width:1.75em}.neeto-molecules-file-upload__success-indicator.neeto-molecules-file-upload__success-indicator--active{background-color:rgba(var(--neeto-molecules-file-upload-success-background-color));color:rgba(var(--neeto-molecules-file-upload-success-color))}.neeto-molecules-file-upload__button--red{align-items:center;background-color:rgba(var(--neeto-molecules-file-upload-cancel-background-color));border-radius:100%;color:rgba(var(--neeto-molecules-file-upload-cancel-color));display:inline-flex;height:1.75em;justify-content:center;width:1.75em}.neeto-molecules-file-upload__remove-button{inset-inline-start:0;opacity:0;position:absolute;top:0;transition:var(--neeto-molecules-file-upload-transition);visibility:hidden}.neeto-molecules-file-upload__actions:hover .neeto-molecules-file-upload__remove-button{opacity:1;visibility:visible}.neeto-molecules-invisible{visibility:hidden}.neeto-molecules-input__error-text{font-size:.875rem;line-height:1.2;margin-top:.5em}.neeto-molecules-input__error-text-style-handle{background-color:rgba(var(--neeto-molecules-file-upload-error-background-color));border-radius:.1875rem;color:rgba(var(--neeto-molecules-file-upload-error-color));display:inline-block;font-size:.875rem;line-height:1.2;padding:.1875rem .375rem}";
205
205
  n(css,{});
206
206
 
207
207
  var Progress = function Progress(_ref) {
@@ -146,7 +146,7 @@ var ModalBody = function ModalBody(_ref) {
146
146
  });
147
147
  };
148
148
 
149
- var css = ".neeto-molecules-finder-modal__search .neeto-ui-input--naked input{padding-left:4px}.neeto-molecules-finder-modal-backdrop{grid-template-columns:100%}.neeto-molecules-finder-modal-backdrop .neeto-ui-modal__wrapper.neeto-molecules-finder-modal{margin-left:auto;margin-right:auto;max-width:740px;width:100%}.neeto-molecules-finder-matched-tag{background-color:#fbe48f!important}.neeto-molecules-finder-modal__footer{--neeto-ui-modal-footer-bg:rgb(var(--neeto-ui-white))}";
149
+ var css = ".neeto-molecules-finder-modal__search .neeto-ui-input--naked input{padding-inline-start:4px}.neeto-molecules-finder-modal-backdrop{grid-template-columns:100%}.neeto-molecules-finder-modal-backdrop .neeto-ui-modal__wrapper.neeto-molecules-finder-modal{margin-inline-end:auto;margin-inline-start:auto;max-width:740px;width:100%}.neeto-molecules-finder-matched-tag{background-color:#fbe48f!important}.neeto-molecules-finder-modal__footer{--neeto-ui-modal-footer-bg:rgb(var(--neeto-ui-white))}";
150
150
  n(css,{});
151
151
 
152
152
  var ModalFooter = function ModalFooter(_ref) {
@@ -219,14 +219,14 @@ var ModalHeader = withT(function (_ref) {
219
219
  name: "term",
220
220
  placeholder: t("neetoMolecules.common.actions.search"),
221
221
  suffix: /*#__PURE__*/jsxs("div", {
222
- className: "ml-3 flex items-center",
222
+ className: "ms-3 flex items-center",
223
223
  children: [/*#__PURE__*/jsx("div", {
224
224
  className: "h-4 w-4 flex-shrink-0",
225
225
  children: loading && /*#__PURE__*/jsx(Spinner, {
226
226
  size: "small"
227
227
  })
228
228
  }), enableAdvancedSearch && /*#__PURE__*/jsx(Button, {
229
- className: "ml-3 whitespace-nowrap",
229
+ className: "ms-3 whitespace-nowrap",
230
230
  label: t("neetoMolecules.finderModal.advancedSearch"),
231
231
  size: "small",
232
232
  style: "secondary",