@terraware/web-components 4.2.12 → 4.2.14-rc.0
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/AntSwitch/index.js +8 -14
- package/components/Autocomplete/Autocomplete.js +67 -70
- package/components/Badge/index.js +16 -20
- package/components/BusySpinner/index.js +30 -35
- package/components/Button/Button.js +23 -27
- package/components/Button/button.test.js +8 -10
- package/components/Checkbox.js +10 -19
- package/components/Confirm/index.js +44 -51
- package/components/DatePicker/DatePicker.js +116 -117
- package/components/DialogBox/DialogBox.js +76 -66
- package/components/Divisor.js +15 -20
- package/components/Dropdown.js +54 -61
- package/components/EditableTable/index.js +129 -135
- package/components/ErrorBox/ErrorBox.js +37 -36
- package/components/FileChooser/index.js +73 -77
- package/components/FormBottomBar/index.js +63 -69
- package/components/Icon/Icon.js +14 -21
- package/components/Icon/icons/index.d.ts +1 -1
- package/components/Icon/icons/index.d.ts.map +1 -1
- package/components/Icon/icons/index.js +251 -255
- package/components/IconTooltip/index.js +29 -34
- package/components/Map/MapBox.js +199 -220
- package/components/Map/MapContainer.js +14 -18
- package/components/Map/MapDateSliderControl.js +44 -46
- package/components/Map/MapDrawer.js +32 -33
- package/components/Map/MapLegend.js +96 -95
- package/components/Map/MapViewStyleControl.js +38 -48
- package/components/Map/ReactMapboxWrapper.js +2 -9
- package/components/Map/index.js +47 -55
- package/components/Map/types.js +2 -8
- package/components/Map/useMaintainLayerOrder.js +4 -11
- package/components/Markdown/index.js +14 -21
- package/components/Message/Message.js +59 -51
- package/components/MultiSelect/MultiSelect.test.js +22 -24
- package/components/MultiSelect/index.js +73 -69
- package/components/Navbar/NavFooter.js +8 -13
- package/components/Navbar/NavItem.js +43 -37
- package/components/Navbar/NavSection.js +13 -17
- package/components/Navbar/Navbar.js +35 -38
- package/components/Navbar/SubNavbar.js +8 -13
- package/components/Note.js +14 -19
- package/components/OverlayModal/OverlayModal.js +36 -37
- package/components/PageForm/index.js +30 -35
- package/components/PhotoChooser/index.js +93 -98
- package/components/Pill/index.js +29 -31
- package/components/PillList/index.js +16 -22
- package/components/PlacementWrapper/index.js +20 -25
- package/components/PopoverMenu/Popover.js +33 -37
- package/components/PopoverMenu/index.js +41 -46
- package/components/PopoverMultiSelect/index.js +18 -21
- package/components/ProgressCircle/ProgressCircle.js +23 -26
- package/components/RadioButton.js +7 -14
- package/components/Select/Select.js +8 -13
- package/components/Select/SelectT.js +110 -108
- package/components/Separator/index.js +8 -14
- package/components/Size.js +1 -5
- package/components/Slider/index.js +7 -13
- package/components/SummaryBox.js +36 -39
- package/components/Tabs/index.js +75 -77
- package/components/TextTruncated/index.js +64 -65
- package/components/Textfield/Textfield.js +100 -95
- package/components/Textfield/TruncatedTextArea.js +44 -46
- package/components/TimelineSlider/TimelineMarker.js +24 -28
- package/components/TimelineSlider/TimelineRail.js +5 -11
- package/components/TimelineSlider/index.js +47 -51
- package/components/Tooltip/Tooltip.js +21 -26
- package/components/ViewPhotosDialog/index.js +58 -62
- package/components/VirtualWalkthrough/Annotation.d.ts +41 -0
- package/components/VirtualWalkthrough/Annotation.d.ts.map +1 -0
- package/components/VirtualWalkthrough/Annotation.js +197 -0
- package/components/VirtualWalkthrough/AnnotationEditPane.d.ts +20 -0
- package/components/VirtualWalkthrough/AnnotationEditPane.d.ts.map +1 -0
- package/components/VirtualWalkthrough/AnnotationEditPane.js +136 -0
- package/components/VirtualWalkthrough/AnnotationPanel.d.ts +13 -0
- package/components/VirtualWalkthrough/AnnotationPanel.d.ts.map +1 -0
- package/components/VirtualWalkthrough/AnnotationPanel.js +196 -0
- package/components/VirtualWalkthrough/Application.d.ts +9 -0
- package/components/VirtualWalkthrough/Application.d.ts.map +1 -0
- package/components/VirtualWalkthrough/Application.js +32 -0
- package/components/VirtualWalkthrough/AutoRotator.d.ts +109 -0
- package/components/VirtualWalkthrough/AutoRotator.d.ts.map +1 -0
- package/components/VirtualWalkthrough/AutoRotator.js +217 -0
- package/components/VirtualWalkthrough/BlockingSpinner.d.ts +3 -0
- package/components/VirtualWalkthrough/BlockingSpinner.d.ts.map +1 -0
- package/components/VirtualWalkthrough/BlockingSpinner.js +27 -0
- package/components/VirtualWalkthrough/BoundaryRing.d.ts +9 -0
- package/components/VirtualWalkthrough/BoundaryRing.d.ts.map +1 -0
- package/components/VirtualWalkthrough/BoundaryRing.js +33 -0
- package/components/VirtualWalkthrough/CameraInfo.d.ts +16 -0
- package/components/VirtualWalkthrough/CameraInfo.d.ts.map +1 -0
- package/components/VirtualWalkthrough/CameraInfo.js +88 -0
- package/components/VirtualWalkthrough/ControlsInfoPane.d.ts +37 -0
- package/components/VirtualWalkthrough/ControlsInfoPane.d.ts.map +1 -0
- package/components/VirtualWalkthrough/ControlsInfoPane.js +196 -0
- package/components/VirtualWalkthrough/GradientSky.d.ts +9 -0
- package/components/VirtualWalkthrough/GradientSky.d.ts.map +1 -0
- package/components/VirtualWalkthrough/GradientSky.js +73 -0
- package/components/VirtualWalkthrough/SplatControls.d.ts +50 -0
- package/components/VirtualWalkthrough/SplatControls.d.ts.map +1 -0
- package/components/VirtualWalkthrough/SplatControls.js +252 -0
- package/components/VirtualWalkthrough/SplatCrop.d.ts +8 -0
- package/components/VirtualWalkthrough/SplatCrop.d.ts.map +1 -0
- package/components/VirtualWalkthrough/SplatCrop.js +18 -0
- package/components/VirtualWalkthrough/SplatFadeCrop.d.ts +8 -0
- package/components/VirtualWalkthrough/SplatFadeCrop.d.ts.map +1 -0
- package/components/VirtualWalkthrough/SplatFadeCrop.js +18 -0
- package/components/VirtualWalkthrough/SplatModel.d.ts +15 -0
- package/components/VirtualWalkthrough/SplatModel.d.ts.map +1 -0
- package/components/VirtualWalkthrough/SplatModel.js +60 -0
- package/components/VirtualWalkthrough/SplatRevealRain.d.ts +18 -0
- package/components/VirtualWalkthrough/SplatRevealRain.d.ts.map +1 -0
- package/components/VirtualWalkthrough/SplatRevealRain.js +38 -0
- package/components/VirtualWalkthrough/TfAnnotationManager.d.ts +110 -0
- package/components/VirtualWalkthrough/TfAnnotationManager.d.ts.map +1 -0
- package/components/VirtualWalkthrough/TfAnnotationManager.js +368 -0
- package/components/VirtualWalkthrough/TfXrNavigation.d.ts +15 -0
- package/components/VirtualWalkthrough/TfXrNavigation.d.ts.map +1 -0
- package/components/VirtualWalkthrough/TfXrNavigation.js +24 -0
- package/components/VirtualWalkthrough/annotation-styles.css +5 -0
- package/components/VirtualWalkthrough/application-styles.css +4 -0
- package/components/VirtualWalkthrough/boundary-ring.d.ts +47 -0
- package/components/VirtualWalkthrough/boundary-ring.d.ts.map +1 -0
- package/components/VirtualWalkthrough/boundary-ring.js +125 -0
- package/components/VirtualWalkthrough/boundary-ring.test.js +109 -0
- package/components/VirtualWalkthrough/groundPlane.d.ts +14 -0
- package/components/VirtualWalkthrough/groundPlane.d.ts.map +1 -0
- package/components/VirtualWalkthrough/groundPlane.js +47 -0
- package/components/VirtualWalkthrough/groundPlane.test.js +45 -0
- package/components/VirtualWalkthrough/gsplat-fade-crop-effect.d.ts +19 -0
- package/components/VirtualWalkthrough/gsplat-fade-crop-effect.d.ts.map +1 -0
- package/components/VirtualWalkthrough/gsplat-fade-crop-effect.js +119 -0
- package/components/VirtualWalkthrough/walkthrough-camera.d.ts +77 -0
- package/components/VirtualWalkthrough/walkthrough-camera.d.ts.map +1 -0
- package/components/VirtualWalkthrough/walkthrough-camera.js +320 -0
- package/components/svg/BlobbyGrayIconImage.js +36 -41
- package/components/svg/BlobbyGrayIconImport.js +36 -41
- package/components/svg/BlobbyGrayIconUploadToTheCloud.js +36 -41
- package/components/svg/BlobbyIconCloudChecked.js +161 -158
- package/components/svg/BlobbyIconExportOrUploadPhoto.js +161 -158
- package/components/svg/BlobbyIconFolder.js +161 -158
- package/components/svg/BlobbyIconGraphReport.js +161 -158
- package/components/svg/BlobbyIconHappy.js +161 -158
- package/components/svg/BlobbyIconHeartMonitor.js +161 -158
- package/components/svg/BlobbyIconLeaf.js +161 -158
- package/components/svg/BlobbyIconLibrary.js +161 -158
- package/components/svg/BlobbyIconNursery.js +163 -160
- package/components/svg/BlobbyIconOrganization.js +161 -158
- package/components/svg/BlobbyIconParchment.js +161 -158
- package/components/svg/BlobbyIconPeople.js +161 -158
- package/components/svg/BlobbyIconSeedBank.js +161 -158
- package/components/svg/BlobbyIconSeedling.js +161 -158
- package/components/svg/BlobbyIconSeeds.js +161 -158
- package/components/svg/BlobbyIconSite.js +164 -161
- package/components/svg/BlobbyIconSparkles.js +161 -158
- package/components/svg/BlobbyIconWrench.js +161 -158
- package/components/svg/Bug.js +18 -27
- package/components/svg/Calendar.js +18 -27
- package/components/svg/CaretDown.js +18 -27
- package/components/svg/CaretLeft.js +18 -27
- package/components/svg/CaretRight.js +18 -27
- package/components/svg/CaretUp.js +18 -27
- package/components/svg/ChevronDown.js +18 -27
- package/components/svg/ChevronUp.js +18 -27
- package/components/svg/Close.js +18 -27
- package/components/svg/Critical.js +18 -27
- package/components/svg/Edit.js +161 -158
- package/components/svg/Error.js +18 -27
- package/components/svg/Filter.js +18 -27
- package/components/svg/Folder.js +18 -27
- package/components/svg/Help.js +18 -27
- package/components/svg/Home.js +18 -27
- package/components/svg/IconAdd.js +18 -27
- package/components/svg/IconArrowRight.js +19 -28
- package/components/svg/IconBusinessNetwork.js +18 -27
- package/components/svg/IconCalendar.d.ts +1 -1
- package/components/svg/IconCalendar.d.ts.map +1 -1
- package/components/svg/IconCalendar.js +18 -27
- package/components/svg/IconCancel.js +18 -27
- package/components/svg/IconChargingBattery.js +18 -27
- package/components/svg/IconChecklist.js +19 -28
- package/components/svg/IconCheckmark.js +18 -27
- package/components/svg/IconCoinInHand.js +18 -27
- package/components/svg/IconColumns.js +18 -27
- package/components/svg/IconComment.js +18 -27
- package/components/svg/IconDashboard.js +18 -27
- package/components/svg/IconDataMigration.js +18 -27
- package/components/svg/IconDocument.d.ts +8 -0
- package/components/svg/IconDocument.d.ts.map +1 -0
- package/components/svg/IconDocument.js +21 -0
- package/components/svg/IconDownloadFromTheCloud.js +19 -28
- package/components/svg/IconEdit.js +19 -28
- package/components/svg/IconExpand.js +19 -28
- package/components/svg/IconExport.js +18 -27
- package/components/svg/IconExternalLink.js +18 -27
- package/components/svg/IconEye.js +18 -27
- package/components/svg/IconEyeOff.js +18 -27
- package/components/svg/IconFile.js +18 -27
- package/components/svg/IconFolder.js +18 -27
- package/components/svg/IconFullScreen.js +18 -27
- package/components/svg/IconFutures.js +18 -27
- package/components/svg/IconGraphReport.js +18 -27
- package/components/svg/IconHeartMonitor.js +18 -27
- package/components/svg/IconHelp.js +19 -28
- package/components/svg/IconHistory.js +18 -27
- package/components/svg/IconImport.js +18 -27
- package/components/svg/IconIndex.js +18 -27
- package/components/svg/IconLayers.js +18 -27
- package/components/svg/IconLibrary.js +18 -27
- package/components/svg/IconList.js +18 -27
- package/components/svg/IconLivePlant.js +18 -27
- package/components/svg/IconLocations.js +18 -27
- package/components/svg/IconMail.js +18 -27
- package/components/svg/IconManager.js +18 -27
- package/components/svg/IconMarker.js +18 -27
- package/components/svg/IconMenu.js +18 -27
- package/components/svg/IconMenuHorizontal.js +18 -27
- package/components/svg/IconModule.js +18 -27
- package/components/svg/IconMyLocation.js +18 -27
- package/components/svg/IconNote.js +19 -28
- package/components/svg/IconNursery.js +18 -27
- package/components/svg/IconOrg.js +18 -27
- package/components/svg/IconParchment.js +18 -27
- package/components/svg/IconPhoto.js +18 -27
- package/components/svg/IconPlantsFilled.js +18 -27
- package/components/svg/IconRedo.js +18 -27
- package/components/svg/IconRestorationSite.js +18 -27
- package/components/svg/IconSeedBank.js +18 -27
- package/components/svg/IconSeedling.js +18 -27
- package/components/svg/IconSettings.js +18 -27
- package/components/svg/IconSlice.js +18 -27
- package/components/svg/IconSubmit.js +18 -27
- package/components/svg/IconSubtract.js +19 -28
- package/components/svg/IconSynced.js +18 -27
- package/components/svg/IconTrashCan.js +18 -27
- package/components/svg/IconTreasureMap.js +18 -27
- package/components/svg/IconUnavailable.js +18 -27
- package/components/svg/IconUndo.js +18 -27
- package/components/svg/IconVariable.js +18 -27
- package/components/svg/IconVideo.js +19 -28
- package/components/svg/IconWifi.js +18 -27
- package/components/svg/Info.js +18 -27
- package/components/svg/Key.js +18 -27
- package/components/svg/Leaf.js +18 -27
- package/components/svg/Lock.js +18 -27
- package/components/svg/Logo.js +40 -45
- package/components/svg/MenuVertical.js +18 -27
- package/components/svg/Notification.js +18 -27
- package/components/svg/Person.js +18 -27
- package/components/svg/Plus.js +18 -27
- package/components/svg/RestorationSite.js +18 -27
- package/components/svg/Search.js +18 -27
- package/components/svg/Seeds.js +18 -27
- package/components/svg/Site.js +18 -27
- package/components/svg/Sparkles.js +18 -27
- package/components/svg/Species.js +18 -27
- package/components/svg/Species2.js +161 -158
- package/components/svg/Spinner.js +27 -36
- package/components/svg/Star.js +18 -27
- package/components/svg/Success.js +18 -27
- package/components/svg/SuccessFilled.js +18 -27
- package/components/svg/TerrawareLogoDesktop.js +44 -49
- package/components/svg/TerrawareLogoMobile.js +20 -29
- package/components/svg/Touchscreen.js +18 -27
- package/components/svg/UploadCloud.js +161 -158
- package/components/svg/Warning.js +18 -27
- package/components/svg/WelcomeClipboard.js +130 -135
- package/components/svg/index.d.ts +1 -0
- package/components/svg/index.d.ts.map +1 -1
- package/components/svg/index.js +127 -888
- package/components/table/EnhancedTableToolbar.js +45 -47
- package/components/table/EnhancedTableToolbarV2.js +18 -26
- package/components/table/TableCellRenderer.js +137 -143
- package/components/table/TableHeader.js +45 -47
- package/components/table/TableHeaderItem.js +65 -64
- package/components/table/density.js +3 -11
- package/components/table/index.js +225 -218
- package/components/table/sort.js +8 -18
- package/components/table/sort.test.js +6 -8
- package/components/table/types.js +1 -5
- package/components/types/index.js +1 -5
- package/hooks/useBoolean.d.ts +4 -0
- package/hooks/useBoolean.d.ts.map +1 -0
- package/hooks/useBoolean.js +12 -0
- package/hooks/useCameraPosition.d.ts +8 -0
- package/hooks/useCameraPosition.d.ts.map +1 -0
- package/hooks/useCameraPosition.js +33 -0
- package/index.js +57 -398
- package/license-report.html +1 -1
- package/package.json +10 -3
- package/style-dictionary-dist/TerrawareTheme.js +1 -7
- package/theme.js +7 -14
- package/utils/color.d.ts +2 -0
- package/utils/color.d.ts.map +1 -0
- package/utils/color.js +14 -0
- package/utils/date.js +13 -24
- package/utils/date.test.js +40 -43
- package/utils/index.js +5 -53
- package/utils/preventDefaultEvent.js +1 -7
- package/utils/text.js +2 -9
- package/utils/text.test.js +9 -11
- package/utils/useDeviceInfo.js +10 -16
- package/virtualWalkthrough.d.ts +31 -0
- package/virtualWalkthrough.d.ts.map +1 -0
- package/virtualWalkthrough.js +28 -0
|
@@ -1,16 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.default = EditableTable;
|
|
9
|
-
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
|
10
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
-
var _material = require("@mui/material");
|
|
12
|
-
var _materialReactTable = require("material-react-table");
|
|
13
|
-
var _Button = _interopRequireDefault(require("../Button/Button"));
|
|
1
|
+
import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
|
2
|
+
import { Box, MenuItem, TextField, useTheme } from '@mui/material';
|
|
3
|
+
import { MaterialReactTable as MRTTable, MRT_ToolbarInternalButtons, useMaterialReactTable } from 'material-react-table';
|
|
4
|
+
import Button from '../Button/Button';
|
|
5
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
6
|
const isActiveFilter = filter => {
|
|
15
7
|
if (!filter.value) {
|
|
16
8
|
return false;
|
|
@@ -20,41 +12,40 @@ const isActiveFilter = filter => {
|
|
|
20
12
|
}
|
|
21
13
|
return filter.value !== null && filter.value !== undefined && filter.value !== '';
|
|
22
14
|
};
|
|
23
|
-
function EditableTable(
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
const theme = (0, _material.useTheme)();
|
|
15
|
+
export default function EditableTable({
|
|
16
|
+
clearAllFiltersLabel,
|
|
17
|
+
columns,
|
|
18
|
+
data,
|
|
19
|
+
enableClearAllFilters = true,
|
|
20
|
+
enableEditing = false,
|
|
21
|
+
enableColumnOrdering = false,
|
|
22
|
+
enableColumnPinning = false,
|
|
23
|
+
enableSorting = true,
|
|
24
|
+
enableGlobalFilter = false,
|
|
25
|
+
enableColumnFilters = false,
|
|
26
|
+
stickyFilters = false,
|
|
27
|
+
storageKey,
|
|
28
|
+
enablePagination = true,
|
|
29
|
+
enableBottomToolbar = true,
|
|
30
|
+
enableTopToolbar = true,
|
|
31
|
+
initialSorting,
|
|
32
|
+
onClearAllFilters,
|
|
33
|
+
onRowClick,
|
|
34
|
+
renderToolbarInternalActions,
|
|
35
|
+
sx,
|
|
36
|
+
tableOptions = {}
|
|
37
|
+
}) {
|
|
38
|
+
const theme = useTheme();
|
|
48
39
|
const filtersEnabled = enableColumnFilters || enableGlobalFilter;
|
|
49
40
|
const showClearAllFilters = enableClearAllFilters && filtersEnabled;
|
|
50
41
|
|
|
51
42
|
// Sticky column filters - load from localStorage (only if stickyFilters is enabled)
|
|
52
|
-
const [columnFilters, setColumnFilters] =
|
|
43
|
+
const [columnFilters, setColumnFilters] = useState(() => {
|
|
53
44
|
if (!stickyFilters || !storageKey) {
|
|
54
45
|
return [];
|
|
55
46
|
}
|
|
56
47
|
try {
|
|
57
|
-
const saved = localStorage.getItem(
|
|
48
|
+
const saved = localStorage.getItem(`${storageKey}_columnFilters`);
|
|
58
49
|
if (saved) {
|
|
59
50
|
const parsed = JSON.parse(saved);
|
|
60
51
|
|
|
@@ -69,31 +60,30 @@ function EditableTable(_ref) {
|
|
|
69
60
|
});
|
|
70
61
|
|
|
71
62
|
// Save column filters to localStorage when they change
|
|
72
|
-
|
|
63
|
+
useEffect(() => {
|
|
73
64
|
if (!stickyFilters || !storageKey) {
|
|
74
65
|
return;
|
|
75
66
|
}
|
|
76
67
|
try {
|
|
77
68
|
// Filter out any filters with null or empty values before saving
|
|
78
69
|
const validFilters = columnFilters.filter(isActiveFilter);
|
|
79
|
-
localStorage.setItem(
|
|
70
|
+
localStorage.setItem(`${storageKey}_columnFilters`, JSON.stringify(validFilters));
|
|
80
71
|
} catch (error) {
|
|
81
72
|
console.error('Error saving column filters:', error);
|
|
82
73
|
}
|
|
83
74
|
}, [columnFilters, stickyFilters, storageKey]);
|
|
84
75
|
|
|
85
76
|
// Convert simplified column definitions to MRT column definitions
|
|
86
|
-
const mrtColumns =
|
|
77
|
+
const mrtColumns = useMemo(() => {
|
|
87
78
|
return columns.map(col => {
|
|
88
|
-
var _col$enableEditing, _col$enableHiding;
|
|
89
79
|
const mrtCol = {
|
|
90
80
|
id: col.id,
|
|
91
81
|
header: col.header,
|
|
92
82
|
accessorKey: col.accessorKey,
|
|
93
83
|
accessorFn: col.accessorFn,
|
|
94
84
|
size: col.size,
|
|
95
|
-
enableEditing:
|
|
96
|
-
enableHiding:
|
|
85
|
+
enableEditing: col.enableEditing ?? enableEditing,
|
|
86
|
+
enableHiding: col.enableHiding ?? true,
|
|
97
87
|
Cell: col.Cell,
|
|
98
88
|
filterVariant: col.filterVariant,
|
|
99
89
|
filterSelectOptions: col.filterSelectOptions,
|
|
@@ -119,20 +109,19 @@ function EditableTable(_ref) {
|
|
|
119
109
|
} else if (editVariant === 'select' && selectOptions) {
|
|
120
110
|
mrtCol.editVariant = 'select';
|
|
121
111
|
mrtCol.editSelectOptions = selectOptions;
|
|
122
|
-
const SelectEditComponent =
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
const
|
|
129
|
-
const handleSave = (0, _react.useCallback)(() => {
|
|
112
|
+
const SelectEditComponent = ({
|
|
113
|
+
cell,
|
|
114
|
+
row,
|
|
115
|
+
table: iTable
|
|
116
|
+
}) => {
|
|
117
|
+
const [value, setValue] = React.useState(cell.getValue() || '');
|
|
118
|
+
const handleSave = useCallback(() => {
|
|
130
119
|
if (onSave) {
|
|
131
120
|
void onSave(row.original, value, col.id);
|
|
132
121
|
}
|
|
133
122
|
iTable.setEditingCell(null);
|
|
134
123
|
}, [value]);
|
|
135
|
-
return /*#__PURE__*/
|
|
124
|
+
return /*#__PURE__*/_jsx(TextField, {
|
|
136
125
|
select: true,
|
|
137
126
|
value: value,
|
|
138
127
|
onChange: e => setValue(e.target.value),
|
|
@@ -145,80 +134,82 @@ function EditableTable(_ref) {
|
|
|
145
134
|
}
|
|
146
135
|
},
|
|
147
136
|
size: "small",
|
|
148
|
-
fullWidth: true
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
137
|
+
fullWidth: true,
|
|
138
|
+
children: selectOptions.map(option => /*#__PURE__*/_jsx(MenuItem, {
|
|
139
|
+
value: option.value,
|
|
140
|
+
children: option.label
|
|
141
|
+
}, option.value))
|
|
142
|
+
});
|
|
153
143
|
};
|
|
154
144
|
mrtCol.Edit = SelectEditComponent;
|
|
155
145
|
} else {
|
|
156
146
|
// Default text input with onBlur save
|
|
157
|
-
mrtCol.muiEditTextFieldProps =
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
// eslint-disable-next-line react/prop-types
|
|
166
|
-
void onSave(row.original, value, col.id);
|
|
167
|
-
}
|
|
147
|
+
mrtCol.muiEditTextFieldProps = ({
|
|
148
|
+
row
|
|
149
|
+
}) => ({
|
|
150
|
+
onBlur: event => {
|
|
151
|
+
if (onSave) {
|
|
152
|
+
const value = event.target.value;
|
|
153
|
+
// eslint-disable-next-line react/prop-types
|
|
154
|
+
void onSave(row.original, value, col.id);
|
|
168
155
|
}
|
|
169
|
-
}
|
|
170
|
-
};
|
|
156
|
+
}
|
|
157
|
+
});
|
|
171
158
|
}
|
|
172
159
|
}
|
|
173
160
|
return mrtCol;
|
|
174
161
|
});
|
|
175
162
|
}, [columns, enableEditing]);
|
|
176
|
-
const initialStateConfig =
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
163
|
+
const initialStateConfig = {
|
|
164
|
+
...(initialSorting ? {
|
|
165
|
+
sorting: initialSorting
|
|
166
|
+
} : {}),
|
|
167
|
+
...(enableColumnFilters ? {
|
|
168
|
+
showColumnFilters: true
|
|
169
|
+
} : {}),
|
|
170
|
+
...(enableGlobalFilter ? {
|
|
171
|
+
showGlobalFilter: true
|
|
172
|
+
} : {})
|
|
173
|
+
};
|
|
174
|
+
const handleClearAllFilters = useCallback(tbl => {
|
|
184
175
|
tbl.resetColumnFilters();
|
|
185
176
|
if (enableGlobalFilter) {
|
|
186
177
|
tbl.resetGlobalFilter();
|
|
187
178
|
}
|
|
188
179
|
setColumnFilters([]);
|
|
189
180
|
if (storageKey) {
|
|
190
|
-
localStorage.removeItem(
|
|
181
|
+
localStorage.removeItem(`${storageKey}_columnFilters`);
|
|
191
182
|
}
|
|
192
|
-
onClearAllFilters
|
|
183
|
+
onClearAllFilters?.();
|
|
193
184
|
}, [enableGlobalFilter, storageKey, onClearAllFilters]);
|
|
194
|
-
const consumerRenderTopToolbarCustomActions = tableOptions
|
|
195
|
-
const consumerRenderToolbarInternalActions = renderToolbarInternalActions
|
|
196
|
-
const composedRenderToolbarInternalActions =
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
} = _ref4;
|
|
185
|
+
const consumerRenderTopToolbarCustomActions = tableOptions?.renderTopToolbarCustomActions;
|
|
186
|
+
const consumerRenderToolbarInternalActions = renderToolbarInternalActions ?? tableOptions?.renderToolbarInternalActions;
|
|
187
|
+
const composedRenderToolbarInternalActions = useCallback(({
|
|
188
|
+
table: tbl
|
|
189
|
+
}) => {
|
|
200
190
|
const state = tbl.getState();
|
|
201
191
|
const hasColumnFilters = state.columnFilters.some(isActiveFilter);
|
|
202
192
|
const hasGlobalFilter = enableGlobalFilter && !!state.globalFilter;
|
|
203
193
|
const hasActiveFilters = hasColumnFilters || hasGlobalFilter;
|
|
204
|
-
return /*#__PURE__*/
|
|
194
|
+
return /*#__PURE__*/_jsxs(Box, {
|
|
205
195
|
sx: {
|
|
206
196
|
display: 'flex',
|
|
207
197
|
alignItems: 'center',
|
|
208
198
|
gap: 1
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
199
|
+
},
|
|
200
|
+
children: [showClearAllFilters && hasActiveFilters && /*#__PURE__*/_jsx(Button, {
|
|
201
|
+
onClick: () => handleClearAllFilters(tbl),
|
|
202
|
+
label: clearAllFiltersLabel,
|
|
203
|
+
priority: "ghost",
|
|
204
|
+
size: "small"
|
|
205
|
+
}), consumerRenderToolbarInternalActions ? consumerRenderToolbarInternalActions({
|
|
206
|
+
table: tbl
|
|
207
|
+
}) : /*#__PURE__*/_jsx(MRT_ToolbarInternalButtons, {
|
|
208
|
+
table: tbl
|
|
209
|
+
})]
|
|
210
|
+
});
|
|
220
211
|
}, [showClearAllFilters, consumerRenderToolbarInternalActions, enableGlobalFilter, handleClearAllFilters, clearAllFiltersLabel]);
|
|
221
|
-
const table =
|
|
212
|
+
const table = useMaterialReactTable({
|
|
222
213
|
columns: mrtColumns,
|
|
223
214
|
data,
|
|
224
215
|
editDisplayMode: 'cell',
|
|
@@ -232,10 +223,10 @@ function EditableTable(_ref) {
|
|
|
232
223
|
enablePagination,
|
|
233
224
|
enableBottomToolbar: enablePagination ? enableBottomToolbar : false,
|
|
234
225
|
enableTopToolbar,
|
|
235
|
-
positionGlobalFilter: enableGlobalFilter ? 'left' : undefined
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
226
|
+
positionGlobalFilter: enableGlobalFilter ? 'left' : undefined,
|
|
227
|
+
...(Object.keys(initialStateConfig).length > 0 ? {
|
|
228
|
+
initialState: initialStateConfig
|
|
229
|
+
} : {}),
|
|
239
230
|
muiTableBodyProps: {
|
|
240
231
|
sx: {
|
|
241
232
|
'& tr:nth-of-type(odd) > td': {
|
|
@@ -246,37 +237,40 @@ function EditableTable(_ref) {
|
|
|
246
237
|
muiTablePaperProps: {
|
|
247
238
|
elevation: 0
|
|
248
239
|
},
|
|
249
|
-
muiTableBodyRowProps:
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
'& td': {
|
|
259
|
-
borderBottom: 'none'
|
|
260
|
-
}
|
|
240
|
+
muiTableBodyRowProps: ({
|
|
241
|
+
row
|
|
242
|
+
}) => ({
|
|
243
|
+
// eslint-disable-next-line react/prop-types
|
|
244
|
+
onClick: onRowClick ? () => onRowClick(row.original) : undefined,
|
|
245
|
+
sx: {
|
|
246
|
+
cursor: onRowClick ? 'pointer' : 'default',
|
|
247
|
+
'& td': {
|
|
248
|
+
borderBottom: 'none'
|
|
261
249
|
}
|
|
262
|
-
}
|
|
263
|
-
}
|
|
264
|
-
}, tableOptions), {}, {
|
|
265
|
-
// These must come after ...tableOptions to avoid being overridden
|
|
266
|
-
renderToolbarInternalActions: composedRenderToolbarInternalActions
|
|
267
|
-
}, consumerRenderTopToolbarCustomActions ? {
|
|
268
|
-
renderTopToolbarCustomActions: consumerRenderTopToolbarCustomActions
|
|
269
|
-
} : {}), stickyFilters && storageKey ? {
|
|
270
|
-
state: (0, _objectSpread2.default)((0, _objectSpread2.default)({}, tableOptions === null || tableOptions === void 0 ? void 0 : tableOptions.state), {}, {
|
|
271
|
-
columnFilters
|
|
250
|
+
}
|
|
272
251
|
}),
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
252
|
+
// Merge any additional table options
|
|
253
|
+
...tableOptions,
|
|
254
|
+
// These must come after ...tableOptions to avoid being overridden
|
|
255
|
+
renderToolbarInternalActions: composedRenderToolbarInternalActions,
|
|
256
|
+
...(consumerRenderTopToolbarCustomActions ? {
|
|
257
|
+
renderTopToolbarCustomActions: consumerRenderTopToolbarCustomActions
|
|
258
|
+
} : {}),
|
|
259
|
+
// Add sticky filters state if enabled
|
|
260
|
+
...(stickyFilters && storageKey ? {
|
|
261
|
+
state: {
|
|
262
|
+
...tableOptions?.state,
|
|
263
|
+
columnFilters
|
|
264
|
+
},
|
|
265
|
+
onColumnFiltersChange: setColumnFilters
|
|
266
|
+
} : {})
|
|
267
|
+
});
|
|
268
|
+
return /*#__PURE__*/_jsx(Box, {
|
|
276
269
|
minHeight: "160px",
|
|
277
270
|
padding: 2,
|
|
278
|
-
sx: sx
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
271
|
+
sx: sx,
|
|
272
|
+
children: /*#__PURE__*/_jsx(MRTTable, {
|
|
273
|
+
table: table
|
|
274
|
+
})
|
|
275
|
+
});
|
|
282
276
|
}
|
|
@@ -1,17 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
var _material = require("@mui/material");
|
|
10
|
-
var _useDeviceInfo = _interopRequireDefault(require("../../utils/useDeviceInfo"));
|
|
11
|
-
var _Button = _interopRequireDefault(require("../Button/Button"));
|
|
12
|
-
var _Icon = _interopRequireDefault(require("../Icon/Icon"));
|
|
13
|
-
require("./styles.scss");
|
|
14
|
-
function ErrorBox(props) {
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Box } from '@mui/material';
|
|
3
|
+
import useDeviceInfo from '../../utils/useDeviceInfo';
|
|
4
|
+
import Button from '../Button/Button';
|
|
5
|
+
import Icon from '../Icon/Icon';
|
|
6
|
+
import './styles.scss';
|
|
7
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
|
+
export default function ErrorBox(props) {
|
|
15
9
|
const {
|
|
16
10
|
text,
|
|
17
11
|
onClick,
|
|
@@ -22,26 +16,33 @@ function ErrorBox(props) {
|
|
|
22
16
|
} = props;
|
|
23
17
|
const {
|
|
24
18
|
isMobile
|
|
25
|
-
} = (
|
|
26
|
-
return /*#__PURE__*/
|
|
27
|
-
className:
|
|
28
|
-
sx: sx
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
19
|
+
} = useDeviceInfo();
|
|
20
|
+
return /*#__PURE__*/_jsxs(Box, {
|
|
21
|
+
className: `error-box ${className} ${isMobile ? 'mobile' : ''}`,
|
|
22
|
+
sx: sx,
|
|
23
|
+
children: [/*#__PURE__*/_jsxs("div", {
|
|
24
|
+
className: "error-box--container",
|
|
25
|
+
children: [/*#__PURE__*/_jsx(Icon, {
|
|
26
|
+
name: "error",
|
|
27
|
+
className: "error-icon",
|
|
28
|
+
size: "large"
|
|
29
|
+
}), /*#__PURE__*/_jsxs("div", {
|
|
30
|
+
children: [title && /*#__PURE__*/_jsx("h1", {
|
|
31
|
+
className: "error-title",
|
|
32
|
+
children: title
|
|
33
|
+
}), /*#__PURE__*/_jsx("p", {
|
|
34
|
+
className: "error-text",
|
|
35
|
+
children: text
|
|
36
|
+
})]
|
|
37
|
+
})]
|
|
38
|
+
}), buttonText && onClick && /*#__PURE__*/_jsx("div", {
|
|
39
|
+
className: "button-container",
|
|
40
|
+
children: /*#__PURE__*/_jsx(Button, {
|
|
41
|
+
label: buttonText,
|
|
42
|
+
priority: "secondary",
|
|
43
|
+
type: "passive",
|
|
44
|
+
onClick: onClick
|
|
45
|
+
})
|
|
46
|
+
})]
|
|
47
|
+
});
|
|
47
48
|
}
|
|
@@ -1,17 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
exports.default = FileChooser;
|
|
9
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
10
|
-
var _material = require("@mui/material");
|
|
11
|
-
var _utils = require("../../utils");
|
|
12
|
-
var _Button = _interopRequireDefault(require("../Button/Button"));
|
|
13
|
-
var _Icon = _interopRequireDefault(require("../Icon/Icon"));
|
|
14
|
-
function FileChooser(props) {
|
|
1
|
+
import React, { useEffect, useRef, useState } from 'react';
|
|
2
|
+
import { Box, Link, Typography, useTheme } from '@mui/material';
|
|
3
|
+
import { useDeviceInfo } from '../../utils';
|
|
4
|
+
import Button from '../Button/Button';
|
|
5
|
+
import Icon from '../Icon/Icon';
|
|
6
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
|
+
export default function FileChooser(props) {
|
|
15
8
|
const {
|
|
16
9
|
acceptFileType,
|
|
17
10
|
chooseFileText,
|
|
@@ -31,11 +24,11 @@ function FileChooser(props) {
|
|
|
31
24
|
} = props;
|
|
32
25
|
const {
|
|
33
26
|
isMobile
|
|
34
|
-
} =
|
|
35
|
-
const inputRef =
|
|
36
|
-
const theme =
|
|
37
|
-
const [editing, setEditing] =
|
|
38
|
-
|
|
27
|
+
} = useDeviceInfo();
|
|
28
|
+
const inputRef = useRef(null);
|
|
29
|
+
const theme = useTheme();
|
|
30
|
+
const [editing, setEditing] = useState(false);
|
|
31
|
+
useEffect(() => {
|
|
39
32
|
setEditing(!!selectedFile);
|
|
40
33
|
}, [selectedFile]);
|
|
41
34
|
const addFiles = fileList => {
|
|
@@ -47,7 +40,7 @@ function FileChooser(props) {
|
|
|
47
40
|
}
|
|
48
41
|
}
|
|
49
42
|
if (newFiles.length) {
|
|
50
|
-
setFiles([...(files
|
|
43
|
+
setFiles([...(files ?? []), ...newFiles].slice(0, maxFiles));
|
|
51
44
|
}
|
|
52
45
|
};
|
|
53
46
|
const dropHandler = event => {
|
|
@@ -58,9 +51,8 @@ function FileChooser(props) {
|
|
|
58
51
|
event.preventDefault();
|
|
59
52
|
};
|
|
60
53
|
const onChooseFileHandler = () => {
|
|
61
|
-
|
|
62
|
-
(
|
|
63
|
-
onChoosingFiles === null || onChoosingFiles === void 0 ? void 0 : onChoosingFiles();
|
|
54
|
+
inputRef.current?.click();
|
|
55
|
+
onChoosingFiles?.();
|
|
64
56
|
};
|
|
65
57
|
const onFileChosen = event => {
|
|
66
58
|
if (editing) {
|
|
@@ -70,10 +62,10 @@ function FileChooser(props) {
|
|
|
70
62
|
addFiles(event.currentTarget.files);
|
|
71
63
|
}
|
|
72
64
|
};
|
|
73
|
-
return /*#__PURE__*/
|
|
65
|
+
return /*#__PURE__*/_jsxs(Box, {
|
|
74
66
|
onDrop: dropHandler,
|
|
75
67
|
onDragOver: enableDropping,
|
|
76
|
-
border:
|
|
68
|
+
border: `1px dashed ${theme.palette.TwClrBrdrTertiary}`,
|
|
77
69
|
borderRadius: theme.spacing(2),
|
|
78
70
|
display: "flex",
|
|
79
71
|
flexDirection: "column",
|
|
@@ -81,57 +73,61 @@ function FileChooser(props) {
|
|
|
81
73
|
padding: theme.spacing(3),
|
|
82
74
|
sx: {
|
|
83
75
|
background: theme.palette.TwClrBg
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
}
|
|
92
|
-
}), /*#__PURE__*/_react.default.createElement(_material.Typography, {
|
|
93
|
-
color: theme.palette.TwClrTxt,
|
|
94
|
-
fontSize: 14,
|
|
95
|
-
fontWeight: 600,
|
|
96
|
-
margin: theme.spacing(0, 0, 1)
|
|
97
|
-
}, !editing && ((files || []).length > 0 && !multipleSelection ? files === null || files === void 0 ? void 0 : files[0].name : uploadText)), /*#__PURE__*/_react.default.createElement(_material.Typography, {
|
|
98
|
-
color: theme.palette.TwClrTxt,
|
|
99
|
-
fontSize: 12,
|
|
100
|
-
fontWeight: 400,
|
|
101
|
-
margin: 0
|
|
102
|
-
}, (editing || (files || []).length > 0) && !multipleSelection ? fileSelectedText : isMobile && uploadMobileDescription ? uploadMobileDescription : uploadDescription), /*#__PURE__*/_react.default.createElement("input", {
|
|
103
|
-
type: "file",
|
|
104
|
-
ref: inputRef,
|
|
105
|
-
onChange: onFileChosen,
|
|
106
|
-
accept: acceptFileType,
|
|
107
|
-
multiple: multipleSelection || false,
|
|
108
|
-
value: '',
|
|
109
|
-
style: {
|
|
110
|
-
display: 'none'
|
|
111
|
-
}
|
|
112
|
-
}), /*#__PURE__*/_react.default.createElement(_Button.default, {
|
|
113
|
-
onClick: onChooseFileHandler,
|
|
114
|
-
disabled: maxFiles !== undefined ? (files || []).length >= maxFiles : false,
|
|
115
|
-
label: !multipleSelection && ((files || []).length === 1 || editing) ? replaceFileText : chooseFileText,
|
|
116
|
-
priority: "secondary",
|
|
117
|
-
type: "passive",
|
|
118
|
-
sx: {
|
|
119
|
-
marginTop: theme.spacing(3)
|
|
120
|
-
}
|
|
121
|
-
}), template && /*#__PURE__*/_react.default.createElement(_material.Link, {
|
|
122
|
-
href: template.url,
|
|
123
|
-
target: "_blank",
|
|
124
|
-
sx: {
|
|
125
|
-
color: theme.palette.TwClrTxtBrand,
|
|
126
|
-
fontFamily: 'Inter',
|
|
127
|
-
fontSize: '12px',
|
|
128
|
-
fontWeight: 500,
|
|
129
|
-
lineHeight: '16px',
|
|
130
|
-
marginTop: theme.spacing(2),
|
|
131
|
-
textDecoration: 'none',
|
|
132
|
-
'&:hover': {
|
|
133
|
-
textDecoration: 'underline'
|
|
76
|
+
},
|
|
77
|
+
children: [iconName && /*#__PURE__*/_jsx(Icon, {
|
|
78
|
+
name: iconName,
|
|
79
|
+
size: "xlarge",
|
|
80
|
+
style: {
|
|
81
|
+
height: '120px',
|
|
82
|
+
width: '120px'
|
|
134
83
|
}
|
|
135
|
-
}
|
|
136
|
-
|
|
84
|
+
}), /*#__PURE__*/_jsx(Typography, {
|
|
85
|
+
color: theme.palette.TwClrTxt,
|
|
86
|
+
fontSize: 14,
|
|
87
|
+
fontWeight: 600,
|
|
88
|
+
margin: theme.spacing(0, 0, 1),
|
|
89
|
+
children: !editing && ((files || []).length > 0 && !multipleSelection ? files?.[0].name : uploadText)
|
|
90
|
+
}), /*#__PURE__*/_jsx(Typography, {
|
|
91
|
+
color: theme.palette.TwClrTxt,
|
|
92
|
+
fontSize: 12,
|
|
93
|
+
fontWeight: 400,
|
|
94
|
+
margin: 0,
|
|
95
|
+
children: (editing || (files || []).length > 0) && !multipleSelection ? fileSelectedText : isMobile && uploadMobileDescription ? uploadMobileDescription : uploadDescription
|
|
96
|
+
}), /*#__PURE__*/_jsx("input", {
|
|
97
|
+
type: "file",
|
|
98
|
+
ref: inputRef,
|
|
99
|
+
onChange: onFileChosen,
|
|
100
|
+
accept: acceptFileType,
|
|
101
|
+
multiple: multipleSelection || false,
|
|
102
|
+
value: '',
|
|
103
|
+
style: {
|
|
104
|
+
display: 'none'
|
|
105
|
+
}
|
|
106
|
+
}), /*#__PURE__*/_jsx(Button, {
|
|
107
|
+
onClick: onChooseFileHandler,
|
|
108
|
+
disabled: maxFiles !== undefined ? (files || []).length >= maxFiles : false,
|
|
109
|
+
label: !multipleSelection && ((files || []).length === 1 || editing) ? replaceFileText : chooseFileText,
|
|
110
|
+
priority: "secondary",
|
|
111
|
+
type: "passive",
|
|
112
|
+
sx: {
|
|
113
|
+
marginTop: theme.spacing(3)
|
|
114
|
+
}
|
|
115
|
+
}), template && /*#__PURE__*/_jsx(Link, {
|
|
116
|
+
href: template.url,
|
|
117
|
+
target: "_blank",
|
|
118
|
+
sx: {
|
|
119
|
+
color: theme.palette.TwClrTxtBrand,
|
|
120
|
+
fontFamily: 'Inter',
|
|
121
|
+
fontSize: '12px',
|
|
122
|
+
fontWeight: 500,
|
|
123
|
+
lineHeight: '16px',
|
|
124
|
+
marginTop: theme.spacing(2),
|
|
125
|
+
textDecoration: 'none',
|
|
126
|
+
'&:hover': {
|
|
127
|
+
textDecoration: 'underline'
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
children: template.text
|
|
131
|
+
})]
|
|
132
|
+
});
|
|
137
133
|
}
|