ngx-presentationcommons-esm-core 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 ADDED
@@ -0,0 +1,63 @@
1
+ # NgxPresentationcommonsEsmCore
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-core
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-core
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,236 @@
1
+ import { commonsTypeIsString } from 'tscommons-esm-core';
2
+ import * as i0 from '@angular/core';
3
+ import { EventEmitter, Injectable } from '@angular/core';
4
+
5
+ var ECommonsPresentationActionSource;
6
+ (function (ECommonsPresentationActionSource) {
7
+ ECommonsPresentationActionSource["INTERNAL"] = "internal";
8
+ ECommonsPresentationActionSource["NETWORK"] = "network";
9
+ ECommonsPresentationActionSource["KEY"] = "key";
10
+ })(ECommonsPresentationActionSource || (ECommonsPresentationActionSource = {}));
11
+ function toECommonsPresentationActionSource(type) {
12
+ switch (type) {
13
+ case ECommonsPresentationActionSource.INTERNAL.toString():
14
+ return ECommonsPresentationActionSource.INTERNAL;
15
+ case ECommonsPresentationActionSource.NETWORK.toString():
16
+ return ECommonsPresentationActionSource.NETWORK;
17
+ case ECommonsPresentationActionSource.KEY.toString():
18
+ return ECommonsPresentationActionSource.KEY;
19
+ }
20
+ return undefined;
21
+ }
22
+ function fromECommonsPresentationActionSource(type) {
23
+ switch (type) {
24
+ case ECommonsPresentationActionSource.INTERNAL:
25
+ return ECommonsPresentationActionSource.INTERNAL.toString();
26
+ case ECommonsPresentationActionSource.NETWORK:
27
+ return ECommonsPresentationActionSource.NETWORK.toString();
28
+ case ECommonsPresentationActionSource.KEY:
29
+ return ECommonsPresentationActionSource.KEY.toString();
30
+ }
31
+ throw new Error('Unknown ECommonsPresentationActionSource');
32
+ }
33
+ function isECommonsPresentationActionSource(test) {
34
+ if (!commonsTypeIsString(test))
35
+ return false;
36
+ return toECommonsPresentationActionSource(test) !== undefined;
37
+ }
38
+ function keyToECommonsPresentationActionSource(key) {
39
+ switch (key) {
40
+ case 'INTERNAL':
41
+ return ECommonsPresentationActionSource.INTERNAL;
42
+ case 'NETWORK':
43
+ return ECommonsPresentationActionSource.NETWORK;
44
+ case 'KEY':
45
+ return ECommonsPresentationActionSource.KEY;
46
+ }
47
+ throw new Error(`Unable to obtain ECommonsPresentationActionSource for key: ${key}`);
48
+ }
49
+ const ECOMMONS_PRESENTATION_ACTION_SOURCES = Object.keys(ECommonsPresentationActionSource)
50
+ .map((e) => keyToECommonsPresentationActionSource(e));
51
+
52
+ var ECommonsPresentationMoveMagnitude;
53
+ (function (ECommonsPresentationMoveMagnitude) {
54
+ ECommonsPresentationMoveMagnitude["PAGE"] = "page";
55
+ ECommonsPresentationMoveMagnitude["INNER"] = "inner";
56
+ ECommonsPresentationMoveMagnitude["EITHER"] = "either";
57
+ })(ECommonsPresentationMoveMagnitude || (ECommonsPresentationMoveMagnitude = {}));
58
+ function toECommonsPresentationMoveMagnitude(type) {
59
+ switch (type) {
60
+ case ECommonsPresentationMoveMagnitude.PAGE.toString():
61
+ return ECommonsPresentationMoveMagnitude.PAGE;
62
+ case ECommonsPresentationMoveMagnitude.INNER.toString():
63
+ return ECommonsPresentationMoveMagnitude.INNER;
64
+ case ECommonsPresentationMoveMagnitude.EITHER.toString():
65
+ return ECommonsPresentationMoveMagnitude.EITHER;
66
+ }
67
+ return undefined;
68
+ }
69
+ function fromECommonsPresentationMoveMagnitude(type) {
70
+ switch (type) {
71
+ case ECommonsPresentationMoveMagnitude.PAGE:
72
+ return ECommonsPresentationMoveMagnitude.PAGE.toString();
73
+ case ECommonsPresentationMoveMagnitude.INNER:
74
+ return ECommonsPresentationMoveMagnitude.INNER.toString();
75
+ case ECommonsPresentationMoveMagnitude.EITHER:
76
+ return ECommonsPresentationMoveMagnitude.EITHER.toString();
77
+ }
78
+ throw new Error('Unknown ECommonsPresentationMoveMagnitude');
79
+ }
80
+ function isECommonsPresentationMoveMagnitude(test) {
81
+ if (!commonsTypeIsString(test))
82
+ return false;
83
+ return toECommonsPresentationMoveMagnitude(test) !== undefined;
84
+ }
85
+ function keyToECommonsPresentationMoveMagnitude(key) {
86
+ switch (key) {
87
+ case 'PAGE':
88
+ return ECommonsPresentationMoveMagnitude.PAGE;
89
+ case 'INNER':
90
+ return ECommonsPresentationMoveMagnitude.INNER;
91
+ case 'EITHER':
92
+ return ECommonsPresentationMoveMagnitude.EITHER;
93
+ }
94
+ throw new Error(`Unable to obtain ECommonsPresentationMoveMagnitude for key: ${key}`);
95
+ }
96
+ const ECOMMONS_PRESENTATION_MOVE_MAGNITUDES = Object.keys(ECommonsPresentationMoveMagnitude)
97
+ .map((e) => keyToECommonsPresentationMoveMagnitude(e));
98
+
99
+ function buildAction(source, sourceId) {
100
+ switch (source) {
101
+ case ECommonsPresentationActionSource.KEY:
102
+ case ECommonsPresentationActionSource.INTERNAL:
103
+ return {
104
+ source: source
105
+ };
106
+ case ECommonsPresentationActionSource.NETWORK:
107
+ if (!sourceId)
108
+ throw new Error('SourceId is mandatory for a NETWORK action');
109
+ return {
110
+ source: source,
111
+ sourceId: sourceId
112
+ };
113
+ }
114
+ }
115
+ class CommonsPresentationService {
116
+ triggers = new Map();
117
+ get triggerNames() {
118
+ return Array.from(this.triggers.keys()).slice();
119
+ }
120
+ onPrev = new EventEmitter(true);
121
+ onNext = new EventEmitter(true);
122
+ onRestart = new EventEmitter(true);
123
+ onJump = new EventEmitter(true);
124
+ onEnd = new EventEmitter(true);
125
+ onBlank = new EventEmitter(true);
126
+ onShowAll = new EventEmitter(true);
127
+ onReachedSlide = new EventEmitter(true);
128
+ addTrigger(name) {
129
+ if (this.triggers.has(name))
130
+ throw new Error('Trigger is already defined');
131
+ this.triggers.set(name, new EventEmitter(true));
132
+ }
133
+ removeTrigger(name) {
134
+ if (!this.triggers.has(name))
135
+ return false;
136
+ this.triggers.delete(name);
137
+ return true;
138
+ }
139
+ prev(magnitude, source = ECommonsPresentationActionSource.INTERNAL, sourceId) {
140
+ this.onPrev.next({
141
+ ...buildAction(source, sourceId),
142
+ magnitude: magnitude
143
+ });
144
+ }
145
+ next(magnitude, source = ECommonsPresentationActionSource.INTERNAL, sourceId) {
146
+ this.onNext.next({
147
+ ...buildAction(source, sourceId),
148
+ magnitude: magnitude
149
+ });
150
+ }
151
+ restart(source = ECommonsPresentationActionSource.INTERNAL, sourceId) {
152
+ this.onRestart.next(buildAction(source, sourceId));
153
+ }
154
+ jump(page, source = ECommonsPresentationActionSource.INTERNAL, sourceId) {
155
+ this.onJump.next({
156
+ ...buildAction(source, sourceId),
157
+ page: page
158
+ });
159
+ }
160
+ end(source = ECommonsPresentationActionSource.INTERNAL, sourceId) {
161
+ this.onEnd.next(buildAction(source, sourceId));
162
+ }
163
+ blank(state, source = ECommonsPresentationActionSource.INTERNAL, sourceId) {
164
+ this.onBlank.next({
165
+ ...buildAction(source, sourceId),
166
+ state: state
167
+ });
168
+ }
169
+ showAll(source = ECommonsPresentationActionSource.INTERNAL, sourceId) {
170
+ this.onShowAll.next(buildAction(source, sourceId));
171
+ }
172
+ trigger(name, data, source = ECommonsPresentationActionSource.INTERNAL, sourceId) {
173
+ if (!this.triggers.has(name))
174
+ throw new Error('No such trigger defined yet');
175
+ this.triggers.get(name).next({
176
+ ...buildAction(source, sourceId),
177
+ data: data
178
+ });
179
+ }
180
+ get prevObservable() {
181
+ return this.onPrev;
182
+ }
183
+ get nextObservable() {
184
+ return this.onNext;
185
+ }
186
+ get restartObservable() {
187
+ return this.onRestart;
188
+ }
189
+ get jumpObservable() {
190
+ return this.onJump;
191
+ }
192
+ get endObservable() {
193
+ return this.onEnd;
194
+ }
195
+ get blankObservable() {
196
+ return this.onBlank;
197
+ }
198
+ get showAllObservable() {
199
+ return this.onShowAll;
200
+ }
201
+ triggerObservable(name) {
202
+ if (!this.triggers.has(name))
203
+ throw new Error('No such trigger defined yet');
204
+ return this.triggers.get(name);
205
+ }
206
+ // this sort of words in reverse, to announce the current page to the remote if present
207
+ reachedSlide(page, index, source = ECommonsPresentationActionSource.INTERNAL, sourceId) {
208
+ this.onReachedSlide.next({
209
+ ...buildAction(source, sourceId),
210
+ page: page,
211
+ index: index
212
+ });
213
+ }
214
+ get reachedSlideObservable() {
215
+ return this.onReachedSlide;
216
+ }
217
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: CommonsPresentationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
218
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: CommonsPresentationService, providedIn: 'root' });
219
+ }
220
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: CommonsPresentationService, decorators: [{
221
+ type: Injectable,
222
+ args: [{
223
+ providedIn: 'root'
224
+ }]
225
+ }] });
226
+
227
+ /*
228
+ * Public API Surface of ngx-presentationcommons-esm-core
229
+ */
230
+
231
+ /**
232
+ * Generated bundle index. Do not edit.
233
+ */
234
+
235
+ export { CommonsPresentationService, ECOMMONS_PRESENTATION_ACTION_SOURCES, ECOMMONS_PRESENTATION_MOVE_MAGNITUDES, ECommonsPresentationActionSource, ECommonsPresentationMoveMagnitude, fromECommonsPresentationActionSource, fromECommonsPresentationMoveMagnitude, isECommonsPresentationActionSource, isECommonsPresentationMoveMagnitude, keyToECommonsPresentationActionSource, keyToECommonsPresentationMoveMagnitude, toECommonsPresentationActionSource, toECommonsPresentationMoveMagnitude };
236
+ //# sourceMappingURL=ngx-presentationcommons-esm-core.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ngx-presentationcommons-esm-core.mjs","sources":["../../../projects/ngx-presentationcommons-esm-core/src/lib/enum/eaction-source.ts","../../../projects/ngx-presentationcommons-esm-core/src/lib/enum/emove-magnitude.ts","../../../projects/ngx-presentationcommons-esm-core/src/lib/services/presentation.service.ts","../../../projects/ngx-presentationcommons-esm-core/src/public-api.ts","../../../projects/ngx-presentationcommons-esm-core/src/ngx-presentationcommons-esm-core.ts"],"sourcesContent":["import { commonsTypeIsString } from 'tscommons-esm-core';\n\nexport enum ECommonsPresentationActionSource {\n\t\tINTERNAL = 'internal',\n\t\tNETWORK = 'network',\n\t\tKEY = 'key'\n}\n\nexport function toECommonsPresentationActionSource(type: string): ECommonsPresentationActionSource|undefined {\n\tswitch (type) {\n\t\tcase ECommonsPresentationActionSource.INTERNAL.toString():\n\t\t\treturn ECommonsPresentationActionSource.INTERNAL;\n\t\tcase ECommonsPresentationActionSource.NETWORK.toString():\n\t\t\treturn ECommonsPresentationActionSource.NETWORK;\n\t\tcase ECommonsPresentationActionSource.KEY.toString():\n\t\t\treturn ECommonsPresentationActionSource.KEY;\n\t}\n\treturn undefined;\n}\n\nexport function fromECommonsPresentationActionSource(type: ECommonsPresentationActionSource): string {\n\tswitch (type) {\n\t\tcase ECommonsPresentationActionSource.INTERNAL:\n\t\t\treturn ECommonsPresentationActionSource.INTERNAL.toString();\n\t\tcase ECommonsPresentationActionSource.NETWORK:\n\t\t\treturn ECommonsPresentationActionSource.NETWORK.toString();\n\t\tcase ECommonsPresentationActionSource.KEY:\n\t\t\treturn ECommonsPresentationActionSource.KEY.toString();\n\t}\n\t\n\tthrow new Error('Unknown ECommonsPresentationActionSource');\n}\n\nexport function isECommonsPresentationActionSource(test: unknown): test is ECommonsPresentationActionSource {\n\tif (!commonsTypeIsString(test)) return false;\n\t\n\treturn toECommonsPresentationActionSource(test) !== undefined;\n}\n\nexport function keyToECommonsPresentationActionSource(key: string): ECommonsPresentationActionSource {\n\tswitch (key) {\n\t\tcase 'INTERNAL':\n\t\t\treturn ECommonsPresentationActionSource.INTERNAL;\n\t\tcase 'NETWORK':\n\t\t\treturn ECommonsPresentationActionSource.NETWORK;\n\t\tcase 'KEY':\n\t\t\treturn ECommonsPresentationActionSource.KEY;\n\t}\n\t\n\tthrow new Error(`Unable to obtain ECommonsPresentationActionSource for key: ${key}`);\n}\n\nexport const ECOMMONS_PRESENTATION_ACTION_SOURCES: ECommonsPresentationActionSource[] = Object.keys(ECommonsPresentationActionSource)\n\t\t.map((e: string): ECommonsPresentationActionSource => keyToECommonsPresentationActionSource(e));\n","import { commonsTypeIsString } from 'tscommons-esm-core';\n\nexport enum ECommonsPresentationMoveMagnitude {\n\t\tPAGE = 'page',\n\t\tINNER = 'inner',\n\t\tEITHER = 'either'\n}\n\nexport function toECommonsPresentationMoveMagnitude(type: string): ECommonsPresentationMoveMagnitude|undefined {\n\tswitch (type) {\n\t\tcase ECommonsPresentationMoveMagnitude.PAGE.toString():\n\t\t\treturn ECommonsPresentationMoveMagnitude.PAGE;\n\t\tcase ECommonsPresentationMoveMagnitude.INNER.toString():\n\t\t\treturn ECommonsPresentationMoveMagnitude.INNER;\n\t\tcase ECommonsPresentationMoveMagnitude.EITHER.toString():\n\t\t\treturn ECommonsPresentationMoveMagnitude.EITHER;\n\t}\n\treturn undefined;\n}\n\nexport function fromECommonsPresentationMoveMagnitude(type: ECommonsPresentationMoveMagnitude): string {\n\tswitch (type) {\n\t\tcase ECommonsPresentationMoveMagnitude.PAGE:\n\t\t\treturn ECommonsPresentationMoveMagnitude.PAGE.toString();\n\t\tcase ECommonsPresentationMoveMagnitude.INNER:\n\t\t\treturn ECommonsPresentationMoveMagnitude.INNER.toString();\n\t\tcase ECommonsPresentationMoveMagnitude.EITHER:\n\t\t\treturn ECommonsPresentationMoveMagnitude.EITHER.toString();\n\t}\n\t\n\tthrow new Error('Unknown ECommonsPresentationMoveMagnitude');\n}\n\nexport function isECommonsPresentationMoveMagnitude(test: unknown): test is ECommonsPresentationMoveMagnitude {\n\tif (!commonsTypeIsString(test)) return false;\n\t\n\treturn toECommonsPresentationMoveMagnitude(test) !== undefined;\n}\n\nexport function keyToECommonsPresentationMoveMagnitude(key: string): ECommonsPresentationMoveMagnitude {\n\tswitch (key) {\n\t\tcase 'PAGE':\n\t\t\treturn ECommonsPresentationMoveMagnitude.PAGE;\n\t\tcase 'INNER':\n\t\t\treturn ECommonsPresentationMoveMagnitude.INNER;\n\t\tcase 'EITHER':\n\t\t\treturn ECommonsPresentationMoveMagnitude.EITHER;\n\t}\n\t\n\tthrow new Error(`Unable to obtain ECommonsPresentationMoveMagnitude for key: ${key}`);\n}\n\nexport const ECOMMONS_PRESENTATION_MOVE_MAGNITUDES: ECommonsPresentationMoveMagnitude[] = Object.keys(ECommonsPresentationMoveMagnitude)\n\t\t.map((e: string): ECommonsPresentationMoveMagnitude => keyToECommonsPresentationMoveMagnitude(e));\n","import { EventEmitter, Injectable } from '@angular/core';\n\nimport { Observable } from 'rxjs';\n\nimport { ECommonsPresentationActionSource } from '../enum/eaction-source';\n\nimport {\n\t\tTCommonsPresentationAction,\n\t\tTCommonsPresentationBlankAction,\n\t\tTCommonsPresentationJumpAction,\n\t\tTCommonsPresentationMoveAction,\n\t\tTCommonsPresentationReachedSlide,\n\t\tTCommonsPresentationTriggerAction\n} from '../types/taction';\nimport { ECommonsPresentationMoveMagnitude } from '../enum/emove-magnitude';\n\nfunction buildAction(source: ECommonsPresentationActionSource, sourceId?: string): TCommonsPresentationAction {\n\tswitch (source) {\n\t\tcase ECommonsPresentationActionSource.KEY:\n\t\tcase ECommonsPresentationActionSource.INTERNAL:\n\t\t\treturn {\n\t\t\t\t\tsource: source\n\t\t\t};\n\t\tcase ECommonsPresentationActionSource.NETWORK:\n\t\t\tif (!sourceId) throw new Error('SourceId is mandatory for a NETWORK action');\n\t\t\treturn {\n\t\t\t\t\tsource: source,\n\t\t\t\t\tsourceId: sourceId\n\t\t\t};\n\t}\n}\n\n@Injectable({\n\t\tprovidedIn: 'root'\n})\nexport class CommonsPresentationService {\n\tprivate triggers: Map<\n\t\t\tstring,\n\t\t\tEventEmitter<TCommonsPresentationTriggerAction>\n\t> = new Map<\n\t\t\tstring,\n\t\t\tEventEmitter<TCommonsPresentationTriggerAction>\n\t>();\n\tpublic get triggerNames(): string[] {\n\t\treturn Array.from(this.triggers.keys()).slice();\n\t}\n\n\tprotected onPrev: EventEmitter<TCommonsPresentationMoveAction> = new EventEmitter<TCommonsPresentationMoveAction>(true);\n\tprotected onNext: EventEmitter<TCommonsPresentationMoveAction> = new EventEmitter<TCommonsPresentationMoveAction>(true);\n\tprotected onRestart: EventEmitter<TCommonsPresentationAction> = new EventEmitter<TCommonsPresentationAction>(true);\n\tprotected onJump: EventEmitter<TCommonsPresentationJumpAction> = new EventEmitter<TCommonsPresentationJumpAction>(true);\n\tprotected onEnd: EventEmitter<TCommonsPresentationAction> = new EventEmitter<TCommonsPresentationAction>(true);\n\tprotected onBlank: EventEmitter<TCommonsPresentationBlankAction> = new EventEmitter<TCommonsPresentationBlankAction>(true);\n\tprotected onShowAll: EventEmitter<TCommonsPresentationAction> = new EventEmitter<TCommonsPresentationAction>(true);\n\t\n\tprotected onReachedSlide: EventEmitter<TCommonsPresentationReachedSlide> = new EventEmitter<TCommonsPresentationReachedSlide>(true);\n\n\tpublic addTrigger(name: string): void {\n\t\tif (this.triggers.has(name)) throw new Error('Trigger is already defined');\n\n\t\tthis.triggers.set(\n\t\t\t\tname,\n\t\t\t\tnew EventEmitter<TCommonsPresentationTriggerAction>(true)\n\t\t);\n\t}\n\n\tpublic removeTrigger(name: string): boolean {\n\t\tif (!this.triggers.has(name)) return false;\n\n\t\tthis.triggers.delete(name);\n\n\t\treturn true;\n\t}\n\n\tpublic prev(\n\t\t\tmagnitude: ECommonsPresentationMoveMagnitude,\n\t\t\tsource: ECommonsPresentationActionSource = ECommonsPresentationActionSource.INTERNAL,\n\t\t\tsourceId?: string\n\t): void {\n\t\tthis.onPrev.next({\n\t\t\t\t...buildAction(source, sourceId),\n\t\t\t\tmagnitude: magnitude\n\t\t});\n\t}\n\n\tpublic next(\n\t\t\tmagnitude: ECommonsPresentationMoveMagnitude,\n\t\t\tsource: ECommonsPresentationActionSource = ECommonsPresentationActionSource.INTERNAL,\n\t\t\tsourceId?: string\n\t): void {\n\t\tthis.onNext.next({\n\t\t\t\t...buildAction(source, sourceId),\n\t\t\t\tmagnitude: magnitude\n\t\t});\n\t}\n\n\tpublic restart(\n\t\t\tsource: ECommonsPresentationActionSource = ECommonsPresentationActionSource.INTERNAL,\n\t\t\tsourceId?: string\n\t): void {\n\t\tthis.onRestart.next(buildAction(source, sourceId));\n\t}\n\n\tpublic jump(\n\t\t\tpage: string,\n\t\t\tsource: ECommonsPresentationActionSource = ECommonsPresentationActionSource.INTERNAL,\n\t\t\tsourceId?: string\n\t): void {\n\t\tthis.onJump.next({\n\t\t\t\t...buildAction(source, sourceId),\n\t\t\t\tpage: page\n\t\t});\n\t}\n\n\tpublic end(\n\t\t\tsource: ECommonsPresentationActionSource = ECommonsPresentationActionSource.INTERNAL,\n\t\t\tsourceId?: string\n\t): void {\n\t\tthis.onEnd.next(buildAction(source, sourceId));\n\t}\n\n\tpublic blank(\n\t\t\tstate: boolean|'holding',\n\t\t\tsource: ECommonsPresentationActionSource = ECommonsPresentationActionSource.INTERNAL,\n\t\t\tsourceId?: string\n\t): void {\n\t\tthis.onBlank.next({\n\t\t\t\t...buildAction(source, sourceId),\n\t\t\t\tstate: state\n\t\t});\n\t}\n\n\tpublic showAll(\n\t\t\tsource: ECommonsPresentationActionSource = ECommonsPresentationActionSource.INTERNAL,\n\t\t\tsourceId?: string\n\t): void {\n\t\tthis.onShowAll.next(buildAction(source, sourceId));\n\t}\n\n\tpublic trigger(\n\t\t\tname: string,\n\t\t\tdata?: unknown,\n\t\t\tsource: ECommonsPresentationActionSource = ECommonsPresentationActionSource.INTERNAL,\n\t\t\tsourceId?: string\n\t): void {\n\t\tif (!this.triggers.has(name)) throw new Error('No such trigger defined yet');\n\n\t\tthis.triggers.get(name)!.next({\n\t\t\t\t...buildAction(source, sourceId),\n\t\t\t\tdata: data\n\t\t});\n\t}\n\n\tpublic get prevObservable(): Observable<TCommonsPresentationMoveAction> {\n\t\treturn this.onPrev;\n\t}\n\n\tpublic get nextObservable(): Observable<TCommonsPresentationMoveAction> {\n\t\treturn this.onNext;\n\t}\n\n\tpublic get restartObservable(): Observable<TCommonsPresentationAction> {\n\t\treturn this.onRestart;\n\t}\n\n\tpublic get jumpObservable(): Observable<TCommonsPresentationJumpAction> {\n\t\treturn this.onJump;\n\t}\n\n\tpublic get endObservable(): Observable<TCommonsPresentationAction> {\n\t\treturn this.onEnd;\n\t}\n\n\tpublic get blankObservable(): Observable<TCommonsPresentationBlankAction> {\n\t\treturn this.onBlank;\n\t}\n\n\tpublic get showAllObservable(): Observable<TCommonsPresentationAction> {\n\t\treturn this.onShowAll;\n\t}\n\n\tpublic triggerObservable(name: string): Observable<TCommonsPresentationTriggerAction> {\n\t\tif (!this.triggers.has(name)) throw new Error('No such trigger defined yet');\n\n\t\treturn this.triggers.get(name)!;\n\t}\n\n\t// this sort of words in reverse, to announce the current page to the remote if present\n\n\tpublic reachedSlide(\n\t\t\tpage: string,\n\t\t\tindex: number,\n\t\t\tsource: ECommonsPresentationActionSource = ECommonsPresentationActionSource.INTERNAL,\n\t\t\tsourceId?: string\n\t): void {\n\t\tthis.onReachedSlide.next({\n\t\t\t\t...buildAction(source, sourceId),\n\t\t\t\tpage: page,\n\t\t\t\tindex: index\n\t\t});\n\t}\n\n\tpublic get reachedSlideObservable(): Observable<TCommonsPresentationReachedSlide> {\n\t\treturn this.onReachedSlide;\n\t}\n}\n","/*\n * Public API Surface of ngx-presentationcommons-esm-core\n */\n\nexport * from './lib/enum/eaction-source';\nexport * from './lib/enum/emove-magnitude';\nexport * from './lib/types/taction';\nexport * from './lib/services/presentation.service';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;IAEY;AAAZ,CAAA,UAAY,gCAAgC,EAAA;AAC1C,IAAA,gCAAA,CAAA,UAAA,CAAA,GAAA,UAAqB;AACrB,IAAA,gCAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACnB,IAAA,gCAAA,CAAA,KAAA,CAAA,GAAA,KAAW;AACb,CAAC,EAJW,gCAAgC,KAAhC,gCAAgC,GAI3C,EAAA,CAAA,CAAA;AAEK,SAAU,kCAAkC,CAAC,IAAY,EAAA;IAC9D,QAAQ,IAAI;AACX,QAAA,KAAK,gCAAgC,CAAC,QAAQ,CAAC,QAAQ,EAAE;YACxD,OAAO,gCAAgC,CAAC,QAAQ;AACjD,QAAA,KAAK,gCAAgC,CAAC,OAAO,CAAC,QAAQ,EAAE;YACvD,OAAO,gCAAgC,CAAC,OAAO;AAChD,QAAA,KAAK,gCAAgC,CAAC,GAAG,CAAC,QAAQ,EAAE;YACnD,OAAO,gCAAgC,CAAC,GAAG;;AAE7C,IAAA,OAAO,SAA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
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ /// <amd-module name="ngx-presentationcommons-esm-core" />
5
+ export * from './public-api';
@@ -0,0 +1,10 @@
1
+ export declare enum ECommonsPresentationActionSource {
2
+ INTERNAL = "internal",
3
+ NETWORK = "network",
4
+ KEY = "key"
5
+ }
6
+ export declare function toECommonsPresentationActionSource(type: string): ECommonsPresentationActionSource | undefined;
7
+ export declare function fromECommonsPresentationActionSource(type: ECommonsPresentationActionSource): string;
8
+ export declare function isECommonsPresentationActionSource(test: unknown): test is ECommonsPresentationActionSource;
9
+ export declare function keyToECommonsPresentationActionSource(key: string): ECommonsPresentationActionSource;
10
+ export declare const ECOMMONS_PRESENTATION_ACTION_SOURCES: ECommonsPresentationActionSource[];
@@ -0,0 +1,10 @@
1
+ export declare enum ECommonsPresentationMoveMagnitude {
2
+ PAGE = "page",
3
+ INNER = "inner",
4
+ EITHER = "either"
5
+ }
6
+ export declare function toECommonsPresentationMoveMagnitude(type: string): ECommonsPresentationMoveMagnitude | undefined;
7
+ export declare function fromECommonsPresentationMoveMagnitude(type: ECommonsPresentationMoveMagnitude): string;
8
+ export declare function isECommonsPresentationMoveMagnitude(test: unknown): test is ECommonsPresentationMoveMagnitude;
9
+ export declare function keyToECommonsPresentationMoveMagnitude(key: string): ECommonsPresentationMoveMagnitude;
10
+ export declare const ECOMMONS_PRESENTATION_MOVE_MAGNITUDES: ECommonsPresentationMoveMagnitude[];
@@ -0,0 +1,40 @@
1
+ import { EventEmitter } from '@angular/core';
2
+ import { Observable } from 'rxjs';
3
+ import { ECommonsPresentationActionSource } from '../enum/eaction-source';
4
+ import { TCommonsPresentationAction, TCommonsPresentationBlankAction, TCommonsPresentationJumpAction, TCommonsPresentationMoveAction, TCommonsPresentationReachedSlide, TCommonsPresentationTriggerAction } from '../types/taction';
5
+ import { ECommonsPresentationMoveMagnitude } from '../enum/emove-magnitude';
6
+ import * as i0 from "@angular/core";
7
+ export declare class CommonsPresentationService {
8
+ private triggers;
9
+ get triggerNames(): string[];
10
+ protected onPrev: EventEmitter<TCommonsPresentationMoveAction>;
11
+ protected onNext: EventEmitter<TCommonsPresentationMoveAction>;
12
+ protected onRestart: EventEmitter<TCommonsPresentationAction>;
13
+ protected onJump: EventEmitter<TCommonsPresentationJumpAction>;
14
+ protected onEnd: EventEmitter<TCommonsPresentationAction>;
15
+ protected onBlank: EventEmitter<TCommonsPresentationBlankAction>;
16
+ protected onShowAll: EventEmitter<TCommonsPresentationAction>;
17
+ protected onReachedSlide: EventEmitter<TCommonsPresentationReachedSlide>;
18
+ addTrigger(name: string): void;
19
+ removeTrigger(name: string): boolean;
20
+ prev(magnitude: ECommonsPresentationMoveMagnitude, source?: ECommonsPresentationActionSource, sourceId?: string): void;
21
+ next(magnitude: ECommonsPresentationMoveMagnitude, source?: ECommonsPresentationActionSource, sourceId?: string): void;
22
+ restart(source?: ECommonsPresentationActionSource, sourceId?: string): void;
23
+ jump(page: string, source?: ECommonsPresentationActionSource, sourceId?: string): void;
24
+ end(source?: ECommonsPresentationActionSource, sourceId?: string): void;
25
+ blank(state: boolean | 'holding', source?: ECommonsPresentationActionSource, sourceId?: string): void;
26
+ showAll(source?: ECommonsPresentationActionSource, sourceId?: string): void;
27
+ trigger(name: string, data?: unknown, source?: ECommonsPresentationActionSource, sourceId?: string): void;
28
+ get prevObservable(): Observable<TCommonsPresentationMoveAction>;
29
+ get nextObservable(): Observable<TCommonsPresentationMoveAction>;
30
+ get restartObservable(): Observable<TCommonsPresentationAction>;
31
+ get jumpObservable(): Observable<TCommonsPresentationJumpAction>;
32
+ get endObservable(): Observable<TCommonsPresentationAction>;
33
+ get blankObservable(): Observable<TCommonsPresentationBlankAction>;
34
+ get showAllObservable(): Observable<TCommonsPresentationAction>;
35
+ triggerObservable(name: string): Observable<TCommonsPresentationTriggerAction>;
36
+ reachedSlide(page: string, index: number, source?: ECommonsPresentationActionSource, sourceId?: string): void;
37
+ get reachedSlideObservable(): Observable<TCommonsPresentationReachedSlide>;
38
+ static ɵfac: i0.ɵɵFactoryDeclaration<CommonsPresentationService, never>;
39
+ static ɵprov: i0.ɵɵInjectableDeclaration<CommonsPresentationService>;
40
+ }
@@ -0,0 +1,24 @@
1
+ import { ECommonsPresentationActionSource } from '../enum/eaction-source';
2
+ import { ECommonsPresentationMoveMagnitude } from '../enum/emove-magnitude';
3
+ export type TCommonsPresentationAction = {
4
+ source: ECommonsPresentationActionSource.KEY | ECommonsPresentationActionSource.INTERNAL;
5
+ } | {
6
+ source: ECommonsPresentationActionSource.NETWORK;
7
+ sourceId: string;
8
+ };
9
+ export type TCommonsPresentationMoveAction = TCommonsPresentationAction & {
10
+ magnitude: ECommonsPresentationMoveMagnitude;
11
+ };
12
+ export type TCommonsPresentationJumpAction = TCommonsPresentationAction & {
13
+ page: string;
14
+ };
15
+ export type TCommonsPresentationBlankAction = TCommonsPresentationAction & {
16
+ state: boolean | 'holding';
17
+ };
18
+ export type TCommonsPresentationTriggerAction = TCommonsPresentationAction & {
19
+ data?: unknown;
20
+ };
21
+ export type TCommonsPresentationReachedSlide = TCommonsPresentationAction & {
22
+ page: string;
23
+ index: number;
24
+ };
package/package.json ADDED
@@ -0,0 +1,24 @@
1
+ {
2
+ "name": "ngx-presentationcommons-esm-core",
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
+ },
9
+ "dependencies": {
10
+ "tslib": "^2.3.0"
11
+ },
12
+ "sideEffects": false,
13
+ "module": "fesm2022/ngx-presentationcommons-esm-core.mjs",
14
+ "typings": "index.d.ts",
15
+ "exports": {
16
+ "./package.json": {
17
+ "default": "./package.json"
18
+ },
19
+ ".": {
20
+ "types": "./index.d.ts",
21
+ "default": "./fesm2022/ngx-presentationcommons-esm-core.mjs"
22
+ }
23
+ }
24
+ }
@@ -0,0 +1,4 @@
1
+ export * from './lib/enum/eaction-source';
2
+ export * from './lib/enum/emove-magnitude';
3
+ export * from './lib/types/taction';
4
+ export * from './lib/services/presentation.service';