ngx-presentationcommons-esm-remote 0.0.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/README.md +63 -0
- package/fesm2022/ngx-presentationcommons-esm-remote.mjs +251 -0
- package/fesm2022/ngx-presentationcommons-esm-remote.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/lib/components/core/core.component.d.ts +29 -0
- package/lib/pipes/duration.pipe.d.ts +8 -0
- package/lib/pipes/time.pipe.d.ts +8 -0
- package/lib/services/config.service.d.ts +12 -0
- package/lib/services/network.service.d.ts +7 -0
- package/lib/services/time.service.d.ts +20 -0
- package/lib/types/ttime-tick.d.ts +6 -0
- package/package.json +29 -0
- package/public-api.d.ts +5 -0
package/README.md
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# NgxPresentationcommonsEsmRemote
|
|
2
|
+
|
|
3
|
+
This project was generated using [Angular CLI](https://github.com/angular/angular-cli) version 19.2.0.
|
|
4
|
+
|
|
5
|
+
## Code scaffolding
|
|
6
|
+
|
|
7
|
+
Angular CLI includes powerful code scaffolding tools. To generate a new component, run:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
ng generate component component-name
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
For a complete list of available schematics (such as `components`, `directives`, or `pipes`), run:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
ng generate --help
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Building
|
|
20
|
+
|
|
21
|
+
To build the library, run:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
ng build ngx-presentationcommons-esm-remote
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
This command will compile your project, and the build artifacts will be placed in the `dist/` directory.
|
|
28
|
+
|
|
29
|
+
### Publishing the Library
|
|
30
|
+
|
|
31
|
+
Once the project is built, you can publish your library by following these steps:
|
|
32
|
+
|
|
33
|
+
1. Navigate to the `dist` directory:
|
|
34
|
+
```bash
|
|
35
|
+
cd dist/ngx-presentationcommons-esm-remote
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
2. Run the `npm publish` command to publish your library to the npm registry:
|
|
39
|
+
```bash
|
|
40
|
+
npm publish
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Running unit tests
|
|
44
|
+
|
|
45
|
+
To execute unit tests with the [Karma](https://karma-runner.github.io) test runner, use the following command:
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
ng test
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Running end-to-end tests
|
|
52
|
+
|
|
53
|
+
For end-to-end (e2e) testing, run:
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
ng e2e
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Angular CLI does not come with an end-to-end testing framework by default. You can choose one that suits your needs.
|
|
60
|
+
|
|
61
|
+
## Additional Resources
|
|
62
|
+
|
|
63
|
+
For more information on using the Angular CLI, including detailed command references, visit the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page.
|
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { inject, Injectable, EventEmitter, Pipe, Component } from '@angular/core';
|
|
3
|
+
import { commonsTypeHasPropertyString, commonsBase62HasPropertyId, CommonsFixedDate, CommonsFixedDuration, CommonsFixedDateRange } from 'tscommons-esm-core';
|
|
4
|
+
import { CommonsConfigService } from 'ngx-angularcommons-esm-app';
|
|
5
|
+
import { commonsAsyncInterval, ECommonsInvocation } from 'tscommons-esm-async';
|
|
6
|
+
import { CommonsPresentationNetworkService } from 'ngx-presentationcommons-esm-network';
|
|
7
|
+
import { Router, ActivatedRoute } from '@angular/router';
|
|
8
|
+
import { CommonsComponent } from 'ngx-angularcommons-esm-core';
|
|
9
|
+
import { ECommonsPresentationMoveMagnitude, CommonsPresentationService } from 'ngx-presentationcommons-esm-core';
|
|
10
|
+
|
|
11
|
+
function isTConfig(test) {
|
|
12
|
+
if (!commonsTypeHasPropertyString(test, 'url'))
|
|
13
|
+
return false;
|
|
14
|
+
if (!commonsTypeHasPropertyString(test, 'ns'))
|
|
15
|
+
return false;
|
|
16
|
+
if (!commonsBase62HasPropertyId(test, 'channel'))
|
|
17
|
+
return false;
|
|
18
|
+
if (!commonsBase62HasPropertyId(test, 'deviceId'))
|
|
19
|
+
return false;
|
|
20
|
+
return true;
|
|
21
|
+
}
|
|
22
|
+
class CommonsPresentationRemoteConfigService {
|
|
23
|
+
configService = inject(CommonsConfigService);
|
|
24
|
+
config;
|
|
25
|
+
constructor() {
|
|
26
|
+
const config = this.configService.getDirect('repeater');
|
|
27
|
+
if (!isTConfig(config))
|
|
28
|
+
throw new Error('Invalid config file');
|
|
29
|
+
this.config = config;
|
|
30
|
+
}
|
|
31
|
+
get url() {
|
|
32
|
+
return this.config.url;
|
|
33
|
+
}
|
|
34
|
+
get ns() {
|
|
35
|
+
return this.config.ns;
|
|
36
|
+
}
|
|
37
|
+
get channel() {
|
|
38
|
+
return this.config.channel;
|
|
39
|
+
}
|
|
40
|
+
get deviceId() {
|
|
41
|
+
return this.config.deviceId;
|
|
42
|
+
}
|
|
43
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: CommonsPresentationRemoteConfigService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
44
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: CommonsPresentationRemoteConfigService, providedIn: 'root' });
|
|
45
|
+
}
|
|
46
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: CommonsPresentationRemoteConfigService, decorators: [{
|
|
47
|
+
type: Injectable,
|
|
48
|
+
args: [{
|
|
49
|
+
providedIn: 'root'
|
|
50
|
+
}]
|
|
51
|
+
}], ctorParameters: () => [] });
|
|
52
|
+
|
|
53
|
+
class CommonsPresentationRemoteTimeService {
|
|
54
|
+
internalNow = new CommonsFixedDate();
|
|
55
|
+
internalStart;
|
|
56
|
+
internalPageDeadline;
|
|
57
|
+
onTick = new EventEmitter(true);
|
|
58
|
+
get tickObservable() {
|
|
59
|
+
return this.onTick;
|
|
60
|
+
}
|
|
61
|
+
constructor() {
|
|
62
|
+
commonsAsyncInterval(1000, ECommonsInvocation.FIXED,
|
|
63
|
+
// eslint-disable-next-line @typescript-eslint/require-await
|
|
64
|
+
async () => {
|
|
65
|
+
this.tick();
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
get now() {
|
|
69
|
+
return new CommonsFixedDate();
|
|
70
|
+
}
|
|
71
|
+
get elapsed() {
|
|
72
|
+
if (!this.internalStart)
|
|
73
|
+
return undefined;
|
|
74
|
+
return CommonsFixedDuration.fromMillis(new CommonsFixedDateRange(this.internalStart, this.now).delta);
|
|
75
|
+
}
|
|
76
|
+
get page() {
|
|
77
|
+
if (!this.internalPageDeadline)
|
|
78
|
+
return undefined;
|
|
79
|
+
return CommonsFixedDuration.fromMillis(new CommonsFixedDateRange(this.now, this.internalPageDeadline).delta);
|
|
80
|
+
}
|
|
81
|
+
tick() {
|
|
82
|
+
this.internalNow.YmdHis = this.now.YmdHis;
|
|
83
|
+
this.onTick.emit({
|
|
84
|
+
now: this.now,
|
|
85
|
+
elapsed: this.elapsed,
|
|
86
|
+
pageRemaining: this.page
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
reset() {
|
|
90
|
+
this.internalStart = this.now;
|
|
91
|
+
this.internalPageDeadline = undefined;
|
|
92
|
+
this.tick();
|
|
93
|
+
}
|
|
94
|
+
setPage(duration) {
|
|
95
|
+
if (!this.internalStart)
|
|
96
|
+
return;
|
|
97
|
+
const deadline = this.now;
|
|
98
|
+
deadline.second += duration.seconds;
|
|
99
|
+
this.internalPageDeadline = deadline;
|
|
100
|
+
}
|
|
101
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: CommonsPresentationRemoteTimeService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
102
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: CommonsPresentationRemoteTimeService, providedIn: 'root' });
|
|
103
|
+
}
|
|
104
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: CommonsPresentationRemoteTimeService, decorators: [{
|
|
105
|
+
type: Injectable,
|
|
106
|
+
args: [{
|
|
107
|
+
providedIn: 'root'
|
|
108
|
+
}]
|
|
109
|
+
}], ctorParameters: () => [] });
|
|
110
|
+
|
|
111
|
+
class CommonsPresentationRemoteNetworkService extends CommonsPresentationNetworkService {
|
|
112
|
+
constructor() {
|
|
113
|
+
const configService = inject(CommonsPresentationRemoteConfigService);
|
|
114
|
+
super(configService.url, configService.ns, configService.channel, configService.deviceId);
|
|
115
|
+
}
|
|
116
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: CommonsPresentationRemoteNetworkService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
117
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: CommonsPresentationRemoteNetworkService, providedIn: 'root' });
|
|
118
|
+
}
|
|
119
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: CommonsPresentationRemoteNetworkService, decorators: [{
|
|
120
|
+
type: Injectable,
|
|
121
|
+
args: [{
|
|
122
|
+
providedIn: 'root'
|
|
123
|
+
}]
|
|
124
|
+
}], ctorParameters: () => [] });
|
|
125
|
+
|
|
126
|
+
class TimePipe {
|
|
127
|
+
transform(value) {
|
|
128
|
+
if (!value || !CommonsFixedDate.is(value))
|
|
129
|
+
return '-';
|
|
130
|
+
return value.His;
|
|
131
|
+
}
|
|
132
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TimePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
133
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.15", ngImport: i0, type: TimePipe, isStandalone: true, name: "time" });
|
|
134
|
+
}
|
|
135
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TimePipe, decorators: [{
|
|
136
|
+
type: Pipe,
|
|
137
|
+
args: [{
|
|
138
|
+
name: 'time',
|
|
139
|
+
standalone: true
|
|
140
|
+
}]
|
|
141
|
+
}] });
|
|
142
|
+
|
|
143
|
+
class DurationPipe {
|
|
144
|
+
transform(value) {
|
|
145
|
+
if (!value || !CommonsFixedDuration.is(value))
|
|
146
|
+
return '-';
|
|
147
|
+
if (value.seconds < 0)
|
|
148
|
+
return 'OVERRUN';
|
|
149
|
+
return value.His;
|
|
150
|
+
}
|
|
151
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DurationPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
152
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.15", ngImport: i0, type: DurationPipe, isStandalone: true, name: "duration" });
|
|
153
|
+
}
|
|
154
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DurationPipe, decorators: [{
|
|
155
|
+
type: Pipe,
|
|
156
|
+
args: [{
|
|
157
|
+
name: 'duration',
|
|
158
|
+
standalone: true
|
|
159
|
+
}]
|
|
160
|
+
}] });
|
|
161
|
+
|
|
162
|
+
class CommonsPresentationRemoteCoreComponent extends CommonsComponent {
|
|
163
|
+
ECommonsPresentationMoveMagnitude = ECommonsPresentationMoveMagnitude;
|
|
164
|
+
router = inject(Router);
|
|
165
|
+
activatedRoute = inject(ActivatedRoute);
|
|
166
|
+
presentationService = inject(CommonsPresentationService);
|
|
167
|
+
networkService = inject(CommonsPresentationRemoteNetworkService);
|
|
168
|
+
timeService = inject(CommonsPresentationRemoteTimeService);
|
|
169
|
+
blankState = false;
|
|
170
|
+
page;
|
|
171
|
+
index;
|
|
172
|
+
nowTime;
|
|
173
|
+
elapsedTime;
|
|
174
|
+
pageRemaining;
|
|
175
|
+
ngOnInit() {
|
|
176
|
+
super.ngOnInit();
|
|
177
|
+
this.subscribe(this.networkService.connectObservable, () => {
|
|
178
|
+
console.log('Connected');
|
|
179
|
+
});
|
|
180
|
+
this.subscribe(this.networkService.disconnectObservable, () => {
|
|
181
|
+
console.log('Disconnected');
|
|
182
|
+
});
|
|
183
|
+
this.subscribe(this.presentationService.prevObservable, (e) => {
|
|
184
|
+
console.log(e);
|
|
185
|
+
console.log('prev');
|
|
186
|
+
});
|
|
187
|
+
this.subscribe(this.presentationService.nextObservable, (e) => {
|
|
188
|
+
console.log(e);
|
|
189
|
+
console.log('next');
|
|
190
|
+
});
|
|
191
|
+
this.subscribe(this.presentationService.blankObservable, (action) => {
|
|
192
|
+
this.blankState = action.state;
|
|
193
|
+
console.log('blank', action.state);
|
|
194
|
+
});
|
|
195
|
+
this.subscribe(this.presentationService.reachedSlideObservable, (action) => {
|
|
196
|
+
this.page = action.page;
|
|
197
|
+
this.index = action.index;
|
|
198
|
+
console.log('reached slide', action);
|
|
199
|
+
// doesn't actually do anything at the moment, as the page handling is done in the app
|
|
200
|
+
const path = ['notes', ...this.page.split(':'), this.index.toString(10)];
|
|
201
|
+
void this.router.navigate(path, { relativeTo: this.activatedRoute.root });
|
|
202
|
+
});
|
|
203
|
+
this.subscribe(this.timeService.tickObservable, (tick) => {
|
|
204
|
+
this.nowTime = tick.now;
|
|
205
|
+
this.elapsedTime = tick.elapsed;
|
|
206
|
+
this.pageRemaining = tick.pageRemaining;
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
ngAfterViewInit() {
|
|
210
|
+
this.networkService.connect();
|
|
211
|
+
}
|
|
212
|
+
doPrev(magnitude) {
|
|
213
|
+
void this.networkService.prev(magnitude);
|
|
214
|
+
}
|
|
215
|
+
doNext(magnitude) {
|
|
216
|
+
void this.networkService.next(magnitude);
|
|
217
|
+
}
|
|
218
|
+
doRestart() {
|
|
219
|
+
void this.networkService.restart();
|
|
220
|
+
}
|
|
221
|
+
doEnd() {
|
|
222
|
+
void this.networkService.end();
|
|
223
|
+
}
|
|
224
|
+
doBlank(state) {
|
|
225
|
+
this.blankState = state;
|
|
226
|
+
void this.networkService.blank(state);
|
|
227
|
+
}
|
|
228
|
+
doShowAll() {
|
|
229
|
+
void this.networkService.showAll();
|
|
230
|
+
}
|
|
231
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: CommonsPresentationRemoteCoreComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
232
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: CommonsPresentationRemoteCoreComponent, isStandalone: true, selector: "commons-presentation-remote-core", usesInheritance: true, ngImport: i0, template: "<section outer>\n\t<section times>\n\t\t<time>{{ this.nowTime | time }}</time>\n\t\t<time>{{ this.elapsedTime | duration }}</time>\n\t\t<time\n\t\t\t\t[class.last-minute]=\"this.pageRemaining && this.pageRemaining.seconds < 60\"\n\t\t\t\t[class.overrun]=\"this.pageRemaining && this.pageRemaining.seconds < 1\"\n\t\t>{{ this.pageRemaining | duration }}</time>\n\t</section>\n\t<section buttons>\n\t\t<button prev commons-button class=\"filled\"\n\t\t\t\t(click)=\"this.doPrev(ECommonsPresentationMoveMagnitude.EITHER);\"\n\t\t>Prev</button>\n\t\t<button next commons-button class=\"filled\"\n\t\t\t\t(click)=\"this.doNext(ECommonsPresentationMoveMagnitude.EITHER);\"\n\t\t>Next</button>\n\n\t\t<button pageprev commons-button class=\"raised\"\n\t\t\t\t(click)=\"this.doPrev(ECommonsPresentationMoveMagnitude.PAGE);\"\n\t\t>Page Prev</button>\n\t\t<button pagenext commons-button class=\"raised\"\n\t\t\t\t(click)=\"this.doNext(ECommonsPresentationMoveMagnitude.PAGE);\"\n\t\t>Page Next</button>\n\n\t\t<button restart commons-button\n\t\t\t\t(click)=\"this.doRestart();\"\n\t\t>Restart</button>\n\t\t<button end commons-button\n\t\t\t\t(click)=\"this.doEnd();\"\n\t\t>End</button>\n\t\t<button all commons-button\n\t\t\t\t(click)=\"this.doShowAll();\"\n\t\t>Show all</button>\n\n\t\t<button blank commons-button class=\"raised\"\n\t\t\t\t[disabled]=\"this.blankState === true\"\n\t\t\t\t(click)=\"this.doBlank(true);\"\n\t\t>Blank</button>\n\t\t<button holding commons-button class=\"raised\"\n\t\t\t\t[disabled]=\"this.blankState === 'holding'\"\n\t\t\t\t(click)=\"this.doBlank('holding');\"\n\t\t>Holding</button>\n\t\t<button show commons-button class=\"raised\"\n\t\t\t\t[disabled]=\"this.blankState === false\"\n\t\t\t\t(click)=\"this.doBlank(false);\"\n\t\t>Restore</button>\n\t</section>\n\t<section custom-buttons><ng-content select=\"[custom-buttons]\"></ng-content></section>\n\t<section notes><ng-content select=\"[notes]\"></ng-content></section>\n</section>\n", styles: ["section[outer]{position:fixed;top:0;left:0;width:100%;height:100vh;box-sizing:border-box;padding:10px;display:grid;grid-template-rows:auto auto auto 1fr;grid-template-areas:\"times\" \"buttons\" \"custombuttons\" \"notes\";row-gap:20px}section[outer] [times]{grid-area:times}section[outer] [buttons]{grid-area:buttons}section[outer] [custom-buttons]{grid-area:custombuttons}section[outer] [notes]{grid-area:notes;overflow-y:scroll}section[times]{display:grid;grid-template-columns:repeat(3,1fr);column-gap:20px}time.last-minute{color:#e7aa00}time.overrun{color:red!important}section[buttons] ::ng-deep button,section[custom-buttons] ::ng-deep button{box-sizing:border-box;margin:0;height:50px}section[buttons]{display:grid;grid-template-columns:repeat(6,1fr);grid-template-areas:\"blank blank holding holding show show\" \"restart restart end end all all\" \"pageprev pageprev pageprev pagenext pagenext pagenext\" \"prev prev prev next next next\";column-gap:10px;row-gap:10px}[prev]{grid-area:prev}[next]{grid-area:next}[pageprev]{grid-area:pageprev}[pagenext]{grid-area:pagenext}[restart]{grid-area:restart}[end]{grid-area:end}[all]{grid-area:all}[blank]{grid-area:blank}[holding]{grid-area:holding}[show]{grid-area:show}\n"], dependencies: [{ kind: "pipe", type: TimePipe, name: "time" }, { kind: "pipe", type: DurationPipe, name: "duration" }] });
|
|
233
|
+
}
|
|
234
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: CommonsPresentationRemoteCoreComponent, decorators: [{
|
|
235
|
+
type: Component,
|
|
236
|
+
args: [{ selector: 'commons-presentation-remote-core', standalone: true, imports: [
|
|
237
|
+
TimePipe,
|
|
238
|
+
DurationPipe
|
|
239
|
+
], template: "<section outer>\n\t<section times>\n\t\t<time>{{ this.nowTime | time }}</time>\n\t\t<time>{{ this.elapsedTime | duration }}</time>\n\t\t<time\n\t\t\t\t[class.last-minute]=\"this.pageRemaining && this.pageRemaining.seconds < 60\"\n\t\t\t\t[class.overrun]=\"this.pageRemaining && this.pageRemaining.seconds < 1\"\n\t\t>{{ this.pageRemaining | duration }}</time>\n\t</section>\n\t<section buttons>\n\t\t<button prev commons-button class=\"filled\"\n\t\t\t\t(click)=\"this.doPrev(ECommonsPresentationMoveMagnitude.EITHER);\"\n\t\t>Prev</button>\n\t\t<button next commons-button class=\"filled\"\n\t\t\t\t(click)=\"this.doNext(ECommonsPresentationMoveMagnitude.EITHER);\"\n\t\t>Next</button>\n\n\t\t<button pageprev commons-button class=\"raised\"\n\t\t\t\t(click)=\"this.doPrev(ECommonsPresentationMoveMagnitude.PAGE);\"\n\t\t>Page Prev</button>\n\t\t<button pagenext commons-button class=\"raised\"\n\t\t\t\t(click)=\"this.doNext(ECommonsPresentationMoveMagnitude.PAGE);\"\n\t\t>Page Next</button>\n\n\t\t<button restart commons-button\n\t\t\t\t(click)=\"this.doRestart();\"\n\t\t>Restart</button>\n\t\t<button end commons-button\n\t\t\t\t(click)=\"this.doEnd();\"\n\t\t>End</button>\n\t\t<button all commons-button\n\t\t\t\t(click)=\"this.doShowAll();\"\n\t\t>Show all</button>\n\n\t\t<button blank commons-button class=\"raised\"\n\t\t\t\t[disabled]=\"this.blankState === true\"\n\t\t\t\t(click)=\"this.doBlank(true);\"\n\t\t>Blank</button>\n\t\t<button holding commons-button class=\"raised\"\n\t\t\t\t[disabled]=\"this.blankState === 'holding'\"\n\t\t\t\t(click)=\"this.doBlank('holding');\"\n\t\t>Holding</button>\n\t\t<button show commons-button class=\"raised\"\n\t\t\t\t[disabled]=\"this.blankState === false\"\n\t\t\t\t(click)=\"this.doBlank(false);\"\n\t\t>Restore</button>\n\t</section>\n\t<section custom-buttons><ng-content select=\"[custom-buttons]\"></ng-content></section>\n\t<section notes><ng-content select=\"[notes]\"></ng-content></section>\n</section>\n", styles: ["section[outer]{position:fixed;top:0;left:0;width:100%;height:100vh;box-sizing:border-box;padding:10px;display:grid;grid-template-rows:auto auto auto 1fr;grid-template-areas:\"times\" \"buttons\" \"custombuttons\" \"notes\";row-gap:20px}section[outer] [times]{grid-area:times}section[outer] [buttons]{grid-area:buttons}section[outer] [custom-buttons]{grid-area:custombuttons}section[outer] [notes]{grid-area:notes;overflow-y:scroll}section[times]{display:grid;grid-template-columns:repeat(3,1fr);column-gap:20px}time.last-minute{color:#e7aa00}time.overrun{color:red!important}section[buttons] ::ng-deep button,section[custom-buttons] ::ng-deep button{box-sizing:border-box;margin:0;height:50px}section[buttons]{display:grid;grid-template-columns:repeat(6,1fr);grid-template-areas:\"blank blank holding holding show show\" \"restart restart end end all all\" \"pageprev pageprev pageprev pagenext pagenext pagenext\" \"prev prev prev next next next\";column-gap:10px;row-gap:10px}[prev]{grid-area:prev}[next]{grid-area:next}[pageprev]{grid-area:pageprev}[pagenext]{grid-area:pagenext}[restart]{grid-area:restart}[end]{grid-area:end}[all]{grid-area:all}[blank]{grid-area:blank}[holding]{grid-area:holding}[show]{grid-area:show}\n"] }]
|
|
240
|
+
}] });
|
|
241
|
+
|
|
242
|
+
/*
|
|
243
|
+
* Public API Surface of ngx-presentationcommons-esm-remote
|
|
244
|
+
*/
|
|
245
|
+
|
|
246
|
+
/**
|
|
247
|
+
* Generated bundle index. Do not edit.
|
|
248
|
+
*/
|
|
249
|
+
|
|
250
|
+
export { CommonsPresentationRemoteConfigService, CommonsPresentationRemoteCoreComponent, CommonsPresentationRemoteNetworkService, CommonsPresentationRemoteTimeService };
|
|
251
|
+
//# sourceMappingURL=ngx-presentationcommons-esm-remote.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ngx-presentationcommons-esm-remote.mjs","sources":["../../../projects/ngx-presentationcommons-esm-remote/src/lib/services/config.service.ts","../../../projects/ngx-presentationcommons-esm-remote/src/lib/services/time.service.ts","../../../projects/ngx-presentationcommons-esm-remote/src/lib/services/network.service.ts","../../../projects/ngx-presentationcommons-esm-remote/src/lib/pipes/time.pipe.ts","../../../projects/ngx-presentationcommons-esm-remote/src/lib/pipes/duration.pipe.ts","../../../projects/ngx-presentationcommons-esm-remote/src/lib/components/core/core.component.ts","../../../projects/ngx-presentationcommons-esm-remote/src/lib/components/core/core.component.html","../../../projects/ngx-presentationcommons-esm-remote/src/public-api.ts","../../../projects/ngx-presentationcommons-esm-remote/src/ngx-presentationcommons-esm-remote.ts"],"sourcesContent":["import { inject, Injectable } from '@angular/core';\n\nimport { commonsBase62HasPropertyId, commonsTypeHasPropertyString } from 'tscommons-esm-core';\n\nimport { CommonsConfigService } from 'ngx-angularcommons-esm-app';\n\ntype TConfig = {\n\t\turl: string;\n\t\tns: string;\n\t\tchannel: string;\n\t\tdeviceId: string;\n};\nfunction isTConfig(test: unknown): test is TConfig {\n\tif (!commonsTypeHasPropertyString(test, 'url')) return false;\n\tif (!commonsTypeHasPropertyString(test, 'ns')) return false;\n\tif (!commonsBase62HasPropertyId(test, 'channel')) return false;\n\tif (!commonsBase62HasPropertyId(test, 'deviceId')) return false;\n\n\treturn true;\n}\n\n@Injectable({\n\t\tprovidedIn: 'root'\n})\nexport class CommonsPresentationRemoteConfigService {\n\tprivate configService: CommonsConfigService = inject<CommonsConfigService>(CommonsConfigService);\n\n\tprivate config: TConfig;\n\n\tconstructor(\n\t) {\n\t\tconst config: unknown = this.configService.getDirect('repeater');\n\t\tif (!isTConfig(config)) throw new Error('Invalid config file');\n\n\t\tthis.config = config;\n\t}\n\n\tpublic get url(): string {\n\t\treturn this.config.url;\n\t}\n\n\tpublic get ns(): string {\n\t\treturn this.config.ns;\n\t}\n\n\tpublic get channel(): string {\n\t\treturn this.config.channel;\n\t}\n\n\tpublic get deviceId(): string {\n\t\treturn this.config.deviceId;\n\t}\n}\n","import { EventEmitter, Injectable } from '@angular/core';\n\nimport { Observable } from 'rxjs';\n\nimport { CommonsFixedDate, CommonsFixedDateRange, CommonsFixedDuration } from 'tscommons-esm-core';\nimport { ECommonsInvocation, commonsAsyncInterval } from 'tscommons-esm-async';\n\nimport { TCommonsPresentationRemoteTimeTick } from '../types/ttime-tick';\n\n@Injectable({\n\t\tprovidedIn: 'root'\n})\nexport class CommonsPresentationRemoteTimeService {\n\tprivate internalNow: CommonsFixedDate = new CommonsFixedDate();\n\tprivate internalStart: CommonsFixedDate|undefined;\n\tprivate internalPageDeadline: CommonsFixedDate|undefined;\n\n\tprivate onTick: EventEmitter<TCommonsPresentationRemoteTimeTick> = new EventEmitter<TCommonsPresentationRemoteTimeTick>(true);\n\tpublic get tickObservable(): Observable<TCommonsPresentationRemoteTimeTick> {\n\t\treturn this.onTick;\n\t}\n\n\tconstructor() {\n\t\tcommonsAsyncInterval(\n\t\t\t\t1000,\n\t\t\t\tECommonsInvocation.FIXED,\n\t\t\t\t// eslint-disable-next-line @typescript-eslint/require-await\n\t\t\t\tasync (): Promise<void> => {\n\t\t\t\t\tthis.tick();\n\t\t\t\t}\n\t\t);\n\t}\n\n\tpublic get now(): CommonsFixedDate {\n\t\treturn new CommonsFixedDate();\n\t}\n\n\tpublic get elapsed(): CommonsFixedDuration|undefined {\n\t\tif (!this.internalStart) return undefined;\n\t\treturn CommonsFixedDuration.fromMillis(new CommonsFixedDateRange(this.internalStart, this.now).delta);\n\t}\n\n\tpublic get page(): CommonsFixedDuration|undefined {\n\t\tif (!this.internalPageDeadline) return undefined;\n\t\treturn CommonsFixedDuration.fromMillis(new CommonsFixedDateRange(this.now, this.internalPageDeadline).delta);\n\t}\n\n\tprivate tick(): void {\n\t\tthis.internalNow.YmdHis = this.now.YmdHis;\n\n\t\tthis.onTick.emit({\n\t\t\t\tnow: this.now,\n\t\t\t\telapsed: this.elapsed,\n\t\t\t\tpageRemaining: this.page\n\t\t});\n\t}\n\n\tpublic reset(): void {\n\t\tthis.internalStart = this.now;\n\t\tthis.internalPageDeadline = undefined;\n\t\t\n\t\tthis.tick();\n\t}\n\n\tpublic setPage(duration: CommonsFixedDuration): void {\n\t\tif (!this.internalStart) return;\n\t\t\n\t\tconst deadline: CommonsFixedDate = this.now;\n\t\tdeadline.second += duration.seconds;\n\t\tthis.internalPageDeadline = deadline;\n\t}\n}\n","import { inject, Injectable } from '@angular/core';\n\nimport { CommonsPresentationNetworkService } from 'ngx-presentationcommons-esm-network';\n\nimport { CommonsPresentationRemoteConfigService } from './config.service';\n\n@Injectable({\n\t\tprovidedIn: 'root'\n})\nexport class CommonsPresentationRemoteNetworkService extends CommonsPresentationNetworkService {\n\tconstructor() {\n\t\tconst configService: CommonsPresentationRemoteConfigService = inject<CommonsPresentationRemoteConfigService>(CommonsPresentationRemoteConfigService);\n\n\t\tsuper(\n\t\t\t\tconfigService.url,\n\t\t\t\tconfigService.ns,\n\t\t\t\tconfigService.channel,\n\t\t\t\tconfigService.deviceId\n\t\t);\n\t}\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\nimport { CommonsFixedDate } from 'tscommons-esm-core';\n\n@Pipe({\n\t\tname: 'time',\n\t\tstandalone: true\n})\nexport class TimePipe implements PipeTransform {\n\tpublic transform(value: CommonsFixedDate|undefined): string {\n\t\tif (!value || !CommonsFixedDate.is(value)) return '-';\n\t\t\n\t\treturn value.His;\n\t}\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\nimport { CommonsFixedDuration } from 'tscommons-esm-core';\n\n@Pipe({\n\t\tname: 'duration',\n\t\tstandalone: true\n})\nexport class DurationPipe implements PipeTransform {\n\tpublic transform(value: CommonsFixedDuration|undefined): string {\n\t\tif (!value || !CommonsFixedDuration.is(value)) return '-';\n\t\tif (value.seconds < 0) return 'OVERRUN';\n\t\t\n\t\treturn value.His;\n\t}\n}\n","import { AfterViewInit, Component, inject, OnInit } from '@angular/core';\nimport { ActivatedRoute, Router } from '@angular/router';\n\nimport { CommonsFixedDate, CommonsFixedDuration } from 'tscommons-esm-core';\n\nimport { CommonsComponent } from 'ngx-angularcommons-esm-core';\nimport { CommonsPresentationService, ECommonsPresentationMoveMagnitude, TCommonsPresentationBlankAction, TCommonsPresentationReachedSlide } from 'ngx-presentationcommons-esm-core';\n\nimport { CommonsPresentationRemoteNetworkService } from '../../services/network.service';\nimport { CommonsPresentationRemoteTimeService } from '../../services/time.service';\n\nimport { TCommonsPresentationRemoteTimeTick } from '../../types/ttime-tick';\n\nimport { TimePipe } from '../../pipes/time.pipe';\nimport { DurationPipe } from '../../pipes/duration.pipe';\n\n@Component({\n\t\tselector: 'commons-presentation-remote-core',\n\t\tstandalone: true,\n\t\timports: [\n\t\t\t\tTimePipe,\n\t\t\t\tDurationPipe\n\t\t],\n\t\ttemplateUrl: './core.component.html',\n\t\tstyleUrls: ['./core.component.less']\n})\nexport class CommonsPresentationRemoteCoreComponent extends CommonsComponent implements OnInit, AfterViewInit {\n\tprotected ECommonsPresentationMoveMagnitude = ECommonsPresentationMoveMagnitude;\n\n\tprivate readonly router: Router = inject<Router>(Router);\n\tprivate readonly activatedRoute: ActivatedRoute = inject<ActivatedRoute>(ActivatedRoute);\n\tprivate readonly presentationService: CommonsPresentationService = inject<CommonsPresentationService>(CommonsPresentationService);\n\tprivate readonly networkService: CommonsPresentationRemoteNetworkService = inject<CommonsPresentationRemoteNetworkService>(CommonsPresentationRemoteNetworkService);\n\tprivate readonly timeService: CommonsPresentationRemoteTimeService = inject<CommonsPresentationRemoteTimeService>(CommonsPresentationRemoteTimeService);\n\t\n\tprotected blankState: boolean|'holding' = false;\n\n\tprotected page: string|undefined;\n\tprotected index: number|undefined;\n\n\tprotected nowTime: CommonsFixedDate|undefined;\n\tprotected elapsedTime: CommonsFixedDuration|undefined;\n\tprotected pageRemaining: CommonsFixedDuration|undefined;\n\n\tpublic override ngOnInit(): void {\n\t\tsuper.ngOnInit();\n\n\t\tthis.subscribe(\n\t\t\t\tthis.networkService.connectObservable,\n\t\t\t\t(): void => {\n\t\t\t\t\tconsole.log('Connected');\n\t\t\t\t}\n\t\t);\n\t\tthis.subscribe(\n\t\t\t\tthis.networkService.disconnectObservable,\n\t\t\t\t(): void => {\n\t\t\t\t\tconsole.log('Disconnected');\n\t\t\t\t}\n\t\t);\n\n\t\tthis.subscribe(\n\t\t\t\tthis.presentationService.prevObservable,\n\t\t\t\t(e): void => {\n\t\t\t\t\tconsole.log(e);\n\t\t\t\t\tconsole.log('prev');\n\t\t\t\t}\n\t\t);\n\n\t\tthis.subscribe(\n\t\t\t\tthis.presentationService.nextObservable,\n\t\t\t\t(e): void => {\n\t\t\t\t\tconsole.log(e);\n\t\t\t\t\tconsole.log('next');\n\t\t\t\t}\n\t\t);\n\n\t\tthis.subscribe(\n\t\t\t\tthis.presentationService.blankObservable,\n\t\t\t\t(action: TCommonsPresentationBlankAction): void => {\n\t\t\t\t\tthis.blankState = action.state;\n\t\t\t\t\tconsole.log('blank', action.state);\n\t\t\t\t}\n\t\t);\n\n\t\tthis.subscribe(\n\t\t\t\tthis.presentationService.reachedSlideObservable,\n\t\t\t\t(action: TCommonsPresentationReachedSlide): void => {\n\t\t\t\t\tthis.page = action.page;\n\t\t\t\t\tthis.index = action.index;\n\n\t\t\t\t\tconsole.log('reached slide', action);\n\n\t\t\t\t\t// doesn't actually do anything at the moment, as the page handling is done in the app\n\t\t\t\t\tconst path: string[] = [ 'notes', ...this.page.split(':'), this.index.toString(10) ];\n\t\t\t\t\tvoid this.router.navigate(path, { relativeTo: this.activatedRoute.root });\n\t\t\t\t}\n\t\t);\n\n\t\tthis.subscribe(\n\t\t\t\tthis.timeService.tickObservable,\n\t\t\t\t(tick: TCommonsPresentationRemoteTimeTick): void => {\n\t\t\t\t\tthis.nowTime = tick.now;\n\t\t\t\t\tthis.elapsedTime = tick.elapsed;\n\t\t\t\t\tthis.pageRemaining = tick.pageRemaining;\n\t\t\t\t}\n\t\t);\n\t}\n\n\tpublic ngAfterViewInit(): void {\n\t\tthis.networkService.connect();\n\t}\n\n\tprotected doPrev(magnitude: ECommonsPresentationMoveMagnitude): void {\n\t\tvoid this.networkService.prev(magnitude);\n\t}\n\n\tprotected doNext(magnitude: ECommonsPresentationMoveMagnitude): void {\n\t\tvoid this.networkService.next(magnitude);\n\t}\n\n\tprotected doRestart(): void {\n\t\tvoid this.networkService.restart();\n\t}\n\n\tprotected doEnd(): void {\n\t\tvoid this.networkService.end();\n\t}\n\n\tprotected doBlank(state: boolean|'holding'): void {\n\t\tthis.blankState = state;\n\t\tvoid this.networkService.blank(state);\n\t}\n\n\tprotected doShowAll(): void {\n\t\tvoid this.networkService.showAll();\n\t}\n}\n","<section outer>\n\t<section times>\n\t\t<time>{{ this.nowTime | time }}</time>\n\t\t<time>{{ this.elapsedTime | duration }}</time>\n\t\t<time\n\t\t\t\t[class.last-minute]=\"this.pageRemaining && this.pageRemaining.seconds < 60\"\n\t\t\t\t[class.overrun]=\"this.pageRemaining && this.pageRemaining.seconds < 1\"\n\t\t>{{ this.pageRemaining | duration }}</time>\n\t</section>\n\t<section buttons>\n\t\t<button prev commons-button class=\"filled\"\n\t\t\t\t(click)=\"this.doPrev(ECommonsPresentationMoveMagnitude.EITHER);\"\n\t\t>Prev</button>\n\t\t<button next commons-button class=\"filled\"\n\t\t\t\t(click)=\"this.doNext(ECommonsPresentationMoveMagnitude.EITHER);\"\n\t\t>Next</button>\n\n\t\t<button pageprev commons-button class=\"raised\"\n\t\t\t\t(click)=\"this.doPrev(ECommonsPresentationMoveMagnitude.PAGE);\"\n\t\t>Page Prev</button>\n\t\t<button pagenext commons-button class=\"raised\"\n\t\t\t\t(click)=\"this.doNext(ECommonsPresentationMoveMagnitude.PAGE);\"\n\t\t>Page Next</button>\n\n\t\t<button restart commons-button\n\t\t\t\t(click)=\"this.doRestart();\"\n\t\t>Restart</button>\n\t\t<button end commons-button\n\t\t\t\t(click)=\"this.doEnd();\"\n\t\t>End</button>\n\t\t<button all commons-button\n\t\t\t\t(click)=\"this.doShowAll();\"\n\t\t>Show all</button>\n\n\t\t<button blank commons-button class=\"raised\"\n\t\t\t\t[disabled]=\"this.blankState === true\"\n\t\t\t\t(click)=\"this.doBlank(true);\"\n\t\t>Blank</button>\n\t\t<button holding commons-button class=\"raised\"\n\t\t\t\t[disabled]=\"this.blankState === 'holding'\"\n\t\t\t\t(click)=\"this.doBlank('holding');\"\n\t\t>Holding</button>\n\t\t<button show commons-button class=\"raised\"\n\t\t\t\t[disabled]=\"this.blankState === false\"\n\t\t\t\t(click)=\"this.doBlank(false);\"\n\t\t>Restore</button>\n\t</section>\n\t<section custom-buttons><ng-content select=\"[custom-buttons]\"></ng-content></section>\n\t<section notes><ng-content select=\"[notes]\"></ng-content></section>\n</section>\n","/*\n * Public API Surface of ngx-presentationcommons-esm-remote\n */\n\nexport * from './lib/types/ttime-tick';\nexport * from './lib/services/config.service';\nexport * from './lib/services/time.service';\nexport * from './lib/services/network.service';\n// export * from './lib/pipes/duration.pipe';\n// export * from './lib/pipes/time.pipe';\nexport * from './lib/components/core/core.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":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EAAA,UAAA,EAAA,CAAA;kBAVlD,SAAS;+BACE,kCAAkC,EAAA,UAAA,EAChC,IAAI,EACP,OAAA,EAAA;wBACP,QAAQ;wBACR;AACD,qBAAA,EAAA,QAAA,EAAA,s7DAAA,EAAA,MAAA,EAAA,CAAA,4sCAAA,CAAA,EAAA;;;AEtBH;;AAEG;;ACFH;;AAEG;;;;"}
|
package/index.d.ts
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { AfterViewInit, OnInit } from '@angular/core';
|
|
2
|
+
import { CommonsFixedDate, CommonsFixedDuration } from 'tscommons-esm-core';
|
|
3
|
+
import { CommonsComponent } from 'ngx-angularcommons-esm-core';
|
|
4
|
+
import { ECommonsPresentationMoveMagnitude } from 'ngx-presentationcommons-esm-core';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class CommonsPresentationRemoteCoreComponent extends CommonsComponent implements OnInit, AfterViewInit {
|
|
7
|
+
protected ECommonsPresentationMoveMagnitude: typeof ECommonsPresentationMoveMagnitude;
|
|
8
|
+
private readonly router;
|
|
9
|
+
private readonly activatedRoute;
|
|
10
|
+
private readonly presentationService;
|
|
11
|
+
private readonly networkService;
|
|
12
|
+
private readonly timeService;
|
|
13
|
+
protected blankState: boolean | 'holding';
|
|
14
|
+
protected page: string | undefined;
|
|
15
|
+
protected index: number | undefined;
|
|
16
|
+
protected nowTime: CommonsFixedDate | undefined;
|
|
17
|
+
protected elapsedTime: CommonsFixedDuration | undefined;
|
|
18
|
+
protected pageRemaining: CommonsFixedDuration | undefined;
|
|
19
|
+
ngOnInit(): void;
|
|
20
|
+
ngAfterViewInit(): void;
|
|
21
|
+
protected doPrev(magnitude: ECommonsPresentationMoveMagnitude): void;
|
|
22
|
+
protected doNext(magnitude: ECommonsPresentationMoveMagnitude): void;
|
|
23
|
+
protected doRestart(): void;
|
|
24
|
+
protected doEnd(): void;
|
|
25
|
+
protected doBlank(state: boolean | 'holding'): void;
|
|
26
|
+
protected doShowAll(): void;
|
|
27
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CommonsPresentationRemoteCoreComponent, never>;
|
|
28
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CommonsPresentationRemoteCoreComponent, "commons-presentation-remote-core", never, {}, {}, never, ["[custom-buttons]", "[notes]"], true, never>;
|
|
29
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { PipeTransform } from '@angular/core';
|
|
2
|
+
import { CommonsFixedDuration } from 'tscommons-esm-core';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class DurationPipe implements PipeTransform {
|
|
5
|
+
transform(value: CommonsFixedDuration | undefined): string;
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DurationPipe, never>;
|
|
7
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<DurationPipe, "duration", true>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { PipeTransform } from '@angular/core';
|
|
2
|
+
import { CommonsFixedDate } from 'tscommons-esm-core';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class TimePipe implements PipeTransform {
|
|
5
|
+
transform(value: CommonsFixedDate | undefined): string;
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TimePipe, never>;
|
|
7
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<TimePipe, "time", true>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class CommonsPresentationRemoteConfigService {
|
|
3
|
+
private configService;
|
|
4
|
+
private config;
|
|
5
|
+
constructor();
|
|
6
|
+
get url(): string;
|
|
7
|
+
get ns(): string;
|
|
8
|
+
get channel(): string;
|
|
9
|
+
get deviceId(): string;
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CommonsPresentationRemoteConfigService, never>;
|
|
11
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<CommonsPresentationRemoteConfigService>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { CommonsPresentationNetworkService } from 'ngx-presentationcommons-esm-network';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class CommonsPresentationRemoteNetworkService extends CommonsPresentationNetworkService {
|
|
4
|
+
constructor();
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CommonsPresentationRemoteNetworkService, never>;
|
|
6
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<CommonsPresentationRemoteNetworkService>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
import { CommonsFixedDate, CommonsFixedDuration } from 'tscommons-esm-core';
|
|
3
|
+
import { TCommonsPresentationRemoteTimeTick } from '../types/ttime-tick';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class CommonsPresentationRemoteTimeService {
|
|
6
|
+
private internalNow;
|
|
7
|
+
private internalStart;
|
|
8
|
+
private internalPageDeadline;
|
|
9
|
+
private onTick;
|
|
10
|
+
get tickObservable(): Observable<TCommonsPresentationRemoteTimeTick>;
|
|
11
|
+
constructor();
|
|
12
|
+
get now(): CommonsFixedDate;
|
|
13
|
+
get elapsed(): CommonsFixedDuration | undefined;
|
|
14
|
+
get page(): CommonsFixedDuration | undefined;
|
|
15
|
+
private tick;
|
|
16
|
+
reset(): void;
|
|
17
|
+
setPage(duration: CommonsFixedDuration): void;
|
|
18
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CommonsPresentationRemoteTimeService, never>;
|
|
19
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<CommonsPresentationRemoteTimeService>;
|
|
20
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "ngx-presentationcommons-esm-remote",
|
|
3
|
+
"version": "0.0.2",
|
|
4
|
+
"peerDependencies": {
|
|
5
|
+
"@angular/common": "^19.2.0",
|
|
6
|
+
"@angular/core": "^19.2.0",
|
|
7
|
+
"tscommons-esm-core": "^0.1.0",
|
|
8
|
+
"tscommons-esm-async": "^1.0.3",
|
|
9
|
+
"ngx-angularcommons-esm-core": "^0.0.7",
|
|
10
|
+
"ngx-angularcommons-esm-app": "^0.0.8",
|
|
11
|
+
"ngx-presentationcommons-esm-core": "^0.0.2",
|
|
12
|
+
"ngx-presentationcommons-esm-network": "^0.0.2"
|
|
13
|
+
},
|
|
14
|
+
"dependencies": {
|
|
15
|
+
"tslib": "^2.3.0"
|
|
16
|
+
},
|
|
17
|
+
"sideEffects": false,
|
|
18
|
+
"module": "fesm2022/ngx-presentationcommons-esm-remote.mjs",
|
|
19
|
+
"typings": "index.d.ts",
|
|
20
|
+
"exports": {
|
|
21
|
+
"./package.json": {
|
|
22
|
+
"default": "./package.json"
|
|
23
|
+
},
|
|
24
|
+
".": {
|
|
25
|
+
"types": "./index.d.ts",
|
|
26
|
+
"default": "./fesm2022/ngx-presentationcommons-esm-remote.mjs"
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|