@widergy/energy-ui 3.55.0 → 3.57.0

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/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ # [3.57.0](https://github.com/widergy/energy-ui/compare/v3.56.0...v3.57.0) (2025-01-28)
2
+
3
+
4
+ ### Features
5
+
6
+ * added tooltip fontsize theme ([24ef104](https://github.com/widergy/energy-ui/commit/24ef10466ccfaca2d1043db034d47b97f52b9e79))
7
+
8
+ # [3.56.0](https://github.com/widergy/energy-ui/compare/v3.55.0...v3.56.0) (2025-01-28)
9
+
10
+
11
+ ### Features
12
+
13
+ * [AUT-414] payment history id ([#564](https://github.com/widergy/energy-ui/issues/564)) ([df378e8](https://github.com/widergy/energy-ui/commit/df378e88a3cca6fa6feaf4fd11ee0d5b568f53ec))
14
+
1
15
  # [3.55.0](https://github.com/widergy/energy-ui/compare/v3.54.1...v3.55.0) (2025-01-27)
2
16
 
3
17
 
@@ -9,6 +9,7 @@ var _propTypes = require("prop-types");
9
9
  var _UTButton = _interopRequireDefault(require("../../../UTButton"));
10
10
  var _UTLabel = _interopRequireDefault(require("../../../UTLabel"));
11
11
  var _types = require("../../types");
12
+ var _testIds = require("../../../../constants/testIds");
12
13
  var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
13
14
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
14
15
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
@@ -26,22 +27,27 @@ RefreshIcon.defaultProps = {
26
27
  viewBox: "0 0 18 18",
27
28
  xmlns: "http://www.w3.org/2000/svg"
28
29
  };
30
+ const {
31
+ titleId
32
+ } = _testIds.COMPONENT_IDS.tableIds;
29
33
  const TableHeader = _ref => {
30
34
  let {
31
35
  classes,
36
+ disabled,
37
+ GeneralActions,
32
38
  onReload,
33
39
  title,
34
- GeneralActions,
35
- disabled
40
+ titleDataTestId
36
41
  } = _ref;
37
42
  return /*#__PURE__*/_react.default.createElement("div", {
38
43
  className: "".concat(_stylesModule.default.header, " ").concat(classes.headerContainer)
39
44
  }, /*#__PURE__*/_react.default.createElement("div", {
40
45
  className: _stylesModule.default.titleContainer
41
46
  }, /*#__PURE__*/_react.default.createElement(_UTLabel.default, {
47
+ className: classes.tableTitle,
48
+ dataTestId: titleDataTestId !== null && titleDataTestId !== void 0 ? titleDataTestId : titleId,
42
49
  variant: "subtitle1",
43
- weight: "medium",
44
- className: classes.tableTitle
50
+ weight: "medium"
45
51
  }, title), onReload && /*#__PURE__*/_react.default.createElement(_UTButton.default, {
46
52
  classNames: {
47
53
  icon: "".concat(_stylesModule.default.reloadIcon, " ").concat(classes.reloadIcon),
@@ -54,9 +60,10 @@ const TableHeader = _ref => {
54
60
  };
55
61
  TableHeader.propTypes = {
56
62
  classes: _types.classesType,
63
+ disabled: _propTypes.bool,
64
+ GeneralActions: _propTypes.node,
57
65
  onReload: _propTypes.func,
58
66
  title: _propTypes.string,
59
- GeneralActions: _propTypes.node,
60
- disabled: _propTypes.bool
67
+ titleDataTestId: _propTypes.string
61
68
  };
62
69
  var _default = exports.default = /*#__PURE__*/(0, _react.memo)(TableHeader);
@@ -84,6 +84,7 @@ const UTTable = _ref => {
84
84
  stickyHeader,
85
85
  tableTitle,
86
86
  tabletBreakpoint = _constants.DEFAULT_TABLET_BREAKPOINT,
87
+ titleDataTestId,
87
88
  totalRows,
88
89
  totalRowsLabel
89
90
  } = _ref;
@@ -247,7 +248,7 @@ const UTTable = _ref => {
247
248
  rowKey: rowKey,
248
249
  rowStyles: rowStyles,
249
250
  selectable: selectable,
250
- selectionComponentDataTestId: selectionComponentDataTestId !== null && selectionComponentDataTestId !== void 0 ? selectionComponentDataTestId : "".concat(_testIds.TABLE, ".").concat(_testIds.TABLE_ROW, ".").concat(_testIds.CELL, ".").concat(_testIds.SELECTION_COMPONENT),
251
+ selectionComponentDataTestId: selectionComponentDataTestId !== null && selectionComponentDataTestId !== void 0 ? selectionComponentDataTestId : "".concat(_testIds.TABLE, ".").concat(_testIds.TABLE_ROW, ".row_").concat(index, ".").concat(_testIds.CELL, ".").concat(_testIds.SELECTION_COMPONENT),
251
252
  selectedRows: selectedRows,
252
253
  tableSize: tableWidth
253
254
  });
@@ -295,7 +296,8 @@ const UTTable = _ref => {
295
296
  disabled: disableReloadRows,
296
297
  GeneralActions: GeneralActions,
297
298
  onReload: onReloadRows,
298
- title: tableTitle
299
+ title: tableTitle,
300
+ titleDataTestId: titleDataTestId
299
301
  }), Filters, !isResponsive && /*#__PURE__*/_react.default.createElement("div", {
300
302
  className: stickyHeader && "".concat(_stylesModule.default.stickyHeader, " ").concat(classes.stickyHeader || '')
301
303
  }, /*#__PURE__*/_react.default.createElement(_reactPerfectScrollbar.default, {
@@ -377,6 +379,7 @@ UTTable.propTypes = {
377
379
  stickyHeader: _propTypes.bool,
378
380
  tableTitle: _propTypes.string,
379
381
  tabletBreakpoint: _propTypes.number,
382
+ titleDataTestId: _propTypes.string,
380
383
  totalRows: _propTypes.number,
381
384
  totalRowsLabel: _propTypes.string
382
385
  };
@@ -10,6 +10,7 @@ var _Tab = _interopRequireDefault(require("@material-ui/core/Tab"));
10
10
  var _propTypes = require("prop-types");
11
11
  var _array = require("@widergy/web-utils/lib/array");
12
12
  var _WithTheme = _interopRequireDefault(require("../WithTheme"));
13
+ var _testIds = require("../../constants/testIds");
13
14
  var _classesUtils = require("../../utils/classesUtils");
14
15
  var _TooltipTab = _interopRequireDefault(require("./components/TooltipTab"));
15
16
  var _constants = require("./constants");
@@ -23,6 +24,9 @@ function _extends() { return _extends = Object.assign ? Object.assign.bind() : f
23
24
  function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
24
25
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
25
26
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
27
+ const {
28
+ tabId
29
+ } = _testIds.COMPONENT_IDS.tabsIds;
26
30
  class UTTabs extends _react.PureComponent {
27
31
  constructor() {
28
32
  super(...arguments);
@@ -52,7 +56,7 @@ class UTTabs extends _react.PureComponent {
52
56
  className: "".concat(styles.indicator, " ").concat(classes.indicator),
53
57
  children: /*#__PURE__*/_react.default.createElement("div", null)
54
58
  }
55
- }, tabsProps), options.map(opt => {
59
+ }, tabsProps), options.map((opt, i) => {
56
60
  const tabComponent = opt.tooltip ? /*#__PURE__*/(0, _react.forwardRef)((props, ref) => /*#__PURE__*/_react.default.createElement(_TooltipTab.default, _extends({}, props, {
57
61
  buttonRef: ref,
58
62
  isDisabled: opt.disabled,
@@ -71,7 +75,8 @@ class UTTabs extends _react.PureComponent {
71
75
  label: opt.label,
72
76
  disabled: opt.disabled,
73
77
  icon: opt.icon,
74
- component: tabComponent
78
+ component: tabComponent,
79
+ "data-testid": tabProps !== null && tabProps !== void 0 && tabProps.dataTestId ? "".concat(tabProps === null || tabProps === void 0 ? void 0 : tabProps.dataTestId).concat(i) : "".concat(tabId).concat(i)
75
80
  }, tabProps));
76
81
  }), !(0, _array.isEmpty)(badges) && badges.map(badge => /*#__PURE__*/_react.default.createElement("div", {
77
82
  className: "".concat(badge.styles, " ").concat(!badge.show && _stylesModule.default.hiddenBadge)
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.retrieveStyle = void 0;
7
7
  const retrieveStyle = _ref => {
8
- var _theme$UTTooltip, _theme$UTTooltip2, _theme$UTTooltip3, _theme$UTTooltip4, _theme$UTTooltip5, _theme$UTTooltip6, _theme$UTTooltip7, _theme$UTTooltip8, _theme$UTTooltip9;
8
+ var _theme$UTTooltip, _theme$UTTooltip2, _theme$UTTooltip3, _theme$UTTooltip4, _theme$UTTooltip5, _theme$UTTooltip6, _theme$UTTooltip7, _theme$UTTooltip8, _theme$UTTooltip9, _theme$UTTooltip10;
9
9
  let {
10
10
  theme
11
11
  } = _ref;
@@ -14,16 +14,17 @@ const retrieveStyle = _ref => {
14
14
  backgroundColor: theme === null || theme === void 0 || (_theme$UTTooltip = theme.UTTooltip) === null || _theme$UTTooltip === void 0 || (_theme$UTTooltip = _theme$UTTooltip.container) === null || _theme$UTTooltip === void 0 ? void 0 : _theme$UTTooltip.backgroundColor,
15
15
  borderRadius: theme === null || theme === void 0 || (_theme$UTTooltip2 = theme.UTTooltip) === null || _theme$UTTooltip2 === void 0 || (_theme$UTTooltip2 = _theme$UTTooltip2.container) === null || _theme$UTTooltip2 === void 0 ? void 0 : _theme$UTTooltip2.borderRadius,
16
16
  boxShadow: theme === null || theme === void 0 || (_theme$UTTooltip3 = theme.UTTooltip) === null || _theme$UTTooltip3 === void 0 || (_theme$UTTooltip3 = _theme$UTTooltip3.container) === null || _theme$UTTooltip3 === void 0 ? void 0 : _theme$UTTooltip3.boxShadow,
17
- padding: theme === null || theme === void 0 || (_theme$UTTooltip4 = theme.UTTooltip) === null || _theme$UTTooltip4 === void 0 || (_theme$UTTooltip4 = _theme$UTTooltip4.container) === null || _theme$UTTooltip4 === void 0 ? void 0 : _theme$UTTooltip4.padding,
17
+ fontSize: theme === null || theme === void 0 || (_theme$UTTooltip4 = theme.UTTooltip) === null || _theme$UTTooltip4 === void 0 || (_theme$UTTooltip4 = _theme$UTTooltip4.container) === null || _theme$UTTooltip4 === void 0 ? void 0 : _theme$UTTooltip4.fontSize,
18
+ padding: theme === null || theme === void 0 || (_theme$UTTooltip5 = theme.UTTooltip) === null || _theme$UTTooltip5 === void 0 || (_theme$UTTooltip5 = _theme$UTTooltip5.container) === null || _theme$UTTooltip5 === void 0 ? void 0 : _theme$UTTooltip5.padding,
18
19
  '& > .tippy-arrow': {
19
- display: theme === null || theme === void 0 || (_theme$UTTooltip5 = theme.UTTooltip) === null || _theme$UTTooltip5 === void 0 || (_theme$UTTooltip5 = _theme$UTTooltip5.arrow) === null || _theme$UTTooltip5 === void 0 ? void 0 : _theme$UTTooltip5.display
20
+ display: theme === null || theme === void 0 || (_theme$UTTooltip6 = theme.UTTooltip) === null || _theme$UTTooltip6 === void 0 || (_theme$UTTooltip6 = _theme$UTTooltip6.arrow) === null || _theme$UTTooltip6 === void 0 ? void 0 : _theme$UTTooltip6.display
20
21
  }
21
22
  },
22
23
  stringContent: {
23
- fontSize: theme === null || theme === void 0 || (_theme$UTTooltip6 = theme.UTTooltip) === null || _theme$UTTooltip6 === void 0 || (_theme$UTTooltip6 = _theme$UTTooltip6.stringContent) === null || _theme$UTTooltip6 === void 0 ? void 0 : _theme$UTTooltip6.fontSize,
24
- fontWeight: theme === null || theme === void 0 || (_theme$UTTooltip7 = theme.UTTooltip) === null || _theme$UTTooltip7 === void 0 || (_theme$UTTooltip7 = _theme$UTTooltip7.stringContent) === null || _theme$UTTooltip7 === void 0 ? void 0 : _theme$UTTooltip7.fontWeight,
25
- lineHeight: theme === null || theme === void 0 || (_theme$UTTooltip8 = theme.UTTooltip) === null || _theme$UTTooltip8 === void 0 || (_theme$UTTooltip8 = _theme$UTTooltip8.stringContent) === null || _theme$UTTooltip8 === void 0 ? void 0 : _theme$UTTooltip8.lineHeight,
26
- color: theme === null || theme === void 0 || (_theme$UTTooltip9 = theme.UTTooltip) === null || _theme$UTTooltip9 === void 0 || (_theme$UTTooltip9 = _theme$UTTooltip9.stringContent) === null || _theme$UTTooltip9 === void 0 ? void 0 : _theme$UTTooltip9.color
24
+ fontSize: theme === null || theme === void 0 || (_theme$UTTooltip7 = theme.UTTooltip) === null || _theme$UTTooltip7 === void 0 || (_theme$UTTooltip7 = _theme$UTTooltip7.stringContent) === null || _theme$UTTooltip7 === void 0 ? void 0 : _theme$UTTooltip7.fontSize,
25
+ fontWeight: theme === null || theme === void 0 || (_theme$UTTooltip8 = theme.UTTooltip) === null || _theme$UTTooltip8 === void 0 || (_theme$UTTooltip8 = _theme$UTTooltip8.stringContent) === null || _theme$UTTooltip8 === void 0 ? void 0 : _theme$UTTooltip8.fontWeight,
26
+ lineHeight: theme === null || theme === void 0 || (_theme$UTTooltip9 = theme.UTTooltip) === null || _theme$UTTooltip9 === void 0 || (_theme$UTTooltip9 = _theme$UTTooltip9.stringContent) === null || _theme$UTTooltip9 === void 0 ? void 0 : _theme$UTTooltip9.lineHeight,
27
+ color: theme === null || theme === void 0 || (_theme$UTTooltip10 = theme.UTTooltip) === null || _theme$UTTooltip10 === void 0 || (_theme$UTTooltip10 = _theme$UTTooltip10.stringContent) === null || _theme$UTTooltip10 === void 0 ? void 0 : _theme$UTTooltip10.color
27
28
  }
28
29
  };
29
30
  };
@@ -30,7 +30,11 @@ const COMPONENT_IDS = exports.COMPONENT_IDS = {
30
30
  tableIds: {
31
31
  actionsId: "".concat(TABLE, ".actions"),
32
32
  cellId: "".concat(TABLE, ".tableRow.cell"),
33
- selectionComponentId: "".concat(TABLE, ".tableRow.selectionComponent")
33
+ selectionComponentId: "".concat(TABLE, ".tableRow.selectionComponent"),
34
+ titleId: "".concat(TABLE, ".tableHeader.title")
35
+ },
36
+ tabsIds: {
37
+ tabId: 'tabs.tab.'
34
38
  },
35
39
  workflowContainerIds: {
36
40
  backButtonId: "".concat(WORKFLOW_CONTAINER, ".").concat(BOTTOM_NAV, ".backButton"),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@widergy/energy-ui",
3
- "version": "3.55.0",
3
+ "version": "3.57.0",
4
4
  "description": "Widergy Web Components",
5
5
  "author": "widergy",
6
6
  "license": "MIT",