@qualweb/util 0.0.0-develop-20231124153852 → 0.0.0-develop-20241204121833
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/__webpack/util.bundle.js +1 -0
- package/dist/accessibilityUtils/accessibilityUtils.d.ts +44 -0
- package/dist/accessibilityUtils/accessibilityUtils.d.ts.map +1 -0
- package/dist/accessibilityUtils/accessibilityUtils.js +292 -0
- package/dist/accessibilityUtils/allowsNameFromContent.d.ts +4 -0
- package/dist/accessibilityUtils/allowsNameFromContent.d.ts.map +1 -0
- package/dist/accessibilityUtils/allowsNameFromContent.js +9 -0
- package/dist/accessibilityUtils/ariaAttributesRoles.d.ts +11 -0
- package/dist/accessibilityUtils/ariaAttributesRoles.d.ts.map +1 -0
- package/dist/accessibilityUtils/ariaAttributesRoles.js +293 -0
- package/dist/accessibilityUtils/constants.d.ts +19 -0
- package/dist/accessibilityUtils/constants.d.ts.map +1 -0
- package/dist/accessibilityUtils/constants.js +244 -0
- package/dist/accessibilityUtils/elementHasGlobalARIAPropertyOrAttribute.d.ts +4 -0
- package/dist/accessibilityUtils/elementHasGlobalARIAPropertyOrAttribute.d.ts.map +1 -0
- package/dist/accessibilityUtils/elementHasGlobalARIAPropertyOrAttribute.js +17 -0
- package/dist/accessibilityUtils/elementHasValidRole.d.ts +4 -0
- package/dist/accessibilityUtils/elementHasValidRole.d.ts.map +1 -0
- package/dist/accessibilityUtils/elementHasValidRole.js +22 -0
- package/dist/accessibilityUtils/getAccessibleName.d.ts +4 -0
- package/dist/accessibilityUtils/getAccessibleName.d.ts.map +1 -0
- package/dist/accessibilityUtils/getAccessibleName.js +10 -0
- package/dist/accessibilityUtils/getAccessibleNameRecursion.d.ts +4 -0
- package/dist/accessibilityUtils/getAccessibleNameRecursion.d.ts.map +1 -0
- package/dist/accessibilityUtils/getAccessibleNameRecursion.js +275 -0
- package/dist/accessibilityUtils/getAccessibleNameSVG.d.ts +4 -0
- package/dist/accessibilityUtils/getAccessibleNameSVG.d.ts.map +1 -0
- package/dist/accessibilityUtils/getAccessibleNameSVG.js +10 -0
- package/dist/accessibilityUtils/getAccessibleNameSVGRecursion.d.ts +4 -0
- package/dist/accessibilityUtils/getAccessibleNameSVGRecursion.d.ts.map +1 -0
- package/dist/accessibilityUtils/getAccessibleNameSVGRecursion.js +124 -0
- package/dist/accessibilityUtils/getAccessibleNameSelector.d.ts +4 -0
- package/dist/accessibilityUtils/getAccessibleNameSelector.d.ts.map +1 -0
- package/dist/accessibilityUtils/getAccessibleNameSelector.js +200 -0
- package/dist/accessibilityUtils/getAriaOwner.d.ts +4 -0
- package/dist/accessibilityUtils/getAriaOwner.d.ts.map +1 -0
- package/dist/accessibilityUtils/getAriaOwner.js +21 -0
- package/dist/accessibilityUtils/getDefaultName.d.ts +4 -0
- package/dist/accessibilityUtils/getDefaultName.d.ts.map +1 -0
- package/dist/accessibilityUtils/getDefaultName.js +20 -0
- package/dist/accessibilityUtils/getDisabledWidgets.d.ts +4 -0
- package/dist/accessibilityUtils/getDisabledWidgets.d.ts.map +1 -0
- package/dist/accessibilityUtils/getDisabledWidgets.js +26 -0
- package/dist/accessibilityUtils/getElementRole.d.ts +4 -0
- package/dist/accessibilityUtils/getElementRole.d.ts.map +1 -0
- package/dist/accessibilityUtils/getElementRole.js +7 -0
- package/dist/accessibilityUtils/getElementRoleAName.d.ts +4 -0
- package/dist/accessibilityUtils/getElementRoleAName.d.ts.map +1 -0
- package/dist/accessibilityUtils/getElementRoleAName.js +14 -0
- package/dist/accessibilityUtils/getElementValidExplicitRole.d.ts +4 -0
- package/dist/accessibilityUtils/getElementValidExplicitRole.d.ts.map +1 -0
- package/dist/accessibilityUtils/getElementValidExplicitRole.js +22 -0
- package/dist/accessibilityUtils/getImplicitRole.d.ts +4 -0
- package/dist/accessibilityUtils/getImplicitRole.d.ts.map +1 -0
- package/dist/accessibilityUtils/getImplicitRole.js +187 -0
- package/dist/accessibilityUtils/getLinkContext.d.ts +4 -0
- package/dist/accessibilityUtils/getLinkContext.d.ts.map +1 -0
- package/dist/accessibilityUtils/getLinkContext.js +45 -0
- package/dist/accessibilityUtils/getOwnedElements.d.ts +4 -0
- package/dist/accessibilityUtils/getOwnedElements.d.ts.map +1 -0
- package/dist/accessibilityUtils/getOwnedElements.js +42 -0
- package/dist/accessibilityUtils/getOwnerElement.d.ts +4 -0
- package/dist/accessibilityUtils/getOwnerElement.d.ts.map +1 -0
- package/dist/accessibilityUtils/getOwnerElement.js +19 -0
- package/dist/accessibilityUtils/getTextFromCss.d.ts +4 -0
- package/dist/accessibilityUtils/getTextFromCss.d.ts.map +1 -0
- package/dist/accessibilityUtils/getTextFromCss.js +8 -0
- package/dist/accessibilityUtils/getValueFromEmbeddedControl.d.ts +4 -0
- package/dist/accessibilityUtils/getValueFromEmbeddedControl.d.ts.map +1 -0
- package/dist/accessibilityUtils/getValueFromEmbeddedControl.js +75 -0
- package/dist/accessibilityUtils/implicitRoles.d.ts +10 -0
- package/dist/accessibilityUtils/implicitRoles.d.ts.map +1 -0
- package/dist/accessibilityUtils/implicitRoles.js +494 -0
- package/dist/accessibilityUtils/isDataTable.d.ts +4 -0
- package/dist/accessibilityUtils/isDataTable.d.ts.map +1 -0
- package/dist/accessibilityUtils/isDataTable.js +14 -0
- package/dist/accessibilityUtils/isElementChildPresentational.d.ts +4 -0
- package/dist/accessibilityUtils/isElementChildPresentational.d.ts.map +1 -0
- package/dist/accessibilityUtils/isElementChildPresentational.js +17 -0
- package/dist/accessibilityUtils/isElementChildPresentationalAux.d.ts +4 -0
- package/dist/accessibilityUtils/isElementChildPresentationalAux.d.ts.map +1 -0
- package/dist/accessibilityUtils/isElementChildPresentationalAux.js +17 -0
- package/dist/accessibilityUtils/isElementControl.d.ts +4 -0
- package/dist/accessibilityUtils/isElementControl.d.ts.map +1 -0
- package/dist/accessibilityUtils/isElementControl.js +8 -0
- package/dist/accessibilityUtils/isElementFocusable.d.ts +4 -0
- package/dist/accessibilityUtils/isElementFocusable.d.ts.map +1 -0
- package/dist/accessibilityUtils/isElementFocusable.js +21 -0
- package/dist/accessibilityUtils/isElementFocusableByDefault.d.ts +4 -0
- package/dist/accessibilityUtils/isElementFocusableByDefault.d.ts.map +1 -0
- package/dist/accessibilityUtils/isElementFocusableByDefault.js +47 -0
- package/dist/accessibilityUtils/isElementInAT.d.ts +4 -0
- package/dist/accessibilityUtils/isElementInAT.d.ts.map +1 -0
- package/dist/accessibilityUtils/isElementInAT.js +71 -0
- package/dist/accessibilityUtils/isElementReferencedByAriaLabel.d.ts +4 -0
- package/dist/accessibilityUtils/isElementReferencedByAriaLabel.d.ts.map +1 -0
- package/dist/accessibilityUtils/isElementReferencedByAriaLabel.js +25 -0
- package/dist/accessibilityUtils/isElementWidget.d.ts +4 -0
- package/dist/accessibilityUtils/isElementWidget.d.ts.map +1 -0
- package/dist/accessibilityUtils/isElementWidget.js +8 -0
- package/dist/accessibilityUtils/isFocusableBrowser.d.ts +4 -0
- package/dist/accessibilityUtils/isFocusableBrowser.d.ts.map +1 -0
- package/dist/accessibilityUtils/isFocusableBrowser.js +8 -0
- package/dist/accessibilityUtils/isPartOfSequentialFocusNavigation.d.ts +4 -0
- package/dist/accessibilityUtils/isPartOfSequentialFocusNavigation.d.ts.map +1 -0
- package/dist/accessibilityUtils/isPartOfSequentialFocusNavigation.js +13 -0
- package/dist/accessibilityUtils/landmarkIsTopLevel.d.ts +4 -0
- package/dist/accessibilityUtils/landmarkIsTopLevel.d.ts.map +1 -0
- package/dist/accessibilityUtils/landmarkIsTopLevel.js +16 -0
- package/dist/accessibilityUtils/language.json +8129 -0
- package/dist/accessibilityUtils/roles.d.ts +15 -0
- package/dist/accessibilityUtils/roles.d.ts.map +1 -0
- package/dist/accessibilityUtils/roles.js +2787 -0
- package/dist/applicability/applicability.d.ts +37 -0
- package/dist/applicability/applicability.d.ts.map +1 -0
- package/dist/applicability/applicability.js +490 -0
- package/dist/cache.d.ts +4 -0
- package/dist/cache.d.ts.map +1 -0
- package/dist/cache.js +45 -0
- package/dist/domUtils/audio.json +33 -0
- package/dist/domUtils/constants.d.ts +6 -0
- package/dist/domUtils/constants.d.ts.map +1 -0
- package/dist/domUtils/constants.js +49 -0
- package/dist/domUtils/domUtils.d.ts +28 -0
- package/dist/domUtils/domUtils.d.ts.map +1 -0
- package/dist/domUtils/domUtils.js +124 -0
- package/dist/domUtils/elementHasContent.d.ts +4 -0
- package/dist/domUtils/elementHasContent.d.ts.map +1 -0
- package/dist/domUtils/elementHasContent.js +41 -0
- package/dist/domUtils/elementHasOnePixel.d.ts +4 -0
- package/dist/domUtils/elementHasOnePixel.d.ts.map +1 -0
- package/dist/domUtils/elementHasOnePixel.js +13 -0
- package/dist/domUtils/elementIdIsReferenced.d.ts +4 -0
- package/dist/domUtils/elementIdIsReferenced.d.ts.map +1 -0
- package/dist/domUtils/elementIdIsReferenced.js +13 -0
- package/dist/domUtils/getElementReferencedByHREF.d.ts +4 -0
- package/dist/domUtils/getElementReferencedByHREF.d.ts.map +1 -0
- package/dist/domUtils/getElementReferencedByHREF.js +22 -0
- package/dist/domUtils/getTextSize.d.ts +3 -0
- package/dist/domUtils/getTextSize.d.ts.map +1 -0
- package/dist/domUtils/getTextSize.js +21 -0
- package/dist/domUtils/getTrimmedText.d.ts +4 -0
- package/dist/domUtils/getTrimmedText.d.ts.map +1 -0
- package/dist/domUtils/getTrimmedText.js +13 -0
- package/dist/domUtils/getVideoMetadata.d.ts +4 -0
- package/dist/domUtils/getVideoMetadata.d.ts.map +1 -0
- package/dist/domUtils/getVideoMetadata.js +22 -0
- package/dist/domUtils/image.json +122 -0
- package/dist/domUtils/isElementADescendantOf.d.ts +4 -0
- package/dist/domUtils/isElementADescendantOf.d.ts.map +1 -0
- package/dist/domUtils/isElementADescendantOf.js +23 -0
- package/dist/domUtils/isElementADescendantOfExplicitRole.d.ts +4 -0
- package/dist/domUtils/isElementADescendantOfExplicitRole.d.ts.map +1 -0
- package/dist/domUtils/isElementADescendantOfExplicitRole.js +23 -0
- package/dist/domUtils/isElementHidden.d.ts +4 -0
- package/dist/domUtils/isElementHidden.d.ts.map +1 -0
- package/dist/domUtils/isElementHidden.js +17 -0
- package/dist/domUtils/isElementHiddenByCSS.d.ts +4 -0
- package/dist/domUtils/isElementHiddenByCSS.d.ts.map +1 -0
- package/dist/domUtils/isElementHiddenByCSS.js +15 -0
- package/dist/domUtils/isElementHiddenByCSSAux.d.ts +4 -0
- package/dist/domUtils/isElementHiddenByCSSAux.d.ts.map +1 -0
- package/dist/domUtils/isElementHiddenByCSSAux.js +10 -0
- package/dist/domUtils/isElementVisible.d.ts +4 -0
- package/dist/domUtils/isElementVisible.d.ts.map +1 -0
- package/dist/domUtils/isElementVisible.js +38 -0
- package/dist/domUtils/isHumanLanguage.d.ts +2 -0
- package/dist/domUtils/isHumanLanguage.d.ts.map +1 -0
- package/dist/domUtils/isHumanLanguage.js +10 -0
- package/dist/domUtils/objectElementIsNonText.d.ts +4 -0
- package/dist/domUtils/objectElementIsNonText.d.ts.map +1 -0
- package/dist/domUtils/objectElementIsNonText.js +21 -0
- package/dist/domUtils/textHasTheSameColorOfBackground.d.ts +4 -0
- package/dist/domUtils/textHasTheSameColorOfBackground.d.ts.map +1 -0
- package/dist/domUtils/textHasTheSameColorOfBackground.js +12 -0
- package/dist/domUtils/video.json +490 -0
- package/dist/domUtils/videoElementHasAudio.d.ts +4 -0
- package/dist/domUtils/videoElementHasAudio.d.ts.map +1 -0
- package/dist/domUtils/videoElementHasAudio.js +6 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +13 -0
- package/package.json +45 -30
- package/dist/util.bundle.js +0 -1
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export declare function ElementExists(_target: any, _propertyKey: string, descriptor: PropertyDescriptor): void;
|
|
2
|
+
export declare function ElementIsHTMLElement(_target: any, _propertyKey: string, descriptor: PropertyDescriptor): void;
|
|
3
|
+
export declare function ElementHasAttributes(_target: any, _propertyKey: string, descriptor: PropertyDescriptor): void;
|
|
4
|
+
export declare function ElementHasAttribute(attribute: string): (_target: any, _propertyKey: string, descriptor: PropertyDescriptor) => void;
|
|
5
|
+
export declare function ElementHasNonEmptyAttribute(attribute: string): (_target: any, _propertyKey: string, descriptor: PropertyDescriptor) => void;
|
|
6
|
+
export declare function ElementHasAttributeRole(role: string): (_target: any, _propertyKey: string, descriptor: PropertyDescriptor) => void;
|
|
7
|
+
export declare function ElementHasAttributeValue(attribute: string, value: string): (_target: any, _propertyKey: string, descriptor: PropertyDescriptor) => void;
|
|
8
|
+
export declare function IfElementHasTagNameMustHaveAttributeRole(tagName: string, role: string): (_target: any, _propertyKey: string, descriptor: PropertyDescriptor) => void;
|
|
9
|
+
export declare function ElementHasText(_target: any, _propertyKey: string, descriptor: PropertyDescriptor): void;
|
|
10
|
+
export declare function ElementHasTextNode(_target: any, _propertyKey: string, descriptor: PropertyDescriptor): void;
|
|
11
|
+
export declare function ElementIsInAccessibilityTree(_target: any, _propertyKey: string, descriptor: PropertyDescriptor): void;
|
|
12
|
+
export declare function ElementHasNegativeTabIndex(_target: any, _propertyKey: string, descriptor: PropertyDescriptor): void;
|
|
13
|
+
export declare function ElementIsNotHidden(_target: any, _propertyKey: string, descriptor: PropertyDescriptor): void;
|
|
14
|
+
export declare function ElementSrcAttributeFilenameEqualsAccessibleName(_target: any, _propertyKey: string, descriptor: PropertyDescriptor): void;
|
|
15
|
+
export declare function IsInMainContext(_target: any, _propertyKey: string, descriptor: PropertyDescriptor): void;
|
|
16
|
+
export declare function ElementIsVisible(_target: any, _propertyKey: string, descriptor: PropertyDescriptor): void;
|
|
17
|
+
export declare function ElementIsNot(names: string[]): (_target: any, _propertyKey: string, descriptor: PropertyDescriptor) => void;
|
|
18
|
+
export declare function ElementHasOneOfTheFollowingRoles(roles: string[]): (_target: any, _propertyKey: string, descriptor: PropertyDescriptor) => void;
|
|
19
|
+
export declare function ElementIsWidget(_target: any, _propertyKey: string, descriptor: PropertyDescriptor): void;
|
|
20
|
+
export declare function ElementIsNotWidget(_target: any, _propertyKey: string, descriptor: PropertyDescriptor): void;
|
|
21
|
+
export declare function ElementAllowsNameFromContent(_target: any, _propertyKey: string, descriptor: PropertyDescriptor): void;
|
|
22
|
+
export declare function ElementHasCSSRules(_target: any, _propertyKey: string, descriptor: PropertyDescriptor): void;
|
|
23
|
+
export declare function IsLangSubTagValid(attribute: string): (_target: any, _propertyKey: string, descriptor: PropertyDescriptor) => void;
|
|
24
|
+
export declare function ElementIsImage(_target: any, _propertyKey: string, descriptor: PropertyDescriptor): void;
|
|
25
|
+
export declare function ElementIsNonText(_target: any, _propertyKey: string, descriptor: PropertyDescriptor): void;
|
|
26
|
+
export declare function ElementIsSemanticLink(_target: any, _propertyKey: string, descriptor: PropertyDescriptor): void;
|
|
27
|
+
export declare function ElementIsDataTable(_target: any, _propertyKey: string, descriptor: PropertyDescriptor): void;
|
|
28
|
+
export declare function ElementHasAccessibleName(_target: any, _propertyKey: string, descriptor: PropertyDescriptor): void;
|
|
29
|
+
export declare function ElementHasChild(child: string): (_target: any, _propertyKey: string, descriptor: PropertyDescriptor) => void;
|
|
30
|
+
export declare function ElementHasVisibleChild(child: string): (_target: any, _propertyKey: string, descriptor: PropertyDescriptor) => void;
|
|
31
|
+
export declare function ElementDoesNotHaveChild(child: string): (_target: any, _propertyKey: string, descriptor: PropertyDescriptor) => void;
|
|
32
|
+
export declare function ElementHasParent(parent: string): (_target: any, _propertyKey: string, descriptor: PropertyDescriptor) => void;
|
|
33
|
+
export declare function ElementIsNotChildOf(parent: string): (_target: any, _propertyKey: string, descriptor: PropertyDescriptor) => void;
|
|
34
|
+
export declare function ElementIsNotInert(_target: any, _propertyKey: string, descriptor: PropertyDescriptor): void;
|
|
35
|
+
export declare function ElementIsVisibleOrInAccessibilityTree(_target: any, _propertyKey: string, descriptor: PropertyDescriptor): void;
|
|
36
|
+
export declare function IsHTMLDocument(_target: any, _propertyKey: string, descriptor: PropertyDescriptor): void;
|
|
37
|
+
//# sourceMappingURL=applicability.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"applicability.d.ts","sourceRoot":"","sources":["../../src/applicability/applicability.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,490 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.ElementExists = ElementExists;
|
|
13
|
+
exports.ElementIsHTMLElement = ElementIsHTMLElement;
|
|
14
|
+
exports.ElementHasAttributes = ElementHasAttributes;
|
|
15
|
+
exports.ElementHasAttribute = ElementHasAttribute;
|
|
16
|
+
exports.ElementHasNonEmptyAttribute = ElementHasNonEmptyAttribute;
|
|
17
|
+
exports.ElementHasAttributeRole = ElementHasAttributeRole;
|
|
18
|
+
exports.ElementHasAttributeValue = ElementHasAttributeValue;
|
|
19
|
+
exports.IfElementHasTagNameMustHaveAttributeRole = IfElementHasTagNameMustHaveAttributeRole;
|
|
20
|
+
exports.ElementHasText = ElementHasText;
|
|
21
|
+
exports.ElementHasTextNode = ElementHasTextNode;
|
|
22
|
+
exports.ElementIsInAccessibilityTree = ElementIsInAccessibilityTree;
|
|
23
|
+
exports.ElementHasNegativeTabIndex = ElementHasNegativeTabIndex;
|
|
24
|
+
exports.ElementIsNotHidden = ElementIsNotHidden;
|
|
25
|
+
exports.ElementSrcAttributeFilenameEqualsAccessibleName = ElementSrcAttributeFilenameEqualsAccessibleName;
|
|
26
|
+
exports.IsInMainContext = IsInMainContext;
|
|
27
|
+
exports.ElementIsVisible = ElementIsVisible;
|
|
28
|
+
exports.ElementIsNot = ElementIsNot;
|
|
29
|
+
exports.ElementHasOneOfTheFollowingRoles = ElementHasOneOfTheFollowingRoles;
|
|
30
|
+
exports.ElementIsWidget = ElementIsWidget;
|
|
31
|
+
exports.ElementIsNotWidget = ElementIsNotWidget;
|
|
32
|
+
exports.ElementAllowsNameFromContent = ElementAllowsNameFromContent;
|
|
33
|
+
exports.ElementHasCSSRules = ElementHasCSSRules;
|
|
34
|
+
exports.IsLangSubTagValid = IsLangSubTagValid;
|
|
35
|
+
exports.ElementIsImage = ElementIsImage;
|
|
36
|
+
exports.ElementIsNonText = ElementIsNonText;
|
|
37
|
+
exports.ElementIsSemanticLink = ElementIsSemanticLink;
|
|
38
|
+
exports.ElementIsDataTable = ElementIsDataTable;
|
|
39
|
+
exports.ElementHasAccessibleName = ElementHasAccessibleName;
|
|
40
|
+
exports.ElementHasChild = ElementHasChild;
|
|
41
|
+
exports.ElementHasVisibleChild = ElementHasVisibleChild;
|
|
42
|
+
exports.ElementDoesNotHaveChild = ElementDoesNotHaveChild;
|
|
43
|
+
exports.ElementHasParent = ElementHasParent;
|
|
44
|
+
exports.ElementIsNotChildOf = ElementIsNotChildOf;
|
|
45
|
+
exports.ElementIsNotInert = ElementIsNotInert;
|
|
46
|
+
exports.ElementIsVisibleOrInAccessibilityTree = ElementIsVisibleOrInAccessibilityTree;
|
|
47
|
+
exports.IsHTMLDocument = IsHTMLDocument;
|
|
48
|
+
function ElementExists(_target, _propertyKey, descriptor) {
|
|
49
|
+
const method = descriptor.value;
|
|
50
|
+
descriptor.value = function () {
|
|
51
|
+
if (arguments[0]) {
|
|
52
|
+
return method.apply(this, arguments);
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
function ElementIsHTMLElement(_target, _propertyKey, descriptor) {
|
|
57
|
+
const method = descriptor.value;
|
|
58
|
+
descriptor.value = function () {
|
|
59
|
+
const element = arguments[0];
|
|
60
|
+
if (element.isElementHTMLElement()) {
|
|
61
|
+
return method.apply(this, arguments);
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
function ElementHasAttributes(_target, _propertyKey, descriptor) {
|
|
66
|
+
const method = descriptor.value;
|
|
67
|
+
descriptor.value = function () {
|
|
68
|
+
const hasAttributes = arguments[0].elementHasAttributes();
|
|
69
|
+
if (hasAttributes) {
|
|
70
|
+
return method.apply(this, arguments);
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
function ElementHasAttribute(attribute) {
|
|
75
|
+
return function (_target, _propertyKey, descriptor) {
|
|
76
|
+
const method = descriptor.value;
|
|
77
|
+
descriptor.value = function () {
|
|
78
|
+
const attr = arguments[0].elementHasAttribute(attribute);
|
|
79
|
+
if (attr) {
|
|
80
|
+
return method.apply(this, arguments);
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
function ElementHasNonEmptyAttribute(attribute) {
|
|
86
|
+
return function (_target, _propertyKey, descriptor) {
|
|
87
|
+
const method = descriptor.value;
|
|
88
|
+
descriptor.value = function () {
|
|
89
|
+
const attr = arguments[0].getElementAttribute(attribute);
|
|
90
|
+
if (attr && attr.trim()) {
|
|
91
|
+
return method.apply(this, arguments);
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
function ElementHasAttributeRole(role) {
|
|
97
|
+
return function (_target, _propertyKey, descriptor) {
|
|
98
|
+
const method = descriptor.value;
|
|
99
|
+
descriptor.value = function () {
|
|
100
|
+
const _role = window.AccessibilityUtils.getElementRole(arguments[0]);
|
|
101
|
+
if (!_role || _role === role) {
|
|
102
|
+
return method.apply(this, arguments);
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
function ElementHasAttributeValue(attribute, value) {
|
|
108
|
+
return function (_target, _propertyKey, descriptor) {
|
|
109
|
+
const method = descriptor.value;
|
|
110
|
+
descriptor.value = function () {
|
|
111
|
+
const attr = arguments[0].getElementAttribute(attribute);
|
|
112
|
+
if (attr && attr === value) {
|
|
113
|
+
return method.apply(this, arguments);
|
|
114
|
+
}
|
|
115
|
+
};
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
function IfElementHasTagNameMustHaveAttributeRole(tagName, role) {
|
|
119
|
+
return function (_target, _propertyKey, descriptor) {
|
|
120
|
+
const method = descriptor.value;
|
|
121
|
+
descriptor.value = function () {
|
|
122
|
+
const _tagName = arguments[0].getElementTagName();
|
|
123
|
+
if (_tagName === tagName) {
|
|
124
|
+
const _role = arguments[0].getElementAttribute('role');
|
|
125
|
+
if (!_role || _role === role) {
|
|
126
|
+
return method.apply(this, arguments);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
else {
|
|
130
|
+
return method.apply(this, arguments);
|
|
131
|
+
}
|
|
132
|
+
};
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
function ElementHasText(_target, _propertyKey, descriptor) {
|
|
136
|
+
const method = descriptor.value;
|
|
137
|
+
descriptor.value = function () {
|
|
138
|
+
const element = arguments[0];
|
|
139
|
+
if (window.DomUtils.getTrimmedText(element) !== '') {
|
|
140
|
+
return method.apply(this, arguments);
|
|
141
|
+
}
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
function ElementHasTextNode(_target, _propertyKey, descriptor) {
|
|
145
|
+
const method = descriptor.value;
|
|
146
|
+
descriptor.value = function () {
|
|
147
|
+
const element = arguments[0];
|
|
148
|
+
if (element.elementHasTextNode()) {
|
|
149
|
+
return method.apply(this, arguments);
|
|
150
|
+
}
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
function ElementIsInAccessibilityTree(_target, _propertyKey, descriptor) {
|
|
154
|
+
const method = descriptor.value;
|
|
155
|
+
descriptor.value = function () {
|
|
156
|
+
const isInAT = window.AccessibilityUtils.isElementInAT(arguments[0]);
|
|
157
|
+
if (isInAT) {
|
|
158
|
+
return method.apply(this, arguments);
|
|
159
|
+
}
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
function ElementHasNegativeTabIndex(_target, _propertyKey, descriptor) {
|
|
163
|
+
const method = descriptor.value;
|
|
164
|
+
descriptor.value = function () {
|
|
165
|
+
const tabindex = arguments[0].getElementAttribute('tabindex');
|
|
166
|
+
if (tabindex && parseInt(tabindex) <= -1) {
|
|
167
|
+
return method.apply(this, arguments);
|
|
168
|
+
}
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
function ElementIsNotHidden(_target, _propertyKey, descriptor) {
|
|
172
|
+
const method = descriptor.value;
|
|
173
|
+
descriptor.value = function () {
|
|
174
|
+
const notHidden = !window.DomUtils.isElementHidden(arguments[0]);
|
|
175
|
+
if (notHidden) {
|
|
176
|
+
return method.apply(this, arguments);
|
|
177
|
+
}
|
|
178
|
+
};
|
|
179
|
+
}
|
|
180
|
+
function ElementSrcAttributeFilenameEqualsAccessibleName(_target, _propertyKey, descriptor) {
|
|
181
|
+
const method = descriptor.value;
|
|
182
|
+
descriptor.value = function () {
|
|
183
|
+
const src = arguments[0].getElementAttribute('src');
|
|
184
|
+
const srcSet = arguments[0].getElementAttribute('srcset');
|
|
185
|
+
const parent = arguments[0].getElementParent();
|
|
186
|
+
let filenameWithExtension = new Array();
|
|
187
|
+
if (src) {
|
|
188
|
+
const filePath = src.split('/');
|
|
189
|
+
filenameWithExtension = [filePath[filePath.length - 1].trim().toLowerCase()];
|
|
190
|
+
}
|
|
191
|
+
if (srcSet) {
|
|
192
|
+
const srcSetElements = srcSet.split(',');
|
|
193
|
+
for (const srcsetElement of srcSetElements || []) {
|
|
194
|
+
const srcValue = srcsetElement.split(' ')[0];
|
|
195
|
+
const fileSrc = srcValue.split('/');
|
|
196
|
+
filenameWithExtension.push(fileSrc[fileSrc.length - 1].trim().toLowerCase());
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
if (parent) {
|
|
200
|
+
const parentTag = parent.getElementTagName();
|
|
201
|
+
if (parentTag === 'picture') {
|
|
202
|
+
const sourceElements = parent.getElements('source');
|
|
203
|
+
for (const sourceElement of sourceElements) {
|
|
204
|
+
const src = sourceElement.getElementAttribute('srcset');
|
|
205
|
+
if (src) {
|
|
206
|
+
const filePath = src.split('/');
|
|
207
|
+
filenameWithExtension.push(filePath[filePath.length - 1].trim().toLowerCase());
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
const accessibleName = window.AccessibilityUtils.getAccessibleName(arguments[0]);
|
|
213
|
+
if (accessibleName && filenameWithExtension && filenameWithExtension.includes(accessibleName.toLowerCase())) {
|
|
214
|
+
return method.apply(this, arguments);
|
|
215
|
+
}
|
|
216
|
+
};
|
|
217
|
+
}
|
|
218
|
+
function IsInMainContext(_target, _propertyKey, descriptor) {
|
|
219
|
+
const method = descriptor.value;
|
|
220
|
+
descriptor.value = function () {
|
|
221
|
+
const differentContext = arguments[0].getElementAttribute('_documentSelector');
|
|
222
|
+
if (!differentContext || !differentContext.includes('>')) {
|
|
223
|
+
return method.apply(this, arguments);
|
|
224
|
+
}
|
|
225
|
+
};
|
|
226
|
+
}
|
|
227
|
+
function ElementIsVisible(_target, _propertyKey, descriptor) {
|
|
228
|
+
const method = descriptor.value;
|
|
229
|
+
descriptor.value = function () {
|
|
230
|
+
const isVisible = window.DomUtils.isElementVisible(arguments[0]);
|
|
231
|
+
if (isVisible) {
|
|
232
|
+
return method.apply(this, arguments);
|
|
233
|
+
}
|
|
234
|
+
};
|
|
235
|
+
}
|
|
236
|
+
function ElementIsNot(names) {
|
|
237
|
+
return function (_target, _propertyKey, descriptor) {
|
|
238
|
+
const method = descriptor.value;
|
|
239
|
+
descriptor.value = function () {
|
|
240
|
+
const name = arguments[0].getElementTagName();
|
|
241
|
+
if (name && !names.includes(name)) {
|
|
242
|
+
return method.apply(this, arguments);
|
|
243
|
+
}
|
|
244
|
+
};
|
|
245
|
+
};
|
|
246
|
+
}
|
|
247
|
+
function ElementHasOneOfTheFollowingRoles(roles) {
|
|
248
|
+
return function (_target, _propertyKey, descriptor) {
|
|
249
|
+
const method = descriptor.value;
|
|
250
|
+
descriptor.value = function () {
|
|
251
|
+
const role = window.AccessibilityUtils.getElementRole(arguments[0]);
|
|
252
|
+
if (!!role && roles.includes(role)) {
|
|
253
|
+
return method.apply(this, arguments);
|
|
254
|
+
}
|
|
255
|
+
};
|
|
256
|
+
};
|
|
257
|
+
}
|
|
258
|
+
function ElementIsWidget(_target, _propertyKey, descriptor) {
|
|
259
|
+
const method = descriptor.value;
|
|
260
|
+
descriptor.value = function () {
|
|
261
|
+
const isWidget = window.AccessibilityUtils.isElementWidget(arguments[0]);
|
|
262
|
+
if (isWidget) {
|
|
263
|
+
return method.apply(this, arguments);
|
|
264
|
+
}
|
|
265
|
+
};
|
|
266
|
+
}
|
|
267
|
+
function ElementIsNotWidget(_target, _propertyKey, descriptor) {
|
|
268
|
+
const method = descriptor.value;
|
|
269
|
+
descriptor.value = function () {
|
|
270
|
+
const isWidget = window.AccessibilityUtils.isElementWidget(arguments[0]);
|
|
271
|
+
if (!isWidget) {
|
|
272
|
+
return method.apply(this, arguments);
|
|
273
|
+
}
|
|
274
|
+
};
|
|
275
|
+
}
|
|
276
|
+
function ElementAllowsNameFromContent(_target, _propertyKey, descriptor) {
|
|
277
|
+
const method = descriptor.value;
|
|
278
|
+
descriptor.value = function () {
|
|
279
|
+
const supportsNameFromContent = window.AccessibilityUtils.allowsNameFromContent(arguments[0]);
|
|
280
|
+
if (supportsNameFromContent) {
|
|
281
|
+
return method.apply(this, arguments);
|
|
282
|
+
}
|
|
283
|
+
};
|
|
284
|
+
}
|
|
285
|
+
function ElementHasCSSRules(_target, _propertyKey, descriptor) {
|
|
286
|
+
const method = descriptor.value;
|
|
287
|
+
descriptor.value = function () {
|
|
288
|
+
const element = arguments[0];
|
|
289
|
+
if (element.getCSSRules()) {
|
|
290
|
+
return method.apply(this, arguments);
|
|
291
|
+
}
|
|
292
|
+
};
|
|
293
|
+
}
|
|
294
|
+
function IsLangSubTagValid(attribute) {
|
|
295
|
+
return function (_target, _propertyKey, descriptor) {
|
|
296
|
+
const method = descriptor.value;
|
|
297
|
+
descriptor.value = function () {
|
|
298
|
+
const attr = arguments[0].getElementAttribute(attribute);
|
|
299
|
+
if (attr && isSubTagValid(attr.split('-')[0])) {
|
|
300
|
+
return method.apply(this, arguments);
|
|
301
|
+
}
|
|
302
|
+
};
|
|
303
|
+
};
|
|
304
|
+
}
|
|
305
|
+
function isSubTagValid(subTag) {
|
|
306
|
+
const languages = window.AccessibilityUtils.languages;
|
|
307
|
+
return subTag.toLowerCase() in languages;
|
|
308
|
+
}
|
|
309
|
+
function ElementIsImage(_target, _propertyKey, descriptor) {
|
|
310
|
+
const method = descriptor.value;
|
|
311
|
+
descriptor.value = function () {
|
|
312
|
+
const element = arguments[0];
|
|
313
|
+
const role = window.AccessibilityUtils.getElementRole(element);
|
|
314
|
+
if (element.getElementTagName() === 'img' || role === 'img') {
|
|
315
|
+
return method.apply(this, arguments);
|
|
316
|
+
}
|
|
317
|
+
};
|
|
318
|
+
}
|
|
319
|
+
function ElementIsNonText(_target, _propertyKey, descriptor) {
|
|
320
|
+
const method = descriptor.value;
|
|
321
|
+
descriptor.value = function () {
|
|
322
|
+
const element = arguments[0];
|
|
323
|
+
const isNonText = window.DomUtils.objectElementIsNonText(element);
|
|
324
|
+
if (isNonText) {
|
|
325
|
+
return method.apply(this, arguments);
|
|
326
|
+
}
|
|
327
|
+
};
|
|
328
|
+
}
|
|
329
|
+
const semanticLinkRoles = ['link', 'doc-backlink', 'doc-biblioref', 'doc-glossref', 'doc-noteref'];
|
|
330
|
+
function ElementIsSemanticLink(_target, _propertyKey, descriptor) {
|
|
331
|
+
const method = descriptor.value;
|
|
332
|
+
descriptor.value = function () {
|
|
333
|
+
const element = arguments[0];
|
|
334
|
+
const role = window.AccessibilityUtils.getElementRole(element);
|
|
335
|
+
if (!!role && semanticLinkRoles.includes(role)) {
|
|
336
|
+
return method.apply(this, arguments);
|
|
337
|
+
}
|
|
338
|
+
};
|
|
339
|
+
}
|
|
340
|
+
function ElementIsDataTable(_target, _propertyKey, descriptor) {
|
|
341
|
+
const method = descriptor.value;
|
|
342
|
+
descriptor.value = function () {
|
|
343
|
+
const isDataTable = window.AccessibilityUtils.isDataTable(arguments[0]);
|
|
344
|
+
if (isDataTable) {
|
|
345
|
+
return method.apply(this, arguments);
|
|
346
|
+
}
|
|
347
|
+
};
|
|
348
|
+
}
|
|
349
|
+
function ElementHasAccessibleName(_target, _propertyKey, descriptor) {
|
|
350
|
+
const method = descriptor.value;
|
|
351
|
+
descriptor.value = function () {
|
|
352
|
+
const accessibleName = window.AccessibilityUtils.getAccessibleName(arguments[0]);
|
|
353
|
+
if ((accessibleName === null || accessibleName === void 0 ? void 0 : accessibleName.trim()) !== '') {
|
|
354
|
+
return method.apply(this, arguments);
|
|
355
|
+
}
|
|
356
|
+
};
|
|
357
|
+
}
|
|
358
|
+
function ElementHasChild(child) {
|
|
359
|
+
return function (_target, _propertyKey, descriptor) {
|
|
360
|
+
const method = descriptor.value;
|
|
361
|
+
descriptor.value = function () {
|
|
362
|
+
var arguments_1 = arguments;
|
|
363
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
364
|
+
const children = arguments_1[0].getElements(child);
|
|
365
|
+
if (children.length !== 0) {
|
|
366
|
+
return method.apply(this, arguments_1);
|
|
367
|
+
}
|
|
368
|
+
});
|
|
369
|
+
};
|
|
370
|
+
};
|
|
371
|
+
}
|
|
372
|
+
function ElementHasVisibleChild(child) {
|
|
373
|
+
return function (_target, _propertyKey, descriptor) {
|
|
374
|
+
const method = descriptor.value;
|
|
375
|
+
descriptor.value = function () {
|
|
376
|
+
var arguments_2 = arguments;
|
|
377
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
378
|
+
const children = arguments_2[0].getElements(child);
|
|
379
|
+
if (children.length !== 0) {
|
|
380
|
+
let isVisible = false;
|
|
381
|
+
for (const child of children !== null && children !== void 0 ? children : []) {
|
|
382
|
+
isVisible || (isVisible = window.DomUtils.isElementVisible(child));
|
|
383
|
+
}
|
|
384
|
+
if (isVisible) {
|
|
385
|
+
return method.apply(this, arguments_2);
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
});
|
|
389
|
+
};
|
|
390
|
+
};
|
|
391
|
+
}
|
|
392
|
+
function ElementDoesNotHaveChild(child) {
|
|
393
|
+
return function (_target, _propertyKey, descriptor) {
|
|
394
|
+
const method = descriptor.value;
|
|
395
|
+
descriptor.value = function () {
|
|
396
|
+
var arguments_3 = arguments;
|
|
397
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
398
|
+
const children = arguments_3[0].getElements(child);
|
|
399
|
+
if (children.length === 0) {
|
|
400
|
+
return method.apply(this, arguments_3);
|
|
401
|
+
}
|
|
402
|
+
});
|
|
403
|
+
};
|
|
404
|
+
};
|
|
405
|
+
}
|
|
406
|
+
function ElementHasParent(parent) {
|
|
407
|
+
return function (_target, _propertyKey, descriptor) {
|
|
408
|
+
const method = descriptor.value;
|
|
409
|
+
descriptor.value = function () {
|
|
410
|
+
var arguments_4 = arguments;
|
|
411
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
412
|
+
const element = arguments_4[0].elementHasParent(parent);
|
|
413
|
+
if (element) {
|
|
414
|
+
return method.apply(this, arguments_4);
|
|
415
|
+
}
|
|
416
|
+
});
|
|
417
|
+
};
|
|
418
|
+
};
|
|
419
|
+
}
|
|
420
|
+
function ElementIsNotChildOf(parent) {
|
|
421
|
+
return function (_target, _propertyKey, descriptor) {
|
|
422
|
+
const method = descriptor.value;
|
|
423
|
+
descriptor.value = function () {
|
|
424
|
+
var arguments_5 = arguments;
|
|
425
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
426
|
+
const hasParent = arguments_5[0].elementHasParent(parent);
|
|
427
|
+
if (!hasParent) {
|
|
428
|
+
return method.apply(this, arguments_5);
|
|
429
|
+
}
|
|
430
|
+
});
|
|
431
|
+
};
|
|
432
|
+
};
|
|
433
|
+
}
|
|
434
|
+
function ElementIsNotInert(_target, _propertyKey, descriptor) {
|
|
435
|
+
const method = descriptor.value;
|
|
436
|
+
descriptor.value = function () {
|
|
437
|
+
let notInert = true;
|
|
438
|
+
const hasInert = arguments[0].elementHasAttribute('inert');
|
|
439
|
+
if (hasInert) {
|
|
440
|
+
const inert = arguments[0].getElementAttribute('inert');
|
|
441
|
+
if (inert !== 'false') {
|
|
442
|
+
notInert = false;
|
|
443
|
+
}
|
|
444
|
+
if (!notInert) {
|
|
445
|
+
return;
|
|
446
|
+
}
|
|
447
|
+
}
|
|
448
|
+
let noParentInert = true;
|
|
449
|
+
let parent = arguments[0].getElementParent();
|
|
450
|
+
while (parent) {
|
|
451
|
+
const inert = parent.getElementAttribute('inert');
|
|
452
|
+
if (inert && inert === 'true') {
|
|
453
|
+
noParentInert = false;
|
|
454
|
+
}
|
|
455
|
+
parent = parent.getElementParent();
|
|
456
|
+
}
|
|
457
|
+
if (!noParentInert) {
|
|
458
|
+
return;
|
|
459
|
+
}
|
|
460
|
+
if (window.qwPage.pageHasOpenDialog()) {
|
|
461
|
+
return;
|
|
462
|
+
}
|
|
463
|
+
return method.apply(this, arguments);
|
|
464
|
+
};
|
|
465
|
+
}
|
|
466
|
+
function ElementIsVisibleOrInAccessibilityTree(_target, _propertyKey, descriptor) {
|
|
467
|
+
const method = descriptor.value;
|
|
468
|
+
descriptor.value = function () {
|
|
469
|
+
const page = window.qwPage;
|
|
470
|
+
const elements = page.getElements('*').filter((element) => {
|
|
471
|
+
return (element.hasTextNode() &&
|
|
472
|
+
(window.DomUtils.isElementVisible(element) || window.AccessibilityUtils.isElementInAT(element)));
|
|
473
|
+
});
|
|
474
|
+
if (elements.length > 0) {
|
|
475
|
+
return method.apply(this, arguments);
|
|
476
|
+
}
|
|
477
|
+
};
|
|
478
|
+
}
|
|
479
|
+
function IsHTMLDocument(_target, _propertyKey, descriptor) {
|
|
480
|
+
const method = descriptor.value;
|
|
481
|
+
descriptor.value = function () {
|
|
482
|
+
let IsNonHTMLDocument = false;
|
|
483
|
+
const htmlElement = window.qwPage.getElement('html');
|
|
484
|
+
if (htmlElement)
|
|
485
|
+
IsNonHTMLDocument = htmlElement.getElementAttribute('nonHTMLPage') === 'true';
|
|
486
|
+
if (!IsNonHTMLDocument) {
|
|
487
|
+
return method.apply(this, arguments);
|
|
488
|
+
}
|
|
489
|
+
};
|
|
490
|
+
}
|
package/dist/cache.d.ts
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
declare function Cache(methodName: string): (_target: unknown, _propertyKey: string, descriptor: PropertyDescriptor) => void;
|
|
2
|
+
declare function FullMethodCache(methodName: string): (_target: unknown, _propertyKey: string, descriptor: PropertyDescriptor) => void;
|
|
3
|
+
export { Cache, FullMethodCache };
|
|
4
|
+
//# sourceMappingURL=cache.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cache.d.ts","sourceRoot":"","sources":["../src/cache.ts"],"names":[],"mappings":"AAEA,iBAAS,KAAK,CAAC,UAAU,EAAE,MAAM,aACL,OAAO,gBAAgB,MAAM,cAAc,kBAAkB,KAAG,IAAI,CAgB/F;AAED,iBAAS,eAAe,CAAC,UAAU,EAAE,MAAM,aACf,OAAO,gBAAgB,MAAM,cAAc,kBAAkB,KAAG,IAAI,CAmB/F;AAED,OAAO,EAAE,KAAK,EAAE,eAAe,EAAE,CAAC"}
|
package/dist/cache.js
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Cache = Cache;
|
|
4
|
+
exports.FullMethodCache = FullMethodCache;
|
|
5
|
+
function Cache(methodName) {
|
|
6
|
+
return function (_target, _propertyKey, descriptor) {
|
|
7
|
+
const method = descriptor.value;
|
|
8
|
+
descriptor.value = function () {
|
|
9
|
+
const page = window.qwPage;
|
|
10
|
+
const element = arguments[0];
|
|
11
|
+
const selector = element.getElementSelector();
|
|
12
|
+
let result;
|
|
13
|
+
if (page.isValueCached(selector, methodName)) {
|
|
14
|
+
result = page.getCachedValue(selector, methodName);
|
|
15
|
+
}
|
|
16
|
+
else {
|
|
17
|
+
result = method.apply(this, arguments);
|
|
18
|
+
page.cacheValue(selector, methodName, result);
|
|
19
|
+
}
|
|
20
|
+
return result;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
function FullMethodCache(methodName) {
|
|
25
|
+
return function (_target, _propertyKey, descriptor) {
|
|
26
|
+
const method = descriptor.value;
|
|
27
|
+
descriptor.value = function () {
|
|
28
|
+
const page = window.qwPage;
|
|
29
|
+
const element = arguments[0];
|
|
30
|
+
let selector = element.getElementSelector();
|
|
31
|
+
for (let i = 2; i < arguments.length; i++) {
|
|
32
|
+
selector += arguments[i];
|
|
33
|
+
}
|
|
34
|
+
let result;
|
|
35
|
+
if (page.isValueCached(selector, methodName)) {
|
|
36
|
+
result = page.getCachedValue(selector, methodName);
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
39
|
+
result = method.apply(this, arguments);
|
|
40
|
+
page.cacheValue(selector, methodName, result);
|
|
41
|
+
}
|
|
42
|
+
return result;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
[
|
|
2
|
+
"wav",
|
|
3
|
+
"bwf",
|
|
4
|
+
"raw",
|
|
5
|
+
"aiff",
|
|
6
|
+
"flac",
|
|
7
|
+
"m4a",
|
|
8
|
+
"pac",
|
|
9
|
+
"tta",
|
|
10
|
+
"wv",
|
|
11
|
+
"ast",
|
|
12
|
+
"aac",
|
|
13
|
+
"mp2",
|
|
14
|
+
"mp3",
|
|
15
|
+
"mp4",
|
|
16
|
+
"amr",
|
|
17
|
+
"s3m",
|
|
18
|
+
"3gp",
|
|
19
|
+
"act",
|
|
20
|
+
"au",
|
|
21
|
+
"dct",
|
|
22
|
+
"dss",
|
|
23
|
+
"gsm",
|
|
24
|
+
"m4p",
|
|
25
|
+
"mmf",
|
|
26
|
+
"mpc",
|
|
27
|
+
"ogg",
|
|
28
|
+
"oga",
|
|
29
|
+
"opus",
|
|
30
|
+
"ra",
|
|
31
|
+
"sln",
|
|
32
|
+
"vox"
|
|
33
|
+
]
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
declare const alwaysVisible: string[];
|
|
2
|
+
declare const needsOpen: string[];
|
|
3
|
+
declare const needsControls: string[];
|
|
4
|
+
declare const alwaysNotVisible: string[];
|
|
5
|
+
export { alwaysVisible, needsOpen, needsControls, alwaysNotVisible };
|
|
6
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/domUtils/constants.ts"],"names":[],"mappings":"AAIA,QAAA,MAAM,aAAa,UAclB,CAAC;AACF,QAAA,MAAM,SAAS,UAAa,CAAC;AAC7B,QAAA,MAAM,aAAa,UAAqB,CAAC;AACzC,QAAA,MAAM,gBAAgB,UAwBrB,CAAC;AACF,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,aAAa,EAAE,gBAAgB,EAAE,CAAC"}
|