@osovitny/anatoly 3.17.110 → 3.17.112

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.
Files changed (37) hide show
  1. package/esm2022/lib/billing/billing.module.mjs +19 -13
  2. package/esm2022/lib/billing/components/buttons/buyaccess-button.component.mjs +108 -0
  3. package/esm2022/lib/billing/components/buttons/subscribe-plan-button.component.mjs +119 -0
  4. package/esm2022/lib/billing/components/exports.mjs +7 -5
  5. package/esm2022/lib/billing/components/index.mjs +9 -7
  6. package/esm2022/lib/billing/components/pm/braintree/braintree.component.mjs +155 -0
  7. package/esm2022/lib/billing/components/pm/paypal/paypal-button.component.mjs +157 -0
  8. package/esm2022/lib/billing/components/pm/paypal/paypal.component.mjs +316 -0
  9. package/esm2022/lib/billing/components/pm/stripe/stripe.component.mjs +109 -0
  10. package/esm2022/lib/ui/components/copy-2-clipboard/copy-2-clipboard.component.mjs +3 -3
  11. package/esm2022/lib/ui/components/data-grid/control-panel.component.mjs +165 -0
  12. package/esm2022/lib/ui/components/exports.mjs +2 -4
  13. package/esm2022/lib/ui/components/index.mjs +3 -7
  14. package/esm2022/lib/ui/ui.module.mjs +37 -38
  15. package/fesm2022/osovitny-anatoly.mjs +1752 -1593
  16. package/fesm2022/osovitny-anatoly.mjs.map +1 -1
  17. package/lib/billing/billing.module.d.ts +15 -12
  18. package/lib/{ui/components/billing → billing/components/buttons}/buyaccess-button.component.d.ts +1 -1
  19. package/lib/{ui/components/billing → billing/components/buttons}/subscribe-plan-button.component.d.ts +1 -1
  20. package/lib/billing/components/exports.d.ts +6 -4
  21. package/lib/billing/components/index.d.ts +2 -2
  22. package/lib/billing/components/{braintree → pm/braintree}/braintree.component.d.ts +3 -3
  23. package/lib/billing/components/{paypal → pm/paypal}/paypal-button.component.d.ts +3 -3
  24. package/lib/billing/components/{paypal → pm/paypal}/paypal.component.d.ts +2 -2
  25. package/lib/billing/components/{stripe → pm/stripe}/stripe.component.d.ts +2 -2
  26. package/lib/ui/components/data-grid/control-panel.component.d.ts +30 -0
  27. package/lib/ui/components/exports.d.ts +1 -2
  28. package/lib/ui/components/index.d.ts +2 -2
  29. package/lib/ui/forms/index.d.ts +1 -1
  30. package/lib/ui/ui.module.d.ts +42 -43
  31. package/package.json +1 -1
  32. package/esm2022/lib/billing/components/braintree/braintree.component.mjs +0 -155
  33. package/esm2022/lib/billing/components/paypal/paypal-button.component.mjs +0 -157
  34. package/esm2022/lib/billing/components/paypal/paypal.component.mjs +0 -316
  35. package/esm2022/lib/billing/components/stripe/stripe.component.mjs +0 -109
  36. package/esm2022/lib/ui/components/billing/buyaccess-button.component.mjs +0 -108
  37. package/esm2022/lib/ui/components/billing/subscribe-plan-button.component.mjs +0 -119
@@ -1,18 +1,18 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { Injectable, Inject, EventEmitter, Output, Pipe, APP_INITIALIZER, Injector, NgModule, Component, Input, ChangeDetectionStrategy, ViewChild, Directive, ViewEncapsulation, HostBinding, HostListener, Optional, SkipSelf } from '@angular/core';
3
+ import { BehaviorSubject, Subject, filter, takeUntil, map as map$1, catchError, of, merge, forkJoin, timer, fromEvent, firstValueFrom } from 'rxjs';
4
+ import { map, tap, mergeMap } from 'rxjs/operators';
5
+ import * as i1 from '@angular/common/http';
6
+ import { HttpResponse, HttpClientModule, HttpClient, HTTP_INTERCEPTORS } from '@angular/common/http';
7
+ import * as i1$2 from '@angular/common';
8
+ import { LOCATION_INITIALIZED, DOCUMENT, CommonModule } from '@angular/common';
3
9
  import js_beautify from 'js-beautify';
4
- import * as i1 from '@angular/router';
10
+ import * as i1$1 from '@angular/router';
5
11
  import { NavigationEnd, NavigationStart, NavigationCancel, NavigationError, RouterModule } from '@angular/router';
6
12
  import { v4 } from 'uuid';
7
- import { BehaviorSubject, Subject, filter, takeUntil, map as map$1, catchError, of, merge, forkJoin, timer, fromEvent, firstValueFrom } from 'rxjs';
8
13
  import * as i4 from '@azure/msal-angular';
9
14
  import { MSAL_GUARD_CONFIG, MsalGuard, MsalInterceptor, MSAL_INTERCEPTOR_CONFIG, MSAL_INSTANCE, MsalService, MsalBroadcastService, MsalModule } from '@azure/msal-angular';
10
15
  import { BrowserUtils, EventType, InteractionStatus, InteractionType, InteractionRequiredAuthError, PromptValue, PublicClientApplication, LogLevel } from '@azure/msal-browser';
11
- import { map, tap, mergeMap } from 'rxjs/operators';
12
- import * as i1$1 from '@angular/common/http';
13
- import { HttpResponse, HttpClientModule, HttpClient, HTTP_INTERCEPTORS } from '@angular/common/http';
14
- import * as i1$2 from '@angular/common';
15
- import { LOCATION_INITIALIZED, DOCUMENT, CommonModule } from '@angular/common';
16
16
  import { format, formatDistance, formatDistanceToNow } from 'date-fns';
17
17
  import enUS from 'date-fns/locale/en-US';
18
18
  import * as i1$3 from '@ngx-translate/core';
@@ -94,40 +94,85 @@ const ApiUrl = `${AppCoreSettings?.api.url}`;
94
94
 
95
95
  Authors:
96
96
  Vadim Osovitny vadim.osovitny@osovitny.com
97
- Anatoly Osovitny anatoly.osovitny@osovitny.com
98
97
 
99
98
  Created:
100
- 1 Apr 2024
99
+ 13 Nov 2017
101
100
 
102
101
  Copyright (c) 2016-2025 Osovitny Inc. All rights reserved.
103
102
  </file>
104
103
  */
105
- function getAppSettingsById(id) {
106
- let apps = ClientApps;
107
- if (apps && id) {
108
- for (let i = 0; i < apps.length; i++) {
109
- let app = apps[i];
110
- if (app.id == id) {
111
- return app;
112
- }
104
+ //Node
105
+ class ApiServiceBase {
106
+ constructor(http) {
107
+ this.http = http;
108
+ }
109
+ serializeParams(data) {
110
+ return data ? ('?' + $.param(data)) : "";
111
+ }
112
+ //api
113
+ get(action, data, responseType) {
114
+ if (!responseType) {
115
+ responseType = 'json';
113
116
  }
117
+ var url = `${this.baseUrl}/${action}${this.serializeParams(data)}`;
118
+ return this.http.get(url, { responseType: responseType }).pipe(map(res => res));
114
119
  }
115
- return null;
116
- }
117
- function getAppSettingsByName(name) {
118
- let apps = ClientApps;
119
- if (apps && name) {
120
- for (let i = 0; i < apps.length; i++) {
121
- let app = apps[i];
122
- if (app.name == name) {
123
- return app;
124
- }
120
+ post(action, data, responseType) {
121
+ if (!responseType) {
122
+ responseType = 'text';
125
123
  }
124
+ var url = `${this.baseUrl}/${action}`;
125
+ return this.http.post(url, data, { responseType: responseType });
126
126
  }
127
- return null;
127
+ postQS(action, data, responseType) {
128
+ if (!responseType) {
129
+ responseType = 'text';
130
+ }
131
+ var url = `${this.baseUrl}/${action}${this.serializeParams(data)}`;
132
+ return this.http.post(url, null, { responseType: responseType });
133
+ }
134
+ delete(action, data, responseType) {
135
+ if (!responseType) {
136
+ responseType = 'text';
137
+ }
138
+ var url = `${this.baseUrl}/${action}${this.serializeParams(data)}`;
139
+ return this.http.delete(url, { responseType: responseType });
140
+ }
141
+ //gets
142
+ getExternalTextFile(url) {
143
+ return this.http.get(url);
144
+ }
145
+ //Json Files
146
+ __getJsonFile(url) {
147
+ const version = AppCoreSettings.version;
148
+ const isCDNEnabled = AppCoreSettings.isCDNEnabled;
149
+ const cdnSasToken = AppCoreSettings.cdnSasToken;
150
+ if (isCDNEnabled) {
151
+ url = url + cdnSasToken;
152
+ }
153
+ else {
154
+ url = url + '?v=' + version;
155
+ }
156
+ return this.http.get(url);
157
+ }
158
+ getLibJsonFile(fileName) {
159
+ const url = AppCoreSettings.libUrl + '/jsons';
160
+ return this.__getJsonFile(url + "/" + fileName);
161
+ }
162
+ getJsonFile(fileName) {
163
+ const url = AppCoreSettings.assetsUrl + '/jsons';
164
+ return this.__getJsonFile(url + "/" + fileName);
165
+ }
166
+ getExternalJsonFile(libname, fileName) {
167
+ const url = AppCoreSettings.externalUrl + "/" + libname + "/jsons";
168
+ return this.__getJsonFile(url + "/" + fileName);
169
+ }
170
+ static { this.ɵfac = function ApiServiceBase_Factory(t) { return new (t || ApiServiceBase)(i0.ɵɵinject(i1.HttpClient)); }; }
171
+ static { this.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: ApiServiceBase, factory: ApiServiceBase.ɵfac }); }
128
172
  }
129
- const AppName = document.getElementById('appName').getAttribute('data-appname');
130
- const AppSettings = getAppSettingsByName(AppName);
173
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ApiServiceBase, [{
174
+ type: Injectable
175
+ }], () => [{ type: i1.HttpClient }], null); })();
131
176
 
132
177
  /*
133
178
  <file>
@@ -139,22 +184,45 @@ const AppSettings = getAppSettingsByName(AppName);
139
184
  Anatoly Osovitny anatoly.osovitny@osovitny.com
140
185
 
141
186
  Created:
142
- 1 Apr 2024
187
+ 17 Apr 2023
143
188
 
144
189
  Copyright (c) 2016-2025 Osovitny Inc. All rights reserved.
145
190
  </file>
146
191
  */
147
- const dateTimeFormats = {
148
- medium: 'dd MMM yyyy HH:mm'
149
- };
150
- const dateFormats = {
151
- medium: "dd MMM yyyy",
152
- short: "dd/MM/yyyy"
153
- };
154
- const timeFormats = {
155
- medium: "HH:mm:ss",
156
- short: "HH:mm"
157
- };
192
+ class Stopwatch {
193
+ constructor(name) {
194
+ this.name = name;
195
+ this.startTime = 0;
196
+ this.stopTime = 0;
197
+ this.running = false;
198
+ this.performance = !!window.performance;
199
+ console.log(this.name + ' started.');
200
+ }
201
+ currentTime() {
202
+ return this.performance ? window.performance.now() : new Date().getTime();
203
+ }
204
+ start() {
205
+ this.startTime = this.currentTime();
206
+ this.running = true;
207
+ }
208
+ stop() {
209
+ this.stopTime = this.currentTime();
210
+ this.running = false;
211
+ }
212
+ getElapsedMilliseconds() {
213
+ if (this.running) {
214
+ this.stopTime = this.currentTime();
215
+ }
216
+ return this.stopTime - this.startTime;
217
+ }
218
+ getElapsedSeconds() {
219
+ return this.getElapsedMilliseconds() / 1000;
220
+ }
221
+ printElapsedAsMilliseconds() {
222
+ let elapsed = this.getElapsedMilliseconds();
223
+ console.log(`${this.name} stopped. Execution time: ${elapsed} ms`);
224
+ }
225
+ }
158
226
 
159
227
  /*
160
228
  <file>
@@ -163,23 +231,20 @@ const timeFormats = {
163
231
 
164
232
  Authors:
165
233
  Vadim Osovitny vadim.osovitny@osovitny.com
234
+ Anatoly Osovitny anatoly.osovitny@osovitny.com
166
235
 
167
236
  Created:
168
- 11 Nov 2024
237
+ 28 Apr 2024
169
238
 
170
239
  Copyright (c) 2016-2025 Osovitny Inc. All rights reserved.
171
240
  </file>
172
241
  */
173
- const GAEvents = {
174
- login: {
175
- signin: 'osa_login_signin',
176
- signin_success: 'osa_login_signin_success',
177
- signup: 'osa_login_signup',
178
- signup_success: 'osa_login_signup_success'
179
- }
180
- };
181
- const GABillingEvents = {
182
- payment: 'osa_billing_payment'
242
+ const AppContextStorageKeys = {
243
+ version: 'version',
244
+ currency: 'currency',
245
+ //Lists
246
+ countries: 'countries',
247
+ languages: 'languages'
183
248
  };
184
249
 
185
250
  /*
@@ -192,92 +257,59 @@ const GABillingEvents = {
192
257
  Anatoly Osovitny anatoly.osovitny@osovitny.com
193
258
 
194
259
  Created:
195
- 29 June 2020
260
+ 26 Jun 2020
196
261
 
197
262
  Copyright (c) 2016-2025 Osovitny Inc. All rights reserved.
198
263
  </file>
199
264
  */
200
- class Convert {
201
- static pad(number) {
202
- if (number < 10) {
203
- return '0' + number;
204
- }
205
- return number;
265
+ //Node
266
+ class WebStorageService {
267
+ constructor(storage) {
268
+ this.storage = storage === 'local' || storage === 'localStorage' ? localStorage : sessionStorage;
206
269
  }
207
- static enumToString(enumeration, value) {
208
- for (let k in enumeration)
209
- if (enumeration[k] == value)
210
- return k;
211
- return null;
270
+ setItem(key, value) {
271
+ this.storage.setItem(key, value);
212
272
  }
213
- static enumToArray(enumeration, valueAsInt = true, notIncludes) {
214
- const notIncludeFiler = (value) => {
215
- if (isNaN(Number(value))) {
216
- return false;
217
- }
218
- if (notIncludes) {
219
- for (let i in notIncludes) {
220
- if (notIncludes[i] == value)
221
- return false;
222
- }
223
- }
224
- return true;
225
- };
226
- if (valueAsInt) {
227
- return Object.keys(enumeration)
228
- .filter(notIncludeFiler)
229
- .map(key => ({
230
- value: parseInt(key),
231
- text: enumeration[key]
232
- }));
233
- }
234
- else {
235
- return Object.keys(enumeration)
236
- .filter(notIncludeFiler)
237
- .map(key => ({
238
- value: key,
239
- text: enumeration[key]
240
- }));
241
- }
273
+ setObject(key, value) {
274
+ this.storage.setItem(key, JSON.stringify(value));
242
275
  }
243
- static stringToArray(str, separator = ',') {
244
- if (str) {
245
- return str.split(separator).filter(element => element);
246
- }
247
- return [];
276
+ getItem(key) {
277
+ return this.storage.getItem(key);
248
278
  }
249
- static stringToIntArray(str, separator = ',') {
250
- if (str) {
251
- return str.split(separator).filter(element => element).map(value => parseInt(value));
279
+ getObject(key) {
280
+ let value = this.storage.getItem(key);
281
+ if (!value) {
282
+ return null;
252
283
  }
253
- return [];
284
+ return JSON.parse(value);
254
285
  }
255
- static company2String(comp) {
256
- let company = JSON.parse(comp);
257
- if (company) {
258
- return `${company.name} ${company.phone} ${company.email} ${company.websiteUrl}`;
259
- }
286
+ remove(key) {
287
+ this.storage.removeItem(key);
260
288
  }
261
- static address2String(adr) {
262
- let address = JSON.parse(adr);
263
- return `${address.street} ${address.street2} ${address.city} ${address.stateOrRegion} ${address.zipcode} ${address.country}`;
289
+ clear() {
290
+ this.storage.clear();
264
291
  }
265
- static stringToBoolean(value) {
266
- switch (value.toLowerCase().trim()) {
267
- case "true":
268
- case "yes":
269
- case "1":
270
- return true;
271
- case "false":
272
- case "no":
273
- case "0":
274
- case null:
275
- return false;
276
- default:
277
- return Boolean(value);
278
- }
292
+ }
293
+ class LocalStorageService extends WebStorageService {
294
+ constructor() {
295
+ super('localStorage');
296
+ }
297
+ static { this.ɵfac = function LocalStorageService_Factory(t) { return new (t || LocalStorageService)(); }; }
298
+ static { this.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: LocalStorageService, factory: LocalStorageService.ɵfac }); }
299
+ }
300
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LocalStorageService, [{
301
+ type: Injectable
302
+ }], () => [], null); })();
303
+ class SessionStorageService extends WebStorageService {
304
+ constructor() {
305
+ super('sessionStorage');
279
306
  }
307
+ static { this.ɵfac = function SessionStorageService_Factory(t) { return new (t || SessionStorageService)(); }; }
308
+ static { this.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: SessionStorageService, factory: SessionStorageService.ɵfac }); }
280
309
  }
310
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SessionStorageService, [{
311
+ type: Injectable
312
+ }], () => [], null); })();
281
313
 
282
314
  /*
283
315
  <file>
@@ -289,96 +321,171 @@ class Convert {
289
321
  Anatoly Osovitny anatoly.osovitny@osovitny.com
290
322
 
291
323
  Created:
292
- 10 Feb 2024
324
+ 13 Nov 2017
293
325
 
294
326
  Copyright (c) 2016-2025 Osovitny Inc. All rights reserved.
295
327
  </file>
296
328
  */
297
- /**
298
- * Returns the [year, month, day, hour, minute, seconds] tokens of the provided
299
- * `date` as it will be rendered in the `timeZone`.
300
- */
301
- function tzTokenizeDate(date, timeZone) {
302
- var dtf = getDateTimeFormat(timeZone);
303
- return dtf.formatToParts ? partsOffset(dtf, date) : hackyOffset(dtf, date);
304
- }
305
- var typeToPos = {
306
- year: 0,
307
- month: 1,
308
- day: 2,
309
- hour: 3,
310
- minute: 4,
311
- second: 5,
312
- };
313
- function partsOffset(dtf, date) {
314
- try {
315
- var formatted = dtf.formatToParts(date);
316
- var filled = [];
317
- for (var i = 0; i < formatted.length; i++) {
318
- var pos = typeToPos[formatted[i].type];
319
- if (pos >= 0) {
320
- filled[pos] = parseInt(formatted[i].value, 10);
329
+ //Node
330
+ class AppContextService extends ApiServiceBase {
331
+ constructor(http, localStorage, sessionStorage) {
332
+ super(http);
333
+ this.http = http;
334
+ this.localStorage = localStorage;
335
+ this.sessionStorage = sessionStorage;
336
+ this.storageKeyName = 'appContext';
337
+ this.subscription = null;
338
+ //Private Streams
339
+ this._updated = new BehaviorSubject(null);
340
+ this._userUpdated = new BehaviorSubject(null);
341
+ //Public Streams
342
+ this.updated$ = this._updated.asObservable();
343
+ this.userUpdated$ = this._userUpdated.asObservable();
344
+ this.baseUrl = `${ApiUrl}/appContext`;
345
+ }
346
+ fireUpdated(data) {
347
+ if (!data) {
348
+ return;
349
+ }
350
+ this._updated.next(data);
351
+ }
352
+ fireUserUpdated() {
353
+ this._userUpdated.next(null);
354
+ }
355
+ //Session
356
+ getCurrent4Session() {
357
+ return this.sessionStorage.getObject(this.storageKeyName);
358
+ }
359
+ setCurrent2Session(value) {
360
+ this.sessionStorage.setObject(this.storageKeyName, value);
361
+ }
362
+ dataReceived(data) {
363
+ this.current = data;
364
+ this.subscription.unsubscribe();
365
+ this.subscription = null;
366
+ }
367
+ getCurrentContext() {
368
+ if (this.subscription != null) {
369
+ return;
370
+ }
371
+ //Logging
372
+ let stopwatch = new Stopwatch("AppContextService: Requesting a new AppContext");
373
+ stopwatch.start();
374
+ this.subscription = this.get('getCurrentContext', null).subscribe({
375
+ next: (data) => {
376
+ //Logging
377
+ stopwatch.stop();
378
+ stopwatch.printElapsedAsMilliseconds();
379
+ this.dataReceived(data);
321
380
  }
381
+ });
382
+ }
383
+ updateCurrentIfExpired() {
384
+ let context = this.getCurrent4Session();
385
+ if (!context) {
386
+ return;
387
+ }
388
+ let shouldBeUpdated = false;
389
+ let lr = context.lastRequested;
390
+ if (lr) {
391
+ let now = new Date();
392
+ let lastRequested = new Date(context.lastRequested);
393
+ let in60Mins = new Date(lastRequested.getFullYear(), lastRequested.getMonth(), lastRequested.getDate(), lastRequested.getHours(), lastRequested.getMinutes() + 60, 0, 0);
394
+ if (in60Mins.getTime() < now.getTime()) {
395
+ shouldBeUpdated = true;
396
+ }
397
+ }
398
+ else {
399
+ shouldBeUpdated = true;
400
+ }
401
+ if (shouldBeUpdated) {
402
+ this.updateCurrent();
322
403
  }
323
- return filled;
324
404
  }
325
- catch (error) {
326
- if (error instanceof RangeError) {
327
- return [NaN];
405
+ //Public
406
+ init(context = null) {
407
+ if (context) {
408
+ this.current = context;
328
409
  }
329
- throw error;
330
410
  }
331
- }
332
- function hackyOffset(dtf, date) {
333
- var formatted = dtf.format(date).replace(/\u200E/g, '');
334
- var parsed = /(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(formatted);
335
- // var [, fMonth, fDay, fYear, fHour, fMinute, fSecond] = parsed
336
- // return [fYear, fMonth, fDay, fHour, fMinute, fSecond]
337
- return [parsed[3], parsed[1], parsed[2], parsed[4], parsed[5], parsed[6]];
338
- }
339
- // Get a cached Intl.DateTimeFormat instance for the IANA `timeZone`. This can be used
340
- // to get deterministic local date/time output according to the `en-US` locale which
341
- // can be used to extract local time parts as necessary.
342
- var dtfCache = {};
343
- function getDateTimeFormat(timeZone) {
344
- if (!dtfCache[timeZone]) {
345
- // New browsers use `hourCycle`, IE and Chrome <73 does not support it and uses `hour12`
346
- var testDateFormatted = new Intl.DateTimeFormat('en-US', {
347
- hour12: false,
348
- timeZone: 'America/New_York',
349
- year: 'numeric',
350
- month: 'numeric',
351
- day: '2-digit',
352
- hour: '2-digit',
353
- minute: '2-digit',
354
- second: '2-digit',
355
- }).format(new Date('2014-06-25T04:00:00.123Z'));
356
- var hourCycleSupported = testDateFormatted === '06/25/2014, 00:00:00' ||
357
- testDateFormatted === '06/25/2014 00:00:00';
358
- dtfCache[timeZone] = hourCycleSupported
359
- ? new Intl.DateTimeFormat('en-US', {
360
- hour12: false,
361
- timeZone: timeZone,
362
- year: 'numeric',
363
- month: 'numeric',
364
- day: '2-digit',
365
- hour: '2-digit',
366
- minute: '2-digit',
367
- second: '2-digit',
368
- })
369
- : new Intl.DateTimeFormat('en-US', {
370
- hourCycle: 'h23',
371
- timeZone: timeZone,
372
- year: 'numeric',
373
- month: 'numeric',
374
- day: '2-digit',
375
- hour: '2-digit',
376
- minute: '2-digit',
377
- second: '2-digit',
378
- });
411
+ loadRequiredJsonFiles() {
412
+ return null;
379
413
  }
380
- return dtfCache[timeZone];
414
+ loadRequiredItems() {
415
+ return null;
416
+ }
417
+ updateCurrent() {
418
+ this.getCurrentContext();
419
+ }
420
+ //Storage
421
+ clearLocalStorage() {
422
+ this.localStorage.clear();
423
+ }
424
+ clearSessionStorage() {
425
+ this.sessionStorage.clear();
426
+ }
427
+ clearWebStorage() {
428
+ this.clearLocalStorage();
429
+ this.clearSessionStorage();
430
+ }
431
+ //current
432
+ get current() {
433
+ this.updateCurrentIfExpired();
434
+ return this.getCurrent4Session();
435
+ }
436
+ set current(value) {
437
+ this.setCurrent2Session(value);
438
+ this.fireUpdated(value);
439
+ }
440
+ //user
441
+ get user() {
442
+ let current = this.current;
443
+ return current?.user;
444
+ }
445
+ /* Storage Caching ----------------------------------------------------------BEGIN */
446
+ //version => localStorage
447
+ get version() {
448
+ return this.localStorage.getObject(AppContextStorageKeys.version);
449
+ }
450
+ set version(value) {
451
+ this.localStorage.setObject(AppContextStorageKeys.version, value);
452
+ }
453
+ //currency => localStorage
454
+ get currency() {
455
+ return this.localStorage.getObject(AppContextStorageKeys.currency);
456
+ }
457
+ set currency(value) {
458
+ this.localStorage.setObject(AppContextStorageKeys.currency, value);
459
+ }
460
+ clearCurrency() {
461
+ this.localStorage.remove(AppContextStorageKeys.currency);
462
+ }
463
+ //countries => localStorage
464
+ get countries() {
465
+ return this.localStorage.getObject(AppContextStorageKeys.countries);
466
+ }
467
+ set countries(value) {
468
+ this.localStorage.setObject(AppContextStorageKeys.countries, value);
469
+ }
470
+ clearCountries() {
471
+ this.localStorage.remove(AppContextStorageKeys.countries);
472
+ }
473
+ //languages => localStorage
474
+ get languages() {
475
+ return this.localStorage.getObject(AppContextStorageKeys.languages);
476
+ }
477
+ set languages(value) {
478
+ this.localStorage.setObject(AppContextStorageKeys.languages, value);
479
+ }
480
+ clearLanguages() {
481
+ this.localStorage.remove(AppContextStorageKeys.languages);
482
+ }
483
+ static { this.ɵfac = function AppContextService_Factory(t) { return new (t || AppContextService)(i0.ɵɵinject(i1.HttpClient), i0.ɵɵinject(LocalStorageService), i0.ɵɵinject(SessionStorageService)); }; }
484
+ static { this.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: AppContextService, factory: AppContextService.ɵfac }); }
381
485
  }
486
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AppContextService, [{
487
+ type: Injectable
488
+ }], () => [{ type: i1.HttpClient }, { type: LocalStorageService }, { type: SessionStorageService }], null); })();
382
489
 
383
490
  /*
384
491
  <file>
@@ -390,175 +497,37 @@ function getDateTimeFormat(timeZone) {
390
497
  Anatoly Osovitny anatoly.osovitny@osovitny.com
391
498
 
392
499
  Created:
393
- 10 Feb 2024
500
+ 1 Apr 2024
394
501
 
395
502
  Copyright (c) 2016-2025 Osovitny Inc. All rights reserved.
396
503
  </file>
397
504
  */
398
- function tzParseTimezone(timezoneString, date, isUtcDate) {
399
- var token;
400
- var absoluteOffset;
401
- // Empty string
402
- if (!timezoneString) {
403
- return 0;
404
- }
405
- // Z
406
- token = patterns.timezoneZ.exec(timezoneString);
407
- if (token) {
408
- return 0;
409
- }
410
- var hours;
411
- // ±hh
412
- token = patterns.timezoneHH.exec(timezoneString);
413
- if (token) {
414
- hours = parseInt(token[1], 10);
415
- if (!validateTimezone(hours)) {
416
- return NaN;
417
- }
418
- return -(hours * MILLISECONDS_IN_HOUR);
419
- }
420
- // ±hh:mm or ±hhmm
421
- token = patterns.timezoneHHMM.exec(timezoneString);
422
- if (token) {
423
- hours = parseInt(token[1], 10);
424
- var minutes = parseInt(token[2], 10);
425
- if (!validateTimezone(hours, minutes)) {
426
- return NaN;
505
+ function getAppSettingsById(id) {
506
+ let apps = ClientApps;
507
+ if (apps && id) {
508
+ for (let i = 0; i < apps.length; i++) {
509
+ let app = apps[i];
510
+ if (app.id == id) {
511
+ return app;
512
+ }
427
513
  }
428
- absoluteOffset = Math.abs(hours) * MILLISECONDS_IN_HOUR + minutes * MILLISECONDS_IN_MINUTE;
429
- return hours > 0 ? -absoluteOffset : absoluteOffset;
430
- }
431
- // IANA time zone
432
- if (isValidTimezoneIANAString(timezoneString)) {
433
- date = new Date(date || Date.now());
434
- var utcDate = isUtcDate ? date : toUtcDate(date);
435
- var offset = calcOffset(utcDate, timezoneString);
436
- var fixedOffset = isUtcDate ? offset : fixOffset(date, offset, timezoneString);
437
- return -fixedOffset;
438
- }
439
- return NaN;
440
- }
441
- var MILLISECONDS_IN_HOUR = 3600000;
442
- var MILLISECONDS_IN_MINUTE = 60000;
443
- var patterns = {
444
- timezone: /([Z+-].*)$/,
445
- timezoneZ: /^(Z)$/,
446
- timezoneHH: /^([+-]\d{2})$/,
447
- timezoneHHMM: /^([+-]\d{2}):?(\d{2})$/,
448
- };
449
- function newDateUTC(fullYear, month, day, hour, minute, second, millisecond) {
450
- var utcDate = new Date(0);
451
- utcDate.setUTCFullYear(fullYear, month, day);
452
- utcDate.setUTCHours(hour, minute, second, millisecond);
453
- return utcDate;
454
- }
455
- function toUtcDate(date) {
456
- return newDateUTC(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds());
457
- }
458
- function calcOffset(date, timezoneString) {
459
- var tokens = tzTokenizeDate(date, timezoneString);
460
- // ms dropped because it's not provided by tzTokenizeDate
461
- var asUTC = newDateUTC(tokens[0], tokens[1] - 1, tokens[2], tokens[3] % 24, tokens[4], tokens[5], 0).getTime();
462
- var asTS = date.getTime();
463
- var over = asTS % 1000;
464
- asTS -= over >= 0 ? over : 1000 + over;
465
- return asUTC - asTS;
466
- }
467
- function fixOffset(date, offset, timezoneString) {
468
- var localTS = date.getTime();
469
- // Our UTC time is just a guess because our offset is just a guess
470
- var utcGuess = localTS - offset;
471
- // Test whether the zone matches the offset for this ts
472
- var o2 = calcOffset(new Date(utcGuess), timezoneString);
473
- // If so, offset didn't change, and we're done
474
- if (offset === o2) {
475
- return offset;
476
- }
477
- // If not, change the ts by the difference in the offset
478
- utcGuess -= o2 - offset;
479
- // If that gives us the local time we want, we're done
480
- var o3 = calcOffset(new Date(utcGuess), timezoneString);
481
- if (o2 === o3) {
482
- return o2;
483
- }
484
- // If it's different, we're in a hole time. The offset has changed, but we don't adjust the time
485
- return Math.max(o2, o3);
486
- }
487
- function validateTimezone(hours, minutes = null) {
488
- return -23 <= hours && hours <= 23 && (minutes == null || (0 <= minutes && minutes <= 59));
489
- }
490
- var validIANATimezoneCache = {};
491
- function isValidTimezoneIANAString(timeZoneString) {
492
- if (validIANATimezoneCache[timeZoneString])
493
- return true;
494
- try {
495
- new Intl.DateTimeFormat(undefined, { timeZone: timeZoneString });
496
- validIANATimezoneCache[timeZoneString] = true;
497
- return true;
498
- }
499
- catch (error) {
500
- return false;
501
514
  }
515
+ return null;
502
516
  }
503
-
504
- /*
505
- <file>
506
- Project:
507
- @osovitny/anatoly
508
-
509
- Authors:
510
- Vadim Osovitny vadim.osovitny@osovitny.com
511
-
512
- Created:
513
- 09 Feb 2024
514
-
515
- Source:
516
- https://github.com/date-fns/date-fns/blob/main/src/toDate/index.ts
517
-
518
- tz:
519
- https://www.npmjs.com/package/date-fns-tz
520
- https://github.com/marnusw/date-fns-tz/blob/master/src/utcToZonedTime/index.js
521
- https://github.com/marnusw/date-fns-tz/blob/master/src/_lib/tzParseTimezone/index.js
522
-
523
- Copyright (c) 2016-2025 Osovitny Inc. All rights reserved.
524
- </file>
525
- */
526
- class DateConvert {
527
- static toDate(argument) {
528
- const argStr = Object.prototype.toString.call(argument);
529
- if (argument instanceof Date || (typeof argument === "object" && argStr === "[object Date]")) {
530
- return argument;
531
- }
532
- else if (typeof argument === "number" || argStr === "[object Number]" ||
533
- typeof argument === "string" || argStr === "[object String]") {
534
- return new Date(argument);
535
- }
536
- else {
537
- return new Date(NaN);
538
- }
539
- }
540
- static utcToLocal(dirtyDate) {
541
- if (typeof dirtyDate === 'string') {
542
- if (dirtyDate.indexOf("T") > -1) {
543
- dirtyDate = dirtyDate.replace("T", " ");
544
- }
545
- if (dirtyDate.indexOf("Z") == -1) {
546
- dirtyDate = dirtyDate + "Z";
517
+ function getAppSettingsByName(name) {
518
+ let apps = ClientApps;
519
+ if (apps && name) {
520
+ for (let i = 0; i < apps.length; i++) {
521
+ let app = apps[i];
522
+ if (app.name == name) {
523
+ return app;
547
524
  }
548
525
  }
549
- let browserTimeZone = Intl.DateTimeFormat().resolvedOptions().timeZone;
550
- if (browserTimeZone) {
551
- let date = DateConvert.toDate(dirtyDate);
552
- let offsetMilliseconds = tzParseTimezone(browserTimeZone, date, true);
553
- let d = new Date(date.getTime() - offsetMilliseconds);
554
- let resultDate = new Date(0);
555
- resultDate.setFullYear(d.getUTCFullYear(), d.getUTCMonth(), d.getUTCDate());
556
- resultDate.setHours(d.getUTCHours(), d.getUTCMinutes(), d.getUTCSeconds(), d.getUTCMilliseconds());
557
- return resultDate;
558
- }
559
- return new Date(dirtyDate);
560
526
  }
527
+ return null;
561
528
  }
529
+ const AppName = document.getElementById('appName').getAttribute('data-appname');
530
+ const AppSettings = getAppSettingsByName(AppName);
562
531
 
563
532
  /*
564
533
  <file>
@@ -570,28 +539,22 @@ class DateConvert {
570
539
  Anatoly Osovitny anatoly.osovitny@osovitny.com
571
540
 
572
541
  Created:
573
- 10 Sep 2022
574
-
575
- Code:
576
- https://www.npmjs.com/package/js-beautify
577
- https://beautifier.io
542
+ 1 Apr 2024
578
543
 
579
544
  Copyright (c) 2016-2025 Osovitny Inc. All rights reserved.
580
545
  </file>
581
546
  */
582
- //var beautify_html = require('js-beautify').html;
583
- class XmlFormatter {
584
- static toPrettyXML(s, options) {
585
- if (!options) {
586
- options = {
587
- indent_size: 2,
588
- indent_char: " ",
589
- wrap_line_length: 110
590
- };
591
- }
592
- return js_beautify.html(s, options);
593
- }
594
- }
547
+ const dateTimeFormats = {
548
+ medium: 'dd MMM yyyy HH:mm'
549
+ };
550
+ const dateFormats = {
551
+ medium: "dd MMM yyyy",
552
+ short: "dd/MM/yyyy"
553
+ };
554
+ const timeFormats = {
555
+ medium: "HH:mm:ss",
556
+ short: "HH:mm"
557
+ };
595
558
 
596
559
  /*
597
560
  <file>
@@ -600,7 +563,6 @@ class XmlFormatter {
600
563
 
601
564
  Authors:
602
565
  Vadim Osovitny vadim.osovitny@osovitny.com
603
- Anatoly Osovitny anatoly.osovitny@osovitny.com
604
566
 
605
567
  Created:
606
568
  11 Nov 2024
@@ -608,41 +570,17 @@ class XmlFormatter {
608
570
  Copyright (c) 2016-2025 Osovitny Inc. All rights reserved.
609
571
  </file>
610
572
  */
611
- var DiscountCodeType;
612
- (function (DiscountCodeType) {
613
- DiscountCodeType[DiscountCodeType["Standard"] = 1] = "Standard";
614
- DiscountCodeType[DiscountCodeType["UseOnce"] = 2] = "UseOnce";
615
- })(DiscountCodeType || (DiscountCodeType = {}));
616
- var DiscountCodeStatus;
617
- (function (DiscountCodeStatus) {
618
- DiscountCodeStatus[DiscountCodeStatus["Exist"] = 1] = "Exist";
619
- DiscountCodeStatus[DiscountCodeStatus["NotFound"] = 2] = "NotFound";
620
- DiscountCodeStatus[DiscountCodeStatus["AlreadyUsed"] = 3] = "AlreadyUsed";
621
- })(DiscountCodeStatus || (DiscountCodeStatus = {}));
622
- var PaymentType;
623
- (function (PaymentType) {
624
- PaymentType[PaymentType["FullPayment"] = 1] = "FullPayment";
625
- PaymentType[PaymentType["WeeklyPayment"] = 2] = "WeeklyPayment";
626
- PaymentType[PaymentType["BiWeeklyPayment"] = 3] = "BiWeeklyPayment";
627
- PaymentType[PaymentType["MonthlyPayment"] = 4] = "MonthlyPayment";
628
- })(PaymentType || (PaymentType = {}));
629
- var PaymentMethod;
630
- (function (PaymentMethod) {
631
- PaymentMethod[PaymentMethod["None"] = 1] = "None";
632
- PaymentMethod[PaymentMethod["DigitalWallet"] = 2] = "DigitalWallet";
633
- PaymentMethod[PaymentMethod["CreditCard"] = 3] = "CreditCard";
634
- PaymentMethod[PaymentMethod["PayPal"] = 4] = "PayPal";
635
- PaymentMethod[PaymentMethod["Stripe"] = 5] = "Stripe";
636
- PaymentMethod[PaymentMethod["Venmo"] = 6] = "Venmo";
637
- PaymentMethod[PaymentMethod["ApplePay"] = 7] = "ApplePay";
638
- PaymentMethod[PaymentMethod["GooglePay"] = 8] = "GooglePay";
639
- })(PaymentMethod || (PaymentMethod = {}));
640
- var PaymentStage;
641
- (function (PaymentStage) {
642
- //PayPal/Stripe
643
- PaymentStage[PaymentStage["External"] = 1] = "External";
644
- PaymentStage[PaymentStage["Internal"] = 2] = "Internal";
645
- })(PaymentStage || (PaymentStage = {}));
573
+ const GAEvents = {
574
+ login: {
575
+ signin: 'osa_login_signin',
576
+ signin_success: 'osa_login_signin_success',
577
+ signup: 'osa_login_signup',
578
+ signup_success: 'osa_login_signup_success'
579
+ }
580
+ };
581
+ const GABillingEvents = {
582
+ payment: 'osa_billing_payment'
583
+ };
646
584
 
647
585
  /*
648
586
  <file>
@@ -651,32 +589,95 @@ var PaymentStage;
651
589
 
652
590
  Authors:
653
591
  Vadim Osovitny vadim.osovitny@osovitny.com
654
-
592
+ Anatoly Osovitny anatoly.osovitny@osovitny.com
593
+
655
594
  Created:
656
- 11 Nov 2024
595
+ 29 June 2020
657
596
 
658
597
  Copyright (c) 2016-2025 Osovitny Inc. All rights reserved.
659
598
  </file>
660
599
  */
661
- var DataViewType;
662
- (function (DataViewType) {
663
- DataViewType["Grid"] = "grid";
664
- DataViewType["List"] = "list";
665
- })(DataViewType || (DataViewType = {}));
666
- var PublishStatus;
667
- (function (PublishStatus) {
668
- PublishStatus[PublishStatus["Draft"] = 1] = "Draft";
669
- PublishStatus[PublishStatus["PendingReview"] = 2] = "PendingReview";
670
- PublishStatus[PublishStatus["Published"] = 3] = "Published";
671
- PublishStatus[PublishStatus["Archived"] = 4] = "Archived";
672
- })(PublishStatus || (PublishStatus = {}));
673
- var ModerationStatus;
674
- (function (ModerationStatus) {
675
- ModerationStatus[ModerationStatus["Draft"] = 1] = "Draft";
676
- ModerationStatus[ModerationStatus["PendingReview"] = 2] = "PendingReview";
677
- ModerationStatus[ModerationStatus["Approved"] = 3] = "Approved";
678
- ModerationStatus[ModerationStatus["Rejected"] = 4] = "Rejected"; //item is rejected by Moderator
679
- })(ModerationStatus || (ModerationStatus = {}));
600
+ class Convert {
601
+ static pad(number) {
602
+ if (number < 10) {
603
+ return '0' + number;
604
+ }
605
+ return number;
606
+ }
607
+ static enumToString(enumeration, value) {
608
+ for (let k in enumeration)
609
+ if (enumeration[k] == value)
610
+ return k;
611
+ return null;
612
+ }
613
+ static enumToArray(enumeration, valueAsInt = true, notIncludes) {
614
+ const notIncludeFiler = (value) => {
615
+ if (isNaN(Number(value))) {
616
+ return false;
617
+ }
618
+ if (notIncludes) {
619
+ for (let i in notIncludes) {
620
+ if (notIncludes[i] == value)
621
+ return false;
622
+ }
623
+ }
624
+ return true;
625
+ };
626
+ if (valueAsInt) {
627
+ return Object.keys(enumeration)
628
+ .filter(notIncludeFiler)
629
+ .map(key => ({
630
+ value: parseInt(key),
631
+ text: enumeration[key]
632
+ }));
633
+ }
634
+ else {
635
+ return Object.keys(enumeration)
636
+ .filter(notIncludeFiler)
637
+ .map(key => ({
638
+ value: key,
639
+ text: enumeration[key]
640
+ }));
641
+ }
642
+ }
643
+ static stringToArray(str, separator = ',') {
644
+ if (str) {
645
+ return str.split(separator).filter(element => element);
646
+ }
647
+ return [];
648
+ }
649
+ static stringToIntArray(str, separator = ',') {
650
+ if (str) {
651
+ return str.split(separator).filter(element => element).map(value => parseInt(value));
652
+ }
653
+ return [];
654
+ }
655
+ static company2String(comp) {
656
+ let company = JSON.parse(comp);
657
+ if (company) {
658
+ return `${company.name} ${company.phone} ${company.email} ${company.websiteUrl}`;
659
+ }
660
+ }
661
+ static address2String(adr) {
662
+ let address = JSON.parse(adr);
663
+ return `${address.street} ${address.street2} ${address.city} ${address.stateOrRegion} ${address.zipcode} ${address.country}`;
664
+ }
665
+ static stringToBoolean(value) {
666
+ switch (value.toLowerCase().trim()) {
667
+ case "true":
668
+ case "yes":
669
+ case "1":
670
+ return true;
671
+ case "false":
672
+ case "no":
673
+ case "0":
674
+ case null:
675
+ return false;
676
+ default:
677
+ return Boolean(value);
678
+ }
679
+ }
680
+ }
680
681
 
681
682
  /*
682
683
  <file>
@@ -685,82 +686,220 @@ var ModerationStatus;
685
686
 
686
687
  Authors:
687
688
  Vadim Osovitny vadim.osovitny@osovitny.com
689
+ Anatoly Osovitny anatoly.osovitny@osovitny.com
688
690
 
689
691
  Created:
690
- 17 Jun 2018
692
+ 10 Feb 2024
691
693
 
692
694
  Copyright (c) 2016-2025 Osovitny Inc. All rights reserved.
693
695
  </file>
694
696
  */
695
- //Node
696
- class GoServiceBase {
697
- constructor(route, router) {
698
- this.route = route;
699
- this.router = router;
700
- this.rootRoute = '/';
701
- this.init();
702
- }
703
- init() {
704
- if (AppSettings?.root != '/') {
705
- this.rootRoute = AppSettings.root;
697
+ /**
698
+ * Returns the [year, month, day, hour, minute, seconds] tokens of the provided
699
+ * `date` as it will be rendered in the `timeZone`.
700
+ */
701
+ function tzTokenizeDate(date, timeZone) {
702
+ var dtf = getDateTimeFormat(timeZone);
703
+ return dtf.formatToParts ? partsOffset(dtf, date) : hackyOffset(dtf, date);
704
+ }
705
+ var typeToPos = {
706
+ year: 0,
707
+ month: 1,
708
+ day: 2,
709
+ hour: 3,
710
+ minute: 4,
711
+ second: 5,
712
+ };
713
+ function partsOffset(dtf, date) {
714
+ try {
715
+ var formatted = dtf.formatToParts(date);
716
+ var filled = [];
717
+ for (var i = 0; i < formatted.length; i++) {
718
+ var pos = typeToPos[formatted[i].type];
719
+ if (pos >= 0) {
720
+ filled[pos] = parseInt(formatted[i].value, 10);
721
+ }
706
722
  }
723
+ return filled;
707
724
  }
708
- getHomeUrl() {
709
- return this.rootRoute;
710
- }
711
- navigate(commands, reload = false) {
712
- if (reload) {
713
- this.router.navigate(commands).then(() => {
714
- this.locationReload();
715
- });
716
- }
717
- else {
718
- this.router.navigate(commands);
725
+ catch (error) {
726
+ if (error instanceof RangeError) {
727
+ return [NaN];
719
728
  }
729
+ throw error;
720
730
  }
721
- homeReload() {
722
- window.location.href = "/";
731
+ }
732
+ function hackyOffset(dtf, date) {
733
+ var formatted = dtf.format(date).replace(/\u200E/g, '');
734
+ var parsed = /(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(formatted);
735
+ // var [, fMonth, fDay, fYear, fHour, fMinute, fSecond] = parsed
736
+ // return [fYear, fMonth, fDay, fHour, fMinute, fSecond]
737
+ return [parsed[3], parsed[1], parsed[2], parsed[4], parsed[5], parsed[6]];
738
+ }
739
+ // Get a cached Intl.DateTimeFormat instance for the IANA `timeZone`. This can be used
740
+ // to get deterministic local date/time output according to the `en-US` locale which
741
+ // can be used to extract local time parts as necessary.
742
+ var dtfCache = {};
743
+ function getDateTimeFormat(timeZone) {
744
+ if (!dtfCache[timeZone]) {
745
+ // New browsers use `hourCycle`, IE and Chrome <73 does not support it and uses `hour12`
746
+ var testDateFormatted = new Intl.DateTimeFormat('en-US', {
747
+ hour12: false,
748
+ timeZone: 'America/New_York',
749
+ year: 'numeric',
750
+ month: 'numeric',
751
+ day: '2-digit',
752
+ hour: '2-digit',
753
+ minute: '2-digit',
754
+ second: '2-digit',
755
+ }).format(new Date('2014-06-25T04:00:00.123Z'));
756
+ var hourCycleSupported = testDateFormatted === '06/25/2014, 00:00:00' ||
757
+ testDateFormatted === '06/25/2014 00:00:00';
758
+ dtfCache[timeZone] = hourCycleSupported
759
+ ? new Intl.DateTimeFormat('en-US', {
760
+ hour12: false,
761
+ timeZone: timeZone,
762
+ year: 'numeric',
763
+ month: 'numeric',
764
+ day: '2-digit',
765
+ hour: '2-digit',
766
+ minute: '2-digit',
767
+ second: '2-digit',
768
+ })
769
+ : new Intl.DateTimeFormat('en-US', {
770
+ hourCycle: 'h23',
771
+ timeZone: timeZone,
772
+ year: 'numeric',
773
+ month: 'numeric',
774
+ day: '2-digit',
775
+ hour: '2-digit',
776
+ minute: '2-digit',
777
+ second: '2-digit',
778
+ });
723
779
  }
724
- locationReload() {
725
- window.location.reload();
780
+ return dtfCache[timeZone];
781
+ }
782
+
783
+ /*
784
+ <file>
785
+ Project:
786
+ @osovitny/anatoly
787
+
788
+ Authors:
789
+ Vadim Osovitny vadim.osovitny@osovitny.com
790
+ Anatoly Osovitny anatoly.osovitny@osovitny.com
791
+
792
+ Created:
793
+ 10 Feb 2024
794
+
795
+ Copyright (c) 2016-2025 Osovitny Inc. All rights reserved.
796
+ </file>
797
+ */
798
+ function tzParseTimezone(timezoneString, date, isUtcDate) {
799
+ var token;
800
+ var absoluteOffset;
801
+ // Empty string
802
+ if (!timezoneString) {
803
+ return 0;
726
804
  }
727
- home() {
728
- this.router.navigate([this.rootRoute]);
805
+ // Z
806
+ token = patterns.timezoneZ.exec(timezoneString);
807
+ if (token) {
808
+ return 0;
729
809
  }
730
- //Accounts
731
- accountClosed() {
732
- this.navigate([this.rootRoute + '/accounts/closed']);
810
+ var hours;
811
+ // ±hh
812
+ token = patterns.timezoneHH.exec(timezoneString);
813
+ if (token) {
814
+ hours = parseInt(token[1], 10);
815
+ if (!validateTimezone(hours)) {
816
+ return NaN;
817
+ }
818
+ return -(hours * MILLISECONDS_IN_HOUR);
733
819
  }
734
- //Errors
735
- error() {
736
- this.navigate([this.rootRoute + '/errors/error']);
820
+ // ±hh:mm or ±hhmm
821
+ token = patterns.timezoneHHMM.exec(timezoneString);
822
+ if (token) {
823
+ hours = parseInt(token[1], 10);
824
+ var minutes = parseInt(token[2], 10);
825
+ if (!validateTimezone(hours, minutes)) {
826
+ return NaN;
827
+ }
828
+ absoluteOffset = Math.abs(hours) * MILLISECONDS_IN_HOUR + minutes * MILLISECONDS_IN_MINUTE;
829
+ return hours > 0 ? -absoluteOffset : absoluteOffset;
737
830
  }
738
- //401 Unauthorized
739
- error401() {
740
- this.navigate([this.rootRoute + '/errors/401']);
831
+ // IANA time zone
832
+ if (isValidTimezoneIANAString(timezoneString)) {
833
+ date = new Date(date || Date.now());
834
+ var utcDate = isUtcDate ? date : toUtcDate(date);
835
+ var offset = calcOffset(utcDate, timezoneString);
836
+ var fixedOffset = isUtcDate ? offset : fixOffset(date, offset, timezoneString);
837
+ return -fixedOffset;
741
838
  }
742
- //402 Payment Required
743
- error402() {
744
- this.navigate([this.rootRoute + '/errors/402']);
839
+ return NaN;
840
+ }
841
+ var MILLISECONDS_IN_HOUR = 3600000;
842
+ var MILLISECONDS_IN_MINUTE = 60000;
843
+ var patterns = {
844
+ timezone: /([Z+-].*)$/,
845
+ timezoneZ: /^(Z)$/,
846
+ timezoneHH: /^([+-]\d{2})$/,
847
+ timezoneHHMM: /^([+-]\d{2}):?(\d{2})$/,
848
+ };
849
+ function newDateUTC(fullYear, month, day, hour, minute, second, millisecond) {
850
+ var utcDate = new Date(0);
851
+ utcDate.setUTCFullYear(fullYear, month, day);
852
+ utcDate.setUTCHours(hour, minute, second, millisecond);
853
+ return utcDate;
854
+ }
855
+ function toUtcDate(date) {
856
+ return newDateUTC(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds());
857
+ }
858
+ function calcOffset(date, timezoneString) {
859
+ var tokens = tzTokenizeDate(date, timezoneString);
860
+ // ms dropped because it's not provided by tzTokenizeDate
861
+ var asUTC = newDateUTC(tokens[0], tokens[1] - 1, tokens[2], tokens[3] % 24, tokens[4], tokens[5], 0).getTime();
862
+ var asTS = date.getTime();
863
+ var over = asTS % 1000;
864
+ asTS -= over >= 0 ? over : 1000 + over;
865
+ return asUTC - asTS;
866
+ }
867
+ function fixOffset(date, offset, timezoneString) {
868
+ var localTS = date.getTime();
869
+ // Our UTC time is just a guess because our offset is just a guess
870
+ var utcGuess = localTS - offset;
871
+ // Test whether the zone matches the offset for this ts
872
+ var o2 = calcOffset(new Date(utcGuess), timezoneString);
873
+ // If so, offset didn't change, and we're done
874
+ if (offset === o2) {
875
+ return offset;
745
876
  }
746
- //403 Forbidden
747
- error403() {
748
- this.navigate([this.rootRoute + '/errors/403']);
877
+ // If not, change the ts by the difference in the offset
878
+ utcGuess -= o2 - offset;
879
+ // If that gives us the local time we want, we're done
880
+ var o3 = calcOffset(new Date(utcGuess), timezoneString);
881
+ if (o2 === o3) {
882
+ return o2;
749
883
  }
750
- //404 Not Found
751
- error404() {
752
- this.navigate([this.rootRoute + '/errors/404']);
884
+ // If it's different, we're in a hole time. The offset has changed, but we don't adjust the time
885
+ return Math.max(o2, o3);
886
+ }
887
+ function validateTimezone(hours, minutes = null) {
888
+ return -23 <= hours && hours <= 23 && (minutes == null || (0 <= minutes && minutes <= 59));
889
+ }
890
+ var validIANATimezoneCache = {};
891
+ function isValidTimezoneIANAString(timeZoneString) {
892
+ if (validIANATimezoneCache[timeZoneString])
893
+ return true;
894
+ try {
895
+ new Intl.DateTimeFormat(undefined, { timeZone: timeZoneString });
896
+ validIANATimezoneCache[timeZoneString] = true;
897
+ return true;
753
898
  }
754
- //500 Internal Server Error
755
- error500() {
756
- this.navigate([this.rootRoute + '/errors/500']);
899
+ catch (error) {
900
+ return false;
757
901
  }
758
- static { this.ɵfac = function GoServiceBase_Factory(t) { return new (t || GoServiceBase)(i0.ɵɵinject(i1.ActivatedRoute), i0.ɵɵinject(i1.Router)); }; }
759
- static { this.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: GoServiceBase, factory: GoServiceBase.ɵfac }); }
760
902
  }
761
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(GoServiceBase, [{
762
- type: Injectable
763
- }], () => [{ type: i1.ActivatedRoute }, { type: i1.Router }], null); })();
764
903
 
765
904
  /*
766
905
  <file>
@@ -769,106 +908,57 @@ class GoServiceBase {
769
908
 
770
909
  Authors:
771
910
  Vadim Osovitny vadim.osovitny@osovitny.com
772
- Anatoly Osovitny anatoly.osovitny@osovitny.com
773
911
 
774
912
  Created:
775
- 26 Jun 2020
776
-
777
- Copyright (c) 2016-2025 Osovitny Inc. All rights reserved.
778
- </file>
779
- */
780
- class Guid {
781
- static newGuid() {
782
- return v4();
783
- }
784
- }
785
-
786
- /*
787
- <file>
788
- Project:
789
- @osovitny/anatoly
913
+ 09 Feb 2024
790
914
 
791
- Authors:
792
- Vadim Osovitny vadim.osovitny@osovitny.com
915
+ Source:
916
+ https://github.com/date-fns/date-fns/blob/main/src/toDate/index.ts
793
917
 
794
- Created:
795
- 13 Nov 2017
918
+ tz:
919
+ https://www.npmjs.com/package/date-fns-tz
920
+ https://github.com/marnusw/date-fns-tz/blob/master/src/utcToZonedTime/index.js
921
+ https://github.com/marnusw/date-fns-tz/blob/master/src/_lib/tzParseTimezone/index.js
796
922
 
797
923
  Copyright (c) 2016-2025 Osovitny Inc. All rights reserved.
798
924
  </file>
799
925
  */
800
- //Node
801
- class ApiServiceBase {
802
- constructor(http) {
803
- this.http = http;
804
- }
805
- serializeParams(data) {
806
- return data ? ('?' + $.param(data)) : "";
807
- }
808
- //api
809
- get(action, data, responseType) {
810
- if (!responseType) {
811
- responseType = 'json';
812
- }
813
- var url = `${this.baseUrl}/${action}${this.serializeParams(data)}`;
814
- return this.http.get(url, { responseType: responseType }).pipe(map(res => res));
815
- }
816
- post(action, data, responseType) {
817
- if (!responseType) {
818
- responseType = 'text';
926
+ class DateConvert {
927
+ static toDate(argument) {
928
+ const argStr = Object.prototype.toString.call(argument);
929
+ if (argument instanceof Date || (typeof argument === "object" && argStr === "[object Date]")) {
930
+ return argument;
819
931
  }
820
- var url = `${this.baseUrl}/${action}`;
821
- return this.http.post(url, data, { responseType: responseType });
822
- }
823
- postQS(action, data, responseType) {
824
- if (!responseType) {
825
- responseType = 'text';
932
+ else if (typeof argument === "number" || argStr === "[object Number]" ||
933
+ typeof argument === "string" || argStr === "[object String]") {
934
+ return new Date(argument);
826
935
  }
827
- var url = `${this.baseUrl}/${action}${this.serializeParams(data)}`;
828
- return this.http.post(url, null, { responseType: responseType });
829
- }
830
- delete(action, data, responseType) {
831
- if (!responseType) {
832
- responseType = 'text';
936
+ else {
937
+ return new Date(NaN);
833
938
  }
834
- var url = `${this.baseUrl}/${action}${this.serializeParams(data)}`;
835
- return this.http.delete(url, { responseType: responseType });
836
- }
837
- //gets
838
- getExternalTextFile(url) {
839
- return this.http.get(url);
840
939
  }
841
- //Json Files
842
- __getJsonFile(url) {
843
- const version = AppCoreSettings.version;
844
- const isCDNEnabled = AppCoreSettings.isCDNEnabled;
845
- const cdnSasToken = AppCoreSettings.cdnSasToken;
846
- if (isCDNEnabled) {
847
- url = url + cdnSasToken;
940
+ static utcToLocal(dirtyDate) {
941
+ if (typeof dirtyDate === 'string') {
942
+ if (dirtyDate.indexOf("T") > -1) {
943
+ dirtyDate = dirtyDate.replace("T", " ");
944
+ }
945
+ if (dirtyDate.indexOf("Z") == -1) {
946
+ dirtyDate = dirtyDate + "Z";
947
+ }
848
948
  }
849
- else {
850
- url = url + '?v=' + version;
949
+ let browserTimeZone = Intl.DateTimeFormat().resolvedOptions().timeZone;
950
+ if (browserTimeZone) {
951
+ let date = DateConvert.toDate(dirtyDate);
952
+ let offsetMilliseconds = tzParseTimezone(browserTimeZone, date, true);
953
+ let d = new Date(date.getTime() - offsetMilliseconds);
954
+ let resultDate = new Date(0);
955
+ resultDate.setFullYear(d.getUTCFullYear(), d.getUTCMonth(), d.getUTCDate());
956
+ resultDate.setHours(d.getUTCHours(), d.getUTCMinutes(), d.getUTCSeconds(), d.getUTCMilliseconds());
957
+ return resultDate;
851
958
  }
852
- return this.http.get(url);
853
- }
854
- getLibJsonFile(fileName) {
855
- const url = AppCoreSettings.libUrl + '/jsons';
856
- return this.__getJsonFile(url + "/" + fileName);
857
- }
858
- getJsonFile(fileName) {
859
- const url = AppCoreSettings.assetsUrl + '/jsons';
860
- return this.__getJsonFile(url + "/" + fileName);
861
- }
862
- getExternalJsonFile(libname, fileName) {
863
- const url = AppCoreSettings.externalUrl + "/" + libname + "/jsons";
864
- return this.__getJsonFile(url + "/" + fileName);
959
+ return new Date(dirtyDate);
865
960
  }
866
- static { this.ɵfac = function ApiServiceBase_Factory(t) { return new (t || ApiServiceBase)(i0.ɵɵinject(i1$1.HttpClient)); }; }
867
- static { this.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: ApiServiceBase, factory: ApiServiceBase.ɵfac }); }
868
961
  }
869
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ApiServiceBase, [{
870
- type: Injectable
871
- }], () => [{ type: i1$1.HttpClient }], null); })();
872
962
 
873
963
  /*
874
964
  <file>
@@ -879,36 +969,27 @@ class ApiServiceBase {
879
969
  Vadim Osovitny vadim.osovitny@osovitny.com
880
970
  Anatoly Osovitny anatoly.osovitny@osovitny.com
881
971
 
882
- Created:
883
- 20 Sep 2023
972
+ Created:
973
+ 10 Sep 2022
884
974
 
885
- Description:
886
- Identity and Access Management
975
+ Code:
976
+ https://www.npmjs.com/package/js-beautify
977
+ https://beautifier.io
887
978
 
888
- Copyright (c) 2016-2025 Osovitny Inc. All rights reserved.
979
+ Copyright (c) 2016-2025 Osovitny Inc. All rights reserved.
889
980
  </file>
890
981
  */
891
- const MSALStorageKeys = {
892
- //LocalStorage
893
- redirectTo: 'msal.app.redirectTo'
894
- //SessionStorage
895
- };
896
- class MSALStorage {
897
- static saveRedirectState(redirectTo, calledBy) {
898
- if (redirectTo.indexOf('iam') >= 0) {
899
- return;
982
+ //var beautify_html = require('js-beautify').html;
983
+ class XmlFormatter {
984
+ static toPrettyXML(s, options) {
985
+ if (!options) {
986
+ options = {
987
+ indent_size: 2,
988
+ indent_char: " ",
989
+ wrap_line_length: 110
990
+ };
900
991
  }
901
- localStorage.setItem(MSALStorageKeys.redirectTo, redirectTo);
902
- console.log(`msal.app: redirect state saved: ${redirectTo}. Called by: ${calledBy}`);
903
- }
904
- static getRedirectState(calledBy) {
905
- let redirectTo = localStorage.getItem(MSALStorageKeys.redirectTo);
906
- console.log(`msal.app: redirect state requested: ${redirectTo}. Called by: ${calledBy}`);
907
- return redirectTo;
908
- }
909
- static clearRedirectState(calledBy) {
910
- localStorage.removeItem(MSALStorageKeys.redirectTo);
911
- console.log(`msal.app: redirect state cleared. Called by: ${calledBy}`);
992
+ return js_beautify.html(s, options);
912
993
  }
913
994
  }
914
995
 
@@ -921,24 +1002,47 @@ class MSALStorage {
921
1002
  Vadim Osovitny vadim.osovitny@osovitny.com
922
1003
  Anatoly Osovitny anatoly.osovitny@osovitny.com
923
1004
 
924
- Created:
925
- 20 Sep 2023
926
-
927
- Description:
928
- Identity and Access Management
1005
+ Created:
1006
+ 11 Nov 2024
929
1007
 
930
- Copyright (c) 2016-2025 Osovitny Inc. All rights reserved.
1008
+ Copyright (c) 2016-2025 Osovitny Inc. All rights reserved.
931
1009
  </file>
932
1010
  */
933
- class MSALRedirect {
934
- static handle(router, calledBy) {
935
- let redirectTo = MSALStorage.getRedirectState(calledBy);
936
- if (redirectTo) {
937
- MSALStorage.clearRedirectState(calledBy);
938
- router.navigate([redirectTo]);
939
- }
940
- }
941
- }
1011
+ var DiscountCodeType;
1012
+ (function (DiscountCodeType) {
1013
+ DiscountCodeType[DiscountCodeType["Standard"] = 1] = "Standard";
1014
+ DiscountCodeType[DiscountCodeType["UseOnce"] = 2] = "UseOnce";
1015
+ })(DiscountCodeType || (DiscountCodeType = {}));
1016
+ var DiscountCodeStatus;
1017
+ (function (DiscountCodeStatus) {
1018
+ DiscountCodeStatus[DiscountCodeStatus["Exist"] = 1] = "Exist";
1019
+ DiscountCodeStatus[DiscountCodeStatus["NotFound"] = 2] = "NotFound";
1020
+ DiscountCodeStatus[DiscountCodeStatus["AlreadyUsed"] = 3] = "AlreadyUsed";
1021
+ })(DiscountCodeStatus || (DiscountCodeStatus = {}));
1022
+ var PaymentType;
1023
+ (function (PaymentType) {
1024
+ PaymentType[PaymentType["FullPayment"] = 1] = "FullPayment";
1025
+ PaymentType[PaymentType["WeeklyPayment"] = 2] = "WeeklyPayment";
1026
+ PaymentType[PaymentType["BiWeeklyPayment"] = 3] = "BiWeeklyPayment";
1027
+ PaymentType[PaymentType["MonthlyPayment"] = 4] = "MonthlyPayment";
1028
+ })(PaymentType || (PaymentType = {}));
1029
+ var PaymentMethod;
1030
+ (function (PaymentMethod) {
1031
+ PaymentMethod[PaymentMethod["None"] = 1] = "None";
1032
+ PaymentMethod[PaymentMethod["DigitalWallet"] = 2] = "DigitalWallet";
1033
+ PaymentMethod[PaymentMethod["CreditCard"] = 3] = "CreditCard";
1034
+ PaymentMethod[PaymentMethod["PayPal"] = 4] = "PayPal";
1035
+ PaymentMethod[PaymentMethod["Stripe"] = 5] = "Stripe";
1036
+ PaymentMethod[PaymentMethod["Venmo"] = 6] = "Venmo";
1037
+ PaymentMethod[PaymentMethod["ApplePay"] = 7] = "ApplePay";
1038
+ PaymentMethod[PaymentMethod["GooglePay"] = 8] = "GooglePay";
1039
+ })(PaymentMethod || (PaymentMethod = {}));
1040
+ var PaymentStage;
1041
+ (function (PaymentStage) {
1042
+ //PayPal/Stripe
1043
+ PaymentStage[PaymentStage["External"] = 1] = "External";
1044
+ PaymentStage[PaymentStage["Internal"] = 2] = "Internal";
1045
+ })(PaymentStage || (PaymentStage = {}));
942
1046
 
943
1047
  /*
944
1048
  <file>
@@ -947,20 +1051,32 @@ class MSALRedirect {
947
1051
 
948
1052
  Authors:
949
1053
  Vadim Osovitny vadim.osovitny@osovitny.com
1054
+
1055
+ Created:
1056
+ 11 Nov 2024
950
1057
 
951
- Created:
952
- 20 Sep 2023
953
-
954
- Description:
955
- Identity and Access Management
956
-
957
- Copyright (c) 2016-2025 Osovitny Inc. All rights reserved.
1058
+ Copyright (c) 2016-2025 Osovitny Inc. All rights reserved.
958
1059
  </file>
959
1060
  */
960
- let msalSettings = document.getElementById("msalSettings").getAttribute('data-msalsettings');
961
- let MSALConfig = JSON.parse(msalSettings);
962
- let MSALApiConfig = MSALConfig?.api;
963
- let MSALB2CConfig = MSALConfig?.b2c;
1061
+ var DataViewType;
1062
+ (function (DataViewType) {
1063
+ DataViewType["Grid"] = "grid";
1064
+ DataViewType["List"] = "list";
1065
+ })(DataViewType || (DataViewType = {}));
1066
+ var PublishStatus;
1067
+ (function (PublishStatus) {
1068
+ PublishStatus[PublishStatus["Draft"] = 1] = "Draft";
1069
+ PublishStatus[PublishStatus["PendingReview"] = 2] = "PendingReview";
1070
+ PublishStatus[PublishStatus["Published"] = 3] = "Published";
1071
+ PublishStatus[PublishStatus["Archived"] = 4] = "Archived";
1072
+ })(PublishStatus || (PublishStatus = {}));
1073
+ var ModerationStatus;
1074
+ (function (ModerationStatus) {
1075
+ ModerationStatus[ModerationStatus["Draft"] = 1] = "Draft";
1076
+ ModerationStatus[ModerationStatus["PendingReview"] = 2] = "PendingReview";
1077
+ ModerationStatus[ModerationStatus["Approved"] = 3] = "Approved";
1078
+ ModerationStatus[ModerationStatus["Rejected"] = 4] = "Rejected"; //item is rejected by Moderator
1079
+ })(ModerationStatus || (ModerationStatus = {}));
964
1080
 
965
1081
  /*
966
1082
  <file>
@@ -969,44 +1085,82 @@ let MSALB2CConfig = MSALConfig?.b2c;
969
1085
 
970
1086
  Authors:
971
1087
  Vadim Osovitny vadim.osovitny@osovitny.com
972
- Anatoly Osovitny anatoly.osovitny@osovitny.com
973
-
974
- Created:
975
- 27 Nov 2023
976
1088
 
977
- Description:
978
- Identity and Access Management
1089
+ Created:
1090
+ 17 Jun 2018
979
1091
 
980
- Copyright (c) 2016-2025 Osovitny Inc. All rights reserved.
1092
+ Copyright (c) 2016-2025 Osovitny Inc. All rights reserved.
981
1093
  </file>
982
1094
  */
983
1095
  //Node
984
- class MSALUtils {
985
- static isB2C() {
986
- if (MSALB2CConfig) {
987
- return true;
988
- }
989
- return false;
1096
+ class GoServiceBase {
1097
+ constructor(route, router) {
1098
+ this.route = route;
1099
+ this.router = router;
1100
+ this.rootRoute = '/';
1101
+ this.init();
990
1102
  }
991
- // Don't perform initial navigation in iframes or popups
992
- static initialNavigation() {
993
- return !BrowserUtils.isInIframe() && !BrowserUtils.isInPopup() ? 'enabledNonBlocking' : 'disabled';
1103
+ init() {
1104
+ if (AppSettings?.root != '/') {
1105
+ this.rootRoute = AppSettings.root;
1106
+ }
994
1107
  }
995
- static getApi() {
996
- let map = new Map();
997
- let api = MSALApiConfig;
998
- map.set(api.uri, api.scopes);
999
- return map;
1108
+ getHomeUrl() {
1109
+ return this.rootRoute;
1000
1110
  }
1001
- static getApiScopes() {
1002
- let scopes = [];
1003
- let api = MSALApiConfig;
1004
- for (const scope of api.scopes) {
1005
- scopes.push(scope);
1111
+ navigate(commands, reload = false) {
1112
+ if (reload) {
1113
+ this.router.navigate(commands).then(() => {
1114
+ this.locationReload();
1115
+ });
1006
1116
  }
1007
- return scopes;
1117
+ else {
1118
+ this.router.navigate(commands);
1119
+ }
1120
+ }
1121
+ homeReload() {
1122
+ window.location.href = "/";
1123
+ }
1124
+ locationReload() {
1125
+ window.location.reload();
1126
+ }
1127
+ home() {
1128
+ this.router.navigate([this.rootRoute]);
1129
+ }
1130
+ //Accounts
1131
+ accountClosed() {
1132
+ this.navigate([this.rootRoute + '/accounts/closed']);
1133
+ }
1134
+ //Errors
1135
+ error() {
1136
+ this.navigate([this.rootRoute + '/errors/error']);
1137
+ }
1138
+ //401 Unauthorized
1139
+ error401() {
1140
+ this.navigate([this.rootRoute + '/errors/401']);
1141
+ }
1142
+ //402 Payment Required
1143
+ error402() {
1144
+ this.navigate([this.rootRoute + '/errors/402']);
1008
1145
  }
1146
+ //403 Forbidden
1147
+ error403() {
1148
+ this.navigate([this.rootRoute + '/errors/403']);
1149
+ }
1150
+ //404 Not Found
1151
+ error404() {
1152
+ this.navigate([this.rootRoute + '/errors/404']);
1153
+ }
1154
+ //500 Internal Server Error
1155
+ error500() {
1156
+ this.navigate([this.rootRoute + '/errors/500']);
1157
+ }
1158
+ static { this.ɵfac = function GoServiceBase_Factory(t) { return new (t || GoServiceBase)(i0.ɵɵinject(i1$1.ActivatedRoute), i0.ɵɵinject(i1$1.Router)); }; }
1159
+ static { this.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: GoServiceBase, factory: GoServiceBase.ɵfac }); }
1009
1160
  }
1161
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(GoServiceBase, [{
1162
+ type: Injectable
1163
+ }], () => [{ type: i1$1.ActivatedRoute }, { type: i1$1.Router }], null); })();
1010
1164
 
1011
1165
  /*
1012
1166
  <file>
@@ -1017,33 +1171,15 @@ class MSALUtils {
1017
1171
  Vadim Osovitny vadim.osovitny@osovitny.com
1018
1172
  Anatoly Osovitny anatoly.osovitny@osovitny.com
1019
1173
 
1020
- Created:
1021
- 20 Sep 2023
1022
-
1023
- Description:
1024
- Identity and Access Management
1174
+ Created:
1175
+ 26 Jun 2020
1025
1176
 
1026
- Copyright (c) 2016-2025 Osovitny Inc. All rights reserved.
1177
+ Copyright (c) 2016-2025 Osovitny Inc. All rights reserved.
1027
1178
  </file>
1028
1179
  */
1029
- //App
1030
- class MSALB2C {
1031
- static getAuthorityByType(type) {
1032
- let policy = MSALB2C.getPolicyByType(type);
1033
- return policy?.authority;
1034
- }
1035
- static getPolicyByType(type) {
1036
- let policies = MSALB2CConfig?.policies;
1037
- if (!policies) {
1038
- return null;
1039
- }
1040
- for (let i = 0; i < policies.length; i++) {
1041
- let policy = policies[i];
1042
- if (policy.type == type) {
1043
- return policy;
1044
- }
1045
- }
1046
- return null;
1180
+ class Guid {
1181
+ static newGuid() {
1182
+ return v4();
1047
1183
  }
1048
1184
  }
1049
1185
 
@@ -1065,79 +1201,27 @@ class MSALB2C {
1065
1201
  Copyright (c) 2016-2025 Osovitny Inc. All rights reserved.
1066
1202
  </file>
1067
1203
  */
1068
- const PolicyType = {
1069
- signUpSignIn: 'signUpSignIn',
1070
- signUp: 'signUp',
1071
- editProfile: 'editProfile',
1072
- resetPassword: 'resetPassword'
1204
+ const MSALStorageKeys = {
1205
+ //LocalStorage
1206
+ redirectTo: 'msal.app.redirectTo'
1207
+ //SessionStorage
1073
1208
  };
1074
-
1075
- /*
1076
- <file>
1077
- Project:
1078
- @osovitny/anatoly
1079
-
1080
- Authors:
1081
- Vadim Osovitny vadim.osovitny@osovitny.com
1082
- Anatoly Osovitny anatoly.osovitny@osovitny.com
1083
-
1084
- Created:
1085
- 20 Sep 2023
1086
-
1087
- Description:
1088
- Identity and Access Management
1089
-
1090
- Copyright (c) 2016-2025 Osovitny Inc. All rights reserved.
1091
- </file>
1092
- */
1093
-
1094
- /*
1095
- <file>
1096
- Project:
1097
- @osovitny/anatoly
1098
-
1099
- Authors:
1100
- Vadim Osovitny vadim.osovitny@osovitny.com
1101
- Anatoly Osovitny anatoly.osovitny@osovitny.com
1102
-
1103
- Created:
1104
- 17 Apr 2023
1105
-
1106
- Copyright (c) 2016-2025 Osovitny Inc. All rights reserved.
1107
- </file>
1108
- */
1109
- class Stopwatch {
1110
- constructor(name) {
1111
- this.name = name;
1112
- this.startTime = 0;
1113
- this.stopTime = 0;
1114
- this.running = false;
1115
- this.performance = !!window.performance;
1116
- console.log(this.name + ' started.');
1117
- }
1118
- currentTime() {
1119
- return this.performance ? window.performance.now() : new Date().getTime();
1120
- }
1121
- start() {
1122
- this.startTime = this.currentTime();
1123
- this.running = true;
1124
- }
1125
- stop() {
1126
- this.stopTime = this.currentTime();
1127
- this.running = false;
1128
- }
1129
- getElapsedMilliseconds() {
1130
- if (this.running) {
1131
- this.stopTime = this.currentTime();
1209
+ class MSALStorage {
1210
+ static saveRedirectState(redirectTo, calledBy) {
1211
+ if (redirectTo.indexOf('iam') >= 0) {
1212
+ return;
1132
1213
  }
1133
- return this.stopTime - this.startTime;
1214
+ localStorage.setItem(MSALStorageKeys.redirectTo, redirectTo);
1215
+ console.log(`msal.app: redirect state saved: ${redirectTo}. Called by: ${calledBy}`);
1134
1216
  }
1135
- getElapsedSeconds() {
1136
- return this.getElapsedMilliseconds() / 1000;
1217
+ static getRedirectState(calledBy) {
1218
+ let redirectTo = localStorage.getItem(MSALStorageKeys.redirectTo);
1219
+ console.log(`msal.app: redirect state requested: ${redirectTo}. Called by: ${calledBy}`);
1220
+ return redirectTo;
1137
1221
  }
1138
- printElapsedAsMilliseconds() {
1139
- let elapsed = this.getElapsedMilliseconds();
1140
- console.log(`${this.name} stopped. Execution time: ${elapsed} ms`);
1222
+ static clearRedirectState(calledBy) {
1223
+ localStorage.removeItem(MSALStorageKeys.redirectTo);
1224
+ console.log(`msal.app: redirect state cleared. Called by: ${calledBy}`);
1141
1225
  }
1142
1226
  }
1143
1227
 
@@ -1150,19 +1234,24 @@ class Stopwatch {
1150
1234
  Vadim Osovitny vadim.osovitny@osovitny.com
1151
1235
  Anatoly Osovitny anatoly.osovitny@osovitny.com
1152
1236
 
1153
- Created:
1154
- 28 Apr 2024
1237
+ Created:
1238
+ 20 Sep 2023
1155
1239
 
1156
- Copyright (c) 2016-2025 Osovitny Inc. All rights reserved.
1240
+ Description:
1241
+ Identity and Access Management
1242
+
1243
+ Copyright (c) 2016-2025 Osovitny Inc. All rights reserved.
1157
1244
  </file>
1158
1245
  */
1159
- const AppContextStorageKeys = {
1160
- version: 'version',
1161
- currency: 'currency',
1162
- //Lists
1163
- countries: 'countries',
1164
- languages: 'languages'
1165
- };
1246
+ class MSALRedirect {
1247
+ static handle(router, calledBy) {
1248
+ let redirectTo = MSALStorage.getRedirectState(calledBy);
1249
+ if (redirectTo) {
1250
+ MSALStorage.clearRedirectState(calledBy);
1251
+ router.navigate([redirectTo]);
1252
+ }
1253
+ }
1254
+ }
1166
1255
 
1167
1256
  /*
1168
1257
  <file>
@@ -1171,62 +1260,20 @@ const AppContextStorageKeys = {
1171
1260
 
1172
1261
  Authors:
1173
1262
  Vadim Osovitny vadim.osovitny@osovitny.com
1174
- Anatoly Osovitny anatoly.osovitny@osovitny.com
1175
1263
 
1176
- Created:
1177
- 26 Jun 2020
1264
+ Created:
1265
+ 20 Sep 2023
1178
1266
 
1179
- Copyright (c) 2016-2025 Osovitny Inc. All rights reserved.
1267
+ Description:
1268
+ Identity and Access Management
1269
+
1270
+ Copyright (c) 2016-2025 Osovitny Inc. All rights reserved.
1180
1271
  </file>
1181
1272
  */
1182
- //Node
1183
- class WebStorageService {
1184
- constructor(storage) {
1185
- this.storage = storage === 'local' || storage === 'localStorage' ? localStorage : sessionStorage;
1186
- }
1187
- setItem(key, value) {
1188
- this.storage.setItem(key, value);
1189
- }
1190
- setObject(key, value) {
1191
- this.storage.setItem(key, JSON.stringify(value));
1192
- }
1193
- getItem(key) {
1194
- return this.storage.getItem(key);
1195
- }
1196
- getObject(key) {
1197
- let value = this.storage.getItem(key);
1198
- if (!value) {
1199
- return null;
1200
- }
1201
- return JSON.parse(value);
1202
- }
1203
- remove(key) {
1204
- this.storage.removeItem(key);
1205
- }
1206
- clear() {
1207
- this.storage.clear();
1208
- }
1209
- }
1210
- class LocalStorageService extends WebStorageService {
1211
- constructor() {
1212
- super('localStorage');
1213
- }
1214
- static { this.ɵfac = function LocalStorageService_Factory(t) { return new (t || LocalStorageService)(); }; }
1215
- static { this.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: LocalStorageService, factory: LocalStorageService.ɵfac }); }
1216
- }
1217
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LocalStorageService, [{
1218
- type: Injectable
1219
- }], () => [], null); })();
1220
- class SessionStorageService extends WebStorageService {
1221
- constructor() {
1222
- super('sessionStorage');
1223
- }
1224
- static { this.ɵfac = function SessionStorageService_Factory(t) { return new (t || SessionStorageService)(); }; }
1225
- static { this.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: SessionStorageService, factory: SessionStorageService.ɵfac }); }
1226
- }
1227
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SessionStorageService, [{
1228
- type: Injectable
1229
- }], () => [], null); })();
1273
+ let msalSettings = document.getElementById("msalSettings").getAttribute('data-msalsettings');
1274
+ let MSALConfig = JSON.parse(msalSettings);
1275
+ let MSALApiConfig = MSALConfig?.api;
1276
+ let MSALB2CConfig = MSALConfig?.b2c;
1230
1277
 
1231
1278
  /*
1232
1279
  <file>
@@ -1237,172 +1284,125 @@ class SessionStorageService extends WebStorageService {
1237
1284
  Vadim Osovitny vadim.osovitny@osovitny.com
1238
1285
  Anatoly Osovitny anatoly.osovitny@osovitny.com
1239
1286
 
1240
- Created:
1241
- 13 Nov 2017
1287
+ Created:
1288
+ 27 Nov 2023
1242
1289
 
1243
- Copyright (c) 2016-2025 Osovitny Inc. All rights reserved.
1290
+ Description:
1291
+ Identity and Access Management
1292
+
1293
+ Copyright (c) 2016-2025 Osovitny Inc. All rights reserved.
1244
1294
  </file>
1245
1295
  */
1246
1296
  //Node
1247
- class AppContextService extends ApiServiceBase {
1248
- constructor(http, localStorage, sessionStorage) {
1249
- super(http);
1250
- this.http = http;
1251
- this.localStorage = localStorage;
1252
- this.sessionStorage = sessionStorage;
1253
- this.storageKeyName = 'appContext';
1254
- this.subscription = null;
1255
- //Private Streams
1256
- this._updated = new BehaviorSubject(null);
1257
- this._userUpdated = new BehaviorSubject(null);
1258
- //Public Streams
1259
- this.updated$ = this._updated.asObservable();
1260
- this.userUpdated$ = this._userUpdated.asObservable();
1261
- this.baseUrl = `${ApiUrl}/appContext`;
1262
- }
1263
- fireUpdated(data) {
1264
- if (!data) {
1265
- return;
1266
- }
1267
- this._updated.next(data);
1268
- }
1269
- fireUserUpdated() {
1270
- this._userUpdated.next(null);
1271
- }
1272
- //Session
1273
- getCurrent4Session() {
1274
- return this.sessionStorage.getObject(this.storageKeyName);
1275
- }
1276
- setCurrent2Session(value) {
1277
- this.sessionStorage.setObject(this.storageKeyName, value);
1278
- }
1279
- dataReceived(data) {
1280
- this.current = data;
1281
- this.subscription.unsubscribe();
1282
- this.subscription = null;
1283
- }
1284
- getCurrentContext() {
1285
- if (this.subscription != null) {
1286
- return;
1287
- }
1288
- //Logging
1289
- let stopwatch = new Stopwatch("AppContextService: Requesting a new AppContext");
1290
- stopwatch.start();
1291
- this.subscription = this.get('getCurrentContext', null).subscribe({
1292
- next: (data) => {
1293
- //Logging
1294
- stopwatch.stop();
1295
- stopwatch.printElapsedAsMilliseconds();
1296
- this.dataReceived(data);
1297
- }
1298
- });
1299
- }
1300
- updateCurrentIfExpired() {
1301
- let context = this.getCurrent4Session();
1302
- if (!context) {
1303
- return;
1304
- }
1305
- let shouldBeUpdated = false;
1306
- let lr = context.lastRequested;
1307
- if (lr) {
1308
- let now = new Date();
1309
- let lastRequested = new Date(context.lastRequested);
1310
- let in60Mins = new Date(lastRequested.getFullYear(), lastRequested.getMonth(), lastRequested.getDate(), lastRequested.getHours(), lastRequested.getMinutes() + 60, 0, 0);
1311
- if (in60Mins.getTime() < now.getTime()) {
1312
- shouldBeUpdated = true;
1313
- }
1314
- }
1315
- else {
1316
- shouldBeUpdated = true;
1317
- }
1318
- if (shouldBeUpdated) {
1319
- this.updateCurrent();
1320
- }
1321
- }
1322
- //Public
1323
- init(context = null) {
1324
- if (context) {
1325
- this.current = context;
1297
+ class MSALUtils {
1298
+ static isB2C() {
1299
+ if (MSALB2CConfig) {
1300
+ return true;
1326
1301
  }
1302
+ return false;
1327
1303
  }
1328
- loadRequiredJsonFiles() {
1329
- return null;
1330
- }
1331
- loadRequiredItems() {
1332
- return null;
1333
- }
1334
- updateCurrent() {
1335
- this.getCurrentContext();
1336
- }
1337
- //Storage
1338
- clearLocalStorage() {
1339
- this.localStorage.clear();
1340
- }
1341
- clearSessionStorage() {
1342
- this.sessionStorage.clear();
1343
- }
1344
- clearWebStorage() {
1345
- this.clearLocalStorage();
1346
- this.clearSessionStorage();
1347
- }
1348
- //current
1349
- get current() {
1350
- this.updateCurrentIfExpired();
1351
- return this.getCurrent4Session();
1352
- }
1353
- set current(value) {
1354
- this.setCurrent2Session(value);
1355
- this.fireUpdated(value);
1356
- }
1357
- //user
1358
- get user() {
1359
- let current = this.current;
1360
- return current?.user;
1361
- }
1362
- /* Storage Caching ----------------------------------------------------------BEGIN */
1363
- //version => localStorage
1364
- get version() {
1365
- return this.localStorage.getObject(AppContextStorageKeys.version);
1366
- }
1367
- set version(value) {
1368
- this.localStorage.setObject(AppContextStorageKeys.version, value);
1369
- }
1370
- //currency => localStorage
1371
- get currency() {
1372
- return this.localStorage.getObject(AppContextStorageKeys.currency);
1373
- }
1374
- set currency(value) {
1375
- this.localStorage.setObject(AppContextStorageKeys.currency, value);
1376
- }
1377
- clearCurrency() {
1378
- this.localStorage.remove(AppContextStorageKeys.currency);
1379
- }
1380
- //countries => localStorage
1381
- get countries() {
1382
- return this.localStorage.getObject(AppContextStorageKeys.countries);
1383
- }
1384
- set countries(value) {
1385
- this.localStorage.setObject(AppContextStorageKeys.countries, value);
1304
+ // Don't perform initial navigation in iframes or popups
1305
+ static initialNavigation() {
1306
+ return !BrowserUtils.isInIframe() && !BrowserUtils.isInPopup() ? 'enabledNonBlocking' : 'disabled';
1386
1307
  }
1387
- clearCountries() {
1388
- this.localStorage.remove(AppContextStorageKeys.countries);
1308
+ static getApi() {
1309
+ let map = new Map();
1310
+ let api = MSALApiConfig;
1311
+ map.set(api.uri, api.scopes);
1312
+ return map;
1389
1313
  }
1390
- //languages => localStorage
1391
- get languages() {
1392
- return this.localStorage.getObject(AppContextStorageKeys.languages);
1314
+ static getApiScopes() {
1315
+ let scopes = [];
1316
+ let api = MSALApiConfig;
1317
+ for (const scope of api.scopes) {
1318
+ scopes.push(scope);
1319
+ }
1320
+ return scopes;
1393
1321
  }
1394
- set languages(value) {
1395
- this.localStorage.setObject(AppContextStorageKeys.languages, value);
1322
+ }
1323
+
1324
+ /*
1325
+ <file>
1326
+ Project:
1327
+ @osovitny/anatoly
1328
+
1329
+ Authors:
1330
+ Vadim Osovitny vadim.osovitny@osovitny.com
1331
+ Anatoly Osovitny anatoly.osovitny@osovitny.com
1332
+
1333
+ Created:
1334
+ 20 Sep 2023
1335
+
1336
+ Description:
1337
+ Identity and Access Management
1338
+
1339
+ Copyright (c) 2016-2025 Osovitny Inc. All rights reserved.
1340
+ </file>
1341
+ */
1342
+ //App
1343
+ class MSALB2C {
1344
+ static getAuthorityByType(type) {
1345
+ let policy = MSALB2C.getPolicyByType(type);
1346
+ return policy?.authority;
1396
1347
  }
1397
- clearLanguages() {
1398
- this.localStorage.remove(AppContextStorageKeys.languages);
1348
+ static getPolicyByType(type) {
1349
+ let policies = MSALB2CConfig?.policies;
1350
+ if (!policies) {
1351
+ return null;
1352
+ }
1353
+ for (let i = 0; i < policies.length; i++) {
1354
+ let policy = policies[i];
1355
+ if (policy.type == type) {
1356
+ return policy;
1357
+ }
1358
+ }
1359
+ return null;
1399
1360
  }
1400
- static { this.ɵfac = function AppContextService_Factory(t) { return new (t || AppContextService)(i0.ɵɵinject(i1$1.HttpClient), i0.ɵɵinject(LocalStorageService), i0.ɵɵinject(SessionStorageService)); }; }
1401
- static { this.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: AppContextService, factory: AppContextService.ɵfac }); }
1402
1361
  }
1403
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AppContextService, [{
1404
- type: Injectable
1405
- }], () => [{ type: i1$1.HttpClient }, { type: LocalStorageService }, { type: SessionStorageService }], null); })();
1362
+
1363
+ /*
1364
+ <file>
1365
+ Project:
1366
+ @osovitny/anatoly
1367
+
1368
+ Authors:
1369
+ Vadim Osovitny vadim.osovitny@osovitny.com
1370
+ Anatoly Osovitny anatoly.osovitny@osovitny.com
1371
+
1372
+ Created:
1373
+ 20 Sep 2023
1374
+
1375
+ Description:
1376
+ Identity and Access Management
1377
+
1378
+ Copyright (c) 2016-2025 Osovitny Inc. All rights reserved.
1379
+ </file>
1380
+ */
1381
+ const PolicyType = {
1382
+ signUpSignIn: 'signUpSignIn',
1383
+ signUp: 'signUp',
1384
+ editProfile: 'editProfile',
1385
+ resetPassword: 'resetPassword'
1386
+ };
1387
+
1388
+ /*
1389
+ <file>
1390
+ Project:
1391
+ @osovitny/anatoly
1392
+
1393
+ Authors:
1394
+ Vadim Osovitny vadim.osovitny@osovitny.com
1395
+ Anatoly Osovitny anatoly.osovitny@osovitny.com
1396
+
1397
+ Created:
1398
+ 20 Sep 2023
1399
+
1400
+ Description:
1401
+ Identity and Access Management
1402
+
1403
+ Copyright (c) 2016-2025 Osovitny Inc. All rights reserved.
1404
+ </file>
1405
+ */
1406
1406
 
1407
1407
  class AuthService extends ApiServiceBase {
1408
1408
  constructor(http, router, appContext, msalGuardConfig, msalService, msalBroadcastService) {
@@ -1812,7 +1812,7 @@ class AuthService extends ApiServiceBase {
1812
1812
  };
1813
1813
  this.login(resetPasswordFlowRequest);
1814
1814
  }
1815
- static { this.ɵfac = function AuthService_Factory(t) { return new (t || AuthService)(i0.ɵɵinject(i1$1.HttpClient), i0.ɵɵinject(i1.Router), i0.ɵɵinject(AppContextService), i0.ɵɵinject(MSAL_GUARD_CONFIG), i0.ɵɵinject(i4.MsalService), i0.ɵɵinject(i4.MsalBroadcastService)); }; }
1815
+ static { this.ɵfac = function AuthService_Factory(t) { return new (t || AuthService)(i0.ɵɵinject(i1.HttpClient), i0.ɵɵinject(i1$1.Router), i0.ɵɵinject(AppContextService), i0.ɵɵinject(MSAL_GUARD_CONFIG), i0.ɵɵinject(i4.MsalService), i0.ɵɵinject(i4.MsalBroadcastService)); }; }
1816
1816
  static { this.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: AuthService, factory: AuthService.ɵfac, providedIn: 'root' }); }
1817
1817
  }
1818
1818
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AuthService, [{
@@ -1820,7 +1820,7 @@ class AuthService extends ApiServiceBase {
1820
1820
  args: [{
1821
1821
  providedIn: 'root'
1822
1822
  }]
1823
- }], () => [{ type: i1$1.HttpClient }, { type: i1.Router }, { type: AppContextService }, { type: undefined, decorators: [{
1823
+ }], () => [{ type: i1.HttpClient }, { type: i1$1.Router }, { type: AppContextService }, { type: undefined, decorators: [{
1824
1824
  type: Inject,
1825
1825
  args: [MSAL_GUARD_CONFIG]
1826
1826
  }] }, { type: i4.MsalService }, { type: i4.MsalBroadcastService }], null); })();
@@ -1935,12 +1935,12 @@ class AppsGoServiceBase extends GoServiceBase {
1935
1935
  }
1936
1936
  }
1937
1937
  }
1938
- static { this.ɵfac = function AppsGoServiceBase_Factory(t) { return new (t || AppsGoServiceBase)(i0.ɵɵinject(i1.ActivatedRoute), i0.ɵɵinject(i1.Router), i0.ɵɵinject(AuthService), i0.ɵɵinject(LoggingService)); }; }
1938
+ static { this.ɵfac = function AppsGoServiceBase_Factory(t) { return new (t || AppsGoServiceBase)(i0.ɵɵinject(i1$1.ActivatedRoute), i0.ɵɵinject(i1$1.Router), i0.ɵɵinject(AuthService), i0.ɵɵinject(LoggingService)); }; }
1939
1939
  static { this.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: AppsGoServiceBase, factory: AppsGoServiceBase.ɵfac }); }
1940
1940
  }
1941
1941
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AppsGoServiceBase, [{
1942
1942
  type: Injectable
1943
- }], () => [{ type: i1.ActivatedRoute }, { type: i1.Router }, { type: AuthService }, { type: LoggingService }], null); })();
1943
+ }], () => [{ type: i1$1.ActivatedRoute }, { type: i1$1.Router }, { type: AuthService }, { type: LoggingService }], null); })();
1944
1944
 
1945
1945
  /*
1946
1946
  <file>
@@ -1997,7 +1997,7 @@ class AuthenticationGuard extends MsalGuard {
1997
1997
  this.setInteractionType(route);
1998
1998
  return super.canActivate(route, state);
1999
1999
  }
2000
- static { this.ɵfac = function AuthenticationGuard_Factory(t) { return new (t || AuthenticationGuard)(i0.ɵɵinject(MSAL_GUARD_CONFIG), i0.ɵɵinject(i4.MsalBroadcastService), i0.ɵɵinject(i4.MsalService), i0.ɵɵinject(i1$2.Location), i0.ɵɵinject(i1.Router)); }; }
2000
+ static { this.ɵfac = function AuthenticationGuard_Factory(t) { return new (t || AuthenticationGuard)(i0.ɵɵinject(MSAL_GUARD_CONFIG), i0.ɵɵinject(i4.MsalBroadcastService), i0.ɵɵinject(i4.MsalService), i0.ɵɵinject(i1$2.Location), i0.ɵɵinject(i1$1.Router)); }; }
2001
2001
  static { this.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: AuthenticationGuard, factory: AuthenticationGuard.ɵfac }); }
2002
2002
  }
2003
2003
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AuthenticationGuard, [{
@@ -2005,7 +2005,7 @@ class AuthenticationGuard extends MsalGuard {
2005
2005
  }], () => [{ type: undefined, decorators: [{
2006
2006
  type: Inject,
2007
2007
  args: [MSAL_GUARD_CONFIG]
2008
- }] }, { type: i4.MsalBroadcastService }, { type: i4.MsalService }, { type: i1$2.Location }, { type: i1.Router }], null); })();
2008
+ }] }, { type: i4.MsalBroadcastService }, { type: i4.MsalService }, { type: i1$2.Location }, { type: i1$1.Router }], null); })();
2009
2009
 
2010
2010
  /*
2011
2011
  <file>
@@ -2435,12 +2435,12 @@ class StarterService extends ApiServiceBase {
2435
2435
  stopwatch.printElapsedAsMilliseconds();
2436
2436
  }));
2437
2437
  }
2438
- static { this.ɵfac = function StarterService_Factory(t) { return new (t || StarterService)(i0.ɵɵinject(i1$1.HttpClient), i0.ɵɵinject(AppContextService), i0.ɵɵinject(LoggingService)); }; }
2438
+ static { this.ɵfac = function StarterService_Factory(t) { return new (t || StarterService)(i0.ɵɵinject(i1.HttpClient), i0.ɵɵinject(AppContextService), i0.ɵɵinject(LoggingService)); }; }
2439
2439
  static { this.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: StarterService, factory: StarterService.ɵfac }); }
2440
2440
  }
2441
2441
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(StarterService, [{
2442
2442
  type: Injectable
2443
- }], () => [{ type: i1$1.HttpClient }, { type: AppContextService }, { type: LoggingService }], null); })();
2443
+ }], () => [{ type: i1.HttpClient }, { type: AppContextService }, { type: LoggingService }], null); })();
2444
2444
 
2445
2445
  /*
2446
2446
  <file>
@@ -3284,12 +3284,12 @@ class GoogleAnalyticsService {
3284
3284
  let ga = window.gtag;
3285
3285
  return ga;
3286
3286
  }
3287
- static { this.ɵfac = function GoogleAnalyticsService_Factory(t) { return new (t || GoogleAnalyticsService)(i0.ɵɵinject(i1.Router)); }; }
3287
+ static { this.ɵfac = function GoogleAnalyticsService_Factory(t) { return new (t || GoogleAnalyticsService)(i0.ɵɵinject(i1$1.Router)); }; }
3288
3288
  static { this.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: GoogleAnalyticsService, factory: GoogleAnalyticsService.ɵfac }); }
3289
3289
  }
3290
3290
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(GoogleAnalyticsService, [{
3291
3291
  type: Injectable
3292
- }], () => [{ type: i1.Router }], null); })();
3292
+ }], () => [{ type: i1$1.Router }], null); })();
3293
3293
 
3294
3294
  /*
3295
3295
  <file>
@@ -3822,12 +3822,294 @@ class Utils {
3822
3822
  Anatoly Osovitny anatoly.osovitny@osovitny.com
3823
3823
 
3824
3824
  Created:
3825
- 2 Aug 2022
3825
+ 2 Aug 2022
3826
+
3827
+ Copyright (c) 2016-2025 Osovitny Inc. All rights reserved.
3828
+ </file>
3829
+ */
3830
+ //consts
3831
+
3832
+ /*
3833
+ <file>
3834
+ Project:
3835
+ @osovitny/anatoly
3836
+
3837
+ Authors:
3838
+ Vadim Osovitny vadim.osovitny@osovitny.com
3839
+ Anatoly Osovitny anatoly.osovitny@osovitny.com
3840
+
3841
+ Created:
3842
+ 28 Aug 2018
3843
+
3844
+ Copyright (c) 2016-2025 Osovitny Inc. All rights reserved.
3845
+ </file>
3846
+ */
3847
+ //Node
3848
+ class ComponentBase {
3849
+ constructor() {
3850
+ this.isDevMode = false;
3851
+ this.subs = new Subs();
3852
+ //Component Data => usually loading from API
3853
+ this.dataLoading = true;
3854
+ this.dataLoaded = false;
3855
+ this.dataFound = false;
3856
+ this.applicationOneUrl = '/';
3857
+ this.title = '';
3858
+ this.isTitleVisible = true;
3859
+ this.isRequired = false;
3860
+ this.isDevMode = IsDevMode;
3861
+ this.applicationType = 1;
3862
+ this.applicationRoot = '/';
3863
+ if (AppSettings) {
3864
+ this.applicationType = AppSettings.id;
3865
+ if (AppSettings.root != '/') {
3866
+ this.applicationRoot = AppSettings.root;
3867
+ }
3868
+ let applicationOne = getAppSettingsById(1);
3869
+ if (applicationOne) {
3870
+ this.applicationOneUrl = applicationOne.baseUrl + applicationOne.root;
3871
+ }
3872
+ }
3873
+ }
3874
+ ngOnInit() {
3875
+ }
3876
+ ngOnDestroy() {
3877
+ this.subs.unsubscribe();
3878
+ }
3879
+ getEntityId() {
3880
+ return QSUtils.getValueByName("id");
3881
+ }
3882
+ dataStartedLoading() {
3883
+ this.dataLoading = true;
3884
+ this.dataLoaded = false;
3885
+ this.dataFound = false;
3886
+ }
3887
+ dataLoadedAndNothingFound() {
3888
+ this.dataLoadedAndFound(false);
3889
+ }
3890
+ dataLoadedAndFound(found = true) {
3891
+ this.dataLoading = false;
3892
+ this.dataLoaded = true;
3893
+ this.dataFound = found;
3894
+ }
3895
+ static { this.ɵfac = function ComponentBase_Factory(t) { return new (t || ComponentBase)(); }; }
3896
+ static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ComponentBase, selectors: [["ng-component"]], inputs: { classes: "classes", title: "title", isTitleVisible: "isTitleVisible", isRequired: "isRequired" }, decls: 0, vars: 0, template: function ComponentBase_Template(rf, ctx) { }, encapsulation: 2 }); }
3897
+ }
3898
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ComponentBase, [{
3899
+ type: Component,
3900
+ args: [{
3901
+ template: ''
3902
+ }]
3903
+ }], () => [], { classes: [{
3904
+ type: Input
3905
+ }], title: [{
3906
+ type: Input
3907
+ }], isTitleVisible: [{
3908
+ type: Input
3909
+ }], isRequired: [{
3910
+ type: Input
3911
+ }] }); })();
3912
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ComponentBase, { className: "ComponentBase", filePath: "lib\\ui\\components\\base\\components\\component.ts", lineNumber: 26 }); })();
3913
+
3914
+ /*
3915
+ <file>
3916
+ Project:
3917
+ @osovitny/anatoly
3918
+
3919
+ Authors:
3920
+ Vadim Osovitny vadim.osovitny@osovitny.com
3921
+ Anatoly Osovitny anatoly.osovitny@osovitny.com
3922
+
3923
+ Created:
3924
+ 4 Jul 2018
3925
+
3926
+ Copyright (c) 2016-2025 Osovitny Inc. All rights reserved.
3927
+ </file>
3928
+ */
3929
+ //Node
3930
+ function SignUpButtonComponent_a_0_ng_container_1_Template(rf, ctx) { if (rf & 1) {
3931
+ i0.ɵɵelementContainer(0);
3932
+ } }
3933
+ function SignUpButtonComponent_a_0_Template(rf, ctx) { if (rf & 1) {
3934
+ i0.ɵɵelementStart(0, "a", 3);
3935
+ i0.ɵɵtemplate(1, SignUpButtonComponent_a_0_ng_container_1_Template, 1, 0, "ng-container", 4);
3936
+ i0.ɵɵelementEnd();
3937
+ } if (rf & 2) {
3938
+ const ctx_r0 = i0.ɵɵnextContext();
3939
+ const _r3 = i0.ɵɵreference(3);
3940
+ i0.ɵɵclassMap(ctx_r0.classes);
3941
+ i0.ɵɵproperty("href", ctx_r0.url, i0.ɵɵsanitizeUrl);
3942
+ i0.ɵɵadvance();
3943
+ i0.ɵɵproperty("ngTemplateOutlet", _r3);
3944
+ } }
3945
+ function SignUpButtonComponent_a_1_ng_container_1_Template(rf, ctx) { if (rf & 1) {
3946
+ i0.ɵɵelementContainer(0);
3947
+ } }
3948
+ function SignUpButtonComponent_a_1_Template(rf, ctx) { if (rf & 1) {
3949
+ i0.ɵɵelementStart(0, "a", 5);
3950
+ i0.ɵɵtemplate(1, SignUpButtonComponent_a_1_ng_container_1_Template, 1, 0, "ng-container", 4);
3951
+ i0.ɵɵelementEnd();
3952
+ } if (rf & 2) {
3953
+ const ctx_r1 = i0.ɵɵnextContext();
3954
+ const _r3 = i0.ɵɵreference(3);
3955
+ i0.ɵɵclassMap(ctx_r1.classes);
3956
+ i0.ɵɵproperty("routerLink", ctx_r1.url);
3957
+ i0.ɵɵadvance();
3958
+ i0.ɵɵproperty("ngTemplateOutlet", _r3);
3959
+ } }
3960
+ function SignUpButtonComponent_ng_template_2_span_3_Template(rf, ctx) { if (rf & 1) {
3961
+ i0.ɵɵelementStart(0, "span");
3962
+ i0.ɵɵtext(1, "Sign Up");
3963
+ i0.ɵɵelementEnd();
3964
+ } }
3965
+ function SignUpButtonComponent_ng_template_2_Template(rf, ctx) { if (rf & 1) {
3966
+ i0.ɵɵelementStart(0, "span", null, 6);
3967
+ i0.ɵɵprojection(2);
3968
+ i0.ɵɵelementEnd();
3969
+ i0.ɵɵtemplate(3, SignUpButtonComponent_ng_template_2_span_3_Template, 2, 0, "span", 7);
3970
+ } if (rf & 2) {
3971
+ const _r6 = i0.ɵɵreference(1);
3972
+ i0.ɵɵadvance(3);
3973
+ i0.ɵɵproperty("ngIf", !_r6.innerHTML.trim());
3974
+ } }
3975
+ const _c0$h = ["*"];
3976
+ class SignUpButtonComponent extends ComponentBase {
3977
+ constructor() {
3978
+ super();
3979
+ this.external = false;
3980
+ }
3981
+ ngOnInit() {
3982
+ let url = MSALConfig.ui.signup;
3983
+ if (url) {
3984
+ this.external = url.indexOf('http') > -1;
3985
+ if (this.external) {
3986
+ this.url = url + (this.qs ? '?' + this.qs : '');
3987
+ }
3988
+ else {
3989
+ this.url = url;
3990
+ }
3991
+ }
3992
+ }
3993
+ static { this.ɵfac = function SignUpButtonComponent_Factory(t) { return new (t || SignUpButtonComponent)(); }; }
3994
+ static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SignUpButtonComponent, selectors: [["anatoly-signup-button"]], inputs: { qs: "qs" }, features: [i0.ɵɵInheritDefinitionFeature], ngContentSelectors: _c0$h, decls: 4, vars: 2, consts: [[3, "href", "class", 4, "ngIf"], [3, "routerLink", "class", 4, "ngIf"], ["contentTemplate", ""], [3, "href"], [4, "ngTemplateOutlet"], [3, "routerLink"], ["ref", ""], [4, "ngIf"]], template: function SignUpButtonComponent_Template(rf, ctx) { if (rf & 1) {
3995
+ i0.ɵɵprojectionDef();
3996
+ i0.ɵɵtemplate(0, SignUpButtonComponent_a_0_Template, 2, 5, "a", 0)(1, SignUpButtonComponent_a_1_Template, 2, 5, "a", 1)(2, SignUpButtonComponent_ng_template_2_Template, 4, 1, "ng-template", null, 2, i0.ɵɵtemplateRefExtractor);
3997
+ } if (rf & 2) {
3998
+ i0.ɵɵproperty("ngIf", ctx.external);
3999
+ i0.ɵɵadvance();
4000
+ i0.ɵɵproperty("ngIf", !ctx.external);
4001
+ } }, dependencies: [i1$2.NgIf, i1$2.NgTemplateOutlet, i1$1.RouterLink], encapsulation: 2 }); }
4002
+ }
4003
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SignUpButtonComponent, [{
4004
+ type: Component,
4005
+ args: [{ selector: "anatoly-signup-button", template: "<a [href]=\"url\" class=\"{{ classes }}\" *ngIf=\"external\">\r\n <ng-container *ngTemplateOutlet=\"contentTemplate\"></ng-container>\r\n</a>\r\n\r\n<a [routerLink]=\"url\" class=\"{{ classes }}\" *ngIf=\"!external\">\r\n <ng-container *ngTemplateOutlet=\"contentTemplate\"></ng-container>\r\n</a>\r\n\r\n<ng-template #contentTemplate>\r\n <span #ref><ng-content></ng-content></span>\r\n <span *ngIf=\"!ref.innerHTML.trim()\">Sign Up</span>\r\n</ng-template>\r\n" }]
4006
+ }], () => [], { qs: [{
4007
+ type: Input
4008
+ }] }); })();
4009
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SignUpButtonComponent, { className: "SignUpButtonComponent", filePath: "lib\\ui\\components\\identity\\signup-button.component.ts", lineNumber: 28 }); })();
4010
+
4011
+ /*
4012
+ <file>
4013
+ Project:
4014
+ @osovitny/anatoly
4015
+
4016
+ Authors:
4017
+ Vadim Osovitny vadim.osovitny@osovitny.com
4018
+ Anatoly Osovitny anatoly.osovitny@osovitny.com
4019
+
4020
+ Created:
4021
+ 14 Aug 2018
3826
4022
 
3827
4023
  Copyright (c) 2016-2025 Osovitny Inc. All rights reserved.
3828
4024
  </file>
3829
4025
  */
3830
- //consts
4026
+ //Node
4027
+ function BuyAccessButtonComponent_div_0_div_1_Template(rf, ctx) { if (rf & 1) {
4028
+ i0.ɵɵelementStart(0, "div");
4029
+ i0.ɵɵelement(1, "anatoly-signup-button", 1);
4030
+ i0.ɵɵelementEnd();
4031
+ } }
4032
+ function BuyAccessButtonComponent_div_0_div_2_button_1_Template(rf, ctx) { if (rf & 1) {
4033
+ i0.ɵɵelementStart(0, "button", 4);
4034
+ i0.ɵɵtext(1, " Your Plan ");
4035
+ i0.ɵɵelementEnd();
4036
+ } }
4037
+ function BuyAccessButtonComponent_div_0_div_2_button_2_Template(rf, ctx) { if (rf & 1) {
4038
+ const _r6 = i0.ɵɵgetCurrentView();
4039
+ i0.ɵɵelementStart(0, "button", 5);
4040
+ i0.ɵɵlistener("click", function BuyAccessButtonComponent_div_0_div_2_button_2_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r6); const ctx_r5 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r5.onPlanSelect()); });
4041
+ i0.ɵɵtext(1, " Buy Now ");
4042
+ i0.ɵɵelementEnd();
4043
+ } }
4044
+ function BuyAccessButtonComponent_div_0_div_2_Template(rf, ctx) { if (rf & 1) {
4045
+ i0.ɵɵelementStart(0, "div");
4046
+ i0.ɵɵtemplate(1, BuyAccessButtonComponent_div_0_div_2_button_1_Template, 2, 0, "button", 2)(2, BuyAccessButtonComponent_div_0_div_2_button_2_Template, 2, 0, "button", 3);
4047
+ i0.ɵɵelementEnd();
4048
+ } if (rf & 2) {
4049
+ const ctx_r2 = i0.ɵɵnextContext(2);
4050
+ i0.ɵɵadvance();
4051
+ i0.ɵɵproperty("ngIf", ctx_r2.plan == ctx_r2.currentPlan);
4052
+ i0.ɵɵadvance();
4053
+ i0.ɵɵproperty("ngIf", ctx_r2.plan != ctx_r2.currentPlan && ctx_r2.currentPlan == 1);
4054
+ } }
4055
+ function BuyAccessButtonComponent_div_0_Template(rf, ctx) { if (rf & 1) {
4056
+ i0.ɵɵelementStart(0, "div");
4057
+ i0.ɵɵtemplate(1, BuyAccessButtonComponent_div_0_div_1_Template, 2, 0, "div", 0)(2, BuyAccessButtonComponent_div_0_div_2_Template, 3, 2, "div", 0);
4058
+ i0.ɵɵelementEnd();
4059
+ } if (rf & 2) {
4060
+ const ctx_r0 = i0.ɵɵnextContext();
4061
+ i0.ɵɵadvance();
4062
+ i0.ɵɵproperty("ngIf", !ctx_r0.isUserSignedIn);
4063
+ i0.ɵɵadvance();
4064
+ i0.ɵɵproperty("ngIf", ctx_r0.isUserSignedIn && ctx_r0.visibleIfUserSignedIn);
4065
+ } }
4066
+ class BuyAccessButtonComponent {
4067
+ constructor(appContext) {
4068
+ this.appContext = appContext;
4069
+ this.contextUpdated = false;
4070
+ this.isUserSignedIn = false;
4071
+ this.currentPlan = -1;
4072
+ this.currentPlanTitle = '';
4073
+ this.visibleIfUserSignedIn = false;
4074
+ this.planselect = new EventEmitter();
4075
+ }
4076
+ ngOnInit() {
4077
+ this.appContext.updated$.subscribe((context) => {
4078
+ if (!context) {
4079
+ return;
4080
+ }
4081
+ this.isUserSignedIn = context.isUserSignedIn;
4082
+ if (this.isUserSignedIn) {
4083
+ this.currentPlan = context.account.billingPlan;
4084
+ this.currentPlanTitle = context.account.billingPlanAsString;
4085
+ }
4086
+ this.contextUpdated = true;
4087
+ });
4088
+ }
4089
+ //Events
4090
+ onPlanSelect() {
4091
+ this.planselect.emit(this.plan);
4092
+ }
4093
+ static { this.ɵfac = function BuyAccessButtonComponent_Factory(t) { return new (t || BuyAccessButtonComponent)(i0.ɵɵdirectiveInject(AppContextService)); }; }
4094
+ static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: BuyAccessButtonComponent, selectors: [["anatoly-billing-buyaccess-button"]], inputs: { plan: "plan", planTitle: "planTitle", visibleIfUserSignedIn: "visibleIfUserSignedIn" }, outputs: { planselect: "planselect" }, decls: 1, vars: 1, consts: [[4, "ngIf"], ["classes", "btn btn-block btn-primary"], ["class", "btn btn-block btn-success selectPlan", 4, "ngIf"], ["class", "btn btn-block btn-warning selectPlan", 3, "click", 4, "ngIf"], [1, "btn", "btn-block", "btn-success", "selectPlan"], [1, "btn", "btn-block", "btn-warning", "selectPlan", 3, "click"]], template: function BuyAccessButtonComponent_Template(rf, ctx) { if (rf & 1) {
4095
+ i0.ɵɵtemplate(0, BuyAccessButtonComponent_div_0_Template, 3, 2, "div", 0);
4096
+ } if (rf & 2) {
4097
+ i0.ɵɵproperty("ngIf", ctx.contextUpdated);
4098
+ } }, dependencies: [i1$2.NgIf, SignUpButtonComponent], encapsulation: 2 }); }
4099
+ }
4100
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(BuyAccessButtonComponent, [{
4101
+ type: Component,
4102
+ args: [{ selector: 'anatoly-billing-buyaccess-button', template: "<div *ngIf=\"contextUpdated\">\r\n <div *ngIf=\"!isUserSignedIn\">\r\n <anatoly-signup-button classes=\"btn btn-block btn-primary\"></anatoly-signup-button>\r\n </div>\r\n\r\n <div *ngIf=\"isUserSignedIn && visibleIfUserSignedIn\">\r\n <button class=\"btn btn-block btn-success selectPlan\"\r\n *ngIf=\"plan == currentPlan\">\r\n Your Plan\r\n </button>\r\n\r\n <button class=\"btn btn-block btn-warning selectPlan\"\r\n *ngIf=\"plan != currentPlan && currentPlan == 1\"\r\n (click)=\"onPlanSelect()\">\r\n Buy Now\r\n </button>\r\n </div>\r\n</div>\r\n" }]
4103
+ }], () => [{ type: AppContextService }], { plan: [{
4104
+ type: Input
4105
+ }], planTitle: [{
4106
+ type: Input
4107
+ }], visibleIfUserSignedIn: [{
4108
+ type: Input
4109
+ }], planselect: [{
4110
+ type: Output
4111
+ }] }); })();
4112
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(BuyAccessButtonComponent, { className: "BuyAccessButtonComponent", filePath: "lib\\billing\\components\\buttons\\buyaccess-button.component.ts", lineNumber: 27 }); })();
3831
4113
 
3832
4114
  /*
3833
4115
  <file>
@@ -3839,77 +4121,109 @@ class Utils {
3839
4121
  Anatoly Osovitny anatoly.osovitny@osovitny.com
3840
4122
 
3841
4123
  Created:
3842
- 28 Aug 2018
4124
+ 1 Jun 2018
3843
4125
 
3844
4126
  Copyright (c) 2016-2025 Osovitny Inc. All rights reserved.
3845
4127
  </file>
3846
4128
  */
3847
4129
  //Node
3848
- class ComponentBase {
3849
- constructor() {
3850
- this.isDevMode = false;
3851
- this.subs = new Subs();
3852
- //Component Data => usually loading from API
3853
- this.dataLoading = true;
3854
- this.dataLoaded = false;
3855
- this.dataFound = false;
3856
- this.applicationOneUrl = '/';
3857
- this.title = '';
3858
- this.isTitleVisible = true;
3859
- this.isRequired = false;
3860
- this.isDevMode = IsDevMode;
3861
- this.applicationType = 1;
3862
- this.applicationRoot = '/';
3863
- if (AppSettings) {
3864
- this.applicationType = AppSettings.id;
3865
- if (AppSettings.root != '/') {
3866
- this.applicationRoot = AppSettings.root;
3867
- }
3868
- let applicationOne = getAppSettingsById(1);
3869
- if (applicationOne) {
3870
- this.applicationOneUrl = applicationOne.baseUrl + applicationOne.root;
3871
- }
3872
- }
4130
+ function SubscribePlanButtonComponent_div_0_div_1_Template(rf, ctx) { if (rf & 1) {
4131
+ i0.ɵɵelementStart(0, "div");
4132
+ i0.ɵɵelement(1, "anatoly-signup-button", 1);
4133
+ i0.ɵɵelementEnd();
4134
+ } }
4135
+ function SubscribePlanButtonComponent_div_0_div_2_button_1_Template(rf, ctx) { if (rf & 1) {
4136
+ i0.ɵɵelementStart(0, "button", 5);
4137
+ i0.ɵɵtext(1, " Your Plan ");
4138
+ i0.ɵɵelementEnd();
4139
+ } }
4140
+ function SubscribePlanButtonComponent_div_0_div_2_button_2_Template(rf, ctx) { if (rf & 1) {
4141
+ i0.ɵɵelementStart(0, "button", 6);
4142
+ i0.ɵɵtext(1, " Requested ");
4143
+ i0.ɵɵelementEnd();
4144
+ } }
4145
+ function SubscribePlanButtonComponent_div_0_div_2_button_3_Template(rf, ctx) { if (rf & 1) {
4146
+ const _r7 = i0.ɵɵgetCurrentView();
4147
+ i0.ɵɵelementStart(0, "button", 7);
4148
+ i0.ɵɵlistener("click", function SubscribePlanButtonComponent_div_0_div_2_button_3_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r7); const ctx_r6 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r6.onPlanSelect()); });
4149
+ i0.ɵɵtext(1, " Subscribe ");
4150
+ i0.ɵɵelementEnd();
4151
+ } }
4152
+ function SubscribePlanButtonComponent_div_0_div_2_Template(rf, ctx) { if (rf & 1) {
4153
+ i0.ɵɵelementStart(0, "div");
4154
+ i0.ɵɵtemplate(1, SubscribePlanButtonComponent_div_0_div_2_button_1_Template, 2, 0, "button", 2)(2, SubscribePlanButtonComponent_div_0_div_2_button_2_Template, 2, 0, "button", 3)(3, SubscribePlanButtonComponent_div_0_div_2_button_3_Template, 2, 0, "button", 4);
4155
+ i0.ɵɵelementEnd();
4156
+ } if (rf & 2) {
4157
+ const ctx_r2 = i0.ɵɵnextContext(2);
4158
+ i0.ɵɵadvance();
4159
+ i0.ɵɵproperty("ngIf", ctx_r2.plan == ctx_r2.currentPlan);
4160
+ i0.ɵɵadvance();
4161
+ i0.ɵɵproperty("ngIf", ctx_r2.plan == ctx_r2.requestedPlan);
4162
+ i0.ɵɵadvance();
4163
+ i0.ɵɵproperty("ngIf", ctx_r2.plan != ctx_r2.currentPlan && ctx_r2.plan != ctx_r2.requestedPlan);
4164
+ } }
4165
+ function SubscribePlanButtonComponent_div_0_Template(rf, ctx) { if (rf & 1) {
4166
+ i0.ɵɵelementStart(0, "div");
4167
+ i0.ɵɵtemplate(1, SubscribePlanButtonComponent_div_0_div_1_Template, 2, 0, "div", 0)(2, SubscribePlanButtonComponent_div_0_div_2_Template, 4, 3, "div", 0);
4168
+ i0.ɵɵelementEnd();
4169
+ } if (rf & 2) {
4170
+ const ctx_r0 = i0.ɵɵnextContext();
4171
+ i0.ɵɵadvance();
4172
+ i0.ɵɵproperty("ngIf", !ctx_r0.isUserSignedIn);
4173
+ i0.ɵɵadvance();
4174
+ i0.ɵɵproperty("ngIf", ctx_r0.isUserSignedIn && ctx_r0.visibleIfUserSignedIn);
4175
+ } }
4176
+ class SubscribePlanButtonComponent {
4177
+ constructor(appContext) {
4178
+ this.appContext = appContext;
4179
+ this.contextUpdated = false;
4180
+ this.isUserSignedIn = false;
4181
+ this.currentPlan = -1;
4182
+ this.currentPlanTitle = "";
4183
+ this.requestedPlan = -1;
4184
+ this.requestedPlanTitle = "";
4185
+ this.visibleIfUserSignedIn = false;
4186
+ this.planselect = new EventEmitter();
3873
4187
  }
3874
4188
  ngOnInit() {
4189
+ this.appContext.updated$.subscribe((context) => {
4190
+ if (!context) {
4191
+ return;
4192
+ }
4193
+ this.isUserSignedIn = context.isUserSignedIn;
4194
+ if (this.isUserSignedIn) {
4195
+ this.currentPlan = context.account.billingPlan;
4196
+ this.currentPlanTitle = context.account.billingPlanAsString;
4197
+ this.requestedPlan = context.account.requestedBillingPlan;
4198
+ this.requestedPlanTitle = context.account.requestedBillingPlanAsString;
4199
+ }
4200
+ this.contextUpdated = true;
4201
+ });
3875
4202
  }
3876
- ngOnDestroy() {
3877
- this.subs.unsubscribe();
3878
- }
3879
- getEntityId() {
3880
- return QSUtils.getValueByName("id");
3881
- }
3882
- dataStartedLoading() {
3883
- this.dataLoading = true;
3884
- this.dataLoaded = false;
3885
- this.dataFound = false;
3886
- }
3887
- dataLoadedAndNothingFound() {
3888
- this.dataLoadedAndFound(false);
3889
- }
3890
- dataLoadedAndFound(found = true) {
3891
- this.dataLoading = false;
3892
- this.dataLoaded = true;
3893
- this.dataFound = found;
4203
+ //Events
4204
+ onPlanSelect() {
4205
+ this.planselect.emit(this.plan);
3894
4206
  }
3895
- static { this.ɵfac = function ComponentBase_Factory(t) { return new (t || ComponentBase)(); }; }
3896
- static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ComponentBase, selectors: [["ng-component"]], inputs: { classes: "classes", title: "title", isTitleVisible: "isTitleVisible", isRequired: "isRequired" }, decls: 0, vars: 0, template: function ComponentBase_Template(rf, ctx) { }, encapsulation: 2 }); }
4207
+ static { this.ɵfac = function SubscribePlanButtonComponent_Factory(t) { return new (t || SubscribePlanButtonComponent)(i0.ɵɵdirectiveInject(AppContextService)); }; }
4208
+ static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SubscribePlanButtonComponent, selectors: [["anatoly-billing-subscribe-plan-button"]], inputs: { plan: "plan", planTitle: "planTitle", visibleIfUserSignedIn: "visibleIfUserSignedIn" }, outputs: { planselect: "planselect" }, decls: 1, vars: 1, consts: [[4, "ngIf"], ["classes", "btn btn-block btn-primary"], ["class", "btn btn-block btn-success selectPlan", 4, "ngIf"], ["class", "btn btn-block btn-warning selectPlan", 4, "ngIf"], ["class", "btn btn-block btn-warning selectPlan", 3, "click", 4, "ngIf"], [1, "btn", "btn-block", "btn-success", "selectPlan"], [1, "btn", "btn-block", "btn-warning", "selectPlan"], [1, "btn", "btn-block", "btn-warning", "selectPlan", 3, "click"]], template: function SubscribePlanButtonComponent_Template(rf, ctx) { if (rf & 1) {
4209
+ i0.ɵɵtemplate(0, SubscribePlanButtonComponent_div_0_Template, 3, 2, "div", 0);
4210
+ } if (rf & 2) {
4211
+ i0.ɵɵproperty("ngIf", ctx.contextUpdated);
4212
+ } }, dependencies: [i1$2.NgIf, SignUpButtonComponent], encapsulation: 2 }); }
3897
4213
  }
3898
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ComponentBase, [{
4214
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SubscribePlanButtonComponent, [{
3899
4215
  type: Component,
3900
- args: [{
3901
- template: ''
3902
- }]
3903
- }], () => [], { classes: [{
3904
- type: Input
3905
- }], title: [{
4216
+ args: [{ selector: "anatoly-billing-subscribe-plan-button", template: "<div *ngIf=\"contextUpdated\">\r\n <div *ngIf=\"!isUserSignedIn\">\r\n <anatoly-signup-button classes=\"btn btn-block btn-primary\"></anatoly-signup-button>\r\n </div>\r\n\r\n <div *ngIf=\"isUserSignedIn && visibleIfUserSignedIn\">\r\n <button class=\"btn btn-block btn-success selectPlan\"\r\n *ngIf=\"plan == currentPlan\">\r\n Your Plan\r\n </button>\r\n\r\n <button class=\"btn btn-block btn-warning selectPlan\"\r\n *ngIf=\"plan == requestedPlan\">\r\n Requested\r\n </button>\r\n\r\n <button class=\"btn btn-block btn-warning selectPlan\"\r\n *ngIf=\"plan != currentPlan && plan != requestedPlan\"\r\n (click)=\"onPlanSelect()\">\r\n Subscribe\r\n </button>\r\n </div>\r\n</div>\r\n" }]
4217
+ }], () => [{ type: AppContextService }], { plan: [{
3906
4218
  type: Input
3907
- }], isTitleVisible: [{
4219
+ }], planTitle: [{
3908
4220
  type: Input
3909
- }], isRequired: [{
4221
+ }], visibleIfUserSignedIn: [{
3910
4222
  type: Input
4223
+ }], planselect: [{
4224
+ type: Output
3911
4225
  }] }); })();
3912
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ComponentBase, { className: "ComponentBase", filePath: "lib\\ui\\components\\base\\components\\component.ts", lineNumber: 26 }); })();
4226
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SubscribePlanButtonComponent, { className: "SubscribePlanButtonComponent", filePath: "lib\\billing\\components\\buttons\\subscribe-plan-button.component.ts", lineNumber: 27 }); })();
3913
4227
 
3914
4228
  /*
3915
4229
  <file>
@@ -3965,12 +4279,12 @@ class PaymentsApiService extends ApiServiceBase {
3965
4279
  }
3966
4280
  });
3967
4281
  }
3968
- static { this.ɵfac = function PaymentsApiService_Factory(t) { return new (t || PaymentsApiService)(i0.ɵɵinject(i1$1.HttpClient)); }; }
4282
+ static { this.ɵfac = function PaymentsApiService_Factory(t) { return new (t || PaymentsApiService)(i0.ɵɵinject(i1.HttpClient)); }; }
3969
4283
  static { this.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: PaymentsApiService, factory: PaymentsApiService.ɵfac }); }
3970
4284
  }
3971
4285
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PaymentsApiService, [{
3972
4286
  type: Injectable
3973
- }], () => [{ type: i1$1.HttpClient }], null); })();
4287
+ }], () => [{ type: i1.HttpClient }], null); })();
3974
4288
 
3975
4289
  /*
3976
4290
  <file>
@@ -4160,12 +4474,12 @@ class DiscountCodesApiService extends ApiServiceBase {
4160
4474
  getDiscountCode(code) {
4161
4475
  return this.get('getDiscountCode', { code });
4162
4476
  }
4163
- static { this.ɵfac = function DiscountCodesApiService_Factory(t) { return new (t || DiscountCodesApiService)(i0.ɵɵinject(i1$1.HttpClient)); }; }
4477
+ static { this.ɵfac = function DiscountCodesApiService_Factory(t) { return new (t || DiscountCodesApiService)(i0.ɵɵinject(i1.HttpClient)); }; }
4164
4478
  static { this.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: DiscountCodesApiService, factory: DiscountCodesApiService.ɵfac }); }
4165
4479
  }
4166
4480
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(DiscountCodesApiService, [{
4167
4481
  type: Injectable
4168
- }], () => [{ type: i1$1.HttpClient }], null); })();
4482
+ }], () => [{ type: i1.HttpClient }], null); })();
4169
4483
 
4170
4484
  /*
4171
4485
  <file>
@@ -4850,7 +5164,7 @@ class BraintreeDialog extends DialogBase {
4850
5164
  }], image: [{
4851
5165
  type: Input
4852
5166
  }] }); })();
4853
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(BraintreeDialog, { className: "BraintreeDialog", filePath: "lib\\billing\\components\\braintree\\braintree.component.ts", lineNumber: 32 }); })();
5167
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(BraintreeDialog, { className: "BraintreeDialog", filePath: "lib\\billing\\components\\pm\\braintree\\braintree.component.ts", lineNumber: 32 }); })();
4854
5168
 
4855
5169
  /*
4856
5170
  <file>
@@ -5243,7 +5557,7 @@ class PayPalComponent {
5243
5557
  type: ViewChild,
5244
5558
  args: ["payPalButtonContainer", { static: false }]
5245
5559
  }] }); })();
5246
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(PayPalComponent, { className: "PayPalComponent", filePath: "lib\\billing\\components\\paypal\\paypal.component.ts", lineNumber: 57 }); })();
5560
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(PayPalComponent, { className: "PayPalComponent", filePath: "lib\\billing\\components\\pm\\paypal\\paypal.component.ts", lineNumber: 57 }); })();
5247
5561
 
5248
5562
  /*
5249
5563
  <file>
@@ -5392,7 +5706,7 @@ class PaypalButtonComponent extends ComponentBase {
5392
5706
  }], paidFor: [{
5393
5707
  type: Input
5394
5708
  }] }); })();
5395
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(PaypalButtonComponent, { className: "PaypalButtonComponent", filePath: "lib\\billing\\components\\paypal\\paypal-button.component.ts", lineNumber: 42 }); })();
5709
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(PaypalButtonComponent, { className: "PaypalButtonComponent", filePath: "lib\\billing\\components\\pm\\paypal\\paypal-button.component.ts", lineNumber: 42 }); })();
5396
5710
 
5397
5711
  /*
5398
5712
  <file>
@@ -5492,7 +5806,7 @@ class StripeDialog extends DialogBase {
5492
5806
  }], image: [{
5493
5807
  type: Input
5494
5808
  }] }); })();
5495
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(StripeDialog, { className: "StripeDialog", filePath: "lib\\billing\\components\\stripe\\stripe.component.ts", lineNumber: 33 }); })();
5809
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(StripeDialog, { className: "StripeDialog", filePath: "lib\\billing\\components\\pm\\stripe\\stripe.component.ts", lineNumber: 33 }); })();
5496
5810
 
5497
5811
  /*
5498
5812
  <file>
@@ -5600,12 +5914,12 @@ class GridReadServiceBase extends BehaviorSubject {
5600
5914
  }
5601
5915
  });
5602
5916
  }
5603
- static { this.ɵfac = function GridReadServiceBase_Factory(t) { return new (t || GridReadServiceBase)(i0.ɵɵinject(i1$1.HttpClient)); }; }
5917
+ static { this.ɵfac = function GridReadServiceBase_Factory(t) { return new (t || GridReadServiceBase)(i0.ɵɵinject(i1.HttpClient)); }; }
5604
5918
  static { this.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: GridReadServiceBase, factory: GridReadServiceBase.ɵfac }); }
5605
5919
  }
5606
5920
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(GridReadServiceBase, [{
5607
5921
  type: Injectable
5608
- }], () => [{ type: i1$1.HttpClient }], null); })();
5922
+ }], () => [{ type: i1.HttpClient }], null); })();
5609
5923
 
5610
5924
  /*
5611
5925
  <file>
@@ -5674,12 +5988,12 @@ class GridEditServiceBase extends GridReadServiceBase {
5674
5988
  const url = `${this.baseUrl}/${action}${this.serializeParams(data)}`;
5675
5989
  return this.http.post(url, data).pipe(map(res => res));
5676
5990
  }
5677
- static { this.ɵfac = function GridEditServiceBase_Factory(t) { return new (t || GridEditServiceBase)(i0.ɵɵinject(i1$1.HttpClient)); }; }
5991
+ static { this.ɵfac = function GridEditServiceBase_Factory(t) { return new (t || GridEditServiceBase)(i0.ɵɵinject(i1.HttpClient)); }; }
5678
5992
  static { this.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: GridEditServiceBase, factory: GridEditServiceBase.ɵfac }); }
5679
5993
  }
5680
5994
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(GridEditServiceBase, [{
5681
5995
  type: Injectable
5682
- }], () => [{ type: i1$1.HttpClient }], null); })();
5996
+ }], () => [{ type: i1.HttpClient }], null); })();
5683
5997
 
5684
5998
  /*
5685
5999
  <file>
@@ -5709,12 +6023,12 @@ class CurrenciesApiService extends ApiServiceBase {
5709
6023
  getRates() {
5710
6024
  return this.get('getRates');
5711
6025
  }
5712
- static { this.ɵfac = function CurrenciesApiService_Factory(t) { return new (t || CurrenciesApiService)(i0.ɵɵinject(i1$1.HttpClient)); }; }
6026
+ static { this.ɵfac = function CurrenciesApiService_Factory(t) { return new (t || CurrenciesApiService)(i0.ɵɵinject(i1.HttpClient)); }; }
5713
6027
  static { this.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: CurrenciesApiService, factory: CurrenciesApiService.ɵfac }); }
5714
6028
  }
5715
6029
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CurrenciesApiService, [{
5716
6030
  type: Injectable
5717
- }], () => [{ type: i1$1.HttpClient }], null); })();
6031
+ }], () => [{ type: i1.HttpClient }], null); })();
5718
6032
 
5719
6033
  /*
5720
6034
  <file>
@@ -5839,12 +6153,12 @@ class SubscriptionsApiService extends ApiServiceBase {
5839
6153
  }
5840
6154
  });
5841
6155
  }
5842
- static { this.ɵfac = function SubscriptionsApiService_Factory(t) { return new (t || SubscriptionsApiService)(i0.ɵɵinject(i1$1.HttpClient)); }; }
6156
+ static { this.ɵfac = function SubscriptionsApiService_Factory(t) { return new (t || SubscriptionsApiService)(i0.ɵɵinject(i1.HttpClient)); }; }
5843
6157
  static { this.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: SubscriptionsApiService, factory: SubscriptionsApiService.ɵfac }); }
5844
6158
  }
5845
6159
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SubscriptionsApiService, [{
5846
6160
  type: Injectable
5847
- }], () => [{ type: i1$1.HttpClient }], null); })();
6161
+ }], () => [{ type: i1.HttpClient }], null); })();
5848
6162
 
5849
6163
  /*
5850
6164
  <file>
@@ -5876,12 +6190,12 @@ class TransactionsApiService extends ApiServiceBase {
5876
6190
  getTransactions(data) {
5877
6191
  return this.get('getTransactions', data);
5878
6192
  }
5879
- static { this.ɵfac = function TransactionsApiService_Factory(t) { return new (t || TransactionsApiService)(i0.ɵɵinject(i1$1.HttpClient)); }; }
6193
+ static { this.ɵfac = function TransactionsApiService_Factory(t) { return new (t || TransactionsApiService)(i0.ɵɵinject(i1.HttpClient)); }; }
5880
6194
  static { this.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: TransactionsApiService, factory: TransactionsApiService.ɵfac }); }
5881
6195
  }
5882
6196
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(TransactionsApiService, [{
5883
6197
  type: Injectable
5884
- }], () => [{ type: i1$1.HttpClient }], null); })();
6198
+ }], () => [{ type: i1.HttpClient }], null); })();
5885
6199
 
5886
6200
  /*
5887
6201
  <file>
@@ -5914,12 +6228,12 @@ class CoreApiService extends ApiServiceBase {
5914
6228
  getUSStatesJsonFile() {
5915
6229
  return this.getExternalJsonFile('anatoly', 'usStates.json');
5916
6230
  }
5917
- static { this.ɵfac = function CoreApiService_Factory(t) { return new (t || CoreApiService)(i0.ɵɵinject(i1$1.HttpClient)); }; }
6231
+ static { this.ɵfac = function CoreApiService_Factory(t) { return new (t || CoreApiService)(i0.ɵɵinject(i1.HttpClient)); }; }
5918
6232
  static { this.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: CoreApiService, factory: CoreApiService.ɵfac }); }
5919
6233
  }
5920
6234
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CoreApiService, [{
5921
6235
  type: Injectable
5922
- }], () => [{ type: i1$1.HttpClient }], null); })();
6236
+ }], () => [{ type: i1.HttpClient }], null); })();
5923
6237
 
5924
6238
  /*
5925
6239
  <file>
@@ -5955,12 +6269,12 @@ class EmailsApiService extends ApiServiceBase {
5955
6269
  }
5956
6270
  });
5957
6271
  }
5958
- static { this.ɵfac = function EmailsApiService_Factory(t) { return new (t || EmailsApiService)(i0.ɵɵinject(i1$1.HttpClient)); }; }
6272
+ static { this.ɵfac = function EmailsApiService_Factory(t) { return new (t || EmailsApiService)(i0.ɵɵinject(i1.HttpClient)); }; }
5959
6273
  static { this.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: EmailsApiService, factory: EmailsApiService.ɵfac }); }
5960
6274
  }
5961
6275
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(EmailsApiService, [{
5962
6276
  type: Injectable
5963
- }], () => [{ type: i1$1.HttpClient }], null); })();
6277
+ }], () => [{ type: i1.HttpClient }], null); })();
5964
6278
 
5965
6279
  /*
5966
6280
  <file>
@@ -6115,268 +6429,11 @@ class EditPageBase extends EditComponentBase {
6115
6429
  }
6116
6430
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(EditPageBase, [{
6117
6431
  type: Component,
6118
- args: [{
6119
- template: ''
6120
- }]
6121
- }], null, null); })();
6122
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(EditPageBase, { className: "EditPageBase", filePath: "lib\\ui\\components\\base\\pages\\edit.page.ts", lineNumber: 26 }); })();
6123
-
6124
- /*
6125
- <file>
6126
- Project:
6127
- @osovitny/anatoly
6128
-
6129
- Authors:
6130
- Vadim Osovitny vadim.osovitny@osovitny.com
6131
- Anatoly Osovitny anatoly.osovitny@osovitny.com
6132
-
6133
- Created:
6134
- 20 Aug 2022
6135
-
6136
- Copyright (c) 2016-2025 Osovitny Inc. All rights reserved.
6137
- </file>
6138
- */
6139
- //Node
6140
- class PagedPageBase extends PageBase {
6141
- constructor() {
6142
- super(...arguments);
6143
- this.currentFilter = null;
6144
- this.totalItems = 0;
6145
- this.pageSize = 10;
6146
- this.skipItems = 0;
6147
- this.currentPage = 1;
6148
- }
6149
- loadPageOne() {
6150
- this.skipItems = 0;
6151
- this.currentPage = 1;
6152
- this.loadPage();
6153
- }
6154
- reloadPage(drop2pageOne = false) {
6155
- if (drop2pageOne) {
6156
- this.loadPageOne();
6157
- }
6158
- else {
6159
- this.loadPage();
6160
- }
6161
- }
6162
- setFilter(filter) {
6163
- this.currentFilter = filter;
6164
- this.loadPageOne();
6165
- }
6166
- //Tos
6167
- toIndex(index) {
6168
- return ((this.currentPage - 1) * this.pageSize) + index + 1;
6169
- }
6170
- //Events
6171
- onPageChange(e) {
6172
- this.pageSize = e.take;
6173
- this.skipItems = e.skip;
6174
- this.currentPage = (this.skipItems / this.pageSize) + 1;
6175
- this.loadPage();
6176
- }
6177
- static { this.ɵfac = /*@__PURE__*/ (() => { let ɵPagedPageBase_BaseFactory; return function PagedPageBase_Factory(t) { return (ɵPagedPageBase_BaseFactory || (ɵPagedPageBase_BaseFactory = i0.ɵɵgetInheritedFactory(PagedPageBase)))(t || PagedPageBase); }; })(); }
6178
- static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: PagedPageBase, selectors: [["ng-component"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 0, vars: 0, template: function PagedPageBase_Template(rf, ctx) { }, encapsulation: 2 }); }
6179
- }
6180
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PagedPageBase, [{
6181
- type: Component,
6182
- args: [{
6183
- template: ''
6184
- }]
6185
- }], null, null); })();
6186
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(PagedPageBase, { className: "PagedPageBase", filePath: "lib\\ui\\components\\base\\pages\\paged.page.ts", lineNumber: 26 }); })();
6187
-
6188
- /*
6189
- <file>
6190
- Project:
6191
- @osovitny/anatoly
6192
-
6193
- Authors:
6194
- Vadim Osovitny vadim.osovitny@osovitny.com
6195
- Anatoly Osovitny anatoly.osovitny@osovitny.com
6196
-
6197
- Created:
6198
- 20 Aug 2022
6199
-
6200
- Copyright (c) 2016-2025 Osovitny Inc. All rights reserved.
6201
- </file>
6202
- */
6203
- //Node
6204
- class ListBase extends ComponentBase {
6205
- constructor() {
6206
- super(...arguments);
6207
- this.currentFilter = null;
6208
- this.dataLoaded = false;
6209
- this.totalItems = 0;
6210
- this.skipItems = 0;
6211
- this.currentPage = 1;
6212
- //Inputs
6213
- this.pageSize = 10;
6214
- this.autoDataLoading = false;
6215
- //Outputs
6216
- this.filterRequest = new EventEmitter();
6217
- this.dataChange = new EventEmitter();
6218
- }
6219
- ngOnInit() {
6220
- this.init();
6221
- }
6222
- init() {
6223
- if (this.autoDataLoading && !this.dataLoaded) {
6224
- this.loadPageOne();
6225
- }
6226
- else {
6227
- this.fireFilterRequest();
6228
- }
6229
- }
6230
- fireFilterRequest() {
6231
- this.filterRequest.emit();
6232
- }
6233
- fireDataChange(e = null) {
6234
- this.dataChange.emit(e);
6235
- }
6236
- loadPageOne() {
6237
- this.skipItems = 0;
6238
- this.currentPage = 1;
6239
- this.dataLoaded = true;
6240
- this.loadPage();
6241
- }
6242
- reloadPage(drop2pageOne = false) {
6243
- if (drop2pageOne) {
6244
- this.loadPageOne();
6245
- }
6246
- else {
6247
- this.loadPage();
6248
- }
6249
- }
6250
- setFilter(filter) {
6251
- this.currentFilter = filter;
6252
- this.loadPageOne();
6253
- }
6254
- //Tos
6255
- toIndex(index) {
6256
- return ((this.currentPage - 1) * this.pageSize) + index + 1;
6257
- }
6258
- //Events
6259
- onPageChange(e) {
6260
- this.pageSize = e.take;
6261
- this.skipItems = e.skip;
6262
- this.currentPage = (this.skipItems / this.pageSize) + 1;
6263
- this.loadPage();
6264
- }
6265
- static { this.ɵfac = /*@__PURE__*/ (() => { let ɵListBase_BaseFactory; return function ListBase_Factory(t) { return (ɵListBase_BaseFactory || (ɵListBase_BaseFactory = i0.ɵɵgetInheritedFactory(ListBase)))(t || ListBase); }; })(); }
6266
- static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ListBase, selectors: [["ng-component"]], inputs: { pageSize: "pageSize", autoDataLoading: "autoDataLoading" }, outputs: { filterRequest: "filterRequest", dataChange: "dataChange" }, features: [i0.ɵɵInheritDefinitionFeature], decls: 0, vars: 0, template: function ListBase_Template(rf, ctx) { }, encapsulation: 2 }); }
6267
- }
6268
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ListBase, [{
6269
- type: Component,
6270
- args: [{
6271
- template: ''
6272
- }]
6273
- }], null, { pageSize: [{
6274
- type: Input
6275
- }], autoDataLoading: [{
6276
- type: Input
6277
- }], filterRequest: [{
6278
- type: Output
6279
- }], dataChange: [{
6280
- type: Output
6281
- }] }); })();
6282
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ListBase, { className: "ListBase", filePath: "lib\\ui\\components\\base\\list.ts", lineNumber: 26 }); })();
6283
-
6284
- /*
6285
- <file>
6286
- Project:
6287
- @osovitny/anatoly
6288
-
6289
- Authors:
6290
- Vadim Osovitny vadim.osovitny@osovitny.com
6291
- Anatoly Osovitny anatoly.osovitny@osovitny.com
6292
-
6293
- Created:
6294
- 4 Jul 2018
6295
-
6296
- Copyright (c) 2016-2025 Osovitny Inc. All rights reserved.
6297
- </file>
6298
- */
6299
- //Node
6300
- function SignUpButtonComponent_a_0_ng_container_1_Template(rf, ctx) { if (rf & 1) {
6301
- i0.ɵɵelementContainer(0);
6302
- } }
6303
- function SignUpButtonComponent_a_0_Template(rf, ctx) { if (rf & 1) {
6304
- i0.ɵɵelementStart(0, "a", 3);
6305
- i0.ɵɵtemplate(1, SignUpButtonComponent_a_0_ng_container_1_Template, 1, 0, "ng-container", 4);
6306
- i0.ɵɵelementEnd();
6307
- } if (rf & 2) {
6308
- const ctx_r0 = i0.ɵɵnextContext();
6309
- const _r3 = i0.ɵɵreference(3);
6310
- i0.ɵɵclassMap(ctx_r0.classes);
6311
- i0.ɵɵproperty("href", ctx_r0.url, i0.ɵɵsanitizeUrl);
6312
- i0.ɵɵadvance();
6313
- i0.ɵɵproperty("ngTemplateOutlet", _r3);
6314
- } }
6315
- function SignUpButtonComponent_a_1_ng_container_1_Template(rf, ctx) { if (rf & 1) {
6316
- i0.ɵɵelementContainer(0);
6317
- } }
6318
- function SignUpButtonComponent_a_1_Template(rf, ctx) { if (rf & 1) {
6319
- i0.ɵɵelementStart(0, "a", 5);
6320
- i0.ɵɵtemplate(1, SignUpButtonComponent_a_1_ng_container_1_Template, 1, 0, "ng-container", 4);
6321
- i0.ɵɵelementEnd();
6322
- } if (rf & 2) {
6323
- const ctx_r1 = i0.ɵɵnextContext();
6324
- const _r3 = i0.ɵɵreference(3);
6325
- i0.ɵɵclassMap(ctx_r1.classes);
6326
- i0.ɵɵproperty("routerLink", ctx_r1.url);
6327
- i0.ɵɵadvance();
6328
- i0.ɵɵproperty("ngTemplateOutlet", _r3);
6329
- } }
6330
- function SignUpButtonComponent_ng_template_2_span_3_Template(rf, ctx) { if (rf & 1) {
6331
- i0.ɵɵelementStart(0, "span");
6332
- i0.ɵɵtext(1, "Sign Up");
6333
- i0.ɵɵelementEnd();
6334
- } }
6335
- function SignUpButtonComponent_ng_template_2_Template(rf, ctx) { if (rf & 1) {
6336
- i0.ɵɵelementStart(0, "span", null, 6);
6337
- i0.ɵɵprojection(2);
6338
- i0.ɵɵelementEnd();
6339
- i0.ɵɵtemplate(3, SignUpButtonComponent_ng_template_2_span_3_Template, 2, 0, "span", 7);
6340
- } if (rf & 2) {
6341
- const _r6 = i0.ɵɵreference(1);
6342
- i0.ɵɵadvance(3);
6343
- i0.ɵɵproperty("ngIf", !_r6.innerHTML.trim());
6344
- } }
6345
- const _c0$d = ["*"];
6346
- class SignUpButtonComponent extends ComponentBase {
6347
- constructor() {
6348
- super();
6349
- this.external = false;
6350
- }
6351
- ngOnInit() {
6352
- let url = MSALConfig.ui.signup;
6353
- if (url) {
6354
- this.external = url.indexOf('http') > -1;
6355
- if (this.external) {
6356
- this.url = url + (this.qs ? '?' + this.qs : '');
6357
- }
6358
- else {
6359
- this.url = url;
6360
- }
6361
- }
6362
- }
6363
- static { this.ɵfac = function SignUpButtonComponent_Factory(t) { return new (t || SignUpButtonComponent)(); }; }
6364
- static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SignUpButtonComponent, selectors: [["anatoly-signup-button"]], inputs: { qs: "qs" }, features: [i0.ɵɵInheritDefinitionFeature], ngContentSelectors: _c0$d, decls: 4, vars: 2, consts: [[3, "href", "class", 4, "ngIf"], [3, "routerLink", "class", 4, "ngIf"], ["contentTemplate", ""], [3, "href"], [4, "ngTemplateOutlet"], [3, "routerLink"], ["ref", ""], [4, "ngIf"]], template: function SignUpButtonComponent_Template(rf, ctx) { if (rf & 1) {
6365
- i0.ɵɵprojectionDef();
6366
- i0.ɵɵtemplate(0, SignUpButtonComponent_a_0_Template, 2, 5, "a", 0)(1, SignUpButtonComponent_a_1_Template, 2, 5, "a", 1)(2, SignUpButtonComponent_ng_template_2_Template, 4, 1, "ng-template", null, 2, i0.ɵɵtemplateRefExtractor);
6367
- } if (rf & 2) {
6368
- i0.ɵɵproperty("ngIf", ctx.external);
6369
- i0.ɵɵadvance();
6370
- i0.ɵɵproperty("ngIf", !ctx.external);
6371
- } }, dependencies: [i1$2.NgIf, i1$2.NgTemplateOutlet, i1.RouterLink], encapsulation: 2 }); }
6372
- }
6373
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SignUpButtonComponent, [{
6374
- type: Component,
6375
- args: [{ selector: "anatoly-signup-button", template: "<a [href]=\"url\" class=\"{{ classes }}\" *ngIf=\"external\">\r\n <ng-container *ngTemplateOutlet=\"contentTemplate\"></ng-container>\r\n</a>\r\n\r\n<a [routerLink]=\"url\" class=\"{{ classes }}\" *ngIf=\"!external\">\r\n <ng-container *ngTemplateOutlet=\"contentTemplate\"></ng-container>\r\n</a>\r\n\r\n<ng-template #contentTemplate>\r\n <span #ref><ng-content></ng-content></span>\r\n <span *ngIf=\"!ref.innerHTML.trim()\">Sign Up</span>\r\n</ng-template>\r\n" }]
6376
- }], () => [], { qs: [{
6377
- type: Input
6378
- }] }); })();
6379
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SignUpButtonComponent, { className: "SignUpButtonComponent", filePath: "lib\\ui\\components\\identity\\signup-button.component.ts", lineNumber: 28 }); })();
6432
+ args: [{
6433
+ template: ''
6434
+ }]
6435
+ }], null, null); })();
6436
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(EditPageBase, { className: "EditPageBase", filePath: "lib\\ui\\components\\base\\pages\\edit.page.ts", lineNumber: 26 }); })();
6380
6437
 
6381
6438
  /*
6382
6439
  <file>
@@ -6388,98 +6445,59 @@ class SignUpButtonComponent extends ComponentBase {
6388
6445
  Anatoly Osovitny anatoly.osovitny@osovitny.com
6389
6446
 
6390
6447
  Created:
6391
- 14 Aug 2018
6448
+ 20 Aug 2022
6392
6449
 
6393
6450
  Copyright (c) 2016-2025 Osovitny Inc. All rights reserved.
6394
6451
  </file>
6395
6452
  */
6396
6453
  //Node
6397
- function BuyAccessButtonComponent_div_0_div_1_Template(rf, ctx) { if (rf & 1) {
6398
- i0.ɵɵelementStart(0, "div");
6399
- i0.ɵɵelement(1, "anatoly-signup-button", 1);
6400
- i0.ɵɵelementEnd();
6401
- } }
6402
- function BuyAccessButtonComponent_div_0_div_2_button_1_Template(rf, ctx) { if (rf & 1) {
6403
- i0.ɵɵelementStart(0, "button", 4);
6404
- i0.ɵɵtext(1, " Your Plan ");
6405
- i0.ɵɵelementEnd();
6406
- } }
6407
- function BuyAccessButtonComponent_div_0_div_2_button_2_Template(rf, ctx) { if (rf & 1) {
6408
- const _r6 = i0.ɵɵgetCurrentView();
6409
- i0.ɵɵelementStart(0, "button", 5);
6410
- i0.ɵɵlistener("click", function BuyAccessButtonComponent_div_0_div_2_button_2_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r6); const ctx_r5 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r5.onPlanSelect()); });
6411
- i0.ɵɵtext(1, " Buy Now ");
6412
- i0.ɵɵelementEnd();
6413
- } }
6414
- function BuyAccessButtonComponent_div_0_div_2_Template(rf, ctx) { if (rf & 1) {
6415
- i0.ɵɵelementStart(0, "div");
6416
- i0.ɵɵtemplate(1, BuyAccessButtonComponent_div_0_div_2_button_1_Template, 2, 0, "button", 2)(2, BuyAccessButtonComponent_div_0_div_2_button_2_Template, 2, 0, "button", 3);
6417
- i0.ɵɵelementEnd();
6418
- } if (rf & 2) {
6419
- const ctx_r2 = i0.ɵɵnextContext(2);
6420
- i0.ɵɵadvance();
6421
- i0.ɵɵproperty("ngIf", ctx_r2.plan == ctx_r2.currentPlan);
6422
- i0.ɵɵadvance();
6423
- i0.ɵɵproperty("ngIf", ctx_r2.plan != ctx_r2.currentPlan && ctx_r2.currentPlan == 1);
6424
- } }
6425
- function BuyAccessButtonComponent_div_0_Template(rf, ctx) { if (rf & 1) {
6426
- i0.ɵɵelementStart(0, "div");
6427
- i0.ɵɵtemplate(1, BuyAccessButtonComponent_div_0_div_1_Template, 2, 0, "div", 0)(2, BuyAccessButtonComponent_div_0_div_2_Template, 3, 2, "div", 0);
6428
- i0.ɵɵelementEnd();
6429
- } if (rf & 2) {
6430
- const ctx_r0 = i0.ɵɵnextContext();
6431
- i0.ɵɵadvance();
6432
- i0.ɵɵproperty("ngIf", !ctx_r0.isUserSignedIn);
6433
- i0.ɵɵadvance();
6434
- i0.ɵɵproperty("ngIf", ctx_r0.isUserSignedIn && ctx_r0.visibleIfUserSignedIn);
6435
- } }
6436
- class BuyAccessButtonComponent {
6437
- constructor(appContext) {
6438
- this.appContext = appContext;
6439
- this.contextUpdated = false;
6440
- this.isUserSignedIn = false;
6441
- this.currentPlan = -1;
6442
- this.currentPlanTitle = '';
6443
- this.visibleIfUserSignedIn = false;
6444
- this.planselect = new EventEmitter();
6454
+ class PagedPageBase extends PageBase {
6455
+ constructor() {
6456
+ super(...arguments);
6457
+ this.currentFilter = null;
6458
+ this.totalItems = 0;
6459
+ this.pageSize = 10;
6460
+ this.skipItems = 0;
6461
+ this.currentPage = 1;
6445
6462
  }
6446
- ngOnInit() {
6447
- this.appContext.updated$.subscribe((context) => {
6448
- if (!context) {
6449
- return;
6450
- }
6451
- this.isUserSignedIn = context.isUserSignedIn;
6452
- if (this.isUserSignedIn) {
6453
- this.currentPlan = context.account.billingPlan;
6454
- this.currentPlanTitle = context.account.billingPlanAsString;
6455
- }
6456
- this.contextUpdated = true;
6457
- });
6463
+ loadPageOne() {
6464
+ this.skipItems = 0;
6465
+ this.currentPage = 1;
6466
+ this.loadPage();
6467
+ }
6468
+ reloadPage(drop2pageOne = false) {
6469
+ if (drop2pageOne) {
6470
+ this.loadPageOne();
6471
+ }
6472
+ else {
6473
+ this.loadPage();
6474
+ }
6475
+ }
6476
+ setFilter(filter) {
6477
+ this.currentFilter = filter;
6478
+ this.loadPageOne();
6479
+ }
6480
+ //Tos
6481
+ toIndex(index) {
6482
+ return ((this.currentPage - 1) * this.pageSize) + index + 1;
6458
6483
  }
6459
6484
  //Events
6460
- onPlanSelect() {
6461
- this.planselect.emit(this.plan);
6485
+ onPageChange(e) {
6486
+ this.pageSize = e.take;
6487
+ this.skipItems = e.skip;
6488
+ this.currentPage = (this.skipItems / this.pageSize) + 1;
6489
+ this.loadPage();
6462
6490
  }
6463
- static { this.ɵfac = function BuyAccessButtonComponent_Factory(t) { return new (t || BuyAccessButtonComponent)(i0.ɵɵdirectiveInject(AppContextService)); }; }
6464
- static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: BuyAccessButtonComponent, selectors: [["anatoly-buyaccess-button"]], inputs: { plan: "plan", planTitle: "planTitle", visibleIfUserSignedIn: "visibleIfUserSignedIn" }, outputs: { planselect: "planselect" }, decls: 1, vars: 1, consts: [[4, "ngIf"], ["classes", "btn btn-block btn-primary"], ["class", "btn btn-block btn-success selectPlan", 4, "ngIf"], ["class", "btn btn-block btn-warning selectPlan", 3, "click", 4, "ngIf"], [1, "btn", "btn-block", "btn-success", "selectPlan"], [1, "btn", "btn-block", "btn-warning", "selectPlan", 3, "click"]], template: function BuyAccessButtonComponent_Template(rf, ctx) { if (rf & 1) {
6465
- i0.ɵɵtemplate(0, BuyAccessButtonComponent_div_0_Template, 3, 2, "div", 0);
6466
- } if (rf & 2) {
6467
- i0.ɵɵproperty("ngIf", ctx.contextUpdated);
6468
- } }, dependencies: [i1$2.NgIf, SignUpButtonComponent], encapsulation: 2 }); }
6491
+ static { this.ɵfac = /*@__PURE__*/ (() => { let ɵPagedPageBase_BaseFactory; return function PagedPageBase_Factory(t) { return (ɵPagedPageBase_BaseFactory || (ɵPagedPageBase_BaseFactory = i0.ɵɵgetInheritedFactory(PagedPageBase)))(t || PagedPageBase); }; })(); }
6492
+ static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: PagedPageBase, selectors: [["ng-component"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 0, vars: 0, template: function PagedPageBase_Template(rf, ctx) { }, encapsulation: 2 }); }
6469
6493
  }
6470
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(BuyAccessButtonComponent, [{
6494
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PagedPageBase, [{
6471
6495
  type: Component,
6472
- args: [{ selector: 'anatoly-buyaccess-button', template: "<div *ngIf=\"contextUpdated\">\r\n <div *ngIf=\"!isUserSignedIn\">\r\n <anatoly-signup-button classes=\"btn btn-block btn-primary\"></anatoly-signup-button>\r\n </div>\r\n\r\n <div *ngIf=\"isUserSignedIn && visibleIfUserSignedIn\">\r\n <button class=\"btn btn-block btn-success selectPlan\"\r\n *ngIf=\"plan == currentPlan\">\r\n Your Plan\r\n </button>\r\n\r\n <button class=\"btn btn-block btn-warning selectPlan\"\r\n *ngIf=\"plan != currentPlan && currentPlan == 1\"\r\n (click)=\"onPlanSelect()\">\r\n Buy Now\r\n </button>\r\n </div>\r\n</div>\r\n" }]
6473
- }], () => [{ type: AppContextService }], { plan: [{
6474
- type: Input
6475
- }], planTitle: [{
6476
- type: Input
6477
- }], visibleIfUserSignedIn: [{
6478
- type: Input
6479
- }], planselect: [{
6480
- type: Output
6481
- }] }); })();
6482
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(BuyAccessButtonComponent, { className: "BuyAccessButtonComponent", filePath: "lib\\ui\\components\\billing\\buyaccess-button.component.ts", lineNumber: 27 }); })();
6496
+ args: [{
6497
+ template: ''
6498
+ }]
6499
+ }], null, null); })();
6500
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(PagedPageBase, { className: "PagedPageBase", filePath: "lib\\ui\\components\\base\\pages\\paged.page.ts", lineNumber: 26 }); })();
6483
6501
 
6484
6502
  /*
6485
6503
  <file>
@@ -6491,109 +6509,91 @@ class BuyAccessButtonComponent {
6491
6509
  Anatoly Osovitny anatoly.osovitny@osovitny.com
6492
6510
 
6493
6511
  Created:
6494
- 1 Jun 2018
6512
+ 20 Aug 2022
6495
6513
 
6496
6514
  Copyright (c) 2016-2025 Osovitny Inc. All rights reserved.
6497
6515
  </file>
6498
6516
  */
6499
6517
  //Node
6500
- function SubscribePlanButtonComponent_div_0_div_1_Template(rf, ctx) { if (rf & 1) {
6501
- i0.ɵɵelementStart(0, "div");
6502
- i0.ɵɵelement(1, "anatoly-signup-button", 1);
6503
- i0.ɵɵelementEnd();
6504
- } }
6505
- function SubscribePlanButtonComponent_div_0_div_2_button_1_Template(rf, ctx) { if (rf & 1) {
6506
- i0.ɵɵelementStart(0, "button", 5);
6507
- i0.ɵɵtext(1, " Your Plan ");
6508
- i0.ɵɵelementEnd();
6509
- } }
6510
- function SubscribePlanButtonComponent_div_0_div_2_button_2_Template(rf, ctx) { if (rf & 1) {
6511
- i0.ɵɵelementStart(0, "button", 6);
6512
- i0.ɵɵtext(1, " Requested ");
6513
- i0.ɵɵelementEnd();
6514
- } }
6515
- function SubscribePlanButtonComponent_div_0_div_2_button_3_Template(rf, ctx) { if (rf & 1) {
6516
- const _r7 = i0.ɵɵgetCurrentView();
6517
- i0.ɵɵelementStart(0, "button", 7);
6518
- i0.ɵɵlistener("click", function SubscribePlanButtonComponent_div_0_div_2_button_3_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r7); const ctx_r6 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r6.onPlanSelect()); });
6519
- i0.ɵɵtext(1, " Subscribe ");
6520
- i0.ɵɵelementEnd();
6521
- } }
6522
- function SubscribePlanButtonComponent_div_0_div_2_Template(rf, ctx) { if (rf & 1) {
6523
- i0.ɵɵelementStart(0, "div");
6524
- i0.ɵɵtemplate(1, SubscribePlanButtonComponent_div_0_div_2_button_1_Template, 2, 0, "button", 2)(2, SubscribePlanButtonComponent_div_0_div_2_button_2_Template, 2, 0, "button", 3)(3, SubscribePlanButtonComponent_div_0_div_2_button_3_Template, 2, 0, "button", 4);
6525
- i0.ɵɵelementEnd();
6526
- } if (rf & 2) {
6527
- const ctx_r2 = i0.ɵɵnextContext(2);
6528
- i0.ɵɵadvance();
6529
- i0.ɵɵproperty("ngIf", ctx_r2.plan == ctx_r2.currentPlan);
6530
- i0.ɵɵadvance();
6531
- i0.ɵɵproperty("ngIf", ctx_r2.plan == ctx_r2.requestedPlan);
6532
- i0.ɵɵadvance();
6533
- i0.ɵɵproperty("ngIf", ctx_r2.plan != ctx_r2.currentPlan && ctx_r2.plan != ctx_r2.requestedPlan);
6534
- } }
6535
- function SubscribePlanButtonComponent_div_0_Template(rf, ctx) { if (rf & 1) {
6536
- i0.ɵɵelementStart(0, "div");
6537
- i0.ɵɵtemplate(1, SubscribePlanButtonComponent_div_0_div_1_Template, 2, 0, "div", 0)(2, SubscribePlanButtonComponent_div_0_div_2_Template, 4, 3, "div", 0);
6538
- i0.ɵɵelementEnd();
6539
- } if (rf & 2) {
6540
- const ctx_r0 = i0.ɵɵnextContext();
6541
- i0.ɵɵadvance();
6542
- i0.ɵɵproperty("ngIf", !ctx_r0.isUserSignedIn);
6543
- i0.ɵɵadvance();
6544
- i0.ɵɵproperty("ngIf", ctx_r0.isUserSignedIn && ctx_r0.visibleIfUserSignedIn);
6545
- } }
6546
- class SubscribePlanButtonComponent {
6547
- constructor(appContext) {
6548
- this.appContext = appContext;
6549
- this.contextUpdated = false;
6550
- this.isUserSignedIn = false;
6551
- this.currentPlan = -1;
6552
- this.currentPlanTitle = "";
6553
- this.requestedPlan = -1;
6554
- this.requestedPlanTitle = "";
6555
- this.visibleIfUserSignedIn = false;
6556
- this.planselect = new EventEmitter();
6518
+ class ListBase extends ComponentBase {
6519
+ constructor() {
6520
+ super(...arguments);
6521
+ this.currentFilter = null;
6522
+ this.dataLoaded = false;
6523
+ this.totalItems = 0;
6524
+ this.skipItems = 0;
6525
+ this.currentPage = 1;
6526
+ //Inputs
6527
+ this.pageSize = 10;
6528
+ this.autoDataLoading = false;
6529
+ //Outputs
6530
+ this.filterRequest = new EventEmitter();
6531
+ this.dataChange = new EventEmitter();
6557
6532
  }
6558
6533
  ngOnInit() {
6559
- this.appContext.updated$.subscribe((context) => {
6560
- if (!context) {
6561
- return;
6562
- }
6563
- this.isUserSignedIn = context.isUserSignedIn;
6564
- if (this.isUserSignedIn) {
6565
- this.currentPlan = context.account.billingPlan;
6566
- this.currentPlanTitle = context.account.billingPlanAsString;
6567
- this.requestedPlan = context.account.requestedBillingPlan;
6568
- this.requestedPlanTitle = context.account.requestedBillingPlanAsString;
6569
- }
6570
- this.contextUpdated = true;
6571
- });
6534
+ this.init();
6572
6535
  }
6573
- //Events
6574
- onPlanSelect() {
6575
- this.planselect.emit(this.plan);
6536
+ init() {
6537
+ if (this.autoDataLoading && !this.dataLoaded) {
6538
+ this.loadPageOne();
6539
+ }
6540
+ else {
6541
+ this.fireFilterRequest();
6542
+ }
6543
+ }
6544
+ fireFilterRequest() {
6545
+ this.filterRequest.emit();
6546
+ }
6547
+ fireDataChange(e = null) {
6548
+ this.dataChange.emit(e);
6549
+ }
6550
+ loadPageOne() {
6551
+ this.skipItems = 0;
6552
+ this.currentPage = 1;
6553
+ this.dataLoaded = true;
6554
+ this.loadPage();
6555
+ }
6556
+ reloadPage(drop2pageOne = false) {
6557
+ if (drop2pageOne) {
6558
+ this.loadPageOne();
6559
+ }
6560
+ else {
6561
+ this.loadPage();
6562
+ }
6563
+ }
6564
+ setFilter(filter) {
6565
+ this.currentFilter = filter;
6566
+ this.loadPageOne();
6567
+ }
6568
+ //Tos
6569
+ toIndex(index) {
6570
+ return ((this.currentPage - 1) * this.pageSize) + index + 1;
6571
+ }
6572
+ //Events
6573
+ onPageChange(e) {
6574
+ this.pageSize = e.take;
6575
+ this.skipItems = e.skip;
6576
+ this.currentPage = (this.skipItems / this.pageSize) + 1;
6577
+ this.loadPage();
6576
6578
  }
6577
- static { this.ɵfac = function SubscribePlanButtonComponent_Factory(t) { return new (t || SubscribePlanButtonComponent)(i0.ɵɵdirectiveInject(AppContextService)); }; }
6578
- static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SubscribePlanButtonComponent, selectors: [["anatoly-subscribe-plan-button"]], inputs: { plan: "plan", planTitle: "planTitle", visibleIfUserSignedIn: "visibleIfUserSignedIn" }, outputs: { planselect: "planselect" }, decls: 1, vars: 1, consts: [[4, "ngIf"], ["classes", "btn btn-block btn-primary"], ["class", "btn btn-block btn-success selectPlan", 4, "ngIf"], ["class", "btn btn-block btn-warning selectPlan", 4, "ngIf"], ["class", "btn btn-block btn-warning selectPlan", 3, "click", 4, "ngIf"], [1, "btn", "btn-block", "btn-success", "selectPlan"], [1, "btn", "btn-block", "btn-warning", "selectPlan"], [1, "btn", "btn-block", "btn-warning", "selectPlan", 3, "click"]], template: function SubscribePlanButtonComponent_Template(rf, ctx) { if (rf & 1) {
6579
- i0.ɵɵtemplate(0, SubscribePlanButtonComponent_div_0_Template, 3, 2, "div", 0);
6580
- } if (rf & 2) {
6581
- i0.ɵɵproperty("ngIf", ctx.contextUpdated);
6582
- } }, dependencies: [i1$2.NgIf, SignUpButtonComponent], encapsulation: 2 }); }
6579
+ static { this.ɵfac = /*@__PURE__*/ (() => { let ɵListBase_BaseFactory; return function ListBase_Factory(t) { return (ɵListBase_BaseFactory || (ɵListBase_BaseFactory = i0.ɵɵgetInheritedFactory(ListBase)))(t || ListBase); }; })(); }
6580
+ static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ListBase, selectors: [["ng-component"]], inputs: { pageSize: "pageSize", autoDataLoading: "autoDataLoading" }, outputs: { filterRequest: "filterRequest", dataChange: "dataChange" }, features: [i0.ɵɵInheritDefinitionFeature], decls: 0, vars: 0, template: function ListBase_Template(rf, ctx) { }, encapsulation: 2 }); }
6583
6581
  }
6584
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SubscribePlanButtonComponent, [{
6582
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ListBase, [{
6585
6583
  type: Component,
6586
- args: [{ selector: "anatoly-subscribe-plan-button", template: "<div *ngIf=\"contextUpdated\">\r\n <div *ngIf=\"!isUserSignedIn\">\r\n <anatoly-signup-button classes=\"btn btn-block btn-primary\"></anatoly-signup-button>\r\n </div>\r\n\r\n <div *ngIf=\"isUserSignedIn && visibleIfUserSignedIn\">\r\n <button class=\"btn btn-block btn-success selectPlan\"\r\n *ngIf=\"plan == currentPlan\">\r\n Your Plan\r\n </button>\r\n\r\n <button class=\"btn btn-block btn-warning selectPlan\"\r\n *ngIf=\"plan == requestedPlan\">\r\n Requested\r\n </button>\r\n\r\n <button class=\"btn btn-block btn-warning selectPlan\"\r\n *ngIf=\"plan != currentPlan && plan != requestedPlan\"\r\n (click)=\"onPlanSelect()\">\r\n Subscribe\r\n </button>\r\n </div>\r\n</div>\r\n" }]
6587
- }], () => [{ type: AppContextService }], { plan: [{
6588
- type: Input
6589
- }], planTitle: [{
6584
+ args: [{
6585
+ template: ''
6586
+ }]
6587
+ }], null, { pageSize: [{
6590
6588
  type: Input
6591
- }], visibleIfUserSignedIn: [{
6589
+ }], autoDataLoading: [{
6592
6590
  type: Input
6593
- }], planselect: [{
6591
+ }], filterRequest: [{
6592
+ type: Output
6593
+ }], dataChange: [{
6594
6594
  type: Output
6595
6595
  }] }); })();
6596
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SubscribePlanButtonComponent, { className: "SubscribePlanButtonComponent", filePath: "lib\\ui\\components\\billing\\subscribe-plan-button.component.ts", lineNumber: 27 }); })();
6596
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ListBase, { className: "ListBase", filePath: "lib\\ui\\components\\base\\list.ts", lineNumber: 26 }); })();
6597
6597
 
6598
6598
  /*
6599
6599
  <file>
@@ -6610,12 +6610,12 @@ class SubscribePlanButtonComponent {
6610
6610
  </file>
6611
6611
  */
6612
6612
  //Node
6613
- const _c0$c = [[["card-header"]], [["card-body"]], "*", [["card-footer"]]];
6613
+ const _c0$d = [[["card-header"]], [["card-body"]], "*", [["card-footer"]]];
6614
6614
  const _c1 = ["card-header", "card-body", "*", "card-footer"];
6615
6615
  class CardComponent extends ComponentBase {
6616
6616
  static { this.ɵfac = /*@__PURE__*/ (() => { let ɵCardComponent_BaseFactory; return function CardComponent_Factory(t) { return (ɵCardComponent_BaseFactory || (ɵCardComponent_BaseFactory = i0.ɵɵgetInheritedFactory(CardComponent)))(t || CardComponent); }; })(); }
6617
6617
  static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CardComponent, selectors: [["anatoly-card"]], features: [i0.ɵɵInheritDefinitionFeature], ngContentSelectors: _c1, decls: 5, vars: 3, template: function CardComponent_Template(rf, ctx) { if (rf & 1) {
6618
- i0.ɵɵprojectionDef(_c0$c);
6618
+ i0.ɵɵprojectionDef(_c0$d);
6619
6619
  i0.ɵɵelementStart(0, "div");
6620
6620
  i0.ɵɵprojection(1);
6621
6621
  i0.ɵɵprojection(2, 1);
@@ -6656,10 +6656,10 @@ function CardHeaderComponent_h3_2_Template(rf, ctx) { if (rf & 1) {
6656
6656
  i0.ɵɵadvance();
6657
6657
  i0.ɵɵtextInterpolate(ctx_r0.title);
6658
6658
  } }
6659
- const _c0$b = ["*"];
6659
+ const _c0$c = ["*"];
6660
6660
  class CardHeaderComponent extends ComponentBase {
6661
6661
  static { this.ɵfac = /*@__PURE__*/ (() => { let ɵCardHeaderComponent_BaseFactory; return function CardHeaderComponent_Factory(t) { return (ɵCardHeaderComponent_BaseFactory || (ɵCardHeaderComponent_BaseFactory = i0.ɵɵgetInheritedFactory(CardHeaderComponent)))(t || CardHeaderComponent); }; })(); }
6662
- static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CardHeaderComponent, selectors: [["anatoly-card-header"]], features: [i0.ɵɵInheritDefinitionFeature], ngContentSelectors: _c0$b, decls: 4, vars: 4, consts: [[1, "card-title"], [4, "ngIf"]], template: function CardHeaderComponent_Template(rf, ctx) { if (rf & 1) {
6662
+ static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CardHeaderComponent, selectors: [["anatoly-card-header"]], features: [i0.ɵɵInheritDefinitionFeature], ngContentSelectors: _c0$c, decls: 4, vars: 4, consts: [[1, "card-title"], [4, "ngIf"]], template: function CardHeaderComponent_Template(rf, ctx) { if (rf & 1) {
6663
6663
  i0.ɵɵprojectionDef();
6664
6664
  i0.ɵɵelementStart(0, "div")(1, "div", 0);
6665
6665
  i0.ɵɵtemplate(2, CardHeaderComponent_h3_2_Template, 2, 1, "h3", 1);
@@ -6693,10 +6693,10 @@ class CardHeaderComponent extends ComponentBase {
6693
6693
  </file>
6694
6694
  */
6695
6695
  //Node
6696
- const _c0$a = ["*"];
6696
+ const _c0$b = ["*"];
6697
6697
  class CardBodyComponent extends ComponentBase {
6698
6698
  static { this.ɵfac = /*@__PURE__*/ (() => { let ɵCardBodyComponent_BaseFactory; return function CardBodyComponent_Factory(t) { return (ɵCardBodyComponent_BaseFactory || (ɵCardBodyComponent_BaseFactory = i0.ɵɵgetInheritedFactory(CardBodyComponent)))(t || CardBodyComponent); }; })(); }
6699
- static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CardBodyComponent, selectors: [["anatoly-card-body"]], features: [i0.ɵɵInheritDefinitionFeature], ngContentSelectors: _c0$a, decls: 2, vars: 3, template: function CardBodyComponent_Template(rf, ctx) { if (rf & 1) {
6699
+ static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CardBodyComponent, selectors: [["anatoly-card-body"]], features: [i0.ɵɵInheritDefinitionFeature], ngContentSelectors: _c0$b, decls: 2, vars: 3, template: function CardBodyComponent_Template(rf, ctx) { if (rf & 1) {
6700
6700
  i0.ɵɵprojectionDef();
6701
6701
  i0.ɵɵelementStart(0, "div");
6702
6702
  i0.ɵɵprojection(1);
@@ -6726,10 +6726,10 @@ class CardBodyComponent extends ComponentBase {
6726
6726
  </file>
6727
6727
  */
6728
6728
  //Node
6729
- const _c0$9 = ["*"];
6729
+ const _c0$a = ["*"];
6730
6730
  class CardFooterComponent extends ComponentBase {
6731
6731
  static { this.ɵfac = /*@__PURE__*/ (() => { let ɵCardFooterComponent_BaseFactory; return function CardFooterComponent_Factory(t) { return (ɵCardFooterComponent_BaseFactory || (ɵCardFooterComponent_BaseFactory = i0.ɵɵgetInheritedFactory(CardFooterComponent)))(t || CardFooterComponent); }; })(); }
6732
- static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CardFooterComponent, selectors: [["anatoly-card-footer"]], features: [i0.ɵɵInheritDefinitionFeature], ngContentSelectors: _c0$9, decls: 2, vars: 3, template: function CardFooterComponent_Template(rf, ctx) { if (rf & 1) {
6732
+ static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CardFooterComponent, selectors: [["anatoly-card-footer"]], features: [i0.ɵɵInheritDefinitionFeature], ngContentSelectors: _c0$a, decls: 2, vars: 3, template: function CardFooterComponent_Template(rf, ctx) { if (rf & 1) {
6733
6733
  i0.ɵɵprojectionDef();
6734
6734
  i0.ɵɵelementStart(0, "div");
6735
6735
  i0.ɵɵprojection(1);
@@ -7598,14 +7598,14 @@ class HtmlEditorComponent extends HtmlEditorComponentBase {
7598
7598
  </file>
7599
7599
  */
7600
7600
  //Node
7601
- const _c0$8 = ["*"];
7601
+ const _c0$9 = ["*"];
7602
7602
  class CheckIconComponent {
7603
7603
  constructor() {
7604
7604
  //Inputs
7605
7605
  this.checked = true;
7606
7606
  }
7607
7607
  static { this.ɵfac = function CheckIconComponent_Factory(t) { return new (t || CheckIconComponent)(); }; }
7608
- static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CheckIconComponent, selectors: [["anatoly-check-icon"]], inputs: { checked: "checked" }, ngContentSelectors: _c0$8, decls: 2, vars: 2, consts: [[3, "icon", "ngClass"]], template: function CheckIconComponent_Template(rf, ctx) { if (rf & 1) {
7608
+ static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CheckIconComponent, selectors: [["anatoly-check-icon"]], inputs: { checked: "checked" }, ngContentSelectors: _c0$9, decls: 2, vars: 2, consts: [[3, "icon", "ngClass"]], template: function CheckIconComponent_Template(rf, ctx) { if (rf & 1) {
7609
7609
  i0.ɵɵprojectionDef();
7610
7610
  i0.ɵɵelement(0, "fa-icon", 0);
7611
7611
  i0.ɵɵprojection(1);
@@ -7621,6 +7621,162 @@ class CheckIconComponent {
7621
7621
  }] }); })();
7622
7622
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CheckIconComponent, { className: "CheckIconComponent", filePath: "lib\\ui\\components\\check-icon\\check-icon.component.ts", lineNumber: 24 }); })();
7623
7623
 
7624
+ /*
7625
+ <file>
7626
+ Project:
7627
+ @osovitny/anatoly
7628
+
7629
+ Authors:
7630
+ Anatoly Osovitny anatoly.osovitny@osovitny.com
7631
+
7632
+ Created:
7633
+ 23 Apr 2024
7634
+
7635
+ Copyright (c) 2016-2025 Osovitny Inc. All rights reserved.
7636
+ </file>
7637
+ */
7638
+ //Node
7639
+ function ControlPanelComponent_Conditional_7_Template(rf, ctx) { if (rf & 1) {
7640
+ const _r3 = i0.ɵɵgetCurrentView();
7641
+ i0.ɵɵelementStart(0, "div", 9)(1, "h2");
7642
+ i0.ɵɵtext(2, "Sort By:");
7643
+ i0.ɵɵelementEnd();
7644
+ i0.ɵɵelementStart(3, "kendo-dropdownlist", 10);
7645
+ i0.ɵɵlistener("ngModelChange", function ControlPanelComponent_Conditional_7_Template_kendo_dropdownlist_ngModelChange_3_listener($event) { i0.ɵɵrestoreView(_r3); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.selectedSortBy = $event); })("valueChange", function ControlPanelComponent_Conditional_7_Template_kendo_dropdownlist_valueChange_3_listener() { i0.ɵɵrestoreView(_r3); const ctx_r4 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r4.onSortByChange()); });
7646
+ i0.ɵɵelementEnd()();
7647
+ } if (rf & 2) {
7648
+ const ctx_r0 = i0.ɵɵnextContext();
7649
+ i0.ɵɵadvance(3);
7650
+ i0.ɵɵproperty("data", ctx_r0.sortByItems)("valuePrimitive", true)("ngModel", ctx_r0.selectedSortBy);
7651
+ } }
7652
+ function ControlPanelComponent_Conditional_8_Conditional_10_Template(rf, ctx) { if (rf & 1) {
7653
+ const _r7 = i0.ɵɵgetCurrentView();
7654
+ i0.ɵɵnamespaceSVG();
7655
+ i0.ɵɵnamespaceHTML();
7656
+ i0.ɵɵelementStart(0, "a", 20);
7657
+ i0.ɵɵlistener("click", function ControlPanelComponent_Conditional_8_Conditional_10_Template_a_click_0_listener() { i0.ɵɵrestoreView(_r7); const ctx_r6 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r6.onAdd()); });
7658
+ i0.ɵɵelement(1, "fa-icon", 21);
7659
+ i0.ɵɵelementEnd();
7660
+ } }
7661
+ const _c0$8 = a0 => ({ "active": a0 });
7662
+ function ControlPanelComponent_Conditional_8_Template(rf, ctx) { if (rf & 1) {
7663
+ const _r9 = i0.ɵɵgetCurrentView();
7664
+ i0.ɵɵelementStart(0, "div", 11)(1, "a", 3);
7665
+ i0.ɵɵlistener("click", function ControlPanelComponent_Conditional_8_Template_a_click_1_listener() { i0.ɵɵrestoreView(_r9); const ctx_r8 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r8.onViewSwitch("grid")); });
7666
+ i0.ɵɵnamespaceSVG();
7667
+ i0.ɵɵelementStart(2, "svg", 12);
7668
+ i0.ɵɵelement(3, "path", 13)(4, "path", 14)(5, "path", 15)(6, "path", 16);
7669
+ i0.ɵɵelementEnd()();
7670
+ i0.ɵɵnamespaceHTML();
7671
+ i0.ɵɵelementStart(7, "a", 3);
7672
+ i0.ɵɵlistener("click", function ControlPanelComponent_Conditional_8_Template_a_click_7_listener() { i0.ɵɵrestoreView(_r9); const ctx_r10 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r10.onViewSwitch("list")); });
7673
+ i0.ɵɵnamespaceSVG();
7674
+ i0.ɵɵelementStart(8, "svg", 17);
7675
+ i0.ɵɵelement(9, "path", 18);
7676
+ i0.ɵɵelementEnd()();
7677
+ i0.ɵɵtemplate(10, ControlPanelComponent_Conditional_8_Conditional_10_Template, 2, 0, "a", 19);
7678
+ i0.ɵɵelementEnd();
7679
+ } if (rf & 2) {
7680
+ const ctx_r1 = i0.ɵɵnextContext();
7681
+ i0.ɵɵadvance();
7682
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(3, _c0$8, ctx_r1.viewType == "grid"));
7683
+ i0.ɵɵadvance(6);
7684
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(5, _c0$8, ctx_r1.viewType == "list"));
7685
+ i0.ɵɵadvance(3);
7686
+ i0.ɵɵconditional(10, ctx_r1.addVisible ? 10 : -1);
7687
+ } }
7688
+ class ControlPanelComponent extends ComponentBase {
7689
+ constructor() {
7690
+ super(...arguments);
7691
+ this.addVisible = false;
7692
+ this.sortByVisible = false;
7693
+ this.viewTypeVisible = false;
7694
+ //Outputs
7695
+ this.settingsChange = new EventEmitter();
7696
+ this.add = new EventEmitter();
7697
+ }
7698
+ ngOnInit() {
7699
+ this.resetSettings();
7700
+ this.fireSettingsChange();
7701
+ }
7702
+ fireSettingsChange() {
7703
+ this.settingsChange.emit(this.getSettings());
7704
+ }
7705
+ fireAdd() {
7706
+ this.add.emit();
7707
+ }
7708
+ //Public
7709
+ resetSettings() {
7710
+ this.selectedSortBy = 1;
7711
+ this.filterVisible = false;
7712
+ this.viewType = DataViewType.List;
7713
+ }
7714
+ getSettings() {
7715
+ let sortBy = this.selectedSortBy;
7716
+ let filterVisible = this.filterVisible;
7717
+ let viewType = this.viewType;
7718
+ return {
7719
+ sortBy: sortBy,
7720
+ filterVisible: filterVisible,
7721
+ viewType: viewType
7722
+ };
7723
+ }
7724
+ //Events
7725
+ onFilterToggle() {
7726
+ this.filterVisible = !this.filterVisible;
7727
+ this.fireSettingsChange();
7728
+ }
7729
+ onSortByChange() {
7730
+ this.fireSettingsChange();
7731
+ }
7732
+ onViewSwitch(value) {
7733
+ this.viewType = value;
7734
+ this.fireSettingsChange();
7735
+ }
7736
+ onAdd() {
7737
+ this.fireAdd();
7738
+ }
7739
+ static { this.ɵfac = /*@__PURE__*/ (() => { let ɵControlPanelComponent_BaseFactory; return function ControlPanelComponent_Factory(t) { return (ɵControlPanelComponent_BaseFactory || (ɵControlPanelComponent_BaseFactory = i0.ɵɵgetInheritedFactory(ControlPanelComponent)))(t || ControlPanelComponent); }; })(); }
7740
+ static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ControlPanelComponent, selectors: [["anatoly-data-grid-control-panel"]], inputs: { mode: "mode", sortByItems: "sortByItems", addVisible: "addVisible", sortByVisible: "sortByVisible", viewTypeVisible: "viewTypeVisible" }, outputs: { settingsChange: "settingsChange", add: "add" }, features: [i0.ɵɵInheritDefinitionFeature], decls: 9, vars: 5, consts: [[1, "data-grid"], [1, "control-panel"], [1, "filter"], ["href", "javascript:void(0)", 1, "btn", "btn-icon", "btn-primary", 3, "ngClass", "click"], ["height", "22", "viewBox", "0 0 32 32", "width", "20", "xmlns", "http://www.w3.org/2000/svg"], ["d", "M2 7h.142a3.981 3.981 0 0 0 7.716 0H30a1 1 0 0 0 0-2H9.858a3.981 3.981 0 0 0-7.716 0H2a1 1 0 0 0 0 2zm4-3a2 2 0 1 1-2 2 2 2 0 0 1 2-2zm24 11h-.142a3.981 3.981 0 0 0-7.716 0H2a1 1 0 0 0 0 2h20.142a3.981 3.981 0 0 0 7.716 0H30a1 1 0 0 0 0-2zm-4 3a2 2 0 1 1 2-2 2 2 0 0 1-2 2zm4 7H19.858a3.981 3.981 0 0 0-7.716 0H2a1 1 0 0 0 0 2h10.142a3.981 3.981 0 0 0 7.716 0H30a1 1 0 0 0 0-2zm-14 3a2 2 0 1 1 2-2 2 2 0 0 1-2 2z", "fill", "currentColor"], [1, "tools"], ["class", "sort-by"], ["class", "actions"], [1, "sort-by"], ["valueField", "value", "textField", "text", 3, "data", "valuePrimitive", "ngModel", "ngModelChange", "valueChange"], [1, "actions"], ["fill", "none", "height", "18", "viewBox", "0 0 18 18", "width", "18", "xmlns", "http://www.w3.org/2000/svg"], ["d", "M6 1H2C1.44772 1 1 1.44772 1 2V6C1 6.55228 1.44772 7 2 7H6C6.55228 7 7 6.55228 7 6V2C7 1.44772 6.55228 1 6 1Z", "stroke", "currentColor", "stroke-linecap", "round", "stroke-linejoin", "round", "stroke-width", "2"], ["d", "M16 1H12C11.4477 1 11 1.44772 11 2V6C11 6.55228 11.4477 7 12 7H16C16.5523 7 17 6.55228 17 6V2C17 1.44772 16.5523 1 16 1Z", "stroke", "currentColor", "stroke-linecap", "round", "stroke-linejoin", "round", "stroke-width", "2"], ["d", "M6 11H2C1.44772 11 1 11.4477 1 12V16C1 16.5523 1.44772 17 2 17H6C6.55228 17 7 16.5523 7 16V12C7 11.4477 6.55228 11 6 11Z", "stroke", "currentColor", "stroke-linecap", "round", "stroke-linejoin", "round", "stroke-width", "2"], ["d", "M16 11H12C11.4477 11 11 11.4477 11 12V16C11 16.5523 11.4477 17 12 17H16C16.5523 17 17 16.5523 17 16V12C17 11.4477 16.5523 11 16 11Z", "stroke", "currentColor", "stroke-linecap", "round", "stroke-linejoin", "round", "stroke-width", "2"], ["fill", "none", "height", "15", "viewBox", "0 0 19 15", "width", "19", "xmlns", "http://www.w3.org/2000/svg"], ["d", "M1.5 6C0.67 6 0 6.67 0 7.5C0 8.33 0.67 9 1.5 9C2.33 9 3 8.33 3 7.5C3 6.67 2.33 6 1.5 6ZM1.5 0C0.67 0 0 0.67 0 1.5C0 2.33 0.67 3 1.5 3C2.33 3 3 2.33 3 1.5C3 0.67 2.33 0 1.5 0ZM1.5 12C0.67 12 0 12.68 0 13.5C0 14.32 0.68 15 1.5 15C2.32 15 3 14.32 3 13.5C3 12.68 2.33 12 1.5 12ZM5.5 14.5H17.5C18.05 14.5 18.5 14.05 18.5 13.5C18.5 12.95 18.05 12.5 17.5 12.5H5.5C4.95 12.5 4.5 12.95 4.5 13.5C4.5 14.05 4.95 14.5 5.5 14.5ZM5.5 8.5H17.5C18.05 8.5 18.5 8.05 18.5 7.5C18.5 6.95 18.05 6.5 17.5 6.5H5.5C4.95 6.5 4.5 6.95 4.5 7.5C4.5 8.05 4.95 8.5 5.5 8.5ZM4.5 1.5C4.5 2.05 4.95 2.5 5.5 2.5H17.5C18.05 2.5 18.5 2.05 18.5 1.5C18.5 0.95 18.05 0.5 17.5 0.5H5.5C4.95 0.5 4.5 0.95 4.5 1.5Z", "fill", "currentColor"], ["class", "btn btn-icon btn-primary", "href", "javascript:void(0)"], ["href", "javascript:void(0)", 1, "btn", "btn-icon", "btn-primary", 3, "click"], ["icon", "plus"]], template: function ControlPanelComponent_Template(rf, ctx) { if (rf & 1) {
7741
+ i0.ɵɵelementStart(0, "div", 0)(1, "div", 1)(2, "div", 2)(3, "a", 3);
7742
+ i0.ɵɵlistener("click", function ControlPanelComponent_Template_a_click_3_listener() { return ctx.onFilterToggle(); });
7743
+ i0.ɵɵnamespaceSVG();
7744
+ i0.ɵɵelementStart(4, "svg", 4);
7745
+ i0.ɵɵelement(5, "path", 5);
7746
+ i0.ɵɵelementEnd()()();
7747
+ i0.ɵɵnamespaceHTML();
7748
+ i0.ɵɵelementStart(6, "div", 6);
7749
+ i0.ɵɵtemplate(7, ControlPanelComponent_Conditional_7_Template, 4, 3, "div", 7)(8, ControlPanelComponent_Conditional_8_Template, 11, 7, "div", 8);
7750
+ i0.ɵɵelementEnd()()();
7751
+ } if (rf & 2) {
7752
+ i0.ɵɵadvance(3);
7753
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(3, _c0$8, ctx.filterVisible));
7754
+ i0.ɵɵadvance(4);
7755
+ i0.ɵɵconditional(7, ctx.sortByVisible ? 7 : -1);
7756
+ i0.ɵɵadvance();
7757
+ i0.ɵɵconditional(8, ctx.viewTypeVisible ? 8 : -1);
7758
+ } }, dependencies: [i1$2.NgClass, i2.NgControlStatus, i2.NgModel, i1$6.FaIconComponent, i3.DropDownListComponent], encapsulation: 2 }); }
7759
+ }
7760
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ControlPanelComponent, [{
7761
+ type: Component,
7762
+ args: [{ selector: 'anatoly-data-grid-control-panel', template: "<div class='data-grid'>\r\n <div class='control-panel'>\r\n <div class='filter'>\r\n <a (click)='onFilterToggle()'\r\n [ngClass]=\"{'active': filterVisible}\"\r\n class='btn btn-icon btn-primary'\r\n href='javascript:void(0)'>\r\n <svg height='22' viewBox='0 0 32 32' width='20' xmlns='http://www.w3.org/2000/svg'>\r\n <path d='M2 7h.142a3.981 3.981 0 0 0 7.716 0H30a1 1 0 0 0 0-2H9.858a3.981 3.981 0 0 0-7.716 0H2a1 1 0 0 0 0 2zm4-3a2 2 0 1 1-2 2 2 2 0 0 1 2-2zm24 11h-.142a3.981 3.981 0 0 0-7.716 0H2a1 1 0 0 0 0 2h20.142a3.981 3.981 0 0 0 7.716 0H30a1 1 0 0 0 0-2zm-4 3a2 2 0 1 1 2-2 2 2 0 0 1-2 2zm4 7H19.858a3.981 3.981 0 0 0-7.716 0H2a1 1 0 0 0 0 2h10.142a3.981 3.981 0 0 0 7.716 0H30a1 1 0 0 0 0-2zm-14 3a2 2 0 1 1 2-2 2 2 0 0 1-2 2z'\r\n fill='currentColor'></path>\r\n </svg>\r\n </a>\r\n </div>\r\n <div class='tools'>\r\n @if (sortByVisible) {\r\n <div class='sort-by'>\r\n <h2>Sort By:</h2>\r\n <kendo-dropdownlist [data]='sortByItems'\r\n valueField='value'\r\n textField='text'\r\n [valuePrimitive]='true'\r\n [(ngModel)]='selectedSortBy'\r\n (valueChange)='onSortByChange()'>\r\n </kendo-dropdownlist>\r\n </div>\r\n }\r\n\r\n @if (viewTypeVisible) {\r\n <div class='actions'>\r\n <a class='btn btn-icon btn-primary' href='javascript:void(0)'\r\n [ngClass]=\"{'active': viewType == 'grid'}\"\r\n (click)=\"onViewSwitch('grid')\">\r\n <svg fill='none' height='18' viewBox='0 0 18 18' width='18' xmlns='http://www.w3.org/2000/svg'>\r\n <path d='M6 1H2C1.44772 1 1 1.44772 1 2V6C1 6.55228 1.44772 7 2 7H6C6.55228 7 7 6.55228 7 6V2C7 1.44772 6.55228 1 6 1Z'\r\n stroke='currentColor'\r\n stroke-linecap='round'\r\n stroke-linejoin='round'\r\n stroke-width='2' />\r\n <path d='M16 1H12C11.4477 1 11 1.44772 11 2V6C11 6.55228 11.4477 7 12 7H16C16.5523 7 17 6.55228 17 6V2C17 1.44772 16.5523 1 16 1Z'\r\n stroke='currentColor'\r\n stroke-linecap='round'\r\n stroke-linejoin='round'\r\n stroke-width='2' />\r\n <path d='M6 11H2C1.44772 11 1 11.4477 1 12V16C1 16.5523 1.44772 17 2 17H6C6.55228 17 7 16.5523 7 16V12C7 11.4477 6.55228 11 6 11Z'\r\n stroke='currentColor'\r\n stroke-linecap='round'\r\n stroke-linejoin='round'\r\n stroke-width='2' />\r\n <path d='M16 11H12C11.4477 11 11 11.4477 11 12V16C11 16.5523 11.4477 17 12 17H16C16.5523 17 17 16.5523 17 16V12C17 11.4477 16.5523 11 16 11Z'\r\n stroke='currentColor'\r\n stroke-linecap='round'\r\n stroke-linejoin='round'\r\n stroke-width='2' />\r\n </svg>\r\n </a>\r\n <a class='btn btn-icon btn-primary' href='javascript:void(0)'\r\n [ngClass]=\"{'active': viewType == 'list'}\"\r\n (click)=\"onViewSwitch('list')\">\r\n <svg fill='none' height='15' viewBox='0 0 19 15' width='19' xmlns='http://www.w3.org/2000/svg'>\r\n <path d='M1.5 6C0.67 6 0 6.67 0 7.5C0 8.33 0.67 9 1.5 9C2.33 9 3 8.33 3 7.5C3 6.67 2.33 6 1.5 6ZM1.5 0C0.67 0 0 0.67 0 1.5C0 2.33 0.67 3 1.5 3C2.33 3 3 2.33 3 1.5C3 0.67 2.33 0 1.5 0ZM1.5 12C0.67 12 0 12.68 0 13.5C0 14.32 0.68 15 1.5 15C2.32 15 3 14.32 3 13.5C3 12.68 2.33 12 1.5 12ZM5.5 14.5H17.5C18.05 14.5 18.5 14.05 18.5 13.5C18.5 12.95 18.05 12.5 17.5 12.5H5.5C4.95 12.5 4.5 12.95 4.5 13.5C4.5 14.05 4.95 14.5 5.5 14.5ZM5.5 8.5H17.5C18.05 8.5 18.5 8.05 18.5 7.5C18.5 6.95 18.05 6.5 17.5 6.5H5.5C4.95 6.5 4.5 6.95 4.5 7.5C4.5 8.05 4.95 8.5 5.5 8.5ZM4.5 1.5C4.5 2.05 4.95 2.5 5.5 2.5H17.5C18.05 2.5 18.5 2.05 18.5 1.5C18.5 0.95 18.05 0.5 17.5 0.5H5.5C4.95 0.5 4.5 0.95 4.5 1.5Z'\r\n fill='currentColor' />\r\n </svg>\r\n </a>\r\n\r\n @if (addVisible) {\r\n <a class='btn btn-icon btn-primary' href='javascript:void(0)' (click)='onAdd()'>\r\n <fa-icon icon='plus' />\r\n </a>\r\n }\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n</div>\r\n" }]
7763
+ }], null, { mode: [{
7764
+ type: Input
7765
+ }], sortByItems: [{
7766
+ type: Input
7767
+ }], addVisible: [{
7768
+ type: Input
7769
+ }], sortByVisible: [{
7770
+ type: Input
7771
+ }], viewTypeVisible: [{
7772
+ type: Input
7773
+ }], settingsChange: [{
7774
+ type: Output
7775
+ }], add: [{
7776
+ type: Output
7777
+ }] }); })();
7778
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ControlPanelComponent, { className: "ControlPanelComponent", filePath: "lib\\ui\\components\\data-grid\\control-panel.component.ts", lineNumber: 27 }); })();
7779
+
7624
7780
  /*
7625
7781
  <file>
7626
7782
  Project:
@@ -7798,7 +7954,7 @@ class SignInButtonComponent extends ComponentBase {
7798
7954
  i0.ɵɵproperty("ngIf", ctx.external);
7799
7955
  i0.ɵɵadvance();
7800
7956
  i0.ɵɵproperty("ngIf", !ctx.external);
7801
- } }, dependencies: [i1$2.NgIf, i1$2.NgTemplateOutlet, i1.RouterLink], encapsulation: 2 }); }
7957
+ } }, dependencies: [i1$2.NgIf, i1$2.NgTemplateOutlet, i1$1.RouterLink], encapsulation: 2 }); }
7802
7958
  }
7803
7959
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SignInButtonComponent, [{
7804
7960
  type: Component,
@@ -7895,7 +8051,7 @@ class SignOutButtonComponent extends ComponentBase {
7895
8051
  i0.ɵɵproperty("ngIf", ctx.external);
7896
8052
  i0.ɵɵadvance();
7897
8053
  i0.ɵɵproperty("ngIf", !ctx.external);
7898
- } }, dependencies: [i1$2.NgIf, i1$2.NgTemplateOutlet, i1.RouterLink], encapsulation: 2 }); }
8054
+ } }, dependencies: [i1$2.NgIf, i1$2.NgTemplateOutlet, i1$1.RouterLink], encapsulation: 2 }); }
7899
8055
  }
7900
8056
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SignOutButtonComponent, [{
7901
8057
  type: Component,
@@ -8137,7 +8293,7 @@ class PageSpinnerComponent {
8137
8293
  ngOnDestroy() {
8138
8294
  this.isSpinnerVisible = false;
8139
8295
  }
8140
- static { this.ɵfac = function PageSpinnerComponent_Factory(t) { return new (t || PageSpinnerComponent)(i0.ɵɵdirectiveInject(i1.Router)); }; }
8296
+ static { this.ɵfac = function PageSpinnerComponent_Factory(t) { return new (t || PageSpinnerComponent)(i0.ɵɵdirectiveInject(i1$1.Router)); }; }
8141
8297
  static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: PageSpinnerComponent, selectors: [["anatoly-pagespinner"]], inputs: { backgroundColor: "backgroundColor", spinner: "spinner" }, decls: 1, vars: 1, consts: [["id", "http-loader", 4, "ngIf"], ["id", "http-loader"], [1, "loader-bg"], ["class", "sk-line-material", 3, "colored", 4, "ngIf"], [1, "sk-line-material"], [1, "sk-child", "sk-bounce1"]], template: function PageSpinnerComponent_Template(rf, ctx) { if (rf & 1) {
8142
8298
  i0.ɵɵtemplate(0, PageSpinnerComponent_div_0_Template, 3, 1, "div", 0);
8143
8299
  } if (rf & 2) {
@@ -8147,7 +8303,7 @@ class PageSpinnerComponent {
8147
8303
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PageSpinnerComponent, [{
8148
8304
  type: Component,
8149
8305
  args: [{ selector: 'anatoly-pagespinner', encapsulation: ViewEncapsulation.None, template: "<div id=\"http-loader\" *ngIf=\"isSpinnerVisible\">\r\n <div class=\"loader-bg\">\r\n <div class=\"sk-line-material\" [class.colored]=\"!backgroundColor\" *ngIf=\"spinner === Spinkit.skLine\">\r\n <div class=\"sk-child sk-bounce1\" [style.background-color]='backgroundColor'></div>\r\n </div>\r\n </div>\r\n</div>\r\n" }]
8150
- }], () => [{ type: i1.Router }], { backgroundColor: [{
8306
+ }], () => [{ type: i1$1.Router }], { backgroundColor: [{
8151
8307
  type: Input
8152
8308
  }], spinner: [{
8153
8309
  type: Input
@@ -8191,12 +8347,12 @@ class Copy2ClipboardComponent extends ComponentBase {
8191
8347
  i0.ɵɵelement(1, "fa-icon", 1);
8192
8348
  i0.ɵɵelementEnd();
8193
8349
  } if (rf & 2) {
8194
- i0.ɵɵclassMapInterpolate1("btn ", ctx.classes, "");
8350
+ i0.ɵɵclassMapInterpolate1("btn btn-icon ", ctx.classes, "");
8195
8351
  } }, dependencies: [i1$6.FaIconComponent], encapsulation: 2 }); }
8196
8352
  }
8197
8353
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(Copy2ClipboardComponent, [{
8198
8354
  type: Component,
8199
- args: [{ selector: 'anatoly-copy-2-clipboard', template: "<a class=\"btn {{ classes }}\" (click)=\"onCopy2Clipboard($event)\">\r\n <fa-icon size=\"lg\" icon=\"copy\"></fa-icon>\r\n</a>\r\n" }]
8355
+ args: [{ selector: 'anatoly-copy-2-clipboard', template: "<a class=\"btn btn-icon {{ classes }}\" (click)=\"onCopy2Clipboard($event)\">\r\n <fa-icon size=\"lg\" icon=\"copy\" />\r\n</a>\r\n" }]
8200
8356
  }], null, { tooltip: [{
8201
8357
  type: Input
8202
8358
  }], text: [{
@@ -9918,7 +10074,7 @@ class AnatolyIAMPagesModule {
9918
10074
  }], null, null); })();
9919
10075
  (function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(AnatolyIAMPagesModule, { declarations: [SignInPage, SignUpPage, SignOutPage], imports: [CommonModule,
9920
10076
  RouterModule,
9921
- HttpClientModule, i1.RouterModule] }); })();
10077
+ HttpClientModule, i1$1.RouterModule] }); })();
9922
10078
 
9923
10079
  /*
9924
10080
  <file>
@@ -10115,89 +10271,6 @@ class KendoModule {
10115
10271
  TreeViewModule,
10116
10272
  TooltipsModule] }); })();
10117
10273
 
10118
- /*
10119
- <file>
10120
- Project:
10121
- @osovitny/anatoly
10122
-
10123
- Authors:
10124
- Vadim Osovitny vadim.osovitny@osovitny.com
10125
-
10126
- Created:
10127
- 8 Nov 2024
10128
-
10129
- Copyright (c) 2016-2025 Osovitny Inc. All rights reserved.
10130
- </file>
10131
- */
10132
- const COMPONENTS$1 = [
10133
- OrderSummaryComponent,
10134
- PaymentMethodsComponent,
10135
- PaymentOptionsComponent,
10136
- PaypalButtonComponent,
10137
- PayPalComponent,
10138
- //Dialogs
10139
- BraintreeDialog,
10140
- StripeDialog,
10141
- ];
10142
-
10143
- /*
10144
- <file>
10145
- Project:
10146
- @osovitny/anatoly
10147
-
10148
- Authors:
10149
- Vadim Osovitny vadim.osovitny@osovitny.com
10150
- Anatoly Osovitny anatoly.osovitny@osovitny.com
10151
-
10152
- Created:
10153
- 14 Jun 2024
10154
-
10155
- Copyright (c) 2016-2025 Osovitny Inc. All rights reserved.
10156
- </file>
10157
- */
10158
- //Node
10159
- class AnatolyBillingModule {
10160
- static { this.ɵfac = function AnatolyBillingModule_Factory(t) { return new (t || AnatolyBillingModule)(); }; }
10161
- static { this.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: AnatolyBillingModule }); }
10162
- static { this.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ providers: [
10163
- ScriptService,
10164
- PayPalScriptService,
10165
- PaymentsService
10166
- ], imports: [CommonModule,
10167
- ReactiveFormsModule,
10168
- FormsModule,
10169
- FaModule,
10170
- KendoModule] }); }
10171
- }
10172
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AnatolyBillingModule, [{
10173
- type: NgModule,
10174
- args: [{
10175
- imports: [
10176
- CommonModule,
10177
- ReactiveFormsModule,
10178
- FormsModule,
10179
- FaModule,
10180
- KendoModule
10181
- ],
10182
- declarations: [
10183
- COMPONENTS$1
10184
- ],
10185
- exports: [
10186
- COMPONENTS$1
10187
- ],
10188
- providers: [
10189
- ScriptService,
10190
- PayPalScriptService,
10191
- PaymentsService
10192
- ]
10193
- }]
10194
- }], null, null); })();
10195
- (function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(AnatolyBillingModule, { declarations: [OrderSummaryComponent, PaymentMethodsComponent, PaymentOptionsComponent, PaypalButtonComponent, PayPalComponent, BraintreeDialog, StripeDialog], imports: [CommonModule,
10196
- ReactiveFormsModule,
10197
- FormsModule,
10198
- FaModule,
10199
- KendoModule], exports: [OrderSummaryComponent, PaymentMethodsComponent, PaymentOptionsComponent, PaypalButtonComponent, PayPalComponent, BraintreeDialog, StripeDialog] }); })();
10200
-
10201
10274
  /*
10202
10275
  <file>
10203
10276
  Project:
@@ -10214,9 +10287,6 @@ class AnatolyBillingModule {
10214
10287
  </file>
10215
10288
  */
10216
10289
  const MAIN_COMPONENTS = [
10217
- //Billing
10218
- BuyAccessButtonComponent,
10219
- SubscribePlanButtonComponent,
10220
10290
  //Cards
10221
10291
  CardComponent,
10222
10292
  CardHeaderComponent,
@@ -10224,6 +10294,7 @@ const MAIN_COMPONENTS = [
10224
10294
  CardFooterComponent,
10225
10295
  CheckIconComponent,
10226
10296
  Copy2ClipboardComponent,
10297
+ ControlPanelComponent,
10227
10298
  DataPagerComponent,
10228
10299
  //Dropdownlists
10229
10300
  CountryDropdownlist,
@@ -10360,7 +10431,7 @@ const VALIDATION_COMPONENTS = [
10360
10431
  </file>
10361
10432
  */
10362
10433
  //Node
10363
- const COMPONENTS = [
10434
+ const COMPONENTS$1 = [
10364
10435
  MAIN_COMPONENTS,
10365
10436
  DIALOGS,
10366
10437
  DIRECTIVES,
@@ -10396,14 +10467,14 @@ class AnatolyUIModule {
10396
10467
  KendoModule
10397
10468
  ],
10398
10469
  exports: [
10399
- ...COMPONENTS
10470
+ ...COMPONENTS$1
10400
10471
  ],
10401
10472
  declarations: [
10402
- ...COMPONENTS
10473
+ ...COMPONENTS$1
10403
10474
  ]
10404
10475
  }]
10405
10476
  }], null, null); })();
10406
- (function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(AnatolyUIModule, { declarations: [BuyAccessButtonComponent, SubscribePlanButtonComponent, CardComponent, CardHeaderComponent, CardBodyComponent, CardFooterComponent, CheckIconComponent, Copy2ClipboardComponent, DataPagerComponent, CountryDropdownlist, ModerationStatusDropdownlist, PublishStatusDropdownlist, TimezoneDropdownlist, HtmlEditorComponent, SignInButtonComponent, SignUpButtonComponent, SignOutButtonComponent, NodataComponent, NoMobileSupportComponent, PageSpinnerComponent, LoadingComponent, UrlSlugComponent, FeatureWillBeReadyComponent, YouAgreeToOurTermsComponent, ContactUsDialog, NativeElementDirective, HoveringDirective, AddressComponent, CompanyComponent, ContactUsForm, SafeHtmlPipe, ReplaceTextPipe, FileSizePipe, FormValidationSummaryComponent, ItemValidationSummaryComponent], imports: [CommonModule,
10477
+ (function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(AnatolyUIModule, { declarations: [CardComponent, CardHeaderComponent, CardBodyComponent, CardFooterComponent, CheckIconComponent, Copy2ClipboardComponent, ControlPanelComponent, DataPagerComponent, CountryDropdownlist, ModerationStatusDropdownlist, PublishStatusDropdownlist, TimezoneDropdownlist, HtmlEditorComponent, SignInButtonComponent, SignUpButtonComponent, SignOutButtonComponent, NodataComponent, NoMobileSupportComponent, PageSpinnerComponent, LoadingComponent, UrlSlugComponent, FeatureWillBeReadyComponent, YouAgreeToOurTermsComponent, ContactUsDialog, NativeElementDirective, HoveringDirective, AddressComponent, CompanyComponent, ContactUsForm, SafeHtmlPipe, ReplaceTextPipe, FileSizePipe, FormValidationSummaryComponent, ItemValidationSummaryComponent], imports: [CommonModule,
10407
10478
  RouterModule,
10408
10479
  ReactiveFormsModule,
10409
10480
  FormsModule,
@@ -10411,7 +10482,95 @@ class AnatolyUIModule {
10411
10482
  FERootModule,
10412
10483
  //External Modules
10413
10484
  FaModule,
10414
- KendoModule], exports: [BuyAccessButtonComponent, SubscribePlanButtonComponent, CardComponent, CardHeaderComponent, CardBodyComponent, CardFooterComponent, CheckIconComponent, Copy2ClipboardComponent, DataPagerComponent, CountryDropdownlist, ModerationStatusDropdownlist, PublishStatusDropdownlist, TimezoneDropdownlist, HtmlEditorComponent, SignInButtonComponent, SignUpButtonComponent, SignOutButtonComponent, NodataComponent, NoMobileSupportComponent, PageSpinnerComponent, LoadingComponent, UrlSlugComponent, FeatureWillBeReadyComponent, YouAgreeToOurTermsComponent, ContactUsDialog, NativeElementDirective, HoveringDirective, AddressComponent, CompanyComponent, ContactUsForm, SafeHtmlPipe, ReplaceTextPipe, FileSizePipe, FormValidationSummaryComponent, ItemValidationSummaryComponent] }); })();
10485
+ KendoModule], exports: [CardComponent, CardHeaderComponent, CardBodyComponent, CardFooterComponent, CheckIconComponent, Copy2ClipboardComponent, ControlPanelComponent, DataPagerComponent, CountryDropdownlist, ModerationStatusDropdownlist, PublishStatusDropdownlist, TimezoneDropdownlist, HtmlEditorComponent, SignInButtonComponent, SignUpButtonComponent, SignOutButtonComponent, NodataComponent, NoMobileSupportComponent, PageSpinnerComponent, LoadingComponent, UrlSlugComponent, FeatureWillBeReadyComponent, YouAgreeToOurTermsComponent, ContactUsDialog, NativeElementDirective, HoveringDirective, AddressComponent, CompanyComponent, ContactUsForm, SafeHtmlPipe, ReplaceTextPipe, FileSizePipe, FormValidationSummaryComponent, ItemValidationSummaryComponent] }); })();
10486
+
10487
+ /*
10488
+ <file>
10489
+ Project:
10490
+ @osovitny/anatoly
10491
+
10492
+ Authors:
10493
+ Vadim Osovitny vadim.osovitny@osovitny.com
10494
+
10495
+ Created:
10496
+ 8 Nov 2024
10497
+
10498
+ Copyright (c) 2016-2025 Osovitny Inc. All rights reserved.
10499
+ </file>
10500
+ */
10501
+ const COMPONENTS = [
10502
+ BuyAccessButtonComponent,
10503
+ SubscribePlanButtonComponent,
10504
+ OrderSummaryComponent,
10505
+ PaymentMethodsComponent,
10506
+ PaymentOptionsComponent,
10507
+ //PM
10508
+ BraintreeDialog,
10509
+ PaypalButtonComponent,
10510
+ PayPalComponent,
10511
+ StripeDialog
10512
+ ];
10513
+
10514
+ /*
10515
+ <file>
10516
+ Project:
10517
+ @osovitny/anatoly
10518
+
10519
+ Authors:
10520
+ Vadim Osovitny vadim.osovitny@osovitny.com
10521
+ Anatoly Osovitny anatoly.osovitny@osovitny.com
10522
+
10523
+ Created:
10524
+ 14 Jun 2024
10525
+
10526
+ Copyright (c) 2016-2025 Osovitny Inc. All rights reserved.
10527
+ </file>
10528
+ */
10529
+ //Node
10530
+ class AnatolyBillingModule {
10531
+ static { this.ɵfac = function AnatolyBillingModule_Factory(t) { return new (t || AnatolyBillingModule)(); }; }
10532
+ static { this.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: AnatolyBillingModule }); }
10533
+ static { this.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ providers: [
10534
+ ScriptService,
10535
+ PayPalScriptService,
10536
+ PaymentsService
10537
+ ], imports: [CommonModule,
10538
+ ReactiveFormsModule,
10539
+ FormsModule,
10540
+ FaModule,
10541
+ KendoModule,
10542
+ AnatolyUIModule] }); }
10543
+ }
10544
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AnatolyBillingModule, [{
10545
+ type: NgModule,
10546
+ args: [{
10547
+ imports: [
10548
+ CommonModule,
10549
+ ReactiveFormsModule,
10550
+ FormsModule,
10551
+ FaModule,
10552
+ KendoModule,
10553
+ AnatolyUIModule
10554
+ ],
10555
+ declarations: [
10556
+ COMPONENTS
10557
+ ],
10558
+ exports: [
10559
+ COMPONENTS
10560
+ ],
10561
+ providers: [
10562
+ ScriptService,
10563
+ PayPalScriptService,
10564
+ PaymentsService
10565
+ ]
10566
+ }]
10567
+ }], null, null); })();
10568
+ (function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(AnatolyBillingModule, { declarations: [BuyAccessButtonComponent, SubscribePlanButtonComponent, OrderSummaryComponent, PaymentMethodsComponent, PaymentOptionsComponent, BraintreeDialog, PaypalButtonComponent, PayPalComponent, StripeDialog], imports: [CommonModule,
10569
+ ReactiveFormsModule,
10570
+ FormsModule,
10571
+ FaModule,
10572
+ KendoModule,
10573
+ AnatolyUIModule], exports: [BuyAccessButtonComponent, SubscribePlanButtonComponent, OrderSummaryComponent, PaymentMethodsComponent, PaymentOptionsComponent, BraintreeDialog, PaypalButtonComponent, PayPalComponent, StripeDialog] }); })();
10415
10574
 
10416
10575
  /*
10417
10576
  <file>
@@ -10476,5 +10635,5 @@ class AnatolyModule {
10476
10635
  * Generated bundle index. Do not edit.
10477
10636
  */
10478
10637
 
10479
- export { AddressComponent, AdminGuard, Alerts, AnatolyBillingModule, AnatolyCoreModule, AnatolyDataModule, AnatolyHttpInterceptor, AnatolyIAMModule, AnatolyIAMPagesModule, AnatolyModule, AnatolyUIModule, ApiServiceBase, ApiUrl, AppContextService, AppCoreSettings, AppName, AppSettings, AppVersion, AppsGoServiceBase, AuthService, AuthenticationGuard, BillingUtils, BraintreeDialog, Browser, BuyAccessButtonComponent, CardBodyComponent, CardComponent, CardFooterComponent, CardHeaderComponent, CheckIconComponent, ClientApps, CompanyComponent, ComponentBase, ContactUsDialog, ContactUsForm, Convert, Copy2ClipboardComponent, CoreApiService, CountryDropdownlist, CurrenciesApiService, CurrenciesStorageService, DOM, DataPagerComponent, DataViewType, DateConvert, DefaultEditorOptions, DialogBase, DigitalMarketingService, DiscountCodeStatus, DiscountCodeType, DiscountCodesApiService, EditComponentBase, EditPageBase, EmailsApiService, EnumEditComponentBase, FeatureWillBeReadyComponent, FileSizePipe, FormValidationSummaryComponent, GABillingEvents, GAEvents, GlobalErrorHandler, GoServiceBase, GoogleAnalyticsService, GridEditServiceBase, GridReadServiceBase, Guid, HoveringDirective, HtmlEditorComponent, HtmlEditorComponentBase, IdleService, InjectorInstance, IsDevMode, IsProdMode, ItemValidationSummaryComponent, L10NUrl, L10nUtils, ListBase, LoadingComponent, LoadingService, LocalStorageService, LocalizationInjectorInstance, LocalizationModule, LocalizationService, LocalizationSettingsModule, LocalizePipe, LoggingService, MSALUtils, ModerationStatus, ModerationStatusDropdownlist, NativeElementDirective, NoMobileSupportComponent, NodataComponent, NotificationService, OrderSummaryComponent, PageBase, PageSpinnerComponent, PagedPageBase, PayPalComponent, PayPalScriptService, PaymentMethod, PaymentMethodsComponent, PaymentOptionsComponent, PaymentStage, PaymentType, PaymentsApiService, PaymentsService, PaypalButtonComponent, PublishStatus, PublishStatusDropdownlist, QSUtils, ReplaceTextPipe, SafeHtmlPipe, ScriptService, SessionStorageService, SignInButtonComponent, SignOutButtonComponent, SignUpButtonComponent, StarterGuard, StarterService, Stopwatch, StripeDialog, Subs, SubscribePlanButtonComponent, SubscriptionsApiService, TimezoneDropdownlist, TransactionsApiService, UrlSlugComponent, Utils, ValidationSummaryComponent, XmlFormatter, YouAgreeToOurTermsComponent, dateFormats, dateTimeFormats, getAppSettingsById, getAppSettingsByName, is, localizationInitializerFactory, throwIfAlreadyLoaded, timeFormats, translateLoaderFactory };
10638
+ export { AddressComponent, AdminGuard, Alerts, AnatolyBillingModule, AnatolyCoreModule, AnatolyDataModule, AnatolyHttpInterceptor, AnatolyIAMModule, AnatolyIAMPagesModule, AnatolyModule, AnatolyUIModule, ApiServiceBase, ApiUrl, AppContextService, AppCoreSettings, AppName, AppSettings, AppVersion, AppsGoServiceBase, AuthService, AuthenticationGuard, BillingUtils, BraintreeDialog, Browser, BuyAccessButtonComponent, CardBodyComponent, CardComponent, CardFooterComponent, CardHeaderComponent, CheckIconComponent, ClientApps, CompanyComponent, ComponentBase, ContactUsDialog, ContactUsForm, ControlPanelComponent, Convert, Copy2ClipboardComponent, CoreApiService, CountryDropdownlist, CurrenciesApiService, CurrenciesStorageService, DOM, DataPagerComponent, DataViewType, DateConvert, DefaultEditorOptions, DialogBase, DigitalMarketingService, DiscountCodeStatus, DiscountCodeType, DiscountCodesApiService, EditComponentBase, EditPageBase, EmailsApiService, EnumEditComponentBase, FeatureWillBeReadyComponent, FileSizePipe, FormValidationSummaryComponent, GABillingEvents, GAEvents, GlobalErrorHandler, GoServiceBase, GoogleAnalyticsService, GridEditServiceBase, GridReadServiceBase, Guid, HoveringDirective, HtmlEditorComponent, HtmlEditorComponentBase, IdleService, InjectorInstance, IsDevMode, IsProdMode, ItemValidationSummaryComponent, L10NUrl, L10nUtils, ListBase, LoadingComponent, LoadingService, LocalStorageService, LocalizationInjectorInstance, LocalizationModule, LocalizationService, LocalizationSettingsModule, LocalizePipe, LoggingService, MSALUtils, ModerationStatus, ModerationStatusDropdownlist, NativeElementDirective, NoMobileSupportComponent, NodataComponent, NotificationService, OrderSummaryComponent, PageBase, PageSpinnerComponent, PagedPageBase, PayPalComponent, PayPalScriptService, PaymentMethod, PaymentMethodsComponent, PaymentOptionsComponent, PaymentStage, PaymentType, PaymentsApiService, PaymentsService, PaypalButtonComponent, PublishStatus, PublishStatusDropdownlist, QSUtils, ReplaceTextPipe, SafeHtmlPipe, ScriptService, SessionStorageService, SignInButtonComponent, SignOutButtonComponent, SignUpButtonComponent, StarterGuard, StarterService, Stopwatch, StripeDialog, Subs, SubscribePlanButtonComponent, SubscriptionsApiService, TimezoneDropdownlist, TransactionsApiService, UrlSlugComponent, Utils, ValidationSummaryComponent, XmlFormatter, YouAgreeToOurTermsComponent, dateFormats, dateTimeFormats, getAppSettingsById, getAppSettingsByName, is, localizationInitializerFactory, throwIfAlreadyLoaded, timeFormats, translateLoaderFactory };
10480
10639
  //# sourceMappingURL=osovitny-anatoly.mjs.map