@microsoft/teams-js 2.0.0-beta.4-dev.13 → 2.0.0-beta.4-dev.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2109,6 +2109,39 @@ export interface DeepLinkParameters {
2109
2109
  */
2110
2110
  subEntityWebUrl?: string;
2111
2111
  }
2112
+ export interface DialogSize {
2113
+ /**
2114
+ * The requested height of the webview/iframe.
2115
+ */
2116
+ height: DialogDimension | number;
2117
+ /**
2118
+ * The requested width of the webview/iframe.
2119
+ */
2120
+ width: DialogDimension | number;
2121
+ }
2122
+ export interface UrlDialogInfo {
2123
+ /**
2124
+ * The url to be rendered in the webview/iframe.
2125
+ */
2126
+ url: string;
2127
+ size: DialogSize;
2128
+ /**
2129
+ * Title of the task module.
2130
+ */
2131
+ title?: string;
2132
+ /**
2133
+ * If client doesnt support the URL, the URL that needs to be opened in the browser.
2134
+ */
2135
+ fallbackUrl?: string;
2136
+ }
2137
+ export interface BotUrlDialogInfo extends UrlDialogInfo {
2138
+ /**
2139
+ * Specifies a bot ID to send the result of the user's interaction with the task module.
2140
+ * The bot will receive a task/complete invoke event with a JSON object
2141
+ * in the event payload.
2142
+ */
2143
+ completionBotId: string;
2144
+ }
2112
2145
  export interface DialogInfo {
2113
2146
  /**
2114
2147
  * The url to be rendered in the webview/iframe.
@@ -2146,6 +2179,10 @@ export interface DialogInfo {
2146
2179
  * As of 2.0.0-beta.1, please use {@link DialogInfo} instead.
2147
2180
  */
2148
2181
  export type TaskInfo = DialogInfo;
2182
+ export interface DialogSize {
2183
+ height: DialogDimension | number;
2184
+ width: DialogDimension | number;
2185
+ }
2149
2186
  /**
2150
2187
  * @hidden
2151
2188
  * Hide from docs.
@@ -2749,20 +2786,23 @@ export namespace appInstallDialog {
2749
2786
  *
2750
2787
  * @beta
2751
2788
  */
2789
+ export interface SdkResponse {
2790
+ err: string;
2791
+ result: string | object;
2792
+ }
2752
2793
  export namespace dialog {
2794
+ type PostMessageChannel = (message: any, onComplete?: (status: boolean, reason?: string) => void) => void;
2795
+ type DialogSubmitHandler = (result: SdkResponse) => void;
2753
2796
  /**
2754
2797
  * Allows an app to open the dialog module.
2755
2798
  *
2756
- * @param dialogInfo - An object containing the parameters of the dialog module
2757
- * @param submitHandler - Handler to call when the task module is completed
2758
- */
2759
- function open(dialogInfo: DialogInfo, submitHandler?: (err: string, result: string | object) => void): IAppWindow;
2760
- /**
2761
- * Update height/width dialog info properties.
2799
+ * @param urlDialogInfo - An object containing the parameters of the dialog module.
2800
+ * @param submitHandler - This Handler is called when the dialog has been submitted or closed.
2801
+ * @param messageFromChildHandler - Handler that triggers if dialog sends a message to the app.
2762
2802
  *
2763
- * @param dialogInfo - An object containing width and height properties
2803
+ * @returns a function that can be used to send messages to the dialog.
2764
2804
  */
2765
- function resize(dialogInfo: DialogInfo): void;
2805
+ function open(urlDialogInfo: UrlDialogInfo, submitHandler?: DialogSubmitHandler, messageFromChildHandler?: PostMessageChannel): PostMessageChannel;
2766
2806
  /**
2767
2807
  * Submit the dialog module.
2768
2808
  *
@@ -2785,6 +2825,19 @@ export namespace dialog {
2785
2825
  */
2786
2826
  function registerOnMessageFromParent(listener: (message: any) => void): void;
2787
2827
  function isSupported(): boolean;
2828
+ namespace update {
2829
+ /**
2830
+ * Update dimensions - height/width of a dialog.
2831
+ *
2832
+ * @param dimensions - An object containing width and height properties.
2833
+ */
2834
+ function resize(dimensions: DialogSize): void;
2835
+ function isSupported(): boolean;
2836
+ }
2837
+ namespace bot {
2838
+ function open(botUrlDialogInfo: BotUrlDialogInfo, submitHandler?: DialogSubmitHandler, messageFromChildHandler?: PostMessageChannel): PostMessageChannel;
2839
+ function isSupported(): boolean;
2840
+ }
2788
2841
  }
2789
2842
 
2790
2843
  /**
@@ -5048,7 +5101,7 @@ export namespace settings {
5048
5101
  export namespace tasks {
5049
5102
  /**
5050
5103
  * @deprecated
5051
- * As of 2.0.0-beta.1, please use {@link dialog.open dialog.open(dialogInfo: DialogInfo, submitHandler?: (err: string, result: string) => void): IAppWindow} instead.
5104
+ * As of 2.0.0-beta.4, please use {@link dialog.open(dialogInfo: DialogInfo, submitHandler?: DialogSubmitHandler, messageFromChildHandler?: PostMessageChannel): PostMessageChannel} instead.
5052
5105
  *
5053
5106
  * Allows an app to open the task module.
5054
5107
  *
@@ -5058,7 +5111,7 @@ export namespace tasks {
5058
5111
  function startTask(taskInfo: TaskInfo, submitHandler?: (err: string, result: string | object) => void): IAppWindow;
5059
5112
  /**
5060
5113
  * @deprecated
5061
- * As of 2.0.0-beta.1, please use {@link dialog.resize dialog.resize(dialogInfo: DialogInfo): void} instead.
5114
+ * As of 2.0.0-beta.4, please use {@link dialog.update.resize dialog.update.resize(dimensions: DialogSize): void} instead.
5062
5115
  *
5063
5116
  * Update height/width task info properties.
5064
5117
  *
@@ -5075,5 +5128,8 @@ export namespace tasks {
5075
5128
  * @param appIds - Helps to validate that the call originates from the same appId as the one that invoked the task module
5076
5129
  */
5077
5130
  function submitTask(result?: string | object, appIds?: string | string[]): void;
5131
+ function getUrlDialogInfoFromTaskInfo(taskInfo: TaskInfo): UrlDialogInfo;
5132
+ function getBotUrlDialogInfoFromTaskInfo(taskInfo: TaskInfo): BotUrlDialogInfo;
5133
+ function getDefaultSizeIfNotProvided(taskInfo: TaskInfo): TaskInfo;
5078
5134
  }
5079
5135
 
@@ -1121,7 +1121,7 @@ __webpack_require__.d(__webpack_exports__, {
1121
1121
  });
1122
1122
 
1123
1123
  ;// CONCATENATED MODULE: ./src/internal/constants.ts
1124
- var version = "2.0.0-beta.4-dev.13";
1124
+ var version = "2.0.0-beta.4-dev.16";
1125
1125
  /**
1126
1126
  * @hidden
1127
1127
  * The client version when all SDK APIs started to check platform compatibility for the APIs was 1.6.0.
@@ -1220,6 +1220,8 @@ var validOrigins = [
1220
1220
  '*.sharepointonline.com',
1221
1221
  'outlook.office.com',
1222
1222
  'outlook-sdf.office.com',
1223
+ 'outlook.office365.com',
1224
+ 'outlook-sdf.office365.com',
1223
1225
  '*.teams.microsoft.com',
1224
1226
  'www.office.com',
1225
1227
  'word.office.com',
@@ -1818,7 +1820,10 @@ var runtime = {
1818
1820
  calendar: undefined,
1819
1821
  call: undefined,
1820
1822
  chat: undefined,
1821
- dialog: undefined,
1823
+ dialog: {
1824
+ bot: undefined,
1825
+ update: undefined,
1826
+ },
1822
1827
  location: undefined,
1823
1828
  logs: undefined,
1824
1829
  mail: undefined,
@@ -1854,7 +1859,10 @@ var teamsRuntimeConfig = {
1854
1859
  bot: {},
1855
1860
  call: {},
1856
1861
  chat: {},
1857
- dialog: {},
1862
+ dialog: {
1863
+ bot: {},
1864
+ update: {},
1865
+ },
1858
1866
  files: {},
1859
1867
  location: {},
1860
1868
  logs: {},
@@ -4245,6 +4253,124 @@ var appInstallDialog;
4245
4253
  appInstallDialog.isSupported = isSupported;
4246
4254
  })(appInstallDialog || (appInstallDialog = {}));
4247
4255
 
4256
+ ;// CONCATENATED MODULE: ./src/public/dialog.ts
4257
+ /* eslint-disable @typescript-eslint/explicit-module-boundary-types */
4258
+ /* eslint-disable @typescript-eslint/ban-types */
4259
+ /* eslint-disable @typescript-eslint/no-unused-vars */
4260
+
4261
+
4262
+
4263
+
4264
+
4265
+
4266
+ var dialog;
4267
+ (function (dialog) {
4268
+ /**
4269
+ * Allows an app to open the dialog module.
4270
+ *
4271
+ * @param urlDialogInfo - An object containing the parameters of the dialog module.
4272
+ * @param submitHandler - This Handler is called when the dialog has been submitted or closed.
4273
+ * @param messageFromChildHandler - Handler that triggers if dialog sends a message to the app.
4274
+ *
4275
+ * @returns a function that can be used to send messages to the dialog.
4276
+ */
4277
+ function open(urlDialogInfo, submitHandler, messageFromChildHandler) {
4278
+ ensureInitialized(FrameContexts.content, FrameContexts.sidePanel, FrameContexts.meetingStage);
4279
+ if (messageFromChildHandler) {
4280
+ registerHandler('messageForParent', messageFromChildHandler);
4281
+ }
4282
+ sendMessageToParent('tasks.startTask', [urlDialogInfo], function (err, result) {
4283
+ submitHandler({ err: err, result: result });
4284
+ });
4285
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
4286
+ var sendMessageToDialog = function (message, onComplete) {
4287
+ sendMessageToParent('messageForChild', [message], onComplete ? onComplete : getGenericOnCompleteHandler());
4288
+ };
4289
+ return sendMessageToDialog;
4290
+ }
4291
+ dialog.open = open;
4292
+ /**
4293
+ * Submit the dialog module.
4294
+ *
4295
+ * @param result - Contains the result to be sent to the bot or the app. Typically a JSON object or a serialized version of it
4296
+ * @param appIds - Helps to validate that the call originates from the same appId as the one that invoked the task module
4297
+ */
4298
+ function submit(result, appIds) {
4299
+ ensureInitialized(FrameContexts.content, FrameContexts.sidePanel, FrameContexts.task, FrameContexts.meetingStage);
4300
+ // Send tasks.completeTask instead of tasks.submitTask message for backward compatibility with Mobile clients
4301
+ sendMessageToParent('tasks.completeTask', [result, Array.isArray(appIds) ? appIds : [appIds]]);
4302
+ }
4303
+ dialog.submit = submit;
4304
+ /**
4305
+ * Send message to the parent from dialog
4306
+ *
4307
+ * @param message - The message to send
4308
+ * @param onComplete - The callback to know if the message to parent has been success/failed.
4309
+ */
4310
+ function sendMessageToParentFromDialog(
4311
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
4312
+ message, onComplete) {
4313
+ ensureInitialized(FrameContexts.task);
4314
+ sendMessageToParent('messageForParent', [message], onComplete ? onComplete : getGenericOnCompleteHandler());
4315
+ }
4316
+ dialog.sendMessageToParentFromDialog = sendMessageToParentFromDialog;
4317
+ /**
4318
+ * Fucntion to call when an event is received from the Parent
4319
+ *
4320
+ * @param type - The event to listen to. Currently the only supported type is 'message'.
4321
+ * @param listener - listener - The listener that will be called.
4322
+ */
4323
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
4324
+ function registerOnMessageFromParent(listener) {
4325
+ ensureInitialized();
4326
+ registerHandler('messageForChild', listener);
4327
+ }
4328
+ dialog.registerOnMessageFromParent = registerOnMessageFromParent;
4329
+ function isSupported() {
4330
+ return runtime.supports.dialog ? true : false;
4331
+ }
4332
+ dialog.isSupported = isSupported;
4333
+ var update;
4334
+ (function (update) {
4335
+ /**
4336
+ * Update dimensions - height/width of a dialog.
4337
+ *
4338
+ * @param dimensions - An object containing width and height properties.
4339
+ */
4340
+ function resize(dimensions) {
4341
+ ensureInitialized(FrameContexts.content, FrameContexts.sidePanel, FrameContexts.task, FrameContexts.meetingStage);
4342
+ sendMessageToParent('tasks.updateTask', [dimensions]);
4343
+ }
4344
+ update.resize = resize;
4345
+ function isSupported() {
4346
+ return runtime.supports.dialog ? (runtime.supports.dialog.update ? true : false) : false;
4347
+ }
4348
+ update.isSupported = isSupported;
4349
+ })(update = dialog.update || (dialog.update = {}));
4350
+ var bot;
4351
+ (function (bot) {
4352
+ function open(botUrlDialogInfo, submitHandler, messageFromChildHandler) {
4353
+ ensureInitialized(FrameContexts.content, FrameContexts.sidePanel, FrameContexts.meetingStage);
4354
+ if (messageFromChildHandler) {
4355
+ registerHandler('messageForParent', messageFromChildHandler);
4356
+ }
4357
+ sendMessageToParent('tasks.startTask', [botUrlDialogInfo], function (err, result) {
4358
+ submitHandler({ err: err, result: result });
4359
+ });
4360
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
4361
+ var sendMessageToDialog = function (message, onComplete) {
4362
+ sendMessageToParent('messageForChild', [message], onComplete ? onComplete : getGenericOnCompleteHandler());
4363
+ };
4364
+ return sendMessageToDialog;
4365
+ }
4366
+ bot.open = open;
4367
+ function isSupported() {
4368
+ return runtime.supports.dialog ? (runtime.supports.dialog.bot ? true : false) : false;
4369
+ }
4370
+ bot.isSupported = isSupported;
4371
+ })(bot = dialog.bot || (dialog.bot = {}));
4372
+ })(dialog || (dialog = {}));
4373
+
4248
4374
  ;// CONCATENATED MODULE: ./src/public/appWindow.ts
4249
4375
  /* eslint-disable @typescript-eslint/explicit-module-boundary-types */
4250
4376
  /* eslint-disable @typescript-eslint/no-explicit-any */
@@ -4317,109 +4443,6 @@ var ParentAppWindow = /** @class */ (function () {
4317
4443
  }());
4318
4444
 
4319
4445
 
4320
- ;// CONCATENATED MODULE: ./src/public/dialog.ts
4321
- /* eslint-disable @typescript-eslint/explicit-module-boundary-types */
4322
- /* eslint-disable @typescript-eslint/ban-types */
4323
- /* eslint-disable @typescript-eslint/no-unused-vars */
4324
- var __rest = (undefined && undefined.__rest) || function (s, e) {
4325
- var t = {};
4326
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4327
- t[p] = s[p];
4328
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
4329
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
4330
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
4331
- t[p[i]] = s[p[i]];
4332
- }
4333
- return t;
4334
- };
4335
-
4336
-
4337
-
4338
-
4339
-
4340
-
4341
-
4342
- /**
4343
- * Namespace to interact with the dialog module-specific part of the SDK.
4344
- *
4345
- * @remarks
4346
- * This object is usable only on the content frame.
4347
- *
4348
- * @beta
4349
- */
4350
- var dialog;
4351
- (function (dialog) {
4352
- /**
4353
- * Allows an app to open the dialog module.
4354
- *
4355
- * @param dialogInfo - An object containing the parameters of the dialog module
4356
- * @param submitHandler - Handler to call when the task module is completed
4357
- */
4358
- function open(dialogInfo, submitHandler) {
4359
- ensureInitialized(FrameContexts.content, FrameContexts.sidePanel, FrameContexts.meetingStage);
4360
- sendMessageToParent('tasks.startTask', [dialogInfo], submitHandler);
4361
- return new ChildAppWindow();
4362
- }
4363
- dialog.open = open;
4364
- /**
4365
- * Update height/width dialog info properties.
4366
- *
4367
- * @param dialogInfo - An object containing width and height properties
4368
- */
4369
- function resize(dialogInfo) {
4370
- ensureInitialized(FrameContexts.content, FrameContexts.sidePanel, FrameContexts.task, FrameContexts.meetingStage);
4371
- var width = dialogInfo.width, height = dialogInfo.height, extra = __rest(dialogInfo, ["width", "height"]);
4372
- if (!Object.keys(extra).length) {
4373
- sendMessageToParent('tasks.updateTask', [dialogInfo]);
4374
- }
4375
- else {
4376
- throw new Error('resize requires a dialogInfo argument containing only width and height');
4377
- }
4378
- }
4379
- dialog.resize = resize;
4380
- /**
4381
- * Submit the dialog module.
4382
- *
4383
- * @param result - Contains the result to be sent to the bot or the app. Typically a JSON object or a serialized version of it
4384
- * @param appIds - Helps to validate that the call originates from the same appId as the one that invoked the task module
4385
- */
4386
- function submit(result, appIds) {
4387
- ensureInitialized(FrameContexts.content, FrameContexts.sidePanel, FrameContexts.task, FrameContexts.meetingStage);
4388
- // Send tasks.completeTask instead of tasks.submitTask message for backward compatibility with Mobile clients
4389
- sendMessageToParent('tasks.completeTask', [result, Array.isArray(appIds) ? appIds : [appIds]]);
4390
- }
4391
- dialog.submit = submit;
4392
- /**
4393
- * Send message to the parent from dialog
4394
- *
4395
- * @param message - The message to send
4396
- * @param onComplete - The callback to know if the message to parent has been success/failed.
4397
- */
4398
- function sendMessageToParentFromDialog(
4399
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
4400
- message, onComplete) {
4401
- ensureInitialized(FrameContexts.task);
4402
- sendMessageToParent('messageForParent', [message], onComplete ? onComplete : getGenericOnCompleteHandler());
4403
- }
4404
- dialog.sendMessageToParentFromDialog = sendMessageToParentFromDialog;
4405
- /**
4406
- * Fucntion to call when an event is received from the Parent
4407
- *
4408
- * @param type - The event to listen to. Currently the only supported type is 'message'.
4409
- * @param listener - listener - The listener that will be called.
4410
- */
4411
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
4412
- function registerOnMessageFromParent(listener) {
4413
- ensureInitialized();
4414
- registerHandler('messageForChild', listener);
4415
- }
4416
- dialog.registerOnMessageFromParent = registerOnMessageFromParent;
4417
- function isSupported() {
4418
- return runtime.supports.dialog ? true : false;
4419
- }
4420
- dialog.isSupported = isSupported;
4421
- })(dialog || (dialog = {}));
4422
-
4423
4446
  ;// CONCATENATED MODULE: ./src/internal/mediaUtil.ts
4424
4447
 
4425
4448
 
@@ -6320,6 +6343,20 @@ var settings;
6320
6343
 
6321
6344
  ;// CONCATENATED MODULE: ./src/public/tasks.ts
6322
6345
  /* eslint-disable @typescript-eslint/ban-types */
6346
+ var __rest = (undefined && undefined.__rest) || function (s, e) {
6347
+ var t = {};
6348
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
6349
+ t[p] = s[p];
6350
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
6351
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
6352
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
6353
+ t[p[i]] = s[p[i]];
6354
+ }
6355
+ return t;
6356
+ };
6357
+
6358
+
6359
+
6323
6360
 
6324
6361
 
6325
6362
  /**
@@ -6334,7 +6371,7 @@ var tasks;
6334
6371
  (function (tasks) {
6335
6372
  /**
6336
6373
  * @deprecated
6337
- * As of 2.0.0-beta.1, please use {@link dialog.open dialog.open(dialogInfo: DialogInfo, submitHandler?: (err: string, result: string) => void): IAppWindow} instead.
6374
+ * As of 2.0.0-beta.4, please use {@link dialog.open(dialogInfo: DialogInfo, submitHandler?: DialogSubmitHandler, messageFromChildHandler?: PostMessageChannel): PostMessageChannel} instead.
6338
6375
  *
6339
6376
  * Allows an app to open the task module.
6340
6377
  *
@@ -6342,19 +6379,40 @@ var tasks;
6342
6379
  * @param submitHandler - Handler to call when the task module is completed
6343
6380
  */
6344
6381
  function startTask(taskInfo, submitHandler) {
6345
- return dialog.open(getDialogInfoFromTaskInfo(taskInfo), submitHandler);
6382
+ taskInfo = getDefaultSizeIfNotProvided(taskInfo);
6383
+ if (taskInfo.card !== undefined || taskInfo.url === undefined) {
6384
+ ensureInitialized(FrameContexts.content, FrameContexts.sidePanel, FrameContexts.meetingStage);
6385
+ sendMessageToParent('tasks.startTask', [taskInfo], submitHandler);
6386
+ }
6387
+ else if (taskInfo.completionBotId !== undefined) {
6388
+ dialog.bot.open(getBotUrlDialogInfoFromTaskInfo(taskInfo), function (sdkResponse) {
6389
+ return submitHandler(sdkResponse.err, sdkResponse.result);
6390
+ });
6391
+ }
6392
+ else {
6393
+ dialog.open(getUrlDialogInfoFromTaskInfo(taskInfo), function (sdkResponse) {
6394
+ return submitHandler(sdkResponse.err, sdkResponse.result);
6395
+ });
6396
+ }
6397
+ return new ChildAppWindow();
6346
6398
  }
6347
6399
  tasks.startTask = startTask;
6348
6400
  /**
6349
6401
  * @deprecated
6350
- * As of 2.0.0-beta.1, please use {@link dialog.resize dialog.resize(dialogInfo: DialogInfo): void} instead.
6402
+ * As of 2.0.0-beta.4, please use {@link dialog.update.resize dialog.update.resize(dimensions: DialogSize): void} instead.
6351
6403
  *
6352
6404
  * Update height/width task info properties.
6353
6405
  *
6354
6406
  * @param taskInfo - An object containing width and height properties
6355
6407
  */
6356
6408
  function updateTask(taskInfo) {
6357
- dialog.resize(taskInfo);
6409
+ taskInfo = getDefaultSizeIfNotProvided(taskInfo);
6410
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
6411
+ var width = taskInfo.width, height = taskInfo.height, extra = __rest(taskInfo, ["width", "height"]);
6412
+ if (Object.keys(extra).length) {
6413
+ throw new Error('resize requires a TaskInfo argument containing only width and height');
6414
+ }
6415
+ dialog.update.resize(taskInfo);
6358
6416
  }
6359
6417
  tasks.updateTask = updateTask;
6360
6418
  /**
@@ -6370,35 +6428,39 @@ var tasks;
6370
6428
  dialog.submit(result, appIds);
6371
6429
  }
6372
6430
  tasks.submitTask = submitTask;
6373
- function getDialogInfoFromTaskInfo(taskInfo) {
6374
- var dialogHeight = taskInfo.height && typeof taskInfo.height !== 'number'
6375
- ? getDialogDimensionFromTaskModuleDimension(taskInfo.height)
6376
- : taskInfo.height;
6377
- var dialogWidth = taskInfo.width && typeof taskInfo.width !== 'number'
6378
- ? getDialogDimensionFromTaskModuleDimension(taskInfo.width)
6379
- : taskInfo.width;
6380
- var dialogInfo = {
6431
+ function getUrlDialogInfoFromTaskInfo(taskInfo) {
6432
+ var urldialogInfo = {
6433
+ url: taskInfo.url,
6434
+ size: {
6435
+ height: taskInfo.height,
6436
+ width: taskInfo.width,
6437
+ },
6438
+ title: taskInfo.title,
6439
+ fallbackUrl: taskInfo.fallbackUrl,
6440
+ };
6441
+ return urldialogInfo;
6442
+ }
6443
+ tasks.getUrlDialogInfoFromTaskInfo = getUrlDialogInfoFromTaskInfo;
6444
+ function getBotUrlDialogInfoFromTaskInfo(taskInfo) {
6445
+ var botUrldialogInfo = {
6381
6446
  url: taskInfo.url,
6382
- card: taskInfo.card,
6383
- height: dialogHeight,
6384
- width: dialogWidth,
6447
+ size: {
6448
+ height: taskInfo.height,
6449
+ width: taskInfo.width,
6450
+ },
6385
6451
  title: taskInfo.title,
6386
6452
  fallbackUrl: taskInfo.fallbackUrl,
6387
6453
  completionBotId: taskInfo.completionBotId,
6388
6454
  };
6389
- return dialogInfo;
6455
+ return botUrldialogInfo;
6390
6456
  }
6391
- function getDialogDimensionFromTaskModuleDimension(taskModuleDimension) {
6392
- if (taskModuleDimension === TaskModuleDimension.Large) {
6393
- return TaskModuleDimension.Large;
6394
- }
6395
- else if (taskModuleDimension === TaskModuleDimension.Medium) {
6396
- return TaskModuleDimension.Medium;
6397
- }
6398
- else {
6399
- return TaskModuleDimension.Small;
6400
- }
6457
+ tasks.getBotUrlDialogInfoFromTaskInfo = getBotUrlDialogInfoFromTaskInfo;
6458
+ function getDefaultSizeIfNotProvided(taskInfo) {
6459
+ taskInfo.height = taskInfo.height ? taskInfo.height : TaskModuleDimension.Small;
6460
+ taskInfo.width = taskInfo.width ? taskInfo.width : TaskModuleDimension.Small;
6461
+ return taskInfo;
6401
6462
  }
6463
+ tasks.getDefaultSizeIfNotProvided = getDefaultSizeIfNotProvided;
6402
6464
  })(tasks || (tasks = {}));
6403
6465
 
6404
6466
  ;// CONCATENATED MODULE: ./src/public/index.ts