@stratusjs/angular 0.3.10 → 0.4.1
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/package.json +4 -4
- package/src/angular.modules.js.map +1 -1
- package/src/app.module.js +7 -2
- package/src/app.module.js.map +1 -1
- package/src/app.module.min.js +1 -1
- package/src/app.module.ts +3 -0
- package/src/backend.service.js.map +1 -1
- package/src/base/base.component.js.map +1 -1
- package/src/confirm-dialog/confirm-dialog.component.js.map +1 -1
- package/src/editor/citation-dialog.component.html +50 -0
- package/src/editor/citation-dialog.component.js +202 -0
- package/src/editor/citation-dialog.component.js.map +1 -0
- package/src/editor/citation-dialog.component.min.html +1 -0
- package/src/editor/citation-dialog.component.min.js +1 -0
- package/src/editor/citation-dialog.component.ts +278 -0
- package/src/editor/code-view-dialog.component.js.map +1 -1
- package/src/editor/editor.component.js +52 -21
- package/src/editor/editor.component.js.map +1 -1
- package/src/editor/editor.component.min.js +1 -1
- package/src/editor/editor.component.ts +58 -19
- package/src/editor/link-dialog.component.js.map +1 -1
- package/src/editor/media-dialog.component.js.map +1 -1
- package/src/editor/quill-break-blot.plugin.js +38 -0
- package/src/editor/quill-break-blot.plugin.js.map +1 -0
- package/src/editor/quill-break-blot.plugin.min.js +1 -0
- package/src/editor/quill-html-edit.plugin.js +164 -0
- package/src/editor/quill-html-edit.plugin.js.map +1 -0
- package/src/editor/quill-html-edit.plugin.min.js +1 -0
- package/src/editor/quill-image-format.plugin.js +50 -0
- package/src/editor/quill-image-format.plugin.js.map +1 -0
- package/src/editor/quill-image-format.plugin.min.js +1 -0
- package/src/editor/quill-input-button.plugin.js +98 -0
- package/src/editor/quill-input-button.plugin.js.map +1 -0
- package/src/editor/quill-input-button.plugin.min.js +1 -0
- package/src/froala/editor/froala-editor.directive.js +328 -0
- package/src/froala/editor/froala-editor.directive.js.map +1 -0
- package/src/froala/editor/froala-editor.directive.min.js +1 -0
- package/src/froala/editor/froala-editor.module.js +37 -0
- package/src/froala/editor/froala-editor.module.js.map +1 -0
- package/src/froala/editor/froala-editor.module.min.js +1 -0
- package/src/froala/editor/index.js +22 -0
- package/src/froala/editor/index.js.map +1 -0
- package/src/froala/editor/index.min.js +1 -0
- package/src/froala/plugins/citationManager.css +23 -0
- package/src/froala/plugins/citationManager.css.map +1 -0
- package/src/froala/plugins/citationManager.js +102 -0
- package/src/froala/plugins/citationManager.js.map +1 -0
- package/src/froala/plugins/citationManager.min.css +1 -0
- package/src/froala/plugins/citationManager.min.js +1 -0
- package/src/froala/plugins/citationManager.scss +22 -0
- package/src/froala/plugins/citationManager.ts +132 -0
- package/src/froala/plugins/image_manager.js +364 -0
- package/src/froala/plugins/image_manager.js.map +1 -0
- package/src/froala/plugins/image_manager.min.js +1 -0
- package/src/froala/view/froala-view.directive.js +49 -0
- package/src/froala/view/froala-view.directive.js.map +1 -0
- package/src/froala/view/froala-view.directive.min.js +1 -0
- package/src/froala/view/froala-view.module.js +37 -0
- package/src/froala/view/froala-view.module.js.map +1 -0
- package/src/froala/view/froala-view.module.min.js +1 -0
- package/src/froala/view/index.js +22 -0
- package/src/froala/view/index.js.map +1 -0
- package/src/froala/view/index.min.js +1 -0
- package/src/material.js.map +1 -1
- package/src/media-selector/media-selector.component.js.map +1 -1
- package/src/root/root.component.js +43 -0
- package/src/root/root.component.js.map +1 -0
- package/src/root/root.component.min.js +1 -0
- package/src/selector/selector.component.js.map +1 -1
- package/src/test/test.directive.js.map +1 -1
- package/src/tree/tree-dialog.component.js.map +1 -1
- package/src/tree/tree-node.component.js.map +1 -1
- package/src/tree/tree.component.js.map +1 -1
- package/src/changeset-viewer/changeset-viewer-dialog.component.js +0 -62
- package/src/changeset-viewer/changeset-viewer-dialog.component.js.map +0 -1
- package/src/changeset-viewer/changeset-viewer-dialog.component.min.js +0 -1
- package/src/changeset-viewer/changeset-viewer-dialog.css +0 -2
- package/src/changeset-viewer/changeset-viewer-dialog.css.map +0 -1
- package/src/changeset-viewer/changeset-viewer-dialog.min.css +0 -0
- package/src/changeset-viewer/changeset-viewer.component.css +0 -4
- package/src/changeset-viewer/changeset-viewer.component.css.map +0 -1
- package/src/changeset-viewer/changeset-viewer.component.js +0 -127
- package/src/changeset-viewer/changeset-viewer.component.js.map +0 -1
- package/src/changeset-viewer/changeset-viewer.component.min.css +0 -1
- package/src/changeset-viewer/changeset-viewer.component.min.js +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stratusjs/angular",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"description": "This is the angular package for StratusJS.",
|
|
5
5
|
"scripts": {},
|
|
6
6
|
"repository": {
|
|
@@ -55,9 +55,9 @@
|
|
|
55
55
|
"@angular/platform-browser-dynamic": "^12.2.16",
|
|
56
56
|
"@angular/router": "^12.2.16",
|
|
57
57
|
"@stratusjs/boot": "^0.3.0",
|
|
58
|
-
"@stratusjs/core": "^0.
|
|
58
|
+
"@stratusjs/core": "^0.3.1",
|
|
59
59
|
"@stratusjs/map": "^0.4.3",
|
|
60
|
-
"@stratusjs/runtime": "^0.11.
|
|
60
|
+
"@stratusjs/runtime": "^0.11.14",
|
|
61
61
|
"angular-froala-wysiwyg": "^3.2.7",
|
|
62
62
|
"codemirror": "^5.61.0",
|
|
63
63
|
"froala-editor": "^3.2.7",
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"reflect-metadata": "^0.1.13",
|
|
67
67
|
"rxjs": "^6.5.5",
|
|
68
68
|
"rxjs-compat": "^6.5.5",
|
|
69
|
-
"tslib": "^
|
|
69
|
+
"tslib": "^2.4.0",
|
|
70
70
|
"web-animations-js": "^2.3.2"
|
|
71
71
|
}
|
|
72
72
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["angular.modules.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;YAoBa,cAAc,
|
|
1
|
+
{"version":3,"sources":["angular.modules.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;YAoBa,cAAc,GAA3B,MAAa,cAAc;aAC1B,CAAA;YADY,cAAc;gBAN1B,eAAQ,CAAC;oBACN,OAAO,EAAE;wBACL,kCAAe;qBAElB;iBACJ,CAAC;eACW,cAAc,CAC1B;;QACD,CAAC","file":"angular.modules.js"}
|
package/src/app.module.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
System.register(["@stratusjs/core/environment", "@angular/common/http", "@angular/core", "@angular/forms", "@angular/material/core", "@angular/platform-browser", "@angular/platform-browser/animations", "@stratusjs/angular/material", "@angular/flex-layout", "@stratusjs/angular/base/base.component", "@stratusjs/angular/confirm-dialog/confirm-dialog.component", "@stratusjs/angular/editor/editor.component", "@stratusjs/map/map.component", "@stratusjs/angular/media-selector/media-selector.component", "@stratusjs/angular/selector/selector.component", "@stratusjs/stripe/payment-method.component", "@stratusjs/stripe/payment-method-item.component", "@stratusjs/stripe/payment-method-list.component", "@stratusjs/stripe/payment-method-selector.component", "@stratusjs/stripe/setup-intent.component", "@stratusjs/angular/tree/tree.component", "@stratusjs/angular/tree/tree-dialog.component", "@stratusjs/angular/tree/tree-node.component", "lodash", "@stratusjs/runtime/stratus", "@angular/google-maps", "@stratusjs/angular/editor/code-view-dialog.component", "@stratusjs/angular/editor/media-dialog.component", "@stratusjs/angular/editor/link-dialog.component", "angular-froala-wysiwyg"], function (exports_1, context_1) {
|
|
1
|
+
System.register(["@stratusjs/core/environment", "@angular/common/http", "@angular/core", "@angular/forms", "@angular/material/core", "@angular/platform-browser", "@angular/platform-browser/animations", "@stratusjs/angular/material", "@angular/flex-layout", "@stratusjs/angular/base/base.component", "@stratusjs/angular/confirm-dialog/confirm-dialog.component", "@stratusjs/angular/editor/editor.component", "@stratusjs/map/map.component", "@stratusjs/angular/media-selector/media-selector.component", "@stratusjs/angular/selector/selector.component", "@stratusjs/stripe/payment-method.component", "@stratusjs/stripe/payment-method-item.component", "@stratusjs/stripe/payment-method-list.component", "@stratusjs/stripe/payment-method-selector.component", "@stratusjs/stripe/setup-intent.component", "@stratusjs/angular/tree/tree.component", "@stratusjs/angular/tree/tree-dialog.component", "@stratusjs/angular/tree/tree-node.component", "lodash", "@stratusjs/runtime/stratus", "@angular/google-maps", "@stratusjs/angular/editor/citation-dialog.component", "@stratusjs/angular/editor/code-view-dialog.component", "@stratusjs/angular/editor/media-dialog.component", "@stratusjs/angular/editor/link-dialog.component", "angular-froala-wysiwyg"], 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,7 +9,7 @@ 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 environment_1, 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, code_view_dialog_component_1, media_dialog_component_1, link_dialog_component_1, angular_froala_wysiwyg_1, quillConfig, AppModule;
|
|
12
|
+
var environment_1, 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, citation_dialog_component_1, code_view_dialog_component_1, media_dialog_component_1, link_dialog_component_1, angular_froala_wysiwyg_1, quillConfig, AppModule;
|
|
13
13
|
var __moduleName = context_1 && context_1.id;
|
|
14
14
|
return {
|
|
15
15
|
setters: [
|
|
@@ -91,6 +91,9 @@ System.register(["@stratusjs/core/environment", "@angular/common/http", "@angula
|
|
|
91
91
|
function (google_maps_1_1) {
|
|
92
92
|
google_maps_1 = google_maps_1_1;
|
|
93
93
|
},
|
|
94
|
+
function (citation_dialog_component_1_1) {
|
|
95
|
+
citation_dialog_component_1 = citation_dialog_component_1_1;
|
|
96
|
+
},
|
|
94
97
|
function (code_view_dialog_component_1_1) {
|
|
95
98
|
code_view_dialog_component_1 = code_view_dialog_component_1_1;
|
|
96
99
|
},
|
|
@@ -204,6 +207,7 @@ System.register(["@stratusjs/core/environment", "@angular/common/http", "@angula
|
|
|
204
207
|
],
|
|
205
208
|
entryComponents: [
|
|
206
209
|
base_component_1.BaseComponent,
|
|
210
|
+
citation_dialog_component_1.CitationDialogComponent,
|
|
207
211
|
code_view_dialog_component_1.CodeViewDialogComponent,
|
|
208
212
|
confirm_dialog_component_1.ConfirmDialogComponent,
|
|
209
213
|
editor_component_1.EditorComponent,
|
|
@@ -223,6 +227,7 @@ System.register(["@stratusjs/core/environment", "@angular/common/http", "@angula
|
|
|
223
227
|
],
|
|
224
228
|
declarations: [
|
|
225
229
|
base_component_1.BaseComponent,
|
|
230
|
+
citation_dialog_component_1.CitationDialogComponent,
|
|
226
231
|
code_view_dialog_component_1.CodeViewDialogComponent,
|
|
227
232
|
confirm_dialog_component_1.ConfirmDialogComponent,
|
|
228
233
|
editor_component_1.EditorComponent,
|
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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AS,CAkFrB;;QACD,CAAC","file":"app.module.js"}
|
package/src/app.module.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["@stratusjs/core/environment","@angular/common/http","@angular/core","@angular/forms","@angular/material/core","@angular/platform-browser","@angular/platform-browser/animations","@stratusjs/angular/material","@angular/flex-layout","@stratusjs/angular/base/base.component","@stratusjs/angular/confirm-dialog/confirm-dialog.component","@stratusjs/angular/editor/editor.component","@stratusjs/map/map.component","@stratusjs/angular/media-selector/media-selector.component","@stratusjs/angular/selector/selector.component","@stratusjs/stripe/payment-method.component","@stratusjs/stripe/payment-method-item.component","@stratusjs/stripe/payment-method-list.component","@stratusjs/stripe/payment-method-selector.component","@stratusjs/stripe/setup-intent.component","@stratusjs/angular/tree/tree.component","@stratusjs/angular/tree/tree-dialog.component","@stratusjs/angular/tree/tree-node.component","lodash","@stratusjs/runtime/stratus","@angular/google-maps","@stratusjs/angular/editor/code-view-dialog.component","@stratusjs/angular/editor/media-dialog.component","@stratusjs/angular/editor/link-dialog.component","angular-froala-wysiwyg"],function(t,e){"use strict";var o,n,a,i,r,s,u,m,l,p,c,d,f,g,C,h,M,y,b,S,
|
|
1
|
+
System.register(["@stratusjs/core/environment","@angular/common/http","@angular/core","@angular/forms","@angular/material/core","@angular/platform-browser","@angular/platform-browser/animations","@stratusjs/angular/material","@angular/flex-layout","@stratusjs/angular/base/base.component","@stratusjs/angular/confirm-dialog/confirm-dialog.component","@stratusjs/angular/editor/editor.component","@stratusjs/map/map.component","@stratusjs/angular/media-selector/media-selector.component","@stratusjs/angular/selector/selector.component","@stratusjs/stripe/payment-method.component","@stratusjs/stripe/payment-method-item.component","@stratusjs/stripe/payment-method-list.component","@stratusjs/stripe/payment-method-selector.component","@stratusjs/stripe/setup-intent.component","@stratusjs/angular/tree/tree.component","@stratusjs/angular/tree/tree-dialog.component","@stratusjs/angular/tree/tree-node.component","lodash","@stratusjs/runtime/stratus","@angular/google-maps","@stratusjs/angular/editor/citation-dialog.component","@stratusjs/angular/editor/code-view-dialog.component","@stratusjs/angular/editor/media-dialog.component","@stratusjs/angular/editor/link-dialog.component","angular-froala-wysiwyg"],function(t,e){"use strict";var o,n,a,i,r,s,u,m,l,p,c,d,f,g,C,h,M,y,b,j,S,T,w,v,D,P,L,B,R,k,N,E,V=this&&this.__decorate||function(t,e,o,n){var a,i=arguments.length,r=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(r=(i<3?a(r):i>3?a(e,o,r):a(e,o))||r);return i>3&&r&&Object.defineProperty(e,o,r),r},_=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};e&&e.id;return{setters:[function(t){o=t},function(t){n=t},function(t){a=t},function(t){i=t},function(t){r=t},function(t){s=t},function(t){u=t},function(t){m=t},function(t){l=t},function(t){p=t},function(t){c=t},function(t){d=t},function(t){f=t},function(t){g=t},function(t){C=t},function(t){h=t},function(t){M=t},function(t){y=t},function(t){b=t},function(t){j=t},function(t){S=t},function(t){T=t},function(t){w=t},function(t){v=t},function(t){D=t},function(t){P=t},function(t){L=t},function(t){B=t},function(t){R=t},function(t){k=t},function(t){N=t}],execute:function(){({modules:{syntax:!0,toolbar:[["bold","italic","underline","strike"],[{script:"sub"},{script:"super"}],[{header:[1,2,3,4,5,6,!1]}],[{list:"ordered"},{list:"bullet"}],["blockquote","code-block"],[{align:[]}],[{indent:"-1"},{indent:"+1"}],["clean"],["link","video"]],mediaLibrary:{debug:!0,buttonHTML:'<i class="fas fa-photo-video"></i>',buttonTitle:"Media Library",name:"mediaLibrary",eventName:"media-library"},codeView:{debug:!0,buttonHTML:'<i class="fas fa-file-code"></i>',buttonTitle:"Code View",name:"codeView",eventName:"code-view"}}}),o.cookie("env"),E=class{constructor(){this.initialTimeout=1e3,this.instances={},this.modules={"sa-base":p.BaseComponent,"sa-editor":d.EditorComponent,"sa-map":f.MapComponent,"sa-media-selector":g.MediaSelectorComponent,"sa-selector":C.SelectorComponent,"sa-stripe-payment-method-list":y.StripePaymentMethodListComponent,"sa-stripe-payment-method-selector":b.StripePaymentMethodSelectorComponent,"sa-tree":S.TreeComponent},D.Stratus.Instances[v.default.uniqueId("sa_app_module_")]=this}ngDoBootstrap(t){this.detectBoot(t)}exponentialTimeout(t){if(v.default.isNumber(t)&&t<this.initialTimeout)return t;const e=this.initialTimeout;return this.initialTimeout=1.01*this.initialTimeout,e}detectBoot(t){v.default.forEach(this.modules,(e,o)=>{const n=document.getElementsByTagName(o);n&&n.length&&v.default.forEach(n,o=>{o.hasAttribute("ng-version")||t.bootstrap(e,o)})}),setTimeout(()=>{this.detectBoot(t)},this.exponentialTimeout(4e3))}},E=V([a.NgModule({imports:[s.BrowserModule,u.BrowserAnimationsModule,l.FlexLayoutModule,i.FormsModule,N.FroalaEditorModule.forRoot(),N.FroalaViewModule.forRoot(),P.GoogleMapsModule,n.HttpClientModule,m.MaterialModules,r.MatNativeDateModule,i.ReactiveFormsModule],entryComponents:[p.BaseComponent,L.CitationDialogComponent,B.CodeViewDialogComponent,c.ConfirmDialogComponent,d.EditorComponent,k.LinkDialogComponent,f.MapComponent,R.MediaDialogComponent,g.MediaSelectorComponent,C.SelectorComponent,h.StripePaymentMethodComponent,M.StripePaymentMethodItemComponent,y.StripePaymentMethodListComponent,b.StripePaymentMethodSelectorComponent,j.StripeSetupIntentComponent,S.TreeComponent,T.TreeDialogComponent,w.TreeNodeComponent],declarations:[p.BaseComponent,L.CitationDialogComponent,B.CodeViewDialogComponent,c.ConfirmDialogComponent,d.EditorComponent,k.LinkDialogComponent,f.MapComponent,R.MediaDialogComponent,g.MediaSelectorComponent,C.SelectorComponent,h.StripePaymentMethodComponent,M.StripePaymentMethodItemComponent,y.StripePaymentMethodListComponent,b.StripePaymentMethodSelectorComponent,j.StripeSetupIntentComponent,S.TreeComponent,T.TreeDialogComponent,w.TreeNodeComponent],providers:[{provide:Window,useValue:window}]}),_("design:paramtypes",[])],E),t("AppModule",E)}}});
|
package/src/app.module.ts
CHANGED
|
@@ -120,6 +120,7 @@ import {
|
|
|
120
120
|
// import {QuillConfig} from 'ngx-quill/lib/quill-editor.interfaces'
|
|
121
121
|
|
|
122
122
|
// Editor Dialogs
|
|
123
|
+
import {CitationDialogComponent} from '@stratusjs/angular/editor/citation-dialog.component'
|
|
123
124
|
import {
|
|
124
125
|
CodeViewDialogComponent
|
|
125
126
|
} from '@stratusjs/angular/editor/code-view-dialog.component'
|
|
@@ -387,6 +388,7 @@ const monacoConfig: NgxMonacoEditorConfig = {
|
|
|
387
388
|
// This determines what is accessible as a component. These must be listed in `declarations`.
|
|
388
389
|
entryComponents: [
|
|
389
390
|
BaseComponent,
|
|
391
|
+
CitationDialogComponent,
|
|
390
392
|
CodeViewDialogComponent,
|
|
391
393
|
ConfirmDialogComponent,
|
|
392
394
|
EditorComponent,
|
|
@@ -407,6 +409,7 @@ const monacoConfig: NgxMonacoEditorConfig = {
|
|
|
407
409
|
// These determine what exists as a component. These must be listed in `entryComponents`.
|
|
408
410
|
declarations: [
|
|
409
411
|
BaseComponent,
|
|
412
|
+
CitationDialogComponent,
|
|
410
413
|
CodeViewDialogComponent,
|
|
411
414
|
ConfirmDialogComponent,
|
|
412
415
|
EditorComponent,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["backend.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAsBa,cAAc,
|
|
1
|
+
{"version":3,"sources":["backend.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAsBa,cAAc,GAA3B,MAAa,cAAc;gBASvB,YAAoB,IAAgB;oBAAhB,SAAI,GAAJ,IAAI,CAAY;oBANpC,UAAK,GAAG,SAAS,CAAA;oBAQb,IAAI,CAAC,GAAG,GAAG,gBAAC,CAAC,QA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I,CAAC,CAAA;wBAC3B,UAAU,CAAC,QAAQ,EAAE,CAAA;wBACrB,OAAM;qBACT;oBAED,IAAI,CAAC,IAAI;yBACJ,GAAG,CAAC,GAAG,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE,CAAC;yBACjC,SAAS,CAAC,CAAC,QAA2B,EAAE,EAAE;wBACvC,KAAK,CAAC,IAAI,GAAG,QAAQ,CAAA;wBACrB,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;wBACzB,UAAU,CAAC,QAAQ,EAAE,CAAA;oBACzB,CAAC,CAAC,CAAA;gBACV,CAAC;aACJ,CAAA;YA7DY,cAAc;gBAH1B,iBAAU,CAAC;oBACR,UAAU,EAAE,MAAM;iBACrB,CAAC;iDAU4B,iBAAU;eAT3B,cAAc,CA6D1B;;QACD,CAAC","file":"backend.service.js"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["base.component.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAuCM,SAAS,GAAG,oBAAoB,CAAA;YAChC,UAAU,GAAG,MAAM,CAAA;YAGnB,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,EAAE,CAAA;YAc3F,aAAa,
|
|
1
|
+
{"version":3,"sources":["base.component.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAuCM,SAAS,GAAG,oBAAoB,CAAA;YAChC,UAAU,GAAG,MAAM,CAAA;YAGnB,GAAG,GAAG,CAAC,oBAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC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AR,YAAK,EAAE;;+DAAqB;YACpB;gBAAR,YAAK,EAAE;;qDAAW;YACV;gBAAR,YAAK,EAAE;;2DAAkB;YACjB;gBAAR,YAAK,EAAE;;2DAAkB;YACjB;gBAAR,YAAK,EAAE;;yDAAgB;YACf;gBAAR,YAAK,EAAE;;sDAAY;YACX;gBAAR,YAAK,EAAE;;0DAAgB;YAGf;gBAAR,YAAK,EAAE;;uDAAa;YACZ;gBAAR,YAAK,EAAE;;2DAAiB;YAChB;gBAAR,YAAK,EAAE;;2DAAiB;YAnBhB,aAAa;gBATzB,gBAAS,CAAC;oBACP,QAAQ,EAAE,SAAS;oBAEnB,WAAW,EAAE,GAAG,QAAQ,IAAI,UAAU,IAAI,UAAU,aAAa,GAAG,OAAO;iBAI9E,CAAC;iDAwByB,+BAAY;oBAChB,wBAAiB;oBACZ,iBAAU;eAxBzB,aAAa,CAuDzB;;QACD,CAAC","file":"base.component.js"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["confirm-dialog.component.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAYM,SAAS,GAAG,oBAAoB,CAAA;YAChC,UAAU,GAAG,gBAAgB,CAAA;YAG7B,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,EAAE,CAAA;YAe3F,sBAAsB,
|
|
1
|
+
{"version":3,"sources":["confirm-dialog.component.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAYM,SAAS,GAAG,oBAAoB,CAAA;YAChC,UAAU,GAAG,gBAAgB,CAAA;YAG7B,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,EAAE,CAAA;YAe3F,sBAAsB,GAAnC,MAAa,sBAAsB;gBAC/B,YACW,SAA+C,EACtB,IAAuB;oBADhD,cAAS,GAAT,SAAS,CAAsC;oBACtB,SAAI,GAAJ,IAAI,CAAmB;gBACxD,CAAC;gBAEJ,SAAS;oBACL,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;gBAC9B,CAAC;gBAED,SAAS;oBACL,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;gBAC/B,CAAC;aACJ,CAAA;YAbY,sBAAsB;gBALlC,gBAAS,CAAC;oBACP,QAAQ,EAAE,MAAM,UAAU,EAAE;oBAC5B,WAAW,EAAE,GAAG,QAAQ,IAAI,UAAU,IAAI,UAAU,aAAa,GAAG,OAAO;iBAE9E,CAAC;gBAIO,WAAA,aAAM,CAAC,wBAAe,CAAC,CAAA;iDADN,qBAAY;eAFzB,sBAAsB,CAalC;;QACD,CAAC","file":"confirm-dialog.component.js"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
<form class="dialog-form" [formGroup]='dialogCitationForm'>
|
|
2
|
+
<mat-card>
|
|
3
|
+
<mat-card-title mat-dialog-title [innerHTML]='popupTitle'>Citation Creator</mat-card-title>
|
|
4
|
+
|
|
5
|
+
<!-- Note: This spawns from the Citation Dialog Component, so the UI here will need a revamp after it becomes functional. -->
|
|
6
|
+
<mat-card-content mat-dialog-content class="citation-dialog-content">
|
|
7
|
+
<mat-progress-bar mode="indeterminate" *ngIf="isPopupLoading"></mat-progress-bar>
|
|
8
|
+
<p *ngIf="!isPopupLoading && warningMessage" [innerHTML]='warningMessage'></p>
|
|
9
|
+
<!-- HTML Content -->
|
|
10
|
+
<mat-form-field class="form-field" style="width: 100%;">
|
|
11
|
+
<textarea matInput placeholder="Add a Citation Content"
|
|
12
|
+
aria-label="Add a Citation Content"
|
|
13
|
+
formControlName='citationElementInput'
|
|
14
|
+
[readonly]="formDisabled || isPopupLoading"
|
|
15
|
+
[disabled]="formDisabled || isPopupLoading"
|
|
16
|
+
style="min-height: 100px;"
|
|
17
|
+
></textarea>
|
|
18
|
+
</mat-form-field>
|
|
19
|
+
<!-- citationTitleInput. Disabled as the editor cannot handle angular -->
|
|
20
|
+
<!--<mat-form-field class="form-field" style="width: 100%;">
|
|
21
|
+
<input matInput placeholder="Add a Optional Citation Number/Title"
|
|
22
|
+
aria-label="Add a Optional Citation Number/Title"
|
|
23
|
+
[readonly]="formDisabled || isPopupLoading"
|
|
24
|
+
[disabled]="formDisabled || isPopupLoading"
|
|
25
|
+
formControlName='citationTitleInput'
|
|
26
|
+
>
|
|
27
|
+
</mat-form-field>-->
|
|
28
|
+
</mat-card-content>
|
|
29
|
+
<mat-card-actions>
|
|
30
|
+
<!-- [disabled]="isSelected(mediaEntity)" -->
|
|
31
|
+
<!-- This action button is for selecting the Media, instead of clicking directly on the image -->
|
|
32
|
+
<button mat-button
|
|
33
|
+
(click)="confirm()"
|
|
34
|
+
[disabled]="formDisabled || isPopupLoading"
|
|
35
|
+
>
|
|
36
|
+
Confirm
|
|
37
|
+
</button>
|
|
38
|
+
<button mat-button (click)="cancel()">
|
|
39
|
+
Cancel
|
|
40
|
+
</button>
|
|
41
|
+
<!-- TODO: Add action buttons for deleting media with confirm dialog (i.e. trash can) -->
|
|
42
|
+
</mat-card-actions>
|
|
43
|
+
|
|
44
|
+
<!--<mat-progress-bar mode="indeterminate" *ngIf="isContentLoading"></mat-progress-bar>-->
|
|
45
|
+
<!-- TODO: Add more information for the Content items -->
|
|
46
|
+
<div class="content" fxLayout="row wrap" fxLayoutGap="16px grid">
|
|
47
|
+
|
|
48
|
+
</div>
|
|
49
|
+
</mat-card>
|
|
50
|
+
</form>
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
System.register(["@angular/core", "@angular/forms", "@angular/material/dialog", "@angular/material/snack-bar", "rxjs", "lodash", "@stratusjs/runtime/stratus", "@stratusjs/core/environment", "@stratusjs/angular/backend.service", "@stratusjs/angular/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, backend_service_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 (backend_service_1_1) {
|
|
44
|
+
backend_service_1 = backend_service_1_1;
|
|
45
|
+
},
|
|
46
|
+
function (responsive_component_1_1) {
|
|
47
|
+
responsive_component_1 = responsive_component_1_1;
|
|
48
|
+
},
|
|
49
|
+
function (icon_1_1) {
|
|
50
|
+
icon_1 = icon_1_1;
|
|
51
|
+
},
|
|
52
|
+
function (platform_browser_1_1) {
|
|
53
|
+
platform_browser_1 = platform_browser_1_1;
|
|
54
|
+
}
|
|
55
|
+
],
|
|
56
|
+
execute: function () {
|
|
57
|
+
systemDir = '@stratusjs/angular';
|
|
58
|
+
moduleName = 'citation-dialog';
|
|
59
|
+
parentModuleName = 'editor';
|
|
60
|
+
min = !environment_1.cookie('env') ? '.min' : '';
|
|
61
|
+
localDir = `${stratus_1.Stratus.BaseUrl}${boot.configuration.paths[`${systemDir}/*`].replace(/[^/]*$/, '')}`;
|
|
62
|
+
CitationDialogComponent = class CitationDialogComponent extends responsive_component_1.ResponsiveComponent {
|
|
63
|
+
constructor(dialogRef, data, fb, backend, snackBar, iconRegistry, sanitizer, ref) {
|
|
64
|
+
super();
|
|
65
|
+
this.dialogRef = dialogRef;
|
|
66
|
+
this.data = data;
|
|
67
|
+
this.fb = fb;
|
|
68
|
+
this.backend = backend;
|
|
69
|
+
this.snackBar = snackBar;
|
|
70
|
+
this.iconRegistry = iconRegistry;
|
|
71
|
+
this.sanitizer = sanitizer;
|
|
72
|
+
this.ref = ref;
|
|
73
|
+
this.title = moduleName + '_component';
|
|
74
|
+
this.Stratus = stratus_1.Stratus;
|
|
75
|
+
this.popupTitle = 'Create New Citation';
|
|
76
|
+
this.isPopupLoading = true;
|
|
77
|
+
this.formDisabled = false;
|
|
78
|
+
this.newCitation = true;
|
|
79
|
+
this.svgIcons = {};
|
|
80
|
+
}
|
|
81
|
+
ngOnInit() {
|
|
82
|
+
this.uid = lodash_1.uniqueId(`sa_${lodash_1.snakeCase(moduleName)}_component_`);
|
|
83
|
+
stratus_1.Stratus.Instances[this.uid] = this;
|
|
84
|
+
this.model = this.data.model;
|
|
85
|
+
this.property = this.data.property;
|
|
86
|
+
this.editor = this.data.editor;
|
|
87
|
+
this.eventManager = this.data.eventManager;
|
|
88
|
+
this.baseEditor = this.data.eventManager.editor;
|
|
89
|
+
this.dialogCitationForm = this.fb.group({
|
|
90
|
+
citationElementInput: new forms_1.FormControl('', [forms_1.Validators.required]),
|
|
91
|
+
citationTitleInput: ''
|
|
92
|
+
});
|
|
93
|
+
this.highlightedText = this.baseEditor.selection.text();
|
|
94
|
+
const containedElement = this.baseEditor.selection.endElement();
|
|
95
|
+
const containedElementName = containedElement.tagName;
|
|
96
|
+
if (containedElementName === 'STRATUS-CITATION') {
|
|
97
|
+
this.newCitation = false;
|
|
98
|
+
this.existingCitationElement = containedElement;
|
|
99
|
+
const copiedElement = containedElement.cloneNode(true);
|
|
100
|
+
Array.from(copiedElement.getElementsByClassName('fr-marker')).forEach((markerEl) => {
|
|
101
|
+
markerEl.remove();
|
|
102
|
+
});
|
|
103
|
+
this.dialogCitationForm.get('citationElementInput').setValue(copiedElement.innerHTML);
|
|
104
|
+
}
|
|
105
|
+
if (this.newCitation && !lodash_1.isEmpty(this.highlightedText)) {
|
|
106
|
+
this.popupTitle = 'Convert Text into Citation';
|
|
107
|
+
this.dialogCitationForm.get('citationElementInput').setValue(this.highlightedText);
|
|
108
|
+
}
|
|
109
|
+
if (!this.newCitation) {
|
|
110
|
+
this.popupTitle = 'Update Citation';
|
|
111
|
+
}
|
|
112
|
+
this.isPopupLoading = false;
|
|
113
|
+
this.refresh();
|
|
114
|
+
}
|
|
115
|
+
cancel() {
|
|
116
|
+
this.dialogRef.close();
|
|
117
|
+
this.refresh();
|
|
118
|
+
}
|
|
119
|
+
confirm() {
|
|
120
|
+
if (lodash_1.isUndefined(this.dialogCitationForm.get('citationElementInput'))) {
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
123
|
+
const content = this.dialogCitationForm.get('citationElementInput').value;
|
|
124
|
+
if (lodash_1.isUndefined(content) || !lodash_1.isString(content)) {
|
|
125
|
+
return;
|
|
126
|
+
}
|
|
127
|
+
const title = this.dialogCitationForm.get('citationTitleInput').value;
|
|
128
|
+
const citationElement = this.createCitation(content, title);
|
|
129
|
+
if (!citationElement) {
|
|
130
|
+
console.warn(`${moduleName}: unable to build citation for: ${content}`);
|
|
131
|
+
this.snackBar.open(`Unable to build citation for: ${content}.`, 'dismiss', {
|
|
132
|
+
duration: 5000,
|
|
133
|
+
horizontalPosition: 'right',
|
|
134
|
+
verticalPosition: 'bottom'
|
|
135
|
+
});
|
|
136
|
+
return;
|
|
137
|
+
}
|
|
138
|
+
if (!this.eventManager) {
|
|
139
|
+
console.warn(`${moduleName}: event manager is not set.`);
|
|
140
|
+
return;
|
|
141
|
+
}
|
|
142
|
+
if (!this.newCitation && this.existingCitationElement) {
|
|
143
|
+
this.existingCitationElement.outerHTML = citationElement;
|
|
144
|
+
}
|
|
145
|
+
else {
|
|
146
|
+
this.eventManager.trigger('insert', citationElement, this.editor);
|
|
147
|
+
}
|
|
148
|
+
this.dialogRef.close();
|
|
149
|
+
}
|
|
150
|
+
createCitation(content, title) {
|
|
151
|
+
if (!content) {
|
|
152
|
+
console.warn(`${moduleName}: unable to create citation for empty content`);
|
|
153
|
+
return null;
|
|
154
|
+
}
|
|
155
|
+
return lodash_1.isEmpty(title) ? `<stratus-citation>${content}</stratus-citation>` : `<stratus-citation data-title="${title}">${content}</stratus-citation>`;
|
|
156
|
+
}
|
|
157
|
+
getSvg(url, options) {
|
|
158
|
+
const uid = this.addSvgIcon(url, options);
|
|
159
|
+
return new rxjs_1.Observable((subscriber) => {
|
|
160
|
+
this.iconRegistry
|
|
161
|
+
.getNamedSvgIcon(uid)
|
|
162
|
+
.subscribe({
|
|
163
|
+
error(err) {
|
|
164
|
+
console.error(`getSvg(${url}): ${err}`);
|
|
165
|
+
},
|
|
166
|
+
complete() {
|
|
167
|
+
subscriber.next(uid);
|
|
168
|
+
}
|
|
169
|
+
});
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
addSvgIcon(url, options) {
|
|
173
|
+
if (url in this.svgIcons) {
|
|
174
|
+
return this.svgIcons[url];
|
|
175
|
+
}
|
|
176
|
+
if (!options) {
|
|
177
|
+
options = {};
|
|
178
|
+
}
|
|
179
|
+
const uid = this.svgIcons[url] = lodash_1.uniqueId('selector_svg');
|
|
180
|
+
this.iconRegistry.addSvgIcon(uid, this.sanitizer.bypassSecurityTrustResourceUrl(url), options);
|
|
181
|
+
return uid;
|
|
182
|
+
}
|
|
183
|
+
};
|
|
184
|
+
CitationDialogComponent = __decorate([
|
|
185
|
+
core_1.Component({
|
|
186
|
+
selector: `sa-${moduleName}`,
|
|
187
|
+
templateUrl: `${localDir}/${parentModuleName}/${moduleName}.component${min}.html`,
|
|
188
|
+
}),
|
|
189
|
+
__param(1, core_1.Inject(dialog_1.MAT_DIALOG_DATA)),
|
|
190
|
+
__metadata("design:paramtypes", [dialog_1.MatDialogRef, Object, forms_1.FormBuilder,
|
|
191
|
+
backend_service_1.BackendService,
|
|
192
|
+
snack_bar_1.MatSnackBar,
|
|
193
|
+
icon_1.MatIconRegistry,
|
|
194
|
+
platform_browser_1.DomSanitizer,
|
|
195
|
+
core_1.ChangeDetectorRef])
|
|
196
|
+
], CitationDialogComponent);
|
|
197
|
+
exports_1("CitationDialogComponent", CitationDialogComponent);
|
|
198
|
+
}
|
|
199
|
+
};
|
|
200
|
+
});
|
|
201
|
+
|
|
202
|
+
//# sourceMappingURL=citation-dialog.component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["citation-dialog.component.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAwDM,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,EAAE,CAAA;YAU3F,uBAAuB,GAApC,MAAa,uBAAwB,SAAQ,0CAAmB;gBAuC5D,YACW,SAAgD,EACvB,IAAwB,EAChD,EAAe,EACf,OAAuB,EACvB,QAAqB,EACrB,YAA6B,EAC7B,SAAuB,EACrB,GAAsB;oBAGhC,KAAK,EAAE,CAAA;oBAVA,cAAS,GAAT,SAAS,CAAuC;oBACvB,SAAI,GAAJ,IAAI,CAAoB;oBAChD,OAAE,GAAF,EAAE,CAAa;oBACf,YAAO,GAAP,OAAO,CAAgB;oBACvB,aAAQ,GAAR,QAAQ,CAAa;oBACrB,iBAAY,GAAZ,YAAY,CAAiB;oBAC7B,cAAS,GAAT,SAAS,CAAc;oBACrB,QAAG,GAAH,GAAG,CAAmB;oBA5CpC,UAAK,GAAG,UAAU,GAAG,YAAY,CAAA;oBAIjC,YAAO,GAAG,iBAAO,CAAA;oB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AAC;gBA0CO,WAAA,aAAM,CAAC,wBAAe,CAAC,CAAA;iDADN,qBAAY,UAElB,mBAAW;oBACN,gCAAc;oBACb,uBAAW;oBACP,sBAAe;oBAClB,+BAAY;oBAChB,wBAAiB;eA/C3B,uBAAuB,CAoMnC;;QAUD,CAAC","file":"citation-dialog.component.js"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<form class="dialog-form" [formGroup]="dialogCitationForm"><mat-card><mat-card-title mat-dialog-title [innerHTML]="popupTitle">Citation Creator</mat-card-title><mat-card-content mat-dialog-content class="citation-dialog-content"><mat-progress-bar mode="indeterminate" *ngIf="isPopupLoading"></mat-progress-bar><p *ngIf="!isPopupLoading && warningMessage" [innerHTML]="warningMessage"></p><mat-form-field class="form-field" style="width: 100%;"><textarea matInput placeholder="Add a Citation Content" aria-label="Add a Citation Content" formControlName="citationElementInput" [readonly]="formDisabled || isPopupLoading" [disabled]="formDisabled || isPopupLoading" style="min-height: 100px;"></textarea></mat-form-field></mat-card-content><mat-card-actions><button mat-button (click)="confirm()" [disabled]="formDisabled || isPopupLoading">Confirm</button> <button mat-button (click)="cancel()">Cancel</button></mat-card-actions><div class="content" fxLayout="row wrap" fxLayoutGap="16px grid"></div></mat-card></form>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
System.register(["@angular/core","@angular/forms","@angular/material/dialog","@angular/material/snack-bar","rxjs","lodash","@stratusjs/runtime/stratus","@stratusjs/core/environment","@stratusjs/angular/backend.service","@stratusjs/angular/core/responsive.component","@angular/material/icon","@angular/platform-browser"],function(t,i){"use strict";var e,n,o,s,a,r,c,l,u,h,g,d,f,m,p,v,C=this&&this.__decorate||function(t,i,e,n){var o,s=arguments.length,a=s<3?i:null===n?n=Object.getOwnPropertyDescriptor(i,e):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,i,e,n);else for(var r=t.length-1;r>=0;r--)(o=t[r])&&(a=(s<3?o(a):s>3?o(i,e,a):o(i,e))||a);return s>3&&a&&Object.defineProperty(i,e,a),a},b=this&&this.__metadata||function(t,i){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,i)},I=this&&this.__param||function(t,i){return function(e,n){i(e,n,t)}};i&&i.id;return{setters:[function(t){e=t},function(t){n=t},function(t){o=t},function(t){s=t},function(t){a=t},function(t){r=t},function(t){c=t},function(t){l=t},function(t){u=t},function(t){h=t},function(t){g=t},function(t){d=t}],execute:function(){"@stratusjs/angular",f="citation-dialog","editor",m=l.cookie("env")?"":".min",p=`${c.Stratus.BaseUrl}${boot.configuration.paths["@stratusjs/angular/*"].replace(/[^/]*$/,"")}`,v=class extends h.ResponsiveComponent{constructor(t,i,e,n,o,s,a,r){super(),this.dialogRef=t,this.data=i,this.fb=e,this.backend=n,this.snackBar=o,this.iconRegistry=s,this.sanitizer=a,this.ref=r,this.title=f+"_component",this.Stratus=c.Stratus,this.popupTitle="Create New Citation",this.isPopupLoading=!0,this.formDisabled=!1,this.newCitation=!0,this.svgIcons={}}ngOnInit(){this.uid=r.uniqueId(`sa_${r.snakeCase(f)}_component_`),c.Stratus.Instances[this.uid]=this,this.model=this.data.model,this.property=this.data.property,this.editor=this.data.editor,this.eventManager=this.data.eventManager,this.baseEditor=this.data.eventManager.editor,this.dialogCitationForm=this.fb.group({citationElementInput:new n.FormControl("",[n.Validators.required]),citationTitleInput:""}),this.highlightedText=this.baseEditor.selection.text();const t=this.baseEditor.selection.endElement();if("STRATUS-CITATION"===t.tagName){this.newCitation=!1,this.existingCitationElement=t;const i=t.cloneNode(!0);Array.from(i.getElementsByClassName("fr-marker")).forEach(t=>{t.remove()}),this.dialogCitationForm.get("citationElementInput").setValue(i.innerHTML)}this.newCitation&&!r.isEmpty(this.highlightedText)&&(this.popupTitle="Convert Text into Citation",this.dialogCitationForm.get("citationElementInput").setValue(this.highlightedText)),this.newCitation||(this.popupTitle="Update Citation"),this.isPopupLoading=!1,this.refresh()}cancel(){this.dialogRef.close(),this.refresh()}confirm(){if(r.isUndefined(this.dialogCitationForm.get("citationElementInput")))return;const t=this.dialogCitationForm.get("citationElementInput").value;if(r.isUndefined(t)||!r.isString(t))return;const i=this.dialogCitationForm.get("citationTitleInput").value,e=this.createCitation(t,i);if(!e)return console.warn(`${f}: unable to build citation for: ${t}`),void this.snackBar.open(`Unable to build citation for: ${t}.`,"dismiss",{duration:5e3,horizontalPosition:"right",verticalPosition:"bottom"});this.eventManager?(!this.newCitation&&this.existingCitationElement?this.existingCitationElement.outerHTML=e:this.eventManager.trigger("insert",e,this.editor),this.dialogRef.close()):console.warn(`${f}: event manager is not set.`)}createCitation(t,i){return t?r.isEmpty(i)?`<stratus-citation>${t}</stratus-citation>`:`<stratus-citation data-title="${i}">${t}</stratus-citation>`:(console.warn(`${f}: unable to create citation for empty content`),null)}getSvg(t,i){const e=this.addSvgIcon(t,i);return new a.Observable(i=>{this.iconRegistry.getNamedSvgIcon(e).subscribe({error(i){console.error(`getSvg(${t}): ${i}`)},complete(){i.next(e)}})})}addSvgIcon(t,i){if(t in this.svgIcons)return this.svgIcons[t];i||(i={});const e=this.svgIcons[t]=r.uniqueId("selector_svg");return this.iconRegistry.addSvgIcon(e,this.sanitizer.bypassSecurityTrustResourceUrl(t),i),e}},v=C([e.Component({selector:`sa-${f}`,templateUrl:`${p}/editor/${f}.component${m}.html`}),I(1,e.Inject(o.MAT_DIALOG_DATA)),b("design:paramtypes",[o.MatDialogRef,Object,n.FormBuilder,u.BackendService,s.MatSnackBar,g.MatIconRegistry,d.DomSanitizer,e.ChangeDetectorRef])],v),t("CitationDialogComponent",v)}}});
|