@adaptabletools/adaptable-cjs 23.0.0-canary.2 → 23.0.0-canary.4
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 +68 -73
- package/package.json +1 -1
- package/src/AdaptableOptions/DefaultAdaptableOptions.js +0 -4
- package/src/AdaptableOptions/FilterOptions.d.ts +0 -7
- package/src/AdaptableOptions/UserInterfaceOptions.d.ts +1 -3
- package/src/AdaptableState/Common/AdaptableForm.d.ts +18 -1
- package/src/AdaptableState/Common/AdaptableForm.js +34 -0
- package/src/AdaptableState/Common/AdaptableFormat.d.ts +1 -1
- package/src/AdaptableState/Common/CellDataChangedInfo.d.ts +3 -2
- package/src/AdaptableState/Common/Enums.d.ts +0 -5
- package/src/AdaptableState/Common/Enums.js +1 -7
- package/src/Api/EventApi.d.ts +1 -1
- package/src/Api/Events/ReportScheduleRan.d.ts +4 -0
- package/src/Api/Implementation/LayoutHelpers.js +12 -0
- package/src/Api/Internal/EventInternalApi.js +2 -1
- package/src/Strategy/CalculatedColumnModule.js +3 -1
- package/src/Utilities/Services/CalculatedColumnExpressionService.d.ts +1 -0
- package/src/Utilities/Services/CalculatedColumnExpressionService.js +7 -0
- package/src/Utilities/Services/CalculatedColumnSyntheticChange.d.ts +4 -0
- package/src/Utilities/Services/CalculatedColumnSyntheticChange.js +120 -0
- package/src/Utilities/Services/Interface/ICalculatedColumnExpressionService.d.ts +1 -0
- package/src/View/AdaptablePopover/index.js +1 -1
- package/src/View/Charting/ChartingWizard/AgChargingWizard/SettingsSection.js +8 -16
- package/src/View/Components/Buttons/ButtonInfo.d.ts +1 -1
- package/src/View/Components/Buttons/ButtonInfo.js +4 -4
- package/src/View/Components/ColumnFilter/AdaptableColumnFilter.js +1 -1
- package/src/View/Components/ColumnFilter/ColumnFilter.js +15 -5
- package/src/View/Components/ColumnFilter/ColumnFilterWindow.js +1 -1
- package/src/View/Components/ColumnFilter/FloatingFilter.js +57 -59
- package/src/View/Components/FilterForm/ListBoxFilterForm.js +1 -1
- package/src/View/Components/Forms/AdaptableFormControlTextClear.js +2 -1
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopup.js +1 -1
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupModuleView.js +2 -2
- package/src/View/Components/Selectors/ColumnSelector.js +5 -0
- package/src/View/Components/ValueSelector/index.js +1 -1
- package/src/View/FlashingCell/Wizard/FlashingCellScopeWizardSection.js +3 -1
- package/src/View/FormatColumn/Wizard/FormatColumnScopeWizardSection.js +3 -8
- package/src/View/GridFilter/GridFilterViewPanel.js +1 -1
- package/src/View/Layout/LayoutViewPanel.js +23 -21
- package/src/View/Layout/Wizard/sections/ColumnsSection.js +3 -3
- package/src/View/Layout/Wizard/sections/PivotColumnsSection.js +1 -1
- package/src/View/Layout/Wizard/sections/RowSelectionSection.js +1 -1
- package/src/View/Layout/Wizard/sections/SettingsSection.js +1 -1
- package/src/View/License/LicenseWatermark.js +1 -1
- package/src/View/StyledColumn/Wizard/StyledColumnWizardScopeSection.js +1 -1
- package/src/View/Wizard/OnePageWizards.js +1 -1
- package/src/View/renderWithAdaptableContext.js +1 -2
- package/src/agGrid/AdaptableAgGrid.d.ts +0 -1
- package/src/agGrid/AdaptableAgGrid.js +3 -18
- package/src/agGrid/AgGridColumnAdapter.js +1 -4
- package/src/components/AdaptableFormComponent/AdaptableFormComponent.js +10 -5
- package/src/components/Card/index.js +1 -1
- package/src/components/Combobox/VirtualizedList.js +5 -5
- package/src/components/Combobox/comboboxUtils.d.ts +4 -1
- package/src/components/Combobox/comboboxUtils.js +2 -0
- package/src/components/Combobox/index.d.ts +1 -0
- package/src/components/Combobox/index.js +39 -13
- package/src/components/Datepicker/index.js +2 -2
- package/src/components/Dialog/index.js +1 -1
- package/src/components/DragAndDropContext/TabList.js +1 -1
- package/src/components/Dropdown/Arrows.js +0 -1
- package/src/components/ExpressionEditor/BaseEditorInput.js +1 -1
- package/src/components/ExpressionEditor/index.js +1 -1
- package/src/components/Input/index.js +1 -1
- package/src/components/NewDropdownButton/index.d.ts +1 -0
- package/src/components/NewDropdownButton/index.js +2 -2
- package/src/components/NewSelect/index.d.ts +2 -0
- package/src/components/NewSelect/index.js +10 -7
- package/src/components/Panel/index.js +1 -1
- package/src/components/SimpleButton/index.js +1 -1
- package/src/components/Tabs/index.js +1 -1
- package/src/components/Tree/TreeDropdown/index.js +5 -13
- package/src/components/ui/button.d.ts +5 -2
- package/src/components/ui/button.js +8 -6
- package/src/components/ui/combobox.d.ts +16 -16
- package/src/components/ui/combobox.js +48 -49
- package/src/components/ui/input-group.d.ts +10 -9
- package/src/components/ui/input-group.js +19 -16
- package/src/components/ui/input.d.ts +2 -2
- package/src/components/ui/input.js +7 -4
- package/src/components/ui/popover.d.ts +5 -5
- package/src/components/ui/popover.js +5 -5
- package/src/components/ui/select.d.ts +7 -6
- package/src/components/ui/select.js +19 -17
- package/src/components/ui/textarea.d.ts +2 -2
- package/src/components/ui/textarea.js +7 -4
- package/src/components/ui/tooltip.d.ts +6 -5
- package/src/components/ui/tooltip.js +10 -7
- package/src/env.js +2 -2
- package/src/layout-manager/src/LayoutManagerModel.d.ts +5 -1
- package/src/lib/utils.d.ts +20 -0
- package/src/lib/utils.js +48 -1
- package/src/metamodel/adaptable.metamodel.d.ts +7 -19
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/migration/VersionUpgrade23.d.ts +2 -3
- package/src/migration/VersionUpgrade23.js +4 -16
- package/src/types.d.ts +0 -1
- package/themes/dark.css +7 -17
- package/tsconfig.cjs.tsbuildinfo +1 -1
- package/src/AdaptableState/Common/FilterActionOnDataChange.d.ts +0 -17
- package/src/AdaptableState/Common/FilterActionOnDataChange.js +0 -5
- package/src/View/AdaptableComputedCSSVarsContext.d.ts +0 -12
- package/src/View/AdaptableComputedCSSVarsContext.js +0 -36
- package/src/components/Select/CSSNumericVariableWatch.d.ts +0 -11
- package/src/components/Select/CSSNumericVariableWatch.js +0 -51
|
@@ -60,9 +60,7 @@ const FormatColumnScopeWizardSection = (props) => {
|
|
|
60
60
|
newData.Rule.BooleanExpression = '';
|
|
61
61
|
}
|
|
62
62
|
else {
|
|
63
|
-
const validPredicateIds = new Set(api.formatColumnApi.internalApi
|
|
64
|
-
.getFormatColumnDefsForScope(Scope)
|
|
65
|
-
.map((def) => def.id));
|
|
63
|
+
const validPredicateIds = new Set(api.formatColumnApi.internalApi.getFormatColumnDefsForScope(Scope).map((def) => def.id));
|
|
66
64
|
newData.Rule = {
|
|
67
65
|
Predicates: newData.Rule.Predicates.filter((p) => validPredicateIds.has(p.PredicateId)).filter((predicate) => {
|
|
68
66
|
// if there are more than 1 column, then we must eliminate the IN/NotIn predicates
|
|
@@ -87,12 +85,9 @@ const FormatColumnScopeWizardSection = (props) => {
|
|
|
87
85
|
});
|
|
88
86
|
};
|
|
89
87
|
const showRowToggles = data.Target === 'cell';
|
|
90
|
-
return ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "column", style: { height: '100%' }, children: [(0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "column", className: "twa:flex-1 twa:min-h-0", children: [(0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "row", alignItems: "center", className: "twa:p-2 twa:gap-3 twa:border-b twa:border-b-
|
|
88
|
+
return ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "column", style: { height: '100%' }, children: [(0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "column", className: "twa:flex-1 twa:min-h-0", children: [(0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "row", alignItems: "center", className: "twa:p-2 twa:gap-3 twa:border-b twa:mb-2 twa:border-b-foreground/20", children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-5 twa:font-medium", children: "Columns" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70", children: "Which Columns the Format Column will be applied to" })] }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:flex-1 twa:min-h-0 twa:overflow-auto twa:p-2", children: (0, jsx_runtime_1.jsx)(NewScopeComponent_1.NewScopeComponent, { descriptions: {
|
|
91
89
|
rowScope: 'Format all columns in the row',
|
|
92
90
|
columnScope: 'Select columns to format',
|
|
93
|
-
}, scope: data.Scope, updateScope: handleScopeChange }) })] }), showRowToggles && ((0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "twa:border-t twa:border-border twa:
|
|
94
|
-
FORMAT_COLUMN_ROW_KINDS.slice(0, 2),
|
|
95
|
-
FORMAT_COLUMN_ROW_KINDS.slice(2),
|
|
96
|
-
].map((rowKindGroup, groupIndex) => ((0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:flex-1 twa:min-w-[220px]", children: (0, jsx_runtime_1.jsx)(FormLayout_1.default, { sizes: ['180px', '1fr'], children: rowKindGroup.map((kind) => ((0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: `${ROW_KIND_LABELS[kind]}:`, children: (0, jsx_runtime_1.jsx)(Flex_1.Flex, { alignItems: "center", className: "twa:ml-2", children: (0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { "data-name": `include-${kind.toLowerCase()}-rows-checkbox`, className: "twa:mr-2", checked: isRowKindIncluded(data, kind), onChange: (checked) => handleRowKindChange(kind, checked) }) }) }, kind))) }) }, groupIndex))) })] }))] }));
|
|
91
|
+
}, scope: data.Scope, updateScope: handleScopeChange }) })] }), showRowToggles && ((0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "twa:border-t twa:border-border twa:py-3 twa:shrink-0", children: [(0, jsx_runtime_1.jsxs)(Flex_1.Flex, { alignItems: "center", className: "twa:gap-3 twa:px-2 twa:pb-2 twa:mb-3 twa:flex-wrap twa:border-b twa:border-b-foreground/20", children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-5 twa:font-medium", children: "Rows" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:max-w-[520px]", children: "Which kinds of Rows the Format Column will be applied to" })] }), (0, jsx_runtime_1.jsx)(Flex_1.Flex, { flexDirection: "row", className: "twa:gap-6 twa:flex-wrap", children: [FORMAT_COLUMN_ROW_KINDS.slice(0, 2), FORMAT_COLUMN_ROW_KINDS.slice(2)].map((rowKindGroup, groupIndex) => ((0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:flex-1 twa:min-w-[220px]", children: (0, jsx_runtime_1.jsx)(FormLayout_1.default, { sizes: ['180px', '1fr'], children: rowKindGroup.map((kind) => ((0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: `${ROW_KIND_LABELS[kind]}:`, children: (0, jsx_runtime_1.jsx)(Flex_1.Flex, { alignItems: "center", className: "twa:ml-2", children: (0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { "data-name": `include-${kind.toLowerCase()}-rows-checkbox`, className: "twa:mr-2", checked: isRowKindIncluded(data, kind), onChange: (checked) => handleRowKindChange(kind, checked) }) }) }, kind))) }) }, groupIndex))) })] }))] }));
|
|
97
92
|
};
|
|
98
93
|
exports.FormatColumnScopeWizardSection = FormatColumnScopeWizardSection;
|
|
@@ -26,7 +26,7 @@ const QueryViewPanelComponent = (props) => {
|
|
|
26
26
|
const disabled = isReadOnly || isSuspended || gridFilterAccessLevel === GeneralConstants_1.ACCESS_LEVEL_READ_ONLY;
|
|
27
27
|
const buttonExpand = ((0, jsx_runtime_1.jsx)(ButtonExpand_1.ButtonExpand, { disabled: disabled, accessLevel: gridFilterAccessLevel, variant: "text", tone: "neutral", onClick: onExpand, tooltip: "Edit the Expression in UI", className: "twa:ml-1" }));
|
|
28
28
|
const renderExpressionLabel = () => {
|
|
29
|
-
const baseClasses = 'twa:font-mono twa:text-s twa:py-2 twa:px-2 twa:overflow-hidden twa:text-ellipsis twa:whitespace-nowrap twa:bg-
|
|
29
|
+
const baseClasses = 'twa:font-mono twa:text-s twa:py-2 twa:px-2 twa:overflow-hidden twa:text-ellipsis twa:whitespace-nowrap twa:bg-background twa:text-foreground twa:rounded twa:cursor-pointer twa:leading-4 twa:flex twa:items-center';
|
|
30
30
|
const placeholderClasses = 'twa:text-gray-400 twa:italic';
|
|
31
31
|
const labelClassName = (0, clsx_1.default)(baseClasses, {
|
|
32
32
|
[placeholderClasses]: !expression,
|
|
@@ -37,29 +37,31 @@ const LayoutViewPanelComponent = (props) => {
|
|
|
37
37
|
const entityAccessLevel = AdaptableHelper_1.default.getAccessLevelForObject(layoutEntity, accessLevel);
|
|
38
38
|
const elementType = viewType === 'Toolbar' ? 'DashboardToolbar' : 'ToolPanel';
|
|
39
39
|
const layoutSelectStyle = elementType === 'ToolPanel' ? { minWidth: '100%' } : {};
|
|
40
|
+
const toLayoutSelectItems = (layouts) => layouts.map((layout) => ({
|
|
41
|
+
label: layout.Name,
|
|
42
|
+
value: layout.Name,
|
|
43
|
+
}));
|
|
40
44
|
const tableLayoutsArray = Layouts.filter((layout) => !(0, isPivotLayout_1.isPivotLayout)(layout));
|
|
41
45
|
const pivotLayoutsArray = Layouts.filter((layout) => (0, isPivotLayout_1.isPivotLayout)(layout));
|
|
42
|
-
const
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
].filter(Boolean);
|
|
62
|
-
return ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "row", className: `ab-${elementType}__Layout__wrap twa:gap-0.5`, flexWrap: viewType === 'ToolPanel' ? 'wrap' : 'nowrap', children: [(0, jsx_runtime_1.jsx)(Flex_1.Flex, { style: layoutSelectStyle, className: "twa:flex-1", children: (0, jsx_runtime_1.jsx)(NewSelect_1.SingleSelect, { groups: layoutGroups, showItemTooltip: true, disabled: isErrorLayout, className: `twa:w-full twa:min-w-30 ab-${elementType}__Layout__select`, ariaLabel: 'Select Layout', value: layoutEntity ? layoutEntity.Name : null, onValueChange: (layout) => onSelectLayout(layout) }) }), (0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "row", className: (0, join_1.default)(accessLevel === GeneralConstants.ACCESS_LEVEL_READ_ONLY
|
|
46
|
+
const showLayoutTypeHeadings = tableLayoutsArray.length > 0 && pivotLayoutsArray.length > 0;
|
|
47
|
+
const layoutSelectCommonProps = {
|
|
48
|
+
showItemTooltip: true,
|
|
49
|
+
disabled: isErrorLayout,
|
|
50
|
+
className: `twa:w-full twa:min-w-30 ab-${elementType}__Layout__select`,
|
|
51
|
+
ariaLabel: 'Select Layout',
|
|
52
|
+
value: layoutEntity ? layoutEntity.Name : null,
|
|
53
|
+
onValueChange: (layout) => onSelectLayout(layout),
|
|
54
|
+
};
|
|
55
|
+
return ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "row", className: `ab-${elementType}__Layout__wrap twa:gap-0.5`, flexWrap: viewType === 'ToolPanel' ? 'wrap' : 'nowrap', children: [(0, jsx_runtime_1.jsx)(Flex_1.Flex, { style: layoutSelectStyle, className: "twa:flex-1", children: showLayoutTypeHeadings ? ((0, jsx_runtime_1.jsx)(NewSelect_1.SingleSelect, { ...layoutSelectCommonProps, groups: [
|
|
56
|
+
{
|
|
57
|
+
label: 'Table Layouts',
|
|
58
|
+
items: toLayoutSelectItems(tableLayoutsArray),
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
label: 'Pivot Layouts',
|
|
62
|
+
items: toLayoutSelectItems(pivotLayoutsArray),
|
|
63
|
+
},
|
|
64
|
+
] })) : ((0, jsx_runtime_1.jsx)(NewSelect_1.SingleSelect, { ...layoutSelectCommonProps, items: toLayoutSelectItems(Layouts) })) }), (0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "row", className: (0, join_1.default)(accessLevel === GeneralConstants.ACCESS_LEVEL_READ_ONLY
|
|
63
65
|
? GeneralConstants.READ_ONLY_STYLE
|
|
64
66
|
: '', `ab-${elementType}__Layout__wrap`), children: [(0, jsx_runtime_1.jsx)(ButtonEdit_1.ButtonEdit, { disabled: isErrorLayout, onClick: () => api.layoutApi.showLayoutEditor(layoutEntity.Name), tooltip: GeneralConstants_1.LAYOUT_EDIT_TOOLTIP, className: `ab-${elementType}__Layout__edit`, accessLevel: entityAccessLevel }), (0, jsx_runtime_1.jsx)(ButtonClone_1.ButtonClone, { disabled: isErrorLayout, onClick: () => api.layoutApi.showLayoutEditor(layoutEntity.Name, (0, isPivotLayout_1.isPivotLayout)(layoutEntity) ? 'pivot' : 'table', 'Clone'), tooltip: GeneralConstants_1.LAYOUT_CLONE_TOOLTIP, className: `ab-${elementType}__Layout__clone`, tone: "neutral", variant: "text", children: null, accessLevel: cloneAccessLevel }), (0, jsx_runtime_1.jsx)(NewDropdownButton_1.NewDropdownButton, { variant: "text", tooltip: GeneralConstants_1.LAYOUT_NEW_TABLE_OR_PIVOT_TOOLTIP, "data-name": "new", items: [
|
|
65
67
|
{
|
|
@@ -428,7 +428,7 @@ const ColumnsSection = (props) => {
|
|
|
428
428
|
const visible = isColumnVisible({ columnId: selectedColumnId, layout });
|
|
429
429
|
handleColumnVisibilityChange(selectedColumnId, !visible);
|
|
430
430
|
}
|
|
431
|
-
}, children: (0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "twa:flex twa:flex-col twa:gap-2 twa:h-full twa:overflow-hidden twa:p-1", children: [(0, jsx_runtime_1.jsx)(AdaptableFormControlTextClear_1.AdaptableFormControlTextClear, { value: searchInputValue, OnTextChange: setSearchInputValue, placeholder: "Search Columns...", className: "twa:w-full twa:
|
|
431
|
+
}, children: (0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "twa:flex twa:flex-col twa:gap-2 twa:h-full twa:overflow-hidden twa:p-1", children: [(0, jsx_runtime_1.jsx)(AdaptableFormControlTextClear_1.AdaptableFormControlTextClear, { value: searchInputValue, OnTextChange: setSearchInputValue, placeholder: "Search Columns...", className: "twa:w-full twa:p-1" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: (0, clsx_1.default)('twa:font-bold', 'twa:border-b twa:border-primarydark/30 twa:rounded-standard'), children: (0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { checked: currentlyDisplayedColumnIds.length
|
|
432
432
|
? currentlyDisplayedColumnIds.length === visibleIdsCurrentlyDisplayed.length
|
|
433
433
|
? true
|
|
434
434
|
: visibleIdsCurrentlyDisplayed.length
|
|
@@ -466,7 +466,7 @@ const ColumnPropertiesEditor = (props) => {
|
|
|
466
466
|
const adaptable = (0, AdaptableContext_1.useAdaptable)();
|
|
467
467
|
const baseCls = 'ab-Layout-Wizard__ColumnPropertiesEditor twa:border twa:rounded-standard';
|
|
468
468
|
if (!props.column) {
|
|
469
|
-
return ((0, jsx_runtime_1.jsx)(Flex_1.Box, { className: (0, clsx_1.default)(baseCls, 'twa:border-input-border twa:grid twa:place-items-center twa:border-dashed twa:border-2'), children: (0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "twa:flex twa:flex-col twa:gap-2 twa:items-center twa:justify-center", children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-
|
|
469
|
+
return ((0, jsx_runtime_1.jsx)(Flex_1.Box, { className: (0, clsx_1.default)(baseCls, 'twa:border-input-border twa:grid twa:place-items-center twa:border-dashed twa:border-2'), children: (0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "twa:flex twa:flex-col twa:gap-2 twa:items-center twa:justify-center", children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-muted-foreground ab-Layout-Wizard__ColumnPropertiesEditor__Placeholder__Icon", children: (0, jsx_runtime_1.jsx)(icons_1.NaturallySizedIcon, { name: "inspector", style: { stroke: 'currentColor', fill: 'none', strokeWidth: 2 } }) }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-4 twa:font-bold ab-Layout-Wizard__ColumnPropertiesEditor__Placeholder__Title", children: "No Column Selected" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-3 twa:opacity-80 ab-Layout-Wizard__ColumnPropertiesEditor__Placeholder__Description", children: "Select a Column to view and edit its properties" })] }) }));
|
|
470
470
|
}
|
|
471
471
|
const { column } = props;
|
|
472
472
|
const columnWidth = props.layout.ColumnSizing?.[column.columnId]?.Width;
|
|
@@ -478,7 +478,7 @@ const ColumnPropertiesEditor = (props) => {
|
|
|
478
478
|
const columnPinning = props.layout.ColumnPinning?.[props.column.columnId] || 'None';
|
|
479
479
|
const initialHeader = adaptable.api.columnApi.getFriendlyNameForColumnId(props.column.columnId, props.layout);
|
|
480
480
|
const customHeader = props.layout.ColumnHeaders?.[props.column.columnId] ?? initialHeader;
|
|
481
|
-
return ((0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: (0, clsx_1.default)(baseCls, 'ab-Layout-Wizard__ColumnPropertiesEditor__Container twa:border-none twa:bg-
|
|
481
|
+
return ((0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: (0, clsx_1.default)(baseCls, 'ab-Layout-Wizard__ColumnPropertiesEditor__Container twa:border-none twa:bg-background twa:shadow-md', 'twa:max-h-full twa:overflow-hidden twa:flex twa:flex-col'), children: [(0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "twa:px-4 twa:pt-4", children: [(0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "twa:text-5 twa:font-bold twa:leading-relaxed ab-Layout-Wizard__ColumnPropertiesEditor__Title", children: ["Column Settings: ", column.friendlyName] }), (0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "twa:text-3 twa:opacity-80 twa:flex twa:flex-row twa:gap-1 twa:items-center", children: ["Column ID:", ' ', (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:bg-primarydark/20 twa:text-muted-foreground twa:px-1 twa:py-0.5 twa:rounded-standard", children: column.columnId })] }), props.column.columnGroup && props.column.columnGroup.groupCount > 1 ? ((0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "ab-Layout-Wizard__ColumnRow__Title twa:mx-2 twa:p-1", children: ["Column Group: ", props.column.columnGroup.friendlyName] })) : null] }), hr, (0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "twa:px-4 twa:flex-1 twa:overflow-y-auto twa:pb-3", children: [(0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "column", className: "twa:gap-3 twa:mt-3", children: [(0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "column", className: "twa:gap-1", children: ["Header", (0, jsx_runtime_1.jsx)(Input_1.default, { "data-name": "column-header", className: "ab-Layout-Wizard__ColumnPropertiesEditor__Input twa:w-full", placeholder: "Custom name (optional)", disabled: props.column.isGeneratedSelectionColumn, onChange: () => {
|
|
482
482
|
props.onColumnNameChange(props.column.columnId, event.target.value);
|
|
483
483
|
}, value: customHeader })] }), (0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "twa:grid twa:grid-cols-[1fr_1fr] twa:gap-2", children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { children: "Width:" }), " ", (0, jsx_runtime_1.jsx)(Flex_1.Box, { children: "Flex:" }), (0, jsx_runtime_1.jsx)(Input_1.default, { "data-name": "column-width", className: "ab-Layout-Wizard__ColumnPropertiesEditor__Input", type: "number", placeholder: "Column width", disabled: resizable === false, onChange: (event) => {
|
|
484
484
|
let value = parseFloat(event.target.value);
|
|
@@ -16,7 +16,7 @@ const CheckBox_1 = require("../../../../components/CheckBox");
|
|
|
16
16
|
const PivotColumnsSectionSummary = () => {
|
|
17
17
|
const adaptable = (0, AdaptableContext_1.useAdaptable)();
|
|
18
18
|
const { data: layout } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
|
|
19
|
-
return ((0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:p-2 twa:rounded-standard twa:bg-
|
|
19
|
+
return ((0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:p-2 twa:rounded-standard twa:bg-background", children: layout.PivotColumns?.length ? (layout.PivotColumns.map((columnId) => ((0, jsx_runtime_1.jsx)(Tag_1.Tag, { className: "twa:mr-1", children: adaptable.api.columnApi.getFriendlyNameForColumnId(columnId) }, columnId)))) : ((0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: "No Pivot Columns Defined" })) }));
|
|
20
20
|
};
|
|
21
21
|
exports.PivotColumnsSectionSummary = PivotColumnsSectionSummary;
|
|
22
22
|
const PivotColumnsSection = (props) => {
|
|
@@ -74,6 +74,6 @@ const RowSelectionSection = (props) => {
|
|
|
74
74
|
}
|
|
75
75
|
props.onChange(newLayout);
|
|
76
76
|
};
|
|
77
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(Tabs_1.Tabs, { children: [(0, jsx_runtime_1.jsx)(Tabs_1.Tabs.Tab, { children: "Row Selection Mode" }), (0, jsx_runtime_1.jsx)(Tabs_1.Tabs.Content, { children: (0, jsx_runtime_1.jsx)(Flex_1.Flex, { flexDirection: "column", children: (0, jsx_runtime_1.jsxs)(Radio_2.RadioGroup, { orientation: "horizontal", variant: "text-only", className: (0, twMerge_1.twMerge)(Radio_1.radioGroupStyling.horizontalTextOnly, 'twa:gap-2 twa:max-w-[500px] twa:bg-
|
|
77
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(Tabs_1.Tabs, { children: [(0, jsx_runtime_1.jsx)(Tabs_1.Tabs.Tab, { children: "Row Selection Mode" }), (0, jsx_runtime_1.jsx)(Tabs_1.Tabs.Content, { children: (0, jsx_runtime_1.jsx)(Flex_1.Flex, { flexDirection: "column", children: (0, jsx_runtime_1.jsxs)(Radio_2.RadioGroup, { orientation: "horizontal", variant: "text-only", className: (0, twMerge_1.twMerge)(Radio_1.radioGroupStyling.horizontalTextOnly, 'twa:gap-2 twa:max-w-[500px] twa:bg-background twa:p-2'), value: mode, name: "rowSelectionMode", onRadioChange: handleModeChange, children: [(0, jsx_runtime_1.jsx)(Radio_1.default, { value: false, children: "Disabled" }), (0, jsx_runtime_1.jsx)(Radio_1.default, { value: "singleRow", children: "Single Row" }), (0, jsx_runtime_1.jsx)(Radio_1.default, { value: "multiRow", children: "Multi Row" })] }) }) })] }), !rowSelection && (0, jsx_runtime_1.jsx)(HelpBlock_1.default, { children: "There is no Row Selection configured for this Layout" }), rowSelection && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(Tabs_1.Tabs, { className: "twa:mt-2", children: [(0, jsx_runtime_1.jsx)(Tabs_1.Tabs.Tab, { children: "Row Selection Column Checkboxes" }), (0, jsx_runtime_1.jsx)(Tabs_1.Tabs.Content, { children: (0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "row", className: "twa:gap-6", children: [(0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { className: "twa:flex-1", checked: rowSelection.Checkboxes ?? true, onChange: (checked) => updateRowSelection({ Checkboxes: checked }), children: "Checkboxes in Column Cells" }), mode === 'multiRow' && ((0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { className: "twa:flex-1", checked: rowSelection.HeaderCheckbox ?? true, onChange: (checked) => updateRowSelection({ HeaderCheckbox: checked }), children: "Checkbox in Column Header (to enable Select All)" }))] }) })] }), (rowSelection.Checkboxes ?? true) && ((0, jsx_runtime_1.jsxs)(Tabs_1.Tabs, { className: "twa:mt-2", children: [(0, jsx_runtime_1.jsx)(Tabs_1.Tabs.Tab, { children: "Row Grouping Selection Checkboxes" }), (0, jsx_runtime_1.jsx)(Tabs_1.Tabs.Content, { children: (0, jsx_runtime_1.jsxs)(Radio_2.RadioGroup, { orientation: "vertical", value: rowSelection.CheckboxInGroupColumn ?? false, name: "checkboxLocation", onRadioChange: (value) => updateRowSelection({ CheckboxInGroupColumn: value }), children: [(0, jsx_runtime_1.jsx)(Radio_1.default, { value: false, children: "Display in dedicated Selection Column" }), (0, jsx_runtime_1.jsx)(Radio_1.default, { value: true, children: "Display in Row Grouped Column" })] }) })] })), (0, jsx_runtime_1.jsxs)(Tabs_1.Tabs, { className: "twa:mt-2", children: [(0, jsx_runtime_1.jsx)(Tabs_1.Tabs.Tab, { children: "Row Click Selection (when user clicks on Row outside of Selection Checkbox)" }), (0, jsx_runtime_1.jsx)(Tabs_1.Tabs.Content, { children: (0, jsx_runtime_1.jsxs)(Radio_2.RadioGroup, { orientation: "vertical", value: rowSelection.EnableClickSelection ?? false, name: "clickSelection", onRadioChange: (value) => updateRowSelection({ EnableClickSelection: value }), children: [(0, jsx_runtime_1.jsx)(Radio_1.default, { value: false, children: "Disabled (Cannot select or deselect by clicking in Row)" }), (0, jsx_runtime_1.jsx)(Radio_1.default, { value: true, children: "Full (Enable selection by clicking in Row and deselection by Ctrl+clicking in Row)" }), (0, jsx_runtime_1.jsx)(Radio_1.default, { value: 'enableSelection', children: "Selection Only (Enable selection by clicking in Row)" }), (0, jsx_runtime_1.jsx)(Radio_1.default, { value: 'enableDeselection', children: "Deselection Only (Enable deselection by Ctrl+clicking in Row)" })] }) })] }), mode === 'multiRow' && !isPivot && ((0, jsx_runtime_1.jsxs)(Tabs_1.Tabs, { className: "twa:mt-2", children: [(0, jsx_runtime_1.jsx)(Tabs_1.Tabs.Tab, { children: "Grouped Row Selection Behaviour" }), (0, jsx_runtime_1.jsx)(Tabs_1.Tabs.Content, { children: (0, jsx_runtime_1.jsxs)(Radio_2.RadioGroup, { orientation: "vertical", value: rowSelection.GroupSelectMode ?? 'self', name: "groupSelectMode", onRadioChange: (value) => updateRowSelection({ GroupSelectMode: value }), children: [(0, jsx_runtime_1.jsx)(Radio_1.default, { value: 'self', children: "Select Grouped Row Only (no cascade)" }), (0, jsx_runtime_1.jsx)(Radio_1.default, { value: 'descendants', children: "Select Grouped Row and all descendants" }), (0, jsx_runtime_1.jsx)(Radio_1.default, { value: 'filteredDescendants', children: "Select Grouped Row and only filtered descendants" })] }) })] })), mode === 'multiRow' && ((0, jsx_runtime_1.jsxs)(Tabs_1.Tabs, { className: "twa:mt-2", children: [(0, jsx_runtime_1.jsx)(Tabs_1.Tabs.Tab, { children: "Select All (in Header) Behaviour" }), (0, jsx_runtime_1.jsx)(Tabs_1.Tabs.Content, { children: (0, jsx_runtime_1.jsxs)(Radio_2.RadioGroup, { orientation: "vertical", value: rowSelection.SelectAllMode ?? 'all', name: "selectAllMode", onRadioChange: (value) => updateRowSelection({ SelectAllMode: value }), children: [(0, jsx_runtime_1.jsx)(Radio_1.default, { value: 'all', children: "All rows" }), (0, jsx_runtime_1.jsx)(Radio_1.default, { value: 'filtered', children: "Filtered rows only" }), (0, jsx_runtime_1.jsx)(Radio_1.default, { value: 'currentPage', children: "Current page only" })] }) })] }))] }))] }));
|
|
78
78
|
};
|
|
79
79
|
exports.RowSelectionSection = RowSelectionSection;
|
|
@@ -25,6 +25,6 @@ const SettingsSection = (props) => {
|
|
|
25
25
|
Name: event.target.value,
|
|
26
26
|
});
|
|
27
27
|
};
|
|
28
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(Tabs_1.Tabs, { className: "twa:mb-
|
|
28
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(Tabs_1.Tabs, { className: "twa:mb-2", children: [(0, jsx_runtime_1.jsx)(Tabs_1.Tabs.Tab, { children: "Settings" }), (0, jsx_runtime_1.jsx)(Tabs_1.Tabs.Content, { children: (0, jsx_runtime_1.jsx)(Flex_1.Flex, { flexDirection: "row", children: (0, jsx_runtime_1.jsx)(FormLayout_1.default, { className: "twa:max-w-[300px] twa:w-full", children: (0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: "Name", children: (0, jsx_runtime_1.jsx)(Input_1.default, { className: "twa:w-full", "data-name": "layout-name", onChange: onNameChange, value: layout?.Name ?? '' }) }) }) }) })] }), (0, jsx_runtime_1.jsxs)(Tabs_1.Tabs, { className: "twa:mb-2", children: [(0, jsx_runtime_1.jsx)(Tabs_1.Tabs.Tab, { children: "Grid Type" }), (0, jsx_runtime_1.jsx)(Tabs_1.Tabs.Content, { children: (0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "column", children: [(0, jsx_runtime_1.jsx)(Radio_1.default, { "data-name": "layout-type-table", disabled: true, checked: !(0, isPivotLayout_1.isPivotLayout)(layout), children: "Table" }), (0, jsx_runtime_1.jsx)(Radio_1.default, { "data-name": "layout-type-pivot", disabled: true, checked: (0, isPivotLayout_1.isPivotLayout)(layout), children: "Pivot" })] }) })] })] }));
|
|
29
29
|
};
|
|
30
30
|
exports.SettingsSection = SettingsSection;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.LicenseWatermark=void 0;const e=require("tslib"),r=require("react/jsx-runtime"),t=e.__importStar(require("react")),o=require("../../components/Logo"),n=require("../../components/Flex"),i={border:"1px solid var(--ab-color-error)",padding:"5px",fontWeight:600,margin:"5px",fontSize:"14px",alignItems:"center",color:"var(--ab-color-foreground)",background:"var(--ab-color-
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.LicenseWatermark=void 0;const e=require("tslib"),r=require("react/jsx-runtime"),t=e.__importStar(require("react")),o=require("../../components/Logo"),n=require("../../components/Flex"),i={border:"1px solid var(--ab-color-error)",padding:"5px",fontWeight:600,margin:"5px",fontSize:"14px",alignItems:"center",color:"var(--ab-color-foreground)",background:"var(--ab-color-background)"},s=e=>{const r=[["display","none"],["opacity","0"],["position","absolute"],["position","fixed"],["position","relative"],["visibility","hidden"]];for(const[t,o]of r)if(e.style[t]===o)return!1;return!0},l=e=>{const l=t.useRef(null);return t.useEffect(()=>{const e=setInterval(()=>{l.current?.isConnected||alert("It is not allowed to remove the Adaptable watermark."),s(l.current)||alert("It is not allowed to modify the Adaptable watermark."),l?.current?.style&&(l.current.style.border=i.border,l.current.style.padding=i.padding,l.current.style.fontWeight=`${i.fontWeight}`,l.current.style.margin=i.margin,l.current.style.fontSize=i.fontSize,l.current.style.color=i.color,l.current.style.background=i.background,l.current.style.display="flex",l.current.style.position="static",l.current.style.opacity="1",l.current.style.visibility="visible")},5e3);return()=>clearTimeout(e)},[]),(0,r.jsxs)(n.Flex,{style:i,ref:l,children:[(0,r.jsx)(o.Logo,{style:{marginRight:10}}),(0,r.jsx)("div",{children:e.children})]})};exports.LicenseWatermark=l;
|
|
@@ -234,7 +234,7 @@ const StyledColumnWizardScopeSection = (props) => {
|
|
|
234
234
|
// -------------------------------------------------------------------------
|
|
235
235
|
// Render
|
|
236
236
|
// -------------------------------------------------------------------------
|
|
237
|
-
return ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "column", style: { height: '100%' }, children: [(0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "column", className: "twa:flex-1 twa:min-h-0", children: [(0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "row", alignItems: "center", className: "twa:p-2 twa:gap-3 twa:border-b twa:border-b-
|
|
237
|
+
return ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "column", style: { height: '100%' }, children: [(0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "column", className: "twa:flex-1 twa:min-h-0", children: [(0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "row", alignItems: "center", className: "twa:p-2 twa:gap-3 twa:border-b twa:border-b-foreground/20", children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-5 twa:font-medium", children: "Column" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70", children: "The Column the Style is applied to" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:flex-1" }), (0, jsx_runtime_1.jsx)(AdaptableFormControlTextClear_1.AdaptableFormControlTextClear, { value: columnsSearchText, OnTextChange: setColumnsSearchText, placeholder: "Type to search columns", style: { flex: 1, maxWidth: 320 } })] }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:flex-1 twa:min-h-0 twa:overflow-auto", children: (0, jsx_runtime_1.jsx)(ColumnSelector_1.NewColumnSelector, { columnFilterText: columnsSearchText, availableColumns: sortableCols, selected: data.ColumnId ? [data.ColumnId] : [], singleSelect: true, onChange: handleColumnsChange, allowReorder: false }) })] }), (0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "twa:border-t twa:border-border twa:px-2 twa:py-3 twa:shrink-0", children: [(0, jsx_runtime_1.jsxs)(Flex_1.Flex, { alignItems: "center", className: "twa:gap-3 twa:pb-2 twa:mb-3 twa:flex-wrap twa:border-b twa:border-b-foreground/20", children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-5 twa:font-medium", children: "Rows" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:max-w-[520px]", children: "Which kinds of Rows should the Styled Column render on" })] }), (0, jsx_runtime_1.jsx)(Flex_1.Flex, { flexDirection: "row", className: "twa:gap-6 twa:flex-wrap", children: [
|
|
238
238
|
styledColumnRowKindSupport_1.STYLED_COLUMN_ROW_KINDS.slice(0, 2),
|
|
239
239
|
styledColumnRowKindSupport_1.STYLED_COLUMN_ROW_KINDS.slice(2),
|
|
240
240
|
].map((rowKindGroup, groupIndex) => ((0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:flex-1 twa:min-w-[220px]", children: (0, jsx_runtime_1.jsx)(FormLayout_1.default, { sizes: ['180px', '1fr'], children: rowKindGroup.map((kind) => {
|
|
@@ -86,7 +86,7 @@ const OnePageWizard = (props) => {
|
|
|
86
86
|
if (section === '-') {
|
|
87
87
|
return (0, jsx_runtime_1.jsx)(React.Fragment, {}, index);
|
|
88
88
|
}
|
|
89
|
-
return ((0, jsx_runtime_1.jsx)(Flex_1.Flex, { flexDirection: "column", "data-name": `section-${index}`, className: "twa:min-h-full twa:mr-2", children: (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "ab-OnePageWizard__section twa:flex-1 twa:rounded-standard twa:overflow-auto twa:bg-
|
|
89
|
+
return ((0, jsx_runtime_1.jsx)(Flex_1.Flex, { flexDirection: "column", "data-name": `section-${index}`, className: "twa:min-h-full twa:mr-2", children: (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "ab-OnePageWizard__section twa:flex-1 twa:rounded-standard twa:overflow-auto twa:bg-background", children: section.render(props.data, index) }) }, index));
|
|
90
90
|
};
|
|
91
91
|
const handleNavigation = (0, useKeyboardNavigation_1.useKeyboardNavigation)(setCurrentSection, visibleSections);
|
|
92
92
|
const selectedNodeRef = (0, react_1.useRef)(null);
|
|
@@ -5,9 +5,8 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
6
|
const react_redux_1 = require("react-redux");
|
|
7
7
|
const AdaptableContext_1 = tslib_1.__importDefault(require("./AdaptableContext"));
|
|
8
|
-
const AdaptableComputedCSSVarsContext_1 = require("./AdaptableComputedCSSVarsContext");
|
|
9
8
|
const tooltip_1 = require("../components/ui/tooltip");
|
|
10
9
|
const renderWithAdaptableContext = (children, adaptable) => {
|
|
11
|
-
return ((0, jsx_runtime_1.jsx)(tooltip_1.TooltipProvider, { delay: 300, children: (0, jsx_runtime_1.jsx)(react_redux_1.Provider, { store: adaptable.adaptableStore.TheStore, children: (0, jsx_runtime_1.jsx)(
|
|
10
|
+
return ((0, jsx_runtime_1.jsx)(tooltip_1.TooltipProvider, { delay: 300, children: (0, jsx_runtime_1.jsx)(react_redux_1.Provider, { store: adaptable.adaptableStore.TheStore, children: (0, jsx_runtime_1.jsx)(AdaptableContext_1.default.Provider, { value: adaptable, children: children }) }) }));
|
|
12
11
|
};
|
|
13
12
|
exports.renderWithAdaptableContext = renderWithAdaptableContext;
|
|
@@ -97,7 +97,6 @@ export declare class AdaptableAgGrid implements IAdaptable {
|
|
|
97
97
|
private LicenseService;
|
|
98
98
|
private ChartingService;
|
|
99
99
|
private rowListeners;
|
|
100
|
-
private throttleFilterOnDataChange;
|
|
101
100
|
private debouncedSetSelectedRows;
|
|
102
101
|
private debouncedSetSelectedCells;
|
|
103
102
|
private agGridListenerKeydown;
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AdaptableAgGrid = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const throttle_1 = tslib_1.__importDefault(require("../Utilities/utils/throttle"));
|
|
6
5
|
const debounce_1 = tslib_1.__importDefault(require("../Utilities/utils/debounce"));
|
|
7
6
|
const ag_grid_enterprise_1 = require("ag-grid-enterprise");
|
|
8
7
|
const AdaptableLogger_1 = require("./AdaptableLogger");
|
|
@@ -25,6 +24,7 @@ const ThemeService_1 = require("../Utilities/Services/ThemeService");
|
|
|
25
24
|
const ValidationService_1 = require("../Utilities/Services/ValidationService");
|
|
26
25
|
const ModuleService_1 = require("../Utilities/Services/ModuleService");
|
|
27
26
|
const CalculatedColumnExpressionService_1 = require("../Utilities/Services/CalculatedColumnExpressionService");
|
|
27
|
+
const CalculatedColumnSyntheticChange_1 = require("../Utilities/Services/CalculatedColumnSyntheticChange");
|
|
28
28
|
const QueryLanguageService_1 = require("../Utilities/Services/QueryLanguageService");
|
|
29
29
|
const AlertService_1 = require("../Utilities/Services/AlertService");
|
|
30
30
|
const TeamSharingService_1 = require("../Utilities/Services/TeamSharingService");
|
|
@@ -87,7 +87,6 @@ const ParameterizedAggregationRegistry_1 = require("../Aggregation/Parameterized
|
|
|
87
87
|
const parameterizedAggregationHelpers_1 = require("../Aggregation/parameterizedAggregationHelpers");
|
|
88
88
|
const parameterizedAggregationHeader_1 = require("../Aggregation/parameterizedAggregationHeader");
|
|
89
89
|
const RowFormService_1 = require("../Utilities/Services/RowFormService");
|
|
90
|
-
const Enums_1 = require("../AdaptableState/Common/Enums");
|
|
91
90
|
const EnvVars_1 = require("../EnvVars");
|
|
92
91
|
const AdaptableUpgradeHelper_1 = require("../migration/AdaptableUpgradeHelper");
|
|
93
92
|
const Modal_1 = require("../components/Modal");
|
|
@@ -208,7 +207,6 @@ class AdaptableAgGrid {
|
|
|
208
207
|
LicenseService;
|
|
209
208
|
ChartingService;
|
|
210
209
|
rowListeners;
|
|
211
|
-
throttleFilterOnDataChange;
|
|
212
210
|
debouncedSetSelectedRows;
|
|
213
211
|
debouncedSetSelectedCells;
|
|
214
212
|
agGridListenerKeydown;
|
|
@@ -1703,12 +1701,6 @@ class AdaptableAgGrid {
|
|
|
1703
1701
|
}), true);
|
|
1704
1702
|
gridContainerElement.addEventListener('mouseleave', (this.agGridListenerMouseLeave = (event) => this._emit('MouseLeave', event)));
|
|
1705
1703
|
}
|
|
1706
|
-
this.throttleFilterOnDataChange = (0, throttle_1.default)(
|
|
1707
|
-
// the extra function is to make sure we have a reference to ag-grid-api
|
|
1708
|
-
() => this.agGridAdapter.getAgGridApi()?.onFilterChanged(), this.adaptableOptions.filterOptions.filterActionOnDataChange.throttleDelay, {
|
|
1709
|
-
trailing: true,
|
|
1710
|
-
leading: false,
|
|
1711
|
-
});
|
|
1712
1704
|
/**
|
|
1713
1705
|
* Use Case: User has started inline editing but its disabled in Row Form Options
|
|
1714
1706
|
* Action: Stop editing
|
|
@@ -3817,7 +3809,6 @@ class AdaptableAgGrid {
|
|
|
3817
3809
|
this.listenerCellSelectionChanged = null;
|
|
3818
3810
|
this.listenerGlobalSetRowSelection = null;
|
|
3819
3811
|
this.listenerSortChanged = null;
|
|
3820
|
-
this.throttleFilterOnDataChange = null;
|
|
3821
3812
|
const liveGridOptions = this.agGridAdapter.DANGER_getLiveGridOptions();
|
|
3822
3813
|
if (liveGridOptions) {
|
|
3823
3814
|
this.agGridOptionsService.revertGridOptionsPropertiesToUserValue(liveGridOptions, [
|
|
@@ -4137,6 +4128,7 @@ class AdaptableAgGrid {
|
|
|
4137
4128
|
* There are a few things we need to do AFTER we edit a cell and it makes sense to put them in one place
|
|
4138
4129
|
*/
|
|
4139
4130
|
performPostEditChecks(rowNode, cellDataChangedInfos) {
|
|
4131
|
+
cellDataChangedInfos = (0, CalculatedColumnSyntheticChange_1.expandCellDataChangedInfosWithCalculatedColumns)(this.api, cellDataChangedInfos);
|
|
4140
4132
|
cellDataChangedInfos.forEach((cellDataChangedInfo) => {
|
|
4141
4133
|
// if a Cell Data Change is undone, log to the Console
|
|
4142
4134
|
if (cellDataChangedInfo.trigger === 'undo') {
|
|
@@ -4294,14 +4286,7 @@ class AdaptableAgGrid {
|
|
|
4294
4286
|
}
|
|
4295
4287
|
}
|
|
4296
4288
|
filterOnDataChange() {
|
|
4297
|
-
|
|
4298
|
-
Enums_1.FilterOnDataChangeOptions.Always) {
|
|
4299
|
-
this.agGridAdapter.getAgGridApi()?.onFilterChanged();
|
|
4300
|
-
}
|
|
4301
|
-
else if (this.adaptableOptions.filterOptions.filterActionOnDataChange.applyFilter ==
|
|
4302
|
-
Enums_1.FilterOnDataChangeOptions.Throttle) {
|
|
4303
|
-
this.throttleFilterOnDataChange();
|
|
4304
|
-
}
|
|
4289
|
+
this.agGridAdapter.getAgGridApi()?.onFilterChanged();
|
|
4305
4290
|
}
|
|
4306
4291
|
refreshLayout() {
|
|
4307
4292
|
const columnDefs = this.agGridAdapter.getColumnDefinitionsInclSpecialColumns();
|
|
@@ -956,10 +956,7 @@ class AgGridColumnAdapter {
|
|
|
956
956
|
// 1. evaluate EditOptions.isCellEditable if provided
|
|
957
957
|
if (this.adaptableApi.gridApi.internalApi.hasCellEditableAccordingToEditOptions()) {
|
|
958
958
|
const gridCell = this.adaptableApi.gridApi.getGridCellFromRowNode(params.node, params.column.getColId());
|
|
959
|
-
|
|
960
|
-
if (editOptionsEditability) {
|
|
961
|
-
return editOptionsEditability;
|
|
962
|
-
}
|
|
959
|
+
return this.adaptableApi.gridApi.internalApi.isCellEditableAccordingToEditOptions(gridCell, getOriginalColDefEditable());
|
|
963
960
|
}
|
|
964
961
|
// 2. otherwise, fallback to colDef.editable
|
|
965
962
|
return getOriginalColDefEditable();
|
|
@@ -209,10 +209,12 @@ function AdaptableFormComponent({ formDef, data, onChange, onButtonClick, displa
|
|
|
209
209
|
break;
|
|
210
210
|
}
|
|
211
211
|
case 'select': {
|
|
212
|
-
const
|
|
212
|
+
const optionItems = resolveOptions(field);
|
|
213
|
+
const items = optionItems.map((item) => ({
|
|
213
214
|
value: item.value,
|
|
214
215
|
label: item.label,
|
|
215
216
|
}));
|
|
217
|
+
const selectPlaceholder = (0, AdaptableForm_1.resolveSelectPlaceholder)(field, optionItems);
|
|
216
218
|
// The underlying SingleCombobox / MultiCombobox manage their own
|
|
217
219
|
// popup-based focus; we wrap them in a labelled `role="group"` so
|
|
218
220
|
// assistive tech announces "<label> group" when focus enters and
|
|
@@ -230,10 +232,10 @@ function AdaptableFormComponent({ formDef, data, onChange, onButtonClick, displa
|
|
|
230
232
|
// anything else (e.g. legacy string defaults) to [] so the
|
|
231
233
|
// underlying combobox never receives a non-array value.
|
|
232
234
|
const selected = Array.isArray(value) ? value : [];
|
|
233
|
-
control = ((0, jsx_runtime_1.jsx)(Flex_1.Box, { ...groupProps, children: (0, jsx_runtime_1.jsx)(Combobox_1.MultiCombobox, { items: items, onValueChange: (newValues) => setFieldValue(field.name, newValues), value: selected, disabled: isDisabled, placeholder:
|
|
235
|
+
control = ((0, jsx_runtime_1.jsx)(Flex_1.Box, { ...groupProps, children: (0, jsx_runtime_1.jsx)(Combobox_1.MultiCombobox, { items: items, onValueChange: (newValues) => setFieldValue(field.name, newValues), value: selected, disabled: isDisabled, placeholder: selectPlaceholder }) }));
|
|
234
236
|
}
|
|
235
237
|
else {
|
|
236
|
-
control = ((0, jsx_runtime_1.jsx)(Flex_1.Box, { ...groupProps, children: (0, jsx_runtime_1.jsx)(Combobox_1.SingleCombobox, { items: items, onValueChange: (newValue) => setFieldValue(field.name, newValue), value: value, disabled: isDisabled, placeholder:
|
|
238
|
+
control = ((0, jsx_runtime_1.jsx)(Flex_1.Box, { ...groupProps, children: (0, jsx_runtime_1.jsx)(Combobox_1.SingleCombobox, { items: items, onValueChange: (newValue) => setFieldValue(field.name, (0, AdaptableForm_1.resolveSelectValueAfterClear)(field, newValue)), value: value, disabled: isDisabled, placeholder: selectPlaceholder }) }));
|
|
237
239
|
}
|
|
238
240
|
break;
|
|
239
241
|
}
|
|
@@ -359,10 +361,13 @@ function AdaptableFormComponent({ formDef, data, onChange, onButtonClick, displa
|
|
|
359
361
|
}
|
|
360
362
|
return items
|
|
361
363
|
.filter((field) => !(0, AdaptableForm_1.isAdaptableFormFieldHidden)(field, data, context))
|
|
362
|
-
.map((field) => {
|
|
364
|
+
.map((field, index) => {
|
|
363
365
|
const useFor = field.fieldType !== 'radio' && field.fieldType !== 'textOutput';
|
|
364
366
|
const requiredMarker = field.required ? ((0, jsx_runtime_1.jsx)("span", { className: "ab-Form_required-marker", "aria-hidden": "true", children: ' *' })) : null;
|
|
365
|
-
return ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "row", alignItems: "center", style: {
|
|
367
|
+
return ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "row", alignItems: "center", style: {
|
|
368
|
+
columnGap: 'var(--ab-base-space)',
|
|
369
|
+
marginLeft: index > 0 ? 'var(--ab-base-space)' : undefined,
|
|
370
|
+
}, children: [field.label ? (useFor ? ((0, jsx_runtime_1.jsxs)("label", { id: fieldLabelId(field), htmlFor: fieldDomId(field), className: "ab-FormLayout--inline_field-label", title: field.tooltip, children: [field.label, requiredMarker] })) : ((0, jsx_runtime_1.jsxs)(Flex_1.Box, { id: fieldLabelId(field), className: "ab-FormLayout--inline_field-label", title: field.tooltip, children: [field.label, requiredMarker] }))) : null, renderField(field)] }, field.name));
|
|
366
371
|
});
|
|
367
372
|
};
|
|
368
373
|
const renderRowsEntry = (entry, index) => {
|
|
@@ -8,7 +8,7 @@ const clsx_1 = tslib_1.__importDefault(require("clsx"));
|
|
|
8
8
|
const Flex_1 = require("../Flex");
|
|
9
9
|
function Card(props) {
|
|
10
10
|
const { shadow = true, children, className, style, gap = 2 } = props;
|
|
11
|
-
return ((0, jsx_runtime_1.jsx)(Flex_1.Box, { className: (0, clsx_1.default)('twa:bg-
|
|
11
|
+
return ((0, jsx_runtime_1.jsx)(Flex_1.Box, { className: (0, clsx_1.default)('twa:bg-background twa:text-foreground', 'ab-Card', 'twa:text-3', 'twa:rounded-standard twa:p-2', 'twa:flex twa:flex-col', {
|
|
12
12
|
'twa:shadow-sm': shadow,
|
|
13
13
|
'twa:gap-0': gap === 0,
|
|
14
14
|
'twa:gap-1': gap === 1,
|
|
@@ -40,16 +40,16 @@ function VirtualizedList({ open, virtualizerRef, showItemTooltip, renderCheckbox
|
|
|
40
40
|
return null;
|
|
41
41
|
}
|
|
42
42
|
const isUncreatedCreatable = item.creatable && !item.created;
|
|
43
|
-
const
|
|
44
|
-
const tooltipText =
|
|
43
|
+
const itemText = (0, comboboxUtils_1.getItemTextLabel)(item);
|
|
44
|
+
const tooltipText = showItemTooltip && itemText != null
|
|
45
45
|
? isUncreatedCreatable
|
|
46
|
-
? `Create "${
|
|
47
|
-
:
|
|
46
|
+
? `Create "${itemText}"`
|
|
47
|
+
: itemText
|
|
48
48
|
: undefined;
|
|
49
49
|
const label = isUncreatedCreatable ? `Create "${item.label}"` : item.label;
|
|
50
50
|
const itemLabel = renderItemLabel ? (renderItemLabel(label, item)) : ((0, jsx_runtime_1.jsx)("span", { className: "twa:min-w-0 twa:flex-1 twa:truncate", children: label }));
|
|
51
51
|
const itemContent = isUncreatedCreatable ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(lucide_react_1.PlusIcon, {}), itemLabel] })) : (itemLabel);
|
|
52
|
-
const itemElement = ((0, jsx_runtime_1.jsx)(combobox_1.ComboboxItem, { index: virtualItem.index, "data-index": virtualItem.index, ref: virtualizer.measureElement, value: item, renderCheckboxIndicator: renderCheckboxIndicator, "aria-setsize": filteredItems.length, "aria-posinset": virtualItem.index + 1, style: {
|
|
52
|
+
const itemElement = ((0, jsx_runtime_1.jsx)(combobox_1.ComboboxItem, { index: virtualItem.index, "data-index": virtualItem.index, ref: virtualizer.measureElement, value: item, renderCheckboxIndicator: renderCheckboxIndicator, "aria-setsize": filteredItems.length, "aria-posinset": virtualItem.index + 1, "aria-label": itemText ?? undefined, style: {
|
|
53
53
|
position: 'absolute',
|
|
54
54
|
left: `var(--ab-base-space)`,
|
|
55
55
|
right: `var(--ab-base-space)`,
|
|
@@ -9,7 +9,9 @@ export type ComboboxItemType = {
|
|
|
9
9
|
value: any;
|
|
10
10
|
disabled?: boolean;
|
|
11
11
|
};
|
|
12
|
-
export declare function getItemTextLabel<T extends ComboboxItemType>(item: T
|
|
12
|
+
export declare function getItemTextLabel<T extends ComboboxItemType>(item: T & {
|
|
13
|
+
tooltip?: string;
|
|
14
|
+
}): string;
|
|
13
15
|
export type ComboboxGroupType<T extends ComboboxItemType> = {
|
|
14
16
|
label: React.ReactNode;
|
|
15
17
|
items: T[];
|
|
@@ -45,6 +47,7 @@ export type ComboboxCommonProps<T extends ComboboxItemType> = {
|
|
|
45
47
|
renderItemLabel?: (defaultLabel: React.ReactNode, item: T) => React.ReactNode;
|
|
46
48
|
multiple?: boolean;
|
|
47
49
|
showClear?: boolean;
|
|
50
|
+
clearOnEscape?: boolean;
|
|
48
51
|
searchable?: boolean | 'inline' | 'menulist';
|
|
49
52
|
/**
|
|
50
53
|
* Custom filter function, or `null` to disable built-in filtering
|
|
@@ -12,6 +12,8 @@ function getItemTextLabel(item) {
|
|
|
12
12
|
return item.label;
|
|
13
13
|
if (typeof item.label === 'number')
|
|
14
14
|
return String(item.label);
|
|
15
|
+
if (typeof item.tooltip === 'string')
|
|
16
|
+
return String(item.tooltip);
|
|
15
17
|
return String(item.value);
|
|
16
18
|
}
|
|
17
19
|
function valueToItem(stringValue, lookup) {
|
|
@@ -35,4 +35,5 @@ export declare const MultiCombobox: <T extends ComboboxItemType>(props: MultiCom
|
|
|
35
35
|
export type GridFilterComboboxProps<T extends ComboboxItemType> = Omit<MultiComboboxProps<T>, 'showSelectAllCheckbox' | 'searchable' | 'renderInput' | 'renderInputValues'> & {
|
|
36
36
|
showSelectedCount?: boolean;
|
|
37
37
|
};
|
|
38
|
+
export declare const GRID_FILTER_COMBBOX_ADJUSTMENTS_CLASSNAME: string;
|
|
38
39
|
export declare const GridFilterCombobox: <T extends ComboboxItemType>(props: GridFilterComboboxProps<T>) => React.JSX.Element;
|