@desynova-digital/components 9.2.3 → 9.2.5

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.
Files changed (29) hide show
  1. package/_helpers/utils.js +4 -4
  2. package/atoms/cardV2/cardV2.js +5 -5
  3. package/atoms/cardV2/content.js +6 -6
  4. package/atoms/cardV2/contentV2.js +23 -16
  5. package/atoms/cardV2/thumbnail.js +10 -10
  6. package/atoms/cardV2/thumbnailV2.js +12 -12
  7. package/atoms/draftInputText/draftInputText.js +40 -40
  8. package/atoms/icon/icons.json +1931 -1931
  9. package/atoms/loader/CircleLoader.jsx +93 -93
  10. package/atoms/loader/ShimmerComponent/CollabShimmerCard.jsx +39 -39
  11. package/atoms/loader/ShimmerComponent/CollabShimmerCardTray.jsx +24 -24
  12. package/atoms/loader/ShimmerComponent/FiltersShimmer.jsx +19 -19
  13. package/atoms/loader/ShimmerComponent/GraphDetailShimmer.jsx +31 -31
  14. package/atoms/loader/ShimmerComponent/GraphTitleShimmer.jsx +23 -23
  15. package/atoms/loader/ShimmerComponent/GraphsComponentShimmer.jsx +23 -23
  16. package/atoms/loader/ShimmerComponent/Shimmer.jsx +48 -48
  17. package/atoms/loader/ThreeDotLoader.jsx +51 -51
  18. package/atoms/loader/spinningLoader.jsx +69 -69
  19. package/atoms/sideBar/sidebar.js +3 -3
  20. package/atoms/sideBar/sidebar.jsx +262 -262
  21. package/atoms/timeCodeInput/timeCodeMainInput.js +7 -7
  22. package/atoms/videoCard/videoCard.js +3 -3
  23. package/molecules/errorScreen/TableErrorScreen.jsx +85 -85
  24. package/molecules/errorScreen/errorScreen.js +9 -9
  25. package/molecules/errorScreen/errorScreen.jsx +149 -149
  26. package/molecules/filter/filter.js +38 -38
  27. package/molecules/richTextInput/RichTextInput.js +8 -8
  28. package/molecules/richTextInputV2/RichTextInputV2.js +8 -8
  29. package/package.json +2 -2
package/_helpers/utils.js CHANGED
@@ -126,10 +126,10 @@ var cleanHtml = exports.cleanHtml = function cleanHtml(htmlStr) {
126
126
  .replace(/\s\s+/g, "").replace(/\t/g, "").replace(/\\"/g, '"').replace(/\n/g, " ");
127
127
  };
128
128
 
129
- /**
130
- *
131
- * @param {*} htmlStr
132
- * @returns
129
+ /**
130
+ *
131
+ * @param {*} htmlStr
132
+ * @returns
133
133
  */
134
134
  var htmlToText = exports.htmlToText = function htmlToText(htmlStr) {
135
135
  var res = htmlStr === null || htmlStr === void 0 ? void 0 : htmlStr.replace(/<\/?[^>]+>/gi, "");
@@ -59,11 +59,11 @@ var CardV2 = function CardV2(props) {
59
59
  return /*#__PURE__*/_react["default"].createElement(_react.Fragment, null, type === 'timeline' && /*#__PURE__*/_react["default"].createElement(_timeline["default"], props), isCardv2 ? /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_thumbnailV["default"], props), /*#__PURE__*/_react["default"].createElement(_contentV["default"], props)) : /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_thumbnail["default"], props), /*#__PURE__*/_react["default"].createElement(_content["default"], props)));
60
60
  }, [props]);
61
61
 
62
- /**
63
- * based on width will render the card
64
- * if width === sm then flex based card
65
- * else normal
66
- * @function
62
+ /**
63
+ * based on width will render the card
64
+ * if width === sm then flex based card
65
+ * else normal
66
+ * @function
67
67
  */
68
68
  var renderBasedOnWidth = (0, _react.useCallback)(function () {
69
69
  if (width === 'sm') {
@@ -71,9 +71,9 @@ var Content = function Content(props) {
71
71
  tooltipVisibleSection = _useState2[0],
72
72
  setTooltipVisibleSection = _useState2[1];
73
73
 
74
- /**
75
- * toogle tooltip -> true / false
76
- * @function
74
+ /**
75
+ * toogle tooltip -> true / false
76
+ * @function
77
77
  */
78
78
  var handleTooltip = (0, _react.useCallback)(function (tooltipSection, tooltipText) {
79
79
  return function () {
@@ -83,9 +83,9 @@ var Content = function Content(props) {
83
83
  };
84
84
  }, []);
85
85
 
86
- /**
87
- * returns filtered list removing undefined from input array
88
- * @function
86
+ /**
87
+ * returns filtered list removing undefined from input array
88
+ * @function
89
89
  */
90
90
  var getTooltipData = function getTooltipData() {
91
91
  for (var _len = arguments.length, list = new Array(_len), _key = 0; _key < _len; _key++) {
@@ -16,6 +16,7 @@ var _styledComponents = _interopRequireWildcard(require("styled-components"));
16
16
  var _cardV = require("./cardV2");
17
17
  var _icon = _interopRequireDefault(require("../../atoms/icon"));
18
18
  var _tokens = require("@desynova-digital/tokens");
19
+ var _statusV = _interopRequireDefault(require("../../../tokens/statusV2"));
19
20
  var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7;
20
21
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
21
22
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
@@ -32,7 +33,7 @@ var TitleStyles = (0, _styledComponents["default"])(function (props) {
32
33
  return isTitleClick ? 'pointer' : 'default';
33
34
  });
34
35
  var ContentBody = _styledComponents["default"].div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-direction: column;\n &.no-meta-row {\n margin-top: 6px;\n }\n"])));
35
- var ContentStyles = _styledComponents["default"].div(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2["default"])(["\n height: ", ";\n width: ", ";\n padding: ", ";\n background-color: ", ";\n border-radius: 0 0 8px 8px;\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n\n &.no-meta-row {\n height: ", ";\n }\n\n &.no-meta-row .footer-row {\n margin-top: 10px;\n }\n\n .title-parent {\n position: relative;\n }\n\n .segment-indicator {\n position: relative;\n color: #fff;\n padding-left: 10px;\n &:before {\n display: inline-block;\n content: ' ';\n width: 6px;\n height: 6px;\n position: absolute;\n top: 2px;\n left: 0px;\n background: ", ";\n border-radius: 50%;\n }\n }\n .overlapping-container {\n justify-content: center;\n align-items: center;\n height: 11px;\n position: relative;\n .overlappig-popup-container {\n position: absolute;\n bottom: 100%;\n margin-right: 110px;\n pointer-events: none;\n opacity: 0;\n transition: opacity 0.3s ease-out;\n padding-bottom: 10px;\n\n .overlappig-popup {\n font-family: SFUIText-Regular;\n background: #182738;\n box-shadow: 0px 12px 24px rgba(0, 0, 0, 0.2);\n border-radius: 2px;\n padding: 12px;\n width: 300px;\n z-index: 10;\n\n .popup-pointer {\n content: '';\n position: absolute;\n width: 0;\n height: 0;\n border-left: 5px solid transparent;\n border-right: 5px solid transparent;\n border-bottom: 5px solid ", ";\n\n bottom: 5px;\n left: 66%;\n -webkit-transform: rotate(180deg);\n -ms-transform: translate(180deg);\n transform: translate(180deg);\n }\n\n .overlapping-episod-list-container {\n max-height: 165px;\n overflow: scroll;\n ::-webkit-scrollbar {\n display: none;\n }\n -ms-overflow-style: none; /* IE and Edge */\n scrollbar-width: none;\n }\n\n .divider {\n height: 1px;\n width: 100%;\n margin: 10px 0;\n background: #303f51;\n }\n .header-container {\n display: flex;\n position: relative;\n .thumbnail {\n width: 100px;\n height: 55px;\n background-size: cover !important;\n background-repeat: no-repeat !important;\n margin-right: 10px;\n border-radius: 2px;\n }\n .episod-title {\n font-size: 12px;\n margin-bottom: 8px;\n max-width: 180px;\n line-height: 14px;\n color: #fff;\n }\n .episod-details {\n font-size: 10px;\n color: #afb2ba;\n }\n }\n\n .overlappig-popup-title {\n font-size: 12px;\n line-height: 12px;\n color: #afb2ba;\n margin-bottom: 15px;\n }\n }\n }\n\n :hover {\n .overlappig-popup-container {\n opacity: 1;\n pointer-events: all;\n }\n }\n p {\n font-size: 12px;\n margin-left: 5px;\n height: 12px;\n }\n }\n .meta-row {\n display: flex;\n align-items: center;\n margin-top: 6px;\n column-gap: 10px;\n }\n .category-count {\n margin-top: 6px;\n color: #afb2ba;\n font-family: SFUIText-Regular;\n font-size: 10px;\n line-height: 12px;\n }\n .meta-badge {\n ", "\n font-size: 8px;\n line-height: 12px;\n padding: 1px 3px;\n border-radius: 4px;\n font-family: SFUIText-Regular;\n min-height: 12px;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n }\n .meta-text {\n color: ", ";\n font-family: SFUIText-Regular;\n font-size: 10px;\n font-style: normal;\n font-weight: 300;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n .footer-row {\n display: flex;\n align-items: center;\n margin-top: 16px;\n column-gap: 12px;\n position: relative;\n }\n .meta-row + .footer-row {\n margin-top: 10px;\n }\n .footer-text {\n color: #afb2ba;\n font-family: SFUIText-Regular;\n font-size: 8px;\n line-height: 10px;\n margin-right: 0;\n }\n .footer-icons {\n margin-left: auto;\n display: inline-flex;\n align-items: center;\n gap: 8px;\n }\n .footer-icon {\n color: #afb2ba;\n font-family: SFUIText-Regular;\n font-size: 8px;\n line-height: 12px;\n display: inline-flex;\n align-items: center;\n }\n .footer-text-language {\n color: #afb2ba;\n font-family: SFUIText-Regular;\n font-size: 8px;\n line-height: 10px;\n margin-right: 0;\n text-transform: capitalize;\n }\n"])), function (_ref2) {
36
+ var ContentStyles = _styledComponents["default"].div(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2["default"])(["\n height: ", ";\n width: ", ";\n padding: ", ";\n background-color: ", ";\n border-radius: 0 0 8px 8px;\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n\n &.no-meta-row {\n height: ", ";\n }\n\n &.no-meta-row .footer-row {\n margin-top: 10px;\n }\n\n .title-parent {\n position: relative;\n }\n\n .segment-indicator {\n position: relative;\n color: #fff;\n padding-left: 10px;\n &:before {\n display: inline-block;\n content: ' ';\n width: 6px;\n height: 6px;\n position: absolute;\n top: 2px;\n left: 0px;\n background: ", ";\n border-radius: 50%;\n }\n }\n .overlapping-container {\n justify-content: center;\n align-items: center;\n height: 11px;\n position: relative;\n .overlappig-popup-container {\n position: absolute;\n bottom: 100%;\n margin-right: 110px;\n pointer-events: none;\n opacity: 0;\n transition: opacity 0.3s ease-out;\n padding-bottom: 10px;\n\n .overlappig-popup {\n font-family: SFUIText-Regular;\n background: #182738;\n box-shadow: 0px 12px 24px rgba(0, 0, 0, 0.2);\n border-radius: 2px;\n padding: 12px;\n width: 300px;\n z-index: 10;\n\n .popup-pointer {\n content: '';\n position: absolute;\n width: 0;\n height: 0;\n border-left: 5px solid transparent;\n border-right: 5px solid transparent;\n border-bottom: 5px solid ", ";\n\n bottom: 5px;\n left: 66%;\n -webkit-transform: rotate(180deg);\n -ms-transform: translate(180deg);\n transform: translate(180deg);\n }\n\n .overlapping-episod-list-container {\n max-height: 165px;\n overflow: scroll;\n ::-webkit-scrollbar {\n display: none;\n }\n -ms-overflow-style: none; /* IE and Edge */\n scrollbar-width: none;\n }\n\n .divider {\n height: 1px;\n width: 100%;\n margin: 10px 0;\n background: #303f51;\n }\n .header-container {\n display: flex;\n position: relative;\n .thumbnail {\n width: 100px;\n height: 55px;\n background-size: cover !important;\n background-repeat: no-repeat !important;\n margin-right: 10px;\n border-radius: 2px;\n }\n .episod-title {\n font-size: 12px;\n margin-bottom: 8px;\n max-width: 180px;\n line-height: 14px;\n color: #fff;\n }\n .episod-details {\n font-size: 10px;\n color: #afb2ba;\n }\n }\n\n .overlappig-popup-title {\n font-size: 12px;\n line-height: 12px;\n color: #afb2ba;\n margin-bottom: 15px;\n }\n }\n }\n\n :hover {\n .overlappig-popup-container {\n opacity: 1;\n pointer-events: all;\n }\n }\n p {\n font-size: 12px;\n margin-left: 5px;\n height: 12px;\n }\n }\n .meta-row {\n display: flex;\n align-items: center;\n margin-top: 6px;\n cursor: default;\n column-gap: 10px\n }\n .category-count {\n margin-top: 6px;\n color: #afb2ba;\n font-family: SFUIText-Regular;\n font-size: 10px;\n line-height: 12px;\n }\n .meta-badge {\n ", "\n font-size: 8px;\n line-height: 12px;\n padding: 1px 3px;\n border-radius: 4px;\n font-family: SFUIText-Regular;\n min-height: 12px;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n }\n .meta-text {\n color: ", ";\n font-family: SFUIText-Regular;\n font-size: 10px;\n font-style: normal;\n font-weight: 300;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n .footer-row {\n display: flex;\n align-items: center;\n margin-top: 16px;\n column-gap: 12px;\n position: relative;\n cursor: default;\n }\n .meta-row + .footer-row {\n margin-top: 10px;\n }\n .footer-text {\n color: #afb2ba;\n font-family: SFUIText-Regular;\n font-size: 8px;\n line-height: 10px;\n margin-right: 0;\n }\n .footer-icons {\n margin-left: auto;\n display: inline-flex;\n align-items: center;\n gap: 8px;\n }\n .footer-icon {\n color: #afb2ba;\n font-family: SFUIText-Regular;\n font-size: 8px;\n line-height: 12px;\n display: inline-flex;\n align-items: center;\n }\n .footer-text-language {\n color: #afb2ba;\n font-family: SFUIText-Regular;\n font-size: 8px;\n line-height: 10px;\n margin-right: 0;\n text-transform: capitalize;\n }\n"])), function (_ref2) {
36
37
  var type = _ref2.type,
37
38
  width = _ref2.width;
38
39
  return type === 'search' || width === 'sm' ? 'auto' : width === 'md' ? '74px' : '90px';
@@ -79,13 +80,9 @@ var ContentV2 = function ContentV2(props) {
79
80
  identifier_label = props.identifier_label,
80
81
  language_label = props.language_label,
81
82
  isSegment = props.isSegment,
82
- type = props.type,
83
- width = props.width,
84
83
  titleClick = props.titleClick,
85
84
  show_page_id = props.show_page_id,
86
85
  overlapping = props.overlapping,
87
- theme = props.theme,
88
- upload_type = props.upload_type,
89
86
  icon_status = props.icon_status,
90
87
  asset_type = props.asset_type,
91
88
  h1 = props.h1;
@@ -102,6 +99,10 @@ var ContentV2 = function ContentV2(props) {
102
99
  width: 12,
103
100
  height: 10
104
101
  },
102
+ subtitle: {
103
+ width: 12,
104
+ height: 10
105
+ },
105
106
  archive: {
106
107
  width: 10,
107
108
  height: 10
@@ -122,25 +123,31 @@ var ContentV2 = function ContentV2(props) {
122
123
  delivery: 'Delivery',
123
124
  dubbing_review: 'Dubbing Review',
124
125
  subtitle_assign: 'Subtitle',
125
- file_ingest: 'Ingest'
126
+ file_ingest: 'Ingest',
127
+ subtitle: 'Subtitle'
126
128
  };
127
129
  var getIconLabel = function getIconLabel(iconName) {
128
130
  return ICON_LABEL_MAP[iconName] || (iconName === null || iconName === void 0 ? void 0 : iconName.replace(/_/g, ' ')) || '';
129
131
  };
130
- var STATUS_COLOR_MAP = {
131
- Success: '#18B96E',
132
- Pending: '#666666',
133
- Failed: '#FF6C56',
134
- 'In Progress': '#FF8D29',
135
- 'In Queue': '#F9E900'
132
+ var normalizeStatusCode = function normalizeStatusCode(status) {
133
+ return String(status || '').trim().toLowerCase().split(' ').join('_');
134
+ };
135
+ var getStatusHexColor = function getStatusHexColor(status) {
136
+ var _matched$hex;
137
+ var normalized = normalizeStatusCode(status);
138
+ var matched = _statusV["default"].find(function (group) {
139
+ return group.code.includes(normalized);
140
+ });
141
+ if (!matched) return undefined;
142
+ return (_matched$hex = matched.hex) === null || _matched$hex === void 0 ? void 0 : _matched$hex.background;
136
143
  };
137
144
  var footerIcons = (icon_status || []).map(function (item) {
138
- var _STATUS_COLOR_MAP$ite, _ICON_DIMENSION_MAP$i;
145
+ var _getStatusHexColor, _ICON_DIMENSION_MAP$i;
139
146
  return _objectSpread({
140
147
  name: item.icon,
141
148
  status: item.status,
142
149
  tooltipLabel: "".concat(getIconLabel(item.icon)).concat(item.status ? " : ".concat(item.status) : ''),
143
- color: (_STATUS_COLOR_MAP$ite = STATUS_COLOR_MAP[item.status]) !== null && _STATUS_COLOR_MAP$ite !== void 0 ? _STATUS_COLOR_MAP$ite : '#AFB2BA'
150
+ color: (_getStatusHexColor = getStatusHexColor(item.status)) !== null && _getStatusHexColor !== void 0 ? _getStatusHexColor : '#AFB2BA'
144
151
  }, (_ICON_DIMENSION_MAP$i = ICON_DIMENSION_MAP[item.icon]) !== null && _ICON_DIMENSION_MAP$i !== void 0 ? _ICON_DIMENSION_MAP$i : {
145
152
  width: 10,
146
153
  height: 10
@@ -163,8 +170,8 @@ var ContentV2 = function ContentV2(props) {
163
170
  }).join('\n');
164
171
  var contentTooltipTitle = isFooterIconHovered ? '' : combinedTooltipText;
165
172
  return /*#__PURE__*/_react["default"].createElement(ContentStyles, (0, _extends2["default"])({}, props, {
166
- className: "asset-card-content".concat(hasMetaRow ? '' : ' no-meta-row'),
167
- title: contentTooltipTitle
173
+ className: "asset-card-content".concat(hasMetaRow ? '' : ' no-meta-row')
174
+ // title={contentTooltipTitle} hide as per UI team
168
175
  }), /*#__PURE__*/_react["default"].createElement("div", {
169
176
  className: "title-parent"
170
177
  }, /*#__PURE__*/_react["default"].createElement(TitleStyles, {
@@ -98,12 +98,12 @@ var Thumbnail = function Thumbnail(props) {
98
98
  }
99
99
  }, [actions && JSON.stringify(actions).length > 0]);
100
100
  (0, _react.useEffect)(function () {
101
- /**
102
- * will return the hex based status passed
103
- * eg. status = In Progress -> will format to "in_progress"
104
- * then it will find its index in CARD_ASSET_STATUS which will
105
- * return hex
106
- * @const
101
+ /**
102
+ * will return the hex based status passed
103
+ * eg. status = In Progress -> will format to "in_progress"
104
+ * then it will find its index in CARD_ASSET_STATUS which will
105
+ * return hex
106
+ * @const
107
107
  */
108
108
  var index = _tokens2.CARD_ASSET_STATUS.findIndex(function (label) {
109
109
  return label.code.includes(card_status || upload_status ? (card_status || upload_status).toLowerCase().split(" ").join("_") : []);
@@ -131,10 +131,10 @@ var Thumbnail = function Thumbnail(props) {
131
131
  }
132
132
  }, [iframeImageBlockRef, hoverPointerRef, iframeImageRef]);
133
133
 
134
- /**
135
- * will decide thumbnail click based on its condition
136
- * eg. if task_type === upload then prevent click
137
- * @function
134
+ /**
135
+ * will decide thumbnail click based on its condition
136
+ * eg. if task_type === upload then prevent click
137
+ * @function
138
138
  */
139
139
  var handleThumbnailClick = (0, _react.useCallback)(function (e) {
140
140
  if (!isClickPrevented) {
@@ -23,7 +23,7 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
23
23
  var OverlayBackgroundStyles = (0, _styledComponents.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n background: rgba(0, 0, 0, 0.5);\n"])));
24
24
  var assetStyles = {
25
25
  folder: {
26
- backgroundColor: '#2f3031',
26
+ backgroundColor: '#121D29',
27
27
  backgroundSize: 'inherit'
28
28
  },
29
29
  asset: {
@@ -67,7 +67,7 @@ var IconButtonStyles = (0, _styledComponents["default"])(function (props) {
67
67
  return _tokens.colors[props.theme].card.themeColor;
68
68
  });
69
69
  var CardHeader = _styledComponents["default"].div(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n justify-content: space-between;\n padding: 10px;\n"])));
70
- var BottomActionContainer = _styledComponents["default"].div(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2["default"])(["\n position: absolute;\n bottom: 8px;\n right: 1px;\n transform: translateX(-50%);\n display: flex;\n align-items: center;\n gap: 6px;\n z-index: 3;\n opacity: 1;\n"])));
70
+ var BottomActionContainer = _styledComponents["default"].div(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2["default"])(["\n position: absolute;\n bottom: 8px;\n right: 8px;\n display: flex;\n align-items: center;\n gap: 6px;\n z-index: 3;\n opacity: 1;\n"])));
71
71
  var ThumbnailV2 = function ThumbnailV2(props) {
72
72
  var theme = props.theme,
73
73
  width = props.width,
@@ -103,12 +103,12 @@ var ThumbnailV2 = function ThumbnailV2(props) {
103
103
  }
104
104
  }, [actions && JSON.stringify(actions).length > 0]);
105
105
  (0, _react.useEffect)(function () {
106
- /**
107
- * will return the hex based status passed
108
- * eg. status = In Progress -> will format to "in_progress"
109
- * then it will find its index in CARD_ASSET_STATUS which will
110
- * return hex
111
- * @const
106
+ /**
107
+ * will return the hex based status passed
108
+ * eg. status = In Progress -> will format to "in_progress"
109
+ * then it will find its index in CARD_ASSET_STATUS which will
110
+ * return hex
111
+ * @const
112
112
  */
113
113
  var index = _tokens2.CARD_ASSET_STATUS.findIndex(function (label) {
114
114
  return label.code.includes(card_status || upload_status ? (card_status || upload_status).toLowerCase().split(' ').join('_') : []);
@@ -136,10 +136,10 @@ var ThumbnailV2 = function ThumbnailV2(props) {
136
136
  }
137
137
  }, [iframeImageBlockRef, hoverPointerRef, iframeImageRef]);
138
138
 
139
- /**
140
- * will decide thumbnail click based on its condition
141
- * eg. if task_type === upload then prevent click
142
- * @function
139
+ /**
140
+ * will decide thumbnail click based on its condition
141
+ * eg. if task_type === upload then prevent click
142
+ * @function
143
143
  */
144
144
  var handleThumbnailClick = (0, _react.useCallback)(function (e) {
145
145
  if (!isClickPrevented) {
@@ -75,11 +75,11 @@ var DraftInputText = function DraftInputText(_ref) {
75
75
  var passwordButton = props.passwordButton;
76
76
  }
77
77
 
78
- /**
79
- *
80
- * @param {string} command string representing the keyboard command being invoked
81
- * @param {object} editorState represents the current state of the editor, including the content, selection, and various editor properties.
82
- * @returns new Editor State with applied styling
78
+ /**
79
+ *
80
+ * @param {string} command string representing the keyboard command being invoked
81
+ * @param {object} editorState represents the current state of the editor, including the content, selection, and various editor properties.
82
+ * @returns new Editor State with applied styling
83
83
  */
84
84
  var handleKeyCommand = function handleKeyCommand(command, editorState) {
85
85
  var newState = _draftJs.RichUtils.handleKeyCommand(editorState, command);
@@ -90,9 +90,9 @@ var DraftInputText = function DraftInputText(_ref) {
90
90
  return 'not-handled';
91
91
  };
92
92
 
93
- /**
94
- *
95
- * @returns Return the length of text in editor in a synchronous way
93
+ /**
94
+ *
95
+ * @returns Return the length of text in editor in a synchronous way
96
96
  */
97
97
  var _getLengthOfSelectedText = function _getLengthOfSelectedText() {
98
98
  var currentSelection = editorState.getSelection();
@@ -127,11 +127,11 @@ var DraftInputText = function DraftInputText(_ref) {
127
127
  return length;
128
128
  };
129
129
 
130
- /**
131
- *
132
- * @param {string} text The text that is pasted in the editor
133
- * @param {string} position tells whether we have to check for inserted text or pasted text
134
- * @returns whether pasting or inserting text is feasible
130
+ /**
131
+ *
132
+ * @param {string} text The text that is pasted in the editor
133
+ * @param {string} position tells whether we have to check for inserted text or pasted text
134
+ * @returns whether pasting or inserting text is feasible
135
135
  */
136
136
  var _handleInput = function _handleInput(text, position) {
137
137
  var currentContent = editorState.getCurrentContent();
@@ -150,27 +150,27 @@ var DraftInputText = function DraftInputText(_ref) {
150
150
  }
151
151
  };
152
152
 
153
- /**
154
- *
155
- * @returns calls the function to check before typing the text does not exceed maximum length
153
+ /**
154
+ *
155
+ * @returns calls the function to check before typing the text does not exceed maximum length
156
156
  */
157
157
  var _handleBeforeInput = function _handleBeforeInput() {
158
158
  return _handleInput('', 'before');
159
159
  };
160
160
 
161
- /**
162
- *
163
- * @param {string} pastedText the text that is copy pasted in our editor
164
- * @returns calls the function to check copying the text does not exceed maximum length
161
+ /**
162
+ *
163
+ * @param {string} pastedText the text that is copy pasted in our editor
164
+ * @returns calls the function to check copying the text does not exceed maximum length
165
165
  */
166
166
  var _handlePastedText = function _handlePastedText(pastedText) {
167
167
  return _handleInput(pastedText, 'after');
168
168
  };
169
169
 
170
- /**
171
- *
172
- * @param {object} newEditorState the newstate of editor when we type any text in our editor
173
- * @returns the new state of editor
170
+ /**
171
+ *
172
+ * @param {object} newEditorState the newstate of editor when we type any text in our editor
173
+ * @returns the new state of editor
174
174
  */
175
175
  var _handleChange = function _handleChange(newEditorState) {
176
176
  var contentState = newEditorState.getCurrentContent();
@@ -182,10 +182,10 @@ var DraftInputText = function DraftInputText(_ref) {
182
182
  }
183
183
  };
184
184
 
185
- /**
186
- *
187
- * @param {string} htmlString the string that is passed to the parent
188
- * @returns removes the default <p> tag of draftjs
185
+ /**
186
+ *
187
+ * @param {string} htmlString the string that is passed to the parent
188
+ * @returns removes the default <p> tag of draftjs
189
189
  */
190
190
  var removeOuterPTag = function removeOuterPTag(htmlString) {
191
191
  var regex = /^<p>(.*?)<\/p>$/;
@@ -198,10 +198,10 @@ var DraftInputText = function DraftInputText(_ref) {
198
198
  });
199
199
  };
200
200
 
201
- /**
202
- *
203
- * @param {string} html the string that is passed to the parent
204
- * @returns removes the symbols of special character like commas and convert them back to character
201
+ /**
202
+ *
203
+ * @param {string} html the string that is passed to the parent
204
+ * @returns removes the symbols of special character like commas and convert them back to character
205
205
  */
206
206
 
207
207
  function decodeHtml(html) {
@@ -210,8 +210,8 @@ var DraftInputText = function DraftInputText(_ref) {
210
210
  return txt.value;
211
211
  }
212
212
 
213
- /**
214
- * this useEffect is used to send value to parent component as soon as editor state gets updated
213
+ /**
214
+ * this useEffect is used to send value to parent component as soon as editor state gets updated
215
215
  */
216
216
  (0, _react.useEffect)(function () {
217
217
  var html = (0, _draftConvert.convertToHTML)(editorState.getCurrentContent());
@@ -227,8 +227,8 @@ var DraftInputText = function DraftInputText(_ref) {
227
227
  }
228
228
  }, [editorState]);
229
229
 
230
- /**
231
- * This useEffect handles our focus condition and also updates state when the props value changes
230
+ /**
231
+ * This useEffect handles our focus condition and also updates state when the props value changes
232
232
  */
233
233
  (0, _react.useEffect)(function () {
234
234
  if (diff && value !== '' && value !== undefined) {
@@ -248,8 +248,8 @@ var DraftInputText = function DraftInputText(_ref) {
248
248
  }
249
249
  }
250
250
  }, [value]);
251
- /**
252
- * This useEffect is used to chnage our value when timeline is changed
251
+ /**
252
+ * This useEffect is used to chnage our value when timeline is changed
253
253
  */
254
254
  (0, _react.useEffect)(function () {
255
255
  if (listScrollTop !== null) {
@@ -263,8 +263,8 @@ var DraftInputText = function DraftInputText(_ref) {
263
263
  }
264
264
  }, [listScrollTop]);
265
265
 
266
- /**
267
- * This useEffect is used to focus on Line1 when a new segment is created
266
+ /**
267
+ * This useEffect is used to focus on Line1 when a new segment is created
268
268
  */
269
269
  (0, _react.useEffect)(function () {
270
270
  if (autoFocus) {