plataforma-fundacao-componentes 2.22.9 → 2.22.14
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/assets/icons/FilterIcon.d.ts +3 -0
- package/dist/components/checkbox/Checkbox.d.ts +1 -0
- package/dist/components/dropdownItem/DropdownItem.d.ts +2 -2
- package/dist/components/dropdownMenu/DropdownMenu.d.ts +1 -1
- package/dist/components/dropdownMenu/DropdownMenu.stories.d.ts +8 -6
- package/dist/components/table/components/TableUpperHeader/TableUpperHeader.d.ts +10 -4
- package/dist/components/tableWithOverflow/TableWithOverflow.d.ts +1 -1
- package/dist/components/tableWithOverflow/TableWithOverflow.stories.d.ts +1 -0
- package/dist/hooks/useDraggableScroll/useDraggableScroll.d.ts +3 -1
- package/dist/index.css +19 -15
- package/dist/index.js +111 -76
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +111 -76
- package/dist/index.modern.js.map +1 -1
- package/dist/utils/ArrayUtils.d.ts +17 -0
- package/package.json +11 -8
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import DropdownMenu from './DropdownMenu';
|
|
3
|
+
declare const _default: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof DropdownMenu;
|
|
6
|
+
};
|
|
5
7
|
export default _default;
|
|
6
|
-
export
|
|
7
|
-
|
|
8
|
+
export declare const Example: () => JSX.Element;
|
|
9
|
+
export declare const Oversized: () => JSX.Element;
|
|
@@ -1,17 +1,23 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { DropdownMenuProps } from '../../../dropdownMenu/DropdownMenu';
|
|
2
3
|
import './TableUpperHeader.scss';
|
|
3
|
-
|
|
4
|
+
interface upperHeaderButtonType {
|
|
5
|
+
type: 'Button';
|
|
4
6
|
id?: string;
|
|
5
7
|
onClick?: () => void;
|
|
6
8
|
label?: string;
|
|
7
9
|
leftIcon?: JSX.Element | React.ReactNode;
|
|
8
10
|
rightIcon?: JSX.Element | React.ReactNode;
|
|
9
11
|
disabled?: boolean;
|
|
10
|
-
}
|
|
12
|
+
}
|
|
13
|
+
export interface upperHeaderDropdownMenuType extends DropdownMenuProps {
|
|
14
|
+
type: 'DropdownMenu';
|
|
15
|
+
children: upperHeaderButtonType;
|
|
16
|
+
}
|
|
11
17
|
export interface TableUpperHeaderProps {
|
|
12
18
|
active?: boolean;
|
|
13
|
-
leftContent?: upperHeaderButtonType[];
|
|
14
|
-
rightContent?: upperHeaderButtonType[];
|
|
19
|
+
leftContent?: (upperHeaderButtonType | upperHeaderDropdownMenuType)[];
|
|
20
|
+
rightContent?: (upperHeaderButtonType | upperHeaderDropdownMenuType)[];
|
|
15
21
|
}
|
|
16
22
|
declare function TableUpperHeader(props: TableUpperHeaderProps): JSX.Element;
|
|
17
23
|
declare const _default: React.MemoExoticComponent<typeof TableUpperHeader>;
|
|
@@ -4,7 +4,7 @@ import './TableWithOverflow.scss';
|
|
|
4
4
|
interface TableCell extends React.HTMLAttributes<HTMLTableCellElement> {
|
|
5
5
|
align?: 'left' | 'center' | 'right' | 'justify' | 'char';
|
|
6
6
|
}
|
|
7
|
-
declare type ColumnObject = {
|
|
7
|
+
export declare type ColumnObject = {
|
|
8
8
|
key: string;
|
|
9
9
|
props?: TableCell;
|
|
10
10
|
value: any;
|
|
@@ -1,2 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
export default function useDraggableScroll<T extends HTMLElement>(reference: React.RefObject<T
|
|
2
|
+
export default function useDraggableScroll<T extends HTMLElement>(reference: React.RefObject<T>, options?: {
|
|
3
|
+
mouseDownCondition: (target: HTMLElement) => boolean;
|
|
4
|
+
}): void;
|
package/dist/index.css
CHANGED
|
@@ -3861,12 +3861,12 @@ h5 {
|
|
|
3861
3861
|
justify-content: center;
|
|
3862
3862
|
align-items: center;
|
|
3863
3863
|
transition: background-color 0.3s ease, opacity 0.3s ease; }
|
|
3864
|
-
.component-checkbox:not(:disabled) {
|
|
3864
|
+
.component-checkbox:not(:disabled), .component-checkbox:not(.component-checkbox[aria-disabled='true']) {
|
|
3865
3865
|
cursor: pointer; }
|
|
3866
3866
|
.component-checkbox:focus {
|
|
3867
3867
|
outline: none; }
|
|
3868
3868
|
|
|
3869
|
-
.component-checkbox-primary:disabled {
|
|
3869
|
+
.component-checkbox-primary:disabled, .component-checkbox-primary[aria-disabled='true'] {
|
|
3870
3870
|
opacity: 0.6; }
|
|
3871
3871
|
|
|
3872
3872
|
.component-checkbox-primary.component-checkbox-not {
|
|
@@ -3875,7 +3875,7 @@ h5 {
|
|
|
3875
3875
|
.component-checkbox-primary.component-checkbox-checked {
|
|
3876
3876
|
background-color: #3fa110; }
|
|
3877
3877
|
|
|
3878
|
-
.component-checkbox-dark:disabled {
|
|
3878
|
+
.component-checkbox-dark:disabled, .component-checkbox-dark[aria-disabled='true'] {
|
|
3879
3879
|
opacity: 0.6; }
|
|
3880
3880
|
|
|
3881
3881
|
.component-checkbox-dark.component-checkbox-not {
|
|
@@ -3884,7 +3884,7 @@ h5 {
|
|
|
3884
3884
|
.component-checkbox-dark.component-checkbox-checked {
|
|
3885
3885
|
background-color: #323c32; }
|
|
3886
3886
|
|
|
3887
|
-
.component-checkbox-blue:disabled {
|
|
3887
|
+
.component-checkbox-blue:disabled, .component-checkbox-blue[aria-disabled='true'] {
|
|
3888
3888
|
opacity: 0.6; }
|
|
3889
3889
|
|
|
3890
3890
|
.component-checkbox-blue.component-checkbox-not {
|
|
@@ -3904,9 +3904,9 @@ h5 {
|
|
|
3904
3904
|
height: 10px;
|
|
3905
3905
|
background-color: rgba(0, 0, 0, 0);
|
|
3906
3906
|
transition: background-color 0.3s ease; }
|
|
3907
|
-
.component-checkbox-classic:disabled {
|
|
3907
|
+
.component-checkbox-classic:disabled, .component-checkbox-classic[aria-disabled='true'] {
|
|
3908
3908
|
border-color: #828a82; }
|
|
3909
|
-
.component-checkbox-classic:disabled.component-checkbox-checked::after {
|
|
3909
|
+
.component-checkbox-classic:disabled.component-checkbox-checked::after, .component-checkbox-classic[aria-disabled='true'].component-checkbox-checked::after {
|
|
3910
3910
|
background-color: #828a82; }
|
|
3911
3911
|
.component-checkbox-classic.component-checkbox-checked::after {
|
|
3912
3912
|
background-color: #3fa110; }
|
|
@@ -7876,7 +7876,9 @@ h5 {
|
|
|
7876
7876
|
background-color: #fefefe;
|
|
7877
7877
|
position: fixed;
|
|
7878
7878
|
border-radius: 8px;
|
|
7879
|
-
box-shadow: 0 1px 2px 0 rgba(90, 100, 90, 0.3);
|
|
7879
|
+
box-shadow: 0 1px 2px 0 rgba(90, 100, 90, 0.3);
|
|
7880
|
+
overflow: overlay;
|
|
7881
|
+
max-height: calc(49% - 46px); }
|
|
7880
7882
|
|
|
7881
7883
|
.component-dropdown-menu-panel-fade-enter {
|
|
7882
7884
|
transition: transform 0.3s ease, opacity 0.3s ease;
|
|
@@ -15248,7 +15250,7 @@ h5 {
|
|
|
15248
15250
|
background-color: #cdd3cd;
|
|
15249
15251
|
color: #828a82;
|
|
15250
15252
|
border-color: #828a82; }
|
|
15251
|
-
.component-upper-header-table
|
|
15253
|
+
.component-upper-header-table .component-upper-header-table-btn {
|
|
15252
15254
|
font-size: 16px;
|
|
15253
15255
|
color: #828a82;
|
|
15254
15256
|
border-color: #828a82;
|
|
@@ -15261,26 +15263,26 @@ h5 {
|
|
|
15261
15263
|
align-items: center;
|
|
15262
15264
|
justify-content: flex-start;
|
|
15263
15265
|
background-color: rgba(0, 0, 0, 0); }
|
|
15264
|
-
.component-upper-header-table
|
|
15266
|
+
.component-upper-header-table .component-upper-header-table-btn:not(:disabled) {
|
|
15265
15267
|
cursor: pointer; }
|
|
15266
|
-
.component-upper-header-table
|
|
15268
|
+
.component-upper-header-table .component-upper-header-table-btn:not(:disabled):active {
|
|
15267
15269
|
transform: scale(0.95, 0.9); }
|
|
15268
|
-
.component-upper-header-table
|
|
15270
|
+
.component-upper-header-table .component-upper-header-table-btn span {
|
|
15269
15271
|
display: flex;
|
|
15270
15272
|
align-items: center;
|
|
15271
15273
|
justify-content: center; }
|
|
15272
|
-
.component-upper-header-table
|
|
15274
|
+
.component-upper-header-table .component-upper-header-table-btn span:first-child {
|
|
15273
15275
|
padding-right: 8px; }
|
|
15274
|
-
.component-upper-header-table
|
|
15276
|
+
.component-upper-header-table .component-upper-header-table-btn span:last-child {
|
|
15275
15277
|
padding-left: 8px; }
|
|
15276
|
-
.component-upper-header-table
|
|
15278
|
+
.component-upper-header-table .component-upper-header-table-btn span svg {
|
|
15277
15279
|
max-width: 20px !important;
|
|
15278
15280
|
max-height: 20px !important; }
|
|
15279
15281
|
.component-upper-header-table.active {
|
|
15280
15282
|
background-color: #d7e6c8;
|
|
15281
15283
|
color: #3fa110;
|
|
15282
15284
|
border-color: #3fa110; }
|
|
15283
|
-
.component-upper-header-table.active
|
|
15285
|
+
.component-upper-header-table.active .component-upper-header-table-btn:not(:disabled) {
|
|
15284
15286
|
background-color: #d7e6c8;
|
|
15285
15287
|
color: #3fa110; }
|
|
15286
15288
|
.component-upper-header-table .component-upper-header-table-left {
|
|
@@ -15502,6 +15504,7 @@ tr:first-child th:last-child {
|
|
|
15502
15504
|
align-items: center;
|
|
15503
15505
|
justify-content: center; }
|
|
15504
15506
|
@media screen and (min-width: 767.98px) {
|
|
15507
|
+
.component-table-with-overflow .component-table-with-overflow-wrapper th[data-draggable='true'],
|
|
15505
15508
|
.component-table-with-overflow .component-table-with-overflow-wrapper td[data-draggable='true'] {
|
|
15506
15509
|
-webkit-user-select: none;
|
|
15507
15510
|
-moz-user-select: none;
|
|
@@ -15509,6 +15512,7 @@ tr:first-child th:last-child {
|
|
|
15509
15512
|
user-select: none;
|
|
15510
15513
|
cursor: -webkit-grab;
|
|
15511
15514
|
cursor: grab; }
|
|
15515
|
+
.component-table-with-overflow .component-table-with-overflow-wrapper table:active th[data-draggable='true'],
|
|
15512
15516
|
.component-table-with-overflow .component-table-with-overflow-wrapper table:active td[data-draggable='true'] {
|
|
15513
15517
|
cursor: -webkit-grabbing !important;
|
|
15514
15518
|
cursor: grabbing !important; }
|
package/dist/index.js
CHANGED
|
@@ -1336,26 +1336,32 @@ var TrashIcon = function TrashIcon() {
|
|
|
1336
1336
|
|
|
1337
1337
|
var rootClassName$s = 'component-checkbox';
|
|
1338
1338
|
function Checkbox(props) {
|
|
1339
|
-
var
|
|
1340
|
-
|
|
1341
|
-
props.onChange
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1339
|
+
var fProps = React.useMemo(function () {
|
|
1340
|
+
var handleClick = function handleClick(evt) {
|
|
1341
|
+
if (typeof props.onChange === 'function' && !props.disabled) {
|
|
1342
|
+
props.onChange(!props.value);
|
|
1343
|
+
evt.stopPropagation();
|
|
1344
|
+
}
|
|
1345
|
+
};
|
|
1345
1346
|
|
|
1346
|
-
var getProps = function getProps() {
|
|
1347
1347
|
var p = _extends({}, props, {
|
|
1348
1348
|
className: getMergedClassNames([rootClassName$s, rootClassName$s + "-" + props.theme, rootClassName$s + "-" + (props.value ? 'checked' : 'not')]),
|
|
1349
|
+
'aria-disabled': props.disabled || props['aria-disabled'],
|
|
1349
1350
|
onClick: handleClick
|
|
1350
1351
|
});
|
|
1351
1352
|
|
|
1352
1353
|
delete p.value;
|
|
1354
|
+
delete p.tag;
|
|
1353
1355
|
delete p.onChange;
|
|
1354
1356
|
delete p.theme;
|
|
1355
1357
|
return p;
|
|
1356
|
-
};
|
|
1358
|
+
}, [props]);
|
|
1357
1359
|
|
|
1358
|
-
|
|
1360
|
+
if (props.tag === 'div') {
|
|
1361
|
+
return React__default.createElement("div", Object.assign({}, fProps));
|
|
1362
|
+
}
|
|
1363
|
+
|
|
1364
|
+
return React__default.createElement("button", Object.assign({}, fProps));
|
|
1359
1365
|
}
|
|
1360
1366
|
Checkbox.defaultProps = {
|
|
1361
1367
|
disabled: false,
|
|
@@ -4396,6 +4402,7 @@ function DropdownItem(props) {
|
|
|
4396
4402
|
return React__default.createElement("button", {
|
|
4397
4403
|
id: props.id,
|
|
4398
4404
|
disabled: props.disabled,
|
|
4405
|
+
"aria-disabled": props.disabled,
|
|
4399
4406
|
className: getMergedClassNames([rootClassName$R, props.alignRight ? 'align-right' : '']),
|
|
4400
4407
|
onClick: function onClick(evt) {
|
|
4401
4408
|
if (typeof props.onClick === 'function' && !props.disabled) {
|
|
@@ -4444,19 +4451,19 @@ function DropdownMenu(props) {
|
|
|
4444
4451
|
var windowWidth = window.innerWidth;
|
|
4445
4452
|
|
|
4446
4453
|
if (pontoCentralX < windowWidth / 2) {
|
|
4454
|
+
painel.style.left = bound.x + "px";
|
|
4455
|
+
|
|
4447
4456
|
if (pontoCentralY < windowHeight / 2) {
|
|
4448
|
-
painel.style.left = bound.x + "px";
|
|
4449
4457
|
painel.style.top = bound.y + bound.height + "px";
|
|
4450
4458
|
} else {
|
|
4451
|
-
painel.style.left = bound.x + "px";
|
|
4452
4459
|
painel.style.top = bound.y - painel.getBoundingClientRect().height + "px";
|
|
4453
4460
|
}
|
|
4454
4461
|
} else {
|
|
4462
|
+
painel.style.right = windowWidth - bound.x - bound.width + "px";
|
|
4463
|
+
|
|
4455
4464
|
if (pontoCentralY < windowHeight / 2) {
|
|
4456
|
-
painel.style.right = windowWidth - bound.x - bound.width + "px";
|
|
4457
4465
|
painel.style.top = bound.y + bound.height + "px";
|
|
4458
4466
|
} else {
|
|
4459
|
-
painel.style.right = windowWidth - bound.x - bound.width + "px";
|
|
4460
4467
|
painel.style.top = bound.y - painel.getBoundingClientRect().height + "px";
|
|
4461
4468
|
}
|
|
4462
4469
|
}
|
|
@@ -4486,7 +4493,7 @@ function DropdownMenu(props) {
|
|
|
4486
4493
|
var deveFechar = true;
|
|
4487
4494
|
|
|
4488
4495
|
while (aux && aux.id !== 'root') {
|
|
4489
|
-
if (aux && aux.id && aux.id === id && aux.classList.contains(
|
|
4496
|
+
if (aux && aux.id && aux.id === id && aux.classList.contains(rootClassName$S)) {
|
|
4490
4497
|
deveFechar = false;
|
|
4491
4498
|
break;
|
|
4492
4499
|
}
|
|
@@ -4550,7 +4557,7 @@ function DropdownMenu(props) {
|
|
|
4550
4557
|
classNames: rootClassName$S + "-panel-fade",
|
|
4551
4558
|
unmountOnExit: true
|
|
4552
4559
|
}, React__default.createElement("div", {
|
|
4553
|
-
className: rootClassName$S + "-panel"
|
|
4560
|
+
className: rootClassName$S + "-panel scroll-white"
|
|
4554
4561
|
}, props.content)));
|
|
4555
4562
|
}
|
|
4556
4563
|
DropdownMenu.defaultProps = {
|
|
@@ -9757,7 +9764,7 @@ var CircleArrowLeft = function CircleArrowLeft() {
|
|
|
9757
9764
|
}))));
|
|
9758
9765
|
};
|
|
9759
9766
|
|
|
9760
|
-
function useDraggableScroll(reference) {
|
|
9767
|
+
function useDraggableScroll(reference, options) {
|
|
9761
9768
|
React.useEffect(function () {
|
|
9762
9769
|
var element = reference.current;
|
|
9763
9770
|
var pos = {
|
|
@@ -9767,6 +9774,10 @@ function useDraggableScroll(reference) {
|
|
|
9767
9774
|
var moving = false;
|
|
9768
9775
|
|
|
9769
9776
|
var mouseDownHandler = function mouseDownHandler(evt) {
|
|
9777
|
+
if (options && typeof options.mouseDownCondition === 'function' && !options.mouseDownCondition(evt.target)) {
|
|
9778
|
+
return;
|
|
9779
|
+
}
|
|
9780
|
+
|
|
9770
9781
|
if (evt.button === 0 && (element === null || element === void 0 ? void 0 : element.scrollWidth) > (element === null || element === void 0 ? void 0 : element.clientWidth)) {
|
|
9771
9782
|
moving = true;
|
|
9772
9783
|
pos = {
|
|
@@ -9799,6 +9810,58 @@ function useDraggableScroll(reference) {
|
|
|
9799
9810
|
}, [reference]);
|
|
9800
9811
|
}
|
|
9801
9812
|
|
|
9813
|
+
var ScreenSize;
|
|
9814
|
+
|
|
9815
|
+
(function (ScreenSize) {
|
|
9816
|
+
ScreenSize["xs"] = "xs";
|
|
9817
|
+
ScreenSize["sm"] = "sm";
|
|
9818
|
+
ScreenSize["md"] = "md";
|
|
9819
|
+
ScreenSize["lg"] = "lg";
|
|
9820
|
+
ScreenSize["xl"] = "xl";
|
|
9821
|
+
})(ScreenSize || (ScreenSize = {}));
|
|
9822
|
+
|
|
9823
|
+
function useScreenSize() {
|
|
9824
|
+
var _useState = React.useState(),
|
|
9825
|
+
value = _useState[0],
|
|
9826
|
+
setValue = _useState[1];
|
|
9827
|
+
|
|
9828
|
+
var valueRef = React.useRef(value);
|
|
9829
|
+
valueRef.current = value;
|
|
9830
|
+
|
|
9831
|
+
var f = function f() {
|
|
9832
|
+
if (window.innerWidth <= 575.98) {
|
|
9833
|
+
if (valueRef.current !== ScreenSize.xs) {
|
|
9834
|
+
setValue(ScreenSize.xs);
|
|
9835
|
+
}
|
|
9836
|
+
} else if (window.innerWidth <= 767.98) {
|
|
9837
|
+
if (valueRef.current !== ScreenSize.sm) {
|
|
9838
|
+
setValue(ScreenSize.sm);
|
|
9839
|
+
}
|
|
9840
|
+
} else if (window.innerWidth <= 991.98) {
|
|
9841
|
+
if (valueRef.current !== ScreenSize.md) {
|
|
9842
|
+
setValue(ScreenSize.md);
|
|
9843
|
+
}
|
|
9844
|
+
} else if (window.innerWidth <= 1199.98) {
|
|
9845
|
+
if (valueRef.current !== ScreenSize.lg) {
|
|
9846
|
+
setValue(ScreenSize.lg);
|
|
9847
|
+
}
|
|
9848
|
+
} else if (window.innerWidth > 1199.98) {
|
|
9849
|
+
if (valueRef.current !== ScreenSize.xl) {
|
|
9850
|
+
setValue(ScreenSize.xl);
|
|
9851
|
+
}
|
|
9852
|
+
}
|
|
9853
|
+
};
|
|
9854
|
+
|
|
9855
|
+
React.useLayoutEffect(function () {
|
|
9856
|
+
f();
|
|
9857
|
+
window.addEventListener('resize', f);
|
|
9858
|
+
return function () {
|
|
9859
|
+
window.removeEventListener('resize', f);
|
|
9860
|
+
};
|
|
9861
|
+
}, []);
|
|
9862
|
+
return value;
|
|
9863
|
+
}
|
|
9864
|
+
|
|
9802
9865
|
var rootClassName$1A = 'component-upper-header-table';
|
|
9803
9866
|
|
|
9804
9867
|
function TableUpperHeader(props) {
|
|
@@ -9809,19 +9872,37 @@ function TableUpperHeader(props) {
|
|
|
9809
9872
|
}, React__default.createElement("div", {
|
|
9810
9873
|
className: rootClassName$1A + "-left"
|
|
9811
9874
|
}, (_props$leftContent = props.leftContent) === null || _props$leftContent === void 0 ? void 0 : _props$leftContent.map(function (btn, i) {
|
|
9812
|
-
return React__default.createElement("button", Object.assign({
|
|
9875
|
+
return btn.type === 'Button' ? React__default.createElement("button", Object.assign({
|
|
9813
9876
|
key: i
|
|
9814
9877
|
}, btn, {
|
|
9815
|
-
disabled: !props.active || (btn === null || btn === void 0 ? void 0 : btn.disabled) || false
|
|
9816
|
-
|
|
9878
|
+
disabled: !props.active || (btn === null || btn === void 0 ? void 0 : btn.disabled) || false,
|
|
9879
|
+
type: 'button',
|
|
9880
|
+
className: rootClassName$1A + "-btn"
|
|
9881
|
+
}), btn.leftIcon && React__default.createElement("span", null, btn.leftIcon), btn.label, btn.rightIcon && React__default.createElement("span", null, btn.rightIcon)) : React__default.createElement(DropdownMenu, Object.assign({}, btn, {
|
|
9882
|
+
key: i
|
|
9883
|
+
}), React__default.createElement("button", Object.assign({
|
|
9884
|
+
key: i
|
|
9885
|
+
}, btn.children, {
|
|
9886
|
+
className: rootClassName$1A + "-btn",
|
|
9887
|
+
disabled: !props.active || (btn === null || btn === void 0 ? void 0 : btn.children.disabled) || false,
|
|
9888
|
+
type: 'button'
|
|
9889
|
+
}), btn.children.leftIcon && React__default.createElement("span", null, btn.children.leftIcon), btn.children.label, btn.children.rightIcon && React__default.createElement("span", null, btn.children.rightIcon)));
|
|
9817
9890
|
})), React__default.createElement("div", {
|
|
9818
9891
|
className: rootClassName$1A + "-right"
|
|
9819
9892
|
}, (_props$rightContent = props.rightContent) === null || _props$rightContent === void 0 ? void 0 : _props$rightContent.map(function (btn, i) {
|
|
9820
|
-
return React__default.createElement("button", Object.assign({
|
|
9893
|
+
return btn.type === 'Button' ? React__default.createElement("button", Object.assign({
|
|
9821
9894
|
key: i
|
|
9822
9895
|
}, btn, {
|
|
9823
|
-
disabled: !props.active || (btn === null || btn === void 0 ? void 0 : btn.disabled) || false
|
|
9824
|
-
|
|
9896
|
+
disabled: !props.active || (btn === null || btn === void 0 ? void 0 : btn.disabled) || false,
|
|
9897
|
+
className: rootClassName$1A + "-btn",
|
|
9898
|
+
type: 'button'
|
|
9899
|
+
}), btn.leftIcon && React__default.createElement("span", null, btn.leftIcon), btn.label, btn.rightIcon && React__default.createElement("span", null, btn.rightIcon)) : React__default.createElement(DropdownMenu, Object.assign({}, btn), React__default.createElement("button", Object.assign({
|
|
9900
|
+
key: i
|
|
9901
|
+
}, btn.children, {
|
|
9902
|
+
disabled: !props.active || (btn === null || btn === void 0 ? void 0 : btn.children.disabled) || false,
|
|
9903
|
+
className: rootClassName$1A + "-btn",
|
|
9904
|
+
type: 'button'
|
|
9905
|
+
}), btn.children.leftIcon && React__default.createElement("span", null, btn.children.leftIcon), btn.children.label, btn.children.rightIcon && React__default.createElement("span", null, btn.children.rightIcon)));
|
|
9825
9906
|
})));
|
|
9826
9907
|
}
|
|
9827
9908
|
|
|
@@ -9832,11 +9913,16 @@ var rootClassName$1B = 'component-table-with-overflow';
|
|
|
9832
9913
|
function TableWithOverflow(props) {
|
|
9833
9914
|
var _props$columns, _props$lines;
|
|
9834
9915
|
|
|
9916
|
+
var mediaQuery = useScreenSize();
|
|
9835
9917
|
var wrapperClassName = React.useMemo(function () {
|
|
9836
9918
|
return getMergedClassNames([rootClassName$1B + "-wrapper", props.hasActionsCol ? 'has-actions-col' : '', props.upperHeader ? 'has-upper-header' : '', 'left-columns-padding']);
|
|
9837
9919
|
}, [props.hasActionsCol, props.upperHeader]);
|
|
9838
9920
|
var outerTableRef = React.createRef();
|
|
9839
|
-
useDraggableScroll(outerTableRef
|
|
9921
|
+
useDraggableScroll(outerTableRef, {
|
|
9922
|
+
mouseDownCondition: function mouseDownCondition(el) {
|
|
9923
|
+
return ['xl', 'lg', 'md'].includes(mediaQuery) && el.hasAttribute('data-draggable') && el.getAttribute('data-draggable') === 'true';
|
|
9924
|
+
}
|
|
9925
|
+
});
|
|
9840
9926
|
|
|
9841
9927
|
var handleArrowClick = function handleArrowClick(toAdd) {
|
|
9842
9928
|
if (toAdd === void 0) {
|
|
@@ -9902,7 +9988,8 @@ function TableWithOverflow(props) {
|
|
|
9902
9988
|
var _column$props;
|
|
9903
9989
|
|
|
9904
9990
|
return React__default.createElement("th", Object.assign({
|
|
9905
|
-
key: "header-" + column.key
|
|
9991
|
+
key: "header-" + column.key,
|
|
9992
|
+
"data-draggable": !Boolean(column.absolute)
|
|
9906
9993
|
}, column.props, {
|
|
9907
9994
|
style: _extends({}, (_column$props = column.props) === null || _column$props === void 0 ? void 0 : _column$props.style, column.absolute),
|
|
9908
9995
|
className: getMergedClassNames([column.key + "-cell", column.absolute ? 'absolute' : ''])
|
|
@@ -11500,58 +11587,6 @@ function useModalManager() {
|
|
|
11500
11587
|
}))), openModal, closeModal];
|
|
11501
11588
|
}
|
|
11502
11589
|
|
|
11503
|
-
var ScreenSize;
|
|
11504
|
-
|
|
11505
|
-
(function (ScreenSize) {
|
|
11506
|
-
ScreenSize["xs"] = "xs";
|
|
11507
|
-
ScreenSize["sm"] = "sm";
|
|
11508
|
-
ScreenSize["md"] = "md";
|
|
11509
|
-
ScreenSize["lg"] = "lg";
|
|
11510
|
-
ScreenSize["xl"] = "xl";
|
|
11511
|
-
})(ScreenSize || (ScreenSize = {}));
|
|
11512
|
-
|
|
11513
|
-
function useScreenSize() {
|
|
11514
|
-
var _useState = React.useState(),
|
|
11515
|
-
value = _useState[0],
|
|
11516
|
-
setValue = _useState[1];
|
|
11517
|
-
|
|
11518
|
-
var valueRef = React.useRef(value);
|
|
11519
|
-
valueRef.current = value;
|
|
11520
|
-
|
|
11521
|
-
var f = function f() {
|
|
11522
|
-
if (window.innerWidth <= 575.98) {
|
|
11523
|
-
if (valueRef.current !== ScreenSize.xs) {
|
|
11524
|
-
setValue(ScreenSize.xs);
|
|
11525
|
-
}
|
|
11526
|
-
} else if (window.innerWidth <= 767.98) {
|
|
11527
|
-
if (valueRef.current !== ScreenSize.sm) {
|
|
11528
|
-
setValue(ScreenSize.sm);
|
|
11529
|
-
}
|
|
11530
|
-
} else if (window.innerWidth <= 991.98) {
|
|
11531
|
-
if (valueRef.current !== ScreenSize.md) {
|
|
11532
|
-
setValue(ScreenSize.md);
|
|
11533
|
-
}
|
|
11534
|
-
} else if (window.innerWidth <= 1199.98) {
|
|
11535
|
-
if (valueRef.current !== ScreenSize.lg) {
|
|
11536
|
-
setValue(ScreenSize.lg);
|
|
11537
|
-
}
|
|
11538
|
-
} else if (window.innerWidth > 1199.98) {
|
|
11539
|
-
if (valueRef.current !== ScreenSize.xl) {
|
|
11540
|
-
setValue(ScreenSize.xl);
|
|
11541
|
-
}
|
|
11542
|
-
}
|
|
11543
|
-
};
|
|
11544
|
-
|
|
11545
|
-
React.useLayoutEffect(function () {
|
|
11546
|
-
f();
|
|
11547
|
-
window.addEventListener('resize', f);
|
|
11548
|
-
return function () {
|
|
11549
|
-
window.removeEventListener('resize', f);
|
|
11550
|
-
};
|
|
11551
|
-
}, []);
|
|
11552
|
-
return value;
|
|
11553
|
-
}
|
|
11554
|
-
|
|
11555
11590
|
var rootClassName$22 = 'comp-toast-manager';
|
|
11556
11591
|
var count$1 = 0;
|
|
11557
11592
|
function useToastManager(props) {
|