Compiled build

This commit is contained in:
Mo Bitar
2020-04-13 15:01:06 -05:00
parent 7ee9610dca
commit 31384023d1
14 changed files with 90730 additions and 44 deletions

View File

@@ -236,13 +236,6 @@ class TagsPanelCtrl extends PureCtrl {
}
async selectTag(tag: SNTag) {
if (tag.isSmartTag()) {
Object.defineProperty(tag, 'notes', {
get: () => {
return this.application.notesMatchingSmartTag(tag as SNSmartTag);
}
});
}
if (tag.conflictOf) {
this.application.changeAndSaveItem(tag.uuid, (mutator) => {
mutator.conflictOf = undefined;

View File

@@ -1,11 +1,9 @@
import { SNComponent, PurePayload } from 'snjs';
import { SNComponent, PurePayload, ComponentMutator, AppDataField } from 'snjs';
/* eslint-disable camelcase */
import { WebApplication } from '@/application';
// An interface used by the Desktop app to interact with SN
import { isDesktopApplication } from '@/utils';
import { EncryptionIntent, ApplicationService, ApplicationEvent, removeFromArray } from 'snjs';
import { ComponentMutator } from '@/../../../../snjs/dist/@types/models';
import { AppDataField } from '@/../../../../snjs/dist/@types/models/core/item';
type UpdateObserverCallback = (component: SNComponent) => void
type ComponentActivationCallback = (payload: PurePayload) => void

View File

@@ -4,11 +4,13 @@ import {
ContentType,
SNComponent,
ApplicationService,
ComponentAction
ComponentAction,
FillItemContent,
ComponentMutator,
Copy
} from 'snjs';
import { PayloadContent } from '@/../../../../snjs/dist/@types/protocol/payloads/generator';
import { FillItemContent } from '@/../../../../snjs/dist/@types/models/generator';
import { ComponentMutator } from '@/../../../../snjs/dist/@types/models';
import { ComponentPermission } from '@/../../../../snjs/dist/@types/models/app/component';
/** A class for handling installation of system extensions */
export class NativeExtManager extends ApplicationService {
@@ -77,7 +79,7 @@ export class NativeExtManager extends ApplicationService {
}
}
// Handle addition of SN|ExtensionRepo permission
const permissions = extensionsManager!.permissions.slice();
const permissions = Copy(extensionsManager!.permissions) as ComponentPermission[];
const permission = permissions.find((p) => {
return p.name === ComponentAction.StreamItems
});
@@ -155,7 +157,7 @@ export class NativeExtManager extends ApplicationService {
}
}
// Handle addition of SN|ExtensionRepo permission
const permissions = batchManager!.permissions.slice();
const permissions = Copy(batchManager!.permissions) as ComponentPermission[];
const permission = permissions.find((p) => {
return p.name === ComponentAction.StreamItems
});

View File

@@ -5,9 +5,9 @@ import {
ApplicationService,
SNUserPrefs,
WebPrefKey,
UserPrefsMutator
UserPrefsMutator,
FillItemContent
} from 'snjs';
import { FillItemContent } from '@/../../../../snjs/dist/@types/models/generator';
export class PreferencesManager extends ApplicationService {

View File

@@ -1,7 +1,7 @@
import { WebApplication } from './../application';
import { isDesktopApplication } from '@/utils';
import pull from 'lodash/pull';
import { ProtectedAction, ApplicationEvent, SNTag, SNNote, SNUserPrefs, ContentType } from 'snjs';
import { ProtectedAction, ApplicationEvent, SNTag, SNNote, SNUserPrefs, ContentType, SNSmartTag } from 'snjs';
export enum AppStateEvent {
TagChanged = 1,
@@ -119,7 +119,6 @@ export class AppState {
});
} else {
/* Tab visibility listener, web only */
this.onVisibilityChange = this.onVisibilityChange.bind(this);
document.addEventListener('visibilitychange', this.onVisibilityChange);
}
}
@@ -197,9 +196,13 @@ export class AppState {
/** Returns the notes this tag references */
getTagNotes(tag: SNTag) {
return this.application.referencesForItem(tag).filter((ref) => {
return ref.content_type === tag.content_type;
}) as SNNote[]
if(tag.isSmartTag()) {
return this.application.notesMatchingSmartTag(tag as SNSmartTag);
} else {
return this.application.referencesForItem(tag).filter((ref) => {
return ref.content_type === tag.content_type;
}) as SNNote[]
}
}
getSelectedTag() {

View File

@@ -7,7 +7,7 @@
target='blank'
)
menu-row(label="'Download Actions'")
div(ng-repeat='extension in self.state.extensions')
div(ng-repeat='extension in self.state.extensions track by extension.uuid')
.sk-menu-panel-header(
ng-click='extension.hide = !extension.hide; $event.stopPropagation();'
)

View File

@@ -9,7 +9,7 @@
label="'Plain Editor'"
)
menu-row(
ng-repeat='editor in self.state.editors'
ng-repeat='editor in self.state.editors track by editor.uuid'
action='self.selectComponent(editor)',
button-action='self.toggleDefaultForEditor(editor)',
button-class="self.state.defaultEditor == editor ? 'warning' : 'info'",

View File

@@ -240,7 +240,7 @@
.left
.sk-app-bar-item(
ng-click='self.toggleStackComponentForCurrentItem(component)',
ng-repeat='component in self.state.componentStack'
ng-repeat='component in self.state.componentStack track by component.uuid'
)
.sk-app-bar-item-column
.sk-circle.small(
@@ -253,7 +253,7 @@
component='component',
manual-dealloc='true',
ng-if='component.active',
ng-repeat='component in self.state.componentStack',
ng-repeat='component in self.state.componentStack track by component.uuid',
ng-show='!component.hidden',
application='self.application'
)

View File

@@ -20,7 +20,7 @@
.tag(
ng-class="{'selected' : self.state.selectedTag == tag, 'faded' : !tag.content.isAllTag}",
ng-click='self.selectTag(tag)',
ng-repeat='tag in self.state.smartTags'
ng-repeat='tag in self.state.smartTags track by tag.uuid'
)
.tag-info
input.title(

88076
dist/javascripts/app.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

2642
dist/stylesheets/app.css vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -3,7 +3,7 @@ const webpack = require('webpack');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const CopyPlugin = require('copy-webpack-plugin');
module.exports = {
entry: './app/assets/javascripts/index.js',
entry: './app/assets/javascripts/index.ts',
output: {
filename: './javascripts/app.js'
},