amotify 0.0.59 → 0.0.62

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 (79) hide show
  1. package/@types/_.tsx +5 -5
  2. package/@types/amot.tsx +11 -11
  3. package/@types/fn.tsx +14 -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 +28 -44
  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 +94 -71
  55. package/src/functions/Layout/RootViewController/style.module.scss +0 -1
  56. package/src/functions/Layout/SwipeView/parts.tsx +90 -90
  57. package/src/functions/Layout/TabBar.tsx +10 -10
  58. package/src/functions/Layout/_.tsx +7 -7
  59. package/src/functions/Loader/corner.tsx +10 -10
  60. package/src/functions/Loader/mini.tsx +25 -25
  61. package/src/functions/Loader/parts.tsx +31 -31
  62. package/src/functions/Loader/top.tsx +10 -10
  63. package/src/functions/Sheet/parts.tsx +219 -219
  64. package/src/functions/Sheet/style.module.scss +0 -20
  65. package/src/functions/SnackBar/parts.tsx +50 -50
  66. package/src/functions/Table/Data/parts.tsx +202 -202
  67. package/src/functions/Table/Drag/parts.tsx +76 -76
  68. package/src/functions/Table/Normal/parts.tsx +23 -23
  69. package/src/functions/Table/_.tsx +33 -33
  70. package/src/functions/Tooltips/parts.tsx +7 -7
  71. package/src/global/LaunchReactApplication.tsx +28 -28
  72. package/src/global/styleConverter.tsx +133 -133
  73. package/src/launch.tsx +27 -27
  74. package/src/molecules/Accordion/parts.tsx +41 -41
  75. package/src/molecules/LinkifyText/parts.tsx +18 -18
  76. package/src/molecules/List.tsx +6 -6
  77. package/src/preload.tsx +5 -45
  78. package/src/templates/PlayGround/parts.tsx +8 -8
  79. package/webpack.config.js +9 -9
@@ -1,23 +1,23 @@
1
1
  import {
2
2
  React,
3
- } from '@global';
3
+ } from '@global'
4
4
 
5
5
  import {
6
6
  Box
7
- } from '@atoms';
7
+ } from '@atoms'
8
8
  import {
9
9
  BoxWrapper,
10
10
  SubmitForm,
11
11
  ValidationCheck,
12
12
  CommonEffects
13
- } from '../core';
13
+ } from '../core'
14
14
  import {
15
15
  Buttons
16
- } from '@fn';
16
+ } from '@fn'
17
17
 
18
18
 
19
- import style from './style.module.scss';
20
- import coreStyle from '../style.module.scss';
19
+ import style from './style.module.scss'
20
+ import coreStyle from '../style.module.scss'
21
21
 
22
22
  function DefaultValidation( props: {
23
23
  value: any
@@ -26,16 +26,16 @@ function DefaultValidation( props: {
26
26
  let {
27
27
  value,
28
28
  params
29
- } = props;
29
+ } = props
30
30
  let {
31
31
  required,
32
32
  options
33
- } = params as amotify.fn.Input.Select.PlainParams;
34
- let notice: amotify.fn.Input.Validation.NoticeTypes[] = [];
33
+ } = params as amotify.fn.Input.Select.PlainParams
34
+ let notice: amotify.fn.Input.Validation.NoticeTypes[] = []
35
35
 
36
36
  if ( required ) {
37
37
  if ( !options.length || ( options.length && $.is.nullish( JSON.parse( value ) ) ) ) {
38
- notice.push( { type: 'invalid',label: '必須項目です' } );
38
+ notice.push( { type: 'invalid',label: '必須項目です' } )
39
39
  }
40
40
  }
41
41
 
@@ -50,30 +50,30 @@ export const SelectInput: React.FC<amotify.fn.Input.Select.PlainParams> = ( para
50
50
  value = null,
51
51
  placeholder,
52
52
  options = []
53
- } = params;
53
+ } = params
54
54
 
55
- let SelectedExist = 0;
56
- let SelectedValue = JSON.stringify( value );
55
+ let SelectedExist = 0
56
+ let SelectedValue = JSON.stringify( value )
57
57
  let DefaultOptions = options.map( ( option ) => {
58
- let { value,label } = option;
59
- let Value = JSON.stringify( value );
60
- let Selected = Value == SelectedValue;
61
- SelectedExist |= Number( Selected );
58
+ let { value,label } = option
59
+ let Value = JSON.stringify( value )
60
+ let Selected = Value == SelectedValue
61
+ SelectedExist |= Number( Selected )
62
62
 
63
63
  return {
64
64
  ...option,
65
65
  value: Value,
66
66
  label
67
67
  }
68
- } );
69
- if ( !SelectedExist ) value = null;
70
- let DefaultValue = JSON.stringify( value );
68
+ } )
69
+ if ( !SelectedExist ) value = null
70
+ let DefaultValue = JSON.stringify( value )
71
71
 
72
72
  return <Core
73
73
  { ...params }
74
74
  value={ DefaultValue }
75
75
  options={ DefaultOptions }
76
- />;
76
+ />
77
77
  }
78
78
 
79
79
  const Core: React.FC<amotify.fn.Input.Select.PlainParams> = ( params ) => {
@@ -99,7 +99,7 @@ const Core: React.FC<amotify.fn.Input.Select.PlainParams> = ( params ) => {
99
99
  componentID,status_id,
100
100
 
101
101
  ...others
102
- } = params;
102
+ } = params
103
103
 
104
104
  let Default_Status: amotify.fn.Input.Status.Plain = {
105
105
  componentID: params.componentID || '',
@@ -107,11 +107,11 @@ const Core: React.FC<amotify.fn.Input.Select.PlainParams> = ( params ) => {
107
107
  eventType: 'init',
108
108
  eventID: $.uuidGen()
109
109
  }
110
- let [ val_status,set_status ] = React.useState( Default_Status );
110
+ let [ val_status,set_status ] = React.useState( Default_Status )
111
111
  let [ val_validate,set_validate ] = React.useState( {
112
112
  ok: false,
113
113
  notice: []
114
- } as amotify.fn.Input.Validation.Result );
114
+ } as amotify.fn.Input.Validation.Result )
115
115
 
116
116
  CommonEffects( {
117
117
  type: 'select',
@@ -127,12 +127,12 @@ const Core: React.FC<amotify.fn.Input.Select.PlainParams> = ( params ) => {
127
127
  DefaultValidation,
128
128
  onUpdateValue,
129
129
  onUpdateValidValue
130
- } );
130
+ } )
131
131
 
132
- let SelectedElement: ReactElement = <Box fontColor='4.thin' textAlign='left'>{ placeholder || '選択' }</Box>;
132
+ let SelectedElement: ReactElement = <Box fontColor='4.thin' textAlign='left'>{ placeholder || '選択' }</Box>
133
133
  if ( val_status.dataValue ) {
134
- let Selected = options.find( ( option ) => option.value == val_status.dataValue );
135
- if ( Selected ) SelectedElement = Selected.displayLabel ?? Selected.label;
134
+ let Selected = options.find( ( option ) => option.value == val_status.dataValue )
135
+ if ( Selected ) SelectedElement = Selected.displayLabel ?? Selected.label
136
136
  }
137
137
 
138
138
  return <BoxWrapper
@@ -157,23 +157,23 @@ const Core: React.FC<amotify.fn.Input.Select.PlainParams> = ( params ) => {
157
157
  data-value={ val_status.dataValue }
158
158
  value={ val_status.dataValue }
159
159
  onKeyDown={ ( event ) => {
160
- if ( onKeyDown ) onKeyDown( event );
161
- if ( enableFormSubmit ) SubmitForm( event );
160
+ if ( onKeyDown ) onKeyDown( event )
161
+ if ( enableFormSubmit ) SubmitForm( event )
162
162
  } }
163
163
  onChange={ ( event ) => {
164
164
  let {
165
165
  value: rawValue
166
- } = event.target;
166
+ } = event.target
167
167
 
168
- if ( val_validate.ok ) set_validate( { ok: false,notice: [] } );
168
+ if ( val_validate.ok ) set_validate( { ok: false,notice: [] } )
169
169
  set_status( {
170
170
  ...val_status,
171
171
  dataValue: rawValue,
172
172
  eventType: 'update',
173
173
  eventID: $.uuidGen(),
174
- } );
174
+ } )
175
175
 
176
- if ( onChange ) onChange( event );
176
+ if ( onChange ) onChange( event )
177
177
  } }
178
178
  { ...others as any }
179
179
  className={ style.Select }
@@ -181,7 +181,7 @@ const Core: React.FC<amotify.fn.Input.Select.PlainParams> = ( params ) => {
181
181
  <Options params={ params } />
182
182
  </select>
183
183
  </Box>
184
- </BoxWrapper>;
184
+ </BoxWrapper>
185
185
  }
186
186
 
187
187
  const Options: React.FC<{ params: amotify.fn.Input.Select.PlainParams }> = ( props ) => {
@@ -189,30 +189,30 @@ const Options: React.FC<{ params: amotify.fn.Input.Select.PlainParams }> = ( pro
189
189
  options = [],
190
190
  placeholder = '選択してください',
191
191
  enableUnSelected = true
192
- } = props.params;
192
+ } = props.params
193
193
 
194
194
  let Options = options.map( ( option: amotify.fn.Input.Select.OptionProps ) => {
195
195
  let {
196
196
  value,
197
197
  label,
198
- } = option;
199
- let Value = String( value );
198
+ } = option
199
+ let Value = String( value )
200
200
  return <option
201
201
  value={ Value }
202
202
  key={ Value }
203
203
  children={ label }
204
- />;
205
- } );
204
+ />
205
+ } )
206
206
 
207
207
  if ( enableUnSelected ) {
208
208
  Options.unshift( <option
209
209
  key={ 0 }
210
210
  value={ JSON.stringify( null ) }
211
211
  children={ placeholder }
212
- /> );
212
+ /> )
213
213
  }
214
214
 
215
215
  return <>
216
216
  { Options }
217
- </>;
217
+ </>
218
218
  }
@@ -1,33 +1,33 @@
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
  import {
10
10
  Input,
11
11
  Buttons
12
- } from '@fn';
12
+ } from '@fn'
13
13
 
14
14
  import {
15
15
  BoxWrapper,
16
16
  SubmitForm,
17
17
  CommonEffects
18
- } from '../core';
19
- import style from './style.module.scss';
18
+ } from '../core'
19
+ import style from './style.module.scss'
20
20
 
21
21
  function DefaultValidation( props: {
22
22
  value: any
23
23
  params: any
24
24
  } ): amotify.fn.Input.Validation.Result {
25
- let { value,params } = props;
26
- let { required } = params as amotify.fn.Input.TextArea.PlainParams;
27
- let notice: amotify.fn.Input.Validation.NoticeTypes[] = [];
25
+ let { value,params } = props
26
+ let { required } = params as amotify.fn.Input.TextArea.PlainParams
27
+ let notice: amotify.fn.Input.Validation.NoticeTypes[] = []
28
28
 
29
29
  if ( required && !value ) {
30
- notice.push( { type: 'invalid',label: '必須項目です' } );
30
+ notice.push( { type: 'invalid',label: '必須項目です' } )
31
31
  }
32
32
 
33
33
  return {
@@ -47,22 +47,22 @@ const DataLeveling: {
47
47
  val_status: amotify.fn.Input.Status.Slider
48
48
  } ): DataLevelingResult
49
49
  } = ( props ) => {
50
- let { value,val_status } = props;
51
- let { min,max,step } = val_status;
50
+ let { value,val_status } = props
51
+ let { min,max,step } = val_status
52
52
 
53
- value = Math.max( value,min );
54
- value = Math.min( value,max );
53
+ value = Math.max( value,min )
54
+ value = Math.min( value,max )
55
55
 
56
- let rawValue = value / max;
57
- let stepValue = rawValue * max;
56
+ let rawValue = value / max
57
+ let stepValue = rawValue * max
58
58
 
59
- stepValue = Math.round( stepValue / step );
59
+ stepValue = Math.round( stepValue / step )
60
60
 
61
61
  return {
62
62
  stepValue: stepValue * step,
63
63
  stepIndex: stepValue,
64
64
  positionLeft: stepValue * step / max * 100 + '%'
65
- };
65
+ }
66
66
  }
67
67
 
68
68
  export const SliderInput: React.FC<amotify.fn.Input.Slider.PlainParams> = ( params ) => {
@@ -88,7 +88,7 @@ export const SliderInput: React.FC<amotify.fn.Input.Slider.PlainParams> = ( para
88
88
  className,
89
89
 
90
90
  ...others
91
- } = params;
91
+ } = params
92
92
 
93
93
  let Default_Status: amotify.fn.Input.Status.Slider = {
94
94
  componentID: params.componentID || '',
@@ -97,11 +97,11 @@ export const SliderInput: React.FC<amotify.fn.Input.Slider.PlainParams> = ( para
97
97
  eventType: 'init',
98
98
  eventID: $.uuidGen(),
99
99
  }
100
- let [ val_status,set_status ] = React.useState( Default_Status );
100
+ let [ val_status,set_status ] = React.useState( Default_Status )
101
101
  let [ val_validate,set_validate ] = React.useState( {
102
102
  ok: false,
103
103
  notice: []
104
- } as amotify.fn.Input.Validation.Result );
104
+ } as amotify.fn.Input.Validation.Result )
105
105
 
106
106
  CommonEffects( {
107
107
  params,
@@ -122,15 +122,15 @@ export const SliderInput: React.FC<amotify.fn.Input.Slider.PlainParams> = ( para
122
122
  dataValue: value,
123
123
  eventType: 'update',
124
124
  eventID: $.uuidGen(),
125
- } );
125
+ } )
126
126
  }
127
127
  }
128
- } );
128
+ } )
129
129
 
130
130
  let DotData = DataLeveling( {
131
131
  value: val_status.dataValue,
132
132
  val_status
133
- } );
133
+ } )
134
134
 
135
135
  return <BoxWrapper
136
136
  val_status={ val_status }
@@ -170,7 +170,7 @@ export const SliderInput: React.FC<amotify.fn.Input.Slider.PlainParams> = ( para
170
170
  customLegends={ customLegends }
171
171
  /> : null }
172
172
  </Box>
173
- </BoxWrapper>;
173
+ </BoxWrapper>
174
174
  }
175
175
 
176
176
  const Comps = {
@@ -187,18 +187,18 @@ const Comps = {
187
187
  max,
188
188
  step,
189
189
  customLegends
190
- } = props;
191
- let Labels = [];
190
+ } = props
191
+ let Labels = []
192
192
 
193
- let minStep = Math.round( min / step );
194
- let maxStep = Math.round( max / step );
195
- let steps = maxStep - minStep + 1;
193
+ let minStep = Math.round( min / step )
194
+ let maxStep = Math.round( max / step )
195
+ let steps = maxStep - minStep + 1
196
196
 
197
197
  for ( var index = minStep; index <= maxStep; index++ ) {
198
- let value = index * step;
199
- value = Math.max( value,min );
200
- value = Math.min( value,max );
201
- let left = ( value / max * 100 ) + '%';
198
+ let value = index * step
199
+ value = Math.max( value,min )
200
+ value = Math.min( value,max )
201
+ let left = ( value / max * 100 ) + '%'
202
202
  Labels.push( <Box
203
203
  key={ value }
204
204
  className={ style.Label }
@@ -218,23 +218,23 @@ const Comps = {
218
218
  verticalAlign='center'
219
219
  horizontalAlign='center'
220
220
  children={ customLegends ? customLegends( value ) : value.rank() }
221
- /> );
221
+ /> )
222
222
  }
223
223
 
224
224
  React.useEffect( () => {
225
225
  const LabelLeveling = () => {
226
- let Labels = $( '#Labels-' + componentID );
226
+ let Labels = $( '#Labels-' + componentID )
227
227
  let {
228
228
  width
229
- } = Labels.position();
229
+ } = Labels.position()
230
230
 
231
- let maxLabelCount = Math.round( width / 50 ) - 1;
232
- let labelStep = Math.round( steps / maxLabelCount );
231
+ let maxLabelCount = Math.round( width / 50 ) - 1
232
+ let labelStep = Math.round( steps / maxLabelCount )
233
233
 
234
234
  for ( let index = minStep + 1; index < maxStep; index++ ) {
235
235
  $( '#Legend-' + componentID + '-' + index ).css( {
236
236
  display: index % labelStep == 0 ? 'flex' : 'none'
237
- } );
237
+ } )
238
238
  }
239
239
  }
240
240
 
@@ -242,15 +242,15 @@ const Comps = {
242
242
  eventID: 'SliderResizeCallback-' + componentID,
243
243
  eventType: 'resize',
244
244
  callback: () => {
245
- LabelLeveling();
245
+ LabelLeveling()
246
246
  }
247
- } );
248
- LabelLeveling();
247
+ } )
248
+ LabelLeveling()
249
249
 
250
250
  return () => {
251
- $( window ).removeEvent( 'SliderResizeCallback-' + componentID );
251
+ $( window ).removeEvent( 'SliderResizeCallback-' + componentID )
252
252
  }
253
- },[] );
253
+ },[] )
254
254
 
255
255
  return <Flex
256
256
  className={ style.Labels }
@@ -269,7 +269,7 @@ const Comps = {
269
269
  bottom={ 0 }
270
270
  children={ Labels }
271
271
  />
272
- </Flex>;
272
+ </Flex>
273
273
  },
274
274
  Rail: ( props: {
275
275
  color: amotify.fn.Input.Slider.ColorTypes
@@ -285,10 +285,10 @@ const Comps = {
285
285
  DotData,
286
286
  form,
287
287
  enableFormSubmit
288
- } = props;
288
+ } = props
289
289
  let {
290
290
  componentID
291
- } = val_status;
291
+ } = val_status
292
292
 
293
293
  return <Flex
294
294
  className={ style.Rail }
@@ -302,20 +302,20 @@ const Comps = {
302
302
  cursor: 'pointer'
303
303
  } }
304
304
  onMouseDown={ ( event ) => {
305
- event.stopPropagation();
305
+ event.stopPropagation()
306
306
  EffectStart( event,{
307
307
  val_status,
308
308
  set_status,
309
309
  DotData
310
- } );
310
+ } )
311
311
  } }
312
312
  onTouchStart={ ( event ) => {
313
- event.stopPropagation();
313
+ event.stopPropagation()
314
314
  EffectStart( event,{
315
315
  val_status,
316
316
  set_status,
317
317
  DotData
318
- } );
318
+ } )
319
319
  } }
320
320
  >
321
321
  <Box
@@ -373,13 +373,13 @@ const Comps = {
373
373
  val_status,
374
374
  set_status,
375
375
  DotData
376
- } );
376
+ } )
377
377
 
378
- if ( enableFormSubmit ) SubmitForm( event );
378
+ if ( enableFormSubmit ) SubmitForm( event )
379
379
  } }
380
380
  />
381
381
  </Box>
382
- </Flex>;
382
+ </Flex>
383
383
  }
384
384
  }
385
385
 
@@ -392,69 +392,69 @@ const EffectStart = ( event: any,info: {
392
392
  .addEvent( {
393
393
  eventID: 'SliderMouseMove',
394
394
  eventType: 'mousemove',
395
- callback: ( event ) => { EffectMove( event,info ); },
395
+ callback: ( event ) => { EffectMove( event,info ) },
396
396
  option: { passive: false }
397
397
  } )
398
398
  .addEvent( {
399
399
  eventID: 'SliderTouchMove',
400
400
  eventType: 'touchmove',
401
- callback: ( event ) => { EffectMove( event,info ); },
401
+ callback: ( event ) => { EffectMove( event,info ) },
402
402
  option: { passive: false }
403
403
  } )
404
404
  .addEvent( {
405
405
  eventID: 'SliderMouseUp',
406
406
  eventType: 'mouseup',
407
- callback: () => { EffectEnd(); }
407
+ callback: () => { EffectEnd() }
408
408
  } )
409
409
  .addEvent( {
410
410
  eventID: 'SliderTouchEnd',
411
411
  eventType: 'touchend',
412
- callback: () => { EffectEnd(); }
412
+ callback: () => { EffectEnd() }
413
413
  } )
414
414
  }
415
415
  const EffectMove = ( event: any,info: {
416
416
  val_status: amotify.fn.Input.Status.Slider
417
417
  set_status: React.Dispatch<React.SetStateAction<amotify.fn.Input.Status.Slider>>
418
418
  } ) => {
419
- let mouseX = $.getCursor( event ).x;
419
+ let mouseX = $.getCursor( event ).x
420
420
  let {
421
421
  val_status,
422
422
  set_status,
423
- } = info;
423
+ } = info
424
424
  let {
425
425
  componentID,
426
426
  min,max
427
- } = val_status;
427
+ } = val_status
428
428
 
429
- let Ball = $( '#' + componentID + '_Ball' );
430
- let Bar = $( '#' + componentID + '_Bar' );
431
- let BarColor = $( '#' + componentID + '_BarColor' );
429
+ let Ball = $( '#' + componentID + '_Ball' )
430
+ let Bar = $( '#' + componentID + '_Bar' )
431
+ let BarColor = $( '#' + componentID + '_BarColor' )
432
432
 
433
- let { width: barWidth,left: barLeft } = Bar.position();
433
+ let { width: barWidth,left: barLeft } = Bar.position()
434
434
 
435
- let Left = ( mouseX - barLeft ) / barWidth;
436
- Left = Math.max( Left,0 );
437
- Left = Math.min( Left,1 );
435
+ let Left = ( mouseX - barLeft ) / barWidth
436
+ Left = Math.max( Left,0 )
437
+ Left = Math.min( Left,1 )
438
438
 
439
- let LeftRawValue = Left * max;
439
+ let LeftRawValue = Left * max
440
440
  let resultValues = DataLeveling( {
441
441
  value: LeftRawValue,
442
442
  val_status
443
- } );
444
- let left = resultValues.positionLeft;
445
- let stepValue = resultValues.stepValue;
443
+ } )
444
+ let left = resultValues.positionLeft
445
+ let stepValue = resultValues.stepValue
446
446
 
447
- Ball.css( { left: left } );
448
- BarColor.css( { width: left } );
447
+ Ball.css( { left: left } )
448
+ BarColor.css( { width: left } )
449
449
 
450
- let { prevValue } = useStore.get( componentID );
450
+ let { prevValue } = useStore.get( componentID )
451
451
  if ( stepValue != prevValue ) {
452
452
  useStore.update( {
453
453
  key: componentID,
454
454
  value: {
455
455
  prevValue: stepValue
456
456
  }
457
- } );
457
+ } )
458
458
  set_status( {
459
459
  ...val_status,
460
460
  dataValue: stepValue,
@@ -462,9 +462,9 @@ const EffectMove = ( event: any,info: {
462
462
  eventID: $.uuidGen(),
463
463
  } )
464
464
  }
465
- event.preventDefault();
466
- event.stopPropagation();
467
- return false;
465
+ event.preventDefault()
466
+ event.stopPropagation()
467
+ return false
468
468
  }
469
469
  const EffectEnd = () => {
470
470
  $( document ).removeEvent( [ 'SliderMouseMove','SliderTouchMove','SliderMouseUp','SliderTouchEnd' ] )
@@ -482,35 +482,35 @@ const KeyDownEvent = (
482
482
  event,
483
483
  val_status,
484
484
  set_status
485
- } = props;
486
- let { min,max,step } = val_status;
487
- let { key,metaKey,ctrlKey } = event;
488
- let auxKey = ctrlKey || metaKey;
485
+ } = props
486
+ let { min,max,step } = val_status
487
+ let { key,metaKey,ctrlKey } = event
488
+ let auxKey = ctrlKey || metaKey
489
489
 
490
- let nextValue = val_status.dataValue;
491
- if ( !key.match( /Arrow/ ) ) return;
490
+ let nextValue = val_status.dataValue
491
+ if ( !key.match( /Arrow/ ) ) return
492
492
 
493
- event.preventDefault();
493
+ event.preventDefault()
494
494
  if ( key.match( /Left|Up/ ) ) {
495
- if ( auxKey ) nextValue = min;
496
- else nextValue -= step;
495
+ if ( auxKey ) nextValue = min
496
+ else nextValue -= step
497
497
  } else if ( key.match( /Right|Down/ ) ) {
498
- if ( auxKey ) nextValue = max;
499
- else nextValue += step;
498
+ if ( auxKey ) nextValue = max
499
+ else nextValue += step
500
500
  }
501
- nextValue = Math.max( Math.min( nextValue,max ),min );
501
+ nextValue = Math.max( Math.min( nextValue,max ),min )
502
502
 
503
503
  useStore.update( {
504
504
  key: val_status.componentID,
505
505
  value: {
506
506
  prevValue: nextValue
507
507
  }
508
- } );
508
+ } )
509
509
 
510
510
  set_status( {
511
511
  ...val_status,
512
512
  dataValue: nextValue,
513
513
  eventType: 'update',
514
514
  eventID: $.uuidGen(),
515
- } );
515
+ } )
516
516
  }