jsuites 4.9.31 → 4.9.32
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/jsuites.basic.css +2 -7
- package/dist/jsuites.basic.js +39 -21
- package/dist/jsuites.css +2 -7
- package/dist/jsuites.js +39 -21
- package/dist/jsuites.layout.js +0 -23
- package/package.json +1 -1
package/dist/jsuites.basic.css
CHANGED
|
@@ -529,7 +529,6 @@ div[data-before]:before {
|
|
|
529
529
|
|
|
530
530
|
|
|
531
531
|
.jcolor {
|
|
532
|
-
position: absolute;
|
|
533
532
|
display: none;
|
|
534
533
|
outline: none;
|
|
535
534
|
}
|
|
@@ -544,7 +543,6 @@ div[data-before]:before {
|
|
|
544
543
|
|
|
545
544
|
.jcolor-content {
|
|
546
545
|
position: absolute;
|
|
547
|
-
left: 0px;
|
|
548
546
|
z-index: 9000;
|
|
549
547
|
user-select: none;
|
|
550
548
|
-webkit-font-smoothing: antialiased;
|
|
@@ -603,6 +601,7 @@ div[data-before]:before {
|
|
|
603
601
|
|
|
604
602
|
.jcolor-fullscreen {
|
|
605
603
|
position: fixed;
|
|
604
|
+
left: 0px;
|
|
606
605
|
bottom: 0px;
|
|
607
606
|
width:100%;
|
|
608
607
|
max-height: 290px;
|
|
@@ -2087,7 +2086,6 @@ div[data-before]:before {
|
|
|
2087
2086
|
}
|
|
2088
2087
|
|
|
2089
2088
|
.jtoolbar .jtoolbar-item {
|
|
2090
|
-
position: relative;
|
|
2091
2089
|
text-align: center;
|
|
2092
2090
|
margin: auto;
|
|
2093
2091
|
padding: 2px;
|
|
@@ -2096,6 +2094,7 @@ div[data-before]:before {
|
|
|
2096
2094
|
}
|
|
2097
2095
|
|
|
2098
2096
|
.jtoolbar-mobile .jtoolbar-item {
|
|
2097
|
+
position: relative;
|
|
2099
2098
|
flex:1;
|
|
2100
2099
|
}
|
|
2101
2100
|
|
|
@@ -2221,10 +2220,6 @@ div[data-before]:before {
|
|
|
2221
2220
|
display: none;
|
|
2222
2221
|
}
|
|
2223
2222
|
|
|
2224
|
-
.jtoolbar-floating > div {
|
|
2225
|
-
display: block;
|
|
2226
|
-
}
|
|
2227
|
-
|
|
2228
2223
|
.jtoolbar-arrow-selected .jtoolbar-floating {
|
|
2229
2224
|
display: flex;
|
|
2230
2225
|
flex-wrap: wrap;
|
package/dist/jsuites.basic.js
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
|
|
18
18
|
var jSuites = function(options) {
|
|
19
19
|
var obj = {}
|
|
20
|
-
var version = '4.9.
|
|
20
|
+
var version = '4.9.32';
|
|
21
21
|
|
|
22
22
|
var find = function(DOMElement, component) {
|
|
23
23
|
if (DOMElement[component.type] && DOMElement[component.type] == component) {
|
|
@@ -2035,10 +2035,15 @@ jSuites.color = (function(el, options) {
|
|
|
2035
2035
|
// Show colorpicker
|
|
2036
2036
|
container.classList.add('jcolor-focus');
|
|
2037
2037
|
|
|
2038
|
+
// Reset margin
|
|
2039
|
+
content.style.marginTop = '';
|
|
2040
|
+
content.style.marginLeft = '';
|
|
2041
|
+
|
|
2038
2042
|
var rectContent = content.getBoundingClientRect();
|
|
2043
|
+
var availableWidth = jSuites.getWindowWidth();
|
|
2044
|
+
var availableHeight = jSuites.getWindowHeight();
|
|
2039
2045
|
|
|
2040
|
-
if (
|
|
2041
|
-
content.style.top = '';
|
|
2046
|
+
if (availableWidth < 800 || obj.options.fullscreen == true) {
|
|
2042
2047
|
content.classList.add('jcolor-fullscreen');
|
|
2043
2048
|
jSuites.animation.slideBottom(content, 1);
|
|
2044
2049
|
backdrop.style.display = 'block';
|
|
@@ -2048,25 +2053,21 @@ jSuites.color = (function(el, options) {
|
|
|
2048
2053
|
backdrop.style.display = '';
|
|
2049
2054
|
}
|
|
2050
2055
|
|
|
2051
|
-
var rect = el.getBoundingClientRect();
|
|
2052
|
-
|
|
2053
2056
|
if (obj.options.position) {
|
|
2054
2057
|
content.style.position = 'fixed';
|
|
2055
|
-
if (window.innerHeight < rect.bottom + rectContent.height) {
|
|
2056
|
-
content.style.top = (rect.top - (rectContent.height + 2)) + 'px';
|
|
2057
|
-
} else {
|
|
2058
|
-
content.style.top = (rect.top + rect.height + 2) + 'px';
|
|
2059
|
-
}
|
|
2060
|
-
content.style.left = rect.left + 'px';
|
|
2061
2058
|
} else {
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2059
|
+
content.style.position = '';
|
|
2060
|
+
}
|
|
2061
|
+
|
|
2062
|
+
if (rectContent.left + rectContent.width > availableWidth) {
|
|
2063
|
+
content.style.marginLeft = -1 * (rectContent.left + rectContent.width - (availableWidth - 20)) + 'px';
|
|
2064
|
+
}
|
|
2065
|
+
if (rectContent.top + rectContent.height > availableHeight) {
|
|
2066
|
+
content.style.marginTop = -1 * (rectContent.top + rectContent.height - (availableHeight - 20)) + 'px';
|
|
2067
2067
|
}
|
|
2068
2068
|
}
|
|
2069
2069
|
|
|
2070
|
+
|
|
2070
2071
|
if (typeof(obj.options.onopen) == 'function') {
|
|
2071
2072
|
obj.options.onopen(el);
|
|
2072
2073
|
}
|
|
@@ -2542,10 +2543,10 @@ jSuites.color = (function(el, options) {
|
|
|
2542
2543
|
backdropClickControl = true;
|
|
2543
2544
|
});
|
|
2544
2545
|
|
|
2545
|
-
backdrop.addEventListener("
|
|
2546
|
+
backdrop.addEventListener("click", function(e) {
|
|
2546
2547
|
if (backdropClickControl) {
|
|
2547
|
-
obj.close();
|
|
2548
2548
|
backdropClickControl = false;
|
|
2549
|
+
obj.close();
|
|
2549
2550
|
}
|
|
2550
2551
|
});
|
|
2551
2552
|
|
|
@@ -8336,18 +8337,35 @@ jSuites.picker = (function(el, options) {
|
|
|
8336
8337
|
el.classList.add('jpicker-focus');
|
|
8337
8338
|
el.focus();
|
|
8338
8339
|
|
|
8340
|
+
var top = 0;
|
|
8341
|
+
var left = 0;
|
|
8342
|
+
|
|
8343
|
+
dropdownContent.style.marginLeft = '';
|
|
8344
|
+
|
|
8339
8345
|
var rectHeader = dropdownHeader.getBoundingClientRect();
|
|
8340
8346
|
var rectContent = dropdownContent.getBoundingClientRect();
|
|
8347
|
+
|
|
8341
8348
|
if (window.innerHeight < rectHeader.bottom + rectContent.height) {
|
|
8342
|
-
|
|
8349
|
+
top = -1 * (rectContent.height + 4);
|
|
8343
8350
|
} else {
|
|
8344
|
-
|
|
8351
|
+
top = rectHeader.height + 4;
|
|
8345
8352
|
}
|
|
8346
8353
|
|
|
8347
8354
|
if (obj.options.right === true) {
|
|
8348
|
-
|
|
8355
|
+
left = -1 * rectContent.width + rectHeader.width;
|
|
8356
|
+
}
|
|
8357
|
+
|
|
8358
|
+
if (rectContent.left + left < 0) {
|
|
8359
|
+
left = left + rectContent.left + 10;
|
|
8349
8360
|
}
|
|
8361
|
+
if (rectContent.left + rectContent.width > window.innerWidth) {
|
|
8362
|
+
left = -1 * (10 + rectContent.left + rectContent.width - window.innerWidth);
|
|
8363
|
+
}
|
|
8364
|
+
|
|
8365
|
+
dropdownContent.style.marginTop = parseInt(top) + 'px';
|
|
8366
|
+
dropdownContent.style.marginLeft = parseInt(left) + 'px';
|
|
8350
8367
|
|
|
8368
|
+
//dropdownContent.style.marginTop
|
|
8351
8369
|
if (typeof obj.options.onopen == 'function') {
|
|
8352
8370
|
obj.options.onopen(el, obj);
|
|
8353
8371
|
}
|
package/dist/jsuites.css
CHANGED
|
@@ -529,7 +529,6 @@ div[data-before]:before {
|
|
|
529
529
|
|
|
530
530
|
|
|
531
531
|
.jcolor {
|
|
532
|
-
position: absolute;
|
|
533
532
|
display: none;
|
|
534
533
|
outline: none;
|
|
535
534
|
}
|
|
@@ -544,7 +543,6 @@ div[data-before]:before {
|
|
|
544
543
|
|
|
545
544
|
.jcolor-content {
|
|
546
545
|
position: absolute;
|
|
547
|
-
left: 0px;
|
|
548
546
|
z-index: 9000;
|
|
549
547
|
user-select: none;
|
|
550
548
|
-webkit-font-smoothing: antialiased;
|
|
@@ -603,6 +601,7 @@ div[data-before]:before {
|
|
|
603
601
|
|
|
604
602
|
.jcolor-fullscreen {
|
|
605
603
|
position: fixed;
|
|
604
|
+
left: 0px;
|
|
606
605
|
bottom: 0px;
|
|
607
606
|
width:100%;
|
|
608
607
|
max-height: 290px;
|
|
@@ -2657,7 +2656,6 @@ div[data-before]:before {
|
|
|
2657
2656
|
}
|
|
2658
2657
|
|
|
2659
2658
|
.jtoolbar .jtoolbar-item {
|
|
2660
|
-
position: relative;
|
|
2661
2659
|
text-align: center;
|
|
2662
2660
|
margin: auto;
|
|
2663
2661
|
padding: 2px;
|
|
@@ -2666,6 +2664,7 @@ div[data-before]:before {
|
|
|
2666
2664
|
}
|
|
2667
2665
|
|
|
2668
2666
|
.jtoolbar-mobile .jtoolbar-item {
|
|
2667
|
+
position: relative;
|
|
2669
2668
|
flex:1;
|
|
2670
2669
|
}
|
|
2671
2670
|
|
|
@@ -2791,10 +2790,6 @@ div[data-before]:before {
|
|
|
2791
2790
|
display: none;
|
|
2792
2791
|
}
|
|
2793
2792
|
|
|
2794
|
-
.jtoolbar-floating > div {
|
|
2795
|
-
display: block;
|
|
2796
|
-
}
|
|
2797
|
-
|
|
2798
2793
|
.jtoolbar-arrow-selected .jtoolbar-floating {
|
|
2799
2794
|
display: flex;
|
|
2800
2795
|
flex-wrap: wrap;
|
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.
|
|
20
|
+
var version = '4.9.32';
|
|
21
21
|
|
|
22
22
|
var find = function(DOMElement, component) {
|
|
23
23
|
if (DOMElement[component.type] && DOMElement[component.type] == component) {
|
|
@@ -2046,10 +2046,15 @@ jSuites.color = (function(el, options) {
|
|
|
2046
2046
|
// Show colorpicker
|
|
2047
2047
|
container.classList.add('jcolor-focus');
|
|
2048
2048
|
|
|
2049
|
+
// Reset margin
|
|
2050
|
+
content.style.marginTop = '';
|
|
2051
|
+
content.style.marginLeft = '';
|
|
2052
|
+
|
|
2049
2053
|
var rectContent = content.getBoundingClientRect();
|
|
2054
|
+
var availableWidth = jSuites.getWindowWidth();
|
|
2055
|
+
var availableHeight = jSuites.getWindowHeight();
|
|
2050
2056
|
|
|
2051
|
-
if (
|
|
2052
|
-
content.style.top = '';
|
|
2057
|
+
if (availableWidth < 800 || obj.options.fullscreen == true) {
|
|
2053
2058
|
content.classList.add('jcolor-fullscreen');
|
|
2054
2059
|
jSuites.animation.slideBottom(content, 1);
|
|
2055
2060
|
backdrop.style.display = 'block';
|
|
@@ -2059,25 +2064,21 @@ jSuites.color = (function(el, options) {
|
|
|
2059
2064
|
backdrop.style.display = '';
|
|
2060
2065
|
}
|
|
2061
2066
|
|
|
2062
|
-
var rect = el.getBoundingClientRect();
|
|
2063
|
-
|
|
2064
2067
|
if (obj.options.position) {
|
|
2065
2068
|
content.style.position = 'fixed';
|
|
2066
|
-
if (window.innerHeight < rect.bottom + rectContent.height) {
|
|
2067
|
-
content.style.top = (rect.top - (rectContent.height + 2)) + 'px';
|
|
2068
|
-
} else {
|
|
2069
|
-
content.style.top = (rect.top + rect.height + 2) + 'px';
|
|
2070
|
-
}
|
|
2071
|
-
content.style.left = rect.left + 'px';
|
|
2072
2069
|
} else {
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2070
|
+
content.style.position = '';
|
|
2071
|
+
}
|
|
2072
|
+
|
|
2073
|
+
if (rectContent.left + rectContent.width > availableWidth) {
|
|
2074
|
+
content.style.marginLeft = -1 * (rectContent.left + rectContent.width - (availableWidth - 20)) + 'px';
|
|
2075
|
+
}
|
|
2076
|
+
if (rectContent.top + rectContent.height > availableHeight) {
|
|
2077
|
+
content.style.marginTop = -1 * (rectContent.top + rectContent.height - (availableHeight - 20)) + 'px';
|
|
2078
2078
|
}
|
|
2079
2079
|
}
|
|
2080
2080
|
|
|
2081
|
+
|
|
2081
2082
|
if (typeof(obj.options.onopen) == 'function') {
|
|
2082
2083
|
obj.options.onopen(el);
|
|
2083
2084
|
}
|
|
@@ -2553,10 +2554,10 @@ jSuites.color = (function(el, options) {
|
|
|
2553
2554
|
backdropClickControl = true;
|
|
2554
2555
|
});
|
|
2555
2556
|
|
|
2556
|
-
backdrop.addEventListener("
|
|
2557
|
+
backdrop.addEventListener("click", function(e) {
|
|
2557
2558
|
if (backdropClickControl) {
|
|
2558
|
-
obj.close();
|
|
2559
2559
|
backdropClickControl = false;
|
|
2560
|
+
obj.close();
|
|
2560
2561
|
}
|
|
2561
2562
|
});
|
|
2562
2563
|
|
|
@@ -8988,18 +8989,35 @@ jSuites.picker = (function(el, options) {
|
|
|
8988
8989
|
el.classList.add('jpicker-focus');
|
|
8989
8990
|
el.focus();
|
|
8990
8991
|
|
|
8992
|
+
var top = 0;
|
|
8993
|
+
var left = 0;
|
|
8994
|
+
|
|
8995
|
+
dropdownContent.style.marginLeft = '';
|
|
8996
|
+
|
|
8991
8997
|
var rectHeader = dropdownHeader.getBoundingClientRect();
|
|
8992
8998
|
var rectContent = dropdownContent.getBoundingClientRect();
|
|
8999
|
+
|
|
8993
9000
|
if (window.innerHeight < rectHeader.bottom + rectContent.height) {
|
|
8994
|
-
|
|
9001
|
+
top = -1 * (rectContent.height + 4);
|
|
8995
9002
|
} else {
|
|
8996
|
-
|
|
9003
|
+
top = rectHeader.height + 4;
|
|
8997
9004
|
}
|
|
8998
9005
|
|
|
8999
9006
|
if (obj.options.right === true) {
|
|
9000
|
-
|
|
9007
|
+
left = -1 * rectContent.width + rectHeader.width;
|
|
9008
|
+
}
|
|
9009
|
+
|
|
9010
|
+
if (rectContent.left + left < 0) {
|
|
9011
|
+
left = left + rectContent.left + 10;
|
|
9001
9012
|
}
|
|
9013
|
+
if (rectContent.left + rectContent.width > window.innerWidth) {
|
|
9014
|
+
left = -1 * (10 + rectContent.left + rectContent.width - window.innerWidth);
|
|
9015
|
+
}
|
|
9016
|
+
|
|
9017
|
+
dropdownContent.style.marginTop = parseInt(top) + 'px';
|
|
9018
|
+
dropdownContent.style.marginLeft = parseInt(left) + 'px';
|
|
9002
9019
|
|
|
9020
|
+
//dropdownContent.style.marginTop
|
|
9003
9021
|
if (typeof obj.options.onopen == 'function') {
|
|
9004
9022
|
obj.options.onopen(el, obj);
|
|
9005
9023
|
}
|
package/dist/jsuites.layout.js
CHANGED
|
@@ -1,20 +1,3 @@
|
|
|
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
|
-
|
|
18
1
|
jSuites.crop = (function(el, options) {
|
|
19
2
|
// Already created, update options
|
|
20
3
|
if (el.crop) {
|
|
@@ -3468,9 +3451,3 @@ jSuites.timeline = (function(el, options) {
|
|
|
3468
3451
|
|
|
3469
3452
|
return obj;
|
|
3470
3453
|
});
|
|
3471
|
-
|
|
3472
|
-
|
|
3473
|
-
|
|
3474
|
-
return jSuites;
|
|
3475
|
-
|
|
3476
|
-
})));
|
package/package.json
CHANGED