@bitblit/ngx-acute-common 5.0.516-alpha → 5.0.518-alpha

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 (61) hide show
  1. package/lib/acute-common.module.js +94 -0
  2. package/lib/acute-common.module.js.map +1 -0
  3. package/lib/build/ngx-acute-common-info.js +15 -0
  4. package/lib/build/ngx-acute-common-info.js.map +1 -0
  5. package/lib/components/dialogs/alert/alert.component.js +46 -0
  6. package/lib/components/dialogs/alert/alert.component.js.map +1 -0
  7. package/lib/components/dialogs/block-ui/block-ui.component.js +78 -0
  8. package/lib/components/dialogs/block-ui/block-ui.component.js.map +1 -0
  9. package/lib/esm2022/ngx-acute-common.mjs +50 -17
  10. package/lib/esm2022/ngx-acute-common.mjs.map +1 -1
  11. package/lib/{esm2022/index.d.ts → index.js} +3 -1
  12. package/lib/index.js.map +1 -0
  13. package/lib/model/google-analytics-config.js +2 -0
  14. package/lib/model/google-analytics-config.js.map +1 -0
  15. package/lib/pipes/capitalize.pipe.js +16 -0
  16. package/lib/pipes/capitalize.pipe.js.map +1 -0
  17. package/lib/pipes/dollar-formatted.pipe.js +18 -0
  18. package/lib/pipes/dollar-formatted.pipe.js.map +1 -0
  19. package/lib/pipes/map-values.pipe.js +23 -0
  20. package/lib/pipes/map-values.pipe.js.map +1 -0
  21. package/lib/pipes/number-with-commas.pipe.js +14 -0
  22. package/lib/pipes/number-with-commas.pipe.js.map +1 -0
  23. package/lib/pipes/order-by.pipe.js +59 -0
  24. package/lib/pipes/order-by.pipe.js.map +1 -0
  25. package/lib/pipes/percent-formatted.pipe.js +15 -0
  26. package/lib/pipes/percent-formatted.pipe.js.map +1 -0
  27. package/lib/pipes/plural.pipe.js +19 -0
  28. package/lib/pipes/plural.pipe.js.map +1 -0
  29. package/lib/pipes/round.pipe.js +14 -0
  30. package/lib/pipes/round.pipe.js.map +1 -0
  31. package/lib/pipes/time-ago-formatted.pipe.js +16 -0
  32. package/lib/pipes/time-ago-formatted.pipe.js.map +1 -0
  33. package/lib/pipes/timing.pipe.js +22 -0
  34. package/lib/pipes/timing.pipe.js.map +1 -0
  35. package/lib/services/google-analytics.service.js +61 -0
  36. package/lib/services/google-analytics.service.js.map +1 -0
  37. package/lib/services/graphql-query.service.js +87 -0
  38. package/lib/services/graphql-query.service.js.map +1 -0
  39. package/lib/services/local-storage.service.js +51 -0
  40. package/lib/services/local-storage.service.js.map +1 -0
  41. package/lib/services/window-ref.service.js +22 -0
  42. package/lib/services/window-ref.service.js.map +1 -0
  43. package/package.json +7 -3
  44. package/lib/esm2022/build/ngx-acute-common-info.d.ts +0 -5
  45. package/lib/esm2022/components/dialogs/alert/alert.component.d.ts +0 -9
  46. package/lib/esm2022/components/dialogs/block-ui/block-ui.component.d.ts +0 -9
  47. package/lib/esm2022/model/google-analytics-config.d.ts +0 -3
  48. package/lib/esm2022/pipes/capitalize.pipe.d.ts +0 -4
  49. package/lib/esm2022/pipes/dollar-formatted.pipe.d.ts +0 -4
  50. package/lib/esm2022/pipes/map-values.pipe.d.ts +0 -4
  51. package/lib/esm2022/pipes/number-with-commas.pipe.d.ts +0 -4
  52. package/lib/esm2022/pipes/order-by.pipe.d.ts +0 -5
  53. package/lib/esm2022/pipes/percent-formatted.pipe.d.ts +0 -4
  54. package/lib/esm2022/pipes/plural.pipe.d.ts +0 -4
  55. package/lib/esm2022/pipes/round.pipe.d.ts +0 -4
  56. package/lib/esm2022/pipes/time-ago-formatted.pipe.d.ts +0 -4
  57. package/lib/esm2022/pipes/timing.pipe.d.ts +0 -5
  58. package/lib/esm2022/services/google-analytics.service.d.ts +0 -9
  59. package/lib/esm2022/services/graphql-query.service.d.ts +0 -14
  60. package/lib/esm2022/services/local-storage.service.d.ts +0 -8
  61. package/lib/esm2022/services/window-ref.service.d.ts +0 -3
@@ -0,0 +1 @@
1
+ {"version":3,"file":"capitalize.pipe.js","sourceRoot":"","sources":["../../src/pipes/capitalize.pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAiB,MAAM,eAAe,CAAC;;AAGpD,MAAM,OAAO,cAAc;IAEzB,SAAS,CAAC,KAAa;QACrB,OAAO,KAAK,IAAI,KAAK,CAAC,MAAM;YAC1B,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;YAChE,CAAC,CAAC,KAAK,CAAC;IACZ,CAAC;wGANU,cAAc;oEAAd,cAAc;;iFAAd,cAAc;cAD1B,IAAI;eAAC,EAAE,IAAI,EAAE,iBAAiB,EAAE"}
@@ -0,0 +1,18 @@
1
+ import { Pipe } from '@angular/core';
2
+ import { CurrencyRatchet } from "@bitblit/ratchet-common/lang/currency-ratchet";
3
+ import * as i0 from "@angular/core";
4
+ export class DollarFormattedPipe {
5
+ transform(input) {
6
+ const rval = input === null || input === undefined
7
+ ? 'Null'
8
+ : CurrencyRatchet.dollarFormat(input);
9
+ return rval;
10
+ }
11
+ static ɵfac = function DollarFormattedPipe_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || DollarFormattedPipe)(); };
12
+ static ɵpipe = i0.ɵɵdefinePipe({ name: "acuteDollars", type: DollarFormattedPipe, pure: true });
13
+ }
14
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(DollarFormattedPipe, [{
15
+ type: Pipe,
16
+ args: [{ name: 'acuteDollars' }]
17
+ }], null, null); })();
18
+ //# sourceMappingURL=dollar-formatted.pipe.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dollar-formatted.pipe.js","sourceRoot":"","sources":["../../src/pipes/dollar-formatted.pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAiB,MAAM,eAAe,CAAC;AACpD,OAAO,EAAC,eAAe,EAAC,MAAM,+CAA+C,CAAC;;AAG9E,MAAM,OAAO,mBAAmB;IAC9B,SAAS,CAAC,KAAa;QACrB,MAAM,IAAI,GACR,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS;YACnC,CAAC,CAAC,MAAM;YACR,CAAC,CAAC,eAAe,CAAC,YAAY,CAAC,KAAK,CAAC,CAAA;QACzC,OAAO,IAAI,CAAC;IACd,CAAC;6GAPU,mBAAmB;iEAAnB,mBAAmB;;iFAAnB,mBAAmB;cAD/B,IAAI;eAAC,EAAE,IAAI,EAAE,cAAc,EAAC"}
@@ -0,0 +1,23 @@
1
+ import { Pipe } from '@angular/core';
2
+ import { Logger } from '@bitblit/ratchet-common/logger/logger';
3
+ import * as i0 from "@angular/core";
4
+ export class MapValuesPipe {
5
+ transform(value, args) {
6
+ const returnArray = [];
7
+ for (const k of Object.keys(value)) {
8
+ returnArray.push({
9
+ key: k,
10
+ val: value[k],
11
+ });
12
+ }
13
+ Logger.info('Map values : %j : %j', returnArray, args);
14
+ return returnArray;
15
+ }
16
+ static ɵfac = function MapValuesPipe_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || MapValuesPipe)(); };
17
+ static ɵpipe = i0.ɵɵdefinePipe({ name: "acuteMapValues", type: MapValuesPipe, pure: true });
18
+ }
19
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MapValuesPipe, [{
20
+ type: Pipe,
21
+ args: [{ name: 'acuteMapValues' }]
22
+ }], null, null); })();
23
+ //# sourceMappingURL=map-values.pipe.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"map-values.pipe.js","sourceRoot":"","sources":["../../src/pipes/map-values.pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAiB,MAAM,eAAe,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,uCAAuC,CAAC;;AAG/D,MAAM,OAAO,aAAa;IACxB,SAAS,CAAC,KAAU,EAAE,IAAY;QAChC,MAAM,WAAW,GAAG,EAAE,CAAC;QAEvB,KAAK,MAAM,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;YACnC,WAAW,CAAC,IAAI,CAAC;gBACf,GAAG,EAAE,CAAC;gBACN,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC;aACd,CAAC,CAAC;QACL,CAAC;QAED,MAAM,CAAC,IAAI,CAAC,sBAAsB,EAAE,WAAW,EAAE,IAAI,CAAC,CAAC;QACvD,OAAO,WAAW,CAAC;IACrB,CAAC;uGAbU,aAAa;mEAAb,aAAa;;iFAAb,aAAa;cADzB,IAAI;eAAC,EAAE,IAAI,EAAE,gBAAgB,EAAE"}
@@ -0,0 +1,14 @@
1
+ import { Pipe } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export class NumberWithCommasPipe {
4
+ transform(input) {
5
+ return new Intl.NumberFormat().format(input);
6
+ }
7
+ static ɵfac = function NumberWithCommasPipe_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || NumberWithCommasPipe)(); };
8
+ static ɵpipe = i0.ɵɵdefinePipe({ name: "acuteNumberWithCommas", type: NumberWithCommasPipe, pure: true });
9
+ }
10
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(NumberWithCommasPipe, [{
11
+ type: Pipe,
12
+ args: [{ name: 'acuteNumberWithCommas' }]
13
+ }], null, null); })();
14
+ //# sourceMappingURL=number-with-commas.pipe.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"number-with-commas.pipe.js","sourceRoot":"","sources":["../../src/pipes/number-with-commas.pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAiB,MAAM,eAAe,CAAC;;AAGpD,MAAM,OAAO,oBAAoB;IAE/B,SAAS,CAAC,KAAa;QACrB,OAAO,IAAI,IAAI,CAAC,YAAY,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAC/C,CAAC;8GAJU,oBAAoB;0EAApB,oBAAoB;;iFAApB,oBAAoB;cADhC,IAAI;eAAC,EAAE,IAAI,EAAE,uBAAuB,EAAE"}
@@ -0,0 +1,59 @@
1
+ import { Pipe } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export class OrderByPipe {
4
+ static _orderByComparator(a, b) {
5
+ if (isNaN(parseFloat(a)) || !isFinite(a) || isNaN(parseFloat(b)) || !isFinite(b)) {
6
+ if (String(a).toLowerCase() < String(b).toLowerCase())
7
+ return -1;
8
+ if (String(a).toLowerCase() > String(b).toLowerCase())
9
+ return 1;
10
+ }
11
+ else {
12
+ if (parseFloat(a) < parseFloat(b))
13
+ return -1;
14
+ if (parseFloat(a) > parseFloat(b))
15
+ return 1;
16
+ }
17
+ return 0;
18
+ }
19
+ transform(input, [config = '+']) {
20
+ if (!Array.isArray(input))
21
+ return input;
22
+ if (!Array.isArray(config) || (Array.isArray(config) && config.length == 1)) {
23
+ const propertyToCheck = !Array.isArray(config) ? config : config[0];
24
+ const desc = propertyToCheck.substr(0, 1) == '-';
25
+ if (!propertyToCheck || propertyToCheck == '-' || propertyToCheck == '+') {
26
+ return !desc ? input.sort() : input.sort().reverse();
27
+ }
28
+ else {
29
+ const property = propertyToCheck.substr(0, 1) == '+' || propertyToCheck.substr(0, 1) == '-' ? propertyToCheck.substr(1) : propertyToCheck;
30
+ return input.sort(function (a, b) {
31
+ return !desc
32
+ ? OrderByPipe._orderByComparator(a[property], b[property])
33
+ : -OrderByPipe._orderByComparator(a[property], b[property]);
34
+ });
35
+ }
36
+ }
37
+ else {
38
+ return input.sort(function (a, b) {
39
+ for (let i = 0; i < config.length; i++) {
40
+ const desc = config[i].substr(0, 1) == '-';
41
+ const property = config[i].substr(0, 1) == '+' || config[i].substr(0, 1) == '-' ? config[i].substr(1) : config[i];
42
+ const comparison = !desc
43
+ ? OrderByPipe._orderByComparator(a[property], b[property])
44
+ : -OrderByPipe._orderByComparator(a[property], b[property]);
45
+ if (comparison != 0)
46
+ return comparison;
47
+ }
48
+ return 0;
49
+ });
50
+ }
51
+ }
52
+ static ɵfac = function OrderByPipe_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || OrderByPipe)(); };
53
+ static ɵpipe = i0.ɵɵdefinePipe({ name: "acuteOrderBy", type: OrderByPipe, pure: false });
54
+ }
55
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(OrderByPipe, [{
56
+ type: Pipe,
57
+ args: [{ name: 'acuteOrderBy', pure: false }]
58
+ }], null, null); })();
59
+ //# sourceMappingURL=order-by.pipe.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"order-by.pipe.js","sourceRoot":"","sources":["../../src/pipes/order-by.pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAiB,MAAM,eAAe,CAAC;;AAGpD,MAAM,OAAO,WAAW;IACtB,MAAM,CAAC,kBAAkB,CAAC,CAAM,EAAE,CAAM;QACtC,IAAI,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC;YAEjF,IAAI,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE;gBAAE,OAAO,CAAC,CAAC,CAAC;YACjE,IAAI,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE;gBAAE,OAAO,CAAC,CAAC;QAClE,CAAC;aAAM,CAAC;YAEN,IAAI,UAAU,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC;gBAAE,OAAO,CAAC,CAAC,CAAC;YAC7C,IAAI,UAAU,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC;gBAAE,OAAO,CAAC,CAAC;QAC9C,CAAC;QAED,OAAO,CAAC,CAAC;IACX,CAAC;IAED,SA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,KAAK,EAAE"}
@@ -0,0 +1,15 @@
1
+ import { Pipe } from '@angular/core';
2
+ import { NumberRatchet } from "@bitblit/ratchet-common/lang/number-ratchet";
3
+ import * as i0 from "@angular/core";
4
+ export class PercentFormattedPipe {
5
+ transform(input) {
6
+ return NumberRatchet.pctFormatted(input);
7
+ }
8
+ static ɵfac = function PercentFormattedPipe_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || PercentFormattedPipe)(); };
9
+ static ɵpipe = i0.ɵɵdefinePipe({ name: "acutePercent", type: PercentFormattedPipe, pure: true });
10
+ }
11
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PercentFormattedPipe, [{
12
+ type: Pipe,
13
+ args: [{ name: 'acutePercent' }]
14
+ }], null, null); })();
15
+ //# sourceMappingURL=percent-formatted.pipe.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"percent-formatted.pipe.js","sourceRoot":"","sources":["../../src/pipes/percent-formatted.pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAiB,MAAM,eAAe,CAAC;AACpD,OAAO,EAAC,aAAa,EAAC,MAAM,6CAA6C,CAAC;;AAG1E,MAAM,OAAO,oBAAoB;IAC/B,SAAS,CAAC,KAAa;QACrB,OAAO,aAAa,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;IAC3C,CAAC;8GAHU,oBAAoB;iEAApB,oBAAoB;;iFAApB,oBAAoB;cADhC,IAAI;eAAC,EAAE,IAAI,EAAE,cAAc,EAAG"}
@@ -0,0 +1,19 @@
1
+ import { Pipe } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export class PluralPipe {
4
+ transform(input, label, pluralLabel = '') {
5
+ input = input || 0;
6
+ return input === 1
7
+ ? `${input} ${label}`
8
+ : pluralLabel
9
+ ? `${input} ${pluralLabel}`
10
+ : `${input} ${label}s`;
11
+ }
12
+ static ɵfac = function PluralPipe_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || PluralPipe)(); };
13
+ static ɵpipe = i0.ɵɵdefinePipe({ name: "acutePlural", type: PluralPipe, pure: true });
14
+ }
15
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PluralPipe, [{
16
+ type: Pipe,
17
+ args: [{ name: 'acutePlural' }]
18
+ }], null, null); })();
19
+ //# sourceMappingURL=plural.pipe.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plural.pipe.js","sourceRoot":"","sources":["../../src/pipes/plural.pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAiB,MAAM,eAAe,CAAC;;AAGpD,MAAM,OAAO,UAAU;IAErB,SAAS,CAAC,KAAa,EAAE,KAAa,EAAE,cAAsB,EAAE;QAC9D,KAAK,GAAG,KAAK,IAAI,CAAC,CAAC;QACnB,OAAO,KAAK,KAAK,CAAC;YAChB,CAAC,CAAC,GAAG,KAAK,IAAI,KAAK,EAAE;YACrB,CAAC,CAAC,WAAW;gBACX,CAAC,CAAC,GAAG,KAAK,IAAI,WAAW,EAAE;gBAC3B,CAAC,CAAC,GAAG,KAAK,IAAI,KAAK,GAAG,CAAC;IAC7B,CAAC;oGATU,UAAU;gEAAV,UAAU;;iFAAV,UAAU;cADtB,IAAI;eAAC,EAAE,IAAI,EAAE,aAAa,EAAE"}
@@ -0,0 +1,14 @@
1
+ import { Pipe } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export class RoundPipe {
4
+ transform(input) {
5
+ return Math.round(input);
6
+ }
7
+ static ɵfac = function RoundPipe_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || RoundPipe)(); };
8
+ static ɵpipe = i0.ɵɵdefinePipe({ name: "acuteRound", type: RoundPipe, pure: true });
9
+ }
10
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(RoundPipe, [{
11
+ type: Pipe,
12
+ args: [{ name: 'acuteRound' }]
13
+ }], null, null); })();
14
+ //# sourceMappingURL=round.pipe.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"round.pipe.js","sourceRoot":"","sources":["../../src/pipes/round.pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAiB,MAAM,eAAe,CAAC;;AAGpD,MAAM,OAAO,SAAS;IAEpB,SAAS,CAAC,KAAa;QACrB,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAC3B,CAAC;mGAJU,SAAS;+DAAT,SAAS;;iFAAT,SAAS;cADrB,IAAI;eAAC,EAAE,IAAI,EAAE,YAAY,EAAE"}
@@ -0,0 +1,16 @@
1
+ import { Pipe } from '@angular/core';
2
+ import { DurationRatchet } from "@bitblit/ratchet-common/lang/duration-ratchet";
3
+ import { NumberRatchet } from "@bitblit/ratchet-common/lang/number-ratchet";
4
+ import * as i0 from "@angular/core";
5
+ export class TimeAgoFormattedPipe {
6
+ transform(input) {
7
+ return DurationRatchet.formatMsDuration(new Date().getTime() - NumberRatchet.safeNumber(input));
8
+ }
9
+ static ɵfac = function TimeAgoFormattedPipe_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || TimeAgoFormattedPipe)(); };
10
+ static ɵpipe = i0.ɵɵdefinePipe({ name: "acuteTimeAgo", type: TimeAgoFormattedPipe, pure: true });
11
+ }
12
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(TimeAgoFormattedPipe, [{
13
+ type: Pipe,
14
+ args: [{ name: 'acuteTimeAgo' }]
15
+ }], null, null); })();
16
+ //# sourceMappingURL=time-ago-formatted.pipe.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"time-ago-formatted.pipe.js","sourceRoot":"","sources":["../../src/pipes/time-ago-formatted.pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAgB,MAAM,eAAe,CAAC;AAClD,OAAO,EAAC,eAAe,EAAC,MAAM,+CAA+C,CAAC;AAC9E,OAAO,EAAC,aAAa,EAAC,MAAM,6CAA6C,CAAC;;AAG1E,MAAM,OAAO,oBAAoB;IAC/B,SAAS,CAAC,KAAa;QACrB,OAAO,eAAe,CAAC,gBAAgB,CAAC,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,GAAG,aAAa,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC;IAClG,CAAC;8GAHU,oBAAoB;iEAApB,oBAAoB;;iFAApB,oBAAoB;cADhC,IAAI;eAAC,EAAE,IAAI,EAAE,cAAc,EAAE"}
@@ -0,0 +1,22 @@
1
+ import { Pipe } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export class TimingPipe {
4
+ transform(time) {
5
+ if (time) {
6
+ const minutes = Math.floor(time / 60);
7
+ const seconds = Math.floor(time % 60);
8
+ return `${this.initZero(minutes)}${minutes}:${this.initZero(seconds)}${seconds}`;
9
+ }
10
+ return '00:00';
11
+ }
12
+ initZero(time) {
13
+ return time < 10 ? '0' : '';
14
+ }
15
+ static ɵfac = function TimingPipe_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || TimingPipe)(); };
16
+ static ɵpipe = i0.ɵɵdefinePipe({ name: "acuteTiming", type: TimingPipe, pure: true });
17
+ }
18
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(TimingPipe, [{
19
+ type: Pipe,
20
+ args: [{ name: 'acuteTiming' }]
21
+ }], null, null); })();
22
+ //# sourceMappingURL=timing.pipe.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"timing.pipe.js","sourceRoot":"","sources":["../../src/pipes/timing.pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAiB,MAAM,eAAe,CAAC;;AAGpD,MAAM,OAAO,UAAU;IACrB,SAAS,CAAC,IAAY;QACpB,IAAI,IAAI,EAAE,CAAC;YACT,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,EAAE,CAAC,CAAC;YACtC,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,EAAE,CAAC,CAAC;YACtC,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,OAAO,IAAI,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,OAAO,EAAE,CAAC;QACnF,CAAC;QAED,OAAO,OAAO,CAAC;IACjB,CAAC;IAEO,QAAQ,CAAC,IAAY;QAC3B,OAAO,IAAI,GAAG,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;IAC9B,CAAC;oGAbU,UAAU;gEAAV,UAAU;;iFAAV,UAAU;cADtB,IAAI;eAAC,EAAE,IAAI,EAAE,aAAa,EAAE"}
@@ -0,0 +1,61 @@
1
+ import { Injectable } from '@angular/core';
2
+ import { NavigationEnd, Router } from '@angular/router';
3
+ import { Logger } from '@bitblit/ratchet-common/logger/logger';
4
+ import * as i0 from "@angular/core";
5
+ import * as i1 from "@angular/router";
6
+ export class GoogleAnalyticsService {
7
+ router;
8
+ static IS_PROD = true;
9
+ constructor(router) {
10
+ this.router = router;
11
+ }
12
+ initialize() {
13
+ this.onRouteChange();
14
+ try {
15
+ const url = 'https://www.googletagmanager.com/gtag/js?id=';
16
+ const gTagScript = document.createElement('script');
17
+ gTagScript.async = true;
18
+ const tagId = GoogleAnalyticsService.IS_PROD ? 'G-7D5BBK4K8X' : null;
19
+ gTagScript.src = `${url}${tagId}`;
20
+ document.head.appendChild(gTagScript);
21
+ const dataLayerScript = document.createElement('script');
22
+ dataLayerScript.innerHTML = `
23
+ window.dataLayer = window.dataLayer || [];
24
+ function gtag(){dataLayer.push(arguments);}
25
+ gtag('js', new Date());
26
+ gtag('config', '${tagId}', {'send_page_view': false});`;
27
+ document.head.appendChild(dataLayerScript);
28
+ }
29
+ catch (e) {
30
+ Logger.error('Error adding Google Analytics', e, e);
31
+ }
32
+ }
33
+ onRouteChange() {
34
+ const tagId = GoogleAnalyticsService.IS_PROD ? 'G-7D5BBK4K8X' : null;
35
+ this.router.events.subscribe((event) => {
36
+ if (event instanceof NavigationEnd) {
37
+ gtag('config', tagId, {
38
+ page_path: event.urlAfterRedirects,
39
+ });
40
+ Logger.info('Sending Google Analytics tracking for: ', event.urlAfterRedirects);
41
+ Logger.info('Google Analytics property ID: ', tagId);
42
+ }
43
+ });
44
+ }
45
+ event(action, eventCategory, eventLabel, value) {
46
+ gtag('event', action, {
47
+ ...(eventCategory && { event_category: eventCategory }),
48
+ ...(eventLabel && { event_label: eventLabel }),
49
+ ...(value && { value: value }),
50
+ });
51
+ }
52
+ static ɵfac = function GoogleAnalyticsService_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || GoogleAnalyticsService)(i0.ɵɵinject(i1.Router)); };
53
+ static ɵprov = i0.ɵɵdefineInjectable({ token: GoogleAnalyticsService, factory: GoogleAnalyticsService.ɵfac, providedIn: 'root' });
54
+ }
55
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(GoogleAnalyticsService, [{
56
+ type: Injectable,
57
+ args: [{
58
+ providedIn: 'root',
59
+ }]
60
+ }], () => [{ type: i1.Router }], null); })();
61
+ //# sourceMappingURL=google-analytics.service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"google-analytics.service.js","sourceRoot":"","sources":["../../src/services/google-analytics.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,uCAAuC,CAAC;;;AAS/D,MAAM,OAAO,sBAAsB;IAGb;IAFZ,MAAM,CAAU,OAAO,GAAY,IAAI,CAAC;IAEhD,YAAoB,MAAc;QAAd,WAAM,GAAN,MAAM,CAAQ;IAAG,CAAC;IAE/B,UAAU;QACf,IAAI,CAAC,aAAa,EAAE,CAAC;QAGrB,IAAI,CAAC;YACH,MAAM,GAAG,GAAU,8CAA8C,CAAC;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EAAE,UAAmB,EAAE,KAAc;QACtF,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE;YACpB,GAAG,CAAC,aAAa,IAAI,EAAE,cAAc,EAAE,aAAa,EAAE,CAAC;YACvD,GAAG,CAAC,UAAU,IAAI,EAAE,WAAW,EAAE,UAAU,EAAE,CAAC;YAC9C,GAAG,CAAC,KAAK,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC;SAC/B,CAAC,CAAC;IACL,CAAC;gHApDU,sBAAsB;kDAAtB,sBAAsB,WAAtB,sBAAsB,mBAHrB,MAAM;;iFAGP,sBAAsB;cAJlC,UAAU;eAAC;gBACV,UAAU,EAAE,MAAM;aACnB"}
@@ -0,0 +1,87 @@
1
+ import { Injectable } from '@angular/core';
2
+ import { DialogService } from 'primeng/dynamicdialog';
3
+ import { MessageService } from 'primeng/api';
4
+ import { Logger } from '@bitblit/ratchet-common/logger/logger';
5
+ import { GraphqlRatchet } from '@bitblit/ratchet-graphql/graphql/graphql-ratchet';
6
+ import { BlockUiComponent } from "../components/dialogs/block-ui/block-ui.component";
7
+ import { AuthorizationStyle } from "@bitblit/ratchet-graphql/graphql/authorization-style";
8
+ import * as i0 from "@angular/core";
9
+ import * as i1 from "@bitblit/ratchet-graphql/graphql/graphql-ratchet";
10
+ import * as i2 from "primeng/dynamicdialog";
11
+ import * as i3 from "primeng/api";
12
+ export class GraphqlQueryService {
13
+ graphqlRatchet;
14
+ dialogService;
15
+ messageService;
16
+ constructor(graphqlRatchet, dialogService, messageService) {
17
+ this.graphqlRatchet = graphqlRatchet;
18
+ this.dialogService = dialogService;
19
+ this.messageService = messageService;
20
+ }
21
+ async executeQuery(queryName, variables, authStyle = AuthorizationStyle.TokenRequired) {
22
+ let rval = null;
23
+ this.messageService.add({ severity: 'info', summary: 'Running query', detail: queryName, life: 3000 });
24
+ Logger.info('eq: %j -: %s --: %s ---: %j', queryName, variables);
25
+ try {
26
+ rval = await this.graphqlRatchet.executeQuery(queryName, variables, authStyle);
27
+ }
28
+ catch (err) {
29
+ Logger.error('Fail : %s', err);
30
+ }
31
+ finally {
32
+ this.messageService.clear();
33
+ }
34
+ return rval;
35
+ }
36
+ async executeQueryWithBlock(blockMessage, queryName, variables, authStyle = AuthorizationStyle.TokenRequired) {
37
+ let rval = null;
38
+ this.messageService.add({ severity: 'info', summary: 'Running query', detail: queryName, life: 3000 });
39
+ Logger.info('eqb: %j -: %s --: %s ---: %j', blockMessage, queryName, variables);
40
+ try {
41
+ rval = await BlockUiComponent.runPromiseWithUiBlock(this.dialogService, this.graphqlRatchet.executeQuery(queryName, variables, authStyle), blockMessage);
42
+ }
43
+ catch (err) {
44
+ Logger.error('Fail : %s', err);
45
+ }
46
+ finally {
47
+ this.messageService.clear();
48
+ }
49
+ return rval;
50
+ }
51
+ async executeMutate(queryName, variables, authStyle = AuthorizationStyle.TokenRequired) {
52
+ let rval = null;
53
+ this.messageService.add({ severity: 'info', summary: 'Running query', detail: queryName, life: 3000 });
54
+ Logger.info('eq: %j -: %s --: %s ---: %j', queryName, variables);
55
+ try {
56
+ rval = await this.graphqlRatchet.executeMutate(queryName, variables, authStyle);
57
+ }
58
+ catch (err) {
59
+ Logger.error('Fail : %s', err);
60
+ }
61
+ finally {
62
+ this.messageService.clear();
63
+ }
64
+ return rval;
65
+ }
66
+ async executeMutateWithBlock(blockMessage, queryName, variables, authStyle = AuthorizationStyle.TokenRequired) {
67
+ let rval = null;
68
+ this.messageService.add({ severity: 'info', summary: 'Running query', detail: queryName, life: 3000 });
69
+ try {
70
+ rval = await BlockUiComponent.runPromiseWithUiBlock(this.dialogService, this.graphqlRatchet.executeMutate(queryName, variables, authStyle), blockMessage);
71
+ }
72
+ catch (err) {
73
+ Logger.error('Fail : %s', err);
74
+ }
75
+ finally {
76
+ this.messageService.clear();
77
+ }
78
+ return rval;
79
+ }
80
+ static ɵfac = function GraphqlQueryService_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || GraphqlQueryService)(i0.ɵɵinject(i1.GraphqlRatchet), i0.ɵɵinject(i2.DialogService), i0.ɵɵinject(i3.MessageService)); };
81
+ static ɵprov = i0.ɵɵdefineInjectable({ token: GraphqlQueryService, factory: GraphqlQueryService.ɵfac, providedIn: 'root' });
82
+ }
83
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(GraphqlQueryService, [{
84
+ type: Injectable,
85
+ args: [{ providedIn: 'root' }]
86
+ }], () => [{ type: i1.GraphqlRatchet }, { type: i2.DialogService }, { type: i3.MessageService }], null); })();
87
+ //# sourceMappingURL=graphql-query.service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"graphql-query.service.js","sourceRoot":"","sources":["../../src/services/graphql-query.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,MAAM,EAAE,MAAM,uCAAuC,CAAC;AAC/D,OAAO,EAAE,cAAc,EAAE,MAAM,kDAAkD,CAAC;AAClF,OAAO,EAAE,gBAAgB,EAAE,MAAM,mDAAmD,CAAC;AACrF,OAAO,EAAC,kBAAkB,EAAC,MAAM,sDAAsD,CAAC;;;;;AAGxF,MAAM,OAAO,mBAAmB;IAEpB;IACA;IACA;IAHV,YACU,cAA8B,EAC9B,aAA4B,EAC5B,cAA8B;QAF9B,mBAAc,GAAd,cAAc,CAAgB;QAC9B,kBAAa,GAAb,aAAa,CAAe;QAC5B,mBAAc,GAAd,cAAc,CAAgB;IACrC,CAAC;IAEG,KAAK,CAAC,YAAY,CAAI,SAAiB,EAAE,SAAc,EAAM,YAAgC,kBAAkB,CAAC,aAAa;QAElI,IAAI,IAAI,GAAa,IAAI,CAAC;QAC1B,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,eAA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AC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,MAAM,CAAC,KAAK,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC;QACjC,CAAC;gBAAS,CAAC;YACT,IAAI,CAAC,cAAc,CAAC,KAAK,EAAE,CAAC;QAC9B,CAAC;QAED,OAAO,IAAI,CAAC;IACd,CAAC;6GA5FU,mBAAmB;kDAAnB,mBAAmB,WAAnB,mBAAmB,mBADP,MAAM;;iFAClB,mBAAmB;cAD/B,UAAU;eAAC,EAAC,UAAU,EAAE,MAAM,EAAC"}
@@ -0,0 +1,51 @@
1
+ import { Injectable } from '@angular/core';
2
+ import { Logger } from '@bitblit/ratchet-common/logger/logger';
3
+ import * as i0 from "@angular/core";
4
+ export function storageFinder() {
5
+ if (typeof window !== 'undefined') {
6
+ if (typeof window.localStorage !== 'undefined') {
7
+ return window.localStorage;
8
+ }
9
+ }
10
+ return null;
11
+ }
12
+ export class LocalStorageService {
13
+ static APP_NAME = 'Scribe';
14
+ get storageReady() {
15
+ return !!storageFinder();
16
+ }
17
+ clear() {
18
+ this.update({});
19
+ }
20
+ update(value) {
21
+ if (this.storageReady) {
22
+ const toSave = value || {};
23
+ const saveString = JSON.stringify(toSave);
24
+ Logger.info('Updating storage to %s', saveString);
25
+ localStorage.setItem(LocalStorageService.APP_NAME, saveString);
26
+ return toSave;
27
+ }
28
+ else {
29
+ Logger.info('Skipping update - storage not ready : %j', value);
30
+ return {};
31
+ }
32
+ }
33
+ fetch() {
34
+ if (this.storageReady) {
35
+ const loadString = localStorage.getItem(LocalStorageService.APP_NAME) || '{}';
36
+ const rval = JSON.parse(loadString);
37
+ return rval;
38
+ }
39
+ else {
40
+ Logger.info('Skipping fetch - storage not ready');
41
+ return {};
42
+ }
43
+ }
44
+ static ɵfac = function LocalStorageService_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || LocalStorageService)(); };
45
+ static ɵprov = i0.ɵɵdefineInjectable({ token: LocalStorageService, factory: LocalStorageService.ɵfac, providedIn: 'root' });
46
+ }
47
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LocalStorageService, [{
48
+ type: Injectable,
49
+ args: [{ providedIn: 'root' }]
50
+ }], null, null); })();
51
+ //# sourceMappingURL=local-storage.service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"local-storage.service.js","sourceRoot":"","sources":["../../src/services/local-storage.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,uCAAuC,CAAC;;AAG/D,MAAM,UAAU,aAAa;IAC3B,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE,CAAC;QAClC,IAAI,OAAO,MAAM,CAAC,YAAY,KAAI,WAAW,EAAE,CAAC;YAC9C,OAAO,MAAM,CAAC,YAAY,CAAC;QAC7B,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAGD,MAAM,OAAO,mBAAmB;IACtB,MAAM,CAAU,QAAQ,GAAW,QAAQ,CAAC;IAEpD,IAAW,YAAY;QACrB,OAAO,CAAC,CAAC,aAAa,EAAE,CAAC;IAC3B,CAAC;IAEM,KAAK;QACV,IAAI,CAAC,MAAM,CAAC,EAAQ,CAAE,CAAC;IACzB,CAAC;IAEM,MAAM,CAAC,KAAQ;QACpB,IAAI,IAAI,CAAC,YAAY,EAAE,CAAC;YACtB,MAAM,MAAM,GAAM,KAAK,IAAK,EAAQ,CAAC;YACrC,MAAM,UAAU,GAAW,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;YAClD,MAAM,CAAC,IAAI,CAAC,wBAAwB,EAAE,UAAU,CAAC,CAAC;YAClD,YAAY,CAAC,OAAO,CAAC,mBAAmB,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC;YAC/D,OAAO,MAAM,CAAC;QAChB,CAAC;aAAM,CAAC;YACN,MAAM,CAAC,IAAI,CAAC,0CAA0C,EAAE,KAAK,CAAC,CAAC;YAC/D,OAAO,EAAO,CAAC;QACjB,CAAC;IACH,CAAC;IAED,KAAK;QACH,IAAI,IAAI,CAAC,YAAY,EAAE,CAAC;YACtB,MAAM,UAAU,GAAW,YAAY,CAAC,OAAO,CAAC,mBAAmB,CAAC,QAAQ,CAAC,IAAI,IAAI,CAAC;YACtF,MAAM,IAAI,GAAM,IAAI,CAAC,KAAK,CAAC,UAAU,CAAM,CAAC;YAC5C,OAAO,IAAI,CAAC;QACd,CAAC;aAAM,CAAC;YACN,MAAM,CAAC,IAAI,CAAC,oCAAoC,CAAC,CAAC;YAClD,OAAO,EAAO,CAAC;QACjB,CAAC;IACH,CAAC;6GAjCU,mBAAmB;kDAAnB,mBAAmB,WAAnB,mBAAmB,mBADP,MAAM;;iFAClB,mBAAmB;cAD/B,UAAU;eAAC,EAAC,UAAU,EAAE,MAAM,EAAC"}
@@ -0,0 +1,22 @@
1
+ import { Injectable } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ function getWindow() {
4
+ if (typeof window !== 'undefined') {
5
+ return window;
6
+ }
7
+ else {
8
+ throw new Error('Cannot find window object - running in SSR?');
9
+ }
10
+ }
11
+ export class WindowRefService {
12
+ nativeWindow() {
13
+ return getWindow();
14
+ }
15
+ static ɵfac = function WindowRefService_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || WindowRefService)(); };
16
+ static ɵprov = i0.ɵɵdefineInjectable({ token: WindowRefService, factory: WindowRefService.ɵfac, providedIn: 'root' });
17
+ }
18
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WindowRefService, [{
19
+ type: Injectable,
20
+ args: [{ providedIn: 'root' }]
21
+ }], null, null); })();
22
+ //# sourceMappingURL=window-ref.service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"window-ref.service.js","sourceRoot":"","sources":["../../src/services/window-ref.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,eAAe,CAAC;;AAWzC,SAAS,SAAS;IAChB,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE,CAAC;QAClC,OAAO,MAAM,CAAC;IAChB,CAAC;SAAM,CAAC;QACN,MAAM,IAAI,KAAK,CAAC,6CAA6C,CAAC,CAAC;IACjE,CAAC;AACH,CAAC;AAGD,MAAM,OAAO,gBAAgB;IACpB,YAAY;QACjB,OAAO,SAAS,EAAE,CAAC;IACrB,CAAC;0GAHU,gBAAgB;kDAAhB,gBAAgB,WAAhB,gBAAgB,mBADJ,MAAM;;iFAClB,gBAAgB;cAD5B,UAAU;eAAC,EAAC,UAAU,EAAE,MAAM,EAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bitblit/ngx-acute-common",
3
- "version": "5.0.516-alpha",
3
+ "version": "5.0.518-alpha",
4
4
  "description": "Library for using angular",
5
5
  "module": "lib/esm2022/ngx-acute-common.mjs",
6
6
  "types": "lib/esm2022/index.d.ts",
@@ -32,7 +32,7 @@
32
32
  "@angular/platform-browser": "18.2.8",
33
33
  "@angular/platform-browser-dynamic": "18.2.8",
34
34
  "@angular/router": "18.2.8",
35
- "@bitblit/ratchet-common": "5.0.516-alpha",
35
+ "@bitblit/ratchet-common": "5.0.518-alpha",
36
36
  "primeflex": "3.3.1",
37
37
  "primeicons": "7.0.0",
38
38
  "primeng": "17.18.11",
@@ -48,11 +48,15 @@
48
48
  "@angular/platform-browser": "^18.2.8",
49
49
  "@angular/platform-browser-dynamic": "^18.2.8",
50
50
  "@angular/router": "^18.2.8",
51
- "@bitblit/ratchet-common": "5.0.516-alpha",
51
+ "@bitblit/ratchet-common": "5.0.518-alpha",
52
52
  "primeflex": "3.3.1",
53
53
  "primeicons": "7.0.0",
54
54
  "primeng": "17.18.11",
55
55
  "rxjs": "7.8.1",
56
56
  "zone.js": "0.14.10"
57
+ },
58
+ "devDependencies": {
59
+ "@angular/compiler-cli": "18.2.8",
60
+ "@bitblit/ratchet-node-only": "5.0.518-alpha"
57
61
  }
58
62
  }
@@ -1,5 +0,0 @@
1
- import { BuildInformation } from '@bitblit/ratchet-common/build/build-information';
2
- export declare class NgxAcuteCommonInfo {
3
- private constructor();
4
- static buildInformation(): BuildInformation;
5
- }
@@ -1,9 +0,0 @@
1
- import { DialogService, DynamicDialogConfig, DynamicDialogRef } from 'primeng/dynamicdialog';
2
- import { BehaviorSubject } from 'rxjs';
3
- export declare class AlertComponent {
4
- private dialogService;
5
- cfg: DynamicDialogConfig;
6
- protected ref: DynamicDialogRef;
7
- constructor(dialogService: DialogService, cfg: DynamicDialogConfig, ref: DynamicDialogRef);
8
- static showAlert(dialogSvc: DialogService, message: BehaviorSubject<string> | string, title?: string): DynamicDialogRef;
9
- }
@@ -1,9 +0,0 @@
1
- import { DialogService, DynamicDialogConfig, DynamicDialogRef } from 'primeng/dynamicdialog';
2
- import { BehaviorSubject } from 'rxjs';
3
- export declare class BlockUiComponent {
4
- private dialogService;
5
- cfg: DynamicDialogConfig;
6
- constructor(dialogService: DialogService, cfg: DynamicDialogConfig);
7
- static createUiBlock(dialogService: DialogService, message?: BehaviorSubject<string> | string, subMessage?: string): DynamicDialogRef;
8
- static runPromiseWithUiBlock<T>(dialogService: DialogService, prom: Promise<T>, message?: BehaviorSubject<string> | string, subMessage?: string): Promise<T>;
9
- }
@@ -1,3 +0,0 @@
1
- export interface GoogleAnalyticsConfig {
2
- tagId: () => string | string;
3
- }
@@ -1,4 +0,0 @@
1
- import { PipeTransform } from '@angular/core';
2
- export declare class CapitalizePipe implements PipeTransform {
3
- transform(input: string): string;
4
- }
@@ -1,4 +0,0 @@
1
- import { PipeTransform } from '@angular/core';
2
- export declare class DollarFormattedPipe implements PipeTransform {
3
- transform(input: number): string;
4
- }
@@ -1,4 +0,0 @@
1
- import { PipeTransform } from '@angular/core';
2
- export declare class MapValuesPipe implements PipeTransform {
3
- transform(value: any, args?: any[]): any[];
4
- }
@@ -1,4 +0,0 @@
1
- import { PipeTransform } from '@angular/core';
2
- export declare class NumberWithCommasPipe implements PipeTransform {
3
- transform(input: number): string;
4
- }
@@ -1,5 +0,0 @@
1
- import { PipeTransform } from '@angular/core';
2
- export declare class OrderByPipe implements PipeTransform {
3
- static _orderByComparator(a: any, b: any): number;
4
- transform(input: any, [config]: [string?]): any;
5
- }
@@ -1,4 +0,0 @@
1
- import { PipeTransform } from '@angular/core';
2
- export declare class PercentFormattedPipe implements PipeTransform {
3
- transform(input: number): string;
4
- }
@@ -1,4 +0,0 @@
1
- import { PipeTransform } from '@angular/core';
2
- export declare class PluralPipe implements PipeTransform {
3
- transform(input: number, label: string, pluralLabel?: string): string;
4
- }
@@ -1,4 +0,0 @@
1
- import { PipeTransform } from '@angular/core';
2
- export declare class RoundPipe implements PipeTransform {
3
- transform(input: number): number;
4
- }