added all files to project

This commit is contained in:
2022-03-10 10:36:59 +01:00
parent 09dd957b33
commit 46a936d7de
25351 changed files with 3883356 additions and 0 deletions
@@ -0,0 +1,2 @@
export default function cleanUp(elem: Element | Element[], dataProperty: string): void;
//# sourceMappingURL=cleanUpSerializationSelector.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"cleanUpSerializationSelector.d.ts","sourceRoot":"","sources":["../../src/scripts/cleanUpSerializationSelector.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,OAAO,UAAU,OAAO,CAAE,IAAI,EAAE,OAAO,GAAG,OAAO,EAAE,EAAE,YAAY,EAAE,MAAM,QAK/E"}
+9
View File
@@ -0,0 +1,9 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
function cleanUp(elem, dataProperty) {
const elems = Array.isArray(elem) ? elem : [elem];
for (const el of elems) {
el.removeAttribute(dataProperty);
}
}
exports.default = cleanUp;
+2
View File
@@ -0,0 +1,2 @@
export default function createWindow(url: string, features: string): Window | null;
//# sourceMappingURL=createWindow.d.ts.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"createWindow.d.ts","sourceRoot":"","sources":["../../src/scripts/createWindow.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,UAAU,YAAY,CAAE,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,iBAElE"}
+6
View File
@@ -0,0 +1,6 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
function createWindow(url, features) {
return window.open(url, '_blank', features);
}
exports.default = createWindow;
+2
View File
@@ -0,0 +1,2 @@
export default function elementClear(html: HTMLElement, elem: HTMLInputElement): void;
//# sourceMappingURL=elementClear.d.ts.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"elementClear.d.ts","sourceRoot":"","sources":["../../src/scripts/elementClear.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,OAAO,UAAU,YAAY,CAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,gBAAgB,QAE9E"}
+6
View File
@@ -0,0 +1,6 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
function elementClear(html, elem) {
elem.value = '';
}
exports.default = elementClear;
+3
View File
@@ -0,0 +1,3 @@
declare const _default: (_: Element, script: string, scriptTimeout: number, dataProperty: string, dataFlag: string, ...commandArgs: any[]) => Promise<any>;
export default _default;
//# sourceMappingURL=executeAsyncScript.d.ts.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"executeAsyncScript.d.ts","sourceRoot":"","sources":["../../src/scripts/executeAsyncScript.ts"],"names":[],"mappings":"4BAgBO,OAAO,UACF,MAAM,iBACC,MAAM,gBACP,MAAM,YACV,MAAM,kBACA,GAAG,EAAE,KACtB,QAAQ,GAAG,CAAC;AAPf,wBAoCC"}
+24
View File
@@ -0,0 +1,24 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = (_, script, scriptTimeout, dataProperty, dataFlag, ...commandArgs) => {
return new Promise((_resolve, _reject) => {
setTimeout(() => _reject('script timeout'), scriptTimeout);
window.arguments = [...commandArgs, (result) => {
let tmpResult = result instanceof NodeList ? Array.from(result) : result;
const isResultArray = Array.isArray(tmpResult);
tmpResult = isResultArray ? tmpResult : [tmpResult];
if (tmpResult.find((r) => r instanceof HTMLElement)) {
tmpResult = tmpResult.map((r, i) => {
if (r instanceof HTMLElement) {
const dataPropertyValue = `${dataFlag}_${i}`;
r.setAttribute(dataProperty, dataPropertyValue);
return dataPropertyValue;
}
return result;
});
}
return _resolve(isResultArray ? tmpResult : tmpResult[0]);
}];
return eval(script);
});
};
+3
View File
@@ -0,0 +1,3 @@
declare const _default: (_: HTMLElement, script: string, dataProperty: string, dataFlag: string, ...args: any[]) => any;
export default _default;
//# sourceMappingURL=executeScript.d.ts.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"executeScript.d.ts","sourceRoot":"","sources":["../../src/scripts/executeScript.ts"],"names":[],"mappings":"4BAemB,WAAW,UAAU,MAAM,gBAAgB,MAAM,YAAY,MAAM,WAAW,GAAG,EAAE;AAAtG,wBAoBC"}
+20
View File
@@ -0,0 +1,20 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = (_, script, dataProperty, dataFlag, ...args) => {
window.arguments = args;
const result = eval(script);
let tmpResult = result instanceof NodeList ? Array.from(result) : result;
const isResultArray = Array.isArray(tmpResult);
tmpResult = isResultArray ? tmpResult : [tmpResult];
if (tmpResult.find((r) => r instanceof HTMLElement)) {
tmpResult = tmpResult.map((r, i) => {
if (r instanceof HTMLElement) {
const dataPropertyValue = `${dataFlag}_${i}`;
r.setAttribute(dataProperty, dataPropertyValue);
return dataPropertyValue;
}
return result;
});
}
return isResultArray ? tmpResult : tmpResult[0];
};
+2
View File
@@ -0,0 +1,2 @@
export default function getActiveElement(_: Element, dataProperty: string): boolean;
//# sourceMappingURL=getActiveElement.d.ts.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"getActiveElement.d.ts","sourceRoot":"","sources":["../../src/scripts/getActiveElement.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAE,CAAC,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,WAOzE"}
+10
View File
@@ -0,0 +1,10 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
function getActiveElement(_, dataProperty) {
if (!document.activeElement) {
return false;
}
document.activeElement.setAttribute(dataProperty, 'true');
return true;
}
exports.default = getActiveElement;
+2
View File
@@ -0,0 +1,2 @@
export default function getElementAttribute(_: HTMLElement, elem: HTMLElement, attr: string): string | null;
//# sourceMappingURL=getElementAttribute.d.ts.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"getElementAttribute.d.ts","sourceRoot":"","sources":["../../src/scripts/getElementAttribute.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAE,CAAC,EAAE,WAAW,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,iBAE3F"}
+6
View File
@@ -0,0 +1,6 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
function getElementAttribute(_, elem, attr) {
return elem.getAttribute(attr);
}
exports.default = getElementAttribute;
+2
View File
@@ -0,0 +1,2 @@
export default function getElementCSSValue(_: HTMLElement, elem: HTMLElement, propertyName: string): string;
//# sourceMappingURL=getElementCSSValue.d.ts.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"getElementCSSValue.d.ts","sourceRoot":"","sources":["../../src/scripts/getElementCSSValue.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAE,CAAC,EAAE,WAAW,EAAE,IAAI,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,GAAG,MAAM,CAK3G"}
+6
View File
@@ -0,0 +1,6 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
function getElementCSSValue(_, elem, propertyName) {
return window.getComputedStyle(elem)[propertyName];
}
exports.default = getElementCSSValue;
+7
View File
@@ -0,0 +1,7 @@
export default function getElementRect(html: HTMLElement, elem: HTMLElement): {
x: number;
y: number;
width: number;
height: number;
};
//# sourceMappingURL=getElementRect.d.ts.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"getElementRect.d.ts","sourceRoot":"","sources":["../../src/scripts/getElementRect.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,OAAO,UAAU,cAAc,CAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,WAAW;;;;;EAG3E"}
+7
View File
@@ -0,0 +1,7 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
function getElementRect(html, elem) {
const { x, y, width, height } = elem.getBoundingClientRect();
return { x, y, width, height };
}
exports.default = getElementRect;
+2
View File
@@ -0,0 +1,2 @@
export default function getElementTagName(html: HTMLElement, elem: HTMLElement): string;
//# sourceMappingURL=getElementTagName.d.ts.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"getElementTagName.d.ts","sourceRoot":"","sources":["../../src/scripts/getElementTagName.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,WAAW,UAE9E"}
+6
View File
@@ -0,0 +1,6 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
function getElementTagName(html, elem) {
return elem.tagName;
}
exports.default = getElementTagName;
+2
View File
@@ -0,0 +1,2 @@
export default function getElementText(html: HTMLElement, elem: HTMLElement): string;
//# sourceMappingURL=getElementText.d.ts.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"getElementText.d.ts","sourceRoot":"","sources":["../../src/scripts/getElementText.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,UAAU,cAAc,CAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,WAAW,UAE3E"}
+6
View File
@@ -0,0 +1,6 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
function getElementText(html, elem) {
return elem.innerText;
}
exports.default = getElementText;
+2
View File
@@ -0,0 +1,2 @@
export default function getUrl(): string;
//# sourceMappingURL=getUrl.d.ts.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"getUrl.d.ts","sourceRoot":"","sources":["../../src/scripts/getUrl.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,UAAU,MAAM,WAE7B"}
+6
View File
@@ -0,0 +1,6 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
function getUrl() {
return document.location.href;
}
exports.default = getUrl;
+2
View File
@@ -0,0 +1,2 @@
export default function selectOption(html: HTMLElement, elem: HTMLOptionElement): void;
//# sourceMappingURL=selectOption.d.ts.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"selectOption.d.ts","sourceRoot":"","sources":["../../src/scripts/selectOption.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,UAAU,YAAY,CAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,iBAAiB,QAU/E"}
+12
View File
@@ -0,0 +1,12 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
function selectOption(html, elem) {
elem.selected = true;
let parent = elem.parentElement;
while (parent && parent.tagName.toLowerCase() !== 'select') {
parent = parent.parentElement;
}
parent.dispatchEvent(new Event('input', { bubbles: true }));
parent.dispatchEvent(new Event('change', { bubbles: true }));
}
exports.default = selectOption;