oolib 2.188.4 → 2.188.6

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.
@@ -84,8 +84,8 @@ function ImageEditor(_a) {
84
84
  //backwards compat
85
85
  _e = _c.richTextHasValue,
86
86
  //backwards compat
87
- richTextHasValue = _e === void 0 ? function () { return false; } : _e; //temporarily passed thru from okf
88
- var _f = (0, react_1.useState)(_underEditImageData || undefined), underEditImageData = _f[0], setUnderEditImageData = _f[1];
87
+ richTextHasValue = _e === void 0 ? function () { return false; } : _e, _f = _c.allTpls, allTpls = _f === void 0 ? [] : _f; //temporarily passed thru from okf
88
+ var _g = (0, react_1.useState)(_underEditImageData || undefined), underEditImageData = _g[0], setUnderEditImageData = _g[1];
89
89
  var screenWidth = (0, _EXPORTS_1.useScreenWidth)();
90
90
  //set state in parent imageeditor
91
91
  (0, react_1.useEffect)(function () {
@@ -100,15 +100,15 @@ function ImageEditor(_a) {
100
100
  * underEditImageData is merged into imageData, only if the 'formattings'
101
101
  * are 'saved'
102
102
  */
103
- var _g = underEditImageData || imageData, publicUrl = _g.publicUrl, _h = _g.imageSpread, imageSpread = _h === void 0 ? defaultImageSpread : _h, _j = _g.imageRotate, imageRotate = _j === void 0 ? 0 : _j, _k = _g.cropX, cropX = _k === void 0 ? 0 : _k, _l = _g.cropY, cropY = _l === void 0 ? 0 : _l;
103
+ var _h = underEditImageData || imageData, publicUrl = _h.publicUrl, _j = _h.imageSpread, imageSpread = _j === void 0 ? defaultImageSpread : _j, _k = _h.imageRotate, imageRotate = _k === void 0 ? 0 : _k, _l = _h.cropX, cropX = _l === void 0 ? 0 : _l, _m = _h.cropY, cropY = _m === void 0 ? 0 : _m;
104
104
  /**
105
105
  * repos management
106
106
  */
107
107
  var wrapperRef = (0, react_1.useRef)(null);
108
108
  var renderedImageRef = (0, react_1.useRef)(null);
109
109
  var isFirstMount = (0, react_1.useRef)(true);
110
- var _m = (0, react_1.useState)(undefined), fullWidthOrFullHeightImg = _m[0], setFullWidthOrFullHeightImg = _m[1];
111
- var _o = (0, useReorientImage_1.useReorientImage)({
110
+ var _o = (0, react_1.useState)(undefined), fullWidthOrFullHeightImg = _o[0], setFullWidthOrFullHeightImg = _o[1];
111
+ var _p = (0, useReorientImage_1.useReorientImage)({
112
112
  imageRotate: imageRotate,
113
113
  setFullWidthOrFullHeightImg: setFullWidthOrFullHeightImg,
114
114
  setUnderEditImageData: setUnderEditImageData,
@@ -118,10 +118,10 @@ function ImageEditor(_a) {
118
118
  isFirstMount: isFirstMount,
119
119
  handleDeleteSingleImage: handleDeleteSingleImage,
120
120
  readOnly: readOnly
121
- }), reorientedImageTempUrl = _o.reorientedImageTempUrl, imageLazyLoading = _o.imageLazyLoading;
122
- var _p = (0, react_1.useState)(undefined), showDeleteImageModal = _p[0], setShowDeleteImageModal = _p[1];
121
+ }), reorientedImageTempUrl = _p.reorientedImageTempUrl, imageLazyLoading = _p.imageLazyLoading;
122
+ var _q = (0, react_1.useState)(undefined), showDeleteImageModal = _q[0], setShowDeleteImageModal = _q[1];
123
123
  var inputRef = (0, react_1.useRef)(null);
124
- var _q = (0, react_1.useState)(undefined), editorStyle = _q[0], setEditorStyle = _q[1]; //alt: modal
124
+ var _r = (0, react_1.useState)(undefined), editorStyle = _r[0], setEditorStyle = _r[1]; //alt: modal
125
125
  (0, react_1.useEffect)(function () { isFirstMount.current = false; }, []);
126
126
  var decideEditorStyle = function () {
127
127
  var _a = wrapperRef.current.getBoundingClientRect(), width = _a.width, height = _a.height;
@@ -183,7 +183,7 @@ function ImageEditor(_a) {
183
183
  readOnly && react_1.default.createElement(Divider_1.Divider, { invert: invert }))),
184
184
  (imageTags === null || imageTags === void 0 ? void 0 : imageTags.enable) &&
185
185
  ((_b = imageTags === null || imageTags === void 0 ? void 0 : imageTags.config) === null || _b === void 0 ? void 0 : _b.map(function (_a) {
186
- var _b;
186
+ var _b, _c, _d, _e;
187
187
  var comp = _a.comp, tagCategory = _a.tagCategory;
188
188
  var compsLookup = {
189
189
  TagsInputMulti: TagsInputMulti,
@@ -192,7 +192,7 @@ function ImageEditor(_a) {
192
192
  var Comp = compsLookup[comp];
193
193
  if (!Comp)
194
194
  return react_1.default.createElement("div", null, "placeholder for tag input");
195
- return (react_1.default.createElement(Comp, { popOutOfOverflowHiddenParent: true, tagType: tagCategory, value: (_b = imageData.tags) === null || _b === void 0 ? void 0 : _b[tagCategory], onChange: function (id, val) {
195
+ return (react_1.default.createElement(Comp, { label: ((_d = (_c = (_b = allTpls.find(function (tpl) { return tpl.kp_content_type === tagCategory; })) === null || _b === void 0 ? void 0 : _b.general) === null || _c === void 0 ? void 0 : _c.content) === null || _d === void 0 ? void 0 : _d.title) || tagCategory, popOutOfOverflowHiddenParent: true, tagType: tagCategory, value: (_e = imageData.tags) === null || _e === void 0 ? void 0 : _e[tagCategory], onChange: function (id, val) {
196
196
  var _a;
197
197
  handleSingleImageDataChange({
198
198
  publicUrl: publicUrl,
@@ -173,7 +173,7 @@ exports.CheckboxList.argTypes = {
173
173
  };
174
174
  var CheckboxInput = function (args) {
175
175
  var _a = (0, react_1.useState)([]), value = _a[0], setValue = _a[1];
176
- var _b = (0, react_1.useState)({ value: "smth", display: "Squidward" }), option = _b[0], setOption = _b[1];
176
+ var _b = (0, react_1.useState)({ value: "smth", display: "Squidward", desc: 'This is an explanation' }), option = _b[0], setOption = _b[1];
177
177
  (0, react_1.useEffect)(function () {
178
178
  setOption(__assign(__assign({}, option), { display: args.option1 }));
179
179
  }, [args.option1]);
@@ -52,7 +52,7 @@ var useStyleUpdateAfterToggleTransition_1 = require("../../../utils/useStyleUpda
52
52
  var StyledContainer = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n border-radius: 0.8rem;\n border: 1px solid ", ";\n background: #ffffff;\n box-shadow: 0px 4px 10px 0px rgba(0, 0, 0, 0.06);\n"], ["\n border-radius: 0.8rem;\n border: 1px solid ", ";\n background: #ffffff;\n box-shadow: 0px 4px 10px 0px rgba(0, 0, 0, 0.06);\n"])), colors_1.colors.grey10);
53
53
  var StyledHeader = styled_components_1.default.button(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n width: 100%;\n padding: 1rem 1.6rem;\n text-align: left;\n background: none;\n border: none;\n cursor: pointer;\n display: flex;\n align-items: center;\n"], ["\n width: 100%;\n padding: 1rem 1.6rem;\n text-align: left;\n background: none;\n border: none;\n cursor: pointer;\n display: flex;\n align-items: center;\n"])));
54
54
  var StyledRightHeaderSection = styled_components_1.default.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n"], ["\n display: flex;\n align-items: center;\n"])));
55
- var ArrowWrapper = styled_components_1.default.button(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n border: none;\n background: none;\n cursor: pointer;\n width: 2rem;\n display: flex;\n align-items: center;\n justify-content: center;\n transform: rotate(", "deg);\n ", ";\n"], ["\n border: none;\n background: none;\n cursor: pointer;\n width: 2rem;\n display: flex;\n align-items: center;\n justify-content: center;\n transform: rotate(", "deg);\n ", ";\n"])), function (props) { return (props.isExpanded ? 0 : 180); }, (0, mixins_1.transition)("transform"));
55
+ var ArrowWrapper = styled_components_1.default.button(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n border: none;\n background: none;\n cursor: pointer;\n width: 2rem;\n display: flex;\n align-items: center;\n justify-content: center;\n transform: rotate(", "deg);\n ", ";\n"], ["\n border: none;\n background: none;\n cursor: pointer;\n width: 2rem;\n display: flex;\n align-items: center;\n justify-content: center;\n transform: rotate(", "deg);\n ", ";\n"])), function (props) { return (props.isExpanded ? 180 : 0); }, (0, mixins_1.transition)("transform"));
56
56
  var StyledContentWrapper = styled_components_1.default.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n display: flex;\n align-items: flex-end;\n \n ", "\n height: ", ";\n"], ["\n display: flex;\n align-items: flex-end;\n \n ", "\n height: ", ";\n"])), function (_a) {
57
57
  var expandAnimationDuration = _a.expandAnimationDuration;
58
58
  return (0, mixins_1.transition)("height ".concat(expandAnimationDuration / 1000, "s ease-out"));
@@ -43,6 +43,8 @@ var CheckboxInput = function (_a) {
43
43
  : genCheckboxButton({ disabled: true }) //else rightWrongResult has come in, but this doesnt have to be marked right or wrong
44
44
  : genCheckboxButton() // rightWrongResult has not come in. so gen normal radio button
45
45
  ),
46
- react_1.default.createElement(Typo2_1.UI_BODY_SM_DF, { bold: rightWrongResult && isSelected, color: disabled ? grey40 : grey80, invert: invert }, option.display)));
46
+ react_1.default.createElement("div", null,
47
+ react_1.default.createElement(Typo2_1.UI_BODY_SM_DF, { bold: rightWrongResult && isSelected, color: disabled ? grey40 : grey80, invert: invert }, option.display),
48
+ option.desc && react_1.default.createElement(Typo2_1.UI_CAPTION_DF, null, option.desc))));
47
49
  };
48
50
  exports.CheckboxInput = CheckboxInput;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oolib",
3
- "version": "2.188.4",
3
+ "version": "2.188.6",
4
4
  "description": " OKE Component Library",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",