awing-library 2.1.18-beta → 2.1.19-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.
@@ -256,20 +256,19 @@ var CampaignContainer = function () {
256
256
  },
257
257
  {
258
258
  field: 'booking',
259
- headerName: t('Campaign.BookingText'),
259
+ headerName: (0, jsx_runtime_1.jsx)(material_1.Box, { sx: { width: '150px', textAlign: 'right' }, children: t('Campaign.BookingText') }),
260
260
  valueGetter: function (row) {
261
261
  var _a;
262
+ var text = '';
262
263
  if ((_a = row === null || row === void 0 ? void 0 : row.campaign) === null || _a === void 0 ? void 0 : _a.id) {
263
- return (0, Utils_1.getTotalBooking)(row === null || row === void 0 ? void 0 : row.campaignGroups);
264
+ text = (0, Utils_1.getTotalBooking)(row === null || row === void 0 ? void 0 : row.campaignGroups);
264
265
  }
265
266
  else {
266
- return (0, Utils_1.checkPriority)(row.campaignGroup.priority, Types_1.CampaignPriority.ClassB)
267
+ text = (0, Utils_1.checkPriority)(row.campaignGroup.priority, Types_1.CampaignPriority.ClassB)
267
268
  ? (0, Helpers_1.roundDecimalNumber)(row.campaignGroup.bookingAmount)
268
269
  : 'N/A';
269
270
  }
270
- },
271
- TableCellProps: {
272
- align: 'right',
271
+ return (0, jsx_runtime_1.jsx)(material_1.Box, { sx: { width: '150px', textAlign: 'right' }, children: text });
273
272
  },
274
273
  },
275
274
  ], rows: (0, Utils_1.formatListCampaign)(listCampaign === null || listCampaign === void 0 ? void 0 : listCampaign.items, collapseIds) || [], rowActions: [
@@ -244,7 +244,7 @@ jest.mock('CustomHooks/useAppHelper', function () { return ({
244
244
  }); },
245
245
  }); });
246
246
  // Mock PageManagement
247
- jest.mock('awing-library/lib/AWING/PageManagement', function () { return ({
247
+ jest.mock('AWING/PageManagement', function () { return ({
248
248
  PageManagement: function (props) {
249
249
  return ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("button", { "data-testid": "onChangeQueryInput", onClick: function () {
250
250
  props.onChangeQueryInput({
@@ -16,7 +16,7 @@ function MockComponent(props) {
16
16
  // const MockComponentFactory = (name: string) => () => (props: any) => <div><div/>
17
17
  jest.mock('Features/PlaceFilter', function () { return MockComponent; });
18
18
  jest.mock("Components/Typescript/AsynchronousAutocomplete", function () { return MockComponent; });
19
- jest.mock("awing-library/lib/AWING/DateRangePicker", function () { return MockComponent; });
19
+ jest.mock("AWING/DateRangePicker", function () { return MockComponent; });
20
20
  jest.mock('Services/DirectoryPermission', function () { return ({
21
21
  getByObjectTypeCode: function () { return new Promise(function (resolve) {
22
22
  resolve({
@@ -33,6 +33,17 @@ var __importStar = (this && this.__importStar) || function (mod) {
33
33
  __setModuleDefault(result, mod);
34
34
  return result;
35
35
  };
36
+ var __rest = (this && this.__rest) || function (s, e) {
37
+ var t = {};
38
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
39
+ t[p] = s[p];
40
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
41
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
42
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
43
+ t[p[i]] = s[p[i]];
44
+ }
45
+ return t;
46
+ };
36
47
  var __importDefault = (this && this.__importDefault) || function (mod) {
37
48
  return (mod && mod.__esModule) ? mod : { "default": mod };
38
49
  };
@@ -189,10 +200,14 @@ var Advanced = function (props) {
189
200
  onClose();
190
201
  }
191
202
  };
203
+ var ruleType = react_1.default.useMemo(function () {
204
+ var RetargetMacAddress = Utils_1.RuleType.RetargetMacAddress, other = __rest(Utils_1.RuleType, ["RetargetMacAddress"]);
205
+ return (service === null || service === void 0 ? void 0 : service.remarketingListGetAll) ? Utils_1.RuleType : other;
206
+ }, [service]);
192
207
  return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(ClassicBaseDrawer_1.default, { title: translationText.advanced, open: isOpen, onSubmit: handleSubmit, onClose: handleClose, children: (0, jsx_runtime_1.jsx)(material_1.Paper, { sx: classes.paper, children: (0, jsx_runtime_1.jsxs)(material_1.Grid, { container: true, children: [(0, jsx_runtime_1.jsxs)(material_1.Grid, { item: true, xs: 12, container: true, children: [(0, jsx_runtime_1.jsx)(material_1.Grid, { item: true, md: true }), (0, jsx_runtime_1.jsxs)(material_1.Grid, { item: true, sx: classes.buttonGroup, children: [(0, jsx_runtime_1.jsx)(material_1.Button, { variant: "outlined", color: "primary", endIcon: (0, jsx_runtime_1.jsx)(icons_material_1.ExpandMore, {}), "aria-controls": "simple-menu", "aria-haspopup": "true", onClick: function (e) {
193
208
  e.stopPropagation();
194
209
  setAnchorElRule(e.currentTarget);
195
- }, children: translationText.addRule }), (0, jsx_runtime_1.jsx)(material_1.Menu, { id: "simple-menu", anchorEl: anchorElRule, keepMounted: true, open: Boolean(anchorElRule), onClose: function () { return handleButtonMenuClose(); }, children: Object.keys(Utils_1.RuleType).map(function (type, idx) {
210
+ }, children: translationText.addRule }), (0, jsx_runtime_1.jsx)(material_1.Menu, { id: "simple-menu", anchorEl: anchorElRule, keepMounted: true, open: Boolean(anchorElRule), onClose: function () { return handleButtonMenuClose(); }, children: Object.keys(ruleType).map(function (type, idx) {
196
211
  var _a;
197
212
  return ((0, jsx_runtime_1.jsx)(material_1.MenuItem, { onClick: function () { return handleAddRule(type); }, children: ((_a = Object.entries(translationText.type).find(function (_a) {
198
213
  var k = _a[0], val = _a[1];
@@ -14,7 +14,7 @@ var Recoils_1 = require("../Recoils");
14
14
  function MockComponent(props) {
15
15
  return (0, jsx_runtime_1.jsx)("div", {});
16
16
  }
17
- jest.mock('awing-library/lib/AWING', function () { return ({
17
+ jest.mock('AWING', function () { return ({
18
18
  Actions: MockComponent,
19
19
  }); });
20
20
  var RecoilObserver = function (_a) {
@@ -505,7 +505,7 @@ var getDescription = function (rule) {
505
505
  case exports.RuleType.RetargetMacAddress:
506
506
  {
507
507
  var textFormat = i18n_1.default.t('Campaign.Rule.DescriptionFormat.RetargetMacAddress');
508
- result += textFormat.replace('{0}', rule.description);
508
+ result += textFormat.replace('{0}', JSON.parse(rule.parameter || '{}').name);
509
509
  }
510
510
  break;
511
511
  default:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "awing-library",
3
- "version": "2.1.18-beta",
3
+ "version": "2.1.19-beta",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",