@stratusjs/angular 0.5.12 → 0.5.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/angular.bundle.js +32 -10
- package/dist/angular.bundle.min.js +1 -1
- package/package.json +1 -1
- package/src/app.module.js +5 -45
- package/src/app.module.js.map +1 -1
- package/src/app.module.min.js +1 -1
- package/src/app.module.ts +5 -273
- package/src/editor/editor.component.js +1 -0
- package/src/editor/editor.component.js.map +1 -1
- package/src/editor/editor.component.min.js +1 -1
- package/src/editor/editor.component.ts +5 -1
- package/src/editor/link-dialog.component.html +2 -1
- package/src/editor/link-dialog.component.js.map +1 -1
- package/src/editor/link-dialog.component.min.html +1 -1
- package/src/editor/link-dialog.component.ts +2 -1
- package/src/froala/plugins/inputButton.js +18 -1
- package/src/froala/plugins/inputButton.js.map +1 -1
- package/src/froala/plugins/inputButton.min.js +1 -1
- package/src/froala/plugins/inputButton.ts +28 -8
- package/src/froala/plugins/linkManager.js +26 -11
- package/src/froala/plugins/linkManager.js.map +1 -1
- package/src/froala/plugins/linkManager.min.js +1 -1
- package/src/froala/plugins/linkManager.ts +49 -9
- package/src/main.js.map +1 -1
- package/src/main.ts +3 -0
package/dist/angular.bundle.js
CHANGED
|
@@ -80793,6 +80793,9 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
|
|
|
80793
80793
|
this.saveSelection();
|
|
80794
80794
|
}
|
|
80795
80795
|
this.updateSnapshot();
|
|
80796
|
+
if (this.debug) {
|
|
80797
|
+
console.log(`[${this.eventName}]:`, { instance, data });
|
|
80798
|
+
}
|
|
80796
80799
|
instance.trigger(this.eventName, data, this);
|
|
80797
80800
|
}
|
|
80798
80801
|
trigger(name, data, callee) {
|
|
@@ -80807,7 +80810,7 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
|
|
|
80807
80810
|
console.warn(`${this.name}.trigger(): unable to inject html without a set editor.`);
|
|
80808
80811
|
return;
|
|
80809
80812
|
}
|
|
80810
|
-
if (['insert', 'restore'].includes(name)) {
|
|
80813
|
+
if (!['insert', 'restore'].includes(name)) {
|
|
80811
80814
|
console.warn(`${this.name}.trigger():`, name, 'event is not supported.');
|
|
80812
80815
|
return;
|
|
80813
80816
|
}
|
|
@@ -80835,7 +80838,13 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
|
|
|
80835
80838
|
console.warn(`${this.name}.restoreSnapshot(): unable to restore editor session without a snapshot.`);
|
|
80836
80839
|
return false;
|
|
80837
80840
|
}
|
|
80841
|
+
if (this.debug) {
|
|
80842
|
+
console.log('[restoreSnapshot]is focused:', this.editor.core.hasFocus());
|
|
80843
|
+
}
|
|
80844
|
+
this.editor.events.disableBlur();
|
|
80845
|
+
this.editor.events.focus();
|
|
80838
80846
|
this.editor.snapshot.restore(this.snapshot);
|
|
80847
|
+
this.editor.events.enableBlur();
|
|
80839
80848
|
return true;
|
|
80840
80849
|
}
|
|
80841
80850
|
updateSnapshot() {
|
|
@@ -80849,7 +80858,13 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
|
|
|
80849
80858
|
console.warn(`${this.name}.restoreSelection(): unable to restore editor selection.`);
|
|
80850
80859
|
return false;
|
|
80851
80860
|
}
|
|
80861
|
+
if (this.debug) {
|
|
80862
|
+
console.log('[restoreSelection]is focused:', this.editor.core.hasFocus());
|
|
80863
|
+
}
|
|
80864
|
+
this.editor.events.disableBlur();
|
|
80865
|
+
this.editor.events.focus();
|
|
80852
80866
|
this.editor.selection.restore();
|
|
80867
|
+
this.editor.events.enableBlur();
|
|
80853
80868
|
return true;
|
|
80854
80869
|
}
|
|
80855
80870
|
saveSelection() {
|
|
@@ -80857,7 +80872,9 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
|
|
|
80857
80872
|
console.warn(`${this.name}.saveSelection(): unable to save editor selection.`);
|
|
80858
80873
|
return false;
|
|
80859
80874
|
}
|
|
80875
|
+
this.editor.events.disableBlur();
|
|
80860
80876
|
this.editor.selection.save();
|
|
80877
|
+
this.editor.events.enableBlur();
|
|
80861
80878
|
return true;
|
|
80862
80879
|
}
|
|
80863
80880
|
clearSelection() {
|
|
@@ -81033,9 +81050,10 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
|
|
|
81033
81050
|
});
|
|
81034
81051
|
FroalaEditor.PLUGINS.linkManager = function linkManager(editor) {
|
|
81035
81052
|
let inputButton;
|
|
81036
|
-
const linkPlugin = FroalaEditor.PLUGINS.link(editor);
|
|
81037
81053
|
const debug = false;
|
|
81038
81054
|
function _init() {
|
|
81055
|
+
this.uid = uniqueId$3(`froala_link_manager_`);
|
|
81056
|
+
Stratus.Instances[this.uid] = this;
|
|
81039
81057
|
inputButton = new InputButtonPlugin({
|
|
81040
81058
|
name: 'Link Manager',
|
|
81041
81059
|
eventName: 'link-library',
|
|
@@ -81048,19 +81066,22 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
|
|
|
81048
81066
|
if (link.target) {
|
|
81049
81067
|
attrs.target = '_blank';
|
|
81050
81068
|
}
|
|
81051
|
-
|
|
81069
|
+
editor.link.insert(link.url, link.text, attrs);
|
|
81052
81070
|
},
|
|
81053
81071
|
autoSaveSelection: true,
|
|
81054
81072
|
autoRestoreSelection: true,
|
|
81055
81073
|
debug
|
|
81056
81074
|
});
|
|
81075
|
+
this.inputButton = inputButton;
|
|
81076
|
+
this.editor = editor;
|
|
81057
81077
|
}
|
|
81058
|
-
function onClick() {
|
|
81078
|
+
function onClick(el, data) {
|
|
81059
81079
|
if (!editor.el) {
|
|
81060
81080
|
console.warn('linkManager.onClick(): unable to find element');
|
|
81061
81081
|
return;
|
|
81062
81082
|
}
|
|
81063
|
-
|
|
81083
|
+
const link = editor.link.get();
|
|
81084
|
+
inputButton.onClick(editor.el, link);
|
|
81064
81085
|
}
|
|
81065
81086
|
return {
|
|
81066
81087
|
_init,
|
|
@@ -81070,10 +81091,11 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
|
|
|
81070
81091
|
FroalaEditor.RegisterCommand('linkManager', {
|
|
81071
81092
|
title: 'Insert from Link Library',
|
|
81072
81093
|
undo: false,
|
|
81073
|
-
focus:
|
|
81094
|
+
focus: true,
|
|
81074
81095
|
modal: true,
|
|
81096
|
+
refreshOnCallback: false,
|
|
81075
81097
|
callback() {
|
|
81076
|
-
this.linkManager.onClick(
|
|
81098
|
+
this.linkManager.onClick();
|
|
81077
81099
|
},
|
|
81078
81100
|
plugin: 'linkManager',
|
|
81079
81101
|
}),
|
|
@@ -81084,7 +81106,7 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
|
|
|
81084
81106
|
focus: false,
|
|
81085
81107
|
modal: true,
|
|
81086
81108
|
callback() {
|
|
81087
|
-
this.linkManager.onClick(undefined,
|
|
81109
|
+
this.linkManager.onClick(undefined, this.link.get());
|
|
81088
81110
|
},
|
|
81089
81111
|
plugin: 'linkManager',
|
|
81090
81112
|
}),
|
|
@@ -81101,7 +81123,7 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
|
|
|
81101
81123
|
eventName: 'link-library',
|
|
81102
81124
|
editor: this,
|
|
81103
81125
|
insert: (link) => {
|
|
81104
|
-
|
|
81126
|
+
this.link.insert(link.url, '', { 'aria-label': link.title });
|
|
81105
81127
|
},
|
|
81106
81128
|
autoSaveSelection: true,
|
|
81107
81129
|
autoRestoreSelection: true,
|
|
@@ -84731,6 +84753,7 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
|
|
|
84731
84753
|
fromTextArea: (el, opts) => {
|
|
84732
84754
|
const extensions = [
|
|
84733
84755
|
basicSetup,
|
|
84756
|
+
EditorView.lineWrapping,
|
|
84734
84757
|
html({}),
|
|
84735
84758
|
];
|
|
84736
84759
|
if (cookie('dark')) {
|
|
@@ -129759,7 +129782,6 @@ System.register(['@stratusjs/runtime/stratus', 'lodash', '@stratusjs/core/enviro
|
|
|
129759
129782
|
var __metadata = (undefined && undefined.__metadata) || function (k, v) {
|
|
129760
129783
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
129761
129784
|
};
|
|
129762
|
-
if (cookie('env')) ;
|
|
129763
129785
|
let AppModule = exports('AppModule', class AppModule {
|
|
129764
129786
|
constructor() {
|
|
129765
129787
|
this.initialTimeout = 1000;
|