ally-widget 1.0.1 → 1.0.3
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/ally-widget.cjs.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Ally Widget v1.0.
|
|
2
|
+
* Ally Widget v1.0.3
|
|
3
3
|
* Released under the MIT License
|
|
4
4
|
*/
|
|
5
5
|
'use strict';
|
|
@@ -1398,7 +1398,7 @@ const featureMethods = {
|
|
|
1398
1398
|
severity = 'moderate';
|
|
1399
1399
|
}
|
|
1400
1400
|
|
|
1401
|
-
if (displayCount <= 0) {
|
|
1401
|
+
if (displayCount <= 0 || this.options?.showViolationBubble === false) {
|
|
1402
1402
|
bubble.textContent = '';
|
|
1403
1403
|
bubble.hidden = true;
|
|
1404
1404
|
bubble.removeAttribute('data-severity');
|
|
@@ -4005,7 +4005,7 @@ const uiMethods = {
|
|
|
4005
4005
|
};
|
|
4006
4006
|
|
|
4007
4007
|
/*!
|
|
4008
|
-
* Ally Widget v1.0.
|
|
4008
|
+
* Ally Widget v1.0.2
|
|
4009
4009
|
* Released under the MIT License
|
|
4010
4010
|
*
|
|
4011
4011
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND.
|
|
@@ -4019,6 +4019,7 @@ const uiMethods = {
|
|
|
4019
4019
|
* offset: [20, 20] // [horizontal, vertical] px from edge
|
|
4020
4020
|
* size: '52px' // toggle button size (px / em / rem / %)
|
|
4021
4021
|
* keyboardShortcut: true // Alt+A to toggle (set false to disable)
|
|
4022
|
+
* showViolationBubble: true // red badge on toggle button (set false to hide)
|
|
4022
4023
|
*
|
|
4023
4024
|
* // ── Language ─────────────────────────────────────────────────────────────
|
|
4024
4025
|
* lang: 'en' | 'ne'
|
|
@@ -4438,26 +4439,4 @@ if (typeof window !== 'undefined') {
|
|
|
4438
4439
|
window.AllyWidget = AllyWidget;
|
|
4439
4440
|
}
|
|
4440
4441
|
|
|
4441
|
-
// Auto-init for CDN / script-tag usage.
|
|
4442
|
-
// Skipped when:
|
|
4443
|
-
// • running server-side (no document)
|
|
4444
|
-
// • window.AllyWidgetOptions.autoInit === false (opt-out for manual control)
|
|
4445
|
-
if (typeof document !== 'undefined') {
|
|
4446
|
-
const globalAutoInitOptions = (
|
|
4447
|
-
typeof window !== 'undefined' &&
|
|
4448
|
-
window.AllyWidgetOptions &&
|
|
4449
|
-
typeof window.AllyWidgetOptions === 'object'
|
|
4450
|
-
) ? window.AllyWidgetOptions : {};
|
|
4451
|
-
|
|
4452
|
-
if (globalAutoInitOptions.autoInit !== false) {
|
|
4453
|
-
/** @type {AllyWidgetInstance} */
|
|
4454
|
-
const widgetInstance = new AllyWidget(globalAutoInitOptions);
|
|
4455
|
-
if (document.readyState === 'complete' || document.readyState === 'interactive') {
|
|
4456
|
-
widgetInstance.startAccessibleWebWidget();
|
|
4457
|
-
} else {
|
|
4458
|
-
document.addEventListener('DOMContentLoaded', () => widgetInstance.startAccessibleWebWidget(), { once: true });
|
|
4459
|
-
}
|
|
4460
|
-
}
|
|
4461
|
-
}
|
|
4462
|
-
|
|
4463
4442
|
module.exports = AllyWidget;
|
package/dist/ally-widget.esm.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Ally Widget v1.0.
|
|
2
|
+
* Ally Widget v1.0.3
|
|
3
3
|
* Released under the MIT License
|
|
4
4
|
*/
|
|
5
5
|
const WIDGET_THEME = {
|
|
@@ -1396,7 +1396,7 @@ const featureMethods = {
|
|
|
1396
1396
|
severity = 'moderate';
|
|
1397
1397
|
}
|
|
1398
1398
|
|
|
1399
|
-
if (displayCount <= 0) {
|
|
1399
|
+
if (displayCount <= 0 || this.options?.showViolationBubble === false) {
|
|
1400
1400
|
bubble.textContent = '';
|
|
1401
1401
|
bubble.hidden = true;
|
|
1402
1402
|
bubble.removeAttribute('data-severity');
|
|
@@ -4003,7 +4003,7 @@ const uiMethods = {
|
|
|
4003
4003
|
};
|
|
4004
4004
|
|
|
4005
4005
|
/*!
|
|
4006
|
-
* Ally Widget v1.0.
|
|
4006
|
+
* Ally Widget v1.0.2
|
|
4007
4007
|
* Released under the MIT License
|
|
4008
4008
|
*
|
|
4009
4009
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND.
|
|
@@ -4017,6 +4017,7 @@ const uiMethods = {
|
|
|
4017
4017
|
* offset: [20, 20] // [horizontal, vertical] px from edge
|
|
4018
4018
|
* size: '52px' // toggle button size (px / em / rem / %)
|
|
4019
4019
|
* keyboardShortcut: true // Alt+A to toggle (set false to disable)
|
|
4020
|
+
* showViolationBubble: true // red badge on toggle button (set false to hide)
|
|
4020
4021
|
*
|
|
4021
4022
|
* // ── Language ─────────────────────────────────────────────────────────────
|
|
4022
4023
|
* lang: 'en' | 'ne'
|
|
@@ -4436,26 +4437,4 @@ if (typeof window !== 'undefined') {
|
|
|
4436
4437
|
window.AllyWidget = AllyWidget;
|
|
4437
4438
|
}
|
|
4438
4439
|
|
|
4439
|
-
// Auto-init for CDN / script-tag usage.
|
|
4440
|
-
// Skipped when:
|
|
4441
|
-
// • running server-side (no document)
|
|
4442
|
-
// • window.AllyWidgetOptions.autoInit === false (opt-out for manual control)
|
|
4443
|
-
if (typeof document !== 'undefined') {
|
|
4444
|
-
const globalAutoInitOptions = (
|
|
4445
|
-
typeof window !== 'undefined' &&
|
|
4446
|
-
window.AllyWidgetOptions &&
|
|
4447
|
-
typeof window.AllyWidgetOptions === 'object'
|
|
4448
|
-
) ? window.AllyWidgetOptions : {};
|
|
4449
|
-
|
|
4450
|
-
if (globalAutoInitOptions.autoInit !== false) {
|
|
4451
|
-
/** @type {AllyWidgetInstance} */
|
|
4452
|
-
const widgetInstance = new AllyWidget(globalAutoInitOptions);
|
|
4453
|
-
if (document.readyState === 'complete' || document.readyState === 'interactive') {
|
|
4454
|
-
widgetInstance.startAccessibleWebWidget();
|
|
4455
|
-
} else {
|
|
4456
|
-
document.addEventListener('DOMContentLoaded', () => widgetInstance.startAccessibleWebWidget(), { once: true });
|
|
4457
|
-
}
|
|
4458
|
-
}
|
|
4459
|
-
}
|
|
4460
|
-
|
|
4461
4440
|
export { AllyWidget as default };
|
package/dist/ally-widget.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Ally Widget v1.0.
|
|
2
|
+
* Ally Widget v1.0.3
|
|
3
3
|
* Released under the MIT License
|
|
4
4
|
*/
|
|
5
5
|
var AllyWidget = (function () {
|
|
@@ -1399,7 +1399,7 @@ var AllyWidget = (function () {
|
|
|
1399
1399
|
severity = 'moderate';
|
|
1400
1400
|
}
|
|
1401
1401
|
|
|
1402
|
-
if (displayCount <= 0) {
|
|
1402
|
+
if (displayCount <= 0 || this.options?.showViolationBubble === false) {
|
|
1403
1403
|
bubble.textContent = '';
|
|
1404
1404
|
bubble.hidden = true;
|
|
1405
1405
|
bubble.removeAttribute('data-severity');
|
|
@@ -4006,7 +4006,7 @@ var AllyWidget = (function () {
|
|
|
4006
4006
|
};
|
|
4007
4007
|
|
|
4008
4008
|
/*!
|
|
4009
|
-
* Ally Widget v1.0.
|
|
4009
|
+
* Ally Widget v1.0.2
|
|
4010
4010
|
* Released under the MIT License
|
|
4011
4011
|
*
|
|
4012
4012
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND.
|
|
@@ -4020,6 +4020,7 @@ var AllyWidget = (function () {
|
|
|
4020
4020
|
* offset: [20, 20] // [horizontal, vertical] px from edge
|
|
4021
4021
|
* size: '52px' // toggle button size (px / em / rem / %)
|
|
4022
4022
|
* keyboardShortcut: true // Alt+A to toggle (set false to disable)
|
|
4023
|
+
* showViolationBubble: true // red badge on toggle button (set false to hide)
|
|
4023
4024
|
*
|
|
4024
4025
|
* // ── Language ─────────────────────────────────────────────────────────────
|
|
4025
4026
|
* lang: 'en' | 'ne'
|
|
@@ -4439,10 +4440,9 @@ var AllyWidget = (function () {
|
|
|
4439
4440
|
window.AllyWidget = AllyWidget;
|
|
4440
4441
|
}
|
|
4441
4442
|
|
|
4442
|
-
// Auto-init
|
|
4443
|
-
//
|
|
4444
|
-
//
|
|
4445
|
-
// • window.AllyWidgetOptions.autoInit === false (opt-out for manual control)
|
|
4443
|
+
// Auto-init only in IIFE/CDN builds (true is replaced at build time).
|
|
4444
|
+
// ESM and CJS builds set this to false so importing the module never triggers
|
|
4445
|
+
// a default-themed widget that would conflict with AllyWidget.init() calls.
|
|
4446
4446
|
if (typeof document !== 'undefined') {
|
|
4447
4447
|
const globalAutoInitOptions = (
|
|
4448
4448
|
typeof window !== 'undefined' &&
|