oolib 2.31.2 → 2.31.3

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.
@@ -1,4 +1,4 @@
1
- export function OKELink({ to: _to, link, onClick, icon, iconAfter, text, children, invertUnderline, color, invert, disabled, className, style, avatar, iconSize, }: {
1
+ export function OKELink({ to: _to, link, onClick, icon, iconAfter, text, children, invertUnderline, color, invert, disabled, className, style, avatar, iconSize, contentEditable }: {
2
2
  to: any;
3
3
  link: any;
4
4
  onClick: any;
@@ -14,4 +14,5 @@ export function OKELink({ to: _to, link, onClick, icon, iconAfter, text, childre
14
14
  style: any;
15
15
  avatar: any;
16
16
  iconSize: any;
17
+ contentEditable?: boolean;
17
18
  }): any;
@@ -49,7 +49,11 @@ var OKELink = function (_a) {
49
49
  var _to = _a.to, link = _a.link, //link is deprecated. use to instead
50
50
  onClick = _a.onClick, icon = _a.icon, iconAfter = _a.iconAfter, text = _a.text, children = _a.children, invertUnderline = _a.invertUnderline, color = _a.color, invert = _a.invert, disabled = _a.disabled, className = _a.className, style = _a.style, avatar = _a.avatar, // imageData // [ {...} ] OR {...}
51
51
  //imageSize ??
52
- iconSize = _a.iconSize;
52
+ iconSize = _a.iconSize, // S & M type setup?
53
+ _b = _a.contentEditable //important for link to be clickable inside of a RTE
54
+ , // S & M type setup?
55
+ contentEditable = _b === void 0 ? false : _b //important for link to be clickable inside of a RTE
56
+ ;
53
57
  var to = link || _to;
54
58
  var theme = (0, styled_components_1.useTheme)();
55
59
  var localize = (0, utilsOolib_1.useLocale)();
@@ -107,16 +111,16 @@ var OKELink = function (_a) {
107
111
  var genLink = function () {
108
112
  switch (linkType) {
109
113
  case 'external':
110
- return (react_1.default.createElement(styled_1.StyledLink, __assign({ as: 'a', href: !disabled ? (0, injectHttps_1.injectHttps)(to) : undefined, target: "_blank", onClick: function (e) { e.stopPropagation(); } }, commonProps), linkContents));
114
+ return (react_1.default.createElement(styled_1.StyledLink, __assign({ contentEditable: contentEditable, as: 'a', href: !disabled ? (0, injectHttps_1.injectHttps)(to) : undefined, target: "_blank", onClick: function (e) { e.stopPropagation(); } }, commonProps), linkContents));
111
115
  case 'action':
112
- return (react_1.default.createElement(styled_1.StyledLink, __assign({ as: 'span', onClick: function (e) {
116
+ return (react_1.default.createElement(styled_1.StyledLink, __assign({ contentEditable: contentEditable, as: 'span', onClick: function (e) {
113
117
  e.stopPropagation();
114
118
  !disabled && onClick(e);
115
119
  } }, commonProps), linkContents));
116
120
  case 'internal':
117
121
  default:
118
122
  //internal
119
- return (react_1.default.createElement(styled_1.StyledLink, __assign({ as: react_router_dom_1.Link, to: !disabled ? to : undefined, onClick: function (e) { e.stopPropagation(); } }, commonProps), linkContents));
123
+ return (react_1.default.createElement(styled_1.StyledLink, __assign({ contentEditable: contentEditable, as: react_router_dom_1.Link, to: !disabled ? to : undefined, onClick: function (e) { e.stopPropagation(); } }, commonProps), linkContents));
120
124
  }
121
125
  };
122
126
  return react_1.default.createElement(react_1.Fragment, null, genLink());
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oolib",
3
- "version": "2.31.2",
3
+ "version": "2.31.3",
4
4
  "description": " OKE Component Library",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",