sag_components 2.0.0-beta193 → 2.0.0-beta195
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.d.ts +6 -1
- package/dist/index.esm.js +233 -85
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +233 -85
- package/dist/index.js.map +1 -1
- package/dist/types/components/Table/DropMenus/FilterPop.style.d.ts +2 -0
- package/dist/types/components/ToasterMessageBox/ToasterMessageBox.d.ts +6 -1
- package/dist/types/components/ToasterMessageBox/ToasterMessageBox.stories.d.ts +10 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1598,12 +1598,17 @@ declare function MessageBox({ isOpen, isDisabled, onClose, onConfirm, title, pri
|
|
|
1598
1598
|
children: any;
|
|
1599
1599
|
}): react_jsx_runtime.JSX.Element;
|
|
1600
1600
|
|
|
1601
|
-
declare function ToasterMessageBox({ color, messageText, linkText, duration, width, onLinkClick, onClose }: {
|
|
1601
|
+
declare function ToasterMessageBox({ color, messageText, linkText, duration, width, icon, onLinkClick, onClose }: {
|
|
1602
1602
|
color?: string;
|
|
1603
1603
|
messageText?: string;
|
|
1604
1604
|
linkText?: string;
|
|
1605
1605
|
duration?: number;
|
|
1606
1606
|
width?: string;
|
|
1607
|
+
icon?: ({ width, height, color, }: {
|
|
1608
|
+
width?: string;
|
|
1609
|
+
height?: string;
|
|
1610
|
+
color?: string;
|
|
1611
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
1607
1612
|
onLinkClick?: () => void;
|
|
1608
1613
|
onClose?: () => void;
|
|
1609
1614
|
}): react_jsx_runtime.JSX.Element;
|
package/dist/index.esm.js
CHANGED
|
@@ -3772,7 +3772,7 @@ const TextFieldInput = styled.input`
|
|
|
3772
3772
|
}
|
|
3773
3773
|
`;
|
|
3774
3774
|
|
|
3775
|
-
const SearchInput = props => {
|
|
3775
|
+
const SearchInput$1 = props => {
|
|
3776
3776
|
const {
|
|
3777
3777
|
value,
|
|
3778
3778
|
placeholder = 'Search',
|
|
@@ -3917,7 +3917,7 @@ const ActionsWrapper = styled.div`
|
|
|
3917
3917
|
gap: 10px;
|
|
3918
3918
|
width: 100%;
|
|
3919
3919
|
`;
|
|
3920
|
-
const SearchInputWrap = styled(SearchInput)`
|
|
3920
|
+
const SearchInputWrap = styled(SearchInput$1)`
|
|
3921
3921
|
margin-left: auto;
|
|
3922
3922
|
`;
|
|
3923
3923
|
|
|
@@ -12252,16 +12252,13 @@ const Td$1 = styled.td`
|
|
|
12252
12252
|
`;
|
|
12253
12253
|
const Tr = styled.tr`
|
|
12254
12254
|
border-bottom: 1px solid #f3f4f6;
|
|
12255
|
-
${
|
|
12256
|
-
|
|
12257
|
-
|
|
12258
|
-
|
|
12259
|
-
} = _ref;
|
|
12260
|
-
return enableHover && `&:hover {
|
|
12255
|
+
${({
|
|
12256
|
+
enableHover,
|
|
12257
|
+
selectHoverColor
|
|
12258
|
+
}) => enableHover && `&:hover {
|
|
12261
12259
|
background-color: ${selectHoverColor};
|
|
12262
12260
|
cursor: pointer;
|
|
12263
|
-
}
|
|
12264
|
-
}}
|
|
12261
|
+
}`}
|
|
12265
12262
|
`;
|
|
12266
12263
|
const InfoText = styled.div`
|
|
12267
12264
|
font-weight: 400;
|
|
@@ -37331,11 +37328,15 @@ const FilterPopContainer = styled.div`
|
|
|
37331
37328
|
font-family: 'Poppins', sans-serif;
|
|
37332
37329
|
width: ${props => props.width || '300px'};
|
|
37333
37330
|
height: ${props => props.height || 'auto'};
|
|
37331
|
+
max-height: ${props => props.maxHeight || '400px'};
|
|
37334
37332
|
padding: 8px;
|
|
37335
37333
|
color: #212121;
|
|
37336
37334
|
background-color: #fff;
|
|
37337
37335
|
border-radius: 4px;
|
|
37338
37336
|
box-shadow: 0px 4px 20px 0px rgba(0, 0, 0, 0.10);
|
|
37337
|
+
display: flex;
|
|
37338
|
+
flex-direction: column;
|
|
37339
|
+
overflow: hidden;
|
|
37339
37340
|
|
|
37340
37341
|
/* Add this CSS for checkbox styling */
|
|
37341
37342
|
input[type="checkbox"] {
|
|
@@ -37350,52 +37351,133 @@ const Title$5 = styled.h6`
|
|
|
37350
37351
|
padding: 4px 12px;
|
|
37351
37352
|
margin: 0 0 10px;
|
|
37352
37353
|
text-align: left;
|
|
37354
|
+
flex-shrink: 0;
|
|
37355
|
+
`;
|
|
37356
|
+
const SearchInput = styled.input`
|
|
37357
|
+
width: 100%;
|
|
37358
|
+
padding: 8px 12px;
|
|
37359
|
+
margin: 0 0 12px;
|
|
37360
|
+
font-size: 14px;
|
|
37361
|
+
font-family: 'Poppins', sans-serif;
|
|
37362
|
+
border: 1px solid #e0e0e0;
|
|
37363
|
+
border-radius: 4px;
|
|
37364
|
+
background-color: #fff;
|
|
37365
|
+
color: #212121;
|
|
37366
|
+
flex-shrink: 0;
|
|
37367
|
+
box-sizing: border-box;
|
|
37368
|
+
|
|
37369
|
+
&::placeholder {
|
|
37370
|
+
color: #999;
|
|
37371
|
+
font-style: italic;
|
|
37372
|
+
}
|
|
37373
|
+
|
|
37374
|
+
&:focus {
|
|
37375
|
+
outline: none;
|
|
37376
|
+
border-color: ${props => props.accentColor || '#066768'};
|
|
37377
|
+
box-shadow: 0 0 0 2px ${props => props.accentColor || '#066768'}20;
|
|
37378
|
+
}
|
|
37379
|
+
|
|
37380
|
+
&:hover {
|
|
37381
|
+
border-color: #c0c0c0;
|
|
37382
|
+
}
|
|
37353
37383
|
`;
|
|
37354
37384
|
const CheckboxGroup = styled.div`
|
|
37355
|
-
|
|
37356
|
-
|
|
37357
|
-
|
|
37358
|
-
|
|
37385
|
+
display: flex;
|
|
37386
|
+
flex-direction: column;
|
|
37387
|
+
gap: 8px;
|
|
37388
|
+
margin-bottom: 16px;
|
|
37389
|
+
overflow-y: auto;
|
|
37390
|
+
flex: 1;
|
|
37391
|
+
min-height: 0;
|
|
37392
|
+
|
|
37393
|
+
/* Custom scrollbar styling */
|
|
37394
|
+
&::-webkit-scrollbar {
|
|
37395
|
+
width: 6px;
|
|
37396
|
+
}
|
|
37397
|
+
|
|
37398
|
+
&::-webkit-scrollbar-track {
|
|
37399
|
+
background: #f1f1f1;
|
|
37400
|
+
border-radius: 3px;
|
|
37401
|
+
}
|
|
37402
|
+
|
|
37403
|
+
&::-webkit-scrollbar-thumb {
|
|
37404
|
+
background: #c1c1c1;
|
|
37405
|
+
border-radius: 3px;
|
|
37406
|
+
}
|
|
37407
|
+
|
|
37408
|
+
&::-webkit-scrollbar-thumb:hover {
|
|
37409
|
+
background: #a8a8a8;
|
|
37410
|
+
}
|
|
37411
|
+
|
|
37412
|
+
/* For Firefox */
|
|
37413
|
+
scrollbar-width: thin;
|
|
37414
|
+
scrollbar-color: #c1c1c1 #f1f1f1;
|
|
37359
37415
|
`;
|
|
37360
37416
|
const CheckboxLabel = styled.label`
|
|
37361
|
-
|
|
37362
|
-
|
|
37363
|
-
|
|
37364
|
-
|
|
37365
|
-
|
|
37366
|
-
|
|
37367
|
-
|
|
37368
|
-
|
|
37369
|
-
|
|
37370
|
-
|
|
37371
|
-
|
|
37372
|
-
|
|
37373
|
-
|
|
37374
|
-
|
|
37375
|
-
|
|
37376
|
-
|
|
37377
|
-
|
|
37378
|
-
|
|
37379
|
-
|
|
37417
|
+
display: flex;
|
|
37418
|
+
align-items: center;
|
|
37419
|
+
gap: 8px;
|
|
37420
|
+
padding: 8px 12px;
|
|
37421
|
+
font-size: 14px;
|
|
37422
|
+
font-weight: 400;
|
|
37423
|
+
color: #212121;
|
|
37424
|
+
cursor: pointer;
|
|
37425
|
+
flex-shrink: 0;
|
|
37426
|
+
|
|
37427
|
+
&:hover {
|
|
37428
|
+
background-color: #E6F0F0;
|
|
37429
|
+
}
|
|
37430
|
+
|
|
37431
|
+
> span {
|
|
37432
|
+
width: ${props => props.width};
|
|
37433
|
+
white-space: nowrap;
|
|
37434
|
+
overflow: hidden;
|
|
37435
|
+
text-overflow: ellipsis;
|
|
37436
|
+
}
|
|
37437
|
+
`;
|
|
37438
|
+
const NoResultsMessage = styled.div`
|
|
37439
|
+
padding: 16px 12px;
|
|
37440
|
+
text-align: center;
|
|
37441
|
+
color: #999;
|
|
37442
|
+
font-size: 14px;
|
|
37443
|
+
font-style: italic;
|
|
37380
37444
|
`;
|
|
37381
37445
|
const ButtonWrapper$2 = styled.div`
|
|
37382
37446
|
text-align: right;
|
|
37447
|
+
flex-shrink: 0;
|
|
37448
|
+
padding-top: 8px;
|
|
37449
|
+
border-top: 1px solid #e0e0e0;
|
|
37450
|
+
display: flex;
|
|
37451
|
+
justify-content: flex-end;
|
|
37452
|
+
align-items: center;
|
|
37383
37453
|
`;
|
|
37384
37454
|
const ResetButton$1 = styled.button`
|
|
37385
37455
|
font-size: 14px;
|
|
37386
37456
|
font-weight: 400;
|
|
37387
|
-
padding:
|
|
37457
|
+
padding: 4px 8px;
|
|
37388
37458
|
background-color: transparent;
|
|
37389
37459
|
border: none;
|
|
37390
37460
|
cursor: pointer;
|
|
37461
|
+
border-radius: 3px;
|
|
37462
|
+
|
|
37463
|
+
&:hover {
|
|
37464
|
+
background-color: #f0f0f0;
|
|
37465
|
+
color: #066768;
|
|
37466
|
+
}
|
|
37391
37467
|
|
|
37392
|
-
|
|
37393
|
-
|
|
37394
|
-
|
|
37395
|
-
|
|
37396
|
-
|
|
37397
|
-
|
|
37398
|
-
|
|
37468
|
+
&:active {
|
|
37469
|
+
color: #066768;
|
|
37470
|
+
}
|
|
37471
|
+
|
|
37472
|
+
&:disabled {
|
|
37473
|
+
color: #ccc;
|
|
37474
|
+
cursor: not-allowed;
|
|
37475
|
+
|
|
37476
|
+
&:hover {
|
|
37477
|
+
background-color: transparent;
|
|
37478
|
+
color: #ccc;
|
|
37479
|
+
}
|
|
37480
|
+
}
|
|
37399
37481
|
`;
|
|
37400
37482
|
|
|
37401
37483
|
const FilterPop = props => {
|
|
@@ -37403,15 +37485,22 @@ const FilterPop = props => {
|
|
|
37403
37485
|
menuName = '',
|
|
37404
37486
|
width = 'auto',
|
|
37405
37487
|
height = 'auto',
|
|
37488
|
+
maxHeight = '400px',
|
|
37406
37489
|
list = [],
|
|
37407
37490
|
color = '#007bff',
|
|
37408
37491
|
onCheck = () => {},
|
|
37409
37492
|
onReset = () => {},
|
|
37410
37493
|
doubleColumn = false,
|
|
37411
37494
|
isAsc = true,
|
|
37412
|
-
selectedAttributes: propSelectedAttributes = {}
|
|
37495
|
+
selectedAttributes: propSelectedAttributes = {},
|
|
37496
|
+
showSearch = true,
|
|
37497
|
+
// New prop to enable/disable search
|
|
37498
|
+
searchPlaceholder = 'Search...' // New prop for search placeholder
|
|
37413
37499
|
} = props;
|
|
37414
37500
|
|
|
37501
|
+
// State for search term
|
|
37502
|
+
const [searchTerm, setSearchTerm] = useState('');
|
|
37503
|
+
|
|
37415
37504
|
// Add hardcoded "Select All" as first item
|
|
37416
37505
|
const fullList = [{
|
|
37417
37506
|
value: 'All',
|
|
@@ -37435,18 +37524,49 @@ const FilterPop = props => {
|
|
|
37435
37524
|
return fullList.filter(item => item.value !== 'All');
|
|
37436
37525
|
};
|
|
37437
37526
|
|
|
37438
|
-
//
|
|
37527
|
+
// Filter items based on search term
|
|
37528
|
+
const filteredList = useMemo(() => {
|
|
37529
|
+
if (!searchTerm.trim()) {
|
|
37530
|
+
return fullList;
|
|
37531
|
+
}
|
|
37532
|
+
const searchLower = searchTerm.toLowerCase().trim();
|
|
37533
|
+
const filteredNonAllItems = fullList.filter(item => {
|
|
37534
|
+
if (item.value === 'All') return false; // Don't filter out "Select All" in search
|
|
37535
|
+
return item.label.toLowerCase().includes(searchLower);
|
|
37536
|
+
});
|
|
37537
|
+
|
|
37538
|
+
// Always include "Select All" at the top when searching
|
|
37539
|
+
return [fullList.find(item => item.value === 'All'), ...filteredNonAllItems];
|
|
37540
|
+
}, [fullList, searchTerm]);
|
|
37541
|
+
|
|
37542
|
+
// Sort the filtered list based on the `isAsc` prop, keeping 'All' as the first option
|
|
37543
|
+
const sortedList = useMemo(() => {
|
|
37544
|
+
return [...filteredList.filter(item => item.value === 'All'), ...filteredList.filter(item => item.value !== 'All').sort((a, b) => {
|
|
37545
|
+
return isAsc ? a.label.localeCompare(b.label) : b.label.localeCompare(a.label);
|
|
37546
|
+
})];
|
|
37547
|
+
}, [filteredList, isAsc]);
|
|
37548
|
+
|
|
37549
|
+
// Helper functions for "Select All" logic based on ALL items (not just filtered)
|
|
37439
37550
|
const areAllNonAllItemsSelected = function () {
|
|
37440
37551
|
let attributes = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : selectedAttributes;
|
|
37441
37552
|
const nonAllItems = getNonAllItems();
|
|
37442
37553
|
return nonAllItems.every(item => attributes[item.value]);
|
|
37443
37554
|
};
|
|
37444
37555
|
|
|
37445
|
-
// Helper
|
|
37446
|
-
const
|
|
37556
|
+
// Helper functions for visible filtered items
|
|
37557
|
+
const getVisibleNonAllItems = () => {
|
|
37558
|
+
return sortedList.filter(item => item.value !== 'All');
|
|
37559
|
+
};
|
|
37560
|
+
const areAllVisibleItemsSelected = function () {
|
|
37447
37561
|
let attributes = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : selectedAttributes;
|
|
37448
|
-
const
|
|
37449
|
-
|
|
37562
|
+
const visibleItems = getVisibleNonAllItems();
|
|
37563
|
+
if (visibleItems.length === 0) return false;
|
|
37564
|
+
return visibleItems.every(item => attributes[item.value]);
|
|
37565
|
+
};
|
|
37566
|
+
const areAnyVisibleItemsSelected = function () {
|
|
37567
|
+
let attributes = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : selectedAttributes;
|
|
37568
|
+
const visibleItems = getVisibleNonAllItems();
|
|
37569
|
+
return visibleItems.some(item => attributes[item.value]);
|
|
37450
37570
|
};
|
|
37451
37571
|
|
|
37452
37572
|
// New helper function to create the efficient data structure
|
|
@@ -37470,14 +37590,12 @@ const FilterPop = props => {
|
|
|
37470
37590
|
isSelectAll: false
|
|
37471
37591
|
};
|
|
37472
37592
|
} else if (mostSelected) {
|
|
37473
|
-
// More items selected than unselected - use exclude approach
|
|
37474
37593
|
return {
|
|
37475
37594
|
excluded: unselectedItems.map(item => item.value),
|
|
37476
37595
|
included: [],
|
|
37477
37596
|
isSelectAll: true
|
|
37478
37597
|
};
|
|
37479
37598
|
} else {
|
|
37480
|
-
// Fewer items selected than unselected - use include approach
|
|
37481
37599
|
return {
|
|
37482
37600
|
excluded: [],
|
|
37483
37601
|
included: selectedItems.map(item => item.value),
|
|
@@ -37487,47 +37605,50 @@ const FilterPop = props => {
|
|
|
37487
37605
|
};
|
|
37488
37606
|
const handleCheckboxChange = attribute => {
|
|
37489
37607
|
if (attribute === 'All') {
|
|
37490
|
-
//
|
|
37491
|
-
const
|
|
37492
|
-
const
|
|
37493
|
-
const updatedAttributes = {};
|
|
37608
|
+
// "Select All" behavior - affects ALL visible filtered items
|
|
37609
|
+
const visibleNonAllItems = getVisibleNonAllItems();
|
|
37610
|
+
const allVisibleSelected = areAllVisibleItemsSelected();
|
|
37494
37611
|
|
|
37495
|
-
//
|
|
37496
|
-
|
|
37497
|
-
|
|
37612
|
+
// Toggle all visible items
|
|
37613
|
+
const updatedAttributes = {
|
|
37614
|
+
...selectedAttributes
|
|
37615
|
+
};
|
|
37616
|
+
visibleNonAllItems.forEach(item => {
|
|
37617
|
+
updatedAttributes[item.value] = !allVisibleSelected;
|
|
37498
37618
|
});
|
|
37499
37619
|
|
|
37500
|
-
//
|
|
37620
|
+
// Update "Select All" state based on all items (not just visible)
|
|
37621
|
+
updatedAttributes.All = areAllNonAllItemsSelected(updatedAttributes);
|
|
37501
37622
|
const filterData = createFilterData(updatedAttributes);
|
|
37502
37623
|
onCheck({
|
|
37503
37624
|
changedItem: attribute,
|
|
37504
37625
|
filterData: filterData,
|
|
37505
|
-
allItems: updatedAttributes
|
|
37626
|
+
allItems: updatedAttributes
|
|
37506
37627
|
});
|
|
37507
37628
|
} else {
|
|
37508
|
-
//
|
|
37629
|
+
// Individual item clicked
|
|
37509
37630
|
const updatedAttributes = {
|
|
37510
37631
|
...selectedAttributes,
|
|
37511
37632
|
[attribute]: !selectedAttributes[attribute]
|
|
37512
37633
|
};
|
|
37513
37634
|
|
|
37514
|
-
//
|
|
37635
|
+
// Update "Select All" state based on all items
|
|
37636
|
+
updatedAttributes.All = areAllNonAllItemsSelected(updatedAttributes);
|
|
37515
37637
|
const filterData = createFilterData(updatedAttributes);
|
|
37516
37638
|
onCheck({
|
|
37517
37639
|
changedItem: attribute,
|
|
37518
37640
|
filterData: filterData,
|
|
37519
|
-
allItems: updatedAttributes
|
|
37641
|
+
allItems: updatedAttributes
|
|
37520
37642
|
});
|
|
37521
37643
|
}
|
|
37522
37644
|
};
|
|
37523
37645
|
const handleReset = () => {
|
|
37646
|
+
// Clear search when resetting
|
|
37647
|
+
setSearchTerm('');
|
|
37648
|
+
|
|
37524
37649
|
// Reset to the original default state (all selected)
|
|
37525
37650
|
const resetState = createInitialState();
|
|
37526
|
-
|
|
37527
|
-
// Call the onReset callback
|
|
37528
37651
|
onReset();
|
|
37529
|
-
|
|
37530
|
-
// Also call onCheck to notify parent of the reset with new efficient structure
|
|
37531
37652
|
const filterData = createFilterData(resetState);
|
|
37532
37653
|
onCheck({
|
|
37533
37654
|
changedItem: 'reset',
|
|
@@ -37536,17 +37657,24 @@ const FilterPop = props => {
|
|
|
37536
37657
|
});
|
|
37537
37658
|
};
|
|
37538
37659
|
|
|
37539
|
-
// Function to determine checkbox state for "Select All"
|
|
37660
|
+
// Function to determine checkbox state for "Select All" based on visible items
|
|
37540
37661
|
const getSelectAllCheckboxProps = () => {
|
|
37541
|
-
const
|
|
37542
|
-
|
|
37543
|
-
|
|
37544
|
-
|
|
37662
|
+
const visibleItems = getVisibleNonAllItems();
|
|
37663
|
+
if (visibleItems.length === 0) {
|
|
37664
|
+
return {
|
|
37665
|
+
checked: false,
|
|
37666
|
+
indeterminate: false
|
|
37667
|
+
};
|
|
37668
|
+
}
|
|
37669
|
+
const allVisibleSelected = areAllVisibleItemsSelected();
|
|
37670
|
+
const anyVisibleSelected = areAnyVisibleItemsSelected();
|
|
37671
|
+
const noneVisibleSelected = !anyVisibleSelected;
|
|
37672
|
+
if (allVisibleSelected) {
|
|
37545
37673
|
return {
|
|
37546
37674
|
checked: true,
|
|
37547
37675
|
indeterminate: false
|
|
37548
37676
|
};
|
|
37549
|
-
} else if (
|
|
37677
|
+
} else if (noneVisibleSelected) {
|
|
37550
37678
|
return {
|
|
37551
37679
|
checked: false,
|
|
37552
37680
|
indeterminate: false
|
|
@@ -37559,38 +37687,50 @@ const FilterPop = props => {
|
|
|
37559
37687
|
}
|
|
37560
37688
|
};
|
|
37561
37689
|
|
|
37562
|
-
//
|
|
37563
|
-
const
|
|
37564
|
-
|
|
37565
|
-
}
|
|
37690
|
+
// Handle search input change
|
|
37691
|
+
const handleSearchChange = e => {
|
|
37692
|
+
setSearchTerm(e.target.value);
|
|
37693
|
+
};
|
|
37694
|
+
|
|
37695
|
+
// Clear search
|
|
37696
|
+
const clearSearch = () => {
|
|
37697
|
+
setSearchTerm('');
|
|
37698
|
+
};
|
|
37566
37699
|
return /*#__PURE__*/React$1.createElement(FilterPopContainer, {
|
|
37567
37700
|
width: width,
|
|
37568
37701
|
height: height,
|
|
37569
|
-
|
|
37570
|
-
|
|
37702
|
+
maxHeight: maxHeight,
|
|
37703
|
+
accentColor: color
|
|
37704
|
+
}, /*#__PURE__*/React$1.createElement(Title$5, null, menuName), showSearch && /*#__PURE__*/React$1.createElement(SearchInput, {
|
|
37705
|
+
type: "text",
|
|
37706
|
+
placeholder: searchPlaceholder,
|
|
37707
|
+
value: searchTerm,
|
|
37708
|
+
onChange: handleSearchChange,
|
|
37709
|
+
accentColor: color
|
|
37710
|
+
}), /*#__PURE__*/React$1.createElement(CheckboxGroup, {
|
|
37571
37711
|
style: {
|
|
37572
37712
|
display: doubleColumn ? 'grid' : 'flex',
|
|
37573
37713
|
gridTemplateColumns: doubleColumn ? '1fr 1fr' : 'none',
|
|
37574
37714
|
gap: '8px'
|
|
37575
37715
|
}
|
|
37576
|
-
}, sortedList.
|
|
37716
|
+
}, sortedList.length === 1 ?
|
|
37717
|
+
/*#__PURE__*/
|
|
37718
|
+
// Only "Select All" is visible
|
|
37719
|
+
React$1.createElement(NoResultsMessage, null, "No items match your search") : sortedList.map(item => {
|
|
37577
37720
|
const isSelectAll = item.value === 'All';
|
|
37578
37721
|
const checkboxProps = isSelectAll ? getSelectAllCheckboxProps() : {};
|
|
37579
37722
|
const isChecked = isSelectAll ? checkboxProps.checked : selectedAttributes[item.value] || false;
|
|
37580
37723
|
return /*#__PURE__*/React$1.createElement(CheckboxLabel, {
|
|
37581
37724
|
width: !doubleColumn ?? width,
|
|
37582
|
-
key: `${item.value}-${JSON.stringify(selectedAttributes)}`
|
|
37725
|
+
key: `${item.value}-${JSON.stringify(selectedAttributes)}-${searchTerm}`
|
|
37583
37726
|
}, /*#__PURE__*/React$1.createElement("input", {
|
|
37584
37727
|
type: "checkbox",
|
|
37585
37728
|
checked: isChecked,
|
|
37586
37729
|
ref: el => {
|
|
37587
37730
|
if (el) {
|
|
37588
|
-
// Handle indeterminate for Select All FIRST
|
|
37589
37731
|
if (isSelectAll) {
|
|
37590
37732
|
el.indeterminate = checkboxProps.indeterminate;
|
|
37591
37733
|
}
|
|
37592
|
-
|
|
37593
|
-
// FORCE DOM SYNC - manually set DOM state to match React state
|
|
37594
37734
|
if (el.checked !== isChecked) {
|
|
37595
37735
|
el.checked = isChecked;
|
|
37596
37736
|
}
|
|
@@ -37600,7 +37740,12 @@ const FilterPop = props => {
|
|
|
37600
37740
|
handleCheckboxChange(item.value);
|
|
37601
37741
|
}
|
|
37602
37742
|
}), /*#__PURE__*/React$1.createElement("span", null, item.label));
|
|
37603
|
-
})), /*#__PURE__*/React$1.createElement(ButtonWrapper$2, null, /*#__PURE__*/React$1.createElement(ResetButton$1, {
|
|
37743
|
+
})), /*#__PURE__*/React$1.createElement(ButtonWrapper$2, null, showSearch && searchTerm && /*#__PURE__*/React$1.createElement(ResetButton$1, {
|
|
37744
|
+
onClick: clearSearch,
|
|
37745
|
+
style: {
|
|
37746
|
+
marginRight: '8px'
|
|
37747
|
+
}
|
|
37748
|
+
}, "Clear Search"), /*#__PURE__*/React$1.createElement(ResetButton$1, {
|
|
37604
37749
|
onClick: handleReset,
|
|
37605
37750
|
disabled: areAllNonAllItemsSelected() && selectedAttributes.All
|
|
37606
37751
|
}, "Reset")));
|
|
@@ -55039,6 +55184,7 @@ const ToasterMessageBox = _ref => {
|
|
|
55039
55184
|
linkText = '',
|
|
55040
55185
|
duration = 5,
|
|
55041
55186
|
width = '500px',
|
|
55187
|
+
icon = OkCircleIcon,
|
|
55042
55188
|
onLinkClick = () => {},
|
|
55043
55189
|
onClose = () => {}
|
|
55044
55190
|
} = _ref;
|
|
@@ -55077,7 +55223,9 @@ const ToasterMessageBox = _ref => {
|
|
|
55077
55223
|
$isClosing: isClosing
|
|
55078
55224
|
}, /*#__PURE__*/React$1.createElement(IconWrapper, {
|
|
55079
55225
|
$color: color
|
|
55080
|
-
}, /*#__PURE__*/React$1.createElement(
|
|
55226
|
+
}, icon === 'error' ? /*#__PURE__*/React$1.createElement(ErrorIcon, {
|
|
55227
|
+
color: "white"
|
|
55228
|
+
}) : /*#__PURE__*/React$1.createElement(OkCircleIcon, {
|
|
55081
55229
|
color: color,
|
|
55082
55230
|
width: "40",
|
|
55083
55231
|
height: "40"
|
|
@@ -55298,5 +55446,5 @@ const Tag = props => {
|
|
|
55298
55446
|
}, /*#__PURE__*/React$1.createElement("span", null, text || template?.text));
|
|
55299
55447
|
};
|
|
55300
55448
|
|
|
55301
|
-
export { AdvancedThresholds, Analytics, AreaChart, BannerEventBoxList, BarChart, BarChartTwoRows, BarChartWithAreaChart, BarChartsByWeeks, BatteryChart, BreakdownPanel, BrushChart, BubbleChart, Budgets, Build, Button$1 as Button, Campaigns, CheckBox, CollapseData, CollapseHeader, ContainerTable, Coupons, CustomerSegments, Dashboard, DialogOverlay$1 as DialogOverlay, DoubleBarSingleLine, DoublePanelDataRow, DownloadProgress, DropdownNew, EventDetailsCard, EventList, Execute, FilterPanel, FilterPop, GroupBuilder, Heatmap, IconButton$1 as IconButton, Input$2 as Input, InsightsCarousel, ItemManagerPanel, ItemsStores, LinkButton, LinnerDataBox, MarketShareDescription, MenuRoute, MessageBox, ModalDrawer, ModalWithOverlay, OneColumnContainer, OverlayDropdown, PerformanceAnalyticsLegend, PieChart, PopupCharts, PreTestWhatIf, QuickFilter, QuickFilterCards, RangePicker, RangePop, ReportTable, RulesEngine, SampleRunEngine, SearchInput, SingleBarLineCharts, SortPop, TabMenu, Table, Tag, ToasterMessageBox, ToggleSwitch, Tooltip$2 as Tooltip, TopToggleList, TotalDoughnutChart, TotalHorizontalCharts, Track, TwoBarCharts, WeeksPicker };
|
|
55449
|
+
export { AdvancedThresholds, Analytics, AreaChart, BannerEventBoxList, BarChart, BarChartTwoRows, BarChartWithAreaChart, BarChartsByWeeks, BatteryChart, BreakdownPanel, BrushChart, BubbleChart, Budgets, Build, Button$1 as Button, Campaigns, CheckBox, CollapseData, CollapseHeader, ContainerTable, Coupons, CustomerSegments, Dashboard, DialogOverlay$1 as DialogOverlay, DoubleBarSingleLine, DoublePanelDataRow, DownloadProgress, DropdownNew, EventDetailsCard, EventList, Execute, FilterPanel, FilterPop, GroupBuilder, Heatmap, IconButton$1 as IconButton, Input$2 as Input, InsightsCarousel, ItemManagerPanel, ItemsStores, LinkButton, LinnerDataBox, MarketShareDescription, MenuRoute, MessageBox, ModalDrawer, ModalWithOverlay, OneColumnContainer, OverlayDropdown, PerformanceAnalyticsLegend, PieChart, PopupCharts, PreTestWhatIf, QuickFilter, QuickFilterCards, RangePicker, RangePop, ReportTable, RulesEngine, SampleRunEngine, SearchInput$1 as SearchInput, SingleBarLineCharts, SortPop, TabMenu, Table, Tag, ToasterMessageBox, ToggleSwitch, Tooltip$2 as Tooltip, TopToggleList, TotalDoughnutChart, TotalHorizontalCharts, Track, TwoBarCharts, WeeksPicker };
|
|
55302
55450
|
//# sourceMappingURL=index.esm.js.map
|