diff --git a/src/Umbraco.Web.UI.Client/.env b/src/Umbraco.Web.UI.Client/.env index 8b067b5791..76438bfb23 100644 --- a/src/Umbraco.Web.UI.Client/.env +++ b/src/Umbraco.Web.UI.Client/.env @@ -1,4 +1,4 @@ # Copy this to .env.local and change what you want to test. VITE_UMBRACO_USE_MSW=on # on = turns on MSW, off = disables all mock handlers -VITE_UMBRACO_API_URL=http://localhost:9000 +VITE_UMBRACO_API_URL=http://localhost:11000 VITE_UMBRACO_INSTALL_STATUS=running # running or must-install or must-upgrade diff --git a/src/Umbraco.Web.UI.Client/.env.production b/src/Umbraco.Web.UI.Client/.env.production index 4c064d9973..bd90bc215e 100644 --- a/src/Umbraco.Web.UI.Client/.env.production +++ b/src/Umbraco.Web.UI.Client/.env.production @@ -1,2 +1,2 @@ -VITE_UMBRACO_INSTALL_STATUS=running # running or must-install or must-upgrade VITE_UMBRACO_USE_MSW=off +VITE_UMBRACO_API_URL= diff --git a/src/Umbraco.Web.UI.Client/.storybook/package.json b/src/Umbraco.Web.UI.Client/.storybook/package.json new file mode 100644 index 0000000000..a0df0c8677 --- /dev/null +++ b/src/Umbraco.Web.UI.Client/.storybook/package.json @@ -0,0 +1,3 @@ +{ + "type": "commonjs" +} diff --git a/src/Umbraco.Web.UI.Client/devops/icons/index.mjs b/src/Umbraco.Web.UI.Client/devops/icons/index.js similarity index 100% rename from src/Umbraco.Web.UI.Client/devops/icons/index.mjs rename to src/Umbraco.Web.UI.Client/devops/icons/index.js diff --git a/src/Umbraco.Web.UI.Client/devops/plop/plop.mjs b/src/Umbraco.Web.UI.Client/devops/plop/plop.js similarity index 100% rename from src/Umbraco.Web.UI.Client/devops/plop/plop.mjs rename to src/Umbraco.Web.UI.Client/devops/plop/plop.js diff --git a/src/Umbraco.Web.UI.Client/e2e/installer.spec.ts b/src/Umbraco.Web.UI.Client/e2e/installer.spec.ts index 93f78bda78..80340063f2 100644 --- a/src/Umbraco.Web.UI.Client/e2e/installer.spec.ts +++ b/src/Umbraco.Web.UI.Client/e2e/installer.spec.ts @@ -1,8 +1,8 @@ import { rest } from 'msw'; -import { expect, test } from '../test'; import { umbracoPath } from '@umbraco-cms/utils'; import { ProblemDetails, RuntimeLevel, ServerStatus } from '@umbraco-cms/backend-api'; +import { expect, test } from './test'; test.describe('installer tests', () => { test.beforeEach(async ({ page, worker }) => { diff --git a/src/Umbraco.Web.UI.Client/e2e/login.spec.ts b/src/Umbraco.Web.UI.Client/e2e/login.spec.ts index 7bfff100a5..2b0598fa92 100644 --- a/src/Umbraco.Web.UI.Client/e2e/login.spec.ts +++ b/src/Umbraco.Web.UI.Client/e2e/login.spec.ts @@ -1,4 +1,4 @@ -import { expect, test } from '../test'; +import { expect, test } from './test'; test('login', async ({ page }) => { // Go to /login diff --git a/src/Umbraco.Web.UI.Client/e2e/package.json b/src/Umbraco.Web.UI.Client/e2e/package.json new file mode 100644 index 0000000000..959170ed46 --- /dev/null +++ b/src/Umbraco.Web.UI.Client/e2e/package.json @@ -0,0 +1,4 @@ +{ + "name": "backoffice-e2e", + "type": "commonjs" +} diff --git a/src/Umbraco.Web.UI.Client/test.ts b/src/Umbraco.Web.UI.Client/e2e/test.ts similarity index 90% rename from src/Umbraco.Web.UI.Client/test.ts rename to src/Umbraco.Web.UI.Client/e2e/test.ts index 9908815d0f..ac1d6ea703 100644 --- a/src/Umbraco.Web.UI.Client/test.ts +++ b/src/Umbraco.Web.UI.Client/e2e/test.ts @@ -2,7 +2,7 @@ import { expect, test as base } from '@playwright/test'; import { createWorkerFixture } from 'playwright-msw'; import type { MockServiceWorker } from 'playwright-msw'; -import { handlers } from './src/core/mocks/e2e-handlers'; +import { handlers } from '../src/core/mocks/e2e-handlers'; const test = base.extend<{ worker: MockServiceWorker; diff --git a/src/Umbraco.Web.UI.Client/e2e/upgrader.spec.ts b/src/Umbraco.Web.UI.Client/e2e/upgrader.spec.ts index 8af19dab8c..878cb92509 100644 --- a/src/Umbraco.Web.UI.Client/e2e/upgrader.spec.ts +++ b/src/Umbraco.Web.UI.Client/e2e/upgrader.spec.ts @@ -1,7 +1,7 @@ import { rest } from 'msw'; -import { expect, test } from '../test'; import { umbracoPath } from '@umbraco-cms/utils'; import { ProblemDetails, RuntimeLevel, ServerStatus } from '@umbraco-cms/backend-api'; +import { expect, test } from './test'; test.describe('upgrader tests', () => { test.beforeEach(async ({ page, worker }) => { diff --git a/src/Umbraco.Web.UI.Client/index.html b/src/Umbraco.Web.UI.Client/index.html index d71d6fecd9..88f16377d5 100644 --- a/src/Umbraco.Web.UI.Client/index.html +++ b/src/Umbraco.Web.UI.Client/index.html @@ -2,7 +2,7 @@ - + Umbraco diff --git a/src/Umbraco.Web.UI.Client/package-lock.json b/src/Umbraco.Web.UI.Client/package-lock.json index 47260954b8..6487773914 100644 --- a/src/Umbraco.Web.UI.Client/package-lock.json +++ b/src/Umbraco.Web.UI.Client/package-lock.json @@ -27,7 +27,7 @@ "@babel/core": "^7.20.2", "@mdx-js/react": "^2.1.5", "@open-wc/testing": "^3.1.7", - "@playwright/test": "^1.28.0", + "@playwright/test": "^1.28.1", "@storybook/addon-a11y": "^6.5.13", "@storybook/addon-actions": "^6.5.13", "@storybook/addon-essentials": "^6.5.13", @@ -39,14 +39,14 @@ "@types/lodash-es": "^4.17.6", "@types/mocha": "^10.0.0", "@types/uuid": "^8.3.4", - "@typescript-eslint/eslint-plugin": "^5.43.0", - "@typescript-eslint/parser": "^5.43.0", + "@typescript-eslint/eslint-plugin": "^5.44.0", + "@typescript-eslint/parser": "^5.44.0", "@web/dev-server-esbuild": "^0.3.3", "@web/dev-server-import-maps": "^0.0.7", "@web/test-runner": "^0.15.0", "@web/test-runner-playwright": "^0.9.0", "babel-loader": "^9.1.0", - "eslint": "^8.27.0", + "eslint": "^8.28.0", "eslint-config-prettier": "^8.5.0", "eslint-import-resolver-typescript": "^3.5.2", "eslint-plugin-import": "^2.26.0", @@ -55,17 +55,17 @@ "eslint-plugin-local-rules": "^1.3.2", "eslint-plugin-storybook": "^0.6.7", "lit-html": "^2.4.0", - "msw": "^0.48.3", + "msw": "^0.49.0", "msw-storybook-addon": "^1.6.3", "openapi-typescript-codegen": "^0.23.0", "playwright-msw": "^2.0.1", "plop": "^3.1.1", - "prettier": "2.7.1", + "prettier": "2.8.0", "tiny-glob": "^0.2.9", "typescript": "^4.9.3", "vite": "^3.2.4", "vite-plugin-static-copy": "^0.12.0", - "vite-tsconfig-paths": "^3.5.2", + "vite-tsconfig-paths": "^3.6.0", "web-component-analyzer": "^2.0.0-next.4" }, "engines": { @@ -2885,13 +2885,13 @@ "dev": true }, "node_modules/@playwright/test": { - "version": "1.28.0", - "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.28.0.tgz", - "integrity": "sha512-vrHs5DFTPwYox5SGKq/7TDn/S4q6RA1zArd7uhO6EyP9hj3XgZBBM12ktMbnDQNxh/fL1IUKsTNLxihmsU38lQ==", + "version": "1.28.1", + "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.28.1.tgz", + "integrity": "sha512-xN6spdqrNlwSn9KabIhqfZR7IWjPpFK1835tFNgjrlysaSezuX8PYUwaz38V/yI8TJLG9PkAMEXoHRXYXlpTPQ==", "dev": true, "dependencies": { "@types/node": "*", - "playwright-core": "1.28.0" + "playwright-core": "1.28.1" }, "bin": { "playwright": "cli.js" @@ -2901,9 +2901,9 @@ } }, "node_modules/@playwright/test/node_modules/playwright-core": { - "version": "1.28.0", - "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.28.0.tgz", - "integrity": "sha512-nJLknd28kPBiCNTbqpu6Wmkrh63OEqJSFw9xOfL9qxfNwody7h6/L3O2dZoWQ6Oxcm0VOHjWmGiCUGkc0X3VZA==", + "version": "1.28.1", + "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.28.1.tgz", + "integrity": "sha512-3PixLnGPno0E8rSBJjtwqTwJe3Yw72QwBBBxNoukIj3lEeBNXwbNiKrNuB1oyQgTBw5QHUhNO3SteEtHaMK6ag==", "dev": true, "bin": { "playwright": "cli.js" @@ -6391,14 +6391,14 @@ } }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "5.43.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.43.0.tgz", - "integrity": "sha512-wNPzG+eDR6+hhW4yobEmpR36jrqqQv1vxBq5LJO3fBAktjkvekfr4BRl+3Fn1CM/A+s8/EiGUbOMDoYqWdbtXA==", + "version": "5.44.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.44.0.tgz", + "integrity": "sha512-j5ULd7FmmekcyWeArx+i8x7sdRHzAtXTkmDPthE4amxZOWKFK7bomoJ4r7PJ8K7PoMzD16U8MmuZFAonr1ERvw==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "5.43.0", - "@typescript-eslint/type-utils": "5.43.0", - "@typescript-eslint/utils": "5.43.0", + "@typescript-eslint/scope-manager": "5.44.0", + "@typescript-eslint/type-utils": "5.44.0", + "@typescript-eslint/utils": "5.44.0", "debug": "^4.3.4", "ignore": "^5.2.0", "natural-compare-lite": "^1.4.0", @@ -6424,13 +6424,13 @@ } }, "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/scope-manager": { - "version": "5.43.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.43.0.tgz", - "integrity": "sha512-XNWnGaqAtTJsUiZaoiGIrdJYHsUOd3BZ3Qj5zKp9w6km6HsrjPk/TGZv0qMTWyWj0+1QOqpHQ2gZOLXaGA9Ekw==", + "version": "5.44.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.44.0.tgz", + "integrity": "sha512-2pKml57KusI0LAhgLKae9kwWeITZ7IsZs77YxyNyIVOwQ1kToyXRaJLl+uDEXzMN5hnobKUOo2gKntK9H1YL8g==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.43.0", - "@typescript-eslint/visitor-keys": "5.43.0" + "@typescript-eslint/types": "5.44.0", + "@typescript-eslint/visitor-keys": "5.44.0" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -6441,9 +6441,9 @@ } }, "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/types": { - "version": "5.43.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.43.0.tgz", - "integrity": "sha512-jpsbcD0x6AUvV7tyOlyvon0aUsQpF8W+7TpJntfCUWU1qaIKu2K34pMwQKSzQH8ORgUrGYY6pVIh1Pi8TNeteg==", + "version": "5.44.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.44.0.tgz", + "integrity": "sha512-Tp+zDnHmGk4qKR1l+Y1rBvpjpm5tGXX339eAlRBDg+kgZkz9Bw+pqi4dyseOZMsGuSH69fYfPJCBKBrbPCxYFQ==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -6454,13 +6454,13 @@ } }, "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/typescript-estree": { - "version": "5.43.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.43.0.tgz", - "integrity": "sha512-BZ1WVe+QQ+igWal2tDbNg1j2HWUkAa+CVqdU79L4HP9izQY6CNhXfkNwd1SS4+sSZAP/EthI1uiCSY/+H0pROg==", + "version": "5.44.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.44.0.tgz", + "integrity": "sha512-M6Jr+RM7M5zeRj2maSfsZK2660HKAJawv4Ud0xT+yauyvgrsHu276VtXlKDFnEmhG+nVEd0fYZNXGoAgxwDWJw==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.43.0", - "@typescript-eslint/visitor-keys": "5.43.0", + "@typescript-eslint/types": "5.44.0", + "@typescript-eslint/visitor-keys": "5.44.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -6481,16 +6481,16 @@ } }, "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/utils": { - "version": "5.43.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.43.0.tgz", - "integrity": "sha512-8nVpA6yX0sCjf7v/NDfeaOlyaIIqL7OaIGOWSPFqUKK59Gnumd3Wa+2l8oAaYO2lk0sO+SbWFWRSvhu8gLGv4A==", + "version": "5.44.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.44.0.tgz", + "integrity": "sha512-fMzA8LLQ189gaBjS0MZszw5HBdZgVwxVFShCO3QN+ws3GlPkcy9YuS3U4wkT6su0w+Byjq3mS3uamy9HE4Yfjw==", "dev": true, "dependencies": { "@types/json-schema": "^7.0.9", "@types/semver": "^7.3.12", - "@typescript-eslint/scope-manager": "5.43.0", - "@typescript-eslint/types": "5.43.0", - "@typescript-eslint/typescript-estree": "5.43.0", + "@typescript-eslint/scope-manager": "5.44.0", + "@typescript-eslint/types": "5.44.0", + "@typescript-eslint/typescript-estree": "5.44.0", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0", "semver": "^7.3.7" @@ -6507,12 +6507,12 @@ } }, "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/visitor-keys": { - "version": "5.43.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.43.0.tgz", - "integrity": "sha512-icl1jNH/d18OVHLfcwdL3bWUKsBeIiKYTGxMJCoGe7xFht+E4QgzOqoWYrU8XSLJWhVw8nTacbm03v23J/hFTg==", + "version": "5.44.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.44.0.tgz", + "integrity": "sha512-a48tLG8/4m62gPFbJ27FxwCOqPKxsb8KC3HkmYoq2As/4YyjQl1jDbRr1s63+g4FS/iIehjmN3L5UjmKva1HzQ==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.43.0", + "@typescript-eslint/types": "5.44.0", "eslint-visitor-keys": "^3.3.0" }, "engines": { @@ -6558,14 +6558,14 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "5.43.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.43.0.tgz", - "integrity": "sha512-2iHUK2Lh7PwNUlhFxxLI2haSDNyXvebBO9izhjhMoDC+S3XI9qt2DGFUsiJ89m2k7gGYch2aEpYqV5F/+nwZug==", + "version": "5.44.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.44.0.tgz", + "integrity": "sha512-H7LCqbZnKqkkgQHaKLGC6KUjt3pjJDx8ETDqmwncyb6PuoigYajyAwBGz08VU/l86dZWZgI4zm5k2VaKqayYyA==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "5.43.0", - "@typescript-eslint/types": "5.43.0", - "@typescript-eslint/typescript-estree": "5.43.0", + "@typescript-eslint/scope-manager": "5.44.0", + "@typescript-eslint/types": "5.44.0", + "@typescript-eslint/typescript-estree": "5.44.0", "debug": "^4.3.4" }, "engines": { @@ -6585,13 +6585,13 @@ } }, "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager": { - "version": "5.43.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.43.0.tgz", - "integrity": "sha512-XNWnGaqAtTJsUiZaoiGIrdJYHsUOd3BZ3Qj5zKp9w6km6HsrjPk/TGZv0qMTWyWj0+1QOqpHQ2gZOLXaGA9Ekw==", + "version": "5.44.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.44.0.tgz", + "integrity": "sha512-2pKml57KusI0LAhgLKae9kwWeITZ7IsZs77YxyNyIVOwQ1kToyXRaJLl+uDEXzMN5hnobKUOo2gKntK9H1YL8g==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.43.0", - "@typescript-eslint/visitor-keys": "5.43.0" + "@typescript-eslint/types": "5.44.0", + "@typescript-eslint/visitor-keys": "5.44.0" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -6602,9 +6602,9 @@ } }, "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types": { - "version": "5.43.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.43.0.tgz", - "integrity": "sha512-jpsbcD0x6AUvV7tyOlyvon0aUsQpF8W+7TpJntfCUWU1qaIKu2K34pMwQKSzQH8ORgUrGYY6pVIh1Pi8TNeteg==", + "version": "5.44.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.44.0.tgz", + "integrity": "sha512-Tp+zDnHmGk4qKR1l+Y1rBvpjpm5tGXX339eAlRBDg+kgZkz9Bw+pqi4dyseOZMsGuSH69fYfPJCBKBrbPCxYFQ==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -6615,13 +6615,13 @@ } }, "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree": { - "version": "5.43.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.43.0.tgz", - "integrity": "sha512-BZ1WVe+QQ+igWal2tDbNg1j2HWUkAa+CVqdU79L4HP9izQY6CNhXfkNwd1SS4+sSZAP/EthI1uiCSY/+H0pROg==", + "version": "5.44.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.44.0.tgz", + "integrity": "sha512-M6Jr+RM7M5zeRj2maSfsZK2660HKAJawv4Ud0xT+yauyvgrsHu276VtXlKDFnEmhG+nVEd0fYZNXGoAgxwDWJw==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.43.0", - "@typescript-eslint/visitor-keys": "5.43.0", + "@typescript-eslint/types": "5.44.0", + "@typescript-eslint/visitor-keys": "5.44.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -6642,12 +6642,12 @@ } }, "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/visitor-keys": { - "version": "5.43.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.43.0.tgz", - "integrity": "sha512-icl1jNH/d18OVHLfcwdL3bWUKsBeIiKYTGxMJCoGe7xFht+E4QgzOqoWYrU8XSLJWhVw8nTacbm03v23J/hFTg==", + "version": "5.44.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.44.0.tgz", + "integrity": "sha512-a48tLG8/4m62gPFbJ27FxwCOqPKxsb8KC3HkmYoq2As/4YyjQl1jDbRr1s63+g4FS/iIehjmN3L5UjmKva1HzQ==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.43.0", + "@typescript-eslint/types": "5.44.0", "eslint-visitor-keys": "^3.3.0" }, "engines": { @@ -6691,13 +6691,13 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "5.43.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.43.0.tgz", - "integrity": "sha512-K21f+KY2/VvYggLf5Pk4tgBOPs2otTaIHy2zjclo7UZGLyFH86VfUOm5iq+OtDtxq/Zwu2I3ujDBykVW4Xtmtg==", + "version": "5.44.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.44.0.tgz", + "integrity": "sha512-A1u0Yo5wZxkXPQ7/noGkRhV4J9opcymcr31XQtOzcc5nO/IHN2E2TPMECKWYpM3e6olWEM63fq/BaL1wEYnt/w==", "dev": true, "dependencies": { - "@typescript-eslint/typescript-estree": "5.43.0", - "@typescript-eslint/utils": "5.43.0", + "@typescript-eslint/typescript-estree": "5.44.0", + "@typescript-eslint/utils": "5.44.0", "debug": "^4.3.4", "tsutils": "^3.21.0" }, @@ -6718,13 +6718,13 @@ } }, "node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/scope-manager": { - "version": "5.43.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.43.0.tgz", - "integrity": "sha512-XNWnGaqAtTJsUiZaoiGIrdJYHsUOd3BZ3Qj5zKp9w6km6HsrjPk/TGZv0qMTWyWj0+1QOqpHQ2gZOLXaGA9Ekw==", + "version": "5.44.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.44.0.tgz", + "integrity": "sha512-2pKml57KusI0LAhgLKae9kwWeITZ7IsZs77YxyNyIVOwQ1kToyXRaJLl+uDEXzMN5hnobKUOo2gKntK9H1YL8g==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.43.0", - "@typescript-eslint/visitor-keys": "5.43.0" + "@typescript-eslint/types": "5.44.0", + "@typescript-eslint/visitor-keys": "5.44.0" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -6735,9 +6735,9 @@ } }, "node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/types": { - "version": "5.43.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.43.0.tgz", - "integrity": "sha512-jpsbcD0x6AUvV7tyOlyvon0aUsQpF8W+7TpJntfCUWU1qaIKu2K34pMwQKSzQH8ORgUrGYY6pVIh1Pi8TNeteg==", + "version": "5.44.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.44.0.tgz", + "integrity": "sha512-Tp+zDnHmGk4qKR1l+Y1rBvpjpm5tGXX339eAlRBDg+kgZkz9Bw+pqi4dyseOZMsGuSH69fYfPJCBKBrbPCxYFQ==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -6748,13 +6748,13 @@ } }, "node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/typescript-estree": { - "version": "5.43.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.43.0.tgz", - "integrity": "sha512-BZ1WVe+QQ+igWal2tDbNg1j2HWUkAa+CVqdU79L4HP9izQY6CNhXfkNwd1SS4+sSZAP/EthI1uiCSY/+H0pROg==", + "version": "5.44.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.44.0.tgz", + "integrity": "sha512-M6Jr+RM7M5zeRj2maSfsZK2660HKAJawv4Ud0xT+yauyvgrsHu276VtXlKDFnEmhG+nVEd0fYZNXGoAgxwDWJw==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.43.0", - "@typescript-eslint/visitor-keys": "5.43.0", + "@typescript-eslint/types": "5.44.0", + "@typescript-eslint/visitor-keys": "5.44.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -6775,16 +6775,16 @@ } }, "node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/utils": { - "version": "5.43.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.43.0.tgz", - "integrity": "sha512-8nVpA6yX0sCjf7v/NDfeaOlyaIIqL7OaIGOWSPFqUKK59Gnumd3Wa+2l8oAaYO2lk0sO+SbWFWRSvhu8gLGv4A==", + "version": "5.44.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.44.0.tgz", + "integrity": "sha512-fMzA8LLQ189gaBjS0MZszw5HBdZgVwxVFShCO3QN+ws3GlPkcy9YuS3U4wkT6su0w+Byjq3mS3uamy9HE4Yfjw==", "dev": true, "dependencies": { "@types/json-schema": "^7.0.9", "@types/semver": "^7.3.12", - "@typescript-eslint/scope-manager": "5.43.0", - "@typescript-eslint/types": "5.43.0", - "@typescript-eslint/typescript-estree": "5.43.0", + "@typescript-eslint/scope-manager": "5.44.0", + "@typescript-eslint/types": "5.44.0", + "@typescript-eslint/typescript-estree": "5.44.0", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0", "semver": "^7.3.7" @@ -6801,12 +6801,12 @@ } }, "node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/visitor-keys": { - "version": "5.43.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.43.0.tgz", - "integrity": "sha512-icl1jNH/d18OVHLfcwdL3bWUKsBeIiKYTGxMJCoGe7xFht+E4QgzOqoWYrU8XSLJWhVw8nTacbm03v23J/hFTg==", + "version": "5.44.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.44.0.tgz", + "integrity": "sha512-a48tLG8/4m62gPFbJ27FxwCOqPKxsb8KC3HkmYoq2As/4YyjQl1jDbRr1s63+g4FS/iIehjmN3L5UjmKva1HzQ==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.43.0", + "@typescript-eslint/types": "5.44.0", "eslint-visitor-keys": "^3.3.0" }, "engines": { @@ -12734,9 +12734,9 @@ } }, "node_modules/eslint": { - "version": "8.27.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.27.0.tgz", - "integrity": "sha512-0y1bfG2ho7mty+SiILVf9PfuRA49ek4Nc60Wmmu62QlobNR+CeXa4xXIJgcuwSQgZiWaPH+5BDsctpIW0PR/wQ==", + "version": "8.28.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.28.0.tgz", + "integrity": "sha512-S27Di+EVyMxcHiwDrFzk8dJYAaD+/5SoWKxL1ri/71CRHsnJnRDPNt2Kzj24+MT9FDupf4aqqyqPrvI8MvQ4VQ==", "dev": true, "dependencies": { "@eslint/eslintrc": "^1.3.3", @@ -19592,9 +19592,9 @@ "dev": true }, "node_modules/msw": { - "version": "0.48.3", - "resolved": "https://registry.npmjs.org/msw/-/msw-0.48.3.tgz", - "integrity": "sha512-8ENBcX7JVWPA5v9WTeOnCWCMOVtyBiXZyD/0+AKlhOysJRB1ZdBAcMGLIiQ2/VpQ2lC0Yd7SFKg9aviAQSVeaw==", + "version": "0.49.0", + "resolved": "https://registry.npmjs.org/msw/-/msw-0.49.0.tgz", + "integrity": "sha512-xX5RMSMjN58j8G/V26Uaf5LP464VltuWyd66TQimLueVYfG47RKydGsd4JW165Jb/gjoaQxh5Tdvv31wdZAOlA==", "dev": true, "hasInstallScript": true, "dependencies": { @@ -19629,7 +19629,7 @@ "url": "https://opencollective.com/mswjs" }, "peerDependencies": { - "typescript": ">= 4.2.x <= 4.8.x" + "typescript": ">= 4.4.x <= 4.9.x" }, "peerDependenciesMeta": { "typescript": { @@ -21658,9 +21658,9 @@ } }, "node_modules/prettier": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.7.1.tgz", - "integrity": "sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g==", + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.0.tgz", + "integrity": "sha512-9Lmg8hTFZKG0Asr/kW9Bp8tJjRVluO8EJQVfY2T7FMw9T5jy4I/Uvx0Rca/XWf50QQ1/SS48+6IJWnrb+2yemA==", "dev": true, "bin": { "prettier": "bin-prettier.js" @@ -26785,9 +26785,9 @@ "dev": true }, "node_modules/vite-tsconfig-paths": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/vite-tsconfig-paths/-/vite-tsconfig-paths-3.5.2.tgz", - "integrity": "sha512-xJMgHA2oJ28QCG2f+hXrcqzo7IttrSRK4A//Tp94CfuX5eetOx33qiwXHUdi3FwkHP2ocpxHuvE45Ix67gwEmQ==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/vite-tsconfig-paths/-/vite-tsconfig-paths-3.6.0.tgz", + "integrity": "sha512-UfsPYonxLqPD633X8cWcPFVuYzx/CMNHAjZTasYwX69sXpa4gNmQkR0XCjj82h7zhLGdTWagMjC1qfb9S+zv0A==", "dev": true, "dependencies": { "debug": "^4.1.1", @@ -30766,19 +30766,19 @@ } }, "@playwright/test": { - "version": "1.28.0", - "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.28.0.tgz", - "integrity": "sha512-vrHs5DFTPwYox5SGKq/7TDn/S4q6RA1zArd7uhO6EyP9hj3XgZBBM12ktMbnDQNxh/fL1IUKsTNLxihmsU38lQ==", + "version": "1.28.1", + "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.28.1.tgz", + "integrity": "sha512-xN6spdqrNlwSn9KabIhqfZR7IWjPpFK1835tFNgjrlysaSezuX8PYUwaz38V/yI8TJLG9PkAMEXoHRXYXlpTPQ==", "dev": true, "requires": { "@types/node": "*", - "playwright-core": "1.28.0" + "playwright-core": "1.28.1" }, "dependencies": { "playwright-core": { - "version": "1.28.0", - "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.28.0.tgz", - "integrity": "sha512-nJLknd28kPBiCNTbqpu6Wmkrh63OEqJSFw9xOfL9qxfNwody7h6/L3O2dZoWQ6Oxcm0VOHjWmGiCUGkc0X3VZA==", + "version": "1.28.1", + "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.28.1.tgz", + "integrity": "sha512-3PixLnGPno0E8rSBJjtwqTwJe3Yw72QwBBBxNoukIj3lEeBNXwbNiKrNuB1oyQgTBw5QHUhNO3SteEtHaMK6ag==", "dev": true } } @@ -33403,14 +33403,14 @@ } }, "@typescript-eslint/eslint-plugin": { - "version": "5.43.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.43.0.tgz", - "integrity": "sha512-wNPzG+eDR6+hhW4yobEmpR36jrqqQv1vxBq5LJO3fBAktjkvekfr4BRl+3Fn1CM/A+s8/EiGUbOMDoYqWdbtXA==", + "version": "5.44.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.44.0.tgz", + "integrity": "sha512-j5ULd7FmmekcyWeArx+i8x7sdRHzAtXTkmDPthE4amxZOWKFK7bomoJ4r7PJ8K7PoMzD16U8MmuZFAonr1ERvw==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "5.43.0", - "@typescript-eslint/type-utils": "5.43.0", - "@typescript-eslint/utils": "5.43.0", + "@typescript-eslint/scope-manager": "5.44.0", + "@typescript-eslint/type-utils": "5.44.0", + "@typescript-eslint/utils": "5.44.0", "debug": "^4.3.4", "ignore": "^5.2.0", "natural-compare-lite": "^1.4.0", @@ -33420,29 +33420,29 @@ }, "dependencies": { "@typescript-eslint/scope-manager": { - "version": "5.43.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.43.0.tgz", - "integrity": "sha512-XNWnGaqAtTJsUiZaoiGIrdJYHsUOd3BZ3Qj5zKp9w6km6HsrjPk/TGZv0qMTWyWj0+1QOqpHQ2gZOLXaGA9Ekw==", + "version": "5.44.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.44.0.tgz", + "integrity": "sha512-2pKml57KusI0LAhgLKae9kwWeITZ7IsZs77YxyNyIVOwQ1kToyXRaJLl+uDEXzMN5hnobKUOo2gKntK9H1YL8g==", "dev": true, "requires": { - "@typescript-eslint/types": "5.43.0", - "@typescript-eslint/visitor-keys": "5.43.0" + "@typescript-eslint/types": "5.44.0", + "@typescript-eslint/visitor-keys": "5.44.0" } }, "@typescript-eslint/types": { - "version": "5.43.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.43.0.tgz", - "integrity": "sha512-jpsbcD0x6AUvV7tyOlyvon0aUsQpF8W+7TpJntfCUWU1qaIKu2K34pMwQKSzQH8ORgUrGYY6pVIh1Pi8TNeteg==", + "version": "5.44.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.44.0.tgz", + "integrity": "sha512-Tp+zDnHmGk4qKR1l+Y1rBvpjpm5tGXX339eAlRBDg+kgZkz9Bw+pqi4dyseOZMsGuSH69fYfPJCBKBrbPCxYFQ==", "dev": true }, "@typescript-eslint/typescript-estree": { - "version": "5.43.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.43.0.tgz", - "integrity": "sha512-BZ1WVe+QQ+igWal2tDbNg1j2HWUkAa+CVqdU79L4HP9izQY6CNhXfkNwd1SS4+sSZAP/EthI1uiCSY/+H0pROg==", + "version": "5.44.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.44.0.tgz", + "integrity": "sha512-M6Jr+RM7M5zeRj2maSfsZK2660HKAJawv4Ud0xT+yauyvgrsHu276VtXlKDFnEmhG+nVEd0fYZNXGoAgxwDWJw==", "dev": true, "requires": { - "@typescript-eslint/types": "5.43.0", - "@typescript-eslint/visitor-keys": "5.43.0", + "@typescript-eslint/types": "5.44.0", + "@typescript-eslint/visitor-keys": "5.44.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -33451,28 +33451,28 @@ } }, "@typescript-eslint/utils": { - "version": "5.43.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.43.0.tgz", - "integrity": "sha512-8nVpA6yX0sCjf7v/NDfeaOlyaIIqL7OaIGOWSPFqUKK59Gnumd3Wa+2l8oAaYO2lk0sO+SbWFWRSvhu8gLGv4A==", + "version": "5.44.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.44.0.tgz", + "integrity": "sha512-fMzA8LLQ189gaBjS0MZszw5HBdZgVwxVFShCO3QN+ws3GlPkcy9YuS3U4wkT6su0w+Byjq3mS3uamy9HE4Yfjw==", "dev": true, "requires": { "@types/json-schema": "^7.0.9", "@types/semver": "^7.3.12", - "@typescript-eslint/scope-manager": "5.43.0", - "@typescript-eslint/types": "5.43.0", - "@typescript-eslint/typescript-estree": "5.43.0", + "@typescript-eslint/scope-manager": "5.44.0", + "@typescript-eslint/types": "5.44.0", + "@typescript-eslint/typescript-estree": "5.44.0", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0", "semver": "^7.3.7" } }, "@typescript-eslint/visitor-keys": { - "version": "5.43.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.43.0.tgz", - "integrity": "sha512-icl1jNH/d18OVHLfcwdL3bWUKsBeIiKYTGxMJCoGe7xFht+E4QgzOqoWYrU8XSLJWhVw8nTacbm03v23J/hFTg==", + "version": "5.44.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.44.0.tgz", + "integrity": "sha512-a48tLG8/4m62gPFbJ27FxwCOqPKxsb8KC3HkmYoq2As/4YyjQl1jDbRr1s63+g4FS/iIehjmN3L5UjmKva1HzQ==", "dev": true, "requires": { - "@typescript-eslint/types": "5.43.0", + "@typescript-eslint/types": "5.44.0", "eslint-visitor-keys": "^3.3.0" } }, @@ -33497,41 +33497,41 @@ } }, "@typescript-eslint/parser": { - "version": "5.43.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.43.0.tgz", - "integrity": "sha512-2iHUK2Lh7PwNUlhFxxLI2haSDNyXvebBO9izhjhMoDC+S3XI9qt2DGFUsiJ89m2k7gGYch2aEpYqV5F/+nwZug==", + "version": "5.44.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.44.0.tgz", + "integrity": "sha512-H7LCqbZnKqkkgQHaKLGC6KUjt3pjJDx8ETDqmwncyb6PuoigYajyAwBGz08VU/l86dZWZgI4zm5k2VaKqayYyA==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "5.43.0", - "@typescript-eslint/types": "5.43.0", - "@typescript-eslint/typescript-estree": "5.43.0", + "@typescript-eslint/scope-manager": "5.44.0", + "@typescript-eslint/types": "5.44.0", + "@typescript-eslint/typescript-estree": "5.44.0", "debug": "^4.3.4" }, "dependencies": { "@typescript-eslint/scope-manager": { - "version": "5.43.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.43.0.tgz", - "integrity": "sha512-XNWnGaqAtTJsUiZaoiGIrdJYHsUOd3BZ3Qj5zKp9w6km6HsrjPk/TGZv0qMTWyWj0+1QOqpHQ2gZOLXaGA9Ekw==", + "version": "5.44.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.44.0.tgz", + "integrity": "sha512-2pKml57KusI0LAhgLKae9kwWeITZ7IsZs77YxyNyIVOwQ1kToyXRaJLl+uDEXzMN5hnobKUOo2gKntK9H1YL8g==", "dev": true, "requires": { - "@typescript-eslint/types": "5.43.0", - "@typescript-eslint/visitor-keys": "5.43.0" + "@typescript-eslint/types": "5.44.0", + "@typescript-eslint/visitor-keys": "5.44.0" } }, "@typescript-eslint/types": { - "version": "5.43.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.43.0.tgz", - "integrity": "sha512-jpsbcD0x6AUvV7tyOlyvon0aUsQpF8W+7TpJntfCUWU1qaIKu2K34pMwQKSzQH8ORgUrGYY6pVIh1Pi8TNeteg==", + "version": "5.44.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.44.0.tgz", + "integrity": "sha512-Tp+zDnHmGk4qKR1l+Y1rBvpjpm5tGXX339eAlRBDg+kgZkz9Bw+pqi4dyseOZMsGuSH69fYfPJCBKBrbPCxYFQ==", "dev": true }, "@typescript-eslint/typescript-estree": { - "version": "5.43.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.43.0.tgz", - "integrity": "sha512-BZ1WVe+QQ+igWal2tDbNg1j2HWUkAa+CVqdU79L4HP9izQY6CNhXfkNwd1SS4+sSZAP/EthI1uiCSY/+H0pROg==", + "version": "5.44.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.44.0.tgz", + "integrity": "sha512-M6Jr+RM7M5zeRj2maSfsZK2660HKAJawv4Ud0xT+yauyvgrsHu276VtXlKDFnEmhG+nVEd0fYZNXGoAgxwDWJw==", "dev": true, "requires": { - "@typescript-eslint/types": "5.43.0", - "@typescript-eslint/visitor-keys": "5.43.0", + "@typescript-eslint/types": "5.44.0", + "@typescript-eslint/visitor-keys": "5.44.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -33540,12 +33540,12 @@ } }, "@typescript-eslint/visitor-keys": { - "version": "5.43.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.43.0.tgz", - "integrity": "sha512-icl1jNH/d18OVHLfcwdL3bWUKsBeIiKYTGxMJCoGe7xFht+E4QgzOqoWYrU8XSLJWhVw8nTacbm03v23J/hFTg==", + "version": "5.44.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.44.0.tgz", + "integrity": "sha512-a48tLG8/4m62gPFbJ27FxwCOqPKxsb8KC3HkmYoq2As/4YyjQl1jDbRr1s63+g4FS/iIehjmN3L5UjmKva1HzQ==", "dev": true, "requires": { - "@typescript-eslint/types": "5.43.0", + "@typescript-eslint/types": "5.44.0", "eslint-visitor-keys": "^3.3.0" } }, @@ -33571,41 +33571,41 @@ } }, "@typescript-eslint/type-utils": { - "version": "5.43.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.43.0.tgz", - "integrity": "sha512-K21f+KY2/VvYggLf5Pk4tgBOPs2otTaIHy2zjclo7UZGLyFH86VfUOm5iq+OtDtxq/Zwu2I3ujDBykVW4Xtmtg==", + "version": "5.44.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.44.0.tgz", + "integrity": "sha512-A1u0Yo5wZxkXPQ7/noGkRhV4J9opcymcr31XQtOzcc5nO/IHN2E2TPMECKWYpM3e6olWEM63fq/BaL1wEYnt/w==", "dev": true, "requires": { - "@typescript-eslint/typescript-estree": "5.43.0", - "@typescript-eslint/utils": "5.43.0", + "@typescript-eslint/typescript-estree": "5.44.0", + "@typescript-eslint/utils": "5.44.0", "debug": "^4.3.4", "tsutils": "^3.21.0" }, "dependencies": { "@typescript-eslint/scope-manager": { - "version": "5.43.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.43.0.tgz", - "integrity": "sha512-XNWnGaqAtTJsUiZaoiGIrdJYHsUOd3BZ3Qj5zKp9w6km6HsrjPk/TGZv0qMTWyWj0+1QOqpHQ2gZOLXaGA9Ekw==", + "version": "5.44.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.44.0.tgz", + "integrity": "sha512-2pKml57KusI0LAhgLKae9kwWeITZ7IsZs77YxyNyIVOwQ1kToyXRaJLl+uDEXzMN5hnobKUOo2gKntK9H1YL8g==", "dev": true, "requires": { - "@typescript-eslint/types": "5.43.0", - "@typescript-eslint/visitor-keys": "5.43.0" + "@typescript-eslint/types": "5.44.0", + "@typescript-eslint/visitor-keys": "5.44.0" } }, "@typescript-eslint/types": { - "version": "5.43.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.43.0.tgz", - "integrity": "sha512-jpsbcD0x6AUvV7tyOlyvon0aUsQpF8W+7TpJntfCUWU1qaIKu2K34pMwQKSzQH8ORgUrGYY6pVIh1Pi8TNeteg==", + "version": "5.44.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.44.0.tgz", + "integrity": "sha512-Tp+zDnHmGk4qKR1l+Y1rBvpjpm5tGXX339eAlRBDg+kgZkz9Bw+pqi4dyseOZMsGuSH69fYfPJCBKBrbPCxYFQ==", "dev": true }, "@typescript-eslint/typescript-estree": { - "version": "5.43.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.43.0.tgz", - "integrity": "sha512-BZ1WVe+QQ+igWal2tDbNg1j2HWUkAa+CVqdU79L4HP9izQY6CNhXfkNwd1SS4+sSZAP/EthI1uiCSY/+H0pROg==", + "version": "5.44.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.44.0.tgz", + "integrity": "sha512-M6Jr+RM7M5zeRj2maSfsZK2660HKAJawv4Ud0xT+yauyvgrsHu276VtXlKDFnEmhG+nVEd0fYZNXGoAgxwDWJw==", "dev": true, "requires": { - "@typescript-eslint/types": "5.43.0", - "@typescript-eslint/visitor-keys": "5.43.0", + "@typescript-eslint/types": "5.44.0", + "@typescript-eslint/visitor-keys": "5.44.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -33614,28 +33614,28 @@ } }, "@typescript-eslint/utils": { - "version": "5.43.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.43.0.tgz", - "integrity": "sha512-8nVpA6yX0sCjf7v/NDfeaOlyaIIqL7OaIGOWSPFqUKK59Gnumd3Wa+2l8oAaYO2lk0sO+SbWFWRSvhu8gLGv4A==", + "version": "5.44.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.44.0.tgz", + "integrity": "sha512-fMzA8LLQ189gaBjS0MZszw5HBdZgVwxVFShCO3QN+ws3GlPkcy9YuS3U4wkT6su0w+Byjq3mS3uamy9HE4Yfjw==", "dev": true, "requires": { "@types/json-schema": "^7.0.9", "@types/semver": "^7.3.12", - "@typescript-eslint/scope-manager": "5.43.0", - "@typescript-eslint/types": "5.43.0", - "@typescript-eslint/typescript-estree": "5.43.0", + "@typescript-eslint/scope-manager": "5.44.0", + "@typescript-eslint/types": "5.44.0", + "@typescript-eslint/typescript-estree": "5.44.0", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0", "semver": "^7.3.7" } }, "@typescript-eslint/visitor-keys": { - "version": "5.43.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.43.0.tgz", - "integrity": "sha512-icl1jNH/d18OVHLfcwdL3bWUKsBeIiKYTGxMJCoGe7xFht+E4QgzOqoWYrU8XSLJWhVw8nTacbm03v23J/hFTg==", + "version": "5.44.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.44.0.tgz", + "integrity": "sha512-a48tLG8/4m62gPFbJ27FxwCOqPKxsb8KC3HkmYoq2As/4YyjQl1jDbRr1s63+g4FS/iIehjmN3L5UjmKva1HzQ==", "dev": true, "requires": { - "@typescript-eslint/types": "5.43.0", + "@typescript-eslint/types": "5.44.0", "eslint-visitor-keys": "^3.3.0" } }, @@ -38369,9 +38369,9 @@ "dev": true }, "eslint": { - "version": "8.27.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.27.0.tgz", - "integrity": "sha512-0y1bfG2ho7mty+SiILVf9PfuRA49ek4Nc60Wmmu62QlobNR+CeXa4xXIJgcuwSQgZiWaPH+5BDsctpIW0PR/wQ==", + "version": "8.28.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.28.0.tgz", + "integrity": "sha512-S27Di+EVyMxcHiwDrFzk8dJYAaD+/5SoWKxL1ri/71CRHsnJnRDPNt2Kzj24+MT9FDupf4aqqyqPrvI8MvQ4VQ==", "dev": true, "requires": { "@eslint/eslintrc": "^1.3.3", @@ -43532,9 +43532,9 @@ "dev": true }, "msw": { - "version": "0.48.3", - "resolved": "https://registry.npmjs.org/msw/-/msw-0.48.3.tgz", - "integrity": "sha512-8ENBcX7JVWPA5v9WTeOnCWCMOVtyBiXZyD/0+AKlhOysJRB1ZdBAcMGLIiQ2/VpQ2lC0Yd7SFKg9aviAQSVeaw==", + "version": "0.49.0", + "resolved": "https://registry.npmjs.org/msw/-/msw-0.49.0.tgz", + "integrity": "sha512-xX5RMSMjN58j8G/V26Uaf5LP464VltuWyd66TQimLueVYfG47RKydGsd4JW165Jb/gjoaQxh5Tdvv31wdZAOlA==", "dev": true, "requires": { "@mswjs/cookies": "^0.2.2", @@ -45114,9 +45114,9 @@ "dev": true }, "prettier": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.7.1.tgz", - "integrity": "sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g==", + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.0.tgz", + "integrity": "sha512-9Lmg8hTFZKG0Asr/kW9Bp8tJjRVluO8EJQVfY2T7FMw9T5jy4I/Uvx0Rca/XWf50QQ1/SS48+6IJWnrb+2yemA==", "dev": true }, "pretty-error": { @@ -49291,9 +49291,9 @@ } }, "vite-tsconfig-paths": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/vite-tsconfig-paths/-/vite-tsconfig-paths-3.5.2.tgz", - "integrity": "sha512-xJMgHA2oJ28QCG2f+hXrcqzo7IttrSRK4A//Tp94CfuX5eetOx33qiwXHUdi3FwkHP2ocpxHuvE45Ix67gwEmQ==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/vite-tsconfig-paths/-/vite-tsconfig-paths-3.6.0.tgz", + "integrity": "sha512-UfsPYonxLqPD633X8cWcPFVuYzx/CMNHAjZTasYwX69sXpa4gNmQkR0XCjj82h7zhLGdTWagMjC1qfb9S+zv0A==", "dev": true, "requires": { "debug": "^4.1.1", diff --git a/src/Umbraco.Web.UI.Client/package.json b/src/Umbraco.Web.UI.Client/package.json index 7daa712796..d90ecfca1a 100644 --- a/src/Umbraco.Web.UI.Client/package.json +++ b/src/Umbraco.Web.UI.Client/package.json @@ -3,6 +3,16 @@ "license": "MIT", "private": true, "version": "0.0.0", + "type": "module", + "main": "dist/main.js", + "exports": { + ".": "./dist/main.js" + }, + "types": "types/src/app.d.ts", + "files": [ + "dist", + "types" + ], "repository": { "url": "https://github.com/umbraco/Umbraco.CMS.Backoffice", "type": "git" @@ -18,7 +28,9 @@ "scripts": { "dev": "vite", "build": "tsc && vite build --mode staging", - "build:production": "tsc && vite build", + "build:for:static": "tsc && vite build", + "build:for:cms": "tsc && vite build -c vite.cms.config.ts", + "build:for:cms:watch": "npm run build:for:cms -- --watch", "preview": "vite preview --open", "test": "web-test-runner --coverage", "test:watch": "web-test-runner --watch", @@ -31,9 +43,9 @@ "generate:api-dev": "openapi --input http://localhost:9000/umbraco/swagger/v1/swagger.json --output src/core/backend-api --postfix Resource --useOptions", "storybook": "npm run wc-analyze && start-storybook -p 6006", "build-storybook": "npm run wc-analyze && build-storybook", - "generate:icons": "node ./devops/icons/index.mjs", + "generate:icons": "node ./devops/icons/index.js", "wc-analyze": "wca **/*.element.ts --outFile custom-elements.json", - "new-extension": "plop --plopfile ./devops/plop/plop.mjs", + "new-extension": "plop --plopfile ./devops/plop/plop.js", "compile": "tsc" }, "engines": { @@ -59,7 +71,7 @@ "@babel/core": "^7.20.2", "@mdx-js/react": "^2.1.5", "@open-wc/testing": "^3.1.7", - "@playwright/test": "^1.28.0", + "@playwright/test": "^1.28.1", "@storybook/addon-a11y": "^6.5.13", "@storybook/addon-actions": "^6.5.13", "@storybook/addon-essentials": "^6.5.13", @@ -71,14 +83,14 @@ "@types/lodash-es": "^4.17.6", "@types/mocha": "^10.0.0", "@types/uuid": "^8.3.4", - "@typescript-eslint/eslint-plugin": "^5.43.0", - "@typescript-eslint/parser": "^5.43.0", + "@typescript-eslint/eslint-plugin": "^5.44.0", + "@typescript-eslint/parser": "^5.44.0", "@web/dev-server-esbuild": "^0.3.3", "@web/dev-server-import-maps": "^0.0.7", "@web/test-runner": "^0.15.0", "@web/test-runner-playwright": "^0.9.0", "babel-loader": "^9.1.0", - "eslint": "^8.27.0", + "eslint": "^8.28.0", "eslint-config-prettier": "^8.5.0", "eslint-import-resolver-typescript": "^3.5.2", "eslint-plugin-import": "^2.26.0", @@ -87,17 +99,17 @@ "eslint-plugin-local-rules": "^1.3.2", "eslint-plugin-storybook": "^0.6.7", "lit-html": "^2.4.0", - "msw": "^0.48.3", + "msw": "^0.49.0", "msw-storybook-addon": "^1.6.3", "openapi-typescript-codegen": "^0.23.0", "playwright-msw": "^2.0.1", "plop": "^3.1.1", - "prettier": "2.7.1", + "prettier": "2.8.0", "tiny-glob": "^0.2.9", "typescript": "^4.9.3", "vite": "^3.2.4", "vite-plugin-static-copy": "^0.12.0", - "vite-tsconfig-paths": "^3.5.2", + "vite-tsconfig-paths": "^3.6.0", "web-component-analyzer": "^2.0.0-next.4" }, "msw": { diff --git a/src/Umbraco.Web.UI.Client/src/favicon.svg b/src/Umbraco.Web.UI.Client/public/favicon.svg similarity index 100% rename from src/Umbraco.Web.UI.Client/src/favicon.svg rename to src/Umbraco.Web.UI.Client/public/favicon.svg diff --git a/src/Umbraco.Web.UI.Client/public/mockServiceWorker.js b/src/Umbraco.Web.UI.Client/public/mockServiceWorker.js index 6269fd6f2a..db9d72c06e 100644 --- a/src/Umbraco.Web.UI.Client/public/mockServiceWorker.js +++ b/src/Umbraco.Web.UI.Client/public/mockServiceWorker.js @@ -2,7 +2,7 @@ /* tslint:disable */ /** - * Mock Service Worker (0.48.3). + * Mock Service Worker (0.49.0). * @see https://github.com/mswjs/msw * - Please do NOT modify this file. * - Please do NOT serve this file on production. diff --git a/src/Umbraco.Web.UI.Client/src/app.ts b/src/Umbraco.Web.UI.Client/src/app.ts index a01f109232..e2938b39be 100644 --- a/src/Umbraco.Web.UI.Client/src/app.ts +++ b/src/Umbraco.Web.UI.Client/src/app.ts @@ -4,13 +4,14 @@ import '@umbraco-ui/uui-modal-container'; import '@umbraco-ui/uui-modal-dialog'; import '@umbraco-ui/uui-modal-sidebar'; import 'router-slot'; +import 'element-internals-polyfill'; // TODO: remove these imports when they are part of UUI import type { Guard, IRoute } from 'router-slot/model'; import { UUIIconRegistryEssential } from '@umbraco-ui/uui'; import { css, html, LitElement } from 'lit'; -import { customElement, state } from 'lit/decorators.js'; +import {customElement, property, state} from 'lit/decorators.js'; import { OpenAPI, RuntimeLevel, ServerResource } from '@umbraco-cms/backend-api'; import { UmbContextProviderMixin } from '@umbraco-cms/context-api'; @@ -30,6 +31,9 @@ export class UmbApp extends UmbContextProviderMixin(LitElement) { } `; + @property({ type: String }) + private umbracoUrl?: string; + @state() private _routes: IRoute[] = [ { @@ -64,9 +68,11 @@ export class UmbApp extends UmbContextProviderMixin(LitElement) { async connectedCallback() { super.connectedCallback(); - OpenAPI.BASE = import.meta.env.VITE_UMBRACO_USE_MSW === 'on' ? '' : import.meta.env.VITE_UMBRACO_API_URL; + OpenAPI.BASE = import.meta.env.VITE_UMBRACO_USE_MSW === 'on' ? '' : this.umbracoUrl ?? import.meta.env.VITE_UMBRACO_API_URL ?? ''; OpenAPI.WITH_CREDENTIALS = true; + this.provideContext('UMBRACOBASE', OpenAPI.BASE); + await this._setInitStatus(); await this._registerExtensionManifestsFromServer(); this._redirect(); @@ -112,7 +118,8 @@ export class UmbApp extends UmbContextProviderMixin(LitElement) { } private _isAuthorized(): boolean { - return sessionStorage.getItem('is-authenticated') === 'true'; + return true; // TODO: Return true for now, until new login page is up and running + //return sessionStorage.getItem('is-authenticated') === 'true'; } private _isAuthorizedGuard(redirectTo?: string): Guard { @@ -121,13 +128,14 @@ export class UmbApp extends UmbContextProviderMixin(LitElement) { return true; } - let returnPath = '/login'; + let returnPath = `${OpenAPI.BASE}/umbraco/login`; if (redirectTo) { returnPath += `?redirectTo=${redirectTo}`; } - history.replaceState(null, '', returnPath); + // Redirect user completely to login page + location.href = returnPath; return false; }; } diff --git a/src/Umbraco.Web.UI.Client/src/auth/auth-layout.element.ts b/src/Umbraco.Web.UI.Client/src/auth/auth-layout.element.ts index fb36ac0327..068b36878b 100644 --- a/src/Umbraco.Web.UI.Client/src/auth/auth-layout.element.ts +++ b/src/Umbraco.Web.UI.Client/src/auth/auth-layout.element.ts @@ -11,7 +11,7 @@ export class UmbAuthLayout extends LitElement { background-position: 50%; background-repeat: no-repeat; background-size: cover; - background-image: url('/login.jpeg'); + background-image: url('login.jpeg'); width: 100vw; height: 100vh; } diff --git a/src/Umbraco.Web.UI.Client/src/auth/auth.ts b/src/Umbraco.Web.UI.Client/src/auth/auth.ts new file mode 100644 index 0000000000..f1965e558e --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/auth/auth.ts @@ -0,0 +1,4 @@ +export default function() { + sessionStorage.setItem('is-authenticated', 'true'); + history.replaceState(null, '', 'section'); +} diff --git a/src/Umbraco.Web.UI.Client/src/auth/login/login.element.ts b/src/Umbraco.Web.UI.Client/src/auth/login/login.element.ts index ba7d86d724..c2549c83c3 100644 --- a/src/Umbraco.Web.UI.Client/src/auth/login/login.element.ts +++ b/src/Umbraco.Web.UI.Client/src/auth/login/login.element.ts @@ -47,7 +47,7 @@ export default class UmbLogin extends LitElement { this._loggingIn = false; let { redirectTo } = query(); if (!redirectTo) { - redirectTo = '/section'; + redirectTo = 'section'; } sessionStorage.setItem('is-authenticated', 'true'); history.pushState(null, '', redirectTo); diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/components/backoffice-header-sections.element.ts b/src/Umbraco.Web.UI.Client/src/backoffice/components/backoffice-header-sections.element.ts index 13e781174b..18ed08afdf 100644 --- a/src/Umbraco.Web.UI.Client/src/backoffice/components/backoffice-header-sections.element.ts +++ b/src/Umbraco.Web.UI.Client/src/backoffice/components/backoffice-header-sections.element.ts @@ -112,7 +112,7 @@ export class UmbBackofficeHeaderSections extends UmbContextProviderMixin( ` diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/components/backoffice-header.element.ts b/src/Umbraco.Web.UI.Client/src/backoffice/components/backoffice-header.element.ts index 2220edd6bd..5b038fa184 100644 --- a/src/Umbraco.Web.UI.Client/src/backoffice/components/backoffice-header.element.ts +++ b/src/Umbraco.Web.UI.Client/src/backoffice/components/backoffice-header.element.ts @@ -43,7 +43,7 @@ export class UmbBackofficeHeader extends LitElement { return html`
diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/dashboards/examine-management/dashboard-examine-management.element.ts b/src/Umbraco.Web.UI.Client/src/backoffice/dashboards/examine-management/dashboard-examine-management.element.ts index f3b68b97a1..484d9418be 100644 --- a/src/Umbraco.Web.UI.Client/src/backoffice/dashboards/examine-management/dashboard-examine-management.element.ts +++ b/src/Umbraco.Web.UI.Client/src/backoffice/dashboards/examine-management/dashboard-examine-management.element.ts @@ -53,12 +53,12 @@ export class UmbDashboardExamineManagementElement extends UmbContextConsumerMixi } private get backbutton(): boolean { - return this._currentPath != '/section/settings/dashboard/examine-management/' || !this._currentPath ? true : false; + return !(this._currentPath?.endsWith('examine-management/')); } render() { return html` ${this.backbutton - ? html` ← Back to overview ` + ? html` ← Back to overview ` : nothing} `; } diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/dashboards/examine-management/examine-extension.ts b/src/Umbraco.Web.UI.Client/src/backoffice/dashboards/examine-management/examine-extension.ts deleted file mode 100644 index d263fd5492..0000000000 --- a/src/Umbraco.Web.UI.Client/src/backoffice/dashboards/examine-management/examine-extension.ts +++ /dev/null @@ -1,38 +0,0 @@ -export interface SearcherModel { - name: string; - providerProperties: unknown; //TODO -} - -export interface IndexModel { - name: string; - canRebuild: boolean; - healthStatus: string; - isHealthy: boolean; - providerProperties: ProviderPropertiesModel; -} - -export interface ProviderPropertiesModel { - CommitCount: number; - DefaultAnalyzer: string; - DocumentCount: number; - FieldCount: number; - LuceneDirectory: string; - LuceneIndexFolder: string; - DirectoryFactory: string; - EnableDefaultEventHandler: boolean; - PublishedValuesOnly: boolean; - SupportProtectedContent: boolean; - IncludeFields?: string[]; -} - -export interface FieldViewModel { - name: string; - values: string[]; -} - -export interface SearchResultsModel { - id: number; - name: string; - fields: FieldViewModel[]; - score: number; -} diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/dashboards/examine-management/views/modal-views/fields-viewer.element.ts b/src/Umbraco.Web.UI.Client/src/backoffice/dashboards/examine-management/views/modal-views/fields-viewer.element.ts index 8fe77cde9b..f6a1cd6af3 100644 --- a/src/Umbraco.Web.UI.Client/src/backoffice/dashboards/examine-management/views/modal-views/fields-viewer.element.ts +++ b/src/Umbraco.Web.UI.Client/src/backoffice/dashboards/examine-management/views/modal-views/fields-viewer.element.ts @@ -1,11 +1,11 @@ -import { html, css } from 'lit'; +import { html, css, nothing } from 'lit'; import { UUITextStyles } from '@umbraco-ui/uui-css/lib'; import { customElement } from 'lit/decorators.js'; import { UmbModalLayoutElement } from '@umbraco-cms/services'; -import { SearchResultsModel } from 'src/backoffice/dashboards/examine-management/examine-extension'; +import { SearchResult } from '@umbraco-cms/backend-api'; @customElement('umb-modal-layout-fields-viewer') -export class UmbModalLayoutFieldsViewerElement extends UmbModalLayoutElement { +export class UmbModalLayoutFieldsViewerElement extends UmbModalLayoutElement { static styles = [ UUITextStyles, css` @@ -47,31 +47,31 @@ export class UmbModalLayoutFieldsViewerElement extends UmbModalLayoutElement - - - - - Field - Value - - ${Object.values(this.data.fields).map((cell) => { - return html` - ${cell.name} - ${cell.values.join(', ')} - `; - })} - - - -
- Close -
- - `; - } else return html``; + if (!this.data) return nothing; + + return html` + + + + + + Field + Value + + ${Object.values(this.data.fields ?? []).map((cell) => { + return html` + ${cell.name} + ${cell.values?.join(', ')} + `; + })} + + + +
+ Close +
+
+ `; } } diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/dashboards/examine-management/views/section-view-examine-indexers.ts b/src/Umbraco.Web.UI.Client/src/backoffice/dashboards/examine-management/views/section-view-examine-indexers.ts index 188c5f0a73..e7142bfbdf 100644 --- a/src/Umbraco.Web.UI.Client/src/backoffice/dashboards/examine-management/views/section-view-examine-indexers.ts +++ b/src/Umbraco.Web.UI.Client/src/backoffice/dashboards/examine-management/views/section-view-examine-indexers.ts @@ -1,15 +1,15 @@ -import { UUITextStyles } from '@umbraco-ui/uui-css/lib'; -import { css, html, LitElement } from 'lit'; -import { customElement, state, property } from 'lit/decorators.js'; +import {UUITextStyles} from '@umbraco-ui/uui-css/lib'; +import {css, html, LitElement, nothing} from 'lit'; +import {customElement, property, state} from 'lit/decorators.js'; -import { UUIButtonState } from '@umbraco-ui/uui-button'; +import {UUIButtonState} from '@umbraco-ui/uui-button'; -import { UmbModalService, UmbNotificationService, UmbNotificationDefaultData } from '@umbraco-cms/services'; +import {UmbModalService, UmbNotificationDefaultData, UmbNotificationService} from '@umbraco-cms/services'; -import { UmbContextConsumerMixin } from '@umbraco-cms/context-api'; +import {UmbContextConsumerMixin} from '@umbraco-cms/context-api'; import './section-view-examine-searchers'; -import { ApiError, ProblemDetails, Index, SearchResource } from '@umbraco-cms/backend-api'; +import {ApiError, Index, IndexerResource, ProblemDetails} from '@umbraco-cms/backend-api'; @customElement('umb-dashboard-examine-index') export class UmbDashboardExamineIndexElement extends UmbContextConsumerMixin(LitElement) { @@ -86,24 +86,14 @@ export class UmbDashboardExamineIndexElement extends UmbContextConsumerMixin(Lit private _buttonState?: UUIButtonState = undefined; @state() - private _indexData!: Index; + private _indexData?: Index; + + @state() + private _loading = true; private _notificationService?: UmbNotificationService; private _modalService?: UmbModalService; - private async _getIndexData() { - try { - const index = await SearchResource.getSearchIndexByIndexName({ indexName: this.indexName }); - this._indexData = index; - } catch (e) { - if (e instanceof ApiError) { - const error = e as ProblemDetails; - const data: UmbNotificationDefaultData = { message: error.message ?? 'Could not fetch index' }; - this._notificationService?.peek('danger', { data }); - } - } - } - constructor() { super(); @@ -113,9 +103,25 @@ export class UmbDashboardExamineIndexElement extends UmbContextConsumerMixin(Lit }); } - connectedCallback(): void { + private async _getIndexData() { + try { + this._indexData = await IndexerResource.getIndexerByIndexName({indexName: this.indexName}); + if (!this._indexData?.isHealthy) { + this._buttonState = 'waiting'; + } + } catch (e) { + if (e instanceof ApiError) { + const error = e as ProblemDetails; + const data: UmbNotificationDefaultData = { message: error.message ?? 'Could not fetch index' }; + this._notificationService?.peek('danger', { data }); + } + } + this._loading = false; + } + + async connectedCallback() { super.connectedCallback(); - this._getIndexData(); + await this._getIndexData(); } private async _onRebuildHandler() { @@ -136,45 +142,56 @@ export class UmbDashboardExamineIndexElement extends UmbContextConsumerMixin(Lit } private async _rebuild() { this._buttonState = 'waiting'; - if (this._indexData.name) - try { - await SearchResource.postSearchIndexByIndexNameRebuild({ indexName: this._indexData.name }); - this._buttonState = 'success'; - } catch (e) { - this._buttonState = 'failed'; - if (e instanceof ApiError) { - const error = e as ProblemDetails; - const data: UmbNotificationDefaultData = { message: error.message ?? 'Rebuild error' }; - this._notificationService?.peek('danger', { data }); - } + try { + await IndexerResource.postIndexerByIndexNameRebuild({ indexName: this.indexName }); + this._buttonState = 'success'; + await this._getIndexData(); + } catch (e) { + this._buttonState = 'failed'; + if (e instanceof ApiError) { + const error = e as ProblemDetails; + const data: UmbNotificationDefaultData = { message: error.message ?? 'Rebuild error' }; + this._notificationService?.peek('danger', { data }); } + } } render() { - if (this._indexData) { - return html` -

- Health Status
- The health status of the ${this._indexData.name} and if it can be read -

-
- - - - - ${this._indexData.healthStatus} -
-
- - ${this.renderPropertyList()} ${this.renderTools()}`; - } else return html``; + if (!this._indexData || this._loading) return html` + `; + + return html` + +

+ Health Status
+ The health status of the ${this.indexName} and if it can be read +

+
+ + + + + ${this._indexData.healthStatus} +
+
+ ${this.renderIndexSearch()} + ${this.renderPropertyList()} + ${this.renderTools()} + `; + } + + private renderIndexSearch() { + if (!this._indexData || !this._indexData.isHealthy) return nothing; + return html``; } private renderPropertyList() { + if (!this._indexData) return nothing; + return html` -

Lists the properties of the ${this._indexData.name}

+

Lists the properties of the ${this.indexName}

documentCount @@ -187,7 +204,7 @@ export class UmbDashboardExamineIndexElement extends UmbContextConsumerMixin(Lit ${this._indexData.providerProperties ? Object.entries(this._indexData.providerProperties).map((entry) => { return html` - ${entry[0]} + ${entry[0]} ${entry[1]} `; }) @@ -198,13 +215,13 @@ export class UmbDashboardExamineIndexElement extends UmbContextConsumerMixin(Lit private renderTools() { return html` -

Tools to manage the ${this._indexData.name}

+

Tools to manage the ${this.indexName}

Rebuild diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/dashboards/examine-management/views/section-view-examine-overview.ts b/src/Umbraco.Web.UI.Client/src/backoffice/dashboards/examine-management/views/section-view-examine-overview.ts index d98024df55..c5fb4cde18 100644 --- a/src/Umbraco.Web.UI.Client/src/backoffice/dashboards/examine-management/views/section-view-examine-overview.ts +++ b/src/Umbraco.Web.UI.Client/src/backoffice/dashboards/examine-management/views/section-view-examine-overview.ts @@ -1,11 +1,11 @@ import { UUITextStyles } from '@umbraco-ui/uui-css/lib'; -import { css, html, LitElement } from 'lit'; +import { css, html, LitElement, nothing } from 'lit'; import { customElement, state } from 'lit/decorators.js'; -import { UmbModalService, UmbNotificationService, UmbNotificationDefaultData } from '@umbraco-cms/services'; +import { UmbNotificationService, UmbNotificationDefaultData } from '@umbraco-cms/services'; import { UmbContextConsumerMixin } from '@umbraco-cms/context-api'; -import { ApiError, ProblemDetails, Searcher, Index, SearchResource } from '@umbraco-cms/backend-api'; +import { ApiError, ProblemDetails, Searcher, Index, IndexerResource, SearcherResource } from '@umbraco-cms/backend-api'; @customElement('umb-dashboard-examine-overview') export class UmbDashboardExamineOverviewElement extends UmbContextConsumerMixin(LitElement) { @@ -58,12 +58,32 @@ export class UmbDashboardExamineOverviewElement extends UmbContextConsumerMixin( @state() private _searchers?: Searcher[]; + @state() + private _loadingIndexers = false; + + @state() + private _loadingSearchers = false; + private _notificationService?: UmbNotificationService; - private _modalService?: UmbModalService; + + constructor() { + super(); + + this.consumeAllContexts(['umbNotificationService'], (instances) => { + this._notificationService = instances['umbNotificationService']; + }); + } + + connectedCallback() { + super.connectedCallback(); + this._getIndexers(); + this._getSearchers(); + } private async _getIndexers() { + this._loadingIndexers = true; try { - const indexers = await SearchResource.getSearchIndex({ take: 9999, skip: 0 }); + const indexers = await IndexerResource.getIndexer({ take: 9999, skip: 0 }); this._indexers = indexers.items; } catch (e) { if (e instanceof ApiError) { @@ -72,11 +92,13 @@ export class UmbDashboardExamineOverviewElement extends UmbContextConsumerMixin( this._notificationService?.peek('danger', { data }); } } + this._loadingIndexers = false; } private async _getSearchers() { + this._loadingSearchers = true; try { - const searchers = await SearchResource.getSearchSearcher({ take: 9999, skip: 0 }); + const searchers = await SearcherResource.getSearcher({ take: 9999, skip: 0 }); this._searchers = searchers.items; } catch (e) { if (e instanceof ApiError) { @@ -85,17 +107,7 @@ export class UmbDashboardExamineOverviewElement extends UmbContextConsumerMixin( this._notificationService?.peek('danger', { data }); } } - } - - constructor() { - super(); - this._getIndexers(); - this._getSearchers(); - - this.consumeAllContexts(['umbNotificationService', 'umbModalService'], (instances) => { - this._notificationService = instances['umbNotificationService']; - this._modalService = instances['umbModalService']; - }); + this._loadingSearchers = false; } render() { @@ -118,7 +130,8 @@ export class UmbDashboardExamineOverviewElement extends UmbContextConsumerMixin( } private renderIndexersList() { - if (!this._indexers) return; + if (this._loadingIndexers) return html``; + if (!this._indexers) return nothing; return html` ${this._indexers.map((index) => { return html` @@ -142,7 +155,8 @@ export class UmbDashboardExamineOverviewElement extends UmbContextConsumerMixin( } private renderSearchersList() { - if (!this._searchers) return html`No searchers were found`; + if (this._loadingSearchers) return html``; + if (!this._searchers) return nothing; return html` ${this._searchers.map((searcher) => { diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/dashboards/examine-management/views/section-view-examine-searchers.ts b/src/Umbraco.Web.UI.Client/src/backoffice/dashboards/examine-management/views/section-view-examine-searchers.ts index a5ec5bcf44..d9b1a1b13e 100644 --- a/src/Umbraco.Web.UI.Client/src/backoffice/dashboards/examine-management/views/section-view-examine-searchers.ts +++ b/src/Umbraco.Web.UI.Client/src/backoffice/dashboards/examine-management/views/section-view-examine-searchers.ts @@ -1,12 +1,12 @@ import { UUITextStyles } from '@umbraco-ui/uui-css/lib'; -import { css, html, LitElement } from 'lit'; +import { css, html, LitElement, nothing } from 'lit'; import { customElement, state, query, property } from 'lit/decorators.js'; import { UmbModalService, UmbNotificationService, UmbNotificationDefaultData } from '@umbraco-cms/services'; import { UmbContextConsumerMixin } from '@umbraco-cms/context-api'; -import { ApiError, ProblemDetails, SearchResult, SearchResource, Field } from '@umbraco-cms/backend-api'; +import { ApiError, ProblemDetails, SearchResult, SearcherResource, Field } from '@umbraco-cms/backend-api'; import './modal-views/fields-viewer.element'; import './modal-views/fields-settings.element'; @@ -113,6 +113,9 @@ export class UmbDashboardExamineSearcherElement extends UmbContextConsumerMixin( @state() private _exposedFields?: ExposedSearchResultField[]; + @state() + private _searchLoading = false; + @query('#search-input') private _searchInput!: HTMLInputElement; @@ -135,11 +138,12 @@ export class UmbDashboardExamineSearcherElement extends UmbContextConsumerMixin( private async _onSearch() { if (!this._searchInput.value.length) return; + this._searchLoading = true; try { - const res = await SearchResource.getSearchSearcherBySearcherNameSearch({ + const res = await SearcherResource.getSearcherBySearcherNameQuery({ searcherName: this.searcherName, - query: this._searchInput.value, - take: 9999, + term: this._searchInput.value, + take: 100, skip: 0, }); this._searchResults = res.items; @@ -151,6 +155,7 @@ export class UmbDashboardExamineSearcherElement extends UmbContextConsumerMixin( this._notificationService?.peek('danger', { data }); } } + this._searchLoading = false; } private _updateFieldFilter() { @@ -204,59 +209,64 @@ export class UmbDashboardExamineSearcherElement extends UmbContextConsumerMixin( `; } + // Find the field named 'nodeName' and return its value if it exists in the fields array + private getSearchResultNodeName(searchResult: SearchResult): string { + const nodeNameField = searchResult.fields?.find((field) => field.name?.toUpperCase() === 'NODENAME'); + return nodeNameField?.values?.join(', ') ?? ''; + } + private renderSearchResults() { - if (this._searchResults?.length) { - return html`
- - - - Score - Id - Name - Fields - ${this.renderHeadCells()} - - ${this._searchResults?.map((rowData) => { - return html` - ${rowData.score} - ${rowData.id} - - - ${rowData.fields?.find((field) => { - if (field.name?.toUpperCase() === 'NODENAME') return field.values; - else return; - })?.values} - - - - - ${rowData.fields ? Object.keys(rowData.fields).length : ''} fields - - - ${rowData.fields ? this.renderBodyCells(rowData.fields) : ''} - `; - })} - - - -
`; + if (this._searchLoading) return html``; + if (!this._searchResults) return nothing; + if (!this._searchResults.length) { + return html`

No results found

`; } - return; + return html`
+ + + + Score + Id + Name + Fields + ${this.renderHeadCells()} + + ${this._searchResults?.map((rowData) => { + return html` + ${rowData.score} + ${rowData.id} + + + ${this.getSearchResultNodeName(rowData)} + + + + + ${rowData.fields ? Object.keys(rowData.fields).length : ''} fields + + + ${rowData.fields ? this.renderBodyCells(rowData.fields) : ''} + `; + })} + + + +
`; } renderHeadCells() { diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/dashboards/telemetry/dashboard-telemetry.element.ts b/src/Umbraco.Web.UI.Client/src/backoffice/dashboards/telemetry/dashboard-telemetry.element.ts index d9c7f30e58..544b2b1fa2 100644 --- a/src/Umbraco.Web.UI.Client/src/backoffice/dashboards/telemetry/dashboard-telemetry.element.ts +++ b/src/Umbraco.Web.UI.Client/src/backoffice/dashboards/telemetry/dashboard-telemetry.element.ts @@ -1,11 +1,10 @@ +import { UUIButtonState } from '@umbraco-ui/uui'; import { UUITextStyles } from '@umbraco-ui/uui-css/lib'; import { css, html, LitElement } from 'lit'; import { unsafeHTML } from 'lit/directives/unsafe-html.js'; import { customElement, state } from 'lit/decorators.js'; import { ApiError, ProblemDetails, Telemetry, TelemetryLevel, TelemetryResource } from '@umbraco-cms/backend-api'; -export type SettingOption = 'Minimal' | 'Basic' | 'Detailed'; - @customElement('umb-dashboard-telemetry') export class UmbDashboardTelemetryElement extends LitElement { static styles = [ @@ -26,18 +25,21 @@ export class UmbDashboardTelemetryElement extends LitElement { @state() private _errorMessage = ''; + @state() + private _buttonState: UUIButtonState | undefined = undefined; + constructor() { super(); } - connectedCallback(): void { + async connectedCallback() { super.connectedCallback(); - this._setup(); + await this._setup(); } private async _setup() { try { - const consentLevels = await TelemetryResource.getTelemetry({}); + const consentLevels = await TelemetryResource.getTelemetry({skip: 0, take: 3}); this._telemetryLevels = consentLevels.items ?? []; } catch (e) { if (e instanceof ApiError) { @@ -59,11 +61,14 @@ export class UmbDashboardTelemetryElement extends LitElement { private _handleSubmit = async (e: CustomEvent) => { e.stopPropagation(); + this._buttonState = 'waiting'; try { await TelemetryResource.postTelemetryLevel({ requestBody: { telemetryLevel: this._telemetryFormData }, }); + this._buttonState = 'success'; } catch (e) { + this._buttonState = 'failed'; if (e instanceof ApiError) { const error = e.body as ProblemDetails; if (e.status === 400) { @@ -75,10 +80,6 @@ export class UmbDashboardTelemetryElement extends LitElement { } }; - disconnectedCallback(): void { - super.disconnectedCallback(); - } - private _handleChange(e: InputEvent) { const target = e.target as HTMLInputElement; this._telemetryFormData = this._telemetryLevels[parseInt(target.value) - 1].telemetryLevel ?? TelemetryLevel.BASIC; @@ -145,7 +146,7 @@ export class UmbDashboardTelemetryElement extends LitElement { will be fully anonymized.

${this._renderSettingSlider()} - + Save
diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/editors/user/editor-user.element.ts b/src/Umbraco.Web.UI.Client/src/backoffice/editors/user/editor-user.element.ts index e6984408d8..449c23da74 100644 --- a/src/Umbraco.Web.UI.Client/src/backoffice/editors/user/editor-user.element.ts +++ b/src/Umbraco.Web.UI.Client/src/backoffice/editors/user/editor-user.element.ts @@ -180,7 +180,7 @@ export class UmbEditorUserElement extends UmbContextProviderMixin(UmbContextCons this._userStore.deleteUsers([this._user.key]); - history.pushState(null, '', '/section/users/view/users/overview'); + history.pushState(null, '', 'section/users/view/users/overview'); } private renderLeftColumn() { diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/sections/packages/views/created/section-view-packages-created.element.ts b/src/Umbraco.Web.UI.Client/src/backoffice/sections/packages/views/created/section-view-packages-created.element.ts index eb846fe01b..2972eb91cf 100644 --- a/src/Umbraco.Web.UI.Client/src/backoffice/sections/packages/views/created/section-view-packages-created.element.ts +++ b/src/Umbraco.Web.UI.Client/src/backoffice/sections/packages/views/created/section-view-packages-created.element.ts @@ -22,7 +22,7 @@ export class UmbSectionViewPackagesCreatedElement extends LitElement { }, { path: '**', - redirectTo: '/section/packages/view/created/overview', //TODO: this should be dynamic + redirectTo: 'section/packages/view/created/overview', //TODO: this should be dynamic }, ]; diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/sections/packages/views/installed/section-view-packages-installed.element.ts b/src/Umbraco.Web.UI.Client/src/backoffice/sections/packages/views/installed/section-view-packages-installed.element.ts index 42a9355f04..2123f9f3d3 100644 --- a/src/Umbraco.Web.UI.Client/src/backoffice/sections/packages/views/installed/section-view-packages-installed.element.ts +++ b/src/Umbraco.Web.UI.Client/src/backoffice/sections/packages/views/installed/section-view-packages-installed.element.ts @@ -22,7 +22,7 @@ export class UmbSectionViewPackagesInstalledElement extends LitElement { }, { path: '**', - redirectTo: '/section/packages/view/installed/overview', //TODO: this should be dynamic + redirectTo: 'section/packages/view/installed/overview', //TODO: this should be dynamic }, ]; diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/sections/shared/section-dashboards/section-dashboards.element.ts b/src/Umbraco.Web.UI.Client/src/backoffice/sections/shared/section-dashboards/section-dashboards.element.ts index 48f4279f48..085d029b4c 100644 --- a/src/Umbraco.Web.UI.Client/src/backoffice/sections/shared/section-dashboards/section-dashboards.element.ts +++ b/src/Umbraco.Web.UI.Client/src/backoffice/sections/shared/section-dashboards/section-dashboards.element.ts @@ -122,7 +122,7 @@ export class UmbSectionDashboardsElement extends UmbContextConsumerMixin(UmbObse ${this._dashboards.map( (dashboard) => html` ` diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/sections/shared/section-sidebar/section-sidebar.element.ts b/src/Umbraco.Web.UI.Client/src/backoffice/sections/shared/section-sidebar/section-sidebar.element.ts index 4d019514ad..04e7fee6e2 100644 --- a/src/Umbraco.Web.UI.Client/src/backoffice/sections/shared/section-sidebar/section-sidebar.element.ts +++ b/src/Umbraco.Web.UI.Client/src/backoffice/sections/shared/section-sidebar/section-sidebar.element.ts @@ -59,7 +59,7 @@ export class UmbSectionSidebarElement extends UmbContextConsumerMixin(UmbObserve return html` - +

${this._sectionLabel}

diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/sections/users/views/user-groups/user-group-table-name-column-layout.element.ts b/src/Umbraco.Web.UI.Client/src/backoffice/sections/users/views/user-groups/user-group-table-name-column-layout.element.ts index 43ba9734eb..18cfa11c99 100644 --- a/src/Umbraco.Web.UI.Client/src/backoffice/sections/users/views/user-groups/user-group-table-name-column-layout.element.ts +++ b/src/Umbraco.Web.UI.Client/src/backoffice/sections/users/views/user-groups/user-group-table-name-column-layout.element.ts @@ -11,7 +11,7 @@ export class UmbUserGroupTableNameColumnLayoutElement extends LitElement { value!: any; render() { - return html` + return html` ${this.value.name} `; } diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/sections/users/views/users/editor-view-users-invite.element.ts b/src/Umbraco.Web.UI.Client/src/backoffice/sections/users/views/users/editor-view-users-invite.element.ts index d3a1b42720..9dd800eb55 100644 --- a/src/Umbraco.Web.UI.Client/src/backoffice/sections/users/views/users/editor-view-users-invite.element.ts +++ b/src/Umbraco.Web.UI.Client/src/backoffice/sections/users/views/users/editor-view-users-invite.element.ts @@ -100,7 +100,7 @@ export class UmbEditorViewUsersInviteElement extends UmbContextConsumerMixin(Umb if (!this._invitedUser) return; this._closeModal(); - history.pushState(null, '', '/section/users/view/users/user/' + this._invitedUser?.key); //TODO: URL Should be dynamic + history.pushState(null, '', 'section/users/view/users/user/' + this._invitedUser?.key); //TODO: URL Should be dynamic } private _renderForm() { diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/sections/users/views/users/editor-view-users-overview.element.ts b/src/Umbraco.Web.UI.Client/src/backoffice/sections/users/views/users/editor-view-users-overview.element.ts index c055488ea9..dced0214a9 100644 --- a/src/Umbraco.Web.UI.Client/src/backoffice/sections/users/views/users/editor-view-users-overview.element.ts +++ b/src/Umbraco.Web.UI.Client/src/backoffice/sections/users/views/users/editor-view-users-overview.element.ts @@ -92,7 +92,7 @@ export class UmbEditorViewUsersOverviewElement extends UmbContextConsumerMixin(L }, { path: '**', - redirectTo: '/section/users/view/users/overview/grid', //TODO: this should be dynamic + redirectTo: 'section/users/view/users/overview/grid', //TODO: this should be dynamic }, ]; @@ -127,8 +127,8 @@ export class UmbEditorViewUsersOverviewElement extends UmbContextConsumerMixin(L const isList = window.location.pathname.split('/').pop() === 'list'; isList - ? history.pushState(null, '', '/section/users/view/users/overview/grid') - : history.pushState(null, '', '/section/users/view/users/overview/list'); + ? history.pushState(null, '', 'section/users/view/users/overview/grid') + : history.pushState(null, '', 'section/users/view/users/overview/list'); } private _renderSelection() { diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/sections/users/views/users/list-view-layouts/grid/editor-view-users-grid.element.ts b/src/Umbraco.Web.UI.Client/src/backoffice/sections/users/views/users/list-view-layouts/grid/editor-view-users-grid.element.ts index 5193831ec3..436d66fb7d 100644 --- a/src/Umbraco.Web.UI.Client/src/backoffice/sections/users/views/users/list-view-layouts/grid/editor-view-users-grid.element.ts +++ b/src/Umbraco.Web.UI.Client/src/backoffice/sections/users/views/users/list-view-layouts/grid/editor-view-users-grid.element.ts @@ -92,7 +92,7 @@ export class UmbEditorViewUsersGridElement extends UmbContextConsumerMixin(LitEl //TODO How should we handle url stuff? private _handleOpenCard(key: string) { - history.pushState(null, '', '/section/users/view/users/user/' + key); //TODO Change to a tag with href and make dynamic + history.pushState(null, '', 'section/users/view/users/user/' + key); //TODO Change to a tag with href and make dynamic } private _selectRowHandler(user: UserEntity) { diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/sections/users/views/users/list-view-layouts/table/column-layouts/name/user-table-name-column-layout.element.ts b/src/Umbraco.Web.UI.Client/src/backoffice/sections/users/views/users/list-view-layouts/table/column-layouts/name/user-table-name-column-layout.element.ts index ea00e62083..83557ac67a 100644 --- a/src/Umbraco.Web.UI.Client/src/backoffice/sections/users/views/users/list-view-layouts/table/column-layouts/name/user-table-name-column-layout.element.ts +++ b/src/Umbraco.Web.UI.Client/src/backoffice/sections/users/views/users/list-view-layouts/table/column-layouts/name/user-table-name-column-layout.element.ts @@ -16,7 +16,7 @@ export class UmbUserTableNameColumnLayoutElement extends LitElement { render() { return html`
- ${this.value.name} + ${this.value.name}
`; } } diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/sections/users/views/users/section-view-users.element.ts b/src/Umbraco.Web.UI.Client/src/backoffice/sections/users/views/users/section-view-users.element.ts index b00ed10371..80c31345a2 100644 --- a/src/Umbraco.Web.UI.Client/src/backoffice/sections/users/views/users/section-view-users.element.ts +++ b/src/Umbraco.Web.UI.Client/src/backoffice/sections/users/views/users/section-view-users.element.ts @@ -39,7 +39,7 @@ export class UmbSectionViewUsersElement extends UmbContextProviderMixin(LitEleme }, { path: '**', - redirectTo: '/section/users/view/users/overview', //TODO: this should be dynamic + redirectTo: 'section/users/view/users/overview', //TODO: this should be dynamic }, ]; diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/trees/data-types/actions/create/action-data-type-create.element.ts b/src/Umbraco.Web.UI.Client/src/backoffice/trees/data-types/actions/create/action-data-type-create.element.ts index 8d5fd6c344..5a14e1d93a 100644 --- a/src/Umbraco.Web.UI.Client/src/backoffice/trees/data-types/actions/create/action-data-type-create.element.ts +++ b/src/Umbraco.Web.UI.Client/src/backoffice/trees/data-types/actions/create/action-data-type-create.element.ts @@ -9,7 +9,7 @@ export default class UmbTreeActionDataTypeCreateElement extends UmbTreeItemActio // TODO: how do we handle the href? private _constructUrl() { - return `/section/settings/${this._activeTreeItem?.type}/${this._activeTreeItem?.key}/view/edit?create=true`; + return `section/settings/${this._activeTreeItem?.type}/${this._activeTreeItem?.key}/view/edit?create=true`; } // TODO: change to href. This is a temporary solution to get the link to work. For some reason query params gets removed when using href. diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/trees/shared/tree-item.element.ts b/src/Umbraco.Web.UI.Client/src/backoffice/trees/shared/tree-item.element.ts index 81a55876eb..fe61f40d8a 100644 --- a/src/Umbraco.Web.UI.Client/src/backoffice/trees/shared/tree-item.element.ts +++ b/src/Umbraco.Web.UI.Client/src/backoffice/trees/shared/tree-item.element.ts @@ -113,7 +113,7 @@ export class UmbTreeItem extends UmbContextConsumerMixin(UmbObserverMixin(LitEle // TODO: how do we handle this? private _constructPath(sectionPathname: string, type: string, key: string) { - return `/section/${sectionPathname}/${type}/${key}`; + return `section/${sectionPathname}/${type}/${key}`; } private _onShowChildren(event: UUIMenuItemEvent) { diff --git a/src/Umbraco.Web.UI.Client/src/core/backend-api/index.ts b/src/Umbraco.Web.UI.Client/src/core/backend-api/index.ts index 4343829655..a08151d050 100644 --- a/src/Umbraco.Web.UI.Client/src/core/backend-api/index.ts +++ b/src/Umbraco.Web.UI.Client/src/core/backend-api/index.ts @@ -120,6 +120,7 @@ export { DocumentResource } from './services/DocumentResource'; export { DocumentBlueprintResource } from './services/DocumentBlueprintResource'; export { DocumentTypeResource } from './services/DocumentTypeResource'; export { HelpResource } from './services/HelpResource'; +export { IndexerResource } from './services/IndexerResource'; export { InstallResource } from './services/InstallResource'; export { LanguageResource } from './services/LanguageResource'; export { MediaResource } from './services/MediaResource'; @@ -133,7 +134,7 @@ export { PublishedCacheResource } from './services/PublishedCacheResource'; export { RelationResource } from './services/RelationResource'; export { RelationTypeResource } from './services/RelationTypeResource'; export { ScriptResource } from './services/ScriptResource'; -export { SearchResource } from './services/SearchResource'; +export { SearcherResource } from './services/SearcherResource'; export { SecurityResource } from './services/SecurityResource'; export { ServerResource } from './services/ServerResource'; export { StaticFileResource } from './services/StaticFileResource'; diff --git a/src/Umbraco.Web.UI.Client/src/core/backend-api/services/IndexerResource.ts b/src/Umbraco.Web.UI.Client/src/core/backend-api/services/IndexerResource.ts new file mode 100644 index 0000000000..7ab1cb9d53 --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/core/backend-api/services/IndexerResource.ts @@ -0,0 +1,77 @@ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { Index } from '../models/Index'; +import type { OkResult } from '../models/OkResult'; +import type { PagedIndex } from '../models/PagedIndex'; + +import type { CancelablePromise } from '../core/CancelablePromise'; +import { OpenAPI } from '../core/OpenAPI'; +import { request as __request } from '../core/request'; + +export class IndexerResource { + + /** + * @returns PagedIndex Success + * @throws ApiError + */ + public static getIndexer({ + skip, + take, + }: { + skip?: number, + take?: number, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'GET', + url: '/umbraco/management/api/v1/indexer', + query: { + 'skip': skip, + 'take': take, + }, + }); + } + + /** + * @returns Index Success + * @throws ApiError + */ + public static getIndexerByIndexName({ + indexName, + }: { + indexName: string, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'GET', + url: '/umbraco/management/api/v1/indexer/{indexName}', + path: { + 'indexName': indexName, + }, + errors: { + 400: `Bad Request`, + }, + }); + } + + /** + * @returns OkResult Success + * @throws ApiError + */ + public static postIndexerByIndexNameRebuild({ + indexName, + }: { + indexName: string, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/umbraco/management/api/v1/indexer/{indexName}/rebuild', + path: { + 'indexName': indexName, + }, + errors: { + 400: `Bad Request`, + }, + }); + } + +} diff --git a/src/Umbraco.Web.UI.Client/src/core/backend-api/services/SearchResource.ts b/src/Umbraco.Web.UI.Client/src/core/backend-api/services/SearchResource.ts deleted file mode 100644 index 0619d367b9..0000000000 --- a/src/Umbraco.Web.UI.Client/src/core/backend-api/services/SearchResource.ts +++ /dev/null @@ -1,132 +0,0 @@ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ -import type { Index } from '../models/Index'; -import type { OkResult } from '../models/OkResult'; -import type { PagedIndex } from '../models/PagedIndex'; -import type { PagedSearcher } from '../models/PagedSearcher'; -import type { PagedSearchResult } from '../models/PagedSearchResult'; - -import type { CancelablePromise } from '../core/CancelablePromise'; -import { OpenAPI } from '../core/OpenAPI'; -import { request as __request } from '../core/request'; - -export class SearchResource { - - /** - * @returns PagedIndex Success - * @throws ApiError - */ - public static getSearchIndex({ - skip, - take, - }: { - skip?: number, - take?: number, - }): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/search/index', - query: { - 'skip': skip, - 'take': take, - }, - }); - } - - /** - * @returns Index Success - * @throws ApiError - */ - public static getSearchIndexByIndexName({ - indexName, - }: { - indexName: string, - }): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/search/index/{indexName}', - path: { - 'indexName': indexName, - }, - errors: { - 400: `Bad Request`, - }, - }); - } - - /** - * @returns OkResult Success - * @throws ApiError - */ - public static postSearchIndexByIndexNameRebuild({ - indexName, - }: { - indexName: string, - }): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/umbraco/management/api/v1/search/index/{indexName}/rebuild', - path: { - 'indexName': indexName, - }, - errors: { - 400: `Bad Request`, - }, - }); - } - - /** - * @returns PagedSearcher Success - * @throws ApiError - */ - public static getSearchSearcher({ - skip, - take, - }: { - skip?: number, - take?: number, - }): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/search/searcher', - query: { - 'skip': skip, - 'take': take, - }, - }); - } - - /** - * @returns PagedSearchResult Success - * @throws ApiError - */ - public static getSearchSearcherBySearcherNameSearch({ - searcherName, - query, - skip, - take, - }: { - searcherName: string, - query?: string, - skip?: number, - take?: number, - }): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/umbraco/management/api/v1/search/searcher/{searcherName}/search', - path: { - 'searcherName': searcherName, - }, - query: { - 'query': query, - 'skip': skip, - 'take': take, - }, - errors: { - 404: `Not Found`, - }, - }); - } - -} diff --git a/src/Umbraco.Web.UI.Client/src/core/backend-api/services/SearcherResource.ts b/src/Umbraco.Web.UI.Client/src/core/backend-api/services/SearcherResource.ts new file mode 100644 index 0000000000..2cda7961c1 --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/core/backend-api/services/SearcherResource.ts @@ -0,0 +1,66 @@ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { PagedSearcher } from '../models/PagedSearcher'; +import type { PagedSearchResult } from '../models/PagedSearchResult'; + +import type { CancelablePromise } from '../core/CancelablePromise'; +import { OpenAPI } from '../core/OpenAPI'; +import { request as __request } from '../core/request'; + +export class SearcherResource { + + /** + * @returns PagedSearcher Success + * @throws ApiError + */ + public static getSearcher({ + skip, + take, + }: { + skip?: number, + take?: number, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'GET', + url: '/umbraco/management/api/v1/searcher', + query: { + 'skip': skip, + 'take': take, + }, + }); + } + + /** + * @returns PagedSearchResult Success + * @throws ApiError + */ + public static getSearcherBySearcherNameQuery({ + searcherName, + term, + skip, + take, + }: { + searcherName: string, + term?: string, + skip?: number, + take?: number, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'GET', + url: '/umbraco/management/api/v1/searcher/{searcherName}/query', + path: { + 'searcherName': searcherName, + }, + query: { + 'term': term, + 'skip': skip, + 'take': take, + }, + errors: { + 404: `Not Found`, + }, + }); + } + +} diff --git a/src/Umbraco.Web.UI.Client/src/core/mocks/domains/examine-management.handlers.ts b/src/Umbraco.Web.UI.Client/src/core/mocks/domains/examine-management.handlers.ts index 360c434c5b..63d63d5488 100644 --- a/src/Umbraco.Web.UI.Client/src/core/mocks/domains/examine-management.handlers.ts +++ b/src/Umbraco.Web.UI.Client/src/core/mocks/domains/examine-management.handlers.ts @@ -5,7 +5,7 @@ import { umbracoPath } from '@umbraco-cms/utils'; import { Index, PagedIndex, PagedSearcher, PagedSearchResult } from '@umbraco-cms/backend-api'; export const handlers = [ - rest.get(umbracoPath('/search/index'), (_req, res, ctx) => { + rest.get(umbracoPath('/indexer'), (_req, res, ctx) => { return res( // Respond with a 200 status code ctx.status(200), @@ -13,7 +13,7 @@ export const handlers = [ ); }), - rest.get(umbracoPath('/search/index/:indexName'), (_req, res, ctx) => { + rest.get(umbracoPath('/indexer/:indexName'), (_req, res, ctx) => { const indexName = _req.params.indexName as string; if (!indexName) return; @@ -26,7 +26,7 @@ export const handlers = [ } }), - rest.post(umbracoPath('/search/index/:indexName/rebuild'), async (_req, res, ctx) => { + rest.post(umbracoPath('/indexer/:indexName/rebuild'), async (_req, res, ctx) => { await new Promise((resolve) => setTimeout(resolve, (Math.random() + 1) * 1000)); // simulate a delay of 1-2 seconds const indexName = _req.params.indexName as string; @@ -40,7 +40,7 @@ export const handlers = [ } }), - rest.get(umbracoPath('/search/searcher'), (_req, res, ctx) => { + rest.get(umbracoPath('/searcher'), (_req, res, ctx) => { return res( ctx.status(200), ctx.json({ @@ -50,8 +50,8 @@ export const handlers = [ ); }), - rest.get(umbracoPath('/search/searcher/:searcherName/search'), (_req, res, ctx) => { - const query = _req.url.searchParams.get('query'); + rest.get(umbracoPath('/searcher/:searcherName/query'), (_req, res, ctx) => { + const query = _req.url.searchParams.get('term'); const take = _req.url.searchParams.get('take'); const searcherName = _req.params.searcherName as string; diff --git a/src/Umbraco.Web.UI.Client/src/core/stores/icon/icon.store.ts b/src/Umbraco.Web.UI.Client/src/core/stores/icon/icon.store.ts index 5e75c4c305..e80b828c1f 100644 --- a/src/Umbraco.Web.UI.Client/src/core/stores/icon/icon.store.ts +++ b/src/Umbraco.Web.UI.Client/src/core/stores/icon/icon.store.ts @@ -1,5 +1,6 @@ import { UUIIconRegistry } from '@umbraco-ui/uui'; import icons from '../../../../public-assets/icons/icons.json'; +import { baseUrl } from '@umbraco-cms/utils'; interface UmbIconDescriptor { name: string; @@ -13,6 +14,14 @@ interface UmbIconDescriptor { * @description - Icon Store. Provides icons from the icon manifest. Icons are loaded on demand. All icons are prefixed with 'umb:' */ export class UmbIconStore extends UUIIconRegistry { + #baseValue: string; + + constructor() { + super(); + + this.#baseValue = baseUrl(); + } + /** * @param {string} iconName * @return {*} {boolean} @@ -24,7 +33,7 @@ export class UmbIconStore extends UUIIconRegistry { const icon = this.provideIcon(iconName); - import(/* @vite-ignore */ `${iconManifest.path}`).then((iconModule) => { + import(/* @vite-ignore */ `${this.#baseValue}${iconManifest.path}`).then((iconModule) => { icon.svg = iconModule.default; }); diff --git a/src/Umbraco.Web.UI.Client/src/core/utils/baseUrl.ts b/src/Umbraco.Web.UI.Client/src/core/utils/baseUrl.ts new file mode 100644 index 0000000000..88127763bf --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/core/utils/baseUrl.ts @@ -0,0 +1,10 @@ +export function baseUrl(): string { + if (typeof document !== 'undefined') { + const baseElems = document.getElementsByTagName('base'); + if (baseElems.length) { + return baseElems[0].href.slice(0, -1); + } + } + + return ''; +} diff --git a/src/Umbraco.Web.UI.Client/src/core/utils/index.ts b/src/Umbraco.Web.UI.Client/src/core/utils/index.ts index 5a35efec4f..1224e0ec12 100644 --- a/src/Umbraco.Web.UI.Client/src/core/utils/index.ts +++ b/src/Umbraco.Web.UI.Client/src/core/utils/index.ts @@ -1 +1,2 @@ +export * from './baseUrl'; export * from './umbraco-path'; diff --git a/src/Umbraco.Web.UI.Client/src/index.ts b/src/Umbraco.Web.UI.Client/src/index.ts index 2e5dad9fa4..351d0bb2cb 100644 --- a/src/Umbraco.Web.UI.Client/src/index.ts +++ b/src/Umbraco.Web.UI.Client/src/index.ts @@ -1,5 +1,3 @@ -import 'element-internals-polyfill'; - import { startMockServiceWorker } from './core/mocks/browser'; if (import.meta.env.VITE_UMBRACO_USE_MSW === 'on') { diff --git a/src/Umbraco.Web.UI.Client/tsconfig.json b/src/Umbraco.Web.UI.Client/tsconfig.json index 26285c6e00..82404b3db5 100644 --- a/src/Umbraco.Web.UI.Client/tsconfig.json +++ b/src/Umbraco.Web.UI.Client/tsconfig.json @@ -1,47 +1,40 @@ { - "compilerOptions": { - "target": "es2017", - "module": "esnext", - "lib": [ - "es2017", - "dom", - "dom.iterable" - ], - "declaration": true, - "emitDeclarationOnly": true, - "noEmitOnError": true, - "outDir": "./types", - "strict": true, - "noImplicitReturns": true, - "noFallthroughCasesInSwitch": true, - "moduleResolution": "node", - "isolatedModules": true, - "allowSyntheticDefaultImports": true, - "experimentalDecorators": true, - "forceConsistentCasingInFileNames": true, - "useDefineForClassFields": false, - "skipLibCheck": true, - "resolveJsonModule": true, - "baseUrl": ".", - "paths": { - "@umbraco-cms/models": ["src/core/models"], - "@umbraco-cms/backend-api": ["src/core/backend-api"], - "@umbraco-cms/context-api": ["src/core/context-api"], - "@umbraco-cms/extensions-api": ["src/core/extensions-api"], - "@umbraco-cms/extensions-registry": ["src/core/extensions-registry"], - "@umbraco-cms/observable-api": ["src/core/observable-api"], - "@umbraco-cms/utils": ["src/core/utils"], - "@umbraco-cms/test-utils": ["src/core/test-utils"], - "@umbraco-cms/services": ["src/core/services"] - }, - }, - "include": [ - "src/**/*.ts", - "e2e/**/*.ts", - ], - "references": [ - { - "path": "./tsconfig.node.json" - } - ] + "compilerOptions": { + "module": "esnext", + "target": "esnext", + "lib": ["es2020", "dom", "dom.iterable"], + "declaration": true, + "emitDeclarationOnly": true, + "noEmitOnError": true, + "outDir": "./types", + "strict": true, + "noImplicitReturns": true, + "noFallthroughCasesInSwitch": true, + "moduleResolution": "node", + "isolatedModules": true, + "allowSyntheticDefaultImports": true, + "experimentalDecorators": true, + "forceConsistentCasingInFileNames": true, + "useDefineForClassFields": false, + "skipLibCheck": true, + "resolveJsonModule": true, + "baseUrl": ".", + "paths": { + "@umbraco-cms/models": ["src/core/models"], + "@umbraco-cms/backend-api": ["src/core/backend-api"], + "@umbraco-cms/context-api": ["src/core/context-api"], + "@umbraco-cms/extensions-api": ["src/core/extensions-api"], + "@umbraco-cms/extensions-registry": ["src/core/extensions-registry"], + "@umbraco-cms/observable-api": ["src/core/observable-api"], + "@umbraco-cms/utils": ["src/core/utils"], + "@umbraco-cms/test-utils": ["src/core/test-utils"], + "@umbraco-cms/services": ["src/core/services"] + } + }, + "include": ["src/**/*.ts", "e2e/**/*.ts"], + "references": [ + { + "path": "./tsconfig.node.json" + } + ] } diff --git a/src/Umbraco.Web.UI.Client/tsconfig.node.json b/src/Umbraco.Web.UI.Client/tsconfig.node.json index e993792cb1..b8b8971494 100644 --- a/src/Umbraco.Web.UI.Client/tsconfig.node.json +++ b/src/Umbraco.Web.UI.Client/tsconfig.node.json @@ -1,8 +1,9 @@ { - "compilerOptions": { - "composite": true, - "module": "esnext", - "moduleResolution": "node" - }, - "include": ["vite.config.ts"] + "compilerOptions": { + "composite": true, + "module": "esnext", + "moduleResolution": "node", + "allowSyntheticDefaultImports": true + }, + "include": ["vite.config.ts"] } diff --git a/src/Umbraco.Web.UI.Client/vite.cms.config.ts b/src/Umbraco.Web.UI.Client/vite.cms.config.ts new file mode 100644 index 0000000000..f00b92eb88 --- /dev/null +++ b/src/Umbraco.Web.UI.Client/vite.cms.config.ts @@ -0,0 +1,19 @@ +import { defineConfig } from 'vite'; + +import config from './vite.config'; + +export default defineConfig({ + ...config, + build: { + lib: { + entry: 'src/app.ts', + formats: ['es'], + fileName: 'main', + }, + outDir: '../Umbraco.Cms.StaticAssets/wwwroot/umbraco', + emptyOutDir: true, + sourcemap: true, + }, + base: '/umbraco/', + mode: 'production' +});