botbuilder-dialogs
Advanced tools
Comparing version 4.0.0-m1.10 to 4.0.0-m1.11
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const prompt_1 = require("./prompt"); | ||
//import * as Recognizers from '@microsoft/recognizers-text-date-time'; | ||
const Recognizers = require('@microsoft/recognizers-text-date-time'); | ||
const dateTimeModel = Recognizers.DateTimeRecognizer.instance.getDateTimeModel('en-us'); | ||
const Recognizers = require("@microsoft/recognizers-text-date-time"); | ||
/** | ||
@@ -70,3 +68,3 @@ * Prompts a user to enter a datetime expression. By default the prompt will return to the | ||
const utterance = context.request && context.request.text ? context.request.text : ''; | ||
const results = dateTimeModel.parse(utterance); | ||
const results = Recognizers.recognizeDateTime(utterance, 'en-us'); | ||
const value = results.length > 0 && results[0].resolution ? (results[0].resolution.values || []) : []; | ||
@@ -73,0 +71,0 @@ if (this.validator) { |
@@ -5,3 +5,3 @@ { | ||
"description": "A dialog stack based conversation manager for Microsoft Bot Builder.", | ||
"version": "4.0.0-m1.10", | ||
"version": "4.0.0-m1.11", | ||
"license": "MIT", | ||
@@ -8,0 +8,0 @@ "keywords": [ |
@@ -11,7 +11,4 @@ /** | ||
import { PromptOptions, PromptValidator, formatPrompt } from './prompt'; | ||
//import * as Recognizers from '@microsoft/recognizers-text-date-time'; | ||
const Recognizers = require('@microsoft/recognizers-text-date-time'); | ||
import * as Recognizers from '@microsoft/recognizers-text-date-time'; | ||
const dateTimeModel = Recognizers.DateTimeRecognizer.instance.getDateTimeModel('en-us'); | ||
/** | ||
@@ -102,3 +99,3 @@ * Datetime result returned by `DatetimePrompt`. For more details see the LUIS docs for | ||
const utterance = context.request && context.request.text ? context.request.text : ''; | ||
const results = dateTimeModel.parse(utterance); | ||
const results = Recognizers.recognizeDateTime(utterance, 'en-us'); | ||
const value: FoundDatetime[] = results.length > 0 && results[0].resolution ? (results[0].resolution.values || []) : []; | ||
@@ -105,0 +102,0 @@ if (this.validator) { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
158540
3249