move notification to libs
This commit is contained in:
@@ -4,7 +4,7 @@ import { validate as uuidValidate } from 'uuid';
|
||||
import { UmbNotificationHandler } from './notification-handler';
|
||||
|
||||
import type { UmbNotificationDefaultData } from './layouts/default';
|
||||
import type { UmbNotificationOptions } from '.';
|
||||
import type { UmbNotificationOptions } from './notification.service';
|
||||
|
||||
describe('UmbNotificationHandler', () => {
|
||||
let notificationHandler: UmbNotificationHandler;
|
||||
@@ -1,6 +1,6 @@
|
||||
import { BehaviorSubject } from 'rxjs';
|
||||
import { UmbNotificationHandler } from '.';
|
||||
import { UmbContextToken } from '@umbraco-cms/context-api';
|
||||
import { UmbNotificationHandler } from './notification-handler';
|
||||
|
||||
export type UmbNotificationData = any;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import '../../backoffice/shared/components/backoffice-frame/backoffice-notification-container.element';
|
||||
import '../../../libs/context-api/provide/context-provider.element';
|
||||
import '../../src/backoffice/shared/components/backoffice-frame/backoffice-notification-container.element';
|
||||
import '../context-api/provide/context-provider.element';
|
||||
import './layouts/default';
|
||||
|
||||
import { Meta, Story } from '@storybook/web-components';
|
||||
16
src/Umbraco.Web.UI.Client/libs/notification/package.json
Normal file
16
src/Umbraco.Web.UI.Client/libs/notification/package.json
Normal file
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"name": "@umbraco-cms/notification",
|
||||
"version": "0.0.0",
|
||||
"description": "",
|
||||
"module": "index.js",
|
||||
"type": "module",
|
||||
"files": [
|
||||
"dist"
|
||||
],
|
||||
"scripts": {
|
||||
"build": "rollup -c",
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"author": "Umbraco HQ",
|
||||
"license": "MIT"
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
import config from '../../utils/rollup.config.js';
|
||||
export default {
|
||||
...config,
|
||||
};
|
||||
@@ -4,7 +4,7 @@ import {
|
||||
UmbNotificationService,
|
||||
UmbNotificationDefaultData,
|
||||
UMB_NOTIFICATION_SERVICE_CONTEXT_TOKEN,
|
||||
} from '../../src/core/notification';
|
||||
} from '@umbraco-cms/notification';
|
||||
import { ApiError, CancelablePromise, ProblemDetails } from '@umbraco-cms/backend-api';
|
||||
import { UmbController, UmbControllerHostInterface } from '@umbraco-cms/controller';
|
||||
import { UmbContextConsumerController } from '@umbraco-cms/context-api';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||
import { UmbControllerHostInterface } from '@umbraco-cms/controller';
|
||||
import type { UmbNotificationOptions } from '../../src/core/notification';
|
||||
import type { UmbNotificationOptions } from '@umbraco-cms/notification';
|
||||
import { UmbResourceController } from './resource.controller';
|
||||
|
||||
export function tryExecuteAndNotify<T>(
|
||||
|
||||
@@ -3,7 +3,6 @@ import { UUITextStyles } from '@umbraco-ui/uui-css/lib';
|
||||
import { css, html } from 'lit';
|
||||
|
||||
import { UmbModalService, UMB_MODAL_SERVICE_CONTEXT_TOKEN } from '../core/modal';
|
||||
import { UmbNotificationService, UMB_NOTIFICATION_SERVICE_CONTEXT_TOKEN } from '../core/notification';
|
||||
import { UmbUserStore, UMB_USER_STORE_CONTEXT_TOKEN } from './users/users/user.store';
|
||||
import { UmbUserGroupStore, UMB_USER_GROUP_STORE_CONTEXT_TOKEN } from './users/user-groups/user-group.store';
|
||||
import { UmbCurrentUserStore, UMB_CURRENT_USER_STORE_CONTEXT_TOKEN } from './users/current-user/current-user.store';
|
||||
@@ -29,6 +28,7 @@ import {
|
||||
|
||||
import { UmbSectionStore, UMB_SECTION_STORE_CONTEXT_TOKEN } from './shared/components/section/section.store';
|
||||
import { UmbDataTypeStore, UMB_DATA_TYPE_STORE_CONTEXT_TOKEN } from './settings/data-types/data-type.store';
|
||||
import { UmbNotificationService, UMB_NOTIFICATION_SERVICE_CONTEXT_TOKEN } from '@umbraco-cms/notification';
|
||||
import { UmbLitElement } from '@umbraco-cms/element';
|
||||
|
||||
// Domains
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { html } from 'lit';
|
||||
import { customElement } from 'lit/decorators.js';
|
||||
import { UMB_NOTIFICATION_SERVICE_CONTEXT_TOKEN } from 'src/core/notification';
|
||||
import { UMB_NOTIFICATION_SERVICE_CONTEXT_TOKEN } from '@umbraco-cms/notification';
|
||||
|
||||
import { UmbLitElement } from '@umbraco-cms/element';
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ import {
|
||||
UmbNotificationHandler,
|
||||
UmbNotificationService,
|
||||
UMB_NOTIFICATION_SERVICE_CONTEXT_TOKEN,
|
||||
} from '../../../../core/notification';
|
||||
} from '@umbraco-cms/notification';
|
||||
import { UmbLitElement } from '@umbraco-cms/element';
|
||||
|
||||
@customElement('umb-backoffice-notification-container')
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
import { v4 as uuidv4 } from 'uuid';
|
||||
import { UmbNotificationService, UMB_NOTIFICATION_SERVICE_CONTEXT_TOKEN } from '../../../../../core/notification';
|
||||
import { UmbNotificationDefaultData } from '../../../../../core/notification/layouts/default';
|
||||
import { UniqueBehaviorSubject, UmbObserverController, createObservablePart } from '@umbraco-cms/observable-api';
|
||||
import {
|
||||
UmbNotificationDefaultData,
|
||||
UmbNotificationService,
|
||||
UMB_NOTIFICATION_SERVICE_CONTEXT_TOKEN,
|
||||
} from '@umbraco-cms/notification';
|
||||
import { UmbNodeStoreBase } from '@umbraco-cms/stores/store';
|
||||
import { UmbControllerHostInterface } from '@umbraco-cms/controller';
|
||||
import { UmbContextConsumerController, UmbContextProviderController } from '@umbraco-cms/context-api';
|
||||
import { EntityTreeItem } from '@umbraco-cms/backend-api';
|
||||
import { UniqueBehaviorSubject, UmbObserverController } from '@umbraco-cms/observable-api';
|
||||
import { createObservablePart } from '@umbraco-cms/observable-api';
|
||||
|
||||
// TODO: Consider if its right to have this many class-inheritance of WorkspaceContext
|
||||
// TODO: Could we extract this code into a 'Manager' of its own, which will be instantiated by the concrete Workspace Context. This will be more transparent and 'reuseable'
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
import { html } from 'lit';
|
||||
import { customElement, property } from 'lit/decorators.js';
|
||||
import type { UmbNotificationDefaultData } from '../../../../core/notification/layouts/default';
|
||||
import { UmbNotificationService, UMB_NOTIFICATION_SERVICE_CONTEXT_TOKEN } from '../../../../core/notification';
|
||||
import type { UmbPropertyAction } from '../shared/property-action/property-action.model';
|
||||
import {
|
||||
UmbNotificationDefaultData,
|
||||
UmbNotificationService,
|
||||
UMB_NOTIFICATION_SERVICE_CONTEXT_TOKEN,
|
||||
} from '@umbraco-cms/notification';
|
||||
import { UmbLitElement } from '@umbraco-cms/element';
|
||||
|
||||
@customElement('umb-property-action-copy')
|
||||
|
||||
@@ -4,8 +4,11 @@ import { customElement, query, state } from 'lit/decorators.js';
|
||||
import { UUIInputPasswordElement } from '@umbraco-ui/uui';
|
||||
import { UmbInputPickerUserGroupElement } from 'src/auth/components/input-user-group/input-user-group.element';
|
||||
import type { UserDetails } from '@umbraco-cms/models';
|
||||
import { UmbNotificationService, UMB_NOTIFICATION_SERVICE_CONTEXT_TOKEN } from 'src/core/notification';
|
||||
import { UmbNotificationDefaultData } from 'src/core/notification/layouts/default';
|
||||
import {
|
||||
UmbNotificationDefaultData,
|
||||
UmbNotificationService,
|
||||
UMB_NOTIFICATION_SERVICE_CONTEXT_TOKEN,
|
||||
} from '@umbraco-cms/notification';
|
||||
import { UmbModalLayoutElement } from 'src/core/modal';
|
||||
import { UmbUserStore, UMB_USER_STORE_CONTEXT_TOKEN } from 'src/backoffice/users/users/user.store';
|
||||
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
"@umbraco-cms/element": ["libs/element"],
|
||||
"@umbraco-cms/extensions-api": ["libs/extensions-api"],
|
||||
"@umbraco-cms/extensions-registry": ["libs/extensions-registry"],
|
||||
"@umbraco-cms/notification": ["libs/notification"],
|
||||
"@umbraco-cms/observable-api": ["libs/observable-api"],
|
||||
"@umbraco-cms/utils": ["src/core/utils"],
|
||||
"@umbraco-cms/test-utils": ["src/core/test-utils"],
|
||||
|
||||
@@ -19,6 +19,7 @@ export default {
|
||||
'@umbraco-cms/element': './libs/element/index.ts',
|
||||
'@umbraco-cms/extensions-api': './libs/extensions-api/index.ts',
|
||||
'@umbraco-cms/extensions-registry': './libs/extensions-registry/index.ts',
|
||||
'@umbraco-cms/notification': './libs/notification/index.ts',
|
||||
'@umbraco-cms/observable-api': './libs/observable-api/index.ts',
|
||||
'@umbraco-cms/utils': './src/core/utils/index.ts',
|
||||
'@umbraco-cms/test-utils': './src/core/test-utils/index.ts',
|
||||
|
||||
Reference in New Issue
Block a user