@stratusjs/angular 0.5.3 → 0.5.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/dist/angular.bundle.js +73612 -72175
- package/dist/angular.bundle.min.js +1 -1
- package/package.json +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/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/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 +13 -5
- package/src/selector/selector.component.js.map +1 -1
- package/src/selector/selector.component.min.js +1 -1
- package/src/selector/selector.component.ts +9 -4
- package/src/core/dialog.interface.js.map +0 -1
|
@@ -92,7 +92,7 @@ System.register(["@angular/core", "@angular/forms", "@angular/cdk/drag-drop", "r
|
|
|
92
92
|
this.styled = true;
|
|
93
93
|
this.refresh();
|
|
94
94
|
});
|
|
95
|
-
this.hydrate(elementRef, sanitizer, ["title", "uid", "target", "targetSuffix", "id", "manifest", "decouple", "direct", "api", "urlRoot", "type", "property", "endpoint", "_", "has", "log", "Stratus", "selectCtrl", "registry", "fetched", "data", "collection", "model", "dataSub", "onChange", "subscriber", "svgIcons", "styled", "empty", "iconRegistry", "sanitizer", "ref", "elementRef", "drop", "goToUrl", "remove", "fetchData", "dataDefer", "dataRef", "onDataChange", "prioritize", "getSvg", "addSvgIcon", "hydrate", "disableRefresh", "stagger", "reloading", "refresh", "ngOnDestroy"]);
|
|
95
|
+
this.hydrate(elementRef, sanitizer, ["title", "uid", "target", "targetSuffix", "id", "manifest", "decouple", "direct", "api", "urlRoot", "type", "property", "endpoint", "ignorePriority", "_", "has", "log", "Stratus", "selectCtrl", "registry", "fetched", "data", "collection", "model", "dataSub", "onChange", "subscriber", "svgIcons", "styled", "empty", "iconRegistry", "sanitizer", "ref", "elementRef", "drop", "goToUrl", "remove", "fetchData", "dataDefer", "dataRef", "onDataChange", "prioritize", "getSvg", "addSvgIcon", "hydrate", "disableRefresh", "stagger", "reloading", "refresh", "ngOnDestroy"]);
|
|
96
96
|
this.fetchData()
|
|
97
97
|
.then(data => {
|
|
98
98
|
if (!data || !(data instanceof eventManager_1.EventManager)) {
|
|
@@ -117,8 +117,10 @@ System.register(["@angular/core", "@angular/forms", "@angular/cdk/drag-drop", "r
|
|
|
117
117
|
return;
|
|
118
118
|
}
|
|
119
119
|
drag_drop_1.moveItemInArray(models, event.previousIndex, event.currentIndex);
|
|
120
|
-
|
|
121
|
-
|
|
120
|
+
if (!this.ignorePriority) {
|
|
121
|
+
let priority = 0;
|
|
122
|
+
lodash_1.default.forEach(models, (model) => model.priority = priority++);
|
|
123
|
+
}
|
|
122
124
|
this.model.trigger('change');
|
|
123
125
|
}
|
|
124
126
|
goToUrl(model) {
|
|
@@ -190,8 +192,10 @@ System.register(["@angular/core", "@angular/forms", "@angular/cdk/drag-drop", "r
|
|
|
190
192
|
if (!models || !models.length) {
|
|
191
193
|
return;
|
|
192
194
|
}
|
|
193
|
-
|
|
194
|
-
|
|
195
|
+
if (!this.ignorePriority) {
|
|
196
|
+
let priority = 0;
|
|
197
|
+
lodash_1.default.forEach(models, (model) => model.priority = priority++);
|
|
198
|
+
}
|
|
195
199
|
}
|
|
196
200
|
getSvg(url, options) {
|
|
197
201
|
const uid = this.addSvgIcon(url, options);
|
|
@@ -264,6 +268,10 @@ System.register(["@angular/core", "@angular/forms", "@angular/cdk/drag-drop", "r
|
|
|
264
268
|
core_1.Input(),
|
|
265
269
|
__metadata("design:type", String)
|
|
266
270
|
], SelectorComponent.prototype, "endpoint", void 0);
|
|
271
|
+
__decorate([
|
|
272
|
+
core_1.Input(),
|
|
273
|
+
__metadata("design:type", Boolean)
|
|
274
|
+
], SelectorComponent.prototype, "ignorePriority", void 0);
|
|
267
275
|
SelectorComponent = __decorate([
|
|
268
276
|
core_1.Component({
|
|
269
277
|
selector: `sa-${moduleName}`,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["selector.component.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAoDM,SAAS,GAAG,oBAAoB,CAAA;YAChC,UAAU,GAAG,UAAU,CAAA;YAGvB,GAAG,GAAG,CAAC,oBAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAA;YAClC,QAAQ,GAAG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YAChB;gBAAR,YAAK,EAAE;;+DAAiB;YAChB;gBAAR,YAAK,EAAE;;qEAAwB;YApBvB,iBAAiB;gBAZ7B,gBAAS,CAAC;oBAEP,QAAQ,EAAE,MAAM,UAAU,EAAE;oBAC5B,WAAW,EAAE,GAAG,QAAQ,IAAI,UAAU,IAAI,UAAU,aAAa,GAAG,OAAO;iBAO9E,CAAC;iDA6D4B,sBAAe;oBAClB,+BAAY;oBAChB,wBAAiB;oBACZ,iBAAU;eA9DzB,iBAAiB,CA6W7B;;QACD,CAAC","file":"selector.component.js"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["@angular/core","@angular/forms","@angular/cdk/drag-drop","rxjs","@angular/platform-browser","@angular/material/icon","@stratusjs/runtime/stratus","lodash","@stratusjs/core/environment","../core/root.component","@stratusjs/angularjs/services/registry","@stratusjs/core/events/eventManager"],function(e,t){"use strict";var r,s,
|
|
1
|
+
System.register(["@angular/core","@angular/forms","@angular/cdk/drag-drop","rxjs","@angular/platform-browser","@angular/material/icon","@stratusjs/runtime/stratus","lodash","@stratusjs/core/environment","../core/root.component","@stratusjs/angularjs/services/registry","@stratusjs/core/events/eventManager"],function(e,t){"use strict";var r,o,s,i,n,a,c,d,l,u,h,p,f,g,y,m,v=this&&this.__decorate||function(e,t,r,o){var s,i=arguments.length,n=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,r,o);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(n=(i<3?s(n):i>3?s(t,r,n):s(t,r))||n);return i>3&&n&&Object.defineProperty(t,r,n),n},b=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){r=e},function(e){o=e},function(e){s=e},function(e){i=e},function(e){n=e},function(e){a=e},function(e){c=e},function(e){d=e},function(e){l=e},function(e){u=e},function(e){h=e},function(e){p=e}],execute:function(){"@stratusjs/angular","selector",f=l.cookie("env")?"":".min",g=`${c.Stratus.BaseUrl}${boot.configuration.paths["@stratusjs/angular/*"].replace(/[^/]*$/,"").replace(/\/dist\/$/,"/src/")}`,y=(e,t)=>d.default.has(e,t)&&!d.default.isEmpty(d.default.get(e,t)),m=class extends u.RootComponent{constructor(e,t,r,s){super(),this.iconRegistry=e,this.sanitizer=t,this.ref=r,this.elementRef=s,this.title="selector_component",this._=d.default,this.has=y,this.log=console.log,this.Stratus=c.Stratus,this.selectCtrl=new o.FormControl,this.registry=new h.Registry,this.onChange=new i.Subject,this.svgIcons={},this.styled=!1,this.empty=!1,this.uid=d.default.uniqueId(`sa_${d.default.snakeCase("selector")}_component_`),c.Stratus.Instances[this.uid]=this,this.dataSub=new i.Observable(e=>this.dataDefer(e)),d.default.forEach({selector_delete:c.Stratus.BaseUrl+"sitetheorycore/images/icons/actionButtons/delete.svg",selector_edit:c.Stratus.BaseUrl+"sitetheorycore/images/icons/actionButtons/edit.svg"},(r,o)=>e.addSvgIcon(o,t.bypassSecurityTrustResourceUrl(r)).getNamedSvgIcon(o)),c.Stratus.Internals.CssLoader(`${g}selector/selector.component${f}.css`).then(()=>{this.styled=!0,this.refresh()}).catch(e=>{console.warn("Issue detected in CSS Loader for Component:",this),console.error(e),this.styled=!0,this.refresh()}),this.hydrate(s,t,["title","uid","target","targetSuffix","id","manifest","decouple","direct","api","urlRoot","type","property","endpoint","ignorePriority","_","has","log","Stratus","selectCtrl","registry","fetched","data","collection","model","dataSub","onChange","subscriber","svgIcons","styled","empty","iconRegistry","sanitizer","ref","elementRef","drop","goToUrl","remove","fetchData","dataDefer","dataRef","onDataChange","prioritize","getSvg","addSvgIcon","hydrate","disableRefresh","stagger","reloading","refresh","ngOnDestroy"]),this.fetchData().then(e=>{if(!(e&&e instanceof p.EventManager))return void console.warn("Unable to bind data from Registry!");const t=()=>{e.completed&&(this.dataDefer(this.subscriber),this.prioritize(),this.refresh())};e.on("change",t),t()})}drop(e){const t=this.dataRef();if(t&&t.length){if(s.moveItemInArray(t,e.previousIndex,e.currentIndex),!this.ignorePriority){let e=0;d.default.forEach(t,t=>t.priority=e++)}this.model.trigger("change")}}goToUrl(e){e&&e.contentType?window.open(e.contentType.editUrl+"?id="+e.id,"_blank"):console.error("unable to execute goToUrl() because a valid model content was not provided.")}remove(e){const t=this.dataRef();if(!t||!t.length)return console.error("unable to remove model from selection:",t),void this.refresh();let r=t.indexOf(e);if(-1===r){const o=t.map(t=>e.id===t.id?t:null).filter(e=>e);d.default.isArray(o)&&o.length&&(r=t.indexOf(d.default.first(o)))}-1!==r?(t.splice(r,1),this.model.trigger("change")):console.error("unable to find model:",e,"in selection:",t)}fetchData(){return this.fetched?this.fetched:this.fetched=this.registry.fetch(c.Stratus.Select(this.elementRef.nativeElement),this)}dataDefer(e){if(this.subscriber=this.subscriber||e,!this.subscriber||!this.model||!this.model.completed)return void setTimeout(()=>{this.dataDefer(e)},500);const t=this.dataRef();this.empty=!t.length,this.subscriber.next(t),this.refresh()}dataRef(){if(!this.model)return[];const e=this.model.get(this.property);return e&&d.default.isArray(e)?e:[]}onDataChange(){this.prioritize(),this.dataDefer(this.subscriber),this.refresh()}prioritize(){const e=this.dataRef();if(e&&e.length&&!this.ignorePriority){let t=0;d.default.forEach(e,e=>e.priority=t++)}}getSvg(e,t){const r=this.addSvgIcon(e,t);return new i.Observable(t=>{this.iconRegistry.getNamedSvgIcon(r).subscribe({error(t){console.error(`getSvg(${e}): ${t}`)},complete(){t.next(r)}})})}addSvgIcon(e,t){if(e in this.svgIcons)return this.svgIcons[e];t||(t={});const r=this.svgIcons[e]=d.default.uniqueId("selector_svg");return this.iconRegistry.addSvgIcon(r,this.sanitizer.bypassSecurityTrustResourceUrl(e),t),r}},v([r.Input(),b("design:type",String)],m.prototype,"target",void 0),v([r.Input(),b("design:type",String)],m.prototype,"targetSuffix",void 0),v([r.Input(),b("design:type",Number)],m.prototype,"id",void 0),v([r.Input(),b("design:type",Boolean)],m.prototype,"manifest",void 0),v([r.Input(),b("design:type",Boolean)],m.prototype,"decouple",void 0),v([r.Input(),b("design:type",Boolean)],m.prototype,"direct",void 0),v([r.Input(),b("design:type",Object)],m.prototype,"api",void 0),v([r.Input(),b("design:type",String)],m.prototype,"urlRoot",void 0),v([r.Input(),b("design:type",String)],m.prototype,"type",void 0),v([r.Input(),b("design:type",String)],m.prototype,"property",void 0),v([r.Input(),b("design:type",String)],m.prototype,"endpoint",void 0),v([r.Input(),b("design:type",Boolean)],m.prototype,"ignorePriority",void 0),m=v([r.Component({selector:"sa-selector",templateUrl:`${g}/selector/selector.component${f}.html`}),b("design:paramtypes",[a.MatIconRegistry,n.DomSanitizer,r.ChangeDetectorRef,r.ElementRef])],m),e("SelectorComponent",m)}}});
|
|
@@ -100,6 +100,7 @@ export class SelectorComponent extends RootComponent { // implements OnInit, OnC
|
|
|
100
100
|
@Input() type: string
|
|
101
101
|
@Input() property: string
|
|
102
102
|
@Input() endpoint: string
|
|
103
|
+
@Input() ignorePriority: boolean
|
|
103
104
|
|
|
104
105
|
// Dependencies
|
|
105
106
|
_ = _
|
|
@@ -239,8 +240,10 @@ export class SelectorComponent extends RootComponent { // implements OnInit, OnC
|
|
|
239
240
|
return
|
|
240
241
|
}
|
|
241
242
|
moveItemInArray(models, event.previousIndex, event.currentIndex)
|
|
242
|
-
|
|
243
|
-
|
|
243
|
+
if (!this.ignorePriority) {
|
|
244
|
+
let priority = 0
|
|
245
|
+
_.forEach(models, (model: any) => model.priority = priority++)
|
|
246
|
+
}
|
|
244
247
|
this.model.trigger('change')
|
|
245
248
|
}
|
|
246
249
|
|
|
@@ -386,8 +389,10 @@ export class SelectorComponent extends RootComponent { // implements OnInit, OnC
|
|
|
386
389
|
if (!models || !models.length) {
|
|
387
390
|
return
|
|
388
391
|
}
|
|
389
|
-
|
|
390
|
-
|
|
392
|
+
if (!this.ignorePriority) {
|
|
393
|
+
let priority = 0
|
|
394
|
+
_.forEach(models, (model) => model.priority = priority++)
|
|
395
|
+
}
|
|
391
396
|
}
|
|
392
397
|
|
|
393
398
|
getSvg(url: string, options?: IconOptions): Observable<string> {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["dialog.interface.ts"],"names":[],"mappings":"","file":"dialog.interface.js"}
|