imbric-theme 1.0.1 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- package/atoms/Button/Button.js +5 -2
- package/atoms/Input/Input.js +11 -11
- package/atoms/Label/Label.js +3 -2
- package/atoms/Label/Label.module.css +4 -0
- package/atoms/Modal/Modal.module.css +1 -0
- package/layout/DynamicTable/DynamicTable.js +56 -6
- package/molecules/ColumnTable/ColumnTable.module.css +1 -1
- package/molecules/RowTable/RowTable.js +63 -64
- package/package.json +1 -1
package/atoms/Button/Button.js
CHANGED
@@ -25,10 +25,11 @@ export const Button = ({
|
|
25
25
|
onClick,
|
26
26
|
id,
|
27
27
|
getStyles,
|
28
|
+
typeButton,
|
28
29
|
}) => (
|
29
30
|
<button
|
30
|
-
|
31
|
-
type=
|
31
|
+
id={id}
|
32
|
+
type={typeButton}
|
32
33
|
disabled={isMuted}
|
33
34
|
className={getStyles('button', ['type'], {
|
34
35
|
'is-inline': isInline || type === 'tertiary',
|
@@ -68,6 +69,7 @@ Button.propTypes = {
|
|
68
69
|
isFloatRight: PropTypes.bool,
|
69
70
|
isFloatLeft: PropTypes.bool,
|
70
71
|
id: PropTypes.string,
|
72
|
+
typeButton: PropTypes.string,
|
71
73
|
}
|
72
74
|
|
73
75
|
Button.defaultProps = {
|
@@ -78,6 +80,7 @@ Button.defaultProps = {
|
|
78
80
|
isFloatRight: false,
|
79
81
|
isFloatLeft: false,
|
80
82
|
id: '',
|
83
|
+
typeButton: 'submit'
|
81
84
|
}
|
82
85
|
|
83
86
|
export default withStyles(styles)(Button)
|
package/atoms/Input/Input.js
CHANGED
@@ -164,24 +164,24 @@ export const Input = ({
|
|
164
164
|
: isOpenModal
|
165
165
|
|
166
166
|
?
|
167
|
-
<div
|
168
|
-
<div
|
169
|
-
<div style={{ zIndex: 1 }}
|
170
|
-
<div onClick={(op) => onClickModal(op, id)} style={{ height: '36px' }}
|
171
|
-
<div
|
167
|
+
<div className={getStyles('DynamicSelect_dynamic-select__oduOS')}>
|
168
|
+
<div className={getStyles('css-1mfv3n-container')}>
|
169
|
+
<div style={{ zIndex: 1 }} className={getStyles('css-mlo5or-control')}>
|
170
|
+
<div onClick={(op) => onClickModal(op, id)} style={{ height: '36px' }} className={getStyles('css-1huup54-ValueContainer')}>
|
171
|
+
<div className={getStyles('css-qc6sy-singleValue')}>{value}</div>
|
172
172
|
</div>
|
173
|
-
<div
|
173
|
+
<div className={getStyles('css-1hb7zxy-IndicatorsContainer')}>
|
174
174
|
|
175
175
|
|
176
|
-
{value !== '' ? <div onClick={(op) => onClickDeleteInput(op, id)}
|
177
|
-
<svg height="20" width="20" viewBox="0 0 20 20" aria-hidden="true" focusable="false"
|
176
|
+
{value !== '' ? <div onClick={(op) => onClickDeleteInput(op, id)} className={getStyles('css-tlfecz-indicatorContainer')} aria-hidden="true">
|
177
|
+
<svg height="20" width="20" viewBox="0 0 20 20" aria-hidden="true" focusable="false" className={getStyles('css-tj5bde-Svg')} >
|
178
178
|
<path d="M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"></path>
|
179
179
|
</svg>
|
180
180
|
</div> : null}
|
181
|
-
<span
|
181
|
+
<span className={getStyles('css-1okebmr-indicatorSeparator')}>
|
182
182
|
</span>
|
183
|
-
<div onClick={(op) => onClickModal(op, id)}
|
184
|
-
<svg height="20" width="20" viewBox="0 0 20 20" aria-hidden="true" focusable="false"
|
183
|
+
<div onClick={(op) => onClickModal(op, id)} className={getStyles('css-tlfecz-indicatorContainer')} aria-hidden="true">
|
184
|
+
<svg height="20" width="20" viewBox="0 0 20 20" aria-hidden="true" focusable="false" className={getStyles('css-tj5bde-Svg')}>
|
185
185
|
<path
|
186
186
|
fillRule="evenodd"
|
187
187
|
clipRule="evenodd"
|
package/atoms/Label/Label.js
CHANGED
@@ -5,10 +5,10 @@ import styles from './Label.module.css'
|
|
5
5
|
import { options } from './constants'
|
6
6
|
import withStyles from '../../hocs/withStyles'
|
7
7
|
|
8
|
-
export const Label = ({ children, getStyles, isHint }) => {
|
8
|
+
export const Label = ({ children, getStyles, isHint, isPointer, onClick }) => {
|
9
9
|
return (
|
10
10
|
|
11
|
-
<label className={getStyles('label', ['color'], { 'is-hint': isHint })}>{children}</label>
|
11
|
+
<label onClick={onClick} className={getStyles('label', ['color'], { 'is-hint': isHint, 'is-pointer': isPointer })}>{children}</label>
|
12
12
|
|
13
13
|
)
|
14
14
|
}
|
@@ -26,6 +26,7 @@ Label.defaultProps = {
|
|
26
26
|
children: ' ',
|
27
27
|
isHint: false,
|
28
28
|
color: 'label',
|
29
|
+
onClick: () => { },
|
29
30
|
}
|
30
31
|
|
31
32
|
export default withStyles(styles)(Label)
|
@@ -22,6 +22,7 @@ export const DynamicTable = ({
|
|
22
22
|
opColumns,
|
23
23
|
opAddColumns,
|
24
24
|
opFilterTable,
|
25
|
+
opFilterSecondaryTable,
|
25
26
|
isLayoutDate,
|
26
27
|
isViewRange,
|
27
28
|
isViewRangeSecundary,
|
@@ -29,6 +30,7 @@ export const DynamicTable = ({
|
|
29
30
|
isViewTitleTableSecundary,
|
30
31
|
isViewAddColumn,
|
31
32
|
isViewFilterTable,
|
33
|
+
isViewFilterSecondaryTable,
|
32
34
|
isViewBtn,
|
33
35
|
isViewLeftBtn,
|
34
36
|
isViewLeftBtnSecondary,
|
@@ -45,17 +47,22 @@ export const DynamicTable = ({
|
|
45
47
|
handleBtnTertiary,
|
46
48
|
handleAddColumn,
|
47
49
|
handleFilterTable,
|
50
|
+
handleFilterSecondaryTable,
|
48
51
|
handleSelectRange,
|
49
52
|
handleSelectRangeSecundary,
|
50
53
|
handleDownloadExcel,
|
51
54
|
handleDefaultValue,
|
52
55
|
handleDefaultValueFilter,
|
56
|
+
handleDefaultValueFilterSecondary,
|
53
57
|
labelDinamicSelect,
|
54
58
|
placeholderDinamicSelect,
|
55
59
|
isLoadingDinamicSelect,
|
56
60
|
labelDinamicSelectFilter,
|
57
61
|
placeholderDinamicSelectFilter,
|
58
62
|
isLoadingDinamicSelectFilter,
|
63
|
+
labelDinamicSelectFilterSecondary,
|
64
|
+
placeholderDinamicSelectFilterSecondary,
|
65
|
+
isLoadingDinamicSelectFilterSecondary,
|
59
66
|
labelSinceDateRange,
|
60
67
|
labelTillDateRange,
|
61
68
|
labelSinceDateRangeSecundary,
|
@@ -66,10 +73,11 @@ export const DynamicTable = ({
|
|
66
73
|
handleChangeCheckboxDate,
|
67
74
|
}) => {
|
68
75
|
|
69
|
-
const [tableData, setTableData] = useState(optionsData)
|
70
|
-
const [columnsData, setColumnsData] = useState(opColumns)
|
71
|
-
const [addColumsData, setAddColumsData] = useState(opAddColumns)
|
72
|
-
const [filterTableData, setFilterTableData] = useState(opFilterTable)
|
76
|
+
const [tableData, setTableData] = useState(optionsData)
|
77
|
+
const [columnsData, setColumnsData] = useState(opColumns)
|
78
|
+
const [addColumsData, setAddColumsData] = useState(opAddColumns)
|
79
|
+
const [filterTableData, setFilterTableData] = useState(opFilterTable)
|
80
|
+
const [filterSecondaryTableData, setFilterSecondaryTableData] = useState(opFilterSecondaryTable)
|
73
81
|
|
74
82
|
|
75
83
|
// STATE TOOLTIP
|
@@ -155,7 +163,7 @@ export const DynamicTable = ({
|
|
155
163
|
|
156
164
|
<>
|
157
165
|
|
158
|
-
|
166
|
+
|
159
167
|
<div className={getStyles('opFunctionBox3')}>
|
160
168
|
|
161
169
|
<Button
|
@@ -176,7 +184,6 @@ export const DynamicTable = ({
|
|
176
184
|
{isViewLeftBtnSecondary ? (
|
177
185
|
|
178
186
|
<>
|
179
|
-
|
180
187
|
<div className={getStyles('opFunctionBox3')}>
|
181
188
|
|
182
189
|
<Button
|
@@ -188,6 +195,9 @@ export const DynamicTable = ({
|
|
188
195
|
</Button>
|
189
196
|
|
190
197
|
</div>
|
198
|
+
|
199
|
+
<Horizontal size="sm" />
|
200
|
+
|
191
201
|
</>
|
192
202
|
) : null}
|
193
203
|
|
@@ -195,6 +205,8 @@ export const DynamicTable = ({
|
|
195
205
|
|
196
206
|
<>
|
197
207
|
|
208
|
+
<Horizontal size="sm" />
|
209
|
+
|
198
210
|
<div className={getStyles('opFunctionBox3')}>
|
199
211
|
|
200
212
|
<Button
|
@@ -284,6 +296,36 @@ export const DynamicTable = ({
|
|
284
296
|
</>
|
285
297
|
) : null}
|
286
298
|
|
299
|
+
|
300
|
+
{isViewFilterSecondaryTable ? (
|
301
|
+
|
302
|
+
<>
|
303
|
+
<div className={getStyles('opFunctionBox3')}>
|
304
|
+
<Label>{labelDinamicSelectFilterSecondary}</Label>
|
305
|
+
|
306
|
+
{isLoadingDinamicSelectFilterSecondary ?
|
307
|
+
<DynamicSelect
|
308
|
+
isInline
|
309
|
+
onChange={handleFilterSecondaryTable}
|
310
|
+
optionsSelect={filterSecondaryTableData}
|
311
|
+
placeholder={placeholderDinamicSelectFilterSecondary}
|
312
|
+
defaultValue={handleDefaultValueFilterSecondary}
|
313
|
+
closeMenuOnSelect={false}
|
314
|
+
isClearable={false}
|
315
|
+
instanceId={'idFilterSecondaryTableAll'}
|
316
|
+
// defaultValue= { [{value: 'id', label: 'ID'}, {value: 'idService', label: 'ID Reserva'}] }
|
317
|
+
/> : null
|
318
|
+
}
|
319
|
+
|
320
|
+
</div>
|
321
|
+
|
322
|
+
<Horizontal size="xs" />
|
323
|
+
|
324
|
+
</>
|
325
|
+
) : null}
|
326
|
+
|
327
|
+
|
328
|
+
|
287
329
|
{isViewAddColumn ? (
|
288
330
|
|
289
331
|
<>
|
@@ -389,12 +431,14 @@ DynamicTable.propTypes = {
|
|
389
431
|
isViewTitleTableSecundary: PropTypes.bool,
|
390
432
|
isViewAddColumn: PropTypes.bool,
|
391
433
|
isViewFilterTable: PropTypes.bool,
|
434
|
+
isViewFilterSecondaryTable: PropTypes.bool,
|
392
435
|
isViewDownloadDoc: PropTypes.bool,
|
393
436
|
isViewBtn: PropTypes.bool,
|
394
437
|
isViewLeftBtn: PropTypes.bool,
|
395
438
|
onChangeInput: PropTypes.func,
|
396
439
|
handleAddColumn: PropTypes.func,
|
397
440
|
handleFilterTable: PropTypes.func,
|
441
|
+
handleFilterSecondaryTable: PropTypes.func,
|
398
442
|
isError: PropTypes.string,
|
399
443
|
isLayoutDate: PropTypes.string,
|
400
444
|
handleSelectRange: PropTypes.func,
|
@@ -403,7 +447,9 @@ DynamicTable.propTypes = {
|
|
403
447
|
labelDinamicSelect: PropTypes.string,
|
404
448
|
placeholderDinamicSelect: PropTypes.string,
|
405
449
|
labelDinamicSelectFilter: PropTypes.string,
|
450
|
+
labelDinamicSelectFilterSecondary: PropTypes.string,
|
406
451
|
placeholderDinamicSelectFilter: PropTypes.string,
|
452
|
+
placeholderDinamicSelectFilterSecondary: PropTypes.string,
|
407
453
|
labelSinceDateRange: PropTypes.string,
|
408
454
|
labelTillDateRange: PropTypes.string,
|
409
455
|
labelSinceDateRangeSecundary: PropTypes.string,
|
@@ -428,12 +474,14 @@ DynamicTable.defaultProps = {
|
|
428
474
|
getStyles: () => { },
|
429
475
|
handleAddColumn: () => { },
|
430
476
|
handleFilterTable: () => { },
|
477
|
+
handleFilterSecondaryTable: () => { },
|
431
478
|
isViewRange: true,
|
432
479
|
isViewRangeSecundary: false,
|
433
480
|
isViewTitleTable: false,
|
434
481
|
isViewTitleTableSecundary: false,
|
435
482
|
isViewAddColumn: true,
|
436
483
|
isViewFilterTable: false,
|
484
|
+
isViewFilterSecondaryTable: false,
|
437
485
|
isViewDownloadDoc: true,
|
438
486
|
isViewBtn: false,
|
439
487
|
isViewLeftBtn: false,
|
@@ -445,6 +493,8 @@ DynamicTable.defaultProps = {
|
|
445
493
|
placeholderDinamicSelect: 'Seleccionar columnas',
|
446
494
|
labelDinamicSelectFilter: '',
|
447
495
|
placeholderDinamicSelectFilter: '',
|
496
|
+
labelDinamicSelectFilterSecondary: '',
|
497
|
+
placeholderDinamicSelectFilterSecondary: '',
|
448
498
|
labelSinceDateRange: 'Desde',
|
449
499
|
labelTillDateRange: 'Hasta',
|
450
500
|
labelSinceDateRangeSecundary: 'Desde',
|
@@ -44,6 +44,7 @@ export const RowTable = ({
|
|
44
44
|
txtTootipIconLink,
|
45
45
|
txtTootipIconClone,
|
46
46
|
txtTootipIconCheckbox,
|
47
|
+
onClickCheckboxRow
|
47
48
|
}) => {
|
48
49
|
|
49
50
|
|
@@ -201,8 +202,8 @@ export const RowTable = ({
|
|
201
202
|
id={'idToggle' + item.id}
|
202
203
|
checked={item.isSelected}
|
203
204
|
label=""
|
204
|
-
disabled={
|
205
|
-
onChangeCheckbox={(e) => { handleClickCheckbox(e, item) }}
|
205
|
+
disabled={itemTd.disabled}
|
206
|
+
onChangeCheckbox={(e) => { handleClickCheckbox(e, item), onClickCheckboxRow(e, item) }}
|
206
207
|
/>
|
207
208
|
|
208
209
|
</td>
|
@@ -553,68 +554,6 @@ export const RowTable = ({
|
|
553
554
|
|
554
555
|
: null}
|
555
556
|
|
556
|
-
{itemTd.viewTrash ?
|
557
|
-
|
558
|
-
item.viewTrash === undefined ?
|
559
|
-
|
560
|
-
<>
|
561
|
-
<span
|
562
|
-
data-tip
|
563
|
-
data-for='trash'
|
564
|
-
onMouseEnter={handleMouseEnter}
|
565
|
-
onMouseLeave={handleMouseLeave}
|
566
|
-
>
|
567
|
-
<>
|
568
|
-
<Icon
|
569
|
-
background="base"
|
570
|
-
name="trash"
|
571
|
-
onClick={e => { onClickActionDelete(e, item) }}
|
572
|
-
/>
|
573
|
-
<Horizontal size="xs" />
|
574
|
-
</>
|
575
|
-
|
576
|
-
</span>
|
577
|
-
|
578
|
-
{isToolTipMounted ? (
|
579
|
-
<ReactTooltip id='trash' type='error'>
|
580
|
-
<span>{txtTootipIconDelete}</span>
|
581
|
-
</ReactTooltip>
|
582
|
-
) : null}
|
583
|
-
</>
|
584
|
-
|
585
|
-
:
|
586
|
-
|
587
|
-
item.viewTrash ?
|
588
|
-
|
589
|
-
<>
|
590
|
-
<span
|
591
|
-
data-tip
|
592
|
-
data-for='trash'
|
593
|
-
onMouseEnter={handleMouseEnter}
|
594
|
-
onMouseLeave={handleMouseLeave}
|
595
|
-
>
|
596
|
-
<>
|
597
|
-
<Icon
|
598
|
-
background="base"
|
599
|
-
name="trash"
|
600
|
-
onClick={e => { onClickActionDelete(e, item) }}
|
601
|
-
/>
|
602
|
-
<Horizontal size="xs" />
|
603
|
-
</>
|
604
|
-
|
605
|
-
</span>
|
606
|
-
|
607
|
-
{isToolTipMounted ? (
|
608
|
-
<ReactTooltip id='trash' type='error'>
|
609
|
-
<span>{txtTootipIconDelete}</span>
|
610
|
-
</ReactTooltip>
|
611
|
-
) : null}
|
612
|
-
</>
|
613
|
-
|
614
|
-
: null
|
615
|
-
|
616
|
-
: null}
|
617
|
-
|
618
557
|
|
619
558
|
{itemTd.viewLink ?
|
620
559
|
|
@@ -944,7 +883,67 @@ export const RowTable = ({
|
|
944
883
|
: null}
|
945
884
|
|
946
885
|
|
886
|
+
{itemTd.viewTrash ?
|
887
|
+
|
888
|
+
item.viewTrash === undefined ?
|
889
|
+
|
890
|
+
<>
|
891
|
+
<span
|
892
|
+
data-tip
|
893
|
+
data-for='trash'
|
894
|
+
onMouseEnter={handleMouseEnter}
|
895
|
+
onMouseLeave={handleMouseLeave}
|
896
|
+
>
|
897
|
+
<>
|
898
|
+
<Icon
|
899
|
+
background="base"
|
900
|
+
name="trash"
|
901
|
+
onClick={e => { onClickActionDelete(e, item) }}
|
902
|
+
/>
|
903
|
+
<Horizontal size="xs" />
|
904
|
+
</>
|
905
|
+
|
906
|
+
</span>
|
907
|
+
|
908
|
+
{isToolTipMounted ? (
|
909
|
+
<ReactTooltip id='trash' type='error'>
|
910
|
+
<span>{txtTootipIconDelete}</span>
|
911
|
+
</ReactTooltip>
|
912
|
+
) : null}
|
913
|
+
</>
|
914
|
+
|
915
|
+
:
|
947
916
|
|
917
|
+
item.viewTrash ?
|
918
|
+
|
919
|
+
<>
|
920
|
+
<span
|
921
|
+
data-tip
|
922
|
+
data-for='trash'
|
923
|
+
onMouseEnter={handleMouseEnter}
|
924
|
+
onMouseLeave={handleMouseLeave}
|
925
|
+
>
|
926
|
+
<>
|
927
|
+
<Icon
|
928
|
+
background="base"
|
929
|
+
name="trash"
|
930
|
+
onClick={e => { onClickActionDelete(e, item) }}
|
931
|
+
/>
|
932
|
+
<Horizontal size="xs" />
|
933
|
+
</>
|
934
|
+
|
935
|
+
</span>
|
936
|
+
|
937
|
+
{isToolTipMounted ? (
|
938
|
+
<ReactTooltip id='trash' type='error'>
|
939
|
+
<span>{txtTootipIconDelete}</span>
|
940
|
+
</ReactTooltip>
|
941
|
+
) : null}
|
942
|
+
</>
|
943
|
+
|
944
|
+
: null
|
945
|
+
|
946
|
+
: null}
|
948
947
|
|
949
948
|
|
950
949
|
|