@reltio/components 1.4.2147 → 1.4.2149

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.
@@ -5,12 +5,11 @@ import { either, prop } from 'ramda';
5
5
  import ArrowDropDownIcon from '@mui/icons-material/ArrowDropDown';
6
6
  import { ExpandedValueTooltip } from '../../../ExpandedValueTooltip';
7
7
  import { SmallIconButton } from '../../../SmallIconButton';
8
- import { useStyles } from './styles';
8
+ import styles from './AttributeTitle.module.css';
9
9
  var defaultGetLabel = either(prop('title'), prop('fieldName'));
10
10
  export var AttributeTitle = function (_a) {
11
11
  var _b, _c, _d;
12
12
  var value = _a.value, _e = _a.getLabel, getLabel = _e === void 0 ? defaultGetLabel : _e, onSelectAttributeClick = _a.onSelectAttributeClick, _f = _a.disabled, disabled = _f === void 0 ? false : _f;
13
- var styles = useStyles();
14
13
  var label = value && getLabel(value);
15
14
  return (React.createElement("div", { onClick: disabled ? undefined : onSelectAttributeClick, className: classnames(styles.attribute, (_b = {},
16
15
  _b[styles.attributeWithValue] = !!label,
@@ -0,0 +1,9 @@
1
+ const styles = {"attribute":"AttributeTitle-attribute--PQXXK","attributeWithValue":"AttributeTitle-attributeWithValue--5qs7j","disabled":"AttributeTitle-disabled--FtTal","name":"AttributeTitle-name--HETn3","noSelect":"AttributeTitle-noSelect--g3tQy"};
2
+ if (typeof document !== 'undefined') {
3
+ const head = document.head || document.getElementsByTagName('head')[0]
4
+ const style = document.createElement('style');
5
+ style.type = 'text/css'
6
+ style.innerHTML = `.AttributeTitle-attribute--PQXXK{align-items:center;cursor:pointer;display:flex;flex-basis:100%;line-height:16px;padding:0 10px 0 16px;width:calc(100% - 32px)}.AttributeTitle-attribute--PQXXK.AttributeTitle-attributeWithValue--5qs7j{border-bottom:1px solid rgba(0,0,0,.38)}.AttributeTitle-attribute--PQXXK.AttributeTitle-disabled--FtTal{cursor:default}.AttributeTitle-name--HETn3{color:rgba(0,0,0,.87);direction:rtl;flex:1 0;font-size:14px;overflow:hidden;text-align:left;text-overflow:ellipsis;white-space:nowrap;width:0}.AttributeTitle-name--HETn3 .AttributeTitle-noSelect--g3tQy{color:rgba(0,0,0,.38)}.AttributeTitle-name--HETn3.AttributeTitle-disabled--FtTal,.AttributeTitle-name--HETn3.AttributeTitle-disabled--FtTal .AttributeTitle-noSelect--g3tQy{color:rgba(0,0,0,.26)}.AttributeTitle-name--HETn3:after{content:"\\200E"}`;
7
+ head.appendChild(style);
8
+ }
9
+ export default styles;
@@ -11,18 +11,17 @@ var ramda_1 = require("ramda");
11
11
  var ArrowDropDown_1 = __importDefault(require("@mui/icons-material/ArrowDropDown"));
12
12
  var ExpandedValueTooltip_1 = require("../../../ExpandedValueTooltip");
13
13
  var SmallIconButton_1 = require("../../../SmallIconButton");
14
- var styles_1 = require("./styles");
14
+ var AttributeTitle_module_css_1 = __importDefault(require("./AttributeTitle.module.css"));
15
15
  var defaultGetLabel = (0, ramda_1.either)((0, ramda_1.prop)('title'), (0, ramda_1.prop)('fieldName'));
16
16
  var AttributeTitle = function (_a) {
17
17
  var _b, _c, _d;
18
18
  var value = _a.value, _e = _a.getLabel, getLabel = _e === void 0 ? defaultGetLabel : _e, onSelectAttributeClick = _a.onSelectAttributeClick, _f = _a.disabled, disabled = _f === void 0 ? false : _f;
19
- var styles = (0, styles_1.useStyles)();
20
19
  var label = value && getLabel(value);
21
- return (react_1.default.createElement("div", { onClick: disabled ? undefined : onSelectAttributeClick, className: (0, classnames_1.default)(styles.attribute, (_b = {},
22
- _b[styles.attributeWithValue] = !!label,
23
- _b), (_c = {}, _c[styles.disabled] = disabled, _c)) },
20
+ return (react_1.default.createElement("div", { onClick: disabled ? undefined : onSelectAttributeClick, className: (0, classnames_1.default)(AttributeTitle_module_css_1.default.attribute, (_b = {},
21
+ _b[AttributeTitle_module_css_1.default.attributeWithValue] = !!label,
22
+ _b), (_c = {}, _c[AttributeTitle_module_css_1.default.disabled] = disabled, _c)) },
24
23
  react_1.default.createElement(ExpandedValueTooltip_1.ExpandedValueTooltip, { value: label },
25
- react_1.default.createElement("div", { className: (0, classnames_1.default)(styles.name, (_d = {}, _d[styles.disabled] = disabled, _d)) }, label || react_1.default.createElement("span", { className: styles.noSelect }, ui_i18n_1.default.text('Select attribute')))),
24
+ react_1.default.createElement("div", { className: (0, classnames_1.default)(AttributeTitle_module_css_1.default.name, (_d = {}, _d[AttributeTitle_module_css_1.default.disabled] = disabled, _d)) }, label || react_1.default.createElement("span", { className: AttributeTitle_module_css_1.default.noSelect }, ui_i18n_1.default.text('Select attribute')))),
26
25
  react_1.default.createElement(SmallIconButton_1.SmallIconButton, { size: 'M', icon: ArrowDropDown_1.default, disabled: disabled })));
27
26
  };
28
27
  exports.AttributeTitle = AttributeTitle;
@@ -0,0 +1,9 @@
1
+ const styles = {"attribute":"AttributeTitle-attribute--PQXXK","attributeWithValue":"AttributeTitle-attributeWithValue--5qs7j","disabled":"AttributeTitle-disabled--FtTal","name":"AttributeTitle-name--HETn3","noSelect":"AttributeTitle-noSelect--g3tQy"};
2
+ if (typeof document !== 'undefined') {
3
+ const head = document.head || document.getElementsByTagName('head')[0]
4
+ const style = document.createElement('style');
5
+ style.type = 'text/css'
6
+ style.innerHTML = `.AttributeTitle-attribute--PQXXK{align-items:center;cursor:pointer;display:flex;flex-basis:100%;line-height:16px;padding:0 10px 0 16px;width:calc(100% - 32px)}.AttributeTitle-attribute--PQXXK.AttributeTitle-attributeWithValue--5qs7j{border-bottom:1px solid rgba(0,0,0,.38)}.AttributeTitle-attribute--PQXXK.AttributeTitle-disabled--FtTal{cursor:default}.AttributeTitle-name--HETn3{color:rgba(0,0,0,.87);direction:rtl;flex:1 0;font-size:14px;overflow:hidden;text-align:left;text-overflow:ellipsis;white-space:nowrap;width:0}.AttributeTitle-name--HETn3 .AttributeTitle-noSelect--g3tQy{color:rgba(0,0,0,.38)}.AttributeTitle-name--HETn3.AttributeTitle-disabled--FtTal,.AttributeTitle-name--HETn3.AttributeTitle-disabled--FtTal .AttributeTitle-noSelect--g3tQy{color:rgba(0,0,0,.26)}.AttributeTitle-name--HETn3:after{content:"\\200E"}`;
7
+ head.appendChild(style);
8
+ }
9
+ module.exports = styles;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reltio/components",
3
- "version": "1.4.2147",
3
+ "version": "1.4.2149",
4
4
  "license": "SEE LICENSE IN LICENSE FILE",
5
5
  "main": "./cjs/index.js",
6
6
  "module": "./index.js",
@@ -11,7 +11,7 @@
11
11
  "@fluentui/react-context-selector": "^9.1.26",
12
12
  "@googlemaps/markerclusterer": "^2.5.3",
13
13
  "@react-sigma/core": "3.4.0",
14
- "@reltio/mdm-sdk": "^1.4.1970",
14
+ "@reltio/mdm-sdk": "^1.4.1971",
15
15
  "@vis.gl/react-google-maps": "^1.3.0",
16
16
  "d3-cloud": "^1.2.5",
17
17
  "d3-geo": "^2.0.1",
@@ -1 +0,0 @@
1
- export declare const useStyles: (props?: any) => import("@mui/styles").ClassNameMap<"disabled" | "name" | "attribute" | "attributeWithValue" | "noSelect">;
@@ -1,41 +0,0 @@
1
- import { makeStyles } from '@mui/styles';
2
- export var useStyles = makeStyles({
3
- attribute: {
4
- cursor: 'pointer',
5
- lineHeight: '16px',
6
- flexBasis: '100%',
7
- display: 'flex',
8
- alignItems: 'center',
9
- padding: '0 10px 0 16px',
10
- width: 'calc(100% - 32px)',
11
- '&$attributeWithValue': {
12
- borderBottom: '1px solid rgba(0,0,0,0.38)'
13
- },
14
- '&$disabled': {
15
- cursor: 'default'
16
- }
17
- },
18
- disabled: {},
19
- attributeWithValue: {},
20
- noSelect: {},
21
- name: {
22
- fontSize: '14px',
23
- color: 'rgba(0,0,0,0.87)',
24
- overflow: 'hidden',
25
- whiteSpace: 'nowrap',
26
- textOverflow: 'ellipsis',
27
- direction: 'rtl',
28
- textAlign: 'left',
29
- flex: '1 0',
30
- width: '0',
31
- '& $noSelect': {
32
- color: 'rgba(0,0,0,0.38)'
33
- },
34
- '&$disabled': {
35
- color: 'rgba(0,0,0,0.26)',
36
- '& $noSelect': {
37
- color: 'rgba(0,0,0,0.26)'
38
- }
39
- }
40
- }
41
- });
@@ -1 +0,0 @@
1
- export declare const useStyles: (props?: any) => import("@mui/styles").ClassNameMap<"disabled" | "name" | "attribute" | "attributeWithValue" | "noSelect">;
@@ -1,44 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.useStyles = void 0;
4
- var styles_1 = require("@mui/styles");
5
- exports.useStyles = (0, styles_1.makeStyles)({
6
- attribute: {
7
- cursor: 'pointer',
8
- lineHeight: '16px',
9
- flexBasis: '100%',
10
- display: 'flex',
11
- alignItems: 'center',
12
- padding: '0 10px 0 16px',
13
- width: 'calc(100% - 32px)',
14
- '&$attributeWithValue': {
15
- borderBottom: '1px solid rgba(0,0,0,0.38)'
16
- },
17
- '&$disabled': {
18
- cursor: 'default'
19
- }
20
- },
21
- disabled: {},
22
- attributeWithValue: {},
23
- noSelect: {},
24
- name: {
25
- fontSize: '14px',
26
- color: 'rgba(0,0,0,0.87)',
27
- overflow: 'hidden',
28
- whiteSpace: 'nowrap',
29
- textOverflow: 'ellipsis',
30
- direction: 'rtl',
31
- textAlign: 'left',
32
- flex: '1 0',
33
- width: '0',
34
- '& $noSelect': {
35
- color: 'rgba(0,0,0,0.38)'
36
- },
37
- '&$disabled': {
38
- color: 'rgba(0,0,0,0.26)',
39
- '& $noSelect': {
40
- color: 'rgba(0,0,0,0.26)'
41
- }
42
- }
43
- }
44
- });