11
2- /* Smart UI v9.0.0 (2020-Dec )
2+ /* Smart UI v9.1.1 (2021-Feb )
33Copyright (c) 2011-2021 jQWidgets.
44License: https://htmlelements.com/license/ */ //
55
66( function ( ) {
77
88
9- const Version = '8.0.1 ' ;
9+ const Version = '9.1.0 ' ;
1010 const templates = [ ] ;
1111
1212 let namespace = 'Smart' ;
@@ -533,6 +533,22 @@ License: https://htmlelements.com/license/ */ //
533533 class Core {
534534 static get isMobile ( ) {
535535 const isMobile = / ( i p h o n e | i p o d | i p a d | a n d r o i d | i e m o b i l e | b l a c k b e r r y | b a d a ) / . test ( window . navigator . userAgent . toLowerCase ( ) ) ;
536+ const iOS = ( ) => {
537+ return [
538+ 'iPad Simulator' ,
539+ 'iPhone Simulator' ,
540+ 'iPod Simulator' ,
541+ 'iPad' ,
542+ 'iPhone' ,
543+ 'iPod'
544+ ] . includes ( navigator . platform )
545+ // iPad on iOS 13 detection
546+ || ( navigator . userAgent . includes ( 'Mac' ) && 'ontouchend' in document )
547+ }
548+
549+ if ( ! isMobile ) {
550+ return iOS ( ) ;
551+ }
536552
537553 return isMobile ;
538554 }
@@ -771,6 +787,14 @@ License: https://htmlelements.com/license/ */ //
771787 static observeElement ( element ) {
772788 const that = element ;
773789
790+ if ( window . Smart . Mode === 'test' ) {
791+ if ( StyleObserver . interval ) {
792+ clearInterval ( StyleObserver . interval ) ;
793+ }
794+
795+ return ;
796+ }
797+
774798 let computedStyle = element . _computedStyle || that . hasStyleObserver !== 'resize' ? document . defaultView . getComputedStyle ( that , null ) : {
775799 } ;
776800
@@ -1708,14 +1732,15 @@ License: https://htmlelements.com/license/ */ //
17081732 event . originalEvent . stopPropagation ( ) ;
17091733 }
17101734
1711- hScrollInfo . visible = horizontalScrollBar . offsetHeight > 0 ;
1712- vScrollInfo . visible = verticalScrollBar . offsetWidth > 0 ;
1735+ hScrollInfo . visible = that . scrollWidth > 0 ;
1736+ vScrollInfo . visible = that . scrollHeight > 0 ;
17131737
17141738 if ( ! pointerCaptured || ( ! hScrollInfo . visible && ! vScrollInfo . visible ) ) {
17151739 return ;
17161740 }
17171741
1718- const touchScrollRatio = that . container . touchScrollRatio ;
1742+ const touchScrollRatio = that . container . touchScrollRatio ,
1743+ container = that . container ;
17191744 let vScrollRatio , hScrollRatio ;
17201745
17211746 if ( touchScrollRatio ) {
@@ -1724,15 +1749,15 @@ License: https://htmlelements.com/license/ */ //
17241749 hScrollRatio = - touchScrollRatio ;
17251750 }
17261751 else if ( typeof touchScrollRatio === 'function' ) {
1727- vScrollRatio = touchScrollRatio ( vScrollInfo . max , vScrollInfo . scrollBar . offsetHeight ) ;
1728- hScrollRatio = touchScrollRatio ( hScrollInfo . max , hScrollInfo . scrollBar . offsetWidth ) ;
1752+ vScrollRatio = touchScrollRatio ( vScrollInfo . max , container . offsetHeight ) ;
1753+ hScrollRatio = touchScrollRatio ( hScrollInfo . max , container . offsetWidth ) ;
17291754 }
17301755 }
17311756
1732- vScrollInfo . ratio = vScrollRatio || ( - vScrollInfo . max / vScrollInfo . scrollBar . offsetHeight ) ;
1757+ vScrollInfo . ratio = vScrollRatio || ( - vScrollInfo . max / container . offsetHeight ) ;
17331758 vScrollInfo . delta = ( event . clientY - vScrollInfo . pointerPosition ) * vScrollInfo . ratio ;
17341759
1735- hScrollInfo . ratio = hScrollRatio || ( - hScrollInfo . max / hScrollInfo . scrollBar . offsetWidth ) ;
1760+ hScrollInfo . ratio = hScrollRatio || ( - hScrollInfo . max / container . offsetWidth ) ;
17361761 hScrollInfo . delta = ( event . clientX - hScrollInfo . pointerPosition ) * hScrollInfo . ratio ;
17371762
17381763 let dragged = 'value' ;
@@ -3937,9 +3962,9 @@ License: https://htmlelements.com/license/ */ //
39373962 console . log ( '****************************************************************************************************************' ) ;
39383963 console . log ( '****************************************************************************************************************' ) ;
39393964 console . log ( '****************************************************************************************************************' ) ;
3940- console . log ( '*Smart HTML Elements License Key Not Found.' ) ;
3941- console . log ( '*This is an evaluation only version , it is not licensed for development projects intended for production .' ) ;
3942- console . log ( '*if you want to hide the watermark , please send an email to: sales@htmlelements .com for a license.' ) ;
3965+ console . log ( '*jQWidgets License Key Not Found.' ) ;
3966+ console . log ( '*This is an EVALUATION only Version , it is NOT Licensed for software projects intended for PRODUCTION .' ) ;
3967+ console . log ( '*if you want to hide this message , please send an email to: sales@jqwidgets .com for a license.' ) ;
39433968 console . log ( '****************************************************************************************************************' ) ;
39443969 console . log ( '****************************************************************************************************************' ) ;
39453970 console . log ( '****************************************************************************************************************' ) ;
@@ -4689,8 +4714,8 @@ License: https://htmlelements.com/license/ */ //
46894714 }
46904715
46914716 if ( data && data [ that . _selector ] ) {
4692- delete data [ that . _selector ] ;
4693- }
4717+ delete data [ that . _selector ] ;
4718+ }
46944719 }
46954720
46964721 /** Called when a property value is changed. */
@@ -5083,6 +5108,10 @@ License: https://htmlelements.com/license/ */ //
50835108 else {
50845109 const modules = proto . modules ;
50855110
5111+ if ( ! modules ) {
5112+ return ;
5113+ }
5114+
50865115 for ( let i = 0 ; i < modules . length ; i += 1 ) {
50875116 const module = modules [ i ] ;
50885117 const proto = module . prototype ;
@@ -7715,6 +7744,7 @@ License: https://htmlelements.com/license/ */ //
77157744 RenderMode : userDefinedSettings . RenderMode || 'auto' ,
77167745 Render : render ,
77177746 Data : data ,
7747+ Mode : userDefinedSettings . Mode || 'production' ,
77187748 License : 'Evaluation'
77197749 } ) ;
77207750
@@ -7986,11 +8016,11 @@ License: https://htmlelements.com/license/ */ //
79868016 return ;
79878017 }
79888018
7989- const computedVerticalScrollBarVisibility = that . computedVerticalScrollBarVisibility ,
8019+ const computedVerticalScrollBarVisibility = that . scrollHeight > 0 ,
8020+ computedHorizontalScrollBarVisibility = that . scrollWidth > 0 ,
79908021 coords = that . _touchCoords ;
79918022
7992- if ( ! that . computedHorizontalScrollBarVisibility && ! computedVerticalScrollBarVisibility ||
7993- ! coords ) {
8023+ if ( ! computedVerticalScrollBarVisibility && ! computedHorizontalScrollBarVisibility || ! coords ) {
79948024 return ;
79958025 }
79968026
0 commit comments