feat(editor): Update design-system and editor dependencies (no-changelog) (#5188)

This commit is contained in:
Alex Grozav
2023-01-27 03:09:30 +02:00
committed by GitHub
parent 7e229a3d38
commit 99e35f1e94
20 changed files with 3073 additions and 2451 deletions

View File

@@ -5,14 +5,12 @@ import { defineStore } from 'pinia';
import Vue from 'vue';
import { useNodeTypesStore } from './nodeTypes';
const { VUE_APP_URL_BASE_API, VUE_APP_ENDPOINT_REST } = import.meta.env;
export const useRootStore = defineStore(STORES.ROOT, {
state: (): RootState => ({
// @ts-ignore
baseUrl: import.meta.env.VUE_APP_URL_BASE_API
? import.meta.env.VUE_APP_URL_BASE_API
: window.BASE_PATH === '/%BASE_PATH%/'
? '/'
: window.BASE_PATH,
baseUrl:
VUE_APP_URL_BASE_API ?? window.BASE_PATH === '/{{BASE_PATH}}/' ? '/' : window.BASE_PATH,
defaultLocale: 'en',
endpointWebhook: 'webhook',
endpointWebhookTest: 'webhook-test',
@@ -44,16 +42,16 @@ export const useRootStore = defineStore(STORES.ROOT, {
getRestUrl(): string {
let endpoint = 'rest';
if (import.meta.env.VUE_APP_ENDPOINT_REST) {
endpoint = import.meta.env.VUE_APP_ENDPOINT_REST;
if (VUE_APP_ENDPOINT_REST) {
endpoint = VUE_APP_ENDPOINT_REST;
}
return `${this.baseUrl}${endpoint}`;
},
getRestApiContext(): IRestApiContext {
let endpoint = 'rest';
if (import.meta.env.VUE_APP_ENDPOINT_REST) {
endpoint = import.meta.env.VUE_APP_ENDPOINT_REST;
if (VUE_APP_ENDPOINT_REST) {
endpoint = VUE_APP_ENDPOINT_REST;
}
return {
baseUrl: `${this.baseUrl}${endpoint}`,