cometchat-react-ui-kit2
Version:
CometChat UI Kit for React App
68 lines (66 loc) • 3.5 kB
JavaScript
;
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.ConversationInputData = void 0;
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
var _InputData2 = require("../InputData");
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; }
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
/**
* @class ConversationInputData
* @param {string} id
* @param {boolean} thumbnail
* @param {boolean} status
* @param {boolean} title
* @param {Function} subtitle
* @param {boolean} unreadCount
* @param {boolean} timestamp
* @param {boolean} readreceipt
*/var ConversationInputData = /*#__PURE__*/function (_InputData) {
(0, _inherits2["default"])(ConversationInputData, _InputData);
var _super = _createSuper(ConversationInputData);
function ConversationInputData(_ref) {
var _this;
var _ref$id = _ref.id,
id = _ref$id === void 0 ? "" : _ref$id,
_ref$thumbnail = _ref.thumbnail,
thumbnail = _ref$thumbnail === void 0 ? true : _ref$thumbnail,
_ref$status = _ref.status,
status = _ref$status === void 0 ? true : _ref$status,
_ref$title = _ref.title,
title = _ref$title === void 0 ? true : _ref$title,
_ref$subtitle = _ref.subtitle,
subtitle = _ref$subtitle === void 0 ? function () {} : _ref$subtitle,
_ref$unreadCount = _ref.unreadCount,
unreadCount = _ref$unreadCount === void 0 ? true : _ref$unreadCount,
_ref$timestamp = _ref.timestamp,
timestamp = _ref$timestamp === void 0 ? true : _ref$timestamp,
_ref$readreceipt = _ref.readreceipt,
readreceipt = _ref$readreceipt === void 0 ? true : _ref$readreceipt;
(0, _classCallCheck2["default"])(this, ConversationInputData);
_this = _super.call(this, {
id: id,
thumbnail: thumbnail,
status: status,
title: title,
subtitle: subtitle
});
// this.id = id;
// this.thumbnail = thumbnail;
// this.status = status;
// this.title = title;
// this.subtitle = subtitle;
_this.unreadCount = unreadCount;
_this.timestamp = timestamp;
_this.readreceipt = readreceipt;
return _this;
}
return (0, _createClass2["default"])(ConversationInputData);
}(_InputData2.InputData);
exports.ConversationInputData = ConversationInputData;