refactor: merge themes into components (#2388)

This commit is contained in:
Mo
2023-08-06 08:52:19 -05:00
committed by GitHub
parent 1d60af0243
commit d2f8a36f19
33 changed files with 117 additions and 150 deletions

View File

@@ -1,7 +1,7 @@
import { ItemManagerInterface, PreferenceServiceInterface } from '@standardnotes/services'
import { GetDefaultEditorIdentifier } from './GetDefaultEditorIdentifier'
import { ComponentArea, NativeFeatureIdentifier } from '@standardnotes/features'
import { SNComponent, SNTag } from '@standardnotes/models'
import { ComponentItem, SNTag } from '@standardnotes/models'
describe('getDefaultEditorIdentifier', () => {
let usecase: GetDefaultEditorIdentifier
@@ -49,7 +49,7 @@ describe('getDefaultEditorIdentifier', () => {
legacyIsDefaultEditor: jest.fn().mockReturnValue(true),
identifier: NativeFeatureIdentifier.TYPES.MarkdownProEditor,
area: ComponentArea.Editor,
} as unknown as jest.Mocked<SNComponent>
} as unknown as jest.Mocked<ComponentItem>
items.getDisplayableComponents = jest.fn().mockReturnValue([editor])

View File

@@ -13,7 +13,7 @@ import {
Environment,
PayloadTimestampDefaults,
Platform,
SNComponent,
ComponentItem,
UIFeature,
} from '@standardnotes/models'
import { DesktopManagerInterface } from '@standardnotes/services'
@@ -26,7 +26,7 @@ const nativeFeatureAsUIFeature = <F extends UIFeatureDescriptionTypes>(identifie
}
const thirdPartyFeature = () => {
const component = new SNComponent(
const component = new ComponentItem(
new DecryptedPayload({
uuid: '789',
content_type: ContentType.TYPES.Component,
@@ -101,7 +101,7 @@ describe('GetFeatureUrl', () => {
})
it('returns hosted url for third party component with no local_url', () => {
const component = new SNComponent({
const component = new ComponentItem({
uuid: '789',
content_type: ContentType.TYPES.Component,
content: {