refactor: merge themes into components (#2388)
This commit is contained in:
@@ -11,7 +11,7 @@ import {
|
||||
} from '@standardnotes/services'
|
||||
import { ItemManager } from '@Lib/Services/Items/ItemManager'
|
||||
import { FeaturesService } from '@Lib/Services/Features/FeaturesService'
|
||||
import { SNComponentManager } from './ComponentManager'
|
||||
import { ComponentManager } from './ComponentManager'
|
||||
import { SyncService } from '../Sync/SyncService'
|
||||
import { LoggerInterface } from '@standardnotes/utils'
|
||||
|
||||
@@ -27,7 +27,7 @@ describe('featuresService', () => {
|
||||
let logger: LoggerInterface
|
||||
|
||||
const createManager = (environment: Environment, platform: Platform) => {
|
||||
const manager = new SNComponentManager(
|
||||
const manager = new ComponentManager(
|
||||
items,
|
||||
mutator,
|
||||
sync,
|
||||
|
||||
@@ -69,7 +69,7 @@ declare global {
|
||||
* and other components. The component manager primarily deals with iframes, and orchestrates
|
||||
* sending and receiving messages to and from frames via the postMessage API.
|
||||
*/
|
||||
export class SNComponentManager
|
||||
export class ComponentManager
|
||||
extends AbstractService<ComponentManagerEvent, ComponentManagerEventData>
|
||||
implements ComponentManagerInterface
|
||||
{
|
||||
|
||||
@@ -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])
|
||||
|
||||
|
||||
@@ -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: {
|
||||
|
||||
Reference in New Issue
Block a user