blixify-ui-web 0.1.89 → 0.1.91
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/chart/DateRange.d.ts +11 -7
- package/lib/components/chart/DateRange.d.ts.map +1 -1
- package/lib/components/chart/DateRange.js +115 -32
- package/lib/components/chart/DateRange.js.map +1 -1
- package/lib/components/chart/barChart/index.d.ts +4 -0
- package/lib/components/chart/barChart/index.d.ts.map +1 -1
- package/lib/components/chart/barChart/index.js +3 -1
- package/lib/components/chart/barChart/index.js.map +1 -1
- package/lib/components/chart/card/index.d.ts +4 -0
- package/lib/components/chart/card/index.d.ts.map +1 -1
- package/lib/components/chart/card/index.js +15 -12
- package/lib/components/chart/card/index.js.map +1 -1
- package/lib/components/chart/lineChart/index.d.ts +4 -14
- package/lib/components/chart/lineChart/index.d.ts.map +1 -1
- package/lib/components/chart/lineChart/index.js +77 -130
- package/lib/components/chart/lineChart/index.js.map +1 -1
- package/lib/components/chart/pieChart/index.d.ts +4 -0
- package/lib/components/chart/pieChart/index.d.ts.map +1 -1
- package/lib/components/chart/pieChart/index.js +3 -1
- package/lib/components/chart/pieChart/index.js.map +1 -1
- package/lib/components/chart/radialBar/index.d.ts +24 -0
- package/lib/components/chart/radialBar/index.d.ts.map +1 -0
- package/lib/components/chart/radialBar/index.js +141 -0
- package/lib/components/chart/radialBar/index.js.map +1 -0
- package/lib/components/chart/statsCard/index.d.ts +4 -0
- package/lib/components/chart/statsCard/index.d.ts.map +1 -1
- package/lib/components/chart/statsCard/index.js +20 -17
- package/lib/components/chart/statsCard/index.js.map +1 -1
- package/lib/components/data/dataTemplate/index.js +1 -1
- package/lib/components/data/dataTemplate/index.js.map +1 -1
- package/lib/components/data/readQuery/index.d.ts +8 -0
- package/lib/components/data/readQuery/index.d.ts.map +1 -1
- package/lib/components/data/readQuery/index.js +2 -1
- package/lib/components/data/readQuery/index.js.map +1 -1
- package/lib/components/data/readQueryHoc/index.d.ts.map +1 -1
- package/lib/components/data/readQueryHoc/index.js +2 -1
- package/lib/components/data/readQueryHoc/index.js.map +1 -1
- package/lib/components/display/grid/index.js +1 -1
- package/lib/components/display/grid/index.js.map +1 -1
- package/lib/components/index.d.ts +1 -0
- package/lib/components/index.d.ts.map +1 -1
- package/lib/components/index.js +4 -2
- package/lib/components/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -73,25 +73,16 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
73
73
|
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
74
74
|
}
|
|
75
75
|
};
|
|
76
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
77
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
78
|
-
};
|
|
79
76
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
80
77
|
exports.LineChart = void 0;
|
|
81
|
-
var react_1 = require("
|
|
82
|
-
var
|
|
83
|
-
var react_2 = __importStar(require("react"));
|
|
84
|
-
var button_1 = require("../../action/button");
|
|
85
|
-
var textButton_1 = require("../../action/textButton");
|
|
86
|
-
var modal_1 = require("../../display/modal");
|
|
87
|
-
var datePicker_1 = require("../../input/datePicker");
|
|
78
|
+
var react_1 = __importStar(require("react"));
|
|
79
|
+
var DateRange_1 = require("../DateRange");
|
|
88
80
|
var LineChart = /** @class */ (function (_super) {
|
|
89
81
|
__extends(LineChart, _super);
|
|
90
82
|
function LineChart() {
|
|
91
83
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
92
84
|
_this.state = {
|
|
93
85
|
apexModule: null,
|
|
94
|
-
dateRangeModalVisible: false,
|
|
95
86
|
};
|
|
96
87
|
_this.componentDidMount = function () { return __awaiter(_this, void 0, void 0, function () {
|
|
97
88
|
var reactApexChart;
|
|
@@ -107,144 +98,100 @@ var LineChart = /** @class */ (function (_super) {
|
|
|
107
98
|
}
|
|
108
99
|
});
|
|
109
100
|
}); };
|
|
110
|
-
_this.handleSetData = function () {
|
|
111
|
-
if (_this.props.onChangeData) {
|
|
112
|
-
_this.props.onChangeData();
|
|
113
|
-
}
|
|
114
|
-
};
|
|
115
|
-
_this.handleResetDate = function () {
|
|
116
|
-
if (_this.props.onResetDate) {
|
|
117
|
-
_this.props.onResetDate();
|
|
118
|
-
}
|
|
119
|
-
};
|
|
120
|
-
_this.handleDateRangeModalVisible = function (visible) {
|
|
121
|
-
_this.setState({
|
|
122
|
-
dateRangeModalVisible: visible,
|
|
123
|
-
});
|
|
124
|
-
};
|
|
125
|
-
_this.renderDateModalContent = function () {
|
|
126
|
-
return (react_2.default.createElement("div", { className: "px-3 sm:px-0" },
|
|
127
|
-
react_2.default.createElement(datePicker_1.InputDatePicker, { className: "mt-5 h-40", range: true, startDate: _this.props.customDate.startDate, endDate: _this.props.customDate.endDate, onChange: _this.props.onChangeDate }),
|
|
128
|
-
react_2.default.createElement("div", { className: "flex flex-row mt-6 pt-32 justify-end" },
|
|
129
|
-
react_2.default.createElement(button_1.Button, { text: "Close", size: "small", type: "light", onClick: function () {
|
|
130
|
-
_this.handleResetDate();
|
|
131
|
-
_this.handleDateRangeModalVisible(false);
|
|
132
|
-
} }),
|
|
133
|
-
react_2.default.createElement(button_1.Button, { className: "ml-4", text: "Submit", size: "small", type: "normal", onClick: function () {
|
|
134
|
-
_this.handleSetData();
|
|
135
|
-
_this.handleDateRangeModalVisible(false);
|
|
136
|
-
} }))));
|
|
137
|
-
};
|
|
138
101
|
return _this;
|
|
139
102
|
}
|
|
140
103
|
LineChart.prototype.render = function () {
|
|
141
|
-
var _this = this;
|
|
142
104
|
var _a, _b, _c, _d;
|
|
143
105
|
var APEXModule = this.state.apexModule;
|
|
144
106
|
var defaultClass = "flex flex-col justify-center bg-white overflow-hidden shadow rounded-lg pl-4 pb-3 w-full ";
|
|
145
107
|
if (this.props.containerStyle)
|
|
146
108
|
defaultClass += this.props.containerStyle;
|
|
147
|
-
return (
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
type: "line",
|
|
163
|
-
dropShadow: {
|
|
164
|
-
enabled: true,
|
|
165
|
-
color: "#000",
|
|
166
|
-
top: 18,
|
|
167
|
-
left: 7,
|
|
168
|
-
blur: 10,
|
|
169
|
-
opacity: 0.2,
|
|
170
|
-
},
|
|
171
|
-
toolbar: {
|
|
172
|
-
show: this.props.showToolbar,
|
|
173
|
-
},
|
|
109
|
+
return (react_1.default.createElement("div", { className: defaultClass },
|
|
110
|
+
react_1.default.createElement("div", { className: "ml-2 pr-5 my-4 flex flex-row items-center" },
|
|
111
|
+
react_1.default.createElement("div", { className: "flex-1" },
|
|
112
|
+
react_1.default.createElement("h3", { className: "text-lg truncate font-medium" }, this.props.title)),
|
|
113
|
+
this.props.tool),
|
|
114
|
+
react_1.default.createElement("div", { className: "w-11/12" }, APEXModule && (react_1.default.createElement(APEXModule, { height: this.props.chartHeight ? this.props.chartHeight : 300, options: {
|
|
115
|
+
chart: {
|
|
116
|
+
type: "line",
|
|
117
|
+
dropShadow: {
|
|
118
|
+
enabled: true,
|
|
119
|
+
color: "#000",
|
|
120
|
+
top: 18,
|
|
121
|
+
left: 7,
|
|
122
|
+
blur: 10,
|
|
123
|
+
opacity: 0.2,
|
|
174
124
|
},
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
enabled: this.props.showDataLabels,
|
|
125
|
+
toolbar: {
|
|
126
|
+
show: this.props.showToolbar,
|
|
178
127
|
},
|
|
179
|
-
|
|
180
|
-
|
|
128
|
+
},
|
|
129
|
+
colors: this.props.lineColors,
|
|
130
|
+
dataLabels: {
|
|
131
|
+
enabled: this.props.showDataLabels,
|
|
132
|
+
},
|
|
133
|
+
stroke: {
|
|
134
|
+
curve: (_a = this.props.lineStroke) !== null && _a !== void 0 ? _a : "smooth",
|
|
135
|
+
},
|
|
136
|
+
grid: {
|
|
137
|
+
borderColor: "#e7e7e7",
|
|
138
|
+
row: {
|
|
139
|
+
colors: ["#f3f3f3", "transparent"],
|
|
140
|
+
opacity: 0.5,
|
|
181
141
|
},
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
142
|
+
},
|
|
143
|
+
markers: {
|
|
144
|
+
size: 1,
|
|
145
|
+
},
|
|
146
|
+
xaxis: {
|
|
147
|
+
categories: this.props.categories,
|
|
148
|
+
title: {
|
|
149
|
+
text: this.props.xaxisTitle,
|
|
150
|
+
offsetY: (_b = this.props.xaxisTitlePosition) !== null && _b !== void 0 ? _b : 80,
|
|
151
|
+
style: {
|
|
152
|
+
fontSize: "11",
|
|
153
|
+
fontWeight: "bold",
|
|
187
154
|
},
|
|
188
155
|
},
|
|
189
|
-
|
|
190
|
-
|
|
156
|
+
tickAmount: (_c = this.props.tickAmount) !== null && _c !== void 0 ? _c : 15,
|
|
157
|
+
labels: {
|
|
158
|
+
rotate: -65,
|
|
191
159
|
},
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
style: {
|
|
198
|
-
fontSize: "11",
|
|
199
|
-
fontWeight: "bold",
|
|
200
|
-
},
|
|
201
|
-
},
|
|
202
|
-
tickAmount: (_c = this.props.tickAmount) !== null && _c !== void 0 ? _c : 15,
|
|
203
|
-
labels: {
|
|
204
|
-
rotate: -65,
|
|
205
|
-
},
|
|
160
|
+
},
|
|
161
|
+
yaxis: {
|
|
162
|
+
title: {
|
|
163
|
+
text: this.props.yaxisTitle,
|
|
164
|
+
style: { fontSize: "11", fontWeight: "bold" },
|
|
206
165
|
},
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
166
|
+
},
|
|
167
|
+
legend: {
|
|
168
|
+
position: "top",
|
|
169
|
+
horizontalAlign: "right",
|
|
170
|
+
floating: true,
|
|
171
|
+
offsetY: -25,
|
|
172
|
+
offsetX: -5,
|
|
173
|
+
},
|
|
174
|
+
responsive: [
|
|
175
|
+
{
|
|
176
|
+
breakpoint: 480,
|
|
177
|
+
options: {
|
|
178
|
+
xaxis: {
|
|
179
|
+
tickAmount: (_d = this.props.tickAmount) !== null && _d !== void 0 ? _d : 5,
|
|
180
|
+
},
|
|
211
181
|
},
|
|
212
182
|
},
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
183
|
+
],
|
|
184
|
+
}, series: this.props.multiLineSeries
|
|
185
|
+
? this.props.multiLineSeries
|
|
186
|
+
: [
|
|
187
|
+
{
|
|
188
|
+
name: this.props.seriesName,
|
|
189
|
+
data: this.props.seriesData,
|
|
219
190
|
},
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
breakpoint: 480,
|
|
223
|
-
options: {
|
|
224
|
-
xaxis: {
|
|
225
|
-
tickAmount: (_d = this.props.tickAmount) !== null && _d !== void 0 ? _d : 5,
|
|
226
|
-
},
|
|
227
|
-
},
|
|
228
|
-
},
|
|
229
|
-
],
|
|
230
|
-
}, series: this.props.multiLineSeries
|
|
231
|
-
? this.props.multiLineSeries
|
|
232
|
-
: [
|
|
233
|
-
{
|
|
234
|
-
name: this.props.seriesName,
|
|
235
|
-
data: this.props.seriesData,
|
|
236
|
-
},
|
|
237
|
-
], type: "line" }))),
|
|
238
|
-
react_2.default.createElement("div", { className: "flex flex-col sm:flex-row w-full justify-center items-center" },
|
|
239
|
-
react_2.default.createElement("div", { className: "grow" }),
|
|
240
|
-
react_2.default.createElement("div", { className: "w-full mt-2 sm:w-56 sm:mt-0" },
|
|
241
|
-
react_2.default.createElement(textButton_1.TextButton, { className: "ml-3 mb-3", text: (0, moment_1.default)(this.props.customDate.startDate).format("DD-MM-YYYY") +
|
|
242
|
-
" - " +
|
|
243
|
-
(0, moment_1.default)(this.props.customDate.endDate).format("DD-MM-YYYY"), onClick: function () {
|
|
244
|
-
_this.handleDateRangeModalVisible(true);
|
|
245
|
-
} }))))));
|
|
191
|
+
], type: "line" }))),
|
|
192
|
+
this.props.dateRangeVisible && (react_1.default.createElement(DateRange_1.DateRange, { className: "px-3", customDate: this.props.customDate, onChangeDate: this.props.onChangeDate }))));
|
|
246
193
|
};
|
|
247
194
|
return LineChart;
|
|
248
|
-
}(
|
|
195
|
+
}(react_1.Component));
|
|
249
196
|
exports.LineChart = LineChart;
|
|
250
197
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/chart/lineChart/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/chart/lineChart/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAAuD;AACvD,0CAAyD;AAsCzD;IAA+B,6BAAgB;IAA/C;QAAA,qEA6HC;QA5HC,WAAK,GAAU;YACb,UAAU,EAAE,IAAI;SACjB,CAAC;QAEF,uBAAiB,GAAG;;;;4BACK,sFAAa,kBAAkB,QAAC;;wBAAjD,cAAc,GAAG,SAAgC;wBACvD,IAAI,CAAC,QAAQ,CAAC;4BACZ,UAAU,EAAE,cAAc,CAAC,OAAO;yBACnC,CAAC,CAAC;;;;aACJ,CAAC;;IAmHJ,CAAC;IAjHC,0BAAM,GAAN;;QACE,IAAM,UAAU,GAAQ,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC;QAC9C,IAAI,YAAY,GACd,2FAA2F,CAAC;QAC9F,IAAI,IAAI,CAAC,KAAK,CAAC,cAAc;YAAE,YAAY,IAAI,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC;QAEzE,OAAO,CACL,uCAAK,SAAS,EAAE,YAAY;YAC1B,uCAAK,SAAS,EAAC,2CAA2C;gBACxD,u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CACH,CACG,CACP,CAAC;IACJ,CAAC;IACH,gBAAC;AAAD,CAAC,AA7HD,CAA+B,iBAAS,GA6HvC;AA7HY,8BAAS"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Component, ReactElement } from "react";
|
|
2
2
|
import "../../../index.css";
|
|
3
|
+
import { RangeInterface } from "../DateRange";
|
|
3
4
|
interface Props {
|
|
4
5
|
series: number[];
|
|
5
6
|
labels: string[];
|
|
@@ -7,6 +8,9 @@ interface Props {
|
|
|
7
8
|
tool?: ReactElement;
|
|
8
9
|
chartSize?: number;
|
|
9
10
|
containerStyle?: string;
|
|
11
|
+
dateRangeVisible?: boolean;
|
|
12
|
+
customDate?: RangeInterface;
|
|
13
|
+
onChangeDate?: (customDate?: RangeInterface) => void;
|
|
10
14
|
}
|
|
11
15
|
export declare class PieChart extends Component<Props> {
|
|
12
16
|
state: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/chart/pieChart/index.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AACvD,OAAO,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/chart/pieChart/index.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AACvD,OAAO,oBAAoB,CAAC;AAC5B,OAAO,EAAa,cAAc,EAAE,MAAM,cAAc,CAAC;AAEzD,UAAU,KAAK;IACb,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,UAAU,CAAC,EAAE,cAAc,CAAC;IAC5B,YAAY,CAAC,EAAE,CAAC,UAAU,CAAC,EAAE,cAAc,KAAK,IAAI,CAAC;CACtD;AAED,qBAAa,QAAS,SAAQ,SAAS,CAAC,KAAK,CAAC;IAC5C,KAAK;;MAEH;IAEF,iBAAiB,sBAKf;IAEF,MAAM;CAgEP"}
|
|
@@ -77,6 +77,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
77
77
|
exports.PieChart = void 0;
|
|
78
78
|
var react_1 = __importStar(require("react"));
|
|
79
79
|
require("../../../index.css");
|
|
80
|
+
var DateRange_1 = require("../DateRange");
|
|
80
81
|
var PieChart = /** @class */ (function (_super) {
|
|
81
82
|
__extends(PieChart, _super);
|
|
82
83
|
function PieChart() {
|
|
@@ -133,7 +134,8 @@ var PieChart = /** @class */ (function (_super) {
|
|
|
133
134
|
},
|
|
134
135
|
},
|
|
135
136
|
],
|
|
136
|
-
}, series: this.props.series, type: "donut", height: this.props.chartSize ? this.props.chartSize : "280" })))
|
|
137
|
+
}, series: this.props.series, type: "donut", height: this.props.chartSize ? this.props.chartSize : "280" }))),
|
|
138
|
+
this.props.dateRangeVisible && (react_1.default.createElement(DateRange_1.DateRange, { className: "px-3", customDate: this.props.customDate, onChangeDate: this.props.onChangeDate }))));
|
|
137
139
|
};
|
|
138
140
|
return PieChart;
|
|
139
141
|
}(react_1.Component));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/chart/pieChart/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAAuD;AACvD,8BAA4B;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/chart/pieChart/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AI;YAHhB,CAGgB,CACnB;YACH,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;QAEX,OAAO,CACL,uCAAK,SAAS,EAAE,YAAY;YAC1B,uCAAK,SAAS,EAAC,2CAA2C;gBACxD,uCAAK,SAAS,EAAC,QAAQ;oBACrB,sCAAI,SAAS,EAAC,8BAA8B,IAAE,IAAI,CAAC,KAAK,CAAC,KAAK,CAAM,CAChE;gBACL,IAAI,CAAC,KAAK,CAAC,IAAI,CACZ;YACN,2CACG,UAAU,IAAI,CACb,8BAAC,UAAU,IACT,OAAO,EAAE;oBACP,MAAM,EAAE,SAAS;oBACjB,UAAU,EAAE;wBACV;4BACE,UAAU,EAAE,GAAG;4BACf,OAAO,EAAE;gCACP,MAAM,EAAE;oCACN,QAAQ,EAAE,QAAQ;iCACnB;6BACF;yBACF;qBACF;iBACF,EACD,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,EACzB,IAAI,EAAC,OAAO,EACZ,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,GAC3D,CACH,CACG;YACL,IAAI,CAAC,KAAK,CAAC,gBAAgB,IAAI,CAC9B,8BAAC,qBAAS,IACR,SAAS,EAAC,MAAM,EAChB,UAAU,EAAE,IAAI,CAAC,KAAK,CAAC,UAAU,EACjC,YAAY,EAAE,IAAI,CAAC,KAAK,CAAC,YAAY,GACrC,CACH,CACG,CACP,CAAC;IACJ,CAAC;IACH,eAAC;AAAD,CAAC,AA5ED,CAA8B,iBAAS,GA4EtC;AA5EY,4BAAQ"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Component, ReactElement } from "react";
|
|
2
|
+
import "../../../index.css";
|
|
3
|
+
import { RangeInterface } from "../DateRange";
|
|
4
|
+
interface Props {
|
|
5
|
+
title: string;
|
|
6
|
+
labels: string[];
|
|
7
|
+
series: number[];
|
|
8
|
+
showToolbar?: boolean;
|
|
9
|
+
tool?: ReactElement;
|
|
10
|
+
chartSize?: number;
|
|
11
|
+
containerStyle?: string;
|
|
12
|
+
dateRangeVisible?: boolean;
|
|
13
|
+
customDate?: RangeInterface;
|
|
14
|
+
onChangeDate?: (customDate?: RangeInterface) => void;
|
|
15
|
+
}
|
|
16
|
+
export declare class RadialBar extends Component<Props> {
|
|
17
|
+
state: {
|
|
18
|
+
apexModule: null;
|
|
19
|
+
};
|
|
20
|
+
componentDidMount: () => Promise<void>;
|
|
21
|
+
render(): JSX.Element;
|
|
22
|
+
}
|
|
23
|
+
export {};
|
|
24
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/chart/radialBar/index.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AACvD,OAAO,oBAAoB,CAAC;AAC5B,OAAO,EAAa,cAAc,EAAE,MAAM,cAAc,CAAC;AAEzD,UAAU,KAAK;IACb,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,UAAU,CAAC,EAAE,cAAc,CAAC;IAC5B,YAAY,CAAC,EAAE,CAAC,UAAU,CAAC,EAAE,cAAc,KAAK,IAAI,CAAC;CACtD;AAED,qBAAa,SAAU,SAAQ,SAAS,CAAC,KAAK,CAAC;IAC7C,KAAK;;MAEH;IAEF,iBAAiB,sBAKf;IAEF,MAAM;CAuDP"}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
18
|
+
if (k2 === undefined) k2 = k;
|
|
19
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
20
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
21
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
22
|
+
}
|
|
23
|
+
Object.defineProperty(o, k2, desc);
|
|
24
|
+
}) : (function(o, m, k, k2) {
|
|
25
|
+
if (k2 === undefined) k2 = k;
|
|
26
|
+
o[k2] = m[k];
|
|
27
|
+
}));
|
|
28
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
29
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
30
|
+
}) : function(o, v) {
|
|
31
|
+
o["default"] = v;
|
|
32
|
+
});
|
|
33
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
34
|
+
if (mod && mod.__esModule) return mod;
|
|
35
|
+
var result = {};
|
|
36
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
37
|
+
__setModuleDefault(result, mod);
|
|
38
|
+
return result;
|
|
39
|
+
};
|
|
40
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
41
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
42
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
43
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
44
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
45
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
46
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
47
|
+
});
|
|
48
|
+
};
|
|
49
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
50
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
51
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
52
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
53
|
+
function step(op) {
|
|
54
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
55
|
+
while (_) try {
|
|
56
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
57
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
58
|
+
switch (op[0]) {
|
|
59
|
+
case 0: case 1: t = op; break;
|
|
60
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
61
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
62
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
63
|
+
default:
|
|
64
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
65
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
66
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
67
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
68
|
+
if (t[2]) _.ops.pop();
|
|
69
|
+
_.trys.pop(); continue;
|
|
70
|
+
}
|
|
71
|
+
op = body.call(thisArg, _);
|
|
72
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
73
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
77
|
+
exports.RadialBar = void 0;
|
|
78
|
+
var react_1 = __importStar(require("react"));
|
|
79
|
+
require("../../../index.css");
|
|
80
|
+
var DateRange_1 = require("../DateRange");
|
|
81
|
+
var RadialBar = /** @class */ (function (_super) {
|
|
82
|
+
__extends(RadialBar, _super);
|
|
83
|
+
function RadialBar() {
|
|
84
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
85
|
+
_this.state = {
|
|
86
|
+
apexModule: null,
|
|
87
|
+
};
|
|
88
|
+
_this.componentDidMount = function () { return __awaiter(_this, void 0, void 0, function () {
|
|
89
|
+
var reactApexChart;
|
|
90
|
+
return __generator(this, function (_a) {
|
|
91
|
+
switch (_a.label) {
|
|
92
|
+
case 0: return [4 /*yield*/, Promise.resolve().then(function () { return __importStar(require("react-apexcharts")); })];
|
|
93
|
+
case 1:
|
|
94
|
+
reactApexChart = _a.sent();
|
|
95
|
+
this.setState({
|
|
96
|
+
apexModule: reactApexChart.default,
|
|
97
|
+
});
|
|
98
|
+
return [2 /*return*/];
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
}); };
|
|
102
|
+
return _this;
|
|
103
|
+
}
|
|
104
|
+
RadialBar.prototype.render = function () {
|
|
105
|
+
var _a;
|
|
106
|
+
var APEXModule = this.state.apexModule;
|
|
107
|
+
var defaultClass = "flex flex-col justify-center bg-white overflow-hidden shadow rounded-lg pl-4 pb-3 w-full ";
|
|
108
|
+
if (this.props.containerStyle)
|
|
109
|
+
defaultClass += this.props.containerStyle;
|
|
110
|
+
return (react_1.default.createElement("div", { className: defaultClass },
|
|
111
|
+
react_1.default.createElement("div", { className: "ml-2 pr-5 my-4 flex flex-row items-center" },
|
|
112
|
+
react_1.default.createElement("div", { className: "flex-1" },
|
|
113
|
+
react_1.default.createElement("h3", { className: "text-lg truncate font-medium" }, this.props.title)),
|
|
114
|
+
this.props.tool),
|
|
115
|
+
react_1.default.createElement("div", { className: "mr-4" }, APEXModule && (react_1.default.createElement(APEXModule, { options: {
|
|
116
|
+
plotOptions: {
|
|
117
|
+
radialBar: {
|
|
118
|
+
dataLabels: {
|
|
119
|
+
value: {
|
|
120
|
+
formatter: function (value) {
|
|
121
|
+
return value;
|
|
122
|
+
},
|
|
123
|
+
},
|
|
124
|
+
total: {
|
|
125
|
+
show: true,
|
|
126
|
+
label: this.props.title,
|
|
127
|
+
formatter: function () {
|
|
128
|
+
return "";
|
|
129
|
+
},
|
|
130
|
+
},
|
|
131
|
+
},
|
|
132
|
+
},
|
|
133
|
+
},
|
|
134
|
+
labels: this.props.labels,
|
|
135
|
+
}, series: this.props.series, type: "radialBar", height: (_a = this.props.chartSize) !== null && _a !== void 0 ? _a : 300 }))),
|
|
136
|
+
this.props.dateRangeVisible && (react_1.default.createElement(DateRange_1.DateRange, { className: "px-3", customDate: this.props.customDate, onChangeDate: this.props.onChangeDate }))));
|
|
137
|
+
};
|
|
138
|
+
return RadialBar;
|
|
139
|
+
}(react_1.Component));
|
|
140
|
+
exports.RadialBar = RadialBar;
|
|
141
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version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ACV,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK;oCACvB,SAAS,EAAE;wCACT,OAAO,EAAE,CAAC;oCACZ,CAAC;iCACF;6BACF;yBACF;qBACF;oBACD,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM;iBAC1B,EACD,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,EACzB,IAAI,EAAC,WAAW,EAChB,MAAM,EAAE,MAAA,IAAI,CAAC,KAAK,CAAC,SAAS,mCAAI,GAAG,GACnC,CACH,CACG;YACL,IAAI,CAAC,KAAK,CAAC,gBAAgB,IAAI,CAC9B,8BAAC,qBAAS,IACR,SAAS,EAAC,MAAM,EAChB,UAAU,EAAE,IAAI,CAAC,KAAK,CAAC,UAAU,EACjC,YAAY,EAAE,IAAI,CAAC,KAAK,CAAC,YAAY,GACrC,CACH,CACG,CACP,CAAC;IACJ,CAAC;IACH,gBAAC;AAAD,CAAC,AAnED,CAA+B,iBAAS,GAmEvC;AAnEY,8BAAS"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Component, ReactElement } from "react";
|
|
2
2
|
import "../../../index.css";
|
|
3
|
+
import { RangeInterface } from "../DateRange";
|
|
3
4
|
interface StatsData {
|
|
4
5
|
name: string;
|
|
5
6
|
stats: string;
|
|
@@ -11,6 +12,9 @@ interface StatsData {
|
|
|
11
12
|
interface Props {
|
|
12
13
|
stats: StatsData[];
|
|
13
14
|
gridSize?: 1 | 2;
|
|
15
|
+
dateRangeVisible?: boolean;
|
|
16
|
+
customDate?: RangeInterface;
|
|
17
|
+
onChangeDate?: (customDate?: RangeInterface) => void;
|
|
14
18
|
}
|
|
15
19
|
export declare class StatsCard extends Component<Props> {
|
|
16
20
|
renderGridSize: () => string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/chart/statsCard/index.tsx"],"names":[],"mappings":"AACA,OAAc,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AACvD,OAAO,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/chart/statsCard/index.tsx"],"names":[],"mappings":"AACA,OAAc,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AACvD,OAAO,oBAAoB,CAAC;AAC5B,OAAO,EAAa,cAAc,EAAE,MAAM,cAAc,CAAC;AAEzD,UAAU,SAAS;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,YAAY,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,UAAU,KAAK;IACb,KAAK,EAAE,SAAS,EAAE,CAAC;IACnB,QAAQ,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;IACjB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,UAAU,CAAC,EAAE,cAAc,CAAC;IAC5B,YAAY,CAAC,EAAE,CAAC,UAAU,CAAC,EAAE,cAAc,KAAK,IAAI,CAAC;CACtD;AAMD,qBAAa,SAAU,SAAQ,SAAS,CAAC,KAAK,CAAC;IAC7C,cAAc,eAUZ;IAEF,MAAM;CA4DP"}
|
|
@@ -42,6 +42,7 @@ exports.StatsCard = void 0;
|
|
|
42
42
|
var solid_1 = require("@heroicons/react/20/solid");
|
|
43
43
|
var react_1 = __importStar(require("react"));
|
|
44
44
|
require("../../../index.css");
|
|
45
|
+
var DateRange_1 = require("../DateRange");
|
|
45
46
|
function classNames() {
|
|
46
47
|
var classes = [];
|
|
47
48
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
@@ -69,23 +70,25 @@ var StatsCard = /** @class */ (function (_super) {
|
|
|
69
70
|
return _this;
|
|
70
71
|
}
|
|
71
72
|
StatsCard.prototype.render = function () {
|
|
72
|
-
return (react_1.default.createElement(
|
|
73
|
-
react_1.default.createElement("
|
|
74
|
-
react_1.default.createElement("
|
|
75
|
-
|
|
76
|
-
" ",
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
react_1.default.createElement("
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
"
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
73
|
+
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
74
|
+
react_1.default.createElement("div", { className: classNames(this.renderGridSize(), "grid grid-cols-1 gap-5 divide-y md:divide-y-0 md:divide-x") }, this.props.stats.map(function (item) { return (react_1.default.createElement("div", { key: item.name, className: "bg-white overflow-hidden shadow rounded-lg p-5 lg:mb-3 sm:my-1" },
|
|
75
|
+
react_1.default.createElement("dt", { className: "text-base font-normal text-gray-900 flex flex-row" },
|
|
76
|
+
react_1.default.createElement("div", { className: "m-1 ml-0" }, item.icon),
|
|
77
|
+
react_1.default.createElement("div", { className: "self-center ml-1" },
|
|
78
|
+
" ",
|
|
79
|
+
item.name)),
|
|
80
|
+
react_1.default.createElement("dd", { className: "mt-1 flex items-baseline justify-between md:block lg:flex" },
|
|
81
|
+
react_1.default.createElement("div", { className: "flex items-baseline text-2xl font-semibold text-primary-600" },
|
|
82
|
+
item.stats,
|
|
83
|
+
react_1.default.createElement("span", { className: "ml-2 text-sm font-medium text-gray-500" },
|
|
84
|
+
"from ",
|
|
85
|
+
item.previousStats)),
|
|
86
|
+
react_1.default.createElement("div", { className: classNames(item.changeType === "increase"
|
|
87
|
+
? "bg-green-100 text-green-800"
|
|
88
|
+
: "bg-red-100 text-red-800", "inline-flex items-baseline px-2.5 py-0.5 rounded-full text-sm font-medium md:mt-2 lg:mt-0") },
|
|
89
|
+
item.changeType === "increase" ? (react_1.default.createElement(solid_1.ArrowUpIcon, { className: "-ml-1 mr-0.5 h-5 w-5 flex-shrink-0 self-center text-green-500", "aria-hidden": "true" })) : (react_1.default.createElement(solid_1.ArrowDownIcon, { className: "-ml-1 mr-0.5 h-5 w-5 flex-shrink-0 self-center text-red-500", "aria-hidden": "true" })),
|
|
90
|
+
item.change)))); })),
|
|
91
|
+
this.props.dateRangeVisible && (react_1.default.createElement(DateRange_1.DateRange, { customDate: this.props.customDate, onChangeDate: this.props.onChangeDate }))));
|
|
89
92
|
};
|
|
90
93
|
return StatsCard;
|
|
91
94
|
}(react_1.Component));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/chart/statsCard/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mDAAuE;AACvE,6CAAuD;AACvD,8BAA4B;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/chart/statsCard/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mDAAuE;AACvE,6CAAuD;AACvD,8BAA4B;AAC5B,0CAAyD;AAmBzD,SAAS,UAAU;IAAC,iBAAU;SAAV,UAAU,EAAV,qBAAU,EAAV,IAAU;QAAV,4BAAU;;IAC5B,OAAO,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC3C,CAAC;AAED;IAA+B,6BAAgB;IAA/C;QAAA,qEAyEC;QAxEC,oBAAc,GAAG;YACf,IAAI,QAAQ,GAAG,EAAE,CAAC;YAClB,IAAI,KAAI,CAAC,KAAK,CAAC,QAAQ,KAAK,CAAC,EAAE;gBAC7B,QAAQ,GAAG,gBAAgB,CAAC;aAC7B;iBAAM,IAAI,KAAI,CAAC,KAAK,CAAC,QAAQ,KAAK,CAAC,EAAE;gBACpC,QAAQ,GAAG,gBAAgB,CAAC;aAC7B;iBAAM;gBACL,QAAQ,GAAG,gBAAgB,CAAC;aAC7B;YACD,OAAO,QAAQ,CAAC;QAClB,CAAC,CAAC;;IA8DJ,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ACJ,CAAC;IACH,gBAAC;AAAD,CAAC,AAzED,CAA+B,iBAAS,GAyEvC;AAzEY,8BAAS"}
|
|
@@ -1336,7 +1336,7 @@ function DataTemplate(props) {
|
|
|
1336
1336
|
if (!eachKey)
|
|
1337
1337
|
return null;
|
|
1338
1338
|
props.model.map(function (eachModel) {
|
|
1339
|
-
if (eachKey.toLowerCase().includes(eachModel.id) &&
|
|
1339
|
+
if (eachKey.toLowerCase().includes(eachModel.id.toLowerCase()) &&
|
|
1340
1340
|
eachModel.id !== "_id" &&
|
|
1341
1341
|
eachModel.id !== "id" &&
|
|
1342
1342
|
eachModel.type !== "object" &&
|