abledom 0.1.1 → 0.3.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/dist/esm/index.js +253 -90
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.cts +13 -2
- package/dist/index.d.ts +13 -2
- package/dist/index.js +253 -90
- package/dist/index.js.map +1 -1
- package/dist/ts3.9/index.d.ts +13 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -59,8 +59,17 @@ declare abstract class ValidationRule<N extends ValidationNotification = Validat
|
|
|
59
59
|
* Licensed under the MIT License.
|
|
60
60
|
*/
|
|
61
61
|
|
|
62
|
+
interface AbleDOMProps {
|
|
63
|
+
log?: typeof console.error;
|
|
64
|
+
bugReport?: {
|
|
65
|
+
isVisible: (notification: ValidationNotification) => boolean;
|
|
66
|
+
onClick: (notification: ValidationNotification) => void;
|
|
67
|
+
getTitle?: (notification: ValidationNotification) => string;
|
|
68
|
+
};
|
|
69
|
+
}
|
|
62
70
|
declare class AbleDOM {
|
|
63
71
|
private _win;
|
|
72
|
+
private _props;
|
|
64
73
|
private _observer;
|
|
65
74
|
private _clearValidationTimeout;
|
|
66
75
|
private _elementsWithNotifications;
|
|
@@ -71,7 +80,8 @@ declare class AbleDOM {
|
|
|
71
80
|
private _rules;
|
|
72
81
|
private _startFunc;
|
|
73
82
|
private _isStarted;
|
|
74
|
-
|
|
83
|
+
private _notificationsUI;
|
|
84
|
+
constructor(win: Window, props?: AbleDOMProps);
|
|
75
85
|
private _onElementId;
|
|
76
86
|
private _addNotification;
|
|
77
87
|
private _removeNotification;
|
|
@@ -81,6 +91,7 @@ declare class AbleDOM {
|
|
|
81
91
|
private _onFocusIn;
|
|
82
92
|
private _onFocusOut;
|
|
83
93
|
private _notifyAsync;
|
|
94
|
+
log: typeof console.error;
|
|
84
95
|
addRule(rule: ValidationRule): void;
|
|
85
96
|
removeRule(rule: ValidationRule): void;
|
|
86
97
|
start(): void;
|
|
@@ -200,4 +211,4 @@ declare function matchesSelector(element: HTMLElement, selector: string): boolea
|
|
|
200
211
|
declare function isDisplayNone(element: HTMLElement): boolean;
|
|
201
212
|
declare function isElementVisible(element: HTMLElement): boolean;
|
|
202
213
|
|
|
203
|
-
export { AbleDOM, AtomicRule, BadFocusRule, type BlurNotification, CustomNotifyRule, ExistingIdRule, FindElementRule, FocusLostRule, FocusableElementLabelRule, type ValidationNotification, type ValidationResult, ValidationRule, ValidationRuleType, hasAccessibilityAttribute, isAccessibilityAffectingElement, isDisplayNone, isElementVisible, matchesSelector };
|
|
214
|
+
export { AbleDOM, type AbleDOMProps, AtomicRule, BadFocusRule, type BlurNotification, CustomNotifyRule, ExistingIdRule, FindElementRule, FocusLostRule, FocusableElementLabelRule, type ValidationNotification, type ValidationResult, ValidationRule, ValidationRuleType, hasAccessibilityAttribute, isAccessibilityAffectingElement, isDisplayNone, isElementVisible, matchesSelector };
|