@xaypay/tui 0.0.112 → 0.0.113

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.
@@ -2,7 +2,7 @@ import React, { useState, useEffect } from 'react'
2
2
  import PropTypes from 'prop-types'
3
3
  import classnames from 'classnames'
4
4
 
5
- import { compereConfigs } from './../../utils'
5
+ import { compereConfigs, hasOwnerProperty } from './../../utils'
6
6
  import styles from './modal.module.css'
7
7
 
8
8
  import SvgNext from './../icon/Next'
@@ -266,8 +266,7 @@ export const Modal = ({
266
266
  innerData.length > 0 &&
267
267
  innerData.map((item, index) => {
268
268
  if (select === index) {
269
- // eslint-disable-next-line no-prototype-builtins
270
- if (!item.hasOwnProperty('url')) {
269
+ if (!hasOwnerProperty(item, 'url')) {
271
270
  alert('Please add url property in data prop on each element')
272
271
  } else {
273
272
  return (
@@ -2,7 +2,7 @@ import React, { useEffect, useState } from 'react'
2
2
  import PropTypes from 'prop-types'
3
3
 
4
4
  import classnames from 'classnames'
5
- import { compereConfigs } from './../../utils'
5
+ import { compereConfigs, hasOwnerProperty } from './../../utils'
6
6
 
7
7
  import SvgRequired from './../icon/Required'
8
8
 
@@ -351,8 +351,7 @@ export const NewAutocomplete = ({
351
351
  options &&
352
352
  options.length > 0 &&
353
353
  options.map((item) => {
354
- // eslint-disable-next-line no-prototype-builtins
355
- if (!item.hasOwnProperty(keyNames.name)) {
354
+ if (!hasOwnerProperty(item, keyNames.name)) {
356
355
  alert(`Please add ${keyNames.name} property in items of options array`)
357
356
  }
358
357
  })
@@ -64,6 +64,7 @@ const FileItem = React.memo(
64
64
  )
65
65
  return () => {
66
66
  setI((_) => _)
67
+ setT((_) => _)
67
68
  clearTimeout(t)
68
69
  clearInterval(i)
69
70
  }
@@ -1,5 +1,4 @@
1
1
  import React, { useRef, useState, useEffect, useMemo } from 'react'
2
- import ReactDOM from 'react-dom'
3
2
  import PropTypes from 'prop-types'
4
3
  import { v4 as uuidv4 } from 'uuid'
5
4
 
@@ -56,6 +55,7 @@ export const NewFile = ({
56
55
  listItemPadding,
57
56
  progressFontSize,
58
57
  borderHoverColor,
58
+ maxCHoosenLength,
59
59
  listItemErrorSize,
60
60
  progressTrackColor,
61
61
  fileAreaImageWidth,
@@ -66,9 +66,11 @@ export const NewFile = ({
66
66
  progressSuccessColor,
67
67
  progressLoadingColor,
68
68
  hiddenBackgroundColor,
69
+ maxCHoosenLengthError,
69
70
  extentionsRowMarginTop,
70
71
  listItemBackgroundColor,
71
72
  listItemBackgroundErrorColor,
73
+ maxCHoosenLengthErrorHideTime,
72
74
  }) => {
73
75
  const ref = useRef(null)
74
76
  const inpRef = useRef(null)
@@ -77,6 +79,7 @@ export const NewFile = ({
77
79
  const [error, setError] = useState('')
78
80
  const [isHover, setIsHover] = useState(false)
79
81
  const [singleFile, setSingleFile] = useState(null)
82
+ const [choosenFileCount, setChoosenFileCount] = useState(0)
80
83
  const [image, setImage] = useState(
81
84
  !multiple ? (defaultData ? (defaultData.type !== 'application/pdf' ? defaultData.url : 'pdf') : null) : null
82
85
  )
@@ -84,10 +87,6 @@ export const NewFile = ({
84
87
  const configStyles = compereConfigs()
85
88
 
86
89
  const handleRemoveComponent = () => {
87
- // eslint-disable-next-line react/no-find-dom-node
88
- const node = ReactDOM.findDOMNode(ref.current)
89
- const parent = node.parentNode
90
- parent.removeChild(node)
91
90
  if (!multiple) {
92
91
  removeFile && removeFile(singleFile)
93
92
  } else {
@@ -101,12 +100,59 @@ export const NewFile = ({
101
100
  removeFile && removeFile(singleFile)
102
101
  }
103
102
 
104
- const handleChange = (e) => {
105
- const file = e.target.files
106
-
107
- if (multiple) {
108
- setError('')
109
- setImage(null)
103
+ const handleUploadFiles = (file) => {
104
+ if (maxCHoosenLength && choosenFileCount > 0) {
105
+ if (file.length > choosenFileCount || file.length + memoizedItems.length > choosenFileCount) {
106
+ setError(
107
+ maxCHoosenLengthError
108
+ ? maxCHoosenLengthError
109
+ : `Դիմումին կարող եք կցել առավելագույնը ${choosenFileCount} ֆայլ`
110
+ )
111
+ const clearFunc = () => {
112
+ clearTimeout(time)
113
+ }
114
+ const time = setTimeout(
115
+ () => {
116
+ setError('')
117
+ clearFunc()
118
+ },
119
+ maxCHoosenLengthErrorHideTime && typeof maxCHoosenLengthErrorHideTime === 'number'
120
+ ? Math.round(maxCHoosenLengthErrorHideTime)
121
+ : 3000
122
+ )
123
+ } else {
124
+ for (let ix = 0; ix < file.length; ix++) {
125
+ if (file[ix]) {
126
+ if (file[ix].size <= maxSize * Math.pow(2, 20)) {
127
+ if (
128
+ fileExtensions.includes(file[ix].type.split('/')[1]) ||
129
+ (fileExtensions.includes('heic') && file[ix].type.split('/')[1] === 'heif')
130
+ ) {
131
+ change({
132
+ id: '',
133
+ check: '',
134
+ status: '',
135
+ file: file[ix],
136
+ uuid: uuidv4(),
137
+ })
138
+ } else {
139
+ change({
140
+ file: file[ix],
141
+ uuid: uuidv4(),
142
+ check: formatError,
143
+ })
144
+ }
145
+ } else {
146
+ change({
147
+ file: file[ix],
148
+ uuid: uuidv4(),
149
+ check: maxSizeError,
150
+ })
151
+ }
152
+ }
153
+ }
154
+ }
155
+ } else {
110
156
  for (let ix = 0; ix < file.length; ix++) {
111
157
  if (file[ix]) {
112
158
  if (file[ix].size <= maxSize * Math.pow(2, 20)) {
@@ -137,6 +183,17 @@ export const NewFile = ({
137
183
  }
138
184
  }
139
185
  }
186
+ }
187
+ }
188
+
189
+ const handleChange = (e) => {
190
+ const file = e.target.files
191
+
192
+ if (multiple) {
193
+ setError('')
194
+ setImage(null)
195
+ handleUploadFiles(file)
196
+
140
197
  if (file.length === 0 && memoizedItems.length === 0) {
141
198
  setError(noChoosenFile)
142
199
  }
@@ -229,7 +286,19 @@ export const NewFile = ({
229
286
  if (multiple && !removeFile) {
230
287
  alert('Please add removeFile prop on NewFile component, it is a require in multiple mode')
231
288
  }
232
- }, [multiple, removeFile, filesArray && filesArray.length, defaultData])
289
+
290
+ if (maxCHoosenLength) {
291
+ if (typeof maxCHoosenLength !== 'number') {
292
+ alert('maxCHoosenLength prop must be a number, please check it!')
293
+ } else {
294
+ if (maxCHoosenLength <= 0) {
295
+ setChoosenFileCount(1)
296
+ } else {
297
+ setChoosenFileCount(Math.round(maxCHoosenLength))
298
+ }
299
+ }
300
+ }
301
+ }, [multiple, removeFile, filesArray && filesArray.length, defaultData, maxCHoosenLength])
233
302
 
234
303
  useEffect(() => {
235
304
  if (deleteComponent && !removeComponent) {
@@ -556,6 +625,7 @@ NewFile.propTypes = {
556
625
  backgroundColor: PropTypes.string,
557
626
  change: PropTypes.func.isRequired,
558
627
  listItemPadding: PropTypes.string,
628
+ maxCHoosenLength: PropTypes.number,
559
629
  progressFontSize: PropTypes.string,
560
630
  borderHoverColor: PropTypes.string,
561
631
  listItemErrorSize: PropTypes.string,
@@ -568,9 +638,11 @@ NewFile.propTypes = {
568
638
  progressSuccessColor: PropTypes.string,
569
639
  progressLoadingColor: PropTypes.string,
570
640
  hiddenBackgroundColor: PropTypes.string,
641
+ maxCHoosenLengthError: PropTypes.string,
571
642
  extentionsRowMarginTop: PropTypes.string,
572
643
  listItemBackgroundColor: PropTypes.string,
573
644
  listItemBackgroundErrorColor: PropTypes.string,
645
+ maxCHoosenLengthErrorHideTime: PropTypes.number,
574
646
  filesArray: PropTypes.arrayOf(PropTypes.object),
575
647
  fileExtensions: PropTypes.arrayOf(PropTypes.string),
576
648
  }
@@ -25,12 +25,13 @@ const Template = (args) => {
25
25
  }
26
26
 
27
27
  const handleRemoveComponent = (componentId) => {
28
- console.log(componentId)
28
+ alert(`You want to remove component with id, ${componentId}`)
29
29
  }
30
30
 
31
31
  return (
32
32
  <NewFile
33
33
  {...args}
34
+ removeFromDOM
34
35
  componentId={2}
35
36
  filesArray={files}
36
37
  change={handleChange}
@@ -1,7 +1,7 @@
1
1
  import React, { useEffect, useState, useRef } from 'react'
2
2
  import PropTypes from 'prop-types'
3
3
  import classnames from 'classnames'
4
- import { compereConfigs } from './../../utils'
4
+ import { compereConfigs, hasOwnerProperty } from './../../utils'
5
5
  import { SingleCheckbox } from '../singleCheckbox'
6
6
 
7
7
  import ReactArrowIcon from '../icon/Arrow'
@@ -152,8 +152,7 @@ export const Select = ({
152
152
 
153
153
  const isObjectEmpty = (obj) => {
154
154
  for (var key in obj) {
155
- // eslint-disable-next-line no-prototype-builtins
156
- if (obj.hasOwnProperty(key)) {
155
+ if (hasOwnerProperty(obj, key)) {
157
156
  return false
158
157
  }
159
158
  }
@@ -7,7 +7,7 @@ import TD from './td'
7
7
  import SvgUpArrow from './../icon/UpArrow'
8
8
  import SvgDownArrow from './../icon/DownArrow'
9
9
 
10
- import { compereConfigs } from './../../utils'
10
+ import { compereConfigs, hasOwnerProperty } from './../../utils'
11
11
 
12
12
  export const Table = ({
13
13
  getData,
@@ -48,7 +48,7 @@ export const Table = ({
48
48
  bodyData.map((item, index) => {
49
49
  if (index === data.index) {
50
50
  item.map((innerItem, innerIndex) => {
51
- if (Object.prototype.hasOwnProperty.call(innerItem, 'arrowComponent')) {
51
+ if (hasOwnerProperty(innerItem, 'arrowComponent')) {
52
52
  removeItemIndex = innerIndex
53
53
  }
54
54
  })
@@ -73,7 +73,7 @@ export const Table = ({
73
73
  let headerWithoutArrow
74
74
 
75
75
  header.map((item, index) => {
76
- if (Object.prototype.hasOwnProperty.call(item, 'arrowComponent')) {
76
+ if (hasOwnerProperty(item, 'arrowComponent')) {
77
77
  removeItemIndex = index
78
78
  }
79
79
  })
@@ -121,7 +121,7 @@ export const Table = ({
121
121
  let checkedItems = []
122
122
  data.map((item, index) => {
123
123
  item.map((innerItem, innerIndex) => {
124
- if (Object.prototype.hasOwnProperty.call(innerItem, 'checkBox')) {
124
+ if (hasOwnerProperty(innerItem, 'checkBox')) {
125
125
  if (!checkedItems[innerIndex]) {
126
126
  checkedItems[innerIndex] = []
127
127
  }
@@ -203,7 +203,7 @@ export const Table = ({
203
203
  checkableItemBool = !item.checkBox.checked
204
204
  item.checkBox.checked = !item.checkBox.checked
205
205
  }
206
- if (Object.prototype.hasOwnProperty.call(item, 'arrowComponent')) {
206
+ if (hasOwnerProperty(item, 'arrowComponent')) {
207
207
  removeItemIndex = index
208
208
  }
209
209
  return item
@@ -255,7 +255,7 @@ export const Table = ({
255
255
  if (
256
256
  innerItem.id === data.id &&
257
257
  innerItem.content == data.content &&
258
- Object.prototype.hasOwnProperty.call(innerItem, 'checkBox')
258
+ hasOwnerProperty(innerItem, 'checkBox')
259
259
  ) {
260
260
  innerItem.checkBox.checked = !innerItem.checkBox.checked
261
261
  handleHeaderCheckedUpdate({
@@ -318,7 +318,7 @@ export const Table = ({
318
318
  const handleCheckArrowAction = (item, rowPosition) => {
319
319
  const status = item.status
320
320
  const checkedOpenableRow = body[rowPosition].map((innerItem) => {
321
- if (Object.prototype.hasOwnProperty.call(innerItem, 'status')) {
321
+ if (hasOwnerProperty(innerItem, 'status')) {
322
322
  if (status === 'close') {
323
323
  innerItem.status = 'open'
324
324
  } else {
@@ -346,10 +346,7 @@ export const Table = ({
346
346
  single = item
347
347
  }
348
348
 
349
- if (
350
- Object.prototype.hasOwnProperty.call(item, 'status') &&
351
- !Object.prototype.hasOwnProperty.call(item, 'arrowComponent')
352
- ) {
349
+ if (hasOwnerProperty(item, 'status') && !hasOwnerProperty(item, 'arrowComponent')) {
353
350
  allArrows.push(item)
354
351
  }
355
352
 
@@ -357,7 +354,7 @@ export const Table = ({
357
354
  })
358
355
 
359
356
  const checkedOpenableRowArrow = checkedOpenableRow.map((item) => {
360
- if (Object.prototype.hasOwnProperty.call(item, 'arrowComponent')) {
357
+ if (hasOwnerProperty(item, 'arrowComponent')) {
361
358
  if (single && single.status === 'close') {
362
359
  item.status = 'close'
363
360
  } else if (single && single.status === 'open') {
@@ -390,7 +387,7 @@ export const Table = ({
390
387
 
391
388
  const checkedOpenableAllRowsBody = body.map((innerItem) => {
392
389
  return innerItem.map((iElem) => {
393
- if (Object.prototype.hasOwnProperty.call(iElem, 'status')) {
390
+ if (hasOwnerProperty(iElem, 'status')) {
394
391
  if (item.status === 'open') {
395
392
  iElem.status = 'open'
396
393
  } else {
@@ -408,7 +405,7 @@ export const Table = ({
408
405
  e.stopPropagation()
409
406
  const checkBodyMore = body.map((elemItem, elemIndex) => {
410
407
  return elemItem.map((elemInnerItem, elemInnerIndex) => {
411
- if (elemIndex === index && Object.prototype.hasOwnProperty.call(elemInnerItem, 'dots')) {
408
+ if (elemIndex === index && hasOwnerProperty(elemInnerItem, 'dots')) {
412
409
  if (elemInnerIndex === innerIndex) {
413
410
  if (item.dotsStatus === 'deActive') {
414
411
  elemInnerItem.dotsStatus = 'active'
@@ -416,7 +413,7 @@ export const Table = ({
416
413
  elemInnerItem.dotsStatus = 'deActive'
417
414
  }
418
415
  }
419
- } else if (elemIndex !== index && Object.prototype.hasOwnProperty.call(elemInnerItem, 'dots')) {
416
+ } else if (elemIndex !== index && hasOwnerProperty(elemInnerItem, 'dots')) {
420
417
  if (elemInnerIndex === innerIndex) {
421
418
  elemInnerItem.dotsStatus = 'deActive'
422
419
  }
@@ -432,7 +429,7 @@ export const Table = ({
432
429
  if (disableArr && disableArr.length > 0) {
433
430
  headerWithDisabled = arr.map((item, index) => {
434
431
  if (disableArr[index]) {
435
- if (Object.prototype.hasOwnProperty.call(item, 'checkBox')) {
432
+ if (hasOwnerProperty(item, 'checkBox')) {
436
433
  item.checkBox.disabled = true
437
434
  }
438
435
  }
@@ -487,7 +484,7 @@ export const Table = ({
487
484
  const handleTableClick = () => {
488
485
  const checkBodyMore = body.map((elemItem) => {
489
486
  return elemItem.map((elemInnerItem) => {
490
- if (Object.prototype.hasOwnProperty.call(elemInnerItem, 'dots')) {
487
+ if (hasOwnerProperty(elemInnerItem, 'dots')) {
491
488
  elemInnerItem.dotsStatus = 'deActive'
492
489
  }
493
490
  return elemInnerItem
@@ -511,8 +508,8 @@ export const Table = ({
511
508
  )
512
509
  const insert = checkForInsertArrow.map((item, index) => {
513
510
  item.map((innerItem, innerIndex) => {
514
- if (Object.prototype.hasOwnProperty.call(innerItem, 'checkBox')) {
515
- if (Object.prototype.hasOwnProperty.call(innerItem.checkBox, 'disabled')) {
511
+ if (hasOwnerProperty(innerItem, 'checkBox')) {
512
+ if (hasOwnerProperty(innerItem.checkBox, 'disabled')) {
516
513
  if (innerItem.checkBox.disabled === true) {
517
514
  if (!disabledArray[innerIndex]) {
518
515
  disabledArray[innerIndex] = { rowIndex: index, columnIndex: innerIndex }
@@ -528,8 +525,8 @@ export const Table = ({
528
525
  } else {
529
526
  const insert = checkBodyForChackedItems.map((item, index) => {
530
527
  item.map((innerItem, innerIndex) => {
531
- if (Object.prototype.hasOwnProperty.call(innerItem, 'checkBox')) {
532
- if (Object.prototype.hasOwnProperty.call(innerItem.checkBox, 'disabled')) {
528
+ if (hasOwnerProperty(innerItem, 'checkBox')) {
529
+ if (hasOwnerProperty(innerItem.checkBox, 'disabled')) {
533
530
  if (innerItem.checkBox.disabled === true) {
534
531
  if (!disabledArray[innerIndex]) {
535
532
  disabledArray[innerIndex] = { rowIndex: index, columnIndex: innerIndex }
@@ -2,6 +2,8 @@ import React from 'react'
2
2
 
3
3
  import { SingleCheckbox } from './../singleCheckbox'
4
4
 
5
+ import { hasOwnerProperty } from './../../utils'
6
+
5
7
  import styles from './table.module.css'
6
8
 
7
9
  const TD = ({
@@ -35,6 +37,37 @@ const TD = ({
35
37
  handleBodyActionClick(e, actionData)
36
38
  }
37
39
 
40
+ const handleCheckActions = (e, object, property, objectIndex) => {
41
+ if (hasOwnerProperty(object, property)) {
42
+ handleBodyAction(e, {
43
+ item: object,
44
+ itemIndex: objectIndex,
45
+ })
46
+ }
47
+ }
48
+
49
+ const handleMoreOptions = (item, index, optionItem, innerIndex, optionIndex, options) => {
50
+ handleMoreOptionsClick({
51
+ item,
52
+ index,
53
+ options,
54
+ optionItem,
55
+ innerIndex,
56
+ optionIndex,
57
+ })
58
+ }
59
+
60
+ const handleContentList = (e, item, index, innerIndex, listContentId, listContent, listContentIndex) => {
61
+ handleContentListClick(e, {
62
+ item,
63
+ index,
64
+ innerIndex,
65
+ listContentId,
66
+ listContent,
67
+ listContentIndex,
68
+ })
69
+ }
70
+
38
71
  return (
39
72
  <td
40
73
  style={{
@@ -48,9 +81,7 @@ const TD = ({
48
81
  textAlign: tBodyTextAlign,
49
82
  fontFamily: tBodyFontFamily,
50
83
  fontWeight: tBodyFontWeight,
51
- boxShadow: Object.prototype.hasOwnProperty.call(item, 'colorStatus')
52
- ? `inset 3px 0px 0px 0px ${item.colorStatus}`
53
- : '',
84
+ boxShadow: hasOwnerProperty(item, 'colorStatus') ? `inset 3px 0px 0px 0px ${item.colorStatus}` : '',
54
85
  }}
55
86
  >
56
87
  {Array.isArray(item) ? (
@@ -63,23 +94,13 @@ const TD = ({
63
94
  width: '32px',
64
95
  height: '32px',
65
96
  marginRight: '10px',
66
- cursor: Object.prototype.hasOwnProperty.call(newItem, 'type')
67
- ? 'pointer'
68
- : 'auto',
97
+ cursor: hasOwnerProperty(newItem, 'type') ? 'pointer' : 'auto',
69
98
  }}
70
99
  id={newItem.id}
71
100
  type={newItem.type}
72
101
  className={styles['td-span']}
73
102
  key={`${newItem.id}_${newIndex}`}
74
- onClick={
75
- Object.prototype.hasOwnProperty.call(newItem, 'type')
76
- ? (e) =>
77
- handleBodyAction(e, {
78
- item: newItem,
79
- itemIndex: newIndex,
80
- })
81
- : (_) => _
82
- }
103
+ onClick={(e) => handleCheckActions(e, newItem, 'type', newIndex)}
83
104
  >
84
105
  {newItem.content}
85
106
  </span>
@@ -102,22 +123,12 @@ const TD = ({
102
123
  width: '32px',
103
124
  height: '32px',
104
125
  marginRight: '10px',
105
- cursor: Object.prototype.hasOwnProperty.call(iT, 'type')
106
- ? 'pointer'
107
- : 'auto',
126
+ cursor: hasOwnerProperty(iT, 'type') ? 'pointer' : 'auto',
108
127
  }}
109
128
  id={iT.id ? iT.id : ''}
110
129
  type={iT.type ? iT.type : ''}
111
130
  className={styles['td-span']}
112
- onClick={
113
- Object.prototype.hasOwnProperty.call(iT, 'type')
114
- ? (e) =>
115
- handleBodyAction(e, {
116
- item: iT,
117
- itemIndex: iN,
118
- })
119
- : (_) => _
120
- }
131
+ onClick={(e) => handleCheckActions(e, iT, 'type', iN)}
121
132
  key={`${iT.id || iT.content}_${iN}`}
122
133
  >
123
134
  {iT.content}
@@ -139,13 +150,12 @@ const TD = ({
139
150
  display: 'flex',
140
151
  alignItems: 'flex-start',
141
152
  justifyContent:
142
- Object.prototype.hasOwnProperty.call(item, 'contentList') ||
143
- Object.prototype.hasOwnProperty.call(item, 'checkBox')
153
+ hasOwnerProperty(item, 'contentList') || hasOwnerProperty(item, 'checkBox')
144
154
  ? 'space-between'
145
155
  : 'center',
146
156
  }}
147
157
  >
148
- {Object.prototype.hasOwnProperty.call(item, 'contentList') && (
158
+ {hasOwnerProperty(item, 'contentList') && (
149
159
  <div
150
160
  id={item.id}
151
161
  style={{
@@ -160,7 +170,7 @@ const TD = ({
160
170
  </div>
161
171
  )}
162
172
 
163
- {Object.prototype.hasOwnProperty.call(item, 'checkBox') && (
173
+ {hasOwnerProperty(item, 'checkBox') && (
164
174
  <SingleCheckbox
165
175
  data={item}
166
176
  index={index}
@@ -182,28 +192,27 @@ const TD = ({
182
192
  style={{
183
193
  margin: '0px',
184
194
  cursor:
185
- Object.prototype.hasOwnProperty.call(item, 'arrowComponent') ||
186
- Object.prototype.hasOwnProperty.call(item, 'dots')
195
+ hasOwnerProperty(item, 'arrowComponent') || hasOwnerProperty(item, 'dots')
187
196
  ? 'pointer'
188
197
  : 'auto',
189
198
  }}
190
199
  onClick={
191
- Object.prototype.hasOwnProperty.call(item, 'arrowComponent')
200
+ hasOwnerProperty(item, 'arrowComponent')
192
201
  ? () => handleCheckArrowAction(item, item.checkIndex)
193
- : Object.prototype.hasOwnProperty.call(item, 'dots')
202
+ : hasOwnerProperty(item, 'dots')
194
203
  ? (e) => handleCheckDots(e, item, index, innerIndex)
195
204
  : (_) => _
196
205
  }
197
206
  >
198
207
  {item.content ? (
199
208
  item.content
200
- ) : Object.prototype.hasOwnProperty.call(item, 'arrowComponent') ? (
209
+ ) : hasOwnerProperty(item, 'arrowComponent') ? (
201
210
  item.status === 'close' ? (
202
211
  item.closeArrow
203
212
  ) : (
204
213
  item.openArrow
205
214
  )
206
- ) : Object.prototype.hasOwnProperty.call(item, 'dots') ? (
215
+ ) : hasOwnerProperty(item, 'dots') ? (
207
216
  <span
208
217
  style={{
209
218
  display: 'block',
@@ -228,7 +237,7 @@ const TD = ({
228
237
  boxShadow: '0px 0px 20px 0px #3C393E4D',
229
238
  }}
230
239
  >
231
- {Object.prototype.hasOwnProperty.call(item, 'options') &&
240
+ {hasOwnerProperty(item, 'options') &&
232
241
  item.options.map((optionItem, optionIndex) => {
233
242
  return (
234
243
  <span
@@ -240,14 +249,14 @@ const TD = ({
240
249
  fontFamily: 'Noto Sans Armenian',
241
250
  }}
242
251
  onClick={() =>
243
- handleMoreOptionsClick({
252
+ handleMoreOptions(
244
253
  item,
245
254
  index,
246
255
  optionItem,
247
256
  innerIndex,
248
257
  optionIndex,
249
- options: item.options,
250
- })
258
+ item.options
259
+ )
251
260
  }
252
261
  >
253
262
  <span
@@ -278,7 +287,7 @@ const TD = ({
278
287
  ''
279
288
  )}
280
289
  </p>
281
- {Object.prototype.hasOwnProperty.call(item, 'contentList') && (
290
+ {hasOwnerProperty(item, 'contentList') && (
282
291
  <div
283
292
  style={{
284
293
  overflow: 'auto',
@@ -300,14 +309,15 @@ const TD = ({
300
309
  'px',
301
310
  }}
302
311
  onClick={(e) =>
303
- handleContentListClick(e, {
312
+ handleContentList(
313
+ e,
304
314
  item,
305
315
  index,
306
316
  innerIndex,
307
- listContentId: innerItem.id,
308
- listContent: innerItem.content,
309
- listContentIndex: innerItemIndex,
310
- })
317
+ innerItem.id,
318
+ innerItem.content,
319
+ innerItemIndex
320
+ )
311
321
  }
312
322
  >
313
323
  {innerItem.content}