How to use the scrivito.provideWidgetClass function in scrivito

To help you get started, we’ve selected a few scrivito examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Scrivito / scrivito_example_app_js / src / Widgets / AddressWidget / AddressWidgetClass.js View on Github external
import * as Scrivito from "scrivito";
import { registerTextExtract } from "../../utils/textExtractRegistry";

const AddressWidget = Scrivito.provideWidgetClass("AddressWidget", {
  attributes: {
    showLogo: ["enum", { values: ["yes", "no"] }],
    showBorderBottom: ["enum", { values: ["yes", "no"] }],

    locationName: "string",
    locationStreetAddress: "string",
    locationLocality: "string",
    locationPostalCode: "string",
    locationRegion: "string",
    locationCountry: "string",
    addressFormat: ["enum", { values: ["USA", "GER"] }],

    phone: "string",
    fax: "string",
    email: "string",
  },
github Scrivito / scrivito_example_app_js / src / Widgets / LinkContainerWidget / LinkContainerWidgetClass.js View on Github external
import * as Scrivito from "scrivito";

const LinkContainerWidget = Scrivito.provideWidgetClass("LinkContainerWidget", {
  attributes: {
    headline: "string",
    links: ["widgetlist", { only: "LinkWidget" }],
  },
});

export default LinkContainerWidget;
github Scrivito / scrivito_example_app_js / src / Widgets / ThumbnailGalleryWidget / ThumbnailGalleryWidgetClass.js View on Github external
import * as Scrivito from "scrivito";

const ThumbnailGalleryWidget = Scrivito.provideWidgetClass(
  "ThumbnailGalleryWidget",
  {
    attributes: {
      images: ["widgetlist", { only: "ThumbnailGalleryImageWidget" }],
      showTags: ["enum", { values: ["yes", "no"] }],
    },
  }
);

export default ThumbnailGalleryWidget;
github Scrivito / scrivito_example_app_js / src / Widgets / TableRowWidget / TableRowWidgetClass.js View on Github external
import * as Scrivito from "scrivito";
import { registerTextExtract } from "../../utils/textExtractRegistry";

const TableRowWidget = Scrivito.provideWidgetClass("TableRowWidget", {
  attributes: {
    cell1: "string",
    cell2: [
      "widgetlist",
      { only: ["IconWidget", "TextWidget", "PriceWidget"] },
    ],
    cell3: [
      "widgetlist",
      { only: ["IconWidget", "TextWidget", "PriceWidget"] },
    ],
    cell4: [
      "widgetlist",
      { only: ["IconWidget", "TextWidget", "PriceWidget"] },
    ],
  },
  onlyInside: "TableWidget",
github Scrivito / scrivito_example_app_js / src / Widgets / HeadlineWidget / HeadlineWidgetClass.js View on Github external
import * as Scrivito from "scrivito";
import { registerTextExtract } from "../../utils/textExtractRegistry";

const HeadlineWidget = Scrivito.provideWidgetClass("HeadlineWidget", {
  attributes: {
    headline: "string",
    level: ["enum", { values: ["h1", "h2", "h3", "h4", "h5", "h6"] }],
    style: ["enum", { values: ["h1", "h2", "h3", "h4", "h5", "h6"] }],
    alignment: ["enum", { values: ["left", "center", "right"] }],
    showDividingLine: ["enum", { values: ["yes", "no"] }],
    showMargin: ["enum", { values: ["yes", "no"] }],
  },
});

registerTextExtract("HeadlineWidget", [
  { attribute: "headline", type: "string" },
]);

export default HeadlineWidget;
github Scrivito / scrivito_example_app_js / src / Widgets / IconWidget / IconWidgetClass.js View on Github external
import * as Scrivito from "scrivito";

const IconWidget = Scrivito.provideWidgetClass("IconWidget", {
  attributes: {
    icon: "string",
    size: [
      "enum",
      { values: ["fa-1x", "fa-lg", "fa-2x", "fa-3x", "fa-4x", "fa-5x"] },
    ],
    alignment: ["enum", { values: ["left", "center", "right"] }],
    link: "link",
  },
});

export default IconWidget;
github Scrivito / scrivito_example_app_js / src / Widgets / CarouselWidget / CarouselWidgetClass.js View on Github external
import * as Scrivito from "scrivito";
import { registerTextExtract } from "../../utils/textExtractRegistry";

const CarouselWidget = Scrivito.provideWidgetClass("CarouselWidget", {
  attributes: {
    images: ["referencelist", { only: ["Image"] }],
    showDescription: ["enum", { values: ["yes", "no"] }],
    descriptionLogo: ["reference", { only: ["Image"] }],
    description: "widgetlist",
  },
});

registerTextExtract("CarouselWidget", [
  { attribute: "description", type: "widgetlist" },
]);

export default CarouselWidget;
github Scrivito / scrivito_example_app_js / src / Widgets / SectionWidget / SectionWidgetClass.js View on Github external
import * as Scrivito from "scrivito";
import { registerTextExtract } from "../../utils/textExtractRegistry";

const SectionWidget = Scrivito.provideWidgetClass("SectionWidget", {
  attributes: {
    content: "widgetlist",
    useFullWidth: ["enum", { values: ["yes", "no"] }],
    useFullHeight: ["enum", { values: ["yes", "no"] }],
    showPadding: ["enum", { values: ["yes", "no"] }],
    backgroundColor: [
      "enum",
      {
        values: [
          "white",
          "greywhite",
          "greylight",
          "greymiddle",
          "greydark",
          "brand-primary",
          "brand-secondary",
github Scrivito / scrivito_example_app_js / src / Widgets / PriceWidget / PriceWidgetClass.js View on Github external
import * as Scrivito from "scrivito";
import { registerTextExtract } from "../../utils/textExtractRegistry";

const PriceWidget = Scrivito.provideWidgetClass("PriceWidget", {
  onlyInside: "TableRowWidget",
  attributes: {
    currency: "string",
    period: "string",
    price: "string",
  },
});

registerTextExtract("PriceWidget", [
  { attribute: "price", type: "string" },
  { attribute: "currency", type: "string" },
  { attribute: "period", type: "string" },
]);

export default PriceWidget;
github Scrivito / scrivito_example_app_js / src / Widgets / GoogleMapsWidget / GoogleMapsWidgetClass.js View on Github external
import * as Scrivito from "scrivito";
import { registerTextExtract } from "../../utils/textExtractRegistry";

const GoogleMapsWidget = Scrivito.provideWidgetClass("GoogleMapsWidget", {
  attributes: {
    address: "string",
    mapType: ["enum", { values: ["interactive", "static"] }],
    zoom: [
      "enum",
      {
        values: [
          "1",
          "2",
          "3",
          "4",
          "5",
          "6",
          "7",
          "8",
          "9",

scrivito

Scrivito is a professional, yet easy to use SaaS Enterprise Content Management Service, built for digital agencies and medium to large businesses. It is completely maintenance-free, cost-effective, and has unprecedented performance and security.

LGPL-3.0
Latest version published 11 days ago

Package Health Score

68 / 100
Full package analysis