@desynova-digital/components 9.1.51 → 9.2.0

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.
@@ -1219,14 +1219,18 @@
1219
1219
  "height": 20,
1220
1220
  "width": 20
1221
1221
  },
1222
- "av_cut":{
1223
- "paths": ["M2.10547 0C3.26808 0.000110239 4.21094 0.93582 4.21094 2.08984C4.21091 2.47621 4.10321 2.83694 3.91895 3.14746L5.26465 4.4834L9.10254 0.676758C9.30808 0.472809 9.64116 0.472764 9.84668 0.676758C10.0519 0.880718 10.0519 1.2111 9.84668 1.41504L3.91895 7.29785C4.1032 7.60837 4.21094 7.96908 4.21094 8.35547C4.21084 9.50941 3.26802 10.4452 2.10547 10.4453C0.942823 10.4453 9.54067e-05 9.50948 0 8.35547C0 7.20138 0.942764 6.26562 2.10547 6.26562C2.49659 6.26566 2.86193 6.37312 3.17578 6.55762L4.52051 5.22266L3.1748 3.88672C2.86103 4.07113 2.49645 4.17965 2.10547 4.17969C0.942823 4.17969 9.54067e-05 3.24386 0 2.08984C0 0.935752 0.942764 0 2.10547 0ZM6.18945 6.15332C6.39482 5.94938 6.72795 5.94861 6.93359 6.15234L9.84375 9.03613C10.0495 9.23995 10.05 9.57119 9.84473 9.77539C9.63952 9.97945 9.30635 9.97976 9.10059 9.77637L6.18945 6.89258C5.98373 6.68875 5.9841 6.35752 6.18945 6.15332ZM2.10352 7.3125C1.52216 7.3125 1.05078 7.78038 1.05078 8.35742C1.05083 8.93443 1.52219 9.40234 2.10352 9.40234C2.68479 9.40229 3.1562 8.93439 3.15625 8.35742C3.15625 8.07122 3.04038 7.81177 2.85254 7.62305C2.85177 7.62229 2.85037 7.62185 2.84961 7.62109C2.84797 7.61947 2.84634 7.61785 2.84473 7.61621C2.65443 7.42873 2.39275 7.31253 2.10352 7.3125ZM2.10352 1.04688C1.52216 1.04688 1.05078 1.51475 1.05078 2.0918C1.05083 2.6688 1.52219 3.13672 2.10352 3.13672C2.3885 3.13669 2.64637 3.02348 2.83594 2.84082C2.84064 2.83578 2.84467 2.8301 2.84961 2.8252C2.85386 2.82098 2.85893 2.81752 2.86328 2.81348C3.04427 2.62581 3.15623 2.37203 3.15625 2.0918C3.15625 1.51478 2.68482 1.04693 2.10352 1.04688Z"],
1222
+ "av_cut": {
1223
+ "paths": [
1224
+ "M2.10547 0C3.26808 0.000110239 4.21094 0.93582 4.21094 2.08984C4.21091 2.47621 4.10321 2.83694 3.91895 3.14746L5.26465 4.4834L9.10254 0.676758C9.30808 0.472809 9.64116 0.472764 9.84668 0.676758C10.0519 0.880718 10.0519 1.2111 9.84668 1.41504L3.91895 7.29785C4.1032 7.60837 4.21094 7.96908 4.21094 8.35547C4.21084 9.50941 3.26802 10.4452 2.10547 10.4453C0.942823 10.4453 9.54067e-05 9.50948 0 8.35547C0 7.20138 0.942764 6.26562 2.10547 6.26562C2.49659 6.26566 2.86193 6.37312 3.17578 6.55762L4.52051 5.22266L3.1748 3.88672C2.86103 4.07113 2.49645 4.17965 2.10547 4.17969C0.942823 4.17969 9.54067e-05 3.24386 0 2.08984C0 0.935752 0.942764 0 2.10547 0ZM6.18945 6.15332C6.39482 5.94938 6.72795 5.94861 6.93359 6.15234L9.84375 9.03613C10.0495 9.23995 10.05 9.57119 9.84473 9.77539C9.63952 9.97945 9.30635 9.97976 9.10059 9.77637L6.18945 6.89258C5.98373 6.68875 5.9841 6.35752 6.18945 6.15332ZM2.10352 7.3125C1.52216 7.3125 1.05078 7.78038 1.05078 8.35742C1.05083 8.93443 1.52219 9.40234 2.10352 9.40234C2.68479 9.40229 3.1562 8.93439 3.15625 8.35742C3.15625 8.07122 3.04038 7.81177 2.85254 7.62305C2.85177 7.62229 2.85037 7.62185 2.84961 7.62109C2.84797 7.61947 2.84634 7.61785 2.84473 7.61621C2.65443 7.42873 2.39275 7.31253 2.10352 7.3125ZM2.10352 1.04688C1.52216 1.04688 1.05078 1.51475 1.05078 2.0918C1.05083 2.6688 1.52219 3.13672 2.10352 3.13672C2.3885 3.13669 2.64637 3.02348 2.83594 2.84082C2.84064 2.83578 2.84467 2.8301 2.84961 2.8252C2.85386 2.82098 2.85893 2.81752 2.86328 2.81348C3.04427 2.62581 3.15623 2.37203 3.15625 2.0918C3.15625 1.51478 2.68482 1.04693 2.10352 1.04688Z"
1225
+ ],
1224
1226
  "height": 11,
1225
1227
  "width": 10
1226
1228
  },
1227
- "shot_replacement":{
1228
- "viewBox": "0 -960 960 960",
1229
- "paths": ["M140-640q38-109 131.5-174.5T480-880q82 0 155.5 35T760-746v-134h80v240H600v-80h76q-39-39-90-59.5T480-800q-81 0-149.5 43T227-640h-87ZM280-80q-33 0-56.5-23.5T200-160v-320q0-33 23.5-56.5T280-560h320q33 0 56.5 23.5T680-480v120l120-120v320L680-280v120q0 33-23.5 56.5T600-80H280Z"],
1229
+ "shot_replacement": {
1230
+ "viewBox": "0 -960 960 960",
1231
+ "paths": [
1232
+ "M140-640q38-109 131.5-174.5T480-880q82 0 155.5 35T760-746v-134h80v240H600v-80h76q-39-39-90-59.5T480-800q-81 0-149.5 43T227-640h-87ZM280-80q-33 0-56.5-23.5T200-160v-320q0-33 23.5-56.5T280-560h320q33 0 56.5 23.5T680-480v120l120-120v320L680-280v120q0 33-23.5 56.5T600-80H280Z"
1233
+ ],
1230
1234
  "height": 960,
1231
1235
  "width": 960
1232
1236
  },
@@ -1863,6 +1867,58 @@
1863
1867
  ],
1864
1868
  "width": 10,
1865
1869
  "height": 10
1870
+ },
1871
+ "sync-time": {
1872
+ "paths": [
1873
+ "M5 10C4.30556 10 3.65509 9.86806 3.04861 9.60417C2.44213 9.34028 1.91435 8.9838 1.46528 8.53472C1.0162 8.08565 0.659722 7.55787 0.395833 6.95139C0.131944 6.34491 0 5.69444 0 5C0 4.30556 0.131944 3.65509 0.395833 3.04861C0.659722 2.44213 1.0162 1.91435 1.46528 1.46528C1.91435 1.0162 2.44213 0.659722 3.04861 0.395833C3.65509 0.131944 4.30556 0 5 0C5.75926 0 6.47917 0.162037 7.15972 0.486111C7.84028 0.810185 8.41667 1.26852 8.88889 1.86111V0.555556H10V3.88889H6.66667V2.77778H8.19444C7.81482 2.25926 7.34722 1.85185 6.79167 1.55556C6.23611 1.25926 5.63889 1.11111 5 1.11111C3.91667 1.11111 2.99769 1.48843 2.24306 2.24306C1.48843 2.99769 1.11111 3.91667 1.11111 5C1.11111 6.08333 1.48843 7.00231 2.24306 7.75694C2.99769 8.51157 3.91667 8.88889 5 8.88889C5.97222 8.88889 6.82176 8.57407 7.54861 7.94444C8.27546 7.31481 8.7037 6.51852 8.83333 5.55556H9.97222C9.83333 6.82407 9.28935 7.88194 8.34028 8.72917C7.3912 9.57639 6.27778 10 5 10ZM6.55556 7.33333L4.44444 5.22222V2.22222H5.55556V4.77778L7.33333 6.55556L6.55556 7.33333Z"
1874
+ ],
1875
+ "width": 10,
1876
+ "height": 10
1877
+ },
1878
+ "files-associated": {
1879
+ "paths": [
1880
+ "M7.11111 7.11111H0.888889V0.888889H4V0H0.888889C0.395556 0 0 0.4 0 0.888889V7.11111C0 7.6 0.395556 8 0.888889 8H7.11111C7.6 8 8 7.6 8 7.11111V4H7.11111V7.11111ZM4.88889 0V0.888889H6.48444L2.11556 5.25778L2.74222 5.88444L7.11111 1.51556V3.11111H8V0H4.88889Z"
1881
+ ],
1882
+ "width": 8,
1883
+ "height": 8,
1884
+ "fill": "#AFB2BA"
1885
+ },
1886
+ "upload_dubbing": {
1887
+ "paths": [
1888
+ "M6 11.6387L6.88125 12.5712L10.375 8.88072V16.9297H11.625V8.88072L15.1125 12.5778L16 11.6387L11 6.34766L6 11.6387Z"
1889
+ ],
1890
+ "width": 22,
1891
+ "height": 24,
1892
+ "fill": "#AFB2BA"
1893
+ },
1894
+ "download_dubbing": {
1895
+ "paths": [
1896
+ "M16 11.6387L15.1188 10.7061L11.625 14.3966V6.34768H10.375V14.3966L6.8875 10.6995L6 11.6387L11 16.9297L16 11.6387Z"
1897
+ ],
1898
+ "width": 22,
1899
+ "height": 24,
1900
+ "fill": "#AFB2BA"
1901
+ },
1902
+ "dubbing_review": {
1903
+ "paths": [
1904
+ "M2.4375 5.85526C2.14583 5.54825 2 5.17544 2 4.73684V1.57895C2 1.14035 2.14583 0.767544 2.4375 0.460526C2.72917 0.153509 3.08333 0 3.5 0C3.91667 0 4.27083 0.153509 4.5625 0.460526C4.85417 0.767544 5 1.14035 5 1.57895V4.73684C5 5.17544 4.85417 5.54825 4.5625 5.85526C4.27083 6.16228 3.91667 6.31579 3.5 6.31579C3.08333 6.31579 2.72917 6.16228 2.4375 5.85526ZM3 10V8.38158C2.13333 8.25877 1.41667 7.85088 0.85 7.1579C0.283333 6.46491 0 5.6579 0 4.73684H1C1 5.46491 1.24375 6.08553 1.73125 6.59868C2.21875 7.11184 2.80833 7.36842 3.5 7.36842C4.19167 7.36842 4.78125 7.11184 5.26875 6.59868C5.75625 6.08553 6 5.46491 6 4.73684H7C7 5.6579 6.71667 6.46491 6.15 7.1579C5.58333 7.85088 4.86667 8.25877 4 8.38158V10H3Z"
1905
+ ],
1906
+ "width": 7,
1907
+ "height": 10
1908
+ },
1909
+ "pgm_edit_V2": {
1910
+ "paths": [
1911
+ "M12.3916 0C12.5115 0.000132674 12.6084 0.0976382 12.6084 0.217773V9.78223C12.6084 9.90236 12.5115 9.99987 12.3916 10H0.217773C0.0977729 10 0 9.90244 0 9.78223V0.217773C0 0.0975561 0.0977729 0 0.217773 0H12.3916ZM0.43457 9.56348H2.17383V7.60742H0.43457V9.56348ZM10.4346 9.56348H12.1738V7.60742H10.4346V9.56348ZM0.43457 4.78809H2.17383V5.22363H0.43457V7.17969H2.17383V5.22363H10.4346V4.78809H12.1738V2.83203H10.4346V4.78809H2.17383V2.83203H0.43457V4.78809ZM10.4346 7.17969H12.1738V5.22363H10.4346V7.17969ZM0.43457 2.39551H2.17383V0.439453H0.43457V2.39551ZM10.4346 0.439453V2.39551H12.1738V0.439453H10.4346Z"
1912
+ ],
1913
+ "width": 13,
1914
+ "height": 10
1915
+ },
1916
+ "file_ingest": {
1917
+ "paths": [
1918
+ "M3.17653 10.3237H7.94132V5.55892H11.1178L5.55892 0L0 5.55892H3.17653V10.3237ZM0 11.912H11.1178V13.5002H0V11.912Z"
1919
+ ],
1920
+ "width": 12,
1921
+ "height": 14
1866
1922
  }
1867
1923
  }
1868
1924
  }
@@ -12,7 +12,8 @@ var TimeCodeDisplay = function TimeCodeDisplay(_ref) {
12
12
  var timecode = _ref.timecode,
13
13
  selectedTimecodeFormat = _ref.selectedTimecodeFormat,
14
14
  _ref$fps = _ref.fps,
15
- fps = _ref$fps === void 0 ? 25 : _ref$fps;
15
+ fps = _ref$fps === void 0 ? 25 : _ref$fps,
16
+ color = _ref.color;
16
17
  var displayValue = "00:00:00:00";
17
18
  switch (selectedTimecodeFormat) {
18
19
  case "HH:MM:SS":
@@ -28,7 +29,11 @@ var TimeCodeDisplay = function TimeCodeDisplay(_ref) {
28
29
  displayValue = timecode;
29
30
  break;
30
31
  }
31
- return /*#__PURE__*/_react["default"].createElement("span", null, displayValue);
32
+ return /*#__PURE__*/_react["default"].createElement("span", {
33
+ style: {
34
+ color: color
35
+ }
36
+ }, displayValue);
32
37
  };
33
38
  TimeCodeDisplay.propTypes = {
34
39
  timecode: _propTypes["default"].string.isRequired,
@@ -66,6 +66,7 @@ var TimeCodeMSInput = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
66
66
  _useState4 = (0, _slicedToArray2["default"])(_useState3, 2),
67
67
  isValid = _useState4[0],
68
68
  setIsValid = _useState4[1];
69
+ var inputRef = (0, _react.useRef)(null);
69
70
  var onTimePickerChange = function onTimePickerChange(value, e) {
70
71
  var _e$target;
71
72
  var inputTime = value;
@@ -155,6 +156,13 @@ var TimeCodeMSInput = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
155
156
  inputFieldType: inputFieldType,
156
157
  returnValidity: function returnValidity() {
157
158
  return isValid;
159
+ },
160
+ focus: function focus() {
161
+ // Get the actual input element and focus it
162
+ if (inputRef && inputRef.current) {
163
+ var _inputRef$current;
164
+ (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.focus();
165
+ }
158
166
  }
159
167
  };
160
168
  });
@@ -192,7 +200,7 @@ var TimeCodeMSInput = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
192
200
  value: customInputValue,
193
201
  onFocus: onFocus,
194
202
  onBlur: onBlurFn,
195
- ref: ref,
203
+ ref: inputRef,
196
204
  onKeyDown: onKeyDownFn,
197
205
  onChange: function onChange(e) {
198
206
  return onChangeFn(e);
@@ -66,6 +66,7 @@ var TimeCodeMainInput = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref)
66
66
  _useState4 = (0, _slicedToArray2["default"])(_useState3, 2),
67
67
  isValid = _useState4[0],
68
68
  setIsValid = _useState4[1];
69
+ var inputRef = (0, _react.useRef)(null);
69
70
  var onTimePickerChange = function onTimePickerChange(value, e) {
70
71
  var inputTime = value;
71
72
  var formattedTime = inputTime;
@@ -148,6 +149,13 @@ var TimeCodeMainInput = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref)
148
149
  inputFieldType: inputFieldType,
149
150
  returnValidity: function returnValidity() {
150
151
  return isValid;
152
+ },
153
+ focus: function focus() {
154
+ // Get the actual input element and focus it
155
+ if (inputRef && inputRef.current) {
156
+ var _inputRef$current;
157
+ (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.focus();
158
+ }
151
159
  }
152
160
  };
153
161
  });
@@ -188,9 +196,10 @@ var TimeCodeMainInput = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref)
188
196
  height: 7
189
197
  }))), /*#__PURE__*/_react["default"].createElement(StyledInput, {
190
198
  name: inputFieldType,
199
+ id: inputFieldType,
191
200
  theme: theme,
192
201
  width: width,
193
- ref: ref,
202
+ ref: inputRef,
194
203
  value: customInputValue,
195
204
  onFocus: onFocus,
196
205
  onKeyDown: function onKeyDown(e) {
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
8
  exports["default"] = void 0;
9
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
10
9
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
11
10
  var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
12
11
  var _react = _interopRequireWildcard(require("react"));
@@ -163,6 +162,13 @@ var TimeCodeStandardInput = /*#__PURE__*/(0, _react.forwardRef)(function (_ref,
163
162
  inputFieldType: inputFieldType,
164
163
  returnValidity: function returnValidity() {
165
164
  return isValid;
165
+ },
166
+ focus: function focus() {
167
+ // Get the actual input element and focus it
168
+ if (inputRef && inputRef.current) {
169
+ var _inputRef$current;
170
+ (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.focus();
171
+ }
166
172
  }
167
173
  };
168
174
  });
@@ -193,17 +199,23 @@ var TimeCodeStandardInput = /*#__PURE__*/(0, _react.forwardRef)(function (_ref,
193
199
  name: "cross",
194
200
  width: 7,
195
201
  height: 7
196
- }))), /*#__PURE__*/_react["default"].createElement(StyledInput, (0, _defineProperty2["default"])((0, _defineProperty2["default"])((0, _defineProperty2["default"])((0, _defineProperty2["default"])((0, _defineProperty2["default"])((0, _defineProperty2["default"])((0, _defineProperty2["default"])({
202
+ }))), /*#__PURE__*/_react["default"].createElement(StyledInput, {
197
203
  name: inputFieldType,
198
204
  theme: theme,
199
205
  width: width,
200
- ref: ref,
206
+ ref: inputRef,
201
207
  value: customInputValue,
202
208
  onFocus: onFocus,
203
- onBlur: onBlurFn
204
- }, "ref", ref), "onKeyDown", onKeyDownFn), "onChange", function onChange(e) {
205
- return onChangeFn(e);
206
- }), "isValid", isValid), "maxLength", "8"), "checkBaiscErrorProp", checkBaiscError || false), "errorStatement", errorStatement || "")), showError && errorStatement.length > 0 && /*#__PURE__*/_react["default"].createElement(ErrorContainer, {
209
+ onBlur: onBlurFn,
210
+ onKeyDown: onKeyDownFn,
211
+ onChange: function onChange(e) {
212
+ return onChangeFn(e);
213
+ },
214
+ isValid: isValid,
215
+ maxLength: "8",
216
+ checkBaiscErrorProp: checkBaiscError || false,
217
+ errorStatement: errorStatement || ""
218
+ }), showError && errorStatement.length > 0 && /*#__PURE__*/_react["default"].createElement(ErrorContainer, {
207
219
  inputFieldType: inputFieldType
208
220
  }, " ", errorStatement));
209
221
  });
package/components.js CHANGED
@@ -257,6 +257,12 @@ Object.defineProperty(exports, "RichTextInput", {
257
257
  return _richTextInput["default"];
258
258
  }
259
259
  });
260
+ Object.defineProperty(exports, "RichTextInputV2", {
261
+ enumerable: true,
262
+ get: function get() {
263
+ return _richTextInputV["default"];
264
+ }
265
+ });
260
266
  Object.defineProperty(exports, "Select", {
261
267
  enumerable: true,
262
268
  get: function get() {
@@ -418,5 +424,6 @@ var _Shimmer = _interopRequireDefault(require("./atoms/loader/ShimmerComponent/S
418
424
  var _timeCodeInput = _interopRequireDefault(require("./atoms/timeCodeInput/timeCodeInput"));
419
425
  var _timeCodeDisplay = _interopRequireDefault(require("./atoms/timeCodeDisplay/timeCodeDisplay"));
420
426
  var _richTextInput = _interopRequireDefault(require("./molecules/richTextInput"));
427
+ var _richTextInputV = _interopRequireDefault(require("./molecules/richTextInputV2"));
421
428
  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); }
422
429
  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; }
package/index.js CHANGED
@@ -255,6 +255,12 @@ Object.defineProperty(exports, "RichTextInput", {
255
255
  return _components.RichTextInput;
256
256
  }
257
257
  });
258
+ Object.defineProperty(exports, "RichTextInputV2", {
259
+ enumerable: true,
260
+ get: function get() {
261
+ return _components.RichTextInputV2;
262
+ }
263
+ });
258
264
  Object.defineProperty(exports, "Select", {
259
265
  enumerable: true,
260
266
  get: function get() {
@@ -49,7 +49,7 @@ var RichTextInput = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
49
49
  setCharCount = _useState4[1];
50
50
  var quillRef = (0, _react.useRef)(null);
51
51
  var quillInstance = (0, _react.useRef)(null);
52
- var clickedKey = (0, _react.useRef)('');
52
+ var clickedKey = (0, _react.useRef)("");
53
53
  (0, _react.useImperativeHandle)(ref, function () {
54
54
  return {
55
55
  getEditorContent: function getEditorContent() {
@@ -57,7 +57,7 @@ var RichTextInput = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
57
57
  var html = quillInstance.current.root.innerHTML;
58
58
  return changeEmToI(html);
59
59
  }
60
- return '';
60
+ return "";
61
61
  },
62
62
  setEditorContent: function setEditorContent(content) {
63
63
  if (quillInstance.current) {
@@ -74,8 +74,8 @@ var RichTextInput = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
74
74
  * @returns
75
75
  */
76
76
  var changeEmToI = function changeEmToI(str) {
77
- var updatedStr = str.replace(/\n/g, '').replace(/<br\s*\/?>/gi, '').replace(/<\/?p>/gi, '').replace(/<[/]?em>/g, function (match) {
78
- return match === '<em>' ? '<i>' : '</i>';
77
+ var updatedStr = str.replace(/\n/g, "").replace(/<br\s*\/?>/gi, "").replace(/<\/?p>/gi, "").replace(/<[/]?em>/g, function (match) {
78
+ return match === "<em>" ? "<i>" : "</i>";
79
79
  });
80
80
 
81
81
  // Remove surrounding <p> tags if present
@@ -88,7 +88,7 @@ var RichTextInput = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
88
88
  (0, _react.useEffect)(function () {
89
89
  if (!(quillInstance !== null && quillInstance !== void 0 && quillInstance.current)) {
90
90
  var quill = new _quill["default"](quillRef.current, {
91
- theme: 'snow',
91
+ theme: "snow",
92
92
  modules: {
93
93
  toolbar: false,
94
94
  keyboard: {
@@ -99,9 +99,9 @@ var RichTextInput = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
99
99
  // Tab key
100
100
  handler: function handler() {
101
101
  var currentEditor = quillInstance.current.root;
102
- var editors = document.querySelectorAll('.ql-editor');
102
+ var editors = document.querySelectorAll(".ql-editor");
103
103
  var currentIndex = Array.from(editors).indexOf(currentEditor);
104
- if (editType === 'mainEdit' && currentIndex !== -1 && currentIndex < editors.length - 1) {
104
+ if (editType === "mainEdit" && currentIndex !== -1 && currentIndex < editors.length - 1) {
105
105
  editors[currentIndex + 1].focus();
106
106
  }
107
107
  }
@@ -114,9 +114,9 @@ var RichTextInput = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
114
114
  // Shift key combination
115
115
  handler: function handler() {
116
116
  var currentEditor = quillInstance.current.root;
117
- var editors = document.querySelectorAll('.ql-editor');
117
+ var editors = document.querySelectorAll(".ql-editor");
118
118
  var currentIndex = Array.from(editors).indexOf(currentEditor);
119
- if (editType === 'mainEdit' && currentIndex !== -1 && currentIndex > 0) {
119
+ if (editType === "mainEdit" && currentIndex !== -1 && currentIndex > 0) {
120
120
  editors[currentIndex - 1].focus(); // Move focus to the previous editor
121
121
  }
122
122
  }
@@ -138,9 +138,9 @@ var RichTextInput = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
138
138
  quillInstance.current.setSelection(length - 1, 0);
139
139
  };
140
140
  var editorRoot = quillInstance.current.root;
141
- editorRoot.addEventListener('focus', handleFocus);
141
+ editorRoot.addEventListener("focus", handleFocus);
142
142
  var updateCharCount = function updateCharCount() {
143
- var text = quillInstance.current.getText().replace(/\n/g, '');
143
+ var text = quillInstance.current.getText().replace(/\n/g, "");
144
144
  var characterCount = text.length;
145
145
  setCharCount(characterCount);
146
146
  var selection = quillInstance.current.getSelection();
@@ -150,13 +150,13 @@ var RichTextInput = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
150
150
  var startDeleteIndex = selection.index - excessCharacters;
151
151
  var safeDeleteIndex = Math.max(0, startDeleteIndex);
152
152
  quillInstance.current.deleteText(safeDeleteIndex, excessCharacters);
153
- text = quillInstance.current.getText().replace(/\n/g, '');
153
+ text = quillInstance.current.getText().replace(/\n/g, "");
154
154
  characterCount = text.length;
155
155
  }
156
156
  setCharCount(characterCount);
157
157
  var html = quillInstance.current.getSemanticHTML();
158
158
  html = changeEmToI((0, _utils.cleanHtml)(html));
159
- if (onChange && clickedKey.current !== 'enter') {
159
+ if (onChange && clickedKey.current !== "enter") {
160
160
  onChange({
161
161
  target: {
162
162
  value: html,
@@ -166,13 +166,13 @@ var RichTextInput = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
166
166
  }
167
167
  }
168
168
  };
169
- quillInstance.current.on('text-change', updateCharCount);
169
+ quillInstance.current.on("text-change", updateCharCount);
170
170
  var editorContainer = quillInstance.current.root;
171
- editorContainer.classList.add('quill-editor-content');
171
+ editorContainer.classList.add("quill-editor-content");
172
172
  return function () {
173
- quillInstance.current.off('text-change', updateCharCount);
174
- quillRef.current.innerHTML = '';
175
- editorRoot.removeEventListener('focus', handleFocus);
173
+ quillInstance.current.off("text-change", updateCharCount);
174
+ quillRef.current.innerHTML = "";
175
+ editorRoot.removeEventListener("focus", handleFocus);
176
176
  };
177
177
  }, []);
178
178
 
@@ -188,21 +188,21 @@ var RichTextInput = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
188
188
  handleSave(html);
189
189
  }, 0);
190
190
  var handleKeyDown = function handleKeyDown(event) {
191
- if (event.key === 'Enter') {
191
+ if (event.key === "Enter") {
192
192
  event.preventDefault();
193
193
  var html = quillInstance.current.getSemanticHTML();
194
194
  html = changeEmToI(html);
195
- clickedKey.current = 'enter';
195
+ clickedKey.current = "enter";
196
196
  debouncedHandleSave(html);
197
- } else if (event.key === 'Backspace' || event.key === 'Delete') {
198
- clickedKey.current = 'backspace';
197
+ } else if (event.key === "Backspace" || event.key === "Delete") {
198
+ clickedKey.current = "backspace";
199
199
  } else {
200
- clickedKey.current = '';
200
+ clickedKey.current = "";
201
201
  }
202
202
  };
203
- editorContainer.addEventListener('keydown', handleKeyDown);
203
+ editorContainer.addEventListener("keydown", handleKeyDown);
204
204
  return function () {
205
- editorContainer.removeEventListener('keydown', handleKeyDown);
205
+ editorContainer.removeEventListener("keydown", handleKeyDown);
206
206
  debouncedHandleSave.cancel(); // Clean up debounce
207
207
  };
208
208
  }
@@ -215,22 +215,22 @@ var RichTextInput = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
215
215
  if (value && currentContent !== value) {
216
216
  var selection = quillInstance.current.getSelection(); // Capture cursor position
217
217
 
218
- var content = changeEmToI(value) || '';
218
+ var content = changeEmToI(value) || "";
219
219
  quillInstance.current.clipboard.dangerouslyPasteHTML(content); // Insert HTML content in Quill editor
220
220
  var textLength = quillInstance.current.getLength();
221
221
  if (selection && selection.index !== 0) {
222
222
  quillInstance.current.setSelection(selection.index, selection.length); // Restore previous cursor position
223
- } else if (selection && selection.index === 0 && clickedKey.current === 'backspace') {
223
+ } else if (selection && selection.index === 0 && clickedKey.current === "backspace") {
224
224
  quillInstance.current.setSelection(0, 0); // Keep cursor at start when pressing backspace
225
225
  } else {
226
226
  quillInstance.current.setSelection(charCount || textLength - 1, (selection === null || selection === void 0 ? void 0 : selection.length) || 0); // Move cursor right for other cases
227
227
 
228
- if (editType === 'mainEdit' && !selection) {
228
+ if (editType === "mainEdit" && !selection) {
229
229
  quillInstance.current.blur();
230
230
  // Select the first video element
231
- var videoElement = document.getElementsByTagName('video')[0];
231
+ var videoElement = document.getElementsByTagName("video")[0];
232
232
  // Add a tabindex attribute to make it focusable
233
- videoElement.setAttribute('tabindex', '0');
233
+ videoElement.setAttribute("tabindex", "0");
234
234
  videoElement.focus();
235
235
  }
236
236
  }
@@ -254,14 +254,14 @@ var RichTextInput = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
254
254
  value: value,
255
255
  defaultValue: defaultValue
256
256
  }, props, {
257
- maxLength: maxLength || '',
257
+ maxLength: maxLength || "",
258
258
  showLengthCount: showLengthCount || false
259
259
  }), /*#__PURE__*/_react["default"].createElement("div", {
260
260
  ref: quillRef
261
261
  })), label && /*#__PURE__*/_react["default"].createElement("label", {
262
262
  htmlFor: props.id,
263
- className: charCount || focus ? 'floaton' : ''
264
- }, "".concat(label).concat(props.required ? '*' : '')), errorMessage && /*#__PURE__*/_react["default"].createElement(RichTextInputError, {
263
+ className: charCount || focus ? "floaton" : ""
264
+ }, "".concat(label).concat(props.required ? "*" : "")), errorMessage && /*#__PURE__*/_react["default"].createElement(RichTextInputError, {
265
265
  value: value,
266
266
  theme: props.theme,
267
267
  error: props.error
@@ -277,39 +277,39 @@ var returnPadding = function returnPadding(props) {
277
277
  var digitCount = props.maxLength.toString().length;
278
278
  switch (digitCount) {
279
279
  case 0:
280
- return '7px 0px 2px 0px';
280
+ return "7px 0px 2px 0px";
281
281
  case 1:
282
- return '7px 40px 2px 0px';
282
+ return "7px 40px 2px 0px";
283
283
  case 2:
284
- return '7px 60px 2px 0px';
284
+ return "7px 60px 2px 0px";
285
285
  case 3:
286
- return '7px 75px 2px 0px';
286
+ return "7px 75px 2px 0px";
287
287
  case 4:
288
- return '7px 90px 2px 0px';
288
+ return "7px 90px 2px 0px";
289
289
  case 5:
290
- return '7px 110px 2px 0px';
290
+ return "7px 110px 2px 0px";
291
291
  default:
292
- return '7px 0px 2px 0px';
292
+ return "7px 0px 2px 0px";
293
293
  }
294
294
  };
295
295
  var RichTextEditorContainer = _styledComponents["default"].div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2["default"])(["\n max-height: 48px;\n overflow-y: scroll;\n ::-webkit-scrollbar {\n width: 0; /* Remove scrollbar space */\n background: transparent; /* Optional: just make scrollbar invisible */\n }\n white-space: nowrap;\n width: 100%;\n text-wrap: wrap;\n box-sizing: border-box;\n border-bottom: 1px solid\n ", ";\n\n font-family: \"SFUIText-Medium\";\n font-size: 14px;\n color: ", ";\n\n display: inline-block;\n position: relative;\n padding: ", ";\n &:hover {\n border-color: ", ";\n }\n\n &:focus-within {\n border-color: ", ";\n }\n\n &::placeholder {\n color: ", ";\n opacity: ", ";\n transition: 0.2s ease all;\n }\n\n &:focus-within::placeholder {\n color: ", ";\n opacity: ", ";\n }\n"])), function (props) {
296
- return props.theme === 'light' ? _tokens.colors.light.inputCommon.border : _tokens.colors.dark.inputCommon.border;
296
+ return props.theme === "light" ? _tokens.colors.light.inputCommon.border : _tokens.colors.dark.inputCommon.border;
297
297
  }, function (props) {
298
- return props.theme === 'light' ? _tokens.colors.light.inputCommon.color : _tokens.colors.dark.inputCommon.color;
298
+ return props.theme === "light" ? _tokens.colors.light.inputCommon.color : _tokens.colors.dark.inputCommon.color;
299
299
  }, function (props) {
300
- return returnPadding(props || '');
300
+ return returnPadding(props || "");
301
301
  }, function (props) {
302
- return props.theme === 'light' ? _tokens.colors.light.inputCommon.borderHover : _tokens.colors.dark.inputCommon.borderHover;
302
+ return props.theme === "light" ? _tokens.colors.light.inputCommon.borderHover : _tokens.colors.dark.inputCommon.borderHover;
303
303
  }, function (props) {
304
- return props.theme === 'light' ? _tokens.colors.light.inputCommon.borderHover : _tokens.colors.dark.inputCommon.borderHover;
304
+ return props.theme === "light" ? _tokens.colors.light.inputCommon.borderHover : _tokens.colors.dark.inputCommon.borderHover;
305
305
  }, function (props) {
306
- return props.theme === 'light' ? _tokens.colors.light.inputCommon.placeholder : _tokens.colors.dark.inputCommon.placeholder;
306
+ return props.theme === "light" ? _tokens.colors.light.inputCommon.placeholder : _tokens.colors.dark.inputCommon.placeholder;
307
307
  }, function (props) {
308
- return props.label ? '0' : '1';
308
+ return props.label ? "0" : "1";
309
309
  }, function (props) {
310
- return props.theme === 'light' ? _tokens.colors.light.inputCommon.placeholder : _tokens.colors.dark.inputCommon.placeholder;
310
+ return props.theme === "light" ? _tokens.colors.light.inputCommon.placeholder : _tokens.colors.dark.inputCommon.placeholder;
311
311
  }, function (props) {
312
- return props.label ? '1' : '1';
312
+ return props.label ? "1" : "1";
313
313
  });
314
314
  RichTextInput.propTypes = {
315
315
  masked: _propTypes["default"].bool,
@@ -343,18 +343,18 @@ RichTextInput.propTypes = {
343
343
  simpleEdit: _propTypes["default"].bool,
344
344
  required: _propTypes["default"].bool,
345
345
  autoFocus: _propTypes["default"].bool,
346
- theme: _propTypes["default"].oneOf(['light', 'dark', 'nexc']),
347
- fieldType: _propTypes["default"].oneOf(['inputField', 'textArea'])
346
+ theme: _propTypes["default"].oneOf(["light", "dark", "nexc"]),
347
+ fieldType: _propTypes["default"].oneOf(["inputField", "textArea"])
348
348
  };
349
349
  RichTextInput.defaultProps = {
350
350
  autoFocus: false,
351
- fieldType: 'textArea',
351
+ fieldType: "textArea",
352
352
  readOnly: false,
353
353
  code: false,
354
354
  error: null,
355
355
  onChange: null,
356
- type: 'text',
357
- theme: 'light',
356
+ type: "text",
357
+ theme: "light",
358
358
  showLengthCount: false,
359
359
  simpleEdit: false
360
360
  };