@rxap/components 12.0.10 → 13.0.0-next.2
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/_theming.scss +1 -10
- package/esm2020/index.mjs +33 -0
- package/esm2020/lib/button/button.component.mjs +309 -0
- package/esm2020/lib/button/button.component.module.mjs +50 -0
- package/esm2020/lib/confirm/confirm.component.mjs +24 -0
- package/esm2020/lib/confirm/confirm.component.module.mjs +35 -0
- package/esm2020/lib/confirm/confirm.directive.mjs +86 -0
- package/{esm2015/lib/copy-to-clipboard/copy-to-clipboard.component.js → esm2020/lib/copy-to-clipboard/copy-to-clipboard.component.mjs} +5 -10
- package/esm2020/lib/copy-to-clipboard/copy-to-clipboard.component.module.mjs +46 -0
- package/esm2020/lib/copy-to-clipboard-button/copy-to-clipboard-button.component.mjs +30 -0
- package/esm2020/lib/copy-to-clipboard-button/copy-to-clipboard-button.component.module.mjs +34 -0
- package/esm2020/lib/dark-mode-toggle-button/dark-mode-toggle-button.component.mjs +23 -0
- package/esm2020/lib/dark-mode-toggle-button/dark-mode-toggle-button.component.module.mjs +34 -0
- package/esm2020/lib/empty-router-outlet/empty-router-outlet.component.mjs +12 -0
- package/esm2020/lib/empty-router-outlet/empty-router-outlet.component.module.mjs +22 -0
- package/esm2020/lib/json-viewer/json-viewer.component.mjs +172 -0
- package/esm2020/lib/json-viewer/json-viewer.component.module.mjs +22 -0
- package/esm2020/lib/json-viewer/json-viewer.tokens.mjs +24 -0
- package/{esm2015/lib/navigate-back-button/navigate-back-button.component.js → esm2020/lib/navigate-back-button/navigate-back-button.component.mjs} +5 -11
- package/esm2020/lib/navigate-back-button/navigate-back-button.component.module.mjs +30 -0
- package/esm2020/rxap-components.mjs +5 -0
- package/fesm2015/rxap-components.mjs +928 -0
- package/fesm2015/rxap-components.mjs.map +1 -0
- package/{fesm2015/rxap-components.js → fesm2020/rxap-components.mjs} +77 -124
- package/fesm2020/rxap-components.mjs.map +1 -0
- package/package.json +34 -19
- package/src/schematics/ng-add/index.js +1 -1
- package/src/schematics/ng-add/index.js.map +1 -1
- package/bundles/rxap-components.umd.js +0 -1433
- package/bundles/rxap-components.umd.js.map +0 -1
- package/esm2015/index.js +0 -33
- package/esm2015/index.js.map +0 -1
- package/esm2015/lib/button/button.component.js +0 -317
- package/esm2015/lib/button/button.component.js.map +0 -1
- package/esm2015/lib/button/button.component.module.js +0 -50
- package/esm2015/lib/button/button.component.module.js.map +0 -1
- package/esm2015/lib/confirm/confirm.component.js +0 -30
- package/esm2015/lib/confirm/confirm.component.js.map +0 -1
- package/esm2015/lib/confirm/confirm.component.module.js +0 -35
- package/esm2015/lib/confirm/confirm.component.module.js.map +0 -1
- package/esm2015/lib/confirm/confirm.directive.js +0 -87
- package/esm2015/lib/confirm/confirm.directive.js.map +0 -1
- package/esm2015/lib/copy-to-clipboard/copy-to-clipboard.component.js.map +0 -1
- package/esm2015/lib/copy-to-clipboard/copy-to-clipboard.component.module.js +0 -46
- package/esm2015/lib/copy-to-clipboard/copy-to-clipboard.component.module.js.map +0 -1
- package/esm2015/lib/copy-to-clipboard-button/copy-to-clipboard-button.component.js +0 -36
- package/esm2015/lib/copy-to-clipboard-button/copy-to-clipboard-button.component.js.map +0 -1
- package/esm2015/lib/copy-to-clipboard-button/copy-to-clipboard-button.component.module.js +0 -34
- package/esm2015/lib/copy-to-clipboard-button/copy-to-clipboard-button.component.module.js.map +0 -1
- package/esm2015/lib/dark-mode-toggle-button/dark-mode-toggle-button.component.js +0 -29
- package/esm2015/lib/dark-mode-toggle-button/dark-mode-toggle-button.component.js.map +0 -1
- package/esm2015/lib/dark-mode-toggle-button/dark-mode-toggle-button.component.module.js +0 -34
- package/esm2015/lib/dark-mode-toggle-button/dark-mode-toggle-button.component.module.js.map +0 -1
- package/esm2015/lib/empty-router-outlet/empty-router-outlet.component.js +0 -15
- package/esm2015/lib/empty-router-outlet/empty-router-outlet.component.js.map +0 -1
- package/esm2015/lib/empty-router-outlet/empty-router-outlet.component.module.js +0 -22
- package/esm2015/lib/empty-router-outlet/empty-router-outlet.component.module.js.map +0 -1
- package/esm2015/lib/json-viewer/json-viewer.component.js +0 -178
- package/esm2015/lib/json-viewer/json-viewer.component.js.map +0 -1
- package/esm2015/lib/json-viewer/json-viewer.component.module.js +0 -22
- package/esm2015/lib/json-viewer/json-viewer.component.module.js.map +0 -1
- package/esm2015/lib/json-viewer/json-viewer.tokens.js +0 -24
- package/esm2015/lib/json-viewer/json-viewer.tokens.js.map +0 -1
- package/esm2015/lib/navigate-back-button/navigate-back-button.component.js.map +0 -1
- package/esm2015/lib/navigate-back-button/navigate-back-button.component.module.js +0 -30
- package/esm2015/lib/navigate-back-button/navigate-back-button.component.module.js.map +0 -1
- package/esm2015/rxap-components.js +0 -5
- package/esm2015/rxap-components.js.map +0 -1
- package/fesm2015/rxap-components.js.map +0 -1
|
@@ -0,0 +1,928 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { EventEmitter, Component, ChangeDetectionStrategy, Output, ElementRef, Directive, Inject, Input, HostListener, ChangeDetectorRef, INJECTOR, ViewEncapsulation, Optional, HostBinding, NgModule, InjectionToken } from '@angular/core';
|
|
3
|
+
import { __decorate, __metadata } from 'tslib';
|
|
4
|
+
import { IsSvgIcon, IsMaterialIcon, applyContextToFunctionOrConstant, Required, isPromiseLike, clone } from '@rxap/utilities';
|
|
5
|
+
import * as i1$1 from '@angular/cdk/overlay';
|
|
6
|
+
import { Overlay, OverlayModule } from '@angular/cdk/overlay';
|
|
7
|
+
import * as i1 from '@angular/material/button';
|
|
8
|
+
import { MatButton, MatButtonModule } from '@angular/material/button';
|
|
9
|
+
import * as i8 from '@angular/cdk/a11y';
|
|
10
|
+
import { FocusMonitor } from '@angular/cdk/a11y';
|
|
11
|
+
import { ANIMATION_MODULE_TYPE } from '@angular/platform-browser/animations';
|
|
12
|
+
import * as i2 from '@angular/material/icon';
|
|
13
|
+
import { MatIconModule } from '@angular/material/icon';
|
|
14
|
+
import * as i3 from '@angular/flex-layout';
|
|
15
|
+
import { FlexModule, FlexLayoutModule } from '@angular/flex-layout';
|
|
16
|
+
import { ComponentPortal } from '@angular/cdk/portal';
|
|
17
|
+
import { take, tap } from 'rxjs/operators';
|
|
18
|
+
import { Subscription, Observable } from 'rxjs';
|
|
19
|
+
import { ButtonTypes, SubscriptionHandler, isTeardownLogic } from '@rxap/utilities/rxjs';
|
|
20
|
+
import * as i2$1 from '@angular/material/tooltip';
|
|
21
|
+
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
22
|
+
import * as i1$2 from '@angular/common';
|
|
23
|
+
import { CommonModule } from '@angular/common';
|
|
24
|
+
import * as i4 from '@angular/material/core';
|
|
25
|
+
import { MatRippleModule, ErrorStateMatcher } from '@angular/material/core';
|
|
26
|
+
import * as i6 from '@rxap/material-directives/icon';
|
|
27
|
+
import { IconDirectiveModule } from '@rxap/material-directives/icon';
|
|
28
|
+
import * as i1$3 from '@angular/router';
|
|
29
|
+
import { RouterModule } from '@angular/router';
|
|
30
|
+
import * as i4$1 from '@angular/material/snack-bar';
|
|
31
|
+
import { MatSnackBar, MatSnackBarModule } from '@angular/material/snack-bar';
|
|
32
|
+
import * as i3$1 from '@angular/cdk/clipboard';
|
|
33
|
+
import { ClipboardModule } from '@angular/cdk/clipboard';
|
|
34
|
+
import * as i5 from '@rxap/services';
|
|
35
|
+
import { ThemeService } from '@rxap/services';
|
|
36
|
+
import * as i3$2 from '@rxap/directives';
|
|
37
|
+
import { StopPropagationDirectiveModule } from '@rxap/directives';
|
|
38
|
+
|
|
39
|
+
class ConfirmComponent {
|
|
40
|
+
constructor() {
|
|
41
|
+
this.confirmed = new EventEmitter();
|
|
42
|
+
this.unconfirmed = new EventEmitter();
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
ConfirmComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ConfirmComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
46
|
+
ConfirmComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", type: ConfirmComponent, selector: "rxap-confirm", outputs: { confirmed: "confirmed", unconfirmed: "unconfirmed" }, host: { classAttribute: "rxap-confirm" }, ngImport: i0, template: "<div class=\"container mat-elevation-z2\" fxLayout=\"row\" fxLayoutGap=\"4px\">\n <button type=\"button\" (click)=\"confirmed.emit()\" class=\"accept\" mat-icon-button>\n <mat-icon>done</mat-icon>\n </button>\n <button type=\"button\" (click)=\"unconfirmed.emit()\" class=\"decline\" mat-icon-button>\n <mat-icon>clear</mat-icon>\n </button>\n</div>\n", styles: [".container{border-radius:8px;padding:4px;background-color:#fff}.container .accept{color:#73be69}.container .decline{color:#cc4933}\n"], components: [{ type: i1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: i3.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i3.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
47
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ConfirmComponent, decorators: [{
|
|
48
|
+
type: Component,
|
|
49
|
+
args: [{ selector: 'rxap-confirm', host: {
|
|
50
|
+
class: 'rxap-confirm'
|
|
51
|
+
}, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"container mat-elevation-z2\" fxLayout=\"row\" fxLayoutGap=\"4px\">\n <button type=\"button\" (click)=\"confirmed.emit()\" class=\"accept\" mat-icon-button>\n <mat-icon>done</mat-icon>\n </button>\n <button type=\"button\" (click)=\"unconfirmed.emit()\" class=\"decline\" mat-icon-button>\n <mat-icon>clear</mat-icon>\n </button>\n</div>\n", styles: [".container{border-radius:8px;padding:4px;background-color:#fff}.container .accept{color:#73be69}.container .decline{color:#cc4933}\n"] }]
|
|
52
|
+
}], propDecorators: { confirmed: [{
|
|
53
|
+
type: Output
|
|
54
|
+
}], unconfirmed: [{
|
|
55
|
+
type: Output
|
|
56
|
+
}] } });
|
|
57
|
+
|
|
58
|
+
class ConfirmDirective {
|
|
59
|
+
constructor(overlay, elementRef) {
|
|
60
|
+
this.overlay = overlay;
|
|
61
|
+
this.elementRef = elementRef;
|
|
62
|
+
this.confirmed = new EventEmitter();
|
|
63
|
+
this.unconfirmed = new EventEmitter();
|
|
64
|
+
this.subscription = null;
|
|
65
|
+
}
|
|
66
|
+
// use a set input to allow auto import detection if the eventValue
|
|
67
|
+
// is not set
|
|
68
|
+
set eventValue(value) {
|
|
69
|
+
if (value !== '') {
|
|
70
|
+
this._eventValue = value;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
onClick() {
|
|
74
|
+
if (this.subscription) {
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
this.overlayRef = this.overlay.create({
|
|
78
|
+
scrollStrategy: this.overlay.scrollStrategies.close(),
|
|
79
|
+
positionStrategy: this.overlay
|
|
80
|
+
.position()
|
|
81
|
+
.flexibleConnectedTo(this.elementRef.nativeElement)
|
|
82
|
+
.withPositions([
|
|
83
|
+
{
|
|
84
|
+
originX: 'start',
|
|
85
|
+
originY: 'bottom',
|
|
86
|
+
overlayX: 'start',
|
|
87
|
+
overlayY: 'top',
|
|
88
|
+
},
|
|
89
|
+
])
|
|
90
|
+
.withDefaultOffsetY(10),
|
|
91
|
+
});
|
|
92
|
+
const componentPortal = new ComponentPortal(ConfirmComponent);
|
|
93
|
+
const componentRef = this.overlayRef.attach(componentPortal);
|
|
94
|
+
this.subscription = new Subscription();
|
|
95
|
+
this.subscription.add(componentRef.instance.confirmed
|
|
96
|
+
.pipe(take(1), tap(() => this.confirmed.emit(this._eventValue)), tap(() => { var _a; return (_a = this.overlayRef) === null || _a === void 0 ? void 0 : _a.dispose(); }), tap(() => (this.subscription = null)), tap(() => { var _a; return (_a = this.subscription) === null || _a === void 0 ? void 0 : _a.unsubscribe(); }))
|
|
97
|
+
.subscribe());
|
|
98
|
+
this.subscription.add(componentRef.instance.unconfirmed
|
|
99
|
+
.pipe(take(1), tap(() => this.unconfirmed.emit(this._eventValue)), tap(() => { var _a; return (_a = this.overlayRef) === null || _a === void 0 ? void 0 : _a.dispose(); }), tap(() => (this.subscription = null)), tap(() => { var _a; return (_a = this.subscription) === null || _a === void 0 ? void 0 : _a.unsubscribe(); }))
|
|
100
|
+
.subscribe());
|
|
101
|
+
this.subscription.add(this.overlayRef
|
|
102
|
+
.detachments()
|
|
103
|
+
.pipe(take(1), tap(() => (this.subscription = null)), tap(() => { var _a; return (_a = this.subscription) === null || _a === void 0 ? void 0 : _a.unsubscribe(); }))
|
|
104
|
+
.subscribe());
|
|
105
|
+
}
|
|
106
|
+
ngOnDestroy() {
|
|
107
|
+
var _a, _b;
|
|
108
|
+
(_a = this.subscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
|
|
109
|
+
(_b = this.overlayRef) === null || _b === void 0 ? void 0 : _b.dispose();
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
ConfirmDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ConfirmDirective, deps: [{ token: Overlay }, { token: ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
113
|
+
ConfirmDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.3", type: ConfirmDirective, selector: "[rxapConfirm]", inputs: { eventValue: ["rxapConfirm", "eventValue"] }, outputs: { confirmed: "confirmed", unconfirmed: "unconfirmed" }, host: { listeners: { "click": "onClick()" } }, ngImport: i0 });
|
|
114
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ConfirmDirective, decorators: [{
|
|
115
|
+
type: Directive,
|
|
116
|
+
args: [{
|
|
117
|
+
selector: '[rxapConfirm]',
|
|
118
|
+
}]
|
|
119
|
+
}], ctorParameters: function () {
|
|
120
|
+
return [{ type: i1$1.Overlay, decorators: [{
|
|
121
|
+
type: Inject,
|
|
122
|
+
args: [Overlay]
|
|
123
|
+
}] }, { type: i0.ElementRef, decorators: [{
|
|
124
|
+
type: Inject,
|
|
125
|
+
args: [ElementRef]
|
|
126
|
+
}] }];
|
|
127
|
+
}, propDecorators: { eventValue: [{
|
|
128
|
+
type: Input,
|
|
129
|
+
args: ['rxapConfirm']
|
|
130
|
+
}], confirmed: [{
|
|
131
|
+
type: Output
|
|
132
|
+
}], unconfirmed: [{
|
|
133
|
+
type: Output
|
|
134
|
+
}], onClick: [{
|
|
135
|
+
type: HostListener,
|
|
136
|
+
args: ['click']
|
|
137
|
+
}] } });
|
|
138
|
+
|
|
139
|
+
const DEFAULT_ROUND_BUTTON_COLOR = 'accent';
|
|
140
|
+
const BUTTON_HOST_ATTRIBUTES = [
|
|
141
|
+
'mat-button',
|
|
142
|
+
'mat-flat-button',
|
|
143
|
+
'mat-icon-button',
|
|
144
|
+
'mat-raised-button',
|
|
145
|
+
'mat-stroked-button',
|
|
146
|
+
'mat-mini-fab',
|
|
147
|
+
'mat-fab',
|
|
148
|
+
];
|
|
149
|
+
class ButtonComponent extends MatButton {
|
|
150
|
+
constructor(cdr, overlay, injector, elementRef, _focusMonitor, _animationMode) {
|
|
151
|
+
super(elementRef, _focusMonitor, _animationMode);
|
|
152
|
+
this.cdr = cdr;
|
|
153
|
+
this.overlay = overlay;
|
|
154
|
+
this.injector = injector;
|
|
155
|
+
this.elementRef = elementRef;
|
|
156
|
+
this.action = null;
|
|
157
|
+
this.icon = null;
|
|
158
|
+
this.tooltip = '';
|
|
159
|
+
this.tooltipDisabled = false;
|
|
160
|
+
this.label = '';
|
|
161
|
+
this.show = true;
|
|
162
|
+
this.confirm = false;
|
|
163
|
+
this.confirmed$ = new EventEmitter();
|
|
164
|
+
this.unconfirmed$ = new EventEmitter();
|
|
165
|
+
this.types = ButtonTypes;
|
|
166
|
+
this._subscription = new Subscription();
|
|
167
|
+
/** Whether the button is icon button. */
|
|
168
|
+
this.isIconButton = this._hasHostAttributes('mat-icon-button');
|
|
169
|
+
this.isRoundButton = this._hasHostAttributes('mat-fab', 'mat-mini-fab');
|
|
170
|
+
}
|
|
171
|
+
get svgIcon() {
|
|
172
|
+
if (this.icon) {
|
|
173
|
+
return IsSvgIcon(this.icon);
|
|
174
|
+
}
|
|
175
|
+
return false;
|
|
176
|
+
}
|
|
177
|
+
get materialIcon() {
|
|
178
|
+
if (this.icon) {
|
|
179
|
+
return IsMaterialIcon(this.icon);
|
|
180
|
+
}
|
|
181
|
+
return false;
|
|
182
|
+
}
|
|
183
|
+
get iconName() {
|
|
184
|
+
if (this.icon) {
|
|
185
|
+
if (IsSvgIcon(this.icon)) {
|
|
186
|
+
return this.icon.svgIcon;
|
|
187
|
+
}
|
|
188
|
+
else {
|
|
189
|
+
return this.icon.icon;
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
return null;
|
|
193
|
+
}
|
|
194
|
+
get name() {
|
|
195
|
+
return this.definition.name;
|
|
196
|
+
}
|
|
197
|
+
contextChange(context = []) {
|
|
198
|
+
this.disabled = !!applyContextToFunctionOrConstant(this.definition.disabled, context, this.disabled);
|
|
199
|
+
this.icon = applyContextToFunctionOrConstant(this.definition.icon, context, this.icon);
|
|
200
|
+
this.label = applyContextToFunctionOrConstant(this.definition.label, context, this.label);
|
|
201
|
+
this.tooltip = applyContextToFunctionOrConstant(this.definition.tooltip, context, this.tooltip);
|
|
202
|
+
this.tooltipDisabled = !!applyContextToFunctionOrConstant(this.definition.tooltipDisabled, context, this.tooltipDisabled);
|
|
203
|
+
this.confirm = applyContextToFunctionOrConstant(this.definition.confirm, context, this.confirm);
|
|
204
|
+
this.color = applyContextToFunctionOrConstant(this.definition.theme, context, this.color);
|
|
205
|
+
this.action = applyContextToFunctionOrConstant(this.definition.action, context, this.action);
|
|
206
|
+
if (this.definition.hide) {
|
|
207
|
+
this.show = !applyContextToFunctionOrConstant(this.definition.hide, context, this.show);
|
|
208
|
+
}
|
|
209
|
+
if (this.definition.show) {
|
|
210
|
+
this.show = !!applyContextToFunctionOrConstant(this.definition.show, context, this.show);
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
contextAllChange(contextAll = []) {
|
|
214
|
+
this.cdr.detach();
|
|
215
|
+
this.show = false;
|
|
216
|
+
this.disabled = true;
|
|
217
|
+
if (contextAll.length) {
|
|
218
|
+
this.contextChange(contextAll[0]);
|
|
219
|
+
}
|
|
220
|
+
for (const context of contextAll) {
|
|
221
|
+
this.disabled = !!applyContextToFunctionOrConstant(this.definition.disabled, context, this.disabled);
|
|
222
|
+
if (this.definition.hide) {
|
|
223
|
+
this.show = !applyContextToFunctionOrConstant(this.definition.hide, context, this.show);
|
|
224
|
+
}
|
|
225
|
+
if (this.definition.show) {
|
|
226
|
+
this.show = !!applyContextToFunctionOrConstant(this.definition.show, context, this.show);
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
this.cdr.reattach();
|
|
230
|
+
}
|
|
231
|
+
ngOnChanges(changes) {
|
|
232
|
+
if (changes.context && !changes.context.firstChange) {
|
|
233
|
+
this.contextChange(changes.context.currentValue);
|
|
234
|
+
}
|
|
235
|
+
if (changes.contextAll && !changes.contextAll.firstChange) {
|
|
236
|
+
this.contextAllChange(changes.contextAll.currentValue);
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
ngOnInit() {
|
|
240
|
+
if (this.context) {
|
|
241
|
+
this.contextChange(this.context);
|
|
242
|
+
}
|
|
243
|
+
if (this.contextAll) {
|
|
244
|
+
this.contextAllChange(this.contextAll);
|
|
245
|
+
}
|
|
246
|
+
if (!this.context && !this.contextAll) {
|
|
247
|
+
this.contextChange();
|
|
248
|
+
}
|
|
249
|
+
this.updateClasses();
|
|
250
|
+
this._confirmDirective = new ConfirmDirective(this.overlay, this.elementRef);
|
|
251
|
+
this._subscription.add(this._confirmDirective.unconfirmed.subscribe(this.unconfirmed$));
|
|
252
|
+
this._subscription.add(this._confirmDirective.confirmed.subscribe(this.confirm));
|
|
253
|
+
}
|
|
254
|
+
onClick() {
|
|
255
|
+
if (this.confirm) {
|
|
256
|
+
this._confirmDirective.onClick();
|
|
257
|
+
}
|
|
258
|
+
const actions = this.getActions();
|
|
259
|
+
if (actions.length) {
|
|
260
|
+
actions.forEach((action) => {
|
|
261
|
+
this.emitClick(action);
|
|
262
|
+
});
|
|
263
|
+
}
|
|
264
|
+
else {
|
|
265
|
+
this.emitClick(null);
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
emitClick($event) {
|
|
269
|
+
if (this.definition.click$) {
|
|
270
|
+
this.definition.click$.next($event !== null && $event !== void 0 ? $event : null);
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
getActions() {
|
|
274
|
+
if (this.contextAll && this.contextAll.length) {
|
|
275
|
+
return this.contextAll
|
|
276
|
+
.map((context) => applyContextToFunctionOrConstant(this.definition.action, context, null))
|
|
277
|
+
.filter(Boolean);
|
|
278
|
+
}
|
|
279
|
+
else if (this.action) {
|
|
280
|
+
return [this.action];
|
|
281
|
+
}
|
|
282
|
+
return [];
|
|
283
|
+
}
|
|
284
|
+
_hasHostAttributes(...attributes) {
|
|
285
|
+
const descriptor = Object.getOwnPropertyDescriptor(this, 'definition');
|
|
286
|
+
const hasDefinition = !!descriptor && descriptor.hasOwnProperty('value');
|
|
287
|
+
if (hasDefinition) {
|
|
288
|
+
for (const attribute of attributes) {
|
|
289
|
+
switch (attribute) {
|
|
290
|
+
case 'mat-icon-button':
|
|
291
|
+
if (this.definition.type === ButtonTypes.Icon) {
|
|
292
|
+
return true;
|
|
293
|
+
}
|
|
294
|
+
break;
|
|
295
|
+
case 'mat-fab':
|
|
296
|
+
if (this.definition.type === ButtonTypes.Fab) {
|
|
297
|
+
return true;
|
|
298
|
+
}
|
|
299
|
+
break;
|
|
300
|
+
case 'mat-mini-fab':
|
|
301
|
+
if (this.definition.type === ButtonTypes.MiniFab) {
|
|
302
|
+
return true;
|
|
303
|
+
}
|
|
304
|
+
break;
|
|
305
|
+
case 'mat-raised-button':
|
|
306
|
+
if (this.definition.type === ButtonTypes.Raised) {
|
|
307
|
+
return true;
|
|
308
|
+
}
|
|
309
|
+
break;
|
|
310
|
+
// TODO : add support for all mat button types
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
return super._hasHostAttributes(...attributes);
|
|
315
|
+
}
|
|
316
|
+
ngOnDestroy() {
|
|
317
|
+
super.ngOnDestroy();
|
|
318
|
+
this._confirmDirective.ngOnDestroy();
|
|
319
|
+
this._subscription.unsubscribe();
|
|
320
|
+
}
|
|
321
|
+
updateClasses() {
|
|
322
|
+
this.isRoundButton = this._hasHostAttributes('mat-fab', 'mat-mini-fab');
|
|
323
|
+
this.isIconButton = this._hasHostAttributes('mat-icon-button');
|
|
324
|
+
for (const attr of BUTTON_HOST_ATTRIBUTES) {
|
|
325
|
+
if (this._hasHostAttributes(attr)) {
|
|
326
|
+
this._getHostElement().classList.add(attr);
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
if (this.isRoundButton) {
|
|
330
|
+
this.color = DEFAULT_ROUND_BUTTON_COLOR;
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
ButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ButtonComponent, deps: [{ token: ChangeDetectorRef }, { token: Overlay }, { token: INJECTOR }, { token: ElementRef }, { token: FocusMonitor }, { token: ANIMATION_MODULE_TYPE, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
335
|
+
ButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", type: ButtonComponent, selector: "button[rxap-button]", inputs: { disabled: "disabled", disableRipple: "disableRipple", color: "color", context: "context", contextAll: "contextAll", action: "action", definition: ["rxap-button", "definition"], icon: "icon", tooltip: "tooltip", tooltipDisabled: "tooltipDisabled", label: "label", show: "show", confirm: "confirm" }, outputs: { confirmed$: "confirmed", unconfirmed$: "unconfirmed" }, host: { listeners: { "click": "onClick()" }, properties: { "attr.disabled": "disabled || null", "class._mat-animation-noopable": "_animationMode === \"NoopAnimations\"", "attr.data-svg-icon": "this.svgIcon", "attr.data-material-icon": "this.materialIcon", "attr.data-icon": "this.iconName", "attr.data-name": "this.name", "attr.data-tooltip": "this.tooltip", "attr.data-tooltip-disabled": "this.tooltipDisabled", "attr.data-disabled": "this.label", "attr.data-label": "this.label", "attr.data-show": "this.show", "attr.data-confirm": "this.confirm" }, classAttribute: "mat-focus-indicator" }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<span [matTooltipDisabled]=\"tooltipDisabled\" [matTooltip]=\"tooltip\" class=\"mat-button-wrapper\">\n <ng-template\n [ngIfElse]=\"labelOrIconTemplate\"\n [ngIfThen]=\"labelWithIconTemplate\"\n [ngIf]=\"icon && label\">\n </ng-template>\n</span>\n<div [class.mat-button-ripple-round]=\"isRoundButton || isIconButton\" [matRippleCentered]=\"isIconButton\"\n [matRippleDisabled]=\"_isRippleDisabled()\"\n [matRippleTrigger]=\"_getHostElement()\"\n class=\"mat-button-ripple\"\n matRipple></div>\n<div class=\"mat-button-focus-overlay\"></div>\n\n<ng-template #labelTemplate>{{label}}</ng-template>\n<ng-template #labelWithIconTemplate>\n <span fxLayout=\"row\" fxLayoutAlign=\"start center\" fxLayoutGap=\".8rem\">\n <mat-icon [inline]=\"true\" [rxapIcon]=\"icon\" fxFlex=\"nogrow\"></mat-icon>\n <span fxFlex=\"nogrow\">{{label}}</span>\n </span>\n</ng-template>\n<ng-template #iconTemplate>\n <mat-icon [rxapIcon]=\"icon\"></mat-icon>\n</ng-template>\n<ng-template #labelOrIconTemplate>\n <ng-template [ngIfElse]=\"labelTemplate\"\n [ngIfThen]=\"iconTemplate\"\n [ngIf]=\"icon\">\n </ng-template>\n</ng-template>\n", styles: [".mat-button .mat-button-focus-overlay,.mat-icon-button .mat-button-focus-overlay{opacity:0}.mat-button:hover:not(.mat-button-disabled) .mat-button-focus-overlay,.mat-stroked-button:hover:not(.mat-button-disabled) .mat-button-focus-overlay{opacity:.04}@media (hover: none){.mat-button:hover:not(.mat-button-disabled) .mat-button-focus-overlay,.mat-stroked-button:hover:not(.mat-button-disabled) .mat-button-focus-overlay{opacity:0}}.mat-button,.mat-icon-button,.mat-stroked-button,.mat-flat-button{box-sizing:border-box;position:relative;-webkit-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:transparent;display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:64px;line-height:36px;padding:0 16px;border-radius:4px;overflow:visible}.mat-button::-moz-focus-inner,.mat-icon-button::-moz-focus-inner,.mat-stroked-button::-moz-focus-inner,.mat-flat-button::-moz-focus-inner{border:0}.mat-button.mat-button-disabled,.mat-icon-button.mat-button-disabled,.mat-stroked-button.mat-button-disabled,.mat-flat-button.mat-button-disabled{cursor:default}.mat-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-button.cdk-program-focused .mat-button-focus-overlay,.mat-icon-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-icon-button.cdk-program-focused .mat-button-focus-overlay,.mat-stroked-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-stroked-button.cdk-program-focused .mat-button-focus-overlay,.mat-flat-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-flat-button.cdk-program-focused .mat-button-focus-overlay{opacity:.12}.mat-button::-moz-focus-inner,.mat-icon-button::-moz-focus-inner,.mat-stroked-button::-moz-focus-inner,.mat-flat-button::-moz-focus-inner{border:0}.mat-raised-button{box-sizing:border-box;position:relative;-webkit-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:transparent;display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:64px;line-height:36px;padding:0 16px;border-radius:4px;overflow:visible;transform:translate(0);transition:background .4s cubic-bezier(.25,.8,.25,1),box-shadow .28s cubic-bezier(.4,0,.2,1)}.mat-raised-button::-moz-focus-inner{border:0}.mat-raised-button.mat-button-disabled{cursor:default}.mat-raised-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-raised-button.cdk-program-focused .mat-button-focus-overlay{opacity:.12}.mat-raised-button::-moz-focus-inner{border:0}._mat-animation-noopable.mat-raised-button{transition:none;animation:none}.mat-stroked-button{border:1px solid currentColor;padding:0 15px;line-height:34px}.mat-stroked-button .mat-button-ripple.mat-ripple,.mat-stroked-button .mat-button-focus-overlay{top:-1px;left:-1px;right:-1px;bottom:-1px}.mat-fab{box-sizing:border-box;position:relative;-webkit-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:transparent;display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:64px;line-height:36px;overflow:visible;transform:translate(0);transition:background .4s cubic-bezier(.25,.8,.25,1),box-shadow .28s cubic-bezier(.4,0,.2,1);min-width:0;border-radius:50%;width:56px;height:56px;padding:0;flex-shrink:0}.mat-fab::-moz-focus-inner{border:0}.mat-fab.mat-button-disabled{cursor:default}.mat-fab.cdk-keyboard-focused .mat-button-focus-overlay,.mat-fab.cdk-program-focused .mat-button-focus-overlay{opacity:.12}.mat-fab::-moz-focus-inner{border:0}._mat-animation-noopable.mat-fab{transition:none;animation:none}.mat-fab .mat-button-wrapper{padding:16px 0;display:inline-block;line-height:24px}.mat-mini-fab{box-sizing:border-box;position:relative;-webkit-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:transparent;display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:64px;line-height:36px;overflow:visible;transform:translate(0);transition:background .4s cubic-bezier(.25,.8,.25,1),box-shadow .28s cubic-bezier(.4,0,.2,1);min-width:0;border-radius:50%;width:40px;height:40px;padding:0;flex-shrink:0}.mat-mini-fab.mat-button-disabled{cursor:default}.mat-mini-fab.cdk-keyboard-focused .mat-button-focus-overlay,.mat-mini-fab.cdk-program-focused .mat-button-focus-overlay{opacity:.12}.mat-mini-fab::-moz-focus-inner{border:0}._mat-animation-noopable.mat-mini-fab{transition:none;animation:none}.mat-mini-fab .mat-button-wrapper{padding:8px 0;display:inline-block;line-height:24px}.mat-icon-button{padding:0;min-width:0;width:40px;height:40px;flex-shrink:0;line-height:40px;border-radius:50%}.mat-icon-button i,.mat-icon-button .mat-icon{line-height:24px}.mat-button-ripple.mat-ripple,.mat-button-focus-overlay{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-button-ripple.mat-ripple:not(:empty){transform:translateZ(0)}.mat-button-focus-overlay{opacity:0;transition:opacity .2s cubic-bezier(.35,0,.25,1),background-color .2s cubic-bezier(.35,0,.25,1)}._mat-animation-noopable .mat-button-focus-overlay{transition:none}.mat-button-ripple-round{border-radius:50%;z-index:1}.mat-button .mat-button-wrapper>*,.mat-flat-button .mat-button-wrapper>*,.mat-stroked-button .mat-button-wrapper>*,.mat-raised-button .mat-button-wrapper>*,.mat-icon-button .mat-button-wrapper>*,.mat-fab .mat-button-wrapper>*,.mat-mini-fab .mat-button-wrapper>*{vertical-align:middle}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button{display:inline-flex;justify-content:center;align-items:center;font-size:inherit;width:2.5em;height:2.5em}.cdk-high-contrast-active .mat-button,.cdk-high-contrast-active .mat-flat-button,.cdk-high-contrast-active .mat-raised-button,.cdk-high-contrast-active .mat-icon-button,.cdk-high-contrast-active .mat-fab,.cdk-high-contrast-active .mat-mini-fab{outline:solid 1px}.cdk-high-contrast-active .mat-button-base.cdk-keyboard-focused,.cdk-high-contrast-active .mat-button-base.cdk-program-focused{outline:solid 3px}.inline.mat-icon-button{width:inherit;height:inherit;padding:.6rem}.mat-icon-button{line-height:initial}\n"], components: [{ type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: i2$1.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4.MatRipple, selector: "[mat-ripple], [matRipple]", inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"], exportAs: ["matRipple"] }, { type: i3.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i3.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { type: i3.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { type: i6.IconDirective, selector: "mat-icon[rxapIcon]", inputs: ["rxapIcon"] }, { type: i3.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
336
|
+
__decorate([
|
|
337
|
+
Required,
|
|
338
|
+
__metadata("design:type", Object)
|
|
339
|
+
], ButtonComponent.prototype, "definition", void 0);
|
|
340
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ButtonComponent, decorators: [{
|
|
341
|
+
type: Component,
|
|
342
|
+
args: [{ selector: 'button[rxap-button]', inputs: ['disabled', 'disableRipple', 'color'], host: {
|
|
343
|
+
'[attr.disabled]': 'disabled || null',
|
|
344
|
+
'[class._mat-animation-noopable]': '_animationMode === "NoopAnimations"',
|
|
345
|
+
class: 'mat-focus-indicator',
|
|
346
|
+
}, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<span [matTooltipDisabled]=\"tooltipDisabled\" [matTooltip]=\"tooltip\" class=\"mat-button-wrapper\">\n <ng-template\n [ngIfElse]=\"labelOrIconTemplate\"\n [ngIfThen]=\"labelWithIconTemplate\"\n [ngIf]=\"icon && label\">\n </ng-template>\n</span>\n<div [class.mat-button-ripple-round]=\"isRoundButton || isIconButton\" [matRippleCentered]=\"isIconButton\"\n [matRippleDisabled]=\"_isRippleDisabled()\"\n [matRippleTrigger]=\"_getHostElement()\"\n class=\"mat-button-ripple\"\n matRipple></div>\n<div class=\"mat-button-focus-overlay\"></div>\n\n<ng-template #labelTemplate>{{label}}</ng-template>\n<ng-template #labelWithIconTemplate>\n <span fxLayout=\"row\" fxLayoutAlign=\"start center\" fxLayoutGap=\".8rem\">\n <mat-icon [inline]=\"true\" [rxapIcon]=\"icon\" fxFlex=\"nogrow\"></mat-icon>\n <span fxFlex=\"nogrow\">{{label}}</span>\n </span>\n</ng-template>\n<ng-template #iconTemplate>\n <mat-icon [rxapIcon]=\"icon\"></mat-icon>\n</ng-template>\n<ng-template #labelOrIconTemplate>\n <ng-template [ngIfElse]=\"labelTemplate\"\n [ngIfThen]=\"iconTemplate\"\n [ngIf]=\"icon\">\n </ng-template>\n</ng-template>\n", styles: [".mat-button .mat-button-focus-overlay,.mat-icon-button .mat-button-focus-overlay{opacity:0}.mat-button:hover:not(.mat-button-disabled) .mat-button-focus-overlay,.mat-stroked-button:hover:not(.mat-button-disabled) .mat-button-focus-overlay{opacity:.04}@media (hover: none){.mat-button:hover:not(.mat-button-disabled) .mat-button-focus-overlay,.mat-stroked-button:hover:not(.mat-button-disabled) .mat-button-focus-overlay{opacity:0}}.mat-button,.mat-icon-button,.mat-stroked-button,.mat-flat-button{box-sizing:border-box;position:relative;-webkit-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:transparent;display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:64px;line-height:36px;padding:0 16px;border-radius:4px;overflow:visible}.mat-button::-moz-focus-inner,.mat-icon-button::-moz-focus-inner,.mat-stroked-button::-moz-focus-inner,.mat-flat-button::-moz-focus-inner{border:0}.mat-button.mat-button-disabled,.mat-icon-button.mat-button-disabled,.mat-stroked-button.mat-button-disabled,.mat-flat-button.mat-button-disabled{cursor:default}.mat-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-button.cdk-program-focused .mat-button-focus-overlay,.mat-icon-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-icon-button.cdk-program-focused .mat-button-focus-overlay,.mat-stroked-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-stroked-button.cdk-program-focused .mat-button-focus-overlay,.mat-flat-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-flat-button.cdk-program-focused .mat-button-focus-overlay{opacity:.12}.mat-button::-moz-focus-inner,.mat-icon-button::-moz-focus-inner,.mat-stroked-button::-moz-focus-inner,.mat-flat-button::-moz-focus-inner{border:0}.mat-raised-button{box-sizing:border-box;position:relative;-webkit-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:transparent;display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:64px;line-height:36px;padding:0 16px;border-radius:4px;overflow:visible;transform:translate(0);transition:background .4s cubic-bezier(.25,.8,.25,1),box-shadow .28s cubic-bezier(.4,0,.2,1)}.mat-raised-button::-moz-focus-inner{border:0}.mat-raised-button.mat-button-disabled{cursor:default}.mat-raised-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-raised-button.cdk-program-focused .mat-button-focus-overlay{opacity:.12}.mat-raised-button::-moz-focus-inner{border:0}._mat-animation-noopable.mat-raised-button{transition:none;animation:none}.mat-stroked-button{border:1px solid currentColor;padding:0 15px;line-height:34px}.mat-stroked-button .mat-button-ripple.mat-ripple,.mat-stroked-button .mat-button-focus-overlay{top:-1px;left:-1px;right:-1px;bottom:-1px}.mat-fab{box-sizing:border-box;position:relative;-webkit-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:transparent;display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:64px;line-height:36px;overflow:visible;transform:translate(0);transition:background .4s cubic-bezier(.25,.8,.25,1),box-shadow .28s cubic-bezier(.4,0,.2,1);min-width:0;border-radius:50%;width:56px;height:56px;padding:0;flex-shrink:0}.mat-fab::-moz-focus-inner{border:0}.mat-fab.mat-button-disabled{cursor:default}.mat-fab.cdk-keyboard-focused .mat-button-focus-overlay,.mat-fab.cdk-program-focused .mat-button-focus-overlay{opacity:.12}.mat-fab::-moz-focus-inner{border:0}._mat-animation-noopable.mat-fab{transition:none;animation:none}.mat-fab .mat-button-wrapper{padding:16px 0;display:inline-block;line-height:24px}.mat-mini-fab{box-sizing:border-box;position:relative;-webkit-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:transparent;display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:64px;line-height:36px;overflow:visible;transform:translate(0);transition:background .4s cubic-bezier(.25,.8,.25,1),box-shadow .28s cubic-bezier(.4,0,.2,1);min-width:0;border-radius:50%;width:40px;height:40px;padding:0;flex-shrink:0}.mat-mini-fab.mat-button-disabled{cursor:default}.mat-mini-fab.cdk-keyboard-focused .mat-button-focus-overlay,.mat-mini-fab.cdk-program-focused .mat-button-focus-overlay{opacity:.12}.mat-mini-fab::-moz-focus-inner{border:0}._mat-animation-noopable.mat-mini-fab{transition:none;animation:none}.mat-mini-fab .mat-button-wrapper{padding:8px 0;display:inline-block;line-height:24px}.mat-icon-button{padding:0;min-width:0;width:40px;height:40px;flex-shrink:0;line-height:40px;border-radius:50%}.mat-icon-button i,.mat-icon-button .mat-icon{line-height:24px}.mat-button-ripple.mat-ripple,.mat-button-focus-overlay{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-button-ripple.mat-ripple:not(:empty){transform:translateZ(0)}.mat-button-focus-overlay{opacity:0;transition:opacity .2s cubic-bezier(.35,0,.25,1),background-color .2s cubic-bezier(.35,0,.25,1)}._mat-animation-noopable .mat-button-focus-overlay{transition:none}.mat-button-ripple-round{border-radius:50%;z-index:1}.mat-button .mat-button-wrapper>*,.mat-flat-button .mat-button-wrapper>*,.mat-stroked-button .mat-button-wrapper>*,.mat-raised-button .mat-button-wrapper>*,.mat-icon-button .mat-button-wrapper>*,.mat-fab .mat-button-wrapper>*,.mat-mini-fab .mat-button-wrapper>*{vertical-align:middle}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button{display:inline-flex;justify-content:center;align-items:center;font-size:inherit;width:2.5em;height:2.5em}.cdk-high-contrast-active .mat-button,.cdk-high-contrast-active .mat-flat-button,.cdk-high-contrast-active .mat-raised-button,.cdk-high-contrast-active .mat-icon-button,.cdk-high-contrast-active .mat-fab,.cdk-high-contrast-active .mat-mini-fab{outline:solid 1px}.cdk-high-contrast-active .mat-button-base.cdk-keyboard-focused,.cdk-high-contrast-active .mat-button-base.cdk-program-focused{outline:solid 3px}.inline.mat-icon-button{width:inherit;height:inherit;padding:.6rem}.mat-icon-button{line-height:initial}\n"] }]
|
|
347
|
+
}], ctorParameters: function () {
|
|
348
|
+
return [{ type: i0.ChangeDetectorRef, decorators: [{
|
|
349
|
+
type: Inject,
|
|
350
|
+
args: [ChangeDetectorRef]
|
|
351
|
+
}] }, { type: i1$1.Overlay, decorators: [{
|
|
352
|
+
type: Inject,
|
|
353
|
+
args: [Overlay]
|
|
354
|
+
}] }, { type: undefined, decorators: [{
|
|
355
|
+
type: Inject,
|
|
356
|
+
args: [INJECTOR]
|
|
357
|
+
}] }, { type: i0.ElementRef, decorators: [{
|
|
358
|
+
type: Inject,
|
|
359
|
+
args: [ElementRef]
|
|
360
|
+
}] }, { type: i8.FocusMonitor, decorators: [{
|
|
361
|
+
type: Inject,
|
|
362
|
+
args: [FocusMonitor]
|
|
363
|
+
}] }, { type: undefined, decorators: [{
|
|
364
|
+
type: Optional
|
|
365
|
+
}, {
|
|
366
|
+
type: Inject,
|
|
367
|
+
args: [ANIMATION_MODULE_TYPE]
|
|
368
|
+
}] }];
|
|
369
|
+
}, propDecorators: { svgIcon: [{
|
|
370
|
+
type: HostBinding,
|
|
371
|
+
args: ['attr.data-svg-icon']
|
|
372
|
+
}], materialIcon: [{
|
|
373
|
+
type: HostBinding,
|
|
374
|
+
args: ['attr.data-material-icon']
|
|
375
|
+
}], iconName: [{
|
|
376
|
+
type: HostBinding,
|
|
377
|
+
args: ['attr.data-icon']
|
|
378
|
+
}], name: [{
|
|
379
|
+
type: HostBinding,
|
|
380
|
+
args: ['attr.data-name']
|
|
381
|
+
}], context: [{
|
|
382
|
+
type: Input
|
|
383
|
+
}], contextAll: [{
|
|
384
|
+
type: Input
|
|
385
|
+
}], action: [{
|
|
386
|
+
type: Input
|
|
387
|
+
}], definition: [{
|
|
388
|
+
type: Input,
|
|
389
|
+
args: ['rxap-button']
|
|
390
|
+
}], icon: [{
|
|
391
|
+
type: Input
|
|
392
|
+
}], tooltip: [{
|
|
393
|
+
type: HostBinding,
|
|
394
|
+
args: ['attr.data-tooltip']
|
|
395
|
+
}, {
|
|
396
|
+
type: Input
|
|
397
|
+
}], tooltipDisabled: [{
|
|
398
|
+
type: HostBinding,
|
|
399
|
+
args: ['attr.data-tooltip-disabled']
|
|
400
|
+
}, {
|
|
401
|
+
type: Input
|
|
402
|
+
}], label: [{
|
|
403
|
+
type: HostBinding,
|
|
404
|
+
args: ['attr.data-disabled']
|
|
405
|
+
}, {
|
|
406
|
+
type: HostBinding,
|
|
407
|
+
args: ['attr.data-label']
|
|
408
|
+
}, {
|
|
409
|
+
type: Input
|
|
410
|
+
}], show: [{
|
|
411
|
+
type: HostBinding,
|
|
412
|
+
args: ['attr.data-show']
|
|
413
|
+
}, {
|
|
414
|
+
type: Input
|
|
415
|
+
}], confirm: [{
|
|
416
|
+
type: HostBinding,
|
|
417
|
+
args: ['attr.data-confirm']
|
|
418
|
+
}, {
|
|
419
|
+
type: Input
|
|
420
|
+
}], confirmed$: [{
|
|
421
|
+
type: Output,
|
|
422
|
+
args: ['confirmed']
|
|
423
|
+
}], unconfirmed$: [{
|
|
424
|
+
type: Output,
|
|
425
|
+
args: ['unconfirmed']
|
|
426
|
+
}], onClick: [{
|
|
427
|
+
type: HostListener,
|
|
428
|
+
args: ['click']
|
|
429
|
+
}] } });
|
|
430
|
+
|
|
431
|
+
class ConfirmComponentModule {
|
|
432
|
+
}
|
|
433
|
+
ConfirmComponentModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ConfirmComponentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
434
|
+
ConfirmComponentModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ConfirmComponentModule, declarations: [ConfirmComponent, ConfirmDirective], imports: [FlexModule,
|
|
435
|
+
MatButtonModule,
|
|
436
|
+
MatIconModule,
|
|
437
|
+
OverlayModule], exports: [ConfirmComponent, ConfirmDirective] });
|
|
438
|
+
ConfirmComponentModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ConfirmComponentModule, imports: [[
|
|
439
|
+
FlexModule,
|
|
440
|
+
MatButtonModule,
|
|
441
|
+
MatIconModule,
|
|
442
|
+
OverlayModule
|
|
443
|
+
]] });
|
|
444
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ConfirmComponentModule, decorators: [{
|
|
445
|
+
type: NgModule,
|
|
446
|
+
args: [{
|
|
447
|
+
declarations: [ConfirmComponent, ConfirmDirective],
|
|
448
|
+
imports: [
|
|
449
|
+
FlexModule,
|
|
450
|
+
MatButtonModule,
|
|
451
|
+
MatIconModule,
|
|
452
|
+
OverlayModule
|
|
453
|
+
],
|
|
454
|
+
exports: [ConfirmComponent, ConfirmDirective]
|
|
455
|
+
}]
|
|
456
|
+
}] });
|
|
457
|
+
|
|
458
|
+
class ButtonComponentModule {
|
|
459
|
+
}
|
|
460
|
+
ButtonComponentModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ButtonComponentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
461
|
+
ButtonComponentModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ButtonComponentModule, declarations: [ButtonComponent], imports: [MatRippleModule,
|
|
462
|
+
FlexLayoutModule,
|
|
463
|
+
CommonModule,
|
|
464
|
+
MatIconModule,
|
|
465
|
+
MatButtonModule,
|
|
466
|
+
MatTooltipModule,
|
|
467
|
+
ConfirmComponentModule,
|
|
468
|
+
IconDirectiveModule], exports: [ButtonComponent] });
|
|
469
|
+
ButtonComponentModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ButtonComponentModule, imports: [[
|
|
470
|
+
MatRippleModule,
|
|
471
|
+
FlexLayoutModule,
|
|
472
|
+
CommonModule,
|
|
473
|
+
MatIconModule,
|
|
474
|
+
MatButtonModule,
|
|
475
|
+
MatTooltipModule,
|
|
476
|
+
ConfirmComponentModule,
|
|
477
|
+
IconDirectiveModule
|
|
478
|
+
]] });
|
|
479
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ButtonComponentModule, decorators: [{
|
|
480
|
+
type: NgModule,
|
|
481
|
+
args: [{
|
|
482
|
+
declarations: [ButtonComponent],
|
|
483
|
+
imports: [
|
|
484
|
+
MatRippleModule,
|
|
485
|
+
FlexLayoutModule,
|
|
486
|
+
CommonModule,
|
|
487
|
+
MatIconModule,
|
|
488
|
+
MatButtonModule,
|
|
489
|
+
MatTooltipModule,
|
|
490
|
+
ConfirmComponentModule,
|
|
491
|
+
IconDirectiveModule
|
|
492
|
+
],
|
|
493
|
+
exports: [ButtonComponent]
|
|
494
|
+
}]
|
|
495
|
+
}] });
|
|
496
|
+
|
|
497
|
+
class EmptyRouterOutletComponent {
|
|
498
|
+
}
|
|
499
|
+
EmptyRouterOutletComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: EmptyRouterOutletComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
500
|
+
EmptyRouterOutletComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", type: EmptyRouterOutletComponent, selector: "ng-component", ngImport: i0, template: "<router-outlet></router-outlet>\n", directives: [{ type: i1$3.RouterOutlet, selector: "router-outlet", outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
501
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: EmptyRouterOutletComponent, decorators: [{
|
|
502
|
+
type: Component,
|
|
503
|
+
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, template: "<router-outlet></router-outlet>\n" }]
|
|
504
|
+
}] });
|
|
505
|
+
|
|
506
|
+
class EmptyRouterOutletModule {
|
|
507
|
+
}
|
|
508
|
+
EmptyRouterOutletModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: EmptyRouterOutletModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
509
|
+
EmptyRouterOutletModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: EmptyRouterOutletModule, declarations: [EmptyRouterOutletComponent], imports: [RouterModule], exports: [EmptyRouterOutletComponent] });
|
|
510
|
+
EmptyRouterOutletModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: EmptyRouterOutletModule, imports: [[
|
|
511
|
+
RouterModule
|
|
512
|
+
]] });
|
|
513
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: EmptyRouterOutletModule, decorators: [{
|
|
514
|
+
type: NgModule,
|
|
515
|
+
args: [{
|
|
516
|
+
declarations: [EmptyRouterOutletComponent],
|
|
517
|
+
imports: [
|
|
518
|
+
RouterModule
|
|
519
|
+
],
|
|
520
|
+
exports: [EmptyRouterOutletComponent]
|
|
521
|
+
}]
|
|
522
|
+
}] });
|
|
523
|
+
|
|
524
|
+
const JSON_VIEW_IGNORED_PROPERTIES = new InjectionToken('rxap/form-system/inspector/ignored-properties', {
|
|
525
|
+
providedIn: 'root',
|
|
526
|
+
factory: () => [
|
|
527
|
+
'_subscriptions',
|
|
528
|
+
'subscriptions',
|
|
529
|
+
'injector',
|
|
530
|
+
/\$$/
|
|
531
|
+
]
|
|
532
|
+
});
|
|
533
|
+
const JSON_VIEW_IGNORED_TYPES = new InjectionToken('rxap/form-system/inspector/ignored-types', {
|
|
534
|
+
providedIn: 'root',
|
|
535
|
+
factory: () => [
|
|
536
|
+
Observable,
|
|
537
|
+
Promise,
|
|
538
|
+
Subscription,
|
|
539
|
+
SubscriptionHandler,
|
|
540
|
+
ErrorStateMatcher
|
|
541
|
+
]
|
|
542
|
+
});
|
|
543
|
+
|
|
544
|
+
class JsonViewerComponent {
|
|
545
|
+
constructor(ignoredProperties, ignoredTypes, cdr) {
|
|
546
|
+
this.cdr = cdr;
|
|
547
|
+
this.ignoredProperties = [];
|
|
548
|
+
this.ignoredTypes = [];
|
|
549
|
+
this.subscriptions = new Subscription();
|
|
550
|
+
this.segments = [];
|
|
551
|
+
function flat(acc, cur) {
|
|
552
|
+
if (Array.isArray(cur)) {
|
|
553
|
+
acc.push(...cur.reduce(flat, []));
|
|
554
|
+
}
|
|
555
|
+
else {
|
|
556
|
+
acc.push(cur);
|
|
557
|
+
}
|
|
558
|
+
return acc;
|
|
559
|
+
}
|
|
560
|
+
this.ignoredProperties = ignoredProperties.reduce(flat, []);
|
|
561
|
+
this.ignoredTypes = ignoredTypes.reduce(flat, []);
|
|
562
|
+
}
|
|
563
|
+
ngOnInit() {
|
|
564
|
+
this.setInspectValue(this.json);
|
|
565
|
+
}
|
|
566
|
+
ngOnChanges(changes) {
|
|
567
|
+
const jsonChange = changes['json'];
|
|
568
|
+
if (jsonChange) {
|
|
569
|
+
this.setInspectValue(jsonChange.currentValue);
|
|
570
|
+
}
|
|
571
|
+
}
|
|
572
|
+
cleanObject(obj, stack = []) {
|
|
573
|
+
if (stack.some(item => item === obj)) {
|
|
574
|
+
return '__circular__';
|
|
575
|
+
}
|
|
576
|
+
stack = stack.slice();
|
|
577
|
+
stack.unshift(obj);
|
|
578
|
+
return Object
|
|
579
|
+
.entries(obj)
|
|
580
|
+
.filter(([key, value]) => !isPromiseLike(value))
|
|
581
|
+
.filter(([key, value]) => !isTeardownLogic(value))
|
|
582
|
+
.filter(([key, value]) => this.ignoredProperties.every(ip => typeof ip === 'string' ? key !== ip : !key.match(ip)))
|
|
583
|
+
.filter(([key, value]) => [...this.ignoredTypes].every(type => !(value instanceof type)))
|
|
584
|
+
.map(([key, value]) => {
|
|
585
|
+
if (value && typeof value === 'object') {
|
|
586
|
+
if (Array.isArray(value)) {
|
|
587
|
+
return [key, value.map(item => this.cleanObject(item, stack))];
|
|
588
|
+
}
|
|
589
|
+
if (typeof value === 'object') {
|
|
590
|
+
return [key, this.cleanObject(value, stack)];
|
|
591
|
+
}
|
|
592
|
+
}
|
|
593
|
+
return [key, value];
|
|
594
|
+
})
|
|
595
|
+
.sort((a, b) => a[0].localeCompare(b[0]))
|
|
596
|
+
.reduce((controlView, [key, value]) => (Object.assign(Object.assign({}, controlView), { [key]: value })), {});
|
|
597
|
+
}
|
|
598
|
+
setInspectValue(json) {
|
|
599
|
+
if (typeof json !== 'object' || json === null || json === undefined) {
|
|
600
|
+
console.warn('The inspection value is not an object!');
|
|
601
|
+
}
|
|
602
|
+
else {
|
|
603
|
+
json = clone(json);
|
|
604
|
+
let inspectValue;
|
|
605
|
+
if (typeof json['toJSON'] === 'function') {
|
|
606
|
+
inspectValue = json.toJSON();
|
|
607
|
+
}
|
|
608
|
+
else {
|
|
609
|
+
inspectValue = this.cleanObject(json);
|
|
610
|
+
}
|
|
611
|
+
this.inspectValue = inspectValue;
|
|
612
|
+
this.buildSegments(this.inspectValue);
|
|
613
|
+
this.cdr.markForCheck();
|
|
614
|
+
}
|
|
615
|
+
}
|
|
616
|
+
buildSegments(inspectValue) {
|
|
617
|
+
this.segments = [];
|
|
618
|
+
if (typeof inspectValue === 'object') {
|
|
619
|
+
Object.keys(inspectValue).forEach(key => {
|
|
620
|
+
this.segments.push(this.parseKeyValue(key, inspectValue[key]));
|
|
621
|
+
});
|
|
622
|
+
}
|
|
623
|
+
else {
|
|
624
|
+
this.segments.push(this.parseKeyValue(`(${typeof inspectValue})`, inspectValue));
|
|
625
|
+
}
|
|
626
|
+
}
|
|
627
|
+
isExpandable(segment) {
|
|
628
|
+
return segment.type === 'object' || segment.type === 'array';
|
|
629
|
+
}
|
|
630
|
+
toggle(segment) {
|
|
631
|
+
if (this.isExpandable(segment)) {
|
|
632
|
+
segment.expanded = !segment.expanded;
|
|
633
|
+
}
|
|
634
|
+
}
|
|
635
|
+
parseKeyValue(key, value) {
|
|
636
|
+
const segment = {
|
|
637
|
+
key: key,
|
|
638
|
+
value: value,
|
|
639
|
+
type: undefined,
|
|
640
|
+
description: '' + value,
|
|
641
|
+
expanded: this.expanded
|
|
642
|
+
};
|
|
643
|
+
switch (typeof segment.value) {
|
|
644
|
+
case 'number': {
|
|
645
|
+
segment.type = 'number';
|
|
646
|
+
break;
|
|
647
|
+
}
|
|
648
|
+
case 'boolean': {
|
|
649
|
+
segment.type = 'boolean';
|
|
650
|
+
break;
|
|
651
|
+
}
|
|
652
|
+
case 'function': {
|
|
653
|
+
segment.type = 'function';
|
|
654
|
+
break;
|
|
655
|
+
}
|
|
656
|
+
case 'string': {
|
|
657
|
+
segment.type = 'string';
|
|
658
|
+
segment.description = '"' + segment.value + '"';
|
|
659
|
+
break;
|
|
660
|
+
}
|
|
661
|
+
case 'undefined': {
|
|
662
|
+
segment.type = 'undefined';
|
|
663
|
+
segment.description = 'undefined';
|
|
664
|
+
break;
|
|
665
|
+
}
|
|
666
|
+
case 'object': {
|
|
667
|
+
// yea, null is object
|
|
668
|
+
if (segment.value === null) {
|
|
669
|
+
segment.type = 'null';
|
|
670
|
+
segment.description = 'null';
|
|
671
|
+
}
|
|
672
|
+
else if (Array.isArray(segment.value)) {
|
|
673
|
+
segment.type = 'array';
|
|
674
|
+
segment.description = 'Array[' + segment.value.length + '] ' + JSON.stringify(segment.value);
|
|
675
|
+
}
|
|
676
|
+
else if (segment.value instanceof Date) {
|
|
677
|
+
segment.type = 'date';
|
|
678
|
+
}
|
|
679
|
+
else {
|
|
680
|
+
segment.type = 'object';
|
|
681
|
+
segment.description = 'Object ' + JSON.stringify(segment.value);
|
|
682
|
+
}
|
|
683
|
+
break;
|
|
684
|
+
}
|
|
685
|
+
}
|
|
686
|
+
return segment;
|
|
687
|
+
}
|
|
688
|
+
}
|
|
689
|
+
JsonViewerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: JsonViewerComponent, deps: [{ token: JSON_VIEW_IGNORED_PROPERTIES }, { token: JSON_VIEW_IGNORED_TYPES }, { token: ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
690
|
+
JsonViewerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", type: JsonViewerComponent, selector: "rxap-json-viewer", inputs: { json: "json", expanded: "expanded" }, host: { classAttribute: "rxap-json-viewer" }, usesOnChanges: true, ngImport: i0, template: "<section class=\"container\">\n <section\n *ngFor=\"let segment of segments\"\n [ngClass]=\"['segment', 'segment-type-' + segment.type]\">\n <section\n (click)=\"toggle(segment)\"\n [ngClass]=\"{\n 'segment-main': true,\n 'expandable': isExpandable(segment),\n 'expanded': segment.expanded\n }\">\n <div *ngIf=\"isExpandable(segment)\" class=\"toggler\"></div>\n <span class=\"segment-key\">{{ segment.key }}</span>\n <span class=\"segment-separator\">: </span>\n <span *ngIf=\"!segment.expanded || !isExpandable(segment)\" class=\"segment-value\">{{ segment.description }}</span>\n </section>\n <section *ngIf=\"segment.expanded && isExpandable(segment)\" class=\"children\">\n <rxap-json-viewer [expanded]=\"expanded\" [json]=\"segment.value\"></rxap-json-viewer>\n </section>\n </section>\n</section>\n", styles: ["@charset \"UTF-8\";.container{width:100%;height:100%;overflow:hidden;position:relative}.container .segment{padding:2px;margin:1px 1px 1px 12px}.container .segment .segment-main{word-wrap:break-word}.container .segment .segment-main .toggler{position:absolute;margin-left:-14px;margin-top:3px;vertical-align:middle}.container .segment .segment-main .toggler:after{display:inline-block;content:\"\\25ba\";transition:transform .1s ease-in}.container .segment .children{margin-left:12px}.container .segment-type-object>.segment-main,.container .segment-type-array>.segment-main{white-space:nowrap}.container .expanded>.toggler:after{transform:rotate(90deg)}.container .expandable,.container .expandable>.toggler{cursor:pointer}\n"], components: [{ type: JsonViewerComponent, selector: "rxap-json-viewer", inputs: ["json", "expanded"] }], directives: [{ type: i1$2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
691
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: JsonViewerComponent, decorators: [{
|
|
692
|
+
type: Component,
|
|
693
|
+
args: [{ selector: 'rxap-json-viewer', changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'rxap-json-viewer' }, template: "<section class=\"container\">\n <section\n *ngFor=\"let segment of segments\"\n [ngClass]=\"['segment', 'segment-type-' + segment.type]\">\n <section\n (click)=\"toggle(segment)\"\n [ngClass]=\"{\n 'segment-main': true,\n 'expandable': isExpandable(segment),\n 'expanded': segment.expanded\n }\">\n <div *ngIf=\"isExpandable(segment)\" class=\"toggler\"></div>\n <span class=\"segment-key\">{{ segment.key }}</span>\n <span class=\"segment-separator\">: </span>\n <span *ngIf=\"!segment.expanded || !isExpandable(segment)\" class=\"segment-value\">{{ segment.description }}</span>\n </section>\n <section *ngIf=\"segment.expanded && isExpandable(segment)\" class=\"children\">\n <rxap-json-viewer [expanded]=\"expanded\" [json]=\"segment.value\"></rxap-json-viewer>\n </section>\n </section>\n</section>\n", styles: ["@charset \"UTF-8\";.container{width:100%;height:100%;overflow:hidden;position:relative}.container .segment{padding:2px;margin:1px 1px 1px 12px}.container .segment .segment-main{word-wrap:break-word}.container .segment .segment-main .toggler{position:absolute;margin-left:-14px;margin-top:3px;vertical-align:middle}.container .segment .segment-main .toggler:after{display:inline-block;content:\"\\25ba\";transition:transform .1s ease-in}.container .segment .children{margin-left:12px}.container .segment-type-object>.segment-main,.container .segment-type-array>.segment-main{white-space:nowrap}.container .expanded>.toggler:after{transform:rotate(90deg)}.container .expandable,.container .expandable>.toggler{cursor:pointer}\n"] }]
|
|
694
|
+
}], ctorParameters: function () {
|
|
695
|
+
return [{ type: Array, decorators: [{
|
|
696
|
+
type: Inject,
|
|
697
|
+
args: [JSON_VIEW_IGNORED_PROPERTIES]
|
|
698
|
+
}] }, { type: Array, decorators: [{
|
|
699
|
+
type: Inject,
|
|
700
|
+
args: [JSON_VIEW_IGNORED_TYPES]
|
|
701
|
+
}] }, { type: i0.ChangeDetectorRef, decorators: [{
|
|
702
|
+
type: Inject,
|
|
703
|
+
args: [ChangeDetectorRef]
|
|
704
|
+
}] }];
|
|
705
|
+
}, propDecorators: { json: [{
|
|
706
|
+
type: Input
|
|
707
|
+
}], expanded: [{
|
|
708
|
+
type: Input
|
|
709
|
+
}] } });
|
|
710
|
+
|
|
711
|
+
class JsonViewerModule {
|
|
712
|
+
}
|
|
713
|
+
JsonViewerModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: JsonViewerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
714
|
+
JsonViewerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: JsonViewerModule, declarations: [JsonViewerComponent], imports: [CommonModule], exports: [JsonViewerComponent] });
|
|
715
|
+
JsonViewerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: JsonViewerModule, imports: [[
|
|
716
|
+
CommonModule
|
|
717
|
+
]] });
|
|
718
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: JsonViewerModule, decorators: [{
|
|
719
|
+
type: NgModule,
|
|
720
|
+
args: [{
|
|
721
|
+
declarations: [JsonViewerComponent],
|
|
722
|
+
imports: [
|
|
723
|
+
CommonModule
|
|
724
|
+
],
|
|
725
|
+
exports: [JsonViewerComponent]
|
|
726
|
+
}]
|
|
727
|
+
}] });
|
|
728
|
+
|
|
729
|
+
class CopyToClipboardButtonComponent {
|
|
730
|
+
constructor(snackbar) {
|
|
731
|
+
this.snackbar = snackbar;
|
|
732
|
+
this.value = '';
|
|
733
|
+
}
|
|
734
|
+
copied() {
|
|
735
|
+
this.snackbar.open('Erfolgreich in die Zwischenablage kopiert.', 'OK', {
|
|
736
|
+
duration: 2500,
|
|
737
|
+
});
|
|
738
|
+
}
|
|
739
|
+
}
|
|
740
|
+
CopyToClipboardButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: CopyToClipboardButtonComponent, deps: [{ token: MatSnackBar }], target: i0.ɵɵFactoryTarget.Component });
|
|
741
|
+
CopyToClipboardButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", type: CopyToClipboardButtonComponent, selector: "rxap-copy-to-clipboard-button", inputs: { value: "value" }, host: { classAttribute: "rxap-copy-to-clipboard-button" }, ngImport: i0, template: "<button\n [cdkCopyToClipboard]=\"value\"\n (click)=\"$event.stopPropagation()\"\n (cdkCopyToClipboardCopied)=\"copied()\"\n mat-icon-button\n type=\"button\"\n>\n <mat-icon>content_copy</mat-icon>\n</button>\n", styles: [""], components: [{ type: i1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: i3$1.CdkCopyToClipboard, selector: "[cdkCopyToClipboard]", inputs: ["cdkCopyToClipboard", "cdkCopyToClipboardAttempts"], outputs: ["cdkCopyToClipboardCopied"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
742
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: CopyToClipboardButtonComponent, decorators: [{
|
|
743
|
+
type: Component,
|
|
744
|
+
args: [{ selector: 'rxap-copy-to-clipboard-button', changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'rxap-copy-to-clipboard-button' }, template: "<button\n [cdkCopyToClipboard]=\"value\"\n (click)=\"$event.stopPropagation()\"\n (cdkCopyToClipboardCopied)=\"copied()\"\n mat-icon-button\n type=\"button\"\n>\n <mat-icon>content_copy</mat-icon>\n</button>\n", styles: [""] }]
|
|
745
|
+
}], ctorParameters: function () {
|
|
746
|
+
return [{ type: i4$1.MatSnackBar, decorators: [{
|
|
747
|
+
type: Inject,
|
|
748
|
+
args: [MatSnackBar]
|
|
749
|
+
}] }];
|
|
750
|
+
}, propDecorators: { value: [{
|
|
751
|
+
type: Input
|
|
752
|
+
}] } });
|
|
753
|
+
|
|
754
|
+
class CopyToClipboardComponent {
|
|
755
|
+
constructor() {
|
|
756
|
+
this.active = true;
|
|
757
|
+
this.disabled = false;
|
|
758
|
+
}
|
|
759
|
+
}
|
|
760
|
+
CopyToClipboardComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: CopyToClipboardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
761
|
+
CopyToClipboardComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", type: CopyToClipboardComponent, selector: "rxap-copy-to-clipboard", inputs: { active: "active", disabled: "disabled", value: "value" }, ngImport: i0, template: "<div fxLayout=\"row\" fxLayoutAlign=\"start center\" fxLayoutGap=\".2rem\">\n <rxap-copy-to-clipboard-button fxFlex=\"40px\" *ngIf=\"active\" [value]=\"value\"></rxap-copy-to-clipboard-button>\n <span #ref fxFlex=\"nogrow\" class=\"content\"><ng-content></ng-content></span>\n <span *ngIf=\"!ref.innerHTML.trim()\" fxFlex=\"nogrow\" class=\"content\">{{ value }}</span>\n</div>\n", styles: [""], components: [{ type: CopyToClipboardButtonComponent, selector: "rxap-copy-to-clipboard-button", inputs: ["value"] }], directives: [{ type: i3.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i3.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { type: i3.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
762
|
+
__decorate([
|
|
763
|
+
Required,
|
|
764
|
+
__metadata("design:type", String)
|
|
765
|
+
], CopyToClipboardComponent.prototype, "value", void 0);
|
|
766
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: CopyToClipboardComponent, decorators: [{
|
|
767
|
+
type: Component,
|
|
768
|
+
args: [{ selector: 'rxap-copy-to-clipboard', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div fxLayout=\"row\" fxLayoutAlign=\"start center\" fxLayoutGap=\".2rem\">\n <rxap-copy-to-clipboard-button fxFlex=\"40px\" *ngIf=\"active\" [value]=\"value\"></rxap-copy-to-clipboard-button>\n <span #ref fxFlex=\"nogrow\" class=\"content\"><ng-content></ng-content></span>\n <span *ngIf=\"!ref.innerHTML.trim()\" fxFlex=\"nogrow\" class=\"content\">{{ value }}</span>\n</div>\n", styles: [""] }]
|
|
769
|
+
}], propDecorators: { active: [{
|
|
770
|
+
type: Input
|
|
771
|
+
}], disabled: [{
|
|
772
|
+
type: Input
|
|
773
|
+
}], value: [{
|
|
774
|
+
type: Input
|
|
775
|
+
}] } });
|
|
776
|
+
|
|
777
|
+
class CopyToClipboardButtonComponentModule {
|
|
778
|
+
}
|
|
779
|
+
CopyToClipboardButtonComponentModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: CopyToClipboardButtonComponentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
780
|
+
CopyToClipboardButtonComponentModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: CopyToClipboardButtonComponentModule, declarations: [CopyToClipboardButtonComponent], imports: [MatIconModule,
|
|
781
|
+
MatButtonModule,
|
|
782
|
+
ClipboardModule,
|
|
783
|
+
MatSnackBarModule], exports: [CopyToClipboardButtonComponent] });
|
|
784
|
+
CopyToClipboardButtonComponentModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: CopyToClipboardButtonComponentModule, imports: [[
|
|
785
|
+
MatIconModule,
|
|
786
|
+
MatButtonModule,
|
|
787
|
+
ClipboardModule,
|
|
788
|
+
MatSnackBarModule
|
|
789
|
+
]] });
|
|
790
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: CopyToClipboardButtonComponentModule, decorators: [{
|
|
791
|
+
type: NgModule,
|
|
792
|
+
args: [{
|
|
793
|
+
declarations: [CopyToClipboardButtonComponent],
|
|
794
|
+
imports: [
|
|
795
|
+
MatIconModule,
|
|
796
|
+
MatButtonModule,
|
|
797
|
+
ClipboardModule,
|
|
798
|
+
MatSnackBarModule
|
|
799
|
+
],
|
|
800
|
+
exports: [CopyToClipboardButtonComponent]
|
|
801
|
+
}]
|
|
802
|
+
}] });
|
|
803
|
+
|
|
804
|
+
class CopyToClipboardModule {
|
|
805
|
+
}
|
|
806
|
+
CopyToClipboardModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: CopyToClipboardModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
807
|
+
CopyToClipboardModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: CopyToClipboardModule, declarations: [CopyToClipboardComponent], imports: [FlexLayoutModule,
|
|
808
|
+
ClipboardModule,
|
|
809
|
+
CommonModule,
|
|
810
|
+
MatIconModule,
|
|
811
|
+
MatButtonModule,
|
|
812
|
+
MatSnackBarModule,
|
|
813
|
+
CopyToClipboardButtonComponentModule], exports: [CopyToClipboardComponent] });
|
|
814
|
+
CopyToClipboardModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: CopyToClipboardModule, imports: [[
|
|
815
|
+
FlexLayoutModule,
|
|
816
|
+
ClipboardModule,
|
|
817
|
+
CommonModule,
|
|
818
|
+
MatIconModule,
|
|
819
|
+
MatButtonModule,
|
|
820
|
+
MatSnackBarModule,
|
|
821
|
+
CopyToClipboardButtonComponentModule,
|
|
822
|
+
]] });
|
|
823
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: CopyToClipboardModule, decorators: [{
|
|
824
|
+
type: NgModule,
|
|
825
|
+
args: [{
|
|
826
|
+
declarations: [CopyToClipboardComponent],
|
|
827
|
+
imports: [
|
|
828
|
+
FlexLayoutModule,
|
|
829
|
+
ClipboardModule,
|
|
830
|
+
CommonModule,
|
|
831
|
+
MatIconModule,
|
|
832
|
+
MatButtonModule,
|
|
833
|
+
MatSnackBarModule,
|
|
834
|
+
CopyToClipboardButtonComponentModule,
|
|
835
|
+
],
|
|
836
|
+
exports: [CopyToClipboardComponent]
|
|
837
|
+
}]
|
|
838
|
+
}] });
|
|
839
|
+
|
|
840
|
+
class DarkModeToggleButtonComponent {
|
|
841
|
+
constructor(theme) {
|
|
842
|
+
this.theme = theme;
|
|
843
|
+
}
|
|
844
|
+
}
|
|
845
|
+
DarkModeToggleButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: DarkModeToggleButtonComponent, deps: [{ token: ThemeService }], target: i0.ɵɵFactoryTarget.Component });
|
|
846
|
+
DarkModeToggleButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", type: DarkModeToggleButtonComponent, selector: "rxap-dark-mode-toggle-button", host: { classAttribute: "rxap-dark-mode-toggle-button" }, ngImport: i0, template: "<button rxapStopPropagation mat-icon-button (click)=\"theme.toggleDarkTheme()\">\n <mat-icon *ngIf=\"theme.darkMode\">brightness_2</mat-icon>\n <mat-icon *ngIf=\"!theme.darkMode\">brightness_5</mat-icon>\n</button>\n", styles: [""], components: [{ type: i1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: i3$2.StopPropagationDirective, selector: "[rxapStopPropagation]" }, { type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
847
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: DarkModeToggleButtonComponent, decorators: [{
|
|
848
|
+
type: Component,
|
|
849
|
+
args: [{ selector: 'rxap-dark-mode-toggle-button', changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'rxap-dark-mode-toggle-button' }, template: "<button rxapStopPropagation mat-icon-button (click)=\"theme.toggleDarkTheme()\">\n <mat-icon *ngIf=\"theme.darkMode\">brightness_2</mat-icon>\n <mat-icon *ngIf=\"!theme.darkMode\">brightness_5</mat-icon>\n</button>\n", styles: [""] }]
|
|
850
|
+
}], ctorParameters: function () {
|
|
851
|
+
return [{ type: i5.ThemeService, decorators: [{
|
|
852
|
+
type: Inject,
|
|
853
|
+
args: [ThemeService]
|
|
854
|
+
}] }];
|
|
855
|
+
} });
|
|
856
|
+
|
|
857
|
+
class DarkModeToggleButtonComponentModule {
|
|
858
|
+
}
|
|
859
|
+
DarkModeToggleButtonComponentModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: DarkModeToggleButtonComponentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
860
|
+
DarkModeToggleButtonComponentModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: DarkModeToggleButtonComponentModule, declarations: [DarkModeToggleButtonComponent], imports: [MatButtonModule,
|
|
861
|
+
MatIconModule,
|
|
862
|
+
CommonModule,
|
|
863
|
+
StopPropagationDirectiveModule], exports: [DarkModeToggleButtonComponent] });
|
|
864
|
+
DarkModeToggleButtonComponentModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: DarkModeToggleButtonComponentModule, imports: [[
|
|
865
|
+
MatButtonModule,
|
|
866
|
+
MatIconModule,
|
|
867
|
+
CommonModule,
|
|
868
|
+
StopPropagationDirectiveModule,
|
|
869
|
+
]] });
|
|
870
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: DarkModeToggleButtonComponentModule, decorators: [{
|
|
871
|
+
type: NgModule,
|
|
872
|
+
args: [{
|
|
873
|
+
declarations: [DarkModeToggleButtonComponent],
|
|
874
|
+
imports: [
|
|
875
|
+
MatButtonModule,
|
|
876
|
+
MatIconModule,
|
|
877
|
+
CommonModule,
|
|
878
|
+
StopPropagationDirectiveModule,
|
|
879
|
+
],
|
|
880
|
+
exports: [DarkModeToggleButtonComponent]
|
|
881
|
+
}]
|
|
882
|
+
}] });
|
|
883
|
+
|
|
884
|
+
class NavigateBackButtonComponent {
|
|
885
|
+
navigateBack() {
|
|
886
|
+
window.history.back();
|
|
887
|
+
}
|
|
888
|
+
}
|
|
889
|
+
NavigateBackButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: NavigateBackButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
890
|
+
NavigateBackButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", type: NavigateBackButtonComponent, selector: "rxap-navigate-back-button", host: { classAttribute: "rxap-navigate-back-button" }, ngImport: i0, template: "<div fxLayout=\"row\" fxLayoutGap=\"32px\" fxLayoutAlign=\"start center\">\n <div fxFlex=\"nogrow\">\n <button (click)=\"navigateBack()\" mat-stroked-button color=\"accent\">\n <mat-icon>navigate_before</mat-icon>\n </button>\n </div>\n <ng-content></ng-content>\n</div>\n", styles: [""], components: [{ type: i1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: i3.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i3.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { type: i3.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { type: i3.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
891
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: NavigateBackButtonComponent, decorators: [{
|
|
892
|
+
type: Component,
|
|
893
|
+
args: [{ selector: 'rxap-navigate-back-button', changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'rxap-navigate-back-button' }, template: "<div fxLayout=\"row\" fxLayoutGap=\"32px\" fxLayoutAlign=\"start center\">\n <div fxFlex=\"nogrow\">\n <button (click)=\"navigateBack()\" mat-stroked-button color=\"accent\">\n <mat-icon>navigate_before</mat-icon>\n </button>\n </div>\n <ng-content></ng-content>\n</div>\n", styles: [""] }]
|
|
894
|
+
}] });
|
|
895
|
+
|
|
896
|
+
class NavigateBackButtonComponentModule {
|
|
897
|
+
}
|
|
898
|
+
NavigateBackButtonComponentModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: NavigateBackButtonComponentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
899
|
+
NavigateBackButtonComponentModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: NavigateBackButtonComponentModule, declarations: [NavigateBackButtonComponent], imports: [FlexLayoutModule,
|
|
900
|
+
MatButtonModule,
|
|
901
|
+
MatIconModule], exports: [NavigateBackButtonComponent] });
|
|
902
|
+
NavigateBackButtonComponentModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: NavigateBackButtonComponentModule, imports: [[
|
|
903
|
+
FlexLayoutModule,
|
|
904
|
+
MatButtonModule,
|
|
905
|
+
MatIconModule
|
|
906
|
+
]] });
|
|
907
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: NavigateBackButtonComponentModule, decorators: [{
|
|
908
|
+
type: NgModule,
|
|
909
|
+
args: [{
|
|
910
|
+
declarations: [NavigateBackButtonComponent],
|
|
911
|
+
imports: [
|
|
912
|
+
FlexLayoutModule,
|
|
913
|
+
MatButtonModule,
|
|
914
|
+
MatIconModule
|
|
915
|
+
],
|
|
916
|
+
exports: [NavigateBackButtonComponent]
|
|
917
|
+
}]
|
|
918
|
+
}] });
|
|
919
|
+
|
|
920
|
+
// region button
|
|
921
|
+
// endregion
|
|
922
|
+
|
|
923
|
+
/**
|
|
924
|
+
* Generated bundle index. Do not edit.
|
|
925
|
+
*/
|
|
926
|
+
|
|
927
|
+
export { ButtonComponent, ButtonComponentModule, ConfirmComponent, ConfirmComponentModule, ConfirmDirective, CopyToClipboardButtonComponent, CopyToClipboardButtonComponentModule, CopyToClipboardComponent, CopyToClipboardModule, DarkModeToggleButtonComponent, DarkModeToggleButtonComponentModule, EmptyRouterOutletComponent, EmptyRouterOutletModule, JSON_VIEW_IGNORED_PROPERTIES, JSON_VIEW_IGNORED_TYPES, JsonViewerComponent, JsonViewerModule, NavigateBackButtonComponent, NavigateBackButtonComponentModule };
|
|
928
|
+
//# sourceMappingURL=rxap-components.mjs.map
|