awing-library 2.1.28-beta → 2.1.30-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.
@@ -91,7 +91,9 @@ var RowAdvanceComponent = function (_a) {
91
91
  ? (0, helper_1.timestampToStringDDMMYYYY)(row === null || row === void 0 ? void 0 : row.toDate)
92
92
  : (0, helper_1.timestampToStringDDMMYYYY)(row === null || row === void 0 ? void 0 : row.date);
93
93
  var fromDateToDate = startDate === endDate ? startDate : startDate + ' - ' + endDate;
94
- var totalRate = !(row === null || row === void 0 ? void 0 : row.rate) ? '' : (0, helper_1.roundDecimalNumber)(row === null || row === void 0 ? void 0 : row.rate);
94
+ var totalRate = !(row === null || row === void 0 ? void 0 : row.rate)
95
+ ? ''
96
+ : Number((0, helper_1.roundDecimalNumber)(row === null || row === void 0 ? void 0 : row.rate)).toFixed(2);
95
97
  var totalView = (row === null || row === void 0 ? void 0 : row.quantity) !== undefined
96
98
  ? (0, helper_1.roundDecimalNumber)(row === null || row === void 0 ? void 0 : row.quantity)
97
99
  : (0, helper_1.roundDecimalNumber)(row === null || row === void 0 ? void 0 : row.totalQuantity);
@@ -140,7 +142,7 @@ var RowAdvanceComponent = function (_a) {
140
142
  (0, jsx_runtime_1.jsx)(material_1.TableCell, { className: classes.styledCampaignField, children: generateCampaignTotalCount(options === null || options === void 0 ? void 0 : options.campaigns, row, t('Schedule.CampaignDefault')) })) : ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {})) })) }, item.id));
141
143
  case Enum_1.HEAD_CELL_NAMES.DOMAIN:
142
144
  return ((0, jsx_runtime_1.jsx)(react_1.default.Fragment, { children: fieldNameShowOn ===
143
- Enum_1.HEAD_CELL_NAMES.DOMAIN ? ((0, jsx_runtime_1.jsx)(material_1.TableCell, { className: classes.styledDomainField, children: (_c = options === null || options === void 0 ? void 0 : options.domains[row === null || row === void 0 ? void 0 : row.domainId]) === null || _c === void 0 ? void 0 : _c.name })) : ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: groupNames
145
+ Enum_1.HEAD_CELL_NAMES.DOMAIN ? ((0, jsx_runtime_1.jsx)(material_1.TableCell, { className: classes.styledDomainField, children: (_c = options === null || options === void 0 ? void 0 : options.domains[row === null || row === void 0 ? void 0 : row.groupKeyId]) === null || _c === void 0 ? void 0 : _c.name })) : ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: groupNames
144
146
  .slice(0, priorityGroupLevel - 1)
145
147
  .indexOf(Enum_1.HEAD_CELL_NAMES.DOMAIN) === -1 ? ((0, jsx_runtime_1.jsx)(material_1.TableCell, { className: classes.styledDomainField, children: ((_d = options === null || options === void 0 ? void 0 : options.domains[row === null || row === void 0 ? void 0 : row.domainId]) === null || _d === void 0 ? void 0 : _d.name) || (row === null || row === void 0 ? void 0 : row.totalDomain) })) : ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {})) })) }, item.id));
146
148
  case Enum_1.HEAD_CELL_NAMES.DATE:
@@ -180,6 +180,8 @@ var RowAdvanceContainer = function (_a) {
180
180
  };
181
181
  var filterById = function (id, groupName, filters) {
182
182
  switch (groupName) {
183
+ case Enum_1.HEAD_CELL_NAMES.DOMAIN:
184
+ return __assign(__assign({}, filters), { domainId: id });
183
185
  case Enum_1.HEAD_CELL_NAMES.CAMPAIGN:
184
186
  return __assign(__assign({}, filters), { campaignId: id });
185
187
  case Enum_1.HEAD_CELL_NAMES.PLACE:
@@ -60,7 +60,7 @@ var AdvancedSearch = function (props) {
60
60
  : undefined, onChange: function (val) {
61
61
  var _a;
62
62
  return onChangeValue(__assign(__assign({}, value), (_a = {}, _a[fieldName] = val, _a)));
63
- }, isOutsideRange: fieldDef.isOutsideRange, isDayBlocked: fieldDef.isDayBlocked, children: fieldDef.label }, fieldName));
63
+ }, isOutsideRange: fieldDef.isOutsideRange, isDayBlocked: fieldDef.isDayBlocked, isShowCalendarInfo: fieldDef.isShowCalendarInfo, children: fieldDef.label }, fieldName));
64
64
  case 'directory':
65
65
  return ((0, jsx_runtime_1.jsx)(DirectoryTree_1.default, { labelSearch: fieldDef.label, rootDirectoryId: fieldDef.rootId || '', defaultValue: fieldValue, options: options !== null && options !== void 0 ? options : [], onChange: function (val) {
66
66
  var _a;
@@ -7,6 +7,7 @@ export interface AdvancedSearchFieldDefinition extends BaseTextFieldProps {
7
7
  icon?: React.ReactElement;
8
8
  label: string;
9
9
  type: 'select' | 'date-range' | 'autocomplete' | 'directory';
10
+ isShowCalendarInfo?: boolean;
10
11
  options?: MenuOption[];
11
12
  loading?: boolean;
12
13
  width?: number;
@@ -50,7 +50,7 @@ var DateRangePicker_1 = __importDefault(require("../DateRangePicker"));
50
50
  var react_i18next_1 = require("react-i18next");
51
51
  var ButtonDateRangePicker = function (props) {
52
52
  var t = (0, react_i18next_1.useTranslation)().t;
53
- var defaultValue = props.value, onChange = props.onChange, isOutsideRange = props.isOutsideRange, isDayBlocked = props.isDayBlocked, other = __rest(props, ["value", "onChange", "isOutsideRange", "isDayBlocked"]);
53
+ var defaultValue = props.value, onChange = props.onChange, isOutsideRange = props.isOutsideRange, isDayBlocked = props.isDayBlocked, isShowCalendarInfo = props.isShowCalendarInfo, other = __rest(props, ["value", "onChange", "isOutsideRange", "isDayBlocked", "isShowCalendarInfo"]);
54
54
  var _a = react_1.default.useState(false), open = _a[0], setOpen = _a[1];
55
55
  var anchorRef = react_1.default.useRef(null);
56
56
  var handleToggle = function () {
@@ -105,7 +105,7 @@ var ButtonDateRangePicker = function (props) {
105
105
  dateRange.startDate,
106
106
  dateRange.endDate,
107
107
  ]);
108
- }, isOutsideRange: isOutsideRange, isDayBlocked: isDayBlocked }) })] }) }) }) })));
108
+ }, isOutsideRange: isOutsideRange, isDayBlocked: isDayBlocked, isShowCalendarInfo: isShowCalendarInfo }) })] }) }) }) })));
109
109
  } })] }));
110
110
  };
111
111
  exports.ButtonDateRangePicker = ButtonDateRangePicker;
@@ -5,4 +5,5 @@ export interface ButtonDateRangePickerProps extends ButtonProps {
5
5
  onChange?(value: any): void;
6
6
  isOutsideRange?(date: Moment): boolean;
7
7
  isDayBlocked?(date: Moment): boolean;
8
+ isShowCalendarInfo?: boolean;
8
9
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "awing-library",
3
- "version": "2.1.28-beta",
3
+ "version": "2.1.30-beta",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",