From 677a21cf02cbbe939bdeffd394f31ad0d61e7de3 Mon Sep 17 00:00:00 2001 From: Weikang Li Date: Thu, 25 Jul 2019 16:32:00 +0800 Subject: [PATCH 1/2] fix copy crash issue --- dist/Models/Containers/Column.d.ts | 2 +- dist/Models/Containers/Column.js | 8 +- dist/Models/Containers/Container.d.ts | 2 +- dist/Models/Containers/Container.js | 8 +- .../Models/Containers/Column.d.ts | 2 +- .../AdaptiveCards/Models/Containers/Column.js | 8 +- .../Models/Containers/Container.d.ts | 2 +- .../Models/Containers/Container.js | 8 +- .../BingAnswer2/show me funny video.json | 228 ++++++++++-------- src/Models/Containers/Column.ts | 8 +- src/Models/Containers/Container.ts | 8 +- .../Models/Containers/Column.d.ts | 2 +- .../AdaptiveCards/Models/Containers/Column.js | 8 +- .../Models/Containers/Container.d.ts | 2 +- .../Models/Containers/Container.js | 8 +- tool/src/components/ErrorMessage/index.js | 2 +- 16 files changed, 178 insertions(+), 128 deletions(-) diff --git a/dist/Models/Containers/Column.d.ts b/dist/Models/Containers/Column.d.ts index d68882a..93ba407 100644 --- a/dist/Models/Containers/Column.d.ts +++ b/dist/Models/Containers/Column.d.ts @@ -11,5 +11,5 @@ export declare class ColumnModel extends ScopeModel { style: 'default' | 'emphasis'; backgroundImage: BackgroundImageModel; constructor(json: any, parent: AbstractModel, context: CardContext); - readonly children: (ContentModel | import("../Actions/OpenUrlAction").OpenUrlActionModel | import("../Actions/SubmitAction").SubmitActionModel | BackgroundImageModel)[]; + readonly children: AbstractModel[]; } diff --git a/dist/Models/Containers/Column.js b/dist/Models/Containers/Column.js index c736faf..80dd185 100644 --- a/dist/Models/Containers/Column.js +++ b/dist/Models/Containers/Column.js @@ -17,9 +17,13 @@ export class ColumnModel extends ScopeModel { } } get children() { + let result = [...this.items]; if (this.selectAction) { - return [...this.items, this.selectAction, this.backgroundImage]; + result = result.concat(this.selectAction); } - return this.items; + if (this.backgroundImage) { + result = result.concat(this.backgroundImage); + } + return result; } } diff --git a/dist/Models/Containers/Container.d.ts b/dist/Models/Containers/Container.d.ts index aa9831d..8180601 100644 --- a/dist/Models/Containers/Container.d.ts +++ b/dist/Models/Containers/Container.d.ts @@ -10,5 +10,5 @@ export declare class ContainerModel extends ScopeModel { style: 'default' | 'emphasis'; backgroundImage: BackgroundImageModel; constructor(json: any, parent: AbstractModel, context: CardContext); - readonly children: (ContentModel | import("../Actions/OpenUrlAction").OpenUrlActionModel | import("../Actions/SubmitAction").SubmitActionModel | BackgroundImageModel)[]; + readonly children: AbstractModel[]; } diff --git a/dist/Models/Containers/Container.js b/dist/Models/Containers/Container.js index eb10072..e6e76c8 100644 --- a/dist/Models/Containers/Container.js +++ b/dist/Models/Containers/Container.js @@ -16,9 +16,13 @@ export class ContainerModel extends ScopeModel { } } get children() { + let result = [...this.items]; if (this.selectAction) { - return [...this.items, this.selectAction, this.backgroundImage]; + result = result.concat(this.selectAction); } - return this.items; + if (this.backgroundImage) { + result = result.concat(this.backgroundImage); + } + return result; } } diff --git a/examples/AdaptiveCards/Models/Containers/Column.d.ts b/examples/AdaptiveCards/Models/Containers/Column.d.ts index d68882a..93ba407 100644 --- a/examples/AdaptiveCards/Models/Containers/Column.d.ts +++ b/examples/AdaptiveCards/Models/Containers/Column.d.ts @@ -11,5 +11,5 @@ export declare class ColumnModel extends ScopeModel { style: 'default' | 'emphasis'; backgroundImage: BackgroundImageModel; constructor(json: any, parent: AbstractModel, context: CardContext); - readonly children: (ContentModel | import("../Actions/OpenUrlAction").OpenUrlActionModel | import("../Actions/SubmitAction").SubmitActionModel | BackgroundImageModel)[]; + readonly children: AbstractModel[]; } diff --git a/examples/AdaptiveCards/Models/Containers/Column.js b/examples/AdaptiveCards/Models/Containers/Column.js index c736faf..80dd185 100644 --- a/examples/AdaptiveCards/Models/Containers/Column.js +++ b/examples/AdaptiveCards/Models/Containers/Column.js @@ -17,9 +17,13 @@ export class ColumnModel extends ScopeModel { } } get children() { + let result = [...this.items]; if (this.selectAction) { - return [...this.items, this.selectAction, this.backgroundImage]; + result = result.concat(this.selectAction); } - return this.items; + if (this.backgroundImage) { + result = result.concat(this.backgroundImage); + } + return result; } } diff --git a/examples/AdaptiveCards/Models/Containers/Container.d.ts b/examples/AdaptiveCards/Models/Containers/Container.d.ts index aa9831d..8180601 100644 --- a/examples/AdaptiveCards/Models/Containers/Container.d.ts +++ b/examples/AdaptiveCards/Models/Containers/Container.d.ts @@ -10,5 +10,5 @@ export declare class ContainerModel extends ScopeModel { style: 'default' | 'emphasis'; backgroundImage: BackgroundImageModel; constructor(json: any, parent: AbstractModel, context: CardContext); - readonly children: (ContentModel | import("../Actions/OpenUrlAction").OpenUrlActionModel | import("../Actions/SubmitAction").SubmitActionModel | BackgroundImageModel)[]; + readonly children: AbstractModel[]; } diff --git a/examples/AdaptiveCards/Models/Containers/Container.js b/examples/AdaptiveCards/Models/Containers/Container.js index eb10072..e6e76c8 100644 --- a/examples/AdaptiveCards/Models/Containers/Container.js +++ b/examples/AdaptiveCards/Models/Containers/Container.js @@ -16,9 +16,13 @@ export class ContainerModel extends ScopeModel { } } get children() { + let result = [...this.items]; if (this.selectAction) { - return [...this.items, this.selectAction, this.backgroundImage]; + result = result.concat(this.selectAction); } - return this.items; + if (this.backgroundImage) { + result = result.concat(this.backgroundImage); + } + return result; } } diff --git a/examples/mockData/BingAnswer2/show me funny video.json b/examples/mockData/BingAnswer2/show me funny video.json index 6478829..2d5b7fb 100644 --- a/examples/mockData/BingAnswer2/show me funny video.json +++ b/examples/mockData/BingAnswer2/show me funny video.json @@ -1,110 +1,128 @@ { - "body": [{ - "items": [{ - "items": [{ - "horizontalAlignment": "left", - "size": "medium", - "text": "I pulled up some videos for you.", - "type": "TextBlock" - }], + "body": [ + { + "items": [ + { + "items": [ + { + "horizontalAlignment": "left", + "size": "medium", + "text": "I pulled up some videos for you.", + "type": "TextBlock" + } + ], + "type": "Container" + }, + { + "type": "ImageSet", + "imageSize": "large", + "images": [ + { + "horizontalAlignment": "center", + "url": "https://www.bingapis.com/widget/apiscreenshotproxy?input=2&setlang=en-us&cc=us&cardbranded=true&screenshotstyle=small&imageformat=jpeg&imagequality=20&conversation=true&answercount=1&promote=suggestedReplies&extendcortana=1&addfeaturesnoexpansion=adaptivecard&adaptivecard=true&responseformat=html&apicache=5fb92d425feb4256a43488385bedcd87&contentid=4iGnn4jTP0RW2RJDfyje0g&apiversion=v7&w=285&z=3&scale=300&mkt=en-US&clientid=9D23B5BAB6700EACC1C285EDD136DD3F&ua=Mozilla%2f5.0+(Windows+NT+10.0%3b+Win64%3b+x64%3b+Cortana+1.7.17.14393%3b+10.0.0.0.14393.82)+AppleWebKit%2f537.36+(KHTML%2c+like+Gecko)+Chrome%2f51.0.2704.79+Safari%2f537.36+Edge%2f14.14393&sessionId=5630AB740C3E4BA99B22DAB98B296FA6&expire=1531634360&seemorefilter=MultimediaKifVideoAnswer_Video&s=.apiScreenshotItem%3anth-child(1)&apiq=iD62mXlb4KNauRjt_E9UROu6DwvZwObCZSakjF6V3kDdZnIPjdFf65FA5ce-Bz0douF_D-_aZBPyOVQwkbjccyHZocsx70BYePpaJa0FfP69-GmL9V10vWp8pYFc_6c7g6MN76sMXDvOj55A6ds6fxy_710l7UpCNGNBWHg7tR8", + "selectAction": { + "url": "https://www.bing.com/videos/search?q=Show%20me%20funny%20video.&view=detail&mid=8CD31B9AA3A933A0C3DC8CD31B9AA3A933A0C3DC", + "type": "Action.OpenUrl" + }, + "size": "large", + "type": "Image" + }, + { + "horizontalAlignment": "center", + "url": "https://www.bingapis.com/widget/apiscreenshotproxy?input=2&setlang=en-us&cc=us&cardbranded=true&screenshotstyle=small&imageformat=jpeg&imagequality=20&conversation=true&answercount=1&promote=suggestedReplies&extendcortana=1&addfeaturesnoexpansion=adaptivecard&adaptivecard=true&responseformat=html&apicache=5fb92d425feb4256a43488385bedcd87&contentid=4iGnn4jTP0RW2RJDfyje0g&apiversion=v7&w=285&z=3&scale=300&mkt=en-US&clientid=9D23B5BAB6700EACC1C285EDD136DD3F&ua=Mozilla%2f5.0+(Windows+NT+10.0%3b+Win64%3b+x64%3b+Cortana+1.7.17.14393%3b+10.0.0.0.14393.82)+AppleWebKit%2f537.36+(KHTML%2c+like+Gecko)+Chrome%2f51.0.2704.79+Safari%2f537.36+Edge%2f14.14393&sessionId=5630AB740C3E4BA99B22DAB98B296FA6&expire=1531634360&seemorefilter=MultimediaKifVideoAnswer_Video&s=.apiScreenshotItem%3anth-child(2)&apiq=fsXoznpNDg_7TJo0WPdjkuVJxLu28uSYsePeatcIkOasjqjMmNtyhvHXZtpZswR2L4YI_JlRjCoAibKCRDKjcaHfgrcjLc5RTVL026NdmhYcvzR5cOnap5fLtvfALZ5l6X0m_b-Wy3q2su_1EKfoQergs-IMeiBUHQUMz41pFXI", + "selectAction": { + "url": "https://www.bing.com/videos/search?q=Show%20me%20funny%20video.&view=detail&mid=869AD1E6AF9AFE43B95C869AD1E6AF9AFE43B95C", + "type": "Action.OpenUrl" + }, + "size": "large", + "type": "Image" + }, + { + "horizontalAlignment": "center", + "url": "https://www.bingapis.com/widget/apiscreenshotproxy?input=2&setlang=en-us&cc=us&cardbranded=true&screenshotstyle=small&imageformat=jpeg&imagequality=20&conversation=true&answercount=1&promote=suggestedReplies&extendcortana=1&addfeaturesnoexpansion=adaptivecard&adaptivecard=true&responseformat=html&apicache=5fb92d425feb4256a43488385bedcd87&contentid=4iGnn4jTP0RW2RJDfyje0g&apiversion=v7&w=285&z=3&scale=300&mkt=en-US&clientid=9D23B5BAB6700EACC1C285EDD136DD3F&ua=Mozilla%2f5.0+(Windows+NT+10.0%3b+Win64%3b+x64%3b+Cortana+1.7.17.14393%3b+10.0.0.0.14393.82)+AppleWebKit%2f537.36+(KHTML%2c+like+Gecko)+Chrome%2f51.0.2704.79+Safari%2f537.36+Edge%2f14.14393&sessionId=5630AB740C3E4BA99B22DAB98B296FA6&expire=1531634360&seemorefilter=MultimediaKifVideoAnswer_Video&s=.apiScreenshotItem%3anth-child(3)&apiq=_4e_fXjFIe9yq67UBrPhDVe4cDFdighb2MALF8SE4WPNF9V7HEKbMQXdZqojYBMM3M6qq6GD1KvGSHXTZdeViVY8pNn9z6BLp5XedNB6OM5yijd78Usb22YoS47Zah1TKbKh_-QFooCKQQLOGr-xfjCr985I91L1U51DGeNcXAE", + "selectAction": { + "url": "https://www.bing.com/videos/search?q=Show%20me%20funny%20video.&view=detail&mid=7D153AAECB5572518D4E7D153AAECB5572518D4E", + "type": "Action.OpenUrl" + }, + "size": "large", + "type": "Image" + }, + { + "horizontalAlignment": "center", + "url": "https://www.bingapis.com/widget/apiscreenshotproxy?input=2&setlang=en-us&cc=us&cardbranded=true&screenshotstyle=small&imageformat=jpeg&imagequality=20&conversation=true&answercount=1&promote=suggestedReplies&extendcortana=1&addfeaturesnoexpansion=adaptivecard&adaptivecard=true&responseformat=html&apicache=5fb92d425feb4256a43488385bedcd87&contentid=4iGnn4jTP0RW2RJDfyje0g&apiversion=v7&w=285&z=3&scale=300&mkt=en-US&clientid=9D23B5BAB6700EACC1C285EDD136DD3F&ua=Mozilla%2f5.0+(Windows+NT+10.0%3b+Win64%3b+x64%3b+Cortana+1.7.17.14393%3b+10.0.0.0.14393.82)+AppleWebKit%2f537.36+(KHTML%2c+like+Gecko)+Chrome%2f51.0.2704.79+Safari%2f537.36+Edge%2f14.14393&sessionId=5630AB740C3E4BA99B22DAB98B296FA6&expire=1531634360&seemorefilter=MultimediaKifVideoAnswer_Video&s=.apiScreenshotItem%3anth-child(4)&apiq=lR3YzZB9AjVWnyjsXM1rPvKwQAAOIhPry5WXujKJB87zAmqHAxnEpowEcPAMuWcYZGEJMMNrTutwN_n0qahuYNX-aQymTU4ozkdwESYqNX70h9ikqjvyrufPM_s1yx-6n0GsqemlP_29lBKa8Ua2pH7M2UDm9YIkGSLYcyAV488", + "selectAction": { + "url": "https://www.bing.com/videos/search?q=Show%20me%20funny%20video.&view=detail&mid=130A5D6B3FB6EEAB1DB4130A5D6B3FB6EEAB1DB4", + "type": "Action.OpenUrl" + }, + "size": "large", + "type": "Image" + }, + { + "horizontalAlignment": "center", + "url": "https://www.bingapis.com/widget/apiscreenshotproxy?input=2&setlang=en-us&cc=us&cardbranded=true&screenshotstyle=small&imageformat=jpeg&imagequality=20&conversation=true&answercount=1&promote=suggestedReplies&extendcortana=1&addfeaturesnoexpansion=adaptivecard&adaptivecard=true&responseformat=html&apicache=5fb92d425feb4256a43488385bedcd87&contentid=4iGnn4jTP0RW2RJDfyje0g&apiversion=v7&w=285&z=3&scale=300&mkt=en-US&clientid=9D23B5BAB6700EACC1C285EDD136DD3F&ua=Mozilla%2f5.0+(Windows+NT+10.0%3b+Win64%3b+x64%3b+Cortana+1.7.17.14393%3b+10.0.0.0.14393.82)+AppleWebKit%2f537.36+(KHTML%2c+like+Gecko)+Chrome%2f51.0.2704.79+Safari%2f537.36+Edge%2f14.14393&sessionId=5630AB740C3E4BA99B22DAB98B296FA6&expire=1531634360&seemorefilter=MultimediaKifVideoAnswer_Video&s=.apiScreenshotItem%3anth-child(5)&apiq=VcZ29-uX6Zn1hbNuYqiT96wcOG_dVtbbGzmfKzC2WsFf_lygrUwu-bWCv0bMiNKKk8k8PXEW6dU5SplIdfLMI6XP5htQpKBHQURejFnPmh2sKyvBs7x5YhWk3ennGKNWkv3RKTwLMdIelRIAjyv0g7CvaaHQ5j0ZWQGJ-B32MPs", + "selectAction": { + "url": "https://www.bing.com/videos/search?q=Show%20me%20funny%20video.&view=detail&mid=E304D30753C588475ED9E304D30753C588475ED9", + "type": "Action.OpenUrl" + }, + "size": "large", + "type": "Image" + }, + { + "horizontalAlignment": "center", + "url": "https://www.bingapis.com/widget/apiscreenshotproxy?input=2&setlang=en-us&cc=us&cardbranded=true&screenshotstyle=small&imageformat=jpeg&imagequality=20&conversation=true&answercount=1&promote=suggestedReplies&extendcortana=1&addfeaturesnoexpansion=adaptivecard&adaptivecard=true&responseformat=html&apicache=5fb92d425feb4256a43488385bedcd87&contentid=4iGnn4jTP0RW2RJDfyje0g&apiversion=v7&w=285&z=3&scale=300&mkt=en-US&clientid=9D23B5BAB6700EACC1C285EDD136DD3F&ua=Mozilla%2f5.0+(Windows+NT+10.0%3b+Win64%3b+x64%3b+Cortana+1.7.17.14393%3b+10.0.0.0.14393.82)+AppleWebKit%2f537.36+(KHTML%2c+like+Gecko)+Chrome%2f51.0.2704.79+Safari%2f537.36+Edge%2f14.14393&sessionId=5630AB740C3E4BA99B22DAB98B296FA6&expire=1531634360&seemorefilter=MultimediaKifVideoAnswer_Video&s=.apiScreenshotItem%3anth-child(6)&apiq=h9RrJkZl5TpddjvHlmw-8I6tPDMP9GU1RvHjZxYPt6Obe7ecv0UWlsR6ohYc3zqSqAvg7VHDCRX0wCIrDGZmzUtvfRoAinxrYLW852rweQPjl4EFU3o1gHL3D6Jal0cYwIfJlzj8idrOsAxxXX-n3rx4uFUSWnX8-SPr65q0boU", + "selectAction": { + "url": "https://www.bing.com/videos/search?q=Show%20me%20funny%20video.&view=detail&mid=2BF5041CA11ECB1C285A2BF5041CA11ECB1C285A", + "type": "Action.OpenUrl" + }, + "size": "large", + "type": "Image" + }, + { + "horizontalAlignment": "center", + "url": "https://www.bingapis.com/widget/apiscreenshotproxy?input=2&setlang=en-us&cc=us&cardbranded=true&screenshotstyle=small&imageformat=jpeg&imagequality=20&conversation=true&answercount=1&promote=suggestedReplies&extendcortana=1&addfeaturesnoexpansion=adaptivecard&adaptivecard=true&responseformat=html&apicache=5fb92d425feb4256a43488385bedcd87&contentid=4iGnn4jTP0RW2RJDfyje0g&apiversion=v7&w=285&z=3&scale=300&mkt=en-US&clientid=9D23B5BAB6700EACC1C285EDD136DD3F&ua=Mozilla%2f5.0+(Windows+NT+10.0%3b+Win64%3b+x64%3b+Cortana+1.7.17.14393%3b+10.0.0.0.14393.82)+AppleWebKit%2f537.36+(KHTML%2c+like+Gecko)+Chrome%2f51.0.2704.79+Safari%2f537.36+Edge%2f14.14393&sessionId=5630AB740C3E4BA99B22DAB98B296FA6&expire=1531634360&seemorefilter=MultimediaKifVideoAnswer_Video&s=.apiScreenshotItem%3anth-child(7)&apiq=nzai8brt8nRWeSnvg9b_U7FoP4jLPZQ6qr6Buo4-qtbp0QUFaSBHZtE3xElmY0cmol6tCBepNZfTjkyVcDQ2lUVqClyWpVX9ElQZ7f_bdd-kPT7QcJTWBvsr8NYami8j5K5Yxm4b_3fvdKtCk2BvHTf53__y2cV9geXvOWZRweo", + "selectAction": { + "url": "https://www.bing.com/videos/search?q=Show%20me%20funny%20video.&view=detail&mid=780FFA49BBE15674BEB5780FFA49BBE15674BEB5", + "type": "Action.OpenUrl" + }, + "size": "large", + "type": "Image" + }, + { + "horizontalAlignment": "center", + "url": "https://www.bingapis.com/widget/apiscreenshotproxy?input=2&setlang=en-us&cc=us&cardbranded=true&screenshotstyle=small&imageformat=jpeg&imagequality=20&conversation=true&answercount=1&promote=suggestedReplies&extendcortana=1&addfeaturesnoexpansion=adaptivecard&adaptivecard=true&responseformat=html&apicache=5fb92d425feb4256a43488385bedcd87&contentid=4iGnn4jTP0RW2RJDfyje0g&apiversion=v7&w=285&z=3&scale=300&mkt=en-US&clientid=9D23B5BAB6700EACC1C285EDD136DD3F&ua=Mozilla%2f5.0+(Windows+NT+10.0%3b+Win64%3b+x64%3b+Cortana+1.7.17.14393%3b+10.0.0.0.14393.82)+AppleWebKit%2f537.36+(KHTML%2c+like+Gecko)+Chrome%2f51.0.2704.79+Safari%2f537.36+Edge%2f14.14393&sessionId=5630AB740C3E4BA99B22DAB98B296FA6&expire=1531634360&seemorefilter=MultimediaKifVideoAnswer_Video&s=.apiScreenshotItem%3anth-child(8)&apiq=7hOQHQMjxeT24X-DBRQdTQlaYCgDGLQSCdy1mIxZwBlA82NQfO2KoVhrAZKqhosk1dtc1vGl8s0ooY1cmvtLyfnXXCiFbOSsPD6WMdnZai6Ztpv9hTVjTuoer2e5Ypj7ZLO3Ut6D_Sv0_1EPkVRPP7xS3K3jKS3R--MLCEEM-Xc", + "selectAction": { + "url": "https://www.bing.com/videos/search?q=Show%20me%20funny%20video.&view=detail&mid=5FB81F052B1972A1B0DF5FB81F052B1972A1B0DF", + "type": "Action.OpenUrl" + }, + "size": "large", + "type": "Image" + }, + { + "horizontalAlignment": "center", + "url": "https://www.bingapis.com/widget/apiscreenshotproxy?input=2&setlang=en-us&cc=us&cardbranded=true&screenshotstyle=small&imageformat=jpeg&imagequality=20&conversation=true&answercount=1&promote=suggestedReplies&extendcortana=1&addfeaturesnoexpansion=adaptivecard&adaptivecard=true&responseformat=html&apicache=5fb92d425feb4256a43488385bedcd87&contentid=4iGnn4jTP0RW2RJDfyje0g&apiversion=v7&w=285&z=3&scale=300&mkt=en-US&clientid=9D23B5BAB6700EACC1C285EDD136DD3F&ua=Mozilla%2f5.0+(Windows+NT+10.0%3b+Win64%3b+x64%3b+Cortana+1.7.17.14393%3b+10.0.0.0.14393.82)+AppleWebKit%2f537.36+(KHTML%2c+like+Gecko)+Chrome%2f51.0.2704.79+Safari%2f537.36+Edge%2f14.14393&sessionId=5630AB740C3E4BA99B22DAB98B296FA6&expire=1531634360&seemorefilter=MultimediaKifVideoAnswer_Video&s=.apiScreenshotItem%3anth-child(9)&apiq=g8oa86AvGXITnZ0mIXDl7mhzA3HYW87I0szMSHN2wMumJWb2m-QCY9SSGLrVfbn832sm-lHophpb0ZejXL6tETSjnwCD2rzu_tug6WH1J9KkXD6ZG57JkAEtWqtDc0QdEA7tUMeoyMZUoHvauk-z3H-09fMUsprhtbLszv1XBG4", + "selectAction": { + "url": "https://www.bing.com/videos/search?q=Show%20me%20funny%20video.&view=detail&mid=D209EAB70A7EEEF0E595D209EAB70A7EEEF0E595", + "type": "Action.OpenUrl" + }, + "size": "large", + "type": "Image" + }, + { + "horizontalAlignment": "center", + "url": "https://www.bingapis.com/widget/apiscreenshotproxy?input=2&setlang=en-us&cc=us&cardbranded=true&screenshotstyle=small&imageformat=jpeg&imagequality=20&conversation=true&answercount=1&promote=suggestedReplies&extendcortana=1&addfeaturesnoexpansion=adaptivecard&adaptivecard=true&responseformat=html&apicache=5fb92d425feb4256a43488385bedcd87&contentid=4iGnn4jTP0RW2RJDfyje0g&apiversion=v7&w=285&z=3&scale=300&mkt=en-US&clientid=9D23B5BAB6700EACC1C285EDD136DD3F&ua=Mozilla%2f5.0+(Windows+NT+10.0%3b+Win64%3b+x64%3b+Cortana+1.7.17.14393%3b+10.0.0.0.14393.82)+AppleWebKit%2f537.36+(KHTML%2c+like+Gecko)+Chrome%2f51.0.2704.79+Safari%2f537.36+Edge%2f14.14393&sessionId=5630AB740C3E4BA99B22DAB98B296FA6&expire=1531634360&seemorefilter=MultimediaKifVideoAnswer_Video&s=.apiScreenshotItem%3anth-child(10)&apiq=UmTFSu7bro7AKRlz65HtRu2bJpvjOAnhHKf4U-wxgJIsVAtRLrrzthFzdxcpyVFeZ_7S_jiE-V4PtG1OncEmu0UzFlhZcNOmLaHjcbQS-zKBIs153whGzc_9I-Rz_gPqM_ItNmgGtsnyUUE_cH6HSh1gFbqmyhxmdCPdKdXMFEg", + "selectAction": { + "url": "https://www.bing.com/videos/search?q=Show%20me%20funny%20video.&view=detail&mid=F04635C67694D36BE27DF04635C67694D36BE27D", + "type": "Action.OpenUrl" + }, + "size": "large", + "type": "Image" + } + ] + } + ], "type": "Container" - }, { - "type": "ImageSet", - "imageSize": "large", - "images": [{ - "horizontalAlignment": "center", - "url": "https://www.bingapis.com/widget/apiscreenshotproxy?input=2&setlang=en-us&cc=us&cardbranded=true&screenshotstyle=small&imageformat=jpeg&imagequality=20&conversation=true&answercount=1&promote=suggestedReplies&extendcortana=1&addfeaturesnoexpansion=adaptivecard&adaptivecard=true&responseformat=html&apicache=5fb92d425feb4256a43488385bedcd87&contentid=4iGnn4jTP0RW2RJDfyje0g&apiversion=v7&w=285&z=3&scale=300&mkt=en-US&clientid=9D23B5BAB6700EACC1C285EDD136DD3F&ua=Mozilla%2f5.0+(Windows+NT+10.0%3b+Win64%3b+x64%3b+Cortana+1.7.17.14393%3b+10.0.0.0.14393.82)+AppleWebKit%2f537.36+(KHTML%2c+like+Gecko)+Chrome%2f51.0.2704.79+Safari%2f537.36+Edge%2f14.14393&sessionId=5630AB740C3E4BA99B22DAB98B296FA6&expire=1531634360&seemorefilter=MultimediaKifVideoAnswer_Video&s=.apiScreenshotItem%3anth-child(1)&apiq=iD62mXlb4KNauRjt_E9UROu6DwvZwObCZSakjF6V3kDdZnIPjdFf65FA5ce-Bz0douF_D-_aZBPyOVQwkbjccyHZocsx70BYePpaJa0FfP69-GmL9V10vWp8pYFc_6c7g6MN76sMXDvOj55A6ds6fxy_710l7UpCNGNBWHg7tR8", - "selectAction": { - "url": "https://www.bing.com/videos/search?q=Show%20me%20funny%20video.&view=detail&mid=8CD31B9AA3A933A0C3DC8CD31B9AA3A933A0C3DC", - "type": "Action.OpenUrl" - }, - "size": "large", - "type": "Image" - }, { - "horizontalAlignment": "center", - "url": "https://www.bingapis.com/widget/apiscreenshotproxy?input=2&setlang=en-us&cc=us&cardbranded=true&screenshotstyle=small&imageformat=jpeg&imagequality=20&conversation=true&answercount=1&promote=suggestedReplies&extendcortana=1&addfeaturesnoexpansion=adaptivecard&adaptivecard=true&responseformat=html&apicache=5fb92d425feb4256a43488385bedcd87&contentid=4iGnn4jTP0RW2RJDfyje0g&apiversion=v7&w=285&z=3&scale=300&mkt=en-US&clientid=9D23B5BAB6700EACC1C285EDD136DD3F&ua=Mozilla%2f5.0+(Windows+NT+10.0%3b+Win64%3b+x64%3b+Cortana+1.7.17.14393%3b+10.0.0.0.14393.82)+AppleWebKit%2f537.36+(KHTML%2c+like+Gecko)+Chrome%2f51.0.2704.79+Safari%2f537.36+Edge%2f14.14393&sessionId=5630AB740C3E4BA99B22DAB98B296FA6&expire=1531634360&seemorefilter=MultimediaKifVideoAnswer_Video&s=.apiScreenshotItem%3anth-child(2)&apiq=fsXoznpNDg_7TJo0WPdjkuVJxLu28uSYsePeatcIkOasjqjMmNtyhvHXZtpZswR2L4YI_JlRjCoAibKCRDKjcaHfgrcjLc5RTVL026NdmhYcvzR5cOnap5fLtvfALZ5l6X0m_b-Wy3q2su_1EKfoQergs-IMeiBUHQUMz41pFXI", - "selectAction": { - "url": "https://www.bing.com/videos/search?q=Show%20me%20funny%20video.&view=detail&mid=869AD1E6AF9AFE43B95C869AD1E6AF9AFE43B95C", - "type": "Action.OpenUrl" - }, - "size": "large", - "type": "Image" - }, { - "horizontalAlignment": "center", - "url": "https://www.bingapis.com/widget/apiscreenshotproxy?input=2&setlang=en-us&cc=us&cardbranded=true&screenshotstyle=small&imageformat=jpeg&imagequality=20&conversation=true&answercount=1&promote=suggestedReplies&extendcortana=1&addfeaturesnoexpansion=adaptivecard&adaptivecard=true&responseformat=html&apicache=5fb92d425feb4256a43488385bedcd87&contentid=4iGnn4jTP0RW2RJDfyje0g&apiversion=v7&w=285&z=3&scale=300&mkt=en-US&clientid=9D23B5BAB6700EACC1C285EDD136DD3F&ua=Mozilla%2f5.0+(Windows+NT+10.0%3b+Win64%3b+x64%3b+Cortana+1.7.17.14393%3b+10.0.0.0.14393.82)+AppleWebKit%2f537.36+(KHTML%2c+like+Gecko)+Chrome%2f51.0.2704.79+Safari%2f537.36+Edge%2f14.14393&sessionId=5630AB740C3E4BA99B22DAB98B296FA6&expire=1531634360&seemorefilter=MultimediaKifVideoAnswer_Video&s=.apiScreenshotItem%3anth-child(3)&apiq=_4e_fXjFIe9yq67UBrPhDVe4cDFdighb2MALF8SE4WPNF9V7HEKbMQXdZqojYBMM3M6qq6GD1KvGSHXTZdeViVY8pNn9z6BLp5XedNB6OM5yijd78Usb22YoS47Zah1TKbKh_-QFooCKQQLOGr-xfjCr985I91L1U51DGeNcXAE", - "selectAction": { - "url": "https://www.bing.com/videos/search?q=Show%20me%20funny%20video.&view=detail&mid=7D153AAECB5572518D4E7D153AAECB5572518D4E", - "type": "Action.OpenUrl" - }, - "size": "large", - "type": "Image" - }, { - "horizontalAlignment": "center", - "url": "https://www.bingapis.com/widget/apiscreenshotproxy?input=2&setlang=en-us&cc=us&cardbranded=true&screenshotstyle=small&imageformat=jpeg&imagequality=20&conversation=true&answercount=1&promote=suggestedReplies&extendcortana=1&addfeaturesnoexpansion=adaptivecard&adaptivecard=true&responseformat=html&apicache=5fb92d425feb4256a43488385bedcd87&contentid=4iGnn4jTP0RW2RJDfyje0g&apiversion=v7&w=285&z=3&scale=300&mkt=en-US&clientid=9D23B5BAB6700EACC1C285EDD136DD3F&ua=Mozilla%2f5.0+(Windows+NT+10.0%3b+Win64%3b+x64%3b+Cortana+1.7.17.14393%3b+10.0.0.0.14393.82)+AppleWebKit%2f537.36+(KHTML%2c+like+Gecko)+Chrome%2f51.0.2704.79+Safari%2f537.36+Edge%2f14.14393&sessionId=5630AB740C3E4BA99B22DAB98B296FA6&expire=1531634360&seemorefilter=MultimediaKifVideoAnswer_Video&s=.apiScreenshotItem%3anth-child(4)&apiq=lR3YzZB9AjVWnyjsXM1rPvKwQAAOIhPry5WXujKJB87zAmqHAxnEpowEcPAMuWcYZGEJMMNrTutwN_n0qahuYNX-aQymTU4ozkdwESYqNX70h9ikqjvyrufPM_s1yx-6n0GsqemlP_29lBKa8Ua2pH7M2UDm9YIkGSLYcyAV488", - "selectAction": { - "url": "https://www.bing.com/videos/search?q=Show%20me%20funny%20video.&view=detail&mid=130A5D6B3FB6EEAB1DB4130A5D6B3FB6EEAB1DB4", - "type": "Action.OpenUrl" - }, - "size": "large", - "type": "Image" - }, { - "horizontalAlignment": "center", - "url": "https://www.bingapis.com/widget/apiscreenshotproxy?input=2&setlang=en-us&cc=us&cardbranded=true&screenshotstyle=small&imageformat=jpeg&imagequality=20&conversation=true&answercount=1&promote=suggestedReplies&extendcortana=1&addfeaturesnoexpansion=adaptivecard&adaptivecard=true&responseformat=html&apicache=5fb92d425feb4256a43488385bedcd87&contentid=4iGnn4jTP0RW2RJDfyje0g&apiversion=v7&w=285&z=3&scale=300&mkt=en-US&clientid=9D23B5BAB6700EACC1C285EDD136DD3F&ua=Mozilla%2f5.0+(Windows+NT+10.0%3b+Win64%3b+x64%3b+Cortana+1.7.17.14393%3b+10.0.0.0.14393.82)+AppleWebKit%2f537.36+(KHTML%2c+like+Gecko)+Chrome%2f51.0.2704.79+Safari%2f537.36+Edge%2f14.14393&sessionId=5630AB740C3E4BA99B22DAB98B296FA6&expire=1531634360&seemorefilter=MultimediaKifVideoAnswer_Video&s=.apiScreenshotItem%3anth-child(5)&apiq=VcZ29-uX6Zn1hbNuYqiT96wcOG_dVtbbGzmfKzC2WsFf_lygrUwu-bWCv0bMiNKKk8k8PXEW6dU5SplIdfLMI6XP5htQpKBHQURejFnPmh2sKyvBs7x5YhWk3ennGKNWkv3RKTwLMdIelRIAjyv0g7CvaaHQ5j0ZWQGJ-B32MPs", - "selectAction": { - "url": "https://www.bing.com/videos/search?q=Show%20me%20funny%20video.&view=detail&mid=E304D30753C588475ED9E304D30753C588475ED9", - "type": "Action.OpenUrl" - }, - "size": "large", - "type": "Image" - }, { - "horizontalAlignment": "center", - "url": "https://www.bingapis.com/widget/apiscreenshotproxy?input=2&setlang=en-us&cc=us&cardbranded=true&screenshotstyle=small&imageformat=jpeg&imagequality=20&conversation=true&answercount=1&promote=suggestedReplies&extendcortana=1&addfeaturesnoexpansion=adaptivecard&adaptivecard=true&responseformat=html&apicache=5fb92d425feb4256a43488385bedcd87&contentid=4iGnn4jTP0RW2RJDfyje0g&apiversion=v7&w=285&z=3&scale=300&mkt=en-US&clientid=9D23B5BAB6700EACC1C285EDD136DD3F&ua=Mozilla%2f5.0+(Windows+NT+10.0%3b+Win64%3b+x64%3b+Cortana+1.7.17.14393%3b+10.0.0.0.14393.82)+AppleWebKit%2f537.36+(KHTML%2c+like+Gecko)+Chrome%2f51.0.2704.79+Safari%2f537.36+Edge%2f14.14393&sessionId=5630AB740C3E4BA99B22DAB98B296FA6&expire=1531634360&seemorefilter=MultimediaKifVideoAnswer_Video&s=.apiScreenshotItem%3anth-child(6)&apiq=h9RrJkZl5TpddjvHlmw-8I6tPDMP9GU1RvHjZxYPt6Obe7ecv0UWlsR6ohYc3zqSqAvg7VHDCRX0wCIrDGZmzUtvfRoAinxrYLW852rweQPjl4EFU3o1gHL3D6Jal0cYwIfJlzj8idrOsAxxXX-n3rx4uFUSWnX8-SPr65q0boU", - "selectAction": { - "url": "https://www.bing.com/videos/search?q=Show%20me%20funny%20video.&view=detail&mid=2BF5041CA11ECB1C285A2BF5041CA11ECB1C285A", - "type": "Action.OpenUrl" - }, - "size": "large", - "type": "Image" - }, { - "horizontalAlignment": "center", - "url": "https://www.bingapis.com/widget/apiscreenshotproxy?input=2&setlang=en-us&cc=us&cardbranded=true&screenshotstyle=small&imageformat=jpeg&imagequality=20&conversation=true&answercount=1&promote=suggestedReplies&extendcortana=1&addfeaturesnoexpansion=adaptivecard&adaptivecard=true&responseformat=html&apicache=5fb92d425feb4256a43488385bedcd87&contentid=4iGnn4jTP0RW2RJDfyje0g&apiversion=v7&w=285&z=3&scale=300&mkt=en-US&clientid=9D23B5BAB6700EACC1C285EDD136DD3F&ua=Mozilla%2f5.0+(Windows+NT+10.0%3b+Win64%3b+x64%3b+Cortana+1.7.17.14393%3b+10.0.0.0.14393.82)+AppleWebKit%2f537.36+(KHTML%2c+like+Gecko)+Chrome%2f51.0.2704.79+Safari%2f537.36+Edge%2f14.14393&sessionId=5630AB740C3E4BA99B22DAB98B296FA6&expire=1531634360&seemorefilter=MultimediaKifVideoAnswer_Video&s=.apiScreenshotItem%3anth-child(7)&apiq=nzai8brt8nRWeSnvg9b_U7FoP4jLPZQ6qr6Buo4-qtbp0QUFaSBHZtE3xElmY0cmol6tCBepNZfTjkyVcDQ2lUVqClyWpVX9ElQZ7f_bdd-kPT7QcJTWBvsr8NYami8j5K5Yxm4b_3fvdKtCk2BvHTf53__y2cV9geXvOWZRweo", - "selectAction": { - "url": "https://www.bing.com/videos/search?q=Show%20me%20funny%20video.&view=detail&mid=780FFA49BBE15674BEB5780FFA49BBE15674BEB5", - "type": "Action.OpenUrl" - }, - "size": "large", - "type": "Image" - }, { - "horizontalAlignment": "center", - "url": "https://www.bingapis.com/widget/apiscreenshotproxy?input=2&setlang=en-us&cc=us&cardbranded=true&screenshotstyle=small&imageformat=jpeg&imagequality=20&conversation=true&answercount=1&promote=suggestedReplies&extendcortana=1&addfeaturesnoexpansion=adaptivecard&adaptivecard=true&responseformat=html&apicache=5fb92d425feb4256a43488385bedcd87&contentid=4iGnn4jTP0RW2RJDfyje0g&apiversion=v7&w=285&z=3&scale=300&mkt=en-US&clientid=9D23B5BAB6700EACC1C285EDD136DD3F&ua=Mozilla%2f5.0+(Windows+NT+10.0%3b+Win64%3b+x64%3b+Cortana+1.7.17.14393%3b+10.0.0.0.14393.82)+AppleWebKit%2f537.36+(KHTML%2c+like+Gecko)+Chrome%2f51.0.2704.79+Safari%2f537.36+Edge%2f14.14393&sessionId=5630AB740C3E4BA99B22DAB98B296FA6&expire=1531634360&seemorefilter=MultimediaKifVideoAnswer_Video&s=.apiScreenshotItem%3anth-child(8)&apiq=7hOQHQMjxeT24X-DBRQdTQlaYCgDGLQSCdy1mIxZwBlA82NQfO2KoVhrAZKqhosk1dtc1vGl8s0ooY1cmvtLyfnXXCiFbOSsPD6WMdnZai6Ztpv9hTVjTuoer2e5Ypj7ZLO3Ut6D_Sv0_1EPkVRPP7xS3K3jKS3R--MLCEEM-Xc", - "selectAction": { - "url": "https://www.bing.com/videos/search?q=Show%20me%20funny%20video.&view=detail&mid=5FB81F052B1972A1B0DF5FB81F052B1972A1B0DF", - "type": "Action.OpenUrl" - }, - "size": "large", - "type": "Image" - }, { - "horizontalAlignment": "center", - "url": "https://www.bingapis.com/widget/apiscreenshotproxy?input=2&setlang=en-us&cc=us&cardbranded=true&screenshotstyle=small&imageformat=jpeg&imagequality=20&conversation=true&answercount=1&promote=suggestedReplies&extendcortana=1&addfeaturesnoexpansion=adaptivecard&adaptivecard=true&responseformat=html&apicache=5fb92d425feb4256a43488385bedcd87&contentid=4iGnn4jTP0RW2RJDfyje0g&apiversion=v7&w=285&z=3&scale=300&mkt=en-US&clientid=9D23B5BAB6700EACC1C285EDD136DD3F&ua=Mozilla%2f5.0+(Windows+NT+10.0%3b+Win64%3b+x64%3b+Cortana+1.7.17.14393%3b+10.0.0.0.14393.82)+AppleWebKit%2f537.36+(KHTML%2c+like+Gecko)+Chrome%2f51.0.2704.79+Safari%2f537.36+Edge%2f14.14393&sessionId=5630AB740C3E4BA99B22DAB98B296FA6&expire=1531634360&seemorefilter=MultimediaKifVideoAnswer_Video&s=.apiScreenshotItem%3anth-child(9)&apiq=g8oa86AvGXITnZ0mIXDl7mhzA3HYW87I0szMSHN2wMumJWb2m-QCY9SSGLrVfbn832sm-lHophpb0ZejXL6tETSjnwCD2rzu_tug6WH1J9KkXD6ZG57JkAEtWqtDc0QdEA7tUMeoyMZUoHvauk-z3H-09fMUsprhtbLszv1XBG4", - "selectAction": { - "url": "https://www.bing.com/videos/search?q=Show%20me%20funny%20video.&view=detail&mid=D209EAB70A7EEEF0E595D209EAB70A7EEEF0E595", - "type": "Action.OpenUrl" - }, - "size": "large", - "type": "Image" - }, { - "horizontalAlignment": "center", - "url": "https://www.bingapis.com/widget/apiscreenshotproxy?input=2&setlang=en-us&cc=us&cardbranded=true&screenshotstyle=small&imageformat=jpeg&imagequality=20&conversation=true&answercount=1&promote=suggestedReplies&extendcortana=1&addfeaturesnoexpansion=adaptivecard&adaptivecard=true&responseformat=html&apicache=5fb92d425feb4256a43488385bedcd87&contentid=4iGnn4jTP0RW2RJDfyje0g&apiversion=v7&w=285&z=3&scale=300&mkt=en-US&clientid=9D23B5BAB6700EACC1C285EDD136DD3F&ua=Mozilla%2f5.0+(Windows+NT+10.0%3b+Win64%3b+x64%3b+Cortana+1.7.17.14393%3b+10.0.0.0.14393.82)+AppleWebKit%2f537.36+(KHTML%2c+like+Gecko)+Chrome%2f51.0.2704.79+Safari%2f537.36+Edge%2f14.14393&sessionId=5630AB740C3E4BA99B22DAB98B296FA6&expire=1531634360&seemorefilter=MultimediaKifVideoAnswer_Video&s=.apiScreenshotItem%3anth-child(10)&apiq=UmTFSu7bro7AKRlz65HtRu2bJpvjOAnhHKf4U-wxgJIsVAtRLrrzthFzdxcpyVFeZ_7S_jiE-V4PtG1OncEmu0UzFlhZcNOmLaHjcbQS-zKBIs153whGzc_9I-Rz_gPqM_ItNmgGtsnyUUE_cH6HSh1gFbqmyhxmdCPdKdXMFEg", - "selectAction": { - "url": "https://www.bing.com/videos/search?q=Show%20me%20funny%20video.&view=detail&mid=F04635C67694D36BE27DF04635C67694D36BE27D", - "type": "Action.OpenUrl" - }, - "size": "large", - "type": "Image" - }] - }], - "type": "Container" - }], + } + ], "version": "1.0", "type": "AdaptiveCard" } \ No newline at end of file diff --git a/src/Models/Containers/Column.ts b/src/Models/Containers/Column.ts index fa8ce58..acbecef 100644 --- a/src/Models/Containers/Column.ts +++ b/src/Models/Containers/Column.ts @@ -30,9 +30,13 @@ export class ColumnModel extends ScopeModel { } public get children() { + let result = [...this.items] as AbstractModel[]; if (this.selectAction) { - return [...this.items, this.selectAction, this.backgroundImage]; + result = result.concat(this.selectAction); } - return this.items; + if (this.backgroundImage) { + result = result.concat(this.backgroundImage); + } + return result; } } diff --git a/src/Models/Containers/Container.ts b/src/Models/Containers/Container.ts index ea4d4c0..a4258dd 100644 --- a/src/Models/Containers/Container.ts +++ b/src/Models/Containers/Container.ts @@ -28,9 +28,13 @@ export class ContainerModel extends ScopeModel { } public get children() { + let result = [...this.items] as AbstractModel[]; if (this.selectAction) { - return [...this.items, this.selectAction, this.backgroundImage]; + result = result.concat(this.selectAction); } - return this.items; + if (this.backgroundImage) { + result = result.concat(this.backgroundImage); + } + return result; } } diff --git a/tool/src/assets/AdaptiveCards/Models/Containers/Column.d.ts b/tool/src/assets/AdaptiveCards/Models/Containers/Column.d.ts index d68882a..93ba407 100644 --- a/tool/src/assets/AdaptiveCards/Models/Containers/Column.d.ts +++ b/tool/src/assets/AdaptiveCards/Models/Containers/Column.d.ts @@ -11,5 +11,5 @@ export declare class ColumnModel extends ScopeModel { style: 'default' | 'emphasis'; backgroundImage: BackgroundImageModel; constructor(json: any, parent: AbstractModel, context: CardContext); - readonly children: (ContentModel | import("../Actions/OpenUrlAction").OpenUrlActionModel | import("../Actions/SubmitAction").SubmitActionModel | BackgroundImageModel)[]; + readonly children: AbstractModel[]; } diff --git a/tool/src/assets/AdaptiveCards/Models/Containers/Column.js b/tool/src/assets/AdaptiveCards/Models/Containers/Column.js index c736faf..80dd185 100644 --- a/tool/src/assets/AdaptiveCards/Models/Containers/Column.js +++ b/tool/src/assets/AdaptiveCards/Models/Containers/Column.js @@ -17,9 +17,13 @@ export class ColumnModel extends ScopeModel { } } get children() { + let result = [...this.items]; if (this.selectAction) { - return [...this.items, this.selectAction, this.backgroundImage]; + result = result.concat(this.selectAction); } - return this.items; + if (this.backgroundImage) { + result = result.concat(this.backgroundImage); + } + return result; } } diff --git a/tool/src/assets/AdaptiveCards/Models/Containers/Container.d.ts b/tool/src/assets/AdaptiveCards/Models/Containers/Container.d.ts index aa9831d..8180601 100644 --- a/tool/src/assets/AdaptiveCards/Models/Containers/Container.d.ts +++ b/tool/src/assets/AdaptiveCards/Models/Containers/Container.d.ts @@ -10,5 +10,5 @@ export declare class ContainerModel extends ScopeModel { style: 'default' | 'emphasis'; backgroundImage: BackgroundImageModel; constructor(json: any, parent: AbstractModel, context: CardContext); - readonly children: (ContentModel | import("../Actions/OpenUrlAction").OpenUrlActionModel | import("../Actions/SubmitAction").SubmitActionModel | BackgroundImageModel)[]; + readonly children: AbstractModel[]; } diff --git a/tool/src/assets/AdaptiveCards/Models/Containers/Container.js b/tool/src/assets/AdaptiveCards/Models/Containers/Container.js index eb10072..e6e76c8 100644 --- a/tool/src/assets/AdaptiveCards/Models/Containers/Container.js +++ b/tool/src/assets/AdaptiveCards/Models/Containers/Container.js @@ -16,9 +16,13 @@ export class ContainerModel extends ScopeModel { } } get children() { + let result = [...this.items]; if (this.selectAction) { - return [...this.items, this.selectAction, this.backgroundImage]; + result = result.concat(this.selectAction); } - return this.items; + if (this.backgroundImage) { + result = result.concat(this.backgroundImage); + } + return result; } } diff --git a/tool/src/components/ErrorMessage/index.js b/tool/src/components/ErrorMessage/index.js index 368ee1f..52a9fef 100644 --- a/tool/src/components/ErrorMessage/index.js +++ b/tool/src/components/ErrorMessage/index.js @@ -23,7 +23,7 @@ class ErrorMessage extends React.Component { if (temp_res.messages.length > 0) { temp_res.messages.forEach(mes => { let temp_path = com.path.join(' >> '); - temp_path = temp_path + ' >> '; + temp_path = temp_path + ' : '; mes.message = temp_path + mes.message }) result = result.combine(temp_res) From d9ab1d7a48443b6da1c25a3cf40f8f4777087190 Mon Sep 17 00:00:00 2001 From: Weikang Li Date: Thu, 1 Aug 2019 15:41:32 +0800 Subject: [PATCH 2/2] modify readme and add scrollbar to error message list --- README.md | 2 ++ tool/src/components/App/App.css | 1 + tool/src/components/App/index.js | 5 ++--- tool/src/components/ErrorMessage/index.js | 4 ++-- tool/yarn.lock | 15 ++++++++++----- 5 files changed, 17 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 0fa0575..332a17c 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,8 @@ React Native renderer for [AdaptiveCards](http://adaptivecards.io/). ![Sample Screenshot](./screenshot.gif "Sample Screenshot") +Online renderer and debugging tool can be found [here](https://microsoft.github.io/react-native-adaptivecards/) + ## Getting Started ### Basic Usage diff --git a/tool/src/components/App/App.css b/tool/src/components/App/App.css index e1fcfb1..032b240 100644 --- a/tool/src/components/App/App.css +++ b/tool/src/components/App/App.css @@ -62,4 +62,5 @@ } .Pane2 { background-color: white; + overflow: auto; } \ No newline at end of file diff --git a/tool/src/components/App/index.js b/tool/src/components/App/index.js index a12ac14..e31405e 100644 --- a/tool/src/components/App/index.js +++ b/tool/src/components/App/index.js @@ -17,15 +17,14 @@ export default class App extends React.Component {
- + - +
-
); diff --git a/tool/src/components/ErrorMessage/index.js b/tool/src/components/ErrorMessage/index.js index 52a9fef..d030267 100644 --- a/tool/src/components/ErrorMessage/index.js +++ b/tool/src/components/ErrorMessage/index.js @@ -32,10 +32,10 @@ class ErrorMessage extends React.Component { } return ( -
+
{ - result.messages.map(mes => ) + result.messages.map(mes => ) }
); diff --git a/tool/yarn.lock b/tool/yarn.lock index 1ab8d2a..721d8ca 100644 --- a/tool/yarn.lock +++ b/tool/yarn.lock @@ -1946,7 +1946,8 @@ boolbase@~1.0.0: bowser@^1.7.3: version "1.9.4" - resolved "http://registry.npm.taobao.org/bowser/download/bowser-1.9.4.tgz#890c58a2813a9d3243704334fa81b96a5c150c9a" + resolved "https://registry.yarnpkg.com/bowser/-/bowser-1.9.4.tgz#890c58a2813a9d3243704334fa81b96a5c150c9a" + integrity sha512-9IdMmj2KjigRq6oWhmwv1W36pDuA4STQZ8q6YO9um+x07xgYNCD3Oou+WP/3L1HNz7iqythGet3/p4wvc8AAwQ== bplist-creator@0.0.7: version "0.0.7" @@ -2655,7 +2656,8 @@ date-now@^0.1.4: debounce@^1.1.0: version "1.2.0" - resolved "http://registry.npm.taobao.org/debounce/download/debounce-1.2.0.tgz#44a540abc0ea9943018dc0eaa95cce87f65cd131" + resolved "https://registry.yarnpkg.com/debounce/-/debounce-1.2.0.tgz#44a540abc0ea9943018dc0eaa95cce87f65cd131" + integrity sha512-mYtLl1xfZLi1m4RtQYlZgJUNQjl4ZxVnHzIR8nLLgi4q1YT8o/WM+MK/f8yfcc9s5Ir5zRaPZyZU6xs1Syoocg== debug@2.6.9, debug@^2.1.2, debug@^2.2.0, debug@^2.3.3, debug@^2.6.6, debug@^2.6.8, debug@^2.6.9: version "2.6.9" @@ -2685,7 +2687,8 @@ decode-uri-component@^0.2.0: deep-assign@^2.0.0: version "2.0.0" - resolved "http://registry.npm.taobao.org/deep-assign/download/deep-assign-2.0.0.tgz#ebe06b1f07f08dae597620e3dd1622f371a1c572" + resolved "https://registry.yarnpkg.com/deep-assign/-/deep-assign-2.0.0.tgz#ebe06b1f07f08dae597620e3dd1622f371a1c572" + integrity sha1-6+BrHwfwja5ZdiDj3RYi83GhxXI= dependencies: is-obj "^1.0.0" @@ -4092,7 +4095,8 @@ ini@~1.3.0: inline-style-prefixer@^4.0.0: version "4.0.2" - resolved "http://registry.npm.taobao.org/inline-style-prefixer/download/inline-style-prefixer-4.0.2.tgz#d390957d26f281255fe101da863158ac6eb60911" + resolved "https://registry.yarnpkg.com/inline-style-prefixer/-/inline-style-prefixer-4.0.2.tgz#d390957d26f281255fe101da863158ac6eb60911" + integrity sha512-N8nVhwfYga9MiV9jWlwfdj1UDIaZlBFu4cJSJkIr7tZX7sHpHhGR5su1qdpW+7KPL8ISTvCIkcaFi/JdBknvPg== dependencies: bowser "^1.7.3" css-in-js-utils "^2.0.0" @@ -6669,7 +6673,8 @@ react-native-vector-icons@^5.0.0: react-native-web@0.6.0: version "0.6.0" - resolved "http://registry.npm.taobao.org/react-native-web/download/react-native-web-0.6.0.tgz#46c843ab83c569246dc43ba745033c1bb4d22930" + resolved "https://registry.yarnpkg.com/react-native-web/-/react-native-web-0.6.0.tgz#46c843ab83c569246dc43ba745033c1bb4d22930" + integrity sha512-MIE+/h8Niu+tbKbdkkXLWkyT+tK0ZmSE2by0WXDGTbJ1fdCAAkwM0JPfXE1OyMWH9OfB+u1Bbk8fABOITIYrmw== dependencies: array-find-index "^1.0.2" create-react-class "^15.6.2"