amotify 0.0.13 → 0.0.15
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 +48 -63
- package/@types/fn.tsx +10 -16
- package/@types/state.tsx +2 -2
- package/dist/amotify.js +1 -1
- package/dist/amotify.min.css +12 -13
- package/dist/coreVender.js +14 -0
- package/package.json +27 -22
- package/src/@atoms.tsx +4 -2
- package/src/@global.tsx +5 -0
- package/src/@jsminAmotifyExtension/fetch.tsx +2 -0
- package/src/@jsminAmotifyExtension/variables.tsx +4 -0
- package/src/@organisms.tsx +1 -5
- package/src/@styles/UniStyling.scss +6 -0
- package/src/@styles/init.scss +42 -106
- package/src/@variables.tsx +70 -0
- package/src/atoms/FAI/parts.tsx +136 -0
- package/src/atoms/Logo/style.module.scss +6 -5
- package/src/atoms/Various/style.module.scss +11 -6
- package/src/config.tsx +31 -5
- package/src/functions/Button/_.tsx +27 -19
- package/src/functions/Button/style.module.scss +20 -22
- package/src/functions/Cropper/parts.tsx +18 -10
- package/src/functions/Cropper/style.module.scss +1 -0
- package/src/functions/Effects/Ripple.tsx +1 -1
- package/src/functions/Input/Chips/Selector.tsx +9 -9
- package/src/functions/Input/Chips/_.tsx +10 -3
- package/src/functions/Input/DigitCharacters.tsx +13 -15
- package/src/functions/Input/File/_.tsx +37 -67
- package/src/functions/Input/Hidden.tsx +3 -1
- package/src/functions/Input/List/_.tsx +8 -8
- package/src/functions/Input/Select/_.tsx +8 -7
- package/src/functions/Input/Select/style.module.scss +1 -0
- package/src/functions/Input/Slider/_.tsx +5 -5
- package/src/functions/Input/Switch/_.tsx +11 -8
- package/src/functions/Input/Text.tsx +3 -4
- package/src/functions/Input/TextArea.tsx +3 -3
- package/src/functions/Input/Time/Picker.tsx +10 -17
- package/src/functions/Input/Time/_.tsx +3 -2
- package/src/functions/Input/Time/style.module.scss +9 -2
- package/src/functions/Input/_.tsx +53 -42
- package/src/functions/Input/core.tsx +53 -54
- package/src/functions/Input/style.module.scss +66 -8
- package/src/functions/Layout/PageNotFound.tsx +2 -4
- package/src/functions/Layout/PageRouter.tsx +2 -3
- package/src/functions/Layout/RootViewController/parts.tsx +4 -16
- package/src/functions/Loader/parts.tsx +3 -1
- package/src/functions/Loader/style.module.scss +2 -1
- package/src/functions/Sheet/parts.tsx +45 -42
- package/src/functions/Sheet/style.module.scss +18 -25
- package/src/functions/SnackBar/parts.tsx +5 -3
- package/src/functions/SnackBar/style.module.scss +1 -1
- package/src/functions/Table/Data/parts.tsx +18 -12
- package/src/functions/Table/Drag/parts.tsx +7 -9
- package/src/functions/Table/_.tsx +2 -2
- package/src/global/LaunchReactApplication.tsx +17 -5
- package/src/launch.tsx +12 -5
- package/src/molecules/Accordion/parts.tsx +4 -1
- package/src/molecules/LinkifyText/parts.tsx +2 -3
- package/src/preload.tsx +19 -30
- package/tsconfig.json +19 -8
- package/webpack.config.js +16 -5
- package/src/atoms/FAIcon/parts.tsx +0 -118
- package/src/atoms/FAIcon/style.module.scss +0 -8
- package/src/organisms/DisplayStyleInput/_.tsx +0 -18
- package/src/organisms/DisplayStyleInput/darkmode.tsx +0 -107
- package/src/organisms/DisplayStyleInput/themeColor.tsx +0 -205
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import {
|
|
2
|
+
baseElements,
|
|
2
3
|
React,
|
|
3
4
|
LaunchReactApplication,
|
|
4
5
|
useStore
|
|
@@ -7,7 +8,7 @@ import {
|
|
|
7
8
|
Img,
|
|
8
9
|
Box,
|
|
9
10
|
Flex,
|
|
10
|
-
|
|
11
|
+
FAI
|
|
11
12
|
} from '@atoms';
|
|
12
13
|
import {
|
|
13
14
|
Column,
|
|
@@ -32,13 +33,14 @@ const Comps = {
|
|
|
32
33
|
open: boolean
|
|
33
34
|
hold_state: boolean
|
|
34
35
|
params: Params
|
|
35
|
-
created_at: Time.
|
|
36
|
+
created_at: Time.Methods
|
|
36
37
|
}
|
|
37
38
|
},
|
|
38
39
|
Launch: function ( params: Params ) {
|
|
39
40
|
params = {
|
|
40
41
|
sheetID: $.uuidGen(),
|
|
41
42
|
sheetGroups: params.sheetGroups || [],
|
|
43
|
+
backgroundEffect: true,
|
|
42
44
|
overwrap: params.type == 'custom' ? true : false,
|
|
43
45
|
hold_state: false,
|
|
44
46
|
...params,
|
|
@@ -66,10 +68,11 @@ const Comps = {
|
|
|
66
68
|
created_at: $.Time()
|
|
67
69
|
}
|
|
68
70
|
|
|
69
|
-
$( '#
|
|
71
|
+
$( '#' + baseElements.sheetID )
|
|
70
72
|
.append( `<div id="Sheet-${ params.sheetID }"></div>` )
|
|
71
73
|
.callback( () => {
|
|
72
74
|
LaunchReactApplication( {
|
|
75
|
+
isRoot: false,
|
|
73
76
|
baseElement: '#Sheet-' + params.sheetID,
|
|
74
77
|
reactElement: Content,
|
|
75
78
|
} );
|
|
@@ -167,8 +170,8 @@ const Comps = {
|
|
|
167
170
|
},[] );
|
|
168
171
|
React.useEffect( () => {
|
|
169
172
|
$.fnScope( () => {
|
|
170
|
-
// #ROOT
|
|
171
173
|
if ( !isNewSheet ) return;
|
|
174
|
+
if ( !params.backgroundEffect ) return;
|
|
172
175
|
|
|
173
176
|
Comps.subSheetLength = Comps.subSheetLength + ( val_open ? 1 : -1 );
|
|
174
177
|
if ( val_open ) {
|
|
@@ -183,7 +186,9 @@ const Comps = {
|
|
|
183
186
|
.abort()
|
|
184
187
|
.addClass( style.FixHeight )
|
|
185
188
|
.callback( () => {
|
|
186
|
-
$( '#
|
|
189
|
+
$( '#' + baseElements.rootID + '.AMOTIFY_be_origin' )
|
|
190
|
+
.addClass( style.FixScroll )
|
|
191
|
+
[ 0 ].scrollTop = Comps.mainSheetScrolls;
|
|
187
192
|
} )
|
|
188
193
|
.addClass( [
|
|
189
194
|
style.FloatMainSheet,
|
|
@@ -202,7 +207,7 @@ const Comps = {
|
|
|
202
207
|
.removeClass( style.FixHeight )
|
|
203
208
|
.callback( ( html ) => {
|
|
204
209
|
html[ 0 ].scrollTop = Comps.mainSheetScrolls | 0;
|
|
205
|
-
$( '#
|
|
210
|
+
$( '#' + baseElements.rootID )[ 0 ].scrollTop = 0;
|
|
206
211
|
} );
|
|
207
212
|
}
|
|
208
213
|
} );
|
|
@@ -238,7 +243,7 @@ const Comps = {
|
|
|
238
243
|
|
|
239
244
|
let [ Tcate,Tpos ] = type.split( '.' );
|
|
240
245
|
|
|
241
|
-
return
|
|
246
|
+
return <Box
|
|
242
247
|
className={ [
|
|
243
248
|
style.Wrap,
|
|
244
249
|
style[ 'Tcate_' + Tcate ],
|
|
@@ -269,7 +274,7 @@ const Comps = {
|
|
|
269
274
|
{ ...val_params }
|
|
270
275
|
/>
|
|
271
276
|
</Column>
|
|
272
|
-
</Box
|
|
277
|
+
</Box>;
|
|
273
278
|
},
|
|
274
279
|
Types: {
|
|
275
280
|
Normal: ( params: amotify.fn.Sheet.NormalParams ) => {
|
|
@@ -577,9 +582,7 @@ const Comps = {
|
|
|
577
582
|
height={ 1 }
|
|
578
583
|
{ ...baseStyles }
|
|
579
584
|
>
|
|
580
|
-
<
|
|
581
|
-
verticalAlign='center'
|
|
582
|
-
flexChilds='even'
|
|
585
|
+
<Row.Separate
|
|
583
586
|
padding={ '1/2' }
|
|
584
587
|
backgroundColor='1.layer.base'
|
|
585
588
|
position='relative'
|
|
@@ -587,39 +590,37 @@ const Comps = {
|
|
|
587
590
|
userSelect: 'none'
|
|
588
591
|
} }
|
|
589
592
|
>
|
|
590
|
-
<Row.Center
|
|
593
|
+
<Row.Center
|
|
594
|
+
flexSizing={ 0 }
|
|
595
|
+
padding={ '2/3' }
|
|
596
|
+
onMouseDown={ Effects.Start }
|
|
597
|
+
onTouchStart={ Effects.Start }
|
|
598
|
+
ssPushable
|
|
599
|
+
isRounded
|
|
600
|
+
freeCSS={ {
|
|
601
|
+
cursor: 'grab',
|
|
602
|
+
userSelect: 'none'
|
|
603
|
+
} }
|
|
604
|
+
>
|
|
591
605
|
<Box
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
ssPushable
|
|
606
|
+
unitWidth={ 6 }
|
|
607
|
+
unitHeight={ '1/2' }
|
|
608
|
+
backgroundColor='5.layer.darker'
|
|
596
609
|
isRounded
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
userSelect: 'none'
|
|
600
|
-
} }
|
|
601
|
-
>
|
|
602
|
-
<Box
|
|
603
|
-
unitWidth={ 6 }
|
|
604
|
-
unitHeight={ '1/2' }
|
|
605
|
-
backgroundColor='5.layer.darker'
|
|
606
|
-
isRounded
|
|
607
|
-
className={ style.DragBar }
|
|
608
|
-
/>
|
|
609
|
-
</Box>
|
|
610
|
+
className={ style.DragBar }
|
|
611
|
+
/>
|
|
610
612
|
</Row.Center>
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
</Flex>
|
|
613
|
+
|
|
614
|
+
<Buttons.Button.Sub.R
|
|
615
|
+
color='cloud'
|
|
616
|
+
ssSphere={ 2 }
|
|
617
|
+
onClick={ () => {
|
|
618
|
+
Sheet.close( sheetID! );
|
|
619
|
+
} }
|
|
620
|
+
>
|
|
621
|
+
<FAI.Times />
|
|
622
|
+
</Buttons.Button.Sub.R>
|
|
623
|
+
</Row.Separate>
|
|
623
624
|
<Box
|
|
624
625
|
backgroundColor={ '1.layer.base' }
|
|
625
626
|
flexSizing={ 0 }
|
|
@@ -640,6 +641,8 @@ const Comps = {
|
|
|
640
641
|
close_option,
|
|
641
642
|
hold_state,
|
|
642
643
|
overwrap,
|
|
644
|
+
openAfter,
|
|
645
|
+
closeAfter,
|
|
643
646
|
...others
|
|
644
647
|
} = params;
|
|
645
648
|
|
|
@@ -896,7 +899,7 @@ const Sheet: amotify.fn.Sheet.Methods = {
|
|
|
896
899
|
Sheet.close( sheetID! );
|
|
897
900
|
} }
|
|
898
901
|
>
|
|
899
|
-
<
|
|
902
|
+
<FAI.Times />
|
|
900
903
|
</Buttons.Button.Sub.R>
|
|
901
904
|
</Row.Separate>
|
|
902
905
|
<Layout.SwipeView
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
@use '@props' as *;
|
|
2
|
-
//SheetBase
|
|
3
2
|
:global {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
position: sticky;
|
|
3
|
+
.AMOTIFY_be_sheet {
|
|
4
|
+
position: fixed;
|
|
5
|
+
// position: sticky;
|
|
7
6
|
top: 0;
|
|
8
7
|
left: 0;
|
|
9
8
|
right: 0;
|
|
@@ -14,32 +13,26 @@
|
|
|
14
13
|
}
|
|
15
14
|
html {
|
|
16
15
|
&.FixHeight {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
transition: $animation-time-long;
|
|
24
|
-
}
|
|
16
|
+
.FixScroll {
|
|
17
|
+
overflow: hidden !important;
|
|
18
|
+
min-height: 0 !important;
|
|
19
|
+
height: calc($viewHeight );
|
|
20
|
+
width: calc(100vw);
|
|
21
|
+
transition: $animation-time-long;
|
|
25
22
|
}
|
|
26
23
|
}
|
|
27
24
|
&.FloatMainSheet {
|
|
28
|
-
@media (max-width:$breakPoint) {
|
|
29
|
-
&.
|
|
30
|
-
|
|
31
|
-
overflow: hidden;
|
|
32
|
-
}
|
|
25
|
+
@media (max-width:$breakPoint ) {
|
|
26
|
+
&.Type_bottom {
|
|
27
|
+
overflow: hidden;
|
|
33
28
|
}
|
|
34
29
|
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
border-radius: calc(calc(2vw + 2vh) / 2);
|
|
42
|
-
}
|
|
30
|
+
.FixScroll {
|
|
31
|
+
opacity: .8 !important;
|
|
32
|
+
pointer-events: none;
|
|
33
|
+
transform-origin: center center;
|
|
34
|
+
transform: scale(.96);
|
|
35
|
+
border-radius: calc(calc(2vw + 2vh) / 2);
|
|
43
36
|
}
|
|
44
37
|
}
|
|
45
38
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import {
|
|
2
|
+
baseElements,
|
|
2
3
|
LaunchReactApplication,
|
|
3
4
|
useStore,
|
|
4
5
|
React
|
|
@@ -6,7 +7,7 @@ import {
|
|
|
6
7
|
import {
|
|
7
8
|
Box,
|
|
8
9
|
Flex,
|
|
9
|
-
|
|
10
|
+
FAI
|
|
10
11
|
} from '@atoms';
|
|
11
12
|
import {
|
|
12
13
|
Row,
|
|
@@ -104,7 +105,7 @@ const Cell: React.FC<ElementParams> = ( props ) => {
|
|
|
104
105
|
SnackBar.remove( snackID );
|
|
105
106
|
} }
|
|
106
107
|
>
|
|
107
|
-
<
|
|
108
|
+
<FAI.Times />
|
|
108
109
|
</Buttons.Button.Clear.R>
|
|
109
110
|
</Row.Separate>
|
|
110
111
|
}
|
|
@@ -204,7 +205,8 @@ const SnackBarsWrap: React.FC<{}> = () => {
|
|
|
204
205
|
}
|
|
205
206
|
|
|
206
207
|
LaunchReactApplication( {
|
|
207
|
-
|
|
208
|
+
isRoot: false,
|
|
209
|
+
baseElement: '#' + baseElements.snackbarID,
|
|
208
210
|
reactElement: <SnackBarsWrap />,
|
|
209
211
|
nonRouter: true
|
|
210
212
|
} );
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
Flex,
|
|
7
7
|
Box,
|
|
8
8
|
Span,
|
|
9
|
-
|
|
9
|
+
FAI
|
|
10
10
|
} from '@atoms';
|
|
11
11
|
import {
|
|
12
12
|
Column,
|
|
@@ -18,6 +18,11 @@ import {
|
|
|
18
18
|
Sheet,
|
|
19
19
|
} from '@fn';
|
|
20
20
|
|
|
21
|
+
import { faArrowUp } from '@fortawesome/pro-solid-svg-icons/faArrowUp';
|
|
22
|
+
import { faArrowDown } from '@fortawesome/pro-solid-svg-icons/faArrowDown';
|
|
23
|
+
import { faArrowUpArrowDown } from '@fortawesome/pro-solid-svg-icons/faArrowUpArrowDown';
|
|
24
|
+
import { faBarsFilter } from '@fortawesome/pro-solid-svg-icons/faBarsFilter';
|
|
25
|
+
|
|
21
26
|
import style from '../style.module.scss';
|
|
22
27
|
|
|
23
28
|
import {
|
|
@@ -144,12 +149,14 @@ const Components = {
|
|
|
144
149
|
let orderable = order.enabled && order.column[ colIndex ];
|
|
145
150
|
let filterable = filter.enabled && filter.column[ colIndex ];
|
|
146
151
|
|
|
147
|
-
let OrderButton = orderable ? <
|
|
152
|
+
let OrderButton = orderable ? <FAI
|
|
148
153
|
fontSize={ '1.mini' }
|
|
149
154
|
fontColor={ colIndex == orderIndex ? '1.clear' : '5.translucent' }
|
|
150
|
-
|
|
151
|
-
?
|
|
152
|
-
|
|
155
|
+
icon={ colIndex == orderIndex
|
|
156
|
+
? orderDirection == 'DESC'
|
|
157
|
+
? faArrowDown
|
|
158
|
+
: faArrowUp
|
|
159
|
+
: faArrowUpArrowDown }
|
|
153
160
|
/> : null;
|
|
154
161
|
|
|
155
162
|
let FilterButton = <></>;
|
|
@@ -268,14 +275,13 @@ const Components = {
|
|
|
268
275
|
fontSize={ '1.mini' }
|
|
269
276
|
className={ style[ 'Filtering_' + !!filterList.length ] }
|
|
270
277
|
id={ FilterModaButtonID }
|
|
271
|
-
children={ <FAIcon
|
|
272
|
-
d='bars-filter'
|
|
273
|
-
/> }
|
|
274
278
|
onClick={ ( event ) => {
|
|
275
279
|
event.stopPropagation();
|
|
276
280
|
Sheet.open( SheetParams );
|
|
277
281
|
} }
|
|
278
|
-
|
|
282
|
+
>
|
|
283
|
+
<FAI icon={ faBarsFilter } />
|
|
284
|
+
</Buttons.Button.Sub.S>
|
|
279
285
|
</Box>
|
|
280
286
|
}
|
|
281
287
|
}
|
|
@@ -828,7 +834,7 @@ export const DataComps: amotify.fn.Tables.Data.Comps = {
|
|
|
828
834
|
fontColor={ '5.translucent' }
|
|
829
835
|
right={ '2/3' }
|
|
830
836
|
>
|
|
831
|
-
<
|
|
837
|
+
<FAI.Search />
|
|
832
838
|
</Input.Comps.RightIcon> }
|
|
833
839
|
override='force'
|
|
834
840
|
value={ status.searchKeyword }
|
|
@@ -896,7 +902,7 @@ export const DataComps: amotify.fn.Tables.Data.Comps = {
|
|
|
896
902
|
DataFNs.setPageIndex( params.tableID,status.paging.currentPageIndex - 1 );
|
|
897
903
|
} }
|
|
898
904
|
>
|
|
899
|
-
<
|
|
905
|
+
<FAI.ChevronLeft />
|
|
900
906
|
</Buttons.Button.Sub.R>
|
|
901
907
|
<Buttons.Button.Sub.R
|
|
902
908
|
ssSphere={ 3 }
|
|
@@ -908,7 +914,7 @@ export const DataComps: amotify.fn.Tables.Data.Comps = {
|
|
|
908
914
|
DataFNs.setPageIndex( params.tableID,status.paging.currentPageIndex + 1 );
|
|
909
915
|
} }
|
|
910
916
|
>
|
|
911
|
-
<
|
|
917
|
+
<FAI.ChevronRight />
|
|
912
918
|
</Buttons.Button.Sub.R>
|
|
913
919
|
</Row.Right>
|
|
914
920
|
</Row.Center> );
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
React
|
|
4
4
|
} from '@global';
|
|
5
5
|
import {
|
|
6
|
-
|
|
6
|
+
FAI
|
|
7
7
|
} from '@atoms';
|
|
8
8
|
import {
|
|
9
9
|
Buttons,
|
|
@@ -15,6 +15,8 @@ import {
|
|
|
15
15
|
DefaultCellSystemStyles
|
|
16
16
|
} from '../_';
|
|
17
17
|
|
|
18
|
+
import { faGripDotsVertical } from '@fortawesome/pro-solid-svg-icons/faGripDotsVertical';
|
|
19
|
+
|
|
18
20
|
import style from '../style.module.scss';
|
|
19
21
|
|
|
20
22
|
const HeadRow: React.FC<amotify.fn.Tables.Drag.Params> = ( props ) => {
|
|
@@ -141,9 +143,7 @@ const BodyRows: React.FC<amotify.fn.Tables.Drag.Params> = ( props ) => {
|
|
|
141
143
|
} );
|
|
142
144
|
} }
|
|
143
145
|
>
|
|
144
|
-
<
|
|
145
|
-
d='grip-dots-vertical'
|
|
146
|
-
/>
|
|
146
|
+
<FAI icon={ faGripDotsVertical } />
|
|
147
147
|
</Buttons.Button.Clear.R>
|
|
148
148
|
</Comps.TH> );
|
|
149
149
|
}
|
|
@@ -205,7 +205,7 @@ const BodyRows: React.FC<amotify.fn.Tables.Drag.Params> = ( props ) => {
|
|
|
205
205
|
cellClassName
|
|
206
206
|
].join( ' ' ) }
|
|
207
207
|
>
|
|
208
|
-
<
|
|
208
|
+
<FAI.ArrowRight
|
|
209
209
|
fontColor='theme'
|
|
210
210
|
/>
|
|
211
211
|
</Comps.TH> );
|
|
@@ -315,15 +315,13 @@ export const DragTable: React.FC<amotify.fn.Tables.Drag.Params> = ( params ) =>
|
|
|
315
315
|
parent: event.currentTarget,
|
|
316
316
|
padding: [ 0,1 ],
|
|
317
317
|
content: <Tooltips.Comps.Body>
|
|
318
|
-
<
|
|
319
|
-
d='grip-dots-vertical'
|
|
320
|
-
/>
|
|
318
|
+
<FAI icon={ faGripDotsVertical } />
|
|
321
319
|
ボタンをドラッグして順序を変更
|
|
322
320
|
</Tooltips.Comps.Body>
|
|
323
321
|
} );
|
|
324
322
|
} }
|
|
325
323
|
>
|
|
326
|
-
<
|
|
324
|
+
<FAI.QuestionCircle />
|
|
327
325
|
</Buttons.Button.Plain>,
|
|
328
326
|
padding: [ 0,1 ],
|
|
329
327
|
unitWidth: 4
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
|
|
6
6
|
import {
|
|
7
7
|
Box,
|
|
8
|
-
|
|
8
|
+
FAI
|
|
9
9
|
} from '@atoms';
|
|
10
10
|
|
|
11
11
|
export const Comps: amotify.fn.Tables.CompsMethods = {
|
|
@@ -27,7 +27,7 @@ export const Comps: amotify.fn.Tables.CompsMethods = {
|
|
|
27
27
|
type: 'td',
|
|
28
28
|
unitWidth: 4,
|
|
29
29
|
// data: '',
|
|
30
|
-
children: <
|
|
30
|
+
children: <FAI.AngleRight
|
|
31
31
|
fontColor={ 'theme' }
|
|
32
32
|
fontSize={ '4.thirdTitle' }
|
|
33
33
|
/>
|
|
@@ -1,16 +1,18 @@
|
|
|
1
|
+
import { baseElements } from '@global';
|
|
1
2
|
import React from 'react';
|
|
2
3
|
import ReactDOMCLient from 'react-dom/client';
|
|
3
4
|
import * as ReactRouterDom from 'react-router-dom';
|
|
4
5
|
|
|
5
6
|
export const LaunchReactApplication: amotify.global.LaunchReactApplicationParams = ( props ) => {
|
|
6
7
|
let {
|
|
7
|
-
baseElement = '#
|
|
8
|
+
baseElement = '#' + baseElements.rootID,
|
|
8
9
|
reactElement,
|
|
9
10
|
nonRouter = false,
|
|
11
|
+
isRoot = true,
|
|
10
12
|
appearances
|
|
11
13
|
} = props;
|
|
12
|
-
let
|
|
13
|
-
if ( !
|
|
14
|
+
let base = $( baseElement );
|
|
15
|
+
if ( !base[ 0 ] || !reactElement ) return;
|
|
14
16
|
if ( appearances ) {
|
|
15
17
|
let {
|
|
16
18
|
roundness,
|
|
@@ -26,6 +28,16 @@ export const LaunchReactApplication: amotify.global.LaunchReactApplicationParams
|
|
|
26
28
|
}
|
|
27
29
|
|
|
28
30
|
let reactDom = nonRouter ? reactElement : <ReactRouterDom.BrowserRouter children={ reactElement } />;
|
|
29
|
-
|
|
30
|
-
|
|
31
|
+
|
|
32
|
+
if ( isRoot ) {
|
|
33
|
+
$( 'body' ).addClass( 'AMOTIFY_be_body' );
|
|
34
|
+
base.addClass( 'AMOTIFY_be AMOTIFY_be_root AMOTIFY_be_origin' );
|
|
35
|
+
if ( base[ 0 ].id ) {
|
|
36
|
+
baseElements.rootID = base[ 0 ].id;
|
|
37
|
+
} else {
|
|
38
|
+
base.setAttribute( 'id',baseElements.rootID );
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
ReactDOMCLient.createRoot( base[ 0 ] ).render( <>{ reactDom }</> );
|
|
31
43
|
}
|
package/src/launch.tsx
CHANGED
|
@@ -1,8 +1,16 @@
|
|
|
1
|
-
import 'jsmin-front
|
|
1
|
+
import 'jsmin-front/@types';
|
|
2
|
+
import 'jsmin-front/dist/jsmin';
|
|
2
3
|
|
|
3
4
|
import '../@types/_';
|
|
4
5
|
|
|
5
6
|
if ( !global.$ ) console.log( `%c※can not find global.$,please read Jsmin to launch amotify.`,'color:orange;' );
|
|
7
|
+
import { launchID } from './@variables';
|
|
8
|
+
export const baseElements = {
|
|
9
|
+
rootID: 'ROOT_' + launchID,
|
|
10
|
+
loaderID: 'LOADER_' + launchID,
|
|
11
|
+
sheetID: 'SHEET_' + launchID,
|
|
12
|
+
snackbarID: 'SNACKBARS_' + launchID
|
|
13
|
+
}
|
|
6
14
|
|
|
7
15
|
let publicURI = 'https://public.comun.jp/';
|
|
8
16
|
export { publicURI }
|
|
@@ -22,7 +30,7 @@ import {
|
|
|
22
30
|
import {
|
|
23
31
|
Flex,
|
|
24
32
|
FlexBr,
|
|
25
|
-
|
|
33
|
+
FAI,
|
|
26
34
|
Placeholder,
|
|
27
35
|
Grid,
|
|
28
36
|
Logo,
|
|
@@ -40,7 +48,6 @@ import {
|
|
|
40
48
|
Row
|
|
41
49
|
} from '@mols';
|
|
42
50
|
import {
|
|
43
|
-
DisplayStyleInput
|
|
44
51
|
} from '@orgs';
|
|
45
52
|
import {
|
|
46
53
|
PlayGround
|
|
@@ -73,9 +80,9 @@ const amotify: amotify = {
|
|
|
73
80
|
ReactRouterDOM,
|
|
74
81
|
pageTransit,useStore,useRecycle,StyleConverter,LaunchReactApplication
|
|
75
82
|
},
|
|
76
|
-
atoms: { Flex,FlexBr,
|
|
83
|
+
atoms: { Flex,FlexBr,FAI,Placeholder,Grid,Logo,Box,Span,Paragraph,Img },
|
|
77
84
|
mols: { List,Accordion,LinkifyText,Text,Column,Row },
|
|
78
|
-
orgs: {
|
|
85
|
+
orgs: {},
|
|
79
86
|
temps: { PlayGround },
|
|
80
87
|
fn: { Buttons,Input,Table,Layout,Sheet,SnackBar,Loader,Tooltips,Effects,Cropper }
|
|
81
88
|
}
|
|
@@ -14,6 +14,7 @@ const Component: React.FC<amotify.mols.Accordion.Params> = ( params ) => {
|
|
|
14
14
|
accordionID = '',
|
|
15
15
|
slideAnimation = 'fast',
|
|
16
16
|
defaultOpen = false,
|
|
17
|
+
override = false,
|
|
17
18
|
...others
|
|
18
19
|
} = params;
|
|
19
20
|
|
|
@@ -21,7 +22,9 @@ const Component: React.FC<amotify.mols.Accordion.Params> = ( params ) => {
|
|
|
21
22
|
let [ val_contentID ] = React.useState( $.uuidGen() );
|
|
22
23
|
let [ val_open,set_open ] = React.useState( defaultOpen );
|
|
23
24
|
|
|
24
|
-
if ( val_open != defaultOpen )
|
|
25
|
+
if ( val_open != defaultOpen ) {
|
|
26
|
+
if ( override ) set_open( defaultOpen );
|
|
27
|
+
}
|
|
25
28
|
|
|
26
29
|
let Query = '[data-accordion-content-id="' + val_contentID + '"]';
|
|
27
30
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import {
|
|
3
|
-
|
|
3
|
+
FAI
|
|
4
4
|
} from '@atoms';
|
|
5
5
|
import {
|
|
6
6
|
Buttons
|
|
@@ -10,7 +10,6 @@ const {
|
|
|
10
10
|
Anchor
|
|
11
11
|
} = Buttons;
|
|
12
12
|
|
|
13
|
-
|
|
14
13
|
export const LinkifyText: React.FC<amotify.mols.LinkifyTextProps> = ( props ) => {
|
|
15
14
|
let {
|
|
16
15
|
text,
|
|
@@ -39,7 +38,7 @@ export const LinkifyText: React.FC<amotify.mols.LinkifyTextProps> = ( props ) =>
|
|
|
39
38
|
href={ url }
|
|
40
39
|
newTab
|
|
41
40
|
>
|
|
42
|
-
{ url }
|
|
41
|
+
{ url }
|
|
43
42
|
</Anchor.Link> );
|
|
44
43
|
}
|
|
45
44
|
}
|
package/src/preload.tsx
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { baseElements } from './launch';
|
|
2
|
+
|
|
1
3
|
let tags: Jsmin.CreateElement.Args[] = [
|
|
2
4
|
{
|
|
3
5
|
tag: 'meta',parent: document.head,attr: {
|
|
@@ -24,42 +26,29 @@ let tags: Jsmin.CreateElement.Args[] = [
|
|
|
24
26
|
rel: 'stylesheet',
|
|
25
27
|
async: true
|
|
26
28
|
}
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
tag: 'script',parent: document.head,attr: {
|
|
30
|
-
src: 'https://kit.fontawesome.com/6745173b38.js',async: true
|
|
31
|
-
}
|
|
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
|
-
{
|
|
29
|
+
},{
|
|
52
30
|
tag: 'meta',parent: document.head,attr: {
|
|
53
31
|
name: 'theme-color',
|
|
54
32
|
content: '#45515c',
|
|
55
33
|
},
|
|
56
34
|
id: 'ThemeColorMetaTag'
|
|
35
|
+
},{
|
|
36
|
+
parent: document.body,
|
|
37
|
+
id: baseElements.sheetID,
|
|
38
|
+
className: 'AMOTIFY_be AMOTIFY_be_sheet',
|
|
39
|
+
},{
|
|
40
|
+
parent: document.body,
|
|
41
|
+
id: baseElements.snackbarID,
|
|
42
|
+
className: 'AMOTIFY_be AMOTIFY_be_snackbar',
|
|
43
|
+
},{
|
|
44
|
+
parent: document.body,
|
|
45
|
+
id: baseElements.loaderID,
|
|
46
|
+
className: 'AMOTIFY_be AMOTIFY_be_loader',
|
|
47
|
+
},{
|
|
48
|
+
parent: document.body,
|
|
49
|
+
id: baseElements.rootID,
|
|
50
|
+
className: 'AMOTIFY_be AMOTIFY_be_root',
|
|
57
51
|
},
|
|
58
|
-
{ parent: document.body,id: 'SHEET' },
|
|
59
|
-
{ parent: document.body,id: 'TOOLTIPS' },
|
|
60
|
-
{ parent: document.body,id: 'SNACKBARS' },
|
|
61
|
-
{ parent: document.body,id: 'LOADER' },
|
|
62
|
-
{ parent: document.body,id: 'ROOT' },
|
|
63
52
|
];
|
|
64
53
|
for ( let tag of tags ) {
|
|
65
54
|
let { id } = tag;
|
package/tsconfig.json
CHANGED
|
@@ -24,13 +24,24 @@
|
|
|
24
24
|
"@styleSet": [
|
|
25
25
|
"src/@styles/styleSet"
|
|
26
26
|
],
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
"@
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
"@
|
|
27
|
+
"@global": [
|
|
28
|
+
"src/@global"
|
|
29
|
+
],
|
|
30
|
+
"@atoms": [
|
|
31
|
+
"src/@atoms"
|
|
32
|
+
],
|
|
33
|
+
"@mols": [
|
|
34
|
+
"src/@molecules"
|
|
35
|
+
],
|
|
36
|
+
"@orgs": [
|
|
37
|
+
"src/@organisms"
|
|
38
|
+
],
|
|
39
|
+
"@temps": [
|
|
40
|
+
"src/@templates"
|
|
41
|
+
],
|
|
42
|
+
"@fn": [
|
|
43
|
+
"src/@functions"
|
|
44
|
+
],
|
|
34
45
|
},
|
|
35
46
|
"strict": true,
|
|
36
47
|
"skipLibCheck": true,
|
|
@@ -47,7 +58,7 @@
|
|
|
47
58
|
// "noUnusedParameters": true,
|
|
48
59
|
"strictNullChecks": true,
|
|
49
60
|
"esModuleInterop": true,
|
|
50
|
-
"noEmitOnError":
|
|
61
|
+
"noEmitOnError": false
|
|
51
62
|
},
|
|
52
63
|
"exclude": [
|
|
53
64
|
"node_modules",
|