@reltio/components 1.4.1446 → 1.4.1447

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.
@@ -28,7 +28,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
29
  var react_1 = __importStar(require("react"));
30
30
  var ui_i18n_1 = __importDefault(require("ui-i18n"));
31
- var nanoid_1 = __importDefault(require("nanoid"));
31
+ var nanoid_1 = require("nanoid");
32
32
  var ramda_1 = require("ramda");
33
33
  var ArrowBack_1 = __importDefault(require("@material-ui/icons/ArrowBack"));
34
34
  var Button_1 = __importDefault(require("@material-ui/core/Button"));
@@ -45,8 +45,8 @@ var getDate = function (values, index) { return (0, ramda_1.pathOr)(null, [index
45
45
  var DateRangePicker = (0, react_1.forwardRef)(function (_a, ref) {
46
46
  var onCancel = _a.onCancel, onApply = _a.onApply, values = _a.values, type = _a.type, minDate = _a.minDate, maxDate = _a.maxDate;
47
47
  var styles = (0, styles_1.useStyles)();
48
- var editorFromId = (0, react_1.useRef)((0, nanoid_1.default)());
49
- var editorToId = (0, react_1.useRef)((0, nanoid_1.default)());
48
+ var editorFromId = (0, react_1.useRef)((0, nanoid_1.nanoid)());
49
+ var editorToId = (0, react_1.useRef)((0, nanoid_1.nanoid)());
50
50
  var _b = (0, react_1.useState)(null), startDate = _b[0], setStartDate = _b[1];
51
51
  var _c = (0, react_1.useState)(null), endDate = _c[0], setEndDate = _c[1];
52
52
  react_1.default.useEffect(function () {
@@ -33,21 +33,18 @@ var __importStar = (this && this.__importStar) || function (mod) {
33
33
  __setModuleDefault(result, mod);
34
34
  return result;
35
35
  };
36
- var __importDefault = (this && this.__importDefault) || function (mod) {
37
- return (mod && mod.__esModule) ? mod : { "default": mod };
38
- };
39
36
  Object.defineProperty(exports, "__esModule", { value: true });
40
37
  var react_1 = __importStar(require("react"));
41
38
  var recharts_1 = require("recharts");
42
39
  var CustomTooltip_1 = require("../CustomTooltip/CustomTooltip");
43
40
  var styles_1 = require("./styles");
44
41
  var useClickableStyle_1 = require("../hooks/useClickableStyle");
45
- var nanoid_1 = __importDefault(require("nanoid"));
42
+ var nanoid_1 = require("nanoid");
46
43
  var CustomizedContent = function (_a) {
47
44
  var x = _a.x, y = _a.y, width = _a.width, height = _a.height, label = _a.label, onClick = _a.onClick, group = _a.group;
48
45
  var styles = (0, styles_1.useStyles)();
49
46
  var clickable = (0, useClickableStyle_1.useClickableStyle)(onClick);
50
- var clipPathId = (0, react_1.useRef)((0, nanoid_1.default)()).current;
47
+ var clipPathId = (0, react_1.useRef)((0, nanoid_1.nanoid)()).current;
51
48
  var strokeWidth = 2;
52
49
  return (react_1.default.createElement("g", { className: clickable, onClick: onClick && (function () { return onClick(group); }) },
53
50
  react_1.default.createElement("clipPath", { id: clipPathId },
@@ -40,7 +40,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
40
40
  var react_1 = __importStar(require("react"));
41
41
  var prop_types_1 = __importDefault(require("prop-types"));
42
42
  var ramda_1 = require("ramda");
43
- var nanoid_1 = __importDefault(require("nanoid"));
43
+ var nanoid_1 = require("nanoid");
44
44
  var Popper_1 = __importDefault(require("../Popper/Popper"));
45
45
  var Paper_1 = __importDefault(require("@material-ui/core/Paper"));
46
46
  var menuStyles_1 = require("./menuStyles");
@@ -50,7 +50,7 @@ var MenuWithPopper = function (props) {
50
50
  var _a = props.selectProps, inputRef = _a.inputRef, menuIsOpen = _a.menuIsOpen, inputValue = _a.inputValue, innerRef = props.innerRef, children = props.children, innerProps = props.innerProps;
51
51
  var _b = (0, react_1.useState)('id'), key = _b[0], setKey = _b[1];
52
52
  (0, react_1.useEffect)(function () {
53
- setKey((0, nanoid_1.default)());
53
+ setKey((0, nanoid_1.nanoid)());
54
54
  }, [inputValue]);
55
55
  var styles = (0, menuStyles_1.useMenuStyles)();
56
56
  var popupBoundariesContext = (0, react_1.useContext)(PopupBoundariesContext_1.PopupBoundariesContext);
@@ -50,7 +50,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
50
50
  Object.defineProperty(exports, "__esModule", { value: true });
51
51
  var react_1 = __importStar(require("react"));
52
52
  var prop_types_1 = __importDefault(require("prop-types"));
53
- var nanoid_1 = __importDefault(require("nanoid"));
53
+ var nanoid_1 = require("nanoid");
54
54
  var FormControl_1 = __importDefault(require("@material-ui/core/FormControl"));
55
55
  var InputLabel_1 = __importDefault(require("@material-ui/core/InputLabel"));
56
56
  var DataTypeValueEditor_1 = __importDefault(require("../DataTypeValueEditor/DataTypeValueEditor"));
@@ -60,8 +60,8 @@ var ui_i18n_1 = __importDefault(require("ui-i18n"));
60
60
  var RangeDataTypeValueEditor = function (_a) {
61
61
  var _b = _a.value, value = _b === void 0 ? new Array(2) : _b, onChange = _a.onChange, _c = _a.orientation, orientation = _c === void 0 ? 'vertical' : _c, otherProps = __rest(_a, ["value", "onChange", "orientation"]);
62
62
  var styles = (0, styles_1.useStyles)();
63
- var rangeEditorFromId = (0, react_1.useRef)((0, nanoid_1.default)());
64
- var rangeEditorToId = (0, react_1.useRef)((0, nanoid_1.default)());
63
+ var rangeEditorFromId = (0, react_1.useRef)((0, nanoid_1.nanoid)());
64
+ var rangeEditorToId = (0, react_1.useRef)((0, nanoid_1.nanoid)());
65
65
  var fromEditor = (react_1.default.createElement(DataTypeValueEditor_1.default, __assign({ id: rangeEditorFromId.current, value: value[0], onChange: (0, ramda_1.pipe)((0, ramda_1.update)(0, ramda_1.__, value), onChange) }, otherProps)));
66
66
  var toEditor = (react_1.default.createElement(DataTypeValueEditor_1.default, __assign({ id: rangeEditorToId.current, value: value[1], onChange: (0, ramda_1.pipe)((0, ramda_1.update)(1, ramda_1.__, value), onChange) }, otherProps)));
67
67
  if (orientation === 'horizontal') {
@@ -10,12 +10,9 @@ var __assign = (this && this.__assign) || function () {
10
10
  };
11
11
  return __assign.apply(this, arguments);
12
12
  };
13
- var __importDefault = (this && this.__importDefault) || function (mod) {
14
- return (mod && mod.__esModule) ? mod : { "default": mod };
15
- };
16
13
  Object.defineProperty(exports, "__esModule", { value: true });
17
14
  exports.setUpResponseInterceptor = exports.setUpRequestInterceptor = exports.setUpQooxdooResponseInterceptor = exports.setUpQooxdooRequestInterceptor = exports.resetHtml = exports.getFilesWithArrayBuffer = exports.getWorkerURL = exports.isNewUI = void 0;
18
- var nanoid_1 = __importDefault(require("nanoid"));
15
+ var nanoid_1 = require("nanoid");
19
16
  var isNewUI = function (path) {
20
17
  return path === null || path === void 0 ? void 0 : path.includes('/nui');
21
18
  };
@@ -108,7 +105,7 @@ var setUpQooxdooRequestInterceptor = function (_a) {
108
105
  var workerRef = _a.workerRef, setRequestListeners = _a.setRequestListeners;
109
106
  return ({
110
107
  processApiRequest: function (url, method, headers, data, next) {
111
- var requestId = (0, nanoid_1.default)();
108
+ var requestId = (0, nanoid_1.nanoid)();
112
109
  var options = { url: url, method: method, headers: headers, noRequestProcessor: true };
113
110
  setRequestListeners(options, next, requestId);
114
111
  workerRef.current.postMessage({
@@ -127,7 +124,7 @@ var setUpQooxdooResponseInterceptor = function (_a) {
127
124
  var workerRef = _a.workerRef, setResponseListeners = _a.setResponseListeners;
128
125
  return ({
129
126
  processApiResponse: function (url, method, data, next) {
130
- var responseId = (0, nanoid_1.default)();
127
+ var responseId = (0, nanoid_1.nanoid)();
131
128
  setResponseListeners(next, responseId);
132
129
  workerRef.current.postMessage({
133
130
  action: 'apiResponse',
@@ -149,7 +146,7 @@ var setUpRequestInterceptor = function (_a) {
149
146
  : "".concat(reltioPath).concat(url.replace(apiPath, ''));
150
147
  var isProcessableUrl = isURLtoProcess(processApiRequest, fakeURL);
151
148
  if (isProcessableUrl) {
152
- var requestId = (0, nanoid_1.default)();
149
+ var requestId = (0, nanoid_1.nanoid)();
153
150
  setRequestListeners(options, next, requestId, resolve);
154
151
  workerRef.current.postMessage({
155
152
  action: 'apiRequest',
@@ -192,7 +189,7 @@ var setUpResponseInterceptor = function (_a) {
192
189
  var fakeURL_1 = "".concat(reltioPath).concat(url.replace(apiPath, ''));
193
190
  var isProcessableUrl = isURLtoProcess(processApiResponse, fakeURL_1);
194
191
  if (isProcessableUrl) {
195
- var responseId_1 = (0, nanoid_1.default)();
192
+ var responseId_1 = (0, nanoid_1.nanoid)();
196
193
  response
197
194
  .json()
198
195
  .then(function (data) {
@@ -53,16 +53,13 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
53
53
  }
54
54
  return to.concat(ar || Array.prototype.slice.call(from));
55
55
  };
56
- var __importDefault = (this && this.__importDefault) || function (mod) {
57
- return (mod && mod.__esModule) ? mod : { "default": mod };
58
- };
59
56
  Object.defineProperty(exports, "__esModule", { value: true });
60
57
  exports.useCustomScripts = void 0;
61
58
  var react_1 = require("react");
62
59
  var react_redux_1 = require("react-redux");
63
60
  var mdm_module_1 = __importStar(require("@reltio/mdm-module"));
64
61
  var mdm_sdk_1 = require("@reltio/mdm-sdk");
65
- var nanoid_1 = __importDefault(require("nanoid"));
62
+ var nanoid_1 = require("nanoid");
66
63
  var ramda_1 = require("ramda");
67
64
  var workflow_1 = require("../components/workflow");
68
65
  var contexts_1 = require("../contexts");
@@ -82,7 +79,7 @@ var useCustomScripts = function (config) {
82
79
  var _a;
83
80
  var customScripts = config.reduce(function (acc, customScript) {
84
81
  if (customScript.platform !== mdm_sdk_1.CustomScriptPlatform.CLASSIC) {
85
- return __spreadArray(__spreadArray([], acc, true), [__assign(__assign({}, customScript), { actionId: (0, nanoid_1.default)() })], false);
82
+ return __spreadArray(__spreadArray([], acc, true), [__assign(__assign({}, customScript), { actionId: (0, nanoid_1.nanoid)() })], false);
86
83
  }
87
84
  return acc;
88
85
  }, []);
@@ -178,7 +175,7 @@ var useCustomScripts = function (config) {
178
175
  return isURLtoProcess(processApiRequest, fakeURL);
179
176
  }), (0, ramda_1.prop)('actionId'))(customScripts);
180
177
  if (actionId) {
181
- var requestId = (0, nanoid_1.default)();
178
+ var requestId = (0, nanoid_1.nanoid)();
182
179
  requestListeners.current = __assign(__assign({}, requestListeners.current), (_b = {}, _b[requestId] = { options: options, next: next, id: requestId, resolve: resolve }, _b));
183
180
  workers.current[actionId].postMessage({
184
181
  action: 'apiRequest',
@@ -221,7 +218,7 @@ var useCustomScripts = function (config) {
221
218
  return isURLtoProcess(processApiResponse, fakeURL_1);
222
219
  }), (0, ramda_1.prop)('actionId'))(customScripts);
223
220
  if (actionId_1) {
224
- var responseId_1 = (0, nanoid_1.default)();
221
+ var responseId_1 = (0, nanoid_1.nanoid)();
225
222
  response
226
223
  .json()
227
224
  .then(function (data) {
@@ -1,6 +1,6 @@
1
1
  import React, { forwardRef, useRef, useState } from 'react';
2
2
  import i18n from 'ui-i18n';
3
- import nanoid from 'nanoid';
3
+ import { nanoid } from 'nanoid';
4
4
  import { pathOr } from 'ramda';
5
5
  import ArrowBack from '@material-ui/icons/ArrowBack';
6
6
  import Button from '@material-ui/core/Button';
@@ -14,7 +14,7 @@ import { Text, Tooltip, Treemap } from 'recharts';
14
14
  import { CustomTooltip } from '../CustomTooltip/CustomTooltip';
15
15
  import { useStyles } from './styles';
16
16
  import { useClickableStyle } from '../hooks/useClickableStyle';
17
- import nanoid from 'nanoid';
17
+ import { nanoid } from 'nanoid';
18
18
  var CustomizedContent = function (_a) {
19
19
  var x = _a.x, y = _a.y, width = _a.width, height = _a.height, label = _a.label, onClick = _a.onClick, group = _a.group;
20
20
  var styles = useStyles();
@@ -12,7 +12,7 @@ var __assign = (this && this.__assign) || function () {
12
12
  import React, { useContext, useEffect, useState } from 'react';
13
13
  import PropTypes from 'prop-types';
14
14
  import { prop } from 'ramda';
15
- import nanoid from 'nanoid';
15
+ import { nanoid } from 'nanoid';
16
16
  import Popper from '../Popper/Popper';
17
17
  import Paper from '@material-ui/core/Paper';
18
18
  import { useMenuStyles } from './menuStyles';
@@ -22,7 +22,7 @@ var __rest = (this && this.__rest) || function (s, e) {
22
22
  };
23
23
  import React, { useRef } from 'react';
24
24
  import PropTypes from 'prop-types';
25
- import nanoid from 'nanoid';
25
+ import { nanoid } from 'nanoid';
26
26
  import FormControl from '@material-ui/core/FormControl';
27
27
  import InputLabel from '@material-ui/core/InputLabel';
28
28
  import DataTypeValueEditor from '../DataTypeValueEditor/DataTypeValueEditor';
@@ -9,7 +9,7 @@ var __assign = (this && this.__assign) || function () {
9
9
  };
10
10
  return __assign.apply(this, arguments);
11
11
  };
12
- import nanoid from 'nanoid';
12
+ import { nanoid } from 'nanoid';
13
13
  export var isNewUI = function (path) {
14
14
  return path === null || path === void 0 ? void 0 : path.includes('/nui');
15
15
  };
@@ -33,7 +33,7 @@ import { useContext, useEffect, useRef } from 'react';
33
33
  import { useDispatch, useSelector } from 'react-redux';
34
34
  import mdmModule, { ui } from '@reltio/mdm-module';
35
35
  import { CustomAction, CustomScriptPlatform, initializeWebWorker, isEmptyValue, RequestAction } from '@reltio/mdm-sdk';
36
- import nanoid from 'nanoid';
36
+ import { nanoid } from 'nanoid';
37
37
  import { always, assocPath, both, concat, evolve, find, has, ifElse, map, omit, pathEq, pathOr, pick, pipe, prop, replace, startsWith, when } from 'ramda';
38
38
  import { useWorkflowCheckPermission } from '../components/workflow';
39
39
  import { InterceptHandlersContext, SandboxAPIContext, SnackbarContext } from '../contexts';
package/package.json CHANGED
@@ -1,21 +1,21 @@
1
1
  {
2
2
  "name": "@reltio/components",
3
- "version": "1.4.1446",
3
+ "version": "1.4.1447",
4
4
  "license": "SEE LICENSE IN LICENSE FILE",
5
5
  "main": "./cjs/index.js",
6
6
  "module": "./esm/index.js",
7
7
  "dependencies": {
8
8
  "@date-io/moment": "^1.3.5",
9
9
  "@react-google-maps/api": "2.7.0",
10
- "@reltio/mdm-module": "^1.4.1446",
11
- "@reltio/mdm-sdk": "^1.4.1446",
10
+ "@reltio/mdm-module": "^1.4.1447",
11
+ "@reltio/mdm-sdk": "^1.4.1447",
12
12
  "classnames": "^2.2.5",
13
13
  "d3-cloud": "^1.2.5",
14
14
  "d3-geo": "^2.0.1",
15
15
  "d3-hierarchy": "^2.0.0",
16
16
  "d3-scale": "^3.3.0",
17
17
  "frontend-collective-react-dnd-scrollzone": "^1.0.2",
18
- "nanoid": "^2.0.0",
18
+ "nanoid": "^3.3.4",
19
19
  "prop-types": "^15.6.2",
20
20
  "ramda": "^0.28.0",
21
21
  "react-autosuggest": "^9.4.3",