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.
- package/@types/_.tsx +5 -5
- package/@types/amot.tsx +11 -11
- package/@types/fn.tsx +14 -1
- package/@types/module.tsx +1 -1
- package/dist/amotify.js +1 -1
- package/dist/amotify.min.css +3 -3
- package/package.json +1 -1
- package/src/@atoms.tsx +3 -3
- package/src/@functions.tsx +11 -11
- package/src/@global.tsx +40 -40
- package/src/@jsminAmotifyExtension/_.tsx +4 -4
- package/src/@jsminAmotifyExtension/fetch.tsx +30 -30
- package/src/@jsminAmotifyExtension/formCollect.tsx +32 -32
- package/src/@jsminAmotifyExtension/spreadSheet.tsx +71 -71
- package/src/@jsminAmotifyExtension/variables.tsx +38 -38
- package/src/@molecules.tsx +6 -6
- package/src/@styles/props.scss +1 -1
- package/src/@styles/var.scss +0 -1
- package/src/@templates.tsx +1 -1
- package/src/@variables.tsx +2 -2
- package/src/atoms/FAI/parts.tsx +105 -105
- package/src/atoms/Logo/parts.tsx +19 -19
- package/src/atoms/Various/parts.tsx +26 -26
- package/src/config.tsx +62 -59
- package/src/functions/Button/_.tsx +49 -49
- package/src/functions/Cropper/parts.tsx +249 -249
- package/src/functions/Effects/Fade.tsx +18 -18
- package/src/functions/Effects/Ripple.tsx +24 -24
- package/src/functions/Effects/_.tsx +5 -5
- package/src/functions/Input/Chips/Selector.tsx +107 -107
- package/src/functions/Input/Chips/_.tsx +66 -66
- package/src/functions/Input/Contenteditable.tsx +18 -18
- package/src/functions/Input/DigitCharacters.tsx +48 -48
- package/src/functions/Input/File/_.tsx +114 -114
- package/src/functions/Input/Hidden.tsx +3 -3
- package/src/functions/Input/List/_.tsx +61 -61
- package/src/functions/Input/RichSelect/_.tsx +38 -38
- package/src/functions/Input/Segmented/_.tsx +30 -30
- package/src/functions/Input/Select/_.tsx +42 -42
- package/src/functions/Input/Slider/_.tsx +93 -93
- package/src/functions/Input/Switch/_.tsx +21 -21
- package/src/functions/Input/Text.tsx +99 -97
- package/src/functions/Input/TextArea.tsx +17 -17
- package/src/functions/Input/Time/Picker.tsx +199 -199
- package/src/functions/Input/Time/_.tsx +173 -173
- package/src/functions/Input/_.tsx +135 -135
- package/src/functions/Input/core.tsx +96 -96
- package/src/functions/Inputs/_.tsx +1 -1
- package/src/functions/Inputs/text.tsx +5 -5
- package/src/functions/Layout/PageNotFound.tsx +6 -6
- package/src/functions/Layout/PageRouter.tsx +28 -44
- package/src/functions/Layout/PageViewController/parts.tsx +7 -7
- package/src/functions/Layout/Plate.tsx +5 -5
- package/src/functions/Layout/RootViewController/parts.tsx +94 -71
- package/src/functions/Layout/RootViewController/style.module.scss +0 -1
- package/src/functions/Layout/SwipeView/parts.tsx +90 -90
- package/src/functions/Layout/TabBar.tsx +10 -10
- package/src/functions/Layout/_.tsx +7 -7
- package/src/functions/Loader/corner.tsx +10 -10
- package/src/functions/Loader/mini.tsx +25 -25
- package/src/functions/Loader/parts.tsx +31 -31
- package/src/functions/Loader/top.tsx +10 -10
- package/src/functions/Sheet/parts.tsx +219 -219
- package/src/functions/Sheet/style.module.scss +0 -20
- package/src/functions/SnackBar/parts.tsx +50 -50
- package/src/functions/Table/Data/parts.tsx +202 -202
- package/src/functions/Table/Drag/parts.tsx +76 -76
- package/src/functions/Table/Normal/parts.tsx +23 -23
- package/src/functions/Table/_.tsx +33 -33
- package/src/functions/Tooltips/parts.tsx +7 -7
- package/src/global/LaunchReactApplication.tsx +28 -28
- package/src/global/styleConverter.tsx +133 -133
- package/src/launch.tsx +27 -27
- package/src/molecules/Accordion/parts.tsx +41 -41
- package/src/molecules/LinkifyText/parts.tsx +18 -18
- package/src/molecules/List.tsx +6 -6
- package/src/preload.tsx +5 -45
- package/src/templates/PlayGround/parts.tsx +8 -8
- package/webpack.config.js +9 -9
|
@@ -2,19 +2,19 @@ import {
|
|
|
2
2
|
React,
|
|
3
3
|
useRecycle,
|
|
4
4
|
pageTransit
|
|
5
|
-
} from '@global'
|
|
5
|
+
} from '@global'
|
|
6
6
|
import {
|
|
7
7
|
Box,
|
|
8
8
|
Flex,
|
|
9
|
-
} from '@atoms'
|
|
9
|
+
} from '@atoms'
|
|
10
10
|
import {
|
|
11
11
|
Column
|
|
12
|
-
} from '@mols'
|
|
12
|
+
} from '@mols'
|
|
13
13
|
import {
|
|
14
14
|
Buttons
|
|
15
|
-
} from '@fn'
|
|
15
|
+
} from '@fn'
|
|
16
16
|
|
|
17
|
-
import style from './style.module.scss'
|
|
17
|
+
import style from './style.module.scss'
|
|
18
18
|
|
|
19
19
|
export const RootViewController: amotify.fn.Layout.RootViewController.Methods = {
|
|
20
20
|
Base: ( params ) => {
|
|
@@ -25,32 +25,36 @@ export const RootViewController: amotify.fn.Layout.RootViewController.Methods =
|
|
|
25
25
|
children,
|
|
26
26
|
className,
|
|
27
27
|
...others
|
|
28
|
-
} = params
|
|
29
|
-
let Key = useRecycle.set( 'RootViewController' )
|
|
28
|
+
} = params
|
|
29
|
+
let Key = useRecycle.set( 'RootViewController' )
|
|
30
30
|
|
|
31
31
|
React.useEffect( () => {
|
|
32
|
-
|
|
32
|
+
RootViewController.fn.updateCSSProperty.reset()
|
|
33
33
|
setTimeout( () => {
|
|
34
|
-
|
|
35
|
-
},100 )
|
|
34
|
+
RootViewController.fn.updateCSSProperty.reset()
|
|
35
|
+
},100 )
|
|
36
36
|
|
|
37
|
-
let getSideNavigationHeight = 'ResizeCB'
|
|
38
|
-
let beforeunload = 'RemovePageEventCB'
|
|
37
|
+
let getSideNavigationHeight = 'ResizeCB'
|
|
38
|
+
let beforeunload = 'RemovePageEventCB'
|
|
39
39
|
|
|
40
40
|
$( window ).addEvent( {
|
|
41
41
|
eventType: 'resize',
|
|
42
42
|
eventID: getSideNavigationHeight,
|
|
43
43
|
callback: () => {
|
|
44
|
-
if (
|
|
44
|
+
if ( amotify.config.device.isPhonepoint() ) return;
|
|
45
|
+
$.interval.clear( '__RVC_calcHeights' )
|
|
46
|
+
$.interval.standBy( '__RVC_calcHeights',300,() => {
|
|
47
|
+
RootViewController.fn.updateCSSProperty.reset()
|
|
48
|
+
} )
|
|
45
49
|
}
|
|
46
50
|
} )
|
|
47
51
|
return () => {
|
|
48
|
-
$( window ).removeEvent( beforeunload )
|
|
49
|
-
$( window ).removeEvent( getSideNavigationHeight )
|
|
52
|
+
$( window ).removeEvent( beforeunload )
|
|
53
|
+
$( window ).removeEvent( getSideNavigationHeight )
|
|
50
54
|
}
|
|
51
|
-
},[] )
|
|
55
|
+
},[] )
|
|
52
56
|
|
|
53
|
-
let Chilren: ReactElement = children
|
|
57
|
+
let Chilren: ReactElement = children
|
|
54
58
|
|
|
55
59
|
return <Column
|
|
56
60
|
key={ Key }
|
|
@@ -84,30 +88,20 @@ export const RootViewController: amotify.fn.Layout.RootViewController.Methods =
|
|
|
84
88
|
</Box>
|
|
85
89
|
</Flex>
|
|
86
90
|
{ footerNavigation }
|
|
87
|
-
</Column
|
|
91
|
+
</Column>
|
|
88
92
|
},
|
|
89
93
|
TopNavigation: ( params ) => {
|
|
90
94
|
let {
|
|
91
95
|
className,
|
|
92
96
|
children,
|
|
93
97
|
...others
|
|
94
|
-
} = params
|
|
98
|
+
} = params
|
|
95
99
|
|
|
96
|
-
let [ val_componentID ] = React.useState( $.uuidGen() )
|
|
100
|
+
let [ val_componentID ] = React.useState( $.uuidGen() )
|
|
97
101
|
|
|
98
102
|
React.useEffect( () => {
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
let topBase = height;
|
|
102
|
-
|
|
103
|
-
if ( $( '#TopNavigation' ).getStyleProperty( 'position' ) != 'sticky' ) {
|
|
104
|
-
topBase = 0;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
$( document.body )
|
|
108
|
-
.setStyleProperty( '--topNavHeight',height + 'px' )
|
|
109
|
-
.setStyleProperty( '--topBase',topBase + 'px' );
|
|
110
|
-
},[] );
|
|
103
|
+
RootViewController.fn.updateCSSProperty.topNav()
|
|
104
|
+
},[] )
|
|
111
105
|
|
|
112
106
|
return <Flex
|
|
113
107
|
key={ val_componentID }
|
|
@@ -118,21 +112,21 @@ export const RootViewController: amotify.fn.Layout.RootViewController.Methods =
|
|
|
118
112
|
top={ 0 }
|
|
119
113
|
backgroundColor='1.layer.base'
|
|
120
114
|
{ ...others }
|
|
121
|
-
id='
|
|
115
|
+
id='__RVC_TopNavigation'
|
|
122
116
|
className={ [
|
|
123
117
|
className,
|
|
124
118
|
style.TopNav
|
|
125
119
|
].join( ' ' ) }
|
|
126
120
|
>
|
|
127
121
|
{ children }
|
|
128
|
-
</Flex
|
|
122
|
+
</Flex>
|
|
129
123
|
},
|
|
130
124
|
SideNavigation: ( params ) => {
|
|
131
125
|
let {
|
|
132
126
|
className = '',
|
|
133
127
|
baseStyles,
|
|
134
128
|
...others
|
|
135
|
-
} = params
|
|
129
|
+
} = params
|
|
136
130
|
|
|
137
131
|
return <Box
|
|
138
132
|
flexSizing={ 'none' }
|
|
@@ -142,21 +136,19 @@ export const RootViewController: amotify.fn.Layout.RootViewController.Methods =
|
|
|
142
136
|
].join( ' ' ) }
|
|
143
137
|
minHeight='sideNavigationHeight'
|
|
144
138
|
{ ...others }
|
|
145
|
-
|
|
139
|
+
/>
|
|
146
140
|
},
|
|
147
141
|
FooterNavigation: ( params ) => {
|
|
148
142
|
let {
|
|
149
143
|
className = '',
|
|
150
144
|
baseStyles,
|
|
151
145
|
...others
|
|
152
|
-
} = params
|
|
153
|
-
let [ val_componentID ] = React.useState( $.uuidGen() )
|
|
146
|
+
} = params
|
|
147
|
+
let [ val_componentID ] = React.useState( $.uuidGen() )
|
|
154
148
|
|
|
155
149
|
React.useEffect( () => {
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
$( document.body ).setStyleProperty( '--footerNavHeight',height + 'px' );
|
|
159
|
-
},[] );
|
|
150
|
+
RootViewController.fn.updateCSSProperty.footer()
|
|
151
|
+
},[] )
|
|
160
152
|
|
|
161
153
|
return <Flex
|
|
162
154
|
data-id={ val_componentID }
|
|
@@ -166,13 +158,8 @@ export const RootViewController: amotify.fn.Layout.RootViewController.Methods =
|
|
|
166
158
|
overflow={ 'auto' }
|
|
167
159
|
backgroundColor='1.layer.base'
|
|
168
160
|
paddingBottom={ 'safeAreaBottom' }
|
|
169
|
-
display='none'
|
|
170
161
|
{ ...baseStyles }
|
|
171
|
-
id='
|
|
172
|
-
UnderBreakPointStyles={ {
|
|
173
|
-
display: 'flex',
|
|
174
|
-
...baseStyles?.UnderBreakPointStyles
|
|
175
|
-
} }
|
|
162
|
+
id='__RVC_FooterNavigation'
|
|
176
163
|
className={ [
|
|
177
164
|
style.FooterNav,
|
|
178
165
|
className
|
|
@@ -185,7 +172,7 @@ export const RootViewController: amotify.fn.Layout.RootViewController.Methods =
|
|
|
185
172
|
margin={ 'auto' }
|
|
186
173
|
{ ...others }
|
|
187
174
|
/>
|
|
188
|
-
</Flex
|
|
175
|
+
</Flex>
|
|
189
176
|
},
|
|
190
177
|
Comps: {
|
|
191
178
|
Button: ( params ) => {
|
|
@@ -195,31 +182,31 @@ export const RootViewController: amotify.fn.Layout.RootViewController.Methods =
|
|
|
195
182
|
uriGroup,
|
|
196
183
|
activeClassName = '',
|
|
197
184
|
...others
|
|
198
|
-
} = params
|
|
185
|
+
} = params
|
|
199
186
|
|
|
200
|
-
let groups = $.flatArray( uriGroup )
|
|
187
|
+
let groups = $.flatArray( uriGroup )
|
|
201
188
|
|
|
202
|
-
let currentURL = location.pathname
|
|
189
|
+
let currentURL = location.pathname
|
|
203
190
|
|
|
204
191
|
{
|
|
205
|
-
let isCurrentURL = false
|
|
192
|
+
let isCurrentURL = false
|
|
206
193
|
if ( $.is.exist( uri ) && $.is.string( uri ) ) {
|
|
207
194
|
let url = [
|
|
208
195
|
location.origin,
|
|
209
196
|
uri.replace( /\//,'' )
|
|
210
|
-
].join( '/' )
|
|
211
|
-
isCurrentURL = currentURL == new URL( url ).pathname
|
|
197
|
+
].join( '/' )
|
|
198
|
+
isCurrentURL = currentURL == new URL( url ).pathname
|
|
212
199
|
}
|
|
213
200
|
|
|
214
201
|
if ( !isCurrentURL ) {
|
|
215
202
|
if ( groups.length ) {
|
|
216
203
|
for ( let group of groups ) {
|
|
217
|
-
if ( $.is.nullish( group ) ) continue
|
|
218
|
-
if ( !!currentURL.match( new RegExp( group ) ) ) isCurrentURL = true
|
|
204
|
+
if ( $.is.nullish( group ) ) continue
|
|
205
|
+
if ( !!currentURL.match( new RegExp( group ) ) ) isCurrentURL = true
|
|
219
206
|
}
|
|
220
207
|
}
|
|
221
208
|
}
|
|
222
|
-
isActive = isActive ?? isCurrentURL
|
|
209
|
+
isActive = isActive ?? isCurrentURL
|
|
223
210
|
}
|
|
224
211
|
|
|
225
212
|
return <Buttons.Button.Clear.R
|
|
@@ -240,11 +227,11 @@ export const RootViewController: amotify.fn.Layout.RootViewController.Methods =
|
|
|
240
227
|
backgroundColor: 'cloud'
|
|
241
228
|
} }
|
|
242
229
|
onClick={ ( event ) => {
|
|
243
|
-
if ( $.is.exist( uri ) && $.is.string( uri ) ) pageTransit.push( uri,event.ctrlKey || event.metaKey )
|
|
230
|
+
if ( $.is.exist( uri ) && $.is.string( uri ) ) pageTransit.push( uri,event.ctrlKey || event.metaKey )
|
|
244
231
|
} }
|
|
245
232
|
color={ 'cloud' }
|
|
246
233
|
{ ...others }
|
|
247
|
-
|
|
234
|
+
/>
|
|
248
235
|
},
|
|
249
236
|
Bar: ( params ) => ( <Box
|
|
250
237
|
flexSizing={ 'none' }
|
|
@@ -260,18 +247,54 @@ export const RootViewController: amotify.fn.Layout.RootViewController.Methods =
|
|
|
260
247
|
padding={ [ 0,1 ] }
|
|
261
248
|
{ ...params }
|
|
262
249
|
/> ),
|
|
263
|
-
}
|
|
264
|
-
|
|
250
|
+
},
|
|
251
|
+
fn: {
|
|
252
|
+
updateCSSProperty: {
|
|
253
|
+
topNav: () => {
|
|
254
|
+
let Body = $( document.body )
|
|
255
|
+
let TopNav = $( '#__RVC_TopNavigation' )
|
|
256
|
+
let topNavHeight = TopNav.position().height || 0
|
|
257
|
+
let topBase = topNavHeight
|
|
265
258
|
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
259
|
+
if ( TopNav.getStyleProperty( 'position' ) != 'sticky' ) {
|
|
260
|
+
topBase = 0
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
Body
|
|
264
|
+
.setStyleProperty( '--topNavHeight',topNavHeight + 'px' )
|
|
265
|
+
.setStyleProperty( '--topBase',topBase + 'px' )
|
|
266
|
+
},
|
|
267
|
+
footer: () => {
|
|
268
|
+
let Body = $( document.body )
|
|
269
|
+
let Footer = $( '#__RVC_FooterNavigation' )
|
|
270
|
+
let footerHeight = Footer.position().height || 0
|
|
271
|
+
|
|
272
|
+
Body
|
|
273
|
+
.setStyleProperty( '--footerNavHeight',footerHeight + 'px' )
|
|
274
|
+
},
|
|
275
|
+
reset: () => {
|
|
276
|
+
let Body = $( document.body )
|
|
277
|
+
let TopNav = $( '#__RVC_TopNavigation' )
|
|
278
|
+
let Footer = $( '#__RVC_FooterNavigation' )
|
|
279
|
+
let topNavHeight = TopNav.position().height || 0
|
|
280
|
+
let topBase = topNavHeight
|
|
281
|
+
let footerHeight = Footer.position().height || 0
|
|
269
282
|
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
283
|
+
if ( TopNav.getStyleProperty( 'position' ) != 'sticky' ) {
|
|
284
|
+
topBase = 0
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
let viewHeight = window.innerHeight
|
|
288
|
+
let contentHeight = viewHeight - topNavHeight - footerHeight
|
|
273
289
|
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
290
|
+
Body
|
|
291
|
+
.setStyleProperty( '--topNavHeight',topNavHeight + 'px' )
|
|
292
|
+
.setStyleProperty( '--topBase',topBase + 'px' )
|
|
293
|
+
.setStyleProperty( '--footerNavHeight',footerHeight + 'px' )
|
|
294
|
+
.setStyleProperty( '--viewHeight',viewHeight + 'px' )
|
|
295
|
+
.setStyleProperty( '--sideNavHeight',contentHeight + 'px' )
|
|
296
|
+
.setStyleProperty( '--contentHeight',contentHeight + 'px' )
|
|
297
|
+
},
|
|
298
|
+
}
|
|
299
|
+
}
|
|
277
300
|
}
|