@typeolymp/ui-components 2.2.6 → 2.2.7
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/build/index.js
CHANGED
|
@@ -48097,7 +48097,7 @@ var TimeChart = function (_a) {
|
|
|
48097
48097
|
};
|
|
48098
48098
|
|
|
48099
48099
|
var Chart = function (_a) {
|
|
48100
|
-
var type = _a.type, locale = _a.locale, exerciseResults = _a.exerciseResults, _b = _a.defaultPeriod, defaultPeriod = _b === void 0 ? exports.ChartPeriod.TODAY : _b, onChangePeriod = _a.onChangePeriod, nExercisesInCourse = _a.nExercisesInCourse;
|
|
48100
|
+
var type = _a.type, locale = _a.locale, hideTitle = _a.hideTitle, hidePeriod = _a.hidePeriod, exerciseResults = _a.exerciseResults, _b = _a.defaultPeriod, defaultPeriod = _b === void 0 ? exports.ChartPeriod.TODAY : _b, onChangePeriod = _a.onChangePeriod, nExercisesInCourse = _a.nExercisesInCourse;
|
|
48101
48101
|
var _c = React$3.useState(defaultPeriod), period = _c[0], setPeriod = _c[1];
|
|
48102
48102
|
React$3.useEffect(function () {
|
|
48103
48103
|
setPeriod(defaultPeriod);
|
|
@@ -48134,20 +48134,20 @@ var Chart = function (_a) {
|
|
|
48134
48134
|
return jsxRuntime.jsx(TimeChart, __assign$2({}, props));
|
|
48135
48135
|
}
|
|
48136
48136
|
};
|
|
48137
|
-
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("div", __assign$2({ style: {
|
|
48137
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [(!hideTitle || !hidePeriod) && (jsxRuntime.jsxs("div", __assign$2({ style: {
|
|
48138
48138
|
display: "flex",
|
|
48139
48139
|
gap: 20,
|
|
48140
48140
|
alignItems: "baseline",
|
|
48141
|
-
justifyContent: "
|
|
48141
|
+
justifyContent: "flex-end",
|
|
48142
48142
|
marginBottom: 10,
|
|
48143
48143
|
padding: "0 15px 0 5px",
|
|
48144
|
-
} }, { children: [jsxRuntime.jsx(Heading, __assign$2({ type: "h3" }, { children: titles[type] })), jsxRuntime.jsx(Select, __assign$2({ defaultValue: period, onChange: function (value) {
|
|
48144
|
+
} }, { children: [!hideTitle && (jsxRuntime.jsx("div", __assign$2({ style: { marginRight: "auto" } }, { children: jsxRuntime.jsx(Heading, __assign$2({ type: "h3" }, { children: titles[type] })) }))), !hidePeriod && (jsxRuntime.jsx(Select, __assign$2({ defaultValue: period, onChange: function (value) {
|
|
48145
48145
|
setPeriod(value);
|
|
48146
48146
|
onChangePeriod(value);
|
|
48147
48147
|
}, id: "period", name: "period" }, { children: periods.map(function (_a) {
|
|
48148
48148
|
var value = _a.value, label = _a.label;
|
|
48149
48149
|
return (jsxRuntime.jsx("option", __assign$2({ value: value }, { children: label }), value));
|
|
48150
|
-
}) }), period)] })), renderChart()] }));
|
|
48150
|
+
}) }), period))] }))), renderChart()] }));
|
|
48151
48151
|
};
|
|
48152
48152
|
|
|
48153
48153
|
var Container$5 = styled__default["default"].div(templateObject_1$8 || (templateObject_1$8 = __makeTemplateObject$1(["\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n flex-wrap: wrap;\n"], ["\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n flex-wrap: wrap;\n"])));
|