@adaptabletools/adaptable-cjs 17.0.0-canary.4 → 18.0.0-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/base.css +62 -14
- package/base.css.map +1 -1
- package/index.css +267 -165
- package/index.css.map +1 -1
- package/package.json +5 -4
- package/src/AdaptableInterfaces/IAdaptable.d.ts +3 -0
- package/src/AdaptableOptions/AdaptableOptions.d.ts +5 -0
- package/src/AdaptableOptions/AlertOptions.d.ts +7 -7
- package/src/AdaptableOptions/ColumnFilterOptions.d.ts +9 -9
- package/src/AdaptableOptions/CommentsOptions.d.ts +28 -0
- package/src/AdaptableOptions/EditOptions.d.ts +6 -6
- package/src/AdaptableOptions/GridFilterOptions.d.ts +13 -8
- package/src/AdaptableOptions/GroupingOptions.d.ts +9 -9
- package/src/AdaptableOptions/InteropioPluginOptions.d.ts +10 -0
- package/src/AdaptableOptions/MenuOptions.d.ts +18 -4
- package/src/AdaptableOptions/MenuOptions.js +14 -6
- package/src/AdaptableOptions/NotesOptions.d.ts +2 -9
- package/src/Api/AdaptableApi.d.ts +6 -1
- package/src/Api/CommentApi.d.ts +58 -0
- package/src/Api/EventApi.d.ts +48 -12
- package/src/Api/Events/CalculatedColumnChanged.d.ts +19 -0
- package/src/Api/Events/CellSelectionChanged.d.ts +11 -0
- package/src/Api/Events/CommentsChangedInfo.d.ts +5 -0
- package/src/Api/Events/LiveDataChanged.d.ts +3 -3
- package/src/Api/Events/RowSelectionChanged.d.ts +11 -0
- package/src/Api/GridApi.d.ts +0 -6
- package/src/Api/GridFilterApi.d.ts +2 -2
- package/src/Api/Implementation/AdaptableApiImpl.d.ts +6 -6
- package/src/Api/Implementation/AdaptableApiImpl.js +2 -0
- package/src/Api/Implementation/CommentsApiImpl.d.ts +15 -0
- package/src/Api/Implementation/CommentsApiImpl.js +46 -0
- package/src/Api/Implementation/ExpressionApiImpl.d.ts +1 -1
- package/src/Api/Implementation/ExpressionApiImpl.js +3 -4
- package/src/Api/Implementation/GridApiImpl.d.ts +0 -1
- package/src/Api/Implementation/GridApiImpl.js +0 -4
- package/src/Api/Implementation/GridFilterApiImpl.d.ts +1 -1
- package/src/Api/Implementation/GridFilterApiImpl.js +1 -1
- package/src/Api/Implementation/NotesApiImpl.d.ts +3 -7
- package/src/Api/Implementation/NotesApiImpl.js +1 -15
- package/src/Api/Implementation/OptionsApiImpl.d.ts +2 -0
- package/src/Api/Implementation/OptionsApiImpl.js +3 -0
- package/src/Api/Implementation/PluginsApiImpl.d.ts +2 -6
- package/src/Api/Implementation/PluginsApiImpl.js +3 -15
- package/src/Api/Implementation/ScheduleApiImpl.d.ts +1 -12
- package/src/Api/Implementation/ScheduleApiImpl.js +0 -36
- package/src/Api/Implementation/ThemeApiImpl.d.ts +1 -0
- package/src/Api/Implementation/ThemeApiImpl.js +3 -0
- package/src/Api/Internal/ActionRowInternalApi.js +1 -1
- package/src/Api/Internal/AdaptableInternalApi.d.ts +2 -0
- package/src/Api/Internal/AdaptableInternalApi.js +3 -0
- package/src/Api/Internal/CalculatedColumnInternalApi.d.ts +2 -0
- package/src/Api/Internal/CalculatedColumnInternalApi.js +16 -0
- package/src/Api/Internal/DashboardInternalApi.d.ts +1 -0
- package/src/Api/Internal/DashboardInternalApi.js +5 -0
- package/src/Api/Internal/DataImportInternalApi.js +2 -0
- package/src/Api/Internal/DataSetInternalApi.js +2 -1
- package/src/Api/Internal/GridInternalApi.d.ts +3 -1
- package/src/Api/Internal/GridInternalApi.js +32 -9
- package/src/Api/Internal/LayoutInternalApi.d.ts +2 -2
- package/src/Api/Internal/LayoutInternalApi.js +11 -11
- package/src/Api/InteropioPluginApi.d.ts +10 -0
- package/src/Api/{NotesAPi.d.ts → NotesApi.d.ts} +19 -21
- package/src/Api/OptionsApi.d.ts +5 -0
- package/src/Api/PluginsApi.d.ts +3 -13
- package/src/Api/ScheduleApi.d.ts +1 -48
- package/src/Api/ThemeApi.d.ts +5 -0
- package/src/PredefinedConfig/AdaptableState.d.ts +4 -2
- package/src/PredefinedConfig/CellAddress.d.ts +13 -0
- package/src/PredefinedConfig/CellAddress.js +5 -0
- package/src/PredefinedConfig/CommentState.d.ts +48 -0
- package/src/PredefinedConfig/CommentState.js +2 -0
- package/src/PredefinedConfig/Common/AdaptableIcon.d.ts +1 -1
- package/src/PredefinedConfig/Common/AdaptablePredicate.js +2 -1
- package/src/PredefinedConfig/Common/Enums.d.ts +0 -1
- package/src/PredefinedConfig/Common/Enums.js +0 -1
- package/src/PredefinedConfig/Common/Schedule.d.ts +1 -1
- package/src/PredefinedConfig/Common/Types.d.ts +5 -5
- package/src/PredefinedConfig/Common/Types.js +0 -2
- package/src/PredefinedConfig/NotesState.d.ts +0 -13
- package/src/PredefinedConfig/PredefinedConfig.d.ts +3 -0
- package/src/PredefinedConfig/ScheduleState.d.ts +0 -5
- package/src/PredefinedConfig/SystemState.d.ts +5 -6
- package/src/PredefinedConfig/ThemeState.d.ts +1 -1
- package/src/Redux/ActionsReducers/CommentsRedux.d.ts +79 -0
- package/src/Redux/ActionsReducers/CommentsRedux.js +189 -0
- package/src/Redux/ActionsReducers/NotesRedux.d.ts +1 -1
- package/src/Redux/ActionsReducers/NotesRedux.js +4 -5
- package/src/Redux/ActionsReducers/PluginsRedux.d.ts +0 -48
- package/src/Redux/ActionsReducers/PluginsRedux.js +1 -49
- package/src/Redux/ActionsReducers/PlusMinusRedux.d.ts +16 -0
- package/src/Redux/ActionsReducers/PlusMinusRedux.js +47 -1
- package/src/Redux/ActionsReducers/ScheduleRedux.d.ts +0 -53
- package/src/Redux/ActionsReducers/ScheduleRedux.js +2 -90
- package/src/Redux/ActionsReducers/SystemRedux.d.ts +23 -12
- package/src/Redux/ActionsReducers/SystemRedux.js +55 -23
- package/src/Redux/Store/AdaptableStore.d.ts +2 -2
- package/src/Redux/Store/AdaptableStore.js +107 -46
- package/src/Strategy/CommentsModule.d.ts +16 -0
- package/src/Strategy/CommentsModule.js +82 -0
- package/src/Strategy/LayoutModule.d.ts +12 -4
- package/src/Strategy/LayoutModule.js +19 -14
- package/src/Strategy/NotesModule.d.ts +0 -13
- package/src/Strategy/NotesModule.js +9 -88
- package/src/Strategy/PlusMinusModule.js +2 -0
- package/src/Strategy/ScheduleModule.js +0 -23
- package/src/Strategy/Utilities/Export/getExportRowsViewItems.d.ts +2 -1
- package/src/Strategy/Utilities/Export/getExportRowsViewItems.js +14 -5
- package/src/Strategy/Utilities/getExpressionViewItems.js +8 -2
- package/src/Utilities/Constants/ConfigConstants.d.ts +1 -0
- package/src/Utilities/Constants/ConfigConstants.js +2 -1
- package/src/Utilities/Constants/GeneralConstants.d.ts +1 -0
- package/src/Utilities/Constants/GeneralConstants.js +8 -3
- package/src/Utilities/Constants/ModuleConstants.d.ts +3 -3
- package/src/Utilities/Constants/ModuleConstants.js +4 -4
- package/src/Utilities/Defaults/DefaultAdaptableOptions.js +3 -3
- package/src/Utilities/Defaults/DefaultSettingsPanel.js +1 -0
- package/src/Utilities/ExpressionFunctions/aggregatedBooleanExpressionFunctions.js +7 -1
- package/src/Utilities/ExpressionFunctions/booleanExpressionFunctions.js +6 -0
- package/src/Utilities/ExpressionFunctions/dateUtils.d.ts +1 -0
- package/src/Utilities/ExpressionFunctions/dateUtils.js +18 -1
- package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.d.ts +1 -1
- package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +12 -12
- package/src/Utilities/Extensions/ArrayExtensions.d.ts +2 -0
- package/src/Utilities/Extensions/ArrayExtensions.js +8 -1
- package/src/Utilities/Helpers/PreviewHelper.js +5 -2
- package/src/Utilities/ObjectFactory.d.ts +19 -22
- package/src/Utilities/ObjectFactory.js +51 -60
- package/src/Utilities/Services/CellPopupService.d.ts +23 -0
- package/src/Utilities/Services/CellPopupService.js +138 -0
- package/src/Utilities/Services/Interface/IReportService.d.ts +1 -1
- package/src/Utilities/Services/Interface/IThemeService.d.ts +8 -0
- package/src/Utilities/Services/ModuleService.js +1 -3
- package/src/Utilities/Services/ReportService.d.ts +1 -1
- package/src/Utilities/Services/ThemeService.d.ts +3 -0
- package/src/Utilities/Services/ThemeService.js +33 -1
- package/src/Utilities/Services/ValidationService.js +11 -11
- package/src/View/AdaptableView.js +3 -3
- package/src/View/AdaptableViewFactory.js +4 -2
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ColumnsList.js +2 -2
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/EntitlementsForm.js +1 -1
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/FinanceForm/FinanceForm.js +1 -1
- package/src/View/Alert/Wizard/AlertButtonsEditor.js +2 -2
- package/src/View/Alert/Wizard/AlertRulesWizardSection.d.ts +1 -1
- package/src/View/Alert/Wizard/AlertRulesWizardSection.js +4 -3
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnExpressionWizardSection.js +1 -1
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnWizard.js +1 -1
- package/src/View/Charting/useChartingElements.js +8 -3
- package/src/View/Comments/CommentsEditor.d.ts +7 -0
- package/src/View/Comments/CommentsEditor.js +100 -0
- package/src/View/Comments/CommentsPopup.d.ts +2 -0
- package/src/View/Comments/CommentsPopup.js +87 -0
- package/src/View/Components/AdaptableObjectList/AdaptableObjectList.js +2 -1
- package/src/View/Components/CellPopup/index.js +1 -1
- package/src/View/Components/FilterForm/FilterForm.js +8 -2
- package/src/View/Components/FilterForm/ListBoxFilterForm.js +1 -3
- package/src/View/Components/FilterForm/QuickFilterForm.js +5 -4
- package/src/View/Components/FilterForm/QuickFilterValues.d.ts +2 -2
- package/src/View/Components/FilterForm/QuickFilterValues.js +4 -3
- package/src/View/Components/Popups/GridCellPopup/GridCellPopup.d.ts +5 -0
- package/src/View/Components/Popups/GridCellPopup/GridCellPopup.js +67 -0
- package/src/View/Components/Popups/GridCellPopup/index.d.ts +1 -0
- package/src/View/Components/Popups/GridCellPopup/index.js +5 -0
- package/src/View/Components/Selectors/ColumnSelector.d.ts +1 -0
- package/src/View/Components/Selectors/ColumnSelector.js +2 -1
- package/src/View/Components/Selectors/PermittedValuesSelector.d.ts +5 -4
- package/src/View/Components/Selectors/PermittedValuesSelector.js +25 -3
- package/src/View/Components/ToolPanel/ToolPanelWrapper.js +1 -4
- package/src/View/Dashboard/ModuleToolbarWrapper.js +1 -1
- package/src/View/Dashboard/PinnedDashboard.js +2 -1
- package/src/View/DataImport/DataImportWizard/sections/DataPreview.js +2 -2
- package/src/View/Export/Wizard/ReportRowsWizardSection.js +3 -1
- package/src/View/GridFilter/GridFilterExpressionEditor.js +1 -1
- package/src/View/GridFilter/GridFilterPopup.js +10 -8
- package/src/View/GridFilter/GridFilterViewPanel.js +51 -14
- package/src/View/GridFilter/NamedQuerySelector.js +1 -1
- package/src/View/GridFilter/useGridFilterExpressionEditor.d.ts +3 -0
- package/src/View/GridFilter/useGridFilterExpressionEditor.js +17 -6
- package/src/View/GridFilter/useGridFilterOptionsForExpressionEditor.js +5 -23
- package/src/View/GridInfo/GridInfoPopup/GridInfoPopup.js +3 -2
- package/src/View/Layout/Wizard/getGridFilterPreview.d.ts +6 -0
- package/src/View/Layout/Wizard/getGridFilterPreview.js +16 -0
- package/src/View/Layout/Wizard/sections/FilterSection.js +1 -1
- package/src/View/Layout/Wizard/sections/GridFilterSection.js +4 -4
- package/src/View/NamedQuery/EditCurrentQueryButton.js +1 -1
- package/src/View/NamedQuery/Wizard/NamedQueryExpressionWizardSection.js +1 -1
- package/src/View/Notes/NoteEditor.d.ts +8 -0
- package/src/View/Notes/NoteEditor.js +33 -0
- package/src/View/Notes/NotesPopup.d.ts +2 -2
- package/src/View/Notes/NotesPopup.js +78 -55
- package/src/View/PlusMinus/MovePlusMinus.d.ts +7 -0
- package/src/View/PlusMinus/MovePlusMinus.js +27 -0
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsSummary.js +0 -9
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsWizard.js +0 -4
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/isSettingsValid.js +2 -8
- package/src/View/Schedule/Wizard/ScheduleWizard.js +0 -8
- package/src/View/StyledColumn/Wizard/StyledColumnBadgeSection.js +3 -1
- package/src/View/StyledColumn/Wizard/StyledColumnWizard.js +1 -2
- package/src/agGrid/Adaptable.d.ts +7 -0
- package/src/agGrid/Adaptable.js +49 -35
- package/src/agGrid/BadgeRenderer.js +9 -5
- package/src/agGrid/agGridHelper.d.ts +2 -1
- package/src/agGrid/agGridHelper.js +15 -3
- package/src/agGrid/agGridMenuHelper.d.ts +2 -0
- package/src/agGrid/agGridMenuHelper.js +73 -25
- package/src/components/Datepicker/index.js +4 -4
- package/src/components/ExpressionEditor/ExpressionPreview.d.ts +7 -0
- package/src/components/ExpressionEditor/ExpressionPreview.js +25 -0
- package/src/components/ExpressionEditor/QueryBuilder/QueryBuilder.js +2 -2
- package/src/components/ExpressionEditor/QueryBuilder/QueryBuilderInputs.d.ts +6 -0
- package/src/components/ExpressionEditor/QueryBuilder/QueryBuilderInputs.js +40 -11
- package/src/components/ExpressionEditor/QueryBuilder/QueryPredicateBuilder.js +14 -2
- package/src/components/ExpressionEditor/QueryBuilder/booleanExpressions.js +1 -0
- package/src/components/ExpressionEditor/QueryBuilder/utils.js +1 -1
- package/src/components/ExpressionEditor/index.js +4 -7
- package/src/components/InputGroup/InputGroup.d.ts +7 -0
- package/src/components/InputGroup/InputGroup.js +12 -0
- package/src/components/InputGroup/index.d.ts +1 -0
- package/src/components/InputGroup/index.js +4 -0
- package/src/components/OverlayTrigger/index.js +7 -2
- package/src/components/Select/Select.d.ts +1 -2
- package/src/components/Select/Select.js +63 -23
- package/src/components/Textarea/index.d.ts +9 -0
- package/src/components/Textarea/index.js +50 -2
- package/src/components/Toastify/index.d.ts +2 -2
- package/src/components/Toastify/index.js +1 -1
- package/src/components/icons/comments.d.ts +3 -0
- package/src/components/icons/comments.js +7 -0
- package/src/components/icons/index.js +3 -1
- package/src/env.d.ts +3 -1
- package/src/env.js +3 -1
- package/src/metamodel/adaptable.metamodel.d.ts +72 -158
- package/src/metamodel/adaptable.metamodel.js +138 -260
- package/src/parser/src/parser.d.ts +2 -0
- package/src/parser/src/parser.js +1880 -705
- package/src/parser/src/predicate/mapQlPredicateToExpression.js +5 -2
- package/src/parser/src/predicate/types.d.ts +1 -1
- package/src/parser/src/types.d.ts +1 -1
- package/src/renderReactRoot.js +15 -0
- package/src/themes/index.js +4 -0
- package/src/types.d.ts +10 -13
- package/themes/dark.css +3 -3
- package/tsconfig.cjs.tsbuildinfo +1 -1
- package/src/AdaptableOptions/FinsemblePluginOptions.d.ts +0 -35
- package/src/AdaptableOptions/Glue42PluginOptions.d.ts +0 -25
- package/src/AdaptableOptions/Glue42WebPluginOptions.d.ts +0 -10
- package/src/Api/Events/SelectionChanged.d.ts +0 -16
- package/src/Api/FinsembleApi.d.ts +0 -10
- package/src/Api/Glue42Api.d.ts +0 -75
- package/src/Api/Glue42WebApi.d.ts +0 -10
- package/src/PredefinedConfig/Glue42State.d.ts +0 -46
- package/src/View/Notes/NotesListing.d.ts +0 -2
- package/src/View/Notes/NotesListing.js +0 -88
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsGlue42.d.ts +0 -9
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsGlue42.js +0 -25
- package/src/bundle-dependencies/bundles/react-toastify/components/CloseButton.d.ts +0 -9
- package/src/bundle-dependencies/bundles/react-toastify/components/Icons.d.ts +0 -24
- package/src/bundle-dependencies/bundles/react-toastify/components/ProgressBar.d.ts +0 -59
- package/src/bundle-dependencies/bundles/react-toastify/components/Toast.d.ts +0 -3
- package/src/bundle-dependencies/bundles/react-toastify/components/ToastContainer.d.ts +0 -3
- package/src/bundle-dependencies/bundles/react-toastify/components/Transitions.d.ts +0 -6
- package/src/bundle-dependencies/bundles/react-toastify/components/index.d.ts +0 -6
- package/src/bundle-dependencies/bundles/react-toastify/core/eventManager.d.ts +0 -39
- package/src/bundle-dependencies/bundles/react-toastify/core/index.d.ts +0 -2
- package/src/bundle-dependencies/bundles/react-toastify/core/toast.d.ts +0 -41
- package/src/bundle-dependencies/bundles/react-toastify/hooks/index.d.ts +0 -2
- package/src/bundle-dependencies/bundles/react-toastify/hooks/useToast.d.ts +0 -10
- package/src/bundle-dependencies/bundles/react-toastify/hooks/useToastContainer.d.ts +0 -23
- package/src/bundle-dependencies/bundles/react-toastify/index.d.ts +0 -5
- package/src/bundle-dependencies/bundles/react-toastify/index.js +0 -1
- package/src/bundle-dependencies/bundles/react-toastify/inject-style.d.ts +0 -8
- package/src/bundle-dependencies/bundles/react-toastify/types/index.d.ts +0 -269
- package/src/bundle-dependencies/bundles/react-toastify/utils/collapseToast.d.ts +0 -5
- package/src/bundle-dependencies/bundles/react-toastify/utils/constant.d.ts +0 -23
- package/src/bundle-dependencies/bundles/react-toastify/utils/cssTransition.d.ts +0 -43
- package/src/bundle-dependencies/bundles/react-toastify/utils/index.d.ts +0 -5
- package/src/bundle-dependencies/bundles/react-toastify/utils/mapper.d.ts +0 -2
- package/src/bundle-dependencies/bundles/react-toastify/utils/propValidator.d.ts +0 -9
- /package/src/AdaptableOptions/{FinsemblePluginOptions.js → CommentsOptions.js} +0 -0
- /package/src/AdaptableOptions/{Glue42PluginOptions.js → InteropioPluginOptions.js} +0 -0
- /package/src/{AdaptableOptions/Glue42WebPluginOptions.js → Api/CommentApi.js} +0 -0
- /package/src/Api/Events/{SelectionChanged.js → CalculatedColumnChanged.js} +0 -0
- /package/src/Api/{FinsembleApi.js → Events/CellSelectionChanged.js} +0 -0
- /package/src/Api/{Glue42Api.js → Events/CommentsChangedInfo.js} +0 -0
- /package/src/Api/{Glue42WebApi.js → Events/RowSelectionChanged.js} +0 -0
- /package/src/Api/Internal/{ExpressionnternalApi.d.ts → ExpressionInternalApi.d.ts} +0 -0
- /package/src/Api/Internal/{ExpressionnternalApi.js → ExpressionInternalApi.js} +0 -0
- /package/src/Api/{NotesAPi.js → InteropioPluginApi.js} +0 -0
- /package/src/{PredefinedConfig/Glue42State.js → Api/NotesApi.js} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CombinatorSelector = exports.ExpressionSelector = exports.PrimiteValueInput = exports.PrimitiveColumnSelector = void 0;
|
|
3
|
+
exports.CombinatorSelector = exports.ExpressionSelector = exports.PrimitiveMultiValueInput = exports.PrimiteValueInput = exports.PrimitiveColumnSelector = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const react_1 = tslib_1.__importDefault(require("react"));
|
|
6
6
|
const rebass_1 = require("rebass");
|
|
@@ -11,6 +11,7 @@ const PermittedValuesSelector_1 = require("../../../View/Components/Selectors/Pe
|
|
|
11
11
|
const CheckBox_1 = require("../../CheckBox");
|
|
12
12
|
const DropdownButton_1 = tslib_1.__importDefault(require("../../DropdownButton"));
|
|
13
13
|
const icons_1 = require("../../icons");
|
|
14
|
+
const InputGroup_1 = require("../../InputGroup");
|
|
14
15
|
const Select_1 = require("../../Select");
|
|
15
16
|
const QueryBuilder_1 = require("./QueryBuilder");
|
|
16
17
|
const utils_1 = require("./utils");
|
|
@@ -85,37 +86,65 @@ const PrimiteValueInput = (props) => {
|
|
|
85
86
|
}
|
|
86
87
|
const options = [
|
|
87
88
|
{
|
|
88
|
-
label:
|
|
89
|
+
label: (react_1.default.createElement(rebass_1.Flex, null,
|
|
90
|
+
react_1.default.createElement(icons_1.Icon, { name: "columns" }),
|
|
91
|
+
react_1.default.createElement(rebass_1.Text, { ml: 2 }, "Column"))),
|
|
89
92
|
icon: 'columns',
|
|
90
93
|
value: 'column-name',
|
|
91
94
|
},
|
|
92
95
|
{
|
|
93
|
-
label:
|
|
96
|
+
label: (react_1.default.createElement(rebass_1.Flex, null,
|
|
97
|
+
react_1.default.createElement(icons_1.Icon, { name: "edit" }),
|
|
98
|
+
react_1.default.createElement(rebass_1.Text, { ml: 2 }, "Value"))),
|
|
94
99
|
icon: 'edit',
|
|
95
100
|
value: 'input-value',
|
|
96
101
|
},
|
|
97
102
|
];
|
|
98
103
|
const typeOption = options.find((option) => option.value === type);
|
|
99
|
-
return (react_1.default.createElement(rebass_1.Flex,
|
|
100
|
-
react_1.default.createElement(
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
}, variant: "raised", value: typeOption.value, options: options, onChange: (value) => handleTypeChange(value) })),
|
|
104
|
+
return (react_1.default.createElement(InputGroup_1.InputGroup, { Component: rebass_1.Flex, "data-id": "query-input-wrapper", mr: 2 },
|
|
105
|
+
react_1.default.createElement(Select_1.Select, { renderSingleValue: (value) => {
|
|
106
|
+
return (react_1.default.createElement(react_1.default.Fragment, null, typeOption.value === 'column-name' ? react_1.default.createElement(icons_1.Icon, { name: "grid" }) : react_1.default.createElement(icons_1.Icon, { name: "edit" })));
|
|
107
|
+
}, value: typeOption.value, options: options, onChange: (value) => handleTypeChange(value) }),
|
|
104
108
|
editor));
|
|
105
109
|
};
|
|
106
110
|
exports.PrimiteValueInput = PrimiteValueInput;
|
|
111
|
+
const PrimitiveMultiValueInput = (props) => {
|
|
112
|
+
return (react_1.default.createElement(PermittedValuesSelector_1.PermittedValuesSelector, { isMulti: true, allowNewValues: true, value: props.value, columnId: props.lefthandColumnIdParam, onChange: (value) => {
|
|
113
|
+
props.onChange(value);
|
|
114
|
+
} }));
|
|
115
|
+
};
|
|
116
|
+
exports.PrimitiveMultiValueInput = PrimitiveMultiValueInput;
|
|
117
|
+
const SymbolToIcon = (props) => {
|
|
118
|
+
switch (props.symbol) {
|
|
119
|
+
case '=':
|
|
120
|
+
return react_1.default.createElement(icons_1.Icon, { name: "equals" });
|
|
121
|
+
case '!=':
|
|
122
|
+
return react_1.default.createElement(icons_1.Icon, { name: "not-equal" });
|
|
123
|
+
case '>':
|
|
124
|
+
return react_1.default.createElement(icons_1.Icon, { name: "greater-than" });
|
|
125
|
+
case '>=':
|
|
126
|
+
return react_1.default.createElement(icons_1.Icon, { name: "greater-than-or-equal" });
|
|
127
|
+
case '<':
|
|
128
|
+
return react_1.default.createElement(icons_1.Icon, { name: "less-than" });
|
|
129
|
+
case '<=':
|
|
130
|
+
return react_1.default.createElement(icons_1.Icon, { name: "less-than-or-equal" });
|
|
131
|
+
default:
|
|
132
|
+
return react_1.default.createElement(react_1.default.Fragment, null, props.symbol);
|
|
133
|
+
}
|
|
134
|
+
};
|
|
107
135
|
const ExpressionSelector = (props) => {
|
|
108
136
|
var _a;
|
|
109
137
|
const { getExpressions } = (0, QueryBuilder_1.useQueryBuilderContext)();
|
|
110
138
|
const expressions = props.dataType ? getExpressions(props.dataType) : [];
|
|
111
|
-
return (react_1.default.createElement(DropdownButton_1.default, { "data-id": "expression-selector", "data-value": props.value, variant: "raised", columns: ['label'], items: expressions.map((expression) => ({
|
|
112
|
-
label: (0, mapQlPredicateToExpression_1.getQlPredicateSymbol)(expression),
|
|
139
|
+
return (react_1.default.createElement(DropdownButton_1.default, { "data-id": "expression-selector", "data-value": props.value, variant: "raised", tone: 'accent', columns: ['label'], items: expressions.map((expression) => ({
|
|
140
|
+
label: react_1.default.createElement(SymbolToIcon, { symbol: (0, mapQlPredicateToExpression_1.getQlPredicateSymbol)(expression) }),
|
|
113
141
|
onClick: () => {
|
|
114
142
|
if (expression !== props.value) {
|
|
115
143
|
props.onExpressionChange(expression);
|
|
116
144
|
}
|
|
117
145
|
},
|
|
118
|
-
})) },
|
|
146
|
+
})) },
|
|
147
|
+
react_1.default.createElement(SymbolToIcon, { symbol: (_a = (0, mapQlPredicateToExpression_1.getQlPredicateSymbol)(props.value)) !== null && _a !== void 0 ? _a : 'Select Operator' })));
|
|
119
148
|
};
|
|
120
149
|
exports.ExpressionSelector = ExpressionSelector;
|
|
121
150
|
const CombinatorSelector = (props) => {
|
|
@@ -145,12 +145,24 @@ const PrimitiveFunctionEditor = (props) => {
|
|
|
145
145
|
}, value: props.predicate.operator })),
|
|
146
146
|
react_1.default.createElement(rebass_1.Flex, { flex: 1, ml: 2 }, restOfFunctionInputDataTypes.map((type, index) => {
|
|
147
147
|
var _a;
|
|
148
|
-
|
|
148
|
+
let value = restOfArgs[index];
|
|
149
|
+
const commonProps = {
|
|
150
|
+
key: type + index,
|
|
151
|
+
lefthandColumnIdParam: columnId,
|
|
152
|
+
inputType: type,
|
|
153
|
+
};
|
|
154
|
+
if (type.includes('[]')) {
|
|
155
|
+
return (react_1.default.createElement(QueryBuilderInputs_1.PrimitiveMultiValueInput, Object.assign({}, commonProps, { value: restOfArgs, onChange: (values) => {
|
|
156
|
+
const args = [...props.predicate.args.slice(0, 1), ...values];
|
|
157
|
+
props.onChange(Object.assign(Object.assign({}, props.predicate), { args }));
|
|
158
|
+
} })));
|
|
159
|
+
}
|
|
160
|
+
return (react_1.default.createElement(QueryBuilderInputs_1.PrimiteValueInput, Object.assign({}, commonProps, { value: (_a = restOfArgs[index]) !== null && _a !== void 0 ? _a : null, onChange: (value) => {
|
|
149
161
|
const args = [...props.predicate.args];
|
|
150
162
|
// +1 because col is the first argument
|
|
151
163
|
args[index + 1] = value;
|
|
152
164
|
props.onChange(Object.assign(Object.assign({}, props.predicate), { args }));
|
|
153
|
-
} }));
|
|
165
|
+
} })));
|
|
154
166
|
}))),
|
|
155
167
|
react_1.default.createElement(rebass_1.Box, { flex: 1 }),
|
|
156
168
|
react_1.default.createElement(QueryPredicateButtons, Object.assign({}, props))));
|
|
@@ -80,7 +80,7 @@ const getFunctionsForColumnType = (dataType, availableBooleanFunctions) => {
|
|
|
80
80
|
const functionDef = booleanExpressionFunctions_1.booleanExpressionFunctions[boolFnName];
|
|
81
81
|
const inputs = functionDef.inputs;
|
|
82
82
|
let matchingInputTypes = [];
|
|
83
|
-
if (Array.isArray(inputs[0])) {
|
|
83
|
+
if (inputs && Array.isArray(inputs[0])) {
|
|
84
84
|
matchingInputTypes = inputs.find((input) => input[0] === columnType);
|
|
85
85
|
}
|
|
86
86
|
else {
|
|
@@ -32,6 +32,7 @@ function ExpressionEditor(props) {
|
|
|
32
32
|
const { type, module } = props;
|
|
33
33
|
const [data, setData] = (0, react_1.useState)(props.initialData);
|
|
34
34
|
const [showColumnIds, setShowColumnIds] = (0, react_1.useState)(false);
|
|
35
|
+
const [inlineQuery, setInlineQuery] = (0, react_1.useState)(false);
|
|
35
36
|
const [showNamedQueries, setShowNamedQueries] = (0, react_1.useState)(false);
|
|
36
37
|
const baseClassName = `ab-ExpressionEditor`;
|
|
37
38
|
const [selectedFunction, setSelectedFunction] = (0, react_1.useState)(null);
|
|
@@ -97,12 +98,8 @@ function ExpressionEditor(props) {
|
|
|
97
98
|
setData(updateColValue(data, column, new Date(e.target.value)));
|
|
98
99
|
}, style: { width: '100%' }, disabled: column.readOnly })) : column.dataType === 'Boolean' ? (React.createElement(CheckBox_1.CheckBox, { "data-name": "column-input", "data-value": column.columnId, checked: getColValue(column), onChange: (checked) => setData(updateColValue(data, column, checked)), disabled: column.readOnly })) : null))))));
|
|
99
100
|
const namedQueries = (React.createElement(rebass_1.Flex, { flexDirection: "column", alignItems: "start", style: { marginTop: 2 } },
|
|
100
|
-
React.createElement(CheckBox_1.CheckBox, { checked: showColumnIds, onChange: (checked) => setShowColumnIds(checked),
|
|
101
|
-
|
|
102
|
-
margin: 0,
|
|
103
|
-
paddingTop: 'var(--ab-space-1)',
|
|
104
|
-
paddingBottom: 'var(--ab-space-1)',
|
|
105
|
-
} }, 'Show Column IDs'),
|
|
101
|
+
React.createElement(CheckBox_1.CheckBox, { checked: showColumnIds, onChange: (checked) => setShowColumnIds(checked) }, "Show Column IDs"),
|
|
102
|
+
React.createElement(CheckBox_1.CheckBox, { checked: inlineQuery, onChange: (checked) => setInlineQuery(checked) }, "Inline Query"),
|
|
106
103
|
props.namedQueries.map((namedQuery) => (React.createElement(rebass_1.Flex, { key: namedQuery.Uuid, flexDirection: "column", alignItems: "start", style: {
|
|
107
104
|
padding: 3,
|
|
108
105
|
marginTop: 'var(--ab-space-2)',
|
|
@@ -113,7 +110,7 @@ function ExpressionEditor(props) {
|
|
|
113
110
|
React.createElement(EditorButton_1.default, { width: "100%", height: "100%", style: {
|
|
114
111
|
background: 'var(--ab-color-primary)',
|
|
115
112
|
cursor: 'grab',
|
|
116
|
-
}, data: `QUERY("${namedQuery.Name}")`, "data-name": "column", icon: "drag" },
|
|
113
|
+
}, data: inlineQuery ? namedQuery.BooleanExpression : `QUERY("${namedQuery.Name}")`, "data-name": "column", icon: "drag" },
|
|
117
114
|
React.createElement(rebass_1.Flex, { flexDirection: "column", alignItems: "start" }, namedQuery.Name)),
|
|
118
115
|
React.createElement(rebass_1.Flex, { alignItems: "start", style: {
|
|
119
116
|
padding: 5,
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
type InputGroupProps<T extends React.ComponentType<any>> = {
|
|
3
|
+
Component?: T;
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
} & React.ComponentProps<T>;
|
|
6
|
+
export declare const InputGroup: <T extends React.ComponentType<any>>({ Component, children, ...rest }: InputGroupProps<T>) => JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.InputGroup = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const React = tslib_1.__importStar(require("react"));
|
|
6
|
+
const InputGroup = (_a) => {
|
|
7
|
+
var _b;
|
|
8
|
+
var { Component = 'div', children } = _a, rest = tslib_1.__rest(_a, ["Component", "children"]);
|
|
9
|
+
const Comp = Component;
|
|
10
|
+
return (React.createElement(Comp, Object.assign({}, rest, { className: `ab-cmp-input-group ${(_b = rest.className) !== null && _b !== void 0 ? _b : ''}` }), children));
|
|
11
|
+
};
|
|
12
|
+
exports.InputGroup = InputGroup;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './InputGroup';
|
|
@@ -4,6 +4,7 @@ exports.getConstrainRect = exports.getConstrainElement = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const React = tslib_1.__importStar(require("react"));
|
|
6
6
|
const react_1 = require("react");
|
|
7
|
+
const debounce_1 = tslib_1.__importDefault(require("lodash/debounce"));
|
|
7
8
|
const batchUpdate_1 = tslib_1.__importDefault(require("../utils/batchUpdate"));
|
|
8
9
|
const selectParent_1 = tslib_1.__importDefault(require("../utils/selectParent"));
|
|
9
10
|
const useProperty_1 = tslib_1.__importDefault(require("../utils/useProperty"));
|
|
@@ -72,7 +73,11 @@ const OverlayTrigger = React.forwardRef((props, ref) => {
|
|
|
72
73
|
const overlayRef = (0, react_1.useRef)(null);
|
|
73
74
|
const [visible, doSetVisible] = (0, useProperty_1.default)(props, 'visible', false);
|
|
74
75
|
const hideTimeoutRef = (0, react_1.useRef)(null);
|
|
75
|
-
const setVisible = React.useCallback(
|
|
76
|
+
const setVisible = React.useCallback(
|
|
77
|
+
// visible state may quickly change from true -> false -> true
|
|
78
|
+
// when moving the mouse cursor from the trigger to the overlay
|
|
79
|
+
// for this case we debounce the visible change for a very small amount of time
|
|
80
|
+
(0, debounce_1.default)((visible) => {
|
|
76
81
|
onVisibleChange === null || onVisibleChange === void 0 ? void 0 : onVisibleChange(visible);
|
|
77
82
|
if (!visible) {
|
|
78
83
|
hideTimeoutRef.current = setTimeout(() => {
|
|
@@ -86,7 +91,7 @@ const OverlayTrigger = React.forwardRef((props, ref) => {
|
|
|
86
91
|
hideTimeoutRef.current = null;
|
|
87
92
|
}
|
|
88
93
|
doSetVisible(true);
|
|
89
|
-
}, []);
|
|
94
|
+
}, 50), []);
|
|
90
95
|
const prevVisible = (0, usePrevious_1.default)(visible, false);
|
|
91
96
|
ensurePortalElement();
|
|
92
97
|
const onShow = React.useCallback((event) => {
|
|
@@ -17,14 +17,13 @@ export type SelectProps<SelectValue extends unknown, IsMulti extends boolean = f
|
|
|
17
17
|
placeholder?: string;
|
|
18
18
|
'data-name'?: string;
|
|
19
19
|
'data-id'?: string;
|
|
20
|
-
|
|
20
|
+
renderSingleValue?: (option: SelectOption<SelectValue>) => React.ReactNode;
|
|
21
21
|
className?: string;
|
|
22
22
|
isLoding?: boolean;
|
|
23
23
|
onFocus?: () => void;
|
|
24
24
|
accessLevel?: AccessLevel;
|
|
25
25
|
style?: React.CSSProperties;
|
|
26
26
|
onInputChange?: (value: string) => void;
|
|
27
|
-
variant?: 'default' | 'raised';
|
|
28
27
|
size?: 'small' | 'normal';
|
|
29
28
|
isCreatable?: boolean;
|
|
30
29
|
};
|
|
@@ -6,6 +6,7 @@ const date_fns_1 = require("date-fns");
|
|
|
6
6
|
const React = tslib_1.__importStar(require("react"));
|
|
7
7
|
const react_select_1 = tslib_1.__importStar(require("react-select"));
|
|
8
8
|
const creatable_1 = tslib_1.__importDefault(require("react-select/creatable"));
|
|
9
|
+
const icons_1 = require("../icons");
|
|
9
10
|
const commonStyles = ({ isFocused, isDisabled, }) => {
|
|
10
11
|
return {
|
|
11
12
|
color: 'var(--ab-cmp-input__color)',
|
|
@@ -15,21 +16,40 @@ const commonStyles = ({ isFocused, isDisabled, }) => {
|
|
|
15
16
|
};
|
|
16
17
|
};
|
|
17
18
|
const Select = function (props) {
|
|
18
|
-
var _a, _b, _c, _d, _e;
|
|
19
|
-
|
|
19
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
20
|
+
const doesOptionMatchValue = function (option) {
|
|
20
21
|
if (typeof option.value === 'object' && option.value instanceof Date) {
|
|
21
22
|
return (0, date_fns_1.isSameDay)(option.value, props.value);
|
|
22
23
|
}
|
|
23
24
|
return option.value === props.value;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
25
|
+
};
|
|
26
|
+
let selectedOption = null;
|
|
27
|
+
if (props.isMulti) {
|
|
28
|
+
selectedOption =
|
|
29
|
+
(_b = ((_a = props.value) !== null && _a !== void 0 ? _a : []).map((value) => {
|
|
30
|
+
var _a;
|
|
31
|
+
// return (props.value as any[]).includes(option.value);
|
|
32
|
+
const option = ((_a = props.options) !== null && _a !== void 0 ? _a : []).find(doesOptionMatchValue);
|
|
33
|
+
if (!option) {
|
|
34
|
+
return {
|
|
35
|
+
value,
|
|
36
|
+
label: value,
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
return option;
|
|
40
|
+
})) !== null && _b !== void 0 ? _b : null;
|
|
30
41
|
}
|
|
31
|
-
|
|
32
|
-
|
|
42
|
+
else {
|
|
43
|
+
selectedOption = (_d = ((_c = props.options) !== null && _c !== void 0 ? _c : []).find(doesOptionMatchValue)) !== null && _d !== void 0 ? _d : null;
|
|
44
|
+
if (!selectedOption && props.value !== undefined && props.value !== null) {
|
|
45
|
+
selectedOption = {
|
|
46
|
+
value: props.value,
|
|
47
|
+
label: props.value,
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
let disabled = (_e = props.disabled) !== null && _e !== void 0 ? _e : false;
|
|
52
|
+
const accessLevel = (_f = props.accessLevel) !== null && _f !== void 0 ? _f : 'Full';
|
|
33
53
|
if (accessLevel === 'Hidden') {
|
|
34
54
|
return null;
|
|
35
55
|
}
|
|
@@ -52,7 +72,21 @@ const Select = function (props) {
|
|
|
52
72
|
};
|
|
53
73
|
}, []);
|
|
54
74
|
const SelectComponent = props.isCreatable ? creatable_1.default : react_select_1.default;
|
|
55
|
-
|
|
75
|
+
const ClearIndicator = React.useMemo(() => {
|
|
76
|
+
return (clearIndicatorProps) => {
|
|
77
|
+
return (React.createElement(react_select_1.components.ClearIndicator, Object.assign({}, clearIndicatorProps),
|
|
78
|
+
React.createElement(icons_1.Icon, { name: "close" })));
|
|
79
|
+
};
|
|
80
|
+
}, []);
|
|
81
|
+
const DropdownIndicator = React.useMemo(() => {
|
|
82
|
+
return (props) => {
|
|
83
|
+
return (React.createElement(react_select_1.components.DropdownIndicator, Object.assign({}, props),
|
|
84
|
+
React.createElement(icons_1.Icon, { name: "triangle-down", style: { height: 20, width: 20 } })));
|
|
85
|
+
};
|
|
86
|
+
}, []);
|
|
87
|
+
return (React.createElement(SelectComponent, { onInputChange: props.onInputChange, onFocus: props.onFocus, isLoading: props.isLoding, options: props.options, className: props.className, isDisabled: disabled, isMulti: props.isMulti, value: selectedOption, menuPosition: (_g = props.menuPosition) !== null && _g !== void 0 ? _g : 'absolute',
|
|
88
|
+
// This needed so the menu is not clipped by overflow: hidden
|
|
89
|
+
menuPortalTarget: document.body, isClearable: props.isClearable, onChange: (option) => {
|
|
56
90
|
if (props.isMulti) {
|
|
57
91
|
props.onChange(option.map((x) => x === null || x === void 0 ? void 0 : x.value));
|
|
58
92
|
}
|
|
@@ -63,10 +97,12 @@ const Select = function (props) {
|
|
|
63
97
|
SelectContainer,
|
|
64
98
|
ValueContainer,
|
|
65
99
|
SingleValue: (singleValueProps) => {
|
|
66
|
-
return (React.createElement(react_select_1.components.SingleValue, Object.assign({}, singleValueProps), props.
|
|
67
|
-
? props.
|
|
100
|
+
return (React.createElement(react_select_1.components.SingleValue, Object.assign({}, singleValueProps), props.renderSingleValue
|
|
101
|
+
? props.renderSingleValue(selectedOption)
|
|
68
102
|
: singleValueProps.children));
|
|
69
103
|
},
|
|
104
|
+
ClearIndicator,
|
|
105
|
+
DropdownIndicator,
|
|
70
106
|
},
|
|
71
107
|
/**
|
|
72
108
|
* Using styles is the preferred way to style react-select.
|
|
@@ -85,25 +121,25 @@ const Select = function (props) {
|
|
|
85
121
|
},
|
|
86
122
|
// @ts-ignore
|
|
87
123
|
menu: (baseStyle, state) => {
|
|
88
|
-
return Object.assign(Object.assign(Object.assign({}, baseStyle), { zIndex: 999999, boxShadow: 'var(--ab-cmp-
|
|
124
|
+
return Object.assign(Object.assign(Object.assign({}, baseStyle), { zIndex: 999999, boxShadow: 'var(--ab-cmp-select-menu__box-shadow)', minWidth: 160 }), commonStyles(state));
|
|
89
125
|
},
|
|
90
126
|
// @ts-ignore
|
|
91
127
|
option: (baseStyle, state) => {
|
|
92
128
|
const style = Object.assign(Object.assign(Object.assign({}, baseStyle), commonStyles(state)), { '&:active': {
|
|
93
|
-
background: 'var(--ab-cmp-
|
|
129
|
+
background: 'var(--ab-cmp-select-option-active__background)',
|
|
94
130
|
}, opacity: state.isDisabled ? 0.5 : 1 });
|
|
95
131
|
if (state.isSelected) {
|
|
96
|
-
style.background = 'var(--ab-cmp-
|
|
97
|
-
style.color = 'var(--ab-cmp-
|
|
132
|
+
style.background = 'var(--ab-cmp-select-option-active__background)';
|
|
133
|
+
style.color = 'var(--ab-cmp-select-option-active__color)';
|
|
98
134
|
}
|
|
99
135
|
if (state.isFocused) {
|
|
100
|
-
style.background = 'var(--ab-cmp-
|
|
136
|
+
style.background = 'var(--ab-cmp-select-option-focused__background)';
|
|
101
137
|
}
|
|
102
138
|
return style;
|
|
103
139
|
},
|
|
104
140
|
// @ts-ignore
|
|
105
141
|
input: (baseStyle, state) => {
|
|
106
|
-
return Object.assign(Object.assign({}, baseStyle), { padding: props.size === 'small' ? 0 : baseStyle.padding, color: 'var(--ab-cmp-
|
|
142
|
+
return Object.assign(Object.assign({}, baseStyle), { padding: props.size === 'small' ? 0 : baseStyle.padding, color: 'var(--ab-cmp-select__color)' });
|
|
107
143
|
},
|
|
108
144
|
valueContainer: (baseStyle) => {
|
|
109
145
|
return Object.assign(Object.assign({}, baseStyle), { padding: props.size === 'small' ? `0 var(--ab-space-1)` : baseStyle.padding });
|
|
@@ -117,10 +153,8 @@ const Select = function (props) {
|
|
|
117
153
|
state;
|
|
118
154
|
return Object.assign(Object.assign(Object.assign({}, baseStyle), commonStyles(state)), {
|
|
119
155
|
// height: 30,
|
|
120
|
-
minHeight: props.size === 'small' ? 0 : 32, boxShadow: state.isFocused ? 'var(--ab-
|
|
121
|
-
|
|
122
|
-
: 'var(--ab-cmp-input__border)', '&:hover': {
|
|
123
|
-
border: 'var(--ab-cmp-input__border)',
|
|
156
|
+
minHeight: props.size === 'small' ? 0 : 32, boxShadow: state.isFocused ? 'var(--ab-cmp-select-focused__box-shadow)' : 'none', outline: state.isFocused ? 'var(--ab-cmp-select-focused__outline)' : 'none', border: 'var(--ab-cmp-select__border)', borderRadius: 'var(--ab-cmp-select__border-radius)', '&:hover': {
|
|
157
|
+
border: 'var(--ab-cmp-select__border)',
|
|
124
158
|
} });
|
|
125
159
|
},
|
|
126
160
|
// @ts-ignore
|
|
@@ -131,6 +165,12 @@ const Select = function (props) {
|
|
|
131
165
|
clearIndicator: (baseStyle) => {
|
|
132
166
|
return Object.assign(Object.assign({}, baseStyle), { padding: '2px 3px' });
|
|
133
167
|
},
|
|
168
|
+
multiValue: (baseStyle) => {
|
|
169
|
+
return Object.assign(Object.assign({}, baseStyle), { color: 'var(--ab-cmp-select__color)', background: 'var(--ab-cmp-select-multi-value__background)', border: 'var(--ab-cmp-select__border)' });
|
|
170
|
+
},
|
|
171
|
+
multiValueLabel: (baseStyle) => {
|
|
172
|
+
return Object.assign(Object.assign({}, baseStyle), { color: 'var(--ab-cmp-select__color)' });
|
|
173
|
+
},
|
|
134
174
|
} }));
|
|
135
175
|
};
|
|
136
176
|
exports.Select = Select;
|
|
@@ -2,16 +2,25 @@ import * as React from 'react';
|
|
|
2
2
|
import { BoxProps } from 'rebass';
|
|
3
3
|
import { HTMLProps } from 'react';
|
|
4
4
|
export declare const baseClassName = "ab-Textarea";
|
|
5
|
+
/**
|
|
6
|
+
* Autoheight strategy:
|
|
7
|
+
* - save initial height
|
|
8
|
+
* - when focused, expand to fit content - max x px
|
|
9
|
+
* - when blurred, shrink to initial height
|
|
10
|
+
* - when typing, expand to fit content - max x px
|
|
11
|
+
*/
|
|
5
12
|
export type TextareaProps = Omit<HTMLProps<HTMLTextAreaElement>, 'ref'> & {
|
|
6
13
|
placehoder?: string;
|
|
7
14
|
type?: string;
|
|
8
15
|
disabled?: boolean;
|
|
9
16
|
value?: string;
|
|
17
|
+
autoResizeOnFocus?: boolean;
|
|
10
18
|
} & Omit<BoxProps, 'ref'>;
|
|
11
19
|
declare const Textarea: React.ForwardRefExoticComponent<Omit<React.HTMLProps<HTMLTextAreaElement>, "ref"> & {
|
|
12
20
|
placehoder?: string;
|
|
13
21
|
type?: string;
|
|
14
22
|
disabled?: boolean;
|
|
15
23
|
value?: string;
|
|
24
|
+
autoResizeOnFocus?: boolean;
|
|
16
25
|
} & Omit<BoxProps, "ref"> & React.RefAttributes<HTMLDivElement | HTMLInputElement | HTMLTextAreaElement>>;
|
|
17
26
|
export default Textarea;
|
|
@@ -7,7 +7,9 @@ const rebass_1 = require("rebass");
|
|
|
7
7
|
const join_1 = tslib_1.__importDefault(require("../utils/join"));
|
|
8
8
|
exports.baseClassName = 'ab-Textarea';
|
|
9
9
|
const Textarea = React.forwardRef((props, ref) => {
|
|
10
|
-
|
|
10
|
+
const internalRef = React.useRef(null);
|
|
11
|
+
let { disabled, autoResizeOnFocus, className } = props, textareaProps = tslib_1.__rest(props, ["disabled", "autoResizeOnFocus", "className"]);
|
|
12
|
+
const initialHeight = React.useRef(null);
|
|
11
13
|
let type = 'text';
|
|
12
14
|
if (textareaProps && textareaProps.type) {
|
|
13
15
|
type = textareaProps.type;
|
|
@@ -15,6 +17,52 @@ const Textarea = React.forwardRef((props, ref) => {
|
|
|
15
17
|
if (type === 'string') {
|
|
16
18
|
type = 'text';
|
|
17
19
|
}
|
|
18
|
-
|
|
20
|
+
const expandToFitContent = () => {
|
|
21
|
+
if (autoResizeOnFocus && initialHeight.current !== null && internalRef.current) {
|
|
22
|
+
internalRef.current.style.height = `0px`; // makes sure it shrinks when needed
|
|
23
|
+
const height = internalRef.current.scrollHeight;
|
|
24
|
+
internalRef.current.style.height = `${height}px`;
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
const shrinkToInitialHeight = () => {
|
|
28
|
+
if (autoResizeOnFocus) {
|
|
29
|
+
internalRef.current.style.height = `${initialHeight.current}px`;
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
return (React.createElement(rebass_1.Box, Object.assign({}, textareaProps, { onFocus: (e) => {
|
|
33
|
+
var _a;
|
|
34
|
+
expandToFitContent();
|
|
35
|
+
(_a = props.onFocus) === null || _a === void 0 ? void 0 : _a.call(props, e);
|
|
36
|
+
if (internalRef.current && initialHeight.current === null) {
|
|
37
|
+
const height = internalRef.current.getBoundingClientRect().height;
|
|
38
|
+
initialHeight.current = height;
|
|
39
|
+
}
|
|
40
|
+
}, onBlur: (e) => {
|
|
41
|
+
var _a;
|
|
42
|
+
shrinkToInitialHeight();
|
|
43
|
+
(_a = props.onBlur) === null || _a === void 0 ? void 0 : _a.call(props, e);
|
|
44
|
+
}, ref: (elRef) => {
|
|
45
|
+
// SAVE INITIAL HEIGHT
|
|
46
|
+
// if (elRef && initialHeight.current === null) {
|
|
47
|
+
// const height = elRef.getBoundingClientRect().height;
|
|
48
|
+
// initialHeight.current = isNaN(height) ? 'auto' : height;
|
|
49
|
+
// }
|
|
50
|
+
// SAVE REF
|
|
51
|
+
if (internalRef) {
|
|
52
|
+
internalRef.current = elRef;
|
|
53
|
+
}
|
|
54
|
+
// CALL EXTERNAL REF
|
|
55
|
+
if (ref) {
|
|
56
|
+
if (typeof ref === 'function') {
|
|
57
|
+
ref(elRef);
|
|
58
|
+
}
|
|
59
|
+
else {
|
|
60
|
+
ref.current = elRef;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}, onChange: (e) => {
|
|
64
|
+
expandToFitContent();
|
|
65
|
+
props.onChange && props.onChange(e);
|
|
66
|
+
}, as: "textarea", type: type, disabled: disabled, className: (0, join_1.default)(className, exports.baseClassName, disabled ? `${exports.baseClassName}--disabled` : ''), spellCheck: false })));
|
|
19
67
|
});
|
|
20
68
|
exports.default = Textarea;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { toast, ToastContainer, Slide, Zoom, Bounce, Flip
|
|
2
|
-
import { ToastOptions } from '
|
|
1
|
+
export { toast, ToastContainer, Slide, Zoom, Bounce, Flip } from 'react-toastify';
|
|
2
|
+
import { ToastOptions } from 'react-toastify';
|
|
3
3
|
export type { ToastOptions };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Flip = exports.Bounce = exports.Zoom = exports.Slide = exports.ToastContainer = exports.toast = void 0;
|
|
4
|
-
var react_toastify_1 = require("
|
|
4
|
+
var react_toastify_1 = require("react-toastify");
|
|
5
5
|
Object.defineProperty(exports, "toast", { enumerable: true, get: function () { return react_toastify_1.toast; } });
|
|
6
6
|
Object.defineProperty(exports, "ToastContainer", { enumerable: true, get: function () { return react_toastify_1.ToastContainer; } });
|
|
7
7
|
Object.defineProperty(exports, "Slide", { enumerable: true, get: function () { return react_toastify_1.Slide; } });
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const React = tslib_1.__importStar(require("react"));
|
|
5
|
+
const DefaultIcon_1 = tslib_1.__importDefault(require("./DefaultIcon"));
|
|
6
|
+
exports.default = (props) => (React.createElement(DefaultIcon_1.default, Object.assign({}, props, { viewBox: "0 -960 960 960" }),
|
|
7
|
+
React.createElement("path", { d: "M280-240q-17 0-28.5-11.5T240-280v-80h520v-360h80q17 0 28.5 11.5T880-680v600L720-240H280ZM80-280v-560q0-17 11.5-28.5T120-880h520q17 0 28.5 11.5T680-840v360q0 17-11.5 28.5T640-440H240L80-280Zm520-240v-280H160v280h440Zm-440 0v-280 280Z" })));
|
|
@@ -157,6 +157,7 @@ const money_1 = tslib_1.__importDefault(require("./money"));
|
|
|
157
157
|
const order_1 = tslib_1.__importDefault(require("./order"));
|
|
158
158
|
const contact_1 = tslib_1.__importDefault(require("./contact"));
|
|
159
159
|
const note_1 = tslib_1.__importDefault(require("./note"));
|
|
160
|
+
const comments_1 = tslib_1.__importDefault(require("./comments"));
|
|
160
161
|
const Icon_1 = require("../Icon");
|
|
161
162
|
const AdaptableLogger_1 = require("../../agGrid/AdaptableLogger");
|
|
162
163
|
exports.allIcons = {
|
|
@@ -193,7 +194,7 @@ exports.allIcons = {
|
|
|
193
194
|
'horizontal-lines': freetext_column_1.default,
|
|
194
195
|
'percent-tag': percent_bar_1.default,
|
|
195
196
|
'spark-line': spark_line_1.default,
|
|
196
|
-
|
|
197
|
+
resume: resume_1.default,
|
|
197
198
|
'pie-chart': pie_chart_1.default,
|
|
198
199
|
'add-circle': plus_minus_1.default,
|
|
199
200
|
reminder: reminder_1.default,
|
|
@@ -314,6 +315,7 @@ exports.allIcons = {
|
|
|
314
315
|
order: order_1.default,
|
|
315
316
|
contact: contact_1.default,
|
|
316
317
|
note: note_1.default,
|
|
318
|
+
comments: comments_1.default,
|
|
317
319
|
};
|
|
318
320
|
Object.keys(exports.allIcons).forEach((name) => {
|
|
319
321
|
const ReactCmp = exports.allIcons[name];
|
package/src/env.d.ts
CHANGED
package/src/env.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.default = {
|
|
4
|
-
INFINITE_TABLE_LICENSE_KEY: "StartDate=2021-06-29|EndDate=2030-01-01|Owner=Adaptable|Type=distribution|TS=1624971462479|C=137829811,1004007071,2756196225,1839832928,3994409405,636616862",
|
|
4
|
+
INFINITE_TABLE_LICENSE_KEY: "StartDate=2021-06-29|EndDate=2030-01-01|Owner=Adaptable|Type=distribution|TS=1624971462479|C=137829811,1004007071,2756196225,1839832928,3994409405,636616862" || '',
|
|
5
|
+
PUBLISH_TIMESTAMP: 1707923772524 || Date.now(),
|
|
6
|
+
VERSION: "18.0.0-canary.1" || '--current-version--',
|
|
5
7
|
};
|