@adaptabletools/adaptable 12.0.1-canary.0 → 12.0.1
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 +95 -95
- package/index.css +6 -22
- package/package.json +1 -1
- package/publishTimestamp.d.ts +1 -1
- package/publishTimestamp.js +1 -1
- package/src/Api/FilterApi.d.ts +7 -2
- package/src/Api/Implementation/FilterApiImpl.d.ts +1 -0
- package/src/Api/Implementation/FilterApiImpl.js +5 -0
- package/src/Api/Implementation/TeamSharingApiImpl.d.ts +1 -0
- package/src/Api/Implementation/TeamSharingApiImpl.js +5 -0
- package/src/Api/TeamSharingApi.d.ts +4 -0
- package/src/PredefinedConfig/Common/AdaptableIcon.d.ts +4 -1
- package/src/Redux/ActionsReducers/LayoutRedux.js +3 -0
- package/src/Strategy/AdaptableModuleBase.d.ts +4 -0
- package/src/Strategy/AdaptableModuleBase.js +6 -0
- package/src/Strategy/DashboardModule.js +1 -0
- package/src/Strategy/ExportModule.js +1 -0
- 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/Services/TeamSharingService.js +0 -2
- package/src/View/AdaptableViewFactory.js +0 -2
- 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/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/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.js +0 -1
- package/src/components/icons/index.js +0 -4
- package/src/metamodel/adaptable.metamodel.d.ts +5 -0
- package/src/metamodel/adaptable.metamodel.js +1 -1
- 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
package/index.css
CHANGED
|
@@ -2672,6 +2672,10 @@ template {
|
|
|
2672
2672
|
--ab-cmp-adaptable-statusbar__font-weight: 400;
|
|
2673
2673
|
--ab-cmp-adaptable-statusbar__border: 1px solid var(--ab-color-primary); }
|
|
2674
2674
|
|
|
2675
|
+
:root {
|
|
2676
|
+
--ab-cmp-adaptable-shared-entity-shared-object__border: 2px solid var(--ab-color-primary);
|
|
2677
|
+
--ab-cmp-adaptable-shared-entity-shared-object__nesting-color: var(--ab-color-primary); }
|
|
2678
|
+
|
|
2675
2679
|
.ab-Radio-input:focus + svg rect {
|
|
2676
2680
|
stroke: var(--ab-color-accent);
|
|
2677
2681
|
stroke-width: 2; }
|
|
@@ -4113,28 +4117,8 @@ button.ab-StatusBar__SubPanel:hover {
|
|
|
4113
4117
|
background-color: var(--ab-cmp-adaptable-statusbar-sub-panel-icon__background-color-hover);
|
|
4114
4118
|
cursor: pointer; }
|
|
4115
4119
|
|
|
4116
|
-
.ab-
|
|
4117
|
-
|
|
4118
|
-
border-right: var(--ab-cmp-adaptable-statusbar__border);
|
|
4119
|
-
border-left: var(--ab-cmp-adaptable-statusbar__border); }
|
|
4120
|
-
|
|
4121
|
-
.ab-StatusBar__SubPanel {
|
|
4122
|
-
padding: var(--ab-cmp-adaptable-statusbar-sub-panel__padding);
|
|
4123
|
-
border: 0;
|
|
4124
|
-
background: none;
|
|
4125
|
-
font-weight: 400;
|
|
4126
|
-
border-right: var(--ab-cmp-adaptable-statusbar__border); }
|
|
4127
|
-
|
|
4128
|
-
.ab-StatusBar__SubPanel:last-child {
|
|
4129
|
-
border-right: 0; }
|
|
4130
|
-
|
|
4131
|
-
.ab-StatusBar__SubPanel,
|
|
4132
|
-
.ab-StatusBar__SubPanel .ab-SimpleButton {
|
|
4133
|
-
color: var(--ab-cmp-adaptable-statusbar__color); }
|
|
4134
|
-
|
|
4135
|
-
button.ab-StatusBar__SubPanel:hover {
|
|
4136
|
-
background-color: var(--ab-cmp-adaptable-statusbar-sub-panel-icon__background-color-hover);
|
|
4137
|
-
cursor: pointer; }
|
|
4120
|
+
.ab-Shared-Entity-Shared-Object {
|
|
4121
|
+
border: var(--ab-cmp-adaptable-shared-entity-shared-object__border); }
|
|
4138
4122
|
|
|
4139
4123
|
.ab-alert--error {
|
|
4140
4124
|
background: var(--ab-color-error); }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adaptabletools/adaptable",
|
|
3
|
-
"version": "12.0.1
|
|
3
|
+
"version": "12.0.1",
|
|
4
4
|
"description": "Powerful data-agnostic HTML5 datagrid add-on that sits on top of an underlying grid component and provides all the rich functionality that advanced users expect from their DataGrids and Data Tables",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"web-components",
|
package/publishTimestamp.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default:
|
|
1
|
+
declare const _default: 1656489937822;
|
|
2
2
|
export default _default;
|
package/publishTimestamp.js
CHANGED
package/src/Api/FilterApi.d.ts
CHANGED
|
@@ -42,10 +42,15 @@ export interface FilterApi {
|
|
|
42
42
|
*/
|
|
43
43
|
isQuickFilterVisible(): boolean;
|
|
44
44
|
/**
|
|
45
|
-
* Retrieves all
|
|
45
|
+
* Retrieves all Column Filters in currently applied Layout
|
|
46
46
|
* @returns column filters
|
|
47
47
|
*/
|
|
48
48
|
getColumnFilters(): ColumnFilter[];
|
|
49
|
+
/**
|
|
50
|
+
* Retrieves all Column Filters in a given Layout
|
|
51
|
+
* @param layoutName Layout to retrieve Column Filters for
|
|
52
|
+
*/
|
|
53
|
+
getColumnFiltersForLayout(layoutName: string): ColumnFilter[];
|
|
49
54
|
/**
|
|
50
55
|
* Sets Column Filters - will replace filters for existing column and leave other column filters in place
|
|
51
56
|
* @param columnFilters Column Filters to set
|
|
@@ -72,7 +77,7 @@ export interface FilterApi {
|
|
|
72
77
|
*/
|
|
73
78
|
clearColumnFilters(): void;
|
|
74
79
|
/**
|
|
75
|
-
* Clears existing Column Filters and
|
|
80
|
+
* Clears existing Column Filters and sets new ones
|
|
76
81
|
* @param columnFilters Column Filters to set
|
|
77
82
|
*/
|
|
78
83
|
clearAndSetColumnFilter(columnFilters: ColumnFilter[]): void;
|
|
@@ -15,6 +15,7 @@ export declare class FilterApiImpl extends ApiBase implements FilterApi {
|
|
|
15
15
|
isQuickFilterAvailable(): boolean;
|
|
16
16
|
isQuickFilterVisible(): boolean;
|
|
17
17
|
getColumnFilters(): ColumnFilter[];
|
|
18
|
+
getColumnFiltersForLayout(layoutName: string): ColumnFilter[];
|
|
18
19
|
setColumnFilter(columnFilters: ColumnFilter[]): ColumnFilter[] | null;
|
|
19
20
|
clearColumnFilter(columnFilter: ColumnFilter): void;
|
|
20
21
|
clearColumnFilterByColumns(columns: string[]): void;
|
|
@@ -47,6 +47,11 @@ class FilterApiImpl extends ApiBase_1.ApiBase {
|
|
|
47
47
|
const currentLayout = this.adaptable.api.layoutApi.getCurrentLayout();
|
|
48
48
|
return (_a = currentLayout.ColumnFilters) !== null && _a !== void 0 ? _a : [];
|
|
49
49
|
}
|
|
50
|
+
getColumnFiltersForLayout(layoutName) {
|
|
51
|
+
var _a;
|
|
52
|
+
const layout = this.adaptable.api.layoutApi.getLayoutByName(layoutName);
|
|
53
|
+
return (_a = layout.ColumnFilters) !== null && _a !== void 0 ? _a : [];
|
|
54
|
+
}
|
|
50
55
|
setColumnFilter(columnFilters) {
|
|
51
56
|
columnFilters.forEach((columnFilter) => {
|
|
52
57
|
if (!columnFilter.Predicate) {
|
|
@@ -15,5 +15,6 @@ export declare class TeamSharingApiImpl extends ApiBase implements TeamSharingAp
|
|
|
15
15
|
importSharedEntry(sharedEntity: SharedEntity): void;
|
|
16
16
|
private getTeamSharingState;
|
|
17
17
|
getLoadedSharedEntities(): SharedEntity[];
|
|
18
|
+
getSharedEntryDependencies(sharedEntity: SharedEntity): SharedEntity[];
|
|
18
19
|
triggerLoadingTeamSharingEntries(): void;
|
|
19
20
|
}
|
|
@@ -78,6 +78,11 @@ class TeamSharingApiImpl extends ApiBase_1.ApiBase {
|
|
|
78
78
|
getLoadedSharedEntities() {
|
|
79
79
|
return this.getTeamSharingState().SharedEntities;
|
|
80
80
|
}
|
|
81
|
+
getSharedEntryDependencies(sharedEntity) {
|
|
82
|
+
var _a;
|
|
83
|
+
const allEntities = this.getLoadedSharedEntities();
|
|
84
|
+
return ((_a = sharedEntity === null || sharedEntity === void 0 ? void 0 : sharedEntity.EntityDependencyIds) !== null && _a !== void 0 ? _a : []).map((id) => allEntities.find((entity) => entity.Uuid === id));
|
|
85
|
+
}
|
|
81
86
|
triggerLoadingTeamSharingEntries() {
|
|
82
87
|
this.adaptable.api.internalApi.dispatchReduxAction(TeamSharingRedux.TeamSharingGet());
|
|
83
88
|
}
|
|
@@ -69,4 +69,8 @@ export interface TeamSharingApi {
|
|
|
69
69
|
* By default shared entries are loaded when the Team Sharing popup is visible.
|
|
70
70
|
*/
|
|
71
71
|
triggerLoadingTeamSharingEntries(): void;
|
|
72
|
+
/**
|
|
73
|
+
* Retrieves shared entry dependencies.
|
|
74
|
+
*/
|
|
75
|
+
getSharedEntryDependencies(sharedEntry: SharedEntity): SharedEntity[];
|
|
72
76
|
}
|
|
@@ -48,4 +48,7 @@ export interface AdaptableBaseIcon {
|
|
|
48
48
|
*/
|
|
49
49
|
style?: React.CSSProperties;
|
|
50
50
|
}
|
|
51
|
-
|
|
51
|
+
/**
|
|
52
|
+
* All AdapTable internal icon names
|
|
53
|
+
*/
|
|
54
|
+
export declare type AdaptableInternalIconName = 'add' | 'add-row' | 'alert' | 'align-justify' | 'analysis' | 'application' | 'arrow-down' | 'arrow-left' | 'arrow-right' | 'arrow-up' | 'arrowexpand' | 'attach-file' | 'blanks' | 'boolean-list' | 'broadcast' | 'build' | 'bulk-update' | 'calculated-column' | 'calendar' | 'call' | 'campaign' | 'cell-summary' | 'cell-validation' | 'chart' | 'chat' | 'check' | 'check-circle' | 'checked' | 'clear' | 'clone' | 'close' | 'cloud-upload' | 'collapse' | 'column-add' | 'column-chooser' | 'column-filter' | 'comment' | 'conditional-style' | 'contains' | 'custom-sort' | 'dashboard' | 'data-set' | 'date-range' | 'delete' | 'division' | 'dock' | 'drag' | 'edit' | 'ends-with' | 'equal' | 'equation' | 'error' | 'expand' | 'exponent' | 'export' | 'export-data' | 'fast-backward' | 'fast-forward' | 'filter' | 'flashing-cell' | 'folder' | 'folder-open' | 'folder-shared' | 'format-column' | 'freetext-column' | 'function' | 'gradient-column' | 'greater-than' | 'greater-than-or-equal' | 'hide-column' | 'history' | 'home' | 'import-export' | 'info' | 'instrument' | 'invalid' | 'ipushpull' | 'justify' | 'layout' | 'less-than' | 'less-than-or-equal' | 'list' | 'login' | 'logout' | 'menu' | 'minus' | 'multiplication' | 'newpage' | 'news' | 'non-blanks' | 'not-contains' | 'not-equal' | 'ok' | 'pause' | 'percent' | 'percent-bar' | 'person' | 'pie-chart' | 'play' | 'plus' | 'plus-minus' | 'query' | 'quick-search' | 'quote' | 'refresh' | 'regex' | 'reminder' | 'save' | 'schedule' | 'settings' | 'shortcut' | 'show-column' | 'smart-edit' | 'sort-asc' | 'sort-desc' | 'spark-line' | 'starts-with' | 'state-management' | 'statusbar' | 'stop' | 'system-status' | 'tab-unselected' | 'team-share' | 'theme' | 'tool-panel' | 'track-changes' | 'trash' | 'triangle-down' | 'triangle-up' | 'unchecked' | 'undo' | 'updated-row' | 'upload' | 'warning';
|
|
@@ -165,6 +165,9 @@ const LayoutReducer = (state = initialState, action) => {
|
|
|
165
165
|
const currentLayoutName = setColumnCaptionAction.layoutName;
|
|
166
166
|
let currentLayout = state.Layouts.find((l) => l.Name === currentLayoutName);
|
|
167
167
|
if (currentLayout) {
|
|
168
|
+
if (!currentLayout.ColumnHeadersMap) {
|
|
169
|
+
currentLayout.ColumnHeadersMap = {};
|
|
170
|
+
}
|
|
168
171
|
currentLayout.ColumnHeadersMap[setColumnCaptionAction.columnId] =
|
|
169
172
|
setColumnCaptionAction.caption;
|
|
170
173
|
return Object.assign({}, state, {
|
|
@@ -23,6 +23,10 @@ export declare abstract class AdaptableModuleBase implements IModule {
|
|
|
23
23
|
protected getViewAccessLevel(): AccessLevel;
|
|
24
24
|
protected getEditAccessLevel(): AccessLevel;
|
|
25
25
|
isModuleAvailable(): boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Used inside the unified UI to show the share button
|
|
28
|
+
*/
|
|
29
|
+
isModuleObjectsShareable(): boolean;
|
|
26
30
|
isModuleEditable(): boolean;
|
|
27
31
|
updateOldConfig(): void;
|
|
28
32
|
getModuleAdaptableObjects(): AdaptableObject[];
|
|
@@ -36,6 +36,12 @@ class AdaptableModuleBase {
|
|
|
36
36
|
isModuleAvailable() {
|
|
37
37
|
return this.hasRequiredAccessLevel(this.getViewAccessLevel());
|
|
38
38
|
}
|
|
39
|
+
/**
|
|
40
|
+
* Used inside the unified UI to show the share button
|
|
41
|
+
*/
|
|
42
|
+
isModuleObjectsShareable() {
|
|
43
|
+
return true;
|
|
44
|
+
}
|
|
39
45
|
isModuleEditable() {
|
|
40
46
|
return this.hasRequiredAccessLevel(this.getEditAccessLevel());
|
|
41
47
|
}
|
|
@@ -196,14 +196,14 @@ class FormatColumnModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
196
196
|
let formatColumn = this.api.formatColumnApi.getFormatColumnForColumnId(column.columnId);
|
|
197
197
|
let hasCheckBox = formatColumn && ((_a = formatColumn.ColumnStyle) === null || _a === void 0 ? void 0 : _a.CheckBoxStyle);
|
|
198
198
|
if (hasCheckBox) {
|
|
199
|
-
returnColumnMenuItems.push(this.createColumnMenuItemClickFunction('Remove Checkbox', '
|
|
199
|
+
returnColumnMenuItems.push(this.createColumnMenuItemClickFunction('Remove Checkbox', 'unchecked', () => {
|
|
200
200
|
this.api.formatColumnApi.deleteFormatColumn(formatColumn);
|
|
201
201
|
}));
|
|
202
202
|
}
|
|
203
203
|
else {
|
|
204
204
|
// const test = this.api.formatColumnApi.getCheckBoxStyleFormatColumn(column);
|
|
205
205
|
if (formatColumn) {
|
|
206
|
-
returnColumnMenuItems.push(this.createColumnMenuItemClickFunction('Show as Checkbox', '
|
|
206
|
+
returnColumnMenuItems.push(this.createColumnMenuItemClickFunction('Show as Checkbox', 'checked', () => {
|
|
207
207
|
formatColumn.ColumnStyle = {
|
|
208
208
|
CheckBoxStyle: true,
|
|
209
209
|
};
|
|
@@ -212,7 +212,7 @@ class FormatColumnModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
212
212
|
}));
|
|
213
213
|
}
|
|
214
214
|
else {
|
|
215
|
-
returnColumnMenuItems.push(this.createColumnMenuItemClickFunction('Show as Checkbox', '
|
|
215
|
+
returnColumnMenuItems.push(this.createColumnMenuItemClickFunction('Show as Checkbox', 'checked', () => {
|
|
216
216
|
let newFormatColumn = {
|
|
217
217
|
Scope: {
|
|
218
218
|
ColumnIds: [column.columnId],
|
|
@@ -42,6 +42,7 @@ class GridInfoModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
42
42
|
return [
|
|
43
43
|
{
|
|
44
44
|
label: 'Show Info',
|
|
45
|
+
module: this.moduleInfo.ModuleName,
|
|
45
46
|
isVisible: true,
|
|
46
47
|
icon: {
|
|
47
48
|
name: this.moduleInfo.Glyph,
|
|
@@ -90,6 +91,7 @@ class GridInfoModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
90
91
|
return [
|
|
91
92
|
{
|
|
92
93
|
label: 'Show Info',
|
|
94
|
+
module: this.moduleInfo.ModuleName,
|
|
93
95
|
isVisible: true,
|
|
94
96
|
icon: {
|
|
95
97
|
name: this.moduleInfo.Glyph,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
2
|
import { AdaptableColumn } from '../../PredefinedConfig/Common/AdaptableColumn';
|
|
3
3
|
import { AdaptableMenuItem, ContextMenuContext } from '../../PredefinedConfig/Common/Menu';
|
|
4
4
|
import { AdaptableModule } from '../../PredefinedConfig/Common/Types';
|
|
@@ -64,6 +64,14 @@ export interface AdaptableObjectView {
|
|
|
64
64
|
* Reference to the underling object.
|
|
65
65
|
*/
|
|
66
66
|
abObject: AdaptableObject;
|
|
67
|
+
/**
|
|
68
|
+
* Style added on the item wrapper.
|
|
69
|
+
*/
|
|
70
|
+
style?: CSSProperties;
|
|
71
|
+
/**
|
|
72
|
+
* ClassName added on the item wrapper.
|
|
73
|
+
*/
|
|
74
|
+
className?: string;
|
|
67
75
|
}
|
|
68
76
|
export interface AdaptableObjectCompactView {
|
|
69
77
|
item: AdaptableObjectItemView;
|
|
@@ -79,6 +87,7 @@ export interface AdaptableModuleView {
|
|
|
79
87
|
* Allows to add custom actions.
|
|
80
88
|
*/
|
|
81
89
|
actions?: AdaptableModuleViewAction[];
|
|
90
|
+
onMount?: () => void;
|
|
82
91
|
onOpenEditPopup?: (abObject?: AdaptableObject) => void;
|
|
83
92
|
getDeleteAction?: (abObject: AdaptableObject) => Redux.Action;
|
|
84
93
|
getCompactDeleteAction?: (abObject: AdaptableObject) => Redux.Action;
|
|
@@ -124,6 +133,7 @@ export interface IModule {
|
|
|
124
133
|
setModuleEntitlement(): void;
|
|
125
134
|
isModuleAvailable(): boolean;
|
|
126
135
|
isModuleEditable(): boolean;
|
|
136
|
+
isModuleObjectsShareable(): boolean;
|
|
127
137
|
getTeamSharingAction(): TeamSharingImportInfo<AdaptableObject> | undefined;
|
|
128
138
|
getModuleAdaptableObjects(): AdaptableObject[];
|
|
129
139
|
getTeamSharingReferences(adaptableObject: AdaptableObject): TeamSharingReferences;
|
|
@@ -162,6 +162,7 @@ class LayoutModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
162
162
|
returnColumnMenuItems.push({
|
|
163
163
|
label: 'Select',
|
|
164
164
|
isVisible: true,
|
|
165
|
+
module: this.moduleInfo.ModuleName,
|
|
165
166
|
icon: {
|
|
166
167
|
name: 'tab-unselected',
|
|
167
168
|
},
|
|
@@ -198,6 +199,7 @@ class LayoutModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
198
199
|
gridMenuItems.push(this.createColumnMenuItemClickFunction('Select', 'tab-unselected', clickFunction));
|
|
199
200
|
returnColumnMenuItems.push({
|
|
200
201
|
label: 'Grid',
|
|
202
|
+
module: this.moduleInfo.ModuleName,
|
|
201
203
|
isVisible: true,
|
|
202
204
|
icon: { name: 'align-justify' },
|
|
203
205
|
subItems: gridMenuItems,
|
|
@@ -1,11 +1,21 @@
|
|
|
1
1
|
import { AdaptableModuleBase } from './AdaptableModuleBase';
|
|
2
|
-
import { IModule } from './Interface/IModule';
|
|
2
|
+
import { AdaptableModuleView, AdaptableObjectView, IModule } from './Interface/IModule';
|
|
3
3
|
import { AdaptableApi } from '../Api/AdaptableApi';
|
|
4
|
+
import { SharedEntity } from '../../types';
|
|
4
5
|
export declare class TeamSharingModule extends AdaptableModuleBase implements IModule {
|
|
5
6
|
private SKIP_TEAMSHARING_UPDATE_ACTIONS;
|
|
6
7
|
constructor(api: AdaptableApi);
|
|
7
8
|
isModuleAvailable(): boolean;
|
|
9
|
+
isModuleObjectsShareable(): boolean;
|
|
8
10
|
getPopupMaxWidth(): number | undefined;
|
|
9
11
|
private handleStateChanged;
|
|
10
12
|
private extractAdaptableObjectFromAction;
|
|
13
|
+
isAdaptableObjectPresentInLocalState(sharedEntity: SharedEntity): boolean;
|
|
14
|
+
private isSharedEntityADependency;
|
|
15
|
+
private isStaleAndActive;
|
|
16
|
+
private getDependencies;
|
|
17
|
+
private getStaleDependencies;
|
|
18
|
+
toView(sharedEntity: SharedEntity): AdaptableObjectView;
|
|
19
|
+
toViewAll(): AdaptableObjectView[];
|
|
20
|
+
getViewProperties(): AdaptableModuleView;
|
|
11
21
|
}
|
|
@@ -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;
|
|
@@ -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,
|
|
@@ -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) {
|