@adaptabletools/adaptable 15.0.0-canary.4 → 15.0.0-canary.6
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 +1 -1
- package/base.css.map +1 -1
- package/bundle.cjs.js +146 -146
- package/index.css +1 -1
- package/index.css.map +1 -1
- package/package.json +1 -1
- package/publishTimestamp.d.ts +1 -1
- package/publishTimestamp.js +1 -1
- package/src/AdaptableOptions/ExportOptions.d.ts +3 -0
- package/src/AdaptableOptions/FilterOptions.d.ts +5 -1
- package/src/AdaptableOptions/FinsemblePluginOptions.d.ts +3 -0
- package/src/AdaptableOptions/MasterDetailPluginOptions.d.ts +3 -0
- package/src/AdaptableOptions/PredicateOptions.d.ts +3 -0
- package/src/AdaptableOptions/SettingsPanelOptions.d.ts +3 -0
- package/src/AdaptableOptions/TeamSharingOptions.d.ts +31 -5
- package/src/Api/Implementation/StyledColumnApiImpl.d.ts +1 -0
- package/src/Api/Implementation/StyledColumnApiImpl.js +4 -0
- package/src/Api/Implementation/TeamSharingApiImpl.d.ts +8 -2
- package/src/Api/Implementation/TeamSharingApiImpl.js +64 -9
- package/src/Api/Internal/FilterInternalApi.d.ts +1 -0
- package/src/Api/Internal/FilterInternalApi.js +10 -1
- package/src/Api/Internal/TeamSharingInternalApi.d.ts +3 -4
- package/src/Api/Internal/TeamSharingInternalApi.js +1 -4
- package/src/Api/StyledColumnApi.d.ts +4 -0
- package/src/Api/TeamSharingApi.d.ts +38 -12
- package/src/PredefinedConfig/Common/AdaptablePredicate.js +3 -0
- package/src/PredefinedConfig/Common/AggregationColumns.d.ts +9 -0
- package/src/PredefinedConfig/Common/RowHighlightInfo.d.ts +3 -0
- package/src/PredefinedConfig/Common/RowsHighlightInfo.d.ts +3 -0
- package/src/PredefinedConfig/ExportState.d.ts +3 -0
- package/src/PredefinedConfig/FormatColumnState.d.ts +3 -0
- package/src/PredefinedConfig/TeamSharingState.d.ts +86 -7
- package/src/PredefinedConfig/TeamSharingState.js +5 -0
- package/src/Redux/ActionsReducers/TeamSharingRedux.d.ts +13 -7
- package/src/Redux/ActionsReducers/TeamSharingRedux.js +8 -1
- package/src/Redux/Store/AdaptableStore.js +56 -13
- package/src/Strategy/TeamSharingModule.d.ts +3 -3
- package/src/Strategy/TeamSharingModule.js +6 -7
- package/src/Utilities/Defaults/DefaultAdaptableOptions.js +5 -2
- package/src/Utilities/Services/Interface/ITeamSharingService.d.ts +7 -6
- package/src/Utilities/Services/TeamSharingService.d.ts +7 -6
- package/src/Utilities/Services/TeamSharingService.js +23 -5
- package/src/View/Components/AdaptableObjectList/AdaptableObjectList.d.ts +2 -2
- package/src/View/Components/Buttons/ButtonShare.d.ts +2 -2
- package/src/View/Components/Buttons/EntityListActionButtons.d.ts +2 -2
- package/src/View/Components/ModuleSummary/ModuleDetail.d.ts +2 -2
- package/src/View/Components/Popups/AdaptablePopupTeamSharing.d.ts +2 -2
- package/src/View/Components/SharedProps/ConfigEntityRowProps.d.ts +2 -2
- package/src/View/Components/SharedProps/ModuleSummaryProps.d.ts +2 -2
- package/src/View/TeamSharing/SharedEntityDependencies.d.ts +3 -3
- package/src/View/TeamSharing/SharedEntityObjectView.d.ts +4 -4
- package/src/View/TeamSharing/SharedEntityObjectView.js +5 -6
- package/src/View/Theme/ThemePopup.js +2 -3
- package/src/agGrid/Adaptable.js +4 -0
- package/src/metamodel/adaptable.metamodel.d.ts +218 -10
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/types.d.ts +2 -2
- package/version.d.ts +1 -1
- package/version.js +1 -1
|
@@ -81,14 +81,13 @@ class TeamSharingModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
81
81
|
return Object.values(action).find((actionProperty) => (0, isAdaptableObject_1.isAdaptableObject)(actionProperty));
|
|
82
82
|
}
|
|
83
83
|
isAdaptableObjectPresentInLocalState(sharedEntity) {
|
|
84
|
-
|
|
84
|
+
var _a;
|
|
85
|
+
return !!((_a = this.api.internalApi
|
|
85
86
|
.getModuleService()
|
|
86
|
-
.getModuleById(sharedEntity.Module)
|
|
87
|
-
.getModuleAdaptableObjects()
|
|
88
|
-
.find((adaptableObject) => adaptableObject.Uuid === sharedEntity.Entity.Uuid);
|
|
87
|
+
.getModuleById(sharedEntity.Module)) === null || _a === void 0 ? void 0 : _a.getModuleAdaptableObjects().find((adaptableObject) => adaptableObject.Uuid === sharedEntity.Entity.Uuid));
|
|
89
88
|
}
|
|
90
89
|
isSharedEntityADependency(sharedEntity) {
|
|
91
|
-
const allSharedEntries = this.api.teamSharingApi.
|
|
90
|
+
const allSharedEntries = this.api.teamSharingApi.getLoadedAdaptableSharedEntities();
|
|
92
91
|
return allSharedEntries.some((sharedEntryCandidate) => {
|
|
93
92
|
var _a;
|
|
94
93
|
return (_a = sharedEntryCandidate === null || sharedEntryCandidate === void 0 ? void 0 : sharedEntryCandidate.EntityDependencyIds) === null || _a === void 0 ? void 0 : _a.includes(sharedEntity.Uuid);
|
|
@@ -106,7 +105,7 @@ class TeamSharingModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
106
105
|
sharedEntity.EntityDependencyIds.length === 0) {
|
|
107
106
|
return [sharedEntity];
|
|
108
107
|
}
|
|
109
|
-
const allSharedEntities = this.api.teamSharingApi.
|
|
108
|
+
const allSharedEntities = this.api.teamSharingApi.getLoadedAdaptableSharedEntities();
|
|
110
109
|
const dependencies = sharedEntity.EntityDependencyIds.map((dependencyUuid) => allSharedEntities.find((entity) => entity.Uuid === dependencyUuid));
|
|
111
110
|
return (0, flatten_1.default)(dependencies.map((dependency) => this.getDependencies(dependency)));
|
|
112
111
|
}
|
|
@@ -158,7 +157,7 @@ class TeamSharingModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
158
157
|
}
|
|
159
158
|
toViewAll() {
|
|
160
159
|
var _a;
|
|
161
|
-
return (((_a = this.api.teamSharingApi.
|
|
160
|
+
return (((_a = this.api.teamSharingApi.getLoadedAdaptableSharedEntities()) !== null && _a !== void 0 ? _a : [])
|
|
162
161
|
// only top level
|
|
163
162
|
.filter((sharedEntity) => !this.isSharedEntityADependency(sharedEntity))
|
|
164
163
|
.map((item) => this.toView(item)));
|
|
@@ -212,6 +212,7 @@ exports.DefaultAdaptableOptions = {
|
|
|
212
212
|
showDistinctFilteredValuesOnly: false,
|
|
213
213
|
showClearFilterButton: false,
|
|
214
214
|
showSuspendFilterButton: false,
|
|
215
|
+
quickFilterWildcards: {},
|
|
215
216
|
},
|
|
216
217
|
searchOptions: {
|
|
217
218
|
excludeColumnFromQuickSearch: undefined,
|
|
@@ -229,8 +230,10 @@ exports.DefaultAdaptableOptions = {
|
|
|
229
230
|
},
|
|
230
231
|
teamSharingOptions: {
|
|
231
232
|
enableTeamSharing: false,
|
|
232
|
-
|
|
233
|
-
|
|
233
|
+
persistSharedEntities: undefined,
|
|
234
|
+
loadSharedEntities: undefined,
|
|
235
|
+
applySharedEntities: (sharedEntities) => sharedEntities,
|
|
236
|
+
saveSharedEntities: (sharedEntities) => sharedEntities,
|
|
234
237
|
updateInterval: 0,
|
|
235
238
|
updateNotification: undefined,
|
|
236
239
|
},
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { IAdaptableService } from './IAdaptableService';
|
|
2
2
|
import { AdaptableObject } from '../../../PredefinedConfig/Common/AdaptableObject';
|
|
3
3
|
import { AdaptableModule } from '../../../PredefinedConfig/Common/Types';
|
|
4
|
-
import {
|
|
4
|
+
import { AdaptableSharedEntityConfig, SharedEntityActiveStatus, TeamSharingImportStep, AdaptableSharedEntity, CustomSharedEntityConfig, CustomSharedEntity } from '../../../PredefinedConfig/TeamSharingState';
|
|
5
5
|
import { TypeUuid } from '../../../PredefinedConfig/Uuid';
|
|
6
6
|
export interface ITeamSharingService extends IAdaptableService {
|
|
7
|
-
buildSharedEntityWithDependencies(adaptableObject: AdaptableObject, module: AdaptableModule, configuration:
|
|
8
|
-
getSharedEntityDependants(sharedEntityId: TypeUuid, sharedEntities:
|
|
9
|
-
updateActiveSharedEntity(changedAdaptableObject: AdaptableObject, userName: string, sharedEntities:
|
|
10
|
-
buildSharedEntityImportActions(sharedEntity:
|
|
11
|
-
getSharedEntityLocalAndRemoteRevisions(changedAdaptableObjectId: TypeUuid, remoteSharedEntities:
|
|
7
|
+
buildSharedEntityWithDependencies(adaptableObject: AdaptableObject, module: AdaptableModule, configuration: AdaptableSharedEntityConfig): AdaptableSharedEntity[];
|
|
8
|
+
getSharedEntityDependants(sharedEntityId: TypeUuid, sharedEntities: AdaptableSharedEntity[]): AdaptableSharedEntity[];
|
|
9
|
+
updateActiveSharedEntity(changedAdaptableObject: AdaptableObject, userName: string, sharedEntities: AdaptableSharedEntity[]): [AdaptableSharedEntity[], AdaptableSharedEntity[]];
|
|
10
|
+
buildSharedEntityImportActions(sharedEntity: AdaptableSharedEntity): [TeamSharingImportStep[], boolean];
|
|
11
|
+
getSharedEntityLocalAndRemoteRevisions(changedAdaptableObjectId: TypeUuid, remoteSharedEntities: AdaptableSharedEntity[]): any;
|
|
12
12
|
getStaleActiveSharedEntities(): SharedEntityActiveStatus;
|
|
13
13
|
showUpdateNotifications(): void;
|
|
14
|
+
buildCustomSharedEntity(Entity: any, Configuration: CustomSharedEntityConfig): CustomSharedEntity;
|
|
14
15
|
}
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
import { ITeamSharingService } from './Interface/ITeamSharingService';
|
|
2
2
|
import { AdaptableModule } from '../../PredefinedConfig/Common/Types';
|
|
3
3
|
import { AdaptableObject } from '../../PredefinedConfig/Common/AdaptableObject';
|
|
4
|
-
import {
|
|
4
|
+
import { AdaptableSharedEntityConfig, SharedEntityActiveStatus, TeamSharingImportStep, AdaptableSharedEntity, CustomSharedEntity, CustomSharedEntityConfig } from '../../PredefinedConfig/TeamSharingState';
|
|
5
5
|
import { TypeUuid } from '../../PredefinedConfig/Uuid';
|
|
6
6
|
import { AdaptableApi } from '../../../types';
|
|
7
7
|
export declare class TeamSharingService implements ITeamSharingService {
|
|
8
8
|
private adaptableApi;
|
|
9
9
|
private updateCheckTimerId;
|
|
10
10
|
constructor(adaptableApi: AdaptableApi);
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
11
|
+
buildCustomSharedEntity(Entity: any, Configuration: CustomSharedEntityConfig): CustomSharedEntity;
|
|
12
|
+
buildSharedEntityWithDependencies(adaptableObject: AdaptableObject, module: AdaptableModule, configuration: AdaptableSharedEntityConfig): AdaptableSharedEntity[];
|
|
13
|
+
getSharedEntityDependants(sharedEntityId: TypeUuid, sharedEntities: AdaptableSharedEntity[]): AdaptableSharedEntity[];
|
|
14
|
+
updateActiveSharedEntity(changedAdaptableObject: AdaptableObject, userName: string, sharedEntities: AdaptableSharedEntity[]): [AdaptableSharedEntity[], AdaptableSharedEntity[]];
|
|
15
|
+
buildSharedEntityImportActions(importedSharedEntity: AdaptableSharedEntity): [TeamSharingImportStep[], boolean];
|
|
16
|
+
getSharedEntityLocalAndRemoteRevisions(changedAdaptableObjectId: TypeUuid, remoteSharedEntities: AdaptableSharedEntity[]): [number, number];
|
|
16
17
|
getStaleActiveSharedEntities(): SharedEntityActiveStatus;
|
|
17
18
|
showUpdateNotifications(): void;
|
|
18
19
|
destroy(): void;
|
|
@@ -14,6 +14,23 @@ class TeamSharingService {
|
|
|
14
14
|
}, updateInterval);
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
|
+
buildCustomSharedEntity(Entity, Configuration) {
|
|
18
|
+
var _a;
|
|
19
|
+
const currentTime = Date.now();
|
|
20
|
+
const currentUser = this.adaptableApi.optionsApi.getUserName();
|
|
21
|
+
return {
|
|
22
|
+
EntityType: 'customEntity',
|
|
23
|
+
Entity,
|
|
24
|
+
Uuid: (_a = Configuration.Uuid) !== null && _a !== void 0 ? _a : (0, Uuid_1.createUuid)(),
|
|
25
|
+
Name: Configuration.Name,
|
|
26
|
+
Description: Configuration.Description,
|
|
27
|
+
Tags: Configuration.Tags,
|
|
28
|
+
UserName: currentUser,
|
|
29
|
+
Timestamp: currentTime,
|
|
30
|
+
ChangedBy: currentUser,
|
|
31
|
+
ChangedAt: currentTime,
|
|
32
|
+
};
|
|
33
|
+
}
|
|
17
34
|
buildSharedEntityWithDependencies(adaptableObject, module, configuration) {
|
|
18
35
|
const sharingUserName = this.adaptableApi.optionsApi.getUserName();
|
|
19
36
|
const sharingTimestamp = new Date().getTime();
|
|
@@ -74,7 +91,7 @@ class TeamSharingService {
|
|
|
74
91
|
return importInfo === null || importInfo === void 0 ? void 0 : importInfo.AddAction(Entity);
|
|
75
92
|
}
|
|
76
93
|
};
|
|
77
|
-
const existingSharedEntities = this.adaptableApi.teamSharingApi.
|
|
94
|
+
const existingSharedEntities = this.adaptableApi.teamSharingApi.getLoadedAdaptableSharedEntities();
|
|
78
95
|
const sharedEntityDependencyTree = this.getSharedEntityDependencyTree(importedSharedEntity, existingSharedEntities);
|
|
79
96
|
const importSteps = sharedEntityDependencyTree.map((sharedEntity) => ({
|
|
80
97
|
sharedEntity,
|
|
@@ -89,7 +106,7 @@ class TeamSharingService {
|
|
|
89
106
|
return [localRevision, remoteRevision];
|
|
90
107
|
}
|
|
91
108
|
getStaleActiveSharedEntities() {
|
|
92
|
-
const sharedEntities = this.adaptableApi.teamSharingApi.
|
|
109
|
+
const sharedEntities = this.adaptableApi.teamSharingApi.getLoadedAdaptableSharedEntities();
|
|
93
110
|
const activeEntities = this.adaptableApi.internalApi.getState().TeamSharing.ActiveSharedEntityMap;
|
|
94
111
|
const result = {};
|
|
95
112
|
sharedEntities
|
|
@@ -131,6 +148,7 @@ class TeamSharingService {
|
|
|
131
148
|
createSharedEntity(adaptableObject, module, configuration, sharingUserName, sharingTimestamp, createdSharedEntities) {
|
|
132
149
|
// create main shared entity
|
|
133
150
|
const mainSharedEntity = {
|
|
151
|
+
EntityType: 'adaptableEntity',
|
|
134
152
|
Uuid: (0, Uuid_1.createUuid)(),
|
|
135
153
|
Entity: adaptableObject,
|
|
136
154
|
EntityDependencyIds: [],
|
|
@@ -175,10 +193,10 @@ class TeamSharingService {
|
|
|
175
193
|
return Array.from(result.values());
|
|
176
194
|
}
|
|
177
195
|
getTeamSharingReferences(adaptableObject, module) {
|
|
178
|
-
|
|
196
|
+
var _a, _b;
|
|
197
|
+
return ((_b = (_a = this.adaptableApi.internalApi
|
|
179
198
|
.getModuleService()
|
|
180
|
-
.getModuleById(module)
|
|
181
|
-
.getTeamSharingReferences(adaptableObject);
|
|
199
|
+
.getModuleById(module)) === null || _a === void 0 ? void 0 : _a.getTeamSharingReferences(adaptableObject)) !== null && _b !== void 0 ? _b : []);
|
|
182
200
|
}
|
|
183
201
|
getSharedEntityDependencies(input, allSharedEntities) {
|
|
184
202
|
return input.EntityDependencyIds.map((dependencyId) => allSharedEntities.find((sharedEntity) => sharedEntity.Uuid === dependencyId)).filter((dependencyEntity) => !!dependencyEntity);
|
|
@@ -2,7 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import { Action } from 'redux';
|
|
3
3
|
import { AdaptableObject } from '../../../PredefinedConfig/Common/AdaptableObject';
|
|
4
4
|
import { AdaptableObjectItemView, AdaptableObjectView, IModule } from '../../../Strategy/Interface/IModule';
|
|
5
|
-
import { AccessLevel,
|
|
5
|
+
import { AccessLevel, AdaptableSharedEntityConfig } from '../../../types';
|
|
6
6
|
export declare const AdaptableObjectListItemView: React.FunctionComponent<{
|
|
7
7
|
abObject: AdaptableObject;
|
|
8
8
|
accessLevel?: AccessLevel;
|
|
@@ -16,7 +16,7 @@ export declare const AdaptableObjectListItemView: React.FunctionComponent<{
|
|
|
16
16
|
entityType: string;
|
|
17
17
|
handleOnEdit?: (tagName?: string) => void;
|
|
18
18
|
items: AdaptableObjectItemView[];
|
|
19
|
-
onShare?: (config:
|
|
19
|
+
onShare?: (config: AdaptableSharedEntityConfig) => void;
|
|
20
20
|
onSuspend?: () => void;
|
|
21
21
|
onUnSuspend?: () => void;
|
|
22
22
|
showActions?: boolean;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { SimpleButtonProps } from '../../../components/SimpleButton';
|
|
3
|
-
import {
|
|
3
|
+
import { AdaptableSharedEntityConfig } from '../../../PredefinedConfig/TeamSharingState';
|
|
4
4
|
interface ButtonShareProps extends SimpleButtonProps {
|
|
5
|
-
onShare: (config:
|
|
5
|
+
onShare: (config: AdaptableSharedEntityConfig) => void;
|
|
6
6
|
Header: string;
|
|
7
7
|
}
|
|
8
8
|
interface ButtonShareState {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import * as Redux from 'redux';
|
|
3
3
|
import { AccessLevel } from '../../../PredefinedConfig/Common/Entitlement';
|
|
4
|
-
import {
|
|
4
|
+
import { AdaptableSharedEntityConfig } from '../../../PredefinedConfig/TeamSharingState';
|
|
5
5
|
import { AdaptableObject } from '../../../PredefinedConfig/Common/AdaptableObject';
|
|
6
6
|
import { SuspendableObject } from '../../../PredefinedConfig/Common/SuspendableObject';
|
|
7
7
|
export interface EntityListActionButtonsProps extends React.ClassAttributes<EntityListActionButtons> {
|
|
8
8
|
editClick?: () => void;
|
|
9
9
|
cloneClick?: () => void;
|
|
10
|
-
shareClick?: (config:
|
|
10
|
+
shareClick?: (config: AdaptableSharedEntityConfig) => void;
|
|
11
11
|
showEdit?: boolean;
|
|
12
12
|
showClone?: boolean;
|
|
13
13
|
showDelete?: boolean;
|
|
@@ -2,7 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import * as Redux from 'redux';
|
|
3
3
|
import { AdaptableObject } from '../../../PredefinedConfig/Common/AdaptableObject';
|
|
4
4
|
import { ModuleInfo } from '../../../Strategy/Interface/IModule';
|
|
5
|
-
import {
|
|
5
|
+
import { AdaptableSharedEntityConfig } from '../../../PredefinedConfig/TeamSharingState';
|
|
6
6
|
import { AccessLevel } from '../../../PredefinedConfig/Common/Entitlement';
|
|
7
7
|
export interface ModuleDetailProps extends React.ClassAttributes<ModuleDetail> {
|
|
8
8
|
key: string;
|
|
@@ -12,7 +12,7 @@ export interface ModuleDetailProps extends React.ClassAttributes<ModuleDetail> {
|
|
|
12
12
|
moduleInfo: ModuleInfo;
|
|
13
13
|
accessLevel: AccessLevel;
|
|
14
14
|
onEdit: () => void;
|
|
15
|
-
onShare: (config:
|
|
15
|
+
onShare: (config: AdaptableSharedEntityConfig) => void;
|
|
16
16
|
onDelete: Redux.Action;
|
|
17
17
|
showBold?: boolean;
|
|
18
18
|
showEdit?: boolean;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
2
|
+
import { AdaptableSharedEntityConfig } from '../../../PredefinedConfig/TeamSharingState';
|
|
3
3
|
export interface AdaptablePopupTeamSharingProps {
|
|
4
4
|
showPopup: boolean;
|
|
5
5
|
header: string;
|
|
6
6
|
onClose: () => void;
|
|
7
|
-
onConfirm: (config:
|
|
7
|
+
onConfirm: (config: AdaptableSharedEntityConfig) => void;
|
|
8
8
|
}
|
|
9
9
|
export declare const AdaptablePopupTeamSharing: (props: AdaptablePopupTeamSharingProps) => JSX.Element;
|
|
@@ -5,7 +5,7 @@ import { IColItem } from '../../UIInterfaces';
|
|
|
5
5
|
import { AdaptableApi } from '../../../Api/AdaptableApi';
|
|
6
6
|
import { ModuleInfo } from '../../../Strategy/Interface/IModule';
|
|
7
7
|
import { AccessLevel } from '../../../PredefinedConfig/Common/Entitlement';
|
|
8
|
-
import {
|
|
8
|
+
import { AdaptableSharedEntityConfig } from '../../../PredefinedConfig/TeamSharingState';
|
|
9
9
|
export interface BaseRowProps<View> extends React.ClassAttributes<View> {
|
|
10
10
|
colItems: IColItem[];
|
|
11
11
|
api: AdaptableApi;
|
|
@@ -18,7 +18,7 @@ export interface BaseEntityRowProps<View> extends BaseRowProps<View> {
|
|
|
18
18
|
moduleInfo: ModuleInfo;
|
|
19
19
|
}
|
|
20
20
|
export interface SharedEntityRowProps<View> extends BaseEntityRowProps<View> {
|
|
21
|
-
onShare: (config:
|
|
21
|
+
onShare: (config: AdaptableSharedEntityConfig) => void;
|
|
22
22
|
teamSharingActivated: boolean;
|
|
23
23
|
accessLevel: AccessLevel;
|
|
24
24
|
onSuspend?: (adaptableObject: AdaptableObject) => void;
|
|
@@ -2,8 +2,8 @@ import { AdaptableColumn } from '../../../PredefinedConfig/Common/AdaptableColum
|
|
|
2
2
|
import { ModuleViewPopupProps } from './ModuleViewPopupProps';
|
|
3
3
|
import * as TeamSharingRedux from '../../../Redux/ActionsReducers/TeamSharingRedux';
|
|
4
4
|
import { AdaptableObject } from '../../../PredefinedConfig/Common/AdaptableObject';
|
|
5
|
-
import {
|
|
5
|
+
import { AdaptableSharedEntityConfig } from '../../../PredefinedConfig/TeamSharingState';
|
|
6
6
|
export interface ModuleSummaryProps<View> extends ModuleViewPopupProps<View> {
|
|
7
7
|
summarisedColumn: AdaptableColumn;
|
|
8
|
-
onShare: (entity: AdaptableObject, config:
|
|
8
|
+
onShare: (entity: AdaptableObject, config: AdaptableSharedEntityConfig) => TeamSharingRedux.TeamSharingShareAction;
|
|
9
9
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { AdaptableSharedEntity } from '../../../types';
|
|
3
3
|
export declare const Dependencies: React.FunctionComponent<{
|
|
4
|
-
sharedEntity:
|
|
4
|
+
sharedEntity: AdaptableSharedEntity;
|
|
5
5
|
}>;
|
|
6
6
|
export declare const SharedEntityDependencies: React.FunctionComponent<{
|
|
7
|
-
data:
|
|
7
|
+
data: AdaptableSharedEntity;
|
|
8
8
|
}>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { AdaptableSharedEntity } from '../../../types';
|
|
3
3
|
export declare const SharedEntityTypeItemView: React.FunctionComponent<{
|
|
4
|
-
data:
|
|
4
|
+
data: AdaptableSharedEntity;
|
|
5
5
|
}>;
|
|
6
6
|
export declare const getSharedEntityActiveStatusObjectView: (isDependency: boolean) => (props: {
|
|
7
|
-
data:
|
|
7
|
+
data: AdaptableSharedEntity;
|
|
8
8
|
}) => JSX.Element;
|
|
9
|
-
export declare const getSharedEntityStaleDepsItemView: (staleDependencies:
|
|
9
|
+
export declare const getSharedEntityStaleDepsItemView: (staleDependencies: AdaptableSharedEntity[]) => () => JSX.Element;
|
|
@@ -14,13 +14,13 @@ const SharedEntityTypeItemView = (props) => {
|
|
|
14
14
|
const moduleName = props.data.Module;
|
|
15
15
|
const module = adaptable.ModuleService.getModuleById(moduleName);
|
|
16
16
|
const sharedObject = props.data.Entity;
|
|
17
|
-
const item = module.toView(sharedObject);
|
|
17
|
+
const item = module === null || module === void 0 ? void 0 : module.toView(sharedObject);
|
|
18
18
|
return (React.createElement(React.Fragment, null,
|
|
19
19
|
React.createElement(rebass_1.Flex, { mb: 2, mt: 2 },
|
|
20
20
|
React.createElement(rebass_1.Flex, { mr: 2, alignItems: "center" },
|
|
21
21
|
React.createElement(Tag_1.Tag, { style: { margin: 0 } }, props.data.Module)),
|
|
22
|
-
isExpanded ? (React.createElement(SimpleButton_1.default, { "data-name": "shared-entity-collapse-button", onClick: () => setIsExpanded(false), icon: "arrow-up" }, "Collapse")) : (React.createElement(SimpleButton_1.default, { "data-name": "shared-entity-
|
|
23
|
-
isExpanded && (React.createElement(rebass_1.Box, { as: "ul", padding: 0, className: "ab-Shared-Entity-Shared-Object" },
|
|
22
|
+
item ? (isExpanded ? (React.createElement(SimpleButton_1.default, { "data-name": "shared-entity-collapse-button", onClick: () => setIsExpanded(false), icon: "arrow-up" }, "Collapse")) : (React.createElement(SimpleButton_1.default, { "data-name": "shared-entity-expand-button", onClick: () => setIsExpanded(true), icon: "arrow-down" }, "Expand"))) : null),
|
|
23
|
+
isExpanded && item && (React.createElement(rebass_1.Box, { as: "ul", padding: 0, className: "ab-Shared-Entity-Shared-Object" },
|
|
24
24
|
React.createElement(AdaptableObjectList_1.AdaptableObjectListItem, { hideControls: true, data: item, module: module })))));
|
|
25
25
|
};
|
|
26
26
|
exports.SharedEntityTypeItemView = SharedEntityTypeItemView;
|
|
@@ -31,9 +31,8 @@ const getSharedEntityActiveStatusObjectView = (isDependency) => (props) => {
|
|
|
31
31
|
const sharedEntity = props.data;
|
|
32
32
|
const isAdaptableObjectPresentInLocalState = !!adaptable.api.internalApi
|
|
33
33
|
.getModuleService()
|
|
34
|
-
.getModuleById(
|
|
35
|
-
.
|
|
36
|
-
.find((adaptableObject) => adaptableObject.Uuid === sharedEntity.Entity.Uuid);
|
|
34
|
+
.getModuleById('TeamSharing')
|
|
35
|
+
.isAdaptableObjectPresentInLocalState(sharedEntity);
|
|
37
36
|
const isUpToDateAndActive = isAdaptableObjectPresentInLocalState &&
|
|
38
37
|
sharedEntity.Type === 'Active' &&
|
|
39
38
|
((_a = activeEntries[sharedEntity.Entity.Uuid]) === null || _a === void 0 ? void 0 : _a.Revision) === sharedEntity.Revision;
|
|
@@ -49,11 +49,10 @@ class ThemePopupComponent extends React.Component {
|
|
|
49
49
|
const isCustomTheme = this.props.api.themeApi
|
|
50
50
|
.getUserThemes()
|
|
51
51
|
.some((theme) => theme.Name === this.props.CurrentTheme);
|
|
52
|
-
return (React.createElement(PopupPanel_1.PopupPanel, { headerText: this.props.moduleInfo.FriendlyName, glyphicon: this.props.moduleInfo.Glyph, infoLink: this.props.moduleInfo.HelpPage, infoLinkDisabled: !this.props.api.internalApi.isDocumentationLinksDisplayed() },
|
|
52
|
+
return (React.createElement(PopupPanel_1.PopupPanel, { headerText: this.props.moduleInfo.FriendlyName, glyphicon: this.props.moduleInfo.Glyph, infoLink: this.props.moduleInfo.HelpPage, infoLinkDisabled: !this.props.api.internalApi.isDocumentationLinksDisplayed(), button: React.createElement(ButtonNew_1.ButtonNew, { ml: 2, onClick: this.handleCreateNewTheme, accessLevel: this.props.accessLevel }) },
|
|
53
53
|
React.createElement(FormLayout_1.default, null,
|
|
54
54
|
React.createElement(FormLayout_1.FormRow, { label: "Current Theme:" },
|
|
55
|
-
React.createElement(DropdownButton_1.default, { "data-name": "select-theme-dropdown", columns: ['label'], style: { width: '50%', minWidth: 200 }, placeholder: "Select theme", value: this.props.CurrentTheme, items: optionThemes, accessLevel: this.props.accessLevel }, currentThemeDescription),
|
|
56
|
-
React.createElement(ButtonNew_1.ButtonNew, { ml: 2, onClick: this.handleCreateNewTheme, accessLevel: this.props.accessLevel }))),
|
|
55
|
+
React.createElement(DropdownButton_1.default, { "data-name": "select-theme-dropdown", columns: ['label'], style: { width: '50%', minWidth: 200 }, placeholder: "Select theme", value: this.props.CurrentTheme, items: optionThemes, accessLevel: this.props.accessLevel }, currentThemeDescription))),
|
|
57
56
|
isCustomTheme && (React.createElement(rebass_1.Box, { mt: 3 },
|
|
58
57
|
React.createElement(ThemeEditor_1.ThemeEditor, { accessLevel: this.props.accessLevel, theme: this.props.CurrentTheme })))));
|
|
59
58
|
}
|
package/src/agGrid/Adaptable.js
CHANGED
|
@@ -3201,10 +3201,14 @@ class Adaptable {
|
|
|
3201
3201
|
? this.getFormatColumnCellStyle(abColumn, activeFormatColumnsWithStyle, params)
|
|
3202
3202
|
: {})), (styledColumn ? this.getStyledColumnStyle(styledColumn, abColumn, params) : {})), (isQuickSearchActive ? quickSearchStyle : {})), this.getAlertCellStyle(abColumn, params)), this.getFlashingCellStyle(abColumn, params)), this.getCellHighlightStyle(abColumn, params));
|
|
3203
3203
|
// remove null values, AG Grid 29 fails, it asumes they are strings
|
|
3204
|
+
// TODO AFL: remove once AG-7903 and AG-7917 are fixed
|
|
3204
3205
|
Object.keys(result).forEach((key) => {
|
|
3205
3206
|
if (result[key] === null || result[key] === undefined) {
|
|
3206
3207
|
delete result[key];
|
|
3207
3208
|
}
|
|
3209
|
+
if (typeof result[key] === 'number') {
|
|
3210
|
+
result[key] = String(result[key]);
|
|
3211
|
+
}
|
|
3208
3212
|
});
|
|
3209
3213
|
return result;
|
|
3210
3214
|
};
|