@reltio/components 1.4.1981 → 1.4.1983
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/cjs/AutosizeInput/AutosizeInput.d.ts +3 -0
- package/cjs/AutosizeInput/AutosizeInput.js +62 -0
- package/cjs/AutosizeInput/index.d.ts +1 -0
- package/cjs/AutosizeInput/index.js +5 -0
- package/cjs/AutosizeInput/styles.d.ts +1 -0
- package/cjs/AutosizeInput/styles.js +33 -0
- package/cjs/MultipleInput/components/AutosizeInputWrapper/AutosizeInputWrapper.d.ts +1 -1
- package/cjs/MultipleInput/components/AutosizeInputWrapper/AutosizeInputWrapper.js +2 -5
- package/cjs/TypeaheadEditor/TypeaheadEditor.js +2 -2
- package/esm/AutosizeInput/AutosizeInput.d.ts +3 -0
- package/esm/AutosizeInput/AutosizeInput.js +33 -0
- package/esm/AutosizeInput/index.d.ts +1 -0
- package/esm/AutosizeInput/index.js +1 -0
- package/esm/AutosizeInput/styles.d.ts +1 -0
- package/esm/AutosizeInput/styles.js +30 -0
- package/esm/MultipleInput/components/AutosizeInputWrapper/AutosizeInputWrapper.d.ts +1 -1
- package/esm/MultipleInput/components/AutosizeInputWrapper/AutosizeInputWrapper.js +1 -1
- package/esm/TypeaheadEditor/TypeaheadEditor.js +1 -1
- package/package.json +2 -3
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
|
+
if (k2 === undefined) k2 = k;
|
|
15
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
16
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
17
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
18
|
+
}
|
|
19
|
+
Object.defineProperty(o, k2, desc);
|
|
20
|
+
}) : (function(o, m, k, k2) {
|
|
21
|
+
if (k2 === undefined) k2 = k;
|
|
22
|
+
o[k2] = m[k];
|
|
23
|
+
}));
|
|
24
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
25
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
26
|
+
}) : function(o, v) {
|
|
27
|
+
o["default"] = v;
|
|
28
|
+
});
|
|
29
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
30
|
+
if (mod && mod.__esModule) return mod;
|
|
31
|
+
var result = {};
|
|
32
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
33
|
+
__setModuleDefault(result, mod);
|
|
34
|
+
return result;
|
|
35
|
+
};
|
|
36
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
37
|
+
var t = {};
|
|
38
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
39
|
+
t[p] = s[p];
|
|
40
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
41
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
42
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
43
|
+
t[p[i]] = s[p[i]];
|
|
44
|
+
}
|
|
45
|
+
return t;
|
|
46
|
+
};
|
|
47
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
48
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
49
|
+
};
|
|
50
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
51
|
+
exports.AutosizeInput = void 0;
|
|
52
|
+
var react_1 = __importStar(require("react"));
|
|
53
|
+
var classnames_1 = __importDefault(require("classnames"));
|
|
54
|
+
var styles_1 = require("./styles");
|
|
55
|
+
exports.AutosizeInput = (0, react_1.forwardRef)(function (_a, ref) {
|
|
56
|
+
var value = _a.value, className = _a.className, props = __rest(_a, ["value", "className"]);
|
|
57
|
+
var styles = (0, styles_1.useStyles)();
|
|
58
|
+
return (react_1.default.createElement("div", { className: (0, classnames_1.default)(styles.autosizeInputContainer, className) },
|
|
59
|
+
react_1.default.createElement("span", { className: styles.autosizeInputRuler }, value.replace(/ /g, '\u00A0')),
|
|
60
|
+
react_1.default.createElement("input", __assign({ className: styles.autosizeInput, value: value, ref: ref, size: 1, type: "text" }, props))));
|
|
61
|
+
});
|
|
62
|
+
exports.AutosizeInput.displayName = 'AutosizeInput';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { AutosizeInput } from './AutosizeInput';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AutosizeInput = void 0;
|
|
4
|
+
var AutosizeInput_1 = require("./AutosizeInput");
|
|
5
|
+
Object.defineProperty(exports, "AutosizeInput", { enumerable: true, get: function () { return AutosizeInput_1.AutosizeInput; } });
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useStyles: (props?: any) => import("@mui/styles").ClassNameMap<"autosizeInputContainer" | "autosizeInputRuler" | "autosizeInput">;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.useStyles = void 0;
|
|
15
|
+
var styles_1 = require("@mui/styles");
|
|
16
|
+
var sharedStyles = {
|
|
17
|
+
gridArea: '1/1',
|
|
18
|
+
fontFamily: 'inherit',
|
|
19
|
+
fontSize: 'inherit',
|
|
20
|
+
letterSpacing: 'inherit',
|
|
21
|
+
color: 'inherit',
|
|
22
|
+
margin: 0,
|
|
23
|
+
padding: 0,
|
|
24
|
+
border: 'none',
|
|
25
|
+
outline: 'none'
|
|
26
|
+
};
|
|
27
|
+
exports.useStyles = (0, styles_1.makeStyles)({
|
|
28
|
+
autosizeInputContainer: {
|
|
29
|
+
display: 'grid'
|
|
30
|
+
},
|
|
31
|
+
autosizeInputRuler: __assign(__assign({}, sharedStyles), { visibility: 'hidden' }),
|
|
32
|
+
autosizeInput: __assign({}, sharedStyles)
|
|
33
|
+
});
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { InputBaseComponentProps } from '@mui/material/InputBase';
|
|
3
|
-
export declare const AutosizeInputWrapper: React.ForwardRefExoticComponent<Omit<InputBaseComponentProps, "ref"> & React.RefAttributes<
|
|
3
|
+
export declare const AutosizeInputWrapper: React.ForwardRefExoticComponent<Omit<InputBaseComponentProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -44,15 +44,12 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
44
44
|
}
|
|
45
45
|
return t;
|
|
46
46
|
};
|
|
47
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
48
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
49
|
-
};
|
|
50
47
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
51
48
|
exports.AutosizeInputWrapper = void 0;
|
|
52
49
|
var react_1 = __importStar(require("react"));
|
|
53
|
-
var
|
|
50
|
+
var AutosizeInput_1 = require("../../../AutosizeInput");
|
|
54
51
|
exports.AutosizeInputWrapper = (0, react_1.forwardRef)(function (props, ref) {
|
|
55
52
|
var CustomInputComponent = props.CustomInputComponent, other = __rest(props, ["CustomInputComponent"]);
|
|
56
|
-
return CustomInputComponent ? (react_1.default.createElement(CustomInputComponent, __assign({}, other, { ref: ref, customInput:
|
|
53
|
+
return CustomInputComponent ? (react_1.default.createElement(CustomInputComponent, __assign({}, other, { ref: ref, customInput: AutosizeInput_1.AutosizeInput }))) : (react_1.default.createElement(AutosizeInput_1.AutosizeInput, __assign({}, other, { ref: ref })));
|
|
57
54
|
});
|
|
58
55
|
exports.AutosizeInputWrapper.displayName = 'AutosizeInputWrapper';
|
|
@@ -99,7 +99,7 @@ var ramda_1 = require("ramda");
|
|
|
99
99
|
var classnames_1 = __importDefault(require("classnames"));
|
|
100
100
|
var mdm_sdk_1 = require("@reltio/mdm-sdk");
|
|
101
101
|
var react_autosuggest_1 = __importDefault(require("react-autosuggest"));
|
|
102
|
-
var
|
|
102
|
+
var AutosizeInput_1 = require("../AutosizeInput");
|
|
103
103
|
var TextField_1 = __importDefault(require("@mui/material/TextField"));
|
|
104
104
|
var MenuItem_1 = __importDefault(require("@mui/material/MenuItem"));
|
|
105
105
|
var Paper_1 = __importDefault(require("@mui/material/Paper"));
|
|
@@ -247,7 +247,7 @@ var TypeaheadEditor = function (_a) {
|
|
|
247
247
|
underline: (0, classnames_1.default)((_b = {}, _b[styles.underline] = (0, mdm_sdk_1.isEmptyValue)(value), _b)),
|
|
248
248
|
input: (0, classnames_1.default)(styles['rawInput'], (0, ramda_1.path)(['classes', 'input'], InputProps))
|
|
249
249
|
};
|
|
250
|
-
return multiple === true ? (react_1.default.createElement(TextField_1.default, __assign({}, otherProps, { ref: inputRef, inputRef: ref, InputProps: __assign(__assign({}, InputProps), { startAdornment: value === null || value === void 0 ? void 0 : value.map(function (item, index) { return (react_1.default.createElement(ValueChip_1.ValueChip, { key: item, label: item, onDelete: function () { return onChange((0, ramda_1.remove)(index, 1, value)); } })); }), inputComponent:
|
|
250
|
+
return multiple === true ? (react_1.default.createElement(TextField_1.default, __assign({}, otherProps, { ref: inputRef, inputRef: ref, InputProps: __assign(__assign({}, InputProps), { startAdornment: value === null || value === void 0 ? void 0 : value.map(function (item, index) { return (react_1.default.createElement(ValueChip_1.ValueChip, { key: item, label: item, onDelete: function () { return onChange((0, ramda_1.remove)(index, 1, value)); } })); }), inputComponent: AutosizeInput_1.AutosizeInput, classes: __assign(__assign({ root: (0, classnames_1.default)(styles.multipleTextFieldInput, (0, ramda_1.path)(['classes', 'root'], InputProps)) }, commonClasses), { input: (0, classnames_1.default)(styles.autosizeInput, commonClasses.input), adornedStart: styles.multipleTextFieldAdornedStart }) }), classes: { root: styles.multipleTextField } }))) : (react_1.default.createElement(TextField_1.default, __assign({}, otherProps, { ref: inputRef, inputRef: ref, InputProps: __assign(__assign({}, InputProps), { classes: __assign({ root: (0, classnames_1.default)(styles.inputRoot, (0, ramda_1.path)(['classes', 'root'], InputProps), (_c = {},
|
|
251
251
|
_c[styles.isCrossedOut] = isCrossedOut,
|
|
252
252
|
_c)) }, commonClasses) }) })));
|
|
253
253
|
}, renderSuggestionsContainer: function (_a) {
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
+
var t = {};
|
|
14
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
+
t[p] = s[p];
|
|
16
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
+
t[p[i]] = s[p[i]];
|
|
20
|
+
}
|
|
21
|
+
return t;
|
|
22
|
+
};
|
|
23
|
+
import React, { forwardRef } from 'react';
|
|
24
|
+
import classnames from 'classnames';
|
|
25
|
+
import { useStyles } from './styles';
|
|
26
|
+
export var AutosizeInput = forwardRef(function (_a, ref) {
|
|
27
|
+
var value = _a.value, className = _a.className, props = __rest(_a, ["value", "className"]);
|
|
28
|
+
var styles = useStyles();
|
|
29
|
+
return (React.createElement("div", { className: classnames(styles.autosizeInputContainer, className) },
|
|
30
|
+
React.createElement("span", { className: styles.autosizeInputRuler }, value.replace(/ /g, '\u00A0')),
|
|
31
|
+
React.createElement("input", __assign({ className: styles.autosizeInput, value: value, ref: ref, size: 1, type: "text" }, props))));
|
|
32
|
+
});
|
|
33
|
+
AutosizeInput.displayName = 'AutosizeInput';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { AutosizeInput } from './AutosizeInput';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { AutosizeInput } from './AutosizeInput';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useStyles: (props?: any) => import("@mui/styles").ClassNameMap<"autosizeInputContainer" | "autosizeInputRuler" | "autosizeInput">;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import { makeStyles } from '@mui/styles';
|
|
13
|
+
var sharedStyles = {
|
|
14
|
+
gridArea: '1/1',
|
|
15
|
+
fontFamily: 'inherit',
|
|
16
|
+
fontSize: 'inherit',
|
|
17
|
+
letterSpacing: 'inherit',
|
|
18
|
+
color: 'inherit',
|
|
19
|
+
margin: 0,
|
|
20
|
+
padding: 0,
|
|
21
|
+
border: 'none',
|
|
22
|
+
outline: 'none'
|
|
23
|
+
};
|
|
24
|
+
export var useStyles = makeStyles({
|
|
25
|
+
autosizeInputContainer: {
|
|
26
|
+
display: 'grid'
|
|
27
|
+
},
|
|
28
|
+
autosizeInputRuler: __assign(__assign({}, sharedStyles), { visibility: 'hidden' }),
|
|
29
|
+
autosizeInput: __assign({}, sharedStyles)
|
|
30
|
+
});
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { InputBaseComponentProps } from '@mui/material/InputBase';
|
|
3
|
-
export declare const AutosizeInputWrapper: React.ForwardRefExoticComponent<Omit<InputBaseComponentProps, "ref"> & React.RefAttributes<
|
|
3
|
+
export declare const AutosizeInputWrapper: React.ForwardRefExoticComponent<Omit<InputBaseComponentProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -21,7 +21,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
21
21
|
return t;
|
|
22
22
|
};
|
|
23
23
|
import React, { forwardRef } from 'react';
|
|
24
|
-
import AutosizeInput from '
|
|
24
|
+
import { AutosizeInput } from '../../../AutosizeInput';
|
|
25
25
|
export var AutosizeInputWrapper = forwardRef(function (props, ref) {
|
|
26
26
|
var CustomInputComponent = props.CustomInputComponent, other = __rest(props, ["CustomInputComponent"]);
|
|
27
27
|
return CustomInputComponent ? (React.createElement(CustomInputComponent, __assign({}, other, { ref: ref, customInput: AutosizeInput }))) : (React.createElement(AutosizeInput, __assign({}, other, { ref: ref })));
|
|
@@ -70,7 +70,7 @@ import { identity, isEmpty, nthArg, path, pipe, prop, remove, T, uniq, isNil } f
|
|
|
70
70
|
import classnames from 'classnames';
|
|
71
71
|
import { debounce, isEmptyValue, wrapInArrayIfNeeded } from '@reltio/mdm-sdk';
|
|
72
72
|
import Autosuggest from 'react-autosuggest';
|
|
73
|
-
import AutosizeInput from '
|
|
73
|
+
import { AutosizeInput } from '../AutosizeInput';
|
|
74
74
|
import TextField from '@mui/material/TextField';
|
|
75
75
|
import MenuItem from '@mui/material/MenuItem';
|
|
76
76
|
import Paper from '@mui/material/Paper';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reltio/components",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.1983",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE FILE",
|
|
5
5
|
"main": "./cjs/index.js",
|
|
6
6
|
"module": "./esm/index.js",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"@fluentui/react-context-selector": "^9.1.26",
|
|
9
9
|
"@react-google-maps/api": "2.7.0",
|
|
10
10
|
"@react-sigma/core": "3.4.0",
|
|
11
|
-
"@reltio/mdm-sdk": "^1.4.
|
|
11
|
+
"@reltio/mdm-sdk": "^1.4.1882",
|
|
12
12
|
"d3-cloud": "^1.2.5",
|
|
13
13
|
"d3-geo": "^2.0.1",
|
|
14
14
|
"d3-hierarchy": "^2.0.0",
|
|
@@ -23,7 +23,6 @@
|
|
|
23
23
|
"react-dnd": "^9.4.0",
|
|
24
24
|
"react-dnd-html5-backend": "^10.0.2",
|
|
25
25
|
"react-grid-layout": "1.4.2",
|
|
26
|
-
"react-input-autosize": "^2.2.2",
|
|
27
26
|
"react-lifecycles-compat": "^3.0.4",
|
|
28
27
|
"react-mentions": "4.3.0",
|
|
29
28
|
"react-number-format": "^4.9.2",
|