@stratusjs/angular 0.5.11 → 0.5.13
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 +59 -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 +28 -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 +28 -0
- package/src/editor/link-dialog.component.js.map +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/package.json
CHANGED
package/src/app.module.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
System.register(["@
|
|
1
|
+
System.register(["@angular/common/http", "@angular/core", "@angular/forms", "@angular/material/core", "@angular/platform-browser", "@angular/platform-browser/animations", "./material", "@angular/flex-layout", "./base/base.component", "./confirm-dialog/confirm-dialog.component", "./editor/editor.component", "../../map/src/map.component", "./media-selector/media-selector.component", "./selector/selector.component", "../../stripe/src/payment-method.component", "../../stripe/src/payment-method-item.component", "../../stripe/src/payment-method-list.component", "../../stripe/src/payment-method-selector.component", "../../stripe/src/setup-intent.component", "./tree/tree.component", "./tree/tree-dialog.component", "./tree/tree-node.component", "lodash", "@stratusjs/runtime/stratus", "@angular/google-maps", "angular-froala-wysiwyg", "./editor/citation-dialog.component", "./editor/code-view-dialog.component", "./editor/media-dialog.component", "./editor/link-dialog.component"], function (exports_1, context_1) {
|
|
2
2
|
"use strict";
|
|
3
3
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
4
4
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
@@ -9,13 +9,10 @@ System.register(["@stratusjs/core/environment", "@angular/common/http", "@angula
|
|
|
9
9
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
10
10
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
11
11
|
};
|
|
12
|
-
var
|
|
12
|
+
var http_1, core_1, forms_1, core_2, platform_browser_1, animations_1, material_1, flex_layout_1, base_component_1, confirm_dialog_component_1, editor_component_1, map_component_1, media_selector_component_1, selector_component_1, payment_method_component_1, payment_method_item_component_1, payment_method_list_component_1, payment_method_selector_component_1, setup_intent_component_1, tree_component_1, tree_dialog_component_1, tree_node_component_1, lodash_1, stratus_1, google_maps_1, angular_froala_wysiwyg_1, citation_dialog_component_1, code_view_dialog_component_1, media_dialog_component_1, link_dialog_component_1, AppModule;
|
|
13
13
|
var __moduleName = context_1 && context_1.id;
|
|
14
14
|
return {
|
|
15
15
|
setters: [
|
|
16
|
-
function (environment_1_1) {
|
|
17
|
-
environment_1 = environment_1_1;
|
|
18
|
-
},
|
|
19
16
|
function (http_1_1) {
|
|
20
17
|
http_1 = http_1_1;
|
|
21
18
|
},
|
|
@@ -91,6 +88,9 @@ System.register(["@stratusjs/core/environment", "@angular/common/http", "@angula
|
|
|
91
88
|
function (google_maps_1_1) {
|
|
92
89
|
google_maps_1 = google_maps_1_1;
|
|
93
90
|
},
|
|
91
|
+
function (angular_froala_wysiwyg_1_1) {
|
|
92
|
+
angular_froala_wysiwyg_1 = angular_froala_wysiwyg_1_1;
|
|
93
|
+
},
|
|
94
94
|
function (citation_dialog_component_1_1) {
|
|
95
95
|
citation_dialog_component_1 = citation_dialog_component_1_1;
|
|
96
96
|
},
|
|
@@ -102,49 +102,9 @@ System.register(["@stratusjs/core/environment", "@angular/common/http", "@angula
|
|
|
102
102
|
},
|
|
103
103
|
function (link_dialog_component_1_1) {
|
|
104
104
|
link_dialog_component_1 = link_dialog_component_1_1;
|
|
105
|
-
},
|
|
106
|
-
function (angular_froala_wysiwyg_1_1) {
|
|
107
|
-
angular_froala_wysiwyg_1 = angular_froala_wysiwyg_1_1;
|
|
108
105
|
}
|
|
109
106
|
],
|
|
110
107
|
execute: function () {
|
|
111
|
-
quillConfig = {
|
|
112
|
-
modules: {
|
|
113
|
-
syntax: true,
|
|
114
|
-
toolbar: [
|
|
115
|
-
['bold', 'italic', 'underline', 'strike'],
|
|
116
|
-
[{ script: 'sub' }, { script: 'super' }],
|
|
117
|
-
[{ header: [1, 2, 3, 4, 5, 6, false] }],
|
|
118
|
-
[{ list: 'ordered' }, { list: 'bullet' }],
|
|
119
|
-
['blockquote', 'code-block'],
|
|
120
|
-
[{
|
|
121
|
-
align: []
|
|
122
|
-
}],
|
|
123
|
-
[{ indent: '-1' }, { indent: '+1' }],
|
|
124
|
-
['clean'],
|
|
125
|
-
[
|
|
126
|
-
'link',
|
|
127
|
-
'video'
|
|
128
|
-
],
|
|
129
|
-
],
|
|
130
|
-
mediaLibrary: {
|
|
131
|
-
debug: true,
|
|
132
|
-
buttonHTML: '<i class="fas fa-photo-video"></i>',
|
|
133
|
-
buttonTitle: 'Media Library',
|
|
134
|
-
name: 'mediaLibrary',
|
|
135
|
-
eventName: 'media-library'
|
|
136
|
-
},
|
|
137
|
-
codeView: {
|
|
138
|
-
debug: true,
|
|
139
|
-
buttonHTML: '<i class="fas fa-file-code"></i>',
|
|
140
|
-
buttonTitle: 'Code View',
|
|
141
|
-
name: 'codeView',
|
|
142
|
-
eventName: 'code-view'
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
};
|
|
146
|
-
if (environment_1.cookie('env')) {
|
|
147
|
-
}
|
|
148
108
|
AppModule = class AppModule {
|
|
149
109
|
constructor() {
|
|
150
110
|
this.initialTimeout = 1000;
|
package/src/app.module.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["app.module.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["app.module.ts"],"names":[],"mappings":"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","file":"app.module.js"}
|
package/src/app.module.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["@
|
|
1
|
+
System.register(["@angular/common/http","@angular/core","@angular/forms","@angular/material/core","@angular/platform-browser","@angular/platform-browser/animations","./material","@angular/flex-layout","./base/base.component","./confirm-dialog/confirm-dialog.component","./editor/editor.component","../../map/src/map.component","./media-selector/media-selector.component","./selector/selector.component","../../stripe/src/payment-method.component","../../stripe/src/payment-method-item.component","../../stripe/src/payment-method-list.component","../../stripe/src/payment-method-selector.component","../../stripe/src/setup-intent.component","./tree/tree.component","./tree/tree-dialog.component","./tree/tree-node.component","lodash","@stratusjs/runtime/stratus","@angular/google-maps","angular-froala-wysiwyg","./editor/citation-dialog.component","./editor/code-view-dialog.component","./editor/media-dialog.component","./editor/link-dialog.component"],function(e,t){"use strict";var o,n,i,a,r,m,p,c,s,l,u,d,f,C,g,h,M,y,S,T,D,w,b,P,B,v,R,E,_,I,L,N=this&&this.__decorate||function(e,t,o,n){var i,a=arguments.length,r=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,n);else for(var m=e.length-1;m>=0;m--)(i=e[m])&&(r=(a<3?i(r):a>3?i(t,o,r):i(t,o))||r);return a>3&&r&&Object.defineProperty(t,o,r),r},j=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};t&&t.id;return{setters:[function(e){o=e},function(e){n=e},function(e){i=e},function(e){a=e},function(e){r=e},function(e){m=e},function(e){p=e},function(e){c=e},function(e){s=e},function(e){l=e},function(e){u=e},function(e){d=e},function(e){f=e},function(e){C=e},function(e){g=e},function(e){h=e},function(e){M=e},function(e){y=e},function(e){S=e},function(e){T=e},function(e){D=e},function(e){w=e},function(e){b=e},function(e){P=e},function(e){B=e},function(e){v=e},function(e){R=e},function(e){E=e},function(e){_=e},function(e){I=e}],execute:function(){L=class{constructor(){this.initialTimeout=1e3,this.instances={},this.modules={"sa-base":s.BaseComponent,"sa-editor":u.EditorComponent,"sa-map":d.MapComponent,"sa-media-selector":f.MediaSelectorComponent,"sa-selector":C.SelectorComponent,"sa-stripe-payment-method-list":M.StripePaymentMethodListComponent,"sa-stripe-payment-method-selector":y.StripePaymentMethodSelectorComponent,"sa-tree":T.TreeComponent},P.Stratus.Instances[b.default.uniqueId("sa_app_module_")]=this}ngDoBootstrap(e){this.detectBoot(e)}exponentialTimeout(e){if(b.default.isNumber(e)&&e<this.initialTimeout)return e;const t=this.initialTimeout;return this.initialTimeout=1.01*this.initialTimeout,t}detectBoot(e){b.default.forEach(this.modules,(t,o)=>{const n=document.getElementsByTagName(o);n&&n.length&&b.default.forEach(n,o=>{o.hasAttribute("ng-version")||e.bootstrap(t,o)})}),setTimeout(()=>{this.detectBoot(e)},this.exponentialTimeout(4e3))}},L=N([n.NgModule({imports:[r.BrowserModule,m.BrowserAnimationsModule,c.FlexLayoutModule,i.FormsModule,v.FroalaEditorModule.forRoot(),v.FroalaViewModule.forRoot(),B.GoogleMapsModule,o.HttpClientModule,p.MaterialModules,a.MatNativeDateModule,i.ReactiveFormsModule],entryComponents:[s.BaseComponent,R.CitationDialogComponent,E.CodeViewDialogComponent,l.ConfirmDialogComponent,u.EditorComponent,I.LinkDialogComponent,d.MapComponent,_.MediaDialogComponent,f.MediaSelectorComponent,C.SelectorComponent,g.StripePaymentMethodComponent,h.StripePaymentMethodItemComponent,M.StripePaymentMethodListComponent,y.StripePaymentMethodSelectorComponent,S.StripeSetupIntentComponent,T.TreeComponent,D.TreeDialogComponent,w.TreeNodeComponent],declarations:[s.BaseComponent,R.CitationDialogComponent,E.CodeViewDialogComponent,l.ConfirmDialogComponent,u.EditorComponent,I.LinkDialogComponent,d.MapComponent,_.MediaDialogComponent,f.MediaSelectorComponent,C.SelectorComponent,g.StripePaymentMethodComponent,h.StripePaymentMethodItemComponent,M.StripePaymentMethodListComponent,y.StripePaymentMethodSelectorComponent,S.StripeSetupIntentComponent,T.TreeComponent,D.TreeDialogComponent,w.TreeNodeComponent],providers:[{provide:Window,useValue:window}]}),j("design:paramtypes",[])],L),e("AppModule",L)}}});
|
package/src/app.module.ts
CHANGED
|
@@ -3,9 +3,6 @@
|
|
|
3
3
|
// - add an import to define where it is located, e.g. import { BaseComponent } from './base/base.component'
|
|
4
4
|
// - add to declarations and entryComponents
|
|
5
5
|
|
|
6
|
-
// Stratus Libraries
|
|
7
|
-
import {cookie} from '@stratusjs/core/environment'
|
|
8
|
-
|
|
9
6
|
// Angular Core
|
|
10
7
|
import {HttpClientModule} from '@angular/common/http'
|
|
11
8
|
import {
|
|
@@ -52,72 +49,18 @@ import {TreeComponent} from './tree/tree.component'
|
|
|
52
49
|
import {TreeDialogComponent} from './tree/tree-dialog.component'
|
|
53
50
|
import {TreeNodeComponent} from './tree/tree-node.component'
|
|
54
51
|
|
|
55
|
-
// Angular Components
|
|
56
|
-
// import {
|
|
57
|
-
// QuillModule
|
|
58
|
-
// } from 'ngx-quill'
|
|
59
|
-
// import {
|
|
60
|
-
// FroalaEditorModule,
|
|
61
|
-
// FroalaViewModule
|
|
62
|
-
// } from 'angular-froala-wysiwyg'
|
|
63
|
-
|
|
64
|
-
// The following components are not currently in use:
|
|
65
|
-
/* *
|
|
66
|
-
import {
|
|
67
|
-
MonacoEditorModule,
|
|
68
|
-
NgxMonacoEditorConfig
|
|
69
|
-
} from 'ngx-monaco-editor'
|
|
70
|
-
import {
|
|
71
|
-
CodeEditorModule
|
|
72
|
-
} from '@ngstack/code-editor'
|
|
73
|
-
/* */
|
|
74
|
-
|
|
75
52
|
// External Dependencies
|
|
76
53
|
import _ from 'lodash'
|
|
77
54
|
import {Stratus} from '@stratusjs/runtime/stratus'
|
|
78
55
|
|
|
79
|
-
// Highlight.js
|
|
80
|
-
// import hljs from 'highlight.js/lib/core'
|
|
81
|
-
// import javascript from 'highlight.js/lib/languages/javascript'
|
|
82
|
-
// import typescript from 'highlight.js/lib/languages/typescript'
|
|
83
|
-
// import twig from 'highlight.js/lib/languages/twig'
|
|
84
|
-
// import xml from 'highlight.js/lib/languages/xml'
|
|
85
|
-
// import yaml from 'highlight.js/lib/languages/yaml'
|
|
86
|
-
|
|
87
|
-
// Highlight.js
|
|
88
|
-
// hljs.configure({
|
|
89
|
-
// languages: [
|
|
90
|
-
// 'css',
|
|
91
|
-
// 'javascript',
|
|
92
|
-
// 'less',
|
|
93
|
-
// 'scss',
|
|
94
|
-
// 'typescript',
|
|
95
|
-
// 'twig',
|
|
96
|
-
// 'xml',
|
|
97
|
-
// 'yaml'
|
|
98
|
-
// ]
|
|
99
|
-
// })
|
|
100
|
-
|
|
101
|
-
// Highlight.js Registers
|
|
102
|
-
// hljs.registerLanguage('javascript', javascript)
|
|
103
|
-
// hljs.registerLanguage('typescript', typescript)
|
|
104
|
-
// hljs.registerLanguage('twig', twig)
|
|
105
|
-
// hljs.registerLanguage('xml', xml)
|
|
106
|
-
// hljs.registerLanguage('yaml', yaml)
|
|
107
|
-
|
|
108
56
|
// Google Modules (required by @stratusjs/map)
|
|
109
57
|
import {GoogleMapsModule} from '@angular/google-maps'
|
|
110
58
|
|
|
111
|
-
//
|
|
112
|
-
/* *
|
|
59
|
+
// Froala Modules (Required by Editor)
|
|
113
60
|
import {
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
// Quill Modules
|
|
119
|
-
// import Quill from 'quill'
|
|
120
|
-
// import {QuillConfig} from 'ngx-quill/lib/quill-editor.interfaces'
|
|
61
|
+
FroalaEditorModule,
|
|
62
|
+
FroalaViewModule
|
|
63
|
+
} from 'angular-froala-wysiwyg'
|
|
121
64
|
|
|
122
65
|
// Editor Dialogs
|
|
123
66
|
import {CitationDialogComponent} from './editor/citation-dialog.component'
|
|
@@ -130,46 +73,6 @@ import {
|
|
|
130
73
|
import {
|
|
131
74
|
LinkDialogComponent
|
|
132
75
|
} from './editor/link-dialog.component'
|
|
133
|
-
import {
|
|
134
|
-
FroalaEditorModule,
|
|
135
|
-
FroalaViewModule
|
|
136
|
-
} from 'angular-froala-wysiwyg'
|
|
137
|
-
|
|
138
|
-
// Quill Plugins
|
|
139
|
-
// import {QuillInputButtonPlugin} from './editor/quill-input-button.plugin'
|
|
140
|
-
|
|
141
|
-
// External Quill Modules
|
|
142
|
-
// import ImageUploader from 'quill-image-uploader'
|
|
143
|
-
// import {
|
|
144
|
-
// htmlEditButton
|
|
145
|
-
// // @ts-ignore
|
|
146
|
-
// } from 'quill-html-edit-button'
|
|
147
|
-
// @ts-ignore
|
|
148
|
-
// import ImageDropAndPaste from 'quill-image-drop-and-paste'
|
|
149
|
-
|
|
150
|
-
// Quill Module Registers
|
|
151
|
-
// Quill.register('modules/mediaLibrary', QuillInputButtonPlugin)
|
|
152
|
-
// Quill.register('modules/codeView', QuillInputButtonPlugin)
|
|
153
|
-
// Quill.register('modules/imageUploader', ImageUploader)
|
|
154
|
-
// Quill.register('modules/htmlEditButton', htmlEditButton)
|
|
155
|
-
// Quill.register('modules/imageDropAndPaste', ImageDropAndPaste)
|
|
156
|
-
|
|
157
|
-
// Quill Format Registers
|
|
158
|
-
// FIXME: None of these fire when images are formatted
|
|
159
|
-
// Quill.register(QuillImageFormatPlugin)
|
|
160
|
-
// Quill.register('formats/image', QuillImageFormatPlugin)
|
|
161
|
-
// Quill.register('formats/imageCustom', QuillImageFormatPlugin)
|
|
162
|
-
|
|
163
|
-
// Quill Blot Registers
|
|
164
|
-
// console.log('Quill Break:', QuillBreak)
|
|
165
|
-
// Quill.register(QuillBreak)
|
|
166
|
-
|
|
167
|
-
// Third Party Quill
|
|
168
|
-
// TODO: Remove once our custom solutions are in place from the new QuillInputButton
|
|
169
|
-
// import QuillDropzone from './editor/quill.dropzone'
|
|
170
|
-
// import QuillHtmlEdit from './editor/quill.html.edit'
|
|
171
|
-
// Quill.register('modules/dropzone', QuillDropzone)
|
|
172
|
-
// Quill.register('modules/htmlEdit', QuillHtmlEdit)
|
|
173
76
|
|
|
174
77
|
// Dynamic Loader Prototype
|
|
175
78
|
// import {
|
|
@@ -195,174 +98,6 @@ import {
|
|
|
195
98
|
// .map((element) => _.get(roster, element) || null)
|
|
196
99
|
// .filter((item) => !!item);
|
|
197
100
|
|
|
198
|
-
// External Configs
|
|
199
|
-
// const quillConfig: QuillConfig = {
|
|
200
|
-
const quillConfig: any = {
|
|
201
|
-
/* *
|
|
202
|
-
formats: [
|
|
203
|
-
'header', 'font', 'size',
|
|
204
|
-
'background', 'color',
|
|
205
|
-
'script', 'align', 'direction',
|
|
206
|
-
'bold', 'italic', 'underline', 'strike',
|
|
207
|
-
'blockquote', 'code-block',
|
|
208
|
-
'list', 'bullet', 'indent',
|
|
209
|
-
'link', 'image', 'video',
|
|
210
|
-
// 'imageCustom'
|
|
211
|
-
],
|
|
212
|
-
/* */
|
|
213
|
-
modules: {
|
|
214
|
-
syntax: true,
|
|
215
|
-
toolbar: [
|
|
216
|
-
// inline text styles
|
|
217
|
-
['bold', 'italic', 'underline', 'strike'], // toggled buttons
|
|
218
|
-
[{script: 'sub'}, {script: 'super'}], // superscript/subscript
|
|
219
|
-
|
|
220
|
-
// block paragraph styles
|
|
221
|
-
[{header: [1, 2, 3, 4, 5, 6, false]}],
|
|
222
|
-
[{list: 'ordered'}, {list: 'bullet'}],
|
|
223
|
-
['blockquote', 'code-block'],
|
|
224
|
-
|
|
225
|
-
// align and indent
|
|
226
|
-
[{
|
|
227
|
-
align: [
|
|
228
|
-
// For some reason `left` makes the button show as 'undefined'
|
|
229
|
-
// 'left',
|
|
230
|
-
// 'center',
|
|
231
|
-
// 'right',
|
|
232
|
-
// 'justify'
|
|
233
|
-
]
|
|
234
|
-
}],
|
|
235
|
-
[{indent: '-1'}, {indent: '+1'}], // outdent/indent
|
|
236
|
-
|
|
237
|
-
// [{ size: ['small', false, 'large', 'huge'] }], // custom dropdown
|
|
238
|
-
|
|
239
|
-
// [{ color: [] }, { background: [] }], // dropdown with defaults from theme
|
|
240
|
-
// [{ font: [] }],
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
['clean'], // remove formatting button
|
|
244
|
-
|
|
245
|
-
[
|
|
246
|
-
'link',
|
|
247
|
-
// 'image',
|
|
248
|
-
'video'
|
|
249
|
-
],
|
|
250
|
-
// [{ direction: 'rtl' }] // text direction
|
|
251
|
-
],
|
|
252
|
-
mediaLibrary: {
|
|
253
|
-
debug: true,
|
|
254
|
-
buttonHTML: '<i class="fas fa-photo-video"></i>',
|
|
255
|
-
buttonTitle: 'Media Library',
|
|
256
|
-
name: 'mediaLibrary',
|
|
257
|
-
eventName: 'media-library'
|
|
258
|
-
},
|
|
259
|
-
codeView: {
|
|
260
|
-
debug: true,
|
|
261
|
-
buttonHTML: '<i class="fas fa-file-code"></i>',
|
|
262
|
-
buttonTitle: 'Code View',
|
|
263
|
-
name: 'codeView',
|
|
264
|
-
eventName: 'code-view'
|
|
265
|
-
}
|
|
266
|
-
// TODO: Remove once our custom solutions are in place from the new QuillInputButton
|
|
267
|
-
/* *
|
|
268
|
-
htmlEdit: {debug: true}
|
|
269
|
-
/* */
|
|
270
|
-
/* *
|
|
271
|
-
dropzone: {
|
|
272
|
-
container: document.body,
|
|
273
|
-
config: {
|
|
274
|
-
url: '/upload/file',
|
|
275
|
-
headers: {
|
|
276
|
-
Accept: 'application/json',
|
|
277
|
-
'Content-Type': 'application/hal+json'
|
|
278
|
-
},
|
|
279
|
-
init() {
|
|
280
|
-
// Demo Example (Not functional for our purposes)
|
|
281
|
-
// Quill.editors[0].editor.quill.onModuleLoad('dropzone', (dropzone: any) => {
|
|
282
|
-
// this.on('success', (file: any, xhr: any) => {
|
|
283
|
-
// // Handle response from server.
|
|
284
|
-
// const location = xhr.location ? xhr.location : ''
|
|
285
|
-
//
|
|
286
|
-
// // Attach insert buttons under each preview.
|
|
287
|
-
// dropzone.actions(file.previewElement, window.location.origin + location)
|
|
288
|
-
// })
|
|
289
|
-
// })
|
|
290
|
-
}
|
|
291
|
-
}
|
|
292
|
-
}
|
|
293
|
-
/* */
|
|
294
|
-
}
|
|
295
|
-
}
|
|
296
|
-
// This only adds certain modules when in dev mode
|
|
297
|
-
if (cookie('env')) {
|
|
298
|
-
/* *
|
|
299
|
-
quillConfig.modules.imageUploader = {
|
|
300
|
-
upload: (file: any) => {
|
|
301
|
-
return new Promise<string>((resolve, reject) => {
|
|
302
|
-
setTimeout(() => {
|
|
303
|
-
resolve(
|
|
304
|
-
'https://upload.wikimedia.org/wikipedia/commons/thumb/6/6a/JavaScript-logo.png/480px-JavaScript-logo.png'
|
|
305
|
-
)
|
|
306
|
-
}, 3500)
|
|
307
|
-
})
|
|
308
|
-
}
|
|
309
|
-
}
|
|
310
|
-
/* *
|
|
311
|
-
quillConfig.modules.imageDropAndPaste = {
|
|
312
|
-
handler: (imageDataUrl: any, type: any, imageData: any) => {
|
|
313
|
-
// This logic requires that we build an uploader, but this does get triggered.
|
|
314
|
-
// It does not appear to keep the filename intact, though.
|
|
315
|
-
console.log('image dropped:', {imageDataUrl, type, imageData})
|
|
316
|
-
|
|
317
|
-
let filename = 'my_cool_image.png'
|
|
318
|
-
let blob = imageData.toBlob()
|
|
319
|
-
let file = imageData.toFile(filename)
|
|
320
|
-
|
|
321
|
-
// generate a form data
|
|
322
|
-
let formData = new FormData()
|
|
323
|
-
|
|
324
|
-
// append blob data
|
|
325
|
-
formData.append('filename', filename)
|
|
326
|
-
formData.append('file', blob)
|
|
327
|
-
|
|
328
|
-
// or just append the file
|
|
329
|
-
formData.append('file', file)
|
|
330
|
-
|
|
331
|
-
// upload image to your server
|
|
332
|
-
callUploadAPI(`https://app.sitetheory.io:3000/?session=${cookie('SITETHEORY')}`, formData, (err, res) => {
|
|
333
|
-
if (err) return
|
|
334
|
-
// success? you should return the uploaded image's url
|
|
335
|
-
// then insert into the quill editor
|
|
336
|
-
let index = (quill.getSelection() || {}).index || quill.getLength()
|
|
337
|
-
if (index) quill.insertEmbed(index, 'image', res.data.image_url, 'user')
|
|
338
|
-
})
|
|
339
|
-
}
|
|
340
|
-
}
|
|
341
|
-
/* */
|
|
342
|
-
/* *
|
|
343
|
-
quillConfig.modules.htmlEditButton = {
|
|
344
|
-
debug: true,
|
|
345
|
-
// msg: 'Edit the content in HTML format',
|
|
346
|
-
// okText: 'Ok',
|
|
347
|
-
// cancelText: 'Cancel'
|
|
348
|
-
}
|
|
349
|
-
/* */
|
|
350
|
-
}
|
|
351
|
-
/* *
|
|
352
|
-
const monacoConfig: NgxMonacoEditorConfig = {
|
|
353
|
-
// configure base path for monaco editor default: './assets'
|
|
354
|
-
// baseUrl: 'sitetheorycore/node_modules/ngx-monaco-editor/assets',
|
|
355
|
-
baseUrl: 'ngx-monaco-editor/assets',
|
|
356
|
-
defaultOptions: {
|
|
357
|
-
scrollBeyondLastLine: false
|
|
358
|
-
},
|
|
359
|
-
// use this function to extend monaco editor functionalities.
|
|
360
|
-
onMonacoLoad: () => {
|
|
361
|
-
console.log((window).monaco, this)
|
|
362
|
-
}
|
|
363
|
-
}
|
|
364
|
-
/* */
|
|
365
|
-
|
|
366
101
|
@NgModule({
|
|
367
102
|
// These are for external libraries (or Angular)
|
|
368
103
|
imports: [
|
|
@@ -379,10 +114,6 @@ const monacoConfig: NgxMonacoEditorConfig = {
|
|
|
379
114
|
MaterialModules,
|
|
380
115
|
MatNativeDateModule,
|
|
381
116
|
ReactiveFormsModule,
|
|
382
|
-
// AngularEditorModule,
|
|
383
|
-
// Outline: https://app.asana.com/0/1154407311832843/1184252847388849
|
|
384
|
-
// QuillModule.forRoot(quillConfig),
|
|
385
|
-
// MonacoEditorModule.forRoot(monacoConfig)
|
|
386
117
|
// SelectorComponent.forRoot()
|
|
387
118
|
],
|
|
388
119
|
// This determines what is accessible as a component. These must be listed in `declarations`.
|
|
@@ -450,6 +181,7 @@ export class AppModule {
|
|
|
450
181
|
|
|
451
182
|
constructor() {
|
|
452
183
|
Stratus.Instances[_.uniqueId('sa_app_module_')] = this
|
|
184
|
+
// TODO: Fill out the Arrays above dynamically... :D
|
|
453
185
|
}
|
|
454
186
|
|
|
455
187
|
ngDoBootstrap(appRef: ApplicationRef) {
|
|
@@ -344,28 +344,56 @@ System.register(["@angular/core", "@angular/forms", "@angular/material/dialog",
|
|
|
344
344
|
'md-virtual-repeat', 'md-virtual-repeat-container', 'md-whiteframe',
|
|
345
345
|
'md-svg-src',
|
|
346
346
|
'stratus-base',
|
|
347
|
+
'stratus-calculator-mortgage',
|
|
348
|
+
'stratus-calendar',
|
|
347
349
|
'stratus-citation',
|
|
348
350
|
'stratus-citation-notitle',
|
|
351
|
+
'stratus-contact-form',
|
|
349
352
|
'stratus-content-selector',
|
|
350
353
|
'stratus-date-time',
|
|
354
|
+
'stratus-delete',
|
|
351
355
|
'stratus-error-message',
|
|
352
356
|
'stratus-facebook',
|
|
353
357
|
'stratus-filter',
|
|
354
358
|
'stratus-help',
|
|
359
|
+
'stratus-idx-disclaimer',
|
|
360
|
+
'stratus-idx-map',
|
|
361
|
+
'stratus-idx-member-details',
|
|
362
|
+
'stratus-idx-member-list',
|
|
363
|
+
'stratus-idx-member-search',
|
|
364
|
+
'stratus-idx-office-list',
|
|
365
|
+
'stratus-idx-office-search',
|
|
366
|
+
'stratus-idx-property-details',
|
|
367
|
+
'stratus-idx-property-details-sub-section',
|
|
368
|
+
'stratus-idx-property-list',
|
|
369
|
+
'stratus-idx-property-search',
|
|
355
370
|
'stratus-image-carousel',
|
|
356
371
|
'stratus-json-editor',
|
|
357
372
|
'stratus-media-details',
|
|
373
|
+
'stratus-media-drag-drop',
|
|
358
374
|
'stratus-media-library',
|
|
359
375
|
'stratus-media-selector',
|
|
360
376
|
'stratus-media-short-details',
|
|
361
377
|
'stratus-media-uploader',
|
|
378
|
+
'stratus-open-houses',
|
|
362
379
|
'stratus-option-value',
|
|
363
380
|
'stratus-pagination',
|
|
381
|
+
'stratus-password-reset',
|
|
364
382
|
'stratus-permissions',
|
|
383
|
+
'stratus-proposal-alert',
|
|
365
384
|
'stratus-publish',
|
|
385
|
+
'stratus-role',
|
|
366
386
|
'stratus-search',
|
|
387
|
+
'stratus-single-sign-on',
|
|
388
|
+
'stratus-social-media',
|
|
389
|
+
'stratus-sort',
|
|
390
|
+
'stratus-swiper-carousel',
|
|
367
391
|
'stratus-tag',
|
|
392
|
+
'stratus-theme-selector',
|
|
368
393
|
'stratus-twitter-feed',
|
|
394
|
+
'stratus-user-authentication',
|
|
395
|
+
'stratus-user-selector',
|
|
396
|
+
'stratus-visual-selector',
|
|
369
397
|
'sa-boot',
|
|
370
398
|
'sa-editor',
|
|
371
399
|
'sa-map',
|