@adaptabletools/adaptable 13.0.10 → 13.1.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.
Files changed (98) hide show
  1. package/base.css +92 -0
  2. package/base.css.map +1 -1
  3. package/bundle.cjs.js +179 -177
  4. package/index.css +107 -0
  5. package/index.css.map +1 -1
  6. package/package.json +2 -2
  7. package/publishTimestamp.d.ts +1 -1
  8. package/publishTimestamp.js +1 -1
  9. package/src/AdaptableInterfaces/IAdaptable.d.ts +5 -2
  10. package/src/AdaptableOptions/ActionOptions.d.ts +52 -34
  11. package/src/AdaptableOptions/AdaptableOptions.d.ts +5 -0
  12. package/src/AdaptableOptions/ChartingOptions.d.ts +27 -0
  13. package/src/AdaptableOptions/ChartingOptions.js +2 -0
  14. package/src/AdaptableOptions/FinancePluginOptions.d.ts +2 -2
  15. package/src/AdaptableOptions/LayoutOptions.d.ts +1 -2
  16. package/src/AdaptableOptions/UserInterfaceOptions.d.ts +1 -1
  17. package/src/Api/ChartingApi.d.ts +38 -1
  18. package/src/Api/ColumnApi.d.ts +1 -2
  19. package/src/Api/Implementation/AlertApiImpl.js +4 -0
  20. package/src/Api/Implementation/ChartingApiImpl.d.ts +9 -1
  21. package/src/Api/Implementation/ChartingApiImpl.js +35 -6
  22. package/src/Api/Implementation/GridApiImpl.js +3 -2
  23. package/src/PredefinedConfig/AlertState.d.ts +7 -3
  24. package/src/PredefinedConfig/ChartingState.d.ts +13 -4
  25. package/src/PredefinedConfig/Common/AdaptableIcon.d.ts +1 -1
  26. package/src/PredefinedConfig/Common/AdaptableStyle.d.ts +6 -6
  27. package/src/PredefinedConfig/Common/Types.d.ts +4 -4
  28. package/src/PredefinedConfig/Common/Types.js +3 -0
  29. package/src/PredefinedConfig/PredefinedConfig.d.ts +1 -2
  30. package/src/PredefinedConfig/SystemState.d.ts +9 -0
  31. package/src/Redux/ActionsReducers/ChartingRedux.d.ts +28 -5
  32. package/src/Redux/ActionsReducers/ChartingRedux.js +45 -5
  33. package/src/Redux/ActionsReducers/SystemRedux.d.ts +7 -0
  34. package/src/Redux/ActionsReducers/SystemRedux.js +22 -4
  35. package/src/Strategy/ChartingModule.d.ts +7 -1
  36. package/src/Strategy/ChartingModule.js +97 -0
  37. package/src/Strategy/FlashingCellModule.js +6 -2
  38. package/src/Strategy/Interface/IModule.d.ts +1 -0
  39. package/src/Strategy/LayoutModule.js +1 -1
  40. package/src/Strategy/StyledColumnModule.js +0 -3
  41. package/src/Utilities/Defaults/DefaultAdaptableOptions.js +15 -10
  42. package/src/Utilities/Defaults/DefaultSettingsPanel.js +1 -0
  43. package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +1 -1
  44. package/src/Utilities/Helpers/AdaptableHelper.js +4 -1
  45. package/src/Utilities/ObjectFactory.d.ts +5 -4
  46. package/src/Utilities/ObjectFactory.js +9 -14
  47. package/src/Utilities/Services/ChartingService.d.ts +10 -0
  48. package/src/Utilities/Services/ChartingService.js +100 -0
  49. package/src/Utilities/Services/Interface/IChartingService.d.ts +5 -0
  50. package/src/Utilities/Services/Interface/IChartingService.js +2 -0
  51. package/src/Utilities/Services/Interface/IRowEditService.d.ts +3 -3
  52. package/src/Utilities/Services/ModuleService.js +2 -0
  53. package/src/Utilities/Services/RowEditService.d.ts +3 -3
  54. package/src/Utilities/Services/RowEditService.js +4 -4
  55. package/src/View/AdaptableViewFactory.js +2 -0
  56. package/src/View/Alert/Wizard/AlertButtonsEditor.js +1 -1
  57. package/src/View/Components/AdaptableObjectList/AdaptableObjectList.js +5 -5
  58. package/src/View/Components/Charting/ChartingStatusBarPopover.d.ts +2 -0
  59. package/src/View/Components/Charting/ChartingStatusBarPopover.js +23 -0
  60. package/src/View/Components/Charting/ChartingViewPanel.d.ts +3 -0
  61. package/src/View/Components/Charting/ChartingViewPanel.js +79 -0
  62. package/src/View/Components/Charting/ChartingWizard/ChartingWizard.d.ts +6 -0
  63. package/src/View/Components/Charting/ChartingWizard/ChartingWizard.js +37 -0
  64. package/src/View/Components/Charting/ChartingWizard/PreviewChartSection.d.ts +6 -0
  65. package/src/View/Components/Charting/ChartingWizard/PreviewChartSection.js +34 -0
  66. package/src/View/Components/Charting/ChartingWizard/SettingsSection.d.ts +8 -0
  67. package/src/View/Components/Charting/ChartingWizard/SettingsSection.js +53 -0
  68. package/src/View/Components/Charting/ShowChartButton.d.ts +5 -0
  69. package/src/View/Components/Charting/ShowChartButton.js +38 -0
  70. package/src/View/Components/Charting/useChartState.d.ts +9 -0
  71. package/src/View/Components/Charting/useChartState.js +71 -0
  72. package/src/View/Components/ExpressionWizard.js +1 -1
  73. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupModuleView.js +8 -7
  74. package/src/View/Components/Popups/AdaptableToaster.js +2 -0
  75. package/src/View/Components/RangesComponent.js +1 -1
  76. package/src/View/Components/StyleComponent.d.ts +1 -0
  77. package/src/View/Components/StyleComponent.js +6 -6
  78. package/src/View/Components/ToolPanel/ToolPanelPopup.js +0 -1
  79. package/src/View/Layout/Wizard/LayoutWizard.js +1 -2
  80. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection.js +1 -1
  81. package/src/agGrid/Adaptable.d.ts +8 -4
  82. package/src/agGrid/Adaptable.js +47 -12
  83. package/src/agGrid/agGridHelper.js +0 -1
  84. package/src/{View → components/ColorPicker}/ColorPicker.d.ts +3 -2
  85. package/src/{View → components/ColorPicker}/ColorPicker.js +19 -6
  86. package/src/components/ColorPicker/index.d.ts +1 -0
  87. package/src/components/ColorPicker/index.js +4 -0
  88. package/src/components/ExpressionEditor/BaseEditorInput.js +1 -1
  89. package/src/components/icons/index.js +0 -2
  90. package/src/metamodel/adaptable.metamodel.d.ts +70 -16
  91. package/src/metamodel/adaptable.metamodel.js +1 -1
  92. package/src/types.d.ts +3 -2
  93. package/version.d.ts +1 -1
  94. package/version.js +1 -1
  95. package/src/Strategy/ConditionalStyleModule.d.ts +0 -6
  96. package/src/Strategy/ConditionalStyleModule.js +0 -12
  97. package/src/components/icons/conditional-style.d.ts +0 -3
  98. package/src/components/icons/conditional-style.js +0 -7
@@ -63,6 +63,7 @@ const RowEditService_1 = require("../Utilities/Services/RowEditService");
63
63
  const weightedAverage_1 = require("./weightedAverage");
64
64
  const AggregationColumns_1 = require("../PredefinedConfig/Common/AggregationColumns");
65
65
  const renderReactRoot_1 = require("../renderReactRoot");
66
+ const ChartingService_1 = require("../Utilities/Services/ChartingService");
66
67
  const tinycolor = require('tinycolor2');
67
68
  const GROUP_PATH_SEPARATOR = '/';
68
69
  // IMPORTANT - we need colId to be set in order for safeSetColDefs to work correctly
@@ -423,6 +424,7 @@ class Adaptable {
423
424
  this.initStore();
424
425
  // create the services
425
426
  this.LicenseService = this.initLicenseService();
427
+ this.ChartingService = new ChartingService_1.ChartingService(this.api);
426
428
  this.ValidationService = new ValidationService_1.ValidationService(this.api);
427
429
  this.ReportService = new ReportService_1.ReportService(this.api);
428
430
  this.ModuleService = new ModuleService_1.ModuleService(this.api);
@@ -1920,11 +1922,11 @@ class Adaptable {
1920
1922
  const pkValue = this.getPrimaryKeyValueFromRowNode(rowNode);
1921
1923
  const rawValue = this.getRawValueFromRowNode(rowNode, columnId);
1922
1924
  const displayValue = this.getDisplayValueFromRawValue(rowNode, columnId, rawValue);
1923
- const normalisedvalue = this.getNormalisedValueFromRowValue(rawValue, abColumn);
1925
+ const normalisedValue = this.getNormalisedValueFromRawValue(rawValue, abColumn);
1924
1926
  return {
1925
1927
  rawValue: rawValue,
1926
1928
  displayValue: displayValue,
1927
- normalisedValue: normalisedvalue,
1929
+ normalisedValue: normalisedValue,
1928
1930
  column: abColumn,
1929
1931
  primaryKeyValue: pkValue,
1930
1932
  rowNode: rowNode,
@@ -1985,7 +1987,7 @@ class Adaptable {
1985
1987
  };
1986
1988
  return formatterFn(params);
1987
1989
  }
1988
- getNormalisedValueFromRowValue(rawValue, column) {
1990
+ getNormalisedValueFromRawValue(rawValue, column) {
1989
1991
  if (!column) {
1990
1992
  return rawValue;
1991
1993
  }
@@ -2306,7 +2308,7 @@ class Adaptable {
2306
2308
  adaptableApi: context.adaptableApi,
2307
2309
  };
2308
2310
  this.api.eventApi.emit('ActionRowSubmitted', eventInfo);
2309
- (_b = (_a = this.adaptableOptions.actionOptions.actionRowFormOptions).onFormSubmit) === null || _b === void 0 ? void 0 : _b.call(_a, eventInfo);
2311
+ (_b = (_a = this.adaptableOptions.actionOptions.actionRowButtonOptions.actionRowFormOptions).onFormSubmit) === null || _b === void 0 ? void 0 : _b.call(_a, eventInfo);
2310
2312
  },
2311
2313
  },
2312
2314
  };
@@ -2318,7 +2320,7 @@ class Adaptable {
2318
2320
  // should NOT happen unless the user sent some invalid button type in the predefined config
2319
2321
  return;
2320
2322
  }
2321
- const customButtonConfig = (_b = (_a = this.adaptableOptions.actionOptions).actionRowButtonCustomConfiguration) === null || _b === void 0 ? void 0 : _b.call(_a, {
2323
+ const customButtonConfig = (_b = (_a = this.adaptableOptions.actionOptions.actionRowButtonOptions).customConfiguration) === null || _b === void 0 ? void 0 : _b.call(_a, {
2322
2324
  adaptableApi: this.api,
2323
2325
  actionRowButtonType,
2324
2326
  });
@@ -2349,7 +2351,7 @@ class Adaptable {
2349
2351
  filter: false,
2350
2352
  sortable: false,
2351
2353
  enableRowGroup: false,
2352
- pinned: this.adaptableOptions.actionOptions.actionRowButtonsPosition === 'pinnedRight'
2354
+ pinned: this.adaptableOptions.actionOptions.actionRowButtonOptions.position === 'pinnedRight'
2353
2355
  ? 'right'
2354
2356
  : 'left',
2355
2357
  cellRenderer: this.variant === 'react' ? ActionColumnRenderer_1.ReactActionColumnRenderer : ActionColumnRenderer_1.ActionColumnRenderer,
@@ -2920,6 +2922,23 @@ class Adaptable {
2920
2922
  }
2921
2923
  }
2922
2924
  }));
2925
+ const eventsThatTriggerChartingChanges = [
2926
+ core_1.Events.EVENT_CHART_CREATED,
2927
+ /** Chart Range selection has changed */
2928
+ core_1.Events.EVENT_CHART_RANGE_SELECTION_CHANGED,
2929
+ /** Chart Options have changed */
2930
+ core_1.Events.EVENT_CHART_OPTIONS_CHANGED,
2931
+ /** Chart was destroyed */
2932
+ core_1.Events.EVENT_CHART_DESTROYED,
2933
+ ];
2934
+ const chartingModule = this.ModuleService.getModuleById('Charting');
2935
+ if (chartingModule.isModuleAvailable()) {
2936
+ this.gridOptions.api.addGlobalListener((type, params) => {
2937
+ if (ArrayExtensions_1.ArrayExtensions.ContainsItem(eventsThatTriggerChartingChanges, type)) {
2938
+ this.ChartingService.onChartModelChange(this.getChartModels(), type, params);
2939
+ }
2940
+ });
2941
+ }
2923
2942
  /**
2924
2943
  * Row and Cell listeners created in 2020
2925
2944
  * These have supplanted many of the events we previously had and simplified things
@@ -3685,7 +3704,7 @@ class Adaptable {
3685
3704
  this.resetMinMaxCachedValueForColumn(cellDataChangedInfo.column);
3686
3705
  });
3687
3706
  // if node is visible then check if need to refresh other columns / whole row if the updating column is:
3688
- // 1. referenced in Conditional Styles that have Expressions (refreshing whole row if Scope is All)
3707
+ // 1. referenced in Format Column Styles that have Expressions (refreshing whole row if Scope is All)
3689
3708
  // 2. referenced in Format Column styles that use Column Comparisons (which might also be calculated columns)
3690
3709
  if (this.isVisibleNode(firstInfo.rowNode)) {
3691
3710
  let dataChangedScope = {
@@ -4476,6 +4495,7 @@ import "@adaptabletools/adaptable/themes/${themeName}.css"`);
4476
4495
  const cellParams = {
4477
4496
  colDef,
4478
4497
  node,
4498
+ column,
4479
4499
  data: node.data,
4480
4500
  value: this.getRawValueFromRowNode(node, column.getId()),
4481
4501
  rowIndex,
@@ -4500,7 +4520,7 @@ import "@adaptabletools/adaptable/themes/${themeName}.css"`);
4500
4520
  if (userDefinedExcelStyle) {
4501
4521
  excelStyles.push(userDefinedExcelStyle);
4502
4522
  }
4503
- // add adaptable derived styles (format column, conditional style etc.)
4523
+ // add adaptable derived styles (format column etc.)
4504
4524
  const adaptableStyle = Object.assign(Object.assign({}, rowStyle), Object.keys(cellStyle).reduce((result, key) => {
4505
4525
  if (cellStyle[key] !== null) {
4506
4526
  result[key] = cellStyle[key];
@@ -4671,12 +4691,27 @@ import "@adaptabletools/adaptable/themes/${themeName}.css"`);
4671
4691
  publishedAt: publishTimestamp_1.default,
4672
4692
  });
4673
4693
  }
4674
- showCharts(charts) {
4694
+ showCharts(chartsDefinitions, chartContainer) {
4695
+ return chartsDefinitions.map((chartDefinition) => this.showChart(chartDefinition, chartContainer));
4696
+ }
4697
+ showChart(chartDefinition, container) {
4675
4698
  if (!this.gridOptions.api) {
4676
- (0, LoggingHelper_1.ConsoleLogError)('Adaptable must be instantiated before calling showCharts');
4677
- return [];
4699
+ (0, LoggingHelper_1.ConsoleLogError)('Adaptable must be instantiated before calling showChart');
4700
+ return null;
4678
4701
  }
4679
- return charts.map((chart) => this.gridOptions.api.restoreChart(chart));
4702
+ /**
4703
+ * Ag-grid always creates new charts behind the sences.
4704
+ * So we need to update the model inside adaptable state.
4705
+ * This is important to be done as soon as possible so it is not considered new.
4706
+ */
4707
+ const chartRef = this.gridOptions.api.restoreChart(chartDefinition.Model, container);
4708
+ const chartModel = this.getChartModels().find((chartModel) => chartModel.chartId === chartRef.chartId);
4709
+ // Update the definition in state so it is not considered new
4710
+ this.api.chartingApi.editChartDefinition(Object.assign(Object.assign({}, chartDefinition), { Model: chartModel }));
4711
+ return chartRef;
4712
+ }
4713
+ getChartRef(chartId) {
4714
+ return this.gridOptions.api.getChartRef(chartId);
4680
4715
  }
4681
4716
  getChartModels() {
4682
4717
  if (!this.gridOptions.api) {
@@ -80,7 +80,6 @@ class agGridHelper {
80
80
  modules.set(ModuleConstants.BulkUpdateModuleId, new BulkUpdateModule_1.BulkUpdateModule(api));
81
81
  modules.set(ModuleConstants.CalculatedColumnModuleId, new CalculatedColumnModule_1.CalculatedColumnModule(api));
82
82
  modules.set(ModuleConstants.CellSummaryModuleId, new CellSummaryModule_1.CellSummaryModule(api));
83
- // modules.set(ModuleConstants.ConditionalStyleModuleId, new ConditionalStyleModule(api));
84
83
  modules.set(ModuleConstants.CustomSortModuleId, new CustomSortModule_1.CustomSortModule(api));
85
84
  modules.set(ModuleConstants.DataChangeHistoryModuleId, new DataChangeHistoryModule_1.DataChangeHistoryModule(api));
86
85
  modules.set(ModuleConstants.DataSetModuleId, new DataSetModule_1.DataSetModule(api));
@@ -1,10 +1,11 @@
1
1
  import * as React from 'react';
2
2
  import { HTMLProps } from 'react';
3
3
  import { BoxProps } from 'rebass';
4
- import { AdaptableApi } from '../Api/AdaptableApi';
4
+ import { AdaptableApi } from '../../Api/AdaptableApi';
5
5
  export declare type ColorPickerProps = Omit<HTMLProps<HTMLInputElement>, 'onChange'> & {
6
6
  api: AdaptableApi;
7
7
  onChange: (color: string) => void;
8
8
  value: string;
9
+ includeAlpha?: boolean;
9
10
  } & Omit<BoxProps, 'onChange'>;
10
- export declare const ColorPicker: React.ForwardRefExoticComponent<Pick<ColorPickerProps, "max" | "required" | "type" | "data" | "default" | "high" | "low" | "key" | "id" | "media" | "height" | "width" | "start" | "open" | "name" | "alignContent" | "alignItems" | "alignSelf" | "backgroundColor" | "color" | "content" | "display" | "flex" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "justifyContent" | "justifyItems" | "justifySelf" | "letterSpacing" | "lineHeight" | "margin" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "opacity" | "order" | "overflow" | "overflowX" | "overflowY" | "padding" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingTop" | "textAlign" | "translate" | "verticalAlign" | "value" | "hidden" | "cite" | "dir" | "form" | "label" | "p" | "slot" | "span" | "style" | "summary" | "title" | "pattern" | "acceptCharset" | "action" | "method" | "noValidate" | "target" | "accessKey" | "draggable" | "lang" | "className" | "prefix" | "children" | "contentEditable" | "inputMode" | "nonce" | "tabIndex" | "async" | "disabled" | "multiple" | "size" | "manifest" | "m" | "wrap" | "accept" | "allowFullScreen" | "allowTransparency" | "alt" | "as" | "autoComplete" | "autoFocus" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "classID" | "cols" | "colSpan" | "controls" | "coords" | "crossOrigin" | "dateTime" | "defer" | "download" | "encType" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "headers" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "list" | "loop" | "marginHeight" | "marginWidth" | "maxLength" | "mediaGroup" | "min" | "minLength" | "muted" | "optimum" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "contextMenu" | "placeholder" | "spellCheck" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "selected" | "shape" | "sizes" | "src" | "srcDoc" | "srcLang" | "srcSet" | "step" | "useMap" | "wmode" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "api" | "bg" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "css" | "variant" | "tx" | "sx"> & React.RefAttributes<unknown>>;
11
+ export declare const ColorPicker: React.ForwardRefExoticComponent<Pick<ColorPickerProps, "max" | "required" | "type" | "data" | "default" | "high" | "low" | "key" | "id" | "media" | "height" | "width" | "start" | "open" | "name" | "alignContent" | "alignItems" | "alignSelf" | "backgroundColor" | "color" | "content" | "display" | "flex" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "justifyContent" | "justifyItems" | "justifySelf" | "letterSpacing" | "lineHeight" | "margin" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "opacity" | "order" | "overflow" | "overflowX" | "overflowY" | "padding" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingTop" | "textAlign" | "translate" | "verticalAlign" | "value" | "hidden" | "cite" | "dir" | "form" | "label" | "p" | "slot" | "span" | "style" | "summary" | "title" | "pattern" | "acceptCharset" | "action" | "method" | "noValidate" | "target" | "accessKey" | "draggable" | "lang" | "className" | "prefix" | "children" | "contentEditable" | "inputMode" | "nonce" | "tabIndex" | "async" | "disabled" | "multiple" | "size" | "manifest" | "m" | "wrap" | "accept" | "allowFullScreen" | "allowTransparency" | "alt" | "as" | "autoComplete" | "autoFocus" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "classID" | "cols" | "colSpan" | "controls" | "coords" | "crossOrigin" | "dateTime" | "defer" | "download" | "encType" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "headers" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "list" | "loop" | "marginHeight" | "marginWidth" | "maxLength" | "mediaGroup" | "min" | "minLength" | "muted" | "optimum" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "contextMenu" | "placeholder" | "spellCheck" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "selected" | "shape" | "sizes" | "src" | "srcDoc" | "srcLang" | "srcSet" | "step" | "useMap" | "wmode" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "api" | "bg" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "css" | "variant" | "tx" | "sx" | "includeAlpha"> & React.RefAttributes<unknown>>;
@@ -3,12 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ColorPicker = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const React = tslib_1.__importStar(require("react"));
6
- const Input_1 = tslib_1.__importDefault(require("../components/Input"));
7
- const StyleHelper_1 = require("../Utilities/Helpers/StyleHelper");
6
+ const rebass_1 = require("rebass");
7
+ const Input_1 = tslib_1.__importDefault(require("../Input"));
8
+ const StyleHelper_1 = require("../../Utilities/Helpers/StyleHelper");
8
9
  const tinycolor = require('tinycolor2');
9
10
  exports.ColorPicker = React.forwardRef((props, ref) => {
10
11
  const ColorPalette = props.api.userInterfaceApi.getColorPalette();
11
- let { api, value } = props, restProps = tslib_1.__rest(props, ["api", "value"]);
12
+ let { api, value, includeAlpha = true } = props, restProps = tslib_1.__rest(props, ["api", "value", "includeAlpha"]);
12
13
  const optionsMap = ColorPalette.reduce((acc, colorItem) => (Object.assign(Object.assign({}, acc), { [(0, StyleHelper_1.getVariableColor)(colorItem)]: colorItem })), {});
13
14
  const ABcolorChoicesOptions = Object.keys(optionsMap).map((x) => {
14
15
  return (React.createElement("option", { key: x, value: x }, x));
@@ -18,8 +19,14 @@ exports.ColorPicker = React.forwardRef((props, ref) => {
18
19
  const color = (0, StyleHelper_1.getVariableColor)(value);
19
20
  return tinycolor(color).toHexString();
20
21
  }, [value]);
21
- return (React.createElement("div", { className: 'ColorPicker' },
22
- React.createElement(Input_1.default, Object.assign({}, restProps, { onChange: (event) => {
22
+ const preparedAlphaColor = React.useMemo(() => {
23
+ const color = (0, StyleHelper_1.getVariableColor)(value);
24
+ return [tinycolor(color).setAlpha(0).toRgbString(), tinycolor(color).setAlpha(1).toRgbString()];
25
+ }, [value]);
26
+ const rangeBackround = `linear-gradient(90deg, ${preparedAlphaColor[0]} 0%, ${preparedAlphaColor[1]} 100%)`;
27
+ const alpha = tinycolor(value).getAlpha();
28
+ return (React.createElement(rebass_1.Flex, { className: 'ColorPicker' },
29
+ React.createElement(Input_1.default, Object.assign({}, restProps, { mr: 2, onChange: (event) => {
23
30
  var _a;
24
31
  /**
25
32
  * The value is not in the map when the color is not in the palette.
@@ -30,5 +37,11 @@ exports.ColorPicker = React.forwardRef((props, ref) => {
30
37
  width: 70,
31
38
  padding: 0 /* we need this to be 0, since otherwise on Windows browsers, the chosen color cannot be seen */,
32
39
  }, list: "ABcolorChoices" })),
33
- ABcolorChoices));
40
+ ABcolorChoices,
41
+ includeAlpha && (React.createElement(rebass_1.Flex, { alignItems: "center" },
42
+ React.createElement(rebass_1.Box, { mr: 1 }, "Opacity"),
43
+ React.createElement(Input_1.default, { className: "ab-ColorPicker-range", style: { background: rangeBackround }, value: alpha, onChange: (event) => {
44
+ const color = tinycolor(value).setAlpha(event.target.value).toRgbString();
45
+ props.onChange(color);
46
+ }, min: 0, max: 1, step: 0.1, type: "range" })))));
34
47
  });
@@ -0,0 +1 @@
1
+ export * from './ColorPicker';
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./ColorPicker"), exports);
@@ -103,7 +103,7 @@ function BaseEditorInput(props) {
103
103
  props.onSelectedFunctionChange(selectedFunctionName ? expressionFunctions[selectedFunctionName] : null);
104
104
  }
105
105
  }, [selectedFunctionName]);
106
- const functionsDropdown = (React.createElement(OverlayTrigger_1.default, { render: () => (React.createElement(rebass_1.Flex, { className: `${baseClassName}__dropdown-functions-list`, "data-name": "expression-dropdown-fuctions-list", flexDirection: "column", p: 2 }, Object.keys(expressionFunctions)
106
+ const functionsDropdown = (React.createElement(OverlayTrigger_1.default, { render: () => (React.createElement(rebass_1.Flex, { className: `${baseClassName}__dropdown-functions-list`, "data-name": "expression-dropdown-fuctions-list", flexDirection: "column", p: 2, maxHeight: '50vh' }, Object.keys(expressionFunctions)
107
107
  .filter((functionName) => !expressionFunctions[functionName].isHiddenFromMenu)
108
108
  .map((functionName) => functionName === 'VAR' ? (React.createElement(VarEditorButton, { key: functionName })) : (React.createElement(EditorButton_1.default, { data: `${functionName}()`, key: functionName, mr: 1 }, functionName))))), showEvent: "focus", hideEvent: "blur" },
109
109
  React.createElement(SimpleButton_1.default, { "data-name": "expression-dropdown", icon: "arrow-down", iconPosition: 'end', mr: 1 },
@@ -32,7 +32,6 @@ const export_1 = tslib_1.__importDefault(require("./export"));
32
32
  const campaign_1 = tslib_1.__importDefault(require("./campaign"));
33
33
  const build_1 = tslib_1.__importDefault(require("./build"));
34
34
  const warning_1 = tslib_1.__importDefault(require("./warning"));
35
- const conditional_style_1 = tslib_1.__importDefault(require("./conditional-style"));
36
35
  const dashboard_1 = tslib_1.__importDefault(require("./dashboard"));
37
36
  const undo_1 = tslib_1.__importDefault(require("./undo"));
38
37
  const fast_forward_1 = tslib_1.__importDefault(require("./fast-forward"));
@@ -169,7 +168,6 @@ const allIcons = {
169
168
  'calculated-column': calculated_column_1.default,
170
169
  calendar: calendar_1.default,
171
170
  'cell-validation': cell_validation_1.default,
172
- 'conditional-style': conditional_style_1.default,
173
171
  chat: chat_1.default,
174
172
  'custom-sort': custom_sort_1.default,
175
173
  dashboard: dashboard_1.default,
@@ -90,14 +90,6 @@ export declare const ADAPTABLE_METAMODEL: {
90
90
  kind: string;
91
91
  description: string;
92
92
  properties: ({
93
- name: string;
94
- kind: string;
95
- description: string;
96
- uiLabel: string;
97
- isOptional: boolean;
98
- defaultValue?: undefined;
99
- reference?: undefined;
100
- } | {
101
93
  name: string;
102
94
  kind: string;
103
95
  description: string;
@@ -111,11 +103,21 @@ export declare const ADAPTABLE_METAMODEL: {
111
103
  description: string;
112
104
  uiLabel: string;
113
105
  isOptional: boolean;
106
+ defaultValue: string;
114
107
  reference: string;
115
- defaultValue?: undefined;
116
108
  })[];
117
109
  };
118
- ActionRowContext: {
110
+ ActionRowButtonConfigurationContext: {
111
+ name: string;
112
+ kind: string;
113
+ description: string;
114
+ };
115
+ ActionRowButtonType: {
116
+ name: string;
117
+ kind: string;
118
+ description: string;
119
+ };
120
+ ActionRowFormContext: {
119
121
  name: string;
120
122
  kind: string;
121
123
  description: string;
@@ -140,6 +142,16 @@ export declare const ADAPTABLE_METAMODEL: {
140
142
  defaultValue: string;
141
143
  })[];
142
144
  };
145
+ ActionRowParamContext: {
146
+ name: string;
147
+ kind: string;
148
+ description: string;
149
+ };
150
+ ActionRowParamFieldContext: {
151
+ name: string;
152
+ kind: string;
153
+ description: string;
154
+ };
143
155
  ActionRowSubmittedInfo: {
144
156
  name: string;
145
157
  kind: string;
@@ -1481,7 +1493,7 @@ export declare const ADAPTABLE_METAMODEL: {
1481
1493
  kind: string;
1482
1494
  description: string;
1483
1495
  };
1484
- ChartDefinition: {
1496
+ ChartContainer: {
1485
1497
  name: string;
1486
1498
  kind: string;
1487
1499
  description: string;
@@ -1490,9 +1502,31 @@ export declare const ADAPTABLE_METAMODEL: {
1490
1502
  kind: string;
1491
1503
  description: string;
1492
1504
  uiLabel: string;
1493
- reference: string;
1494
1505
  }[];
1495
1506
  };
1507
+ ChartDefinition: {
1508
+ name: string;
1509
+ kind: string;
1510
+ description: string;
1511
+ properties: ({
1512
+ name: string;
1513
+ kind: string;
1514
+ description: string;
1515
+ uiLabel: string;
1516
+ reference: string;
1517
+ } | {
1518
+ name: string;
1519
+ kind: string;
1520
+ description: string;
1521
+ uiLabel: string;
1522
+ reference?: undefined;
1523
+ })[];
1524
+ };
1525
+ ChartingAggFunc: {
1526
+ name: string;
1527
+ kind: string;
1528
+ description: string;
1529
+ };
1496
1530
  ChartingApi: {
1497
1531
  name: string;
1498
1532
  kind: string;
@@ -1504,6 +1538,26 @@ export declare const ADAPTABLE_METAMODEL: {
1504
1538
  uiLabel: string;
1505
1539
  }[];
1506
1540
  };
1541
+ ChartingOptions: {
1542
+ name: string;
1543
+ kind: string;
1544
+ description: string;
1545
+ properties: ({
1546
+ name: string;
1547
+ kind: string;
1548
+ description: string;
1549
+ uiLabel: string;
1550
+ isOptional: boolean;
1551
+ defaultValue?: undefined;
1552
+ } | {
1553
+ name: string;
1554
+ kind: string;
1555
+ description: string;
1556
+ uiLabel: string;
1557
+ isOptional: boolean;
1558
+ defaultValue: string;
1559
+ })[];
1560
+ };
1507
1561
  ChartingState: {
1508
1562
  name: string;
1509
1563
  kind: string;
@@ -1829,7 +1883,7 @@ export declare const ADAPTABLE_METAMODEL: {
1829
1883
  kind: string;
1830
1884
  description: string;
1831
1885
  };
1832
- CreateActionRowContext: {
1886
+ CreateActionRowFormContext: {
1833
1887
  name: string;
1834
1888
  kind: string;
1835
1889
  description: string;
@@ -2429,7 +2483,7 @@ export declare const ADAPTABLE_METAMODEL: {
2429
2483
  reference?: undefined;
2430
2484
  })[];
2431
2485
  };
2432
- EditActionRowContext: {
2486
+ EditActionRowFormContext: {
2433
2487
  name: string;
2434
2488
  kind: string;
2435
2489
  description: string;
@@ -2952,14 +3006,14 @@ export declare const ADAPTABLE_METAMODEL: {
2952
3006
  description: string;
2953
3007
  uiLabel: string;
2954
3008
  isOptional: boolean;
2955
- defaultValue?: undefined;
3009
+ defaultValue: string;
2956
3010
  } | {
2957
3011
  name: string;
2958
3012
  kind: string;
2959
3013
  description: string;
2960
3014
  uiLabel: string;
2961
3015
  isOptional: boolean;
2962
- defaultValue: string;
3016
+ defaultValue?: undefined;
2963
3017
  })[];
2964
3018
  };
2965
3019
  FinsembleApi: {