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
  useStore,
3
3
  React
4
- } from '@global';
4
+ } from '@global'
5
5
  import {
6
6
  Box,
7
7
  Flex,
8
8
  FAI
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
  Buttons,
17
17
  Tooltips
18
- } from '@fn';
18
+ } from '@fn'
19
19
 
20
- import style from './style.module.scss';
20
+ import style from './style.module.scss'
21
21
 
22
22
  type BoxWrapperParams = {
23
23
  val_status: any
@@ -34,15 +34,15 @@ export const BoxWrapper: React.FC<BoxWrapperParams> = ( props ) => {
34
34
  set_status,
35
35
  val_validate,
36
36
  params
37
- } = props;
37
+ } = props
38
38
  let {
39
39
  clearButton,
40
40
  rightIcon,
41
41
  leftIcon,
42
42
  wrapStyles
43
- } = params;
43
+ } = params
44
44
 
45
- if ( val_status.eventType == 'init' && !params.checkValidationAtFirst ) val_validate.notice = [];
45
+ if ( val_status.eventType == 'init' && !params.checkValidationAtFirst ) val_validate.notice = []
46
46
 
47
47
  return <Box
48
48
  position='relative'
@@ -80,7 +80,7 @@ export const BoxWrapper: React.FC<BoxWrapperParams> = ( props ) => {
80
80
  formatValue: '',
81
81
  eventType: 'update',
82
82
  eventID: $.uuidGen()
83
- } as any );
83
+ } as any )
84
84
  } }
85
85
  >
86
86
  <FAI.Times />
@@ -92,36 +92,36 @@ export const BoxWrapper: React.FC<BoxWrapperParams> = ( props ) => {
92
92
  notice={ val_validate.notice }
93
93
  val_status={ val_status }
94
94
  />
95
- </Box>;
95
+ </Box>
96
96
  }
97
97
  const GenNotices: React.FC<{
98
98
  notice: amotify.fn.Input.Validation.NoticeTypes[]
99
99
  val_status: amotify.fn.Input.Status.Plain
100
100
  }> = ( params ) => {
101
- let { notice,val_status } = params;
101
+ let { notice,val_status } = params
102
102
  let {
103
103
  componentID,
104
104
  eventType
105
- } = val_status;
105
+ } = val_status
106
106
 
107
- $.interval.clear( 'NoticeTimer-' + componentID );
108
- $.interval.clear( 'NoticeTimerClose-' + componentID );
107
+ $.interval.clear( 'NoticeTimer-' + componentID )
108
+ $.interval.clear( 'NoticeTimerClose-' + componentID )
109
109
 
110
- let parentID = 'notice-' + params.val_status.componentID;
111
- let tipsID = 'notice-tips-' + params.val_status.componentID;
110
+ let parentID = 'notice-' + params.val_status.componentID
111
+ let tipsID = 'notice-tips-' + params.val_status.componentID
112
112
 
113
113
  if ( !notice.length ) {
114
- Tooltips.close( tipsID );
115
- return null;
114
+ Tooltips.close( tipsID )
115
+ return null
116
116
  }
117
117
 
118
118
  let Notices = notice.map( ( cell ) => {
119
- let { type,label } = cell;
119
+ let { type,label } = cell
120
120
 
121
121
  let ICON =
122
122
  type == 'invalid' ? FAI.Times :
123
123
  type == 'warn' ? FAI.Exclamation :
124
- FAI.Check;
124
+ FAI.Check
125
125
 
126
126
  return <Row.Left
127
127
  gap={ 0 }
@@ -141,8 +141,8 @@ const GenNotices: React.FC<{
141
141
  >
142
142
  { label }
143
143
  </Box>
144
- </Row.Left>;
145
- } );
144
+ </Row.Left>
145
+ } )
146
146
 
147
147
  $.interval.standBy(
148
148
  'NoticeTimer-' + componentID,
@@ -180,21 +180,21 @@ const GenNotices: React.FC<{
180
180
  { Notices }
181
181
  </Column>
182
182
  </Tooltips.Comps.Body>
183
- } );
183
+ } )
184
184
 
185
185
  $.interval.standBy(
186
186
  'NoticeTimerClose-' + componentID,
187
187
  7500,
188
188
  () => {
189
- Tooltips.close( tipsID );
189
+ Tooltips.close( tipsID )
190
190
  }
191
191
  )
192
- } );
192
+ } )
193
193
 
194
194
  return <Box
195
195
  className={ style.Notices }
196
196
  id={ parentID }
197
- />;
197
+ />
198
198
  }
199
199
 
200
200
  export const CommonEffects: {
@@ -224,13 +224,13 @@ export const CommonEffects: {
224
224
  DefaultValidation,
225
225
  onUpdateValue,
226
226
  onUpdateValidValue
227
- } = props;
227
+ } = props
228
228
  params = { ...params }
229
229
  let {
230
230
  componentID
231
- } = val_status;
231
+ } = val_status
232
232
 
233
- let [ val_refresh,set_refresh ] = React.useState( $.uuidGen() );
233
+ let [ val_refresh,set_refresh ] = React.useState( $.uuidGen() )
234
234
 
235
235
  React.useEffect( () => {
236
236
  useStore.update( {
@@ -239,58 +239,58 @@ export const CommonEffects: {
239
239
  ResolveRefresh: null,
240
240
  Refresh: () => {
241
241
  return new Promise( ( res,rej ) => {
242
- useStore.get( componentID ).ResolveRefresh = res;
243
- set_refresh( $.uuidGen() );
244
- } );
242
+ useStore.get( componentID ).ResolveRefresh = res
243
+ set_refresh( $.uuidGen() )
244
+ } )
245
245
  },
246
246
  GenNotice: ( props: { ok: boolean,notice: amotify.fn.Input.Validation.NoticeTypes[] } ) => {
247
- let { ok,notice } = props;
248
- set_validate( { ok,notice } );
247
+ let { ok,notice } = props
248
+ set_validate( { ok,notice } )
249
249
  },
250
250
  ...ExtraStoreParams
251
251
  }
252
- } );
252
+ } )
253
253
  return () => {
254
- useStore.delete( componentID );
254
+ useStore.delete( componentID )
255
255
  }
256
- },[] );
256
+ },[] )
257
257
 
258
- const mounted = React.useRef( false );
258
+ const mounted = React.useRef( false )
259
259
  React.useEffect( () => {
260
260
  if ( mounted.current ) {
261
261
  set_status( {
262
262
  ...val_status,
263
263
  eventType: 'refresh',
264
264
  eventID: $.uuidGen()
265
- } );
265
+ } )
266
266
  } else {
267
- mounted.current = true;
267
+ mounted.current = true
268
268
  }
269
- },[ val_refresh ] );
269
+ },[ val_refresh ] )
270
270
  React.useEffect( () => {
271
- params.value = val_status.dataValue;
271
+ params.value = val_status.dataValue
272
272
 
273
- $.interval.clear( 'ValidationTimer-' + componentID );
273
+ $.interval.clear( 'ValidationTimer-' + componentID )
274
274
 
275
275
  ValidationCheck( {
276
276
  val_status,
277
277
  set_validate,
278
278
  DefaultValidation,
279
279
  params
280
- } );
280
+ } )
281
281
  },[ val_status.eventID ] );
282
282
 
283
283
  ( () => {
284
284
  let {
285
285
  override
286
- } = params;
287
- if ( override == 'never' ) return;
286
+ } = params
287
+ if ( override == 'never' ) return
288
288
  if ( override == 'beforeModified' ) {
289
- if ( ![ 'init','override' ].includes( val_status.eventType ) ) return;
289
+ if ( ![ 'init','override' ].includes( val_status.eventType ) ) return
290
290
  }
291
291
 
292
- let component = useStore.get( val_status.componentID );
293
- if ( !component ) return;
292
+ let component = useStore.get( val_status.componentID )
293
+ if ( !component ) return
294
294
  if (
295
295
  params.value != val_status.dataValue &&
296
296
  params.status_id != component.status_id
@@ -301,36 +301,36 @@ export const CommonEffects: {
301
301
  ...ExtraOverrideParams,
302
302
  eventType: 'override',
303
303
  eventID: $.uuidGen()
304
- } );
304
+ } )
305
305
  }
306
- component.status_id = params.status_id;
307
- } )();
306
+ component.status_id = params.status_id
307
+ } )()
308
308
 
309
309
  React.useEffect( () => {
310
310
  let {
311
311
  componentID,
312
312
  eventType,
313
313
  dataValue
314
- } = val_status;
315
- let Value = dataValue;
314
+ } = val_status
315
+ let Value = dataValue
316
316
  if ( type == 'list' ) {
317
317
  Value = dataValue.map( ( value: any ) => JSON.parse( value ) )
318
318
  } else if ( type == 'select' ) {
319
- Value = JSON.parse( dataValue );
319
+ Value = JSON.parse( dataValue )
320
320
  } else if ( type == 'richSelect' ) {
321
- Value = JSON.parse( dataValue );
321
+ Value = JSON.parse( dataValue )
322
322
  } else if ( type == 'file' ) {
323
323
  useStore.update( {
324
324
  key: componentID,
325
325
  value: {
326
326
  Files: val_status.dataValue
327
327
  }
328
- } );
328
+ } )
329
329
  }
330
330
 
331
331
  if ( eventType == 'refresh' ) {
332
- let comp = useStore.get( componentID );
333
- if ( comp && comp.ResolveRefresh ) comp.ResolveRefresh( null );
332
+ let comp = useStore.get( componentID )
333
+ if ( comp && comp.ResolveRefresh ) comp.ResolveRefresh( null )
334
334
  }
335
335
 
336
336
  if ( eventType == 'update' ) {
@@ -339,21 +339,21 @@ export const CommonEffects: {
339
339
  value: Value,
340
340
  storeData: useStore.get( componentID ),
341
341
  eventType: eventType
342
- } );
342
+ } )
343
343
 
344
344
  $.fnScope( () => {
345
- if ( !val_validate.ok ) return;
346
- // if ( $.is.nullish( Value ) ) return;
347
- if ( !onUpdateValidValue ) return;
345
+ if ( !val_validate.ok ) return
346
+ // if ( $.is.nullish( Value ) ) return
347
+ if ( !onUpdateValidValue ) return
348
348
  onUpdateValidValue( {
349
349
  componentID,
350
350
  value: Value,
351
351
  storeData: useStore.get( componentID ),
352
352
  eventType: eventType
353
- } );
354
- } );
353
+ } )
354
+ } )
355
355
  }
356
- },[ val_validate ] );
356
+ },[ val_validate ] )
357
357
  }
358
358
 
359
359
  export const ValidationCheck: {
@@ -369,27 +369,27 @@ export const ValidationCheck: {
369
369
  params,
370
370
  set_validate,
371
371
  DefaultValidation
372
- } = props;
372
+ } = props
373
373
 
374
374
  let result = DefaultValidation( {
375
375
  value: val_status.dataValue,
376
376
  params: params
377
- } );
377
+ } )
378
378
 
379
379
  if ( !result.ok ) {
380
- set_validate( result );
381
- return;
380
+ set_validate( result )
381
+ return
382
382
  }
383
- let sysDefaultNotice = result.notice;
383
+ let sysDefaultNotice = result.notice
384
384
 
385
385
  const FN = async () => {
386
- if ( !params.onValidate ) return;
386
+ if ( !params.onValidate ) return
387
387
 
388
388
  let result = await params.onValidate( {
389
389
  value: val_status.dataValue,
390
390
  eventType: val_status.eventType,
391
391
  props: props
392
- } );
392
+ } )
393
393
  if ( !result.ok ) {
394
394
  set_validate( {
395
395
  ok: false,
@@ -397,8 +397,8 @@ export const ValidationCheck: {
397
397
  ...sysDefaultNotice,
398
398
  ...result.notice
399
399
  ]
400
- } );
401
- return;
400
+ } )
401
+ return
402
402
  }
403
403
  set_validate( {
404
404
  ok: true,
@@ -406,18 +406,18 @@ export const ValidationCheck: {
406
406
  ...sysDefaultNotice,
407
407
  ...result.notice
408
408
  ]
409
- } );
409
+ } )
410
410
  }
411
411
 
412
412
  if ( params.onValidate ) {
413
413
  if ( val_status.eventType == 'refresh' ) {
414
- FN();
414
+ FN()
415
415
  } else {
416
416
  $.interval.standBy(
417
417
  'ValidationTimer-' + val_status.componentID,
418
418
  450,
419
419
  FN
420
- );
420
+ )
421
421
  }
422
422
  } else {
423
423
  set_validate( {
@@ -430,27 +430,27 @@ export const ValidationCheck: {
430
430
  export const SubmitForm = (
431
431
  event: React.KeyboardEvent
432
432
  ) => {
433
- let input = event.target as HTMLInputElement;
434
- let { form,formName } = input.dataset;
435
- form = formName || form;
436
- let complete = false;
433
+ let input = event.target as HTMLInputElement
434
+ let { form,formName } = input.dataset
435
+ form = formName || form
436
+ let complete = false
437
437
 
438
- let Button = $( `[data-form-submit-button="${ form }"]` )[ 0 ];
439
- if ( !Button ) return complete;
438
+ let Button = $( `[data-form-submit-button="${ form }"]` )[ 0 ]
439
+ if ( !Button ) return complete
440
440
 
441
- let gestures = Button.dataset.sdfike || '';
442
- let key = event.key;
443
- let auxKey = event.ctrlKey || event.metaKey;
441
+ let gestures = Button.dataset.sdfike || ''
442
+ let key = event.key
443
+ let auxKey = event.ctrlKey || event.metaKey
444
444
 
445
445
  $.fnScope( () => {
446
446
  if ( gestures.includes( 'enter' ) ) {
447
- if ( key != 'Enter' ) return;
447
+ if ( key != 'Enter' ) return
448
448
 
449
- let isComposing = event.nativeEvent.isComposing;
450
- if ( isComposing ) return;
449
+ let isComposing = event.nativeEvent.isComposing
450
+ if ( isComposing ) return
451
451
 
452
452
  if ( amotify.config.device.browserIs == 'safari' ) {
453
- if ( event.keyCode == 229 ) return;
453
+ if ( event.keyCode == 229 ) return
454
454
  }
455
455
  }
456
456
 
@@ -462,12 +462,12 @@ export const SubmitForm = (
462
462
  key == ' ' && gestures.includes( 'space' )
463
463
  )
464
464
  ) {
465
- Button.click();
466
- event.preventDefault();
465
+ Button.click()
466
+ event.preventDefault()
467
467
  }
468
468
 
469
- complete = true;
470
- } );
469
+ complete = true
470
+ } )
471
471
 
472
- return complete;
472
+ return complete
473
473
  }
@@ -1,4 +1,4 @@
1
- import { TextInput } from './text';
1
+ import { TextInput } from './text'
2
2
 
3
3
  export const Inputs = {
4
4
  TextInput
@@ -1,11 +1,11 @@
1
- import React from 'react';
1
+ import React from 'react'
2
2
  import {
3
3
  StyleConverter
4
- } from '@global';
4
+ } from '@global'
5
5
 
6
- import style from './style.module.scss';
6
+ import style from './style.module.scss'
7
7
 
8
- import { TextInputs } from './types';
8
+ import { TextInputs } from './types'
9
9
 
10
10
  let ToneStyles: {
11
11
  common: amotifyBasicElement
@@ -49,5 +49,5 @@ export const TextInput = ( params: TextInputs.Text.Params ) => {
49
49
  placeholder='fvdgsbsfgdvs'
50
50
  // value={ 'AAAA' }
51
51
  { ...StyleConverter.ToClassName( params ) }
52
- />;
52
+ />
53
53
  }
@@ -1,20 +1,20 @@
1
- import React from 'react';
1
+ import React from 'react'
2
2
  import {
3
3
  Box,
4
4
  FAI
5
- } from '@atoms';
5
+ } from '@atoms'
6
6
  import {
7
7
  Column,
8
8
  Row,
9
9
  Text
10
- } from '@mols';
10
+ } from '@mols'
11
11
  import {
12
12
  Buttons
13
- } from '@fn';
13
+ } from '@fn'
14
14
 
15
15
  export const PageNotFound: React.FC<{}> = () => {
16
16
 
17
- let { href } = location;
17
+ let { href } = location
18
18
 
19
19
  return <Row.Center
20
20
  padding={ [ 4,1 ] }
@@ -74,5 +74,5 @@ export const PageNotFound: React.FC<{}> = () => {
74
74
  children={ 'ホームに戻る' }
75
75
  />
76
76
  </Column>
77
- </Row.Center>;
77
+ </Row.Center>
78
78
  }
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  useStore,
3
3
  React
4
- } from '@global';
4
+ } from '@global'
5
5
  import {
6
6
  Layout
7
- } from '@fn';
7
+ } from '@fn'
8
8
 
9
9
  import {
10
10
  useNavigate,
@@ -12,72 +12,56 @@ import {
12
12
  BrowserRouter,
13
13
  Routes,
14
14
  Route,
15
- } from 'react-router-dom';
15
+ } from 'react-router-dom'
16
16
 
17
17
  const userEffect = ( beforeCallback?: Function,afterCallback?: Function,afterFirstCallback?: Function ) => {
18
- const mounted = React.useRef( false );
19
- let location = useLocation();
20
- let navigate = useNavigate();
18
+ const mounted = React.useRef( false )
19
+ let location = useLocation()
20
+ let navigate = useNavigate()
21
21
  useStore.set( {
22
22
  key: 'navigate',
23
23
  value: navigate
24
- } );
24
+ } )
25
25
 
26
26
  React.useEffect( () => {
27
27
  if ( mounted.current ) {
28
- amotify.fn.Sheet.closeAll( true );
29
- $( '#TopNavigation' )
30
- .callback( ( topHeader ) => {
31
- let Body = $( document.body );
32
- if ( topHeader[ 0 ] ) {
33
- Body.setStyleProperty( '--topNavHeight',topHeader.position().height + 'px' );
34
- } else {
35
- Body.setStyleProperty( '--topNavHeight','0px' );
36
- }
37
- } );
38
- $( '#FooterNavigation' )
39
- .callback( ( footerHeader ) => {
40
- let Body = $( document.body );
41
- if ( footerHeader[ 0 ] ) {
42
- Body.setStyleProperty( '--footerNavHeight',footerHeader.position().height + 'px' );
43
- } else {
44
- Body.setStyleProperty( '--footerNavHeight','0px' );
45
- }
46
- } );
28
+ amotify.fn.Sheet.closeAll( true )
29
+
30
+ Layout.RootViewController.fn.updateCSSProperty.reset()
47
31
  } else {
48
- mounted.current = true;
32
+ mounted.current = true
49
33
  }
50
- },[ location.pathname ] );
34
+ },[ location.pathname ] )
51
35
 
52
- if ( beforeCallback ) beforeCallback( location );
36
+ if ( beforeCallback ) beforeCallback( location )
53
37
 
54
38
  React.useEffect( () => {
55
- if ( afterFirstCallback ) afterFirstCallback( location );
56
- },[] );
39
+ if ( afterFirstCallback ) afterFirstCallback( location )
40
+ },[] )
57
41
  React.useEffect( () => {
58
42
  setTimeout( () => {
59
- window.dispatchEvent( new Event( 'resize' ) );
60
- },200 );
61
- if ( afterCallback ) afterCallback( location );
62
- },[ location ] );
43
+ window.dispatchEvent( new Event( 'resize' ) )
44
+ },200 )
45
+ if ( afterCallback ) afterCallback( location )
46
+ },[ location ] )
63
47
  }
64
48
 
65
49
  const Switcher: React.FC<amotify.fn.Layout.PageRouter.RoutesSwitchProps> = ( props ) => {
66
- let { routes,beforeCallBack,afterCallBack,afterFirstCallBack } = props;
50
+ let { routes,beforeCallBack,afterCallBack,afterFirstCallBack } = props
67
51
 
68
- userEffect( beforeCallBack,afterCallBack,afterFirstCallBack );
52
+ userEffect( beforeCallBack,afterCallBack,afterFirstCallBack )
69
53
 
70
54
  let Routing = routes.map( ( page ) => {
71
- let { path,content } = page;
72
- path = '/' + path.replace( /^\//,'' );
55
+ let { path,content } = page
56
+ path = '/' + path.replace( /^\//,'' )
73
57
 
74
58
 
75
59
  return <Route
76
60
  key={ path }
77
61
  path={ path }
78
62
  element={ content }
79
- />;
80
- } );
63
+ />
64
+ } )
81
65
 
82
66
  return <Routes>
83
67
  { Routing }
@@ -85,7 +69,7 @@ const Switcher: React.FC<amotify.fn.Layout.PageRouter.RoutesSwitchProps> = ( pro
85
69
  path='*'
86
70
  element={ <Layout.PageNotFound /> }
87
71
  />
88
- </Routes>;
72
+ </Routes>
89
73
  }
90
74
 
91
75
  export const PageRouter: React.FC<amotify.fn.Layout.PageRouter.RouterProps> = ( props ) => {
@@ -94,12 +78,12 @@ export const PageRouter: React.FC<amotify.fn.Layout.PageRouter.RouterProps> = (
94
78
  beforeCallBack,
95
79
  afterCallBack,
96
80
  afterFirstCallBack
97
- } = props;
81
+ } = props
98
82
 
99
83
  return <Switcher
100
84
  routes={ pages }
101
85
  beforeCallBack={ beforeCallBack }
102
86
  afterCallBack={ afterCallBack }
103
87
  afterFirstCallBack={ afterFirstCallBack }
104
- />;
88
+ />
105
89
  }
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  React
3
- } from '@global';
3
+ } from '@global'
4
4
 
5
5
  import {
6
6
  Effects
7
- } from '@fn';
7
+ } from '@fn'
8
8
 
9
9
  export const PageViewController: React.FC<amotify.fn.Layout.PageViewController.Params> = ( params ) => {
10
10
  let {
@@ -15,13 +15,13 @@ export const PageViewController: React.FC<amotify.fn.Layout.PageViewController.P
15
15
  animationTime={ 400 }
16
16
  children={ body }
17
17
  /> )
18
- } = params;
19
- viewIndex = Math.min( Math.max( viewIndex,0 ),views.length );
18
+ } = params
19
+ viewIndex = Math.min( Math.max( viewIndex,0 ),views.length )
20
20
 
21
- let [ val_index,set_index ] = React.useState( viewIndex );
22
- if ( val_index != viewIndex ) set_index( viewIndex );
21
+ let [ val_index,set_index ] = React.useState( viewIndex )
22
+ if ( val_index != viewIndex ) set_index( viewIndex )
23
23
 
24
24
  return <>
25
25
  { wrapper( views[ viewIndex ] ) }
26
- </>;
26
+ </>
27
27
  }
@@ -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
  }