@cakemail-org/ui-components-v2 2.1.4 → 2.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.js +10 -4
- package/dist/esm/index.js +10 -4
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -1533,7 +1533,7 @@ var css_248z$v = ".textfield-component-v2 {\n position: relative;\n}\n.textfiel
|
|
|
1533
1533
|
styleInject(css_248z$v);
|
|
1534
1534
|
|
|
1535
1535
|
var TextField = React.forwardRef(function (_a, ref) {
|
|
1536
|
-
var _b = _a.className, className = _b === void 0 ? "" : _b, label = _a.label, timeout = _a.timeout, labelTooltipText = _a.labelTooltipText, disabled = _a.disabled; _a.useBareBoneInput; var onChange = _a.onChange, multiline = _a.multiline, inputProps = _a.inputProps, iconName = _a.iconName, props = __rest(_a, ["className", "label", "timeout", "labelTooltipText", "disabled", "useBareBoneInput", "onChange", "multiline", "inputProps", "iconName"]);
|
|
1536
|
+
var _b = _a.className, className = _b === void 0 ? "" : _b, label = _a.label, timeout = _a.timeout, labelTooltipText = _a.labelTooltipText, disabled = _a.disabled; _a.useBareBoneInput; var onChange = _a.onChange, multiline = _a.multiline, inputProps = _a.inputProps, iconName = _a.iconName, onKeyDown = _a.onKeyDown, props = __rest(_a, ["className", "label", "timeout", "labelTooltipText", "disabled", "useBareBoneInput", "onChange", "multiline", "inputProps", "iconName", "onKeyDown"]);
|
|
1537
1537
|
var cLabel = label;
|
|
1538
1538
|
var timeoutRef = React.useRef(undefined);
|
|
1539
1539
|
function onChangeHandler(e) {
|
|
@@ -1562,6 +1562,7 @@ var TextField = React.forwardRef(function (_a, ref) {
|
|
|
1562
1562
|
currentTarget: { value: "", name: props.name }
|
|
1563
1563
|
});
|
|
1564
1564
|
}
|
|
1565
|
+
onKeyDown && onKeyDown(event);
|
|
1565
1566
|
}
|
|
1566
1567
|
inputProps = __assign({ maxLength: 256 }, inputProps);
|
|
1567
1568
|
return React.createElement(Box, { className: "textfield-component-v2 ".concat(className, " ").concat(disabled ? "disabled" : "", " ") },
|
|
@@ -8875,7 +8876,7 @@ function DataTable(_a) {
|
|
|
8875
8876
|
showPagination && (hasMore !== undefined ? (React.createElement(DataTablePaginationNoCount, { page: page, setPage: setPage, onPaginationChange: onPaginationChange, rowsPerPage: rowsPerPage, hasMore: hasMore })) : (React.createElement(TablePagination, { rowsPerPageOptions: rowsPerPageOptions, component: "div", count: totalCount !== undefined ? totalCount : rows.length, rowsPerPage: rowsPerPage, page: page, onPageChange: handleChangePage, onRowsPerPageChange: handleChangeRowsPerPage }))));
|
|
8876
8877
|
}
|
|
8877
8878
|
|
|
8878
|
-
var css_248z$f = ".dateTimeSelector.dateTimeCalendar {\n background: var(--white, #FFFFFF);\n}";
|
|
8879
|
+
var css_248z$f = ".dateTimeSelector.dateTimeCalendar {\n background: var(--white, #FFFFFF);\n}\n.dateTimeSelector .MuiMultiSectionDigitalClock-root,\n.dateTimeSelector .MuiMultiSectionDigitalClockSection-root {\n flex: 1;\n}\n.dateTimeSelector .MuiMultiSectionDigitalClock-root .MuiMultiSectionDigitalClockSection-item.Mui-selected,\n.dateTimeSelector .MuiMultiSectionDigitalClockSection-root .MuiMultiSectionDigitalClockSection-item.Mui-selected {\n background-color: var(--primary-brand-color, var(--grape, #69006E)) !important;\n}";
|
|
8879
8880
|
styleInject(css_248z$f);
|
|
8880
8881
|
|
|
8881
8882
|
function DatePicker(_a) {
|
|
@@ -8914,8 +8915,12 @@ function DateTimeCalendar(_a) {
|
|
|
8914
8915
|
var classes = classNames("dateTimeSelector", "dateTimeCalendar", className);
|
|
8915
8916
|
return React.createElement(LocalizationProvider.LocalizationProvider, { dateAdapter: AdapterMoment.AdapterMoment },
|
|
8916
8917
|
React.createElement(xDatePickers.StaticDateTimePicker, __assign({}, props, { view: currentView,
|
|
8917
|
-
//Preview default auto switch
|
|
8918
|
-
onViewChange: function (newView) {
|
|
8918
|
+
//Preview default auto switch fix
|
|
8919
|
+
onViewChange: function (newView) {
|
|
8920
|
+
if (currentView !== "hours" && (newView === "year" || currentView === "year")) {
|
|
8921
|
+
setCurrentView(newView);
|
|
8922
|
+
}
|
|
8923
|
+
}, className: classes, viewRenderers: {
|
|
8919
8924
|
hours: function (props) {
|
|
8920
8925
|
return React.createElement(xDatePickers.MultiSectionDigitalClock, { ampm: props.ampm, minTime: props.minTime, maxTime: props.maxTime, onChange: props.onChange, value: props.value, defaultValue: props.defaultValue, disableFuture: props.disableFuture, disablePast: props.disablePast, timezone: props.timezone });
|
|
8921
8926
|
},
|
|
@@ -8925,6 +8930,7 @@ function DateTimeCalendar(_a) {
|
|
|
8925
8930
|
tabs: {
|
|
8926
8931
|
//@ts-ignore
|
|
8927
8932
|
onViewChange: function (view) {
|
|
8933
|
+
console.log("view", view);
|
|
8928
8934
|
setCurrentView(view);
|
|
8929
8935
|
}
|
|
8930
8936
|
}
|
package/dist/esm/index.js
CHANGED
|
@@ -1513,7 +1513,7 @@ var css_248z$v = ".textfield-component-v2 {\n position: relative;\n}\n.textfiel
|
|
|
1513
1513
|
styleInject(css_248z$v);
|
|
1514
1514
|
|
|
1515
1515
|
var TextField = forwardRef(function (_a, ref) {
|
|
1516
|
-
var _b = _a.className, className = _b === void 0 ? "" : _b, label = _a.label, timeout = _a.timeout, labelTooltipText = _a.labelTooltipText, disabled = _a.disabled; _a.useBareBoneInput; var onChange = _a.onChange, multiline = _a.multiline, inputProps = _a.inputProps, iconName = _a.iconName, props = __rest(_a, ["className", "label", "timeout", "labelTooltipText", "disabled", "useBareBoneInput", "onChange", "multiline", "inputProps", "iconName"]);
|
|
1516
|
+
var _b = _a.className, className = _b === void 0 ? "" : _b, label = _a.label, timeout = _a.timeout, labelTooltipText = _a.labelTooltipText, disabled = _a.disabled; _a.useBareBoneInput; var onChange = _a.onChange, multiline = _a.multiline, inputProps = _a.inputProps, iconName = _a.iconName, onKeyDown = _a.onKeyDown, props = __rest(_a, ["className", "label", "timeout", "labelTooltipText", "disabled", "useBareBoneInput", "onChange", "multiline", "inputProps", "iconName", "onKeyDown"]);
|
|
1517
1517
|
var cLabel = label;
|
|
1518
1518
|
var timeoutRef = useRef(undefined);
|
|
1519
1519
|
function onChangeHandler(e) {
|
|
@@ -1542,6 +1542,7 @@ var TextField = forwardRef(function (_a, ref) {
|
|
|
1542
1542
|
currentTarget: { value: "", name: props.name }
|
|
1543
1543
|
});
|
|
1544
1544
|
}
|
|
1545
|
+
onKeyDown && onKeyDown(event);
|
|
1545
1546
|
}
|
|
1546
1547
|
inputProps = __assign({ maxLength: 256 }, inputProps);
|
|
1547
1548
|
return React__default.createElement(Box$1, { className: "textfield-component-v2 ".concat(className, " ").concat(disabled ? "disabled" : "", " ") },
|
|
@@ -8855,7 +8856,7 @@ function DataTable(_a) {
|
|
|
8855
8856
|
showPagination && (hasMore !== undefined ? (React__default.createElement(DataTablePaginationNoCount, { page: page, setPage: setPage, onPaginationChange: onPaginationChange, rowsPerPage: rowsPerPage, hasMore: hasMore })) : (React__default.createElement(TablePagination, { rowsPerPageOptions: rowsPerPageOptions, component: "div", count: totalCount !== undefined ? totalCount : rows.length, rowsPerPage: rowsPerPage, page: page, onPageChange: handleChangePage, onRowsPerPageChange: handleChangeRowsPerPage }))));
|
|
8856
8857
|
}
|
|
8857
8858
|
|
|
8858
|
-
var css_248z$f = ".dateTimeSelector.dateTimeCalendar {\n background: var(--white, #FFFFFF);\n}";
|
|
8859
|
+
var css_248z$f = ".dateTimeSelector.dateTimeCalendar {\n background: var(--white, #FFFFFF);\n}\n.dateTimeSelector .MuiMultiSectionDigitalClock-root,\n.dateTimeSelector .MuiMultiSectionDigitalClockSection-root {\n flex: 1;\n}\n.dateTimeSelector .MuiMultiSectionDigitalClock-root .MuiMultiSectionDigitalClockSection-item.Mui-selected,\n.dateTimeSelector .MuiMultiSectionDigitalClockSection-root .MuiMultiSectionDigitalClockSection-item.Mui-selected {\n background-color: var(--primary-brand-color, var(--grape, #69006E)) !important;\n}";
|
|
8859
8860
|
styleInject(css_248z$f);
|
|
8860
8861
|
|
|
8861
8862
|
function DatePicker(_a) {
|
|
@@ -8894,8 +8895,12 @@ function DateTimeCalendar(_a) {
|
|
|
8894
8895
|
var classes = classNames("dateTimeSelector", "dateTimeCalendar", className);
|
|
8895
8896
|
return React__default.createElement(LocalizationProvider, { dateAdapter: AdapterMoment },
|
|
8896
8897
|
React__default.createElement(StaticDateTimePicker, __assign({}, props, { view: currentView,
|
|
8897
|
-
//Preview default auto switch
|
|
8898
|
-
onViewChange: function (newView) {
|
|
8898
|
+
//Preview default auto switch fix
|
|
8899
|
+
onViewChange: function (newView) {
|
|
8900
|
+
if (currentView !== "hours" && (newView === "year" || currentView === "year")) {
|
|
8901
|
+
setCurrentView(newView);
|
|
8902
|
+
}
|
|
8903
|
+
}, className: classes, viewRenderers: {
|
|
8899
8904
|
hours: function (props) {
|
|
8900
8905
|
return React__default.createElement(MultiSectionDigitalClock, { ampm: props.ampm, minTime: props.minTime, maxTime: props.maxTime, onChange: props.onChange, value: props.value, defaultValue: props.defaultValue, disableFuture: props.disableFuture, disablePast: props.disablePast, timezone: props.timezone });
|
|
8901
8906
|
},
|
|
@@ -8905,6 +8910,7 @@ function DateTimeCalendar(_a) {
|
|
|
8905
8910
|
tabs: {
|
|
8906
8911
|
//@ts-ignore
|
|
8907
8912
|
onViewChange: function (view) {
|
|
8913
|
+
console.log("view", view);
|
|
8908
8914
|
setCurrentView(view);
|
|
8909
8915
|
}
|
|
8910
8916
|
}
|