amotify 0.0.11 → 0.0.13
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.
- package/@types/amot.tsx +1 -1
- package/@types/fn.tsx +14 -14
- package/dist/amotify.js +1 -1
- package/dist/amotify.min.css +2 -2
- package/package.json +4 -6
- package/src/@global.tsx +4 -2
- package/src/@reactPacks/reactProduction@18.2.0.js +79 -0
- package/src/@reactPacks/reactRouterDomProduction@18.2.0.js +31 -0
- package/src/atoms/Various/parts.tsx +3 -2
- package/src/functions/Button/_.tsx +3 -0
- package/src/functions/Cropper/parts.tsx +1 -1
- package/src/functions/Input/Chips/Selector.tsx +2 -2
- package/src/functions/Input/DigitCharacters.tsx +2 -2
- package/src/functions/Input/File/_.tsx +1 -1
- package/src/functions/Input/List/_.tsx +8 -4
- package/src/functions/Input/Segmented/_.tsx +8 -0
- package/src/functions/Input/Select/_.tsx +2 -2
- package/src/functions/Input/Slider/_.tsx +5 -5
- package/src/functions/Input/Switch/_.tsx +2 -2
- package/src/functions/Input/Text.tsx +2 -2
- package/src/functions/Input/TextArea.tsx +2 -2
- package/src/functions/Input/Time/Picker.tsx +1 -1
- package/src/functions/Input/Time/_.tsx +4 -4
- package/src/functions/Input/Time/style.module.scss +1 -1
- package/src/functions/Input/_.tsx +22 -8
- package/src/functions/Input/core.tsx +3 -1
- package/src/functions/Layout/PageRouter.tsx +10 -11
- package/src/functions/Layout/RootViewController/parts.tsx +1 -2
- package/src/functions/Loader/corner.tsx +6 -4
- package/src/functions/Loader/parts.tsx +0 -1
- package/src/functions/Loader/style.module.scss +1 -1
- package/src/functions/Sheet/parts.tsx +31 -16
- package/src/functions/Table/Data/parts.tsx +1 -0
- package/src/functions/Table/Drag/parts.tsx +1 -1
- package/src/functions/Table/Normal/parts.tsx +1 -0
- package/src/functions/Table/_.tsx +1 -0
- package/src/functions/Tooltips/parts.tsx +2 -2
- package/src/global/LaunchReactApplication.tsx +3 -3
- package/src/global/styleConverter.tsx +24 -1
- package/src/launch.tsx +1 -1
- package/src/molecules/Accordion/parts.tsx +7 -6
- package/src/preload.tsx +20 -1
- package/webpack.config.js +5 -5
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
TextValidate
|
|
28
28
|
} from './Text';
|
|
29
29
|
import { TextAreaInput } from './TextArea';
|
|
30
|
-
import { DigitCharactersInput } from './DigitCharacters'
|
|
30
|
+
import { DigitCharactersInput } from './DigitCharacters';
|
|
31
31
|
import {
|
|
32
32
|
TimeInput,
|
|
33
33
|
TimeFNs
|
|
@@ -47,8 +47,9 @@ const UniComponent: React.FC<{
|
|
|
47
47
|
}> = ( props ) => {
|
|
48
48
|
let [ val_componentID ] = React.useState( props.componentID || $.uuidGen() );
|
|
49
49
|
|
|
50
|
+
props = { ...props }
|
|
50
51
|
props.params = {
|
|
51
|
-
|
|
52
|
+
enable_form_submit: true,
|
|
52
53
|
// override: 'beforeModified',
|
|
53
54
|
override: 'never',
|
|
54
55
|
name: $.uuidGen(),
|
|
@@ -69,6 +70,7 @@ const UniComponent: React.FC<{
|
|
|
69
70
|
const TextInputs: amotify.fn.Input.Text.Methods = {
|
|
70
71
|
Validate: TextValidate,
|
|
71
72
|
Normal: ( rawParams ) => {
|
|
73
|
+
rawParams = { ...rawParams }
|
|
72
74
|
if ( rawParams.rightIcon ) rawParams.paddingRight = rawParams.paddingRight ?? 3;
|
|
73
75
|
if ( rawParams.leftIcon ) rawParams.paddingLeft = rawParams.paddingLeft ?? 3;
|
|
74
76
|
|
|
@@ -176,6 +178,7 @@ const TimeInputs: amotify.fn.Input.Time.Methods & {
|
|
|
176
178
|
Origin: ( props: amotify.fn.Input.Time.OriginParams ) => JSX.Element
|
|
177
179
|
} = {
|
|
178
180
|
Origin: ( rawParams ) => {
|
|
181
|
+
rawParams = { ...rawParams }
|
|
179
182
|
let [ val_componentID ] = React.useState( rawParams.componentID || $.uuidGen() );
|
|
180
183
|
rawParams.componentID = val_componentID;
|
|
181
184
|
|
|
@@ -219,6 +222,7 @@ const TimeInputs: amotify.fn.Input.Time.Methods & {
|
|
|
219
222
|
Month: ( props ) => ( <TimeInputs.Origin restrict='month' { ...props } /> ),
|
|
220
223
|
Year: ( props ) => ( <TimeInputs.Origin restrict='year' { ...props } /> ),
|
|
221
224
|
DateWareki: ( params ) => {
|
|
225
|
+
params = { ...params }
|
|
222
226
|
let [ val_componentID ] = React.useState( params.componentID || $.uuidGen() );
|
|
223
227
|
params.componentID = val_componentID;
|
|
224
228
|
let {
|
|
@@ -289,6 +293,7 @@ const TimeInputs: amotify.fn.Input.Time.Methods & {
|
|
|
289
293
|
}
|
|
290
294
|
|
|
291
295
|
const ChipsInputs = ( rawParams: amotify.fn.Input.Chips.PlainParams ) => {
|
|
296
|
+
rawParams = { ...rawParams }
|
|
292
297
|
rawParams = {
|
|
293
298
|
gap: 1,
|
|
294
299
|
display: 'flex',
|
|
@@ -308,6 +313,7 @@ const ChipsInputs = ( rawParams: amotify.fn.Input.Chips.PlainParams ) => {
|
|
|
308
313
|
ChipsInputs.fn = ChipsInput.fn;
|
|
309
314
|
|
|
310
315
|
const FileInputs = ( rawParams: amotify.fn.Input.Filer.PlainParams ) => {
|
|
316
|
+
rawParams = { ...rawParams }
|
|
311
317
|
rawParams.override = 'force';
|
|
312
318
|
let params = StyleConverter.ToClassName( rawParams );
|
|
313
319
|
params.cellClassName = [
|
|
@@ -330,7 +336,7 @@ export const ListInputs: amotify.fn.Input.List.Methods & {
|
|
|
330
336
|
Origin: ( props: amotify.fn.Input.List.OriginParams ) => JSX.Element
|
|
331
337
|
} = {
|
|
332
338
|
Origin: ( rawParams ) => {
|
|
333
|
-
|
|
339
|
+
rawParams = { ...rawParams }
|
|
334
340
|
let params = DefaultStyles.ListCell( rawParams );
|
|
335
341
|
return ( <UniComponent
|
|
336
342
|
componentID={ rawParams.componentID }
|
|
@@ -362,6 +368,7 @@ export const Input: amotify.fn.Input.Methods = {
|
|
|
362
368
|
},
|
|
363
369
|
Text: TextInputs,
|
|
364
370
|
TextArea: ( rawParams ) => {
|
|
371
|
+
rawParams = { ...rawParams }
|
|
365
372
|
if ( rawParams.rightIcon ) rawParams.paddingRight = rawParams.paddingRight ?? 3;
|
|
366
373
|
if ( rawParams.leftIcon ) rawParams.paddingLeft = rawParams.paddingLeft ?? 3;
|
|
367
374
|
|
|
@@ -374,29 +381,30 @@ export const Input: amotify.fn.Input.Methods = {
|
|
|
374
381
|
/> );
|
|
375
382
|
},
|
|
376
383
|
DigitCharacters: ( rawParams ) => {
|
|
384
|
+
rawParams = { ...rawParams }
|
|
377
385
|
rawParams = {
|
|
378
386
|
textAlign: 'center',
|
|
379
387
|
width: 0,
|
|
380
388
|
...rawParams
|
|
381
389
|
}
|
|
382
390
|
if ( rawParams.combineInput ) {
|
|
383
|
-
rawParams =
|
|
384
|
-
rawParams,{
|
|
391
|
+
rawParams = {
|
|
385
392
|
digits: rawParams.digits,
|
|
386
393
|
textAlign: 'center',
|
|
387
394
|
width: 0,
|
|
388
395
|
borderRadius: 0,
|
|
389
396
|
freeCSS: {
|
|
390
397
|
minWidth: 12 * 2,
|
|
391
|
-
marginRight: -1
|
|
398
|
+
marginRight: -1,
|
|
399
|
+
...rawParams.freeCSS
|
|
392
400
|
},
|
|
393
401
|
listStyles: {
|
|
394
402
|
borderRadius: '2.tone.secondary',
|
|
395
403
|
border: 'unset',
|
|
396
|
-
gap: 0
|
|
404
|
+
gap: 0,
|
|
405
|
+
...rawParams.listStyles
|
|
397
406
|
},
|
|
398
407
|
}
|
|
399
|
-
);
|
|
400
408
|
}
|
|
401
409
|
let params = DefaultStyles.Boxish( rawParams ) as amotify.fn.Input.DigitCharacters.PlainParams;
|
|
402
410
|
|
|
@@ -410,6 +418,7 @@ export const Input: amotify.fn.Input.Methods = {
|
|
|
410
418
|
},
|
|
411
419
|
Time: TimeInputs,
|
|
412
420
|
Select: ( rawParams ) => {
|
|
421
|
+
rawParams = { ...rawParams }
|
|
413
422
|
if ( $.is.nullish( rawParams.rightIcon ) ) {
|
|
414
423
|
rawParams.rightIcon = <Input.Comps.RightIcon
|
|
415
424
|
flexType='col'
|
|
@@ -467,6 +476,7 @@ export const Input: amotify.fn.Input.Methods = {
|
|
|
467
476
|
},
|
|
468
477
|
File: FileInputs,
|
|
469
478
|
Switch: ( rawParams ) => {
|
|
479
|
+
rawParams = { ...rawParams }
|
|
470
480
|
rawParams.color = rawParams.color || 'theme';
|
|
471
481
|
return ( <UniComponent
|
|
472
482
|
componentID={ rawParams.componentID }
|
|
@@ -475,6 +485,7 @@ export const Input: amotify.fn.Input.Methods = {
|
|
|
475
485
|
/> );
|
|
476
486
|
},
|
|
477
487
|
Slider: ( rawParams ) => {
|
|
488
|
+
rawParams = { ...rawParams }
|
|
478
489
|
return ( <UniComponent
|
|
479
490
|
componentID={ rawParams.componentID }
|
|
480
491
|
children={ SliderInput }
|
|
@@ -482,6 +493,7 @@ export const Input: amotify.fn.Input.Methods = {
|
|
|
482
493
|
/> );
|
|
483
494
|
},
|
|
484
495
|
Checker: ( rawParams ) => {
|
|
496
|
+
rawParams = { ...rawParams }
|
|
485
497
|
return ( <ListInputs.Origin
|
|
486
498
|
{ ...rawParams }
|
|
487
499
|
tone='plain'
|
|
@@ -633,6 +645,7 @@ const DefaultStyles = {
|
|
|
633
645
|
return Styles;
|
|
634
646
|
},
|
|
635
647
|
ListCell: ( params: amotify.fn.Input.List.OriginParams ) => {
|
|
648
|
+
params = { ...params }
|
|
636
649
|
if ( !params.tone ) {
|
|
637
650
|
params.tone = 'border';
|
|
638
651
|
|
|
@@ -717,6 +730,7 @@ const DefaultStyles = {
|
|
|
717
730
|
return StyleConverter.ToClassName( params );
|
|
718
731
|
},
|
|
719
732
|
Boxish: ( params: any ) => {
|
|
733
|
+
params = { ...params }
|
|
720
734
|
if ( !params.tone ) {
|
|
721
735
|
params.tone = 'border';
|
|
722
736
|
if ( amotify.config.tone == 'sharp' ) params.tone = 'bottomBorder';
|
|
@@ -225,6 +225,7 @@ export const CommonEffects: {
|
|
|
225
225
|
onUpdateValue,
|
|
226
226
|
onUpdateValidValue
|
|
227
227
|
} = props;
|
|
228
|
+
params = { ...params }
|
|
228
229
|
let {
|
|
229
230
|
componentID
|
|
230
231
|
} = val_status;
|
|
@@ -326,7 +327,8 @@ export const CommonEffects: {
|
|
|
326
327
|
}
|
|
327
328
|
|
|
328
329
|
if ( eventType == 'refresh' ) {
|
|
329
|
-
useStore.get( componentID )
|
|
330
|
+
let comp = useStore.get( componentID );
|
|
331
|
+
if ( comp && comp.ResolveRefresh ) comp.ResolveRefresh( null );
|
|
330
332
|
}
|
|
331
333
|
|
|
332
334
|
if ( eventType == 'update' ) {
|
|
@@ -17,10 +17,10 @@ import {
|
|
|
17
17
|
const userEffect = ( beforeCallback?: Function,afterCallback?: Function,afterFirstCallback?: Function ) => {
|
|
18
18
|
const mounted = React.useRef( false );
|
|
19
19
|
let location = useLocation();
|
|
20
|
-
let
|
|
20
|
+
let navigate = useNavigate();
|
|
21
21
|
useStore.set( {
|
|
22
|
-
key: '
|
|
23
|
-
value:
|
|
22
|
+
key: 'navigate',
|
|
23
|
+
value: navigate
|
|
24
24
|
} );
|
|
25
25
|
|
|
26
26
|
amotify.fn.Sheet.closeAll( true );
|
|
@@ -63,6 +63,7 @@ const Switcher: React.FC<amotify.fn.Layout.PageRouter.RoutesSwitchProps> = ( pro
|
|
|
63
63
|
let { path,content } = page;
|
|
64
64
|
path = '/' + path.replace( /^\//,'' );
|
|
65
65
|
|
|
66
|
+
|
|
66
67
|
return <Route
|
|
67
68
|
key={ path }
|
|
68
69
|
path={ path }
|
|
@@ -87,12 +88,10 @@ export const PageRouter: React.FC<amotify.fn.Layout.PageRouter.RouterProps> = (
|
|
|
87
88
|
afterFirstCallBack
|
|
88
89
|
} = props;
|
|
89
90
|
|
|
90
|
-
return
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
/>
|
|
97
|
-
);
|
|
91
|
+
return <Switcher
|
|
92
|
+
routes={ pages }
|
|
93
|
+
beforeCallBack={ beforeCallBack }
|
|
94
|
+
afterCallBack={ afterCallBack }
|
|
95
|
+
afterFirstCallBack={ afterFirstCallBack }
|
|
96
|
+
/>;
|
|
98
97
|
}
|
|
@@ -210,7 +210,7 @@ export const RootViewController: amotify.fn.Layout.RootViewController.Methods =
|
|
|
210
210
|
|
|
211
211
|
let groups = $.flatArray( uriGroup );
|
|
212
212
|
|
|
213
|
-
let currentURL = location.pathname
|
|
213
|
+
let currentURL = location.pathname;
|
|
214
214
|
|
|
215
215
|
{
|
|
216
216
|
let isCurrentURL = false;
|
|
@@ -219,7 +219,6 @@ export const RootViewController: amotify.fn.Layout.RootViewController.Methods =
|
|
|
219
219
|
location.origin,
|
|
220
220
|
uri.replace( /\//,'' )
|
|
221
221
|
].join( '/' );
|
|
222
|
-
|
|
223
222
|
isCurrentURL = currentURL == new URL( url ).pathname;
|
|
224
223
|
}
|
|
225
224
|
|
|
@@ -36,15 +36,17 @@ export const Corner = () => {
|
|
|
36
36
|
gap={ '1/2' }
|
|
37
37
|
padding={ [ '1/2','3/4' ] }
|
|
38
38
|
borderRadius={ '2/3' }
|
|
39
|
-
backgroundColor='
|
|
39
|
+
backgroundColor='dark'
|
|
40
40
|
position='fixed'
|
|
41
41
|
boxShadow={ 2 }
|
|
42
|
-
|
|
43
|
-
|
|
42
|
+
left={ '50%' }
|
|
43
|
+
top={ 1 }
|
|
44
44
|
opacity='trans'
|
|
45
45
|
transition='short'
|
|
46
|
+
isRounded
|
|
46
47
|
freeCSS={ {
|
|
47
|
-
pointerEvents: 'none'
|
|
48
|
+
pointerEvents: 'none',
|
|
49
|
+
transform: 'translateX(-50%)'
|
|
48
50
|
} }
|
|
49
51
|
>
|
|
50
52
|
<Flex
|
|
@@ -30,7 +30,7 @@ const Comps = {
|
|
|
30
30
|
contents: {} as {
|
|
31
31
|
[ key: string ]: {
|
|
32
32
|
open: boolean
|
|
33
|
-
|
|
33
|
+
hold_state: boolean
|
|
34
34
|
params: Params
|
|
35
35
|
created_at: Time.Method
|
|
36
36
|
}
|
|
@@ -40,13 +40,13 @@ const Comps = {
|
|
|
40
40
|
sheetID: $.uuidGen(),
|
|
41
41
|
sheetGroups: params.sheetGroups || [],
|
|
42
42
|
overwrap: params.type == 'custom' ? true : false,
|
|
43
|
-
|
|
43
|
+
hold_state: false,
|
|
44
44
|
...params,
|
|
45
|
-
|
|
45
|
+
close_option: {
|
|
46
46
|
pageTransit: true,
|
|
47
47
|
escapeKeyDown: true,
|
|
48
48
|
aroundClick: false,
|
|
49
|
-
...params.
|
|
49
|
+
...params.close_option
|
|
50
50
|
},
|
|
51
51
|
}
|
|
52
52
|
|
|
@@ -61,7 +61,7 @@ const Comps = {
|
|
|
61
61
|
|
|
62
62
|
this.contents[ params.sheetID! ] = {
|
|
63
63
|
open: true,
|
|
64
|
-
|
|
64
|
+
hold_state: !!params.hold_state,
|
|
65
65
|
params: params,
|
|
66
66
|
created_at: $.Time()
|
|
67
67
|
}
|
|
@@ -147,12 +147,12 @@ const Comps = {
|
|
|
147
147
|
} );
|
|
148
148
|
React.useEffect( () => {
|
|
149
149
|
let {
|
|
150
|
-
|
|
150
|
+
close_option
|
|
151
151
|
} = params;
|
|
152
152
|
|
|
153
153
|
$.fnScope( () => {
|
|
154
|
-
if ( !
|
|
155
|
-
let element = $(
|
|
154
|
+
if ( !close_option?.elementBlur ) return;
|
|
155
|
+
let element = $( close_option.elementBlur );
|
|
156
156
|
if ( !element[ 0 ] ) return;
|
|
157
157
|
$( element ).addEvent( {
|
|
158
158
|
eventID: 'SheetClosation-' + sheetID!,
|
|
@@ -226,7 +226,7 @@ const Comps = {
|
|
|
226
226
|
.addClass( style.Hide )
|
|
227
227
|
.callback( () => {
|
|
228
228
|
!closeAfter || closeAfter();
|
|
229
|
-
params.
|
|
229
|
+
params.hold_state || $.fnScope( () => {
|
|
230
230
|
delete Comps.contents[ sheetID! ];
|
|
231
231
|
$( '#Sheet-' + sheetID ).remove();
|
|
232
232
|
$().removeEvent( 'SheetClosation-' + sheetID! );
|
|
@@ -262,7 +262,7 @@ const Comps = {
|
|
|
262
262
|
>
|
|
263
263
|
{ isNewSheet ? <Comps.TapSensor
|
|
264
264
|
sheetID={ sheetID! }
|
|
265
|
-
delegateAroundClick={ params.
|
|
265
|
+
delegateAroundClick={ params.close_option?.aroundClick }
|
|
266
266
|
/> : null }
|
|
267
267
|
<ContentFC
|
|
268
268
|
componentID={ val_componentID }
|
|
@@ -275,11 +275,15 @@ const Comps = {
|
|
|
275
275
|
Normal: ( params: amotify.fn.Sheet.NormalParams ) => {
|
|
276
276
|
let {
|
|
277
277
|
sheetID,
|
|
278
|
+
sheetGroups,
|
|
278
279
|
content: Content,
|
|
279
280
|
className = '',
|
|
280
281
|
type,
|
|
281
282
|
size = 'R',
|
|
282
283
|
freeCSS,
|
|
284
|
+
openAfter,
|
|
285
|
+
hold_state,
|
|
286
|
+
overwrap,
|
|
283
287
|
...styles
|
|
284
288
|
} = params;
|
|
285
289
|
let [ Tcate,Tpos ] = type.split( '.' );
|
|
@@ -346,11 +350,15 @@ const Comps = {
|
|
|
346
350
|
Edge: ( params: amotify.fn.Sheet.NormalParams ) => {
|
|
347
351
|
let {
|
|
348
352
|
sheetID,
|
|
353
|
+
sheetGroups,
|
|
349
354
|
type,
|
|
350
355
|
content: Content,
|
|
351
356
|
className = '',
|
|
352
357
|
size = 'R',
|
|
353
358
|
freeCSS,
|
|
359
|
+
close_option,
|
|
360
|
+
hold_state,
|
|
361
|
+
overwrap,
|
|
354
362
|
...styles
|
|
355
363
|
} = params;
|
|
356
364
|
|
|
@@ -390,13 +398,16 @@ const Comps = {
|
|
|
390
398
|
let {
|
|
391
399
|
componentID,
|
|
392
400
|
sheetID,
|
|
401
|
+
sheetGroups,
|
|
393
402
|
content: Content,
|
|
394
403
|
size = 'R',
|
|
395
404
|
sizeChanged,
|
|
396
405
|
baseStyles,
|
|
397
|
-
|
|
406
|
+
close_option: {
|
|
398
407
|
swipeDown = true,
|
|
399
408
|
} = {},
|
|
409
|
+
hold_state,
|
|
410
|
+
overwrap,
|
|
400
411
|
...styles
|
|
401
412
|
} = params;
|
|
402
413
|
let screen = $.getScreenSize();
|
|
@@ -622,9 +633,13 @@ const Comps = {
|
|
|
622
633
|
Custom: ( params: amotify.fn.Sheet.CustomParams ) => {
|
|
623
634
|
let {
|
|
624
635
|
sheetID,
|
|
636
|
+
sheetGroups,
|
|
625
637
|
parent,
|
|
626
638
|
gravityPoint: GPT = 22,
|
|
627
639
|
content: Content,
|
|
640
|
+
close_option,
|
|
641
|
+
hold_state,
|
|
642
|
+
overwrap,
|
|
628
643
|
...others
|
|
629
644
|
} = params;
|
|
630
645
|
|
|
@@ -793,7 +808,7 @@ $( document )
|
|
|
793
808
|
if ( event.target?.closest( '.' + style.CustomSheet ) ) return;
|
|
794
809
|
|
|
795
810
|
customSheets.forEach( ( customSheets ) => {
|
|
796
|
-
if ( !!customSheets.params.
|
|
811
|
+
if ( !!customSheets.params.close_option?.aroundClick ) {
|
|
797
812
|
Sheet.close( customSheets.params.sheetID! );
|
|
798
813
|
}
|
|
799
814
|
} );
|
|
@@ -817,8 +832,8 @@ const Sheet: amotify.fn.Sheet.Methods = {
|
|
|
817
832
|
backgroundColor: 'trans',
|
|
818
833
|
boxShadow: 'none',
|
|
819
834
|
...others,
|
|
820
|
-
|
|
821
|
-
...params.
|
|
835
|
+
close_option: {
|
|
836
|
+
...params.close_option,
|
|
822
837
|
},
|
|
823
838
|
freeCSS: {
|
|
824
839
|
maxWidth: '96vw',
|
|
@@ -928,7 +943,7 @@ const Sheet: amotify.fn.Sheet.Methods = {
|
|
|
928
943
|
Content = Comps.contents[ sheetID ];
|
|
929
944
|
|
|
930
945
|
if ( !Content ) return;
|
|
931
|
-
if ( et == 'escape' && !Content.params.
|
|
946
|
+
if ( et == 'escape' && !Content.params.close_option?.escapeKeyDown ) return;
|
|
932
947
|
|
|
933
948
|
{
|
|
934
949
|
let { params } = Content;
|
|
@@ -948,7 +963,7 @@ const Sheet: amotify.fn.Sheet.Methods = {
|
|
|
948
963
|
closeAll: ( pageTransit ) => {
|
|
949
964
|
for ( let [ key,value ] of Object.entries( Comps.contents ) ) {
|
|
950
965
|
if ( pageTransit ) {
|
|
951
|
-
if ( value.params.
|
|
966
|
+
if ( value.params.close_option?.pageTransit == false ) continue;
|
|
952
967
|
}
|
|
953
968
|
Sheet.close( key,'pageTransit' );
|
|
954
969
|
}
|
|
@@ -661,6 +661,7 @@ const Components = {
|
|
|
661
661
|
Propagations: {} as any,
|
|
662
662
|
|
|
663
663
|
DataLeveler: ( params: amotify.fn.Tables.Data.Params ) => {
|
|
664
|
+
params = { ...params };
|
|
664
665
|
params.filter = params.filter ?? false;
|
|
665
666
|
params.filter = Array.from( { length: params.colLength } ).map( ( a,index ) => {
|
|
666
667
|
if ( $.is.boolean( params.filter ) ) {
|
|
@@ -299,8 +299,8 @@ const BodyRows: React.FC<amotify.fn.Tables.Drag.Params> = ( props ) => {
|
|
|
299
299
|
</> );
|
|
300
300
|
}
|
|
301
301
|
|
|
302
|
-
|
|
303
302
|
export const DragTable: React.FC<amotify.fn.Tables.Drag.Params> = ( params ) => {
|
|
303
|
+
params = { ...params };
|
|
304
304
|
params.colLength = params.colLength + 1;
|
|
305
305
|
|
|
306
306
|
if ( params.head ) {
|
|
@@ -111,6 +111,7 @@ const BodyRows: React.FC<amotify.fn.Tables.Normal.Params> = ( params ) => {
|
|
|
111
111
|
}
|
|
112
112
|
|
|
113
113
|
export const NormalTable: React.FC<amotify.fn.Tables.Normal.Params> = ( params ) => {
|
|
114
|
+
params = { ...params }
|
|
114
115
|
params.rows = params.rows.map( ( row,rowIndex ) => {
|
|
115
116
|
row.rowID = row.rowID || rowIndex;
|
|
116
117
|
return row;
|
|
@@ -21,12 +21,12 @@ const Tooltips: amotify.fn.Tooltips.Methods = {
|
|
|
21
21
|
'tooltips',
|
|
22
22
|
...tipsGroups,
|
|
23
23
|
],
|
|
24
|
-
|
|
24
|
+
close_option: {
|
|
25
25
|
aroundClick: true,
|
|
26
26
|
elementBlur: params.parent,
|
|
27
27
|
escapeKeyDown: true,
|
|
28
28
|
pageTransit: true,
|
|
29
|
-
...params.
|
|
29
|
+
...params.close_option,
|
|
30
30
|
},
|
|
31
31
|
type: 'custom',
|
|
32
32
|
...sheetParams
|
|
@@ -10,7 +10,6 @@ export const LaunchReactApplication: amotify.global.LaunchReactApplicationParams
|
|
|
10
10
|
appearances
|
|
11
11
|
} = props;
|
|
12
12
|
let Base = $( baseElement )[ 0 ];
|
|
13
|
-
|
|
14
13
|
if ( !Base || !reactElement ) return;
|
|
15
14
|
if ( appearances ) {
|
|
16
15
|
let {
|
|
@@ -25,7 +24,8 @@ export const LaunchReactApplication: amotify.global.LaunchReactApplicationParams
|
|
|
25
24
|
if ( $.is.exist( themeColor ) ) amotify.config.update.themeColor( themeColor! );
|
|
26
25
|
if ( $.is.exist( darkMode ) ) amotify.config.update.darkMode( darkMode! );
|
|
27
26
|
}
|
|
28
|
-
let reactDom = nonRouter ? reactElement : <ReactRouterDom.BrowserRouter children={ reactElement } />;
|
|
29
27
|
|
|
30
|
-
|
|
28
|
+
let reactDom = nonRouter ? reactElement : <ReactRouterDom.BrowserRouter children={ reactElement } />;
|
|
29
|
+
// ReactDOMCLient.createRoot( Base ).render( <React.StrictMode children={ reactDom } /> );
|
|
30
|
+
ReactDOMCLient.createRoot( Base ).render( <>{ reactDom }</> );
|
|
31
31
|
}
|
|
@@ -295,7 +295,30 @@ export const ReadStyleSet: amotify.global.StyleConverter.ReadStyleSet = ( rawPar
|
|
|
295
295
|
}
|
|
296
296
|
|
|
297
297
|
if ( [ 'dim','dark' ].includes( amotify.config.darkMode ) ) exStyles.boxShadow = 2;
|
|
298
|
-
ReturnParams =
|
|
298
|
+
ReturnParams = {
|
|
299
|
+
...exStyles,
|
|
300
|
+
...ReturnParams,
|
|
301
|
+
freeCSS: {
|
|
302
|
+
...exStyles.freeCSS,
|
|
303
|
+
...ReturnParams.freeCSS
|
|
304
|
+
},
|
|
305
|
+
hoverStyles: {
|
|
306
|
+
...exStyles.hoverStyles,
|
|
307
|
+
...ReturnParams.hoverStyles
|
|
308
|
+
},
|
|
309
|
+
activeStyles: {
|
|
310
|
+
...exStyles.activeStyles,
|
|
311
|
+
...ReturnParams.activeStyles
|
|
312
|
+
},
|
|
313
|
+
focusStyles: {
|
|
314
|
+
...exStyles.focusStyles,
|
|
315
|
+
...ReturnParams.focusStyles
|
|
316
|
+
},
|
|
317
|
+
UnderBreakPointStyles: {
|
|
318
|
+
...exStyles.UnderBreakPointStyles,
|
|
319
|
+
...ReturnParams.UnderBreakPointStyles
|
|
320
|
+
}
|
|
321
|
+
}
|
|
299
322
|
}
|
|
300
323
|
if ( ssSphere ) {
|
|
301
324
|
flexCenter = flexCenter ?? true;
|
package/src/launch.tsx
CHANGED
|
@@ -6,6 +6,7 @@ if ( !global.$ ) console.log( `%c※can not find global.$,please read Jsmin to l
|
|
|
6
6
|
|
|
7
7
|
let publicURI = 'https://public.comun.jp/';
|
|
8
8
|
export { publicURI }
|
|
9
|
+
import './preload';
|
|
9
10
|
|
|
10
11
|
import './@jsminAmotifyExtension/_';
|
|
11
12
|
import {
|
|
@@ -89,7 +90,6 @@ Object.freeze( global.amotify.fn );
|
|
|
89
90
|
Object.freeze( global.amotify );
|
|
90
91
|
|
|
91
92
|
import './@styles/@app.scss';
|
|
92
|
-
import './preload';
|
|
93
93
|
|
|
94
94
|
// document.oncontextmenu = () => {return false;}
|
|
95
95
|
$( window ).addEvent( {
|
|
@@ -9,18 +9,19 @@ import {
|
|
|
9
9
|
import style from './style.module.scss';
|
|
10
10
|
|
|
11
11
|
const Component: React.FC<amotify.mols.Accordion.Params> = ( params ) => {
|
|
12
|
+
params = { ...params }
|
|
12
13
|
let {
|
|
13
14
|
accordionID = '',
|
|
14
15
|
slideAnimation = 'fast',
|
|
15
|
-
|
|
16
|
+
defaultOpen = false,
|
|
16
17
|
...others
|
|
17
18
|
} = params;
|
|
18
19
|
|
|
19
20
|
let [ val_wrapID ] = React.useState( $.uuidGen() );
|
|
20
21
|
let [ val_contentID ] = React.useState( $.uuidGen() );
|
|
21
|
-
let [ val_open,set_open ] = React.useState(
|
|
22
|
+
let [ val_open,set_open ] = React.useState( defaultOpen );
|
|
22
23
|
|
|
23
|
-
if ( val_open !=
|
|
24
|
+
if ( val_open != defaultOpen ) set_open( defaultOpen );
|
|
24
25
|
|
|
25
26
|
let Query = '[data-accordion-content-id="' + val_contentID + '"]';
|
|
26
27
|
|
|
@@ -95,15 +96,15 @@ const Component: React.FC<amotify.mols.Accordion.Params> = ( params ) => {
|
|
|
95
96
|
value: {
|
|
96
97
|
open: () => {
|
|
97
98
|
set_open( true );
|
|
98
|
-
params.open = true;
|
|
99
|
+
// params.open = true;
|
|
99
100
|
},
|
|
100
101
|
close: () => {
|
|
101
102
|
set_open( false );
|
|
102
|
-
params.open = false;
|
|
103
|
+
// params.open = false;
|
|
103
104
|
},
|
|
104
105
|
toggle: () => {
|
|
105
106
|
set_open( !val_open );
|
|
106
|
-
params.open = !val_open;
|
|
107
|
+
// params.open = !val_open;
|
|
107
108
|
}
|
|
108
109
|
}
|
|
109
110
|
} );
|
package/src/preload.tsx
CHANGED
|
@@ -29,7 +29,26 @@ let tags: Jsmin.CreateElement.Args[] = [
|
|
|
29
29
|
tag: 'script',parent: document.head,attr: {
|
|
30
30
|
src: 'https://kit.fontawesome.com/6745173b38.js',async: true
|
|
31
31
|
}
|
|
32
|
-
},
|
|
32
|
+
},
|
|
33
|
+
|
|
34
|
+
// <script src="https://public.comun.jp/@env/react/v18.0.4/reactProduction.js" defer></script>
|
|
35
|
+
// <script src="https://public.comun.jp/@env/react/v18.0.4/react-dom.js" defer></script>
|
|
36
|
+
// <script src="https://public.comun.jp/@env/react/v18.0.4/react-router-dom@v5.3.0.js" defer></script>
|
|
37
|
+
// {
|
|
38
|
+
// tag: 'script',parent: document.head,attr: {
|
|
39
|
+
// src: 'https://public.comun.jp/@env/react/v18.0.4/reactProduction.js',async: true
|
|
40
|
+
// }
|
|
41
|
+
// },{
|
|
42
|
+
// tag: 'script',parent: document.head,attr: {
|
|
43
|
+
// src: 'https://public.comun.jp/@env/react/v18.0.4/react-dom.js',async: true
|
|
44
|
+
// }
|
|
45
|
+
// },{
|
|
46
|
+
// tag: 'script',parent: document.head,attr: {
|
|
47
|
+
// src: 'https://public.comun.jp/@env/react/v18.0.4/react-router-dom@v5.3.0.js',async: true
|
|
48
|
+
// }
|
|
49
|
+
// },
|
|
50
|
+
|
|
51
|
+
{
|
|
33
52
|
tag: 'meta',parent: document.head,attr: {
|
|
34
53
|
name: 'theme-color',
|
|
35
54
|
content: '#45515c',
|
package/webpack.config.js
CHANGED
|
@@ -44,11 +44,11 @@ module.exports = ( () => {
|
|
|
44
44
|
} )
|
|
45
45
|
],
|
|
46
46
|
},
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
47
|
+
externals: {
|
|
48
|
+
// 'react': 'React',
|
|
49
|
+
// 'react-dom': 'ReactDOM',
|
|
50
|
+
// 'react-router-dom': 'ReactRouterDOM'
|
|
51
|
+
},
|
|
52
52
|
plugins: [
|
|
53
53
|
// new BundleAnalyzerPlugin(),
|
|
54
54
|
new BrowserSync(
|