awing-library 2.1.88-beta → 2.1.89-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.
@@ -1,4 +1,27 @@
1
1
  "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
2
25
  var __importDefault = (this && this.__importDefault) || function (mod) {
3
26
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
27
  };
@@ -7,7 +30,7 @@ var jsx_runtime_1 = require("react/jsx-runtime");
7
30
  var material_1 = require("@mui/material");
8
31
  var styles_1 = require("@mui/styles");
9
32
  var moment_1 = __importDefault(require("moment"));
10
- var react_1 = __importDefault(require("react"));
33
+ var react_1 = __importStar(require("react"));
11
34
  var EnhancedPagination_1 = __importDefault(require("./Components/EnhancedPagination"));
12
35
  var NoDataTable_1 = __importDefault(require("./Components/NoDataTable"));
13
36
  var RowAdvance_1 = __importDefault(require("./Components/RowAdvance"));
@@ -48,9 +71,12 @@ var CampaignSchedulesComponent = function (_a) {
48
71
  var headCells = _a.headCells, onDragOver = _a.onDragOver, onDragStart = _a.onDragStart, onDrop = _a.onDrop, scheduleGroups = _a.scheduleGroups, page = _a.page, handleChangePage = _a.handleChangePage, handleChangeRowsPerPage = _a.handleChangeRowsPerPage, filters = _a.filters, options = _a.options, serviceCampaignSchedule = _a.serviceCampaignSchedule;
49
72
  var classes = useStyles();
50
73
  var groupLength = (_c = (_b = headCells === null || headCells === void 0 ? void 0 : headCells.filter(function (cell) { return cell.grouping; })) === null || _b === void 0 ? void 0 : _b.map(function (item) { return item.name; })) === null || _c === void 0 ? void 0 : _c.length;
51
- return ((0, jsx_runtime_1.jsx)(react_1.default.Fragment, { children: (0, jsx_runtime_1.jsxs)(material_1.Table, { "aria-label": "Table-advance", children: [(0, jsx_runtime_1.jsx)(TableHeaderDragable_1.default, { headCells: headCells, onDragOver: onDragOver, onDragStart: onDragStart, onDrop: onDrop }), (0, jsx_runtime_1.jsx)(material_1.TableBody, { children: (0, jsx_runtime_1.jsx)(EnhancedPagination_1.default, { total: (scheduleGroups === null || scheduleGroups === void 0 ? void 0 : scheduleGroups.total)
52
- ? scheduleGroups === null || scheduleGroups === void 0 ? void 0 : scheduleGroups.total
53
- : scheduleGroups === null || scheduleGroups === void 0 ? void 0 : scheduleGroups.totalItemCount, pageSize: page === null || page === void 0 ? void 0 : page.pageSize, pageIndex: page === null || page === void 0 ? void 0 : page.pageIndex, handleChangePage: handleChangePage, handleChangeRowsPerPage: handleChangeRowsPerPage, className: "".concat(classes.pagination, " ").concat(groupLength === 0
74
+ var total = (0, react_1.useMemo)(function () {
75
+ return (scheduleGroups === null || scheduleGroups === void 0 ? void 0 : scheduleGroups.total)
76
+ ? scheduleGroups === null || scheduleGroups === void 0 ? void 0 : scheduleGroups.total
77
+ : scheduleGroups === null || scheduleGroups === void 0 ? void 0 : scheduleGroups.totalItemCount;
78
+ }, [scheduleGroups]);
79
+ return ((0, jsx_runtime_1.jsx)(react_1.default.Fragment, { children: (0, jsx_runtime_1.jsxs)(material_1.Table, { "aria-label": "Table-advance", children: [(0, jsx_runtime_1.jsx)(TableHeaderDragable_1.default, { headCells: headCells, onDragOver: onDragOver, onDragStart: onDragStart, onDrop: onDrop }), (0, jsx_runtime_1.jsx)(material_1.TableBody, { children: (0, jsx_runtime_1.jsx)(EnhancedPagination_1.default, { total: total !== null && total !== void 0 ? total : 0, pageSize: page === null || page === void 0 ? void 0 : page.pageSize, pageIndex: page === null || page === void 0 ? void 0 : page.pageIndex, handleChangePage: handleChangePage, handleChangeRowsPerPage: handleChangeRowsPerPage, className: "".concat(classes.pagination, " ").concat(groupLength === 0
54
80
  ? classes.nomarlPaginations
55
81
  : groupLength === 1
56
82
  ? classes.secondaryPaginations
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "awing-library",
3
- "version": "2.1.88-beta",
3
+ "version": "2.1.89-beta",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",