Options
All
  • Public
  • Public/Protected
  • All
Menu

@betty-blocks/component-sdk

Index

Enumerations

Interfaces

Type aliases

Functions

Type aliases

ActionVariableType: "ARRAY" | "BOOLEAN" | "COLLECTION" | "DATE" | "DATE_TIME" | "DECIMAL" | "INTEGER" | "JSON" | "OBJECT" | "RECORD" | "STRING"
AllowedValue: Record<string | "uuid", RowItem>
BeforeCreateArgs: { components: {}; helpers: { BettyPrefabs: typeof BettyPrefabs; PropertyKind: typeof PropertyKind; addActionVariable: any; addModelAndProperties: any; addSchemaModel: any; camelToSnakeCase: any; cloneStructure: any; createBlacklist: any; createUuid: any; createWrapper: any; getPageAuthenticationProfileId: any; getPageName: any; linkOption: any; makeBettyInput: any; makeBettyUpdateInput: any; prepareAction: any; prepareInput: any; setOption: any; useActionIdSelector: any; useCurrentPageId: any; useCurrentPartialId: any; useModelIdSelector: any; useModelQuery: any; useModelRelationQuery: any; usePrefabSelector: any; usePropertyQuery: any }; modelId: string; prefab: Prefab; prefabs: Prefab[]; close: any; save: any }

Type declaration

  • components: {}
    • [name: string]: any
  • helpers: { BettyPrefabs: typeof BettyPrefabs; PropertyKind: typeof PropertyKind; addActionVariable: any; addModelAndProperties: any; addSchemaModel: any; camelToSnakeCase: any; cloneStructure: any; createBlacklist: any; createUuid: any; createWrapper: any; getPageAuthenticationProfileId: any; getPageName: any; linkOption: any; makeBettyInput: any; makeBettyUpdateInput: any; prepareAction: any; prepareInput: any; setOption: any; useActionIdSelector: any; useCurrentPageId: any; useCurrentPartialId: any; useModelIdSelector: any; useModelQuery: any; useModelRelationQuery: any; usePrefabSelector: any; usePropertyQuery: any }
    • BettyPrefabs: typeof BettyPrefabs
    • PropertyKind: typeof PropertyKind
    • addActionVariable:function
      • addActionVariable(actionId: string, name: string, kind: ActionVariableKind, options: object): Promise<ActionVariable>
    • addModelAndProperties:function
      • addModelAndProperties(modelName: string, properties: ModelPropertyInput[]): Promise<Model>
    • addSchemaModel:function
      • addSchemaModel(name: string, jsonSchema: string): Promise<SchemaModel>
    • camelToSnakeCase:function
      • camelToSnakeCase(str: string): string
    • cloneStructure:function
    • createBlacklist:function
      • createBlacklist(whiteList: ("AUTO_INCREMENT" | "BELONGS_TO" | "BOOLEAN" | "BOOLEAN_EXPRESSION" | "COUNT" | "DATE" | "DATE_EXPRESSION" | "DATE_TIME" | "DATE_TIME_EXPRESSION" | "DECIMAL" | "DECIMAL_EXPRESSION" | "EMAIL" | "EMAIL_ADDRESS" | "ENUM" | "FILE" | "FLOAT" | "GOOGLE_DOCUMENT" | "HAS_AND_BELONGS_TO_MANY" | "HAS_MANY" | "HAS_ONE" | "IBAN" | "IMAGE" | "INTEGER" | "INTEGER_EXPRESSION" | "LIST" | "LOGIN_TOKEN" | "MINUTES" | "MINUTES_EXPRESSION" | "MULTI_FILE" | "MULTI_IMAGE" | "OBJECT" | "PASSWORD" | "PDF" | "PERIODIC_COUNT" | "PHONE_NUMBER" | "PRICE" | "PRICE_EXPRESSION" | "RICH_TEXT" | "SERIAL" | "SIGNED_PDF" | "STRING" | "STRING_EXPRESSION" | "SUM" | "TEXT" | "TEXT_EXPRESSION" | "TIME" | "URL" | "ZIPCODE")[]): ("AUTO_INCREMENT" | "BELONGS_TO" | "BOOLEAN" | "BOOLEAN_EXPRESSION" | "COUNT" | "DATE" | "DATE_EXPRESSION" | "DATE_TIME" | "DATE_TIME_EXPRESSION" | "DECIMAL" | "DECIMAL_EXPRESSION" | "EMAIL" | "EMAIL_ADDRESS" | "ENUM" | "FILE" | "FLOAT" | "GOOGLE_DOCUMENT" | "HAS_AND_BELONGS_TO_MANY" | "HAS_MANY" | "HAS_ONE" | "IBAN" | "IMAGE" | "INTEGER" | "INTEGER_EXPRESSION" | "LIST" | "LOGIN_TOKEN" | "MINUTES" | "MINUTES_EXPRESSION" | "MULTI_FILE" | "MULTI_IMAGE" | "OBJECT" | "PASSWORD" | "PDF" | "PERIODIC_COUNT" | "PHONE_NUMBER" | "PRICE" | "PRICE_EXPRESSION" | "RICH_TEXT" | "SERIAL" | "SIGNED_PDF" | "STRING" | "STRING_EXPRESSION" | "SUM" | "TEXT" | "TEXT_EXPRESSION" | "TIME" | "URL" | "ZIPCODE")[]
      • Parameters

        • whiteList: ("AUTO_INCREMENT" | "BELONGS_TO" | "BOOLEAN" | "BOOLEAN_EXPRESSION" | "COUNT" | "DATE" | "DATE_EXPRESSION" | "DATE_TIME" | "DATE_TIME_EXPRESSION" | "DECIMAL" | "DECIMAL_EXPRESSION" | "EMAIL" | "EMAIL_ADDRESS" | "ENUM" | "FILE" | "FLOAT" | "GOOGLE_DOCUMENT" | "HAS_AND_BELONGS_TO_MANY" | "HAS_MANY" | "HAS_ONE" | "IBAN" | "IMAGE" | "INTEGER" | "INTEGER_EXPRESSION" | "LIST" | "LOGIN_TOKEN" | "MINUTES" | "MINUTES_EXPRESSION" | "MULTI_FILE" | "MULTI_IMAGE" | "OBJECT" | "PASSWORD" | "PDF" | "PERIODIC_COUNT" | "PHONE_NUMBER" | "PRICE" | "PRICE_EXPRESSION" | "RICH_TEXT" | "SERIAL" | "SIGNED_PDF" | "STRING" | "STRING_EXPRESSION" | "SUM" | "TEXT" | "TEXT_EXPRESSION" | "TIME" | "URL" | "ZIPCODE")[]

        Returns ("AUTO_INCREMENT" | "BELONGS_TO" | "BOOLEAN" | "BOOLEAN_EXPRESSION" | "COUNT" | "DATE" | "DATE_EXPRESSION" | "DATE_TIME" | "DATE_TIME_EXPRESSION" | "DECIMAL" | "DECIMAL_EXPRESSION" | "EMAIL" | "EMAIL_ADDRESS" | "ENUM" | "FILE" | "FLOAT" | "GOOGLE_DOCUMENT" | "HAS_AND_BELONGS_TO_MANY" | "HAS_MANY" | "HAS_ONE" | "IBAN" | "IMAGE" | "INTEGER" | "INTEGER_EXPRESSION" | "LIST" | "LOGIN_TOKEN" | "MINUTES" | "MINUTES_EXPRESSION" | "MULTI_FILE" | "MULTI_IMAGE" | "OBJECT" | "PASSWORD" | "PDF" | "PERIODIC_COUNT" | "PHONE_NUMBER" | "PRICE" | "PRICE_EXPRESSION" | "RICH_TEXT" | "SERIAL" | "SIGNED_PDF" | "STRING" | "STRING_EXPRESSION" | "SUM" | "TEXT" | "TEXT_EXPRESSION" | "TIME" | "URL" | "ZIPCODE")[]

    • createUuid:function
      • createUuid(): string
    • createWrapper:function
    • getPageAuthenticationProfileId:function
      • getPageAuthenticationProfileId(): string
    • getPageName:function
      • getPageName(): string
    • linkOption:function
    • makeBettyInput:function
      • makeBettyInput(prefabName: string, model: Model, property: Property, variable: ActionVariable, relatedIdProperties?: string[][], relatedModelIds?: Record<string, string>): PrefabReference
      • Parameters

        • prefabName: string
        • model: Model
        • property: Property
        • variable: ActionVariable
        • Optional relatedIdProperties: string[][]
        • Optional relatedModelIds: Record<string, string>

        Returns PrefabReference

    • makeBettyUpdateInput:function
      • makeBettyUpdateInput(prefabName: string, model: Model, property: Property, variable: ActionVariable, relatedIdProperties?: string[][], relatedModelIds?: Record<string, string>): PrefabReference
      • Parameters

        • prefabName: string
        • model: Model
        • property: Property
        • variable: ActionVariable
        • Optional relatedIdProperties: string[][]
        • Optional relatedModelIds: Record<string, string>

        Returns PrefabReference

    • prepareAction:function
    • prepareInput:function
      • prepareInput(actionId: null | string, variableName: undefined | string, kind: "AUTO_INCREMENT" | "BELONGS_TO" | "BOOLEAN" | "BOOLEAN_EXPRESSION" | "COUNT" | "DATE" | "DATE_EXPRESSION" | "DATE_TIME" | "DATE_TIME_EXPRESSION" | "DECIMAL" | "DECIMAL_EXPRESSION" | "EMAIL" | "EMAIL_ADDRESS" | "ENUM" | "FILE" | "FLOAT" | "GOOGLE_DOCUMENT" | "HAS_AND_BELONGS_TO_MANY" | "HAS_MANY" | "HAS_ONE" | "IBAN" | "IMAGE" | "INTEGER" | "INTEGER_EXPRESSION" | "LIST" | "LOGIN_TOKEN" | "MINUTES" | "MINUTES_EXPRESSION" | "MULTI_FILE" | "MULTI_IMAGE" | "OBJECT" | "PASSWORD" | "PDF" | "PERIODIC_COUNT" | "PHONE_NUMBER" | "PRICE" | "PRICE_EXPRESSION" | "RICH_TEXT" | "SERIAL" | "SIGNED_PDF" | "STRING" | "STRING_EXPRESSION" | "SUM" | "TEXT" | "TEXT_EXPRESSION" | "TIME" | "URL" | "ZIPCODE", propertyKind: "AUTO_INCREMENT" | "BELONGS_TO" | "BOOLEAN" | "BOOLEAN_EXPRESSION" | "COUNT" | "DATE" | "DATE_EXPRESSION" | "DATE_TIME" | "DATE_TIME_EXPRESSION" | "DECIMAL" | "DECIMAL_EXPRESSION" | "EMAIL" | "EMAIL_ADDRESS" | "ENUM" | "FILE" | "FLOAT" | "GOOGLE_DOCUMENT" | "HAS_AND_BELONGS_TO_MANY" | "HAS_MANY" | "HAS_ONE" | "IBAN" | "IMAGE" | "INTEGER" | "INTEGER_EXPRESSION" | "LIST" | "LOGIN_TOKEN" | "MINUTES" | "MINUTES_EXPRESSION" | "MULTI_FILE" | "MULTI_IMAGE" | "OBJECT" | "PASSWORD" | "PDF" | "PERIODIC_COUNT" | "PHONE_NUMBER" | "PRICE" | "PRICE_EXPRESSION" | "RICH_TEXT" | "SERIAL" | "SIGNED_PDF" | "STRING" | "STRING_EXPRESSION" | "SUM" | "TEXT" | "TEXT_EXPRESSION" | "TIME" | "URL" | "ZIPCODE", permissions?: "public" | "private" | "inherit", getPageAuthenticationProfileId?: string): Promise<PreparedInput>
      • Parameters

        • actionId: null | string
        • variableName: undefined | string
        • kind: "AUTO_INCREMENT" | "BELONGS_TO" | "BOOLEAN" | "BOOLEAN_EXPRESSION" | "COUNT" | "DATE" | "DATE_EXPRESSION" | "DATE_TIME" | "DATE_TIME_EXPRESSION" | "DECIMAL" | "DECIMAL_EXPRESSION" | "EMAIL" | "EMAIL_ADDRESS" | "ENUM" | "FILE" | "FLOAT" | "GOOGLE_DOCUMENT" | "HAS_AND_BELONGS_TO_MANY" | "HAS_MANY" | "HAS_ONE" | "IBAN" | "IMAGE" | "INTEGER" | "INTEGER_EXPRESSION" | "LIST" | "LOGIN_TOKEN" | "MINUTES" | "MINUTES_EXPRESSION" | "MULTI_FILE" | "MULTI_IMAGE" | "OBJECT" | "PASSWORD" | "PDF" | "PERIODIC_COUNT" | "PHONE_NUMBER" | "PRICE" | "PRICE_EXPRESSION" | "RICH_TEXT" | "SERIAL" | "SIGNED_PDF" | "STRING" | "STRING_EXPRESSION" | "SUM" | "TEXT" | "TEXT_EXPRESSION" | "TIME" | "URL" | "ZIPCODE"
        • propertyKind: "AUTO_INCREMENT" | "BELONGS_TO" | "BOOLEAN" | "BOOLEAN_EXPRESSION" | "COUNT" | "DATE" | "DATE_EXPRESSION" | "DATE_TIME" | "DATE_TIME_EXPRESSION" | "DECIMAL" | "DECIMAL_EXPRESSION" | "EMAIL" | "EMAIL_ADDRESS" | "ENUM" | "FILE" | "FLOAT" | "GOOGLE_DOCUMENT" | "HAS_AND_BELONGS_TO_MANY" | "HAS_MANY" | "HAS_ONE" | "IBAN" | "IMAGE" | "INTEGER" | "INTEGER_EXPRESSION" | "LIST" | "LOGIN_TOKEN" | "MINUTES" | "MINUTES_EXPRESSION" | "MULTI_FILE" | "MULTI_IMAGE" | "OBJECT" | "PASSWORD" | "PDF" | "PERIODIC_COUNT" | "PHONE_NUMBER" | "PRICE" | "PRICE_EXPRESSION" | "RICH_TEXT" | "SERIAL" | "SIGNED_PDF" | "STRING" | "STRING_EXPRESSION" | "SUM" | "TEXT" | "TEXT_EXPRESSION" | "TIME" | "URL" | "ZIPCODE"
        • Optional permissions: "public" | "private" | "inherit"
        • Optional getPageAuthenticationProfileId: string

        Returns Promise<PreparedInput>

    • setOption:function
    • useActionIdSelector:function
      • useActionIdSelector(): null | string
    • useCurrentPageId:function
      • useCurrentPageId(): string
    • useCurrentPartialId:function
      • useCurrentPartialId(): string
    • useModelIdSelector:function
      • useModelIdSelector(): null | string
    • useModelQuery:function
      • useModelQuery(options: Record<string, any>): { data: Record<string, any> | null; error: Record<string, any> | null; loading: boolean }
      • Parameters

        • options: Record<string, any>

        Returns { data: Record<string, any> | null; error: Record<string, any> | null; loading: boolean }

        • data: Record<string, any> | null
        • error: Record<string, any> | null
        • loading: boolean
    • useModelRelationQuery:function
      • useModelRelationQuery(propertyModelId: string): { data: Record<string, any> | null; error: Record<string, any> | null; loading: boolean }
      • Parameters

        • propertyModelId: string

        Returns { data: Record<string, any> | null; error: Record<string, any> | null; loading: boolean }

        • data: Record<string, any> | null
        • error: Record<string, any> | null
        • loading: boolean
    • usePrefabSelector:function
      • usePrefabSelector(): null | { id: string; name: string }
    • usePropertyQuery:function
      • usePropertyQuery(propertyId: string): { data: Record<string, any> | null; error: Record<string, any> | null; loading: boolean }
      • Parameters

        • propertyId: string

        Returns { data: Record<string, any> | null; error: Record<string, any> | null; loading: boolean }

        • data: Record<string, any> | null
        • error: Record<string, any> | null
        • loading: boolean
  • modelId: string
  • prefab: Prefab
  • prefabs: Prefab[]
  • close:function
    • close(): void
  • save:function
Configuration: VariableConfiguration | ButtonGroupConfiguration | DropdownConfiguration
Hook: { input: Record<string, Ref>; output?: {}; query: string }

Type declaration

  • input: Record<string, Ref>
  • Optional output?: {}
    • [key: string]: Ref
  • query: string
LinkedOptionProducer: (key: string) => PrefabWrapperLinkedOption

Type declaration

LinkedPartialOptionProducer: (key: string) => PrefabWrapperLinkedPartialOption

Type declaration

MakePrepareActionArgs: [string, Property | undefined, Property[] | undefined, "create" | "update" | "delete" | "login" | "empty", AuthenticationProfile?, string?, string?, "public" | "private" | "inherit" | string?, string?, boolean?] | [PrepareActionObjectProps]
OptionCategory: { condition?: { comparator: string; option: string; type: string; value: string | boolean | number }; expanded?: boolean; label: string; members: string[] }

Type declaration

  • Optional condition?: { comparator: string; option: string; type: string; value: string | boolean | number }
    • comparator: string
    • option: string
    • type: string
    • value: string | boolean | number
  • Optional expanded?: boolean
  • label: string
  • members: string[]
OptionProducer: (key: string) => PrefabComponentOption

Type declaration

PrefabComponentOption: ValueDefault | ValueRef
PrefabComponentStyle: { name?: string; overwrite?: { backgroundColor?: { type: string; value: string }; borderColor?: { type: string; value: string }; borderRadius?: string | string[]; borderStyle?: string; borderWidth?: string | string[]; boxShadow?: string; color?: { type: string; value: string }; fontFamily?: string; fontSize?: string; fontStyle?: string; fontWeight?: string; letterSpacing?: string; lineHeight?: string; padding?: string | string[]; textDecoration?: string; textTransform?: string } | StyleDefinitionState[] }

Type declaration

  • Optional name?: string
  • Optional overwrite?: { backgroundColor?: { type: string; value: string }; borderColor?: { type: string; value: string }; borderRadius?: string | string[]; borderStyle?: string; borderWidth?: string | string[]; boxShadow?: string; color?: { type: string; value: string }; fontFamily?: string; fontSize?: string; fontStyle?: string; fontWeight?: string; letterSpacing?: string; lineHeight?: string; padding?: string | string[]; textDecoration?: string; textTransform?: string } | StyleDefinitionState[]
PrefabVariableKind: "construct" | "object" | "string" | "integer"
PrefabWrapperLinkedOptionConfiguration: { allowedInput?: { name: string; value: string | boolean | number }[]; as?: string; condition?: { comparator: "EQ" | "EQ_COMPONENT_ID"; option: string; type: "SHOW" | "HIDE"; value: string | boolean | number | { ref: { componentId: string } } }; dataType?: string; showOnDrop?: boolean }

Type declaration

  • Optional allowedInput?: { name: string; value: string | boolean | number }[]
  • Optional as?: string
  • Optional condition?: { comparator: "EQ" | "EQ_COMPONENT_ID"; option: string; type: "SHOW" | "HIDE"; value: string | boolean | number | { ref: { componentId: string } } }
    • comparator: "EQ" | "EQ_COMPONENT_ID"
    • option: string
    • type: "SHOW" | "HIDE"
    • value: string | boolean | number | { ref: { componentId: string } }
  • Optional dataType?: string
  • Optional showOnDrop?: boolean
RowItem: string | number | boolean
StyleDefinitionContent: Partial<StyleDefinitionContentBase> & Pick<StyleDefinitionContentBase, "basis">
StyleDefinitionContentBase: { [ key in StyleStateKeys | "basis"]: StyleDefinitionContentObject }
StyleProducer: (key: string) => PrefabComponentStyle

Type declaration

StyleStateKeys: SELECTED | HOVER | FOCUS | DISABLED | VALID | INVALID | READONLY
ValueConfig: Record<string, unknown>

Functions

  • action(label: string, attrs: Attributes): OptionProducer
  • actionInputObjects(label: string, attrs: Attributes): OptionProducer
  • addChild(label: string, attrs?: Attributes): OptionProducer
  • authenticationProfile(label: string, attrs: Attributes): OptionProducer
  • buttongroup(label: string, options: [string, string, string?][], attrs?: Attributes): OptionProducer
  • childSelector(label: string, attrs?: Attributes): OptionProducer
  • displayLogic(label: string, attrs?: Attributes): OptionProducer
  • dropdown(label: string, options: [string, string][], attrs?: Attributes): OptionProducer
  • endpoint(label: string, attrs?: Attributes): OptionProducer
  • filter(label: string, attrs?: Attributes): OptionProducer
  • font(label: string, attrs: Attributes): OptionProducer
  • hideIf(key: string, comparator: "EQ", value: string | boolean): undefined | { comparator: "EQ"; option: string; type: "SHOW" | "HIDE"; value: string | boolean }
  • icon(label: string, attrs?: Attributes): OptionProducer
  • model(label: string, attrs?: Attributes): OptionProducer
  • modelAndRelation(label: string, attrs?: Attributes): OptionProducer
  • number(label: string, attrs?: Attributes): OptionProducer
  • option(type: string, attrs: Attributes): OptionProducer
  • prefab(name: string, attr: Attributes, beforeCreate: undefined | BeforeCreate, structure: PrefabReference[]): Prefab
  • property(label: string, attrs?: Attributes): OptionProducer
  • reconfigure(label: string, attrs?: Attributes): OptionProducer
  • showIf(key: string, comparator: "EQ", value: string | boolean): undefined | { comparator: "EQ"; option: string; type: "SHOW" | "HIDE"; value: string | boolean }
  • showIfTrue(key: string): undefined | { comparator: "EQ"; option: string; type: "SHOW" | "HIDE"; value: string | boolean }
  • size(label: string, attrs: Attributes): OptionProducer
  • sizes(label: string, attrs: Attributes): OptionProducer
  • style(type: string, __namedParameters: RequiredStyleAttrs): StyleDefinition
  • styleReference(name: string, attrs: StyleReferenceAttrs): StyleReference
  • text(label: string, attrs?: Attributes): OptionProducer
  • toggle(label: string, attrs?: Attributes): OptionProducer
  • variable(label: string, attrs?: Attributes): OptionProducer

Generated using TypeDoc