@rxap/components 21.0.1 → 22.0.0-dev.1
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/CHANGELOG.md +29 -0
- package/compodoc/architecture.html +222 -0
- package/compodoc/changelog.html +73 -5
- package/compodoc/components/ConfirmComponent.html +112 -116
- package/compodoc/components/CopyToClipboardButtonComponent.html +165 -70
- package/compodoc/components/CopyToClipboardComponent.html +205 -176
- package/compodoc/components/EmptyRouterOutletComponent.html +86 -22
- package/compodoc/components/JsonViewerComponent.html +162 -94
- package/compodoc/components/NavigateBackButtonComponent.html +111 -26
- package/compodoc/dependencies.html +108 -27
- package/compodoc/directives/ConfirmDirective.html +266 -139
- package/compodoc/index.html +46 -5
- package/compodoc/interfaces/Segment.html +254 -184
- package/compodoc/js/architecture-graph.js +288 -0
- package/compodoc/js/libs/bootstrap-native.js +4 -2
- package/compodoc/js/libs/jszip.min.js +13 -0
- package/compodoc/js/libs/svg-pan-zoom.min.js +3 -3
- package/compodoc/js/libs/tablesort.min.js +3 -3
- package/compodoc/js/libs/tablesort.number.min.js +3 -3
- package/compodoc/js/libs/vis-network.min.js +78 -0
- package/compodoc/js/menu-wc.js +25 -12
- package/compodoc/js/menu.js +10 -11
- package/compodoc/js/routes/routes_index.js +1 -0
- package/compodoc/js/routes.js +142 -34
- package/compodoc/js/search/search-lunr.js +6 -8
- package/compodoc/js/search/search.js +118 -66
- package/compodoc/js/search/search_index.js +2 -2
- package/compodoc/js/tabs.js +98 -15
- package/compodoc/js/tree.js +44 -7
- package/compodoc/license.html +48 -6
- package/compodoc/llms.txt +141 -0
- package/compodoc/miscellaneous/functions.html +48 -6
- package/compodoc/miscellaneous/variables.html +65 -6
- package/compodoc/modules.html +44 -3
- package/compodoc/overview.html +54 -3
- package/compodoc/properties.html +45 -4
- package/compodoc/routes.html +227 -0
- package/compodoc/styles/compodoc.css +365 -44
- package/compodoc/styles/dark.css +16 -0
- package/compodoc/template-playground/default-templates.json +192 -0
- package/compodoc/template-playground/hbs-render.service.ts +217 -0
- package/compodoc/template-playground/main.ts +9 -0
- package/compodoc/template-playground/template-editor.service.ts +173 -0
- package/compodoc/template-playground/template-playground.component.ts +614 -0
- package/compodoc/template-playground/template-playground.module.ts +29 -0
- package/compodoc/template-playground/zip-export.service.ts +86 -0
- package/compodoc/template-playground-app/app.js +1389 -0
- package/compodoc/template-playground-app/index.html +462 -0
- package/docs/documentation.json +436 -314
- package/docs/html/assets/highlight.css +1 -1
- package/docs/html/assets/icons.js +1 -1
- package/docs/html/assets/icons.svg +1 -1
- package/docs/html/assets/main.js +5 -5
- package/docs/html/assets/search.js +1 -1
- package/docs/html/assets/style.css +265 -228
- package/docs/html/classes/ConfirmComponent.html +76 -4
- package/docs/html/classes/ConfirmDirective.html +209 -17
- package/docs/html/classes/CopyToClipboardButtonComponent.html +88 -4
- package/docs/html/classes/CopyToClipboardComponent.html +106 -9
- package/docs/html/classes/EmptyRouterOutletComponent.html +56 -2
- package/docs/html/classes/JsonViewerComponent.html +187 -14
- package/docs/html/classes/NavigateBackButtonComponent.html +74 -3
- package/docs/html/hierarchy.html +29 -0
- package/docs/html/index.html +40 -4
- package/docs/html/interfaces/Segment.html +79 -6
- package/docs/html/modules.html +44 -1
- package/docs/html/variables/JSON_VIEW_IGNORED_PROPERTIES.html +33 -1
- package/docs/html/variables/JSON_VIEW_IGNORED_TYPES.html +33 -1
- package/docs/markdown/README.md +1 -1
- package/docs/markdown/classes/ConfirmComponent.md +7 -7
- package/docs/markdown/classes/ConfirmDirective.md +30 -28
- package/docs/markdown/classes/CopyToClipboardButtonComponent.md +7 -7
- package/docs/markdown/classes/CopyToClipboardComponent.md +12 -12
- package/docs/markdown/classes/EmptyRouterOutletComponent.md +5 -5
- package/docs/markdown/classes/JsonViewerComponent.md +20 -20
- package/docs/markdown/classes/NavigateBackButtonComponent.md +6 -6
- package/docs/markdown/globals.md +2 -2
- package/docs/markdown/interfaces/Segment.md +8 -8
- package/docs/markdown/variables/JSON_VIEW_IGNORED_PROPERTIES.md +2 -2
- package/docs/markdown/variables/JSON_VIEW_IGNORED_TYPES.md +2 -2
- package/docs/wiki/Class.ConfirmComponent.md +6 -6
- package/docs/wiki/Class.ConfirmDirective.md +29 -27
- package/docs/wiki/Class.CopyToClipboardButtonComponent.md +6 -6
- package/docs/wiki/Class.CopyToClipboardComponent.md +11 -11
- package/docs/wiki/Class.EmptyRouterOutletComponent.md +4 -4
- package/docs/wiki/Class.JsonViewerComponent.md +19 -19
- package/docs/wiki/Class.NavigateBackButtonComponent.md +5 -5
- package/docs/wiki/Interface.Segment.md +7 -7
- package/docs/wiki/Variable.JSON_VIEW_IGNORED_PROPERTIES.md +1 -1
- package/docs/wiki/Variable.JSON_VIEW_IGNORED_TYPES.md +1 -1
- package/docs/wiki/globals.md +1 -1
- package/fesm2022/rxap-components.mjs +700 -220
- package/fesm2022/rxap-components.mjs.map +1 -1
- package/package.json +20 -20
- package/types/rxap-components.d.ts +139 -92
|
@@ -1,72 +1,135 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import { NgClass } from
|
|
9
|
-
import { SubscriptionHandler, isTeardownLogic } from
|
|
10
|
-
import {
|
|
11
|
-
import { Observable, Subscription } from
|
|
12
|
-
import { ErrorStateMatcher } from
|
|
13
|
-
import { RouterOutlet } from
|
|
14
|
-
import { MatSnackBar, MatSnackBarModule } from
|
|
15
|
-
import * as i2
|
|
16
|
-
import { ClipboardModule } from
|
|
17
|
-
import { Overlay } from
|
|
18
|
-
import { ComponentPortal } from
|
|
19
|
-
import { outputToObservable } from
|
|
20
|
-
import { take, tap } from
|
|
21
|
-
class NavigateBackButtonComponent {
|
|
1
|
+
import { __decorate, __metadata } from "tslib";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
import { ChangeDetectionStrategy, Component, Directive, ElementRef, InjectionToken, computed, effect, forwardRef, inject, input, isDevMode, output, signal, untracked } from "@angular/core";
|
|
4
|
+
import * as i1 from "@angular/material/button";
|
|
5
|
+
import { MatButtonModule } from "@angular/material/button";
|
|
6
|
+
import * as i2$1 from "@angular/material/icon";
|
|
7
|
+
import { MatIconModule } from "@angular/material/icon";
|
|
8
|
+
import { NgClass } from "@angular/common";
|
|
9
|
+
import { SubscriptionHandler, isTeardownLogic } from "@rxap/rxjs";
|
|
10
|
+
import { clone, isPromiseLike } from "@rxap/utilities";
|
|
11
|
+
import { Observable, Subscription } from "rxjs";
|
|
12
|
+
import { ErrorStateMatcher } from "@angular/material/core";
|
|
13
|
+
import { RouterOutlet } from "@angular/router";
|
|
14
|
+
import { MatSnackBar, MatSnackBarModule } from "@angular/material/snack-bar";
|
|
15
|
+
import * as i2 from "@angular/cdk/clipboard";
|
|
16
|
+
import { ClipboardModule } from "@angular/cdk/clipboard";
|
|
17
|
+
import { Overlay } from "@angular/cdk/overlay";
|
|
18
|
+
import { ComponentPortal } from "@angular/cdk/portal";
|
|
19
|
+
import { outputToObservable } from "@angular/core/rxjs-interop";
|
|
20
|
+
import { take, tap } from "rxjs/operators";
|
|
21
|
+
let NavigateBackButtonComponent = class NavigateBackButtonComponent {
|
|
22
22
|
navigateBack() {
|
|
23
23
|
window.history.back();
|
|
24
24
|
}
|
|
25
|
-
static {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
25
|
+
static {
|
|
26
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
27
|
+
minVersion: "12.0.0",
|
|
28
|
+
version: "22.3.0",
|
|
29
|
+
ngImport: i0,
|
|
30
|
+
type: NavigateBackButtonComponent,
|
|
31
|
+
deps: [],
|
|
32
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
static {
|
|
36
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
37
|
+
minVersion: "14.0.0",
|
|
38
|
+
version: "22.3.0",
|
|
39
|
+
type: NavigateBackButtonComponent,
|
|
40
|
+
isStandalone: true,
|
|
41
|
+
selector: "rxap-navigate-back-button",
|
|
42
|
+
host: { classAttribute: "rxap-navigate-back-button" },
|
|
43
|
+
ngImport: i0,
|
|
44
|
+
template: "<div class=\"rxap-container flex flex-row justify-start items-center gap-8\">\n <div class=\"grow-0\">\n <button type=\"button\" (click)=\"navigateBack()\" mat-stroked-button>\n <mat-icon>navigate_before</mat-icon>\n </button>\n </div>\n <ng-content></ng-content>\n</div>\n",
|
|
45
|
+
styles: [".rxap-container ::ng-deep h1,.rxap-container ::ng-deep h2,.rxap-container ::ng-deep h3,.rxap-container ::ng-deep h4,.rxap-container ::ng-deep h5,.rxap-container ::ng-deep h6{margin:0}\n"],
|
|
46
|
+
dependencies: [
|
|
47
|
+
{
|
|
48
|
+
kind: "ngmodule",
|
|
49
|
+
type: MatButtonModule
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
kind: "component",
|
|
53
|
+
type: i1.MatButton,
|
|
54
|
+
selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ",
|
|
55
|
+
inputs: ["matButton"],
|
|
56
|
+
exportAs: ["matButton", "matAnchor"]
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
kind: "ngmodule",
|
|
60
|
+
type: MatIconModule
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
kind: "component",
|
|
64
|
+
type: i2$1.MatIcon,
|
|
65
|
+
selector: "mat-icon",
|
|
66
|
+
inputs: [
|
|
67
|
+
"color",
|
|
68
|
+
"inline",
|
|
69
|
+
"svgIcon",
|
|
70
|
+
"fontSet",
|
|
71
|
+
"fontIcon"
|
|
72
|
+
],
|
|
73
|
+
exportAs: ["matIcon"]
|
|
74
|
+
}
|
|
75
|
+
],
|
|
76
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
81
|
+
minVersion: "12.0.0",
|
|
82
|
+
version: "22.3.0",
|
|
83
|
+
ngImport: i0,
|
|
84
|
+
type: NavigateBackButtonComponent,
|
|
85
|
+
decorators: [{
|
|
29
86
|
type: Component,
|
|
30
|
-
args: [{
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
87
|
+
args: [{
|
|
88
|
+
selector: "rxap-navigate-back-button",
|
|
89
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
90
|
+
host: { class: "rxap-navigate-back-button" },
|
|
91
|
+
imports: [MatButtonModule, MatIconModule],
|
|
92
|
+
template: "<div class=\"rxap-container flex flex-row justify-start items-center gap-8\">\n <div class=\"grow-0\">\n <button type=\"button\" (click)=\"navigateBack()\" mat-stroked-button>\n <mat-icon>navigate_before</mat-icon>\n </button>\n </div>\n <ng-content></ng-content>\n</div>\n",
|
|
93
|
+
styles: [".rxap-container ::ng-deep h1,.rxap-container ::ng-deep h2,.rxap-container ::ng-deep h3,.rxap-container ::ng-deep h4,.rxap-container ::ng-deep h5,.rxap-container ::ng-deep h6{margin:0}\n"]
|
|
94
|
+
}]
|
|
95
|
+
}]
|
|
96
|
+
});
|
|
97
|
+
const JSON_VIEW_IGNORED_PROPERTIES = new InjectionToken("rxap/form-system/inspector/ignored-properties", {
|
|
98
|
+
providedIn: "root",
|
|
34
99
|
factory: () => [
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
]
|
|
100
|
+
"_subscriptions",
|
|
101
|
+
"subscriptions",
|
|
102
|
+
"injector",
|
|
103
|
+
/\$$/
|
|
104
|
+
]
|
|
40
105
|
});
|
|
41
|
-
const JSON_VIEW_IGNORED_TYPES = new InjectionToken(
|
|
42
|
-
providedIn:
|
|
106
|
+
const JSON_VIEW_IGNORED_TYPES = new InjectionToken("rxap/form-system/inspector/ignored-types", {
|
|
107
|
+
providedIn: "root",
|
|
43
108
|
factory: () => [
|
|
44
109
|
Observable,
|
|
45
110
|
Promise,
|
|
46
111
|
Subscription,
|
|
47
112
|
SubscriptionHandler,
|
|
48
|
-
ErrorStateMatcher
|
|
49
|
-
]
|
|
113
|
+
ErrorStateMatcher
|
|
114
|
+
]
|
|
50
115
|
});
|
|
51
116
|
let JsonViewerComponent = class JsonViewerComponent {
|
|
52
117
|
constructor() {
|
|
53
|
-
this.json = input({}, ...
|
|
54
|
-
this.expanded = input(false, ...
|
|
55
|
-
this.inspectValue = signal(
|
|
118
|
+
this.json = input({}, ...ngDevMode ? [{ debugName: "json" }] : /* istanbul ignore next */ []);
|
|
119
|
+
this.expanded = input(false, ...ngDevMode ? [{ debugName: "expanded" }] : /* istanbul ignore next */ []);
|
|
120
|
+
this.inspectValue = signal(void 0, ...ngDevMode ? [{ debugName: "inspectValue" }] : /* istanbul ignore next */ []);
|
|
56
121
|
this.ignoredProperties = [];
|
|
57
122
|
this.ignoredTypes = [];
|
|
58
123
|
this.subscriptions = new Subscription();
|
|
59
|
-
this.segments = signal([], ...
|
|
124
|
+
this.segments = signal([], ...ngDevMode ? [{ debugName: "segments" }] : /* istanbul ignore next */ []);
|
|
60
125
|
this.initialized = false;
|
|
61
126
|
const ignoredProperties = inject(JSON_VIEW_IGNORED_PROPERTIES);
|
|
62
127
|
const ignoredTypes = inject(JSON_VIEW_IGNORED_TYPES);
|
|
63
128
|
function flat(acc, cur) {
|
|
64
|
-
if (Array.isArray(cur))
|
|
129
|
+
if (Array.isArray(cur))
|
|
65
130
|
acc.push(...cur.reduce(flat, []));
|
|
66
|
-
|
|
67
|
-
else {
|
|
131
|
+
else
|
|
68
132
|
acc.push(cur);
|
|
69
|
-
}
|
|
70
133
|
return acc;
|
|
71
134
|
}
|
|
72
135
|
this.ignoredProperties = ignoredProperties.reduce(flat, []);
|
|
@@ -74,211 +137,594 @@ let JsonViewerComponent = class JsonViewerComponent {
|
|
|
74
137
|
effect(() => {
|
|
75
138
|
const json = this.json();
|
|
76
139
|
untracked(() => {
|
|
77
|
-
if (isDevMode() && this.initialized)
|
|
78
|
-
console.debug(
|
|
79
|
-
}
|
|
140
|
+
if (isDevMode() && this.initialized)
|
|
141
|
+
console.debug("json change");
|
|
80
142
|
this.initialized = true;
|
|
81
143
|
this.setInspectValue(json);
|
|
82
144
|
});
|
|
83
145
|
});
|
|
84
146
|
}
|
|
85
147
|
cleanObject(obj, stack = []) {
|
|
86
|
-
if (typeof obj !==
|
|
148
|
+
if (typeof obj !== "object" || obj === null)
|
|
87
149
|
return obj;
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
return '__circular__';
|
|
91
|
-
}
|
|
150
|
+
if (stack.some((item) => item === obj))
|
|
151
|
+
return "__circular__";
|
|
92
152
|
stack = stack.slice();
|
|
93
153
|
stack.unshift(obj);
|
|
94
|
-
return Object
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
key !== ip :
|
|
100
|
-
!key.match(ip)))
|
|
101
|
-
.filter(([key, value]) => [...this.ignoredTypes].every(type => !(value instanceof type)))
|
|
102
|
-
.map(([key, value]) => {
|
|
103
|
-
if (value && typeof value === 'object') {
|
|
104
|
-
if (Array.isArray(value)) {
|
|
105
|
-
return [key, value.map(item => this.cleanObject(item, stack))];
|
|
106
|
-
}
|
|
107
|
-
if (typeof value === 'object') {
|
|
154
|
+
return Object.entries(obj).filter(([key, value]) => !isPromiseLike(value)).filter(([key, value]) => !isTeardownLogic(value)).filter(([key, value]) => this.ignoredProperties.every((ip) => typeof ip === "string" ? key !== ip : !key.match(ip))).filter(([key, value]) => [...this.ignoredTypes].every((type) => !(value instanceof type))).map(([key, value]) => {
|
|
155
|
+
if (value && typeof value === "object") {
|
|
156
|
+
if (Array.isArray(value))
|
|
157
|
+
return [key, value.map((item) => this.cleanObject(item, stack))];
|
|
158
|
+
if (typeof value === "object")
|
|
108
159
|
return [key, this.cleanObject(value, stack)];
|
|
109
|
-
}
|
|
110
160
|
}
|
|
111
161
|
return [key, value];
|
|
112
|
-
})
|
|
113
|
-
.sort((a, b) => a[0].localeCompare(b[0]))
|
|
114
|
-
.reduce((controlView, [key, value]) => ({
|
|
162
|
+
}).sort((a, b) => a[0].localeCompare(b[0])).reduce((controlView, [key, value]) => ({
|
|
115
163
|
...controlView,
|
|
116
|
-
[key]: value
|
|
164
|
+
[key]: value
|
|
117
165
|
}), {});
|
|
118
166
|
}
|
|
119
167
|
setInspectValue(json) {
|
|
120
|
-
if (typeof json !==
|
|
121
|
-
console.warn(
|
|
122
|
-
}
|
|
168
|
+
if (typeof json !== "object" || json === null || json === void 0)
|
|
169
|
+
console.warn("The inspection value is not an object!");
|
|
123
170
|
else {
|
|
124
|
-
if (typeof json[
|
|
171
|
+
if (typeof json["toJSON"] === "function")
|
|
125
172
|
json = json.toJSON();
|
|
126
|
-
}
|
|
127
173
|
const inspectValue = this.cleanObject(clone(json));
|
|
128
174
|
this.inspectValue.set(inspectValue);
|
|
129
175
|
this.buildSegments(inspectValue);
|
|
130
176
|
}
|
|
131
177
|
}
|
|
132
178
|
buildSegments(inspectValue) {
|
|
133
|
-
if (typeof inspectValue ===
|
|
134
|
-
this.segments.set(Object.keys(inspectValue).map(key => this.parseKeyValue(key, inspectValue[key])));
|
|
135
|
-
|
|
136
|
-
else {
|
|
179
|
+
if (typeof inspectValue === "object")
|
|
180
|
+
this.segments.set(Object.keys(inspectValue).map((key) => this.parseKeyValue(key, inspectValue[key])));
|
|
181
|
+
else
|
|
137
182
|
this.segments.set([this.parseKeyValue(`(${typeof inspectValue})`, inspectValue)]);
|
|
138
|
-
}
|
|
139
183
|
}
|
|
140
184
|
isExpandable(segment) {
|
|
141
|
-
return segment.type ===
|
|
185
|
+
return segment.type === "object" || segment.type === "array";
|
|
142
186
|
}
|
|
143
187
|
toggle(segment) {
|
|
144
188
|
if (this.isExpandable(segment)) {
|
|
145
189
|
segment.expanded = !segment.expanded;
|
|
146
|
-
this.segments.update(segments => [...segments]);
|
|
190
|
+
this.segments.update((segments) => [...segments]);
|
|
147
191
|
}
|
|
148
192
|
}
|
|
149
193
|
parseKeyValue(key, value) {
|
|
150
194
|
const segment = {
|
|
151
|
-
key
|
|
152
|
-
value
|
|
153
|
-
type:
|
|
154
|
-
description:
|
|
155
|
-
expanded: this.expanded()
|
|
195
|
+
key,
|
|
196
|
+
value,
|
|
197
|
+
type: void 0,
|
|
198
|
+
description: "" + value,
|
|
199
|
+
expanded: this.expanded()
|
|
156
200
|
};
|
|
157
201
|
switch (typeof segment.value) {
|
|
158
|
-
case
|
|
159
|
-
segment.type =
|
|
202
|
+
case "number":
|
|
203
|
+
segment.type = "number";
|
|
160
204
|
break;
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
segment.type = 'boolean';
|
|
205
|
+
case "boolean":
|
|
206
|
+
segment.type = "boolean";
|
|
164
207
|
break;
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
segment.type = 'function';
|
|
208
|
+
case "function":
|
|
209
|
+
segment.type = "function";
|
|
168
210
|
break;
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
segment.
|
|
172
|
-
segment.description = '"' + segment.value + '"';
|
|
211
|
+
case "string":
|
|
212
|
+
segment.type = "string";
|
|
213
|
+
segment.description = "\"" + segment.value + "\"";
|
|
173
214
|
break;
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
segment.
|
|
177
|
-
segment.description = 'undefined';
|
|
215
|
+
case "undefined":
|
|
216
|
+
segment.type = "undefined";
|
|
217
|
+
segment.description = "undefined";
|
|
178
218
|
break;
|
|
219
|
+
case "object": if (segment.value === null) {
|
|
220
|
+
segment.type = "null";
|
|
221
|
+
segment.description = "null";
|
|
179
222
|
}
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
}
|
|
190
|
-
else if (segment.value instanceof Date) {
|
|
191
|
-
segment.type = 'date';
|
|
192
|
-
}
|
|
193
|
-
else {
|
|
194
|
-
segment.type = 'object';
|
|
195
|
-
segment.description = 'Object ' + JSON.stringify(segment.value);
|
|
196
|
-
}
|
|
197
|
-
break;
|
|
223
|
+
else if (Array.isArray(segment.value)) {
|
|
224
|
+
segment.type = "array";
|
|
225
|
+
segment.description = "Array[" + segment.value.length + "] " + JSON.stringify(segment.value);
|
|
226
|
+
}
|
|
227
|
+
else if (segment.value instanceof Date)
|
|
228
|
+
segment.type = "date";
|
|
229
|
+
else {
|
|
230
|
+
segment.type = "object";
|
|
231
|
+
segment.description = "Object " + JSON.stringify(segment.value);
|
|
198
232
|
}
|
|
199
233
|
}
|
|
200
234
|
return segment;
|
|
201
235
|
}
|
|
202
|
-
static {
|
|
203
|
-
|
|
236
|
+
static {
|
|
237
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
238
|
+
minVersion: "12.0.0",
|
|
239
|
+
version: "22.3.0",
|
|
240
|
+
ngImport: i0,
|
|
241
|
+
type: JsonViewerComponent,
|
|
242
|
+
deps: [],
|
|
243
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
244
|
+
});
|
|
245
|
+
}
|
|
246
|
+
static {
|
|
247
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
248
|
+
minVersion: "17.0.0",
|
|
249
|
+
version: "22.3.0",
|
|
250
|
+
type: JsonViewerComponent,
|
|
251
|
+
isStandalone: true,
|
|
252
|
+
selector: "rxap-json-viewer",
|
|
253
|
+
inputs: {
|
|
254
|
+
json: {
|
|
255
|
+
classPropertyName: "json",
|
|
256
|
+
publicName: "json",
|
|
257
|
+
isSignal: true,
|
|
258
|
+
isRequired: false,
|
|
259
|
+
transformFunction: null
|
|
260
|
+
},
|
|
261
|
+
expanded: {
|
|
262
|
+
classPropertyName: "expanded",
|
|
263
|
+
publicName: "expanded",
|
|
264
|
+
isSignal: true,
|
|
265
|
+
isRequired: false,
|
|
266
|
+
transformFunction: null
|
|
267
|
+
}
|
|
268
|
+
},
|
|
269
|
+
host: { classAttribute: "rxap-json-viewer" },
|
|
270
|
+
ngImport: i0,
|
|
271
|
+
template: "<section class=\"rxap-container\">\n @for (segment of segments(); track segment) {\n <section\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 @if (isExpandable(segment)) {\n <div class=\"toggler\"></div>\n }\n <span class=\"segment-key text-primary\">{{ segment.key }}</span>\n <span class=\"segment-separator\">: </span>\n @if (!segment.expanded || !isExpandable(segment)) {\n <span\n class=\"segment-value text-white dark:text-black\">{{ segment.description }}</span>\n }\n </section>\n @if (segment.expanded && isExpandable(segment)) {\n <section class=\"children\">\n <rxap-json-viewer [expanded]=\"expanded()\" [json]=\"segment.value\"></rxap-json-viewer>\n </section>\n }\n </section>\n }\n</section>\n",
|
|
272
|
+
styles: ["@charset \"UTF-8\";.rxap-container{width:100%;height:100%;overflow:hidden;position:relative;font-family:monospace;font-size:16px}.rxap-container .segment .segment-main .toggler{font-size:8px;line-height:12px}.rxap-container .segment{padding:2px;margin:1px 1px 1px 12px}.rxap-container .segment .segment-main{word-wrap:break-word}.rxap-container .segment .segment-main .toggler{position:absolute;margin-left:-14px;margin-top:3px;vertical-align:middle}.rxap-container .segment .segment-main .toggler:after{display:inline-block;content:\"\\25ba\";transition:transform .1s ease-in}.rxap-container .segment .children{margin-left:12px}.rxap-container .segment-type-object>.segment-main,.rxap-container .segment-type-array>.segment-main{white-space:nowrap}.rxap-container .expanded>.toggler:after{transform:rotate(90deg)}.rxap-container .expandable,.rxap-container .expandable>.toggler{cursor:pointer}.rxap-container .segment .segment-main .toggler{color:#787878}.rxap-container .segment .segment-main .segment-separator{color:#999}.rxap-container .segment-type-string>.segment-main>.segment-value{color:var(--json-string-color, #FF6B6B)}.rxap-container .segment-type-number>.segment-main>.segment-value{color:var(--json-number-color, #009688)}.rxap-container .segment-type-boolean>.segment-main>.segment-value{color:var(--json-boolean-color, #b938a4)}.rxap-container .segment-type-date>.segment-main>.segment-value{color:var(--json-date-color, #05668D)}.rxap-container .segment-type-array>.segment-main>.segment-value{color:var(--json-array-color, #999)}.rxap-container .segment-type-object>.segment-main>.segment-value{color:var(--json-object-color, #999)}.rxap-container .segment-type-function>.segment-main>.segment-value{color:var(--json-function-color, #999)}.rxap-container .segment-type-null>.segment-main>.segment-value{color:var(--json-null-color, #fff)}.rxap-container .segment-type-undefined>.segment-main>.segment-value{color:var(--json-undefined-color, #fff)}.rxap-container .segment-type-null>.segment-main>.segment-value{background-color:var(--warn-500, darkred)}.rxap-container .segment-type-undefined>.segment-main>.segment-key{color:#999}.rxap-container .segment-type-undefined>.segment-main>.segment-value{background-color:#999}\n"],
|
|
273
|
+
dependencies: [{
|
|
274
|
+
kind: "component",
|
|
275
|
+
type: i0.forwardRef(() => JsonViewerComponent),
|
|
276
|
+
selector: "rxap-json-viewer",
|
|
277
|
+
inputs: ["json", "expanded"]
|
|
278
|
+
}, {
|
|
279
|
+
kind: "directive",
|
|
280
|
+
type: i0.forwardRef(() => NgClass),
|
|
281
|
+
selector: "[ngClass]",
|
|
282
|
+
inputs: ["class", "ngClass"]
|
|
283
|
+
}],
|
|
284
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
285
|
+
});
|
|
286
|
+
}
|
|
204
287
|
};
|
|
205
288
|
JsonViewerComponent = __decorate([
|
|
206
|
-
__metadata("design:paramtypes", [])
|
|
207
|
-
|
|
208
|
-
|
|
289
|
+
__metadata("design:paramtypes", [])], JsonViewerComponent);
|
|
290
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
291
|
+
minVersion: "12.0.0",
|
|
292
|
+
version: "22.3.0",
|
|
293
|
+
ngImport: i0,
|
|
294
|
+
type: JsonViewerComponent,
|
|
295
|
+
decorators: [{
|
|
209
296
|
type: Component,
|
|
210
|
-
args: [{
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
}
|
|
216
|
-
|
|
297
|
+
args: [{
|
|
298
|
+
selector: "rxap-json-viewer",
|
|
299
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
300
|
+
host: { class: "rxap-json-viewer" },
|
|
301
|
+
imports: [NgClass, forwardRef(() => JsonViewerComponent)],
|
|
302
|
+
template: "<section class=\"rxap-container\">\n @for (segment of segments(); track segment) {\n <section\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 @if (isExpandable(segment)) {\n <div class=\"toggler\"></div>\n }\n <span class=\"segment-key text-primary\">{{ segment.key }}</span>\n <span class=\"segment-separator\">: </span>\n @if (!segment.expanded || !isExpandable(segment)) {\n <span\n class=\"segment-value text-white dark:text-black\">{{ segment.description }}</span>\n }\n </section>\n @if (segment.expanded && isExpandable(segment)) {\n <section class=\"children\">\n <rxap-json-viewer [expanded]=\"expanded()\" [json]=\"segment.value\"></rxap-json-viewer>\n </section>\n }\n </section>\n }\n</section>\n",
|
|
303
|
+
styles: ["@charset \"UTF-8\";.rxap-container{width:100%;height:100%;overflow:hidden;position:relative;font-family:monospace;font-size:16px}.rxap-container .segment .segment-main .toggler{font-size:8px;line-height:12px}.rxap-container .segment{padding:2px;margin:1px 1px 1px 12px}.rxap-container .segment .segment-main{word-wrap:break-word}.rxap-container .segment .segment-main .toggler{position:absolute;margin-left:-14px;margin-top:3px;vertical-align:middle}.rxap-container .segment .segment-main .toggler:after{display:inline-block;content:\"\\25ba\";transition:transform .1s ease-in}.rxap-container .segment .children{margin-left:12px}.rxap-container .segment-type-object>.segment-main,.rxap-container .segment-type-array>.segment-main{white-space:nowrap}.rxap-container .expanded>.toggler:after{transform:rotate(90deg)}.rxap-container .expandable,.rxap-container .expandable>.toggler{cursor:pointer}.rxap-container .segment .segment-main .toggler{color:#787878}.rxap-container .segment .segment-main .segment-separator{color:#999}.rxap-container .segment-type-string>.segment-main>.segment-value{color:var(--json-string-color, #FF6B6B)}.rxap-container .segment-type-number>.segment-main>.segment-value{color:var(--json-number-color, #009688)}.rxap-container .segment-type-boolean>.segment-main>.segment-value{color:var(--json-boolean-color, #b938a4)}.rxap-container .segment-type-date>.segment-main>.segment-value{color:var(--json-date-color, #05668D)}.rxap-container .segment-type-array>.segment-main>.segment-value{color:var(--json-array-color, #999)}.rxap-container .segment-type-object>.segment-main>.segment-value{color:var(--json-object-color, #999)}.rxap-container .segment-type-function>.segment-main>.segment-value{color:var(--json-function-color, #999)}.rxap-container .segment-type-null>.segment-main>.segment-value{color:var(--json-null-color, #fff)}.rxap-container .segment-type-undefined>.segment-main>.segment-value{color:var(--json-undefined-color, #fff)}.rxap-container .segment-type-null>.segment-main>.segment-value{background-color:var(--warn-500, darkred)}.rxap-container .segment-type-undefined>.segment-main>.segment-key{color:#999}.rxap-container .segment-type-undefined>.segment-main>.segment-value{background-color:#999}\n"]
|
|
304
|
+
}]
|
|
305
|
+
}],
|
|
306
|
+
ctorParameters: () => [],
|
|
307
|
+
propDecorators: {
|
|
308
|
+
json: [{
|
|
309
|
+
type: i0.Input,
|
|
310
|
+
args: [{
|
|
311
|
+
isSignal: true,
|
|
312
|
+
alias: "json",
|
|
313
|
+
required: false
|
|
314
|
+
}]
|
|
315
|
+
}],
|
|
316
|
+
expanded: [{
|
|
317
|
+
type: i0.Input,
|
|
318
|
+
args: [{
|
|
319
|
+
isSignal: true,
|
|
320
|
+
alias: "expanded",
|
|
321
|
+
required: false
|
|
322
|
+
}]
|
|
323
|
+
}]
|
|
324
|
+
}
|
|
325
|
+
});
|
|
326
|
+
let EmptyRouterOutletComponent = class EmptyRouterOutletComponent {
|
|
327
|
+
static {
|
|
328
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
329
|
+
minVersion: "12.0.0",
|
|
330
|
+
version: "22.3.0",
|
|
331
|
+
ngImport: i0,
|
|
332
|
+
type: EmptyRouterOutletComponent,
|
|
333
|
+
deps: [],
|
|
334
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
335
|
+
});
|
|
336
|
+
}
|
|
337
|
+
static {
|
|
338
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
339
|
+
minVersion: "14.0.0",
|
|
340
|
+
version: "22.3.0",
|
|
341
|
+
type: EmptyRouterOutletComponent,
|
|
342
|
+
isStandalone: true,
|
|
343
|
+
selector: "rxap-empty-router-outlet",
|
|
344
|
+
ngImport: i0,
|
|
345
|
+
template: "<router-outlet></router-outlet>\n",
|
|
346
|
+
dependencies: [{
|
|
347
|
+
kind: "directive",
|
|
348
|
+
type: RouterOutlet,
|
|
349
|
+
selector: "router-outlet",
|
|
350
|
+
inputs: ["name", "routerOutletData"],
|
|
351
|
+
outputs: [
|
|
352
|
+
"activate",
|
|
353
|
+
"deactivate",
|
|
354
|
+
"attach",
|
|
355
|
+
"detach"
|
|
356
|
+
],
|
|
357
|
+
exportAs: ["outlet"]
|
|
358
|
+
}],
|
|
359
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
360
|
+
});
|
|
361
|
+
}
|
|
362
|
+
};
|
|
363
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
364
|
+
minVersion: "12.0.0",
|
|
365
|
+
version: "22.3.0",
|
|
366
|
+
ngImport: i0,
|
|
367
|
+
type: EmptyRouterOutletComponent,
|
|
368
|
+
decorators: [{
|
|
217
369
|
type: Component,
|
|
218
|
-
args: [{
|
|
219
|
-
|
|
220
|
-
|
|
370
|
+
args: [{
|
|
371
|
+
selector: "rxap-empty-router-outlet",
|
|
372
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
373
|
+
imports: [RouterOutlet],
|
|
374
|
+
template: "<router-outlet></router-outlet>\n"
|
|
375
|
+
}]
|
|
376
|
+
}]
|
|
377
|
+
});
|
|
378
|
+
let CopyToClipboardButtonComponent = class CopyToClipboardButtonComponent {
|
|
221
379
|
constructor() {
|
|
222
|
-
this.value = input(
|
|
380
|
+
this.value = input("", ...ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []);
|
|
223
381
|
this.snackbar = inject(MatSnackBar);
|
|
224
382
|
}
|
|
225
383
|
copied() {
|
|
226
|
-
this.snackbar.open($localize `Successfully copied to the clipboard.`,
|
|
227
|
-
|
|
384
|
+
this.snackbar.open($localize `Successfully copied to the clipboard.`, "OK", { duration: 2500 });
|
|
385
|
+
}
|
|
386
|
+
static {
|
|
387
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
388
|
+
minVersion: "12.0.0",
|
|
389
|
+
version: "22.3.0",
|
|
390
|
+
ngImport: i0,
|
|
391
|
+
type: CopyToClipboardButtonComponent,
|
|
392
|
+
deps: [],
|
|
393
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
394
|
+
});
|
|
395
|
+
}
|
|
396
|
+
static {
|
|
397
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
398
|
+
minVersion: "17.1.0",
|
|
399
|
+
version: "22.3.0",
|
|
400
|
+
type: CopyToClipboardButtonComponent,
|
|
401
|
+
isStandalone: true,
|
|
402
|
+
selector: "rxap-copy-to-clipboard-button",
|
|
403
|
+
inputs: { value: {
|
|
404
|
+
classPropertyName: "value",
|
|
405
|
+
publicName: "value",
|
|
406
|
+
isSignal: true,
|
|
407
|
+
isRequired: false,
|
|
408
|
+
transformFunction: null
|
|
409
|
+
} },
|
|
410
|
+
ngImport: i0,
|
|
411
|
+
template: "<button\n (cdkCopyToClipboardCopied)=\"copied()\"\n (click)=\"$event.stopPropagation()\"\n [cdkCopyToClipboard]=\"value()\"\n mat-icon-button\n type=\"button\"\n>\n <mat-icon>content_copy</mat-icon>\n</button>\n",
|
|
412
|
+
styles: [""],
|
|
413
|
+
dependencies: [
|
|
414
|
+
{
|
|
415
|
+
kind: "ngmodule",
|
|
416
|
+
type: MatButtonModule
|
|
417
|
+
},
|
|
418
|
+
{
|
|
419
|
+
kind: "component",
|
|
420
|
+
type: i1.MatIconButton,
|
|
421
|
+
selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]",
|
|
422
|
+
exportAs: ["matButton", "matAnchor"]
|
|
423
|
+
},
|
|
424
|
+
{
|
|
425
|
+
kind: "ngmodule",
|
|
426
|
+
type: ClipboardModule
|
|
427
|
+
},
|
|
428
|
+
{
|
|
429
|
+
kind: "directive",
|
|
430
|
+
type: i2.CdkCopyToClipboard,
|
|
431
|
+
selector: "[cdkCopyToClipboard]",
|
|
432
|
+
inputs: ["cdkCopyToClipboard", "cdkCopyToClipboardAttempts"],
|
|
433
|
+
outputs: ["cdkCopyToClipboardCopied"]
|
|
434
|
+
},
|
|
435
|
+
{
|
|
436
|
+
kind: "ngmodule",
|
|
437
|
+
type: MatIconModule
|
|
438
|
+
},
|
|
439
|
+
{
|
|
440
|
+
kind: "component",
|
|
441
|
+
type: i2$1.MatIcon,
|
|
442
|
+
selector: "mat-icon",
|
|
443
|
+
inputs: [
|
|
444
|
+
"color",
|
|
445
|
+
"inline",
|
|
446
|
+
"svgIcon",
|
|
447
|
+
"fontSet",
|
|
448
|
+
"fontIcon"
|
|
449
|
+
],
|
|
450
|
+
exportAs: ["matIcon"]
|
|
451
|
+
},
|
|
452
|
+
{
|
|
453
|
+
kind: "ngmodule",
|
|
454
|
+
type: MatSnackBarModule
|
|
455
|
+
}
|
|
456
|
+
],
|
|
457
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
228
458
|
});
|
|
229
459
|
}
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
460
|
+
};
|
|
461
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
462
|
+
minVersion: "12.0.0",
|
|
463
|
+
version: "22.3.0",
|
|
464
|
+
ngImport: i0,
|
|
465
|
+
type: CopyToClipboardButtonComponent,
|
|
466
|
+
decorators: [{
|
|
234
467
|
type: Component,
|
|
235
|
-
args: [{
|
|
468
|
+
args: [{
|
|
469
|
+
selector: "rxap-copy-to-clipboard-button",
|
|
470
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
471
|
+
imports: [
|
|
236
472
|
MatButtonModule,
|
|
237
473
|
ClipboardModule,
|
|
238
474
|
MatIconModule,
|
|
239
|
-
MatSnackBarModule
|
|
240
|
-
],
|
|
241
|
-
|
|
242
|
-
|
|
475
|
+
MatSnackBarModule
|
|
476
|
+
],
|
|
477
|
+
template: "<button\n (cdkCopyToClipboardCopied)=\"copied()\"\n (click)=\"$event.stopPropagation()\"\n [cdkCopyToClipboard]=\"value()\"\n mat-icon-button\n type=\"button\"\n>\n <mat-icon>content_copy</mat-icon>\n</button>\n"
|
|
478
|
+
}]
|
|
479
|
+
}],
|
|
480
|
+
propDecorators: { value: [{
|
|
481
|
+
type: i0.Input,
|
|
482
|
+
args: [{
|
|
483
|
+
isSignal: true,
|
|
484
|
+
alias: "value",
|
|
485
|
+
required: false
|
|
486
|
+
}]
|
|
487
|
+
}] }
|
|
488
|
+
});
|
|
489
|
+
let CopyToClipboardComponent = class CopyToClipboardComponent {
|
|
243
490
|
constructor() {
|
|
244
|
-
this.active = input(true, ...
|
|
245
|
-
this.disabled = input(false, ...
|
|
246
|
-
this.value = input.required(...
|
|
247
|
-
this.containerClass = input(
|
|
248
|
-
this.position = input(
|
|
249
|
-
this.isPositionBefore = computed(() => this.position() ===
|
|
250
|
-
this.isPositionAfter = computed(() => this.position() ===
|
|
251
|
-
}
|
|
252
|
-
static {
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
491
|
+
this.active = input(true, ...ngDevMode ? [{ debugName: "active" }] : /* istanbul ignore next */ []);
|
|
492
|
+
this.disabled = input(false, ...ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []);
|
|
493
|
+
this.value = input.required(...ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []);
|
|
494
|
+
this.containerClass = input("flex flex-row gap-2", ...ngDevMode ? [{ debugName: "containerClass" }] : /* istanbul ignore next */ []);
|
|
495
|
+
this.position = input("before", ...ngDevMode ? [{ debugName: "position" }] : /* istanbul ignore next */ []);
|
|
496
|
+
this.isPositionBefore = computed(() => this.position() === "before", ...ngDevMode ? [{ debugName: "isPositionBefore" }] : /* istanbul ignore next */ []);
|
|
497
|
+
this.isPositionAfter = computed(() => this.position() === "after", ...ngDevMode ? [{ debugName: "isPositionAfter" }] : /* istanbul ignore next */ []);
|
|
498
|
+
}
|
|
499
|
+
static {
|
|
500
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
501
|
+
minVersion: "12.0.0",
|
|
502
|
+
version: "22.3.0",
|
|
503
|
+
ngImport: i0,
|
|
504
|
+
type: CopyToClipboardComponent,
|
|
505
|
+
deps: [],
|
|
506
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
507
|
+
});
|
|
508
|
+
}
|
|
509
|
+
static {
|
|
510
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
511
|
+
minVersion: "17.0.0",
|
|
512
|
+
version: "22.3.0",
|
|
513
|
+
type: CopyToClipboardComponent,
|
|
514
|
+
isStandalone: true,
|
|
515
|
+
selector: "rxap-copy-to-clipboard",
|
|
516
|
+
inputs: {
|
|
517
|
+
active: {
|
|
518
|
+
classPropertyName: "active",
|
|
519
|
+
publicName: "active",
|
|
520
|
+
isSignal: true,
|
|
521
|
+
isRequired: false,
|
|
522
|
+
transformFunction: null
|
|
523
|
+
},
|
|
524
|
+
disabled: {
|
|
525
|
+
classPropertyName: "disabled",
|
|
526
|
+
publicName: "disabled",
|
|
527
|
+
isSignal: true,
|
|
528
|
+
isRequired: false,
|
|
529
|
+
transformFunction: null
|
|
530
|
+
},
|
|
531
|
+
value: {
|
|
532
|
+
classPropertyName: "value",
|
|
533
|
+
publicName: "value",
|
|
534
|
+
isSignal: true,
|
|
535
|
+
isRequired: true,
|
|
536
|
+
transformFunction: null
|
|
537
|
+
},
|
|
538
|
+
containerClass: {
|
|
539
|
+
classPropertyName: "containerClass",
|
|
540
|
+
publicName: "containerClass",
|
|
541
|
+
isSignal: true,
|
|
542
|
+
isRequired: false,
|
|
543
|
+
transformFunction: null
|
|
544
|
+
},
|
|
545
|
+
position: {
|
|
546
|
+
classPropertyName: "position",
|
|
547
|
+
publicName: "position",
|
|
548
|
+
isSignal: true,
|
|
549
|
+
isRequired: false,
|
|
550
|
+
transformFunction: null
|
|
551
|
+
}
|
|
552
|
+
},
|
|
553
|
+
ngImport: i0,
|
|
554
|
+
template: "<div class=\"flex flex-row gap-2 items-center\">\n @if (active() && isPositionBefore()) {\n <rxap-copy-to-clipboard-button [value]=\"value()\" class=\"w-[40px]\"></rxap-copy-to-clipboard-button>\n }\n <span #ref class=\"grow {{ containerClass() }}\" [ngClass]=\"{ 'hidden': !ref.innerHTML.trim() }\"><ng-content></ng-content></span>\n @if (!ref.innerHTML.trim()) {\n <span class=\"grow\">{{ value() }}</span>\n }\n @if (active() && isPositionAfter()) {\n <rxap-copy-to-clipboard-button [value]=\"value()\" class=\"w-[40px]\"></rxap-copy-to-clipboard-button>\n }\n</div>\n",
|
|
555
|
+
styles: [""],
|
|
556
|
+
dependencies: [{
|
|
557
|
+
kind: "component",
|
|
558
|
+
type: CopyToClipboardButtonComponent,
|
|
559
|
+
selector: "rxap-copy-to-clipboard-button",
|
|
560
|
+
inputs: ["value"]
|
|
561
|
+
}, {
|
|
562
|
+
kind: "directive",
|
|
563
|
+
type: NgClass,
|
|
564
|
+
selector: "[ngClass]",
|
|
565
|
+
inputs: ["class", "ngClass"]
|
|
566
|
+
}],
|
|
567
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
568
|
+
});
|
|
569
|
+
}
|
|
570
|
+
};
|
|
571
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
572
|
+
minVersion: "12.0.0",
|
|
573
|
+
version: "22.3.0",
|
|
574
|
+
ngImport: i0,
|
|
575
|
+
type: CopyToClipboardComponent,
|
|
576
|
+
decorators: [{
|
|
256
577
|
type: Component,
|
|
257
|
-
args: [{
|
|
258
|
-
|
|
259
|
-
|
|
578
|
+
args: [{
|
|
579
|
+
selector: "rxap-copy-to-clipboard",
|
|
580
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
581
|
+
imports: [CopyToClipboardButtonComponent, NgClass],
|
|
582
|
+
template: "<div class=\"flex flex-row gap-2 items-center\">\n @if (active() && isPositionBefore()) {\n <rxap-copy-to-clipboard-button [value]=\"value()\" class=\"w-[40px]\"></rxap-copy-to-clipboard-button>\n }\n <span #ref class=\"grow {{ containerClass() }}\" [ngClass]=\"{ 'hidden': !ref.innerHTML.trim() }\"><ng-content></ng-content></span>\n @if (!ref.innerHTML.trim()) {\n <span class=\"grow\">{{ value() }}</span>\n }\n @if (active() && isPositionAfter()) {\n <rxap-copy-to-clipboard-button [value]=\"value()\" class=\"w-[40px]\"></rxap-copy-to-clipboard-button>\n }\n</div>\n"
|
|
583
|
+
}]
|
|
584
|
+
}],
|
|
585
|
+
propDecorators: {
|
|
586
|
+
active: [{
|
|
587
|
+
type: i0.Input,
|
|
588
|
+
args: [{
|
|
589
|
+
isSignal: true,
|
|
590
|
+
alias: "active",
|
|
591
|
+
required: false
|
|
592
|
+
}]
|
|
593
|
+
}],
|
|
594
|
+
disabled: [{
|
|
595
|
+
type: i0.Input,
|
|
596
|
+
args: [{
|
|
597
|
+
isSignal: true,
|
|
598
|
+
alias: "disabled",
|
|
599
|
+
required: false
|
|
600
|
+
}]
|
|
601
|
+
}],
|
|
602
|
+
value: [{
|
|
603
|
+
type: i0.Input,
|
|
604
|
+
args: [{
|
|
605
|
+
isSignal: true,
|
|
606
|
+
alias: "value",
|
|
607
|
+
required: true
|
|
608
|
+
}]
|
|
609
|
+
}],
|
|
610
|
+
containerClass: [{
|
|
611
|
+
type: i0.Input,
|
|
612
|
+
args: [{
|
|
613
|
+
isSignal: true,
|
|
614
|
+
alias: "containerClass",
|
|
615
|
+
required: false
|
|
616
|
+
}]
|
|
617
|
+
}],
|
|
618
|
+
position: [{
|
|
619
|
+
type: i0.Input,
|
|
620
|
+
args: [{
|
|
621
|
+
isSignal: true,
|
|
622
|
+
alias: "position",
|
|
623
|
+
required: false
|
|
624
|
+
}]
|
|
625
|
+
}]
|
|
626
|
+
}
|
|
627
|
+
});
|
|
628
|
+
let ConfirmComponent = class ConfirmComponent {
|
|
260
629
|
constructor() {
|
|
261
630
|
this.confirmed = output();
|
|
262
631
|
this.unconfirmed = output();
|
|
263
632
|
}
|
|
264
|
-
static {
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
633
|
+
static {
|
|
634
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
635
|
+
minVersion: "12.0.0",
|
|
636
|
+
version: "22.3.0",
|
|
637
|
+
ngImport: i0,
|
|
638
|
+
type: ConfirmComponent,
|
|
639
|
+
deps: [],
|
|
640
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
641
|
+
});
|
|
642
|
+
}
|
|
643
|
+
static {
|
|
644
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
645
|
+
minVersion: "14.0.0",
|
|
646
|
+
version: "22.3.0",
|
|
647
|
+
type: ConfirmComponent,
|
|
648
|
+
isStandalone: true,
|
|
649
|
+
selector: "rxap-confirm",
|
|
650
|
+
outputs: {
|
|
651
|
+
confirmed: "confirmed",
|
|
652
|
+
unconfirmed: "unconfirmed"
|
|
653
|
+
},
|
|
654
|
+
ngImport: i0,
|
|
655
|
+
template: "<div class=\"rxap-container shadow-lg hover:shadow-xl flex flex-row gap-1\">\n <button (click)=\"confirmed.emit()\" class=\"accept\" mat-icon-button type=\"button\">\n <mat-icon>done</mat-icon>\n </button>\n <button (click)=\"unconfirmed.emit()\" class=\"decline\" mat-icon-button type=\"button\">\n <mat-icon>clear</mat-icon>\n </button>\n</div>\n",
|
|
656
|
+
styles: [".rxap-container{border-radius:8px;padding:4px;background-color:var(--background-color, white)}.rxap-container .accept{color:var(--accept-color, rgb(115, 190, 105))}.rxap-container .decline{color:var(--decline-color, rgb(204, 73, 51))}\n"],
|
|
657
|
+
dependencies: [
|
|
658
|
+
{
|
|
659
|
+
kind: "ngmodule",
|
|
660
|
+
type: MatButtonModule
|
|
661
|
+
},
|
|
662
|
+
{
|
|
663
|
+
kind: "component",
|
|
664
|
+
type: i1.MatIconButton,
|
|
665
|
+
selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]",
|
|
666
|
+
exportAs: ["matButton", "matAnchor"]
|
|
667
|
+
},
|
|
668
|
+
{
|
|
669
|
+
kind: "ngmodule",
|
|
670
|
+
type: MatIconModule
|
|
671
|
+
},
|
|
672
|
+
{
|
|
673
|
+
kind: "component",
|
|
674
|
+
type: i2$1.MatIcon,
|
|
675
|
+
selector: "mat-icon",
|
|
676
|
+
inputs: [
|
|
677
|
+
"color",
|
|
678
|
+
"inline",
|
|
679
|
+
"svgIcon",
|
|
680
|
+
"fontSet",
|
|
681
|
+
"fontIcon"
|
|
682
|
+
],
|
|
683
|
+
exportAs: ["matIcon"]
|
|
684
|
+
}
|
|
685
|
+
],
|
|
686
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
687
|
+
});
|
|
688
|
+
}
|
|
689
|
+
};
|
|
690
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
691
|
+
minVersion: "12.0.0",
|
|
692
|
+
version: "22.3.0",
|
|
693
|
+
ngImport: i0,
|
|
694
|
+
type: ConfirmComponent,
|
|
695
|
+
decorators: [{
|
|
268
696
|
type: Component,
|
|
269
|
-
args: [{
|
|
270
|
-
|
|
271
|
-
|
|
697
|
+
args: [{
|
|
698
|
+
selector: "rxap-confirm",
|
|
699
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
700
|
+
imports: [MatButtonModule, MatIconModule],
|
|
701
|
+
template: "<div class=\"rxap-container shadow-lg hover:shadow-xl flex flex-row gap-1\">\n <button (click)=\"confirmed.emit()\" class=\"accept\" mat-icon-button type=\"button\">\n <mat-icon>done</mat-icon>\n </button>\n <button (click)=\"unconfirmed.emit()\" class=\"decline\" mat-icon-button type=\"button\">\n <mat-icon>clear</mat-icon>\n </button>\n</div>\n",
|
|
702
|
+
styles: [".rxap-container{border-radius:8px;padding:4px;background-color:var(--background-color, white)}.rxap-container .accept{color:var(--accept-color, rgb(115, 190, 105))}.rxap-container .decline{color:var(--decline-color, rgb(204, 73, 51))}\n"]
|
|
703
|
+
}]
|
|
704
|
+
}],
|
|
705
|
+
propDecorators: {
|
|
706
|
+
confirmed: [{
|
|
707
|
+
type: i0.Output,
|
|
708
|
+
args: ["confirmed"]
|
|
709
|
+
}],
|
|
710
|
+
unconfirmed: [{
|
|
711
|
+
type: i0.Output,
|
|
712
|
+
args: ["unconfirmed"]
|
|
713
|
+
}]
|
|
714
|
+
}
|
|
715
|
+
});
|
|
716
|
+
let ConfirmDirective = class ConfirmDirective {
|
|
272
717
|
constructor() {
|
|
273
718
|
this.overlay = inject(Overlay);
|
|
274
719
|
this.elementRef = inject(ElementRef);
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
720
|
+
this.eventValueInput = input("", {
|
|
721
|
+
...ngDevMode ? { debugName: "eventValueInput" } : /* istanbul ignore next */ {},
|
|
722
|
+
alias: "rxapConfirm"
|
|
723
|
+
});
|
|
278
724
|
this.eventValue = computed(() => {
|
|
279
725
|
const value = this.eventValueInput();
|
|
280
|
-
return value !==
|
|
281
|
-
}, ...
|
|
726
|
+
return value !== "" ? value : void 0;
|
|
727
|
+
}, ...ngDevMode ? [{ debugName: "eventValue" }] : /* istanbul ignore next */ []);
|
|
282
728
|
this.confirmed = output();
|
|
283
729
|
this.unconfirmed = output();
|
|
284
730
|
this.subscription = null;
|
|
@@ -286,18 +732,12 @@ class ConfirmDirective {
|
|
|
286
732
|
this.positionStrategy = this.createPositionStrategy();
|
|
287
733
|
}
|
|
288
734
|
createPositionStrategy() {
|
|
289
|
-
return this.overlay
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
originY: 'bottom',
|
|
296
|
-
overlayX: 'start',
|
|
297
|
-
overlayY: 'top',
|
|
298
|
-
},
|
|
299
|
-
])
|
|
300
|
-
.withDefaultOffsetY(10);
|
|
735
|
+
return this.overlay.position().flexibleConnectedTo(this.elementRef.nativeElement).withPositions([{
|
|
736
|
+
originX: "start",
|
|
737
|
+
originY: "bottom",
|
|
738
|
+
overlayX: "start",
|
|
739
|
+
overlayY: "top"
|
|
740
|
+
}]).withDefaultOffsetY(10);
|
|
301
741
|
}
|
|
302
742
|
onClick($event) {
|
|
303
743
|
this.openConfirmOverly();
|
|
@@ -307,32 +747,22 @@ class ConfirmDirective {
|
|
|
307
747
|
this.overlayRef?.dispose();
|
|
308
748
|
}
|
|
309
749
|
openConfirmOverly() {
|
|
310
|
-
if (this.isOverlyOpen)
|
|
750
|
+
if (this.isOverlyOpen)
|
|
311
751
|
return;
|
|
312
|
-
}
|
|
313
752
|
this.isOverlyOpen = true;
|
|
314
|
-
if (this.overlayRef)
|
|
315
|
-
// a position strategy can only be attached to a single overlay; the previous one is disposed
|
|
753
|
+
if (this.overlayRef)
|
|
316
754
|
this.positionStrategy = this.createPositionStrategy();
|
|
317
|
-
}
|
|
318
755
|
this.overlayRef = this.overlay.create({
|
|
319
756
|
scrollStrategy: this.overlay.scrollStrategies.close(),
|
|
320
|
-
positionStrategy: this.positionStrategy
|
|
757
|
+
positionStrategy: this.positionStrategy
|
|
321
758
|
});
|
|
322
759
|
const componentPortal = new ComponentPortal(ConfirmComponent);
|
|
323
760
|
const componentRef = this.overlayRef.attach(componentPortal);
|
|
324
761
|
this.subscription?.unsubscribe();
|
|
325
762
|
this.subscription = new Subscription();
|
|
326
|
-
this.subscription.add(outputToObservable(componentRef.instance.confirmed)
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
this.subscription.add(outputToObservable(componentRef.instance.unconfirmed)
|
|
330
|
-
.pipe(take(1), tap(() => this.onUnconfirmed(this.eventValue())), tap(() => this.overlayRef?.dispose()), tap(() => this.isOverlyOpen = false), tap(() => (this.subscription = null)), tap(() => this.subscription?.unsubscribe()))
|
|
331
|
-
.subscribe());
|
|
332
|
-
this.subscription.add(this.overlayRef
|
|
333
|
-
.detachments()
|
|
334
|
-
.pipe(take(1), tap(() => this.isOverlyOpen = false), tap(() => (this.subscription = null)), tap(() => this.subscription?.unsubscribe()))
|
|
335
|
-
.subscribe());
|
|
763
|
+
this.subscription.add(outputToObservable(componentRef.instance.confirmed).pipe(take(1), tap(() => this.onConfirmed(this.eventValue())), tap(() => this.overlayRef?.dispose()), tap(() => this.isOverlyOpen = false), tap(() => this.subscription = null), tap(() => this.subscription?.unsubscribe())).subscribe());
|
|
764
|
+
this.subscription.add(outputToObservable(componentRef.instance.unconfirmed).pipe(take(1), tap(() => this.onUnconfirmed(this.eventValue())), tap(() => this.overlayRef?.dispose()), tap(() => this.isOverlyOpen = false), tap(() => this.subscription = null), tap(() => this.subscription?.unsubscribe())).subscribe());
|
|
765
|
+
this.subscription.add(this.overlayRef.detachments().pipe(take(1), tap(() => this.isOverlyOpen = false), tap(() => this.subscription = null), tap(() => this.subscription?.unsubscribe())).subscribe());
|
|
336
766
|
}
|
|
337
767
|
onConfirmed(eventValue) {
|
|
338
768
|
this.confirmed.emit(eventValue);
|
|
@@ -340,22 +770,72 @@ class ConfirmDirective {
|
|
|
340
770
|
onUnconfirmed(eventValue) {
|
|
341
771
|
this.unconfirmed.emit(eventValue);
|
|
342
772
|
}
|
|
343
|
-
static {
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
773
|
+
static {
|
|
774
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
775
|
+
minVersion: "12.0.0",
|
|
776
|
+
version: "22.3.0",
|
|
777
|
+
ngImport: i0,
|
|
778
|
+
type: ConfirmDirective,
|
|
779
|
+
deps: [],
|
|
780
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
781
|
+
});
|
|
782
|
+
}
|
|
783
|
+
static {
|
|
784
|
+
this.ɵdir = i0.ɵɵngDeclareDirective({
|
|
785
|
+
minVersion: "17.1.0",
|
|
786
|
+
version: "22.3.0",
|
|
787
|
+
type: ConfirmDirective,
|
|
788
|
+
isStandalone: true,
|
|
789
|
+
selector: "[rxapConfirm]",
|
|
790
|
+
inputs: { eventValueInput: {
|
|
791
|
+
classPropertyName: "eventValueInput",
|
|
792
|
+
publicName: "rxapConfirm",
|
|
793
|
+
isSignal: true,
|
|
794
|
+
isRequired: false,
|
|
795
|
+
transformFunction: null
|
|
796
|
+
} },
|
|
797
|
+
outputs: {
|
|
798
|
+
confirmed: "confirmed",
|
|
799
|
+
unconfirmed: "unconfirmed"
|
|
800
|
+
},
|
|
801
|
+
host: { listeners: { "click": "onClick($event)" } },
|
|
802
|
+
ngImport: i0
|
|
803
|
+
});
|
|
804
|
+
}
|
|
805
|
+
};
|
|
806
|
+
ConfirmDirective = __decorate([
|
|
807
|
+
__metadata("design:paramtypes", [])], ConfirmDirective);
|
|
808
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
809
|
+
minVersion: "12.0.0",
|
|
810
|
+
version: "22.3.0",
|
|
811
|
+
ngImport: i0,
|
|
812
|
+
type: ConfirmDirective,
|
|
813
|
+
decorators: [{
|
|
347
814
|
type: Directive,
|
|
348
815
|
args: [{
|
|
349
|
-
selector:
|
|
816
|
+
selector: "[rxapConfirm]",
|
|
350
817
|
standalone: true,
|
|
351
|
-
host: {
|
|
352
|
-
'(click)': 'onClick($event)',
|
|
353
|
-
},
|
|
818
|
+
host: { "(click)": "onClick($event)" }
|
|
354
819
|
}]
|
|
355
|
-
}],
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
820
|
+
}],
|
|
821
|
+
ctorParameters: () => [],
|
|
822
|
+
propDecorators: {
|
|
823
|
+
eventValueInput: [{
|
|
824
|
+
type: i0.Input,
|
|
825
|
+
args: [{
|
|
826
|
+
isSignal: true,
|
|
827
|
+
alias: "rxapConfirm",
|
|
828
|
+
required: false
|
|
829
|
+
}]
|
|
830
|
+
}],
|
|
831
|
+
confirmed: [{
|
|
832
|
+
type: i0.Output,
|
|
833
|
+
args: ["confirmed"]
|
|
834
|
+
}],
|
|
835
|
+
unconfirmed: [{
|
|
836
|
+
type: i0.Output,
|
|
837
|
+
args: ["unconfirmed"]
|
|
838
|
+
}]
|
|
839
|
+
}
|
|
840
|
+
});
|
|
361
841
|
export { ConfirmComponent, ConfirmDirective, CopyToClipboardButtonComponent, CopyToClipboardComponent, EmptyRouterOutletComponent, JSON_VIEW_IGNORED_PROPERTIES, JSON_VIEW_IGNORED_TYPES, JsonViewerComponent, NavigateBackButtonComponent };
|