@adaptabletools/adaptable-cjs 17.0.0-canary.1 → 17.0.0-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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adaptabletools/adaptable-cjs",
3
- "version": "17.0.0-canary.1",
3
+ "version": "17.0.0-canary.2",
4
4
  "description": "Powerful data-agnostic HTML5 AG Grid extension which provides advanced, cutting-edge functionality to meet all DataGrid requirements",
5
5
  "keywords": [
6
6
  "web-components",
@@ -54,7 +54,6 @@
54
54
  "react-redux": "7.2.8",
55
55
  "react-remove-scroll": "2.4.4",
56
56
  "react-select": "5.8.0",
57
- "react-toastify": "9.0.7",
58
57
  "rebass": "^3.2.2",
59
58
  "redux": "4.0.5",
60
59
  "rxjs": "^7.4.0",
@@ -67,5 +66,5 @@
67
66
  "peerDependencies": {
68
67
  "ag-grid-community": ">=30.2.0"
69
68
  },
70
- "publishTimestamp": 1704894907301
69
+ "publishTimestamp": 1704900031779
71
70
  }
@@ -68,7 +68,7 @@ const AdaptableLogger_1 = require("./AdaptableLogger");
68
68
  const attachAddaptableColumnTypes_1 = require("./attachAddaptableColumnTypes");
69
69
  const FormatHelper_1 = require("../Utilities/Helpers/FormatHelper");
70
70
  const Fdc3Service_1 = require("../Utilities/Services/Fdc3Service");
71
- const tinycolor = require('tinycolor2');
71
+ const tinycolor2_1 = tslib_1.__importDefault(require("tinycolor2"));
72
72
  const GROUP_PATH_SEPARATOR = '/';
73
73
  // IMPORTANT - we need colId to be set in order for safeSetColDefs to work correctly
74
74
  const assignColId = (colDef, logger) => {
@@ -1041,7 +1041,7 @@ class Adaptable {
1041
1041
  const preparedColor = (0, StyleHelper_1.getVariableColor)(cellBackColor);
1042
1042
  // if no range match, do not apply color (black in this case)
1043
1043
  if (cellBackColor) {
1044
- style.backgroundColor = tinycolor(preparedColor).setAlpha(alpha).toRgbString();
1044
+ style.backgroundColor = (0, tinycolor2_1.default)(preparedColor).setAlpha(alpha).toRgbString();
1045
1045
  }
1046
1046
  }
1047
1047
  if (styledColumn.PercentBarStyle && styledColumn.PercentBarStyle.CellText) {
@@ -5004,9 +5004,9 @@ class Adaptable {
5004
5004
  convertCSSToExcelStyle(style) {
5005
5005
  const getHexColor = (color) => {
5006
5006
  const preparedColor = (0, StyleHelper_1.getVariableColor)(color);
5007
- const t = tinycolor(preparedColor);
5007
+ const t = (0, tinycolor2_1.default)(preparedColor);
5008
5008
  const a = t.getAlpha();
5009
- return tinycolor.mix(tinycolor('white'), t, a * 100).toHexString();
5009
+ return tinycolor2_1.default.mix((0, tinycolor2_1.default)('white'), t, a * 100).toHexString();
5010
5010
  };
5011
5011
  let result = {};
5012
5012
  if (style.backgroundColor != null) {
@@ -1,11 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.AdaptableLogger = void 0;
4
- const debugFactory = require('debug');
4
+ const tslib_1 = require("tslib");
5
+ const debug_1 = tslib_1.__importDefault(require("debug"));
5
6
  function humanize(ms) {
6
7
  return `${ms}ms`;
7
8
  }
8
- debugFactory.humanize = humanize;
9
+ debug_1.default.humanize = humanize;
9
10
  const performanceTime = (previousTime) => {
10
11
  const now = performance.now();
11
12
  return previousTime ? now - previousTime : now;
@@ -38,7 +39,7 @@ class AdaptableLogger {
38
39
  }
39
40
  constructor(adaptableId) {
40
41
  this.adaptableId = adaptableId;
41
- this.debugger = debugFactory(`Adaptable:${adaptableId}`);
42
+ this.debugger = (0, debug_1.default)(`Adaptable:${adaptableId}`);
42
43
  this.infoLogger = this.debugger.extend(`info`);
43
44
  this.infoLogger.log = console.info.bind(console);
44
45
  this.successLogger = this.debugger.extend(`success`);
@@ -47,7 +47,7 @@ const Helper_1 = require("../Utilities/Helpers/Helper");
47
47
  const UIHelper_1 = tslib_1.__importDefault(require("../View/UIHelper"));
48
48
  const BadgeRenderer_1 = require("./BadgeRenderer");
49
49
  const PercentBarRenderer_1 = require("./PercentBarRenderer");
50
- const tinycolor = require('tinycolor2');
50
+ const tinycolor2_1 = tslib_1.__importDefault(require("tinycolor2"));
51
51
  /**
52
52
  * Adaptable AG Grid implementation is getting really big and unwieldy
53
53
  * So lets put some of the more obvious 'Helper' functions here
@@ -637,8 +637,8 @@ class agGridHelper {
637
637
  };
638
638
  return {
639
639
  Header: {
640
- headerColor: tinycolor(headerColStyle.color).toHexString(),
641
- headerBackColor: tinycolor(headerColStyle.backgroundColor).toHexString(),
640
+ headerColor: (0, tinycolor2_1.default)(headerColStyle.color).toHexString(),
641
+ headerBackColor: (0, tinycolor2_1.default)(headerColStyle.backgroundColor).toHexString(),
642
642
  headerFontFamily: headerColStyle.fontFamily,
643
643
  headerFontSize: headerColStyle.fontSize,
644
644
  headerFontStyle: headerColStyle.fontStyle,
@@ -655,9 +655,9 @@ class agGridHelper {
655
655
  }),
656
656
  },
657
657
  Row: {
658
- color: tinycolor(firstRowStyle.color).toHexString(),
659
- backColor: tinycolor(firstRowStyle.backgroundColor).toHexString(),
660
- altBackColor: tinycolor(secondRowStyle.backgroundColor).toHexString(),
658
+ color: (0, tinycolor2_1.default)(firstRowStyle.color).toHexString(),
659
+ backColor: (0, tinycolor2_1.default)(firstRowStyle.backgroundColor).toHexString(),
660
+ altBackColor: (0, tinycolor2_1.default)(secondRowStyle.backgroundColor).toHexString(),
661
661
  fontFamily: firstRowStyle.fontFamily,
662
662
  fontSize: firstRowStyle.fontSize,
663
663
  fontStyle: firstRowStyle.fontStyle,
@@ -6,7 +6,7 @@ const React = tslib_1.__importStar(require("react"));
6
6
  const rebass_1 = require("rebass");
7
7
  const Input_1 = tslib_1.__importDefault(require("../Input"));
8
8
  const StyleHelper_1 = require("../../Utilities/Helpers/StyleHelper");
9
- const tinycolor = require('tinycolor2');
9
+ const tinycolor2_1 = tslib_1.__importDefault(require("tinycolor2"));
10
10
  exports.ColorPicker = React.forwardRef((props, ref) => {
11
11
  const ColorPalette = props.api.userInterfaceApi.getColorPalette();
12
12
  let { api, value, includeAlpha = true } = props, restProps = tslib_1.__rest(props, ["api", "value", "includeAlpha"]);
@@ -17,14 +17,14 @@ exports.ColorPicker = React.forwardRef((props, ref) => {
17
17
  const ABcolorChoices = React.createElement("datalist", { id: 'ABcolorChoices' }, ABcolorChoicesOptions);
18
18
  const preparedValue = React.useMemo(() => {
19
19
  const color = (0, StyleHelper_1.getVariableColor)(value);
20
- return tinycolor(color).toHexString();
20
+ return (0, tinycolor2_1.default)(color).toHexString();
21
21
  }, [value]);
22
22
  const preparedAlphaColor = React.useMemo(() => {
23
23
  const color = (0, StyleHelper_1.getVariableColor)(value);
24
- return [tinycolor(color).setAlpha(0).toRgbString(), tinycolor(color).setAlpha(1).toRgbString()];
24
+ return [(0, tinycolor2_1.default)(color).setAlpha(0).toRgbString(), (0, tinycolor2_1.default)(color).setAlpha(1).toRgbString()];
25
25
  }, [value]);
26
26
  const rangeBackround = `linear-gradient(90deg, ${preparedAlphaColor[0]} 0%, ${preparedAlphaColor[1]} 100%)`;
27
- const alpha = tinycolor(value).getAlpha();
27
+ const alpha = (0, tinycolor2_1.default)(value).getAlpha();
28
28
  return (React.createElement(rebass_1.Flex, { className: 'ColorPicker' },
29
29
  React.createElement(Input_1.default, Object.assign({}, restProps, { mr: 2, onChange: (event) => {
30
30
  var _a;
@@ -41,7 +41,7 @@ exports.ColorPicker = React.forwardRef((props, ref) => {
41
41
  includeAlpha && (React.createElement(rebass_1.Flex, { alignItems: "center" },
42
42
  React.createElement(rebass_1.Box, { mr: 1 }, "Opacity"),
43
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();
44
+ const color = (0, tinycolor2_1.default)(value).setAlpha(event.target.value).toRgbString();
45
45
  props.onChange(color);
46
46
  }, min: 0, max: 1, step: 0.01, type: "range" })))));
47
47
  });