Merge pull request #68 from WeikangLee/release_0.1.x
fix copy crash issue
This commit is contained in:
Коммит
c438e8b913
|
@ -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
|
||||
|
|
|
@ -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[];
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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[];
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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[];
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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[];
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,17 +1,23 @@
|
|||
{
|
||||
"body": [{
|
||||
"items": [{
|
||||
"items": [{
|
||||
"body": [
|
||||
{
|
||||
"items": [
|
||||
{
|
||||
"items": [
|
||||
{
|
||||
"horizontalAlignment": "left",
|
||||
"size": "medium",
|
||||
"text": "I pulled up some videos for you.",
|
||||
"type": "TextBlock"
|
||||
}],
|
||||
}
|
||||
],
|
||||
"type": "Container"
|
||||
}, {
|
||||
},
|
||||
{
|
||||
"type": "ImageSet",
|
||||
"imageSize": "large",
|
||||
"images": [{
|
||||
"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": {
|
||||
|
@ -20,7 +26,8 @@
|
|||
},
|
||||
"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": {
|
||||
|
@ -29,7 +36,8 @@
|
|||
},
|
||||
"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": {
|
||||
|
@ -38,7 +46,8 @@
|
|||
},
|
||||
"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": {
|
||||
|
@ -47,7 +56,8 @@
|
|||
},
|
||||
"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": {
|
||||
|
@ -56,7 +66,8 @@
|
|||
},
|
||||
"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": {
|
||||
|
@ -65,7 +76,8 @@
|
|||
},
|
||||
"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": {
|
||||
|
@ -74,7 +86,8 @@
|
|||
},
|
||||
"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": {
|
||||
|
@ -83,7 +96,8 @@
|
|||
},
|
||||
"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": {
|
||||
|
@ -92,7 +106,8 @@
|
|||
},
|
||||
"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": {
|
||||
|
@ -101,10 +116,13 @@
|
|||
},
|
||||
"size": "large",
|
||||
"type": "Image"
|
||||
}]
|
||||
}],
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"type": "Container"
|
||||
}],
|
||||
}
|
||||
],
|
||||
"version": "1.0",
|
||||
"type": "AdaptiveCard"
|
||||
}
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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[];
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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[];
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -62,4 +62,5 @@
|
|||
}
|
||||
.Pane2 {
|
||||
background-color: white;
|
||||
overflow: auto;
|
||||
}
|
|
@ -17,15 +17,14 @@ export default class App extends React.Component {
|
|||
<div className="main-page">
|
||||
<SampleList />
|
||||
<div style={{display: 'flex', flex: 1}}>
|
||||
<SplitPane split="vertical" defaultSize="72%" style={{ position: 'relative' }}>
|
||||
<SplitPane split="vertical" defaultSize="72%" style={{ position: 'relative'}}>
|
||||
<Editor />
|
||||
<SplitPane split="horizontal" defaultSize="60%">
|
||||
<SplitPane split="horizontal" defaultSize="60%" >
|
||||
<CardList />
|
||||
<ErrorMessage />
|
||||
</SplitPane>
|
||||
</SplitPane>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
|
|
@ -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)
|
||||
|
@ -32,10 +32,10 @@ class ErrorMessage extends React.Component {
|
|||
}
|
||||
|
||||
return (
|
||||
<div>
|
||||
<div className="error-list">
|
||||
<Alert message={`Input data is ${result.isValid ? "valid" : "invalid"}`} type={result.isValid ? "success" : "error"} />
|
||||
{
|
||||
result.messages.map(mes => <Alert message={mes.level + ' : ' + mes.message} type={mes.level.charAt(0).toLowerCase()+mes.level.slice(1)} />)
|
||||
result.messages.map(mes => <Alert message={mes.level + ' : ' + mes.message} type={mes.level.charAt(0).toLowerCase() + mes.level.slice(1)} />)
|
||||
}
|
||||
</div>
|
||||
);
|
||||
|
|
|
@ -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"
|
||||
|
|
Загрузка…
Ссылка в новой задаче