@adaptabletools/adaptable 11.3.0 → 12.0.0-canary.0
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/base.css +22 -4
- package/bundle.cjs.js +108 -108
- package/index.css +26 -4
- package/package.json +1 -1
- package/publishTimestamp.d.ts +1 -1
- package/publishTimestamp.js +1 -1
- package/src/AdaptableInterfaces/IAdaptable.d.ts +4 -1
- package/src/AdaptableOptions/ActionOptions.d.ts +1 -0
- package/src/AdaptableOptions/{FormatColumnOptions.js → ActionOptions.js} +0 -0
- package/src/AdaptableOptions/AdaptableFrameworkComponent.d.ts +5 -0
- package/src/AdaptableOptions/AdaptableOptions.d.ts +3 -10
- package/src/AdaptableOptions/AdaptableQLOptions.d.ts +5 -0
- package/src/AdaptableOptions/AlertOptions.d.ts +14 -1
- package/src/AdaptableOptions/ColumnOptions.d.ts +49 -0
- package/src/AdaptableOptions/{MasterDetailAgGridPluginOptions.js → ColumnOptions.js} +0 -0
- package/src/AdaptableOptions/DashboardOptions.d.ts +2 -7
- package/src/AdaptableOptions/DataChangeHistoryOptions.d.ts +19 -0
- package/src/AdaptableOptions/EditOptions.d.ts +2 -2
- package/src/AdaptableOptions/EntitlementOptions.d.ts +7 -1
- package/src/AdaptableOptions/ExportOptions.d.ts +5 -1
- package/src/AdaptableOptions/FilterOptions.d.ts +6 -1
- package/src/AdaptableOptions/GeneralOptions.d.ts +22 -23
- package/src/AdaptableOptions/{MasterDetailAgGridPluginOptions.d.ts → MasterDetailPluginOptions.d.ts} +2 -4
- package/src/{Api/DataSourceApi.js → AdaptableOptions/MasterDetailPluginOptions.js} +0 -0
- package/src/AdaptableOptions/SettingsPanelOptions.d.ts +3 -6
- package/src/AdaptableOptions/ToolPanelOptions.d.ts +2 -49
- package/src/AdaptableOptions/UserInterfaceOptions.d.ts +75 -62
- package/src/Api/AdaptableApi.d.ts +6 -3
- package/src/Api/ColumnApi.d.ts +2 -2
- package/src/Api/ConditionalStyleApi.d.ts +10 -0
- package/src/Api/ConfigApi.d.ts +0 -12
- package/src/Api/DashboardApi.d.ts +6 -19
- package/src/Api/DataSetApi.d.ts +40 -0
- package/src/{PredefinedConfig/DataSourceState.js → Api/DataSetApi.js} +0 -0
- package/src/Api/EventApi.d.ts +15 -1
- package/src/Api/Events/DataSetChanged.d.ts +5 -0
- package/src/{PredefinedConfig/FilterState.js → Api/Events/DataSetChanged.js} +0 -0
- package/src/Api/Events/SearchChanged.d.ts +3 -4
- package/src/Api/FilterApi.d.ts +1 -77
- package/src/Api/GridApi.d.ts +1 -1
- package/src/Api/Implementation/AdaptableApiImpl.d.ts +2 -2
- package/src/Api/Implementation/AdaptableApiImpl.js +3 -3
- package/src/Api/Implementation/AlertApiImpl.js +5 -1
- package/src/Api/Implementation/ApiBase.d.ts +3 -0
- package/src/Api/Implementation/ApiBase.js +6 -0
- package/src/Api/Implementation/ColumnApiImpl.d.ts +2 -2
- package/src/Api/Implementation/ColumnApiImpl.js +2 -2
- package/src/Api/Implementation/ConditionalStyleApiImpl.d.ts +2 -0
- package/src/Api/Implementation/ConditionalStyleApiImpl.js +8 -0
- package/src/Api/Implementation/ConfigApiImpl.d.ts +0 -4
- package/src/Api/Implementation/ConfigApiImpl.js +2 -24
- package/src/Api/Implementation/DashboardApiImpl.d.ts +3 -6
- package/src/Api/Implementation/DashboardApiImpl.js +5 -29
- package/src/Api/Implementation/DataSetApiImpl.d.ts +12 -0
- package/src/Api/Implementation/DataSetApiImpl.js +42 -0
- package/src/Api/Implementation/EventApiImpl.js +1 -0
- package/src/Api/Implementation/FilterApiImpl.d.ts +1 -16
- package/src/Api/Implementation/FilterApiImpl.js +5 -159
- package/src/Api/Implementation/FormatColumnApiImpl.js +1 -1
- package/src/Api/Implementation/GridApiImpl.d.ts +1 -1
- package/src/Api/Implementation/GridApiImpl.js +1 -1
- package/src/Api/Implementation/InternalApiImpl.d.ts +3 -2
- package/src/Api/Implementation/InternalApiImpl.js +14 -3
- package/src/Api/Implementation/LayoutApiImpl.d.ts +18 -1
- package/src/Api/Implementation/LayoutApiImpl.js +172 -0
- package/src/Api/Implementation/PredicateApiImpl.js +1 -1
- package/src/Api/Implementation/SmartEditApiImpl.d.ts +3 -1
- package/src/Api/Implementation/SmartEditApiImpl.js +6 -0
- package/src/Api/Implementation/TeamSharingApiImpl.d.ts +5 -3
- package/src/Api/Implementation/TeamSharingApiImpl.js +28 -10
- package/src/Api/Implementation/UserInterfaceApiImpl.d.ts +1 -1
- package/src/Api/Implementation/UserInterfaceApiImpl.js +4 -4
- package/src/Api/InternalApi.d.ts +3 -2
- package/src/Api/LayoutApi.d.ts +88 -1
- package/src/Api/SmartEditApi.d.ts +8 -2
- package/src/Api/TeamSharingApi.d.ts +18 -5
- package/src/Api/UserInterfaceApi.d.ts +4 -4
- package/src/PredefinedConfig/AdaptableState.d.ts +0 -4
- package/src/PredefinedConfig/Common/AdaptableButton.d.ts +3 -3
- package/src/PredefinedConfig/Common/AdaptableColumn.d.ts +5 -1
- package/src/PredefinedConfig/Common/AdaptablePredicate.js +18 -1
- package/src/PredefinedConfig/{FilterState.d.ts → Common/ColumnFilter.d.ts} +2 -33
- package/src/PredefinedConfig/Common/ColumnFilter.js +2 -0
- package/src/PredefinedConfig/Common/Enums.d.ts +2 -2
- package/src/PredefinedConfig/Common/Enums.js +1 -1
- package/src/PredefinedConfig/Common/Types.d.ts +6 -5
- package/src/PredefinedConfig/Common/Types.js +2 -3
- package/src/PredefinedConfig/LayoutState.d.ts +5 -0
- package/src/PredefinedConfig/PredefinedConfig.d.ts +0 -10
- package/src/PredefinedConfig/StatusBarState.d.ts +1 -2
- package/src/PredefinedConfig/SystemState.d.ts +3 -0
- package/src/Redux/ActionsReducers/LayoutRedux.d.ts +47 -0
- package/src/Redux/ActionsReducers/LayoutRedux.js +135 -1
- package/src/Redux/ActionsReducers/SystemRedux.d.ts +22 -0
- package/src/Redux/ActionsReducers/SystemRedux.js +39 -1
- package/src/Redux/Store/AdaptableStore.js +37 -39
- package/src/Strategy/AlertModule.d.ts +11 -0
- package/src/Strategy/AlertModule.js +14 -0
- package/src/Strategy/CellSummaryModule.d.ts +3 -0
- package/src/Strategy/CellSummaryModule.js +28 -14
- package/src/Strategy/DataSetModule.d.ts +25 -0
- package/src/Strategy/DataSetModule.js +65 -0
- package/src/Strategy/ExportModule.js +6 -1
- package/src/Strategy/FilterModule.d.ts +7 -11
- package/src/Strategy/FilterModule.js +24 -15
- package/src/Strategy/FlashingCellModule.d.ts +1 -1
- package/src/Strategy/FlashingCellModule.js +2 -2
- package/src/Strategy/Interface/IModule.d.ts +3 -1
- package/src/Strategy/LayoutModule.js +24 -2
- package/src/Strategy/SmartEditModule.js +1 -1
- package/src/Strategy/StatusBarModule.js +1 -3
- package/src/Strategy/TeamSharingModule.js +1 -1
- package/src/Strategy/ToolPanelModule.js +1 -4
- package/src/Utilities/Constants/GeneralConstants.d.ts +6 -2
- package/src/Utilities/Constants/GeneralConstants.js +6 -2
- package/src/Utilities/Constants/ModuleConstants.d.ts +1 -1
- package/src/Utilities/Constants/ModuleConstants.js +2 -2
- package/src/Utilities/Defaults/DefaultAdaptableOptions.js +15 -15
- package/src/Utilities/Defaults/DefaultSettingsPanel.js +1 -1
- package/src/Utilities/Helpers/AdaptableHelper.js +3 -1
- package/src/Utilities/ObjectFactory.d.ts +3 -6
- package/src/Utilities/ObjectFactory.js +3 -7
- package/src/Utilities/Services/EntitlementService.js +7 -1
- package/src/Utilities/Services/ModuleService.js +1 -1
- package/src/Utilities/Services/ReportService.js +2 -3
- package/src/Utilities/Services/TeamSharingService.js +4 -4
- package/src/View/AdaptablePopover/index.d.ts +1 -0
- package/src/View/AdaptablePopover/index.js +5 -6
- package/src/View/AdaptableView.js +1 -1
- package/src/View/AdaptableViewFactory.js +2 -2
- package/src/View/Alert/ActiveAlertsPanel.d.ts +2 -0
- package/src/View/Alert/ActiveAlertsPanel.js +15 -0
- package/src/View/Alert/AlertStatusSubPanel.js +3 -8
- package/src/View/Alert/AlertViewPanel.js +2 -2
- package/src/View/Alert/Wizard/AlertDisplayWizardSection.js +1 -1
- package/src/View/BulkUpdate/BulkUpdateViewPanel.js +1 -1
- package/src/View/CellSummary/CellSummaryDetails.js +2 -2
- package/src/View/CellSummary/CellSummaryPopover.d.ts +2 -4
- package/src/View/CellSummary/CellSummaryPopover.js +3 -6
- package/src/View/CellSummary/CellSummaryPopup.js +8 -0
- package/src/View/CellSummary/CellSummaryStatusBarSubPanelPopover.js +1 -1
- package/src/View/CellSummary/CellSummaryStatusPanel.js +2 -2
- package/src/View/CellSummary/CellSummaryViewPanel.js +1 -1
- package/src/View/Components/AdaptableObjectList/AdaptableObjectCompactList.js +18 -8
- package/src/View/Components/AdaptableObjectList/AdaptableObjectList.js +1 -2
- package/src/View/Components/ExternalRenderer.d.ts +3 -6
- package/src/View/Components/ExternalRenderer.js +5 -5
- package/src/View/Components/FilterForm/FilterForm.d.ts +1 -1
- package/src/View/Components/FilterForm/FilterForm.js +9 -7
- package/src/View/Components/FilterForm/QuickFilterForm.d.ts +1 -1
- package/src/View/Components/FilterForm/QuickFilterForm.js +6 -5
- package/src/View/Components/FilterForm/getDefaultColumnFilterPredicate.d.ts +1 -1
- package/src/View/Components/Popups/AdaptablePopupAlert.d.ts +0 -2
- package/src/View/Components/Popups/AdaptablePopupAlert.js +13 -11
- package/src/View/Components/Popups/AdaptableToaster.js +29 -9
- package/src/View/Components/ToolPanel/AdaptableToolPanel.js +3 -2
- package/src/View/Components/ToolPanel/CustomToolPanelContent.js +11 -9
- package/src/View/Dashboard/CustomDashboardButton.d.ts +11 -0
- package/src/View/Dashboard/CustomDashboardButton.js +47 -0
- package/src/View/Dashboard/CustomToolbarWrapper.d.ts +1 -0
- package/src/View/Dashboard/CustomToolbarWrapper.js +30 -11
- package/src/View/Dashboard/Dashboard.d.ts +1 -0
- package/src/View/Dashboard/Dashboard.js +8 -34
- package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +19 -36
- package/src/View/DataChangeHistory/buildActionColumnButton.d.ts +3 -0
- package/src/View/DataChangeHistory/buildActionColumnButton.js +70 -0
- package/src/View/DataSet/DataSetSelector.d.ts +7 -0
- package/src/View/DataSet/DataSetSelector.js +18 -0
- package/src/View/DataSet/DataSetStatusPanelPopover.d.ts +2 -0
- package/src/View/DataSet/DataSetStatusPanelPopover.js +19 -0
- package/src/View/DataSet/DataSetViewPanel.d.ts +19 -0
- package/src/View/DataSet/DataSetViewPanel.js +58 -0
- package/src/View/Filter/ActiveFiltersPanel.js +1 -1
- package/src/View/Filter/FilterSummary.d.ts +5 -5
- package/src/View/Filter/FilterSummary.js +6 -5
- package/src/View/Filter/FilterViewPanel.d.ts +4 -4
- package/src/View/Filter/FilterViewPanel.js +11 -14
- package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +1 -1
- package/src/View/GridInfo/GridInfoPopup.js +1 -1
- package/src/View/Layout/LayoutStatusBarSubPanelPopover.js +6 -24
- package/src/View/Layout/Wizard/LayoutEditor/index.js +1 -1
- package/src/View/Layout/Wizard/LayoutEditorWizard.d.ts +1 -0
- package/src/View/SmartEdit/SmartEditPopup.js +2 -2
- package/src/View/SmartEdit/SmartEditViewPanel.js +2 -2
- package/src/View/SpecialColumnSettingsWizardStep.js +1 -1
- package/src/View/StatusBar/AdaptableStatusBar.js +1 -1
- package/src/View/StatusBar/StatusBarPanel.d.ts +1 -0
- package/src/View/StatusBar/StatusBarPanel.js +5 -4
- package/src/View/Theme/ThemeStatusPanelPopover.js +5 -25
- package/src/View/UIHelper.d.ts +4 -4
- package/src/View/UIHelper.js +4 -4
- package/src/agGrid/ActionColumnRenderer.js +3 -2
- package/src/agGrid/Adaptable.d.ts +4 -2
- package/src/agGrid/Adaptable.js +79 -52
- package/src/agGrid/FilterWrapper.js +1 -1
- package/src/agGrid/agGridHelper.d.ts +6 -6
- package/src/agGrid/agGridHelper.js +34 -56
- package/src/agGrid/agGridMenuHelper.js +4 -1
- package/src/components/AdaptableFormComponent/AdaptableFormComponent.js +3 -2
- package/src/components/Dashboard/DashboardToolbar.js +2 -2
- package/src/components/SelectList.d.ts +10 -0
- package/src/components/SelectList.js +9 -0
- package/src/components/icons/{data-source.d.ts → data-set.d.ts} +0 -0
- package/src/components/icons/{data-source.js → data-set.js} +0 -0
- package/src/components/icons/index.js +2 -2
- package/src/metamodel/adaptable.metamodel.d.ts +162 -77
- package/src/metamodel/adaptable.metamodel.js +422 -375
- package/src/types.d.ts +15 -12
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/src/AdaptableOptions/FormatColumnOptions.d.ts +0 -10
- package/src/Api/DataSourceApi.d.ts +0 -58
- package/src/Api/Implementation/DataSourceApiImpl.d.ts +0 -15
- package/src/Api/Implementation/DataSourceApiImpl.js +0 -51
- package/src/PredefinedConfig/DataSourceState.d.ts +0 -34
- package/src/Redux/ActionsReducers/DataSourceRedux.d.ts +0 -42
- package/src/Redux/ActionsReducers/DataSourceRedux.js +0 -76
- package/src/Redux/ActionsReducers/FilterRedux.d.ts +0 -70
- package/src/Redux/ActionsReducers/FilterRedux.js +0 -126
- package/src/Strategy/DataSourceModule.d.ts +0 -20
- package/src/Strategy/DataSourceModule.js +0 -56
- package/src/View/DataSource/DataSourceViewPanel.d.ts +0 -19
- package/src/View/DataSource/DataSourceViewPanel.js +0 -69
- package/src/View/DataSource/Wizard/DataSourceSettingsSummary.d.ts +0 -2
- package/src/View/DataSource/Wizard/DataSourceSettingsSummary.js +0 -17
- package/src/View/DataSource/Wizard/DataSourceSettingsWizard.d.ts +0 -8
- package/src/View/DataSource/Wizard/DataSourceSettingsWizard.js +0 -42
- package/src/View/DataSource/Wizard/DataSourceWizard.d.ts +0 -8
- package/src/View/DataSource/Wizard/DataSourceWizard.js +0 -53
|
@@ -3,7 +3,8 @@ import { LayoutApi } from '../LayoutApi';
|
|
|
3
3
|
import { LayoutState, Layout } from '../../PredefinedConfig/LayoutState';
|
|
4
4
|
import { AdaptableColumn } from '../../PredefinedConfig/Common/AdaptableColumn';
|
|
5
5
|
import { ColumnSort } from '../../PredefinedConfig/Common/ColumnSort';
|
|
6
|
-
import { LayoutAssociatedObject } from '../../types';
|
|
6
|
+
import { ColumnFilter, LayoutAssociatedObject } from '../../types';
|
|
7
|
+
import { RowNode } from '@ag-grid-community/all-modules';
|
|
7
8
|
export declare class LayoutApiImpl extends ApiBase implements LayoutApi {
|
|
8
9
|
getLayoutState(): LayoutState;
|
|
9
10
|
shouldAutoSaveLayout: (layout?: Layout) => boolean;
|
|
@@ -42,4 +43,20 @@ export declare class LayoutApiImpl extends ApiBase implements LayoutApi {
|
|
|
42
43
|
isCurrentLayoutDefault(): boolean;
|
|
43
44
|
areExpandedRowGroupsSavedInLayouts(): boolean;
|
|
44
45
|
isObjectAvailableInCurrentLayout(adaptableObject: LayoutAssociatedObject): boolean;
|
|
46
|
+
getAllColumnFilter(): ColumnFilter[];
|
|
47
|
+
getColumnFilterById(id: ColumnFilter['Uuid']): ColumnFilter;
|
|
48
|
+
setColumnFilter(columnFilters: ColumnFilter[]): ColumnFilter[] | null;
|
|
49
|
+
clearColumnFilter(columnFilter: ColumnFilter): void;
|
|
50
|
+
clearColumnFilterByColumns(columns: string[]): void;
|
|
51
|
+
clearColumnFilterByColumn(column: string): void;
|
|
52
|
+
clearAllColumnFilter(): void;
|
|
53
|
+
clearAndSetColumnFilter(columnFilters: ColumnFilter[]): void;
|
|
54
|
+
getAllColumnFilterForColumn(column: string): ColumnFilter[];
|
|
55
|
+
createColumnFilterForCell(columnId: string, primarykeyValues: any[]): ColumnFilter | null;
|
|
56
|
+
columnFilterToString(columnFilter: ColumnFilter): string;
|
|
57
|
+
columnFiltersToString(columnFilters: ColumnFilter[]): string;
|
|
58
|
+
evaluateColumnFilter(columnFilter: ColumnFilter, node: RowNode): boolean;
|
|
59
|
+
removeColumnFromCurrentLayout(columnId: string): void;
|
|
60
|
+
removeColumnFromAllLayouts(columnId: string): void;
|
|
61
|
+
removeColumnFromLayout(columnId: string, layoutName: string): void;
|
|
45
62
|
}
|
|
@@ -321,5 +321,177 @@ class LayoutApiImpl extends ApiBase_1.ApiBase {
|
|
|
321
321
|
? true
|
|
322
322
|
: (_a = adaptableObject.Tags) === null || _a === void 0 ? void 0 : _a.map((tag) => tag).includes(this.getCurrentLayoutName());
|
|
323
323
|
}
|
|
324
|
+
getAllColumnFilter() {
|
|
325
|
+
var _a;
|
|
326
|
+
const currentLayout = this.getCurrentLayout();
|
|
327
|
+
return (_a = currentLayout.ColumnFilters) !== null && _a !== void 0 ? _a : [];
|
|
328
|
+
}
|
|
329
|
+
getColumnFilterById(id) {
|
|
330
|
+
var _a;
|
|
331
|
+
return (_a = this.getAllColumnFilter()) === null || _a === void 0 ? void 0 : _a.find((columnFilter) => columnFilter.Uuid === id);
|
|
332
|
+
}
|
|
333
|
+
setColumnFilter(columnFilters) {
|
|
334
|
+
columnFilters.forEach((columnFilter) => {
|
|
335
|
+
if (!columnFilter.Predicate) {
|
|
336
|
+
LoggingHelper_1.LogAdaptableWarning('Column Filter has no Predicate', columnFilter);
|
|
337
|
+
}
|
|
338
|
+
else {
|
|
339
|
+
const isValidPredicate = this.adaptable.api.predicateApi.isValidPredicate(columnFilter.Predicate);
|
|
340
|
+
if (!isValidPredicate) {
|
|
341
|
+
LoggingHelper_1.LogAdaptableWarning('Column Filter Predicate is not valid', columnFilter);
|
|
342
|
+
}
|
|
343
|
+
else {
|
|
344
|
+
this.addUidToAdaptableObject(columnFilter);
|
|
345
|
+
if (this.getAllColumnFilter().find((cf) => cf.ColumnId == columnFilter.ColumnId)) {
|
|
346
|
+
this.dispatchAction(LayoutRedux.LayoutColumnFilterSet(columnFilter));
|
|
347
|
+
}
|
|
348
|
+
else {
|
|
349
|
+
this.dispatchAction(LayoutRedux.LayoutColumnFilterAdd(columnFilter));
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
return columnFilters === null || columnFilters === void 0 ? void 0 : columnFilters.map((columnFilter) => this.getColumnFilterById(columnFilter.Uuid));
|
|
353
|
+
}
|
|
354
|
+
});
|
|
355
|
+
return null;
|
|
356
|
+
}
|
|
357
|
+
clearColumnFilter(columnFilter) {
|
|
358
|
+
this.dispatchAction(LayoutRedux.LayoutColumnFilterClear(columnFilter));
|
|
359
|
+
}
|
|
360
|
+
clearColumnFilterByColumns(columns) {
|
|
361
|
+
columns.forEach((c) => {
|
|
362
|
+
this.clearColumnFilterByColumn(c);
|
|
363
|
+
});
|
|
364
|
+
}
|
|
365
|
+
clearColumnFilterByColumn(column) {
|
|
366
|
+
let columnFiltersForColumn = this.getAllColumnFilterForColumn(column);
|
|
367
|
+
if (columnFiltersForColumn) {
|
|
368
|
+
columnFiltersForColumn.forEach((cf) => {
|
|
369
|
+
this.dispatchAction(LayoutRedux.LayoutColumnFilterClear(cf));
|
|
370
|
+
});
|
|
371
|
+
this.adaptable.clearColumnFiltering([column]);
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
clearAllColumnFilter() {
|
|
375
|
+
this.dispatchAction(LayoutRedux.LayoutColumnFilterClearAll());
|
|
376
|
+
this.adaptable.clearGridFiltering();
|
|
377
|
+
}
|
|
378
|
+
clearAndSetColumnFilter(columnFilters) {
|
|
379
|
+
this.clearAllColumnFilter();
|
|
380
|
+
columnFilters.forEach((columnFilter) => {
|
|
381
|
+
if (this.getAllColumnFilter().find((cf) => cf.ColumnId == columnFilter.ColumnId)) {
|
|
382
|
+
this.dispatchAction(LayoutRedux.LayoutColumnFilterSet(columnFilter));
|
|
383
|
+
}
|
|
384
|
+
else {
|
|
385
|
+
this.dispatchAction(LayoutRedux.LayoutColumnFilterAdd(columnFilter));
|
|
386
|
+
}
|
|
387
|
+
});
|
|
388
|
+
}
|
|
389
|
+
getAllColumnFilterForColumn(column) {
|
|
390
|
+
let columnFilters = this.getAllColumnFilter();
|
|
391
|
+
if (columnFilters) {
|
|
392
|
+
return columnFilters.filter((cf) => cf.ColumnId == column);
|
|
393
|
+
}
|
|
394
|
+
else {
|
|
395
|
+
return [];
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
createColumnFilterForCell(columnId, primarykeyValues) {
|
|
399
|
+
let cellValues = [];
|
|
400
|
+
let predicateId;
|
|
401
|
+
if (primarykeyValues.length == 1) {
|
|
402
|
+
const normalisedValue = this.adaptable.api.gridApi.getCellNormalisedValue(primarykeyValues[0], columnId);
|
|
403
|
+
if (normalisedValue) {
|
|
404
|
+
cellValues.push(normalisedValue);
|
|
405
|
+
const dataType = this.adaptable.api.columnApi.getColumnDataTypeFromColumnId(columnId);
|
|
406
|
+
if (dataType) {
|
|
407
|
+
if (dataType == 'Number') {
|
|
408
|
+
predicateId = 'Equals';
|
|
409
|
+
}
|
|
410
|
+
else if (dataType == 'Date') {
|
|
411
|
+
predicateId = 'On';
|
|
412
|
+
}
|
|
413
|
+
else if (dataType == 'String') {
|
|
414
|
+
predicateId = 'Is';
|
|
415
|
+
}
|
|
416
|
+
else {
|
|
417
|
+
predicateId = 'Equals';
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
else {
|
|
423
|
+
primarykeyValues.forEach((pk) => {
|
|
424
|
+
const displayValue = this.adaptable.api.gridApi.getCellDisplayValue(pk, columnId);
|
|
425
|
+
if (displayValue && !cellValues.includes(displayValue)) {
|
|
426
|
+
cellValues.push(displayValue);
|
|
427
|
+
}
|
|
428
|
+
});
|
|
429
|
+
predicateId = 'Values';
|
|
430
|
+
}
|
|
431
|
+
const filter = {
|
|
432
|
+
ColumnId: columnId,
|
|
433
|
+
Predicate: {
|
|
434
|
+
PredicateId: predicateId,
|
|
435
|
+
Inputs: [...new Set(cellValues)],
|
|
436
|
+
},
|
|
437
|
+
};
|
|
438
|
+
const [savedFilter] = this.setColumnFilter([filter]) || [null];
|
|
439
|
+
return savedFilter;
|
|
440
|
+
}
|
|
441
|
+
columnFilterToString(columnFilter) {
|
|
442
|
+
const friendlyName = this.adaptable.api.columnApi.getFriendlyNameFromColumnId(columnFilter.ColumnId);
|
|
443
|
+
return ('[' +
|
|
444
|
+
friendlyName +
|
|
445
|
+
'] ' +
|
|
446
|
+
this.adaptable.api.predicateApi.predicateToString(columnFilter.Predicate));
|
|
447
|
+
}
|
|
448
|
+
columnFiltersToString(columnFilters) {
|
|
449
|
+
return columnFilters.map((cf) => this.columnFilterToString(cf)).join(', ');
|
|
450
|
+
}
|
|
451
|
+
evaluateColumnFilter(columnFilter, node) {
|
|
452
|
+
var _a;
|
|
453
|
+
if (!columnFilter.Predicate) {
|
|
454
|
+
return true;
|
|
455
|
+
}
|
|
456
|
+
if ((_a = columnFilter.Predicate.Inputs) === null || _a === void 0 ? void 0 : _a.some((input) => StringExtensions_1.default.IsNullOrEmpty(input))) {
|
|
457
|
+
return true;
|
|
458
|
+
}
|
|
459
|
+
const column = this.adaptable.api.columnApi.getColumnFromId(columnFilter.ColumnId);
|
|
460
|
+
if (!column) {
|
|
461
|
+
return true;
|
|
462
|
+
}
|
|
463
|
+
const gridCell = this.adaptable.api.gridApi.getGridCellFromRowNode(node, columnFilter.ColumnId);
|
|
464
|
+
if (!gridCell) {
|
|
465
|
+
return true;
|
|
466
|
+
}
|
|
467
|
+
let value = gridCell.normalisedValue;
|
|
468
|
+
return this.adaptable.api.predicateApi.handlePredicate(columnFilter.Predicate, {
|
|
469
|
+
value: value,
|
|
470
|
+
oldValue: null,
|
|
471
|
+
displayValue: gridCell.displayValue,
|
|
472
|
+
node,
|
|
473
|
+
column,
|
|
474
|
+
}, true);
|
|
475
|
+
}
|
|
476
|
+
removeColumnFromCurrentLayout(columnId) {
|
|
477
|
+
this.removeColumnFromLayout(columnId, this.getCurrentLayoutName());
|
|
478
|
+
}
|
|
479
|
+
removeColumnFromAllLayouts(columnId) {
|
|
480
|
+
this.getAllLayout().forEach((layout) => {
|
|
481
|
+
this.removeColumnFromLayout(columnId, layout.Name);
|
|
482
|
+
});
|
|
483
|
+
}
|
|
484
|
+
removeColumnFromLayout(columnId, layoutName) {
|
|
485
|
+
const column = this.getAdaptableApi().columnApi.getColumnFromId(columnId);
|
|
486
|
+
if (column) {
|
|
487
|
+
const layout = this.getLayoutByName(layoutName);
|
|
488
|
+
if (layout) {
|
|
489
|
+
if (layout.Columns.includes(columnId)) {
|
|
490
|
+
this.dispatchAction(LayoutRedux.LayouRemoveColumn(layoutName, columnId));
|
|
491
|
+
this.getAdaptableApi().columnApi.hideColumn(columnId);
|
|
492
|
+
}
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
}
|
|
324
496
|
}
|
|
325
497
|
exports.LayoutApiImpl = LayoutApiImpl;
|
|
@@ -15,7 +15,7 @@ class PredicateApiImpl extends ApiBase_1.ApiBase {
|
|
|
15
15
|
return AdaptablePredicate_1.SystemPredicateDefs;
|
|
16
16
|
}
|
|
17
17
|
getCustomPredicateDefs() {
|
|
18
|
-
return this.
|
|
18
|
+
return this.getAdaptableQLOptions().customPredicateDefs;
|
|
19
19
|
}
|
|
20
20
|
getPredicateDefsByModuleScope(moduleScope) {
|
|
21
21
|
return this.getPredicateDefs().filter((p) => p.moduleScope.includes(moduleScope));
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import { ApiBase } from './ApiBase';
|
|
2
|
+
import { MathOperation } from '../../PredefinedConfig/Common/Enums';
|
|
2
3
|
import { SmartEditApi } from '../SmartEditApi';
|
|
3
4
|
import { GridCell } from '../../PredefinedConfig/Selection/GridCell';
|
|
4
5
|
import { SmartEditCustomOperation, SmartEditOperation } from '../../AdaptableOptions/EditOptions';
|
|
5
6
|
export declare class SmartEditApiImpl extends ApiBase implements SmartEditApi {
|
|
6
|
-
setSmartEditOperation(mathOperation:
|
|
7
|
+
setSmartEditOperation(mathOperation: MathOperation): void;
|
|
7
8
|
getSmartEditOperation(): SmartEditOperation;
|
|
8
9
|
setSmartEditValue(smartEditValue: number): void;
|
|
9
10
|
getSmartEditValue(): number;
|
|
10
11
|
showSmartEditPopup(): void;
|
|
11
12
|
applySmartEdit(gridCells: GridCell[]): void;
|
|
12
13
|
getSmartEditCustomOperations(): SmartEditCustomOperation[] | undefined;
|
|
14
|
+
setCustomSmartEditOperation(customOperationName: string): void;
|
|
13
15
|
}
|
|
@@ -28,5 +28,11 @@ class SmartEditApiImpl extends ApiBase_1.ApiBase {
|
|
|
28
28
|
getSmartEditCustomOperations() {
|
|
29
29
|
return this.getEditOptions().smartEditCustomOperations;
|
|
30
30
|
}
|
|
31
|
+
setCustomSmartEditOperation(customOperationName) {
|
|
32
|
+
const customOperation = this.getSmartEditCustomOperations().find((so) => so.name == customOperationName);
|
|
33
|
+
if (customOperation) {
|
|
34
|
+
this.dispatchAction(SystemRedux.SmartEditChangeOperation(customOperation));
|
|
35
|
+
}
|
|
36
|
+
}
|
|
31
37
|
}
|
|
32
38
|
exports.SmartEditApiImpl = SmartEditApiImpl;
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import { ApiBase } from './ApiBase';
|
|
2
2
|
import { TeamSharingApi } from '../TeamSharingApi';
|
|
3
|
-
import {
|
|
3
|
+
import { SharedEntity, AdaptableModule, AdaptableObject, SharedEntityConfig } from '../../types';
|
|
4
4
|
export declare class TeamSharingApiImpl extends ApiBase implements TeamSharingApi {
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
getSharedEntities(): Promise<SharedEntity[]>;
|
|
6
|
+
setSharedEntities(sharedEntities: SharedEntity[]): Promise<boolean>;
|
|
7
|
+
isTeamSharingAvailable(): boolean;
|
|
7
8
|
isTeamSharingActivated(): boolean;
|
|
8
9
|
hasTeamSharingFullRights(): boolean;
|
|
9
10
|
checkForUpdates(): void;
|
|
10
11
|
showTeamSharingPopup(): void;
|
|
11
12
|
fireTeamSharingEntityChangedEvent(sharedEntity: SharedEntity): void;
|
|
12
13
|
shareEntity(entity: AdaptableObject, module: AdaptableModule, sharedEntityConfig: SharedEntityConfig): void;
|
|
14
|
+
unshareEntity(entityId: string): void;
|
|
13
15
|
}
|
|
@@ -8,20 +8,31 @@ const TeamSharingRedux_1 = require("../../Redux/ActionsReducers/TeamSharingRedux
|
|
|
8
8
|
const TeamSharingRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/TeamSharingRedux"));
|
|
9
9
|
const LoggingHelper_1 = require("../../Utilities/Helpers/LoggingHelper");
|
|
10
10
|
class TeamSharingApiImpl extends ApiBase_1.ApiBase {
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
async getSharedEntities() {
|
|
12
|
+
if (!this.isTeamSharingActivated()) {
|
|
13
|
+
LoggingHelper_1.ConsoleLogWarning('Team Sharing is not Activated so Entities cannot be loaded');
|
|
14
|
+
return [];
|
|
15
|
+
}
|
|
16
|
+
return this.adaptable.adaptableOptions.teamSharingOptions.getSharedEntities(this.adaptable.adaptableOptions.adaptableId);
|
|
13
17
|
}
|
|
14
|
-
|
|
15
|
-
|
|
18
|
+
async setSharedEntities(sharedEntities) {
|
|
19
|
+
if (!this.isTeamSharingActivated()) {
|
|
20
|
+
LoggingHelper_1.ConsoleLogWarning('Team Sharing is not Activated so Entities cannot be shared');
|
|
21
|
+
return false;
|
|
22
|
+
}
|
|
23
|
+
await this.adaptable.adaptableOptions.teamSharingOptions.setSharedEntities(this.adaptable.adaptableOptions.adaptableId, sharedEntities);
|
|
24
|
+
return true;
|
|
16
25
|
}
|
|
17
|
-
|
|
26
|
+
isTeamSharingAvailable() {
|
|
27
|
+
var _a, _b, _c;
|
|
18
28
|
return (!this.getAdaptableApi()
|
|
19
29
|
.internalApi.getEntitlementService()
|
|
20
|
-
.isModuleHiddenEntitlement(ModuleConstants.TeamSharingModuleId) &&
|
|
21
|
-
this.adaptable.adaptableOptions.teamSharingOptions &&
|
|
22
|
-
this.adaptable.adaptableOptions.teamSharingOptions.
|
|
23
|
-
|
|
24
|
-
|
|
30
|
+
.isModuleHiddenEntitlement(ModuleConstants.TeamSharingModuleId) && ((_a = this.adaptable.adaptableOptions.teamSharingOptions) === null || _a === void 0 ? void 0 : _a.enableTeamSharing) &&
|
|
31
|
+
!!((_b = this.adaptable.adaptableOptions.teamSharingOptions) === null || _b === void 0 ? void 0 : _b.getSharedEntities) &&
|
|
32
|
+
!!((_c = this.adaptable.adaptableOptions.teamSharingOptions) === null || _c === void 0 ? void 0 : _c.setSharedEntities));
|
|
33
|
+
}
|
|
34
|
+
isTeamSharingActivated() {
|
|
35
|
+
return this.isTeamSharingAvailable();
|
|
25
36
|
}
|
|
26
37
|
hasTeamSharingFullRights() {
|
|
27
38
|
return this.adaptable.api.internalApi
|
|
@@ -50,5 +61,12 @@ class TeamSharingApiImpl extends ApiBase_1.ApiBase {
|
|
|
50
61
|
}
|
|
51
62
|
this.dispatchAction(TeamSharingRedux.TeamSharingShare(entity, module, sharedEntityConfig));
|
|
52
63
|
}
|
|
64
|
+
unshareEntity(entityId) {
|
|
65
|
+
if (!this.isTeamSharingActivated()) {
|
|
66
|
+
LoggingHelper_1.ConsoleLogWarning('Team Sharing is not Activated so Entities cannot be unshared');
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
this.dispatchAction(TeamSharingRedux.TeamSharingRemoveItem(entityId));
|
|
70
|
+
}
|
|
53
71
|
}
|
|
54
72
|
exports.TeamSharingApiImpl = TeamSharingApiImpl;
|
|
@@ -24,6 +24,6 @@ export declare class UserInterfaceApiImpl extends ApiBase implements UserInterfa
|
|
|
24
24
|
addContextMenuItem(userMenuItem: UserMenuItem<ContextMenuContext>): void;
|
|
25
25
|
getEditableCellStyle(): AdaptableStyle | undefined;
|
|
26
26
|
getReadOnlyCellStyle(): AdaptableStyle | undefined;
|
|
27
|
-
getAllActionColumn(): ActionColumn[];
|
|
28
27
|
getAdaptableObjectTags(): AdaptableObjectTag[] | undefined;
|
|
28
|
+
getAllActionColumn(): ActionColumn[];
|
|
29
29
|
}
|
|
@@ -150,10 +150,6 @@ class UserInterfaceApiImpl extends ApiBase_1.ApiBase {
|
|
|
150
150
|
getReadOnlyCellStyle() {
|
|
151
151
|
return this.getUserInterfaceOptions().readOnlyCellStyle;
|
|
152
152
|
}
|
|
153
|
-
getAllActionColumn() {
|
|
154
|
-
var _a;
|
|
155
|
-
return (_a = this.getUserInterfaceOptions().actionColumns) !== null && _a !== void 0 ? _a : [];
|
|
156
|
-
}
|
|
157
153
|
getAdaptableObjectTags() {
|
|
158
154
|
const objectTags = this.getUserInterfaceOptions().objectTags;
|
|
159
155
|
if (objectTags != null && typeof objectTags === 'function') {
|
|
@@ -166,5 +162,9 @@ class UserInterfaceApiImpl extends ApiBase_1.ApiBase {
|
|
|
166
162
|
}
|
|
167
163
|
}
|
|
168
164
|
}
|
|
165
|
+
getAllActionColumn() {
|
|
166
|
+
var _a, _b;
|
|
167
|
+
return (_b = (_a = this.getUserInterfaceOptions().actionOptions) === null || _a === void 0 ? void 0 : _a.actionColumns) !== null && _b !== void 0 ? _b : [];
|
|
168
|
+
}
|
|
169
169
|
}
|
|
170
170
|
exports.UserInterfaceApiImpl = UserInterfaceApiImpl;
|
package/src/Api/InternalApi.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ import { AdaptableOptions } from '../AdaptableOptions/AdaptableOptions';
|
|
|
17
17
|
import { Layout } from '../PredefinedConfig/LayoutState';
|
|
18
18
|
import { AdaptableAlert, AdaptableCellChangedAlert, AdaptableRowChangedAlert } from '../PredefinedConfig/Common/AdaptableAlert';
|
|
19
19
|
import { IDataService } from '../Utilities/Services/Interface/IDataService';
|
|
20
|
-
import { AdaptableMessageType, AlertDefinition, BaseContext, CellDataChangedInfo, EditLookUpPermittedValues, LayoutAssociatedObject, SystemStatusMessageInfo } from '../types';
|
|
20
|
+
import { AdaptableIcon, AdaptableMessageType, AlertDefinition, BaseContext, CellDataChangedInfo, EditLookUpPermittedValues, LayoutAssociatedObject, SharedEntity, SystemStatusMessageInfo } from '../types';
|
|
21
21
|
import { IEntitlementService } from '../Utilities/Services/Interface/IEntitlementService';
|
|
22
22
|
import { AdaptableFlashingCell } from '../PredefinedConfig/Common/AdaptableFlashingCell';
|
|
23
23
|
import { IQueryLanguageService } from '../Utilities/Services/Interface/IQueryLanguageService';
|
|
@@ -117,9 +117,10 @@ export interface InternalApi {
|
|
|
117
117
|
getLabelForButton(button: AdaptableButton<BaseContext>, context: BaseContext): string | undefined;
|
|
118
118
|
getTooltipForButton(button: AdaptableButton<BaseContext>, context: BaseContext): string | undefined;
|
|
119
119
|
getStyleForButton(button: AdaptableButton<BaseContext>, context: BaseContext): ButtonStyle | undefined;
|
|
120
|
+
getIconForButton(button: AdaptableButton<BaseContext>, context: BaseContext): AdaptableIcon | undefined;
|
|
120
121
|
dispatchReduxAction(action: Action): void;
|
|
121
122
|
waitForTeamSharingImportEnd(): Promise<boolean>;
|
|
122
|
-
|
|
123
|
+
getLocalTeamSharingEntities(): SharedEntity[];
|
|
123
124
|
createFrameworkComponent(containerDomNode: HTMLElement, frameworkComponent: AdaptableFrameworkComponent, componentType: 'toolPanel' | 'toolbar' | string): void;
|
|
124
125
|
destroyFrameworkComponent(containerDomNode: HTMLElement, frameworkComponent: AdaptableFrameworkComponent, componentType: 'toolPanel' | 'toolbar' | string): void;
|
|
125
126
|
initializeDataChangeHistory(): void;
|
package/src/Api/LayoutApi.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { RowNode } from '@ag-grid-community/all-modules';
|
|
2
|
+
import { AdaptableColumn, ColumnFilter, ColumnSort, LayoutAssociatedObject } from '../../types';
|
|
2
3
|
import { LayoutState, Layout } from '../PredefinedConfig/LayoutState';
|
|
3
4
|
/**
|
|
4
5
|
* Provides run-time access to the Layout Module and associated state
|
|
@@ -187,4 +188,90 @@ export interface LayoutApi {
|
|
|
187
188
|
* @param adaptableObject object to check
|
|
188
189
|
*/
|
|
189
190
|
isObjectAvailableInCurrentLayout(adaptableObject: LayoutAssociatedObject): boolean;
|
|
191
|
+
/**
|
|
192
|
+
* Retrieves all the Column Filters in the Column Filter State (of Predefined Config)
|
|
193
|
+
* @returns column filters
|
|
194
|
+
*/
|
|
195
|
+
getAllColumnFilter(): ColumnFilter[];
|
|
196
|
+
/**
|
|
197
|
+
* Retrieves ColumnFilter by Id
|
|
198
|
+
* @param id column filter id
|
|
199
|
+
* @returns column filter
|
|
200
|
+
*/
|
|
201
|
+
getColumnFilterById(id: ColumnFilter['Uuid']): ColumnFilter;
|
|
202
|
+
/**
|
|
203
|
+
* Sets Column Filters - will replace filters for existing column and leave other column filters in place
|
|
204
|
+
* @param columnFilters Column Filters to set
|
|
205
|
+
* @returns column filters
|
|
206
|
+
*/
|
|
207
|
+
setColumnFilter(columnFilters: ColumnFilter[]): ColumnFilter[] | null;
|
|
208
|
+
/**
|
|
209
|
+
* Clears given Column Filter
|
|
210
|
+
* @param columnFilter Column Filter to clear
|
|
211
|
+
*/
|
|
212
|
+
clearColumnFilter(columnFilter: ColumnFilter): void;
|
|
213
|
+
/**
|
|
214
|
+
* Clears Column Filter for given Column
|
|
215
|
+
* @param columnId Column for which Column Filter should be cleared
|
|
216
|
+
*/
|
|
217
|
+
clearColumnFilterByColumn(columnId: string): void;
|
|
218
|
+
/**
|
|
219
|
+
* Clears Column Filters for given set of Columns
|
|
220
|
+
* @param columns Columns for which Column Filte should be cleared
|
|
221
|
+
*/
|
|
222
|
+
clearColumnFilterByColumns(columns: string[]): void;
|
|
223
|
+
/**
|
|
224
|
+
* Clears all Column Filters in State
|
|
225
|
+
*/
|
|
226
|
+
clearAllColumnFilter(): void;
|
|
227
|
+
/**
|
|
228
|
+
* Clears existing Column Filters and then sets the new ones
|
|
229
|
+
* @param columnFilters Column Filters to set
|
|
230
|
+
*/
|
|
231
|
+
clearAndSetColumnFilter(columnFilters: ColumnFilter[]): void;
|
|
232
|
+
/**
|
|
233
|
+
* Retrieves all Column Filters for given Column
|
|
234
|
+
* @param columnId column to retrieve Column Filters for
|
|
235
|
+
* @returns column filters
|
|
236
|
+
*/
|
|
237
|
+
getAllColumnFilterForColumn(columnId: string): ColumnFilter[];
|
|
238
|
+
/**
|
|
239
|
+
* Creates new Column Filter on given Column using Primary Key values
|
|
240
|
+
* @param columnId ColumnId to use
|
|
241
|
+
* @param primarykeyValues Primary Key Values to use
|
|
242
|
+
* @returns column filter
|
|
243
|
+
*/
|
|
244
|
+
createColumnFilterForCell(columnId: string, primarykeyValues: any[]): ColumnFilter | null;
|
|
245
|
+
/**
|
|
246
|
+
* Retrieves description of given Column Filter
|
|
247
|
+
* @param columnFilter Column Filter to use
|
|
248
|
+
*/
|
|
249
|
+
columnFilterToString(columnFilter: ColumnFilter): string;
|
|
250
|
+
/**
|
|
251
|
+
* Retrieves descriptions of given Column Filters
|
|
252
|
+
* @param columnFilters Column Filters to use
|
|
253
|
+
*/
|
|
254
|
+
columnFiltersToString(columnFilters: ColumnFilter[]): string;
|
|
255
|
+
/**
|
|
256
|
+
* Calls AdapTableQL to evaluate Filter for given Row
|
|
257
|
+
* @param columnFilter Column Filter to use
|
|
258
|
+
* @param node Row Node to evaluate
|
|
259
|
+
*/
|
|
260
|
+
evaluateColumnFilter(columnFilter: ColumnFilter, node: RowNode): boolean;
|
|
261
|
+
/**
|
|
262
|
+
* Removes a Column from the Current Layout
|
|
263
|
+
* @param columnId Column to remove
|
|
264
|
+
*/
|
|
265
|
+
removeColumnFromCurrentLayout(columnId: string): void;
|
|
266
|
+
/**
|
|
267
|
+
* Removes a Column from all Layouts
|
|
268
|
+
* @param columnId Column to remove
|
|
269
|
+
*/
|
|
270
|
+
removeColumnFromAllLayouts(columnId: string): void;
|
|
271
|
+
/**
|
|
272
|
+
* Removes a Column from a given Layout
|
|
273
|
+
* @param columnId Column to remove
|
|
274
|
+
* @param layoutName layout from which to remove Column
|
|
275
|
+
*/
|
|
276
|
+
removeColumnFromLayout(columnId: string, layoutName: string): void;
|
|
190
277
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { SmartEditOperation } from '../AdaptableOptions/EditOptions';
|
|
2
|
+
import { MathOperation } from '../PredefinedConfig/Common/Enums';
|
|
2
3
|
import { GridCell } from '../PredefinedConfig/Selection/GridCell';
|
|
3
4
|
import { SmartEditCustomOperation } from '../types';
|
|
4
5
|
/**
|
|
@@ -6,10 +7,15 @@ import { SmartEditCustomOperation } from '../types';
|
|
|
6
7
|
**/
|
|
7
8
|
export interface SmartEditApi {
|
|
8
9
|
/**
|
|
9
|
-
* Sets Smart Edit
|
|
10
|
+
* Sets (shipped) Smart Edit Operation: 'Add','Subtract','Multiply','Divide'
|
|
10
11
|
* @param operation operation to run
|
|
11
12
|
*/
|
|
12
|
-
setSmartEditOperation(operation:
|
|
13
|
+
setSmartEditOperation(operation: MathOperation): void;
|
|
14
|
+
/**
|
|
15
|
+
* Sets current Smart Edit Operation to a Custom Operation
|
|
16
|
+
* @param customOperationName name of Custom Smart Edit Operation
|
|
17
|
+
*/
|
|
18
|
+
setCustomSmartEditOperation(customOperationName: string): void;
|
|
13
19
|
/**
|
|
14
20
|
* Gets current Smart Edit Operation
|
|
15
21
|
*/
|
|
@@ -1,22 +1,30 @@
|
|
|
1
1
|
import { AdaptableObject } from '../PredefinedConfig/Common/AdaptableObject';
|
|
2
2
|
import { SharedEntity } from '../PredefinedConfig/TeamSharingState';
|
|
3
|
-
import { AdaptableModule, SharedEntityConfig
|
|
3
|
+
import { AdaptableModule, SharedEntityConfig } from '../types';
|
|
4
4
|
/**
|
|
5
5
|
* Provides run-time access to Team Sharing Module and associated state
|
|
6
6
|
*/
|
|
7
7
|
export interface TeamSharingApi {
|
|
8
8
|
/**
|
|
9
|
-
* Retrieves
|
|
9
|
+
* Retrieves all shared entities which are currently shared. It is an asynchronous operation as it leverages the `TeamSharingOptions.getSharedEntities(...)` method.
|
|
10
10
|
*/
|
|
11
|
-
|
|
11
|
+
getSharedEntities(): Promise<SharedEntity[]>;
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
13
|
+
* Sets the shared entities which are currently shared. It is an asynchronous operation as it leverages the `TeamSharingOptions.setSharedEntities(...)` method.
|
|
14
|
+
* @param sharedEntities the shared entities
|
|
15
|
+
* @return either TRUE if the shared entities were successfully set or FALSE if the shared entities were not set
|
|
14
16
|
*/
|
|
15
|
-
|
|
17
|
+
setSharedEntities(sharedEntities: SharedEntity[]): Promise<boolean>;
|
|
16
18
|
/**
|
|
17
19
|
* Whether Team Sharing is Activated
|
|
20
|
+
*
|
|
21
|
+
* @deprecated use `Adaptable.isTeamSharingAvailable()` instead
|
|
18
22
|
*/
|
|
19
23
|
isTeamSharingActivated(): boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Whether Team Sharing is Available to use
|
|
26
|
+
*/
|
|
27
|
+
isTeamSharingAvailable(): boolean;
|
|
20
28
|
/**
|
|
21
29
|
* Whether current user has full Team Sharing rights (for creating & updating shared items)
|
|
22
30
|
*/
|
|
@@ -41,4 +49,9 @@ export interface TeamSharingApi {
|
|
|
41
49
|
* @param sharedEntityConfig Config info about the Sharing Actions
|
|
42
50
|
*/
|
|
43
51
|
shareEntity(entity: AdaptableObject, module: AdaptableModule, sharedEntityConfig: SharedEntityConfig): void;
|
|
52
|
+
/**
|
|
53
|
+
* Removes an Adaptable Object from the Team Share.
|
|
54
|
+
* @param entityId the ID of the AdaptableObject to be removed from Team Share
|
|
55
|
+
*/
|
|
56
|
+
unshareEntity(entityId: string): void;
|
|
44
57
|
}
|
|
@@ -70,12 +70,12 @@ export interface UserInterfaceApi {
|
|
|
70
70
|
* Returns Style set for ReadOnly cells
|
|
71
71
|
*/
|
|
72
72
|
getReadOnlyCellStyle(): AdaptableStyle | undefined;
|
|
73
|
-
/**
|
|
74
|
-
* Retrieves any Action Columns (provided in User Interface Options)
|
|
75
|
-
*/
|
|
76
|
-
getAllActionColumn(): ActionColumn[];
|
|
77
73
|
/**
|
|
78
74
|
* Retrieves any Object Tags (provided in User Interface Options)
|
|
79
75
|
*/
|
|
80
76
|
getAdaptableObjectTags(): AdaptableObjectTag[] | undefined;
|
|
77
|
+
/**
|
|
78
|
+
* Retrieves any Action Columns (provided in User Interface Options)
|
|
79
|
+
*/
|
|
80
|
+
getAllActionColumn(): ActionColumn[];
|
|
81
81
|
}
|
|
@@ -6,7 +6,6 @@ import { CalculatedColumnState } from './CalculatedColumnState';
|
|
|
6
6
|
import { ConditionalStyleState } from './ConditionalStyleState';
|
|
7
7
|
import { CustomSortState } from './CustomSortState';
|
|
8
8
|
import { DashboardState } from './DashboardState';
|
|
9
|
-
import { DataSourceState } from './DataSourceState';
|
|
10
9
|
import { ExportState } from './ExportState';
|
|
11
10
|
import { FormatColumnState } from './FormatColumnState';
|
|
12
11
|
import { FreeTextColumnState } from './FreeTextColumnState';
|
|
@@ -18,7 +17,6 @@ import { ShortcutState } from './ShortcutState';
|
|
|
18
17
|
import { TeamSharingState } from './TeamSharingState';
|
|
19
18
|
import { ThemeState } from './ThemeState';
|
|
20
19
|
import { ConfigState } from './ConfigState';
|
|
21
|
-
import { FilterState } from './FilterState';
|
|
22
20
|
import { ApplicationState } from './ApplicationState';
|
|
23
21
|
import { ToolPanelState } from './ToolPanelState';
|
|
24
22
|
import { QueryState } from './QueryState';
|
|
@@ -41,9 +39,7 @@ export interface AdaptablePersistentState {
|
|
|
41
39
|
ConditionalStyle: ConditionalStyleState;
|
|
42
40
|
CustomSort: CustomSortState;
|
|
43
41
|
Dashboard: DashboardState;
|
|
44
|
-
DataSource: DataSourceState;
|
|
45
42
|
Export: ExportState;
|
|
46
|
-
Filter: FilterState;
|
|
47
43
|
FormatColumn: FormatColumnState;
|
|
48
44
|
FreeTextColumn: FreeTextColumnState;
|
|
49
45
|
Layout: LayoutState;
|
|
@@ -11,13 +11,13 @@ export interface AdaptableButton<CONTEXT_TYPE extends BaseContext> extends Adapt
|
|
|
11
11
|
*/
|
|
12
12
|
label?: string | ((button: AdaptableButton<CONTEXT_TYPE>, context: CONTEXT_TYPE) => string);
|
|
13
13
|
/**
|
|
14
|
-
* Style for Button - can be object or function
|
|
14
|
+
* Style for Button - can be object or function that provides a `ButtonStyle` object
|
|
15
15
|
*/
|
|
16
16
|
buttonStyle?: ButtonStyle | ((button: AdaptableButton<CONTEXT_TYPE>, context: CONTEXT_TYPE) => ButtonStyle);
|
|
17
17
|
/**
|
|
18
|
-
* Icon
|
|
18
|
+
* Icon for Button - can be object or function that provides a `AdaptableIcon` object
|
|
19
19
|
*/
|
|
20
|
-
icon?: AdaptableIcon;
|
|
20
|
+
icon?: AdaptableIcon | ((button: AdaptableButton<CONTEXT_TYPE>, context: CONTEXT_TYPE) => AdaptableIcon);
|
|
21
21
|
/**
|
|
22
22
|
* Tooltip for Button - can be string or function that provides string
|
|
23
23
|
*/
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import { AdaptableObject } from './AdaptableObject';
|
|
2
|
+
/**
|
|
3
|
+
* The type of the column data
|
|
4
|
+
*/
|
|
5
|
+
export declare type AdaptableColumnDataType = 'String' | 'Number' | 'Boolean' | 'Date' | 'Object' | 'Unknown';
|
|
2
6
|
/**
|
|
3
7
|
* Base class for Adaptable Column containing most important properties
|
|
4
8
|
*/
|
|
@@ -14,7 +18,7 @@ export interface AdaptableColumnBase extends AdaptableObject {
|
|
|
14
18
|
/**
|
|
15
19
|
* DataType of the column
|
|
16
20
|
*/
|
|
17
|
-
dataType:
|
|
21
|
+
dataType: AdaptableColumnDataType;
|
|
18
22
|
}
|
|
19
23
|
export declare const isValidOrderForColumnGroups: ({ oldColumns, newColumns, }: {
|
|
20
24
|
oldColumns: AdaptableColumn[];
|
|
@@ -53,7 +53,24 @@ exports.SystemPredicateDefs = [
|
|
|
53
53
|
icon: { text: '!IN' },
|
|
54
54
|
columnScope: { DataTypes: ['String', 'Number', 'Date'] },
|
|
55
55
|
moduleScope: ['filter'],
|
|
56
|
-
handler: ({
|
|
56
|
+
handler: ({ inputs, column, value }) => {
|
|
57
|
+
// basically negation of IN
|
|
58
|
+
if (inputs.length === 0) {
|
|
59
|
+
return true;
|
|
60
|
+
}
|
|
61
|
+
if (column.dataType === 'Date') {
|
|
62
|
+
return inputs.some((input) => {
|
|
63
|
+
return !isSameDay_1.default(input, value);
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
if (column.dataType === 'Number') {
|
|
67
|
+
return !inputs.includes(value);
|
|
68
|
+
}
|
|
69
|
+
if (column.dataType === 'String') {
|
|
70
|
+
return !inputs.includes(value);
|
|
71
|
+
}
|
|
72
|
+
return true;
|
|
73
|
+
},
|
|
57
74
|
toString: ({ inputs }) => `Exclude (${inputs.join(', ')})`,
|
|
58
75
|
},
|
|
59
76
|
{
|