From df6d2b447aba4580dfbc4643822525d32075b829 Mon Sep 17 00:00:00 2001 From: Daniel Roth Date: Sat, 21 Sep 2019 22:00:16 -0700 Subject: [PATCH 1/3] Update to rc1 --- AspNetMonsters.Blazor.Geolocation.sln | 6 +- .../AspNetMonsters.Blazor.Geolocation.csproj | 23 ++- .../{content => wwwroot}/Location.js | 192 +++++++++--------- .../{content => wwwroot}/Location.js.map | 0 4 files changed, 113 insertions(+), 108 deletions(-) rename AspNetMonsters.Blazor.Geolocation/{content => wwwroot}/Location.js (98%) rename AspNetMonsters.Blazor.Geolocation/{content => wwwroot}/Location.js.map (100%) diff --git a/AspNetMonsters.Blazor.Geolocation.sln b/AspNetMonsters.Blazor.Geolocation.sln index 2ee2a95..cf7a53f 100644 --- a/AspNetMonsters.Blazor.Geolocation.sln +++ b/AspNetMonsters.Blazor.Geolocation.sln @@ -1,9 +1,9 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.27428.1 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.29311.281 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AspNetMonsters.Blazor.Geolocation", "AspNetMonsters.Blazor.Geolocation\AspNetMonsters.Blazor.Geolocation.csproj", "{E0DEC7CC-B1B4-4249-BD4A-6C45563FAD43}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AspNetMonsters.Blazor.Geolocation", "AspNetMonsters.Blazor.Geolocation\AspNetMonsters.Blazor.Geolocation.csproj", "{E0DEC7CC-B1B4-4249-BD4A-6C45563FAD43}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/AspNetMonsters.Blazor.Geolocation/AspNetMonsters.Blazor.Geolocation.csproj b/AspNetMonsters.Blazor.Geolocation/AspNetMonsters.Blazor.Geolocation.csproj index 6586f58..36c3b93 100644 --- a/AspNetMonsters.Blazor.Geolocation/AspNetMonsters.Blazor.Geolocation.csproj +++ b/AspNetMonsters.Blazor.Geolocation/AspNetMonsters.Blazor.Geolocation.csproj @@ -1,7 +1,9 @@ - - + + netstandard2.0 + 3.0 + https://github.com/AspNetMonsters/Blazor.Geolocation https://github.com/AspNetMonsters/Blazor.Geolocation/blob/master/LICENSE Simon Timms, David Paquette, James Chambers @@ -11,23 +13,26 @@ true AspNetMonsters.Blazor.Geolocation AspNetMonsters.Blazor.Geolocation - 0.4.0.1018-PRE + 0.5.0-preview1 ${DefaultItemExcludes};node_modules\** - - + + + - + - + + + - - + + diff --git a/AspNetMonsters.Blazor.Geolocation/content/Location.js b/AspNetMonsters.Blazor.Geolocation/wwwroot/Location.js similarity index 98% rename from AspNetMonsters.Blazor.Geolocation/content/Location.js rename to AspNetMonsters.Blazor.Geolocation/wwwroot/Location.js index 2f60493..9773241 100644 --- a/AspNetMonsters.Blazor.Geolocation/content/Location.js +++ b/AspNetMonsters.Blazor.Geolocation/wwwroot/Location.js @@ -1,97 +1,97 @@ -"use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (_) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; -var coordinate = /** @class */ (function () { - function coordinate() { - this.latitude = 0; - this.longitude = 0; - this.accuracy = 0; - } - return coordinate; -}()); -var assemblyName = "AspNetMonsters.Blazor.Geolocation"; -var namespace = "AspNetMonsters.Blazor.Geolocation"; -var type = "LocationService"; -function dispatchResponse(id, location) { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - console.log("got location, dispatching response"); - return [4 /*yield*/, DotNet.invokeMethodAsync(namespace, 'ReceiveResponse', id, location.latitude, location.longitude, location.accuracy)]; - case 1: - _a.sent(); - return [2 /*return*/]; - } - }); - }); -} -function dispatchWatchResponse(id, location) { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - switch (_a.label) { - case 0: return [4 /*yield*/, DotNet.invokeMethodAsync(namespace, 'ReceiveWatchResponse', id, location.latitude, location.longitude, location.accuracy)]; - case 1: - _a.sent(); - return [2 /*return*/]; - } - }); - }); -} -window['AspNetMonsters'] = window['AspNetMonsters'] || {}; -window['AspNetMonsters']['Blazor'] = window['AspNetMonsters']['Blazor'] || {}; -window['AspNetMonsters']['Blazor']['Geolocation'] = window['AspNetMonsters']['Blazor']['Geolocation'] || {}; -window['AspNetMonsters']['Blazor']['Geolocation']['GetLocation'] = function (requestId) { - if (navigator.geolocation) { - navigator.geolocation.getCurrentPosition(function (position) { - dispatchResponse(requestId, position.coords); - }); - } - else { - return "No location finding"; - } -}; -window['AspNetMonsters']['Blazor']['Geolocation']['WatchLocation'] = function (requestId) { - if (navigator.geolocation) { - navigator.geolocation.watchPosition(function (position) { - dispatchWatchResponse(requestId, position.coords); - }); - } - else { - return "No location watching"; - } -}; +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +var coordinate = /** @class */ (function () { + function coordinate() { + this.latitude = 0; + this.longitude = 0; + this.accuracy = 0; + } + return coordinate; +}()); +var assemblyName = "AspNetMonsters.Blazor.Geolocation"; +var namespace = "AspNetMonsters.Blazor.Geolocation"; +var type = "LocationService"; +function dispatchResponse(id, location) { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("got location, dispatching response"); + return [4 /*yield*/, DotNet.invokeMethodAsync(namespace, 'ReceiveResponse', id, location.latitude, location.longitude, location.accuracy)]; + case 1: + _a.sent(); + return [2 /*return*/]; + } + }); + }); +} +function dispatchWatchResponse(id, location) { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, DotNet.invokeMethodAsync(namespace, 'ReceiveWatchResponse', id, location.latitude, location.longitude, location.accuracy)]; + case 1: + _a.sent(); + return [2 /*return*/]; + } + }); + }); +} +window['AspNetMonsters'] = window['AspNetMonsters'] || {}; +window['AspNetMonsters']['Blazor'] = window['AspNetMonsters']['Blazor'] || {}; +window['AspNetMonsters']['Blazor']['Geolocation'] = window['AspNetMonsters']['Blazor']['Geolocation'] || {}; +window['AspNetMonsters']['Blazor']['Geolocation']['GetLocation'] = function (requestId) { + if (navigator.geolocation) { + navigator.geolocation.getCurrentPosition(function (position) { + dispatchResponse(requestId, position.coords); + }); + } + else { + return "No location finding"; + } +}; +window['AspNetMonsters']['Blazor']['Geolocation']['WatchLocation'] = function (requestId) { + if (navigator.geolocation) { + navigator.geolocation.watchPosition(function (position) { + dispatchWatchResponse(requestId, position.coords); + }); + } + else { + return "No location watching"; + } +}; //# sourceMappingURL=Location.js.map \ No newline at end of file diff --git a/AspNetMonsters.Blazor.Geolocation/content/Location.js.map b/AspNetMonsters.Blazor.Geolocation/wwwroot/Location.js.map similarity index 100% rename from AspNetMonsters.Blazor.Geolocation/content/Location.js.map rename to AspNetMonsters.Blazor.Geolocation/wwwroot/Location.js.map From c5d3e5a2a155a68b88708f3e1c7490c9b83f7a90 Mon Sep 17 00:00:00 2001 From: Daniel Roth Date: Sun, 22 Sep 2019 14:21:54 -0700 Subject: [PATCH 2/3] Reset Location.js move --- .../{wwwroot => content}/Location.js | 192 +++++++++--------- 1 file changed, 96 insertions(+), 96 deletions(-) rename AspNetMonsters.Blazor.Geolocation/{wwwroot => content}/Location.js (98%) diff --git a/AspNetMonsters.Blazor.Geolocation/wwwroot/Location.js b/AspNetMonsters.Blazor.Geolocation/content/Location.js similarity index 98% rename from AspNetMonsters.Blazor.Geolocation/wwwroot/Location.js rename to AspNetMonsters.Blazor.Geolocation/content/Location.js index 9773241..2f60493 100644 --- a/AspNetMonsters.Blazor.Geolocation/wwwroot/Location.js +++ b/AspNetMonsters.Blazor.Geolocation/content/Location.js @@ -1,97 +1,97 @@ -"use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (_) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; -var coordinate = /** @class */ (function () { - function coordinate() { - this.latitude = 0; - this.longitude = 0; - this.accuracy = 0; - } - return coordinate; -}()); -var assemblyName = "AspNetMonsters.Blazor.Geolocation"; -var namespace = "AspNetMonsters.Blazor.Geolocation"; -var type = "LocationService"; -function dispatchResponse(id, location) { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - console.log("got location, dispatching response"); - return [4 /*yield*/, DotNet.invokeMethodAsync(namespace, 'ReceiveResponse', id, location.latitude, location.longitude, location.accuracy)]; - case 1: - _a.sent(); - return [2 /*return*/]; - } - }); - }); -} -function dispatchWatchResponse(id, location) { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - switch (_a.label) { - case 0: return [4 /*yield*/, DotNet.invokeMethodAsync(namespace, 'ReceiveWatchResponse', id, location.latitude, location.longitude, location.accuracy)]; - case 1: - _a.sent(); - return [2 /*return*/]; - } - }); - }); -} -window['AspNetMonsters'] = window['AspNetMonsters'] || {}; -window['AspNetMonsters']['Blazor'] = window['AspNetMonsters']['Blazor'] || {}; -window['AspNetMonsters']['Blazor']['Geolocation'] = window['AspNetMonsters']['Blazor']['Geolocation'] || {}; -window['AspNetMonsters']['Blazor']['Geolocation']['GetLocation'] = function (requestId) { - if (navigator.geolocation) { - navigator.geolocation.getCurrentPosition(function (position) { - dispatchResponse(requestId, position.coords); - }); - } - else { - return "No location finding"; - } -}; -window['AspNetMonsters']['Blazor']['Geolocation']['WatchLocation'] = function (requestId) { - if (navigator.geolocation) { - navigator.geolocation.watchPosition(function (position) { - dispatchWatchResponse(requestId, position.coords); - }); - } - else { - return "No location watching"; - } -}; +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +var coordinate = /** @class */ (function () { + function coordinate() { + this.latitude = 0; + this.longitude = 0; + this.accuracy = 0; + } + return coordinate; +}()); +var assemblyName = "AspNetMonsters.Blazor.Geolocation"; +var namespace = "AspNetMonsters.Blazor.Geolocation"; +var type = "LocationService"; +function dispatchResponse(id, location) { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + console.log("got location, dispatching response"); + return [4 /*yield*/, DotNet.invokeMethodAsync(namespace, 'ReceiveResponse', id, location.latitude, location.longitude, location.accuracy)]; + case 1: + _a.sent(); + return [2 /*return*/]; + } + }); + }); +} +function dispatchWatchResponse(id, location) { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, DotNet.invokeMethodAsync(namespace, 'ReceiveWatchResponse', id, location.latitude, location.longitude, location.accuracy)]; + case 1: + _a.sent(); + return [2 /*return*/]; + } + }); + }); +} +window['AspNetMonsters'] = window['AspNetMonsters'] || {}; +window['AspNetMonsters']['Blazor'] = window['AspNetMonsters']['Blazor'] || {}; +window['AspNetMonsters']['Blazor']['Geolocation'] = window['AspNetMonsters']['Blazor']['Geolocation'] || {}; +window['AspNetMonsters']['Blazor']['Geolocation']['GetLocation'] = function (requestId) { + if (navigator.geolocation) { + navigator.geolocation.getCurrentPosition(function (position) { + dispatchResponse(requestId, position.coords); + }); + } + else { + return "No location finding"; + } +}; +window['AspNetMonsters']['Blazor']['Geolocation']['WatchLocation'] = function (requestId) { + if (navigator.geolocation) { + navigator.geolocation.watchPosition(function (position) { + dispatchWatchResponse(requestId, position.coords); + }); + } + else { + return "No location watching"; + } +}; //# sourceMappingURL=Location.js.map \ No newline at end of file From f4e3b72f32933df64623a7b7d2acaeaf662d8a34 Mon Sep 17 00:00:00 2001 From: Daniel Roth Date: Sun, 22 Sep 2019 14:23:20 -0700 Subject: [PATCH 3/3] Move Location.js --- .../{content => wwwroot}/Location.js | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename AspNetMonsters.Blazor.Geolocation/{content => wwwroot}/Location.js (100%) diff --git a/AspNetMonsters.Blazor.Geolocation/content/Location.js b/AspNetMonsters.Blazor.Geolocation/wwwroot/Location.js similarity index 100% rename from AspNetMonsters.Blazor.Geolocation/content/Location.js rename to AspNetMonsters.Blazor.Geolocation/wwwroot/Location.js