amotify 0.0.6 → 0.0.8
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/dist/@jsminAmotifyExtension/formCollect.js +2 -2
- package/dist/Atoms/Logo/parts.js +11 -11
- package/dist/Atoms/Various/parts.js +5 -5
- package/dist/Functions/Button/_.js +5 -5
- package/dist/Functions/Cropper/parts.js +47 -47
- package/dist/Functions/Effects/Fade.js +5 -5
- package/dist/Functions/Input/Chips/Selector.js +32 -32
- package/dist/Functions/Input/Chips/_.js +10 -10
- package/dist/Functions/Input/DigitCharacters.js +8 -8
- package/dist/Functions/Input/File/_.js +33 -33
- package/dist/Functions/Input/List/_.js +17 -17
- package/dist/Functions/Input/Segmented/_.js +13 -13
- package/dist/Functions/Input/Select/_.js +12 -12
- package/dist/Functions/Input/Slider/_.js +16 -16
- package/dist/Functions/Input/Switch/_.js +12 -12
- package/dist/Functions/Input/Text.js +12 -12
- package/dist/Functions/Input/TextArea.js +4 -4
- package/dist/Functions/Input/Time/Picker.js +65 -65
- package/dist/Functions/Input/Time/_.js +10 -10
- package/dist/Functions/Input/_.js +31 -31
- package/dist/Functions/Input/core.js +27 -27
- package/dist/Functions/Inputs/text.js +2 -2
- package/dist/Functions/Layout/PageNotFound.js +15 -15
- package/dist/Functions/Layout/PageRouter.js +5 -5
- package/dist/Functions/Layout/PageViewController/parts.js +5 -5
- package/dist/Functions/Layout/Plate.js +2 -2
- package/dist/Functions/Layout/RootViewController/parts.js +22 -22
- package/dist/Functions/Layout/SwipeView/parts.js +6 -6
- package/dist/Functions/Layout/TabBar.js +7 -7
- package/dist/Functions/Loader/corner.js +13 -13
- package/dist/Functions/Loader/mini.js +4 -4
- package/dist/Functions/Loader/parts.js +9 -9
- package/dist/Functions/Loader/top.js +22 -22
- package/dist/Functions/Sheet/parts.js +46 -46
- package/dist/Functions/SnackBar/parts.js +16 -16
- package/dist/Functions/Table/Data/parts.js +72 -72
- package/dist/Functions/Table/Drag/parts.js +15 -15
- package/dist/Functions/Table/_.js +11 -11
- package/dist/Functions/Tooltips/parts.js +6 -6
- package/dist/Molecules/@export.js +14 -14
- package/dist/Molecules/Accordion/parts.js +10 -10
- package/dist/Molecules/LinkifyText/parts.js +4 -4
- package/dist/Molecules/List.js +3 -3
- package/dist/Organisms/DisplayStyleInput/darkmode.js +17 -17
- package/dist/Organisms/DisplayStyleInput/themeColor.js +25 -25
- package/dist/Templates/PlayGround/parts.js +22 -22
- package/dist/launch.js +12 -12
- package/package.json +1 -1
- package/public/amotify.js +47 -47
- package/src/@jsminAmotifyExtension/_.tsx +4 -0
- package/src/@jsminAmotifyExtension/fetch.tsx +107 -0
- package/src/@jsminAmotifyExtension/formCollect.tsx +89 -0
- package/src/@jsminAmotifyExtension/spreadSheet.tsx +159 -0
- package/src/@jsminAmotifyExtension/variables.tsx +130 -0
- package/src/@styles/@app.scss +4 -0
- package/src/@styles/UniStyling.scss +996 -0
- package/src/@styles/init.scss +154 -0
- package/src/@styles/props.scss +109 -0
- package/src/@styles/styleSet.scss +38 -0
- package/src/@styles/themeColor.scss +71 -0
- package/src/@styles/var.scss +171 -0
- package/src/@types/_.tsx +6 -0
- package/src/@types/amot.tsx +323 -0
- package/src/@types/fn.tsx +1210 -0
- package/src/@types/index.tsx +74 -0
- package/src/@types/jsminAmotifyExtension.tsx +143 -0
- package/src/@types/module.tsx +2 -0
- package/src/@types/state.tsx +199 -0
- package/src/Atoms/@export.tsx +32 -0
- package/src/Atoms/FAIcon/parts.tsx +117 -0
- package/src/Atoms/FAIcon/style.module.scss +9 -0
- package/src/Atoms/Logo/parts.tsx +335 -0
- package/src/Atoms/Logo/style.module.scss +96 -0
- package/src/Atoms/Various/parts.tsx +157 -0
- package/src/Atoms/Various/style.module.scss +40 -0
- package/src/Functions/@export.tsx +29 -0
- package/src/Functions/Button/_.tsx +305 -0
- package/src/Functions/Button/style.module.scss +183 -0
- package/src/Functions/Cropper/parts.tsx +1061 -0
- package/src/Functions/Cropper/style.module.scss +62 -0
- package/src/Functions/Effects/Fade.tsx +81 -0
- package/src/Functions/Effects/Ripple.tsx +141 -0
- package/src/Functions/Effects/_.tsx +33 -0
- package/src/Functions/Effects/style.module.scss +83 -0
- package/src/Functions/Input/Chips/Selector.tsx +451 -0
- package/src/Functions/Input/Chips/_.tsx +286 -0
- package/src/Functions/Input/Chips/style.module.scss +6 -0
- package/src/Functions/Input/DigitCharacters.tsx +241 -0
- package/src/Functions/Input/File/_.tsx +596 -0
- package/src/Functions/Input/File/style.module.scss +34 -0
- package/src/Functions/Input/Hidden.tsx +18 -0
- package/src/Functions/Input/List/_.tsx +383 -0
- package/src/Functions/Input/List/style.module.scss +84 -0
- package/src/Functions/Input/Segmented/_.tsx +238 -0
- package/src/Functions/Input/Segmented/style.module.scss +81 -0
- package/src/Functions/Input/Select/_.tsx +225 -0
- package/src/Functions/Input/Select/style.module.scss +10 -0
- package/src/Functions/Input/Slider/_.tsx +519 -0
- package/src/Functions/Input/Slider/style.module.scss +67 -0
- package/src/Functions/Input/Switch/_.tsx +177 -0
- package/src/Functions/Input/Switch/style.module.scss +18 -0
- package/src/Functions/Input/Text.tsx +437 -0
- package/src/Functions/Input/TextArea.tsx +115 -0
- package/src/Functions/Input/Time/Picker.tsx +950 -0
- package/src/Functions/Input/Time/_.tsx +736 -0
- package/src/Functions/Input/Time/style.module.scss +72 -0
- package/src/Functions/Input/_.tsx +793 -0
- package/src/Functions/Input/core.tsx +461 -0
- package/src/Functions/Input/style.module.scss +43 -0
- package/src/Functions/Inputs/_.tsx +5 -0
- package/src/Functions/Inputs/style.module.scss +15 -0
- package/src/Functions/Inputs/text.tsx +67 -0
- package/src/Functions/Inputs/types.d.ts +1 -0
- package/src/Functions/Layout/PageNotFound.tsx +81 -0
- package/src/Functions/Layout/PageRouter.tsx +107 -0
- package/src/Functions/Layout/PageViewController/parts.tsx +32 -0
- package/src/Functions/Layout/Plate.tsx +30 -0
- package/src/Functions/Layout/RootViewController/parts.tsx +290 -0
- package/src/Functions/Layout/RootViewController/style.module.scss +24 -0
- package/src/Functions/Layout/SwipeView/parts.tsx +380 -0
- package/src/Functions/Layout/SwipeView/style.module.scss +19 -0
- package/src/Functions/Layout/TabBar.tsx +64 -0
- package/src/Functions/Layout/_.tsx +20 -0
- package/src/Functions/Loader/corner.tsx +78 -0
- package/src/Functions/Loader/mini.tsx +117 -0
- package/src/Functions/Loader/parts.tsx +105 -0
- package/src/Functions/Loader/style.module.scss +222 -0
- package/src/Functions/Loader/top.tsx +90 -0
- package/src/Functions/Sheet/parts.tsx +972 -0
- package/src/Functions/Sheet/style.module.scss +235 -0
- package/src/Functions/SnackBar/parts.tsx +215 -0
- package/src/Functions/SnackBar/style.module.scss +25 -0
- package/src/Functions/Table/Data/parts.tsx +955 -0
- package/src/Functions/Table/Drag/parts.tsx +448 -0
- package/src/Functions/Table/Normal/parts.tsx +123 -0
- package/src/Functions/Table/_.tsx +170 -0
- package/src/Functions/Table/style.module.scss +92 -0
- package/src/Functions/Tooltips/parts.tsx +52 -0
- package/src/Global/@export.tsx +138 -0
- package/src/Global/LaunchReactApplication.tsx +30 -0
- package/src/Global/exe.tsx +0 -0
- package/src/Global/styleConverter.tsx +435 -0
- package/src/Molecules/@export.tsx +95 -0
- package/src/Molecules/Accordion/parts.tsx +146 -0
- package/src/Molecules/Accordion/style.module.scss +13 -0
- package/src/Molecules/LinkifyText/parts.tsx +54 -0
- package/src/Molecules/List.tsx +30 -0
- package/src/Organisms/@export.tsx +5 -0
- package/src/Organisms/DisplayStyleInput/_.tsx +18 -0
- package/src/Organisms/DisplayStyleInput/darkmode.tsx +112 -0
- package/src/Organisms/DisplayStyleInput/themeColor.tsx +210 -0
- package/src/Templates/@export.tsx +7 -0
- package/src/Templates/PlayGround/parts.tsx +116 -0
- package/src/Templates/PlayGround/style.module.scss +38 -0
- package/src/config.tsx +132 -0
- package/src/index.js +0 -0
- package/src/launch.tsx +100 -0
- package/src/preload.tsx +49 -0
- package/tsconfig.json +4 -22
- package/webpack.config.js +105 -0
|
@@ -0,0 +1,461 @@
|
|
|
1
|
+
import {
|
|
2
|
+
useStore
|
|
3
|
+
} from '~/Global/@export';
|
|
4
|
+
const {
|
|
5
|
+
useEffect,
|
|
6
|
+
useState,
|
|
7
|
+
useRef
|
|
8
|
+
} = React;
|
|
9
|
+
|
|
10
|
+
import {
|
|
11
|
+
Box,
|
|
12
|
+
Flex,
|
|
13
|
+
FAIcon
|
|
14
|
+
} from '~/Atoms/@export';
|
|
15
|
+
import {
|
|
16
|
+
Column,
|
|
17
|
+
Row,
|
|
18
|
+
Text
|
|
19
|
+
} from '~/Molecules/@export';
|
|
20
|
+
import {
|
|
21
|
+
Buttons,
|
|
22
|
+
Tooltips
|
|
23
|
+
} from '~/Functions/@export';
|
|
24
|
+
|
|
25
|
+
import style from './style.module.scss';
|
|
26
|
+
|
|
27
|
+
type BoxWrapperParams = {
|
|
28
|
+
val_status: any
|
|
29
|
+
set_status: React.Dispatch<React.SetStateAction<any>>
|
|
30
|
+
val_validate: amotify.fn.Input.Validation.Result
|
|
31
|
+
params: any
|
|
32
|
+
children: ReactElement
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export const BoxWrapper: FNC<BoxWrapperParams> = ( props ) => {
|
|
36
|
+
let {
|
|
37
|
+
children,
|
|
38
|
+
val_status,
|
|
39
|
+
set_status,
|
|
40
|
+
val_validate,
|
|
41
|
+
params
|
|
42
|
+
} = props;
|
|
43
|
+
let {
|
|
44
|
+
clearButton,
|
|
45
|
+
rightIcon,
|
|
46
|
+
leftIcon,
|
|
47
|
+
wrapStyles
|
|
48
|
+
} = params;
|
|
49
|
+
|
|
50
|
+
if ( val_status.eventType == 'init' && !params.checkValidationAtFirst ) val_validate.notice = [];
|
|
51
|
+
|
|
52
|
+
return (
|
|
53
|
+
<Box
|
|
54
|
+
position='relative'
|
|
55
|
+
{ ...wrapStyles }
|
|
56
|
+
id={ 'BoxWrapper-' + val_status.componentID }
|
|
57
|
+
>
|
|
58
|
+
<Flex
|
|
59
|
+
flexWrap={ false }
|
|
60
|
+
// height='100%'
|
|
61
|
+
>
|
|
62
|
+
{ params.leftIndicator }
|
|
63
|
+
<Flex
|
|
64
|
+
position='relative'
|
|
65
|
+
flexSizing={ 'auto' }
|
|
66
|
+
>
|
|
67
|
+
{ leftIcon }
|
|
68
|
+
{ children }
|
|
69
|
+
{ clearButton && !!val_status.dataValue ? <Buttons.Button.Normal.R
|
|
70
|
+
ssSphere={ 2 }
|
|
71
|
+
flexCenter
|
|
72
|
+
fontColor={ '5.translucent' }
|
|
73
|
+
ssEffectsOnActive={ [ 'ripple.theme' ] }
|
|
74
|
+
position='absolute'
|
|
75
|
+
right={ 1 }
|
|
76
|
+
top={ '50%' }
|
|
77
|
+
freeCSS={ {
|
|
78
|
+
zIndex: 3
|
|
79
|
+
} }
|
|
80
|
+
className={ style.IndicatorIcon }
|
|
81
|
+
onClick={ () => {
|
|
82
|
+
set_status( {
|
|
83
|
+
...val_status,
|
|
84
|
+
dataValue: '',
|
|
85
|
+
formatValue: '',
|
|
86
|
+
eventType: 'update',
|
|
87
|
+
eventID: $.uuidGen()
|
|
88
|
+
} as any );
|
|
89
|
+
} }
|
|
90
|
+
>
|
|
91
|
+
<FAIcon.Times />
|
|
92
|
+
</Buttons.Button.Normal.R> : rightIcon }
|
|
93
|
+
</Flex>
|
|
94
|
+
{ params.rightIndicator }
|
|
95
|
+
</Flex>
|
|
96
|
+
<GenNotices
|
|
97
|
+
notice={ val_validate.notice }
|
|
98
|
+
val_status={ val_status }
|
|
99
|
+
/>
|
|
100
|
+
</Box>
|
|
101
|
+
);
|
|
102
|
+
}
|
|
103
|
+
const GenNotices: FNC<{
|
|
104
|
+
notice: amotify.fn.Input.Validation.NoticeTypes[]
|
|
105
|
+
val_status: amotify.fn.Input.Status.Plain
|
|
106
|
+
}> = ( params ) => {
|
|
107
|
+
let { notice,val_status } = params;
|
|
108
|
+
let {
|
|
109
|
+
componentID,
|
|
110
|
+
eventType
|
|
111
|
+
} = val_status;
|
|
112
|
+
$.interval.clear( 'NoticeTimer-' + componentID );
|
|
113
|
+
$.interval.clear( 'NoticeTimerClose-' + componentID );
|
|
114
|
+
|
|
115
|
+
let parentID = 'notice-' + params.val_status.componentID;
|
|
116
|
+
let tipsID = 'notice-tips-' + params.val_status.componentID;
|
|
117
|
+
|
|
118
|
+
if ( !notice.length ) {
|
|
119
|
+
Tooltips.close( tipsID );
|
|
120
|
+
return null;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
let Notices = notice.map( ( cell ) => {
|
|
124
|
+
let { type,label } = cell;
|
|
125
|
+
|
|
126
|
+
return <Row.Left
|
|
127
|
+
gap={ 0 }
|
|
128
|
+
borderRadius={ '2.tone.secondary' }
|
|
129
|
+
>
|
|
130
|
+
<FAIcon
|
|
131
|
+
flexCenter
|
|
132
|
+
fontSize='3.paragraph'
|
|
133
|
+
fontColor={ {
|
|
134
|
+
'invalid': 'nega',
|
|
135
|
+
'warn': 'warn',
|
|
136
|
+
'valid': 'posi',
|
|
137
|
+
}[ type ] as 'theme' }
|
|
138
|
+
d={ {
|
|
139
|
+
'invalid': 'times',
|
|
140
|
+
'warn': 'exclamation',
|
|
141
|
+
'valid': 'check'
|
|
142
|
+
}[ type ] }
|
|
143
|
+
/>
|
|
144
|
+
<Box
|
|
145
|
+
fontColor='white'
|
|
146
|
+
>
|
|
147
|
+
{ label }
|
|
148
|
+
</Box>
|
|
149
|
+
</Row.Left>;
|
|
150
|
+
} );
|
|
151
|
+
|
|
152
|
+
$.interval.standBy(
|
|
153
|
+
'NoticeTimer-' + componentID,
|
|
154
|
+
350,
|
|
155
|
+
() => {
|
|
156
|
+
Tooltips.open( {
|
|
157
|
+
tipsID,
|
|
158
|
+
parent: '#' + parentID,
|
|
159
|
+
padding: [ '1/2',0 ],
|
|
160
|
+
content: <Tooltips.Comps.Body
|
|
161
|
+
padding={ [ '1/2','2/3' ] }
|
|
162
|
+
fontSize='1.mini'
|
|
163
|
+
position='relative'
|
|
164
|
+
>
|
|
165
|
+
<Box
|
|
166
|
+
position='absolute'
|
|
167
|
+
unitHeight={ 1 }
|
|
168
|
+
unitWidth={ 1 }
|
|
169
|
+
left={ 1 }
|
|
170
|
+
backgroundColor='dark'
|
|
171
|
+
freeCSS={ {
|
|
172
|
+
zIndex: 1,
|
|
173
|
+
transform: 'rotate(45deg)',
|
|
174
|
+
top: -6
|
|
175
|
+
} }
|
|
176
|
+
/>
|
|
177
|
+
<Column
|
|
178
|
+
gap={ '1/3' }
|
|
179
|
+
position='relative'
|
|
180
|
+
freeCSS={ {
|
|
181
|
+
zIndex: 2
|
|
182
|
+
} }
|
|
183
|
+
backgroundColor='inherit'
|
|
184
|
+
>
|
|
185
|
+
{ Notices }
|
|
186
|
+
</Column>
|
|
187
|
+
</Tooltips.Comps.Body>
|
|
188
|
+
} );
|
|
189
|
+
|
|
190
|
+
$.interval.standBy(
|
|
191
|
+
'NoticeTimerClose-' + componentID,
|
|
192
|
+
7500,
|
|
193
|
+
() => {
|
|
194
|
+
Tooltips.close( tipsID );
|
|
195
|
+
}
|
|
196
|
+
)
|
|
197
|
+
} );
|
|
198
|
+
|
|
199
|
+
return ( <Box
|
|
200
|
+
className={ style.Notices }
|
|
201
|
+
id={ parentID }
|
|
202
|
+
/> );
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
export const CommonEffects: {
|
|
206
|
+
( props: {
|
|
207
|
+
type?: string
|
|
208
|
+
params: plainObject
|
|
209
|
+
val_status: amotify.fn.Input.Status.Plain
|
|
210
|
+
set_status: React.Dispatch<React.SetStateAction<any>>
|
|
211
|
+
val_validate: amotify.fn.Input.Validation.Result
|
|
212
|
+
set_validate: React.Dispatch<React.SetStateAction<amotify.fn.Input.Validation.Result>>
|
|
213
|
+
DefaultValidation: amotify.fn.Input.Validation.SystemCheck
|
|
214
|
+
onUpdateValue?: amotify.fn.Input.OnUpdateValue
|
|
215
|
+
onUpdateValidValue?: amotify.fn.Input.OnUpdateValue
|
|
216
|
+
ExtraOverrideParams?: plainObject
|
|
217
|
+
ExtraStoreParams?: plainObject
|
|
218
|
+
} ): void
|
|
219
|
+
} = ( props ) => {
|
|
220
|
+
let {
|
|
221
|
+
type,
|
|
222
|
+
params,
|
|
223
|
+
val_status,
|
|
224
|
+
set_status,
|
|
225
|
+
ExtraOverrideParams,
|
|
226
|
+
ExtraStoreParams,
|
|
227
|
+
val_validate,
|
|
228
|
+
set_validate,
|
|
229
|
+
DefaultValidation,
|
|
230
|
+
onUpdateValue,
|
|
231
|
+
onUpdateValidValue
|
|
232
|
+
} = props;
|
|
233
|
+
let {
|
|
234
|
+
componentID
|
|
235
|
+
} = val_status;
|
|
236
|
+
|
|
237
|
+
let [ val_refresh,set_refresh ] = useState( $.uuidGen() );
|
|
238
|
+
|
|
239
|
+
useEffect( () => {
|
|
240
|
+
useStore.update( {
|
|
241
|
+
key: componentID,
|
|
242
|
+
value: {
|
|
243
|
+
ResolveRefresh: null,
|
|
244
|
+
Refresh: () => {
|
|
245
|
+
return new Promise( ( res,rej ) => {
|
|
246
|
+
useStore.get( componentID ).ResolveRefresh = res;
|
|
247
|
+
set_refresh( $.uuidGen() );
|
|
248
|
+
} );
|
|
249
|
+
},
|
|
250
|
+
GenNotice: ( props: { ok: boolean,notice: amotify.fn.Input.Validation.NoticeTypes[] } ) => {
|
|
251
|
+
let { ok,notice } = props;
|
|
252
|
+
set_validate( { ok,notice } );
|
|
253
|
+
},
|
|
254
|
+
...ExtraStoreParams
|
|
255
|
+
}
|
|
256
|
+
} );
|
|
257
|
+
return () => {
|
|
258
|
+
useStore.delete( componentID );
|
|
259
|
+
}
|
|
260
|
+
},[] );
|
|
261
|
+
|
|
262
|
+
const mounted = useRef( false );
|
|
263
|
+
useEffect( () => {
|
|
264
|
+
if ( mounted.current ) {
|
|
265
|
+
set_status( {
|
|
266
|
+
...val_status,
|
|
267
|
+
eventType: 'refresh',
|
|
268
|
+
eventID: $.uuidGen()
|
|
269
|
+
} );
|
|
270
|
+
} else {
|
|
271
|
+
mounted.current = true;
|
|
272
|
+
}
|
|
273
|
+
},[ val_refresh ] );
|
|
274
|
+
useEffect( () => {
|
|
275
|
+
params.value = val_status.dataValue;
|
|
276
|
+
|
|
277
|
+
$.interval.clear( 'ValidationTimer-' + componentID );
|
|
278
|
+
|
|
279
|
+
ValidationCheck( {
|
|
280
|
+
val_status,
|
|
281
|
+
set_validate,
|
|
282
|
+
DefaultValidation,
|
|
283
|
+
params
|
|
284
|
+
} );
|
|
285
|
+
},[ val_status.eventID ] );
|
|
286
|
+
|
|
287
|
+
( () => {
|
|
288
|
+
let {
|
|
289
|
+
override
|
|
290
|
+
} = params;
|
|
291
|
+
if ( override == 'never' ) return;
|
|
292
|
+
if ( override == 'beforeModified' ) {
|
|
293
|
+
if ( ![ 'init','override' ].includes( val_status.eventType ) ) return;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
let component = useStore.get( val_status.componentID );
|
|
297
|
+
if ( !component ) return;
|
|
298
|
+
if (
|
|
299
|
+
params.value != val_status.dataValue &&
|
|
300
|
+
params.statusID != component.statusID
|
|
301
|
+
) {
|
|
302
|
+
set_status( {
|
|
303
|
+
...val_status,
|
|
304
|
+
dataValue: params.value,
|
|
305
|
+
...ExtraOverrideParams,
|
|
306
|
+
eventType: 'override',
|
|
307
|
+
eventID: $.uuidGen()
|
|
308
|
+
} );
|
|
309
|
+
}
|
|
310
|
+
component.statusID = params.statusID;
|
|
311
|
+
} )();
|
|
312
|
+
|
|
313
|
+
useEffect( () => {
|
|
314
|
+
let {
|
|
315
|
+
componentID,
|
|
316
|
+
eventType,
|
|
317
|
+
dataValue
|
|
318
|
+
} = val_status;
|
|
319
|
+
let Value = dataValue;
|
|
320
|
+
if ( type == 'list' ) {
|
|
321
|
+
Value = dataValue.map( ( value: any ) => JSON.parse( value ) )
|
|
322
|
+
} else if ( type == 'select' ) {
|
|
323
|
+
Value = JSON.parse( dataValue );
|
|
324
|
+
} else if ( type == 'file' ) {
|
|
325
|
+
useStore.update( {
|
|
326
|
+
key: componentID,
|
|
327
|
+
value: {
|
|
328
|
+
Files: val_status.dataValue
|
|
329
|
+
}
|
|
330
|
+
} );
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
if ( eventType == 'refresh' ) {
|
|
334
|
+
useStore.get( componentID ).ResolveRefresh( null );
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
if ( eventType == 'update' ) {
|
|
338
|
+
if ( onUpdateValue ) onUpdateValue( {
|
|
339
|
+
componentID,
|
|
340
|
+
value: Value,
|
|
341
|
+
storeData: useStore.get( componentID ),
|
|
342
|
+
eventType: eventType
|
|
343
|
+
} );
|
|
344
|
+
|
|
345
|
+
if ( val_validate.ok && $.is.exist( Value ) ) {
|
|
346
|
+
if ( onUpdateValidValue ) onUpdateValidValue( {
|
|
347
|
+
componentID,
|
|
348
|
+
value: Value,
|
|
349
|
+
storeData: useStore.get( componentID ),
|
|
350
|
+
eventType: eventType
|
|
351
|
+
} );
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
},[ val_validate ] );
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
export const ValidationCheck: {
|
|
358
|
+
( props: {
|
|
359
|
+
val_status: amotify.fn.Input.Status.Plain
|
|
360
|
+
DefaultValidation: amotify.fn.Input.Validation.SystemCheck
|
|
361
|
+
params: any
|
|
362
|
+
set_validate: React.Dispatch<React.SetStateAction<amotify.fn.Input.Validation.Result>>
|
|
363
|
+
} ): void
|
|
364
|
+
} = ( props ) => {
|
|
365
|
+
let {
|
|
366
|
+
val_status,
|
|
367
|
+
params,
|
|
368
|
+
set_validate,
|
|
369
|
+
DefaultValidation
|
|
370
|
+
} = props;
|
|
371
|
+
|
|
372
|
+
let result = DefaultValidation( {
|
|
373
|
+
value: val_status.dataValue,
|
|
374
|
+
params: params
|
|
375
|
+
} );
|
|
376
|
+
|
|
377
|
+
if ( !result.ok ) {
|
|
378
|
+
set_validate( result );
|
|
379
|
+
return;
|
|
380
|
+
}
|
|
381
|
+
let sysDefaultNotice = result.notice;
|
|
382
|
+
|
|
383
|
+
const FN = async () => {
|
|
384
|
+
if ( !params.onValidate ) return;
|
|
385
|
+
|
|
386
|
+
let result = await params.onValidate( {
|
|
387
|
+
value: val_status.dataValue,
|
|
388
|
+
eventType: val_status.eventType,
|
|
389
|
+
props: props
|
|
390
|
+
} );
|
|
391
|
+
if ( !result.ok ) {
|
|
392
|
+
set_validate( {
|
|
393
|
+
ok: false,
|
|
394
|
+
notice: [
|
|
395
|
+
...sysDefaultNotice,
|
|
396
|
+
...result.notice
|
|
397
|
+
]
|
|
398
|
+
} );
|
|
399
|
+
return;
|
|
400
|
+
}
|
|
401
|
+
set_validate( {
|
|
402
|
+
ok: true,
|
|
403
|
+
notice: [
|
|
404
|
+
...sysDefaultNotice,
|
|
405
|
+
...result.notice
|
|
406
|
+
]
|
|
407
|
+
} );
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
if ( params.onValidate ) {
|
|
411
|
+
if ( val_status.eventType == 'refresh' ) {
|
|
412
|
+
FN();
|
|
413
|
+
} else {
|
|
414
|
+
$.interval.standBy(
|
|
415
|
+
'ValidationTimer-' + val_status.componentID,
|
|
416
|
+
450,
|
|
417
|
+
FN
|
|
418
|
+
);
|
|
419
|
+
}
|
|
420
|
+
} else {
|
|
421
|
+
set_validate( {
|
|
422
|
+
ok: true,
|
|
423
|
+
notice: sysDefaultNotice
|
|
424
|
+
} )
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
|
|
429
|
+
export const SubmitForm = (
|
|
430
|
+
event: React.KeyboardEvent
|
|
431
|
+
) => {
|
|
432
|
+
let input = event.target as HTMLInputElement;
|
|
433
|
+
let { form,formName } = input.dataset;
|
|
434
|
+
form = formName || form;
|
|
435
|
+
let complete = false;
|
|
436
|
+
|
|
437
|
+
let Button = $( `[data-form-submit-button="${ form }"]` )[ 0 ];
|
|
438
|
+
if ( !Button ) return complete;
|
|
439
|
+
|
|
440
|
+
let gestures = Button.dataset.sdfike || '';
|
|
441
|
+
let key = event.key;
|
|
442
|
+
let auxKey = event.ctrlKey || event.metaKey;
|
|
443
|
+
|
|
444
|
+
if (
|
|
445
|
+
(
|
|
446
|
+
key == 'Enter' && (
|
|
447
|
+
gestures.includes( 'enter' ) || (
|
|
448
|
+
gestures.includes( 'auxEnter' ) && auxKey
|
|
449
|
+
)
|
|
450
|
+
)
|
|
451
|
+
) || (
|
|
452
|
+
key == ' ' && gestures.includes( 'space' )
|
|
453
|
+
)
|
|
454
|
+
) {
|
|
455
|
+
Button.click();
|
|
456
|
+
event.preventDefault();
|
|
457
|
+
|
|
458
|
+
complete = true;
|
|
459
|
+
}
|
|
460
|
+
return complete;
|
|
461
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
@use 'src/@styles/props' as *;
|
|
2
|
+
.Input {
|
|
3
|
+
&:focus, &:active {
|
|
4
|
+
z-index: 1;
|
|
5
|
+
background-color: $color-layer1;
|
|
6
|
+
}
|
|
7
|
+
&:focus {
|
|
8
|
+
border-color: $color-theme !important;
|
|
9
|
+
box-shadow: 0 0 0 $unit1_3 $color-theme-opacity-low;
|
|
10
|
+
}
|
|
11
|
+
&:active {
|
|
12
|
+
box-shadow: none;
|
|
13
|
+
transition: $animation-time-long;
|
|
14
|
+
}
|
|
15
|
+
&.InputCover {
|
|
16
|
+
&:focus-within {
|
|
17
|
+
z-index: 1;
|
|
18
|
+
background-color: $color-layer1;
|
|
19
|
+
}
|
|
20
|
+
&:focus-within {
|
|
21
|
+
border-color: $color-theme !important;
|
|
22
|
+
box-shadow: 0 0 0 $unit1_3 $color-theme-opacity-low;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
textarea {
|
|
28
|
+
transition-property: border, box-shadow, background-color !important;
|
|
29
|
+
}
|
|
30
|
+
@keyframes ShowCell {
|
|
31
|
+
0% {}
|
|
32
|
+
100% {
|
|
33
|
+
opacity: 1;
|
|
34
|
+
transform: scale(1);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
.IndicatorIcon {
|
|
38
|
+
transform: translateY(-50%);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
textarea {
|
|
42
|
+
resize: vertical;
|
|
43
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
@use 'src/@styles/props' as *;
|
|
2
|
+
.Focus {
|
|
3
|
+
&:focus, &:active {
|
|
4
|
+
z-index: 1;
|
|
5
|
+
background-color: $color-layer1;
|
|
6
|
+
}
|
|
7
|
+
&:focus {
|
|
8
|
+
border-color: $color-theme !important;
|
|
9
|
+
box-shadow: 0 0 0 $unit1_3 $color-theme-opacity-low;
|
|
10
|
+
}
|
|
11
|
+
&:active {
|
|
12
|
+
box-shadow: none;
|
|
13
|
+
transition: $animation-time-long;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import {
|
|
2
|
+
StyleConverter
|
|
3
|
+
} from '~/Global/@export';
|
|
4
|
+
import style from './style.module.scss';
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
declare global {
|
|
8
|
+
namespace Inputs {
|
|
9
|
+
type ToneTypes = 'normal' | 'cloud' | 'bottomBorder' | 'plain'
|
|
10
|
+
|
|
11
|
+
namespace Text {
|
|
12
|
+
type Params =
|
|
13
|
+
any &
|
|
14
|
+
React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>,HTMLInputElement> &
|
|
15
|
+
{
|
|
16
|
+
tone?: ToneTypes
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
let ToneStyles: {
|
|
23
|
+
common: amotifyBasicElement
|
|
24
|
+
border: amotifyBasicElement
|
|
25
|
+
cloud: amotifyBasicElement
|
|
26
|
+
bottomBorder: amotifyBasicElement
|
|
27
|
+
plain: amotifyBasicElement
|
|
28
|
+
} = {
|
|
29
|
+
common: {
|
|
30
|
+
padding: '3/4',
|
|
31
|
+
borderRadius: '1.tone.primary',
|
|
32
|
+
transition: 'middle',
|
|
33
|
+
boxShadow: 0,
|
|
34
|
+
className: style.Focus
|
|
35
|
+
},
|
|
36
|
+
border: {
|
|
37
|
+
border: true,
|
|
38
|
+
},
|
|
39
|
+
cloud: {
|
|
40
|
+
border: '1.thin',
|
|
41
|
+
backgroundColor: 'cloud'
|
|
42
|
+
},
|
|
43
|
+
bottomBorder: {
|
|
44
|
+
borderRadius: 0,
|
|
45
|
+
backgroundColor: 'cloud',
|
|
46
|
+
borderBottom: true,
|
|
47
|
+
},
|
|
48
|
+
plain: {},
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export const TextInput = ( params: Inputs.Text.Params ) => {
|
|
52
|
+
params = {
|
|
53
|
+
...ToneStyles.common,
|
|
54
|
+
...ToneStyles.bottomBorder,
|
|
55
|
+
// ...ToneStyles.cloud,
|
|
56
|
+
...params
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
return (
|
|
60
|
+
<input
|
|
61
|
+
type="text"
|
|
62
|
+
placeholder='fvdgsbsfgdvs'
|
|
63
|
+
// value={ 'AAAA' }
|
|
64
|
+
{ ...StyleConverter.ToClassName( params ) }
|
|
65
|
+
/>
|
|
66
|
+
);
|
|
67
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Box,
|
|
3
|
+
Flex,
|
|
4
|
+
FAIcon,
|
|
5
|
+
Paragraph
|
|
6
|
+
} from '~/Atoms/@export';
|
|
7
|
+
import {
|
|
8
|
+
Column,
|
|
9
|
+
Row,
|
|
10
|
+
Text
|
|
11
|
+
} from '~/Molecules/@export';
|
|
12
|
+
import {
|
|
13
|
+
Buttons
|
|
14
|
+
} from '~/Functions/@export';
|
|
15
|
+
|
|
16
|
+
export const PageNotFound: FNC<{}> = () => {
|
|
17
|
+
|
|
18
|
+
let { href } = location;
|
|
19
|
+
|
|
20
|
+
return ( <Row.Center
|
|
21
|
+
padding={ [ 4,1 ] }
|
|
22
|
+
>
|
|
23
|
+
<Column
|
|
24
|
+
ssCardBox
|
|
25
|
+
gap={ 2 }
|
|
26
|
+
padding={ [ 3,2 ] }
|
|
27
|
+
textAlign='center'
|
|
28
|
+
width={ 1 }
|
|
29
|
+
freeCSS={ {
|
|
30
|
+
maxWidth: 12 * 30
|
|
31
|
+
} }
|
|
32
|
+
>
|
|
33
|
+
<FAIcon.LinkSlash
|
|
34
|
+
fontColor={ 'theme' }
|
|
35
|
+
iconFamily='classic'
|
|
36
|
+
isDuotoneIcon
|
|
37
|
+
freeCSS={ {
|
|
38
|
+
fontSize: '3rem'
|
|
39
|
+
} }
|
|
40
|
+
/>
|
|
41
|
+
<Box>
|
|
42
|
+
<Text.Paragraph>
|
|
43
|
+
このページはご利用いただけません。
|
|
44
|
+
</Text.Paragraph>
|
|
45
|
+
<Text.Supplement
|
|
46
|
+
fontColor='3.blur'
|
|
47
|
+
>
|
|
48
|
+
入力されたリンクのページは存在しませんでした。
|
|
49
|
+
</Text.Supplement>
|
|
50
|
+
</Box>
|
|
51
|
+
|
|
52
|
+
<Column>
|
|
53
|
+
<Text.Normal
|
|
54
|
+
textAlign='left'
|
|
55
|
+
ssCardBox='cloud'
|
|
56
|
+
isBoldFont
|
|
57
|
+
padding={ 1 }
|
|
58
|
+
>
|
|
59
|
+
・リンクが正しいか
|
|
60
|
+
<Box margin={ [ '1/2',0 ] } borderBottom />
|
|
61
|
+
・リンクの有効期限
|
|
62
|
+
<Box margin={ [ '1/2',0 ] } borderBottom />
|
|
63
|
+
・アクセス権限等が正しいか
|
|
64
|
+
</Text.Normal>
|
|
65
|
+
などをもう一度確認してください。
|
|
66
|
+
</Column>
|
|
67
|
+
|
|
68
|
+
<Buttons.Anchor.Link
|
|
69
|
+
newTab
|
|
70
|
+
href={ href }
|
|
71
|
+
>
|
|
72
|
+
{ href }
|
|
73
|
+
</Buttons.Anchor.Link>
|
|
74
|
+
<Buttons.Anchor.BorderToFill.R
|
|
75
|
+
href='/'
|
|
76
|
+
width={ 1 }
|
|
77
|
+
children={ 'ホームに戻る' }
|
|
78
|
+
/>
|
|
79
|
+
</Column>
|
|
80
|
+
</Row.Center> );
|
|
81
|
+
}
|