@stratusjs/angular 0.5.0 → 0.5.2
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 +30609 -2673
- package/dist/angular.bundle.min.js +1 -1
- package/package.json +5 -4
- package/src/angular.modules.js +18 -33
- package/src/angular.modules.js.map +1 -1
- package/src/app.module.js +181 -227
- package/src/app.module.js.map +1 -1
- package/src/app.module.min.js +1 -1
- package/src/app.module.ts +17 -17
- package/src/backend.service.js +66 -87
- package/src/backend.service.js.map +1 -1
- package/src/base/base.component.js +101 -124
- package/src/base/base.component.js.map +1 -1
- package/src/boot.js +42 -55
- package/src/boot.js.map +1 -1
- package/src/confirm-dialog/confirm-dialog.component.js +41 -60
- package/src/confirm-dialog/confirm-dialog.component.js.map +1 -1
- package/src/core/base.interface.js +1 -9
- package/src/core/base.interface.js.map +1 -1
- package/src/core/dialog.interface.js.map +1 -0
- package/src/core/refresh.interface.js +1 -9
- package/src/core/refresh.interface.js.map +1 -1
- package/src/core/responsive.component.js +40 -58
- package/src/core/responsive.component.js.map +1 -1
- package/src/core/responsive.interface.js +1 -9
- package/src/core/responsive.interface.js.map +1 -1
- package/src/core/root.component.js +24 -43
- package/src/core/root.component.js.map +1 -1
- package/src/core/trigger.interface.js +1 -9
- package/src/core/trigger.interface.js.map +1 -1
- package/src/data/contact-meta.interface.js +1 -9
- package/src/data/contact-meta.interface.js.map +1 -1
- package/src/data/content.interface.js +1 -9
- package/src/data/content.interface.js.map +1 -1
- package/src/data/convoy.interface.js +1 -9
- package/src/data/convoy.interface.js.map +1 -1
- package/src/editor/citation-dialog.component.js +174 -207
- package/src/editor/citation-dialog.component.js.map +1 -1
- package/src/editor/code-mirror-bridge.js +63 -0
- package/src/editor/code-mirror-bridge.js.map +1 -0
- package/src/editor/code-mirror-bridge.min.js +1 -0
- package/src/editor/code-mirror-bridge.ts +85 -0
- package/src/editor/code-view-dialog.component.js +87 -116
- package/src/editor/code-view-dialog.component.js.map +1 -1
- package/src/editor/editor.component.js +903 -925
- package/src/editor/editor.component.js.map +1 -1
- package/src/editor/editor.component.min.js +1 -1
- package/src/editor/editor.component.ts +60 -21
- package/src/editor/link-dialog.component.js +356 -395
- package/src/editor/link-dialog.component.js.map +1 -1
- package/src/editor/media-dialog.component.js +270 -303
- package/src/editor/media-dialog.component.js.map +1 -1
- package/src/froala/plugins/citationManager.js +170 -191
- package/src/froala/plugins/citationManager.js.map +1 -1
- package/src/froala/plugins/inputButton.js +122 -138
- package/src/froala/plugins/inputButton.js.map +1 -1
- package/src/froala/plugins/linkManager.js +89 -104
- package/src/froala/plugins/linkManager.js.map +1 -1
- package/src/froala/plugins/mediaManager.js +72 -87
- package/src/froala/plugins/mediaManager.js.map +1 -1
- package/src/froala/plugins/menuButton.js +71 -86
- package/src/froala/plugins/menuButton.js.map +1 -1
- package/src/main.js +13 -33
- package/src/main.js.map +1 -1
- package/src/material.js +99 -194
- package/src/material.js.map +1 -1
- package/src/media-selector/media-selector.component.js +406 -441
- package/src/media-selector/media-selector.component.js.map +1 -1
- package/src/polyfills.js +3 -16
- package/src/polyfills.js.map +1 -1
- package/src/quill-plugins/quill-break-blot.plugin.js +19 -35
- package/src/quill-plugins/quill-break-blot.plugin.js.map +1 -1
- package/src/quill-plugins/quill-html-edit.plugin.js +140 -153
- package/src/quill-plugins/quill-html-edit.plugin.js.map +1 -1
- package/src/quill-plugins/quill-image-format.plugin.js +33 -47
- package/src/quill-plugins/quill-image-format.plugin.js.map +1 -1
- package/src/quill-plugins/quill-input-button.plugin.js +77 -95
- package/src/quill-plugins/quill-input-button.plugin.js.map +1 -1
- package/src/selector/selector.component.js +241 -276
- package/src/selector/selector.component.js.map +1 -1
- package/src/test/test.directive.js +49 -66
- package/src/test/test.directive.js.map +1 -1
- package/src/tree/tree-dialog.component.js +202 -231
- package/src/tree/tree-dialog.component.js.map +1 -1
- package/src/tree/tree-node.component.js +253 -279
- package/src/tree/tree-node.component.js.map +1 -1
- package/src/tree/tree-node.component.min.js +1 -1
- package/src/tree/tree-node.component.ts +10 -18
- package/src/tree/tree.component.js +531 -568
- package/src/tree/tree.component.js.map +1 -1
- package/src/tree/tree.component.min.js +1 -1
- package/src/tree/tree.component.ts +7 -10
|
@@ -1,98 +1,80 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
-
],
|
|
17
|
-
execute: function () {
|
|
18
|
-
QuillInputButtonPlugin = class QuillInputButtonPlugin {
|
|
19
|
-
constructor(quill, options) {
|
|
20
|
-
this.debug = false;
|
|
21
|
-
this.buttonHTML = '<i class="fas fa-carrot"></i>';
|
|
22
|
-
this.buttonTitle = 'Input Button';
|
|
23
|
-
this.name = 'inputButton';
|
|
24
|
-
this.eventName = 'input-button';
|
|
25
|
-
this.uid = lodash_1.default.uniqueId(`quill_input_button_`);
|
|
26
|
-
stratus_1.Stratus.Instances[this.uid] = this;
|
|
27
|
-
this.debug = options && options.debug;
|
|
28
|
-
if (!options || typeof options !== 'object') {
|
|
29
|
-
options = {};
|
|
30
|
-
}
|
|
31
|
-
this.buttonHTML = options.buttonHTML || this.buttonHTML;
|
|
32
|
-
this.buttonTitle = options.buttonTitle || this.buttonTitle;
|
|
33
|
-
this.name = options.name || this.name;
|
|
34
|
-
this.eventName = options.eventName || this.eventName;
|
|
35
|
-
this.createToolbarModule(quill);
|
|
36
|
-
}
|
|
37
|
-
createToolbarModule(quill) {
|
|
38
|
-
const toolbarModule = quill.getModule('toolbar');
|
|
39
|
-
if (!toolbarModule) {
|
|
40
|
-
throw new Error(`quill.${this.name} requires the "toolbar" module`);
|
|
41
|
-
}
|
|
42
|
-
this.registerDivModule();
|
|
43
|
-
const toolbarEl = toolbarModule.container;
|
|
44
|
-
const buttonContainer = document.createElement('span');
|
|
45
|
-
buttonContainer.setAttribute('class', 'ql-formats');
|
|
46
|
-
const button = document.createElement('button');
|
|
47
|
-
button.innerHTML = this.buttonHTML;
|
|
48
|
-
button.title = this.buttonTitle;
|
|
49
|
-
button.onclick = (e) => {
|
|
50
|
-
e.preventDefault();
|
|
51
|
-
this.onClick(quill);
|
|
52
|
-
};
|
|
53
|
-
buttonContainer.appendChild(button);
|
|
54
|
-
toolbarEl.appendChild(buttonContainer);
|
|
55
|
-
}
|
|
56
|
-
registerDivModule() {
|
|
57
|
-
const Block = quill_1.default.import('blots/block');
|
|
58
|
-
class Div extends Block {
|
|
59
|
-
}
|
|
60
|
-
Div.tagName = 'div';
|
|
61
|
-
Div.blotName = 'div';
|
|
62
|
-
Div.allowedChildren = Block.allowedChildren;
|
|
63
|
-
Div.allowedChildren.push(Block);
|
|
64
|
-
quill_1.default.register(Div);
|
|
65
|
-
}
|
|
66
|
-
findUID(el) {
|
|
67
|
-
if ('uid' in el.dataset) {
|
|
68
|
-
return el.dataset.uid;
|
|
69
|
-
}
|
|
70
|
-
return this.findUID(el.parentElement);
|
|
71
|
-
}
|
|
72
|
-
getInstance(uid) {
|
|
73
|
-
if (!(uid in stratus_1.Stratus.Instances)) {
|
|
74
|
-
return undefined;
|
|
75
|
-
}
|
|
76
|
-
return stratus_1.Stratus.Instances[uid];
|
|
77
|
-
}
|
|
78
|
-
onClick(quill) {
|
|
79
|
-
const container = quill.container;
|
|
80
|
-
const uid = this.findUID(container);
|
|
81
|
-
const instance = this.getInstance(uid);
|
|
82
|
-
if (!instance) {
|
|
83
|
-
return;
|
|
84
|
-
}
|
|
85
|
-
instance.trigger(this.eventName, null, this);
|
|
86
|
-
}
|
|
87
|
-
trigger(name, data, callee) {
|
|
88
|
-
if (this.debug) {
|
|
89
|
-
console.log(`quill.${this.name}.trigger:`, name, data, callee);
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
};
|
|
93
|
-
exports_1("QuillInputButtonPlugin", QuillInputButtonPlugin);
|
|
1
|
+
import { Stratus } from '@stratusjs/runtime/stratus';
|
|
2
|
+
import _ from 'lodash';
|
|
3
|
+
import Quill from 'quill';
|
|
4
|
+
export class QuillInputButtonPlugin {
|
|
5
|
+
constructor(quill, options) {
|
|
6
|
+
this.debug = false;
|
|
7
|
+
this.buttonHTML = '<i class="fas fa-carrot"></i>';
|
|
8
|
+
this.buttonTitle = 'Input Button';
|
|
9
|
+
this.name = 'inputButton';
|
|
10
|
+
this.eventName = 'input-button';
|
|
11
|
+
this.uid = _.uniqueId(`quill_input_button_`);
|
|
12
|
+
Stratus.Instances[this.uid] = this;
|
|
13
|
+
this.debug = options && options.debug;
|
|
14
|
+
if (!options || typeof options !== 'object') {
|
|
15
|
+
options = {};
|
|
94
16
|
}
|
|
95
|
-
|
|
96
|
-
|
|
17
|
+
this.buttonHTML = options.buttonHTML || this.buttonHTML;
|
|
18
|
+
this.buttonTitle = options.buttonTitle || this.buttonTitle;
|
|
19
|
+
this.name = options.name || this.name;
|
|
20
|
+
this.eventName = options.eventName || this.eventName;
|
|
21
|
+
this.createToolbarModule(quill);
|
|
22
|
+
}
|
|
23
|
+
createToolbarModule(quill) {
|
|
24
|
+
const toolbarModule = quill.getModule('toolbar');
|
|
25
|
+
if (!toolbarModule) {
|
|
26
|
+
throw new Error(`quill.${this.name} requires the "toolbar" module`);
|
|
27
|
+
}
|
|
28
|
+
this.registerDivModule();
|
|
29
|
+
const toolbarEl = toolbarModule.container;
|
|
30
|
+
const buttonContainer = document.createElement('span');
|
|
31
|
+
buttonContainer.setAttribute('class', 'ql-formats');
|
|
32
|
+
const button = document.createElement('button');
|
|
33
|
+
button.innerHTML = this.buttonHTML;
|
|
34
|
+
button.title = this.buttonTitle;
|
|
35
|
+
button.onclick = (e) => {
|
|
36
|
+
e.preventDefault();
|
|
37
|
+
this.onClick(quill);
|
|
38
|
+
};
|
|
39
|
+
buttonContainer.appendChild(button);
|
|
40
|
+
toolbarEl.appendChild(buttonContainer);
|
|
41
|
+
}
|
|
42
|
+
registerDivModule() {
|
|
43
|
+
const Block = Quill.import('blots/block');
|
|
44
|
+
class Div extends Block {
|
|
45
|
+
}
|
|
46
|
+
Div.tagName = 'div';
|
|
47
|
+
Div.blotName = 'div';
|
|
48
|
+
Div.allowedChildren = Block.allowedChildren;
|
|
49
|
+
Div.allowedChildren.push(Block);
|
|
50
|
+
Quill.register(Div);
|
|
51
|
+
}
|
|
52
|
+
findUID(el) {
|
|
53
|
+
if ('uid' in el.dataset) {
|
|
54
|
+
return el.dataset.uid;
|
|
55
|
+
}
|
|
56
|
+
return this.findUID(el.parentElement);
|
|
57
|
+
}
|
|
58
|
+
getInstance(uid) {
|
|
59
|
+
if (!(uid in Stratus.Instances)) {
|
|
60
|
+
return undefined;
|
|
61
|
+
}
|
|
62
|
+
return Stratus.Instances[uid];
|
|
63
|
+
}
|
|
64
|
+
onClick(quill) {
|
|
65
|
+
const container = quill.container;
|
|
66
|
+
const uid = this.findUID(container);
|
|
67
|
+
const instance = this.getInstance(uid);
|
|
68
|
+
if (!instance) {
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
instance.trigger(this.eventName, null, this);
|
|
72
|
+
}
|
|
73
|
+
trigger(name, data, callee) {
|
|
74
|
+
if (this.debug) {
|
|
75
|
+
console.log(`quill.${this.name}.trigger:`, name, data, callee);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
97
79
|
|
|
98
80
|
//# sourceMappingURL=quill-input-button.plugin.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["quill-input-button.plugin.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["quill-input-button.plugin.ts"],"names":[],"mappings":"AACA,OAAO,EACH,OAAO,EACV,MAAM,4BAA4B,CAAA;AAMnC,OAAO,CAAC,MAAM,QAAQ,CAAA;AAGtB,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,MAAM,OAAO,sBAAsB;IAY/B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