@vendorflow/components 2.1.1 → 3.0.5
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/lib/components/index.d.ts +1 -1
- package/lib/components/material-ui/Button/Button.d.ts +1 -1
- package/lib/components/material-ui/ButtonMenu/ButtonMenu.d.ts +2 -2
- package/lib/components/material-ui/ColorPicker/ColorPicker.d.ts +1 -1
- package/lib/components/material-ui/DataTable/Data.d.ts +1 -1
- package/lib/components/material-ui/DataTable/DataTable.d.ts +10 -77
- package/lib/components/material-ui/DataTable/FilterTool/Filters/MultiSelectFilter.d.ts +1 -1
- package/lib/components/material-ui/DataTable/FilterTool/Filters/RangeFilter.d.ts +1 -1
- package/lib/components/material-ui/DataTable/FilterTool/Filters/SingleSelectFilter.d.ts +1 -1
- package/lib/components/material-ui/DataTable/FilterTool/Filters/TextFilter.d.ts +1 -1
- package/lib/components/material-ui/DataTable/FilterTool/index.d.ts +2 -2
- package/lib/components/material-ui/DataTable/TablePieces/BodyRow.d.ts +1 -1
- package/lib/components/material-ui/DataTable/TablePieces/HeaderCell.d.ts +1 -1
- package/lib/components/material-ui/DataTable/TablePieces/Toolbar.d.ts +1 -1
- package/lib/components/material-ui/DataTable/index.d.ts +1 -1
- package/lib/components/material-ui/InputDate/InputDate.d.ts +2 -2
- package/lib/components/material-ui/InputDateTime/InputDateTime.d.ts +2 -2
- package/lib/components/material-ui/InputGroup/InputGroup.d.ts +1 -1
- package/lib/components/material-ui/InputSearchDropdown/InputSearchDropdown.d.ts +2 -2
- package/lib/components/material-ui/InputTime/InputTime.d.ts +2 -2
- package/lib/components/material-ui/Modal/Modal.d.ts +1 -1
- package/lib/index.js +3 -14
- package/lib/index.js.LICENSE.txt +29 -0
- package/lib/index.js.map +1 -0
- package/lib/types/Component.types.d.ts +9 -9
- package/lib/types/DataTable.types.d.ts +69 -0
- package/lib/types/index.d.ts +1 -0
- package/package.json +24 -103
- package/lib/TempHooks.d.ts +0 -9
- package/lib/TempHooks.js +0 -25
- package/lib/components/InfiniteScroll/InfiniteScroll.d.ts +0 -16
- package/lib/components/InfiniteScroll/InfiniteScroll.js +0 -159
- package/lib/components/InfiniteScroll/index.d.ts +0 -1
- package/lib/components/InfiniteScroll/index.js +0 -8
- package/lib/components/blueprint/InputGroup/InputGroup.d.ts +0 -20
- package/lib/components/blueprint/InputGroup/InputGroup.js +0 -13
- package/lib/components/blueprint/InputGroup/InputGroup.story.d.ts +0 -2
- package/lib/components/blueprint/InputGroup/InputGroup.story.js +0 -11
- package/lib/components/blueprint/InputGroup/index.d.ts +0 -1
- package/lib/components/blueprint/InputGroup/index.js +0 -4
- package/lib/components/blueprint/InputSelect/InputSelect.d.ts +0 -51
- package/lib/components/blueprint/InputSelect/InputSelect.js +0 -98
- package/lib/components/blueprint/InputSelect/InputSelect.story.d.ts +0 -3
- package/lib/components/blueprint/InputSelect/InputSelect.story.js +0 -19
- package/lib/components/blueprint/InputSelect/index.d.ts +0 -1
- package/lib/components/blueprint/InputSelect/index.js +0 -4
- package/lib/components/blueprint/InputTime/InputTime.d.ts +0 -24
- package/lib/components/blueprint/InputTime/InputTime.js +0 -28
- package/lib/components/blueprint/InputTime/InputTime.story.d.ts +0 -2
- package/lib/components/blueprint/InputTime/InputTime.story.js +0 -11
- package/lib/components/blueprint/InputTime/index.d.ts +0 -1
- package/lib/components/blueprint/InputTime/index.js +0 -4
- package/lib/components/index.js +0 -32
- package/lib/components/material-ui/AudioPlayer/AudioPlayer.js +0 -111
- package/lib/components/material-ui/AudioPlayer/AudioPlayer.story.js +0 -9
- package/lib/components/material-ui/AudioPlayer/index.js +0 -8
- package/lib/components/material-ui/Button/Button.js +0 -38
- package/lib/components/material-ui/Button/Button.story.js +0 -9
- package/lib/components/material-ui/Button/index.js +0 -8
- package/lib/components/material-ui/ButtonMenu/ButtonMenu.js +0 -115
- package/lib/components/material-ui/ButtonMenu/ButtonMenu.story.js +0 -79
- package/lib/components/material-ui/ButtonMenu/index.js +0 -8
- package/lib/components/material-ui/ChatInterface/ActionsMenu.d.ts +0 -4
- package/lib/components/material-ui/ChatInterface/ActionsMenu.js +0 -37
- package/lib/components/material-ui/ChatInterface/ChatInterface.d.ts +0 -33
- package/lib/components/material-ui/ChatInterface/ChatInterface.js +0 -109
- package/lib/components/material-ui/ChatInterface/ChatInterface.story.d.ts +0 -1
- package/lib/components/material-ui/ChatInterface/ChatInterface.story.js +0 -134
- package/lib/components/material-ui/ChatInterface/MessageInput.d.ts +0 -9
- package/lib/components/material-ui/ChatInterface/MessageInput.js +0 -53
- package/lib/components/material-ui/ChatInterface/MessageItem.d.ts +0 -8
- package/lib/components/material-ui/ChatInterface/MessageItem.js +0 -71
- package/lib/components/material-ui/ChatInterface/MessageThread.d.ts +0 -6
- package/lib/components/material-ui/ChatInterface/MessageThread.js +0 -119
- package/lib/components/material-ui/ChatInterface/index.d.ts +0 -1
- package/lib/components/material-ui/ChatInterface/index.js +0 -8
- package/lib/components/material-ui/ColorPicker/ColorPicker.js +0 -86
- package/lib/components/material-ui/ColorPicker/ColorPicker.story.js +0 -47
- package/lib/components/material-ui/ColorPicker/index.js +0 -8
- package/lib/components/material-ui/ColorPicker/styles.js +0 -24
- package/lib/components/material-ui/DataTable/AppliedFilters.d.ts +0 -12
- package/lib/components/material-ui/DataTable/AppliedFilters.js +0 -26
- package/lib/components/material-ui/DataTable/Data.js +0 -42
- package/lib/components/material-ui/DataTable/DataTable.js +0 -363
- package/lib/components/material-ui/DataTable/DataTable.story.js +0 -76
- package/lib/components/material-ui/DataTable/FilterTool/Filters/MultiSelectFilter.js +0 -63
- package/lib/components/material-ui/DataTable/FilterTool/Filters/RangeFilter.js +0 -76
- package/lib/components/material-ui/DataTable/FilterTool/Filters/SingleSelectFilter.js +0 -69
- package/lib/components/material-ui/DataTable/FilterTool/Filters/TextFilter.js +0 -52
- package/lib/components/material-ui/DataTable/FilterTool/index.js +0 -78
- package/lib/components/material-ui/DataTable/GlobalSearchFilter.d.ts +0 -10
- package/lib/components/material-ui/DataTable/GlobalSearchFilter.js +0 -49
- package/lib/components/material-ui/DataTable/IndeterminateCheckbox.d.ts +0 -4
- package/lib/components/material-ui/DataTable/IndeterminateCheckbox.js +0 -65
- package/lib/components/material-ui/DataTable/SortIndicator.d.ts +0 -10
- package/lib/components/material-ui/DataTable/SortIndicator.js +0 -33
- package/lib/components/material-ui/DataTable/TablePieces/AppliedFilters.js +0 -26
- package/lib/components/material-ui/DataTable/TablePieces/BodyCell.js +0 -50
- package/lib/components/material-ui/DataTable/TablePieces/BodyRow.js +0 -88
- package/lib/components/material-ui/DataTable/TablePieces/GlobalSearchFilter.js +0 -49
- package/lib/components/material-ui/DataTable/TablePieces/HeaderCell.js +0 -57
- package/lib/components/material-ui/DataTable/TablePieces/IndeterminateCheckbox.js +0 -65
- package/lib/components/material-ui/DataTable/TablePieces/SortIndicator.js +0 -33
- package/lib/components/material-ui/DataTable/TablePieces/Table.js +0 -47
- package/lib/components/material-ui/DataTable/TablePieces/TableBodyContent.js +0 -89
- package/lib/components/material-ui/DataTable/TablePieces/Toolbar.js +0 -59
- package/lib/components/material-ui/DataTable/TablePieces/ViewColumnTool.js +0 -77
- package/lib/components/material-ui/DataTable/Toolbar.d.ts +0 -24
- package/lib/components/material-ui/DataTable/Toolbar.js +0 -63
- package/lib/components/material-ui/DataTable/Utils.d.ts +0 -25
- package/lib/components/material-ui/DataTable/Utils.js +0 -119
- package/lib/components/material-ui/DataTable/ViewColumnTool.d.ts +0 -11
- package/lib/components/material-ui/DataTable/ViewColumnTool.js +0 -76
- package/lib/components/material-ui/DataTable/index.js +0 -8
- package/lib/components/material-ui/ErrorBoundary/ErrorBoundary.d.ts +0 -7
- package/lib/components/material-ui/ErrorBoundary/ErrorBoundary.js +0 -20
- package/lib/components/material-ui/ErrorBoundary/index.d.ts +0 -1
- package/lib/components/material-ui/ErrorBoundary/index.js +0 -8
- package/lib/components/material-ui/InputCheckboxGroup/InputCheckboxGroup.js +0 -99
- package/lib/components/material-ui/InputCheckboxGroup/InputCheckboxGroup.story.js +0 -52
- package/lib/components/material-ui/InputCheckboxGroup/index.js +0 -8
- package/lib/components/material-ui/InputDate/InputDate.js +0 -93
- package/lib/components/material-ui/InputDate/InputDate.story.js +0 -53
- package/lib/components/material-ui/InputDate/index.js +0 -8
- package/lib/components/material-ui/InputDateTime/InputDateTime.js +0 -82
- package/lib/components/material-ui/InputDateTime/InputDateTime.story.js +0 -53
- package/lib/components/material-ui/InputDateTime/index.js +0 -8
- package/lib/components/material-ui/InputGroup/InputGroup.js +0 -91
- package/lib/components/material-ui/InputGroup/InputGroup.story.js +0 -50
- package/lib/components/material-ui/InputGroup/index.js +0 -8
- package/lib/components/material-ui/InputRadioGroup/InputRadioGroup.js +0 -82
- package/lib/components/material-ui/InputRadioGroup/InputRadioGroup.story.js +0 -52
- package/lib/components/material-ui/InputRadioGroup/index.js +0 -8
- package/lib/components/material-ui/InputSearchDropdown/InputSearchDropdown.js +0 -146
- package/lib/components/material-ui/InputSearchDropdown/InputSearchDropdown.story.js +0 -66
- package/lib/components/material-ui/InputSearchDropdown/index.js +0 -8
- package/lib/components/material-ui/InputTime/InputTime.js +0 -82
- package/lib/components/material-ui/InputTime/InputTime.story.js +0 -53
- package/lib/components/material-ui/InputTime/index.js +0 -8
- package/lib/components/material-ui/Modal/Modal.js +0 -57
- package/lib/components/material-ui/Modal/Modal.story.js +0 -83
- package/lib/components/material-ui/Modal/index.js +0 -8
- package/lib/services/Select.service.d.ts +0 -5
- package/lib/services/Select.service.js +0 -67
- package/lib/stories/0-Inputs.stories.d.ts +0 -17
- package/lib/stories/0-Inputs.stories.js +0 -38
- package/lib/types/Component.types.js +0 -2
- package/lib/types/Internal.types.js +0 -2
- package/lib/types/index.js +0 -13
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
-
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
-
return cooked;
|
|
5
|
-
};
|
|
6
|
-
var __assign = (this && this.__assign) || function () {
|
|
7
|
-
__assign = Object.assign || function(t) {
|
|
8
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
9
|
-
s = arguments[i];
|
|
10
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
11
|
-
t[p] = s[p];
|
|
12
|
-
}
|
|
13
|
-
return t;
|
|
14
|
-
};
|
|
15
|
-
return __assign.apply(this, arguments);
|
|
16
|
-
};
|
|
17
|
-
var __read = (this && this.__read) || function (o, n) {
|
|
18
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
19
|
-
if (!m) return o;
|
|
20
|
-
var i = m.call(o), r, ar = [], e;
|
|
21
|
-
try {
|
|
22
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
23
|
-
}
|
|
24
|
-
catch (error) { e = { error: error }; }
|
|
25
|
-
finally {
|
|
26
|
-
try {
|
|
27
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
28
|
-
}
|
|
29
|
-
finally { if (e) throw e.error; }
|
|
30
|
-
}
|
|
31
|
-
return ar;
|
|
32
|
-
};
|
|
33
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
34
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
35
|
-
};
|
|
36
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
-
/** @jsxRuntime classic */
|
|
38
|
-
/** @jsx jsx */
|
|
39
|
-
var react_1 = require("@emotion/react");
|
|
40
|
-
var react_2 = require("react");
|
|
41
|
-
var material_1 = require("@mui/material");
|
|
42
|
-
var icons_material_1 = require("@mui/icons-material");
|
|
43
|
-
var nanoid_1 = require("nanoid");
|
|
44
|
-
var IndeterminateCheckbox_1 = __importDefault(require("./IndeterminateCheckbox"));
|
|
45
|
-
function ViewColumnTool(_a) {
|
|
46
|
-
var allColumns = _a.allColumns, columnNameById = _a.columnNameById;
|
|
47
|
-
var id = (0, react_2.useMemo)(function () { return (0, nanoid_1.nanoid)(); }, []);
|
|
48
|
-
var _b = __read((0, react_2.useState)(null), 2), anchorEl = _b[0], setAnchorEl = _b[1];
|
|
49
|
-
var open = !!anchorEl;
|
|
50
|
-
function handleClick(evt) {
|
|
51
|
-
setAnchorEl(evt.currentTarget);
|
|
52
|
-
}
|
|
53
|
-
function handleClose() {
|
|
54
|
-
setAnchorEl(null);
|
|
55
|
-
}
|
|
56
|
-
return ((0, react_1.jsx)(react_2.Fragment, null,
|
|
57
|
-
(0, react_1.jsx)(material_1.Tooltip, { title: "Show Columns" },
|
|
58
|
-
(0, react_1.jsx)(material_1.IconButton, { "aria-describedby": id, onClick: handleClick },
|
|
59
|
-
(0, react_1.jsx)(icons_material_1.ViewColumn, null))),
|
|
60
|
-
(0, react_1.jsx)(material_1.Popover, { id: id, open: open, anchorEl: anchorEl, onClose: handleClose, anchorOrigin: { vertical: 'bottom', horizontal: 'center' } },
|
|
61
|
-
(0, react_1.jsx)("div", { css: (0, react_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n padding: 0.5rem;\n "], ["\n padding: 0.5rem;\n "]))) },
|
|
62
|
-
(0, react_1.jsx)("div", { css: (0, react_1.css)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: flex;\n flex-direction: row;\n justify-content: flex-start;\n align-items: center;\n "], ["\n display: flex;\n flex-direction: row;\n justify-content: flex-start;\n align-items: center;\n "]))) },
|
|
63
|
-
(0, react_1.jsx)(material_1.Typography, { css: (0, react_1.css)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n font-size: 14px;\n color: rgba(0, 0, 0, 0.54);\n "], ["\n font-size: 14px;\n color: rgba(0, 0, 0, 0.54);\n "]))) }, "Show Columns"),
|
|
64
|
-
(0, react_1.jsx)(material_1.Tooltip, { title: "Close" },
|
|
65
|
-
(0, react_1.jsx)(material_1.IconButton, { onClick: handleClose },
|
|
66
|
-
(0, react_1.jsx)(icons_material_1.Close, null)))),
|
|
67
|
-
(0, react_1.jsx)("div", { css: (0, react_1.css)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n align-items: flex-start;\n "], ["\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n align-items: flex-start;\n "]))) }, allColumns
|
|
68
|
-
.filter(function (column) { return column.id !== 'custom'; })
|
|
69
|
-
.map(function (column) {
|
|
70
|
-
return ((0, react_1.jsx)(material_1.FormControlLabel, { key: column.id, label: columnNameById[column.id],
|
|
71
|
-
// @ts-ignore
|
|
72
|
-
control: (0, react_1.jsx)(IndeterminateCheckbox_1.default, __assign({}, column.getToggleHiddenProps())) }));
|
|
73
|
-
}))))));
|
|
74
|
-
}
|
|
75
|
-
exports.default = ViewColumnTool;
|
|
76
|
-
var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var DataTable_1 = require("./DataTable");
|
|
8
|
-
Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(DataTable_1).default; } });
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
-
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
-
return cooked;
|
|
5
|
-
};
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
/** @jsx jsx */
|
|
8
|
-
var react_1 = require("@emotion/react");
|
|
9
|
-
var material_1 = require("@mui/material");
|
|
10
|
-
var react_error_boundary_1 = require("react-error-boundary");
|
|
11
|
-
function ErrorFallback(_a) {
|
|
12
|
-
var resetErrorBoundary = _a.resetErrorBoundary;
|
|
13
|
-
return ((0, react_1.jsx)(material_1.Alert, { css: (0, react_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n width: 100%;\n "], ["\n width: 100%;\n "]))), severity: "error", action: (0, react_1.jsx)(material_1.Button, { color: "inherit", size: "small", onClick: resetErrorBoundary }, "Reload") }, "Something went wrong when trying to load this view's data. Please try to reload the data again."));
|
|
14
|
-
}
|
|
15
|
-
function ErrorBoundary(_a) {
|
|
16
|
-
var children = _a.children, onReset = _a.onReset;
|
|
17
|
-
return ((0, react_1.jsx)(react_error_boundary_1.ErrorBoundary, { FallbackComponent: ErrorFallback, onReset: onReset }, children));
|
|
18
|
-
}
|
|
19
|
-
exports.default = ErrorBoundary;
|
|
20
|
-
var templateObject_1;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from './ErrorBoundary';
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var ErrorBoundary_1 = require("./ErrorBoundary");
|
|
8
|
-
Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(ErrorBoundary_1).default; } });
|
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
-
}) : function(o, v) {
|
|
12
|
-
o["default"] = v;
|
|
13
|
-
});
|
|
14
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
-
if (mod && mod.__esModule) return mod;
|
|
16
|
-
var result = {};
|
|
17
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
-
__setModuleDefault(result, mod);
|
|
19
|
-
return result;
|
|
20
|
-
};
|
|
21
|
-
var __read = (this && this.__read) || function (o, n) {
|
|
22
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
23
|
-
if (!m) return o;
|
|
24
|
-
var i = m.call(o), r, ar = [], e;
|
|
25
|
-
try {
|
|
26
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
27
|
-
}
|
|
28
|
-
catch (error) { e = { error: error }; }
|
|
29
|
-
finally {
|
|
30
|
-
try {
|
|
31
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
32
|
-
}
|
|
33
|
-
finally { if (e) throw e.error; }
|
|
34
|
-
}
|
|
35
|
-
return ar;
|
|
36
|
-
};
|
|
37
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
38
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
39
|
-
};
|
|
40
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
41
|
-
var react_1 = __importStar(require("react"));
|
|
42
|
-
var immer_1 = __importDefault(require("immer"));
|
|
43
|
-
var lodash_1 = require("lodash");
|
|
44
|
-
var material_1 = require("@mui/material");
|
|
45
|
-
function InputCheckboxGroup(props) {
|
|
46
|
-
var className = props.className, style = props.style, _a = props.color, color = _a === void 0 ? 'primary' : _a, disabled = props.disabled, error = props.error, helperText = props.helperText, label = props.label, name = props.name, onChange = props.onChange, options = props.options, _b = props.multi, multi = _b === void 0 ? true : _b, _c = props.size, size = _c === void 0 ? 'small' : _c;
|
|
47
|
-
var _d = __read((0, react_1.useState)({}), 2), values = _d[0], setValues = _d[1];
|
|
48
|
-
(0, react_1.useEffect)(function () {
|
|
49
|
-
var newValues = {};
|
|
50
|
-
options.forEach(function (_a) {
|
|
51
|
-
var label = _a.label;
|
|
52
|
-
if (values.hasOwnProperty(label)) {
|
|
53
|
-
newValues[label] = values[label];
|
|
54
|
-
}
|
|
55
|
-
else {
|
|
56
|
-
newValues[label] = false;
|
|
57
|
-
}
|
|
58
|
-
});
|
|
59
|
-
setValues(newValues);
|
|
60
|
-
}, [options]); // eslint-disable-line
|
|
61
|
-
function handleOnChange(event) {
|
|
62
|
-
var _a = event.target, targetName = _a.name, checked = _a.checked;
|
|
63
|
-
var newValues = (0, immer_1.default)(values, function (draft) {
|
|
64
|
-
if (multi) {
|
|
65
|
-
draft[targetName] = checked;
|
|
66
|
-
}
|
|
67
|
-
else {
|
|
68
|
-
(0, lodash_1.forEach)(draft, function (checked, name) {
|
|
69
|
-
if (name !== targetName) {
|
|
70
|
-
draft[name] = false;
|
|
71
|
-
}
|
|
72
|
-
else {
|
|
73
|
-
draft[name] = !draft[name];
|
|
74
|
-
}
|
|
75
|
-
});
|
|
76
|
-
}
|
|
77
|
-
});
|
|
78
|
-
setValues(newValues);
|
|
79
|
-
onChange({
|
|
80
|
-
target: {
|
|
81
|
-
name: name,
|
|
82
|
-
value: (0, lodash_1.reduce)(newValues, function (result, checked, key) {
|
|
83
|
-
return checked ? result.concat([key]) : result;
|
|
84
|
-
}, []),
|
|
85
|
-
},
|
|
86
|
-
});
|
|
87
|
-
}
|
|
88
|
-
function renderOptions() {
|
|
89
|
-
return options.map(function (_a) {
|
|
90
|
-
var label = _a.label, value = _a.value;
|
|
91
|
-
return (react_1.default.createElement(material_1.FormControlLabel, { key: label, label: label, control: react_1.default.createElement(material_1.Checkbox, { color: color, disabled: disabled, onChange: handleOnChange, checked: values[value] || false, name: label, size: size }) }));
|
|
92
|
-
});
|
|
93
|
-
}
|
|
94
|
-
return (react_1.default.createElement(material_1.FormControl, { className: className, style: style, component: "fieldset", error: error },
|
|
95
|
-
react_1.default.createElement(material_1.FormLabel, { component: "legend" }, label),
|
|
96
|
-
react_1.default.createElement(material_1.FormGroup, null, !(0, lodash_1.isEmpty)(options) ? renderOptions() : react_1.default.createElement("div", null)),
|
|
97
|
-
react_1.default.createElement(material_1.FormHelperText, null, helperText)));
|
|
98
|
-
}
|
|
99
|
-
exports.default = InputCheckboxGroup;
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
-
}) : function(o, v) {
|
|
12
|
-
o["default"] = v;
|
|
13
|
-
});
|
|
14
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
-
if (mod && mod.__esModule) return mod;
|
|
16
|
-
var result = {};
|
|
17
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
-
__setModuleDefault(result, mod);
|
|
19
|
-
return result;
|
|
20
|
-
};
|
|
21
|
-
var __read = (this && this.__read) || function (o, n) {
|
|
22
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
23
|
-
if (!m) return o;
|
|
24
|
-
var i = m.call(o), r, ar = [], e;
|
|
25
|
-
try {
|
|
26
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
27
|
-
}
|
|
28
|
-
catch (error) { e = { error: error }; }
|
|
29
|
-
finally {
|
|
30
|
-
try {
|
|
31
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
32
|
-
}
|
|
33
|
-
finally { if (e) throw e.error; }
|
|
34
|
-
}
|
|
35
|
-
return ar;
|
|
36
|
-
};
|
|
37
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
38
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
39
|
-
};
|
|
40
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
41
|
-
var react_1 = __importStar(require("react"));
|
|
42
|
-
var InputCheckboxGroup_1 = __importDefault(require("./InputCheckboxGroup"));
|
|
43
|
-
var options = [
|
|
44
|
-
{ label: 'Apple', value: 'apple' },
|
|
45
|
-
{ label: 'Banana', value: 'banana' },
|
|
46
|
-
{ label: 'Orange', value: 'orange' },
|
|
47
|
-
];
|
|
48
|
-
var InputCheckboxGroup = function () {
|
|
49
|
-
var _a = __read((0, react_1.useState)([]), 2), value = _a[0], setValue = _a[1];
|
|
50
|
-
return (react_1.default.createElement(InputCheckboxGroup_1.default, { label: "Fruit", name: "fruit", helperText: "Please choose one", options: options, values: value, onChange: function (evt) { return setValue(evt.target.value || []); } }));
|
|
51
|
-
};
|
|
52
|
-
exports.default = InputCheckboxGroup;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var InputCheckboxGroup_1 = require("./InputCheckboxGroup");
|
|
8
|
-
Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(InputCheckboxGroup_1).default; } });
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
|
-
if (k2 === undefined) k2 = k;
|
|
15
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
16
|
-
}) : (function(o, m, k, k2) {
|
|
17
|
-
if (k2 === undefined) k2 = k;
|
|
18
|
-
o[k2] = m[k];
|
|
19
|
-
}));
|
|
20
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
21
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
22
|
-
}) : function(o, v) {
|
|
23
|
-
o["default"] = v;
|
|
24
|
-
});
|
|
25
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
26
|
-
if (mod && mod.__esModule) return mod;
|
|
27
|
-
var result = {};
|
|
28
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
29
|
-
__setModuleDefault(result, mod);
|
|
30
|
-
return result;
|
|
31
|
-
};
|
|
32
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
33
|
-
var t = {};
|
|
34
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
35
|
-
t[p] = s[p];
|
|
36
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
37
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
38
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
39
|
-
t[p[i]] = s[p[i]];
|
|
40
|
-
}
|
|
41
|
-
return t;
|
|
42
|
-
};
|
|
43
|
-
var __read = (this && this.__read) || function (o, n) {
|
|
44
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
45
|
-
if (!m) return o;
|
|
46
|
-
var i = m.call(o), r, ar = [], e;
|
|
47
|
-
try {
|
|
48
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
49
|
-
}
|
|
50
|
-
catch (error) { e = { error: error }; }
|
|
51
|
-
finally {
|
|
52
|
-
try {
|
|
53
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
54
|
-
}
|
|
55
|
-
finally { if (e) throw e.error; }
|
|
56
|
-
}
|
|
57
|
-
return ar;
|
|
58
|
-
};
|
|
59
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
60
|
-
var react_1 = __importStar(require("react"));
|
|
61
|
-
var date_fns_1 = require("date-fns");
|
|
62
|
-
var lab_1 = require("@mui/lab");
|
|
63
|
-
var material_1 = require("@mui/material");
|
|
64
|
-
var lodash_1 = require("lodash");
|
|
65
|
-
var nanoid_1 = require("nanoid");
|
|
66
|
-
function InputDate(props) {
|
|
67
|
-
var id = (0, react_1.useRef)((0, nanoid_1.nanoid)());
|
|
68
|
-
var _a = props.clearable, clearable = _a === void 0 ? true : _a, label = props.label, name = props.name, onChange = props.onChange, _b = props.inputFormat, inputFormat = _b === void 0 ? 'MM/dd/yyyy' : _b, _c = props.InputProps, InputProps = _c === void 0 ? {} : _c, restOfProps = __rest(props, ["clearable", "label", "name", "onChange", "inputFormat", "InputProps"]);
|
|
69
|
-
var _d = __read((0, react_1.useState)(null), 2), value = _d[0], setValue = _d[1];
|
|
70
|
-
(0, react_1.useEffect)(function () {
|
|
71
|
-
var datetime = convertToDateTime(props.value);
|
|
72
|
-
if (((0, lodash_1.isNull)(value) && !(0, lodash_1.isNull)(datetime)) ||
|
|
73
|
-
(!(0, lodash_1.isNull)(value) && (0, lodash_1.isNull)(datetime)) ||
|
|
74
|
-
(value && !(0, date_fns_1.isSameDay)(datetime, value))) {
|
|
75
|
-
setValue(datetime);
|
|
76
|
-
}
|
|
77
|
-
}, [props.value]);
|
|
78
|
-
function handleOnChange(date) {
|
|
79
|
-
setValue(date);
|
|
80
|
-
if (date === null || (0, date_fns_1.isValid)(date)) {
|
|
81
|
-
var localDate = convertToLocalDate(date);
|
|
82
|
-
onChange({ target: { name: name, value: localDate } });
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
function convertToLocalDate(date) {
|
|
86
|
-
return date && (0, date_fns_1.isValid)(date) ? (0, date_fns_1.formatISO)(date, { representation: 'date' }) : null;
|
|
87
|
-
}
|
|
88
|
-
function convertToDateTime(date) {
|
|
89
|
-
return date ? (0, date_fns_1.parseISO)(date) : null;
|
|
90
|
-
}
|
|
91
|
-
return (react_1.default.createElement(lab_1.DatePicker, __assign({}, restOfProps, { clearable: clearable, inputFormat: inputFormat, renderInput: function (params) { return (react_1.default.createElement(material_1.TextField, __assign({}, params, InputProps, { id: id.current, size: (InputProps === null || InputProps === void 0 ? void 0 : InputProps.size) || 'small' }))); }, label: label, onChange: handleOnChange, value: value })));
|
|
92
|
-
}
|
|
93
|
-
exports.default = InputDate;
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
-
}) : function(o, v) {
|
|
12
|
-
o["default"] = v;
|
|
13
|
-
});
|
|
14
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
-
if (mod && mod.__esModule) return mod;
|
|
16
|
-
var result = {};
|
|
17
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
-
__setModuleDefault(result, mod);
|
|
19
|
-
return result;
|
|
20
|
-
};
|
|
21
|
-
var __read = (this && this.__read) || function (o, n) {
|
|
22
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
23
|
-
if (!m) return o;
|
|
24
|
-
var i = m.call(o), r, ar = [], e;
|
|
25
|
-
try {
|
|
26
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
27
|
-
}
|
|
28
|
-
catch (error) { e = { error: error }; }
|
|
29
|
-
finally {
|
|
30
|
-
try {
|
|
31
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
32
|
-
}
|
|
33
|
-
finally { if (e) throw e.error; }
|
|
34
|
-
}
|
|
35
|
-
return ar;
|
|
36
|
-
};
|
|
37
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
38
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
39
|
-
};
|
|
40
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
41
|
-
var react_1 = __importStar(require("react"));
|
|
42
|
-
var lab_1 = require("@mui/lab");
|
|
43
|
-
var AdapterDateFns_1 = __importDefault(require("@mui/lab/AdapterDateFns"));
|
|
44
|
-
var InputDate_1 = __importDefault(require("./InputDate"));
|
|
45
|
-
var InputDate = function () {
|
|
46
|
-
var _a = __read((0, react_1.useState)(null), 2), value = _a[0], setValue = _a[1];
|
|
47
|
-
return (react_1.default.createElement(lab_1.LocalizationProvider, { dateAdapter: AdapterDateFns_1.default },
|
|
48
|
-
react_1.default.createElement(InputDate_1.default, { label: "Bedtime", value: value, onChange: function (_a) {
|
|
49
|
-
var value = _a.target.value;
|
|
50
|
-
return setValue(value);
|
|
51
|
-
}, InputProps: { helperText: 'Go to sleep', error: true } })));
|
|
52
|
-
};
|
|
53
|
-
exports.default = InputDate;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var InputDate_1 = require("./InputDate");
|
|
8
|
-
Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(InputDate_1).default; } });
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
|
-
if (k2 === undefined) k2 = k;
|
|
15
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
16
|
-
}) : (function(o, m, k, k2) {
|
|
17
|
-
if (k2 === undefined) k2 = k;
|
|
18
|
-
o[k2] = m[k];
|
|
19
|
-
}));
|
|
20
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
21
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
22
|
-
}) : function(o, v) {
|
|
23
|
-
o["default"] = v;
|
|
24
|
-
});
|
|
25
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
26
|
-
if (mod && mod.__esModule) return mod;
|
|
27
|
-
var result = {};
|
|
28
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
29
|
-
__setModuleDefault(result, mod);
|
|
30
|
-
return result;
|
|
31
|
-
};
|
|
32
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
33
|
-
var t = {};
|
|
34
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
35
|
-
t[p] = s[p];
|
|
36
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
37
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
38
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
39
|
-
t[p[i]] = s[p[i]];
|
|
40
|
-
}
|
|
41
|
-
return t;
|
|
42
|
-
};
|
|
43
|
-
var __read = (this && this.__read) || function (o, n) {
|
|
44
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
45
|
-
if (!m) return o;
|
|
46
|
-
var i = m.call(o), r, ar = [], e;
|
|
47
|
-
try {
|
|
48
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
49
|
-
}
|
|
50
|
-
catch (error) { e = { error: error }; }
|
|
51
|
-
finally {
|
|
52
|
-
try {
|
|
53
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
54
|
-
}
|
|
55
|
-
finally { if (e) throw e.error; }
|
|
56
|
-
}
|
|
57
|
-
return ar;
|
|
58
|
-
};
|
|
59
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
60
|
-
var react_1 = __importStar(require("react"));
|
|
61
|
-
var date_fns_1 = require("date-fns");
|
|
62
|
-
var lab_1 = require("@mui/lab");
|
|
63
|
-
var material_1 = require("@mui/material");
|
|
64
|
-
var nanoid_1 = require("nanoid");
|
|
65
|
-
function InputDateTime(props) {
|
|
66
|
-
var _a = props.clearable, clearable = _a === void 0 ? true : _a, _b = props.inputFormat, inputFormat = _b === void 0 ? 'MM/dd/yyyy HH:mm' : _b, _c = props.InputProps, InputProps = _c === void 0 ? {} : _c, label = props.label, name = props.name, onChange = props.onChange, restOfProps = __rest(props, ["clearable", "inputFormat", "InputProps", "label", "name", "onChange"]);
|
|
67
|
-
var id = (0, react_1.useRef)((0, nanoid_1.nanoid)());
|
|
68
|
-
var _d = __read((0, react_1.useState)(null), 2), value = _d[0], setValue = _d[1];
|
|
69
|
-
(0, react_1.useEffect)(function () {
|
|
70
|
-
if (props.value !== value) {
|
|
71
|
-
setValue(props.value);
|
|
72
|
-
}
|
|
73
|
-
}, [props.value]);
|
|
74
|
-
function handleOnChange(date) {
|
|
75
|
-
setValue(date);
|
|
76
|
-
if (date === null || (0, date_fns_1.isValid)(date)) {
|
|
77
|
-
onChange({ target: { name: name, value: date ? (0, date_fns_1.formatISO)(date) : null } });
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
return (react_1.default.createElement(lab_1.DateTimePicker, __assign({}, restOfProps, { clearable: clearable, inputFormat: inputFormat, label: label, onChange: handleOnChange, renderInput: function (params) { return (react_1.default.createElement(material_1.TextField, __assign({}, params, InputProps, { id: id.current, size: (InputProps === null || InputProps === void 0 ? void 0 : InputProps.size) || 'small' }))); }, value: value })));
|
|
81
|
-
}
|
|
82
|
-
exports.default = InputDateTime;
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
-
}) : function(o, v) {
|
|
12
|
-
o["default"] = v;
|
|
13
|
-
});
|
|
14
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
-
if (mod && mod.__esModule) return mod;
|
|
16
|
-
var result = {};
|
|
17
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
-
__setModuleDefault(result, mod);
|
|
19
|
-
return result;
|
|
20
|
-
};
|
|
21
|
-
var __read = (this && this.__read) || function (o, n) {
|
|
22
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
23
|
-
if (!m) return o;
|
|
24
|
-
var i = m.call(o), r, ar = [], e;
|
|
25
|
-
try {
|
|
26
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
27
|
-
}
|
|
28
|
-
catch (error) { e = { error: error }; }
|
|
29
|
-
finally {
|
|
30
|
-
try {
|
|
31
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
32
|
-
}
|
|
33
|
-
finally { if (e) throw e.error; }
|
|
34
|
-
}
|
|
35
|
-
return ar;
|
|
36
|
-
};
|
|
37
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
38
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
39
|
-
};
|
|
40
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
41
|
-
var react_1 = __importStar(require("react"));
|
|
42
|
-
var lab_1 = require("@mui/lab");
|
|
43
|
-
var InputDateTime_1 = __importDefault(require("./InputDateTime"));
|
|
44
|
-
var AdapterDateFns_1 = __importDefault(require("@mui/lab/AdapterDateFns"));
|
|
45
|
-
var InputDateTime = function () {
|
|
46
|
-
var _a = __read((0, react_1.useState)(null), 2), value = _a[0], setValue = _a[1];
|
|
47
|
-
return (react_1.default.createElement(lab_1.LocalizationProvider, { dateAdapter: AdapterDateFns_1.default },
|
|
48
|
-
react_1.default.createElement(InputDateTime_1.default, { label: "Appointment", value: value, onChange: function (_a) {
|
|
49
|
-
var value = _a.target.value;
|
|
50
|
-
return setValue(value);
|
|
51
|
-
} })));
|
|
52
|
-
};
|
|
53
|
-
exports.default = InputDateTime;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var InputDateTime_1 = require("./InputDateTime");
|
|
8
|
-
Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(InputDateTime_1).default; } });
|