diff --git a/package-lock.json b/package-lock.json index d2c64241c..157e06f4e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -72,20 +72,20 @@ } }, "@paperbits/azure": { - "version": "0.1.279", - "resolved": "https://registry.npmjs.org/@paperbits/azure/-/azure-0.1.279.tgz", - "integrity": "sha512-SyryxQn2kpCMd1VC6RtmfZFLHqAYzqHUf8sp7Qwe9mepppFvFxGdcUmynpkdXmRv82FmEZuUbt20XXYeMQY+eg==", + "version": "0.1.280", + "resolved": "https://registry.npmjs.org/@paperbits/azure/-/azure-0.1.280.tgz", + "integrity": "sha512-4qnDXmhjZrB/ELPu+pAnW6pJEh/0H4CeAJkYpUSl4GTWFCBCfV5nukfmJeT3YLHbVHlvTaKlnO9rSOamwmmbKg==", "requires": { "@azure/storage-blob": "^10.3.0", - "@paperbits/common": "0.1.279", + "@paperbits/common": "0.1.280", "applicationinsights-js": "^1.0.20", "mime-types": "^2.1.22" } }, "@paperbits/common": { - "version": "0.1.279", - "resolved": "https://registry.npmjs.org/@paperbits/common/-/common-0.1.279.tgz", - "integrity": "sha512-XX7Spky4WOxzDPQmnRlwpSnTNBy/3P6USaSJbQ1IcU3PUTnsiJs6Rg4Yh6iG7i4cLFW3kYMWf31TsQdpHNKDcQ==", + "version": "0.1.280", + "resolved": "https://registry.npmjs.org/@paperbits/common/-/common-0.1.280.tgz", + "integrity": "sha512-nsQd5f8lEqePZYyNpb47MrE/ZUZ5Jb2lfnvRLIe9/47757em0EqNvSL6pqtoUbNjy4FhAXQ+2kF2qB61dHXbgA==", "requires": { "deepmerge": "^4.2.2", "domino": "^2.1.4", @@ -103,12 +103,12 @@ } }, "@paperbits/core": { - "version": "0.1.279", - "resolved": "https://registry.npmjs.org/@paperbits/core/-/core-0.1.279.tgz", - "integrity": "sha512-XwA/zWc3/6LR3bHY/I/ognSKwxBG2VKOLMi+320eIRa5OPKabU/xWJ5rdoP2Tna9kepLOhBEfQhTtHxGaCVNwg==", + "version": "0.1.280", + "resolved": "https://registry.npmjs.org/@paperbits/core/-/core-0.1.280.tgz", + "integrity": "sha512-RdafR7PrRdzAnx953sd9GRK9SVNrrZpqgqaUa5A7mBywv7/PB9KqTFCNiep/cjKbiMr2tn1SeS3y3RMVxjA01g==", "requires": { - "@paperbits/common": "0.1.279", - "@paperbits/styles": "0.1.279", + "@paperbits/common": "0.1.280", + "@paperbits/styles": "0.1.280", "basiclightbox": "^5.0.3", "cropperjs": "^1.5.6", "file-saver": "^2.0.2", @@ -132,11 +132,11 @@ } }, "@paperbits/prosemirror": { - "version": "0.1.279", - "resolved": "https://registry.npmjs.org/@paperbits/prosemirror/-/prosemirror-0.1.279.tgz", - "integrity": "sha512-kI5Ix8dd0uOr8BpO0fFcC1+cGxH0CSFpODzqfY/ONNcR6K/oHyWwVrQgaFM++piX1rXGeurNqd+Ya9ltCodLNA==", + "version": "0.1.280", + "resolved": "https://registry.npmjs.org/@paperbits/prosemirror/-/prosemirror-0.1.280.tgz", + "integrity": "sha512-AjtPa0GCQrcbZ6lMQrB58+D9hHJy0tWe+znTho7M7BeMjldyXhX3sBSyqTAaLqLrUfi46LLzcNWrvlV/AGTvEg==", "requires": { - "@paperbits/common": "0.1.279", + "@paperbits/common": "0.1.280", "prosemirror-commands": "^1.1.4", "prosemirror-history": "^1.1.3", "prosemirror-inputrules": "^1.1.2", @@ -149,11 +149,11 @@ } }, "@paperbits/styles": { - "version": "0.1.279", - "resolved": "https://registry.npmjs.org/@paperbits/styles/-/styles-0.1.279.tgz", - "integrity": "sha512-KzyOg/ZGw2uX2OwfzkMBYKpcmbRUx7bWKI/PzJuAGtn10h87OoFCpRMjLFnC0RA6d1rs27LrvHUZSniVaMughA==", + "version": "0.1.280", + "resolved": "https://registry.npmjs.org/@paperbits/styles/-/styles-0.1.280.tgz", + "integrity": "sha512-DlxYDHISGRPGidYWvgpsyQDMk0LFtXm8gWoQ/MQkVUeN9UgfpAkUIKhYM+HV9+MG8cF0jFtm6WbUfkR5Q6Zg9g==", "requires": { - "@paperbits/common": "0.1.279", + "@paperbits/common": "0.1.280", "@simonwep/pickr": "^1.4.7", "cropperjs": "^1.5.6", "google-maps": "^3.3.0", diff --git a/package.json b/package.json index 4f5e6949a..5955041e7 100644 --- a/package.json +++ b/package.json @@ -59,11 +59,11 @@ "webpack-merge": "^4.2.2" }, "dependencies": { - "@paperbits/azure": "0.1.279", - "@paperbits/common": "0.1.279", - "@paperbits/core": "0.1.279", - "@paperbits/prosemirror": "0.1.279", - "@paperbits/styles": "0.1.279", + "@paperbits/azure": "0.1.280", + "@paperbits/common": "0.1.280", + "@paperbits/core": "0.1.280", + "@paperbits/prosemirror": "0.1.280", + "@paperbits/styles": "0.1.280", "@webcomponents/custom-elements": "1.3.2", "@webcomponents/shadydom": "^1.7.2", "adal-vanilla": "^1.0.18", diff --git a/src/components/content/content.ts b/src/components/content/content.ts index 55e5529ac..a983ff0c8 100644 --- a/src/components/content/content.ts +++ b/src/components/content/content.ts @@ -40,7 +40,7 @@ export class ContentWorkshop { component: { name: "reset-details-workshop", } - } + }; this.viewManager.openViewAsWorkshop(view); } } diff --git a/src/components/content/resetDetails.ts b/src/components/content/resetDetails.ts index b33dba80b..a194cf8ca 100644 --- a/src/components/content/resetDetails.ts +++ b/src/components/content/resetDetails.ts @@ -1,3 +1,4 @@ +import { OfflineObjectStorage } from "@paperbits/common/persistence"; import * as ko from "knockout"; import template from "./resetDetails.html"; import { Component } from "@paperbits/common/ko/decorators"; @@ -18,6 +19,7 @@ export class ResetDetailsWorkshop { constructor ( private readonly viewManager: ViewManager, private readonly provisioningService: ProvisionService, + private readonly offlineObjectStorage: OfflineObjectStorage, private readonly logger: Logger ) { this.response = ko.observable(""); @@ -28,10 +30,13 @@ export class ResetDetailsWorkshop { try { this.logger.traceEvent("Click: Reset website"); + this.offlineObjectStorage.discardChanges(); + this.viewManager.clearJourney(); + this.viewManager.hideToolboxes(); this.viewManager.notifySuccess("Website reset", `The website is being reset...`); + this.viewManager.setShutter(); await this.provisioningService.cleanup(); - await this.provisioningService.provision(); this.logger.traceEvent("Success: Website reset"); diff --git a/src/components/operations/operation-details/ko/runtime/operation-details.ts b/src/components/operations/operation-details/ko/runtime/operation-details.ts index ca0d10f12..3c620efad 100644 --- a/src/components/operations/operation-details/ko/runtime/operation-details.ts +++ b/src/components/operations/operation-details/ko/runtime/operation-details.ts @@ -99,7 +99,7 @@ export class OperationDetails { const apiName = this.routeHelper.getApiName(); const operationName = this.routeHelper.getOperationName(); - if (apiName !== this.selectedApiName()) { + if (apiName && apiName !== this.selectedApiName()) { this.selectedApiName(apiName); this.loadApi(apiName); } @@ -107,7 +107,7 @@ export class OperationDetails { if (apiName !== this.selectedApiName() || operationName !== this.selectedOperationName()) { this.operation(null); - if (operationName) { + if (apiName && operationName) { this.selectedOperationName(operationName); await this.loadOperation(apiName, operationName); } diff --git a/src/components/setup/setupDialog.ts b/src/components/setup/setupDialog.ts index 3fe5d4d60..6de4ac502 100644 --- a/src/components/setup/setupDialog.ts +++ b/src/components/setup/setupDialog.ts @@ -22,7 +22,7 @@ export class SetupDialog { this.viewManager.removeShutter(); await this.provisioningService.provision(); await this.router.navigateTo("/"); - + window.location.reload(); } catch (error) { diff --git a/src/services/provisioningService.ts b/src/services/provisioningService.ts index b84a5fae7..b8e2df748 100644 --- a/src/services/provisioningService.ts +++ b/src/services/provisioningService.ts @@ -47,7 +47,6 @@ export class ProvisionService { const dataUrl = `/editors/themes/default.json`; try { - this.viewManager.removeShutter(); const dataObj = await this.fetchData(dataUrl); const keys = Object.keys(dataObj); const accessToken = await this.authenticator.getAccessToken(); @@ -79,7 +78,6 @@ export class ProvisionService { } this.router.navigateTo("/"); this.viewManager.setHost({ name: "page-host" }); - this.viewManager.showToolboxes(); } catch (error) { throw error; diff --git a/src/themes/website/styles/utils.scss b/src/themes/website/styles/utils.scss index a4802fb6d..4cbe01f13 100644 --- a/src/themes/website/styles/utils.scss +++ b/src/themes/website/styles/utils.scss @@ -34,7 +34,19 @@ display: block; } +.mt-auto { + margin-top: auto; +} + +.mb-auto { + margin-bottom: auto; +} + .text-truncate { overflow: hidden; text-overflow: ellipsis; +} + +.text-center { + text-align: center; } \ No newline at end of file