+ ${order.id} |
+ ${new Date(order.orderDate).toLocaleDateString()} |
+ ${order.region.toString()} |
+ ${order.rep} |
+ ${order.item} |
+ ${order.units} |
+ $${order.unitCost.toFixed(2)} |
+ $${order.total.toFixed(2)} |
+
`;
+ });
+
+ const table: Element = this.domElement.querySelector(".data");
+ table.removeAttribute("style");
+ table.querySelector("tbody").innerHTML = ordersString;
+ }
+
+ private executeOrDelayUntilRemotePartyLoaded(func: Function): void {
+ if (this.remotePartyLoaded) {
+ func();
+ } else {
+ setTimeout((): void => { this.executeOrDelayUntilRemotePartyLoaded(func); }, 100);
+ }
+ }
+
+ protected get dataVersion(): Version {
+ return Version.parse('1.0');
+ }
+
+ protected getPropertyPaneConfiguration(): IPropertyPaneConfiguration {
+ return {
+ pages: []
+ };
+ }
+}
diff --git a/samples/aad-api-spo-cookie/src/webparts/latestOrders/loc/en-us.js b/samples/aad-api-spo-cookie/src/webparts/latestOrders/loc/en-us.js
new file mode 100644
index 000000000..89f98bc1e
--- /dev/null
+++ b/samples/aad-api-spo-cookie/src/webparts/latestOrders/loc/en-us.js
@@ -0,0 +1,7 @@
+define([], function() {
+ return {
+ "PropertyPaneDescription": "Description",
+ "BasicGroupName": "Group Name",
+ "DescriptionFieldLabel": "Description Field"
+ }
+});
\ No newline at end of file
diff --git a/samples/aad-api-spo-cookie/src/webparts/latestOrders/loc/mystrings.d.ts b/samples/aad-api-spo-cookie/src/webparts/latestOrders/loc/mystrings.d.ts
new file mode 100644
index 000000000..c6088183c
--- /dev/null
+++ b/samples/aad-api-spo-cookie/src/webparts/latestOrders/loc/mystrings.d.ts
@@ -0,0 +1,10 @@
+declare interface ILatestOrdersStrings {
+ PropertyPaneDescription: string;
+ BasicGroupName: string;
+ DescriptionFieldLabel: string;
+}
+
+declare module 'latestOrdersStrings' {
+ const strings: ILatestOrdersStrings;
+ export = strings;
+}
diff --git a/samples/aad-api-spo-cookie/src/webparts/latestOrders/tests/LatestOrders.test.ts b/samples/aad-api-spo-cookie/src/webparts/latestOrders/tests/LatestOrders.test.ts
new file mode 100644
index 000000000..31c54176a
--- /dev/null
+++ b/samples/aad-api-spo-cookie/src/webparts/latestOrders/tests/LatestOrders.test.ts
@@ -0,0 +1,9 @@
+///