@stratusjs/angular 0.5.2 → 0.5.3
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.min.js +1 -1
- package/package.json +1 -1
- package/src/angular.modules.js +33 -18
- package/src/angular.modules.js.map +1 -1
- package/src/app.module.js +254 -181
- package/src/app.module.js.map +1 -1
- package/src/backend.service.js +87 -66
- package/src/backend.service.js.map +1 -1
- package/src/base/base.component.js +124 -101
- package/src/base/base.component.js.map +1 -1
- package/src/boot.js +55 -42
- package/src/boot.js.map +1 -1
- package/src/confirm-dialog/confirm-dialog.component.js +60 -41
- package/src/confirm-dialog/confirm-dialog.component.js.map +1 -1
- package/src/core/base.interface.js +9 -1
- package/src/core/base.interface.js.map +1 -1
- package/src/core/refresh.interface.js +9 -1
- package/src/core/refresh.interface.js.map +1 -1
- package/src/core/responsive.component.js +58 -40
- package/src/core/responsive.component.js.map +1 -1
- package/src/core/responsive.interface.js +9 -1
- package/src/core/responsive.interface.js.map +1 -1
- package/src/core/root.component.js +43 -24
- package/src/core/root.component.js.map +1 -1
- package/src/core/trigger.interface.js +9 -1
- package/src/core/trigger.interface.js.map +1 -1
- package/src/data/contact-meta.interface.js +9 -1
- package/src/data/contact-meta.interface.js.map +1 -1
- package/src/data/content.interface.js +9 -1
- package/src/data/content.interface.js.map +1 -1
- package/src/data/convoy.interface.js +9 -1
- package/src/data/convoy.interface.js.map +1 -1
- package/src/editor/citation-dialog.component.js +207 -174
- package/src/editor/citation-dialog.component.js.map +1 -1
- package/src/editor/code-mirror-bridge.js +74 -60
- package/src/editor/code-mirror-bridge.js.map +1 -1
- package/src/editor/code-mirror-bridge.min.js +1 -1
- package/src/editor/code-view-dialog.component.js +116 -87
- package/src/editor/code-view-dialog.component.js.map +1 -1
- package/src/editor/editor.component.js +961 -903
- package/src/editor/editor.component.js.map +1 -1
- package/src/editor/link-dialog.component.js +395 -356
- package/src/editor/link-dialog.component.js.map +1 -1
- package/src/editor/media-dialog.component.js +303 -270
- package/src/editor/media-dialog.component.js.map +1 -1
- package/src/froala/plugins/citationManager.js +191 -170
- package/src/froala/plugins/citationManager.js.map +1 -1
- package/src/froala/plugins/inputButton.js +138 -122
- package/src/froala/plugins/inputButton.js.map +1 -1
- package/src/froala/plugins/linkManager.js +104 -89
- package/src/froala/plugins/linkManager.js.map +1 -1
- package/src/froala/plugins/mediaManager.js +87 -72
- package/src/froala/plugins/mediaManager.js.map +1 -1
- package/src/froala/plugins/menuButton.js +86 -71
- package/src/froala/plugins/menuButton.js.map +1 -1
- package/src/main.js +33 -13
- package/src/main.js.map +1 -1
- package/src/material.js +194 -99
- package/src/material.js.map +1 -1
- package/src/media-selector/media-selector.component.js +441 -406
- package/src/media-selector/media-selector.component.js.map +1 -1
- package/src/polyfills.js +16 -3
- package/src/polyfills.js.map +1 -1
- package/src/quill-plugins/quill-break-blot.plugin.js +35 -19
- package/src/quill-plugins/quill-break-blot.plugin.js.map +1 -1
- package/src/quill-plugins/quill-html-edit.plugin.js +153 -140
- package/src/quill-plugins/quill-html-edit.plugin.js.map +1 -1
- package/src/quill-plugins/quill-image-format.plugin.js +47 -33
- package/src/quill-plugins/quill-image-format.plugin.js.map +1 -1
- package/src/quill-plugins/quill-input-button.plugin.js +95 -77
- package/src/quill-plugins/quill-input-button.plugin.js.map +1 -1
- package/src/selector/selector.component.js +276 -241
- package/src/selector/selector.component.js.map +1 -1
- package/src/test/test.directive.js +66 -49
- package/src/test/test.directive.js.map +1 -1
- package/src/tree/tree-dialog.component.js +231 -202
- package/src/tree/tree-dialog.component.js.map +1 -1
- package/src/tree/tree-node.component.js +282 -253
- package/src/tree/tree-node.component.js.map +1 -1
- package/src/tree/tree.component.js +561 -531
- package/src/tree/tree.component.js.map +1 -1
|
@@ -1,179 +1,212 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
this.model = this.data.model;
|
|
52
|
-
this.property = this.data.property;
|
|
53
|
-
this.editor = this.data.editor;
|
|
54
|
-
this.eventManager = this.data.eventManager;
|
|
55
|
-
this.baseEditor = this.data.eventManager.editor;
|
|
56
|
-
this.dialogCitationForm = this.fb.group({
|
|
57
|
-
citationContentInput: new FormControl('', [Validators.required]),
|
|
58
|
-
citationTitleInput: new FormControl(''),
|
|
59
|
-
});
|
|
60
|
-
this.highlightedText = this.baseEditor.selection.text();
|
|
61
|
-
const containedElement = this.baseEditor.citationManager.getSelectedCitation() ||
|
|
62
|
-
this.baseEditor.citationManager.getLastKnownCitation();
|
|
63
|
-
this.baseEditor.citationManager.hideToolbar();
|
|
64
|
-
if (containedElement) {
|
|
65
|
-
this.newCitation = false;
|
|
66
|
-
this.existingCitationElement = containedElement;
|
|
67
|
-
const copiedElement = containedElement.cloneNode(true);
|
|
68
|
-
Array.from(copiedElement.getElementsByClassName('fr-marker')).forEach((markerEl) => {
|
|
69
|
-
markerEl.remove();
|
|
70
|
-
});
|
|
71
|
-
const contentElement = head(copiedElement.getElementsByTagName('stratus-citation-content'));
|
|
72
|
-
if (contentElement) {
|
|
73
|
-
this.dialogCitationForm.get('citationContentInput').setValue(contentElement.innerHTML);
|
|
1
|
+
System.register(["@angular/core", "@angular/forms", "@angular/material/dialog", "@angular/material/snack-bar", "rxjs", "lodash", "@stratusjs/runtime/stratus", "@stratusjs/core/environment", "../core/responsive.component", "@angular/material/icon", "@angular/platform-browser"], function (exports_1, context_1) {
|
|
2
|
+
"use strict";
|
|
3
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
4
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
5
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
6
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
7
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
8
|
+
};
|
|
9
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
10
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
11
|
+
};
|
|
12
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
13
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
14
|
+
};
|
|
15
|
+
var core_1, forms_1, dialog_1, snack_bar_1, rxjs_1, lodash_1, stratus_1, environment_1, responsive_component_1, icon_1, platform_browser_1, systemDir, moduleName, parentModuleName, min, localDir, CitationDialogComponent;
|
|
16
|
+
var __moduleName = context_1 && context_1.id;
|
|
17
|
+
return {
|
|
18
|
+
setters: [
|
|
19
|
+
function (core_1_1) {
|
|
20
|
+
core_1 = core_1_1;
|
|
21
|
+
},
|
|
22
|
+
function (forms_1_1) {
|
|
23
|
+
forms_1 = forms_1_1;
|
|
24
|
+
},
|
|
25
|
+
function (dialog_1_1) {
|
|
26
|
+
dialog_1 = dialog_1_1;
|
|
27
|
+
},
|
|
28
|
+
function (snack_bar_1_1) {
|
|
29
|
+
snack_bar_1 = snack_bar_1_1;
|
|
30
|
+
},
|
|
31
|
+
function (rxjs_1_1) {
|
|
32
|
+
rxjs_1 = rxjs_1_1;
|
|
33
|
+
},
|
|
34
|
+
function (lodash_1_1) {
|
|
35
|
+
lodash_1 = lodash_1_1;
|
|
36
|
+
},
|
|
37
|
+
function (stratus_1_1) {
|
|
38
|
+
stratus_1 = stratus_1_1;
|
|
39
|
+
},
|
|
40
|
+
function (environment_1_1) {
|
|
41
|
+
environment_1 = environment_1_1;
|
|
42
|
+
},
|
|
43
|
+
function (responsive_component_1_1) {
|
|
44
|
+
responsive_component_1 = responsive_component_1_1;
|
|
45
|
+
},
|
|
46
|
+
function (icon_1_1) {
|
|
47
|
+
icon_1 = icon_1_1;
|
|
48
|
+
},
|
|
49
|
+
function (platform_browser_1_1) {
|
|
50
|
+
platform_browser_1 = platform_browser_1_1;
|
|
74
51
|
}
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
if (isUndefined(content) || !isString(content)) {
|
|
100
|
-
return;
|
|
101
|
-
}
|
|
102
|
-
const title = this.dialogCitationForm.get('citationTitleInput').value;
|
|
103
|
-
const citationElement = this.createCitationHTML(content, title);
|
|
104
|
-
if (!citationElement) {
|
|
105
|
-
console.warn(`${moduleName}: unable to build citation for: ${content}`);
|
|
106
|
-
this.snackBar.open(`Unable to build citation for: ${content}.`, 'dismiss', {
|
|
107
|
-
duration: 5000,
|
|
108
|
-
horizontalPosition: 'right',
|
|
109
|
-
verticalPosition: 'bottom'
|
|
110
|
-
});
|
|
111
|
-
return;
|
|
112
|
-
}
|
|
113
|
-
if (!this.eventManager) {
|
|
114
|
-
console.warn(`${moduleName}: event manager is not set.`);
|
|
115
|
-
return;
|
|
116
|
-
}
|
|
117
|
-
if (!this.newCitation && this.existingCitationElement) {
|
|
118
|
-
this.existingCitationElement.outerHTML = citationElement;
|
|
119
|
-
}
|
|
120
|
-
else {
|
|
121
|
-
this.eventManager.trigger('insert', citationElement, this.editor);
|
|
122
|
-
}
|
|
123
|
-
this.dialogRef.close();
|
|
124
|
-
}
|
|
125
|
-
createCitationHTML(content, title) {
|
|
126
|
-
if (!content) {
|
|
127
|
-
console.warn(`${moduleName}: unable to create citation for empty content`);
|
|
128
|
-
return null;
|
|
129
|
-
}
|
|
130
|
-
if (!isEmpty(title)) {
|
|
131
|
-
title = `<stratus-citation-title>${title}</stratus-citation-title>`;
|
|
132
|
-
}
|
|
133
|
-
else {
|
|
134
|
-
title = `<stratus-citation-notitle/>`;
|
|
135
|
-
}
|
|
136
|
-
return `<stratus-citation><stratus-citation-content>${content}</stratus-citation-content>${title}</stratus-citation-content>`;
|
|
137
|
-
}
|
|
138
|
-
getSvg(url, options) {
|
|
139
|
-
const uid = this.addSvgIcon(url, options);
|
|
140
|
-
return new Observable((subscriber) => {
|
|
141
|
-
this.iconRegistry
|
|
142
|
-
.getNamedSvgIcon(uid)
|
|
143
|
-
.subscribe({
|
|
144
|
-
error(err) {
|
|
145
|
-
console.error(`getSvg(${url}): ${err}`);
|
|
146
|
-
},
|
|
147
|
-
complete() {
|
|
148
|
-
subscriber.next(uid);
|
|
52
|
+
],
|
|
53
|
+
execute: function () {
|
|
54
|
+
systemDir = '@stratusjs/angular';
|
|
55
|
+
moduleName = 'citation-dialog';
|
|
56
|
+
parentModuleName = 'editor';
|
|
57
|
+
min = !environment_1.cookie('env') ? '.min' : '';
|
|
58
|
+
localDir = `${stratus_1.Stratus.BaseUrl}${boot.configuration.paths[`${systemDir}/*`].replace(/[^/]*$/, '').replace(/\/dist\/$/, '/src/')}`;
|
|
59
|
+
CitationDialogComponent = class CitationDialogComponent extends responsive_component_1.ResponsiveComponent {
|
|
60
|
+
constructor(dialogRef, data, fb, snackBar, iconRegistry, sanitizer, ref) {
|
|
61
|
+
super();
|
|
62
|
+
this.dialogRef = dialogRef;
|
|
63
|
+
this.data = data;
|
|
64
|
+
this.fb = fb;
|
|
65
|
+
this.snackBar = snackBar;
|
|
66
|
+
this.iconRegistry = iconRegistry;
|
|
67
|
+
this.sanitizer = sanitizer;
|
|
68
|
+
this.ref = ref;
|
|
69
|
+
this.title = moduleName + '_component';
|
|
70
|
+
this.Stratus = stratus_1.Stratus;
|
|
71
|
+
this.popupTitle = 'Create New Citation';
|
|
72
|
+
this.isPopupLoading = true;
|
|
73
|
+
this.formDisabled = false;
|
|
74
|
+
this.newCitation = true;
|
|
75
|
+
this.svgIcons = {};
|
|
149
76
|
}
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
77
|
+
ngOnInit() {
|
|
78
|
+
this.uid = lodash_1.uniqueId(`sa_${lodash_1.snakeCase(moduleName)}_component_`);
|
|
79
|
+
stratus_1.Stratus.Instances[this.uid] = this;
|
|
80
|
+
stratus_1.Stratus.Internals.CssLoader(`${localDir}${parentModuleName}/${moduleName}.component${min}.css`);
|
|
81
|
+
this.model = this.data.model;
|
|
82
|
+
this.property = this.data.property;
|
|
83
|
+
this.editor = this.data.editor;
|
|
84
|
+
this.eventManager = this.data.eventManager;
|
|
85
|
+
this.baseEditor = this.data.eventManager.editor;
|
|
86
|
+
this.dialogCitationForm = this.fb.group({
|
|
87
|
+
citationContentInput: new forms_1.FormControl('', [forms_1.Validators.required]),
|
|
88
|
+
citationTitleInput: new forms_1.FormControl(''),
|
|
89
|
+
});
|
|
90
|
+
this.highlightedText = this.baseEditor.selection.text();
|
|
91
|
+
const containedElement = this.baseEditor.citationManager.getSelectedCitation() ||
|
|
92
|
+
this.baseEditor.citationManager.getLastKnownCitation();
|
|
93
|
+
this.baseEditor.citationManager.hideToolbar();
|
|
94
|
+
if (containedElement) {
|
|
95
|
+
this.newCitation = false;
|
|
96
|
+
this.existingCitationElement = containedElement;
|
|
97
|
+
const copiedElement = containedElement.cloneNode(true);
|
|
98
|
+
Array.from(copiedElement.getElementsByClassName('fr-marker')).forEach((markerEl) => {
|
|
99
|
+
markerEl.remove();
|
|
100
|
+
});
|
|
101
|
+
const contentElement = lodash_1.head(copiedElement.getElementsByTagName('stratus-citation-content'));
|
|
102
|
+
if (contentElement) {
|
|
103
|
+
this.dialogCitationForm.get('citationContentInput').setValue(contentElement.innerHTML);
|
|
104
|
+
}
|
|
105
|
+
const titleElement = lodash_1.head(copiedElement.getElementsByTagName('stratus-citation-title'));
|
|
106
|
+
if (titleElement) {
|
|
107
|
+
this.dialogCitationForm.get('citationTitleInput').setValue(titleElement.innerHTML);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
if (this.newCitation && !lodash_1.isEmpty(this.highlightedText)) {
|
|
111
|
+
this.popupTitle = 'Convert Text into Citation';
|
|
112
|
+
this.dialogCitationForm.get('citationTitleInput').setValue(this.highlightedText);
|
|
113
|
+
}
|
|
114
|
+
if (!this.newCitation) {
|
|
115
|
+
this.popupTitle = 'Update Citation';
|
|
116
|
+
}
|
|
117
|
+
this.isPopupLoading = false;
|
|
118
|
+
this.refresh();
|
|
119
|
+
}
|
|
120
|
+
cancel() {
|
|
121
|
+
this.dialogRef.close();
|
|
122
|
+
this.refresh();
|
|
123
|
+
}
|
|
124
|
+
confirm() {
|
|
125
|
+
if (lodash_1.isUndefined(this.dialogCitationForm.get('citationContentInput'))) {
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
128
|
+
const content = this.dialogCitationForm.get('citationContentInput').value;
|
|
129
|
+
if (lodash_1.isUndefined(content) || !lodash_1.isString(content)) {
|
|
130
|
+
return;
|
|
131
|
+
}
|
|
132
|
+
const title = this.dialogCitationForm.get('citationTitleInput').value;
|
|
133
|
+
const citationElement = this.createCitationHTML(content, title);
|
|
134
|
+
if (!citationElement) {
|
|
135
|
+
console.warn(`${moduleName}: unable to build citation for: ${content}`);
|
|
136
|
+
this.snackBar.open(`Unable to build citation for: ${content}.`, 'dismiss', {
|
|
137
|
+
duration: 5000,
|
|
138
|
+
horizontalPosition: 'right',
|
|
139
|
+
verticalPosition: 'bottom'
|
|
140
|
+
});
|
|
141
|
+
return;
|
|
142
|
+
}
|
|
143
|
+
if (!this.eventManager) {
|
|
144
|
+
console.warn(`${moduleName}: event manager is not set.`);
|
|
145
|
+
return;
|
|
146
|
+
}
|
|
147
|
+
if (!this.newCitation && this.existingCitationElement) {
|
|
148
|
+
this.existingCitationElement.outerHTML = citationElement;
|
|
149
|
+
}
|
|
150
|
+
else {
|
|
151
|
+
this.eventManager.trigger('insert', citationElement, this.editor);
|
|
152
|
+
}
|
|
153
|
+
this.dialogRef.close();
|
|
154
|
+
}
|
|
155
|
+
createCitationHTML(content, title) {
|
|
156
|
+
if (!content) {
|
|
157
|
+
console.warn(`${moduleName}: unable to create citation for empty content`);
|
|
158
|
+
return null;
|
|
159
|
+
}
|
|
160
|
+
if (!lodash_1.isEmpty(title)) {
|
|
161
|
+
title = `<stratus-citation-title>${title}</stratus-citation-title>`;
|
|
162
|
+
}
|
|
163
|
+
else {
|
|
164
|
+
title = `<stratus-citation-notitle/>`;
|
|
165
|
+
}
|
|
166
|
+
return `<stratus-citation><stratus-citation-content>${content}</stratus-citation-content>${title}</stratus-citation-content>`;
|
|
167
|
+
}
|
|
168
|
+
getSvg(url, options) {
|
|
169
|
+
const uid = this.addSvgIcon(url, options);
|
|
170
|
+
return new rxjs_1.Observable((subscriber) => {
|
|
171
|
+
this.iconRegistry
|
|
172
|
+
.getNamedSvgIcon(uid)
|
|
173
|
+
.subscribe({
|
|
174
|
+
error(err) {
|
|
175
|
+
console.error(`getSvg(${url}): ${err}`);
|
|
176
|
+
},
|
|
177
|
+
complete() {
|
|
178
|
+
subscriber.next(uid);
|
|
179
|
+
}
|
|
180
|
+
});
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
addSvgIcon(url, options) {
|
|
184
|
+
if (url in this.svgIcons) {
|
|
185
|
+
return this.svgIcons[url];
|
|
186
|
+
}
|
|
187
|
+
if (!options) {
|
|
188
|
+
options = {};
|
|
189
|
+
}
|
|
190
|
+
const uid = this.svgIcons[url] = lodash_1.uniqueId('selector_svg');
|
|
191
|
+
this.iconRegistry.addSvgIcon(uid, this.sanitizer.bypassSecurityTrustResourceUrl(url), options);
|
|
192
|
+
return uid;
|
|
193
|
+
}
|
|
194
|
+
};
|
|
195
|
+
CitationDialogComponent = __decorate([
|
|
196
|
+
core_1.Component({
|
|
197
|
+
selector: `sa-${moduleName}`,
|
|
198
|
+
templateUrl: `${localDir}/${parentModuleName}/${moduleName}.component${min}.html`,
|
|
199
|
+
}),
|
|
200
|
+
__param(1, core_1.Inject(dialog_1.MAT_DIALOG_DATA)),
|
|
201
|
+
__metadata("design:paramtypes", [dialog_1.MatDialogRef, Object, forms_1.FormBuilder,
|
|
202
|
+
snack_bar_1.MatSnackBar,
|
|
203
|
+
icon_1.MatIconRegistry,
|
|
204
|
+
platform_browser_1.DomSanitizer,
|
|
205
|
+
core_1.ChangeDetectorRef])
|
|
206
|
+
], CitationDialogComponent);
|
|
207
|
+
exports_1("CitationDialogComponent", CitationDialogComponent);
|
|
159
208
|
}
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
return uid;
|
|
163
|
-
}
|
|
164
|
-
};
|
|
165
|
-
CitationDialogComponent = __decorate([
|
|
166
|
-
Component({
|
|
167
|
-
selector: `sa-${moduleName}`,
|
|
168
|
-
templateUrl: `${localDir}/${parentModuleName}/${moduleName}.component${min}.html`,
|
|
169
|
-
}),
|
|
170
|
-
__param(1, Inject(MAT_DIALOG_DATA)),
|
|
171
|
-
__metadata("design:paramtypes", [MatDialogRef, Object, FormBuilder,
|
|
172
|
-
MatSnackBar,
|
|
173
|
-
MatIconRegistry,
|
|
174
|
-
DomSanitizer,
|
|
175
|
-
ChangeDetectorRef])
|
|
176
|
-
], CitationDialogComponent);
|
|
177
|
-
export { CitationDialogComponent };
|
|
209
|
+
};
|
|
210
|
+
});
|
|
178
211
|
|
|
179
212
|
//# sourceMappingURL=citation-dialog.component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["citation-dialog.component.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["citation-dialog.component.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAqDM,SAAS,GAAG,oBAAoB,CAAA;YAChC,UAAU,GAAG,iBAAiB,CAAA;YAC9B,gBAAgB,GAAG,QAAQ,CAAA;YAG3B,GAAG,GAAG,CAAC,oBAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAA;YAClC,QAAQ,GAAG,GAAG,iBAAO,CAAC,OAAO,GAAG,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,GAAG,SAAS,IAAI,CAAC,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,WAAW,EAAE,OAAO,CAAC,EAAE,CAAA;YAUzH,uBAAuB,GAApC,MAAa,uBAAwB,SAAQ,0CAAmB;gBAuC5D,YACW,SAAgD,EACvB,IAAwB,EAChD,EAAe,EACf,QAAqB,EACrB,YAA6B,EAC7B,SAAuB,EACrB,GAAsB;oBAGhC,KAAK,EAAE,CAAA;oBATA,cAAS,GAAT,SAAS,CAAuC;oBACvB,SAAI,GAAJ,IAAI,CAAoB;oBAChD,OAAE,GAAF,EAAE,CAAa;oBACf,aAAQ,GAAR,QAAQ,CAAa;oBACrB,iBAAY,GAAZ,YAAY,CAAiB;oBAC7B,cAAS,GAAT,SAAS,CAAc;oBACrB,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AA;4BACxB,CAAC;yBACJ,CAAC,CAAA;oBACV,CAAC,CAAC,CAAA;gBACN,CAAC;gBAMD,UAAU,CAAC,GAAW,EAAE,OAAqB;oBACzC,IAAI,GAAG,IAAI,IAAI,CAAC,QAAQ,EAAE;wBACtB,OAAO,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAA;qBAC5B;oBACD,IAAI,CAAC,OAAO,EAAE;wBACV,OAAO,GAAG,EAAE,CAAA;qBACf;oBACD,MAAM,GAAG,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAG,iBAAQ,CAAC,cAAc,CAAC,CAAA;oBACzD,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC,GAAG,EAAE,IAAI,CAAC,SAAS,CAAC,8BAA8B,CAAC,GAAG,CAAC,EAAE,OAAO,CAAC,CAAA;oBAC9F,OAAO,GAAG,CAAA;gBACd,CAAC;aACJ,CAAA;YApNY,uBAAuB;gBALnC,gBAAS,CAAC;oBACP,QAAQ,EAAE,MAAM,UAAU,EAAE;oBAC5B,WAAW,EAAE,GAAG,QAAQ,IAAI,gBAAgB,IAAI,UAAU,aAAa,GAAG,OAAO;iBAEpF,CAAC;gBA0CO,WAAA,aAAM,CAAC,wBAAe,CAAC,CAAA;iDADN,qBAAY,UAElB,mBAAW;oBACL,uBAAW;oBACP,sBAAe;oBAClB,+BAAY;oBAChB,wBAAiB;eA9C3B,uBAAuB,CAoNnC;;QAUD,CAAC","file":"citation-dialog.component.js"}
|
|
@@ -1,63 +1,77 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
fromTextArea(el, opts) {
|
|
10
|
-
this.editorView = new EditorView({
|
|
11
|
-
doc: el.value,
|
|
12
|
-
extensions: this.extensions || [],
|
|
13
|
-
});
|
|
14
|
-
el.parentNode.insertBefore(this.editorView.dom, el);
|
|
15
|
-
el.style.display = 'none';
|
|
16
|
-
if (el.form)
|
|
17
|
-
el.form.addEventListener('submit', () => {
|
|
18
|
-
el.value = this.editorView.state.doc.toString();
|
|
19
|
-
});
|
|
20
|
-
return this;
|
|
21
|
-
}
|
|
22
|
-
focus() {
|
|
23
|
-
return this.editorView.focus();
|
|
24
|
-
}
|
|
25
|
-
refresh() {
|
|
26
|
-
console.warn('CodeMirror Bridge has not implemented a refresh function.');
|
|
27
|
-
}
|
|
28
|
-
clearHistory() {
|
|
29
|
-
console.warn('CodeMirror Bridge has not implemented a clearHistory function.');
|
|
30
|
-
}
|
|
31
|
-
on(event, func) {
|
|
32
|
-
console.warn('bind attempt:', { event, func });
|
|
33
|
-
console.warn('CodeMirror Bridge has not implemented an on(event) function.');
|
|
34
|
-
}
|
|
35
|
-
setSize(width, height) {
|
|
36
|
-
console.warn('CodeMirror Bridge has not implemented a setSize function.');
|
|
37
|
-
}
|
|
38
|
-
getValue() {
|
|
39
|
-
return this.editorView.state.doc.toString();
|
|
40
|
-
}
|
|
41
|
-
setValue(html) {
|
|
42
|
-
this.editorView.dispatch({
|
|
43
|
-
changes: { from: 0, to: this.editorView.state.doc.length, insert: html }
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
setSelection(start, end) {
|
|
47
|
-
const posToOffset = (pos) => {
|
|
48
|
-
const doc = this.editorView.state.doc;
|
|
49
|
-
return doc.line(pos.line + 1).from + pos.ch;
|
|
50
|
-
};
|
|
51
|
-
this.editorView.dispatch({
|
|
52
|
-
selection: {
|
|
53
|
-
anchor: posToOffset(start),
|
|
54
|
-
head: posToOffset(end)
|
|
1
|
+
System.register(["codemirror"], function (exports_1, context_1) {
|
|
2
|
+
"use strict";
|
|
3
|
+
var codemirror_1, CodeMirrorBridge;
|
|
4
|
+
var __moduleName = context_1 && context_1.id;
|
|
5
|
+
return {
|
|
6
|
+
setters: [
|
|
7
|
+
function (codemirror_1_1) {
|
|
8
|
+
codemirror_1 = codemirror_1_1;
|
|
55
9
|
}
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
10
|
+
],
|
|
11
|
+
execute: function () {
|
|
12
|
+
CodeMirrorBridge = class CodeMirrorBridge {
|
|
13
|
+
constructor(opts) {
|
|
14
|
+
if (!opts || !(typeof opts === 'object')) {
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
this.extensions = opts.extensions;
|
|
18
|
+
}
|
|
19
|
+
fromTextArea(el, opts) {
|
|
20
|
+
this.editorView = new codemirror_1.EditorView({
|
|
21
|
+
doc: el.value,
|
|
22
|
+
extensions: this.extensions || [],
|
|
23
|
+
});
|
|
24
|
+
el.parentNode.insertBefore(this.editorView.dom, el);
|
|
25
|
+
el.style.display = 'none';
|
|
26
|
+
if (el.form)
|
|
27
|
+
el.form.addEventListener('submit', () => {
|
|
28
|
+
el.value = this.editorView.state.doc.toString();
|
|
29
|
+
});
|
|
30
|
+
return this;
|
|
31
|
+
}
|
|
32
|
+
focus() {
|
|
33
|
+
return this.editorView.focus();
|
|
34
|
+
}
|
|
35
|
+
refresh() {
|
|
36
|
+
console.warn('CodeMirror Bridge has not implemented a refresh function.');
|
|
37
|
+
}
|
|
38
|
+
clearHistory() {
|
|
39
|
+
console.warn('CodeMirror Bridge has not implemented a clearHistory function.');
|
|
40
|
+
}
|
|
41
|
+
on(event, func) {
|
|
42
|
+
console.warn('bind attempt:', { event, func });
|
|
43
|
+
console.warn('CodeMirror Bridge has not implemented an on(event) function.');
|
|
44
|
+
}
|
|
45
|
+
setSize(width, height) {
|
|
46
|
+
console.warn('CodeMirror Bridge has not implemented a setSize function.');
|
|
47
|
+
}
|
|
48
|
+
getValue() {
|
|
49
|
+
return this.editorView.state.doc.toString();
|
|
50
|
+
}
|
|
51
|
+
setValue(html) {
|
|
52
|
+
this.editorView.dispatch({
|
|
53
|
+
changes: { from: 0, to: this.editorView.state.doc.length, insert: html }
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
setSelection(start, end) {
|
|
57
|
+
const posToOffset = (pos) => {
|
|
58
|
+
const doc = this.editorView.state.doc;
|
|
59
|
+
return doc.line(pos.line + 1).from + pos.ch;
|
|
60
|
+
};
|
|
61
|
+
this.editorView.dispatch({
|
|
62
|
+
selection: {
|
|
63
|
+
anchor: posToOffset(start),
|
|
64
|
+
head: posToOffset(end)
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
toTextArea() {
|
|
69
|
+
console.warn('CodeMirror Bridge has not implemented a toTextArea function.');
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
exports_1("CodeMirrorBridge", CodeMirrorBridge);
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
});
|
|
62
76
|
|
|
63
77
|
//# sourceMappingURL=code-mirror-bridge.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["code-mirror-bridge.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["code-mirror-bridge.ts"],"names":[],"mappings":";;;;;;;;;;;YAmBA,mBAAA,MAAa,gBAAgB;gBAGzB,YAAY,IAA8B;oBACtC,IAAI,CAAC,IAAI,IAAI,CAAC,CAAC,OAAO,IAAI,KAAK,QAAQ,CAAC,EAAE;wBACtC,OAAM;qBACT;oBACD,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAA;gBACrC,CAAC;gBACD,YAAY,CAAC,EAAuB,EAAE,IAAiB;oBACnD,IAAI,CAAC,UAAU,GAAG,IAAI,uBAAU,CAAC;wBAC7B,GAAG,EAAE,EAAE,CAAC,KAAK;wBACb,UAAU,EAAE,IAAI,CAAC,UAAU,IAAI,EAAE;qBACpC,CAAC,CAAA;oBACF,EAAE,CAAC,UAAU,CAAC,YAAY,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,EAAE,EAAE,CAAC,CAAA;oBACnD,EAAE,CAAC,KAAK,CAAC,OAAO,GAAG,MAAM,CAAA;oBACzB,IAAI,E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AM,GAAG,GAAG,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,CAAA;wBACrC,OAAO,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,IAAI,GAAG,GAAG,CAAC,EAAE,CAAA;oBAC/C,CAAC,CAAA;oBACD,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC;wBACrB,SAAS,EAAE;4BACP,MAAM,EAAE,WAAW,CAAC,KAAK,CAAC;4BAC1B,IAAI,EAAE,WAAW,CAAC,GAAG,CAAC;yBACzB;qBACJ,CAAC,CAAA;gBACN,CAAC;gBACD,UAAU;oBAEN,OAAO,CAAC,IAAI,CAAC,8DAA8D,CAAC,CAAA;gBAChF,CAAC;aACJ,CAAA;;QACD,CAAC","file":"code-mirror-bridge.js"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["codemirror"],function(e,t){"use strict";var o;t&&t.id;return{setters:[function(e){o=e}],execute:function(){e("CodeMirrorBridge",class{constructor(e){e&&"object"==typeof e&&(this.extensions=e.extensions)}fromTextArea(e,t){return this.editorView=new o.EditorView({doc:e.value,extensions:this.extensions||[]}),e.parentNode.insertBefore(this.editorView.dom,e),e.style.display="none",e.form&&e.form.addEventListener("submit",()=>{e.value=this.editorView.state.doc.toString()}),this}focus(){return this.editorView.focus()}refresh(){console.warn("CodeMirror Bridge has not implemented a refresh function.")}clearHistory(){console.warn("CodeMirror Bridge has not implemented a clearHistory function.")}on(e,t){console.
|
|
1
|
+
System.register(["codemirror"],function(e,t){"use strict";var o;t&&t.id;return{setters:[function(e){o=e}],execute:function(){e("CodeMirrorBridge",class{constructor(e){e&&"object"==typeof e&&(this.extensions=e.extensions)}fromTextArea(e,t){return this.editorView=new o.EditorView({doc:e.value,extensions:this.extensions||[]}),e.parentNode.insertBefore(this.editorView.dom,e),e.style.display="none",e.form&&e.form.addEventListener("submit",()=>{e.value=this.editorView.state.doc.toString()}),this}focus(){return this.editorView.focus()}refresh(){console.warn("CodeMirror Bridge has not implemented a refresh function.")}clearHistory(){console.warn("CodeMirror Bridge has not implemented a clearHistory function.")}on(e,t){console.warn("bind attempt:",{event:e,func:t}),console.warn("CodeMirror Bridge has not implemented an on(event) function.")}setSize(e,t){console.warn("CodeMirror Bridge has not implemented a setSize function.")}getValue(){return this.editorView.state.doc.toString()}setValue(e){this.editorView.dispatch({changes:{from:0,to:this.editorView.state.doc.length,insert:e}})}setSelection(e,t){const o=e=>this.editorView.state.doc.line(e.line+1).from+e.ch;this.editorView.dispatch({selection:{anchor:o(e),head:o(t)}})}toTextArea(){console.warn("CodeMirror Bridge has not implemented a toTextArea function.")}})}}});
|