@adaptabletools/adaptable-cjs 23.0.5-canary.0 → 23.0.5-canary.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/index.css +0 -64
- package/package.json +1 -1
- package/src/AdaptableState/Aggregations/weightedAverage.d.ts +0 -1
- package/src/AdaptableState/Aggregations/weightedAverage.js +3 -4
- package/src/components/CodeBlock/index.d.ts +0 -1
- package/src/components/CodeBlock/index.js +2 -3
- package/src/env.js +2 -2
- package/tsconfig.cjs.tsbuildinfo +1 -1
- package/src/AdaptableState/Common/NamedObject.d.ts +0 -10
- package/src/AdaptableState/Common/NamedObject.js +0 -2
- package/src/Utilities/ExpressionFunctions/groupingMap.d.ts +0 -35
- package/src/Utilities/ExpressionFunctions/groupingMap.js +0 -94
- package/src/Utilities/Interface/AdaptableToolPanelContext.d.ts +0 -4
- package/src/Utilities/Interface/AdaptableToolPanelContext.js +0 -2
- package/src/View/Components/Buttons/EntityListActionButtons.d.ts +0 -38
- package/src/View/Components/Buttons/EntityListActionButtons.js +0 -46
- package/src/View/Components/ColumnFilter/components/ColumnFilterMenu.d.ts +0 -12
- package/src/View/Components/ColumnFilter/components/ColumnFilterMenu.js +0 -71
- package/src/View/Components/EntityRowItem.d.ts +0 -7
- package/src/View/Components/EntityRowItem.js +0 -12
- package/src/View/Components/FilterForm/getDefaultColumnFilterPredicate.d.ts +0 -3
- package/src/View/Components/FilterForm/getDefaultColumnFilterPredicate.js +0 -9
- package/src/View/Components/ModuleProfile.d.ts +0 -8
- package/src/View/Components/ModuleProfile.js +0 -15
- package/src/View/Components/ModuleSummary/ModuleDetail.d.ts +0 -23
- package/src/View/Components/ModuleSummary/ModuleDetail.js +0 -20
- package/src/View/Components/ModuleSummary/ModuleHeader.d.ts +0 -15
- package/src/View/Components/ModuleSummary/ModuleHeader.js +0 -20
- package/src/View/Components/ModuleSummary/SummaryRowItem.d.ts +0 -7
- package/src/View/Components/ModuleSummary/SummaryRowItem.js +0 -17
- package/src/View/Components/SharedProps/ModuleSummaryProps.d.ts +0 -9
- package/src/View/Components/SharedProps/ModuleSummaryProps.js +0 -2
- package/src/View/Components/SharedProps/ToolPanelModuleViewPopupProps.d.ts +0 -13
- package/src/View/Components/SharedProps/ToolPanelModuleViewPopupProps.js +0 -2
- package/src/View/Components/SharedProps/ToolbarModuleViewPopupProps.d.ts +0 -14
- package/src/View/Components/SharedProps/ToolbarModuleViewPopupProps.js +0 -2
- package/src/View/Components/StyleVisualItem.d.ts +0 -9
- package/src/View/Components/StyleVisualItem.js +0 -45
- package/src/View/Components/WizardSummaryPage.d.ts +0 -7
- package/src/View/Components/WizardSummaryPage.js +0 -22
- package/src/components/Accordion.d.ts +0 -7
- package/src/components/Accordion.js +0 -38
- package/src/components/FlexWithFooter.d.ts +0 -9
- package/src/components/FlexWithFooter.js +0 -15
- package/src/components/NotifyResize/index.d.ts +0 -9
- package/src/components/NotifyResize/index.js +0 -38
- package/src/components/PopupWithFooter.d.ts +0 -14
- package/src/components/PopupWithFooter.js +0 -15
- package/src/components/SelectableList/index.d.ts +0 -15
- package/src/components/SelectableList/index.js +0 -93
- package/src/components/SizedContainer/index.d.ts +0 -17
- package/src/components/SizedContainer/index.js +0 -23
- package/src/components/Table/index.d.ts +0 -4
- package/src/components/Table/index.js +0 -9
- package/src/components/WizardPanel/index.d.ts +0 -9
- package/src/components/WizardPanel/index.js +0 -10
- package/src/components/icons/align-justify.d.ts +0 -3
- package/src/components/icons/align-justify.js +0 -6
- package/src/components/icons/column-info.d.ts +0 -3
- package/src/components/icons/column-info.js +0 -6
- package/src/components/icons/gradient-column.d.ts +0 -3
- package/src/components/icons/gradient-column.js +0 -6
- package/src/components/icons/invalid.d.ts +0 -3
- package/src/components/icons/invalid.js +0 -6
- package/src/components/icons/logout copy.d.ts +0 -3
- package/src/components/icons/logout copy.js +0 -6
- package/src/components/icons/smart-edit.d.ts +0 -3
- package/src/components/icons/smart-edit.js +0 -6
- package/src/components/icons/team-share.d.ts +0 -3
- package/src/components/icons/team-share.js +0 -6
- package/src/components/icons/unchecked.d.ts +0 -3
- package/src/components/icons/unchecked.js +0 -6
- package/src/components/icons/user-filter.d.ts +0 -3
- package/src/components/icons/user-filter.js +0 -6
- package/src/components/utils/useContainerScrollObserver/index.d.ts +0 -6
- package/src/components/utils/useContainerScrollObserver/index.js +0 -83
- package/src/components/utils/useGlobalEvent.d.ts +0 -1
- package/src/components/utils/useGlobalEvent.js +0 -12
- package/src/components/utils/useLatest.d.ts +0 -1
- package/src/components/utils/useLatest.js +0 -10
- package/src/components/utils/usePropState.d.ts +0 -2
- package/src/components/utils/usePropState.js +0 -11
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { AdaptableObject } from './AdaptableObject';
|
|
2
|
-
/**
|
|
3
|
-
* Interface that extends Adaptable Object for those config items that have a Name
|
|
4
|
-
*/
|
|
5
|
-
export interface NamedObject extends AdaptableObject {
|
|
6
|
-
/**
|
|
7
|
-
* Name of the Adaptable Object
|
|
8
|
-
*/
|
|
9
|
-
Name: string;
|
|
10
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { DeepMap } from './deepMap';
|
|
2
|
-
export type GroupKeyType<T extends any = any> = T;
|
|
3
|
-
export type GroupBy<DataType, KeyType> = {
|
|
4
|
-
field: keyof DataType;
|
|
5
|
-
toKey?: (value: any, data: DataType) => GroupKeyType<KeyType>;
|
|
6
|
-
};
|
|
7
|
-
export type GroupParams<DataType, KeyType> = {
|
|
8
|
-
groupBy: GroupBy<DataType, KeyType>[];
|
|
9
|
-
defaultToKey?: (value: any, item: DataType) => GroupKeyType<KeyType>;
|
|
10
|
-
reducers?: Record<string, DataSourceAggregationReducer<DataType, any>>;
|
|
11
|
-
};
|
|
12
|
-
export type DataSourceAggregationReducer<T, AggregationResultType> = {
|
|
13
|
-
name?: string;
|
|
14
|
-
field?: keyof T;
|
|
15
|
-
initialValue?: AggregationResultType;
|
|
16
|
-
getter?: (data: T) => any;
|
|
17
|
-
reducer: string | ((accumulator: any, value: any, data: T) => AggregationResultType | any);
|
|
18
|
-
done?: (accumulatedValue: AggregationResultType | any, array: T[]) => AggregationResultType;
|
|
19
|
-
};
|
|
20
|
-
export type DataGroupResult<DataType, KeyType extends any> = {
|
|
21
|
-
deepMap: DeepMap<GroupKeyType<KeyType>, DeepMapGroupValueType<DataType, KeyType>>;
|
|
22
|
-
groupParams: GroupParams<DataType, KeyType>;
|
|
23
|
-
initialData: DataType[];
|
|
24
|
-
reducerResults?: Record<string, any>;
|
|
25
|
-
};
|
|
26
|
-
export type DeepMapGroupValueType<DataType, KeyType> = {
|
|
27
|
-
items: DataType[];
|
|
28
|
-
commonData?: Partial<DataType>;
|
|
29
|
-
reducerResults: Record<string, any>;
|
|
30
|
-
};
|
|
31
|
-
export type AggregationReducerResult<AggregationResultType extends any = any> = {
|
|
32
|
-
value: AggregationResultType;
|
|
33
|
-
id: string;
|
|
34
|
-
};
|
|
35
|
-
export declare function group<DataType, KeyType = any>(groupParams: GroupParams<DataType, KeyType>, data: DataType[]): DataGroupResult<DataType, KeyType>;
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.group = group;
|
|
4
|
-
const deepMap_1 = require("./deepMap");
|
|
5
|
-
function DEFAULT_TO_KEY(value) {
|
|
6
|
-
return value;
|
|
7
|
-
}
|
|
8
|
-
function group(groupParams, data) {
|
|
9
|
-
const { groupBy, defaultToKey = DEFAULT_TO_KEY, reducers } = groupParams;
|
|
10
|
-
const groupByLength = groupBy.length;
|
|
11
|
-
const deepMap = new deepMap_1.DeepMap();
|
|
12
|
-
let currentGroupKeys = [];
|
|
13
|
-
const initialReducerValue = initReducers(reducers);
|
|
14
|
-
const globalReducerResults = { ...initialReducerValue };
|
|
15
|
-
for (let i = 0, len = data.length; i < len; i++) {
|
|
16
|
-
let item = data[i];
|
|
17
|
-
for (let groupByIndex = 0; groupByIndex < groupByLength; groupByIndex++) {
|
|
18
|
-
const { field: groupByProperty, toKey: groupToKey } = groupBy[groupByIndex];
|
|
19
|
-
const key = (groupToKey || defaultToKey)(item[groupByProperty], item);
|
|
20
|
-
currentGroupKeys.push(key);
|
|
21
|
-
if (!deepMap.has(currentGroupKeys)) {
|
|
22
|
-
const deepMapGroupValue = {
|
|
23
|
-
items: [],
|
|
24
|
-
reducerResults: { ...initialReducerValue },
|
|
25
|
-
};
|
|
26
|
-
deepMap.set(currentGroupKeys, deepMapGroupValue);
|
|
27
|
-
}
|
|
28
|
-
const { items: currentGroupItems, reducerResults } = deepMap.get(currentGroupKeys);
|
|
29
|
-
currentGroupItems.push(item);
|
|
30
|
-
if (reducers) {
|
|
31
|
-
computeReducersFor(item, reducers, reducerResults);
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
if (reducers) {
|
|
35
|
-
computeReducersFor(item, reducers, globalReducerResults);
|
|
36
|
-
}
|
|
37
|
-
currentGroupKeys.length = 0;
|
|
38
|
-
}
|
|
39
|
-
const hasReducersWithDoneFn = reducers && Object.values(reducers).some((reducer) => reducer.done);
|
|
40
|
-
if (hasReducersWithDoneFn) {
|
|
41
|
-
deepMap.visitDepthFirst((deepMapValue, _keys, _indexInGroup, next) => {
|
|
42
|
-
completeReducers(reducers, deepMapValue.reducerResults, deepMapValue.items);
|
|
43
|
-
next?.();
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
if (hasReducersWithDoneFn) {
|
|
47
|
-
completeReducers(reducers, globalReducerResults, data);
|
|
48
|
-
}
|
|
49
|
-
const result = {
|
|
50
|
-
deepMap,
|
|
51
|
-
groupParams,
|
|
52
|
-
initialData: data,
|
|
53
|
-
reducerResults: globalReducerResults,
|
|
54
|
-
};
|
|
55
|
-
return result;
|
|
56
|
-
}
|
|
57
|
-
function initReducers(reducers) {
|
|
58
|
-
if (!reducers || !Object.keys(reducers).length) {
|
|
59
|
-
return {};
|
|
60
|
-
}
|
|
61
|
-
const result = {};
|
|
62
|
-
for (let key in reducers)
|
|
63
|
-
if (reducers.hasOwnProperty(key)) {
|
|
64
|
-
result[key] = reducers[key].initialValue;
|
|
65
|
-
}
|
|
66
|
-
return result;
|
|
67
|
-
}
|
|
68
|
-
function computeReducersFor(data, reducers, reducerResults) {
|
|
69
|
-
if (!reducers || !Object.keys(reducers).length) {
|
|
70
|
-
return;
|
|
71
|
-
}
|
|
72
|
-
for (let key in reducers)
|
|
73
|
-
if (reducers.hasOwnProperty(key)) {
|
|
74
|
-
const reducer = reducers[key];
|
|
75
|
-
if (typeof reducer.reducer !== 'function') {
|
|
76
|
-
continue;
|
|
77
|
-
}
|
|
78
|
-
const currentValue = reducerResults[key];
|
|
79
|
-
const value = reducer.field ? data[reducer.field] : reducer.getter?.(data) ?? null;
|
|
80
|
-
reducerResults[key] = reducer.reducer(currentValue, value, data);
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
function completeReducers(reducers, reducerResults, items) {
|
|
84
|
-
if (reducers) {
|
|
85
|
-
for (let key in reducers)
|
|
86
|
-
if (reducers.hasOwnProperty(key)) {
|
|
87
|
-
const reducer = reducers[key];
|
|
88
|
-
if (reducer.done) {
|
|
89
|
-
reducerResults[key] = reducer.done(reducerResults[key], items);
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
return reducerResults;
|
|
94
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import * as Redux from 'redux';
|
|
3
|
-
import { AccessLevel } from '../../../AdaptableState/Common/Entitlement';
|
|
4
|
-
import { AdaptableSharedEntityConfig } from '../../../AdaptableState/TeamSharingState';
|
|
5
|
-
import { AdaptableObject, SuspendableObject } from '../../../AdaptableState/Common/AdaptableObject';
|
|
6
|
-
export interface EntityListActionButtonsProps extends React.ClassAttributes<EntityListActionButtons> {
|
|
7
|
-
editClick?: () => void;
|
|
8
|
-
cloneClick?: () => void;
|
|
9
|
-
shareClick?: (config: AdaptableSharedEntityConfig) => void;
|
|
10
|
-
showEdit?: boolean;
|
|
11
|
-
showClone?: boolean;
|
|
12
|
-
showDelete?: boolean;
|
|
13
|
-
showShare?: boolean;
|
|
14
|
-
showSuspend?: boolean;
|
|
15
|
-
onSuspend?: (adaptableObject: AdaptableObject) => void;
|
|
16
|
-
onUnSuspend?: (adaptableObject: AdaptableObject) => void;
|
|
17
|
-
overrideDisableEdit?: boolean;
|
|
18
|
-
overrideDisableDelete?: boolean;
|
|
19
|
-
overrideDisableClone?: boolean;
|
|
20
|
-
overrideDisableShare?: boolean;
|
|
21
|
-
overrideTooltipEdit?: string;
|
|
22
|
-
overrideTooltipClone?: string;
|
|
23
|
-
overrideTooltipDelete?: string;
|
|
24
|
-
overrideTooltipShare?: string;
|
|
25
|
-
confirmDeleteAction: Redux.Action;
|
|
26
|
-
entityType: string;
|
|
27
|
-
justifyContent?: 'start' | 'center' | 'end';
|
|
28
|
-
accessLevel: AccessLevel;
|
|
29
|
-
cloneAccessLevel?: AccessLevel;
|
|
30
|
-
editSize: any;
|
|
31
|
-
deleteSize: any;
|
|
32
|
-
shareSize: any;
|
|
33
|
-
suspendableObject: SuspendableObject;
|
|
34
|
-
}
|
|
35
|
-
export declare class EntityListActionButtons extends React.Component<EntityListActionButtonsProps, {}> {
|
|
36
|
-
static defaultProps: EntityListActionButtonsProps;
|
|
37
|
-
render(): React.JSX.Element;
|
|
38
|
-
}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.EntityListActionButtons = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
-
const React = tslib_1.__importStar(require("react"));
|
|
7
|
-
const ButtonEdit_1 = require("./ButtonEdit");
|
|
8
|
-
const ButtonClone_1 = require("./ButtonClone");
|
|
9
|
-
const ButtonDelete_1 = require("./ButtonDelete");
|
|
10
|
-
const ButtonShare_1 = require("./ButtonShare");
|
|
11
|
-
const SuspendToggleButton_1 = require("./SuspendToggleButton/SuspendToggleButton");
|
|
12
|
-
const utils_1 = require("../../../lib/utils");
|
|
13
|
-
const GeneralConstants_1 = require("../../../Utilities/Constants/GeneralConstants");
|
|
14
|
-
const Flex_1 = require("../../../components/Flex");
|
|
15
|
-
const stopPropagation = (e) => {
|
|
16
|
-
e.stopPropagation();
|
|
17
|
-
};
|
|
18
|
-
class EntityListActionButtons extends React.Component {
|
|
19
|
-
static defaultProps = {
|
|
20
|
-
suspendableObject: null,
|
|
21
|
-
showEdit: true,
|
|
22
|
-
showDelete: true,
|
|
23
|
-
showShare: false,
|
|
24
|
-
showSuspend: false,
|
|
25
|
-
overrideDisableEdit: false,
|
|
26
|
-
overrideDisableDelete: false,
|
|
27
|
-
overrideDisableClone: false,
|
|
28
|
-
overrideDisableShare: false,
|
|
29
|
-
confirmDeleteAction: null,
|
|
30
|
-
entityType: '',
|
|
31
|
-
accessLevel: GeneralConstants_1.ACCESS_LEVEL_FULL,
|
|
32
|
-
editSize: 'xsmall',
|
|
33
|
-
deleteSize: 'xsmall',
|
|
34
|
-
shareSize: 'xsmall',
|
|
35
|
-
};
|
|
36
|
-
render() {
|
|
37
|
-
const { justifyContent } = this.props;
|
|
38
|
-
const justifyContentClassName = (0, utils_1.cn)({
|
|
39
|
-
'twa:justify-start': justifyContent === 'start',
|
|
40
|
-
'twa:justify-center': justifyContent === 'center',
|
|
41
|
-
'twa:justify-end': justifyContent === 'end',
|
|
42
|
-
}) || 'twa:justify-center';
|
|
43
|
-
return ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { className: `${justifyContentClassName} twa:m-0 twa:p-0`, onClick: stopPropagation, children: [this.props.showEdit && ((0, jsx_runtime_1.jsx)(ButtonEdit_1.ButtonEdit, { onClick: () => (this.props.editClick ? this.props.editClick() : null), className: `twa:ml-0 twa:mr-[2px] twa:my-[2px] twa:text-action-edit-foreground twa:bg-action-edit twa:fill-action-edit-foreground`, disabled: this.props.overrideDisableEdit || this.props.accessLevel == GeneralConstants_1.ACCESS_LEVEL_READ_ONLY, tooltip: this.props.overrideTooltipEdit, accessLevel: this.props.accessLevel })), this.props.showClone && ((0, jsx_runtime_1.jsx)(ButtonClone_1.ButtonClone, { onClick: () => (this.props.cloneClick ? this.props.cloneClick() : null), className: `twa:ml-0 twa:mr-[2px] twa:my-[2px] twa:text-action-clone-foreground twa:bg-action-clone twa:fill-action-clone-foreground`, children: null, disabled: this.props.overrideDisableClone || this.props.cloneAccessLevel == GeneralConstants_1.ACCESS_LEVEL_READ_ONLY, tooltip: this.props.overrideTooltipClone, accessLevel: this.props.cloneAccessLevel })), this.props.showDelete && ((0, jsx_runtime_1.jsx)(ButtonDelete_1.ButtonDelete, { "data-name": "delete", className: `twa:mx-[px] twa:my-[2px] twa:text-action-delete-foreground twa:bg-action-delete twa:fill-action-delete-foreground`, disabled: this.props.overrideDisableDelete || this.props.accessLevel == GeneralConstants_1.ACCESS_LEVEL_READ_ONLY, tooltip: this.props.overrideTooltipDelete, ConfirmAction: this.props.confirmDeleteAction, ConfirmationMsg: 'Are you sure you want to delete this ' + this.props.entityType + '?', ConfirmationTitle: 'Delete ' + this.props.entityType, accessLevel: this.props.accessLevel })), this.props.showShare && ((0, jsx_runtime_1.jsx)(ButtonShare_1.ButtonShare, { className: `twa:mx-[1px] twa:my-[2px] twa:text-action-share-foreground twa:bg-action-share twa:fill-action-share-foreground`, onShare: (config) => this.props.shareClick ? this.props.shareClick(config) : null, Header: `TeamSharing ${this.props.entityType}`, disabled: this.props.overrideDisableShare || this.props.accessLevel == GeneralConstants_1.ACCESS_LEVEL_READ_ONLY, tooltip: this.props.overrideTooltipShare, accessLevel: this.props.accessLevel })), this.props.showSuspend && this.props.suspendableObject && ((0, jsx_runtime_1.jsx)(SuspendToggleButton_1.SuspendToggleButton, { className: "twa:align-self-center", iconSize: 24, onSuspend: this.props.onSuspend, onUnSuspend: this.props.onUnSuspend, suspendableObject: this.props.suspendableObject, disabled: this.props.accessLevel == GeneralConstants_1.ACCESS_LEVEL_READ_ONLY }))] }));
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
exports.EntityListActionButtons = EntityListActionButtons;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { QlPredicate, QlPredicateDef } from '../../../../parser/src/predicate';
|
|
3
|
-
interface ColumnFilterMenuProps {
|
|
4
|
-
columnId: string;
|
|
5
|
-
disabled?: boolean;
|
|
6
|
-
predicate?: QlPredicate;
|
|
7
|
-
predicateDefs: QlPredicateDef[];
|
|
8
|
-
onPredicateChange: (predicate: QlPredicate) => void;
|
|
9
|
-
multiple?: boolean;
|
|
10
|
-
}
|
|
11
|
-
export declare const ColumnFilterMenu: React.FunctionComponent<ColumnFilterMenuProps>;
|
|
12
|
-
export {};
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ColumnFilterMenu = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
-
const React = tslib_1.__importStar(require("react"));
|
|
7
|
-
const Panel_1 = tslib_1.__importDefault(require("../../../../components/Panel"));
|
|
8
|
-
const SimpleButton_1 = tslib_1.__importDefault(require("../../../../components/SimpleButton"));
|
|
9
|
-
const Flex_1 = require("../../../../components/Flex");
|
|
10
|
-
const react_1 = require("react");
|
|
11
|
-
const utils_1 = require("../../../../lib/utils");
|
|
12
|
-
const ColumnFilterMenuItem = ({ active, onClick, icon, label, }) => {
|
|
13
|
-
return ((0, jsx_runtime_1.jsxs)(SimpleButton_1.default, { className: "twa:p-1 twa:w-full", variant: "text", tone: active ? 'info' : 'none', onClick: onClick, "aria-label": label, children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:mr-2", children: icon }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-2", children: label })] }));
|
|
14
|
-
};
|
|
15
|
-
const ColumnFilterMenu = (props) => {
|
|
16
|
-
const [activeIndex, setActiveIndex] = React.useState(() => {
|
|
17
|
-
const index = props.predicateDefs.findIndex((predicateDef) => predicateDef.operator === props.predicate.operator);
|
|
18
|
-
return index === -1 ? 0 : index;
|
|
19
|
-
});
|
|
20
|
-
const activeIndexRef = React.useRef(activeIndex);
|
|
21
|
-
const onPredicateChangeRef = React.useRef(props.onPredicateChange);
|
|
22
|
-
const predicateDefsRef = React.useRef(props.predicateDefs);
|
|
23
|
-
(0, react_1.useLayoutEffect)(() => {
|
|
24
|
-
activeIndexRef.current = activeIndex;
|
|
25
|
-
onPredicateChangeRef.current = props.onPredicateChange;
|
|
26
|
-
predicateDefsRef.current = props.predicateDefs;
|
|
27
|
-
});
|
|
28
|
-
const confirm = React.useCallback((predicateDef) => {
|
|
29
|
-
onPredicateChangeRef.current({ operator: predicateDef.operator, args: [] });
|
|
30
|
-
}, []);
|
|
31
|
-
(0, react_1.useEffect)(() => {
|
|
32
|
-
const onKeyDown = (e) => {
|
|
33
|
-
if (e.key !== 'ArrowDown' && e.key !== 'ArrowUp' && e.key !== 'Enter') {
|
|
34
|
-
return;
|
|
35
|
-
}
|
|
36
|
-
const activeIndex = activeIndexRef.current;
|
|
37
|
-
const predicateDefs = predicateDefsRef.current;
|
|
38
|
-
if (e.key === 'Enter') {
|
|
39
|
-
const predicateDef = predicateDefs[activeIndex];
|
|
40
|
-
if (predicateDef) {
|
|
41
|
-
confirm(predicateDef);
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
e.stopPropagation();
|
|
45
|
-
e.preventDefault();
|
|
46
|
-
const dir = e.key === 'ArrowDown' ? 1 : e.key === 'ArrowUp' ? -1 : 0;
|
|
47
|
-
if (dir) {
|
|
48
|
-
let nextIndex = activeIndex + dir;
|
|
49
|
-
if (nextIndex < 0) {
|
|
50
|
-
nextIndex = predicateDefs.length - 1;
|
|
51
|
-
}
|
|
52
|
-
else if (nextIndex >= predicateDefs.length) {
|
|
53
|
-
nextIndex = 0;
|
|
54
|
-
}
|
|
55
|
-
setActiveIndex(nextIndex);
|
|
56
|
-
}
|
|
57
|
-
};
|
|
58
|
-
document.addEventListener('keydown', onKeyDown);
|
|
59
|
-
return () => {
|
|
60
|
-
document.removeEventListener('keydown', onKeyDown);
|
|
61
|
-
};
|
|
62
|
-
}, [confirm]);
|
|
63
|
-
return ((0, jsx_runtime_1.jsx)(Panel_1.default, { className: "twa:min-w-max", children: props.predicateDefs?.map((predicateDef, index) => {
|
|
64
|
-
const active = activeIndex === index;
|
|
65
|
-
return ((0, jsx_runtime_1.jsx)(Flex_1.Flex, { className: (0, utils_1.cn)('twa:mb-1', active && 'twa:bg-primarylight'), onMouseDownCapture: (e) => {
|
|
66
|
-
e.stopPropagation();
|
|
67
|
-
e.preventDefault();
|
|
68
|
-
}, children: (0, jsx_runtime_1.jsx)(ColumnFilterMenuItem, { onClick: () => confirm(predicateDef), icon: predicateDef.icon, label: predicateDef.label, active: active }) }, index));
|
|
69
|
-
}) }));
|
|
70
|
-
};
|
|
71
|
-
exports.ColumnFilterMenu = ColumnFilterMenu;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.EntityRowItem = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
-
const React = tslib_1.__importStar(require("react"));
|
|
7
|
-
class EntityRowItem extends React.Component {
|
|
8
|
-
render() {
|
|
9
|
-
return (0, jsx_runtime_1.jsxs)("span", { children: [" ", this.props.Content] });
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
exports.EntityRowItem = EntityRowItem;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { AdaptableColumn } from '../../../AdaptableState/Common/AdaptableColumn';
|
|
2
|
-
import { SystemFilterPredicateId } from '../../../types';
|
|
3
|
-
export declare const getDefaultColumnFilterPredicate: (column: AdaptableColumn, defaultColumnFilter: SystemFilterPredicateId | ((column: AdaptableColumn) => SystemFilterPredicateId)) => SystemFilterPredicateId;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getDefaultColumnFilterPredicate = void 0;
|
|
4
|
-
const getDefaultColumnFilterPredicate = (column, defaultColumnFilter) => {
|
|
5
|
-
return typeof defaultColumnFilter === 'function'
|
|
6
|
-
? defaultColumnFilter(column)
|
|
7
|
-
: defaultColumnFilter;
|
|
8
|
-
};
|
|
9
|
-
exports.getDefaultColumnFilterPredicate = getDefaultColumnFilterPredicate;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { ModuleInfo } from '../../Strategy/Interface/IModule';
|
|
3
|
-
export interface ModuleProfileProps extends React.ClassAttributes<ModuleProfile> {
|
|
4
|
-
moduleInfo: ModuleInfo;
|
|
5
|
-
}
|
|
6
|
-
export declare class ModuleProfile extends React.Component<ModuleProfileProps, {}> {
|
|
7
|
-
render(): any;
|
|
8
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ModuleProfile = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
-
const React = tslib_1.__importStar(require("react"));
|
|
7
|
-
const icons_1 = require("../../components/icons");
|
|
8
|
-
class ModuleProfile extends React.Component {
|
|
9
|
-
render() {
|
|
10
|
-
return ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)(icons_1.Icon, { name: this.props.moduleInfo.Glyph, style: {
|
|
11
|
-
fill: 'var(--ab-color-primary-foreground)',
|
|
12
|
-
} }), ' ', this.props.moduleInfo.FriendlyName] }));
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
exports.ModuleProfile = ModuleProfile;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import * as Redux from 'redux';
|
|
3
|
-
import { AdaptableObject } from '../../../AdaptableState/Common/AdaptableObject';
|
|
4
|
-
import { ModuleInfo } from '../../../Strategy/Interface/IModule';
|
|
5
|
-
import { AdaptableSharedEntityConfig } from '../../../AdaptableState/TeamSharingState';
|
|
6
|
-
import { AccessLevel } from '../../../AdaptableState/Common/Entitlement';
|
|
7
|
-
export interface ModuleDetailProps extends React.ClassAttributes<ModuleDetail> {
|
|
8
|
-
key: string;
|
|
9
|
-
item1: any;
|
|
10
|
-
item2: any;
|
|
11
|
-
configEnity: AdaptableObject;
|
|
12
|
-
moduleInfo: ModuleInfo;
|
|
13
|
-
accessLevel: AccessLevel;
|
|
14
|
-
onEdit: () => void;
|
|
15
|
-
onShare: (config: AdaptableSharedEntityConfig) => void;
|
|
16
|
-
onDelete: Redux.Action;
|
|
17
|
-
showBold?: boolean;
|
|
18
|
-
showEdit?: boolean;
|
|
19
|
-
showShare?: boolean;
|
|
20
|
-
}
|
|
21
|
-
export declare class ModuleDetail extends React.Component<ModuleDetailProps, {}> {
|
|
22
|
-
render(): any;
|
|
23
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ModuleDetail = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
-
const React = tslib_1.__importStar(require("react"));
|
|
7
|
-
const EntityListActionButtons_1 = require("../Buttons/EntityListActionButtons");
|
|
8
|
-
const SummaryRowItem_1 = require("./SummaryRowItem");
|
|
9
|
-
class ModuleDetail extends React.Component {
|
|
10
|
-
render() {
|
|
11
|
-
let summaryItems = [];
|
|
12
|
-
this.props.showBold
|
|
13
|
-
? summaryItems.push((0, jsx_runtime_1.jsx)("b", { children: this.props.item1 }))
|
|
14
|
-
: summaryItems.push((0, jsx_runtime_1.jsx)("i", { children: this.props.item1 }));
|
|
15
|
-
summaryItems.push((0, jsx_runtime_1.jsx)("i", { children: this.props.item2 }));
|
|
16
|
-
summaryItems.push((0, jsx_runtime_1.jsx)(EntityListActionButtons_1.EntityListActionButtons, { justifyContent: "start", confirmDeleteAction: this.props.onDelete, showEdit: this.props.showEdit, editClick: () => this.props.onEdit(), shareClick: (config) => this.props.onShare(config), showShare: this.props.showShare, entityType: this.props.moduleInfo.FriendlyName, accessLevel: this.props.accessLevel }));
|
|
17
|
-
return (0, jsx_runtime_1.jsx)(SummaryRowItem_1.SummaryRowItem, { SummaryItems: summaryItems });
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
exports.ModuleDetail = ModuleDetail;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { ModuleInfo } from '../../../Strategy/Interface/IModule';
|
|
3
|
-
import { AccessLevel } from '../../../AdaptableState/Common/Entitlement';
|
|
4
|
-
export interface ModuleHeaderProps extends React.ClassAttributes<ModuleHeader> {
|
|
5
|
-
key: string;
|
|
6
|
-
moduleInfo: ModuleInfo;
|
|
7
|
-
moduleSummary: any;
|
|
8
|
-
onNew: () => void;
|
|
9
|
-
newButtonTooltip: string;
|
|
10
|
-
newButtonDisabled?: boolean;
|
|
11
|
-
accessLevel: AccessLevel;
|
|
12
|
-
}
|
|
13
|
-
export declare class ModuleHeader extends React.Component<ModuleHeaderProps, {}> {
|
|
14
|
-
render(): any;
|
|
15
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ModuleHeader = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
-
const React = tslib_1.__importStar(require("react"));
|
|
7
|
-
const ButtonNew_1 = require("../Buttons/ButtonNew");
|
|
8
|
-
const SummaryRowItem_1 = require("./SummaryRowItem");
|
|
9
|
-
const ModuleProfile_1 = require("../ModuleProfile");
|
|
10
|
-
class ModuleHeader extends React.Component {
|
|
11
|
-
render() {
|
|
12
|
-
let summaryItems = [];
|
|
13
|
-
let newButton = this.props.newButtonDisabled ? null : ((0, jsx_runtime_1.jsx)(ButtonNew_1.ButtonNew, { onClick: () => this.props.onNew(), tooltip: 'Create ' + this.props.newButtonTooltip, accessLevel: this.props.accessLevel }));
|
|
14
|
-
summaryItems.push((0, jsx_runtime_1.jsx)("b", { children: (0, jsx_runtime_1.jsx)(ModuleProfile_1.ModuleProfile, { moduleInfo: this.props.moduleInfo }) }));
|
|
15
|
-
summaryItems.push(this.props.moduleSummary);
|
|
16
|
-
summaryItems.push(newButton);
|
|
17
|
-
return (0, jsx_runtime_1.jsx)(SummaryRowItem_1.SummaryRowItem, { SummaryItems: summaryItems });
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
exports.ModuleHeader = ModuleHeader;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SummaryRowItem = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
-
const React = tslib_1.__importStar(require("react"));
|
|
7
|
-
const AdaptableObjectRow_1 = require("../AdaptableObjectRow");
|
|
8
|
-
class SummaryRowItem extends React.Component {
|
|
9
|
-
render() {
|
|
10
|
-
let colItems = [];
|
|
11
|
-
colItems.push({ Size: 3, Content: this.props.SummaryItems[0] });
|
|
12
|
-
colItems.push({ Size: 7, Content: this.props.SummaryItems[1] });
|
|
13
|
-
colItems.push({ Size: 2, Content: this.props.SummaryItems[2] });
|
|
14
|
-
return (0, jsx_runtime_1.jsx)(AdaptableObjectRow_1.AdaptableObjectRow, { colItems: colItems });
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
exports.SummaryRowItem = SummaryRowItem;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { AdaptableColumn } from '../../../AdaptableState/Common/AdaptableColumn';
|
|
2
|
-
import { ModuleViewPopupProps } from './ModuleViewPopupProps';
|
|
3
|
-
import * as TeamSharingRedux from '../../../Redux/ActionsReducers/TeamSharingRedux';
|
|
4
|
-
import { AdaptableObject } from '../../../AdaptableState/Common/AdaptableObject';
|
|
5
|
-
import { AdaptableSharedEntityConfig } from '../../../AdaptableState/TeamSharingState';
|
|
6
|
-
export interface ModuleSummaryProps<View> extends ModuleViewPopupProps<View> {
|
|
7
|
-
summarisedColumn: AdaptableColumn;
|
|
8
|
-
onShare: (entity: AdaptableObject, config: AdaptableSharedEntityConfig) => TeamSharingRedux.TeamSharingShareAction;
|
|
9
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { ModuleViewPopupProps } from './ModuleViewPopupProps';
|
|
2
|
-
import * as Redux from 'redux';
|
|
3
|
-
import * as PopupRedux from '../../../Redux/ActionsReducers/PopupRedux';
|
|
4
|
-
import * as ToolPanelRedux from '../../../Redux/ActionsReducers/ToolPanelRedux';
|
|
5
|
-
import { AdaptableToolPanel } from '../../../AdaptableState/Common/Types';
|
|
6
|
-
import { ToolPanelVisibilityMode } from '../../../AdaptableState/ToolPanelState';
|
|
7
|
-
export interface ToolPanelModuleViewPopupProps<View> extends ModuleViewPopupProps<View> {
|
|
8
|
-
onClick: (action: Redux.Action) => Redux.Action;
|
|
9
|
-
onClose: (toolPanel: AdaptableToolPanel) => ToolPanelRedux.ToolPanelHideToolPanelAction;
|
|
10
|
-
onConfigure: (popup: string) => PopupRedux.PopupShowScreenAction;
|
|
11
|
-
visibilityMode: ToolPanelVisibilityMode;
|
|
12
|
-
onVisibilityModeChange: (visibilityMode: ToolPanelVisibilityMode) => void;
|
|
13
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { ModuleViewPopupProps } from './ModuleViewPopupProps';
|
|
2
|
-
import * as Redux from 'redux';
|
|
3
|
-
import * as PopupRedux from '../../../Redux/ActionsReducers/PopupRedux';
|
|
4
|
-
import * as DashboardRedux from '../../../Redux/ActionsReducers/DashboardRedux';
|
|
5
|
-
import { AdaptableDashboardToolbar } from '../../../AdaptableState/Common/Types';
|
|
6
|
-
import { CustomToolbar } from '../../../AdaptableOptions/DashboardOptions';
|
|
7
|
-
export interface CustomToolbarModuleViewPopupProps<View> extends ModuleViewPopupProps<View> {
|
|
8
|
-
customToolbar: CustomToolbar;
|
|
9
|
-
}
|
|
10
|
-
export interface ToolbarModuleViewPopupProps<View> extends ModuleViewPopupProps<View> {
|
|
11
|
-
onClick: (action: Redux.Action) => Redux.Action;
|
|
12
|
-
onConfigure: (popup: string) => PopupRedux.PopupShowScreenAction;
|
|
13
|
-
onClose: (toolBar: AdaptableDashboardToolbar) => DashboardRedux.DashboardCloseToolbarAction;
|
|
14
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { AdaptableStyle } from '../../AdaptableState/Common/AdaptableStyle';
|
|
3
|
-
export interface StyleVisualItemProps extends React.ClassAttributes<StyleVisualItem> {
|
|
4
|
-
Style: AdaptableStyle;
|
|
5
|
-
Text?: string;
|
|
6
|
-
}
|
|
7
|
-
export declare class StyleVisualItem extends React.Component<StyleVisualItemProps, {}> {
|
|
8
|
-
render(): any;
|
|
9
|
-
}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.StyleVisualItem = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
-
const React = tslib_1.__importStar(require("react"));
|
|
7
|
-
const EnumExtensions_1 = require("../../Utilities/Extensions/EnumExtensions");
|
|
8
|
-
const Enums_1 = require("../../AdaptableState/Common/Enums");
|
|
9
|
-
const StringExtensions_1 = tslib_1.__importDefault(require("../../Utilities/Extensions/StringExtensions"));
|
|
10
|
-
class StyleVisualItem extends React.Component {
|
|
11
|
-
render() {
|
|
12
|
-
if (!this.props.Style) {
|
|
13
|
-
return null;
|
|
14
|
-
}
|
|
15
|
-
let styleText = StringExtensions_1.default.IsNotNullOrEmpty(this.props.Text)
|
|
16
|
-
? this.props.Text
|
|
17
|
-
: 'Style';
|
|
18
|
-
let styleVisualisation;
|
|
19
|
-
if (this.props.Style.ClassName) {
|
|
20
|
-
styleVisualisation = (0, jsx_runtime_1.jsx)("div", { children: 'CSS Class: ' + this.props.Style.ClassName });
|
|
21
|
-
}
|
|
22
|
-
else {
|
|
23
|
-
let backColorForStyle = this.props.Style.BackColor != undefined ? this.props.Style.BackColor : null;
|
|
24
|
-
let foreColorForStyle = this.props.Style.ForeColor != undefined ? this.props.Style.ForeColor : 'black';
|
|
25
|
-
let borderColorForStyle = this.props.Style.BorderColor != undefined ? this.props.Style.BorderColor : null;
|
|
26
|
-
let fontWeightForStyle = this.props.Style.FontWeight == Enums_1.FontWeight.Bold ? 'bold' : 'normal';
|
|
27
|
-
let fontStyleForStyle = this.props.Style.FontStyle == Enums_1.FontStyle.Italic ? 'italic' : 'normal';
|
|
28
|
-
let fontSizeForStyle = EnumExtensions_1.EnumExtensions.getCssFontSizeFromFontSizeEnum(this.props.Style.FontSize);
|
|
29
|
-
styleVisualisation = ((0, jsx_runtime_1.jsx)("div", { className: this.props.Style.BackColor != undefined ? '' : 'ab_white_grey_stripes', style: {
|
|
30
|
-
textAlign: 'center',
|
|
31
|
-
margin: '2px',
|
|
32
|
-
padding: '3px',
|
|
33
|
-
background: backColorForStyle,
|
|
34
|
-
color: foreColorForStyle,
|
|
35
|
-
borderColor: borderColorForStyle,
|
|
36
|
-
borderStyle: borderColorForStyle ? 'solid' : 'none',
|
|
37
|
-
fontWeight: fontWeightForStyle,
|
|
38
|
-
fontStyle: fontStyleForStyle,
|
|
39
|
-
fontSize: fontSizeForStyle,
|
|
40
|
-
}, children: styleText }));
|
|
41
|
-
}
|
|
42
|
-
return styleVisualisation;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
exports.StyleVisualItem = StyleVisualItem;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { KeyValuePair } from '../../Utilities/Interface/KeyValuePair';
|
|
3
|
-
export interface WizardSummaryPageProps {
|
|
4
|
-
KeyValuePairs: KeyValuePair[];
|
|
5
|
-
header?: string;
|
|
6
|
-
}
|
|
7
|
-
export declare const WizardSummaryPage: (props: WizardSummaryPageProps) => React.JSX.Element;
|