UNPKG

cometchat-react-ui-kit2

Version:

CometChat UI Kit for React App

76 lines (75 loc) 5.39 kB
"use strict"; var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); Object.defineProperty(exports, "__esModule", { value: true }); exports.ConversationListItemConfiguration = void 0; var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass")); var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")); var _Chats = require("../../../Chats"); var _ConversationListItemStyles = require("../../SDKDerivedComponents/CometChatConversationListItem/ConversationListItemStyles"); var _Shared = require("../../../Shared"); /** * @class ConversationListItemConfiguration * @description ConversationListItemConfiguration class is used for defining the ConversationListItem templates. * @param {Object} conversationInputData * @param {Object} style * @param {Boolean} showTypingIndicator * @param {String} typingIndicatorText * @param {Boolean} hideThreadIndicator * @param {Boolean} hideGroupActions * @param {Boolean} hideDeletedMessages * @param {String} threadIndicatorText * @param {Array} conversationOptions * @param {Object} avatarConfiguration * @param {Object} statusIndicatorConfiguration * @param {Object} badgeCountConfiguration * @param {Object} messageReceiptConfiguration * @param {Object} dateConfiguration */var ConversationListItemConfiguration = /*#__PURE__*/(0, _createClass2["default"])(function ConversationListItemConfiguration(_ref) { var _ref$conversationInpu = _ref.conversationInputData, conversationInputData = _ref$conversationInpu === void 0 ? new _Chats.ConversationInputData({}) : _ref$conversationInpu, _ref$style = _ref.style, style = _ref$style === void 0 ? new _ConversationListItemStyles.ConversationListItemStyles({}) : _ref$style, _ref$showTypingIndica = _ref.showTypingIndicator, showTypingIndicator = _ref$showTypingIndica === void 0 ? true : _ref$showTypingIndica, _ref$typingIndicatorT = _ref.typingIndicatorText, typingIndicatorText = _ref$typingIndicatorT === void 0 ? "" : _ref$typingIndicatorT, _ref$hideThreadIndica = _ref.hideThreadIndicator, hideThreadIndicator = _ref$hideThreadIndica === void 0 ? false : _ref$hideThreadIndica, _ref$hideGroupActions = _ref.hideGroupActions, hideGroupActions = _ref$hideGroupActions === void 0 ? false : _ref$hideGroupActions, _ref$hideDeletedMessa = _ref.hideDeletedMessages, hideDeletedMessages = _ref$hideDeletedMessa === void 0 ? false : _ref$hideDeletedMessa, _ref$threadIndicatorT = _ref.threadIndicatorText, threadIndicatorText = _ref$threadIndicatorT === void 0 ? "" : _ref$threadIndicatorT, _ref$conversationOpti = _ref.conversationOptions, conversationOptions = _ref$conversationOpti === void 0 ? [] : _ref$conversationOpti, _ref$avatarConfigurat = _ref.avatarConfiguration, avatarConfiguration = _ref$avatarConfigurat === void 0 ? new _Shared.AvatarConfiguration({}) : _ref$avatarConfigurat, _ref$statusIndicatorC = _ref.statusIndicatorConfiguration, statusIndicatorConfiguration = _ref$statusIndicatorC === void 0 ? new _Shared.StatusIndicatorConfiguration({}) : _ref$statusIndicatorC, _ref$badgeCountConfig = _ref.badgeCountConfiguration, badgeCountConfiguration = _ref$badgeCountConfig === void 0 ? new _Shared.BadgeCountConfiguration({}) : _ref$badgeCountConfig, _ref$messageReceiptCo = _ref.messageReceiptConfiguration, messageReceiptConfiguration = _ref$messageReceiptCo === void 0 ? new _Shared.MessageReceiptConfiguration({}) : _ref$messageReceiptCo, _ref$dateConfiguratio = _ref.dateConfiguration, dateConfiguration = _ref$dateConfiguratio === void 0 ? new _Shared.DateConfiguration({}) : _ref$dateConfiguratio; (0, _classCallCheck2["default"])(this, ConversationListItemConfiguration); this.conversationInputData = new _Chats.ConversationInputData(conversationInputData !== null && conversationInputData !== void 0 ? conversationInputData : {}); this.style = new _ConversationListItemStyles.ConversationListItemStyles(style !== null && style !== void 0 ? style : {}); this.showTypingIndicator = showTypingIndicator; this.typingIndicatorText = typingIndicatorText; this.hideThreadIndicator = hideThreadIndicator; this.hideGroupActions = hideGroupActions; this.hideDeletedMessages = hideDeletedMessages; this.threadIndicatorText = threadIndicatorText; this.conversationOptions = conversationOptions; this.avatarConfiguration = new _Shared.AvatarConfiguration(avatarConfiguration !== null && avatarConfiguration !== void 0 ? avatarConfiguration : {}); this.statusIndicatorConfiguration = new _Shared.StatusIndicatorConfiguration(statusIndicatorConfiguration !== null && statusIndicatorConfiguration !== void 0 ? statusIndicatorConfiguration : {}); this.badgeCountConfiguration = new _Shared.BadgeCountConfiguration(badgeCountConfiguration !== null && badgeCountConfiguration !== void 0 ? badgeCountConfiguration : {}); this.messageReceiptConfiguration = new _Shared.MessageReceiptConfiguration(messageReceiptConfiguration !== null && messageReceiptConfiguration !== void 0 ? messageReceiptConfiguration : {}); this.dateConfiguration = new _Shared.DateConfiguration(dateConfiguration !== null && dateConfiguration !== void 0 ? dateConfiguration : {}); }); exports.ConversationListItemConfiguration = ConversationListItemConfiguration; ;