prefix with umb
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { UmbDictionaryStore, UMB_DICTIONARY_STORE_CONTEXT_TOKEN } from './dictionary.store';
|
||||
import { UmbDictionaryDetailServerDataSource } from './sources/dictionary.detail.server.data';
|
||||
import { UmbDictionaryTreeStore, UMB_DICTIONARY_TREE_STORE_CONTEXT_TOKEN } from './dictionary.tree.store';
|
||||
import { DictionaryTreeServerDataSource } from './sources/dictionary.tree.server.data';
|
||||
import { UmbDictionaryTreeServerDataSource } from './sources/dictionary.tree.server.data';
|
||||
import { UmbControllerHostElement } from '@umbraco-cms/backoffice/controller';
|
||||
import { UmbContextConsumerController } from '@umbraco-cms/backoffice/context-api';
|
||||
import { UmbTreeDataSource, UmbDetailRepository, UmbTreeRepository } from '@umbraco-cms/backoffice/repository';
|
||||
@@ -39,7 +39,7 @@ export class UmbDictionaryRepository
|
||||
this.#host = host;
|
||||
|
||||
// TODO: figure out how spin up get the correct data source
|
||||
this.#treeSource = new DictionaryTreeServerDataSource(this.#host);
|
||||
this.#treeSource = new UmbDictionaryTreeServerDataSource(this.#host);
|
||||
this.#detailSource = new UmbDictionaryDetailServerDataSource(this.#host);
|
||||
|
||||
this.#init = Promise.all([
|
||||
|
||||
@@ -6,10 +6,10 @@ import { tryExecuteAndNotify } from '@umbraco-cms/backoffice/resources';
|
||||
/**
|
||||
* A data source for the Dictionary tree that fetches data from the server
|
||||
* @export
|
||||
* @class DictionaryTreeServerDataSource
|
||||
* @class UmbDictionaryTreeServerDataSource
|
||||
* @implements {DictionaryTreeDataSource}
|
||||
*/
|
||||
export class DictionaryTreeServerDataSource implements UmbTreeDataSource {
|
||||
export class UmbDictionaryTreeServerDataSource implements UmbTreeDataSource {
|
||||
#host: UmbControllerHostElement;
|
||||
|
||||
/**
|
||||
@@ -24,7 +24,7 @@ export class DictionaryTreeServerDataSource implements UmbTreeDataSource {
|
||||
/**
|
||||
* Fetches the root items for the tree from the server
|
||||
* @return {*}
|
||||
* @memberof DictionaryTreeServerDataSource
|
||||
* @memberof UmbDictionaryTreeServerDataSource
|
||||
*/
|
||||
async getRootItems() {
|
||||
return tryExecuteAndNotify(this.#host, DictionaryResource.getTreeDictionaryRoot({}));
|
||||
@@ -34,7 +34,7 @@ export class DictionaryTreeServerDataSource implements UmbTreeDataSource {
|
||||
* Fetches the children of a given parent id from the server
|
||||
* @param {(string | null)} parentId
|
||||
* @return {*}
|
||||
* @memberof DictionaryTreeServerDataSource
|
||||
* @memberof UmbDictionaryTreeServerDataSource
|
||||
*/
|
||||
async getChildrenOf(parentId: string | null) {
|
||||
if (!parentId) {
|
||||
@@ -54,7 +54,7 @@ export class DictionaryTreeServerDataSource implements UmbTreeDataSource {
|
||||
* Fetches the items for the given ids from the server
|
||||
* @param {Array<string>} ids
|
||||
* @return {*}
|
||||
* @memberof DictionaryTreeServerDataSource
|
||||
* @memberof UmbDictionaryTreeServerDataSource
|
||||
*/
|
||||
async getItems(ids: Array<string>) {
|
||||
if (!ids || ids.length === 0) {
|
||||
|
||||
@@ -4,7 +4,7 @@ import { UmbContextProviderElement } from './context-provider.element';
|
||||
import { UmbLitElement } from '@umbraco-cms/internal/lit-element';
|
||||
|
||||
@customElement('umb-context-test')
|
||||
export class ContextTestElement extends UmbLitElement {
|
||||
export class UmbContextTestElement extends UmbLitElement {
|
||||
public value: string | null = null;
|
||||
constructor() {
|
||||
super();
|
||||
@@ -16,7 +16,7 @@ export class ContextTestElement extends UmbLitElement {
|
||||
|
||||
describe('UmbContextProvider', () => {
|
||||
let element: UmbContextProviderElement;
|
||||
let consumer: ContextTestElement;
|
||||
let consumer: UmbContextTestElement;
|
||||
const contextValue = 'test-value';
|
||||
|
||||
beforeEach(async () => {
|
||||
@@ -25,7 +25,7 @@ describe('UmbContextProvider', () => {
|
||||
<umb-context-test></umb-context-test>
|
||||
</umb-context-provider>`
|
||||
);
|
||||
consumer = element.getElementsByTagName('umb-context-test')[0] as ContextTestElement;
|
||||
consumer = element.getElementsByTagName('umb-context-test')[0] as UmbContextTestElement;
|
||||
});
|
||||
|
||||
it('is defined with its own instance', () => {
|
||||
|
||||
@@ -6,7 +6,7 @@ import { UmbContextProviderController } from '@umbraco-cms/backoffice/context-ap
|
||||
import type { UmbControllerHostElement } from '@umbraco-cms/backoffice/controller';
|
||||
|
||||
@customElement('umb-controller-host-test-consumer')
|
||||
export class ControllerHostTestConsumerElement extends UmbLitElement {
|
||||
export class UmbControllerHostTestConsumerElement extends UmbLitElement {
|
||||
public value: string | null = null;
|
||||
constructor() {
|
||||
super();
|
||||
@@ -18,7 +18,7 @@ export class ControllerHostTestConsumerElement extends UmbLitElement {
|
||||
|
||||
describe('UmbControllerHostTestElement', () => {
|
||||
let element: UmbControllerHostTestElement;
|
||||
let consumer: ControllerHostTestConsumerElement;
|
||||
let consumer: UmbControllerHostTestConsumerElement;
|
||||
const contextValue = 'test-value';
|
||||
|
||||
beforeEach(async () => {
|
||||
@@ -31,7 +31,7 @@ describe('UmbControllerHostTestElement', () => {
|
||||
);
|
||||
consumer = element.getElementsByTagName(
|
||||
'umb-controller-host-test-consumer'
|
||||
)[0] as ControllerHostTestConsumerElement;
|
||||
)[0] as UmbControllerHostTestConsumerElement;
|
||||
});
|
||||
|
||||
it('element is defined with its own instance', () => {
|
||||
|
||||
@@ -15,7 +15,7 @@ export default {
|
||||
const Template: Story = (props) => {
|
||||
return html`
|
||||
Under construction
|
||||
<story-modal-context-example .modalLayout=${props.modalLayout}></story-modal-context-example>
|
||||
<umb-story-modal-context-example .modalLayout=${props.modalLayout}></umb-story-modal-context-example>
|
||||
`;
|
||||
};
|
||||
|
||||
|
||||
@@ -3,8 +3,8 @@ import { customElement, property, state } from 'lit/decorators.js';
|
||||
import { UmbLitElement } from '@umbraco-cms/internal/lit-element';
|
||||
import { UMB_MODAL_CONTEXT_TOKEN, UmbModalContext } from '@umbraco-cms/backoffice/modal';
|
||||
|
||||
@customElement('story-modal-context-example')
|
||||
export class StoryModalContextExampleElement extends UmbLitElement {
|
||||
@customElement('umb-story-modal-context-example')
|
||||
export class UmbStoryModalContextExampleElement extends UmbLitElement {
|
||||
@property()
|
||||
modalLayout = 'confirm';
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ export default {
|
||||
],
|
||||
} as Meta;
|
||||
|
||||
const Template: Story = () => html`<story-notification-default-example></story-notification-default-example>`;
|
||||
const Template: Story = () => html`<umb-story-notification-default-example></umb-story-notification-default-example>`;
|
||||
|
||||
export const Default = Template.bind({});
|
||||
Default.parameters = {
|
||||
|
||||
@@ -8,8 +8,8 @@ import {
|
||||
} from '@umbraco-cms/backoffice/notification';
|
||||
import { UmbLitElement } from '@umbraco-cms/internal/lit-element';
|
||||
|
||||
@customElement('story-notification-default-example')
|
||||
export class StoryNotificationDefaultExampleElement extends UmbLitElement {
|
||||
@customElement('umb-story-notification-default-example')
|
||||
export class UmbStoryNotificationDefaultExampleElement extends UmbLitElement {
|
||||
private _notificationContext?: UmbNotificationContext;
|
||||
|
||||
connectedCallback(): void {
|
||||
@@ -56,6 +56,6 @@ export class StoryNotificationDefaultExampleElement extends UmbLitElement {
|
||||
|
||||
declare global {
|
||||
interface HTMLElementTagNameMap {
|
||||
'story-notification-default-example': StoryNotificationDefaultExampleElement;
|
||||
'umb-story-notification-default-example': UmbStoryNotificationDefaultExampleElement;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user