@terraware/web-components 4.2.25 → 4.2.26-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_vendor/react-multi-carousel/index.js +13 -0
- package/_vendor/react-multi-carousel/lib/Arrows.js +13 -0
- package/_vendor/react-multi-carousel/lib/Carousel.js +19 -0
- package/_vendor/react-multi-carousel/lib/CarouselItems.js +14 -0
- package/_vendor/react-multi-carousel/lib/Dots.js +16 -0
- package/_vendor/react-multi-carousel/lib/index.js +13 -0
- package/_vendor/react-multi-carousel/lib/types.js +13 -0
- package/_vendor/react-multi-carousel/lib/utils/clones.js +14 -0
- package/_vendor/react-multi-carousel/lib/utils/common.js +13 -0
- package/_vendor/react-multi-carousel/lib/utils/dots.js +14 -0
- package/_vendor/react-multi-carousel/lib/utils/elementWidth.js +12 -0
- package/_vendor/react-multi-carousel/lib/utils/index.js +20 -0
- package/_vendor/react-multi-carousel/lib/utils/mouseOrTouchMove.js +14 -0
- package/_vendor/react-multi-carousel/lib/utils/next.js +13 -0
- package/_vendor/react-multi-carousel/lib/utils/previous.js +14 -0
- package/_vendor/react-multi-carousel/lib/utils/throttle.js +12 -0
- package/_vendor/react-multi-carousel/lib/utils/throwError.js +14 -0
- package/_virtual/Arrows.js +3 -0
- package/_virtual/Carousel.js +3 -0
- package/_virtual/CarouselItems.js +3 -0
- package/_virtual/Dots.js +3 -0
- package/_virtual/_commonjsHelpers.js +5 -0
- package/_virtual/clones.js +3 -0
- package/_virtual/common.js +3 -0
- package/_virtual/dots2.js +3 -0
- package/_virtual/elementWidth.js +3 -0
- package/_virtual/index.js +7 -0
- package/_virtual/index2.js +3 -0
- package/_virtual/index3.js +3 -0
- package/_virtual/mouseOrTouchMove.js +3 -0
- package/_virtual/next.js +3 -0
- package/_virtual/previous.js +3 -0
- package/_virtual/throttle.js +3 -0
- package/_virtual/throwError.js +3 -0
- package/_virtual/types.js +3 -0
- package/components/AntSwitch/index.js +6 -4
- package/components/Autocomplete/Autocomplete.js +19 -16
- package/components/Badge/index.js +8 -6
- package/components/BusySpinner/index.js +11 -8
- package/components/Button/Button.js +12 -9
- package/components/Checkbox.js +11 -8
- package/components/Confirm/index.js +14 -17
- package/components/DatePicker/DatePicker.js +19 -23
- package/components/DialogBox/DialogBox.js +25 -20
- package/components/Divisor.js +11 -8
- package/components/Dropdown.js +18 -15
- package/components/EditableTable/index.js +17 -14
- package/components/ErrorBox/ErrorBox.js +18 -15
- package/components/FileChooser/index.js +20 -15
- package/components/FormBottomBar/index.js +15 -12
- package/components/Icon/Icon.js +9 -6
- package/components/Icon/icons/index.js +252 -251
- package/components/IconTooltip/index.js +14 -9
- package/components/Map/MapBox.js +35 -32
- package/components/Map/MapContainer.js +10 -6
- package/components/Map/MapDateSliderControl.js +14 -12
- package/components/Map/MapDrawer.js +16 -12
- package/components/Map/MapLegend.js +32 -28
- package/components/Map/MapViewStyleControl.js +11 -9
- package/components/Map/ReactMapboxWrapper.js +1 -1
- package/components/Map/index.js +13 -11
- package/components/Map/types.js +5 -3
- package/components/Map/useMaintainLayerOrder.js +5 -2
- package/components/Markdown/index.js +6 -4
- package/components/Message/Message.js +25 -20
- package/components/MultiSelect/index.js +26 -23
- package/components/Navbar/NavFooter.js +8 -5
- package/components/Navbar/NavItem.js +14 -11
- package/components/Navbar/NavSection.js +10 -7
- package/components/Navbar/Navbar.js +16 -11
- package/components/Navbar/SubNavbar.js +8 -5
- package/components/Note.js +10 -7
- package/components/OverlayModal/OverlayModal.js +13 -11
- package/components/PageForm/index.js +15 -12
- package/components/PhotoChooser/index.js +30 -25
- package/components/PhotosCarousel/index.d.ts.map +1 -1
- package/components/PhotosCarousel/index.js +17 -13
- package/components/Pill/index.js +14 -11
- package/components/PillList/index.js +10 -7
- package/components/PlacementWrapper/index.js +8 -6
- package/components/PopoverMenu/Popover.js +12 -9
- package/components/PopoverMenu/index.js +14 -11
- package/components/PopoverMultiSelect/index.js +14 -11
- package/components/ProgressCircle/ProgressCircle.js +12 -9
- package/components/RadioButton.js +9 -6
- package/components/Select/Select.js +9 -6
- package/components/Select/SelectT.js +30 -26
- package/components/Separator/index.js +7 -5
- package/components/Size.js +1 -1
- package/components/Slider/index.js +9 -6
- package/components/SummaryBox.js +13 -10
- package/components/Tabs/index.js +22 -18
- package/components/TextTruncated/index.js +13 -20
- package/components/Textfield/Textfield.js +34 -28
- package/components/Textfield/TruncatedTextArea.js +12 -10
- package/components/TimelineSlider/TimelineMarker.js +8 -6
- package/components/TimelineSlider/TimelineRail.js +6 -4
- package/components/TimelineSlider/index.js +14 -12
- package/components/Tooltip/Tooltip.js +12 -7
- package/components/ViewPhotosDialog/index.js +14 -11
- package/components/VirtualWalkthrough/Annotation.js +10 -8
- package/components/VirtualWalkthrough/AnnotationEditPane.js +23 -21
- package/components/VirtualWalkthrough/AnnotationPanel.js +16 -14
- package/components/VirtualWalkthrough/Application.js +9 -7
- package/components/VirtualWalkthrough/AutoRotator.js +5 -3
- package/components/VirtualWalkthrough/BlockingSpinner.js +10 -7
- package/components/VirtualWalkthrough/BoundaryRing.js +8 -6
- package/components/VirtualWalkthrough/BoundaryWall.js +8 -6
- package/components/VirtualWalkthrough/CameraInfo.js +15 -13
- package/components/VirtualWalkthrough/ControlsInfoPane.js +59 -57
- package/components/VirtualWalkthrough/GradientSky.js +8 -6
- package/components/VirtualWalkthrough/SplatControls.js +37 -35
- package/components/VirtualWalkthrough/SplatCrop.js +6 -4
- package/components/VirtualWalkthrough/SplatFadeCrop.js +7 -5
- package/components/VirtualWalkthrough/SplatModel.js +17 -14
- package/components/VirtualWalkthrough/SplatRevealRain.js +6 -4
- package/components/VirtualWalkthrough/TfAnnotationManager.js +8 -5
- package/components/VirtualWalkthrough/TfXrNavigation.js +7 -5
- package/components/VirtualWalkthrough/VirtualWalkthroughViewer.js +47 -45
- package/components/VirtualWalkthrough/VrAnnotationPanel.js +9 -7
- package/components/VirtualWalkthrough/XrAnnotationInteraction.js +9 -7
- package/components/VirtualWalkthrough/XrExitButton.js +9 -7
- package/components/VirtualWalkthrough/XrGazeDwell.js +9 -7
- package/components/VirtualWalkthrough/XrPointerRay.js +9 -7
- package/components/VirtualWalkthrough/boundary-ring.js +7 -5
- package/components/VirtualWalkthrough/boundary-wall.js +8 -6
- package/components/VirtualWalkthrough/groundPlane.js +6 -3
- package/components/VirtualWalkthrough/gsplat-fade-crop-effect.js +5 -2
- package/components/VirtualWalkthrough/splatFormat.js +6 -4
- package/components/VirtualWalkthrough/vr-annotation-panel-layout.js +4 -2
- package/components/VirtualWalkthrough/vr-annotation-panel.js +8 -5
- package/components/VirtualWalkthrough/walkthrough-camera.js +6 -4
- package/components/VirtualWalkthrough/xr-annotation-candidates.js +8 -6
- package/components/VirtualWalkthrough/xr-annotation-interaction.js +9 -6
- package/components/VirtualWalkthrough/xr-annotation-targeting.js +5 -2
- package/components/VirtualWalkthrough/xr-button-arming.js +4 -2
- package/components/VirtualWalkthrough/xr-button-hold.js +5 -3
- package/components/VirtualWalkthrough/xr-exit-button.js +10 -8
- package/components/VirtualWalkthrough/xr-face-buttons.js +6 -4
- package/components/VirtualWalkthrough/xr-gaze-dwell-state.js +5 -3
- package/components/VirtualWalkthrough/xr-gaze-dwell.js +9 -7
- package/components/VirtualWalkthrough/xr-interactive-ui.js +10 -8
- package/components/VirtualWalkthrough/xr-pointer-ray.js +5 -3
- package/components/VirtualWalkthrough/xr-progress-pie.js +4 -2
- package/components/VirtualWalkthrough/xr-ray-quad.js +5 -2
- package/components/VirtualWalkthrough/xr-scene-bounds.js +5 -3
- package/components/VirtualWalkthrough/xr-teleport-gesture.js +4 -2
- package/components/svg/BlobbyGrayIconImage.js +13 -11
- package/components/svg/BlobbyGrayIconImport.js +13 -11
- package/components/svg/BlobbyGrayIconUploadToTheCloud.js +13 -11
- package/components/svg/BlobbyIconCloudChecked.js +41 -39
- package/components/svg/BlobbyIconExportOrUploadPhoto.js +41 -39
- package/components/svg/BlobbyIconFolder.js +41 -39
- package/components/svg/BlobbyIconGraphReport.js +41 -39
- package/components/svg/BlobbyIconHappy.js +41 -39
- package/components/svg/BlobbyIconHeartMonitor.js +41 -39
- package/components/svg/BlobbyIconLeaf.js +41 -39
- package/components/svg/BlobbyIconLibrary.js +41 -39
- package/components/svg/BlobbyIconNursery.js +41 -39
- package/components/svg/BlobbyIconOrganization.js +41 -39
- package/components/svg/BlobbyIconParchment.js +41 -39
- package/components/svg/BlobbyIconPeople.js +41 -39
- package/components/svg/BlobbyIconSeedBank.js +41 -39
- package/components/svg/BlobbyIconSeedling.js +41 -39
- package/components/svg/BlobbyIconSeeds.js +41 -39
- package/components/svg/BlobbyIconSite.js +42 -40
- package/components/svg/BlobbyIconSparkles.js +41 -39
- package/components/svg/BlobbyIconWrench.js +41 -39
- package/components/svg/Bug.js +8 -6
- package/components/svg/Calendar.js +8 -6
- package/components/svg/CaretDown.js +8 -6
- package/components/svg/CaretLeft.js +8 -6
- package/components/svg/CaretRight.js +8 -6
- package/components/svg/CaretUp.js +8 -6
- package/components/svg/ChevronDown.js +8 -6
- package/components/svg/ChevronUp.js +8 -6
- package/components/svg/Close.js +8 -6
- package/components/svg/Critical.js +8 -6
- package/components/svg/Edit.js +41 -39
- package/components/svg/Error.js +8 -6
- package/components/svg/Filter.js +8 -6
- package/components/svg/Folder.js +8 -6
- package/components/svg/Help.js +8 -6
- package/components/svg/Home.js +8 -6
- package/components/svg/IconAdd.js +8 -6
- package/components/svg/IconArrowRight.js +8 -6
- package/components/svg/IconBusinessNetwork.js +8 -6
- package/components/svg/IconCalendar.js +8 -6
- package/components/svg/IconCancel.js +8 -6
- package/components/svg/IconChargingBattery.js +8 -6
- package/components/svg/IconChecklist.js +8 -6
- package/components/svg/IconCheckmark.js +8 -6
- package/components/svg/IconCoinInHand.js +8 -6
- package/components/svg/IconColumns.js +8 -6
- package/components/svg/IconComment.js +8 -6
- package/components/svg/IconDashboard.js +8 -6
- package/components/svg/IconDataMigration.js +8 -6
- package/components/svg/IconDocument.js +8 -6
- package/components/svg/IconDownloadFromTheCloud.js +8 -6
- package/components/svg/IconEdit.js +8 -6
- package/components/svg/IconExpand.js +8 -6
- package/components/svg/IconExport.js +8 -6
- package/components/svg/IconExternalLink.js +8 -6
- package/components/svg/IconEye.js +8 -6
- package/components/svg/IconEyeOff.js +8 -6
- package/components/svg/IconFile.js +8 -6
- package/components/svg/IconFolder.js +8 -6
- package/components/svg/IconFullScreen.js +8 -6
- package/components/svg/IconFutures.js +8 -6
- package/components/svg/IconGraphReport.js +8 -6
- package/components/svg/IconHeartMonitor.js +8 -6
- package/components/svg/IconHelp.js +8 -6
- package/components/svg/IconHistory.js +8 -6
- package/components/svg/IconImport.js +8 -6
- package/components/svg/IconIndex.js +8 -6
- package/components/svg/IconLayers.js +8 -6
- package/components/svg/IconLibrary.js +8 -6
- package/components/svg/IconList.js +8 -6
- package/components/svg/IconLivePlant.js +8 -6
- package/components/svg/IconLocations.js +8 -6
- package/components/svg/IconMail.js +8 -6
- package/components/svg/IconManager.js +8 -6
- package/components/svg/IconMarker.js +8 -6
- package/components/svg/IconMenu.js +8 -6
- package/components/svg/IconMenuHorizontal.js +8 -6
- package/components/svg/IconModule.js +8 -6
- package/components/svg/IconMyLocation.js +8 -6
- package/components/svg/IconNote.js +8 -6
- package/components/svg/IconNursery.js +8 -6
- package/components/svg/IconOrg.js +8 -6
- package/components/svg/IconParchment.js +8 -6
- package/components/svg/IconPhoto.js +8 -6
- package/components/svg/IconPlantsFilled.js +8 -6
- package/components/svg/IconRedo.js +8 -6
- package/components/svg/IconRestorationSite.js +8 -6
- package/components/svg/IconSeedBank.js +8 -6
- package/components/svg/IconSeedling.js +8 -6
- package/components/svg/IconSettings.js +8 -6
- package/components/svg/IconSlice.js +8 -6
- package/components/svg/IconSubmit.js +8 -6
- package/components/svg/IconSubtract.js +8 -6
- package/components/svg/IconSynced.js +8 -6
- package/components/svg/IconTrashCan.js +8 -6
- package/components/svg/IconTreasureMap.js +8 -6
- package/components/svg/IconUnavailable.js +8 -6
- package/components/svg/IconUndo.js +8 -6
- package/components/svg/IconVariable.js +8 -6
- package/components/svg/IconVideo.js +9 -7
- package/components/svg/IconWifi.js +8 -6
- package/components/svg/Info.js +8 -6
- package/components/svg/Key.js +8 -6
- package/components/svg/Leaf.js +8 -6
- package/components/svg/Lock.js +8 -6
- package/components/svg/Logo.js +16 -14
- package/components/svg/MenuVertical.js +8 -6
- package/components/svg/Notification.js +8 -6
- package/components/svg/Person.js +8 -6
- package/components/svg/Plus.js +8 -6
- package/components/svg/RestorationSite.js +8 -6
- package/components/svg/Search.js +8 -6
- package/components/svg/Seeds.js +8 -6
- package/components/svg/Site.js +8 -6
- package/components/svg/Sparkles.js +8 -6
- package/components/svg/Species.js +8 -6
- package/components/svg/Species2.js +41 -39
- package/components/svg/Spinner.js +16 -14
- package/components/svg/Star.js +8 -6
- package/components/svg/Success.js +8 -6
- package/components/svg/SuccessFilled.js +8 -6
- package/components/svg/TerrawareLogoDesktop.js +17 -15
- package/components/svg/TerrawareLogoMobile.js +9 -7
- package/components/svg/Touchscreen.js +8 -6
- package/components/svg/UploadCloud.js +41 -39
- package/components/svg/Warning.js +8 -6
- package/components/svg/WelcomeClipboard.js +32 -30
- package/components/svg/index.js +127 -127
- package/components/table/EnhancedTableToolbar.js +18 -15
- package/components/table/EnhancedTableToolbarV2.js +8 -6
- package/components/table/TableCellRenderer.js +37 -32
- package/components/table/TableHeader.js +17 -14
- package/components/table/TableHeaderItem.js +18 -15
- package/components/table/density.js +5 -3
- package/components/table/index.js +40 -37
- package/components/table/sort.js +6 -4
- package/components/table/types.js +1 -1
- package/components/types/index.js +1 -1
- package/hooks/useBoolean.js +4 -2
- package/hooks/useCameraPosition.js +5 -2
- package/hooks/useDevicePerformance.js +6 -3
- package/hooks/useXr.js +6 -4
- package/index.js +55 -58
- package/package.json +6 -2
- package/style-dictionary-dist/TerrawareTheme.js +2 -1
- package/theme.js +5 -2
- package/utils/color.js +5 -2
- package/utils/date.js +7 -6
- package/utils/index.js +4 -5
- package/utils/preventDefaultEvent.js +2 -1
- package/utils/text.js +3 -2
- package/utils/useDeviceInfo.js +2 -1
- package/virtualWalkthrough.js +23 -31
- package/components/Button/button.test.js +0 -23
- package/components/MultiSelect/MultiSelect.test.js +0 -73
- package/components/VirtualWalkthrough/TfXrNavigation.test.js +0 -110
- package/components/VirtualWalkthrough/boundary-ring.test.js +0 -109
- package/components/VirtualWalkthrough/boundary-wall.test.js +0 -203
- package/components/VirtualWalkthrough/groundPlane.test.js +0 -45
- package/components/VirtualWalkthrough/splatFormat.test.js +0 -51
- package/components/VirtualWalkthrough/vr-annotation-panel-layout.test.js +0 -26
- package/components/VirtualWalkthrough/xr-annotation-targeting.test.js +0 -66
- package/components/VirtualWalkthrough/xr-button-arming.test.js +0 -35
- package/components/VirtualWalkthrough/xr-button-hold.test.js +0 -57
- package/components/VirtualWalkthrough/xr-exit-button.test.js +0 -23
- package/components/VirtualWalkthrough/xr-face-buttons.test.js +0 -82
- package/components/VirtualWalkthrough/xr-gaze-dwell-state.test.js +0 -61
- package/components/VirtualWalkthrough/xr-interactive-ui.test.js +0 -165
- package/components/VirtualWalkthrough/xr-progress-pie.test.js +0 -79
- package/components/VirtualWalkthrough/xr-ray-quad.test.js +0 -37
- package/components/VirtualWalkthrough/xr-scene-bounds.test.js +0 -70
- package/components/VirtualWalkthrough/xr-teleport-gesture.test.js +0 -90
- package/components/table/sort.test.js +0 -35
- package/utils/date.test.js +0 -84
- package/utils/text.test.js +0 -21
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { Box, CircularProgress
|
|
1
|
+
import 'react';
|
|
2
|
+
import { useTheme, Box, CircularProgress } from '@mui/material';
|
|
3
3
|
import hexRgb from 'hex-rgb';
|
|
4
|
-
import { jsx
|
|
5
|
-
|
|
4
|
+
import { jsx } from 'react/jsx-runtime';
|
|
5
|
+
|
|
6
|
+
function BusySpinner({
|
|
6
7
|
withSkrim,
|
|
7
8
|
noBackground
|
|
8
9
|
}) {
|
|
9
10
|
const theme = useTheme();
|
|
10
|
-
return /*#__PURE__*/
|
|
11
|
+
return /*#__PURE__*/jsx(Box, {
|
|
11
12
|
sx: {
|
|
12
13
|
position: 'fixed',
|
|
13
14
|
left: 0,
|
|
@@ -27,18 +28,20 @@ export default function BusySpinner({
|
|
|
27
28
|
format: 'css'
|
|
28
29
|
})} 100%)`
|
|
29
30
|
},
|
|
30
|
-
children: /*#__PURE__*/
|
|
31
|
+
children: /*#__PURE__*/jsx(Box, {
|
|
31
32
|
display: "flex",
|
|
32
33
|
justifyContent: "center",
|
|
33
34
|
alignItems: "center",
|
|
34
35
|
padding: theme.spacing(5),
|
|
35
36
|
flexDirection: "column",
|
|
36
37
|
height: "100%",
|
|
37
|
-
children: /*#__PURE__*/
|
|
38
|
+
children: /*#__PURE__*/jsx(CircularProgress, {
|
|
38
39
|
sx: {
|
|
39
40
|
color: theme.palette.TwClrIcnBrand
|
|
40
41
|
}
|
|
41
42
|
})
|
|
42
43
|
})
|
|
43
44
|
});
|
|
44
|
-
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export { BusySpinner as default };
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import 'react';
|
|
2
2
|
import { ButtonBase } from '@mui/material';
|
|
3
|
-
import Icon from '../Icon/Icon';
|
|
3
|
+
import Icon from '../Icon/Icon.js';
|
|
4
4
|
import './styles.scss';
|
|
5
|
-
import {
|
|
6
|
-
|
|
5
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
6
|
+
|
|
7
|
+
function Button(props) {
|
|
7
8
|
const {
|
|
8
9
|
onClick,
|
|
9
10
|
label,
|
|
@@ -19,7 +20,7 @@ export default function Button(props) {
|
|
|
19
20
|
style,
|
|
20
21
|
sx
|
|
21
22
|
} = props;
|
|
22
|
-
return /*#__PURE__*/
|
|
23
|
+
return /*#__PURE__*/jsxs(ButtonBase, {
|
|
23
24
|
id: id,
|
|
24
25
|
onClick: onClick,
|
|
25
26
|
className: `button ${type}-${priority} button--${size} ${type}-${priority}--${size} ${icon && !processing ? 'button-with-icon' : ''} ${rightIcon && !processing ? 'button-with-right-icon' : ''}
|
|
@@ -31,17 +32,19 @@ export default function Button(props) {
|
|
|
31
32
|
fill: 'currentColor'
|
|
32
33
|
}
|
|
33
34
|
}, ...(Array.isArray(sx) ? sx : [sx])],
|
|
34
|
-
children: [processing && /*#__PURE__*/
|
|
35
|
+
children: [processing && /*#__PURE__*/jsx(Icon, {
|
|
35
36
|
name: "spinner",
|
|
36
37
|
size: size,
|
|
37
38
|
className: "icon-spinner"
|
|
38
|
-
}), !processing && icon && /*#__PURE__*/
|
|
39
|
+
}), !processing && icon && /*#__PURE__*/jsx(Icon, {
|
|
39
40
|
name: icon,
|
|
40
41
|
size: size
|
|
41
|
-
}), !processing && !!label && label, !processing && rightIcon && /*#__PURE__*/
|
|
42
|
+
}), !processing && !!label && label, !processing && rightIcon && /*#__PURE__*/jsx(Icon, {
|
|
42
43
|
name: rightIcon,
|
|
43
44
|
size: size,
|
|
44
45
|
className: "icon-right"
|
|
45
46
|
})]
|
|
46
47
|
});
|
|
47
|
-
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export { Button as default };
|
package/components/Checkbox.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { FormControlLabel, Checkbox as
|
|
3
|
-
import { jsx
|
|
4
|
-
|
|
1
|
+
import 'react';
|
|
2
|
+
import { useTheme, FormControlLabel, Checkbox as Checkbox$1 } from '@mui/material';
|
|
3
|
+
import { jsx } from 'react/jsx-runtime';
|
|
4
|
+
|
|
5
|
+
const CheckboxStyle = theme => ({
|
|
5
6
|
padding: theme.spacing(0, 1, 0, 0),
|
|
6
7
|
'& .MuiSvgIcon-root': {
|
|
7
8
|
fill: theme.palette.TwClrBrdrSecondary
|
|
@@ -24,7 +25,7 @@ export const CheckboxStyle = theme => ({
|
|
|
24
25
|
opacity: 0.5
|
|
25
26
|
}
|
|
26
27
|
});
|
|
27
|
-
|
|
28
|
+
function Checkbox(props) {
|
|
28
29
|
const theme = useTheme();
|
|
29
30
|
const onChange = (event, checked) => {
|
|
30
31
|
if (props.indeterminate) {
|
|
@@ -33,12 +34,12 @@ export default function Checkbox(props) {
|
|
|
33
34
|
}
|
|
34
35
|
props.onChange(checked);
|
|
35
36
|
};
|
|
36
|
-
return /*#__PURE__*/
|
|
37
|
+
return /*#__PURE__*/jsx(FormControlLabel, {
|
|
37
38
|
id: props.id,
|
|
38
39
|
onChange: onChange,
|
|
39
40
|
label: props.label,
|
|
40
41
|
disabled: props.disabled,
|
|
41
|
-
control: /*#__PURE__*/
|
|
42
|
+
control: /*#__PURE__*/jsx(Checkbox$1, {
|
|
42
43
|
disabled: props.disabled,
|
|
43
44
|
disableRipple: true,
|
|
44
45
|
id: 'check-' + props.id,
|
|
@@ -58,4 +59,6 @@ export default function Checkbox(props) {
|
|
|
58
59
|
margin: theme.spacing(1, 0, 0, 0)
|
|
59
60
|
}
|
|
60
61
|
});
|
|
61
|
-
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export { CheckboxStyle, Checkbox as default };
|
|
@@ -1,15 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import Button from '../Button/Button';
|
|
4
|
-
import DialogBox from '../DialogBox/DialogBox';
|
|
1
|
+
import { useMemo } from 'react';
|
|
2
|
+
import { useTheme, Typography } from '@mui/material';
|
|
3
|
+
import Button from '../Button/Button.js';
|
|
4
|
+
import DialogBox from '../DialogBox/DialogBox.js';
|
|
5
|
+
import { jsx, Fragment } from 'react/jsx-runtime';
|
|
5
6
|
|
|
6
|
-
|
|
7
|
-
* A generic confirm modal built on top of DialogBox.
|
|
8
|
-
* Most properties are optional with default values.
|
|
9
|
-
* Required properties are commented as such.
|
|
10
|
-
*/
|
|
11
|
-
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
12
|
-
export default function Confirm({
|
|
7
|
+
function Confirm({
|
|
13
8
|
confirmButtonDisabled,
|
|
14
9
|
confirmButtonIcon,
|
|
15
10
|
confirmButtonId,
|
|
@@ -28,7 +23,7 @@ export default function Confirm({
|
|
|
28
23
|
}) {
|
|
29
24
|
const theme = useTheme();
|
|
30
25
|
const middleButtons = useMemo(() => {
|
|
31
|
-
const buttons = [/*#__PURE__*/
|
|
26
|
+
const buttons = [/*#__PURE__*/jsx(Button, {
|
|
32
27
|
disabled: confirmButtonDisabled,
|
|
33
28
|
icon: confirmButtonIcon,
|
|
34
29
|
id: confirmButtonId || 'confirm-submit',
|
|
@@ -38,7 +33,7 @@ export default function Confirm({
|
|
|
38
33
|
type: confirmButtonType || 'productive'
|
|
39
34
|
}, 'button-2')];
|
|
40
35
|
if (onClose && closeButtonText) {
|
|
41
|
-
buttons.unshift(/*#__PURE__*/
|
|
36
|
+
buttons.unshift(/*#__PURE__*/jsx(Button, {
|
|
42
37
|
id: closeButtonId || 'confirm-close',
|
|
43
38
|
label: closeButtonText,
|
|
44
39
|
onClick: onClose,
|
|
@@ -50,7 +45,7 @@ export default function Confirm({
|
|
|
50
45
|
}, [confirmButtonDisabled, confirmButtonIcon, confirmButtonId, confirmButtonPriority, confirmButtonText, confirmButtonType, closeButtonId, closeButtonText, onClose, onConfirm]);
|
|
51
46
|
const content = useMemo(() => {
|
|
52
47
|
const text = (str, key) => {
|
|
53
|
-
return /*#__PURE__*/
|
|
48
|
+
return /*#__PURE__*/jsx(Typography, {
|
|
54
49
|
color: theme.palette.TwClrTxt,
|
|
55
50
|
fontSize: "16px",
|
|
56
51
|
fontWeight: 400,
|
|
@@ -69,14 +64,14 @@ export default function Confirm({
|
|
|
69
64
|
if (typeof message === 'string') {
|
|
70
65
|
return text(message);
|
|
71
66
|
} else if (Array.isArray(message)) {
|
|
72
|
-
return /*#__PURE__*/
|
|
67
|
+
return /*#__PURE__*/jsx(Fragment, {
|
|
73
68
|
children: message.map((str, i) => text(str, `${str}_${i}`))
|
|
74
69
|
});
|
|
75
70
|
} else {
|
|
76
71
|
return message;
|
|
77
72
|
}
|
|
78
73
|
}, [message, textStyle, theme]);
|
|
79
|
-
return /*#__PURE__*/
|
|
74
|
+
return /*#__PURE__*/jsx(DialogBox, {
|
|
80
75
|
onClose: onClose,
|
|
81
76
|
open: open ?? true,
|
|
82
77
|
title: title,
|
|
@@ -84,4 +79,6 @@ export default function Confirm({
|
|
|
84
79
|
middleButtons: middleButtons,
|
|
85
80
|
children: content
|
|
86
81
|
});
|
|
87
|
-
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export { Confirm as default };
|
|
@@ -1,19 +1,13 @@
|
|
|
1
1
|
import React, { useState } from 'react';
|
|
2
2
|
import { Box } from '@mui/material';
|
|
3
|
-
import {
|
|
3
|
+
import { LocalizationProvider, DesktopDateTimePicker, DesktopDatePicker } from '@mui/x-date-pickers';
|
|
4
4
|
import { AdapterLuxon } from '@mui/x-date-pickers/AdapterLuxon';
|
|
5
5
|
import { Settings } from 'luxon';
|
|
6
|
-
import {
|
|
7
|
-
import Icon from '../Icon/Icon';
|
|
6
|
+
import { tz, getDate } from '../../utils/date.js';
|
|
7
|
+
import Icon from '../Icon/Icon.js';
|
|
8
8
|
import './styles.scss';
|
|
9
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
9
10
|
|
|
10
|
-
/**
|
|
11
|
-
* TODO: remove support for JS Date in DatePickerDateType once
|
|
12
|
-
* clients have moved to only using DateTime objects in input props
|
|
13
|
-
* and callback arguments.
|
|
14
|
-
* export type DatePickerDateType = Exclude<DateType, Date> | null;
|
|
15
|
-
*/
|
|
16
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
17
11
|
const initializeDate = (value, timeZoneId) => {
|
|
18
12
|
if (!value) {
|
|
19
13
|
return null;
|
|
@@ -21,7 +15,7 @@ const initializeDate = (value, timeZoneId) => {
|
|
|
21
15
|
const date = getDate(value, timeZoneId);
|
|
22
16
|
return date?.isValid ? date : null;
|
|
23
17
|
};
|
|
24
|
-
|
|
18
|
+
function DatePicker(props) {
|
|
25
19
|
const [temporalValue, setTemporalValue] = useState(initializeDate(props.value, props.defaultTimeZone));
|
|
26
20
|
const [minDateTime, setMinDateTime] = useState(initializeDate(props.minDate, props.defaultTimeZone));
|
|
27
21
|
const [maxDateTime, setMaxDateTime] = useState(initializeDate(props.maxDate, props.defaultTimeZone));
|
|
@@ -46,17 +40,17 @@ export default function DatePicker(props) {
|
|
|
46
40
|
// TODO: Localize the yyyy-mm-dd placeholder string that is shown to users when the input is
|
|
47
41
|
// empty. It appears to be generated programmatically deep in the guts of the MUI DatePicker
|
|
48
42
|
// code, and it most likely uses the browser's locale.
|
|
49
|
-
return /*#__PURE__*/
|
|
43
|
+
return /*#__PURE__*/jsx(Box, {
|
|
50
44
|
className: `date-picker ${props.className} ${props.errorText ? 'date-picker--error' : ''}`,
|
|
51
45
|
sx: props.sx,
|
|
52
|
-
children: /*#__PURE__*/
|
|
46
|
+
children: /*#__PURE__*/jsxs(LocalizationProvider, {
|
|
53
47
|
dateAdapter: AdapterLuxon,
|
|
54
48
|
adapterLocale: locale,
|
|
55
|
-
children: [props.label && /*#__PURE__*/
|
|
49
|
+
children: [props.label && /*#__PURE__*/jsx("label", {
|
|
56
50
|
htmlFor: props.id,
|
|
57
51
|
className: "textfield-label",
|
|
58
52
|
children: props.label
|
|
59
|
-
}), props.showTime ? /*#__PURE__*/
|
|
53
|
+
}), props.showTime ? /*#__PURE__*/jsx(DesktopDateTimePicker, {
|
|
60
54
|
disabled: props.disabled,
|
|
61
55
|
minDate: minDateTime && minDateTime.isValid ? minDateTime : undefined,
|
|
62
56
|
maxDate: maxDateTime && maxDateTime.isValid ? maxDateTime : undefined,
|
|
@@ -81,12 +75,12 @@ export default function DatePicker(props) {
|
|
|
81
75
|
marginLeft: 0
|
|
82
76
|
}
|
|
83
77
|
},
|
|
84
|
-
helperText: props.errorText ? /*#__PURE__*/
|
|
78
|
+
helperText: props.errorText ? /*#__PURE__*/jsxs("div", {
|
|
85
79
|
className: "textfield-error-text-container",
|
|
86
|
-
children: [/*#__PURE__*/
|
|
80
|
+
children: [/*#__PURE__*/jsx(Icon, {
|
|
87
81
|
name: "error",
|
|
88
82
|
className: "textfield-error-text--icon"
|
|
89
|
-
}), /*#__PURE__*/
|
|
83
|
+
}), /*#__PURE__*/jsx("label", {
|
|
90
84
|
htmlFor: props.id,
|
|
91
85
|
className: "textfield-error-text",
|
|
92
86
|
children: props.errorText
|
|
@@ -99,7 +93,7 @@ export default function DatePicker(props) {
|
|
|
99
93
|
}
|
|
100
94
|
},
|
|
101
95
|
value: temporalValue
|
|
102
|
-
}) : /*#__PURE__*/
|
|
96
|
+
}) : /*#__PURE__*/jsx(DesktopDatePicker, {
|
|
103
97
|
disabled: props.disabled,
|
|
104
98
|
format: "yyyy-MM-dd",
|
|
105
99
|
minDate: minDateTime && minDateTime.isValid ? minDateTime : undefined,
|
|
@@ -125,12 +119,12 @@ export default function DatePicker(props) {
|
|
|
125
119
|
marginLeft: 0
|
|
126
120
|
}
|
|
127
121
|
},
|
|
128
|
-
helperText: props.errorText ? /*#__PURE__*/
|
|
122
|
+
helperText: props.errorText ? /*#__PURE__*/jsxs("div", {
|
|
129
123
|
className: "textfield-error-text-container",
|
|
130
|
-
children: [/*#__PURE__*/
|
|
124
|
+
children: [/*#__PURE__*/jsx(Icon, {
|
|
131
125
|
name: "error",
|
|
132
126
|
className: "textfield-error-text--icon"
|
|
133
|
-
}), /*#__PURE__*/
|
|
127
|
+
}), /*#__PURE__*/jsx("label", {
|
|
134
128
|
htmlFor: props.id,
|
|
135
129
|
className: "textfield-error-text",
|
|
136
130
|
children: props.errorText
|
|
@@ -146,4 +140,6 @@ export default function DatePicker(props) {
|
|
|
146
140
|
})]
|
|
147
141
|
})
|
|
148
142
|
});
|
|
149
|
-
}
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
export { DatePicker as default };
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { IconButton } from '@mui/material';
|
|
3
|
-
import
|
|
4
|
-
import
|
|
3
|
+
import 'lodash';
|
|
4
|
+
import 'luxon';
|
|
5
|
+
import useDeviceInfo from '../../utils/useDeviceInfo.js';
|
|
6
|
+
import Icon from '../Icon/Icon.js';
|
|
5
7
|
import './styles.scss';
|
|
6
|
-
import { jsx
|
|
7
|
-
|
|
8
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
9
|
+
|
|
10
|
+
function DialogBox(props) {
|
|
8
11
|
const {
|
|
9
12
|
title,
|
|
10
13
|
size,
|
|
@@ -28,7 +31,7 @@ export default function DialogBox(props) {
|
|
|
28
31
|
// keyboard and shifts the layout, so the click can end on the backdrop even though it began on the input
|
|
29
32
|
const pressStartedOnBackdrop = React.useRef(false);
|
|
30
33
|
const targetIsBackdrop = target => target instanceof HTMLElement && target.classList.contains('dialog-box--opened');
|
|
31
|
-
return open ? /*#__PURE__*/
|
|
34
|
+
return open ? /*#__PURE__*/jsx("div", {
|
|
32
35
|
className: `dialog-box-container${skrim ? '--skrim' : ''} ${open ? 'dialog-box--opened' : 'dialog-box--closed'} ${isMobile ? 'mobile' : ''}`,
|
|
33
36
|
onMouseDown: event => {
|
|
34
37
|
pressStartedOnBackdrop.current = targetIsBackdrop(event.target);
|
|
@@ -40,40 +43,40 @@ export default function DialogBox(props) {
|
|
|
40
43
|
pressStartedOnBackdrop.current = false;
|
|
41
44
|
},
|
|
42
45
|
style: style,
|
|
43
|
-
children: /*#__PURE__*/
|
|
46
|
+
children: /*#__PURE__*/jsxs("div", {
|
|
44
47
|
className: `dialog-box dialog-box--${size}`,
|
|
45
|
-
children: [/*#__PURE__*/
|
|
48
|
+
children: [/*#__PURE__*/jsxs("div", {
|
|
46
49
|
className: "dialog-box--header",
|
|
47
|
-
children: [/*#__PURE__*/
|
|
50
|
+
children: [/*#__PURE__*/jsx("div", {
|
|
48
51
|
className: "close-icon-spacer"
|
|
49
|
-
}), /*#__PURE__*/
|
|
52
|
+
}), /*#__PURE__*/jsx("p", {
|
|
50
53
|
className: "title",
|
|
51
54
|
children: title
|
|
52
|
-
}), /*#__PURE__*/
|
|
55
|
+
}), /*#__PURE__*/jsx(IconButton, {
|
|
53
56
|
onClick: onClose,
|
|
54
57
|
size: "small",
|
|
55
|
-
children: /*#__PURE__*/
|
|
58
|
+
children: /*#__PURE__*/jsx(Icon, {
|
|
56
59
|
name: "close",
|
|
57
60
|
className: "icon-close"
|
|
58
61
|
})
|
|
59
62
|
})]
|
|
60
|
-
}), /*#__PURE__*/
|
|
63
|
+
}), /*#__PURE__*/jsxs("div", {
|
|
61
64
|
className: (hasFooter ? 'dialog-box--body' : 'dialog-box--body-no-footer') + (scrolled ? ' scrolled' : ''),
|
|
62
|
-
children: [/*#__PURE__*/
|
|
65
|
+
children: [/*#__PURE__*/jsx("div", {
|
|
63
66
|
className: "dialog-box--message",
|
|
64
67
|
children: message
|
|
65
|
-
}), /*#__PURE__*/
|
|
68
|
+
}), /*#__PURE__*/jsx("div", {
|
|
66
69
|
className: "dialog-box--boundary",
|
|
67
70
|
children: children
|
|
68
71
|
})]
|
|
69
|
-
}), hasFooter && /*#__PURE__*/
|
|
72
|
+
}), hasFooter && /*#__PURE__*/jsxs("div", {
|
|
70
73
|
className: "dialog-box--footer",
|
|
71
|
-
children: [leftButton && /*#__PURE__*/
|
|
74
|
+
children: [leftButton && /*#__PURE__*/jsxs("div", {
|
|
72
75
|
className: "dialog-box--footer-container",
|
|
73
|
-
children: [/*#__PURE__*/
|
|
76
|
+
children: [/*#__PURE__*/jsx("div", {
|
|
74
77
|
className: "left-button",
|
|
75
78
|
children: leftButton
|
|
76
|
-
}), /*#__PURE__*/
|
|
79
|
+
}), /*#__PURE__*/jsx("div", {
|
|
77
80
|
className: "right-buttons",
|
|
78
81
|
children: rightButtons?.map((rb, index) => {
|
|
79
82
|
const rbWithKey = {
|
|
@@ -87,7 +90,7 @@ export default function DialogBox(props) {
|
|
|
87
90
|
return rbWithKey;
|
|
88
91
|
})
|
|
89
92
|
})]
|
|
90
|
-
}), middleButtons && /*#__PURE__*/
|
|
93
|
+
}), middleButtons && /*#__PURE__*/jsx("div", {
|
|
91
94
|
className: "dialog-box--actions-container",
|
|
92
95
|
children: middleButtons?.map((mb, index) => {
|
|
93
96
|
const mbWithKey = {
|
|
@@ -104,4 +107,6 @@ export default function DialogBox(props) {
|
|
|
104
107
|
})]
|
|
105
108
|
})
|
|
106
109
|
}) : null;
|
|
107
|
-
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
export { DialogBox as default };
|
package/components/Divisor.js
CHANGED
|
@@ -1,16 +1,19 @@
|
|
|
1
|
-
import
|
|
1
|
+
import 'react';
|
|
2
2
|
import { Box, Divider } from '@mui/material';
|
|
3
|
-
import {
|
|
4
|
-
|
|
3
|
+
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
4
|
+
|
|
5
|
+
function Divisor({
|
|
5
6
|
mt = 3
|
|
6
7
|
}) {
|
|
7
|
-
return /*#__PURE__*/
|
|
8
|
-
children: [/*#__PURE__*/
|
|
8
|
+
return /*#__PURE__*/jsxs(Fragment, {
|
|
9
|
+
children: [/*#__PURE__*/jsx(Box, {
|
|
9
10
|
mt: mt
|
|
10
|
-
}), /*#__PURE__*/
|
|
11
|
+
}), /*#__PURE__*/jsx(Divider, {
|
|
11
12
|
light: true
|
|
12
|
-
}), /*#__PURE__*/
|
|
13
|
+
}), /*#__PURE__*/jsx(Box, {
|
|
13
14
|
mt: mt
|
|
14
15
|
})]
|
|
15
16
|
});
|
|
16
|
-
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export { Divisor as default };
|
package/components/Dropdown.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { FormControl, InputLabel,
|
|
3
|
-
import Autocomplete from './Autocomplete/Autocomplete';
|
|
4
|
-
import SelectT from './Select/SelectT';
|
|
5
|
-
import { jsx
|
|
6
|
-
|
|
1
|
+
import 'react';
|
|
2
|
+
import { FormControl, InputLabel, Select, MenuItem } from '@mui/material';
|
|
3
|
+
import Autocomplete from './Autocomplete/Autocomplete.js';
|
|
4
|
+
import SelectT from './Select/SelectT.js';
|
|
5
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
6
|
+
|
|
7
|
+
function DropdownV1({
|
|
7
8
|
id,
|
|
8
9
|
label,
|
|
9
10
|
values,
|
|
@@ -14,17 +15,17 @@ export function DropdownV1({
|
|
|
14
15
|
const onChangeH = event => {
|
|
15
16
|
onChange(event.target.value);
|
|
16
17
|
};
|
|
17
|
-
return /*#__PURE__*/
|
|
18
|
+
return /*#__PURE__*/jsxs(FormControl, {
|
|
18
19
|
variant: "outlined",
|
|
19
20
|
size: "small",
|
|
20
21
|
disabled: disabled,
|
|
21
22
|
sx: {
|
|
22
23
|
width: '100%'
|
|
23
24
|
},
|
|
24
|
-
children: [/*#__PURE__*/
|
|
25
|
+
children: [/*#__PURE__*/jsx(InputLabel, {
|
|
25
26
|
id: `${id}-outlined-label`,
|
|
26
27
|
children: label
|
|
27
|
-
}), /*#__PURE__*/
|
|
28
|
+
}), /*#__PURE__*/jsx(Select, {
|
|
28
29
|
labelId: `${id}-outlined-label`,
|
|
29
30
|
id: id,
|
|
30
31
|
label: label,
|
|
@@ -33,7 +34,7 @@ export function DropdownV1({
|
|
|
33
34
|
children: values?.map(({
|
|
34
35
|
label: inLabel,
|
|
35
36
|
value
|
|
36
|
-
}) => /*#__PURE__*/
|
|
37
|
+
}) => /*#__PURE__*/jsx(MenuItem, {
|
|
37
38
|
id: value,
|
|
38
39
|
value: value,
|
|
39
40
|
children: inLabel
|
|
@@ -53,7 +54,7 @@ export function DropdownV1({
|
|
|
53
54
|
* selectedValue={'value1'}
|
|
54
55
|
* />
|
|
55
56
|
*/
|
|
56
|
-
|
|
57
|
+
function Dropdown(props) {
|
|
57
58
|
const {
|
|
58
59
|
selectedValue,
|
|
59
60
|
onChange,
|
|
@@ -67,13 +68,13 @@ export default function Dropdown(props) {
|
|
|
67
68
|
fontWeight: option.fontWeight || 'normal',
|
|
68
69
|
fontStyle: option.fontStyle || 'normal'
|
|
69
70
|
};
|
|
70
|
-
return /*#__PURE__*/
|
|
71
|
+
return /*#__PURE__*/jsx("span", {
|
|
71
72
|
style: styles,
|
|
72
73
|
children: option.label
|
|
73
74
|
});
|
|
74
75
|
};
|
|
75
76
|
if (autocomplete) {
|
|
76
|
-
return /*#__PURE__*/
|
|
77
|
+
return /*#__PURE__*/jsx(Autocomplete, {
|
|
77
78
|
...remainingProps,
|
|
78
79
|
options: options ?? [],
|
|
79
80
|
selected: selectedItem || '',
|
|
@@ -81,7 +82,7 @@ export default function Dropdown(props) {
|
|
|
81
82
|
onChange: option => onChange(option.value)
|
|
82
83
|
});
|
|
83
84
|
}
|
|
84
|
-
return /*#__PURE__*/
|
|
85
|
+
return /*#__PURE__*/jsx(SelectT, {
|
|
85
86
|
...remainingProps,
|
|
86
87
|
options: options,
|
|
87
88
|
selectedValue: selectedItem,
|
|
@@ -94,4 +95,6 @@ export default function Dropdown(props) {
|
|
|
94
95
|
displayLabel: option => option?.label || '',
|
|
95
96
|
onChange: option => onChange(option.value)
|
|
96
97
|
});
|
|
97
|
-
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export { DropdownV1, Dropdown as default };
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import React, {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import Button from '../Button/Button';
|
|
5
|
-
import {
|
|
1
|
+
import React, { useState, useEffect, useMemo, useCallback } from 'react';
|
|
2
|
+
import { useTheme, Box, TextField, MenuItem } from '@mui/material';
|
|
3
|
+
import { MRT_ToolbarInternalButtons, useMaterialReactTable, MaterialReactTable } from 'material-react-table';
|
|
4
|
+
import Button from '../Button/Button.js';
|
|
5
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
6
|
+
|
|
6
7
|
const isActiveFilter = filter => {
|
|
7
8
|
if (!filter.value) {
|
|
8
9
|
return false;
|
|
@@ -12,7 +13,7 @@ const isActiveFilter = filter => {
|
|
|
12
13
|
}
|
|
13
14
|
return filter.value !== null && filter.value !== undefined && filter.value !== '';
|
|
14
15
|
};
|
|
15
|
-
|
|
16
|
+
function EditableTable({
|
|
16
17
|
clearAllFiltersLabel,
|
|
17
18
|
columns,
|
|
18
19
|
data,
|
|
@@ -121,7 +122,7 @@ export default function EditableTable({
|
|
|
121
122
|
}
|
|
122
123
|
iTable.setEditingCell(null);
|
|
123
124
|
}, [value]);
|
|
124
|
-
return /*#__PURE__*/
|
|
125
|
+
return /*#__PURE__*/jsx(TextField, {
|
|
125
126
|
select: true,
|
|
126
127
|
value: value,
|
|
127
128
|
onChange: e => setValue(e.target.value),
|
|
@@ -135,7 +136,7 @@ export default function EditableTable({
|
|
|
135
136
|
},
|
|
136
137
|
size: "small",
|
|
137
138
|
fullWidth: true,
|
|
138
|
-
children: selectOptions.map(option => /*#__PURE__*/
|
|
139
|
+
children: selectOptions.map(option => /*#__PURE__*/jsx(MenuItem, {
|
|
139
140
|
value: option.value,
|
|
140
141
|
children: option.label
|
|
141
142
|
}, option.value))
|
|
@@ -191,20 +192,20 @@ export default function EditableTable({
|
|
|
191
192
|
const hasColumnFilters = state.columnFilters.some(isActiveFilter);
|
|
192
193
|
const hasGlobalFilter = enableGlobalFilter && !!state.globalFilter;
|
|
193
194
|
const hasActiveFilters = hasColumnFilters || hasGlobalFilter;
|
|
194
|
-
return /*#__PURE__*/
|
|
195
|
+
return /*#__PURE__*/jsxs(Box, {
|
|
195
196
|
sx: {
|
|
196
197
|
display: 'flex',
|
|
197
198
|
alignItems: 'center',
|
|
198
199
|
gap: 1
|
|
199
200
|
},
|
|
200
|
-
children: [showClearAllFilters && hasActiveFilters && /*#__PURE__*/
|
|
201
|
+
children: [showClearAllFilters && hasActiveFilters && /*#__PURE__*/jsx(Button, {
|
|
201
202
|
onClick: () => handleClearAllFilters(tbl),
|
|
202
203
|
label: clearAllFiltersLabel,
|
|
203
204
|
priority: "ghost",
|
|
204
205
|
size: "small"
|
|
205
206
|
}), consumerRenderToolbarInternalActions ? consumerRenderToolbarInternalActions({
|
|
206
207
|
table: tbl
|
|
207
|
-
}) : /*#__PURE__*/
|
|
208
|
+
}) : /*#__PURE__*/jsx(MRT_ToolbarInternalButtons, {
|
|
208
209
|
table: tbl
|
|
209
210
|
})]
|
|
210
211
|
});
|
|
@@ -265,12 +266,14 @@ export default function EditableTable({
|
|
|
265
266
|
onColumnFiltersChange: setColumnFilters
|
|
266
267
|
} : {})
|
|
267
268
|
});
|
|
268
|
-
return /*#__PURE__*/
|
|
269
|
+
return /*#__PURE__*/jsx(Box, {
|
|
269
270
|
minHeight: "160px",
|
|
270
271
|
padding: 2,
|
|
271
272
|
sx: sx,
|
|
272
|
-
children: /*#__PURE__*/
|
|
273
|
+
children: /*#__PURE__*/jsx(MaterialReactTable, {
|
|
273
274
|
table: table
|
|
274
275
|
})
|
|
275
276
|
});
|
|
276
|
-
}
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
export { EditableTable as default };
|