@neo4j-ndl/react 0.1.2 → 0.1.3-alpha.19
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.
- package/lib/cjs/alert/Alert.js +102 -0
- package/lib/cjs/alert/Alert.js.map +1 -0
- package/lib/{alert → cjs/alert}/index.js +6 -10
- package/lib/cjs/alert/index.js.map +1 -0
- package/lib/cjs/button/Button.js +116 -0
- package/lib/cjs/button/Button.js.map +1 -0
- package/lib/{button → cjs/button}/index.js +6 -2
- package/lib/cjs/button/index.js.map +1 -0
- package/lib/{checkbox → cjs/checkbox}/Checkbox.js +10 -20
- package/lib/cjs/checkbox/Checkbox.js.map +1 -0
- package/lib/{checkbox → cjs/checkbox}/index.js +5 -9
- package/lib/cjs/checkbox/index.js.map +1 -0
- package/lib/{context-menu → cjs/context-menu}/ContextMenu.js +83 -95
- package/lib/cjs/context-menu/ContextMenu.js.map +1 -0
- package/lib/{context-menu → cjs/context-menu}/index.js +6 -2
- package/lib/cjs/context-menu/index.js.map +1 -0
- package/lib/cjs/drag-and-drop/DragAndDrop.js +66 -0
- package/lib/cjs/drag-and-drop/DragAndDrop.js.map +1 -0
- package/lib/cjs/drag-and-drop/icons/CSV-file.js +6 -0
- package/lib/cjs/drag-and-drop/icons/CSV-file.js.map +1 -0
- package/lib/cjs/drag-and-drop/icons/Cloud.js +6 -0
- package/lib/cjs/drag-and-drop/icons/Cloud.js.map +1 -0
- package/lib/cjs/drag-and-drop/icons/File.js +6 -0
- package/lib/cjs/drag-and-drop/icons/File.js.map +1 -0
- package/lib/cjs/drag-and-drop/icons/InvalidFile.js +6 -0
- package/lib/cjs/drag-and-drop/icons/InvalidFile.js.map +1 -0
- package/lib/cjs/drag-and-drop/index.js +29 -0
- package/lib/cjs/drag-and-drop/index.js.map +1 -0
- package/lib/{helpers → cjs/helpers}/debounce.js +7 -13
- package/lib/cjs/helpers/debounce.js.map +1 -0
- package/lib/{helpers → cjs/helpers}/forwardRef.js +2 -2
- package/lib/cjs/helpers/forwardRef.js.map +1 -0
- package/lib/{helpers → cjs/helpers}/index.js +6 -2
- package/lib/cjs/helpers/index.js.map +1 -0
- package/lib/cjs/helpers/testing.js +46 -0
- package/lib/cjs/helpers/testing.js.map +1 -0
- package/lib/{helpers → cjs/helpers}/types.js +1 -1
- package/lib/cjs/helpers/types.js.map +1 -0
- package/lib/{icons → cjs/icons}/Custom.js +33 -43
- package/lib/cjs/icons/Custom.js.map +1 -0
- package/lib/cjs/icons/Hero.js +59 -0
- package/lib/cjs/icons/Hero.js.map +1 -0
- package/lib/cjs/icons/custom/Circle.js +6 -0
- package/lib/cjs/icons/custom/Circle.js.map +1 -0
- package/lib/cjs/icons/custom/CollapseExpand.js +6 -0
- package/lib/cjs/icons/custom/CollapseExpand.js.map +1 -0
- package/lib/cjs/icons/custom/DatabaseAddCircle.js +6 -0
- package/lib/cjs/icons/custom/DatabaseAddCircle.js.map +1 -0
- package/lib/cjs/icons/custom/Dbms.js +6 -0
- package/lib/cjs/icons/custom/Dbms.js.map +1 -0
- package/lib/cjs/icons/custom/Drag.js +6 -0
- package/lib/cjs/icons/custom/Drag.js.map +1 -0
- package/lib/cjs/icons/custom/Expand.js +6 -0
- package/lib/cjs/icons/custom/Expand.js.map +1 -0
- package/lib/cjs/icons/custom/ExternalLink.js +6 -0
- package/lib/cjs/icons/custom/ExternalLink.js.map +1 -0
- package/lib/cjs/icons/custom/FitToScreen.js +6 -0
- package/lib/cjs/icons/custom/FitToScreen.js.map +1 -0
- package/lib/cjs/icons/custom/FolderBookmark.js +6 -0
- package/lib/cjs/icons/custom/FolderBookmark.js.map +1 -0
- package/lib/cjs/icons/custom/Heirarchy2.js +6 -0
- package/lib/cjs/icons/custom/Heirarchy2.js.map +1 -0
- package/lib/cjs/icons/custom/Hierarchy1.js +6 -0
- package/lib/cjs/icons/custom/Hierarchy1.js.map +1 -0
- package/lib/cjs/icons/custom/Hierarchy2.js +6 -0
- package/lib/cjs/icons/custom/Hierarchy2.js.map +1 -0
- package/lib/cjs/icons/custom/NomLevel.js +6 -0
- package/lib/cjs/icons/custom/NomLevel.js.map +1 -0
- package/lib/cjs/icons/custom/Pin.js +6 -0
- package/lib/cjs/icons/custom/Pin.js.map +1 -0
- package/lib/cjs/icons/custom/Presentation.js +6 -0
- package/lib/cjs/icons/custom/Presentation.js.map +1 -0
- package/lib/cjs/icons/custom/QueryBrowser.js +6 -0
- package/lib/cjs/icons/custom/QueryBrowser.js.map +1 -0
- package/lib/cjs/icons/custom/Rhombus.js +6 -0
- package/lib/cjs/icons/custom/Rhombus.js.map +1 -0
- package/lib/cjs/icons/custom/ScienceMolecule.js +6 -0
- package/lib/cjs/icons/custom/ScienceMolecule.js.map +1 -0
- package/lib/cjs/icons/custom/Shrink.js +6 -0
- package/lib/cjs/icons/custom/Shrink.js.map +1 -0
- package/lib/cjs/icons/custom/Text.js +6 -0
- package/lib/cjs/icons/custom/Text.js.map +1 -0
- package/lib/cjs/icons/custom/Triangle.js +6 -0
- package/lib/cjs/icons/custom/Triangle.js.map +1 -0
- package/lib/cjs/icons/custom/VisualizeBloom.js +6 -0
- package/lib/cjs/icons/custom/VisualizeBloom.js.map +1 -0
- package/lib/cjs/icons/custom/index.js +71 -0
- package/lib/cjs/icons/custom/index.js.map +1 -0
- package/lib/{icons → cjs/icons}/index.js +6 -10
- package/lib/cjs/icons/index.js.map +1 -0
- package/lib/{index.js → cjs/index.js} +9 -2
- package/lib/cjs/index.js.map +1 -0
- package/lib/cjs/input/Input.js +60 -0
- package/lib/cjs/input/Input.js.map +1 -0
- package/lib/{input → cjs/input}/index.js +5 -9
- package/lib/cjs/input/index.js.map +1 -0
- package/lib/cjs/label/Label.js +103 -0
- package/lib/cjs/label/Label.js.map +1 -0
- package/lib/{label → cjs/label}/index.js +5 -9
- package/lib/cjs/label/index.js.map +1 -0
- package/lib/{loading-spinner → cjs/loading-spinner}/LoadingSpinner.js +23 -34
- package/lib/cjs/loading-spinner/LoadingSpinner.js.map +1 -0
- package/lib/{loading-spinner → cjs/loading-spinner}/index.js +5 -9
- package/lib/cjs/loading-spinner/index.js.map +1 -0
- package/lib/{popover → cjs/popover}/Popover.js +86 -97
- package/lib/cjs/popover/Popover.js.map +1 -0
- package/lib/{popover → cjs/popover}/index.js +6 -2
- package/lib/cjs/popover/index.js.map +1 -0
- package/lib/cjs/progress-bar/ProgressBar.js +46 -0
- package/lib/cjs/progress-bar/ProgressBar.js.map +1 -0
- package/lib/{progress-bar → cjs/progress-bar}/index.js +5 -9
- package/lib/cjs/progress-bar/index.js.map +1 -0
- package/lib/{radio → cjs/radio}/Radio.js +10 -20
- package/lib/cjs/radio/Radio.js.map +1 -0
- package/lib/{radio → cjs/radio}/index.js +5 -9
- package/lib/cjs/radio/index.js.map +1 -0
- package/lib/{switch → cjs/switch}/Switch.js +10 -20
- package/lib/cjs/switch/Switch.js.map +1 -0
- package/lib/{switch → cjs/switch}/index.js +5 -9
- package/lib/cjs/switch/index.js.map +1 -0
- package/lib/cjs/table/Table.js +122 -0
- package/lib/cjs/table/Table.js.map +1 -0
- package/lib/cjs/table/TableNavigation.js +51 -0
- package/lib/cjs/table/TableNavigation.js.map +1 -0
- package/lib/cjs/table/helpers.js +107 -0
- package/lib/cjs/table/helpers.js.map +1 -0
- package/lib/cjs/table/hooks/hookCallbackTypes.js +23 -0
- package/lib/cjs/table/hooks/hookCallbackTypes.js.map +1 -0
- package/lib/cjs/table/hooks/index.js +40 -0
- package/lib/cjs/table/hooks/index.js.map +1 -0
- package/lib/cjs/table/hooks/useMultiRowSelect.js +84 -0
- package/lib/cjs/table/hooks/useMultiRowSelect.js.map +1 -0
- package/lib/cjs/table/hooks/useSingleRowSelect.js +61 -0
- package/lib/cjs/table/hooks/useSingleRowSelect.js.map +1 -0
- package/lib/cjs/table/index.js +44 -0
- package/lib/cjs/table/index.js.map +1 -0
- package/lib/cjs/tabs/Tabs.js +105 -0
- package/lib/cjs/tabs/Tabs.js.map +1 -0
- package/lib/{tabs → cjs/tabs}/index.js +6 -2
- package/lib/cjs/tabs/index.js.map +1 -0
- package/lib/{tag → cjs/tag}/Tag.js +25 -38
- package/lib/cjs/tag/Tag.js.map +1 -0
- package/lib/{tag → cjs/tag}/index.js +5 -9
- package/lib/cjs/tag/index.js.map +1 -0
- package/lib/{tooltip → cjs/tooltip}/Tooltip.js +23 -35
- package/lib/cjs/tooltip/Tooltip.js.map +1 -0
- package/lib/{tooltip → cjs/tooltip}/index.js +5 -9
- package/lib/cjs/tooltip/index.js.map +1 -0
- package/lib/{view-selector → cjs/view-selector}/ViewSelector.js +45 -52
- package/lib/cjs/view-selector/ViewSelector.js.map +1 -0
- package/lib/{view-selector → cjs/view-selector}/index.js +6 -2
- package/lib/cjs/view-selector/index.js.map +1 -0
- package/lib/esm/alert/Alert.js +95 -0
- package/lib/esm/alert/Alert.js.map +1 -0
- package/lib/esm/alert/index.js +22 -0
- package/lib/esm/alert/index.js.map +1 -0
- package/lib/esm/button/Button.js +108 -0
- package/lib/esm/button/Button.js.map +1 -0
- package/lib/esm/button/index.js +22 -0
- package/lib/esm/button/index.js.map +1 -0
- package/lib/esm/checkbox/Checkbox.js +47 -0
- package/lib/esm/checkbox/Checkbox.js.map +1 -0
- package/lib/esm/checkbox/index.js +22 -0
- package/lib/esm/checkbox/index.js.map +1 -0
- package/lib/esm/context-menu/ContextMenu.js +189 -0
- package/lib/esm/context-menu/ContextMenu.js.map +1 -0
- package/lib/esm/context-menu/index.js +22 -0
- package/lib/esm/context-menu/index.js.map +1 -0
- package/lib/esm/drag-and-drop/DragAndDrop.js +61 -0
- package/lib/esm/drag-and-drop/DragAndDrop.js.map +1 -0
- package/lib/esm/drag-and-drop/icons/CSV-file.js +4 -0
- package/lib/esm/drag-and-drop/icons/CSV-file.js.map +1 -0
- package/lib/esm/drag-and-drop/icons/Cloud.js +4 -0
- package/lib/esm/drag-and-drop/icons/Cloud.js.map +1 -0
- package/lib/esm/drag-and-drop/icons/File.js +4 -0
- package/lib/esm/drag-and-drop/icons/File.js.map +1 -0
- package/lib/esm/drag-and-drop/icons/InvalidFile.js +4 -0
- package/lib/esm/drag-and-drop/icons/InvalidFile.js.map +1 -0
- package/lib/esm/drag-and-drop/index.js +22 -0
- package/lib/esm/drag-and-drop/index.js.map +1 -0
- package/lib/esm/helpers/debounce.js +37 -0
- package/lib/esm/helpers/debounce.js.map +1 -0
- package/lib/esm/helpers/forwardRef.js +23 -0
- package/lib/esm/helpers/forwardRef.js.map +1 -0
- package/lib/esm/helpers/index.js +24 -0
- package/lib/esm/helpers/index.js.map +1 -0
- package/lib/esm/helpers/testing.js +42 -0
- package/lib/esm/helpers/testing.js.map +1 -0
- package/lib/esm/helpers/types.js +22 -0
- package/lib/esm/helpers/types.js.map +1 -0
- package/lib/esm/icons/Custom.js +41 -0
- package/lib/esm/icons/Custom.js.map +1 -0
- package/lib/esm/icons/Hero.js +33 -0
- package/lib/esm/icons/Hero.js.map +1 -0
- package/lib/esm/icons/custom/Circle.js +4 -0
- package/lib/esm/icons/custom/Circle.js.map +1 -0
- package/lib/esm/icons/custom/CollapseExpand.js +4 -0
- package/lib/esm/icons/custom/CollapseExpand.js.map +1 -0
- package/lib/esm/icons/custom/DatabaseAddCircle.js +4 -0
- package/lib/esm/icons/custom/DatabaseAddCircle.js.map +1 -0
- package/lib/esm/icons/custom/Dbms.js +4 -0
- package/lib/esm/icons/custom/Dbms.js.map +1 -0
- package/lib/esm/icons/custom/Drag.js +4 -0
- package/lib/esm/icons/custom/Drag.js.map +1 -0
- package/lib/esm/icons/custom/Expand.js +4 -0
- package/lib/esm/icons/custom/Expand.js.map +1 -0
- package/lib/esm/icons/custom/ExternalLink.js +4 -0
- package/lib/esm/icons/custom/ExternalLink.js.map +1 -0
- package/lib/esm/icons/custom/FitToScreen.js +4 -0
- package/lib/esm/icons/custom/FitToScreen.js.map +1 -0
- package/lib/esm/icons/custom/FolderBookmark.js +4 -0
- package/lib/esm/icons/custom/FolderBookmark.js.map +1 -0
- package/lib/esm/icons/custom/Heirarchy2.js +4 -0
- package/lib/esm/icons/custom/Heirarchy2.js.map +1 -0
- package/lib/esm/icons/custom/Hierarchy1.js +4 -0
- package/lib/esm/icons/custom/Hierarchy1.js.map +1 -0
- package/lib/esm/icons/custom/Hierarchy2.js +4 -0
- package/lib/esm/icons/custom/Hierarchy2.js.map +1 -0
- package/lib/esm/icons/custom/NomLevel.js +4 -0
- package/lib/esm/icons/custom/NomLevel.js.map +1 -0
- package/lib/esm/icons/custom/Pin.js +4 -0
- package/lib/esm/icons/custom/Pin.js.map +1 -0
- package/lib/esm/icons/custom/Presentation.js +4 -0
- package/lib/esm/icons/custom/Presentation.js.map +1 -0
- package/lib/esm/icons/custom/QueryBrowser.js +4 -0
- package/lib/esm/icons/custom/QueryBrowser.js.map +1 -0
- package/lib/esm/icons/custom/Rhombus.js +4 -0
- package/lib/esm/icons/custom/Rhombus.js.map +1 -0
- package/lib/esm/icons/custom/ScienceMolecule.js +4 -0
- package/lib/esm/icons/custom/ScienceMolecule.js.map +1 -0
- package/lib/esm/icons/custom/Shrink.js +4 -0
- package/lib/esm/icons/custom/Shrink.js.map +1 -0
- package/lib/esm/icons/custom/Text.js +4 -0
- package/lib/esm/icons/custom/Text.js.map +1 -0
- package/lib/esm/icons/custom/Triangle.js +4 -0
- package/lib/esm/icons/custom/Triangle.js.map +1 -0
- package/lib/esm/icons/custom/VisualizeBloom.js +4 -0
- package/lib/esm/icons/custom/VisualizeBloom.js.map +1 -0
- package/lib/esm/icons/custom/index.js +43 -0
- package/lib/esm/icons/custom/index.js.map +1 -0
- package/lib/esm/icons/index.js +23 -0
- package/lib/esm/icons/index.js.map +1 -0
- package/lib/esm/index.js +37 -0
- package/lib/esm/index.js.map +1 -0
- package/lib/esm/input/Input.js +55 -0
- package/lib/esm/input/Input.js.map +1 -0
- package/lib/esm/input/index.js +22 -0
- package/lib/esm/input/index.js.map +1 -0
- package/lib/esm/label/Label.js +97 -0
- package/lib/esm/label/Label.js.map +1 -0
- package/lib/esm/label/index.js +22 -0
- package/lib/esm/label/index.js.map +1 -0
- package/lib/esm/loading-spinner/LoadingSpinner.js +48 -0
- package/lib/esm/loading-spinner/LoadingSpinner.js.map +1 -0
- package/lib/esm/loading-spinner/index.js +22 -0
- package/lib/esm/loading-spinner/index.js.map +1 -0
- package/lib/esm/popover/Popover.js +184 -0
- package/lib/esm/popover/Popover.js.map +1 -0
- package/lib/esm/popover/index.js +22 -0
- package/lib/esm/popover/index.js.map +1 -0
- package/lib/esm/progress-bar/ProgressBar.js +41 -0
- package/lib/esm/progress-bar/ProgressBar.js.map +1 -0
- package/lib/esm/progress-bar/index.js +22 -0
- package/lib/esm/progress-bar/index.js.map +1 -0
- package/lib/esm/radio/Radio.js +43 -0
- package/lib/esm/radio/Radio.js.map +1 -0
- package/lib/esm/radio/index.js +22 -0
- package/lib/esm/radio/index.js.map +1 -0
- package/lib/esm/switch/Switch.js +43 -0
- package/lib/esm/switch/Switch.js.map +1 -0
- package/lib/esm/switch/index.js +22 -0
- package/lib/esm/switch/index.js.map +1 -0
- package/lib/esm/table/Table.js +115 -0
- package/lib/esm/table/Table.js.map +1 -0
- package/lib/esm/table/TableNavigation.js +44 -0
- package/lib/esm/table/TableNavigation.js.map +1 -0
- package/lib/esm/table/helpers.js +100 -0
- package/lib/esm/table/helpers.js.map +1 -0
- package/lib/esm/table/hooks/hookCallbackTypes.js +22 -0
- package/lib/esm/table/hooks/hookCallbackTypes.js.map +1 -0
- package/lib/esm/table/hooks/index.js +24 -0
- package/lib/esm/table/hooks/index.js.map +1 -0
- package/lib/esm/table/hooks/useMultiRowSelect.js +82 -0
- package/lib/esm/table/hooks/useMultiRowSelect.js.map +1 -0
- package/lib/esm/table/hooks/useSingleRowSelect.js +57 -0
- package/lib/esm/table/hooks/useSingleRowSelect.js.map +1 -0
- package/lib/esm/table/index.js +23 -0
- package/lib/esm/table/index.js.map +1 -0
- package/lib/esm/tabs/Tabs.js +76 -0
- package/lib/esm/tabs/Tabs.js.map +1 -0
- package/lib/esm/tabs/index.js +22 -0
- package/lib/esm/tabs/index.js.map +1 -0
- package/lib/esm/tag/Tag.js +62 -0
- package/lib/esm/tag/Tag.js.map +1 -0
- package/lib/esm/tag/index.js +22 -0
- package/lib/esm/tag/index.js.map +1 -0
- package/lib/esm/tooltip/Tooltip.js +41 -0
- package/lib/esm/tooltip/Tooltip.js.map +1 -0
- package/lib/esm/tooltip/index.js +22 -0
- package/lib/esm/tooltip/index.js.map +1 -0
- package/lib/esm/view-selector/ViewSelector.js +60 -0
- package/lib/esm/view-selector/ViewSelector.js.map +1 -0
- package/lib/esm/view-selector/index.js +22 -0
- package/lib/esm/view-selector/index.js.map +1 -0
- package/lib/{alert → types/alert}/Alert.d.ts +0 -0
- package/lib/{alert → types/alert}/index.d.ts +0 -0
- package/lib/{button → types/button}/Button.d.ts +0 -0
- package/lib/{button → types/button}/index.d.ts +0 -0
- package/lib/{checkbox → types/checkbox}/Checkbox.d.ts +0 -0
- package/lib/{checkbox → types/checkbox}/index.d.ts +0 -0
- package/lib/{context-menu → types/context-menu}/ContextMenu.d.ts +0 -0
- package/lib/{context-menu → types/context-menu}/index.d.ts +0 -0
- package/lib/types/drag-and-drop/DragAndDrop.d.ts +47 -0
- package/lib/types/drag-and-drop/icons/CSV-file.d.ts +23 -0
- package/lib/types/drag-and-drop/icons/Cloud.d.ts +23 -0
- package/lib/types/drag-and-drop/icons/File.d.ts +23 -0
- package/lib/types/drag-and-drop/icons/InvalidFile.d.ts +23 -0
- package/lib/types/drag-and-drop/index.d.ts +21 -0
- package/lib/{helpers → types/helpers}/debounce.d.ts +0 -0
- package/lib/{helpers → types/helpers}/forwardRef.d.ts +0 -0
- package/lib/{helpers → types/helpers}/index.d.ts +0 -0
- package/lib/{helpers → types/helpers}/testing.d.ts +0 -0
- package/lib/{helpers → types/helpers}/types.d.ts +0 -0
- package/lib/{icons → types/icons}/Custom.d.ts +0 -0
- package/lib/{icons → types/icons}/Hero.d.ts +0 -0
- package/lib/{icons → types/icons}/custom/Circle.d.ts +0 -0
- package/lib/types/icons/custom/CollapseExpand.d.ts +23 -0
- package/lib/{icons → types/icons}/custom/DatabaseAddCircle.d.ts +0 -0
- package/lib/types/icons/custom/Dbms.d.ts +23 -0
- package/lib/{icons → types/icons}/custom/Drag.d.ts +0 -0
- package/lib/{icons → types/icons}/custom/Expand.d.ts +0 -0
- package/lib/{icons → types/icons}/custom/ExternalLink.d.ts +0 -0
- package/lib/{icons → types/icons}/custom/FitToScreen.d.ts +0 -0
- package/lib/{icons → types/icons}/custom/FolderBookmark.d.ts +0 -0
- package/lib/{icons → types/icons}/custom/Heirarchy2.d.ts +0 -0
- package/lib/{icons → types/icons}/custom/Hierarchy1.d.ts +0 -0
- package/lib/types/icons/custom/Hierarchy2.d.ts +23 -0
- package/lib/types/icons/custom/NomLevel.d.ts +23 -0
- package/lib/{icons → types/icons}/custom/Pin.d.ts +0 -0
- package/lib/{icons → types/icons}/custom/Presentation.d.ts +0 -0
- package/lib/types/icons/custom/QueryBrowser.d.ts +23 -0
- package/lib/{icons → types/icons}/custom/Rhombus.d.ts +0 -0
- package/lib/types/icons/custom/ScienceMolecule.d.ts +23 -0
- package/lib/{icons → types/icons}/custom/Shrink.d.ts +0 -0
- package/lib/{icons → types/icons}/custom/Text.d.ts +0 -0
- package/lib/{icons → types/icons}/custom/Triangle.d.ts +0 -0
- package/lib/types/icons/custom/VisualizeBloom.d.ts +23 -0
- package/lib/{icons → types/icons}/custom/index.d.ts +7 -0
- package/lib/{icons → types/icons}/index.d.ts +0 -0
- package/lib/{index.d.ts → types/index.d.ts} +3 -0
- package/lib/{input → types/input}/Input.d.ts +0 -0
- package/lib/{input → types/input}/index.d.ts +0 -0
- package/lib/{label → types/label}/Label.d.ts +2 -2
- package/lib/{label → types/label}/index.d.ts +0 -0
- package/lib/{loading-spinner → types/loading-spinner}/LoadingSpinner.d.ts +0 -0
- package/lib/{loading-spinner → types/loading-spinner}/index.d.ts +0 -0
- package/lib/{popover → types/popover}/Popover.d.ts +0 -0
- package/lib/{popover → types/popover}/index.d.ts +0 -0
- package/lib/{progress-bar → types/progress-bar}/ProgressBar.d.ts +0 -0
- package/lib/{progress-bar → types/progress-bar}/index.d.ts +0 -0
- package/lib/{radio → types/radio}/Radio.d.ts +0 -0
- package/lib/{radio → types/radio}/index.d.ts +0 -0
- package/lib/{switch → types/switch}/Switch.d.ts +0 -0
- package/lib/{switch → types/switch}/index.d.ts +0 -0
- package/lib/types/table/Table.d.ts +78 -0
- package/lib/types/table/TableNavigation.d.ts +39 -0
- package/lib/types/table/helpers.d.ts +51 -0
- package/lib/types/table/hooks/hookCallbackTypes.d.ts +27 -0
- package/lib/types/table/hooks/index.d.ts +23 -0
- package/lib/types/table/hooks/useMultiRowSelect.d.ts +42 -0
- package/lib/types/table/hooks/useSingleRowSelect.d.ts +37 -0
- package/lib/types/table/index.d.ts +22 -0
- package/lib/{tabs → types/tabs}/Tabs.d.ts +0 -0
- package/lib/{tabs → types/tabs}/index.d.ts +0 -0
- package/lib/{tag → types/tag}/Tag.d.ts +0 -0
- package/lib/{tag → types/tag}/index.d.ts +0 -0
- package/lib/{tooltip → types/tooltip}/Tooltip.d.ts +0 -0
- package/lib/{tooltip → types/tooltip}/index.d.ts +0 -0
- package/lib/{view-selector → types/view-selector}/ViewSelector.d.ts +0 -0
- package/lib/{view-selector → types/view-selector}/index.d.ts +0 -0
- package/package.json +21 -10
- package/lib/alert/Alert.js +0 -121
- package/lib/alert/Alert.js.map +0 -1
- package/lib/alert/index.js.map +0 -1
- package/lib/button/Button.js +0 -112
- package/lib/button/Button.js.map +0 -1
- package/lib/button/index.js.map +0 -1
- package/lib/checkbox/Checkbox.js.map +0 -1
- package/lib/checkbox/index.js.map +0 -1
- package/lib/context-menu/ContextMenu.js.map +0 -1
- package/lib/context-menu/index.js.map +0 -1
- package/lib/helpers/debounce.js.map +0 -1
- package/lib/helpers/forwardRef.js.map +0 -1
- package/lib/helpers/index.js.map +0 -1
- package/lib/helpers/testing.js +0 -81
- package/lib/helpers/testing.js.map +0 -1
- package/lib/helpers/types.js.map +0 -1
- package/lib/icons/Custom.js.map +0 -1
- package/lib/icons/Hero.js +0 -89
- package/lib/icons/Hero.js.map +0 -1
- package/lib/icons/custom/Circle.js +0 -57
- package/lib/icons/custom/Circle.js.map +0 -1
- package/lib/icons/custom/DatabaseAddCircle.js +0 -57
- package/lib/icons/custom/DatabaseAddCircle.js.map +0 -1
- package/lib/icons/custom/Drag.js +0 -62
- package/lib/icons/custom/Drag.js.map +0 -1
- package/lib/icons/custom/Expand.js +0 -57
- package/lib/icons/custom/Expand.js.map +0 -1
- package/lib/icons/custom/ExternalLink.js +0 -57
- package/lib/icons/custom/ExternalLink.js.map +0 -1
- package/lib/icons/custom/FitToScreen.js +0 -57
- package/lib/icons/custom/FitToScreen.js.map +0 -1
- package/lib/icons/custom/FolderBookmark.js +0 -57
- package/lib/icons/custom/FolderBookmark.js.map +0 -1
- package/lib/icons/custom/Heirarchy2.js +0 -57
- package/lib/icons/custom/Heirarchy2.js.map +0 -1
- package/lib/icons/custom/Hierarchy1.js +0 -57
- package/lib/icons/custom/Hierarchy1.js.map +0 -1
- package/lib/icons/custom/Pin.js +0 -57
- package/lib/icons/custom/Pin.js.map +0 -1
- package/lib/icons/custom/Presentation.js +0 -57
- package/lib/icons/custom/Presentation.js.map +0 -1
- package/lib/icons/custom/Rhombus.js +0 -57
- package/lib/icons/custom/Rhombus.js.map +0 -1
- package/lib/icons/custom/Shrink.js +0 -57
- package/lib/icons/custom/Shrink.js.map +0 -1
- package/lib/icons/custom/Text.js +0 -57
- package/lib/icons/custom/Text.js.map +0 -1
- package/lib/icons/custom/Triangle.js +0 -57
- package/lib/icons/custom/Triangle.js.map +0 -1
- package/lib/icons/custom/index.js +0 -61
- package/lib/icons/custom/index.js.map +0 -1
- package/lib/icons/index.js.map +0 -1
- package/lib/index.js.map +0 -1
- package/lib/input/Input.js +0 -92
- package/lib/input/Input.js.map +0 -1
- package/lib/input/index.js.map +0 -1
- package/lib/label/Label.js +0 -103
- package/lib/label/Label.js.map +0 -1
- package/lib/label/index.js.map +0 -1
- package/lib/loading-spinner/LoadingSpinner.js.map +0 -1
- package/lib/loading-spinner/index.js.map +0 -1
- package/lib/popover/Popover.js.map +0 -1
- package/lib/popover/index.js.map +0 -1
- package/lib/progress-bar/ProgressBar.js +0 -64
- package/lib/progress-bar/ProgressBar.js.map +0 -1
- package/lib/progress-bar/index.js.map +0 -1
- package/lib/radio/Radio.js.map +0 -1
- package/lib/radio/index.js.map +0 -1
- package/lib/switch/Switch.js.map +0 -1
- package/lib/switch/index.js.map +0 -1
- package/lib/tabs/Tabs.js +0 -114
- package/lib/tabs/Tabs.js.map +0 -1
- package/lib/tabs/index.js.map +0 -1
- package/lib/tag/Tag.js.map +0 -1
- package/lib/tag/index.js.map +0 -1
- package/lib/tooltip/Tooltip.js.map +0 -1
- package/lib/tooltip/index.js.map +0 -1
- package/lib/view-selector/ViewSelector.js.map +0 -1
- package/lib/view-selector/index.js.map +0 -1
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) "Neo4j"
|
|
5
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
6
|
+
*
|
|
7
|
+
* This file is part of Neo4j.
|
|
8
|
+
*
|
|
9
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
10
|
+
* it under the terms of the GNU General Public License as published by
|
|
11
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
12
|
+
* (at your option) any later version.
|
|
13
|
+
*
|
|
14
|
+
* This program is distributed in the hope that it will be useful,
|
|
15
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
16
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
17
|
+
* GNU General Public License for more details.
|
|
18
|
+
*
|
|
19
|
+
* You should have received a copy of the GNU General Public License
|
|
20
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
21
|
+
*/
|
|
22
|
+
import { useEffect, useMemo, useRef } from 'react';
|
|
23
|
+
import { useRowSelect, } from 'react-table';
|
|
24
|
+
import { Checkbox } from '../../checkbox';
|
|
25
|
+
/**
|
|
26
|
+
* A react-table plugin to support controlled selected row state for multiple rows
|
|
27
|
+
*
|
|
28
|
+
* Required options provided to useTable:
|
|
29
|
+
*
|
|
30
|
+
* `onAllRowSelect`: A callback that is called when the all rows checkbox is toggled
|
|
31
|
+
* `onRowSelect`: A callback that is called when a rows checkbox is toggled
|
|
32
|
+
*
|
|
33
|
+
* Required fields on `data` provided to useTable:
|
|
34
|
+
*
|
|
35
|
+
* `isSelected`: a boolean that indicates if the row is selected. This key can be changed
|
|
36
|
+
* from `isSelected` to something else by setting the `manualRowSelectedKey` option
|
|
37
|
+
* in the useTable options. See the useRowSelect plugin docs for more details.
|
|
38
|
+
*/
|
|
39
|
+
const useMultiRowSelect = (hooks) => {
|
|
40
|
+
useRowSelect(hooks);
|
|
41
|
+
/*
|
|
42
|
+
Used for the indeterminate
|
|
43
|
+
state of the checkbox
|
|
44
|
+
*/
|
|
45
|
+
hooks.useControlledState.push((state, { instance }) => {
|
|
46
|
+
const { data } = instance;
|
|
47
|
+
const isSelectedKey = 'isSelected';
|
|
48
|
+
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
49
|
+
const newState = useMemo(() => (Object.assign(Object.assign({}, state), { selectedRowIds: data.reduce((acc, curr, index) => {
|
|
50
|
+
if (curr[isSelectedKey]) {
|
|
51
|
+
return Object.assign(Object.assign({}, acc), { [index]: true });
|
|
52
|
+
}
|
|
53
|
+
return acc;
|
|
54
|
+
}, {}) })), [state, data, isSelectedKey]);
|
|
55
|
+
return newState;
|
|
56
|
+
});
|
|
57
|
+
hooks.visibleColumns.push((columns, { instance }) => [
|
|
58
|
+
// Let's make a column for selection
|
|
59
|
+
{
|
|
60
|
+
id: 'ndl-checkbox-selection',
|
|
61
|
+
// The header can use the table's getToggleAllRowsSelectedProps method
|
|
62
|
+
// to render a checkbox
|
|
63
|
+
Header: ({ getToggleAllRowsSelectedProps, }) => {
|
|
64
|
+
const checkboxRef = useRef(null);
|
|
65
|
+
useEffect(() => {
|
|
66
|
+
if (checkboxRef && checkboxRef.current) {
|
|
67
|
+
checkboxRef.current.indeterminate =
|
|
68
|
+
getToggleAllRowsSelectedProps().indeterminate || false;
|
|
69
|
+
}
|
|
70
|
+
}, [checkboxRef, getToggleAllRowsSelectedProps]);
|
|
71
|
+
return (_jsx(Checkbox, Object.assign({ "aria-label": "all-rows-select", onClick: () => instance.onAllRowSelect() }, getToggleAllRowsSelectedProps(), { ref: checkboxRef })));
|
|
72
|
+
},
|
|
73
|
+
// The cell can use the individual row's getToggleRowSelectedProps method
|
|
74
|
+
// to the render a checkbox
|
|
75
|
+
Cell: ({ row }) => (_jsx("div", { children: _jsx(Checkbox, Object.assign({ "aria-label": `row-${row.index}`, onClick: () => instance.onRowSelect(row.original, row.index) }, row.getToggleRowSelectedProps())) })),
|
|
76
|
+
},
|
|
77
|
+
...columns,
|
|
78
|
+
]);
|
|
79
|
+
};
|
|
80
|
+
useMultiRowSelect.pluginName = 'useMultiRowSelect';
|
|
81
|
+
export default useMultiRowSelect;
|
|
82
|
+
//# sourceMappingURL=useMultiRowSelect.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useMultiRowSelect.js","sourceRoot":"","sources":["../../../../src/table/hooks/useMultiRowSelect.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAIL,YAAY,GAKb,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAW1C;;;;;;;;;;;;;GAaG;AACH,MAAM,iBAAiB,GAAG,CACxB,KAAe,EACf,EAAE;IACF,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CACI,iBAAiB,EAC5B,OAAO,EAAE,GAAG,EAAE,CAAE,QAA2B,CAAC,cAAc,EAAE,IACxD,6BAA6B,EAAE,IACnC,GAAG,EAAE,WAAW,IAChB,CACH,CAAC;YACJ,CAAC;YACD,yEAAyE;YACzE,2BAA2B;YAC3B,IAAI,EAAE,CAAC,EAAE,GAAG,EAAW,EAAE,EAAE,CAAC,CAC1B,wBACE,KAAC,QAAQ,gCACK,OAAO,GAAG,CAAC,KAAK,EAAE,EAC9B,OAAO,EAAE,GAAG,EAAE,CACX,QAA2B,CAAC,WAAW,CAAC,GAAG,CAAC,QAAQ,EAAE,GAAG,CAAC,KAAK,CAAC,IAE9D,GAAW,CAAC,yBAAyB,EAAE,EAC5C,GACE,CACP;SACF;QACD,GAAG,OAAO;KACX,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,iBAAiB,CAAC,UAAU,GAAG,mBAAmB,CAAC;AAEnD,eAAe,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) "Neo4j"
|
|
5
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
6
|
+
*
|
|
7
|
+
* This file is part of Neo4j.
|
|
8
|
+
*
|
|
9
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
10
|
+
* it under the terms of the GNU General Public License as published by
|
|
11
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
12
|
+
* (at your option) any later version.
|
|
13
|
+
*
|
|
14
|
+
* This program is distributed in the hope that it will be useful,
|
|
15
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
16
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
17
|
+
* GNU General Public License for more details.
|
|
18
|
+
*
|
|
19
|
+
* You should have received a copy of the GNU General Public License
|
|
20
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
21
|
+
*/
|
|
22
|
+
import { useRowSelect } from 'react-table';
|
|
23
|
+
import { Radio } from '../../radio';
|
|
24
|
+
/**
|
|
25
|
+
* A react-table plugin to support controlled selected row state for a single row
|
|
26
|
+
*
|
|
27
|
+
* Required options provided to useTable:
|
|
28
|
+
*
|
|
29
|
+
* `onRowSelect`: A callback that is called when a rows checkbox is toggled
|
|
30
|
+
*
|
|
31
|
+
* Required fields on `data` provided to useTable:
|
|
32
|
+
*
|
|
33
|
+
* `isSelected`: a boolean that indicates if the row is selected. This key can be changed
|
|
34
|
+
* from `isSelected` to something else by setting the `manualRowSelectedKey` option
|
|
35
|
+
* in the useTable options. See the useRowSelect plugin docs for more details.
|
|
36
|
+
* There should only ever be 1 data entry with isSelected set to true
|
|
37
|
+
*/
|
|
38
|
+
export const useSingleRowSelect = (hooks) => {
|
|
39
|
+
useRowSelect(hooks);
|
|
40
|
+
hooks.visibleColumns.push((columns, { instance }) => [
|
|
41
|
+
// Let's make a column for selection
|
|
42
|
+
// This should be definitely unique to avoid collision
|
|
43
|
+
{
|
|
44
|
+
id: 'ndl-radio-selection',
|
|
45
|
+
Header: () => null,
|
|
46
|
+
width: 20,
|
|
47
|
+
// The cell can use the individual row's getToggleRowSelectedProps method
|
|
48
|
+
// to the render a checkbox
|
|
49
|
+
Cell: ({ row }) => {
|
|
50
|
+
return (_jsx(Radio, Object.assign({}, row.getToggleRowSelectedProps(), { onChange: () => instance.onRowSelect(row.original, row.index) })));
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
...columns,
|
|
54
|
+
]);
|
|
55
|
+
};
|
|
56
|
+
export default useSingleRowSelect;
|
|
57
|
+
//# sourceMappingURL=useSingleRowSelect.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSingleRowSelect.js","sourceRoot":"","sources":["../../../../src/table/hooks/useSingleRowSelect.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAe,YAAY,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAGpC;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAChC,KAAe,EACf,EAAE;IACF,YAAY,CAAC,KAAK,CAAC,CAAC;IAEpB,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC;QACnD,oCAAoC;QACpC,sDAAsD;QACtD;YACE,EAAE,EAAE,qBAAqB;YACzB,MAAM,EAAE,GAAG,EAAE,CAAC,IAAI;YAClB,KAAK,EAAE,EAAE;YACT,yEAAyE;YACzE,2BAA2B;YAC3B,IAAI,EAAE,CAAC,EAAE,GAAG,EAAW,EAAE,EAAE;gBACzB,OAAO,CACL,KAAC,KAAK,oBACC,GAAW,CAAC,yBAAyB,EAAE,IAC5C,QAAQ,EAAE,GAAG,EAAE,CACZ,QAA2B,CAAC,WAAW,CAAC,GAAG,CAAC,QAAQ,EAAE,GAAG,CAAC,KAAK,CAAC,IAEnE,CACH,CAAC;YACJ,CAAC;SACF;QACD,GAAG,OAAO;KACX,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* Copyright (c) "Neo4j"
|
|
4
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
5
|
+
*
|
|
6
|
+
* This file is part of Neo4j.
|
|
7
|
+
*
|
|
8
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
9
|
+
* it under the terms of the GNU General Public License as published by
|
|
10
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
11
|
+
* (at your option) any later version.
|
|
12
|
+
*
|
|
13
|
+
* This program is distributed in the hope that it will be useful,
|
|
14
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
* GNU General Public License for more details.
|
|
17
|
+
*
|
|
18
|
+
* You should have received a copy of the GNU General Public License
|
|
19
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
+
*/
|
|
21
|
+
export { default as Table } from './Table';
|
|
22
|
+
export * from './hooks';
|
|
23
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/table/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,SAAS,CAAC;AAC3C,cAAc,SAAS,CAAC"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* Copyright (c) "Neo4j"
|
|
16
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
17
|
+
*
|
|
18
|
+
* This file is part of Neo4j.
|
|
19
|
+
*
|
|
20
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
21
|
+
* it under the terms of the GNU General Public License as published by
|
|
22
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
23
|
+
* (at your option) any later version.
|
|
24
|
+
*
|
|
25
|
+
* This program is distributed in the hope that it will be useful,
|
|
26
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
27
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
28
|
+
* GNU General Public License for more details.
|
|
29
|
+
*
|
|
30
|
+
* You should have received a copy of the GNU General Public License
|
|
31
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
32
|
+
*/
|
|
33
|
+
import React, { useContext } from 'react';
|
|
34
|
+
import classnames from 'classnames';
|
|
35
|
+
const TabsContext = React.createContext(null);
|
|
36
|
+
const useTabsContext = () => {
|
|
37
|
+
const context = useContext(TabsContext);
|
|
38
|
+
if (context === null) {
|
|
39
|
+
throw new Error('Tab used without context');
|
|
40
|
+
}
|
|
41
|
+
return context;
|
|
42
|
+
};
|
|
43
|
+
const getTabPanelId = (tabId) => `tabpanel-${tabId}`;
|
|
44
|
+
const getGeneralTabClasses = (size, fill) => {
|
|
45
|
+
return {
|
|
46
|
+
large: size === 'large',
|
|
47
|
+
small: size === 'small',
|
|
48
|
+
filled: fill === 'filled',
|
|
49
|
+
underline: fill === 'underline',
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
export const Tabs = React.forwardRef(function Tabs(_a, ref) {
|
|
53
|
+
var { children, size = 'large', fill = 'underline', onChange, value, className, as = 'div' } = _a, rest = __rest(_a, ["children", "size", "fill", "onChange", "value", "className", "as"]);
|
|
54
|
+
const classes = classnames('ndl-tabs', getGeneralTabClasses(size, fill), className);
|
|
55
|
+
const Component = as;
|
|
56
|
+
return (_jsx(Component, Object.assign({ className: classes, role: "tablist" }, rest, { ref: ref }, { children: _jsx(TabsContext.Provider, Object.assign({ value: { value, size, fill, onChange } }, { children: children })) })));
|
|
57
|
+
});
|
|
58
|
+
export const Tab = React.forwardRef(function Tab(_a, ref) {
|
|
59
|
+
var { children, tabId, disabled = false, className, as = 'button' } = _a, rest = __rest(_a, ["children", "tabId", "disabled", "className", "as"]);
|
|
60
|
+
const { size, fill, value, onChange } = useTabsContext();
|
|
61
|
+
const base = classnames(Object.assign(Object.assign({}, getGeneralTabClasses(size, fill)), { selected: value === tabId, disabled }));
|
|
62
|
+
const Component = as;
|
|
63
|
+
// Cast onChange since the compiler isn't smart enough to figure out union of function's parameters
|
|
64
|
+
// https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-3.html#improved-behavior-for-calling-union-types
|
|
65
|
+
// https://stackoverflow.com/questions/55572797/why-does-typescript-expect-never-as-function-argument-when-retrieving-the-func
|
|
66
|
+
const castOnChange = onChange;
|
|
67
|
+
const handleChange = () => !disabled && castOnChange(tabId);
|
|
68
|
+
const classes = classnames('tab', base, className);
|
|
69
|
+
return (_jsxs(Component, Object.assign({ className: classes, onClick: handleChange, role: "tab", "aria-controls": getTabPanelId(tabId) }, rest, { ref: ref }, { children: [children, fill === 'underline' && _jsx("span", { className: "tab-underline" })] })));
|
|
70
|
+
});
|
|
71
|
+
export const TabPanel = React.forwardRef(function TabPanel(_a, ref) {
|
|
72
|
+
var { as = 'div', children, value, tabId } = _a, rest = __rest(_a, ["as", "children", "value", "tabId"]);
|
|
73
|
+
const Component = as;
|
|
74
|
+
return (_jsx(_Fragment, { children: value === tabId && (_jsx(Component, Object.assign({ role: "tabpanel", id: getTabPanelId(tabId) }, rest, { ref: ref }, { children: children }))) }));
|
|
75
|
+
});
|
|
76
|
+
//# sourceMappingURL=Tabs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tabs.js","sourceRoot":"","sources":["../../../src/tabs/Tabs.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,UAAU,MAAM,YAAY,CAAC;AAsCpC,MAAM,WAAW,GAAG,KA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,OAA0B,EAArB,IAAI,cAA7C,oCAA+C,CAAF;IAG7C,MAAM,SAAS,GAAG,EAAE,CAAC;IAErB,OAAO,CACL,4BACG,KAAK,KAAK,KAAK,IAAI,CAClB,KAAC,SAAS,kBACR,IAAI,EAAC,UAAU,EACf,EAAE,EAAE,aAAa,CAAC,KAAK,CAAC,IACpB,IAAI,IACR,GAAG,EAAE,GAAG,gBAEP,QAAQ,IACC,CACb,GACA,CACJ,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* Copyright (c) "Neo4j"
|
|
4
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
5
|
+
*
|
|
6
|
+
* This file is part of Neo4j.
|
|
7
|
+
*
|
|
8
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
9
|
+
* it under the terms of the GNU General Public License as published by
|
|
10
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
11
|
+
* (at your option) any later version.
|
|
12
|
+
*
|
|
13
|
+
* This program is distributed in the hope that it will be useful,
|
|
14
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
* GNU General Public License for more details.
|
|
17
|
+
*
|
|
18
|
+
* You should have received a copy of the GNU General Public License
|
|
19
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
+
*/
|
|
21
|
+
export * from './Tabs';
|
|
22
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tabs/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,cAAc,QAAQ,CAAC"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* Copyright (c) "Neo4j"
|
|
16
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
17
|
+
*
|
|
18
|
+
* This file is part of Neo4j.
|
|
19
|
+
*
|
|
20
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
21
|
+
* it under the terms of the GNU General Public License as published by
|
|
22
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
23
|
+
* (at your option) any later version.
|
|
24
|
+
*
|
|
25
|
+
* This program is distributed in the hope that it will be useful,
|
|
26
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
27
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
28
|
+
* GNU General Public License for more details.
|
|
29
|
+
*
|
|
30
|
+
* You should have received a copy of the GNU General Public License
|
|
31
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
32
|
+
*/
|
|
33
|
+
import React from 'react';
|
|
34
|
+
import classnames from 'classnames';
|
|
35
|
+
import { HeroIcon } from '../icons';
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
*
|
|
39
|
+
* Helpers
|
|
40
|
+
*
|
|
41
|
+
*
|
|
42
|
+
*/
|
|
43
|
+
/** Add any helper functions here. */
|
|
44
|
+
/**
|
|
45
|
+
*
|
|
46
|
+
*
|
|
47
|
+
* Tag Component
|
|
48
|
+
*
|
|
49
|
+
*
|
|
50
|
+
*/
|
|
51
|
+
const Tag = React.forwardRef(function Tag(props, ref) {
|
|
52
|
+
const { children, type = 'default', removeable, onRemove } = props, rest = __rest(props, ["children", "type", "removeable", "onRemove"]);
|
|
53
|
+
if (removeable && typeof onRemove !== 'function') {
|
|
54
|
+
console.error('Tag element is removable but onRemove prop is not a function or provided');
|
|
55
|
+
}
|
|
56
|
+
const classes = classnames(`ndl-tag`, type, {
|
|
57
|
+
removeable: removeable,
|
|
58
|
+
});
|
|
59
|
+
return (_jsxs("div", Object.assign({}, rest, { className: classes, ref: ref }, { children: [children, removeable && (_jsx("button", Object.assign({ type: "button", className: "remove-icon", onClick: onRemove }, { children: _jsx(HeroIcon, { iconName: "XIcon" }) })))] })));
|
|
60
|
+
});
|
|
61
|
+
export default Tag;
|
|
62
|
+
//# sourceMappingURL=Tag.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tag.js","sourceRoot":"","sources":["../../../src/tag/Tag.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAgCpC;;;;;;GAMG;AAEH,qCAAqC;AAErC;;;;;;GAMG;AAEH,MAAM,GAAG,GAAG,KAAK,CAAC,UAAU,CAAC,SAAS,GAAG,CACvC,KAAe,EACf,GAAuC;IAEvC,MAAM,EAAE,QAAQ,EAAE,IAAI,GAAG,SAAS,EAAE,UAAU,EAAE,QAAQ,KAAc,KAAK,EAAd,IAAI,UAAK,KAAK,EAArE,8CAA6D,CAAQ,CAAC;IAE5E,IAAI,UAAU,IAAI,OAAO,QAAQ,KAAK,UAAU,EAAE;QAChD,OAAO,CAAC,KAAK,CACX,0EAA0E,CAC3E,CAAC;KACH;IAED,MAAM,OAAO,GAAG,UAAU,CAAC,SAAS,EAAE,IAAI,EAAE;QAC1C,UAAU,EAAE,UAAU;KACvB,CAAC,CAAC;IAEH,OAAO,CACL,+BAAS,IAAI,IAAE,SAAS,EAAE,OAAO,EAAE,GAAG,EAAE,GAAG,iBACxC,QAAQ,EACR,UAAU,IAAI,CACb,+BAAQ,IAAI,EAAC,QAAQ,EAAC,SAAS,EAAC,aAAa,EAAC,OAAO,EAAE,QAAQ,gBAC7D,KAAC,QAAQ,IAAC,QAAQ,EAAC,OAAO,GAAG,IACtB,CACV,KACG,CACP,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,GAAG,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* Copyright (c) "Neo4j"
|
|
4
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
5
|
+
*
|
|
6
|
+
* This file is part of Neo4j.
|
|
7
|
+
*
|
|
8
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
9
|
+
* it under the terms of the GNU General Public License as published by
|
|
10
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
11
|
+
* (at your option) any later version.
|
|
12
|
+
*
|
|
13
|
+
* This program is distributed in the hope that it will be useful,
|
|
14
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
* GNU General Public License for more details.
|
|
17
|
+
*
|
|
18
|
+
* You should have received a copy of the GNU General Public License
|
|
19
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
+
*/
|
|
21
|
+
export { default as Tag } from './Tag';
|
|
22
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tag/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,OAAO,IAAI,GAAG,EAAE,MAAM,OAAO,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* Copyright (c) "Neo4j"
|
|
16
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
17
|
+
*
|
|
18
|
+
* This file is part of Neo4j.
|
|
19
|
+
*
|
|
20
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
21
|
+
* it under the terms of the GNU General Public License as published by
|
|
22
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
23
|
+
* (at your option) any later version.
|
|
24
|
+
*
|
|
25
|
+
* This program is distributed in the hope that it will be useful,
|
|
26
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
27
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
28
|
+
* GNU General Public License for more details.
|
|
29
|
+
*
|
|
30
|
+
* You should have received a copy of the GNU General Public License
|
|
31
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
32
|
+
*/
|
|
33
|
+
import React from 'react';
|
|
34
|
+
import classnames from 'classnames';
|
|
35
|
+
const Tooltip = React.forwardRef(function Tooltip(_a, ref) {
|
|
36
|
+
var { arrowPosition, children, className } = _a, props = __rest(_a, ["arrowPosition", "children", "className"]);
|
|
37
|
+
const classes = classnames('ndl-tooltip-wrapper', className);
|
|
38
|
+
return (_jsxs("div", Object.assign({}, props, { role: "tooltip", className: classes, ref: ref }, { children: [children, _jsx("div", { className: `tooltip-triangle ${arrowPosition}` })] })));
|
|
39
|
+
});
|
|
40
|
+
export default Tooltip;
|
|
41
|
+
//# sourceMappingURL=Tooltip.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tooltip.js","sourceRoot":"","sources":["../../../src/tooltip/Tooltip.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,UAAU,MAAM,YAAY,CAAC;AAgBpC,MAAM,OAAO,GAAG,KAAK,CAAC,UAAU,CAAC,SAAS,OAAO,CAC/C,EAA8D,EAC9D,GAAuC;QADvC,EAAE,aAAa,EAAE,QAAQ,EAAE,SAAS,OAA0B,EAArB,KAAK,cAA9C,0CAAgD,CAAF;IAG9C,MAAM,OAAO,GAAG,UAAU,CAAC,qBAAqB,EAAE,SAAS,CAAC,CAAC;IAE7D,OAAO,CACL,+BAAS,KAAK,IAAE,IAAI,EAAC,SAAS,EAAC,SAAS,EAAE,OAAO,EAAE,GAAG,EAAE,GAAG,iBACxD,QAAQ,EACT,cAAK,SAAS,EAAE,oBAAoB,aAAa,EAAE,GAAI,KACnD,CACP,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,OAAO,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* Copyright (c) "Neo4j"
|
|
4
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
5
|
+
*
|
|
6
|
+
* This file is part of Neo4j.
|
|
7
|
+
*
|
|
8
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
9
|
+
* it under the terms of the GNU General Public License as published by
|
|
10
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
11
|
+
* (at your option) any later version.
|
|
12
|
+
*
|
|
13
|
+
* This program is distributed in the hope that it will be useful,
|
|
14
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
* GNU General Public License for more details.
|
|
17
|
+
*
|
|
18
|
+
* You should have received a copy of the GNU General Public License
|
|
19
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
+
*/
|
|
21
|
+
export { default as Tooltip } from './Tooltip';
|
|
22
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tooltip/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,WAAW,CAAC"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* Copyright (c) "Neo4j"
|
|
16
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
17
|
+
*
|
|
18
|
+
* This file is part of Neo4j.
|
|
19
|
+
*
|
|
20
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
21
|
+
* it under the terms of the GNU General Public License as published by
|
|
22
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
23
|
+
* (at your option) any later version.
|
|
24
|
+
*
|
|
25
|
+
* This program is distributed in the hope that it will be useful,
|
|
26
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
27
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
28
|
+
* GNU General Public License for more details.
|
|
29
|
+
*
|
|
30
|
+
* You should have received a copy of the GNU General Public License
|
|
31
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
32
|
+
*/
|
|
33
|
+
import React, { useContext } from 'react';
|
|
34
|
+
import classnames from 'classnames';
|
|
35
|
+
import { forwardRef } from '../helpers';
|
|
36
|
+
const ViewSelectorContext = React.createContext(null);
|
|
37
|
+
const useSelectorContext = () => {
|
|
38
|
+
const context = useContext(ViewSelectorContext);
|
|
39
|
+
if (context === null) {
|
|
40
|
+
throw new Error('View Selector used without context');
|
|
41
|
+
}
|
|
42
|
+
return context;
|
|
43
|
+
};
|
|
44
|
+
export const ViewSelector = forwardRef(function ViewSelector(_a, ref) {
|
|
45
|
+
var { size = 'large', icons = false, children, selected, onChange, as = 'div', className } = _a, rest = __rest(_a, ["size", "icons", "children", "selected", "onChange", "as", "className"]);
|
|
46
|
+
const classes = classnames(`ndl-view-selector`, size, className);
|
|
47
|
+
const Component = as;
|
|
48
|
+
return (_jsx(Component, Object.assign({}, rest, { className: classes, role: "group", ref: ref }, { children: _jsx(ViewSelectorContext.Provider, Object.assign({ value: { onChange, selected, icons } }, { children: children })) })));
|
|
49
|
+
});
|
|
50
|
+
export const ViewSelectorItem = React.forwardRef(function ViewSelectorItem(_a, ref) {
|
|
51
|
+
var { children, value, as = 'button', className } = _a, rest = __rest(_a, ["children", "value", "as", "className"]);
|
|
52
|
+
const { onChange, selected, icons } = useSelectorContext();
|
|
53
|
+
const isSelected = value && value === selected;
|
|
54
|
+
const base = classnames(`selector-${icons ? 'icon' : 'item'}`, className, {
|
|
55
|
+
current: value && value === selected,
|
|
56
|
+
});
|
|
57
|
+
const Component = as;
|
|
58
|
+
return (_jsx(Component, Object.assign({}, rest, { onClick: () => !isSelected && onChange(value), className: base, ref: ref }, { children: children })));
|
|
59
|
+
});
|
|
60
|
+
//# sourceMappingURL=ViewSelector.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ViewSelector.js","sourceRoot":"","sources":["../../../src/view-selector/ViewSelector.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAe,UAAU,EAAE,MAAM,YAAY,CAAC;AAuCrD,MAAM,mBAAmB,GACvB,KAAK,CAAC,aAAa,CAAkC,IAAI,CAAC,CAAC;AAE7D,MAAM,kBAAkB,GAAG,GAAG,EAAE;IAC9B,MAAM,OAAO,GAAG,UAAU,CAAC,mBAAmB,CAAC,CAAC;IAEhD,IAAI,OAAO,KAAK,IAAI,EAAE;QACpB,MAAM,IAAI,KAAK,CAAC,oCAAoC,CAAC,CAAC;KACvD;IAED,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAG,UAAU,CAAC,SAAS,YAAY,CAG1D,EASuB,EACvB,GAAgC;QAVhC,EACE,IAAI,GAAG,OAAO,EACd,KAAK,GAAG,KAAK,EACb,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,EAAE,GAAG,KAAK,EACV,SAAS,OAEY,EADlB,IAAI,cART,wEASC,CADQ;IAIT,MAAM,OAAO,GAAG,UAAU,CAAC,mBAAmB,EAAE,IAAI,EAAE,SAA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weden AB [http://neo4j.com]
|
|
5
|
+
*
|
|
6
|
+
* This file is part of Neo4j.
|
|
7
|
+
*
|
|
8
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
9
|
+
* it under the terms of the GNU General Public License as published by
|
|
10
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
11
|
+
* (at your option) any later version.
|
|
12
|
+
*
|
|
13
|
+
* This program is distributed in the hope that it will be useful,
|
|
14
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
* GNU General Public License for more details.
|
|
17
|
+
*
|
|
18
|
+
* You should have received a copy of the GNU General Public License
|
|
19
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
+
*/
|
|
21
|
+
export * from './ViewSelector';
|
|
22
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/view-selector/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,cAAc,gBAAgB,CAAC"}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* Copyright (c) "Neo4j"
|
|
4
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
5
|
+
*
|
|
6
|
+
* This file is part of Neo4j.
|
|
7
|
+
*
|
|
8
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
9
|
+
* it under the terms of the GNU General Public License as published by
|
|
10
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
11
|
+
* (at your option) any later version.
|
|
12
|
+
*
|
|
13
|
+
* This program is distributed in the hope that it will be useful,
|
|
14
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
* GNU General Public License for more details.
|
|
17
|
+
*
|
|
18
|
+
* You should have received a copy of the GNU General Public License
|
|
19
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
+
*/
|
|
21
|
+
import React from 'react';
|
|
22
|
+
import { DropzoneOptions } from 'react-dropzone';
|
|
23
|
+
/**
|
|
24
|
+
*
|
|
25
|
+
*
|
|
26
|
+
* Types
|
|
27
|
+
*
|
|
28
|
+
*
|
|
29
|
+
*/
|
|
30
|
+
export declare type DragAndDropProps = {
|
|
31
|
+
/** See here - https://react-dropzone.js.org/#src */
|
|
32
|
+
dropZoneOptions: DropzoneOptions;
|
|
33
|
+
/** Supported file text in the footer */
|
|
34
|
+
supportedFilesDescription?: string;
|
|
35
|
+
/** Element to display when uploading the file. When passed, drag&drop zone is disabled */
|
|
36
|
+
loadingComponent?: string | React.ReactElement;
|
|
37
|
+
/** To be used when want to test loadingComponent UI without actualy draging and uploading the files */
|
|
38
|
+
isTesting?: boolean;
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
*
|
|
43
|
+
* DragAndDrop Component
|
|
44
|
+
*
|
|
45
|
+
*
|
|
46
|
+
*/ declare const DragAndDrop: (props: DragAndDropProps) => JSX.Element;
|
|
47
|
+
export default DragAndDrop;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* Copyright (c) "Neo4j"
|
|
4
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
5
|
+
*
|
|
6
|
+
* This file is part of Neo4j.
|
|
7
|
+
*
|
|
8
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
9
|
+
* it under the terms of the GNU General Public License as published by
|
|
10
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
11
|
+
* (at your option) any later version.
|
|
12
|
+
*
|
|
13
|
+
* This program is distributed in the hope that it will be useful,
|
|
14
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
* GNU General Public License for more details.
|
|
17
|
+
*
|
|
18
|
+
* You should have received a copy of the GNU General Public License
|
|
19
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
+
*/
|
|
21
|
+
import { SVGProps } from 'react';
|
|
22
|
+
declare const SvgComponent: (props: SVGProps<SVGSVGElement>) => JSX.Element;
|
|
23
|
+
export default SvgComponent;
|