oolib 2.84.1 → 2.85.0
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.
|
@@ -104,8 +104,8 @@ function PDFInput(_a) {
|
|
|
104
104
|
}, []);
|
|
105
105
|
return (react_1.default.createElement(react_3.Fragment, null,
|
|
106
106
|
react_1.default.createElement(BlockLabel_1.BlockLabel, __assign({}, (0, getBlockLabelProps_1.getBlockLabelProps)(props), { invert: invert })),
|
|
107
|
-
readOnly ? (value === null || value === void 0 ? void 0 : value.map(function (d, i) { return (react_1.default.createElement(PDFEmbed_1.default, { key: i, filePath: d.publicUrl, fileName: d.originalFilename, fileID: d.generation })); }))
|
|
108
|
-
: !value && !isLoading ? (react_1.default.createElement(UploadWrapper_1.UploadWrapper, { invert: invert },
|
|
107
|
+
readOnly ? ((value === null || value === void 0 ? void 0 : value.length) > 0 || (value === null || value === void 0 ? void 0 : value.map(function (d, i) { return (react_1.default.createElement(PDFEmbed_1.default, { key: i, filePath: d.publicUrl, fileName: d.originalFilename, fileID: d.generation })); })))
|
|
108
|
+
: !value || (value === null || value === void 0 ? void 0 : value.length) === 0 && !isLoading ? (react_1.default.createElement(UploadWrapper_1.UploadWrapper, { invert: invert },
|
|
109
109
|
react_1.default.createElement(Buttons_1.ButtonSecondary, { onClick: function () { return inputRef.current.click(); }, icon: "UploadSimple", value: "Upload Pdf", invert: invert }))) : isLoading ? (react_1.default.createElement(UploadWrapper_1.UploadWrapper, null,
|
|
110
110
|
react_1.default.createElement(ProgressBar_1.ProgressBar, { progress: uploadProgress, text: uploadProgress && uploadProgress !== 100
|
|
111
111
|
? uploadProgress + "%"
|
|
@@ -126,7 +126,7 @@ function VideoInput(_a) {
|
|
|
126
126
|
isLoading ? (react_1.default.createElement(UploadWrapper_1.UploadWrapper, { invert: invert },
|
|
127
127
|
react_1.default.createElement(LoadersAndProgress_1.ProgressBar, { progress: uploadProgress, text: uploadProgress && uploadProgress !== 100
|
|
128
128
|
? uploadProgress + "%"
|
|
129
|
-
: "Almost Done..." }))) : value ? (createVideoPreview({ value: value, actionMenuButton: true })) : (react_1.default.createElement(UploadWrapper_1.UploadWrapper, { invert: invert },
|
|
129
|
+
: "Almost Done..." }))) : (value === null || value === void 0 ? void 0 : value.length) > 0 ? (createVideoPreview({ value: value, actionMenuButton: true })) : (react_1.default.createElement(UploadWrapper_1.UploadWrapper, { invert: invert },
|
|
130
130
|
react_1.default.createElement(Buttons_1.ButtonSecondary, { value: "Add Video link", icon: "Plus", onClick: function () { return setShowEmbedLinkModal(true); }, invert: invert }),
|
|
131
131
|
enableVideoUpload && (react_1.default.createElement(react_1.default.Fragment, null,
|
|
132
132
|
react_1.default.createElement(Typo_1.SANS_2, { semibold: true, color: invert ? themes_1.colors.white_opacity60 : themes_1.colors.greyColor80 }, "OR"),
|