@aidc-toolkit/app-extension 1.0.45-beta → 1.0.45

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 (160) hide show
  1. package/dist/index.cjs +17 -0
  2. package/dist/index.d.cts +1752 -0
  3. package/dist/index.d.ts +1752 -26
  4. package/dist/index.js +1 -8
  5. package/package.json +5 -5
  6. package/tsconfig-src.tsbuildinfo +1 -1
  7. package/dist/app-extension.d.ts +0 -194
  8. package/dist/app-extension.d.ts.map +0 -1
  9. package/dist/app-extension.js +0 -133
  10. package/dist/app-extension.js.map +0 -1
  11. package/dist/app-helper-proxy.d.ts +0 -61
  12. package/dist/app-helper-proxy.d.ts.map +0 -1
  13. package/dist/app-helper-proxy.js +0 -333
  14. package/dist/app-helper-proxy.js.map +0 -1
  15. package/dist/descriptor.d.ts +0 -197
  16. package/dist/descriptor.d.ts.map +0 -1
  17. package/dist/descriptor.js +0 -44
  18. package/dist/descriptor.js.map +0 -1
  19. package/dist/generator/generator.d.ts +0 -124
  20. package/dist/generator/generator.d.ts.map +0 -1
  21. package/dist/generator/generator.js +0 -190
  22. package/dist/generator/generator.js.map +0 -1
  23. package/dist/generator/index.d.ts +0 -18
  24. package/dist/generator/index.d.ts.map +0 -1
  25. package/dist/generator/index.js +0 -18
  26. package/dist/generator/index.js.map +0 -1
  27. package/dist/generator/locale-resources-generator.d.ts +0 -2
  28. package/dist/generator/locale-resources-generator.d.ts.map +0 -1
  29. package/dist/generator/locale-resources-generator.js +0 -312
  30. package/dist/generator/locale-resources-generator.js.map +0 -1
  31. package/dist/gs1/character-set-proxy.d.ts +0 -13
  32. package/dist/gs1/character-set-proxy.d.ts.map +0 -1
  33. package/dist/gs1/character-set-proxy.js +0 -126
  34. package/dist/gs1/character-set-proxy.js.map +0 -1
  35. package/dist/gs1/check-proxy.d.ts +0 -11
  36. package/dist/gs1/check-proxy.d.ts.map +0 -1
  37. package/dist/gs1/check-proxy.js +0 -163
  38. package/dist/gs1/check-proxy.js.map +0 -1
  39. package/dist/gs1/gcp-length-proxy.d.ts +0 -11
  40. package/dist/gs1/gcp-length-proxy.d.ts.map +0 -1
  41. package/dist/gs1/gcp-length-proxy.js +0 -190
  42. package/dist/gs1/gcp-length-proxy.js.map +0 -1
  43. package/dist/gs1/gtin-creator-proxy.d.ts +0 -10
  44. package/dist/gs1/gtin-creator-proxy.d.ts.map +0 -1
  45. package/dist/gs1/gtin-creator-proxy.js +0 -85
  46. package/dist/gs1/gtin-creator-proxy.js.map +0 -1
  47. package/dist/gs1/gtin-descriptor.d.ts +0 -3
  48. package/dist/gs1/gtin-descriptor.d.ts.map +0 -1
  49. package/dist/gs1/gtin-descriptor.js +0 -8
  50. package/dist/gs1/gtin-descriptor.js.map +0 -1
  51. package/dist/gs1/gtin-validator-proxy.d.ts +0 -26
  52. package/dist/gs1/gtin-validator-proxy.d.ts.map +0 -1
  53. package/dist/gs1/gtin-validator-proxy.js +0 -256
  54. package/dist/gs1/gtin-validator-proxy.js.map +0 -1
  55. package/dist/gs1/identifier-creator-proxy.d.ts +0 -30
  56. package/dist/gs1/identifier-creator-proxy.d.ts.map +0 -1
  57. package/dist/gs1/identifier-creator-proxy.js +0 -302
  58. package/dist/gs1/identifier-creator-proxy.js.map +0 -1
  59. package/dist/gs1/identifier-descriptor.d.ts +0 -4
  60. package/dist/gs1/identifier-descriptor.d.ts.map +0 -1
  61. package/dist/gs1/identifier-descriptor.js +0 -14
  62. package/dist/gs1/identifier-descriptor.js.map +0 -1
  63. package/dist/gs1/identifier-type.d.ts +0 -22
  64. package/dist/gs1/identifier-type.d.ts.map +0 -1
  65. package/dist/gs1/identifier-type.js +0 -34
  66. package/dist/gs1/identifier-type.js.map +0 -1
  67. package/dist/gs1/identifier-validator-proxy.d.ts +0 -29
  68. package/dist/gs1/identifier-validator-proxy.d.ts.map +0 -1
  69. package/dist/gs1/identifier-validator-proxy.js +0 -212
  70. package/dist/gs1/identifier-validator-proxy.js.map +0 -1
  71. package/dist/gs1/index.d.ts +0 -11
  72. package/dist/gs1/index.d.ts.map +0 -1
  73. package/dist/gs1/index.js +0 -11
  74. package/dist/gs1/index.js.map +0 -1
  75. package/dist/gs1/non-gtin-creator-proxy.d.ts +0 -38
  76. package/dist/gs1/non-gtin-creator-proxy.d.ts.map +0 -1
  77. package/dist/gs1/non-gtin-creator-proxy.js +0 -301
  78. package/dist/gs1/non-gtin-creator-proxy.js.map +0 -1
  79. package/dist/gs1/non-gtin-validator-proxy.d.ts +0 -37
  80. package/dist/gs1/non-gtin-validator-proxy.d.ts.map +0 -1
  81. package/dist/gs1/non-gtin-validator-proxy.js +0 -302
  82. package/dist/gs1/non-gtin-validator-proxy.js.map +0 -1
  83. package/dist/gs1/prefix-definition-descriptor.d.ts +0 -4
  84. package/dist/gs1/prefix-definition-descriptor.d.ts.map +0 -1
  85. package/dist/gs1/prefix-definition-descriptor.js +0 -16
  86. package/dist/gs1/prefix-definition-descriptor.js.map +0 -1
  87. package/dist/gs1/prefix-manager-proxy.d.ts +0 -8
  88. package/dist/gs1/prefix-manager-proxy.d.ts.map +0 -1
  89. package/dist/gs1/prefix-manager-proxy.js +0 -94
  90. package/dist/gs1/prefix-manager-proxy.js.map +0 -1
  91. package/dist/gs1/variable-measure-proxy.d.ts +0 -7
  92. package/dist/gs1/variable-measure-proxy.d.ts.map +0 -1
  93. package/dist/gs1/variable-measure-proxy.js +0 -114
  94. package/dist/gs1/variable-measure-proxy.js.map +0 -1
  95. package/dist/gs1/verified-by-gs1-proxy.d.ts +0 -7
  96. package/dist/gs1/verified-by-gs1-proxy.d.ts.map +0 -1
  97. package/dist/gs1/verified-by-gs1-proxy.js +0 -106
  98. package/dist/gs1/verified-by-gs1-proxy.js.map +0 -1
  99. package/dist/index.d.ts.map +0 -1
  100. package/dist/index.js.map +0 -1
  101. package/dist/lib-proxy.d.ts +0 -135
  102. package/dist/lib-proxy.d.ts.map +0 -1
  103. package/dist/lib-proxy.js +0 -276
  104. package/dist/lib-proxy.js.map +0 -1
  105. package/dist/locale/en/locale-resources.d.ts +0 -752
  106. package/dist/locale/en/locale-resources.d.ts.map +0 -1
  107. package/dist/locale/en/locale-resources.js +0 -751
  108. package/dist/locale/en/locale-resources.js.map +0 -1
  109. package/dist/locale/fr/locale-resources.d.ts +0 -752
  110. package/dist/locale/fr/locale-resources.d.ts.map +0 -1
  111. package/dist/locale/fr/locale-resources.js +0 -751
  112. package/dist/locale/fr/locale-resources.js.map +0 -1
  113. package/dist/locale/i18n.d.ts +0 -27
  114. package/dist/locale/i18n.d.ts.map +0 -1
  115. package/dist/locale/i18n.js +0 -36
  116. package/dist/locale/i18n.js.map +0 -1
  117. package/dist/proxy.d.ts +0 -136
  118. package/dist/proxy.d.ts.map +0 -1
  119. package/dist/proxy.js +0 -295
  120. package/dist/proxy.js.map +0 -1
  121. package/dist/streaming.d.ts +0 -10
  122. package/dist/streaming.d.ts.map +0 -1
  123. package/dist/streaming.js +0 -2
  124. package/dist/streaming.js.map +0 -1
  125. package/dist/type.d.ts +0 -91
  126. package/dist/type.d.ts.map +0 -1
  127. package/dist/type.js +0 -2
  128. package/dist/type.js.map +0 -1
  129. package/dist/utility/character-set-descriptor.d.ts +0 -6
  130. package/dist/utility/character-set-descriptor.d.ts.map +0 -1
  131. package/dist/utility/character-set-descriptor.js +0 -28
  132. package/dist/utility/character-set-descriptor.js.map +0 -1
  133. package/dist/utility/character-set-proxy.d.ts +0 -31
  134. package/dist/utility/character-set-proxy.d.ts.map +0 -1
  135. package/dist/utility/character-set-proxy.js +0 -278
  136. package/dist/utility/character-set-proxy.js.map +0 -1
  137. package/dist/utility/index.d.ts +0 -4
  138. package/dist/utility/index.d.ts.map +0 -1
  139. package/dist/utility/index.js +0 -4
  140. package/dist/utility/index.js.map +0 -1
  141. package/dist/utility/reg-exp-proxy.d.ts +0 -8
  142. package/dist/utility/reg-exp-proxy.d.ts.map +0 -1
  143. package/dist/utility/reg-exp-proxy.js +0 -103
  144. package/dist/utility/reg-exp-proxy.js.map +0 -1
  145. package/dist/utility/string-descriptor.d.ts +0 -4
  146. package/dist/utility/string-descriptor.d.ts.map +0 -1
  147. package/dist/utility/string-descriptor.js +0 -12
  148. package/dist/utility/string-descriptor.js.map +0 -1
  149. package/dist/utility/string-proxy.d.ts +0 -7
  150. package/dist/utility/string-proxy.d.ts.map +0 -1
  151. package/dist/utility/string-proxy.js +0 -63
  152. package/dist/utility/string-proxy.js.map +0 -1
  153. package/dist/utility/transformer-descriptor.d.ts +0 -6
  154. package/dist/utility/transformer-descriptor.d.ts.map +0 -1
  155. package/dist/utility/transformer-descriptor.js +0 -24
  156. package/dist/utility/transformer-descriptor.js.map +0 -1
  157. package/dist/utility/transformer-proxy.d.ts +0 -9
  158. package/dist/utility/transformer-proxy.d.ts.map +0 -1
  159. package/dist/utility/transformer-proxy.js +0 -111
  160. package/dist/utility/transformer-proxy.js.map +0 -1
@@ -1,133 +0,0 @@
1
- import { getLogger, LogLevels, MemoryTransport } from "@aidc-toolkit/core";
2
- import { i18nextAppExtension } from "./locale/i18n.js";
3
- /**
4
- * Application extension.
5
- *
6
- * @template ThrowError
7
- * If true, errors are reported through the throw/catch mechanism.
8
- *
9
- * @template TError
10
- * Error type.
11
- *
12
- * @template TInvocationContext
13
- * Application-specific invocation context type.
14
- *
15
- * @template TStreamingInvocationContext
16
- * Application-specific streaming invocation context type.
17
- *
18
- * @template TBigInt
19
- * Type to which big integer is mapped.
20
- */
21
- export class AppExtension {
22
- /**
23
- * Application name.
24
- */
25
- static APPLICATION_NAME = "AIDCToolkit";
26
- /**
27
- * Version property name.
28
- */
29
- static VERSION_NAME = `${AppExtension.APPLICATION_NAME}.version`;
30
- /**
31
- * Maximum logger messages length.
32
- */
33
- static #MAXIMUM_LOGGER_MESSAGES_LENGTH = 120;
34
- /**
35
- * Truncate logger messages length.
36
- */
37
- static #TRUNCATE_LOGGER_MESSAGES_LENGTH = 100;
38
- /**
39
- * Application version.
40
- */
41
- #version;
42
- /**
43
- * Maximum sequence count supported by application.
44
- */
45
- #maximumSequenceCount;
46
- /**
47
- * If true, errors are reported through the throw/catch mechanism.
48
- */
49
- #throwError;
50
- /**
51
- * Logger.
52
- */
53
- #logger;
54
- /**
55
- * Logger memory transport.
56
- */
57
- #memoryTransport;
58
- /**
59
- * Constructor.
60
- *
61
- * @param version
62
- * Application version.
63
- *
64
- * @param maximumSequenceCount
65
- * Maximum sequence count supported by application.
66
- *
67
- * @param throwError
68
- * If true, errors are reported through the throw/catch mechanism.
69
- */
70
- constructor(version, maximumSequenceCount, throwError) {
71
- this.#version = version;
72
- this.#maximumSequenceCount = maximumSequenceCount;
73
- this.#throwError = throwError;
74
- // Running in production if version doesn't include a pre-release identifier.
75
- const isProduction = !version.includes("-");
76
- this.#logger = getLogger(isProduction ? LogLevels.Info : LogLevels.Debug, {
77
- type: isProduction ? "hidden" : "pretty"
78
- });
79
- this.#memoryTransport = new MemoryTransport(this.#logger, AppExtension.#MAXIMUM_LOGGER_MESSAGES_LENGTH, AppExtension.#TRUNCATE_LOGGER_MESSAGES_LENGTH);
80
- }
81
- /**
82
- * Initialize the application extension.
83
- */
84
- async initialize() {
85
- const fileVersion = await this.getDocumentProperty(AppExtension.VERSION_NAME);
86
- if (fileVersion !== this.#version) {
87
- await this.setDocumentProperty(AppExtension.VERSION_NAME, this.#version);
88
- }
89
- }
90
- /**
91
- * Get the version.
92
- *
93
- * @returns
94
- * Version.
95
- */
96
- get version() {
97
- return this.#version;
98
- }
99
- /**
100
- * Determine if errors are reported through the throw/catch mechanism.
101
- */
102
- get throwError() {
103
- return this.#throwError;
104
- }
105
- /**
106
- * Get the logger.
107
- */
108
- get logger() {
109
- return this.#logger;
110
- }
111
- /**
112
- * Get the logger memory transport.
113
- */
114
- get memoryTransport() {
115
- return this.#memoryTransport;
116
- }
117
- /**
118
- * Validate a sequence count against the maximum supported by application.
119
- *
120
- * @param sequenceCount
121
- * Sequence count.
122
- */
123
- validateSequenceCount(sequenceCount) {
124
- const absoluteSequenceCount = Math.abs(sequenceCount);
125
- if (absoluteSequenceCount > this.#maximumSequenceCount) {
126
- throw new RangeError(i18nextAppExtension.t("AppExtension.sequenceCountMustBeLessThanOrEqualTo", {
127
- sequenceCount: absoluteSequenceCount,
128
- maximumSequenceCount: this.#maximumSequenceCount
129
- }));
130
- }
131
- }
132
- }
133
- //# sourceMappingURL=app-extension.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"app-extension.js","sourceRoot":"","sources":["../src/app-extension.ts"],"names":[],"mappings":"AAAA,OAAO,EAEH,SAAS,EAET,SAAS,EACT,eAAe,EAElB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAIvD;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,OAAgB,YAAY;IAC9B;;OAEG;IACH,MAAM,CAAU,gBAAgB,GAAG,aAAa,CAAC;IAEjD;;OAEG;IACH,MAAM,CAAU,YAAY,GAAG,GAAG,YAAY,CAAC,gBAAgB,UAAU,CAAC;IAE1E;;OAEG;IACH,MAAM,CAAU,+BAA+B,GAAG,GAAG,CAAC;IAEtD;;OAEG;IACH,MAAM,CAAU,gCAAgC,GAAG,GAAG,CAAC;IAEvD;;OAEG;IACM,QAAQ,CAAS;IAE1B;;OAEG;IACM,qBAAqB,CAAS;IAEvC;;OAEG;IACM,WAAW,CAAa;IAEjC;;OAEG;IACM,OAAO,CAAiB;IAEjC;;OAEG;IACM,gBAAgB,CAA0B;IAEnD;;;;;;;;;;;OAWG;IACH,YAAsB,OAAe,EAAE,oBAA4B,EAAE,UAAsB;QACvF,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;QACxB,IAAI,CAAC,qBAAqB,GAAG,oBAAoB,CAAC;QAClD,IAAI,CAAC,WAAW,GAAG,UAAU,CAAC;QAE9B,6EAA6E;QAC7E,MAAM,YAAY,GAAG,CAAC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;QAE5C,IAAI,CAAC,OAAO,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BAAoB,EAAE,IAAI,CAAC,qBAAqB;aACnD,CAAC,CAAC,CAAC;QACR,CAAC;IACL,CAAC"}
@@ -1,61 +0,0 @@
1
- import { type Nullishable } from "@aidc-toolkit/core";
2
- import { LibProxy } from "./lib-proxy.js";
3
- import type { ErrorExtends, Matrix, MatrixResult } from "./type.js";
4
- /**
5
- * Application utilities.
6
- *
7
- * @template ThrowError
8
- * If true, errors are reported through the throw/catch mechanism.
9
- *
10
- * @template TError
11
- * Error type.
12
- *
13
- * @template TInvocationContext
14
- * Application-specific invocation context type.
15
- *
16
- * @template TStreamingInvocationContext
17
- * Application-specific streaming invocation context type.
18
- *
19
- * @template TBigInt
20
- * Type to which big integer is mapped.
21
- */
22
- export declare class AppHelperProxy<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TStreamingInvocationContext, TBigInt> extends LibProxy<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt> {
23
- #private;
24
- /**
25
- * Get the version.
26
- *
27
- * @returns
28
- * Version.
29
- */
30
- version(): string;
31
- /**
32
- * Spill a one-dimensional matrix to fit a rectangle within a given maximum height and width.
33
- *
34
- * @param arrayValues
35
- * Matrix values. Matrix is length 1 or contains arrays of length 1 with the values.
36
- *
37
- * @param maximumHeight
38
- * Maximum height.
39
- *
40
- * @param maximumWidth
41
- * Maximum width.
42
- *
43
- * @param invocationContext
44
- * Invocation context.
45
- *
46
- * @returns
47
- * Matrix spilled within maximum height and maximum width.
48
- */
49
- spill(arrayValues: Matrix<unknown>, maximumHeight: Nullishable<number>, maximumWidth: Nullishable<number>, invocationContext: Nullishable<TInvocationContext>): Promise<MatrixResult<unknown, ThrowError, TError>>;
50
- /**
51
- * Get the logger messages as a stream.
52
- *
53
- * @param logLevelString
54
- * Log level as string.
55
- *
56
- * @param streamingInvocationContext
57
- * Streaming invocation context.
58
- */
59
- loggerMessages(logLevelString: Nullishable<string>, streamingInvocationContext: Nullishable<TStreamingInvocationContext>): void;
60
- }
61
- //# sourceMappingURL=app-helper-proxy.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"app-helper-proxy.d.ts","sourceRoot":"","sources":["../src/app-helper-proxy.ts"],"names":[],"mappings":"AAAA,OAAO,EAA6D,KAAK,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjH,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAG1C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AA2CpE;;;;;;;;;;;;;;;;;GAiBG;AACH,qBAGa,cAAc,CAAC,UAAU,SAAS,OAAO,EAAE,MAAM,SAAS,YAAY,CAAC,UAAU,CAAC,EAAE,kBAAkB,EAAE,2BAA2B,EAAE,OAAO,CAAE,SAAQ,QAAQ,CAAC,UAAU,EAAE,MAAM,EAAE,kBAAkB,EAAE,2BAA2B,EAAE,OAAO,CAAC;;IACrP;;;;;OAKG;IAMH,OAAO,IAAI,MAAM;IA6CjB;;;;;;;;;;;;;;;;;OAiBG;IAQG,KAAK,CAAC,WAAW,EAAE,MAAM,CAAC,OAAO,CAAC,EAAE,aAAa,EAAE,WAAW,CAAC,MAAM,CAAC,EAAE,YAAY,EAAE,WAAW,CAAC,MAAM,CAAC,EAAE,iBAAiB,EAAE,WAAW,CAAC,kBAAkB,CAAC,GAAG,OAAO,CAAC,YAAY,CAAC,OAAO,EAAE,UAAU,EAAE,MAAM,CAAC,CAAC;IA4GxN;;;;;;;;OAQG;IAaH,cAAc,CAAC,cAAc,EAAE,WAAW,CAAC,MAAM,CAAC,EAAE,0BAA0B,EAAE,WAAW,CAAC,2BAA2B,CAAC,GAAG,IAAI;CA8ClI"}
@@ -1,333 +0,0 @@
1
- var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
2
- var useValue = arguments.length > 2;
3
- for (var i = 0; i < initializers.length; i++) {
4
- value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
5
- }
6
- return useValue ? value : void 0;
7
- };
8
- var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
9
- function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
10
- var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
11
- var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
12
- var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
13
- var _, done = false;
14
- for (var i = decorators.length - 1; i >= 0; i--) {
15
- var context = {};
16
- for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
17
- for (var p in contextIn.access) context.access[p] = contextIn.access[p];
18
- context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
19
- var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
20
- if (kind === "accessor") {
21
- if (result === void 0) continue;
22
- if (result === null || typeof result !== "object") throw new TypeError("Object expected");
23
- if (_ = accept(result.get)) descriptor.get = _;
24
- if (_ = accept(result.set)) descriptor.set = _;
25
- if (_ = accept(result.init)) initializers.unshift(_);
26
- }
27
- else if (_ = accept(result)) {
28
- if (kind === "field") initializers.unshift(_);
29
- else descriptor[key] = _;
30
- }
31
- }
32
- if (target) Object.defineProperty(target, contextIn.name, descriptor);
33
- done = true;
34
- };
35
- import { isNullish, logLevelOf } from "@aidc-toolkit/core";
36
- import { Multiplicities, Types } from "./descriptor.js";
37
- import { LibProxy } from "./lib-proxy.js";
38
- import { i18nextAppExtension } from "./locale/i18n.js";
39
- import { proxy } from "./proxy.js";
40
- const spillArrayParameterDescriptor = {
41
- name: "spillArray",
42
- type: Types.Any,
43
- multiplicity: Multiplicities.Array,
44
- isRequired: true
45
- };
46
- const spillMaximumParameterDescriptor = {
47
- name: "spillMaximum",
48
- type: Types.Number,
49
- multiplicity: Multiplicities.Singleton,
50
- isRequired: false
51
- };
52
- const spillMaximumWidthParameterDescriptor = {
53
- extendsDescriptor: spillMaximumParameterDescriptor,
54
- sortOrder: 0,
55
- name: "spillMaximumWidth"
56
- };
57
- const spillMaximumHeightParameterDescriptor = {
58
- extendsDescriptor: spillMaximumParameterDescriptor,
59
- sortOrder: 1,
60
- name: "spillMaximumHeight"
61
- };
62
- /**
63
- * Application utilities.
64
- *
65
- * @template ThrowError
66
- * If true, errors are reported through the throw/catch mechanism.
67
- *
68
- * @template TError
69
- * Error type.
70
- *
71
- * @template TInvocationContext
72
- * Application-specific invocation context type.
73
- *
74
- * @template TStreamingInvocationContext
75
- * Application-specific streaming invocation context type.
76
- *
77
- * @template TBigInt
78
- * Type to which big integer is mapped.
79
- */
80
- let AppHelperProxy = (() => {
81
- let _classDecorators = [proxy.describeClass(false, {
82
- category: "helper"
83
- })];
84
- let _classDescriptor;
85
- let _classExtraInitializers = [];
86
- let _classThis;
87
- let _classSuper = LibProxy;
88
- let _instanceExtraInitializers = [];
89
- let _version_decorators;
90
- let _spill_decorators;
91
- let _loggerMessages_decorators;
92
- var AppHelperProxy = class extends _classSuper {
93
- static { _classThis = this; }
94
- static {
95
- const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
96
- _version_decorators = [proxy.describeMethod({
97
- type: Types.String,
98
- multiplicity: Multiplicities.Singleton,
99
- parameterDescriptors: []
100
- })];
101
- _spill_decorators = [proxy.describeMethod({
102
- type: Types.Any,
103
- multiplicity: Multiplicities.Matrix,
104
- isAsync: true,
105
- requiresContext: true,
106
- parameterDescriptors: [spillArrayParameterDescriptor, spillMaximumHeightParameterDescriptor, spillMaximumWidthParameterDescriptor]
107
- })];
108
- _loggerMessages_decorators = [proxy.describeMethod({
109
- type: Types.String,
110
- multiplicity: Multiplicities.Array,
111
- isHidden: true,
112
- isStream: true,
113
- parameterDescriptors: [{
114
- name: "logLevel",
115
- type: Types.String,
116
- multiplicity: Multiplicities.Singleton,
117
- isRequired: false
118
- }]
119
- })];
120
- __esDecorate(this, null, _version_decorators, { kind: "method", name: "version", static: false, private: false, access: { has: obj => "version" in obj, get: obj => obj.version }, metadata: _metadata }, null, _instanceExtraInitializers);
121
- __esDecorate(this, null, _spill_decorators, { kind: "method", name: "spill", static: false, private: false, access: { has: obj => "spill" in obj, get: obj => obj.spill }, metadata: _metadata }, null, _instanceExtraInitializers);
122
- __esDecorate(this, null, _loggerMessages_decorators, { kind: "method", name: "loggerMessages", static: false, private: false, access: { has: obj => "loggerMessages" in obj, get: obj => obj.loggerMessages }, metadata: _metadata }, null, _instanceExtraInitializers);
123
- __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
124
- AppHelperProxy = _classThis = _classDescriptor.value;
125
- if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
126
- __runInitializers(_classThis, _classExtraInitializers);
127
- }
128
- /**
129
- * Get the version.
130
- *
131
- * @returns
132
- * Version.
133
- */
134
- version() {
135
- return this.appExtension.version;
136
- }
137
- /**
138
- * Provide default values for maximum width and height if required.
139
- *
140
- * @param maximumDimensions
141
- * Maximum dimensions provided to function.
142
- *
143
- * @param invocationContext
144
- * Invocation context.
145
- *
146
- * @returns
147
- * Array of maximum width and maximum height.
148
- */
149
- async #defaultMaximums(maximumDimensions, invocationContext) {
150
- if (isNullish(invocationContext)) {
151
- // Application error; no localization necessary.
152
- throw new Error("Invocation context not provided by application");
153
- }
154
- const maximumWidth = maximumDimensions.width;
155
- const maximumHeight = maximumDimensions.height;
156
- let definedMaximumWidth;
157
- let definedMaximumHeight;
158
- // Skip any extra work if both values are provided.
159
- if (isNullish(maximumWidth) || isNullish(maximumHeight)) {
160
- const sheetAddress = await this.appExtension.getSheetAddress(invocationContext);
161
- definedMaximumWidth = maximumWidth ?? this.appExtension.maximumWidth - sheetAddress.columnIndex;
162
- definedMaximumHeight = maximumHeight ?? this.appExtension.maximumHeight - sheetAddress.rowIndex;
163
- }
164
- else {
165
- definedMaximumWidth = maximumWidth;
166
- definedMaximumHeight = maximumHeight;
167
- }
168
- return {
169
- width: definedMaximumWidth,
170
- height: definedMaximumHeight
171
- };
172
- }
173
- /**
174
- * Spill a one-dimensional matrix to fit a rectangle within a given maximum height and width.
175
- *
176
- * @param arrayValues
177
- * Matrix values. Matrix is length 1 or contains arrays of length 1 with the values.
178
- *
179
- * @param maximumHeight
180
- * Maximum height.
181
- *
182
- * @param maximumWidth
183
- * Maximum width.
184
- *
185
- * @param invocationContext
186
- * Invocation context.
187
- *
188
- * @returns
189
- * Matrix spilled within maximum height and maximum width.
190
- */
191
- async spill(arrayValues, maximumHeight, maximumWidth, invocationContext) {
192
- let result;
193
- // Assume matrix is uniformly two-dimensional.
194
- const height = arrayValues.length;
195
- const width = height !== 0 ? arrayValues[0].length : 0;
196
- const isArrayOrError = this.singletonResult(() => {
197
- if (height > 1 && width > 1) {
198
- throw new RangeError(i18nextAppExtension.t("Proxy.matrixMustBeArray"));
199
- }
200
- return true;
201
- });
202
- if (isArrayOrError === true) {
203
- const maximumDimensions = await this.#defaultMaximums({
204
- width: maximumWidth,
205
- height: maximumHeight
206
- }, invocationContext);
207
- const isHorizontal = height === 1;
208
- const length = isHorizontal ? width : height;
209
- const maximumParallel = isHorizontal ? maximumDimensions.width : maximumDimensions.height;
210
- const maximumPerpendicular = isHorizontal ? maximumDimensions.height : maximumDimensions.width;
211
- const maximumArea = maximumParallel * maximumPerpendicular;
212
- // Lengths 0 and 1 are valid and require no special processing.
213
- if (length > 1 && length <= maximumArea) {
214
- const lengthSquareRoot = Math.sqrt(length);
215
- let spillParallel = undefined;
216
- // Array that has a length of a power of 10 is treated specially.
217
- if (Number.isInteger(Math.log10(length))) {
218
- // Try spill that is a power of 10, favouring the parallel direction.
219
- let spillParallel10 = 10 ** Math.ceil(Math.log10(lengthSquareRoot));
220
- // Favour the perpendicular direction if not enough parallel space.
221
- if (spillParallel10 > maximumParallel) {
222
- spillParallel10 /= 10;
223
- }
224
- // Take result as the spill parallel if it fits.
225
- if (spillParallel10 <= maximumParallel && length / spillParallel10 <= maximumPerpendicular) {
226
- spillParallel = spillParallel10;
227
- }
228
- }
229
- // Make spill as square as possible, favouring the parallel direction.
230
- spillParallel ??= Math.max(Math.min(Math.ceil(lengthSquareRoot), maximumParallel), Math.floor(length / maximumPerpendicular));
231
- const spillPerpendicular = Math.ceil(length / spillParallel);
232
- result = [];
233
- if (isHorizontal) {
234
- let startIndex = 0;
235
- do {
236
- const endIndex = startIndex + spillParallel;
237
- // Each row is a slice of the original single row.
238
- const row = arrayValues[0].slice(startIndex, endIndex);
239
- // Row length will be anywhere from 1 to spillParallel.
240
- if (row.length < spillParallel) {
241
- const rowLength = row.length;
242
- row.length = spillParallel;
243
- // Fill empty cells with empty string.
244
- row.fill("", rowLength, spillParallel);
245
- }
246
- result.push(row);
247
- startIndex = endIndex;
248
- } while (startIndex < length);
249
- }
250
- else {
251
- for (let rowIndex = 0; rowIndex < spillParallel; rowIndex++) {
252
- const row = [];
253
- // Each column is a slice of the original single column.
254
- for (let valueIndex = rowIndex; valueIndex < length; valueIndex += spillParallel) {
255
- row.push(arrayValues[valueIndex][0]);
256
- }
257
- // Row length will always be spillPerpendicular or spillPerpendicular - 1.
258
- if (row.length < spillPerpendicular) {
259
- row[spillPerpendicular - 1] = "";
260
- }
261
- result.push(row);
262
- }
263
- }
264
- }
265
- else {
266
- // Return matrix unmodified and let application handle spill error if any.
267
- result = arrayValues;
268
- }
269
- }
270
- else {
271
- // Return error as only element in matrix.
272
- result = [[isArrayOrError]];
273
- }
274
- return result;
275
- }
276
- /**
277
- * Get the logger messages as a stream.
278
- *
279
- * @param logLevelString
280
- * Log level as string.
281
- *
282
- * @param streamingInvocationContext
283
- * Streaming invocation context.
284
- */
285
- loggerMessages(logLevelString, streamingInvocationContext) {
286
- if (isNullish(streamingInvocationContext)) {
287
- // Application error; no localization necessary.
288
- throw new Error("Streaming invocation context not provided by application");
289
- }
290
- const appExtension = this.appExtension;
291
- let notificationCallbackAdded = false;
292
- let previousLogLevel = undefined;
293
- const streamingConsumerCallback = appExtension.setUpStreaming(streamingInvocationContext, () => {
294
- if (notificationCallbackAdded) {
295
- appExtension.memoryTransport.removeNotificationCallback("loggerMessages");
296
- }
297
- if (previousLogLevel !== undefined) {
298
- appExtension.logger.settings.minLevel = previousLogLevel;
299
- }
300
- });
301
- if (appExtension.memoryTransport.addNotificationCallback("loggerMessages", (_message, messages) => {
302
- streamingConsumerCallback(this.iterableResult(() => messages));
303
- })) {
304
- notificationCallbackAdded = true;
305
- let logLevel = undefined;
306
- if (!isNullish(logLevelString)) {
307
- try {
308
- logLevel = logLevelOf(logLevelString);
309
- }
310
- catch {
311
- // Ignore error.
312
- }
313
- }
314
- // Set log level if required.
315
- if (logLevel !== undefined) {
316
- previousLogLevel = appExtension.logger.settings.minLevel;
317
- appExtension.logger.settings.minLevel = logLevel;
318
- }
319
- }
320
- else {
321
- // Diagnostic tool; localization not required.
322
- streamingConsumerCallback([["Only one logger messages call allowable per workbook"]]);
323
- }
324
- }
325
- constructor() {
326
- super(...arguments);
327
- __runInitializers(this, _instanceExtraInitializers);
328
- }
329
- };
330
- return AppHelperProxy = _classThis;
331
- })();
332
- export { AppHelperProxy };
333
- //# sourceMappingURL=app-helper-proxy.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"app-helper-proxy.js","sourceRoot":"","sources":["../src/app-helper-proxy.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,SAAS,EAAiB,UAAU,EAAyC,MAAM,oBAAoB,CAAC;AACjH,OAAO,EAAmC,cAAc,EAA4B,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACnH,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,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