@camunda/camunda-composite-components 0.25.1 → 0.25.2
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/lib/esm/package.json
CHANGED
|
@@ -14,6 +14,15 @@ const ToolbarWrapper = styled(TableToolbarContent) `
|
|
|
14
14
|
block-size: auto !important;
|
|
15
15
|
}
|
|
16
16
|
`;
|
|
17
|
+
const MultiSelectWrapper = styled.div `
|
|
18
|
+
.cds--list-box__menu {
|
|
19
|
+
min-inline-size: max-content;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.cds--list-box__menu-item__option {
|
|
23
|
+
white-space: nowrap;
|
|
24
|
+
}
|
|
25
|
+
`;
|
|
17
26
|
const overrideHistoryMethods = (onChange) => {
|
|
18
27
|
const originalReplaceState = window.history.replaceState;
|
|
19
28
|
window.history.replaceState = (...args) => {
|
|
@@ -326,15 +335,15 @@ export const C3DataTable = ({ data, headers, options, toolbar: singleToolbar, to
|
|
|
326
335
|
const selectedItems = multiSelectElement.items?.filter((item) => {
|
|
327
336
|
return multiSelectItemsInFilter?.some((id) => item.id === id);
|
|
328
337
|
});
|
|
329
|
-
toolbarComponents.push(_jsx(MultiSelect, { type: 'inline', size: 'lg', titleText: multiSelectElement?.label, useTitleInItem: true, hideLabel: true, label: multiSelectElement.label ?? '', id: multiSelectElement.id, items: multiSelectElement.items, selectedItems: selectedItems ?? [], onChange: ({ selectedItems }) => {
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
+
toolbarComponents.push(_jsx(MultiSelectWrapper, { children: _jsx(MultiSelect, { type: 'inline', size: 'lg', titleText: multiSelectElement?.label, useTitleInItem: true, hideLabel: true, label: multiSelectElement.label ?? '', id: multiSelectElement.id, items: multiSelectElement.items, selectedItems: selectedItems ?? [], onChange: ({ selectedItems }) => {
|
|
339
|
+
const value = selectedItems.map((item) => item.id);
|
|
340
|
+
currentFilters.current.set(multiSelectElement.id, {
|
|
341
|
+
id: multiSelectElement.id,
|
|
342
|
+
selectedItems: value,
|
|
343
|
+
});
|
|
344
|
+
updateFilteredData();
|
|
345
|
+
updateFilterURLState(multiSelectElement.queryName ?? multiSelectElement.id, value);
|
|
346
|
+
} }) }, multiSelectElement.id));
|
|
338
347
|
}
|
|
339
348
|
else if (toolbarElement.type === 'search') {
|
|
340
349
|
const searchElement = toolbarElement;
|
|
@@ -372,7 +381,9 @@ export const C3DataTable = ({ data, headers, options, toolbar: singleToolbar, to
|
|
|
372
381
|
}
|
|
373
382
|
}
|
|
374
383
|
if (toolbarComponents.length > 0 || searchComponent) {
|
|
375
|
-
toolbarComponent = (_jsx(TableToolbar, { "aria-label": 'data table toolbar',
|
|
384
|
+
toolbarComponent = (_jsx(TableToolbar, { "aria-label": 'data table toolbar',
|
|
385
|
+
// @carbon/styles 1.108 added a fixed block-size on .cds--table-toolbar; let it grow whenever content wraps (either via the >5 layout or the <=768px media query).
|
|
386
|
+
style: { blockSize: 'auto', minBlockSize: '3rem' }, children: _jsxs(ToolbarWrapper, { style: {
|
|
376
387
|
justifyContent: toolbarComponents.length > 5 ? 'normal' : 'end',
|
|
377
388
|
flexWrap: toolbarComponents.length > 5 ? 'wrap' : undefined,
|
|
378
389
|
blockSize: toolbarComponents.length > 5 ? 'auto' : '3rem',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camunda/camunda-composite-components",
|
|
3
|
-
"version": "0.25.
|
|
3
|
+
"version": "0.25.2",
|
|
4
4
|
"description": "Camunda Composite Components",
|
|
5
5
|
"bugs": {
|
|
6
6
|
"url": "https://github.com/camunda/camunda-cloud-management-apps/issues"
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"styled-components": "6.4.2",
|
|
61
61
|
"typescript-eslint": "8.61.1",
|
|
62
62
|
"wait-on": "9.0.10",
|
|
63
|
-
"@camunda/ccma-shared-types": "0.
|
|
63
|
+
"@camunda/ccma-shared-types": "0.2.0"
|
|
64
64
|
},
|
|
65
65
|
"peerDependencies": {
|
|
66
66
|
"@carbon/react": "1.x",
|