* created new widget * new lib for document viewer * added cypress tests * updated icon * handling different url types with viewer * add to ignore react-documents in jest transformIgnorePatterns * added jest test, updated comments * required changes * updated cypress test * updated icon svg * doc viewer new renderers added * comment as required * updated test case * added url / base64 validations * updated url checking condition for space and updated test case * cypress selector update * updated url validations * Merge branch 'release' into feature/new-document-viewer * lazy load external lib
28 lines
989 B
TypeScript
28 lines
989 B
TypeScript
import Widget from "./widget";
|
|
import IconSVG from "./icon.svg";
|
|
import { GRID_DENSITY_MIGRATION_V1 } from "widgets/constants";
|
|
|
|
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
|
|
defaults: {
|
|
widgetName: "DocumentViewer",
|
|
docUrl:
|
|
"https://www.learningcontainer.com/wp-content/uploads/2019/09/sample-pdf-file.pdf",
|
|
rows: 10 * GRID_DENSITY_MIGRATION_V1,
|
|
columns: 6 * GRID_DENSITY_MIGRATION_V1,
|
|
version: 1,
|
|
},
|
|
properties: {
|
|
derived: Widget.getDerivedPropertiesMap(),
|
|
default: Widget.getDefaultPropertiesMap(),
|
|
meta: Widget.getMetaPropertiesMap(),
|
|
config: Widget.getPropertyPaneConfig(),
|
|
},
|
|
};
|
|
|
|
export default Widget;
|