diff --git a/samples/Templates/Scenarios/ApplicationLogin.data.json b/samples/Templates/Scenarios/ApplicationLogin.data.json new file mode 100644 index 0000000000..656696940d --- /dev/null +++ b/samples/Templates/Scenarios/ApplicationLogin.data.json @@ -0,0 +1,5 @@ +{ + "ApplicationInfo": { + "title": "Application Login" + } +} \ No newline at end of file diff --git a/samples/Templates/Scenarios/ApplicationLogin.template.json b/samples/Templates/Scenarios/ApplicationLogin.template.json new file mode 100644 index 0000000000..171f17fa14 --- /dev/null +++ b/samples/Templates/Scenarios/ApplicationLogin.template.json @@ -0,0 +1,47 @@ +{ + "$schema": "http://adaptivecards.io/schemas/adaptive-card.json", + "type": "AdaptiveCard", + "version": "1.5", + "body": [ + { + "type": "TextBlock", + "size": "Medium", + "weight": "Bolder", + "text": " ${ApplicationInfo.title}", + "horizontalAlignment": "Center", + "wrap": true, + "style": "heading" + }, + { + "type": "TextBlock", + "text": "Username", + "wrap": true + }, + { + "type": "Input.Text", + "style": "text", + "id": "UserVal", + "isRequired": true + }, + { + "type": "TextBlock", + "text": "Password", + "wrap": true + }, + { + "type": "Input.Text", + "id": "PassVal", + "style": "password", + "isRequired": true + } + ], + "actions": [ + { + "type": "Action.Submit", + "title": "Login", + "data": { + "id": "LoginVal" + } + } + ] +} \ No newline at end of file diff --git a/samples/Templates/Scenarios/FlightUpdateTable.data.json b/samples/Templates/Scenarios/FlightUpdateTable.data.json new file mode 100644 index 0000000000..ec41d2bb08 --- /dev/null +++ b/samples/Templates/Scenarios/FlightUpdateTable.data.json @@ -0,0 +1,40 @@ +{ + "@context": "http://schema.org", + "@type": "FlightReservation", + "reservationId": "RXJ34P", + "reservationStatus": "http://schema.org/ReservationConfirmed", + "passengerPriorityStatus": "Fast Track", + "passengerSequenceNumber": "ABC123", + "securityScreening": "TSA PreCheck", + "underName": { + "@type": "Person", + "name": "Sarah Hum" + }, + "reservationFor": { + "@type": "Flight", + "flightNumber": "KL605", + "provider": { + "@type": "Airline", + "name": "KLM", + "iataCode": "KL", + "boardingPolicy": "http://schema.org/ZoneBoardingPolicy" + }, + "seller": { + "@type": "Airline", + "name": "KLM", + "iataCode": "KL" + }, + "departureAirport": { + "@type": "Airport", + "name": "Amsterdam Airport", + "iataCode": "AMS" + }, + "departureTime": "2017-03-04T09:20:00-01:00", + "arrivalAirport": { + "@type": "Airport", + "name": "San Francisco Airport", + "iataCode": "SFO" + }, + "arrivalTime": "2017-03-05T08:20:00+04:00" + } + } \ No newline at end of file diff --git a/samples/Templates/Scenarios/FlightUpdateTable.template.json b/samples/Templates/Scenarios/FlightUpdateTable.template.json new file mode 100644 index 0000000000..23f9d50199 --- /dev/null +++ b/samples/Templates/Scenarios/FlightUpdateTable.template.json @@ -0,0 +1,261 @@ +{ + "type": "AdaptiveCard", + "$schema": "http://adaptivecards.io/schemas/adaptive-card.json", + "version": "1.5", + "body": [ + { + "type": "Table", + "columns": [ + { + "width": 1 + }, + { + "width": 1 + }, + { + "width": 1 + } + ], + "rows": [ + { + "type": "TableRow", + "cells": [ + { + "type": "TableCell", + "items": [ + { + "type": "Image", + "size": "Small", + "url": "https://adaptivecards.io/content/airplane.png" + } + ] + }, + { + "type": "TableCell" + }, + { + "type": "TableCell", + "items": [ + { + "type": "TextBlock", + "text": "Flight Status", + "horizontalAlignment": "Right", + "isSubtle": true, + "wrap": true + }, + { + "type": "TextBlock", + "text": "DELAYED", + "horizontalAlignment": "Right", + "spacing": "None", + "size": "Large", + "color": "Attention", + "wrap": true + } + ] + } + ] + }, + { + "type": "TableRow", + "cells": [ + { + "type": "TableCell", + "items": [ + { + "type": "TextBlock", + "text": "Passengers", + "isSubtle": true, + "weight": "Bolder", + "wrap": true, + "spacing": "None" + }, + { + "type": "TextBlock", + "text": "${underName.name}", + "spacing": "Small", + "wrap": true + }, + { + "type": "TextBlock", + "text": "Jeremy Goldberg", + "spacing": "Small", + "wrap": true + }, + { + "type": "TextBlock", + "text": "Evan Litvak", + "spacing": "Small", + "wrap": true + } + ] + }, + { + "type": "TableCell" + }, + { + "type": "TableCell", + "items": [ + { + "type": "TextBlock", + "text": "Seat", + "horizontalAlignment": "Right", + "isSubtle": true, + "weight": "Bolder", + "wrap": true + }, + { + "type": "TextBlock", + "text": "14A", + "horizontalAlignment": "Right", + "spacing": "Small", + "wrap": true + }, + { + "type": "TextBlock", + "text": "14B", + "horizontalAlignment": "Right", + "spacing": "Small", + "wrap": true + }, + { + "type": "TextBlock", + "text": "14C", + "horizontalAlignment": "Right", + "spacing": "Small", + "wrap": true + } + ] + } + ] + }, + { + "type": "TableRow", + "cells": [ + { + "type": "TableCell", + "items": [ + { + "type": "TextBlock", + "text": "Flight", + "isSubtle": true, + "weight": "Bolder", + "wrap": true + }, + { + "type": "TextBlock", + "text": "${reservationFor.flightNumber}", + "spacing": "Small", + "wrap": true + } + ] + }, + { + "type": "TableCell", + "items": [ + { + "type": "TextBlock", + "text": "Departs", + "isSubtle": true, + "horizontalAlignment": "Center", + "weight": "Bolder", + "wrap": true + }, + { + "type": "TextBlock", + "text": "{{TIME(${string(reservationFor.departureTime)})}}", + "color": "Attention", + "weight": "Bolder", + "horizontalAlignment": "Center", + "spacing": "Small", + "wrap": true + } + ] + }, + { + "type": "TableCell", + "items": [ + { + "type": "TextBlock", + "text": "Arrives", + "isSubtle": true, + "horizontalAlignment": "Right", + "weight": "Bolder", + "wrap": true + }, + { + "type": "TextBlock", + "text": "{{TIME(${string(reservationFor.arrivalTime)})}}", + "color": "Attention", + "horizontalAlignment": "Right", + "weight": "Bolder", + "spacing": "Small", + "wrap": true + } + ] + } + ] + }, + { + "type": "TableRow", + "cells": [ + { + "type": "TableCell", + "items": [ + { + "type": "TextBlock", + "text": "${reservationFor.departureAirport.name}", + "isSubtle": true, + "wrap": true + }, + { + "type": "TextBlock", + "text": "${reservationFor.departureAirport.iataCode}", + "size": "ExtraLarge", + "color": "Accent", + "spacing": "None", + "wrap": true + } + ] + }, + { + "type": "TableCell", + "items": [ + { + "type": "Image", + "url": "https://adaptivecards.io/content/airplane.png", + "horizontalAlignment": "Center", + "size": "Small" + } + ], + "verticalContentAlignment": "Center" + }, + { + "type": "TableCell", + "items": [ + { + "type": "TextBlock", + "text": "${reservationFor.arrivalAirport.name}", + "isSubtle": true, + "horizontalAlignment": "Right", + "wrap": true + }, + { + "type": "TextBlock", + "text": "${reservationFor.arrivalAirport.iataCode}", + "horizontalAlignment": "Right", + "size": "ExtraLarge", + "color": "Accent", + "spacing": "None", + "wrap": true + } + ] + } + ], + "spacing": "None" + } + ], + "showGridLines": false + } + ] +} diff --git a/samples/Templates/Scenarios/InputFormWithRTL.data.json b/samples/Templates/Scenarios/InputFormWithRTL.data.json new file mode 100644 index 0000000000..b51e425de5 --- /dev/null +++ b/samples/Templates/Scenarios/InputFormWithRTL.data.json @@ -0,0 +1,6 @@ +{ + "FormInfo":{ + "titleENG":"Registration Form", + "titleARA":"إستمارة تسجيل" + } +} diff --git a/samples/Templates/Scenarios/InputFormWithRTL.template.json b/samples/Templates/Scenarios/InputFormWithRTL.template.json new file mode 100644 index 0000000000..5049729d99 --- /dev/null +++ b/samples/Templates/Scenarios/InputFormWithRTL.template.json @@ -0,0 +1,116 @@ +{ + "$schema": "http://adaptivecards.io/schemas/adaptive-card.json", + "type": "AdaptiveCard", + "version": "1.5", + "body": [ + { + "type": "TextBlock", + "text": "Please select your language:" + } + ], + "actions": [ + { + "type": "Action.ShowCard", + "title": "English", + "card": { + "type": "AdaptiveCard", + "body": [ + { + "type": "TextBlock", + "size": "medium", + "weight": "bolder", + "text": " ${FormInfo.titleENG}", + "horizontalAlignment": "center", + "wrap": true, + "style": "heading" + }, + { + "type": "Input.Text", + "label": "Name", + "style": "text", + "id": "SimpleValENG", + "isRequired": true, + "errorMessage": "Name is required" + }, + { + "type": "Input.Text", + "label": "Email", + "style": "email", + "id": "EmailValENG" + }, + { + "type": "Input.Text", + "label": "Phone", + "style": "tel", + "id": "TelValENG" + }, + { + "type": "Input.Text", + "label": "Comments", + "style": "text", + "isMultiline": true, + "id": "MultiLineValENG" + } + ], + "actions": [ + { + "type": "Action.Submit", + "title": "Submit" + } + ] + } + }, + { + "type": "Action.ShowCard", + "title": "عربي", + "card": { + "type": "AdaptiveCard", + "rtl": true, + "body": [ + { + "type": "TextBlock", + "size": "medium", + "weight": "bolder", + "text": " ${FormInfo.titleARA}", + "horizontalAlignment": "center", + "wrap": true, + "style": "heading" + }, + { + "type": "Input.Text", + "label": "اسم", + "style": "text", + "id": "SimpleValARA", + "isRequired": true, + "errorMessage": "مطلوب اسم" + }, + { + "type": "Input.Text", + "label": "بريد الالكتروني", + "style": "email", + "id": "EmailValARA" + }, + { + "type": "Input.Text", + "label": "هاتف", + "style": "tel", + "id": "TelValARA" + }, + { + "type": "Input.Text", + "label": "تعليقات", + "style": "text", + "isMultiline": true, + "id": "MultiLineValARA" + } + ], + "actions": [ + { + "type": "Action.Submit", + "title": "يقدم" + } + ] + } + } + ] +} \ No newline at end of file diff --git a/samples/Templates/Scenarios/OrderConfirmation.data.json b/samples/Templates/Scenarios/OrderConfirmation.data.json new file mode 100644 index 0000000000..4b7e4ef7d7 --- /dev/null +++ b/samples/Templates/Scenarios/OrderConfirmation.data.json @@ -0,0 +1,9 @@ +{ + "title": "Please confirm your order:", + "customer": [{ + "firstName": "John", + "lastName": "Smith", + "phone": "(555) 555-5555" + } + ] +} \ No newline at end of file diff --git a/samples/Templates/Scenarios/OrderConfirmation.template.json b/samples/Templates/Scenarios/OrderConfirmation.template.json new file mode 100644 index 0000000000..f96f961908 --- /dev/null +++ b/samples/Templates/Scenarios/OrderConfirmation.template.json @@ -0,0 +1,68 @@ +{ + "type": "AdaptiveCard", + "$schema": "http://adaptivecards.io/schemas/adaptive-card.json", + "version": "1.5", + "body": [ + { + "type": "TextBlock", + "text": "${title}", + "wrap": true, + "style": "heading" + }, + { + "type": "FactSet", + "facts": [ + { + "title": "Name", + "value": "${customer[0].firstName} ${customer[0].lastName}" + }, + { + "title": "Phone number", + "value": "${customer[0].phone}" + } + ] + }, + { + "type": "Container", + "items": [ + { + "type": "FactSet", + "facts": [ + { + "title": "1x", + "value": "Steak" + }, + { + "title": "2x", + "value": "Side Rice" + }, + { + "title": "1x", + "value": "Soft Drink" + } + ], + "spacing": "Small" + } + ], + "spacing": "Small" + } + ], + "actions": [ + { + "type": "Action.Execute", + "title": "Place Order" + }, + { + "type": "Action.Execute", + "title": "Edit Order", + "data": "edit", + "mode": "secondary" + }, + { + "type": "Action.Execute", + "title": "Save Order", + "data": "save", + "mode": "secondary" + } + ] +} diff --git a/samples/Templates/Scenarios/OrderDelivery.data.json b/samples/Templates/Scenarios/OrderDelivery.data.json new file mode 100644 index 0000000000..057b2deee9 --- /dev/null +++ b/samples/Templates/Scenarios/OrderDelivery.data.json @@ -0,0 +1,18 @@ +{ + "name": "Malt \u0026 Vine", + "address": { + "addressLocality": "Redmond", + "addressRegion": "WA", + "streetAddress": "16851 Redmond Way", + "postalCode": "98052", + "addressCountry": "US" + }, + "review": [{ + "reviewRating": { + "ratingValue": 4 + }, + "datePublished": "2014-11-28", + "description": "Great concept and a wide selection of beers both on tap and bottled! Smaller wine selection than I wanted, but the variety of beers certainly made up for that. Although I didn't order anything, my boyfriend got a beer and he loved it. Their prices are fair too. \n\nThe concept is really awesome. It's a bar/store that you can bring outside food into. The place was pretty packed tonight. I wish we had stayed for more than one drink. I would have loved to sample everything!", + "author": "Blaire S." + }] +} \ No newline at end of file diff --git a/samples/Templates/Scenarios/OrderDelivery.template.json b/samples/Templates/Scenarios/OrderDelivery.template.json new file mode 100644 index 0000000000..9c9f01c03e --- /dev/null +++ b/samples/Templates/Scenarios/OrderDelivery.template.json @@ -0,0 +1,70 @@ +{ + "$schema": "http://adaptivecards.io/schemas/adaptive-card.json", + "type": "AdaptiveCard", + "version": "1.5", + "body": [ + { + "type": "ColumnSet", + "columns": [ + { + "type": "Column", + "width": 2, + "items": [ + { + "type": "TextBlock", + "text": "${address.addressLocality}, ${address.addressRegion}", + "wrap": true + }, + { + "type": "TextBlock", + "text": "${name}", + "weight": "bolder", + "size": "extraLarge", + "spacing": "none", + "wrap": true + }, + { + "type": "TextBlock", + "text": "4.5 stars (176 reviews) · mid-priced", + "isSubtle": true, + "spacing": "none", + "wrap": true + }, + { + "type": "TextBlock", + "text": "**${review[0].author}** said \"${review[0].description}\"", + "size": "small", + "wrap": true, + "maxLines": 3 + } + ] + }, + { + "type": "Column", + "width": 1, + "items": [ + { + "type": "Image", + "url": "https://picsum.photos/300?image=882", + "size": "auto", + "altText": "Seated guest drinking a cup of coffee" + } + ] + } + ] + } + ], + "actions": [ + { + "type": "Action.Submit", + "title": "Pickup", + "tooltip": "Schedule order for pickup" + }, + { + "type": "Action.Submit", + "title": "Delivery", + "isEnabled": false, + "tooltip": "Your location is too far for delivery" + } + ] +} diff --git a/samples/Templates/Scenarios/RestaurantOrder.data.json b/samples/Templates/Scenarios/RestaurantOrder.data.json new file mode 100644 index 0000000000..b7510ccbb9 --- /dev/null +++ b/samples/Templates/Scenarios/RestaurantOrder.data.json @@ -0,0 +1,76 @@ +{ + "FormInfo": { + "title": "Malt & Vine Order Form" + }, + "Order": { + "questions": [ + { + "question": "Which entree would you like?", + "items": [ + { + "choice": "Steak", + "value": "1" + }, + { + "choice": "Chicken", + "value": "2" + }, + { + "choice": "Tofu", + "value": "3" + } + ] + }, + { + "question": "Which side would you like?", + "items": [ + { + "choice": "Baked Potato", + "value": "1" + }, + { + "choice": "Rice", + "value": "2" + }, + { + "choice": "Vegetables", + "value": "3" + }, + { + "choice": "Noodles", + "value": "4" + }, + { + "choice": "No Side", + "value": "5" + } + ] + }, + { + "question": "Which drink would you like?", + "items": [ + { + "choice": "Water", + "value": "1" + }, + { + "choice": "Soft Drink", + "value": "2" + }, + { + "choice": "Coffee", + "value": "3" + }, + { + "choice": "Natural Juice", + "value": "4" + }, + { + "choice": "No Drink", + "value": "5" + } + ] + } + ] + } +} diff --git a/samples/Templates/Scenarios/RestaurantOrder.template.json b/samples/Templates/Scenarios/RestaurantOrder.template.json new file mode 100644 index 0000000000..88a41ff09b --- /dev/null +++ b/samples/Templates/Scenarios/RestaurantOrder.template.json @@ -0,0 +1,68 @@ +{ + "type": "AdaptiveCard", + "$schema": "http://adaptivecards.io/schemas/adaptive-card.json", + "version": "1.5", + "body": [ + { + "type": "TextBlock", + "text": "${FormInfo.title}", + "size": "Large", + "wrap": true, + "weight": "Bolder" + }, + { + "type": "Input.ChoiceSet", + "id": "EntreeSelectVal", + "label": "${Order.questions[0].question}", + "style": "filtered", + "isRequired": true, + "errorMessage": "This is a required input", + "placeholder": "Please choose", + "choices": [ + { + "$data": "${Order.questions[0].items}", + "title": "${choice}", + "value": "${value}" + } + ] + }, + { + "type": "Input.ChoiceSet", + "id": "SideVal", + "label": "${Order.questions[1].question}", + "style": "filtered", + "isRequired": true, + "errorMessage": "This is a required input", + "placeholder": "Please choose", + "choices": [ + { + "$data": "${Order.questions[1].items}", + "title": "${choice}", + "value": "${value}" + } + ] + }, + { + "type": "Input.ChoiceSet", + "id": "DrinkVal", + "label": "${Order.questions[2].question}", + "style": "filtered", + "isRequired": true, + "errorMessage": "This is a required input", + "placeholder": "Please choose", + "choices": [ + { + "$data": "${Order.questions[2].items}", + "title": "${choice}", + "value": "${value}" + } + ] + } + ], + "actions": [ + { + "type": "Action.Submit", + "title": "Place Order" + } + ] +} diff --git a/samples/v1.5/Scenarios/ApplicationLogin.json b/samples/v1.5/Scenarios/ApplicationLogin.json new file mode 100644 index 0000000000..cdd212e18c --- /dev/null +++ b/samples/v1.5/Scenarios/ApplicationLogin.json @@ -0,0 +1,47 @@ +{ + "$schema": "http://adaptivecards.io/schemas/adaptive-card.json", + "type": "AdaptiveCard", + "version": "1.5", + "body": [ + { + "type": "TextBlock", + "size": "Medium", + "weight": "Bolder", + "text": "Application Login", + "horizontalAlignment": "Center", + "wrap": true, + "style": "heading" + }, + { + "type": "TextBlock", + "text": "Username", + "wrap": true + }, + { + "type": "Input.Text", + "style": "text", + "id": "UserVal", + "isRequired": true + }, + { + "type": "TextBlock", + "text": "Password", + "wrap": true + }, + { + "type": "Input.Text", + "id": "PassVal", + "style": "password", + "isRequired": true + } + ], + "actions": [ + { + "type": "Action.Submit", + "title": "Login", + "data": { + "id": "LoginVal" + } + } + ] +} \ No newline at end of file diff --git a/samples/v1.5/Scenarios/FlightUpdateTable.json b/samples/v1.5/Scenarios/FlightUpdateTable.json new file mode 100644 index 0000000000..6017a23ff3 --- /dev/null +++ b/samples/v1.5/Scenarios/FlightUpdateTable.json @@ -0,0 +1,261 @@ +{ + "type": "AdaptiveCard", + "$schema": "http://adaptivecards.io/schemas/adaptive-card.json", + "version": "1.5", + "body": [ + { + "type": "Table", + "columns": [ + { + "width": 1 + }, + { + "width": 1 + }, + { + "width": 1 + } + ], + "rows": [ + { + "type": "TableRow", + "cells": [ + { + "type": "TableCell", + "items": [ + { + "type": "Image", + "size": "Small", + "url": "https://adaptivecards.io/content/airplane.png" + } + ] + }, + { + "type": "TableCell" + }, + { + "type": "TableCell", + "items": [ + { + "type": "TextBlock", + "text": "Flight Status", + "horizontalAlignment": "Right", + "isSubtle": true, + "wrap": true + }, + { + "type": "TextBlock", + "text": "DELAYED", + "horizontalAlignment": "Right", + "spacing": "None", + "size": "Large", + "color": "Attention", + "wrap": true + } + ] + } + ] + }, + { + "type": "TableRow", + "cells": [ + { + "type": "TableCell", + "items": [ + { + "type": "TextBlock", + "text": "Passengers", + "isSubtle": true, + "weight": "Bolder", + "wrap": true, + "spacing": "None" + }, + { + "type": "TextBlock", + "text": "Sarah Hum", + "spacing": "Small", + "wrap": true + }, + { + "type": "TextBlock", + "text": "Jeremy Goldberg", + "spacing": "Small", + "wrap": true + }, + { + "type": "TextBlock", + "text": "Evan Litvak", + "spacing": "Small", + "wrap": true + } + ] + }, + { + "type": "TableCell" + }, + { + "type": "TableCell", + "items": [ + { + "type": "TextBlock", + "text": "Seat", + "horizontalAlignment": "Right", + "isSubtle": true, + "weight": "Bolder", + "wrap": true + }, + { + "type": "TextBlock", + "text": "14A", + "horizontalAlignment": "Right", + "spacing": "Small", + "wrap": true + }, + { + "type": "TextBlock", + "text": "14B", + "horizontalAlignment": "Right", + "spacing": "Small", + "wrap": true + }, + { + "type": "TextBlock", + "text": "14C", + "horizontalAlignment": "Right", + "spacing": "Small", + "wrap": true + } + ] + } + ] + }, + { + "type": "TableRow", + "cells": [ + { + "type": "TableCell", + "items": [ + { + "type": "TextBlock", + "text": "Flight", + "isSubtle": true, + "weight": "Bolder", + "wrap": true + }, + { + "type": "TextBlock", + "text": "KL605", + "spacing": "Small", + "wrap": true + } + ] + }, + { + "type": "TableCell", + "items": [ + { + "type": "TextBlock", + "text": "Departs", + "isSubtle": true, + "horizontalAlignment": "Center", + "weight": "Bolder", + "wrap": true + }, + { + "type": "TextBlock", + "text": "2:20 AM", + "color": "Attention", + "weight": "Bolder", + "horizontalAlignment": "Center", + "spacing": "Small", + "wrap": true + } + ] + }, + { + "type": "TableCell", + "items": [ + { + "type": "TextBlock", + "text": "Arrives", + "isSubtle": true, + "horizontalAlignment": "Right", + "weight": "Bolder", + "wrap": true + }, + { + "type": "TextBlock", + "text": "8:20 PM", + "color": "Attention", + "horizontalAlignment": "Right", + "weight": "Bolder", + "spacing": "Small", + "wrap": true + } + ] + } + ] + }, + { + "type": "TableRow", + "cells": [ + { + "type": "TableCell", + "items": [ + { + "type": "TextBlock", + "text": "Amsterdam Airport", + "isSubtle": true, + "wrap": true + }, + { + "type": "TextBlock", + "text": "AMS", + "size": "ExtraLarge", + "color": "Accent", + "spacing": "None", + "wrap": true + } + ] + }, + { + "type": "TableCell", + "items": [ + { + "type": "Image", + "url": "https://adaptivecards.io/content/airplane.png", + "horizontalAlignment": "Center", + "size": "Small" + } + ], + "verticalContentAlignment": "Center" + }, + { + "type": "TableCell", + "items": [ + { + "type": "TextBlock", + "text": "San Francisco Airport", + "isSubtle": true, + "horizontalAlignment": "Right", + "wrap": true + }, + { + "type": "TextBlock", + "text": "SFO", + "horizontalAlignment": "Right", + "size": "ExtraLarge", + "color": "Accent", + "spacing": "None", + "wrap": true + } + ] + } + ], + "spacing": "None" + } + ], + "showGridLines": false + } + ] +} diff --git a/samples/v1.5/Scenarios/InputFormWithRTL.json b/samples/v1.5/Scenarios/InputFormWithRTL.json new file mode 100644 index 0000000000..3ef5ccecb6 --- /dev/null +++ b/samples/v1.5/Scenarios/InputFormWithRTL.json @@ -0,0 +1,116 @@ +{ + "$schema": "http://adaptivecards.io/schemas/adaptive-card.json", + "type": "AdaptiveCard", + "version": "1.5", + "body": [ + { + "type": "TextBlock", + "text": "Please select your language:" + } + ], + "actions": [ + { + "type": "Action.ShowCard", + "title": "English", + "card": { + "type": "AdaptiveCard", + "body": [ + { + "type": "TextBlock", + "size": "medium", + "weight": "bolder", + "text": "Registration Form", + "horizontalAlignment": "center", + "wrap": true, + "style": "heading" + }, + { + "type": "Input.Text", + "label": "Name", + "style": "text", + "id": "SimpleValENG", + "isRequired": true, + "errorMessage": "Name is required" + }, + { + "type": "Input.Text", + "label": "Email", + "style": "email", + "id": "EmailValENG" + }, + { + "type": "Input.Text", + "label": "Phone", + "style": "tel", + "id": "TelValENG" + }, + { + "type": "Input.Text", + "label": "Comments", + "style": "text", + "isMultiline": true, + "id": "MultiLineValENG" + } + ], + "actions": [ + { + "type": "Action.Submit", + "title": "Submit" + } + ] + } + }, + { + "type": "Action.ShowCard", + "title": "عربي", + "card": { + "type": "AdaptiveCard", + "rtl": true, + "body": [ + { + "type": "TextBlock", + "size": "medium", + "weight": "bolder", + "text": "إستمارة تسجيل", + "horizontalAlignment": "center", + "wrap": true, + "style": "heading" + }, + { + "type": "Input.Text", + "label": "اسم", + "style": "text", + "id": "SimpleValARA", + "isRequired": true, + "errorMessage": "مطلوب اسم" + }, + { + "type": "Input.Text", + "label": "بريد الالكتروني", + "style": "email", + "id": "EmailValARA" + }, + { + "type": "Input.Text", + "label": "هاتف", + "style": "tel", + "id": "TelValARA" + }, + { + "type": "Input.Text", + "label": "تعليقات", + "style": "text", + "isMultiline": true, + "id": "MultiLineValARA" + } + ], + "actions": [ + { + "type": "Action.Submit", + "title": "يقدم" + } + ] + } + } + ] +} \ No newline at end of file diff --git a/samples/v1.5/Scenarios/OrderConfirmation.json b/samples/v1.5/Scenarios/OrderConfirmation.json new file mode 100644 index 0000000000..eb104c2ede --- /dev/null +++ b/samples/v1.5/Scenarios/OrderConfirmation.json @@ -0,0 +1,68 @@ +{ + "type": "AdaptiveCard", + "$schema": "http://adaptivecards.io/schemas/adaptive-card.json", + "version": "1.5", + "body": [ + { + "type": "TextBlock", + "text": "Please confirm your order:", + "wrap": true, + "style": "heading" + }, + { + "type": "FactSet", + "facts": [ + { + "title": "Name", + "value": "John Smith" + }, + { + "title": "Phone number", + "value": "(555) 555-5555" + } + ] + }, + { + "type": "Container", + "items": [ + { + "type": "FactSet", + "facts": [ + { + "title": "1x", + "value": "Steak" + }, + { + "title": "2x", + "value": "Side Rice" + }, + { + "title": "1x", + "value": "Soft Drink" + } + ], + "spacing": "Small" + } + ], + "spacing": "Small" + } + ], + "actions": [ + { + "type": "Action.Execute", + "title": "Place Order" + }, + { + "type": "Action.Execute", + "title": "Edit Order", + "data": "edit", + "mode": "secondary" + }, + { + "type": "Action.Execute", + "title": "Save Order", + "data": "save", + "mode": "secondary" + } + ] +} diff --git a/samples/v1.5/Scenarios/OrderDelivery.json b/samples/v1.5/Scenarios/OrderDelivery.json new file mode 100644 index 0000000000..68aef928f6 --- /dev/null +++ b/samples/v1.5/Scenarios/OrderDelivery.json @@ -0,0 +1,70 @@ +{ + "$schema": "http://adaptivecards.io/schemas/adaptive-card.json", + "type": "AdaptiveCard", + "version": "1.5", + "body": [ + { + "type": "ColumnSet", + "columns": [ + { + "type": "Column", + "width": 2, + "items": [ + { + "type": "TextBlock", + "text": "Redmond, WA", + "wrap": true + }, + { + "type": "TextBlock", + "text": "Malt & Vine", + "weight": "bolder", + "size": "extraLarge", + "spacing": "none", + "wrap": true + }, + { + "type": "TextBlock", + "text": "4.5 stars (176 reviews) · mid-priced", + "isSubtle": true, + "spacing": "none", + "wrap": true + }, + { + "type": "TextBlock", + "text": "**Blaire S.** said \"Great concept and a wide selection of beers both on tap and bottled! Smaller wine selection than I wanted, but the variety of beers certainly made up for that. Although I didn't order anything, my boyfriend got a beer and he loved it. Their prices are fair too. \n\nThe concept is really awesome. It's a bar/store that you can bring outside food into. The place was pretty packed tonight. I wish we had stayed for more than one drink. I would have loved to sample everything!\"", + "size": "small", + "wrap": true, + "maxLines": 3 + } + ] + }, + { + "type": "Column", + "width": 1, + "items": [ + { + "type": "Image", + "url": "https://picsum.photos/300?image=882", + "size": "auto", + "altText": "Seated guest drinking a cup of coffee" + } + ] + } + ] + } + ], + "actions": [ + { + "type": "Action.Submit", + "title": "Pickup", + "tooltip": "Schedule order for pickup" + }, + { + "type": "Action.Submit", + "title": "Delivery", + "isEnabled": false, + "tooltip": "Your location is too far for delivery" + } + ] +} diff --git a/samples/v1.5/Scenarios/RestaurantOrder.json b/samples/v1.5/Scenarios/RestaurantOrder.json new file mode 100644 index 0000000000..ffbd915679 --- /dev/null +++ b/samples/v1.5/Scenarios/RestaurantOrder.json @@ -0,0 +1,105 @@ +{ + "type": "AdaptiveCard", + "$schema": "http://adaptivecards.io/schemas/adaptive-card.json", + "version": "1.5", + "body": [ + { + "type": "TextBlock", + "text": "Malt & Vine Order Form", + "size": "Large", + "wrap": true, + "weight": "Bolder" + }, + { + "type": "Input.ChoiceSet", + "id": "EntreeSelectVal", + "label": "Which entree would you like?", + "style": "filtered", + "isRequired": true, + "errorMessage": "This is a required input", + "placeholder": "Please choose", + "choices": [ + { + "title": "Steak", + "value": "1" + }, + { + "title": "Chicken", + "value": "2" + }, + { + "title": "Tofu", + "value": "3" + } + ] + }, + { + "type": "Input.ChoiceSet", + "id": "SideVal", + "label": "Which side would you like?", + "style": "filtered", + "isRequired": true, + "errorMessage": "This is a required input", + "placeholder": "Please choose", + "choices": [ + { + "title": "Baked Potato", + "value": "1" + }, + { + "title": "Rice", + "value": "2" + }, + { + "title": "Vegetables", + "value": "3" + }, + { + "title": "Noodles", + "value": "4" + }, + { + "title": "No Side", + "value": "5" + } + ] + }, + { + "type": "Input.ChoiceSet", + "id": "DrinkVal", + "label": "Which drink would you like?", + "style": "filtered", + "isRequired": true, + "errorMessage": "This is a required input", + "placeholder": "Please choose", + "choices": [ + { + "title": "Water", + "value": "1" + }, + { + "title": "Soft Drink", + "value": "2" + }, + { + "title": "Coffee", + "value": "3" + }, + { + "title": "Natural Juice", + "value": "4" + }, + { + "title": "No Drink", + "value": "5" + } + ] + } + ], + "actions": [ + { + "type": "Action.Submit", + "title": "Place Order" + } + ] +} \ No newline at end of file diff --git a/source/dotnet/Test/AdaptiveCards.Test/XmlSerializationTests.cs b/source/dotnet/Test/AdaptiveCards.Test/XmlSerializationTests.cs index 4b3e38227a..74fc016d32 100644 --- a/source/dotnet/Test/AdaptiveCards.Test/XmlSerializationTests.cs +++ b/source/dotnet/Test/AdaptiveCards.Test/XmlSerializationTests.cs @@ -36,7 +36,8 @@ public void VerifySerializationForAllScenarioFiles() // After changing the default value of the TextBlock Text property this test doesn't succeed as xml can't // read a single space (even with xml:space=preserve), hence we skip this file(s) to avoid test failures. // The generated xml actually contains the empty space - string[] cardsToIgnore = { "FlightUpdate.json" }; + // v1.5 features are not implemented for .NET, therefore need to add the 1.5 scenario cards that are failing here + string[] cardsToIgnore = { "FlightUpdate.json", "FlightUpdateTable.json", "RestaurantOrder.json" }; XmlSerializer serializer = new XmlSerializer(typeof(AdaptiveCard)); foreach (var version in Directory.EnumerateDirectories(@"..\..\..\..\..\..\..\samples\", "v*")) diff --git a/source/nodejs/adaptivecards-site/themes/adaptivecards/source/css/style.css b/source/nodejs/adaptivecards-site/themes/adaptivecards/source/css/style.css index 988de6d1da..a0543f60c4 100644 --- a/source/nodejs/adaptivecards-site/themes/adaptivecards/source/css/style.css +++ b/source/nodejs/adaptivecards-site/themes/adaptivecards/source/css/style.css @@ -320,7 +320,7 @@ ul.action-list { .toc-todo li, .toc-todo a { - padding-left: 30px; + padding-left: 15px; padding-top: 3px; padding-bottom: 3px; margin: 0;