Options
All
  • Public
  • Public/Protected
  • All
Menu

Class BlocklyCreator

Hierarchy

Index

Constructors

constructor

Properties

Protected aliasCounter

aliasCounter: number = -1

aliases

aliases: IDisposable[] = []

Protected Optional app

app: any

blockExceptionMap

blockExceptionMap: Map<string, IExceptionMapItem> | undefined

Protected challenge

challenge: Challenge | null = null

Protected copyGenerator

copyGenerator: ICopyGenerator

Protected devTools

devTools: CreatorDevTools = new CreatorDevTools()

Protected editor

editor: Editor

Protected Optional generatedSteps

generatedSteps: IGeneratedStep[]

helpers

helpers: ICreatorHelper[]

Protected highlighter

highlighter: Highlighter = new Highlighter()

Protected partsList

partsList: string[] = []

Protected partsWhitelist

partsWhitelist: object

Type declaration

  • [s: string]: string[]

Protected previewStepper

previewStepper: BlocklyStepper | null = null

Optional sourceEditor

sourceEditor: BlocklySourceEditor

Protected stepper

Protected stepsMap

stepsMap: Map<string, IGeneratedStep> = new Map()

Protected subscriptions

subscriptions: IDisposable[]

Protected ui

ui: CreatorWidget = new CreatorWidget()

Protected whitelist

whitelist: object

Type declaration

  • [s: string]: string[]

Methods

addToPartsList

  • addToPartsList(partType: undefined | string, blockId: undefined | string): void
  • Parameters

    • Optional partType: undefined | string
    • Optional blockId: undefined | string

    Returns void

addToWhitelist

  • addToWhitelist(category: string, id: string | null): void
  • Parameters

    • category: string
    • id: string | null

    Returns void

blockToSteps

  • Parameters

    • block: HTMLElement

    Returns IGeneratedStep[]

blurTarget

  • blurTarget(): void
  • Returns void

checkForBlockExceptions

  • checkForBlockExceptions(legacyCategory: string, legacyType: string): string[]
  • Parameters

    • legacyCategory: string
    • legacyType: string

    Returns string[]

createAlias

  • createAlias(prefix?: string): string
  • Parameters

    • Default value prefix: string = "block"

    Returns string

createChallenge

createStepper

customBlockToSteps

  • Parameters

    • block: HTMLElement

    Returns IGeneratedStep[]

dispose

  • dispose(): void
  • Returns void

editStep

  • editStep(): void
  • Returns void

fieldToSteps

  • Parameters

    • node: HTMLElement

    Returns IGeneratedStep[]

focusTarget

  • focusTarget(source: string): void
  • Parameters

    • source: string

    Returns void

generate

generateChallenge

  • generateChallenge(): object

generateChallengeId

  • generateChallengeId(dom: XMLDocument): null | string
  • Parameters

    • dom: XMLDocument

    Returns null | string

generateChallengeName

  • generateChallengeName(dom: XMLDocument): null | string
  • Parameters

    • dom: XMLDocument

    Returns null | string

generateConnectionQuery

  • generateConnectionQuery(result: IConnectionInfo): null | string
  • Parameters

    • result: IConnectionInfo

    Returns null | string

generateLastStep

  • Parameters

    • dom: XMLDocument

    Returns null | IGeneratedStep

getConnectionForStatementOrValue

  • getConnectionForStatementOrValue(block: HTMLElement): string | null
  • Parameters

    • block: HTMLElement

    Returns string | null

getCopy

  • getCopy(type: string, args: any[]): string
  • Parameters

    • type: string
    • Rest args: any[]

    Returns string

getFieldForInnerTextResult

  • Parameters

    Returns null | Field

getFieldForNode

  • getFieldForNode(node: HTMLElement): null | Field
  • Parameters

    • node: HTMLElement

    Returns null | Field

getOriginalStepFromSource

  • getOriginalStepFromSource(source: string): any
  • Parameters

    • source: string

    Returns any

loadChallenge

  • loadChallenge(d: any): void
  • Parameters

    • d: any

    Returns void

nextStep

  • nextStep(): void
  • Returns void

nodeToSteps

  • Parameters

    • node: HTMLElement

    Returns IGeneratedStep[]

onCodeChanged

  • onCodeChanged(): void

onInject

  • onInject(): void
  • Returns void

playStep

previousStep

  • previousStep(): void

registerKeybindings

  • registerKeybindings(): void

runFieldHelper

  • Parameters

    • field: Field
    • defaultValue: string
    • currentValue: string
    • step: IGeneratedStep

    Returns IGeneratedStep

selectFile

  • selectFile(path: string): void
  • Parameters

    • path: string

    Returns void

selectStep

setupDevTools

  • setupDevTools(): void

setupDownloadButton

  • setupDownloadButton(): void

shadowToSteps

  • shadowToSteps(parent: HTMLElement, inputName: string, shadow: HTMLElement): IGeneratedStep[]
  • Parameters

    • parent: HTMLElement
    • inputName: string
    • shadow: HTMLElement

    Returns IGeneratedStep[]

startToSteps

  • Parameters

    • block: HTMLElement

    Returns IGeneratedStep[]

statementOrNextToSteps

  • Parameters

    • node: HTMLElement

    Returns IGeneratedStep[]

toggleMode

unwatchCodeChanges

  • unwatchCodeChanges(): void

valueToSteps

  • Parameters

    • node: HTMLElement

    Returns IGeneratedStep[]

watchCodeChanges

  • watchCodeChanges(): void

Generated using TypeDoc