How to use the botbuilder-dialogs.Dialog.configure function in botbuilder-dialogs

To help you get started, we’ve selected a few botbuilder-dialogs examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github microsoft / botbuilder-js / libraries / botbuilder-planning / src / steps / callDialog.ts View on Github external
public static create(dialogId: string, config?: CallDialogConfiguration): CallDialog {
        const dialog = new CallDialog();
        dialog.dialogId = dialogId;
        if (config) {
            if (config.options) { dialog.options = config.options }
            if (config.property) { dialog.property = config.property }
            Dialog.configure(dialog, config);
        }
        return dialog;
    }
}
github microsoft / botbuilder-js / libraries / botbuilder-planning / src / steps / mapEntity.ts View on Github external
static create(entityName: string, property: string, config?: DialogConfiguration): MapEntity {
        const dialog = new MapEntity();
        dialog.entityName= entityName;
        dialog.property = property;
        if (config) {
            Dialog.configure(dialog, config);
        }
        return dialog;
    }
}
github microsoft / botbuilder-js / libraries / botbuilder-planning / src / steps / setProperty.ts View on Github external
static create(expression: (state: DialogContextState) => Promise, config?: DialogConfiguration): SetProperty {
        const dialog = new SetProperty();
        dialog.expression = expression;
        if (config) {
            Dialog.configure(dialog, config);
        }
        return dialog;
    }
}
github microsoft / botbuilder-js / libraries / botbuilder-planning / src / steps / gotoDialog.ts View on Github external
static create(config?: GotoDialogConfiguration): GotoDialog {
        const dialog = new GotoDialog();
        if (config) {
            if (config.dialogId) { dialog.dialogId = config.dialogId }
            if (config.options) { dialog.options = config.options }
            Dialog.configure(dialog, config);
        }
        return dialog;
    }
}
github microsoft / botbuilder-js / libraries / botbuilder-planning / src / steps / sendList.ts View on Github external
static create(listProperty: string, messageTemplate: string, itemTemplate?: string, config?: DialogConfiguration): SendList {
        itemTemplate = itemTemplate || '- {item}\n';
        if (messageTemplate.indexOf('{list}') < 0) {
            messageTemplate += '\n\n{list}';
        }
        if (itemTemplate.indexOf('{item') < 0) {
            itemTemplate += ' {item}\n';
        }
        
        const dialog = new SendList();
        dialog.listProperty = listProperty;
        dialog.messageTemplate.value = messageTemplate;
        dialog.itemTemplate.value = itemTemplate;
        if (config) {
            Dialog.configure(dialog, config);
        }
        return dialog;
    }
}