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,9 +1,9 @@
1
1
  import {
2
2
  React
3
- } from '@global';
3
+ } from '@global'
4
4
  import {
5
5
  Box
6
- } from '@atoms';
6
+ } from '@atoms'
7
7
 
8
8
  export const FadeEffects: amotify.fn.Effects.Methods = {
9
9
  ...{} as any,
@@ -13,22 +13,22 @@ export const FadeEffects: amotify.fn.Effects.Methods = {
13
13
  animationTime = 300,
14
14
  componentID = $.uuidGen(),
15
15
  ...others
16
- } = params;
17
- let [ val_componentID ] = React.useState( componentID );
16
+ } = params
17
+ let [ val_componentID ] = React.useState( componentID )
18
18
 
19
19
  React.useEffect( () => {
20
20
  setTimeout( () => {
21
- let Element = $( '[data-component-id="' + val_componentID + '"]' );
22
- if ( !Element[ 0 ] ) return;
21
+ let Element = $( '[data-component-id="' + val_componentID + '"]' )
22
+ if ( !Element[ 0 ] ) return
23
23
  Element.css( {
24
24
  transition: animationTime + 'ms'
25
25
  } )
26
26
  .await( 1 )
27
27
  .css( {
28
28
  opacity: 1
29
- } );
30
- },animationDelay );
31
- },[] );
29
+ } )
30
+ },animationDelay )
31
+ },[] )
32
32
 
33
33
  return <Box
34
34
  { ...others }
@@ -37,7 +37,7 @@ export const FadeEffects: amotify.fn.Effects.Methods = {
37
37
  opacity: 0,
38
38
  } }
39
39
  componentID={ val_componentID }
40
- />;
40
+ />
41
41
  },
42
42
  FadeUp: ( params ) => {
43
43
  let {
@@ -45,13 +45,13 @@ export const FadeEffects: amotify.fn.Effects.Methods = {
45
45
  animationTime = 300,
46
46
  componentID = $.uuidGen(),
47
47
  ...others
48
- } = params;
49
- let [ val_componentID ] = React.useState( componentID );
48
+ } = params
49
+ let [ val_componentID ] = React.useState( componentID )
50
50
 
51
51
  React.useEffect( () => {
52
52
  setTimeout( () => {
53
- let Element = $( '[data-component-id="' + val_componentID + '"]' );
54
- if ( !Element[ 0 ] ) return;
53
+ let Element = $( '[data-component-id="' + val_componentID + '"]' )
54
+ if ( !Element[ 0 ] ) return
55
55
  Element.css( {
56
56
  transition: animationTime + 'ms'
57
57
  } )
@@ -59,9 +59,9 @@ export const FadeEffects: amotify.fn.Effects.Methods = {
59
59
  .css( {
60
60
  opacity: 1,
61
61
  paddingTop: 0
62
- } );
63
- },animationDelay );
64
- },[] );
62
+ } )
63
+ },animationDelay )
64
+ },[] )
65
65
 
66
66
  return <Box
67
67
  paddingTop={ 2 }
@@ -71,6 +71,6 @@ export const FadeEffects: amotify.fn.Effects.Methods = {
71
71
  opacity: 0,
72
72
  } }
73
73
  componentID={ val_componentID }
74
- />;
74
+ />
75
75
  }
76
76
  }
@@ -1,4 +1,4 @@
1
- import style from './style.module.scss';
1
+ import style from './style.module.scss'
2
2
 
3
3
  type InfoProps = {
4
4
  RippleElement: Jsmin.Methods
@@ -8,16 +8,16 @@ type InfoProps = {
8
8
 
9
9
  new class {
10
10
  constructor() {
11
- this.UserEvent();
11
+ this.UserEvent()
12
12
  }
13
13
  UserEvent() {
14
- let RippleElementClassName = 'eff_ripple';
14
+ let RippleElementClassName = 'eff_ripple'
15
15
  const EffectStart = ( event: Event ) => {
16
- let startedAt = $.Time().time;
17
- let target: HTMLElement = event.target as any;
16
+ let startedAt = $.Time().time
17
+ let target: HTMLElement = event.target as any
18
18
 
19
- let RippleElement = $( target.closest( '.' + RippleElementClassName ) );
20
- let Color = RippleElement.findClass( /^eff_ripple-/ )[ 0 ].split( '-' )[ 1 ];
19
+ let RippleElement = $( target.closest( '.' + RippleElementClassName ) )
20
+ let Color = RippleElement.findClass( /^eff_ripple-/ )[ 0 ].split( '-' )[ 1 ]
21
21
 
22
22
  let
23
23
  ID = 'RippleWrap-' + $.uuidGen(),
@@ -37,7 +37,7 @@ new class {
37
37
  } = $.getCursor( event ),
38
38
  size = Math.min( width * 1.5,300 ),
39
39
  x = Math.max( cursorX - ( left + pageXOffset ),0 ),
40
- y = Math.max( cursorY - ( top + pageYOffset ),0 );
40
+ y = Math.max( cursorY - ( top + pageYOffset ),0 )
41
41
 
42
42
  let effectInfo: InfoProps = {
43
43
  RippleElement,
@@ -49,15 +49,15 @@ new class {
49
49
  eventID: 'RippleMouseUp',
50
50
  eventType: 'mouseup',
51
51
  callback: () => {
52
- EffectEnd( effectInfo );
52
+ EffectEnd( effectInfo )
53
53
  }
54
54
  } ).addEvent( {
55
55
  eventID: 'RippleTouchEnd',
56
56
  eventType: 'touchend',
57
57
  callback: () => {
58
58
  setTimeout( () => {
59
- EffectEnd( effectInfo );
60
- },20 );
59
+ EffectEnd( effectInfo )
60
+ },20 )
61
61
  }
62
62
  } )
63
63
 
@@ -73,7 +73,7 @@ new class {
73
73
  eventID: 'RippleMouseOut',
74
74
  eventType: 'mouseout',
75
75
  callback: ( event ) => {
76
- EffectEnd( effectInfo );
76
+ EffectEnd( effectInfo )
77
77
  }
78
78
  } )
79
79
  .find( '#' + ID )
@@ -85,24 +85,24 @@ new class {
85
85
  width: size,
86
86
  opacity: '.3',
87
87
  transition: '.25s'
88
- } );
88
+ } )
89
89
  }
90
90
  const EffectEnd = ( effectInfo: InfoProps ) => {
91
91
  let {
92
92
  RippleElement,
93
93
  startedAt,
94
94
  size
95
- } = effectInfo;
95
+ } = effectInfo
96
96
 
97
- let processTime = $.Time().time - startedAt;
98
- let transition = processTime <= 400 ? '.75s' : '.55s';
99
- let diameter = size * 2.5;
97
+ let processTime = $.Time().time - startedAt
98
+ let transition = processTime <= 400 ? '.75s' : '.55s'
99
+ let diameter = size * 2.5
100
100
 
101
101
  $( document ).removeEvent( [
102
102
  'RippleMouseUp',
103
103
  'RippleTouchMove',
104
104
  'RippleTouchEnd',
105
- ] );
105
+ ] )
106
106
 
107
107
  RippleElement
108
108
  .removeEvent( [ 'RippleMouseOut' ] )
@@ -117,8 +117,8 @@ new class {
117
117
  .await( 750 )
118
118
  .parent()
119
119
  .callback( ( Parent ) => {
120
- Parent.remove();
121
- } );
120
+ Parent.remove()
121
+ } )
122
122
  }
123
123
 
124
124
  $( document )
@@ -126,16 +126,16 @@ new class {
126
126
  eventType: 'touchstart',
127
127
  target: '.' + RippleElementClassName,
128
128
  callback: ( event ) => {
129
- EffectStart( event );
129
+ EffectStart( event )
130
130
  }
131
131
  } )
132
132
  .addEvent( {
133
133
  eventType: 'mousedown',
134
134
  target: '.' + RippleElementClassName,
135
135
  callback: ( event ) => {
136
- if ( amotify.config.device.isTouchDevice ) return;
137
- EffectStart( event );
136
+ if ( amotify.config.device.isTouchDevice ) return
137
+ EffectStart( event )
138
138
  }
139
- } );
139
+ } )
140
140
  }
141
141
  }
@@ -1,7 +1,7 @@
1
- import './Ripple';
2
- import style from './style.module.scss';
1
+ import './Ripple'
2
+ import style from './style.module.scss'
3
3
 
4
- import { FadeEffects } from './Fade';
4
+ import { FadeEffects } from './Fade'
5
5
 
6
6
  const Effects: amotify.fn.Effects.Methods = {
7
7
  ...FadeEffects,
@@ -14,7 +14,7 @@ export {
14
14
  /** PuddingEffect */
15
15
  new class {
16
16
  constructor() {
17
- this.UserEvent();
17
+ this.UserEvent()
18
18
  }
19
19
  UserEvent() {
20
20
  $( document ).addEvent( {
@@ -26,7 +26,7 @@ new class {
26
26
  .await( 1 )
27
27
  .addClass( style.PuddingEffect )
28
28
  .await( 510 )
29
- .removeClass( style.PuddingEffect );
29
+ .removeClass( style.PuddingEffect )
30
30
  }
31
31
  } )
32
32
  }
@@ -1,25 +1,25 @@
1
1
  import {
2
2
  useStore,
3
3
  React
4
- } from '@global';
4
+ } from '@global'
5
5
  import {
6
6
  Box,
7
7
  FAI,
8
8
  Span
9
- } from '@atoms';
9
+ } from '@atoms'
10
10
  import {
11
11
  Column,
12
12
  Row,
13
13
  Text
14
- } from '@mols';
14
+ } from '@mols'
15
15
  import {
16
16
  Input,
17
17
  Buttons,
18
18
  Loader,
19
19
  Sheet
20
- } from '@fn';
20
+ } from '@fn'
21
21
 
22
- import style from './style.module.scss';
22
+ import style from './style.module.scss'
23
23
 
24
24
  const Selector = ( params: {
25
25
  selectorID: string
@@ -33,115 +33,115 @@ const Selector = ( params: {
33
33
  } ): void
34
34
  onDynamicSearch?: amotify.fn.Input.Chips.onDynamicSearch
35
35
  } ) => {
36
- type StatusTypes = 'show' | 'interlude';
37
- let [ val_status,set_status ] = React.useState( 'show' as StatusTypes );
38
- let [ val_keyword,set_keyword ] = React.useState( '' );
39
- let [ val_componentID ] = React.useState( $.uuidGen() );
36
+ type StatusTypes = 'show' | 'interlude'
37
+ let [ val_status,set_status ] = React.useState( 'show' as StatusTypes )
38
+ let [ val_keyword,set_keyword ] = React.useState( '' )
39
+ let [ val_componentID ] = React.useState( $.uuidGen() )
40
40
 
41
- let [ val_options,set_options ] = React.useState( params.options );
42
- let [ val_focus,set_focus ] = React.useState( val_options[ 0 ] || null );
43
- let [ val_selected,set_selected ] = React.useState( params.selected );
44
- let [ val_keyEvent,set_keyEvent ] = React.useState( 'init' );
41
+ let [ val_options,set_options ] = React.useState( params.options )
42
+ let [ val_focus,set_focus ] = React.useState( val_options[ 0 ] || null )
43
+ let [ val_selected,set_selected ] = React.useState( params.selected )
44
+ let [ val_keyEvent,set_keyEvent ] = React.useState( 'init' )
45
45
 
46
46
  React.useEffect( () => {
47
47
  useStore.set( {
48
48
  key: params.selectorID,
49
49
  value: {
50
50
  updateOptions: ( options: amotify.fn.Input.Chips.OptionParams[] ) => {
51
- set_options( options );
51
+ set_options( options )
52
52
  },
53
53
  updateSelected: ( selected: amotify.fn.Input.Chips.OptionParams[] ) => {
54
- set_selected( selected );
54
+ set_selected( selected )
55
55
  }
56
56
  }
57
- } );
58
- },[] );
59
- const mountedOptions = React.useRef( false );
57
+ } )
58
+ },[] )
59
+ const mountedOptions = React.useRef( false )
60
60
  React.useEffect( () => {
61
61
  if ( mountedOptions.current ) {
62
- Sheet.reposition( params.selectorID );
62
+ Sheet.reposition( params.selectorID )
63
63
  } else {
64
- mountedOptions.current = true;
64
+ mountedOptions.current = true
65
65
  }
66
- },[ val_options ] );
67
- const mountedKeyword = React.useRef( false );
66
+ },[ val_options ] )
67
+ const mountedKeyword = React.useRef( false )
68
68
  React.useEffect( () => {
69
69
  if ( mountedKeyword.current ) {
70
- set_status( 'interlude' );
71
- set_focus( val_options[ 0 ] || null );
70
+ set_status( 'interlude' )
71
+ set_focus( val_options[ 0 ] || null )
72
72
 
73
73
  if ( params.onDynamicSearch ) {
74
- $.interval.clear( val_componentID + '-dynamicSearch' );
74
+ $.interval.clear( val_componentID + '-dynamicSearch' )
75
75
  $.interval.standBy(
76
76
  val_componentID + '-dynamicSearch',
77
77
  400,
78
78
  async () => {
79
79
  let {
80
80
  options
81
- } = await params.onDynamicSearch!( val_keyword );
82
- set_options( options );
83
- set_status( 'show' );
81
+ } = await params.onDynamicSearch!( val_keyword )
82
+ set_options( options )
83
+ set_status( 'show' )
84
84
  }
85
- );
85
+ )
86
86
  } else {
87
- $.interval.clear( val_componentID + '-staticSearch' );
87
+ $.interval.clear( val_componentID + '-staticSearch' )
88
88
  $.interval.standBy(
89
89
  val_componentID + '-staticSearch',
90
90
  400,
91
91
  async () => {
92
- let regExp = new RegExp( val_keyword,'ig' );
92
+ let regExp = new RegExp( val_keyword,'ig' )
93
93
  let newSelection: amotify.fn.Input.Chips.OptionParams[] = [];
94
94
  [ ...params.options ].forEach( ( o ) => {
95
- let match = Boolean( !val_keyword || ( String( o.label ) ?? String( o.value ) ).match( regExp ) );
96
- if ( match ) newSelection.push( o );
97
- } );
95
+ let match = Boolean( !val_keyword || ( String( o.label ) ?? String( o.value ) ).match( regExp ) )
96
+ if ( match ) newSelection.push( o )
97
+ } )
98
98
 
99
- set_options( newSelection );
100
- set_status( 'show' );
99
+ set_options( newSelection )
100
+ set_status( 'show' )
101
101
  }
102
- );
102
+ )
103
103
  }
104
104
  } else {
105
- mountedKeyword.current = true;
105
+ mountedKeyword.current = true
106
106
  }
107
- },[ val_keyword ] );
108
- const mountedSelected = React.useRef( false );
107
+ },[ val_keyword ] )
108
+ const mountedSelected = React.useRef( false )
109
109
  React.useEffect( () => {
110
110
  if ( mountedSelected.current ) {
111
111
  params.onUpdated( {
112
112
  values: val_selected
113
- } );
113
+ } )
114
114
  } else {
115
- mountedSelected.current = true;
115
+ mountedSelected.current = true
116
116
  }
117
- },[ val_selected ] );
117
+ },[ val_selected ] )
118
118
  React.useEffect( () => {
119
119
  $.fnScope( () => {
120
- if ( $.is.nullish( val_focus ) ) return;
121
- if ( val_keyEvent == 'MouseEvent' ) return;
120
+ if ( $.is.nullish( val_focus ) ) return
121
+ if ( val_keyEvent == 'MouseEvent' ) return
122
122
 
123
- let Wrapper = $( '#' + val_componentID + '-Selector-Cell-Wrap' );
124
- if ( !Wrapper[ 0 ] ) return;
123
+ let Wrapper = $( '#' + val_componentID + '-Selector-Cell-Wrap' )
124
+ if ( !Wrapper[ 0 ] ) return
125
125
 
126
- let focusCell = $( '[data-chips-selector-cell="' + val_componentID + '-' + JSON.stringify( val_focus?.value || '' ).replace( /\"/ig,'' ) + '"]' );
127
- if ( !focusCell[ 0 ] ) return;
126
+ let focusCell = $( '[data-chips-selector-cell="' + val_componentID + '-' + JSON.stringify( val_focus?.value || '' ).replace( /\"/ig,'' ) + '"]' )
127
+ if ( !focusCell[ 0 ] ) return
128
128
 
129
- let { top: pTop,height: pHeight } = Wrapper.position();
130
- let { top: cTop,height: cHeight } = focusCell.position();
131
- if ( pTop <= cTop && cTop + cHeight <= pTop + pHeight ) return;
129
+ let { top: pTop,height: pHeight } = Wrapper.position()
130
+ let { top: cTop,height: cHeight } = focusCell.position()
131
+ if ( pTop <= cTop && cTop + cHeight <= pTop + pHeight ) return
132
132
 
133
- let scroll = Wrapper[ 0 ].scrollTop + ( cTop - pTop );
133
+ let scroll = Wrapper[ 0 ].scrollTop + ( cTop - pTop )
134
134
  if ( val_keyEvent == 'ArrowDown' ) {
135
- scroll -= ( pHeight - cHeight ) - 20;
135
+ scroll -= ( pHeight - cHeight ) - 20
136
136
  } else if ( val_keyEvent == 'ArrowUp' ) {
137
- scroll -= 20;
137
+ scroll -= 20
138
138
  }
139
139
 
140
- Wrapper[ 0 ].scrollTop = scroll;
141
- } );
142
- },[ val_focus ] );
140
+ Wrapper[ 0 ].scrollTop = scroll
141
+ } )
142
+ },[ val_focus ] )
143
143
 
144
- let List: ReactElement[] = [];
144
+ let List: ReactElement[] = []
145
145
 
146
146
  if ( val_status == 'interlude' ) {
147
147
  List = [ <Row.Center
@@ -158,20 +158,20 @@ const Selector = ( params: {
158
158
  >
159
159
  検索中...
160
160
  </Box>
161
- </Row.Center> ];
161
+ </Row.Center> ]
162
162
  } else {
163
163
  List = [
164
164
  val_options.map( ( option,index ) => {
165
165
  let {
166
166
  value,label
167
- } = option;
167
+ } = option
168
168
 
169
- let safeValue = String( JSON.stringify( value ) );
169
+ let safeValue = String( JSON.stringify( value ) )
170
170
 
171
- let findIndex = val_selected.findIndex( ( v ) => JSON.stringify( v.value ) == safeValue );
171
+ let findIndex = val_selected.findIndex( ( v ) => JSON.stringify( v.value ) == safeValue )
172
172
 
173
- let isSelected = findIndex != -1;
174
- let isFocused = JSON.stringify( val_focus?.value || '' ) == safeValue;
173
+ let isSelected = findIndex != -1
174
+ let isFocused = JSON.stringify( val_focus?.value || '' ) == safeValue
175
175
 
176
176
  let styles: amotifyUniStyleParams = {}
177
177
  if ( isSelected || isFocused ) {
@@ -205,24 +205,24 @@ const Selector = ( params: {
205
205
  isActiveStyles={ styles }
206
206
  { ...styles }
207
207
  onMouseOver={ () => {
208
- set_keyEvent( 'MouseEvent' );
209
- set_focus( option );
208
+ set_keyEvent( 'MouseEvent' )
209
+ set_focus( option )
210
210
  } }
211
211
  onClick={ () => {
212
- let newSelected = [ ...val_selected ];
212
+ let newSelected = [ ...val_selected ]
213
213
  if ( isSelected ) {
214
- newSelected.splice( findIndex,1 );
214
+ newSelected.splice( findIndex,1 )
215
215
  } else {
216
216
  newSelected = [
217
217
  ...newSelected,
218
218
  option
219
- ];
219
+ ]
220
220
 
221
221
  if ( params.limit && newSelected.length > params.limit ) {
222
- newSelected.shift();
222
+ newSelected.shift()
223
223
  }
224
224
  }
225
- set_selected( newSelected );
225
+ set_selected( newSelected )
226
226
  } }
227
227
  >
228
228
  <params.SelectorCellComponent
@@ -231,9 +231,9 @@ const Selector = ( params: {
231
231
  value={ value }
232
232
  label={ label }
233
233
  />
234
- </Buttons.Button.Clear.R>;
234
+ </Buttons.Button.Clear.R>
235
235
  } )
236
- ];
236
+ ]
237
237
  }
238
238
 
239
239
  return <>
@@ -246,7 +246,7 @@ const Selector = ( params: {
246
246
  <Input.Text.Normal
247
247
  value={ val_keyword }
248
248
  onUpdateValidValue={ ( { value } ) => {
249
- set_keyword( value );
249
+ set_keyword( value )
250
250
  } }
251
251
  id={ params.selectorID + '-KeywordInput' }
252
252
  padding={ '2/3' }
@@ -262,45 +262,45 @@ const Selector = ( params: {
262
262
  let {
263
263
  key,
264
264
  metaKey,ctrlKey
265
- } = event;
266
- let auxKey = metaKey || ctrlKey;
265
+ } = event
266
+ let auxKey = metaKey || ctrlKey
267
267
 
268
268
  if ( [ 'ArrowDown','ArrowUp' ].includes( key ) ) {
269
- let dir = Number( key == 'ArrowDown' ) * 2 - 1;
269
+ let dir = Number( key == 'ArrowDown' ) * 2 - 1
270
270
  if ( auxKey ) {
271
- let next = val_options[ dir == 1 ? val_options.length - 1 : 0 ];
272
- set_focus( next );
271
+ let next = val_options[ dir == 1 ? val_options.length - 1 : 0 ]
272
+ set_focus( next )
273
273
  } else {
274
- let nextIndex = val_options.findIndex( ( v ) => JSON.stringify( v.value ) == JSON.stringify( val_focus?.value || '' ) ) + dir;
274
+ let nextIndex = val_options.findIndex( ( v ) => JSON.stringify( v.value ) == JSON.stringify( val_focus?.value || '' ) ) + dir
275
275
 
276
276
  if ( val_options[ nextIndex ] ) {
277
- set_focus( val_options[ nextIndex ] );
277
+ set_focus( val_options[ nextIndex ] )
278
278
  } else {
279
- set_focus( val_options[ dir == 1 ? 0 : val_options.length - 1 ] || null );
279
+ set_focus( val_options[ dir == 1 ? 0 : val_options.length - 1 ] || null )
280
280
  }
281
281
  }
282
282
  } else if ( key == 'Enter' ) {
283
- let selectedIndex = val_selected.findIndex( ( v ) => JSON.stringify( v.value ) == JSON.stringify( val_focus?.value || '' ) );
284
- let isSelected = selectedIndex != -1;
285
- let newSelected = [ ...val_selected ];
283
+ let selectedIndex = val_selected.findIndex( ( v ) => JSON.stringify( v.value ) == JSON.stringify( val_focus?.value || '' ) )
284
+ let isSelected = selectedIndex != -1
285
+ let newSelected = [ ...val_selected ]
286
286
  if ( isSelected ) {
287
- newSelected.splice( selectedIndex,1 );
287
+ newSelected.splice( selectedIndex,1 )
288
288
  } else {
289
- let optionsIndex = val_options.findIndex( ( v ) => JSON.stringify( v.value ) == JSON.stringify( val_focus?.value || '' ) );
290
- if ( optionsIndex == -1 ) return;
289
+ let optionsIndex = val_options.findIndex( ( v ) => JSON.stringify( v.value ) == JSON.stringify( val_focus?.value || '' ) )
290
+ if ( optionsIndex == -1 ) return
291
291
  newSelected = [
292
292
  ...newSelected,
293
293
  val_options[ optionsIndex ],
294
- ];
294
+ ]
295
295
 
296
296
  if ( params.limit && newSelected.length > params.limit ) {
297
- newSelected.shift();
297
+ newSelected.shift()
298
298
  }
299
299
  }
300
300
 
301
- set_selected( newSelected );
301
+ set_selected( newSelected )
302
302
  }
303
- set_keyEvent( key );
303
+ set_keyEvent( key )
304
304
  } }
305
305
  />
306
306
  <Buttons.Button.Border.S
@@ -309,7 +309,7 @@ const Selector = ( params: {
309
309
  backgroundColor='cloud'
310
310
  borderRadius={ '2.tone.secondary' }
311
311
  onClick={ () => {
312
- Sheet.close( params.selectorID! );
312
+ Sheet.close( params.selectorID! )
313
313
  } }
314
314
  >
315
315
  <FAI.Times />
@@ -362,7 +362,7 @@ const Selector = ( params: {
362
362
  { List }
363
363
  </Column>
364
364
  { params.bottomContent }
365
- </>;
365
+ </>
366
366
  }
367
367
 
368
368
  export const ChipsInputFNs: amotify.fn.Input.Chips.FNs = {
@@ -379,8 +379,8 @@ export const ChipsInputFNs: amotify.fn.Input.Chips.FNs = {
379
379
  onClosed,
380
380
  parent,
381
381
  ...sheetarams
382
- } = params;
383
- let sheetID = selectorID;
382
+ } = params
383
+ let sheetID = selectorID
384
384
 
385
385
  SelectorCellComponent = SelectorCellComponent || ( ( params ) => {
386
386
  return <Row.Left>
@@ -390,8 +390,8 @@ export const ChipsInputFNs: amotify.fn.Input.Chips.FNs = {
390
390
  fontColor={ params.isSelected ? 'theme' : '6.clear' }
391
391
  />
392
392
  { params.label }
393
- </Row.Left>;
394
- } );
393
+ </Row.Left>
394
+ } )
395
395
 
396
396
  Sheet.open( {
397
397
  parent,
@@ -424,22 +424,22 @@ export const ChipsInputFNs: amotify.fn.Input.Chips.FNs = {
424
424
  />
425
425
  </Box>,
426
426
  openAfter: () => {
427
- $( '#' + params.selectorID + '-KeywordInput' ).focus();
427
+ $( '#' + params.selectorID + '-KeywordInput' ).focus()
428
428
  },
429
429
  closeAfter: () => {
430
- onClosed();
430
+ onClosed()
431
431
  }
432
- } );
432
+ } )
433
433
  },
434
434
  closeSelector: ( selectorID ) => {
435
- Sheet.close( selectorID );
435
+ Sheet.close( selectorID )
436
436
  },
437
437
  updateOptions: ( selectorID,options ) => {
438
- let C = useStore.get( selectorID );
439
- if ( C && C.updateOptions ) C.updateOptions( options );
438
+ let C = useStore.get( selectorID )
439
+ if ( C && C.updateOptions ) C.updateOptions( options )
440
440
  },
441
441
  updateSelected: ( selectorID,selected ) => {
442
- let C = useStore.get( selectorID );
443
- if ( C && C.updateSelected ) C.updateSelected( selected );
442
+ let C = useStore.get( selectorID )
443
+ if ( C && C.updateSelected ) C.updateSelected( selected )
444
444
  }
445
445
  }