@dangl/angular-material-shared 2.4.0-beta0033 → 2.4.0-beta0042
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/{esm2020 → esm2022}/dangl-angular-material-shared.mjs +4 -4
- package/esm2022/lib/angular-material-shared.module.mjs +39 -0
- package/esm2022/lib/components/footer/footer.component.mjs +34 -0
- package/esm2022/lib/components/header/header.component.mjs +81 -0
- package/esm2022/lib/components/tiny-mce/tiny-mce.component.mjs +111 -0
- package/{esm2020 → esm2022}/lib/models/footer-options.mjs +1 -1
- package/{esm2020 → esm2022}/lib/utils/guid-generator.mjs +35 -35
- package/{esm2020 → esm2022}/public_api.mjs +9 -9
- package/{fesm2020 → fesm2022}/dangl-angular-material-shared.mjs +266 -266
- package/{fesm2020 → fesm2022}/dangl-angular-material-shared.mjs.map +1 -1
- package/index.d.ts +5 -5
- package/lib/angular-material-shared.module.d.ts +14 -14
- package/lib/components/footer/footer.component.d.ts +14 -14
- package/lib/components/header/header.component.d.ts +22 -22
- package/lib/components/tiny-mce/tiny-mce.component.d.ts +27 -27
- package/lib/models/footer-options.d.ts +5 -5
- package/lib/utils/guid-generator.d.ts +9 -9
- package/package.json +14 -20
- package/public_api.d.ts +6 -6
- package/styles/material-style.scss +42 -0
- package/tinymce-assets/langs/az.js +261 -0
- package/tinymce-assets/langs/dv.js +230 -0
- package/tinymce-assets/langs/ga.js +261 -0
- package/tinymce-assets/langs/is_IS.js +415 -0
- package/tinymce-assets/langs/lv.js +260 -0
- package/tinymce-assets/langs/nl_BE.js +445 -0
- package/tinymce-assets/langs/oc.js +415 -0
- package/tinymce-assets/langs/sq.js +219 -0
- package/tinymce-assets/langs/sr.js +261 -0
- package/tinymce-assets/langs/tg.js +415 -0
- package/tinymce-assets/langs/ug.js +462 -0
- package/esm2020/lib/angular-material-shared.module.mjs +0 -38
- package/esm2020/lib/components/footer/footer.component.mjs +0 -33
- package/esm2020/lib/components/header/header.component.mjs +0 -80
- package/esm2020/lib/components/tiny-mce/tiny-mce.component.mjs +0 -110
- package/fesm2015/dangl-angular-material-shared.mjs +0 -298
- package/fesm2015/dangl-angular-material-shared.mjs.map +0 -1
|
@@ -12,284 +12,284 @@ import * as i3 from '@angular/material/button';
|
|
|
12
12
|
import { MatButtonModule } from '@angular/material/button';
|
|
13
13
|
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
14
14
|
|
|
15
|
-
class FooterComponent {
|
|
16
|
-
constructor() {
|
|
17
|
-
this.currentYear = new Date().getFullYear();
|
|
18
|
-
this.showLegalNotice = false;
|
|
19
|
-
this.legalNoticeText = 'Legal Notice';
|
|
20
|
-
this.legalNoticeLink = 'legal-notice';
|
|
21
|
-
this.useLegalNoticeCallback = false;
|
|
22
|
-
this.legalNoticeCallback = new EventEmitter();
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
28
|
-
type: Component,
|
|
29
|
-
args: [{ selector: 'dangl-footer', template: "<footer class=\"gd-footer\">\r\n <p>\r\n <ng-template [ngIf]=\"!options\">\r\n <span class=\"gd-logo gd-logo-sm\">GD</span>\r\n <span> </span>\r\n <a href=\"https://www.dangl-it.com\"\r\n >Dangl<strong>IT</strong> GmbH \u00A9 {{ currentYear }}</a\r\n >\r\n </ng-template>\r\n <ng-template [ngIf]=\"options\">\r\n <span *ngIf=\"options.logoInitials\" class=\"gd-logo gd-logo-sm\">{{\r\n options.logoInitials\r\n }}</span>\r\n <span> </span>\r\n <a *ngIf=\"options.copyrightUrl\" href=\"{{ options.copyrightUrl }}\"\r\n ><span [innerHtml]=\"options.companyNameHtml\"></span\r\n ></a>\r\n <span\r\n *ngIf=\"!options.copyrightUrl\"\r\n [innerHtml]=\"options.companyNameHtml\"\r\n ></span>\r\n </ng-template>\r\n <ng-template [ngIf]=\"showLegalNotice\">\r\n -\r\n <a *ngIf=\"!useLegalNoticeCallback\" [routerLink]=\"legalNoticeLink\">{{\r\n legalNoticeText\r\n }}</a>\r\n <a\r\n href=\"javascript:void(0)\"\r\n *ngIf=\"useLegalNoticeCallback\"\r\n (click)=\"legalNoticeCallback.next(null)\"\r\n >{{ legalNoticeText }}</a\r\n >\r\n </ng-template>\r\n </p>\r\n</footer>\r\n" }]
|
|
30
|
-
}], propDecorators: { showLegalNotice: [{
|
|
31
|
-
type: Input
|
|
32
|
-
}], legalNoticeText: [{
|
|
33
|
-
type: Input
|
|
34
|
-
}], legalNoticeLink: [{
|
|
35
|
-
type: Input
|
|
36
|
-
}], useLegalNoticeCallback: [{
|
|
37
|
-
type: Input
|
|
38
|
-
}], options: [{
|
|
39
|
-
type: Input
|
|
40
|
-
}], legalNoticeCallback: [{
|
|
41
|
-
type: Output
|
|
15
|
+
class FooterComponent {
|
|
16
|
+
constructor() {
|
|
17
|
+
this.currentYear = new Date().getFullYear();
|
|
18
|
+
this.showLegalNotice = false;
|
|
19
|
+
this.legalNoticeText = 'Legal Notice';
|
|
20
|
+
this.legalNoticeLink = 'legal-notice';
|
|
21
|
+
this.useLegalNoticeCallback = false;
|
|
22
|
+
this.legalNoticeCallback = new EventEmitter();
|
|
23
|
+
}
|
|
24
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: FooterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
25
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.2", type: FooterComponent, selector: "dangl-footer", inputs: { showLegalNotice: "showLegalNotice", legalNoticeText: "legalNoticeText", legalNoticeLink: "legalNoticeLink", useLegalNoticeCallback: "useLegalNoticeCallback", options: "options" }, outputs: { legalNoticeCallback: "legalNoticeCallback" }, ngImport: i0, template: "<footer class=\"gd-footer\">\r\n <p>\r\n <ng-template [ngIf]=\"!options\">\r\n <span class=\"gd-logo gd-logo-sm\">GD</span>\r\n <span> </span>\r\n <a href=\"https://www.dangl-it.com\"\r\n >Dangl<strong>IT</strong> GmbH \u00A9 {{ currentYear }}</a\r\n >\r\n </ng-template>\r\n <ng-template [ngIf]=\"options\">\r\n <span *ngIf=\"options.logoInitials\" class=\"gd-logo gd-logo-sm\">{{\r\n options.logoInitials\r\n }}</span>\r\n <span> </span>\r\n <a *ngIf=\"options.copyrightUrl\" href=\"{{ options.copyrightUrl }}\"\r\n ><span [innerHtml]=\"options.companyNameHtml\"></span\r\n ></a>\r\n <span\r\n *ngIf=\"!options.copyrightUrl\"\r\n [innerHtml]=\"options.companyNameHtml\"\r\n ></span>\r\n </ng-template>\r\n <ng-template [ngIf]=\"showLegalNotice\">\r\n -\r\n <a *ngIf=\"!useLegalNoticeCallback\" [routerLink]=\"legalNoticeLink\">{{\r\n legalNoticeText\r\n }}</a>\r\n <a\r\n href=\"javascript:void(0)\"\r\n *ngIf=\"useLegalNoticeCallback\"\r\n (click)=\"legalNoticeCallback.next(null)\"\r\n >{{ legalNoticeText }}</a\r\n >\r\n </ng-template>\r\n </p>\r\n</footer>\r\n", styles: [""], dependencies: [{ kind: "directive", type: i1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
|
|
26
|
+
}
|
|
27
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: FooterComponent, decorators: [{
|
|
28
|
+
type: Component,
|
|
29
|
+
args: [{ selector: 'dangl-footer', template: "<footer class=\"gd-footer\">\r\n <p>\r\n <ng-template [ngIf]=\"!options\">\r\n <span class=\"gd-logo gd-logo-sm\">GD</span>\r\n <span> </span>\r\n <a href=\"https://www.dangl-it.com\"\r\n >Dangl<strong>IT</strong> GmbH \u00A9 {{ currentYear }}</a\r\n >\r\n </ng-template>\r\n <ng-template [ngIf]=\"options\">\r\n <span *ngIf=\"options.logoInitials\" class=\"gd-logo gd-logo-sm\">{{\r\n options.logoInitials\r\n }}</span>\r\n <span> </span>\r\n <a *ngIf=\"options.copyrightUrl\" href=\"{{ options.copyrightUrl }}\"\r\n ><span [innerHtml]=\"options.companyNameHtml\"></span\r\n ></a>\r\n <span\r\n *ngIf=\"!options.copyrightUrl\"\r\n [innerHtml]=\"options.companyNameHtml\"\r\n ></span>\r\n </ng-template>\r\n <ng-template [ngIf]=\"showLegalNotice\">\r\n -\r\n <a *ngIf=\"!useLegalNoticeCallback\" [routerLink]=\"legalNoticeLink\">{{\r\n legalNoticeText\r\n }}</a>\r\n <a\r\n href=\"javascript:void(0)\"\r\n *ngIf=\"useLegalNoticeCallback\"\r\n (click)=\"legalNoticeCallback.next(null)\"\r\n >{{ legalNoticeText }}</a\r\n >\r\n </ng-template>\r\n </p>\r\n</footer>\r\n" }]
|
|
30
|
+
}], propDecorators: { showLegalNotice: [{
|
|
31
|
+
type: Input
|
|
32
|
+
}], legalNoticeText: [{
|
|
33
|
+
type: Input
|
|
34
|
+
}], legalNoticeLink: [{
|
|
35
|
+
type: Input
|
|
36
|
+
}], useLegalNoticeCallback: [{
|
|
37
|
+
type: Input
|
|
38
|
+
}], options: [{
|
|
39
|
+
type: Input
|
|
40
|
+
}], legalNoticeCallback: [{
|
|
41
|
+
type: Output
|
|
42
42
|
}] } });
|
|
43
43
|
|
|
44
|
-
class HeaderComponent {
|
|
45
|
-
constructor() {
|
|
46
|
-
this.showMenuButton = false;
|
|
47
|
-
this.logoInitials = "GD";
|
|
48
|
-
this.menuButtonClicked = new EventEmitter();
|
|
49
|
-
this._forceDisablePrereleaseHeader = false;
|
|
50
|
-
}
|
|
51
|
-
set showPrerelease(val) {
|
|
52
|
-
if (val) {
|
|
53
|
-
this._forceDisablePrereleaseHeader = false;
|
|
54
|
-
this._showPrerelease = this.checkPrereleaseData();
|
|
55
|
-
}
|
|
56
|
-
else {
|
|
57
|
-
this._forceDisablePrereleaseHeader = true;
|
|
58
|
-
this._showPrerelease = false;
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
get showPrerelease() {
|
|
62
|
-
if (this._forceDisablePrereleaseHeader) {
|
|
63
|
-
return false;
|
|
64
|
-
}
|
|
65
|
-
return this._showPrerelease;
|
|
66
|
-
}
|
|
67
|
-
ngOnChanges(_) {
|
|
68
|
-
if (!this._forceDisablePrereleaseHeader) {
|
|
69
|
-
this._showPrerelease = this.checkPrereleaseData();
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
checkPrereleaseData() {
|
|
73
|
-
let isShowing = this.preReleaseVersion != null ||
|
|
74
|
-
this.preReleaseBuildDate != null ||
|
|
75
|
-
this.preReleaseLiveSiteLink != null;
|
|
76
|
-
if (this.preReleaseVersion != null && typeof Storage !== "undefined") {
|
|
77
|
-
isShowing =
|
|
78
|
-
this.preReleaseVersion !==
|
|
79
|
-
localStorage.getItem("dangl_preview_notice_header_hide_version");
|
|
80
|
-
}
|
|
81
|
-
return isShowing;
|
|
82
|
-
}
|
|
83
|
-
hideForCurrentVersion() {
|
|
84
|
-
if (typeof Storage !== "undefined") {
|
|
85
|
-
localStorage.setItem("dangl_preview_notice_header_hide_version", this.preReleaseVersion);
|
|
86
|
-
this.showPrerelease = false;
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
93
|
-
type: Component,
|
|
94
|
-
args: [{ selector: "dangl-header", template: "<mat-toolbar color=\"primary\">\r\n <mat-toolbar-row>\r\n <button\r\n mat-button\r\n class=\"menu-button\"\r\n *ngIf=\"showMenuButton\"\r\n (click)=\"menuButtonClicked.next(null)\"\r\n >\r\n <mat-icon>menu</mat-icon>\r\n </button>\r\n <a routerLink=\"/\" class=\"header-title\" *ngIf=\"iconUrl\">\r\n <img class=\"dangl-header-logo\" [src]=\"iconUrl\" />\r\n </a>\r\n <a routerLink=\"/\" class=\"header-title\">\r\n <h1>\r\n <span *ngIf=\"logoInitials\" class=\"gd-logo\">{{ logoInitials }}</span>\r\n <ng-container *ngIf=\"prefix || postfix\">\r\n {{ prefix }}<strong>{{ postfix }}</strong>\r\n </ng-container>\r\n </h1>\r\n </a>\r\n <span class=\"toolbar-spacer\"></span>\r\n <ng-content></ng-content>\r\n </mat-toolbar-row>\r\n <mat-toolbar-row *ngIf=\"showPrerelease\" class=\"preview-notice\">\r\n <div class=\"preview-row\">\r\n <span> <mat-icon>warning</mat-icon> This is a preview site. </span>\r\n <a href=\"{{ preReleaseLiveSiteLink }}\" *ngIf=\"preReleaseLiveSiteLink\"\r\n >Click here to go to the live site</a\r\n >\r\n <div>\r\n <button\r\n mat-button\r\n mat-raised-button\r\n color=\"primary\"\r\n (click)=\"showPrerelease = false\"\r\n >\r\n OK\r\n </button>\r\n <button\r\n mat-button\r\n mat-raised-button\r\n color=\"primary\"\r\n (click)=\"hideForCurrentVersion()\"\r\n >\r\n Hide for this version\r\n </button>\r\n </div>\r\n </div>\r\n <div class=\"preview-row\">\r\n <span *ngIf=\"preReleaseVersion\">Version: {{ preReleaseVersion }}</span>\r\n <span *ngIf=\"preReleaseBuildDate\"\r\n >Built: {{ preReleaseBuildDate | date: \"dd.MM.yyyy HH:mm\" }}</span\r\n >\r\n </div>\r\n </mat-toolbar-row>\r\n <mat-toolbar-row class=\"header-divider\"></mat-toolbar-row>\r\n</mat-toolbar>\r\n", styles: [".mat-ripple{overflow:hidden;position:relative}.mat-ripple:not(:empty){transform:translateZ(0)}.mat-ripple.mat-ripple-unbounded{overflow:visible}.mat-ripple-element{position:absolute;border-radius:50%;pointer-events:none;transition:opacity,transform 0ms cubic-bezier(0,0,.2,1);transform:scale3d(0,0,0)}.cdk-high-contrast-active .mat-ripple-element{display:none}.cdk-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap;outline:0;-webkit-appearance:none;-moz-appearance:none;left:0}[dir=rtl] .cdk-visually-hidden{left:auto;right:0}.cdk-overlay-container,.cdk-global-overlay-wrapper{pointer-events:none;top:0;left:0;height:100%;width:100%}.cdk-overlay-container{position:fixed;z-index:1000}.cdk-overlay-container:empty{display:none}.cdk-global-overlay-wrapper{display:flex;position:absolute;z-index:1000}.cdk-overlay-pane{position:absolute;pointer-events:auto;box-sizing:border-box;z-index:1000;display:flex;max-width:100%;max-height:100%}.cdk-overlay-backdrop{position:absolute;inset:0;z-index:1000;pointer-events:auto;-webkit-tap-highlight-color:transparent;transition:opacity .4s cubic-bezier(.25,.8,.25,1);opacity:0}.cdk-overlay-backdrop.cdk-overlay-backdrop-showing{opacity:1}.cdk-high-contrast-active .cdk-overlay-backdrop.cdk-overlay-backdrop-showing{opacity:.6}.cdk-overlay-dark-backdrop{background:rgba(0,0,0,.32)}.cdk-overlay-transparent-backdrop{transition:visibility 1ms linear,opacity 1ms linear;visibility:hidden;opacity:1}.cdk-overlay-transparent-backdrop.cdk-overlay-backdrop-showing{opacity:0;visibility:visible}.cdk-overlay-backdrop-noop-animation{transition:none}.cdk-overlay-connected-position-bounding-box{position:absolute;z-index:1000;display:flex;flex-direction:column;min-width:1px;min-height:1px}.cdk-global-scrollblock{position:fixed;width:100%;overflow-y:scroll}textarea.cdk-textarea-autosize{resize:none}textarea.cdk-textarea-autosize-measuring{padding:2px 0!important;box-sizing:content-box!important;height:auto!important;overflow:hidden!important}textarea.cdk-textarea-autosize-measuring-firefox{padding:2px 0!important;box-sizing:content-box!important;height:0!important}@keyframes cdk-text-field-autofill-start{}@keyframes cdk-text-field-autofill-end{}.cdk-text-field-autofill-monitored:-webkit-autofill{animation:cdk-text-field-autofill-start 0s 1ms}.cdk-text-field-autofill-monitored:not(:-webkit-autofill){animation:cdk-text-field-autofill-end 0s 1ms}.mat-focus-indicator{position:relative}.mat-focus-indicator:before{inset:0;position:absolute;box-sizing:border-box;pointer-events:none;display:var(--mat-focus-indicator-display, none);border:var(--mat-focus-indicator-border-width, 3px) var(--mat-focus-indicator-border-style, solid) var(--mat-focus-indicator-border-color, transparent);border-radius:var(--mat-focus-indicator-border-radius, 4px)}.mat-focus-indicator:focus:before{content:\"\"}.cdk-high-contrast-active{--mat-focus-indicator-display: block}.mat-mdc-focus-indicator{position:relative}.mat-mdc-focus-indicator:before{inset:0;position:absolute;box-sizing:border-box;pointer-events:none;display:var(--mat-mdc-focus-indicator-display, none);border:var(--mat-mdc-focus-indicator-border-width, 3px) var(--mat-mdc-focus-indicator-border-style, solid) var(--mat-mdc-focus-indicator-border-color, transparent);border-radius:var(--mat-mdc-focus-indicator-border-radius, 4px)}.mat-mdc-focus-indicator:focus:before{content:\"\"}.cdk-high-contrast-active{--mat-mdc-focus-indicator-display: block}.header-divider{background-color:#3b4c55;height:12px}.preview-notice{background-color:#f44336;display:flex;flex-direction:column}.preview-notice .preview-row{display:flex;width:100%;flex-direction:row;justify-content:space-between}.preview-notice .preview-row a{text-decoration:underline}.dangl-header-logo{max-height:64px;vertical-align:middle}@media (max-width: 599px){.dangl-header-logo{max-height:56px}}mat-toolbar-row{padding-left:0}.header-title{padding-left:16px}.menu-button{height:100%;margin-left:0;min-width:auto;width:52px}.menu-button mat-icon{font-size:1.5rem;height:1.5rem;width:1.5rem;transform:scale(1.25)}.toolbar-spacer{flex:1 1 auto}\n"] }]
|
|
95
|
-
}], propDecorators: { prefix: [{
|
|
96
|
-
type: Input
|
|
97
|
-
}], postfix: [{
|
|
98
|
-
type: Input
|
|
99
|
-
}], showMenuButton: [{
|
|
100
|
-
type: Input
|
|
101
|
-
}], logoInitials: [{
|
|
102
|
-
type: Input
|
|
103
|
-
}], iconUrl: [{
|
|
104
|
-
type: Input
|
|
105
|
-
}], menuButtonClicked: [{
|
|
106
|
-
type: Output
|
|
107
|
-
}], preReleaseVersion: [{
|
|
108
|
-
type: Input
|
|
109
|
-
}], preReleaseBuildDate: [{
|
|
110
|
-
type: Input
|
|
111
|
-
}], preReleaseLiveSiteLink: [{
|
|
112
|
-
type: Input
|
|
113
|
-
}], showPrerelease: [{
|
|
114
|
-
type: Input
|
|
44
|
+
class HeaderComponent {
|
|
45
|
+
constructor() {
|
|
46
|
+
this.showMenuButton = false;
|
|
47
|
+
this.logoInitials = "GD";
|
|
48
|
+
this.menuButtonClicked = new EventEmitter();
|
|
49
|
+
this._forceDisablePrereleaseHeader = false;
|
|
50
|
+
}
|
|
51
|
+
set showPrerelease(val) {
|
|
52
|
+
if (val) {
|
|
53
|
+
this._forceDisablePrereleaseHeader = false;
|
|
54
|
+
this._showPrerelease = this.checkPrereleaseData();
|
|
55
|
+
}
|
|
56
|
+
else {
|
|
57
|
+
this._forceDisablePrereleaseHeader = true;
|
|
58
|
+
this._showPrerelease = false;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
get showPrerelease() {
|
|
62
|
+
if (this._forceDisablePrereleaseHeader) {
|
|
63
|
+
return false;
|
|
64
|
+
}
|
|
65
|
+
return this._showPrerelease;
|
|
66
|
+
}
|
|
67
|
+
ngOnChanges(_) {
|
|
68
|
+
if (!this._forceDisablePrereleaseHeader) {
|
|
69
|
+
this._showPrerelease = this.checkPrereleaseData();
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
checkPrereleaseData() {
|
|
73
|
+
let isShowing = this.preReleaseVersion != null ||
|
|
74
|
+
this.preReleaseBuildDate != null ||
|
|
75
|
+
this.preReleaseLiveSiteLink != null;
|
|
76
|
+
if (this.preReleaseVersion != null && typeof Storage !== "undefined") {
|
|
77
|
+
isShowing =
|
|
78
|
+
this.preReleaseVersion !==
|
|
79
|
+
localStorage.getItem("dangl_preview_notice_header_hide_version");
|
|
80
|
+
}
|
|
81
|
+
return isShowing;
|
|
82
|
+
}
|
|
83
|
+
hideForCurrentVersion() {
|
|
84
|
+
if (typeof Storage !== "undefined") {
|
|
85
|
+
localStorage.setItem("dangl_preview_notice_header_hide_version", this.preReleaseVersion);
|
|
86
|
+
this.showPrerelease = false;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: HeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
90
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.2", type: HeaderComponent, selector: "dangl-header", inputs: { prefix: "prefix", postfix: "postfix", showMenuButton: "showMenuButton", logoInitials: "logoInitials", iconUrl: "iconUrl", preReleaseVersion: "preReleaseVersion", preReleaseBuildDate: "preReleaseBuildDate", preReleaseLiveSiteLink: "preReleaseLiveSiteLink", showPrerelease: "showPrerelease" }, outputs: { menuButtonClicked: "menuButtonClicked" }, usesOnChanges: true, ngImport: i0, template: "<mat-toolbar color=\"primary\">\r\n <mat-toolbar-row>\r\n <button\r\n mat-button\r\n class=\"menu-button\"\r\n *ngIf=\"showMenuButton\"\r\n (click)=\"menuButtonClicked.next(null)\"\r\n >\r\n <mat-icon>menu</mat-icon>\r\n </button>\r\n <a routerLink=\"/\" class=\"header-title\" *ngIf=\"iconUrl\">\r\n <img class=\"dangl-header-logo\" [src]=\"iconUrl\" />\r\n </a>\r\n <a routerLink=\"/\" class=\"header-title\">\r\n <h1>\r\n <span *ngIf=\"logoInitials\" class=\"gd-logo\">{{ logoInitials }}</span>\r\n <ng-container *ngIf=\"prefix || postfix\">\r\n {{ prefix }}<strong>{{ postfix }}</strong>\r\n </ng-container>\r\n </h1>\r\n </a>\r\n <span class=\"toolbar-spacer\"></span>\r\n <ng-content></ng-content>\r\n </mat-toolbar-row>\r\n <mat-toolbar-row *ngIf=\"showPrerelease\" class=\"preview-notice\">\r\n <div class=\"preview-row\">\r\n <span> <mat-icon>warning</mat-icon> This is a preview site. </span>\r\n <a href=\"{{ preReleaseLiveSiteLink }}\" *ngIf=\"preReleaseLiveSiteLink\"\r\n >Click here to go to the live site</a\r\n >\r\n <div>\r\n <button\r\n mat-button\r\n mat-raised-button\r\n color=\"primary\"\r\n (click)=\"showPrerelease = false\"\r\n >\r\n OK\r\n </button>\r\n <button\r\n mat-button\r\n mat-raised-button\r\n color=\"primary\"\r\n (click)=\"hideForCurrentVersion()\"\r\n >\r\n Hide for this version\r\n </button>\r\n </div>\r\n </div>\r\n <div class=\"preview-row\">\r\n <span *ngIf=\"preReleaseVersion\">Version: {{ preReleaseVersion }}</span>\r\n <span *ngIf=\"preReleaseBuildDate\"\r\n >Built: {{ preReleaseBuildDate | date: \"dd.MM.yyyy HH:mm\" }}</span\r\n >\r\n </div>\r\n </mat-toolbar-row>\r\n <mat-toolbar-row class=\"header-divider\"></mat-toolbar-row>\r\n</mat-toolbar>\r\n", styles: [".mat-ripple{overflow:hidden;position:relative}.mat-ripple:not(:empty){transform:translateZ(0)}.mat-ripple.mat-ripple-unbounded{overflow:visible}.mat-ripple-element{position:absolute;border-radius:50%;pointer-events:none;transition:opacity,transform 0ms cubic-bezier(0,0,.2,1);transform:scale3d(0,0,0)}.cdk-high-contrast-active .mat-ripple-element{display:none}.cdk-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap;outline:0;-webkit-appearance:none;-moz-appearance:none;left:0}[dir=rtl] .cdk-visually-hidden{left:auto;right:0}.cdk-overlay-container,.cdk-global-overlay-wrapper{pointer-events:none;top:0;left:0;height:100%;width:100%}.cdk-overlay-container{position:fixed;z-index:1000}.cdk-overlay-container:empty{display:none}.cdk-global-overlay-wrapper{display:flex;position:absolute;z-index:1000}.cdk-overlay-pane{position:absolute;pointer-events:auto;box-sizing:border-box;z-index:1000;display:flex;max-width:100%;max-height:100%}.cdk-overlay-backdrop{position:absolute;inset:0;z-index:1000;pointer-events:auto;-webkit-tap-highlight-color:transparent;transition:opacity .4s cubic-bezier(.25,.8,.25,1);opacity:0}.cdk-overlay-backdrop.cdk-overlay-backdrop-showing{opacity:1}.cdk-high-contrast-active .cdk-overlay-backdrop.cdk-overlay-backdrop-showing{opacity:.6}.cdk-overlay-dark-backdrop{background:rgba(0,0,0,.32)}.cdk-overlay-transparent-backdrop{transition:visibility 1ms linear,opacity 1ms linear;visibility:hidden;opacity:1}.cdk-overlay-transparent-backdrop.cdk-overlay-backdrop-showing{opacity:0;visibility:visible}.cdk-overlay-backdrop-noop-animation{transition:none}.cdk-overlay-connected-position-bounding-box{position:absolute;z-index:1000;display:flex;flex-direction:column;min-width:1px;min-height:1px}.cdk-global-scrollblock{position:fixed;width:100%;overflow-y:scroll}textarea.cdk-textarea-autosize{resize:none}textarea.cdk-textarea-autosize-measuring{padding:2px 0!important;box-sizing:content-box!important;height:auto!important;overflow:hidden!important}textarea.cdk-textarea-autosize-measuring-firefox{padding:2px 0!important;box-sizing:content-box!important;height:0!important}@keyframes cdk-text-field-autofill-start{}@keyframes cdk-text-field-autofill-end{}.cdk-text-field-autofill-monitored:-webkit-autofill{animation:cdk-text-field-autofill-start 0s 1ms}.cdk-text-field-autofill-monitored:not(:-webkit-autofill){animation:cdk-text-field-autofill-end 0s 1ms}.mat-focus-indicator{position:relative}.mat-focus-indicator:before{inset:0;position:absolute;box-sizing:border-box;pointer-events:none;display:var(--mat-focus-indicator-display, none);border:var(--mat-focus-indicator-border-width, 3px) var(--mat-focus-indicator-border-style, solid) var(--mat-focus-indicator-border-color, transparent);border-radius:var(--mat-focus-indicator-border-radius, 4px)}.mat-focus-indicator:focus:before{content:\"\"}.cdk-high-contrast-active{--mat-focus-indicator-display: block}.mat-mdc-focus-indicator{position:relative}.mat-mdc-focus-indicator:before{inset:0;position:absolute;box-sizing:border-box;pointer-events:none;display:var(--mat-mdc-focus-indicator-display, none);border:var(--mat-mdc-focus-indicator-border-width, 3px) var(--mat-mdc-focus-indicator-border-style, solid) var(--mat-mdc-focus-indicator-border-color, transparent);border-radius:var(--mat-mdc-focus-indicator-border-radius, 4px)}.mat-mdc-focus-indicator:focus:before{content:\"\"}.cdk-high-contrast-active{--mat-mdc-focus-indicator-display: block}.header-divider{background-color:#3b4c55;height:12px}.preview-notice{background-color:#f44336;display:flex;flex-direction:column}.preview-notice .preview-row{display:flex;width:100%;flex-direction:row;justify-content:space-between}.preview-notice .preview-row a{text-decoration:underline}.dangl-header-logo{max-height:64px;vertical-align:middle}@media (max-width: 599px){.dangl-header-logo{max-height:56px}}mat-toolbar-row{padding-left:0}.header-title{padding-left:16px}.menu-button{height:100%;margin-left:0;min-width:auto;width:52px}.menu-button mat-icon{font-size:1.5rem;height:1.5rem;width:1.5rem;transform:scale(1.25)}.toolbar-spacer{flex:1 1 auto}\n"], dependencies: [{ kind: "component", type: i1$1.MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }, { kind: "directive", type: i1$1.MatToolbarRow, selector: "mat-toolbar-row", exportAs: ["matToolbarRow"] }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i3.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: i1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i5.DatePipe, name: "date" }] }); }
|
|
91
|
+
}
|
|
92
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: HeaderComponent, decorators: [{
|
|
93
|
+
type: Component,
|
|
94
|
+
args: [{ selector: "dangl-header", template: "<mat-toolbar color=\"primary\">\r\n <mat-toolbar-row>\r\n <button\r\n mat-button\r\n class=\"menu-button\"\r\n *ngIf=\"showMenuButton\"\r\n (click)=\"menuButtonClicked.next(null)\"\r\n >\r\n <mat-icon>menu</mat-icon>\r\n </button>\r\n <a routerLink=\"/\" class=\"header-title\" *ngIf=\"iconUrl\">\r\n <img class=\"dangl-header-logo\" [src]=\"iconUrl\" />\r\n </a>\r\n <a routerLink=\"/\" class=\"header-title\">\r\n <h1>\r\n <span *ngIf=\"logoInitials\" class=\"gd-logo\">{{ logoInitials }}</span>\r\n <ng-container *ngIf=\"prefix || postfix\">\r\n {{ prefix }}<strong>{{ postfix }}</strong>\r\n </ng-container>\r\n </h1>\r\n </a>\r\n <span class=\"toolbar-spacer\"></span>\r\n <ng-content></ng-content>\r\n </mat-toolbar-row>\r\n <mat-toolbar-row *ngIf=\"showPrerelease\" class=\"preview-notice\">\r\n <div class=\"preview-row\">\r\n <span> <mat-icon>warning</mat-icon> This is a preview site. </span>\r\n <a href=\"{{ preReleaseLiveSiteLink }}\" *ngIf=\"preReleaseLiveSiteLink\"\r\n >Click here to go to the live site</a\r\n >\r\n <div>\r\n <button\r\n mat-button\r\n mat-raised-button\r\n color=\"primary\"\r\n (click)=\"showPrerelease = false\"\r\n >\r\n OK\r\n </button>\r\n <button\r\n mat-button\r\n mat-raised-button\r\n color=\"primary\"\r\n (click)=\"hideForCurrentVersion()\"\r\n >\r\n Hide for this version\r\n </button>\r\n </div>\r\n </div>\r\n <div class=\"preview-row\">\r\n <span *ngIf=\"preReleaseVersion\">Version: {{ preReleaseVersion }}</span>\r\n <span *ngIf=\"preReleaseBuildDate\"\r\n >Built: {{ preReleaseBuildDate | date: \"dd.MM.yyyy HH:mm\" }}</span\r\n >\r\n </div>\r\n </mat-toolbar-row>\r\n <mat-toolbar-row class=\"header-divider\"></mat-toolbar-row>\r\n</mat-toolbar>\r\n", styles: [".mat-ripple{overflow:hidden;position:relative}.mat-ripple:not(:empty){transform:translateZ(0)}.mat-ripple.mat-ripple-unbounded{overflow:visible}.mat-ripple-element{position:absolute;border-radius:50%;pointer-events:none;transition:opacity,transform 0ms cubic-bezier(0,0,.2,1);transform:scale3d(0,0,0)}.cdk-high-contrast-active .mat-ripple-element{display:none}.cdk-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap;outline:0;-webkit-appearance:none;-moz-appearance:none;left:0}[dir=rtl] .cdk-visually-hidden{left:auto;right:0}.cdk-overlay-container,.cdk-global-overlay-wrapper{pointer-events:none;top:0;left:0;height:100%;width:100%}.cdk-overlay-container{position:fixed;z-index:1000}.cdk-overlay-container:empty{display:none}.cdk-global-overlay-wrapper{display:flex;position:absolute;z-index:1000}.cdk-overlay-pane{position:absolute;pointer-events:auto;box-sizing:border-box;z-index:1000;display:flex;max-width:100%;max-height:100%}.cdk-overlay-backdrop{position:absolute;inset:0;z-index:1000;pointer-events:auto;-webkit-tap-highlight-color:transparent;transition:opacity .4s cubic-bezier(.25,.8,.25,1);opacity:0}.cdk-overlay-backdrop.cdk-overlay-backdrop-showing{opacity:1}.cdk-high-contrast-active .cdk-overlay-backdrop.cdk-overlay-backdrop-showing{opacity:.6}.cdk-overlay-dark-backdrop{background:rgba(0,0,0,.32)}.cdk-overlay-transparent-backdrop{transition:visibility 1ms linear,opacity 1ms linear;visibility:hidden;opacity:1}.cdk-overlay-transparent-backdrop.cdk-overlay-backdrop-showing{opacity:0;visibility:visible}.cdk-overlay-backdrop-noop-animation{transition:none}.cdk-overlay-connected-position-bounding-box{position:absolute;z-index:1000;display:flex;flex-direction:column;min-width:1px;min-height:1px}.cdk-global-scrollblock{position:fixed;width:100%;overflow-y:scroll}textarea.cdk-textarea-autosize{resize:none}textarea.cdk-textarea-autosize-measuring{padding:2px 0!important;box-sizing:content-box!important;height:auto!important;overflow:hidden!important}textarea.cdk-textarea-autosize-measuring-firefox{padding:2px 0!important;box-sizing:content-box!important;height:0!important}@keyframes cdk-text-field-autofill-start{}@keyframes cdk-text-field-autofill-end{}.cdk-text-field-autofill-monitored:-webkit-autofill{animation:cdk-text-field-autofill-start 0s 1ms}.cdk-text-field-autofill-monitored:not(:-webkit-autofill){animation:cdk-text-field-autofill-end 0s 1ms}.mat-focus-indicator{position:relative}.mat-focus-indicator:before{inset:0;position:absolute;box-sizing:border-box;pointer-events:none;display:var(--mat-focus-indicator-display, none);border:var(--mat-focus-indicator-border-width, 3px) var(--mat-focus-indicator-border-style, solid) var(--mat-focus-indicator-border-color, transparent);border-radius:var(--mat-focus-indicator-border-radius, 4px)}.mat-focus-indicator:focus:before{content:\"\"}.cdk-high-contrast-active{--mat-focus-indicator-display: block}.mat-mdc-focus-indicator{position:relative}.mat-mdc-focus-indicator:before{inset:0;position:absolute;box-sizing:border-box;pointer-events:none;display:var(--mat-mdc-focus-indicator-display, none);border:var(--mat-mdc-focus-indicator-border-width, 3px) var(--mat-mdc-focus-indicator-border-style, solid) var(--mat-mdc-focus-indicator-border-color, transparent);border-radius:var(--mat-mdc-focus-indicator-border-radius, 4px)}.mat-mdc-focus-indicator:focus:before{content:\"\"}.cdk-high-contrast-active{--mat-mdc-focus-indicator-display: block}.header-divider{background-color:#3b4c55;height:12px}.preview-notice{background-color:#f44336;display:flex;flex-direction:column}.preview-notice .preview-row{display:flex;width:100%;flex-direction:row;justify-content:space-between}.preview-notice .preview-row a{text-decoration:underline}.dangl-header-logo{max-height:64px;vertical-align:middle}@media (max-width: 599px){.dangl-header-logo{max-height:56px}}mat-toolbar-row{padding-left:0}.header-title{padding-left:16px}.menu-button{height:100%;margin-left:0;min-width:auto;width:52px}.menu-button mat-icon{font-size:1.5rem;height:1.5rem;width:1.5rem;transform:scale(1.25)}.toolbar-spacer{flex:1 1 auto}\n"] }]
|
|
95
|
+
}], propDecorators: { prefix: [{
|
|
96
|
+
type: Input
|
|
97
|
+
}], postfix: [{
|
|
98
|
+
type: Input
|
|
99
|
+
}], showMenuButton: [{
|
|
100
|
+
type: Input
|
|
101
|
+
}], logoInitials: [{
|
|
102
|
+
type: Input
|
|
103
|
+
}], iconUrl: [{
|
|
104
|
+
type: Input
|
|
105
|
+
}], menuButtonClicked: [{
|
|
106
|
+
type: Output
|
|
107
|
+
}], preReleaseVersion: [{
|
|
108
|
+
type: Input
|
|
109
|
+
}], preReleaseBuildDate: [{
|
|
110
|
+
type: Input
|
|
111
|
+
}], preReleaseLiveSiteLink: [{
|
|
112
|
+
type: Input
|
|
113
|
+
}], showPrerelease: [{
|
|
114
|
+
type: Input
|
|
115
115
|
}] } });
|
|
116
116
|
|
|
117
|
-
// tslint:disable:no-bitwise
|
|
118
|
-
class GuidGenerator {
|
|
119
|
-
/**
|
|
120
|
-
* Taken from https://github.com/Steve-Fenton/TypeScriptUtilities/blob/master/Guid
|
|
121
|
-
* (modified)
|
|
122
|
-
* Generates a Version 4 (= Pseudorandom) Guid
|
|
123
|
-
*/
|
|
124
|
-
static generatePseudoRandomGuid() {
|
|
125
|
-
const newGuidPlaceholder = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx';
|
|
126
|
-
const pseudoGuid = newGuidPlaceholder.replace(/[xy]/g, letter => this.generateRandomHexDigit(letter));
|
|
127
|
-
return pseudoGuid;
|
|
128
|
-
}
|
|
129
|
-
static generateRandomHexDigit(letter) {
|
|
130
|
-
const r = Math.random() * 16 | 0;
|
|
131
|
-
let v;
|
|
132
|
-
if (letter === 'x') {
|
|
133
|
-
v = r;
|
|
134
|
-
}
|
|
135
|
-
else if (letter === 'y') {
|
|
136
|
-
v = r & 0x3 | 0x8;
|
|
137
|
-
/* r & 0x3 -> Allows either 0x0000, 0x0001, 0x0010 or 0x0011
|
|
138
|
-
* | 0x8 -> 0x1000 = 8
|
|
139
|
-
* 0x1001 = 9
|
|
140
|
-
* 0x1010 = A
|
|
141
|
-
* 0x1011 = B
|
|
142
|
-
* The possible variants of version 4 Guids
|
|
143
|
-
*/
|
|
144
|
-
}
|
|
145
|
-
else {
|
|
146
|
-
throw new Error('Please provide either "x" to indicate a random replacement or "y" to '
|
|
147
|
-
+ 'indicate the generation of the variant identifier');
|
|
148
|
-
}
|
|
149
|
-
return v.toString(16);
|
|
150
|
-
}
|
|
117
|
+
// tslint:disable:no-bitwise
|
|
118
|
+
class GuidGenerator {
|
|
119
|
+
/**
|
|
120
|
+
* Taken from https://github.com/Steve-Fenton/TypeScriptUtilities/blob/master/Guid
|
|
121
|
+
* (modified)
|
|
122
|
+
* Generates a Version 4 (= Pseudorandom) Guid
|
|
123
|
+
*/
|
|
124
|
+
static generatePseudoRandomGuid() {
|
|
125
|
+
const newGuidPlaceholder = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx';
|
|
126
|
+
const pseudoGuid = newGuidPlaceholder.replace(/[xy]/g, letter => this.generateRandomHexDigit(letter));
|
|
127
|
+
return pseudoGuid;
|
|
128
|
+
}
|
|
129
|
+
static generateRandomHexDigit(letter) {
|
|
130
|
+
const r = Math.random() * 16 | 0;
|
|
131
|
+
let v;
|
|
132
|
+
if (letter === 'x') {
|
|
133
|
+
v = r;
|
|
134
|
+
}
|
|
135
|
+
else if (letter === 'y') {
|
|
136
|
+
v = r & 0x3 | 0x8;
|
|
137
|
+
/* r & 0x3 -> Allows either 0x0000, 0x0001, 0x0010 or 0x0011
|
|
138
|
+
* | 0x8 -> 0x1000 = 8
|
|
139
|
+
* 0x1001 = 9
|
|
140
|
+
* 0x1010 = A
|
|
141
|
+
* 0x1011 = B
|
|
142
|
+
* The possible variants of version 4 Guids
|
|
143
|
+
*/
|
|
144
|
+
}
|
|
145
|
+
else {
|
|
146
|
+
throw new Error('Please provide either "x" to indicate a random replacement or "y" to '
|
|
147
|
+
+ 'indicate the generation of the variant identifier');
|
|
148
|
+
}
|
|
149
|
+
return v.toString(16);
|
|
150
|
+
}
|
|
151
151
|
}
|
|
152
152
|
|
|
153
|
-
class TinyMceComponent {
|
|
154
|
-
|
|
155
|
-
this.
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
this.
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
ngAfterViewInit() {
|
|
179
|
-
tinymce.init({
|
|
180
|
-
selector: '#' + this.elementId,
|
|
181
|
-
plugins: ['link', 'paste', 'table', 'image', 'code'],
|
|
182
|
-
language: this.tinyMceLanguageCode,
|
|
183
|
-
base_url: this.baseUrl,
|
|
184
|
-
branding: false,
|
|
185
|
-
setup: editor => {
|
|
186
|
-
editor.on('change keyup', () => {
|
|
187
|
-
const content = editor.getContent();
|
|
188
|
-
this.editorContent = content;
|
|
189
|
-
});
|
|
190
|
-
},
|
|
191
|
-
init_instance_callback: editor => {
|
|
192
|
-
if (editor && this.editorContent) {
|
|
193
|
-
editor.setContent(this.editorContent);
|
|
194
|
-
}
|
|
195
|
-
this.editor = editor;
|
|
196
|
-
this.setDisabledState(this._disabled);
|
|
197
|
-
}
|
|
198
|
-
});
|
|
199
|
-
}
|
|
200
|
-
ngOnDestroy() {
|
|
201
|
-
tinymce.remove(this.editor);
|
|
202
|
-
}
|
|
203
|
-
writeValue(obj) {
|
|
204
|
-
obj = obj || '';
|
|
205
|
-
this.editorContent = obj;
|
|
206
|
-
if (!this.editor) {
|
|
207
|
-
return;
|
|
208
|
-
}
|
|
209
|
-
const tinyMceContent = this.editor.getContent();
|
|
210
|
-
if (tinyMceContent !== obj) {
|
|
211
|
-
this.editor.setContent(obj);
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
registerOnChange(fn) {
|
|
215
|
-
this.onChangeCallback = fn;
|
|
216
|
-
}
|
|
217
|
-
registerOnTouched(fn) {
|
|
218
|
-
this.onTouchedCallback = fn;
|
|
219
|
-
}
|
|
220
|
-
setDisabledState(isDisabled) {
|
|
221
|
-
this._disabled = isDisabled;
|
|
222
|
-
if (!this.editor) {
|
|
223
|
-
return;
|
|
224
|
-
}
|
|
225
|
-
if (isDisabled) {
|
|
226
|
-
this.editor.setMode('readonly');
|
|
227
|
-
}
|
|
228
|
-
else {
|
|
229
|
-
this.editor.setMode('design');
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
242
|
-
type: Component,
|
|
243
|
-
args: [{ selector: 'dangl-tiny-mce', providers: [
|
|
244
|
-
{
|
|
245
|
-
provide: NG_VALUE_ACCESSOR,
|
|
246
|
-
useExisting: forwardRef(() => TinyMceComponent),
|
|
247
|
-
multi: true,
|
|
248
|
-
}
|
|
249
|
-
], template: "<textarea id=\"{{ elementId }}\"></textarea>\r\n" }]
|
|
250
|
-
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
251
|
-
type: Inject,
|
|
252
|
-
args: ['TINYMCE_BASE_URL']
|
|
253
|
-
}] }, { type: i0.NgZone }]; }, propDecorators: { tinyMceLanguageUrl: [{
|
|
254
|
-
type: Input
|
|
255
|
-
}], tinyMceLanguageCode: [{
|
|
256
|
-
type: Input
|
|
153
|
+
class TinyMceComponent {
|
|
154
|
+
get editorContent() {
|
|
155
|
+
return this._editorContent;
|
|
156
|
+
}
|
|
157
|
+
set editorContent(value) {
|
|
158
|
+
if (value !== this._editorContent) {
|
|
159
|
+
this._editorContent = value;
|
|
160
|
+
this.ngZone.run(() => {
|
|
161
|
+
// tinyMCE events are outside of the Angular zone
|
|
162
|
+
// ngZone.run() makes sure everything runs in the
|
|
163
|
+
// Angular zone, so it integrates in the Angular
|
|
164
|
+
// lifecycle. Otherwise, e.g., 'required' validation
|
|
165
|
+
// would not update on change
|
|
166
|
+
this.onChangeCallback(value);
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
constructor(baseUrl, ngZone) {
|
|
171
|
+
this.baseUrl = baseUrl;
|
|
172
|
+
this.ngZone = ngZone;
|
|
173
|
+
this.elementId = GuidGenerator.generatePseudoRandomGuid();
|
|
174
|
+
this._disabled = false;
|
|
175
|
+
this.onTouchedCallback = () => { };
|
|
176
|
+
this.onChangeCallback = () => { };
|
|
177
|
+
}
|
|
178
|
+
ngAfterViewInit() {
|
|
179
|
+
tinymce.init({
|
|
180
|
+
selector: '#' + this.elementId,
|
|
181
|
+
plugins: ['link', 'paste', 'table', 'image', 'code'],
|
|
182
|
+
language: this.tinyMceLanguageCode,
|
|
183
|
+
base_url: this.baseUrl,
|
|
184
|
+
branding: false,
|
|
185
|
+
setup: editor => {
|
|
186
|
+
editor.on('change keyup', () => {
|
|
187
|
+
const content = editor.getContent();
|
|
188
|
+
this.editorContent = content;
|
|
189
|
+
});
|
|
190
|
+
},
|
|
191
|
+
init_instance_callback: editor => {
|
|
192
|
+
if (editor && this.editorContent) {
|
|
193
|
+
editor.setContent(this.editorContent);
|
|
194
|
+
}
|
|
195
|
+
this.editor = editor;
|
|
196
|
+
this.setDisabledState(this._disabled);
|
|
197
|
+
}
|
|
198
|
+
});
|
|
199
|
+
}
|
|
200
|
+
ngOnDestroy() {
|
|
201
|
+
tinymce.remove(this.editor);
|
|
202
|
+
}
|
|
203
|
+
writeValue(obj) {
|
|
204
|
+
obj = obj || '';
|
|
205
|
+
this.editorContent = obj;
|
|
206
|
+
if (!this.editor) {
|
|
207
|
+
return;
|
|
208
|
+
}
|
|
209
|
+
const tinyMceContent = this.editor.getContent();
|
|
210
|
+
if (tinyMceContent !== obj) {
|
|
211
|
+
this.editor.setContent(obj);
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
registerOnChange(fn) {
|
|
215
|
+
this.onChangeCallback = fn;
|
|
216
|
+
}
|
|
217
|
+
registerOnTouched(fn) {
|
|
218
|
+
this.onTouchedCallback = fn;
|
|
219
|
+
}
|
|
220
|
+
setDisabledState(isDisabled) {
|
|
221
|
+
this._disabled = isDisabled;
|
|
222
|
+
if (!this.editor) {
|
|
223
|
+
return;
|
|
224
|
+
}
|
|
225
|
+
if (isDisabled) {
|
|
226
|
+
this.editor.setMode('readonly');
|
|
227
|
+
}
|
|
228
|
+
else {
|
|
229
|
+
this.editor.setMode('design');
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: TinyMceComponent, deps: [{ token: 'TINYMCE_BASE_URL' }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
233
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.2", type: TinyMceComponent, selector: "dangl-tiny-mce", inputs: { tinyMceLanguageUrl: "tinyMceLanguageUrl", tinyMceLanguageCode: "tinyMceLanguageCode" }, providers: [
|
|
234
|
+
{
|
|
235
|
+
provide: NG_VALUE_ACCESSOR,
|
|
236
|
+
useExisting: forwardRef(() => TinyMceComponent),
|
|
237
|
+
multi: true,
|
|
238
|
+
}
|
|
239
|
+
], ngImport: i0, template: "<textarea id=\"{{ elementId }}\"></textarea>\r\n", styles: [""] }); }
|
|
240
|
+
}
|
|
241
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: TinyMceComponent, decorators: [{
|
|
242
|
+
type: Component,
|
|
243
|
+
args: [{ selector: 'dangl-tiny-mce', providers: [
|
|
244
|
+
{
|
|
245
|
+
provide: NG_VALUE_ACCESSOR,
|
|
246
|
+
useExisting: forwardRef(() => TinyMceComponent),
|
|
247
|
+
multi: true,
|
|
248
|
+
}
|
|
249
|
+
], template: "<textarea id=\"{{ elementId }}\"></textarea>\r\n" }]
|
|
250
|
+
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
251
|
+
type: Inject,
|
|
252
|
+
args: ['TINYMCE_BASE_URL']
|
|
253
|
+
}] }, { type: i0.NgZone }]; }, propDecorators: { tinyMceLanguageUrl: [{
|
|
254
|
+
type: Input
|
|
255
|
+
}], tinyMceLanguageCode: [{
|
|
256
|
+
type: Input
|
|
257
257
|
}] } });
|
|
258
258
|
|
|
259
|
-
class AngularMaterialSharedModule {
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
273
|
-
type: NgModule,
|
|
274
|
-
args: [{
|
|
275
|
-
imports: [
|
|
276
|
-
MatToolbarModule,
|
|
277
|
-
MatIconModule,
|
|
278
|
-
MatButtonModule,
|
|
279
|
-
RouterModule,
|
|
280
|
-
CommonModule
|
|
281
|
-
],
|
|
282
|
-
declarations: [FooterComponent, HeaderComponent, TinyMceComponent],
|
|
283
|
-
exports: [FooterComponent, HeaderComponent, TinyMceComponent]
|
|
284
|
-
}]
|
|
259
|
+
class AngularMaterialSharedModule {
|
|
260
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: AngularMaterialSharedModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
261
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.2", ngImport: i0, type: AngularMaterialSharedModule, declarations: [FooterComponent, HeaderComponent, TinyMceComponent], imports: [MatToolbarModule,
|
|
262
|
+
MatIconModule,
|
|
263
|
+
MatButtonModule,
|
|
264
|
+
RouterModule,
|
|
265
|
+
CommonModule], exports: [FooterComponent, HeaderComponent, TinyMceComponent] }); }
|
|
266
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: AngularMaterialSharedModule, imports: [MatToolbarModule,
|
|
267
|
+
MatIconModule,
|
|
268
|
+
MatButtonModule,
|
|
269
|
+
RouterModule,
|
|
270
|
+
CommonModule] }); }
|
|
271
|
+
}
|
|
272
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: AngularMaterialSharedModule, decorators: [{
|
|
273
|
+
type: NgModule,
|
|
274
|
+
args: [{
|
|
275
|
+
imports: [
|
|
276
|
+
MatToolbarModule,
|
|
277
|
+
MatIconModule,
|
|
278
|
+
MatButtonModule,
|
|
279
|
+
RouterModule,
|
|
280
|
+
CommonModule
|
|
281
|
+
],
|
|
282
|
+
declarations: [FooterComponent, HeaderComponent, TinyMceComponent],
|
|
283
|
+
exports: [FooterComponent, HeaderComponent, TinyMceComponent]
|
|
284
|
+
}]
|
|
285
285
|
}] });
|
|
286
286
|
|
|
287
|
-
/*
|
|
288
|
-
* Public API Surface of angular-material-shared
|
|
287
|
+
/*
|
|
288
|
+
* Public API Surface of angular-material-shared
|
|
289
289
|
*/
|
|
290
290
|
|
|
291
|
-
/**
|
|
292
|
-
* Generated bundle index. Do not edit.
|
|
291
|
+
/**
|
|
292
|
+
* Generated bundle index. Do not edit.
|
|
293
293
|
*/
|
|
294
294
|
|
|
295
295
|
export { AngularMaterialSharedModule, FooterComponent, GuidGenerator, HeaderComponent, TinyMceComponent };
|