@terraware/web-components 2.13.1-rc.2 → 2.13.1-rc.4
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/components/Autocomplete/Autocomplete.d.ts +1 -0
- package/components/Autocomplete/Autocomplete.d.ts.map +1 -1
- package/components/Autocomplete/Autocomplete.js +42 -44
- package/components/Badge/index.d.ts +1 -0
- package/components/Badge/index.d.ts.map +1 -1
- package/components/Badge/index.js +7 -8
- package/components/BusySpinner/index.d.ts +1 -0
- package/components/BusySpinner/index.d.ts.map +1 -1
- package/components/BusySpinner/index.js +5 -3
- package/components/Button/Button.d.ts +2 -1
- package/components/Button/Button.d.ts.map +1 -1
- package/components/Button/Button.js +23 -24
- package/components/Button/button.test.js +4 -4
- package/components/Checkbox.js +25 -27
- package/components/Confirm/index.js +28 -28
- package/components/DatePicker/DatePicker.d.ts +12 -30
- package/components/DatePicker/DatePicker.d.ts.map +1 -1
- package/components/DatePicker/DatePicker.js +38 -70
- package/components/DialogBox/DialogBox.js +31 -25
- package/components/Divisor.d.ts +1 -0
- package/components/Divisor.d.ts.map +1 -1
- package/components/Divisor.js +3 -2
- package/components/Dropdown.d.ts +1 -0
- package/components/Dropdown.d.ts.map +1 -1
- package/components/Dropdown.js +39 -51
- package/components/ErrorBox/ErrorBox.d.ts +1 -0
- package/components/ErrorBox/ErrorBox.d.ts.map +1 -1
- package/components/ErrorBox/ErrorBox.js +11 -8
- package/components/FileChooser/index.d.ts +1 -0
- package/components/FileChooser/index.d.ts.map +1 -1
- package/components/FileChooser/index.js +58 -62
- package/components/FormBottomBar/index.d.ts +1 -0
- package/components/FormBottomBar/index.d.ts.map +1 -1
- package/components/FormBottomBar/index.js +55 -68
- package/components/Icon/Icon.d.ts +3 -1
- package/components/Icon/Icon.d.ts.map +1 -1
- package/components/Icon/Icon.js +18 -19
- package/components/Icon/icons/index.js +2 -3
- package/components/IconTooltip/index.d.ts +1 -0
- package/components/IconTooltip/index.d.ts.map +1 -1
- package/components/IconTooltip/index.js +32 -39
- package/components/Message/Message.d.ts +1 -0
- package/components/Message/Message.d.ts.map +1 -1
- package/components/Message/Message.js +21 -17
- package/components/MultiSelect/MultiSelect.test.js +16 -30
- package/components/MultiSelect/index.d.ts +1 -0
- package/components/MultiSelect/index.d.ts.map +1 -1
- package/components/MultiSelect/index.js +32 -42
- package/components/Navbar/NavFooter.js +3 -1
- package/components/Navbar/NavItem.js +19 -23
- package/components/Navbar/NavSection.d.ts +1 -0
- package/components/Navbar/NavSection.d.ts.map +1 -1
- package/components/Navbar/NavSection.js +4 -3
- package/components/Navbar/Navbar.js +26 -27
- package/components/Navbar/SubNavbar.js +3 -1
- package/components/Note.d.ts +1 -0
- package/components/Note.d.ts.map +1 -1
- package/components/Note.js +12 -12
- package/components/PageForm/index.js +18 -39
- package/components/PhotoChooser/index.d.ts +1 -0
- package/components/PhotoChooser/index.d.ts.map +1 -1
- package/components/PhotoChooser/index.js +57 -72
- package/components/Pill/index.d.ts +1 -0
- package/components/Pill/index.d.ts.map +1 -1
- package/components/Pill/index.js +12 -10
- package/components/PillList/index.d.ts +1 -0
- package/components/PillList/index.d.ts.map +1 -1
- package/components/PillList/index.js +15 -15
- package/components/PopoverMenu/Popover.js +25 -28
- package/components/PopoverMenu/index.js +26 -30
- package/components/PopoverMultiSelect/index.d.ts +1 -0
- package/components/PopoverMultiSelect/index.d.ts.map +1 -1
- package/components/PopoverMultiSelect/index.js +19 -26
- package/components/ProgressCircle/ProgressCircle.d.ts +1 -0
- package/components/ProgressCircle/ProgressCircle.d.ts.map +1 -1
- package/components/ProgressCircle/ProgressCircle.js +7 -6
- package/components/RadioButton.js +1 -1
- package/components/Select/Select.d.ts +1 -0
- package/components/Select/Select.d.ts.map +1 -1
- package/components/Select/Select.js +3 -9
- package/components/Select/SelectT.js +64 -80
- package/components/Separator/index.d.ts +1 -1
- package/components/Separator/index.d.ts.map +1 -1
- package/components/Separator/index.js +2 -3
- package/components/Slider/index.d.ts +1 -0
- package/components/Slider/index.d.ts.map +1 -1
- package/components/Slider/index.js +13 -11
- package/components/SummaryBox.d.ts +1 -0
- package/components/SummaryBox.d.ts.map +1 -1
- package/components/SummaryBox.js +45 -46
- package/components/Tabs/index.js +33 -41
- package/components/TextTruncated/index.js +52 -62
- package/components/Textfield/Textfield.d.ts +1 -0
- package/components/Textfield/Textfield.d.ts.map +1 -1
- package/components/Textfield/Textfield.js +38 -38
- package/components/Textfield/TruncatedTextArea.d.ts +1 -1
- package/components/Textfield/TruncatedTextArea.d.ts.map +1 -1
- package/components/Textfield/TruncatedTextArea.js +29 -42
- package/components/Tooltip/Tooltip.d.ts +1 -0
- package/components/Tooltip/Tooltip.d.ts.map +1 -1
- package/components/Tooltip/Tooltip.js +24 -28
- package/components/ViewPhotosDialog/index.js +41 -65
- package/components/svg/BlobbyGrayIconImage.d.ts +1 -1
- package/components/svg/BlobbyGrayIconImage.d.ts.map +1 -1
- package/components/svg/BlobbyGrayIconImage.js +7 -9
- package/components/svg/BlobbyGrayIconImport.d.ts +1 -1
- package/components/svg/BlobbyGrayIconImport.d.ts.map +1 -1
- package/components/svg/BlobbyGrayIconImport.js +7 -9
- package/components/svg/BlobbyGrayIconUploadToTheCloud.d.ts +1 -1
- package/components/svg/BlobbyGrayIconUploadToTheCloud.d.ts.map +1 -1
- package/components/svg/BlobbyGrayIconUploadToTheCloud.js +7 -9
- package/components/svg/BlobbyIconCloudChecked.d.ts +1 -1
- package/components/svg/BlobbyIconCloudChecked.d.ts.map +1 -1
- package/components/svg/BlobbyIconCloudChecked.js +7 -9
- package/components/svg/BlobbyIconExportOrUploadPhoto.d.ts +1 -1
- package/components/svg/BlobbyIconExportOrUploadPhoto.d.ts.map +1 -1
- package/components/svg/BlobbyIconExportOrUploadPhoto.js +7 -9
- package/components/svg/BlobbyIconFolder.d.ts +1 -1
- package/components/svg/BlobbyIconFolder.d.ts.map +1 -1
- package/components/svg/BlobbyIconFolder.js +7 -9
- package/components/svg/BlobbyIconGraphReport.d.ts +1 -1
- package/components/svg/BlobbyIconGraphReport.d.ts.map +1 -1
- package/components/svg/BlobbyIconGraphReport.js +7 -9
- package/components/svg/BlobbyIconHappy.d.ts +1 -1
- package/components/svg/BlobbyIconHappy.d.ts.map +1 -1
- package/components/svg/BlobbyIconHappy.js +7 -9
- package/components/svg/BlobbyIconHeartMonitor.d.ts +1 -1
- package/components/svg/BlobbyIconHeartMonitor.d.ts.map +1 -1
- package/components/svg/BlobbyIconHeartMonitor.js +7 -9
- package/components/svg/BlobbyIconLeaf.d.ts +1 -1
- package/components/svg/BlobbyIconLeaf.d.ts.map +1 -1
- package/components/svg/BlobbyIconLeaf.js +7 -9
- package/components/svg/BlobbyIconLibrary.d.ts +1 -1
- package/components/svg/BlobbyIconLibrary.d.ts.map +1 -1
- package/components/svg/BlobbyIconLibrary.js +7 -9
- package/components/svg/BlobbyIconNursery.d.ts +1 -1
- package/components/svg/BlobbyIconNursery.d.ts.map +1 -1
- package/components/svg/BlobbyIconNursery.js +7 -9
- package/components/svg/BlobbyIconOrganization.d.ts +1 -1
- package/components/svg/BlobbyIconOrganization.d.ts.map +1 -1
- package/components/svg/BlobbyIconOrganization.js +7 -9
- package/components/svg/BlobbyIconParchment.d.ts +1 -1
- package/components/svg/BlobbyIconParchment.d.ts.map +1 -1
- package/components/svg/BlobbyIconParchment.js +7 -9
- package/components/svg/BlobbyIconPeople.d.ts +1 -1
- package/components/svg/BlobbyIconPeople.d.ts.map +1 -1
- package/components/svg/BlobbyIconPeople.js +7 -9
- package/components/svg/BlobbyIconSeedBank.d.ts +1 -1
- package/components/svg/BlobbyIconSeedBank.d.ts.map +1 -1
- package/components/svg/BlobbyIconSeedBank.js +7 -9
- package/components/svg/BlobbyIconSeedling.d.ts +1 -1
- package/components/svg/BlobbyIconSeedling.d.ts.map +1 -1
- package/components/svg/BlobbyIconSeedling.js +7 -9
- package/components/svg/BlobbyIconSeeds.d.ts +1 -1
- package/components/svg/BlobbyIconSeeds.d.ts.map +1 -1
- package/components/svg/BlobbyIconSeeds.js +7 -9
- package/components/svg/BlobbyIconSite.d.ts +1 -1
- package/components/svg/BlobbyIconSite.d.ts.map +1 -1
- package/components/svg/BlobbyIconSite.js +7 -9
- package/components/svg/BlobbyIconSparkles.d.ts +1 -1
- package/components/svg/BlobbyIconSparkles.d.ts.map +1 -1
- package/components/svg/BlobbyIconSparkles.js +7 -9
- package/components/svg/BlobbyIconWrench.d.ts +1 -1
- package/components/svg/BlobbyIconWrench.d.ts.map +1 -1
- package/components/svg/BlobbyIconWrench.js +7 -9
- package/components/svg/Bug.d.ts +1 -1
- package/components/svg/Bug.d.ts.map +1 -1
- package/components/svg/Bug.js +7 -9
- package/components/svg/Calendar.d.ts +1 -1
- package/components/svg/Calendar.d.ts.map +1 -1
- package/components/svg/Calendar.js +7 -9
- package/components/svg/CaretDown.d.ts +1 -1
- package/components/svg/CaretDown.d.ts.map +1 -1
- package/components/svg/CaretDown.js +7 -9
- package/components/svg/CaretLeft.d.ts +1 -1
- package/components/svg/CaretLeft.d.ts.map +1 -1
- package/components/svg/CaretLeft.js +7 -9
- package/components/svg/CaretRight.d.ts +1 -1
- package/components/svg/CaretRight.d.ts.map +1 -1
- package/components/svg/CaretRight.js +7 -9
- package/components/svg/CaretUp.d.ts +1 -1
- package/components/svg/CaretUp.d.ts.map +1 -1
- package/components/svg/CaretUp.js +7 -9
- package/components/svg/ChevronDown.d.ts +1 -1
- package/components/svg/ChevronDown.d.ts.map +1 -1
- package/components/svg/ChevronDown.js +7 -9
- package/components/svg/ChevronUp.d.ts +1 -1
- package/components/svg/ChevronUp.d.ts.map +1 -1
- package/components/svg/ChevronUp.js +7 -9
- package/components/svg/Close.d.ts +1 -1
- package/components/svg/Close.d.ts.map +1 -1
- package/components/svg/Close.js +7 -9
- package/components/svg/Critical.d.ts +1 -1
- package/components/svg/Critical.d.ts.map +1 -1
- package/components/svg/Critical.js +7 -9
- package/components/svg/Edit.d.ts +1 -1
- package/components/svg/Edit.d.ts.map +1 -1
- package/components/svg/Edit.js +7 -9
- package/components/svg/Error.d.ts +1 -1
- package/components/svg/Error.d.ts.map +1 -1
- package/components/svg/Error.js +7 -9
- package/components/svg/Filter.d.ts +1 -1
- package/components/svg/Filter.d.ts.map +1 -1
- package/components/svg/Filter.js +7 -9
- package/components/svg/Folder.d.ts +1 -1
- package/components/svg/Folder.d.ts.map +1 -1
- package/components/svg/Folder.js +7 -9
- package/components/svg/Help.d.ts +1 -1
- package/components/svg/Help.d.ts.map +1 -1
- package/components/svg/Help.js +7 -9
- package/components/svg/Home.d.ts +1 -1
- package/components/svg/Home.d.ts.map +1 -1
- package/components/svg/Home.js +7 -9
- package/components/svg/IconAdd.d.ts +1 -1
- package/components/svg/IconAdd.d.ts.map +1 -1
- package/components/svg/IconAdd.js +7 -9
- package/components/svg/IconArrowRight.d.ts +1 -1
- package/components/svg/IconArrowRight.d.ts.map +1 -1
- package/components/svg/IconArrowRight.js +7 -9
- package/components/svg/IconBusinessNetwork.d.ts +1 -1
- package/components/svg/IconBusinessNetwork.d.ts.map +1 -1
- package/components/svg/IconBusinessNetwork.js +7 -9
- package/components/svg/IconCancel.d.ts +1 -1
- package/components/svg/IconCancel.d.ts.map +1 -1
- package/components/svg/IconCancel.js +7 -9
- package/components/svg/IconChargingBattery.d.ts +1 -1
- package/components/svg/IconChargingBattery.d.ts.map +1 -1
- package/components/svg/IconChargingBattery.js +7 -9
- package/components/svg/IconCheckmark.d.ts +1 -1
- package/components/svg/IconCheckmark.d.ts.map +1 -1
- package/components/svg/IconCheckmark.js +7 -9
- package/components/svg/IconCoinInHand.d.ts +1 -1
- package/components/svg/IconCoinInHand.d.ts.map +1 -1
- package/components/svg/IconCoinInHand.js +7 -9
- package/components/svg/IconColumns.d.ts +1 -1
- package/components/svg/IconColumns.d.ts.map +1 -1
- package/components/svg/IconColumns.js +7 -9
- package/components/svg/IconDashboard.d.ts +1 -1
- package/components/svg/IconDashboard.d.ts.map +1 -1
- package/components/svg/IconDashboard.js +7 -9
- package/components/svg/IconEdit.d.ts +1 -1
- package/components/svg/IconEdit.d.ts.map +1 -1
- package/components/svg/IconEdit.js +7 -9
- package/components/svg/IconExport.d.ts +1 -1
- package/components/svg/IconExport.d.ts.map +1 -1
- package/components/svg/IconExport.js +7 -9
- package/components/svg/IconFile.d.ts +1 -1
- package/components/svg/IconFile.d.ts.map +1 -1
- package/components/svg/IconFile.js +7 -9
- package/components/svg/IconFolder.d.ts +1 -1
- package/components/svg/IconFolder.d.ts.map +1 -1
- package/components/svg/IconFolder.js +7 -9
- package/components/svg/IconFullScreen.d.ts +1 -1
- package/components/svg/IconFullScreen.d.ts.map +1 -1
- package/components/svg/IconFullScreen.js +7 -9
- package/components/svg/IconFutures.d.ts +1 -1
- package/components/svg/IconFutures.d.ts.map +1 -1
- package/components/svg/IconFutures.js +7 -9
- package/components/svg/IconGraphReport.d.ts +1 -1
- package/components/svg/IconGraphReport.d.ts.map +1 -1
- package/components/svg/IconGraphReport.js +7 -9
- package/components/svg/IconHeartMonitor.d.ts +1 -1
- package/components/svg/IconHeartMonitor.d.ts.map +1 -1
- package/components/svg/IconHeartMonitor.js +7 -9
- package/components/svg/IconHistory.d.ts +1 -1
- package/components/svg/IconHistory.d.ts.map +1 -1
- package/components/svg/IconHistory.js +7 -9
- package/components/svg/IconImport.d.ts +1 -1
- package/components/svg/IconImport.d.ts.map +1 -1
- package/components/svg/IconImport.js +7 -9
- package/components/svg/IconLayers.d.ts +1 -1
- package/components/svg/IconLayers.d.ts.map +1 -1
- package/components/svg/IconLayers.js +7 -9
- package/components/svg/IconList.d.ts +1 -1
- package/components/svg/IconList.d.ts.map +1 -1
- package/components/svg/IconList.js +7 -9
- package/components/svg/IconLocations.d.ts +1 -1
- package/components/svg/IconLocations.d.ts.map +1 -1
- package/components/svg/IconLocations.js +7 -9
- package/components/svg/IconMail.d.ts +1 -1
- package/components/svg/IconMail.d.ts.map +1 -1
- package/components/svg/IconMail.js +7 -9
- package/components/svg/IconManager.d.ts +1 -1
- package/components/svg/IconManager.d.ts.map +1 -1
- package/components/svg/IconManager.js +7 -9
- package/components/svg/IconMarker.d.ts +1 -1
- package/components/svg/IconMarker.d.ts.map +1 -1
- package/components/svg/IconMarker.js +7 -9
- package/components/svg/IconMenu.d.ts +1 -1
- package/components/svg/IconMenu.d.ts.map +1 -1
- package/components/svg/IconMenu.js +7 -9
- package/components/svg/IconMenuHorizontal.d.ts +1 -1
- package/components/svg/IconMenuHorizontal.d.ts.map +1 -1
- package/components/svg/IconMenuHorizontal.js +7 -9
- package/components/svg/IconModule.d.ts +1 -1
- package/components/svg/IconModule.d.ts.map +1 -1
- package/components/svg/IconModule.js +7 -9
- package/components/svg/IconMyLocation.d.ts +1 -1
- package/components/svg/IconMyLocation.d.ts.map +1 -1
- package/components/svg/IconMyLocation.js +7 -9
- package/components/svg/IconNursery.d.ts +1 -1
- package/components/svg/IconNursery.d.ts.map +1 -1
- package/components/svg/IconNursery.js +7 -9
- package/components/svg/IconOrg.d.ts +1 -1
- package/components/svg/IconOrg.d.ts.map +1 -1
- package/components/svg/IconOrg.js +7 -9
- package/components/svg/IconParchment.d.ts +1 -1
- package/components/svg/IconParchment.d.ts.map +1 -1
- package/components/svg/IconParchment.js +7 -9
- package/components/svg/IconRedo.d.ts +1 -1
- package/components/svg/IconRedo.d.ts.map +1 -1
- package/components/svg/IconRedo.js +7 -9
- package/components/svg/IconRestorationSite.d.ts +1 -1
- package/components/svg/IconRestorationSite.d.ts.map +1 -1
- package/components/svg/IconRestorationSite.js +7 -9
- package/components/svg/IconSeedBank.d.ts +1 -1
- package/components/svg/IconSeedBank.d.ts.map +1 -1
- package/components/svg/IconSeedBank.js +7 -9
- package/components/svg/IconSeedling.d.ts +1 -1
- package/components/svg/IconSeedling.d.ts.map +1 -1
- package/components/svg/IconSeedling.js +7 -9
- package/components/svg/IconSlice.d.ts +1 -1
- package/components/svg/IconSlice.d.ts.map +1 -1
- package/components/svg/IconSlice.js +7 -9
- package/components/svg/IconSubmit.d.ts +1 -1
- package/components/svg/IconSubmit.d.ts.map +1 -1
- package/components/svg/IconSubmit.js +7 -9
- package/components/svg/IconSubtract.d.ts +1 -1
- package/components/svg/IconSubtract.d.ts.map +1 -1
- package/components/svg/IconSubtract.js +7 -9
- package/components/svg/IconSynced.d.ts +1 -1
- package/components/svg/IconSynced.d.ts.map +1 -1
- package/components/svg/IconSynced.js +7 -9
- package/components/svg/IconTrashCan.d.ts +1 -1
- package/components/svg/IconTrashCan.d.ts.map +1 -1
- package/components/svg/IconTrashCan.js +7 -9
- package/components/svg/IconTreasureMap.d.ts +1 -1
- package/components/svg/IconTreasureMap.d.ts.map +1 -1
- package/components/svg/IconTreasureMap.js +7 -9
- package/components/svg/IconUndo.d.ts +1 -1
- package/components/svg/IconUndo.d.ts.map +1 -1
- package/components/svg/IconUndo.js +7 -9
- package/components/svg/IconWifi.d.ts +1 -1
- package/components/svg/IconWifi.d.ts.map +1 -1
- package/components/svg/IconWifi.js +7 -9
- package/components/svg/Info.d.ts +1 -1
- package/components/svg/Info.d.ts.map +1 -1
- package/components/svg/Info.js +7 -9
- package/components/svg/Key.d.ts +1 -1
- package/components/svg/Key.d.ts.map +1 -1
- package/components/svg/Key.js +7 -9
- package/components/svg/Leaf.d.ts +1 -1
- package/components/svg/Leaf.d.ts.map +1 -1
- package/components/svg/Leaf.js +7 -9
- package/components/svg/Lock.d.ts +1 -1
- package/components/svg/Lock.d.ts.map +1 -1
- package/components/svg/Lock.js +7 -9
- package/components/svg/Logo.d.ts +1 -1
- package/components/svg/Logo.d.ts.map +1 -1
- package/components/svg/Logo.js +7 -9
- package/components/svg/MenuVertical.d.ts +1 -1
- package/components/svg/MenuVertical.d.ts.map +1 -1
- package/components/svg/MenuVertical.js +7 -9
- package/components/svg/Notification.d.ts +1 -1
- package/components/svg/Notification.d.ts.map +1 -1
- package/components/svg/Notification.js +7 -9
- package/components/svg/Person.d.ts +1 -1
- package/components/svg/Person.d.ts.map +1 -1
- package/components/svg/Person.js +7 -9
- package/components/svg/Plus.d.ts +1 -1
- package/components/svg/Plus.d.ts.map +1 -1
- package/components/svg/Plus.js +7 -9
- package/components/svg/RestorationSite.d.ts +1 -1
- package/components/svg/RestorationSite.d.ts.map +1 -1
- package/components/svg/RestorationSite.js +7 -9
- package/components/svg/Search.d.ts +1 -1
- package/components/svg/Search.d.ts.map +1 -1
- package/components/svg/Search.js +7 -9
- package/components/svg/Seeds.d.ts +1 -1
- package/components/svg/Seeds.d.ts.map +1 -1
- package/components/svg/Seeds.js +7 -9
- package/components/svg/Site.d.ts +1 -1
- package/components/svg/Site.d.ts.map +1 -1
- package/components/svg/Site.js +7 -9
- package/components/svg/Sparkles.d.ts +1 -1
- package/components/svg/Sparkles.d.ts.map +1 -1
- package/components/svg/Sparkles.js +7 -9
- package/components/svg/Species.d.ts +1 -1
- package/components/svg/Species.d.ts.map +1 -1
- package/components/svg/Species.js +7 -9
- package/components/svg/Species2.d.ts +1 -1
- package/components/svg/Species2.d.ts.map +1 -1
- package/components/svg/Species2.js +7 -9
- package/components/svg/Spinner.d.ts +1 -1
- package/components/svg/Spinner.d.ts.map +1 -1
- package/components/svg/Spinner.js +7 -9
- package/components/svg/Success.d.ts +1 -1
- package/components/svg/Success.d.ts.map +1 -1
- package/components/svg/Success.js +7 -9
- package/components/svg/Touchscreen.d.ts +1 -1
- package/components/svg/Touchscreen.d.ts.map +1 -1
- package/components/svg/Touchscreen.js +7 -9
- package/components/svg/UploadCloud.d.ts +1 -1
- package/components/svg/UploadCloud.d.ts.map +1 -1
- package/components/svg/UploadCloud.js +7 -9
- package/components/svg/Warning.d.ts +1 -1
- package/components/svg/Warning.d.ts.map +1 -1
- package/components/svg/Warning.js +7 -9
- package/components/svg/index.js +101 -101
- package/components/table/EnhancedTableToolbar.d.ts +1 -0
- package/components/table/EnhancedTableToolbar.d.ts.map +1 -1
- package/components/table/EnhancedTableToolbar.js +45 -45
- package/components/table/EnhancedTableToolbarV2.d.ts +2 -1
- package/components/table/EnhancedTableToolbarV2.d.ts.map +1 -1
- package/components/table/EnhancedTableToolbarV2.js +21 -22
- package/components/table/TableCellRenderer.js +70 -60
- package/components/table/TableHeader.js +27 -33
- package/components/table/TableHeaderItem.js +30 -33
- package/components/table/index.d.ts.map +1 -1
- package/components/table/index.js +145 -189
- package/components/table/sort.js +10 -16
- package/components/table/sort.test.js +12 -12
- package/index.d.ts +0 -2
- package/index.d.ts.map +1 -1
- package/index.js +50 -50
- package/license-report.html +1 -1
- package/package.json +8 -4
- package/stories/Autocomplete.stories.d.ts +2 -2
- package/stories/Autocomplete.stories.d.ts.map +1 -1
- package/stories/Badge.stories.d.ts +2 -1
- package/stories/Badge.stories.d.ts.map +1 -1
- package/stories/BusySpinner.stories.d.ts +1 -1
- package/stories/BusySpinner.stories.d.ts.map +1 -1
- package/stories/Button.stories.d.ts +1 -1
- package/stories/Button.stories.d.ts.map +1 -1
- package/stories/Checkbox.stories.d.ts +2 -2
- package/stories/Checkbox.stories.d.ts.map +1 -1
- package/stories/Confirm.stories.d.ts +5 -5
- package/stories/Confirm.stories.d.ts.map +1 -1
- package/stories/DatePicker.stories.d.ts +1 -5
- package/stories/DatePicker.stories.d.ts.map +1 -1
- package/stories/DialogBox.stories.d.ts +6 -6
- package/stories/DialogBox.stories.d.ts.map +1 -1
- package/stories/Divisor.stories.d.ts +1 -1
- package/stories/Divisor.stories.d.ts.map +1 -1
- package/stories/Dropdown.stories.d.ts +3 -3
- package/stories/Dropdown.stories.d.ts.map +1 -1
- package/stories/ErrorBox.stories.d.ts +1 -1
- package/stories/ErrorBox.stories.d.ts.map +1 -1
- package/stories/FileChooser.stories.d.ts +2 -2
- package/stories/FileChooser.stories.d.ts.map +1 -1
- package/stories/Icon.stories.d.ts +1 -1
- package/stories/Icon.stories.d.ts.map +1 -1
- package/stories/IconTooltip.stories.d.ts +2 -2
- package/stories/IconTooltip.stories.d.ts.map +1 -1
- package/stories/IntersectionObserver.stories.d.ts +1 -1
- package/stories/IntersectionObserver.stories.d.ts.map +1 -1
- package/stories/Message.stories.d.ts +2 -2
- package/stories/Message.stories.d.ts.map +1 -1
- package/stories/MultiSelect.stories.d.ts +2 -2
- package/stories/MultiSelect.stories.d.ts.map +1 -1
- package/stories/Navbar.stories.d.ts +2 -2
- package/stories/Navbar.stories.d.ts.map +1 -1
- package/stories/Note.stories.d.ts +1 -1
- package/stories/Note.stories.d.ts.map +1 -1
- package/stories/PageForm.stories.d.ts +2 -2
- package/stories/PageForm.stories.d.ts.map +1 -1
- package/stories/PhotoChooser.stories.d.ts +2 -2
- package/stories/PhotoChooser.stories.d.ts.map +1 -1
- package/stories/PillList.stories.d.ts +1 -1
- package/stories/PillList.stories.d.ts.map +1 -1
- package/stories/PopoverMenu.stories.d.ts +2 -2
- package/stories/PopoverMenu.stories.d.ts.map +1 -1
- package/stories/PopoverMultiSelect.stories.d.ts +1 -1
- package/stories/PopoverMultiSelect.stories.d.ts.map +1 -1
- package/stories/ProgressCircle.stories.d.ts +1 -1
- package/stories/ProgressCircle.stories.d.ts.map +1 -1
- package/stories/RadioButton.stories.d.ts +1 -1
- package/stories/RadioButton.stories.d.ts.map +1 -1
- package/stories/Select.stories.d.ts +3 -3
- package/stories/Select.stories.d.ts.map +1 -1
- package/stories/Separator.stories.d.ts +2 -2
- package/stories/Slider.stories.d.ts +2 -2
- package/stories/Slider.stories.d.ts.map +1 -1
- package/stories/SummaryBox.stories.d.ts +3 -3
- package/stories/SummaryBox.stories.d.ts.map +1 -1
- package/stories/Table.stories.d.ts +5 -5
- package/stories/Tabs.stories.d.ts +3 -2
- package/stories/Tabs.stories.d.ts.map +1 -1
- package/stories/TextTruncated.stories.d.ts +3 -3
- package/stories/TextTruncated.stories.d.ts.map +1 -1
- package/stories/TextfieldNew.stories.d.ts +5 -5
- package/stories/TextfieldNew.stories.d.ts.map +1 -1
- package/stories/Theme.stories.d.ts +1 -1
- package/stories/Theme.stories.d.ts.map +1 -1
- package/stories/Tooltip.stories.d.ts +1 -1
- package/stories/Tooltip.stories.d.ts.map +1 -1
- package/stories/ViewPhotosDialog.stories.d.ts +1 -1
- package/stories/ViewPhotosDialog.stories.d.ts.map +1 -1
- package/style-dictionary-dist/TerrawareTheme.js +2 -3
- package/theme.js +2 -4
- package/utils/date.d.ts +2 -21
- package/utils/date.d.ts.map +1 -1
- package/utils/date.js +26 -50
- package/utils/date.test.js +14 -51
- package/utils/date.v1.d.ts +5 -0
- package/utils/date.v1.d.ts.map +1 -0
- package/utils/date.v1.js +17 -0
- package/utils/index.d.ts +2 -2
- package/utils/index.d.ts.map +1 -1
- package/utils/index.js +7 -13
- package/utils/preventDefaultEvent.js +2 -5
- package/utils/text.js +10 -15
- package/utils/text.test.js +10 -10
- package/utils/useDeviceInfo.js +18 -18
@@ -1,16 +1,13 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
|
-
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
4
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
4
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
6
6
|
value: true
|
7
7
|
});
|
8
8
|
exports.default = EnhancedTable;
|
9
9
|
exports.isTopBarButton = void 0;
|
10
10
|
exports.tableSort = tableSort;
|
11
|
-
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/toConsumableArray"));
|
12
|
-
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
13
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
|
14
11
|
var _material = require("@mui/material");
|
15
12
|
var _react = _interopRequireWildcard(require("react"));
|
16
13
|
var _EnhancedTableToolbarV = _interopRequireDefault(require("./EnhancedTableToolbarV2"));
|
@@ -22,130 +19,107 @@ var _core = require("@dnd-kit/core");
|
|
22
19
|
var _sortable = require("@dnd-kit/sortable");
|
23
20
|
var _utils = require("../../utils");
|
24
21
|
var _Checkbox = require("../Checkbox");
|
25
|
-
|
26
|
-
|
27
|
-
hover: {
|
28
|
-
'
|
29
|
-
|
30
|
-
backgroundColor: "".concat(theme.palette.neutral[100], "!important")
|
31
|
-
}
|
32
|
-
},
|
33
|
-
table: {
|
34
|
-
borderCollapse: 'initial'
|
35
|
-
},
|
36
|
-
inactiveRow: {
|
37
|
-
background: theme.palette.neutral[50]
|
38
|
-
},
|
39
|
-
tableRow: {
|
40
|
-
'&.MuiTableRow-root.Mui-selected': {
|
41
|
-
backgroundColor: 'initial'
|
42
|
-
}
|
43
|
-
},
|
44
|
-
cellDefault: {
|
45
|
-
'&.MuiTableCell-root': {
|
46
|
-
borderBottom: "1px solid ".concat(theme.palette.TwClrBrdrSecondary)
|
47
|
-
}
|
22
|
+
const tableStyles = (0, _styles.makeStyles)(theme => ({
|
23
|
+
hover: {
|
24
|
+
'&:hover': {
|
25
|
+
cursor: 'pointer',
|
26
|
+
backgroundColor: "".concat(theme.palette.neutral[100], "!important")
|
48
27
|
}
|
49
|
-
}
|
50
|
-
|
28
|
+
},
|
29
|
+
table: {
|
30
|
+
borderCollapse: 'initial'
|
31
|
+
},
|
32
|
+
inactiveRow: {
|
33
|
+
background: theme.palette.neutral[50]
|
34
|
+
},
|
35
|
+
tableRow: {
|
36
|
+
'&.MuiTableRow-root.Mui-selected': {
|
37
|
+
backgroundColor: 'initial'
|
38
|
+
}
|
39
|
+
},
|
40
|
+
cellDefault: {
|
41
|
+
'&.MuiTableCell-root': {
|
42
|
+
borderBottom: "1px solid ".concat(theme.palette.TwClrBrdrSecondary)
|
43
|
+
}
|
44
|
+
}
|
45
|
+
}));
|
51
46
|
|
52
47
|
// Only the text related props need to be passed in by the implementer, and extra data is passed to the caller
|
53
48
|
|
54
|
-
|
55
|
-
|
49
|
+
const isTopBarButton = input => {
|
50
|
+
const castInput = input;
|
56
51
|
return !!(castInput.buttonType && castInput.onButtonClick);
|
57
52
|
};
|
58
53
|
exports.isTopBarButton = isTopBarButton;
|
59
54
|
function EnhancedTable(_ref) {
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
_order =
|
65
|
-
_orderBy
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
var _useState3 = (0, _react.useState)(0),
|
108
|
-
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
109
|
-
itemsToSkip = _useState4[0],
|
110
|
-
setItemsToSkip = _useState4[1];
|
111
|
-
var _useDeviceInfo = (0, _utils.useDeviceInfo)(),
|
112
|
-
isMobile = _useDeviceInfo.isMobile;
|
113
|
-
var _useState5 = (0, _react.useState)(),
|
114
|
-
_useState6 = (0, _slicedToArray2.default)(_useState5, 2),
|
115
|
-
displayColumnKeyNames = _useState6[0],
|
116
|
-
setDisplayColumnKeyNames = _useState6[1];
|
117
|
-
var _useState7 = (0, _react.useState)(),
|
118
|
-
_useState8 = (0, _slicedToArray2.default)(_useState7, 2),
|
119
|
-
displayColumnsIndexed = _useState8[0],
|
120
|
-
setDisplayColumnsIndexed = _useState8[1];
|
121
|
-
var _useState9 = (0, _react.useState)(),
|
122
|
-
_useState10 = (0, _slicedToArray2.default)(_useState9, 2),
|
123
|
-
displayColumnDetails = _useState10[0],
|
124
|
-
setDisplayColumnDetails = _useState10[1];
|
125
|
-
(0, _react.useEffect)(function () {
|
126
|
-
var columnsKeyNames = columns.map(function (col) {
|
127
|
-
return col.key;
|
128
|
-
});
|
129
|
-
var columnsIndexed = columns.reduce(function (acum, value) {
|
55
|
+
let {
|
56
|
+
id,
|
57
|
+
columns,
|
58
|
+
rows,
|
59
|
+
order: _order = 'asc',
|
60
|
+
orderBy: _orderBy,
|
61
|
+
Renderer = _TableCellRenderer.default,
|
62
|
+
onSelect,
|
63
|
+
DetailsRenderer,
|
64
|
+
sortComparator = _sort.descendingComparator,
|
65
|
+
sortHandler,
|
66
|
+
isInactive,
|
67
|
+
isPresorted,
|
68
|
+
onReorderEnd,
|
69
|
+
isClickable,
|
70
|
+
emptyTableMessage,
|
71
|
+
showCheckbox,
|
72
|
+
showTopBar,
|
73
|
+
topBarButtons,
|
74
|
+
selectedRows,
|
75
|
+
setSelectedRows,
|
76
|
+
controlledOnSelect,
|
77
|
+
reloadData,
|
78
|
+
stickyHeader = true,
|
79
|
+
hideHeader,
|
80
|
+
booleanFalseText,
|
81
|
+
booleanTrueText,
|
82
|
+
editText,
|
83
|
+
renderNumSelectedText,
|
84
|
+
renderPaginationText,
|
85
|
+
enhancedTopBarSelectionConfig
|
86
|
+
} = _ref;
|
87
|
+
const classes = tableStyles();
|
88
|
+
const theme = (0, _material.useTheme)();
|
89
|
+
const [order, setOrder] = _react.default.useState(_order);
|
90
|
+
const [orderBy, setOrderBy] = _react.default.useState(_orderBy);
|
91
|
+
const [maxItemsPerPage] = (0, _react.useState)(100);
|
92
|
+
const [itemsToSkip, setItemsToSkip] = (0, _react.useState)(0);
|
93
|
+
const {
|
94
|
+
isMobile
|
95
|
+
} = (0, _utils.useDeviceInfo)();
|
96
|
+
const [displayColumnKeyNames, setDisplayColumnKeyNames] = (0, _react.useState)();
|
97
|
+
const [displayColumnsIndexed, setDisplayColumnsIndexed] = (0, _react.useState)();
|
98
|
+
const [displayColumnDetails, setDisplayColumnDetails] = (0, _react.useState)();
|
99
|
+
(0, _react.useEffect)(() => {
|
100
|
+
const columnsKeyNames = columns.map(col => col.key);
|
101
|
+
const columnsIndexed = columns.reduce((acum, value) => {
|
130
102
|
acum[value.key] = value;
|
131
103
|
return acum;
|
132
104
|
}, {});
|
133
105
|
setDisplayColumnKeyNames(columnsKeyNames);
|
134
106
|
setDisplayColumnsIndexed(columnsIndexed);
|
135
107
|
}, [columns]);
|
136
|
-
(0, _react.useEffect)(
|
108
|
+
(0, _react.useEffect)(() => {
|
137
109
|
if (displayColumnKeyNames && displayColumnsIndexed) {
|
138
|
-
|
139
|
-
|
110
|
+
const columnsDetails = displayColumnKeyNames.map(key => {
|
111
|
+
const detail = {
|
112
|
+
...displayColumnsIndexed[key]
|
113
|
+
};
|
140
114
|
return detail;
|
141
115
|
});
|
142
116
|
setDisplayColumnDetails(columnsDetails);
|
143
117
|
}
|
144
118
|
}, [displayColumnKeyNames, displayColumnsIndexed]);
|
145
|
-
(0, _react.useEffect)(
|
119
|
+
(0, _react.useEffect)(() => {
|
146
120
|
if (setSelectedRows && rows.length >= 0) {
|
147
|
-
setSelectedRows(
|
148
|
-
|
121
|
+
setSelectedRows(currentlySelectedRows => {
|
122
|
+
const emptyArray = [];
|
149
123
|
if (rows.length || currentlySelectedRows.length > rows.length) {
|
150
124
|
return emptyArray;
|
151
125
|
}
|
@@ -153,7 +127,7 @@ function EnhancedTable(_ref) {
|
|
153
127
|
});
|
154
128
|
}
|
155
129
|
}, [rows, setSelectedRows]);
|
156
|
-
(0, _react.useEffect)(
|
130
|
+
(0, _react.useEffect)(() => {
|
157
131
|
// this is not most elegant but we want to do this if table was sorted by some column in a presorted table
|
158
132
|
// but we don't know when the data changes, hence this useEffect on the data size
|
159
133
|
if (isPresorted) {
|
@@ -162,22 +136,20 @@ function EnhancedTable(_ref) {
|
|
162
136
|
handleChangePage({}, 1);
|
163
137
|
}
|
164
138
|
}, [rows]);
|
165
|
-
|
166
|
-
|
167
|
-
|
139
|
+
const handleRequestSort = (event, property) => {
|
140
|
+
const isAsc = orderBy === property && order === 'asc';
|
141
|
+
const newOrder = isAsc ? 'desc' : 'asc';
|
168
142
|
setOrder(newOrder);
|
169
143
|
setOrderBy(property);
|
170
144
|
if (sortHandler) {
|
171
145
|
sortHandler(newOrder, property);
|
172
146
|
}
|
173
147
|
};
|
174
|
-
|
175
|
-
|
176
|
-
}).length > 0;
|
177
|
-
var isSelected = function isSelected(row) {
|
148
|
+
const hasEditColumn = columns.filter(c => c.type === 'edit').length > 0;
|
149
|
+
const isSelected = row => {
|
178
150
|
return selectedRows && selectedRows.indexOf(row) !== -1;
|
179
151
|
};
|
180
|
-
|
152
|
+
const handleSelectAllClick = event => {
|
181
153
|
if (setSelectedRows) {
|
182
154
|
if (event.target.checked) {
|
183
155
|
setSelectedRows(rows);
|
@@ -187,10 +159,10 @@ function EnhancedTable(_ref) {
|
|
187
159
|
}
|
188
160
|
}
|
189
161
|
};
|
190
|
-
|
162
|
+
const handleClick = (event, row) => {
|
191
163
|
if (setSelectedRows && selectedRows) {
|
192
|
-
|
193
|
-
|
164
|
+
const selectedIndex = selectedRows.indexOf(row);
|
165
|
+
let newSelected = [];
|
194
166
|
if (selectedIndex === -1) {
|
195
167
|
newSelected = newSelected.concat(selectedRows, row);
|
196
168
|
} else if (selectedIndex === 0) {
|
@@ -203,79 +175,71 @@ function EnhancedTable(_ref) {
|
|
203
175
|
setSelectedRows(newSelected);
|
204
176
|
}
|
205
177
|
};
|
206
|
-
|
178
|
+
const handleChangePage = (event, newPage) => {
|
207
179
|
setItemsToSkip(maxItemsPerPage * (newPage - 1));
|
208
180
|
};
|
209
181
|
function columnsToHeadCells(columnsR) {
|
210
|
-
return columnsR.map(
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
};
|
217
|
-
});
|
182
|
+
return columnsR.map(c => ({
|
183
|
+
id: c.key,
|
184
|
+
disablePadding: false,
|
185
|
+
label: typeof c.name === 'string' ? c.name.toUpperCase() : c.name,
|
186
|
+
tooltipTitle: c.tooltipTitle
|
187
|
+
}));
|
218
188
|
}
|
219
|
-
|
220
|
-
|
221
|
-
headCells = _React$useState6[0],
|
222
|
-
setHeadCells = _React$useState6[1];
|
223
|
-
_react.default.useEffect(function () {
|
189
|
+
const [headCells, setHeadCells] = _react.default.useState();
|
190
|
+
_react.default.useEffect(() => {
|
224
191
|
if (displayColumnDetails) {
|
225
192
|
setHeadCells(columnsToHeadCells(displayColumnDetails));
|
226
193
|
}
|
227
194
|
}, [displayColumnDetails]);
|
228
|
-
|
195
|
+
const sensors = (0, _core.useSensors)((0, _core.useSensor)(_core.MouseSensor), (0, _core.useSensor)(_core.TouchSensor), (0, _core.useSensor)(_core.KeyboardSensor, {
|
229
196
|
coordinateGetter: _sortable.sortableKeyboardCoordinates
|
230
197
|
}));
|
231
|
-
|
232
|
-
|
233
|
-
|
198
|
+
const onReorderEndHandler = (0, _react.useCallback)(_ref2 => {
|
199
|
+
let {
|
200
|
+
oldIndex,
|
201
|
+
newIndex
|
202
|
+
} = _ref2;
|
234
203
|
if (displayColumnKeyNames) {
|
235
204
|
if (newIndex !== 0 && oldIndex !== 0) {
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
setDisplayColumnKeyNames(
|
205
|
+
const newOrder = [...displayColumnKeyNames];
|
206
|
+
const moved = newOrder.splice(oldIndex, 1);
|
207
|
+
newOrder.splice(newIndex, 0, moved[0]);
|
208
|
+
setDisplayColumnKeyNames(newOrder);
|
240
209
|
if (onReorderEnd) {
|
241
|
-
onReorderEnd(
|
210
|
+
onReorderEnd(newOrder);
|
242
211
|
}
|
243
212
|
}
|
244
213
|
}
|
245
214
|
}, [displayColumnKeyNames, setDisplayColumnKeyNames, onReorderEnd]);
|
246
215
|
function handleDragEnd(event) {
|
247
216
|
if (headCells) {
|
248
|
-
|
249
|
-
|
217
|
+
const {
|
218
|
+
active,
|
219
|
+
over
|
220
|
+
} = event;
|
250
221
|
if (active && over && active.id !== over.id && onReorderEndHandler) {
|
251
|
-
|
252
|
-
|
253
|
-
});
|
254
|
-
var newIndex = headCells.findIndex(function (item) {
|
255
|
-
return item.id === over.id;
|
256
|
-
});
|
222
|
+
const oldIndex = headCells.findIndex(item => item.id === active.id);
|
223
|
+
const newIndex = headCells.findIndex(item => item.id === over.id);
|
257
224
|
onReorderEndHandler({
|
258
|
-
oldIndex
|
259
|
-
newIndex
|
225
|
+
oldIndex,
|
226
|
+
newIndex
|
260
227
|
});
|
261
228
|
}
|
262
229
|
}
|
263
230
|
}
|
264
|
-
|
231
|
+
const pagesCount = Math.ceil(rows.length / maxItemsPerPage);
|
265
232
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, showTopBar && /*#__PURE__*/_react.default.createElement(_EnhancedTableToolbarV.default, {
|
266
233
|
selectedRowsCount: (selectedRows === null || selectedRows === void 0 ? void 0 : selectedRows.length) || 0,
|
267
234
|
pagesCount: pagesCount,
|
268
235
|
renderNumSelectedText: renderNumSelectedText,
|
269
236
|
rowsCount: rows.length,
|
270
237
|
topBarButtons: topBarButtons,
|
271
|
-
topBarSelectionConfig: enhancedTopBarSelectionConfig ?
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
return setSelectedRows && setSelectedRows([]);
|
277
|
-
}
|
278
|
-
}) : undefined
|
238
|
+
topBarSelectionConfig: enhancedTopBarSelectionConfig ? {
|
239
|
+
...enhancedTopBarSelectionConfig,
|
240
|
+
handleSelectAll: () => setSelectedRows && setSelectedRows(rows),
|
241
|
+
handleSelectNone: () => setSelectedRows && setSelectedRows([])
|
242
|
+
} : undefined
|
279
243
|
}), /*#__PURE__*/_react.default.createElement(_material.TableContainer, {
|
280
244
|
id: id
|
281
245
|
}, /*#__PURE__*/_react.default.createElement(_core.DndContext, {
|
@@ -299,11 +263,9 @@ function EnhancedTable(_ref) {
|
|
299
263
|
}), /*#__PURE__*/_react.default.createElement(_material.TableBody, null, rows.length < 1 && emptyTableMessage && /*#__PURE__*/_react.default.createElement(_material.TableRow, null, /*#__PURE__*/_react.default.createElement(_material.TableCell, {
|
300
264
|
colSpan: columns.length + 1,
|
301
265
|
align: "center"
|
302
|
-
}, /*#__PURE__*/_react.default.createElement("p", null, emptyTableMessage))), rows && (isPresorted ? rows : (0, _sort.stableSort)(rows, (0, _sort.getComparator)(order, orderBy, sortComparator))).slice(itemsToSkip, itemsToSkip + maxItemsPerPage).map(
|
303
|
-
|
304
|
-
|
305
|
-
} : undefined;
|
306
|
-
var isItemSelected = isSelected(row);
|
266
|
+
}, /*#__PURE__*/_react.default.createElement("p", null, emptyTableMessage))), rows && (isPresorted ? rows : (0, _sort.stableSort)(rows, (0, _sort.getComparator)(order, orderBy, sortComparator))).slice(itemsToSkip, itemsToSkip + maxItemsPerPage).map((row, index) => {
|
267
|
+
const onClick = onSelect && !controlledOnSelect ? () => onSelect(row) : undefined;
|
268
|
+
const isItemSelected = isSelected(row);
|
307
269
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, {
|
308
270
|
key: index
|
309
271
|
}, /*#__PURE__*/_react.default.createElement(_material.TableRow, {
|
@@ -312,12 +274,12 @@ function EnhancedTable(_ref) {
|
|
312
274
|
hover: classes.hover
|
313
275
|
},
|
314
276
|
hover: Boolean(onSelect) && (isClickable ? isClickable(row) : true) && !hasEditColumn,
|
315
|
-
onClick:
|
277
|
+
onClick: e => {
|
316
278
|
e.stopPropagation();
|
317
|
-
if (
|
318
|
-
|
279
|
+
if (onClick && !hasEditColumn && (isClickable ? isClickable(row) : true)) {
|
280
|
+
onClick();
|
319
281
|
}
|
320
|
-
if (!
|
282
|
+
if (!onClick && !hasEditColumn && (isClickable ? isClickable(row) : true)) {
|
321
283
|
handleClick(e, row);
|
322
284
|
}
|
323
285
|
},
|
@@ -332,25 +294,19 @@ function EnhancedTable(_ref) {
|
|
332
294
|
sx: (0, _Checkbox.CheckboxStyle)(theme),
|
333
295
|
color: "primary",
|
334
296
|
checked: isItemSelected,
|
335
|
-
onClick:
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
reloadData: reloadData,
|
349
|
-
booleanFalseText: booleanFalseText,
|
350
|
-
booleanTrueText: booleanTrueText,
|
351
|
-
editText: editText
|
352
|
-
});
|
353
|
-
})), DetailsRenderer && /*#__PURE__*/_react.default.createElement(DetailsRenderer, {
|
297
|
+
onClick: e => !isClickable || !isClickable(row) ? handleClick(e, row) : null
|
298
|
+
})), displayColumnDetails && displayColumnDetails.map(c => /*#__PURE__*/_react.default.createElement(Renderer, {
|
299
|
+
index: index + 1,
|
300
|
+
key: c.key,
|
301
|
+
row: row,
|
302
|
+
column: c,
|
303
|
+
value: row[c.key],
|
304
|
+
onRowClick: onSelect && controlledOnSelect ? newValue => onSelect(row, c.key, newValue) : onClick,
|
305
|
+
reloadData: reloadData,
|
306
|
+
booleanFalseText: booleanFalseText,
|
307
|
+
booleanTrueText: booleanTrueText,
|
308
|
+
editText: editText
|
309
|
+
}))), DetailsRenderer && /*#__PURE__*/_react.default.createElement(DetailsRenderer, {
|
354
310
|
index: index,
|
355
311
|
row: row
|
356
312
|
}));
|
package/components/table/sort.js
CHANGED
@@ -9,14 +9,14 @@ exports.stableSort = stableSort;
|
|
9
9
|
function descendingComparator(a, b, orderBy, order) {
|
10
10
|
var _b$orderBy, _a$orderBy;
|
11
11
|
// first attempt to parse into a numeric value and compare
|
12
|
-
|
12
|
+
const numCompare = descendingNumComparator(a, b, orderBy);
|
13
13
|
if (numCompare !== null) {
|
14
14
|
return numCompare;
|
15
15
|
}
|
16
16
|
|
17
17
|
// if non-numeric, compare using the javascript built-in compare for this type
|
18
|
-
|
19
|
-
|
18
|
+
const bValue = (_b$orderBy = b[orderBy]) !== null && _b$orderBy !== void 0 ? _b$orderBy : '';
|
19
|
+
const aValue = (_a$orderBy = a[orderBy]) !== null && _a$orderBy !== void 0 ? _a$orderBy : '';
|
20
20
|
|
21
21
|
// blank values at the end always (any order)
|
22
22
|
if (isEmptyValue(aValue.toString()) && isEmptyValue(bValue.toString())) {
|
@@ -45,30 +45,24 @@ function isEmptyValue(value) {
|
|
45
45
|
}
|
46
46
|
function descendingNumComparator(a, b, orderBy) {
|
47
47
|
var _a$orderBy2, _b$orderBy2;
|
48
|
-
|
49
|
-
|
48
|
+
const aNumValue = Number((_a$orderBy2 = a[orderBy]) !== null && _a$orderBy2 !== void 0 ? _a$orderBy2 : '0.0');
|
49
|
+
const bNumValue = Number((_b$orderBy2 = b[orderBy]) !== null && _b$orderBy2 !== void 0 ? _b$orderBy2 : '0.0');
|
50
50
|
if (!isNaN(aNumValue) && !isNaN(bNumValue)) {
|
51
51
|
return bNumValue - aNumValue;
|
52
52
|
}
|
53
53
|
return null;
|
54
54
|
}
|
55
55
|
function getComparator(order, orderBy, sorting) {
|
56
|
-
return
|
57
|
-
return sorting(a, b, orderBy, order);
|
58
|
-
};
|
56
|
+
return (a, b) => sorting(a, b, orderBy, order);
|
59
57
|
}
|
60
58
|
function stableSort(array, comparator) {
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
stabilizedThis.sort(function (a, b) {
|
65
|
-
var order = comparator(a[0], b[0]);
|
59
|
+
const stabilizedThis = array.map((el, index) => [el, index]);
|
60
|
+
stabilizedThis.sort((a, b) => {
|
61
|
+
const order = comparator(a[0], b[0]);
|
66
62
|
if (order !== 0) {
|
67
63
|
return order;
|
68
64
|
}
|
69
65
|
return a[1] - b[1];
|
70
66
|
});
|
71
|
-
return stabilizedThis.map(
|
72
|
-
return el[0];
|
73
|
-
});
|
67
|
+
return stabilizedThis.map(el => el[0]);
|
74
68
|
}
|
@@ -1,37 +1,37 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
3
|
var _sort = require("./sort");
|
4
|
-
|
4
|
+
const rowA = {
|
5
5
|
string1: 'foo',
|
6
6
|
string2: 'same',
|
7
7
|
number1: '1050',
|
8
8
|
number2: '150',
|
9
9
|
number3: '1.100'
|
10
10
|
};
|
11
|
-
|
11
|
+
const rowB = {
|
12
12
|
string1: 'barbaz',
|
13
13
|
string2: 'same',
|
14
14
|
number1: '1099',
|
15
15
|
number2: '21.001',
|
16
16
|
number3: '1.1'
|
17
17
|
};
|
18
|
-
test('compare unequal string fields',
|
19
|
-
|
18
|
+
test('compare unequal string fields', () => {
|
19
|
+
const cmp = (0, _sort.descendingComparator)(rowA, rowB, 'string1', 'desc');
|
20
20
|
expect(cmp).toEqual(-1);
|
21
21
|
});
|
22
|
-
test('compare equal string fields',
|
23
|
-
|
22
|
+
test('compare equal string fields', () => {
|
23
|
+
const cmp = (0, _sort.descendingComparator)(rowA, rowB, 'string2', 'desc');
|
24
24
|
expect(cmp).toEqual(0);
|
25
25
|
});
|
26
|
-
test('compare unequal number fields with same whole number digits',
|
27
|
-
|
26
|
+
test('compare unequal number fields with same whole number digits', () => {
|
27
|
+
const cmp = (0, _sort.descendingComparator)(rowA, rowB, 'number1', 'desc');
|
28
28
|
expect(Math.sign(cmp)).toEqual(1);
|
29
29
|
});
|
30
|
-
test('compare unequal number fields with differing whole number digits',
|
31
|
-
|
30
|
+
test('compare unequal number fields with differing whole number digits', () => {
|
31
|
+
const cmp = (0, _sort.descendingComparator)(rowA, rowB, 'number2', 'desc');
|
32
32
|
expect(Math.sign(cmp)).toEqual(-1);
|
33
33
|
});
|
34
|
-
test('compare equal number fields',
|
35
|
-
|
34
|
+
test('compare equal number fields', () => {
|
35
|
+
const cmp = (0, _sort.descendingComparator)(rowA, rowB, 'number3', 'desc');
|
36
36
|
expect(Math.sign(cmp)).toEqual(0);
|
37
37
|
});
|
package/index.d.ts
CHANGED
@@ -58,7 +58,5 @@ export type { PhotoItem } from './components/ViewPhotosDialog';
|
|
58
58
|
export type { SliderMark } from './components/Slider';
|
59
59
|
export type { Tab, TabsProps } from './components/Tabs';
|
60
60
|
export type { ConfirmProps } from './components/Confirm';
|
61
|
-
export type { DatePickerDateType, Props as DatePickerProps } from './components/DatePicker/DatePicker';
|
62
|
-
export type { DateType } from './utils/date';
|
63
61
|
export { Autocomplete, Badge, BusySpinner, Button, CellRenderer, CellDateRenderer, Checkbox, Confirm, DatePicker, descendingComparator, DialogBox, Divisor, Dropdown, DropdownV1, ErrorBox, FileChooser, FormBottomBar, getComparator, icons, Icon, IconTooltip, Message, MultiSelect, NavFooter, NavItem, NavSection, Navbar, Note, PageForm, Pill, PillList, PhotoChooser, Popover, PopoverMenu, PopoverMultiSelect, ProgressCircle, RadioButton, Select, SelectT, Separator, Slider, stableSort, SummaryBox, Svg, Table, Tabs, Textfield, TextTruncated, theme, Tooltip, ViewPhotosDialog, };
|
64
62
|
//# sourceMappingURL=index.d.ts.map
|
package/index.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,OAAO,YAAY,MAAM,wCAAwC,CAAC;AAClE,OAAO,KAAK,MAAM,oBAAoB,CAAC;AACvC,OAAO,WAAW,MAAM,0BAA0B,CAAC;AACnD,OAAO,MAAM,MAAM,4BAA4B,CAAC;AAChD,OAAO,QAAQ,MAAM,uBAAuB,CAAC;AAC7C,OAAO,OAAO,MAAM,sBAAsB,CAAC;AAC3C,OAAO,UAAU,MAAM,oCAAoC,CAAC;AAC5D,OAAO,SAAS,MAAM,kCAAkC,CAAC;AACzD,OAAO,OAAO,MAAM,sBAAsB,CAAC;AAC3C,OAAO,QAAQ,EAAE,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,QAAQ,MAAM,gCAAgC,CAAC;AACtD,OAAO,aAAa,MAAM,4BAA4B,CAAC;AACvD,OAAO,IAAI,MAAM,wBAAwB,CAAC;AAC1C,OAAO,WAAW,MAAM,0BAA0B,CAAC;AACnD,OAAO,KAAK,MAAM,yBAAyB,CAAC;AAC5C,OAAO,WAAW,MAAM,0BAA0B,CAAC;AACnD,OAAO,MAAM,MAAM,4BAA4B,CAAC;AAChD,OAAO,SAAS,MAAM,+BAA+B,CAAC;AACtD,OAAO,OAAO,MAAM,6BAA6B,CAAC;AAClD,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