bootstrap5-toggle 5.3.1 → 5.3.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/README.md CHANGED
@@ -73,18 +73,18 @@ See EOL for each version in [Security Policy Page](https://github.com/palcarazm/
73
73
 
74
74
  ```html
75
75
  <link
76
- href="https://cdn.jsdelivr.net/npm/bootstrap5-toggle@5.3.1/css/bootstrap5-toggle.min.css"
76
+ href="https://cdn.jsdelivr.net/npm/bootstrap5-toggle@5.3.3/css/bootstrap5-toggle.min.css"
77
77
  rel="stylesheet" />
78
- <script src="https://cdn.jsdelivr.net/npm/bootstrap5-toggle@5.3.1/js/bootstrap5-toggle.ecmas.min.js"></script>
78
+ <script src="https://cdn.jsdelivr.net/npm/bootstrap5-toggle@5.3.3/js/bootstrap5-toggle.ecmas.min.js"></script>
79
79
  ```
80
80
 
81
81
  ### jQuery Interface
82
82
 
83
83
  ```html
84
84
  <link
85
- href="https://cdn.jsdelivr.net/npm/bootstrap5-toggle@5.3.1/css/bootstrap5-toggle.min.css"
85
+ href="https://cdn.jsdelivr.net/npm/bootstrap5-toggle@5.3.3/css/bootstrap5-toggle.min.css"
86
86
  rel="stylesheet" />
87
- <script src="https://cdn.jsdelivr.net/npm/bootstrap5-toggle@5.3.1/js/bootstrap5-toggle.jquery.min.js"></script>
87
+ <script src="https://cdn.jsdelivr.net/npm/bootstrap5-toggle@5.3.3/js/bootstrap5-toggle.jquery.min.js"></script>
88
88
  ```
89
89
 
90
90
  ## Download
@@ -96,13 +96,13 @@ See EOL for each version in [Security Policy Page](https://github.com/palcarazm/
96
96
  [![NPM Badge](https://img.shields.io/npm/dm/bootstrap5-toggle?logo=npm)](https://www.npmjs.com/package/bootstrap5-toggle)
97
97
 
98
98
  ```ksh
99
- npm install bootstrap5-toggle@5.3.1
99
+ npm install bootstrap5-toggle@5.3.3
100
100
  ```
101
101
 
102
102
  ## Yarn
103
103
 
104
104
  ```ksh
105
- yarn add bootstrap5-toggle@5.3.1
105
+ yarn add bootstrap5-toggle@5.3.3
106
106
  ```
107
107
 
108
108
  # Usage
@@ -1,5 +1,5 @@
1
1
  /* Copyright Notice
2
- * bootstrap5-toggle v5.3.1
2
+ * bootstrap5-toggle v5.3.3
3
3
  * https://palcarazm.github.io/bootstrap5-toggle/
4
4
  * @author 2011-2014 Min Hur (https://github.com/minhur)
5
5
  * @author 2018-2019 Brent Ely (https://github.com/gitbrent)
@@ -1,5 +1,5 @@
1
1
  /* Copyright Notice
2
- * bootstrap5-toggle v5.3.1
2
+ * bootstrap5-toggle v5.3.3
3
3
  * https://palcarazm.github.io/bootstrap5-toggle/
4
4
  * @author 2011-2014 Min Hur (https://github.com/minhur)
5
5
  * @author 2018-2019 Brent Ely (https://github.com/gitbrent)
@@ -1,5 +1,5 @@
1
1
  /* Copyright Notice
2
- * bootstrap5-toggle v5.3.1
2
+ * bootstrap5-toggle v5.3.3
3
3
  * https://palcarazm.github.io/bootstrap5-toggle/
4
4
  * @author 2011-2014 Min Hur (https://github.com/minhur)
5
5
  * @author 2018-2019 Brent Ely (https://github.com/gitbrent)
@@ -1,5 +1,5 @@
1
1
  /* Copyright Notice
2
- * bootstrap5-toggle v5.3.1
2
+ * bootstrap5-toggle v5.3.3
3
3
  * https://palcarazm.github.io/bootstrap5-toggle/
4
4
  * @author 2011-2014 Min Hur (https://github.com/minhur)
5
5
  * @author 2018-2019 Brent Ely (https://github.com/gitbrent)
@@ -357,11 +357,11 @@ declare enum ToggleMethods {
357
357
  RERENDER = "rerender"
358
358
  }
359
359
 
360
- interface BootstrapToggleElement {
360
+ interface BootstrapToggleElement extends HTMLInputElement {
361
361
  bootstrapToggle(options?: ToggleMethods | Record<string, unknown>, silent?: boolean): void;
362
362
  bsToggle?: Toggle;
363
363
  }
364
- interface BootstrapToggleElementEventMap {
364
+ interface BootstrapToggleElementEventMap extends HTMLElementEventMap {
365
365
  "toggle:on": CustomEvent<ToggleEventDetail>;
366
366
  "toggle:off": CustomEvent<ToggleEventDetail>;
367
367
  "toggle:mixed": CustomEvent<ToggleEventDetail>;
@@ -370,5 +370,5 @@ interface BootstrapToggleElementEventMap {
370
370
  "toggle:readonly": CustomEvent<ToggleEventDetail>;
371
371
  }
372
372
 
373
- export { Toggle as BootstrapToggle, ToggleEvents as Events, ToggleMethods as Methods, ToggleStateStatus, ToggleStateValue };
374
- export type { BootstrapToggleElement, BootstrapToggleElementEventMap, ToggleEventDetail, ToggleOptions, ToggleSize, ToggleState, ToggleStyle, UserOptions };
373
+ export { Toggle as BootstrapToggle, ToggleEvents as Events, ToggleMethods as Methods, ToggleStateStatus as StateStatus, ToggleStateValue as StateValue };
374
+ export type { BootstrapToggleElement, BootstrapToggleElementEventMap, ToggleEventDetail as EventDetail, ToggleOptions as Options, ToggleSize as Size, ToggleState as State, ToggleStyle as Style, UserOptions };
@@ -1,5 +1,5 @@
1
1
  /* Copyright Notice
2
- * bootstrap5-toggle v5.3.1
2
+ * bootstrap5-toggle v5.3.3
3
3
  * https://palcarazm.github.io/bootstrap5-toggle/
4
4
  * @author 2011-2014 Min Hur (https://github.com/minhur)
5
5
  * @author 2018-2019 Brent Ely (https://github.com/gitbrent)
@@ -1,5 +1,5 @@
1
1
  /* Copyright Notice
2
- * bootstrap5-toggle v5.3.1
2
+ * bootstrap5-toggle v5.3.3
3
3
  * https://palcarazm.github.io/bootstrap5-toggle/
4
4
  * @author 2011-2014 Min Hur (https://github.com/minhur)
5
5
  * @author 2018-2019 Brent Ely (https://github.com/gitbrent)
@@ -1103,7 +1103,7 @@
1103
1103
  ToggleEvents["DISABLED"] = "toggle:disabled";
1104
1104
  ToggleEvents["READONLY"] = "toggle:readonly";
1105
1105
  })(ToggleEvents || (ToggleEvents = {}));
1106
- var ToggleEvents$1 = ToggleEvents;
1106
+ var Events = ToggleEvents;
1107
1107
 
1108
1108
  var Toggle = /** @class */ (function () {
1109
1109
  /**
@@ -1535,17 +1535,17 @@
1535
1535
  Toggle.prototype.getEventForAction = function (action, state) {
1536
1536
  switch (action) {
1537
1537
  case ToggleActionType.ON:
1538
- return ToggleEvents$1.ON;
1538
+ return Events.ON;
1539
1539
  case ToggleActionType.OFF:
1540
- return ToggleEvents$1.OFF;
1540
+ return Events.OFF;
1541
1541
  case ToggleActionType.INDETERMINATE:
1542
- return ToggleEvents$1.MIXED;
1542
+ return Events.MIXED;
1543
1543
  case ToggleActionType.ENABLE:
1544
- return ToggleEvents$1.ENABLED;
1544
+ return Events.ENABLED;
1545
1545
  case ToggleActionType.DISABLE:
1546
- return ToggleEvents$1.DISABLED;
1546
+ return Events.DISABLED;
1547
1547
  case ToggleActionType.READONLY:
1548
- return ToggleEvents$1.READONLY;
1548
+ return Events.READONLY;
1549
1549
  case ToggleActionType.DETERMINATE:
1550
1550
  case ToggleActionType.TOGGLE:
1551
1551
  case ToggleActionType.NEXT:
@@ -1561,11 +1561,11 @@
1561
1561
  Toggle.prototype.getValueEvent = function (state) {
1562
1562
  switch (state.value) {
1563
1563
  case ToggleStateValue.ON:
1564
- return ToggleEvents$1.ON;
1564
+ return Events.ON;
1565
1565
  case ToggleStateValue.OFF:
1566
- return ToggleEvents$1.OFF;
1566
+ return Events.OFF;
1567
1567
  case ToggleStateValue.MIXED:
1568
- return ToggleEvents$1.MIXED;
1568
+ return Events.MIXED;
1569
1569
  }
1570
1570
  };
1571
1571
  /**
@@ -1605,6 +1605,12 @@
1605
1605
  })(ToggleMethods || (ToggleMethods = {}));
1606
1606
 
1607
1607
  (function () {
1608
+ /**
1609
+ * Add `BootstrapToggle` prototype function to Window
1610
+ * Enables execution when used with ECMAScript
1611
+ */
1612
+ globalThis.window.BootstrapToggle = globalThis.window.BootstrapToggle || {};
1613
+ Object.assign(globalThis.window.BootstrapToggle, { Events: Events, Methods: ToggleMethods, StateValue: ToggleStateValue, StateStatus: ToggleStateStatus });
1608
1614
  /**
1609
1615
  * Add `bootstrapToggle` prototype function to HTML Elements
1610
1616
  * Enables execution when used with HTML - ex: `document.getElementById('toggle').bootstrapToggle('on')`
@@ -1652,6 +1658,10 @@
1652
1658
  // Export library if possible
1653
1659
  if (typeof module !== "undefined" && module.exports) {
1654
1660
  module.exports = Toggle;
1661
+ module.exports.Events = Events;
1662
+ module.exports.Methods = ToggleMethods;
1663
+ module.exports.StateValue = ToggleStateValue;
1664
+ module.exports.StateStatus = ToggleStateStatus;
1655
1665
  }
1656
1666
  })();
1657
1667