@stratusjs/angular 0.4.3 → 0.4.4
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 +1 -1
- package/src/editor/citation-dialog.component.css +7 -0
- package/src/editor/citation-dialog.component.css.map +1 -0
- package/src/editor/citation-dialog.component.html +6 -5
- package/src/editor/citation-dialog.component.js +1 -0
- package/src/editor/citation-dialog.component.js.map +1 -1
- package/src/editor/citation-dialog.component.min.css +1 -0
- package/src/editor/citation-dialog.component.min.html +1 -1
- package/src/editor/citation-dialog.component.min.js +1 -1
- package/src/editor/citation-dialog.component.scss +10 -0
- package/src/editor/citation-dialog.component.ts +1 -1
package/package.json
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["packages/angular/src/editor/citation-dialog.component.scss"],"names":[],"mappings":"AAEI;EACE;EACA;EACA;EACA","file":"citation-dialog.component.css","sourcesContent":["sa-citation-dialog {\n .dialog-form {\n .field-notes {\n margin: -10px 0 25px;\n color: rgba(0,0,0,0.4);\n font-style: italic;\n font-size: 10px;\n }\n }\n}\n"]}
|
|
@@ -5,18 +5,19 @@
|
|
|
5
5
|
<!-- Note: This spawns from the Citation Dialog Component, so the UI here will need a revamp after it becomes functional. -->
|
|
6
6
|
<mat-card-content mat-dialog-content class="citation-dialog-content">
|
|
7
7
|
<mat-progress-bar mode="indeterminate" *ngIf="isPopupLoading"></mat-progress-bar>
|
|
8
|
-
<p *ngIf="!isPopupLoading && warningMessage" [innerHTML]=
|
|
8
|
+
<p *ngIf="!isPopupLoading && warningMessage" [innerHTML]="warningMessage"></p>
|
|
9
9
|
<mat-form-field class="form-field" style="width: 100%;">
|
|
10
|
-
<input matInput placeholder="Optional Citation
|
|
11
|
-
aria-label="Optional Citation
|
|
10
|
+
<input matInput placeholder="Optional Citation Title"
|
|
11
|
+
aria-label="Optional Citation Title"
|
|
12
12
|
[readonly]="formDisabled || isPopupLoading"
|
|
13
13
|
formControlName='citationTitleInput'
|
|
14
14
|
>
|
|
15
15
|
</mat-form-field>
|
|
16
|
+
<p class="field-notes">If no title is provided an auto-incremented number will be displayed.</p>
|
|
16
17
|
<!-- HTML Content -->
|
|
17
18
|
<mat-form-field class="form-field" style="width: 100%;">
|
|
18
|
-
<textarea matInput placeholder="
|
|
19
|
-
aria-label="
|
|
19
|
+
<textarea matInput placeholder="Citation Text or HTML"
|
|
20
|
+
aria-label="Citation Text or HTML"
|
|
20
21
|
formControlName='citationContentInput'
|
|
21
22
|
[readonly]="formDisabled || isPopupLoading"
|
|
22
23
|
style="min-height: 100px;"
|
|
@@ -77,6 +77,7 @@ System.register(["@angular/core", "@angular/forms", "@angular/material/dialog",
|
|
|
77
77
|
ngOnInit() {
|
|
78
78
|
this.uid = lodash_1.uniqueId(`sa_${lodash_1.snakeCase(moduleName)}_component_`);
|
|
79
79
|
stratus_1.Stratus.Instances[this.uid] = this;
|
|
80
|
+
stratus_1.Stratus.Internals.CssLoader(`${localDir}${parentModuleName}/${moduleName}.component${min}.css`);
|
|
80
81
|
this.model = this.data.model;
|
|
81
82
|
this.property = this.data.property;
|
|
82
83
|
this.editor = this.data.editor;
|
|
@@ -1 +1 @@
|
|
|
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,EAAE,CAAA;Y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BA0CO,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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
sa-citation-dialog .dialog-form .field-notes{margin:-10px 0 25px;color:rgba(0,0,0,.4);font-style:italic;font-size:10px}
|
|
@@ -1 +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%;"><input matInput placeholder="Optional Citation
|
|
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%;"><input matInput placeholder="Optional Citation Title" aria-label="Optional Citation Title" [readonly]="formDisabled || isPopupLoading" formControlName="citationTitleInput"></mat-form-field><p class="field-notes">If no title is provided an auto-incremented number will be displayed.</p><mat-form-field class="form-field" style="width: 100%;"><textarea matInput placeholder="Citation Text or HTML" aria-label="Citation Text or HTML" formControlName="citationContentInput" [readonly]="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>
|
|
@@ -1 +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/core/responsive.component","@angular/material/icon","@angular/platform-browser"],function(t,i){"use strict";var e,n,o,a,s,r,c,l,u,h,g,d,f,m,p,C=this&&this.__decorate||function(t,i,e,n){var o,a=arguments.length,s=a<3?i:null===n?n=Object.getOwnPropertyDescriptor(i,e):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,i,e,n);else for(var r=t.length-1;r>=0;r--)(o=t[r])&&(s=(a<3?o(s):a>3?o(i,e,s):o(i,e))||s);return a>3&&s&&Object.defineProperty(i,e,s),s},v=this&&this.__metadata||function(t,i){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,i)},b=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){a=t},function(t){s=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}],execute:function(){"@stratusjs/angular",d="citation-dialog","editor",f=l.cookie("env")?"":".min",m=`${c.Stratus.BaseUrl}${boot.configuration.paths["@stratusjs/angular/*"].replace(/[^/]*$/,"")}`,p=class extends u.ResponsiveComponent{constructor(t,i,e,n,o,a,s){super(),this.dialogRef=t,this.data=i,this.fb=e,this.snackBar=n,this.iconRegistry=o,this.sanitizer=a,this.ref=s,this.title=d+"_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(d)}_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({citationContentInput:new n.FormControl("",[n.Validators.required]),citationTitleInput:new n.FormControl("")}),this.highlightedText=this.baseEditor.selection.text();const t=this.baseEditor.citationManager.getSelectedCitation()||this.baseEditor.citationManager.getLastKnownCitation();if(this.baseEditor.citationManager.hideToolbar(),t){this.newCitation=!1,this.existingCitationElement=t;const i=t.cloneNode(!0);Array.from(i.getElementsByClassName("fr-marker")).forEach(t=>{t.remove()});const e=r.head(i.getElementsByTagName("stratus-citation-content"));e&&this.dialogCitationForm.get("citationContentInput").setValue(e.innerHTML);const n=r.head(i.getElementsByTagName("stratus-citation-title"));n&&this.dialogCitationForm.get("citationTitleInput").setValue(n.innerHTML)}this.newCitation&&!r.isEmpty(this.highlightedText)&&(this.popupTitle="Convert Text into Citation",this.dialogCitationForm.get("citationTitleInput").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("citationContentInput")))return;const t=this.dialogCitationForm.get("citationContentInput").value;if(r.isUndefined(t)||!r.isString(t))return;const i=this.dialogCitationForm.get("citationTitleInput").value,e=this.createCitationHTML(t,i);if(!e)return console.warn(`${d}: 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(`${d}: event manager is not set.`)}createCitationHTML(t,i){return t?`<stratus-citation><stratus-citation-content>${t}</stratus-citation-content>${i=r.isEmpty(i)?"<stratus-citation-notitle/>":`<stratus-citation-title>${i}</stratus-citation-title>`}</stratus-citation-content>`:(console.warn(`${d}: unable to create citation for empty content`),null)}getSvg(t,i){const e=this.addSvgIcon(t,i);return new s.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}},p=C([e.Component({selector:`sa-${d}`,templateUrl:`${m}/editor/${d}.component${f}.html`}),b(1,e.Inject(o.MAT_DIALOG_DATA)),v("design:paramtypes",[o.MatDialogRef,Object,n.FormBuilder,a.MatSnackBar,h.MatIconRegistry,g.DomSanitizer,e.ChangeDetectorRef])],p),t("CitationDialogComponent",p)}}});
|
|
1
|
+
System.register(["@angular/core","@angular/forms","@angular/material/dialog","@angular/material/snack-bar","rxjs","lodash","@stratusjs/runtime/stratus","@stratusjs/core/environment","@stratusjs/angular/core/responsive.component","@angular/material/icon","@angular/platform-browser"],function(t,i){"use strict";var e,n,o,a,s,r,c,l,u,h,g,d,f,m,p,C=this&&this.__decorate||function(t,i,e,n){var o,a=arguments.length,s=a<3?i:null===n?n=Object.getOwnPropertyDescriptor(i,e):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,i,e,n);else for(var r=t.length-1;r>=0;r--)(o=t[r])&&(s=(a<3?o(s):a>3?o(i,e,s):o(i,e))||s);return a>3&&s&&Object.defineProperty(i,e,s),s},v=this&&this.__metadata||function(t,i){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,i)},b=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){a=t},function(t){s=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}],execute:function(){"@stratusjs/angular",d="citation-dialog","editor",f=l.cookie("env")?"":".min",m=`${c.Stratus.BaseUrl}${boot.configuration.paths["@stratusjs/angular/*"].replace(/[^/]*$/,"")}`,p=class extends u.ResponsiveComponent{constructor(t,i,e,n,o,a,s){super(),this.dialogRef=t,this.data=i,this.fb=e,this.snackBar=n,this.iconRegistry=o,this.sanitizer=a,this.ref=s,this.title=d+"_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(d)}_component_`),c.Stratus.Instances[this.uid]=this,c.Stratus.Internals.CssLoader(`${m}editor/${d}.component${f}.css`),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({citationContentInput:new n.FormControl("",[n.Validators.required]),citationTitleInput:new n.FormControl("")}),this.highlightedText=this.baseEditor.selection.text();const t=this.baseEditor.citationManager.getSelectedCitation()||this.baseEditor.citationManager.getLastKnownCitation();if(this.baseEditor.citationManager.hideToolbar(),t){this.newCitation=!1,this.existingCitationElement=t;const i=t.cloneNode(!0);Array.from(i.getElementsByClassName("fr-marker")).forEach(t=>{t.remove()});const e=r.head(i.getElementsByTagName("stratus-citation-content"));e&&this.dialogCitationForm.get("citationContentInput").setValue(e.innerHTML);const n=r.head(i.getElementsByTagName("stratus-citation-title"));n&&this.dialogCitationForm.get("citationTitleInput").setValue(n.innerHTML)}this.newCitation&&!r.isEmpty(this.highlightedText)&&(this.popupTitle="Convert Text into Citation",this.dialogCitationForm.get("citationTitleInput").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("citationContentInput")))return;const t=this.dialogCitationForm.get("citationContentInput").value;if(r.isUndefined(t)||!r.isString(t))return;const i=this.dialogCitationForm.get("citationTitleInput").value,e=this.createCitationHTML(t,i);if(!e)return console.warn(`${d}: 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(`${d}: event manager is not set.`)}createCitationHTML(t,i){return t?`<stratus-citation><stratus-citation-content>${t}</stratus-citation-content>${i=r.isEmpty(i)?"<stratus-citation-notitle/>":`<stratus-citation-title>${i}</stratus-citation-title>`}</stratus-citation-content>`:(console.warn(`${d}: unable to create citation for empty content`),null)}getSvg(t,i){const e=this.addSvgIcon(t,i);return new s.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}},p=C([e.Component({selector:`sa-${d}`,templateUrl:`${m}/editor/${d}.component${f}.html`}),b(1,e.Inject(o.MAT_DIALOG_DATA)),v("design:paramtypes",[o.MatDialogRef,Object,n.FormBuilder,a.MatSnackBar,h.MatIconRegistry,g.DomSanitizer,e.ChangeDetectorRef])],p),t("CitationDialogComponent",p)}}});
|
|
@@ -128,7 +128,7 @@ export class CitationDialogComponent extends ResponsiveComponent implements OnIn
|
|
|
128
128
|
Stratus.Instances[this.uid] = this
|
|
129
129
|
|
|
130
130
|
// Load Component CSS until System.js can import CSS properly.
|
|
131
|
-
|
|
131
|
+
Stratus.Internals.CssLoader(`${localDir}${parentModuleName}/${moduleName}.component${min}.css`)
|
|
132
132
|
|
|
133
133
|
// Hoist Data
|
|
134
134
|
this.model = this.data.model
|