oolib 2.72.0 → 2.73.1

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.
@@ -43,13 +43,13 @@ var Typo_1 = require("../Typo");
43
43
  var icons_1 = require("../../icons");
44
44
  var themes_1 = require("../../themes");
45
45
  var DisplayIcon = function (_a) {
46
- var icon = _a.icon, size = _a.size, color = _a.color;
46
+ var icon = _a.icon, size = _a.size, color = _a.color, iconWeight = _a.iconWeight;
47
47
  var IconComp = icons_1.icons[icon];
48
- return react_1.default.createElement(react_1.default.Fragment, null, IconComp && react_1.default.createElement(IconComp, { size: size, color: color, weight: "bold" }));
48
+ return react_1.default.createElement(react_1.default.Fragment, null, IconComp && react_1.default.createElement(IconComp, { size: size, color: color, weight: iconWeight || 'bold' }));
49
49
  };
50
50
  var ButtonStyledWrapper = function (_a) {
51
51
  var props = _a.props, variant = _a.variant;
52
- var id = props.id, link = props.link, children = props.children, value = props.value, submit = props.submit, icon = props.icon, iconAfter = props.iconAfter, onClick = props.onClick, onMouseDown = props.onMouseDown, active = props.active, disabled = props.disabled, invert = props.invert, theme = props.theme, width = props.width, onMouseEnter = props.onMouseEnter, onMouseLeave = props.onMouseLeave, color = props.color, style = props.style, className = props.className, S = props.S, M = props.M, iconSize = props.iconSize, _iconColor = props.iconColor, stopPropagation = props.stopPropagation, preventDefault = props.preventDefault, forceHover = props.forceHover //used by multi-option button
52
+ var id = props.id, link = props.link, children = props.children, value = props.value, submit = props.submit, icon = props.icon, iconAfter = props.iconAfter, onClick = props.onClick, onMouseDown = props.onMouseDown, active = props.active, disabled = props.disabled, invert = props.invert, theme = props.theme, width = props.width, onMouseEnter = props.onMouseEnter, onMouseLeave = props.onMouseLeave, color = props.color, style = props.style, className = props.className, S = props.S, M = props.M, iconSize = props.iconSize, _iconColor = props.iconColor, iconWeight = props.iconWeight, stopPropagation = props.stopPropagation, preventDefault = props.preventDefault, forceHover = props.forceHover //used by multi-option button
53
53
  ;
54
54
  /**
55
55
  * WHY WE ARE HAVING TO DO STOP PROPAGATION IN THIS TWISTED WAY:
@@ -101,9 +101,9 @@ var ButtonStyledWrapper = function (_a) {
101
101
  preventDefault && e.preventDefault();
102
102
  debouncedMouseDown && debouncedMouseDown(e);
103
103
  }, composition: composition, width: width, color: color, forceHover: forceHover },
104
- icon && react_1.default.createElement(DisplayIcon, { icon: icon, color: iconColor, size: calcIconSize() }),
104
+ icon && react_1.default.createElement(DisplayIcon, { icon: icon, color: iconColor, size: calcIconSize(), iconWeight: iconWeight || '' }),
105
105
  displayText && react_1.default.createElement(Typo_1.SANS_3, { semibold: true }, displayText),
106
- iconAfter && react_1.default.createElement(DisplayIcon, { icon: iconAfter, color: iconColor, size: calcIconSize() })));
106
+ iconAfter && react_1.default.createElement(DisplayIcon, { icon: iconAfter, color: iconColor, size: calcIconSize(), iconWeight: iconWeight || '' })));
107
107
  };
108
108
  var Button = function (_a) {
109
109
  var props = _a.props, variant = _a.variant;
@@ -1,4 +1,5 @@
1
- export function VideoActionMenu({ isInRTE, value, inputRef, setShowEmbedLinkModal, onChange, isUploadedVideo, invert }: {
1
+ export function VideoActionMenu({ id, isInRTE, value, inputRef, setShowEmbedLinkModal, onChange, isUploadedVideo, invert }: {
2
+ id: any;
2
3
  isInRTE: any;
3
4
  value: any;
4
5
  inputRef: any;
@@ -19,20 +19,20 @@ var react_1 = __importDefault(require("react"));
19
19
  var styled_1 = require("../styled");
20
20
  var ActionMenu_1 = require("../../ActionMenu");
21
21
  var VideoActionMenu = function (_a) {
22
- var isInRTE = _a.isInRTE, value = _a.value, inputRef = _a.inputRef, setShowEmbedLinkModal = _a.setShowEmbedLinkModal, onChange = _a.onChange, isUploadedVideo = _a.isUploadedVideo, invert = _a.invert;
22
+ var id = _a.id, isInRTE = _a.isInRTE, value = _a.value, inputRef = _a.inputRef, setShowEmbedLinkModal = _a.setShowEmbedLinkModal, onChange = _a.onChange, isUploadedVideo = _a.isUploadedVideo, invert = _a.invert;
23
23
  return (react_1.default.createElement(styled_1.StyledActionButtonWrapper, null,
24
24
  react_1.default.createElement("div", { style: __assign({}, (isInRTE ? { display: "none" } : {})) },
25
25
  react_1.default.createElement(ActionMenu_1.ActionMenu, { popOutOfOverflowHiddenParent: true, ButtonComp: "ButtonPrimary", iconSize: "M", invert: invert, actions: [
26
26
  isUploadedVideo(value) // Only allow user to replace URL when embed method is URL
27
27
  ? {
28
- id: "uploadNewVideo",
28
+ id: "".concat(id, "_uploadNewVideo"),
29
29
  display: "Upload New Video",
30
30
  onClick: function () {
31
31
  inputRef.current.click(); // Trigger file explorer popup
32
32
  },
33
33
  }
34
34
  : {
35
- id: "replaceUrl",
35
+ id: "".concat(id, "_replaceUrl"),
36
36
  display: "Replace URL",
37
37
  onClick: function (e) {
38
38
  setShowEmbedLinkModal(true);
@@ -115,7 +115,7 @@ function VideoInput(_a) {
115
115
  url.split("&list=")[0].match(regex)[1];
116
116
  }
117
117
  return (react_1.default.createElement(styled_1.StyledVideoEmbedPreviewSection, { style: { height: height } },
118
- actionMenuButton && react_1.default.createElement(VideoActionMenu_1.VideoActionMenu, __assign({}, __assign(__assign({}, isInRTE), { value: value, inputRef: inputRef, setShowEmbedLinkModal: setShowEmbedLinkModal, onChange: onChange, isUploadedVideo: isUploadedVideo, invert: invert }))),
118
+ actionMenuButton && react_1.default.createElement(VideoActionMenu_1.VideoActionMenu, __assign({}, { isInRTE: isInRTE, value: value, inputRef: inputRef, setShowEmbedLinkModal: setShowEmbedLinkModal, onChange: onChange, isUploadedVideo: isUploadedVideo, invert: invert, id: id })),
119
119
  react_1.default.createElement(react_player_1.default, { id: "outVideo", url: url, controls: true, width: width || "100%", height: height, light: lightPlayer, style: { overflow: "hidden" } })));
120
120
  }
121
121
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oolib",
3
- "version": "2.72.0",
3
+ "version": "2.73.1",
4
4
  "description": " OKE Component Library",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",