@adaptabletools/adaptable 12.0.1-canary.0 → 12.0.3
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 +5 -18
- package/bundle.cjs.js +107 -107
- package/index.css +6 -22
- package/package.json +1 -1
- package/publishTimestamp.d.ts +1 -1
- package/publishTimestamp.js +1 -1
- package/src/AdaptableInterfaces/IAdaptable.d.ts +4 -2
- package/src/AdaptableOptions/AdaptableQLOptions.d.ts +1 -1
- package/src/AdaptableOptions/EditOptions.d.ts +6 -9
- package/src/AdaptableOptions/ExportOptions.d.ts +15 -0
- package/src/AdaptableOptions/Glue42PluginOptions.d.ts +1 -1
- package/src/AdaptableOptions/IPushPullPluginOptions.d.ts +1 -3
- package/src/AdaptableOptions/StateOptions.d.ts +9 -23
- package/src/AdaptableOptions/UserInterfaceOptions.d.ts +34 -1
- package/src/Api/ChartingApi.d.ts +19 -2
- package/src/Api/FilterApi.d.ts +7 -2
- package/src/Api/FinanceApi.d.ts +8 -8
- package/src/Api/FormatColumnApi.d.ts +6 -6
- package/src/Api/GridApi.d.ts +1 -1
- package/src/Api/Implementation/ChartingApiImpl.d.ts +6 -0
- package/src/Api/Implementation/ChartingApiImpl.js +17 -0
- package/src/Api/Implementation/ConfigApiImpl.d.ts +2 -0
- package/src/Api/Implementation/ConfigApiImpl.js +11 -0
- package/src/Api/Implementation/FilterApiImpl.d.ts +1 -0
- package/src/Api/Implementation/FilterApiImpl.js +5 -0
- package/src/Api/Implementation/FormatColumnApiImpl.d.ts +3 -3
- package/src/Api/Implementation/FormatColumnApiImpl.js +13 -11
- package/src/Api/Implementation/GridApiImpl.d.ts +1 -1
- package/src/Api/Implementation/GridApiImpl.js +2 -2
- package/src/Api/Implementation/InternalApiImpl.js +1 -2
- package/src/Api/Implementation/LayoutApiImpl.js +1 -1
- package/src/Api/Implementation/TeamSharingApiImpl.d.ts +1 -0
- package/src/Api/Implementation/TeamSharingApiImpl.js +5 -0
- package/src/Api/StatusBarApi.d.ts +3 -0
- package/src/Api/TeamSharingApi.d.ts +4 -0
- package/src/PredefinedConfig/AdaptableState.d.ts +2 -0
- package/src/PredefinedConfig/CalculatedColumnState.d.ts +0 -5
- package/src/PredefinedConfig/ChartingState.d.ts +20 -0
- package/src/PredefinedConfig/ChartingState.js +2 -0
- package/src/PredefinedConfig/Common/AdaptableIcon.d.ts +4 -1
- package/src/PredefinedConfig/Common/CellSummary.d.ts +3 -0
- package/src/PredefinedConfig/Common/ColumnFilter.d.ts +9 -0
- package/src/PredefinedConfig/Common/FDC3Context.d.ts +12 -3
- package/src/PredefinedConfig/Common/FilterActionOnDataChange.d.ts +1 -2
- package/src/PredefinedConfig/Common/FilterActionOnDataChange.js +1 -2
- package/src/PredefinedConfig/Common/Types.d.ts +1 -1
- package/src/PredefinedConfig/ExportState.d.ts +6 -0
- package/src/PredefinedConfig/FormatColumnState.d.ts +4 -1
- package/src/PredefinedConfig/IPushPullState.d.ts +16 -5
- package/src/PredefinedConfig/LayoutState.d.ts +1 -1
- package/src/PredefinedConfig/PredefinedConfig.d.ts +5 -0
- package/src/PredefinedConfig/ScheduleState.d.ts +1 -1
- package/src/PredefinedConfig/ShortcutState.d.ts +1 -1
- package/src/PredefinedConfig/TeamSharingState.d.ts +6 -0
- package/src/Redux/ActionsReducers/ChartingRedux.d.ts +23 -0
- package/src/Redux/ActionsReducers/ChartingRedux.js +38 -0
- package/src/Redux/ActionsReducers/GridRedux.d.ts +30 -1
- package/src/Redux/ActionsReducers/GridRedux.js +105 -2
- package/src/Redux/ActionsReducers/LayoutRedux.d.ts +10 -11
- package/src/Redux/ActionsReducers/LayoutRedux.js +13 -10
- package/src/Redux/Store/AdaptableStore.js +39 -8
- package/src/Strategy/AdaptableModuleBase.d.ts +4 -0
- package/src/Strategy/AdaptableModuleBase.js +6 -0
- package/src/Strategy/AlertModule.js +3 -3
- package/src/Strategy/ChartingModule.js +1 -1
- package/src/Strategy/DashboardModule.js +1 -0
- package/src/Strategy/ExportModule.js +1 -0
- package/src/Strategy/FlashingCellModule.js +3 -3
- package/src/Strategy/FormatColumnModule.js +3 -3
- package/src/Strategy/GridInfoModule.js +2 -0
- package/src/Strategy/Interface/IModule.d.ts +11 -1
- package/src/Strategy/LayoutModule.js +2 -0
- package/src/Strategy/TeamSharingModule.d.ts +11 -1
- package/src/Strategy/TeamSharingModule.js +104 -0
- package/src/Utilities/ExpressionFunctions/aggregatedBooleanExpressionFunctions.d.ts +3 -0
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.d.ts +3 -0
- package/src/Utilities/ExpressionFunctions/booleanExpressionFunctions.d.ts +3 -0
- package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.d.ts +3 -0
- package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.d.ts +3 -0
- package/src/Utilities/Helpers/FormatHelper.d.ts +1 -1
- package/src/Utilities/Helpers/FormatHelper.js +7 -3
- package/src/Utilities/Helpers/Helper.js +1 -1
- package/src/Utilities/ObjectFactory.d.ts +5 -1
- package/src/Utilities/ObjectFactory.js +12 -2
- package/src/Utilities/Services/Interface/IReportService.d.ts +1 -1
- package/src/Utilities/Services/ReportService.d.ts +1 -1
- package/src/Utilities/Services/ReportService.js +5 -5
- package/src/Utilities/Services/TeamSharingService.js +0 -2
- package/src/View/AdaptableViewFactory.js +0 -2
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.js +2 -9
- package/src/View/Components/AdaptableObjectList/AdaptableObjectList.d.ts +13 -1
- package/src/View/Components/AdaptableObjectList/AdaptableObjectList.js +17 -14
- package/src/View/Components/Buttons/ButtonDelete.js +3 -3
- package/src/View/Components/FilterForm/QuickFilterForm.js +22 -1
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupModuleView.js +4 -0
- package/src/View/Components/Popups/AdaptablePopupTeamSharing.js +1 -1
- package/src/View/Filter/FilterSummary.d.ts +1 -1
- package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +13 -9
- package/src/View/Layout/LayoutEditorStandalonePopup.js +3 -1
- package/src/View/Layout/LayoutPopup.d.ts +1 -1
- package/src/View/Layout/LayoutViewPanel.d.ts +1 -1
- package/src/View/Layout/LayoutViewPanel.js +2 -1
- package/src/View/Layout/Wizard/LayoutEditorWizard.d.ts +2 -27
- package/src/View/TeamSharing/SharedEntityDependencies.d.ts +8 -0
- package/src/View/TeamSharing/SharedEntityDependencies.js +27 -0
- package/src/View/TeamSharing/SharedEntityObjectView.d.ts +9 -0
- package/src/View/TeamSharing/SharedEntityObjectView.js +84 -0
- package/src/View/TeamSharing/TeamSharingApplyButton.d.ts +6 -0
- package/src/View/TeamSharing/TeamSharingApplyButton.js +15 -0
- package/src/agGrid/Adaptable.d.ts +4 -2
- package/src/agGrid/Adaptable.js +37 -22
- package/src/components/icons/index.js +0 -4
- package/src/metamodel/adaptable.metamodel.d.ts +224 -2
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/types.d.ts +4 -2
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/src/View/Alert/AlertSharedEntity.d.ts +0 -5
- package/src/View/Alert/AlertSharedEntity.js +0 -19
- package/src/View/CalculatedColumn/CalculatedColumnSharedEntity.d.ts +0 -5
- package/src/View/CalculatedColumn/CalculatedColumnSharedEntity.js +0 -20
- package/src/View/ConditionalStyle/ConditionalStyleSharedEntity.d.ts +0 -5
- package/src/View/ConditionalStyle/ConditionalStyleSharedEntity.js +0 -23
- package/src/View/CustomSort/CustomSortSharedEntity.d.ts +0 -6
- package/src/View/CustomSort/CustomSortSharedEntity.js +0 -24
- package/src/View/Export/ExportSharedEntity.d.ts +0 -5
- package/src/View/Export/ExportSharedEntity.js +0 -16
- package/src/View/Filter/FilterSharedEntity.d.ts +0 -5
- package/src/View/Filter/FilterSharedEntity.js +0 -15
- package/src/View/FormatColumn/FormatColumnSharedEntity.d.ts +0 -5
- package/src/View/FormatColumn/FormatColumnSharedEntity.js +0 -18
- package/src/View/FreeTextColumn/FreeTextColumnSharedEntity.d.ts +0 -5
- package/src/View/FreeTextColumn/FreeTextColumnSharedEntity.js +0 -24
- package/src/View/Layout/LayoutSharedEntity.d.ts +0 -5
- package/src/View/Layout/LayoutSharedEntity.js +0 -15
- package/src/View/PlusMinus/PlusMinusSharedEntity.d.ts +0 -5
- package/src/View/PlusMinus/PlusMinusSharedEntity.js +0 -21
- package/src/View/Query/NamedQuerySharedEntity.d.ts +0 -5
- package/src/View/Query/NamedQuerySharedEntity.js +0 -19
- package/src/View/Shortcut/ShortcutSharedEntity.d.ts +0 -5
- package/src/View/Shortcut/ShortcutSharedEntity.js +0 -19
- package/src/View/TeamSharing/TeamSharingPopup.d.ts +0 -23
- package/src/View/TeamSharing/TeamSharingPopup.js +0 -163
|
@@ -9,6 +9,11 @@ const TeamSharingRedux_1 = require("../Redux/ActionsReducers/TeamSharingRedux");
|
|
|
9
9
|
const TeamSharingRedux = tslib_1.__importStar(require("../Redux/ActionsReducers/TeamSharingRedux"));
|
|
10
10
|
const isEqual_1 = tslib_1.__importDefault(require("lodash/isEqual"));
|
|
11
11
|
const LayoutRedux_1 = require("../Redux/ActionsReducers/LayoutRedux");
|
|
12
|
+
const SharedEntityObjectView_1 = require("../View/TeamSharing/SharedEntityObjectView");
|
|
13
|
+
const TeamSharingApplyButton_1 = require("../View/TeamSharing/TeamSharingApplyButton");
|
|
14
|
+
const SharedEntityDependencies_1 = require("../View/TeamSharing/SharedEntityDependencies");
|
|
15
|
+
const ArrayExtensions_1 = tslib_1.__importDefault(require("../Utilities/Extensions/ArrayExtensions"));
|
|
16
|
+
const flatten_1 = tslib_1.__importDefault(require("lodash/flatten"));
|
|
12
17
|
class TeamSharingModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
13
18
|
constructor(api) {
|
|
14
19
|
super(ModuleConstants.TeamSharingModuleId, 'Team Sharing', 'team-share', 'TeamSharingPopup', 'Team Sharing allows users to share - at run-time - Adaptable Objects between colleagues.', api);
|
|
@@ -27,10 +32,14 @@ class TeamSharingModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
27
32
|
// make sure there is no zombie import process remaining (in case a previous import crashed)
|
|
28
33
|
this.api.internalApi.dispatchReduxAction(TeamSharingRedux.TeamSharingCommitImport());
|
|
29
34
|
});
|
|
35
|
+
this.api.teamSharingApi.triggerLoadingTeamSharingEntries();
|
|
30
36
|
}
|
|
31
37
|
isModuleAvailable() {
|
|
32
38
|
return super.isModuleAvailable() && this.api.teamSharingApi.isTeamSharingActivated();
|
|
33
39
|
}
|
|
40
|
+
isModuleObjectsShareable() {
|
|
41
|
+
return false;
|
|
42
|
+
}
|
|
34
43
|
getPopupMaxWidth() {
|
|
35
44
|
return 1000;
|
|
36
45
|
}
|
|
@@ -69,5 +78,100 @@ class TeamSharingModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
69
78
|
}
|
|
70
79
|
return Object.values(action).find((actionProperty) => isAdaptableObject_1.isAdaptableObject(actionProperty));
|
|
71
80
|
}
|
|
81
|
+
isAdaptableObjectPresentInLocalState(sharedEntity) {
|
|
82
|
+
return !!this.api.internalApi
|
|
83
|
+
.getModuleService()
|
|
84
|
+
.getModuleById(sharedEntity.Module)
|
|
85
|
+
.getModuleAdaptableObjects()
|
|
86
|
+
.find((adaptableObject) => adaptableObject.Uuid === sharedEntity.Entity.Uuid);
|
|
87
|
+
}
|
|
88
|
+
isSharedEntityADependency(sharedEntity) {
|
|
89
|
+
const allSharedEntries = this.api.teamSharingApi.getLoadedSharedEntities();
|
|
90
|
+
return allSharedEntries.some((sharedEntryCandidate) => {
|
|
91
|
+
var _a;
|
|
92
|
+
return (_a = sharedEntryCandidate === null || sharedEntryCandidate === void 0 ? void 0 : sharedEntryCandidate.EntityDependencyIds) === null || _a === void 0 ? void 0 : _a.includes(sharedEntity.Uuid);
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
isStaleAndActive(sharedEntity) {
|
|
96
|
+
const staleActiveEntities = this.api.internalApi
|
|
97
|
+
.getTeamSharingService()
|
|
98
|
+
.getStaleActiveSharedEntities();
|
|
99
|
+
return (this.isAdaptableObjectPresentInLocalState(sharedEntity) &&
|
|
100
|
+
!!staleActiveEntities[sharedEntity.Uuid]);
|
|
101
|
+
}
|
|
102
|
+
getDependencies(sharedEntity) {
|
|
103
|
+
if (!Array.isArray(sharedEntity.EntityDependencyIds) ||
|
|
104
|
+
sharedEntity.EntityDependencyIds.length === 0) {
|
|
105
|
+
return [sharedEntity];
|
|
106
|
+
}
|
|
107
|
+
const allSharedEntities = this.api.teamSharingApi.getLoadedSharedEntities();
|
|
108
|
+
const dependencies = sharedEntity.EntityDependencyIds.map((dependencyUuid) => allSharedEntities.find((entity) => entity.Uuid === dependencyUuid));
|
|
109
|
+
return flatten_1.default(dependencies.map((dependency) => this.getDependencies(dependency)));
|
|
110
|
+
}
|
|
111
|
+
getStaleDependencies(sharedEntity) {
|
|
112
|
+
return this.getDependencies(sharedEntity).filter((dependency) => dependency.Uuid !== sharedEntity.Uuid && this.isStaleAndActive(dependency));
|
|
113
|
+
}
|
|
114
|
+
toView(sharedEntity) {
|
|
115
|
+
const isDependency = this.isSharedEntityADependency(sharedEntity);
|
|
116
|
+
const staleDependencies = this.getStaleDependencies(sharedEntity);
|
|
117
|
+
const staleDependenciesViewItems = [];
|
|
118
|
+
if (staleDependencies === null || staleDependencies === void 0 ? void 0 : staleDependencies.length) {
|
|
119
|
+
staleDependenciesViewItems.push({
|
|
120
|
+
name: 'Stale Deps',
|
|
121
|
+
view: SharedEntityObjectView_1.getSharedEntityStaleDepsItemView(staleDependencies),
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
const sharedViewItems = [];
|
|
125
|
+
const isStaleAndActive = this.isStaleAndActive(sharedEntity);
|
|
126
|
+
if (!isDependency || isStaleAndActive) {
|
|
127
|
+
sharedViewItems.push({
|
|
128
|
+
name: 'Shared',
|
|
129
|
+
view: SharedEntityObjectView_1.getSharedEntityActiveStatusObjectView(isDependency),
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
return {
|
|
133
|
+
items: [
|
|
134
|
+
!isDependency &&
|
|
135
|
+
sharedEntity.Description && {
|
|
136
|
+
name: 'Name',
|
|
137
|
+
values: [sharedEntity.Description],
|
|
138
|
+
},
|
|
139
|
+
!isDependency && {
|
|
140
|
+
name: 'Share Mode',
|
|
141
|
+
values: [sharedEntity.Type],
|
|
142
|
+
},
|
|
143
|
+
...sharedViewItems,
|
|
144
|
+
{
|
|
145
|
+
name: 'Type',
|
|
146
|
+
view: SharedEntityObjectView_1.SharedEntityTypeItemView,
|
|
147
|
+
},
|
|
148
|
+
...staleDependenciesViewItems,
|
|
149
|
+
ArrayExtensions_1.default.IsNotNullOrEmpty(sharedEntity.EntityDependencyIds) && {
|
|
150
|
+
name: 'Dependencies',
|
|
151
|
+
view: SharedEntityDependencies_1.SharedEntityDependencies,
|
|
152
|
+
},
|
|
153
|
+
].filter(Boolean),
|
|
154
|
+
abObject: sharedEntity,
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
toViewAll() {
|
|
158
|
+
var _a;
|
|
159
|
+
return (((_a = this.api.teamSharingApi.getLoadedSharedEntities()) !== null && _a !== void 0 ? _a : [])
|
|
160
|
+
// only top level
|
|
161
|
+
.filter((sharedEntity) => !this.isSharedEntityADependency(sharedEntity))
|
|
162
|
+
.map((item) => this.toView(item)));
|
|
163
|
+
}
|
|
164
|
+
getViewProperties() {
|
|
165
|
+
return {
|
|
166
|
+
actions: [TeamSharingApplyButton_1.TeamSharingApplyButton],
|
|
167
|
+
onMount: () => {
|
|
168
|
+
this.api.teamSharingApi.triggerLoadingTeamSharingEntries();
|
|
169
|
+
},
|
|
170
|
+
getDeleteAction: (sharedEntity) => {
|
|
171
|
+
return TeamSharingRedux.TeamSharingRemoveItem(sharedEntity.Uuid);
|
|
172
|
+
},
|
|
173
|
+
emptyView: 'Shared Items will appear here when available.',
|
|
174
|
+
};
|
|
175
|
+
}
|
|
72
176
|
}
|
|
73
177
|
exports.TeamSharingModule = TeamSharingModule;
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { ExpressionFunction } from '../../parser/src/types';
|
|
2
|
+
/**
|
|
3
|
+
* List of all the Aggregation Functions available in AdaptableQL
|
|
4
|
+
*/
|
|
2
5
|
export declare type AggregationFunctionName = 'WHERE' | 'COL' | AggregationFunction | ComparisonFunction;
|
|
3
6
|
declare type AggregationFunction = 'SUM';
|
|
4
7
|
declare type ComparisonFunction = 'EQ' | 'NEQ' | 'LT' | 'GT' | 'LTE' | 'GTE';
|
|
@@ -2,6 +2,9 @@ import { ExpressionFunction } from '../../parser/src/types';
|
|
|
2
2
|
import { BaseParameter } from './expressionFunctionUtils';
|
|
3
3
|
import { RowNode } from '@ag-grid-community/all-modules';
|
|
4
4
|
import { AggregateParams } from './scalarAggregationHelper';
|
|
5
|
+
/**
|
|
6
|
+
* List of all the AggregatedScalar Functions available in AdaptableQL
|
|
7
|
+
*/
|
|
5
8
|
export declare type AggregatedScalarFunctionName = AggregationFunction | OperandFunction;
|
|
6
9
|
declare type AggregationFunction = 'SUM' | 'PERCENTAGE' | 'AVG' | 'MIN' | 'MAX' | 'CUMUL';
|
|
7
10
|
declare type OperandFunction = 'COL' | 'OVER' | 'GROUP_BY';
|
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
import { ExpressionFunction } from '../../parser/src/types';
|
|
2
|
+
/**
|
|
3
|
+
* List of all the Boolean Functions available in AdaptableQL
|
|
4
|
+
*/
|
|
2
5
|
export declare type BooleanFunctionName = 'EQ' | 'NEQ' | 'GT' | 'LT' | 'GTE' | 'LTE' | 'AND' | 'OR' | 'NOT' | 'BETWEEN' | 'IN' | 'IS_BLANK' | 'CONTAINS' | 'STARTS_WITH' | 'ENDS_WITH' | 'ANY_CONTAINS' | 'QUERY';
|
|
3
6
|
export declare const booleanExpressionFunctions: Record<BooleanFunctionName, ExpressionFunction>;
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { ExpressionFunction } from '../../parser/src/types';
|
|
2
|
+
/**
|
|
3
|
+
* List of all the Observable Functions available in AdaptableQL
|
|
4
|
+
*/
|
|
2
5
|
export declare type ObservableFunctionName = 'WHERE' | 'COL' | 'TIMEFRAME' | ObservableFunction | ChangeFunction;
|
|
3
6
|
declare type ObservableFunction = 'ROW_CHANGE' | 'GRID_CHANGE';
|
|
4
7
|
declare type ChangeFunction = 'MAX' | 'MIN' | 'NONE' | 'COUNT';
|
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
import { ExpressionFunction } from '../../parser/src/types';
|
|
2
|
+
/**
|
|
3
|
+
* List of all the Scalar Functions available in AdaptableQL
|
|
4
|
+
*/
|
|
2
5
|
export declare type ScalarFunctionName = 'ADD' | 'SUB' | 'MUL' | 'DIV' | 'MOD' | 'POW' | 'MIN' | 'MAX' | 'AVG' | 'DATE' | 'NOW' | 'TODAY' | 'DAY' | 'WEEK' | 'MONTH' | 'YEAR' | 'ADD_DAYS' | 'ADD_WEEKS' | 'ADD_MONTHS' | 'ADD_YEARS' | 'DIFF_DAYS' | 'DIFF_WEEKS' | 'DIFF_MONTHS' | 'DIFF_YEARS' | 'SUB_STRING' | 'REPLACE' | 'COALESCE' | 'LEN' | 'UPPER' | 'LOWER' | 'CONCAT' | 'IF' | 'COL';
|
|
3
6
|
export declare const scalarExpressionFunctions: Record<ScalarFunctionName, ExpressionFunction>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { NumberFormatterOptions, DateFormatterOptions, AdaptableFormat, StringFormatterOptions } from '../../PredefinedConfig/Common/AdaptableFormat';
|
|
2
2
|
export declare function Format(input: any, format: AdaptableFormat): string;
|
|
3
|
-
export declare function NumberFormatter(input: number, options?: NumberFormatterOptions): string;
|
|
3
|
+
export declare function NumberFormatter(input: number | string, options?: NumberFormatterOptions): string;
|
|
4
4
|
export declare function DateFormatter(input: number | Date | string, options: DateFormatterOptions): string | undefined;
|
|
5
5
|
export declare function StringFormatter(input: string, options?: StringFormatterOptions): string;
|
|
6
6
|
declare const _default: {
|
|
@@ -20,9 +20,12 @@ function NumberFormatter(input, options = {}) {
|
|
|
20
20
|
if (input == null || input == undefined) {
|
|
21
21
|
return undefined;
|
|
22
22
|
}
|
|
23
|
+
if (typeof input === 'string') {
|
|
24
|
+
return input;
|
|
25
|
+
}
|
|
23
26
|
let n = Number(input);
|
|
24
27
|
if (isNaN(n)) {
|
|
25
|
-
return
|
|
28
|
+
return input.toString();
|
|
26
29
|
}
|
|
27
30
|
const fractionsSepatator = options.FractionSeparator ? options.FractionSeparator : '.';
|
|
28
31
|
let multiplier = options.Multiplier ? options.Multiplier : 1;
|
|
@@ -68,17 +71,18 @@ function NumberFormatter(input, options = {}) {
|
|
|
68
71
|
}
|
|
69
72
|
exports.NumberFormatter = NumberFormatter;
|
|
70
73
|
function DateFormatter(input, options) {
|
|
71
|
-
if (input == null || input == undefined) {
|
|
74
|
+
if (input == null || input == undefined || input == 'Invalid Date') {
|
|
72
75
|
return undefined;
|
|
73
76
|
}
|
|
74
77
|
try {
|
|
78
|
+
// not sure if this is right if using a custom formatter...
|
|
75
79
|
if (typeof input === 'string') {
|
|
76
80
|
input = new Date(input);
|
|
77
81
|
}
|
|
78
82
|
return format_1.default(input, options.Pattern || '');
|
|
79
83
|
}
|
|
80
84
|
catch (error) {
|
|
81
|
-
return
|
|
85
|
+
return input;
|
|
82
86
|
}
|
|
83
87
|
}
|
|
84
88
|
exports.DateFormatter = DateFormatter;
|
|
@@ -128,7 +128,7 @@ function ReturnItemCount(items, itemName) {
|
|
|
128
128
|
}
|
|
129
129
|
exports.ReturnItemCount = ReturnItemCount;
|
|
130
130
|
function IsInputNullOrEmpty(itemToCheck) {
|
|
131
|
-
if (itemToCheck == 'Invalid Date') {
|
|
131
|
+
if (itemToCheck == 'Invalid Date ') {
|
|
132
132
|
return true;
|
|
133
133
|
}
|
|
134
134
|
if (typeof itemToCheck === 'string') {
|
|
@@ -24,8 +24,10 @@ import { AdaptableMessageType } from '../PredefinedConfig/Common/AdaptableMessag
|
|
|
24
24
|
import { SystemStatusMessageInfo } from '../PredefinedConfig/Common/SystemStatusMessageInfo';
|
|
25
25
|
import { NotificationsOptions } from '../AdaptableOptions/NotificationsOptions';
|
|
26
26
|
import { CellSummmary } from '../PredefinedConfig/Common/CellSummary';
|
|
27
|
-
import { ColumnFilter, FlashingCellDefinition, GridDataChangedInfo, SystemFilterPredicateId } from '../types';
|
|
27
|
+
import { ColumnFilter, CustomDisplayFormatterContext, FlashingCellDefinition, GridDataChangedInfo, SystemFilterPredicateId } from '../types';
|
|
28
28
|
import { ToastOptions } from 'react-toastify';
|
|
29
|
+
import { RowNode } from '@ag-grid-community/all-modules';
|
|
30
|
+
import { AdaptableApi } from '../../types';
|
|
29
31
|
export declare function CreateEmptyCustomSort(): CustomSort;
|
|
30
32
|
export declare function CreateEmptyCalculatedColumn(isFilterable: boolean): CalculatedColumn;
|
|
31
33
|
export declare function CreateEmptyNamedQuery(expression?: string): NamedQuery;
|
|
@@ -61,6 +63,7 @@ export declare function CreateEmptyStyle(): AdaptableStyle;
|
|
|
61
63
|
export declare function CreateSystemStatusMessageInfo(message: string, type: AdaptableMessageType, furtherInfo?: string): SystemStatusMessageInfo;
|
|
62
64
|
export declare function CreateEmptyCellSummmary(): CellSummmary;
|
|
63
65
|
export declare function CreateColumnFilter(ColumnId: string, PredicateId: SystemFilterPredicateId, Inputs: any[]): ColumnFilter;
|
|
66
|
+
export declare function CreateCustomDisplayFormatterContext(value: any, node: RowNode, abColumn: AdaptableColumn, api: AdaptableApi): CustomDisplayFormatterContext;
|
|
64
67
|
export declare function CreateToastOptions(notificationsOptions: NotificationsOptions, { onClose, containerId }: {
|
|
65
68
|
onClose?: VoidFunction;
|
|
66
69
|
containerId: string;
|
|
@@ -100,5 +103,6 @@ export declare const ObjectFactory: {
|
|
|
100
103
|
CreateEmptyGlue42Report: typeof CreateEmptyGlue42Report;
|
|
101
104
|
CreateSystemStatusMessageInfo: typeof CreateSystemStatusMessageInfo;
|
|
102
105
|
CreateToastOptions: typeof CreateToastOptions;
|
|
106
|
+
CreateCustomDisplayFormatterContext: typeof CreateCustomDisplayFormatterContext;
|
|
103
107
|
};
|
|
104
108
|
export default ObjectFactory;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ObjectFactory = exports.CreateToastOptions = exports.CreateColumnFilter = exports.CreateEmptyCellSummmary = exports.CreateSystemStatusMessageInfo = exports.CreateEmptyStyle = exports.CreateEmptyLayout = exports.CreateEmptyFreeTextColumn = exports.CreateEmptyFormatColumn = exports.CreateEmptyConditionalStyle = exports.CreateEmptyShortcut = exports.CreateEmptySchedule = exports.CreateReportSchedule = exports.CreateGlue42Schedule = exports.CreateIPushPullSchedule = exports.CreateEmptyOpenFinSchedule = exports.CreateEmptyGlue42Schedule = exports.CreateEmptyIPushPullSchedule = exports.CreateEmptyOpenFinReport = exports.CreateEmptyGlue42Report = exports.CreateEmptyIPushPullReport = exports.CreateEmptyReportSchedule = exports.CreateEmptyReminderSchedule = exports.CreateEmptyBaseSchedule = exports.CreateEmptyReport = exports.CreateInternalAlertDefinitionForMessages = exports.CreateEmptyFlashingCellDefinition = exports.CreateEmptyAlertDefinition = exports.CreateRowChangedAlert = exports.CreateCellChangedAlert = exports.CreateGenericAlert = exports.CreateEmptyPlusMinusNudge = exports.CreateEmptyNamedQuery = exports.CreateEmptyCalculatedColumn = exports.CreateEmptyCustomSort = void 0;
|
|
3
|
+
exports.ObjectFactory = exports.CreateToastOptions = exports.CreateCustomDisplayFormatterContext = exports.CreateColumnFilter = exports.CreateEmptyCellSummmary = exports.CreateSystemStatusMessageInfo = exports.CreateEmptyStyle = exports.CreateEmptyLayout = exports.CreateEmptyFreeTextColumn = exports.CreateEmptyFormatColumn = exports.CreateEmptyConditionalStyle = exports.CreateEmptyShortcut = exports.CreateEmptySchedule = exports.CreateReportSchedule = exports.CreateGlue42Schedule = exports.CreateIPushPullSchedule = exports.CreateEmptyOpenFinSchedule = exports.CreateEmptyGlue42Schedule = exports.CreateEmptyIPushPullSchedule = exports.CreateEmptyOpenFinReport = exports.CreateEmptyGlue42Report = exports.CreateEmptyIPushPullReport = exports.CreateEmptyReportSchedule = exports.CreateEmptyReminderSchedule = exports.CreateEmptyBaseSchedule = exports.CreateEmptyReport = exports.CreateInternalAlertDefinitionForMessages = exports.CreateEmptyFlashingCellDefinition = exports.CreateEmptyAlertDefinition = exports.CreateRowChangedAlert = exports.CreateCellChangedAlert = exports.CreateGenericAlert = exports.CreateEmptyPlusMinusNudge = exports.CreateEmptyNamedQuery = exports.CreateEmptyCalculatedColumn = exports.CreateEmptyCustomSort = void 0;
|
|
4
4
|
const Enums_1 = require("../PredefinedConfig/Common/Enums");
|
|
5
5
|
const GeneralConstants_1 = require("./Constants/GeneralConstants");
|
|
6
6
|
const Uuid_1 = require("../PredefinedConfig/Uuid");
|
|
@@ -304,7 +304,7 @@ function CreateEmptyFreeTextColumn(isFilterable) {
|
|
|
304
304
|
}
|
|
305
305
|
exports.CreateEmptyFreeTextColumn = CreateEmptyFreeTextColumn;
|
|
306
306
|
function CreateEmptyLayout(layout, adaptableColumns) {
|
|
307
|
-
return Object.assign(Object.assign({}, layout), { Uuid: Uuid_1.createUuid(), Columns: layout.Columns || [], ColumnSorts: layout.ColumnSorts || [],
|
|
307
|
+
return Object.assign(Object.assign({}, layout), { Uuid: Uuid_1.createUuid(), Columns: layout.Columns || [], ColumnSorts: layout.ColumnSorts || [], ColumnFilters: layout.ColumnFilters || [],
|
|
308
308
|
// ColumnFlexMap: layout.ColumnFlexMap || {},
|
|
309
309
|
ColumnWidthMap: layout.ColumnWidthMap || {}, RowGroupedColumns: layout.RowGroupedColumns ||
|
|
310
310
|
(adaptableColumns ? adaptableColumns.filter((c) => c.isGrouped).map((c) => c.columnId) : []) });
|
|
@@ -355,6 +355,15 @@ function CreateColumnFilter(ColumnId, PredicateId, Inputs) {
|
|
|
355
355
|
};
|
|
356
356
|
}
|
|
357
357
|
exports.CreateColumnFilter = CreateColumnFilter;
|
|
358
|
+
function CreateCustomDisplayFormatterContext(value, node, abColumn, api) {
|
|
359
|
+
return {
|
|
360
|
+
adaptableColumn: abColumn,
|
|
361
|
+
cellValue: value,
|
|
362
|
+
rowNode: node,
|
|
363
|
+
adaptableApi: api,
|
|
364
|
+
};
|
|
365
|
+
}
|
|
366
|
+
exports.CreateCustomDisplayFormatterContext = CreateCustomDisplayFormatterContext;
|
|
358
367
|
function CreateToastOptions(notificationsOptions, { onClose, containerId }) {
|
|
359
368
|
const adaptableToastPosition = notificationsOptions.position;
|
|
360
369
|
const position = getToastPosition(adaptableToastPosition);
|
|
@@ -443,5 +452,6 @@ exports.ObjectFactory = {
|
|
|
443
452
|
CreateEmptyGlue42Report,
|
|
444
453
|
CreateSystemStatusMessageInfo,
|
|
445
454
|
CreateToastOptions,
|
|
455
|
+
CreateCustomDisplayFormatterContext,
|
|
446
456
|
};
|
|
447
457
|
exports.default = exports.ObjectFactory;
|
|
@@ -17,6 +17,6 @@ export interface IReportService extends IAdaptableService {
|
|
|
17
17
|
getReportDataAsArray(report: Report, includePrimaryKey?: boolean): any[][];
|
|
18
18
|
convertReportDataToArray(reportData: ReportData): any[][];
|
|
19
19
|
getCellExportValueFromRowNode(rowNode: RowNode, columnId: string): any;
|
|
20
|
-
getCellExportValueFromRawValue(rawValue: any, columnId: string): any;
|
|
20
|
+
getCellExportValueFromRawValue(rowNode: RowNode, rawValue: any, columnId: string): any;
|
|
21
21
|
getReportFileName(reportName: string): string;
|
|
22
22
|
}
|
|
@@ -21,7 +21,7 @@ export declare class ReportService implements IReportService {
|
|
|
21
21
|
getRowObjectForColumnIds(rowNode: RowNode, columnIds: string[]): Record<string, any>;
|
|
22
22
|
PublishLiveLiveDataChangedEvent(reportDestination: 'ipushpull' | 'Glue42', liveDataTrigger: 'Connected' | 'Disconnected' | 'LiveDataStarted' | 'LiveDataStopped' | 'LiveDataUpdated', liveReport?: any): void;
|
|
23
23
|
getCellExportValueFromRowNode(rowNode: RowNode, columnId: string): any;
|
|
24
|
-
getCellExportValueFromRawValue(cellRawValue: any, columnId: string): any;
|
|
24
|
+
getCellExportValueFromRawValue(rowNode: RowNode, cellRawValue: any, columnId: string): any;
|
|
25
25
|
getReportFileName(reportName: string): string;
|
|
26
26
|
destroy(): void;
|
|
27
27
|
private getCustomExportDateFormat;
|
|
@@ -300,9 +300,9 @@ class ReportService {
|
|
|
300
300
|
this.adaptableApi.eventApi.emit('LiveDataChanged', liveDataChangedInfo);
|
|
301
301
|
}
|
|
302
302
|
getCellExportValueFromRowNode(rowNode, columnId) {
|
|
303
|
-
return this.getCellExportValueFromRawValue(this.adaptableApi.gridApi.getRawValueFromRowNode(rowNode, columnId), columnId);
|
|
303
|
+
return this.getCellExportValueFromRawValue(rowNode, this.adaptableApi.gridApi.getRawValueFromRowNode(rowNode, columnId), columnId);
|
|
304
304
|
}
|
|
305
|
-
getCellExportValueFromRawValue(cellRawValue, columnId) {
|
|
305
|
+
getCellExportValueFromRawValue(rowNode, cellRawValue, columnId) {
|
|
306
306
|
if (StringExtensions_1.default.IsNullOrEmpty(cellRawValue)) {
|
|
307
307
|
return cellRawValue;
|
|
308
308
|
}
|
|
@@ -316,7 +316,7 @@ class ReportService {
|
|
|
316
316
|
}
|
|
317
317
|
// otherwise check the general export format types
|
|
318
318
|
let cellExportFormat = this.computeCellExportValueFormat(columnType);
|
|
319
|
-
return this.getCellExportValueFromRawValueByType(cellRawValue, columnId, cellExportFormat);
|
|
319
|
+
return this.getCellExportValueFromRawValueByType(rowNode, cellRawValue, columnId, cellExportFormat);
|
|
320
320
|
}
|
|
321
321
|
getReportFileName(reportName) {
|
|
322
322
|
let fileName = StringExtensions_1.default.ReplaceEmptySpacesWithUnderscore(reportName);
|
|
@@ -333,13 +333,13 @@ class ReportService {
|
|
|
333
333
|
getCustomExportDateFormat() {
|
|
334
334
|
return this.adaptableApi.internalApi.getAdaptableOptions().exportOptions.exportDateFormat;
|
|
335
335
|
}
|
|
336
|
-
getCellExportValueFromRawValueByType(cellRawValue, columnId,
|
|
336
|
+
getCellExportValueFromRawValueByType(rowNode, cellRawValue, columnId,
|
|
337
337
|
// default to rawValue if, for some reason, the configs provide invalid values
|
|
338
338
|
type = 'rawValue') {
|
|
339
339
|
return type === 'rawValue'
|
|
340
340
|
? cellRawValue
|
|
341
341
|
: // type === formattedValue
|
|
342
|
-
this.adaptableApi.gridApi.getFormattedValueFromRawValue(columnId, cellRawValue);
|
|
342
|
+
this.adaptableApi.gridApi.getFormattedValueFromRawValue(rowNode, columnId, cellRawValue);
|
|
343
343
|
}
|
|
344
344
|
computeCellExportValueFormat(columnDataType) {
|
|
345
345
|
const exportOptions = this.adaptableApi.internalApi.getAdaptableOptions().exportOptions;
|
|
@@ -148,8 +148,6 @@ class TeamSharingService {
|
|
|
148
148
|
// for every dependency, create recursively the corresponding shared entities
|
|
149
149
|
teamSharingDependencies.forEach((teamSharingDependency) => {
|
|
150
150
|
const sharedEntityDependency = this.createSharedEntity(teamSharingDependency.Reference, teamSharingDependency.Module, configuration, sharingUserName, sharingTimestamp, createdSharedEntities);
|
|
151
|
-
// update description
|
|
152
|
-
sharedEntityDependency.Description = `${configuration.description} (Dependency of ${mainSharedEntity.Module})`;
|
|
153
151
|
// update dependency IDs for the main shared entity
|
|
154
152
|
mainSharedEntity.EntityDependencyIds.push(sharedEntityDependency.Uuid);
|
|
155
153
|
});
|
|
@@ -7,7 +7,6 @@ const QuickSearchPopup_1 = require("./QuickSearch/QuickSearchPopup");
|
|
|
7
7
|
const ThemePopup_1 = require("./Theme/ThemePopup");
|
|
8
8
|
const ToolPanelPopup_1 = require("./Components/ToolPanel/ToolPanelPopup");
|
|
9
9
|
const GridInfoPopup_1 = require("./GridInfo/GridInfoPopup");
|
|
10
|
-
const TeamSharingPopup_1 = require("./TeamSharing/TeamSharingPopup");
|
|
11
10
|
const DashboardPopup_1 = require("./Dashboard/DashboardPopup");
|
|
12
11
|
const StateManagementPopup_1 = require("./StateManagement/StateManagementPopup");
|
|
13
12
|
const ModuleConstants = tslib_1.__importStar(require("../Utilities/Constants/ModuleConstants"));
|
|
@@ -41,7 +40,6 @@ exports.AdaptableViewFactory = {
|
|
|
41
40
|
CellSummaryPopup: CellSummaryPopup_1.CellSummaryPopup,
|
|
42
41
|
SmartEditPopup: SmartEditPopup_1.SmartEditPopup,
|
|
43
42
|
ThemePopup: ThemePopup_1.ThemePopup,
|
|
44
|
-
TeamSharingPopup: TeamSharingPopup_1.TeamSharingPopup,
|
|
45
43
|
ToolPanelPopup: ToolPanelPopup_1.ToolPanelPopup,
|
|
46
44
|
SystemStatusPopup: SystemStatusPopup_1.SystemStatusPopup,
|
|
47
45
|
DataChangeHistoryPopup: DataChangeHistoryPopup_1.DataChangeHistoryPopup,
|
|
@@ -74,7 +74,7 @@ const CalculatedColumnSettingsWizardSection = (props) => {
|
|
|
74
74
|
const ColumnName = data.FriendlyName;
|
|
75
75
|
const ColumnId = data.ColumnId;
|
|
76
76
|
let { DataType: dataType } = (_a = data.CalculatedColumnSettings) !== null && _a !== void 0 ? _a : {};
|
|
77
|
-
const { Width, ShowToolTip, HeaderToolTip
|
|
77
|
+
const { Width, ShowToolTip, HeaderToolTip } = (_b = data.CalculatedColumnSettings) !== null && _b !== void 0 ? _b : {};
|
|
78
78
|
const handleSpecialColumnSettingsChange = (settings) => {
|
|
79
79
|
props.onChange(Object.assign(Object.assign({}, data), { CalculatedColumnSettings: Object.assign(Object.assign({}, data.CalculatedColumnSettings), settings) }));
|
|
80
80
|
};
|
|
@@ -119,14 +119,7 @@ const CalculatedColumnSettingsWizardSection = (props) => {
|
|
|
119
119
|
}) })),
|
|
120
120
|
' ',
|
|
121
121
|
React.createElement(FormLayout_1.FormRow, { label: "" },
|
|
122
|
-
React.createElement(CheckBox_1.CheckBox, { "data-name": "column-show-tooltip", onChange: (checked) => handleSpecialColumnSettingsChange({ ShowToolTip: checked }), checked: ShowToolTip }, "Show Expression as Cell Tooltip")),
|
|
123
|
-
React.createElement(FormLayout_1.FormRow, { label: "" },
|
|
124
|
-
React.createElement(CheckBox_1.CheckBox, { "data-name": "column-external-expression-evaluation", onChange: (checked) => handleSpecialColumnSettingsChange({ ExternallyEvaluatedExpression: checked }), checked: ExternallyEvaluatedExpression }, "Suppress Expression Evaluation"),
|
|
125
|
-
ExternallyEvaluatedExpression && (React.createElement(rebass_1.Box, { "data-name": "note-external-expression-evaluation", p: 2, style: {
|
|
126
|
-
background: 'var(--ab-color-primary)',
|
|
127
|
-
borderRadius: 'var(--ab__border-radius)',
|
|
128
|
-
whiteSpace: 'pre-wrap',
|
|
129
|
-
} }, "The column value is loaded from the row data property with the same name as the ColumnId"))))))),
|
|
122
|
+
React.createElement(CheckBox_1.CheckBox, { "data-name": "column-show-tooltip", onChange: (checked) => handleSpecialColumnSettingsChange({ ShowToolTip: checked }), checked: ShowToolTip }, "Show Expression as Cell Tooltip")))))),
|
|
130
123
|
ErrorMessage ? React.createElement(ErrorBox_1.default, { marginTop: 2 }, ErrorMessage) : null,
|
|
131
124
|
React.createElement(SpecialColumnSettingsWizardStep_1.SpecialColumnSettingsWizardStep, { isEditable: false, settings: data.CalculatedColumnSettings, onChange: handleSpecialColumnSettingsChange })));
|
|
132
125
|
};
|
|
@@ -3,7 +3,19 @@ import { AdaptableObjectView, IModule } from '../../../Strategy/Interface/IModul
|
|
|
3
3
|
interface AdaptableObjectListItemProps {
|
|
4
4
|
data: AdaptableObjectView;
|
|
5
5
|
module: IModule;
|
|
6
|
-
|
|
6
|
+
/**
|
|
7
|
+
* Used for team sharing.
|
|
8
|
+
* If this gets more complicated the underlying UI for the adaptable item should be extracted.
|
|
9
|
+
*
|
|
10
|
+
* @defaults false
|
|
11
|
+
*/
|
|
12
|
+
hideControls?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Used for team sharing.
|
|
15
|
+
* @defaults false
|
|
16
|
+
*/
|
|
17
|
+
deleteDisabled?: boolean;
|
|
18
|
+
deleteTooltip?: string;
|
|
7
19
|
}
|
|
8
20
|
export declare const AdaptableObjectListItem: React.FunctionComponent<AdaptableObjectListItemProps>;
|
|
9
21
|
interface AdaptableObjectListProps {
|
|
@@ -15,6 +15,7 @@ const ButtonShare_1 = require("../Buttons/ButtonShare");
|
|
|
15
15
|
const SuspendToggleButton_1 = require("../Buttons/SuspendToggleButton/SuspendToggleButton");
|
|
16
16
|
const ValueSelector_1 = require("../ValueSelector");
|
|
17
17
|
const ICON_SIZE = 26;
|
|
18
|
+
const baseClassName = 'ab-Adaptable-Object-List';
|
|
18
19
|
const AdaptableObjectListItem = (props) => {
|
|
19
20
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
20
21
|
const adaptable = AdaptableContext_1.useAdaptable();
|
|
@@ -24,15 +25,17 @@ const AdaptableObjectListItem = (props) => {
|
|
|
24
25
|
const viewOptions = (_b = (_a = props.module) === null || _a === void 0 ? void 0 : _a.getViewProperties) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
25
26
|
const EditWizard = (_c = viewOptions.getEditWizard) === null || _c === void 0 ? void 0 : _c.call(viewOptions, props.data.abObject);
|
|
26
27
|
const deleteAction = (_d = viewOptions === null || viewOptions === void 0 ? void 0 : viewOptions.getDeleteAction) === null || _d === void 0 ? void 0 : _d.call(viewOptions, props.data.abObject);
|
|
27
|
-
const
|
|
28
|
+
const isObjectShareable = props.module.isModuleObjectsShareable();
|
|
29
|
+
const teamSharingActivated = isObjectShareable &&
|
|
30
|
+
adaptable.api.teamSharingApi.isTeamSharingActivated() &&
|
|
28
31
|
adaptable.api.teamSharingApi.hasTeamSharingFullRights();
|
|
29
32
|
const entityType = props.module.moduleInfo.FriendlyName;
|
|
30
33
|
const moduleAccessLevel = adaptable.api.internalApi
|
|
31
34
|
.getEntitlementService()
|
|
32
35
|
.getEntitlementAccessLevelForModule(props.module.moduleInfo.ModuleName);
|
|
33
36
|
const accessLevel = AdaptableHelper_1.default.getAppropriateAccessLevel(props.data.abObject, moduleAccessLevel);
|
|
34
|
-
const
|
|
35
|
-
const itemClassName = join_1.default(
|
|
37
|
+
const itemBaseClassName = `${baseClassName}__Item`;
|
|
38
|
+
const itemClassName = join_1.default(props.data.className, itemBaseClassName, props.data.abObject.IsSuspended && `${itemBaseClassName}--is-suspended`);
|
|
36
39
|
const handleCloseWizard = React.useCallback(() => {
|
|
37
40
|
setIsEditWizardVisible(false);
|
|
38
41
|
setWizardStepName(null);
|
|
@@ -56,42 +59,42 @@ const AdaptableObjectListItem = (props) => {
|
|
|
56
59
|
});
|
|
57
60
|
});
|
|
58
61
|
const isEditDisabled = !Boolean(EditWizard || viewOptions.onOpenEditPopup);
|
|
59
|
-
|
|
60
|
-
|
|
62
|
+
const showActions = !props.hideControls;
|
|
63
|
+
return (React.createElement(rebass_1.Flex, { "data-name": "adaptable-object-list-item", "data-value": props.data.abObject.Uuid, as: "li", mb: 3, className: itemClassName, style: props.data.style },
|
|
64
|
+
React.createElement(rebass_1.Box, { flex: 1, className: `${itemBaseClassName}__rows` }, (_j = (_h = (_g = props.data.items).filter) === null || _h === void 0 ? void 0 : _h.call(_g, Boolean)) === null || _j === void 0 ? void 0 : _j.map((tag, index) => {
|
|
61
65
|
var _a;
|
|
62
66
|
let labelEl = tag.label;
|
|
63
67
|
if (typeof tag.label === 'function') {
|
|
64
68
|
labelEl = React.createElement(tag.label, { data: props.data.abObject });
|
|
65
69
|
}
|
|
66
70
|
labelEl = labelEl !== null && labelEl !== void 0 ? labelEl : tag.name;
|
|
67
|
-
return (React.createElement(rebass_1.Flex, { "data-name": tag.name, key: index, mb: 2, className: `${
|
|
68
|
-
React.createElement(rebass_1.Box, { className: `${
|
|
71
|
+
return (React.createElement(rebass_1.Flex, { "data-name": tag.name, key: index, mb: 2, className: `${itemBaseClassName}__row` },
|
|
72
|
+
React.createElement(rebass_1.Box, { className: `${itemBaseClassName}__label`, mr: 3 },
|
|
69
73
|
labelEl,
|
|
70
|
-
EditWizard && (React.createElement(SimpleButton_1.default, { accessLevel: accessLevel, className: `${
|
|
74
|
+
EditWizard && (React.createElement(SimpleButton_1.default, { accessLevel: accessLevel, className: `${itemBaseClassName}__edit-property`, ml: 1, icon: "edit", tooltip: "edit", iconSize: 18, variant: "text", onClick: () => {
|
|
71
75
|
handleOnEdit(tag.name);
|
|
72
76
|
} }))),
|
|
73
|
-
React.createElement(rebass_1.Box, { flex: 1, className: `${
|
|
77
|
+
React.createElement(rebass_1.Box, { flex: 1, className: `${itemBaseClassName}__values` },
|
|
74
78
|
tag.view &&
|
|
75
79
|
React.createElement(tag.view, {
|
|
76
80
|
data: props.data.abObject,
|
|
77
81
|
}),
|
|
78
82
|
Boolean((tag === null || tag === void 0 ? void 0 : tag.values) && ((_a = tag === null || tag === void 0 ? void 0 : tag.values) === null || _a === void 0 ? void 0 : _a.length)) && (React.createElement(ValueSelector_1.ValueOptionsTags, { style: { marginRight: 0 }, readOnly: true, options: tag.values, value: tag.values, allowWrap: true, toIdentifier: (c) => c, toLabel: (c) => React.createElement(React.Fragment, null, c) })))));
|
|
79
83
|
})),
|
|
80
|
-
React.createElement(rebass_1.Flex, { flexDirection: "column", className: `${
|
|
84
|
+
showActions && (React.createElement(rebass_1.Flex, { flexDirection: "column", className: `${itemBaseClassName}__buttons` },
|
|
81
85
|
React.createElement(rebass_1.Flex, { justifyContent: "end" },
|
|
82
86
|
actions,
|
|
83
87
|
teamSharingActivated && (React.createElement(ButtonShare_1.ButtonShare, { iconSize: ICON_SIZE, Header: `TeamSharing ${entityType}`, accessLevel: accessLevel, onShare: (config) => adaptable.api.teamSharingApi.shareEntity(props.data.abObject, props.module.moduleInfo.ModuleName, config) })),
|
|
84
|
-
deleteAction && (React.createElement(ButtonDelete_1.ButtonDelete, { iconSize: ICON_SIZE, ConfirmationMsg: `Are you sure you want to delete this ${entityType}?`, ConfirmationTitle: `Delete ${entityType}`, ConfirmAction: deleteAction, accessLevel: accessLevel })),
|
|
88
|
+
deleteAction && (React.createElement(ButtonDelete_1.ButtonDelete, { disabled: props.deleteDisabled, tooltip: props.deleteTooltip, iconSize: ICON_SIZE, ConfirmationMsg: `Are you sure you want to delete this ${entityType}?`, ConfirmationTitle: `Delete ${entityType}`, ConfirmAction: deleteAction, accessLevel: accessLevel })),
|
|
85
89
|
React.createElement(ButtonEdit_1.ButtonEdit, { iconSize: ICON_SIZE, disabled: isEditDisabled, accessLevel: accessLevel, onClick: () => handleOnEdit() })),
|
|
86
90
|
React.createElement(rebass_1.Box, { flex: 1 }),
|
|
87
91
|
hasSuspend && (React.createElement(rebass_1.Flex, { justifyContent: "end" },
|
|
88
|
-
React.createElement(SuspendToggleButton_1.SuspendToggleButton, { onSuspend: () => dispatch(viewOptions.getSuspendAction(props.data.abObject)), onUnSuspend: () => dispatch(viewOptions.getUnSuspendAction(props.data.abObject)), suspendableObject: props.data.abObject, accessLevel: accessLevel })))),
|
|
92
|
+
React.createElement(SuspendToggleButton_1.SuspendToggleButton, { onSuspend: () => dispatch(viewOptions.getSuspendAction(props.data.abObject)), onUnSuspend: () => dispatch(viewOptions.getUnSuspendAction(props.data.abObject)), suspendableObject: props.data.abObject, accessLevel: accessLevel }))))),
|
|
89
93
|
isEditWizardVisible && EditWizard && (React.createElement(EditWizard, { defaultCurrentSectionName: wizardStepName, moduleInfo: props.module.moduleInfo, data: props.data.abObject, configEntities: null, onCloseWizard: handleCloseWizard, onFinishWizard: handleCloseWizard }))));
|
|
90
94
|
};
|
|
91
95
|
exports.AdaptableObjectListItem = AdaptableObjectListItem;
|
|
92
96
|
const AdaptableObjectList = (props) => {
|
|
93
97
|
var _a;
|
|
94
|
-
|
|
95
|
-
return (React.createElement("ul", { className: baseClassName }, (_a = props === null || props === void 0 ? void 0 : props.items) === null || _a === void 0 ? void 0 : _a.map((item) => (React.createElement(exports.AdaptableObjectListItem, { key: item.abObject.Uuid, baseClassName: baseClassName, data: item, module: props.module })))));
|
|
98
|
+
return (React.createElement("ul", { className: baseClassName }, (_a = props === null || props === void 0 ? void 0 : props.items) === null || _a === void 0 ? void 0 : _a.map((item) => (React.createElement(exports.AdaptableObjectListItem, { key: item.abObject.Uuid, data: item, module: props.module })))));
|
|
96
99
|
};
|
|
97
100
|
exports.AdaptableObjectList = AdaptableObjectList;
|
|
@@ -8,9 +8,9 @@ const PopupRedux = tslib_1.__importStar(require("../../../Redux/ActionsReducers/
|
|
|
8
8
|
const SimpleButton_1 = tslib_1.__importDefault(require("../../../components/SimpleButton"));
|
|
9
9
|
class ButtonDeleteComponent extends React.Component {
|
|
10
10
|
render() {
|
|
11
|
-
var _a;
|
|
12
|
-
const
|
|
13
|
-
return (React.createElement(SimpleButton_1.default, Object.assign({ "data-name": "delete", tooltip:
|
|
11
|
+
var _a, _b;
|
|
12
|
+
const _c = this.props, { onConfirmWarning, ConfirmAction, ConfirmationMsg, ConfirmationTitle, onClickAction } = _c, props = tslib_1.__rest(_c, ["onConfirmWarning", "ConfirmAction", "ConfirmationMsg", "ConfirmationTitle", "onClickAction"]);
|
|
13
|
+
return (React.createElement(SimpleButton_1.default, Object.assign({ "data-name": "delete", tooltip: (_a = props.tooltip) !== null && _a !== void 0 ? _a : 'Delete', variant: "text", icon: "trash", iconSize: (_b = props.iconSize) !== null && _b !== void 0 ? _b : 24 }, props, { onClick: () => this.onClick() })));
|
|
14
14
|
}
|
|
15
15
|
onClick() {
|
|
16
16
|
if (this.props.ConfirmAction) {
|
|
@@ -44,6 +44,7 @@ class QuickFilterFormComponent extends React.Component {
|
|
|
44
44
|
};
|
|
45
45
|
this.debouncedAddFilter = debounce_1.default(() => this.props.onAddColumnFilter(this.state.filter), 250);
|
|
46
46
|
this.debouncedEditFilter = debounce_1.default(() => this.props.onEditColumnFilter(this.state.filter), 250);
|
|
47
|
+
this.debouncedLoadPermittedValues = debounce_1.default(() => this.loadPermittedValues(), 500);
|
|
47
48
|
const filter = this.getFilterFromProps();
|
|
48
49
|
this._isMounted = true;
|
|
49
50
|
this.state = {
|
|
@@ -58,9 +59,19 @@ class QuickFilterFormComponent extends React.Component {
|
|
|
58
59
|
if (this.hasValuesPredicate((_b = (_a = this.state) === null || _a === void 0 ? void 0 : _a.filter) === null || _b === void 0 ? void 0 : _b.Predicate)) {
|
|
59
60
|
this.loadPermittedValues();
|
|
60
61
|
}
|
|
62
|
+
this.unsubscribeOnCellChanged = this.props.api.eventApi.on('CellChanged', (cellChangedInfo) => {
|
|
63
|
+
this.handleGridValueChange(cellChangedInfo.cellChange.column.columnId);
|
|
64
|
+
});
|
|
65
|
+
this.unsubscribeOnGridDataChanged = this.props.api.eventApi.on('GridDataChanged', () => {
|
|
66
|
+
// there is no way to find out if the changed rows are relevant for this filter, so we have to update it every time :/
|
|
67
|
+
this.handleGridValueChange();
|
|
68
|
+
});
|
|
61
69
|
}
|
|
62
70
|
componentWillUnmount() {
|
|
71
|
+
var _a, _b;
|
|
63
72
|
this._isMounted = false;
|
|
73
|
+
(_a = this.unsubscribeOnCellChanged) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
74
|
+
(_b = this.unsubscribeOnGridDataChanged) === null || _b === void 0 ? void 0 : _b.call(this);
|
|
64
75
|
}
|
|
65
76
|
UNSAFE_componentWillReceiveProps(nextProps) {
|
|
66
77
|
const filter = this.getFilterFromProps(nextProps);
|
|
@@ -239,7 +250,7 @@ class QuickFilterFormComponent extends React.Component {
|
|
|
239
250
|
return (React.createElement(rebass_1.Flex, { onMouseEnter: () => {
|
|
240
251
|
var _a;
|
|
241
252
|
if (showEvent === 'click') {
|
|
242
|
-
// For showEvent=
|
|
253
|
+
// For showEvent=mousenter this is not needed.
|
|
243
254
|
// When mouseenter is triggered on the overlay, onShowFn is called, the overlay is no longer hidden.
|
|
244
255
|
// But in this case because the trigger is click, another show is not triggered.
|
|
245
256
|
(_a = this.valuesDropdown) === null || _a === void 0 ? void 0 : _a.show();
|
|
@@ -295,6 +306,16 @@ class QuickFilterFormComponent extends React.Component {
|
|
|
295
306
|
});
|
|
296
307
|
}
|
|
297
308
|
}
|
|
309
|
+
handleGridValueChange(changedColumnId) {
|
|
310
|
+
var _a, _b, _c, _d;
|
|
311
|
+
if (!this.hasValuesPredicate((_b = (_a = this.state) === null || _a === void 0 ? void 0 : _a.filter) === null || _b === void 0 ? void 0 : _b.Predicate)) {
|
|
312
|
+
return;
|
|
313
|
+
}
|
|
314
|
+
if (changedColumnId && changedColumnId !== ((_d = (_c = this.state) === null || _c === void 0 ? void 0 : _c.filter) === null || _d === void 0 ? void 0 : _d.ColumnId)) {
|
|
315
|
+
return;
|
|
316
|
+
}
|
|
317
|
+
this.debouncedLoadPermittedValues();
|
|
318
|
+
}
|
|
298
319
|
updateFilter(filter) {
|
|
299
320
|
this.setState({ filter });
|
|
300
321
|
if (filter.Uuid) {
|
|
@@ -37,6 +37,10 @@ const AdaptablePopupModuleView = (props) => {
|
|
|
37
37
|
moduleViewProperties.onOpenEditPopup();
|
|
38
38
|
}
|
|
39
39
|
}, []);
|
|
40
|
+
React.useEffect(() => {
|
|
41
|
+
var _a;
|
|
42
|
+
(_a = moduleViewProperties === null || moduleViewProperties === void 0 ? void 0 : moduleViewProperties.onMount) === null || _a === void 0 ? void 0 : _a.call(moduleViewProperties);
|
|
43
|
+
}, []);
|
|
40
44
|
React.useEffect(() => {
|
|
41
45
|
var _a, _b;
|
|
42
46
|
if (((_a = props.popupParams) === null || _a === void 0 ? void 0 : _a.action) === 'New' || ((_b = props.popupParams) === null || _b === void 0 ? void 0 : _b.action) === 'Edit') {
|
|
@@ -33,7 +33,7 @@ const AdaptablePopupTeamSharing = (props) => {
|
|
|
33
33
|
React.createElement("strong", null, "Active"),
|
|
34
34
|
": a \"live\" share that is automatically updated with every local change"))),
|
|
35
35
|
React.createElement(FormLayout_1.default, { padding: 2 },
|
|
36
|
-
React.createElement(FormLayout_1.FormRow, { label: "
|
|
36
|
+
React.createElement(FormLayout_1.FormRow, { label: "Name: " },
|
|
37
37
|
React.createElement(Input_1.default, { autoFocus: true, value: config.description, type: "string", width: 300, placeholder: "Enter text", onChange: (e) => setConfig(Object.assign(Object.assign({}, config), { description: e.target.value })) })),
|
|
38
38
|
React.createElement(FormLayout_1.FormRow, { label: "Share: " },
|
|
39
39
|
React.createElement(rebass_1.Flex, { flexDirection: "row" },
|
|
@@ -5,7 +5,7 @@ import * as LayoutRedux from '../../Redux/ActionsReducers/LayoutRedux';
|
|
|
5
5
|
import { ColumnFilter } from '../../types';
|
|
6
6
|
export interface FilterSummaryProps extends Omit<ModuleSummaryProps<FilterSummaryComponent>, 'onClosePopup' | 'modalContainer'> {
|
|
7
7
|
ColumnFilters: ColumnFilter[];
|
|
8
|
-
onClearFilter: (columnFilter: ColumnFilter) => LayoutRedux.
|
|
8
|
+
onClearFilter: (columnFilter: ColumnFilter) => LayoutRedux.LayoutColumnFilterClearAction;
|
|
9
9
|
}
|
|
10
10
|
export declare class FilterSummaryComponent extends React.Component<FilterSummaryProps, EditableConfigEntityState> {
|
|
11
11
|
constructor(props: FilterSummaryProps);
|