@bifold/oca 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +33 -0
- package/build/__tests__/remote.test.d.ts +1 -0
- package/build/__tests__/remote.test.js +162 -0
- package/build/constants.d.ts +4 -0
- package/build/constants.js +7 -0
- package/build/formatters/credential/CredentialFormatter.d.ts +8 -0
- package/build/formatters/credential/CredentialFormatter.js +32 -0
- package/build/formatters/credential/DisplayAttribute.d.ts +11 -0
- package/build/formatters/credential/DisplayAttribute.js +18 -0
- package/build/formatters/credential/LocalizedCredential.d.ts +13 -0
- package/build/formatters/credential/LocalizedCredential.js +57 -0
- package/build/formatters/credential/index.d.ts +4 -0
- package/build/formatters/credential/index.js +12 -0
- package/build/formatters/index.d.ts +4 -0
- package/build/formatters/index.js +12 -0
- package/build/index.d.ts +5 -0
- package/build/index.js +34 -0
- package/build/interfaces/data/base/BaseOverlayData.interface.d.ts +5 -0
- package/build/interfaces/data/base/BaseOverlayData.interface.js +2 -0
- package/build/interfaces/data/branding/BrandingOverlayData.interface.d.ts +12 -0
- package/build/interfaces/data/branding/BrandingOverlayData.interface.js +2 -0
- package/build/interfaces/data/branding/LegacyBrandingOverlayData.interface.d.ts +15 -0
- package/build/interfaces/data/branding/LegacyBrandingOverlayData.interface.js +2 -0
- package/build/interfaces/data/bundle/OverlayBundleData.interface.d.ts +6 -0
- package/build/interfaces/data/bundle/OverlayBundleData.interface.js +2 -0
- package/build/interfaces/data/capture-base/CaptureBaseData.interface.d.ts +7 -0
- package/build/interfaces/data/capture-base/CaptureBaseData.interface.js +2 -0
- package/build/interfaces/data/index.d.ts +12 -0
- package/build/interfaces/data/index.js +2 -0
- package/build/interfaces/data/semantic/CharacterEncodingOverlayData.interface.d.ts +6 -0
- package/build/interfaces/data/semantic/CharacterEncodingOverlayData.interface.js +2 -0
- package/build/interfaces/data/semantic/FormatOverlayData.interface.d.ts +4 -0
- package/build/interfaces/data/semantic/FormatOverlayData.interface.js +2 -0
- package/build/interfaces/data/semantic/InformationOverlayData.interface.d.ts +5 -0
- package/build/interfaces/data/semantic/InformationOverlayData.interface.js +2 -0
- package/build/interfaces/data/semantic/LabelOverlayData.interface.d.ts +7 -0
- package/build/interfaces/data/semantic/LabelOverlayData.interface.js +2 -0
- package/build/interfaces/data/semantic/MetaOverlayData.interface.d.ts +12 -0
- package/build/interfaces/data/semantic/MetaOverlayData.interface.js +2 -0
- package/build/interfaces/data/semantic/StandardOverlayData.interface.d.ts +5 -0
- package/build/interfaces/data/semantic/StandardOverlayData.interface.js +2 -0
- package/build/interfaces/index.d.ts +2 -0
- package/build/interfaces/index.js +18 -0
- package/build/interfaces/overlay/OverlayBundleAttribute.interface.d.ts +9 -0
- package/build/interfaces/overlay/OverlayBundleAttribute.interface.js +2 -0
- package/build/interfaces/overlay/OverlayBundleMetadata.interface.d.ts +9 -0
- package/build/interfaces/overlay/OverlayBundleMetadata.interface.js +2 -0
- package/build/interfaces/overlay/index.d.ts +3 -0
- package/build/interfaces/overlay/index.js +2 -0
- package/build/legacy/index.d.ts +3 -0
- package/build/legacy/index.js +19 -0
- package/build/legacy/resolver/oca.d.ts +99 -0
- package/build/legacy/resolver/oca.js +239 -0
- package/build/legacy/resolver/record.d.ts +50 -0
- package/build/legacy/resolver/record.js +37 -0
- package/build/legacy/resolver/remote-oca.d.ts +186 -0
- package/build/legacy/resolver/remote-oca.js +536 -0
- package/build/types/OverlayTypeMap.d.ts +5 -0
- package/build/types/OverlayTypeMap.js +25 -0
- package/build/types/TypeEnums.d.ts +19 -0
- package/build/types/TypeEnums.js +24 -0
- package/build/types/base/BaseOverlay.d.ts +8 -0
- package/build/types/base/BaseOverlay.js +28 -0
- package/build/types/branding/BrandingOverlay.d.ts +15 -0
- package/build/types/branding/BrandingOverlay.js +68 -0
- package/build/types/branding/LegacyBrandingOverlay.d.ts +18 -0
- package/build/types/branding/LegacyBrandingOverlay.js +51 -0
- package/build/types/bundle/OverlayBundle.d.ts +20 -0
- package/build/types/bundle/OverlayBundle.js +167 -0
- package/build/types/capture-base/CaptureBase.d.ts +10 -0
- package/build/types/capture-base/CaptureBase.js +30 -0
- package/build/types/index.d.ts +14 -0
- package/build/types/index.js +33 -0
- package/build/types/semantic/CharacterEncodingOverlay.d.ts +9 -0
- package/build/types/semantic/CharacterEncodingOverlay.js +43 -0
- package/build/types/semantic/FormatOverlay.d.ts +7 -0
- package/build/types/semantic/FormatOverlay.js +30 -0
- package/build/types/semantic/InformationOverlay.d.ts +8 -0
- package/build/types/semantic/InformationOverlay.js +31 -0
- package/build/types/semantic/LabelOverlay.d.ts +10 -0
- package/build/types/semantic/LabelOverlay.js +41 -0
- package/build/types/semantic/MetaOverlay.d.ts +15 -0
- package/build/types/semantic/MetaOverlay.js +54 -0
- package/build/types/semantic/StandardOverlay.d.ts +8 -0
- package/build/types/semantic/StandardOverlay.js +38 -0
- package/build/utils/color/generateColor.d.ts +2 -0
- package/build/utils/color/generateColor.js +11 -0
- package/build/utils/color/hashCode.d.ts +8 -0
- package/build/utils/color/hashCode.js +12 -0
- package/build/utils/color/hashToRGBA.d.ts +8 -0
- package/build/utils/color/hashToRGBA.js +23 -0
- package/build/utils/color/index.d.ts +5 -0
- package/build/utils/color/index.js +15 -0
- package/build/utils/color/luminanceForHexColor.d.ts +7 -0
- package/build/utils/color/luminanceForHexColor.js +18 -0
- package/build/utils/color/mulberry32.d.ts +9 -0
- package/build/utils/color/mulberry32.js +16 -0
- package/build/utils/color/textColorForBackground.d.ts +1 -0
- package/build/utils/color/textColorForBackground.js +24 -0
- package/build/utils/credential-definition.d.ts +1 -0
- package/build/utils/credential-definition.js +21 -0
- package/build/utils/index.d.ts +1 -0
- package/build/utils/index.js +17 -0
- package/build/utils/logger.d.ts +5 -0
- package/build/utils/logger.js +17 -0
- package/build/utils/schema.d.ts +4 -0
- package/build/utils/schema.js +19 -0
- package/package.json +53 -0
- package/src/__tests__/__snapshots__/remote.test.ts.snap +293 -0
- package/src/__tests__/fixtures/bundle.json +131 -0
- package/src/__tests__/fixtures/oca.json +4 -0
- package/src/__tests__/fixtures/ocabundles.json +142 -0
- package/src/__tests__/remote.test.ts +180 -0
- package/src/constants.ts +7 -0
- package/src/formatters/credential/CredentialFormatter.ts +20 -0
- package/src/formatters/credential/DisplayAttribute.ts +29 -0
- package/src/formatters/credential/LocalizedCredential.ts +53 -0
- package/src/formatters/credential/index.ts +5 -0
- package/src/formatters/index.ts +5 -0
- package/src/index.ts +5 -0
- package/src/interfaces/data/base/BaseOverlayData.interface.ts +5 -0
- package/src/interfaces/data/branding/BrandingOverlayData.interface.ts +13 -0
- package/src/interfaces/data/branding/LegacyBrandingOverlayData.interface.ts +16 -0
- package/src/interfaces/data/bundle/OverlayBundleData.interface.ts +7 -0
- package/src/interfaces/data/capture-base/CaptureBaseData.interface.ts +7 -0
- package/src/interfaces/data/index.ts +25 -0
- package/src/interfaces/data/semantic/CharacterEncodingOverlayData.interface.ts +8 -0
- package/src/interfaces/data/semantic/FormatOverlayData.interface.ts +5 -0
- package/src/interfaces/data/semantic/InformationOverlayData.interface.ts +6 -0
- package/src/interfaces/data/semantic/LabelOverlayData.interface.ts +8 -0
- package/src/interfaces/data/semantic/MetaOverlayData.interface.ts +13 -0
- package/src/interfaces/data/semantic/StandardOverlayData.interface.ts +7 -0
- package/src/interfaces/index.ts +2 -0
- package/src/interfaces/overlay/OverlayBundleAttribute.interface.ts +9 -0
- package/src/interfaces/overlay/OverlayBundleMetadata.interface.ts +9 -0
- package/src/interfaces/overlay/index.ts +4 -0
- package/src/legacy/index.ts +3 -0
- package/src/legacy/resolver/oca.ts +377 -0
- package/src/legacy/resolver/record.ts +81 -0
- package/src/legacy/resolver/remote-oca.ts +661 -0
- package/src/types/OverlayTypeMap.ts +25 -0
- package/src/types/TypeEnums.ts +20 -0
- package/src/types/base/BaseOverlay.ts +18 -0
- package/src/types/branding/BrandingOverlay.ts +61 -0
- package/src/types/branding/LegacyBrandingOverlay.ts +47 -0
- package/src/types/bundle/OverlayBundle.ts +203 -0
- package/src/types/capture-base/CaptureBase.ts +22 -0
- package/src/types/index.ts +30 -0
- package/src/types/semantic/CharacterEncodingOverlay.ts +30 -0
- package/src/types/semantic/FormatOverlay.ts +15 -0
- package/src/types/semantic/InformationOverlay.ts +18 -0
- package/src/types/semantic/LabelOverlay.ts +30 -0
- package/src/types/semantic/MetaOverlay.ts +48 -0
- package/src/types/semantic/StandardOverlay.ts +24 -0
- package/src/utils/color/generateColor.ts +8 -0
- package/src/utils/color/hashCode.ts +11 -0
- package/src/utils/color/hashToRGBA.ts +22 -0
- package/src/utils/color/index.ts +7 -0
- package/src/utils/color/luminanceForHexColor.ts +19 -0
- package/src/utils/color/mulberry32.ts +15 -0
- package/src/utils/color/textColorForBackground.ts +18 -0
- package/src/utils/credential-definition.ts +19 -0
- package/src/utils/index.ts +1 -0
- package/src/utils/logger.ts +14 -0
- package/src/utils/schema.ts +16 -0
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
3
|
+
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
4
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
5
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
6
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
7
|
+
};
|
|
8
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
9
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
10
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
11
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
12
|
+
};
|
|
13
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
+
};
|
|
16
|
+
var _BrandingOverlay_background_image, _BrandingOverlay_background_image_slice, _BrandingOverlay_primary_background_color, _BrandingOverlay_secondary_background_color, _BrandingOverlay_primary_attribute, _BrandingOverlay_secondary_attribute, _BrandingOverlay_issued_date_attribute, _BrandingOverlay_expiry_date_attribute;
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
const color_1 = require("../../utils/color");
|
|
19
|
+
const BaseOverlay_1 = __importDefault(require("../base/BaseOverlay"));
|
|
20
|
+
class BrandingOverlay extends BaseOverlay_1.default {
|
|
21
|
+
constructor(credentialDefinitionId, overlay) {
|
|
22
|
+
var _a;
|
|
23
|
+
super(overlay);
|
|
24
|
+
_BrandingOverlay_background_image.set(this, void 0);
|
|
25
|
+
_BrandingOverlay_background_image_slice.set(this, void 0);
|
|
26
|
+
_BrandingOverlay_primary_background_color.set(this, void 0);
|
|
27
|
+
_BrandingOverlay_secondary_background_color.set(this, void 0);
|
|
28
|
+
_BrandingOverlay_primary_attribute.set(this, void 0);
|
|
29
|
+
_BrandingOverlay_secondary_attribute.set(this, void 0);
|
|
30
|
+
_BrandingOverlay_issued_date_attribute.set(this, void 0);
|
|
31
|
+
_BrandingOverlay_expiry_date_attribute.set(this, void 0);
|
|
32
|
+
this.logo = overlay.logo;
|
|
33
|
+
__classPrivateFieldSet(this, _BrandingOverlay_background_image, overlay.background_image, "f");
|
|
34
|
+
__classPrivateFieldSet(this, _BrandingOverlay_background_image_slice, overlay.background_image_slice, "f");
|
|
35
|
+
__classPrivateFieldSet(this, _BrandingOverlay_primary_background_color, (_a = overlay.primary_background_color) !== null && _a !== void 0 ? _a : (0, color_1.generateColor)(credentialDefinitionId), "f");
|
|
36
|
+
__classPrivateFieldSet(this, _BrandingOverlay_secondary_background_color, overlay.secondary_background_color, "f");
|
|
37
|
+
__classPrivateFieldSet(this, _BrandingOverlay_primary_attribute, overlay.primary_attribute, "f");
|
|
38
|
+
__classPrivateFieldSet(this, _BrandingOverlay_secondary_attribute, overlay.secondary_attribute, "f");
|
|
39
|
+
__classPrivateFieldSet(this, _BrandingOverlay_issued_date_attribute, overlay.issued_date_attribute, "f");
|
|
40
|
+
__classPrivateFieldSet(this, _BrandingOverlay_expiry_date_attribute, overlay.expiry_date_attribute, "f");
|
|
41
|
+
}
|
|
42
|
+
get backgroundImage() {
|
|
43
|
+
return __classPrivateFieldGet(this, _BrandingOverlay_background_image, "f");
|
|
44
|
+
}
|
|
45
|
+
get backgroundImageSlice() {
|
|
46
|
+
return __classPrivateFieldGet(this, _BrandingOverlay_background_image_slice, "f");
|
|
47
|
+
}
|
|
48
|
+
get primaryBackgroundColor() {
|
|
49
|
+
return __classPrivateFieldGet(this, _BrandingOverlay_primary_background_color, "f");
|
|
50
|
+
}
|
|
51
|
+
get secondaryBackgroundColor() {
|
|
52
|
+
return __classPrivateFieldGet(this, _BrandingOverlay_secondary_background_color, "f");
|
|
53
|
+
}
|
|
54
|
+
get primaryAttribute() {
|
|
55
|
+
return __classPrivateFieldGet(this, _BrandingOverlay_primary_attribute, "f");
|
|
56
|
+
}
|
|
57
|
+
get secondaryAttribute() {
|
|
58
|
+
return __classPrivateFieldGet(this, _BrandingOverlay_secondary_attribute, "f");
|
|
59
|
+
}
|
|
60
|
+
get issuedDateAttribute() {
|
|
61
|
+
return __classPrivateFieldGet(this, _BrandingOverlay_issued_date_attribute, "f");
|
|
62
|
+
}
|
|
63
|
+
get expiryDateAttribute() {
|
|
64
|
+
return __classPrivateFieldGet(this, _BrandingOverlay_expiry_date_attribute, "f");
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
_BrandingOverlay_background_image = new WeakMap(), _BrandingOverlay_background_image_slice = new WeakMap(), _BrandingOverlay_primary_background_color = new WeakMap(), _BrandingOverlay_secondary_background_color = new WeakMap(), _BrandingOverlay_primary_attribute = new WeakMap(), _BrandingOverlay_secondary_attribute = new WeakMap(), _BrandingOverlay_issued_date_attribute = new WeakMap(), _BrandingOverlay_expiry_date_attribute = new WeakMap();
|
|
68
|
+
exports.default = BrandingOverlay;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ILegacyBrandingOverlayData } from '../../interfaces/data';
|
|
2
|
+
import BaseOverlay from '../base/BaseOverlay';
|
|
3
|
+
export default class LegacyBrandingOverlay extends BaseOverlay {
|
|
4
|
+
#private;
|
|
5
|
+
header?: {
|
|
6
|
+
color?: string;
|
|
7
|
+
backgroundColor?: string;
|
|
8
|
+
imageSource?: string;
|
|
9
|
+
hideIssuer?: boolean;
|
|
10
|
+
};
|
|
11
|
+
footer?: {
|
|
12
|
+
color?: string;
|
|
13
|
+
backgroundColor?: string;
|
|
14
|
+
};
|
|
15
|
+
constructor(credentialDefinitionId: string, overlay: ILegacyBrandingOverlayData);
|
|
16
|
+
get backgroundColor(): string;
|
|
17
|
+
get imageSource(): string | undefined;
|
|
18
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
3
|
+
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
4
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
5
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
6
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
7
|
+
};
|
|
8
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
9
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
10
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
11
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
12
|
+
};
|
|
13
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
+
};
|
|
16
|
+
var _LegacyBrandingOverlay_background_color, _LegacyBrandingOverlay_image_source;
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
const color_1 = require("../../utils/color");
|
|
19
|
+
const BaseOverlay_1 = __importDefault(require("../base/BaseOverlay"));
|
|
20
|
+
class LegacyBrandingOverlay extends BaseOverlay_1.default {
|
|
21
|
+
constructor(credentialDefinitionId, overlay) {
|
|
22
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
23
|
+
super(overlay);
|
|
24
|
+
_LegacyBrandingOverlay_background_color.set(this, void 0);
|
|
25
|
+
_LegacyBrandingOverlay_image_source.set(this, void 0);
|
|
26
|
+
__classPrivateFieldSet(this, _LegacyBrandingOverlay_background_color, (_a = overlay.background_color) !== null && _a !== void 0 ? _a : (0, color_1.generateColor)(credentialDefinitionId), "f");
|
|
27
|
+
__classPrivateFieldSet(this, _LegacyBrandingOverlay_image_source, overlay.image_source, "f");
|
|
28
|
+
if (overlay.header) {
|
|
29
|
+
this.header = {
|
|
30
|
+
color: (_b = overlay.header) === null || _b === void 0 ? void 0 : _b.color,
|
|
31
|
+
backgroundColor: (_c = overlay.header) === null || _c === void 0 ? void 0 : _c.background_color,
|
|
32
|
+
imageSource: (_d = overlay.header) === null || _d === void 0 ? void 0 : _d.image_source,
|
|
33
|
+
hideIssuer: (_e = overlay.header) === null || _e === void 0 ? void 0 : _e.hide_issuer,
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
if (overlay.footer) {
|
|
37
|
+
this.footer = {
|
|
38
|
+
color: (_f = overlay.footer) === null || _f === void 0 ? void 0 : _f.color,
|
|
39
|
+
backgroundColor: (_g = overlay.footer) === null || _g === void 0 ? void 0 : _g.background_color,
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
get backgroundColor() {
|
|
44
|
+
return __classPrivateFieldGet(this, _LegacyBrandingOverlay_background_color, "f");
|
|
45
|
+
}
|
|
46
|
+
get imageSource() {
|
|
47
|
+
return __classPrivateFieldGet(this, _LegacyBrandingOverlay_image_source, "f");
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
_LegacyBrandingOverlay_background_color = new WeakMap(), _LegacyBrandingOverlay_image_source = new WeakMap();
|
|
51
|
+
exports.default = LegacyBrandingOverlay;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { IOverlayBundleData } from '../../interfaces/data';
|
|
2
|
+
import { IOverlayBundleAttribute, IOverlayBundleMetadata } from '../../interfaces/overlay';
|
|
3
|
+
import BaseOverlay from '../base/BaseOverlay';
|
|
4
|
+
import BrandingOverlay from '../branding/BrandingOverlay';
|
|
5
|
+
import CaptureBase from '../capture-base/CaptureBase';
|
|
6
|
+
declare class OverlayBundle {
|
|
7
|
+
#private;
|
|
8
|
+
credentialDefinitionId: string;
|
|
9
|
+
captureBase: CaptureBase;
|
|
10
|
+
overlays: BaseOverlay[];
|
|
11
|
+
languages: string[];
|
|
12
|
+
metadata: IOverlayBundleMetadata;
|
|
13
|
+
attributes: IOverlayBundleAttribute[];
|
|
14
|
+
flaggedAttributes: IOverlayBundleAttribute[];
|
|
15
|
+
constructor(credentialDefinitionId: string, bundle: IOverlayBundleData);
|
|
16
|
+
get branding(): BrandingOverlay | undefined;
|
|
17
|
+
getAttribute(name: string): IOverlayBundleAttribute | undefined;
|
|
18
|
+
getFlaggedAttribute(name: string): IOverlayBundleAttribute | undefined;
|
|
19
|
+
}
|
|
20
|
+
export default OverlayBundle;
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
3
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
4
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
5
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
6
|
+
};
|
|
7
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
8
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
9
|
+
};
|
|
10
|
+
var _OverlayBundle_instances, _OverlayBundle_processMetadata, _OverlayBundle_processLanguages, _OverlayBundle_processOverlayAttributes, _OverlayBundle_processInformationForAttribute, _OverlayBundle_processLabelForAttribute, _OverlayBundle_processCharacterEncodingForAttribute, _OverlayBundle_processStandardForAttribute, _OverlayBundle_processFormatForAttribute, _OverlayBundle_overlaysForType;
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
const OverlayTypeMap_1 = __importDefault(require("../OverlayTypeMap"));
|
|
13
|
+
const TypeEnums_1 = require("../TypeEnums");
|
|
14
|
+
const BaseOverlay_1 = __importDefault(require("../base/BaseOverlay"));
|
|
15
|
+
const BrandingOverlay_1 = __importDefault(require("../branding/BrandingOverlay"));
|
|
16
|
+
const LegacyBrandingOverlay_1 = __importDefault(require("../branding/LegacyBrandingOverlay"));
|
|
17
|
+
const CaptureBase_1 = __importDefault(require("../capture-base/CaptureBase"));
|
|
18
|
+
class OverlayBundle {
|
|
19
|
+
constructor(credentialDefinitionId, bundle) {
|
|
20
|
+
_OverlayBundle_instances.add(this);
|
|
21
|
+
this.credentialDefinitionId = credentialDefinitionId;
|
|
22
|
+
this.captureBase = new CaptureBase_1.default(bundle.capture_base);
|
|
23
|
+
this.overlays = bundle.overlays
|
|
24
|
+
.filter((overlay) => !overlay.type.startsWith('aries/overlays/branding/'))
|
|
25
|
+
.map((overlay) => {
|
|
26
|
+
const OverlayClass = (OverlayTypeMap_1.default.get(overlay.type) || BaseOverlay_1.default);
|
|
27
|
+
return new OverlayClass(overlay);
|
|
28
|
+
});
|
|
29
|
+
this.overlays.push(...bundle.overlays
|
|
30
|
+
.filter((overlay) => overlay.type === TypeEnums_1.OverlayType.Branding01)
|
|
31
|
+
.map((overlay) => {
|
|
32
|
+
const OverlayClass = (OverlayTypeMap_1.default.get(overlay.type) ||
|
|
33
|
+
LegacyBrandingOverlay_1.default);
|
|
34
|
+
return new OverlayClass(credentialDefinitionId, overlay);
|
|
35
|
+
}));
|
|
36
|
+
this.overlays.push(...bundle.overlays
|
|
37
|
+
.filter((overlay) => overlay.type === TypeEnums_1.OverlayType.Branding10 || overlay.type === TypeEnums_1.OverlayType.Branding11)
|
|
38
|
+
.map((overlay) => {
|
|
39
|
+
const OverlayClass = (OverlayTypeMap_1.default.get(overlay.type) || BrandingOverlay_1.default);
|
|
40
|
+
return new OverlayClass(credentialDefinitionId, overlay);
|
|
41
|
+
}));
|
|
42
|
+
this.languages = __classPrivateFieldGet(this, _OverlayBundle_instances, "m", _OverlayBundle_processLanguages).call(this);
|
|
43
|
+
this.metadata = __classPrivateFieldGet(this, _OverlayBundle_instances, "m", _OverlayBundle_processMetadata).call(this);
|
|
44
|
+
this.attributes = __classPrivateFieldGet(this, _OverlayBundle_instances, "m", _OverlayBundle_processOverlayAttributes).call(this);
|
|
45
|
+
this.flaggedAttributes = this.attributes.filter((attribute) => this.captureBase.flaggedAttributes.includes(attribute.name));
|
|
46
|
+
}
|
|
47
|
+
get branding() {
|
|
48
|
+
return (__classPrivateFieldGet(this, _OverlayBundle_instances, "m", _OverlayBundle_overlaysForType).call(this, TypeEnums_1.OverlayType.Branding10)[0] ||
|
|
49
|
+
__classPrivateFieldGet(this, _OverlayBundle_instances, "m", _OverlayBundle_overlaysForType).call(this, TypeEnums_1.OverlayType.Branding11)[0]);
|
|
50
|
+
}
|
|
51
|
+
getAttribute(name) {
|
|
52
|
+
return this.attributes.find((attribute) => attribute.name === name);
|
|
53
|
+
}
|
|
54
|
+
getFlaggedAttribute(name) {
|
|
55
|
+
return this.flaggedAttributes.find((attribute) => attribute.name === name);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
_OverlayBundle_instances = new WeakSet(), _OverlayBundle_processMetadata = function _OverlayBundle_processMetadata() {
|
|
59
|
+
var _a;
|
|
60
|
+
const metadata = {
|
|
61
|
+
name: {},
|
|
62
|
+
description: {},
|
|
63
|
+
credentialHelpText: {},
|
|
64
|
+
credentialSupportUrl: {},
|
|
65
|
+
issuer: {},
|
|
66
|
+
issuerDescription: {},
|
|
67
|
+
issuerUrl: {},
|
|
68
|
+
};
|
|
69
|
+
for (const overlay of __classPrivateFieldGet(this, _OverlayBundle_instances, "m", _OverlayBundle_overlaysForType).call(this, TypeEnums_1.OverlayType.Meta10)) {
|
|
70
|
+
const language = (_a = overlay.language) !== null && _a !== void 0 ? _a : 'en';
|
|
71
|
+
const { name, description, credentialHelpText, credentialSupportUrl, issuer, issuerDescription, issuerUrl } = overlay;
|
|
72
|
+
if (name) {
|
|
73
|
+
metadata.name[language] = name;
|
|
74
|
+
}
|
|
75
|
+
if (description) {
|
|
76
|
+
metadata.description[language] = description;
|
|
77
|
+
}
|
|
78
|
+
if (credentialHelpText) {
|
|
79
|
+
metadata.credentialHelpText[language] = credentialHelpText;
|
|
80
|
+
}
|
|
81
|
+
if (credentialSupportUrl) {
|
|
82
|
+
metadata.credentialSupportUrl[language] = credentialSupportUrl;
|
|
83
|
+
}
|
|
84
|
+
if (issuer) {
|
|
85
|
+
metadata.issuer[language] = issuer;
|
|
86
|
+
}
|
|
87
|
+
if (issuerDescription) {
|
|
88
|
+
metadata.issuerDescription[language] = issuerDescription;
|
|
89
|
+
}
|
|
90
|
+
if (issuerUrl) {
|
|
91
|
+
metadata.issuerUrl[language] = issuerUrl;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
return metadata;
|
|
95
|
+
}, _OverlayBundle_processLanguages = function _OverlayBundle_processLanguages() {
|
|
96
|
+
const languages = [];
|
|
97
|
+
for (const overlay of __classPrivateFieldGet(this, _OverlayBundle_instances, "m", _OverlayBundle_overlaysForType).call(this, TypeEnums_1.OverlayType.Meta10)) {
|
|
98
|
+
const language = overlay.language;
|
|
99
|
+
if (language && !languages.includes(language)) {
|
|
100
|
+
languages.push(language);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
languages.sort((a, b) => a.localeCompare(b));
|
|
104
|
+
return languages;
|
|
105
|
+
}, _OverlayBundle_processOverlayAttributes = function _OverlayBundle_processOverlayAttributes() {
|
|
106
|
+
const attributes = [];
|
|
107
|
+
const attributeMap = new Map(Object.entries(this.captureBase.attributes));
|
|
108
|
+
for (const [name, type] of attributeMap) {
|
|
109
|
+
attributes.push({
|
|
110
|
+
name,
|
|
111
|
+
type,
|
|
112
|
+
information: __classPrivateFieldGet(this, _OverlayBundle_instances, "m", _OverlayBundle_processInformationForAttribute).call(this, name),
|
|
113
|
+
label: __classPrivateFieldGet(this, _OverlayBundle_instances, "m", _OverlayBundle_processLabelForAttribute).call(this, name),
|
|
114
|
+
characterEncoding: __classPrivateFieldGet(this, _OverlayBundle_instances, "m", _OverlayBundle_processCharacterEncodingForAttribute).call(this, name),
|
|
115
|
+
standard: __classPrivateFieldGet(this, _OverlayBundle_instances, "m", _OverlayBundle_processStandardForAttribute).call(this, name),
|
|
116
|
+
format: __classPrivateFieldGet(this, _OverlayBundle_instances, "m", _OverlayBundle_processFormatForAttribute).call(this, name),
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
return attributes;
|
|
120
|
+
}, _OverlayBundle_processInformationForAttribute = function _OverlayBundle_processInformationForAttribute(key) {
|
|
121
|
+
var _a, _b;
|
|
122
|
+
const information = {};
|
|
123
|
+
for (const overlay of __classPrivateFieldGet(this, _OverlayBundle_instances, "m", _OverlayBundle_overlaysForType).call(this, TypeEnums_1.OverlayType.Information10)) {
|
|
124
|
+
if ((_a = overlay.attributeInformation) === null || _a === void 0 ? void 0 : _a[key]) {
|
|
125
|
+
const language = (_b = overlay.language) !== null && _b !== void 0 ? _b : 'en';
|
|
126
|
+
information[language] = overlay.attributeInformation[key];
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
return information;
|
|
130
|
+
}, _OverlayBundle_processLabelForAttribute = function _OverlayBundle_processLabelForAttribute(key) {
|
|
131
|
+
var _a, _b;
|
|
132
|
+
const label = {};
|
|
133
|
+
for (const overlay of __classPrivateFieldGet(this, _OverlayBundle_instances, "m", _OverlayBundle_overlaysForType).call(this, TypeEnums_1.OverlayType.Label10)) {
|
|
134
|
+
if ((_a = overlay.attributeLabels) === null || _a === void 0 ? void 0 : _a[key]) {
|
|
135
|
+
const language = (_b = overlay.language) !== null && _b !== void 0 ? _b : 'en';
|
|
136
|
+
label[language] = overlay.attributeLabels[key];
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
return label;
|
|
140
|
+
}, _OverlayBundle_processCharacterEncodingForAttribute = function _OverlayBundle_processCharacterEncodingForAttribute(key) {
|
|
141
|
+
var _a;
|
|
142
|
+
for (const overlay of __classPrivateFieldGet(this, _OverlayBundle_instances, "m", _OverlayBundle_overlaysForType).call(this, TypeEnums_1.OverlayType.CharacterEncoding10)) {
|
|
143
|
+
if ((_a = overlay.attributeCharacterEncoding) === null || _a === void 0 ? void 0 : _a[key]) {
|
|
144
|
+
return overlay.attributeCharacterEncoding[key];
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
return;
|
|
148
|
+
}, _OverlayBundle_processStandardForAttribute = function _OverlayBundle_processStandardForAttribute(key) {
|
|
149
|
+
var _a;
|
|
150
|
+
for (const overlay of __classPrivateFieldGet(this, _OverlayBundle_instances, "m", _OverlayBundle_overlaysForType).call(this, TypeEnums_1.OverlayType.Standard10)) {
|
|
151
|
+
if ((_a = overlay.attributeStandards) === null || _a === void 0 ? void 0 : _a[key]) {
|
|
152
|
+
return overlay.attributeStandards[key];
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
return;
|
|
156
|
+
}, _OverlayBundle_processFormatForAttribute = function _OverlayBundle_processFormatForAttribute(key) {
|
|
157
|
+
var _a;
|
|
158
|
+
for (const overlay of __classPrivateFieldGet(this, _OverlayBundle_instances, "m", _OverlayBundle_overlaysForType).call(this, TypeEnums_1.OverlayType.Format10)) {
|
|
159
|
+
if ((_a = overlay.attributeFormats) === null || _a === void 0 ? void 0 : _a[key]) {
|
|
160
|
+
return overlay.attributeFormats[key];
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
return;
|
|
164
|
+
}, _OverlayBundle_overlaysForType = function _OverlayBundle_overlaysForType(type) {
|
|
165
|
+
return this.overlays.filter((overlay) => overlay.type === type);
|
|
166
|
+
};
|
|
167
|
+
exports.default = OverlayBundle;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ICaptureBaseData } from '../../interfaces/data';
|
|
2
|
+
export default class CaptureBase {
|
|
3
|
+
#private;
|
|
4
|
+
type: string;
|
|
5
|
+
classification: string;
|
|
6
|
+
attributes: Record<string, string>;
|
|
7
|
+
digest: string;
|
|
8
|
+
constructor(captureBase: ICaptureBaseData);
|
|
9
|
+
get flaggedAttributes(): string[];
|
|
10
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
3
|
+
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
4
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
5
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
6
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
7
|
+
};
|
|
8
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
9
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
10
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
11
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
12
|
+
};
|
|
13
|
+
var _CaptureBase_flagged_attributes;
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
class CaptureBase {
|
|
16
|
+
constructor(captureBase) {
|
|
17
|
+
var _a;
|
|
18
|
+
_CaptureBase_flagged_attributes.set(this, void 0);
|
|
19
|
+
this.type = captureBase.type;
|
|
20
|
+
this.classification = captureBase.classification;
|
|
21
|
+
this.attributes = captureBase.attributes;
|
|
22
|
+
__classPrivateFieldSet(this, _CaptureBase_flagged_attributes, captureBase.flagged_attributes, "f");
|
|
23
|
+
this.digest = (_a = captureBase.digest) !== null && _a !== void 0 ? _a : '';
|
|
24
|
+
}
|
|
25
|
+
get flaggedAttributes() {
|
|
26
|
+
return __classPrivateFieldGet(this, _CaptureBase_flagged_attributes, "f");
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
_CaptureBase_flagged_attributes = new WeakMap();
|
|
30
|
+
exports.default = CaptureBase;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import OverlayTypeMap from './OverlayTypeMap';
|
|
2
|
+
import { OverlayType, CaptureBaseAttributeType } from './TypeEnums';
|
|
3
|
+
import BaseOverlay from './base/BaseOverlay';
|
|
4
|
+
import BrandingOverlay from './branding/BrandingOverlay';
|
|
5
|
+
import LegacyBrandingOverlay from './branding/LegacyBrandingOverlay';
|
|
6
|
+
import OverlayBundle from './bundle/OverlayBundle';
|
|
7
|
+
import CaptureBase from './capture-base/CaptureBase';
|
|
8
|
+
import CharacterEncodingOverlay from './semantic/CharacterEncodingOverlay';
|
|
9
|
+
import FormatOverlay from './semantic/FormatOverlay';
|
|
10
|
+
import InformationOverlay from './semantic/InformationOverlay';
|
|
11
|
+
import LabelOverlay from './semantic/LabelOverlay';
|
|
12
|
+
import MetaOverlay from './semantic/MetaOverlay';
|
|
13
|
+
import StandardOverlay from './semantic/StandardOverlay';
|
|
14
|
+
export { OverlayType, CaptureBaseAttributeType, BaseOverlay, CaptureBase, OverlayBundle, BrandingOverlay, LegacyBrandingOverlay, CharacterEncodingOverlay, FormatOverlay, InformationOverlay, LabelOverlay, MetaOverlay, StandardOverlay, OverlayTypeMap, };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.OverlayTypeMap = exports.StandardOverlay = exports.MetaOverlay = exports.LabelOverlay = exports.InformationOverlay = exports.FormatOverlay = exports.CharacterEncodingOverlay = exports.LegacyBrandingOverlay = exports.BrandingOverlay = exports.OverlayBundle = exports.CaptureBase = exports.BaseOverlay = exports.CaptureBaseAttributeType = exports.OverlayType = void 0;
|
|
7
|
+
const OverlayTypeMap_1 = __importDefault(require("./OverlayTypeMap"));
|
|
8
|
+
exports.OverlayTypeMap = OverlayTypeMap_1.default;
|
|
9
|
+
const TypeEnums_1 = require("./TypeEnums");
|
|
10
|
+
Object.defineProperty(exports, "OverlayType", { enumerable: true, get: function () { return TypeEnums_1.OverlayType; } });
|
|
11
|
+
Object.defineProperty(exports, "CaptureBaseAttributeType", { enumerable: true, get: function () { return TypeEnums_1.CaptureBaseAttributeType; } });
|
|
12
|
+
const BaseOverlay_1 = __importDefault(require("./base/BaseOverlay"));
|
|
13
|
+
exports.BaseOverlay = BaseOverlay_1.default;
|
|
14
|
+
const BrandingOverlay_1 = __importDefault(require("./branding/BrandingOverlay"));
|
|
15
|
+
exports.BrandingOverlay = BrandingOverlay_1.default;
|
|
16
|
+
const LegacyBrandingOverlay_1 = __importDefault(require("./branding/LegacyBrandingOverlay"));
|
|
17
|
+
exports.LegacyBrandingOverlay = LegacyBrandingOverlay_1.default;
|
|
18
|
+
const OverlayBundle_1 = __importDefault(require("./bundle/OverlayBundle"));
|
|
19
|
+
exports.OverlayBundle = OverlayBundle_1.default;
|
|
20
|
+
const CaptureBase_1 = __importDefault(require("./capture-base/CaptureBase"));
|
|
21
|
+
exports.CaptureBase = CaptureBase_1.default;
|
|
22
|
+
const CharacterEncodingOverlay_1 = __importDefault(require("./semantic/CharacterEncodingOverlay"));
|
|
23
|
+
exports.CharacterEncodingOverlay = CharacterEncodingOverlay_1.default;
|
|
24
|
+
const FormatOverlay_1 = __importDefault(require("./semantic/FormatOverlay"));
|
|
25
|
+
exports.FormatOverlay = FormatOverlay_1.default;
|
|
26
|
+
const InformationOverlay_1 = __importDefault(require("./semantic/InformationOverlay"));
|
|
27
|
+
exports.InformationOverlay = InformationOverlay_1.default;
|
|
28
|
+
const LabelOverlay_1 = __importDefault(require("./semantic/LabelOverlay"));
|
|
29
|
+
exports.LabelOverlay = LabelOverlay_1.default;
|
|
30
|
+
const MetaOverlay_1 = __importDefault(require("./semantic/MetaOverlay"));
|
|
31
|
+
exports.MetaOverlay = MetaOverlay_1.default;
|
|
32
|
+
const StandardOverlay_1 = __importDefault(require("./semantic/StandardOverlay"));
|
|
33
|
+
exports.StandardOverlay = StandardOverlay_1.default;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ICharacterEncodingOverlayData } from '../../interfaces/data';
|
|
2
|
+
import BaseOverlay from '../base/BaseOverlay';
|
|
3
|
+
export default class CharacterEncodingOverlay extends BaseOverlay {
|
|
4
|
+
#private;
|
|
5
|
+
constructor(overlay: ICharacterEncodingOverlayData);
|
|
6
|
+
get defaultCharacterEncoding(): string | undefined;
|
|
7
|
+
get attrCharacterEncoding(): Record<string, string> | undefined;
|
|
8
|
+
get attributeCharacterEncoding(): Record<string, string> | undefined;
|
|
9
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
3
|
+
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
4
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
5
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
6
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
7
|
+
};
|
|
8
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
9
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
10
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
11
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
12
|
+
};
|
|
13
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
+
};
|
|
16
|
+
var _CharacterEncodingOverlay_default_character_encoding, _CharacterEncodingOverlay_attr_character_encoding, _CharacterEncodingOverlay_attribute_character_encoding;
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
const BaseOverlay_1 = __importDefault(require("../base/BaseOverlay"));
|
|
19
|
+
class CharacterEncodingOverlay extends BaseOverlay_1.default {
|
|
20
|
+
constructor(overlay) {
|
|
21
|
+
super(overlay);
|
|
22
|
+
_CharacterEncodingOverlay_default_character_encoding.set(this, void 0);
|
|
23
|
+
// DEPRECATED - Use #attribute_character_encoding instead
|
|
24
|
+
_CharacterEncodingOverlay_attr_character_encoding.set(this, void 0);
|
|
25
|
+
_CharacterEncodingOverlay_attribute_character_encoding.set(this, void 0);
|
|
26
|
+
__classPrivateFieldSet(this, _CharacterEncodingOverlay_default_character_encoding, overlay.default_character_encoding, "f");
|
|
27
|
+
// DEPRECATED - Use #attribute_character_encoding instead
|
|
28
|
+
__classPrivateFieldSet(this, _CharacterEncodingOverlay_attr_character_encoding, overlay.attr_character_encoding, "f");
|
|
29
|
+
__classPrivateFieldSet(this, _CharacterEncodingOverlay_attribute_character_encoding, overlay.attribute_character_encoding, "f");
|
|
30
|
+
}
|
|
31
|
+
get defaultCharacterEncoding() {
|
|
32
|
+
return __classPrivateFieldGet(this, _CharacterEncodingOverlay_default_character_encoding, "f");
|
|
33
|
+
}
|
|
34
|
+
// DEPRECATED - Use attributeCharacterEncoding instead
|
|
35
|
+
get attrCharacterEncoding() {
|
|
36
|
+
return __classPrivateFieldGet(this, _CharacterEncodingOverlay_attr_character_encoding, "f");
|
|
37
|
+
}
|
|
38
|
+
get attributeCharacterEncoding() {
|
|
39
|
+
return __classPrivateFieldGet(this, _CharacterEncodingOverlay_attribute_character_encoding, "f");
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
_CharacterEncodingOverlay_default_character_encoding = new WeakMap(), _CharacterEncodingOverlay_attr_character_encoding = new WeakMap(), _CharacterEncodingOverlay_attribute_character_encoding = new WeakMap();
|
|
43
|
+
exports.default = CharacterEncodingOverlay;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { IFormatOverlayData } from '../../interfaces/data';
|
|
2
|
+
import BaseOverlay from '../base/BaseOverlay';
|
|
3
|
+
export default class FormatOverlay extends BaseOverlay {
|
|
4
|
+
#private;
|
|
5
|
+
constructor(overlay: IFormatOverlayData);
|
|
6
|
+
get attributeFormats(): Record<string, string>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
3
|
+
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
4
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
5
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
6
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
7
|
+
};
|
|
8
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
9
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
10
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
11
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
12
|
+
};
|
|
13
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
+
};
|
|
16
|
+
var _FormatOverlay_attribute_formats;
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
const BaseOverlay_1 = __importDefault(require("../base/BaseOverlay"));
|
|
19
|
+
class FormatOverlay extends BaseOverlay_1.default {
|
|
20
|
+
constructor(overlay) {
|
|
21
|
+
super(overlay);
|
|
22
|
+
_FormatOverlay_attribute_formats.set(this, void 0);
|
|
23
|
+
__classPrivateFieldSet(this, _FormatOverlay_attribute_formats, overlay.attribute_formats, "f");
|
|
24
|
+
}
|
|
25
|
+
get attributeFormats() {
|
|
26
|
+
return __classPrivateFieldGet(this, _FormatOverlay_attribute_formats, "f");
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
_FormatOverlay_attribute_formats = new WeakMap();
|
|
30
|
+
exports.default = FormatOverlay;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { IInformationOverlayData } from '../../interfaces/data';
|
|
2
|
+
import BaseOverlay from '../base/BaseOverlay';
|
|
3
|
+
export default class InformationOverlay extends BaseOverlay {
|
|
4
|
+
#private;
|
|
5
|
+
language: string;
|
|
6
|
+
constructor(overlay: IInformationOverlayData);
|
|
7
|
+
get attributeInformation(): Record<string, string>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
3
|
+
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
4
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
5
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
6
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
7
|
+
};
|
|
8
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
9
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
10
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
11
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
12
|
+
};
|
|
13
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
+
};
|
|
16
|
+
var _InformationOverlay_attribute_information;
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
const BaseOverlay_1 = __importDefault(require("../base/BaseOverlay"));
|
|
19
|
+
class InformationOverlay extends BaseOverlay_1.default {
|
|
20
|
+
constructor(overlay) {
|
|
21
|
+
super(overlay);
|
|
22
|
+
_InformationOverlay_attribute_information.set(this, void 0);
|
|
23
|
+
this.language = overlay.language;
|
|
24
|
+
__classPrivateFieldSet(this, _InformationOverlay_attribute_information, overlay.attribute_information, "f");
|
|
25
|
+
}
|
|
26
|
+
get attributeInformation() {
|
|
27
|
+
return __classPrivateFieldGet(this, _InformationOverlay_attribute_information, "f");
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
_InformationOverlay_attribute_information = new WeakMap();
|
|
31
|
+
exports.default = InformationOverlay;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ILabelOverlayData } from '../../interfaces/data';
|
|
2
|
+
import BaseOverlay from '../base/BaseOverlay';
|
|
3
|
+
export default class LabelOverlay extends BaseOverlay {
|
|
4
|
+
#private;
|
|
5
|
+
language: string;
|
|
6
|
+
constructor(overlay: ILabelOverlayData);
|
|
7
|
+
get attributeLabels(): Record<string, string>;
|
|
8
|
+
get attributeCategories(): string[] | undefined;
|
|
9
|
+
get categoryLabels(): Record<string, string> | undefined;
|
|
10
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
3
|
+
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
4
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
5
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
6
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
7
|
+
};
|
|
8
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
9
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
10
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
11
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
12
|
+
};
|
|
13
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
+
};
|
|
16
|
+
var _LabelOverlay_attribute_labels, _LabelOverlay_attribute_categories, _LabelOverlay_category_labels;
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
const BaseOverlay_1 = __importDefault(require("../base/BaseOverlay"));
|
|
19
|
+
class LabelOverlay extends BaseOverlay_1.default {
|
|
20
|
+
constructor(overlay) {
|
|
21
|
+
super(overlay);
|
|
22
|
+
_LabelOverlay_attribute_labels.set(this, void 0);
|
|
23
|
+
_LabelOverlay_attribute_categories.set(this, void 0);
|
|
24
|
+
_LabelOverlay_category_labels.set(this, void 0);
|
|
25
|
+
this.language = overlay.language;
|
|
26
|
+
__classPrivateFieldSet(this, _LabelOverlay_attribute_labels, overlay.attribute_labels, "f");
|
|
27
|
+
__classPrivateFieldSet(this, _LabelOverlay_attribute_categories, overlay.attribute_categories, "f");
|
|
28
|
+
__classPrivateFieldSet(this, _LabelOverlay_category_labels, overlay.category_labels, "f");
|
|
29
|
+
}
|
|
30
|
+
get attributeLabels() {
|
|
31
|
+
return __classPrivateFieldGet(this, _LabelOverlay_attribute_labels, "f");
|
|
32
|
+
}
|
|
33
|
+
get attributeCategories() {
|
|
34
|
+
return __classPrivateFieldGet(this, _LabelOverlay_attribute_categories, "f");
|
|
35
|
+
}
|
|
36
|
+
get categoryLabels() {
|
|
37
|
+
return __classPrivateFieldGet(this, _LabelOverlay_category_labels, "f");
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
_LabelOverlay_attribute_labels = new WeakMap(), _LabelOverlay_attribute_categories = new WeakMap(), _LabelOverlay_category_labels = new WeakMap();
|
|
41
|
+
exports.default = LabelOverlay;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { IMetaOverlayData } from '../../interfaces/data';
|
|
2
|
+
import BaseOverlay from '../base/BaseOverlay';
|
|
3
|
+
export default class MetaOverlay extends BaseOverlay {
|
|
4
|
+
#private;
|
|
5
|
+
language: string;
|
|
6
|
+
name?: string;
|
|
7
|
+
description?: string;
|
|
8
|
+
issuer?: string;
|
|
9
|
+
constructor(overlay: IMetaOverlayData);
|
|
10
|
+
get credentialHelpText(): string | undefined;
|
|
11
|
+
get credentialSupportUrl(): string | undefined;
|
|
12
|
+
get issuerDescription(): string | undefined;
|
|
13
|
+
get issuerUrl(): string | undefined;
|
|
14
|
+
get watermark(): string | undefined;
|
|
15
|
+
}
|