@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.
|
@@ -15,7 +15,10 @@ export declare const Multiple: () => JSX.Element;
|
|
|
15
15
|
export declare const Playground: {
|
|
16
16
|
(args: any): JSX.Element;
|
|
17
17
|
args: {
|
|
18
|
+
type: string[];
|
|
18
19
|
locale: Locale;
|
|
20
|
+
hideTitle: boolean;
|
|
21
|
+
hidePeriod: boolean;
|
|
19
22
|
exerciseResults: ({
|
|
20
23
|
_id: string;
|
|
21
24
|
student: string;
|
package/build/index.es.js
CHANGED
|
@@ -48070,7 +48070,7 @@ var TimeChart = function (_a) {
|
|
|
48070
48070
|
};
|
|
48071
48071
|
|
|
48072
48072
|
var Chart = function (_a) {
|
|
48073
|
-
var type = _a.type, locale = _a.locale, exerciseResults = _a.exerciseResults, _b = _a.defaultPeriod, defaultPeriod = _b === void 0 ? Period.TODAY : _b, onChangePeriod = _a.onChangePeriod, nExercisesInCourse = _a.nExercisesInCourse;
|
|
48073
|
+
var type = _a.type, locale = _a.locale, hideTitle = _a.hideTitle, hidePeriod = _a.hidePeriod, exerciseResults = _a.exerciseResults, _b = _a.defaultPeriod, defaultPeriod = _b === void 0 ? Period.TODAY : _b, onChangePeriod = _a.onChangePeriod, nExercisesInCourse = _a.nExercisesInCourse;
|
|
48074
48074
|
var _c = useState(defaultPeriod), period = _c[0], setPeriod = _c[1];
|
|
48075
48075
|
useEffect(function () {
|
|
48076
48076
|
setPeriod(defaultPeriod);
|
|
@@ -48107,20 +48107,20 @@ var Chart = function (_a) {
|
|
|
48107
48107
|
return jsx$1(TimeChart, __assign$2({}, props));
|
|
48108
48108
|
}
|
|
48109
48109
|
};
|
|
48110
|
-
return (jsxs(Fragment$1, { children: [jsxs("div", __assign$2({ style: {
|
|
48110
|
+
return (jsxs(Fragment$1, { children: [(!hideTitle || !hidePeriod) && (jsxs("div", __assign$2({ style: {
|
|
48111
48111
|
display: "flex",
|
|
48112
48112
|
gap: 20,
|
|
48113
48113
|
alignItems: "baseline",
|
|
48114
|
-
justifyContent: "
|
|
48114
|
+
justifyContent: "flex-end",
|
|
48115
48115
|
marginBottom: 10,
|
|
48116
48116
|
padding: "0 15px 0 5px",
|
|
48117
|
-
} }, { children: [jsx$1(Heading, __assign$2({ type: "h3" }, { children: titles[type] })), jsx$1(Select, __assign$2({ defaultValue: period, onChange: function (value) {
|
|
48117
|
+
} }, { children: [!hideTitle && (jsx$1("div", __assign$2({ style: { marginRight: "auto" } }, { children: jsx$1(Heading, __assign$2({ type: "h3" }, { children: titles[type] })) }))), !hidePeriod && (jsx$1(Select, __assign$2({ defaultValue: period, onChange: function (value) {
|
|
48118
48118
|
setPeriod(value);
|
|
48119
48119
|
onChangePeriod(value);
|
|
48120
48120
|
}, id: "period", name: "period" }, { children: periods.map(function (_a) {
|
|
48121
48121
|
var value = _a.value, label = _a.label;
|
|
48122
48122
|
return (jsx$1("option", __assign$2({ value: value }, { children: label }), value));
|
|
48123
|
-
}) }), period)] })), renderChart()] }));
|
|
48123
|
+
}) }), period))] }))), renderChart()] }));
|
|
48124
48124
|
};
|
|
48125
48125
|
|
|
48126
48126
|
var Container$5 = styled.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"])));
|