@adaptabletools/adaptable-cjs 22.0.6 → 22.0.8
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/index.css +19 -1
- package/index.css.map +1 -1
- package/package.json +1 -1
- package/src/AdaptableOptions/FilterOptions.d.ts +1 -0
- package/src/AdaptableState/Common/ColumnScope.d.ts +4 -0
- package/src/AdaptableState/Common/ColumnScope.js +17 -0
- package/src/Api/Implementation/ColumnFilterApiImpl.js +1 -0
- package/src/Api/Implementation/StateApiImpl.d.ts +1 -1
- package/src/Api/Implementation/StateApiImpl.js +12 -15
- package/src/Api/StateApi.d.ts +1 -1
- package/src/Redux/Store/AdaptableReduxMerger.js +4 -1
- package/src/Redux/Store/AdaptableStore.d.ts +2 -1
- package/src/Redux/Store/AdaptableStore.js +14 -9
- package/src/Redux/Store/Interface/IAdaptableStore.d.ts +1 -1
- package/src/View/Alert/Wizard/AlertScopeWizardSection.js +10 -3
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnDefinitionWizardSection.js +8 -8
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnTypeSection.js +1 -1
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnWizard.js +4 -2
- package/src/View/Components/ColumnFilter/components/FloatingFilterValues.js +1 -0
- package/src/View/Components/ColumnGroupTag/index.d.ts +5 -0
- package/src/View/Components/ColumnGroupTag/index.js +14 -0
- package/src/View/Components/ColumnSelector/index.js +4 -1
- package/src/View/Components/FilterForm/ListBoxFilterForm.js +8 -1
- package/src/View/Components/NewScopeComponent.js +19 -37
- package/src/View/Components/ReorderDraggable/index.d.ts +1 -0
- package/src/View/Components/ReorderDraggable/index.js +2 -1
- package/src/View/CustomSort/Wizard/CustomSortColumnWizardSection.js +7 -1
- package/src/View/CustomSort/Wizard/CustomSortWizard.js +1 -1
- package/src/View/FlashingCell/Wizard/FlashingCellScopeWizardSection.js +10 -3
- package/src/View/FormatColumn/Wizard/FormatColumnColumnScopeWizardSection.js +14 -7
- package/src/View/FormatColumn/Wizard/FormatColumnRuleWizardSection.js +1 -3
- package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.d.ts +1 -1
- package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.js +7 -7
- package/src/View/Layout/Wizard/LayoutWizard.js +2 -2
- package/src/View/Layout/Wizard/sections/AggregationsSection.js +2 -0
- package/src/View/Layout/Wizard/sections/ColumnsSection.js +149 -140
- package/src/View/Layout/Wizard/sections/FilterSection.js +8 -1
- package/src/View/Layout/Wizard/sections/PivotAggregationsSection.js +2 -0
- package/src/View/Layout/Wizard/sections/PivotRowGroupingSection.js +4 -1
- package/src/View/Layout/Wizard/sections/RowGroupingSection.js +4 -1
- package/src/View/Layout/Wizard/sections/RowSummarySection.js +8 -3
- package/src/View/Layout/Wizard/sections/SortSection.js +3 -1
- package/src/View/StyledColumn/Wizard/StyledColumnWizardColumnSection.js +7 -1
- package/src/View/Wizard/OnePageAdaptableWizard.d.ts +0 -1
- package/src/View/Wizard/OnePageAdaptableWizard.js +1 -1
- package/src/View/Wizard/OnePageWizards.d.ts +1 -0
- package/src/View/Wizard/OnePageWizards.js +11 -4
- package/src/agGrid/AdaptableAgGrid.js +19 -28
- package/src/agGrid/AgGridAdapter.d.ts +1 -0
- package/src/agGrid/AgGridAdapter.js +4 -0
- package/src/agGrid/AgGridColumnAdapter.js +3 -3
- package/src/agGrid/AgGridExportAdapter.js +1 -3
- package/src/components/Tree/TreeDropdown/index.d.ts +9 -0
- package/src/components/Tree/TreeDropdown/index.js +21 -1
- package/src/env.js +2 -2
- package/src/layout-manager/src/index.js +6 -0
- package/tsconfig.cjs.tsbuildinfo +1 -1
|
@@ -160,7 +160,7 @@ const ColumnRow = (props) => {
|
|
|
160
160
|
event.stopPropagation();
|
|
161
161
|
}, checked: visible }),
|
|
162
162
|
React.createElement(Flex_1.Flex, { className: "twa:mx-2", alignItems: "center", "data-name": "column-label" }, initialHeader),
|
|
163
|
-
props.column.columnGroup && props.column.columnGroup.groupCount > 1 ? (React.createElement(Flex_1.Box, { className: "ab-Layout-Wizard__ColumnRow__Title twa:mx-2 twa:p-1" },
|
|
163
|
+
props.column.columnGroup && props.column.columnGroup.groupCount > 1 ? (React.createElement(Flex_1.Box, { className: "ab-Layout-Wizard__ColumnRow__Title twa:mx-2 twa:p-1 twa:flex twa:items-center" },
|
|
164
164
|
"Column Group: ",
|
|
165
165
|
props.column.columnGroup.friendlyName)) : null)));
|
|
166
166
|
};
|
|
@@ -378,83 +378,90 @@ const ColumnsSection = (props) => {
|
|
|
378
378
|
.map((col) => col.columnId)
|
|
379
379
|
: currentOrder.map((col) => col.columnId);
|
|
380
380
|
const visibleIdsCurrentlyDisplayed = visibleIds.filter((colId) => currentlyDisplayedColumnIds.includes(colId));
|
|
381
|
-
return (React.createElement(Tabs_1.Tabs,
|
|
381
|
+
return (React.createElement(Tabs_1.Tabs, { className: "twa:h-full" },
|
|
382
382
|
React.createElement(Tabs_1.Tabs.Tab, null, "Columns"),
|
|
383
|
-
React.createElement(Tabs_1.Tabs.Content,
|
|
384
|
-
React.createElement(Flex_1.Box, { className: "twa:
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
return;
|
|
404
|
-
}
|
|
405
|
-
const previousColumnId = currentlyDisplayedColumnIds[index - 1];
|
|
406
|
-
const previousColumn = colIdToCol[previousColumnId];
|
|
407
|
-
if (previousColumn) {
|
|
408
|
-
setSelectedColumnId(previousColumn.columnId);
|
|
409
|
-
}
|
|
410
|
-
}
|
|
411
|
-
if (event.key === ' ') {
|
|
412
|
-
event.preventDefault();
|
|
413
|
-
event.stopPropagation();
|
|
414
|
-
const selectedColumn = colIdToCol[selectedColumnId];
|
|
415
|
-
if (!selectedColumn) {
|
|
416
|
-
return;
|
|
383
|
+
React.createElement(Tabs_1.Tabs.Content, null,
|
|
384
|
+
React.createElement(Flex_1.Box, { className: "twa:gap-2 twa:overflow-hidden twa:grid twa:grid-cols-2 twa:h-full" },
|
|
385
|
+
React.createElement(Flex_1.Box, { className: "twa:gap-2 twa:focus:outline-none twa:flex-1 twa:max-h-full twa:overflow-hidden", "data-name": "columns-container", tabIndex: -1, onKeyDown: (event) => {
|
|
386
|
+
const scrollIntoView = (columnId) => {
|
|
387
|
+
const el = event.currentTarget.querySelector(`[data-id="${columnId}"]`);
|
|
388
|
+
el?.scrollIntoView({ block: 'nearest' });
|
|
389
|
+
};
|
|
390
|
+
if (event.key === 'ArrowDown') {
|
|
391
|
+
event.preventDefault();
|
|
392
|
+
event.stopPropagation();
|
|
393
|
+
const index = currentlyDisplayedColumnIds.indexOf(selectedColumnId);
|
|
394
|
+
if (index === -1) {
|
|
395
|
+
return;
|
|
396
|
+
}
|
|
397
|
+
const nextColumnId = currentlyDisplayedColumnIds[index + 1];
|
|
398
|
+
const nextColumn = colIdToCol[nextColumnId];
|
|
399
|
+
if (nextColumn) {
|
|
400
|
+
setSelectedColumnId(nextColumn.columnId);
|
|
401
|
+
scrollIntoView(nextColumn.columnId);
|
|
402
|
+
}
|
|
417
403
|
}
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
React.createElement(Flex_1.Box, { className: (0, clsx_1.default)('twa:font-bold', 'twa:border-b twa:border-primarydark/30 twa:rounded-standard') },
|
|
425
|
-
React.createElement(CheckBox_1.CheckBox, { checked: currentlyDisplayedColumnIds.length
|
|
426
|
-
? currentlyDisplayedColumnIds.length === visibleIdsCurrentlyDisplayed.length
|
|
427
|
-
? true
|
|
428
|
-
: visibleIdsCurrentlyDisplayed.length
|
|
429
|
-
? null
|
|
430
|
-
: false
|
|
431
|
-
: false, onChange: (checked) => {
|
|
432
|
-
handleColumnVisibilityChange(currentlyDisplayedColumnIds, checked);
|
|
433
|
-
} }, "Select All")),
|
|
434
|
-
React.createElement(ReorderDraggable_1.ReorderDraggable, { toIdentifier: (option) => `${option.columnId}`, isOptionDraggable: (option) => {
|
|
435
|
-
return option.moveable;
|
|
436
|
-
}, optionClassName: (option) => {
|
|
437
|
-
const baseCls = 'ab-Layout-Wizard__ColumnRow twa:cursor-pointer twa:rounded-standard';
|
|
438
|
-
if (selectedColumnId !== option.columnId) {
|
|
439
|
-
return baseCls;
|
|
404
|
+
if (event.key === 'ArrowUp') {
|
|
405
|
+
event.preventDefault();
|
|
406
|
+
event.stopPropagation();
|
|
407
|
+
const index = currentlyDisplayedColumnIds.indexOf(selectedColumnId);
|
|
408
|
+
if (index === -1) {
|
|
409
|
+
return;
|
|
440
410
|
}
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
if (
|
|
444
|
-
setSelectedColumnId(
|
|
411
|
+
const previousColumnId = currentlyDisplayedColumnIds[index - 1];
|
|
412
|
+
const previousColumn = colIdToCol[previousColumnId];
|
|
413
|
+
if (previousColumn) {
|
|
414
|
+
setSelectedColumnId(previousColumn.columnId);
|
|
415
|
+
scrollIntoView(previousColumn.columnId);
|
|
445
416
|
}
|
|
446
|
-
|
|
447
|
-
|
|
417
|
+
}
|
|
418
|
+
if (event.key === ' ') {
|
|
419
|
+
event.preventDefault();
|
|
420
|
+
event.stopPropagation();
|
|
421
|
+
const selectedColumn = colIdToCol[selectedColumnId];
|
|
422
|
+
if (!selectedColumn) {
|
|
423
|
+
return;
|
|
448
424
|
}
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
}
|
|
425
|
+
const visible = isColumnVisible({ columnId: selectedColumnId, layout });
|
|
426
|
+
handleColumnVisibilityChange(selectedColumnId, !visible);
|
|
427
|
+
}
|
|
428
|
+
} },
|
|
429
|
+
React.createElement(Flex_1.Box, { className: "twa:flex twa:flex-col twa:gap-2 twa:h-full twa:overflow-hidden" },
|
|
430
|
+
React.createElement(AdaptableFormControlTextClear_1.AdaptableFormControlTextClear, { value: searchInputValue, OnTextChange: setSearchInputValue, placeholder: "Search Columns...", className: "twa:w-full twa:border-none twa:p-1" }),
|
|
431
|
+
React.createElement(Flex_1.Box, { className: (0, clsx_1.default)('twa:font-bold', 'twa:border-b twa:border-primarydark/30 twa:rounded-standard') },
|
|
432
|
+
React.createElement(CheckBox_1.CheckBox, { checked: currentlyDisplayedColumnIds.length
|
|
433
|
+
? currentlyDisplayedColumnIds.length === visibleIdsCurrentlyDisplayed.length
|
|
434
|
+
? true
|
|
435
|
+
: visibleIdsCurrentlyDisplayed.length
|
|
436
|
+
? null
|
|
437
|
+
: false
|
|
438
|
+
: false, onChange: (checked) => {
|
|
439
|
+
handleColumnVisibilityChange(currentlyDisplayedColumnIds, checked);
|
|
440
|
+
} }, "Select All")),
|
|
441
|
+
React.createElement(ReorderDraggable_1.ReorderDraggable, { className: "twa:overflow-y-auto", toIdentifier: (option) => `${option.columnId}`, isOptionDraggable: (option) => {
|
|
442
|
+
return option.moveable;
|
|
443
|
+
}, optionClassName: (option) => {
|
|
444
|
+
const baseCls = 'ab-Layout-Wizard__ColumnRow twa:cursor-pointer twa:rounded-standard';
|
|
445
|
+
if (selectedColumnId !== option.columnId) {
|
|
446
|
+
return baseCls;
|
|
447
|
+
}
|
|
448
|
+
return (0, clsx_1.default)(baseCls, 'twa:after:border-accent twa:relative twa:after:border-2 twa:after:rounded-standard twa:after:pointer-events-none twa:after:inset-0 twa:after:absolute twa:after:bg-accent/15');
|
|
449
|
+
}, order: currentOrder, onOptionClick: (option, event) => {
|
|
450
|
+
if (event.ctrlKey || option.columnId === selectedColumnId) {
|
|
451
|
+
setSelectedColumnId(null);
|
|
452
|
+
}
|
|
453
|
+
else {
|
|
454
|
+
setSelectedColumnId(option.columnId);
|
|
455
|
+
}
|
|
456
|
+
}, renderOption: (option) => {
|
|
457
|
+
return (React.createElement(ColumnRow, { onColumnNameChange: handleColumnNameChange, onColumnWidthChange: handleColumnWidthChange, onColumnFlexChange: handleColumnFlexChange, onColumnMinWidthChange: handleColumnMinWidthChange, onColumnMaxWidthChange: handleColumnMaxWidthChange, onColumnVisibilityChange: handleColumnVisibilityChange, onPinChange: handlePinChange, layout: layout, column: option }));
|
|
458
|
+
}, onChange: handleColumnsChange }))),
|
|
452
459
|
currentOrderIds.length ? (React.createElement(ColumnPropertiesEditor, { column: selectedColumnId && currentOrderIds.includes(selectedColumnId)
|
|
453
|
-
? colIdToCol[selectedColumnId] ?? null
|
|
460
|
+
? (colIdToCol[selectedColumnId] ?? null)
|
|
454
461
|
: null, layout: layout, onPinChange: handlePinChange, onColumnNameChange: handleColumnNameChange, onColumnWidthChange: handleColumnWidthChange, onColumnFlexChange: handleColumnFlexChange, onColumnMinWidthChange: handleColumnMinWidthChange, onColumnMaxWidthChange: handleColumnMaxWidthChange, onColumnVisibilityChange: handleColumnVisibilityChange })) : null))));
|
|
455
462
|
};
|
|
456
463
|
exports.ColumnsSection = ColumnsSection;
|
|
457
|
-
const hr = React.createElement("hr", { className: "twa:my-
|
|
464
|
+
const hr = (React.createElement("hr", { className: "twa:my-3 twa:mb-0 twa:w-full twa:h-[0.5px] twa:bg-inputborder/50 twa:border-none" }));
|
|
458
465
|
const ColumnPropertiesEditor = (props) => {
|
|
459
466
|
const adaptable = (0, AdaptableContext_1.useAdaptable)();
|
|
460
467
|
const baseCls = 'ab-Layout-Wizard__ColumnPropertiesEditor twa:border twa:rounded-standard';
|
|
@@ -476,76 +483,78 @@ const ColumnPropertiesEditor = (props) => {
|
|
|
476
483
|
const columnPinning = props.layout.ColumnPinning?.[props.column.columnId] || 'None';
|
|
477
484
|
const initialHeader = adaptable.api.columnApi.getFriendlyNameForColumnId(props.column.columnId, props.layout);
|
|
478
485
|
const customHeader = props.layout.ColumnHeaders?.[props.column.columnId] ?? initialHeader;
|
|
479
|
-
return (React.createElement(Flex_1.Box, { className: (0, clsx_1.default)(baseCls, 'ab-Layout-Wizard__ColumnPropertiesEditor__Container twa:border-none twa:bg-defaultbackground twa:shadow-md twa:
|
|
480
|
-
React.createElement(Flex_1.Box, { className: "twa:
|
|
481
|
-
"
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
"
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
"
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
React.createElement(Flex_1.Flex, { flexDirection: "column", className: "twa:gap-3" },
|
|
492
|
-
React.createElement(Flex_1.Flex, { flexDirection: "column", className: "twa:gap-1" },
|
|
493
|
-
"Header",
|
|
494
|
-
React.createElement(Input_1.default, { "data-name": "column-header", className: "ab-Layout-Wizard__ColumnPropertiesEditor__Input twa:w-full", placeholder: "Custom name (optional)", onChange: () => {
|
|
495
|
-
props.onColumnNameChange(props.column.columnId, event.target.value);
|
|
496
|
-
}, value: customHeader })),
|
|
497
|
-
React.createElement(Flex_1.Box, { className: "twa:grid twa:grid-cols-[1fr_1fr] twa:gap-2" },
|
|
498
|
-
React.createElement(Flex_1.Box, null, "Width:"),
|
|
499
|
-
" ",
|
|
500
|
-
React.createElement(Flex_1.Box, null, "Flex:"),
|
|
501
|
-
React.createElement(Input_1.default, { "data-name": "column-width", className: "ab-Layout-Wizard__ColumnPropertiesEditor__Input", type: "number", placeholder: "Column width", disabled: resizable === false, onChange: (event) => {
|
|
502
|
-
let value = parseFloat(event.target.value);
|
|
503
|
-
value = typeof value === 'number' && !isNaN(value) ? value : void 0;
|
|
504
|
-
props.onColumnWidthChange(props.column.columnId, value);
|
|
505
|
-
}, value: columnWidth ?? '' }),
|
|
506
|
-
React.createElement(Input_1.default, { "data-name": "column-flex", className: "ab-Layout-Wizard__ColumnPropertiesEditor__Input", type: "number", placeholder: "Column flex", disabled: resizable === false, onChange: (event) => {
|
|
507
|
-
let value = parseFloat(event.target.value);
|
|
508
|
-
value = typeof value === 'number' && !isNaN(value) ? value : void 0;
|
|
509
|
-
props.onColumnFlexChange(props.column.columnId, value);
|
|
510
|
-
}, value: columnFlex ?? '' }),
|
|
511
|
-
React.createElement(Flex_1.Box, null, "Min Width:"),
|
|
512
|
-
React.createElement(Flex_1.Box, null, "Max Width:"),
|
|
513
|
-
React.createElement(Input_1.default, { "data-name": "column-min-width", className: "ab-Layout-Wizard__ColumnPropertiesEditor__Input", type: "number", placeholder: "Column min width", disabled: resizable === false, onChange: (event) => {
|
|
514
|
-
let value = parseFloat(event.target.value);
|
|
515
|
-
value = typeof value === 'number' && !isNaN(value) ? value : void 0;
|
|
516
|
-
props.onColumnMinWidthChange(props.column.columnId, value);
|
|
517
|
-
}, value: minWidth ?? '' }),
|
|
518
|
-
React.createElement(Input_1.default, { "data-name": "column-max-width", className: "ab-Layout-Wizard__ColumnPropertiesEditor__Input", type: "number", placeholder: "Column max width", disabled: resizable === false, onChange: (event) => {
|
|
519
|
-
let value = parseFloat(event.target.value);
|
|
520
|
-
value = typeof value === 'number' && !isNaN(value) ? value : void 0;
|
|
521
|
-
props.onColumnMaxWidthChange(props.column.columnId, value);
|
|
522
|
-
}, value: maxWidth ?? '' })),
|
|
523
|
-
"Pinning:",
|
|
524
|
-
React.createElement(Radio_1.RadioGroup, { value: columnPinning || 'None', name: "columnPinning", orientation: "horizontal", variant: "text-only", className: Radio_1.radioGroupStyling.horizontalTextOnly, onRadioChange: (columnPinning) => {
|
|
525
|
-
props.onPinChange(column.columnId, columnPinning === 'None' ? null : columnPinning);
|
|
526
|
-
} },
|
|
527
|
-
React.createElement(Radio_1.default, { value: "left" }, "Left"),
|
|
528
|
-
React.createElement(Radio_1.default, { value: "None" }, "None"),
|
|
529
|
-
React.createElement(Radio_1.default, { value: "right" }, "Right"))),
|
|
530
|
-
React.createElement(Flex_1.Box, { className: "twa:mt-5" }),
|
|
486
|
+
return (React.createElement(Flex_1.Box, { className: (0, clsx_1.default)(baseCls, 'ab-Layout-Wizard__ColumnPropertiesEditor__Container twa:border-none twa:bg-defaultbackground twa:shadow-md', 'twa:max-h-full twa:overflow-hidden twa:flex twa:flex-col') },
|
|
487
|
+
React.createElement(Flex_1.Box, { className: "twa:px-4 twa:pt-4" },
|
|
488
|
+
React.createElement(Flex_1.Box, { className: "twa:text-5 twa:font-bold twa:leading-relaxed ab-Layout-Wizard__ColumnPropertiesEditor__Title" },
|
|
489
|
+
"Column Settings: ",
|
|
490
|
+
column.friendlyName),
|
|
491
|
+
React.createElement(Flex_1.Box, { className: "twa:text-3 twa:opacity-80 twa:flex twa:flex-row twa:gap-1 twa:items-center" },
|
|
492
|
+
"Column ID:",
|
|
493
|
+
' ',
|
|
494
|
+
React.createElement(Flex_1.Box, { className: "twa:bg-primarydark/20 twa:text-text-on-primarydark twa:px-1 twa:py-0.5 twa:rounded-standard" }, column.columnId)),
|
|
495
|
+
props.column.columnGroup && props.column.columnGroup.groupCount > 1 ? (React.createElement(Flex_1.Box, { className: "ab-Layout-Wizard__ColumnRow__Title twa:mx-2 twa:p-1" },
|
|
496
|
+
"Column Group: ",
|
|
497
|
+
props.column.columnGroup.friendlyName)) : null),
|
|
531
498
|
hr,
|
|
532
|
-
React.createElement(Flex_1.Box,
|
|
533
|
-
React.createElement(Flex_1.
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
499
|
+
React.createElement(Flex_1.Box, { className: "twa:px-4 twa:flex-1 twa:overflow-y-auto twa:pb-3" },
|
|
500
|
+
React.createElement(Flex_1.Flex, { flexDirection: "column", className: "twa:gap-3 twa:mt-3" },
|
|
501
|
+
React.createElement(Flex_1.Flex, { flexDirection: "column", className: "twa:gap-1" },
|
|
502
|
+
"Header",
|
|
503
|
+
React.createElement(Input_1.default, { "data-name": "column-header", className: "ab-Layout-Wizard__ColumnPropertiesEditor__Input twa:w-full", placeholder: "Custom name (optional)", onChange: () => {
|
|
504
|
+
props.onColumnNameChange(props.column.columnId, event.target.value);
|
|
505
|
+
}, value: customHeader })),
|
|
506
|
+
React.createElement(Flex_1.Box, { className: "twa:grid twa:grid-cols-[1fr_1fr] twa:gap-2" },
|
|
507
|
+
React.createElement(Flex_1.Box, null, "Width:"),
|
|
508
|
+
" ",
|
|
509
|
+
React.createElement(Flex_1.Box, null, "Flex:"),
|
|
510
|
+
React.createElement(Input_1.default, { "data-name": "column-width", className: "ab-Layout-Wizard__ColumnPropertiesEditor__Input", type: "number", placeholder: "Column width", disabled: resizable === false, onChange: (event) => {
|
|
511
|
+
let value = parseFloat(event.target.value);
|
|
512
|
+
value = typeof value === 'number' && !isNaN(value) ? value : void 0;
|
|
513
|
+
props.onColumnWidthChange(props.column.columnId, value);
|
|
514
|
+
}, value: columnWidth ?? '' }),
|
|
515
|
+
React.createElement(Input_1.default, { "data-name": "column-flex", className: "ab-Layout-Wizard__ColumnPropertiesEditor__Input", type: "number", placeholder: "Column flex", disabled: resizable === false, onChange: (event) => {
|
|
516
|
+
let value = parseFloat(event.target.value);
|
|
517
|
+
value = typeof value === 'number' && !isNaN(value) ? value : void 0;
|
|
518
|
+
props.onColumnFlexChange(props.column.columnId, value);
|
|
519
|
+
}, value: columnFlex ?? '' }),
|
|
520
|
+
React.createElement(Flex_1.Box, null, "Min Width:"),
|
|
521
|
+
React.createElement(Flex_1.Box, null, "Max Width:"),
|
|
522
|
+
React.createElement(Input_1.default, { "data-name": "column-min-width", className: "ab-Layout-Wizard__ColumnPropertiesEditor__Input", type: "number", placeholder: "Column min width", disabled: resizable === false, onChange: (event) => {
|
|
523
|
+
let value = parseFloat(event.target.value);
|
|
524
|
+
value = typeof value === 'number' && !isNaN(value) ? value : void 0;
|
|
525
|
+
props.onColumnMinWidthChange(props.column.columnId, value);
|
|
526
|
+
}, value: minWidth ?? '' }),
|
|
527
|
+
React.createElement(Input_1.default, { "data-name": "column-max-width", className: "ab-Layout-Wizard__ColumnPropertiesEditor__Input", type: "number", placeholder: "Column max width", disabled: resizable === false, onChange: (event) => {
|
|
528
|
+
let value = parseFloat(event.target.value);
|
|
529
|
+
value = typeof value === 'number' && !isNaN(value) ? value : void 0;
|
|
530
|
+
props.onColumnMaxWidthChange(props.column.columnId, value);
|
|
531
|
+
}, value: maxWidth ?? '' })),
|
|
532
|
+
"Pinning:",
|
|
533
|
+
React.createElement(Radio_1.RadioGroup, { value: columnPinning || 'None', name: "columnPinning", orientation: "horizontal", variant: "text-only", className: Radio_1.radioGroupStyling.horizontalTextOnly, onRadioChange: (columnPinning) => {
|
|
534
|
+
props.onPinChange(column.columnId, columnPinning === 'None' ? null : columnPinning);
|
|
535
|
+
} },
|
|
536
|
+
React.createElement(Radio_1.default, { value: "left" }, "Left"),
|
|
537
|
+
React.createElement(Radio_1.default, { value: "None" }, "None"),
|
|
538
|
+
React.createElement(Radio_1.default, { value: "right" }, "Right"))),
|
|
539
|
+
React.createElement(Flex_1.Box, { className: "twa:mt-5" }),
|
|
540
|
+
hr,
|
|
541
|
+
React.createElement(Flex_1.Box, null,
|
|
542
|
+
React.createElement(Flex_1.Box, { className: "twa:my-3" }, "Column Attributes"),
|
|
543
|
+
React.createElement(Flex_1.Box, { className: (0, clsx_1.default)({
|
|
544
|
+
'twa:bg-primarylight': 'the bg color',
|
|
545
|
+
'twa:gap-2 twa:flex twa:flex-col': 'layout configuration for small screens',
|
|
546
|
+
'twa:lg:gap-3 twa:lg:grid twa:md:grid-cols-[1fr_1fr]': 'layout configuration for normal screens',
|
|
547
|
+
'twa:p-5 twa:rounded-standard': true,
|
|
548
|
+
}) }, [
|
|
549
|
+
{ label: 'Aggregatable', checked: props.column.aggregatable },
|
|
550
|
+
{ label: 'Filterable', checked: props.column.filterable },
|
|
551
|
+
{ label: 'Groupable', checked: props.column.groupable },
|
|
552
|
+
{ label: 'Moveable', checked: props.column.moveable },
|
|
553
|
+
{ label: 'Pivotable', checked: props.column.pivotable },
|
|
554
|
+
{ label: 'Sortable', checked: props.column.sortable },
|
|
555
|
+
].map(({ label, checked }) => (React.createElement(Flex_1.Flex, { key: label, alignItems: "center", className: (0, clsx_1.default)({
|
|
556
|
+
'twa:rounded-standard twa:gap-2': true,
|
|
557
|
+
}) },
|
|
558
|
+
React.createElement(Flex_1.Box, { className: "twa:size-5" }, checked ? (React.createElement(icons_1.Icon, { name: "check", className: "twa:text-success" })) : (React.createElement(icons_1.Icon, { name: "close", className: "twa:text-error" }))),
|
|
559
|
+
label))))))));
|
|
551
560
|
};
|
|
@@ -64,8 +64,15 @@ const FilterSection = (props) => {
|
|
|
64
64
|
});
|
|
65
65
|
} }))),
|
|
66
66
|
layoutFilters?.length > 0 && (React.createElement(Flex_1.Box, { className: "twa:p-0", as: "ul" }, layoutFilters.map((columnFilter) => {
|
|
67
|
+
const moduleItems = filterModule.toView(columnFilter).items;
|
|
68
|
+
const column = adaptable.api.columnApi.getColumnWithColumnId(columnFilter.ColumnId);
|
|
69
|
+
const columnGroupItems = column?.columnGroup && column.columnGroup.groupCount > 1
|
|
70
|
+
? [{ name: 'Column Group', values: [column.columnGroup.friendlyName] }]
|
|
71
|
+
: [];
|
|
67
72
|
const items = [
|
|
68
|
-
|
|
73
|
+
moduleItems[0],
|
|
74
|
+
...columnGroupItems,
|
|
75
|
+
...moduleItems.slice(1),
|
|
69
76
|
{
|
|
70
77
|
name: 'Column Filter',
|
|
71
78
|
view: (React.createElement(LayoutColumnFilter_1.LayoutColumnFilter, { columnFilter: columnFilter, onColumnFilterChange: (columnFilter) => {
|
|
@@ -13,6 +13,7 @@ const AdaptableContext_1 = require("../../../AdaptableContext");
|
|
|
13
13
|
const ValueSelector_1 = require("../../../Components/ValueSelector");
|
|
14
14
|
const OnePageAdaptableWizard_1 = require("../../../Wizard/OnePageAdaptableWizard");
|
|
15
15
|
const Utilities_1 = require("./Utilities");
|
|
16
|
+
const ColumnGroupTag_1 = require("../../../Components/ColumnGroupTag");
|
|
16
17
|
const ArrayExtensions_1 = tslib_1.__importDefault(require("../../../../Utilities/Extensions/ArrayExtensions"));
|
|
17
18
|
const StringExtensions_1 = tslib_1.__importDefault(require("../../../../Utilities/Extensions/StringExtensions"));
|
|
18
19
|
const Select_1 = require("../../../../components/Select");
|
|
@@ -177,6 +178,7 @@ const PivotColumnRow = (props) => {
|
|
|
177
178
|
React.createElement(Flex_1.Flex, { alignItems: "flex-start" },
|
|
178
179
|
React.createElement(Flex_1.Flex, { className: "twa:flex-[0_0_auto]", alignItems: "center" },
|
|
179
180
|
React.createElement(Flex_1.Flex, { className: "twa:min-w-[80px]" }, props.column.friendlyName),
|
|
181
|
+
React.createElement(ColumnGroupTag_1.ColumnGroupTag, { column: props.column }),
|
|
180
182
|
aggValue && (React.createElement(DropdownButton_1.default, { columns: ['label'], items: aggOptions, className: "twa:ml-2" }, currentAggFnName)),
|
|
181
183
|
currentAggFnName === AggregationColumns_1.WEIGHTED_AVERAGE_AGG_FN_NAME && (React.createElement(Flex_1.Flex, { className: "twa:bg-primary twa:ml-3", alignItems: "center" },
|
|
182
184
|
React.createElement(Flex_1.Box, null, "Weight"),
|
|
@@ -4,6 +4,7 @@ exports.PivotRowGroupingSection = exports.PivotRowGroupingSectionSummary = void
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const React = tslib_1.__importStar(require("react"));
|
|
6
6
|
const Utilities_1 = require("./Utilities");
|
|
7
|
+
const ColumnGroupTag_1 = require("../../../Components/ColumnGroupTag");
|
|
7
8
|
const Tabs_1 = require("../../../../components/Tabs");
|
|
8
9
|
const Tag_1 = require("../../../../components/Tag");
|
|
9
10
|
const AdaptableContext_1 = require("../../../AdaptableContext");
|
|
@@ -43,7 +44,9 @@ const PivotRowGroupingSection = (props) => {
|
|
|
43
44
|
React.createElement(Tabs_1.Tabs.Tab, null, "Row Grouped Columns"),
|
|
44
45
|
React.createElement(Tabs_1.Tabs.Tab, null, rowGroupsText),
|
|
45
46
|
React.createElement(Tabs_1.Tabs.Content, null,
|
|
46
|
-
React.createElement(ValueSelector_1.ValueSelector, { showFilterInput: true, filter: Utilities_1.columnFilter, toIdentifier: (option) => `${option.columnId}`, toLabel: (option) => option.friendlyName ?? option.columnId,
|
|
47
|
+
React.createElement(ValueSelector_1.ValueSelector, { showFilterInput: true, filter: Utilities_1.columnFilter, toIdentifier: (option) => `${option.columnId}`, toLabel: (option) => option.friendlyName ?? option.columnId, toListLabel: (option) => (React.createElement(Flex_1.Flex, { alignItems: "center" },
|
|
48
|
+
option.friendlyName ?? option.columnId,
|
|
49
|
+
React.createElement(ColumnGroupTag_1.ColumnGroupTag, { column: option }))), options: sortedGroupableColumns, value: layout.PivotGroupedColumns ?? [], allowReorder: true, onChange: handleColumnsChange })),
|
|
47
50
|
React.createElement(Tabs_1.Tabs.Content, null,
|
|
48
51
|
React.createElement(RowGroupingSection_1.RowGroupBehaviorSection, { layout: layout, onChange: onChange }))));
|
|
49
52
|
};
|
|
@@ -5,6 +5,7 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const React = tslib_1.__importStar(require("react"));
|
|
6
6
|
const FormLayout_1 = tslib_1.__importDefault(require("../../../../components/FormLayout"));
|
|
7
7
|
const Utilities_1 = require("./Utilities");
|
|
8
|
+
const ColumnGroupTag_1 = require("../../../Components/ColumnGroupTag");
|
|
8
9
|
const Radio_1 = require("../../../../components/Radio");
|
|
9
10
|
const Tabs_1 = require("../../../../components/Tabs");
|
|
10
11
|
const Tag_1 = require("../../../../components/Tag");
|
|
@@ -101,7 +102,9 @@ const RowGroupingSection = (props) => {
|
|
|
101
102
|
React.createElement(Tabs_1.Tabs.Tab, null, "Row Grouped Columns"),
|
|
102
103
|
React.createElement(Tabs_1.Tabs.Tab, null, rowGroupsText),
|
|
103
104
|
React.createElement(Tabs_1.Tabs.Content, null,
|
|
104
|
-
React.createElement(ValueSelector_1.ValueSelector, { showFilterInput: true, filter: Utilities_1.columnFilter, toIdentifier: (option) => `${option.columnId}`, toLabel: (option) => option.friendlyName ?? option.columnId,
|
|
105
|
+
React.createElement(ValueSelector_1.ValueSelector, { showFilterInput: true, filter: Utilities_1.columnFilter, toIdentifier: (option) => `${option.columnId}`, toLabel: (option) => option.friendlyName ?? option.columnId, toListLabel: (option) => (React.createElement(Flex_1.Flex, { alignItems: "center" },
|
|
106
|
+
option.friendlyName ?? option.columnId,
|
|
107
|
+
React.createElement(ColumnGroupTag_1.ColumnGroupTag, { column: option }))), options: sortedGroupableColumns, value: layout.RowGroupedColumns ?? [], allowReorder: true, onChange: handleColumnsChange })),
|
|
105
108
|
React.createElement(Tabs_1.Tabs.Content, null,
|
|
106
109
|
React.createElement(exports.RowGroupBehaviorSection, { layout: layout, onChange: onChange })))));
|
|
107
110
|
};
|
|
@@ -19,6 +19,7 @@ const SuspendToggleButton_1 = require("../../../Components/Buttons/SuspendToggle
|
|
|
19
19
|
const ValueSelector_1 = require("../../../Components/ValueSelector");
|
|
20
20
|
const OnePageAdaptableWizard_1 = require("../../../Wizard/OnePageAdaptableWizard");
|
|
21
21
|
const Utilities_1 = require("./Utilities");
|
|
22
|
+
const ColumnGroupTag_1 = require("../../../Components/ColumnGroupTag");
|
|
22
23
|
const ArrayExtensions_1 = tslib_1.__importDefault(require("../../../../Utilities/Extensions/ArrayExtensions"));
|
|
23
24
|
const Flex_1 = require("../../../../components/Flex");
|
|
24
25
|
const areSummaryRowsValid = (layout) => {
|
|
@@ -156,11 +157,13 @@ const RowSummaryEditor = React.memo(({ rowSummary, onChange, availableScalarExpr
|
|
|
156
157
|
} }, "Include Only Filtered Rows"))),
|
|
157
158
|
React.createElement(Flex_1.Flex, { flexDirection: "column", className: "twa:mt-2 twa:mb-1" },
|
|
158
159
|
React.createElement(Flex_1.Flex, { alignItems: "center", className: "twa:flex-1 twa:mb-2" }, "Column Aggregations"),
|
|
159
|
-
React.createElement(Panel_1.default, { bodyProps: { className: 'twa:max-h-full ' }, className: "twa:h-[360px]" },
|
|
160
|
+
React.createElement(Panel_1.default, { bodyProps: { className: 'twa:max-h-full twa:bg-primarylight ' }, className: "twa:h-[360px]" },
|
|
160
161
|
React.createElement(ValueSelector_1.ValueSelector, { style: { maxHeight: '100%' }, showFilterInput: true, filter: Utilities_1.columnFilter, toIdentifier: (column) => column.columnId, toLabel: (option) => option.friendlyName ?? option.columnId, options: columns, toListLabel: (column) => {
|
|
161
162
|
const label = column.friendlyName ?? column.columnId;
|
|
162
163
|
if (!(column.columnId in (rowSummary.ColumnsMap ?? {}))) {
|
|
163
|
-
return
|
|
164
|
+
return (React.createElement(Flex_1.Flex, { alignItems: "center" },
|
|
165
|
+
label,
|
|
166
|
+
React.createElement(ColumnGroupTag_1.ColumnGroupTag, { column: column })));
|
|
164
167
|
}
|
|
165
168
|
const expressionOptions = getAvailableExpressionsForColumnType(column.dataType, availableScalarExpressions).map((expression) => ({
|
|
166
169
|
label: expression,
|
|
@@ -178,7 +181,9 @@ const RowSummaryEditor = React.memo(({ rowSummary, onChange, availableScalarExpr
|
|
|
178
181
|
}
|
|
179
182
|
const expression = rowSummary.ColumnsMap[column.columnId];
|
|
180
183
|
return (React.createElement(Flex_1.Flex, null,
|
|
181
|
-
React.createElement(Flex_1.Flex, { className: "twa:mr-2", alignItems: 'center' },
|
|
184
|
+
React.createElement(Flex_1.Flex, { className: "twa:mr-2", alignItems: 'center' },
|
|
185
|
+
label,
|
|
186
|
+
React.createElement(ColumnGroupTag_1.ColumnGroupTag, { column: column })),
|
|
182
187
|
React.createElement(Select_1.Select, { value: expression, options: expressionOptions, onChange: (expression) => {
|
|
183
188
|
onChange({
|
|
184
189
|
...rowSummary,
|
|
@@ -11,6 +11,7 @@ const AdaptableContext_1 = require("../../../AdaptableContext");
|
|
|
11
11
|
const ValueSelector_1 = require("../../../Components/ValueSelector");
|
|
12
12
|
const OnePageAdaptableWizard_1 = require("../../../Wizard/OnePageAdaptableWizard");
|
|
13
13
|
const Utilities_1 = require("./Utilities");
|
|
14
|
+
const ColumnGroupTag_1 = require("../../../Components/ColumnGroupTag");
|
|
14
15
|
const ArrayExtensions_1 = tslib_1.__importDefault(require("../../../../Utilities/Extensions/ArrayExtensions"));
|
|
15
16
|
const Flex_1 = require("../../../../components/Flex");
|
|
16
17
|
const SortSectionSummary = () => {
|
|
@@ -23,8 +24,9 @@ exports.SortSectionSummary = SortSectionSummary;
|
|
|
23
24
|
const ColumnRow = (props) => {
|
|
24
25
|
const SortOrder = (props.layout?.ColumnSorts ?? []).find((sort) => sort.ColumnId === props.column.columnId)?.SortOrder;
|
|
25
26
|
const icon = SortOrder === 'Asc' ? 'sort-asc' : 'sort-desc';
|
|
26
|
-
return (React.createElement(Flex_1.
|
|
27
|
+
return (React.createElement(Flex_1.Flex, { alignItems: "center" },
|
|
27
28
|
props.column.friendlyName,
|
|
29
|
+
React.createElement(ColumnGroupTag_1.ColumnGroupTag, { column: props.column }),
|
|
28
30
|
SortOrder && (React.createElement(SimpleButton_1.default, { className: "twa:ml-2", onClick: () => props.onSortChange(props.column.columnId, SortOrder === 'Asc' ? 'Desc' : 'Asc'), variant: "raised", icon: icon }))));
|
|
29
31
|
};
|
|
30
32
|
const SortSection = (props) => {
|
|
@@ -8,6 +8,7 @@ const Tag_1 = require("../../../components/Tag");
|
|
|
8
8
|
const ColumnSelector_1 = require("../../Components/ColumnSelector");
|
|
9
9
|
const OnePageAdaptableWizard_1 = require("../../Wizard/OnePageAdaptableWizard");
|
|
10
10
|
const Flex_1 = require("../../../components/Flex");
|
|
11
|
+
const AdaptableFormControlTextClear_1 = require("../../Components/Forms/AdaptableFormControlTextClear");
|
|
11
12
|
const renderStyledColumnColumnSummary = (data) => {
|
|
12
13
|
const { api } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
|
|
13
14
|
return (React.createElement(Flex_1.Box, { className: "twa:pr-2 twa:py-2" },
|
|
@@ -82,9 +83,14 @@ const StyledColumnWizardColumnSection = (props) => {
|
|
|
82
83
|
}
|
|
83
84
|
props.onChange(newStyledColumn);
|
|
84
85
|
};
|
|
86
|
+
const [columnsSearchText, setColumnsSearchText] = React.useState('');
|
|
85
87
|
return (React.createElement(Tabs_1.Tabs, { style: { height: '100%' } },
|
|
86
88
|
React.createElement(Tabs_1.Tabs.Tab, null, "Column"),
|
|
87
89
|
React.createElement(Tabs_1.Tabs.Content, null,
|
|
88
|
-
React.createElement(
|
|
90
|
+
React.createElement(Flex_1.Flex, { flexDirection: "row", alignItems: "center", className: "twa:p-2" },
|
|
91
|
+
React.createElement(Flex_1.Box, { className: "twa:text-2" }, "Columns"),
|
|
92
|
+
React.createElement(Flex_1.Box, { className: "twa:flex-3" }),
|
|
93
|
+
React.createElement(AdaptableFormControlTextClear_1.AdaptableFormControlTextClear, { value: columnsSearchText, OnTextChange: setColumnsSearchText, placeholder: "Type to search columns", style: { flex: 1 } })),
|
|
94
|
+
React.createElement(ColumnSelector_1.NewColumnSelector, { columnFilterText: columnsSearchText, availableColumns: sortableCols, selected: data.ColumnId ? [data.ColumnId] : [], singleSelect: true, onChange: handleColumnsChange, allowReorder: false }))));
|
|
89
95
|
};
|
|
90
96
|
exports.StyledColumnWizardColumnSection = StyledColumnWizardColumnSection;
|
|
@@ -41,7 +41,6 @@ export interface OnePageAdaptableWizardProps<ENTITY> {
|
|
|
41
41
|
onFinish?: (data: ENTITY) => any;
|
|
42
42
|
children?: React.ReactNode;
|
|
43
43
|
style?: CSSProperties;
|
|
44
|
-
titleContainerStyle?: CSSProperties;
|
|
45
44
|
closeText?: React.ReactNode;
|
|
46
45
|
closeTooltip?: string;
|
|
47
46
|
finishText?: React.ReactNode;
|
|
@@ -80,7 +80,7 @@ const OnePageAdaptableWizard = (props) => {
|
|
|
80
80
|
};
|
|
81
81
|
return (React.createElement(exports.OnePageAdaptableWizardContext.Provider, { value: extraContext },
|
|
82
82
|
React.createElement(NamedQueryContext_1.NamedQueryContext.Provider, { value: { namedQuery, setNamedQuery } },
|
|
83
|
-
React.createElement(OnePageWizards_1.OnePageWizard, { ...props, name: name, sections: sections, onFinish: handleClickFinish }))));
|
|
83
|
+
React.createElement(OnePageWizards_1.OnePageWizard, { ...props, name: name, sections: sections, onFinish: handleClickFinish, moduleName: props.moduleInfo.FriendlyName }))));
|
|
84
84
|
};
|
|
85
85
|
exports.OnePageAdaptableWizard = OnePageAdaptableWizard;
|
|
86
86
|
const OnePageWizardSummary = () => {
|
|
@@ -40,6 +40,7 @@ export interface OnePageWizardProps<ENTITY> {
|
|
|
40
40
|
closeText?: React.ReactNode;
|
|
41
41
|
closeTooltip?: string;
|
|
42
42
|
finishText?: React.ReactNode;
|
|
43
|
+
moduleName?: string;
|
|
43
44
|
}
|
|
44
45
|
export declare const OnePageWizard: <ENTITY extends unknown>(props: OnePageWizardProps<ENTITY>) => React.JSX.Element;
|
|
45
46
|
export {};
|
|
@@ -18,6 +18,8 @@ const useKeyboardNavigation_1 = require("./useKeyboardNavigation");
|
|
|
18
18
|
const Flex_1 = require("../../components/Flex");
|
|
19
19
|
const twMerge_1 = require("../../twMerge");
|
|
20
20
|
const twUtils_1 = require("../../components/twUtils");
|
|
21
|
+
/** Same template for header row and main row so module/details align with nav / content columns. */
|
|
22
|
+
const ONE_PAGE_WIZARD_SECTION_GRID = 'twa:grid twa:grid-cols-[minmax(160px,14rem)_minmax(0,1fr)]';
|
|
21
23
|
const SummaryTag = (props) => (React.createElement(Flex_1.Box, { ...props }));
|
|
22
24
|
exports.SummaryTag = SummaryTag;
|
|
23
25
|
const SummaryText = (props) => (React.createElement(Flex_1.Box, { ...props, className: (0, twMerge_1.twMerge)('twa:text-2 twa:mb-3', props.className) }));
|
|
@@ -71,7 +73,6 @@ const OnePageWizard = (props) => {
|
|
|
71
73
|
return React.createElement(React.Fragment, { key: index });
|
|
72
74
|
}
|
|
73
75
|
return (React.createElement(Flex_1.Flex, { flexDirection: "column", key: index, "data-name": `section-${index}`, className: "twa:min-h-full twa:mr-2" },
|
|
74
|
-
React.createElement(Flex_1.Box, { className: "ab-OnePageWizard__details twa:text-4 twa:py-3 twa:pl-2" }, section.details),
|
|
75
76
|
React.createElement(Flex_1.Box, { className: "ab-OnePageWizard__section twa:flex-1 twa:rounded-standard twa:overflow-auto twa:bg-defaultbackground" }, section.render(props.data, index))));
|
|
76
77
|
};
|
|
77
78
|
const handleNavigation = (0, useKeyboardNavigation_1.useKeyboardNavigation)(setCurrentSection, visibleSections);
|
|
@@ -112,6 +113,8 @@ const OnePageWizard = (props) => {
|
|
|
112
113
|
return acc;
|
|
113
114
|
}, new Map());
|
|
114
115
|
const canFinish = !invalidCount;
|
|
116
|
+
const activeSection = visibleSections[currentSection];
|
|
117
|
+
const activeSectionDetails = activeSection !== '-' ? activeSection?.details : undefined;
|
|
115
118
|
return (React.createElement(NamedQueryContext_1.NamedQueryContext.Provider, { value: { namedQuery, setNamedQuery } },
|
|
116
119
|
React.createElement(exports.OnePageWizardContext.Provider, { value: contextValue },
|
|
117
120
|
React.createElement(Dialog_1.default, { modal: props.modal ?? true, isOpen: true, showCloseButton: false, focusOnBrowserVisible: true, className: "twa:rounded-standard twa:overflow-hidden twa:h-[90vh]", ref: dialogRef, onDismiss: () => props.onHide?.(), onKeyDown: (event) => {
|
|
@@ -132,8 +135,12 @@ const OnePageWizard = (props) => {
|
|
|
132
135
|
}
|
|
133
136
|
} },
|
|
134
137
|
React.createElement(Flex_1.Box, { className: (0, clsx_1.default)('ab-OnePageWizard twa:flex twa:flex-col twa:h-full twa:w-[90vw] twa:max-w-[1200px]', 'twa:bg-primarylight twa:text-primary-foreground'), "data-name": props.name, style: props.style },
|
|
135
|
-
React.createElement(Flex_1.
|
|
136
|
-
React.createElement(Flex_1.
|
|
138
|
+
(props.moduleName || activeSectionDetails) && (React.createElement(Flex_1.Box, { className: (0, clsx_1.default)('ab-OnePageWizard__header', ONE_PAGE_WIZARD_SECTION_GRID, 'twa:items-start twa:mt-4 twa:mb-2 twa:px-2') },
|
|
139
|
+
React.createElement(Flex_1.Box, { className: "ab-OnePageWizard__module-name twa:min-w-0 twa:pl-3 twa:font-bold" }, props.moduleName),
|
|
140
|
+
React.createElement(Flex_1.Box, { className: "ab-OnePageWizard__details twa:min-w-0 twa:pr-2 twa:text-4" }, activeSectionDetails))),
|
|
141
|
+
React.createElement(Flex_1.Box, { as: "hr", className: "ab-OnePageWizard__module-separator twa:w-full twa:border-0 twa:border-t twa:border-t-inputborder" }),
|
|
142
|
+
React.createElement(Flex_1.Box, { className: (0, clsx_1.default)(ONE_PAGE_WIZARD_SECTION_GRID, 'twa:flex-1 twa:min-h-0 twa:overflow-auto twa:items-stretch') },
|
|
143
|
+
React.createElement(Flex_1.Flex, { flexDirection: "column", className: "ab-OnePageWizard__section-title-container twa:min-h-0 twa:min-w-0 twa:overflow-auto twa:p-3 twa:relative", ref: sizeOwnerRef, style: props.titleContainerStyle },
|
|
137
144
|
visibleSections.map((section, index) => {
|
|
138
145
|
if (section === '-') {
|
|
139
146
|
return (React.createElement(Flex_1.Box, { as: "hr", className: "ab-OnePageWizard__section-separator twa:mt-2 twa:w-full twa:border-t twa:border-t-inputborder", key: `${index}-` }));
|
|
@@ -175,7 +182,7 @@ const OnePageWizard = (props) => {
|
|
|
175
182
|
"or arrow keys",
|
|
176
183
|
React.createElement("br", null),
|
|
177
184
|
"to navigate")),
|
|
178
|
-
React.createElement(Flex_1.Flex, { flexDirection: "column", className: "ab-OnePageWizard__section-container twa:flex-1" }, renderSection(currentSection))),
|
|
185
|
+
React.createElement(Flex_1.Flex, { flexDirection: "column", className: "ab-OnePageWizard__section-container twa:min-h-0 twa:min-w-0 twa:flex-1" }, renderSection(currentSection))),
|
|
179
186
|
React.createElement(Flex_1.Flex, { flexDirection: "row", alignItems: "center", className: "ab-WizardDialog__footer ab-OnePageWizard__footer twa:p-2" },
|
|
180
187
|
React.createElement(SimpleButton_1.default, { tone: "neutral", variant: "text", "data-name": "close", onClick: () => props.onHide?.(), tooltip: props.closeTooltip ?? 'Close wizard', accessLevel: 'Full' }, props.closeText ?? 'CLOSE'),
|
|
181
188
|
React.createElement(KeyHint_1.KeyHint, { className: "twa:ml-2" }, "Esc"),
|