awing-library 2.1.151-beta → 2.1.153-beta

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.
@@ -16,6 +16,7 @@ var jsx_runtime_1 = require("react/jsx-runtime");
16
16
  var react_1 = __importDefault(require("react"));
17
17
  var react_i18next_1 = require("react-i18next");
18
18
  var material_1 = require("@mui/material");
19
+ var i18n_1 = __importDefault(require("../../../../../../i18n"));
19
20
  var useStyles = {
20
21
  groupBy: {},
21
22
  chip: {},
@@ -51,7 +52,7 @@ var useStyles = {
51
52
  };
52
53
  var ControlPanel = function (props) {
53
54
  var groupHeaders = props.groupHeaders, onQueryData = props.onQueryData;
54
- var t = (0, react_i18next_1.useTranslation)().t;
55
+ var t = (0, react_i18next_1.useTranslation)(undefined, { i18n: i18n_1.default }).t;
55
56
  var _a = react_1.default.useState([]), groupByValues = _a[0], setGroupByValues = _a[1];
56
57
  var handleDelete = function (groupId) { return function () {
57
58
  setGroupByValues(function (old) { return old.filter(function (x) { return x !== groupId; }); });
@@ -26,6 +26,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
26
26
  var jsx_runtime_1 = require("react/jsx-runtime");
27
27
  var react_1 = __importDefault(require("react"));
28
28
  var react_i18next_1 = require("react-i18next");
29
+ var i18n_1 = __importDefault(require("../../../../../../i18n"));
29
30
  var material_1 = require("@mui/material");
30
31
  // import GroupTable from 'Features/GroupTable'
31
32
  var Helpers_1 = require("../../../../../../Utils/Helpers");
@@ -36,7 +37,7 @@ var Context_1 = __importDefault(require("../../Context"));
36
37
  var uniqBy = require('lodash/uniqBy');
37
38
  var sumBy = require('lodash/sumBy');
38
39
  var DetailGroupBy = function (props) {
39
- var t = (0, react_i18next_1.useTranslation)().t;
40
+ var t = (0, react_i18next_1.useTranslation)(undefined, { i18n: i18n_1.default }).t;
40
41
  var statisticalData = props.statisticalData;
41
42
  var services = (0, Context_1.default)().services;
42
43
  var _a = react_1.default.useState([]), groupByValues = _a[0], setGroupByValues = _a[1];
@@ -1,10 +1,14 @@
1
1
  "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
2
5
  Object.defineProperty(exports, "__esModule", { value: true });
3
6
  var jsx_runtime_1 = require("react/jsx-runtime");
4
7
  var styles_1 = require("@mui/styles");
5
8
  var material_1 = require("@mui/material");
6
9
  var react_i18next_1 = require("react-i18next");
7
10
  var Helpers_1 = require("../../../../../Utils/Helpers");
11
+ var i18n_1 = __importDefault(require("../../../../../i18n"));
8
12
  var useStyles = (0, styles_1.makeStyles)({
9
13
  table: {
10
14
  minWidth: 400,
@@ -19,7 +23,7 @@ var useStyles = (0, styles_1.makeStyles)({
19
23
  var EventTable = function (props) {
20
24
  var classes = useStyles();
21
25
  var eventDetails = props.data;
22
- var t = (0, react_i18next_1.useTranslation)().t;
26
+ var t = (0, react_i18next_1.useTranslation)(undefined, { i18n: i18n_1.default }).t;
23
27
  var translationText = {
24
28
  eventLabel: t('Campaign.Detail.EventLabel'),
25
29
  number: t('Campaign.Detail.TotalEvents'),
@@ -20,13 +20,14 @@ var material_1 = require("@mui/material");
20
20
  var ArrowDropDown_1 = __importDefault(require("@mui/icons-material/ArrowDropDown"));
21
21
  var common_1 = require("./common");
22
22
  var react_i18next_1 = require("react-i18next");
23
+ var i18n_1 = __importDefault(require("../../../../i18n"));
23
24
  var options = Object.values(common_1.EXPORT_TYPES).map(function (type, idx) { return type; });
24
25
  var SplitButtonExportType = function (props) {
25
26
  var onSubmit = props.onSubmit;
26
27
  var _a = react_1.default.useState(false), open = _a[0], setOpen = _a[1];
27
28
  var anchorRef = react_1.default.useRef(null);
28
29
  var _b = react_1.default.useState(0), selectedIndex = _b[0], setSelectedIndex = _b[1];
29
- var t = (0, react_i18next_1.useTranslation)().t;
30
+ var t = (0, react_i18next_1.useTranslation)(undefined, { i18n: i18n_1.default }).t;
30
31
  var handleClick = function () {
31
32
  onSubmit(options[selectedIndex]);
32
33
  };
@@ -1,14 +1,18 @@
1
1
  "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
2
5
  Object.defineProperty(exports, "__esModule", { value: true });
3
6
  var jsx_runtime_1 = require("react/jsx-runtime");
4
7
  var react_i18next_1 = require("react-i18next");
5
8
  var material_1 = require("@mui/material");
6
9
  var react_1 = require("react");
7
10
  var container_1 = require("./container");
11
+ var i18n_1 = __importDefault(require("../../../../i18n"));
8
12
  var color = ['inherit', 'primary'];
9
13
  var variant = ['outlined', 'contained'];
10
14
  var TabStatistic = function (props) {
11
- var t = (0, react_i18next_1.useTranslation)().t;
15
+ var t = (0, react_i18next_1.useTranslation)(undefined, { i18n: i18n_1.default }).t;
12
16
  var tabIndex = props.tabIndex, onChangeTab = props.onChangeTab, tabPanel = props.tabPanel, isNetwork = props.isNetwork;
13
17
  var translationText = (0, react_1.useMemo)(function () { return ({
14
18
  analytic: t('Campaign.Analytic'),
@@ -110,9 +110,7 @@ function Container() {
110
110
  {
111
111
  field: 'totalRun',
112
112
  headerName: "".concat(t('CampaignPlan.HasRun'), " (").concat(t('Common.BillingUnit'), ")"),
113
- valueGetter: function (row) {
114
- return (0, Helpers_1.formatNumber)(row.totalRun);
115
- },
113
+ type: 'number',
116
114
  width: 200,
117
115
  TableCellProps: {
118
116
  align: 'right',
@@ -186,7 +186,7 @@ function Container() {
186
186
  },
187
187
  type: 'number',
188
188
  valueGetter: function (row) {
189
- return (0, Helpers_1.formatNumber)(row.rate.toFixed(2));
189
+ return (0, Helpers_1.formatNumber)(row.rate.toFixed(2) || 0);
190
190
  },
191
191
  },
192
192
  ], rows: (0, Helpers_1.offlinePaginate)(schedules, queryInput.pageIndex, queryInput.pageSize), sortModel: sortModels, onSortModelChange: setSortModels, getRowId: function (row) {
@@ -37,7 +37,6 @@ function CompletionRateDate() {
37
37
  var _a = (0, Router_1.useParams)(), campaignId = _a.campaignId, groupId = _a.groupId, date = _a.date;
38
38
  var service = (0, Hooks_1.default)().service;
39
39
  var completionRateDateInfo = (0, recoil_1.useRecoilValue)((0, Recoils_1.detailCompletionRateDateItem)(date));
40
- console.log('completionRateDateInfo =================>', completionRateDateInfo);
41
40
  var type = (0, recoil_1.useRecoilValue)(Recoils_1.ScheduleCompletionRateTypeViewState).type;
42
41
  var schedule = (0, recoil_1.useRecoilValue)(Recoils_1.scheduleCompletionRateAtom);
43
42
  var _b = (0, react_1.useState)(true), loading = _b[0], setLoading = _b[1];
@@ -47,7 +46,6 @@ function CompletionRateDate() {
47
46
  service
48
47
  .scheduleCompletionRatesPaging((0, moment_1.default)(date, 'DD-MM-YYYY').format('YYYY-MM-DD'), (0, moment_1.default)(date, 'DD-MM-YYYY').format('YYYY-MM-DD'), campaignId, Number(groupId), 'placeId', queryInput.pageIndex, queryInput.pageSize)
49
48
  .then(function (res) {
50
- console.log('res =================>', res);
51
49
  var valueNew = (0, Utils_1.converData)((res === null || res === void 0 ? void 0 : res.items) || [], type, completionRateDateInfo === null || completionRateDateInfo === void 0 ? void 0 : completionRateDateInfo.billingUnit);
52
50
  setScheduleGroupByDate(__assign(__assign({}, res), { items: valueNew.length ? valueNew : [] }));
53
51
  })
@@ -16,7 +16,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  var jsx_runtime_1 = require("react/jsx-runtime");
18
18
  var material_1 = require("@mui/material");
19
- var styles_1 = require("@mui/styles");
20
19
  var Helpers_1 = require("../../Utils/Helpers");
21
20
  require("chartjs-adapter-moment");
22
21
  var moment_1 = __importDefault(require("moment"));
@@ -24,23 +23,7 @@ var react_i18next_1 = require("react-i18next");
24
23
  var i18n_1 = __importDefault(require("../../i18n"));
25
24
  var Enums_1 = require("./Enums");
26
25
  var Styles_1 = require("./Styles");
27
- var useStyles = (0, styles_1.makeStyles)({
28
- point: {
29
- position: "relative",
30
- '&::after': {
31
- content: '""',
32
- position: 'absolute',
33
- top: '50%',
34
- left: '-5px', /* Adjust as needed */
35
- right: '-5px', /* Adjust as needed */
36
- height: '2px', /* Thickness of the line */
37
- backgroundColor: 'inherit',
38
- transform: 'translateY(-50%)'
39
- }
40
- },
41
- });
42
26
  var BarLineComponent = function (props) {
43
- var classes = useStyles();
44
27
  var t = (0, react_i18next_1.useTranslation)(undefined, { i18n: i18n_1.default }).t;
45
28
  var optionsDefault = props.optionsDefault;
46
29
  var chart = props.chart, _a = props.width, width = _a === void 0 ? 'auto' : _a, _b = props.height, height = _b === void 0 ? 350 : _b, _c = props.timeline, timeline = _c === void 0 ? Enums_1.TYPE_TIMELINE.DAY : _c, _d = props.optionCustom, optionCustom = _d === void 0 ? {} : _d, dataChart = props.dataChart, type = props.type, _e = props.options, options = _e === void 0 ? {
@@ -255,8 +238,8 @@ var BarLineComponent = function (props) {
255
238
  boxSpan.style.height = '15px';
256
239
  boxSpan.style.marginRight = '15px';
257
240
  boxSpan.style.width = '15px';
258
- if ((item === null || item === void 0 ? void 0 : item.lineWidth) && (item === null || item === void 0 ? void 0 : item.pointStyle)) {
259
- boxSpan.setAttribute("class", classes.point);
241
+ if (item === null || item === void 0 ? void 0 : item.lineWidth) {
242
+ boxSpan.setAttribute("class", 'point');
260
243
  }
261
244
  if ((item === null || item === void 0 ? void 0 : item.pointStyle) === 'circle') {
262
245
  boxSpan.style.borderRadius = '20px';
@@ -282,6 +265,19 @@ var BarLineComponent = function (props) {
282
265
  height: height,
283
266
  position: 'relative',
284
267
  marginBottom: '80px',
268
+ '.point': {
269
+ position: "relative",
270
+ '&::after': {
271
+ content: '""',
272
+ position: 'absolute',
273
+ top: '50%',
274
+ left: '-5px', /* Adjust as needed */
275
+ right: '-5px', /* Adjust as needed */
276
+ height: '2px', /* Thickness of the line */
277
+ backgroundColor: 'inherit',
278
+ transform: 'translateY(-50%)'
279
+ }
280
+ },
285
281
  }, children: [(0, jsx_runtime_1.jsx)(Chart, { data: chartData, type: type, options: (0, Helpers_1.updateObjectFields)(options, optionCustom), plugins: [htmlLegendPlugin] }), (0, jsx_runtime_1.jsx)(material_1.Box, { id: "legend-container", sx: {
286
282
  marginTop: '35px',
287
283
  display: 'flex',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "awing-library",
3
- "version": "2.1.151-beta",
3
+ "version": "2.1.153-beta",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",