@adaptabletools/adaptable 10.0.2 → 10.0.4-canary.2
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/LICENSE.md +1 -1
- package/README.md +1 -1
- package/base.css +84 -32
- package/bundle.cjs.js +350 -0
- package/index.css +100 -34
- package/package.json +1 -5
- package/publishTimestamp.d.ts +1 -1
- package/publishTimestamp.js +1 -1
- package/src/AdaptableInterfaces/AdaptableNoCodeWizard.d.ts +1 -1
- package/src/AdaptableInterfaces/IAdaptable.d.ts +24 -12
- package/src/AdaptableOptions/AdaptableOptions.d.ts +3 -3
- package/src/AdaptableOptions/ContainerOptions.d.ts +4 -5
- package/src/AdaptableOptions/DataChangeHistoryOptions.d.ts +1 -1
- package/src/AdaptableOptions/DateInputOptions.d.ts +5 -1
- package/src/AdaptableOptions/EditOptions.d.ts +2 -3
- package/src/AdaptableOptions/FilterOptions.d.ts +22 -15
- package/src/AdaptableOptions/GeneralOptions.d.ts +3 -2
- package/src/AdaptableOptions/LayoutOptions.d.ts +1 -1
- package/src/AdaptableOptions/MenuOptions.d.ts +11 -11
- package/src/AdaptableOptions/NotificationsOptions.d.ts +11 -1
- package/src/AdaptableOptions/ToolPanelOptions.d.ts +2 -2
- package/src/AdaptableOptions/UserInterfaceOptions.d.ts +108 -6
- package/src/Api/AdaptableApi.d.ts +12 -12
- package/src/Api/AlertApi.d.ts +1 -1
- package/src/Api/CalculatedColumnApi.d.ts +15 -0
- package/src/Api/ColumnApi.d.ts +49 -5
- package/src/Api/ConfigApi.d.ts +8 -0
- package/src/Api/EventApi.d.ts +1 -1
- package/src/Api/Events/AdaptableReady.d.ts +5 -8
- package/src/Api/Events/AdaptableStateChanged.d.ts +2 -1
- package/src/Api/Events/AlertFired.d.ts +2 -1
- package/src/Api/Events/BaseEventInfo.d.ts +10 -0
- package/src/{Utilities/Interface/ProgressIndicator.js → Api/Events/BaseEventInfo.js} +0 -0
- package/src/Api/Events/CellChanged.d.ts +2 -1
- package/src/Api/Events/ChexboxColumnClicked.d.ts +2 -1
- package/src/Api/Events/CustomToolbarConfigured.d.ts +2 -1
- package/src/Api/Events/DashboardChanged.d.ts +2 -1
- package/src/Api/Events/FlashingAlertFired.d.ts +2 -1
- package/src/Api/Events/GridDataChanged.d.ts +2 -1
- package/src/Api/Events/LayoutChanged.d.ts +2 -1
- package/src/Api/Events/LiveDataChanged.d.ts +2 -1
- package/src/Api/Events/SearchChanged.d.ts +2 -1
- package/src/Api/Events/SelectionChanged.d.ts +2 -1
- package/src/Api/Events/SystemStatusMessageDisplayed.d.ts +2 -1
- package/src/Api/Events/TeamSharingEntityChanged.d.ts +2 -1
- package/src/Api/Events/ThemeChanged.d.ts +2 -1
- package/src/Api/GridApi.d.ts +44 -18
- package/src/Api/Implementation/AlertApiImpl.d.ts +1 -1
- package/src/Api/Implementation/AlertApiImpl.js +22 -15
- package/src/Api/Implementation/CalculatedColumnApiImpl.d.ts +3 -0
- package/src/Api/Implementation/CalculatedColumnApiImpl.js +23 -0
- package/src/Api/Implementation/ColumnApiImpl.d.ts +12 -3
- package/src/Api/Implementation/ColumnApiImpl.js +79 -44
- package/src/Api/Implementation/ConfigApiImpl.d.ts +1 -1
- package/src/Api/Implementation/ConfigApiImpl.js +28 -41
- package/src/Api/Implementation/DashboardApiImpl.js +2 -1
- package/src/Api/Implementation/ExportApiImpl.js +4 -4
- package/src/Api/Implementation/FormatColumnApiImpl.js +2 -1
- package/src/Api/Implementation/FreeTextColumnApiImpl.js +9 -3
- package/src/Api/Implementation/GridApiImpl.d.ts +11 -2
- package/src/Api/Implementation/GridApiImpl.js +30 -13
- package/src/Api/Implementation/InternalApiImpl.d.ts +4 -2
- package/src/Api/Implementation/InternalApiImpl.js +21 -5
- package/src/Api/Implementation/LayoutApiImpl.d.ts +2 -0
- package/src/Api/Implementation/LayoutApiImpl.js +19 -3
- package/src/Api/Implementation/PluginsApiImpl.d.ts +2 -2
- package/src/Api/Implementation/PluginsApiImpl.js +1 -1
- package/src/Api/Implementation/ScheduleApiImpl.js +6 -6
- package/src/Api/Implementation/ScopeApiImpl.js +11 -11
- package/src/Api/Implementation/SystemStatusApiImpl.js +1 -0
- package/src/Api/Implementation/TeamSharingApiImpl.js +1 -0
- package/src/Api/Implementation/ThemeApiImpl.js +1 -0
- package/src/Api/Implementation/ToolPanelApiImpl.js +1 -1
- package/src/Api/Implementation/UserInterfaceApiImpl.d.ts +15 -11
- package/src/Api/Implementation/UserInterfaceApiImpl.js +73 -91
- package/src/Api/InternalApi.d.ts +4 -2
- package/src/Api/LayoutApi.d.ts +7 -0
- package/src/Api/PluginsApi.d.ts +1 -7
- package/src/Api/TeamSharingApi.d.ts +1 -1
- package/src/Api/ThemeApi.d.ts +2 -2
- package/src/Api/UserInterfaceApi.d.ts +19 -9
- package/src/PredefinedConfig/AdaptableState.d.ts +2 -10
- package/src/PredefinedConfig/AlertState.d.ts +5 -1
- package/src/PredefinedConfig/ApplicationState.d.ts +1 -1
- package/src/PredefinedConfig/CalculatedColumnState.d.ts +5 -38
- package/src/PredefinedConfig/Common/AdaptableButton.d.ts +1 -1
- package/src/PredefinedConfig/Common/AdaptableColumn.d.ts +36 -36
- package/src/PredefinedConfig/Common/AdaptableColumn.js +5 -5
- package/src/PredefinedConfig/Common/AdaptablePredicate.d.ts +4 -4
- package/src/PredefinedConfig/Common/AdaptablePredicate.js +19 -18
- package/src/PredefinedConfig/Common/AdaptableStyle.d.ts +7 -7
- package/src/PredefinedConfig/Common/DataChangedInfo.d.ts +4 -3
- package/src/PredefinedConfig/Common/DataUpdateConfig.d.ts +5 -1
- package/src/PredefinedConfig/Common/Menu.d.ts +40 -17
- package/src/PredefinedConfig/Common/SpecialColumnSettings.d.ts +49 -0
- package/src/PredefinedConfig/Common/SpecialColumnSettings.js +2 -0
- package/src/PredefinedConfig/Common/Types.d.ts +5 -5
- package/src/PredefinedConfig/Common/Types.js +9 -7
- package/src/PredefinedConfig/ConditionalStyleState.d.ts +1 -1
- package/src/PredefinedConfig/CustomSortState.d.ts +1 -1
- package/src/PredefinedConfig/DataSourceState.d.ts +1 -1
- package/src/PredefinedConfig/ExportState.d.ts +3 -3
- package/src/PredefinedConfig/FilterState.d.ts +3 -3
- package/src/PredefinedConfig/FormatColumnState.d.ts +1 -1
- package/src/PredefinedConfig/FreeTextColumnState.d.ts +11 -1
- package/src/PredefinedConfig/LayoutState.d.ts +1 -1
- package/src/PredefinedConfig/PredefinedConfig.d.ts +0 -40
- package/src/PredefinedConfig/QuickSearchState.d.ts +3 -3
- package/src/PredefinedConfig/ScheduleState.d.ts +1 -1
- package/src/PredefinedConfig/Selection/GridCell.d.ts +2 -1
- package/src/PredefinedConfig/Selection/GridRow.d.ts +12 -4
- package/src/PredefinedConfig/SystemState.d.ts +4 -1
- package/src/PredefinedConfig/ThemeState.d.ts +5 -1
- package/src/Redux/ActionsReducers/DashboardRedux.js +2 -1
- package/src/Redux/ActionsReducers/GridRedux.d.ts +3 -2
- package/src/Redux/ActionsReducers/GridRedux.js +2 -2
- package/src/Redux/ActionsReducers/LayoutRedux.d.ts +12 -2
- package/src/Redux/ActionsReducers/LayoutRedux.js +24 -1
- package/src/Redux/ActionsReducers/SystemRedux.js +1 -1
- package/src/Redux/DeadRedux.d.ts +4 -8
- package/src/Redux/Store/AdaptableReduxLocalStorageEngine.js +6 -1
- package/src/Redux/Store/AdaptableStore.d.ts +3 -3
- package/src/Redux/Store/AdaptableStore.js +25 -16
- package/src/Strategy/AdaptableModuleBase.d.ts +2 -2
- package/src/Strategy/AdaptableModuleBase.js +8 -8
- package/src/Strategy/AlertModule.d.ts +2 -2
- package/src/Strategy/AlertModule.js +13 -105
- package/src/Strategy/BulkUpdateModule.d.ts +2 -2
- package/src/Strategy/BulkUpdateModule.js +7 -7
- package/src/Strategy/CalculatedColumnModule.js +1 -1
- package/src/Strategy/CellSummaryModule.d.ts +2 -2
- package/src/Strategy/CellSummaryModule.js +3 -3
- package/src/Strategy/ConditionalStyleModule.js +3 -3
- package/src/Strategy/CustomSortModule.js +2 -2
- package/src/Strategy/DashboardModule.d.ts +2 -2
- package/src/Strategy/DataChangeHistoryModule.js +2 -2
- package/src/Strategy/ExportModule.d.ts +2 -4
- package/src/Strategy/ExportModule.js +59 -62
- package/src/Strategy/FilterModule.d.ts +2 -2
- package/src/Strategy/FilterModule.js +4 -4
- package/src/Strategy/FormatColumnModule.js +6 -6
- package/src/Strategy/FreeTextColumnModule.js +1 -1
- package/src/Strategy/GridInfoModule.d.ts +2 -2
- package/src/Strategy/Interface/IModule.d.ts +2 -2
- package/src/Strategy/LayoutModule.d.ts +2 -2
- package/src/Strategy/LayoutModule.js +22 -9
- package/src/Strategy/PlusMinusModule.js +8 -9
- package/src/Strategy/SmartEditModule.d.ts +2 -2
- package/src/Strategy/SmartEditModule.js +8 -9
- package/src/Strategy/SystemStatusModule.d.ts +2 -2
- package/src/Utilities/Constants/GeneralConstants.d.ts +1 -0
- package/src/Utilities/Constants/GeneralConstants.js +2 -1
- package/src/Utilities/Constants/ModuleConstants.d.ts +6 -6
- package/src/Utilities/Constants/ModuleConstants.js +7 -7
- package/src/Utilities/Defaults/DefaultAdaptableOptions.js +9 -7
- package/src/Utilities/ExpressionFunctions/booleanExpressionFunctions.js +1 -1
- package/src/Utilities/ExpressionFunctions/expressionFunctionUtils.js +2 -2
- package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.js +3 -2
- package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +1 -1
- package/src/Utilities/Helpers/DateHelper.d.ts +2 -2
- package/src/Utilities/Helpers/DateHelper.js +30 -20
- package/src/Utilities/Helpers/PreviewHelper.js +2 -2
- package/src/Utilities/Interface/Preview.d.ts +2 -1
- package/src/Utilities/ObjectFactory.d.ts +1 -1
- package/src/Utilities/ObjectFactory.js +14 -2
- package/src/Utilities/Services/DataService.js +5 -5
- package/src/Utilities/Services/LicenseService.js +16 -2
- package/src/Utilities/Services/ReportService.js +13 -12
- package/src/Utilities/Services/ValidationService.js +4 -5
- package/src/Utilities/runIfNotResolvedIn.d.ts +8 -0
- package/src/Utilities/runIfNotResolvedIn.js +23 -0
- package/src/View/AdaptableView.js +1 -1
- package/src/View/AdaptableViewFactory.d.ts +2 -1
- package/src/View/AdaptableViewFactory.js +2 -0
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationForm.js +7 -7
- package/src/View/Alert/AlertPopup.js +1 -1
- package/src/View/Alert/Wizard/AlertDisplayWizardSection.js +19 -5
- package/src/View/Alert/Wizard/BaseAlertScopeWizardSection.js +1 -1
- package/src/View/BulkUpdate/BulkUpdatePopup.d.ts +2 -0
- package/src/View/BulkUpdate/BulkUpdatePopup.js +6 -4
- package/src/View/BulkUpdate/BulkUpdateViewPanel.d.ts +2 -0
- package/src/View/BulkUpdate/BulkUpdateViewPanel.js +3 -1
- package/src/View/CalculatedColumn/CalculatedColumnPopup.js +1 -1
- package/src/View/CalculatedColumn/CalculatedColumnSummary.js +1 -1
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.js +1 -1
- package/src/View/CellSummary/CellSummaryViewPanel.js +2 -2
- package/src/View/Components/ColumnSelector/index.js +2 -2
- package/src/View/Components/FilterForm/FilterForm.d.ts +3 -51
- package/src/View/Components/FilterForm/FilterForm.js +57 -38
- package/src/View/Components/FilterForm/ListBoxFilterForm.d.ts +4 -1
- package/src/View/Components/FilterForm/ListBoxFilterForm.js +18 -9
- package/src/View/Components/FilterForm/QuickFilterForm.d.ts +3 -43
- package/src/View/Components/FilterForm/QuickFilterForm.js +74 -35
- package/src/View/Components/FilterForm/getDefaultColumnFilterPredicate.d.ts +3 -0
- package/src/View/Components/FilterForm/getDefaultColumnFilterPredicate.js +8 -0
- package/src/View/Components/NewScopeComponent.js +1 -1
- package/src/View/Components/Panels/FilterFormPanel.d.ts +1 -1
- package/src/View/Components/Panels/PanelWithImage.d.ts +423 -1
- package/src/View/Components/Popups/AdaptablePopup.d.ts +1 -1
- package/src/View/Components/Popups/AdaptablePopupAlert.js +23 -10
- package/src/View/Components/PreviewResultsPanel.js +1 -1
- package/src/View/Components/RangesComponent.js +2 -2
- package/src/View/Components/Selectors/ColumnSelector.js +5 -5
- package/src/View/Components/Selectors/ColumnValueSelector.d.ts +10 -2
- package/src/View/Components/Selectors/ColumnValueSelector.js +47 -15
- package/src/View/Components/ToolPanel/AdaptableToolPanel.js +10 -11
- package/src/View/Components/ToolPanel/CustomToolPanelContent.js +1 -1
- package/src/View/Components/ToolPanel/ToolPanelPopup.js +2 -3
- package/src/View/ConditionalStyle/ConditionalStylePopup.js +1 -1
- package/src/View/ConditionalStyle/ConditionalStyleSummary.js +1 -1
- package/src/View/CustomSort/CustomSortEntityRow.d.ts +3 -1
- package/src/View/CustomSort/CustomSortEntityRow.js +3 -3
- package/src/View/CustomSort/CustomSortPopup.js +2 -2
- package/src/View/CustomSort/CustomSortSummary.js +3 -3
- package/src/View/CustomSort/Wizard/CustomSortColumnWizardSection.js +4 -4
- package/src/View/CustomSort/Wizard/CustomSortValuesWizardSection.js +24 -6
- package/src/View/Dashboard/CustomToolbarWrapper.js +2 -1
- package/src/View/Dashboard/Dashboard.js +2 -3
- package/src/View/DataChangeHistory/DataChangeHistoryGrid.d.ts +1 -1
- package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +11 -10
- package/src/View/DataChangeHistory/DataChangeHistoryPopup.js +6 -6
- package/src/View/Export/ExportCustomDestinationDialog.js +1 -1
- package/src/View/Export/ExportViewPanel.js +6 -6
- package/src/View/Filter/FilterSummary.js +2 -2
- package/src/View/FormatColumn/FormatColumnPopup.js +1 -1
- package/src/View/FormatColumn/FormatColumnSummary.js +1 -1
- package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +1 -1
- package/src/View/FreeTextColumn/FreeTextColumnPopup.js +4 -2
- package/src/View/FreeTextColumn/FreeTextColumnSummary.js +5 -3
- package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.js +1 -1
- package/src/View/GridInfo/ColumnInfoComponent.js +16 -16
- package/src/View/GridInfo/GridInfoPopup.js +4 -1
- package/src/View/GridInfo/GridOptionsComponent.js +1 -1
- package/src/View/Layout/LayoutViewPanel.js +2 -2
- package/src/View/Layout/Wizard/LayoutEditor/ColumnList.js +6 -6
- package/src/View/Layout/Wizard/LayoutEditor/ColumnSortList.js +1 -1
- package/src/View/Layout/Wizard/LayoutEditor/PivotList.js +1 -1
- package/src/View/Layout/Wizard/LayoutEditor/RowGroupsList.js +1 -1
- package/src/View/Layout/Wizard/LayoutEditor/getItemStyle.js +2 -2
- package/src/View/Layout/Wizard/LayoutEditor/index.js +41 -41
- package/src/View/PlusMinus/PlusMinusPopup.js +1 -1
- package/src/View/PlusMinus/PlusMinusSummary.js +1 -1
- package/src/View/Query/QueryViewPanel.js +3 -3
- package/src/View/QuickSearch/useQuickSearchDebounced.js +2 -3
- package/src/View/Schedule/SchedulePopup.js +3 -3
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsWizard.js +1 -1
- package/src/View/SmartEdit/SmartEditPopup.js +1 -1
- package/src/View/StateManagement/StateManagementPopup.d.ts +2 -12
- package/src/View/StateManagement/StateManagementPopup.js +21 -114
- package/src/View/StateManagement/StateManagementViewPanel.d.ts +5 -0
- package/src/View/StateManagement/StateManagementViewPanel.js +22 -0
- package/src/View/StateManagement/components/ClearButton.d.ts +6 -0
- package/src/View/StateManagement/components/ClearButton.js +9 -0
- package/src/View/StateManagement/components/ExportDropdown.d.ts +8 -0
- package/src/View/StateManagement/components/ExportDropdown.js +43 -0
- package/src/View/StateManagement/components/LoadButton.d.ts +7 -0
- package/src/View/StateManagement/components/LoadButton.js +38 -0
- package/src/View/StateManagement/handleExportState.d.ts +1 -0
- package/src/View/StateManagement/handleExportState.js +22 -0
- package/src/View/Theme/ThemeViewPanel.js +1 -1
- package/src/View/UIHelper.d.ts +2 -0
- package/src/View/UIHelper.js +10 -1
- package/src/agGrid/ActionColumnRenderer.d.ts +2 -1
- package/src/agGrid/ActionColumnRenderer.js +21 -4
- package/src/agGrid/Adaptable.d.ts +28 -11
- package/src/agGrid/Adaptable.js +326 -168
- package/src/agGrid/agGridHelper.d.ts +4 -4
- package/src/agGrid/agGridHelper.js +46 -46
- package/src/agGrid/agGridMenuHelper.d.ts +15 -13
- package/src/agGrid/agGridMenuHelper.js +55 -47
- package/src/agGrid/editors/AdaptableDateEditor/InternalAdaptableDateEditor.d.ts +1 -1
- package/src/agGrid/editors/AdaptableDateEditor/InternalAdaptableDateEditor.js +11 -6
- package/src/agGrid/editors/AdaptableDateEditor/index.d.ts +3 -2
- package/src/agGrid/editors/AdaptableDateEditor/index.js +16 -6
- package/src/agGrid/editors/AdaptableNumberEditor/index.d.ts +1 -0
- package/src/agGrid/editors/AdaptableNumberEditor/index.js +7 -2
- package/src/components/AdaptableFormComponent/AdaptableFormComponent.js +3 -3
- package/src/components/Dashboard/Dashboard.js +1 -1
- package/src/components/Datepicker/DatepickerContext.d.ts +2 -2
- package/src/components/Datepicker/index.js +9 -5
- package/src/components/DropdownButton/index.js +1 -1
- package/src/components/ExpressionEditor/index.js +7 -7
- package/src/components/Loader/Loader.d.ts +7 -0
- package/src/components/Loader/Loader.js +13 -0
- package/src/components/Loader/index.d.ts +2 -0
- package/src/components/Loader/index.js +7 -0
- package/src/components/Modal/index.d.ts +1 -1
- package/src/components/OverlayTrigger/index.js +3 -3
- package/src/components/OverlayTrigger/useAgGridClassName.d.ts +2 -0
- package/src/components/OverlayTrigger/{useVendorClassName.js → useAgGridClassName.js} +3 -3
- package/src/components/ProgressIndicator/ProgressIndicator.d.ts +2 -0
- package/src/components/ProgressIndicator/ProgressIndicator.js +54 -0
- package/src/components/icons/index.js +2 -0
- package/src/components/icons/upload.d.ts +3 -0
- package/src/components/icons/upload.js +8 -0
- package/src/metamodel/adaptable.metamodel.d.ts +176 -52
- package/src/metamodel/adaptable.metamodel.js +659 -366
- package/src/types.d.ts +5 -4
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/src/PredefinedConfig/DeprecatedState.d.ts +0 -82
- package/src/PredefinedConfig/DeprecatedState.js +0 -5
- package/src/Utilities/Interface/ProgressIndicator.d.ts +0 -4
- package/src/View/Export/ProgressIndicator.d.ts +0 -6
- package/src/View/Export/ProgressIndicator.js +0 -25
- package/src/components/OverlayTrigger/useVendorClassName.d.ts +0 -2
|
@@ -73,8 +73,8 @@ class QueryViewPanelComponent extends React.Component {
|
|
|
73
73
|
];
|
|
74
74
|
let availableColumns = this.props.api.columnApi.getColumns().map((col) => {
|
|
75
75
|
return {
|
|
76
|
-
label: col.
|
|
77
|
-
onClick: () => this.setState({ expression: this.state.expression + `[${col.
|
|
76
|
+
label: col.friendlyName,
|
|
77
|
+
onClick: () => this.setState({ expression: this.state.expression + `[${col.columnId}]` }),
|
|
78
78
|
};
|
|
79
79
|
});
|
|
80
80
|
const elementType = this.props.viewType === 'Toolbar' ? 'DashboardToolbar' : 'ToolPanel';
|
|
@@ -88,7 +88,7 @@ class QueryViewPanelComponent extends React.Component {
|
|
|
88
88
|
} }),
|
|
89
89
|
isExpressionValid ? (React.createElement(ButtonPlay_1.ButtonPlay, { onClick: () => this.runQuery(), tooltip: '', accessLevel: 'Full', variant: "text", tone: "neutral", disabled: this.state.expression == '' || this.state.expression == this.props.CurrentQuery, marginRight: 1 })) : (React.createElement(ButtonInvalid_1.ButtonInvalid, { variant: "text", tone: "neutral", tooltip: "Invalid Query", marginRight: 1 })),
|
|
90
90
|
' ',
|
|
91
|
-
this.props.CurrentQuery !== '' && (React.createElement(ButtonClear_1.ButtonClear, { onClick: () => this.props.onRunQuery(''), tooltip: "Clear Query", accessLevel: 'Full' })))) : (React.createElement(Input_1.default, { type: "text", placeholder: "Query", spellCheck: false, value: this.state.expression, onChange: (x) => this.setState({ expression: x.target.value }), style: { width: '100%'
|
|
91
|
+
this.props.CurrentQuery !== '' && (React.createElement(ButtonClear_1.ButtonClear, { onClick: () => this.props.onRunQuery(''), tooltip: "Clear Query", accessLevel: 'Full' })))) : (React.createElement(Input_1.default, { type: "text", placeholder: "Query", spellCheck: false, value: this.state.expression, onChange: (x) => this.setState({ expression: x.target.value }), style: { width: '100%' } }));
|
|
92
92
|
};
|
|
93
93
|
const queryModuleAccessLevel = this.props.api.internalApi
|
|
94
94
|
.getEntitlementService()
|
|
@@ -4,12 +4,11 @@ exports.useQuickSearchDebounced = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const debounce_1 = tslib_1.__importDefault(require("lodash-es/debounce"));
|
|
7
|
+
const GeneralConstants_1 = require("../../Utilities/Constants/GeneralConstants");
|
|
7
8
|
exports.useQuickSearchDebounced = (props) => {
|
|
8
9
|
var _a;
|
|
9
10
|
const [searchText, setSearchText] = react_1.useState((_a = props.QuickSearchText) !== null && _a !== void 0 ? _a : '');
|
|
10
|
-
const debouncedRunQuickSearch = react_1.useMemo(() => debounce_1.default(props.onRunQuickSearch,
|
|
11
|
-
props.onRunQuickSearch,
|
|
12
|
-
]);
|
|
11
|
+
const debouncedRunQuickSearch = react_1.useMemo(() => debounce_1.default(props.onRunQuickSearch, GeneralConstants_1.QUICK_SEARCH_DEBOUNCE_TIME), [props.onRunQuickSearch]);
|
|
13
12
|
react_1.useEffect(() => {
|
|
14
13
|
setSearchText(props.QuickSearchText);
|
|
15
14
|
}, [props.QuickSearchText]);
|
|
@@ -156,15 +156,15 @@ class SchedulePopupComponent extends React.Component {
|
|
|
156
156
|
if (exportModuleAccessLevel !== 'Hidden') {
|
|
157
157
|
allSchedules.push(...this.props.ReportSchedules);
|
|
158
158
|
}
|
|
159
|
-
const ippApi = this.props.api.pluginsApi.
|
|
159
|
+
const ippApi = this.props.api.pluginsApi.getipushpullPluginApi();
|
|
160
160
|
if (ippApi && ippApi.isIPushPullRunning()) {
|
|
161
161
|
allSchedules.push(...this.props.IPushPullSchedules);
|
|
162
162
|
}
|
|
163
|
-
const glue42Api = this.props.api.pluginsApi.
|
|
163
|
+
const glue42Api = this.props.api.pluginsApi.getGlue42PluginApi();
|
|
164
164
|
if (glue42Api && glue42Api.isGlue42Running()) {
|
|
165
165
|
allSchedules.push(...this.props.Glue42Schedules);
|
|
166
166
|
}
|
|
167
|
-
const openFinApi = this.props.api.pluginsApi.
|
|
167
|
+
const openFinApi = this.props.api.pluginsApi.getOpenFinPluginApi();
|
|
168
168
|
if (openFinApi && openFinApi.isOpenFinRunning()) {
|
|
169
169
|
allSchedules.push(...this.props.OpenFinSchedules);
|
|
170
170
|
}
|
|
@@ -21,7 +21,7 @@ exports.ScheduleSettingsWizard = (props) => {
|
|
|
21
21
|
return (React.createElement(ScheduleSettingsReport_1.ScheduleSettingsReport, { allReports: allReports !== null && allReports !== void 0 ? allReports : [], customDestinations: customDestinations || [], report: data, onChange: props.onChange }));
|
|
22
22
|
}
|
|
23
23
|
if ((data === null || data === void 0 ? void 0 : data.ScheduleType) === Enums_1.ScheduleType.ipushpull) {
|
|
24
|
-
const ippApi = api.pluginsApi.
|
|
24
|
+
const ippApi = api.pluginsApi.getipushpullPluginApi();
|
|
25
25
|
const allFolders = ippApi && ippApi.getIPushPullDomains();
|
|
26
26
|
const folderName = data.IPushPullReport.Folder;
|
|
27
27
|
const availablePages = ippApi && folderName && ippApi.getPagesForIPushPullDomain(folderName);
|
|
@@ -29,7 +29,7 @@ class SmartEditPopupComponent extends React.Component {
|
|
|
29
29
|
render() {
|
|
30
30
|
let col;
|
|
31
31
|
if (this.props.PreviewInfo) {
|
|
32
|
-
col = this.props.
|
|
32
|
+
col = this.props.PreviewInfo.column;
|
|
33
33
|
}
|
|
34
34
|
let globalValidationMessage = PreviewHelper_1.PreviewHelper.GetValidationMessage(this.props.PreviewInfo, `${this.props.SmartEditValue}`);
|
|
35
35
|
let showPanel = this.props.PreviewInfo && StringExtensions_1.StringExtensions.IsNotNullOrEmpty(`${this.props.SmartEditValue}`);
|
|
@@ -1,16 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { ModuleViewPopupProps } from '../Components/SharedProps/ModuleViewPopupProps';
|
|
3
|
-
interface StateManagementPopupProps extends ModuleViewPopupProps<
|
|
3
|
+
interface StateManagementPopupProps extends ModuleViewPopupProps<typeof StateManagementPopup> {
|
|
4
4
|
}
|
|
5
|
-
declare
|
|
6
|
-
constructor(props: StateManagementPopupProps);
|
|
7
|
-
render(): JSX.Element;
|
|
8
|
-
onClearLocalStorage(): void;
|
|
9
|
-
onLoadPredefinedConfig(e: any): void;
|
|
10
|
-
onExportAllState(type: any): void;
|
|
11
|
-
onExportUserState(type: any): void;
|
|
12
|
-
onExportPredefinedConfig(type: any): void;
|
|
13
|
-
onExportState(type: any, name: string, state: any): void;
|
|
14
|
-
}
|
|
15
|
-
export declare let StateManagementPopup: import("react-redux").ConnectedComponent<typeof StateManagementPopupComponent, any>;
|
|
5
|
+
export declare const StateManagementPopup: React.FunctionComponent<StateManagementPopupProps>;
|
|
16
6
|
export {};
|
|
@@ -3,120 +3,27 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.StateManagementPopup = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const React = tslib_1.__importStar(require("react"));
|
|
6
|
-
const react_redux_1 = require("react-redux");
|
|
7
6
|
const PanelWithButton_1 = require("../Components/Panels/PanelWithButton");
|
|
8
|
-
const UIHelper_1 = require("../UIHelper");
|
|
9
7
|
const rebass_1 = require("rebass");
|
|
10
|
-
const SimpleButton_1 = tslib_1.__importDefault(require("../../components/SimpleButton"));
|
|
11
8
|
const HelpBlock_1 = tslib_1.__importDefault(require("../../components/HelpBlock"));
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
value: 'JSON',
|
|
34
|
-
label: 'JSON',
|
|
35
|
-
},
|
|
36
|
-
];
|
|
37
|
-
let clearButton = (React.createElement(SimpleButton_1.default, { onClick: () => this.onClearLocalStorage(), tooltip: "Clear User State", tone: "error", variant: "raised", marginTop: 2, accessLevel: this.props.accessLevel }, "Clear User State"));
|
|
38
|
-
let loadButton = (React.createElement(SimpleButton_1.default, { marginTop: 2, tone: "info", variant: "raised", accessLevel: this.props.accessLevel },
|
|
39
|
-
React.createElement("input", { type: "file", onChange: (json) => this.onLoadPredefinedConfig(json), accept: '.json', style: {
|
|
40
|
-
opacity: 0,
|
|
41
|
-
position: 'absolute',
|
|
42
|
-
cursor: 'pointer',
|
|
43
|
-
fontSize: 0,
|
|
44
|
-
lineHeight: 0,
|
|
45
|
-
top: 0,
|
|
46
|
-
left: 0,
|
|
47
|
-
width: '100%',
|
|
48
|
-
height: '100%',
|
|
49
|
-
zIndex: 1,
|
|
50
|
-
} }),
|
|
51
|
-
' ',
|
|
52
|
-
"Load Predefined Config"));
|
|
53
|
-
return (React.createElement(rebass_1.Flex, { flex: 1, flexDirection: "column" },
|
|
54
|
-
React.createElement(PanelWithButton_1.PanelWithButton, { headerText: this.props.moduleInfo.FriendlyName, button: null, glyphicon: this.props.moduleInfo.Glyph, infoLink: this.props.moduleInfo.HelpPage, infoLinkDisabled: !this.props.api.internalApi.isDocumentationLinksDisplayed() },
|
|
55
|
-
React.createElement(rebass_1.Box, null,
|
|
56
|
-
React.createElement(HelpBlock_1.default, null, 'Clear all current user state that has been applied. When you restart / refresh Adaptable any state that you have previously created will be lost. However your Predefined Config will then be re-applied.'),
|
|
57
|
-
clearButton,
|
|
58
|
-
React.createElement(HelpBlock_1.default, { marginTop: 3 }, 'Load Predefined Config (from a .json file). This will cause this window to close.'),
|
|
59
|
-
' ',
|
|
60
|
-
loadButton,
|
|
61
|
-
React.createElement(HelpBlock_1.default, { marginTop: 3, marginBottom: 2 }, 'Export All Adaptable State'),
|
|
62
|
-
React.createElement(Dropdown_1.default, { key: 'exportAllState', placeholder: "Select Export Destination", style: { flex: 1, maxWidth: 'none' }, value: undefined, onChange: (x) => this.onExportAllState(x), marginRight: 3, options: destinationOptions }),
|
|
63
|
-
React.createElement(HelpBlock_1.default, { marginTop: 3, marginBottom: 2 }, 'Export User State'),
|
|
64
|
-
' ',
|
|
65
|
-
React.createElement(Dropdown_1.default, { key: 'exportUserState', placeholder: "Select Export Destination", style: { flex: 1, maxWidth: 'none' }, value: undefined, onChange: (x) => this.onExportUserState(x), marginRight: 3, options: destinationOptions }),
|
|
66
|
-
React.createElement(HelpBlock_1.default, { marginTop: 3, marginBottom: 2 }, 'Export Initial Predefined Config'),
|
|
67
|
-
' ',
|
|
68
|
-
React.createElement(Dropdown_1.default, { key: 'exportPredefinedConfig', placeholder: "Select Export Destination", style: { flex: 1, maxWidth: 'none' }, value: undefined, onChange: (x) => this.onExportPredefinedConfig(x), marginRight: 3, options: destinationOptions })))));
|
|
69
|
-
}
|
|
70
|
-
onClearLocalStorage() {
|
|
71
|
-
this.props.api.configApi.reloadPredefinedConfig();
|
|
72
|
-
}
|
|
73
|
-
onLoadPredefinedConfig(e) {
|
|
74
|
-
let nativeEvent = e.nativeEvent;
|
|
75
|
-
let files;
|
|
76
|
-
if (nativeEvent && nativeEvent.dataTransfer) {
|
|
77
|
-
files = nativeEvent.dataTransfer.files;
|
|
78
|
-
}
|
|
79
|
-
else {
|
|
80
|
-
files = e.target.files;
|
|
81
|
-
}
|
|
82
|
-
const file = files[0];
|
|
83
|
-
FileDroppable_1.readJSONFile(file).then((json) => {
|
|
84
|
-
this.props.api.configApi.reloadPredefinedConfig(json);
|
|
85
|
-
});
|
|
86
|
-
}
|
|
87
|
-
onExportAllState(type) {
|
|
88
|
-
let allState = this.props.api.configApi.getAllState();
|
|
89
|
-
this.onExportState(type, 'allState', allState);
|
|
90
|
-
}
|
|
91
|
-
onExportUserState(type) {
|
|
92
|
-
let userState = this.props.api.configApi.getAllUserState();
|
|
93
|
-
this.onExportState(type, 'userState', userState);
|
|
94
|
-
}
|
|
95
|
-
onExportPredefinedConfig(type) {
|
|
96
|
-
let predefinedConfig = this.props.api.configApi.getPredefinedConfig();
|
|
97
|
-
this.onExportState(type, 'predefinedConfig', predefinedConfig);
|
|
98
|
-
}
|
|
99
|
-
onExportState(type, name, state) {
|
|
100
|
-
switch (type) {
|
|
101
|
-
case 'Clipboard':
|
|
102
|
-
let stringifiedState = JSON.stringify(state);
|
|
103
|
-
Helper_1.default.copyToClipboard(stringifiedState);
|
|
104
|
-
break;
|
|
105
|
-
case 'Console':
|
|
106
|
-
LoggingHelper_1.ConsoleLog(state);
|
|
107
|
-
break;
|
|
108
|
-
case 'JSON':
|
|
109
|
-
const jsonFileName = name + '.json';
|
|
110
|
-
const jsonContent = JSON.stringify(state);
|
|
111
|
-
Helper_1.default.createDownloadedFile(jsonContent, jsonFileName, 'application/json');
|
|
112
|
-
break;
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
function mapStateToProps(state, ownProps) {
|
|
117
|
-
return {};
|
|
118
|
-
}
|
|
119
|
-
function mapDispatchToProps(dispatch) {
|
|
120
|
-
return {};
|
|
121
|
-
}
|
|
122
|
-
exports.StateManagementPopup = react_redux_1.connect(mapStateToProps, mapDispatchToProps)(StateManagementPopupComponent);
|
|
9
|
+
const LoadButton_1 = require("./components/LoadButton");
|
|
10
|
+
const ClearButton_1 = require("./components/ClearButton");
|
|
11
|
+
const ExportDropdown_1 = require("./components/ExportDropdown");
|
|
12
|
+
exports.StateManagementPopup = (props) => {
|
|
13
|
+
return (React.createElement(rebass_1.Flex, { flex: 1, flexDirection: "column" },
|
|
14
|
+
React.createElement(PanelWithButton_1.PanelWithButton, { headerText: props.moduleInfo.FriendlyName, button: null, glyphicon: props.moduleInfo.Glyph, infoLink: props.moduleInfo.HelpPage, infoLinkDisabled: !props.api.internalApi.isDocumentationLinksDisplayed() },
|
|
15
|
+
React.createElement(rebass_1.Box, null,
|
|
16
|
+
React.createElement(HelpBlock_1.default, null, 'Clear all current user state that has been applied. When you restart / refresh Adaptable any state that you have previously created will be lost. However your Predefined Config will then be re-applied.'),
|
|
17
|
+
React.createElement(ClearButton_1.ClearButton, { tone: "error", variant: "raised", marginTop: 2, accessLevel: props.accessLevel, onClick: () => props.api.configApi.reloadPredefinedConfig() }, "Clear User State"),
|
|
18
|
+
React.createElement(HelpBlock_1.default, { marginTop: 3 }, 'Load Predefined Config (from a .json file). This will cause this window to close.'),
|
|
19
|
+
' ',
|
|
20
|
+
React.createElement(LoadButton_1.LoadButton, { tone: "info", variant: "raised", marginTop: 2, accessLevel: props.accessLevel, onLoad: (json) => props.api.configApi.reloadPredefinedConfig(json) }, "Load Predefined Config"),
|
|
21
|
+
React.createElement(HelpBlock_1.default, { marginTop: 3, marginBottom: 2 }, 'Export All Adaptable State'),
|
|
22
|
+
React.createElement(ExportDropdown_1.ExportDropdown, { api: props.api, type: "allState", marginRight: 3, style: { flex: 1, maxWidth: 'none' } }, "Select Export Destination"),
|
|
23
|
+
React.createElement(HelpBlock_1.default, { marginTop: 3, marginBottom: 2 }, 'Export User State'),
|
|
24
|
+
' ',
|
|
25
|
+
React.createElement(ExportDropdown_1.ExportDropdown, { api: props.api, type: "userState", marginRight: 3, style: { flex: 1, maxWidth: 'none' } }, "Select Export Destination"),
|
|
26
|
+
React.createElement(HelpBlock_1.default, { marginTop: 3, marginBottom: 2 }, 'Export Initial Predefined Config'),
|
|
27
|
+
' ',
|
|
28
|
+
React.createElement(ExportDropdown_1.ExportDropdown, { api: props.api, type: "predefinedConfig", marginRight: 3, style: { flex: 1, maxWidth: 'none' } }, "Select Export Destination")))));
|
|
29
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ViewPanelProps } from '../Components/SharedProps/ViewPanelProps';
|
|
3
|
+
export interface ThemeViewPanelComponentProps extends ViewPanelProps {
|
|
4
|
+
}
|
|
5
|
+
export declare const StateManagementViewPanel: React.FunctionComponent<ThemeViewPanelComponentProps>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.StateManagementViewPanel = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const React = tslib_1.__importStar(require("react"));
|
|
6
|
+
const join_1 = tslib_1.__importDefault(require("../../components/utils/join"));
|
|
7
|
+
const GeneralConstants = tslib_1.__importStar(require("../../Utilities/Constants/GeneralConstants"));
|
|
8
|
+
const LoadButton_1 = require("./components/LoadButton");
|
|
9
|
+
const ClearButton_1 = require("./components/ClearButton");
|
|
10
|
+
const rebass_1 = require("rebass");
|
|
11
|
+
const ExportDropdown_1 = require("./components/ExportDropdown");
|
|
12
|
+
exports.StateManagementViewPanel = (props) => {
|
|
13
|
+
const isToolbar = props.viewType === 'Toolbar';
|
|
14
|
+
const elementType = isToolbar ? 'DashboardToolbar' : 'ToolPanel';
|
|
15
|
+
return (React.createElement(rebass_1.Flex, { flexDirection: isToolbar ? 'row' : 'column', className: join_1.default(props.accessLevel == 'ReadOnly' ? GeneralConstants.READ_ONLY_STYLE : '', `ab-${elementType}__StateManagement__wrap`) },
|
|
16
|
+
React.createElement(rebass_1.Flex, { flexDirection: "row" },
|
|
17
|
+
React.createElement(LoadButton_1.LoadButton, { tooltip: "Load Predefined Config", variant: "text", icon: "upload", onLoad: (json) => props.api.configApi.reloadPredefinedConfig(json), accessLevel: props.accessLevel }, !isToolbar && 'Load'),
|
|
18
|
+
React.createElement(ClearButton_1.ClearButton, { icon: "trash", tooltip: "Clear User State", variant: "text", onClick: () => props.api.configApi.reloadPredefinedConfig(), accessLevel: props.accessLevel }, !isToolbar && 'Clear')),
|
|
19
|
+
React.createElement(ExportDropdown_1.ExportDropdown, { api: props.api, type: "allState" }, "All State"),
|
|
20
|
+
React.createElement(ExportDropdown_1.ExportDropdown, { api: props.api, type: "userState" }, "User State"),
|
|
21
|
+
React.createElement(ExportDropdown_1.ExportDropdown, { api: props.api, type: "predefinedConfig" }, "Predefined Config")));
|
|
22
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ClearButton = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const React = tslib_1.__importStar(require("react"));
|
|
6
|
+
const SimpleButton_1 = tslib_1.__importDefault(require("../../../components/SimpleButton"));
|
|
7
|
+
exports.ClearButton = (props) => {
|
|
8
|
+
return (React.createElement(SimpleButton_1.default, Object.assign({}, props, { className: "ab-StateManagement__Clear-Button", tooltip: "Clear User State" }), props.children));
|
|
9
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { AdaptableApi } from '../../../../types';
|
|
3
|
+
import { DropdownButtonProps } from '../../../components/DropdownButton';
|
|
4
|
+
export interface ExportDropdownProps extends Omit<DropdownButtonProps, 'options' | 'value'> {
|
|
5
|
+
api: AdaptableApi;
|
|
6
|
+
type: 'allState' | 'userState' | 'predefinedConfig';
|
|
7
|
+
}
|
|
8
|
+
export declare const ExportDropdown: React.FunctionComponent<ExportDropdownProps>;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ExportDropdown = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const React = tslib_1.__importStar(require("react"));
|
|
6
|
+
const DropdownButton_1 = tslib_1.__importDefault(require("../../../components/DropdownButton"));
|
|
7
|
+
const handleExportState_1 = require("../handleExportState");
|
|
8
|
+
exports.ExportDropdown = (props) => {
|
|
9
|
+
const handleChange = (destination) => {
|
|
10
|
+
switch (props.type) {
|
|
11
|
+
case 'allState':
|
|
12
|
+
const allState = props.api.configApi.getAllState();
|
|
13
|
+
handleExportState_1.handleExportState(destination, 'allState', allState);
|
|
14
|
+
break;
|
|
15
|
+
case 'userState':
|
|
16
|
+
const userState = props.api.configApi.getAllUserState();
|
|
17
|
+
handleExportState_1.handleExportState(destination, 'userState', userState);
|
|
18
|
+
break;
|
|
19
|
+
case 'predefinedConfig':
|
|
20
|
+
const predefinedConfig = props.api.configApi.getPredefinedConfig();
|
|
21
|
+
handleExportState_1.handleExportState(destination, 'predefinedConfig', predefinedConfig);
|
|
22
|
+
break;
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
const destinationOptions = [
|
|
26
|
+
{
|
|
27
|
+
value: 'Clipboard',
|
|
28
|
+
label: 'Clipboard',
|
|
29
|
+
onClick: () => handleChange('Clipboard'),
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
value: 'Console',
|
|
33
|
+
label: 'Console',
|
|
34
|
+
onClick: () => handleChange('Console'),
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
value: 'JSON',
|
|
38
|
+
label: 'JSON',
|
|
39
|
+
onClick: () => handleChange('JSON'),
|
|
40
|
+
},
|
|
41
|
+
];
|
|
42
|
+
return (React.createElement(DropdownButton_1.default, Object.assign({ className: "ab-StateManagement__Export-Dropdown" }, props, { items: destinationOptions, value: undefined })));
|
|
43
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { SimpleButtonProps } from '../../../components/SimpleButton';
|
|
3
|
+
interface LoadButtonProps extends SimpleButtonProps {
|
|
4
|
+
onLoad: (json: any) => void;
|
|
5
|
+
}
|
|
6
|
+
export declare const LoadButton: React.FunctionComponent<LoadButtonProps>;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LoadButton = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const React = tslib_1.__importStar(require("react"));
|
|
6
|
+
const FileDroppable_1 = require("../../../components/FileDroppable");
|
|
7
|
+
const SimpleButton_1 = tslib_1.__importDefault(require("../../../components/SimpleButton"));
|
|
8
|
+
exports.LoadButton = (props) => {
|
|
9
|
+
const onLoadPredefinedConfig = (e) => {
|
|
10
|
+
const nativeEvent = e.nativeEvent;
|
|
11
|
+
let files;
|
|
12
|
+
if (nativeEvent && nativeEvent.dataTransfer) {
|
|
13
|
+
files = nativeEvent.dataTransfer.files;
|
|
14
|
+
}
|
|
15
|
+
else {
|
|
16
|
+
files = e.target.files;
|
|
17
|
+
}
|
|
18
|
+
const file = files[0];
|
|
19
|
+
FileDroppable_1.readJSONFile(file).then((json) => {
|
|
20
|
+
props.onLoad(json);
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
return (React.createElement(SimpleButton_1.default, Object.assign({}, props, { className: "ab-StateManagement__Load-Button" }),
|
|
24
|
+
React.createElement("input", { type: "file", onChange: (json) => onLoadPredefinedConfig(json), accept: '.json', style: {
|
|
25
|
+
opacity: 0,
|
|
26
|
+
position: 'absolute',
|
|
27
|
+
cursor: 'pointer',
|
|
28
|
+
fontSize: 0,
|
|
29
|
+
lineHeight: 0,
|
|
30
|
+
top: 0,
|
|
31
|
+
left: 0,
|
|
32
|
+
width: '100%',
|
|
33
|
+
height: '100%',
|
|
34
|
+
zIndex: 1,
|
|
35
|
+
} }),
|
|
36
|
+
' ',
|
|
37
|
+
props.children));
|
|
38
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const handleExportState: (type: 'Clipboard' | 'Console' | 'JSON', name: string, state: any) => void;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.handleExportState = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const Helper_1 = tslib_1.__importDefault(require("../../Utilities/Helpers/Helper"));
|
|
6
|
+
const LoggingHelper_1 = require("../../Utilities/Helpers/LoggingHelper");
|
|
7
|
+
exports.handleExportState = (type, name, state) => {
|
|
8
|
+
switch (type) {
|
|
9
|
+
case 'Clipboard':
|
|
10
|
+
let stringifiedState = JSON.stringify(state);
|
|
11
|
+
Helper_1.default.copyToClipboard(stringifiedState);
|
|
12
|
+
break;
|
|
13
|
+
case 'Console':
|
|
14
|
+
LoggingHelper_1.ConsoleLog(state);
|
|
15
|
+
break;
|
|
16
|
+
case 'JSON':
|
|
17
|
+
const jsonFileName = name + '.json';
|
|
18
|
+
const jsonContent = JSON.stringify(state);
|
|
19
|
+
Helper_1.default.createDownloadedFile(jsonContent, jsonFileName, 'application/json');
|
|
20
|
+
break;
|
|
21
|
+
}
|
|
22
|
+
};
|
|
@@ -35,7 +35,7 @@ class ThemeViewPanelComponent extends React.Component {
|
|
|
35
35
|
textOverflow: 'ellipsis',
|
|
36
36
|
fontSize: 'small',
|
|
37
37
|
}
|
|
38
|
-
: { minWidth:
|
|
38
|
+
: { minWidth: '100%', fontSize: 'small' };
|
|
39
39
|
return (React.createElement("div", { className: join_1.default(this.props.accessLevel == 'ReadOnly' ? GeneralConstants.READ_ONLY_STYLE : '', `ab-${elementType}__Theme__wrap`) },
|
|
40
40
|
React.createElement(DropdownButton_1.default, { className: `ab-${elementType}__Theme__select`, style: dropDownStyle, items: themes, columns: ['label'], accessLevel: this.props.accessLevel }, currentThemeDescription)));
|
|
41
41
|
}
|
package/src/View/UIHelper.d.ts
CHANGED
|
@@ -52,6 +52,7 @@ export declare function getButtonTextColourForArrayandMessageType(adaptableAlert
|
|
|
52
52
|
export declare function getButtonTextColourForMessageType(messageType: AdaptableMessageType): string;
|
|
53
53
|
export declare function getAdaptableToolPanelWidth(): number;
|
|
54
54
|
export declare function getCSSVariableValue(cssVariable: string): string | undefined;
|
|
55
|
+
export declare function setCSSVariableValue(cssVariable: string, value: string): void;
|
|
55
56
|
export declare function isBrowserDocumentAvailable(): boolean;
|
|
56
57
|
export declare const UIHelper: {
|
|
57
58
|
getHexForName: typeof getHexForName;
|
|
@@ -79,6 +80,7 @@ export declare const UIHelper: {
|
|
|
79
80
|
getButtonTextColourForArrayandMessageType: typeof getButtonTextColourForArrayandMessageType;
|
|
80
81
|
getButtonTextColourForMessageType: typeof getButtonTextColourForMessageType;
|
|
81
82
|
getCSSVariableValue: typeof getCSSVariableValue;
|
|
83
|
+
setCSSVariableValue: typeof setCSSVariableValue;
|
|
82
84
|
getAdaptableToolPanelWidth: typeof getAdaptableToolPanelWidth;
|
|
83
85
|
isBrowserDocumentAvailable: typeof isBrowserDocumentAvailable;
|
|
84
86
|
};
|
package/src/View/UIHelper.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UIHelper = exports.isBrowserDocumentAvailable = exports.getCSSVariableValue = exports.getAdaptableToolPanelWidth = exports.getButtonTextColourForMessageType = exports.getButtonTextColourForArrayandMessageType = exports.getButtonColourForAdaptableAlerts = exports.getMessageTypeFromAdaptableAlerts = exports.getScheduleDescription = exports.getButtonToneForMessageType = exports.getGlyphForMessageType = exports.getGlyphForStatusColour = exports.getStyleForMessageType = exports.getStyleForStatusColour = exports.getColorByMessageType = exports.getGlyphByMessageType = exports.getButtonToneByMessageType = exports.getMessageTypeByStatusColour = exports.IsNotEmptyStyle = exports.IsEmptyStyle = exports.isValidUserChartContainer = exports.getChartContainer = exports.getModalContainer = exports.getPlaceHolderforDataType = exports.getDescriptionForDataType = exports.getEmptyConfigState = exports.getDefaultColors = exports.getHexForName = exports.ORANGE = exports.LIGHT_RED = exports.RED = exports.DARK_RED = exports.PURPLE = exports.MAGENTA = exports.CYAN = exports.LIGHT_BLUE = exports.BLUE = exports.DARK_BLUE = exports.LIGHT_YELLOW = exports.YELLOW = exports.LIME_GREEN = exports.GREEN = exports.DARK_GREEN = exports.BROWN = exports.GRAY = exports.LIGHT_GRAY = exports.WHITE = exports.BLACK = void 0;
|
|
3
|
+
exports.UIHelper = exports.isBrowserDocumentAvailable = exports.setCSSVariableValue = exports.getCSSVariableValue = exports.getAdaptableToolPanelWidth = exports.getButtonTextColourForMessageType = exports.getButtonTextColourForArrayandMessageType = exports.getButtonColourForAdaptableAlerts = exports.getMessageTypeFromAdaptableAlerts = exports.getScheduleDescription = exports.getButtonToneForMessageType = exports.getGlyphForMessageType = exports.getGlyphForStatusColour = exports.getStyleForMessageType = exports.getStyleForStatusColour = exports.getColorByMessageType = exports.getGlyphByMessageType = exports.getButtonToneByMessageType = exports.getMessageTypeByStatusColour = exports.IsNotEmptyStyle = exports.IsEmptyStyle = exports.isValidUserChartContainer = exports.getChartContainer = exports.getModalContainer = exports.getPlaceHolderforDataType = exports.getDescriptionForDataType = exports.getEmptyConfigState = exports.getDefaultColors = exports.getHexForName = exports.ORANGE = exports.LIGHT_RED = exports.RED = exports.DARK_RED = exports.PURPLE = exports.MAGENTA = exports.CYAN = exports.LIGHT_BLUE = exports.BLUE = exports.DARK_BLUE = exports.LIGHT_YELLOW = exports.YELLOW = exports.LIME_GREEN = exports.GREEN = exports.DARK_GREEN = exports.BROWN = exports.GRAY = exports.LIGHT_GRAY = exports.WHITE = exports.BLACK = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const EditableConfigEntityState_1 = require("./Components/SharedProps/EditableConfigEntityState");
|
|
6
6
|
const Enums_1 = require("../PredefinedConfig/Common/Enums");
|
|
@@ -459,6 +459,14 @@ function getCSSVariableValue(cssVariable) {
|
|
|
459
459
|
return getComputedStyle(document.documentElement).getPropertyValue(cssVariable);
|
|
460
460
|
}
|
|
461
461
|
exports.getCSSVariableValue = getCSSVariableValue;
|
|
462
|
+
function setCSSVariableValue(cssVariable, value) {
|
|
463
|
+
if (!isBrowserDocumentAvailable()) {
|
|
464
|
+
// possible during static/server-side rendering (should happen only in test cases)
|
|
465
|
+
return undefined;
|
|
466
|
+
}
|
|
467
|
+
document.documentElement.style.setProperty(cssVariable, value);
|
|
468
|
+
}
|
|
469
|
+
exports.setCSSVariableValue = setCSSVariableValue;
|
|
462
470
|
function isBrowserDocumentAvailable() {
|
|
463
471
|
return typeof window !== 'undefined' && typeof window.document !== 'undefined';
|
|
464
472
|
}
|
|
@@ -489,6 +497,7 @@ exports.UIHelper = {
|
|
|
489
497
|
getButtonTextColourForArrayandMessageType,
|
|
490
498
|
getButtonTextColourForMessageType,
|
|
491
499
|
getCSSVariableValue,
|
|
500
|
+
setCSSVariableValue,
|
|
492
501
|
getAdaptableToolPanelWidth,
|
|
493
502
|
isBrowserDocumentAvailable,
|
|
494
503
|
};
|
|
@@ -8,7 +8,8 @@ export declare class ActionColumnRenderer implements ICellRendererComp {
|
|
|
8
8
|
private eGui;
|
|
9
9
|
private eventListener;
|
|
10
10
|
init(params: ICellRendererParams): void;
|
|
11
|
+
render(): void;
|
|
11
12
|
getGui(): HTMLElement;
|
|
12
|
-
refresh(params:
|
|
13
|
+
refresh(params: ICellRendererParams): boolean;
|
|
13
14
|
destroy(): void;
|
|
14
15
|
}
|
|
@@ -40,7 +40,7 @@ class ActionColumnRenderer {
|
|
|
40
40
|
actionColumn: actionCol,
|
|
41
41
|
primaryKeyValue: pkValue,
|
|
42
42
|
rowNode: params.node,
|
|
43
|
-
|
|
43
|
+
adaptableApi: adaptable.api,
|
|
44
44
|
};
|
|
45
45
|
// if its a group node then only show if set to do so
|
|
46
46
|
if (adaptable.api.gridApi.isGroupRowNode(params.node) && !actionCol.includeGroupedRows) {
|
|
@@ -64,14 +64,30 @@ class ActionColumnRenderer {
|
|
|
64
64
|
let buttonStyle = adaptableApi.internalApi.getStyleForButton(button, context);
|
|
65
65
|
let buttonLabel = adaptableApi.internalApi.getLabelForButton(button, context);
|
|
66
66
|
let buttonTooltip = adaptableApi.internalApi.getTooltipForButton(button, context);
|
|
67
|
-
|
|
67
|
+
const handleClick = () => {
|
|
68
|
+
button.onClick(button, context);
|
|
69
|
+
// Timeout to let any updates to be done before re-rendering the component
|
|
70
|
+
setTimeout(() => {
|
|
71
|
+
// when called again it triggers a re-render
|
|
72
|
+
// https:reactjs.org/docs/react-dom.html#render
|
|
73
|
+
doRender();
|
|
74
|
+
}, 16);
|
|
75
|
+
};
|
|
76
|
+
return (React.createElement(SimpleButton_1.default, { key: button.Uuid, variant: (_a = buttonStyle === null || buttonStyle === void 0 ? void 0 : buttonStyle.variant) !== null && _a !== void 0 ? _a : 'text', disabled: disabled, tooltip: buttonTooltip, tone: (_b = buttonStyle === null || buttonStyle === void 0 ? void 0 : buttonStyle.tone) !== null && _b !== void 0 ? _b : 'none', onClick: handleClick, className: buttonStyle === null || buttonStyle === void 0 ? void 0 : buttonStyle.className, accessLevel: 'Full' },
|
|
68
77
|
button.icon ? React.createElement("img", Object.assign({}, iconProps)) : null,
|
|
69
78
|
buttonLabel));
|
|
70
79
|
};
|
|
71
|
-
|
|
72
|
-
|
|
80
|
+
const eGui = this.eGui;
|
|
81
|
+
function doRender() {
|
|
82
|
+
react_dom_1.render(renderButton(adaptable.api, context), eGui);
|
|
83
|
+
}
|
|
84
|
+
this.render = doRender;
|
|
85
|
+
doRender();
|
|
73
86
|
}
|
|
74
87
|
}
|
|
88
|
+
// defined on init
|
|
89
|
+
// used to re-render in refresh
|
|
90
|
+
render() { }
|
|
75
91
|
// gets called once when grid ready to insert the element
|
|
76
92
|
getGui() {
|
|
77
93
|
return this.eGui;
|
|
@@ -79,6 +95,7 @@ class ActionColumnRenderer {
|
|
|
79
95
|
// gets called whenever the user gets the cell to refresh
|
|
80
96
|
refresh(params) {
|
|
81
97
|
// return true to tell the grid we refreshed successfully
|
|
98
|
+
this.render();
|
|
82
99
|
return true;
|
|
83
100
|
}
|
|
84
101
|
// gets called when the cell is removed from the grid
|