move router to libs
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// TODO: Be aware here we import a class from src!
|
||||
import { UMB_ROUTE_CONTEXT_TOKEN } from '../../src/core/router/route.context';
|
||||
import { UMB_ROUTE_CONTEXT_TOKEN } from '../router/route.context';
|
||||
import type { UmbControllerInterface } from '../controller';
|
||||
import { UmbModalRouteRegistration } from './modal-route-registration';
|
||||
import { UmbContextConsumerController } from '@umbraco-cms/backoffice/context-api';
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
export * from './route-location.interface';
|
||||
export * from './route.context';
|
||||
export * from './route.interface';
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { IRoute, IRoutingInfo, PARAM_IDENTIFIER, stripSlash } from 'router-slot';
|
||||
import { IRoutingInfo, PARAM_IDENTIFIER, stripSlash } from 'router-slot';
|
||||
import { UmbRoute } from './route.interface';
|
||||
import {
|
||||
UmbContextConsumerController,
|
||||
UmbContextProviderController,
|
||||
@@ -13,7 +14,7 @@ export class UmbRouteContext {
|
||||
//#host: UmbControllerHostInterface;
|
||||
#modalRegistrations: UmbModalRouteRegistration[] = [];
|
||||
#modalContext?: typeof UMB_MODAL_CONTEXT_TOKEN.TYPE;
|
||||
#contextRoutes: IRoute[] = [];
|
||||
#contextRoutes: UmbRoute[] = [];
|
||||
#routerBasePath?: string;
|
||||
#activeModalPath?: string;
|
||||
|
||||
@@ -49,7 +50,7 @@ export class UmbRouteContext {
|
||||
return `/modal/${modalRegistration.alias.toString()}/${modalRegistration.path}`;
|
||||
}
|
||||
|
||||
#generateRoute(modalRegistration: UmbModalRouteRegistration): IRoute {
|
||||
#generateRoute(modalRegistration: UmbModalRouteRegistration): UmbRoute {
|
||||
return {
|
||||
path: this.#getModalRoutePath(modalRegistration),
|
||||
component: EmptyDiv,
|
||||
@@ -1,8 +1,5 @@
|
||||
export * from 'router-slot';
|
||||
export * from './route.interface';
|
||||
export * from './route.context';
|
||||
export * from './router-slot.element';
|
||||
export * from './router-slot-change.event';
|
||||
export * from './router-slot-init.event';
|
||||
export * from './variant-router-slot.element';
|
||||
export * from './route-location.interface';
|
||||
|
||||
@@ -2,11 +2,10 @@ import type { IRoute } from 'router-slot/model';
|
||||
import { RouterSlot } from 'router-slot';
|
||||
import { css, html, PropertyValueMap } from 'lit';
|
||||
import { customElement, property } from 'lit/decorators.js';
|
||||
import { UmbRouteContext, UmbRoute } from '@umbraco-cms/backoffice/router';
|
||||
import { UmbLitElement } from '../lit-element';
|
||||
import { UmbRouterSlotInitEvent } from './router-slot-init.event';
|
||||
import { UmbRouterSlotChangeEvent } from './router-slot-change.event';
|
||||
import { UmbRouteContext } from './route.context';
|
||||
import { UmbRoute } from './route.interface';
|
||||
|
||||
/**
|
||||
* @element umb-router-slot
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
"@umbraco-cms/backoffice/property-editor": ["libs/property-editor"],
|
||||
"@umbraco-cms/backoffice/repository": ["libs/repository"],
|
||||
"@umbraco-cms/backoffice/resources": ["libs/resources"],
|
||||
"@umbraco-cms/backoffice/router": ["libs/router"],
|
||||
"@umbraco-cms/backoffice/store": ["libs/store"],
|
||||
"@umbraco-cms/backoffice/utils": ["libs/utils"],
|
||||
"@umbraco-cms/backoffice/workspace": ["libs/workspace"],
|
||||
|
||||
Reference in New Issue
Block a user