amotify 0.0.59 → 0.0.60

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 (78) hide show
  1. package/@types/_.tsx +5 -5
  2. package/@types/amot.tsx +11 -11
  3. package/@types/fn.tsx +1 -1
  4. package/@types/module.tsx +1 -1
  5. package/dist/amotify.js +1 -1
  6. package/dist/amotify.min.css +3 -3
  7. package/package.json +1 -1
  8. package/src/@atoms.tsx +3 -3
  9. package/src/@functions.tsx +11 -11
  10. package/src/@global.tsx +40 -40
  11. package/src/@jsminAmotifyExtension/_.tsx +4 -4
  12. package/src/@jsminAmotifyExtension/fetch.tsx +30 -30
  13. package/src/@jsminAmotifyExtension/formCollect.tsx +32 -32
  14. package/src/@jsminAmotifyExtension/spreadSheet.tsx +71 -71
  15. package/src/@jsminAmotifyExtension/variables.tsx +38 -38
  16. package/src/@molecules.tsx +6 -6
  17. package/src/@styles/props.scss +1 -1
  18. package/src/@styles/var.scss +0 -1
  19. package/src/@templates.tsx +1 -1
  20. package/src/@variables.tsx +2 -2
  21. package/src/atoms/FAI/parts.tsx +105 -105
  22. package/src/atoms/Logo/parts.tsx +19 -19
  23. package/src/atoms/Various/parts.tsx +26 -26
  24. package/src/config.tsx +62 -59
  25. package/src/functions/Button/_.tsx +49 -49
  26. package/src/functions/Cropper/parts.tsx +249 -249
  27. package/src/functions/Effects/Fade.tsx +18 -18
  28. package/src/functions/Effects/Ripple.tsx +24 -24
  29. package/src/functions/Effects/_.tsx +5 -5
  30. package/src/functions/Input/Chips/Selector.tsx +107 -107
  31. package/src/functions/Input/Chips/_.tsx +66 -66
  32. package/src/functions/Input/Contenteditable.tsx +18 -18
  33. package/src/functions/Input/DigitCharacters.tsx +48 -48
  34. package/src/functions/Input/File/_.tsx +114 -114
  35. package/src/functions/Input/Hidden.tsx +3 -3
  36. package/src/functions/Input/List/_.tsx +61 -61
  37. package/src/functions/Input/RichSelect/_.tsx +38 -38
  38. package/src/functions/Input/Segmented/_.tsx +30 -30
  39. package/src/functions/Input/Select/_.tsx +42 -42
  40. package/src/functions/Input/Slider/_.tsx +93 -93
  41. package/src/functions/Input/Switch/_.tsx +21 -21
  42. package/src/functions/Input/Text.tsx +99 -97
  43. package/src/functions/Input/TextArea.tsx +17 -17
  44. package/src/functions/Input/Time/Picker.tsx +199 -199
  45. package/src/functions/Input/Time/_.tsx +173 -173
  46. package/src/functions/Input/_.tsx +135 -135
  47. package/src/functions/Input/core.tsx +96 -96
  48. package/src/functions/Inputs/_.tsx +1 -1
  49. package/src/functions/Inputs/text.tsx +5 -5
  50. package/src/functions/Layout/PageNotFound.tsx +6 -6
  51. package/src/functions/Layout/PageRouter.tsx +34 -34
  52. package/src/functions/Layout/PageViewController/parts.tsx +7 -7
  53. package/src/functions/Layout/Plate.tsx +5 -5
  54. package/src/functions/Layout/RootViewController/parts.tsx +53 -53
  55. package/src/functions/Layout/SwipeView/parts.tsx +90 -90
  56. package/src/functions/Layout/TabBar.tsx +10 -10
  57. package/src/functions/Layout/_.tsx +7 -7
  58. package/src/functions/Loader/corner.tsx +10 -10
  59. package/src/functions/Loader/mini.tsx +25 -25
  60. package/src/functions/Loader/parts.tsx +31 -31
  61. package/src/functions/Loader/top.tsx +10 -10
  62. package/src/functions/Sheet/parts.tsx +219 -219
  63. package/src/functions/Sheet/style.module.scss +0 -20
  64. package/src/functions/SnackBar/parts.tsx +50 -50
  65. package/src/functions/Table/Data/parts.tsx +202 -202
  66. package/src/functions/Table/Drag/parts.tsx +76 -76
  67. package/src/functions/Table/Normal/parts.tsx +23 -23
  68. package/src/functions/Table/_.tsx +33 -33
  69. package/src/functions/Tooltips/parts.tsx +7 -7
  70. package/src/global/LaunchReactApplication.tsx +28 -28
  71. package/src/global/styleConverter.tsx +133 -133
  72. package/src/launch.tsx +27 -27
  73. package/src/molecules/Accordion/parts.tsx +41 -41
  74. package/src/molecules/LinkifyText/parts.tsx +18 -18
  75. package/src/molecules/List.tsx +6 -6
  76. package/src/preload.tsx +5 -45
  77. package/src/templates/PlayGround/parts.tsx +8 -8
  78. package/webpack.config.js +9 -9
@@ -1,13 +1,13 @@
1
- import React from 'react';
1
+ import React from 'react'
2
2
  import {
3
3
  Box
4
- } from '@atoms';
4
+ } from '@atoms'
5
5
 
6
6
  export const Plate: React.FC<amotify.fn.Layout.Plate.Params> = ( props ) => {
7
7
  let {
8
8
  size = 'R',
9
9
  ...others
10
- } = props;
10
+ } = props
11
11
 
12
12
  let Size = {
13
13
  'XS': 48,
@@ -16,7 +16,7 @@ export const Plate: React.FC<amotify.fn.Layout.Plate.Params> = ( props ) => {
16
16
  'L': 84,
17
17
  'XL': 100,
18
18
  'MAX': 120,
19
- }[ size ];
19
+ }[ size ]
20
20
 
21
21
  return <Box
22
22
  margin={ [ 0,'auto' ] }
@@ -26,5 +26,5 @@ export const Plate: React.FC<amotify.fn.Layout.Plate.Params> = ( props ) => {
26
26
  maxWidth: 12 * Size,
27
27
  ...others.freeCSS
28
28
  } }
29
- />;
29
+ />
30
30
  }
@@ -2,19 +2,19 @@ import {
2
2
  React,
3
3
  useRecycle,
4
4
  pageTransit
5
- } from '@global';
5
+ } from '@global'
6
6
  import {
7
7
  Box,
8
8
  Flex,
9
- } from '@atoms';
9
+ } from '@atoms'
10
10
  import {
11
11
  Column
12
- } from '@mols';
12
+ } from '@mols'
13
13
  import {
14
14
  Buttons
15
- } from '@fn';
15
+ } from '@fn'
16
16
 
17
- import style from './style.module.scss';
17
+ import style from './style.module.scss'
18
18
 
19
19
  export const RootViewController: amotify.fn.Layout.RootViewController.Methods = {
20
20
  Base: ( params ) => {
@@ -25,32 +25,32 @@ export const RootViewController: amotify.fn.Layout.RootViewController.Methods =
25
25
  children,
26
26
  className,
27
27
  ...others
28
- } = params;
29
- let Key = useRecycle.set( 'RootViewController' );
28
+ } = params
29
+ let Key = useRecycle.set( 'RootViewController' )
30
30
 
31
31
  React.useEffect( () => {
32
- calcHeights();
32
+ calcHeights()
33
33
  setTimeout( () => {
34
- calcHeights();
35
- },100 );
34
+ calcHeights()
35
+ },100 )
36
36
 
37
- let getSideNavigationHeight = 'ResizeCB';
38
- let beforeunload = 'RemovePageEventCB';
37
+ let getSideNavigationHeight = 'ResizeCB'
38
+ let beforeunload = 'RemovePageEventCB'
39
39
 
40
40
  $( window ).addEvent( {
41
41
  eventType: 'resize',
42
42
  eventID: getSideNavigationHeight,
43
43
  callback: () => {
44
- if ( !amotify.config.device.isPhonepoint() ) calcHeights();
44
+ if ( !amotify.config.device.isPhonepoint() ) calcHeights()
45
45
  }
46
46
  } )
47
47
  return () => {
48
- $( window ).removeEvent( beforeunload );
49
- $( window ).removeEvent( getSideNavigationHeight );
48
+ $( window ).removeEvent( beforeunload )
49
+ $( window ).removeEvent( getSideNavigationHeight )
50
50
  }
51
- },[] );
51
+ },[] )
52
52
 
53
- let Chilren: ReactElement = children;
53
+ let Chilren: ReactElement = children
54
54
 
55
55
  return <Column
56
56
  key={ Key }
@@ -84,30 +84,30 @@ export const RootViewController: amotify.fn.Layout.RootViewController.Methods =
84
84
  </Box>
85
85
  </Flex>
86
86
  { footerNavigation }
87
- </Column>;
87
+ </Column>
88
88
  },
89
89
  TopNavigation: ( params ) => {
90
90
  let {
91
91
  className,
92
92
  children,
93
93
  ...others
94
- } = params;
94
+ } = params
95
95
 
96
- let [ val_componentID ] = React.useState( $.uuidGen() );
96
+ let [ val_componentID ] = React.useState( $.uuidGen() )
97
97
 
98
98
  React.useEffect( () => {
99
- let { height } = $( `[data-id="${ val_componentID }"]` ).position();
100
- height = height | 0;
101
- let topBase = height;
99
+ let { height } = $( `[data-id="${ val_componentID }"]` ).position()
100
+ height = height | 0
101
+ let topBase = height
102
102
 
103
103
  if ( $( '#TopNavigation' ).getStyleProperty( 'position' ) != 'sticky' ) {
104
- topBase = 0;
104
+ topBase = 0
105
105
  }
106
106
 
107
107
  $( document.body )
108
108
  .setStyleProperty( '--topNavHeight',height + 'px' )
109
- .setStyleProperty( '--topBase',topBase + 'px' );
110
- },[] );
109
+ .setStyleProperty( '--topBase',topBase + 'px' )
110
+ },[] )
111
111
 
112
112
  return <Flex
113
113
  key={ val_componentID }
@@ -125,14 +125,14 @@ export const RootViewController: amotify.fn.Layout.RootViewController.Methods =
125
125
  ].join( ' ' ) }
126
126
  >
127
127
  { children }
128
- </Flex>;
128
+ </Flex>
129
129
  },
130
130
  SideNavigation: ( params ) => {
131
131
  let {
132
132
  className = '',
133
133
  baseStyles,
134
134
  ...others
135
- } = params;
135
+ } = params
136
136
 
137
137
  return <Box
138
138
  flexSizing={ 'none' }
@@ -142,21 +142,21 @@ export const RootViewController: amotify.fn.Layout.RootViewController.Methods =
142
142
  ].join( ' ' ) }
143
143
  minHeight='sideNavigationHeight'
144
144
  { ...others }
145
- />;
145
+ />
146
146
  },
147
147
  FooterNavigation: ( params ) => {
148
148
  let {
149
149
  className = '',
150
150
  baseStyles,
151
151
  ...others
152
- } = params;
153
- let [ val_componentID ] = React.useState( $.uuidGen() );
152
+ } = params
153
+ let [ val_componentID ] = React.useState( $.uuidGen() )
154
154
 
155
155
  React.useEffect( () => {
156
- let { height } = $( `[data-id="${ val_componentID }"]` ).position();
157
- height = height | 0;
158
- $( document.body ).setStyleProperty( '--footerNavHeight',height + 'px' );
159
- },[] );
156
+ let { height } = $( `[data-id="${ val_componentID }"]` ).position()
157
+ height = height | 0
158
+ $( document.body ).setStyleProperty( '--footerNavHeight',height + 'px' )
159
+ },[] )
160
160
 
161
161
  return <Flex
162
162
  data-id={ val_componentID }
@@ -185,7 +185,7 @@ export const RootViewController: amotify.fn.Layout.RootViewController.Methods =
185
185
  margin={ 'auto' }
186
186
  { ...others }
187
187
  />
188
- </Flex>;
188
+ </Flex>
189
189
  },
190
190
  Comps: {
191
191
  Button: ( params ) => {
@@ -195,31 +195,31 @@ export const RootViewController: amotify.fn.Layout.RootViewController.Methods =
195
195
  uriGroup,
196
196
  activeClassName = '',
197
197
  ...others
198
- } = params;
198
+ } = params
199
199
 
200
- let groups = $.flatArray( uriGroup );
200
+ let groups = $.flatArray( uriGroup )
201
201
 
202
- let currentURL = location.pathname;
202
+ let currentURL = location.pathname
203
203
 
204
204
  {
205
- let isCurrentURL = false;
205
+ let isCurrentURL = false
206
206
  if ( $.is.exist( uri ) && $.is.string( uri ) ) {
207
207
  let url = [
208
208
  location.origin,
209
209
  uri.replace( /\//,'' )
210
- ].join( '/' );
211
- isCurrentURL = currentURL == new URL( url ).pathname;
210
+ ].join( '/' )
211
+ isCurrentURL = currentURL == new URL( url ).pathname
212
212
  }
213
213
 
214
214
  if ( !isCurrentURL ) {
215
215
  if ( groups.length ) {
216
216
  for ( let group of groups ) {
217
- if ( $.is.nullish( group ) ) continue;
218
- if ( !!currentURL.match( new RegExp( group ) ) ) isCurrentURL = true;
217
+ if ( $.is.nullish( group ) ) continue
218
+ if ( !!currentURL.match( new RegExp( group ) ) ) isCurrentURL = true
219
219
  }
220
220
  }
221
221
  }
222
- isActive = isActive ?? isCurrentURL;
222
+ isActive = isActive ?? isCurrentURL
223
223
  }
224
224
 
225
225
  return <Buttons.Button.Clear.R
@@ -240,11 +240,11 @@ export const RootViewController: amotify.fn.Layout.RootViewController.Methods =
240
240
  backgroundColor: 'cloud'
241
241
  } }
242
242
  onClick={ ( event ) => {
243
- if ( $.is.exist( uri ) && $.is.string( uri ) ) pageTransit.push( uri,event.ctrlKey || event.metaKey );
243
+ if ( $.is.exist( uri ) && $.is.string( uri ) ) pageTransit.push( uri,event.ctrlKey || event.metaKey )
244
244
  } }
245
245
  color={ 'cloud' }
246
246
  { ...others }
247
- />;
247
+ />
248
248
  },
249
249
  Bar: ( params ) => ( <Box
250
250
  flexSizing={ 'none' }
@@ -264,14 +264,14 @@ export const RootViewController: amotify.fn.Layout.RootViewController.Methods =
264
264
  }
265
265
 
266
266
  const calcHeights = () => {
267
- let Body = $( document.body );
268
- let viewHeight = window.innerHeight;
267
+ let Body = $( document.body )
268
+ let viewHeight = window.innerHeight
269
269
 
270
- let topNavHeight = Number( Body.getStyleProperty( '--topNavHeight' ).removeLetters() );
271
- let footerNavHeight = Number( Body.getStyleProperty( '--footerNavHeight' ).removeLetters() );
272
- let contentHeight = viewHeight - topNavHeight - footerNavHeight;
270
+ let topNavHeight = Number( Body.getStyleProperty( '--topNavHeight' ).removeLetters() )
271
+ let footerNavHeight = Number( Body.getStyleProperty( '--footerNavHeight' ).removeLetters() )
272
+ let contentHeight = viewHeight - topNavHeight - footerNavHeight
273
273
 
274
274
  Body.setStyleProperty( '--viewHeight',viewHeight + 'px' )
275
275
  .setStyleProperty( '--sideNavHeight',contentHeight + 'px' )
276
- .setStyleProperty( '--contentHeight',contentHeight + 'px' );
276
+ .setStyleProperty( '--contentHeight',contentHeight + 'px' )
277
277
  }
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  useStore,
3
3
  React
4
- } from '@global';
4
+ } from '@global'
5
5
  import {
6
6
  Box,
7
7
  Flex
8
- } from '@atoms';
8
+ } from '@atoms'
9
9
 
10
- import style from './style.module.scss';
10
+ import style from './style.module.scss'
11
11
 
12
12
  type SlideEventProps = {
13
13
  eventType: 'usr' | 'sys' | 'init' | 'adjustLoop'
@@ -31,7 +31,7 @@ export const SwipeView = ( params: amotify.fn.Layout.SwipeView.Params ) => {
31
31
  return <Core
32
32
  { ...params }
33
33
  slideIndex={ Math.max( Math.min( params.slideIndex!,params.slides.length - 1 ),0 ) }
34
- />;
34
+ />
35
35
  }
36
36
  export const Core: React.FC<amotify.fn.Layout.SwipeView.Params> = ( params ) => {
37
37
  let {
@@ -46,40 +46,40 @@ export const Core: React.FC<amotify.fn.Layout.SwipeView.Params> = ( params ) =>
46
46
  wrapper = ( slide ) => ( slide ),
47
47
  slides = [],
48
48
  ...others
49
- } = params;
49
+ } = params
50
50
 
51
- let [ val_swipeID ] = React.useState( $.uuidGen() );
51
+ let [ val_swipeID ] = React.useState( $.uuidGen() )
52
52
  let [ val_event,set_event ] = React.useState( {
53
53
  eventType: 'init',
54
54
  index: params.slideIndex
55
- } as SlideEventProps );
55
+ } as SlideEventProps )
56
56
 
57
57
  React.useEffect( () => {
58
58
  useStore.set( {
59
59
  key: 'SwipeTimer-' + val_swipeID,
60
60
  value: null
61
- } );
62
- },[] );
61
+ } )
62
+ },[] )
63
63
 
64
- const mounted = React.useRef( false );
64
+ const mounted = React.useRef( false )
65
65
  React.useEffect( () => {
66
66
  set_event( {
67
67
  eventType: 'usr',
68
68
  index: params.slideIndex!
69
- } );
69
+ } )
70
70
 
71
- if ( !mounted.current ) mounted.current = true;
72
- },[ params.slideIndex ] );
71
+ if ( !mounted.current ) mounted.current = true
72
+ },[ params.slideIndex ] )
73
73
 
74
74
  React.useEffect( () => {
75
- let Index = val_event.index + ( loop ? 1 : 0 );
76
- let CopyIndex = [ -1,slides.length ].includes( val_event.index );
75
+ let Index = val_event.index + ( loop ? 1 : 0 )
76
+ let CopyIndex = [ -1,slides.length ].includes( val_event.index )
77
77
 
78
78
  if ( !CopyIndex ) if ( onSlideCallback ) setTimeout( () => {
79
- onSlideCallback!( val_event.index );
80
- },300 );
79
+ onSlideCallback!( val_event.index )
80
+ },300 )
81
81
 
82
- let Base = $( '#Swiper-' + val_swipeID );
82
+ let Base = $( '#Swiper-' + val_swipeID )
83
83
  if ( val_event.eventType == 'adjustLoop' ) {
84
84
  Base
85
85
  .await( 250 )
@@ -91,7 +91,7 @@ export const Core: React.FC<amotify.fn.Layout.SwipeView.Params> = ( params ) =>
91
91
  .removeClass( style.Display )
92
92
  .parent().children( Index )
93
93
  .addClass( [ style.Display,style.LoopAdjusting ] )
94
- .await( 100 ).removeClass( style.LoopAdjusting );
94
+ .await( 100 ).removeClass( style.LoopAdjusting )
95
95
  } else if ( val_event.eventType == 'sys' ) {
96
96
  Base
97
97
  .await( 250 )
@@ -101,7 +101,7 @@ export const Core: React.FC<amotify.fn.Layout.SwipeView.Params> = ( params ) =>
101
101
  .children()
102
102
  .removeClass( style.Display )
103
103
  .parent().children( Index )
104
- .addClass( style.Display );
104
+ .addClass( style.Display )
105
105
  } else {
106
106
  Base
107
107
  .children()
@@ -113,35 +113,35 @@ export const Core: React.FC<amotify.fn.Layout.SwipeView.Params> = ( params ) =>
113
113
  transition: '0.3s',
114
114
  transform: FNs.TrasformString( Index )
115
115
  } )
116
- .await( 250 ).css( { transition: '0s' } );
116
+ .await( 250 ).css( { transition: '0s' } )
117
117
 
118
118
  if ( CopyIndex ) {
119
- let ajastIndex = val_event.index == -1 ? slides.length - 1 : 0;
119
+ let ajastIndex = val_event.index == -1 ? slides.length - 1 : 0
120
120
  set_event( {
121
121
  eventType: 'adjustLoop',
122
122
  index: ajastIndex
123
- } );
123
+ } )
124
124
  }
125
125
  }
126
126
 
127
127
  if ( autoSwipeSeconds && !CopyIndex ) {
128
- $.interval.clear( 'SwipeTimer-' + val_swipeID );
128
+ $.interval.clear( 'SwipeTimer-' + val_swipeID )
129
129
  $.interval.standBy(
130
130
  'SwipeTimer-' + val_swipeID,
131
131
  autoSwipeSeconds - ( val_event.eventType == 'sys' ? 310 : 0 ),
132
132
  () => {
133
- let newIndex = val_event.index + 1;
133
+ let newIndex = val_event.index + 1
134
134
 
135
- if ( !loop && newIndex > slides.length - 1 ) newIndex = 0;
135
+ if ( !loop && newIndex > slides.length - 1 ) newIndex = 0
136
136
 
137
137
  set_event( {
138
138
  eventType: 'usr',
139
139
  index: newIndex
140
- } );
140
+ } )
141
141
  }
142
- );
142
+ )
143
143
  }
144
- },[ val_event ] );
144
+ },[ val_event ] )
145
145
 
146
146
  let Slides = slides.map( ( slide,index ) => <Box
147
147
  key={ index }
@@ -150,11 +150,11 @@ export const Core: React.FC<amotify.fn.Layout.SwipeView.Params> = ( params ) =>
150
150
  height={ 0 }
151
151
  className={ style.Child }
152
152
  children={ wrapper( slide ) }
153
- /> );
153
+ /> )
154
154
 
155
155
  if ( loop ) {
156
- Slides.push( Slides[ 0 ] );
157
- Slides.unshift( Slides[ Slides.length - 2 ] );
156
+ Slides.push( Slides[ 0 ] )
157
+ Slides.unshift( Slides[ Slides.length - 2 ] )
158
158
  }
159
159
 
160
160
  let info: SliderInfoProps = {
@@ -171,7 +171,7 @@ export const Core: React.FC<amotify.fn.Layout.SwipeView.Params> = ( params ) =>
171
171
  set_event: set_event
172
172
  }
173
173
 
174
- let Index = val_event.index + ( loop ? 1 : 0 );
174
+ let Index = val_event.index + ( loop ? 1 : 0 )
175
175
 
176
176
  return <Box
177
177
  overflow='hidden'
@@ -183,14 +183,14 @@ export const Core: React.FC<amotify.fn.Layout.SwipeView.Params> = ( params ) =>
183
183
  } }
184
184
  data-swipe-id={ val_swipeID }
185
185
  onMouseDown={ ( event ) => {
186
- if ( disableMousedrag ) return;
187
- if ( event.buttons != 1 ) return;
188
- FNs.EffectStart( event,info );
186
+ if ( disableMousedrag ) return
187
+ if ( event.buttons != 1 ) return
188
+ FNs.EffectStart( event,info )
189
189
  } }
190
190
  onTouchStart={ ( event ) => {
191
- if ( disableTouch ) return;
192
- if ( event.touches?.length != 1 ) return;
193
- FNs.EffectStart( event as any,info );
191
+ if ( disableTouch ) return
192
+ if ( event.touches?.length != 1 ) return
193
+ FNs.EffectStart( event as any,info )
194
194
  } }
195
195
  >
196
196
  <Flex
@@ -209,7 +209,7 @@ export const Core: React.FC<amotify.fn.Layout.SwipeView.Params> = ( params ) =>
209
209
  } }
210
210
  children={ Slides }
211
211
  />
212
- </Box>;
212
+ </Box>
213
213
  }
214
214
 
215
215
  const FNs = {
@@ -217,10 +217,10 @@ const FNs = {
217
217
  EffectStart: ( event: React.MouseEvent<HTMLDivElement,MouseEvent>,info: SliderInfoProps ) => {
218
218
  let {
219
219
  x,y
220
- } = $.getCursor( event as any );
221
- let eventTarget = event.currentTarget;
222
- let target = event.target as HTMLElement;
223
- if ( [ 'SELECT','BUTTON','LABEL','INPUT' ].includes( target.tagName ) ) return;
220
+ } = $.getCursor( event as any )
221
+ let eventTarget = event.currentTarget
222
+ let target = event.target as HTMLElement
223
+ if ( [ 'SELECT','BUTTON','LABEL','INPUT' ].includes( target.tagName ) ) return
224
224
 
225
225
  info = {
226
226
  ...info,
@@ -230,119 +230,119 @@ const FNs = {
230
230
  width: $( '#Swiper-' + info.id ).position().width
231
231
  }
232
232
 
233
- let { swipeId } = eventTarget.dataset;
233
+ let { swipeId } = eventTarget.dataset
234
234
  if ( swipeId == info.id ) {
235
235
  $( document )
236
236
  .addEvent( {
237
237
  eventID: 'SwipeMouseMove',eventType: 'mousemove',
238
- callback: ( event ) => { FNs.EffectCheck( event,info ); },
238
+ callback: ( event ) => { FNs.EffectCheck( event,info ) },
239
239
  option: { passive: false }
240
240
  } )
241
241
  .addEvent( {
242
242
  eventID: 'SwipeTouchMove',eventType: 'touchmove',
243
- callback: ( event ) => { FNs.EffectCheck( event,info ); },
243
+ callback: ( event ) => { FNs.EffectCheck( event,info ) },
244
244
  option: { passive: false }
245
245
  } )
246
246
  .addEvent( {
247
247
  eventID: 'SwipeMouseUp',eventType: 'mouseup',
248
- callback: ( event ) => { FNs.EffectEnd( event,info ); },
248
+ callback: ( event ) => { FNs.EffectEnd( event,info ) },
249
249
  option: { passive: false }
250
250
  } )
251
251
  .addEvent( {
252
252
  eventID: 'SwipeTouchEnd',eventType: 'touchend',
253
- callback: ( event ) => { FNs.EffectEnd( event,info ); },
253
+ callback: ( event ) => { FNs.EffectEnd( event,info ) },
254
254
  option: { passive: false }
255
- } );
255
+ } )
256
256
  }
257
257
  },
258
258
  EffectCheck: ( event: any,info: SliderInfoProps ) => {
259
- if ( info.process ) return;
259
+ if ( info.process ) return
260
260
  let {
261
261
  x,y
262
- } = $.getCursor( event );
262
+ } = $.getCursor( event )
263
263
 
264
- let X = Math.abs( x - info.x + window.scrollX );
265
- let Y = Math.abs( y - info.y + window.scrollY );
264
+ let X = Math.abs( x - info.x + window.scrollX )
265
+ let Y = Math.abs( y - info.y + window.scrollY )
266
266
 
267
- if ( event.touches && event.touches.length > 1 ) return;
268
- if ( Y + X < 15 ) return;
267
+ if ( event.touches && event.touches.length > 1 ) return
268
+ if ( Y + X < 15 ) return
269
269
  if ( Y > X / 2 ) {
270
270
  $( document ).removeEvent( [
271
271
  'SwipeMouseMove',
272
272
  'SwipeTouchMove'
273
- ] );
273
+ ] )
274
274
  } else {
275
- info.process = true;
275
+ info.process = true
276
276
 
277
- let Index = info.index + ( info.loop ? 1 : 0 );
278
- $( '#Swiper-' + info.id ).children( Index - 1 ).addClass( style.Display );
279
- $( '#Swiper-' + info.id ).children( Index + 1 ).addClass( style.Display );
277
+ let Index = info.index + ( info.loop ? 1 : 0 )
278
+ $( '#Swiper-' + info.id ).children( Index - 1 ).addClass( style.Display )
279
+ $( '#Swiper-' + info.id ).children( Index + 1 ).addClass( style.Display )
280
280
 
281
281
  $( document )
282
282
  .addEvent( {
283
283
  eventID: 'SwipeCheckMouseMove',eventType: 'mousemove',
284
- callback: ( event ) => { FNs.EffectMove( event,info ); },
284
+ callback: ( event ) => { FNs.EffectMove( event,info ) },
285
285
  option: { passive: false }
286
286
  } )
287
287
  .addEvent( {
288
288
  eventID: 'SwipeCheckTouchMove',eventType: 'touchmove',
289
- callback: ( event ) => { FNs.EffectMove( event,info ); },
289
+ callback: ( event ) => { FNs.EffectMove( event,info ) },
290
290
  option: { passive: false }
291
291
  } )
292
292
 
293
- event.preventDefault();
294
- return;
293
+ event.preventDefault()
294
+ return
295
295
  }
296
296
  },
297
297
  EffectMove: ( event: any,info: SliderInfoProps ) => {
298
- if ( event.touches && event.touches.length > 1 ) return;
298
+ if ( event.touches && event.touches.length > 1 ) return
299
299
 
300
300
  let {
301
301
  x
302
- } = $.getCursor( event );
302
+ } = $.getCursor( event )
303
303
 
304
- let X = x - info.x + window.scrollX;
304
+ let X = x - info.x + window.scrollX
305
305
 
306
- let Index = info.index + ( info.loop ? 1 : 0 );
307
- let rate = Index - X / info.width;
306
+ let Index = info.index + ( info.loop ? 1 : 0 )
307
+ let rate = Index - X / info.width
308
308
 
309
309
  if ( rate < 0 ) {
310
- rate /= 2;
310
+ rate /= 2
311
311
  } else if ( rate > info.maxIndex ) {
312
- let excess = rate - info.maxIndex;
313
- rate = info.maxIndex + excess / 2;
312
+ let excess = rate - info.maxIndex
313
+ rate = info.maxIndex + excess / 2
314
314
  }
315
315
 
316
316
  $( '#Swiper-' + info.id ).css( {
317
317
  transition: '0s',
318
318
  transform: FNs.TrasformString( rate )
319
- } );
319
+ } )
320
320
 
321
- event.preventDefault();
322
- return;
321
+ event.preventDefault()
322
+ return
323
323
  },
324
324
  EffectEnd: ( event: Event,info: SliderInfoProps ) => {
325
325
  if ( info.process ) {
326
- let cursor = $.getCursor( event );
327
- let X = cursor.x - info.x + window.scrollX;
326
+ let cursor = $.getCursor( event )
327
+ let X = cursor.x - info.x + window.scrollX
328
328
 
329
- let current = new Date().getTime();
329
+ let current = new Date().getTime()
330
330
 
331
- let totalTime = current - info.effectStartAt;
331
+ let totalTime = current - info.effectStartAt
332
332
 
333
- let Index = info.index + ( info.loop ? 1 : 0 );
333
+ let Index = info.index + ( info.loop ? 1 : 0 )
334
334
 
335
- let newIndex = 0;
335
+ let newIndex = 0
336
336
  if ( totalTime < 400 ) {
337
- newIndex = Index - ( Number( X > 0 ) * 2 - 1 );
337
+ newIndex = Index - ( Number( X > 0 ) * 2 - 1 )
338
338
  } else {
339
- newIndex = Math.round( Index - X / info.width );
339
+ newIndex = Math.round( Index - X / info.width )
340
340
  }
341
- newIndex = Math.max( Math.min( newIndex,info.maxIndex ),info.minIndex );
341
+ newIndex = Math.max( Math.min( newIndex,info.maxIndex ),info.minIndex )
342
342
 
343
- info.process = false;
343
+ info.process = false
344
344
  if ( Index === newIndex ) {
345
- info.effectStartAt = current;
345
+ info.effectStartAt = current
346
346
 
347
347
  $( '#Swiper-' + info.id )
348
348
  .css( {
@@ -354,12 +354,12 @@ const FNs = {
354
354
  transition: '0s'
355
355
  } )
356
356
  .children().removeClass( style.Display )
357
- .parent().children( Index ).addClass( style.Display );
357
+ .parent().children( Index ).addClass( style.Display )
358
358
  } else {
359
359
  info.set_event( {
360
360
  eventType: 'usr',
361
361
  index: newIndex + info.minIndex
362
- } );
362
+ } )
363
363
  }
364
364
  }
365
365
 
@@ -370,6 +370,6 @@ const FNs = {
370
370
  'SwipeCheckTouchMove',
371
371
  'SwipeMouseUp',
372
372
  'SwipeTouchEnd'
373
- ] );
373
+ ] )
374
374
  }
375
375
  }