@hybridcore/ui 1.6.0 → 1.6.2
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/CATALOG.md +179 -0
- package/README.md +1 -2
- package/dist/AccordionSummary-CJppWeqF.js +781 -0
- package/dist/Add-CqcD1PWb.js +403 -0
- package/dist/Box-DqUMmZjL.js +31 -0
- package/dist/{Button-CvE2gnly.js → Button-C5yquWAB.js} +120 -133
- package/dist/ButtonBase-BEF7oTOe.js +887 -0
- package/dist/{Delete-CW0UZv1m.js → Delete-BdyYpINH.js} +9 -8
- package/dist/{DialogContent-B3nbEbuv.js → DialogContent-BvVjD9z3.js} +127 -124
- package/dist/FormGroup-CpBsIyYR.js +89 -0
- package/dist/{IconButton-CHwRQF-g.js → IconButton-BoGwbvrP.js} +41 -43
- package/dist/InputLabel-Dd8RrneV.js +341 -0
- package/dist/{MenuItem-xZx_w7zA.js → MenuItem-DwqJqzuM.js} +51 -53
- package/dist/Modal-MUZygjmQ.js +1158 -0
- package/dist/Paper-BkQLdsCI.js +582 -0
- package/dist/Select-DHUl_uG3.js +3916 -0
- package/dist/SwitchBase-DTndTqI8.js +235 -0
- package/dist/TextField-e2oKaUN1.js +669 -0
- package/dist/TransitionGroupContext-BDAp2T0O.js +96 -0
- package/dist/{Typography-CxbneZy_.js → Typography-DgsSLCFC.js} +53 -53
- package/dist/assertThisInitialized-C1dAyb4j.js +7 -0
- package/dist/assets/index4.css +1 -0
- package/dist/clsx-OuTLNxxd.js +16 -0
- package/dist/components/access/helpers.js +1 -1
- package/dist/components/access/index.js +8 -15
- package/dist/components/access/logic.js +25 -0
- package/dist/components/button/index.js +10 -0
- package/dist/components/button/logic.js +26 -0
- package/dist/components/button/styled.js +9 -0
- package/dist/components/card/index.js +158 -498
- package/dist/components/card/logic.js +24 -0
- package/dist/components/card/styled.js +226 -51
- package/dist/components/card-alternate/index.js +111 -139
- package/dist/components/card-alternate/logic.js +17 -0
- package/dist/components/card-alternate/styled.js +113 -19
- package/dist/components/charts/_common/chart-error.js +19 -0
- package/dist/components/charts/candlestick/index.js +3 -3
- package/dist/components/charts/candlestick/logic.js +123 -113
- package/dist/components/charts/chart-wrapper/index.js +5 -5
- package/dist/components/charts/column-line-mix/index.js +9 -8
- package/dist/components/charts/column-line-mix/logic.js +68 -71
- package/dist/components/charts/drill-down-treemap/index.js +8 -7
- package/dist/components/charts/drill-down-treemap/logic.js +138 -144
- package/dist/components/charts/drill-down-voronoi-treemap/index.js +9 -8
- package/dist/components/charts/drill-down-voronoi-treemap/logic.js +222 -228
- package/dist/components/charts/heatmap/index.js +9 -8
- package/dist/components/charts/heatmap/logic.js +167 -173
- package/dist/components/charts/highlighting-line-data/index.js +3 -3
- package/dist/components/charts/line/index.js +9 -8
- package/dist/components/charts/line/logic.js +74 -79
- package/dist/components/charts/logaritmic-scale/index.js +9 -8
- package/dist/components/charts/logaritmic-scale/logic.js +63 -69
- package/dist/components/charts/multiple-value-axes/index.js +9 -8
- package/dist/components/charts/multiple-value-axes/logic.js +101 -107
- package/dist/components/charts/nested-pie/index.js +9 -8
- package/dist/components/charts/nested-pie/logic.js +62 -68
- package/dist/components/charts/packed-circles/index.js +7 -6
- package/dist/components/charts/packed-circles/logic.js +50 -56
- package/dist/components/charts/pie-chart/index.js +9 -8
- package/dist/components/charts/pie-chart/logic.js +49 -54
- package/dist/components/charts/stacked-area-radar/index.js +8 -7
- package/dist/components/charts/stacked-area-radar/logic.js +113 -118
- package/dist/components/charts/stacked-column-chart/index.js +9 -8
- package/dist/components/charts/stacked-column-chart/logic.js +78 -84
- package/dist/components/charts/xy-chart/index.js +9 -8
- package/dist/components/charts/xy-chart/logic.js +56 -60
- package/dist/components/collapsible-card/index.js +11 -10
- package/dist/components/collapsible-card/styled.js +1 -1
- package/dist/components/color-picker/index.js +7120 -0
- package/dist/components/color-picker/logic.js +18 -0
- package/dist/components/color-picker/styled.js +7 -0
- package/dist/components/confirm/dialog.js +3 -3
- package/dist/components/confirm/index.js +1 -1
- package/dist/components/container/index.js +28 -269
- package/dist/components/container/logic.js +12 -0
- package/dist/components/container/styled.js +29 -0
- package/dist/components/context-menu/index.js +25 -457
- package/dist/components/context-menu/logic.js +14 -0
- package/dist/components/context-menu/styled.js +40 -0
- package/dist/components/data-grid/index.js +22 -0
- package/dist/components/data-grid/logic.js +15 -0
- package/dist/components/data-grid/styled.js +20 -0
- package/dist/components/data-map/components/controls/index.js +4 -6
- package/dist/components/data-map/index.js +11 -11
- package/dist/components/data-security-selectors/dissemination-list/index.js +192 -191
- package/dist/components/data-security-selectors/dissemination-list/styled.js +12 -12
- package/dist/components/data-security-selectors/security-level/index.js +39 -91
- package/dist/components/data-security-selectors/security-level/logic.js +28 -0
- package/dist/components/data-security-selectors/security-level/styled.js +53 -0
- package/dist/components/date-picker-with-custom-range/index.js +1 -1
- package/dist/components/date-range-picker/index.js +2748 -0
- package/dist/components/date-range-picker/styled.js +14 -0
- package/dist/components/date-time-picker/index.js +45 -46
- package/dist/components/divider/index.js +11 -11
- package/dist/components/document-viewer/components/action-buttons/index.js +15 -15
- package/dist/components/document-viewer/components/navigation/index.js +9 -9
- package/dist/components/document-viewer/components/viewer/index.js +31 -35
- package/dist/components/document-viewer/index.js +31 -39
- package/dist/components/document-viewer/logic.js +41 -34
- package/dist/components/document-viewer/styled.js +115 -27
- package/dist/components/duration-select/index.js +27 -0
- package/dist/components/duration-select/logic.js +21 -0
- package/dist/components/duration-select/styled.js +26 -0
- package/dist/components/editable-text/index.js +20 -0
- package/dist/components/editable-text/logic.js +18 -0
- package/dist/components/editable-text/styled.js +22 -0
- package/dist/components/geometry-picker/coordinate/index.js +29 -29
- package/dist/components/geometry-picker/edit/index.js +18 -18
- package/dist/components/geometry-picker/geometry/index.js +67 -67
- package/dist/components/geometry-picker/geometry/map-overlay.js +6 -6
- package/dist/components/geometry-picker/index.js +69 -85
- package/dist/components/geometry-picker/kml/index.js +16 -16
- package/dist/components/geometry-picker/logic.js +50 -57
- package/dist/components/geometry-picker/map/index.js +8 -8
- package/dist/components/geometry-picker/parser/coordinate-input/index.js +4 -4
- package/dist/components/geometry-picker/parser/index.js +46 -50
- package/dist/components/geometry-picker/parser/styled.js +22 -4
- package/dist/components/geometry-picker/styled.js +97 -37
- package/dist/components/geometry-picker/wkt/index.js +13 -13
- package/dist/components/heat-map/components/controls/index.js +4 -6
- package/dist/components/heat-map/components/legend/index.js +15 -17
- package/dist/components/heat-map/index.js +7 -7
- package/dist/components/instance-form/components/TopLabelWrapper.js +8 -48
- package/dist/components/instance-form/components/composite-list/index.js +5 -3
- package/dist/components/instance-form/components/composite-matrix/components/editable-table/index.js +83 -74
- package/dist/components/instance-form/components/composite-matrix/components/editor/index.js +45 -66
- package/dist/components/instance-form/components/composite-matrix/components/form/index.js +60 -75
- package/dist/components/instance-form/components/composite-matrix/components/json-editor/index.js +2425 -2422
- package/dist/components/instance-form/components/composite-matrix/components/table/index.js +33 -52
- package/dist/components/instance-form/components/composite-matrix/index.js +30 -36
- package/dist/components/instance-form/components/policy-list/index.js +47 -81
- package/dist/components/instance-form/components/variable/index.js +6 -11
- package/dist/components/instance-form/components/variables/index.js +48 -55
- package/dist/components/instance-form/helpers.js +9 -0
- package/dist/components/instance-form/index.js +402 -518
- package/dist/components/instance-form/logic.js +115 -0
- package/dist/components/instance-form/styled.js +487 -0
- package/dist/components/instance-hierarchy-table/index.js +32 -37
- package/dist/components/instance-hierarchy-table/logic.js +16 -0
- package/dist/components/instance-hierarchy-table/styled.js +53 -12
- package/dist/components/instance-table/index.js +30 -135
- package/dist/components/instance-table/logic.js +122 -0
- package/dist/components/instance-table/styled.js +53 -11
- package/dist/components/instance-variable-list/index.js +11 -11
- package/dist/components/loading/index.js +15 -9
- package/dist/components/loading/logic.js +15 -0
- package/dist/components/loading/styled.js +26 -19
- package/dist/components/map/index.js +28 -6
- package/dist/components/map/styled.js +1 -1
- package/dist/components/notification/index.js +67 -0
- package/dist/components/notification/logic.js +30 -0
- package/dist/components/notification/store.js +23 -0
- package/dist/components/notification/styled.js +52 -0
- package/dist/components/object-profile-card/components/avatar/index.js +9 -10
- package/dist/components/object-profile-card/index.js +19 -20
- package/dist/components/paginated-list/index.js +2 -3
- package/dist/components/phone-input/index.js +18 -22
- package/dist/components/phone-input/logic.js +14 -0
- package/dist/components/phone-input/styled.js +12 -4
- package/dist/components/placeholder/index.js +10 -0
- package/dist/components/placeholder/logic.js +12 -0
- package/dist/components/placeholder/styled.js +32 -0
- package/dist/components/positional-tooltip/index.js +24 -0
- package/dist/components/positional-tooltip/styled.js +17 -0
- package/dist/components/property-mapping/index.js +204 -423
- package/dist/components/property-mapping/logic.js +156 -0
- package/dist/components/property-mapping/styled.js +199 -0
- package/dist/components/prr-map/components/controls/index.js +4 -6
- package/dist/components/prr-map/components/legend/index.js +26 -28
- package/dist/components/prr-map/index.js +5 -5
- package/dist/components/range-selector/components/composite-list-range/index.js +42 -50
- package/dist/components/range-selector/components/date-range/index.js +87 -4221
- package/dist/components/range-selector/components/geometry-range/index.js +11 -17
- package/dist/components/range-selector/components/number-range/index.js +48 -53
- package/dist/components/range-selector/components/string-range/index.js +15 -17
- package/dist/components/range-selector/index.js +63 -57
- package/dist/components/range-selector/logic.js +12 -0
- package/dist/components/range-selector/styled.js +4294 -0
- package/dist/components/raster-grid-map/components/controls/index.js +4 -6
- package/dist/components/raster-grid-map/components/legend/index.js +4 -6
- package/dist/components/raster-grid-map/index.js +5 -5
- package/dist/components/scroll-drag/index.js +22 -0
- package/dist/components/scroll-drag/logic.js +39 -0
- package/dist/components/scroll-drag/styled.js +17 -0
- package/dist/components/search-input/logic.js +35 -33
- package/dist/components/simple-pivot-table/index.js +12 -12
- package/dist/components/sortable-list/index.js +599 -0
- package/dist/components/sortable-list/logic.js +18 -0
- package/dist/components/sortable-list/styled.js +38 -0
- package/dist/components/static-text/index.js +6 -6
- package/dist/components/stats-box/index.js +12 -0
- package/dist/components/stats-box/styled.js +36 -0
- package/dist/components/template-filters/components/filter/index.js +13 -18
- package/dist/components/template-filters/components/tab-panel/index.js +8 -16
- package/dist/components/template-filters/index.js +21 -29
- package/dist/components/template-filters/logic.js +18 -0
- package/dist/components/template-filters/styled.js +44 -1
- package/dist/components/template-form/components/property-list/index.js +27 -26
- package/dist/components/template-form/components/property-list/property-list-columns.js +3 -3
- package/dist/components/template-form/components/property-list/property-list-form.js +758 -14
- package/dist/components/template-form/components/recognition-property-list/index.js +11 -11
- package/dist/components/template-form/components/recognition-property-list/recognition-property-list-columns.js +2 -2
- package/dist/components/template-form/components/recognition-property-list/recognition-property-list-form.js +24 -23
- package/dist/components/template-form/components/select-icon/index.js +24 -24
- package/dist/components/template-form/helpers.js +17 -0
- package/dist/components/template-form/index.js +270 -309
- package/dist/components/template-form/logic.js +69 -0
- package/dist/components/template-form/styled.js +84 -0
- package/dist/components/template-property-filters/index.js +45 -95
- package/dist/components/template-property-filters/logic.js +27 -0
- package/dist/components/template-property-filters/property.js +105 -165
- package/dist/components/template-property-filters/styled.js +121 -20
- package/dist/components/text-overflow/index.js +6 -0
- package/dist/components/text-overflow/styled.js +13 -0
- package/dist/components/timeline/index.js +12 -12
- package/dist/components/toggle-view-button/index.js +35 -0
- package/dist/components/toggle-view-button/logic.js +22 -0
- package/dist/components/toggle-view-button/styled.js +11 -0
- package/dist/components/tree-select/index.js +52 -67
- package/dist/components/tree-select/logic.js +59 -0
- package/dist/components/tree-select/styled.js +45 -62
- package/dist/components/treeview-filter/index.js +43 -65
- package/dist/components/treeview-filter/item/index.js +43 -42
- package/dist/components/treeview-filter/item-label/index.js +17 -37
- package/dist/components/treeview-filter/logic.js +28 -0
- package/dist/components/treeview-filter/styled.js +86 -0
- package/dist/components/uploader/index.js +532 -567
- package/dist/components/uploader/logic.js +74 -0
- package/dist/components/uploader/styled.js +93 -46
- package/dist/components/visually-hidden-input/index.js +4 -0
- package/dist/components/visually-hidden-input/styled.js +18 -0
- package/dist/createChainedFunction-C0nujS3O.js +9 -0
- package/dist/{createSvgIcon-DrtgaibK.js → createSvgIcon-Ch_cT8az.js} +69 -68
- package/dist/createSvgIcon-DuDuASu1.js +62 -0
- package/dist/{dialog-DcwXug9J.js → dialog-BYRnCztH.js} +18 -18
- package/dist/formControlState-vgaj2ksH.js +10 -0
- package/dist/generateUtilityClasses-C3ivN9Ie.js +2973 -0
- package/dist/{helpers-B4UL9NMD.js → helpers-D4uXfBfO.js} +2 -2
- package/dist/index-BtlzPygz.js +470 -0
- package/dist/index-DH6qsPBn.js +153 -0
- package/dist/{index-syTc6m_V.js → index-e9xTIYWt.js} +87 -87
- package/dist/main.d.ts +1722 -562
- package/dist/main.js +161 -128
- package/dist/ownerWindow-wg6foiOE.js +10 -0
- package/dist/setPrototypeOf-NPgp4cYc.js +8 -0
- package/dist/styled-Db1RdcPA.js +323 -0
- package/dist/unsupportedProp-DuqR2hj9.js +36 -0
- package/dist/useId-BW-oWmul.js +19 -0
- package/dist/useMobilePicker-CY8ndYRL.js +8279 -0
- package/dist/useSlot-B_Q4vnX5.js +42 -0
- package/package.json +15 -7
- package/dist/AccordionSummary-DgAwVTk8.js +0 -742
- package/dist/Add-DJLrrVHm.js +0 -382
- package/dist/Box-p6OtTUEo.js +0 -30
- package/dist/ButtonBase-2bPw77UP.js +0 -961
- package/dist/CardContent-CSHh-ZlM.js +0 -74
- package/dist/Checkbox-CWRMFTBp.js +0 -421
- package/dist/FormControl-BLbrq4C7.js +0 -1636
- package/dist/FormControlLabel-C8SPv14J.js +0 -195
- package/dist/InputAdornment-DLxWUE6H.js +0 -157
- package/dist/List-tqElle9C.js +0 -121
- package/dist/ListItem-CfjsIg4B.js +0 -430
- package/dist/Modal-DhPpOoGB.js +0 -1299
- package/dist/Paper-2B03OBmZ.js +0 -169
- package/dist/Select-BgYwkZgI.js +0 -2613
- package/dist/TextField-1yCesIbH.js +0 -457
- package/dist/assertThisInitialized-BUtkG-md.js +0 -13
- package/dist/capitalize-ciszXJ7R.js +0 -9
- package/dist/components/instance-form/components/composite-list/styled.js +0 -73
- package/dist/components/instance-form/components/composite-matrix/components/editor/styled.js +0 -1
- package/dist/components/instance-form/components/composite-matrix/styled.js +0 -69
- package/dist/components/key-protection/index.js +0 -4
- package/dist/components/key-protection/menu.js +0 -85
- package/dist/components/key-protection/utils.js +0 -10
- package/dist/components/treeview-filter/item/styled.js +0 -39
- package/dist/createSvgIcon-BjpIhJ30.js +0 -71
- package/dist/createTheme-DYxDnE9u.js +0 -612
- package/dist/index-BMS1Otro.js +0 -183
- package/dist/index-CcdvNlgr.js +0 -503
- package/dist/index-kCJ_Zvl8.js +0 -34
- package/dist/isHostComponent-kiaBvYVo.js +0 -6
- package/dist/isMuiElement-CxT3_ACP.js +0 -13
- package/dist/listItemTextClasses-C3lndiXO.js +0 -16
- package/dist/property-list-form-zZQfpR0X.js +0 -386
- package/dist/styled-eZwjUruw.js +0 -12
- package/dist/unsupportedProp-BND8AB6O.js +0 -25
- package/dist/useId-B4-oF9Mq.js +0 -34
- package/dist/useMobilePicker-BLg3Blg8.js +0 -7589
- package/dist/useThemeProps-BzzHcQyd.js +0 -58
- package/dist/utils-BDNynJcd.js +0 -365
- package/dist/utils-Bq0ye5vf.js +0 -115
|
@@ -1,4284 +1,150 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
import { u as Nt } from "../../../../unsupportedProp-BND8AB6O.js";
|
|
21
|
-
import { T as Ge } from "../../../../Typography-CxbneZy_.js";
|
|
22
|
-
import { B as It } from "../../../../Button-CvE2gnly.js";
|
|
23
|
-
import { T as Ft } from "../../../../TextField-1yCesIbH.js";
|
|
24
|
-
import { I as Mo } from "../../../../IconButton-CHwRQF-g.js";
|
|
25
|
-
import { u as Bt } from "../../../../useControlled-BYdyS7Pn.js";
|
|
26
|
-
let Pe;
|
|
27
|
-
function Ro() {
|
|
28
|
-
if (Pe)
|
|
29
|
-
return Pe;
|
|
30
|
-
const o = document.createElement("div"), t = document.createElement("div");
|
|
31
|
-
return t.style.width = "10px", t.style.height = "1px", o.appendChild(t), o.dir = "rtl", o.style.fontSize = "14px", o.style.width = "4px", o.style.height = "1px", o.style.position = "absolute", o.style.top = "-1000px", o.style.overflow = "scroll", document.body.appendChild(o), Pe = "reverse", o.scrollLeft > 0 ? Pe = "default" : (o.scrollLeft = 1, o.scrollLeft === 0 && (Pe = "negative")), document.body.removeChild(o), Pe;
|
|
32
|
-
}
|
|
33
|
-
function lo(o, t) {
|
|
34
|
-
const s = o.scrollLeft;
|
|
35
|
-
if (t !== "rtl")
|
|
36
|
-
return s;
|
|
37
|
-
switch (Ro()) {
|
|
38
|
-
case "negative":
|
|
39
|
-
return o.scrollWidth - o.clientWidth + s;
|
|
40
|
-
case "reverse":
|
|
41
|
-
return o.scrollWidth - o.clientWidth - s;
|
|
42
|
-
default:
|
|
43
|
-
return s;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
function Vt(o) {
|
|
47
|
-
return ne("MuiPickersToolbarText", o);
|
|
48
|
-
}
|
|
49
|
-
const io = te("MuiPickersToolbarText", ["root", "selected"]), $t = ["className", "selected", "value"], Et = (o) => {
|
|
50
|
-
const {
|
|
51
|
-
classes: t,
|
|
52
|
-
selected: s
|
|
53
|
-
} = o;
|
|
54
|
-
return oe({
|
|
55
|
-
root: ["root", s && "selected"]
|
|
56
|
-
}, Vt, t);
|
|
57
|
-
}, _t = M(Ge, {
|
|
58
|
-
name: "MuiPickersToolbarText",
|
|
59
|
-
slot: "Root",
|
|
60
|
-
overridesResolver: (o, t) => [t.root, {
|
|
61
|
-
[`&.${io.selected}`]: t.selected
|
|
62
|
-
}]
|
|
63
|
-
})(({
|
|
64
|
-
theme: o
|
|
65
|
-
}) => ({
|
|
66
|
-
transition: o.transitions.create("color"),
|
|
67
|
-
color: (o.vars || o).palette.text.secondary,
|
|
68
|
-
[`&.${io.selected}`]: {
|
|
69
|
-
color: (o.vars || o).palette.text.primary
|
|
70
|
-
}
|
|
71
|
-
})), Oo = /* @__PURE__ */ T.forwardRef(function(t, s) {
|
|
72
|
-
const r = Q({
|
|
73
|
-
props: t,
|
|
74
|
-
name: "MuiPickersToolbarText"
|
|
75
|
-
}), {
|
|
76
|
-
className: a,
|
|
77
|
-
value: n
|
|
78
|
-
} = r, l = X(r, $t), i = Et(r);
|
|
79
|
-
return /* @__PURE__ */ p(_t, m({
|
|
80
|
-
ref: s,
|
|
81
|
-
className: Re(a, i.root),
|
|
82
|
-
component: "span"
|
|
83
|
-
}, l, {
|
|
84
|
-
children: n
|
|
85
|
-
}));
|
|
86
|
-
}), Lt = ["align", "className", "selected", "typographyClassName", "value", "variant"], jt = (o) => {
|
|
87
|
-
const {
|
|
88
|
-
classes: t
|
|
89
|
-
} = o;
|
|
90
|
-
return oe({
|
|
91
|
-
root: ["root"]
|
|
92
|
-
}, rt, t);
|
|
93
|
-
}, zt = M(It, {
|
|
94
|
-
name: "MuiPickersToolbarButton",
|
|
95
|
-
slot: "Root",
|
|
96
|
-
overridesResolver: (o, t) => t.root
|
|
97
|
-
})({
|
|
98
|
-
padding: 0,
|
|
99
|
-
minWidth: 16,
|
|
100
|
-
textTransform: "none"
|
|
101
|
-
}), ve = /* @__PURE__ */ T.forwardRef(function(t, s) {
|
|
102
|
-
const r = Q({
|
|
103
|
-
props: t,
|
|
104
|
-
name: "MuiPickersToolbarButton"
|
|
105
|
-
}), {
|
|
106
|
-
align: a,
|
|
107
|
-
className: n,
|
|
108
|
-
selected: l,
|
|
109
|
-
typographyClassName: i,
|
|
110
|
-
value: c,
|
|
111
|
-
variant: u
|
|
112
|
-
} = r, g = X(r, Lt), d = jt(r);
|
|
113
|
-
return /* @__PURE__ */ p(zt, m({
|
|
114
|
-
variant: "text",
|
|
115
|
-
ref: s,
|
|
116
|
-
className: Re(n, d.root)
|
|
117
|
-
}, g, {
|
|
118
|
-
children: /* @__PURE__ */ p(Oo, {
|
|
119
|
-
align: a,
|
|
120
|
-
className: i,
|
|
121
|
-
variant: u,
|
|
122
|
-
value: c,
|
|
123
|
-
selected: l
|
|
124
|
-
})
|
|
125
|
-
}));
|
|
126
|
-
}), Wt = ({
|
|
127
|
-
adapter: o,
|
|
128
|
-
value: t,
|
|
129
|
-
props: s
|
|
130
|
-
}) => {
|
|
131
|
-
const {
|
|
132
|
-
minTime: r,
|
|
133
|
-
maxTime: a,
|
|
134
|
-
minutesStep: n,
|
|
135
|
-
shouldDisableClock: l,
|
|
136
|
-
shouldDisableTime: i,
|
|
137
|
-
disableIgnoringDatePartForTimeValidation: c = !1,
|
|
138
|
-
disablePast: u,
|
|
139
|
-
disableFuture: g
|
|
140
|
-
} = s, d = o.utils.date(), h = o.utils.date(t), y = yo(c, o.utils);
|
|
141
|
-
if (t === null)
|
|
142
|
-
return null;
|
|
143
|
-
switch (!0) {
|
|
144
|
-
case !o.utils.isValid(t):
|
|
145
|
-
return "invalidDate";
|
|
146
|
-
case !!(r && y(r, t)):
|
|
147
|
-
return "minTime";
|
|
148
|
-
case !!(a && y(t, a)):
|
|
149
|
-
return "maxTime";
|
|
150
|
-
case !!(g && o.utils.isAfter(h, d)):
|
|
151
|
-
return "disableFuture";
|
|
152
|
-
case !!(u && o.utils.isBefore(h, d)):
|
|
153
|
-
return "disablePast";
|
|
154
|
-
case !!(i && i(t, "hours")):
|
|
155
|
-
return "shouldDisableTime-hours";
|
|
156
|
-
case !!(i && i(t, "minutes")):
|
|
157
|
-
return "shouldDisableTime-minutes";
|
|
158
|
-
case !!(i && i(t, "seconds")):
|
|
159
|
-
return "shouldDisableTime-seconds";
|
|
160
|
-
case !!(l && l(o.utils.getHours(t), "hours")):
|
|
161
|
-
return "shouldDisableClock-hours";
|
|
162
|
-
case !!(l && l(o.utils.getMinutes(t), "minutes")):
|
|
163
|
-
return "shouldDisableClock-minutes";
|
|
164
|
-
case !!(l && l(o.utils.getSeconds(t), "seconds")):
|
|
165
|
-
return "shouldDisableClock-seconds";
|
|
166
|
-
case !!(n && o.utils.getMinutes(t) % n !== 0):
|
|
167
|
-
return "minutesStep";
|
|
168
|
-
default:
|
|
169
|
-
return null;
|
|
170
|
-
}
|
|
171
|
-
}, eo = ({
|
|
172
|
-
props: o,
|
|
173
|
-
value: t,
|
|
174
|
-
adapter: s
|
|
175
|
-
}) => {
|
|
176
|
-
const r = lt({
|
|
177
|
-
adapter: s,
|
|
178
|
-
value: t,
|
|
179
|
-
props: o
|
|
180
|
-
});
|
|
181
|
-
return r !== null ? r : Wt({
|
|
182
|
-
adapter: s,
|
|
183
|
-
value: t,
|
|
184
|
-
props: o
|
|
185
|
-
});
|
|
186
|
-
}, At = ["value", "defaultValue", "format", "formatDensity", "shouldRespectLeadingZeros", "onChange", "readOnly", "onError", "shouldDisableDate", "shouldDisableMonth", "shouldDisableYear", "minDate", "maxDate", "disableFuture", "disablePast", "minTime", "maxTime", "minDateTime", "maxDateTime", "minutesStep", "disableIgnoringDatePartForTimeValidation", "shouldDisableClock", "shouldDisableTime", "selectedSections", "onSelectedSectionsChange", "ampm", "unstableFieldRef"], Ht = (o) => {
|
|
187
|
-
var t, s, r, a, n, l, i, c;
|
|
188
|
-
const u = $e(), g = go(), h = ((t = o.ampm) != null ? t : u.is12HourCycleInCurrentLocale()) ? u.formats.keyboardDateTime12h : u.formats.keyboardDateTime24h;
|
|
189
|
-
return m({}, o, {
|
|
190
|
-
disablePast: (s = o.disablePast) != null ? s : !1,
|
|
191
|
-
disableFuture: (r = o.disableFuture) != null ? r : !1,
|
|
192
|
-
format: (a = o.format) != null ? a : h,
|
|
193
|
-
disableIgnoringDatePartForTimeValidation: !!(o.minDateTime || o.maxDateTime),
|
|
194
|
-
minDate: Ye(u, (n = o.minDateTime) != null ? n : o.minDate, g.minDate),
|
|
195
|
-
maxDate: Ye(u, (l = o.maxDateTime) != null ? l : o.maxDate, g.maxDate),
|
|
196
|
-
minTime: (i = o.minDateTime) != null ? i : o.minTime,
|
|
197
|
-
maxTime: (c = o.maxDateTime) != null ? c : o.maxTime
|
|
198
|
-
});
|
|
199
|
-
}, Yt = ({
|
|
200
|
-
props: o,
|
|
201
|
-
inputRef: t
|
|
202
|
-
}) => {
|
|
203
|
-
const s = Ht(o), {
|
|
204
|
-
value: r,
|
|
205
|
-
defaultValue: a,
|
|
206
|
-
format: n,
|
|
207
|
-
formatDensity: l,
|
|
208
|
-
shouldRespectLeadingZeros: i,
|
|
209
|
-
onChange: c,
|
|
210
|
-
readOnly: u,
|
|
211
|
-
onError: g,
|
|
212
|
-
shouldDisableDate: d,
|
|
213
|
-
shouldDisableMonth: h,
|
|
214
|
-
shouldDisableYear: y,
|
|
215
|
-
minDate: w,
|
|
216
|
-
maxDate: b,
|
|
217
|
-
disableFuture: C,
|
|
218
|
-
disablePast: F,
|
|
219
|
-
minTime: S,
|
|
220
|
-
maxTime: B,
|
|
221
|
-
minutesStep: I,
|
|
222
|
-
disableIgnoringDatePartForTimeValidation: O,
|
|
223
|
-
shouldDisableClock: x,
|
|
224
|
-
shouldDisableTime: V,
|
|
225
|
-
selectedSections: _,
|
|
226
|
-
onSelectedSectionsChange: $,
|
|
227
|
-
ampm: A,
|
|
228
|
-
unstableFieldRef: L
|
|
229
|
-
} = s, j = X(s, At);
|
|
230
|
-
return it({
|
|
231
|
-
inputRef: t,
|
|
232
|
-
forwardedProps: j,
|
|
233
|
-
internalProps: {
|
|
234
|
-
value: r,
|
|
235
|
-
defaultValue: a,
|
|
236
|
-
format: n,
|
|
237
|
-
formatDensity: l,
|
|
238
|
-
shouldRespectLeadingZeros: i,
|
|
239
|
-
onChange: c,
|
|
240
|
-
readOnly: u,
|
|
241
|
-
onError: g,
|
|
242
|
-
shouldDisableDate: d,
|
|
243
|
-
shouldDisableMonth: h,
|
|
244
|
-
shouldDisableYear: y,
|
|
245
|
-
minDate: w,
|
|
246
|
-
maxDate: b,
|
|
247
|
-
disableFuture: C,
|
|
248
|
-
disablePast: F,
|
|
249
|
-
minTime: S,
|
|
250
|
-
maxTime: B,
|
|
251
|
-
minutesStep: I,
|
|
252
|
-
shouldDisableClock: x,
|
|
253
|
-
shouldDisableTime: V,
|
|
254
|
-
disableIgnoringDatePartForTimeValidation: O,
|
|
255
|
-
selectedSections: _,
|
|
256
|
-
onSelectedSectionsChange: $,
|
|
257
|
-
ampm: A,
|
|
258
|
-
unstableFieldRef: L
|
|
259
|
-
},
|
|
260
|
-
valueManager: Ze,
|
|
261
|
-
fieldValueManager: ct,
|
|
262
|
-
validator: eo,
|
|
263
|
-
valueType: "date-time"
|
|
264
|
-
});
|
|
265
|
-
}, Ut = ["components", "componentsProps", "slots", "slotProps", "InputProps", "inputProps"], qt = ["inputRef"], Kt = ["ref", "onPaste", "inputMode", "readOnly"], oo = /* @__PURE__ */ T.forwardRef(function(t, s) {
|
|
266
|
-
var r, a, n;
|
|
267
|
-
const l = Q({
|
|
268
|
-
props: t,
|
|
269
|
-
name: "MuiDateTimeField"
|
|
270
|
-
}), {
|
|
271
|
-
components: i,
|
|
272
|
-
componentsProps: c,
|
|
273
|
-
slots: u,
|
|
274
|
-
slotProps: g,
|
|
275
|
-
InputProps: d,
|
|
276
|
-
inputProps: h
|
|
277
|
-
} = l, y = X(l, Ut), w = l, b = (r = (a = u == null ? void 0 : u.textField) != null ? a : i == null ? void 0 : i.TextField) != null ? r : Ft, C = dt({
|
|
278
|
-
elementType: b,
|
|
279
|
-
externalSlotProps: (n = g == null ? void 0 : g.textField) != null ? n : c == null ? void 0 : c.textField,
|
|
280
|
-
externalForwardedProps: y,
|
|
281
|
-
ownerState: w
|
|
282
|
-
}), {
|
|
283
|
-
inputRef: F
|
|
284
|
-
} = C, S = X(C, qt);
|
|
285
|
-
S.inputProps = m({}, S.inputProps, h), S.InputProps = m({}, S.InputProps, d);
|
|
286
|
-
const B = Yt({
|
|
287
|
-
props: S,
|
|
288
|
-
inputRef: F
|
|
289
|
-
}), {
|
|
290
|
-
ref: I,
|
|
291
|
-
onPaste: O,
|
|
292
|
-
inputMode: x,
|
|
293
|
-
readOnly: V
|
|
294
|
-
} = B, _ = X(B, Kt);
|
|
295
|
-
return /* @__PURE__ */ p(b, m({
|
|
296
|
-
ref: s
|
|
297
|
-
}, _, {
|
|
298
|
-
InputProps: m({}, _.InputProps, {
|
|
299
|
-
readOnly: V
|
|
300
|
-
}),
|
|
301
|
-
inputProps: m({}, _.inputProps, {
|
|
302
|
-
inputMode: x,
|
|
303
|
-
onPaste: O,
|
|
304
|
-
ref: I
|
|
305
|
-
})
|
|
306
|
-
}));
|
|
307
|
-
});
|
|
308
|
-
process.env.NODE_ENV !== "production" && (oo.propTypes = {
|
|
309
|
-
// ----------------------------- Warning --------------------------------
|
|
310
|
-
// | These PropTypes are generated from the TypeScript type definitions |
|
|
311
|
-
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
|
312
|
-
// ----------------------------------------------------------------------
|
|
313
|
-
/**
|
|
314
|
-
* 12h/24h view for hour selection clock.
|
|
315
|
-
* @default `utils.is12HourCycleInCurrentLocale()`
|
|
316
|
-
*/
|
|
317
|
-
ampm: e.bool,
|
|
318
|
-
/**
|
|
319
|
-
* If `true`, the `input` element is focused during the first mount.
|
|
320
|
-
* @default false
|
|
321
|
-
*/
|
|
322
|
-
autoFocus: e.bool,
|
|
323
|
-
className: e.string,
|
|
324
|
-
/**
|
|
325
|
-
* The color of the component.
|
|
326
|
-
* It supports both default and custom theme colors, which can be added as shown in the
|
|
327
|
-
* [palette customization guide](https://mui.com/material-ui/customization/palette/#adding-new-colors).
|
|
328
|
-
* @default 'primary'
|
|
329
|
-
*/
|
|
330
|
-
color: e.oneOf(["error", "info", "primary", "secondary", "success", "warning"]),
|
|
331
|
-
/**
|
|
332
|
-
* Overridable components.
|
|
333
|
-
* @default {}
|
|
334
|
-
* @deprecated Please use `slots`.
|
|
335
|
-
*/
|
|
336
|
-
components: e.object,
|
|
337
|
-
/**
|
|
338
|
-
* The props used for each component slot.
|
|
339
|
-
* @default {}
|
|
340
|
-
* @deprecated Please use `slotProps`.
|
|
341
|
-
*/
|
|
342
|
-
componentsProps: e.object,
|
|
343
|
-
/**
|
|
344
|
-
* The default value. Use when the component is not controlled.
|
|
345
|
-
*/
|
|
346
|
-
defaultValue: e.any,
|
|
347
|
-
/**
|
|
348
|
-
* If `true`, the component is disabled.
|
|
349
|
-
* @default false
|
|
350
|
-
*/
|
|
351
|
-
disabled: e.bool,
|
|
352
|
-
/**
|
|
353
|
-
* If `true`, disable values after the current date for date components, time for time components and both for date time components.
|
|
354
|
-
* @default false
|
|
355
|
-
*/
|
|
356
|
-
disableFuture: e.bool,
|
|
357
|
-
/**
|
|
358
|
-
* Do not ignore date part when validating min/max time.
|
|
359
|
-
* @default false
|
|
360
|
-
*/
|
|
361
|
-
disableIgnoringDatePartForTimeValidation: e.bool,
|
|
362
|
-
/**
|
|
363
|
-
* If `true`, disable values before the current date for date components, time for time components and both for date time components.
|
|
364
|
-
* @default false
|
|
365
|
-
*/
|
|
366
|
-
disablePast: e.bool,
|
|
367
|
-
/**
|
|
368
|
-
* If `true`, the component is displayed in focused state.
|
|
369
|
-
*/
|
|
370
|
-
focused: e.bool,
|
|
371
|
-
/**
|
|
372
|
-
* Format of the date when rendered in the input(s).
|
|
373
|
-
*/
|
|
374
|
-
format: e.string,
|
|
375
|
-
/**
|
|
376
|
-
* Density of the format when rendered in the input.
|
|
377
|
-
* Setting `formatDensity` to `"spacious"` will add a space before and after each `/`, `-` and `.` character.
|
|
378
|
-
* @default "dense"
|
|
379
|
-
*/
|
|
380
|
-
formatDensity: e.oneOf(["dense", "spacious"]),
|
|
381
|
-
/**
|
|
382
|
-
* Props applied to the [`FormHelperText`](/material-ui/api/form-helper-text/) element.
|
|
383
|
-
*/
|
|
384
|
-
FormHelperTextProps: e.object,
|
|
385
|
-
/**
|
|
386
|
-
* If `true`, the input will take up the full width of its container.
|
|
387
|
-
* @default false
|
|
388
|
-
*/
|
|
389
|
-
fullWidth: e.bool,
|
|
390
|
-
/**
|
|
391
|
-
* The helper text content.
|
|
392
|
-
*/
|
|
393
|
-
helperText: e.node,
|
|
394
|
-
/**
|
|
395
|
-
* If `true`, the label is hidden.
|
|
396
|
-
* This is used to increase density for a `FilledInput`.
|
|
397
|
-
* Be sure to add `aria-label` to the `input` element.
|
|
398
|
-
* @default false
|
|
399
|
-
*/
|
|
400
|
-
hiddenLabel: e.bool,
|
|
401
|
-
/**
|
|
402
|
-
* The id of the `input` element.
|
|
403
|
-
* Use this prop to make `label` and `helperText` accessible for screen readers.
|
|
404
|
-
*/
|
|
405
|
-
id: e.string,
|
|
406
|
-
/**
|
|
407
|
-
* Props applied to the [`InputLabel`](/material-ui/api/input-label/) element.
|
|
408
|
-
* Pointer events like `onClick` are enabled if and only if `shrink` is `true`.
|
|
409
|
-
*/
|
|
410
|
-
InputLabelProps: e.object,
|
|
411
|
-
/**
|
|
412
|
-
* [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.
|
|
413
|
-
*/
|
|
414
|
-
inputProps: e.object,
|
|
415
|
-
/**
|
|
416
|
-
* Props applied to the Input element.
|
|
417
|
-
* It will be a [`FilledInput`](/material-ui/api/filled-input/),
|
|
418
|
-
* [`OutlinedInput`](/material-ui/api/outlined-input/) or [`Input`](/material-ui/api/input/)
|
|
419
|
-
* component depending on the `variant` prop value.
|
|
420
|
-
*/
|
|
421
|
-
InputProps: e.object,
|
|
422
|
-
/**
|
|
423
|
-
* Pass a ref to the `input` element.
|
|
424
|
-
*/
|
|
425
|
-
inputRef: e.oneOfType([e.func, e.shape({
|
|
426
|
-
current: e.any.isRequired
|
|
427
|
-
})]),
|
|
428
|
-
/**
|
|
429
|
-
* The label content.
|
|
430
|
-
*/
|
|
431
|
-
label: e.node,
|
|
432
|
-
/**
|
|
433
|
-
* If `dense` or `normal`, will adjust vertical spacing of this and contained components.
|
|
434
|
-
* @default 'none'
|
|
435
|
-
*/
|
|
436
|
-
margin: e.oneOf(["dense", "none", "normal"]),
|
|
437
|
-
/**
|
|
438
|
-
* Maximal selectable date.
|
|
439
|
-
*/
|
|
440
|
-
maxDate: e.any,
|
|
441
|
-
/**
|
|
442
|
-
* Maximal selectable moment of time with binding to date, to set max time in each day use `maxTime`.
|
|
443
|
-
*/
|
|
444
|
-
maxDateTime: e.any,
|
|
445
|
-
/**
|
|
446
|
-
* Maximal selectable time.
|
|
447
|
-
* The date part of the object will be ignored unless `props.disableIgnoringDatePartForTimeValidation === true`.
|
|
448
|
-
*/
|
|
449
|
-
maxTime: e.any,
|
|
450
|
-
/**
|
|
451
|
-
* Minimal selectable date.
|
|
452
|
-
*/
|
|
453
|
-
minDate: e.any,
|
|
454
|
-
/**
|
|
455
|
-
* Minimal selectable moment of time with binding to date, to set min time in each day use `minTime`.
|
|
456
|
-
*/
|
|
457
|
-
minDateTime: e.any,
|
|
458
|
-
/**
|
|
459
|
-
* Minimal selectable time.
|
|
460
|
-
* The date part of the object will be ignored unless `props.disableIgnoringDatePartForTimeValidation === true`.
|
|
461
|
-
*/
|
|
462
|
-
minTime: e.any,
|
|
463
|
-
/**
|
|
464
|
-
* Step over minutes.
|
|
465
|
-
* @default 1
|
|
466
|
-
*/
|
|
467
|
-
minutesStep: e.number,
|
|
468
|
-
/**
|
|
469
|
-
* Name attribute of the `input` element.
|
|
470
|
-
*/
|
|
471
|
-
name: e.string,
|
|
472
|
-
onBlur: e.func,
|
|
473
|
-
/**
|
|
474
|
-
* Callback fired when the value changes.
|
|
475
|
-
* @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value.
|
|
476
|
-
* @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value.
|
|
477
|
-
* @param {TValue} value The new value.
|
|
478
|
-
* @param {FieldChangeHandlerContext<TError>} context The context containing the validation result of the current value.
|
|
479
|
-
*/
|
|
480
|
-
onChange: e.func,
|
|
481
|
-
/**
|
|
482
|
-
* Callback fired when the error associated to the current value changes.
|
|
483
|
-
* @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value.
|
|
484
|
-
* @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value.
|
|
485
|
-
* @param {TError} error The new error.
|
|
486
|
-
* @param {TValue} value The value associated to the error.
|
|
487
|
-
*/
|
|
488
|
-
onError: e.func,
|
|
489
|
-
onFocus: e.func,
|
|
490
|
-
/**
|
|
491
|
-
* Callback fired when the selected sections change.
|
|
492
|
-
* @param {FieldSelectedSections} newValue The new selected sections.
|
|
493
|
-
*/
|
|
494
|
-
onSelectedSectionsChange: e.func,
|
|
495
|
-
/**
|
|
496
|
-
* It prevents the user from changing the value of the field
|
|
497
|
-
* (not from interacting with the field).
|
|
498
|
-
* @default false
|
|
499
|
-
*/
|
|
500
|
-
readOnly: e.bool,
|
|
501
|
-
/**
|
|
502
|
-
* If `true`, the label is displayed as required and the `input` element is required.
|
|
503
|
-
* @default false
|
|
504
|
-
*/
|
|
505
|
-
required: e.bool,
|
|
506
|
-
/**
|
|
507
|
-
* The currently selected sections.
|
|
508
|
-
* This prop accept four formats:
|
|
509
|
-
* 1. If a number is provided, the section at this index will be selected.
|
|
510
|
-
* 2. If an object with a `startIndex` and `endIndex` properties are provided, the sections between those two indexes will be selected.
|
|
511
|
-
* 3. If a string of type `FieldSectionType` is provided, the first section with that name will be selected.
|
|
512
|
-
* 4. If `null` is provided, no section will be selected
|
|
513
|
-
* If not provided, the selected sections will be handled internally.
|
|
514
|
-
*/
|
|
515
|
-
selectedSections: e.oneOfType([e.oneOf(["all", "day", "hours", "meridiem", "minutes", "month", "seconds", "weekDay", "year"]), e.number, e.shape({
|
|
516
|
-
endIndex: e.number.isRequired,
|
|
517
|
-
startIndex: e.number.isRequired
|
|
518
|
-
})]),
|
|
519
|
-
/**
|
|
520
|
-
* Disable specific clock time.
|
|
521
|
-
* @param {number} clockValue The value to check.
|
|
522
|
-
* @param {TimeView} view The clock type of the timeValue.
|
|
523
|
-
* @returns {boolean} If `true` the time will be disabled.
|
|
524
|
-
* @deprecated Consider using `shouldDisableTime`.
|
|
525
|
-
*/
|
|
526
|
-
shouldDisableClock: e.func,
|
|
527
|
-
/**
|
|
528
|
-
* Disable specific date.
|
|
529
|
-
* @template TDate
|
|
530
|
-
* @param {TDate} day The date to test.
|
|
531
|
-
* @returns {boolean} If `true` the date will be disabled.
|
|
532
|
-
*/
|
|
533
|
-
shouldDisableDate: e.func,
|
|
534
|
-
/**
|
|
535
|
-
* Disable specific month.
|
|
536
|
-
* @template TDate
|
|
537
|
-
* @param {TDate} month The month to test.
|
|
538
|
-
* @returns {boolean} If `true`, the month will be disabled.
|
|
539
|
-
*/
|
|
540
|
-
shouldDisableMonth: e.func,
|
|
541
|
-
/**
|
|
542
|
-
* Disable specific time.
|
|
543
|
-
* @template TDate
|
|
544
|
-
* @param {TDate} value The value to check.
|
|
545
|
-
* @param {TimeView} view The clock type of the timeValue.
|
|
546
|
-
* @returns {boolean} If `true` the time will be disabled.
|
|
547
|
-
*/
|
|
548
|
-
shouldDisableTime: e.func,
|
|
549
|
-
/**
|
|
550
|
-
* Disable specific year.
|
|
551
|
-
* @template TDate
|
|
552
|
-
* @param {TDate} year The year to test.
|
|
553
|
-
* @returns {boolean} If `true`, the year will be disabled.
|
|
554
|
-
*/
|
|
555
|
-
shouldDisableYear: e.func,
|
|
556
|
-
/**
|
|
557
|
-
* If `true`, the format will respect the leading zeroes (e.g: on dayjs, the format `M/D/YYYY` will render `8/16/2018`)
|
|
558
|
-
* If `false`, the format will always add leading zeroes (e.g: on dayjs, the format `M/D/YYYY` will render `08/16/2018`)
|
|
559
|
-
*
|
|
560
|
-
* Warning n°1: Luxon is not able to respect the leading zeroes when using macro tokens (e.g: "DD"), so `shouldRespectLeadingZeros={true}` might lead to inconsistencies when using `AdapterLuxon`.
|
|
561
|
-
*
|
|
562
|
-
* Warning n°2: When `shouldRespectLeadingZeros={true}`, the field will add an invisible character on the sections containing a single digit to make sure `onChange` is fired.
|
|
563
|
-
* If you need to get the clean value from the input, you can remove this character using `input.value.replace(/\u200e/g, '')`.
|
|
564
|
-
*
|
|
565
|
-
* Warning n°3: When used in strict mode, dayjs and moment require to respect the leading zeros.
|
|
566
|
-
* This mean that when using `shouldRespectLeadingZeros={false}`, if you retrieve the value directly from the input (not listening to `onChange`) and your format contains tokens without leading zeros, the value will not be parsed by your library.
|
|
567
|
-
*
|
|
568
|
-
* @default `false`
|
|
569
|
-
*/
|
|
570
|
-
shouldRespectLeadingZeros: e.bool,
|
|
571
|
-
/**
|
|
572
|
-
* The size of the component.
|
|
573
|
-
*/
|
|
574
|
-
size: e.oneOf(["medium", "small"]),
|
|
575
|
-
/**
|
|
576
|
-
* The props used for each component slot.
|
|
577
|
-
* @default {}
|
|
578
|
-
*/
|
|
579
|
-
slotProps: e.object,
|
|
580
|
-
/**
|
|
581
|
-
* Overridable component slots.
|
|
582
|
-
* @default {}
|
|
583
|
-
*/
|
|
584
|
-
slots: e.object,
|
|
585
|
-
style: e.object,
|
|
586
|
-
/**
|
|
587
|
-
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
588
|
-
*/
|
|
589
|
-
sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
|
|
590
|
-
/**
|
|
591
|
-
* The ref object used to imperatively interact with the field.
|
|
592
|
-
*/
|
|
593
|
-
unstableFieldRef: e.oneOfType([e.func, e.object]),
|
|
594
|
-
/**
|
|
595
|
-
* The selected value.
|
|
596
|
-
* Used when the component is controlled.
|
|
597
|
-
*/
|
|
598
|
-
value: e.any,
|
|
599
|
-
/**
|
|
600
|
-
* The variant to use.
|
|
601
|
-
* @default 'outlined'
|
|
602
|
-
*/
|
|
603
|
-
variant: e.oneOf(["filled", "outlined", "standard"])
|
|
604
|
-
});
|
|
605
|
-
function Xt(o) {
|
|
606
|
-
return ne("MuiTab", o);
|
|
607
|
-
}
|
|
608
|
-
const Ce = te("MuiTab", ["root", "labelIcon", "textColorInherit", "textColorPrimary", "textColorSecondary", "selected", "disabled", "fullWidth", "wrapped", "iconWrapper"]), Gt = ["className", "disabled", "disableFocusRipple", "fullWidth", "icon", "iconPosition", "indicator", "label", "onChange", "onClick", "onFocus", "selected", "selectionFollowsFocus", "textColor", "value", "wrapped"], Qt = (o) => {
|
|
609
|
-
const {
|
|
610
|
-
classes: t,
|
|
611
|
-
textColor: s,
|
|
612
|
-
fullWidth: r,
|
|
613
|
-
wrapped: a,
|
|
614
|
-
icon: n,
|
|
615
|
-
label: l,
|
|
616
|
-
selected: i,
|
|
617
|
-
disabled: c
|
|
618
|
-
} = o, u = {
|
|
619
|
-
root: ["root", n && l && "labelIcon", `textColor${So(s)}`, r && "fullWidth", a && "wrapped", i && "selected", c && "disabled"],
|
|
620
|
-
iconWrapper: ["iconWrapper"]
|
|
621
|
-
};
|
|
622
|
-
return oe(u, Xt, t);
|
|
623
|
-
}, Zt = M(ko, {
|
|
624
|
-
name: "MuiTab",
|
|
625
|
-
slot: "Root",
|
|
626
|
-
overridesResolver: (o, t) => {
|
|
627
|
-
const {
|
|
628
|
-
ownerState: s
|
|
629
|
-
} = o;
|
|
630
|
-
return [t.root, s.label && s.icon && t.labelIcon, t[`textColor${So(s.textColor)}`], s.fullWidth && t.fullWidth, s.wrapped && t.wrapped];
|
|
631
|
-
}
|
|
632
|
-
})(({
|
|
633
|
-
theme: o,
|
|
634
|
-
ownerState: t
|
|
635
|
-
}) => m({}, o.typography.button, {
|
|
636
|
-
maxWidth: 360,
|
|
637
|
-
minWidth: 90,
|
|
638
|
-
position: "relative",
|
|
639
|
-
minHeight: 48,
|
|
640
|
-
flexShrink: 0,
|
|
641
|
-
padding: "12px 16px",
|
|
642
|
-
overflow: "hidden",
|
|
643
|
-
whiteSpace: "normal",
|
|
644
|
-
textAlign: "center"
|
|
645
|
-
}, t.label && {
|
|
646
|
-
flexDirection: t.iconPosition === "top" || t.iconPosition === "bottom" ? "column" : "row"
|
|
647
|
-
}, {
|
|
648
|
-
lineHeight: 1.25
|
|
649
|
-
}, t.icon && t.label && {
|
|
650
|
-
minHeight: 72,
|
|
651
|
-
paddingTop: 9,
|
|
652
|
-
paddingBottom: 9,
|
|
653
|
-
[`& > .${Ce.iconWrapper}`]: m({}, t.iconPosition === "top" && {
|
|
654
|
-
marginBottom: 6
|
|
655
|
-
}, t.iconPosition === "bottom" && {
|
|
656
|
-
marginTop: 6
|
|
657
|
-
}, t.iconPosition === "start" && {
|
|
658
|
-
marginRight: o.spacing(1)
|
|
659
|
-
}, t.iconPosition === "end" && {
|
|
660
|
-
marginLeft: o.spacing(1)
|
|
661
|
-
})
|
|
662
|
-
}, t.textColor === "inherit" && {
|
|
663
|
-
color: "inherit",
|
|
664
|
-
opacity: 0.6,
|
|
665
|
-
// same opacity as theme.palette.text.secondary
|
|
666
|
-
[`&.${Ce.selected}`]: {
|
|
667
|
-
opacity: 1
|
|
668
|
-
},
|
|
669
|
-
[`&.${Ce.disabled}`]: {
|
|
670
|
-
opacity: (o.vars || o).palette.action.disabledOpacity
|
|
671
|
-
}
|
|
672
|
-
}, t.textColor === "primary" && {
|
|
673
|
-
color: (o.vars || o).palette.text.secondary,
|
|
674
|
-
[`&.${Ce.selected}`]: {
|
|
675
|
-
color: (o.vars || o).palette.primary.main
|
|
676
|
-
},
|
|
677
|
-
[`&.${Ce.disabled}`]: {
|
|
678
|
-
color: (o.vars || o).palette.text.disabled
|
|
679
|
-
}
|
|
680
|
-
}, t.textColor === "secondary" && {
|
|
681
|
-
color: (o.vars || o).palette.text.secondary,
|
|
682
|
-
[`&.${Ce.selected}`]: {
|
|
683
|
-
color: (o.vars || o).palette.secondary.main
|
|
684
|
-
},
|
|
685
|
-
[`&.${Ce.disabled}`]: {
|
|
686
|
-
color: (o.vars || o).palette.text.disabled
|
|
687
|
-
}
|
|
688
|
-
}, t.fullWidth && {
|
|
689
|
-
flexShrink: 1,
|
|
690
|
-
flexGrow: 1,
|
|
691
|
-
flexBasis: 0,
|
|
692
|
-
maxWidth: "none"
|
|
693
|
-
}, t.wrapped && {
|
|
694
|
-
fontSize: o.typography.pxToRem(12)
|
|
695
|
-
})), Qe = /* @__PURE__ */ T.forwardRef(function(t, s) {
|
|
696
|
-
const r = Q({
|
|
697
|
-
props: t,
|
|
698
|
-
name: "MuiTab"
|
|
699
|
-
}), {
|
|
700
|
-
className: a,
|
|
701
|
-
disabled: n = !1,
|
|
702
|
-
disableFocusRipple: l = !1,
|
|
703
|
-
// eslint-disable-next-line react/prop-types
|
|
704
|
-
fullWidth: i,
|
|
705
|
-
icon: c,
|
|
706
|
-
iconPosition: u = "top",
|
|
707
|
-
// eslint-disable-next-line react/prop-types
|
|
708
|
-
indicator: g,
|
|
709
|
-
label: d,
|
|
710
|
-
onChange: h,
|
|
711
|
-
onClick: y,
|
|
712
|
-
onFocus: w,
|
|
713
|
-
// eslint-disable-next-line react/prop-types
|
|
714
|
-
selected: b,
|
|
715
|
-
// eslint-disable-next-line react/prop-types
|
|
716
|
-
selectionFollowsFocus: C,
|
|
717
|
-
// eslint-disable-next-line react/prop-types
|
|
718
|
-
textColor: F = "inherit",
|
|
719
|
-
value: S,
|
|
720
|
-
wrapped: B = !1
|
|
721
|
-
} = r, I = X(r, Gt), O = m({}, r, {
|
|
722
|
-
disabled: n,
|
|
723
|
-
disableFocusRipple: l,
|
|
724
|
-
selected: b,
|
|
725
|
-
icon: !!c,
|
|
726
|
-
iconPosition: u,
|
|
727
|
-
label: !!d,
|
|
728
|
-
fullWidth: i,
|
|
729
|
-
textColor: F,
|
|
730
|
-
wrapped: B
|
|
731
|
-
}), x = Qt(O), V = c && d && /* @__PURE__ */ T.isValidElement(c) ? /* @__PURE__ */ T.cloneElement(c, {
|
|
732
|
-
className: fe(x.iconWrapper, c.props.className)
|
|
733
|
-
}) : c, _ = (A) => {
|
|
734
|
-
!b && h && h(A, S), y && y(A);
|
|
735
|
-
}, $ = (A) => {
|
|
736
|
-
C && !b && h && h(A, S), w && w(A);
|
|
737
|
-
};
|
|
738
|
-
return /* @__PURE__ */ R(Zt, m({
|
|
739
|
-
focusRipple: !l,
|
|
740
|
-
className: fe(x.root, a),
|
|
741
|
-
ref: s,
|
|
742
|
-
role: "tab",
|
|
743
|
-
"aria-selected": b,
|
|
744
|
-
disabled: n,
|
|
745
|
-
onClick: _,
|
|
746
|
-
onFocus: $,
|
|
747
|
-
ownerState: O,
|
|
748
|
-
tabIndex: b ? 0 : -1
|
|
749
|
-
}, I, {
|
|
750
|
-
children: [u === "top" || u === "start" ? /* @__PURE__ */ R(T.Fragment, {
|
|
751
|
-
children: [V, d]
|
|
752
|
-
}) : /* @__PURE__ */ R(T.Fragment, {
|
|
753
|
-
children: [d, V]
|
|
754
|
-
}), g]
|
|
755
|
-
}));
|
|
756
|
-
});
|
|
757
|
-
process.env.NODE_ENV !== "production" && (Qe.propTypes = {
|
|
758
|
-
// ----------------------------- Warning --------------------------------
|
|
759
|
-
// | These PropTypes are generated from the TypeScript type definitions |
|
|
760
|
-
// | To update them edit the d.ts file and run "yarn proptypes" |
|
|
761
|
-
// ----------------------------------------------------------------------
|
|
762
|
-
/**
|
|
763
|
-
* This prop isn't supported.
|
|
764
|
-
* Use the `component` prop if you need to change the children structure.
|
|
765
|
-
*/
|
|
766
|
-
children: Nt,
|
|
767
|
-
/**
|
|
768
|
-
* Override or extend the styles applied to the component.
|
|
769
|
-
*/
|
|
770
|
-
classes: e.object,
|
|
771
|
-
/**
|
|
772
|
-
* @ignore
|
|
773
|
-
*/
|
|
774
|
-
className: e.string,
|
|
775
|
-
/**
|
|
776
|
-
* If `true`, the component is disabled.
|
|
777
|
-
* @default false
|
|
778
|
-
*/
|
|
779
|
-
disabled: e.bool,
|
|
780
|
-
/**
|
|
781
|
-
* If `true`, the keyboard focus ripple is disabled.
|
|
782
|
-
* @default false
|
|
783
|
-
*/
|
|
784
|
-
disableFocusRipple: e.bool,
|
|
785
|
-
/**
|
|
786
|
-
* If `true`, the ripple effect is disabled.
|
|
787
|
-
*
|
|
788
|
-
* ⚠️ Without a ripple there is no styling for :focus-visible by default. Be sure
|
|
789
|
-
* to highlight the element by applying separate styles with the `.Mui-focusVisible` class.
|
|
790
|
-
* @default false
|
|
791
|
-
*/
|
|
792
|
-
disableRipple: e.bool,
|
|
793
|
-
/**
|
|
794
|
-
* The icon to display.
|
|
795
|
-
*/
|
|
796
|
-
icon: e.oneOfType([e.element, e.string]),
|
|
797
|
-
/**
|
|
798
|
-
* The position of the icon relative to the label.
|
|
799
|
-
* @default 'top'
|
|
800
|
-
*/
|
|
801
|
-
iconPosition: e.oneOf(["bottom", "end", "start", "top"]),
|
|
802
|
-
/**
|
|
803
|
-
* The label element.
|
|
804
|
-
*/
|
|
805
|
-
label: e.node,
|
|
806
|
-
/**
|
|
807
|
-
* @ignore
|
|
808
|
-
*/
|
|
809
|
-
onChange: e.func,
|
|
810
|
-
/**
|
|
811
|
-
* @ignore
|
|
812
|
-
*/
|
|
813
|
-
onClick: e.func,
|
|
814
|
-
/**
|
|
815
|
-
* @ignore
|
|
816
|
-
*/
|
|
817
|
-
onFocus: e.func,
|
|
818
|
-
/**
|
|
819
|
-
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
820
|
-
*/
|
|
821
|
-
sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
|
|
822
|
-
/**
|
|
823
|
-
* You can provide your own value. Otherwise, we fallback to the child position index.
|
|
824
|
-
*/
|
|
825
|
-
value: e.any,
|
|
826
|
-
/**
|
|
827
|
-
* Tab labels appear in a single row.
|
|
828
|
-
* They can use a second line if needed.
|
|
829
|
-
* @default false
|
|
830
|
-
*/
|
|
831
|
-
wrapped: e.bool
|
|
832
|
-
});
|
|
833
|
-
function Jt(o) {
|
|
834
|
-
return (1 + Math.sin(Math.PI * o - Math.PI / 2)) / 2;
|
|
835
|
-
}
|
|
836
|
-
function en(o, t, s, r = {}, a = () => {
|
|
837
|
-
}) {
|
|
838
|
-
const {
|
|
839
|
-
ease: n = Jt,
|
|
840
|
-
duration: l = 300
|
|
841
|
-
// standard
|
|
842
|
-
} = r;
|
|
843
|
-
let i = null;
|
|
844
|
-
const c = t[o];
|
|
845
|
-
let u = !1;
|
|
846
|
-
const g = () => {
|
|
847
|
-
u = !0;
|
|
848
|
-
}, d = (h) => {
|
|
849
|
-
if (u) {
|
|
850
|
-
a(new Error("Animation cancelled"));
|
|
851
|
-
return;
|
|
852
|
-
}
|
|
853
|
-
i === null && (i = h);
|
|
854
|
-
const y = Math.min(1, (h - i) / l);
|
|
855
|
-
if (t[o] = n(y) * (s - c) + c, y >= 1) {
|
|
856
|
-
requestAnimationFrame(() => {
|
|
857
|
-
a(null);
|
|
858
|
-
});
|
|
859
|
-
return;
|
|
860
|
-
}
|
|
861
|
-
requestAnimationFrame(d);
|
|
862
|
-
};
|
|
863
|
-
return c === s ? (a(new Error("Element already at target position")), g) : (requestAnimationFrame(d), g);
|
|
864
|
-
}
|
|
865
|
-
const on = ["onChange"], tn = {
|
|
866
|
-
width: 99,
|
|
867
|
-
height: 99,
|
|
868
|
-
position: "absolute",
|
|
869
|
-
top: -9999,
|
|
870
|
-
overflow: "scroll"
|
|
871
|
-
};
|
|
872
|
-
function No(o) {
|
|
873
|
-
const {
|
|
874
|
-
onChange: t
|
|
875
|
-
} = o, s = X(o, on), r = T.useRef(), a = T.useRef(null), n = () => {
|
|
876
|
-
r.current = a.current.offsetHeight - a.current.clientHeight;
|
|
877
|
-
};
|
|
878
|
-
return T.useEffect(() => {
|
|
879
|
-
const l = Xe(() => {
|
|
880
|
-
const c = r.current;
|
|
881
|
-
n(), c !== r.current && t(r.current);
|
|
882
|
-
}), i = wo(a.current);
|
|
883
|
-
return i.addEventListener("resize", l), () => {
|
|
884
|
-
l.clear(), i.removeEventListener("resize", l);
|
|
885
|
-
};
|
|
886
|
-
}, [t]), T.useEffect(() => {
|
|
887
|
-
n(), t(r.current);
|
|
888
|
-
}, [t]), /* @__PURE__ */ p("div", m({
|
|
889
|
-
style: tn,
|
|
890
|
-
ref: a
|
|
891
|
-
}, s));
|
|
892
|
-
}
|
|
893
|
-
process.env.NODE_ENV !== "production" && (No.propTypes = {
|
|
894
|
-
onChange: e.func.isRequired
|
|
895
|
-
});
|
|
896
|
-
const nn = Po(/* @__PURE__ */ p("path", {
|
|
897
|
-
d: "M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"
|
|
898
|
-
}), "KeyboardArrowLeft"), sn = Po(/* @__PURE__ */ p("path", {
|
|
899
|
-
d: "M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"
|
|
900
|
-
}), "KeyboardArrowRight");
|
|
901
|
-
function an(o) {
|
|
902
|
-
return ne("MuiTabScrollButton", o);
|
|
903
|
-
}
|
|
904
|
-
const rn = te("MuiTabScrollButton", ["root", "vertical", "horizontal", "disabled"]);
|
|
905
|
-
var co, uo;
|
|
906
|
-
const ln = ["className", "direction", "orientation", "disabled"], cn = (o) => {
|
|
907
|
-
const {
|
|
908
|
-
classes: t,
|
|
909
|
-
orientation: s,
|
|
910
|
-
disabled: r
|
|
911
|
-
} = o;
|
|
912
|
-
return oe({
|
|
913
|
-
root: ["root", s, r && "disabled"]
|
|
914
|
-
}, an, t);
|
|
915
|
-
}, dn = M(ko, {
|
|
916
|
-
name: "MuiTabScrollButton",
|
|
917
|
-
slot: "Root",
|
|
918
|
-
overridesResolver: (o, t) => {
|
|
919
|
-
const {
|
|
920
|
-
ownerState: s
|
|
921
|
-
} = o;
|
|
922
|
-
return [t.root, s.orientation && t[s.orientation]];
|
|
923
|
-
}
|
|
924
|
-
})(({
|
|
925
|
-
ownerState: o
|
|
926
|
-
}) => m({
|
|
927
|
-
width: 40,
|
|
928
|
-
flexShrink: 0,
|
|
929
|
-
opacity: 0.8,
|
|
930
|
-
[`&.${rn.disabled}`]: {
|
|
931
|
-
opacity: 0
|
|
932
|
-
}
|
|
933
|
-
}, o.orientation === "vertical" && {
|
|
934
|
-
width: "100%",
|
|
935
|
-
height: 40,
|
|
936
|
-
"& svg": {
|
|
937
|
-
transform: `rotate(${o.isRtl ? -90 : 90}deg)`
|
|
938
|
-
}
|
|
939
|
-
})), Io = /* @__PURE__ */ T.forwardRef(function(t, s) {
|
|
940
|
-
const r = Q({
|
|
941
|
-
props: t,
|
|
942
|
-
name: "MuiTabScrollButton"
|
|
943
|
-
}), {
|
|
944
|
-
className: a,
|
|
945
|
-
direction: n
|
|
946
|
-
} = r, l = X(r, ln), c = Je().direction === "rtl", u = m({
|
|
947
|
-
isRtl: c
|
|
948
|
-
}, r), g = cn(u);
|
|
949
|
-
return /* @__PURE__ */ p(dn, m({
|
|
950
|
-
component: "div",
|
|
951
|
-
className: fe(g.root, a),
|
|
952
|
-
ref: s,
|
|
953
|
-
role: null,
|
|
954
|
-
ownerState: u,
|
|
955
|
-
tabIndex: null
|
|
956
|
-
}, l, {
|
|
957
|
-
children: n === "left" ? co || (co = /* @__PURE__ */ p(nn, {
|
|
958
|
-
fontSize: "small"
|
|
959
|
-
})) : uo || (uo = /* @__PURE__ */ p(sn, {
|
|
960
|
-
fontSize: "small"
|
|
961
|
-
}))
|
|
962
|
-
}));
|
|
963
|
-
});
|
|
964
|
-
process.env.NODE_ENV !== "production" && (Io.propTypes = {
|
|
965
|
-
// ----------------------------- Warning --------------------------------
|
|
966
|
-
// | These PropTypes are generated from the TypeScript type definitions |
|
|
967
|
-
// | To update them edit the d.ts file and run "yarn proptypes" |
|
|
968
|
-
// ----------------------------------------------------------------------
|
|
969
|
-
/**
|
|
970
|
-
* The content of the component.
|
|
971
|
-
*/
|
|
972
|
-
children: e.node,
|
|
973
|
-
/**
|
|
974
|
-
* Override or extend the styles applied to the component.
|
|
975
|
-
*/
|
|
976
|
-
classes: e.object,
|
|
977
|
-
/**
|
|
978
|
-
* @ignore
|
|
979
|
-
*/
|
|
980
|
-
className: e.string,
|
|
981
|
-
/**
|
|
982
|
-
* The direction the button should indicate.
|
|
983
|
-
*/
|
|
984
|
-
direction: e.oneOf(["left", "right"]).isRequired,
|
|
985
|
-
/**
|
|
986
|
-
* If `true`, the component is disabled.
|
|
987
|
-
* @default false
|
|
988
|
-
*/
|
|
989
|
-
disabled: e.bool,
|
|
990
|
-
/**
|
|
991
|
-
* The component orientation (layout flow direction).
|
|
992
|
-
*/
|
|
993
|
-
orientation: e.oneOf(["horizontal", "vertical"]).isRequired,
|
|
994
|
-
/**
|
|
995
|
-
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
996
|
-
*/
|
|
997
|
-
sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object])
|
|
998
|
-
});
|
|
999
|
-
function un(o) {
|
|
1000
|
-
return ne("MuiTabs", o);
|
|
1001
|
-
}
|
|
1002
|
-
const He = te("MuiTabs", ["root", "vertical", "flexContainer", "flexContainerVertical", "centered", "scroller", "fixed", "scrollableX", "scrollableY", "hideScrollbar", "scrollButtons", "scrollButtonsHideMobile", "indicator"]), mn = ["aria-label", "aria-labelledby", "action", "centered", "children", "className", "component", "allowScrollButtonsMobile", "indicatorColor", "onChange", "orientation", "ScrollButtonComponent", "scrollButtons", "selectionFollowsFocus", "TabIndicatorProps", "TabScrollButtonProps", "textColor", "value", "variant", "visibleScrollbar"], mo = (o, t) => o === t ? o.firstChild : t && t.nextElementSibling ? t.nextElementSibling : o.firstChild, po = (o, t) => o === t ? o.lastChild : t && t.previousElementSibling ? t.previousElementSibling : o.lastChild, ze = (o, t, s) => {
|
|
1003
|
-
let r = !1, a = s(o, t);
|
|
1004
|
-
for (; a; ) {
|
|
1005
|
-
if (a === o.firstChild) {
|
|
1006
|
-
if (r)
|
|
1007
|
-
return;
|
|
1008
|
-
r = !0;
|
|
1009
|
-
}
|
|
1010
|
-
const n = a.disabled || a.getAttribute("aria-disabled") === "true";
|
|
1011
|
-
if (!a.hasAttribute("tabindex") || n)
|
|
1012
|
-
a = s(o, a);
|
|
1013
|
-
else {
|
|
1014
|
-
a.focus();
|
|
1015
|
-
return;
|
|
1016
|
-
}
|
|
1017
|
-
}
|
|
1018
|
-
}, pn = (o) => {
|
|
1019
|
-
const {
|
|
1020
|
-
vertical: t,
|
|
1021
|
-
fixed: s,
|
|
1022
|
-
hideScrollbar: r,
|
|
1023
|
-
scrollableX: a,
|
|
1024
|
-
scrollableY: n,
|
|
1025
|
-
centered: l,
|
|
1026
|
-
scrollButtonsHideMobile: i,
|
|
1027
|
-
classes: c
|
|
1028
|
-
} = o;
|
|
1029
|
-
return oe({
|
|
1030
|
-
root: ["root", t && "vertical"],
|
|
1031
|
-
scroller: ["scroller", s && "fixed", r && "hideScrollbar", a && "scrollableX", n && "scrollableY"],
|
|
1032
|
-
flexContainer: ["flexContainer", t && "flexContainerVertical", l && "centered"],
|
|
1033
|
-
indicator: ["indicator"],
|
|
1034
|
-
scrollButtons: ["scrollButtons", i && "scrollButtonsHideMobile"],
|
|
1035
|
-
scrollableX: [a && "scrollableX"],
|
|
1036
|
-
hideScrollbar: [r && "hideScrollbar"]
|
|
1037
|
-
}, un, c);
|
|
1038
|
-
}, bn = M("div", {
|
|
1039
|
-
name: "MuiTabs",
|
|
1040
|
-
slot: "Root",
|
|
1041
|
-
overridesResolver: (o, t) => {
|
|
1042
|
-
const {
|
|
1043
|
-
ownerState: s
|
|
1044
|
-
} = o;
|
|
1045
|
-
return [{
|
|
1046
|
-
[`& .${He.scrollButtons}`]: t.scrollButtons
|
|
1047
|
-
}, {
|
|
1048
|
-
[`& .${He.scrollButtons}`]: s.scrollButtonsHideMobile && t.scrollButtonsHideMobile
|
|
1049
|
-
}, t.root, s.vertical && t.vertical];
|
|
1050
|
-
}
|
|
1051
|
-
})(({
|
|
1052
|
-
ownerState: o,
|
|
1053
|
-
theme: t
|
|
1054
|
-
}) => m({
|
|
1055
|
-
overflow: "hidden",
|
|
1056
|
-
minHeight: 48,
|
|
1057
|
-
// Add iOS momentum scrolling for iOS < 13.0
|
|
1058
|
-
WebkitOverflowScrolling: "touch",
|
|
1059
|
-
display: "flex"
|
|
1060
|
-
}, o.vertical && {
|
|
1061
|
-
flexDirection: "column"
|
|
1062
|
-
}, o.scrollButtonsHideMobile && {
|
|
1063
|
-
[`& .${He.scrollButtons}`]: {
|
|
1064
|
-
[t.breakpoints.down("sm")]: {
|
|
1065
|
-
display: "none"
|
|
1066
|
-
}
|
|
1067
|
-
}
|
|
1068
|
-
})), fn = M("div", {
|
|
1069
|
-
name: "MuiTabs",
|
|
1070
|
-
slot: "Scroller",
|
|
1071
|
-
overridesResolver: (o, t) => {
|
|
1072
|
-
const {
|
|
1073
|
-
ownerState: s
|
|
1074
|
-
} = o;
|
|
1075
|
-
return [t.scroller, s.fixed && t.fixed, s.hideScrollbar && t.hideScrollbar, s.scrollableX && t.scrollableX, s.scrollableY && t.scrollableY];
|
|
1076
|
-
}
|
|
1077
|
-
})(({
|
|
1078
|
-
ownerState: o
|
|
1079
|
-
}) => m({
|
|
1080
|
-
position: "relative",
|
|
1081
|
-
display: "inline-block",
|
|
1082
|
-
flex: "1 1 auto",
|
|
1083
|
-
whiteSpace: "nowrap"
|
|
1084
|
-
}, o.fixed && {
|
|
1085
|
-
overflowX: "hidden",
|
|
1086
|
-
width: "100%"
|
|
1087
|
-
}, o.hideScrollbar && {
|
|
1088
|
-
// Hide dimensionless scrollbar on macOS
|
|
1089
|
-
scrollbarWidth: "none",
|
|
1090
|
-
// Firefox
|
|
1091
|
-
"&::-webkit-scrollbar": {
|
|
1092
|
-
display: "none"
|
|
1093
|
-
// Safari + Chrome
|
|
1094
|
-
}
|
|
1095
|
-
}, o.scrollableX && {
|
|
1096
|
-
overflowX: "auto",
|
|
1097
|
-
overflowY: "hidden"
|
|
1098
|
-
}, o.scrollableY && {
|
|
1099
|
-
overflowY: "auto",
|
|
1100
|
-
overflowX: "hidden"
|
|
1101
|
-
})), hn = M("div", {
|
|
1102
|
-
name: "MuiTabs",
|
|
1103
|
-
slot: "FlexContainer",
|
|
1104
|
-
overridesResolver: (o, t) => {
|
|
1105
|
-
const {
|
|
1106
|
-
ownerState: s
|
|
1107
|
-
} = o;
|
|
1108
|
-
return [t.flexContainer, s.vertical && t.flexContainerVertical, s.centered && t.centered];
|
|
1109
|
-
}
|
|
1110
|
-
})(({
|
|
1111
|
-
ownerState: o
|
|
1112
|
-
}) => m({
|
|
1113
|
-
display: "flex"
|
|
1114
|
-
}, o.vertical && {
|
|
1115
|
-
flexDirection: "column"
|
|
1116
|
-
}, o.centered && {
|
|
1117
|
-
justifyContent: "center"
|
|
1118
|
-
})), Tn = M("span", {
|
|
1119
|
-
name: "MuiTabs",
|
|
1120
|
-
slot: "Indicator",
|
|
1121
|
-
overridesResolver: (o, t) => t.indicator
|
|
1122
|
-
})(({
|
|
1123
|
-
ownerState: o,
|
|
1124
|
-
theme: t
|
|
1125
|
-
}) => m({
|
|
1126
|
-
position: "absolute",
|
|
1127
|
-
height: 2,
|
|
1128
|
-
bottom: 0,
|
|
1129
|
-
width: "100%",
|
|
1130
|
-
transition: t.transitions.create()
|
|
1131
|
-
}, o.indicatorColor === "primary" && {
|
|
1132
|
-
backgroundColor: (t.vars || t).palette.primary.main
|
|
1133
|
-
}, o.indicatorColor === "secondary" && {
|
|
1134
|
-
backgroundColor: (t.vars || t).palette.secondary.main
|
|
1135
|
-
}, o.vertical && {
|
|
1136
|
-
height: "100%",
|
|
1137
|
-
width: 2,
|
|
1138
|
-
right: 0
|
|
1139
|
-
})), yn = M(No, {
|
|
1140
|
-
name: "MuiTabs",
|
|
1141
|
-
slot: "ScrollbarSize"
|
|
1142
|
-
})({
|
|
1143
|
-
overflowX: "auto",
|
|
1144
|
-
overflowY: "hidden",
|
|
1145
|
-
// Hide dimensionless scrollbar on macOS
|
|
1146
|
-
scrollbarWidth: "none",
|
|
1147
|
-
// Firefox
|
|
1148
|
-
"&::-webkit-scrollbar": {
|
|
1149
|
-
display: "none"
|
|
1150
|
-
// Safari + Chrome
|
|
1151
|
-
}
|
|
1152
|
-
}), bo = {};
|
|
1153
|
-
let fo = !1;
|
|
1154
|
-
const Fo = /* @__PURE__ */ T.forwardRef(function(t, s) {
|
|
1155
|
-
const r = Q({
|
|
1156
|
-
props: t,
|
|
1157
|
-
name: "MuiTabs"
|
|
1158
|
-
}), a = Je(), n = a.direction === "rtl", {
|
|
1159
|
-
"aria-label": l,
|
|
1160
|
-
"aria-labelledby": i,
|
|
1161
|
-
action: c,
|
|
1162
|
-
centered: u = !1,
|
|
1163
|
-
children: g,
|
|
1164
|
-
className: d,
|
|
1165
|
-
component: h = "div",
|
|
1166
|
-
allowScrollButtonsMobile: y = !1,
|
|
1167
|
-
indicatorColor: w = "primary",
|
|
1168
|
-
onChange: b,
|
|
1169
|
-
orientation: C = "horizontal",
|
|
1170
|
-
ScrollButtonComponent: F = Io,
|
|
1171
|
-
scrollButtons: S = "auto",
|
|
1172
|
-
selectionFollowsFocus: B,
|
|
1173
|
-
TabIndicatorProps: I = {},
|
|
1174
|
-
TabScrollButtonProps: O = {},
|
|
1175
|
-
textColor: x = "primary",
|
|
1176
|
-
value: V,
|
|
1177
|
-
variant: _ = "standard",
|
|
1178
|
-
visibleScrollbar: $ = !1
|
|
1179
|
-
} = r, A = X(r, mn), L = _ === "scrollable", j = C === "vertical", se = j ? "scrollTop" : "scrollLeft", ae = j ? "top" : "left", ie = j ? "bottom" : "right", ce = j ? "clientHeight" : "clientWidth", G = j ? "height" : "width", re = m({}, r, {
|
|
1180
|
-
component: h,
|
|
1181
|
-
allowScrollButtonsMobile: y,
|
|
1182
|
-
indicatorColor: w,
|
|
1183
|
-
orientation: C,
|
|
1184
|
-
vertical: j,
|
|
1185
|
-
scrollButtons: S,
|
|
1186
|
-
textColor: x,
|
|
1187
|
-
variant: _,
|
|
1188
|
-
visibleScrollbar: $,
|
|
1189
|
-
fixed: !L,
|
|
1190
|
-
hideScrollbar: L && !$,
|
|
1191
|
-
scrollableX: L && !j,
|
|
1192
|
-
scrollableY: L && j,
|
|
1193
|
-
centered: u && !L,
|
|
1194
|
-
scrollButtonsHideMobile: !y
|
|
1195
|
-
}), k = pn(re);
|
|
1196
|
-
process.env.NODE_ENV !== "production" && u && L && console.error('MUI: You can not use the `centered={true}` and `variant="scrollable"` properties at the same time on a `Tabs` component.');
|
|
1197
|
-
const [de, ue] = T.useState(!1), [H, xe] = T.useState(bo), [J, Ne] = T.useState({
|
|
1198
|
-
start: !1,
|
|
1199
|
-
end: !1
|
|
1200
|
-
}), [Ie, Ee] = T.useState({
|
|
1201
|
-
overflow: "hidden",
|
|
1202
|
-
scrollbarWidth: 0
|
|
1203
|
-
}), Te = /* @__PURE__ */ new Map(), q = T.useRef(null), E = T.useRef(null), me = () => {
|
|
1204
|
-
const f = q.current;
|
|
1205
|
-
let v;
|
|
1206
|
-
if (f) {
|
|
1207
|
-
const P = f.getBoundingClientRect();
|
|
1208
|
-
v = {
|
|
1209
|
-
clientWidth: f.clientWidth,
|
|
1210
|
-
scrollLeft: f.scrollLeft,
|
|
1211
|
-
scrollTop: f.scrollTop,
|
|
1212
|
-
scrollLeftNormalized: lo(f, a.direction),
|
|
1213
|
-
scrollWidth: f.scrollWidth,
|
|
1214
|
-
top: P.top,
|
|
1215
|
-
bottom: P.bottom,
|
|
1216
|
-
left: P.left,
|
|
1217
|
-
right: P.right
|
|
1218
|
-
};
|
|
1219
|
-
}
|
|
1220
|
-
let D;
|
|
1221
|
-
if (f && V !== !1) {
|
|
1222
|
-
const P = E.current.children;
|
|
1223
|
-
if (P.length > 0) {
|
|
1224
|
-
const U = P[Te.get(V)];
|
|
1225
|
-
process.env.NODE_ENV !== "production" && (U || console.error(["MUI: The `value` provided to the Tabs component is invalid.", `None of the Tabs' children match with "${V}".`, Te.keys ? `You can provide one of the following values: ${Array.from(Te.keys()).join(", ")}.` : null].join(`
|
|
1226
|
-
`))), D = U ? U.getBoundingClientRect() : null, process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "test" && !fo && D && D.width === 0 && D.height === 0 && // if the whole Tabs component is hidden, don't warn
|
|
1227
|
-
v.clientWidth !== 0 && (v = null, console.error(["MUI: The `value` provided to the Tabs component is invalid.", `The Tab with this \`value\` ("${V}") is not part of the document layout.`, "Make sure the tab item is present in the document or that it's not `display: none`."].join(`
|
|
1228
|
-
`)), fo = !0);
|
|
1229
|
-
}
|
|
1230
|
-
}
|
|
1231
|
-
return {
|
|
1232
|
-
tabsMeta: v,
|
|
1233
|
-
tabMeta: D
|
|
1234
|
-
};
|
|
1235
|
-
}, ye = Ae(() => {
|
|
1236
|
-
const {
|
|
1237
|
-
tabsMeta: f,
|
|
1238
|
-
tabMeta: v
|
|
1239
|
-
} = me();
|
|
1240
|
-
let D = 0, P;
|
|
1241
|
-
if (j)
|
|
1242
|
-
P = "top", v && f && (D = v.top - f.top + f.scrollTop);
|
|
1243
|
-
else if (P = n ? "right" : "left", v && f) {
|
|
1244
|
-
const ee = n ? f.scrollLeftNormalized + f.clientWidth - f.scrollWidth : f.scrollLeft;
|
|
1245
|
-
D = (n ? -1 : 1) * (v[P] - f[P] + ee);
|
|
1246
|
-
}
|
|
1247
|
-
const U = {
|
|
1248
|
-
[P]: D,
|
|
1249
|
-
// May be wrong until the font is loaded.
|
|
1250
|
-
[G]: v ? v[G] : 0
|
|
1251
|
-
};
|
|
1252
|
-
if (isNaN(H[P]) || isNaN(H[G]))
|
|
1253
|
-
xe(U);
|
|
1254
|
-
else {
|
|
1255
|
-
const ee = Math.abs(H[P] - U[P]), ke = Math.abs(H[G] - U[G]);
|
|
1256
|
-
(ee >= 1 || ke >= 1) && xe(U);
|
|
1257
|
-
}
|
|
1258
|
-
}), le = (f, {
|
|
1259
|
-
animation: v = !0
|
|
1260
|
-
} = {}) => {
|
|
1261
|
-
v ? en(se, q.current, f, {
|
|
1262
|
-
duration: a.transitions.duration.standard
|
|
1263
|
-
}) : q.current[se] = f;
|
|
1264
|
-
}, pe = (f) => {
|
|
1265
|
-
let v = q.current[se];
|
|
1266
|
-
j ? v += f : (v += f * (n ? -1 : 1), v *= n && Ro() === "reverse" ? -1 : 1), le(v);
|
|
1267
|
-
}, _e = () => {
|
|
1268
|
-
const f = q.current[ce];
|
|
1269
|
-
let v = 0;
|
|
1270
|
-
const D = Array.from(E.current.children);
|
|
1271
|
-
for (let P = 0; P < D.length; P += 1) {
|
|
1272
|
-
const U = D[P];
|
|
1273
|
-
if (v + U[ce] > f) {
|
|
1274
|
-
P === 0 && (v = f);
|
|
1275
|
-
break;
|
|
1276
|
-
}
|
|
1277
|
-
v += U[ce];
|
|
1278
|
-
}
|
|
1279
|
-
return v;
|
|
1280
|
-
}, Fe = () => {
|
|
1281
|
-
pe(-1 * _e());
|
|
1282
|
-
}, Le = () => {
|
|
1283
|
-
pe(_e());
|
|
1284
|
-
}, z = T.useCallback((f) => {
|
|
1285
|
-
Ee({
|
|
1286
|
-
overflow: null,
|
|
1287
|
-
scrollbarWidth: f
|
|
1288
|
-
});
|
|
1289
|
-
}, []), W = () => {
|
|
1290
|
-
const f = {};
|
|
1291
|
-
f.scrollbarSizeListener = L ? /* @__PURE__ */ p(yn, {
|
|
1292
|
-
onChange: z,
|
|
1293
|
-
className: fe(k.scrollableX, k.hideScrollbar)
|
|
1294
|
-
}) : null;
|
|
1295
|
-
const v = J.start || J.end, D = L && (S === "auto" && v || S === !0);
|
|
1296
|
-
return f.scrollButtonStart = D ? /* @__PURE__ */ p(F, m({
|
|
1297
|
-
orientation: C,
|
|
1298
|
-
direction: n ? "right" : "left",
|
|
1299
|
-
onClick: Fe,
|
|
1300
|
-
disabled: !J.start
|
|
1301
|
-
}, O, {
|
|
1302
|
-
className: fe(k.scrollButtons, O.className)
|
|
1303
|
-
})) : null, f.scrollButtonEnd = D ? /* @__PURE__ */ p(F, m({
|
|
1304
|
-
orientation: C,
|
|
1305
|
-
direction: n ? "left" : "right",
|
|
1306
|
-
onClick: Le,
|
|
1307
|
-
disabled: !J.end
|
|
1308
|
-
}, O, {
|
|
1309
|
-
className: fe(k.scrollButtons, O.className)
|
|
1310
|
-
})) : null, f;
|
|
1311
|
-
}, Y = Ae((f) => {
|
|
1312
|
-
const {
|
|
1313
|
-
tabsMeta: v,
|
|
1314
|
-
tabMeta: D
|
|
1315
|
-
} = me();
|
|
1316
|
-
if (!(!D || !v)) {
|
|
1317
|
-
if (D[ae] < v[ae]) {
|
|
1318
|
-
const P = v[se] + (D[ae] - v[ae]);
|
|
1319
|
-
le(P, {
|
|
1320
|
-
animation: f
|
|
1321
|
-
});
|
|
1322
|
-
} else if (D[ie] > v[ie]) {
|
|
1323
|
-
const P = v[se] + (D[ie] - v[ie]);
|
|
1324
|
-
le(P, {
|
|
1325
|
-
animation: f
|
|
1326
|
-
});
|
|
1327
|
-
}
|
|
1328
|
-
}
|
|
1329
|
-
}), K = Ae(() => {
|
|
1330
|
-
if (L && S !== !1) {
|
|
1331
|
-
const {
|
|
1332
|
-
scrollTop: f,
|
|
1333
|
-
scrollHeight: v,
|
|
1334
|
-
clientHeight: D,
|
|
1335
|
-
scrollWidth: P,
|
|
1336
|
-
clientWidth: U
|
|
1337
|
-
} = q.current;
|
|
1338
|
-
let ee, ke;
|
|
1339
|
-
if (j)
|
|
1340
|
-
ee = f > 1, ke = f < v - D - 1;
|
|
1341
|
-
else {
|
|
1342
|
-
const je = lo(q.current, a.direction);
|
|
1343
|
-
ee = n ? je < P - U - 1 : je > 1, ke = n ? je > 1 : je < P - U - 1;
|
|
1344
|
-
}
|
|
1345
|
-
(ee !== J.start || ke !== J.end) && Ne({
|
|
1346
|
-
start: ee,
|
|
1347
|
-
end: ke
|
|
1348
|
-
});
|
|
1349
|
-
}
|
|
1350
|
-
});
|
|
1351
|
-
T.useEffect(() => {
|
|
1352
|
-
const f = Xe(() => {
|
|
1353
|
-
q.current && (ye(), K());
|
|
1354
|
-
}), v = wo(q.current);
|
|
1355
|
-
v.addEventListener("resize", f);
|
|
1356
|
-
let D;
|
|
1357
|
-
return typeof ResizeObserver < "u" && (D = new ResizeObserver(f), Array.from(E.current.children).forEach((P) => {
|
|
1358
|
-
D.observe(P);
|
|
1359
|
-
})), () => {
|
|
1360
|
-
f.clear(), v.removeEventListener("resize", f), D && D.disconnect();
|
|
1361
|
-
};
|
|
1362
|
-
}, [ye, K]);
|
|
1363
|
-
const ge = T.useMemo(() => Xe(() => {
|
|
1364
|
-
K();
|
|
1365
|
-
}), [K]);
|
|
1366
|
-
T.useEffect(() => () => {
|
|
1367
|
-
ge.clear();
|
|
1368
|
-
}, [ge]), T.useEffect(() => {
|
|
1369
|
-
ue(!0);
|
|
1370
|
-
}, []), T.useEffect(() => {
|
|
1371
|
-
ye(), K();
|
|
1372
|
-
}), T.useEffect(() => {
|
|
1373
|
-
Y(bo !== H);
|
|
1374
|
-
}, [Y, H]), T.useImperativeHandle(c, () => ({
|
|
1375
|
-
updateIndicator: ye,
|
|
1376
|
-
updateScrollButtons: K
|
|
1377
|
-
}), [ye, K]);
|
|
1378
|
-
const De = /* @__PURE__ */ p(Tn, m({}, I, {
|
|
1379
|
-
className: fe(k.indicator, I.className),
|
|
1380
|
-
ownerState: re,
|
|
1381
|
-
style: m({}, H, I.style)
|
|
1382
|
-
}));
|
|
1383
|
-
let N = 0;
|
|
1384
|
-
const Z = T.Children.map(g, (f) => {
|
|
1385
|
-
if (!/* @__PURE__ */ T.isValidElement(f))
|
|
1386
|
-
return null;
|
|
1387
|
-
process.env.NODE_ENV !== "production" && Pt.isFragment(f) && console.error(["MUI: The Tabs component doesn't accept a Fragment as a child.", "Consider providing an array instead."].join(`
|
|
1388
|
-
`));
|
|
1389
|
-
const v = f.props.value === void 0 ? N : f.props.value;
|
|
1390
|
-
Te.set(v, N);
|
|
1391
|
-
const D = v === V;
|
|
1392
|
-
return N += 1, /* @__PURE__ */ T.cloneElement(f, m({
|
|
1393
|
-
fullWidth: _ === "fullWidth",
|
|
1394
|
-
indicator: D && !de && De,
|
|
1395
|
-
selected: D,
|
|
1396
|
-
selectionFollowsFocus: B,
|
|
1397
|
-
onChange: b,
|
|
1398
|
-
textColor: x,
|
|
1399
|
-
value: v
|
|
1400
|
-
}, N === 1 && V === !1 && !f.props.tabIndex ? {
|
|
1401
|
-
tabIndex: 0
|
|
1402
|
-
} : {}));
|
|
1403
|
-
}), we = (f) => {
|
|
1404
|
-
const v = E.current, D = St(v).activeElement;
|
|
1405
|
-
if (D.getAttribute("role") !== "tab")
|
|
1406
|
-
return;
|
|
1407
|
-
let U = C === "horizontal" ? "ArrowLeft" : "ArrowUp", ee = C === "horizontal" ? "ArrowRight" : "ArrowDown";
|
|
1408
|
-
switch (C === "horizontal" && n && (U = "ArrowRight", ee = "ArrowLeft"), f.key) {
|
|
1409
|
-
case U:
|
|
1410
|
-
f.preventDefault(), ze(v, D, po);
|
|
1411
|
-
break;
|
|
1412
|
-
case ee:
|
|
1413
|
-
f.preventDefault(), ze(v, D, mo);
|
|
1414
|
-
break;
|
|
1415
|
-
case "Home":
|
|
1416
|
-
f.preventDefault(), ze(v, null, mo);
|
|
1417
|
-
break;
|
|
1418
|
-
case "End":
|
|
1419
|
-
f.preventDefault(), ze(v, null, po);
|
|
1420
|
-
break;
|
|
1421
|
-
}
|
|
1422
|
-
}, Be = W();
|
|
1423
|
-
return /* @__PURE__ */ R(bn, m({
|
|
1424
|
-
className: fe(k.root, d),
|
|
1425
|
-
ownerState: re,
|
|
1426
|
-
ref: s,
|
|
1427
|
-
as: h
|
|
1428
|
-
}, A, {
|
|
1429
|
-
children: [Be.scrollButtonStart, Be.scrollbarSizeListener, /* @__PURE__ */ R(fn, {
|
|
1430
|
-
className: k.scroller,
|
|
1431
|
-
ownerState: re,
|
|
1432
|
-
style: {
|
|
1433
|
-
overflow: Ie.overflow,
|
|
1434
|
-
[j ? `margin${n ? "Left" : "Right"}` : "marginBottom"]: $ ? void 0 : -Ie.scrollbarWidth
|
|
1435
|
-
},
|
|
1436
|
-
ref: q,
|
|
1437
|
-
onScroll: ge,
|
|
1438
|
-
children: [/* @__PURE__ */ p(hn, {
|
|
1439
|
-
"aria-label": l,
|
|
1440
|
-
"aria-labelledby": i,
|
|
1441
|
-
"aria-orientation": C === "vertical" ? "vertical" : null,
|
|
1442
|
-
className: k.flexContainer,
|
|
1443
|
-
ownerState: re,
|
|
1444
|
-
onKeyDown: we,
|
|
1445
|
-
ref: E,
|
|
1446
|
-
role: "tablist",
|
|
1447
|
-
children: Z
|
|
1448
|
-
}), de && De]
|
|
1449
|
-
}), Be.scrollButtonEnd]
|
|
1450
|
-
}));
|
|
1451
|
-
});
|
|
1452
|
-
process.env.NODE_ENV !== "production" && (Fo.propTypes = {
|
|
1453
|
-
// ----------------------------- Warning --------------------------------
|
|
1454
|
-
// | These PropTypes are generated from the TypeScript type definitions |
|
|
1455
|
-
// | To update them edit the d.ts file and run "yarn proptypes" |
|
|
1456
|
-
// ----------------------------------------------------------------------
|
|
1457
|
-
/**
|
|
1458
|
-
* Callback fired when the component mounts.
|
|
1459
|
-
* This is useful when you want to trigger an action programmatically.
|
|
1460
|
-
* It supports two actions: `updateIndicator()` and `updateScrollButtons()`
|
|
1461
|
-
*
|
|
1462
|
-
* @param {object} actions This object contains all possible actions
|
|
1463
|
-
* that can be triggered programmatically.
|
|
1464
|
-
*/
|
|
1465
|
-
action: Rt,
|
|
1466
|
-
/**
|
|
1467
|
-
* If `true`, the scroll buttons aren't forced hidden on mobile.
|
|
1468
|
-
* By default the scroll buttons are hidden on mobile and takes precedence over `scrollButtons`.
|
|
1469
|
-
* @default false
|
|
1470
|
-
*/
|
|
1471
|
-
allowScrollButtonsMobile: e.bool,
|
|
1472
|
-
/**
|
|
1473
|
-
* The label for the Tabs as a string.
|
|
1474
|
-
*/
|
|
1475
|
-
"aria-label": e.string,
|
|
1476
|
-
/**
|
|
1477
|
-
* An id or list of ids separated by a space that label the Tabs.
|
|
1478
|
-
*/
|
|
1479
|
-
"aria-labelledby": e.string,
|
|
1480
|
-
/**
|
|
1481
|
-
* If `true`, the tabs are centered.
|
|
1482
|
-
* This prop is intended for large views.
|
|
1483
|
-
* @default false
|
|
1484
|
-
*/
|
|
1485
|
-
centered: e.bool,
|
|
1486
|
-
/**
|
|
1487
|
-
* The content of the component.
|
|
1488
|
-
*/
|
|
1489
|
-
children: e.node,
|
|
1490
|
-
/**
|
|
1491
|
-
* Override or extend the styles applied to the component.
|
|
1492
|
-
*/
|
|
1493
|
-
classes: e.object,
|
|
1494
|
-
/**
|
|
1495
|
-
* @ignore
|
|
1496
|
-
*/
|
|
1497
|
-
className: e.string,
|
|
1498
|
-
/**
|
|
1499
|
-
* The component used for the root node.
|
|
1500
|
-
* Either a string to use a HTML element or a component.
|
|
1501
|
-
*/
|
|
1502
|
-
component: e.elementType,
|
|
1503
|
-
/**
|
|
1504
|
-
* Determines the color of the indicator.
|
|
1505
|
-
* @default 'primary'
|
|
1506
|
-
*/
|
|
1507
|
-
indicatorColor: e.oneOfType([e.oneOf(["primary", "secondary"]), e.string]),
|
|
1508
|
-
/**
|
|
1509
|
-
* Callback fired when the value changes.
|
|
1510
|
-
*
|
|
1511
|
-
* @param {React.SyntheticEvent} event The event source of the callback. **Warning**: This is a generic event not a change event.
|
|
1512
|
-
* @param {any} value We default to the index of the child (number)
|
|
1513
|
-
*/
|
|
1514
|
-
onChange: e.func,
|
|
1515
|
-
/**
|
|
1516
|
-
* The component orientation (layout flow direction).
|
|
1517
|
-
* @default 'horizontal'
|
|
1518
|
-
*/
|
|
1519
|
-
orientation: e.oneOf(["horizontal", "vertical"]),
|
|
1520
|
-
/**
|
|
1521
|
-
* The component used to render the scroll buttons.
|
|
1522
|
-
* @default TabScrollButton
|
|
1523
|
-
*/
|
|
1524
|
-
ScrollButtonComponent: e.elementType,
|
|
1525
|
-
/**
|
|
1526
|
-
* Determine behavior of scroll buttons when tabs are set to scroll:
|
|
1527
|
-
*
|
|
1528
|
-
* - `auto` will only present them when not all the items are visible.
|
|
1529
|
-
* - `true` will always present them.
|
|
1530
|
-
* - `false` will never present them.
|
|
1531
|
-
*
|
|
1532
|
-
* By default the scroll buttons are hidden on mobile.
|
|
1533
|
-
* This behavior can be disabled with `allowScrollButtonsMobile`.
|
|
1534
|
-
* @default 'auto'
|
|
1535
|
-
*/
|
|
1536
|
-
scrollButtons: e.oneOf(["auto", !1, !0]),
|
|
1537
|
-
/**
|
|
1538
|
-
* If `true` the selected tab changes on focus. Otherwise it only
|
|
1539
|
-
* changes on activation.
|
|
1540
|
-
*/
|
|
1541
|
-
selectionFollowsFocus: e.bool,
|
|
1542
|
-
/**
|
|
1543
|
-
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
1544
|
-
*/
|
|
1545
|
-
sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
|
|
1546
|
-
/**
|
|
1547
|
-
* Props applied to the tab indicator element.
|
|
1548
|
-
* @default {}
|
|
1549
|
-
*/
|
|
1550
|
-
TabIndicatorProps: e.object,
|
|
1551
|
-
/**
|
|
1552
|
-
* Props applied to the [`TabScrollButton`](/material-ui/api/tab-scroll-button/) element.
|
|
1553
|
-
* @default {}
|
|
1554
|
-
*/
|
|
1555
|
-
TabScrollButtonProps: e.object,
|
|
1556
|
-
/**
|
|
1557
|
-
* Determines the color of the `Tab`.
|
|
1558
|
-
* @default 'primary'
|
|
1559
|
-
*/
|
|
1560
|
-
textColor: e.oneOf(["inherit", "primary", "secondary"]),
|
|
1561
|
-
/**
|
|
1562
|
-
* The value of the currently selected `Tab`.
|
|
1563
|
-
* If you don't want any selected `Tab`, you can set this prop to `false`.
|
|
1564
|
-
*/
|
|
1565
|
-
value: e.any,
|
|
1566
|
-
/**
|
|
1567
|
-
* Determines additional display behavior of the tabs:
|
|
1568
|
-
*
|
|
1569
|
-
* - `scrollable` will invoke scrolling properties and allow for horizontally
|
|
1570
|
-
* scrolling (or swiping) of the tab bar.
|
|
1571
|
-
* -`fullWidth` will make the tabs grow to use all the available space,
|
|
1572
|
-
* which should be used for small views, like on mobile.
|
|
1573
|
-
* - `standard` will render the default state.
|
|
1574
|
-
* @default 'standard'
|
|
1575
|
-
*/
|
|
1576
|
-
variant: e.oneOf(["fullWidth", "scrollable", "standard"]),
|
|
1577
|
-
/**
|
|
1578
|
-
* If `true`, the scrollbar is visible. It can be useful when displaying
|
|
1579
|
-
* a long vertical list of tabs.
|
|
1580
|
-
* @default false
|
|
1581
|
-
*/
|
|
1582
|
-
visibleScrollbar: e.bool
|
|
1583
|
-
});
|
|
1584
|
-
function gn(o) {
|
|
1585
|
-
return ne("MuiDateTimePickerTabs", o);
|
|
1586
|
-
}
|
|
1587
|
-
te("MuiDateTimePickerTabs", ["root"]);
|
|
1588
|
-
const vn = (o) => ["day", "month", "year"].includes(o) ? "date" : "time", Cn = (o) => o === "date" ? "day" : "hours", xn = (o) => {
|
|
1589
|
-
const {
|
|
1590
|
-
classes: t
|
|
1591
|
-
} = o;
|
|
1592
|
-
return oe({
|
|
1593
|
-
root: ["root"]
|
|
1594
|
-
}, gn, t);
|
|
1595
|
-
}, Dn = M(Fo, {
|
|
1596
|
-
name: "MuiDateTimePickerTabs",
|
|
1597
|
-
slot: "Root",
|
|
1598
|
-
overridesResolver: (o, t) => t.root
|
|
1599
|
-
})(({
|
|
1600
|
-
theme: o
|
|
1601
|
-
}) => ({
|
|
1602
|
-
boxShadow: `0 -1px 0 0 inset ${(o.vars || o).palette.divider}`,
|
|
1603
|
-
"&:last-child": {
|
|
1604
|
-
boxShadow: `0 1px 0 0 inset ${(o.vars || o).palette.divider}`,
|
|
1605
|
-
[`& .${He.indicator}`]: {
|
|
1606
|
-
bottom: "auto",
|
|
1607
|
-
top: 0
|
|
1608
|
-
}
|
|
1609
|
-
}
|
|
1610
|
-
})), Bo = function(t) {
|
|
1611
|
-
const s = Q({
|
|
1612
|
-
props: t,
|
|
1613
|
-
name: "MuiDateTimePickerTabs"
|
|
1614
|
-
}), {
|
|
1615
|
-
dateIcon: r = /* @__PURE__ */ p(ut, {}),
|
|
1616
|
-
onViewChange: a,
|
|
1617
|
-
timeIcon: n = /* @__PURE__ */ p(mt, {}),
|
|
1618
|
-
view: l,
|
|
1619
|
-
hidden: i = typeof window > "u" || window.innerHeight < 667
|
|
1620
|
-
} = s, c = Oe(), u = xn(s), g = (d, h) => {
|
|
1621
|
-
a(Cn(h));
|
|
1622
|
-
};
|
|
1623
|
-
return i ? null : /* @__PURE__ */ R(Dn, {
|
|
1624
|
-
ownerState: s,
|
|
1625
|
-
variant: "fullWidth",
|
|
1626
|
-
value: vn(l),
|
|
1627
|
-
onChange: g,
|
|
1628
|
-
className: u.root,
|
|
1629
|
-
children: [/* @__PURE__ */ p(Qe, {
|
|
1630
|
-
value: "date",
|
|
1631
|
-
"aria-label": c.dateTableLabel,
|
|
1632
|
-
icon: /* @__PURE__ */ p(T.Fragment, {
|
|
1633
|
-
children: r
|
|
1634
|
-
})
|
|
1635
|
-
}), /* @__PURE__ */ p(Qe, {
|
|
1636
|
-
value: "time",
|
|
1637
|
-
"aria-label": c.timeTableLabel,
|
|
1638
|
-
icon: /* @__PURE__ */ p(T.Fragment, {
|
|
1639
|
-
children: n
|
|
1640
|
-
})
|
|
1641
|
-
})]
|
|
1642
|
-
});
|
|
1643
|
-
};
|
|
1644
|
-
process.env.NODE_ENV !== "production" && (Bo.propTypes = {
|
|
1645
|
-
// ----------------------------- Warning --------------------------------
|
|
1646
|
-
// | These PropTypes are generated from the TypeScript type definitions |
|
|
1647
|
-
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
|
1648
|
-
// ----------------------------------------------------------------------
|
|
1649
|
-
/**
|
|
1650
|
-
* Override or extend the styles applied to the component.
|
|
1651
|
-
*/
|
|
1652
|
-
classes: e.object,
|
|
1653
|
-
/**
|
|
1654
|
-
* Date tab icon.
|
|
1655
|
-
* @default DateRange
|
|
1656
|
-
*/
|
|
1657
|
-
dateIcon: e.node,
|
|
1658
|
-
/**
|
|
1659
|
-
* Toggles visibility of the tabs allowing view switching.
|
|
1660
|
-
* @default `window.innerHeight < 667` for `DesktopDateTimePicker` and `MobileDateTimePicker`, `displayStaticWrapperAs === 'desktop'` for `StaticDateTimePicker`
|
|
1661
|
-
*/
|
|
1662
|
-
hidden: e.bool,
|
|
1663
|
-
/**
|
|
1664
|
-
* Callback called when a tab is clicked
|
|
1665
|
-
* @template TView
|
|
1666
|
-
* @param {TView} view The view to open
|
|
1667
|
-
*/
|
|
1668
|
-
onViewChange: e.func.isRequired,
|
|
1669
|
-
/**
|
|
1670
|
-
* Time tab icon.
|
|
1671
|
-
* @default Time
|
|
1672
|
-
*/
|
|
1673
|
-
timeIcon: e.node,
|
|
1674
|
-
/**
|
|
1675
|
-
* Currently visible picker view.
|
|
1676
|
-
*/
|
|
1677
|
-
view: e.oneOf(["day", "hours", "minutes", "month", "seconds", "year"]).isRequired
|
|
1678
|
-
});
|
|
1679
|
-
function wn(o) {
|
|
1680
|
-
return ne("MuiDateTimePickerToolbar", o);
|
|
1681
|
-
}
|
|
1682
|
-
const qe = te("MuiDateTimePickerToolbar", ["root", "dateContainer", "timeContainer", "timeDigitsContainer", "separator", "timeLabelReverse", "ampmSelection", "ampmLandscape", "ampmLabel"]), kn = ["ampm", "ampmInClock", "value", "onChange", "view", "isLandscape", "onViewChange", "toolbarFormat", "toolbarPlaceholder", "views", "disabled", "readOnly"], Pn = (o) => {
|
|
1683
|
-
const {
|
|
1684
|
-
classes: t,
|
|
1685
|
-
theme: s,
|
|
1686
|
-
isLandscape: r
|
|
1687
|
-
} = o, a = {
|
|
1688
|
-
root: ["root"],
|
|
1689
|
-
dateContainer: ["dateContainer"],
|
|
1690
|
-
timeContainer: ["timeContainer", s.direction === "rtl" && "timeLabelReverse"],
|
|
1691
|
-
timeDigitsContainer: ["timeDigitsContainer", s.direction === "rtl" && "timeLabelReverse"],
|
|
1692
|
-
separator: ["separator"],
|
|
1693
|
-
ampmSelection: ["ampmSelection", r && "ampmLandscape"],
|
|
1694
|
-
ampmLabel: ["ampmLabel"]
|
|
1695
|
-
};
|
|
1696
|
-
return oe(a, wn, t);
|
|
1697
|
-
}, Vo = M(pt, {
|
|
1698
|
-
name: "MuiDateTimePickerToolbar",
|
|
1699
|
-
slot: "Root",
|
|
1700
|
-
overridesResolver: (o, t) => t.root
|
|
1701
|
-
})(({
|
|
1702
|
-
theme: o
|
|
1703
|
-
}) => ({
|
|
1704
|
-
paddingLeft: 16,
|
|
1705
|
-
paddingRight: 16,
|
|
1706
|
-
justifyContent: "space-around",
|
|
1707
|
-
position: "relative",
|
|
1708
|
-
[`& .${bt.penIconButton}`]: m({
|
|
1709
|
-
position: "absolute",
|
|
1710
|
-
top: 8
|
|
1711
|
-
}, o.direction === "rtl" ? {
|
|
1712
|
-
left: 8
|
|
1713
|
-
} : {
|
|
1714
|
-
right: 8
|
|
1715
|
-
})
|
|
1716
|
-
}));
|
|
1717
|
-
Vo.propTypes = {
|
|
1718
|
-
// ----------------------------- Warning --------------------------------
|
|
1719
|
-
// | These PropTypes are generated from the TypeScript type definitions |
|
|
1720
|
-
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
|
1721
|
-
// ----------------------------------------------------------------------
|
|
1722
|
-
as: e.elementType,
|
|
1723
|
-
classes: e.object,
|
|
1724
|
-
className: e.string,
|
|
1725
|
-
isLandscape: e.bool.isRequired,
|
|
1726
|
-
isMobileKeyboardViewOpen: e.bool,
|
|
1727
|
-
landscapeDirection: e.oneOf(["column", "row"]),
|
|
1728
|
-
ownerState: e.object.isRequired,
|
|
1729
|
-
sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
|
|
1730
|
-
toggleMobileKeyboardView: e.func,
|
|
1731
|
-
toolbarTitle: e.node,
|
|
1732
|
-
viewType: e.oneOf(["date", "time"])
|
|
1733
|
-
};
|
|
1734
|
-
const Sn = M("div", {
|
|
1735
|
-
name: "MuiDateTimePickerToolbar",
|
|
1736
|
-
slot: "DateContainer",
|
|
1737
|
-
overridesResolver: (o, t) => t.dateContainer
|
|
1738
|
-
})({
|
|
1739
|
-
display: "flex",
|
|
1740
|
-
flexDirection: "column",
|
|
1741
|
-
alignItems: "flex-start"
|
|
1742
|
-
}), $o = M("div", {
|
|
1743
|
-
name: "MuiDateTimePickerToolbar",
|
|
1744
|
-
slot: "TimeContainer",
|
|
1745
|
-
overridesResolver: (o, t) => t.timeContainer
|
|
1746
|
-
})(({
|
|
1747
|
-
theme: o,
|
|
1748
|
-
ownerState: t
|
|
1749
|
-
}) => {
|
|
1750
|
-
const s = t.isLandscape ? "column" : "row";
|
|
1751
|
-
return m({
|
|
1752
|
-
display: "flex",
|
|
1753
|
-
flexDirection: s
|
|
1754
|
-
}, o.direction === "rtl" && {
|
|
1755
|
-
flexDirection: `${s}-reverse`
|
|
1756
|
-
});
|
|
1757
|
-
}), Mn = M("div", {
|
|
1758
|
-
name: "MuiDateTimePickerToolbar",
|
|
1759
|
-
slot: "TimeDigitsContainer",
|
|
1760
|
-
overridesResolver: (o, t) => t.timeDigitsContainer
|
|
1761
|
-
})(({
|
|
1762
|
-
theme: o
|
|
1763
|
-
}) => m({
|
|
1764
|
-
display: "flex"
|
|
1765
|
-
}, o.direction === "rtl" && {
|
|
1766
|
-
flexDirection: "row-reverse"
|
|
1767
|
-
}));
|
|
1768
|
-
$o.propTypes = {
|
|
1769
|
-
// ----------------------------- Warning --------------------------------
|
|
1770
|
-
// | These PropTypes are generated from the TypeScript type definitions |
|
|
1771
|
-
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
|
1772
|
-
// ----------------------------------------------------------------------
|
|
1773
|
-
as: e.elementType,
|
|
1774
|
-
ownerState: e.object.isRequired,
|
|
1775
|
-
sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object])
|
|
1776
|
-
};
|
|
1777
|
-
const ho = M(Oo, {
|
|
1778
|
-
name: "MuiDateTimePickerToolbar",
|
|
1779
|
-
slot: "Separator",
|
|
1780
|
-
overridesResolver: (o, t) => t.separator
|
|
1781
|
-
})({
|
|
1782
|
-
margin: "0 4px 0 2px",
|
|
1783
|
-
cursor: "default"
|
|
1784
|
-
}), Rn = M("div", {
|
|
1785
|
-
name: "MuiDateTimePickerToolbar",
|
|
1786
|
-
slot: "AmPmSelection",
|
|
1787
|
-
overridesResolver: (o, t) => [{
|
|
1788
|
-
[`.${qe.ampmLabel}`]: t.ampmLabel
|
|
1789
|
-
}, {
|
|
1790
|
-
[`&.${qe.ampmLandscape}`]: t.ampmLandscape
|
|
1791
|
-
}, t.ampmSelection]
|
|
1792
|
-
})(({
|
|
1793
|
-
ownerState: o
|
|
1794
|
-
}) => m({
|
|
1795
|
-
display: "flex",
|
|
1796
|
-
flexDirection: "column",
|
|
1797
|
-
marginRight: "auto",
|
|
1798
|
-
marginLeft: 12
|
|
1799
|
-
}, o.isLandscape && {
|
|
1800
|
-
margin: "4px 0 auto",
|
|
1801
|
-
flexDirection: "row",
|
|
1802
|
-
justifyContent: "space-around",
|
|
1803
|
-
width: "100%"
|
|
1804
|
-
}, {
|
|
1805
|
-
[`& .${qe.ampmLabel}`]: {
|
|
1806
|
-
fontSize: 17
|
|
1807
|
-
}
|
|
1808
|
-
}));
|
|
1809
|
-
function Eo(o) {
|
|
1810
|
-
const t = Q({
|
|
1811
|
-
props: o,
|
|
1812
|
-
name: "MuiDateTimePickerToolbar"
|
|
1813
|
-
}), {
|
|
1814
|
-
ampm: s,
|
|
1815
|
-
ampmInClock: r,
|
|
1816
|
-
value: a,
|
|
1817
|
-
onChange: n,
|
|
1818
|
-
view: l,
|
|
1819
|
-
isLandscape: i,
|
|
1820
|
-
onViewChange: c,
|
|
1821
|
-
toolbarFormat: u,
|
|
1822
|
-
toolbarPlaceholder: g = "––",
|
|
1823
|
-
views: d,
|
|
1824
|
-
disabled: h,
|
|
1825
|
-
readOnly: y
|
|
1826
|
-
} = t, w = X(t, kn), b = t, C = $e(), {
|
|
1827
|
-
meridiemMode: F,
|
|
1828
|
-
handleMeridiemChange: S
|
|
1829
|
-
} = vo(a, s, n), B = !!(s && !r), I = Oe(), O = Je(), x = Pn(m({}, b, {
|
|
1830
|
-
theme: O
|
|
1831
|
-
})), V = ($) => s ? C.format($, "hours12h") : C.format($, "hours24h"), _ = T.useMemo(() => a ? u ? C.formatByString(a, u) : C.format(a, "shortDate") : g, [a, u, g, C]);
|
|
1832
|
-
return /* @__PURE__ */ R(Vo, m({
|
|
1833
|
-
toolbarTitle: I.dateTimePickerToolbarTitle,
|
|
1834
|
-
isLandscape: i,
|
|
1835
|
-
className: x.root
|
|
1836
|
-
}, w, {
|
|
1837
|
-
ownerState: b,
|
|
1838
|
-
children: [/* @__PURE__ */ R(Sn, {
|
|
1839
|
-
className: x.dateContainer,
|
|
1840
|
-
ownerState: b,
|
|
1841
|
-
children: [d.includes("year") && /* @__PURE__ */ p(ve, {
|
|
1842
|
-
tabIndex: -1,
|
|
1843
|
-
variant: "subtitle1",
|
|
1844
|
-
onClick: () => c("year"),
|
|
1845
|
-
selected: l === "year",
|
|
1846
|
-
value: a ? C.format(a, "year") : "–"
|
|
1847
|
-
}), d.includes("day") && /* @__PURE__ */ p(ve, {
|
|
1848
|
-
tabIndex: -1,
|
|
1849
|
-
variant: "h4",
|
|
1850
|
-
onClick: () => c("day"),
|
|
1851
|
-
selected: l === "day",
|
|
1852
|
-
value: _
|
|
1853
|
-
})]
|
|
1854
|
-
}), /* @__PURE__ */ R($o, {
|
|
1855
|
-
className: x.timeContainer,
|
|
1856
|
-
ownerState: b,
|
|
1857
|
-
children: [/* @__PURE__ */ R(Mn, {
|
|
1858
|
-
className: x.timeDigitsContainer,
|
|
1859
|
-
children: [d.includes("hours") && /* @__PURE__ */ p(ve, {
|
|
1860
|
-
variant: "h3",
|
|
1861
|
-
onClick: () => c("hours"),
|
|
1862
|
-
selected: l === "hours",
|
|
1863
|
-
value: a ? V(a) : "--"
|
|
1864
|
-
}), d.includes("minutes") && /* @__PURE__ */ R(T.Fragment, {
|
|
1865
|
-
children: [/* @__PURE__ */ p(ho, {
|
|
1866
|
-
variant: "h3",
|
|
1867
|
-
value: ":",
|
|
1868
|
-
className: x.separator,
|
|
1869
|
-
ownerState: b
|
|
1870
|
-
}), /* @__PURE__ */ p(ve, {
|
|
1871
|
-
variant: "h3",
|
|
1872
|
-
onClick: () => c("minutes"),
|
|
1873
|
-
selected: l === "minutes",
|
|
1874
|
-
value: a ? C.format(a, "minutes") : "--"
|
|
1875
|
-
})]
|
|
1876
|
-
}), d.includes("seconds") && /* @__PURE__ */ R(T.Fragment, {
|
|
1877
|
-
children: [/* @__PURE__ */ p(ho, {
|
|
1878
|
-
variant: "h3",
|
|
1879
|
-
value: ":",
|
|
1880
|
-
className: x.separator,
|
|
1881
|
-
ownerState: b
|
|
1882
|
-
}), /* @__PURE__ */ p(ve, {
|
|
1883
|
-
variant: "h3",
|
|
1884
|
-
onClick: () => c("seconds"),
|
|
1885
|
-
selected: l === "seconds",
|
|
1886
|
-
value: a ? C.format(a, "seconds") : "--"
|
|
1887
|
-
})]
|
|
1888
|
-
})]
|
|
1889
|
-
}), B && /* @__PURE__ */ R(Rn, {
|
|
1890
|
-
className: x.ampmSelection,
|
|
1891
|
-
ownerState: b,
|
|
1892
|
-
children: [/* @__PURE__ */ p(ve, {
|
|
1893
|
-
disableRipple: !0,
|
|
1894
|
-
variant: "subtitle2",
|
|
1895
|
-
selected: F === "am",
|
|
1896
|
-
typographyClassName: x.ampmLabel,
|
|
1897
|
-
value: C.getMeridiemText("am"),
|
|
1898
|
-
onClick: y ? void 0 : () => S("am"),
|
|
1899
|
-
disabled: h
|
|
1900
|
-
}), /* @__PURE__ */ p(ve, {
|
|
1901
|
-
disableRipple: !0,
|
|
1902
|
-
variant: "subtitle2",
|
|
1903
|
-
selected: F === "pm",
|
|
1904
|
-
typographyClassName: x.ampmLabel,
|
|
1905
|
-
value: C.getMeridiemText("pm"),
|
|
1906
|
-
onClick: y ? void 0 : () => S("pm"),
|
|
1907
|
-
disabled: h
|
|
1908
|
-
})]
|
|
1909
|
-
})]
|
|
1910
|
-
})]
|
|
1911
|
-
}));
|
|
1912
|
-
}
|
|
1913
|
-
process.env.NODE_ENV !== "production" && (Eo.propTypes = {
|
|
1914
|
-
// ----------------------------- Warning --------------------------------
|
|
1915
|
-
// | These PropTypes are generated from the TypeScript type definitions |
|
|
1916
|
-
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
|
1917
|
-
// ----------------------------------------------------------------------
|
|
1918
|
-
ampm: e.bool,
|
|
1919
|
-
ampmInClock: e.bool,
|
|
1920
|
-
/**
|
|
1921
|
-
* Override or extend the styles applied to the component.
|
|
1922
|
-
*/
|
|
1923
|
-
classes: e.object,
|
|
1924
|
-
/**
|
|
1925
|
-
* className applied to the root component.
|
|
1926
|
-
*/
|
|
1927
|
-
className: e.string,
|
|
1928
|
-
disabled: e.bool,
|
|
1929
|
-
/**
|
|
1930
|
-
* If `true`, show the toolbar even in desktop mode.
|
|
1931
|
-
* @default `true` for Desktop, `false` for Mobile.
|
|
1932
|
-
*/
|
|
1933
|
-
hidden: e.bool,
|
|
1934
|
-
isLandscape: e.bool.isRequired,
|
|
1935
|
-
onChange: e.func.isRequired,
|
|
1936
|
-
/**
|
|
1937
|
-
* Callback called when a toolbar is clicked
|
|
1938
|
-
* @template TView
|
|
1939
|
-
* @param {TView} view The view to open
|
|
1940
|
-
*/
|
|
1941
|
-
onViewChange: e.func.isRequired,
|
|
1942
|
-
readOnly: e.bool,
|
|
1943
|
-
titleId: e.string,
|
|
1944
|
-
/**
|
|
1945
|
-
* Toolbar date format.
|
|
1946
|
-
*/
|
|
1947
|
-
toolbarFormat: e.string,
|
|
1948
|
-
/**
|
|
1949
|
-
* Toolbar value placeholder—it is displayed when the value is empty.
|
|
1950
|
-
* @default "––"
|
|
1951
|
-
*/
|
|
1952
|
-
toolbarPlaceholder: e.node,
|
|
1953
|
-
value: e.any,
|
|
1954
|
-
/**
|
|
1955
|
-
* Currently visible picker view.
|
|
1956
|
-
*/
|
|
1957
|
-
view: e.oneOf(["day", "hours", "minutes", "month", "seconds", "year"]).isRequired,
|
|
1958
|
-
views: e.arrayOf(e.oneOf(["day", "hours", "minutes", "month", "seconds", "year"]).isRequired).isRequired
|
|
1959
|
-
});
|
|
1960
|
-
function _o(o, t) {
|
|
1961
|
-
var s, r, a, n, l, i, c, u, g, d, h;
|
|
1962
|
-
const y = $e(), w = go(), b = Q({
|
|
1963
|
-
props: o,
|
|
1964
|
-
name: t
|
|
1965
|
-
}), C = (s = b.ampm) != null ? s : y.is12HourCycleInCurrentLocale(), F = T.useMemo(() => {
|
|
1966
|
-
var I;
|
|
1967
|
-
return ((I = b.localeText) == null ? void 0 : I.toolbarTitle) == null ? b.localeText : m({}, b.localeText, {
|
|
1968
|
-
dateTimePickerToolbarTitle: b.localeText.toolbarTitle
|
|
1969
|
-
});
|
|
1970
|
-
}, [b.localeText]), S = (r = b.slots) != null ? r : Co(b.components), B = (a = b.slotProps) != null ? a : b.componentsProps;
|
|
1971
|
-
return m({}, b, ft({
|
|
1972
|
-
views: b.views,
|
|
1973
|
-
openTo: b.openTo,
|
|
1974
|
-
defaultViews: ["year", "day", "hours", "minutes"],
|
|
1975
|
-
defaultOpenTo: "day"
|
|
1976
|
-
}), {
|
|
1977
|
-
ampm: C,
|
|
1978
|
-
localeText: F,
|
|
1979
|
-
orientation: (n = b.orientation) != null ? n : "portrait",
|
|
1980
|
-
// TODO: Remove from public API
|
|
1981
|
-
disableIgnoringDatePartForTimeValidation: (l = b.disableIgnoringDatePartForTimeValidation) != null ? l : !!(b.minDateTime || b.maxDateTime || // allow time clock to correctly check time validity: https://github.com/mui/mui-x/issues/8520
|
|
1982
|
-
b.disablePast || b.disableFuture),
|
|
1983
|
-
disableFuture: (i = b.disableFuture) != null ? i : !1,
|
|
1984
|
-
disablePast: (c = b.disablePast) != null ? c : !1,
|
|
1985
|
-
minDate: Ye(y, (u = b.minDateTime) != null ? u : b.minDate, w.minDate),
|
|
1986
|
-
maxDate: Ye(y, (g = b.maxDateTime) != null ? g : b.maxDate, w.maxDate),
|
|
1987
|
-
minTime: (d = b.minDateTime) != null ? d : b.minTime,
|
|
1988
|
-
maxTime: (h = b.maxDateTime) != null ? h : b.maxTime,
|
|
1989
|
-
slots: m({
|
|
1990
|
-
toolbar: Eo,
|
|
1991
|
-
tabs: Bo
|
|
1992
|
-
}, S),
|
|
1993
|
-
slotProps: m({}, B, {
|
|
1994
|
-
toolbar: m({
|
|
1995
|
-
ampm: C
|
|
1996
|
-
}, B == null ? void 0 : B.toolbar)
|
|
1997
|
-
})
|
|
1998
|
-
});
|
|
1999
|
-
}
|
|
2000
|
-
const Lo = /* @__PURE__ */ T.forwardRef(function(t, s) {
|
|
2001
|
-
var r, a, n, l;
|
|
2002
|
-
const i = Oe(), c = _o(t, "MuiDesktopDateTimePicker"), u = m({
|
|
2003
|
-
day: Se,
|
|
2004
|
-
month: Se,
|
|
2005
|
-
year: Se,
|
|
2006
|
-
hours: null,
|
|
2007
|
-
minutes: null,
|
|
2008
|
-
seconds: null
|
|
2009
|
-
}, c.viewRenderers), g = (r = c.ampmInClock) != null ? r : !0, d = m({}, c, {
|
|
2010
|
-
viewRenderers: u,
|
|
2011
|
-
yearsPerRow: (a = c.yearsPerRow) != null ? a : 4,
|
|
2012
|
-
ampmInClock: g,
|
|
2013
|
-
slots: m({
|
|
2014
|
-
field: oo,
|
|
2015
|
-
openPickerIcon: ht
|
|
2016
|
-
}, c.slots),
|
|
2017
|
-
slotProps: m({}, c.slotProps, {
|
|
2018
|
-
field: (y) => {
|
|
2019
|
-
var w;
|
|
2020
|
-
return m({}, xo((w = c.slotProps) == null ? void 0 : w.field, y), Do(c), {
|
|
2021
|
-
ref: s,
|
|
2022
|
-
ampm: c.ampm
|
|
2023
|
-
});
|
|
2024
|
-
},
|
|
2025
|
-
toolbar: m({
|
|
2026
|
-
hidden: !0,
|
|
2027
|
-
ampmInClock: g
|
|
2028
|
-
}, (n = c.slotProps) == null ? void 0 : n.toolbar),
|
|
2029
|
-
tabs: m({
|
|
2030
|
-
hidden: !0
|
|
2031
|
-
}, (l = c.slotProps) == null ? void 0 : l.tabs)
|
|
2032
|
-
})
|
|
2033
|
-
}), {
|
|
2034
|
-
renderPicker: h
|
|
2035
|
-
} = Tt({
|
|
2036
|
-
props: d,
|
|
2037
|
-
valueManager: Ze,
|
|
2038
|
-
valueType: "date-time",
|
|
2039
|
-
getOpenDialogAriaText: i.openDatePickerDialogue,
|
|
2040
|
-
validator: eo
|
|
2041
|
-
});
|
|
2042
|
-
return h();
|
|
2043
|
-
});
|
|
2044
|
-
Lo.propTypes = {
|
|
2045
|
-
// ----------------------------- Warning --------------------------------
|
|
2046
|
-
// | These PropTypes are generated from the TypeScript type definitions |
|
|
2047
|
-
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
|
2048
|
-
// ----------------------------------------------------------------------
|
|
2049
|
-
/**
|
|
2050
|
-
* 12h/24h view for hour selection clock.
|
|
2051
|
-
* @default `utils.is12HourCycleInCurrentLocale()`
|
|
2052
|
-
*/
|
|
2053
|
-
ampm: e.bool,
|
|
2054
|
-
/**
|
|
2055
|
-
* Display ampm controls under the clock (instead of in the toolbar).
|
|
2056
|
-
* @default true on desktop, false on mobile
|
|
2057
|
-
*/
|
|
2058
|
-
ampmInClock: e.bool,
|
|
2059
|
-
/**
|
|
2060
|
-
* If `true`, the main element is focused during the first mount.
|
|
2061
|
-
* This main element is:
|
|
2062
|
-
* - the element chosen by the visible view if any (i.e: the selected day on the `day` view).
|
|
2063
|
-
* - the `input` element if there is a field rendered.
|
|
2064
|
-
*/
|
|
2065
|
-
autoFocus: e.bool,
|
|
2066
|
-
/**
|
|
2067
|
-
* Class name applied to the root element.
|
|
2068
|
-
*/
|
|
2069
|
-
className: e.string,
|
|
2070
|
-
/**
|
|
2071
|
-
* If `true`, the popover or modal will close after submitting the full date.
|
|
2072
|
-
* @default `true` for desktop, `false` for mobile (based on the chosen wrapper and `desktopModeMediaQuery` prop).
|
|
2073
|
-
*/
|
|
2074
|
-
closeOnSelect: e.bool,
|
|
2075
|
-
/**
|
|
2076
|
-
* Overridable components.
|
|
2077
|
-
* @default {}
|
|
2078
|
-
* @deprecated Please use `slots`.
|
|
2079
|
-
*/
|
|
2080
|
-
components: e.object,
|
|
2081
|
-
/**
|
|
2082
|
-
* The props used for each component slot.
|
|
2083
|
-
* @default {}
|
|
2084
|
-
* @deprecated Please use `slotProps`.
|
|
2085
|
-
*/
|
|
2086
|
-
componentsProps: e.object,
|
|
2087
|
-
/**
|
|
2088
|
-
* Formats the day of week displayed in the calendar header.
|
|
2089
|
-
* @param {string} day The day of week provided by the adapter's method `getWeekdays`.
|
|
2090
|
-
* @returns {string} The name to display.
|
|
2091
|
-
* @default (day) => day.charAt(0).toUpperCase()
|
|
2092
|
-
*/
|
|
2093
|
-
dayOfWeekFormatter: e.func,
|
|
2094
|
-
/**
|
|
2095
|
-
* Default calendar month displayed when `value={null}`.
|
|
2096
|
-
*/
|
|
2097
|
-
defaultCalendarMonth: e.any,
|
|
2098
|
-
/**
|
|
2099
|
-
* The default value.
|
|
2100
|
-
* Used when the component is not controlled.
|
|
2101
|
-
*/
|
|
2102
|
-
defaultValue: e.any,
|
|
2103
|
-
/**
|
|
2104
|
-
* If `true`, the picker and text field are disabled.
|
|
2105
|
-
* @default false
|
|
2106
|
-
*/
|
|
2107
|
-
disabled: e.bool,
|
|
2108
|
-
/**
|
|
2109
|
-
* If `true`, disable values after the current date for date components, time for time components and both for date time components.
|
|
2110
|
-
* @default false
|
|
2111
|
-
*/
|
|
2112
|
-
disableFuture: e.bool,
|
|
2113
|
-
/**
|
|
2114
|
-
* If `true`, today's date is rendering without highlighting with circle.
|
|
2115
|
-
* @default false
|
|
2116
|
-
*/
|
|
2117
|
-
disableHighlightToday: e.bool,
|
|
2118
|
-
/**
|
|
2119
|
-
* Do not ignore date part when validating min/max time.
|
|
2120
|
-
* @default false
|
|
2121
|
-
*/
|
|
2122
|
-
disableIgnoringDatePartForTimeValidation: e.bool,
|
|
2123
|
-
/**
|
|
2124
|
-
* If `true`, the open picker button will not be rendered (renders only the field).
|
|
2125
|
-
* @default false
|
|
2126
|
-
*/
|
|
2127
|
-
disableOpenPicker: e.bool,
|
|
2128
|
-
/**
|
|
2129
|
-
* If `true`, disable values before the current date for date components, time for time components and both for date time components.
|
|
2130
|
-
* @default false
|
|
2131
|
-
*/
|
|
2132
|
-
disablePast: e.bool,
|
|
2133
|
-
/**
|
|
2134
|
-
* If `true`, the week number will be display in the calendar.
|
|
2135
|
-
*/
|
|
2136
|
-
displayWeekNumber: e.bool,
|
|
2137
|
-
/**
|
|
2138
|
-
* Calendar will show more weeks in order to match this value.
|
|
2139
|
-
* Put it to 6 for having fix number of week in Gregorian calendars
|
|
2140
|
-
* @default undefined
|
|
2141
|
-
*/
|
|
2142
|
-
fixedWeekNumber: e.number,
|
|
2143
|
-
/**
|
|
2144
|
-
* Format of the date when rendered in the input(s).
|
|
2145
|
-
* Defaults to localized format based on the used `views`.
|
|
2146
|
-
*/
|
|
2147
|
-
format: e.string,
|
|
2148
|
-
/**
|
|
2149
|
-
* Density of the format when rendered in the input.
|
|
2150
|
-
* Setting `formatDensity` to `"spacious"` will add a space before and after each `/`, `-` and `.` character.
|
|
2151
|
-
* @default "dense"
|
|
2152
|
-
*/
|
|
2153
|
-
formatDensity: e.oneOf(["dense", "spacious"]),
|
|
2154
|
-
/**
|
|
2155
|
-
* Pass a ref to the `input` element.
|
|
2156
|
-
*/
|
|
2157
|
-
inputRef: e.oneOfType([e.func, e.shape({
|
|
2158
|
-
current: e.object
|
|
2159
|
-
})]),
|
|
2160
|
-
/**
|
|
2161
|
-
* The label content.
|
|
2162
|
-
*/
|
|
2163
|
-
label: e.node,
|
|
2164
|
-
/**
|
|
2165
|
-
* If `true`, calls `renderLoading` instead of rendering the day calendar.
|
|
2166
|
-
* Can be used to preload information and show it in calendar.
|
|
2167
|
-
* @default false
|
|
2168
|
-
*/
|
|
2169
|
-
loading: e.bool,
|
|
2170
|
-
/**
|
|
2171
|
-
* Locale for components texts.
|
|
2172
|
-
* Allows overriding texts coming from `LocalizationProvider` and `theme`.
|
|
2173
|
-
*/
|
|
2174
|
-
localeText: e.object,
|
|
2175
|
-
/**
|
|
2176
|
-
* Maximal selectable date.
|
|
2177
|
-
*/
|
|
2178
|
-
maxDate: e.any,
|
|
2179
|
-
/**
|
|
2180
|
-
* Maximal selectable moment of time with binding to date, to set max time in each day use `maxTime`.
|
|
2181
|
-
*/
|
|
2182
|
-
maxDateTime: e.any,
|
|
2183
|
-
/**
|
|
2184
|
-
* Maximal selectable time.
|
|
2185
|
-
* The date part of the object will be ignored unless `props.disableIgnoringDatePartForTimeValidation === true`.
|
|
2186
|
-
*/
|
|
2187
|
-
maxTime: e.any,
|
|
2188
|
-
/**
|
|
2189
|
-
* Minimal selectable date.
|
|
2190
|
-
*/
|
|
2191
|
-
minDate: e.any,
|
|
2192
|
-
/**
|
|
2193
|
-
* Minimal selectable moment of time with binding to date, to set min time in each day use `minTime`.
|
|
2194
|
-
*/
|
|
2195
|
-
minDateTime: e.any,
|
|
2196
|
-
/**
|
|
2197
|
-
* Minimal selectable time.
|
|
2198
|
-
* The date part of the object will be ignored unless `props.disableIgnoringDatePartForTimeValidation === true`.
|
|
2199
|
-
*/
|
|
2200
|
-
minTime: e.any,
|
|
2201
|
-
/**
|
|
2202
|
-
* Step over minutes.
|
|
2203
|
-
* @default 1
|
|
2204
|
-
*/
|
|
2205
|
-
minutesStep: e.number,
|
|
2206
|
-
/**
|
|
2207
|
-
* Months rendered per row.
|
|
2208
|
-
* @default 3
|
|
2209
|
-
*/
|
|
2210
|
-
monthsPerRow: e.oneOf([3, 4]),
|
|
2211
|
-
/**
|
|
2212
|
-
* Callback fired when the value is accepted.
|
|
2213
|
-
* @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value.
|
|
2214
|
-
* @param {TValue} value The value that was just accepted.
|
|
2215
|
-
*/
|
|
2216
|
-
onAccept: e.func,
|
|
2217
|
-
/**
|
|
2218
|
-
* Callback fired when the value changes.
|
|
2219
|
-
* @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value.
|
|
2220
|
-
* @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value.
|
|
2221
|
-
* @param {TValue} value The new value.
|
|
2222
|
-
* @param {FieldChangeHandlerContext<TError>} context The context containing the validation result of the current value.
|
|
2223
|
-
*/
|
|
2224
|
-
onChange: e.func,
|
|
2225
|
-
/**
|
|
2226
|
-
* Callback fired when the popup requests to be closed.
|
|
2227
|
-
* Use in controlled mode (see `open`).
|
|
2228
|
-
*/
|
|
2229
|
-
onClose: e.func,
|
|
2230
|
-
/**
|
|
2231
|
-
* Callback fired when the error associated to the current value changes.
|
|
2232
|
-
* If the error has a non-null value, then the `TextField` will be rendered in `error` state.
|
|
2233
|
-
*
|
|
2234
|
-
* @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value.
|
|
2235
|
-
* @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value.
|
|
2236
|
-
* @param {TError} error The new error describing why the current value is not valid.
|
|
2237
|
-
* @param {TValue} value The value associated to the error.
|
|
2238
|
-
*/
|
|
2239
|
-
onError: e.func,
|
|
2240
|
-
/**
|
|
2241
|
-
* Callback fired on month change.
|
|
2242
|
-
* @template TDate
|
|
2243
|
-
* @param {TDate} month The new month.
|
|
2244
|
-
*/
|
|
2245
|
-
onMonthChange: e.func,
|
|
2246
|
-
/**
|
|
2247
|
-
* Callback fired when the popup requests to be opened.
|
|
2248
|
-
* Use in controlled mode (see `open`).
|
|
2249
|
-
*/
|
|
2250
|
-
onOpen: e.func,
|
|
2251
|
-
/**
|
|
2252
|
-
* Callback fired when the selected sections change.
|
|
2253
|
-
* @param {FieldSelectedSections} newValue The new selected sections.
|
|
2254
|
-
*/
|
|
2255
|
-
onSelectedSectionsChange: e.func,
|
|
2256
|
-
/**
|
|
2257
|
-
* Callback fired on view change.
|
|
2258
|
-
* @template TView
|
|
2259
|
-
* @param {TView} view The new view.
|
|
2260
|
-
*/
|
|
2261
|
-
onViewChange: e.func,
|
|
2262
|
-
/**
|
|
2263
|
-
* Callback fired on year change.
|
|
2264
|
-
* @template TDate
|
|
2265
|
-
* @param {TDate} year The new year.
|
|
2266
|
-
*/
|
|
2267
|
-
onYearChange: e.func,
|
|
2268
|
-
/**
|
|
2269
|
-
* Control the popup or dialog open state.
|
|
2270
|
-
* @default false
|
|
2271
|
-
*/
|
|
2272
|
-
open: e.bool,
|
|
2273
|
-
/**
|
|
2274
|
-
* The default visible view.
|
|
2275
|
-
* Used when the component view is not controlled.
|
|
2276
|
-
* Must be a valid option from `views` list.
|
|
2277
|
-
*/
|
|
2278
|
-
openTo: e.oneOf(["day", "hours", "minutes", "month", "seconds", "year"]),
|
|
2279
|
-
/**
|
|
2280
|
-
* Force rendering in particular orientation.
|
|
2281
|
-
*/
|
|
2282
|
-
orientation: e.oneOf(["landscape", "portrait"]),
|
|
2283
|
-
readOnly: e.bool,
|
|
2284
|
-
/**
|
|
2285
|
-
* Disable heavy animations.
|
|
2286
|
-
* @default typeof navigator !== 'undefined' && /(android)/i.test(navigator.userAgent)
|
|
2287
|
-
*/
|
|
2288
|
-
reduceAnimations: e.bool,
|
|
2289
|
-
/**
|
|
2290
|
-
* Component displaying when passed `loading` true.
|
|
2291
|
-
* @returns {React.ReactNode} The node to render when loading.
|
|
2292
|
-
* @default () => <span data-mui-test="loading-progress">...</span>
|
|
2293
|
-
*/
|
|
2294
|
-
renderLoading: e.func,
|
|
2295
|
-
/**
|
|
2296
|
-
* The currently selected sections.
|
|
2297
|
-
* This prop accept four formats:
|
|
2298
|
-
* 1. If a number is provided, the section at this index will be selected.
|
|
2299
|
-
* 2. If an object with a `startIndex` and `endIndex` properties are provided, the sections between those two indexes will be selected.
|
|
2300
|
-
* 3. If a string of type `FieldSectionType` is provided, the first section with that name will be selected.
|
|
2301
|
-
* 4. If `null` is provided, no section will be selected
|
|
2302
|
-
* If not provided, the selected sections will be handled internally.
|
|
2303
|
-
*/
|
|
2304
|
-
selectedSections: e.oneOfType([e.oneOf(["all", "day", "hours", "meridiem", "minutes", "month", "seconds", "weekDay", "year"]), e.number, e.shape({
|
|
2305
|
-
endIndex: e.number.isRequired,
|
|
2306
|
-
startIndex: e.number.isRequired
|
|
2307
|
-
})]),
|
|
2308
|
-
/**
|
|
2309
|
-
* Disable specific clock time.
|
|
2310
|
-
* @param {number} clockValue The value to check.
|
|
2311
|
-
* @param {TimeView} view The clock type of the timeValue.
|
|
2312
|
-
* @returns {boolean} If `true` the time will be disabled.
|
|
2313
|
-
* @deprecated Consider using `shouldDisableTime`.
|
|
2314
|
-
*/
|
|
2315
|
-
shouldDisableClock: e.func,
|
|
2316
|
-
/**
|
|
2317
|
-
* Disable specific date.
|
|
2318
|
-
* @template TDate
|
|
2319
|
-
* @param {TDate} day The date to test.
|
|
2320
|
-
* @returns {boolean} If `true` the date will be disabled.
|
|
2321
|
-
*/
|
|
2322
|
-
shouldDisableDate: e.func,
|
|
2323
|
-
/**
|
|
2324
|
-
* Disable specific month.
|
|
2325
|
-
* @template TDate
|
|
2326
|
-
* @param {TDate} month The month to test.
|
|
2327
|
-
* @returns {boolean} If `true`, the month will be disabled.
|
|
2328
|
-
*/
|
|
2329
|
-
shouldDisableMonth: e.func,
|
|
2330
|
-
/**
|
|
2331
|
-
* Disable specific time.
|
|
2332
|
-
* @template TDate
|
|
2333
|
-
* @param {TDate} value The value to check.
|
|
2334
|
-
* @param {TimeView} view The clock type of the timeValue.
|
|
2335
|
-
* @returns {boolean} If `true` the time will be disabled.
|
|
2336
|
-
*/
|
|
2337
|
-
shouldDisableTime: e.func,
|
|
2338
|
-
/**
|
|
2339
|
-
* Disable specific year.
|
|
2340
|
-
* @template TDate
|
|
2341
|
-
* @param {TDate} year The year to test.
|
|
2342
|
-
* @returns {boolean} If `true`, the year will be disabled.
|
|
2343
|
-
*/
|
|
2344
|
-
shouldDisableYear: e.func,
|
|
2345
|
-
/**
|
|
2346
|
-
* If `true`, days outside the current month are rendered:
|
|
2347
|
-
*
|
|
2348
|
-
* - if `fixedWeekNumber` is defined, renders days to have the weeks requested.
|
|
2349
|
-
*
|
|
2350
|
-
* - if `fixedWeekNumber` is not defined, renders day to fill the first and last week of the current month.
|
|
2351
|
-
*
|
|
2352
|
-
* - ignored if `calendars` equals more than `1` on range pickers.
|
|
2353
|
-
* @default false
|
|
2354
|
-
*/
|
|
2355
|
-
showDaysOutsideCurrentMonth: e.bool,
|
|
2356
|
-
/**
|
|
2357
|
-
* The props used for each component slot.
|
|
2358
|
-
* @default {}
|
|
2359
|
-
*/
|
|
2360
|
-
slotProps: e.object,
|
|
2361
|
-
/**
|
|
2362
|
-
* Overridable component slots.
|
|
2363
|
-
* @default {}
|
|
2364
|
-
*/
|
|
2365
|
-
slots: e.object,
|
|
2366
|
-
/**
|
|
2367
|
-
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
2368
|
-
*/
|
|
2369
|
-
sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
|
|
2370
|
-
/**
|
|
2371
|
-
* The selected value.
|
|
2372
|
-
* Used when the component is controlled.
|
|
2373
|
-
*/
|
|
2374
|
-
value: e.any,
|
|
2375
|
-
/**
|
|
2376
|
-
* The visible view.
|
|
2377
|
-
* Used when the component view is controlled.
|
|
2378
|
-
* Must be a valid option from `views` list.
|
|
2379
|
-
*/
|
|
2380
|
-
view: e.oneOf(["day", "hours", "minutes", "month", "seconds", "year"]),
|
|
2381
|
-
/**
|
|
2382
|
-
* Define custom view renderers for each section.
|
|
2383
|
-
* If `null`, the section will only have field editing.
|
|
2384
|
-
* If `undefined`, internally defined view will be the used.
|
|
2385
|
-
*/
|
|
2386
|
-
viewRenderers: e.shape({
|
|
2387
|
-
day: e.func,
|
|
2388
|
-
hours: e.func,
|
|
2389
|
-
minutes: e.func,
|
|
2390
|
-
month: e.func,
|
|
2391
|
-
seconds: e.func,
|
|
2392
|
-
year: e.func
|
|
2393
|
-
}),
|
|
2394
|
-
/**
|
|
2395
|
-
* Available views.
|
|
2396
|
-
*/
|
|
2397
|
-
views: e.arrayOf(e.oneOf(["day", "hours", "minutes", "month", "seconds", "year"]).isRequired),
|
|
2398
|
-
/**
|
|
2399
|
-
* Years rendered per row.
|
|
2400
|
-
* @default 4
|
|
2401
|
-
*/
|
|
2402
|
-
yearsPerRow: e.oneOf([3, 4])
|
|
2403
|
-
};
|
|
2404
|
-
function On(o) {
|
|
2405
|
-
return ne("MuiTimeClock", o);
|
|
2406
|
-
}
|
|
2407
|
-
te("MuiTimeClock", ["root", "arrowSwitcher"]);
|
|
2408
|
-
const Me = 220, he = 36, Ve = {
|
|
2409
|
-
x: Me / 2,
|
|
2410
|
-
y: Me / 2
|
|
2411
|
-
}, jo = {
|
|
2412
|
-
x: Ve.x,
|
|
2413
|
-
y: 0
|
|
2414
|
-
}, Nn = jo.x - Ve.x, In = jo.y - Ve.y, Fn = (o) => o * (180 / Math.PI), zo = (o, t, s) => {
|
|
2415
|
-
const r = t - Ve.x, a = s - Ve.y, n = Math.atan2(Nn, In) - Math.atan2(r, a);
|
|
2416
|
-
let l = Fn(n);
|
|
2417
|
-
l = Math.round(l / o) * o, l %= 360;
|
|
2418
|
-
const i = Math.floor(l / o) || 0, c = r ** 2 + a ** 2, u = Math.sqrt(c);
|
|
2419
|
-
return {
|
|
2420
|
-
value: i,
|
|
2421
|
-
distance: u
|
|
2422
|
-
};
|
|
2423
|
-
}, Bn = (o, t, s = 1) => {
|
|
2424
|
-
const r = s * 6;
|
|
2425
|
-
let {
|
|
2426
|
-
value: a
|
|
2427
|
-
} = zo(r, o, t);
|
|
2428
|
-
return a = a * s % 60, a;
|
|
2429
|
-
}, Vn = (o, t, s) => {
|
|
2430
|
-
const {
|
|
2431
|
-
value: r,
|
|
2432
|
-
distance: a
|
|
2433
|
-
} = zo(30, o, t);
|
|
2434
|
-
let n = r || 12;
|
|
2435
|
-
return s ? n %= 12 : a < Me / 2 - he && (n += 12, n %= 24), n;
|
|
2436
|
-
};
|
|
2437
|
-
function $n(o) {
|
|
2438
|
-
return ne("MuiClockPointer", o);
|
|
2439
|
-
}
|
|
2440
|
-
te("MuiClockPointer", ["root", "thumb"]);
|
|
2441
|
-
const En = ["className", "hasSelected", "isInner", "type", "viewValue"], _n = (o) => {
|
|
2442
|
-
const {
|
|
2443
|
-
classes: t
|
|
2444
|
-
} = o;
|
|
2445
|
-
return oe({
|
|
2446
|
-
root: ["root"],
|
|
2447
|
-
thumb: ["thumb"]
|
|
2448
|
-
}, $n, t);
|
|
2449
|
-
}, Ln = M("div", {
|
|
2450
|
-
name: "MuiClockPointer",
|
|
2451
|
-
slot: "Root",
|
|
2452
|
-
overridesResolver: (o, t) => t.root
|
|
2453
|
-
})(({
|
|
2454
|
-
theme: o,
|
|
2455
|
-
ownerState: t
|
|
2456
|
-
}) => m({
|
|
2457
|
-
width: 2,
|
|
2458
|
-
backgroundColor: (o.vars || o).palette.primary.main,
|
|
2459
|
-
position: "absolute",
|
|
2460
|
-
left: "calc(50% - 1px)",
|
|
2461
|
-
bottom: "50%",
|
|
2462
|
-
transformOrigin: "center bottom 0px"
|
|
2463
|
-
}, t.shouldAnimate && {
|
|
2464
|
-
transition: o.transitions.create(["transform", "height"])
|
|
2465
|
-
})), jn = M("div", {
|
|
2466
|
-
name: "MuiClockPointer",
|
|
2467
|
-
slot: "Thumb",
|
|
2468
|
-
overridesResolver: (o, t) => t.thumb
|
|
2469
|
-
})(({
|
|
2470
|
-
theme: o,
|
|
2471
|
-
ownerState: t
|
|
2472
|
-
}) => m({
|
|
2473
|
-
width: 4,
|
|
2474
|
-
height: 4,
|
|
2475
|
-
backgroundColor: (o.vars || o).palette.primary.contrastText,
|
|
2476
|
-
borderRadius: "50%",
|
|
2477
|
-
position: "absolute",
|
|
2478
|
-
top: -21,
|
|
2479
|
-
left: `calc(50% - ${he / 2}px)`,
|
|
2480
|
-
border: `${(he - 4) / 2}px solid ${(o.vars || o).palette.primary.main}`,
|
|
2481
|
-
boxSizing: "content-box"
|
|
2482
|
-
}, t.hasSelected && {
|
|
2483
|
-
backgroundColor: (o.vars || o).palette.primary.main
|
|
2484
|
-
}));
|
|
2485
|
-
function zn(o) {
|
|
2486
|
-
const t = Q({
|
|
2487
|
-
props: o,
|
|
2488
|
-
name: "MuiClockPointer"
|
|
2489
|
-
}), {
|
|
2490
|
-
className: s,
|
|
2491
|
-
isInner: r,
|
|
2492
|
-
type: a,
|
|
2493
|
-
viewValue: n
|
|
2494
|
-
} = t, l = X(t, En), i = T.useRef(a);
|
|
2495
|
-
T.useEffect(() => {
|
|
2496
|
-
i.current = a;
|
|
2497
|
-
}, [a]);
|
|
2498
|
-
const c = m({}, t, {
|
|
2499
|
-
shouldAnimate: i.current !== a
|
|
2500
|
-
}), u = _n(c);
|
|
2501
|
-
return /* @__PURE__ */ p(Ln, m({
|
|
2502
|
-
style: (() => {
|
|
2503
|
-
let h = 360 / (a === "hours" ? 12 : 60) * n;
|
|
2504
|
-
return a === "hours" && n > 12 && (h -= 360), {
|
|
2505
|
-
height: Math.round((r ? 0.26 : 0.4) * Me),
|
|
2506
|
-
transform: `rotateZ(${h}deg)`
|
|
2507
|
-
};
|
|
2508
|
-
})(),
|
|
2509
|
-
className: Re(s, u.root),
|
|
2510
|
-
ownerState: c
|
|
2511
|
-
}, l, {
|
|
2512
|
-
children: /* @__PURE__ */ p(jn, {
|
|
2513
|
-
ownerState: c,
|
|
2514
|
-
className: u.thumb
|
|
2515
|
-
})
|
|
2516
|
-
}));
|
|
2517
|
-
}
|
|
2518
|
-
function Wn(o) {
|
|
2519
|
-
return ne("MuiClock", o);
|
|
2520
|
-
}
|
|
2521
|
-
te("MuiClock", ["root", "clock", "wrapper", "squareMask", "pin", "amButton", "pmButton"]);
|
|
2522
|
-
const An = (o) => {
|
|
2523
|
-
const {
|
|
2524
|
-
classes: t
|
|
2525
|
-
} = o;
|
|
2526
|
-
return oe({
|
|
2527
|
-
root: ["root"],
|
|
2528
|
-
clock: ["clock"],
|
|
2529
|
-
wrapper: ["wrapper"],
|
|
2530
|
-
squareMask: ["squareMask"],
|
|
2531
|
-
pin: ["pin"],
|
|
2532
|
-
amButton: ["amButton"],
|
|
2533
|
-
pmButton: ["pmButton"]
|
|
2534
|
-
}, Wn, t);
|
|
2535
|
-
}, Hn = M("div", {
|
|
2536
|
-
name: "MuiClock",
|
|
2537
|
-
slot: "Root",
|
|
2538
|
-
overridesResolver: (o, t) => t.root
|
|
2539
|
-
})(({
|
|
2540
|
-
theme: o
|
|
2541
|
-
}) => ({
|
|
2542
|
-
display: "flex",
|
|
2543
|
-
justifyContent: "center",
|
|
2544
|
-
alignItems: "center",
|
|
2545
|
-
margin: o.spacing(2)
|
|
2546
|
-
})), Yn = M("div", {
|
|
2547
|
-
name: "MuiClock",
|
|
2548
|
-
slot: "Clock",
|
|
2549
|
-
overridesResolver: (o, t) => t.clock
|
|
2550
|
-
})({
|
|
2551
|
-
backgroundColor: "rgba(0,0,0,.07)",
|
|
2552
|
-
borderRadius: "50%",
|
|
2553
|
-
height: 220,
|
|
2554
|
-
width: 220,
|
|
2555
|
-
flexShrink: 0,
|
|
2556
|
-
position: "relative",
|
|
2557
|
-
pointerEvents: "none"
|
|
2558
|
-
}), Un = M("div", {
|
|
2559
|
-
name: "MuiClock",
|
|
2560
|
-
slot: "Wrapper",
|
|
2561
|
-
overridesResolver: (o, t) => t.wrapper
|
|
2562
|
-
})({
|
|
2563
|
-
"&:focus": {
|
|
2564
|
-
outline: "none"
|
|
2565
|
-
}
|
|
2566
|
-
}), qn = M("div", {
|
|
2567
|
-
name: "MuiClock",
|
|
2568
|
-
slot: "SquareMask",
|
|
2569
|
-
overridesResolver: (o, t) => t.squareMask
|
|
2570
|
-
})(({
|
|
2571
|
-
ownerState: o
|
|
2572
|
-
}) => m({
|
|
2573
|
-
width: "100%",
|
|
2574
|
-
height: "100%",
|
|
2575
|
-
position: "absolute",
|
|
2576
|
-
pointerEvents: "auto",
|
|
2577
|
-
outline: 0,
|
|
2578
|
-
// Disable scroll capabilities.
|
|
2579
|
-
touchAction: "none",
|
|
2580
|
-
userSelect: "none"
|
|
2581
|
-
}, o.disabled ? {} : {
|
|
2582
|
-
"@media (pointer: fine)": {
|
|
2583
|
-
cursor: "pointer",
|
|
2584
|
-
borderRadius: "50%"
|
|
2585
|
-
},
|
|
2586
|
-
"&:active": {
|
|
2587
|
-
cursor: "move"
|
|
2588
|
-
}
|
|
2589
|
-
})), Kn = M("div", {
|
|
2590
|
-
name: "MuiClock",
|
|
2591
|
-
slot: "Pin",
|
|
2592
|
-
overridesResolver: (o, t) => t.pin
|
|
2593
|
-
})(({
|
|
2594
|
-
theme: o
|
|
2595
|
-
}) => ({
|
|
2596
|
-
width: 6,
|
|
2597
|
-
height: 6,
|
|
2598
|
-
borderRadius: "50%",
|
|
2599
|
-
backgroundColor: (o.vars || o).palette.primary.main,
|
|
2600
|
-
position: "absolute",
|
|
2601
|
-
top: "50%",
|
|
2602
|
-
left: "50%",
|
|
2603
|
-
transform: "translate(-50%, -50%)"
|
|
2604
|
-
})), Xn = M(Mo, {
|
|
2605
|
-
name: "MuiClock",
|
|
2606
|
-
slot: "AmButton",
|
|
2607
|
-
overridesResolver: (o, t) => t.amButton
|
|
2608
|
-
})(({
|
|
2609
|
-
theme: o,
|
|
2610
|
-
ownerState: t
|
|
2611
|
-
}) => m({
|
|
2612
|
-
zIndex: 1,
|
|
2613
|
-
position: "absolute",
|
|
2614
|
-
bottom: 8,
|
|
2615
|
-
left: 8
|
|
2616
|
-
}, t.meridiemMode === "am" && {
|
|
2617
|
-
backgroundColor: (o.vars || o).palette.primary.main,
|
|
2618
|
-
color: (o.vars || o).palette.primary.contrastText,
|
|
2619
|
-
"&:hover": {
|
|
2620
|
-
backgroundColor: (o.vars || o).palette.primary.light
|
|
2621
|
-
}
|
|
2622
|
-
})), Gn = M(Mo, {
|
|
2623
|
-
name: "MuiClock",
|
|
2624
|
-
slot: "PmButton",
|
|
2625
|
-
overridesResolver: (o, t) => t.pmButton
|
|
2626
|
-
})(({
|
|
2627
|
-
theme: o,
|
|
2628
|
-
ownerState: t
|
|
2629
|
-
}) => m({
|
|
2630
|
-
zIndex: 1,
|
|
2631
|
-
position: "absolute",
|
|
2632
|
-
bottom: 8,
|
|
2633
|
-
right: 8
|
|
2634
|
-
}, t.meridiemMode === "pm" && {
|
|
2635
|
-
backgroundColor: (o.vars || o).palette.primary.main,
|
|
2636
|
-
color: (o.vars || o).palette.primary.contrastText,
|
|
2637
|
-
"&:hover": {
|
|
2638
|
-
backgroundColor: (o.vars || o).palette.primary.light
|
|
2639
|
-
}
|
|
2640
|
-
}));
|
|
2641
|
-
function Qn(o) {
|
|
2642
|
-
const t = Q({
|
|
2643
|
-
props: o,
|
|
2644
|
-
name: "MuiClock"
|
|
2645
|
-
}), {
|
|
2646
|
-
ampm: s,
|
|
2647
|
-
ampmInClock: r,
|
|
2648
|
-
autoFocus: a,
|
|
2649
|
-
children: n,
|
|
2650
|
-
value: l,
|
|
2651
|
-
handleMeridiemChange: i,
|
|
2652
|
-
isTimeDisabled: c,
|
|
2653
|
-
meridiemMode: u,
|
|
2654
|
-
minutesStep: g = 1,
|
|
2655
|
-
onChange: d,
|
|
2656
|
-
selectedId: h,
|
|
2657
|
-
type: y,
|
|
2658
|
-
viewValue: w,
|
|
2659
|
-
disabled: b,
|
|
2660
|
-
readOnly: C,
|
|
2661
|
-
className: F
|
|
2662
|
-
} = t, S = t, B = $e(), I = Oe(), O = T.useRef(!1), x = An(S), V = c(w, y), _ = !s && y === "hours" && (w < 1 || w > 12), $ = (k, de) => {
|
|
2663
|
-
b || C || c(k, y) || d(k, de);
|
|
2664
|
-
}, A = (k, de) => {
|
|
2665
|
-
let {
|
|
2666
|
-
offsetX: ue,
|
|
2667
|
-
offsetY: H
|
|
2668
|
-
} = k;
|
|
2669
|
-
if (ue === void 0) {
|
|
2670
|
-
const J = k.target.getBoundingClientRect();
|
|
2671
|
-
ue = k.changedTouches[0].clientX - J.left, H = k.changedTouches[0].clientY - J.top;
|
|
2672
|
-
}
|
|
2673
|
-
const xe = y === "seconds" || y === "minutes" ? Bn(ue, H, g) : Vn(ue, H, !!s);
|
|
2674
|
-
$(xe, de);
|
|
2675
|
-
}, L = (k) => {
|
|
2676
|
-
O.current = !0, A(k, "shallow");
|
|
2677
|
-
}, j = (k) => {
|
|
2678
|
-
O.current && (A(k, "finish"), O.current = !1);
|
|
2679
|
-
}, se = (k) => {
|
|
2680
|
-
k.buttons > 0 && A(k.nativeEvent, "shallow");
|
|
2681
|
-
}, ae = (k) => {
|
|
2682
|
-
O.current && (O.current = !1), A(k.nativeEvent, "finish");
|
|
2683
|
-
}, ie = T.useMemo(() => y === "hours" ? !0 : w % 5 === 0, [y, w]), ce = y === "minutes" ? g : 1, G = T.useRef(null);
|
|
2684
|
-
Ot(() => {
|
|
2685
|
-
a && G.current.focus();
|
|
2686
|
-
}, [a]);
|
|
2687
|
-
const re = (k) => {
|
|
2688
|
-
if (!O.current)
|
|
2689
|
-
switch (k.key) {
|
|
2690
|
-
case "Home":
|
|
2691
|
-
$(0, "partial"), k.preventDefault();
|
|
2692
|
-
break;
|
|
2693
|
-
case "End":
|
|
2694
|
-
$(y === "minutes" ? 59 : 23, "partial"), k.preventDefault();
|
|
2695
|
-
break;
|
|
2696
|
-
case "ArrowUp":
|
|
2697
|
-
$(w + ce, "partial"), k.preventDefault();
|
|
2698
|
-
break;
|
|
2699
|
-
case "ArrowDown":
|
|
2700
|
-
$(w - ce, "partial"), k.preventDefault();
|
|
2701
|
-
break;
|
|
2702
|
-
}
|
|
2703
|
-
};
|
|
2704
|
-
return /* @__PURE__ */ R(Hn, {
|
|
2705
|
-
className: Re(F, x.root),
|
|
2706
|
-
children: [/* @__PURE__ */ R(Yn, {
|
|
2707
|
-
className: x.clock,
|
|
2708
|
-
children: [/* @__PURE__ */ p(qn, {
|
|
2709
|
-
onTouchMove: L,
|
|
2710
|
-
onTouchEnd: j,
|
|
2711
|
-
onMouseUp: ae,
|
|
2712
|
-
onMouseMove: se,
|
|
2713
|
-
ownerState: {
|
|
2714
|
-
disabled: b
|
|
2715
|
-
},
|
|
2716
|
-
className: x.squareMask
|
|
2717
|
-
}), !V && /* @__PURE__ */ R(T.Fragment, {
|
|
2718
|
-
children: [/* @__PURE__ */ p(Kn, {
|
|
2719
|
-
className: x.pin
|
|
2720
|
-
}), l != null && /* @__PURE__ */ p(zn, {
|
|
2721
|
-
type: y,
|
|
2722
|
-
viewValue: w,
|
|
2723
|
-
isInner: _,
|
|
2724
|
-
hasSelected: ie
|
|
2725
|
-
})]
|
|
2726
|
-
}), /* @__PURE__ */ p(Un, {
|
|
2727
|
-
"aria-activedescendant": h,
|
|
2728
|
-
"aria-label": I.clockLabelText(y, l, B),
|
|
2729
|
-
ref: G,
|
|
2730
|
-
role: "listbox",
|
|
2731
|
-
onKeyDown: re,
|
|
2732
|
-
tabIndex: 0,
|
|
2733
|
-
className: x.wrapper,
|
|
2734
|
-
children: n
|
|
2735
|
-
})]
|
|
2736
|
-
}), s && r && /* @__PURE__ */ R(T.Fragment, {
|
|
2737
|
-
children: [/* @__PURE__ */ p(Xn, {
|
|
2738
|
-
onClick: C ? void 0 : () => i("am"),
|
|
2739
|
-
disabled: b || u === null,
|
|
2740
|
-
ownerState: S,
|
|
2741
|
-
className: x.amButton,
|
|
2742
|
-
children: /* @__PURE__ */ p(Ge, {
|
|
2743
|
-
variant: "caption",
|
|
2744
|
-
children: "AM"
|
|
2745
|
-
})
|
|
2746
|
-
}), /* @__PURE__ */ p(Gn, {
|
|
2747
|
-
disabled: b || u === null,
|
|
2748
|
-
onClick: C ? void 0 : () => i("pm"),
|
|
2749
|
-
ownerState: S,
|
|
2750
|
-
className: x.pmButton,
|
|
2751
|
-
children: /* @__PURE__ */ p(Ge, {
|
|
2752
|
-
variant: "caption",
|
|
2753
|
-
children: "PM"
|
|
2754
|
-
})
|
|
2755
|
-
})]
|
|
2756
|
-
})]
|
|
2757
|
-
});
|
|
2758
|
-
}
|
|
2759
|
-
function Zn(o) {
|
|
2760
|
-
return ne("MuiClockNumber", o);
|
|
2761
|
-
}
|
|
2762
|
-
const We = te("MuiClockNumber", ["root", "selected", "disabled"]), Jn = ["className", "disabled", "index", "inner", "label", "selected"], es = (o) => {
|
|
2763
|
-
const {
|
|
2764
|
-
classes: t,
|
|
2765
|
-
selected: s,
|
|
2766
|
-
disabled: r
|
|
2767
|
-
} = o;
|
|
2768
|
-
return oe({
|
|
2769
|
-
root: ["root", s && "selected", r && "disabled"]
|
|
2770
|
-
}, Zn, t);
|
|
2771
|
-
}, os = M("span", {
|
|
2772
|
-
name: "MuiClockNumber",
|
|
2773
|
-
slot: "Root",
|
|
2774
|
-
overridesResolver: (o, t) => [t.root, {
|
|
2775
|
-
[`&.${We.disabled}`]: t.disabled
|
|
2776
|
-
}, {
|
|
2777
|
-
[`&.${We.selected}`]: t.selected
|
|
2778
|
-
}]
|
|
2779
|
-
})(({
|
|
2780
|
-
theme: o,
|
|
2781
|
-
ownerState: t
|
|
2782
|
-
}) => m({
|
|
2783
|
-
height: he,
|
|
2784
|
-
width: he,
|
|
2785
|
-
position: "absolute",
|
|
2786
|
-
left: `calc((100% - ${he}px) / 2)`,
|
|
2787
|
-
display: "inline-flex",
|
|
2788
|
-
justifyContent: "center",
|
|
2789
|
-
alignItems: "center",
|
|
2790
|
-
borderRadius: "50%",
|
|
2791
|
-
color: (o.vars || o).palette.text.primary,
|
|
2792
|
-
fontFamily: o.typography.fontFamily,
|
|
2793
|
-
"&:focused": {
|
|
2794
|
-
backgroundColor: (o.vars || o).palette.background.paper
|
|
2795
|
-
},
|
|
2796
|
-
[`&.${We.selected}`]: {
|
|
2797
|
-
color: (o.vars || o).palette.primary.contrastText
|
|
2798
|
-
},
|
|
2799
|
-
[`&.${We.disabled}`]: {
|
|
2800
|
-
pointerEvents: "none",
|
|
2801
|
-
color: (o.vars || o).palette.text.disabled
|
|
2802
|
-
}
|
|
2803
|
-
}, t.inner && m({}, o.typography.body2, {
|
|
2804
|
-
color: (o.vars || o).palette.text.secondary
|
|
2805
|
-
})));
|
|
2806
|
-
function Wo(o) {
|
|
2807
|
-
const t = Q({
|
|
2808
|
-
props: o,
|
|
2809
|
-
name: "MuiClockNumber"
|
|
2810
|
-
}), {
|
|
2811
|
-
className: s,
|
|
2812
|
-
disabled: r,
|
|
2813
|
-
index: a,
|
|
2814
|
-
inner: n,
|
|
2815
|
-
label: l,
|
|
2816
|
-
selected: i
|
|
2817
|
-
} = t, c = X(t, Jn), u = t, g = es(u), d = a % 12 / 12 * Math.PI * 2 - Math.PI / 2, h = (Me - he - 2) / 2 * (n ? 0.65 : 1), y = Math.round(Math.cos(d) * h), w = Math.round(Math.sin(d) * h);
|
|
2818
|
-
return /* @__PURE__ */ p(os, m({
|
|
2819
|
-
className: Re(s, g.root),
|
|
2820
|
-
"aria-disabled": r ? !0 : void 0,
|
|
2821
|
-
"aria-selected": i ? !0 : void 0,
|
|
2822
|
-
role: "option",
|
|
2823
|
-
style: {
|
|
2824
|
-
transform: `translate(${y}px, ${w + (Me - he) / 2}px`
|
|
2825
|
-
},
|
|
2826
|
-
ownerState: u
|
|
2827
|
-
}, c, {
|
|
2828
|
-
children: l
|
|
2829
|
-
}));
|
|
2830
|
-
}
|
|
2831
|
-
const ts = ({
|
|
2832
|
-
ampm: o,
|
|
2833
|
-
value: t,
|
|
2834
|
-
getClockNumberText: s,
|
|
2835
|
-
isDisabled: r,
|
|
2836
|
-
selectedId: a,
|
|
2837
|
-
utils: n
|
|
2838
|
-
}) => {
|
|
2839
|
-
const l = t ? n.getHours(t) : null, i = [], c = o ? 1 : 0, u = o ? 12 : 23, g = (d) => l === null ? !1 : o ? d === 12 ? l === 12 || l === 0 : l === d || l - 12 === d : l === d;
|
|
2840
|
-
for (let d = c; d <= u; d += 1) {
|
|
2841
|
-
let h = d.toString();
|
|
2842
|
-
d === 0 && (h = "00");
|
|
2843
|
-
const y = !o && (d === 0 || d > 12);
|
|
2844
|
-
h = n.formatNumber(h);
|
|
2845
|
-
const w = g(d);
|
|
2846
|
-
i.push(/* @__PURE__ */ p(Wo, {
|
|
2847
|
-
id: w ? a : void 0,
|
|
2848
|
-
index: d,
|
|
2849
|
-
inner: y,
|
|
2850
|
-
selected: w,
|
|
2851
|
-
disabled: r(d),
|
|
2852
|
-
label: h,
|
|
2853
|
-
"aria-label": s(h)
|
|
2854
|
-
}, d));
|
|
2855
|
-
}
|
|
2856
|
-
return i;
|
|
2857
|
-
}, To = ({
|
|
2858
|
-
utils: o,
|
|
2859
|
-
value: t,
|
|
2860
|
-
isDisabled: s,
|
|
2861
|
-
getClockNumberText: r,
|
|
2862
|
-
selectedId: a
|
|
2863
|
-
}) => {
|
|
2864
|
-
const n = o.formatNumber;
|
|
2865
|
-
return [[5, n("05")], [10, n("10")], [15, n("15")], [20, n("20")], [25, n("25")], [30, n("30")], [35, n("35")], [40, n("40")], [45, n("45")], [50, n("50")], [55, n("55")], [0, n("00")]].map(([l, i], c) => {
|
|
2866
|
-
const u = l === t;
|
|
2867
|
-
return /* @__PURE__ */ p(Wo, {
|
|
2868
|
-
label: i,
|
|
2869
|
-
id: u ? a : void 0,
|
|
2870
|
-
index: c + 1,
|
|
2871
|
-
inner: !1,
|
|
2872
|
-
disabled: s(l),
|
|
2873
|
-
selected: u,
|
|
2874
|
-
"aria-label": r(i)
|
|
2875
|
-
}, l);
|
|
2876
|
-
});
|
|
2877
|
-
}, ns = ["ampm", "ampmInClock", "autoFocus", "components", "componentsProps", "slots", "slotProps", "value", "disableIgnoringDatePartForTimeValidation", "maxTime", "minTime", "disableFuture", "disablePast", "minutesStep", "shouldDisableClock", "shouldDisableTime", "showViewSwitcher", "onChange", "defaultValue", "view", "views", "openTo", "onViewChange", "focusedView", "onFocusedViewChange", "className", "disabled", "readOnly"], ss = (o) => {
|
|
2878
|
-
const {
|
|
2879
|
-
classes: t
|
|
2880
|
-
} = o;
|
|
2881
|
-
return oe({
|
|
2882
|
-
root: ["root"],
|
|
2883
|
-
arrowSwitcher: ["arrowSwitcher"]
|
|
2884
|
-
}, On, t);
|
|
2885
|
-
}, as = M(yt, {
|
|
2886
|
-
name: "MuiTimeClock",
|
|
2887
|
-
slot: "Root",
|
|
2888
|
-
overridesResolver: (o, t) => t.root
|
|
2889
|
-
})({
|
|
2890
|
-
display: "flex",
|
|
2891
|
-
flexDirection: "column",
|
|
2892
|
-
position: "relative"
|
|
2893
|
-
}), rs = M(gt, {
|
|
2894
|
-
name: "MuiTimeClock",
|
|
2895
|
-
slot: "ArrowSwitcher",
|
|
2896
|
-
overridesResolver: (o, t) => t.arrowSwitcher
|
|
2897
|
-
})({
|
|
2898
|
-
position: "absolute",
|
|
2899
|
-
right: 12,
|
|
2900
|
-
top: 15
|
|
2901
|
-
}), Ao = /* @__PURE__ */ T.forwardRef(function(t, s) {
|
|
2902
|
-
const r = Oe(), a = vt(), n = $e(), l = Q({
|
|
2903
|
-
props: t,
|
|
2904
|
-
name: "MuiTimeClock"
|
|
2905
|
-
}), {
|
|
2906
|
-
ampm: i = n.is12HourCycleInCurrentLocale(),
|
|
2907
|
-
ampmInClock: c = !1,
|
|
2908
|
-
autoFocus: u,
|
|
2909
|
-
components: g,
|
|
2910
|
-
componentsProps: d,
|
|
2911
|
-
slots: h,
|
|
2912
|
-
slotProps: y,
|
|
2913
|
-
value: w,
|
|
2914
|
-
disableIgnoringDatePartForTimeValidation: b = !1,
|
|
2915
|
-
maxTime: C,
|
|
2916
|
-
minTime: F,
|
|
2917
|
-
disableFuture: S,
|
|
2918
|
-
disablePast: B,
|
|
2919
|
-
minutesStep: I = 1,
|
|
2920
|
-
shouldDisableClock: O,
|
|
2921
|
-
shouldDisableTime: x,
|
|
2922
|
-
showViewSwitcher: V,
|
|
2923
|
-
onChange: _,
|
|
2924
|
-
defaultValue: $,
|
|
2925
|
-
view: A,
|
|
2926
|
-
views: L = ["hours", "minutes"],
|
|
2927
|
-
openTo: j,
|
|
2928
|
-
onViewChange: se,
|
|
2929
|
-
focusedView: ae,
|
|
2930
|
-
onFocusedViewChange: ie,
|
|
2931
|
-
className: ce,
|
|
2932
|
-
disabled: G,
|
|
2933
|
-
readOnly: re
|
|
2934
|
-
} = l, k = X(l, ns), de = h ?? Co(g), ue = y ?? d, [H, xe] = Bt({
|
|
2935
|
-
name: "DateCalendar",
|
|
2936
|
-
state: "value",
|
|
2937
|
-
controlled: w,
|
|
2938
|
-
default: $ ?? null
|
|
2939
|
-
}), J = Ae((z, W) => {
|
|
2940
|
-
xe(z), _ == null || _(z, W);
|
|
2941
|
-
}), {
|
|
2942
|
-
view: Ne,
|
|
2943
|
-
setView: Ie,
|
|
2944
|
-
previousView: Ee,
|
|
2945
|
-
nextView: Te,
|
|
2946
|
-
setValueAndGoToNextView: q
|
|
2947
|
-
} = Ct({
|
|
2948
|
-
view: A,
|
|
2949
|
-
views: L,
|
|
2950
|
-
openTo: j,
|
|
2951
|
-
onViewChange: se,
|
|
2952
|
-
onChange: J,
|
|
2953
|
-
focusedView: ae,
|
|
2954
|
-
onFocusedViewChange: ie
|
|
2955
|
-
}), E = T.useMemo(() => H || n.setSeconds(n.setMinutes(n.setHours(a, 0), 0), 0), [H, a, n]), {
|
|
2956
|
-
meridiemMode: me,
|
|
2957
|
-
handleMeridiemChange: ye
|
|
2958
|
-
} = vo(E, i, q), le = T.useCallback((z, W) => {
|
|
2959
|
-
const Y = yo(b, n), K = W === "hours" || W === "minutes" && L.includes("seconds"), ge = ({
|
|
2960
|
-
start: N,
|
|
2961
|
-
end: Z
|
|
2962
|
-
}) => !(F && Y(F, Z) || C && Y(N, C) || S && Y(N, a) || B && Y(a, K ? Z : N)), De = (N, Z = 1) => {
|
|
2963
|
-
if (N % Z !== 0 || O != null && O(N, W))
|
|
2964
|
-
return !1;
|
|
2965
|
-
if (x)
|
|
2966
|
-
switch (W) {
|
|
2967
|
-
case "hours":
|
|
2968
|
-
return !x(n.setHours(E, N), "hours");
|
|
2969
|
-
case "minutes":
|
|
2970
|
-
return !x(n.setMinutes(E, N), "minutes");
|
|
2971
|
-
case "seconds":
|
|
2972
|
-
return !x(n.setSeconds(E, N), "seconds");
|
|
2973
|
-
default:
|
|
2974
|
-
return !1;
|
|
2975
|
-
}
|
|
2976
|
-
return !0;
|
|
2977
|
-
};
|
|
2978
|
-
switch (W) {
|
|
2979
|
-
case "hours": {
|
|
2980
|
-
const N = ro(z, me, i), Z = n.setHours(E, N), we = n.setSeconds(n.setMinutes(Z, 0), 0), Be = n.setSeconds(n.setMinutes(Z, 59), 59);
|
|
2981
|
-
return !ge({
|
|
2982
|
-
start: we,
|
|
2983
|
-
end: Be
|
|
2984
|
-
}) || !De(N);
|
|
2985
|
-
}
|
|
2986
|
-
case "minutes": {
|
|
2987
|
-
const N = n.setMinutes(E, z), Z = n.setSeconds(N, 0), we = n.setSeconds(N, 59);
|
|
2988
|
-
return !ge({
|
|
2989
|
-
start: Z,
|
|
2990
|
-
end: we
|
|
2991
|
-
}) || !De(z, I);
|
|
2992
|
-
}
|
|
2993
|
-
case "seconds": {
|
|
2994
|
-
const N = n.setSeconds(E, z);
|
|
2995
|
-
return !ge({
|
|
2996
|
-
start: N,
|
|
2997
|
-
end: N
|
|
2998
|
-
}) || !De(z);
|
|
2999
|
-
}
|
|
3000
|
-
default:
|
|
3001
|
-
throw new Error("not supported");
|
|
3002
|
-
}
|
|
3003
|
-
}, [i, E, b, C, me, F, I, O, x, n, S, B, a, L]), pe = Mt(), _e = T.useMemo(() => {
|
|
3004
|
-
switch (Ne) {
|
|
3005
|
-
case "hours": {
|
|
3006
|
-
const z = (W, Y) => {
|
|
3007
|
-
const K = ro(W, me, i);
|
|
3008
|
-
q(n.setHours(E, K), Y);
|
|
3009
|
-
};
|
|
3010
|
-
return {
|
|
3011
|
-
onChange: z,
|
|
3012
|
-
viewValue: n.getHours(E),
|
|
3013
|
-
children: ts({
|
|
3014
|
-
value: H,
|
|
3015
|
-
utils: n,
|
|
3016
|
-
ampm: i,
|
|
3017
|
-
onChange: z,
|
|
3018
|
-
getClockNumberText: r.hoursClockNumberText,
|
|
3019
|
-
isDisabled: (W) => G || le(W, "hours"),
|
|
3020
|
-
selectedId: pe
|
|
3021
|
-
})
|
|
3022
|
-
};
|
|
3023
|
-
}
|
|
3024
|
-
case "minutes": {
|
|
3025
|
-
const z = n.getMinutes(E), W = (Y, K) => {
|
|
3026
|
-
q(n.setMinutes(E, Y), K);
|
|
3027
|
-
};
|
|
3028
|
-
return {
|
|
3029
|
-
viewValue: z,
|
|
3030
|
-
onChange: W,
|
|
3031
|
-
children: To({
|
|
3032
|
-
utils: n,
|
|
3033
|
-
value: z,
|
|
3034
|
-
onChange: W,
|
|
3035
|
-
getClockNumberText: r.minutesClockNumberText,
|
|
3036
|
-
isDisabled: (Y) => G || le(Y, "minutes"),
|
|
3037
|
-
selectedId: pe
|
|
3038
|
-
})
|
|
3039
|
-
};
|
|
3040
|
-
}
|
|
3041
|
-
case "seconds": {
|
|
3042
|
-
const z = n.getSeconds(E), W = (Y, K) => {
|
|
3043
|
-
q(n.setSeconds(E, Y), K);
|
|
3044
|
-
};
|
|
3045
|
-
return {
|
|
3046
|
-
viewValue: z,
|
|
3047
|
-
onChange: W,
|
|
3048
|
-
children: To({
|
|
3049
|
-
utils: n,
|
|
3050
|
-
value: z,
|
|
3051
|
-
onChange: W,
|
|
3052
|
-
getClockNumberText: r.secondsClockNumberText,
|
|
3053
|
-
isDisabled: (Y) => G || le(Y, "seconds"),
|
|
3054
|
-
selectedId: pe
|
|
3055
|
-
})
|
|
3056
|
-
};
|
|
3057
|
-
}
|
|
3058
|
-
default:
|
|
3059
|
-
throw new Error("You must provide the type for ClockView");
|
|
3060
|
-
}
|
|
3061
|
-
}, [Ne, n, H, i, r.hoursClockNumberText, r.minutesClockNumberText, r.secondsClockNumberText, me, q, E, le, pe, G]), Fe = l, Le = ss(Fe);
|
|
3062
|
-
return /* @__PURE__ */ R(as, m({
|
|
3063
|
-
ref: s,
|
|
3064
|
-
className: Re(Le.root, ce),
|
|
3065
|
-
ownerState: Fe
|
|
3066
|
-
}, k, {
|
|
3067
|
-
children: [/* @__PURE__ */ p(Qn, m({
|
|
3068
|
-
autoFocus: u ?? !!ae,
|
|
3069
|
-
ampmInClock: c && L.includes("hours"),
|
|
3070
|
-
value: H,
|
|
3071
|
-
type: Ne,
|
|
3072
|
-
ampm: i,
|
|
3073
|
-
minutesStep: I,
|
|
3074
|
-
isTimeDisabled: le,
|
|
3075
|
-
meridiemMode: me,
|
|
3076
|
-
handleMeridiemChange: ye,
|
|
3077
|
-
selectedId: pe,
|
|
3078
|
-
disabled: G,
|
|
3079
|
-
readOnly: re
|
|
3080
|
-
}, _e)), V && /* @__PURE__ */ p(rs, {
|
|
3081
|
-
className: Le.arrowSwitcher,
|
|
3082
|
-
slots: de,
|
|
3083
|
-
slotProps: ue,
|
|
3084
|
-
onGoToPrevious: () => Ie(Ee),
|
|
3085
|
-
isPreviousDisabled: !Ee,
|
|
3086
|
-
previousLabel: r.openPreviousView,
|
|
3087
|
-
onGoToNext: () => Ie(Te),
|
|
3088
|
-
isNextDisabled: !Te,
|
|
3089
|
-
nextLabel: r.openNextView,
|
|
3090
|
-
ownerState: Fe
|
|
3091
|
-
})]
|
|
3092
|
-
}));
|
|
3093
|
-
});
|
|
3094
|
-
process.env.NODE_ENV !== "production" && (Ao.propTypes = {
|
|
3095
|
-
// ----------------------------- Warning --------------------------------
|
|
3096
|
-
// | These PropTypes are generated from the TypeScript type definitions |
|
|
3097
|
-
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
|
3098
|
-
// ----------------------------------------------------------------------
|
|
3099
|
-
/**
|
|
3100
|
-
* 12h/24h view for hour selection clock.
|
|
3101
|
-
* @default `utils.is12HourCycleInCurrentLocale()`
|
|
3102
|
-
*/
|
|
3103
|
-
ampm: e.bool,
|
|
3104
|
-
/**
|
|
3105
|
-
* Display ampm controls under the clock (instead of in the toolbar).
|
|
3106
|
-
* @default false
|
|
3107
|
-
*/
|
|
3108
|
-
ampmInClock: e.bool,
|
|
3109
|
-
/**
|
|
3110
|
-
* If `true`, the main element is focused during the first mount.
|
|
3111
|
-
* This main element is:
|
|
3112
|
-
* - the element chosen by the visible view if any (i.e: the selected day on the `day` view).
|
|
3113
|
-
* - the `input` element if there is a field rendered.
|
|
3114
|
-
*/
|
|
3115
|
-
autoFocus: e.bool,
|
|
3116
|
-
/**
|
|
3117
|
-
* Override or extend the styles applied to the component.
|
|
3118
|
-
*/
|
|
3119
|
-
classes: e.object,
|
|
3120
|
-
className: e.string,
|
|
3121
|
-
/**
|
|
3122
|
-
* Overridable components.
|
|
3123
|
-
* @default {}
|
|
3124
|
-
* @deprecated Please use `slots`.
|
|
3125
|
-
*/
|
|
3126
|
-
components: e.object,
|
|
3127
|
-
/**
|
|
3128
|
-
* The props used for each component slot.
|
|
3129
|
-
* @default {}
|
|
3130
|
-
* @deprecated Please use `slotProps`.
|
|
3131
|
-
*/
|
|
3132
|
-
componentsProps: e.object,
|
|
3133
|
-
/**
|
|
3134
|
-
* The default selected value.
|
|
3135
|
-
* Used when the component is not controlled.
|
|
3136
|
-
*/
|
|
3137
|
-
defaultValue: e.any,
|
|
3138
|
-
/**
|
|
3139
|
-
* If `true`, the picker views and text field are disabled.
|
|
3140
|
-
* @default false
|
|
3141
|
-
*/
|
|
3142
|
-
disabled: e.bool,
|
|
3143
|
-
/**
|
|
3144
|
-
* If `true`, disable values after the current date for date components, time for time components and both for date time components.
|
|
3145
|
-
* @default false
|
|
3146
|
-
*/
|
|
3147
|
-
disableFuture: e.bool,
|
|
3148
|
-
/**
|
|
3149
|
-
* Do not ignore date part when validating min/max time.
|
|
3150
|
-
* @default false
|
|
3151
|
-
*/
|
|
3152
|
-
disableIgnoringDatePartForTimeValidation: e.bool,
|
|
3153
|
-
/**
|
|
3154
|
-
* If `true`, disable values before the current date for date components, time for time components and both for date time components.
|
|
3155
|
-
* @default false
|
|
3156
|
-
*/
|
|
3157
|
-
disablePast: e.bool,
|
|
3158
|
-
/**
|
|
3159
|
-
* Controlled focused view.
|
|
3160
|
-
*/
|
|
3161
|
-
focusedView: e.oneOf(["hours", "minutes", "seconds"]),
|
|
3162
|
-
/**
|
|
3163
|
-
* Maximal selectable time.
|
|
3164
|
-
* The date part of the object will be ignored unless `props.disableIgnoringDatePartForTimeValidation === true`.
|
|
3165
|
-
*/
|
|
3166
|
-
maxTime: e.any,
|
|
3167
|
-
/**
|
|
3168
|
-
* Minimal selectable time.
|
|
3169
|
-
* The date part of the object will be ignored unless `props.disableIgnoringDatePartForTimeValidation === true`.
|
|
3170
|
-
*/
|
|
3171
|
-
minTime: e.any,
|
|
3172
|
-
/**
|
|
3173
|
-
* Step over minutes.
|
|
3174
|
-
* @default 1
|
|
3175
|
-
*/
|
|
3176
|
-
minutesStep: e.number,
|
|
3177
|
-
/**
|
|
3178
|
-
* Callback fired when the value changes.
|
|
3179
|
-
* @template TDate
|
|
3180
|
-
* @param {TDate | null} value The new value.
|
|
3181
|
-
* @param {PickerSelectionState | undefined} selectionState Indicates if the date selection is complete.
|
|
3182
|
-
* @param {TView | undefined} selectedView Indicates the view in which the selection has been made.
|
|
3183
|
-
*/
|
|
3184
|
-
onChange: e.func,
|
|
3185
|
-
/**
|
|
3186
|
-
* Callback fired on focused view change.
|
|
3187
|
-
* @template TView
|
|
3188
|
-
* @param {TView} view The new view to focus or not.
|
|
3189
|
-
* @param {boolean} hasFocus `true` if the view should be focused.
|
|
3190
|
-
*/
|
|
3191
|
-
onFocusedViewChange: e.func,
|
|
3192
|
-
/**
|
|
3193
|
-
* Callback fired on view change.
|
|
3194
|
-
* @template TView
|
|
3195
|
-
* @param {TView} view The new view.
|
|
3196
|
-
*/
|
|
3197
|
-
onViewChange: e.func,
|
|
3198
|
-
/**
|
|
3199
|
-
* The default visible view.
|
|
3200
|
-
* Used when the component view is not controlled.
|
|
3201
|
-
* Must be a valid option from `views` list.
|
|
3202
|
-
*/
|
|
3203
|
-
openTo: e.oneOf(["hours", "minutes", "seconds"]),
|
|
3204
|
-
/**
|
|
3205
|
-
* If `true`, the picker views and text field are read-only.
|
|
3206
|
-
* @default false
|
|
3207
|
-
*/
|
|
3208
|
-
readOnly: e.bool,
|
|
3209
|
-
/**
|
|
3210
|
-
* Disable specific clock time.
|
|
3211
|
-
* @param {number} clockValue The value to check.
|
|
3212
|
-
* @param {TimeView} view The clock type of the timeValue.
|
|
3213
|
-
* @returns {boolean} If `true` the time will be disabled.
|
|
3214
|
-
* @deprecated Consider using `shouldDisableTime`.
|
|
3215
|
-
*/
|
|
3216
|
-
shouldDisableClock: e.func,
|
|
3217
|
-
/**
|
|
3218
|
-
* Disable specific time.
|
|
3219
|
-
* @template TDate
|
|
3220
|
-
* @param {TDate} value The value to check.
|
|
3221
|
-
* @param {TimeView} view The clock type of the timeValue.
|
|
3222
|
-
* @returns {boolean} If `true` the time will be disabled.
|
|
3223
|
-
*/
|
|
3224
|
-
shouldDisableTime: e.func,
|
|
3225
|
-
showViewSwitcher: e.bool,
|
|
3226
|
-
/**
|
|
3227
|
-
* The props used for each component slot.
|
|
3228
|
-
* @default {}
|
|
3229
|
-
*/
|
|
3230
|
-
slotProps: e.object,
|
|
3231
|
-
/**
|
|
3232
|
-
* Overridable component slots.
|
|
3233
|
-
* @default {}
|
|
3234
|
-
*/
|
|
3235
|
-
slots: e.object,
|
|
3236
|
-
/**
|
|
3237
|
-
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
3238
|
-
*/
|
|
3239
|
-
sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
|
|
3240
|
-
/**
|
|
3241
|
-
* The selected value.
|
|
3242
|
-
* Used when the component is controlled.
|
|
3243
|
-
*/
|
|
3244
|
-
value: e.any,
|
|
3245
|
-
/**
|
|
3246
|
-
* The visible view.
|
|
3247
|
-
* Used when the component view is controlled.
|
|
3248
|
-
* Must be a valid option from `views` list.
|
|
3249
|
-
*/
|
|
3250
|
-
view: e.oneOf(["hours", "minutes", "seconds"]),
|
|
3251
|
-
/**
|
|
3252
|
-
* Available views.
|
|
3253
|
-
*/
|
|
3254
|
-
views: e.arrayOf(e.oneOf(["hours", "minutes", "seconds"]).isRequired)
|
|
3255
|
-
});
|
|
3256
|
-
const Ke = ({
|
|
3257
|
-
view: o,
|
|
3258
|
-
onViewChange: t,
|
|
3259
|
-
focusedView: s,
|
|
3260
|
-
onFocusedViewChange: r,
|
|
3261
|
-
views: a,
|
|
3262
|
-
value: n,
|
|
3263
|
-
defaultValue: l,
|
|
3264
|
-
onChange: i,
|
|
3265
|
-
className: c,
|
|
3266
|
-
classes: u,
|
|
3267
|
-
disableFuture: g,
|
|
3268
|
-
disablePast: d,
|
|
3269
|
-
minTime: h,
|
|
3270
|
-
maxTime: y,
|
|
3271
|
-
shouldDisableTime: w,
|
|
3272
|
-
shouldDisableClock: b,
|
|
3273
|
-
minutesStep: C,
|
|
3274
|
-
ampm: F,
|
|
3275
|
-
ampmInClock: S,
|
|
3276
|
-
components: B,
|
|
3277
|
-
componentsProps: I,
|
|
3278
|
-
slots: O,
|
|
3279
|
-
slotProps: x,
|
|
3280
|
-
readOnly: V,
|
|
3281
|
-
disabled: _,
|
|
3282
|
-
sx: $,
|
|
3283
|
-
autoFocus: A,
|
|
3284
|
-
showViewSwitcher: L,
|
|
3285
|
-
disableIgnoringDatePartForTimeValidation: j
|
|
3286
|
-
}) => /* @__PURE__ */ p(Ao, {
|
|
3287
|
-
view: o,
|
|
3288
|
-
onViewChange: t,
|
|
3289
|
-
focusedView: s,
|
|
3290
|
-
onFocusedViewChange: r,
|
|
3291
|
-
views: a.filter(xt),
|
|
3292
|
-
value: n,
|
|
3293
|
-
defaultValue: l,
|
|
3294
|
-
onChange: i,
|
|
3295
|
-
className: c,
|
|
3296
|
-
classes: u,
|
|
3297
|
-
disableFuture: g,
|
|
3298
|
-
disablePast: d,
|
|
3299
|
-
minTime: h,
|
|
3300
|
-
maxTime: y,
|
|
3301
|
-
shouldDisableTime: w,
|
|
3302
|
-
shouldDisableClock: b,
|
|
3303
|
-
minutesStep: C,
|
|
3304
|
-
ampm: F,
|
|
3305
|
-
ampmInClock: S,
|
|
3306
|
-
components: B,
|
|
3307
|
-
componentsProps: I,
|
|
3308
|
-
slots: O,
|
|
3309
|
-
slotProps: x,
|
|
3310
|
-
readOnly: V,
|
|
3311
|
-
disabled: _,
|
|
3312
|
-
sx: $,
|
|
3313
|
-
autoFocus: A,
|
|
3314
|
-
showViewSwitcher: L,
|
|
3315
|
-
disableIgnoringDatePartForTimeValidation: j
|
|
3316
|
-
}), Ho = /* @__PURE__ */ T.forwardRef(function(t, s) {
|
|
3317
|
-
var r, a, n;
|
|
3318
|
-
const l = Oe(), i = _o(t, "MuiMobileDateTimePicker"), c = m({
|
|
3319
|
-
day: Se,
|
|
3320
|
-
month: Se,
|
|
3321
|
-
year: Se,
|
|
3322
|
-
hours: Ke,
|
|
3323
|
-
minutes: Ke,
|
|
3324
|
-
seconds: Ke
|
|
3325
|
-
}, i.viewRenderers), u = (r = i.ampmInClock) != null ? r : !1, g = m({}, i, {
|
|
3326
|
-
viewRenderers: c,
|
|
3327
|
-
ampmInClock: u,
|
|
3328
|
-
slots: m({
|
|
3329
|
-
field: oo
|
|
3330
|
-
}, i.slots),
|
|
3331
|
-
slotProps: m({}, i.slotProps, {
|
|
3332
|
-
field: (h) => {
|
|
3333
|
-
var y;
|
|
3334
|
-
return m({}, xo((y = i.slotProps) == null ? void 0 : y.field, h), Do(i), {
|
|
3335
|
-
ref: s,
|
|
3336
|
-
ampm: i.ampm
|
|
3337
|
-
});
|
|
3338
|
-
},
|
|
3339
|
-
toolbar: m({
|
|
3340
|
-
hidden: !1,
|
|
3341
|
-
ampmInClock: u
|
|
3342
|
-
}, (a = i.slotProps) == null ? void 0 : a.toolbar),
|
|
3343
|
-
tabs: m({
|
|
3344
|
-
hidden: !1
|
|
3345
|
-
}, (n = i.slotProps) == null ? void 0 : n.tabs)
|
|
3346
|
-
})
|
|
3347
|
-
}), {
|
|
3348
|
-
renderPicker: d
|
|
3349
|
-
} = Dt({
|
|
3350
|
-
props: g,
|
|
3351
|
-
valueManager: Ze,
|
|
3352
|
-
valueType: "date-time",
|
|
3353
|
-
getOpenDialogAriaText: l.openDatePickerDialogue,
|
|
3354
|
-
validator: eo
|
|
3355
|
-
});
|
|
3356
|
-
return d();
|
|
3357
|
-
});
|
|
3358
|
-
Ho.propTypes = {
|
|
3359
|
-
// ----------------------------- Warning --------------------------------
|
|
3360
|
-
// | These PropTypes are generated from the TypeScript type definitions |
|
|
3361
|
-
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
|
3362
|
-
// ----------------------------------------------------------------------
|
|
3363
|
-
/**
|
|
3364
|
-
* 12h/24h view for hour selection clock.
|
|
3365
|
-
* @default `utils.is12HourCycleInCurrentLocale()`
|
|
3366
|
-
*/
|
|
3367
|
-
ampm: e.bool,
|
|
3368
|
-
/**
|
|
3369
|
-
* Display ampm controls under the clock (instead of in the toolbar).
|
|
3370
|
-
* @default true on desktop, false on mobile
|
|
3371
|
-
*/
|
|
3372
|
-
ampmInClock: e.bool,
|
|
3373
|
-
/**
|
|
3374
|
-
* If `true`, the main element is focused during the first mount.
|
|
3375
|
-
* This main element is:
|
|
3376
|
-
* - the element chosen by the visible view if any (i.e: the selected day on the `day` view).
|
|
3377
|
-
* - the `input` element if there is a field rendered.
|
|
3378
|
-
*/
|
|
3379
|
-
autoFocus: e.bool,
|
|
3380
|
-
/**
|
|
3381
|
-
* Class name applied to the root element.
|
|
3382
|
-
*/
|
|
3383
|
-
className: e.string,
|
|
3384
|
-
/**
|
|
3385
|
-
* If `true`, the popover or modal will close after submitting the full date.
|
|
3386
|
-
* @default `true` for desktop, `false` for mobile (based on the chosen wrapper and `desktopModeMediaQuery` prop).
|
|
3387
|
-
*/
|
|
3388
|
-
closeOnSelect: e.bool,
|
|
3389
|
-
/**
|
|
3390
|
-
* Overridable components.
|
|
3391
|
-
* @default {}
|
|
3392
|
-
* @deprecated Please use `slots`.
|
|
3393
|
-
*/
|
|
3394
|
-
components: e.object,
|
|
3395
|
-
/**
|
|
3396
|
-
* The props used for each component slot.
|
|
3397
|
-
* @default {}
|
|
3398
|
-
* @deprecated Please use `slotProps`.
|
|
3399
|
-
*/
|
|
3400
|
-
componentsProps: e.object,
|
|
3401
|
-
/**
|
|
3402
|
-
* Formats the day of week displayed in the calendar header.
|
|
3403
|
-
* @param {string} day The day of week provided by the adapter's method `getWeekdays`.
|
|
3404
|
-
* @returns {string} The name to display.
|
|
3405
|
-
* @default (day) => day.charAt(0).toUpperCase()
|
|
3406
|
-
*/
|
|
3407
|
-
dayOfWeekFormatter: e.func,
|
|
3408
|
-
/**
|
|
3409
|
-
* Default calendar month displayed when `value={null}`.
|
|
3410
|
-
*/
|
|
3411
|
-
defaultCalendarMonth: e.any,
|
|
3412
|
-
/**
|
|
3413
|
-
* The default value.
|
|
3414
|
-
* Used when the component is not controlled.
|
|
3415
|
-
*/
|
|
3416
|
-
defaultValue: e.any,
|
|
3417
|
-
/**
|
|
3418
|
-
* If `true`, the picker and text field are disabled.
|
|
3419
|
-
* @default false
|
|
3420
|
-
*/
|
|
3421
|
-
disabled: e.bool,
|
|
3422
|
-
/**
|
|
3423
|
-
* If `true`, disable values after the current date for date components, time for time components and both for date time components.
|
|
3424
|
-
* @default false
|
|
3425
|
-
*/
|
|
3426
|
-
disableFuture: e.bool,
|
|
3427
|
-
/**
|
|
3428
|
-
* If `true`, today's date is rendering without highlighting with circle.
|
|
3429
|
-
* @default false
|
|
3430
|
-
*/
|
|
3431
|
-
disableHighlightToday: e.bool,
|
|
3432
|
-
/**
|
|
3433
|
-
* Do not ignore date part when validating min/max time.
|
|
3434
|
-
* @default false
|
|
3435
|
-
*/
|
|
3436
|
-
disableIgnoringDatePartForTimeValidation: e.bool,
|
|
3437
|
-
/**
|
|
3438
|
-
* If `true`, the open picker button will not be rendered (renders only the field).
|
|
3439
|
-
* @default false
|
|
3440
|
-
*/
|
|
3441
|
-
disableOpenPicker: e.bool,
|
|
3442
|
-
/**
|
|
3443
|
-
* If `true`, disable values before the current date for date components, time for time components and both for date time components.
|
|
3444
|
-
* @default false
|
|
3445
|
-
*/
|
|
3446
|
-
disablePast: e.bool,
|
|
3447
|
-
/**
|
|
3448
|
-
* If `true`, the week number will be display in the calendar.
|
|
3449
|
-
*/
|
|
3450
|
-
displayWeekNumber: e.bool,
|
|
3451
|
-
/**
|
|
3452
|
-
* Calendar will show more weeks in order to match this value.
|
|
3453
|
-
* Put it to 6 for having fix number of week in Gregorian calendars
|
|
3454
|
-
* @default undefined
|
|
3455
|
-
*/
|
|
3456
|
-
fixedWeekNumber: e.number,
|
|
3457
|
-
/**
|
|
3458
|
-
* Format of the date when rendered in the input(s).
|
|
3459
|
-
* Defaults to localized format based on the used `views`.
|
|
3460
|
-
*/
|
|
3461
|
-
format: e.string,
|
|
3462
|
-
/**
|
|
3463
|
-
* Density of the format when rendered in the input.
|
|
3464
|
-
* Setting `formatDensity` to `"spacious"` will add a space before and after each `/`, `-` and `.` character.
|
|
3465
|
-
* @default "dense"
|
|
3466
|
-
*/
|
|
3467
|
-
formatDensity: e.oneOf(["dense", "spacious"]),
|
|
3468
|
-
/**
|
|
3469
|
-
* Pass a ref to the `input` element.
|
|
3470
|
-
*/
|
|
3471
|
-
inputRef: e.oneOfType([e.func, e.shape({
|
|
3472
|
-
current: e.object
|
|
3473
|
-
})]),
|
|
3474
|
-
/**
|
|
3475
|
-
* The label content.
|
|
3476
|
-
*/
|
|
3477
|
-
label: e.node,
|
|
3478
|
-
/**
|
|
3479
|
-
* If `true`, calls `renderLoading` instead of rendering the day calendar.
|
|
3480
|
-
* Can be used to preload information and show it in calendar.
|
|
3481
|
-
* @default false
|
|
3482
|
-
*/
|
|
3483
|
-
loading: e.bool,
|
|
3484
|
-
/**
|
|
3485
|
-
* Locale for components texts.
|
|
3486
|
-
* Allows overriding texts coming from `LocalizationProvider` and `theme`.
|
|
3487
|
-
*/
|
|
3488
|
-
localeText: e.object,
|
|
3489
|
-
/**
|
|
3490
|
-
* Maximal selectable date.
|
|
3491
|
-
*/
|
|
3492
|
-
maxDate: e.any,
|
|
3493
|
-
/**
|
|
3494
|
-
* Maximal selectable moment of time with binding to date, to set max time in each day use `maxTime`.
|
|
3495
|
-
*/
|
|
3496
|
-
maxDateTime: e.any,
|
|
3497
|
-
/**
|
|
3498
|
-
* Maximal selectable time.
|
|
3499
|
-
* The date part of the object will be ignored unless `props.disableIgnoringDatePartForTimeValidation === true`.
|
|
3500
|
-
*/
|
|
3501
|
-
maxTime: e.any,
|
|
3502
|
-
/**
|
|
3503
|
-
* Minimal selectable date.
|
|
3504
|
-
*/
|
|
3505
|
-
minDate: e.any,
|
|
3506
|
-
/**
|
|
3507
|
-
* Minimal selectable moment of time with binding to date, to set min time in each day use `minTime`.
|
|
3508
|
-
*/
|
|
3509
|
-
minDateTime: e.any,
|
|
3510
|
-
/**
|
|
3511
|
-
* Minimal selectable time.
|
|
3512
|
-
* The date part of the object will be ignored unless `props.disableIgnoringDatePartForTimeValidation === true`.
|
|
3513
|
-
*/
|
|
3514
|
-
minTime: e.any,
|
|
3515
|
-
/**
|
|
3516
|
-
* Step over minutes.
|
|
3517
|
-
* @default 1
|
|
3518
|
-
*/
|
|
3519
|
-
minutesStep: e.number,
|
|
3520
|
-
/**
|
|
3521
|
-
* Months rendered per row.
|
|
3522
|
-
* @default 3
|
|
3523
|
-
*/
|
|
3524
|
-
monthsPerRow: e.oneOf([3, 4]),
|
|
3525
|
-
/**
|
|
3526
|
-
* Callback fired when the value is accepted.
|
|
3527
|
-
* @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value.
|
|
3528
|
-
* @param {TValue} value The value that was just accepted.
|
|
3529
|
-
*/
|
|
3530
|
-
onAccept: e.func,
|
|
3531
|
-
/**
|
|
3532
|
-
* Callback fired when the value changes.
|
|
3533
|
-
* @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value.
|
|
3534
|
-
* @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value.
|
|
3535
|
-
* @param {TValue} value The new value.
|
|
3536
|
-
* @param {FieldChangeHandlerContext<TError>} context The context containing the validation result of the current value.
|
|
3537
|
-
*/
|
|
3538
|
-
onChange: e.func,
|
|
3539
|
-
/**
|
|
3540
|
-
* Callback fired when the popup requests to be closed.
|
|
3541
|
-
* Use in controlled mode (see `open`).
|
|
3542
|
-
*/
|
|
3543
|
-
onClose: e.func,
|
|
3544
|
-
/**
|
|
3545
|
-
* Callback fired when the error associated to the current value changes.
|
|
3546
|
-
* If the error has a non-null value, then the `TextField` will be rendered in `error` state.
|
|
3547
|
-
*
|
|
3548
|
-
* @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value.
|
|
3549
|
-
* @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value.
|
|
3550
|
-
* @param {TError} error The new error describing why the current value is not valid.
|
|
3551
|
-
* @param {TValue} value The value associated to the error.
|
|
3552
|
-
*/
|
|
3553
|
-
onError: e.func,
|
|
3554
|
-
/**
|
|
3555
|
-
* Callback fired on month change.
|
|
3556
|
-
* @template TDate
|
|
3557
|
-
* @param {TDate} month The new month.
|
|
3558
|
-
*/
|
|
3559
|
-
onMonthChange: e.func,
|
|
3560
|
-
/**
|
|
3561
|
-
* Callback fired when the popup requests to be opened.
|
|
3562
|
-
* Use in controlled mode (see `open`).
|
|
3563
|
-
*/
|
|
3564
|
-
onOpen: e.func,
|
|
3565
|
-
/**
|
|
3566
|
-
* Callback fired when the selected sections change.
|
|
3567
|
-
* @param {FieldSelectedSections} newValue The new selected sections.
|
|
3568
|
-
*/
|
|
3569
|
-
onSelectedSectionsChange: e.func,
|
|
3570
|
-
/**
|
|
3571
|
-
* Callback fired on view change.
|
|
3572
|
-
* @template TView
|
|
3573
|
-
* @param {TView} view The new view.
|
|
3574
|
-
*/
|
|
3575
|
-
onViewChange: e.func,
|
|
3576
|
-
/**
|
|
3577
|
-
* Callback fired on year change.
|
|
3578
|
-
* @template TDate
|
|
3579
|
-
* @param {TDate} year The new year.
|
|
3580
|
-
*/
|
|
3581
|
-
onYearChange: e.func,
|
|
3582
|
-
/**
|
|
3583
|
-
* Control the popup or dialog open state.
|
|
3584
|
-
* @default false
|
|
3585
|
-
*/
|
|
3586
|
-
open: e.bool,
|
|
3587
|
-
/**
|
|
3588
|
-
* The default visible view.
|
|
3589
|
-
* Used when the component view is not controlled.
|
|
3590
|
-
* Must be a valid option from `views` list.
|
|
3591
|
-
*/
|
|
3592
|
-
openTo: e.oneOf(["day", "hours", "minutes", "month", "seconds", "year"]),
|
|
3593
|
-
/**
|
|
3594
|
-
* Force rendering in particular orientation.
|
|
3595
|
-
*/
|
|
3596
|
-
orientation: e.oneOf(["landscape", "portrait"]),
|
|
3597
|
-
readOnly: e.bool,
|
|
3598
|
-
/**
|
|
3599
|
-
* Disable heavy animations.
|
|
3600
|
-
* @default typeof navigator !== 'undefined' && /(android)/i.test(navigator.userAgent)
|
|
3601
|
-
*/
|
|
3602
|
-
reduceAnimations: e.bool,
|
|
3603
|
-
/**
|
|
3604
|
-
* Component displaying when passed `loading` true.
|
|
3605
|
-
* @returns {React.ReactNode} The node to render when loading.
|
|
3606
|
-
* @default () => <span data-mui-test="loading-progress">...</span>
|
|
3607
|
-
*/
|
|
3608
|
-
renderLoading: e.func,
|
|
3609
|
-
/**
|
|
3610
|
-
* The currently selected sections.
|
|
3611
|
-
* This prop accept four formats:
|
|
3612
|
-
* 1. If a number is provided, the section at this index will be selected.
|
|
3613
|
-
* 2. If an object with a `startIndex` and `endIndex` properties are provided, the sections between those two indexes will be selected.
|
|
3614
|
-
* 3. If a string of type `FieldSectionType` is provided, the first section with that name will be selected.
|
|
3615
|
-
* 4. If `null` is provided, no section will be selected
|
|
3616
|
-
* If not provided, the selected sections will be handled internally.
|
|
3617
|
-
*/
|
|
3618
|
-
selectedSections: e.oneOfType([e.oneOf(["all", "day", "hours", "meridiem", "minutes", "month", "seconds", "weekDay", "year"]), e.number, e.shape({
|
|
3619
|
-
endIndex: e.number.isRequired,
|
|
3620
|
-
startIndex: e.number.isRequired
|
|
3621
|
-
})]),
|
|
3622
|
-
/**
|
|
3623
|
-
* Disable specific clock time.
|
|
3624
|
-
* @param {number} clockValue The value to check.
|
|
3625
|
-
* @param {TimeView} view The clock type of the timeValue.
|
|
3626
|
-
* @returns {boolean} If `true` the time will be disabled.
|
|
3627
|
-
* @deprecated Consider using `shouldDisableTime`.
|
|
3628
|
-
*/
|
|
3629
|
-
shouldDisableClock: e.func,
|
|
3630
|
-
/**
|
|
3631
|
-
* Disable specific date.
|
|
3632
|
-
* @template TDate
|
|
3633
|
-
* @param {TDate} day The date to test.
|
|
3634
|
-
* @returns {boolean} If `true` the date will be disabled.
|
|
3635
|
-
*/
|
|
3636
|
-
shouldDisableDate: e.func,
|
|
3637
|
-
/**
|
|
3638
|
-
* Disable specific month.
|
|
3639
|
-
* @template TDate
|
|
3640
|
-
* @param {TDate} month The month to test.
|
|
3641
|
-
* @returns {boolean} If `true`, the month will be disabled.
|
|
3642
|
-
*/
|
|
3643
|
-
shouldDisableMonth: e.func,
|
|
3644
|
-
/**
|
|
3645
|
-
* Disable specific time.
|
|
3646
|
-
* @template TDate
|
|
3647
|
-
* @param {TDate} value The value to check.
|
|
3648
|
-
* @param {TimeView} view The clock type of the timeValue.
|
|
3649
|
-
* @returns {boolean} If `true` the time will be disabled.
|
|
3650
|
-
*/
|
|
3651
|
-
shouldDisableTime: e.func,
|
|
3652
|
-
/**
|
|
3653
|
-
* Disable specific year.
|
|
3654
|
-
* @template TDate
|
|
3655
|
-
* @param {TDate} year The year to test.
|
|
3656
|
-
* @returns {boolean} If `true`, the year will be disabled.
|
|
3657
|
-
*/
|
|
3658
|
-
shouldDisableYear: e.func,
|
|
3659
|
-
/**
|
|
3660
|
-
* If `true`, days outside the current month are rendered:
|
|
3661
|
-
*
|
|
3662
|
-
* - if `fixedWeekNumber` is defined, renders days to have the weeks requested.
|
|
3663
|
-
*
|
|
3664
|
-
* - if `fixedWeekNumber` is not defined, renders day to fill the first and last week of the current month.
|
|
3665
|
-
*
|
|
3666
|
-
* - ignored if `calendars` equals more than `1` on range pickers.
|
|
3667
|
-
* @default false
|
|
3668
|
-
*/
|
|
3669
|
-
showDaysOutsideCurrentMonth: e.bool,
|
|
3670
|
-
/**
|
|
3671
|
-
* The props used for each component slot.
|
|
3672
|
-
* @default {}
|
|
3673
|
-
*/
|
|
3674
|
-
slotProps: e.object,
|
|
3675
|
-
/**
|
|
3676
|
-
* Overridable component slots.
|
|
3677
|
-
* @default {}
|
|
3678
|
-
*/
|
|
3679
|
-
slots: e.object,
|
|
3680
|
-
/**
|
|
3681
|
-
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
3682
|
-
*/
|
|
3683
|
-
sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
|
|
3684
|
-
/**
|
|
3685
|
-
* The selected value.
|
|
3686
|
-
* Used when the component is controlled.
|
|
3687
|
-
*/
|
|
3688
|
-
value: e.any,
|
|
3689
|
-
/**
|
|
3690
|
-
* The visible view.
|
|
3691
|
-
* Used when the component view is controlled.
|
|
3692
|
-
* Must be a valid option from `views` list.
|
|
3693
|
-
*/
|
|
3694
|
-
view: e.oneOf(["day", "hours", "minutes", "month", "seconds", "year"]),
|
|
3695
|
-
/**
|
|
3696
|
-
* Define custom view renderers for each section.
|
|
3697
|
-
* If `null`, the section will only have field editing.
|
|
3698
|
-
* If `undefined`, internally defined view will be the used.
|
|
3699
|
-
*/
|
|
3700
|
-
viewRenderers: e.shape({
|
|
3701
|
-
day: e.func,
|
|
3702
|
-
hours: e.func,
|
|
3703
|
-
minutes: e.func,
|
|
3704
|
-
month: e.func,
|
|
3705
|
-
seconds: e.func,
|
|
3706
|
-
year: e.func
|
|
3707
|
-
}),
|
|
3708
|
-
/**
|
|
3709
|
-
* Available views.
|
|
3710
|
-
*/
|
|
3711
|
-
views: e.arrayOf(e.oneOf(["day", "hours", "minutes", "month", "seconds", "year"]).isRequired),
|
|
3712
|
-
/**
|
|
3713
|
-
* Years rendered per row.
|
|
3714
|
-
* @default 3
|
|
3715
|
-
*/
|
|
3716
|
-
yearsPerRow: e.oneOf([3, 4])
|
|
3717
|
-
};
|
|
3718
|
-
const ls = ["desktopModeMediaQuery"], Yo = /* @__PURE__ */ T.forwardRef(function(t, s) {
|
|
3719
|
-
const r = Q({
|
|
3720
|
-
props: t,
|
|
3721
|
-
name: "MuiDateTimePicker"
|
|
3722
|
-
}), {
|
|
3723
|
-
desktopModeMediaQuery: a = kt
|
|
3724
|
-
} = r, n = X(r, ls);
|
|
3725
|
-
return wt(a, {
|
|
3726
|
-
defaultMatches: !0
|
|
3727
|
-
}) ? /* @__PURE__ */ p(Lo, m({
|
|
3728
|
-
ref: s
|
|
3729
|
-
}, n)) : /* @__PURE__ */ p(Ho, m({
|
|
3730
|
-
ref: s
|
|
3731
|
-
}, n));
|
|
3732
|
-
});
|
|
3733
|
-
process.env.NODE_ENV !== "production" && (Yo.propTypes = {
|
|
3734
|
-
// ----------------------------- Warning --------------------------------
|
|
3735
|
-
// | These PropTypes are generated from the TypeScript type definitions |
|
|
3736
|
-
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
|
3737
|
-
// ----------------------------------------------------------------------
|
|
3738
|
-
/**
|
|
3739
|
-
* 12h/24h view for hour selection clock.
|
|
3740
|
-
* @default `utils.is12HourCycleInCurrentLocale()`
|
|
3741
|
-
*/
|
|
3742
|
-
ampm: e.bool,
|
|
3743
|
-
/**
|
|
3744
|
-
* Display ampm controls under the clock (instead of in the toolbar).
|
|
3745
|
-
* @default true on desktop, false on mobile
|
|
3746
|
-
*/
|
|
3747
|
-
ampmInClock: e.bool,
|
|
3748
|
-
/**
|
|
3749
|
-
* If `true`, the main element is focused during the first mount.
|
|
3750
|
-
* This main element is:
|
|
3751
|
-
* - the element chosen by the visible view if any (i.e: the selected day on the `day` view).
|
|
3752
|
-
* - the `input` element if there is a field rendered.
|
|
3753
|
-
*/
|
|
3754
|
-
autoFocus: e.bool,
|
|
3755
|
-
/**
|
|
3756
|
-
* Class name applied to the root element.
|
|
3757
|
-
*/
|
|
3758
|
-
className: e.string,
|
|
3759
|
-
/**
|
|
3760
|
-
* If `true`, the popover or modal will close after submitting the full date.
|
|
3761
|
-
* @default `true` for desktop, `false` for mobile (based on the chosen wrapper and `desktopModeMediaQuery` prop).
|
|
3762
|
-
*/
|
|
3763
|
-
closeOnSelect: e.bool,
|
|
3764
|
-
/**
|
|
3765
|
-
* Overridable components.
|
|
3766
|
-
* @default {}
|
|
3767
|
-
* @deprecated Please use `slots`.
|
|
3768
|
-
*/
|
|
3769
|
-
components: e.object,
|
|
3770
|
-
/**
|
|
3771
|
-
* The props used for each component slot.
|
|
3772
|
-
* @default {}
|
|
3773
|
-
* @deprecated Please use `slotProps`.
|
|
3774
|
-
*/
|
|
3775
|
-
componentsProps: e.object,
|
|
3776
|
-
/**
|
|
3777
|
-
* Formats the day of week displayed in the calendar header.
|
|
3778
|
-
* @param {string} day The day of week provided by the adapter's method `getWeekdays`.
|
|
3779
|
-
* @returns {string} The name to display.
|
|
3780
|
-
* @default (day) => day.charAt(0).toUpperCase()
|
|
3781
|
-
*/
|
|
3782
|
-
dayOfWeekFormatter: e.func,
|
|
3783
|
-
/**
|
|
3784
|
-
* Default calendar month displayed when `value={null}`.
|
|
3785
|
-
*/
|
|
3786
|
-
defaultCalendarMonth: e.any,
|
|
3787
|
-
/**
|
|
3788
|
-
* The default value.
|
|
3789
|
-
* Used when the component is not controlled.
|
|
3790
|
-
*/
|
|
3791
|
-
defaultValue: e.any,
|
|
3792
|
-
/**
|
|
3793
|
-
* CSS media query when `Mobile` mode will be changed to `Desktop`.
|
|
3794
|
-
* @default '@media (pointer: fine)'
|
|
3795
|
-
* @example '@media (min-width: 720px)' or theme.breakpoints.up("sm")
|
|
3796
|
-
*/
|
|
3797
|
-
desktopModeMediaQuery: e.string,
|
|
3798
|
-
/**
|
|
3799
|
-
* If `true`, the picker and text field are disabled.
|
|
3800
|
-
* @default false
|
|
3801
|
-
*/
|
|
3802
|
-
disabled: e.bool,
|
|
3803
|
-
/**
|
|
3804
|
-
* If `true`, disable values after the current date for date components, time for time components and both for date time components.
|
|
3805
|
-
* @default false
|
|
3806
|
-
*/
|
|
3807
|
-
disableFuture: e.bool,
|
|
3808
|
-
/**
|
|
3809
|
-
* If `true`, today's date is rendering without highlighting with circle.
|
|
3810
|
-
* @default false
|
|
3811
|
-
*/
|
|
3812
|
-
disableHighlightToday: e.bool,
|
|
3813
|
-
/**
|
|
3814
|
-
* Do not ignore date part when validating min/max time.
|
|
3815
|
-
* @default false
|
|
3816
|
-
*/
|
|
3817
|
-
disableIgnoringDatePartForTimeValidation: e.bool,
|
|
3818
|
-
/**
|
|
3819
|
-
* If `true`, the open picker button will not be rendered (renders only the field).
|
|
3820
|
-
* @default false
|
|
3821
|
-
*/
|
|
3822
|
-
disableOpenPicker: e.bool,
|
|
3823
|
-
/**
|
|
3824
|
-
* If `true`, disable values before the current date for date components, time for time components and both for date time components.
|
|
3825
|
-
* @default false
|
|
3826
|
-
*/
|
|
3827
|
-
disablePast: e.bool,
|
|
3828
|
-
/**
|
|
3829
|
-
* If `true`, the week number will be display in the calendar.
|
|
3830
|
-
*/
|
|
3831
|
-
displayWeekNumber: e.bool,
|
|
3832
|
-
/**
|
|
3833
|
-
* Calendar will show more weeks in order to match this value.
|
|
3834
|
-
* Put it to 6 for having fix number of week in Gregorian calendars
|
|
3835
|
-
* @default undefined
|
|
3836
|
-
*/
|
|
3837
|
-
fixedWeekNumber: e.number,
|
|
3838
|
-
/**
|
|
3839
|
-
* Format of the date when rendered in the input(s).
|
|
3840
|
-
* Defaults to localized format based on the used `views`.
|
|
3841
|
-
*/
|
|
3842
|
-
format: e.string,
|
|
3843
|
-
/**
|
|
3844
|
-
* Density of the format when rendered in the input.
|
|
3845
|
-
* Setting `formatDensity` to `"spacious"` will add a space before and after each `/`, `-` and `.` character.
|
|
3846
|
-
* @default "dense"
|
|
3847
|
-
*/
|
|
3848
|
-
formatDensity: e.oneOf(["dense", "spacious"]),
|
|
3849
|
-
/**
|
|
3850
|
-
* Pass a ref to the `input` element.
|
|
3851
|
-
*/
|
|
3852
|
-
inputRef: e.oneOfType([e.func, e.shape({
|
|
3853
|
-
current: e.object
|
|
3854
|
-
})]),
|
|
3855
|
-
/**
|
|
3856
|
-
* The label content.
|
|
3857
|
-
*/
|
|
3858
|
-
label: e.node,
|
|
3859
|
-
/**
|
|
3860
|
-
* If `true`, calls `renderLoading` instead of rendering the day calendar.
|
|
3861
|
-
* Can be used to preload information and show it in calendar.
|
|
3862
|
-
* @default false
|
|
3863
|
-
*/
|
|
3864
|
-
loading: e.bool,
|
|
3865
|
-
/**
|
|
3866
|
-
* Locale for components texts.
|
|
3867
|
-
* Allows overriding texts coming from `LocalizationProvider` and `theme`.
|
|
3868
|
-
*/
|
|
3869
|
-
localeText: e.object,
|
|
3870
|
-
/**
|
|
3871
|
-
* Maximal selectable date.
|
|
3872
|
-
*/
|
|
3873
|
-
maxDate: e.any,
|
|
3874
|
-
/**
|
|
3875
|
-
* Maximal selectable moment of time with binding to date, to set max time in each day use `maxTime`.
|
|
3876
|
-
*/
|
|
3877
|
-
maxDateTime: e.any,
|
|
3878
|
-
/**
|
|
3879
|
-
* Maximal selectable time.
|
|
3880
|
-
* The date part of the object will be ignored unless `props.disableIgnoringDatePartForTimeValidation === true`.
|
|
3881
|
-
*/
|
|
3882
|
-
maxTime: e.any,
|
|
3883
|
-
/**
|
|
3884
|
-
* Minimal selectable date.
|
|
3885
|
-
*/
|
|
3886
|
-
minDate: e.any,
|
|
3887
|
-
/**
|
|
3888
|
-
* Minimal selectable moment of time with binding to date, to set min time in each day use `minTime`.
|
|
3889
|
-
*/
|
|
3890
|
-
minDateTime: e.any,
|
|
3891
|
-
/**
|
|
3892
|
-
* Minimal selectable time.
|
|
3893
|
-
* The date part of the object will be ignored unless `props.disableIgnoringDatePartForTimeValidation === true`.
|
|
3894
|
-
*/
|
|
3895
|
-
minTime: e.any,
|
|
3896
|
-
/**
|
|
3897
|
-
* Step over minutes.
|
|
3898
|
-
* @default 1
|
|
3899
|
-
*/
|
|
3900
|
-
minutesStep: e.number,
|
|
3901
|
-
/**
|
|
3902
|
-
* Months rendered per row.
|
|
3903
|
-
* @default 3
|
|
3904
|
-
*/
|
|
3905
|
-
monthsPerRow: e.oneOf([3, 4]),
|
|
3906
|
-
/**
|
|
3907
|
-
* Callback fired when the value is accepted.
|
|
3908
|
-
* @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value.
|
|
3909
|
-
* @param {TValue} value The value that was just accepted.
|
|
3910
|
-
*/
|
|
3911
|
-
onAccept: e.func,
|
|
3912
|
-
/**
|
|
3913
|
-
* Callback fired when the value changes.
|
|
3914
|
-
* @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value.
|
|
3915
|
-
* @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value.
|
|
3916
|
-
* @param {TValue} value The new value.
|
|
3917
|
-
* @param {FieldChangeHandlerContext<TError>} context The context containing the validation result of the current value.
|
|
3918
|
-
*/
|
|
3919
|
-
onChange: e.func,
|
|
3920
|
-
/**
|
|
3921
|
-
* Callback fired when the popup requests to be closed.
|
|
3922
|
-
* Use in controlled mode (see `open`).
|
|
3923
|
-
*/
|
|
3924
|
-
onClose: e.func,
|
|
3925
|
-
/**
|
|
3926
|
-
* Callback fired when the error associated to the current value changes.
|
|
3927
|
-
* If the error has a non-null value, then the `TextField` will be rendered in `error` state.
|
|
3928
|
-
*
|
|
3929
|
-
* @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value.
|
|
3930
|
-
* @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value.
|
|
3931
|
-
* @param {TError} error The new error describing why the current value is not valid.
|
|
3932
|
-
* @param {TValue} value The value associated to the error.
|
|
3933
|
-
*/
|
|
3934
|
-
onError: e.func,
|
|
3935
|
-
/**
|
|
3936
|
-
* Callback fired on month change.
|
|
3937
|
-
* @template TDate
|
|
3938
|
-
* @param {TDate} month The new month.
|
|
3939
|
-
*/
|
|
3940
|
-
onMonthChange: e.func,
|
|
3941
|
-
/**
|
|
3942
|
-
* Callback fired when the popup requests to be opened.
|
|
3943
|
-
* Use in controlled mode (see `open`).
|
|
3944
|
-
*/
|
|
3945
|
-
onOpen: e.func,
|
|
3946
|
-
/**
|
|
3947
|
-
* Callback fired when the selected sections change.
|
|
3948
|
-
* @param {FieldSelectedSections} newValue The new selected sections.
|
|
3949
|
-
*/
|
|
3950
|
-
onSelectedSectionsChange: e.func,
|
|
3951
|
-
/**
|
|
3952
|
-
* Callback fired on view change.
|
|
3953
|
-
* @template TView
|
|
3954
|
-
* @param {TView} view The new view.
|
|
3955
|
-
*/
|
|
3956
|
-
onViewChange: e.func,
|
|
3957
|
-
/**
|
|
3958
|
-
* Callback fired on year change.
|
|
3959
|
-
* @template TDate
|
|
3960
|
-
* @param {TDate} year The new year.
|
|
3961
|
-
*/
|
|
3962
|
-
onYearChange: e.func,
|
|
3963
|
-
/**
|
|
3964
|
-
* Control the popup or dialog open state.
|
|
3965
|
-
* @default false
|
|
3966
|
-
*/
|
|
3967
|
-
open: e.bool,
|
|
3968
|
-
/**
|
|
3969
|
-
* The default visible view.
|
|
3970
|
-
* Used when the component view is not controlled.
|
|
3971
|
-
* Must be a valid option from `views` list.
|
|
3972
|
-
*/
|
|
3973
|
-
openTo: e.oneOf(["day", "hours", "minutes", "month", "seconds", "year"]),
|
|
3974
|
-
/**
|
|
3975
|
-
* Force rendering in particular orientation.
|
|
3976
|
-
*/
|
|
3977
|
-
orientation: e.oneOf(["landscape", "portrait"]),
|
|
3978
|
-
readOnly: e.bool,
|
|
3979
|
-
/**
|
|
3980
|
-
* Disable heavy animations.
|
|
3981
|
-
* @default typeof navigator !== 'undefined' && /(android)/i.test(navigator.userAgent)
|
|
3982
|
-
*/
|
|
3983
|
-
reduceAnimations: e.bool,
|
|
3984
|
-
/**
|
|
3985
|
-
* Component displaying when passed `loading` true.
|
|
3986
|
-
* @returns {React.ReactNode} The node to render when loading.
|
|
3987
|
-
* @default () => <span data-mui-test="loading-progress">...</span>
|
|
3988
|
-
*/
|
|
3989
|
-
renderLoading: e.func,
|
|
3990
|
-
/**
|
|
3991
|
-
* The currently selected sections.
|
|
3992
|
-
* This prop accept four formats:
|
|
3993
|
-
* 1. If a number is provided, the section at this index will be selected.
|
|
3994
|
-
* 2. If an object with a `startIndex` and `endIndex` properties are provided, the sections between those two indexes will be selected.
|
|
3995
|
-
* 3. If a string of type `FieldSectionType` is provided, the first section with that name will be selected.
|
|
3996
|
-
* 4. If `null` is provided, no section will be selected
|
|
3997
|
-
* If not provided, the selected sections will be handled internally.
|
|
3998
|
-
*/
|
|
3999
|
-
selectedSections: e.oneOfType([e.oneOf(["all", "day", "hours", "meridiem", "minutes", "month", "seconds", "weekDay", "year"]), e.number, e.shape({
|
|
4000
|
-
endIndex: e.number.isRequired,
|
|
4001
|
-
startIndex: e.number.isRequired
|
|
4002
|
-
})]),
|
|
4003
|
-
/**
|
|
4004
|
-
* Disable specific clock time.
|
|
4005
|
-
* @param {number} clockValue The value to check.
|
|
4006
|
-
* @param {TimeView} view The clock type of the timeValue.
|
|
4007
|
-
* @returns {boolean} If `true` the time will be disabled.
|
|
4008
|
-
* @deprecated Consider using `shouldDisableTime`.
|
|
4009
|
-
*/
|
|
4010
|
-
shouldDisableClock: e.func,
|
|
4011
|
-
/**
|
|
4012
|
-
* Disable specific date.
|
|
4013
|
-
* @template TDate
|
|
4014
|
-
* @param {TDate} day The date to test.
|
|
4015
|
-
* @returns {boolean} If `true` the date will be disabled.
|
|
4016
|
-
*/
|
|
4017
|
-
shouldDisableDate: e.func,
|
|
4018
|
-
/**
|
|
4019
|
-
* Disable specific month.
|
|
4020
|
-
* @template TDate
|
|
4021
|
-
* @param {TDate} month The month to test.
|
|
4022
|
-
* @returns {boolean} If `true`, the month will be disabled.
|
|
4023
|
-
*/
|
|
4024
|
-
shouldDisableMonth: e.func,
|
|
4025
|
-
/**
|
|
4026
|
-
* Disable specific time.
|
|
4027
|
-
* @template TDate
|
|
4028
|
-
* @param {TDate} value The value to check.
|
|
4029
|
-
* @param {TimeView} view The clock type of the timeValue.
|
|
4030
|
-
* @returns {boolean} If `true` the time will be disabled.
|
|
4031
|
-
*/
|
|
4032
|
-
shouldDisableTime: e.func,
|
|
4033
|
-
/**
|
|
4034
|
-
* Disable specific year.
|
|
4035
|
-
* @template TDate
|
|
4036
|
-
* @param {TDate} year The year to test.
|
|
4037
|
-
* @returns {boolean} If `true`, the year will be disabled.
|
|
4038
|
-
*/
|
|
4039
|
-
shouldDisableYear: e.func,
|
|
4040
|
-
/**
|
|
4041
|
-
* If `true`, days outside the current month are rendered:
|
|
4042
|
-
*
|
|
4043
|
-
* - if `fixedWeekNumber` is defined, renders days to have the weeks requested.
|
|
4044
|
-
*
|
|
4045
|
-
* - if `fixedWeekNumber` is not defined, renders day to fill the first and last week of the current month.
|
|
4046
|
-
*
|
|
4047
|
-
* - ignored if `calendars` equals more than `1` on range pickers.
|
|
4048
|
-
* @default false
|
|
4049
|
-
*/
|
|
4050
|
-
showDaysOutsideCurrentMonth: e.bool,
|
|
4051
|
-
/**
|
|
4052
|
-
* The props used for each component slot.
|
|
4053
|
-
* @default {}
|
|
4054
|
-
*/
|
|
4055
|
-
slotProps: e.object,
|
|
4056
|
-
/**
|
|
4057
|
-
* Overridable component slots.
|
|
4058
|
-
* @default {}
|
|
4059
|
-
*/
|
|
4060
|
-
slots: e.object,
|
|
4061
|
-
/**
|
|
4062
|
-
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
4063
|
-
*/
|
|
4064
|
-
sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
|
|
4065
|
-
/**
|
|
4066
|
-
* The selected value.
|
|
4067
|
-
* Used when the component is controlled.
|
|
4068
|
-
*/
|
|
4069
|
-
value: e.any,
|
|
4070
|
-
/**
|
|
4071
|
-
* The visible view.
|
|
4072
|
-
* Used when the component view is controlled.
|
|
4073
|
-
* Must be a valid option from `views` list.
|
|
4074
|
-
*/
|
|
4075
|
-
view: e.oneOf(["day", "hours", "minutes", "month", "seconds", "year"]),
|
|
4076
|
-
/**
|
|
4077
|
-
* Define custom view renderers for each section.
|
|
4078
|
-
* If `null`, the section will only have field editing.
|
|
4079
|
-
* If `undefined`, internally defined view will be the used.
|
|
4080
|
-
*/
|
|
4081
|
-
viewRenderers: e.shape({
|
|
4082
|
-
day: e.func,
|
|
4083
|
-
hours: e.func,
|
|
4084
|
-
minutes: e.func,
|
|
4085
|
-
month: e.func,
|
|
4086
|
-
seconds: e.func,
|
|
4087
|
-
year: e.func
|
|
4088
|
-
}),
|
|
4089
|
-
/**
|
|
4090
|
-
* Available views.
|
|
4091
|
-
*/
|
|
4092
|
-
views: e.arrayOf(e.oneOf(["day", "hours", "minutes", "month", "seconds", "year"]).isRequired),
|
|
4093
|
-
/**
|
|
4094
|
-
* Years rendered per row.
|
|
4095
|
-
* @default 4 on desktop, 3 on mobile
|
|
4096
|
-
*/
|
|
4097
|
-
yearsPerRow: e.oneOf([3, 4])
|
|
4098
|
-
});
|
|
4099
|
-
function Is({
|
|
4100
|
-
value: o,
|
|
4101
|
-
minDate: t,
|
|
4102
|
-
maxDate: s,
|
|
4103
|
-
onChange: r
|
|
4104
|
-
}) {
|
|
4105
|
-
const a = at(!1), n = (d) => {
|
|
4106
|
-
r({
|
|
4107
|
-
...o,
|
|
4108
|
-
startDate: be(d).format("YYYY-MM-DDTHH:mm:ssZ")
|
|
1
|
+
import { jsxs as n, Fragment as g, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { Edit as M } from "@mui/icons-material";
|
|
3
|
+
import { Dialog as S, DialogTitle as U, DialogContent as H, FormControlLabel as b, Checkbox as v, InputLabel as I, Select as x, MenuItem as L, DialogActions as k, Button as D } from "@mui/material";
|
|
4
|
+
import i from "dayjs";
|
|
5
|
+
import E from "../../../../hooks/useToggle.js";
|
|
6
|
+
import { DateTrigger as z, DateTriggerText as h, DateTriggerArrow as A, DateTriggerEditButton as O, DateLimitCaption as F, DatePicker as N, DateUnitRow as w, DateUnitControl as j, DateRangeInput as Y } from "../../styled.js";
|
|
7
|
+
const y = [
|
|
8
|
+
"MILLISECOND",
|
|
9
|
+
"SECOND",
|
|
10
|
+
"MINUTE",
|
|
11
|
+
"HOUR",
|
|
12
|
+
"DAY",
|
|
13
|
+
"MONTH",
|
|
14
|
+
"YEAR"
|
|
15
|
+
], Z = (C) => {
|
|
16
|
+
const { value: e, minDate: r, maxDate: m, onChange: l } = C, o = E(!1), u = (a) => {
|
|
17
|
+
l({
|
|
18
|
+
...e,
|
|
19
|
+
startDate: i(a).format("YYYY-MM-DDTHH:mm:ssZ")
|
|
4109
20
|
});
|
|
4110
|
-
},
|
|
4111
|
-
|
|
4112
|
-
},
|
|
4113
|
-
|
|
4114
|
-
...
|
|
4115
|
-
timeUnit:
|
|
21
|
+
}, p = (a) => {
|
|
22
|
+
l({ ...e, limitForScenarioTimeRange: a.target.checked });
|
|
23
|
+
}, R = (a) => {
|
|
24
|
+
l({
|
|
25
|
+
...e,
|
|
26
|
+
timeUnit: a.target.value
|
|
4116
27
|
});
|
|
4117
|
-
},
|
|
4118
|
-
const { name:
|
|
4119
|
-
|
|
4120
|
-
},
|
|
4121
|
-
|
|
4122
|
-
|
|
4123
|
-
|
|
28
|
+
}, s = (a) => {
|
|
29
|
+
const { name: T, value: f } = a.target;
|
|
30
|
+
l({ ...e, [T]: f });
|
|
31
|
+
}, c = e.startDate && e.timeUnit && e.startRange ? i(e.startDate).add(
|
|
32
|
+
e.startRange,
|
|
33
|
+
e.timeUnit.toLowerCase()
|
|
34
|
+
).format("DD/MM/YYYY HH:mm:ss.SSS") : "", d = e.startDate && e.timeUnit && e.endRange ? i(e.startDate).add(e.endRange, e.timeUnit.toLowerCase()).format("DD/MM/YYYY HH:mm:ss.SSS") : "";
|
|
35
|
+
return /* @__PURE__ */ n(g, { children: [
|
|
36
|
+
/* @__PURE__ */ n(
|
|
37
|
+
z,
|
|
4124
38
|
{
|
|
4125
|
-
|
|
4126
|
-
|
|
4127
|
-
border: 1,
|
|
4128
|
-
borderColor: (d) => d.palette.action.disabled,
|
|
4129
|
-
borderRadius: 1,
|
|
4130
|
-
px: 1,
|
|
4131
|
-
py: 0.5,
|
|
4132
|
-
height: 40,
|
|
4133
|
-
width: "100%",
|
|
4134
|
-
title: `${u} -> ${g}`,
|
|
4135
|
-
onClick: a.action.open,
|
|
39
|
+
title: `${c} -> ${d}`,
|
|
40
|
+
onClick: o.action.open,
|
|
4136
41
|
children: [
|
|
4137
|
-
/* @__PURE__ */
|
|
4138
|
-
|
|
4139
|
-
|
|
4140
|
-
|
|
4141
|
-
sx: {
|
|
4142
|
-
overflow: "hidden",
|
|
4143
|
-
whiteSpace: "nowrap",
|
|
4144
|
-
textOverflow: "ellipsis"
|
|
4145
|
-
},
|
|
4146
|
-
flex: 1,
|
|
4147
|
-
children: u
|
|
4148
|
-
}
|
|
4149
|
-
),
|
|
4150
|
-
/* @__PURE__ */ p(nt, { fontSize: "small", sx: { mx: 0.25 } }),
|
|
4151
|
-
/* @__PURE__ */ p(
|
|
4152
|
-
Ue,
|
|
4153
|
-
{
|
|
4154
|
-
variant: "body2",
|
|
4155
|
-
sx: {
|
|
4156
|
-
overflow: "hidden",
|
|
4157
|
-
whiteSpace: "nowrap",
|
|
4158
|
-
textOverflow: "ellipsis"
|
|
4159
|
-
},
|
|
4160
|
-
flex: 1,
|
|
4161
|
-
children: g
|
|
4162
|
-
}
|
|
4163
|
-
),
|
|
4164
|
-
/* @__PURE__ */ p(Uo, { size: "small", children: /* @__PURE__ */ p(st, { fontSize: "small" }) })
|
|
42
|
+
/* @__PURE__ */ t(h, { variant: "body2", children: c }),
|
|
43
|
+
/* @__PURE__ */ t(A, { fontSize: "small" }),
|
|
44
|
+
/* @__PURE__ */ t(h, { variant: "body2", children: d }),
|
|
45
|
+
/* @__PURE__ */ t(O, { size: "small", children: /* @__PURE__ */ t(M, { fontSize: "small" }) })
|
|
4165
46
|
]
|
|
4166
47
|
}
|
|
4167
48
|
),
|
|
4168
|
-
/* @__PURE__ */
|
|
4169
|
-
|
|
49
|
+
/* @__PURE__ */ n(
|
|
50
|
+
S,
|
|
4170
51
|
{
|
|
4171
|
-
open:
|
|
4172
|
-
onClose:
|
|
52
|
+
open: o.state.isOpen,
|
|
53
|
+
onClose: o.action.close,
|
|
4173
54
|
fullWidth: !0,
|
|
4174
55
|
maxWidth: "sm",
|
|
4175
56
|
children: [
|
|
4176
|
-
/* @__PURE__ */
|
|
4177
|
-
/* @__PURE__ */
|
|
4178
|
-
/* @__PURE__ */
|
|
4179
|
-
|
|
57
|
+
/* @__PURE__ */ t(U, { children: "Date Range" }),
|
|
58
|
+
/* @__PURE__ */ n(H, { children: [
|
|
59
|
+
/* @__PURE__ */ t(
|
|
60
|
+
b,
|
|
4180
61
|
{
|
|
4181
|
-
control: /* @__PURE__ */
|
|
4182
|
-
|
|
62
|
+
control: /* @__PURE__ */ t(
|
|
63
|
+
v,
|
|
4183
64
|
{
|
|
4184
|
-
checked:
|
|
4185
|
-
onChange:
|
|
65
|
+
checked: e.limitForScenarioTimeRange,
|
|
66
|
+
onChange: p
|
|
4186
67
|
}
|
|
4187
68
|
),
|
|
4188
|
-
label: /* @__PURE__ */
|
|
69
|
+
label: /* @__PURE__ */ n(g, { children: [
|
|
4189
70
|
"Limit range to scenario times",
|
|
4190
|
-
/* @__PURE__ */
|
|
71
|
+
/* @__PURE__ */ n(F, { variant: "caption", children: [
|
|
4191
72
|
"(",
|
|
4192
|
-
|
|
73
|
+
i(r).format("DD/MM/YYYY HH:mm"),
|
|
4193
74
|
" - ",
|
|
4194
|
-
|
|
75
|
+
i(m).format("DD/MM/YYYY HH:mm"),
|
|
4195
76
|
")"
|
|
4196
77
|
] })
|
|
4197
78
|
] }),
|
|
4198
79
|
title: "If checked, limits start and end time to scenario start and end time."
|
|
4199
80
|
}
|
|
4200
81
|
),
|
|
4201
|
-
/* @__PURE__ */
|
|
4202
|
-
|
|
82
|
+
/* @__PURE__ */ t(
|
|
83
|
+
N,
|
|
4203
84
|
{
|
|
4204
85
|
label: "Start Date",
|
|
4205
|
-
slotProps: {
|
|
4206
|
-
textField: {
|
|
4207
|
-
size: "small"
|
|
4208
|
-
}
|
|
4209
|
-
},
|
|
4210
|
-
sx: { mt: 1 },
|
|
86
|
+
slotProps: { textField: { size: "small" } },
|
|
4211
87
|
format: "DD/MM/YYYY HH:mm:ss",
|
|
4212
|
-
minDateTime:
|
|
4213
|
-
maxDateTime:
|
|
4214
|
-
value:
|
|
4215
|
-
onChange:
|
|
88
|
+
minDateTime: i(r),
|
|
89
|
+
maxDateTime: i(m),
|
|
90
|
+
value: i(e.startDate),
|
|
91
|
+
onChange: u
|
|
4216
92
|
}
|
|
4217
93
|
),
|
|
4218
|
-
/* @__PURE__ */
|
|
4219
|
-
/* @__PURE__ */
|
|
4220
|
-
/* @__PURE__ */
|
|
4221
|
-
/* @__PURE__ */
|
|
4222
|
-
|
|
94
|
+
/* @__PURE__ */ n(w, { children: [
|
|
95
|
+
/* @__PURE__ */ n(j, { size: "small", children: [
|
|
96
|
+
/* @__PURE__ */ t(I, { id: "timeUnit-label", children: "Time Unit" }),
|
|
97
|
+
/* @__PURE__ */ t(
|
|
98
|
+
x,
|
|
4223
99
|
{
|
|
4224
100
|
labelId: "timeUnit-label",
|
|
4225
101
|
id: "timeUnit",
|
|
4226
|
-
value:
|
|
102
|
+
value: e.timeUnit,
|
|
4227
103
|
label: "Time Unit",
|
|
4228
|
-
onChange:
|
|
4229
|
-
children:
|
|
4230
|
-
"MILLISECOND",
|
|
4231
|
-
"SECOND",
|
|
4232
|
-
"MINUTE",
|
|
4233
|
-
"HOUR",
|
|
4234
|
-
"DAY",
|
|
4235
|
-
"MONTH",
|
|
4236
|
-
"YEAR"
|
|
4237
|
-
].map((d) => /* @__PURE__ */ p(ot, { value: d, children: d }, d))
|
|
104
|
+
onChange: R,
|
|
105
|
+
children: y.map((a) => /* @__PURE__ */ t(L, { value: a, children: a }, a))
|
|
4238
106
|
}
|
|
4239
107
|
)
|
|
4240
108
|
] }),
|
|
4241
|
-
/* @__PURE__ */
|
|
4242
|
-
|
|
109
|
+
/* @__PURE__ */ t(
|
|
110
|
+
Y,
|
|
4243
111
|
{
|
|
4244
112
|
name: "startRange",
|
|
4245
113
|
label: "Range Start",
|
|
4246
114
|
size: "small",
|
|
4247
|
-
|
|
4248
|
-
|
|
4249
|
-
onChange: c
|
|
115
|
+
value: e.startRange,
|
|
116
|
+
onChange: s
|
|
4250
117
|
}
|
|
4251
118
|
),
|
|
4252
|
-
/* @__PURE__ */
|
|
4253
|
-
|
|
119
|
+
/* @__PURE__ */ t(
|
|
120
|
+
Y,
|
|
4254
121
|
{
|
|
4255
122
|
name: "endRange",
|
|
4256
123
|
label: "Range End",
|
|
4257
124
|
size: "small",
|
|
4258
|
-
|
|
4259
|
-
|
|
4260
|
-
onChange: c
|
|
125
|
+
value: e.endRange,
|
|
126
|
+
onChange: s
|
|
4261
127
|
}
|
|
4262
128
|
)
|
|
4263
129
|
] })
|
|
4264
130
|
] }),
|
|
4265
|
-
/* @__PURE__ */
|
|
4266
|
-
/* @__PURE__ */
|
|
4267
|
-
|
|
131
|
+
/* @__PURE__ */ n(k, { children: [
|
|
132
|
+
/* @__PURE__ */ t(
|
|
133
|
+
D,
|
|
4268
134
|
{
|
|
4269
135
|
variant: "contained",
|
|
4270
136
|
color: "inherit",
|
|
4271
|
-
onClick:
|
|
137
|
+
onClick: o.action.close,
|
|
4272
138
|
children: "Cancel"
|
|
4273
139
|
}
|
|
4274
140
|
),
|
|
4275
|
-
/* @__PURE__ */
|
|
141
|
+
/* @__PURE__ */ t(D, { variant: "contained", onClick: o.action.close, children: "OK" })
|
|
4276
142
|
] })
|
|
4277
143
|
]
|
|
4278
144
|
}
|
|
4279
145
|
)
|
|
4280
146
|
] });
|
|
4281
|
-
}
|
|
147
|
+
};
|
|
4282
148
|
export {
|
|
4283
|
-
|
|
149
|
+
Z as DateRange
|
|
4284
150
|
};
|