@gooddev/peekjs
Index
Components
Drupal
Provider
Drupal
Functions
Hooks
Namespaces
Type Aliases
- DrupalPageProperties
- CustomWebformComponentLibrary
- DrupalViewCountDisplayProps
- DrupalViewProps
- ExposedFilterProps
- FetchViewArgs
- FilterProps
- GetGlobalPageProps
- MenuModel
- MockDataProps
- PagePaginationProps
- PageProperties
- PagePropertiesRedirect
- SearchInputProps
- SelectInputProps
- ShouldUseMockdataProps
- Subset
- TDrupalExposedFilerValue
- TDrupalPillarParagraph
- TDrupalViewConfiguration
- TDrupalViewDisplay
- TDrupalViewExposedFilter
- WebformCustomComponent
- WebformCustomComponentProps
- WebformElement
- WebformProps
Utils
Drupal
Utils Gets the Asset-URL with host prefix.
Utils - Drupal
Variables
Other
Drupal
constWebform
constWebformRadio
Provider
constPagePropertyProvider
Type Aliases
CustomWebformComponentLibrary
Is used to define custom WebformElement components, based on the mashine name as key of Record.
DrupalViewCountDisplayProps
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
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
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
Type declaration
optionalchildren?: (props: { exposed_filters: TDrupalViewExposedFilter[] }) => ReactNode
Parameters
props: { exposed_filters: TDrupalViewExposedFilter[] }
Returns ReactNode
display: string
optionaloverwrites?: Record<string, (filter: TDrupalViewExposedFilter) => ReactNode>
view: string
optionalviewConfiguration?: TDrupalViewConfiguration
FetchViewArgs
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
Type declaration
optionaldebounced?: number
identifier: string
optionalisMultiple?: boolean
optionalminLength?: number
optionalremember?: boolean
optionalvalue?: string
GetGlobalPageProps
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
Parameters
name: string
optionalmode: string | null
Returns DrupalJsonApiParams
optionalgetRelationForView?: (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>
Parameters
drupalServer: DrupalClient
resource: DrupalNode | undefined
context: GetStaticPropsContext | GetServerSidePropsContext
Returns Promise<null | DrupalNode>
optionaltype?: string
optionaluseAuth?: boolean
optionaluseMockdata?: boolean
optionalviewFieldName?: string
MenuModel
MockDataProps
PagePaginationProps
Type declaration
optionalbreakLabel?: string
optionalforcePage?: number
optionalmarginPagesDisplayed?: number
optionalonPageChange?: (e: any) => void
Parameters
e: any
Returns void
pageCount: number
optionalpageRangeDisplayed?: number
PageProperties
Type declaration
optionalblocks?: {}
[region string]: DrupalBlock[]
optionalbreadcrumbs?: string[]
optionalcurrentOrder?: any
defaultLocale: string
optionaldomainKey?: string
optionalfallback?: {}
[key string]: any
optionalisFrontpage?: boolean
locale: string
menues: {}
[menuKey string]: MenuModel | undefined
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
Type declaration
optionalredirectTo?: string
SearchInputProps
SelectInputProps
ShouldUseMockdataProps
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 is a custom TypeScript-Type, which acts like Nested Partials, see: https://grrr.tech/posts/2021/typescript-partial/
Type parameters
- K
TDrupalExposedFilerValue
Schema for saving Exposed-Filter.
TDrupalPillarParagraph
TDrupalViewConfiguration
Defines the Schema of a Drupal-View-Configuration.
Type declaration
display: {}
[displayName string]: TDrupalViewDisplay
drupal_internal__id: string
id: string
specs: { limit: number; pagerType: string }
limit: number
pagerType: string
status: boolean
TDrupalViewDisplay
Defines the Schema of a Drupal-View-Display.
Type declaration
display_options: { filters?: {}; path?: string; title?: string }
optionalfilters?: {}
[filterId string]: TDrupalViewExposedFilter
optionalpath?: string
optionaltitle?: string
display_plugin: string
display_title: string
id: string
position: number
TDrupalViewExposedFilter
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
Custom component for webform element
WebformCustomComponentProps
Type declaration
optionalclassname?: string
element: WebformElement
optionalelementsColor?: string
optionalerror?: string
optionalinputWrapperOrder?: (error | input | label | description)[]
optionalonChange?: any
optionalref?: any
WebformElement
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
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
Returns void
optionalscrollOffset?: number
optionalvalidateEachPage?: boolean
webformId: string
Component for Rendering Drupal-Webform.