@rxap/ngx-changelog 21.0.1 → 22.0.0-dev.0
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 +8 -0
- package/compodoc/changelog.html +7 -0
- package/compodoc/dependencies.html +7 -7
- package/compodoc/js/search/search_index.js +2 -2
- package/compodoc/properties.html +1 -1
- package/docs/documentation.json +299 -299
- package/docs/html/classes/ChangelogComponent.html +2 -2
- package/docs/html/classes/ChangelogControllerGetLatestRemoteMethod.html +14 -14
- package/docs/html/classes/ChangelogControllerGetVersionRemoteMethod.html +14 -14
- package/docs/html/classes/ChangelogControllerListRemoteMethod.html +14 -14
- package/docs/html/classes/ChangelogDialogComponent.html +2 -2
- package/docs/html/classes/ChangelogService.html +2 -2
- package/docs/html/functions/ProvideChangelog.html +1 -1
- package/docs/html/index.html +2 -2
- package/docs/html/interfaces/ChangelogControllerGetLatestParameter.html +2 -2
- package/docs/html/interfaces/ChangelogControllerGetLatestResponse.html +2 -2
- package/docs/html/interfaces/ChangelogControllerGetVersionParameter.html +2 -2
- package/docs/html/interfaces/ChangelogControllerGetVersionResponse.html +2 -2
- package/docs/html/interfaces/ChangelogDto.html +2 -2
- package/docs/html/modules.html +1 -1
- package/docs/html/types/ChangelogControllerListResponse.html +1 -1
- package/docs/html/variables/RXAP_CHANGELOG_DISABLED.html +1 -1
- package/docs/html/variables/RXAP_CHANGELOG_LAST_VERSION.html +1 -1
- package/docs/markdown/README.md +1 -1
- package/docs/markdown/classes/ChangelogComponent.md +11 -11
- package/docs/markdown/classes/ChangelogControllerGetLatestRemoteMethod.md +51 -51
- package/docs/markdown/classes/ChangelogControllerGetVersionRemoteMethod.md +51 -51
- package/docs/markdown/classes/ChangelogControllerListRemoteMethod.md +51 -51
- package/docs/markdown/classes/ChangelogDialogComponent.md +7 -7
- package/docs/markdown/classes/ChangelogService.md +7 -7
- package/docs/markdown/functions/ProvideChangelog.md +2 -2
- package/docs/markdown/globals.md +2 -2
- package/docs/markdown/interfaces/ChangelogControllerGetLatestParameter.md +3 -3
- package/docs/markdown/interfaces/ChangelogControllerGetLatestResponse.md +4 -4
- package/docs/markdown/interfaces/ChangelogControllerGetVersionParameter.md +4 -4
- package/docs/markdown/interfaces/ChangelogControllerGetVersionResponse.md +4 -4
- package/docs/markdown/interfaces/ChangelogDto.md +4 -4
- package/docs/markdown/type-aliases/ChangelogControllerListResponse.md +2 -2
- package/docs/markdown/variables/RXAP_CHANGELOG_DISABLED.md +2 -2
- package/docs/markdown/variables/RXAP_CHANGELOG_LAST_VERSION.md +2 -2
- package/docs/wiki/Class.ChangelogComponent.md +10 -10
- package/docs/wiki/Class.ChangelogControllerGetLatestRemoteMethod.md +50 -50
- package/docs/wiki/Class.ChangelogControllerGetVersionRemoteMethod.md +50 -50
- package/docs/wiki/Class.ChangelogControllerListRemoteMethod.md +50 -50
- package/docs/wiki/Class.ChangelogDialogComponent.md +6 -6
- package/docs/wiki/Class.ChangelogService.md +6 -6
- package/docs/wiki/Function.ProvideChangelog.md +1 -1
- package/docs/wiki/Interface.ChangelogControllerGetLatestParameter.md +2 -2
- package/docs/wiki/Interface.ChangelogControllerGetLatestResponse.md +3 -3
- package/docs/wiki/Interface.ChangelogControllerGetVersionParameter.md +3 -3
- package/docs/wiki/Interface.ChangelogControllerGetVersionResponse.md +3 -3
- package/docs/wiki/Interface.ChangelogDto.md +3 -3
- package/docs/wiki/TypeAlias.ChangelogControllerListResponse.md +1 -1
- package/docs/wiki/Variable.RXAP_CHANGELOG_DISABLED.md +1 -1
- package/docs/wiki/Variable.RXAP_CHANGELOG_LAST_VERSION.md +1 -1
- package/docs/wiki/globals.md +1 -1
- package/fesm2022/rxap-ngx-changelog.mjs +375 -130
- package/fesm2022/rxap-ngx-changelog.mjs.map +1 -1
- package/package.json +22 -22
- package/types/rxap-ngx-changelog.d.ts +78 -89
|
@@ -1,120 +1,171 @@
|
|
|
1
|
-
import { __decorate, __metadata } from
|
|
2
|
-
import * as i0 from
|
|
3
|
-
import {
|
|
4
|
-
import { OpenApiRemoteMethod, RxapOpenApiRemoteMethod } from
|
|
5
|
-
import * as i1
|
|
6
|
-
import { FormsModule } from
|
|
7
|
-
import { NgClass } from
|
|
8
|
-
import { MethodTemplateDirective } from
|
|
9
|
-
import { RXAP_ENVIRONMENT } from
|
|
10
|
-
import * as i1 from
|
|
11
|
-
import { MarkdownModule } from
|
|
12
|
-
import { outputToObservable } from
|
|
13
|
-
import { take } from
|
|
14
|
-
import { tap } from
|
|
1
|
+
import { __decorate, __metadata } from "tslib";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
import { ApplicationRef, ChangeDetectionStrategy, Component, Injectable, afterNextRender, computed, createComponent, inject, output, provideAppInitializer, signal, viewChild } from "@angular/core";
|
|
4
|
+
import { OpenApiRemoteMethod, RxapOpenApiRemoteMethod } from "@rxap/open-api/remote-method";
|
|
5
|
+
import * as i1 from "@angular/forms";
|
|
6
|
+
import { FormsModule } from "@angular/forms";
|
|
7
|
+
import { NgClass } from "@angular/common";
|
|
8
|
+
import { MethodTemplateDirective } from "@rxap/directives";
|
|
9
|
+
import { RXAP_ENVIRONMENT } from "@rxap/environment";
|
|
10
|
+
import * as i1$1 from "ngx-markdown";
|
|
11
|
+
import { MarkdownModule } from "ngx-markdown";
|
|
12
|
+
import { outputToObservable } from "@angular/core/rxjs-interop";
|
|
13
|
+
import { take } from "rxjs";
|
|
14
|
+
import { tap } from "rxjs/operators";
|
|
15
15
|
let ChangelogControllerGetLatestRemoteMethod = class ChangelogControllerGetLatestRemoteMethod extends OpenApiRemoteMethod {
|
|
16
16
|
call(parameters) {
|
|
17
17
|
return super.call(parameters);
|
|
18
18
|
}
|
|
19
|
-
static {
|
|
20
|
-
|
|
19
|
+
static {
|
|
20
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
21
|
+
minVersion: "12.0.0",
|
|
22
|
+
version: "22.3.0",
|
|
23
|
+
ngImport: i0,
|
|
24
|
+
type: ChangelogControllerGetLatestRemoteMethod,
|
|
25
|
+
deps: null,
|
|
26
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
static {
|
|
30
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
31
|
+
minVersion: "12.0.0",
|
|
32
|
+
version: "22.3.0",
|
|
33
|
+
ngImport: i0,
|
|
34
|
+
type: ChangelogControllerGetLatestRemoteMethod,
|
|
35
|
+
providedIn: "root"
|
|
36
|
+
});
|
|
37
|
+
}
|
|
21
38
|
};
|
|
22
|
-
ChangelogControllerGetLatestRemoteMethod = __decorate([
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
39
|
+
ChangelogControllerGetLatestRemoteMethod = __decorate([RxapOpenApiRemoteMethod({
|
|
40
|
+
serverId: "service-changelog",
|
|
41
|
+
operationId: "ChangelogController_getLatest",
|
|
42
|
+
operation: "{\"operationId\":\"ChangelogController_getLatest\",\"parameters\":[{\"name\":\"application\",\"required\":true,\"in\":\"path\",\"schema\":{\"type\":\"string\"}}],\"responses\":{\"200\":{\"content\":{\"application/json\":{\"schema\":{\"type\":\"object\",\"properties\":{\"general\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}},\"application\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}}},\"required\":[\"general\",\"application\"]}}}}},\"method\":\"get\",\"path\":\"/latest/{application}\"}"
|
|
43
|
+
})], ChangelogControllerGetLatestRemoteMethod);
|
|
44
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
45
|
+
minVersion: "12.0.0",
|
|
46
|
+
version: "22.3.0",
|
|
47
|
+
ngImport: i0,
|
|
48
|
+
type: ChangelogControllerGetLatestRemoteMethod,
|
|
49
|
+
decorators: [{
|
|
30
50
|
type: Injectable,
|
|
31
|
-
args: [{
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}] });
|
|
51
|
+
args: [{ providedIn: "root" }]
|
|
52
|
+
}]
|
|
53
|
+
});
|
|
35
54
|
let ChangelogControllerGetVersionRemoteMethod = class ChangelogControllerGetVersionRemoteMethod extends OpenApiRemoteMethod {
|
|
36
55
|
call(parameters) {
|
|
37
56
|
return super.call(parameters);
|
|
38
57
|
}
|
|
39
|
-
static {
|
|
40
|
-
|
|
58
|
+
static {
|
|
59
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
60
|
+
minVersion: "12.0.0",
|
|
61
|
+
version: "22.3.0",
|
|
62
|
+
ngImport: i0,
|
|
63
|
+
type: ChangelogControllerGetVersionRemoteMethod,
|
|
64
|
+
deps: null,
|
|
65
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
static {
|
|
69
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
70
|
+
minVersion: "12.0.0",
|
|
71
|
+
version: "22.3.0",
|
|
72
|
+
ngImport: i0,
|
|
73
|
+
type: ChangelogControllerGetVersionRemoteMethod,
|
|
74
|
+
providedIn: "root"
|
|
75
|
+
});
|
|
76
|
+
}
|
|
41
77
|
};
|
|
42
|
-
ChangelogControllerGetVersionRemoteMethod = __decorate([
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
78
|
+
ChangelogControllerGetVersionRemoteMethod = __decorate([RxapOpenApiRemoteMethod({
|
|
79
|
+
serverId: "service-changelog",
|
|
80
|
+
operationId: "ChangelogController_getVersion",
|
|
81
|
+
operation: "{\"operationId\":\"ChangelogController_getVersion\",\"parameters\":[{\"name\":\"version\",\"required\":true,\"in\":\"path\",\"schema\":{\"type\":\"string\"}},{\"name\":\"application\",\"required\":true,\"in\":\"path\",\"schema\":{\"type\":\"string\"}}],\"responses\":{\"200\":{\"content\":{\"application/json\":{\"schema\":{\"type\":\"object\",\"properties\":{\"general\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}},\"application\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}}},\"required\":[\"general\",\"application\"]}}}}},\"method\":\"get\",\"path\":\"/{version}/{application}\"}"
|
|
82
|
+
})], ChangelogControllerGetVersionRemoteMethod);
|
|
83
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
84
|
+
minVersion: "12.0.0",
|
|
85
|
+
version: "22.3.0",
|
|
86
|
+
ngImport: i0,
|
|
87
|
+
type: ChangelogControllerGetVersionRemoteMethod,
|
|
88
|
+
decorators: [{
|
|
50
89
|
type: Injectable,
|
|
51
|
-
args: [{
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
}] });
|
|
90
|
+
args: [{ providedIn: "root" }]
|
|
91
|
+
}]
|
|
92
|
+
});
|
|
55
93
|
let ChangelogControllerListRemoteMethod = class ChangelogControllerListRemoteMethod extends OpenApiRemoteMethod {
|
|
56
94
|
call() {
|
|
57
95
|
return super.call();
|
|
58
96
|
}
|
|
59
|
-
static {
|
|
60
|
-
|
|
97
|
+
static {
|
|
98
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
99
|
+
minVersion: "12.0.0",
|
|
100
|
+
version: "22.3.0",
|
|
101
|
+
ngImport: i0,
|
|
102
|
+
type: ChangelogControllerListRemoteMethod,
|
|
103
|
+
deps: null,
|
|
104
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
static {
|
|
108
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
109
|
+
minVersion: "12.0.0",
|
|
110
|
+
version: "22.3.0",
|
|
111
|
+
ngImport: i0,
|
|
112
|
+
type: ChangelogControllerListRemoteMethod,
|
|
113
|
+
providedIn: "root"
|
|
114
|
+
});
|
|
115
|
+
}
|
|
61
116
|
};
|
|
62
|
-
ChangelogControllerListRemoteMethod = __decorate([
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
117
|
+
ChangelogControllerListRemoteMethod = __decorate([RxapOpenApiRemoteMethod({
|
|
118
|
+
serverId: "service-changelog",
|
|
119
|
+
operationId: "ChangelogController_list",
|
|
120
|
+
operation: "{\"operationId\":\"ChangelogController_list\",\"parameters\":[],\"responses\":{\"200\":{\"content\":{\"application/json\":{\"schema\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}}}}}},\"method\":\"get\",\"path\":\"/available-versions\"}"
|
|
121
|
+
})], ChangelogControllerListRemoteMethod);
|
|
122
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
123
|
+
minVersion: "12.0.0",
|
|
124
|
+
version: "22.3.0",
|
|
125
|
+
ngImport: i0,
|
|
126
|
+
type: ChangelogControllerListRemoteMethod,
|
|
127
|
+
decorators: [{
|
|
70
128
|
type: Injectable,
|
|
71
|
-
args: [{
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
class ChangelogComponent {
|
|
129
|
+
args: [{ providedIn: "root" }]
|
|
130
|
+
}]
|
|
131
|
+
});
|
|
132
|
+
var ChangelogComponent = class ChangelogComponent {
|
|
76
133
|
constructor() {
|
|
77
|
-
this.availableVersions = signal([], ...
|
|
78
|
-
this.error = signal(null, ...
|
|
79
|
-
this.activeIndex = signal(-1, ...
|
|
134
|
+
this.availableVersions = signal([], ...ngDevMode ? [{ debugName: "availableVersions" }] : /* istanbul ignore next */ []);
|
|
135
|
+
this.error = signal(null, ...ngDevMode ? [{ debugName: "error" }] : /* istanbul ignore next */ []);
|
|
136
|
+
this.activeIndex = signal(-1, ...ngDevMode ? [{ debugName: "activeIndex" }] : /* istanbul ignore next */ []);
|
|
80
137
|
this.selectedVersion = computed(() => {
|
|
81
138
|
const activeIndex = this.activeIndex();
|
|
82
139
|
const availableVersions = this.availableVersions();
|
|
83
|
-
if (activeIndex > -1)
|
|
84
|
-
return availableVersions[activeIndex] ??
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
}, ...(ngDevMode ? [{ debugName: "selectedVersion" }] : /* istanbul ignore next */ []));
|
|
140
|
+
if (activeIndex > -1)
|
|
141
|
+
return availableVersions[activeIndex] ?? "latest";
|
|
142
|
+
return availableVersions[availableVersions.length - 1] ?? "latest";
|
|
143
|
+
}, ...ngDevMode ? [{ debugName: "selectedVersion" }] : /* istanbul ignore next */ []);
|
|
88
144
|
this.displayedButtons = computed(() => {
|
|
89
145
|
let activeIndex = this.activeIndex();
|
|
90
|
-
if (activeIndex === -1)
|
|
146
|
+
if (activeIndex === -1)
|
|
91
147
|
activeIndex = this.availableVersions().length - 1;
|
|
92
|
-
}
|
|
93
148
|
let start = Math.max(0, activeIndex - 2);
|
|
94
149
|
let end = Math.min(this.availableVersions().length, activeIndex + 3);
|
|
95
150
|
if (end - start < 5) {
|
|
96
|
-
if (start === 0)
|
|
151
|
+
if (start === 0)
|
|
97
152
|
end += 5 - (end - start);
|
|
98
|
-
|
|
99
|
-
else {
|
|
153
|
+
else
|
|
100
154
|
start -= 5 - (end - start);
|
|
101
|
-
}
|
|
102
155
|
}
|
|
103
156
|
end = Math.min(this.availableVersions().length, end);
|
|
104
157
|
start = Math.max(0, start);
|
|
105
158
|
return Array.from({ length: end - start }, (_, i) => ({
|
|
106
159
|
index: start + i,
|
|
107
|
-
version: this.availableVersions()[start + i]
|
|
160
|
+
version: this.availableVersions()[start + i]
|
|
108
161
|
}));
|
|
109
|
-
}, ...
|
|
162
|
+
}, ...ngDevMode ? [{ debugName: "displayedButtons" }] : /* istanbul ignore next */ []);
|
|
110
163
|
this.application = inject(RXAP_ENVIRONMENT).app;
|
|
111
164
|
this.getChangelogMethod = inject(ChangelogControllerGetVersionRemoteMethod);
|
|
112
|
-
this.getChangelogMethodParameters = computed(() => ({
|
|
113
|
-
parameters: {
|
|
165
|
+
this.getChangelogMethodParameters = computed(() => ({ parameters: {
|
|
114
166
|
version: this.selectedVersion(),
|
|
115
|
-
application: this.application
|
|
116
|
-
},
|
|
117
|
-
}), ...(ngDevMode ? [{ debugName: "getChangelogMethodParameters" }] : /* istanbul ignore next */ []));
|
|
167
|
+
application: this.application
|
|
168
|
+
} }), ...ngDevMode ? [{ debugName: "getChangelogMethodParameters" }] : /* istanbul ignore next */ []);
|
|
118
169
|
this.getAvailableVersionsMethod = inject(ChangelogControllerListRemoteMethod);
|
|
119
170
|
this.loadAvailableVersions();
|
|
120
171
|
}
|
|
@@ -128,108 +179,302 @@ class ChangelogComponent {
|
|
|
128
179
|
this.error.set(e.message);
|
|
129
180
|
}
|
|
130
181
|
}
|
|
131
|
-
static {
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
182
|
+
static {
|
|
183
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
184
|
+
minVersion: "12.0.0",
|
|
185
|
+
version: "22.3.0",
|
|
186
|
+
ngImport: i0,
|
|
187
|
+
type: ChangelogComponent,
|
|
188
|
+
deps: [],
|
|
189
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
190
|
+
});
|
|
191
|
+
}
|
|
192
|
+
static {
|
|
193
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
194
|
+
minVersion: "17.0.0",
|
|
195
|
+
version: "22.3.0",
|
|
196
|
+
type: ChangelogComponent,
|
|
197
|
+
isStandalone: true,
|
|
198
|
+
selector: "rxap-changelog",
|
|
199
|
+
ngImport: i0,
|
|
200
|
+
template: "@if (error()) {\n <h2 class=\"text-2xl pb-2\" i18n>Something has gone wrong!</h2>\n <p i18n>Unable to load the application changelog</p>\n} @else {\n <div class=\"flex flex-col gap-3\">\n @if (availableVersions().length) {\n <div class=\"controls flex justify-center space-x-2 my-4\">\n <button\n (click)=\"activeIndex.set(activeIndex() - 1)\"\n [disabled]=\"activeIndex() <= 0\"\n [ngClass]=\"{\n 'bg-gray-100 dark:bg-gray-900': activeIndex() <= 0,\n 'hover:bg-gray-300': activeIndex() > 0,\n }\"\n class=\"px-4 py-2 bg-gray-200 dark:bg-gray-800 dark:hover:bg-gray-900 transition-colors duration-150 rounded\">Previous\n </button>\n @for (item of displayedButtons(); track item) {\n <button (click)=\"activeIndex.set(item.index)\"\n [ngClass]=\"{\n 'bg-primary-500': item.index === activeIndex(),\n 'bg-gray-200 dark:bg-gray-800 dark:hover:bg-gray-900 hover:bg-gray-300 transition-colors duration-150': item.index !== activeIndex()\n }\"\n class=\"px-4 py-2 rounded\">\n {{ item.version }}\n </button>\n }\n <button\n (click)=\"activeIndex.set(activeIndex() + 1)\"\n [disabled]=\"activeIndex() >= availableVersions().length - 1\"\n [ngClass]=\"{\n 'bg-gray-100 dark:bg-gray-900': activeIndex() >= availableVersions().length - 1,\n 'hover:bg-gray-300': activeIndex() < availableVersions().length - 1,\n }\"\n class=\"px-4 py-2 bg-gray-200 dark:bg-gray-800 dark:hover:bg-gray-900 hover:bg-gray-300 transition-colors duration-150 rounded\">Next\n </button>\n </div>\n <hr>\n }\n <div class=\"flex flex-col gap-6 p-8 overflow-auto\" style=\"max-height: 60vh\">\n <ng-container *rxapMethod=\"let changelog call getChangelogMethod; parameters: getChangelogMethodParameters()\">\n @for (general of changelog.general; track general) {\n <markdown [data]=\"general\" class=\"prose dark:prose-invert\">\n </markdown>\n }\n @for (application of changelog.application; track application) {\n <markdown [data]=\"application\" class=\"prose dark:prose-invert\">\n </markdown>\n }\n </ng-container>\n </div>\n </div>\n }\n",
|
|
201
|
+
styles: [""],
|
|
202
|
+
dependencies: [
|
|
203
|
+
{
|
|
204
|
+
kind: "directive",
|
|
205
|
+
type: MethodTemplateDirective,
|
|
206
|
+
selector: "[rxapMethod]",
|
|
207
|
+
inputs: [
|
|
208
|
+
"rxapMethodCall",
|
|
209
|
+
"rxapMethodParameters",
|
|
210
|
+
"rxapMethodError",
|
|
211
|
+
"rxapMethodLoading",
|
|
212
|
+
"rxapMethodWithoutParameters",
|
|
213
|
+
"immediately"
|
|
214
|
+
],
|
|
215
|
+
outputs: [
|
|
216
|
+
"executed",
|
|
217
|
+
"failure",
|
|
218
|
+
"successful",
|
|
219
|
+
"executing",
|
|
220
|
+
"embedded"
|
|
221
|
+
],
|
|
222
|
+
exportAs: ["rxapMethod"]
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
kind: "ngmodule",
|
|
226
|
+
type: MarkdownModule
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
kind: "component",
|
|
230
|
+
type: i1$1.MarkdownComponent,
|
|
231
|
+
selector: "markdown, [markdown]",
|
|
232
|
+
inputs: [
|
|
233
|
+
"data",
|
|
234
|
+
"src",
|
|
235
|
+
"disableSanitizer",
|
|
236
|
+
"inline",
|
|
237
|
+
"clipboard",
|
|
238
|
+
"clipboardButtonComponent",
|
|
239
|
+
"clipboardButtonTemplate",
|
|
240
|
+
"emoji",
|
|
241
|
+
"katex",
|
|
242
|
+
"katexOptions",
|
|
243
|
+
"mermaid",
|
|
244
|
+
"mermaidOptions",
|
|
245
|
+
"lineHighlight",
|
|
246
|
+
"line",
|
|
247
|
+
"lineOffset",
|
|
248
|
+
"lineNumbers",
|
|
249
|
+
"start",
|
|
250
|
+
"commandLine",
|
|
251
|
+
"filterOutput",
|
|
252
|
+
"host",
|
|
253
|
+
"prompt",
|
|
254
|
+
"output",
|
|
255
|
+
"user"
|
|
256
|
+
],
|
|
257
|
+
outputs: [
|
|
258
|
+
"error",
|
|
259
|
+
"load",
|
|
260
|
+
"ready"
|
|
261
|
+
]
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
kind: "directive",
|
|
265
|
+
type: NgClass,
|
|
266
|
+
selector: "[ngClass]",
|
|
267
|
+
inputs: ["class", "ngClass"]
|
|
268
|
+
}
|
|
269
|
+
],
|
|
270
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
271
|
+
});
|
|
272
|
+
}
|
|
273
|
+
};
|
|
274
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
275
|
+
minVersion: "12.0.0",
|
|
276
|
+
version: "22.3.0",
|
|
277
|
+
ngImport: i0,
|
|
278
|
+
type: ChangelogComponent,
|
|
279
|
+
decorators: [{
|
|
135
280
|
type: Component,
|
|
136
|
-
args: [{
|
|
281
|
+
args: [{
|
|
282
|
+
selector: "rxap-changelog",
|
|
283
|
+
imports: [
|
|
137
284
|
MethodTemplateDirective,
|
|
138
285
|
MarkdownModule,
|
|
139
286
|
NgClass
|
|
140
|
-
],
|
|
141
|
-
|
|
287
|
+
],
|
|
288
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
289
|
+
template: "@if (error()) {\n <h2 class=\"text-2xl pb-2\" i18n>Something has gone wrong!</h2>\n <p i18n>Unable to load the application changelog</p>\n} @else {\n <div class=\"flex flex-col gap-3\">\n @if (availableVersions().length) {\n <div class=\"controls flex justify-center space-x-2 my-4\">\n <button\n (click)=\"activeIndex.set(activeIndex() - 1)\"\n [disabled]=\"activeIndex() <= 0\"\n [ngClass]=\"{\n 'bg-gray-100 dark:bg-gray-900': activeIndex() <= 0,\n 'hover:bg-gray-300': activeIndex() > 0,\n }\"\n class=\"px-4 py-2 bg-gray-200 dark:bg-gray-800 dark:hover:bg-gray-900 transition-colors duration-150 rounded\">Previous\n </button>\n @for (item of displayedButtons(); track item) {\n <button (click)=\"activeIndex.set(item.index)\"\n [ngClass]=\"{\n 'bg-primary-500': item.index === activeIndex(),\n 'bg-gray-200 dark:bg-gray-800 dark:hover:bg-gray-900 hover:bg-gray-300 transition-colors duration-150': item.index !== activeIndex()\n }\"\n class=\"px-4 py-2 rounded\">\n {{ item.version }}\n </button>\n }\n <button\n (click)=\"activeIndex.set(activeIndex() + 1)\"\n [disabled]=\"activeIndex() >= availableVersions().length - 1\"\n [ngClass]=\"{\n 'bg-gray-100 dark:bg-gray-900': activeIndex() >= availableVersions().length - 1,\n 'hover:bg-gray-300': activeIndex() < availableVersions().length - 1,\n }\"\n class=\"px-4 py-2 bg-gray-200 dark:bg-gray-800 dark:hover:bg-gray-900 hover:bg-gray-300 transition-colors duration-150 rounded\">Next\n </button>\n </div>\n <hr>\n }\n <div class=\"flex flex-col gap-6 p-8 overflow-auto\" style=\"max-height: 60vh\">\n <ng-container *rxapMethod=\"let changelog call getChangelogMethod; parameters: getChangelogMethodParameters()\">\n @for (general of changelog.general; track general) {\n <markdown [data]=\"general\" class=\"prose dark:prose-invert\">\n </markdown>\n }\n @for (application of changelog.application; track application) {\n <markdown [data]=\"application\" class=\"prose dark:prose-invert\">\n </markdown>\n }\n </ng-container>\n </div>\n </div>\n }\n"
|
|
290
|
+
}]
|
|
291
|
+
}],
|
|
292
|
+
ctorParameters: () => []
|
|
293
|
+
});
|
|
142
294
|
let ChangelogDialogComponent = class ChangelogDialogComponent {
|
|
143
295
|
constructor() {
|
|
144
|
-
this.dialog = viewChild.required(
|
|
296
|
+
this.dialog = viewChild.required("dialog", ...ngDevMode ? [{ debugName: "dialog" }] : /* istanbul ignore next */ []);
|
|
145
297
|
this.closeDialog = output();
|
|
146
|
-
this.remember = signal(true, ...
|
|
298
|
+
this.remember = signal(true, ...ngDevMode ? [{ debugName: "remember" }] : /* istanbul ignore next */ []);
|
|
147
299
|
afterNextRender(() => this.dialog().nativeElement.showModal());
|
|
148
300
|
}
|
|
149
301
|
close(remember = this.remember()) {
|
|
150
302
|
this.dialog().nativeElement.close();
|
|
151
303
|
this.closeDialog.emit(remember);
|
|
152
304
|
}
|
|
153
|
-
static {
|
|
154
|
-
|
|
305
|
+
static {
|
|
306
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
307
|
+
minVersion: "12.0.0",
|
|
308
|
+
version: "22.3.0",
|
|
309
|
+
ngImport: i0,
|
|
310
|
+
type: ChangelogDialogComponent,
|
|
311
|
+
deps: [],
|
|
312
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
313
|
+
});
|
|
314
|
+
}
|
|
315
|
+
static {
|
|
316
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
317
|
+
minVersion: "17.2.0",
|
|
318
|
+
version: "22.3.0",
|
|
319
|
+
type: ChangelogDialogComponent,
|
|
320
|
+
isStandalone: true,
|
|
321
|
+
selector: "rxap-changelog-dialog",
|
|
322
|
+
outputs: { closeDialog: "closeDialog" },
|
|
323
|
+
viewQueries: [{
|
|
324
|
+
propertyName: "dialog",
|
|
325
|
+
first: true,
|
|
326
|
+
predicate: ["dialog"],
|
|
327
|
+
descendants: true,
|
|
328
|
+
isSignal: true
|
|
329
|
+
}],
|
|
330
|
+
ngImport: i0,
|
|
331
|
+
template: "<dialog #dialog\n class=\"max-w-6xl rounded overflow-auto drop-shadow-2xl bg-white text-black dark:bg-black dark:text-white flex flex-col gap-3 p-6\">\n <rxap-changelog></rxap-changelog>\n <div class=\"flex flex-row justify-end gap-6\">\n <div class=\"flex flex-row gap-3 items-center\">\n <input [(ngModel)]=\"remember\" id=\"rxap-changelog-remember\" type=\"checkbox\">\n <label for=\"rxap-changelog-remember\" i18n>Don't show again until next new version</label>\n </div>\n <button (click)=\"close()\" class=\"px-4 py-2 rounded bg-primary-500\" i18n>close</button>\n </div>\n</dialog>\n",
|
|
332
|
+
styles: ["dialog::backdrop{background:#000000b3}\n"],
|
|
333
|
+
dependencies: [
|
|
334
|
+
{
|
|
335
|
+
kind: "component",
|
|
336
|
+
type: ChangelogComponent,
|
|
337
|
+
selector: "rxap-changelog"
|
|
338
|
+
},
|
|
339
|
+
{
|
|
340
|
+
kind: "ngmodule",
|
|
341
|
+
type: FormsModule
|
|
342
|
+
},
|
|
343
|
+
{
|
|
344
|
+
kind: "directive",
|
|
345
|
+
type: i1.CheckboxControlValueAccessor,
|
|
346
|
+
selector: "input[type=checkbox]:not([ngNoCva])[formControlName],input[type=checkbox]:not([ngNoCva])[formControl],input[type=checkbox]:not([ngNoCva])[ngModel]"
|
|
347
|
+
},
|
|
348
|
+
{
|
|
349
|
+
kind: "directive",
|
|
350
|
+
type: i1.NgControlStatus,
|
|
351
|
+
selector: "[formControlName],[ngModel],[formControl]"
|
|
352
|
+
},
|
|
353
|
+
{
|
|
354
|
+
kind: "directive",
|
|
355
|
+
type: i1.NgModel,
|
|
356
|
+
selector: "[ngModel]:not([formControlName]):not([formControl])",
|
|
357
|
+
inputs: [
|
|
358
|
+
"name",
|
|
359
|
+
"disabled",
|
|
360
|
+
"ngModel",
|
|
361
|
+
"ngModelOptions"
|
|
362
|
+
],
|
|
363
|
+
outputs: ["ngModelChange"],
|
|
364
|
+
exportAs: ["ngModel"]
|
|
365
|
+
}
|
|
366
|
+
],
|
|
367
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
368
|
+
});
|
|
369
|
+
}
|
|
155
370
|
};
|
|
156
371
|
ChangelogDialogComponent = __decorate([
|
|
157
|
-
__metadata("design:paramtypes", [])
|
|
158
|
-
|
|
159
|
-
|
|
372
|
+
__metadata("design:paramtypes", [])], ChangelogDialogComponent);
|
|
373
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
374
|
+
minVersion: "12.0.0",
|
|
375
|
+
version: "22.3.0",
|
|
376
|
+
ngImport: i0,
|
|
377
|
+
type: ChangelogDialogComponent,
|
|
378
|
+
decorators: [{
|
|
160
379
|
type: Component,
|
|
161
|
-
args: [{
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
class
|
|
380
|
+
args: [{
|
|
381
|
+
selector: "rxap-changelog-dialog",
|
|
382
|
+
imports: [ChangelogComponent, FormsModule],
|
|
383
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
384
|
+
template: "<dialog #dialog\n class=\"max-w-6xl rounded overflow-auto drop-shadow-2xl bg-white text-black dark:bg-black dark:text-white flex flex-col gap-3 p-6\">\n <rxap-changelog></rxap-changelog>\n <div class=\"flex flex-row justify-end gap-6\">\n <div class=\"flex flex-row gap-3 items-center\">\n <input [(ngModel)]=\"remember\" id=\"rxap-changelog-remember\" type=\"checkbox\">\n <label for=\"rxap-changelog-remember\" i18n>Don't show again until next new version</label>\n </div>\n <button (click)=\"close()\" class=\"px-4 py-2 rounded bg-primary-500\" i18n>close</button>\n </div>\n</dialog>\n",
|
|
385
|
+
styles: ["dialog::backdrop{background:#000000b3}\n"]
|
|
386
|
+
}]
|
|
387
|
+
}],
|
|
388
|
+
ctorParameters: () => [],
|
|
389
|
+
propDecorators: {
|
|
390
|
+
dialog: [{
|
|
391
|
+
type: i0.ViewChild,
|
|
392
|
+
args: ["dialog", { isSignal: true }]
|
|
393
|
+
}],
|
|
394
|
+
closeDialog: [{
|
|
395
|
+
type: i0.Output,
|
|
396
|
+
args: ["closeDialog"]
|
|
397
|
+
}]
|
|
398
|
+
}
|
|
399
|
+
});
|
|
400
|
+
const RXAP_CHANGELOG_LAST_VERSION = "RXAP_CHANGELOG_LAST_VERSION";
|
|
401
|
+
const RXAP_CHANGELOG_DISABLED = "RXAP_CHANGELOG_DISABLED";
|
|
402
|
+
var ChangelogService = class ChangelogService {
|
|
166
403
|
constructor() {
|
|
167
404
|
this.version = inject(RXAP_ENVIRONMENT).name;
|
|
168
405
|
this.applicationRef = inject(ApplicationRef);
|
|
169
406
|
}
|
|
170
407
|
showChangelogDialog() {
|
|
171
|
-
const body = document.getElementsByTagName(
|
|
172
|
-
const div = document.createElement(
|
|
408
|
+
const body = document.getElementsByTagName("body")[0];
|
|
409
|
+
const div = document.createElement("div");
|
|
173
410
|
body.appendChild(div);
|
|
174
411
|
const componentRef = createComponent(ChangelogDialogComponent, {
|
|
175
412
|
hostElement: div,
|
|
176
|
-
environmentInjector: this.applicationRef.injector
|
|
413
|
+
environmentInjector: this.applicationRef.injector
|
|
177
414
|
});
|
|
178
415
|
this.applicationRef.attachView(componentRef.hostView);
|
|
179
|
-
outputToObservable(componentRef.instance.closeDialog).pipe(take(1), tap(remember => {
|
|
416
|
+
outputToObservable(componentRef.instance.closeDialog).pipe(take(1), tap((remember) => {
|
|
180
417
|
componentRef.destroy();
|
|
181
|
-
// destroy() already detaches the host element; remove() is a no-op then
|
|
182
418
|
div.remove();
|
|
183
|
-
if (remember && this.version)
|
|
419
|
+
if (remember && this.version)
|
|
184
420
|
this.lastVersion = this.version;
|
|
185
|
-
}
|
|
186
421
|
})).subscribe();
|
|
187
422
|
}
|
|
188
423
|
get isDisabled() {
|
|
189
|
-
return localStorage.getItem(RXAP_CHANGELOG_DISABLED) ===
|
|
424
|
+
return localStorage.getItem(RXAP_CHANGELOG_DISABLED) === "true";
|
|
190
425
|
}
|
|
191
426
|
get lastVersion() {
|
|
192
427
|
return localStorage.getItem(RXAP_CHANGELOG_LAST_VERSION);
|
|
193
428
|
}
|
|
194
429
|
set lastVersion(version) {
|
|
195
|
-
if (version)
|
|
430
|
+
if (version)
|
|
196
431
|
localStorage.setItem(RXAP_CHANGELOG_LAST_VERSION, version);
|
|
197
|
-
|
|
198
|
-
else {
|
|
432
|
+
else
|
|
199
433
|
localStorage.removeItem(RXAP_CHANGELOG_LAST_VERSION);
|
|
200
|
-
}
|
|
201
434
|
}
|
|
202
435
|
showChangelogDialogIfNewVersion() {
|
|
203
|
-
if (this.isDisabled)
|
|
436
|
+
if (this.isDisabled)
|
|
204
437
|
return;
|
|
205
|
-
}
|
|
206
438
|
const lastVersion = this.lastVersion;
|
|
207
|
-
if (this.version && lastVersion && this.version !== lastVersion)
|
|
439
|
+
if (this.version && lastVersion && this.version !== lastVersion)
|
|
208
440
|
this.lastVersion = null;
|
|
209
|
-
|
|
210
|
-
if (this.lastVersion === this.version) {
|
|
441
|
+
if (this.lastVersion === this.version)
|
|
211
442
|
return;
|
|
212
|
-
}
|
|
213
443
|
this.showChangelogDialog();
|
|
214
444
|
}
|
|
215
|
-
static {
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
445
|
+
static {
|
|
446
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
447
|
+
minVersion: "12.0.0",
|
|
448
|
+
version: "22.3.0",
|
|
449
|
+
ngImport: i0,
|
|
450
|
+
type: ChangelogService,
|
|
451
|
+
deps: [],
|
|
452
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
453
|
+
});
|
|
454
|
+
}
|
|
455
|
+
static {
|
|
456
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
457
|
+
minVersion: "12.0.0",
|
|
458
|
+
version: "22.3.0",
|
|
459
|
+
ngImport: i0,
|
|
460
|
+
type: ChangelogService,
|
|
461
|
+
providedIn: "root"
|
|
462
|
+
});
|
|
463
|
+
}
|
|
464
|
+
};
|
|
465
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
466
|
+
minVersion: "12.0.0",
|
|
467
|
+
version: "22.3.0",
|
|
468
|
+
ngImport: i0,
|
|
469
|
+
type: ChangelogService,
|
|
470
|
+
decorators: [{
|
|
219
471
|
type: Injectable,
|
|
220
|
-
args: [{
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
}] });
|
|
472
|
+
args: [{ providedIn: "root" }]
|
|
473
|
+
}]
|
|
474
|
+
});
|
|
224
475
|
function ProvideChangelog() {
|
|
225
476
|
return provideAppInitializer(() => {
|
|
226
|
-
|
|
227
|
-
return initializerFn();
|
|
477
|
+
return ((changelogService) => () => changelogService.showChangelogDialogIfNewVersion())(inject(ChangelogService))();
|
|
228
478
|
});
|
|
229
479
|
}
|
|
230
|
-
// region openapi responses
|
|
231
|
-
// endregion
|
|
232
|
-
/**
|
|
233
|
-
* Generated bundle index. Do not edit.
|
|
234
|
-
*/
|
|
235
480
|
export { ChangelogComponent, ChangelogControllerGetLatestRemoteMethod, ChangelogControllerGetVersionRemoteMethod, ChangelogControllerListRemoteMethod, ChangelogDialogComponent, ChangelogService, ProvideChangelog, RXAP_CHANGELOG_DISABLED, RXAP_CHANGELOG_LAST_VERSION };
|