oolib 2.188.2 → 2.188.4
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,5 +1,5 @@
|
|
|
1
1
|
export const ImageInputContext: React.Context<any>;
|
|
2
|
-
export function ImageInputContextProvider({ children, value, multiple, allowedFormats, formatConvertConfig, folderName, bucketEnv, onChange, id, aspectRatio, readOnly, enableCaptions, defaultImageSpread, invert, containerShape, stretchToFullHeight, dropzoneLabel, dropzoneSublabel, disableImageBorder, omitEditorTools, files, showOptionalLabelInDropzone, isRequired, isInRTE, showImageUploadCaution }: {
|
|
2
|
+
export function ImageInputContextProvider({ children, value, multiple, allowedFormats, formatConvertConfig, folderName, bucketEnv, onChange, id, aspectRatio, readOnly, enableCaptions, defaultImageSpread, invert, containerShape, stretchToFullHeight, dropzoneLabel, dropzoneSublabel, disableImageBorder, omitEditorTools, files, showOptionalLabelInDropzone, isRequired, isInRTE, showImageUploadCaution, imageTags }: {
|
|
3
3
|
children: any;
|
|
4
4
|
value: any;
|
|
5
5
|
multiple: any;
|
|
@@ -25,6 +25,7 @@ export function ImageInputContextProvider({ children, value, multiple, allowedFo
|
|
|
25
25
|
isRequired: any;
|
|
26
26
|
isInRTE: any;
|
|
27
27
|
showImageUploadCaution: any;
|
|
28
|
+
imageTags: any;
|
|
28
29
|
}): React.JSX.Element;
|
|
29
30
|
export function useImageInputContext(): any;
|
|
30
31
|
import React from "react";
|
|
@@ -60,7 +60,7 @@ var useFakeUploadMedia_1 = require("../../utilsOolib/useFakeUploadMedia");
|
|
|
60
60
|
var bannerContext_1 = require("../Banners/bannerContext");
|
|
61
61
|
exports.ImageInputContext = (0, react_1.createContext)();
|
|
62
62
|
var ImageInputContextProvider = function (_a) {
|
|
63
|
-
var children = _a.children, value = _a.value, multiple = _a.multiple, allowedFormats = _a.allowedFormats, formatConvertConfig = _a.formatConvertConfig, folderName = _a.folderName, bucketEnv = _a.bucketEnv, onChange = _a.onChange, id = _a.id, aspectRatio = _a.aspectRatio, readOnly = _a.readOnly, enableCaptions = _a.enableCaptions, defaultImageSpread = _a.defaultImageSpread, invert = _a.invert, containerShape = _a.containerShape, stretchToFullHeight = _a.stretchToFullHeight, dropzoneLabel = _a.dropzoneLabel, dropzoneSublabel = _a.dropzoneSublabel, disableImageBorder = _a.disableImageBorder, omitEditorTools = _a.omitEditorTools, files = _a.files, showOptionalLabelInDropzone = _a.showOptionalLabelInDropzone, isRequired = _a.isRequired, isInRTE = _a.isInRTE, showImageUploadCaution = _a.showImageUploadCaution;
|
|
63
|
+
var children = _a.children, value = _a.value, multiple = _a.multiple, allowedFormats = _a.allowedFormats, formatConvertConfig = _a.formatConvertConfig, folderName = _a.folderName, bucketEnv = _a.bucketEnv, onChange = _a.onChange, id = _a.id, aspectRatio = _a.aspectRatio, readOnly = _a.readOnly, enableCaptions = _a.enableCaptions, defaultImageSpread = _a.defaultImageSpread, invert = _a.invert, containerShape = _a.containerShape, stretchToFullHeight = _a.stretchToFullHeight, dropzoneLabel = _a.dropzoneLabel, dropzoneSublabel = _a.dropzoneSublabel, disableImageBorder = _a.disableImageBorder, omitEditorTools = _a.omitEditorTools, files = _a.files, showOptionalLabelInDropzone = _a.showOptionalLabelInDropzone, isRequired = _a.isRequired, isInRTE = _a.isInRTE, showImageUploadCaution = _a.showImageUploadCaution, imageTags = _a.imageTags;
|
|
64
64
|
var theme = (0, styled_components_1.useTheme)();
|
|
65
65
|
var _b = (0, react_1.useState)(undefined), uploadProgress = _b[0], setUploadProgress = _b[1];
|
|
66
66
|
var handleUploadProgess = function (progress) { return setUploadProgress(progress); };
|
|
@@ -184,6 +184,7 @@ var ImageInputContextProvider = function (_a) {
|
|
|
184
184
|
aspectRatio: aspectRatio,
|
|
185
185
|
readOnly: readOnly,
|
|
186
186
|
enableCaptions: enableCaptions,
|
|
187
|
+
imageTags: imageTags,
|
|
187
188
|
defaultImageSpread: defaultImageSpread,
|
|
188
189
|
invert: invert,
|
|
189
190
|
containerShape: containerShape,
|
|
@@ -77,6 +77,7 @@ function ImageEditor(_a) {
|
|
|
77
77
|
//sent by parent ImageEditor to child (modal) ImageEditor
|
|
78
78
|
_underEditImageData = _a.underEditImageData, //ImageEditor passes this to its recursive self when opening in popup
|
|
79
79
|
_setUnderEditImageData = _a.setUnderEditImageData, isInPopUp = _a.isInPopUp, isInRTE = _a.isInRTE, handleDragStart = _a.handleDragStart;
|
|
80
|
+
console.log({ imageTags: imageTags });
|
|
80
81
|
var theme = (0, styled_components_1.useTheme)();
|
|
81
82
|
var _c = theme || {}, LexicalTextEditor = _c.LexicalTextEditor, _d = _c.lexicalTextEditorHasValue, lexicalTextEditorHasValue = _d === void 0 ? function () { return false; } : _d, //we are just defaulting to false for oolib preview. Meaning, when previewing in oolib, since this function doesnt exist (as it has to be provided by okf-fe), we will always return false from it.
|
|
82
83
|
TagsInputSingle = _c.TagsInputSingle, TagsInputMulti = _c.TagsInputMulti,
|
|
@@ -191,7 +192,7 @@ function ImageEditor(_a) {
|
|
|
191
192
|
var Comp = compsLookup[comp];
|
|
192
193
|
if (!Comp)
|
|
193
194
|
return react_1.default.createElement("div", null, "placeholder for tag input");
|
|
194
|
-
return (react_1.default.createElement(Comp, { 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, { popOutOfOverflowHiddenParent: true, tagType: tagCategory, value: (_b = imageData.tags) === null || _b === void 0 ? void 0 : _b[tagCategory], onChange: function (id, val) {
|
|
195
196
|
var _a;
|
|
196
197
|
handleSingleImageDataChange({
|
|
197
198
|
publicUrl: publicUrl,
|
|
@@ -113,7 +113,15 @@ var ImageGallery_ = function (args) {
|
|
|
113
113
|
react_1.default.createElement(Container_1.Container, null,
|
|
114
114
|
react_1.default.createElement(Paddings_1.PaddingTopBottom30, null,
|
|
115
115
|
react_1.default.createElement("div", { style: { width: props.size } },
|
|
116
|
-
react_1.default.createElement(ImageInput_1.ImageInput, __assign({ key: key }, props, {
|
|
116
|
+
react_1.default.createElement(ImageInput_1.ImageInput, __assign({ key: key }, props, { imageTags: {
|
|
117
|
+
enable: true,
|
|
118
|
+
config: [
|
|
119
|
+
{
|
|
120
|
+
comp: 'hei',
|
|
121
|
+
tagCategory: 'acdsc'
|
|
122
|
+
}
|
|
123
|
+
]
|
|
124
|
+
}, multiple: true })))))));
|
|
117
125
|
};
|
|
118
126
|
exports.ImageGallery = {
|
|
119
127
|
argTypes: (0, excludeKeys_1.excludeKeys)(imageInputArgTypes_1.imageInputArgTypes, [
|