@unbxd-ui/unbxd-react-components 0.3.3-beta.2 → 0.3.3-beta.4

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.
@@ -148,8 +148,7 @@ var CheckboxDropdownItem = exports.CheckboxDropdownItem = function CheckboxDropd
148
148
  style = props.style,
149
149
  paginationType = props.paginationType,
150
150
  _props$itemData = props.itemData,
151
- itemData = _props$itemData === void 0 ? {} : _props$itemData,
152
- labelTitle = props.labelTitle;
151
+ itemData = _props$itemData === void 0 ? {} : _props$itemData;
153
152
  var pageType = "";
154
153
  if (!paginationType) {
155
154
  pageType = data.paginationType;
@@ -166,7 +165,8 @@ var CheckboxDropdownItem = exports.CheckboxDropdownItem = function CheckboxDropd
166
165
  _ref3$idAttribute = _ref3.idAttribute,
167
166
  idAttribute = _ref3$idAttribute === void 0 ? "id" : _ref3$idAttribute,
168
167
  _ref3$nameAttribute = _ref3.nameAttribute,
169
- nameAttribute = _ref3$nameAttribute === void 0 ? "name" : _ref3$nameAttribute;
168
+ nameAttribute = _ref3$nameAttribute === void 0 ? "name" : _ref3$nameAttribute,
169
+ labelTitle = _ref3.labelTitle;
170
170
  var item = pageType === "SERVER" ? items[index] || {} : itemData;
171
171
  var id = item[idAttribute];
172
172
  var labelContent = DDItem ? /*#__PURE__*/_react["default"].createElement(DDItem, _extends({
@@ -338,6 +338,7 @@ var Dropdown = function Dropdown(props, ref) {
338
338
  /** Close modal after reset */
339
339
  hideModal();
340
340
  };
341
+ console.log("labelTitle", labelTitle);
341
342
  var commonAttributes = {
342
343
  selectedItems: selectedItems,
343
344
  selectItem: selectItem,
@@ -413,12 +414,14 @@ var Dropdown = function Dropdown(props, ref) {
413
414
  DropdownItem: multiSelect ? CheckboxDropdownItem : DropdownItem,
414
415
  DDItem: DropdownItem
415
416
  }, serverListAttrs, restProps, {
416
- LoaderComponent: LoaderComponent
417
+ LoaderComponent: LoaderComponent,
418
+ labelTitle: labelTitle
417
419
  })) : /*#__PURE__*/_react["default"].createElement(NormalList, _extends({}, commonAttributes, {
418
420
  DropdownItem: multiSelect ? CheckboxDropdownItem : DropdownItem
419
421
  }, restProps, {
420
422
  items: getFilteredOptions(options, searchQuery, nameAttribute),
421
- DDItem: DropdownItem
423
+ DDItem: DropdownItem,
424
+ labelTitle: labelTitle
422
425
  })), showCreateCTA && /*#__PURE__*/_react["default"].createElement("div", {
423
426
  className: "RCB-dd-create-cta",
424
427
  onClick: onCreateCTAClick
@@ -4,19 +4,30 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports["default"] = void 0;
7
- var _react = _interopRequireDefault(require("react"));
8
7
  var _propTypes = _interopRequireDefault(require("prop-types"));
8
+ var _react = _interopRequireDefault(require("react"));
9
+ var _lazyLoadImage = _interopRequireDefault(require("../../core/lazyLoadImage"));
9
10
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
10
11
  var NoDataPlaceholder = function NoDataPlaceholder(props) {
11
12
  var className = props.className,
12
13
  image = props.image,
14
+ _props$imageUrl = props.imageUrl,
15
+ imageUrl = _props$imageUrl === void 0 ? "" : _props$imageUrl,
16
+ _props$imageAlt = props.imageAlt,
17
+ imageAlt = _props$imageAlt === void 0 ? "" : _props$imageAlt,
18
+ _props$imageClassname = props.imageClassname,
19
+ imageClassname = _props$imageClassname === void 0 ? "" : _props$imageClassname,
13
20
  title = props.title,
14
21
  description = props.description;
15
22
  return /*#__PURE__*/_react["default"].createElement("div", {
16
23
  className: "RCB-no-data-placeholder ".concat(className)
17
- }, image && /*#__PURE__*/_react["default"].createElement("div", {
24
+ }, (image || imageUrl) && /*#__PURE__*/_react["default"].createElement("div", {
18
25
  className: "RCB-no-data-image"
19
- }, image), title && /*#__PURE__*/_react["default"].createElement("div", {
26
+ }, imageUrl ? /*#__PURE__*/_react["default"].createElement(_lazyLoadImage["default"], {
27
+ src: imageUrl,
28
+ alt: imageAlt || "No data",
29
+ className: imageClassname
30
+ }) : image), title && /*#__PURE__*/_react["default"].createElement("div", {
20
31
  className: "RCB-no-data-title"
21
32
  }, title), description && /*#__PURE__*/_react["default"].createElement("div", {
22
33
  className: "RCB-no-data-description"
@@ -27,6 +38,12 @@ NoDataPlaceholder.propTypes = {
27
38
  className: _propTypes["default"].string,
28
39
  /** React element (typically an image or icon) to display */
29
40
  image: _propTypes["default"].element,
41
+ /** Image URL string for lazy loading */
42
+ imageUrl: _propTypes["default"].string,
43
+ /** Alt text for the lazy loaded image */
44
+ imageAlt: _propTypes["default"].string,
45
+ /** Class name for the lazy loaded image */
46
+ imageClassname: _propTypes["default"].string,
30
47
  /** Title text to display */
31
48
  title: _propTypes["default"].string,
32
49
  /** Description text to display */
@@ -36,6 +36,9 @@ var Default = exports.Default = {
36
36
  src: "https://placehold.co/100",
37
37
  alt: "No Data"
38
38
  }),
39
+ imageUrl: "https://placehold.co/100",
40
+ imageAlt: "No Data Image",
41
+ imageClassname: "",
39
42
  title: 'No Data Available',
40
43
  description: 'There is no data to display at the moment.'
41
44
  }
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports["default"] = UIDItemComponent;
8
8
  var _react = _interopRequireWildcard(require("react"));
9
- var _p = _interopRequireDefault(require("../../assets/p1.svg"));
10
9
  var _icon = _interopRequireDefault(require("../../core/icon"));
11
10
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
12
11
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, "default": e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
@@ -33,7 +32,7 @@ function UIDItemComponent(props) {
33
32
  _props$style = props.style,
34
33
  style = _props$style === void 0 ? {} : _props$style,
35
34
  _props$avatars = props.avatars,
36
- clientAvatars = _props$avatars === void 0 ? [_p["default"]] : _props$avatars;
35
+ clientAvatars = _props$avatars === void 0 ? [] : _props$avatars;
37
36
  var _data$items = data.items,
38
37
  items = _data$items === void 0 ? [] : _data$items,
39
38
  _data$paginationType = data.paginationType,
@@ -43,7 +42,7 @@ function UIDItemComponent(props) {
43
42
  _data$selectedItems = data.selectedItems,
44
43
  serverSelectedItems = _data$selectedItems === void 0 ? [] : _data$selectedItems,
45
44
  _data$avatars = data.avatars,
46
- serverAvatars = _data$avatars === void 0 ? [_p["default"]] : _data$avatars;
45
+ serverAvatars = _data$avatars === void 0 ? [] : _data$avatars;
47
46
 
48
47
  // Determine the pagination type
49
48
  var paginationType = clientPaginationType ? "CLIENT" : serverPaginationType;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unbxd-ui/unbxd-react-components",
3
- "version": "0.3.3-beta.2",
3
+ "version": "0.3.3-beta.4",
4
4
  "description": "React components library",
5
5
  "keywords": [
6
6
  "react components",