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:
Ardlan Khalili 2023-05-23 15:49:01 -05:00 коммит произвёл GitHub
Родитель 917f8c0c22
Коммит 33a439fa78
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
8 изменённых файлов: 12 добавлений и 2 удалений

Просмотреть файл

@ -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,