Skip to content

Commit

Permalink
fix: use snjs proper types location
Browse files Browse the repository at this point in the history
  • Loading branch information
moughxyz committed Apr 30, 2020
1 parent bbfb40d commit 78e4ae0
Show file tree
Hide file tree
Showing 30 changed files with 70 additions and 75,085 deletions.
2 changes: 1 addition & 1 deletion app/assets/javascripts/database.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { SNAlertService } from "../../../../snjs/dist/@types";
import { SNAlertService } from "@node_modules/snjs/dist/@types";

const DB_NAME = 'standardnotes';
const STORE_NAME = 'items';
Expand Down
4 changes: 2 additions & 2 deletions app/assets/javascripts/directives/views/accountMenu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ import {
STRING_GENERATING_REGISTER_KEYS,
StringImportError
} from '@/strings';
import { SyncOpStatus } from '@/../../../../snjs/dist/@types/services/sync/sync_op_status';
import { SyncOpStatus } from '@node_modules/snjs/dist/@types/services/sync/sync_op_status';
import { PasswordWizardType } from '@/types';
import { BackupFile } from '@/../../../../snjs/dist/@types/services/protocol_service';
import { BackupFile } from '@node_modules/snjs/dist/@types/services/protocol_service';

const ELEMENT_ID_IMPORT_PASSWORD_INPUT = 'import-password-request';

Expand Down
4 changes: 2 additions & 2 deletions app/assets/javascripts/directives/views/actionsMenu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { WebApplication } from '@/ui_models/application';
import { WebDirective } from './../../types';
import template from '%/directives/actions-menu.pug';
import { PureViewCtrl } from '@Views/abstract/pure_view_ctrl';
import { SNItem, Action, SNActionsExtension } from '@/../../../../snjs/dist/@types';
import { ActionResponse } from '@/../../../../snjs/dist/@types/services/actions_service';
import { SNItem, Action, SNActionsExtension } from '@node_modules/snjs/dist/@types';
import { ActionResponse } from '@node_modules/snjs/dist/@types/services/actions_service';

type ActionsMenuScope = {
application: WebApplication
Expand Down
2 changes: 1 addition & 1 deletion app/assets/javascripts/directives/views/editorMenu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { SNComponent, SNItem, ComponentArea } from 'snjs';
import { isDesktopApplication } from '@/utils';
import template from '%/directives/editor-menu.pug';
import { PureViewCtrl } from '@Views/abstract/pure_view_ctrl';
import { ComponentMutator } from '@/../../../../snjs/dist/@types/models';
import { ComponentMutator } from '@node_modules/snjs/dist/@types/models';

interface EditorMenuScope {
callback: (component: SNComponent) => void
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { WebApplication } from '@/ui_models/application';
import template from '%/directives/privileges-management-modal.pug';
import { PrivilegeCredential, ProtectedAction, SNPrivileges, PrivilegeSessionLength } from 'snjs';
import { PureViewCtrl } from '@Views/abstract/pure_view_ctrl';
import { PrivilegeMutator } from '@/../../../../snjs/dist/@types/models';
import { PrivilegeMutator } from '@node_modules/snjs/dist/@types/models';

type DisplayInfo = {
label: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
ComponentArea
} from 'snjs';
import template from '%/directives/revision-preview-modal.pug';
import { PayloadContent } from '@/../../../../snjs/dist/@types/protocol/payloads/generator';
import { PayloadContent } from '@node_modules/snjs/dist/@types/protocol/payloads/generator';

interface RevisionPreviewScope {
uuid: string
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { WebDirective } from './../../types';
import { WebApplication } from '@/ui_models/application';
import template from '%/directives/session-history-menu.pug';
import { SNItem, ItemHistoryEntry, ItemHistory } from '@/../../../../snjs/dist/@types';
import { SNItem, ItemHistoryEntry, ItemHistory } from '@node_modules/snjs/dist/@types';

interface SessionHistoryScope {
application: WebApplication
Expand Down
4 changes: 2 additions & 2 deletions app/assets/javascripts/services/nativeExtManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import {
Copy,
dictToArray
} from 'snjs';
import { PayloadContent } from '@/../../../../snjs/dist/@types/protocol/payloads/generator';
import { ComponentPermission } from '@/../../../../snjs/dist/@types/models/app/component';
import { PayloadContent } from '@node_modules/snjs/dist/@types/protocol/payloads/generator';
import { ComponentPermission } from '@node_modules/snjs/dist/@types/models/app/component';

/** A class for handling installation of system extensions */
export class NativeExtManager extends ApplicationService {
Expand Down
1 change: 1 addition & 0 deletions app/assets/javascripts/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"@Controllers/*": ["./controllers/*"],
"@Views/*": ["./views/*"],
"@Services/*": ["./services/*"],
"@node_modules/*": ["../../../node_modules/*"],
}
}
}
2 changes: 1 addition & 1 deletion app/assets/javascripts/ui_models/component_group.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { SNComponent, ComponentArea, removeFromArray, addIfUnique } from 'snjs';
import { WebApplication } from './application';
import { UuidString } from '@/../../../../snjs/dist/@types/types';
import { UuidString } from '@node_modules/snjs/dist/@types/types';

/** Areas that only allow a single component to be active */
const SingleComponentAreas = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
STRING_DEFAULT_FILE_ERROR
} from '@/strings';
import { PureViewCtrl } from '@Views/abstract/pure_view_ctrl';
import { PermissionDialog } from '@/../../../../snjs/dist/@types/services/component_manager';
import { PermissionDialog } from '@node_modules/snjs/dist/@types/services/component_manager';

class ApplicationViewCtrl extends PureViewCtrl {
private $compile?: ng.ICompileService
Expand Down
1 change: 0 additions & 1 deletion app/assets/javascripts/views/editor/editor_view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ import {
StringDeleteNote,
StringEmptyTrash
} from '@/strings';
import { RawPayload } from '@/../../../../snjs/dist/@types/protocol/payloads/generator';

const NOTE_PREVIEW_CHAR_LIMIT = 80;
const MINIMUM_STATUS_DURATION = 400;
Expand Down
2 changes: 1 addition & 1 deletion app/assets/javascripts/views/footer/footer_view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {
STRING_NEW_UPDATE_READY
} from '@/strings';
import { PureViewCtrl } from '@Views/abstract/pure_view_ctrl';
import { ComponentMutator } from '@/../../../../snjs/dist/@types/models';
import { ComponentMutator } from '@node_modules/snjs/dist/@types/models';

type DockShortcut = {
name: string,
Expand Down
2 changes: 1 addition & 1 deletion app/assets/javascripts/views/notes/notes_view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import {
NoteSortKey,
notePassesFilter
} from './note_utils';
import { UuidString } from '@/../../../../snjs/dist/@types/types';
import { UuidString } from '@node_modules/snjs/dist/@types/types';

type NotesState = {
panelTitle: string
Expand Down
4 changes: 2 additions & 2 deletions app/assets/javascripts/views/tags/tags_view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ import { AppStateEvent } from '@/ui_models/app_state';
import { PANEL_NAME_TAGS } from '@/views/constants';
import { STRING_DELETE_TAG } from '@/strings';
import { PureViewCtrl } from '@Views/abstract/pure_view_ctrl';
import { UuidString } from '@/../../../../snjs/dist/@types/types';
import { TagMutator } from '@/../../../../snjs/dist/@types/models/app/tag';
import { UuidString } from '@node_modules/snjs/dist/@types/types';
import { TagMutator } from '@node_modules/snjs/dist/@types/models/app/tag';

type NoteCounts = Partial<Record<string, number>>

Expand Down
2 changes: 1 addition & 1 deletion dist/@types/app/assets/javascripts/database.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { SNAlertService } from "../../../../snjs/dist/@types";
import { SNAlertService } from "@node_modules/snjs/dist/@types";
export declare class Database {
private locked;
private alertService?;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ export { elemReady } from './elemReady';
export { fileChange } from './file-change';
export { infiniteScroll } from './infiniteScroll';
export { lowercase } from './lowercase';
export { selectOnClick } from './selectOnClick';
export { selectOnFocus } from './selectOnFocus';
export { snEnter } from './snEnter';
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/// <reference types="angular" />
export declare function selectOnFocus($window: ng.IWindowService): {
restrict: string;
link: (scope: import("angular").IScope, element: JQLite) => void;
};
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { SNPredicate, ApplicationService } from 'snjs';
import { PayloadContent } from '@/../../../../snjs/dist/@types/protocol/payloads/generator';
import { PayloadContent } from '@node_modules/snjs/dist/@types/protocol/payloads/generator';
/** A class for handling installation of system extensions */
export declare class NativeExtManager extends ApplicationService {
extManagerId: string;
Expand Down
8 changes: 5 additions & 3 deletions dist/@types/app/assets/javascripts/services/themeManager.d.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
import { WebApplication } from '@/ui_models/application';
import { ApplicationService } from 'snjs';
import { ApplicationService, ApplicationEvent } from 'snjs';
export declare class ThemeManager extends ApplicationService {
private activeThemes;
private unsubState;
private unregisterDesktop;
private unregisterComponent;
constructor(application: WebApplication);
/** @override */
onAppLaunch(): Promise<void>;
onAppEvent(event: ApplicationEvent): void;
get webApplication(): WebApplication;
deinit(): void;
/** @override */
onAppStart(): Promise<void>;
private activateCachedThemes;
private registerObservers;
deactivateAllThemes(): void;
private deactivateAllThemes;
private activateTheme;
private deactivateTheme;
private cacheThemes;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { SNComponent, ComponentArea } from 'snjs';
import { WebApplication } from './application';
import { UuidString } from '@/../../../../snjs/dist/@types/types';
import { UuidString } from '@node_modules/snjs/dist/@types/types';
export declare class ComponentGroup {
private application;
changeObservers: any[];
activeComponents: UuidString[];
constructor(application: WebApplication);
get componentManager(): import("../../../../../snjs/dist/@types").SNComponentManager;
get componentManager(): import("snjs/dist/@types").SNComponentManager;
deinit(): void;
activateComponent(component: SNComponent): Promise<void>;
deactivateComponent(component: SNComponent, notify?: boolean): Promise<void>;
Expand Down
6 changes: 3 additions & 3 deletions dist/@types/app/assets/javascripts/ui_models/editor.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export declare class Editor {
constructor(application: WebApplication, noteUuid?: string, noteTitle?: string);
deinit(): void;
private handleNoteStream;
insertTemplatedNote(): Promise<import("../../../../../snjs/dist/@types").SNItem>;
insertTemplatedNote(): Promise<import("snjs/dist/@types").SNItem>;
/**
* Reverts the editor to a blank state, removing any existing note from view,
* and creating a placeholder note.
Expand All @@ -19,12 +19,12 @@ export declare class Editor {
/**
* Register to be notified when the editor's note changes.
*/
onNoteChange(onNoteChange: () => void): void;
onNoteChange(callback: () => void): void;
/**
* Register to be notified when the editor's note's values change
* (and thus a new object reference is created)
*/
onNoteValueChange(onNoteValueChange: (note: SNNote, source?: PayloadSource) => void): void;
onNoteValueChange(callback: (note: SNNote, source?: PayloadSource) => void): void;
/**
* Sets the editor contents by setting its note.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,6 @@ export declare class PureViewCtrl {
onAppStart(): Promise<void>;
onAppLaunch(): Promise<void>;
onAppKeyChange(): Promise<void>;
onAppSync(): void;
onAppIncrementalSync(): void;
onAppFullSync(): void;
}
Loading

0 comments on commit 78e4ae0

Please sign in to comment.