amotify 0.0.4 → 0.0.6
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 +1 -1
- package/dist/Atoms/Logo/parts.js +1 -1
- package/dist/Atoms/Various/parts.js +1 -1
- package/dist/Functions/Button/_.js +1 -1
- package/dist/Functions/Cropper/parts.js +4 -4
- package/dist/Functions/Effects/Fade.js +2 -2
- package/dist/Functions/Input/Chips/Selector.js +4 -4
- package/dist/Functions/Input/Chips/_.js +3 -3
- package/dist/Functions/Input/DigitCharacters.js +3 -3
- package/dist/Functions/Input/File/_.js +4 -4
- package/dist/Functions/Input/List/_.js +3 -3
- package/dist/Functions/Input/Segmented/_.js +1 -1
- package/dist/Functions/Input/Select/_.js +2 -2
- package/dist/Functions/Input/Slider/_.js +3 -3
- package/dist/Functions/Input/Switch/_.js +4 -4
- package/dist/Functions/Input/Text.js +2 -2
- package/dist/Functions/Input/TextArea.js +1 -1
- package/dist/Functions/Input/Time/Picker.js +4 -4
- package/dist/Functions/Input/Time/_.js +3 -3
- package/dist/Functions/Input/_.js +4 -4
- package/dist/Functions/Input/core.js +4 -4
- package/dist/Functions/Inputs/text.js +1 -1
- package/dist/Functions/Layout/PageNotFound.js +3 -3
- package/dist/Functions/Layout/PageRouter.js +2 -2
- package/dist/Functions/Layout/PageViewController/parts.js +2 -2
- package/dist/Functions/Layout/Plate.js +1 -1
- package/dist/Functions/Layout/RootViewController/parts.js +4 -4
- package/dist/Functions/Layout/SwipeView/parts.js +2 -2
- package/dist/Functions/Layout/TabBar.js +3 -3
- package/dist/Functions/Loader/corner.js +2 -2
- package/dist/Functions/Loader/mini.js +2 -2
- package/dist/Functions/Loader/parts.js +1 -1
- package/dist/Functions/Loader/top.js +2 -2
- package/dist/Functions/Sheet/parts.js +4 -4
- package/dist/Functions/SnackBar/parts.js +4 -4
- package/dist/Functions/Table/Data/parts.js +4 -4
- package/dist/Functions/Table/Drag/parts.js +3 -3
- package/dist/Functions/Table/_.js +2 -2
- package/dist/Functions/Tooltips/parts.js +2 -2
- package/dist/Molecules/@export.js +1 -1
- package/dist/Molecules/Accordion/parts.js +2 -2
- package/dist/Molecules/LinkifyText/parts.js +2 -2
- package/dist/Molecules/List.js +1 -1
- package/dist/Organisms/DisplayStyleInput/darkmode.js +4 -4
- package/dist/Organisms/DisplayStyleInput/themeColor.js +4 -4
- package/dist/Templates/PlayGround/parts.js +5 -5
- package/dist/launch.js +6 -6
- package/package.json +6 -5
- package/public/amotify.js +310 -0
- package/public/amotify.min.css +12724 -0
- package/dist/src/@jsminAmotifyExtension/_.d.ts +0 -4
- package/dist/src/@jsminAmotifyExtension/fetch.d.ts +0 -9
- package/dist/src/@jsminAmotifyExtension/formCollect.d.ts +0 -1
- package/dist/src/@jsminAmotifyExtension/spreadSheet.d.ts +0 -4
- package/dist/src/@jsminAmotifyExtension/variables.d.ts +0 -0
- package/dist/src/@types/_.d.ts +0 -6
- package/dist/src/@types/amot.d.ts +0 -260
- package/dist/src/@types/fn.d.ts +0 -1040
- package/dist/src/@types/index.d.ts +0 -62
- package/dist/src/@types/jsminAmotifyExtension.d.ts +0 -134
- package/dist/src/@types/module.d.ts +0 -2
- package/dist/src/@types/state.d.ts +0 -145
- package/dist/src/Atoms/@export.d.ts +0 -4
- package/dist/src/Atoms/FAIcon/parts.d.ts +0 -2
- package/dist/src/Atoms/Logo/parts.d.ts +0 -1
- package/dist/src/Atoms/Various/parts.d.ts +0 -9
- package/dist/src/Functions/@export.d.ts +0 -12
- package/dist/src/Functions/Button/_.d.ts +0 -1
- package/dist/src/Functions/Cropper/parts.d.ts +0 -1
- package/dist/src/Functions/Effects/Fade.d.ts +0 -1
- package/dist/src/Functions/Effects/Ripple.d.ts +0 -1
- package/dist/src/Functions/Effects/_.d.ts +0 -3
- package/dist/src/Functions/Input/Chips/Selector.d.ts +0 -1
- package/dist/src/Functions/Input/Chips/_.d.ts +0 -2
- package/dist/src/Functions/Input/DigitCharacters.d.ts +0 -1
- package/dist/src/Functions/Input/File/_.d.ts +0 -2
- package/dist/src/Functions/Input/Hidden.d.ts +0 -1
- package/dist/src/Functions/Input/List/_.d.ts +0 -1
- package/dist/src/Functions/Input/Segmented/_.d.ts +0 -1
- package/dist/src/Functions/Input/Select/_.d.ts +0 -1
- package/dist/src/Functions/Input/Slider/_.d.ts +0 -1
- package/dist/src/Functions/Input/Switch/_.d.ts +0 -1
- package/dist/src/Functions/Input/Text.d.ts +0 -5
- package/dist/src/Functions/Input/TextArea.d.ts +0 -1
- package/dist/src/Functions/Input/Time/Picker.d.ts +0 -1
- package/dist/src/Functions/Input/Time/_.d.ts +0 -2
- package/dist/src/Functions/Input/_.d.ts +0 -5
- package/dist/src/Functions/Input/core.d.ts +0 -34
- package/dist/src/Functions/Inputs/_.d.ts +0 -3
- package/dist/src/Functions/Inputs/text.d.ts +0 -12
- package/dist/src/Functions/Layout/PageNotFound.d.ts +0 -1
- package/dist/src/Functions/Layout/PageRouter.d.ts +0 -2
- package/dist/src/Functions/Layout/PageViewController/parts.d.ts +0 -1
- package/dist/src/Functions/Layout/Plate.d.ts +0 -1
- package/dist/src/Functions/Layout/RootViewController/parts.d.ts +0 -1
- package/dist/src/Functions/Layout/SwipeView/parts.d.ts +0 -2
- package/dist/src/Functions/Layout/TabBar.d.ts +0 -1
- package/dist/src/Functions/Layout/_.d.ts +0 -2
- package/dist/src/Functions/Loader/corner.d.ts +0 -1
- package/dist/src/Functions/Loader/mini.d.ts +0 -33
- package/dist/src/Functions/Loader/parts.d.ts +0 -3
- package/dist/src/Functions/Loader/top.d.ts +0 -1
- package/dist/src/Functions/Sheet/parts.d.ts +0 -2
- package/dist/src/Functions/SnackBar/parts.d.ts +0 -2
- package/dist/src/Functions/Table/Data/parts.d.ts +0 -3
- package/dist/src/Functions/Table/Drag/parts.d.ts +0 -1
- package/dist/src/Functions/Table/Normal/parts.d.ts +0 -1
- package/dist/src/Functions/Table/_.d.ts +0 -9
- package/dist/src/Functions/Tooltips/parts.d.ts +0 -2
- package/dist/src/Global/@export.d.ts +0 -12
- package/dist/src/Global/LaunchReactApplication.d.ts +0 -1
- package/dist/src/Global/styleConverter.d.ts +0 -2
- package/dist/src/Molecules/@export.d.ts +0 -21
- package/dist/src/Molecules/Accordion/parts.d.ts +0 -2
- package/dist/src/Molecules/LinkifyText/parts.d.ts +0 -1
- package/dist/src/Molecules/List.d.ts +0 -1
- package/dist/src/Organisms/@export.d.ts +0 -2
- package/dist/src/Organisms/DisplayStyleInput/_.d.ts +0 -1
- package/dist/src/Organisms/DisplayStyleInput/darkmode.d.ts +0 -1
- package/dist/src/Organisms/DisplayStyleInput/themeColor.d.ts +0 -27
- package/dist/src/Templates/@export.d.ts +0 -2
- package/dist/src/Templates/PlayGround/parts.d.ts +0 -1
- package/dist/src/config.d.ts +0 -16
- package/dist/src/launch.d.ts +0 -9
- package/dist/src/preload.d.ts +0 -1
- package/src/@jsminAmotifyExtension/_.tsx +0 -4
- package/src/@jsminAmotifyExtension/fetch.tsx +0 -107
- package/src/@jsminAmotifyExtension/formCollect.tsx +0 -89
- package/src/@jsminAmotifyExtension/spreadSheet.tsx +0 -159
- package/src/@jsminAmotifyExtension/variables.tsx +0 -130
- package/src/@styles/@app.scss +0 -4
- package/src/@styles/@variables/customProps.scss +0 -109
- package/src/@styles/@variables/styleSet.scss +0 -38
- package/src/@styles/@variables/themeColor.scss +0 -71
- package/src/@styles/@variables/var.scss +0 -171
- package/src/@styles/UniStyling.scss +0 -996
- package/src/@styles/init.scss +0 -154
- package/src/@types/_.tsx +0 -6
- package/src/@types/amot.tsx +0 -323
- package/src/@types/fn.tsx +0 -1210
- package/src/@types/index.tsx +0 -74
- package/src/@types/jsminAmotifyExtension.tsx +0 -143
- package/src/@types/module.tsx +0 -2
- package/src/@types/state.tsx +0 -199
- package/src/Atoms/@export.tsx +0 -32
- package/src/Atoms/FAIcon/parts.tsx +0 -117
- package/src/Atoms/FAIcon/style.module.scss +0 -9
- package/src/Atoms/Logo/parts.tsx +0 -335
- package/src/Atoms/Logo/style.module.scss +0 -96
- package/src/Atoms/Various/parts.tsx +0 -157
- package/src/Atoms/Various/style.module.scss +0 -40
- package/src/Functions/@export.tsx +0 -29
- package/src/Functions/Button/_.tsx +0 -305
- package/src/Functions/Button/style.module.scss +0 -183
- package/src/Functions/Cropper/parts.tsx +0 -1061
- package/src/Functions/Cropper/style.module.scss +0 -62
- package/src/Functions/Effects/Fade.tsx +0 -81
- package/src/Functions/Effects/Ripple.tsx +0 -141
- package/src/Functions/Effects/_.tsx +0 -33
- package/src/Functions/Effects/style.module.scss +0 -83
- package/src/Functions/Input/Chips/Selector.tsx +0 -451
- package/src/Functions/Input/Chips/_.tsx +0 -286
- package/src/Functions/Input/Chips/style.module.scss +0 -6
- package/src/Functions/Input/DigitCharacters.tsx +0 -241
- package/src/Functions/Input/File/_.tsx +0 -596
- package/src/Functions/Input/File/style.module.scss +0 -34
- package/src/Functions/Input/Hidden.tsx +0 -18
- package/src/Functions/Input/List/_.tsx +0 -383
- package/src/Functions/Input/List/style.module.scss +0 -84
- package/src/Functions/Input/Segmented/_.tsx +0 -238
- package/src/Functions/Input/Segmented/style.module.scss +0 -81
- package/src/Functions/Input/Select/_.tsx +0 -225
- package/src/Functions/Input/Select/style.module.scss +0 -10
- package/src/Functions/Input/Slider/_.tsx +0 -519
- package/src/Functions/Input/Slider/style.module.scss +0 -67
- package/src/Functions/Input/Switch/_.tsx +0 -177
- package/src/Functions/Input/Switch/style.module.scss +0 -18
- package/src/Functions/Input/Text.tsx +0 -437
- package/src/Functions/Input/TextArea.tsx +0 -115
- package/src/Functions/Input/Time/Picker.tsx +0 -950
- package/src/Functions/Input/Time/_.tsx +0 -736
- package/src/Functions/Input/Time/style.module.scss +0 -72
- package/src/Functions/Input/_.tsx +0 -793
- package/src/Functions/Input/core.tsx +0 -461
- package/src/Functions/Input/style.module.scss +0 -43
- package/src/Functions/Inputs/_.tsx +0 -5
- package/src/Functions/Inputs/style.module.scss +0 -15
- package/src/Functions/Inputs/text.tsx +0 -67
- package/src/Functions/Inputs/types.d.ts +0 -1
- package/src/Functions/Layout/PageNotFound.tsx +0 -81
- package/src/Functions/Layout/PageRouter.tsx +0 -107
- package/src/Functions/Layout/PageViewController/parts.tsx +0 -32
- package/src/Functions/Layout/Plate.tsx +0 -30
- package/src/Functions/Layout/RootViewController/parts.tsx +0 -290
- package/src/Functions/Layout/RootViewController/style.module.scss +0 -24
- package/src/Functions/Layout/SwipeView/parts.tsx +0 -380
- package/src/Functions/Layout/SwipeView/style.module.scss +0 -19
- package/src/Functions/Layout/TabBar.tsx +0 -64
- package/src/Functions/Layout/_.tsx +0 -20
- package/src/Functions/Loader/corner.tsx +0 -78
- package/src/Functions/Loader/mini.tsx +0 -117
- package/src/Functions/Loader/parts.tsx +0 -105
- package/src/Functions/Loader/style.module.scss +0 -222
- package/src/Functions/Loader/top.tsx +0 -90
- package/src/Functions/Sheet/parts.tsx +0 -972
- package/src/Functions/Sheet/style.module.scss +0 -235
- package/src/Functions/SnackBar/parts.tsx +0 -215
- package/src/Functions/SnackBar/style.module.scss +0 -25
- package/src/Functions/Table/Data/parts.tsx +0 -955
- package/src/Functions/Table/Drag/parts.tsx +0 -448
- package/src/Functions/Table/Normal/parts.tsx +0 -123
- package/src/Functions/Table/_.tsx +0 -170
- package/src/Functions/Table/style.module.scss +0 -92
- package/src/Functions/Tooltips/parts.tsx +0 -52
- package/src/Global/@export.tsx +0 -138
- package/src/Global/LaunchReactApplication.tsx +0 -30
- package/src/Global/exe.tsx +0 -0
- package/src/Global/styleConverter.tsx +0 -435
- package/src/Molecules/@export.tsx +0 -95
- package/src/Molecules/Accordion/parts.tsx +0 -146
- package/src/Molecules/Accordion/style.module.scss +0 -13
- package/src/Molecules/LinkifyText/parts.tsx +0 -54
- package/src/Molecules/List.tsx +0 -30
- package/src/Organisms/@export.tsx +0 -5
- package/src/Organisms/DisplayStyleInput/_.tsx +0 -18
- package/src/Organisms/DisplayStyleInput/darkmode.tsx +0 -112
- package/src/Organisms/DisplayStyleInput/themeColor.tsx +0 -210
- package/src/Templates/@export.tsx +0 -7
- package/src/Templates/PlayGround/parts.tsx +0 -115
- package/src/Templates/PlayGround/style.module.scss +0 -38
- package/src/config.tsx +0 -132
- package/src/launch.tsx +0 -100
- package/src/preload.tsx +0 -49
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
@use '@uniVar' as *;
|
|
2
|
-
@use'@styleSet' as *;
|
|
3
|
-
.Label {
|
|
4
|
-
user-select: none;
|
|
5
|
-
-webkit-user-select: none;
|
|
6
|
-
flex: auto;
|
|
7
|
-
&.Tone_ {
|
|
8
|
-
&Auto, &Cloud, &ThemeCloud, &WhiteCloud {
|
|
9
|
-
&:before {
|
|
10
|
-
transform: scale(0.4);
|
|
11
|
-
@include absoluteCovered();
|
|
12
|
-
background-color: $color-theme;
|
|
13
|
-
opacity: 0;
|
|
14
|
-
border-radius: inherit;
|
|
15
|
-
box-shadow: $shadow1;
|
|
16
|
-
transition: $animation-time-middle;
|
|
17
|
-
}
|
|
18
|
-
&.Checked {
|
|
19
|
-
&:before {
|
|
20
|
-
transform: scale(1);
|
|
21
|
-
opacity: 1;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
&WhiteCloud {
|
|
26
|
-
&:before {
|
|
27
|
-
background-color: $color-layer1;
|
|
28
|
-
}
|
|
29
|
-
&.Checked {
|
|
30
|
-
background-color: $color-layer1 !important;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
&ThemeCloud {
|
|
34
|
-
&.Checked {
|
|
35
|
-
background-color: $color-theme;
|
|
36
|
-
&:focus, &:active {
|
|
37
|
-
background-color: $color-theme !important;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
&Border {}
|
|
42
|
-
&ThemeBorder {
|
|
43
|
-
&.Checked {
|
|
44
|
-
background-color: $color-theme;
|
|
45
|
-
&:focus, &:active {
|
|
46
|
-
background-color: $color-theme !important;
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
&BottomLine {
|
|
51
|
-
&:after {
|
|
52
|
-
content: "";
|
|
53
|
-
position: absolute;
|
|
54
|
-
bottom: 0;
|
|
55
|
-
left: 0;
|
|
56
|
-
right: 0;
|
|
57
|
-
height: $unit1_3;
|
|
58
|
-
background-color: $color-theme;
|
|
59
|
-
opacity: 0;
|
|
60
|
-
border-radius: 100rem;
|
|
61
|
-
transition: $animation-time-middle;
|
|
62
|
-
}
|
|
63
|
-
&:hover, &:focus {
|
|
64
|
-
background-color: $color-theme-opacity-few;
|
|
65
|
-
color: $color-theme;
|
|
66
|
-
&:after {
|
|
67
|
-
opacity: .2;
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
&:active {
|
|
71
|
-
background-color: $color-theme-opacity-few;
|
|
72
|
-
&:after {
|
|
73
|
-
opacity: .4;
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
&.Checked:after {
|
|
77
|
-
opacity: 1;
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
}
|
|
@@ -1,225 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
React,
|
|
3
|
-
} from '@global';
|
|
4
|
-
const {
|
|
5
|
-
useState
|
|
6
|
-
} = React;
|
|
7
|
-
|
|
8
|
-
import {
|
|
9
|
-
Box
|
|
10
|
-
} from '@atoms';
|
|
11
|
-
import {
|
|
12
|
-
BoxWrapper,
|
|
13
|
-
SubmitForm,
|
|
14
|
-
ValidationCheck,
|
|
15
|
-
CommonEffects
|
|
16
|
-
} from '../core';
|
|
17
|
-
import {
|
|
18
|
-
Buttons
|
|
19
|
-
} from '@functions';
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
import style from './style.module.scss';
|
|
23
|
-
import coreStyle from '../style.module.scss';
|
|
24
|
-
|
|
25
|
-
function DefaultValidation( props: {
|
|
26
|
-
value: any
|
|
27
|
-
params: any
|
|
28
|
-
} ): amotify.fn.Input.Validation.Result {
|
|
29
|
-
let {
|
|
30
|
-
value,
|
|
31
|
-
params
|
|
32
|
-
} = props;
|
|
33
|
-
let {
|
|
34
|
-
required,
|
|
35
|
-
options
|
|
36
|
-
} = params as amotify.fn.Input.Select.PlainParams;
|
|
37
|
-
let notice: amotify.fn.Input.Validation.NoticeTypes[] = [];
|
|
38
|
-
|
|
39
|
-
if ( required ) {
|
|
40
|
-
if ( !options.length || ( options.length && $.is.nullish( JSON.parse( value ) ) ) ) {
|
|
41
|
-
notice.push( { type: 'invalid',label: '必須項目です' } );
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
return {
|
|
46
|
-
ok: !notice.filter( ( { type } ) => type == 'invalid' ).length,
|
|
47
|
-
notice: notice
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
export const SelectInput: FNC<amotify.fn.Input.Select.PlainParams> = ( params ) => {
|
|
52
|
-
let {
|
|
53
|
-
value = null,
|
|
54
|
-
placeholder,
|
|
55
|
-
options = []
|
|
56
|
-
} = params;
|
|
57
|
-
|
|
58
|
-
let SelectedExist = 0;
|
|
59
|
-
let SelectedValue = JSON.stringify( value );
|
|
60
|
-
let DefaultOptions = options.map( ( option ) => {
|
|
61
|
-
let { value,label } = option;
|
|
62
|
-
let Value = JSON.stringify( value );
|
|
63
|
-
let Selected = Value == SelectedValue;
|
|
64
|
-
SelectedExist |= Number( Selected );
|
|
65
|
-
|
|
66
|
-
return {
|
|
67
|
-
...option,
|
|
68
|
-
value: Value,
|
|
69
|
-
label
|
|
70
|
-
}
|
|
71
|
-
} );
|
|
72
|
-
if ( !SelectedExist ) value = null;
|
|
73
|
-
let DefaultValue = JSON.stringify( value );
|
|
74
|
-
|
|
75
|
-
return ( <Core
|
|
76
|
-
{ ...params }
|
|
77
|
-
value={ DefaultValue }
|
|
78
|
-
options={ DefaultOptions }
|
|
79
|
-
/>
|
|
80
|
-
);
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
const Core: FNC<amotify.fn.Input.Select.PlainParams> = ( params ) => {
|
|
84
|
-
let {
|
|
85
|
-
tone,
|
|
86
|
-
required,
|
|
87
|
-
form,
|
|
88
|
-
className,
|
|
89
|
-
|
|
90
|
-
enableFormSubmit,
|
|
91
|
-
enableUnSelected,
|
|
92
|
-
|
|
93
|
-
checkValidationAtFirst,
|
|
94
|
-
onChange,onKeyDown,
|
|
95
|
-
onValidate,
|
|
96
|
-
onUpdateValue,
|
|
97
|
-
onUpdateValidValue,
|
|
98
|
-
value = '',
|
|
99
|
-
options,
|
|
100
|
-
placeholder,
|
|
101
|
-
|
|
102
|
-
leftIndicator,rightIndicator,rightIcon,
|
|
103
|
-
|
|
104
|
-
...others
|
|
105
|
-
} = params;
|
|
106
|
-
|
|
107
|
-
let Default_Status: amotify.fn.Input.Status.Plain = {
|
|
108
|
-
componentID: params.componentID || '',
|
|
109
|
-
dataValue: value,
|
|
110
|
-
eventType: 'init',
|
|
111
|
-
eventID: $.uuidGen()
|
|
112
|
-
}
|
|
113
|
-
let [ val_status,set_status ] = useState( Default_Status );
|
|
114
|
-
let [ val_validate,set_validate ] = useState( {
|
|
115
|
-
ok: false,
|
|
116
|
-
notice: []
|
|
117
|
-
} as amotify.fn.Input.Validation.Result );
|
|
118
|
-
|
|
119
|
-
CommonEffects( {
|
|
120
|
-
type: 'select',
|
|
121
|
-
params,
|
|
122
|
-
val_status,
|
|
123
|
-
set_status,
|
|
124
|
-
ExtraOverrideParams: {
|
|
125
|
-
dataValue: value,
|
|
126
|
-
formatValue: value,
|
|
127
|
-
},
|
|
128
|
-
val_validate,
|
|
129
|
-
set_validate,
|
|
130
|
-
DefaultValidation,
|
|
131
|
-
onUpdateValue,
|
|
132
|
-
onUpdateValidValue
|
|
133
|
-
} );
|
|
134
|
-
|
|
135
|
-
let SelectedElement: ReactElement = <Box fontColor='4.thin'>{ placeholder || '選択' }</Box>;
|
|
136
|
-
if ( val_status.dataValue ) {
|
|
137
|
-
let Selected = options.find( ( option ) => option.value == val_status.dataValue );
|
|
138
|
-
if ( Selected ) SelectedElement = Selected.displayLabel ?? Selected.label;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
return ( <BoxWrapper
|
|
142
|
-
val_status={ val_status }
|
|
143
|
-
set_status={ set_status }
|
|
144
|
-
val_validate={ val_validate }
|
|
145
|
-
params={ params }
|
|
146
|
-
>
|
|
147
|
-
<Box
|
|
148
|
-
className={ [
|
|
149
|
-
className,
|
|
150
|
-
style.SelectLegend,
|
|
151
|
-
coreStyle.InputCover
|
|
152
|
-
].join( ' ' ) }
|
|
153
|
-
>
|
|
154
|
-
{ SelectedElement }
|
|
155
|
-
<select
|
|
156
|
-
data-form={ form }
|
|
157
|
-
data-input-type={ 'select' }
|
|
158
|
-
data-validation={ val_validate.ok }
|
|
159
|
-
data-component-id={ val_status.componentID }
|
|
160
|
-
data-value={ val_status.dataValue }
|
|
161
|
-
value={ val_status.dataValue }
|
|
162
|
-
onKeyDown={ ( event ) => {
|
|
163
|
-
if ( onKeyDown ) onKeyDown( event );
|
|
164
|
-
if ( enableFormSubmit ) SubmitForm( event );
|
|
165
|
-
} }
|
|
166
|
-
onChange={ ( event ) => {
|
|
167
|
-
let {
|
|
168
|
-
value: rawValue
|
|
169
|
-
} = event.target;
|
|
170
|
-
|
|
171
|
-
if ( val_validate.ok ) set_validate( { ok: false,notice: [] } );
|
|
172
|
-
set_status( {
|
|
173
|
-
...val_status,
|
|
174
|
-
dataValue: rawValue,
|
|
175
|
-
eventType: 'update',
|
|
176
|
-
eventID: $.uuidGen(),
|
|
177
|
-
} );
|
|
178
|
-
|
|
179
|
-
if ( onChange ) onChange( event );
|
|
180
|
-
} }
|
|
181
|
-
{ ...others as any }
|
|
182
|
-
className={ style.Select }
|
|
183
|
-
>
|
|
184
|
-
<Options params={ params } />
|
|
185
|
-
</select>
|
|
186
|
-
</Box>
|
|
187
|
-
</BoxWrapper> );
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
const Options: FNC<{ params: amotify.fn.Input.Select.PlainParams }> = ( props ) => {
|
|
191
|
-
let {
|
|
192
|
-
value,
|
|
193
|
-
options = [],
|
|
194
|
-
placeholder = '選択してください',
|
|
195
|
-
enableUnSelected = true
|
|
196
|
-
} = props.params;
|
|
197
|
-
|
|
198
|
-
let SelectedValue = String( value );
|
|
199
|
-
let Options = options.map( ( option: amotify.fn.Input.Select.OptionProps ) => {
|
|
200
|
-
let {
|
|
201
|
-
value,
|
|
202
|
-
label,
|
|
203
|
-
} = option;
|
|
204
|
-
let Value = String( value );
|
|
205
|
-
return ( <option
|
|
206
|
-
value={ Value }
|
|
207
|
-
key={ Value }
|
|
208
|
-
selected={ Value == SelectedValue }
|
|
209
|
-
children={ label }
|
|
210
|
-
/> );
|
|
211
|
-
} );
|
|
212
|
-
|
|
213
|
-
if ( enableUnSelected ) {
|
|
214
|
-
Options.unshift( <option
|
|
215
|
-
key={ 0 }
|
|
216
|
-
value={ JSON.stringify( null ) }
|
|
217
|
-
selected={ SelectedValue == 'null' }
|
|
218
|
-
children={ placeholder }
|
|
219
|
-
/> );
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
return ( <>
|
|
223
|
-
{ Options }
|
|
224
|
-
</> );
|
|
225
|
-
}
|