@xaypay/tui 0.0.119 → 0.0.121
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.
- package/dist/index.es.js +3983 -4344
- package/dist/index.js +3982 -4345
- package/package.json +1 -1
- package/tui.config.js +1 -1
- package/.eslintrc.js +0 -30
- package/.husky/pre-commit +0 -4
- package/.prettierrc +0 -10
- package/.storybook/main.js +0 -48
- package/.storybook/preview.js +0 -9
- package/rollup.config.js +0 -37
- package/src/assets/attach.svg +0 -4
- package/src/assets/delete.svg +0 -4
- package/src/assets/down-arrow.svg +0 -4
- package/src/assets/figma-image.png +0 -0
- package/src/assets/heart-filled.svg +0 -17
- package/src/assets/heart-outline.svg +0 -14
- package/src/assets/like-filled.svg +0 -21
- package/src/assets/like-outline.svg +0 -21
- package/src/assets/minus.svg +0 -4
- package/src/assets/pdf.svg +0 -3
- package/src/assets/plus.svg +0 -4
- package/src/assets/range-arrow-default.svg +0 -19
- package/src/assets/range-arrow-error.svg +0 -19
- package/src/assets/range-arrow-success.svg +0 -19
- package/src/assets/star-filled.svg +0 -21
- package/src/assets/star-outline.svg +0 -5
- package/src/assets/table-settings-icon.svg +0 -3
- package/src/assets/up-arrow.svg +0 -4
- package/src/assets_old/icons/Read Me.txt +0 -7
- package/src/assets_old/icons/demo-files/demo.css +0 -152
- package/src/assets_old/icons/demo-files/demo.js +0 -28
- package/src/assets_old/icons/demo.html +0 -192
- package/src/assets_old/icons/fonts/icomoon.eot +0 -0
- package/src/assets_old/icons/fonts/icomoon.svg +0 -21
- package/src/assets_old/icons/fonts/icomoon.ttf +0 -0
- package/src/assets_old/icons/fonts/icomoon.woff +0 -0
- package/src/assets_old/icons/selection.json +0 -1
- package/src/assets_old/icons/style.css +0 -58
- package/src/components/autocomplate/autocomplate.module.css +0 -95
- package/src/components/autocomplate/autocomplate.stories.js +0 -35
- package/src/components/autocomplate/index.js +0 -164
- package/src/components/button/button.stories.js +0 -13
- package/src/components/button/index.js +0 -187
- package/src/components/captcha/captcha.module.css +0 -74
- package/src/components/captcha/captcha.stories.js +0 -21
- package/src/components/captcha/index.js +0 -158
- package/src/components/checkbox/checkbox.module.css +0 -0
- package/src/components/checkbox/checkbox.stories.js +0 -76
- package/src/components/checkbox/index.js +0 -120
- package/src/components/file/file.module.css +0 -114
- package/src/components/file/file.stories.js +0 -20
- package/src/components/file/index.js +0 -138
- package/src/components/icon/Active.js +0 -20
- package/src/components/icon/Arrow.js +0 -19
- package/src/components/icon/Cancel.js +0 -19
- package/src/components/icon/CaptchaArrowDown.js +0 -19
- package/src/components/icon/CaptchaArrowUp.js +0 -19
- package/src/components/icon/CheckboxChecked.js +0 -21
- package/src/components/icon/CheckboxUnchecked.js +0 -21
- package/src/components/icon/Close.js +0 -19
- package/src/components/icon/CloseIcon.js +0 -19
- package/src/components/icon/CloseSlide.js +0 -19
- package/src/components/icon/DeActive.js +0 -20
- package/src/components/icon/DeleteComponent.js +0 -20
- package/src/components/icon/Done.js +0 -19
- package/src/components/icon/Dots.js +0 -19
- package/src/components/icon/DownArrow.js +0 -20
- package/src/components/icon/HeartFilled.js +0 -25
- package/src/components/icon/HeartOutline.js +0 -25
- package/src/components/icon/Heic.js +0 -21
- package/src/components/icon/Icon.js +0 -11
- package/src/components/icon/ListItemDelete.js +0 -19
- package/src/components/icon/ListItemJpeg.js +0 -21
- package/src/components/icon/ListItemJpg.js +0 -21
- package/src/components/icon/ListItemPdf.js +0 -21
- package/src/components/icon/ListItemPng.js +0 -21
- package/src/components/icon/Next.js +0 -20
- package/src/components/icon/Nextarrow.js +0 -19
- package/src/components/icon/PDF.js +0 -19
- package/src/components/icon/Prev.js +0 -20
- package/src/components/icon/RangeArrowDefault.js +0 -43
- package/src/components/icon/RangeArrowError.js +0 -43
- package/src/components/icon/RangeArrowSuccess.js +0 -43
- package/src/components/icon/Reject.js +0 -19
- package/src/components/icon/RemoveFile.js +0 -20
- package/src/components/icon/Required.js +0 -19
- package/src/components/icon/ToasterClose.js +0 -19
- package/src/components/icon/ToasterError.js +0 -19
- package/src/components/icon/ToasterInfo.js +0 -19
- package/src/components/icon/ToasterSuccess.js +0 -19
- package/src/components/icon/ToasterWarning.js +0 -19
- package/src/components/icon/Tooltip.js +0 -19
- package/src/components/icon/UpArrow.js +0 -20
- package/src/components/icon/Upload.js +0 -25
- package/src/components/icon/Wrong.js +0 -21
- package/src/components/icon/Zoom.js +0 -21
- package/src/components/icon/index.js +0 -0
- package/src/components/input/index.js +0 -688
- package/src/components/input/input.module.css +0 -51
- package/src/components/input/input.stories.js +0 -26
- package/src/components/modal/index.js +0 -436
- package/src/components/modal/modal.module.css +0 -22
- package/src/components/modal/modal.stories.js +0 -88
- package/src/components/newAutocomplete/NewAutocomplete.stories.js +0 -102
- package/src/components/newAutocomplete/autocomplete.module.css +0 -4
- package/src/components/newAutocomplete/index.js +0 -592
- package/src/components/newFile/fileItem.js +0 -281
- package/src/components/newFile/index.js +0 -731
- package/src/components/newFile/newFile.stories.js +0 -93
- package/src/components/pagination/index.js +0 -234
- package/src/components/pagination/pagination.module.css +0 -93
- package/src/components/pagination/pagination.stories.js +0 -371
- package/src/components/pagination/paginationRange.js +0 -45
- package/src/components/radio/index.js +0 -236
- package/src/components/radio/radio.module.css +0 -59
- package/src/components/radio/radio.stories.js +0 -59
- package/src/components/select/index.js +0 -534
- package/src/components/select/select.module.css +0 -93
- package/src/components/select/select.stories.js +0 -39
- package/src/components/singleCheckbox/Checkbox.js +0 -84
- package/src/components/singleCheckbox/index.js +0 -65
- package/src/components/singleCheckbox/singleCheckbox.stories.js +0 -24
- package/src/components/stepper/index.js +0 -45
- package/src/components/stepper/stepper.module.css +0 -57
- package/src/components/stepper/stepper.stories.js +0 -17
- package/src/components/table/index.js +0 -789
- package/src/components/table/table.module.css +0 -63
- package/src/components/table/table.stories.js +0 -497
- package/src/components/table/td.js +0 -429
- package/src/components/table/th.js +0 -103
- package/src/components/textarea/index.js +0 -285
- package/src/components/textarea/textarea.module.css +0 -25
- package/src/components/textarea/textarea.stories.js +0 -56
- package/src/components/toaster/Toast.js +0 -203
- package/src/components/toaster/index.js +0 -131
- package/src/components/toaster/toaster.module.css +0 -201
- package/src/components/toaster/toaster.stories.js +0 -593
- package/src/components/tooltip/index.js +0 -156
- package/src/components/tooltip/tooltip.module.css +0 -46
- package/src/components/tooltip/tooltip.stories.js +0 -30
- package/src/components/typography/index.js +0 -124
- package/src/components/typography/typography.module.css +0 -57
- package/src/components/typography/typography.stories.js +0 -22
- package/src/index.js +0 -19
- package/src/stories/Introduction.stories.mdx +0 -210
- package/src/stories/assets/code-brackets.svg +0 -1
- package/src/stories/assets/colors.svg +0 -1
- package/src/stories/assets/comments.svg +0 -1
- package/src/stories/assets/direction.svg +0 -1
- package/src/stories/assets/flow.svg +0 -1
- package/src/stories/assets/plugin.svg +0 -1
- package/src/stories/assets/repo.svg +0 -1
- package/src/stories/assets/stackalt.svg +0 -1
- package/src/stories/changelog.stories.mdx +0 -172
- package/src/stories/configuration.stories.mdx +0 -715
- package/src/stories/documentation.stories.mdx +0 -118
- package/src/stories/static/autocomplete-usage.png +0 -0
- package/src/stories/static/button-usage-icon.png +0 -0
- package/src/stories/static/button-usage.png +0 -0
- package/src/stories/static/captcha-usage.png +0 -0
- package/src/stories/static/checkbox-group-usage-2.png +0 -0
- package/src/stories/static/checkbox-group-usage.png +0 -0
- package/src/stories/static/file-single-usage.png +0 -0
- package/src/stories/static/file-usage.png +0 -0
- package/src/stories/static/input-usage.png +0 -0
- package/src/stories/static/modal-usage.png +0 -0
- package/src/stories/static/radio-usage.png +0 -0
- package/src/stories/static/select-usage.png +0 -0
- package/src/stories/static/table-body-data-structure-first-part-usage.png +0 -0
- package/src/stories/static/table-body-data-structure-second-part-usage.png +0 -0
- package/src/stories/static/table-body-data-structure-third-part-usage.png +0 -0
- package/src/stories/static/table-component-usage.png +0 -0
- package/src/stories/static/table-header-data-structure-usage.png +0 -0
- package/src/stories/static/table-new-data-structure-usage.png +0 -0
- package/src/stories/static/textarea-usage.png +0 -0
- package/src/stories/static/toaster-container-usage.png +0 -0
- package/src/stories/static/toaster-usage.png +0 -0
- package/src/stories/static/tooltip-usage.png +0 -0
- package/src/stories/usage.stories.mdx +0 -201
- package/src/utils/index.js +0 -29
|
@@ -1,429 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
|
|
3
|
-
import { SingleCheckbox } from './../singleCheckbox'
|
|
4
|
-
|
|
5
|
-
import { hasOwnerProperty } from './../../utils'
|
|
6
|
-
|
|
7
|
-
import styles from './table.module.css'
|
|
8
|
-
|
|
9
|
-
const TD = ({
|
|
10
|
-
row,
|
|
11
|
-
item,
|
|
12
|
-
index,
|
|
13
|
-
rowItem,
|
|
14
|
-
rowRadius,
|
|
15
|
-
hideBorder,
|
|
16
|
-
innerIndex,
|
|
17
|
-
tBodyColor,
|
|
18
|
-
borderRight,
|
|
19
|
-
tBodyPadding,
|
|
20
|
-
tBodyFontSize,
|
|
21
|
-
openListColor,
|
|
22
|
-
tBodyTextAlign,
|
|
23
|
-
tBodyFontFamily,
|
|
24
|
-
tBodyFontWeight,
|
|
25
|
-
handleCheckDots,
|
|
26
|
-
openListFontSize,
|
|
27
|
-
handleCheckedBody,
|
|
28
|
-
openListFontFamily,
|
|
29
|
-
tableColumnMinWidth,
|
|
30
|
-
tableColumnMaxWidth,
|
|
31
|
-
handleBodyActionClick,
|
|
32
|
-
handleMoreOptionsClick,
|
|
33
|
-
handleContentListClick,
|
|
34
|
-
handleCheckArrowAction,
|
|
35
|
-
handleOpenCloseRowSingleArrow,
|
|
36
|
-
}) => {
|
|
37
|
-
const handleBodyAction = (e, data) => {
|
|
38
|
-
const actionData = {
|
|
39
|
-
index,
|
|
40
|
-
innerIndex,
|
|
41
|
-
items: item,
|
|
42
|
-
item: data.item,
|
|
43
|
-
itemIndex: data.itemIndex,
|
|
44
|
-
}
|
|
45
|
-
handleBodyActionClick(e, actionData)
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
const handleCheckActions = (e, object, property, objectIndex) => {
|
|
49
|
-
if (hasOwnerProperty(object, property)) {
|
|
50
|
-
handleBodyAction(e, {
|
|
51
|
-
item: object,
|
|
52
|
-
itemIndex: objectIndex,
|
|
53
|
-
})
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
const handleMoreOptions = (item, index, optionItem, innerIndex, optionIndex, options) => {
|
|
58
|
-
handleMoreOptionsClick({
|
|
59
|
-
item,
|
|
60
|
-
index,
|
|
61
|
-
options,
|
|
62
|
-
optionItem,
|
|
63
|
-
innerIndex,
|
|
64
|
-
optionIndex,
|
|
65
|
-
})
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
const handleContentList = (e, item, index, innerIndex, listContentId, listContent, listContentIndex) => {
|
|
69
|
-
handleContentListClick(e, {
|
|
70
|
-
item,
|
|
71
|
-
index,
|
|
72
|
-
innerIndex,
|
|
73
|
-
listContentId,
|
|
74
|
-
listContent,
|
|
75
|
-
listContentIndex,
|
|
76
|
-
})
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
return (
|
|
80
|
-
<td
|
|
81
|
-
style={{
|
|
82
|
-
width: 'auto',
|
|
83
|
-
color: tBodyColor,
|
|
84
|
-
verticalAlign: 'top',
|
|
85
|
-
padding: tBodyPadding,
|
|
86
|
-
fontSize: tBodyFontSize,
|
|
87
|
-
borderRight: borderRight,
|
|
88
|
-
textAlign: tBodyTextAlign,
|
|
89
|
-
fontFamily: tBodyFontFamily,
|
|
90
|
-
fontWeight: tBodyFontWeight,
|
|
91
|
-
minWidth: tableColumnMinWidth,
|
|
92
|
-
maxWidth: tableColumnMaxWidth,
|
|
93
|
-
whiteSpace: Array.isArray(item) ? 'nowrap' : 'wrap',
|
|
94
|
-
borderColor: hideBorder ? 'transparent' : '#eeeeee',
|
|
95
|
-
boxShadow: hasOwnerProperty(item, 'colorStatus') ? `inset 3px 0px 0px 0px ${item.colorStatus}` : '',
|
|
96
|
-
borderTopLeftRadius: rowItem && innerIndex === 0 ? rowRadius : '0px',
|
|
97
|
-
borderBottomLeftRadius: rowItem && innerIndex === 0 ? rowRadius : '0px',
|
|
98
|
-
borderTopRightRadius: rowItem && innerIndex === row.length - 1 ? rowRadius : '0px',
|
|
99
|
-
borderBottomRightRadius: rowItem && innerIndex === row.length - 1 ? rowRadius : '0px',
|
|
100
|
-
}}
|
|
101
|
-
>
|
|
102
|
-
{Array.isArray(item) ? (
|
|
103
|
-
item.length > 0 ? (
|
|
104
|
-
item.map((newItem, newIndex) => {
|
|
105
|
-
if (newItem && !Array.isArray(newItem) && typeof newItem === 'object') {
|
|
106
|
-
return (
|
|
107
|
-
<span
|
|
108
|
-
style={{
|
|
109
|
-
width: '32px',
|
|
110
|
-
height: '32px',
|
|
111
|
-
marginRight: '10px',
|
|
112
|
-
cursor: hasOwnerProperty(newItem, 'type') ? 'pointer' : 'auto',
|
|
113
|
-
}}
|
|
114
|
-
id={newItem.id}
|
|
115
|
-
type={newItem.type}
|
|
116
|
-
className={styles['td-span']}
|
|
117
|
-
key={`${newItem.id}_${newIndex}`}
|
|
118
|
-
onClick={(e) => handleCheckActions(e, newItem, 'type', newIndex)}
|
|
119
|
-
>
|
|
120
|
-
{newItem.content === 0
|
|
121
|
-
? newItem.content.toString()
|
|
122
|
-
: newItem.content
|
|
123
|
-
? newItem.content
|
|
124
|
-
: ''}
|
|
125
|
-
</span>
|
|
126
|
-
)
|
|
127
|
-
} else if (newItem && Array.isArray(newItem)) {
|
|
128
|
-
return (
|
|
129
|
-
<span
|
|
130
|
-
key={`${newItem.id}_${newIndex}`}
|
|
131
|
-
style={{
|
|
132
|
-
display: 'inline-block',
|
|
133
|
-
marginRight: newIndex !== item.length - 1 ? '10px' : '0px',
|
|
134
|
-
borderRight:
|
|
135
|
-
newIndex !== item.length - 1 ? '1px solid rgb(238, 238, 238)' : 'none',
|
|
136
|
-
}}
|
|
137
|
-
>
|
|
138
|
-
{item[newIndex].map((iT, iN) => {
|
|
139
|
-
return (
|
|
140
|
-
<span
|
|
141
|
-
style={{
|
|
142
|
-
width: '32px',
|
|
143
|
-
height: '32px',
|
|
144
|
-
marginRight: '10px',
|
|
145
|
-
cursor: hasOwnerProperty(iT, 'type') ? 'pointer' : 'auto',
|
|
146
|
-
}}
|
|
147
|
-
id={iT.id ? iT.id : ''}
|
|
148
|
-
type={iT.type ? iT.type : ''}
|
|
149
|
-
className={styles['td-span']}
|
|
150
|
-
onClick={(e) => handleCheckActions(e, iT, 'type', iN)}
|
|
151
|
-
key={`${iT.id || iT.content}_${iN}`}
|
|
152
|
-
>
|
|
153
|
-
{iT.content === 0
|
|
154
|
-
? iT.content.toString()
|
|
155
|
-
: iT.content
|
|
156
|
-
? iT.content
|
|
157
|
-
: ''}
|
|
158
|
-
</span>
|
|
159
|
-
)
|
|
160
|
-
})}
|
|
161
|
-
</span>
|
|
162
|
-
)
|
|
163
|
-
} else {
|
|
164
|
-
return <span key={`${newItem.id}_${newIndex}`}>{newItem}</span>
|
|
165
|
-
}
|
|
166
|
-
})
|
|
167
|
-
) : (
|
|
168
|
-
<></>
|
|
169
|
-
)
|
|
170
|
-
) : item !== null && !Array.isArray(item) && typeof item === 'object' ? (
|
|
171
|
-
<div
|
|
172
|
-
style={{
|
|
173
|
-
display: 'flex',
|
|
174
|
-
alignItems: 'flex-start',
|
|
175
|
-
justifyContent: hasOwnerProperty(item, 'checkBox')
|
|
176
|
-
? 'space-between'
|
|
177
|
-
: tBodyTextAlign
|
|
178
|
-
? tBodyTextAlign === 'left'
|
|
179
|
-
? 'flex-start'
|
|
180
|
-
: tBodyTextAlign === 'right'
|
|
181
|
-
? 'flex-end'
|
|
182
|
-
: 'center'
|
|
183
|
-
: 'center',
|
|
184
|
-
}}
|
|
185
|
-
>
|
|
186
|
-
{!hasOwnerProperty(item, 'hideArrow') &&
|
|
187
|
-
item.hideArrow !== false &&
|
|
188
|
-
(!hasOwnerProperty(item, 'rightArrow') || item.rightArrow !== true)
|
|
189
|
-
? hasOwnerProperty(item, 'contentList') &&
|
|
190
|
-
(hasOwnerProperty(item, 'closeArrow') || hasOwnerProperty(item, 'openArrow')) && (
|
|
191
|
-
<div
|
|
192
|
-
id={item.id}
|
|
193
|
-
style={{
|
|
194
|
-
width: '21px',
|
|
195
|
-
height: '21px',
|
|
196
|
-
cursor: 'pointer',
|
|
197
|
-
}}
|
|
198
|
-
onClick={() => handleOpenCloseRowSingleArrow(index, innerIndex, item)}
|
|
199
|
-
className={styles['td-span']}
|
|
200
|
-
>
|
|
201
|
-
{hasOwnerProperty(item, 'status') && item.status === 'close'
|
|
202
|
-
? item.closeArrow
|
|
203
|
-
: item.openArrow}
|
|
204
|
-
</div>
|
|
205
|
-
)
|
|
206
|
-
: ''}
|
|
207
|
-
|
|
208
|
-
{hasOwnerProperty(item, 'checkBox') && (
|
|
209
|
-
<SingleCheckbox
|
|
210
|
-
data={item}
|
|
211
|
-
index={index}
|
|
212
|
-
innerIndex={innerIndex}
|
|
213
|
-
checked={item.checkBox.checked}
|
|
214
|
-
handleChecked={handleCheckedBody}
|
|
215
|
-
disabled={item.checkBox.disabled}
|
|
216
|
-
checkedColor={item.checkBox.checkedColor}
|
|
217
|
-
unCheckedColor={item.checkBox.unCheckedColor}
|
|
218
|
-
/>
|
|
219
|
-
)}
|
|
220
|
-
|
|
221
|
-
<div
|
|
222
|
-
style={{
|
|
223
|
-
flexShrink: 11,
|
|
224
|
-
marginLeft:
|
|
225
|
-
hasOwnerProperty(item, 'contentList') &&
|
|
226
|
-
(!hasOwnerProperty(item, 'hideArrow') || item.hideArrow !== true)
|
|
227
|
-
? hasOwnerProperty(item, 'rightArrow')
|
|
228
|
-
? item.rightArrow === true
|
|
229
|
-
? '0px'
|
|
230
|
-
: '11px'
|
|
231
|
-
: hasOwnerProperty(item, 'closeArrow') || hasOwnerProperty(item, 'openArrow')
|
|
232
|
-
? '11px'
|
|
233
|
-
: '0px'
|
|
234
|
-
: '0px',
|
|
235
|
-
marginRight:
|
|
236
|
-
hasOwnerProperty(item, 'contentList') &&
|
|
237
|
-
(!hasOwnerProperty(item, 'hideArrow') || item.hideArrow !== true)
|
|
238
|
-
? hasOwnerProperty(item, 'rightArrow')
|
|
239
|
-
? item.rightArrow === true
|
|
240
|
-
? '11px'
|
|
241
|
-
: '0px'
|
|
242
|
-
: '0px'
|
|
243
|
-
: '0px',
|
|
244
|
-
}}
|
|
245
|
-
>
|
|
246
|
-
<p
|
|
247
|
-
style={{
|
|
248
|
-
textAlign: tBodyTextAlign,
|
|
249
|
-
margin: '0px',
|
|
250
|
-
cursor:
|
|
251
|
-
hasOwnerProperty(item, 'arrowComponent') || hasOwnerProperty(item, 'dots')
|
|
252
|
-
? 'pointer'
|
|
253
|
-
: 'auto',
|
|
254
|
-
}}
|
|
255
|
-
onClick={
|
|
256
|
-
hasOwnerProperty(item, 'arrowComponent')
|
|
257
|
-
? () => handleCheckArrowAction(item, item.checkIndex)
|
|
258
|
-
: hasOwnerProperty(item, 'dots')
|
|
259
|
-
? (e) => handleCheckDots(e, item, index, innerIndex)
|
|
260
|
-
: (_) => _
|
|
261
|
-
}
|
|
262
|
-
>
|
|
263
|
-
{item.content === 0 ? (
|
|
264
|
-
item.content.toString()
|
|
265
|
-
) : item.content ? (
|
|
266
|
-
item.content
|
|
267
|
-
) : hasOwnerProperty(item, 'arrowComponent') ? (
|
|
268
|
-
item.status === 'close' ? (
|
|
269
|
-
item.closeArrow
|
|
270
|
-
) : (
|
|
271
|
-
item.openArrow
|
|
272
|
-
)
|
|
273
|
-
) : hasOwnerProperty(item, 'dots') ? (
|
|
274
|
-
<span
|
|
275
|
-
style={{
|
|
276
|
-
display: 'block',
|
|
277
|
-
position: 'relative',
|
|
278
|
-
}}
|
|
279
|
-
>
|
|
280
|
-
{item.dotsStatus === 'deActive' ? item.deActiveIcon : item.activeIcon}
|
|
281
|
-
<span
|
|
282
|
-
style={{
|
|
283
|
-
position: 'absolute',
|
|
284
|
-
display: item.dotsStatus === 'deActive' ? 'none' : 'block',
|
|
285
|
-
top: '0px',
|
|
286
|
-
zIndex: 100,
|
|
287
|
-
right: 'calc(100% + 6px)',
|
|
288
|
-
width: '223px',
|
|
289
|
-
height: 'auto',
|
|
290
|
-
overflow: 'auto',
|
|
291
|
-
minHeight: '40px',
|
|
292
|
-
maxHeight: '246px',
|
|
293
|
-
borderRadius: '6px',
|
|
294
|
-
backgroundColor: '#FFFFFF',
|
|
295
|
-
boxShadow: '0px 0px 20px 0px #3C393E4D',
|
|
296
|
-
}}
|
|
297
|
-
>
|
|
298
|
-
{hasOwnerProperty(item, 'options') &&
|
|
299
|
-
item.options.map((optionItem, optionIndex) => {
|
|
300
|
-
return (
|
|
301
|
-
<span
|
|
302
|
-
key={`${optionItem.content}_${optionIndex}`}
|
|
303
|
-
className={styles['dots-option-item']}
|
|
304
|
-
style={{
|
|
305
|
-
color: '#3C393E',
|
|
306
|
-
fontSize: '14px',
|
|
307
|
-
fontFamily: 'Noto Sans Armenian',
|
|
308
|
-
}}
|
|
309
|
-
onClick={() =>
|
|
310
|
-
handleMoreOptions(
|
|
311
|
-
item,
|
|
312
|
-
index,
|
|
313
|
-
optionItem,
|
|
314
|
-
innerIndex,
|
|
315
|
-
optionIndex,
|
|
316
|
-
item.options
|
|
317
|
-
)
|
|
318
|
-
}
|
|
319
|
-
>
|
|
320
|
-
<span
|
|
321
|
-
style={{
|
|
322
|
-
marginRight: '10px',
|
|
323
|
-
}}
|
|
324
|
-
>
|
|
325
|
-
{optionItem.icon}
|
|
326
|
-
</span>
|
|
327
|
-
<span
|
|
328
|
-
style={{
|
|
329
|
-
width: 'calc(100% - 36px)',
|
|
330
|
-
textAlign: 'left',
|
|
331
|
-
overflow: 'hidden',
|
|
332
|
-
whiteSpace: 'nowrap',
|
|
333
|
-
textOverflow: 'ellipsis',
|
|
334
|
-
marginBottom: '5px',
|
|
335
|
-
}}
|
|
336
|
-
title={optionItem.content}
|
|
337
|
-
>
|
|
338
|
-
{optionItem.content === 0
|
|
339
|
-
? optionItem.content.toString()
|
|
340
|
-
: optionItem.content
|
|
341
|
-
? optionItem.content
|
|
342
|
-
: ''}
|
|
343
|
-
</span>
|
|
344
|
-
</span>
|
|
345
|
-
)
|
|
346
|
-
})}
|
|
347
|
-
</span>
|
|
348
|
-
</span>
|
|
349
|
-
) : (
|
|
350
|
-
''
|
|
351
|
-
)}
|
|
352
|
-
</p>
|
|
353
|
-
{hasOwnerProperty(item, 'contentList') && (
|
|
354
|
-
<div
|
|
355
|
-
style={{
|
|
356
|
-
overflow: 'auto',
|
|
357
|
-
marginTop: '10px',
|
|
358
|
-
maxHeight: '500px',
|
|
359
|
-
maxWidth: '100%',
|
|
360
|
-
height: item.status === 'close' ? '0px' : 'auto',
|
|
361
|
-
}}
|
|
362
|
-
>
|
|
363
|
-
{item.contentList.map((innerItem, innerItemIndex) => {
|
|
364
|
-
return (
|
|
365
|
-
<p
|
|
366
|
-
key={`${innerItem}_${innerItemIndex}`}
|
|
367
|
-
className={styles['list-text']}
|
|
368
|
-
style={{
|
|
369
|
-
maxWidth: '100%',
|
|
370
|
-
color: openListColor,
|
|
371
|
-
textAlign: tBodyTextAlign,
|
|
372
|
-
fontSize: openListFontSize,
|
|
373
|
-
fontFamily: openListFontFamily,
|
|
374
|
-
}}
|
|
375
|
-
onClick={(e) =>
|
|
376
|
-
handleContentList(
|
|
377
|
-
e,
|
|
378
|
-
item,
|
|
379
|
-
index,
|
|
380
|
-
innerIndex,
|
|
381
|
-
innerItem.id,
|
|
382
|
-
innerItem.content,
|
|
383
|
-
innerItemIndex
|
|
384
|
-
)
|
|
385
|
-
}
|
|
386
|
-
>
|
|
387
|
-
{innerItem.content === 0
|
|
388
|
-
? innerItem.content.toString()
|
|
389
|
-
: innerItem.content
|
|
390
|
-
? innerItem.content
|
|
391
|
-
: ''}
|
|
392
|
-
</p>
|
|
393
|
-
)
|
|
394
|
-
})}
|
|
395
|
-
</div>
|
|
396
|
-
)}
|
|
397
|
-
</div>
|
|
398
|
-
|
|
399
|
-
{!hasOwnerProperty(item, 'hideArrow') &&
|
|
400
|
-
item.hideArrow !== false &&
|
|
401
|
-
hasOwnerProperty(item, 'rightArrow') &&
|
|
402
|
-
item.rightArrow === true
|
|
403
|
-
? hasOwnerProperty(item, 'contentList') &&
|
|
404
|
-
(hasOwnerProperty(item, 'closeArrow') || hasOwnerProperty(item, 'openArrow')) && (
|
|
405
|
-
<div
|
|
406
|
-
id={item.id}
|
|
407
|
-
style={{
|
|
408
|
-
width: '21px',
|
|
409
|
-
height: '21px',
|
|
410
|
-
cursor: 'pointer',
|
|
411
|
-
}}
|
|
412
|
-
onClick={() => handleOpenCloseRowSingleArrow(index, innerIndex, item)}
|
|
413
|
-
className={styles['td-span']}
|
|
414
|
-
>
|
|
415
|
-
{hasOwnerProperty(item, 'status') && item.status === 'close'
|
|
416
|
-
? item.closeArrow
|
|
417
|
-
: item.openArrow}
|
|
418
|
-
</div>
|
|
419
|
-
)
|
|
420
|
-
: ''}
|
|
421
|
-
</div>
|
|
422
|
-
) : (
|
|
423
|
-
''
|
|
424
|
-
)}
|
|
425
|
-
</td>
|
|
426
|
-
)
|
|
427
|
-
}
|
|
428
|
-
|
|
429
|
-
export default TD
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
/* eslint-disable no-prototype-builtins */
|
|
2
|
-
import React from 'react'
|
|
3
|
-
|
|
4
|
-
import { SingleCheckbox } from './../singleCheckbox'
|
|
5
|
-
|
|
6
|
-
import { hasOwnerProperty } from './../../utils'
|
|
7
|
-
|
|
8
|
-
import styles from './table.module.css'
|
|
9
|
-
|
|
10
|
-
const TH = ({
|
|
11
|
-
item,
|
|
12
|
-
hideBorder,
|
|
13
|
-
tHeadFamily,
|
|
14
|
-
tHeadPadding,
|
|
15
|
-
tHeadFontSize,
|
|
16
|
-
tHeadTextAlign,
|
|
17
|
-
tHeadFontWeight,
|
|
18
|
-
tableColumnMinWidth,
|
|
19
|
-
tableColumnMaxWidth,
|
|
20
|
-
handleCheckedHeader,
|
|
21
|
-
borderTopLeftRadius,
|
|
22
|
-
borderTopRightRadius,
|
|
23
|
-
handleHeaderItemClick,
|
|
24
|
-
handleCheckArrowActionHeader,
|
|
25
|
-
}) => {
|
|
26
|
-
const handleCheckArrowAction = (e, object, property) => {
|
|
27
|
-
if (hasOwnerProperty(object, property)) {
|
|
28
|
-
handleCheckArrowActionHeader(e, object)
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
return (
|
|
33
|
-
<th
|
|
34
|
-
style={{
|
|
35
|
-
width: 'auto',
|
|
36
|
-
cursor: 'pointer',
|
|
37
|
-
position: 'relative',
|
|
38
|
-
padding: tHeadPadding,
|
|
39
|
-
fontSize: tHeadFontSize,
|
|
40
|
-
fontFamily: tHeadFamily,
|
|
41
|
-
fontWeight: tHeadFontWeight,
|
|
42
|
-
minWidth: tableColumnMinWidth,
|
|
43
|
-
maxWidth: tableColumnMaxWidth,
|
|
44
|
-
borderTopLeftRadius: borderTopLeftRadius,
|
|
45
|
-
borderTopRightRadius: borderTopRightRadius,
|
|
46
|
-
borderColor: hideBorder ? 'transparent' : '#eeeeee',
|
|
47
|
-
}}
|
|
48
|
-
onClick={handleHeaderItemClick}
|
|
49
|
-
className={`${
|
|
50
|
-
hasOwnerProperty(item, 'sortingArrows')
|
|
51
|
-
? item.sortingArrows === true
|
|
52
|
-
? styles['sorting-arrows']
|
|
53
|
-
: ''
|
|
54
|
-
: ''
|
|
55
|
-
}`}
|
|
56
|
-
>
|
|
57
|
-
<div
|
|
58
|
-
style={{
|
|
59
|
-
display: 'flex',
|
|
60
|
-
alignItems: 'flex-start',
|
|
61
|
-
justifyContent: hasOwnerProperty(item, 'checkBox')
|
|
62
|
-
? 'space-between'
|
|
63
|
-
: tHeadTextAlign
|
|
64
|
-
? tHeadTextAlign === 'left'
|
|
65
|
-
? 'flex-start'
|
|
66
|
-
: tHeadTextAlign === 'right'
|
|
67
|
-
? 'flex-end'
|
|
68
|
-
: 'center'
|
|
69
|
-
: 'center',
|
|
70
|
-
}}
|
|
71
|
-
>
|
|
72
|
-
{hasOwnerProperty(item, 'checkBox') ? (
|
|
73
|
-
<SingleCheckbox
|
|
74
|
-
data={item}
|
|
75
|
-
checked={item.checkBox.checked}
|
|
76
|
-
disabled={item.checkBox.disabled}
|
|
77
|
-
handleChecked={!item.checkBox.disabled ? handleCheckedHeader : (_) => _}
|
|
78
|
-
checkedColor={item.checkBox.checkedColor ? item.checkBox.checkedColor : ''}
|
|
79
|
-
unCheckedColor={item.checkBox.unCheckedColor ? item.checkBox.unCheckedColor : ''}
|
|
80
|
-
/>
|
|
81
|
-
) : (
|
|
82
|
-
''
|
|
83
|
-
)}
|
|
84
|
-
<p
|
|
85
|
-
style={{
|
|
86
|
-
margin: '0px',
|
|
87
|
-
}}
|
|
88
|
-
onClick={(e) => handleCheckArrowAction(e, item, 'arrowComponent')}
|
|
89
|
-
>
|
|
90
|
-
{item.type === 'show'
|
|
91
|
-
? item.content
|
|
92
|
-
: hasOwnerProperty(item, 'arrowComponent')
|
|
93
|
-
? item.status === 'close'
|
|
94
|
-
? item.closeArrow
|
|
95
|
-
: item.openArrow
|
|
96
|
-
: ''}
|
|
97
|
-
</p>
|
|
98
|
-
</div>
|
|
99
|
-
</th>
|
|
100
|
-
)
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
export default TH
|