jsuites 5.6.1 → 5.6.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.
Files changed (2) hide show
  1. package/dist/jsuites.js +20 -17
  2. package/package.json +1 -1
package/dist/jsuites.js CHANGED
@@ -686,19 +686,19 @@ var translate = function(t) {
686
686
  ;// CONCATENATED MODULE: ./src/utils/tracking.js
687
687
  const Tracking = function(component, state) {
688
688
  if (state === true) {
689
- Tracking.state = Tracking.state.filter(function(v) {
689
+ window['jSuitesStateControl'] = window['jSuitesStateControl'].filter(function(v) {
690
690
  return v !== null;
691
691
  });
692
692
 
693
693
  // Start after all events
694
694
  setTimeout(function() {
695
- Tracking.state.push(component);
695
+ window['jSuitesStateControl'].push(component);
696
696
  }, 0);
697
697
 
698
698
  } else {
699
- var index = Tracking.state.indexOf(component);
699
+ var index = window['jSuitesStateControl'].indexOf(component);
700
700
  if (index >= 0) {
701
- Tracking.state.splice(index, 1);
701
+ window['jSuitesStateControl'].splice(index, 1);
702
702
  }
703
703
  }
704
704
  }
@@ -4537,6 +4537,8 @@ function Tabs(el, options) {
4537
4537
 
4538
4538
  // Set value
4539
4539
  obj.open = function(index) {
4540
+ // This is to force safari to update the children
4541
+ const items = Array.from(obj.content.children);
4540
4542
  if (! obj.content.children[index]) {
4541
4543
  return;
4542
4544
  }
@@ -12810,7 +12812,7 @@ var jsuites_jSuites = {
12810
12812
  ...dictionary,
12811
12813
  ...helpers,
12812
12814
  /** Current version */
12813
- version: '5.6.0',
12815
+ version: '5.6.3',
12814
12816
  /** Bind new extensions to Jsuites */
12815
12817
  setExtensions: function(o) {
12816
12818
  if (typeof(o) == 'object') {
@@ -12870,13 +12872,12 @@ jsuites_jSuites.sha512 = (sha512_default());
12870
12872
  /** Core events */
12871
12873
  const Events = function() {
12872
12874
 
12873
- tracking.state = [];
12874
-
12875
- // Block event to run twice
12876
- if (window['jSuitesEvents'] === true) {
12875
+ if (typeof(window['jSuitesStateControl']) === 'undefined') {
12876
+ window['jSuitesStateControl'] = [];
12877
+ } else {
12878
+ // Do nothing
12877
12879
  return;
12878
12880
  }
12879
- window['jSuitesEvents'] = true;
12880
12881
 
12881
12882
  const find = function(DOMElement, component) {
12882
12883
  if (DOMElement[component.type] && DOMElement[component.type] == component) {
@@ -12892,10 +12893,11 @@ const Events = function() {
12892
12893
  }
12893
12894
 
12894
12895
  const isOpened = function(e) {
12895
- if (tracking.state && tracking.state.length > 0) {
12896
- for (var i = 0; i < tracking.state.length; i++) {
12897
- if (tracking.state[i] && ! find(e, tracking.state[i])) {
12898
- tracking.state[i].close();
12896
+ let state = window['jSuitesStateControl'];
12897
+ if (state && state.length > 0) {
12898
+ for (let i = 0; i < state.length; i++) {
12899
+ if (state[i] && ! find(e, state[i])) {
12900
+ state[i].close();
12899
12901
  }
12900
12902
  }
12901
12903
  }
@@ -13296,8 +13298,9 @@ const Events = function() {
13296
13298
  }
13297
13299
  }
13298
13300
 
13299
- if (tracking.state && tracking.state.length) {
13300
- item = tracking.state[tracking.state.length - 1]
13301
+ let state = window['jSuitesStateControl'];
13302
+ if (state && state.length > 0) {
13303
+ item = state[state.length - 1];
13301
13304
  if (item) {
13302
13305
  if (e.key === "Escape" && typeof(item.isOpened) == 'function' && typeof(item.close) == 'function') {
13303
13306
  if (item.isOpened()) {
@@ -13326,7 +13329,7 @@ const Events = function() {
13326
13329
  document.addEventListener('input', input);
13327
13330
  }
13328
13331
 
13329
- if (typeof(document) !== "undefined" && ! tracking.state) {
13332
+ if (typeof(document) !== "undefined") {
13330
13333
  Events();
13331
13334
  }
13332
13335
 
package/package.json CHANGED
@@ -26,7 +26,7 @@
26
26
  },
27
27
  "main": "dist/jsuites.js",
28
28
  "types": "dist/jsuites.d.ts",
29
- "version": "5.6.1",
29
+ "version": "5.6.3",
30
30
  "bugs": "https://github.com/jsuites/jsuites/issues",
31
31
  "homepage": "https://github.com/jsuites/jsuites",
32
32
  "docs": "https://jsuites.net",