jsuites 4.9.27 → 4.9.31

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.
@@ -12,6 +12,8 @@
12
12
  :root {
13
13
  --button-color: #298BA8;
14
14
  --active-color: #007aff;
15
+ --safe-area-top: env(safe-area-inset-top);
16
+ --safe-area-bottom: env(safe-area-inset-bottom);
15
17
  }
16
18
 
17
19
  div[data-before]:before {
@@ -1753,7 +1755,7 @@ div[data-before]:before {
1753
1755
 
1754
1756
  @media (max-width: 800px) {
1755
1757
  .jnotification {
1756
- top: 0px;
1758
+ top: calc(0px + var(--safe-area-top));
1757
1759
  width: 100%;
1758
1760
  }
1759
1761
  .jnotification-container {
@@ -17,7 +17,7 @@
17
17
 
18
18
  var jSuites = function(options) {
19
19
  var obj = {}
20
- var version = '4.9.27';
20
+ var version = '4.9.22';
21
21
 
22
22
  var find = function(DOMElement, component) {
23
23
  if (DOMElement[component.type] && DOMElement[component.type] == component) {
@@ -902,9 +902,9 @@ jSuites.calendar = (function(el, options) {
902
902
  // Lemonade JS
903
903
  if (el.value != val) {
904
904
  el.value = val;
905
- if (typeof(el.onchange) == 'function') {
906
- el.onchange({
907
- type: 'change',
905
+ if (typeof(el.oninput) == 'function') {
906
+ el.oninput({
907
+ type: 'input',
908
908
  target: el,
909
909
  value: el.value
910
910
  });
@@ -2138,9 +2138,9 @@ jSuites.color = (function(el, options) {
2138
2138
  // Set input value
2139
2139
  el.value = obj.options.value;
2140
2140
  // Element onchange native
2141
- if (typeof(el.onchange) == 'function') {
2142
- el.onchange({
2143
- type: 'change',
2141
+ if (typeof(el.oninput) == 'function') {
2142
+ el.oninput({
2143
+ type: 'input',
2144
2144
  target: el,
2145
2145
  value: el.value
2146
2146
  });
@@ -2868,11 +2868,11 @@ jSuites.dropdown = (function(el, options) {
2868
2868
  }
2869
2869
 
2870
2870
  obj.setData(data);
2871
+ }
2871
2872
 
2872
- // Onload method
2873
- if (typeof(obj.options.onload) == 'function') {
2874
- obj.options.onload(el, obj, data, val);
2875
- }
2873
+ // Onload method
2874
+ if (typeof(obj.options.onload) == 'function') {
2875
+ obj.options.onload(el, obj, data, val);
2876
2876
  }
2877
2877
 
2878
2878
  // Set value
@@ -2916,9 +2916,9 @@ jSuites.dropdown = (function(el, options) {
2916
2916
  }
2917
2917
  }
2918
2918
 
2919
- if(typeof testA == "string" || typeof testB == "string") {
2920
- if(typeof testA != "string") { testA = ""+testA; }
2921
- if(typeof testB != "string") { testB = ""+testB; }
2919
+ if (typeof testA == "string" || typeof testB == "string") {
2920
+ if (typeof testA != "string") { testA = ""+testA; }
2921
+ if (typeof testB != "string") { testB = ""+testB; }
2922
2922
  return testA.localeCompare(testB);
2923
2923
  } else {
2924
2924
  return testA - testB;
@@ -3743,9 +3743,9 @@ jSuites.dropdown = (function(el, options) {
3743
3743
  // Lemonade JS
3744
3744
  if (el.value != obj.options.value) {
3745
3745
  el.value = obj.options.value;
3746
- if (typeof(el.onchange) == 'function') {
3747
- el.onchange({
3748
- type: 'change',
3746
+ if (typeof(el.oninput) == 'function') {
3747
+ el.oninput({
3748
+ type: 'input',
3749
3749
  target: el,
3750
3750
  value: el.value
3751
3751
  });
@@ -4738,9 +4738,9 @@ jSuites.editor = (function(el, options) {
4738
4738
  // Lemonade JS
4739
4739
  if (el.value != obj.options.value) {
4740
4740
  el.value = obj.options.value;
4741
- if (typeof(el.onchange) == 'function') {
4742
- el.onchange({
4743
- type: 'change',
4741
+ if (typeof(el.oninput) == 'function') {
4742
+ el.oninput({
4743
+ type: 'input',
4744
4744
  target: el,
4745
4745
  value: el.value
4746
4746
  });
@@ -6720,11 +6720,16 @@ jSuites.mask = (function() {
6720
6720
  return t[1];
6721
6721
  } else {
6722
6722
  // Did not find any decimal last resort the default
6723
- var e = new RegExp('#,##', 'ig');
6724
- if ((v && v.match(e)) || '1.1'.toLocaleString().substring(1,2) == ',') {
6725
- this.options.decimal = ',';
6723
+ var e = new RegExp('#{1}(.{1})#+', 'ig');
6724
+ var t = e.exec(v);
6725
+ if (t && t[1] && t[1].length == 1) {
6726
+ if (t[1] === ',') {
6727
+ this.options.decimal = '.';
6728
+ } else {
6729
+ this.options.decimal = ',';
6730
+ }
6726
6731
  } else {
6727
- this.options.decimal = '.';
6732
+ this.options.decimal = '1.1'.toLocaleString().substring(1,2);
6728
6733
  }
6729
6734
  }
6730
6735
  }
@@ -8096,7 +8101,10 @@ jSuites.notification.isVisible = function() {
8096
8101
  }
8097
8102
 
8098
8103
  // More palettes https://coolors.co/ or https://gka.github.io/palettes/#/10|s|003790,005647,ffffe0|ffffe0,ff005e,93003a|1|1
8099
- jSuites.palette = function(o, v) {
8104
+ jSuites.palette = (function() {
8105
+ /**
8106
+ * Available palettes
8107
+ */
8100
8108
  var palette = {
8101
8109
  material: [
8102
8110
  [ "#ffebee", "#fce4ec", "#f3e5f5", "#e8eaf6", "#e3f2fd", "#e0f7fa", "#e0f2f1", "#e8f5e9", "#f1f8e9", "#f9fbe7", "#fffde7", "#fff8e1", "#fff3e0", "#fbe9e7", "#efebe9", "#fafafa", "#eceff1" ],
@@ -8129,18 +8137,33 @@ jSuites.palette = function(o, v) {
8129
8137
  ],
8130
8138
  }
8131
8139
 
8132
- // Is defined, set new palette value
8133
- if (typeof(v) !== 'undefined') {
8134
- palette[o] = v;
8140
+ /**
8141
+ * Get a pallete
8142
+ */
8143
+ var component = function(o) {
8144
+ // Otherwise get palette value
8145
+ if (palette[o]) {
8146
+ return palette[o];
8147
+ } else {
8148
+ return palette.material;
8149
+ }
8135
8150
  }
8136
8151
 
8137
- // Otherwise get palette value
8138
- if (palette[o]) {
8139
- return palette[o];
8140
- } else {
8141
- return palette.material;
8152
+ component.get = function(o) {
8153
+ // Otherwise get palette value
8154
+ if (palette[o]) {
8155
+ return palette[o];
8156
+ } else {
8157
+ return palette;
8158
+ }
8142
8159
  }
8143
- }
8160
+
8161
+ component.set = function(o, v) {
8162
+ palette[o] = v;
8163
+ }
8164
+
8165
+ return component;
8166
+ })();
8144
8167
 
8145
8168
 
8146
8169
  jSuites.picker = (function(el, options) {
@@ -8272,9 +8295,9 @@ jSuites.picker = (function(el, options) {
8272
8295
  // Lemonade JS
8273
8296
  if (el.value != obj.options.value) {
8274
8297
  el.value = obj.options.value;
8275
- if (typeof(el.onchange) == 'function') {
8276
- el.onchange({
8277
- type: 'change',
8298
+ if (typeof(el.oninput) == 'function') {
8299
+ el.oninput({
8300
+ type: 'input',
8278
8301
  target: el,
8279
8302
  value: el.value
8280
8303
  });
@@ -8486,9 +8509,9 @@ jSuites.rating = (function(el, options) {
8486
8509
  // Lemonade JS
8487
8510
  if (el.value != obj.options.value) {
8488
8511
  el.value = obj.options.value;
8489
- if (typeof(el.onchange) == 'function') {
8490
- el.onchange({
8491
- type: 'change',
8512
+ if (typeof(el.oninput) == 'function') {
8513
+ el.oninput({
8514
+ type: 'input',
8492
8515
  target: el,
8493
8516
  value: el.value
8494
8517
  });
package/dist/jsuites.css CHANGED
@@ -12,6 +12,8 @@
12
12
  :root {
13
13
  --button-color: #298BA8;
14
14
  --active-color: #007aff;
15
+ --safe-area-top: env(safe-area-inset-top);
16
+ --safe-area-bottom: env(safe-area-inset-bottom);
15
17
  }
16
18
 
17
19
  div[data-before]:before {
@@ -1845,7 +1847,7 @@ div[data-before]:before {
1845
1847
 
1846
1848
  @media (max-width: 800px) {
1847
1849
  .jnotification {
1848
- top: 0px;
1850
+ top: calc(0px + var(--safe-area-top));
1849
1851
  width: 100%;
1850
1852
  }
1851
1853
  .jnotification-container {
package/dist/jsuites.js CHANGED
@@ -17,7 +17,7 @@
17
17
 
18
18
  var jSuites = function(options) {
19
19
  var obj = {}
20
- var version = '4.9.27';
20
+ var version = '4.9.22';
21
21
 
22
22
  var find = function(DOMElement, component) {
23
23
  if (DOMElement[component.type] && DOMElement[component.type] == component) {
@@ -913,9 +913,9 @@ jSuites.calendar = (function(el, options) {
913
913
  // Lemonade JS
914
914
  if (el.value != val) {
915
915
  el.value = val;
916
- if (typeof(el.onchange) == 'function') {
917
- el.onchange({
918
- type: 'change',
916
+ if (typeof(el.oninput) == 'function') {
917
+ el.oninput({
918
+ type: 'input',
919
919
  target: el,
920
920
  value: el.value
921
921
  });
@@ -2149,9 +2149,9 @@ jSuites.color = (function(el, options) {
2149
2149
  // Set input value
2150
2150
  el.value = obj.options.value;
2151
2151
  // Element onchange native
2152
- if (typeof(el.onchange) == 'function') {
2153
- el.onchange({
2154
- type: 'change',
2152
+ if (typeof(el.oninput) == 'function') {
2153
+ el.oninput({
2154
+ type: 'input',
2155
2155
  target: el,
2156
2156
  value: el.value
2157
2157
  });
@@ -2879,11 +2879,11 @@ jSuites.dropdown = (function(el, options) {
2879
2879
  }
2880
2880
 
2881
2881
  obj.setData(data);
2882
+ }
2882
2883
 
2883
- // Onload method
2884
- if (typeof(obj.options.onload) == 'function') {
2885
- obj.options.onload(el, obj, data, val);
2886
- }
2884
+ // Onload method
2885
+ if (typeof(obj.options.onload) == 'function') {
2886
+ obj.options.onload(el, obj, data, val);
2887
2887
  }
2888
2888
 
2889
2889
  // Set value
@@ -2927,9 +2927,9 @@ jSuites.dropdown = (function(el, options) {
2927
2927
  }
2928
2928
  }
2929
2929
 
2930
- if(typeof testA == "string" || typeof testB == "string") {
2931
- if(typeof testA != "string") { testA = ""+testA; }
2932
- if(typeof testB != "string") { testB = ""+testB; }
2930
+ if (typeof testA == "string" || typeof testB == "string") {
2931
+ if (typeof testA != "string") { testA = ""+testA; }
2932
+ if (typeof testB != "string") { testB = ""+testB; }
2933
2933
  return testA.localeCompare(testB);
2934
2934
  } else {
2935
2935
  return testA - testB;
@@ -3754,9 +3754,9 @@ jSuites.dropdown = (function(el, options) {
3754
3754
  // Lemonade JS
3755
3755
  if (el.value != obj.options.value) {
3756
3756
  el.value = obj.options.value;
3757
- if (typeof(el.onchange) == 'function') {
3758
- el.onchange({
3759
- type: 'change',
3757
+ if (typeof(el.oninput) == 'function') {
3758
+ el.oninput({
3759
+ type: 'input',
3760
3760
  target: el,
3761
3761
  value: el.value
3762
3762
  });
@@ -4749,9 +4749,9 @@ jSuites.editor = (function(el, options) {
4749
4749
  // Lemonade JS
4750
4750
  if (el.value != obj.options.value) {
4751
4751
  el.value = obj.options.value;
4752
- if (typeof(el.onchange) == 'function') {
4753
- el.onchange({
4754
- type: 'change',
4752
+ if (typeof(el.oninput) == 'function') {
4753
+ el.oninput({
4754
+ type: 'input',
4755
4755
  target: el,
4756
4756
  value: el.value
4757
4757
  });
@@ -7145,11 +7145,16 @@ jSuites.mask = (function() {
7145
7145
  return t[1];
7146
7146
  } else {
7147
7147
  // Did not find any decimal last resort the default
7148
- var e = new RegExp('#,##', 'ig');
7149
- if ((v && v.match(e)) || '1.1'.toLocaleString().substring(1,2) == ',') {
7150
- this.options.decimal = ',';
7148
+ var e = new RegExp('#{1}(.{1})#+', 'ig');
7149
+ var t = e.exec(v);
7150
+ if (t && t[1] && t[1].length == 1) {
7151
+ if (t[1] === ',') {
7152
+ this.options.decimal = '.';
7153
+ } else {
7154
+ this.options.decimal = ',';
7155
+ }
7151
7156
  } else {
7152
- this.options.decimal = '.';
7157
+ this.options.decimal = '1.1'.toLocaleString().substring(1,2);
7153
7158
  }
7154
7159
  }
7155
7160
  }
@@ -8748,7 +8753,10 @@ jSuites.notification.isVisible = function() {
8748
8753
  }
8749
8754
 
8750
8755
  // More palettes https://coolors.co/ or https://gka.github.io/palettes/#/10|s|003790,005647,ffffe0|ffffe0,ff005e,93003a|1|1
8751
- jSuites.palette = function(o, v) {
8756
+ jSuites.palette = (function() {
8757
+ /**
8758
+ * Available palettes
8759
+ */
8752
8760
  var palette = {
8753
8761
  material: [
8754
8762
  [ "#ffebee", "#fce4ec", "#f3e5f5", "#e8eaf6", "#e3f2fd", "#e0f7fa", "#e0f2f1", "#e8f5e9", "#f1f8e9", "#f9fbe7", "#fffde7", "#fff8e1", "#fff3e0", "#fbe9e7", "#efebe9", "#fafafa", "#eceff1" ],
@@ -8781,18 +8789,33 @@ jSuites.palette = function(o, v) {
8781
8789
  ],
8782
8790
  }
8783
8791
 
8784
- // Is defined, set new palette value
8785
- if (typeof(v) !== 'undefined') {
8786
- palette[o] = v;
8792
+ /**
8793
+ * Get a pallete
8794
+ */
8795
+ var component = function(o) {
8796
+ // Otherwise get palette value
8797
+ if (palette[o]) {
8798
+ return palette[o];
8799
+ } else {
8800
+ return palette.material;
8801
+ }
8787
8802
  }
8788
8803
 
8789
- // Otherwise get palette value
8790
- if (palette[o]) {
8791
- return palette[o];
8792
- } else {
8793
- return palette.material;
8804
+ component.get = function(o) {
8805
+ // Otherwise get palette value
8806
+ if (palette[o]) {
8807
+ return palette[o];
8808
+ } else {
8809
+ return palette;
8810
+ }
8794
8811
  }
8795
- }
8812
+
8813
+ component.set = function(o, v) {
8814
+ palette[o] = v;
8815
+ }
8816
+
8817
+ return component;
8818
+ })();
8796
8819
 
8797
8820
 
8798
8821
  jSuites.picker = (function(el, options) {
@@ -8924,9 +8947,9 @@ jSuites.picker = (function(el, options) {
8924
8947
  // Lemonade JS
8925
8948
  if (el.value != obj.options.value) {
8926
8949
  el.value = obj.options.value;
8927
- if (typeof(el.onchange) == 'function') {
8928
- el.onchange({
8929
- type: 'change',
8950
+ if (typeof(el.oninput) == 'function') {
8951
+ el.oninput({
8952
+ type: 'input',
8930
8953
  target: el,
8931
8954
  value: el.value
8932
8955
  });
@@ -9122,9 +9145,9 @@ jSuites.progressbar = (function(el, options) {
9122
9145
  // Lemonade JS
9123
9146
  if (el.value != obj.options.value) {
9124
9147
  el.value = obj.options.value;
9125
- if (typeof(el.onchange) == 'function') {
9126
- el.onchange({
9127
- type: 'change',
9148
+ if (typeof(el.oninput) == 'function') {
9149
+ el.oninput({
9150
+ type: 'input',
9128
9151
  target: el,
9129
9152
  value: el.value
9130
9153
  });
@@ -9253,9 +9276,9 @@ jSuites.rating = (function(el, options) {
9253
9276
  // Lemonade JS
9254
9277
  if (el.value != obj.options.value) {
9255
9278
  el.value = obj.options.value;
9256
- if (typeof(el.onchange) == 'function') {
9257
- el.onchange({
9258
- type: 'change',
9279
+ if (typeof(el.oninput) == 'function') {
9280
+ el.oninput({
9281
+ type: 'input',
9259
9282
  target: el,
9260
9283
  value: el.value
9261
9284
  });
@@ -10826,9 +10849,9 @@ jSuites.tags = (function(el, options) {
10826
10849
  // Lemonade JS
10827
10850
  if (el.value != obj.options.value) {
10828
10851
  el.value = obj.options.value;
10829
- if (typeof(el.onchange) == 'function') {
10830
- el.onchange({
10831
- type: 'change',
10852
+ if (typeof(el.oninput) == 'function') {
10853
+ el.oninput({
10854
+ type: 'input',
10832
10855
  target: el,
10833
10856
  value: el.value
10834
10857
  });
@@ -1,3 +1,20 @@
1
+ /**
2
+ * (c) jSuites Javascript Web Components
3
+ *
4
+ * Website: https://jsuites.net
5
+ * Description: Create amazing web based applications.
6
+ *
7
+ * MIT License
8
+ *
9
+ */
10
+ ;(function (global, factory) {
11
+ typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
12
+ typeof define === 'function' && define.amd ? define(factory) :
13
+ global.jSuites = factory();
14
+ }(this, (function () {
15
+
16
+ 'use strict';
17
+
1
18
  jSuites.crop = (function(el, options) {
2
19
  // Already created, update options
3
20
  if (el.crop) {
@@ -1698,11 +1715,12 @@ jSuites.menu = (function(el, options) {
1698
1715
  var menu = el.querySelectorAll('nav');
1699
1716
  var selected = null;
1700
1717
  for (var i = 0; i < menu.length; i++) {
1701
- menu[i].classList.remove('selected');
1702
1718
  if (menu[i].getAttribute('data-id')) {
1703
1719
  var state = localStorage.getItem('jmenu-' + menu[i].getAttribute('data-id'));
1704
- if (state == 1) {
1720
+ if (state === '1') {
1705
1721
  menu[i].classList.add('selected');
1722
+ } else if (state === '0') {
1723
+ menu[i].classList.remove('selected');
1706
1724
  }
1707
1725
  }
1708
1726
  }
@@ -3450,3 +3468,9 @@ jSuites.timeline = (function(el, options) {
3450
3468
 
3451
3469
  return obj;
3452
3470
  });
3471
+
3472
+
3473
+
3474
+ return jSuites;
3475
+
3476
+ })));
package/package.json CHANGED
@@ -19,7 +19,7 @@
19
19
  "javascript plugins"
20
20
  ],
21
21
  "main": "dist/jsuites.js",
22
- "version": "4.9.27",
22
+ "version": "4.9.31",
23
23
  "bugs": "https://github.com/jsuites/jsuites/issues",
24
24
  "homepage": "https://github.com/jsuites/jsuites",
25
25
  "docs": "https://jsuites.net",