add .js to relative import

This commit is contained in:
Mads Rasmussen
2023-05-24 10:41:38 +02:00
parent d705f753e4
commit 2fa3ebe0ce
13 changed files with 38 additions and 40 deletions

View File

@@ -1 +1 @@
export * from './tags-input/tags-input.element';
export * from './tags-input/tags-input.element.js';

View File

@@ -4,7 +4,7 @@ import { customElement, property, query, queryAll, state } from 'lit/decorators.
import { FormControlMixin } from '@umbraco-ui/uui-base/lib/mixins';
import { repeat } from 'lit/directives/repeat.js';
import { UUIInputElement, UUIInputEvent, UUITagElement } from '@umbraco-ui/uui';
import { UmbTagRepository } from '../../repository/tag.repository';
import { UmbTagRepository } from '../../repository/tag.repository.js';
import { UmbLitElement } from '@umbraco-cms/internal/lit-element';
import { TagResponseModel } from '@umbraco-cms/backoffice/backend-api';

View File

@@ -1,6 +1,6 @@
import { Meta, StoryObj } from '@storybook/web-components';
import './tags-input.element';
import type { UmbTagsInputElement } from './tags-input.element';
import type { UmbTagsInputElement } from './tags-input.element.js';
const meta: Meta<UmbTagsInputElement> = {
title: 'Components/Inputs/Tags',

View File

@@ -1,5 +1,5 @@
import { manifests as repositoryManifests } from './repository/manifests';
import { manifests as propertyEditorManifests } from './property-editors/manifests';
import { manifests as repositoryManifests } from './repository/manifests.js';
import { manifests as propertyEditorManifests } from './property-editors/manifests.js';
import { UmbEntryPointOnInit } from '@umbraco-cms/backoffice/extension-api';
import './components';

View File

@@ -1,4 +1,4 @@
import { manifests as tagsUI } from './tags/manifests';
import { manifests as tagsUI } from './tags/manifests.js';
import type { ManifestTypes } from '@umbraco-cms/backoffice/extension-registry';
export const manifests: Array<ManifestTypes> = [...tagsUI];

View File

@@ -1,7 +1,7 @@
import { Meta, Story } from '@storybook/web-components';
import { html } from 'lit';
import type { UmbPropertyEditorUITagsStorageTypeElement } from './property-editor-ui-tags-storage-type.element';
import type { UmbPropertyEditorUITagsStorageTypeElement } from './property-editor-ui-tags-storage-type.element.js';
import './property-editor-ui-tags-storage-type.element';
export default {

View File

@@ -1,21 +1,21 @@
import { expect, fixture, html } from '@open-wc/testing';
import { UmbPropertyEditorUITagsStorageTypeElement } from './property-editor-ui-tags-storage-type.element';
import { UmbPropertyEditorUITagsStorageTypeElement } from './property-editor-ui-tags-storage-type.element.js';
import { defaultA11yConfig } from '@umbraco-cms/internal/test-utils';
describe('UmbPropertyEditorUITagsStorageTypeElement', () => {
let element: UmbPropertyEditorUITagsStorageTypeElement;
let element: UmbPropertyEditorUITagsStorageTypeElement;
beforeEach(async () => {
element = await fixture(
html` <umb-property-editor-ui-tags-storage-type></umb-property-editor-ui-tags-storage-type> `
);
});
beforeEach(async () => {
element = await fixture(
html` <umb-property-editor-ui-tags-storage-type></umb-property-editor-ui-tags-storage-type> `
);
});
it('is defined with its own instance', () => {
expect(element).to.be.instanceOf(UmbPropertyEditorUITagsStorageTypeElement);
});
it('is defined with its own instance', () => {
expect(element).to.be.instanceOf(UmbPropertyEditorUITagsStorageTypeElement);
});
it('passes the a11y audit', async () => {
await expect(element).shadowDom.to.be.accessible(defaultA11yConfig);
});
it('passes the a11y audit', async () => {
await expect(element).shadowDom.to.be.accessible(defaultA11yConfig);
});
});

View File

@@ -1,4 +1,4 @@
import { manifest as storageType } from './config/storage-type/manifests';
import { manifest as storageType } from './config/storage-type/manifests.js';
import type { ManifestPropertyEditorUI } from '@umbraco-cms/backoffice/extension-registry';
const manifest: ManifestPropertyEditorUI = {

View File

@@ -2,7 +2,7 @@ import { html } from 'lit';
import { UUITextStyles } from '@umbraco-ui/uui-css';
import { customElement, property, state } from 'lit/decorators.js';
import { ifDefined } from 'lit/directives/if-defined.js';
import { UmbTagsInputElement } from '../../components/tags-input/tags-input.element';
import { UmbTagsInputElement } from '../../components/tags-input/tags-input.element.js';
import { UMB_WORKSPACE_PROPERTY_CONTEXT_TOKEN } from '@umbraco-cms/backoffice/workspace';
import type { UmbDataTypePropertyCollection } from '@umbraco-cms/backoffice/components';
import { UmbPropertyEditorExtensionElement } from '@umbraco-cms/backoffice/extension-registry';

View File

@@ -1,7 +1,7 @@
import { Meta, Story } from '@storybook/web-components';
import { html } from 'lit';
import type { UmbPropertyEditorUITagsElement } from './property-editor-ui-tags.element';
import type { UmbPropertyEditorUITagsElement } from './property-editor-ui-tags.element.js';
import './property-editor-ui-tags.element';
export default {

View File

@@ -1,21 +1,19 @@
import { expect, fixture, html } from '@open-wc/testing';
import { UmbPropertyEditorUITagsElement } from './property-editor-ui-tags.element';
import { UmbPropertyEditorUITagsElement } from './property-editor-ui-tags.element.js';
import { defaultA11yConfig } from '@umbraco-cms/internal/test-utils';
describe('UmbPropertyEditorUITagsElement', () => {
let element: UmbPropertyEditorUITagsElement;
let element: UmbPropertyEditorUITagsElement;
beforeEach(async () => {
element = await fixture(
html` <umb-property-editor-ui-tags></umb-property-editor-ui-tags> `
);
});
beforeEach(async () => {
element = await fixture(html` <umb-property-editor-ui-tags></umb-property-editor-ui-tags> `);
});
it('is defined with its own instance', () => {
expect(element).to.be.instanceOf(UmbPropertyEditorUITagsElement);
});
it('is defined with its own instance', () => {
expect(element).to.be.instanceOf(UmbPropertyEditorUITagsElement);
});
it('passes the a11y audit', async () => {
await expect(element).shadowDom.to.be.accessible(defaultA11yConfig);
});
it('passes the a11y audit', async () => {
await expect(element).shadowDom.to.be.accessible(defaultA11yConfig);
});
});

View File

@@ -1,5 +1,5 @@
import { UmbTagRepository } from './tag.repository';
import { UmbTagStore } from './tag.store';
import { UmbTagRepository } from './tag.repository.js';
import { UmbTagStore } from './tag.store.js';
import type { ManifestStore, ManifestRepository } from '@umbraco-cms/backoffice/extension-registry';
export const TAG_REPOSITORY_ALIAS = 'Umb.Repository.Tags';

View File

@@ -1,5 +1,5 @@
import { UmbTagServerDataSource } from './sources/tag.server.data';
import { UmbTagStore, UMB_TAG_STORE_CONTEXT_TOKEN } from './tag.store';
import { UmbTagServerDataSource } from './sources/tag.server.data.js';
import { UmbTagStore, UMB_TAG_STORE_CONTEXT_TOKEN } from './tag.store.js';
import { UmbControllerHostElement } from '@umbraco-cms/backoffice/controller-api';
import { UmbContextConsumerController } from '@umbraco-cms/backoffice/context-api';