Mobile support for 1.6 Loop component (#8507)
* Mobile support for 1.6 * revert global and dotnet changes * Add Loop keys to CardElementType AdaptiveCardSchemaKey * add MetaData and WebUrl to enums * set global var version for adaptive card * remove metadata as card element type * remove metadata as card element type * fix C++ string * add url for test * fix 1.6 tests --------- Co-authored-by: Ardy Khalili <ardykhalili@microsoft.com> Co-authored-by: Joseph Woo <Joseph.Woo@microsoft.com>
This commit is contained in:
Родитель
917f8c0c22
Коммит
33a439fa78
|
@ -50,6 +50,7 @@
|
|||
}
|
||||
],
|
||||
"backgroundImage": {
|
||||
"url": "https://adaptivecards.io/content/cats/1.png",
|
||||
"verticalAlignment": "Center",
|
||||
"horizontalAlignment": "Center"
|
||||
},
|
||||
|
|
|
@ -40,6 +40,7 @@
|
|||
],
|
||||
"selectAction": {
|
||||
"type": "Action.OpenUrl",
|
||||
"url": "https://adaptivecards.io",
|
||||
"title": "Container Level 2 Select Action"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -57,6 +57,7 @@
|
|||
],
|
||||
"selectAction": {
|
||||
"type": "Action.OpenUrl",
|
||||
"url": "https://adaptivecards.io",
|
||||
"title": "Container Level 2 Select Action"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -130,6 +130,7 @@ public enum AdaptiveCardSchemaKey {
|
|||
MaxWidth,
|
||||
Media,
|
||||
Medium,
|
||||
MetaData,
|
||||
Method,
|
||||
MimeType,
|
||||
Min,
|
||||
|
@ -204,6 +205,7 @@ public enum AdaptiveCardSchemaKey {
|
|||
VerticalCellContentAlignment,
|
||||
VerticalContentAlignment,
|
||||
Warning,
|
||||
WebUrl,
|
||||
Weight,
|
||||
Width,
|
||||
Wrap;
|
||||
|
|
|
@ -26,7 +26,7 @@ import io.adaptivecards.renderer.registration.CardRendererRegistration;
|
|||
|
||||
public class AdaptiveCardRenderer
|
||||
{
|
||||
public static final String VERSION = "1.5";
|
||||
public static final String VERSION = "1.6";
|
||||
|
||||
protected AdaptiveCardRenderer()
|
||||
{
|
||||
|
|
|
@ -58,11 +58,12 @@ using namespace AdaptiveCards;
|
|||
|
||||
+ (ACOAdaptiveCardParseResult *)fromJson:(NSString *)payload;
|
||||
{
|
||||
const std::string g_version = "1.6";
|
||||
ACOAdaptiveCardParseResult *result = nil;
|
||||
if (payload) {
|
||||
try {
|
||||
ACOAdaptiveCard *card = [[ACOAdaptiveCard alloc] init];
|
||||
std::shared_ptr<ParseResult> parseResult = AdaptiveCard::DeserializeFromString(std::string([payload UTF8String]), std::string("1.5"));
|
||||
std::shared_ptr<ParseResult> parseResult = AdaptiveCard::DeserializeFromString(std::string([payload UTF8String]), g_version);
|
||||
NSMutableArray *acrParseWarnings = [[NSMutableArray alloc] init];
|
||||
std::vector<std::shared_ptr<AdaptiveCardParseWarning>> parseWarnings = parseResult->GetWarnings();
|
||||
for (const auto &warning : parseWarnings) {
|
||||
|
|
|
@ -128,6 +128,7 @@ namespace AdaptiveCards
|
|||
{AdaptiveCardSchemaKey::MaxWidth, "maxWidth"},
|
||||
{AdaptiveCardSchemaKey::Media, "media"},
|
||||
{AdaptiveCardSchemaKey::Medium, "medium"},
|
||||
{AdaptiveCardSchemaKey::MetaData, "metaData"},
|
||||
{AdaptiveCardSchemaKey::Method, "method"},
|
||||
{AdaptiveCardSchemaKey::MimeType, "mimeType"},
|
||||
{AdaptiveCardSchemaKey::Min, "min"},
|
||||
|
@ -202,6 +203,7 @@ namespace AdaptiveCards
|
|||
{AdaptiveCardSchemaKey::VerticalCellContentAlignment, "verticalCellContentAlignment"},
|
||||
{AdaptiveCardSchemaKey::VerticalContentAlignment, "verticalContentAlignment"},
|
||||
{AdaptiveCardSchemaKey::Warning, "warning"},
|
||||
{AdaptiveCardSchemaKey::WebUrl, "webUrl"},
|
||||
{AdaptiveCardSchemaKey::Weight, "weight"},
|
||||
{AdaptiveCardSchemaKey::Width, "width"},
|
||||
{AdaptiveCardSchemaKey::Wrap, "wrap"}});
|
||||
|
|
|
@ -130,6 +130,7 @@ enum class AdaptiveCardSchemaKey
|
|||
MaxWidth,
|
||||
Media,
|
||||
Medium,
|
||||
MetaData,
|
||||
Method,
|
||||
MimeType,
|
||||
Min,
|
||||
|
@ -204,6 +205,7 @@ enum class AdaptiveCardSchemaKey
|
|||
VerticalCellContentAlignment,
|
||||
VerticalContentAlignment,
|
||||
Warning,
|
||||
WebUrl,
|
||||
Weight,
|
||||
Width,
|
||||
Wrap,
|
||||
|
|
Загрузка…
Ссылка в новой задаче