@aidc-toolkit/app-extension 1.0.26-beta → 1.0.28-beta
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1205 -967
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +134 -312
- package/dist/index.d.ts +134 -312
- package/dist/index.js +1207 -964
- package/dist/index.js.map +1 -1
- package/package.json +6 -6
- package/src/app-extension.ts +33 -24
- package/src/app-utility-proxy.ts +33 -27
- package/src/descriptor.ts +29 -199
- package/src/generator/generator.ts +102 -145
- package/src/generator/index.ts +0 -1
- package/src/generator/locale-resources-generator.ts +67 -42
- package/src/gs1/character-set-proxy.ts +5 -5
- package/src/gs1/check-proxy.ts +35 -42
- package/src/gs1/gtin-creator-proxy.ts +58 -0
- package/src/gs1/gtin-descriptor.ts +29 -0
- package/src/gs1/gtin-validator-proxy.ts +161 -0
- package/src/gs1/identifier-creator-proxy.ts +227 -0
- package/src/gs1/identifier-validator-proxy.ts +87 -0
- package/src/gs1/index.ts +5 -1
- package/src/gs1/non-gtin-creator-proxy.ts +119 -0
- package/src/gs1/non-gtin-validator-proxy.ts +119 -0
- package/src/gs1/prefix-definition-descriptor.ts +18 -0
- package/src/gs1/prefix-manager-proxy.ts +42 -0
- package/src/index.ts +1 -0
- package/src/lib-proxy.ts +22 -19
- package/src/proxy.ts +509 -0
- package/src/utility/character-set-descriptor.ts +5 -5
- package/src/utility/character-set-proxy.ts +39 -55
- package/src/utility/reg-exp-proxy.ts +11 -15
- package/src/utility/string-descriptor.ts +2 -2
- package/src/utility/transformer-descriptor.ts +3 -3
- package/src/utility/transformer-proxy.ts +16 -26
- package/tsconfig-src.json +1 -4
- package/src/generator/descriptor.ts +0 -122
- package/src/gs1/identifier-proxy.ts +0 -825
|
@@ -12,14 +12,12 @@ import {
|
|
|
12
12
|
} from "@aidc-toolkit/utility";
|
|
13
13
|
import type { AppExtension } from "../app-extension.js";
|
|
14
14
|
import {
|
|
15
|
-
|
|
15
|
+
type ExtendsParameterDescriptor,
|
|
16
16
|
type ParameterDescriptor,
|
|
17
|
-
ProxyClass,
|
|
18
|
-
ProxyMethod,
|
|
19
|
-
ProxyParameter,
|
|
20
17
|
Types
|
|
21
18
|
} from "../descriptor.js";
|
|
22
19
|
import { LibProxy } from "../lib-proxy.js";
|
|
20
|
+
import { expandParameterDescriptor, proxy } from "../proxy.js";
|
|
23
21
|
import type { ErrorExtends, Matrix, MatrixResultError, ResultError } from "../type.js";
|
|
24
22
|
import {
|
|
25
23
|
exclusionAnyParameterDescriptor,
|
|
@@ -42,107 +40,93 @@ const lengthParameterDescriptor: ParameterDescriptor = {
|
|
|
42
40
|
isRequired: true
|
|
43
41
|
};
|
|
44
42
|
|
|
45
|
-
const valueForSParameterDescriptor:
|
|
43
|
+
const valueForSParameterDescriptor: ExtendsParameterDescriptor = {
|
|
46
44
|
extendsDescriptor: sParameterDescriptor,
|
|
47
45
|
name: "valueForS"
|
|
48
46
|
};
|
|
49
47
|
|
|
48
|
+
@proxy.describeClass(true)
|
|
50
49
|
export abstract class CharacterSetValidatorProxy<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TBigInt> extends StringProxy<ThrowError, TError, TInvocationContext, TBigInt> {
|
|
51
|
-
|
|
50
|
+
readonly #characterSetValidator: CharacterSetValidator;
|
|
52
51
|
|
|
53
|
-
|
|
52
|
+
constructor(appExtension: AppExtension<ThrowError, TError, TInvocationContext, TBigInt>, characterSetValidator: CharacterSetValidator) {
|
|
54
53
|
super(appExtension);
|
|
55
54
|
|
|
56
|
-
this
|
|
55
|
+
this.#characterSetValidator = characterSetValidator;
|
|
57
56
|
}
|
|
58
57
|
|
|
59
|
-
@
|
|
58
|
+
@proxy.describeMethod({
|
|
60
59
|
type: Types.String,
|
|
61
|
-
isMatrix: true
|
|
60
|
+
isMatrix: true,
|
|
61
|
+
parameterDescriptors: [validateSParameterDescriptor, exclusionNoneParameterDescriptor]
|
|
62
62
|
})
|
|
63
|
-
validate(
|
|
64
|
-
|
|
65
|
-
@ProxyParameter(exclusionNoneParameterDescriptor) exclusion: Nullishable<Exclusion>
|
|
66
|
-
): MatrixResultError<string, ThrowError, TError> {
|
|
67
|
-
return this.validateString(this._characterSetValidator, matrixSs, {
|
|
63
|
+
validate(matrixSs: Matrix<string>, exclusion: Nullishable<Exclusion>): MatrixResultError<string, ThrowError, TError> {
|
|
64
|
+
return this.validateString(this.#characterSetValidator, matrixSs, {
|
|
68
65
|
exclusion: exclusion ?? undefined
|
|
69
66
|
} satisfies CharacterSetValidation);
|
|
70
67
|
}
|
|
71
68
|
|
|
72
|
-
@
|
|
69
|
+
@proxy.describeMethod({
|
|
73
70
|
type: Types.Boolean,
|
|
74
|
-
isMatrix: true
|
|
71
|
+
isMatrix: true,
|
|
72
|
+
parameterDescriptors: [validateSParameterDescriptor, exclusionNoneParameterDescriptor]
|
|
75
73
|
})
|
|
76
|
-
isValid(
|
|
77
|
-
@ProxyParameter(validateSParameterDescriptor) matrixSs: Matrix<string>,
|
|
78
|
-
@ProxyParameter(exclusionNoneParameterDescriptor) exclusion: Nullishable<Exclusion>
|
|
79
|
-
): MatrixResultError<boolean, ThrowError, TError> {
|
|
74
|
+
isValid(matrixSs: Matrix<string>, exclusion: Nullishable<Exclusion>): MatrixResultError<boolean, ThrowError, TError> {
|
|
80
75
|
return this.isValidString(this.validate(matrixSs, exclusion));
|
|
81
76
|
}
|
|
82
77
|
}
|
|
83
78
|
|
|
79
|
+
@proxy.describeClass(true)
|
|
84
80
|
export abstract class CharacterSetCreatorProxy<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TBigInt> extends CharacterSetValidatorProxy<ThrowError, TError, TInvocationContext, TBigInt> {
|
|
85
|
-
|
|
81
|
+
readonly #characterSetCreator: CharacterSetCreator;
|
|
86
82
|
|
|
87
|
-
|
|
83
|
+
constructor(appExtension: AppExtension<ThrowError, TError, TInvocationContext, TBigInt>, characterSetCreator: CharacterSetCreator) {
|
|
88
84
|
super(appExtension, characterSetCreator);
|
|
89
85
|
|
|
90
|
-
this
|
|
86
|
+
this.#characterSetCreator = characterSetCreator;
|
|
91
87
|
}
|
|
92
88
|
|
|
93
|
-
@
|
|
89
|
+
@proxy.describeMethod({
|
|
94
90
|
type: Types.String,
|
|
95
|
-
isMatrix: true
|
|
91
|
+
isMatrix: true,
|
|
92
|
+
parameterDescriptors: [lengthParameterDescriptor, valueParameterDescriptor, exclusionNoneParameterDescriptor, tweakParameterDescriptor]
|
|
96
93
|
})
|
|
97
|
-
create(
|
|
98
|
-
@ProxyParameter(lengthParameterDescriptor) length: number,
|
|
99
|
-
@ProxyParameter(valueParameterDescriptor) matrixValues: Matrix<number | bigint>,
|
|
100
|
-
@ProxyParameter(exclusionNoneParameterDescriptor) exclusion: Nullishable<Exclusion>,
|
|
101
|
-
@ProxyParameter(tweakParameterDescriptor) tweak: Nullishable<number | bigint>
|
|
102
|
-
): MatrixResultError<string, ThrowError, TError> {
|
|
94
|
+
create(length: number, matrixValues: Matrix<number | bigint>, exclusion: Nullishable<Exclusion>, tweak: Nullishable<number | bigint>): MatrixResultError<string, ThrowError, TError> {
|
|
103
95
|
const exclusionOrUndefined = exclusion ?? undefined;
|
|
104
96
|
const tweakOrUndefined = tweak ?? undefined;
|
|
105
97
|
|
|
106
|
-
return this.mapMatrix(matrixValues, value => this.
|
|
98
|
+
return this.mapMatrix(matrixValues, value => this.#characterSetCreator.create(length, value, exclusionOrUndefined, tweakOrUndefined));
|
|
107
99
|
}
|
|
108
100
|
|
|
109
|
-
@
|
|
101
|
+
@proxy.describeMethod({
|
|
110
102
|
infixBefore: "Sequence",
|
|
111
103
|
type: Types.String,
|
|
112
|
-
isMatrix: true
|
|
104
|
+
isMatrix: true,
|
|
105
|
+
parameterDescriptors: [lengthParameterDescriptor, startValueParameterDescriptor, countParameterDescriptor, exclusionNoneParameterDescriptor, tweakParameterDescriptor]
|
|
113
106
|
})
|
|
114
|
-
createSequence(
|
|
115
|
-
@ProxyParameter(lengthParameterDescriptor) length: number,
|
|
116
|
-
@ProxyParameter(startValueParameterDescriptor) startValue: number,
|
|
117
|
-
@ProxyParameter(countParameterDescriptor) count: number,
|
|
118
|
-
@ProxyParameter(exclusionNoneParameterDescriptor) exclusion: Nullishable<Exclusion>,
|
|
119
|
-
@ProxyParameter(tweakParameterDescriptor) tweak: Nullishable<number | bigint>
|
|
120
|
-
): Matrix<string> {
|
|
107
|
+
createSequence(length: number, startValue: number, count: number, exclusion: Nullishable<Exclusion>, tweak: Nullishable<number | bigint>): Matrix<string> {
|
|
121
108
|
this.appExtension.validateSequenceCount(count);
|
|
122
109
|
|
|
123
110
|
const exclusionOrUndefined = exclusion ?? undefined;
|
|
124
111
|
const tweakOrUndefined = tweak ?? undefined;
|
|
125
112
|
|
|
126
|
-
return LibProxy.matrixResult(this.
|
|
113
|
+
return LibProxy.matrixResult(this.#characterSetCreator.create(length, new Sequence(startValue, count), exclusionOrUndefined, tweakOrUndefined));
|
|
127
114
|
}
|
|
128
115
|
|
|
129
|
-
@
|
|
116
|
+
@proxy.describeMethod({
|
|
130
117
|
type: Types.Number,
|
|
131
|
-
isMatrix: true
|
|
118
|
+
isMatrix: true,
|
|
119
|
+
parameterDescriptors: [valueForSParameterDescriptor, exclusionNoneParameterDescriptor, tweakParameterDescriptor]
|
|
132
120
|
})
|
|
133
|
-
valueFor(
|
|
134
|
-
@ProxyParameter(valueForSParameterDescriptor) matrixSs: Matrix<string>,
|
|
135
|
-
@ProxyParameter(exclusionNoneParameterDescriptor) exclusion: Nullishable<Exclusion>,
|
|
136
|
-
@ProxyParameter(tweakParameterDescriptor) tweak: Nullishable<number | bigint>
|
|
137
|
-
): MatrixResultError<ResultError<TBigInt, ThrowError, TError>, ThrowError, TError> {
|
|
121
|
+
valueFor(matrixSs: Matrix<string>, exclusion: Nullishable<Exclusion>, tweak: Nullishable<number | bigint>): MatrixResultError<ResultError<TBigInt, ThrowError, TError>, ThrowError, TError> {
|
|
138
122
|
const exclusionOrUndefined = exclusion ?? undefined;
|
|
139
123
|
const tweakOrUndefined = tweak ?? undefined;
|
|
140
124
|
|
|
141
|
-
return this.mapMatrix(matrixSs, s => this.mapBigInt(this.
|
|
125
|
+
return this.mapMatrix(matrixSs, s => this.mapBigInt(this.#characterSetCreator.valueFor(s, exclusionOrUndefined, tweakOrUndefined)));
|
|
142
126
|
}
|
|
143
127
|
}
|
|
144
128
|
|
|
145
|
-
@
|
|
129
|
+
@proxy.describeClass(false, {
|
|
146
130
|
methodInfix: "Numeric",
|
|
147
131
|
replaceParameterDescriptors: [
|
|
148
132
|
{
|
|
@@ -157,7 +141,7 @@ export class NumericProxy<ThrowError extends boolean, TError extends ErrorExtend
|
|
|
157
141
|
}
|
|
158
142
|
}
|
|
159
143
|
|
|
160
|
-
@
|
|
144
|
+
@proxy.describeClass(false, {
|
|
161
145
|
methodInfix: "Hexadecimal",
|
|
162
146
|
replaceParameterDescriptors: [
|
|
163
147
|
{
|
|
@@ -172,7 +156,7 @@ export class HexadecimalProxy<ThrowError extends boolean, TError extends ErrorEx
|
|
|
172
156
|
}
|
|
173
157
|
}
|
|
174
158
|
|
|
175
|
-
@
|
|
159
|
+
@proxy.describeClass(false, {
|
|
176
160
|
methodInfix: "Alphabetic"
|
|
177
161
|
})
|
|
178
162
|
export class AlphabeticProxy<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TBigInt> extends CharacterSetCreatorProxy<ThrowError, TError, TInvocationContext, TBigInt> {
|
|
@@ -181,7 +165,7 @@ export class AlphabeticProxy<ThrowError extends boolean, TError extends ErrorExt
|
|
|
181
165
|
}
|
|
182
166
|
}
|
|
183
167
|
|
|
184
|
-
@
|
|
168
|
+
@proxy.describeClass(false, {
|
|
185
169
|
methodInfix: "Alphanumeric",
|
|
186
170
|
replaceParameterDescriptors: [
|
|
187
171
|
{
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { Nullishable } from "@aidc-toolkit/core";
|
|
2
2
|
import { RegExpValidator } from "@aidc-toolkit/utility";
|
|
3
|
-
import { type ParameterDescriptor,
|
|
3
|
+
import { type ParameterDescriptor, Types } from "../descriptor.js";
|
|
4
|
+
import { proxy } from "../proxy.js";
|
|
4
5
|
import type { ErrorExtends, Matrix, MatrixResultError } from "../type.js";
|
|
5
6
|
import { validateSParameterDescriptor } from "./string-descriptor.js";
|
|
6
7
|
import { StringProxy } from "./string-proxy.js";
|
|
@@ -19,19 +20,16 @@ const errorMessageParameterDescriptor: ParameterDescriptor = {
|
|
|
19
20
|
isRequired: false
|
|
20
21
|
};
|
|
21
22
|
|
|
22
|
-
@
|
|
23
|
+
@proxy.describeClass(false, {
|
|
23
24
|
methodInfix: "RegExp"
|
|
24
25
|
})
|
|
25
26
|
export class RegExpProxy<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TBigInt> extends StringProxy<ThrowError, TError, TInvocationContext, TBigInt> {
|
|
26
|
-
@
|
|
27
|
+
@proxy.describeMethod({
|
|
27
28
|
type: Types.String,
|
|
28
|
-
isMatrix: true
|
|
29
|
+
isMatrix: true,
|
|
30
|
+
parameterDescriptors: [regExpParameterDescriptor, validateSParameterDescriptor, errorMessageParameterDescriptor]
|
|
29
31
|
})
|
|
30
|
-
validate(
|
|
31
|
-
@ProxyParameter(regExpParameterDescriptor) regExp: string,
|
|
32
|
-
@ProxyParameter(validateSParameterDescriptor) matrixSs: Matrix<string>,
|
|
33
|
-
@ProxyParameter(errorMessageParameterDescriptor) errorMessage: Nullishable<string>
|
|
34
|
-
): MatrixResultError<string, ThrowError, TError> {
|
|
32
|
+
validate(regExp: string, matrixSs: Matrix<string>, errorMessage: Nullishable<string>): MatrixResultError<string, ThrowError, TError> {
|
|
35
33
|
return this.validateString(new class extends RegExpValidator {
|
|
36
34
|
protected override createErrorMessage(s: string): string {
|
|
37
35
|
return errorMessage ?? super.createErrorMessage(s);
|
|
@@ -39,14 +37,12 @@ export class RegExpProxy<ThrowError extends boolean, TError extends ErrorExtends
|
|
|
39
37
|
}(new RegExp(regExp)), matrixSs);
|
|
40
38
|
}
|
|
41
39
|
|
|
42
|
-
@
|
|
40
|
+
@proxy.describeMethod({
|
|
43
41
|
type: Types.Boolean,
|
|
44
|
-
isMatrix: true
|
|
42
|
+
isMatrix: true,
|
|
43
|
+
parameterDescriptors: [regExpParameterDescriptor, validateSParameterDescriptor]
|
|
45
44
|
})
|
|
46
|
-
isValid(
|
|
47
|
-
@ProxyParameter(regExpParameterDescriptor) regExp: string,
|
|
48
|
-
@ProxyParameter(validateSParameterDescriptor) matrixSs: Matrix<string>
|
|
49
|
-
): MatrixResultError<boolean, ThrowError, TError> {
|
|
45
|
+
isValid(regExp: string, matrixSs: Matrix<string>): MatrixResultError<boolean, ThrowError, TError> {
|
|
50
46
|
return this.isValidString(this.validate(regExp, matrixSs, undefined));
|
|
51
47
|
}
|
|
52
48
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type ParameterDescriptor, Types } from "../descriptor.js";
|
|
1
|
+
import { type ExtendsParameterDescriptor, type ParameterDescriptor, Types } from "../descriptor.js";
|
|
2
2
|
|
|
3
3
|
export const sParameterDescriptor: ParameterDescriptor = {
|
|
4
4
|
name: "s",
|
|
@@ -7,7 +7,7 @@ export const sParameterDescriptor: ParameterDescriptor = {
|
|
|
7
7
|
isRequired: true
|
|
8
8
|
};
|
|
9
9
|
|
|
10
|
-
export const validateSParameterDescriptor:
|
|
10
|
+
export const validateSParameterDescriptor: ExtendsParameterDescriptor = {
|
|
11
11
|
extendsDescriptor: sParameterDescriptor,
|
|
12
12
|
name: "validateS"
|
|
13
13
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type ParameterDescriptor, Types } from "../descriptor.js";
|
|
1
|
+
import { type ExtendsParameterDescriptor, type ParameterDescriptor, Types } from "../descriptor.js";
|
|
2
2
|
|
|
3
3
|
export const valueParameterDescriptor: ParameterDescriptor = {
|
|
4
4
|
name: "value",
|
|
@@ -7,13 +7,13 @@ export const valueParameterDescriptor: ParameterDescriptor = {
|
|
|
7
7
|
isRequired: true
|
|
8
8
|
};
|
|
9
9
|
|
|
10
|
-
export const startValueParameterDescriptor:
|
|
10
|
+
export const startValueParameterDescriptor: ExtendsParameterDescriptor = {
|
|
11
11
|
extendsDescriptor: valueParameterDescriptor,
|
|
12
12
|
name: "startValue",
|
|
13
13
|
isMatrix: false
|
|
14
14
|
};
|
|
15
15
|
|
|
16
|
-
export const countParameterDescriptor:
|
|
16
|
+
export const countParameterDescriptor: ExtendsParameterDescriptor = {
|
|
17
17
|
extendsDescriptor: valueParameterDescriptor,
|
|
18
18
|
name: "count",
|
|
19
19
|
isMatrix: false
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { Nullishable } from "@aidc-toolkit/core";
|
|
2
2
|
import { mapIterable, Sequence, Transformer } from "@aidc-toolkit/utility";
|
|
3
|
-
import { type
|
|
3
|
+
import { type ExtendsParameterDescriptor, type ParameterDescriptor, Types } from "../descriptor.js";
|
|
4
4
|
import { LibProxy } from "../lib-proxy.js";
|
|
5
|
+
import { proxy } from "../proxy.js";
|
|
5
6
|
import type { ErrorExtends, Matrix, MatrixResultError, ResultError } from "../type.js";
|
|
6
7
|
import {
|
|
7
8
|
countParameterDescriptor,
|
|
@@ -17,55 +18,44 @@ const domainParameterDescriptor: ParameterDescriptor = {
|
|
|
17
18
|
isRequired: true
|
|
18
19
|
};
|
|
19
20
|
|
|
20
|
-
|
|
21
|
-
const transformedValueParameterDescriptor: ParameterDescriptor = {
|
|
21
|
+
const transformedValueParameterDescriptor: ExtendsParameterDescriptor = {
|
|
22
22
|
extendsDescriptor: valueParameterDescriptor,
|
|
23
23
|
name: "transformedValue"
|
|
24
24
|
};
|
|
25
25
|
|
|
26
|
-
@
|
|
26
|
+
@proxy.describeClass(false, {
|
|
27
27
|
methodInfix: "Transform"
|
|
28
28
|
})
|
|
29
29
|
export class TransformerProxy<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TBigInt> extends LibProxy<ThrowError, TError, TInvocationContext, TBigInt> {
|
|
30
|
-
@
|
|
30
|
+
@proxy.describeMethod({
|
|
31
31
|
type: Types.Number,
|
|
32
|
-
isMatrix: true
|
|
32
|
+
isMatrix: true,
|
|
33
|
+
parameterDescriptors: [domainParameterDescriptor, valueParameterDescriptor, tweakParameterDescriptor]
|
|
33
34
|
})
|
|
34
|
-
forward(
|
|
35
|
-
@ProxyParameter(domainParameterDescriptor) domain: number | bigint,
|
|
36
|
-
@ProxyParameter(valueParameterDescriptor) matrixValues: Matrix<number | bigint>,
|
|
37
|
-
@ProxyParameter(tweakParameterDescriptor) tweak: Nullishable<number | bigint>
|
|
38
|
-
): MatrixResultError<ResultError<TBigInt, ThrowError, TError>, ThrowError, TError> {
|
|
35
|
+
forward(domain: number | bigint, matrixValues: Matrix<number | bigint>, tweak: Nullishable<number | bigint>): MatrixResultError<ResultError<TBigInt, ThrowError, TError>, ThrowError, TError> {
|
|
39
36
|
const transformer = Transformer.get(domain, tweak ?? undefined);
|
|
40
37
|
|
|
41
38
|
return this.mapMatrix(matrixValues, value => this.mapBigInt(transformer.forward(value)));
|
|
42
39
|
}
|
|
43
40
|
|
|
44
|
-
@
|
|
41
|
+
@proxy.describeMethod({
|
|
45
42
|
infixBefore: "Sequence",
|
|
46
43
|
type: Types.Number,
|
|
47
|
-
isMatrix: true
|
|
44
|
+
isMatrix: true,
|
|
45
|
+
parameterDescriptors: [domainParameterDescriptor, startValueParameterDescriptor, countParameterDescriptor, tweakParameterDescriptor]
|
|
48
46
|
})
|
|
49
|
-
forwardSequence(
|
|
50
|
-
@ProxyParameter(domainParameterDescriptor) domain: number | bigint,
|
|
51
|
-
@ProxyParameter(startValueParameterDescriptor) startValue: number,
|
|
52
|
-
@ProxyParameter(countParameterDescriptor) count: number,
|
|
53
|
-
@ProxyParameter(tweakParameterDescriptor) tweak: Nullishable<number | bigint>
|
|
54
|
-
): Matrix<ResultError<TBigInt, ThrowError, TError>> {
|
|
47
|
+
forwardSequence(domain: number | bigint, startValue: number, count: number, tweak: Nullishable<number | bigint>): Matrix<ResultError<TBigInt, ThrowError, TError>> {
|
|
55
48
|
this.appExtension.validateSequenceCount(count);
|
|
56
49
|
|
|
57
50
|
return LibProxy.matrixResult(mapIterable(Transformer.get(domain, tweak ?? undefined).forward(new Sequence(startValue, count)), value => this.mapBigInt(value)));
|
|
58
51
|
}
|
|
59
52
|
|
|
60
|
-
@
|
|
53
|
+
@proxy.describeMethod({
|
|
61
54
|
type: Types.Number,
|
|
62
|
-
isMatrix: true
|
|
55
|
+
isMatrix: true,
|
|
56
|
+
parameterDescriptors: [domainParameterDescriptor, transformedValueParameterDescriptor, tweakParameterDescriptor]
|
|
63
57
|
})
|
|
64
|
-
reverse(
|
|
65
|
-
@ProxyParameter(domainParameterDescriptor) domain: number | bigint,
|
|
66
|
-
@ProxyParameter(transformedValueParameterDescriptor) matrixTransformedValues: Matrix<number | bigint>,
|
|
67
|
-
@ProxyParameter(tweakParameterDescriptor) tweak: Nullishable<number | bigint>
|
|
68
|
-
): MatrixResultError<ResultError<TBigInt, ThrowError, TError>, ThrowError, TError> {
|
|
58
|
+
reverse(domain: number | bigint, matrixTransformedValues: Matrix<number | bigint>, tweak: Nullishable<number | bigint>): MatrixResultError<ResultError<TBigInt, ThrowError, TError>, ThrowError, TError> {
|
|
69
59
|
const transformer = Transformer.get(domain, tweak ?? undefined);
|
|
70
60
|
|
|
71
61
|
return this.mapMatrix(matrixTransformedValues, transformedValue => this.mapBigInt(transformer.reverse(transformedValue)));
|
package/tsconfig-src.json
CHANGED
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
import type { BaseParameterDescriptor, ClassDescriptor, MethodDescriptor } from "../descriptor.js";
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Localization.
|
|
5
|
-
*/
|
|
6
|
-
export interface Localization {
|
|
7
|
-
/**
|
|
8
|
-
* Name.
|
|
9
|
-
*/
|
|
10
|
-
name: string;
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Description.
|
|
14
|
-
*/
|
|
15
|
-
description: string;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* Function localization.
|
|
20
|
-
*/
|
|
21
|
-
export interface FunctionLocalization extends Localization {
|
|
22
|
-
/**
|
|
23
|
-
* Documentation URL.
|
|
24
|
-
*/
|
|
25
|
-
documentationURL: string;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* Parameter localization.
|
|
30
|
-
*/
|
|
31
|
-
export interface ParameterLocalization extends Localization {
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* Localization descriptor.
|
|
36
|
-
*/
|
|
37
|
-
export interface LocalizationDescriptor<T extends Localization> {
|
|
38
|
-
/**
|
|
39
|
-
* Localizations map by locale.
|
|
40
|
-
*/
|
|
41
|
-
readonly localizationsMap: ReadonlyMap<string, T>;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* Proxy namespace descriptor.
|
|
46
|
-
*/
|
|
47
|
-
export interface ProxyNamespaceDescriptor {
|
|
48
|
-
/**
|
|
49
|
-
* Namespace if any.
|
|
50
|
-
*/
|
|
51
|
-
readonly namespace: string | undefined;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* Proxy class descriptor.
|
|
56
|
-
*/
|
|
57
|
-
export interface ProxyClassDescriptor extends ProxyNamespaceDescriptor {
|
|
58
|
-
/**
|
|
59
|
-
* Class name.
|
|
60
|
-
*/
|
|
61
|
-
readonly className: string;
|
|
62
|
-
|
|
63
|
-
/**
|
|
64
|
-
* Namespace-qualified class name.
|
|
65
|
-
*/
|
|
66
|
-
readonly namespaceClassName: string;
|
|
67
|
-
|
|
68
|
-
/**
|
|
69
|
-
* Class descriptor.
|
|
70
|
-
*/
|
|
71
|
-
readonly classDescriptor: ClassDescriptor;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
/**
|
|
75
|
-
* Proxy object descriptor.
|
|
76
|
-
*/
|
|
77
|
-
export interface ProxyObjectDescriptor extends ProxyClassDescriptor {
|
|
78
|
-
/**
|
|
79
|
-
* Object name.
|
|
80
|
-
*/
|
|
81
|
-
readonly objectName: string;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
/**
|
|
85
|
-
* Proxy parameter descriptor.
|
|
86
|
-
*/
|
|
87
|
-
export interface ProxyParameterDescriptor extends ProxyNamespaceDescriptor, LocalizationDescriptor<ParameterLocalization> {
|
|
88
|
-
/**
|
|
89
|
-
* Function name.
|
|
90
|
-
*/
|
|
91
|
-
readonly parameterName: string;
|
|
92
|
-
|
|
93
|
-
/**
|
|
94
|
-
* Parameter descriptor.
|
|
95
|
-
*/
|
|
96
|
-
readonly parameterDescriptor: BaseParameterDescriptor;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
/**
|
|
100
|
-
* Proxy function descriptor.
|
|
101
|
-
*/
|
|
102
|
-
export interface ProxyFunctionDescriptor extends ProxyObjectDescriptor, LocalizationDescriptor<FunctionLocalization> {
|
|
103
|
-
/**
|
|
104
|
-
* Function name.
|
|
105
|
-
*/
|
|
106
|
-
readonly functionName: string;
|
|
107
|
-
|
|
108
|
-
/**
|
|
109
|
-
* Namespace-qualified function name.
|
|
110
|
-
*/
|
|
111
|
-
readonly namespaceFunctionName: string;
|
|
112
|
-
|
|
113
|
-
/**
|
|
114
|
-
* Proxy parameter descriptors
|
|
115
|
-
*/
|
|
116
|
-
readonly proxyParameterDescriptors: ProxyParameterDescriptor[];
|
|
117
|
-
|
|
118
|
-
/**
|
|
119
|
-
* Method descriptor.
|
|
120
|
-
*/
|
|
121
|
-
readonly methodDescriptor: MethodDescriptor;
|
|
122
|
-
}
|