@reltio/components 1.4.701 → 1.4.705

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 (713) hide show
  1. package/HOCs/index.js +10 -0
  2. package/HOCs/withAsyncMount/withAsyncMount.js +44 -0
  3. package/HOCs/withTooltip/propTypes.js +11 -0
  4. package/HOCs/withTooltip/withTooltip.js +71 -0
  5. package/components/ArrowExpandButton/ArrowExpandButton.js +39 -0
  6. package/components/ArrowExpandButton/styles.js +17 -0
  7. package/components/AttributeListItem/AttrTypeIcon.js +29 -0
  8. package/components/AttributeListItem/AttributeListItem.js +70 -0
  9. package/components/AttributeListItem/styles.js +97 -0
  10. package/components/AutoSizeList/AutoSizeList.js +70 -0
  11. package/components/AvatarWithFallback/AvatarWithFallback.js +79 -0
  12. package/components/BasicTableView/BasicTable/BasicTable.js +106 -0
  13. package/components/BasicTableView/BasicTable/HOCs/withFilter.js +38 -0
  14. package/components/BasicTableView/BasicTable/HOCs/withFilterAtBottom.js +43 -0
  15. package/components/BasicTableView/BasicTable/HOCs/withTableContext.js +47 -0
  16. package/components/BasicTableView/BasicTable/cell-value-renderers/BlobRenderer.js +20 -0
  17. package/components/BasicTableView/BasicTable/cell-value-renderers/DefaultCellValueRenderer.js +43 -0
  18. package/components/BasicTableView/BasicTable/cell-value-renderers/index.js +8 -0
  19. package/components/BasicTableView/BasicTable/cell-value-renderers/styles.js +22 -0
  20. package/components/BasicTableView/BasicTable/contexts/RowCollapseContext.js +9 -0
  21. package/components/BasicTableView/BasicTable/contexts/TableContext.js +9 -0
  22. package/components/BasicTableView/BasicTable/contexts/index.js +5 -0
  23. package/components/BasicTableView/BasicTable/helpers/dataHelpers.js +122 -0
  24. package/components/BasicTableView/BasicTable/helpers/defaultGetRowCellHeight.js +20 -0
  25. package/components/BasicTableView/BasicTable/helpers/defaultRenderRowCell.js +33 -0
  26. package/components/BasicTableView/BasicTable/helpers/nestedHelpers.js +80 -0
  27. package/components/BasicTableView/BasicTable/hooks/index.js +10 -0
  28. package/components/BasicTableView/BasicTable/hooks/useBasicTableCellRenderer.js +94 -0
  29. package/components/BasicTableView/BasicTable/hooks/useCollapsibleTableRows.js +43 -0
  30. package/components/BasicTableView/BasicTable/hooks/useDynamicRowCellHeight.js +37 -0
  31. package/components/BasicTableView/BasicTableHeader/ColumnsSettings/ColumnListItem.js +30 -0
  32. package/components/BasicTableView/BasicTableHeader/ColumnsSettings/ColumnsSettings.js +91 -0
  33. package/components/BasicTableView/BasicTableHeader/ColumnsSettings/columnHelpers.js +86 -0
  34. package/components/BasicTableView/BasicTableHeader/ColumnsSettings/styles.js +12 -0
  35. package/components/BasicTableView/BasicTableHeader/FilterButton/FilterButton.js +26 -0
  36. package/components/BasicTableView/BasicTableHeader/FilterButton/styles.js +18 -0
  37. package/components/BasicTableView/BasicTablePagination/BasicTablePagination.js +80 -0
  38. package/components/BasicTableView/BasicTablePagination/styles.js +32 -0
  39. package/components/BasicTableView/CollapseRowButton/CollapseRowButton.js +48 -0
  40. package/components/BasicTableView/CollapseRowButton/styles.js +9 -0
  41. package/components/BasicTableView/ColumnFilter/ColumnFilter.js +113 -0
  42. package/components/BasicTableView/ColumnFilter/FilterChip/FilterChip.js +40 -0
  43. package/components/BasicTableView/ColumnFilter/FilterChip/styles.js +27 -0
  44. package/components/BasicTableView/ColumnFilter/helpers.js +18 -0
  45. package/components/BasicTableView/ColumnFilter/styles.js +30 -0
  46. package/components/BasicTableView/RowCellAutoSizer/RowCellAutoSizer.js +56 -0
  47. package/components/BasicTableView/index.js +45 -0
  48. package/components/BasicTableView/viewState/basicTableViewState.js +82 -0
  49. package/components/BasicView/BasicView.js +61 -0
  50. package/components/BasicView/styles.js +13 -0
  51. package/components/BasicViewContent/BasicViewContent.js +36 -0
  52. package/components/BasicViewContent/styles.js +13 -0
  53. package/components/BasicViewHeader/BasicViewHeader.js +39 -0
  54. package/components/BasicViewHeader/styles.js +19 -0
  55. package/components/ClickAwayProvider/ClickAwayProvider.js +22 -0
  56. package/components/CollaborationItem/Avatar/Avatar.js +39 -0
  57. package/components/CollaborationItem/Avatar/styles.js +13 -0
  58. package/components/CollaborationItem/CollaborationItem.js +48 -0
  59. package/components/CollaborationItem/Comment/Comment.js +78 -0
  60. package/components/CollaborationItem/Comment/styles.js +51 -0
  61. package/components/CollaborationItem/CommentContent/CommentContent.js +42 -0
  62. package/components/CollaborationItem/CommentContent/styles.js +12 -0
  63. package/components/CollaborationItem/CommentTarget/CommentTarget.js +98 -0
  64. package/components/CollaborationItem/CommentTarget/styles.js +23 -0
  65. package/components/CollaborationItem/RepliedComment/RepliedComment.js +30 -0
  66. package/components/CollaborationItem/RepliedComment/styles.js +44 -0
  67. package/components/CollaborationItem/SendMessageArea/SendMessageArea.js +113 -0
  68. package/components/CollaborationItem/SendMessageArea/styles.js +33 -0
  69. package/components/CollaborationItem/TextFieldWithMentions/TextFieldWithMentions.js +70 -0
  70. package/components/CollaborationItem/TextFieldWithMentions/styles.js +54 -0
  71. package/components/CollaborationItem/styles.js +21 -0
  72. package/components/CollaborationItem/utils/index.js +53 -0
  73. package/components/CollaborationPopup/CollaborationPopup.js +68 -0
  74. package/components/CollaborationPopup/styles.js +69 -0
  75. package/components/CollapseButton/CollapseButton.js +47 -0
  76. package/components/CollapseButton/styles.js +12 -0
  77. package/components/ColorBar/ColorBar.js +38 -0
  78. package/components/ColorBar/styles.js +17 -0
  79. package/components/CommentsContainer/CommentsContainer.js +70 -0
  80. package/components/CommentsContainer/buttons/AddCommentButton.js +19 -0
  81. package/components/CommentsContainer/buttons/CommentButton.js +20 -0
  82. package/components/CommentsContainer/buttons/styles.js +36 -0
  83. package/components/CommentsContainer/styles.js +25 -0
  84. package/components/ConfigureColumnsPopup/ConfigureColumnsPopup.js +132 -0
  85. package/components/ConfigureColumnsPopup/styles.js +13 -0
  86. package/components/ConfirmationDialog/ConfirmationDialog.js +28 -0
  87. package/components/ConfirmationDialog/styles.js +40 -0
  88. package/components/ConnectionRelationTypeSelector/ConnectionRelationTypeSelector.js +83 -0
  89. package/components/DataTypeValue/DataTypeValue.js +28 -0
  90. package/components/DateRangePicker/DateRangePicker.js +87 -0
  91. package/components/DateRangePicker/styles.js +43 -0
  92. package/components/Drawer/Drawer.js +72 -0
  93. package/components/DropDownMenuButton/DropDownMenuButton.js +74 -0
  94. package/components/DropDownMenuButton/MenuItemRenderer.js +44 -0
  95. package/components/DropDownMenuButton/styles.js +28 -0
  96. package/components/DropDownSelector/DropDownSelector.js +97 -0
  97. package/components/DropDownSelector/components/Menu.js +36 -0
  98. package/components/DropDownSelector/components/SingleValue.js +30 -0
  99. package/components/DropDownSelector/components/styles.js +36 -0
  100. package/components/DropDownSelector/styles.js +69 -0
  101. package/components/EmptySearchResult/NoData.js +25 -0
  102. package/components/EmptySearchResult/NoMessageComponent.js +39 -0
  103. package/components/EmptySearchResult/NoResults.js +24 -0
  104. package/components/EmptySearchResult/index.js +7 -0
  105. package/components/EmptySearchResult/styles.js +26 -0
  106. package/components/EmptyState/EmptyState.js +36 -0
  107. package/components/EmptyState/styles.js +68 -0
  108. package/components/EntityAvatar/EntityAvatar.js +26 -0
  109. package/components/EntityAvatar/no-photo.svg.js +4 -0
  110. package/components/EntityTypeBadge/EntityTypeBadge.js +25 -0
  111. package/components/EntityTypeBadge/styles.js +23 -0
  112. package/components/EntityTypeIcon/EntityTypeIcon.js +26 -0
  113. package/components/EntityTypesSelector/EntityTypesSelector.js +145 -0
  114. package/components/EntityTypesSelector/ListLabel/ListLabel.js +51 -0
  115. package/components/EntityTypesSelector/ListLabel/helpers.js +49 -0
  116. package/components/EntityTypesSelector/ListLabel/styles.js +36 -0
  117. package/components/EntityTypesSelector/SelectEntityTypesList.js +70 -0
  118. package/components/EntityTypesSelector/styles.js +72 -0
  119. package/components/EntityUriLink/EntityUriLink.js +43 -0
  120. package/components/ErrorBoundary/ErrorBoundary.js +46 -0
  121. package/components/ErrorPopup/ErrorPopup.js +32 -0
  122. package/components/ErrorPopup/styles.js +11 -0
  123. package/components/ErrorWrapper/ErrorMessage.js +17 -0
  124. package/components/ErrorWrapper/ErrorWrapper.js +62 -0
  125. package/components/ErrorWrapper/styles.js +18 -0
  126. package/components/ExpandableSearchInput/ExpandableSearchInput.js +50 -0
  127. package/components/ExpandableSearchInput/styles.js +23 -0
  128. package/components/ExpandedValueTooltip/ExpandedValueTooltip.js +88 -0
  129. package/components/FacetViewHeader/FacetViewHeader.js +15 -0
  130. package/components/FacetViewHeader/styles.js +17 -0
  131. package/components/FlipCard/FlipCard.js +41 -0
  132. package/components/FlipCard/styles.js +55 -0
  133. package/components/FlipCard/types/index.js +2 -0
  134. package/components/HideOnShrink/HideOnShrink.js +21 -0
  135. package/components/HierarchicalAttributeTooltip/HierarchicalAttributeTooltip.js +45 -0
  136. package/components/HierarchicalAttributeTooltip/styles.js +54 -0
  137. package/components/Highlighter/Highlighter.js +18 -0
  138. package/components/Highlighter/styles.js +9 -0
  139. package/components/Image/CheckedIcon/CheckedIcon.js +18 -0
  140. package/components/Image/CheckedIcon/styles.js +10 -0
  141. package/components/Image/Image.js +104 -0
  142. package/components/Image/ImageActionsOverlay/ImageActionsOverlay.js +81 -0
  143. package/components/Image/ImageActionsOverlay/styles.js +61 -0
  144. package/components/Image/styles.js +33 -0
  145. package/components/ImageAttributesGallery/GalleryView/GalleryView.js +45 -0
  146. package/components/ImageAttributesGallery/GalleryView/styles.js +14 -0
  147. package/components/ImageAttributesGallery/HeaderLeft/HeaderLeft.js +17 -0
  148. package/components/ImageAttributesGallery/HeaderLeft/styles.js +12 -0
  149. package/components/ImageAttributesGallery/HeaderRight/HeaderRight.js +26 -0
  150. package/components/ImageAttributesGallery/HeaderRight/styles.js +27 -0
  151. package/components/ImageAttributesGallery/ImageAttributesGallery.js +121 -0
  152. package/components/ImageDetailsView/ImageDetailsView.js +52 -0
  153. package/components/ImageDetailsView/ImageDetailsViewCarousel/ImageDetailsViewCarousel.js +53 -0
  154. package/components/ImageDetailsView/ImageDetailsViewCarousel/Thumbnails/Thumbnails.js +72 -0
  155. package/components/ImageDetailsView/ImageDetailsViewCarousel/Thumbnails/styles.js +26 -0
  156. package/components/ImageDetailsView/ImageDetailsViewCarousel/styles.js +47 -0
  157. package/components/ImageDetailsView/ImageDetailsViewSidebar/ImageDetailsViewSidebar.js +61 -0
  158. package/components/ImageDetailsView/ImageDetailsViewSidebar/styles.js +45 -0
  159. package/components/ImageDetailsView/MetaInfo/MetaInfo.js +29 -0
  160. package/components/ImageDetailsView/MetaInfoForm/MetaInfoForm.js +32 -0
  161. package/components/ImageDetailsView/MetaInfoForm/styles.js +24 -0
  162. package/components/ImageDetailsView/MetaInfoHeader/MetaInfoHeader.js +52 -0
  163. package/components/ImageDetailsView/MetaInfoHeader/styles.js +21 -0
  164. package/components/ImageDetailsView/MetaInfoList/MetaInfoItem/MetaInfoItem.js +17 -0
  165. package/components/ImageDetailsView/MetaInfoList/MetaInfoItem/styles.js +25 -0
  166. package/components/ImageDetailsView/MetaInfoList/MetaInfoList.js +32 -0
  167. package/components/ImageDetailsView/MetaInfoList/styles.js +17 -0
  168. package/components/ImageDetailsView/constants/index.js +42 -0
  169. package/components/ImageDetailsView/helpers/index.js +97 -0
  170. package/components/ImageDetailsView/hooks/useEditMetaInfo.js +70 -0
  171. package/components/ImageDetailsView/styles.js +18 -0
  172. package/components/ImageDetailsView/theme/index.js +12 -0
  173. package/components/ImageDetailsView/types/index.js +2 -0
  174. package/components/ImageGalleryDialog/ImageGalleryDialog.js +70 -0
  175. package/components/ImageGalleryDialog/styles.js +49 -0
  176. package/components/ImportButton/ImportButton.js +40 -0
  177. package/components/ImportButton/styles.js +16 -0
  178. package/components/LightArrowTooltip/LightArrowTooltip.js +24 -0
  179. package/components/LightArrowTooltip/styles.js +15 -0
  180. package/components/LinearLoadIndicator/LinearLoadIndicator.js +17 -0
  181. package/components/LinearLoadIndicator/styles.js +19 -0
  182. package/components/Link/Link.js +19 -0
  183. package/components/Link/styles.js +14 -0
  184. package/components/LoadingSpinner/LoadingSpinner.js +15 -0
  185. package/components/LoadingSpinner/SpinnerSmall.gif.js +4 -0
  186. package/components/Marginator/Marginator.js +16 -0
  187. package/components/MatchRulesBlock/MatchRulesBadge/MatchRulesBadge.js +59 -0
  188. package/components/MatchRulesBlock/MatchRulesBadge/styles.js +23 -0
  189. package/components/MatchRulesBlock/MatchRulesBlock.js +24 -0
  190. package/components/MatchRulesBlock/MatchRulesTitle.js +12 -0
  191. package/components/MatchRulesBlock/MatchRulesTooltip/MatchRulesTooltip.js +18 -0
  192. package/components/MatchRulesBlock/MatchRulesTooltip/styles.js +19 -0
  193. package/components/MatchRulesBlock/SimpleMatchRules/SimpleMatchRules.js +18 -0
  194. package/components/MatchRulesBlock/SimpleMatchRules/styles.js +18 -0
  195. package/components/MatchRulesBlock/SimpleMatchRulesBlock/SimpleMatchRulesBlock.js +46 -0
  196. package/components/MatchRulesBlock/SimpleMatchRulesBlock/styles.js +19 -0
  197. package/components/MatchRulesBlock/SimpleMatchRulesBuilder/SimpleMatchRulesBuilder.js +43 -0
  198. package/components/MatchRulesBlock/TransitiveMatchBlock/TransitiveMatchBlock.js +58 -0
  199. package/components/MatchRulesBlock/TransitiveMatchBlock/styles.js +14 -0
  200. package/components/MatchRulesBlock/TransitiveMatchRules/TransitiveMatchRule.js +41 -0
  201. package/components/MatchRulesBlock/TransitiveMatchRules/styles.js +23 -0
  202. package/components/MatchRulesBlock/TransitiveMatchRulesTooltip/TransitiveMatchRulesTooltip.js +19 -0
  203. package/components/MatchRulesBlock/TransitiveMatchRulesTooltip/styles.js +13 -0
  204. package/components/MatchRulesBlock/types/index.js +2 -0
  205. package/components/ModeSwitcher/ModeSwitcher.js +25 -0
  206. package/components/ModeSwitcher/styles.js +36 -0
  207. package/components/ModeSwitcherSelect/ModeSwitcherSelect.js +87 -0
  208. package/components/ModeSwitcherSelect/index.js +5 -0
  209. package/components/ModeSwitcherSelect/styles.js +70 -0
  210. package/components/MultipleInput/MultipleInput.js +113 -0
  211. package/components/MultipleInput/styles.js +22 -0
  212. package/components/MultipliableSelect/MultipliableSelect.js +59 -0
  213. package/components/MultipliableSelect/styles.js +14 -0
  214. package/components/Popper/Popper.js +94 -0
  215. package/components/Popper/styles.js +17 -0
  216. package/components/Popper/utils.js +45 -0
  217. package/components/PopupWithArrow/PopupWithArrow.js +34 -0
  218. package/components/PopupWithArrow/styles.js +75 -0
  219. package/components/PotentialMatchReviewCard/PotentialMatchReviewCard.js +65 -0
  220. package/components/PotentialMatchReviewCard/styles.js +65 -0
  221. package/components/ProfileBand/ProfileBand.js +96 -0
  222. package/components/ProfileBand/styles.js +92 -0
  223. package/components/ProfileCard/ProfileCard.js +89 -0
  224. package/components/ProfileCard/styles.js +64 -0
  225. package/components/QueryBuilderRow/QueryBuilderRow.js +78 -0
  226. package/components/QueryBuilderRow/components/ReadOnlyFilter.js +21 -0
  227. package/components/QueryBuilderRow/components/ReadOnlyLogicOperator.js +21 -0
  228. package/components/QueryBuilderRow/components/styles.js +25 -0
  229. package/components/QueryBuilderRow/styles.js +22 -0
  230. package/components/QueryBuilderRowsGroup/QueryBuilderRowsGroup.js +88 -0
  231. package/components/ReactSelect/AsyncSelect.js +8 -0
  232. package/components/ReactSelect/CreatableSelect.js +8 -0
  233. package/components/ReactSelect/MultiSelect/MultiSelect.js +233 -0
  234. package/components/ReactSelect/MultiSelect/components/Option.js +57 -0
  235. package/components/ReactSelect/MultiSelect/components/index.js +10 -0
  236. package/components/ReactSelect/MultiSelect/index.js +7 -0
  237. package/components/ReactSelect/Select.js +8 -0
  238. package/components/ReactSelect/commonComponents/ClearIndicator.js +36 -0
  239. package/components/ReactSelect/commonComponents/Control.js +66 -0
  240. package/components/ReactSelect/commonComponents/DropdownIndicator.js +36 -0
  241. package/components/ReactSelect/commonComponents/GroupHeading.js +22 -0
  242. package/components/ReactSelect/commonComponents/Menu.js +37 -0
  243. package/components/ReactSelect/commonComponents/MultiValue.js +37 -0
  244. package/components/ReactSelect/commonComponents/NoOptionsMessage.js +17 -0
  245. package/components/ReactSelect/commonComponents/Option.js +56 -0
  246. package/components/ReactSelect/commonComponents/Placeholder.js +29 -0
  247. package/components/ReactSelect/commonComponents/SingleValue.js +29 -0
  248. package/components/ReactSelect/commonComponents/ValueContainer.js +19 -0
  249. package/components/ReactSelect/commonComponents/index.js +30 -0
  250. package/components/ReactSelect/optionFilters.js +9 -0
  251. package/components/ReactSelect/styles.js +69 -0
  252. package/components/ReactSelect/withMuiSkin.js +97 -0
  253. package/components/ReactSortableTree/index.js +30 -0
  254. package/components/ReactSortableTree/node-renderer-default.js +148 -0
  255. package/components/ReactSortableTree/nodeRendererDefaultStyle.js +278 -0
  256. package/components/ReactSortableTree/placeholder-renderer-default.js +23 -0
  257. package/components/ReactSortableTree/placeholderRendererDefaultStyle.js +46 -0
  258. package/components/ReactSortableTree/react-sortable-tree.js +809 -0
  259. package/components/ReactSortableTree/reactSortableTreeStyles.js +23 -0
  260. package/components/ReactSortableTree/tree-node.js +200 -0
  261. package/components/ReactSortableTree/tree-placeholder.js +92 -0
  262. package/components/ReactSortableTree/treeNodeStyle.js +236 -0
  263. package/components/ReactSortableTree/utils/classnames.js +28 -0
  264. package/components/ReactSortableTree/utils/default-handlers.js +45 -0
  265. package/components/ReactSortableTree/utils/dnd-manager.js +326 -0
  266. package/components/ReactSortableTree/utils/generic-utils.js +15 -0
  267. package/components/ReactSortableTree/utils/memoized-tree-data-utils.js +26 -0
  268. package/components/ReactSortableTree/utils/tree-data-utils.js +960 -0
  269. package/components/ReltioGridLayout/ReltioGridLayout.js +79 -0
  270. package/components/ReltioGridLayout/helpers.js +52 -0
  271. package/components/ReltioGridLayout/icons/ResizeIcon.svg.js +4 -0
  272. package/components/ReltioGridLayout/styles.js +71 -0
  273. package/components/RequiredMark/RequiredMark.js +12 -0
  274. package/components/RequiredMark/styles.js +9 -0
  275. package/components/ResizablePanes/ResizablePanes.js +75 -0
  276. package/components/ResizablePanes/styles.js +48 -0
  277. package/components/Score/DQLabel.js +14 -0
  278. package/components/Score/Score.js +26 -0
  279. package/components/Score/ScoreLabel.js +29 -0
  280. package/components/Score/styles.js +36 -0
  281. package/components/ScrollableTabs/ScrollableTabs.js +51 -0
  282. package/components/ScrollableTabs/styles.js +32 -0
  283. package/components/SearchInput/SearchInput.js +68 -0
  284. package/components/SearchInput/WhiteSearchInput.js +36 -0
  285. package/components/SearchInput/styles.js +32 -0
  286. package/components/SelectionPopup/SelectionPopup.js +70 -0
  287. package/components/SelectionPopup/SelectionPopupPopper/SelectionPopupPopper.js +60 -0
  288. package/components/SelectionPopup/helpers.js +70 -0
  289. package/components/SelectionPopup/styles.js +41 -0
  290. package/components/SelectorWithOnlyOptionAutoSelect/SelectorWithOnlyOptionAutoSelect.js +74 -0
  291. package/components/SelectorWithOnlyOptionAutoSelect/styles.js +31 -0
  292. package/components/SideIconPanel/SideButtonsPanel.js +42 -0
  293. package/components/SideIconPanel/styles.js +41 -0
  294. package/components/SidePanel/SidePanel.js +16 -0
  295. package/components/SidePanel/SidePanelContentHeader/SidePanelContentHeader.js +24 -0
  296. package/components/SidePanel/SidePanelContentHeader/styles.js +23 -0
  297. package/components/SidePanel/styles.js +16 -0
  298. package/components/SimpleDropDownSelector/DropDownPlaceholder.js +31 -0
  299. package/components/SimpleDropDownSelector/DropDownValue.js +23 -0
  300. package/components/SimpleDropDownSelector/SimpleDropDownSelector.js +59 -0
  301. package/components/SimpleDropDownSelector/styles.js +13 -0
  302. package/components/SimpleInput/SimpleInput.js +77 -0
  303. package/components/SmallIconButton/SmallIconButton.js +109 -0
  304. package/components/SmallIconButton/index.js +11 -0
  305. package/components/SourceIcon/SourceIcon.js +18 -0
  306. package/components/Spacer/Spacer.js +8 -0
  307. package/components/Title/Title.js +27 -0
  308. package/components/Title/styles.js +11 -0
  309. package/components/UploadFileButton/UploadFileButton.js +122 -0
  310. package/components/UploadFileButton/styles.js +20 -0
  311. package/components/UploadImageDialog/DividerWithText/DividerWithText.js +20 -0
  312. package/components/UploadImageDialog/DividerWithText/styles.js +24 -0
  313. package/components/UploadImageDialog/ErrorSnackbar/ErrorSnackbar.js +18 -0
  314. package/components/UploadImageDialog/ErrorSnackbar/styles.js +9 -0
  315. package/components/UploadImageDialog/ImageByUrlField/ImageByUrlField.js +63 -0
  316. package/components/UploadImageDialog/ImageByUrlField/styles.js +32 -0
  317. package/components/UploadImageDialog/SelectImageButton/SelectImageButton.js +23 -0
  318. package/components/UploadImageDialog/TargetBox/TargetBox.js +45 -0
  319. package/components/UploadImageDialog/TargetBox/styles.js +30 -0
  320. package/components/UploadImageDialog/UploadImageDialog.js +87 -0
  321. package/components/UploadImageDialog/constants/index.js +5 -0
  322. package/components/UploadImageDialog/styles.js +32 -0
  323. package/components/ValueChip/ValueChip.js +48 -0
  324. package/components/ValueChip/styles.js +37 -0
  325. package/components/VerticalDivider/VerticalDivider.js +22 -0
  326. package/components/VerticalHeadingsTable/VerticalHeadingsTable.js +72 -0
  327. package/components/ViewMoreToggle/ViewMoreToggle.js +26 -0
  328. package/components/ViewMoreToggle/styles.js +20 -0
  329. package/components/VirtualGroupedList/VirtualGroupedList.js +223 -0
  330. package/components/VirtualGroupedList/helpers.js +43 -0
  331. package/components/VirtualGroupedList/styles.js +17 -0
  332. package/components/activityLog/ActivityExportButton/ActivityExportButton.js +80 -0
  333. package/components/activityLog/ActivityExportButton/styles.js +15 -0
  334. package/components/activityLog/ActivityFilterEditor/ActivityDateRangeEditor.js +85 -0
  335. package/components/activityLog/ActivityFilterEditor/ActivityFilterEditor.js +89 -0
  336. package/components/activityLog/ActivityFilterEditor/ActivitySelector.js +30 -0
  337. package/components/activityLog/ActivityFilterEditor/AttributeSelector.js +103 -0
  338. package/components/activityLog/ActivityFilterEditor/DateRangeSelector.js +114 -0
  339. package/components/activityLog/ActivityFilterEditor/IntervalSelector.js +51 -0
  340. package/components/activityLog/ActivityFilterEditor/SourceSelector.js +30 -0
  341. package/components/activityLog/ActivityFilterEditor/UserSelector.js +62 -0
  342. package/components/activityLog/ActivityFilterEditor/styles.js +103 -0
  343. package/components/activityLog/ActivityFilterEditor/utils/getSelectorActivityTypes.js +35 -0
  344. package/components/activityLog/ActivityLog/ActivityLog.js +67 -0
  345. package/components/activityLog/ActivityLog/helpers.js +33 -0
  346. package/components/activityLog/ActivityLog/items/ActivityItem/ActivityItem.js +30 -0
  347. package/components/activityLog/ActivityLog/items/ActivityItem/styles.js +56 -0
  348. package/components/activityLog/ActivityLog/items/GroupItem/GroupItem.js +22 -0
  349. package/components/activityLog/ActivityLog/items/GroupItem/styles.js +27 -0
  350. package/components/activityLog/ActivityLog/styles.js +39 -0
  351. package/components/activityLog/ActivityLogFilter/ActivityLogFilter.js +63 -0
  352. package/components/activityLog/ActivityLogFilter/ActivityLogFilterHeader.js +26 -0
  353. package/components/activityLog/ActivityLogFilter/helpers.js +42 -0
  354. package/components/activityLog/ActivityLogFilter/styles.js +21 -0
  355. package/components/activityLog/activities/ActivitiesFactory.js +121 -0
  356. package/components/activityLog/activities/ActivityTitle/ActivityTitle.js +16 -0
  357. package/components/activityLog/activities/ActivityTitle/styles.js +20 -0
  358. package/components/activityLog/activities/CommentActivity.js +12 -0
  359. package/components/activityLog/activities/EntityObject/EntityObject.js +19 -0
  360. package/components/activityLog/activities/EntityObject/styles.js +17 -0
  361. package/components/activityLog/activities/GroupActivity.js +21 -0
  362. package/components/activityLog/activities/MergeActivity.js +19 -0
  363. package/components/activityLog/activities/MoreItemsLink/MoreItemsLink.js +40 -0
  364. package/components/activityLog/activities/PotentialMatchActivity.js +16 -0
  365. package/components/activityLog/activities/ProfileActivity.js +19 -0
  366. package/components/activityLog/activities/RelationActivity.js +19 -0
  367. package/components/activityLog/activities/RelationObject/RelationObject.js +20 -0
  368. package/components/activityLog/activities/RelationObject/styles.js +20 -0
  369. package/components/activityLog/activities/SearchActivity.js +47 -0
  370. package/components/activityLog/activities/SimpleActivity.js +22 -0
  371. package/components/activityLog/activities/fields/DeltaField.js +39 -0
  372. package/components/activityLog/activities/fields/PotentialMatchField.js +51 -0
  373. package/components/activityLog/activities/fields/commonStyles.js +22 -0
  374. package/components/activityLog/activities/fields/styles.js +42 -0
  375. package/components/activityLog/activities/records/CollapsibleActivityRecords.js +21 -0
  376. package/components/activityLog/activities/records/EntityRecord.js +25 -0
  377. package/components/activityLog/activities/records/PotentialMatchRecord.js +19 -0
  378. package/components/activityLog/activities/records/RecordUpdates.js +23 -0
  379. package/components/activityLog/activities/records/RelationRecord.js +23 -0
  380. package/components/activityLog/activities/records/styles.js +38 -0
  381. package/components/activityLog/activities/styles.js +17 -0
  382. package/components/activityLog/contexts/CollapsibleItemsContext/index.js +51 -0
  383. package/components/activityLog/hooks/useActivitiesLoader.js +62 -0
  384. package/components/activityLog/hooks/useProfileActivitiesLoader.js +62 -0
  385. package/components/activityLog/hooks/useReadableSearchState.js +48 -0
  386. package/components/activityLog/index.js +25 -0
  387. package/components/activityLog/types/ActivitiesFilter.js +2 -0
  388. package/components/activityLog/types/ActivityData.js +2 -0
  389. package/components/activityLog/types/ActivityDelta.js +2 -0
  390. package/components/activityLog/types/ActivityItem.js +2 -0
  391. package/components/activityLog/types/ActivityTypes.js +33 -0
  392. package/components/activityLog/types/AttributeOption.js +2 -0
  393. package/components/activityLog/types/DateRangeTypes.js +9 -0
  394. package/components/activityLog/types/DeltaTypes.js +9 -0
  395. package/components/activityLog/types/DeltaValue.js +2 -0
  396. package/components/activityLog/types/index.js +9 -0
  397. package/components/activityLog/utils/activities.js +89 -0
  398. package/components/activityLog/utils/filters.js +80 -0
  399. package/components/attributes/AttributesView/AttributesView.js +36 -0
  400. package/components/attributes/AttributesView/index.js +15 -0
  401. package/components/attributes/BranchDecorator/BranchDecorator.js +16 -0
  402. package/components/attributes/BranchDecorator/styles.js +39 -0
  403. package/components/attributes/ImageAttributesLine/ImageAttributesLine.js +123 -0
  404. package/components/attributes/ImageAttributesLine/constants.js +9 -0
  405. package/components/attributes/ImageAttributesLine/index.js +8 -0
  406. package/components/attributes/ImageAttributesLine/styles.js +49 -0
  407. package/components/attributes/OvIcon/OvIcon.js +33 -0
  408. package/components/attributes/OvIcon/index.js +8 -0
  409. package/components/attributes/OvIcon/styles.js +17 -0
  410. package/components/attributes/PivotingAttributes/PivotingTooltip.js +62 -0
  411. package/components/attributes/PivotingAttributes/PivotingTooltipContent.js +82 -0
  412. package/components/attributes/PivotingAttributes/helpers.js +118 -0
  413. package/components/attributes/PivotingAttributes/styles.js +95 -0
  414. package/components/attributes/editMode/AttributesFactory/Attribute.js +11 -0
  415. package/components/attributes/editMode/AttributesFactory/AttributesFactory.js +50 -0
  416. package/components/attributes/editMode/AttributesList/AttributesList.js +89 -0
  417. package/components/attributes/editMode/AttributesList/helpers.js +43 -0
  418. package/components/attributes/editMode/AttributesList/index.js +8 -0
  419. package/components/attributes/editMode/AttributesPager/AttributeRenderer.js +99 -0
  420. package/components/attributes/editMode/AttributesPager/AttributesPager.js +88 -0
  421. package/components/attributes/editMode/AttributesPager/CardinalityMessage.js +72 -0
  422. package/components/attributes/editMode/AttributesPager/SpecialRenderer.js +86 -0
  423. package/components/attributes/editMode/AttributesPager/index.js +54 -0
  424. package/components/attributes/editMode/AttributesPager/styles.js +33 -0
  425. package/components/attributes/editMode/AttributesPager/utils.js +7 -0
  426. package/components/attributes/editMode/AttributesView/AttributesView.js +67 -0
  427. package/components/attributes/editMode/AttributesView/index.js +14 -0
  428. package/components/attributes/editMode/AttributesView/styles.js +15 -0
  429. package/components/attributes/editMode/ComplexAttribute/ComplexAttribute.js +91 -0
  430. package/components/attributes/editMode/ComplexAttribute/styles.js +31 -0
  431. package/components/attributes/editMode/EntityCreator/EntityCreator.js +49 -0
  432. package/components/attributes/editMode/EntityCreator/index.js +38 -0
  433. package/components/attributes/editMode/EntitySelector/EntitySelector.js +146 -0
  434. package/components/attributes/editMode/EntitySelector/components/ClearIndicator.js +20 -0
  435. package/components/attributes/editMode/EntitySelector/components/EntityOption.js +58 -0
  436. package/components/attributes/editMode/EntitySelector/components/EntityTypeOption.js +45 -0
  437. package/components/attributes/editMode/EntitySelector/components/Group.js +40 -0
  438. package/components/attributes/editMode/EntitySelector/components/SingleValue.js +80 -0
  439. package/components/attributes/editMode/EntitySelector/components/styles.js +89 -0
  440. package/components/attributes/editMode/EntitySelector/styles.js +9 -0
  441. package/components/attributes/editMode/ImageAttributesLine/ImageAttributesLine.js +107 -0
  442. package/components/attributes/editMode/ImageAttributesLine/index.js +7 -0
  443. package/components/attributes/editMode/ImageAttributesLine/styles.js +43 -0
  444. package/components/attributes/editMode/MoreAttributesButton/MoreAttributesButton.js +111 -0
  445. package/components/attributes/editMode/MoreAttributesButton/index.js +8 -0
  446. package/components/attributes/editMode/MoreAttributesButton/styles.js +31 -0
  447. package/components/attributes/editMode/NestedAttribute/NestedAttribute.js +45 -0
  448. package/components/attributes/editMode/ReferenceAttribute/ReferenceAttribute.js +152 -0
  449. package/components/attributes/editMode/ReferenceAttribute/index.js +44 -0
  450. package/components/attributes/editMode/ReferenceAttribute/styles.js +12 -0
  451. package/components/attributes/editMode/RelationTypeSelector/RelationTypeSelector.js +72 -0
  452. package/components/attributes/editMode/RelationTypeSelector/components/RelationOption.js +57 -0
  453. package/components/attributes/editMode/RelationTypeSelector/components/styles.js +55 -0
  454. package/components/attributes/editMode/SimpleAttributeEditor/SimpleAttributeEditor.js +125 -0
  455. package/components/attributes/editMode/SimpleAttributeEditor/selectors/getDependentLookupEditorContext.js +36 -0
  456. package/components/attributes/editMode/SimpleAttributeEditor/selectors/helpers/cache.js +19 -0
  457. package/components/attributes/editMode/SimpleAttributeEditor/selectors/helpers/missedParentsMessage.js +20 -0
  458. package/components/attributes/editMode/SimpleAttributeEditor/selectors/helpers/parents.js +59 -0
  459. package/components/attributes/editMode/SimpleAttributeEditor/selectors/types.js +2 -0
  460. package/components/attributes/editMode/SimpleAttributeEditor/styles.js +33 -0
  461. package/components/attributes/editMode/SimpleAttributeEditor/utils.js +65 -0
  462. package/components/attributes/helpers/attributesView.js +22 -0
  463. package/components/attributes/helpers/imageAttributes.js +37 -0
  464. package/components/attributes/inline/AttributesList/AttributesList.js +42 -0
  465. package/components/attributes/inline/AttributesList/styles.js +13 -0
  466. package/components/attributes/inline/AttributesPager/AttributesPager.js +96 -0
  467. package/components/attributes/inline/AttributesPager/styles.js +14 -0
  468. package/components/attributes/inline/ComplexAttribute/ComplexAttribute.js +72 -0
  469. package/components/attributes/inline/ComplexAttribute/styles.js +24 -0
  470. package/components/attributes/inline/ImageAttribute/ImageAttribute.js +39 -0
  471. package/components/attributes/inline/ImageAttribute/styles.js +17 -0
  472. package/components/attributes/inline/ImageAttributesBlock/ImageAttributesBlock.js +34 -0
  473. package/components/attributes/inline/NestedAttribute/NestedAttribute.js +37 -0
  474. package/components/attributes/inline/NestedAttributesBlock/NestedAttributesBlock.js +43 -0
  475. package/components/attributes/inline/ReferenceAttribute/ReferenceAttribute.js +48 -0
  476. package/components/attributes/inline/ReferenceAttribute/styles.js +14 -0
  477. package/components/attributes/inline/ReferenceAttributesBlock/ReferenceAttributesBlock.js +34 -0
  478. package/components/attributes/inline/SimpleAttribute/CrosswalkMenuItem/CrosswalkMenuItem.js +50 -0
  479. package/components/attributes/inline/SimpleAttribute/CrosswalkMenuItem/styles.js +23 -0
  480. package/components/attributes/inline/SimpleAttribute/SimpleAttribute.js +99 -0
  481. package/components/attributes/inline/SimpleAttribute/index.js +8 -0
  482. package/components/attributes/inline/SimpleAttribute/styles.js +32 -0
  483. package/components/attributes/inline/SimpleAttributeEditor/SimpleAttributeEditor.js +88 -0
  484. package/components/attributes/inline/SimpleAttributeEditor/styles.js +24 -0
  485. package/components/attributes/inline/SimpleAttributesBlock/SimpleAttributesBlock.js +61 -0
  486. package/components/attributes/inline/SimpleAttributesBlock/styles.js +24 -0
  487. package/components/attributes/inline/common/ComplexAttributeLabel.js +15 -0
  488. package/components/attributes/inline/common/CrosswalkIcon.js +20 -0
  489. package/components/attributes/inline/common/DeleteButton.js +13 -0
  490. package/components/attributes/inline/common/IgnoreButton.js +14 -0
  491. package/components/attributes/inline/common/PinButton.js +14 -0
  492. package/components/attributes/inline/common/SourceItem.js +27 -0
  493. package/components/attributes/inline/common/__test__/CrosswalkIcon.spec.js +75 -0
  494. package/components/attributes/inline/common/__test__/IgnoreButton.spec.js +28 -0
  495. package/components/attributes/inline/common/__test__/PinButton.spec.js +28 -0
  496. package/components/attributes/inline/common/__test__/SourceItem.spec.js +70 -0
  497. package/components/attributes/inline/common/styles.js +61 -0
  498. package/components/attributes/inline/hooks/useAttributeState.js +43 -0
  499. package/components/attributes/inline/index.js +25 -0
  500. package/components/attributes/inline/types/AddAttributeEvent.js +2 -0
  501. package/components/attributes/inline/types/CrosswalksMap.js +2 -0
  502. package/components/attributes/inline/types/DeleteAttributeEvent.js +2 -0
  503. package/components/attributes/inline/types/EditAttributeEvent.js +2 -0
  504. package/components/attributes/inline/types/IgnoreAttributeEvent.js +2 -0
  505. package/components/attributes/inline/types/PinAttributeEvent.js +2 -0
  506. package/components/attributes/inline/types/index.js +2 -0
  507. package/components/attributes/pagersCommon/ShowLess.js +18 -0
  508. package/components/attributes/pagersCommon/ShowMore.js +20 -0
  509. package/components/attributes/pagersCommon/styles.js +13 -0
  510. package/components/attributes/readMode/AttributeValuesBlock/AttributeValuesBlock.js +73 -0
  511. package/components/attributes/readMode/AttributesFactory/Attribute.js +11 -0
  512. package/components/attributes/readMode/AttributesFactory/AttributesFactory.js +38 -0
  513. package/components/attributes/readMode/AttributesList/AttributesList.js +71 -0
  514. package/components/attributes/readMode/AttributesList/index.js +8 -0
  515. package/components/attributes/readMode/AttributesPager/AttributesPager.js +76 -0
  516. package/components/attributes/readMode/AttributesPager/MultiLineRenderer.js +67 -0
  517. package/components/attributes/readMode/AttributesPager/OneLineRenderer.js +28 -0
  518. package/components/attributes/readMode/AttributesPager/SpecialRenderer.js +41 -0
  519. package/components/attributes/readMode/AttributesPager/index.js +15 -0
  520. package/components/attributes/readMode/AttributesPager/styles.js +92 -0
  521. package/components/attributes/readMode/AttributesView/AttributesView.js +60 -0
  522. package/components/attributes/readMode/AttributesView/index.js +14 -0
  523. package/components/attributes/readMode/AttributesView/styles.js +19 -0
  524. package/components/attributes/readMode/ComplexAttribute/ComplexAttribute.js +65 -0
  525. package/components/attributes/readMode/ComplexAttribute/styles.js +23 -0
  526. package/components/attributes/readMode/ImageAttributesLine/ImageAttributesLine.js +55 -0
  527. package/components/attributes/readMode/ImageAttributesLine/cross.inline.svg.js +4 -0
  528. package/components/attributes/readMode/ImageAttributesLine/index.js +8 -0
  529. package/components/attributes/readMode/ImageAttributesLine/styles.js +90 -0
  530. package/components/attributes/readMode/NestedAttribute/NestedAttribute.js +72 -0
  531. package/components/attributes/readMode/NestedAttribute/index.js +8 -0
  532. package/components/attributes/readMode/NestedAttribute/styles.js +28 -0
  533. package/components/attributes/readMode/ReferenceAttribute/ReferenceAttribute.js +81 -0
  534. package/components/attributes/readMode/ReferenceAttribute/index.js +17 -0
  535. package/components/attributes/readMode/ReferenceAttribute/styles.js +30 -0
  536. package/components/attributes/readMode/SimpleAttribute/SimpleAttribute.js +52 -0
  537. package/components/attributes/readMode/SimpleAttribute/index.js +8 -0
  538. package/components/attributes/readMode/SimpleAttribute/styles.js +37 -0
  539. package/components/attributes/readMode/SpecialAttributes/Roles/Role.js +41 -0
  540. package/components/attributes/readMode/SpecialAttributes/Roles/Roles.js +13 -0
  541. package/components/attributes/readMode/SpecialAttributes/Roles/index.js +8 -0
  542. package/components/attributes/readMode/SpecialAttributes/SpecialAttributesArray.js +29 -0
  543. package/components/attributes/readMode/SpecialAttributes/Tags/Tag.js +43 -0
  544. package/components/attributes/readMode/SpecialAttributes/Tags/Tags.js +13 -0
  545. package/components/attributes/readMode/SpecialAttributes/Tags/index.js +8 -0
  546. package/components/attributes/readMode/SpecialAttributes/styles.js +20 -0
  547. package/components/attributes/readMode/helpers/historyAppearance.js +65 -0
  548. package/components/attributes/types/attributesView.js +2 -0
  549. package/components/attributes/types/index.js +13 -0
  550. package/components/charts/ActiveShape/ActiveShape.js +52 -0
  551. package/components/charts/BarChart/BarChart.js +37 -0
  552. package/components/charts/BarChart/getBarChartSettings.js +52 -0
  553. package/components/charts/BubbleChart/BubbleChart.js +84 -0
  554. package/components/charts/BubbleChart/helpers.js +28 -0
  555. package/components/charts/BubbleChart/styles.js +10 -0
  556. package/components/charts/BubbleChart/useBubbles.js +18 -0
  557. package/components/charts/ChartsFactory.js +57 -0
  558. package/components/charts/CloudChart/CloudChart.js +72 -0
  559. package/components/charts/CloudChart/styles.js +34 -0
  560. package/components/charts/CloudChart/useCloud.js +36 -0
  561. package/components/charts/CustomLegend/CustomLegend.js +17 -0
  562. package/components/charts/CustomLegend/getLegendProps.js +23 -0
  563. package/components/charts/CustomLegend/styles.js +41 -0
  564. package/components/charts/CustomTooltip/CustomTooltip.js +29 -0
  565. package/components/charts/CustomTooltip/styles.js +31 -0
  566. package/components/charts/HOCs/withPercents.js +60 -0
  567. package/components/charts/LineChart/LineChart.js +48 -0
  568. package/components/charts/LineChart/getLineChartSettings.js +60 -0
  569. package/components/charts/MapChart/Legend/Legend.js +22 -0
  570. package/components/charts/MapChart/Legend/styles.js +49 -0
  571. package/components/charts/MapChart/MapChart.js +115 -0
  572. package/components/charts/MapChart/styles.js +16 -0
  573. package/components/charts/MapChart/useGeography.js +23 -0
  574. package/components/charts/PieChart/PieChart.js +67 -0
  575. package/components/charts/TableWithBars/TableWithBars.js +71 -0
  576. package/components/charts/TableWithBars/cell-renderers/AttributeCellRenderer.js +30 -0
  577. package/components/charts/TableWithBars/cell-renderers/HeadCellRenderer.js +40 -0
  578. package/components/charts/TableWithBars/cell-renderers/NumberCellValueRenderer.js +20 -0
  579. package/components/charts/TableWithBars/cell-renderers/styles.js +71 -0
  580. package/components/charts/TableWithBars/styles.js +19 -0
  581. package/components/charts/TreeChart/TreeChart.js +66 -0
  582. package/components/charts/TreeChart/styles.js +16 -0
  583. package/components/charts/hooks/useClickableStyle.js +14 -0
  584. package/components/charts/hooks/useTooltipState.js +30 -0
  585. package/components/charts/index.js +18 -0
  586. package/components/charts/types/BarChartOptions.js +2 -0
  587. package/components/charts/types/ChartData.js +2 -0
  588. package/components/charts/types/ChartProps.js +2 -0
  589. package/components/charts/types/LineChartOptions.js +2 -0
  590. package/components/charts/types/TableWithBarsOptions.js +2 -0
  591. package/components/charts/types/index.js +2 -0
  592. package/components/commonReactSelectComponents/DropdownIndicator.js +38 -0
  593. package/components/commonReactSelectComponents/DropdownIndicatorWithIconButton.js +38 -0
  594. package/components/commonReactSelectComponents/MenuWithPopper.js +79 -0
  595. package/components/commonReactSelectComponents/arrowIndicatorStyles.js +12 -0
  596. package/components/commonReactSelectComponents/menuStyles.js +13 -0
  597. package/components/editors/BooleanEditor/BooleanEditor.js +41 -0
  598. package/components/editors/BooleanRadioEditor/BooleanRadioEditor.js +24 -0
  599. package/components/editors/BooleanRadioEditor/styles.js +12 -0
  600. package/components/editors/DataTypeValueEditor/DataTypeValueEditor.js +54 -0
  601. package/components/editors/DataTypeValueEditor/useEditorContext.js +108 -0
  602. package/components/editors/DateEditor/DateEditor.js +94 -0
  603. package/components/editors/DateEditor/styles.js +31 -0
  604. package/components/editors/DateRangeEditor/DateRangeEditor.js +146 -0
  605. package/components/editors/DateRangeEditor/styles.js +39 -0
  606. package/components/editors/DependentLookupEditor/DependentLookupEditor.js +129 -0
  607. package/components/editors/DependentLookupEditor/OptionWithCheckIcon.js +33 -0
  608. package/components/editors/DependentLookupEditor/helpers.js +25 -0
  609. package/components/editors/DependentLookupEditor/styles.js +25 -0
  610. package/components/editors/DependentLookupEditor/useAutopopulation.js +25 -0
  611. package/components/editors/DependentLookupEditor/useDefaultOptions.js +25 -0
  612. package/components/editors/DependentLookupEditor/useLookupsResolver.js +29 -0
  613. package/components/editors/DropDownEditor/DropDownEditor.js +47 -0
  614. package/components/editors/EditorsFactory.js +97 -0
  615. package/components/editors/FileTypeEditor/FileTypeEditor.js +52 -0
  616. package/components/editors/FileTypeEditor/styles.js +9 -0
  617. package/components/editors/FilterEditor/FilterEditor.js +46 -0
  618. package/components/editors/FilterEditor/FilterValueEditor.js +84 -0
  619. package/components/editors/GroupedDropDownEditor/GroupedDropDownEditor.js +64 -0
  620. package/components/editors/GroupedDropDownEditor/entriesHelpers.js +32 -0
  621. package/components/editors/GroupedDropDownEditor/styles.js +14 -0
  622. package/components/editors/LookupEditor/LookupEditor.js +78 -0
  623. package/components/editors/LookupEditor/entriesHelpers.js +28 -0
  624. package/components/editors/NumberEditor/NumberEditor.js +70 -0
  625. package/components/editors/RangeDataTypeValueEditor/RangeDataTypeValueEditor.js +87 -0
  626. package/components/editors/RangeDataTypeValueEditor/styles.js +24 -0
  627. package/components/editors/SelectEditor/SelectEditor.js +44 -0
  628. package/components/editors/TextEditor/TextEditor.js +47 -0
  629. package/components/editors/TimestampEditor/TimestampEditor.js +100 -0
  630. package/components/editors/TimestampEditor/styles.js +25 -0
  631. package/components/editors/TypeaheadEditor/TypeaheadEditor.js +151 -0
  632. package/components/editors/TypeaheadEditor/styles.js +55 -0
  633. package/components/editors/commonComponents/MultiValueChip/MultiValueChip.js +39 -0
  634. package/components/editors/constants.js +27 -0
  635. package/components/editors/index.js +24 -0
  636. package/components/index.js +242 -0
  637. package/constants/attributes.js +5 -0
  638. package/constants/classnames.js +4 -0
  639. package/constants/index.js +13 -0
  640. package/constants/prop-types.js +82 -0
  641. package/contexts/AsyncMountContext/index.js +19 -0
  642. package/contexts/BlockImageGalleryDialogContext/index.js +9 -0
  643. package/contexts/CollaborationContext/index.js +21 -0
  644. package/contexts/CrosswalksDisplayContext/index.js +70 -0
  645. package/contexts/EntitiesMapContext/index.js +9 -0
  646. package/contexts/HistoryAppearanceContext/index.js +12 -0
  647. package/contexts/IdContext/index.js +9 -0
  648. package/contexts/PivotingAttributeContext/index.js +8 -0
  649. package/contexts/PopupBoundariesContext/index.js +16 -0
  650. package/contexts/ProfilePerspectiveViewContext/index.js +9 -0
  651. package/contexts/UsersContext/index.js +9 -0
  652. package/contexts/ViewIdContext/index.js +9 -0
  653. package/contexts/index.js +30 -0
  654. package/core/index.js +13 -0
  655. package/core/utils.js +54 -0
  656. package/hooks/index.js +29 -0
  657. package/hooks/useActions.js +27 -0
  658. package/hooks/useAsyncMount.js +27 -0
  659. package/hooks/useCollaboration.js +151 -0
  660. package/hooks/useConfigPermissions.js +20 -0
  661. package/hooks/useDidUpdateEffect.js +14 -0
  662. package/hooks/usePrevious.js +12 -0
  663. package/hooks/useRelationTypeSelector.js +53 -0
  664. package/hooks/useRelationsLoader.js +111 -0
  665. package/hooks/useRunOnceAfterValueInitialization.js +14 -0
  666. package/hooks/useSafePromise.js +34 -0
  667. package/hooks/useSavedState.js +18 -0
  668. package/hooks/useUsers.js +29 -0
  669. package/hooks/useWhyDidYouUpdate.js +46 -0
  670. package/icons/Add.js +11 -0
  671. package/icons/AddComment.js +11 -0
  672. package/icons/Calendar.js +11 -0
  673. package/icons/Comment.js +11 -0
  674. package/icons/CommentBubble.js +11 -0
  675. package/icons/Create.js +11 -0
  676. package/icons/DefaultImage.js +13 -0
  677. package/icons/Details.js +16 -0
  678. package/icons/Download.js +16 -0
  679. package/icons/EmptySearchResults.js +73 -0
  680. package/icons/Eye.js +16 -0
  681. package/icons/Filter.js +11 -0
  682. package/icons/Ignored.js +11 -0
  683. package/icons/IgnoredOutlined.js +11 -0
  684. package/icons/LogIn.js +12 -0
  685. package/icons/LogOut.js +12 -0
  686. package/icons/Merge.js +11 -0
  687. package/icons/MlMatch.js +51 -0
  688. package/icons/NestedAttribute.js +11 -0
  689. package/icons/NoData.js +73 -0
  690. package/icons/NoDataSearch.js +14 -0
  691. package/icons/NoMatches.js +11 -0
  692. package/icons/Pin.js +11 -0
  693. package/icons/PinOutlined.js +11 -0
  694. package/icons/PivotingIcon.js +11 -0
  695. package/icons/PmIcon.js +11 -0
  696. package/icons/PotentialMatch.js +11 -0
  697. package/icons/Profile.js +11 -0
  698. package/icons/Recommended.js +16 -0
  699. package/icons/ReferenceAttribute.js +11 -0
  700. package/icons/Remove.js +11 -0
  701. package/icons/ResizeIconInline.js +11 -0
  702. package/icons/Search.js +11 -0
  703. package/icons/SelectAttributes.js +46 -0
  704. package/icons/SimpleAttribute.js +11 -0
  705. package/icons/Table.js +11 -0
  706. package/icons/UnMerge.js +11 -0
  707. package/icons/UploadIcon.js +35 -0
  708. package/icons/index.js +82 -0
  709. package/index.js +19 -0
  710. package/package.json +8 -5
  711. package/types/index.js +2 -0
  712. package/bundle.js +0 -2
  713. package/bundle.js.LICENSE.txt +0 -25
@@ -0,0 +1,809 @@
1
+ "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = function (d, b) {
4
+ extendStatics = Object.setPrototypeOf ||
5
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
+ return extendStatics(d, b);
8
+ };
9
+ return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
+ extendStatics(d, b);
13
+ function __() { this.constructor = d; }
14
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
+ };
16
+ })();
17
+ var __assign = (this && this.__assign) || function () {
18
+ __assign = Object.assign || function(t) {
19
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
20
+ s = arguments[i];
21
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
22
+ t[p] = s[p];
23
+ }
24
+ return t;
25
+ };
26
+ return __assign.apply(this, arguments);
27
+ };
28
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
29
+ if (k2 === undefined) k2 = k;
30
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
31
+ }) : (function(o, m, k, k2) {
32
+ if (k2 === undefined) k2 = k;
33
+ o[k2] = m[k];
34
+ }));
35
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
36
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
37
+ }) : function(o, v) {
38
+ o["default"] = v;
39
+ });
40
+ var __importStar = (this && this.__importStar) || function (mod) {
41
+ if (mod && mod.__esModule) return mod;
42
+ var result = {};
43
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
44
+ __setModuleDefault(result, mod);
45
+ return result;
46
+ };
47
+ var __importDefault = (this && this.__importDefault) || function (mod) {
48
+ return (mod && mod.__esModule) ? mod : { "default": mod };
49
+ };
50
+ Object.defineProperty(exports, "__esModule", { value: true });
51
+ exports.SortableTreeWithoutDndContext = void 0;
52
+ var react_1 = __importStar(require("react"));
53
+ var prop_types_1 = __importDefault(require("prop-types"));
54
+ var react_virtualized_1 = require("react-virtualized");
55
+ var ramda_1 = require("ramda");
56
+ var frontend_collective_react_dnd_scrollzone_1 = __importStar(require("frontend-collective-react-dnd-scrollzone"));
57
+ var react_dnd_1 = require("react-dnd");
58
+ var react_dnd_html5_backend_1 = __importDefault(require("react-dnd-html5-backend"));
59
+ var react_lifecycles_compat_1 = require("react-lifecycles-compat");
60
+ var styles_1 = require("@material-ui/core/styles");
61
+ var tree_node_1 = __importDefault(require("./tree-node"));
62
+ var node_renderer_default_1 = __importDefault(require("./node-renderer-default"));
63
+ var tree_placeholder_1 = __importDefault(require("./tree-placeholder"));
64
+ var placeholder_renderer_default_1 = __importDefault(require("./placeholder-renderer-default"));
65
+ var tree_data_utils_1 = require("./utils/tree-data-utils");
66
+ var memoized_tree_data_utils_1 = require("./utils/memoized-tree-data-utils");
67
+ var generic_utils_1 = require("./utils/generic-utils");
68
+ var default_handlers_1 = require("./utils/default-handlers");
69
+ var dnd_manager_1 = __importDefault(require("./utils/dnd-manager"));
70
+ var classnames_1 = __importDefault(require("./utils/classnames"));
71
+ var reactSortableTreeStyles_1 = require("./reactSortableTreeStyles");
72
+ var treeIdCounter = 1;
73
+ var mergeTheme = function (props) {
74
+ var merged = __assign(__assign({}, props), { style: __assign(__assign({}, props.theme.style), props.style), innerStyle: __assign(__assign({}, props.theme.innerStyle), props.innerStyle), reactVirtualizedListProps: __assign(__assign({}, props.theme.reactVirtualizedListProps), props.reactVirtualizedListProps) });
75
+ var overridableDefaults = {
76
+ nodeContentRenderer: node_renderer_default_1.default,
77
+ placeholderRenderer: placeholder_renderer_default_1.default,
78
+ rowHeight: 62,
79
+ scaffoldBlockPxWidth: 44,
80
+ slideRegionSize: 100,
81
+ treeNodeRenderer: tree_node_1.default
82
+ };
83
+ Object.keys(overridableDefaults).forEach(function (propKey) {
84
+ // If prop has been specified, do not change it
85
+ // If prop is specified in theme, use the theme setting
86
+ // If all else fails, fall back to the default
87
+ if (props[propKey] === null) {
88
+ merged[propKey] =
89
+ typeof props.theme[propKey] !== 'undefined' ? props.theme[propKey] : overridableDefaults[propKey];
90
+ }
91
+ });
92
+ return merged;
93
+ };
94
+ var ReactSortableTree = /** @class */ (function (_super) {
95
+ __extends(ReactSortableTree, _super);
96
+ function ReactSortableTree(props) {
97
+ var _this = _super.call(this, props) || this;
98
+ var _a = mergeTheme(props), dndType = _a.dndType, nodeContentRenderer = _a.nodeContentRenderer, treeNodeRenderer = _a.treeNodeRenderer, isVirtualized = _a.isVirtualized, slideRegionSize = _a.slideRegionSize;
99
+ _this.dndManager = new dnd_manager_1.default(_this);
100
+ // Wrapping classes for use with react-dnd
101
+ _this.treeId = "rst__" + treeIdCounter;
102
+ treeIdCounter += 1;
103
+ _this.dndType = dndType || _this.treeId;
104
+ _this.nodeContentRenderer = _this.dndManager.wrapSource(nodeContentRenderer);
105
+ _this.treePlaceholderRenderer = _this.dndManager.wrapPlaceholder(tree_placeholder_1.default);
106
+ _this.treeNodeRenderer = _this.dndManager.wrapTarget(treeNodeRenderer);
107
+ // Prepare scroll-on-drag options for this list
108
+ if (isVirtualized) {
109
+ _this.scrollZoneVirtualList = (frontend_collective_react_dnd_scrollzone_1.createScrollingComponent || frontend_collective_react_dnd_scrollzone_1.default)(react_virtualized_1.List);
110
+ _this.vStrength = frontend_collective_react_dnd_scrollzone_1.createVerticalStrength(slideRegionSize);
111
+ _this.hStrength = frontend_collective_react_dnd_scrollzone_1.createHorizontalStrength(slideRegionSize);
112
+ }
113
+ _this.state = {
114
+ draggingTreeData: null,
115
+ draggedNode: null,
116
+ draggedMinimumTreeIndex: null,
117
+ draggedDepth: null,
118
+ searchMatches: [],
119
+ searchFocusTreeIndex: null,
120
+ dragging: false,
121
+ draggingExpandedPaths: [],
122
+ ignoreOneTreeUpdate: false,
123
+ // props that need to be used in gDSFP or static functions will be stored here
124
+ instanceProps: {
125
+ treeData: _this.props.treeData || [],
126
+ searchQuery: null,
127
+ searchFocusOffset: null,
128
+ ignoreTreeChanges: false
129
+ }
130
+ };
131
+ _this.toggleChildrenVisibility = _this.toggleChildrenVisibility.bind(_this);
132
+ _this.moveNode = _this.moveNode.bind(_this);
133
+ _this.startDrag = _this.startDrag.bind(_this);
134
+ _this.dragHover = _this.dragHover.bind(_this);
135
+ _this.endDrag = _this.endDrag.bind(_this);
136
+ _this.drop = _this.drop.bind(_this);
137
+ _this.handleDndMonitorChange = _this.handleDndMonitorChange.bind(_this);
138
+ return _this;
139
+ }
140
+ ReactSortableTree.prototype.componentDidMount = function () {
141
+ ReactSortableTree.loadLazyChildren(this.props);
142
+ var stateUpdate = ReactSortableTree.search(this.props, this.state, true, true, false);
143
+ this.setState(stateUpdate);
144
+ // Hook into react-dnd state changes to detect when the drag ends
145
+ // TODO: This is very brittle, so it needs to be replaced if react-dnd
146
+ // offers a more official way to detect when a drag ends
147
+ this.clearMonitorSubscription = this.props.dragDropManager
148
+ .getMonitor()
149
+ .subscribeToStateChange(this.handleDndMonitorChange);
150
+ };
151
+ ReactSortableTree.getDerivedStateFromProps = function (nextProps, prevState) {
152
+ var instanceProps = prevState.instanceProps;
153
+ var newState = {};
154
+ if (!ramda_1.equals(instanceProps.searchQuery, nextProps.searchQuery)) {
155
+ Object.assign(newState, ReactSortableTree.search(nextProps, prevState, true, true, false));
156
+ }
157
+ else if (instanceProps.searchFocusOffset !== nextProps.searchFocusOffset) {
158
+ Object.assign(newState, ReactSortableTree.search(nextProps, prevState, true, true, true));
159
+ }
160
+ instanceProps.searchQuery = nextProps.searchQuery;
161
+ instanceProps.searchFocusOffset = nextProps.searchFocusOffset;
162
+ newState.instanceProps = instanceProps;
163
+ return newState;
164
+ };
165
+ // listen to dragging
166
+ ReactSortableTree.prototype.componentDidUpdate = function (prevProps, prevState) {
167
+ var _this = this;
168
+ // if it is not the same then call the onDragStateChanged
169
+ if (this.state.dragging !== prevState.dragging) {
170
+ if (this.props.onDragStateChanged) {
171
+ this.props.onDragStateChanged({
172
+ isDragging: this.state.dragging,
173
+ draggedNode: this.state.draggedNode
174
+ });
175
+ }
176
+ }
177
+ if (this.state.dragging) {
178
+ var isTreeDataEqual = ramda_1.equals(this.props.treeData, prevProps.treeData);
179
+ if (!isTreeDataEqual) {
180
+ var draggingTreeData_1 = tree_data_utils_1.removeNode({
181
+ treeData: this.props.treeData,
182
+ path: prevState.draggedPath,
183
+ getNodeKey: this.props.getNodeKey
184
+ }).treeData;
185
+ this.setState(function (_a) {
186
+ var draggingExpandedPaths = _a.draggingExpandedPaths;
187
+ return ({
188
+ draggingTreeData: draggingExpandedPaths.reduce(function (treeData, path) {
189
+ var newTree;
190
+ try {
191
+ newTree = tree_data_utils_1.changeNodeAtPath({
192
+ treeData: treeData,
193
+ path: path,
194
+ newNode: function (_a) {
195
+ var node = _a.node;
196
+ return (__assign(__assign({}, node), { expanded: true }));
197
+ },
198
+ getNodeKey: _this.props.getNodeKey
199
+ });
200
+ }
201
+ catch (e) {
202
+ newTree = treeData;
203
+ }
204
+ return newTree;
205
+ }, draggingTreeData_1)
206
+ });
207
+ });
208
+ }
209
+ else if (this.state.draggingTreeData && prevState.draggingTreeData !== this.state.draggingTreeData) {
210
+ tree_data_utils_1.walk({
211
+ treeData: this.state.draggingTreeData,
212
+ getNodeKey: this.props.getNodeKey,
213
+ callback: function (_a) {
214
+ var node = _a.node, path = _a.path, lowerSiblingCounts = _a.lowerSiblingCounts, treeIndex = _a.treeIndex;
215
+ if (node.pending && node.expanded) {
216
+ _this.props.onLazyLoadChildren({
217
+ node: node,
218
+ path: path,
219
+ lowerSiblingCounts: lowerSiblingCounts,
220
+ treeIndex: treeIndex
221
+ });
222
+ }
223
+ }
224
+ });
225
+ }
226
+ }
227
+ else if (this.props.treeData !== prevProps.treeData) {
228
+ var isTreeDataEqual = ramda_1.equals(this.props.treeData, prevProps.treeData);
229
+ var _a = this.state, ignoreOneTreeUpdate = _a.ignoreOneTreeUpdate, instanceProps = _a.instanceProps;
230
+ var newState = {};
231
+ if (!isTreeDataEqual) {
232
+ if (ignoreOneTreeUpdate) {
233
+ newState.ignoreOneTreeUpdate = false;
234
+ }
235
+ else {
236
+ newState.searchFocusTreeIndex = null;
237
+ ReactSortableTree.loadLazyChildren(this.props);
238
+ Object.assign(newState, ReactSortableTree.search(this.props, this.state, false, false, false));
239
+ }
240
+ newState.draggingTreeData = null;
241
+ newState.draggedNode = null;
242
+ newState.draggedMinimumTreeIndex = null;
243
+ newState.draggedDepth = null;
244
+ newState.dragging = false;
245
+ newState.draggingExpandedPaths = [];
246
+ newState.instanceProps = __assign(__assign({}, instanceProps), { treeData: this.props.treeData });
247
+ this.setState(newState);
248
+ }
249
+ }
250
+ };
251
+ ReactSortableTree.prototype.componentWillUnmount = function () {
252
+ this.clearMonitorSubscription();
253
+ };
254
+ ReactSortableTree.prototype.getRows = function (treeData) {
255
+ return memoized_tree_data_utils_1.memoizedGetFlatDataFromTree({
256
+ ignoreCollapsed: true,
257
+ getNodeKey: this.props.getNodeKey,
258
+ treeData: treeData
259
+ });
260
+ };
261
+ ReactSortableTree.prototype.handleDndMonitorChange = function () {
262
+ var monitor = this.props.dragDropManager.getMonitor();
263
+ // If the drag ends and the tree is still in a mid-drag state,
264
+ // it means that the drag was canceled or the dragSource dropped
265
+ // elsewhere, and we should reset the state of this tree
266
+ if (!monitor.isDragging() && this.state.draggingTreeData) {
267
+ this.endDrag();
268
+ }
269
+ };
270
+ ReactSortableTree.prototype.toggleChildrenVisibility = function (_a) {
271
+ var targetNode = _a.node, path = _a.path;
272
+ var instanceProps = this.state.instanceProps;
273
+ var treeData = tree_data_utils_1.changeNodeAtPath({
274
+ treeData: instanceProps.treeData,
275
+ path: path,
276
+ newNode: function (_a) {
277
+ var node = _a.node;
278
+ return (__assign(__assign({}, node), { expanded: !node.expanded }));
279
+ },
280
+ getNodeKey: this.props.getNodeKey
281
+ });
282
+ this.props.onChange(treeData);
283
+ this.props.onVisibilityToggle({
284
+ treeData: treeData,
285
+ node: targetNode,
286
+ expanded: !targetNode.expanded,
287
+ path: path
288
+ });
289
+ };
290
+ ReactSortableTree.prototype.moveNode = function (_a) {
291
+ var _this = this;
292
+ var node = _a.node, prevPath = _a.path, prevTreeIndex = _a.treeIndex, depth = _a.depth, minimumTreeIndex = _a.minimumTreeIndex;
293
+ var _b = tree_data_utils_1.insertNode({
294
+ treeData: this.state.draggingTreeData,
295
+ newNode: node,
296
+ depth: depth,
297
+ minimumTreeIndex: minimumTreeIndex,
298
+ expandParent: true,
299
+ getNodeKey: this.props.getNodeKey
300
+ }), treeData = _b.treeData, treeIndex = _b.treeIndex, path = _b.path, nextParentNode = _b.parentNode;
301
+ this.setState({
302
+ draggingTreeData: null,
303
+ draggedNode: null,
304
+ draggedMinimumTreeIndex: null,
305
+ draggedDepth: null,
306
+ dragging: false,
307
+ draggingExpandedPaths: []
308
+ }, function () {
309
+ _this.props.onChange(treeData);
310
+ _this.props.onMoveNode({
311
+ treeData: treeData,
312
+ node: node,
313
+ treeIndex: treeIndex,
314
+ path: path,
315
+ nextPath: path,
316
+ nextTreeIndex: treeIndex,
317
+ prevPath: prevPath,
318
+ prevTreeIndex: prevTreeIndex,
319
+ nextParentNode: nextParentNode
320
+ });
321
+ });
322
+ };
323
+ // returns the new state after search
324
+ ReactSortableTree.search = function (props, state, seekIndex, expand, singleSearch) {
325
+ var onChange = props.onChange, getNodeKey = props.getNodeKey, searchFinishCallback = props.searchFinishCallback, searchQuery = props.searchQuery, searchMethod = props.searchMethod, searchFocusOffset = props.searchFocusOffset, onlyExpandSearchedNodes = props.onlyExpandSearchedNodes;
326
+ var instanceProps = state.instanceProps;
327
+ // Skip search if no conditions are specified
328
+ if (!searchQuery && !searchMethod) {
329
+ if (searchFinishCallback) {
330
+ searchFinishCallback([]);
331
+ }
332
+ return { searchMatches: [] };
333
+ }
334
+ var newState = {};
335
+ // if onlyExpandSearchedNodes collapse the tree and search
336
+ var _a = tree_data_utils_1.find({
337
+ getNodeKey: getNodeKey,
338
+ treeData: onlyExpandSearchedNodes
339
+ ? tree_data_utils_1.toggleExpandedForAll({
340
+ treeData: instanceProps.treeData,
341
+ expanded: false
342
+ })
343
+ : instanceProps.treeData,
344
+ searchQuery: searchQuery,
345
+ searchMethod: searchMethod || default_handlers_1.defaultSearchMethod,
346
+ searchFocusOffset: searchFocusOffset,
347
+ expandAllMatchPaths: expand && !singleSearch,
348
+ expandFocusMatchPaths: !!expand
349
+ }), expandedTreeData = _a.treeData, searchMatches = _a.matches;
350
+ // Update the tree with data leaving all paths leading to matching nodes open
351
+ if (expand) {
352
+ newState.ignoreOneTreeUpdate = true; // Prevents infinite loop
353
+ onChange(expandedTreeData);
354
+ }
355
+ if (searchFinishCallback) {
356
+ searchFinishCallback(searchMatches);
357
+ }
358
+ var searchFocusTreeIndex = null;
359
+ if (seekIndex && searchFocusOffset !== null && searchFocusOffset < searchMatches.length) {
360
+ searchFocusTreeIndex = searchMatches[searchFocusOffset].treeIndex;
361
+ }
362
+ newState.searchMatches = searchMatches;
363
+ newState.searchFocusTreeIndex = searchFocusTreeIndex;
364
+ return newState;
365
+ };
366
+ ReactSortableTree.prototype.startDrag = function (_a) {
367
+ var _this = this;
368
+ var path = _a.path;
369
+ this.setState(function (prevState) {
370
+ var _a = tree_data_utils_1.removeNode({
371
+ treeData: prevState.instanceProps.treeData,
372
+ path: path,
373
+ getNodeKey: _this.props.getNodeKey
374
+ }), draggingTreeData = _a.treeData, draggedNode = _a.node, draggedMinimumTreeIndex = _a.treeIndex;
375
+ return {
376
+ draggingTreeData: draggingTreeData,
377
+ draggedNode: draggedNode,
378
+ draggedDepth: path.length - 1,
379
+ draggedMinimumTreeIndex: draggedMinimumTreeIndex,
380
+ draggedPath: path,
381
+ dragging: true
382
+ };
383
+ });
384
+ };
385
+ ReactSortableTree.prototype.dragHover = function (_a) {
386
+ var _this = this;
387
+ var draggedNode = _a.node, draggedDepth = _a.depth, draggedMinimumTreeIndex = _a.minimumTreeIndex;
388
+ // Ignore this hover if it is at the same position as the last hover
389
+ if (this.state.draggedDepth === draggedDepth &&
390
+ this.state.draggedMinimumTreeIndex === draggedMinimumTreeIndex) {
391
+ return;
392
+ }
393
+ this.setState(function (_a) {
394
+ var draggingTreeData = _a.draggingTreeData, instanceProps = _a.instanceProps, draggingExpandedPaths = _a.draggingExpandedPaths;
395
+ // Fall back to the tree data if something is being dragged in from
396
+ // an external element
397
+ var newDraggingTreeData = draggingTreeData || instanceProps.treeData;
398
+ var addedResult = memoized_tree_data_utils_1.memoizedInsertNode({
399
+ treeData: newDraggingTreeData,
400
+ newNode: draggedNode,
401
+ depth: draggedDepth,
402
+ minimumTreeIndex: draggedMinimumTreeIndex,
403
+ expandParent: true,
404
+ getNodeKey: _this.props.getNodeKey
405
+ });
406
+ var rows = _this.getRows(addedResult.treeData);
407
+ var expandedParentPath = rows[addedResult.treeIndex].path;
408
+ var nodePath = expandedParentPath.slice(0, -1);
409
+ var newDraggingExpandedPaths = ramda_1.pipe(ramda_1.when(ramda_1.always(ramda_1.gt(nodePath.length, 0)), ramda_1.append(nodePath)), ramda_1.uniqWith(ramda_1.eqBy(String)))(draggingExpandedPaths);
410
+ return {
411
+ draggedNode: draggedNode,
412
+ draggedDepth: draggedDepth,
413
+ draggedMinimumTreeIndex: draggedMinimumTreeIndex,
414
+ draggingTreeData: tree_data_utils_1.changeNodeAtPath({
415
+ treeData: newDraggingTreeData,
416
+ path: nodePath,
417
+ newNode: function (_a) {
418
+ var node = _a.node;
419
+ return (__assign(__assign({}, node), { expanded: true }));
420
+ },
421
+ getNodeKey: _this.props.getNodeKey
422
+ }),
423
+ // reset the scroll focus so it doesn't jump back
424
+ // to a search result while dragging
425
+ searchFocusTreeIndex: null,
426
+ dragging: true,
427
+ draggingExpandedPaths: newDraggingExpandedPaths
428
+ };
429
+ });
430
+ };
431
+ ReactSortableTree.prototype.endDrag = function (dropResult) {
432
+ var _this = this;
433
+ var instanceProps = this.state.instanceProps;
434
+ var resetTree = function () {
435
+ return _this.setState({
436
+ draggingTreeData: null,
437
+ draggedNode: null,
438
+ draggedMinimumTreeIndex: null,
439
+ draggedDepth: null,
440
+ dragging: false
441
+ });
442
+ };
443
+ // Drop was cancelled
444
+ if (!dropResult) {
445
+ resetTree();
446
+ }
447
+ else if (dropResult.treeId !== this.treeId) {
448
+ // The node was dropped in an external drop target or tree
449
+ var node = dropResult.node, path = dropResult.path, treeIndex = dropResult.treeIndex;
450
+ var shouldCopy = this.props.shouldCopyOnOutsideDrop;
451
+ if (typeof shouldCopy === 'function') {
452
+ shouldCopy = shouldCopy({
453
+ node: node,
454
+ prevTreeIndex: treeIndex,
455
+ prevPath: path
456
+ });
457
+ }
458
+ var treeData = this.state.draggingTreeData || instanceProps.treeData;
459
+ // If copying is enabled, a drop outside leaves behind a copy in the
460
+ // source tree
461
+ if (shouldCopy) {
462
+ treeData = tree_data_utils_1.changeNodeAtPath({
463
+ treeData: instanceProps.treeData,
464
+ path: path,
465
+ newNode: function (_a) {
466
+ var copyNode = _a.node;
467
+ return (__assign({}, copyNode));
468
+ },
469
+ getNodeKey: this.props.getNodeKey
470
+ });
471
+ }
472
+ this.props.onChange(treeData);
473
+ this.props.onMoveNode({
474
+ treeData: treeData,
475
+ node: node,
476
+ treeIndex: null,
477
+ path: null,
478
+ nextPath: null,
479
+ nextTreeIndex: null,
480
+ prevPath: path,
481
+ prevTreeIndex: treeIndex
482
+ });
483
+ }
484
+ };
485
+ ReactSortableTree.prototype.drop = function (dropResult) {
486
+ this.moveNode(dropResult);
487
+ };
488
+ ReactSortableTree.prototype.canNodeHaveChildren = function (node) {
489
+ var canNodeHaveChildren = this.props.canNodeHaveChildren;
490
+ if (canNodeHaveChildren) {
491
+ return canNodeHaveChildren(node);
492
+ }
493
+ return true;
494
+ };
495
+ // Load any children in the tree that are given by a function
496
+ // calls the onChange callback on the new treeData
497
+ ReactSortableTree.loadLazyChildren = function (props) {
498
+ tree_data_utils_1.walk({
499
+ treeData: props.treeData,
500
+ getNodeKey: props.getNodeKey,
501
+ callback: function (_a) {
502
+ var node = _a.node, path = _a.path, lowerSiblingCounts = _a.lowerSiblingCounts, treeIndex = _a.treeIndex;
503
+ // If the node has children defined by a function, and is either expanded
504
+ // or set to load even before expansion, run the function.
505
+ if (node.pending && (node.expanded || props.loadCollapsedLazyChildren)) {
506
+ // Call the children fetching function
507
+ props.onLazyLoadChildren({
508
+ node: node,
509
+ path: path,
510
+ lowerSiblingCounts: lowerSiblingCounts,
511
+ treeIndex: treeIndex,
512
+ // Provide a helper to append the new data when it is received
513
+ done: function (childrenArray) {
514
+ return props.onChange(tree_data_utils_1.changeNodeAtPath({
515
+ treeData: props.treeData,
516
+ path: path,
517
+ newNode: function (_a) {
518
+ var oldNode = _a.node;
519
+ // Only replace the old node if it's the one we set off to find children
520
+ // for in the first place
521
+ return oldNode === node
522
+ ? __assign(__assign({}, oldNode), { children: childrenArray }) : oldNode;
523
+ },
524
+ getNodeKey: props.getNodeKey
525
+ }), true);
526
+ }
527
+ });
528
+ }
529
+ }
530
+ });
531
+ };
532
+ ReactSortableTree.prototype.renderRow = function (row, _a) {
533
+ var listIndex = _a.listIndex, style = _a.style, getPrevRow = _a.getPrevRow, matchKeys = _a.matchKeys, swapFrom = _a.swapFrom, swapDepth = _a.swapDepth, swapLength = _a.swapLength;
534
+ var node = row.node, parentNode = row.parentNode, path = row.path, lowerSiblingCounts = row.lowerSiblingCounts, treeIndex = row.treeIndex;
535
+ var _b = mergeTheme(this.props), canDrag = _b.canDrag, generateNodeProps = _b.generateNodeProps, scaffoldBlockPxWidth = _b.scaffoldBlockPxWidth, searchFocusOffset = _b.searchFocusOffset, rowDirection = _b.rowDirection;
536
+ var TreeNodeRenderer = this.treeNodeRenderer;
537
+ var NodeContentRenderer = this.nodeContentRenderer;
538
+ var nodeKey = path[path.length - 1];
539
+ var isSearchMatch = nodeKey in matchKeys;
540
+ var isSearchFocus = isSearchMatch && matchKeys[nodeKey] === searchFocusOffset;
541
+ var callbackParams = {
542
+ node: node,
543
+ parentNode: parentNode,
544
+ path: path,
545
+ lowerSiblingCounts: lowerSiblingCounts,
546
+ treeIndex: treeIndex,
547
+ isSearchMatch: isSearchMatch,
548
+ isSearchFocus: isSearchFocus
549
+ };
550
+ var nodeProps = !generateNodeProps ? {} : generateNodeProps(callbackParams);
551
+ var rowCanDrag = typeof canDrag !== 'function' ? canDrag : canDrag(callbackParams);
552
+ var sharedProps = {
553
+ treeIndex: treeIndex,
554
+ scaffoldBlockPxWidth: scaffoldBlockPxWidth,
555
+ node: node,
556
+ path: path,
557
+ treeId: this.treeId,
558
+ rowDirection: rowDirection
559
+ };
560
+ return (react_1.default.createElement(TreeNodeRenderer, __assign({ style: style, key: nodeKey, listIndex: listIndex, getPrevRow: getPrevRow, lowerSiblingCounts: lowerSiblingCounts, swapFrom: swapFrom, swapLength: swapLength, swapDepth: swapDepth }, sharedProps),
561
+ react_1.default.createElement(NodeContentRenderer, __assign({ parentNode: parentNode, isSearchMatch: isSearchMatch, isSearchFocus: isSearchFocus, canDrag: rowCanDrag, toggleChildrenVisibility: this.toggleChildrenVisibility }, sharedProps, nodeProps))));
562
+ };
563
+ ReactSortableTree.prototype.render = function () {
564
+ var _this = this;
565
+ var _a = mergeTheme(this.props), dragDropManager = _a.dragDropManager, style = _a.style, className = _a.className, innerStyle = _a.innerStyle, rowHeight = _a.rowHeight, isVirtualized = _a.isVirtualized, placeholderRenderer = _a.placeholderRenderer, reactVirtualizedListProps = _a.reactVirtualizedListProps, getNodeKey = _a.getNodeKey, rowDirection = _a.rowDirection;
566
+ var _b = this.state, searchMatches = _b.searchMatches, searchFocusTreeIndex = _b.searchFocusTreeIndex, draggedNode = _b.draggedNode, draggedDepth = _b.draggedDepth, draggedMinimumTreeIndex = _b.draggedMinimumTreeIndex;
567
+ var treeData = this.state.draggingTreeData || this.props.treeData;
568
+ var rowDirectionClass = rowDirection === 'rtl' ? 'rst__rtl' : null;
569
+ var rows;
570
+ var swapFrom = null;
571
+ var swapLength = null;
572
+ if (draggedNode && draggedMinimumTreeIndex !== null) {
573
+ var addedResult = memoized_tree_data_utils_1.memoizedInsertNode({
574
+ treeData: treeData,
575
+ newNode: draggedNode,
576
+ depth: draggedDepth,
577
+ minimumTreeIndex: draggedMinimumTreeIndex,
578
+ expandParent: true,
579
+ getNodeKey: getNodeKey
580
+ });
581
+ var swapTo = draggedMinimumTreeIndex;
582
+ swapFrom = addedResult.treeIndex;
583
+ swapLength = 1 + memoized_tree_data_utils_1.memoizedGetDescendantCount({ node: draggedNode });
584
+ rows = generic_utils_1.slideRows(this.getRows(addedResult.treeData), swapFrom, swapTo, swapLength);
585
+ }
586
+ else {
587
+ rows = this.getRows(treeData);
588
+ }
589
+ // Get indices for rows that match the search conditions
590
+ var matchKeys = {};
591
+ searchMatches.forEach(function (_a, i) {
592
+ var path = _a.path;
593
+ matchKeys[path[path.length - 1]] = i;
594
+ });
595
+ // Seek to the focused search result if there is one specified
596
+ var scrollToInfo = searchFocusTreeIndex !== null ? { scrollToIndex: searchFocusTreeIndex } : {};
597
+ var containerStyle = style;
598
+ var list;
599
+ if (rows.length < 1) {
600
+ var Placeholder = this.treePlaceholderRenderer;
601
+ var PlaceholderContent = placeholderRenderer;
602
+ list = (react_1.default.createElement(Placeholder, { treeId: this.treeId, drop: this.drop },
603
+ react_1.default.createElement(PlaceholderContent, null)));
604
+ }
605
+ else if (isVirtualized) {
606
+ containerStyle = __assign({ height: '100%' }, containerStyle);
607
+ var ScrollZoneVirtualList_1 = this.scrollZoneVirtualList;
608
+ // Render list with react-virtualized
609
+ list = (react_1.default.createElement(react_virtualized_1.AutoSizer, null, function (_a) {
610
+ var height = _a.height, width = _a.width;
611
+ return (react_1.default.createElement(ScrollZoneVirtualList_1, __assign({}, scrollToInfo, { dragDropManager: dragDropManager, verticalStrength: _this.vStrength, horizontalStrength: _this.hStrength, speed: 30, scrollToAlignment: "start", className: _this.props.classes.rst__virtualScrollOverride, width: width, onScroll: function (_a) {
612
+ var scrollTop = _a.scrollTop;
613
+ _this.scrollTop = scrollTop;
614
+ }, height: height, style: innerStyle, rowCount: rows.length, estimatedRowSize: typeof rowHeight !== 'function' ? rowHeight : undefined, rowHeight: typeof rowHeight !== 'function'
615
+ ? rowHeight
616
+ : function (_a) {
617
+ var index = _a.index;
618
+ return rowHeight({
619
+ index: index,
620
+ treeIndex: index,
621
+ node: rows[index].node,
622
+ path: rows[index].path
623
+ });
624
+ }, rowRenderer: function (_a) {
625
+ var index = _a.index, rowStyle = _a.style;
626
+ return _this.renderRow(rows[index], {
627
+ listIndex: index,
628
+ style: rowStyle,
629
+ getPrevRow: function () { return rows[index - 1] || null; },
630
+ matchKeys: matchKeys,
631
+ swapFrom: swapFrom,
632
+ swapDepth: draggedDepth,
633
+ swapLength: swapLength
634
+ });
635
+ } }, reactVirtualizedListProps)));
636
+ }));
637
+ }
638
+ else {
639
+ // Render list without react-virtualized
640
+ list = rows.map(function (row, index) {
641
+ return _this.renderRow(row, {
642
+ listIndex: index,
643
+ style: {
644
+ height: typeof rowHeight !== 'function'
645
+ ? rowHeight
646
+ : rowHeight({
647
+ index: index,
648
+ treeIndex: index,
649
+ node: row.node,
650
+ path: row.path
651
+ })
652
+ },
653
+ getPrevRow: function () { return rows[index - 1] || null; },
654
+ matchKeys: matchKeys,
655
+ swapFrom: swapFrom,
656
+ swapDepth: draggedDepth,
657
+ swapLength: swapLength
658
+ });
659
+ });
660
+ }
661
+ return (react_1.default.createElement("div", { className: classnames_1.default('rst__tree', className, rowDirectionClass), style: containerStyle }, list));
662
+ };
663
+ return ReactSortableTree;
664
+ }(react_1.Component));
665
+ ReactSortableTree.propTypes = {
666
+ classes: prop_types_1.default.object,
667
+ dragDropManager: prop_types_1.default.shape({
668
+ getMonitor: prop_types_1.default.func
669
+ }).isRequired,
670
+ // Tree data in the following format:
671
+ // [{title: 'main', subtitle: 'sub'}, { title: 'value2', expanded: true, children: [{ title: 'value3') }] }]
672
+ // `title` is the primary label for the node
673
+ // `subtitle` is a secondary label for the node
674
+ // `expanded` shows children of the node if true, or hides them if false. Defaults to false.
675
+ // `children` is an array of child nodes belonging to the node.
676
+ treeData: prop_types_1.default.arrayOf(prop_types_1.default.object).isRequired,
677
+ // Style applied to the container wrapping the tree (style defaults to {height: '100%'})
678
+ style: prop_types_1.default.shape({}),
679
+ // Class name for the container wrapping the tree
680
+ className: prop_types_1.default.string,
681
+ // Style applied to the inner, scrollable container (for padding, etc.)
682
+ innerStyle: prop_types_1.default.shape({}),
683
+ // Used by react-virtualized
684
+ // Either a fixed row height (number) or a function that returns the
685
+ // height of a row given its index: `({ index: number }): number`
686
+ rowHeight: prop_types_1.default.oneOfType([prop_types_1.default.number, prop_types_1.default.func]),
687
+ // Size in px of the region near the edges that initiates scrolling on dragover
688
+ slideRegionSize: prop_types_1.default.number,
689
+ // Custom properties to hand to the react-virtualized list
690
+ // https://github.com/bvaughn/react-virtualized/blob/master/docs/List.md#prop-types
691
+ reactVirtualizedListProps: prop_types_1.default.shape({}),
692
+ // The width of the blocks containing the lines representing the structure of the tree.
693
+ scaffoldBlockPxWidth: prop_types_1.default.number,
694
+ // Maximum depth nodes can be inserted at. Defaults to infinite.
695
+ maxDepth: prop_types_1.default.number,
696
+ // The method used to search nodes.
697
+ // Defaults to a function that uses the `searchQuery` string to search for nodes with
698
+ // matching `title` or `subtitle` values.
699
+ // NOTE: Changing `searchMethod` will not update the search, but changing the `searchQuery` will.
700
+ searchMethod: prop_types_1.default.func,
701
+ // Used by the `searchMethod` to highlight and scroll to matched nodes.
702
+ // Should be a string for the default `searchMethod`, but can be anything when using a custom search.
703
+ searchQuery: prop_types_1.default.any,
704
+ // Outline the <`searchFocusOffset`>th node and scroll to it.
705
+ searchFocusOffset: prop_types_1.default.number,
706
+ // Get the nodes that match the search criteria. Used for counting total matches, etc.
707
+ searchFinishCallback: prop_types_1.default.func,
708
+ // Generate an object with additional props to be passed to the node renderer.
709
+ // Use this for adding buttons via the `buttons` key,
710
+ // or additional `style` / `className` settings.
711
+ generateNodeProps: prop_types_1.default.func,
712
+ // Set to false to disable virtualization.
713
+ // NOTE: Auto-scrolling while dragging, and scrolling to the `searchFocusOffset` will be disabled.
714
+ isVirtualized: prop_types_1.default.bool,
715
+ treeNodeRenderer: prop_types_1.default.func,
716
+ // Override the default component for rendering nodes (but keep the scaffolding generator)
717
+ // This is an advanced option for complete customization of the appearance.
718
+ // It is best to copy the component in `node-renderer-default.js` to use as a base, and customize as needed.
719
+ nodeContentRenderer: prop_types_1.default.func,
720
+ // Override the default component for rendering an empty tree
721
+ // This is an advanced option for complete customization of the appearance.
722
+ // It is best to copy the component in `placeholder-renderer-default.js` to use as a base,
723
+ // and customize as needed.
724
+ placeholderRenderer: prop_types_1.default.func,
725
+ theme: prop_types_1.default.shape({
726
+ style: prop_types_1.default.shape({}),
727
+ innerStyle: prop_types_1.default.shape({}),
728
+ reactVirtualizedListProps: prop_types_1.default.shape({}),
729
+ scaffoldBlockPxWidth: prop_types_1.default.number,
730
+ slideRegionSize: prop_types_1.default.number,
731
+ rowHeight: prop_types_1.default.oneOfType([prop_types_1.default.number, prop_types_1.default.func]),
732
+ treeNodeRenderer: prop_types_1.default.func,
733
+ nodeContentRenderer: prop_types_1.default.func,
734
+ placeholderRenderer: prop_types_1.default.func
735
+ }),
736
+ // Determine the unique key used to identify each node and
737
+ // generate the `path` array passed in callbacks.
738
+ // By default, returns the index in the tree (omitting hidden nodes).
739
+ getNodeKey: prop_types_1.default.func,
740
+ // Called whenever tree data changed.
741
+ // Just like with React input elements, you have to update your
742
+ // own component's data to see the changes reflected.
743
+ onChange: prop_types_1.default.func.isRequired,
744
+ // Called after node move operation.
745
+ onMoveNode: prop_types_1.default.func,
746
+ // Determine whether a node can be dragged. Set to false to disable dragging on all nodes.
747
+ canDrag: prop_types_1.default.oneOfType([prop_types_1.default.func, prop_types_1.default.bool]),
748
+ // Determine whether a node can be dropped based on its path and parents'.
749
+ canDrop: prop_types_1.default.func,
750
+ // Determine whether a node can have children
751
+ canNodeHaveChildren: prop_types_1.default.func,
752
+ // When true, or a callback returning true, dropping nodes to react-dnd
753
+ // drop targets outside of this tree will not remove them from this tree
754
+ shouldCopyOnOutsideDrop: prop_types_1.default.oneOfType([prop_types_1.default.func, prop_types_1.default.bool]),
755
+ // Called after children nodes collapsed or expanded.
756
+ onVisibilityToggle: prop_types_1.default.func,
757
+ dndType: prop_types_1.default.string,
758
+ // Called to track between dropped and dragging
759
+ onDragStateChanged: prop_types_1.default.func,
760
+ // Specify that nodes that do not match search will be collapsed
761
+ onlyExpandSearchedNodes: prop_types_1.default.bool,
762
+ // rtl support
763
+ rowDirection: prop_types_1.default.string,
764
+ onLazyLoadChildren: prop_types_1.default.func,
765
+ ignoreTreeChanges: prop_types_1.default.bool
766
+ };
767
+ ReactSortableTree.defaultProps = {
768
+ canDrag: true,
769
+ canDrop: null,
770
+ canNodeHaveChildren: function () { return true; },
771
+ className: '',
772
+ dndType: null,
773
+ generateNodeProps: null,
774
+ getNodeKey: default_handlers_1.defaultGetNodeKey,
775
+ innerStyle: {},
776
+ isVirtualized: true,
777
+ maxDepth: null,
778
+ treeNodeRenderer: null,
779
+ nodeContentRenderer: null,
780
+ onMoveNode: function () { },
781
+ onVisibilityToggle: function () { },
782
+ placeholderRenderer: null,
783
+ reactVirtualizedListProps: {},
784
+ rowHeight: null,
785
+ scaffoldBlockPxWidth: null,
786
+ searchFinishCallback: null,
787
+ searchFocusOffset: null,
788
+ searchMethod: null,
789
+ searchQuery: null,
790
+ shouldCopyOnOutsideDrop: false,
791
+ slideRegionSize: null,
792
+ style: {},
793
+ theme: {},
794
+ onDragStateChanged: function () { },
795
+ onlyExpandSearchedNodes: false,
796
+ rowDirection: 'ltr',
797
+ onLazyLoadChildren: function () { },
798
+ ignoreTreeChanges: false
799
+ };
800
+ react_lifecycles_compat_1.polyfill(ReactSortableTree);
801
+ var StyledReactSortableTree = styles_1.withStyles(reactSortableTreeStyles_1.styles)(ReactSortableTree);
802
+ var SortableTreeWithoutDndContext = function (props) { return (react_1.default.createElement(react_dnd_1.DndContext.Consumer, null, function (_a) {
803
+ var dragDropManager = _a.dragDropManager;
804
+ return dragDropManager === undefined ? null : (react_1.default.createElement(StyledReactSortableTree, __assign({}, props, { dragDropManager: dragDropManager })));
805
+ })); };
806
+ exports.SortableTreeWithoutDndContext = SortableTreeWithoutDndContext;
807
+ var SortableTree = function (props) { return (react_1.default.createElement(react_dnd_1.DndProvider, { backend: react_dnd_html5_backend_1.default },
808
+ react_1.default.createElement(SortableTreeWithoutDndContext, __assign({}, props)))); };
809
+ exports.default = SortableTree;