cometchat-react-ui-kit2
Version:
CometChat UI Kit for React App
76 lines (75 loc) • 3.33 kB
JavaScript
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.UserListConfiguration = void 0;
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
var _spinner = _interopRequireDefault(require("./resources/spinner.svg"));
var _UserListStyles = require("./UserListStyles");
var _Shared = require("../../Shared");
/**
* @class UserListConfiguration
* @description UserListConfiguration class is used for defining the template of UserList
* @param {number} limit
* @param {string} searchKeyword
* @param {string} status
* @param {array} roles
* @param {boolean} friendsOnly
* @param {boolean} hideBlockedUsers
* @param {array} tags
* @param {array} uids
* @param {object} customView
* @param {string} loadingIconURL
* @param {boolean} hideError
* @param {object} style
* @param {object} dataItemConfiguration
*
*/var UserListConfiguration = /*#__PURE__*/(0, _createClass2["default"])(function UserListConfiguration(_ref) {
var _ref$limit = _ref.limit,
limit = _ref$limit === void 0 ? 30 : _ref$limit,
_ref$searchKeyword = _ref.searchKeyword,
searchKeyword = _ref$searchKeyword === void 0 ? "" : _ref$searchKeyword,
_ref$status = _ref.status,
status = _ref$status === void 0 ? "" : _ref$status,
_ref$roles = _ref.roles,
roles = _ref$roles === void 0 ? null : _ref$roles,
_ref$friendsOnly = _ref.friendsOnly,
friendsOnly = _ref$friendsOnly === void 0 ? false : _ref$friendsOnly,
_ref$hideBlockedUsers = _ref.hideBlockedUsers,
hideBlockedUsers = _ref$hideBlockedUsers === void 0 ? false : _ref$hideBlockedUsers,
_ref$tags = _ref.tags,
tags = _ref$tags === void 0 ? null : _ref$tags,
_ref$uids = _ref.uids,
uids = _ref$uids === void 0 ? null : _ref$uids,
_ref$customView = _ref.customView,
customView = _ref$customView === void 0 ? new _Shared.CustomView({
loading: "",
empty: "",
error: ""
}) : _ref$customView,
_ref$loadingIconURL = _ref.loadingIconURL,
loadingIconURL = _ref$loadingIconURL === void 0 ? _spinner["default"] : _ref$loadingIconURL,
_ref$hideError = _ref.hideError,
hideError = _ref$hideError === void 0 ? false : _ref$hideError,
_ref$style = _ref.style,
style = _ref$style === void 0 ? new _UserListStyles.UserListStyles({}) : _ref$style,
_ref$dataItemConfigur = _ref.dataItemConfiguration,
dataItemConfiguration = _ref$dataItemConfigur === void 0 ? new _Shared.DataItemConfiguration({}) : _ref$dataItemConfigur;
(0, _classCallCheck2["default"])(this, UserListConfiguration);
this.limit = limit;
this.searchKeyword = searchKeyword;
this.status = status;
this.roles = roles;
this.friendsOnly = friendsOnly;
this.hideBlockedUsers = hideBlockedUsers;
this.tags = tags;
this.uids = uids;
this.customView = customView;
this.loadingIconURL = loadingIconURL;
this.hideError = hideError;
this.style = new _UserListStyles.UserListStyles(style || {});
this.dataItemConfiguration = new _Shared.DataItemConfiguration(dataItemConfiguration || {});
});
exports.UserListConfiguration = UserListConfiguration;