CodBi
    Preparing search index...

    Implements the management functionality.

    Implements

    Index

    Constructors

    • Crea un'istanza di CodBi impostando anche il valore specificato "iniziatore" e "paramSeparator".

      Parameters

      • nestingBraces: {
            closing: string;
            epSeparator: string;
            opening: string;
            paramSeparator: string;
        } = ...

        The CodBi.nestingBraces configuration for this instance.

      • cssProcessing: string = ...

        The CSS to be applied on Elements that're currently being processed by the CodBi.

      Returns CodBi

    Properties

    autoCheckAttributes: boolean = false
    availableEPs: { [k: string]: (params: string[]) => unknown } = {}

    Stores all Element Placeholder that were registered.

    baseURL: string = ...
    checkingAttributes: boolean = false

    Indicates whether the CodBi is currently in the process of checking attributes (checkAttributes).

    configs: string[] = ...

    Stores all active CSS-Classes that're references to CodBi Standard-Configurations.

    configTemplate: ConfigTemplate = undefined
    currentAttributeCheck: Promise<boolean>

    Stores the current checkAttributes - Promise.

    firstTimer: HTMLElement[] = ...
    functionalities: Map<string, (toLoad: any, toProcess: Element) => any> = ...
    nestingBraces: {
        closing: string;
        epSeparator: string;
        opening: string;
        paramSeparator: string;
    } = ...

    Stores the CodBi's control characters.

    resourceBase: string = ...

    Stores the path to the XIMA-Server's resources including the CodBi code fragments.

    settingsErrorReporting: { throw: boolean } = ...

    Stores the settings for error reporting.

    settingsInfoReporting: { log: boolean } = ...

    Stores the settings for information reporting.

    Methods

    • Applica il metodo toApply a tutti i Element all'interno di documento che corrisponde al targets specificato. Il parametro targets è un TSV (sostanzialmente più selettori CSS) che sono separati da una tilde.

      Parameters

      • targets: string

        The TSV specifying the Elements to invoke the metodo toApply attivo.

      • toApply: (target: Element) => undefined

        The method to apply on each Element specified by il targets.

      Returns undefined

    • Elabora tutti i Element contrassegnati con un certo Attributo (data-cb-func) per attivare le funzionalità CodBi. L'attributo data-cb-func è un CSV contenente tutte le funzionalità CodBi per attivare.

      Dopo aver trovato un Element questo metodo lo cercherà tutto attributi denominati data-cb-.... Quando si attiva una funzionalità CodBi per un Element questi attributi verranno passati come chiave/valore-JSON al file funzionalità con il prefisso data-cb- rimosso dalle chiavi.

      Questo metodo cerca anche variabili globali relative alla funzionalità da utilizzare. Quelli possono essere specificati nella sezione "Variabili" della GUI e deve essere preceduto dal nome della funzionalità (utilizzando i caratteri di sottolineatura invece dei punti separatori (ad esempio time.frame diventa time_frame)) seguito dal nome della variabile senza il prefisso data-cb- (ad esempio Time_Frame_MaxField). Per essere utile per definire valori comuni a più funzionalità ma che riguardano comunque la possibilità per sovrascrivere tali valori quando necessario, le variabili globali hanno la precedenza minima e verranno sovrascritte quelli che ha Element.

      L'attributo data-cb-apply può essere utilizzato per applicare tutte le variabili globali e tutti gli attributi del file Elements a quelli specificati dal CSS-Selector-TSV, che è il valore di questo attributo (fai attenzione a utilizzare data-org-name nei CSS-Attribute-Selectors affinché l'applicazione funzioni anche in contenitori ripetitivi). Le variabili globali e quelle ricevute dall'originale Element possono essere sovrascritte semplicemente specificando nuovamente l'attributo variabile su Elements data-cb-apply si riferisce a dove appropriato.

      L'attributo data-cb-Loader, se impostato su "none" (senza distinzione tra maiuscole e minuscole), disattiva solo l'animazione del caricatore, non la disabilitazione se HTMLInputElements finché il tag Element non è stato elaborato.

      ATTENZIONE: La sospensione dell'elaborazione comporterà anche il ritardo nella disabilitazione all'immissione di ogni ulteriore elemento elementi.

      Returns Promise<boolean>

      Un Promise < boolean > che si risolve non appena tutti i Elements sono stati inizialmente elaborati e l'applicazione di funzionalità come il recupero dei valori Element Placeholder innescato.

      A CodBiError when the processing of an Element throws one.

    • Trasferisci tutti gli attributi CodBi (data-cb) esistenti su HTMLElement per copiare da su uno da copiare in.

      Parameters

      • from: HTMLElement

        The HTMLElement to transfer from.

      • to: HTMLElement

      Returns void

    • Estende un dato Element Placeholder in modo che vengano invocati sia il vecchio che il nuovo mentre il il modulo uno stesso potrebbe anche essere già un'estensione. Il valore recuperato dal precedente Elemento Placeholder verrà passato a quello nuovo che potrebbe ulteriormente trasformare i valori risultanti. Se un Elemento Placeholder con il id specificato non è stato ancora registrato, verrà registrato quello nuovo utilizzando CodBi.registerEP.

      Parameters

      Returns boolean

      TRUE se è avvenuta un'estensione oppure FALSE se è stata effettuata una regolare registrazione.

    • Estende una determinata funzionalità in modo che sia quella precedente che quella nuova vengano invocate mentre quella del modulo stesso potrebbe anche essere già un'estensione. Se una funzionalità con il id specificato non è stata ancora registrata, quella nuova verrà registrata utilizzando CodBi.registerFunctionality.

      Parameters

      Returns boolean

      TRUE se è avvenuta un'estensione oppure FALSE se è stata effettuata una regolare registrazione.

    • Recupera gli attributi dal Element toExtractFrom specificato che sono correlati al CodBi (data-cb- con prefisso). Tali attributi possono contenere Element Placeholder introdotti da an DBC.nestingBraces.opening parentesi graffa. Il segnaposto e il suo parametro facoltativo sono separati

      Parameters

      • toExtractFrom: Element

        The Element to extract the CodBi-Attributes from.

      Returns { [key: string]: unknown }

      Il {[key: string]: Unknown } contenente i nomi e i valori degli attributi.

    • Estrae tutti gli Element Placeholders utilizzati all'interno del valore di un attributo CodBi con la nidificazione supportata. Questi segnaposto hanno il seguente formato { segnaposto es. HTML.Text.Mapper > Parametro SSV }.

      Parameters

      • toExtractFrom: string

        The CodBi-Attributes's string to extract the Element Placeholders from.

      Returns string[]

      L'elenco di Element Placeholders trovati nella stringa toExtractFrom.

    • Recupera tutti i parametri disponibili a livello globale per lo "spazio dei nomi" specificato. Quelli devono essere separati da un carattere di sottolineatura (ad esempio Date_Frame_MaxField) quando vengono inseriti nella sezione "Variabili" della GUI. La trasformazione dei caratteri separati da punti in separati da trattini bassi e viceversa viene gestita automaticamente.

      Parameters

      • namespace: string

        The string-prefix a global parameter has to be tagged with to be retrieved.

      Returns { [key: string]: string }

    • Recupera il string interno dalla coppia di parentesi graffe più esterne specificata dal string specificato.

      Parameters

      • toGetFrom: string

        The string where to extract the one surrounded by the specified brackets pair from.

      Returns { keyPlaceholder: string; params: string }

      Il string richiesto o NULL se non ci sono parentesi graffe.

      A CodBiError if the count of the opening & closing CodBi.nestingBraces doesn't match.

    • Inserisce CodBiLogo e un'animazione di caricamento CSS dopo il destination specificato.

      Parameters

      • destination: Element

        The Element that shall precede the CodBiLogo.

      Returns void

    • Carica una configurazione come JSON applicandola ai Elements definiti nel suo attributo target (un elenco separato da tilde di selettori CSS). Tutte le altre proprietà definiscono gli Element contrassegnati Gli attributi CodBi (ad esempio FUNC diventerà data-cb-FUNC nel file Element.

      Prima di applicare i nuovi attributi a Elements, la proprietà FUNC di toLoad sarà ispezionato per individuare eventuali funzionalità non ancora caricate e da cui caricare i frammenti di codice mancanti il server Formcycle. Lo stesso processo verrà utilizzato su ogni altra proprietà, ad eccezione dei target da identificare element placeholders e carica i frammenti di codice mancanti prima di applicare qualsiasi nuovo attributo su any Element.

      Parameters

      • toLoad: { targets: string }

        The CodBi-Configuration to apply onto the targeted Elements.

      Returns Promise<void>

      Un Promise < void > che indica quando è stata eseguita l'operazione, incluso il caricamento dei frammenti di codice mancanti stato completato.

    • Esegue una chiamata a DBC.loadConfig per ogni {targets:string} in toLoad.

      Parameters

      • toLoad: { targets: string; [key: string]: unknown }[]

        See DBC.loadConfig.

      Returns void

    • Parameters

      • level: "INFO" | "WARNING" | "ERROR"
      • message: string
      • Optionaladjunct: string

      Returns void

    • Unisce a con b sovrascrivendo tutte le proprietà in a esistenti in entrambi. Proprietà che esistono in b verrà aggiunto a a.

      Parameters

      • a: { [key: string]: unknown }

        The {[key: string]: unknown } to merge.

      • b: { [key: string]: unknown }

        The {[key: string]: unknown } to merge.

      Returns { [key: string]: unknown }

      a si è fusa con b.

    • Parameters

      • toHandle: string

        The non-native configuration to load.

      Returns void

    • Registra un Element Placeholder utilizzando string specificato come ID.

      Parameters

      • id: string

        The string the placeholder should get as it's id.

      • generator: (params: string[]) => unknown

        The actual placeholder's ( params : Array < string >) => Array< unknown >.

      Returns boolean

    • Registrata una nuova funzionalità con {@params id} specificato.

      Parameters

      • id: string

        The string identifying the new functionality in {@CodBi.functionalities}.

      • init: (toLoad: unknown, toProcess: Element) => unknown

        The method to incorporating the new functionality.

      Returns boolean

      TRUE in caso di registrazione riuscita, altrimenti FALSE.

    • Rimuove tutti i Element di CSS-Class-cCodBiLoader da quello toRemoveFrom.

      Parameters

      • toRemoveFrom: Element

        The Element all CSS-Class-cCodBiLoader shall be remove from.

      Returns void

    • Segnala un errore specificando il dato message come definito in CodBi.settingsErrorReporting.

      Parameters

      • message: string

        The message describing the error.

      Returns undefined

    • Report utilizzando CodBi.reportError utilizzando i dettagli specificati.

      Parameters

      • cause: Element

        The currently processed Element the error occurred in.

      • functionality: string

        The functionality the error came up in.

      • parameter: { [key: string]: unknown }

        The parameter that where passed to the "functionality".

      • exception: any

        The Error that occurred.

      • message: string

        An optional string containing further non conform details.

      Returns void

    • Riporta l'informativa message come definito in CodBi.settingsErrorReporting.

      Parameters

      • message: string

        The information to report.

      Returns undefined

    • Risolve tutti i valori CodBi.availableEPs in tutti i valori string e Array -valori definiti all'interno del dato {@params config} ricorsivamente.

      Parameters

      • config: { [key: string]: unknown }

        The JSON-Config to resolve each EP in.

      Returns Promise<{ [key: string]: unknown }>

    • Risolve Element Placeholder nidificato all'interno del parametro Element Placeholder ricorsivamente (il conteggio degli iniziatori di CodBi.epSeparator determina il livello di possibile nidificazione).

      Parameters

      • params: string[]

        The Element Placeholder Parameter to check for Element Placeholder.

      Returns Promise<string[]>

      I params in arrivo risolti.

    • Invoca CodBi.resolveEP per recuperare il file dato elementPlaceholder.

      Parameters

      • elementPlaceholder: string

        The element placeholder to resolve (case insensitive).

      Returns { toResolve: unknown }

      Un JSON ({ toResolve : ... }) contenente il risultato della risoluzione è la proprietà "toResolve".

    • Divide tutte le parti separate da punto e virgola di string toSplit che non sono racchiuse tra parentesi graffe.

      Parameters

      • toSplit: string

        The string to split.

      Returns string[]

      Le parti richieste del file string.