Merge branch 'feature/dashboard-models-builder' of https://github.com/umbraco/Umbraco.CMS.Backoffice into feature/dashboard-models-builder

This commit is contained in:
Lone Iversen
2022-11-28 09:00:18 +01:00
53 changed files with 729 additions and 651 deletions

View File

@@ -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

View File

@@ -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=

View File

@@ -0,0 +1,3 @@
{
"type": "commonjs"
}

View File

@@ -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 }) => {

View File

@@ -1,4 +1,4 @@
import { expect, test } from '../test';
import { expect, test } from './test';
test('login', async ({ page }) => {
// Go to /login

View File

@@ -0,0 +1,4 @@
{
"name": "backoffice-e2e",
"type": "commonjs"
}

View File

@@ -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;

View File

@@ -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 }) => {

View File

@@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/src/favicon.svg" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Umbraco</title>
<script type="module" src="/src/index.ts"></script>

View File

@@ -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",

View File

@@ -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": {

View File

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@@ -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.

View File

@@ -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;
};
}

View File

@@ -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;
}

View File

@@ -0,0 +1,4 @@
export default function() {
sessionStorage.setItem('is-authenticated', 'true');
history.replaceState(null, '', 'section');
}

View File

@@ -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);

View File

@@ -112,7 +112,7 @@ export class UmbBackofficeHeaderSections extends UmbContextProviderMixin(
<uui-tab
@click="${this._handleTabClick}"
?active="${this._currentSectionAlias === section.alias}"
href="${`/section/${section.meta.pathname}`}"
href="${`section/${section.meta.pathname}`}"
label="${section.meta.label || section.name}"
data-alias="${section.alias}"></uui-tab>
`

View File

@@ -43,7 +43,7 @@ export class UmbBackofficeHeader extends LitElement {
return html`
<div id="appHeader">
<uui-button id="logo" look="primary" label="Umbraco" compact>
<img src="/umbraco_logomark_white.svg" alt="Umbraco" />
<img src="umbraco_logomark_white.svg" alt="Umbraco" />
</uui-button>
<umb-backoffice-header-sections id="sections"></umb-backoffice-header-sections>

View File

@@ -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` <a href="/section/settings/dashboard/examine-management/"> &larr; Back to overview </a> `
? html` <a href="section/settings/dashboard/examine-management"> &larr; Back to overview </a> `
: nothing}
<router-slot @changestate="${this._onRouteChange}" .routes=${this._routes}></router-slot>`;
}

View File

@@ -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;
}

View File

@@ -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<SearchResultsModel> {
export class UmbModalLayoutFieldsViewerElement extends UmbModalLayoutElement<SearchResult & { name: string }> {
static styles = [
UUITextStyles,
css`
@@ -47,31 +47,31 @@ export class UmbModalLayoutFieldsViewerElement extends UmbModalLayoutElement<Sea
}
render() {
if (this.data) {
return html`
<uui-dialog-layout class="uui-text" headline="${this.data.name}">
<uui-scroll-container id="field-viewer">
<span>
<uui-table>
<uui-table-head>
<uui-table-head-cell> Field </uui-table-head-cell>
<uui-table-head-cell> Value </uui-table-head-cell>
</uui-table-head>
${Object.values(this.data.fields).map((cell) => {
return html`<uui-table-row>
<uui-table-cell> ${cell.name} </uui-table-cell>
<uui-table-cell> ${cell.values.join(', ')} </uui-table-cell>
</uui-table-row>`;
})}
</uui-table>
</span>
</uui-scroll-container>
<div>
<uui-button look="primary" @click="${this._handleClose}">Close</uui-button>
</div>
</uui-dialog-layout>
`;
} else return html``;
if (!this.data) return nothing;
return html`
<uui-dialog-layout class="uui-text" headline="${this.data.name}">
<uui-scroll-container id="field-viewer">
<span>
<uui-table>
<uui-table-head>
<uui-table-head-cell> Field </uui-table-head-cell>
<uui-table-head-cell> Value </uui-table-head-cell>
</uui-table-head>
${Object.values(this.data.fields ?? []).map((cell) => {
return html`<uui-table-row>
<uui-table-cell> ${cell.name} </uui-table-cell>
<uui-table-cell> ${cell.values?.join(', ')} </uui-table-cell>
</uui-table-row>`;
})}
</uui-table>
</span>
</uui-scroll-container>
<div>
<uui-button look="primary" @click="${this._handleClose}">Close</uui-button>
</div>
</uui-dialog-layout>
`;
}
}

View File

@@ -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` <uui-box headline="${this.indexName}">
<p>
<strong>Health Status</strong><br />
The health status of the ${this._indexData.name} and if it can be read
</p>
<div>
<uui-icon-essentials>
<uui-icon
name=${this._indexData.isHealthy ? `check` : `wrong`}
class=${this._indexData.isHealthy ? 'positive' : 'danger'}>
</uui-icon>
</uui-icon-essentials>
${this._indexData.healthStatus}
</div>
</uui-box>
<umb-dashboard-examine-searcher searcherName="${this.indexName}"></umb-dashboard-examine-searcher>
${this.renderPropertyList()} ${this.renderTools()}`;
} else return html``;
if (!this._indexData || this._loading) return html`
<uui-loader-bar></uui-loader-bar>`;
return html`
<uui-box headline="${this.indexName}">
<p>
<strong>Health Status</strong><br/>
The health status of the ${this.indexName} and if it can be read
</p>
<div>
<uui-icon-essentials>
<uui-icon
name=${this._indexData.isHealthy ? `check` : `wrong`}
class=${this._indexData.isHealthy ? 'positive' : 'danger'}>
</uui-icon>
</uui-icon-essentials>
${this._indexData.healthStatus}
</div>
</uui-box>
${this.renderIndexSearch()}
${this.renderPropertyList()}
${this.renderTools()}
`;
}
private renderIndexSearch() {
if (!this._indexData || !this._indexData.isHealthy) return nothing;
return html`<umb-dashboard-examine-searcher searcherName="${this.indexName}"></umb-dashboard-examine-searcher>`;
}
private renderPropertyList() {
if (!this._indexData) return nothing;
return html`<uui-box headline="Index info">
<p>Lists the properties of the ${this._indexData.name}</p>
<p>Lists the properties of the ${this.indexName}</p>
<uui-table class="info">
<uui-table-row>
<uui-table-cell style="width:0px; font-weight: bold;"> documentCount </uui-table-cell>
@@ -187,7 +204,7 @@ export class UmbDashboardExamineIndexElement extends UmbContextConsumerMixin(Lit
${this._indexData.providerProperties
? Object.entries(this._indexData.providerProperties).map((entry) => {
return html`<uui-table-row>
<uui-table-cell style="width:0px; font-weight: bold;"> ${entry[0]} </uui-table-cell>
<uui-table-cell style="width:0; font-weight: bold;"> ${entry[0]} </uui-table-cell>
<uui-table-cell clip-text> ${entry[1]} </uui-table-cell>
</uui-table-row>`;
})
@@ -198,13 +215,13 @@ export class UmbDashboardExamineIndexElement extends UmbContextConsumerMixin(Lit
private renderTools() {
return html` <uui-box headline="Tools">
<p>Tools to manage the ${this._indexData.name}</p>
<p>Tools to manage the ${this.indexName}</p>
<uui-button
color="danger"
look="primary"
.state="${this._buttonState}"
@click="${this._onRebuildHandler}"
.disabled="${!this._indexData?.canRebuild}"
.disabled="${!this._indexData?.canRebuild ?? true}"
label="Rebuild index">
Rebuild
</uui-button>

View File

@@ -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`<uui-loader></uui-loader>`;
if (!this._indexers) return nothing;
return html` <uui-table class="overview">
${this._indexers.map((index) => {
return html`
@@ -142,7 +155,8 @@ export class UmbDashboardExamineOverviewElement extends UmbContextConsumerMixin(
}
private renderSearchersList() {
if (!this._searchers) return html`<span class="not-found-message">No searchers were found</span>`;
if (this._loadingSearchers) return html`<uui-loader></uui-loader>`;
if (!this._searchers) return nothing;
return html`
<uui-table class="overview2">
${this._searchers.map((searcher) => {

View File

@@ -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`<div class="table-container">
<uui-scroll-container>
<uui-table class="search">
<uui-table-head>
<uui-table-head-cell style="width:0">Score</uui-table-head-cell>
<uui-table-head-cell style="width:0">Id</uui-table-head-cell>
<uui-table-head-cell>Name</uui-table-head-cell>
<uui-table-head-cell>Fields</uui-table-head-cell>
${this.renderHeadCells()}
</uui-table-head>
${this._searchResults?.map((rowData) => {
return html`<uui-table-row>
<uui-table-cell> ${rowData.score} </uui-table-cell>
<uui-table-cell> ${rowData.id} </uui-table-cell>
<uui-table-cell>
<uui-button look="secondary" label="Open editor for this document" @click="${this._onNameClick}">
${rowData.fields?.find((field) => {
if (field.name?.toUpperCase() === 'NODENAME') return field.values;
else return;
})?.values}
</uui-button>
</uui-table-cell>
<uui-table-cell>
<uui-button
class="bright"
look="secondary"
label="Open sidebar to see all fields"
@click="${() =>
this._modalService?.open('umb-modal-layout-fields-viewer', {
type: 'sidebar',
size: 'medium',
data: { ...rowData },
})}">
${rowData.fields ? Object.keys(rowData.fields).length : ''} fields
</uui-button>
</uui-table-cell>
${rowData.fields ? this.renderBodyCells(rowData.fields) : ''}
</uui-table-row>`;
})}
</uui-table>
</uui-scroll-container>
<button class="field-adder" @click="${this._onFieldFilterClick}">
<uui-icon-registry-essential>
<uui-tag look="secondary">
<uui-icon name="add"></uui-icon>
</uui-tag>
</uui-icon-registry-essential>
</button>
</div>`;
if (this._searchLoading) return html`<uui-loader></uui-loader>`;
if (!this._searchResults) return nothing;
if (!this._searchResults.length) {
return html`<p>No results found</p>`;
}
return;
return html`<div class="table-container">
<uui-scroll-container>
<uui-table class="search">
<uui-table-head>
<uui-table-head-cell style="width:0">Score</uui-table-head-cell>
<uui-table-head-cell style="width:0">Id</uui-table-head-cell>
<uui-table-head-cell>Name</uui-table-head-cell>
<uui-table-head-cell>Fields</uui-table-head-cell>
${this.renderHeadCells()}
</uui-table-head>
${this._searchResults?.map((rowData) => {
return html`<uui-table-row>
<uui-table-cell> ${rowData.score} </uui-table-cell>
<uui-table-cell> ${rowData.id} </uui-table-cell>
<uui-table-cell>
<uui-button look="secondary" label="Open editor for this document" @click="${this._onNameClick}">
${this.getSearchResultNodeName(rowData)}
</uui-button>
</uui-table-cell>
<uui-table-cell>
<uui-button
class="bright"
look="secondary"
label="Open sidebar to see all fields"
@click="${() =>
this._modalService?.open('umb-modal-layout-fields-viewer', {
type: 'sidebar',
size: 'medium',
data: { ...rowData, name: this.getSearchResultNodeName(rowData) },
})}">
${rowData.fields ? Object.keys(rowData.fields).length : ''} fields
</uui-button>
</uui-table-cell>
${rowData.fields ? this.renderBodyCells(rowData.fields) : ''}
</uui-table-row>`;
})}
</uui-table>
</uui-scroll-container>
<button class="field-adder" @click="${this._onFieldFilterClick}">
<uui-icon-registry-essential>
<uui-tag look="secondary">
<uui-icon name="add"></uui-icon>
</uui-tag>
</uui-icon-registry-essential>
</button>
</div>`;
}
renderHeadCells() {

View File

@@ -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<SubmitEvent>) => {
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.
</p>
${this._renderSettingSlider()}
<uui-button look="primary" color="positive" label="Save telemetry settings" @click="${this._handleSubmit}">
<uui-button look="primary" color="positive" label="Save telemetry settings" @click="${this._handleSubmit}" .state=${this._buttonState}>
Save
</uui-button>
</div>

View File

@@ -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() {

View File

@@ -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
},
];

View File

@@ -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
},
];

View File

@@ -122,7 +122,7 @@ export class UmbSectionDashboardsElement extends UmbContextConsumerMixin(UmbObse
${this._dashboards.map(
(dashboard) => html`
<uui-tab
href="${`/section/${this._currentSectionPathname}/dashboard/${dashboard.meta.pathname}`}"
href="${`section/${this._currentSectionPathname}/dashboard/${dashboard.meta.pathname}`}"
label=${dashboard.meta.label || dashboard.name}
?active="${dashboard.meta.pathname === this._currentDashboardPathname}"></uui-tab>
`

View File

@@ -59,7 +59,7 @@ export class UmbSectionSidebarElement extends UmbContextConsumerMixin(UmbObserve
return html`
<umb-tree-context-menu-service>
<uui-scroll-container>
<a href="${`/section/${this._sectionPathname}`}">
<a href="${`section/${this._sectionPathname}`}">
<h3>${this._sectionLabel}</h3>
</a>

View File

@@ -11,7 +11,7 @@ export class UmbUserGroupTableNameColumnLayoutElement extends LitElement {
value!: any;
render() {
return html` <a style="font-weight: bold;" href="/section/users/view/users/userGroup/${this.item.key}">
return html` <a style="font-weight: bold;" href="section/users/view/users/userGroup/${this.item.key}">
${this.value.name}
</a>`;
}

View File

@@ -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() {

View File

@@ -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() {

View File

@@ -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) {

View File

@@ -16,7 +16,7 @@ export class UmbUserTableNameColumnLayoutElement extends LitElement {
render() {
return html` <div style="display: flex; align-items: center;">
<uui-avatar name="${this.value.name}" style="margin-right: 10px;"></uui-avatar>
<a style="font-weight: bold;" href="/section/users/view/users/user/${this.item.key}">${this.value.name}</a>
<a style="font-weight: bold;" href="section/users/view/users/user/${this.item.key}">${this.value.name}</a>
</div>`;
}
}

View File

@@ -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
},
];

View File

@@ -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.

View File

@@ -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) {

View File

@@ -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';

View File

@@ -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<PagedIndex> {
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<Index> {
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<OkResult> {
return __request(OpenAPI, {
method: 'POST',
url: '/umbraco/management/api/v1/indexer/{indexName}/rebuild',
path: {
'indexName': indexName,
},
errors: {
400: `Bad Request`,
},
});
}
}

View File

@@ -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<PagedIndex> {
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<Index> {
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<OkResult> {
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<PagedSearcher> {
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<PagedSearchResult> {
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`,
},
});
}
}

View File

@@ -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<PagedSearcher> {
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<PagedSearchResult> {
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`,
},
});
}
}

View File

@@ -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<PagedSearcher>({
@@ -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;

View File

@@ -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;
});

View File

@@ -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 '';
}

View File

@@ -1 +1,2 @@
export * from './baseUrl';
export * from './umbraco-path';

View File

@@ -1,5 +1,3 @@
import 'element-internals-polyfill';
import { startMockServiceWorker } from './core/mocks/browser';
if (import.meta.env.VITE_UMBRACO_USE_MSW === 'on') {

View File

@@ -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"
}
]
}

View File

@@ -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"]
}

View File

@@ -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'
});