awing-library 2.1.2-dev.97 → 2.1.2-dev.99
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/dist/esm/AWING/ButtonSplit/Container.d.ts +11 -0
- package/dist/esm/AWING/ButtonSplit/index.d.ts +2 -0
- package/dist/esm/AWING/index.d.ts +3 -0
- package/dist/esm/index.js +2235 -1592
- package/dist/index.d.ts +13 -1
- package/package.json +12 -4
package/dist/esm/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import { initReactI18next, useTranslation, Trans, I18nextProvider } from 'react-
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import React__default, { useState, useRef, useEffect, Fragment, Children, isValidElement, cloneElement, useMemo, createElement, forwardRef, useLayoutEffect, useCallback, createContext as createContext$1, memo, useReducer, useContext, PureComponent, createRef } from 'react';
|
|
5
5
|
import { MoreVert, KeyboardArrowDown, Done as Done$1, FolderOpen, ArrowDropDown, ArrowDropUp, CheckBoxOutlineBlank, CheckBox, ExpandMore, ExpandLess, KeyboardArrowUp, DragIndicator, PinDrop, LastPage, FirstPage, KeyboardArrowRight, KeyboardArrowLeft, UnfoldMore, North, South, HighlightOff, CalendarTodaySharp, FileCopyOutlined, Close, Save, Check, ArrowRightAlt as ArrowRightAlt$1, CallSplit, ManageAccounts, People, Person, Info, ChevronRight as ChevronRight$1, Clear, AddCircleOutline, Search, MoreHoriz, CreateNewFolderOutlined, Delete, PlaylistAddCheck, FormatListNumbered, Add, MoreHorizOutlined, DisplaySettings, VisibilityOff, Visibility, ManageSearch, Notifications as Notifications$6, Science, Settings, AddBox, Edit as Edit$2, InsertDriveFile, SignalCellularAlt, Logout, ArrowRight, ChevronLeft as ChevronLeft$1 } from '@mui/icons-material';
|
|
6
|
-
import { Tooltip as Tooltip$2, IconButton as IconButton$1, Menu as Menu$2, MenuItem as MenuItem$1, Button as Button$1, TextField as TextField$1, Grid as Grid$1, FormControl as FormControl$1, Select as Select$1, Box as Box$1, alpha as alpha$2, Typography as Typography$1, Paper as Paper$1, List as List$1, ListItem as ListItem$1, ListItemButton, ListItemText, Divider, Popover as Popover$1, Popper as Popper$2, Grow as Grow$1, ClickAwayListener, Autocomplete as Autocomplete$2, InputBase as InputBase$1, Stack, ButtonBase as ButtonBase$1, Collapse as Collapse$1, Chip as Chip$1, CircularProgress as CircularProgress$2, FormControlLabel, Checkbox as Checkbox$1, RadioGroup, Radio, InputLabel as InputLabel$1, ListSubheader as ListSubheader$1, FormLabel as FormLabel$1, TablePagination, TableRow, TableContainer, Table, TableHead, TableCell, TableSortLabel, TableBody, InputAdornment as InputAdornment$1, Drawer as Drawer$1, Dialog as Dialog$3, DialogTitle, DialogContent as DialogContent$1, DialogContentText, DialogActions as DialogActions$1, Tabs, Tab, Snackbar, Alert, Toolbar, Switch, tooltipClasses as tooltipClasses$1, styled as styled$4, Avatar, Skeleton, Badge, Stepper, Step, StepLabel, StepContent, Card, CardHeader, CardContent, NoSsr, ListItemIcon, AppBar, Container as Container$o, Icon, CssBaseline } from '@mui/material';
|
|
6
|
+
import { Tooltip as Tooltip$2, IconButton as IconButton$1, Menu as Menu$2, MenuItem as MenuItem$1, Button as Button$1, TextField as TextField$1, Grid as Grid$1, FormControl as FormControl$1, Select as Select$1, Box as Box$1, alpha as alpha$2, Typography as Typography$1, Paper as Paper$1, List as List$1, ListItem as ListItem$1, ListItemButton, ListItemText, Divider, Popover as Popover$1, Popper as Popper$2, Grow as Grow$1, ClickAwayListener as ClickAwayListener$1, Autocomplete as Autocomplete$2, InputBase as InputBase$1, Stack, ButtonBase as ButtonBase$1, Collapse as Collapse$1, Chip as Chip$1, CircularProgress as CircularProgress$2, FormControlLabel, Checkbox as Checkbox$1, RadioGroup, Radio, InputLabel as InputLabel$1, ListSubheader as ListSubheader$1, FormLabel as FormLabel$1, TablePagination, TableRow, TableContainer, Table, TableHead, TableCell, TableSortLabel, TableBody, InputAdornment as InputAdornment$1, Drawer as Drawer$1, Dialog as Dialog$3, DialogTitle, DialogContent as DialogContent$1, DialogContentText, DialogActions as DialogActions$1, Tabs, Tab, Snackbar, Alert, Toolbar, Switch, tooltipClasses as tooltipClasses$1, styled as styled$4, Avatar, Skeleton, Badge, Stepper, Step, StepLabel, StepContent, Card, CardHeader, CardContent, NoSsr, ListItemIcon, AppBar, Container as Container$o, Icon, CssBaseline } from '@mui/material';
|
|
7
7
|
import styled$3 from '@emotion/styled';
|
|
8
8
|
import { CacheProvider, Global, ThemeContext as ThemeContext$2, keyframes, css } from '@emotion/react';
|
|
9
9
|
import { makeStyles } from '@mui/styles';
|
|
@@ -41599,6 +41599,827 @@ function ThemeProvider$1({
|
|
|
41599
41599
|
});
|
|
41600
41600
|
}
|
|
41601
41601
|
|
|
41602
|
+
/**
|
|
41603
|
+
* Get the value of a cookie
|
|
41604
|
+
* Source: https://vanillajstoolkit.com/helpers/getcookie/
|
|
41605
|
+
* @param name - The name of the cookie
|
|
41606
|
+
* @return The cookie value
|
|
41607
|
+
*/
|
|
41608
|
+
function getCookie(name) {
|
|
41609
|
+
if (typeof document !== 'undefined') {
|
|
41610
|
+
const value = "; ".concat(document.cookie);
|
|
41611
|
+
const parts = value.split("; ".concat(name, "="));
|
|
41612
|
+
if (parts.length === 2) {
|
|
41613
|
+
return parts[1].split(';').shift();
|
|
41614
|
+
}
|
|
41615
|
+
}
|
|
41616
|
+
return undefined;
|
|
41617
|
+
}
|
|
41618
|
+
function getQueryVariable(variable) {
|
|
41619
|
+
var query = window.location.search.substring(1);
|
|
41620
|
+
var vars = query.split('&');
|
|
41621
|
+
for (var i = 0; i < vars.length; i++) {
|
|
41622
|
+
var pair = vars[i].split('=');
|
|
41623
|
+
if (pair[0] === variable) {
|
|
41624
|
+
return pair[1];
|
|
41625
|
+
}
|
|
41626
|
+
}
|
|
41627
|
+
return '';
|
|
41628
|
+
}
|
|
41629
|
+
function generateUUID() {
|
|
41630
|
+
// Public Domain/MIT
|
|
41631
|
+
var d = new Date().getTime(); //Timestamp
|
|
41632
|
+
var d2 = typeof performance !== 'undefined' && performance.now && performance.now() * 1000 || 0; //Time in microseconds since page-load or 0 if unsupported
|
|
41633
|
+
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
|
|
41634
|
+
var r = Math.random() * 16; //random number between 0 and 16
|
|
41635
|
+
if (d > 0) {
|
|
41636
|
+
//Use timestamp until depleted
|
|
41637
|
+
r = (d + r) % 16 | 0;
|
|
41638
|
+
d = Math.floor(d / 16);
|
|
41639
|
+
} else {
|
|
41640
|
+
//Use microseconds since page-load if supported
|
|
41641
|
+
r = (d2 + r) % 16 | 0;
|
|
41642
|
+
d2 = Math.floor(d2 / 16);
|
|
41643
|
+
}
|
|
41644
|
+
return (c === 'x' ? r : r & 0x3 | 0x8).toString(16);
|
|
41645
|
+
});
|
|
41646
|
+
}
|
|
41647
|
+
const getRoutePath = (location, params) => {
|
|
41648
|
+
const {
|
|
41649
|
+
pathname
|
|
41650
|
+
} = location;
|
|
41651
|
+
if (!Object.keys(params).length) {
|
|
41652
|
+
return pathname; // we don't need to replace anything
|
|
41653
|
+
}
|
|
41654
|
+
let path = pathname;
|
|
41655
|
+
Object.entries(params).forEach(_ref => {
|
|
41656
|
+
let [paramName, paramValue] = _ref;
|
|
41657
|
+
if (paramValue) {
|
|
41658
|
+
path = path.replace(paramValue, ":".concat(paramName));
|
|
41659
|
+
}
|
|
41660
|
+
});
|
|
41661
|
+
return path;
|
|
41662
|
+
};
|
|
41663
|
+
const offlinePaginate = (array, pageIndex, pageSize) => [...array].slice(pageIndex * pageSize, (pageIndex + 1) * pageSize);
|
|
41664
|
+
|
|
41665
|
+
/**
|
|
41666
|
+
* Xử lý dữ liệu dạng mảng hoặc object một cách đơn giản và hiệu quả.
|
|
41667
|
+
* Tăng cường khả năng thao tác với danh sách dữ liệu.
|
|
41668
|
+
*/
|
|
41669
|
+
function convertArrayToObject(array, keyName) {
|
|
41670
|
+
return array === null || array === void 0 ? void 0 : array.reduce((obj, item, _index) => {
|
|
41671
|
+
return Object.assign(Object.assign({}, obj), {
|
|
41672
|
+
[item[keyName]]: Object.assign({}, item)
|
|
41673
|
+
});
|
|
41674
|
+
}, {});
|
|
41675
|
+
}
|
|
41676
|
+
const convertDataSetPattern = data => {
|
|
41677
|
+
const ctr = data === null || data === void 0 ? void 0 : data.map(item => item.ctr);
|
|
41678
|
+
const numberOfConnections = data === null || data === void 0 ? void 0 : data.map(item => item.click);
|
|
41679
|
+
const impressions = data === null || data === void 0 ? void 0 : data.map(item => item.view);
|
|
41680
|
+
return [{
|
|
41681
|
+
data: ctr,
|
|
41682
|
+
label: i18n.t('Statistics.CTR'),
|
|
41683
|
+
type: 'bar',
|
|
41684
|
+
color: 'rgb(128, 176, 255)'
|
|
41685
|
+
}, {
|
|
41686
|
+
data: numberOfConnections,
|
|
41687
|
+
label: i18n.t('Statistics.NumberOfConnections'),
|
|
41688
|
+
type: 'line',
|
|
41689
|
+
color: 'rgb(0, 85, 184)'
|
|
41690
|
+
}, {
|
|
41691
|
+
data: impressions,
|
|
41692
|
+
label: i18n.t('Statistics.Impressions'),
|
|
41693
|
+
type: 'line',
|
|
41694
|
+
color: 'rgb(221, 4, 12)'
|
|
41695
|
+
}];
|
|
41696
|
+
};
|
|
41697
|
+
const updateObjectFields = (originalObj, changedValues) => {
|
|
41698
|
+
// Create a copy of the original object
|
|
41699
|
+
const updatedObject = Object.assign({}, originalObj);
|
|
41700
|
+
// Recursive function to update nested fields
|
|
41701
|
+
const updateNestedFields = (obj, changes) => {
|
|
41702
|
+
for (const [key, value] of Object.entries(changes)) {
|
|
41703
|
+
// Check if the field exists in the original object
|
|
41704
|
+
if (obj.hasOwnProperty(key)) {
|
|
41705
|
+
// If the field is an object, recursively update nested fields
|
|
41706
|
+
if (typeof obj[key] === 'object' && typeof value === 'object') {
|
|
41707
|
+
updateNestedFields(obj[key], value);
|
|
41708
|
+
} else {
|
|
41709
|
+
// Otherwise, update the field value
|
|
41710
|
+
obj[key] = value;
|
|
41711
|
+
}
|
|
41712
|
+
} else {
|
|
41713
|
+
obj[key] = value;
|
|
41714
|
+
}
|
|
41715
|
+
}
|
|
41716
|
+
};
|
|
41717
|
+
// Update nested fields
|
|
41718
|
+
updateNestedFields(updatedObject, changedValues);
|
|
41719
|
+
return updatedObject;
|
|
41720
|
+
};
|
|
41721
|
+
function formatChartNumber(val, language) {
|
|
41722
|
+
if (!val) return '0';
|
|
41723
|
+
if (val === '-') {
|
|
41724
|
+
return '-';
|
|
41725
|
+
}
|
|
41726
|
+
const temp = Math.round(Number(val) * 100) / 100;
|
|
41727
|
+
let formatValue = formatNumberWithLanguage(temp, language);
|
|
41728
|
+
return formatValue;
|
|
41729
|
+
}
|
|
41730
|
+
const setObject = (obj, arrKey, value) => {
|
|
41731
|
+
lodashExports.set(obj, arrKey.reduce((acc, val) => acc + '[' + val + ']', ''), value);
|
|
41732
|
+
};
|
|
41733
|
+
//AWING_[NAME FEATURE]_[OBJECT_NAME]_[SUB_TITLE]_[DATEFORMAT yyyy-MM-DD]
|
|
41734
|
+
function nameExportStandard(nameFeature, objectName, subTitle) {
|
|
41735
|
+
const currentTime = moment().format('YYYY-MM-DD');
|
|
41736
|
+
const parts = [nameFeature, objectName, subTitle, currentTime].filter(Boolean);
|
|
41737
|
+
return "AWING_".concat(parts.join('_').toUpperCase());
|
|
41738
|
+
}
|
|
41739
|
+
const formatJSON$1 = val => {
|
|
41740
|
+
try {
|
|
41741
|
+
const res = JSON.parse(val);
|
|
41742
|
+
return JSON.stringify(res, null, 2);
|
|
41743
|
+
} catch (_a) {
|
|
41744
|
+
return val;
|
|
41745
|
+
}
|
|
41746
|
+
};
|
|
41747
|
+
|
|
41748
|
+
var TIMELINE_TYPE;
|
|
41749
|
+
(function (TIMELINE_TYPE) {
|
|
41750
|
+
TIMELINE_TYPE[TIMELINE_TYPE["HOUR"] = 0] = "HOUR";
|
|
41751
|
+
TIMELINE_TYPE[TIMELINE_TYPE["DAY"] = 1] = "DAY";
|
|
41752
|
+
})(TIMELINE_TYPE || (TIMELINE_TYPE = {}));
|
|
41753
|
+
var SortEnumType;
|
|
41754
|
+
(function (SortEnumType) {
|
|
41755
|
+
SortEnumType["Asc"] = "ASC";
|
|
41756
|
+
SortEnumType["Desc"] = "DESC";
|
|
41757
|
+
})(SortEnumType || (SortEnumType = {}));
|
|
41758
|
+
var DataGridSortType;
|
|
41759
|
+
(function (DataGridSortType) {
|
|
41760
|
+
DataGridSortType["Asc"] = "ASC";
|
|
41761
|
+
DataGridSortType["Desc"] = "DESC";
|
|
41762
|
+
DataGridSortType["Ready"] = "READY";
|
|
41763
|
+
})(DataGridSortType || (DataGridSortType = {}));
|
|
41764
|
+
var DirectoryRoot;
|
|
41765
|
+
(function (DirectoryRoot) {
|
|
41766
|
+
DirectoryRoot["Directory"] = "directory";
|
|
41767
|
+
DirectoryRoot["Place"] = "place";
|
|
41768
|
+
DirectoryRoot["Workflow"] = "workflow";
|
|
41769
|
+
DirectoryRoot["Workflow_gate"] = "workflow_gate";
|
|
41770
|
+
DirectoryRoot["Workflow_scheme"] = "workflow_scheme";
|
|
41771
|
+
DirectoryRoot["Menu"] = "menu";
|
|
41772
|
+
DirectoryRoot["Storage"] = "storage";
|
|
41773
|
+
DirectoryRoot["Report"] = "report";
|
|
41774
|
+
DirectoryRoot["Group"] = "group";
|
|
41775
|
+
DirectoryRoot["Campaign"] = "campaign";
|
|
41776
|
+
DirectoryRoot["Page"] = "page";
|
|
41777
|
+
DirectoryRoot["PageWelcome"] = "pageWelcome";
|
|
41778
|
+
DirectoryRoot["PageLogin"] = "pageLogin";
|
|
41779
|
+
DirectoryRoot["PageGadget"] = "pageGadget";
|
|
41780
|
+
DirectoryRoot["PageHistory"] = "pageHistory";
|
|
41781
|
+
DirectoryRoot["CampaignCurrent"] = "campaignCurrent";
|
|
41782
|
+
DirectoryRoot["CampaignHistory"] = "campaignHistory";
|
|
41783
|
+
DirectoryRoot["Template"] = "template";
|
|
41784
|
+
DirectoryRoot["Layout"] = "layout";
|
|
41785
|
+
DirectoryRoot["Authentication_profile"] = "authentication_profile";
|
|
41786
|
+
DirectoryRoot["Archive"] = "archive";
|
|
41787
|
+
DirectoryRoot["Ap"] = "ap";
|
|
41788
|
+
DirectoryRoot["Place_group"] = "place_group";
|
|
41789
|
+
DirectoryRoot["Wizard"] = "wizard";
|
|
41790
|
+
DirectoryRoot["Campaign_collection"] = "campaign_collection";
|
|
41791
|
+
DirectoryRoot["Task_scheduler"] = "task_scheduler";
|
|
41792
|
+
})(DirectoryRoot || (DirectoryRoot = {}));
|
|
41793
|
+
var WorkspaceType;
|
|
41794
|
+
(function (WorkspaceType) {
|
|
41795
|
+
WorkspaceType["AXN"] = "AXN";
|
|
41796
|
+
WorkspaceType["ADMIN"] = "ADMIN";
|
|
41797
|
+
WorkspaceType["ACM"] = "ACM";
|
|
41798
|
+
})(WorkspaceType || (WorkspaceType = {}));
|
|
41799
|
+
|
|
41800
|
+
/**
|
|
41801
|
+
* Quản lý và xử lý thời gian, ngày tháng một cách tiện lợi và nhất quán.
|
|
41802
|
+
* Giảm thiểu lỗi khi thao tác với định dạng ngày giờ.
|
|
41803
|
+
*/
|
|
41804
|
+
function dateToString(date) {
|
|
41805
|
+
return moment(date).format('L');
|
|
41806
|
+
}
|
|
41807
|
+
function calculatorDirectoryIdRoot(directoriesTree) {
|
|
41808
|
+
let directoryId = 0;
|
|
41809
|
+
let minLevel = Number.POSITIVE_INFINITY;
|
|
41810
|
+
directoriesTree.forEach(directory => {
|
|
41811
|
+
if (directory.level < minLevel) {
|
|
41812
|
+
minLevel = directory.level;
|
|
41813
|
+
directoryId = directory.directoryId;
|
|
41814
|
+
}
|
|
41815
|
+
});
|
|
41816
|
+
return directoryId;
|
|
41817
|
+
}
|
|
41818
|
+
const convertTimeLine = value => {
|
|
41819
|
+
let dateTime = '';
|
|
41820
|
+
const hour = value.toString().substring(8, 10);
|
|
41821
|
+
if (hour) {
|
|
41822
|
+
dateTime += "".concat(hour, "h ");
|
|
41823
|
+
}
|
|
41824
|
+
const day = value.toString().substring(6, 8);
|
|
41825
|
+
if (day) {
|
|
41826
|
+
dateTime += "".concat(day, "-");
|
|
41827
|
+
}
|
|
41828
|
+
const month = value.toString().substring(4, 6);
|
|
41829
|
+
if (month) {
|
|
41830
|
+
dateTime += "".concat(month, "-");
|
|
41831
|
+
}
|
|
41832
|
+
const year = value.toString().substring(0, 4);
|
|
41833
|
+
if (year) {
|
|
41834
|
+
dateTime += "".concat(year);
|
|
41835
|
+
}
|
|
41836
|
+
// `${year}-${month}-${day}T${hour}`
|
|
41837
|
+
// return moment(dateTime).format("DD-MM").toString()
|
|
41838
|
+
return dateTime;
|
|
41839
|
+
};
|
|
41840
|
+
const convertDateTimeToTimestamp = date => {
|
|
41841
|
+
return {
|
|
41842
|
+
seconds: date.getTime() / 1000,
|
|
41843
|
+
nanos: 0
|
|
41844
|
+
};
|
|
41845
|
+
};
|
|
41846
|
+
const convertTimestampToDateTime = timestamp => {
|
|
41847
|
+
return moment.unix(Number(timestamp.seconds)).toDate();
|
|
41848
|
+
};
|
|
41849
|
+
const dateTimeToString = (dateTime, format) => {
|
|
41850
|
+
return moment(dateTime).format(format);
|
|
41851
|
+
};
|
|
41852
|
+
const convertTimelineToDateTime = (timeline, timelineType) => {
|
|
41853
|
+
let day = Number(timeline.toString().substring(6, 8));
|
|
41854
|
+
let month = Number(timeline.toString().substring(4, 6));
|
|
41855
|
+
let year = Number(timeline.toString().substring(0, 4));
|
|
41856
|
+
if (timelineType === TIMELINE_TYPE.HOUR) {
|
|
41857
|
+
let hours = Number(timeline.toString().substring(8, 10));
|
|
41858
|
+
return new Date(year, month - 1, day, hours);
|
|
41859
|
+
} else return new Date(year, month - 1, day);
|
|
41860
|
+
};
|
|
41861
|
+
// format: 'DD/MM/YYYY' => 07/02/2020
|
|
41862
|
+
function dateToStringDDMMYYYY(date) {
|
|
41863
|
+
if (!date) return null;
|
|
41864
|
+
const _date = new Date(date);
|
|
41865
|
+
// const _language = i18next.language || 'vi';
|
|
41866
|
+
const _language = 'en-GB';
|
|
41867
|
+
let options = {
|
|
41868
|
+
year: 'numeric',
|
|
41869
|
+
month: '2-digit',
|
|
41870
|
+
day: '2-digit'
|
|
41871
|
+
};
|
|
41872
|
+
return _date.toLocaleDateString("".concat(_language), options);
|
|
41873
|
+
}
|
|
41874
|
+
// format: 'DD/MM/YYYY' => 07/02/2020
|
|
41875
|
+
function timestampToStringDDMMYYYY(date) {
|
|
41876
|
+
if (!date) return null;
|
|
41877
|
+
// const _date = new Date(date.seconds * 1000);
|
|
41878
|
+
return dateToStringDDMMYYYY(new Date(date.seconds * 1000));
|
|
41879
|
+
}
|
|
41880
|
+
const getStartOfDay = dateTime => {
|
|
41881
|
+
let date = dateTime.getDate();
|
|
41882
|
+
let month = dateTime.getMonth();
|
|
41883
|
+
let year = dateTime.getFullYear();
|
|
41884
|
+
return new Date(year, month, date);
|
|
41885
|
+
};
|
|
41886
|
+
const getToday = () => {
|
|
41887
|
+
let result = new Date();
|
|
41888
|
+
result.setHours(0);
|
|
41889
|
+
result.setMinutes(0);
|
|
41890
|
+
result.setSeconds(0);
|
|
41891
|
+
result.setMilliseconds(0);
|
|
41892
|
+
return result;
|
|
41893
|
+
};
|
|
41894
|
+
function fillMissingDates(data) {
|
|
41895
|
+
let startDate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
|
41896
|
+
let endDate = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
|
|
41897
|
+
let format = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 'YYYYMMDD';
|
|
41898
|
+
const result = data.concat();
|
|
41899
|
+
// Parse the start and end dates
|
|
41900
|
+
const start = moment(isNaN(Number(startDate)) ? startDate : String(startDate)).startOf('day');
|
|
41901
|
+
const end = moment(isNaN(Number(endDate)) ? endDate : String(endDate)).endOf('day');
|
|
41902
|
+
if (start.isAfter(end)) throw new Error('Start date must be before end date');
|
|
41903
|
+
// Array to hold the complete range of dates
|
|
41904
|
+
let dates = [];
|
|
41905
|
+
// Iterate through the date range
|
|
41906
|
+
for (let m = moment(start); m.isSameOrBefore(end); m.add(1, format === 'YYYYMMDD' ? 'days' : 'hours')) {
|
|
41907
|
+
dates.push(m.format(format));
|
|
41908
|
+
}
|
|
41909
|
+
lodashExports.xor(data.map(d => d.x), dates).forEach(x => {
|
|
41910
|
+
result.push({
|
|
41911
|
+
x,
|
|
41912
|
+
y: 0
|
|
41913
|
+
});
|
|
41914
|
+
});
|
|
41915
|
+
return lodashExports.orderBy(Object.entries(lodashExports.groupBy(result, 'x')).map(_ref => {
|
|
41916
|
+
let [key, value] = _ref;
|
|
41917
|
+
return {
|
|
41918
|
+
x: key,
|
|
41919
|
+
y: lodashExports.sumBy(value, 'y')
|
|
41920
|
+
};
|
|
41921
|
+
}), ['x'], ['asc']);
|
|
41922
|
+
}
|
|
41923
|
+
function parseJSON(str) {
|
|
41924
|
+
try {
|
|
41925
|
+
return JSON.parse(str || '{}');
|
|
41926
|
+
} catch (e) {
|
|
41927
|
+
return str;
|
|
41928
|
+
}
|
|
41929
|
+
}
|
|
41930
|
+
|
|
41931
|
+
/**
|
|
41932
|
+
* Xử lý các thao tác số học và toán học một cách tiện lợi.
|
|
41933
|
+
* Hỗ trợ các phép toán phức tạp hoặc tối ưu hóa các logic tính toán thường dùng.
|
|
41934
|
+
*/
|
|
41935
|
+
function formatNumberByLocale(value, lang, locale) {
|
|
41936
|
+
const localesMap = {
|
|
41937
|
+
vi: 'vi-VN',
|
|
41938
|
+
en: 'en-US',
|
|
41939
|
+
ja: 'ja-JP',
|
|
41940
|
+
th: 'th-TH',
|
|
41941
|
+
id: 'id-ID',
|
|
41942
|
+
fil: 'fil-PH'
|
|
41943
|
+
};
|
|
41944
|
+
const currentLang = lang || localStorage.getItem('i18nextLng');
|
|
41945
|
+
if (value === undefined) return '';else if (currentLang && lodashExports.keysIn(localesMap).includes(currentLang)) return new Intl.NumberFormat(localesMap[currentLang]).format(value);else return new Intl.NumberFormat(locale).format(value);
|
|
41946
|
+
}
|
|
41947
|
+
function roundDecimalNumber(number) {
|
|
41948
|
+
if (typeof number !== 'number') return null;
|
|
41949
|
+
let str = JSON.stringify(Math.round(number * 1000000) / 1000000);
|
|
41950
|
+
let signIndex = str.indexOf('.');
|
|
41951
|
+
if (signIndex === -1) {
|
|
41952
|
+
return str.replace(/(\d)(?=(\d{3})+(?!\d))/g, '$1,');
|
|
41953
|
+
} else {
|
|
41954
|
+
return str.slice(0, signIndex).replace(/(\d)(?=(\d{3})+(?!\d))/g, '$1,') + str.slice(signIndex);
|
|
41955
|
+
}
|
|
41956
|
+
}
|
|
41957
|
+
function WMAPEcalculator(data) {
|
|
41958
|
+
// data là array có dạng [{estimate: number, reality: number},...]
|
|
41959
|
+
if (data.length > 0) {
|
|
41960
|
+
const numerator = data.reduce((acc, item) => Math.abs(item.reality - item.estimate) + acc, 0);
|
|
41961
|
+
const dinominator = data.reduce((acc, item) => item.reality + acc, 0);
|
|
41962
|
+
return dinominator === 0 ? numerator === 0 ? 0 : '∞' : numerator * 100 / dinominator;
|
|
41963
|
+
} else {
|
|
41964
|
+
return 0;
|
|
41965
|
+
}
|
|
41966
|
+
}
|
|
41967
|
+
|
|
41968
|
+
/**
|
|
41969
|
+
* Hỗ trợ xử lý chuỗi văn bản, từ việc định dạng, chuyển đổi cho đến kiểm tra tính hợp lệ.
|
|
41970
|
+
* Đảm bảo sự nhất quán và tái sử dụng các logic liên quan đến chuỗi.
|
|
41971
|
+
*/
|
|
41972
|
+
function changeToAlias() {
|
|
41973
|
+
let str = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
41974
|
+
// Chuyển toàn bộ Tiếng Việt sang không dấu viết thường và các kí tự đặc biệt thành dấu "-"
|
|
41975
|
+
return str.trim().normalize('NFD').toLowerCase().replace(/\s\s+/g, ' ').replace(/[\u0300-\u036f]/g, '').replace(/đ/g, 'd').replace(/`|~|!|@|"|#|\||\$|%|\^|&|\*|\(|\)|\+|=|,|\.|\/|\?|>|<|'|"|:|;|_/gi, '').replace(/ /g, '-').replace(/-----/gi, '-').replace(/----/gi, '-').replace(/---/gi, '-').replace(/--/gi, '-').replace(/"-|-"|"/gi, '');
|
|
41976
|
+
}
|
|
41977
|
+
const toCapitalize = function (str) {
|
|
41978
|
+
let lower = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
41979
|
+
return (lower ? str.toLowerCase() : str).replace(/(?:^|\s|["'([{])+\S/g, match => match.toUpperCase());
|
|
41980
|
+
};
|
|
41981
|
+
|
|
41982
|
+
/**
|
|
41983
|
+
* Đảm bảo dữ liệu được kiểm tra tính hợp lệ trước khi xử lý hoặc gửi đi.
|
|
41984
|
+
* Được sử dụng nhiều trong xử lý form, API, hoặc đầu vào từ người dùng.
|
|
41985
|
+
*/
|
|
41986
|
+
/**
|
|
41987
|
+
* check string list ap input
|
|
41988
|
+
*
|
|
41989
|
+
* @param {string} stringListAP
|
|
41990
|
+
* @returns {boolean}
|
|
41991
|
+
*/
|
|
41992
|
+
//Hàm này chỉ dùng bên ACM khi nào ai import hàm này move sang ACM nhé
|
|
41993
|
+
function checkValidStringListAP() {
|
|
41994
|
+
let stringListAP = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
41995
|
+
let isValid = true;
|
|
41996
|
+
const listAP = stringListAP.split('\n');
|
|
41997
|
+
listAP.every(ap => {
|
|
41998
|
+
const [macAp, nameAp] = ap.split(' ');
|
|
41999
|
+
const regexMacAddress = /^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})|([0-9a-fA-F]{4}\\.[0-9a-fA-F]{4}\\.[0-9a-fA-F]{4})$/g;
|
|
42000
|
+
// eslint-disable-next-line eqeqeq
|
|
42001
|
+
const isValidMacAddress = macAp == macAp.match(regexMacAddress);
|
|
42002
|
+
if (!isValidMacAddress || !nameAp || listAP.filter(item => item.includes(macAp)).length > 1) {
|
|
42003
|
+
isValid = false;
|
|
42004
|
+
}
|
|
42005
|
+
return isValid;
|
|
42006
|
+
});
|
|
42007
|
+
return !isValid;
|
|
42008
|
+
}
|
|
42009
|
+
function checkValidMacAddress() {
|
|
42010
|
+
let string = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
42011
|
+
const regexMacAddress = /^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})|([0-9a-fA-F]{4}\\.[0-9a-fA-F]{4}\\.[0-9a-fA-F]{4})$/g;
|
|
42012
|
+
return regexMacAddress.test(string);
|
|
42013
|
+
}
|
|
42014
|
+
function checkValidUrl(url) {
|
|
42015
|
+
var pattern = /^(https?|ftp):\/\/[^\s/$.?#].[^\s]*$/;
|
|
42016
|
+
if (!url || url.length > 1000 || url.trim().length <= 0 || !pattern.test(url)) return false;
|
|
42017
|
+
return true;
|
|
42018
|
+
}
|
|
42019
|
+
function validateNumber() {
|
|
42020
|
+
let value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
42021
|
+
var numberRex = new RegExp('^[0-9]+$');
|
|
42022
|
+
if (numberRex.test(String(value))) {
|
|
42023
|
+
return true;
|
|
42024
|
+
}
|
|
42025
|
+
return false;
|
|
42026
|
+
}
|
|
42027
|
+
|
|
42028
|
+
/**
|
|
42029
|
+
* Available filter operation types
|
|
42030
|
+
*/
|
|
42031
|
+
var FilterOperationType;
|
|
42032
|
+
(function (FilterOperationType) {
|
|
42033
|
+
FilterOperationType["EQ"] = "eq";
|
|
42034
|
+
FilterOperationType["CONTAINS"] = "contains";
|
|
42035
|
+
FilterOperationType["STARTSWITH"] = "startswith";
|
|
42036
|
+
FilterOperationType["ENDSWITH"] = "endswith";
|
|
42037
|
+
FilterOperationType["GT"] = "gt";
|
|
42038
|
+
FilterOperationType["GTE"] = "gte";
|
|
42039
|
+
FilterOperationType["LT"] = "lt";
|
|
42040
|
+
FilterOperationType["LTE"] = "lte";
|
|
42041
|
+
FilterOperationType["IN"] = "in";
|
|
42042
|
+
FilterOperationType["BETWEEN"] = "between";
|
|
42043
|
+
FilterOperationType["NE"] = "ne";
|
|
42044
|
+
FilterOperationType["NOTCONTAINS"] = "notcontains";
|
|
42045
|
+
FilterOperationType["NOTIN"] = "notin";
|
|
42046
|
+
FilterOperationType["ISEMPTY"] = "isempty";
|
|
42047
|
+
FilterOperationType["CUSTOM"] = "custom";
|
|
42048
|
+
})(FilterOperationType || (FilterOperationType = {}));
|
|
42049
|
+
/**
|
|
42050
|
+
* Logical operators for combining filter conditions
|
|
42051
|
+
*/
|
|
42052
|
+
var LogicalOperatorType;
|
|
42053
|
+
(function (LogicalOperatorType) {
|
|
42054
|
+
LogicalOperatorType["AND"] = "and";
|
|
42055
|
+
LogicalOperatorType["OR"] = "or";
|
|
42056
|
+
LogicalOperatorType["NOT"] = "not";
|
|
42057
|
+
})(LogicalOperatorType || (LogicalOperatorType = {}));
|
|
42058
|
+
/**
|
|
42059
|
+
* Converts an array of filter objects to a string condition
|
|
42060
|
+
* @param filters - Array of objects with key, value, and type properties
|
|
42061
|
+
* @param defaultOperator - Default logical operator to use when combining filters (AND or OR)
|
|
42062
|
+
* @returns Object with a 'condition' property containing the string condition and optional 'params' array
|
|
42063
|
+
*/
|
|
42064
|
+
function convertArrayFiltersToCondition(filters) {
|
|
42065
|
+
let defaultOperator = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : LogicalOperatorType.AND;
|
|
42066
|
+
// If there are no filters, return null
|
|
42067
|
+
if (!filters || filters.length === 0) {
|
|
42068
|
+
return null;
|
|
42069
|
+
}
|
|
42070
|
+
const conditions = [];
|
|
42071
|
+
const params = [];
|
|
42072
|
+
filters.forEach(_ref => {
|
|
42073
|
+
let {
|
|
42074
|
+
key,
|
|
42075
|
+
value,
|
|
42076
|
+
type,
|
|
42077
|
+
isArray
|
|
42078
|
+
} = _ref;
|
|
42079
|
+
// Skip this filter if value is empty or undefined, except for ISEMPTY type which doesn't need a value
|
|
42080
|
+
const typeStr = typeof type === 'string' ? type.toLowerCase() : type;
|
|
42081
|
+
if (typeStr !== FilterOperationType.ISEMPTY && (value === undefined || value === '' || value === null)) {
|
|
42082
|
+
return;
|
|
42083
|
+
}
|
|
42084
|
+
let condition;
|
|
42085
|
+
// Handle isArray flag - if true, use Contains with parameter reference
|
|
42086
|
+
if (isArray === true) {
|
|
42087
|
+
// Format the value as a comma-separated string if it's an array
|
|
42088
|
+
const paramValue = Array.isArray(value) ? value.join(',') : value;
|
|
42089
|
+
// Add formatted value to params array and use parameterized reference
|
|
42090
|
+
params.push(paramValue);
|
|
42091
|
+
condition = "@".concat(params.length - 1, ".Contains(").concat(key, ")");
|
|
42092
|
+
} else {
|
|
42093
|
+
switch (typeStr) {
|
|
42094
|
+
case FilterOperationType.EQ:
|
|
42095
|
+
// Handle equality operator
|
|
42096
|
+
condition = "".concat(key, "=\"").concat(value, "\"");
|
|
42097
|
+
break;
|
|
42098
|
+
case FilterOperationType.CONTAINS:
|
|
42099
|
+
// Handle contains operator (capitalized for specific API format)
|
|
42100
|
+
condition = "".concat(key, ".Contains(\"").concat(value, "\")");
|
|
42101
|
+
break;
|
|
42102
|
+
case FilterOperationType.STARTSWITH:
|
|
42103
|
+
condition = "".concat(key, ".StartsWith(\"").concat(value, "\")");
|
|
42104
|
+
break;
|
|
42105
|
+
case FilterOperationType.ENDSWITH:
|
|
42106
|
+
condition = "".concat(key, ".EndsWith(\"").concat(value, "\")");
|
|
42107
|
+
break;
|
|
42108
|
+
case FilterOperationType.GT:
|
|
42109
|
+
condition = "".concat(key, ">").concat(value);
|
|
42110
|
+
break;
|
|
42111
|
+
case FilterOperationType.GTE:
|
|
42112
|
+
condition = "".concat(key, ">=").concat(value);
|
|
42113
|
+
break;
|
|
42114
|
+
case FilterOperationType.LT:
|
|
42115
|
+
condition = "".concat(key, "<").concat(value);
|
|
42116
|
+
break;
|
|
42117
|
+
case FilterOperationType.LTE:
|
|
42118
|
+
condition = "".concat(key, "<=").concat(value);
|
|
42119
|
+
break;
|
|
42120
|
+
case FilterOperationType.ISEMPTY:
|
|
42121
|
+
// Special handling for empty string/null checking
|
|
42122
|
+
condition = "".concat(key, " == string.Empty");
|
|
42123
|
+
break;
|
|
42124
|
+
case FilterOperationType.IN:
|
|
42125
|
+
// For array values
|
|
42126
|
+
if (Array.isArray(value)) {
|
|
42127
|
+
condition = "".concat(key, " IN (").concat(value.map(v => typeof v === 'string' ? "\"".concat(v, "\"") : v).join(', '), ")");
|
|
42128
|
+
} else {
|
|
42129
|
+
condition = "".concat(key, " IN (\"").concat(value, "\")");
|
|
42130
|
+
}
|
|
42131
|
+
break;
|
|
42132
|
+
case FilterOperationType.BETWEEN:
|
|
42133
|
+
// For range values - value should be an array with 2 elements
|
|
42134
|
+
if (Array.isArray(value) && value.length === 2) {
|
|
42135
|
+
condition = "(".concat(key, " >= ").concat(value[0], " && ").concat(key, " <= ").concat(value[1], ")");
|
|
42136
|
+
} else {
|
|
42137
|
+
condition = "".concat(key, " BETWEEN ").concat(value);
|
|
42138
|
+
}
|
|
42139
|
+
break;
|
|
42140
|
+
case FilterOperationType.NE:
|
|
42141
|
+
condition = "".concat(key, "!=\"").concat(value, "\"");
|
|
42142
|
+
break;
|
|
42143
|
+
case FilterOperationType.NOTCONTAINS:
|
|
42144
|
+
condition = "!".concat(key, ".Contains(\"").concat(value, "\")");
|
|
42145
|
+
break;
|
|
42146
|
+
case FilterOperationType.NOTIN:
|
|
42147
|
+
if (Array.isArray(value)) {
|
|
42148
|
+
condition = "".concat(key, " NOT IN (").concat(value.map(v => typeof v === 'string' ? "\"".concat(v, "\"") : v).join(', '), ")");
|
|
42149
|
+
} else {
|
|
42150
|
+
condition = "".concat(key, " NOT IN (\"").concat(value, "\")");
|
|
42151
|
+
}
|
|
42152
|
+
break;
|
|
42153
|
+
default:
|
|
42154
|
+
// For any unhandled operators, use a generic method call format
|
|
42155
|
+
const operatorName = typeof type === 'string' ? type : 'custom';
|
|
42156
|
+
condition = "".concat(key, ".").concat(operatorName, "(\"").concat(value, "\")");
|
|
42157
|
+
}
|
|
42158
|
+
}
|
|
42159
|
+
conditions.push(condition);
|
|
42160
|
+
});
|
|
42161
|
+
// Join all conditions with the specified operator
|
|
42162
|
+
const logicalOperator = defaultOperator === LogicalOperatorType.OR ? ' || ' : ' && ';
|
|
42163
|
+
const conditionString = conditions.join(logicalOperator);
|
|
42164
|
+
// If condition is empty, return null instead of an object
|
|
42165
|
+
if (conditionString === "") {
|
|
42166
|
+
return null;
|
|
42167
|
+
}
|
|
42168
|
+
const result = {
|
|
42169
|
+
condition: conditionString
|
|
42170
|
+
};
|
|
42171
|
+
// Only include params if we have any
|
|
42172
|
+
if (params.length > 0) {
|
|
42173
|
+
result.params = params;
|
|
42174
|
+
}
|
|
42175
|
+
return result;
|
|
42176
|
+
}
|
|
42177
|
+
/**
|
|
42178
|
+
* Processes a filter expression (item or group) and returns the condition string
|
|
42179
|
+
* @param expression - The filter expression to process
|
|
42180
|
+
* @param isRoot - Whether this is the root level expression
|
|
42181
|
+
* @param params - Array to collect parameters for parameterized queries
|
|
42182
|
+
* @returns The string representation of the filter condition
|
|
42183
|
+
*/
|
|
42184
|
+
function processFilterExpression(expression) {
|
|
42185
|
+
let isRoot = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
42186
|
+
let params = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
|
|
42187
|
+
// If it's a filter group with nested expressions
|
|
42188
|
+
if ('operator' in expression) {
|
|
42189
|
+
const group = expression;
|
|
42190
|
+
const conditions = [];
|
|
42191
|
+
// Process each filter in the group
|
|
42192
|
+
group.filters.forEach(filter => {
|
|
42193
|
+
const condition = processFilterExpression(filter, false, params);
|
|
42194
|
+
if (condition) {
|
|
42195
|
+
conditions.push(condition);
|
|
42196
|
+
}
|
|
42197
|
+
});
|
|
42198
|
+
// If no valid conditions, return empty string
|
|
42199
|
+
if (conditions.length === 0) {
|
|
42200
|
+
return '';
|
|
42201
|
+
}
|
|
42202
|
+
let result;
|
|
42203
|
+
// Based on the operator type, join the conditions accordingly
|
|
42204
|
+
switch (group.operator) {
|
|
42205
|
+
case LogicalOperatorType.OR:
|
|
42206
|
+
result = conditions.join(' || ');
|
|
42207
|
+
break;
|
|
42208
|
+
case LogicalOperatorType.NOT:
|
|
42209
|
+
// For 'not', we negate the conditions
|
|
42210
|
+
result = "!(".concat(conditions.join(' && '), ")");
|
|
42211
|
+
break;
|
|
42212
|
+
case LogicalOperatorType.AND:
|
|
42213
|
+
default:
|
|
42214
|
+
result = conditions.join(' && ');
|
|
42215
|
+
// Default to AND
|
|
42216
|
+
}
|
|
42217
|
+
// Wrap in parentheses to maintain correct operator precedence, but skip for root level
|
|
42218
|
+
return !isRoot && conditions.length > 1 ? "(".concat(result, ")") : result;
|
|
42219
|
+
}
|
|
42220
|
+
// It's a simple filter item
|
|
42221
|
+
const item = expression;
|
|
42222
|
+
const {
|
|
42223
|
+
key,
|
|
42224
|
+
value,
|
|
42225
|
+
type,
|
|
42226
|
+
isArray
|
|
42227
|
+
} = item;
|
|
42228
|
+
// Skip this filter if value is empty or undefined, except for ISEMPTY type which doesn't need a value
|
|
42229
|
+
const typeStr = typeof type === 'string' ? type.toLowerCase() : type;
|
|
42230
|
+
if (typeStr !== FilterOperationType.ISEMPTY && (value === undefined || value === '' || value === null)) {
|
|
42231
|
+
return '';
|
|
42232
|
+
}
|
|
42233
|
+
// Handle isArray flag - if true, use Contains with parameter reference
|
|
42234
|
+
if (isArray === true) {
|
|
42235
|
+
// Format the value as a comma-separated string if it's an array
|
|
42236
|
+
const paramValue = Array.isArray(value) ? value.join(',') : value;
|
|
42237
|
+
// Add formatted value to params array and use parameterized reference
|
|
42238
|
+
params.push(paramValue);
|
|
42239
|
+
return "@".concat(params.length - 1, ".Contains(").concat(key, ")");
|
|
42240
|
+
}
|
|
42241
|
+
switch (typeStr) {
|
|
42242
|
+
case FilterOperationType.EQ:
|
|
42243
|
+
return "".concat(key, "=\"").concat(value, "\"");
|
|
42244
|
+
case FilterOperationType.CONTAINS:
|
|
42245
|
+
return "".concat(key, ".Contains(\"").concat(value, "\")");
|
|
42246
|
+
case FilterOperationType.STARTSWITH:
|
|
42247
|
+
return "".concat(key, ".StartsWith(\"").concat(value, "\")");
|
|
42248
|
+
case FilterOperationType.ENDSWITH:
|
|
42249
|
+
return "".concat(key, ".EndsWith(\"").concat(value, "\")");
|
|
42250
|
+
case FilterOperationType.GT:
|
|
42251
|
+
return "".concat(key, ">").concat(value);
|
|
42252
|
+
case FilterOperationType.GTE:
|
|
42253
|
+
return "".concat(key, ">=").concat(value);
|
|
42254
|
+
case FilterOperationType.LT:
|
|
42255
|
+
return "".concat(key, "<").concat(value);
|
|
42256
|
+
case FilterOperationType.LTE:
|
|
42257
|
+
return "".concat(key, "<=").concat(value);
|
|
42258
|
+
case FilterOperationType.ISEMPTY:
|
|
42259
|
+
return "".concat(key, " == string.Empty");
|
|
42260
|
+
case FilterOperationType.IN:
|
|
42261
|
+
if (Array.isArray(value)) {
|
|
42262
|
+
return "".concat(key, " IN (").concat(value.map(v => typeof v === 'string' ? "\"".concat(v, "\"") : v).join(', '), ")");
|
|
42263
|
+
} else {
|
|
42264
|
+
return "".concat(key, " IN (\"").concat(value, "\")");
|
|
42265
|
+
}
|
|
42266
|
+
case FilterOperationType.BETWEEN:
|
|
42267
|
+
if (Array.isArray(value) && value.length === 2) {
|
|
42268
|
+
return "(".concat(key, " >= ").concat(value[0], " && ").concat(key, " <= ").concat(value[1], ")");
|
|
42269
|
+
} else {
|
|
42270
|
+
return "".concat(key, " BETWEEN ").concat(value);
|
|
42271
|
+
}
|
|
42272
|
+
case FilterOperationType.NE:
|
|
42273
|
+
return "".concat(key, "!=\"").concat(value, "\"");
|
|
42274
|
+
case FilterOperationType.NOTCONTAINS:
|
|
42275
|
+
return "!".concat(key, ".Contains(\"").concat(value, "\")");
|
|
42276
|
+
case FilterOperationType.NOTIN:
|
|
42277
|
+
if (Array.isArray(value)) {
|
|
42278
|
+
return "".concat(key, " NOT IN (").concat(value.map(v => typeof v === 'string' ? "\"".concat(v, "\"") : v).join(', '), ")");
|
|
42279
|
+
} else {
|
|
42280
|
+
return "".concat(key, " NOT IN (\"").concat(value, "\")");
|
|
42281
|
+
}
|
|
42282
|
+
default:
|
|
42283
|
+
const operatorName = typeof type === 'string' ? type : 'custom';
|
|
42284
|
+
return "".concat(key, ".").concat(operatorName, "(\"").concat(value, "\")");
|
|
42285
|
+
}
|
|
42286
|
+
}
|
|
42287
|
+
/**
|
|
42288
|
+
* Converts a complex filter expression to a string condition
|
|
42289
|
+
* @param filterExpression - Filter expression (can be nested with logical operators)
|
|
42290
|
+
* @returns Object with a 'condition' property containing the string condition and optional 'params' array
|
|
42291
|
+
*/
|
|
42292
|
+
function convertFilterExpressionToCondition(filterExpression) {
|
|
42293
|
+
const params = [];
|
|
42294
|
+
const conditionString = processFilterExpression(filterExpression, true, params);
|
|
42295
|
+
// If condition is empty, return null instead of an object
|
|
42296
|
+
if (!conditionString) {
|
|
42297
|
+
return null;
|
|
42298
|
+
}
|
|
42299
|
+
const result = {
|
|
42300
|
+
condition: conditionString
|
|
42301
|
+
};
|
|
42302
|
+
// Only include params if we have any
|
|
42303
|
+
if (params.length > 0) {
|
|
42304
|
+
result.params = params;
|
|
42305
|
+
}
|
|
42306
|
+
return result;
|
|
42307
|
+
}
|
|
42308
|
+
/**
|
|
42309
|
+
* Usage examples:
|
|
42310
|
+
* * Simple filter with AND:
|
|
42311
|
+
* ```typescript
|
|
42312
|
+
* const filters: FilterItem[] = [
|
|
42313
|
+
* { key: 'name', value: 'John', type: FilterOperationType.CONTAINS },
|
|
42314
|
+
* { key: 'age', value: 30, type: FilterOperationType.GTE }
|
|
42315
|
+
* ];
|
|
42316
|
+
* const result = convertArrayFiltersToCondition(filters); // name.Contains("John") && age>=30
|
|
42317
|
+
* ```
|
|
42318
|
+
*
|
|
42319
|
+
* Simple filter with OR:
|
|
42320
|
+
* ```typescript
|
|
42321
|
+
* const filters: FilterItem[] = [
|
|
42322
|
+
* { key: 'status', value: 'active', type: FilterOperationType.EQ },
|
|
42323
|
+
* { key: 'status', value: 'pending', type: FilterOperationType.EQ }
|
|
42324
|
+
* ];
|
|
42325
|
+
* const result = convertArrayFiltersToCondition(filters, LogicalOperatorType.OR); // status="active" || status="pending"
|
|
42326
|
+
* ```
|
|
42327
|
+
*
|
|
42328
|
+
* Filter with isArray property:
|
|
42329
|
+
* ```typescript
|
|
42330
|
+
* const filters: FilterItem[] = [
|
|
42331
|
+
* { key: 'objectTypeCode', value: 'OBJECTFILTER', type: FilterOperationType.EQ, isArray: false },
|
|
42332
|
+
* { key: 'name', value: 'Long', type: FilterOperationType.EQ, isArray: true },
|
|
42333
|
+
* ];
|
|
42334
|
+
* const result = convertArrayFiltersToCondition(filters);
|
|
42335
|
+
* // Returns: { condition: 'objectTypeCode="OBJECTFILTER" && @0.Contains(name)', params: ["Long"] }
|
|
42336
|
+
* ```
|
|
42337
|
+
*
|
|
42338
|
+
* Filter with isArray and array values:
|
|
42339
|
+
* ```typescript
|
|
42340
|
+
* const filters: FilterItem[] = [
|
|
42341
|
+
* { key: 'id', value: [1, 2, 3], type: FilterOperationType.EQ, isArray: true },
|
|
42342
|
+
* { key: 'names', value: ['name1', 'name2', 'name3'], type: FilterOperationType.EQ, isArray: true },
|
|
42343
|
+
* ];
|
|
42344
|
+
* const result = convertArrayFiltersToCondition(filters);
|
|
42345
|
+
* // Returns: { condition: '@0.Contains(id) && @1.Contains(names)', params: ["1,2,3", "name1,name2,name3"] }
|
|
42346
|
+
* ```
|
|
42347
|
+
*
|
|
42348
|
+
* Complex nested filter:
|
|
42349
|
+
* ```typescript
|
|
42350
|
+
* const complexFilter: FilterGroup = {
|
|
42351
|
+
* operator: LogicalOperatorType.AND,
|
|
42352
|
+
* filters: [
|
|
42353
|
+
* { key: 'name', value: 'John', type: FilterOperationType.CONTAINS },
|
|
42354
|
+
* {
|
|
42355
|
+
* operator: LogicalOperatorType.OR,
|
|
42356
|
+
* filters: [
|
|
42357
|
+
* { key: 'age', value: 30, type: FilterOperationType.GTE },
|
|
42358
|
+
* { key: 'vip', value: true, type: FilterOperationType.EQ }
|
|
42359
|
+
* ]
|
|
42360
|
+
* },
|
|
42361
|
+
* {
|
|
42362
|
+
* operator: LogicalOperatorType.NOT,
|
|
42363
|
+
* filters: [
|
|
42364
|
+
* { key: 'status', value: 'inactive', type: FilterOperationType.EQ }
|
|
42365
|
+
* ]
|
|
42366
|
+
* }
|
|
42367
|
+
* ]
|
|
42368
|
+
* };
|
|
42369
|
+
* const result = convertFilterExpressionToCondition(complexFilter);
|
|
42370
|
+
* // name.Contains("John") && (age>=30 || vip="true") && !(status="inactive")
|
|
42371
|
+
* ```
|
|
42372
|
+
*
|
|
42373
|
+
* Complex filter with parameterized values:
|
|
42374
|
+
* ```typescript
|
|
42375
|
+
* const complexFilter: FilterGroup = {
|
|
42376
|
+
* operator: LogicalOperatorType.AND,
|
|
42377
|
+
* filters: [
|
|
42378
|
+
* { key: 'objectTypeCode', value: 'OBJECTFILTER', type: FilterOperationType.EQ },
|
|
42379
|
+
* { key: 'name', value: 'Long', type: FilterOperationType.EQ, isArray: true }
|
|
42380
|
+
* ]
|
|
42381
|
+
* };
|
|
42382
|
+
* const result = convertFilterExpressionToCondition(complexFilter);
|
|
42383
|
+
* // Returns: { condition: 'objectTypeCode="OBJECTFILTER" && @0.Contains(name)', params: ["Long"] }
|
|
42384
|
+
* ```
|
|
42385
|
+
*
|
|
42386
|
+
* Complex filter with array values:
|
|
42387
|
+
* ```typescript
|
|
42388
|
+
* const complexFilter: FilterGroup = {
|
|
42389
|
+
* operator: LogicalOperatorType.AND,
|
|
42390
|
+
* filters: [
|
|
42391
|
+
* { key: 'objectTypeCode', value: 'OBJECTFILTER', type: FilterOperationType.EQ },
|
|
42392
|
+
* { key: 'id', value: [1, 2], type: FilterOperationType.EQ, isArray: true },
|
|
42393
|
+
* { key: 'name', value: ['name1', 'name2'], type: FilterOperationType.EQ, isArray: true }
|
|
42394
|
+
* ]
|
|
42395
|
+
* };
|
|
42396
|
+
* const result = convertFilterExpressionToCondition(complexFilter);
|
|
42397
|
+
* // Returns: {
|
|
42398
|
+
* // condition: 'objectTypeCode="OBJECTFILTER" && @0.Contains(id) && @1.Contains(name)',
|
|
42399
|
+
* // params: ["1,2", "name1,name2"]
|
|
42400
|
+
* // }
|
|
42401
|
+
* ```
|
|
42402
|
+
*
|
|
42403
|
+
* Example with ISEMPTY check:
|
|
42404
|
+
* ```typescript
|
|
42405
|
+
* const complexFilter: FilterGroup = {
|
|
42406
|
+
* operator: LogicalOperatorType.AND,
|
|
42407
|
+
* filters: [
|
|
42408
|
+
* {
|
|
42409
|
+
* operator: LogicalOperatorType.OR,
|
|
42410
|
+
* filters: [
|
|
42411
|
+
* { key: 'apControllerCode', value: 'aerohive', type: FilterOperationType.CONTAINS },
|
|
42412
|
+
* { key: 'apControllerCode', type: FilterOperationType.ISEMPTY }
|
|
42413
|
+
* ]
|
|
42414
|
+
* },
|
|
42415
|
+
* { key: 'authenticationMethodCode', value: 'standard', type: FilterOperationType.CONTAINS }
|
|
42416
|
+
* ]
|
|
42417
|
+
* };
|
|
42418
|
+
* const result = convertFilterExpressionToCondition(complexFilter);
|
|
42419
|
+
* // Returns: { condition: '(apControllerCode.Contains("aerohive") || apControllerCode == string.Empty) && authenticationMethodCode.Contains("standard")' }
|
|
42420
|
+
* ```
|
|
42421
|
+
*/
|
|
42422
|
+
|
|
41602
42423
|
function ButtonSelect(props) {
|
|
41603
42424
|
const {
|
|
41604
42425
|
elementId,
|
|
@@ -41742,7 +42563,7 @@ function getSvgIconUtilityClass(slot) {
|
|
|
41742
42563
|
}
|
|
41743
42564
|
generateUtilityClasses('MuiSvgIcon', ['root', 'colorPrimary', 'colorSecondary', 'colorAction', 'colorError', 'colorDisabled', 'fontSizeInherit', 'fontSizeSmall', 'fontSizeMedium', 'fontSizeLarge']);
|
|
41744
42565
|
|
|
41745
|
-
const useUtilityClasses$
|
|
42566
|
+
const useUtilityClasses$_ = ownerState => {
|
|
41746
42567
|
const {
|
|
41747
42568
|
color,
|
|
41748
42569
|
fontSize,
|
|
@@ -41872,7 +42693,7 @@ const SvgIcon = /*#__PURE__*/React.forwardRef(function SvgIcon(inProps, ref) {
|
|
|
41872
42693
|
if (!inheritViewBox) {
|
|
41873
42694
|
more.viewBox = viewBox;
|
|
41874
42695
|
}
|
|
41875
|
-
const classes = useUtilityClasses$
|
|
42696
|
+
const classes = useUtilityClasses$_(ownerState);
|
|
41876
42697
|
return /*#__PURE__*/jsxRuntimeExports.jsxs(SvgIconRoot, {
|
|
41877
42698
|
as: component,
|
|
41878
42699
|
className: clsx(classes.root, className),
|
|
@@ -43636,7 +44457,7 @@ const ButtonDateRangePicker = props => {
|
|
|
43636
44457
|
},
|
|
43637
44458
|
children: jsxRuntimeExports.jsx(Paper$1, {
|
|
43638
44459
|
elevation: 8,
|
|
43639
|
-
children: jsxRuntimeExports.jsx(ClickAwayListener, {
|
|
44460
|
+
children: jsxRuntimeExports.jsx(ClickAwayListener$1, {
|
|
43640
44461
|
onClickAway: handleClose,
|
|
43641
44462
|
children: jsxRuntimeExports.jsxs(Box$1, {
|
|
43642
44463
|
style: {
|
|
@@ -44337,7 +45158,7 @@ function DirectoryTree(props) {
|
|
|
44337
45158
|
anchorEl: anchorEl,
|
|
44338
45159
|
placement: "bottom-start",
|
|
44339
45160
|
className: classes.popper,
|
|
44340
|
-
children: jsxRuntimeExports.jsx(ClickAwayListener, {
|
|
45161
|
+
children: jsxRuntimeExports.jsx(ClickAwayListener$1, {
|
|
44341
45162
|
onClickAway: handleClose,
|
|
44342
45163
|
children: jsxRuntimeExports.jsxs("div", {
|
|
44343
45164
|
children: [jsxRuntimeExports.jsx("div", {
|
|
@@ -44358,827 +45179,6 @@ function DirectoryTree(props) {
|
|
|
44358
45179
|
});
|
|
44359
45180
|
}
|
|
44360
45181
|
|
|
44361
|
-
/**
|
|
44362
|
-
* Get the value of a cookie
|
|
44363
|
-
* Source: https://vanillajstoolkit.com/helpers/getcookie/
|
|
44364
|
-
* @param name - The name of the cookie
|
|
44365
|
-
* @return The cookie value
|
|
44366
|
-
*/
|
|
44367
|
-
function getCookie(name) {
|
|
44368
|
-
if (typeof document !== 'undefined') {
|
|
44369
|
-
const value = "; ".concat(document.cookie);
|
|
44370
|
-
const parts = value.split("; ".concat(name, "="));
|
|
44371
|
-
if (parts.length === 2) {
|
|
44372
|
-
return parts[1].split(';').shift();
|
|
44373
|
-
}
|
|
44374
|
-
}
|
|
44375
|
-
return undefined;
|
|
44376
|
-
}
|
|
44377
|
-
function getQueryVariable(variable) {
|
|
44378
|
-
var query = window.location.search.substring(1);
|
|
44379
|
-
var vars = query.split('&');
|
|
44380
|
-
for (var i = 0; i < vars.length; i++) {
|
|
44381
|
-
var pair = vars[i].split('=');
|
|
44382
|
-
if (pair[0] === variable) {
|
|
44383
|
-
return pair[1];
|
|
44384
|
-
}
|
|
44385
|
-
}
|
|
44386
|
-
return '';
|
|
44387
|
-
}
|
|
44388
|
-
function generateUUID() {
|
|
44389
|
-
// Public Domain/MIT
|
|
44390
|
-
var d = new Date().getTime(); //Timestamp
|
|
44391
|
-
var d2 = typeof performance !== 'undefined' && performance.now && performance.now() * 1000 || 0; //Time in microseconds since page-load or 0 if unsupported
|
|
44392
|
-
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
|
|
44393
|
-
var r = Math.random() * 16; //random number between 0 and 16
|
|
44394
|
-
if (d > 0) {
|
|
44395
|
-
//Use timestamp until depleted
|
|
44396
|
-
r = (d + r) % 16 | 0;
|
|
44397
|
-
d = Math.floor(d / 16);
|
|
44398
|
-
} else {
|
|
44399
|
-
//Use microseconds since page-load if supported
|
|
44400
|
-
r = (d2 + r) % 16 | 0;
|
|
44401
|
-
d2 = Math.floor(d2 / 16);
|
|
44402
|
-
}
|
|
44403
|
-
return (c === 'x' ? r : r & 0x3 | 0x8).toString(16);
|
|
44404
|
-
});
|
|
44405
|
-
}
|
|
44406
|
-
const getRoutePath = (location, params) => {
|
|
44407
|
-
const {
|
|
44408
|
-
pathname
|
|
44409
|
-
} = location;
|
|
44410
|
-
if (!Object.keys(params).length) {
|
|
44411
|
-
return pathname; // we don't need to replace anything
|
|
44412
|
-
}
|
|
44413
|
-
let path = pathname;
|
|
44414
|
-
Object.entries(params).forEach(_ref => {
|
|
44415
|
-
let [paramName, paramValue] = _ref;
|
|
44416
|
-
if (paramValue) {
|
|
44417
|
-
path = path.replace(paramValue, ":".concat(paramName));
|
|
44418
|
-
}
|
|
44419
|
-
});
|
|
44420
|
-
return path;
|
|
44421
|
-
};
|
|
44422
|
-
const offlinePaginate = (array, pageIndex, pageSize) => [...array].slice(pageIndex * pageSize, (pageIndex + 1) * pageSize);
|
|
44423
|
-
|
|
44424
|
-
/**
|
|
44425
|
-
* Xử lý dữ liệu dạng mảng hoặc object một cách đơn giản và hiệu quả.
|
|
44426
|
-
* Tăng cường khả năng thao tác với danh sách dữ liệu.
|
|
44427
|
-
*/
|
|
44428
|
-
function convertArrayToObject(array, keyName) {
|
|
44429
|
-
return array === null || array === void 0 ? void 0 : array.reduce((obj, item, _index) => {
|
|
44430
|
-
return Object.assign(Object.assign({}, obj), {
|
|
44431
|
-
[item[keyName]]: Object.assign({}, item)
|
|
44432
|
-
});
|
|
44433
|
-
}, {});
|
|
44434
|
-
}
|
|
44435
|
-
const convertDataSetPattern = data => {
|
|
44436
|
-
const ctr = data === null || data === void 0 ? void 0 : data.map(item => item.ctr);
|
|
44437
|
-
const numberOfConnections = data === null || data === void 0 ? void 0 : data.map(item => item.click);
|
|
44438
|
-
const impressions = data === null || data === void 0 ? void 0 : data.map(item => item.view);
|
|
44439
|
-
return [{
|
|
44440
|
-
data: ctr,
|
|
44441
|
-
label: i18n.t('Statistics.CTR'),
|
|
44442
|
-
type: 'bar',
|
|
44443
|
-
color: 'rgb(128, 176, 255)'
|
|
44444
|
-
}, {
|
|
44445
|
-
data: numberOfConnections,
|
|
44446
|
-
label: i18n.t('Statistics.NumberOfConnections'),
|
|
44447
|
-
type: 'line',
|
|
44448
|
-
color: 'rgb(0, 85, 184)'
|
|
44449
|
-
}, {
|
|
44450
|
-
data: impressions,
|
|
44451
|
-
label: i18n.t('Statistics.Impressions'),
|
|
44452
|
-
type: 'line',
|
|
44453
|
-
color: 'rgb(221, 4, 12)'
|
|
44454
|
-
}];
|
|
44455
|
-
};
|
|
44456
|
-
const updateObjectFields = (originalObj, changedValues) => {
|
|
44457
|
-
// Create a copy of the original object
|
|
44458
|
-
const updatedObject = Object.assign({}, originalObj);
|
|
44459
|
-
// Recursive function to update nested fields
|
|
44460
|
-
const updateNestedFields = (obj, changes) => {
|
|
44461
|
-
for (const [key, value] of Object.entries(changes)) {
|
|
44462
|
-
// Check if the field exists in the original object
|
|
44463
|
-
if (obj.hasOwnProperty(key)) {
|
|
44464
|
-
// If the field is an object, recursively update nested fields
|
|
44465
|
-
if (typeof obj[key] === 'object' && typeof value === 'object') {
|
|
44466
|
-
updateNestedFields(obj[key], value);
|
|
44467
|
-
} else {
|
|
44468
|
-
// Otherwise, update the field value
|
|
44469
|
-
obj[key] = value;
|
|
44470
|
-
}
|
|
44471
|
-
} else {
|
|
44472
|
-
obj[key] = value;
|
|
44473
|
-
}
|
|
44474
|
-
}
|
|
44475
|
-
};
|
|
44476
|
-
// Update nested fields
|
|
44477
|
-
updateNestedFields(updatedObject, changedValues);
|
|
44478
|
-
return updatedObject;
|
|
44479
|
-
};
|
|
44480
|
-
function formatChartNumber(val, language) {
|
|
44481
|
-
if (!val) return '0';
|
|
44482
|
-
if (val === '-') {
|
|
44483
|
-
return '-';
|
|
44484
|
-
}
|
|
44485
|
-
const temp = Math.round(Number(val) * 100) / 100;
|
|
44486
|
-
let formatValue = formatNumberWithLanguage(temp, language);
|
|
44487
|
-
return formatValue;
|
|
44488
|
-
}
|
|
44489
|
-
const setObject = (obj, arrKey, value) => {
|
|
44490
|
-
lodashExports.set(obj, arrKey.reduce((acc, val) => acc + '[' + val + ']', ''), value);
|
|
44491
|
-
};
|
|
44492
|
-
//AWING_[NAME FEATURE]_[OBJECT_NAME]_[SUB_TITLE]_[DATEFORMAT yyyy-MM-DD]
|
|
44493
|
-
function nameExportStandard(nameFeature, objectName, subTitle) {
|
|
44494
|
-
const currentTime = moment().format('YYYY-MM-DD');
|
|
44495
|
-
const parts = [nameFeature, objectName, subTitle, currentTime].filter(Boolean);
|
|
44496
|
-
return "AWING_".concat(parts.join('_').toUpperCase());
|
|
44497
|
-
}
|
|
44498
|
-
const formatJSON$1 = val => {
|
|
44499
|
-
try {
|
|
44500
|
-
const res = JSON.parse(val);
|
|
44501
|
-
return JSON.stringify(res, null, 2);
|
|
44502
|
-
} catch (_a) {
|
|
44503
|
-
return val;
|
|
44504
|
-
}
|
|
44505
|
-
};
|
|
44506
|
-
|
|
44507
|
-
var TIMELINE_TYPE;
|
|
44508
|
-
(function (TIMELINE_TYPE) {
|
|
44509
|
-
TIMELINE_TYPE[TIMELINE_TYPE["HOUR"] = 0] = "HOUR";
|
|
44510
|
-
TIMELINE_TYPE[TIMELINE_TYPE["DAY"] = 1] = "DAY";
|
|
44511
|
-
})(TIMELINE_TYPE || (TIMELINE_TYPE = {}));
|
|
44512
|
-
var SortEnumType;
|
|
44513
|
-
(function (SortEnumType) {
|
|
44514
|
-
SortEnumType["Asc"] = "ASC";
|
|
44515
|
-
SortEnumType["Desc"] = "DESC";
|
|
44516
|
-
})(SortEnumType || (SortEnumType = {}));
|
|
44517
|
-
var DataGridSortType;
|
|
44518
|
-
(function (DataGridSortType) {
|
|
44519
|
-
DataGridSortType["Asc"] = "ASC";
|
|
44520
|
-
DataGridSortType["Desc"] = "DESC";
|
|
44521
|
-
DataGridSortType["Ready"] = "READY";
|
|
44522
|
-
})(DataGridSortType || (DataGridSortType = {}));
|
|
44523
|
-
var DirectoryRoot;
|
|
44524
|
-
(function (DirectoryRoot) {
|
|
44525
|
-
DirectoryRoot["Directory"] = "directory";
|
|
44526
|
-
DirectoryRoot["Place"] = "place";
|
|
44527
|
-
DirectoryRoot["Workflow"] = "workflow";
|
|
44528
|
-
DirectoryRoot["Workflow_gate"] = "workflow_gate";
|
|
44529
|
-
DirectoryRoot["Workflow_scheme"] = "workflow_scheme";
|
|
44530
|
-
DirectoryRoot["Menu"] = "menu";
|
|
44531
|
-
DirectoryRoot["Storage"] = "storage";
|
|
44532
|
-
DirectoryRoot["Report"] = "report";
|
|
44533
|
-
DirectoryRoot["Group"] = "group";
|
|
44534
|
-
DirectoryRoot["Campaign"] = "campaign";
|
|
44535
|
-
DirectoryRoot["Page"] = "page";
|
|
44536
|
-
DirectoryRoot["PageWelcome"] = "pageWelcome";
|
|
44537
|
-
DirectoryRoot["PageLogin"] = "pageLogin";
|
|
44538
|
-
DirectoryRoot["PageGadget"] = "pageGadget";
|
|
44539
|
-
DirectoryRoot["PageHistory"] = "pageHistory";
|
|
44540
|
-
DirectoryRoot["CampaignCurrent"] = "campaignCurrent";
|
|
44541
|
-
DirectoryRoot["CampaignHistory"] = "campaignHistory";
|
|
44542
|
-
DirectoryRoot["Template"] = "template";
|
|
44543
|
-
DirectoryRoot["Layout"] = "layout";
|
|
44544
|
-
DirectoryRoot["Authentication_profile"] = "authentication_profile";
|
|
44545
|
-
DirectoryRoot["Archive"] = "archive";
|
|
44546
|
-
DirectoryRoot["Ap"] = "ap";
|
|
44547
|
-
DirectoryRoot["Place_group"] = "place_group";
|
|
44548
|
-
DirectoryRoot["Wizard"] = "wizard";
|
|
44549
|
-
DirectoryRoot["Campaign_collection"] = "campaign_collection";
|
|
44550
|
-
DirectoryRoot["Task_scheduler"] = "task_scheduler";
|
|
44551
|
-
})(DirectoryRoot || (DirectoryRoot = {}));
|
|
44552
|
-
var WorkspaceType;
|
|
44553
|
-
(function (WorkspaceType) {
|
|
44554
|
-
WorkspaceType["AXN"] = "AXN";
|
|
44555
|
-
WorkspaceType["ADMIN"] = "ADMIN";
|
|
44556
|
-
WorkspaceType["ACM"] = "ACM";
|
|
44557
|
-
})(WorkspaceType || (WorkspaceType = {}));
|
|
44558
|
-
|
|
44559
|
-
/**
|
|
44560
|
-
* Quản lý và xử lý thời gian, ngày tháng một cách tiện lợi và nhất quán.
|
|
44561
|
-
* Giảm thiểu lỗi khi thao tác với định dạng ngày giờ.
|
|
44562
|
-
*/
|
|
44563
|
-
function dateToString(date) {
|
|
44564
|
-
return moment(date).format('L');
|
|
44565
|
-
}
|
|
44566
|
-
function calculatorDirectoryIdRoot(directoriesTree) {
|
|
44567
|
-
let directoryId = 0;
|
|
44568
|
-
let minLevel = Number.POSITIVE_INFINITY;
|
|
44569
|
-
directoriesTree.forEach(directory => {
|
|
44570
|
-
if (directory.level < minLevel) {
|
|
44571
|
-
minLevel = directory.level;
|
|
44572
|
-
directoryId = directory.directoryId;
|
|
44573
|
-
}
|
|
44574
|
-
});
|
|
44575
|
-
return directoryId;
|
|
44576
|
-
}
|
|
44577
|
-
const convertTimeLine = value => {
|
|
44578
|
-
let dateTime = '';
|
|
44579
|
-
const hour = value.toString().substring(8, 10);
|
|
44580
|
-
if (hour) {
|
|
44581
|
-
dateTime += "".concat(hour, "h ");
|
|
44582
|
-
}
|
|
44583
|
-
const day = value.toString().substring(6, 8);
|
|
44584
|
-
if (day) {
|
|
44585
|
-
dateTime += "".concat(day, "-");
|
|
44586
|
-
}
|
|
44587
|
-
const month = value.toString().substring(4, 6);
|
|
44588
|
-
if (month) {
|
|
44589
|
-
dateTime += "".concat(month, "-");
|
|
44590
|
-
}
|
|
44591
|
-
const year = value.toString().substring(0, 4);
|
|
44592
|
-
if (year) {
|
|
44593
|
-
dateTime += "".concat(year);
|
|
44594
|
-
}
|
|
44595
|
-
// `${year}-${month}-${day}T${hour}`
|
|
44596
|
-
// return moment(dateTime).format("DD-MM").toString()
|
|
44597
|
-
return dateTime;
|
|
44598
|
-
};
|
|
44599
|
-
const convertDateTimeToTimestamp = date => {
|
|
44600
|
-
return {
|
|
44601
|
-
seconds: date.getTime() / 1000,
|
|
44602
|
-
nanos: 0
|
|
44603
|
-
};
|
|
44604
|
-
};
|
|
44605
|
-
const convertTimestampToDateTime = timestamp => {
|
|
44606
|
-
return moment.unix(Number(timestamp.seconds)).toDate();
|
|
44607
|
-
};
|
|
44608
|
-
const dateTimeToString = (dateTime, format) => {
|
|
44609
|
-
return moment(dateTime).format(format);
|
|
44610
|
-
};
|
|
44611
|
-
const convertTimelineToDateTime = (timeline, timelineType) => {
|
|
44612
|
-
let day = Number(timeline.toString().substring(6, 8));
|
|
44613
|
-
let month = Number(timeline.toString().substring(4, 6));
|
|
44614
|
-
let year = Number(timeline.toString().substring(0, 4));
|
|
44615
|
-
if (timelineType === TIMELINE_TYPE.HOUR) {
|
|
44616
|
-
let hours = Number(timeline.toString().substring(8, 10));
|
|
44617
|
-
return new Date(year, month - 1, day, hours);
|
|
44618
|
-
} else return new Date(year, month - 1, day);
|
|
44619
|
-
};
|
|
44620
|
-
// format: 'DD/MM/YYYY' => 07/02/2020
|
|
44621
|
-
function dateToStringDDMMYYYY(date) {
|
|
44622
|
-
if (!date) return null;
|
|
44623
|
-
const _date = new Date(date);
|
|
44624
|
-
// const _language = i18next.language || 'vi';
|
|
44625
|
-
const _language = 'en-GB';
|
|
44626
|
-
let options = {
|
|
44627
|
-
year: 'numeric',
|
|
44628
|
-
month: '2-digit',
|
|
44629
|
-
day: '2-digit'
|
|
44630
|
-
};
|
|
44631
|
-
return _date.toLocaleDateString("".concat(_language), options);
|
|
44632
|
-
}
|
|
44633
|
-
// format: 'DD/MM/YYYY' => 07/02/2020
|
|
44634
|
-
function timestampToStringDDMMYYYY(date) {
|
|
44635
|
-
if (!date) return null;
|
|
44636
|
-
// const _date = new Date(date.seconds * 1000);
|
|
44637
|
-
return dateToStringDDMMYYYY(new Date(date.seconds * 1000));
|
|
44638
|
-
}
|
|
44639
|
-
const getStartOfDay = dateTime => {
|
|
44640
|
-
let date = dateTime.getDate();
|
|
44641
|
-
let month = dateTime.getMonth();
|
|
44642
|
-
let year = dateTime.getFullYear();
|
|
44643
|
-
return new Date(year, month, date);
|
|
44644
|
-
};
|
|
44645
|
-
const getToday = () => {
|
|
44646
|
-
let result = new Date();
|
|
44647
|
-
result.setHours(0);
|
|
44648
|
-
result.setMinutes(0);
|
|
44649
|
-
result.setSeconds(0);
|
|
44650
|
-
result.setMilliseconds(0);
|
|
44651
|
-
return result;
|
|
44652
|
-
};
|
|
44653
|
-
function fillMissingDates(data) {
|
|
44654
|
-
let startDate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
|
44655
|
-
let endDate = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
|
|
44656
|
-
let format = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 'YYYYMMDD';
|
|
44657
|
-
const result = data.concat();
|
|
44658
|
-
// Parse the start and end dates
|
|
44659
|
-
const start = moment(isNaN(Number(startDate)) ? startDate : String(startDate)).startOf('day');
|
|
44660
|
-
const end = moment(isNaN(Number(endDate)) ? endDate : String(endDate)).endOf('day');
|
|
44661
|
-
if (start.isAfter(end)) throw new Error('Start date must be before end date');
|
|
44662
|
-
// Array to hold the complete range of dates
|
|
44663
|
-
let dates = [];
|
|
44664
|
-
// Iterate through the date range
|
|
44665
|
-
for (let m = moment(start); m.isSameOrBefore(end); m.add(1, format === 'YYYYMMDD' ? 'days' : 'hours')) {
|
|
44666
|
-
dates.push(m.format(format));
|
|
44667
|
-
}
|
|
44668
|
-
lodashExports.xor(data.map(d => d.x), dates).forEach(x => {
|
|
44669
|
-
result.push({
|
|
44670
|
-
x,
|
|
44671
|
-
y: 0
|
|
44672
|
-
});
|
|
44673
|
-
});
|
|
44674
|
-
return lodashExports.orderBy(Object.entries(lodashExports.groupBy(result, 'x')).map(_ref => {
|
|
44675
|
-
let [key, value] = _ref;
|
|
44676
|
-
return {
|
|
44677
|
-
x: key,
|
|
44678
|
-
y: lodashExports.sumBy(value, 'y')
|
|
44679
|
-
};
|
|
44680
|
-
}), ['x'], ['asc']);
|
|
44681
|
-
}
|
|
44682
|
-
function parseJSON(str) {
|
|
44683
|
-
try {
|
|
44684
|
-
return JSON.parse(str || '{}');
|
|
44685
|
-
} catch (e) {
|
|
44686
|
-
return str;
|
|
44687
|
-
}
|
|
44688
|
-
}
|
|
44689
|
-
|
|
44690
|
-
/**
|
|
44691
|
-
* Xử lý các thao tác số học và toán học một cách tiện lợi.
|
|
44692
|
-
* Hỗ trợ các phép toán phức tạp hoặc tối ưu hóa các logic tính toán thường dùng.
|
|
44693
|
-
*/
|
|
44694
|
-
function formatNumberByLocale(value, lang, locale) {
|
|
44695
|
-
const localesMap = {
|
|
44696
|
-
vi: 'vi-VN',
|
|
44697
|
-
en: 'en-US',
|
|
44698
|
-
ja: 'ja-JP',
|
|
44699
|
-
th: 'th-TH',
|
|
44700
|
-
id: 'id-ID',
|
|
44701
|
-
fil: 'fil-PH'
|
|
44702
|
-
};
|
|
44703
|
-
const currentLang = lang || localStorage.getItem('i18nextLng');
|
|
44704
|
-
if (value === undefined) return '';else if (currentLang && lodashExports.keysIn(localesMap).includes(currentLang)) return new Intl.NumberFormat(localesMap[currentLang]).format(value);else return new Intl.NumberFormat(locale).format(value);
|
|
44705
|
-
}
|
|
44706
|
-
function roundDecimalNumber(number) {
|
|
44707
|
-
if (typeof number !== 'number') return null;
|
|
44708
|
-
let str = JSON.stringify(Math.round(number * 1000000) / 1000000);
|
|
44709
|
-
let signIndex = str.indexOf('.');
|
|
44710
|
-
if (signIndex === -1) {
|
|
44711
|
-
return str.replace(/(\d)(?=(\d{3})+(?!\d))/g, '$1,');
|
|
44712
|
-
} else {
|
|
44713
|
-
return str.slice(0, signIndex).replace(/(\d)(?=(\d{3})+(?!\d))/g, '$1,') + str.slice(signIndex);
|
|
44714
|
-
}
|
|
44715
|
-
}
|
|
44716
|
-
function WMAPEcalculator(data) {
|
|
44717
|
-
// data là array có dạng [{estimate: number, reality: number},...]
|
|
44718
|
-
if (data.length > 0) {
|
|
44719
|
-
const numerator = data.reduce((acc, item) => Math.abs(item.reality - item.estimate) + acc, 0);
|
|
44720
|
-
const dinominator = data.reduce((acc, item) => item.reality + acc, 0);
|
|
44721
|
-
return dinominator === 0 ? numerator === 0 ? 0 : '∞' : numerator * 100 / dinominator;
|
|
44722
|
-
} else {
|
|
44723
|
-
return 0;
|
|
44724
|
-
}
|
|
44725
|
-
}
|
|
44726
|
-
|
|
44727
|
-
/**
|
|
44728
|
-
* Hỗ trợ xử lý chuỗi văn bản, từ việc định dạng, chuyển đổi cho đến kiểm tra tính hợp lệ.
|
|
44729
|
-
* Đảm bảo sự nhất quán và tái sử dụng các logic liên quan đến chuỗi.
|
|
44730
|
-
*/
|
|
44731
|
-
function changeToAlias() {
|
|
44732
|
-
let str = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
44733
|
-
// Chuyển toàn bộ Tiếng Việt sang không dấu viết thường và các kí tự đặc biệt thành dấu "-"
|
|
44734
|
-
return str.trim().normalize('NFD').toLowerCase().replace(/\s\s+/g, ' ').replace(/[\u0300-\u036f]/g, '').replace(/đ/g, 'd').replace(/`|~|!|@|"|#|\||\$|%|\^|&|\*|\(|\)|\+|=|,|\.|\/|\?|>|<|'|"|:|;|_/gi, '').replace(/ /g, '-').replace(/-----/gi, '-').replace(/----/gi, '-').replace(/---/gi, '-').replace(/--/gi, '-').replace(/"-|-"|"/gi, '');
|
|
44735
|
-
}
|
|
44736
|
-
const toCapitalize = function (str) {
|
|
44737
|
-
let lower = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
44738
|
-
return (lower ? str.toLowerCase() : str).replace(/(?:^|\s|["'([{])+\S/g, match => match.toUpperCase());
|
|
44739
|
-
};
|
|
44740
|
-
|
|
44741
|
-
/**
|
|
44742
|
-
* Đảm bảo dữ liệu được kiểm tra tính hợp lệ trước khi xử lý hoặc gửi đi.
|
|
44743
|
-
* Được sử dụng nhiều trong xử lý form, API, hoặc đầu vào từ người dùng.
|
|
44744
|
-
*/
|
|
44745
|
-
/**
|
|
44746
|
-
* check string list ap input
|
|
44747
|
-
*
|
|
44748
|
-
* @param {string} stringListAP
|
|
44749
|
-
* @returns {boolean}
|
|
44750
|
-
*/
|
|
44751
|
-
//Hàm này chỉ dùng bên ACM khi nào ai import hàm này move sang ACM nhé
|
|
44752
|
-
function checkValidStringListAP() {
|
|
44753
|
-
let stringListAP = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
44754
|
-
let isValid = true;
|
|
44755
|
-
const listAP = stringListAP.split('\n');
|
|
44756
|
-
listAP.every(ap => {
|
|
44757
|
-
const [macAp, nameAp] = ap.split(' ');
|
|
44758
|
-
const regexMacAddress = /^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})|([0-9a-fA-F]{4}\\.[0-9a-fA-F]{4}\\.[0-9a-fA-F]{4})$/g;
|
|
44759
|
-
// eslint-disable-next-line eqeqeq
|
|
44760
|
-
const isValidMacAddress = macAp == macAp.match(regexMacAddress);
|
|
44761
|
-
if (!isValidMacAddress || !nameAp || listAP.filter(item => item.includes(macAp)).length > 1) {
|
|
44762
|
-
isValid = false;
|
|
44763
|
-
}
|
|
44764
|
-
return isValid;
|
|
44765
|
-
});
|
|
44766
|
-
return !isValid;
|
|
44767
|
-
}
|
|
44768
|
-
function checkValidMacAddress() {
|
|
44769
|
-
let string = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
44770
|
-
const regexMacAddress = /^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})|([0-9a-fA-F]{4}\\.[0-9a-fA-F]{4}\\.[0-9a-fA-F]{4})$/g;
|
|
44771
|
-
return regexMacAddress.test(string);
|
|
44772
|
-
}
|
|
44773
|
-
function checkValidUrl(url) {
|
|
44774
|
-
var pattern = /^(https?|ftp):\/\/[^\s/$.?#].[^\s]*$/;
|
|
44775
|
-
if (!url || url.length > 1000 || url.trim().length <= 0 || !pattern.test(url)) return false;
|
|
44776
|
-
return true;
|
|
44777
|
-
}
|
|
44778
|
-
function validateNumber() {
|
|
44779
|
-
let value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
44780
|
-
var numberRex = new RegExp('^[0-9]+$');
|
|
44781
|
-
if (numberRex.test(String(value))) {
|
|
44782
|
-
return true;
|
|
44783
|
-
}
|
|
44784
|
-
return false;
|
|
44785
|
-
}
|
|
44786
|
-
|
|
44787
|
-
/**
|
|
44788
|
-
* Available filter operation types
|
|
44789
|
-
*/
|
|
44790
|
-
var FilterOperationType;
|
|
44791
|
-
(function (FilterOperationType) {
|
|
44792
|
-
FilterOperationType["EQ"] = "eq";
|
|
44793
|
-
FilterOperationType["CONTAINS"] = "contains";
|
|
44794
|
-
FilterOperationType["STARTSWITH"] = "startswith";
|
|
44795
|
-
FilterOperationType["ENDSWITH"] = "endswith";
|
|
44796
|
-
FilterOperationType["GT"] = "gt";
|
|
44797
|
-
FilterOperationType["GTE"] = "gte";
|
|
44798
|
-
FilterOperationType["LT"] = "lt";
|
|
44799
|
-
FilterOperationType["LTE"] = "lte";
|
|
44800
|
-
FilterOperationType["IN"] = "in";
|
|
44801
|
-
FilterOperationType["BETWEEN"] = "between";
|
|
44802
|
-
FilterOperationType["NE"] = "ne";
|
|
44803
|
-
FilterOperationType["NOTCONTAINS"] = "notcontains";
|
|
44804
|
-
FilterOperationType["NOTIN"] = "notin";
|
|
44805
|
-
FilterOperationType["ISEMPTY"] = "isempty";
|
|
44806
|
-
FilterOperationType["CUSTOM"] = "custom";
|
|
44807
|
-
})(FilterOperationType || (FilterOperationType = {}));
|
|
44808
|
-
/**
|
|
44809
|
-
* Logical operators for combining filter conditions
|
|
44810
|
-
*/
|
|
44811
|
-
var LogicalOperatorType;
|
|
44812
|
-
(function (LogicalOperatorType) {
|
|
44813
|
-
LogicalOperatorType["AND"] = "and";
|
|
44814
|
-
LogicalOperatorType["OR"] = "or";
|
|
44815
|
-
LogicalOperatorType["NOT"] = "not";
|
|
44816
|
-
})(LogicalOperatorType || (LogicalOperatorType = {}));
|
|
44817
|
-
/**
|
|
44818
|
-
* Converts an array of filter objects to a string condition
|
|
44819
|
-
* @param filters - Array of objects with key, value, and type properties
|
|
44820
|
-
* @param defaultOperator - Default logical operator to use when combining filters (AND or OR)
|
|
44821
|
-
* @returns Object with a 'condition' property containing the string condition and optional 'params' array
|
|
44822
|
-
*/
|
|
44823
|
-
function convertArrayFiltersToCondition(filters) {
|
|
44824
|
-
let defaultOperator = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : LogicalOperatorType.AND;
|
|
44825
|
-
// If there are no filters, return null
|
|
44826
|
-
if (!filters || filters.length === 0) {
|
|
44827
|
-
return null;
|
|
44828
|
-
}
|
|
44829
|
-
const conditions = [];
|
|
44830
|
-
const params = [];
|
|
44831
|
-
filters.forEach(_ref => {
|
|
44832
|
-
let {
|
|
44833
|
-
key,
|
|
44834
|
-
value,
|
|
44835
|
-
type,
|
|
44836
|
-
isArray
|
|
44837
|
-
} = _ref;
|
|
44838
|
-
// Skip this filter if value is empty or undefined, except for ISEMPTY type which doesn't need a value
|
|
44839
|
-
const typeStr = typeof type === 'string' ? type.toLowerCase() : type;
|
|
44840
|
-
if (typeStr !== FilterOperationType.ISEMPTY && (value === undefined || value === '' || value === null)) {
|
|
44841
|
-
return;
|
|
44842
|
-
}
|
|
44843
|
-
let condition;
|
|
44844
|
-
// Handle isArray flag - if true, use Contains with parameter reference
|
|
44845
|
-
if (isArray === true) {
|
|
44846
|
-
// Format the value as a comma-separated string if it's an array
|
|
44847
|
-
const paramValue = Array.isArray(value) ? value.join(',') : value;
|
|
44848
|
-
// Add formatted value to params array and use parameterized reference
|
|
44849
|
-
params.push(paramValue);
|
|
44850
|
-
condition = "@".concat(params.length - 1, ".Contains(").concat(key, ")");
|
|
44851
|
-
} else {
|
|
44852
|
-
switch (typeStr) {
|
|
44853
|
-
case FilterOperationType.EQ:
|
|
44854
|
-
// Handle equality operator
|
|
44855
|
-
condition = "".concat(key, "=\"").concat(value, "\"");
|
|
44856
|
-
break;
|
|
44857
|
-
case FilterOperationType.CONTAINS:
|
|
44858
|
-
// Handle contains operator (capitalized for specific API format)
|
|
44859
|
-
condition = "".concat(key, ".Contains(\"").concat(value, "\")");
|
|
44860
|
-
break;
|
|
44861
|
-
case FilterOperationType.STARTSWITH:
|
|
44862
|
-
condition = "".concat(key, ".StartsWith(\"").concat(value, "\")");
|
|
44863
|
-
break;
|
|
44864
|
-
case FilterOperationType.ENDSWITH:
|
|
44865
|
-
condition = "".concat(key, ".EndsWith(\"").concat(value, "\")");
|
|
44866
|
-
break;
|
|
44867
|
-
case FilterOperationType.GT:
|
|
44868
|
-
condition = "".concat(key, ">").concat(value);
|
|
44869
|
-
break;
|
|
44870
|
-
case FilterOperationType.GTE:
|
|
44871
|
-
condition = "".concat(key, ">=").concat(value);
|
|
44872
|
-
break;
|
|
44873
|
-
case FilterOperationType.LT:
|
|
44874
|
-
condition = "".concat(key, "<").concat(value);
|
|
44875
|
-
break;
|
|
44876
|
-
case FilterOperationType.LTE:
|
|
44877
|
-
condition = "".concat(key, "<=").concat(value);
|
|
44878
|
-
break;
|
|
44879
|
-
case FilterOperationType.ISEMPTY:
|
|
44880
|
-
// Special handling for empty string/null checking
|
|
44881
|
-
condition = "".concat(key, " == string.Empty");
|
|
44882
|
-
break;
|
|
44883
|
-
case FilterOperationType.IN:
|
|
44884
|
-
// For array values
|
|
44885
|
-
if (Array.isArray(value)) {
|
|
44886
|
-
condition = "".concat(key, " IN (").concat(value.map(v => typeof v === 'string' ? "\"".concat(v, "\"") : v).join(', '), ")");
|
|
44887
|
-
} else {
|
|
44888
|
-
condition = "".concat(key, " IN (\"").concat(value, "\")");
|
|
44889
|
-
}
|
|
44890
|
-
break;
|
|
44891
|
-
case FilterOperationType.BETWEEN:
|
|
44892
|
-
// For range values - value should be an array with 2 elements
|
|
44893
|
-
if (Array.isArray(value) && value.length === 2) {
|
|
44894
|
-
condition = "(".concat(key, " >= ").concat(value[0], " && ").concat(key, " <= ").concat(value[1], ")");
|
|
44895
|
-
} else {
|
|
44896
|
-
condition = "".concat(key, " BETWEEN ").concat(value);
|
|
44897
|
-
}
|
|
44898
|
-
break;
|
|
44899
|
-
case FilterOperationType.NE:
|
|
44900
|
-
condition = "".concat(key, "!=\"").concat(value, "\"");
|
|
44901
|
-
break;
|
|
44902
|
-
case FilterOperationType.NOTCONTAINS:
|
|
44903
|
-
condition = "!".concat(key, ".Contains(\"").concat(value, "\")");
|
|
44904
|
-
break;
|
|
44905
|
-
case FilterOperationType.NOTIN:
|
|
44906
|
-
if (Array.isArray(value)) {
|
|
44907
|
-
condition = "".concat(key, " NOT IN (").concat(value.map(v => typeof v === 'string' ? "\"".concat(v, "\"") : v).join(', '), ")");
|
|
44908
|
-
} else {
|
|
44909
|
-
condition = "".concat(key, " NOT IN (\"").concat(value, "\")");
|
|
44910
|
-
}
|
|
44911
|
-
break;
|
|
44912
|
-
default:
|
|
44913
|
-
// For any unhandled operators, use a generic method call format
|
|
44914
|
-
const operatorName = typeof type === 'string' ? type : 'custom';
|
|
44915
|
-
condition = "".concat(key, ".").concat(operatorName, "(\"").concat(value, "\")");
|
|
44916
|
-
}
|
|
44917
|
-
}
|
|
44918
|
-
conditions.push(condition);
|
|
44919
|
-
});
|
|
44920
|
-
// Join all conditions with the specified operator
|
|
44921
|
-
const logicalOperator = defaultOperator === LogicalOperatorType.OR ? ' || ' : ' && ';
|
|
44922
|
-
const conditionString = conditions.join(logicalOperator);
|
|
44923
|
-
// If condition is empty, return null instead of an object
|
|
44924
|
-
if (conditionString === "") {
|
|
44925
|
-
return null;
|
|
44926
|
-
}
|
|
44927
|
-
const result = {
|
|
44928
|
-
condition: conditionString
|
|
44929
|
-
};
|
|
44930
|
-
// Only include params if we have any
|
|
44931
|
-
if (params.length > 0) {
|
|
44932
|
-
result.params = params;
|
|
44933
|
-
}
|
|
44934
|
-
return result;
|
|
44935
|
-
}
|
|
44936
|
-
/**
|
|
44937
|
-
* Processes a filter expression (item or group) and returns the condition string
|
|
44938
|
-
* @param expression - The filter expression to process
|
|
44939
|
-
* @param isRoot - Whether this is the root level expression
|
|
44940
|
-
* @param params - Array to collect parameters for parameterized queries
|
|
44941
|
-
* @returns The string representation of the filter condition
|
|
44942
|
-
*/
|
|
44943
|
-
function processFilterExpression(expression) {
|
|
44944
|
-
let isRoot = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
44945
|
-
let params = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
|
|
44946
|
-
// If it's a filter group with nested expressions
|
|
44947
|
-
if ('operator' in expression) {
|
|
44948
|
-
const group = expression;
|
|
44949
|
-
const conditions = [];
|
|
44950
|
-
// Process each filter in the group
|
|
44951
|
-
group.filters.forEach(filter => {
|
|
44952
|
-
const condition = processFilterExpression(filter, false, params);
|
|
44953
|
-
if (condition) {
|
|
44954
|
-
conditions.push(condition);
|
|
44955
|
-
}
|
|
44956
|
-
});
|
|
44957
|
-
// If no valid conditions, return empty string
|
|
44958
|
-
if (conditions.length === 0) {
|
|
44959
|
-
return '';
|
|
44960
|
-
}
|
|
44961
|
-
let result;
|
|
44962
|
-
// Based on the operator type, join the conditions accordingly
|
|
44963
|
-
switch (group.operator) {
|
|
44964
|
-
case LogicalOperatorType.OR:
|
|
44965
|
-
result = conditions.join(' || ');
|
|
44966
|
-
break;
|
|
44967
|
-
case LogicalOperatorType.NOT:
|
|
44968
|
-
// For 'not', we negate the conditions
|
|
44969
|
-
result = "!(".concat(conditions.join(' && '), ")");
|
|
44970
|
-
break;
|
|
44971
|
-
case LogicalOperatorType.AND:
|
|
44972
|
-
default:
|
|
44973
|
-
result = conditions.join(' && ');
|
|
44974
|
-
// Default to AND
|
|
44975
|
-
}
|
|
44976
|
-
// Wrap in parentheses to maintain correct operator precedence, but skip for root level
|
|
44977
|
-
return !isRoot && conditions.length > 1 ? "(".concat(result, ")") : result;
|
|
44978
|
-
}
|
|
44979
|
-
// It's a simple filter item
|
|
44980
|
-
const item = expression;
|
|
44981
|
-
const {
|
|
44982
|
-
key,
|
|
44983
|
-
value,
|
|
44984
|
-
type,
|
|
44985
|
-
isArray
|
|
44986
|
-
} = item;
|
|
44987
|
-
// Skip this filter if value is empty or undefined, except for ISEMPTY type which doesn't need a value
|
|
44988
|
-
const typeStr = typeof type === 'string' ? type.toLowerCase() : type;
|
|
44989
|
-
if (typeStr !== FilterOperationType.ISEMPTY && (value === undefined || value === '' || value === null)) {
|
|
44990
|
-
return '';
|
|
44991
|
-
}
|
|
44992
|
-
// Handle isArray flag - if true, use Contains with parameter reference
|
|
44993
|
-
if (isArray === true) {
|
|
44994
|
-
// Format the value as a comma-separated string if it's an array
|
|
44995
|
-
const paramValue = Array.isArray(value) ? value.join(',') : value;
|
|
44996
|
-
// Add formatted value to params array and use parameterized reference
|
|
44997
|
-
params.push(paramValue);
|
|
44998
|
-
return "@".concat(params.length - 1, ".Contains(").concat(key, ")");
|
|
44999
|
-
}
|
|
45000
|
-
switch (typeStr) {
|
|
45001
|
-
case FilterOperationType.EQ:
|
|
45002
|
-
return "".concat(key, "=\"").concat(value, "\"");
|
|
45003
|
-
case FilterOperationType.CONTAINS:
|
|
45004
|
-
return "".concat(key, ".Contains(\"").concat(value, "\")");
|
|
45005
|
-
case FilterOperationType.STARTSWITH:
|
|
45006
|
-
return "".concat(key, ".StartsWith(\"").concat(value, "\")");
|
|
45007
|
-
case FilterOperationType.ENDSWITH:
|
|
45008
|
-
return "".concat(key, ".EndsWith(\"").concat(value, "\")");
|
|
45009
|
-
case FilterOperationType.GT:
|
|
45010
|
-
return "".concat(key, ">").concat(value);
|
|
45011
|
-
case FilterOperationType.GTE:
|
|
45012
|
-
return "".concat(key, ">=").concat(value);
|
|
45013
|
-
case FilterOperationType.LT:
|
|
45014
|
-
return "".concat(key, "<").concat(value);
|
|
45015
|
-
case FilterOperationType.LTE:
|
|
45016
|
-
return "".concat(key, "<=").concat(value);
|
|
45017
|
-
case FilterOperationType.ISEMPTY:
|
|
45018
|
-
return "".concat(key, " == string.Empty");
|
|
45019
|
-
case FilterOperationType.IN:
|
|
45020
|
-
if (Array.isArray(value)) {
|
|
45021
|
-
return "".concat(key, " IN (").concat(value.map(v => typeof v === 'string' ? "\"".concat(v, "\"") : v).join(', '), ")");
|
|
45022
|
-
} else {
|
|
45023
|
-
return "".concat(key, " IN (\"").concat(value, "\")");
|
|
45024
|
-
}
|
|
45025
|
-
case FilterOperationType.BETWEEN:
|
|
45026
|
-
if (Array.isArray(value) && value.length === 2) {
|
|
45027
|
-
return "(".concat(key, " >= ").concat(value[0], " && ").concat(key, " <= ").concat(value[1], ")");
|
|
45028
|
-
} else {
|
|
45029
|
-
return "".concat(key, " BETWEEN ").concat(value);
|
|
45030
|
-
}
|
|
45031
|
-
case FilterOperationType.NE:
|
|
45032
|
-
return "".concat(key, "!=\"").concat(value, "\"");
|
|
45033
|
-
case FilterOperationType.NOTCONTAINS:
|
|
45034
|
-
return "!".concat(key, ".Contains(\"").concat(value, "\")");
|
|
45035
|
-
case FilterOperationType.NOTIN:
|
|
45036
|
-
if (Array.isArray(value)) {
|
|
45037
|
-
return "".concat(key, " NOT IN (").concat(value.map(v => typeof v === 'string' ? "\"".concat(v, "\"") : v).join(', '), ")");
|
|
45038
|
-
} else {
|
|
45039
|
-
return "".concat(key, " NOT IN (\"").concat(value, "\")");
|
|
45040
|
-
}
|
|
45041
|
-
default:
|
|
45042
|
-
const operatorName = typeof type === 'string' ? type : 'custom';
|
|
45043
|
-
return "".concat(key, ".").concat(operatorName, "(\"").concat(value, "\")");
|
|
45044
|
-
}
|
|
45045
|
-
}
|
|
45046
|
-
/**
|
|
45047
|
-
* Converts a complex filter expression to a string condition
|
|
45048
|
-
* @param filterExpression - Filter expression (can be nested with logical operators)
|
|
45049
|
-
* @returns Object with a 'condition' property containing the string condition and optional 'params' array
|
|
45050
|
-
*/
|
|
45051
|
-
function convertFilterExpressionToCondition(filterExpression) {
|
|
45052
|
-
const params = [];
|
|
45053
|
-
const conditionString = processFilterExpression(filterExpression, true, params);
|
|
45054
|
-
// If condition is empty, return null instead of an object
|
|
45055
|
-
if (!conditionString) {
|
|
45056
|
-
return null;
|
|
45057
|
-
}
|
|
45058
|
-
const result = {
|
|
45059
|
-
condition: conditionString
|
|
45060
|
-
};
|
|
45061
|
-
// Only include params if we have any
|
|
45062
|
-
if (params.length > 0) {
|
|
45063
|
-
result.params = params;
|
|
45064
|
-
}
|
|
45065
|
-
return result;
|
|
45066
|
-
}
|
|
45067
|
-
/**
|
|
45068
|
-
* Usage examples:
|
|
45069
|
-
* * Simple filter with AND:
|
|
45070
|
-
* ```typescript
|
|
45071
|
-
* const filters: FilterItem[] = [
|
|
45072
|
-
* { key: 'name', value: 'John', type: FilterOperationType.CONTAINS },
|
|
45073
|
-
* { key: 'age', value: 30, type: FilterOperationType.GTE }
|
|
45074
|
-
* ];
|
|
45075
|
-
* const result = convertArrayFiltersToCondition(filters); // name.Contains("John") && age>=30
|
|
45076
|
-
* ```
|
|
45077
|
-
*
|
|
45078
|
-
* Simple filter with OR:
|
|
45079
|
-
* ```typescript
|
|
45080
|
-
* const filters: FilterItem[] = [
|
|
45081
|
-
* { key: 'status', value: 'active', type: FilterOperationType.EQ },
|
|
45082
|
-
* { key: 'status', value: 'pending', type: FilterOperationType.EQ }
|
|
45083
|
-
* ];
|
|
45084
|
-
* const result = convertArrayFiltersToCondition(filters, LogicalOperatorType.OR); // status="active" || status="pending"
|
|
45085
|
-
* ```
|
|
45086
|
-
*
|
|
45087
|
-
* Filter with isArray property:
|
|
45088
|
-
* ```typescript
|
|
45089
|
-
* const filters: FilterItem[] = [
|
|
45090
|
-
* { key: 'objectTypeCode', value: 'OBJECTFILTER', type: FilterOperationType.EQ, isArray: false },
|
|
45091
|
-
* { key: 'name', value: 'Long', type: FilterOperationType.EQ, isArray: true },
|
|
45092
|
-
* ];
|
|
45093
|
-
* const result = convertArrayFiltersToCondition(filters);
|
|
45094
|
-
* // Returns: { condition: 'objectTypeCode="OBJECTFILTER" && @0.Contains(name)', params: ["Long"] }
|
|
45095
|
-
* ```
|
|
45096
|
-
*
|
|
45097
|
-
* Filter with isArray and array values:
|
|
45098
|
-
* ```typescript
|
|
45099
|
-
* const filters: FilterItem[] = [
|
|
45100
|
-
* { key: 'id', value: [1, 2, 3], type: FilterOperationType.EQ, isArray: true },
|
|
45101
|
-
* { key: 'names', value: ['name1', 'name2', 'name3'], type: FilterOperationType.EQ, isArray: true },
|
|
45102
|
-
* ];
|
|
45103
|
-
* const result = convertArrayFiltersToCondition(filters);
|
|
45104
|
-
* // Returns: { condition: '@0.Contains(id) && @1.Contains(names)', params: ["1,2,3", "name1,name2,name3"] }
|
|
45105
|
-
* ```
|
|
45106
|
-
*
|
|
45107
|
-
* Complex nested filter:
|
|
45108
|
-
* ```typescript
|
|
45109
|
-
* const complexFilter: FilterGroup = {
|
|
45110
|
-
* operator: LogicalOperatorType.AND,
|
|
45111
|
-
* filters: [
|
|
45112
|
-
* { key: 'name', value: 'John', type: FilterOperationType.CONTAINS },
|
|
45113
|
-
* {
|
|
45114
|
-
* operator: LogicalOperatorType.OR,
|
|
45115
|
-
* filters: [
|
|
45116
|
-
* { key: 'age', value: 30, type: FilterOperationType.GTE },
|
|
45117
|
-
* { key: 'vip', value: true, type: FilterOperationType.EQ }
|
|
45118
|
-
* ]
|
|
45119
|
-
* },
|
|
45120
|
-
* {
|
|
45121
|
-
* operator: LogicalOperatorType.NOT,
|
|
45122
|
-
* filters: [
|
|
45123
|
-
* { key: 'status', value: 'inactive', type: FilterOperationType.EQ }
|
|
45124
|
-
* ]
|
|
45125
|
-
* }
|
|
45126
|
-
* ]
|
|
45127
|
-
* };
|
|
45128
|
-
* const result = convertFilterExpressionToCondition(complexFilter);
|
|
45129
|
-
* // name.Contains("John") && (age>=30 || vip="true") && !(status="inactive")
|
|
45130
|
-
* ```
|
|
45131
|
-
*
|
|
45132
|
-
* Complex filter with parameterized values:
|
|
45133
|
-
* ```typescript
|
|
45134
|
-
* const complexFilter: FilterGroup = {
|
|
45135
|
-
* operator: LogicalOperatorType.AND,
|
|
45136
|
-
* filters: [
|
|
45137
|
-
* { key: 'objectTypeCode', value: 'OBJECTFILTER', type: FilterOperationType.EQ },
|
|
45138
|
-
* { key: 'name', value: 'Long', type: FilterOperationType.EQ, isArray: true }
|
|
45139
|
-
* ]
|
|
45140
|
-
* };
|
|
45141
|
-
* const result = convertFilterExpressionToCondition(complexFilter);
|
|
45142
|
-
* // Returns: { condition: 'objectTypeCode="OBJECTFILTER" && @0.Contains(name)', params: ["Long"] }
|
|
45143
|
-
* ```
|
|
45144
|
-
*
|
|
45145
|
-
* Complex filter with array values:
|
|
45146
|
-
* ```typescript
|
|
45147
|
-
* const complexFilter: FilterGroup = {
|
|
45148
|
-
* operator: LogicalOperatorType.AND,
|
|
45149
|
-
* filters: [
|
|
45150
|
-
* { key: 'objectTypeCode', value: 'OBJECTFILTER', type: FilterOperationType.EQ },
|
|
45151
|
-
* { key: 'id', value: [1, 2], type: FilterOperationType.EQ, isArray: true },
|
|
45152
|
-
* { key: 'name', value: ['name1', 'name2'], type: FilterOperationType.EQ, isArray: true }
|
|
45153
|
-
* ]
|
|
45154
|
-
* };
|
|
45155
|
-
* const result = convertFilterExpressionToCondition(complexFilter);
|
|
45156
|
-
* // Returns: {
|
|
45157
|
-
* // condition: 'objectTypeCode="OBJECTFILTER" && @0.Contains(id) && @1.Contains(name)',
|
|
45158
|
-
* // params: ["1,2", "name1,name2"]
|
|
45159
|
-
* // }
|
|
45160
|
-
* ```
|
|
45161
|
-
*
|
|
45162
|
-
* Example with ISEMPTY check:
|
|
45163
|
-
* ```typescript
|
|
45164
|
-
* const complexFilter: FilterGroup = {
|
|
45165
|
-
* operator: LogicalOperatorType.AND,
|
|
45166
|
-
* filters: [
|
|
45167
|
-
* {
|
|
45168
|
-
* operator: LogicalOperatorType.OR,
|
|
45169
|
-
* filters: [
|
|
45170
|
-
* { key: 'apControllerCode', value: 'aerohive', type: FilterOperationType.CONTAINS },
|
|
45171
|
-
* { key: 'apControllerCode', type: FilterOperationType.ISEMPTY }
|
|
45172
|
-
* ]
|
|
45173
|
-
* },
|
|
45174
|
-
* { key: 'authenticationMethodCode', value: 'standard', type: FilterOperationType.CONTAINS }
|
|
45175
|
-
* ]
|
|
45176
|
-
* };
|
|
45177
|
-
* const result = convertFilterExpressionToCondition(complexFilter);
|
|
45178
|
-
* // Returns: { condition: '(apControllerCode.Contains("aerohive") || apControllerCode == string.Empty) && authenticationMethodCode.Contains("standard")' }
|
|
45179
|
-
* ```
|
|
45180
|
-
*/
|
|
45181
|
-
|
|
45182
45182
|
const HeaderBar = styled('header')({
|
|
45183
45183
|
px: 2,
|
|
45184
45184
|
display: 'flex',
|
|
@@ -45301,8 +45301,8 @@ function AdvancedSearch(props) {
|
|
|
45301
45301
|
fieldName
|
|
45302
45302
|
} = currentField;
|
|
45303
45303
|
const currentValue = fieldValue === null || fieldValue === void 0 ? void 0 : fieldValue.value;
|
|
45304
|
-
const startDate = currentValue && !
|
|
45305
|
-
const endDate = currentValue && !
|
|
45304
|
+
const startDate = currentValue && !_$3.isNull(currentValue[0]) ? moment(currentValue[0]) : null;
|
|
45305
|
+
const endDate = currentValue && !_$3.isNull(currentValue[1]) ? moment(currentValue[1]) : null;
|
|
45306
45306
|
const handleChange = dateRange => {
|
|
45307
45307
|
const option = {
|
|
45308
45308
|
label: dateToString(dateRange[0]) + ' - ' + dateToString(dateRange[1]),
|
|
@@ -48611,7 +48611,7 @@ function isHTMLElement$1(element) {
|
|
|
48611
48611
|
function isVirtualElement(element) {
|
|
48612
48612
|
return !isHTMLElement$1(element);
|
|
48613
48613
|
}
|
|
48614
|
-
const useUtilityClasses$
|
|
48614
|
+
const useUtilityClasses$Z = ownerState => {
|
|
48615
48615
|
const {
|
|
48616
48616
|
classes
|
|
48617
48617
|
} = ownerState;
|
|
@@ -48724,7 +48724,7 @@ const PopperTooltip = /*#__PURE__*/React.forwardRef(function PopperTooltip(props
|
|
|
48724
48724
|
if (TransitionProps !== null) {
|
|
48725
48725
|
childProps.TransitionProps = TransitionProps;
|
|
48726
48726
|
}
|
|
48727
|
-
const classes = useUtilityClasses$
|
|
48727
|
+
const classes = useUtilityClasses$Z(props);
|
|
48728
48728
|
const Root = slots.root ?? 'div';
|
|
48729
48729
|
const rootProps = useSlotProps({
|
|
48730
48730
|
elementType: Root,
|
|
@@ -49147,7 +49147,7 @@ function getListSubheaderUtilityClass(slot) {
|
|
|
49147
49147
|
}
|
|
49148
49148
|
generateUtilityClasses('MuiListSubheader', ['root', 'colorPrimary', 'colorInherit', 'gutters', 'inset', 'sticky']);
|
|
49149
49149
|
|
|
49150
|
-
const useUtilityClasses$
|
|
49150
|
+
const useUtilityClasses$Y = ownerState => {
|
|
49151
49151
|
const {
|
|
49152
49152
|
classes,
|
|
49153
49153
|
color,
|
|
@@ -49242,7 +49242,7 @@ const ListSubheader = /*#__PURE__*/React.forwardRef(function ListSubheader(inPro
|
|
|
49242
49242
|
disableSticky,
|
|
49243
49243
|
inset
|
|
49244
49244
|
};
|
|
49245
|
-
const classes = useUtilityClasses$
|
|
49245
|
+
const classes = useUtilityClasses$Y(ownerState);
|
|
49246
49246
|
return /*#__PURE__*/jsxRuntimeExports.jsx(ListSubheaderRoot, {
|
|
49247
49247
|
as: component,
|
|
49248
49248
|
className: clsx(classes.root, className),
|
|
@@ -49307,7 +49307,7 @@ function getPaperUtilityClass(slot) {
|
|
|
49307
49307
|
}
|
|
49308
49308
|
generateUtilityClasses('MuiPaper', ['root', 'rounded', 'outlined', 'elevation', 'elevation0', 'elevation1', 'elevation2', 'elevation3', 'elevation4', 'elevation5', 'elevation6', 'elevation7', 'elevation8', 'elevation9', 'elevation10', 'elevation11', 'elevation12', 'elevation13', 'elevation14', 'elevation15', 'elevation16', 'elevation17', 'elevation18', 'elevation19', 'elevation20', 'elevation21', 'elevation22', 'elevation23', 'elevation24']);
|
|
49309
49309
|
|
|
49310
|
-
const useUtilityClasses$
|
|
49310
|
+
const useUtilityClasses$X = ownerState => {
|
|
49311
49311
|
const {
|
|
49312
49312
|
square,
|
|
49313
49313
|
elevation,
|
|
@@ -49379,7 +49379,7 @@ const Paper = /*#__PURE__*/React.forwardRef(function Paper(inProps, ref) {
|
|
|
49379
49379
|
square,
|
|
49380
49380
|
variant
|
|
49381
49381
|
};
|
|
49382
|
-
const classes = useUtilityClasses$
|
|
49382
|
+
const classes = useUtilityClasses$X(ownerState);
|
|
49383
49383
|
if (process.env.NODE_ENV !== 'production') {
|
|
49384
49384
|
if (theme.shadows[elevation] === undefined) {
|
|
49385
49385
|
console.error([`MUI: The elevation provided <Paper elevation={${elevation}}> is not available in the theme.`, `Please make sure that \`theme.shadows[${elevation}]\` is defined.`].join('\n'));
|
|
@@ -51542,7 +51542,7 @@ function getButtonBaseUtilityClass(slot) {
|
|
|
51542
51542
|
}
|
|
51543
51543
|
const buttonBaseClasses = generateUtilityClasses('MuiButtonBase', ['root', 'disabled', 'focusVisible']);
|
|
51544
51544
|
|
|
51545
|
-
const useUtilityClasses$
|
|
51545
|
+
const useUtilityClasses$W = ownerState => {
|
|
51546
51546
|
const {
|
|
51547
51547
|
disabled,
|
|
51548
51548
|
focusVisible,
|
|
@@ -51771,7 +51771,7 @@ const ButtonBase = /*#__PURE__*/React.forwardRef(function ButtonBase(inProps, re
|
|
|
51771
51771
|
tabIndex,
|
|
51772
51772
|
focusVisible
|
|
51773
51773
|
};
|
|
51774
|
-
const classes = useUtilityClasses$
|
|
51774
|
+
const classes = useUtilityClasses$W(ownerState);
|
|
51775
51775
|
return /*#__PURE__*/jsxRuntimeExports.jsxs(ButtonBaseRoot, {
|
|
51776
51776
|
as: ComponentProp,
|
|
51777
51777
|
className: clsx(classes.root, className),
|
|
@@ -52012,7 +52012,7 @@ const rotateAnimation = typeof circularRotateKeyframe !== 'string' ? css`
|
|
|
52012
52012
|
const dashAnimation = typeof circularDashKeyframe !== 'string' ? css`
|
|
52013
52013
|
animation: ${circularDashKeyframe} 1.4s ease-in-out infinite;
|
|
52014
52014
|
` : null;
|
|
52015
|
-
const useUtilityClasses$
|
|
52015
|
+
const useUtilityClasses$V = ownerState => {
|
|
52016
52016
|
const {
|
|
52017
52017
|
classes,
|
|
52018
52018
|
variant,
|
|
@@ -52140,7 +52140,7 @@ const CircularProgress$1 = /*#__PURE__*/React.forwardRef(function CircularProgre
|
|
|
52140
52140
|
value,
|
|
52141
52141
|
variant
|
|
52142
52142
|
};
|
|
52143
|
-
const classes = useUtilityClasses$
|
|
52143
|
+
const classes = useUtilityClasses$V(ownerState);
|
|
52144
52144
|
const circleStyle = {};
|
|
52145
52145
|
const rootStyle = {};
|
|
52146
52146
|
const rootProps = {};
|
|
@@ -52251,7 +52251,7 @@ function getIconButtonUtilityClass(slot) {
|
|
|
52251
52251
|
}
|
|
52252
52252
|
const iconButtonClasses = generateUtilityClasses('MuiIconButton', ['root', 'disabled', 'colorInherit', 'colorPrimary', 'colorSecondary', 'colorError', 'colorInfo', 'colorSuccess', 'colorWarning', 'edgeStart', 'edgeEnd', 'sizeSmall', 'sizeMedium', 'sizeLarge', 'loading', 'loadingIndicator', 'loadingWrapper']);
|
|
52253
52253
|
|
|
52254
|
-
const useUtilityClasses$
|
|
52254
|
+
const useUtilityClasses$U = ownerState => {
|
|
52255
52255
|
const {
|
|
52256
52256
|
classes,
|
|
52257
52257
|
disabled,
|
|
@@ -52443,7 +52443,7 @@ const IconButton = /*#__PURE__*/React.forwardRef(function IconButton(inProps, re
|
|
|
52443
52443
|
loadingIndicator,
|
|
52444
52444
|
size
|
|
52445
52445
|
};
|
|
52446
|
-
const classes = useUtilityClasses$
|
|
52446
|
+
const classes = useUtilityClasses$U(ownerState);
|
|
52447
52447
|
return /*#__PURE__*/jsxRuntimeExports.jsxs(IconButtonRoot, {
|
|
52448
52448
|
id: loading ? loadingId : idProp,
|
|
52449
52449
|
className: clsx(classes.root, className),
|
|
@@ -52563,7 +52563,7 @@ function getChipUtilityClass(slot) {
|
|
|
52563
52563
|
}
|
|
52564
52564
|
const chipClasses = generateUtilityClasses('MuiChip', ['root', 'sizeSmall', 'sizeMedium', 'colorDefault', 'colorError', 'colorInfo', 'colorPrimary', 'colorSecondary', 'colorSuccess', 'colorWarning', 'disabled', 'clickable', 'clickableColorPrimary', 'clickableColorSecondary', 'deletable', 'deletableColorPrimary', 'deletableColorSecondary', 'outlined', 'filled', 'outlinedPrimary', 'outlinedSecondary', 'filledPrimary', 'filledSecondary', 'avatar', 'avatarSmall', 'avatarMedium', 'avatarColorPrimary', 'avatarColorSecondary', 'icon', 'iconSmall', 'iconMedium', 'iconColorPrimary', 'iconColorSecondary', 'label', 'labelSmall', 'labelMedium', 'deleteIcon', 'deleteIconSmall', 'deleteIconMedium', 'deleteIconColorPrimary', 'deleteIconColorSecondary', 'deleteIconOutlinedColorPrimary', 'deleteIconOutlinedColorSecondary', 'deleteIconFilledColorPrimary', 'deleteIconFilledColorSecondary', 'focusVisible']);
|
|
52565
52565
|
|
|
52566
|
-
const useUtilityClasses$
|
|
52566
|
+
const useUtilityClasses$T = ownerState => {
|
|
52567
52567
|
const {
|
|
52568
52568
|
classes,
|
|
52569
52569
|
disabled,
|
|
@@ -52964,7 +52964,7 @@ const Chip = /*#__PURE__*/React.forwardRef(function Chip(inProps, ref) {
|
|
|
52964
52964
|
clickable,
|
|
52965
52965
|
variant
|
|
52966
52966
|
};
|
|
52967
|
-
const classes = useUtilityClasses$
|
|
52967
|
+
const classes = useUtilityClasses$T(ownerState);
|
|
52968
52968
|
const moreProps = component === ButtonBase ? {
|
|
52969
52969
|
component: ComponentProp || 'div',
|
|
52970
52970
|
focusVisibleClassName: classes.focusVisible,
|
|
@@ -53451,7 +53451,7 @@ const inputOverridesResolver = (props, styles) => {
|
|
|
53451
53451
|
} = props;
|
|
53452
53452
|
return [styles.input, ownerState.size === 'small' && styles.inputSizeSmall, ownerState.multiline && styles.inputMultiline, ownerState.type === 'search' && styles.inputTypeSearch, ownerState.startAdornment && styles.inputAdornedStart, ownerState.endAdornment && styles.inputAdornedEnd, ownerState.hiddenLabel && styles.inputHiddenLabel];
|
|
53453
53453
|
};
|
|
53454
|
-
const useUtilityClasses$
|
|
53454
|
+
const useUtilityClasses$S = ownerState => {
|
|
53455
53455
|
const {
|
|
53456
53456
|
classes,
|
|
53457
53457
|
color,
|
|
@@ -53871,7 +53871,7 @@ const InputBase = /*#__PURE__*/React.forwardRef(function InputBase(inProps, ref)
|
|
|
53871
53871
|
startAdornment,
|
|
53872
53872
|
type
|
|
53873
53873
|
};
|
|
53874
|
-
const classes = useUtilityClasses$
|
|
53874
|
+
const classes = useUtilityClasses$S(ownerState);
|
|
53875
53875
|
const Root = slots.root || components.Root || InputBaseRoot;
|
|
53876
53876
|
const rootProps = slotProps.root || componentsProps.root || {};
|
|
53877
53877
|
const Input = slots.input || components.Input || InputBaseInput;
|
|
@@ -54192,7 +54192,7 @@ var ClearIcon$1 = createSvgIcon(/*#__PURE__*/jsxRuntimeExports.jsx("path", {
|
|
|
54192
54192
|
d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"
|
|
54193
54193
|
}), 'Close');
|
|
54194
54194
|
|
|
54195
|
-
var ArrowDropDownIcon$
|
|
54195
|
+
var ArrowDropDownIcon$2 = createSvgIcon(/*#__PURE__*/jsxRuntimeExports.jsx("path", {
|
|
54196
54196
|
d: "M7 10l5 5 5-5z"
|
|
54197
54197
|
}), 'ArrowDropDown');
|
|
54198
54198
|
|
|
@@ -54277,7 +54277,7 @@ name, parameters) {
|
|
|
54277
54277
|
}
|
|
54278
54278
|
|
|
54279
54279
|
var _ClearIcon, _ArrowDropDownIcon;
|
|
54280
|
-
const useUtilityClasses$
|
|
54280
|
+
const useUtilityClasses$R = ownerState => {
|
|
54281
54281
|
const {
|
|
54282
54282
|
classes,
|
|
54283
54283
|
disablePortal,
|
|
@@ -54706,7 +54706,7 @@ const Autocomplete$1 = /*#__PURE__*/React.forwardRef(function Autocomplete(inPro
|
|
|
54706
54706
|
options,
|
|
54707
54707
|
PaperComponent: PaperComponentProp,
|
|
54708
54708
|
PopperComponent: PopperComponentProp,
|
|
54709
|
-
popupIcon = _ArrowDropDownIcon || (_ArrowDropDownIcon = /*#__PURE__*/jsxRuntimeExports.jsx(ArrowDropDownIcon$
|
|
54709
|
+
popupIcon = _ArrowDropDownIcon || (_ArrowDropDownIcon = /*#__PURE__*/jsxRuntimeExports.jsx(ArrowDropDownIcon$2, {})),
|
|
54710
54710
|
readOnly = false,
|
|
54711
54711
|
renderGroup: renderGroupProp,
|
|
54712
54712
|
renderInput,
|
|
@@ -54772,7 +54772,7 @@ const Autocomplete$1 = /*#__PURE__*/React.forwardRef(function Autocomplete(inPro
|
|
|
54772
54772
|
popupOpen,
|
|
54773
54773
|
size
|
|
54774
54774
|
};
|
|
54775
|
-
const classes = useUtilityClasses$
|
|
54775
|
+
const classes = useUtilityClasses$R(ownerState);
|
|
54776
54776
|
const externalForwardedProps = {
|
|
54777
54777
|
slots: {
|
|
54778
54778
|
paper: PaperComponentProp,
|
|
@@ -55442,7 +55442,7 @@ function getSwitchBaseUtilityClass(slot) {
|
|
|
55442
55442
|
}
|
|
55443
55443
|
generateUtilityClasses('PrivateSwitchBase', ['root', 'checked', 'disabled', 'input', 'edgeStart', 'edgeEnd']);
|
|
55444
55444
|
|
|
55445
|
-
const useUtilityClasses$
|
|
55445
|
+
const useUtilityClasses$Q = ownerState => {
|
|
55446
55446
|
const {
|
|
55447
55447
|
classes,
|
|
55448
55448
|
checked,
|
|
@@ -55585,7 +55585,7 @@ const SwitchBase = /*#__PURE__*/React.forwardRef(function SwitchBase(props, ref)
|
|
|
55585
55585
|
disableFocusRipple,
|
|
55586
55586
|
edge
|
|
55587
55587
|
};
|
|
55588
|
-
const classes = useUtilityClasses$
|
|
55588
|
+
const classes = useUtilityClasses$Q(ownerState);
|
|
55589
55589
|
const externalForwardedProps = {
|
|
55590
55590
|
slots,
|
|
55591
55591
|
slotProps: {
|
|
@@ -55799,7 +55799,7 @@ function getCheckboxUtilityClass(slot) {
|
|
|
55799
55799
|
}
|
|
55800
55800
|
const checkboxClasses = generateUtilityClasses('MuiCheckbox', ['root', 'checked', 'disabled', 'indeterminate', 'colorPrimary', 'colorSecondary', 'sizeSmall', 'sizeMedium']);
|
|
55801
55801
|
|
|
55802
|
-
const useUtilityClasses$
|
|
55802
|
+
const useUtilityClasses$P = ownerState => {
|
|
55803
55803
|
const {
|
|
55804
55804
|
classes,
|
|
55805
55805
|
indeterminate,
|
|
@@ -55908,7 +55908,7 @@ const Checkbox = /*#__PURE__*/React.forwardRef(function Checkbox(inProps, ref) {
|
|
|
55908
55908
|
indeterminate,
|
|
55909
55909
|
size
|
|
55910
55910
|
};
|
|
55911
|
-
const classes = useUtilityClasses$
|
|
55911
|
+
const classes = useUtilityClasses$P(ownerState);
|
|
55912
55912
|
const externalInputProps = slotProps.input ?? inputProps;
|
|
55913
55913
|
const [RootSlot, rootSlotProps] = useSlot('root', {
|
|
55914
55914
|
ref,
|
|
@@ -56058,7 +56058,7 @@ process.env.NODE_ENV !== "production" ? Checkbox.propTypes /* remove-proptypes *
|
|
|
56058
56058
|
value: PropTypes.any
|
|
56059
56059
|
} : void 0;
|
|
56060
56060
|
|
|
56061
|
-
const useUtilityClasses$
|
|
56061
|
+
const useUtilityClasses$O = ownerState => {
|
|
56062
56062
|
const {
|
|
56063
56063
|
classes,
|
|
56064
56064
|
disableUnderline
|
|
@@ -56189,7 +56189,7 @@ const Input = /*#__PURE__*/React.forwardRef(function Input(inProps, ref) {
|
|
|
56189
56189
|
type = 'text',
|
|
56190
56190
|
...other
|
|
56191
56191
|
} = props;
|
|
56192
|
-
const classes = useUtilityClasses$
|
|
56192
|
+
const classes = useUtilityClasses$O(props);
|
|
56193
56193
|
const ownerState = {
|
|
56194
56194
|
disableUnderline
|
|
56195
56195
|
};
|
|
@@ -56403,7 +56403,7 @@ process.env.NODE_ENV !== "production" ? Input.propTypes /* remove-proptypes */ =
|
|
|
56403
56403
|
} : void 0;
|
|
56404
56404
|
Input.muiName = 'Input';
|
|
56405
56405
|
|
|
56406
|
-
const useUtilityClasses$
|
|
56406
|
+
const useUtilityClasses$N = ownerState => {
|
|
56407
56407
|
const {
|
|
56408
56408
|
classes,
|
|
56409
56409
|
disableUnderline,
|
|
@@ -56681,7 +56681,7 @@ const FilledInput = /*#__PURE__*/React.forwardRef(function FilledInput(inProps,
|
|
|
56681
56681
|
multiline,
|
|
56682
56682
|
type
|
|
56683
56683
|
};
|
|
56684
|
-
const classes = useUtilityClasses$
|
|
56684
|
+
const classes = useUtilityClasses$N(props);
|
|
56685
56685
|
const filledInputComponentsProps = {
|
|
56686
56686
|
root: {
|
|
56687
56687
|
ownerState
|
|
@@ -57049,7 +57049,7 @@ process.env.NODE_ENV !== "production" ? NotchedOutline.propTypes /* remove-propt
|
|
|
57049
57049
|
style: PropTypes.object
|
|
57050
57050
|
} : void 0;
|
|
57051
57051
|
|
|
57052
|
-
const useUtilityClasses$
|
|
57052
|
+
const useUtilityClasses$M = ownerState => {
|
|
57053
57053
|
const {
|
|
57054
57054
|
classes
|
|
57055
57055
|
} = ownerState;
|
|
@@ -57227,7 +57227,7 @@ const OutlinedInput = /*#__PURE__*/React.forwardRef(function OutlinedInput(inPro
|
|
|
57227
57227
|
type = 'text',
|
|
57228
57228
|
...other
|
|
57229
57229
|
} = props;
|
|
57230
|
-
const classes = useUtilityClasses$
|
|
57230
|
+
const classes = useUtilityClasses$M(props);
|
|
57231
57231
|
const muiFormControl = useFormControl();
|
|
57232
57232
|
const fcs = formControlState({
|
|
57233
57233
|
props,
|
|
@@ -57465,7 +57465,7 @@ function getFormLabelUtilityClasses(slot) {
|
|
|
57465
57465
|
}
|
|
57466
57466
|
const formLabelClasses = generateUtilityClasses('MuiFormLabel', ['root', 'colorSecondary', 'focused', 'disabled', 'error', 'filled', 'required', 'asterisk']);
|
|
57467
57467
|
|
|
57468
|
-
const useUtilityClasses$
|
|
57468
|
+
const useUtilityClasses$L = ownerState => {
|
|
57469
57469
|
const {
|
|
57470
57470
|
classes,
|
|
57471
57471
|
color,
|
|
@@ -57562,7 +57562,7 @@ const FormLabel = /*#__PURE__*/React.forwardRef(function FormLabel(inProps, ref)
|
|
|
57562
57562
|
focused: fcs.focused,
|
|
57563
57563
|
required: fcs.required
|
|
57564
57564
|
};
|
|
57565
|
-
const classes = useUtilityClasses$
|
|
57565
|
+
const classes = useUtilityClasses$L(ownerState);
|
|
57566
57566
|
return /*#__PURE__*/jsxRuntimeExports.jsxs(FormLabelRoot, {
|
|
57567
57567
|
as: component,
|
|
57568
57568
|
ownerState: ownerState,
|
|
@@ -57636,7 +57636,7 @@ function getInputLabelUtilityClasses(slot) {
|
|
|
57636
57636
|
}
|
|
57637
57637
|
generateUtilityClasses('MuiInputLabel', ['root', 'focused', 'disabled', 'error', 'required', 'asterisk', 'formControl', 'sizeSmall', 'shrink', 'animated', 'standard', 'filled', 'outlined']);
|
|
57638
57638
|
|
|
57639
|
-
const useUtilityClasses$
|
|
57639
|
+
const useUtilityClasses$K = ownerState => {
|
|
57640
57640
|
const {
|
|
57641
57641
|
classes,
|
|
57642
57642
|
formControl,
|
|
@@ -57825,7 +57825,7 @@ const InputLabel = /*#__PURE__*/React.forwardRef(function InputLabel(inProps, re
|
|
|
57825
57825
|
required: fcs.required,
|
|
57826
57826
|
focused: fcs.focused
|
|
57827
57827
|
};
|
|
57828
|
-
const classes = useUtilityClasses$
|
|
57828
|
+
const classes = useUtilityClasses$K(ownerState);
|
|
57829
57829
|
return /*#__PURE__*/jsxRuntimeExports.jsx(InputLabelRoot, {
|
|
57830
57830
|
"data-shrink": shrink,
|
|
57831
57831
|
ref: ref,
|
|
@@ -57908,7 +57908,7 @@ function getFormControlUtilityClasses(slot) {
|
|
|
57908
57908
|
}
|
|
57909
57909
|
generateUtilityClasses('MuiFormControl', ['root', 'marginNone', 'marginNormal', 'marginDense', 'fullWidth', 'disabled']);
|
|
57910
57910
|
|
|
57911
|
-
const useUtilityClasses$
|
|
57911
|
+
const useUtilityClasses$J = ownerState => {
|
|
57912
57912
|
const {
|
|
57913
57913
|
classes,
|
|
57914
57914
|
margin,
|
|
@@ -58023,7 +58023,7 @@ const FormControl = /*#__PURE__*/React.forwardRef(function FormControl(inProps,
|
|
|
58023
58023
|
size,
|
|
58024
58024
|
variant
|
|
58025
58025
|
};
|
|
58026
|
-
const classes = useUtilityClasses$
|
|
58026
|
+
const classes = useUtilityClasses$J(ownerState);
|
|
58027
58027
|
const [adornedStart, setAdornedStart] = React.useState(() => {
|
|
58028
58028
|
// We need to iterate through the children and find the Input in order
|
|
58029
58029
|
// to fully support server-side rendering.
|
|
@@ -58205,7 +58205,7 @@ function getFormHelperTextUtilityClasses(slot) {
|
|
|
58205
58205
|
const formHelperTextClasses = generateUtilityClasses('MuiFormHelperText', ['root', 'error', 'disabled', 'sizeSmall', 'sizeMedium', 'contained', 'focused', 'filled', 'required']);
|
|
58206
58206
|
|
|
58207
58207
|
var _span$2;
|
|
58208
|
-
const useUtilityClasses$
|
|
58208
|
+
const useUtilityClasses$I = ownerState => {
|
|
58209
58209
|
const {
|
|
58210
58210
|
classes,
|
|
58211
58211
|
contained,
|
|
@@ -58302,7 +58302,7 @@ const FormHelperText = /*#__PURE__*/React.forwardRef(function FormHelperText(inP
|
|
|
58302
58302
|
|
|
58303
58303
|
// This issue explains why this is required: https://github.com/mui/material-ui/issues/42184
|
|
58304
58304
|
delete ownerState.ownerState;
|
|
58305
|
-
const classes = useUtilityClasses$
|
|
58305
|
+
const classes = useUtilityClasses$I(ownerState);
|
|
58306
58306
|
return /*#__PURE__*/jsxRuntimeExports.jsx(FormHelperTextRoot, {
|
|
58307
58307
|
as: component,
|
|
58308
58308
|
className: clsx(classes.root, className),
|
|
@@ -58389,7 +58389,7 @@ function getListUtilityClass(slot) {
|
|
|
58389
58389
|
}
|
|
58390
58390
|
generateUtilityClasses('MuiList', ['root', 'padding', 'dense', 'subheader']);
|
|
58391
58391
|
|
|
58392
|
-
const useUtilityClasses$
|
|
58392
|
+
const useUtilityClasses$H = ownerState => {
|
|
58393
58393
|
const {
|
|
58394
58394
|
classes,
|
|
58395
58395
|
disablePadding,
|
|
@@ -58455,7 +58455,7 @@ const List = /*#__PURE__*/React.forwardRef(function List(inProps, ref) {
|
|
|
58455
58455
|
dense,
|
|
58456
58456
|
disablePadding
|
|
58457
58457
|
};
|
|
58458
|
-
const classes = useUtilityClasses$
|
|
58458
|
+
const classes = useUtilityClasses$H(ownerState);
|
|
58459
58459
|
return /*#__PURE__*/jsxRuntimeExports.jsx(ListContext.Provider, {
|
|
58460
58460
|
value: context,
|
|
58461
58461
|
children: /*#__PURE__*/jsxRuntimeExports.jsxs(ListRoot, {
|
|
@@ -59838,7 +59838,7 @@ function getBackdropUtilityClass(slot) {
|
|
|
59838
59838
|
}
|
|
59839
59839
|
generateUtilityClasses('MuiBackdrop', ['root', 'invisible']);
|
|
59840
59840
|
|
|
59841
|
-
const useUtilityClasses$
|
|
59841
|
+
const useUtilityClasses$G = ownerState => {
|
|
59842
59842
|
const {
|
|
59843
59843
|
classes,
|
|
59844
59844
|
invisible
|
|
@@ -59901,7 +59901,7 @@ const Backdrop = /*#__PURE__*/React.forwardRef(function Backdrop(inProps, ref) {
|
|
|
59901
59901
|
component,
|
|
59902
59902
|
invisible
|
|
59903
59903
|
};
|
|
59904
|
-
const classes = useUtilityClasses$
|
|
59904
|
+
const classes = useUtilityClasses$G(ownerState);
|
|
59905
59905
|
const backwardCompatibleSlots = {
|
|
59906
59906
|
transition: TransitionComponentProp,
|
|
59907
59907
|
root: components.Root,
|
|
@@ -60220,7 +60220,7 @@ function getModalUtilityClass(slot) {
|
|
|
60220
60220
|
}
|
|
60221
60221
|
generateUtilityClasses('MuiModal', ['root', 'hidden', 'backdrop']);
|
|
60222
60222
|
|
|
60223
|
-
const useUtilityClasses$
|
|
60223
|
+
const useUtilityClasses$F = ownerState => {
|
|
60224
60224
|
const {
|
|
60225
60225
|
open,
|
|
60226
60226
|
exited,
|
|
@@ -60341,7 +60341,7 @@ const Modal = /*#__PURE__*/React.forwardRef(function Modal(inProps, ref) {
|
|
|
60341
60341
|
...propsWithDefaults,
|
|
60342
60342
|
exited
|
|
60343
60343
|
};
|
|
60344
|
-
const classes = useUtilityClasses$
|
|
60344
|
+
const classes = useUtilityClasses$F(ownerState);
|
|
60345
60345
|
const childProps = {};
|
|
60346
60346
|
if (children.props.tabIndex === undefined) {
|
|
60347
60347
|
childProps.tabIndex = '-1';
|
|
@@ -60625,7 +60625,7 @@ function getTransformOriginValue(transformOrigin) {
|
|
|
60625
60625
|
function resolveAnchorEl(anchorEl) {
|
|
60626
60626
|
return typeof anchorEl === 'function' ? anchorEl() : anchorEl;
|
|
60627
60627
|
}
|
|
60628
|
-
const useUtilityClasses$
|
|
60628
|
+
const useUtilityClasses$E = ownerState => {
|
|
60629
60629
|
const {
|
|
60630
60630
|
classes
|
|
60631
60631
|
} = ownerState;
|
|
@@ -60703,7 +60703,7 @@ const Popover = /*#__PURE__*/React.forwardRef(function Popover(inProps, ref) {
|
|
|
60703
60703
|
transitionDuration: transitionDurationProp,
|
|
60704
60704
|
TransitionProps
|
|
60705
60705
|
};
|
|
60706
|
-
const classes = useUtilityClasses$
|
|
60706
|
+
const classes = useUtilityClasses$E(ownerState);
|
|
60707
60707
|
|
|
60708
60708
|
// Returns the top/left offset of the position
|
|
60709
60709
|
// to attach to on the anchor element (or body if none is provided)
|
|
@@ -61167,7 +61167,7 @@ const LTR_ORIGIN = {
|
|
|
61167
61167
|
vertical: 'top',
|
|
61168
61168
|
horizontal: 'left'
|
|
61169
61169
|
};
|
|
61170
|
-
const useUtilityClasses$
|
|
61170
|
+
const useUtilityClasses$D = ownerState => {
|
|
61171
61171
|
const {
|
|
61172
61172
|
classes
|
|
61173
61173
|
} = ownerState;
|
|
@@ -61238,7 +61238,7 @@ const Menu = /*#__PURE__*/React.forwardRef(function Menu(inProps, ref) {
|
|
|
61238
61238
|
TransitionProps,
|
|
61239
61239
|
variant
|
|
61240
61240
|
};
|
|
61241
|
-
const classes = useUtilityClasses$
|
|
61241
|
+
const classes = useUtilityClasses$D(ownerState);
|
|
61242
61242
|
const autoFocusItem = autoFocus && !disableAutoFocusItem && open;
|
|
61243
61243
|
const menuListActionsRef = React.useRef(null);
|
|
61244
61244
|
const handleEntering = (element, isAppearing) => {
|
|
@@ -61484,7 +61484,7 @@ function getNativeSelectUtilityClasses(slot) {
|
|
|
61484
61484
|
}
|
|
61485
61485
|
const nativeSelectClasses = generateUtilityClasses('MuiNativeSelect', ['root', 'select', 'multiple', 'filled', 'outlined', 'standard', 'disabled', 'icon', 'iconOpen', 'iconFilled', 'iconOutlined', 'iconStandard', 'nativeInput', 'error']);
|
|
61486
61486
|
|
|
61487
|
-
const useUtilityClasses$
|
|
61487
|
+
const useUtilityClasses$C = ownerState => {
|
|
61488
61488
|
const {
|
|
61489
61489
|
classes,
|
|
61490
61490
|
variant,
|
|
@@ -61641,7 +61641,7 @@ const NativeSelectInput = /*#__PURE__*/React.forwardRef(function NativeSelectInp
|
|
|
61641
61641
|
variant,
|
|
61642
61642
|
error
|
|
61643
61643
|
};
|
|
61644
|
-
const classes = useUtilityClasses$
|
|
61644
|
+
const classes = useUtilityClasses$C(ownerState);
|
|
61645
61645
|
return /*#__PURE__*/jsxRuntimeExports.jsxs(React.Fragment, {
|
|
61646
61646
|
children: [/*#__PURE__*/jsxRuntimeExports.jsx(NativeSelectSelect, {
|
|
61647
61647
|
ownerState: ownerState,
|
|
@@ -61783,7 +61783,7 @@ function areEqualValues(a, b) {
|
|
|
61783
61783
|
function isEmpty$1(display) {
|
|
61784
61784
|
return display == null || typeof display === 'string' && !display.trim();
|
|
61785
61785
|
}
|
|
61786
|
-
const useUtilityClasses$
|
|
61786
|
+
const useUtilityClasses$B = ownerState => {
|
|
61787
61787
|
const {
|
|
61788
61788
|
classes,
|
|
61789
61789
|
variant,
|
|
@@ -62128,7 +62128,7 @@ const SelectInput$1 = /*#__PURE__*/React.forwardRef(function SelectInput(props,
|
|
|
62128
62128
|
open,
|
|
62129
62129
|
error
|
|
62130
62130
|
};
|
|
62131
|
-
const classes = useUtilityClasses$
|
|
62131
|
+
const classes = useUtilityClasses$B(ownerState);
|
|
62132
62132
|
const paperProps = {
|
|
62133
62133
|
...MenuProps.PaperProps,
|
|
62134
62134
|
...MenuProps.slotProps?.paper
|
|
@@ -62368,7 +62368,7 @@ process.env.NODE_ENV !== "production" ? SelectInput$1.propTypes = {
|
|
|
62368
62368
|
variant: PropTypes.oneOf(['standard', 'outlined', 'filled'])
|
|
62369
62369
|
} : void 0;
|
|
62370
62370
|
|
|
62371
|
-
const useUtilityClasses$
|
|
62371
|
+
const useUtilityClasses$A = ownerState => {
|
|
62372
62372
|
const {
|
|
62373
62373
|
classes
|
|
62374
62374
|
} = ownerState;
|
|
@@ -62401,7 +62401,7 @@ const Select = /*#__PURE__*/React.forwardRef(function Select(inProps, ref) {
|
|
|
62401
62401
|
className,
|
|
62402
62402
|
defaultOpen = false,
|
|
62403
62403
|
displayEmpty = false,
|
|
62404
|
-
IconComponent = ArrowDropDownIcon$
|
|
62404
|
+
IconComponent = ArrowDropDownIcon$2,
|
|
62405
62405
|
id,
|
|
62406
62406
|
input,
|
|
62407
62407
|
inputProps,
|
|
@@ -62431,7 +62431,7 @@ const Select = /*#__PURE__*/React.forwardRef(function Select(inProps, ref) {
|
|
|
62431
62431
|
variant,
|
|
62432
62432
|
classes: classesProp
|
|
62433
62433
|
};
|
|
62434
|
-
const classes = useUtilityClasses$
|
|
62434
|
+
const classes = useUtilityClasses$A(ownerState);
|
|
62435
62435
|
const {
|
|
62436
62436
|
root,
|
|
62437
62437
|
...restOfClasses
|
|
@@ -62655,7 +62655,7 @@ const variantComponent = {
|
|
|
62655
62655
|
filled: FilledInput,
|
|
62656
62656
|
outlined: OutlinedInput
|
|
62657
62657
|
};
|
|
62658
|
-
const useUtilityClasses$
|
|
62658
|
+
const useUtilityClasses$z = ownerState => {
|
|
62659
62659
|
const {
|
|
62660
62660
|
classes
|
|
62661
62661
|
} = ownerState;
|
|
@@ -62755,7 +62755,7 @@ const TextField = /*#__PURE__*/React.forwardRef(function TextField(inProps, ref)
|
|
|
62755
62755
|
select,
|
|
62756
62756
|
variant
|
|
62757
62757
|
};
|
|
62758
|
-
const classes = useUtilityClasses$
|
|
62758
|
+
const classes = useUtilityClasses$z(ownerState);
|
|
62759
62759
|
if (process.env.NODE_ENV !== 'production') {
|
|
62760
62760
|
if (select && !children) {
|
|
62761
62761
|
console.error('MUI: `children` must be passed when using the `TextField` component with `select`.');
|
|
@@ -63285,17 +63285,1250 @@ const BoxResizableSplit = props => {
|
|
|
63285
63285
|
});
|
|
63286
63286
|
};
|
|
63287
63287
|
|
|
63288
|
-
|
|
63289
|
-
|
|
63290
|
-
}
|
|
63288
|
+
function getButtonUtilityClass(slot) {
|
|
63289
|
+
return generateUtilityClass('MuiButton', slot);
|
|
63290
|
+
}
|
|
63291
|
+
const buttonClasses = generateUtilityClasses('MuiButton', ['root', 'text', 'textInherit', 'textPrimary', 'textSecondary', 'textSuccess', 'textError', 'textInfo', 'textWarning', 'outlined', 'outlinedInherit', 'outlinedPrimary', 'outlinedSecondary', 'outlinedSuccess', 'outlinedError', 'outlinedInfo', 'outlinedWarning', 'contained', 'containedInherit', 'containedPrimary', 'containedSecondary', 'containedSuccess', 'containedError', 'containedInfo', 'containedWarning', 'disableElevation', 'focusVisible', 'disabled', 'colorInherit', 'colorPrimary', 'colorSecondary', 'colorSuccess', 'colorError', 'colorInfo', 'colorWarning', 'textSizeSmall', 'textSizeMedium', 'textSizeLarge', 'outlinedSizeSmall', 'outlinedSizeMedium', 'outlinedSizeLarge', 'containedSizeSmall', 'containedSizeMedium', 'containedSizeLarge', 'sizeMedium', 'sizeSmall', 'sizeLarge', 'fullWidth', 'startIcon', 'endIcon', 'icon', 'iconSizeSmall', 'iconSizeMedium', 'iconSizeLarge', 'loading', 'loadingWrapper', 'loadingIconPlaceholder', 'loadingIndicator', 'loadingPositionCenter', 'loadingPositionStart', 'loadingPositionEnd']);
|
|
63291
63292
|
|
|
63292
|
-
|
|
63293
|
-
|
|
63294
|
-
|
|
63293
|
+
/**
|
|
63294
|
+
* @ignore - internal component.
|
|
63295
|
+
*/
|
|
63296
|
+
const ButtonGroupContext = /*#__PURE__*/React.createContext({});
|
|
63297
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
63298
|
+
ButtonGroupContext.displayName = 'ButtonGroupContext';
|
|
63299
|
+
}
|
|
63295
63300
|
|
|
63296
|
-
|
|
63297
|
-
|
|
63298
|
-
|
|
63301
|
+
/**
|
|
63302
|
+
* @ignore - internal component.
|
|
63303
|
+
*/
|
|
63304
|
+
const ButtonGroupButtonContext = /*#__PURE__*/React.createContext(undefined);
|
|
63305
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
63306
|
+
ButtonGroupButtonContext.displayName = 'ButtonGroupButtonContext';
|
|
63307
|
+
}
|
|
63308
|
+
|
|
63309
|
+
const useUtilityClasses$y = ownerState => {
|
|
63310
|
+
const {
|
|
63311
|
+
color,
|
|
63312
|
+
disableElevation,
|
|
63313
|
+
fullWidth,
|
|
63314
|
+
size,
|
|
63315
|
+
variant,
|
|
63316
|
+
loading,
|
|
63317
|
+
loadingPosition,
|
|
63318
|
+
classes
|
|
63319
|
+
} = ownerState;
|
|
63320
|
+
const slots = {
|
|
63321
|
+
root: ['root', loading && 'loading', variant, `${variant}${capitalize(color)}`, `size${capitalize(size)}`, `${variant}Size${capitalize(size)}`, `color${capitalize(color)}`, disableElevation && 'disableElevation', fullWidth && 'fullWidth', loading && `loadingPosition${capitalize(loadingPosition)}`],
|
|
63322
|
+
startIcon: ['icon', 'startIcon', `iconSize${capitalize(size)}`],
|
|
63323
|
+
endIcon: ['icon', 'endIcon', `iconSize${capitalize(size)}`],
|
|
63324
|
+
loadingIndicator: ['loadingIndicator'],
|
|
63325
|
+
loadingWrapper: ['loadingWrapper']
|
|
63326
|
+
};
|
|
63327
|
+
const composedClasses = composeClasses(slots, getButtonUtilityClass, classes);
|
|
63328
|
+
return {
|
|
63329
|
+
...classes,
|
|
63330
|
+
// forward the focused, disabled, etc. classes to the ButtonBase
|
|
63331
|
+
...composedClasses
|
|
63332
|
+
};
|
|
63333
|
+
};
|
|
63334
|
+
const commonIconStyles = [{
|
|
63335
|
+
props: {
|
|
63336
|
+
size: 'small'
|
|
63337
|
+
},
|
|
63338
|
+
style: {
|
|
63339
|
+
'& > *:nth-of-type(1)': {
|
|
63340
|
+
fontSize: 18
|
|
63341
|
+
}
|
|
63342
|
+
}
|
|
63343
|
+
}, {
|
|
63344
|
+
props: {
|
|
63345
|
+
size: 'medium'
|
|
63346
|
+
},
|
|
63347
|
+
style: {
|
|
63348
|
+
'& > *:nth-of-type(1)': {
|
|
63349
|
+
fontSize: 20
|
|
63350
|
+
}
|
|
63351
|
+
}
|
|
63352
|
+
}, {
|
|
63353
|
+
props: {
|
|
63354
|
+
size: 'large'
|
|
63355
|
+
},
|
|
63356
|
+
style: {
|
|
63357
|
+
'& > *:nth-of-type(1)': {
|
|
63358
|
+
fontSize: 22
|
|
63359
|
+
}
|
|
63360
|
+
}
|
|
63361
|
+
}];
|
|
63362
|
+
const ButtonRoot = styled(ButtonBase, {
|
|
63363
|
+
shouldForwardProp: prop => rootShouldForwardProp(prop) || prop === 'classes',
|
|
63364
|
+
name: 'MuiButton',
|
|
63365
|
+
slot: 'Root',
|
|
63366
|
+
overridesResolver: (props, styles) => {
|
|
63367
|
+
const {
|
|
63368
|
+
ownerState
|
|
63369
|
+
} = props;
|
|
63370
|
+
return [styles.root, styles[ownerState.variant], styles[`${ownerState.variant}${capitalize(ownerState.color)}`], styles[`size${capitalize(ownerState.size)}`], styles[`${ownerState.variant}Size${capitalize(ownerState.size)}`], ownerState.color === 'inherit' && styles.colorInherit, ownerState.disableElevation && styles.disableElevation, ownerState.fullWidth && styles.fullWidth, ownerState.loading && styles.loading];
|
|
63371
|
+
}
|
|
63372
|
+
})(memoTheme(({
|
|
63373
|
+
theme
|
|
63374
|
+
}) => {
|
|
63375
|
+
const inheritContainedBackgroundColor = theme.palette.mode === 'light' ? theme.palette.grey[300] : theme.palette.grey[800];
|
|
63376
|
+
const inheritContainedHoverBackgroundColor = theme.palette.mode === 'light' ? theme.palette.grey.A100 : theme.palette.grey[700];
|
|
63377
|
+
return {
|
|
63378
|
+
...theme.typography.button,
|
|
63379
|
+
minWidth: 64,
|
|
63380
|
+
padding: '6px 16px',
|
|
63381
|
+
border: 0,
|
|
63382
|
+
borderRadius: (theme.vars || theme).shape.borderRadius,
|
|
63383
|
+
transition: theme.transitions.create(['background-color', 'box-shadow', 'border-color', 'color'], {
|
|
63384
|
+
duration: theme.transitions.duration.short
|
|
63385
|
+
}),
|
|
63386
|
+
'&:hover': {
|
|
63387
|
+
textDecoration: 'none'
|
|
63388
|
+
},
|
|
63389
|
+
[`&.${buttonClasses.disabled}`]: {
|
|
63390
|
+
color: (theme.vars || theme).palette.action.disabled
|
|
63391
|
+
},
|
|
63392
|
+
variants: [{
|
|
63393
|
+
props: {
|
|
63394
|
+
variant: 'contained'
|
|
63395
|
+
},
|
|
63396
|
+
style: {
|
|
63397
|
+
color: `var(--variant-containedColor)`,
|
|
63398
|
+
backgroundColor: `var(--variant-containedBg)`,
|
|
63399
|
+
boxShadow: (theme.vars || theme).shadows[2],
|
|
63400
|
+
'&:hover': {
|
|
63401
|
+
boxShadow: (theme.vars || theme).shadows[4],
|
|
63402
|
+
// Reset on touch devices, it doesn't add specificity
|
|
63403
|
+
'@media (hover: none)': {
|
|
63404
|
+
boxShadow: (theme.vars || theme).shadows[2]
|
|
63405
|
+
}
|
|
63406
|
+
},
|
|
63407
|
+
'&:active': {
|
|
63408
|
+
boxShadow: (theme.vars || theme).shadows[8]
|
|
63409
|
+
},
|
|
63410
|
+
[`&.${buttonClasses.focusVisible}`]: {
|
|
63411
|
+
boxShadow: (theme.vars || theme).shadows[6]
|
|
63412
|
+
},
|
|
63413
|
+
[`&.${buttonClasses.disabled}`]: {
|
|
63414
|
+
color: (theme.vars || theme).palette.action.disabled,
|
|
63415
|
+
boxShadow: (theme.vars || theme).shadows[0],
|
|
63416
|
+
backgroundColor: (theme.vars || theme).palette.action.disabledBackground
|
|
63417
|
+
}
|
|
63418
|
+
}
|
|
63419
|
+
}, {
|
|
63420
|
+
props: {
|
|
63421
|
+
variant: 'outlined'
|
|
63422
|
+
},
|
|
63423
|
+
style: {
|
|
63424
|
+
padding: '5px 15px',
|
|
63425
|
+
border: '1px solid currentColor',
|
|
63426
|
+
borderColor: `var(--variant-outlinedBorder, currentColor)`,
|
|
63427
|
+
backgroundColor: `var(--variant-outlinedBg)`,
|
|
63428
|
+
color: `var(--variant-outlinedColor)`,
|
|
63429
|
+
[`&.${buttonClasses.disabled}`]: {
|
|
63430
|
+
border: `1px solid ${(theme.vars || theme).palette.action.disabledBackground}`
|
|
63431
|
+
}
|
|
63432
|
+
}
|
|
63433
|
+
}, {
|
|
63434
|
+
props: {
|
|
63435
|
+
variant: 'text'
|
|
63436
|
+
},
|
|
63437
|
+
style: {
|
|
63438
|
+
padding: '6px 8px',
|
|
63439
|
+
color: `var(--variant-textColor)`,
|
|
63440
|
+
backgroundColor: `var(--variant-textBg)`
|
|
63441
|
+
}
|
|
63442
|
+
}, ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(([color]) => ({
|
|
63443
|
+
props: {
|
|
63444
|
+
color
|
|
63445
|
+
},
|
|
63446
|
+
style: {
|
|
63447
|
+
'--variant-textColor': (theme.vars || theme).palette[color].main,
|
|
63448
|
+
'--variant-outlinedColor': (theme.vars || theme).palette[color].main,
|
|
63449
|
+
'--variant-outlinedBorder': theme.vars ? `rgba(${theme.vars.palette[color].mainChannel} / 0.5)` : alpha$1(theme.palette[color].main, 0.5),
|
|
63450
|
+
'--variant-containedColor': (theme.vars || theme).palette[color].contrastText,
|
|
63451
|
+
'--variant-containedBg': (theme.vars || theme).palette[color].main,
|
|
63452
|
+
'@media (hover: hover)': {
|
|
63453
|
+
'&:hover': {
|
|
63454
|
+
'--variant-containedBg': (theme.vars || theme).palette[color].dark,
|
|
63455
|
+
'--variant-textBg': theme.vars ? `rgba(${theme.vars.palette[color].mainChannel} / ${theme.vars.palette.action.hoverOpacity})` : alpha$1(theme.palette[color].main, theme.palette.action.hoverOpacity),
|
|
63456
|
+
'--variant-outlinedBorder': (theme.vars || theme).palette[color].main,
|
|
63457
|
+
'--variant-outlinedBg': theme.vars ? `rgba(${theme.vars.palette[color].mainChannel} / ${theme.vars.palette.action.hoverOpacity})` : alpha$1(theme.palette[color].main, theme.palette.action.hoverOpacity)
|
|
63458
|
+
}
|
|
63459
|
+
}
|
|
63460
|
+
}
|
|
63461
|
+
})), {
|
|
63462
|
+
props: {
|
|
63463
|
+
color: 'inherit'
|
|
63464
|
+
},
|
|
63465
|
+
style: {
|
|
63466
|
+
color: 'inherit',
|
|
63467
|
+
borderColor: 'currentColor',
|
|
63468
|
+
'--variant-containedBg': theme.vars ? theme.vars.palette.Button.inheritContainedBg : inheritContainedBackgroundColor,
|
|
63469
|
+
'@media (hover: hover)': {
|
|
63470
|
+
'&:hover': {
|
|
63471
|
+
'--variant-containedBg': theme.vars ? theme.vars.palette.Button.inheritContainedHoverBg : inheritContainedHoverBackgroundColor,
|
|
63472
|
+
'--variant-textBg': theme.vars ? `rgba(${theme.vars.palette.text.primaryChannel} / ${theme.vars.palette.action.hoverOpacity})` : alpha$1(theme.palette.text.primary, theme.palette.action.hoverOpacity),
|
|
63473
|
+
'--variant-outlinedBg': theme.vars ? `rgba(${theme.vars.palette.text.primaryChannel} / ${theme.vars.palette.action.hoverOpacity})` : alpha$1(theme.palette.text.primary, theme.palette.action.hoverOpacity)
|
|
63474
|
+
}
|
|
63475
|
+
}
|
|
63476
|
+
}
|
|
63477
|
+
}, {
|
|
63478
|
+
props: {
|
|
63479
|
+
size: 'small',
|
|
63480
|
+
variant: 'text'
|
|
63481
|
+
},
|
|
63482
|
+
style: {
|
|
63483
|
+
padding: '4px 5px',
|
|
63484
|
+
fontSize: theme.typography.pxToRem(13)
|
|
63485
|
+
}
|
|
63486
|
+
}, {
|
|
63487
|
+
props: {
|
|
63488
|
+
size: 'large',
|
|
63489
|
+
variant: 'text'
|
|
63490
|
+
},
|
|
63491
|
+
style: {
|
|
63492
|
+
padding: '8px 11px',
|
|
63493
|
+
fontSize: theme.typography.pxToRem(15)
|
|
63494
|
+
}
|
|
63495
|
+
}, {
|
|
63496
|
+
props: {
|
|
63497
|
+
size: 'small',
|
|
63498
|
+
variant: 'outlined'
|
|
63499
|
+
},
|
|
63500
|
+
style: {
|
|
63501
|
+
padding: '3px 9px',
|
|
63502
|
+
fontSize: theme.typography.pxToRem(13)
|
|
63503
|
+
}
|
|
63504
|
+
}, {
|
|
63505
|
+
props: {
|
|
63506
|
+
size: 'large',
|
|
63507
|
+
variant: 'outlined'
|
|
63508
|
+
},
|
|
63509
|
+
style: {
|
|
63510
|
+
padding: '7px 21px',
|
|
63511
|
+
fontSize: theme.typography.pxToRem(15)
|
|
63512
|
+
}
|
|
63513
|
+
}, {
|
|
63514
|
+
props: {
|
|
63515
|
+
size: 'small',
|
|
63516
|
+
variant: 'contained'
|
|
63517
|
+
},
|
|
63518
|
+
style: {
|
|
63519
|
+
padding: '4px 10px',
|
|
63520
|
+
fontSize: theme.typography.pxToRem(13)
|
|
63521
|
+
}
|
|
63522
|
+
}, {
|
|
63523
|
+
props: {
|
|
63524
|
+
size: 'large',
|
|
63525
|
+
variant: 'contained'
|
|
63526
|
+
},
|
|
63527
|
+
style: {
|
|
63528
|
+
padding: '8px 22px',
|
|
63529
|
+
fontSize: theme.typography.pxToRem(15)
|
|
63530
|
+
}
|
|
63531
|
+
}, {
|
|
63532
|
+
props: {
|
|
63533
|
+
disableElevation: true
|
|
63534
|
+
},
|
|
63535
|
+
style: {
|
|
63536
|
+
boxShadow: 'none',
|
|
63537
|
+
'&:hover': {
|
|
63538
|
+
boxShadow: 'none'
|
|
63539
|
+
},
|
|
63540
|
+
[`&.${buttonClasses.focusVisible}`]: {
|
|
63541
|
+
boxShadow: 'none'
|
|
63542
|
+
},
|
|
63543
|
+
'&:active': {
|
|
63544
|
+
boxShadow: 'none'
|
|
63545
|
+
},
|
|
63546
|
+
[`&.${buttonClasses.disabled}`]: {
|
|
63547
|
+
boxShadow: 'none'
|
|
63548
|
+
}
|
|
63549
|
+
}
|
|
63550
|
+
}, {
|
|
63551
|
+
props: {
|
|
63552
|
+
fullWidth: true
|
|
63553
|
+
},
|
|
63554
|
+
style: {
|
|
63555
|
+
width: '100%'
|
|
63556
|
+
}
|
|
63557
|
+
}, {
|
|
63558
|
+
props: {
|
|
63559
|
+
loadingPosition: 'center'
|
|
63560
|
+
},
|
|
63561
|
+
style: {
|
|
63562
|
+
transition: theme.transitions.create(['background-color', 'box-shadow', 'border-color'], {
|
|
63563
|
+
duration: theme.transitions.duration.short
|
|
63564
|
+
}),
|
|
63565
|
+
[`&.${buttonClasses.loading}`]: {
|
|
63566
|
+
color: 'transparent'
|
|
63567
|
+
}
|
|
63568
|
+
}
|
|
63569
|
+
}]
|
|
63570
|
+
};
|
|
63571
|
+
}));
|
|
63572
|
+
const ButtonStartIcon = styled('span', {
|
|
63573
|
+
name: 'MuiButton',
|
|
63574
|
+
slot: 'StartIcon',
|
|
63575
|
+
overridesResolver: (props, styles) => {
|
|
63576
|
+
const {
|
|
63577
|
+
ownerState
|
|
63578
|
+
} = props;
|
|
63579
|
+
return [styles.startIcon, ownerState.loading && styles.startIconLoadingStart, styles[`iconSize${capitalize(ownerState.size)}`]];
|
|
63580
|
+
}
|
|
63581
|
+
})(({
|
|
63582
|
+
theme
|
|
63583
|
+
}) => ({
|
|
63584
|
+
display: 'inherit',
|
|
63585
|
+
marginRight: 8,
|
|
63586
|
+
marginLeft: -4,
|
|
63587
|
+
variants: [{
|
|
63588
|
+
props: {
|
|
63589
|
+
size: 'small'
|
|
63590
|
+
},
|
|
63591
|
+
style: {
|
|
63592
|
+
marginLeft: -2
|
|
63593
|
+
}
|
|
63594
|
+
}, {
|
|
63595
|
+
props: {
|
|
63596
|
+
loadingPosition: 'start',
|
|
63597
|
+
loading: true
|
|
63598
|
+
},
|
|
63599
|
+
style: {
|
|
63600
|
+
transition: theme.transitions.create(['opacity'], {
|
|
63601
|
+
duration: theme.transitions.duration.short
|
|
63602
|
+
}),
|
|
63603
|
+
opacity: 0
|
|
63604
|
+
}
|
|
63605
|
+
}, {
|
|
63606
|
+
props: {
|
|
63607
|
+
loadingPosition: 'start',
|
|
63608
|
+
loading: true,
|
|
63609
|
+
fullWidth: true
|
|
63610
|
+
},
|
|
63611
|
+
style: {
|
|
63612
|
+
marginRight: -8
|
|
63613
|
+
}
|
|
63614
|
+
}, ...commonIconStyles]
|
|
63615
|
+
}));
|
|
63616
|
+
const ButtonEndIcon = styled('span', {
|
|
63617
|
+
name: 'MuiButton',
|
|
63618
|
+
slot: 'EndIcon',
|
|
63619
|
+
overridesResolver: (props, styles) => {
|
|
63620
|
+
const {
|
|
63621
|
+
ownerState
|
|
63622
|
+
} = props;
|
|
63623
|
+
return [styles.endIcon, ownerState.loading && styles.endIconLoadingEnd, styles[`iconSize${capitalize(ownerState.size)}`]];
|
|
63624
|
+
}
|
|
63625
|
+
})(({
|
|
63626
|
+
theme
|
|
63627
|
+
}) => ({
|
|
63628
|
+
display: 'inherit',
|
|
63629
|
+
marginRight: -4,
|
|
63630
|
+
marginLeft: 8,
|
|
63631
|
+
variants: [{
|
|
63632
|
+
props: {
|
|
63633
|
+
size: 'small'
|
|
63634
|
+
},
|
|
63635
|
+
style: {
|
|
63636
|
+
marginRight: -2
|
|
63637
|
+
}
|
|
63638
|
+
}, {
|
|
63639
|
+
props: {
|
|
63640
|
+
loadingPosition: 'end',
|
|
63641
|
+
loading: true
|
|
63642
|
+
},
|
|
63643
|
+
style: {
|
|
63644
|
+
transition: theme.transitions.create(['opacity'], {
|
|
63645
|
+
duration: theme.transitions.duration.short
|
|
63646
|
+
}),
|
|
63647
|
+
opacity: 0
|
|
63648
|
+
}
|
|
63649
|
+
}, {
|
|
63650
|
+
props: {
|
|
63651
|
+
loadingPosition: 'end',
|
|
63652
|
+
loading: true,
|
|
63653
|
+
fullWidth: true
|
|
63654
|
+
},
|
|
63655
|
+
style: {
|
|
63656
|
+
marginLeft: -8
|
|
63657
|
+
}
|
|
63658
|
+
}, ...commonIconStyles]
|
|
63659
|
+
}));
|
|
63660
|
+
const ButtonLoadingIndicator = styled('span', {
|
|
63661
|
+
name: 'MuiButton',
|
|
63662
|
+
slot: 'LoadingIndicator'
|
|
63663
|
+
})(({
|
|
63664
|
+
theme
|
|
63665
|
+
}) => ({
|
|
63666
|
+
display: 'none',
|
|
63667
|
+
position: 'absolute',
|
|
63668
|
+
visibility: 'visible',
|
|
63669
|
+
variants: [{
|
|
63670
|
+
props: {
|
|
63671
|
+
loading: true
|
|
63672
|
+
},
|
|
63673
|
+
style: {
|
|
63674
|
+
display: 'flex'
|
|
63675
|
+
}
|
|
63676
|
+
}, {
|
|
63677
|
+
props: {
|
|
63678
|
+
loadingPosition: 'start'
|
|
63679
|
+
},
|
|
63680
|
+
style: {
|
|
63681
|
+
left: 14
|
|
63682
|
+
}
|
|
63683
|
+
}, {
|
|
63684
|
+
props: {
|
|
63685
|
+
loadingPosition: 'start',
|
|
63686
|
+
size: 'small'
|
|
63687
|
+
},
|
|
63688
|
+
style: {
|
|
63689
|
+
left: 10
|
|
63690
|
+
}
|
|
63691
|
+
}, {
|
|
63692
|
+
props: {
|
|
63693
|
+
variant: 'text',
|
|
63694
|
+
loadingPosition: 'start'
|
|
63695
|
+
},
|
|
63696
|
+
style: {
|
|
63697
|
+
left: 6
|
|
63698
|
+
}
|
|
63699
|
+
}, {
|
|
63700
|
+
props: {
|
|
63701
|
+
loadingPosition: 'center'
|
|
63702
|
+
},
|
|
63703
|
+
style: {
|
|
63704
|
+
left: '50%',
|
|
63705
|
+
transform: 'translate(-50%)',
|
|
63706
|
+
color: (theme.vars || theme).palette.action.disabled
|
|
63707
|
+
}
|
|
63708
|
+
}, {
|
|
63709
|
+
props: {
|
|
63710
|
+
loadingPosition: 'end'
|
|
63711
|
+
},
|
|
63712
|
+
style: {
|
|
63713
|
+
right: 14
|
|
63714
|
+
}
|
|
63715
|
+
}, {
|
|
63716
|
+
props: {
|
|
63717
|
+
loadingPosition: 'end',
|
|
63718
|
+
size: 'small'
|
|
63719
|
+
},
|
|
63720
|
+
style: {
|
|
63721
|
+
right: 10
|
|
63722
|
+
}
|
|
63723
|
+
}, {
|
|
63724
|
+
props: {
|
|
63725
|
+
variant: 'text',
|
|
63726
|
+
loadingPosition: 'end'
|
|
63727
|
+
},
|
|
63728
|
+
style: {
|
|
63729
|
+
right: 6
|
|
63730
|
+
}
|
|
63731
|
+
}, {
|
|
63732
|
+
props: {
|
|
63733
|
+
loadingPosition: 'start',
|
|
63734
|
+
fullWidth: true
|
|
63735
|
+
},
|
|
63736
|
+
style: {
|
|
63737
|
+
position: 'relative',
|
|
63738
|
+
left: -10
|
|
63739
|
+
}
|
|
63740
|
+
}, {
|
|
63741
|
+
props: {
|
|
63742
|
+
loadingPosition: 'end',
|
|
63743
|
+
fullWidth: true
|
|
63744
|
+
},
|
|
63745
|
+
style: {
|
|
63746
|
+
position: 'relative',
|
|
63747
|
+
right: -10
|
|
63748
|
+
}
|
|
63749
|
+
}]
|
|
63750
|
+
}));
|
|
63751
|
+
const ButtonLoadingIconPlaceholder = styled('span', {
|
|
63752
|
+
name: 'MuiButton',
|
|
63753
|
+
slot: 'LoadingIconPlaceholder'
|
|
63754
|
+
})({
|
|
63755
|
+
display: 'inline-block',
|
|
63756
|
+
width: '1em',
|
|
63757
|
+
height: '1em'
|
|
63758
|
+
});
|
|
63759
|
+
const Button = /*#__PURE__*/React.forwardRef(function Button(inProps, ref) {
|
|
63760
|
+
// props priority: `inProps` > `contextProps` > `themeDefaultProps`
|
|
63761
|
+
const contextProps = React.useContext(ButtonGroupContext);
|
|
63762
|
+
const buttonGroupButtonContextPositionClassName = React.useContext(ButtonGroupButtonContext);
|
|
63763
|
+
const resolvedProps = resolveProps(contextProps, inProps);
|
|
63764
|
+
const props = useDefaultProps({
|
|
63765
|
+
props: resolvedProps,
|
|
63766
|
+
name: 'MuiButton'
|
|
63767
|
+
});
|
|
63768
|
+
const {
|
|
63769
|
+
children,
|
|
63770
|
+
color = 'primary',
|
|
63771
|
+
component = 'button',
|
|
63772
|
+
className,
|
|
63773
|
+
disabled = false,
|
|
63774
|
+
disableElevation = false,
|
|
63775
|
+
disableFocusRipple = false,
|
|
63776
|
+
endIcon: endIconProp,
|
|
63777
|
+
focusVisibleClassName,
|
|
63778
|
+
fullWidth = false,
|
|
63779
|
+
id: idProp,
|
|
63780
|
+
loading = null,
|
|
63781
|
+
loadingIndicator: loadingIndicatorProp,
|
|
63782
|
+
loadingPosition = 'center',
|
|
63783
|
+
size = 'medium',
|
|
63784
|
+
startIcon: startIconProp,
|
|
63785
|
+
type,
|
|
63786
|
+
variant = 'text',
|
|
63787
|
+
...other
|
|
63788
|
+
} = props;
|
|
63789
|
+
const loadingId = useId(idProp);
|
|
63790
|
+
const loadingIndicator = loadingIndicatorProp ?? /*#__PURE__*/jsxRuntimeExports.jsx(CircularProgress$1, {
|
|
63791
|
+
"aria-labelledby": loadingId,
|
|
63792
|
+
color: "inherit",
|
|
63793
|
+
size: 16
|
|
63794
|
+
});
|
|
63795
|
+
const ownerState = {
|
|
63796
|
+
...props,
|
|
63797
|
+
color,
|
|
63798
|
+
component,
|
|
63799
|
+
disabled,
|
|
63800
|
+
disableElevation,
|
|
63801
|
+
disableFocusRipple,
|
|
63802
|
+
fullWidth,
|
|
63803
|
+
loading,
|
|
63804
|
+
loadingIndicator,
|
|
63805
|
+
loadingPosition,
|
|
63806
|
+
size,
|
|
63807
|
+
type,
|
|
63808
|
+
variant
|
|
63809
|
+
};
|
|
63810
|
+
const classes = useUtilityClasses$y(ownerState);
|
|
63811
|
+
const startIcon = (startIconProp || loading && loadingPosition === 'start') && /*#__PURE__*/jsxRuntimeExports.jsx(ButtonStartIcon, {
|
|
63812
|
+
className: classes.startIcon,
|
|
63813
|
+
ownerState: ownerState,
|
|
63814
|
+
children: startIconProp || /*#__PURE__*/jsxRuntimeExports.jsx(ButtonLoadingIconPlaceholder, {
|
|
63815
|
+
className: classes.loadingIconPlaceholder,
|
|
63816
|
+
ownerState: ownerState
|
|
63817
|
+
})
|
|
63818
|
+
});
|
|
63819
|
+
const endIcon = (endIconProp || loading && loadingPosition === 'end') && /*#__PURE__*/jsxRuntimeExports.jsx(ButtonEndIcon, {
|
|
63820
|
+
className: classes.endIcon,
|
|
63821
|
+
ownerState: ownerState,
|
|
63822
|
+
children: endIconProp || /*#__PURE__*/jsxRuntimeExports.jsx(ButtonLoadingIconPlaceholder, {
|
|
63823
|
+
className: classes.loadingIconPlaceholder,
|
|
63824
|
+
ownerState: ownerState
|
|
63825
|
+
})
|
|
63826
|
+
});
|
|
63827
|
+
const positionClassName = buttonGroupButtonContextPositionClassName || '';
|
|
63828
|
+
const loader = typeof loading === 'boolean' ?
|
|
63829
|
+
/*#__PURE__*/
|
|
63830
|
+
// use plain HTML span to minimize the runtime overhead
|
|
63831
|
+
jsxRuntimeExports.jsx("span", {
|
|
63832
|
+
className: classes.loadingWrapper,
|
|
63833
|
+
style: {
|
|
63834
|
+
display: 'contents'
|
|
63835
|
+
},
|
|
63836
|
+
children: loading && /*#__PURE__*/jsxRuntimeExports.jsx(ButtonLoadingIndicator, {
|
|
63837
|
+
className: classes.loadingIndicator,
|
|
63838
|
+
ownerState: ownerState,
|
|
63839
|
+
children: loadingIndicator
|
|
63840
|
+
})
|
|
63841
|
+
}) : null;
|
|
63842
|
+
return /*#__PURE__*/jsxRuntimeExports.jsxs(ButtonRoot, {
|
|
63843
|
+
ownerState: ownerState,
|
|
63844
|
+
className: clsx(contextProps.className, classes.root, className, positionClassName),
|
|
63845
|
+
component: component,
|
|
63846
|
+
disabled: disabled || loading,
|
|
63847
|
+
focusRipple: !disableFocusRipple,
|
|
63848
|
+
focusVisibleClassName: clsx(classes.focusVisible, focusVisibleClassName),
|
|
63849
|
+
ref: ref,
|
|
63850
|
+
type: type,
|
|
63851
|
+
id: loading ? loadingId : idProp,
|
|
63852
|
+
...other,
|
|
63853
|
+
classes: classes,
|
|
63854
|
+
children: [startIcon, loadingPosition !== 'end' && loader, children, loadingPosition === 'end' && loader, endIcon]
|
|
63855
|
+
});
|
|
63856
|
+
});
|
|
63857
|
+
process.env.NODE_ENV !== "production" ? Button.propTypes /* remove-proptypes */ = {
|
|
63858
|
+
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
63859
|
+
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
63860
|
+
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
63861
|
+
// └─────────────────────────────────────────────────────────────────────┘
|
|
63862
|
+
/**
|
|
63863
|
+
* The content of the component.
|
|
63864
|
+
*/
|
|
63865
|
+
children: PropTypes.node,
|
|
63866
|
+
/**
|
|
63867
|
+
* Override or extend the styles applied to the component.
|
|
63868
|
+
*/
|
|
63869
|
+
classes: PropTypes.object,
|
|
63870
|
+
/**
|
|
63871
|
+
* @ignore
|
|
63872
|
+
*/
|
|
63873
|
+
className: PropTypes.string,
|
|
63874
|
+
/**
|
|
63875
|
+
* The color of the component.
|
|
63876
|
+
* It supports both default and custom theme colors, which can be added as shown in the
|
|
63877
|
+
* [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
|
|
63878
|
+
* @default 'primary'
|
|
63879
|
+
*/
|
|
63880
|
+
color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['inherit', 'primary', 'secondary', 'success', 'error', 'info', 'warning']), PropTypes.string]),
|
|
63881
|
+
/**
|
|
63882
|
+
* The component used for the root node.
|
|
63883
|
+
* Either a string to use a HTML element or a component.
|
|
63884
|
+
*/
|
|
63885
|
+
component: PropTypes.elementType,
|
|
63886
|
+
/**
|
|
63887
|
+
* If `true`, the component is disabled.
|
|
63888
|
+
* @default false
|
|
63889
|
+
*/
|
|
63890
|
+
disabled: PropTypes.bool,
|
|
63891
|
+
/**
|
|
63892
|
+
* If `true`, no elevation is used.
|
|
63893
|
+
* @default false
|
|
63894
|
+
*/
|
|
63895
|
+
disableElevation: PropTypes.bool,
|
|
63896
|
+
/**
|
|
63897
|
+
* If `true`, the keyboard focus ripple is disabled.
|
|
63898
|
+
* @default false
|
|
63899
|
+
*/
|
|
63900
|
+
disableFocusRipple: PropTypes.bool,
|
|
63901
|
+
/**
|
|
63902
|
+
* If `true`, the ripple effect is disabled.
|
|
63903
|
+
*
|
|
63904
|
+
* ⚠️ Without a ripple there is no styling for :focus-visible by default. Be sure
|
|
63905
|
+
* to highlight the element by applying separate styles with the `.Mui-focusVisible` class.
|
|
63906
|
+
* @default false
|
|
63907
|
+
*/
|
|
63908
|
+
disableRipple: PropTypes.bool,
|
|
63909
|
+
/**
|
|
63910
|
+
* Element placed after the children.
|
|
63911
|
+
*/
|
|
63912
|
+
endIcon: PropTypes.node,
|
|
63913
|
+
/**
|
|
63914
|
+
* @ignore
|
|
63915
|
+
*/
|
|
63916
|
+
focusVisibleClassName: PropTypes.string,
|
|
63917
|
+
/**
|
|
63918
|
+
* If `true`, the button will take up the full width of its container.
|
|
63919
|
+
* @default false
|
|
63920
|
+
*/
|
|
63921
|
+
fullWidth: PropTypes.bool,
|
|
63922
|
+
/**
|
|
63923
|
+
* The URL to link to when the button is clicked.
|
|
63924
|
+
* If defined, an `a` element will be used as the root node.
|
|
63925
|
+
*/
|
|
63926
|
+
href: PropTypes.string,
|
|
63927
|
+
/**
|
|
63928
|
+
* @ignore
|
|
63929
|
+
*/
|
|
63930
|
+
id: PropTypes.string,
|
|
63931
|
+
/**
|
|
63932
|
+
* If `true`, the loading indicator is visible and the button is disabled.
|
|
63933
|
+
* If `true | false`, the loading wrapper is always rendered before the children to prevent [Google Translation Crash](https://github.com/mui/material-ui/issues/27853).
|
|
63934
|
+
* @default null
|
|
63935
|
+
*/
|
|
63936
|
+
loading: PropTypes.bool,
|
|
63937
|
+
/**
|
|
63938
|
+
* Element placed before the children if the button is in loading state.
|
|
63939
|
+
* The node should contain an element with `role="progressbar"` with an accessible name.
|
|
63940
|
+
* By default, it renders a `CircularProgress` that is labeled by the button itself.
|
|
63941
|
+
* @default <CircularProgress color="inherit" size={16} />
|
|
63942
|
+
*/
|
|
63943
|
+
loadingIndicator: PropTypes.node,
|
|
63944
|
+
/**
|
|
63945
|
+
* The loading indicator can be positioned on the start, end, or the center of the button.
|
|
63946
|
+
* @default 'center'
|
|
63947
|
+
*/
|
|
63948
|
+
loadingPosition: PropTypes.oneOf(['center', 'end', 'start']),
|
|
63949
|
+
/**
|
|
63950
|
+
* The size of the component.
|
|
63951
|
+
* `small` is equivalent to the dense button styling.
|
|
63952
|
+
* @default 'medium'
|
|
63953
|
+
*/
|
|
63954
|
+
size: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['small', 'medium', 'large']), PropTypes.string]),
|
|
63955
|
+
/**
|
|
63956
|
+
* Element placed before the children.
|
|
63957
|
+
*/
|
|
63958
|
+
startIcon: PropTypes.node,
|
|
63959
|
+
/**
|
|
63960
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
63961
|
+
*/
|
|
63962
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
63963
|
+
/**
|
|
63964
|
+
* @ignore
|
|
63965
|
+
*/
|
|
63966
|
+
type: PropTypes.oneOfType([PropTypes.oneOf(['button', 'reset', 'submit']), PropTypes.string]),
|
|
63967
|
+
/**
|
|
63968
|
+
* The variant to use.
|
|
63969
|
+
* @default 'text'
|
|
63970
|
+
*/
|
|
63971
|
+
variant: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['contained', 'outlined', 'text']), PropTypes.string])
|
|
63972
|
+
} : void 0;
|
|
63973
|
+
|
|
63974
|
+
/**
|
|
63975
|
+
* Gets only the valid children of a component,
|
|
63976
|
+
* and ignores any nullish or falsy child.
|
|
63977
|
+
*
|
|
63978
|
+
* @param children the children
|
|
63979
|
+
*/
|
|
63980
|
+
function getValidReactChildren(children) {
|
|
63981
|
+
return React.Children.toArray(children).filter(child => /*#__PURE__*/React.isValidElement(child));
|
|
63982
|
+
}
|
|
63983
|
+
|
|
63984
|
+
function getButtonGroupUtilityClass(slot) {
|
|
63985
|
+
return generateUtilityClass('MuiButtonGroup', slot);
|
|
63986
|
+
}
|
|
63987
|
+
const buttonGroupClasses = generateUtilityClasses('MuiButtonGroup', ['root', 'contained', 'outlined', 'text', 'disableElevation', 'disabled', 'firstButton', 'fullWidth', 'horizontal', 'vertical', 'colorPrimary', 'colorSecondary', 'grouped', 'groupedHorizontal', 'groupedVertical', 'groupedText', 'groupedTextHorizontal', 'groupedTextVertical', 'groupedTextPrimary', 'groupedTextSecondary', 'groupedOutlined', 'groupedOutlinedHorizontal', 'groupedOutlinedVertical', 'groupedOutlinedPrimary', 'groupedOutlinedSecondary', 'groupedContained', 'groupedContainedHorizontal', 'groupedContainedVertical', 'groupedContainedPrimary', 'groupedContainedSecondary', 'lastButton', 'middleButton']);
|
|
63988
|
+
|
|
63989
|
+
const overridesResolver$4 = (props, styles) => {
|
|
63990
|
+
const {
|
|
63991
|
+
ownerState
|
|
63992
|
+
} = props;
|
|
63993
|
+
return [{
|
|
63994
|
+
[`& .${buttonGroupClasses.grouped}`]: styles.grouped
|
|
63995
|
+
}, {
|
|
63996
|
+
[`& .${buttonGroupClasses.grouped}`]: styles[`grouped${capitalize(ownerState.orientation)}`]
|
|
63997
|
+
}, {
|
|
63998
|
+
[`& .${buttonGroupClasses.grouped}`]: styles[`grouped${capitalize(ownerState.variant)}`]
|
|
63999
|
+
}, {
|
|
64000
|
+
[`& .${buttonGroupClasses.grouped}`]: styles[`grouped${capitalize(ownerState.variant)}${capitalize(ownerState.orientation)}`]
|
|
64001
|
+
}, {
|
|
64002
|
+
[`& .${buttonGroupClasses.grouped}`]: styles[`grouped${capitalize(ownerState.variant)}${capitalize(ownerState.color)}`]
|
|
64003
|
+
}, {
|
|
64004
|
+
[`& .${buttonGroupClasses.firstButton}`]: styles.firstButton
|
|
64005
|
+
}, {
|
|
64006
|
+
[`& .${buttonGroupClasses.lastButton}`]: styles.lastButton
|
|
64007
|
+
}, {
|
|
64008
|
+
[`& .${buttonGroupClasses.middleButton}`]: styles.middleButton
|
|
64009
|
+
}, styles.root, styles[ownerState.variant], ownerState.disableElevation === true && styles.disableElevation, ownerState.fullWidth && styles.fullWidth, ownerState.orientation === 'vertical' && styles.vertical];
|
|
64010
|
+
};
|
|
64011
|
+
const useUtilityClasses$x = ownerState => {
|
|
64012
|
+
const {
|
|
64013
|
+
classes,
|
|
64014
|
+
color,
|
|
64015
|
+
disabled,
|
|
64016
|
+
disableElevation,
|
|
64017
|
+
fullWidth,
|
|
64018
|
+
orientation,
|
|
64019
|
+
variant
|
|
64020
|
+
} = ownerState;
|
|
64021
|
+
const slots = {
|
|
64022
|
+
root: ['root', variant, orientation, fullWidth && 'fullWidth', disableElevation && 'disableElevation', `color${capitalize(color)}`],
|
|
64023
|
+
grouped: ['grouped', `grouped${capitalize(orientation)}`, `grouped${capitalize(variant)}`, `grouped${capitalize(variant)}${capitalize(orientation)}`, `grouped${capitalize(variant)}${capitalize(color)}`, disabled && 'disabled'],
|
|
64024
|
+
firstButton: ['firstButton'],
|
|
64025
|
+
lastButton: ['lastButton'],
|
|
64026
|
+
middleButton: ['middleButton']
|
|
64027
|
+
};
|
|
64028
|
+
return composeClasses(slots, getButtonGroupUtilityClass, classes);
|
|
64029
|
+
};
|
|
64030
|
+
const ButtonGroupRoot = styled('div', {
|
|
64031
|
+
name: 'MuiButtonGroup',
|
|
64032
|
+
slot: 'Root',
|
|
64033
|
+
overridesResolver: overridesResolver$4
|
|
64034
|
+
})(memoTheme(({
|
|
64035
|
+
theme
|
|
64036
|
+
}) => ({
|
|
64037
|
+
display: 'inline-flex',
|
|
64038
|
+
borderRadius: (theme.vars || theme).shape.borderRadius,
|
|
64039
|
+
variants: [{
|
|
64040
|
+
props: {
|
|
64041
|
+
variant: 'contained'
|
|
64042
|
+
},
|
|
64043
|
+
style: {
|
|
64044
|
+
boxShadow: (theme.vars || theme).shadows[2]
|
|
64045
|
+
}
|
|
64046
|
+
}, {
|
|
64047
|
+
props: {
|
|
64048
|
+
disableElevation: true
|
|
64049
|
+
},
|
|
64050
|
+
style: {
|
|
64051
|
+
boxShadow: 'none'
|
|
64052
|
+
}
|
|
64053
|
+
}, {
|
|
64054
|
+
props: {
|
|
64055
|
+
fullWidth: true
|
|
64056
|
+
},
|
|
64057
|
+
style: {
|
|
64058
|
+
width: '100%'
|
|
64059
|
+
}
|
|
64060
|
+
}, {
|
|
64061
|
+
props: {
|
|
64062
|
+
orientation: 'vertical'
|
|
64063
|
+
},
|
|
64064
|
+
style: {
|
|
64065
|
+
flexDirection: 'column',
|
|
64066
|
+
[`& .${buttonGroupClasses.lastButton},& .${buttonGroupClasses.middleButton}`]: {
|
|
64067
|
+
borderTopRightRadius: 0,
|
|
64068
|
+
borderTopLeftRadius: 0
|
|
64069
|
+
},
|
|
64070
|
+
[`& .${buttonGroupClasses.firstButton},& .${buttonGroupClasses.middleButton}`]: {
|
|
64071
|
+
borderBottomRightRadius: 0,
|
|
64072
|
+
borderBottomLeftRadius: 0
|
|
64073
|
+
}
|
|
64074
|
+
}
|
|
64075
|
+
}, {
|
|
64076
|
+
props: {
|
|
64077
|
+
orientation: 'horizontal'
|
|
64078
|
+
},
|
|
64079
|
+
style: {
|
|
64080
|
+
[`& .${buttonGroupClasses.firstButton},& .${buttonGroupClasses.middleButton}`]: {
|
|
64081
|
+
borderTopRightRadius: 0,
|
|
64082
|
+
borderBottomRightRadius: 0
|
|
64083
|
+
},
|
|
64084
|
+
[`& .${buttonGroupClasses.lastButton},& .${buttonGroupClasses.middleButton}`]: {
|
|
64085
|
+
borderTopLeftRadius: 0,
|
|
64086
|
+
borderBottomLeftRadius: 0
|
|
64087
|
+
}
|
|
64088
|
+
}
|
|
64089
|
+
}, {
|
|
64090
|
+
props: {
|
|
64091
|
+
variant: 'text',
|
|
64092
|
+
orientation: 'horizontal'
|
|
64093
|
+
},
|
|
64094
|
+
style: {
|
|
64095
|
+
[`& .${buttonGroupClasses.firstButton},& .${buttonGroupClasses.middleButton}`]: {
|
|
64096
|
+
borderRight: theme.vars ? `1px solid rgba(${theme.vars.palette.common.onBackgroundChannel} / 0.23)` : `1px solid ${theme.palette.mode === 'light' ? 'rgba(0, 0, 0, 0.23)' : 'rgba(255, 255, 255, 0.23)'}`,
|
|
64097
|
+
[`&.${buttonGroupClasses.disabled}`]: {
|
|
64098
|
+
borderRight: `1px solid ${(theme.vars || theme).palette.action.disabled}`
|
|
64099
|
+
}
|
|
64100
|
+
}
|
|
64101
|
+
}
|
|
64102
|
+
}, {
|
|
64103
|
+
props: {
|
|
64104
|
+
variant: 'text',
|
|
64105
|
+
orientation: 'vertical'
|
|
64106
|
+
},
|
|
64107
|
+
style: {
|
|
64108
|
+
[`& .${buttonGroupClasses.firstButton},& .${buttonGroupClasses.middleButton}`]: {
|
|
64109
|
+
borderBottom: theme.vars ? `1px solid rgba(${theme.vars.palette.common.onBackgroundChannel} / 0.23)` : `1px solid ${theme.palette.mode === 'light' ? 'rgba(0, 0, 0, 0.23)' : 'rgba(255, 255, 255, 0.23)'}`,
|
|
64110
|
+
[`&.${buttonGroupClasses.disabled}`]: {
|
|
64111
|
+
borderBottom: `1px solid ${(theme.vars || theme).palette.action.disabled}`
|
|
64112
|
+
}
|
|
64113
|
+
}
|
|
64114
|
+
}
|
|
64115
|
+
}, ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).flatMap(([color]) => [{
|
|
64116
|
+
props: {
|
|
64117
|
+
variant: 'text',
|
|
64118
|
+
color
|
|
64119
|
+
},
|
|
64120
|
+
style: {
|
|
64121
|
+
[`& .${buttonGroupClasses.firstButton},& .${buttonGroupClasses.middleButton}`]: {
|
|
64122
|
+
borderColor: theme.vars ? `rgba(${theme.vars.palette[color].mainChannel} / 0.5)` : alpha$1(theme.palette[color].main, 0.5)
|
|
64123
|
+
}
|
|
64124
|
+
}
|
|
64125
|
+
}]), {
|
|
64126
|
+
props: {
|
|
64127
|
+
variant: 'outlined',
|
|
64128
|
+
orientation: 'horizontal'
|
|
64129
|
+
},
|
|
64130
|
+
style: {
|
|
64131
|
+
[`& .${buttonGroupClasses.firstButton},& .${buttonGroupClasses.middleButton}`]: {
|
|
64132
|
+
borderRightColor: 'transparent',
|
|
64133
|
+
'&:hover': {
|
|
64134
|
+
borderRightColor: 'currentColor'
|
|
64135
|
+
}
|
|
64136
|
+
},
|
|
64137
|
+
[`& .${buttonGroupClasses.lastButton},& .${buttonGroupClasses.middleButton}`]: {
|
|
64138
|
+
marginLeft: -1
|
|
64139
|
+
}
|
|
64140
|
+
}
|
|
64141
|
+
}, {
|
|
64142
|
+
props: {
|
|
64143
|
+
variant: 'outlined',
|
|
64144
|
+
orientation: 'vertical'
|
|
64145
|
+
},
|
|
64146
|
+
style: {
|
|
64147
|
+
[`& .${buttonGroupClasses.firstButton},& .${buttonGroupClasses.middleButton}`]: {
|
|
64148
|
+
borderBottomColor: 'transparent',
|
|
64149
|
+
'&:hover': {
|
|
64150
|
+
borderBottomColor: 'currentColor'
|
|
64151
|
+
}
|
|
64152
|
+
},
|
|
64153
|
+
[`& .${buttonGroupClasses.lastButton},& .${buttonGroupClasses.middleButton}`]: {
|
|
64154
|
+
marginTop: -1
|
|
64155
|
+
}
|
|
64156
|
+
}
|
|
64157
|
+
}, {
|
|
64158
|
+
props: {
|
|
64159
|
+
variant: 'contained',
|
|
64160
|
+
orientation: 'horizontal'
|
|
64161
|
+
},
|
|
64162
|
+
style: {
|
|
64163
|
+
[`& .${buttonGroupClasses.firstButton},& .${buttonGroupClasses.middleButton}`]: {
|
|
64164
|
+
borderRight: `1px solid ${(theme.vars || theme).palette.grey[400]}`,
|
|
64165
|
+
[`&.${buttonGroupClasses.disabled}`]: {
|
|
64166
|
+
borderRight: `1px solid ${(theme.vars || theme).palette.action.disabled}`
|
|
64167
|
+
}
|
|
64168
|
+
}
|
|
64169
|
+
}
|
|
64170
|
+
}, {
|
|
64171
|
+
props: {
|
|
64172
|
+
variant: 'contained',
|
|
64173
|
+
orientation: 'vertical'
|
|
64174
|
+
},
|
|
64175
|
+
style: {
|
|
64176
|
+
[`& .${buttonGroupClasses.firstButton},& .${buttonGroupClasses.middleButton}`]: {
|
|
64177
|
+
borderBottom: `1px solid ${(theme.vars || theme).palette.grey[400]}`,
|
|
64178
|
+
[`&.${buttonGroupClasses.disabled}`]: {
|
|
64179
|
+
borderBottom: `1px solid ${(theme.vars || theme).palette.action.disabled}`
|
|
64180
|
+
}
|
|
64181
|
+
}
|
|
64182
|
+
}
|
|
64183
|
+
}, ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter(['dark'])).map(([color]) => ({
|
|
64184
|
+
props: {
|
|
64185
|
+
variant: 'contained',
|
|
64186
|
+
color
|
|
64187
|
+
},
|
|
64188
|
+
style: {
|
|
64189
|
+
[`& .${buttonGroupClasses.firstButton},& .${buttonGroupClasses.middleButton}`]: {
|
|
64190
|
+
borderColor: (theme.vars || theme).palette[color].dark
|
|
64191
|
+
}
|
|
64192
|
+
}
|
|
64193
|
+
}))],
|
|
64194
|
+
[`& .${buttonGroupClasses.grouped}`]: {
|
|
64195
|
+
minWidth: 40,
|
|
64196
|
+
boxShadow: 'none',
|
|
64197
|
+
props: {
|
|
64198
|
+
variant: 'contained'
|
|
64199
|
+
},
|
|
64200
|
+
style: {
|
|
64201
|
+
'&:hover': {
|
|
64202
|
+
boxShadow: 'none'
|
|
64203
|
+
}
|
|
64204
|
+
}
|
|
64205
|
+
}
|
|
64206
|
+
})));
|
|
64207
|
+
const ButtonGroup = /*#__PURE__*/React.forwardRef(function ButtonGroup(inProps, ref) {
|
|
64208
|
+
const props = useDefaultProps({
|
|
64209
|
+
props: inProps,
|
|
64210
|
+
name: 'MuiButtonGroup'
|
|
64211
|
+
});
|
|
64212
|
+
const {
|
|
64213
|
+
children,
|
|
64214
|
+
className,
|
|
64215
|
+
color = 'primary',
|
|
64216
|
+
component = 'div',
|
|
64217
|
+
disabled = false,
|
|
64218
|
+
disableElevation = false,
|
|
64219
|
+
disableFocusRipple = false,
|
|
64220
|
+
disableRipple = false,
|
|
64221
|
+
fullWidth = false,
|
|
64222
|
+
orientation = 'horizontal',
|
|
64223
|
+
size = 'medium',
|
|
64224
|
+
variant = 'outlined',
|
|
64225
|
+
...other
|
|
64226
|
+
} = props;
|
|
64227
|
+
const ownerState = {
|
|
64228
|
+
...props,
|
|
64229
|
+
color,
|
|
64230
|
+
component,
|
|
64231
|
+
disabled,
|
|
64232
|
+
disableElevation,
|
|
64233
|
+
disableFocusRipple,
|
|
64234
|
+
disableRipple,
|
|
64235
|
+
fullWidth,
|
|
64236
|
+
orientation,
|
|
64237
|
+
size,
|
|
64238
|
+
variant
|
|
64239
|
+
};
|
|
64240
|
+
const classes = useUtilityClasses$x(ownerState);
|
|
64241
|
+
const context = React.useMemo(() => ({
|
|
64242
|
+
className: classes.grouped,
|
|
64243
|
+
color,
|
|
64244
|
+
disabled,
|
|
64245
|
+
disableElevation,
|
|
64246
|
+
disableFocusRipple,
|
|
64247
|
+
disableRipple,
|
|
64248
|
+
fullWidth,
|
|
64249
|
+
size,
|
|
64250
|
+
variant
|
|
64251
|
+
}), [color, disabled, disableElevation, disableFocusRipple, disableRipple, fullWidth, size, variant, classes.grouped]);
|
|
64252
|
+
const validChildren = getValidReactChildren(children);
|
|
64253
|
+
const childrenCount = validChildren.length;
|
|
64254
|
+
const getButtonPositionClassName = index => {
|
|
64255
|
+
const isFirstButton = index === 0;
|
|
64256
|
+
const isLastButton = index === childrenCount - 1;
|
|
64257
|
+
if (isFirstButton && isLastButton) {
|
|
64258
|
+
return '';
|
|
64259
|
+
}
|
|
64260
|
+
if (isFirstButton) {
|
|
64261
|
+
return classes.firstButton;
|
|
64262
|
+
}
|
|
64263
|
+
if (isLastButton) {
|
|
64264
|
+
return classes.lastButton;
|
|
64265
|
+
}
|
|
64266
|
+
return classes.middleButton;
|
|
64267
|
+
};
|
|
64268
|
+
return /*#__PURE__*/jsxRuntimeExports.jsx(ButtonGroupRoot, {
|
|
64269
|
+
as: component,
|
|
64270
|
+
role: "group",
|
|
64271
|
+
className: clsx(classes.root, className),
|
|
64272
|
+
ref: ref,
|
|
64273
|
+
ownerState: ownerState,
|
|
64274
|
+
...other,
|
|
64275
|
+
children: /*#__PURE__*/jsxRuntimeExports.jsx(ButtonGroupContext.Provider, {
|
|
64276
|
+
value: context,
|
|
64277
|
+
children: validChildren.map((child, index) => {
|
|
64278
|
+
return /*#__PURE__*/jsxRuntimeExports.jsx(ButtonGroupButtonContext.Provider, {
|
|
64279
|
+
value: getButtonPositionClassName(index),
|
|
64280
|
+
children: child
|
|
64281
|
+
}, index);
|
|
64282
|
+
})
|
|
64283
|
+
})
|
|
64284
|
+
});
|
|
64285
|
+
});
|
|
64286
|
+
process.env.NODE_ENV !== "production" ? ButtonGroup.propTypes /* remove-proptypes */ = {
|
|
64287
|
+
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
64288
|
+
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
64289
|
+
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
64290
|
+
// └─────────────────────────────────────────────────────────────────────┘
|
|
64291
|
+
/**
|
|
64292
|
+
* The content of the component.
|
|
64293
|
+
*/
|
|
64294
|
+
children: PropTypes.node,
|
|
64295
|
+
/**
|
|
64296
|
+
* Override or extend the styles applied to the component.
|
|
64297
|
+
*/
|
|
64298
|
+
classes: PropTypes.object,
|
|
64299
|
+
/**
|
|
64300
|
+
* @ignore
|
|
64301
|
+
*/
|
|
64302
|
+
className: PropTypes.string,
|
|
64303
|
+
/**
|
|
64304
|
+
* The color of the component.
|
|
64305
|
+
* It supports both default and custom theme colors, which can be added as shown in the
|
|
64306
|
+
* [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
|
|
64307
|
+
* @default 'primary'
|
|
64308
|
+
*/
|
|
64309
|
+
color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['inherit', 'primary', 'secondary', 'error', 'info', 'success', 'warning']), PropTypes.string]),
|
|
64310
|
+
/**
|
|
64311
|
+
* The component used for the root node.
|
|
64312
|
+
* Either a string to use a HTML element or a component.
|
|
64313
|
+
*/
|
|
64314
|
+
component: PropTypes.elementType,
|
|
64315
|
+
/**
|
|
64316
|
+
* If `true`, the component is disabled.
|
|
64317
|
+
* @default false
|
|
64318
|
+
*/
|
|
64319
|
+
disabled: PropTypes.bool,
|
|
64320
|
+
/**
|
|
64321
|
+
* If `true`, no elevation is used.
|
|
64322
|
+
* @default false
|
|
64323
|
+
*/
|
|
64324
|
+
disableElevation: PropTypes.bool,
|
|
64325
|
+
/**
|
|
64326
|
+
* If `true`, the button keyboard focus ripple is disabled.
|
|
64327
|
+
* @default false
|
|
64328
|
+
*/
|
|
64329
|
+
disableFocusRipple: PropTypes.bool,
|
|
64330
|
+
/**
|
|
64331
|
+
* If `true`, the button ripple effect is disabled.
|
|
64332
|
+
* @default false
|
|
64333
|
+
*/
|
|
64334
|
+
disableRipple: PropTypes.bool,
|
|
64335
|
+
/**
|
|
64336
|
+
* If `true`, the buttons will take up the full width of its container.
|
|
64337
|
+
* @default false
|
|
64338
|
+
*/
|
|
64339
|
+
fullWidth: PropTypes.bool,
|
|
64340
|
+
/**
|
|
64341
|
+
* The component orientation (layout flow direction).
|
|
64342
|
+
* @default 'horizontal'
|
|
64343
|
+
*/
|
|
64344
|
+
orientation: PropTypes.oneOf(['horizontal', 'vertical']),
|
|
64345
|
+
/**
|
|
64346
|
+
* The size of the component.
|
|
64347
|
+
* `small` is equivalent to the dense button styling.
|
|
64348
|
+
* @default 'medium'
|
|
64349
|
+
*/
|
|
64350
|
+
size: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['small', 'medium', 'large']), PropTypes.string]),
|
|
64351
|
+
/**
|
|
64352
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
64353
|
+
*/
|
|
64354
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
64355
|
+
/**
|
|
64356
|
+
* The variant to use.
|
|
64357
|
+
* @default 'outlined'
|
|
64358
|
+
*/
|
|
64359
|
+
variant: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['contained', 'outlined', 'text']), PropTypes.string])
|
|
64360
|
+
} : void 0;
|
|
64361
|
+
|
|
64362
|
+
var ArrowDropDownIcon$1 = createSvgIcon(/*#__PURE__*/jsxRuntimeExports.jsx("path", {
|
|
64363
|
+
d: "m7 10 5 5 5-5z"
|
|
64364
|
+
}), 'ArrowDropDown');
|
|
64365
|
+
|
|
64366
|
+
// TODO: return `EventHandlerName extends `on${infer EventName}` ? Lowercase<EventName> : never` once generatePropTypes runs with TS 4.1
|
|
64367
|
+
function mapEventPropToEvent(eventProp) {
|
|
64368
|
+
return eventProp.substring(2).toLowerCase();
|
|
64369
|
+
}
|
|
64370
|
+
function clickedRootScrollbar$1(event, doc) {
|
|
64371
|
+
return doc.documentElement.clientWidth < event.clientX || doc.documentElement.clientHeight < event.clientY;
|
|
64372
|
+
}
|
|
64373
|
+
/**
|
|
64374
|
+
* Listen for click events that occur somewhere in the document, outside of the element itself.
|
|
64375
|
+
* For instance, if you need to hide a menu when people click anywhere else on your page.
|
|
64376
|
+
*
|
|
64377
|
+
* Demos:
|
|
64378
|
+
*
|
|
64379
|
+
* - [Click-Away Listener](https://mui.com/material-ui/react-click-away-listener/)
|
|
64380
|
+
* - [Menu](https://mui.com/material-ui/react-menu/)
|
|
64381
|
+
*
|
|
64382
|
+
* API:
|
|
64383
|
+
*
|
|
64384
|
+
* - [ClickAwayListener API](https://mui.com/material-ui/api/click-away-listener/)
|
|
64385
|
+
*/
|
|
64386
|
+
function ClickAwayListener(props) {
|
|
64387
|
+
const {
|
|
64388
|
+
children,
|
|
64389
|
+
disableReactTree = false,
|
|
64390
|
+
mouseEvent = 'onClick',
|
|
64391
|
+
onClickAway,
|
|
64392
|
+
touchEvent = 'onTouchEnd'
|
|
64393
|
+
} = props;
|
|
64394
|
+
const movedRef = React.useRef(false);
|
|
64395
|
+
const nodeRef = React.useRef(null);
|
|
64396
|
+
const activatedRef = React.useRef(false);
|
|
64397
|
+
const syntheticEventRef = React.useRef(false);
|
|
64398
|
+
React.useEffect(() => {
|
|
64399
|
+
// Ensure that this component is not "activated" synchronously.
|
|
64400
|
+
// https://github.com/facebook/react/issues/20074
|
|
64401
|
+
setTimeout(() => {
|
|
64402
|
+
activatedRef.current = true;
|
|
64403
|
+
}, 0);
|
|
64404
|
+
return () => {
|
|
64405
|
+
activatedRef.current = false;
|
|
64406
|
+
};
|
|
64407
|
+
}, []);
|
|
64408
|
+
const handleRef = useForkRef(getReactElementRef(children), nodeRef);
|
|
64409
|
+
|
|
64410
|
+
// The handler doesn't take event.defaultPrevented into account:
|
|
64411
|
+
//
|
|
64412
|
+
// event.preventDefault() is meant to stop default behaviors like
|
|
64413
|
+
// clicking a checkbox to check it, hitting a button to submit a form,
|
|
64414
|
+
// and hitting left arrow to move the cursor in a text input etc.
|
|
64415
|
+
// Only special HTML elements have these default behaviors.
|
|
64416
|
+
const handleClickAway = useEventCallback(event => {
|
|
64417
|
+
// Given developers can stop the propagation of the synthetic event,
|
|
64418
|
+
// we can only be confident with a positive value.
|
|
64419
|
+
const insideReactTree = syntheticEventRef.current;
|
|
64420
|
+
syntheticEventRef.current = false;
|
|
64421
|
+
const doc = ownerDocument(nodeRef.current);
|
|
64422
|
+
|
|
64423
|
+
// 1. IE11 support, which trigger the handleClickAway even after the unbind
|
|
64424
|
+
// 2. The child might render null.
|
|
64425
|
+
// 3. Behave like a blur listener.
|
|
64426
|
+
if (!activatedRef.current || !nodeRef.current || 'clientX' in event && clickedRootScrollbar$1(event, doc)) {
|
|
64427
|
+
return;
|
|
64428
|
+
}
|
|
64429
|
+
|
|
64430
|
+
// Do not act if user performed touchmove
|
|
64431
|
+
if (movedRef.current) {
|
|
64432
|
+
movedRef.current = false;
|
|
64433
|
+
return;
|
|
64434
|
+
}
|
|
64435
|
+
let insideDOM;
|
|
64436
|
+
|
|
64437
|
+
// If not enough, can use https://github.com/DieterHolvoet/event-propagation-path/blob/master/propagationPath.js
|
|
64438
|
+
if (event.composedPath) {
|
|
64439
|
+
insideDOM = event.composedPath().includes(nodeRef.current);
|
|
64440
|
+
} else {
|
|
64441
|
+
insideDOM = !doc.documentElement.contains(
|
|
64442
|
+
// @ts-expect-error returns `false` as intended when not dispatched from a Node
|
|
64443
|
+
event.target) || nodeRef.current.contains(
|
|
64444
|
+
// @ts-expect-error returns `false` as intended when not dispatched from a Node
|
|
64445
|
+
event.target);
|
|
64446
|
+
}
|
|
64447
|
+
if (!insideDOM && (disableReactTree || !insideReactTree)) {
|
|
64448
|
+
onClickAway(event);
|
|
64449
|
+
}
|
|
64450
|
+
});
|
|
64451
|
+
|
|
64452
|
+
// Keep track of mouse/touch events that bubbled up through the portal.
|
|
64453
|
+
const createHandleSynthetic = handlerName => event => {
|
|
64454
|
+
syntheticEventRef.current = true;
|
|
64455
|
+
const childrenPropsHandler = children.props[handlerName];
|
|
64456
|
+
if (childrenPropsHandler) {
|
|
64457
|
+
childrenPropsHandler(event);
|
|
64458
|
+
}
|
|
64459
|
+
};
|
|
64460
|
+
const childrenProps = {
|
|
64461
|
+
ref: handleRef
|
|
64462
|
+
};
|
|
64463
|
+
if (touchEvent !== false) {
|
|
64464
|
+
childrenProps[touchEvent] = createHandleSynthetic(touchEvent);
|
|
64465
|
+
}
|
|
64466
|
+
React.useEffect(() => {
|
|
64467
|
+
if (touchEvent !== false) {
|
|
64468
|
+
const mappedTouchEvent = mapEventPropToEvent(touchEvent);
|
|
64469
|
+
const doc = ownerDocument(nodeRef.current);
|
|
64470
|
+
const handleTouchMove = () => {
|
|
64471
|
+
movedRef.current = true;
|
|
64472
|
+
};
|
|
64473
|
+
doc.addEventListener(mappedTouchEvent, handleClickAway);
|
|
64474
|
+
doc.addEventListener('touchmove', handleTouchMove);
|
|
64475
|
+
return () => {
|
|
64476
|
+
doc.removeEventListener(mappedTouchEvent, handleClickAway);
|
|
64477
|
+
doc.removeEventListener('touchmove', handleTouchMove);
|
|
64478
|
+
};
|
|
64479
|
+
}
|
|
64480
|
+
return undefined;
|
|
64481
|
+
}, [handleClickAway, touchEvent]);
|
|
64482
|
+
if (mouseEvent !== false) {
|
|
64483
|
+
childrenProps[mouseEvent] = createHandleSynthetic(mouseEvent);
|
|
64484
|
+
}
|
|
64485
|
+
React.useEffect(() => {
|
|
64486
|
+
if (mouseEvent !== false) {
|
|
64487
|
+
const mappedMouseEvent = mapEventPropToEvent(mouseEvent);
|
|
64488
|
+
const doc = ownerDocument(nodeRef.current);
|
|
64489
|
+
doc.addEventListener(mappedMouseEvent, handleClickAway);
|
|
64490
|
+
return () => {
|
|
64491
|
+
doc.removeEventListener(mappedMouseEvent, handleClickAway);
|
|
64492
|
+
};
|
|
64493
|
+
}
|
|
64494
|
+
return undefined;
|
|
64495
|
+
}, [handleClickAway, mouseEvent]);
|
|
64496
|
+
return /*#__PURE__*/React.cloneElement(children, childrenProps);
|
|
64497
|
+
}
|
|
64498
|
+
process.env.NODE_ENV !== "production" ? ClickAwayListener.propTypes /* remove-proptypes */ = {
|
|
64499
|
+
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
64500
|
+
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
64501
|
+
// │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
|
|
64502
|
+
// └─────────────────────────────────────────────────────────────────────┘
|
|
64503
|
+
/**
|
|
64504
|
+
* The wrapped element.
|
|
64505
|
+
*/
|
|
64506
|
+
children: elementAcceptingRef.isRequired,
|
|
64507
|
+
/**
|
|
64508
|
+
* If `true`, the React tree is ignored and only the DOM tree is considered.
|
|
64509
|
+
* This prop changes how portaled elements are handled.
|
|
64510
|
+
* @default false
|
|
64511
|
+
*/
|
|
64512
|
+
disableReactTree: PropTypes.bool,
|
|
64513
|
+
/**
|
|
64514
|
+
* The mouse event to listen to. You can disable the listener by providing `false`.
|
|
64515
|
+
* @default 'onClick'
|
|
64516
|
+
*/
|
|
64517
|
+
mouseEvent: PropTypes.oneOf(['onClick', 'onMouseDown', 'onMouseUp', 'onPointerDown', 'onPointerUp', false]),
|
|
64518
|
+
/**
|
|
64519
|
+
* Callback fired when a "click away" event is detected.
|
|
64520
|
+
*/
|
|
64521
|
+
onClickAway: PropTypes.func.isRequired,
|
|
64522
|
+
/**
|
|
64523
|
+
* The touch event to listen to. You can disable the listener by providing `false`.
|
|
64524
|
+
* @default 'onTouchEnd'
|
|
64525
|
+
*/
|
|
64526
|
+
touchEvent: PropTypes.oneOf(['onTouchEnd', 'onTouchStart', false])
|
|
64527
|
+
} : void 0;
|
|
64528
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
64529
|
+
// eslint-disable-next-line
|
|
64530
|
+
ClickAwayListener['propTypes' + ''] = exactProp(ClickAwayListener.propTypes);
|
|
64531
|
+
}
|
|
63299
64532
|
|
|
63300
64533
|
const dividerClasses = generateUtilityClasses('MuiDivider', ['root', 'absolute', 'fullWidth', 'inset', 'middle', 'flexItem', 'light', 'vertical', 'withChildren', 'withChildrenVertical', 'textAlignRight', 'textAlignLeft', 'wrapper', 'wrapperVertical']);
|
|
63301
64534
|
|
|
@@ -63318,7 +64551,7 @@ const v6Colors = {
|
|
|
63318
64551
|
textDisabled: true
|
|
63319
64552
|
};
|
|
63320
64553
|
const extendSxProp = internal_createExtendSxProp();
|
|
63321
|
-
const useUtilityClasses$
|
|
64554
|
+
const useUtilityClasses$w = ownerState => {
|
|
63322
64555
|
const {
|
|
63323
64556
|
align,
|
|
63324
64557
|
gutterBottom,
|
|
@@ -63459,7 +64692,7 @@ const Typography = /*#__PURE__*/React.forwardRef(function Typography(inProps, re
|
|
|
63459
64692
|
variantMapping
|
|
63460
64693
|
};
|
|
63461
64694
|
const Component = component || (paragraph ? 'p' : variantMapping[variant] || defaultVariantMapping[variant]) || 'span';
|
|
63462
|
-
const classes = useUtilityClasses$
|
|
64695
|
+
const classes = useUtilityClasses$w(ownerState);
|
|
63463
64696
|
return /*#__PURE__*/jsxRuntimeExports.jsx(TypographyRoot, {
|
|
63464
64697
|
as: Component,
|
|
63465
64698
|
ref: ref,
|
|
@@ -63574,7 +64807,7 @@ const overridesResolver$3 = (props, styles) => {
|
|
|
63574
64807
|
} = props;
|
|
63575
64808
|
return [styles.root, ownerState.dense && styles.dense, ownerState.divider && styles.divider, !ownerState.disableGutters && styles.gutters];
|
|
63576
64809
|
};
|
|
63577
|
-
const useUtilityClasses$
|
|
64810
|
+
const useUtilityClasses$v = ownerState => {
|
|
63578
64811
|
const {
|
|
63579
64812
|
disabled,
|
|
63580
64813
|
dense,
|
|
@@ -63734,7 +64967,7 @@ const MenuItem = /*#__PURE__*/React.forwardRef(function MenuItem(inProps, ref) {
|
|
|
63734
64967
|
divider,
|
|
63735
64968
|
disableGutters
|
|
63736
64969
|
};
|
|
63737
|
-
const classes = useUtilityClasses$
|
|
64970
|
+
const classes = useUtilityClasses$v(props);
|
|
63738
64971
|
const handleRef = useForkRef(menuItemRef, ref);
|
|
63739
64972
|
let tabIndex;
|
|
63740
64973
|
if (!props.disabled) {
|
|
@@ -63831,6 +65064,102 @@ process.env.NODE_ENV !== "production" ? MenuItem.propTypes /* remove-proptypes *
|
|
|
63831
65064
|
tabIndex: PropTypes.number
|
|
63832
65065
|
} : void 0;
|
|
63833
65066
|
|
|
65067
|
+
function SplitButton(props) {
|
|
65068
|
+
var _a;
|
|
65069
|
+
const {
|
|
65070
|
+
options,
|
|
65071
|
+
defaultSelected,
|
|
65072
|
+
isChangeSelectedAndApplied,
|
|
65073
|
+
onSubmit
|
|
65074
|
+
} = props;
|
|
65075
|
+
const anchorRef = useRef(null);
|
|
65076
|
+
const [open, setOpen] = useState(false);
|
|
65077
|
+
const [selectedIndex, setSelectedIndex] = useState(defaultSelected !== null && defaultSelected !== void 0 ? defaultSelected : 0);
|
|
65078
|
+
const handleClick = () => {
|
|
65079
|
+
onSubmit && onSubmit(selectedIndex);
|
|
65080
|
+
};
|
|
65081
|
+
const handleMenuItemClick = (_event, index) => {
|
|
65082
|
+
setSelectedIndex(index);
|
|
65083
|
+
isChangeSelectedAndApplied && onSubmit && onSubmit(index);
|
|
65084
|
+
setOpen(false);
|
|
65085
|
+
};
|
|
65086
|
+
const handleToggle = () => {
|
|
65087
|
+
setOpen(prevOpen => !prevOpen);
|
|
65088
|
+
};
|
|
65089
|
+
const handleClose = event => {
|
|
65090
|
+
if (anchorRef.current && anchorRef.current.contains(event.target)) {
|
|
65091
|
+
return;
|
|
65092
|
+
}
|
|
65093
|
+
setOpen(false);
|
|
65094
|
+
};
|
|
65095
|
+
return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, {
|
|
65096
|
+
children: [jsxRuntimeExports.jsxs(ButtonGroup, {
|
|
65097
|
+
variant: "contained",
|
|
65098
|
+
ref: anchorRef,
|
|
65099
|
+
"aria-label": "Button group with a nested menu",
|
|
65100
|
+
children: [jsxRuntimeExports.jsx(Button, {
|
|
65101
|
+
onClick: handleClick,
|
|
65102
|
+
children: (_a = options[selectedIndex]) === null || _a === void 0 ? void 0 : _a.label
|
|
65103
|
+
}), jsxRuntimeExports.jsx(Button, {
|
|
65104
|
+
size: "small",
|
|
65105
|
+
"aria-controls": open ? 'split-button-menu' : undefined,
|
|
65106
|
+
"aria-expanded": open ? 'true' : undefined,
|
|
65107
|
+
"aria-label": "select merge strategy",
|
|
65108
|
+
"aria-haspopup": "menu",
|
|
65109
|
+
onClick: handleToggle,
|
|
65110
|
+
children: jsxRuntimeExports.jsx(ArrowDropDownIcon$1, {})
|
|
65111
|
+
})]
|
|
65112
|
+
}), jsxRuntimeExports.jsx(Popper, {
|
|
65113
|
+
sx: {
|
|
65114
|
+
zIndex: 1
|
|
65115
|
+
},
|
|
65116
|
+
open: open,
|
|
65117
|
+
anchorEl: anchorRef.current,
|
|
65118
|
+
role: undefined,
|
|
65119
|
+
transition: true,
|
|
65120
|
+
disablePortal: true,
|
|
65121
|
+
children: _ref => {
|
|
65122
|
+
let {
|
|
65123
|
+
TransitionProps,
|
|
65124
|
+
placement
|
|
65125
|
+
} = _ref;
|
|
65126
|
+
return jsxRuntimeExports.jsx(Grow, Object.assign({}, TransitionProps, {
|
|
65127
|
+
style: {
|
|
65128
|
+
transformOrigin: placement === 'bottom' ? 'center top' : 'center bottom'
|
|
65129
|
+
},
|
|
65130
|
+
children: jsxRuntimeExports.jsx(Paper, {
|
|
65131
|
+
children: jsxRuntimeExports.jsx(ClickAwayListener, {
|
|
65132
|
+
onClickAway: handleClose,
|
|
65133
|
+
children: jsxRuntimeExports.jsx(MenuList, {
|
|
65134
|
+
id: "split-button-menu",
|
|
65135
|
+
autoFocusItem: true,
|
|
65136
|
+
children: options.map((option, index) => jsxRuntimeExports.jsx(MenuItem, {
|
|
65137
|
+
disabled: option.isDisabled,
|
|
65138
|
+
selected: index === selectedIndex,
|
|
65139
|
+
onClick: event => handleMenuItemClick(event, index),
|
|
65140
|
+
children: option.label
|
|
65141
|
+
}, option.value))
|
|
65142
|
+
})
|
|
65143
|
+
})
|
|
65144
|
+
})
|
|
65145
|
+
}));
|
|
65146
|
+
}
|
|
65147
|
+
})]
|
|
65148
|
+
});
|
|
65149
|
+
}
|
|
65150
|
+
|
|
65151
|
+
var ImageIcon = createSvgIcon(/*#__PURE__*/jsxRuntimeExports.jsx("path", {
|
|
65152
|
+
d: "M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2M8.5 13.5l2.5 3.01L14.5 12l4.5 6H5z"
|
|
65153
|
+
}), 'Image');
|
|
65154
|
+
|
|
65155
|
+
var MenuIcon = createSvgIcon(/*#__PURE__*/jsxRuntimeExports.jsx("path", {
|
|
65156
|
+
d: "M3 18h18v-2H3zm0-5h18v-2H3zm0-7v2h18V6z"
|
|
65157
|
+
}), 'Menu');
|
|
65158
|
+
|
|
65159
|
+
var PictureAsPdfIcon = createSvgIcon(/*#__PURE__*/jsxRuntimeExports.jsx("path", {
|
|
65160
|
+
d: "M20 2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2m-8.5 7.5c0 .83-.67 1.5-1.5 1.5H9v2H7.5V7H10c.83 0 1.5.67 1.5 1.5zm5 2c0 .83-.67 1.5-1.5 1.5h-2.5V7H15c.83 0 1.5.67 1.5 1.5zm4-3H19v1h1.5V11H19v2h-1.5V7h3zM9 9.5h1v-1H9zM4 6H2v14c0 1.1.9 2 2 2h14v-2H4zm10 5.5h1v-3h-1z"
|
|
65161
|
+
}), 'PictureAsPdf');
|
|
65162
|
+
|
|
63834
65163
|
/*!
|
|
63835
65164
|
* @kurkle/color v0.3.4
|
|
63836
65165
|
* https://github.com/kurkle/color#readme
|
|
@@ -150625,7 +151954,7 @@ const DateRangePickerWrapper = props => {
|
|
|
150625
151954
|
placement: openDirection === 'up' ? 'top-start' : 'bottom-start',
|
|
150626
151955
|
popperRef: popperRef,
|
|
150627
151956
|
"data-testid": "date-range-picker-popper",
|
|
150628
|
-
children: jsxRuntimeExports.jsx(ClickAwayListener, {
|
|
151957
|
+
children: jsxRuntimeExports.jsx(ClickAwayListener$1, {
|
|
150629
151958
|
onClickAway: handleClosePopover,
|
|
150630
151959
|
children: jsxRuntimeExports.jsx(Paper$1, {
|
|
150631
151960
|
elevation: 8,
|
|
@@ -151679,7 +153008,7 @@ function useToolbarOwnerState() {
|
|
|
151679
153008
|
}
|
|
151680
153009
|
|
|
151681
153010
|
const _excluded$u = ["children", "className", "classes", "toolbarTitle", "hidden", "titleId", "classes", "landscapeDirection"];
|
|
151682
|
-
const useUtilityClasses$
|
|
153011
|
+
const useUtilityClasses$u = classes => {
|
|
151683
153012
|
const slots = {
|
|
151684
153013
|
root: ['root'],
|
|
151685
153014
|
title: ['title'],
|
|
@@ -151758,7 +153087,7 @@ const PickersToolbar = /*#__PURE__*/React.forwardRef(function PickersToolbar(inP
|
|
|
151758
153087
|
} = props,
|
|
151759
153088
|
other = _objectWithoutPropertiesLoose$2(props, _excluded$u);
|
|
151760
153089
|
const ownerState = useToolbarOwnerState();
|
|
151761
|
-
const classes = useUtilityClasses$
|
|
153090
|
+
const classes = useUtilityClasses$u(classesProp);
|
|
151762
153091
|
if (hidden) {
|
|
151763
153092
|
return null;
|
|
151764
153093
|
}
|
|
@@ -152231,7 +153560,7 @@ const usePickerActionsContext = () => {
|
|
|
152231
153560
|
};
|
|
152232
153561
|
|
|
152233
153562
|
const _excluded$t = ["toolbarFormat", "toolbarPlaceholder", "className", "classes"];
|
|
152234
|
-
const useUtilityClasses$
|
|
153563
|
+
const useUtilityClasses$t = classes => {
|
|
152235
153564
|
const slots = {
|
|
152236
153565
|
root: ['root'],
|
|
152237
153566
|
title: ['title']
|
|
@@ -152285,7 +153614,7 @@ const DatePickerToolbar = /*#__PURE__*/React.forwardRef(function DatePickerToolb
|
|
|
152285
153614
|
} = usePickerContext();
|
|
152286
153615
|
const translations = usePickerTranslations();
|
|
152287
153616
|
const ownerState = useToolbarOwnerState();
|
|
152288
|
-
const classes = useUtilityClasses$
|
|
153617
|
+
const classes = useUtilityClasses$t(classesProp);
|
|
152289
153618
|
const dateText = React.useMemo(() => {
|
|
152290
153619
|
if (!utils.isValid(value)) {
|
|
152291
153620
|
return toolbarPlaceholder;
|
|
@@ -152543,7 +153872,7 @@ const getActiveElement = (root = document) => {
|
|
|
152543
153872
|
const DEFAULT_DESKTOP_MODE_MEDIA_QUERY = '@media (pointer: fine)';
|
|
152544
153873
|
|
|
152545
153874
|
const _excluded$s = ["PaperComponent", "ownerState", "children", "paperSlotProps", "paperClasses", "onPaperClick", "onPaperTouchStart"];
|
|
152546
|
-
const useUtilityClasses$
|
|
153875
|
+
const useUtilityClasses$s = classes => {
|
|
152547
153876
|
const slots = {
|
|
152548
153877
|
root: ['root'],
|
|
152549
153878
|
paper: ['paper']
|
|
@@ -152778,7 +154107,7 @@ function PickerPopper(inProps) {
|
|
|
152778
154107
|
});
|
|
152779
154108
|
}
|
|
152780
154109
|
}, [open, viewContainerRole, getCurrentViewMode]);
|
|
152781
|
-
const classes = useUtilityClasses$
|
|
154110
|
+
const classes = useUtilityClasses$s(classesProp);
|
|
152782
154111
|
const {
|
|
152783
154112
|
ownerState: pickerOwnerState,
|
|
152784
154113
|
rootRefObject
|
|
@@ -153624,692 +154953,6 @@ function getPickersLayoutUtilityClass(slot) {
|
|
|
153624
154953
|
}
|
|
153625
154954
|
const pickersLayoutClasses = generateUtilityClasses('MuiPickersLayout', ['root', 'landscape', 'contentWrapper', 'toolbar', 'actionBar', 'tabs', 'shortcuts']);
|
|
153626
154955
|
|
|
153627
|
-
function getButtonUtilityClass(slot) {
|
|
153628
|
-
return generateUtilityClass('MuiButton', slot);
|
|
153629
|
-
}
|
|
153630
|
-
const buttonClasses = generateUtilityClasses('MuiButton', ['root', 'text', 'textInherit', 'textPrimary', 'textSecondary', 'textSuccess', 'textError', 'textInfo', 'textWarning', 'outlined', 'outlinedInherit', 'outlinedPrimary', 'outlinedSecondary', 'outlinedSuccess', 'outlinedError', 'outlinedInfo', 'outlinedWarning', 'contained', 'containedInherit', 'containedPrimary', 'containedSecondary', 'containedSuccess', 'containedError', 'containedInfo', 'containedWarning', 'disableElevation', 'focusVisible', 'disabled', 'colorInherit', 'colorPrimary', 'colorSecondary', 'colorSuccess', 'colorError', 'colorInfo', 'colorWarning', 'textSizeSmall', 'textSizeMedium', 'textSizeLarge', 'outlinedSizeSmall', 'outlinedSizeMedium', 'outlinedSizeLarge', 'containedSizeSmall', 'containedSizeMedium', 'containedSizeLarge', 'sizeMedium', 'sizeSmall', 'sizeLarge', 'fullWidth', 'startIcon', 'endIcon', 'icon', 'iconSizeSmall', 'iconSizeMedium', 'iconSizeLarge', 'loading', 'loadingWrapper', 'loadingIconPlaceholder', 'loadingIndicator', 'loadingPositionCenter', 'loadingPositionStart', 'loadingPositionEnd']);
|
|
153631
|
-
|
|
153632
|
-
/**
|
|
153633
|
-
* @ignore - internal component.
|
|
153634
|
-
*/
|
|
153635
|
-
const ButtonGroupContext = /*#__PURE__*/React.createContext({});
|
|
153636
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
153637
|
-
ButtonGroupContext.displayName = 'ButtonGroupContext';
|
|
153638
|
-
}
|
|
153639
|
-
|
|
153640
|
-
/**
|
|
153641
|
-
* @ignore - internal component.
|
|
153642
|
-
*/
|
|
153643
|
-
const ButtonGroupButtonContext = /*#__PURE__*/React.createContext(undefined);
|
|
153644
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
153645
|
-
ButtonGroupButtonContext.displayName = 'ButtonGroupButtonContext';
|
|
153646
|
-
}
|
|
153647
|
-
|
|
153648
|
-
const useUtilityClasses$s = ownerState => {
|
|
153649
|
-
const {
|
|
153650
|
-
color,
|
|
153651
|
-
disableElevation,
|
|
153652
|
-
fullWidth,
|
|
153653
|
-
size,
|
|
153654
|
-
variant,
|
|
153655
|
-
loading,
|
|
153656
|
-
loadingPosition,
|
|
153657
|
-
classes
|
|
153658
|
-
} = ownerState;
|
|
153659
|
-
const slots = {
|
|
153660
|
-
root: ['root', loading && 'loading', variant, `${variant}${capitalize(color)}`, `size${capitalize(size)}`, `${variant}Size${capitalize(size)}`, `color${capitalize(color)}`, disableElevation && 'disableElevation', fullWidth && 'fullWidth', loading && `loadingPosition${capitalize(loadingPosition)}`],
|
|
153661
|
-
startIcon: ['icon', 'startIcon', `iconSize${capitalize(size)}`],
|
|
153662
|
-
endIcon: ['icon', 'endIcon', `iconSize${capitalize(size)}`],
|
|
153663
|
-
loadingIndicator: ['loadingIndicator'],
|
|
153664
|
-
loadingWrapper: ['loadingWrapper']
|
|
153665
|
-
};
|
|
153666
|
-
const composedClasses = composeClasses(slots, getButtonUtilityClass, classes);
|
|
153667
|
-
return {
|
|
153668
|
-
...classes,
|
|
153669
|
-
// forward the focused, disabled, etc. classes to the ButtonBase
|
|
153670
|
-
...composedClasses
|
|
153671
|
-
};
|
|
153672
|
-
};
|
|
153673
|
-
const commonIconStyles = [{
|
|
153674
|
-
props: {
|
|
153675
|
-
size: 'small'
|
|
153676
|
-
},
|
|
153677
|
-
style: {
|
|
153678
|
-
'& > *:nth-of-type(1)': {
|
|
153679
|
-
fontSize: 18
|
|
153680
|
-
}
|
|
153681
|
-
}
|
|
153682
|
-
}, {
|
|
153683
|
-
props: {
|
|
153684
|
-
size: 'medium'
|
|
153685
|
-
},
|
|
153686
|
-
style: {
|
|
153687
|
-
'& > *:nth-of-type(1)': {
|
|
153688
|
-
fontSize: 20
|
|
153689
|
-
}
|
|
153690
|
-
}
|
|
153691
|
-
}, {
|
|
153692
|
-
props: {
|
|
153693
|
-
size: 'large'
|
|
153694
|
-
},
|
|
153695
|
-
style: {
|
|
153696
|
-
'& > *:nth-of-type(1)': {
|
|
153697
|
-
fontSize: 22
|
|
153698
|
-
}
|
|
153699
|
-
}
|
|
153700
|
-
}];
|
|
153701
|
-
const ButtonRoot = styled(ButtonBase, {
|
|
153702
|
-
shouldForwardProp: prop => rootShouldForwardProp(prop) || prop === 'classes',
|
|
153703
|
-
name: 'MuiButton',
|
|
153704
|
-
slot: 'Root',
|
|
153705
|
-
overridesResolver: (props, styles) => {
|
|
153706
|
-
const {
|
|
153707
|
-
ownerState
|
|
153708
|
-
} = props;
|
|
153709
|
-
return [styles.root, styles[ownerState.variant], styles[`${ownerState.variant}${capitalize(ownerState.color)}`], styles[`size${capitalize(ownerState.size)}`], styles[`${ownerState.variant}Size${capitalize(ownerState.size)}`], ownerState.color === 'inherit' && styles.colorInherit, ownerState.disableElevation && styles.disableElevation, ownerState.fullWidth && styles.fullWidth, ownerState.loading && styles.loading];
|
|
153710
|
-
}
|
|
153711
|
-
})(memoTheme(({
|
|
153712
|
-
theme
|
|
153713
|
-
}) => {
|
|
153714
|
-
const inheritContainedBackgroundColor = theme.palette.mode === 'light' ? theme.palette.grey[300] : theme.palette.grey[800];
|
|
153715
|
-
const inheritContainedHoverBackgroundColor = theme.palette.mode === 'light' ? theme.palette.grey.A100 : theme.palette.grey[700];
|
|
153716
|
-
return {
|
|
153717
|
-
...theme.typography.button,
|
|
153718
|
-
minWidth: 64,
|
|
153719
|
-
padding: '6px 16px',
|
|
153720
|
-
border: 0,
|
|
153721
|
-
borderRadius: (theme.vars || theme).shape.borderRadius,
|
|
153722
|
-
transition: theme.transitions.create(['background-color', 'box-shadow', 'border-color', 'color'], {
|
|
153723
|
-
duration: theme.transitions.duration.short
|
|
153724
|
-
}),
|
|
153725
|
-
'&:hover': {
|
|
153726
|
-
textDecoration: 'none'
|
|
153727
|
-
},
|
|
153728
|
-
[`&.${buttonClasses.disabled}`]: {
|
|
153729
|
-
color: (theme.vars || theme).palette.action.disabled
|
|
153730
|
-
},
|
|
153731
|
-
variants: [{
|
|
153732
|
-
props: {
|
|
153733
|
-
variant: 'contained'
|
|
153734
|
-
},
|
|
153735
|
-
style: {
|
|
153736
|
-
color: `var(--variant-containedColor)`,
|
|
153737
|
-
backgroundColor: `var(--variant-containedBg)`,
|
|
153738
|
-
boxShadow: (theme.vars || theme).shadows[2],
|
|
153739
|
-
'&:hover': {
|
|
153740
|
-
boxShadow: (theme.vars || theme).shadows[4],
|
|
153741
|
-
// Reset on touch devices, it doesn't add specificity
|
|
153742
|
-
'@media (hover: none)': {
|
|
153743
|
-
boxShadow: (theme.vars || theme).shadows[2]
|
|
153744
|
-
}
|
|
153745
|
-
},
|
|
153746
|
-
'&:active': {
|
|
153747
|
-
boxShadow: (theme.vars || theme).shadows[8]
|
|
153748
|
-
},
|
|
153749
|
-
[`&.${buttonClasses.focusVisible}`]: {
|
|
153750
|
-
boxShadow: (theme.vars || theme).shadows[6]
|
|
153751
|
-
},
|
|
153752
|
-
[`&.${buttonClasses.disabled}`]: {
|
|
153753
|
-
color: (theme.vars || theme).palette.action.disabled,
|
|
153754
|
-
boxShadow: (theme.vars || theme).shadows[0],
|
|
153755
|
-
backgroundColor: (theme.vars || theme).palette.action.disabledBackground
|
|
153756
|
-
}
|
|
153757
|
-
}
|
|
153758
|
-
}, {
|
|
153759
|
-
props: {
|
|
153760
|
-
variant: 'outlined'
|
|
153761
|
-
},
|
|
153762
|
-
style: {
|
|
153763
|
-
padding: '5px 15px',
|
|
153764
|
-
border: '1px solid currentColor',
|
|
153765
|
-
borderColor: `var(--variant-outlinedBorder, currentColor)`,
|
|
153766
|
-
backgroundColor: `var(--variant-outlinedBg)`,
|
|
153767
|
-
color: `var(--variant-outlinedColor)`,
|
|
153768
|
-
[`&.${buttonClasses.disabled}`]: {
|
|
153769
|
-
border: `1px solid ${(theme.vars || theme).palette.action.disabledBackground}`
|
|
153770
|
-
}
|
|
153771
|
-
}
|
|
153772
|
-
}, {
|
|
153773
|
-
props: {
|
|
153774
|
-
variant: 'text'
|
|
153775
|
-
},
|
|
153776
|
-
style: {
|
|
153777
|
-
padding: '6px 8px',
|
|
153778
|
-
color: `var(--variant-textColor)`,
|
|
153779
|
-
backgroundColor: `var(--variant-textBg)`
|
|
153780
|
-
}
|
|
153781
|
-
}, ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(([color]) => ({
|
|
153782
|
-
props: {
|
|
153783
|
-
color
|
|
153784
|
-
},
|
|
153785
|
-
style: {
|
|
153786
|
-
'--variant-textColor': (theme.vars || theme).palette[color].main,
|
|
153787
|
-
'--variant-outlinedColor': (theme.vars || theme).palette[color].main,
|
|
153788
|
-
'--variant-outlinedBorder': theme.vars ? `rgba(${theme.vars.palette[color].mainChannel} / 0.5)` : alpha$1(theme.palette[color].main, 0.5),
|
|
153789
|
-
'--variant-containedColor': (theme.vars || theme).palette[color].contrastText,
|
|
153790
|
-
'--variant-containedBg': (theme.vars || theme).palette[color].main,
|
|
153791
|
-
'@media (hover: hover)': {
|
|
153792
|
-
'&:hover': {
|
|
153793
|
-
'--variant-containedBg': (theme.vars || theme).palette[color].dark,
|
|
153794
|
-
'--variant-textBg': theme.vars ? `rgba(${theme.vars.palette[color].mainChannel} / ${theme.vars.palette.action.hoverOpacity})` : alpha$1(theme.palette[color].main, theme.palette.action.hoverOpacity),
|
|
153795
|
-
'--variant-outlinedBorder': (theme.vars || theme).palette[color].main,
|
|
153796
|
-
'--variant-outlinedBg': theme.vars ? `rgba(${theme.vars.palette[color].mainChannel} / ${theme.vars.palette.action.hoverOpacity})` : alpha$1(theme.palette[color].main, theme.palette.action.hoverOpacity)
|
|
153797
|
-
}
|
|
153798
|
-
}
|
|
153799
|
-
}
|
|
153800
|
-
})), {
|
|
153801
|
-
props: {
|
|
153802
|
-
color: 'inherit'
|
|
153803
|
-
},
|
|
153804
|
-
style: {
|
|
153805
|
-
color: 'inherit',
|
|
153806
|
-
borderColor: 'currentColor',
|
|
153807
|
-
'--variant-containedBg': theme.vars ? theme.vars.palette.Button.inheritContainedBg : inheritContainedBackgroundColor,
|
|
153808
|
-
'@media (hover: hover)': {
|
|
153809
|
-
'&:hover': {
|
|
153810
|
-
'--variant-containedBg': theme.vars ? theme.vars.palette.Button.inheritContainedHoverBg : inheritContainedHoverBackgroundColor,
|
|
153811
|
-
'--variant-textBg': theme.vars ? `rgba(${theme.vars.palette.text.primaryChannel} / ${theme.vars.palette.action.hoverOpacity})` : alpha$1(theme.palette.text.primary, theme.palette.action.hoverOpacity),
|
|
153812
|
-
'--variant-outlinedBg': theme.vars ? `rgba(${theme.vars.palette.text.primaryChannel} / ${theme.vars.palette.action.hoverOpacity})` : alpha$1(theme.palette.text.primary, theme.palette.action.hoverOpacity)
|
|
153813
|
-
}
|
|
153814
|
-
}
|
|
153815
|
-
}
|
|
153816
|
-
}, {
|
|
153817
|
-
props: {
|
|
153818
|
-
size: 'small',
|
|
153819
|
-
variant: 'text'
|
|
153820
|
-
},
|
|
153821
|
-
style: {
|
|
153822
|
-
padding: '4px 5px',
|
|
153823
|
-
fontSize: theme.typography.pxToRem(13)
|
|
153824
|
-
}
|
|
153825
|
-
}, {
|
|
153826
|
-
props: {
|
|
153827
|
-
size: 'large',
|
|
153828
|
-
variant: 'text'
|
|
153829
|
-
},
|
|
153830
|
-
style: {
|
|
153831
|
-
padding: '8px 11px',
|
|
153832
|
-
fontSize: theme.typography.pxToRem(15)
|
|
153833
|
-
}
|
|
153834
|
-
}, {
|
|
153835
|
-
props: {
|
|
153836
|
-
size: 'small',
|
|
153837
|
-
variant: 'outlined'
|
|
153838
|
-
},
|
|
153839
|
-
style: {
|
|
153840
|
-
padding: '3px 9px',
|
|
153841
|
-
fontSize: theme.typography.pxToRem(13)
|
|
153842
|
-
}
|
|
153843
|
-
}, {
|
|
153844
|
-
props: {
|
|
153845
|
-
size: 'large',
|
|
153846
|
-
variant: 'outlined'
|
|
153847
|
-
},
|
|
153848
|
-
style: {
|
|
153849
|
-
padding: '7px 21px',
|
|
153850
|
-
fontSize: theme.typography.pxToRem(15)
|
|
153851
|
-
}
|
|
153852
|
-
}, {
|
|
153853
|
-
props: {
|
|
153854
|
-
size: 'small',
|
|
153855
|
-
variant: 'contained'
|
|
153856
|
-
},
|
|
153857
|
-
style: {
|
|
153858
|
-
padding: '4px 10px',
|
|
153859
|
-
fontSize: theme.typography.pxToRem(13)
|
|
153860
|
-
}
|
|
153861
|
-
}, {
|
|
153862
|
-
props: {
|
|
153863
|
-
size: 'large',
|
|
153864
|
-
variant: 'contained'
|
|
153865
|
-
},
|
|
153866
|
-
style: {
|
|
153867
|
-
padding: '8px 22px',
|
|
153868
|
-
fontSize: theme.typography.pxToRem(15)
|
|
153869
|
-
}
|
|
153870
|
-
}, {
|
|
153871
|
-
props: {
|
|
153872
|
-
disableElevation: true
|
|
153873
|
-
},
|
|
153874
|
-
style: {
|
|
153875
|
-
boxShadow: 'none',
|
|
153876
|
-
'&:hover': {
|
|
153877
|
-
boxShadow: 'none'
|
|
153878
|
-
},
|
|
153879
|
-
[`&.${buttonClasses.focusVisible}`]: {
|
|
153880
|
-
boxShadow: 'none'
|
|
153881
|
-
},
|
|
153882
|
-
'&:active': {
|
|
153883
|
-
boxShadow: 'none'
|
|
153884
|
-
},
|
|
153885
|
-
[`&.${buttonClasses.disabled}`]: {
|
|
153886
|
-
boxShadow: 'none'
|
|
153887
|
-
}
|
|
153888
|
-
}
|
|
153889
|
-
}, {
|
|
153890
|
-
props: {
|
|
153891
|
-
fullWidth: true
|
|
153892
|
-
},
|
|
153893
|
-
style: {
|
|
153894
|
-
width: '100%'
|
|
153895
|
-
}
|
|
153896
|
-
}, {
|
|
153897
|
-
props: {
|
|
153898
|
-
loadingPosition: 'center'
|
|
153899
|
-
},
|
|
153900
|
-
style: {
|
|
153901
|
-
transition: theme.transitions.create(['background-color', 'box-shadow', 'border-color'], {
|
|
153902
|
-
duration: theme.transitions.duration.short
|
|
153903
|
-
}),
|
|
153904
|
-
[`&.${buttonClasses.loading}`]: {
|
|
153905
|
-
color: 'transparent'
|
|
153906
|
-
}
|
|
153907
|
-
}
|
|
153908
|
-
}]
|
|
153909
|
-
};
|
|
153910
|
-
}));
|
|
153911
|
-
const ButtonStartIcon = styled('span', {
|
|
153912
|
-
name: 'MuiButton',
|
|
153913
|
-
slot: 'StartIcon',
|
|
153914
|
-
overridesResolver: (props, styles) => {
|
|
153915
|
-
const {
|
|
153916
|
-
ownerState
|
|
153917
|
-
} = props;
|
|
153918
|
-
return [styles.startIcon, ownerState.loading && styles.startIconLoadingStart, styles[`iconSize${capitalize(ownerState.size)}`]];
|
|
153919
|
-
}
|
|
153920
|
-
})(({
|
|
153921
|
-
theme
|
|
153922
|
-
}) => ({
|
|
153923
|
-
display: 'inherit',
|
|
153924
|
-
marginRight: 8,
|
|
153925
|
-
marginLeft: -4,
|
|
153926
|
-
variants: [{
|
|
153927
|
-
props: {
|
|
153928
|
-
size: 'small'
|
|
153929
|
-
},
|
|
153930
|
-
style: {
|
|
153931
|
-
marginLeft: -2
|
|
153932
|
-
}
|
|
153933
|
-
}, {
|
|
153934
|
-
props: {
|
|
153935
|
-
loadingPosition: 'start',
|
|
153936
|
-
loading: true
|
|
153937
|
-
},
|
|
153938
|
-
style: {
|
|
153939
|
-
transition: theme.transitions.create(['opacity'], {
|
|
153940
|
-
duration: theme.transitions.duration.short
|
|
153941
|
-
}),
|
|
153942
|
-
opacity: 0
|
|
153943
|
-
}
|
|
153944
|
-
}, {
|
|
153945
|
-
props: {
|
|
153946
|
-
loadingPosition: 'start',
|
|
153947
|
-
loading: true,
|
|
153948
|
-
fullWidth: true
|
|
153949
|
-
},
|
|
153950
|
-
style: {
|
|
153951
|
-
marginRight: -8
|
|
153952
|
-
}
|
|
153953
|
-
}, ...commonIconStyles]
|
|
153954
|
-
}));
|
|
153955
|
-
const ButtonEndIcon = styled('span', {
|
|
153956
|
-
name: 'MuiButton',
|
|
153957
|
-
slot: 'EndIcon',
|
|
153958
|
-
overridesResolver: (props, styles) => {
|
|
153959
|
-
const {
|
|
153960
|
-
ownerState
|
|
153961
|
-
} = props;
|
|
153962
|
-
return [styles.endIcon, ownerState.loading && styles.endIconLoadingEnd, styles[`iconSize${capitalize(ownerState.size)}`]];
|
|
153963
|
-
}
|
|
153964
|
-
})(({
|
|
153965
|
-
theme
|
|
153966
|
-
}) => ({
|
|
153967
|
-
display: 'inherit',
|
|
153968
|
-
marginRight: -4,
|
|
153969
|
-
marginLeft: 8,
|
|
153970
|
-
variants: [{
|
|
153971
|
-
props: {
|
|
153972
|
-
size: 'small'
|
|
153973
|
-
},
|
|
153974
|
-
style: {
|
|
153975
|
-
marginRight: -2
|
|
153976
|
-
}
|
|
153977
|
-
}, {
|
|
153978
|
-
props: {
|
|
153979
|
-
loadingPosition: 'end',
|
|
153980
|
-
loading: true
|
|
153981
|
-
},
|
|
153982
|
-
style: {
|
|
153983
|
-
transition: theme.transitions.create(['opacity'], {
|
|
153984
|
-
duration: theme.transitions.duration.short
|
|
153985
|
-
}),
|
|
153986
|
-
opacity: 0
|
|
153987
|
-
}
|
|
153988
|
-
}, {
|
|
153989
|
-
props: {
|
|
153990
|
-
loadingPosition: 'end',
|
|
153991
|
-
loading: true,
|
|
153992
|
-
fullWidth: true
|
|
153993
|
-
},
|
|
153994
|
-
style: {
|
|
153995
|
-
marginLeft: -8
|
|
153996
|
-
}
|
|
153997
|
-
}, ...commonIconStyles]
|
|
153998
|
-
}));
|
|
153999
|
-
const ButtonLoadingIndicator = styled('span', {
|
|
154000
|
-
name: 'MuiButton',
|
|
154001
|
-
slot: 'LoadingIndicator'
|
|
154002
|
-
})(({
|
|
154003
|
-
theme
|
|
154004
|
-
}) => ({
|
|
154005
|
-
display: 'none',
|
|
154006
|
-
position: 'absolute',
|
|
154007
|
-
visibility: 'visible',
|
|
154008
|
-
variants: [{
|
|
154009
|
-
props: {
|
|
154010
|
-
loading: true
|
|
154011
|
-
},
|
|
154012
|
-
style: {
|
|
154013
|
-
display: 'flex'
|
|
154014
|
-
}
|
|
154015
|
-
}, {
|
|
154016
|
-
props: {
|
|
154017
|
-
loadingPosition: 'start'
|
|
154018
|
-
},
|
|
154019
|
-
style: {
|
|
154020
|
-
left: 14
|
|
154021
|
-
}
|
|
154022
|
-
}, {
|
|
154023
|
-
props: {
|
|
154024
|
-
loadingPosition: 'start',
|
|
154025
|
-
size: 'small'
|
|
154026
|
-
},
|
|
154027
|
-
style: {
|
|
154028
|
-
left: 10
|
|
154029
|
-
}
|
|
154030
|
-
}, {
|
|
154031
|
-
props: {
|
|
154032
|
-
variant: 'text',
|
|
154033
|
-
loadingPosition: 'start'
|
|
154034
|
-
},
|
|
154035
|
-
style: {
|
|
154036
|
-
left: 6
|
|
154037
|
-
}
|
|
154038
|
-
}, {
|
|
154039
|
-
props: {
|
|
154040
|
-
loadingPosition: 'center'
|
|
154041
|
-
},
|
|
154042
|
-
style: {
|
|
154043
|
-
left: '50%',
|
|
154044
|
-
transform: 'translate(-50%)',
|
|
154045
|
-
color: (theme.vars || theme).palette.action.disabled
|
|
154046
|
-
}
|
|
154047
|
-
}, {
|
|
154048
|
-
props: {
|
|
154049
|
-
loadingPosition: 'end'
|
|
154050
|
-
},
|
|
154051
|
-
style: {
|
|
154052
|
-
right: 14
|
|
154053
|
-
}
|
|
154054
|
-
}, {
|
|
154055
|
-
props: {
|
|
154056
|
-
loadingPosition: 'end',
|
|
154057
|
-
size: 'small'
|
|
154058
|
-
},
|
|
154059
|
-
style: {
|
|
154060
|
-
right: 10
|
|
154061
|
-
}
|
|
154062
|
-
}, {
|
|
154063
|
-
props: {
|
|
154064
|
-
variant: 'text',
|
|
154065
|
-
loadingPosition: 'end'
|
|
154066
|
-
},
|
|
154067
|
-
style: {
|
|
154068
|
-
right: 6
|
|
154069
|
-
}
|
|
154070
|
-
}, {
|
|
154071
|
-
props: {
|
|
154072
|
-
loadingPosition: 'start',
|
|
154073
|
-
fullWidth: true
|
|
154074
|
-
},
|
|
154075
|
-
style: {
|
|
154076
|
-
position: 'relative',
|
|
154077
|
-
left: -10
|
|
154078
|
-
}
|
|
154079
|
-
}, {
|
|
154080
|
-
props: {
|
|
154081
|
-
loadingPosition: 'end',
|
|
154082
|
-
fullWidth: true
|
|
154083
|
-
},
|
|
154084
|
-
style: {
|
|
154085
|
-
position: 'relative',
|
|
154086
|
-
right: -10
|
|
154087
|
-
}
|
|
154088
|
-
}]
|
|
154089
|
-
}));
|
|
154090
|
-
const ButtonLoadingIconPlaceholder = styled('span', {
|
|
154091
|
-
name: 'MuiButton',
|
|
154092
|
-
slot: 'LoadingIconPlaceholder'
|
|
154093
|
-
})({
|
|
154094
|
-
display: 'inline-block',
|
|
154095
|
-
width: '1em',
|
|
154096
|
-
height: '1em'
|
|
154097
|
-
});
|
|
154098
|
-
const Button = /*#__PURE__*/React.forwardRef(function Button(inProps, ref) {
|
|
154099
|
-
// props priority: `inProps` > `contextProps` > `themeDefaultProps`
|
|
154100
|
-
const contextProps = React.useContext(ButtonGroupContext);
|
|
154101
|
-
const buttonGroupButtonContextPositionClassName = React.useContext(ButtonGroupButtonContext);
|
|
154102
|
-
const resolvedProps = resolveProps(contextProps, inProps);
|
|
154103
|
-
const props = useDefaultProps({
|
|
154104
|
-
props: resolvedProps,
|
|
154105
|
-
name: 'MuiButton'
|
|
154106
|
-
});
|
|
154107
|
-
const {
|
|
154108
|
-
children,
|
|
154109
|
-
color = 'primary',
|
|
154110
|
-
component = 'button',
|
|
154111
|
-
className,
|
|
154112
|
-
disabled = false,
|
|
154113
|
-
disableElevation = false,
|
|
154114
|
-
disableFocusRipple = false,
|
|
154115
|
-
endIcon: endIconProp,
|
|
154116
|
-
focusVisibleClassName,
|
|
154117
|
-
fullWidth = false,
|
|
154118
|
-
id: idProp,
|
|
154119
|
-
loading = null,
|
|
154120
|
-
loadingIndicator: loadingIndicatorProp,
|
|
154121
|
-
loadingPosition = 'center',
|
|
154122
|
-
size = 'medium',
|
|
154123
|
-
startIcon: startIconProp,
|
|
154124
|
-
type,
|
|
154125
|
-
variant = 'text',
|
|
154126
|
-
...other
|
|
154127
|
-
} = props;
|
|
154128
|
-
const loadingId = useId(idProp);
|
|
154129
|
-
const loadingIndicator = loadingIndicatorProp ?? /*#__PURE__*/jsxRuntimeExports.jsx(CircularProgress$1, {
|
|
154130
|
-
"aria-labelledby": loadingId,
|
|
154131
|
-
color: "inherit",
|
|
154132
|
-
size: 16
|
|
154133
|
-
});
|
|
154134
|
-
const ownerState = {
|
|
154135
|
-
...props,
|
|
154136
|
-
color,
|
|
154137
|
-
component,
|
|
154138
|
-
disabled,
|
|
154139
|
-
disableElevation,
|
|
154140
|
-
disableFocusRipple,
|
|
154141
|
-
fullWidth,
|
|
154142
|
-
loading,
|
|
154143
|
-
loadingIndicator,
|
|
154144
|
-
loadingPosition,
|
|
154145
|
-
size,
|
|
154146
|
-
type,
|
|
154147
|
-
variant
|
|
154148
|
-
};
|
|
154149
|
-
const classes = useUtilityClasses$s(ownerState);
|
|
154150
|
-
const startIcon = (startIconProp || loading && loadingPosition === 'start') && /*#__PURE__*/jsxRuntimeExports.jsx(ButtonStartIcon, {
|
|
154151
|
-
className: classes.startIcon,
|
|
154152
|
-
ownerState: ownerState,
|
|
154153
|
-
children: startIconProp || /*#__PURE__*/jsxRuntimeExports.jsx(ButtonLoadingIconPlaceholder, {
|
|
154154
|
-
className: classes.loadingIconPlaceholder,
|
|
154155
|
-
ownerState: ownerState
|
|
154156
|
-
})
|
|
154157
|
-
});
|
|
154158
|
-
const endIcon = (endIconProp || loading && loadingPosition === 'end') && /*#__PURE__*/jsxRuntimeExports.jsx(ButtonEndIcon, {
|
|
154159
|
-
className: classes.endIcon,
|
|
154160
|
-
ownerState: ownerState,
|
|
154161
|
-
children: endIconProp || /*#__PURE__*/jsxRuntimeExports.jsx(ButtonLoadingIconPlaceholder, {
|
|
154162
|
-
className: classes.loadingIconPlaceholder,
|
|
154163
|
-
ownerState: ownerState
|
|
154164
|
-
})
|
|
154165
|
-
});
|
|
154166
|
-
const positionClassName = buttonGroupButtonContextPositionClassName || '';
|
|
154167
|
-
const loader = typeof loading === 'boolean' ?
|
|
154168
|
-
/*#__PURE__*/
|
|
154169
|
-
// use plain HTML span to minimize the runtime overhead
|
|
154170
|
-
jsxRuntimeExports.jsx("span", {
|
|
154171
|
-
className: classes.loadingWrapper,
|
|
154172
|
-
style: {
|
|
154173
|
-
display: 'contents'
|
|
154174
|
-
},
|
|
154175
|
-
children: loading && /*#__PURE__*/jsxRuntimeExports.jsx(ButtonLoadingIndicator, {
|
|
154176
|
-
className: classes.loadingIndicator,
|
|
154177
|
-
ownerState: ownerState,
|
|
154178
|
-
children: loadingIndicator
|
|
154179
|
-
})
|
|
154180
|
-
}) : null;
|
|
154181
|
-
return /*#__PURE__*/jsxRuntimeExports.jsxs(ButtonRoot, {
|
|
154182
|
-
ownerState: ownerState,
|
|
154183
|
-
className: clsx(contextProps.className, classes.root, className, positionClassName),
|
|
154184
|
-
component: component,
|
|
154185
|
-
disabled: disabled || loading,
|
|
154186
|
-
focusRipple: !disableFocusRipple,
|
|
154187
|
-
focusVisibleClassName: clsx(classes.focusVisible, focusVisibleClassName),
|
|
154188
|
-
ref: ref,
|
|
154189
|
-
type: type,
|
|
154190
|
-
id: loading ? loadingId : idProp,
|
|
154191
|
-
...other,
|
|
154192
|
-
classes: classes,
|
|
154193
|
-
children: [startIcon, loadingPosition !== 'end' && loader, children, loadingPosition === 'end' && loader, endIcon]
|
|
154194
|
-
});
|
|
154195
|
-
});
|
|
154196
|
-
process.env.NODE_ENV !== "production" ? Button.propTypes /* remove-proptypes */ = {
|
|
154197
|
-
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
154198
|
-
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
154199
|
-
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
154200
|
-
// └─────────────────────────────────────────────────────────────────────┘
|
|
154201
|
-
/**
|
|
154202
|
-
* The content of the component.
|
|
154203
|
-
*/
|
|
154204
|
-
children: PropTypes.node,
|
|
154205
|
-
/**
|
|
154206
|
-
* Override or extend the styles applied to the component.
|
|
154207
|
-
*/
|
|
154208
|
-
classes: PropTypes.object,
|
|
154209
|
-
/**
|
|
154210
|
-
* @ignore
|
|
154211
|
-
*/
|
|
154212
|
-
className: PropTypes.string,
|
|
154213
|
-
/**
|
|
154214
|
-
* The color of the component.
|
|
154215
|
-
* It supports both default and custom theme colors, which can be added as shown in the
|
|
154216
|
-
* [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
|
|
154217
|
-
* @default 'primary'
|
|
154218
|
-
*/
|
|
154219
|
-
color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['inherit', 'primary', 'secondary', 'success', 'error', 'info', 'warning']), PropTypes.string]),
|
|
154220
|
-
/**
|
|
154221
|
-
* The component used for the root node.
|
|
154222
|
-
* Either a string to use a HTML element or a component.
|
|
154223
|
-
*/
|
|
154224
|
-
component: PropTypes.elementType,
|
|
154225
|
-
/**
|
|
154226
|
-
* If `true`, the component is disabled.
|
|
154227
|
-
* @default false
|
|
154228
|
-
*/
|
|
154229
|
-
disabled: PropTypes.bool,
|
|
154230
|
-
/**
|
|
154231
|
-
* If `true`, no elevation is used.
|
|
154232
|
-
* @default false
|
|
154233
|
-
*/
|
|
154234
|
-
disableElevation: PropTypes.bool,
|
|
154235
|
-
/**
|
|
154236
|
-
* If `true`, the keyboard focus ripple is disabled.
|
|
154237
|
-
* @default false
|
|
154238
|
-
*/
|
|
154239
|
-
disableFocusRipple: PropTypes.bool,
|
|
154240
|
-
/**
|
|
154241
|
-
* If `true`, the ripple effect is disabled.
|
|
154242
|
-
*
|
|
154243
|
-
* ⚠️ Without a ripple there is no styling for :focus-visible by default. Be sure
|
|
154244
|
-
* to highlight the element by applying separate styles with the `.Mui-focusVisible` class.
|
|
154245
|
-
* @default false
|
|
154246
|
-
*/
|
|
154247
|
-
disableRipple: PropTypes.bool,
|
|
154248
|
-
/**
|
|
154249
|
-
* Element placed after the children.
|
|
154250
|
-
*/
|
|
154251
|
-
endIcon: PropTypes.node,
|
|
154252
|
-
/**
|
|
154253
|
-
* @ignore
|
|
154254
|
-
*/
|
|
154255
|
-
focusVisibleClassName: PropTypes.string,
|
|
154256
|
-
/**
|
|
154257
|
-
* If `true`, the button will take up the full width of its container.
|
|
154258
|
-
* @default false
|
|
154259
|
-
*/
|
|
154260
|
-
fullWidth: PropTypes.bool,
|
|
154261
|
-
/**
|
|
154262
|
-
* The URL to link to when the button is clicked.
|
|
154263
|
-
* If defined, an `a` element will be used as the root node.
|
|
154264
|
-
*/
|
|
154265
|
-
href: PropTypes.string,
|
|
154266
|
-
/**
|
|
154267
|
-
* @ignore
|
|
154268
|
-
*/
|
|
154269
|
-
id: PropTypes.string,
|
|
154270
|
-
/**
|
|
154271
|
-
* If `true`, the loading indicator is visible and the button is disabled.
|
|
154272
|
-
* If `true | false`, the loading wrapper is always rendered before the children to prevent [Google Translation Crash](https://github.com/mui/material-ui/issues/27853).
|
|
154273
|
-
* @default null
|
|
154274
|
-
*/
|
|
154275
|
-
loading: PropTypes.bool,
|
|
154276
|
-
/**
|
|
154277
|
-
* Element placed before the children if the button is in loading state.
|
|
154278
|
-
* The node should contain an element with `role="progressbar"` with an accessible name.
|
|
154279
|
-
* By default, it renders a `CircularProgress` that is labeled by the button itself.
|
|
154280
|
-
* @default <CircularProgress color="inherit" size={16} />
|
|
154281
|
-
*/
|
|
154282
|
-
loadingIndicator: PropTypes.node,
|
|
154283
|
-
/**
|
|
154284
|
-
* The loading indicator can be positioned on the start, end, or the center of the button.
|
|
154285
|
-
* @default 'center'
|
|
154286
|
-
*/
|
|
154287
|
-
loadingPosition: PropTypes.oneOf(['center', 'end', 'start']),
|
|
154288
|
-
/**
|
|
154289
|
-
* The size of the component.
|
|
154290
|
-
* `small` is equivalent to the dense button styling.
|
|
154291
|
-
* @default 'medium'
|
|
154292
|
-
*/
|
|
154293
|
-
size: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['small', 'medium', 'large']), PropTypes.string]),
|
|
154294
|
-
/**
|
|
154295
|
-
* Element placed before the children.
|
|
154296
|
-
*/
|
|
154297
|
-
startIcon: PropTypes.node,
|
|
154298
|
-
/**
|
|
154299
|
-
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
154300
|
-
*/
|
|
154301
|
-
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
154302
|
-
/**
|
|
154303
|
-
* @ignore
|
|
154304
|
-
*/
|
|
154305
|
-
type: PropTypes.oneOfType([PropTypes.oneOf(['button', 'reset', 'submit']), PropTypes.string]),
|
|
154306
|
-
/**
|
|
154307
|
-
* The variant to use.
|
|
154308
|
-
* @default 'text'
|
|
154309
|
-
*/
|
|
154310
|
-
variant: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['contained', 'outlined', 'text']), PropTypes.string])
|
|
154311
|
-
} : void 0;
|
|
154312
|
-
|
|
154313
154956
|
function getDialogActionsUtilityClass(slot) {
|
|
154314
154957
|
return generateUtilityClass('MuiDialogActions', slot);
|
|
154315
154958
|
}
|
|
@@ -206515,4 +207158,4 @@ var index_es = /*#__PURE__*/Object.freeze({
|
|
|
206515
207158
|
vectorsRatio: vectorsRatio
|
|
206516
207159
|
});
|
|
206517
207160
|
|
|
206518
|
-
export { Container$n as Action, AdvancedSearch, AppContext, AppProvider, AsyncAutocomplete, AwingContext, BarLineChart, BoxResizableSplit, ButtonDateRangePicker, ButtonSelect, CircularProgress, DrawerBase as ClassicBaseDrawer, DrawerWrapper$1 as ClassicDrawer, CloseAction, ContentHeader, ControlPanels, CopyButton, CronTab, DataForm, DataGrid, DataGridGroup, DataGridSortType, InputFactory as DataInput, DateAutoFormat, Container$g as DatePicker, DateRangePicker$1 as DateRangePicker, Container$h as DateRangePickerOld, EnhancedDialog as DeprecatedEnhancedDialog, CreateDirectory as DirectoryForm, PermissionWarpper as DirectoryPermission, DirectoryRoot, DirectorySystem, DirectoryTree, DrawerWrapper as Drawer, DrawerNavigate, DrawerStateEnum, Container$m as EnhancedAutoComplete, EnumFieldInputType, EnumSelectedPlaceType, FIELD_TYPE, FilterNotification, FilterOperationType, FilterTreeView, FooterContainer as Footer, GoogleMap, GroupSystem, GroupTable, HierarchyTree, I18nProvider, INT_NUMBER_LIMIT, Container as Layout, Notifications as LayoutNotifications, LogicExpressionInput as LogicExpression, LogicalOperatorType, MemoWrap, MonacoEditor$1 as MonacoEditor, MultipleChoice, MultipleHierarchicalChoice, NoData, NotificationConfig, NotificationFilter as NotificationObjectFilter, NumberFormat, AsynchronousAutocomplete as OldAsyncAutoComplete, Page, PageManagement, Pagination, ParamConfigurationInputs, PieChart, PlaceFilter, RoleSystem, RoleTagSystem, SchemaSystem, SearchBox, Sharing as SharingSystem, ShowTreeItem, SimpleTreeItemWrapper, SortEnumType, Sortable, SortableTree, StatisticsCommon as Statistics, SubscriptionConfig, TIMELINE_TYPE, TYPE_CHART, TYPE_FILTERS, TabLabel, TableCellEditable$1 as TableCellEditable, TableEditable$1 as TableEditable, TableEditableBody$1 as TableEditableBody, TableEditable as TableEditableCollapsible, TableEditableBody as TableEditableCollapsibleBody, TableCellEditable as TableEditableCollapsibleCell, TableHeader as TableEditableCollapsibleTableHeader, TopBarActions as TableEditableCollapsibleTopBarActions, TableHeader$1 as TableHeader, TablePaginationActions, Template as TemplateConfig, ThemeProvider, ToolbarLayout as Toolbar, TopBarActions$1 as TopBarActions, TreeItemWithAction, User as UserSystem, WMAPEcalculator, WorkflowFeature as WorkflowSystem, WorkspaceType, Wrapper, arrayIsNotEmptyValid, calculateValue, calculatorDirectoryIdRoot, changeToAlias, checkValidMacAddress, checkValidStringListAP, checkValidUrl, colorValid, containsOnlyDigits, convertArrayFiltersToCondition, convertArrayToObject, convertDataSetPattern, convertDateTimeToTimestamp, convertFilterExpressionToCondition, convertFormulaToBinaryTree, convertTimeLine, convertTimelineToDateTime, convertTimestampToDateTime, convertToPostfix, darkTheme, dateRangeValid, dateTimeToString, dateToString, dateToStringDDMMYYYY, dateValid, download, downloadWithDataSet, emailValid, fillMissingDates, flattenTree, formatChartNumber, formatJSON$1 as formatJSON, formatNumberByLocale, formatNumberWithLanguage, generateUUID, getAllStringsBetweenBraces, getCookie, getDefaultValues, getGUID, getPrecedence, getQueryVariable, getRandomKey, getRoutePath, getStartOfDay, getToday, handleExportExcel, i18n as i18nLib, isOperand, isOperator, lightTheme, nameExportStandard, notNullValid, numberNotNullValid, numberOnlyValid, numberPercentageNotNullValid, off, offlinePaginate, parseJSON, passwordValid, positiveNumberNotNullValid, pub, replaceFieldsValue, roundDecimalNumber, setObject, stringNotNullValid, stringNullableValid, sub, textValidation, timestampToStringDDMMYYYY, toCapitalize, tokenize, updateGUID, updateObjectFields, urlValid, useAppHelper, useAwing, useDrawer, useGetContext$8 as useGetContext, useGetData, usePath, validateNumber };
|
|
207161
|
+
export { Container$n as Action, AdvancedSearch, AppContext, AppProvider, AsyncAutocomplete, AwingContext, BarLineChart, BoxResizableSplit, ButtonDateRangePicker, ButtonSelect, SplitButton as ButtonSplit, CircularProgress, DrawerBase as ClassicBaseDrawer, DrawerWrapper$1 as ClassicDrawer, CloseAction, ContentHeader, ControlPanels, CopyButton, CronTab, DataForm, DataGrid, DataGridGroup, DataGridSortType, InputFactory as DataInput, DateAutoFormat, Container$g as DatePicker, DateRangePicker$1 as DateRangePicker, Container$h as DateRangePickerOld, EnhancedDialog as DeprecatedEnhancedDialog, CreateDirectory as DirectoryForm, PermissionWarpper as DirectoryPermission, DirectoryRoot, DirectorySystem, DirectoryTree, DrawerWrapper as Drawer, DrawerNavigate, DrawerStateEnum, Container$m as EnhancedAutoComplete, EnumFieldInputType, EnumSelectedPlaceType, FIELD_TYPE, FilterNotification, FilterOperationType, FilterTreeView, FooterContainer as Footer, GoogleMap, GroupSystem, GroupTable, HierarchyTree, I18nProvider, INT_NUMBER_LIMIT, Container as Layout, Notifications as LayoutNotifications, LogicExpressionInput as LogicExpression, LogicalOperatorType, MemoWrap, MonacoEditor$1 as MonacoEditor, MultipleChoice, MultipleHierarchicalChoice, NoData, NotificationConfig, NotificationFilter as NotificationObjectFilter, NumberFormat, AsynchronousAutocomplete as OldAsyncAutoComplete, Page, PageManagement, Pagination, ParamConfigurationInputs, PieChart, PlaceFilter, RoleSystem, RoleTagSystem, SchemaSystem, SearchBox, Sharing as SharingSystem, ShowTreeItem, SimpleTreeItemWrapper, SortEnumType, Sortable, SortableTree, StatisticsCommon as Statistics, SubscriptionConfig, TIMELINE_TYPE, TYPE_CHART, TYPE_FILTERS, TabLabel, TableCellEditable$1 as TableCellEditable, TableEditable$1 as TableEditable, TableEditableBody$1 as TableEditableBody, TableEditable as TableEditableCollapsible, TableEditableBody as TableEditableCollapsibleBody, TableCellEditable as TableEditableCollapsibleCell, TableHeader as TableEditableCollapsibleTableHeader, TopBarActions as TableEditableCollapsibleTopBarActions, TableHeader$1 as TableHeader, TablePaginationActions, Template as TemplateConfig, ThemeProvider, ToolbarLayout as Toolbar, TopBarActions$1 as TopBarActions, TreeItemWithAction, User as UserSystem, WMAPEcalculator, WorkflowFeature as WorkflowSystem, WorkspaceType, Wrapper, arrayIsNotEmptyValid, calculateValue, calculatorDirectoryIdRoot, changeToAlias, checkValidMacAddress, checkValidStringListAP, checkValidUrl, colorValid, containsOnlyDigits, convertArrayFiltersToCondition, convertArrayToObject, convertDataSetPattern, convertDateTimeToTimestamp, convertFilterExpressionToCondition, convertFormulaToBinaryTree, convertTimeLine, convertTimelineToDateTime, convertTimestampToDateTime, convertToPostfix, darkTheme, dateRangeValid, dateTimeToString, dateToString, dateToStringDDMMYYYY, dateValid, download, downloadWithDataSet, emailValid, fillMissingDates, flattenTree, formatChartNumber, formatJSON$1 as formatJSON, formatNumberByLocale, formatNumberWithLanguage, generateUUID, getAllStringsBetweenBraces, getCookie, getDefaultValues, getGUID, getPrecedence, getQueryVariable, getRandomKey, getRoutePath, getStartOfDay, getToday, handleExportExcel, i18n as i18nLib, isOperand, isOperator, lightTheme, nameExportStandard, notNullValid, numberNotNullValid, numberOnlyValid, numberPercentageNotNullValid, off, offlinePaginate, parseJSON, passwordValid, positiveNumberNotNullValid, pub, replaceFieldsValue, roundDecimalNumber, setObject, stringNotNullValid, stringNullableValid, sub, textValidation, timestampToStringDDMMYYYY, toCapitalize, tokenize, updateGUID, updateObjectFields, urlValid, useAppHelper, useAwing, useDrawer, useGetContext$8 as useGetContext, useGetData, usePath, validateNumber };
|