ngx-rendering-service-lib 0.0.66 → 0.0.66848
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/esm2022/lib/module/binder/binder.component.mjs +9 -5
- package/fesm2022/{ngx-rendering-service-lib-binder.component-B-JfKIYl.mjs → ngx-rendering-service-lib-binder.component-CiBjp2jF.mjs} +9 -5
- package/fesm2022/ngx-rendering-service-lib-binder.component-CiBjp2jF.mjs.map +1 -0
- package/fesm2022/ngx-rendering-service-lib.mjs +2 -2
- package/package.json +1 -1
- package/fesm2022/ngx-rendering-service-lib-binder.component-B-JfKIYl.mjs.map +0 -1
|
@@ -15,11 +15,15 @@ export class BinderComponent {
|
|
|
15
15
|
ngOnChanges(changes) {
|
|
16
16
|
console.log("ONCHANGES");
|
|
17
17
|
console.log(this.data);
|
|
18
|
-
const binderJobData = this.data?.items?.find(item => item.additionalData ===
|
|
18
|
+
const binderJobData = this.data?.items?.find(item => item.additionalData === null);
|
|
19
|
+
console.log("BINDERDATA");
|
|
20
|
+
console.log(binderJobData);
|
|
19
21
|
if (binderJobData !== undefined) {
|
|
20
22
|
this.binderItem.set(binderJobData);
|
|
21
23
|
}
|
|
22
|
-
const previewJobData = this.data?.items?.find(item => item.additionalData !==
|
|
24
|
+
const previewJobData = this.data?.items?.find(item => item.additionalData !== null);
|
|
25
|
+
console.log("PREVIEWDATA");
|
|
26
|
+
console.log(previewJobData);
|
|
23
27
|
if (previewJobData !== undefined) {
|
|
24
28
|
this.hasPreview.set(true);
|
|
25
29
|
if (previewJobData.link !== undefined && previewJobData.link !== "") {
|
|
@@ -35,7 +39,7 @@ export class BinderComponent {
|
|
|
35
39
|
return this.sanitizer.bypassSecurityTrustResourceUrl(uri.toString());
|
|
36
40
|
}
|
|
37
41
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: BinderComponent, deps: [{ token: i1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
38
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.6", type: BinderComponent, isStandalone: true, selector: "rs-module-binder", inputs: { data: "data", node: "node" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"binder-wrapper\"
|
|
42
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.6", type: BinderComponent, isStandalone: true, selector: "rs-module-binder", inputs: { data: "data", node: "node" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"binder-wrapper\">\n <mat-spinner [diameter]=\"50\" *ngIf=\"binderItem()?.link === undefined\" ></mat-spinner>\n <a [href]=\"binderItem()?.link\" target=\"_blank\" *ngIf=\"binderItem()?.link !== undefined\">Link to object</a>\n <mat-spinner [diameter]=\"50\" *ngIf=\"hasPreview() && (previewUrl() === undefined)\"></mat-spinner>\n <iframe class=\"frame\" [src]=\"previewUrl()\" *ngIf=\"hasPreview() && (previewUrl() !== undefined)\" ></iframe>\n</div>\n", styles: [":host{position:relative;display:flex;align-items:center;width:100%}.ddb-wrapper{width:100%;position:relative}.ddb-wrapper .frame{width:100%;height:100%}\n"], dependencies: [{ kind: "ngmodule", type: RenderingModule }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "component", type: MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }] }); }
|
|
39
43
|
}
|
|
40
44
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: BinderComponent, decorators: [{
|
|
41
45
|
type: Component,
|
|
@@ -43,10 +47,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImpor
|
|
|
43
47
|
RenderingModule,
|
|
44
48
|
FormsModule,
|
|
45
49
|
MatProgressSpinner,
|
|
46
|
-
], template: "<div class=\"binder-wrapper\"
|
|
50
|
+
], template: "<div class=\"binder-wrapper\">\n <mat-spinner [diameter]=\"50\" *ngIf=\"binderItem()?.link === undefined\" ></mat-spinner>\n <a [href]=\"binderItem()?.link\" target=\"_blank\" *ngIf=\"binderItem()?.link !== undefined\">Link to object</a>\n <mat-spinner [diameter]=\"50\" *ngIf=\"hasPreview() && (previewUrl() === undefined)\"></mat-spinner>\n <iframe class=\"frame\" [src]=\"previewUrl()\" *ngIf=\"hasPreview() && (previewUrl() !== undefined)\" ></iframe>\n</div>\n", styles: [":host{position:relative;display:flex;align-items:center;width:100%}.ddb-wrapper{width:100%;position:relative}.ddb-wrapper .frame{width:100%;height:100%}\n"] }]
|
|
47
51
|
}], ctorParameters: () => [{ type: i1.DomSanitizer }], propDecorators: { data: [{
|
|
48
52
|
type: Input
|
|
49
53
|
}], node: [{
|
|
50
54
|
type: Input
|
|
51
55
|
}] } });
|
|
52
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
56
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmluZGVyLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3NyYy9saWIvbW9kdWxlL2JpbmRlci9iaW5kZXIuY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vc3JjL2xpYi9tb2R1bGUvYmluZGVyL2JpbmRlci5jb21wb25lbnQuaHRtbCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsU0FBUyxFQUFFLEtBQUssRUFBYSxNQUFNLEVBQWdCLE1BQU0sZUFBZSxDQUFDO0FBQ2xGLE9BQU8sRUFBQyxlQUFlLEVBQUMsTUFBTSx3QkFBd0IsQ0FBQztBQUd2RCxPQUFPLEVBQUMsV0FBVyxFQUFDLE1BQU0sZ0J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RcIj5MaW5rIHRvIG9iamVjdDwvYT5cbiAgPG1hdC1zcGlubmVyIFtkaWFtZXRlcl09XCI1MFwiICpuZ0lmPVwiaGFzUHJldmlldygpICYmIChwcmV2aWV3VXJsKCkgPT09IHVuZGVmaW5lZClcIj48L21hdC1zcGlubmVyPlxuICA8aWZyYW1lIGNsYXNzPVwiZnJhbWVcIiBbc3JjXT1cInByZXZpZXdVcmwoKVwiICpuZ0lmPVwiaGFzUHJldmlldygpICYmIChwcmV2aWV3VXJsKCkgIT09IHVuZGVmaW5lZClcIiA+PC9pZnJhbWU+XG48L2Rpdj5cbiJdfQ==
|
|
@@ -16,11 +16,15 @@ class BinderComponent {
|
|
|
16
16
|
ngOnChanges(changes) {
|
|
17
17
|
console.log("ONCHANGES");
|
|
18
18
|
console.log(this.data);
|
|
19
|
-
const binderJobData = this.data?.items?.find(item => item.additionalData ===
|
|
19
|
+
const binderJobData = this.data?.items?.find(item => item.additionalData === null);
|
|
20
|
+
console.log("BINDERDATA");
|
|
21
|
+
console.log(binderJobData);
|
|
20
22
|
if (binderJobData !== undefined) {
|
|
21
23
|
this.binderItem.set(binderJobData);
|
|
22
24
|
}
|
|
23
|
-
const previewJobData = this.data?.items?.find(item => item.additionalData !==
|
|
25
|
+
const previewJobData = this.data?.items?.find(item => item.additionalData !== null);
|
|
26
|
+
console.log("PREVIEWDATA");
|
|
27
|
+
console.log(previewJobData);
|
|
24
28
|
if (previewJobData !== undefined) {
|
|
25
29
|
this.hasPreview.set(true);
|
|
26
30
|
if (previewJobData.link !== undefined && previewJobData.link !== "") {
|
|
@@ -36,7 +40,7 @@ class BinderComponent {
|
|
|
36
40
|
return this.sanitizer.bypassSecurityTrustResourceUrl(uri.toString());
|
|
37
41
|
}
|
|
38
42
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: BinderComponent, deps: [{ token: i1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
39
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.6", type: BinderComponent, isStandalone: true, selector: "rs-module-binder", inputs: { data: "data", node: "node" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"binder-wrapper\"
|
|
43
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.6", type: BinderComponent, isStandalone: true, selector: "rs-module-binder", inputs: { data: "data", node: "node" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"binder-wrapper\">\n <mat-spinner [diameter]=\"50\" *ngIf=\"binderItem()?.link === undefined\" ></mat-spinner>\n <a [href]=\"binderItem()?.link\" target=\"_blank\" *ngIf=\"binderItem()?.link !== undefined\">Link to object</a>\n <mat-spinner [diameter]=\"50\" *ngIf=\"hasPreview() && (previewUrl() === undefined)\"></mat-spinner>\n <iframe class=\"frame\" [src]=\"previewUrl()\" *ngIf=\"hasPreview() && (previewUrl() !== undefined)\" ></iframe>\n</div>\n", styles: [":host{position:relative;display:flex;align-items:center;width:100%}.ddb-wrapper{width:100%;position:relative}.ddb-wrapper .frame{width:100%;height:100%}\n"], dependencies: [{ kind: "ngmodule", type: RenderingModule }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "component", type: MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }] }); }
|
|
40
44
|
}
|
|
41
45
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: BinderComponent, decorators: [{
|
|
42
46
|
type: Component,
|
|
@@ -44,7 +48,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImpor
|
|
|
44
48
|
RenderingModule,
|
|
45
49
|
FormsModule,
|
|
46
50
|
MatProgressSpinner,
|
|
47
|
-
], template: "<div class=\"binder-wrapper\"
|
|
51
|
+
], template: "<div class=\"binder-wrapper\">\n <mat-spinner [diameter]=\"50\" *ngIf=\"binderItem()?.link === undefined\" ></mat-spinner>\n <a [href]=\"binderItem()?.link\" target=\"_blank\" *ngIf=\"binderItem()?.link !== undefined\">Link to object</a>\n <mat-spinner [diameter]=\"50\" *ngIf=\"hasPreview() && (previewUrl() === undefined)\"></mat-spinner>\n <iframe class=\"frame\" [src]=\"previewUrl()\" *ngIf=\"hasPreview() && (previewUrl() !== undefined)\" ></iframe>\n</div>\n", styles: [":host{position:relative;display:flex;align-items:center;width:100%}.ddb-wrapper{width:100%;position:relative}.ddb-wrapper .frame{width:100%;height:100%}\n"] }]
|
|
48
52
|
}], ctorParameters: () => [{ type: i1.DomSanitizer }], propDecorators: { data: [{
|
|
49
53
|
type: Input
|
|
50
54
|
}], node: [{
|
|
@@ -52,4 +56,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImpor
|
|
|
52
56
|
}] } });
|
|
53
57
|
|
|
54
58
|
export { BinderComponent };
|
|
55
|
-
//# sourceMappingURL=ngx-rendering-service-lib-binder.component-
|
|
59
|
+
//# sourceMappingURL=ngx-rendering-service-lib-binder.component-CiBjp2jF.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ngx-rendering-service-lib-binder.component-CiBjp2jF.mjs","sources":["../../src/lib/module/binder/binder.component.ts","../../src/lib/module/binder/binder.component.html"],"sourcesContent":["import { Component, Input, OnChanges, signal, SimpleChanges} from '@angular/core';\nimport {RenderingModule} from \"../../rendering.module\";\nimport {RenderModule} from \"../RenderModule\";\nimport {Node} from \"ngx-edu-sharing-api\";\nimport {FormsModule} from \"@angular/forms\";\nimport {RenderData, AssetStateItem} from \"../../dto/RenderData\";\nimport {MatProgressSpinner, MatProgressSpinnerModule} from \"@angular/material/progress-spinner\";\nimport {DomSanitizer, SafeResourceUrl} from \"@angular/platform-browser\";\n\n@Component({\n selector: 'rs-module-binder',\n standalone: true,\n imports: [\n RenderingModule,\n FormsModule,\n MatProgressSpinner,\n ],\n templateUrl: './binder.component.html',\n styleUrl: './binder.component.scss'\n})\nexport class BinderComponent implements RenderModule, OnChanges {\n @Input() data: RenderData | undefined;\n @Input() node: Node | undefined;\n binderItem = signal<AssetStateItem | undefined>(undefined);\n previewUrl = signal<SafeResourceUrl | undefined>(undefined)\n hasPreview = signal<boolean>(false)\n\n constructor(private sanitizer: DomSanitizer) {}\n\n ngOnChanges(changes: SimpleChanges): void {\n console.log(\"ONCHANGES\")\n console.log(this.data)\n const binderJobData = this.data?.items?.find(item => item.additionalData === null)\n console.log(\"BINDERDATA\")\n console.log(binderJobData)\n if ( binderJobData !== undefined ) {\n this.binderItem.set(binderJobData)\n }\n const previewJobData = this.data?.items?.find(item => item.additionalData !== null)\n console.log(\"PREVIEWDATA\")\n console.log(previewJobData)\n if (previewJobData !== undefined) {\n this.hasPreview.set(true)\n if (previewJobData.link !== undefined && previewJobData.link !== \"\") {\n this.previewUrl.set(this.getSafeUri(previewJobData.link))\n }\n }\n }\n\n getSafeUri(assetLink: string) {\n const uri = new URL(assetLink)\n if (uri.hostname.includes(\"nip.io\")) {\n uri.hostname = \"localhost\"\n }\n return this.sanitizer.bypassSecurityTrustResourceUrl(uri.toString())\n }\n}\n","<div class=\"binder-wrapper\">\n <mat-spinner [diameter]=\"50\" *ngIf=\"binderItem()?.link === undefined\" ></mat-spinner>\n <a [href]=\"binderItem()?.link\" target=\"_blank\" *ngIf=\"binderItem()?.link !== undefined\">Link to object</a>\n <mat-spinner [diameter]=\"50\" *ngIf=\"hasPreview() && (previewUrl() === undefined)\"></mat-spinner>\n <iframe class=\"frame\" [src]=\"previewUrl()\" *ngIf=\"hasPreview() && (previewUrl() !== undefined)\" ></iframe>\n</div>\n"],"names":["i2"],"mappings":";;;;;;;;MAoBa,eAAe,CAAA;AAO1B,IAAA,WAAA,CAAoB,SAAuB,EAAA;QAA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AA,CAAA,EAAA;;2FAKT,eAAe,EAAA,UAAA,EAAA,CAAA;kBAX3B,SAAS;+BACE,kBAAkB,EAAA,UAAA,EAChB,IAAI,EACP,OAAA,EAAA;wBACP,eAAe;wBACf,WAAW;wBACX,kBAAkB;AACnB,qBAAA,EAAA,QAAA,EAAA,udAAA,EAAA,MAAA,EAAA,CAAA,4JAAA,CAAA,EAAA,CAAA;iFAKQ,IAAI,EAAA,CAAA;sBAAZ,KAAK;gBACG,IAAI,EAAA,CAAA;sBAAZ,KAAK;;;;;"}
|
|
@@ -789,9 +789,9 @@ class RenderComponent {
|
|
|
789
789
|
}
|
|
790
790
|
}
|
|
791
791
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: RenderComponent, deps: [{ token: i0.Injector }, { token: i1$1.RenderControllerWrapperService }, { token: i1$1.JobInfoControllerService }, { token: ModuleInfoService }, { token: i3.PlatformLocation }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
792
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.6", type: RenderComponent, isStandalone: true, selector: "rs-root", inputs: { request: "request", node: "node", serviceWorkerUrl: "serviceWorkerUrl" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"module module-{{(renderData$ | async)?.module}}\">\n <ng-container *ngIf=\"renderData$ | async as data\">\n @defer (when data?.module === 'IMAGE'){\n <rs-module-image [data]=\"data\" [node]=\"node\"></rs-module-image>\n } @loading {\n <ng-container *ngTemplateOutlet=\"loading\"></ng-container>\n }\n @defer (when data?.module === 'VIDEO'){\n <rs-module-video [data]=\"data\" [node]=\"node\"></rs-module-video>\n } @loading {\n <ng-container *ngTemplateOutlet=\"loading\"></ng-container>\n }\n @defer (when data?.module === 'PDF' || data?.module === 'DOCUMENT') {\n <rs-module-pdf [data]=\"data\" [node]=\"node\"></rs-module-pdf>\n } @loading {\n <ng-container *ngTemplateOutlet=\"loading\"></ng-container>\n }\n @defer (when data?.module === 'EDUHTML' || data?.module === 'H5P' || data?.module === 'JUPYTER' || data.module === 'SPREADSHEET') {\n <rs-module-eduHtml [data]=\"data\" [node]=\"node\"></rs-module-eduHtml>\n } @loading {\n <ng-container *ngTemplateOutlet=\"loading\"></ng-container>\n }\n @defer (when data?.module === 'AUDIO'){\n <rs-module-audio [data]=\"data\" [node]=\"node\"></rs-module-audio>\n } @loading {\n <ng-container *ngTemplateOutlet=\"loading\"></ng-container>\n }\n @defer (when data?.module === 'BINDER'){\n <rs-module-binder [data]=\"data\" [node]=\"node\"></rs-module-binder>\n } @loading {\n <ng-container *ngTemplateOutlet=\"loading\"></ng-container>\n }\n @defer (when data?.module === 'DDB'){\n <rs-module-ddb [data]=\"data\" [node]=\"node\"></rs-module-ddb>\n } @loading {\n <ng-container *ngTemplateOutlet=\"loading\"></ng-container>\n }\n <ng-container *ngIf=\"data.module === 'default'\">\n @defer (when data.module === 'default') {\n <rs-module-default [node]=\"node\"></rs-module-default>\n }\n </ng-container>\n <ng-container *ngIf=\"data.module === 'url'\">\n @defer (when data.module === 'url') {\n <rs-module-url [node]=\"node\" [data]=\"data\"></rs-module-url>\n }\n </ng-container>\n </ng-container>\n\n <div class=\"progress\" *ngIf=\"(renderData$ | async) === null;\">\n <ng-container *ngIf=\"progress$ | async as progress\">\n <ng-container [ngSwitch]=\"['VIDEO', 'AUDIO'].includes(progress.module) ? 'bar' : 'spinner'\">\n <ng-container *ngSwitchCase=\"'bar'\">\n <div *ngIf=\"(progress.progress ?? 0) < 0\">Queue position: {{-(progress.progress ?? 0)}}</div>\n <mat-progress-bar [value]=\"(progress.progress ?? 0)\" *ngIf=\"(progress.progress ?? 0) >= 0\"></mat-progress-bar>\n </ng-container>\n <ng-container *ngSwitchCase=\"'spinner'\">\n <div *ngIf=\"(progress.progress ?? 0) < 0\">Queue position: {{-(progress.progress ?? 0)}</div>\n <mat-spinner [diameter]=\"50\" *ngIf=\"(progress.progress ?? 0) >= 0\"></mat-spinner>\n </ng-container>\n </ng-container>\n </ng-container>\n </div>\n</div>\n\n<ng-template #loading>\n <div class=\"progress\">\n <mat-spinner></mat-spinner>\n </div>\n</ng-template>\n", styles: [":host{display:flex;flex-direction:column;gap:20px;padding:10px 30px}.module{overflow:auto;display:flex;flex-grow:1;height:auto;border:1px solid #aaa;padding:20px}.module rs-module-image,.module rs-module-video{width:100%}.module .progress{display:flex;justify-content:center;flex-grow:1}\n"], dependencies: [{ kind: "ngmodule", type: RenderingApiModule }, { kind: "ngmodule", type: RenderingModule }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i3.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i3.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i4$1.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "ngmodule", type: MatProgressBarModule }, { kind: "component", type: i5.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }], deferBlockDependencies: [() => [Promise.resolve().then(function () { return image_component; }).then(m => m.ImageComponent)], () => [Promise.resolve().then(function () { return video_component; }).then(m => m.VideoComponent)], () => [Promise.resolve().then(function () { return pdf_component; }).then(m => m.PdfComponent)], () => [Promise.resolve().then(function () { return eduHtml_component; }).then(m => m.EduHtmlComponent)], () => [import('./ngx-rendering-service-lib-audio.component-Cpp5Zzp1.mjs').then(m => m.AudioComponent)], () => [import('./ngx-rendering-service-lib-binder.component-
|
|
792
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.6", type: RenderComponent, isStandalone: true, selector: "rs-root", inputs: { request: "request", node: "node", serviceWorkerUrl: "serviceWorkerUrl" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"module module-{{(renderData$ | async)?.module}}\">\n <ng-container *ngIf=\"renderData$ | async as data\">\n @defer (when data?.module === 'IMAGE'){\n <rs-module-image [data]=\"data\" [node]=\"node\"></rs-module-image>\n } @loading {\n <ng-container *ngTemplateOutlet=\"loading\"></ng-container>\n }\n @defer (when data?.module === 'VIDEO'){\n <rs-module-video [data]=\"data\" [node]=\"node\"></rs-module-video>\n } @loading {\n <ng-container *ngTemplateOutlet=\"loading\"></ng-container>\n }\n @defer (when data?.module === 'PDF' || data?.module === 'DOCUMENT') {\n <rs-module-pdf [data]=\"data\" [node]=\"node\"></rs-module-pdf>\n } @loading {\n <ng-container *ngTemplateOutlet=\"loading\"></ng-container>\n }\n @defer (when data?.module === 'EDUHTML' || data?.module === 'H5P' || data?.module === 'JUPYTER' || data.module === 'SPREADSHEET') {\n <rs-module-eduHtml [data]=\"data\" [node]=\"node\"></rs-module-eduHtml>\n } @loading {\n <ng-container *ngTemplateOutlet=\"loading\"></ng-container>\n }\n @defer (when data?.module === 'AUDIO'){\n <rs-module-audio [data]=\"data\" [node]=\"node\"></rs-module-audio>\n } @loading {\n <ng-container *ngTemplateOutlet=\"loading\"></ng-container>\n }\n @defer (when data?.module === 'BINDER'){\n <rs-module-binder [data]=\"data\" [node]=\"node\"></rs-module-binder>\n } @loading {\n <ng-container *ngTemplateOutlet=\"loading\"></ng-container>\n }\n @defer (when data?.module === 'DDB'){\n <rs-module-ddb [data]=\"data\" [node]=\"node\"></rs-module-ddb>\n } @loading {\n <ng-container *ngTemplateOutlet=\"loading\"></ng-container>\n }\n <ng-container *ngIf=\"data.module === 'default'\">\n @defer (when data.module === 'default') {\n <rs-module-default [node]=\"node\"></rs-module-default>\n }\n </ng-container>\n <ng-container *ngIf=\"data.module === 'url'\">\n @defer (when data.module === 'url') {\n <rs-module-url [node]=\"node\" [data]=\"data\"></rs-module-url>\n }\n </ng-container>\n </ng-container>\n\n <div class=\"progress\" *ngIf=\"(renderData$ | async) === null;\">\n <ng-container *ngIf=\"progress$ | async as progress\">\n <ng-container [ngSwitch]=\"['VIDEO', 'AUDIO'].includes(progress.module) ? 'bar' : 'spinner'\">\n <ng-container *ngSwitchCase=\"'bar'\">\n <div *ngIf=\"(progress.progress ?? 0) < 0\">Queue position: {{-(progress.progress ?? 0)}}</div>\n <mat-progress-bar [value]=\"(progress.progress ?? 0)\" *ngIf=\"(progress.progress ?? 0) >= 0\"></mat-progress-bar>\n </ng-container>\n <ng-container *ngSwitchCase=\"'spinner'\">\n <div *ngIf=\"(progress.progress ?? 0) < 0\">Queue position: {{-(progress.progress ?? 0)}</div>\n <mat-spinner [diameter]=\"50\" *ngIf=\"(progress.progress ?? 0) >= 0\"></mat-spinner>\n </ng-container>\n </ng-container>\n </ng-container>\n </div>\n</div>\n\n<ng-template #loading>\n <div class=\"progress\">\n <mat-spinner></mat-spinner>\n </div>\n</ng-template>\n", styles: [":host{display:flex;flex-direction:column;gap:20px;padding:10px 30px}.module{overflow:auto;display:flex;flex-grow:1;height:auto;border:1px solid #aaa;padding:20px}.module rs-module-image,.module rs-module-video{width:100%}.module .progress{display:flex;justify-content:center;flex-grow:1}\n"], dependencies: [{ kind: "ngmodule", type: RenderingApiModule }, { kind: "ngmodule", type: RenderingModule }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i3.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i3.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i4$1.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "ngmodule", type: MatProgressBarModule }, { kind: "component", type: i5.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }], deferBlockDependencies: [() => [Promise.resolve().then(function () { return image_component; }).then(m => m.ImageComponent)], () => [Promise.resolve().then(function () { return video_component; }).then(m => m.VideoComponent)], () => [Promise.resolve().then(function () { return pdf_component; }).then(m => m.PdfComponent)], () => [Promise.resolve().then(function () { return eduHtml_component; }).then(m => m.EduHtmlComponent)], () => [import('./ngx-rendering-service-lib-audio.component-Cpp5Zzp1.mjs').then(m => m.AudioComponent)], () => [import('./ngx-rendering-service-lib-binder.component-CiBjp2jF.mjs').then(m => m.BinderComponent)], () => [import('./ngx-rendering-service-lib-ddb.component-BdYROITK.mjs').then(m => m.DdbComponent)], () => [import('./ngx-rendering-service-lib-default.component-BiI-arRn.mjs').then(m => m.DefaultComponent)], () => [Promise.resolve().then(function () { return url_component; }).then(m => m.UrlComponent)]] }); }
|
|
793
793
|
}
|
|
794
|
-
i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "18.2.6", ngImport: i0, type: RenderComponent, resolveDeferredDeps: () => [Promise.resolve().then(function () { return image_component; }).then(m => m.ImageComponent), Promise.resolve().then(function () { return video_component; }).then(m => m.VideoComponent), Promise.resolve().then(function () { return pdf_component; }).then(m => m.PdfComponent), Promise.resolve().then(function () { return eduHtml_component; }).then(m => m.EduHtmlComponent), import('./ngx-rendering-service-lib-audio.component-Cpp5Zzp1.mjs').then(m => m.AudioComponent), import('./ngx-rendering-service-lib-binder.component-
|
|
794
|
+
i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "18.2.6", ngImport: i0, type: RenderComponent, resolveDeferredDeps: () => [Promise.resolve().then(function () { return image_component; }).then(m => m.ImageComponent), Promise.resolve().then(function () { return video_component; }).then(m => m.VideoComponent), Promise.resolve().then(function () { return pdf_component; }).then(m => m.PdfComponent), Promise.resolve().then(function () { return eduHtml_component; }).then(m => m.EduHtmlComponent), import('./ngx-rendering-service-lib-audio.component-Cpp5Zzp1.mjs').then(m => m.AudioComponent), import('./ngx-rendering-service-lib-binder.component-CiBjp2jF.mjs').then(m => m.BinderComponent), import('./ngx-rendering-service-lib-ddb.component-BdYROITK.mjs').then(m => m.DdbComponent), import('./ngx-rendering-service-lib-default.component-BiI-arRn.mjs').then(m => m.DefaultComponent), Promise.resolve().then(function () { return url_component; }).then(m => m.UrlComponent)], resolveMetadata: (ImageComponent, VideoComponent, PdfComponent, EduHtmlComponent, AudioComponent, BinderComponent, DdbComponent, DefaultComponent, UrlComponent) => ({ decorators: [{
|
|
795
795
|
type: Component,
|
|
796
796
|
args: [{ selector: 'rs-root', standalone: true, imports: [
|
|
797
797
|
RenderingApiModule,
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-rendering-service-lib-binder.component-B-JfKIYl.mjs","sources":["../../src/lib/module/binder/binder.component.ts","../../src/lib/module/binder/binder.component.html"],"sourcesContent":["import { Component, Input, OnChanges, signal, SimpleChanges} from '@angular/core';\nimport {RenderingModule} from \"../../rendering.module\";\nimport {RenderModule} from \"../RenderModule\";\nimport {Node} from \"ngx-edu-sharing-api\";\nimport {FormsModule} from \"@angular/forms\";\nimport {RenderData, AssetStateItem} from \"../../dto/RenderData\";\nimport {MatProgressSpinner, MatProgressSpinnerModule} from \"@angular/material/progress-spinner\";\nimport {DomSanitizer, SafeResourceUrl} from \"@angular/platform-browser\";\n\n@Component({\n selector: 'rs-module-binder',\n standalone: true,\n imports: [\n RenderingModule,\n FormsModule,\n MatProgressSpinner,\n ],\n templateUrl: './binder.component.html',\n styleUrl: './binder.component.scss'\n})\nexport class BinderComponent implements RenderModule, OnChanges {\n @Input() data: RenderData | undefined;\n @Input() node: Node | undefined;\n binderItem = signal<AssetStateItem | undefined>(undefined);\n previewUrl = signal<SafeResourceUrl | undefined>(undefined)\n hasPreview = signal<boolean>(false)\n\n constructor(private sanitizer: DomSanitizer) {}\n\n ngOnChanges(changes: SimpleChanges): void {\n console.log(\"ONCHANGES\")\n console.log(this.data)\n const binderJobData = this.data?.items?.find(item => item.additionalData === undefined)\n if ( binderJobData !== undefined ) {\n this.binderItem.set(binderJobData)\n }\n const previewJobData = this.data?.items?.find(item => item.additionalData !== undefined)\n if (previewJobData !== undefined) {\n this.hasPreview.set(true)\n if (previewJobData.link !== undefined && previewJobData.link !== \"\") {\n this.previewUrl.set(this.getSafeUri(previewJobData.link))\n }\n }\n }\n\n getSafeUri(assetLink: string) {\n const uri = new URL(assetLink)\n if (uri.hostname.includes(\"nip.io\")) {\n uri.hostname = \"localhost\"\n }\n return this.sanitizer.bypassSecurityTrustResourceUrl(uri.toString())\n }\n}\n","<div class=\"binder-wrapper\" *ngIf=\"binderItem()\">\n <mat-spinner [diameter]=\"50\" *ngIf=\"binderItem()?.link === undefined\" ></mat-spinner>\n <a [href]=\"binderItem()?.link\" target=\"_blank\" *ngIf=\"binderItem()?.link !== undefined\">Link to object</a>\n <mat-spinner [diameter]=\"50\" *ngIf=\"hasPreview() && (previewUrl() === undefined)\"></mat-spinner>\n <iframe class=\"frame\" [src]=\"previewUrl()\" *ngIf=\"hasPreview() && (previewUrl() !== undefined)\" ></iframe>\n</div>\n"],"names":["i2"],"mappings":";;;;;;;;MAoBa,eAAe,CAAA;AAO1B,IAAA,WAAA,CAAoB,SAAuB,EAAA;QAAvB,IAAS,CAAA,SAAA,GAAT,SAAS,CAAc;AAJ3C,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAA6B,SAAS,CAAC,CAAC;AAC3D,QA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