PromucFlow_constructor/app/client/src/widgets/DocumentViewerWidget/index.ts
Preet Sidhu 6a8806f629
feat: Add widget responsiveness and conversion algorithm (#21386)
## Description

QA branch for mobile responsiveness

---------

Co-authored-by: Aswath K <aswath@appsmith.com>
Co-authored-by: Arsalan Yaldram <arsalanyaldram0211@outlook.com>
Co-authored-by: Aswath K <aswath.sana@gmail.com>
Co-authored-by: Ashok Kumar M <35134347+marks0351@users.noreply.github.com>
Co-authored-by: rahulramesha <rahul@appsmith.com>
2023-04-07 09:51:35 -04:00

45 lines
1.3 KiB
TypeScript

import { ResponsiveBehavior } from "utils/autoLayout/constants";
import IconSVG from "./icon.svg";
import Widget from "./widget";
export const CONFIG = {
type: Widget.getWidgetType(),
name: "Document Viewer", // The display name which will be made in uppercase and show in the widgets panel ( can have spaces )
iconSVG: IconSVG,
needsMeta: false, // Defines if this widget adds any meta properties
isCanvas: false, // Defines if this widget has a canvas within in which we can drop other widgets
searchTags: ["pdf"],
defaults: {
widgetName: "DocumentViewer",
docUrl:
"https://www.learningcontainer.com/wp-content/uploads/2019/09/sample-pdf-file.pdf",
rows: 40,
columns: 24,
version: 1,
animateLoading: true,
responsiveBehavior: ResponsiveBehavior.Fill,
},
properties: {
derived: Widget.getDerivedPropertiesMap(),
default: Widget.getDefaultPropertiesMap(),
meta: Widget.getMetaPropertiesMap(),
config: Widget.getPropertyPaneConfig(),
contentConfig: Widget.getPropertyPaneContentConfig(),
},
autoLayout: {
widgetSize: [
{
viewportMinWidth: 0,
configuration: () => {
return {
minWidth: "280px",
minHeight: "280px",
};
},
},
],
},
};
export default Widget;