Skip to main content

@gooddev/peekjs

Index

Other

Drupal

constWebform

Webform: React.FC<WebformProps> = ...

Component for Rendering Drupal-Webform.

constWebformRadio

WebformRadio: React.FC<WebformCustomComponentProps & Omit<RadioProps, value | label>> = ...

Provider

constPagePropertyProvider

PagePropertyProvider: React.FC<{ children: React.ReactNode }> = ...

Type Aliases

CustomWebformComponentLibrary

CustomWebformComponentLibrary: Record<string, WebformCustomComponent>

Is used to define custom WebformElement components, based on the mashine name as key of Record.

DrupalViewCountDisplayProps

DrupalViewCountDisplayProps: { display: string; hideReset?: boolean; pageInfo: { from: number; isError?: boolean; isLoading?: boolean; pageCount: number; to: number; total: number }; view: string }

Type declaration

  • display: string
  • optionalhideReset?: boolean
  • pageInfo: { from: number; isError?: boolean; isLoading?: boolean; pageCount: number; to: number; total: number }
    • from: number
    • optionalisError?: boolean
    • optionalisLoading?: boolean
    • pageCount: number
    • to: number
    • total: number
  • view: string

DrupalViewProps

DrupalViewProps: { children: (props: { CountDisplay: ReactNode; ExposedFilters: ReactNode; Pager: ReactNode; data: { meta: any; results: any[]; specs?: any } | undefined; from: number; isError: boolean; isLoading: boolean; limit: number | null; pageCount: number; pageNumber: number; to: number; total: number }) => ReactNode; hideDefaultCountDisplay?: boolean; hideDefaultExposedFilters?: boolean; hideDefaultPager?: boolean; offsetTop?: number; pagerComponent?: React.ComponentType<PagePaginationProps>; viewSpecs: { configuration?: TDrupalViewConfiguration; contextFilters?: (string | string[])[]; display: string; exposedFilters?: TDrupalExposedFilerValue; limit: number | null; pagerType?: string; sort_by?: string; sort_order?: string; view: string; viewRelations?: string[] } }

Properties for Component DrupalView.


Type declaration

  • children: (props: { CountDisplay: ReactNode; ExposedFilters: ReactNode; Pager: ReactNode; data: { meta: any; results: any[]; specs?: any } | undefined; from: number; isError: boolean; isLoading: boolean; limit: number | null; pageCount: number; pageNumber: number; to: number; total: number }) => ReactNode
      • (props: { CountDisplay: ReactNode; ExposedFilters: ReactNode; Pager: ReactNode; data: { meta: any; results: any[]; specs?: any } | undefined; from: number; isError: boolean; isLoading: boolean; limit: number | null; pageCount: number; pageNumber: number; to: number; total: number }): ReactNode
      • Parameters

        • props: { CountDisplay: ReactNode; ExposedFilters: ReactNode; Pager: ReactNode; data: { meta: any; results: any[]; specs?: any } | undefined; from: number; isError: boolean; isLoading: boolean; limit: number | null; pageCount: number; pageNumber: number; to: number; total: number }

        Returns ReactNode

  • optionalhideDefaultCountDisplay?: boolean
  • optionalhideDefaultExposedFilters?: boolean
  • optionalhideDefaultPager?: boolean
  • optionaloffsetTop?: number
  • optionalpagerComponent?: React.ComponentType<PagePaginationProps>
  • viewSpecs: { configuration?: TDrupalViewConfiguration; contextFilters?: (string | string[])[]; display: string; exposedFilters?: TDrupalExposedFilerValue; limit: number | null; pagerType?: string; sort_by?: string; sort_order?: string; view: string; viewRelations?: string[] }
    • optionalconfiguration?: TDrupalViewConfiguration
    • optionalcontextFilters?: (string | string[])[]
    • display: string
    • optionalexposedFilters?: TDrupalExposedFilerValue
    • limit: number | null
    • optionalpagerType?: string
    • optionalsort_by?: string
    • optionalsort_order?: string
    • view: string
    • optionalviewRelations?: string[]

ExposedFilterProps

ExposedFilterProps: { children?: (props: { exposed_filters: TDrupalViewExposedFilter[] }) => ReactNode; display: string; overwrites?: Record<string, (filter: TDrupalViewExposedFilter) => ReactNode>; view: string; viewConfiguration?: TDrupalViewConfiguration }

Type declaration

FetchViewArgs

FetchViewArgs: { contextFilters?: (string | string[])[]; defaultLocale: string; display: string; exposedFilters?: TDrupalExposedFilerValue; limit: number | null; locale: string; offset: number; sort_by?: string; sort_order?: string; view: string; viewRelations?: string[] }

Type declaration

  • optionalcontextFilters?: (string | string[])[]

    The Drupal-Context-Filters to use for loading the View-Data-Result via fetch.

  • defaultLocale: string

    The Default-Language to use for loading the View-Data-Result via fetch.

  • display: string

    The Drupal-View-Display Machine-Name (id) to use for loading the View-Data-Result via fetch.

  • optionalexposedFilters?: TDrupalExposedFilerValue

    The Drupal-Exposed-Filters to use for loading the View-Data-Result via fetch.

  • limit: number | null

    The offset to use for loading the View-Data-Result via fetch.

  • locale: string

    The Language to use for loading the View-Data-Result via fetch.

  • offset: number

    The offset to use for loading the View-Data-Result via fetch.

  • optionalsort_by?: string
  • optionalsort_order?: string
  • view: string

    The Drupal-View Machine-Name (id) to use for loading the View-Data-Result via fetch.

  • optionalviewRelations?: string[]

    The Drupal-JSON-API Field-Relations to get all fields which are relevant for the View-Data-Result-Display.

FilterProps

FilterProps: { debounced?: number; identifier: string; isMultiple?: boolean; minLength?: number; remember?: boolean; value?: string }

Type declaration

  • optionaldebounced?: number
  • identifier: string
  • optionalisMultiple?: boolean
  • optionalminLength?: number
  • optionalremember?: boolean
  • optionalvalue?: string

GetGlobalPageProps

GetGlobalPageProps: { RESOURCE_TYPES?: string[]; blocks?: BlockPageProps[]; context: GetStaticPropsContext | GetServerSidePropsContext; debug?: boolean; deserialize?: boolean; drupalClient?: DrupalClient; dynamicResources?: boolean; getParams?: (name: string, mode?: string | null) => DrupalJsonApiParams; getRelationForView?: (view: string, display: string) => string[]; isDemoPage?: boolean; isSSR?: boolean; isStaticPage?: boolean; menues?: string[]; mockData?: MockDataProps; resource: { title: string } | null; resourceEnhancer?: (drupalServer: DrupalClient, resource: DrupalNode | undefined, context: GetStaticPropsContext | GetServerSidePropsContext) => Promise<null | DrupalNode>; type?: string; useAuth?: boolean; useMockdata?: boolean; viewFieldName?: string }

Type declaration

  • optionalRESOURCE_TYPES?: string[]
  • optionalblocks?: BlockPageProps[]
  • context: GetStaticPropsContext | GetServerSidePropsContext
  • optionaldebug?: boolean
  • optionaldeserialize?: boolean
  • optionaldrupalClient?: DrupalClient
  • optionaldynamicResources?: boolean
  • optionalgetParams?: (name: string, mode?: string | null) => DrupalJsonApiParams
      • (name: string, mode?: string | null): DrupalJsonApiParams
      • Parameters

        • name: string
        • optionalmode: string | null

        Returns DrupalJsonApiParams

  • optionalgetRelationForView?: (view: string, display: string) => string[]
      • (view: string, display: string): string[]
      • Parameters

        • view: string
        • display: string

        Returns string[]

  • optionalisDemoPage?: boolean
  • optionalisSSR?: boolean
  • optionalisStaticPage?: boolean
  • optionalmenues?: string[]
  • optionalmockData?: MockDataProps
  • resource: { title: string } | null

    The page resource, which contains all data to render.

  • optionalresourceEnhancer?: (drupalServer: DrupalClient, resource: DrupalNode | undefined, context: GetStaticPropsContext | GetServerSidePropsContext) => Promise<null | DrupalNode>
      • (drupalServer: DrupalClient, resource: DrupalNode | undefined, context: GetStaticPropsContext | GetServerSidePropsContext): Promise<null | DrupalNode>
      • Parameters

        • drupalServer: DrupalClient
        • resource: DrupalNode | undefined
        • context: GetStaticPropsContext | GetServerSidePropsContext

        Returns Promise<null | DrupalNode>

  • optionaltype?: string
  • optionaluseAuth?: boolean
  • optionaluseMockdata?: boolean
  • optionalviewFieldName?: string

MenuModel

MenuModel: { attributes?: {}; className?: string; icon?: React.ReactElement; id: string; slug?: string; sublinks?: MenuModel; target?: string; title: string }[]

MockDataProps

MockDataProps: { MENUES: { MENU_FOOTER?: MenuModel; MENU_MAIN: MenuModel } & Record<string, MenuModel> } & Record<string, any>

PagePaginationProps

PagePaginationProps: { breakLabel?: string; forcePage?: number; marginPagesDisplayed?: number; onPageChange?: (e: any) => void; pageCount: number; pageRangeDisplayed?: number }

Type declaration

  • optionalbreakLabel?: string
  • optionalforcePage?: number
  • optionalmarginPagesDisplayed?: number
  • optionalonPageChange?: (e: any) => void
      • (e: any): void
      • Parameters

        • e: any

        Returns void

  • pageCount: number
  • optionalpageRangeDisplayed?: number

PageProperties

PageProperties: { blocks?: {}; breadcrumbs?: string[]; currentOrder?: any; defaultLocale: string; domainKey?: string; fallback?: {}; isFrontpage?: boolean; locale: string; menues: {}; metadata: { metatag: { attributes: { content?: string; href?: string; name?: string; property?: string; rel?: string }; tag: string }[]; title: string }; path?: string; redirectTo?: string; resource: { title: string } & Partial<DrupalNode & { path?: { lang_path_aliases?: { de: string; en: string } } }>; time?: string; timestamp?: number }

Type declaration

  • optionalblocks?: {}
    • [region string]: DrupalBlock[]
  • optionalbreadcrumbs?: string[]
  • optionalcurrentOrder?: any
  • defaultLocale: string
  • optionaldomainKey?: string
  • optionalfallback?: {}
    • [key string]: any
  • optionalisFrontpage?: boolean
  • locale: string
  • menues: {}
  • metadata: { metatag: { attributes: { content?: string; href?: string; name?: string; property?: string; rel?: string }; tag: string }[]; title: string }
    • metatag: { attributes: { content?: string; href?: string; name?: string; property?: string; rel?: string }; tag: string }[]
    • title: string
  • optionalpath?: string
  • optionalredirectTo?: string
  • resource: { title: string } & Partial<DrupalNode & { path?: { lang_path_aliases?: { de: string; en: string } } }>
  • optionaltime?: string
  • optionaltimestamp?: number

PagePropertiesRedirect

PagePropertiesRedirect: { redirectTo?: string }

Type declaration

  • optionalredirectTo?: string

SearchInputProps

SearchInputProps: TextInputProps & { hideLabelMobile?: boolean; identifier?: string; listId?: string; minLength?: number; opened?: boolean; remember?: boolean; setOpenFilter?: Dispatch<SetStateAction<string>> }

SelectInputProps

SelectInputProps: SelectProps & { identifier?: string; listId?: string; multiple?: boolean; remember?: boolean }

ShouldUseMockdataProps

ShouldUseMockdataProps: { force?: boolean }

Parameter-Type for helper function shouldUseMockdata.


Type declaration

  • optionalforce?: boolean

    If set to ‘true’ shouldUseMockdata will always return true, no mather what configration exists in env-variables. Useful

Subset

Subset<K>: { [ attr in keyof K ]?: K[attr] extends object ? Subset<K[attr]> : K[attr] extends object | null ? Subset<K[attr]> | null : K[attr] extends object | null | undefined ? Subset<K[attr]> | null | undefined : K[attr] }

Subset is a custom TypeScript-Type, which acts like Nested Partials, see: https://grrr.tech/posts/2021/typescript-partial/


Type parameters

  • K

TDrupalExposedFilerValue

TDrupalExposedFilerValue: Record<string, { isMultiple?: boolean; value: string }>

Schema for saving Exposed-Filter.

TDrupalPillarParagraph

TDrupalPillarParagraph: DrupalParagraph & { behavior_settings: string[]; created: Date; default_langcode: boolean; field_pillar_anchor: string; field_pillar_class: string; field_pillar_color: string; field_pillar_width: boolean; parent_field_name: string; parent_id: string; parent_type: string; revision_translation_affected: boolean }

TDrupalViewConfiguration

TDrupalViewConfiguration: { display: {}; drupal_internal__id: string; id: string; specs: { limit: number; pagerType: string }; status: boolean }

Defines the Schema of a Drupal-View-Configuration.


Type declaration

  • display: {}
  • drupal_internal__id: string
  • id: string
  • specs: { limit: number; pagerType: string }
    • limit: number
    • pagerType: string
  • status: boolean

TDrupalViewDisplay

TDrupalViewDisplay: { display_options: { filters?: {}; path?: string; title?: string }; display_plugin: string; display_title: string; id: string; position: number }

Defines the Schema of a Drupal-View-Display.


Type declaration

  • display_options: { filters?: {}; path?: string; title?: string }
  • display_plugin: string
  • display_title: string
  • id: string
  • position: number

TDrupalViewExposedFilter

TDrupalViewExposedFilter: { expose?: { identifier: string; label: string; multiple: boolean; placeholder?: string; remember: boolean }; exposed: boolean; id: string; plugin_id: string; sub_handler_settings?: { target_bundles?: Record<string, string> }; type?: string; value?: any; vid?: string }

Defines the Schema of a Drupal-View-Exposed-Filter.


Type declaration

  • optionalexpose?: { identifier: string; label: string; multiple: boolean; placeholder?: string; remember: boolean }
    • identifier: string
    • label: string
    • multiple: boolean
    • optionalplaceholder?: string
    • remember: boolean
  • exposed: boolean
  • id: string
  • plugin_id: string
  • optionalsub_handler_settings?: { target_bundles?: Record<string, string> }
    • optionaltarget_bundles?: Record<string, string>
  • optionaltype?: string
  • optionalvalue?: any
  • optionalvid?: string

WebformCustomComponent

WebformCustomComponent: React.FC<WebformCustomComponentProps>

Custom component for webform element

WebformCustomComponentProps

WebformCustomComponentProps: { classname?: string; element: WebformElement; elementsColor?: string; error?: string; inputWrapperOrder?: (error | input | label | description)[]; onChange?: any; ref?: any }

Type declaration

  • optionalclassname?: string
  • element: WebformElement
  • optionalelementsColor?: string
  • optionalerror?: string
  • optionalinputWrapperOrder?: (error | input | label | description)[]
  • optionalonChange?: any
  • optionalref?: any

WebformElement

WebformElement: { attributes: { name: string; value: string }[]; max?: number; min?: number; multiple?: boolean; name: string; options?: Record<string, string>; states?: { condition: {}; selector: string; state: string }[]; step?: number; title?: string; type: string; webformPluginId?: string }

WebformMapper element (e.g. text field input or submit button).


Type declaration

  • attributes: { name: string; value: string }[]
  • optionalmax?: number
  • optionalmin?: number
  • optionalmultiple?: boolean
  • name: string
  • optionaloptions?: Record<string, string>
  • optionalstates?: { condition: {}; selector: string; state: string }[]
  • optionalstep?: number
  • optionaltitle?: string
  • type: string
  • optionalwebformPluginId?: string

WebformProps

WebformProps: { buttonComponent?: React.ComponentType<ButtonProps>; buttonWrapperComponent?: React.ComponentType<any>; customComponents?: CustomWebformComponentLibrary; elements: Record<string, any>; elementsColor?: string; entity_id?: string; entity_type?: string; id?: string; inputWrapperOrder?: (error | input | label | description)[]; onSuccess?: () => void; scrollOffset?: number; validateEachPage?: boolean; webformId: string }

Type declaration

  • optionalbuttonComponent?: React.ComponentType<ButtonProps>
  • optionalbuttonWrapperComponent?: React.ComponentType<any>
  • optionalcustomComponents?: CustomWebformComponentLibrary
  • elements: Record<string, any>
  • optionalelementsColor?: string
  • optionalentity_id?: string
  • optionalentity_type?: string
  • optionalid?: string
  • optionalinputWrapperOrder?: (error | input | label | description)[]
  • optionalonSuccess?: () => void
      • (): void
      • Returns void

  • optionalscrollOffset?: number
  • optionalvalidateEachPage?: boolean
  • webformId: string

Variables

constBreakpointsProvider

BreakpointsProvider: React.FC<{ children: React.ReactNode }> = ...

constDEV

DEV: boolean = ...

constGridRow

GridRow: React.FC<GridRowProps> = ...

constInlineButton

InlineButton: any = ...

constltrCache

ltrCache: any = ...