amotify 0.0.65 → 0.0.67
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/amotify.js +3 -2
- package/dist/amotify.min.css +2 -2
- package/dist/coreVender.js +14 -2
- package/dist/node_modules/@fortawesome/free-regular-svg-icons/faCalendarAlt.d.ts +7 -0
- package/dist/node_modules/@fortawesome/free-regular-svg-icons/faCalendarDays.d.ts +14 -0
- package/dist/node_modules/@fortawesome/free-regular-svg-icons/faClock.d.ts +14 -0
- package/dist/node_modules/@fortawesome/free-solid-svg-icons/faAngleDown.d.ts +14 -0
- package/dist/node_modules/@fortawesome/free-solid-svg-icons/faAngleLeft.d.ts +14 -0
- package/dist/node_modules/@fortawesome/free-solid-svg-icons/faAngleRight.d.ts +14 -0
- package/dist/node_modules/@fortawesome/free-solid-svg-icons/faAngleUp.d.ts +14 -0
- package/dist/node_modules/@fortawesome/free-solid-svg-icons/faArrowDown.d.ts +14 -0
- package/dist/node_modules/@fortawesome/free-solid-svg-icons/faArrowLeft.d.ts +14 -0
- package/dist/node_modules/@fortawesome/free-solid-svg-icons/faArrowRight.d.ts +14 -0
- package/dist/node_modules/@fortawesome/free-solid-svg-icons/faArrowRotateRight.d.ts +14 -0
- package/dist/node_modules/@fortawesome/free-solid-svg-icons/faArrowUp.d.ts +14 -0
- package/dist/node_modules/@fortawesome/free-solid-svg-icons/faBars.d.ts +14 -0
- package/dist/node_modules/@fortawesome/free-solid-svg-icons/faBarsStaggered.d.ts +14 -0
- package/dist/node_modules/@fortawesome/free-solid-svg-icons/faCaretDown.d.ts +14 -0
- package/dist/node_modules/@fortawesome/free-solid-svg-icons/faCaretLeft.d.ts +14 -0
- package/dist/node_modules/@fortawesome/free-solid-svg-icons/faCaretRight.d.ts +14 -0
- package/dist/node_modules/@fortawesome/free-solid-svg-icons/faCaretUp.d.ts +14 -0
- package/dist/node_modules/@fortawesome/free-solid-svg-icons/faCheck.d.ts +14 -0
- package/dist/node_modules/@fortawesome/free-solid-svg-icons/faCheckCircle.d.ts +7 -0
- package/dist/node_modules/@fortawesome/free-solid-svg-icons/faChevronDown.d.ts +14 -0
- package/dist/node_modules/@fortawesome/free-solid-svg-icons/faChevronLeft.d.ts +14 -0
- package/dist/node_modules/@fortawesome/free-solid-svg-icons/faChevronRight.d.ts +14 -0
- package/dist/node_modules/@fortawesome/free-solid-svg-icons/faChevronUp.d.ts +14 -0
- package/dist/node_modules/@fortawesome/free-solid-svg-icons/faCircleCheck.d.ts +14 -0
- package/dist/node_modules/@fortawesome/free-solid-svg-icons/faCircleQuestion.d.ts +14 -0
- package/dist/node_modules/@fortawesome/free-solid-svg-icons/faCloudArrowUp.d.ts +14 -0
- package/dist/node_modules/@fortawesome/free-solid-svg-icons/faCopy.d.ts +14 -0
- package/dist/node_modules/@fortawesome/free-solid-svg-icons/faDownload.d.ts +14 -0
- package/dist/node_modules/@fortawesome/free-solid-svg-icons/faEdit.d.ts +7 -0
- package/dist/node_modules/@fortawesome/free-solid-svg-icons/faEllipsis.d.ts +14 -0
- package/dist/node_modules/@fortawesome/free-solid-svg-icons/faEllipsisH.d.ts +7 -0
- package/dist/node_modules/@fortawesome/free-solid-svg-icons/faEllipsisV.d.ts +7 -0
- package/dist/node_modules/@fortawesome/free-solid-svg-icons/faEllipsisVertical.d.ts +14 -0
- package/dist/node_modules/@fortawesome/free-solid-svg-icons/faExclamation.d.ts +14 -0
- package/dist/node_modules/@fortawesome/free-solid-svg-icons/faExclamationTriangle.d.ts +7 -0
- package/dist/node_modules/@fortawesome/free-solid-svg-icons/faExternalLinkAlt.d.ts +7 -0
- package/dist/node_modules/@fortawesome/free-solid-svg-icons/faEye.d.ts +14 -0
- package/dist/node_modules/@fortawesome/free-solid-svg-icons/faFile.d.ts +14 -0
- package/dist/node_modules/@fortawesome/free-solid-svg-icons/faFilter.d.ts +14 -0
- package/dist/node_modules/@fortawesome/free-solid-svg-icons/faGear.d.ts +14 -0
- package/dist/node_modules/@fortawesome/free-solid-svg-icons/faGripVertical.d.ts +14 -0
- package/dist/node_modules/@fortawesome/free-solid-svg-icons/faHeart.d.ts +14 -0
- package/dist/node_modules/@fortawesome/free-solid-svg-icons/faHome.d.ts +7 -0
- package/dist/node_modules/@fortawesome/free-solid-svg-icons/faHouse.d.ts +14 -0
- package/dist/node_modules/@fortawesome/free-solid-svg-icons/faImage.d.ts +14 -0
- package/dist/node_modules/@fortawesome/free-solid-svg-icons/faLink.d.ts +14 -0
- package/dist/node_modules/@fortawesome/free-solid-svg-icons/faLinkSlash.d.ts +14 -0
- package/dist/node_modules/@fortawesome/free-solid-svg-icons/faMagnifyingGlass.d.ts +14 -0
- package/dist/node_modules/@fortawesome/free-solid-svg-icons/faMinus.d.ts +14 -0
- package/dist/node_modules/@fortawesome/free-solid-svg-icons/faPalette.d.ts +14 -0
- package/dist/node_modules/@fortawesome/free-solid-svg-icons/faPaperPlane.d.ts +14 -0
- package/dist/node_modules/@fortawesome/free-solid-svg-icons/faPen.d.ts +14 -0
- package/dist/node_modules/@fortawesome/free-solid-svg-icons/faPenToSquare.d.ts +14 -0
- package/dist/node_modules/@fortawesome/free-solid-svg-icons/faPlus.d.ts +14 -0
- package/dist/node_modules/@fortawesome/free-solid-svg-icons/faQuestion.d.ts +14 -0
- package/dist/node_modules/@fortawesome/free-solid-svg-icons/faQuestionCircle.d.ts +7 -0
- package/dist/node_modules/@fortawesome/free-solid-svg-icons/faRedo.d.ts +7 -0
- package/dist/node_modules/@fortawesome/free-solid-svg-icons/faRotate.d.ts +14 -0
- package/dist/node_modules/@fortawesome/free-solid-svg-icons/faRotateLeft.d.ts +14 -0
- package/dist/node_modules/@fortawesome/free-solid-svg-icons/faRotateRight.d.ts +14 -0
- package/dist/node_modules/@fortawesome/free-solid-svg-icons/faSearch.d.ts +7 -0
- package/dist/node_modules/@fortawesome/free-solid-svg-icons/faShare.d.ts +14 -0
- package/dist/node_modules/@fortawesome/free-solid-svg-icons/faStar.d.ts +14 -0
- package/dist/node_modules/@fortawesome/free-solid-svg-icons/faTimes.d.ts +7 -0
- package/dist/node_modules/@fortawesome/free-solid-svg-icons/faTrashAlt.d.ts +7 -0
- package/dist/node_modules/@fortawesome/free-solid-svg-icons/faTrashCan.d.ts +14 -0
- package/dist/node_modules/@fortawesome/free-solid-svg-icons/faTriangleExclamation.d.ts +14 -0
- package/dist/node_modules/@fortawesome/free-solid-svg-icons/faUpRightFromSquare.d.ts +14 -0
- package/dist/node_modules/@fortawesome/free-solid-svg-icons/faUser.d.ts +14 -0
- package/dist/node_modules/@fortawesome/free-solid-svg-icons/faXmark.d.ts +14 -0
- package/dist/node_modules/@fortawesome/free-solid-svg-icons/faYenSign.d.ts +14 -0
- package/dist/node_modules/@fortawesome/react-fontawesome/index.es.d.ts +2 -0
- package/dist/node_modules/@remix-run/router/dist/router.d.ts +317 -0
- package/dist/node_modules/css-loader/dist/runtime/api.d.ts +2 -0
- package/dist/node_modules/css-loader/dist/runtime/noSourceMaps.d.ts +2 -0
- package/dist/node_modules/jsmin-front/dist/jsmin.d.ts +3 -0
- package/dist/node_modules/prop-types/factoryWithThrowingShims.d.ts +86 -0
- package/dist/node_modules/prop-types/index.d.ts +2 -0
- package/dist/node_modules/prop-types/lib/ReactPropTypesSecret.d.ts +2 -0
- package/dist/node_modules/react/cjs/react.production.min.d.ts +116 -0
- package/dist/node_modules/react/index.d.ts +2 -0
- package/dist/node_modules/react-dom/cjs/react-dom.production.min.d.ts +37 -0
- package/dist/node_modules/react-dom/client.d.ts +2 -0
- package/dist/node_modules/react-dom/index.d.ts +2 -0
- package/dist/node_modules/react-router/dist/index.d.ts +241 -0
- package/dist/node_modules/react-router-dom/dist/index.d.ts +139 -0
- package/dist/node_modules/scheduler/cjs/scheduler.production.min.d.ts +20 -0
- package/dist/node_modules/scheduler/index.d.ts +2 -0
- package/dist/src/@atoms.d.ts +4 -0
- package/dist/src/@declations/_.d.ts +23 -0
- package/dist/src/@declations/amotify.d.ts +1358 -0
- package/dist/src/@declations/jsminAmotifyExtension.d.ts +132 -0
- package/dist/src/@declations/module.d.ts +1 -0
- package/dist/src/@declations/styles.d.ts +145 -0
- package/dist/src/@functions.d.ts +12 -0
- package/dist/src/@global.d.ts +23 -0
- package/dist/src/@jsminAmotifyExtension/_.d.ts +4 -0
- package/dist/src/@jsminAmotifyExtension/fetch.d.ts +1 -0
- package/dist/src/@jsminAmotifyExtension/formCollect.d.ts +1 -0
- package/dist/src/@jsminAmotifyExtension/spreadSheet.d.ts +4 -0
- package/dist/src/@jsminAmotifyExtension/variables.d.ts +1 -0
- package/dist/src/@molecules.d.ts +23 -0
- package/dist/src/@organisms.d.ts +1 -0
- package/dist/src/@templates.d.ts +2 -0
- package/dist/src/@variables.d.ts +8 -0
- package/dist/src/atoms/FAI/parts.d.ts +3 -0
- package/dist/src/atoms/Logo/parts.d.ts +2 -0
- package/dist/src/atoms/Various/parts.d.ts +11 -0
- package/dist/src/config.d.ts +19 -0
- package/dist/src/functions/Button/_.d.ts +2 -0
- package/dist/src/functions/Cropper/parts.d.ts +2 -0
- package/dist/src/functions/Effects/Fade.d.ts +2 -0
- package/dist/src/functions/Effects/Ripple.d.ts +1 -0
- package/dist/src/functions/Effects/_.d.ts +4 -0
- package/dist/src/functions/Input/Chips/Selector.d.ts +2 -0
- package/dist/src/functions/Input/Chips/_.d.ts +3 -0
- package/dist/src/functions/Input/Contenteditable.d.ts +4 -0
- package/dist/src/functions/Input/DigitCharacters.d.ts +4 -0
- package/dist/src/functions/Input/File/_.d.ts +3 -0
- package/dist/src/functions/Input/Hidden.d.ts +3 -0
- package/dist/src/functions/Input/List/_.d.ts +4 -0
- package/dist/src/functions/Input/RichSelect/_.d.ts +4 -0
- package/dist/src/functions/Input/Segmented/_.d.ts +2 -0
- package/dist/src/functions/Input/Select/_.d.ts +4 -0
- package/dist/src/functions/Input/Slider/_.d.ts +4 -0
- package/dist/src/functions/Input/Switch/_.d.ts +4 -0
- package/dist/src/functions/Input/Text.d.ts +8 -0
- package/dist/src/functions/Input/TextArea.d.ts +4 -0
- package/dist/src/functions/Input/Time/Picker.d.ts +4 -0
- package/dist/src/functions/Input/Time/_.d.ts +5 -0
- package/dist/src/functions/Input/_.d.ts +6 -0
- package/dist/src/functions/Input/core.d.ts +36 -0
- package/dist/src/functions/Inputs/_.d.ts +4 -0
- package/dist/src/functions/Inputs/text.d.ts +3 -0
- package/dist/src/functions/Layout/PageNotFound.d.ts +2 -0
- package/dist/src/functions/Layout/PageRouter.d.ts +4 -0
- package/dist/src/functions/Layout/PageViewController/parts.d.ts +4 -0
- package/dist/src/functions/Layout/Plate.d.ts +3 -0
- package/dist/src/functions/Layout/RootViewController/parts.d.ts +2 -0
- package/dist/src/functions/Layout/SwipeView/parts.d.ts +5 -0
- package/dist/src/functions/Layout/TabBar.d.ts +4 -0
- package/dist/src/functions/Layout/_.d.ts +3 -0
- package/dist/src/functions/Loader/corner.d.ts +3 -0
- package/dist/src/functions/Loader/mini.d.ts +7 -0
- package/dist/src/functions/Loader/parts.d.ts +4 -0
- package/dist/src/functions/Loader/top.d.ts +3 -0
- package/dist/src/functions/Sheet/parts.d.ts +3 -0
- package/dist/src/functions/SnackBar/parts.d.ts +3 -0
- package/dist/src/functions/Table/Data/parts.d.ts +6 -0
- package/dist/src/functions/Table/Drag/parts.d.ts +4 -0
- package/dist/src/functions/Table/Normal/parts.d.ts +3 -0
- package/dist/src/functions/Table/_.d.ts +10 -0
- package/dist/src/functions/Tooltips/parts.d.ts +3 -0
- package/dist/src/global/LaunchReactApplication.d.ts +3 -0
- package/dist/src/global/styleConverter.d.ts +3 -0
- package/dist/src/launch.d.ts +10 -0
- package/dist/src/molecules/Accordion/parts.d.ts +3 -0
- package/dist/src/molecules/LinkifyText/parts.d.ts +3 -0
- package/dist/src/molecules/List.d.ts +3 -0
- package/dist/src/templates/PlayGround/parts.d.ts +2 -0
- package/package.json +10 -10
- package/tsconfig.json +14 -7
- package/@types/_.tsx +0 -7
- package/@types/amot.tsx +0 -355
- package/@types/fn.tsx +0 -1280
- package/@types/jsminAmotifyExtension.tsx +0 -137
- package/@types/module.tsx +0 -1
- package/@types/state.tsx +0 -231
- package/src/@atoms.tsx +0 -34
- package/src/@functions.tsx +0 -29
- package/src/@global.tsx +0 -145
- package/src/@jsminAmotifyExtension/_.tsx +0 -4
- package/src/@jsminAmotifyExtension/fetch.tsx +0 -110
- package/src/@jsminAmotifyExtension/formCollect.tsx +0 -94
- package/src/@jsminAmotifyExtension/spreadSheet.tsx +0 -165
- package/src/@jsminAmotifyExtension/variables.tsx +0 -137
- package/src/@molecules.tsx +0 -96
- package/src/@organisms.tsx +0 -1
- package/src/@reactPacks/reactProduction@18.2.0.js +0 -79
- package/src/@reactPacks/reactRouterDomProduction@18.2.0.js +0 -31
- package/src/@styles/@app.scss +0 -4
- package/src/@styles/UniStyling.scss +0 -1028
- package/src/@styles/init.scss +0 -94
- package/src/@styles/props.scss +0 -109
- package/src/@styles/styleSet.scss +0 -38
- package/src/@styles/themeColor.scss +0 -71
- package/src/@styles/var.scss +0 -182
- package/src/@templates.tsx +0 -7
- package/src/@variables.tsx +0 -74
- package/src/atoms/FAI/parts.tsx +0 -139
- package/src/atoms/Logo/parts.tsx +0 -335
- package/src/atoms/Logo/style.module.scss +0 -96
- package/src/atoms/Various/parts.tsx +0 -159
- package/src/atoms/Various/style.module.scss +0 -46
- package/src/config.tsx +0 -191
- package/src/functions/Button/_.tsx +0 -331
- package/src/functions/Button/style.module.scss +0 -157
- package/src/functions/Cropper/parts.tsx +0 -1084
- package/src/functions/Cropper/style.module.scss +0 -64
- package/src/functions/Effects/Fade.tsx +0 -76
- package/src/functions/Effects/Ripple.tsx +0 -141
- package/src/functions/Effects/_.tsx +0 -33
- package/src/functions/Effects/style.module.scss +0 -91
- package/src/functions/Input/Chips/Selector.tsx +0 -445
- package/src/functions/Input/Chips/_.tsx +0 -289
- package/src/functions/Input/Chips/style.module.scss +0 -6
- package/src/functions/Input/Contenteditable.tsx +0 -114
- package/src/functions/Input/DigitCharacters.tsx +0 -235
- package/src/functions/Input/File/_.tsx +0 -553
- package/src/functions/Input/File/style.module.scss +0 -34
- package/src/functions/Input/Hidden.tsx +0 -21
- package/src/functions/Input/List/_.tsx +0 -383
- package/src/functions/Input/List/style.module.scss +0 -84
- package/src/functions/Input/RichSelect/_.tsx +0 -230
- package/src/functions/Input/RichSelect/style.module.scss +0 -11
- package/src/functions/Input/Segmented/_.tsx +0 -246
- package/src/functions/Input/Segmented/style.module.scss +0 -81
- package/src/functions/Input/Select/_.tsx +0 -218
- package/src/functions/Input/Select/style.module.scss +0 -11
- package/src/functions/Input/Slider/_.tsx +0 -524
- package/src/functions/Input/Slider/style.module.scss +0 -67
- package/src/functions/Input/Switch/_.tsx +0 -176
- package/src/functions/Input/Switch/style.module.scss +0 -18
- package/src/functions/Input/Text.tsx +0 -487
- package/src/functions/Input/TextArea.tsx +0 -109
- package/src/functions/Input/Time/Picker.tsx +0 -1361
- package/src/functions/Input/Time/_.tsx +0 -749
- package/src/functions/Input/Time/style.module.scss +0 -79
- package/src/functions/Input/_.tsx +0 -881
- package/src/functions/Input/core.tsx +0 -473
- package/src/functions/Input/style.module.scss +0 -102
- package/src/functions/Inputs/_.tsx +0 -5
- package/src/functions/Inputs/style.module.scss +0 -15
- package/src/functions/Inputs/text.tsx +0 -53
- package/src/functions/Inputs/types.d.ts +0 -13
- package/src/functions/Layout/PageNotFound.tsx +0 -78
- package/src/functions/Layout/PageRouter.tsx +0 -89
- package/src/functions/Layout/PageViewController/parts.tsx +0 -27
- package/src/functions/Layout/Plate.tsx +0 -30
- package/src/functions/Layout/RootViewController/parts.tsx +0 -300
- package/src/functions/Layout/RootViewController/style.module.scss +0 -23
- package/src/functions/Layout/SwipeView/parts.tsx +0 -375
- package/src/functions/Layout/SwipeView/style.module.scss +0 -20
- package/src/functions/Layout/TabBar.tsx +0 -60
- package/src/functions/Layout/_.tsx +0 -20
- package/src/functions/Loader/corner.tsx +0 -74
- package/src/functions/Loader/mini.tsx +0 -114
- package/src/functions/Loader/parts.tsx +0 -103
- package/src/functions/Loader/style.module.scss +0 -223
- package/src/functions/Loader/top.tsx +0 -84
- package/src/functions/Sheet/parts.tsx +0 -994
- package/src/functions/Sheet/style.module.scss +0 -208
- 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 -965
- package/src/functions/Table/Drag/parts.tsx +0 -442
- package/src/functions/Table/Normal/parts.tsx +0 -124
- package/src/functions/Table/_.tsx +0 -177
- package/src/functions/Table/style.module.scss +0 -93
- package/src/functions/Tooltips/parts.tsx +0 -53
- package/src/global/LaunchReactApplication.tsx +0 -40
- package/src/global/styleConverter.tsx +0 -465
- package/src/launch.tsx +0 -117
- package/src/molecules/Accordion/parts.tsx +0 -146
- package/src/molecules/Accordion/style.module.scss +0 -13
- package/src/molecules/LinkifyText/parts.tsx +0 -52
- package/src/molecules/List.tsx +0 -31
- package/src/preload.tsx +0 -31
- package/src/templates/PlayGround/parts.tsx +0 -96
- package/src/templates/PlayGround/style.module.scss +0 -38
- package/webpack.config.js +0 -146
|
@@ -1,383 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
React
|
|
3
|
-
} from '@global'
|
|
4
|
-
import {
|
|
5
|
-
Box,
|
|
6
|
-
Flex,
|
|
7
|
-
FAI
|
|
8
|
-
} from '@atoms'
|
|
9
|
-
import {
|
|
10
|
-
Input,
|
|
11
|
-
Buttons
|
|
12
|
-
} from '@fn'
|
|
13
|
-
import {
|
|
14
|
-
BoxWrapper,
|
|
15
|
-
CommonEffects,
|
|
16
|
-
SubmitForm
|
|
17
|
-
} from '../core'
|
|
18
|
-
import style from './style.module.scss'
|
|
19
|
-
|
|
20
|
-
function DefaultValidation( props: {
|
|
21
|
-
value: any
|
|
22
|
-
params: any
|
|
23
|
-
} ): amotify.fn.Input.Validation.Result {
|
|
24
|
-
let { value,params } = props
|
|
25
|
-
let {
|
|
26
|
-
type,
|
|
27
|
-
required,
|
|
28
|
-
minSelect = 0
|
|
29
|
-
} = params as amotify.fn.Input.List.OriginParams
|
|
30
|
-
let notice: amotify.fn.Input.Validation.NoticeTypes[] = []
|
|
31
|
-
|
|
32
|
-
if ( required ) {
|
|
33
|
-
if ( !value.length ) {
|
|
34
|
-
if ( type == 'radio' ) {
|
|
35
|
-
notice.push( { type: 'invalid',label: '選択されていません' } )
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
if ( minSelect ) {
|
|
41
|
-
if ( value.length < minSelect ) {
|
|
42
|
-
notice.push( { type: 'invalid',label: `${ minSelect }個以上選択してください` } )
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
return {
|
|
47
|
-
ok: !notice.filter( ( { type } ) => type == 'invalid' ).length,
|
|
48
|
-
notice: notice
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
export const ListInput: React.FC<amotify.fn.Input.List.OriginParams> = ( props ) => {
|
|
53
|
-
let { value,options = [] } = props
|
|
54
|
-
let Values = $.is.exist( value ) ? $.flatArray( value ) : []
|
|
55
|
-
let DefaultOptions = options.map( ( option ) => {
|
|
56
|
-
let { value,label } = option
|
|
57
|
-
|
|
58
|
-
return {
|
|
59
|
-
...option,
|
|
60
|
-
value: JSON.stringify( value ),
|
|
61
|
-
label
|
|
62
|
-
}
|
|
63
|
-
} )
|
|
64
|
-
let DefaultValues: string[] = []
|
|
65
|
-
Values.forEach( ( value ) => {
|
|
66
|
-
let Val = JSON.stringify( value )
|
|
67
|
-
let Index = DefaultOptions.findIndex( ( option ) => option.value == Val )
|
|
68
|
-
if ( Index == -1 ) return
|
|
69
|
-
DefaultValues.push( Val )
|
|
70
|
-
} )
|
|
71
|
-
|
|
72
|
-
return <Core
|
|
73
|
-
{ ...props }
|
|
74
|
-
value={ DefaultValues }
|
|
75
|
-
options={ DefaultOptions }
|
|
76
|
-
/>
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
const Core: React.FC<amotify.fn.Input.List.OriginParams> = ( params ) => {
|
|
80
|
-
let {
|
|
81
|
-
type,
|
|
82
|
-
tone,
|
|
83
|
-
required,
|
|
84
|
-
componentID = '',
|
|
85
|
-
form,
|
|
86
|
-
override,
|
|
87
|
-
|
|
88
|
-
freeCSS,
|
|
89
|
-
icon,
|
|
90
|
-
iconType,
|
|
91
|
-
|
|
92
|
-
enableFormSubmit,
|
|
93
|
-
defaultActiveStyling,
|
|
94
|
-
checkValidationAtFirst,
|
|
95
|
-
onValidate,
|
|
96
|
-
onUpdateValue,onUpdateValidValue,
|
|
97
|
-
value,
|
|
98
|
-
options,
|
|
99
|
-
leftIndicator,rightIndicator,
|
|
100
|
-
|
|
101
|
-
className,
|
|
102
|
-
|
|
103
|
-
cellStyles,cellClassName,
|
|
104
|
-
cellCheckedStyles,cellCheckedClassName,
|
|
105
|
-
|
|
106
|
-
...others
|
|
107
|
-
} = params
|
|
108
|
-
|
|
109
|
-
let Default_Status: amotify.fn.Input.Status.Plain = {
|
|
110
|
-
componentID,
|
|
111
|
-
dataValue: value,
|
|
112
|
-
eventType: 'init',
|
|
113
|
-
eventID: $.uuidGen()
|
|
114
|
-
}
|
|
115
|
-
let [ val_status,set_status ] = React.useState( Default_Status )
|
|
116
|
-
let [ val_validate,set_validate ] = React.useState( {
|
|
117
|
-
ok: false,
|
|
118
|
-
notice: []
|
|
119
|
-
} as amotify.fn.Input.Validation.Result )
|
|
120
|
-
|
|
121
|
-
CommonEffects( {
|
|
122
|
-
type: 'list',
|
|
123
|
-
params,
|
|
124
|
-
val_status,
|
|
125
|
-
set_status,
|
|
126
|
-
val_validate,
|
|
127
|
-
set_validate,
|
|
128
|
-
onUpdateValue,onUpdateValidValue,
|
|
129
|
-
DefaultValidation
|
|
130
|
-
} )
|
|
131
|
-
|
|
132
|
-
return <BoxWrapper
|
|
133
|
-
val_status={ val_status }
|
|
134
|
-
set_status={ set_status }
|
|
135
|
-
val_validate={ val_validate }
|
|
136
|
-
params={ params }
|
|
137
|
-
>
|
|
138
|
-
<Input.Hidden
|
|
139
|
-
data-value={ JSON.stringify( val_status.dataValue ) }
|
|
140
|
-
form={ form }
|
|
141
|
-
data-input-type={ type }
|
|
142
|
-
data-validation={ val_validate.ok }
|
|
143
|
-
{ ...others }
|
|
144
|
-
componentID={ val_status.componentID }
|
|
145
|
-
/>
|
|
146
|
-
<CellList
|
|
147
|
-
params={ params }
|
|
148
|
-
val_status={ val_status }
|
|
149
|
-
set_status={ set_status }
|
|
150
|
-
/>
|
|
151
|
-
</BoxWrapper>
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
const CellList: React.FC<{
|
|
155
|
-
params: amotify.fn.Input.List.OriginParams
|
|
156
|
-
val_status: amotify.fn.Input.Status.Plain
|
|
157
|
-
set_status: React.Dispatch<React.SetStateAction<amotify.fn.Input.Status.Plain>>
|
|
158
|
-
}> = ( props ) => {
|
|
159
|
-
let {
|
|
160
|
-
params,
|
|
161
|
-
val_status,
|
|
162
|
-
set_status
|
|
163
|
-
} = props
|
|
164
|
-
|
|
165
|
-
let {
|
|
166
|
-
componentID,
|
|
167
|
-
type,
|
|
168
|
-
tone,
|
|
169
|
-
icon = true,
|
|
170
|
-
options,
|
|
171
|
-
name,
|
|
172
|
-
form,
|
|
173
|
-
tabIndex,
|
|
174
|
-
hideInput,
|
|
175
|
-
disabled: DefaultDisabled,
|
|
176
|
-
className: ListClassName,
|
|
177
|
-
|
|
178
|
-
cellStyles: DefaultCellStyles,
|
|
179
|
-
cellClassName: DefaultCellClassName = '',
|
|
180
|
-
cellCheckedStyles: DefaultCellCheckedStyles,
|
|
181
|
-
cellCheckedClassName: DefaultCellCheckedClassName = '',
|
|
182
|
-
|
|
183
|
-
enableFormSubmit,
|
|
184
|
-
defaultActiveStyling = true
|
|
185
|
-
} = params
|
|
186
|
-
let {
|
|
187
|
-
dataValue
|
|
188
|
-
} = val_status
|
|
189
|
-
|
|
190
|
-
let IconBox = icon ? <Box
|
|
191
|
-
flexSizing={ 'none' }
|
|
192
|
-
children={ params.iconType == 'radio' ? <Comps.RadioIcon /> :
|
|
193
|
-
params.iconType == 'checkbox' ? <Comps.CheckboxIcon /> : null }
|
|
194
|
-
/> : null
|
|
195
|
-
|
|
196
|
-
let Cells = options.map( ( option,index ) => {
|
|
197
|
-
let {
|
|
198
|
-
value,
|
|
199
|
-
label,
|
|
200
|
-
disabled = DefaultDisabled,
|
|
201
|
-
className = '',
|
|
202
|
-
checkedStyles,
|
|
203
|
-
checkedClassName = '',
|
|
204
|
-
...styles
|
|
205
|
-
} = option
|
|
206
|
-
|
|
207
|
-
let CellID = $.uuidGen()
|
|
208
|
-
let Checked = dataValue.findIndex( ( v: string ) => v === value ) != -1
|
|
209
|
-
|
|
210
|
-
let Styles = {
|
|
211
|
-
...DefaultCellStyles,
|
|
212
|
-
...styles
|
|
213
|
-
} as amotifyUniStyleParams
|
|
214
|
-
let ClassName = [
|
|
215
|
-
style.Label,
|
|
216
|
-
style[ 'defaultActiveStyling_' + !!defaultActiveStyling ],
|
|
217
|
-
DefaultCellClassName,
|
|
218
|
-
className
|
|
219
|
-
]
|
|
220
|
-
|
|
221
|
-
if ( Checked ) {
|
|
222
|
-
Styles = {
|
|
223
|
-
...Styles,
|
|
224
|
-
...DefaultCellCheckedStyles,
|
|
225
|
-
...checkedStyles,
|
|
226
|
-
activeStyles: checkedStyles,
|
|
227
|
-
freeCSS: {
|
|
228
|
-
...Styles.freeCSS,
|
|
229
|
-
...DefaultCellCheckedStyles?.freeCSS,
|
|
230
|
-
...checkedStyles?.freeCSS
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
ClassName = [
|
|
235
|
-
...ClassName,
|
|
236
|
-
DefaultCellCheckedClassName,
|
|
237
|
-
checkedClassName
|
|
238
|
-
]
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
return [
|
|
242
|
-
<input
|
|
243
|
-
key={ 'List-' + JSON.stringify( value ) }
|
|
244
|
-
type={ type == 'radio' ? 'radio' : 'checkbox' }
|
|
245
|
-
className={ [
|
|
246
|
-
style.Input,
|
|
247
|
-
style[ 'defaultActiveStyling_' + !!defaultActiveStyling ]
|
|
248
|
-
].join( ' ' ) }
|
|
249
|
-
name={ 'RadioCheckbox-' + name }
|
|
250
|
-
data-list-index={ componentID + '-' + index }
|
|
251
|
-
id={ CellID }
|
|
252
|
-
value={ String( value ) }
|
|
253
|
-
data-form-name={ form }
|
|
254
|
-
disabled={ disabled }
|
|
255
|
-
checked={ Checked }
|
|
256
|
-
onFocus={ ( event ) => {
|
|
257
|
-
if ( disabled ) return
|
|
258
|
-
if ( type != 'radio' ) return
|
|
259
|
-
if ( val_status.dataValue.length ) return
|
|
260
|
-
let { value,checked } = event.target
|
|
261
|
-
let nextValue: any = [ value ]
|
|
262
|
-
|
|
263
|
-
set_status( {
|
|
264
|
-
...val_status,
|
|
265
|
-
dataValue: nextValue,
|
|
266
|
-
eventType: 'update',
|
|
267
|
-
eventID: $.uuidGen()
|
|
268
|
-
} )
|
|
269
|
-
} }
|
|
270
|
-
onChange={ ( event ) => {
|
|
271
|
-
if ( disabled ) return
|
|
272
|
-
let { value,checked } = event.target
|
|
273
|
-
let nextValue = []
|
|
274
|
-
if ( type == 'radio' ) {
|
|
275
|
-
nextValue = [ value ]
|
|
276
|
-
} else if ( type == 'checkbox' || type == 'checker' ) {
|
|
277
|
-
if ( checked ) {
|
|
278
|
-
nextValue = [ ...val_status.dataValue,value ]
|
|
279
|
-
} else {
|
|
280
|
-
let prevValue = [ ...val_status.dataValue ]
|
|
281
|
-
prevValue.splice( val_status.dataValue.findIndex( ( v: any ) => v == value ),1 )
|
|
282
|
-
nextValue = prevValue
|
|
283
|
-
}
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
set_status( {
|
|
287
|
-
...val_status,
|
|
288
|
-
dataValue: nextValue,
|
|
289
|
-
eventType: 'update',
|
|
290
|
-
eventID: $.uuidGen()
|
|
291
|
-
} )
|
|
292
|
-
} }
|
|
293
|
-
onKeyDown={ ( event ) => {
|
|
294
|
-
let { key,shiftKey } = event
|
|
295
|
-
if ( type == 'checkbox' || type == 'checker' ) {
|
|
296
|
-
if ( key == 'Tab' ) {
|
|
297
|
-
if ( shiftKey ) { } else { }
|
|
298
|
-
} else if ( key.match( /Arrow/ ) ) {
|
|
299
|
-
event.preventDefault()
|
|
300
|
-
|
|
301
|
-
let dir = [ 'ArrowLeft','ArrowUp' ].includes( key ) ? -1 : 1
|
|
302
|
-
let nextIndex = index + dir
|
|
303
|
-
|
|
304
|
-
if ( nextIndex < 0 ) {
|
|
305
|
-
nextIndex = options.length - 1
|
|
306
|
-
} else if ( nextIndex >= options.length ) {
|
|
307
|
-
nextIndex = 0
|
|
308
|
-
}
|
|
309
|
-
$( `input[data-list-index="${ componentID }-${ nextIndex }"]` ).focus()
|
|
310
|
-
}
|
|
311
|
-
}
|
|
312
|
-
|
|
313
|
-
if ( enableFormSubmit ) SubmitForm( event )
|
|
314
|
-
} }
|
|
315
|
-
tabIndex={ tabIndex }
|
|
316
|
-
/>,
|
|
317
|
-
<Buttons.Label.Plain
|
|
318
|
-
key={ 'ListTrigger-' + JSON.stringify( value ) }
|
|
319
|
-
htmlFor={ CellID }
|
|
320
|
-
className={ ClassName.join( ' ' ) }
|
|
321
|
-
tabIndex={ -1 }
|
|
322
|
-
display='flex'
|
|
323
|
-
ssEffectsOnActive={ false }
|
|
324
|
-
verticalAlign='center'
|
|
325
|
-
gap={ '1/3' }
|
|
326
|
-
flexWrap={ false }
|
|
327
|
-
{ ...Styles }
|
|
328
|
-
>
|
|
329
|
-
{ IconBox }
|
|
330
|
-
{ $.is.string( label ) ? <Box children={ label } /> : label }
|
|
331
|
-
</Buttons.Label.Plain>
|
|
332
|
-
]
|
|
333
|
-
} )
|
|
334
|
-
|
|
335
|
-
return <Flex
|
|
336
|
-
flexSizing={ 'auto' }
|
|
337
|
-
freeCSS={ {
|
|
338
|
-
...params.freeCSS
|
|
339
|
-
} }
|
|
340
|
-
className={ [
|
|
341
|
-
ListClassName,
|
|
342
|
-
style.CellBase,
|
|
343
|
-
style[ 'HideInput_' + hideInput ],
|
|
344
|
-
style[ 'IconIndicator_' + !!icon ],
|
|
345
|
-
style[ 'Tone_' + tone ]
|
|
346
|
-
].join( ' ' ) }
|
|
347
|
-
children={ Cells }
|
|
348
|
-
/>
|
|
349
|
-
}
|
|
350
|
-
|
|
351
|
-
const Comps = {
|
|
352
|
-
RadioIcon: () => ( <Box
|
|
353
|
-
className={ style.Icon }
|
|
354
|
-
backgroundColor={ '1.layer.base' }
|
|
355
|
-
border
|
|
356
|
-
transition='middle'
|
|
357
|
-
position='relative'
|
|
358
|
-
borderRadius={ 'sphere' }
|
|
359
|
-
flexCenter
|
|
360
|
-
/> ),
|
|
361
|
-
CheckboxIcon: () => ( <Box
|
|
362
|
-
className={ [
|
|
363
|
-
style.Icon,
|
|
364
|
-
style.CheckboxIcon
|
|
365
|
-
].join( ' ' ) }
|
|
366
|
-
borderRadius={ '3.tone.tertiary' }
|
|
367
|
-
backgroundColor={ '1.layer.base' }
|
|
368
|
-
border
|
|
369
|
-
transition='middle'
|
|
370
|
-
fontColor={ 'white' }
|
|
371
|
-
position='relative'
|
|
372
|
-
flexCenter
|
|
373
|
-
>
|
|
374
|
-
<FAI.Check
|
|
375
|
-
className={ style.I }
|
|
376
|
-
transition='middle'
|
|
377
|
-
opacity='trans'
|
|
378
|
-
freeCSS={ {
|
|
379
|
-
zIndex: 8
|
|
380
|
-
} }
|
|
381
|
-
/>
|
|
382
|
-
</Box> )
|
|
383
|
-
}
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
@use '@props' as *;
|
|
2
|
-
.CellBase {
|
|
3
|
-
&.HideInput_true .Input {
|
|
4
|
-
display: none;
|
|
5
|
-
}
|
|
6
|
-
}
|
|
7
|
-
.Input {
|
|
8
|
-
&:checked + .Label .Icon {
|
|
9
|
-
border-color: transparent;
|
|
10
|
-
&:after, > * {
|
|
11
|
-
transform: scale(1) !important;
|
|
12
|
-
opacity: 1 !important;
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
&.defaultActiveStyling_true {
|
|
16
|
-
&:checked {
|
|
17
|
-
&:focus + .Label {
|
|
18
|
-
opacity: 1 !important;
|
|
19
|
-
box-shadow:
|
|
20
|
-
0 0 0 transparent inset,
|
|
21
|
-
0 0 0 1px $color-theme-opacity-middle,
|
|
22
|
-
0 0 0 $unit1_3 $color-theme-opacity-low !important;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
&:focus + .Label {
|
|
26
|
-
box-shadow:
|
|
27
|
-
0 0 0 transparent inset,
|
|
28
|
-
0 0 0 $unit1_3 $color-layer3 !important;
|
|
29
|
-
}
|
|
30
|
-
&:active + .Label {
|
|
31
|
-
opacity: 1 !important;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
.Label {
|
|
36
|
-
-webkit-user-select: none;
|
|
37
|
-
user-select: none;
|
|
38
|
-
* {
|
|
39
|
-
pointer-events: none;
|
|
40
|
-
}
|
|
41
|
-
&.defaultActiveStyling_true {
|
|
42
|
-
&:hover {
|
|
43
|
-
opacity: .6;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
.Icon {
|
|
48
|
-
width: 20px;
|
|
49
|
-
height: 20px;
|
|
50
|
-
&.CheckboxIcon {
|
|
51
|
-
&:after {
|
|
52
|
-
background-color: $color-theme;
|
|
53
|
-
}
|
|
54
|
-
.I {
|
|
55
|
-
transform: scale(.3);
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
&:before, &:after {
|
|
59
|
-
content: "";
|
|
60
|
-
position: absolute;
|
|
61
|
-
opacity: 0;
|
|
62
|
-
transition: $animation-time-middle;
|
|
63
|
-
}
|
|
64
|
-
&:before {
|
|
65
|
-
width: 100%;
|
|
66
|
-
height: 100%;
|
|
67
|
-
border-radius: inherit;
|
|
68
|
-
opacity: 1;
|
|
69
|
-
transition: 0s;
|
|
70
|
-
transition-timing-function: $animation-style1;
|
|
71
|
-
}
|
|
72
|
-
&:after {
|
|
73
|
-
top: 0;
|
|
74
|
-
left: 0;
|
|
75
|
-
width: 100%;
|
|
76
|
-
height: 100%;
|
|
77
|
-
transform: scale(0.3);
|
|
78
|
-
border-radius: inherit;
|
|
79
|
-
background-color: $color-layer1;
|
|
80
|
-
border: 5.5px solid $color-theme;
|
|
81
|
-
box-shadow: 0 0 0 transparent inset, $shadow1;
|
|
82
|
-
background-color: white;
|
|
83
|
-
}
|
|
84
|
-
}
|
|
@@ -1,230 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
React,
|
|
3
|
-
} from '@global'
|
|
4
|
-
|
|
5
|
-
import {
|
|
6
|
-
Box
|
|
7
|
-
} from '@atoms'
|
|
8
|
-
import {
|
|
9
|
-
Column
|
|
10
|
-
} from '@mols'
|
|
11
|
-
import {
|
|
12
|
-
BoxWrapper,
|
|
13
|
-
SubmitForm,
|
|
14
|
-
ValidationCheck,
|
|
15
|
-
CommonEffects
|
|
16
|
-
} from '../core'
|
|
17
|
-
import {
|
|
18
|
-
Input,
|
|
19
|
-
Tooltips,
|
|
20
|
-
Buttons
|
|
21
|
-
} from '@fn'
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
import style from './style.module.scss'
|
|
25
|
-
import coreStyle from '../style.module.scss'
|
|
26
|
-
|
|
27
|
-
function DefaultValidation( props: {
|
|
28
|
-
value: any
|
|
29
|
-
params: any
|
|
30
|
-
} ): amotify.fn.Input.Validation.Result {
|
|
31
|
-
let {
|
|
32
|
-
value,
|
|
33
|
-
params
|
|
34
|
-
} = props
|
|
35
|
-
let {
|
|
36
|
-
required,
|
|
37
|
-
options
|
|
38
|
-
} = params as amotify.fn.Input.RichSelect.PlainParams
|
|
39
|
-
let notice: amotify.fn.Input.Validation.NoticeTypes[] = []
|
|
40
|
-
|
|
41
|
-
if ( required ) {
|
|
42
|
-
if ( !options.length || ( options.length && $.is.nullish( JSON.parse( value ) ) ) ) {
|
|
43
|
-
notice.push( { type: 'invalid',label: '必須項目です' } )
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
return {
|
|
48
|
-
ok: !notice.filter( ( { type } ) => type == 'invalid' ).length,
|
|
49
|
-
notice: notice
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
export const RichSelectInput: React.FC<amotify.fn.Input.RichSelect.PlainParams> = ( params ) => {
|
|
54
|
-
let {
|
|
55
|
-
value = null,
|
|
56
|
-
placeholder,
|
|
57
|
-
options = []
|
|
58
|
-
} = params
|
|
59
|
-
|
|
60
|
-
let SelectedExist = 0
|
|
61
|
-
let SelectedValue = JSON.stringify( value )
|
|
62
|
-
let DefaultOptions = options.map( ( option ) => {
|
|
63
|
-
let { type,value } = option
|
|
64
|
-
let Value = JSON.stringify( value )
|
|
65
|
-
let Selected = Value == SelectedValue
|
|
66
|
-
SelectedExist |= Number( Selected )
|
|
67
|
-
|
|
68
|
-
return {
|
|
69
|
-
...option,
|
|
70
|
-
type: type || 'button',
|
|
71
|
-
value: Value
|
|
72
|
-
}
|
|
73
|
-
} )
|
|
74
|
-
if ( !SelectedExist ) value = null
|
|
75
|
-
let DefaultValue = JSON.stringify( value )
|
|
76
|
-
|
|
77
|
-
return <Core
|
|
78
|
-
{ ...params }
|
|
79
|
-
value={ DefaultValue }
|
|
80
|
-
options={ DefaultOptions }
|
|
81
|
-
/>
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
const Core: React.FC<amotify.fn.Input.RichSelect.PlainParams> = ( params ) => {
|
|
85
|
-
let {
|
|
86
|
-
tone,
|
|
87
|
-
required,
|
|
88
|
-
form,
|
|
89
|
-
className,
|
|
90
|
-
|
|
91
|
-
enableFormSubmit,
|
|
92
|
-
enableUnSelected,
|
|
93
|
-
|
|
94
|
-
checkValidationAtFirst,
|
|
95
|
-
onChange,onKeyDown,
|
|
96
|
-
onValidate,
|
|
97
|
-
onUpdateValue,
|
|
98
|
-
onUpdateValidValue,
|
|
99
|
-
value = '',
|
|
100
|
-
options,
|
|
101
|
-
placeholder,
|
|
102
|
-
|
|
103
|
-
leftIndicator,rightIndicator,leftIcon,rightIcon,
|
|
104
|
-
componentID,status_id,
|
|
105
|
-
|
|
106
|
-
cellStyles,
|
|
107
|
-
sheetStyles,
|
|
108
|
-
|
|
109
|
-
gravityPoint,
|
|
110
|
-
...others
|
|
111
|
-
} = params
|
|
112
|
-
|
|
113
|
-
let Default_Status: amotify.fn.Input.Status.Plain = {
|
|
114
|
-
componentID: params.componentID || '',
|
|
115
|
-
dataValue: value,
|
|
116
|
-
eventType: 'init',
|
|
117
|
-
eventID: $.uuidGen()
|
|
118
|
-
}
|
|
119
|
-
let [ val_tipID ] = React.useState( $.uuid.gen() )
|
|
120
|
-
let [ val_status,set_status ] = React.useState( Default_Status )
|
|
121
|
-
let [ val_validate,set_validate ] = React.useState( {
|
|
122
|
-
ok: false,
|
|
123
|
-
notice: []
|
|
124
|
-
} as amotify.fn.Input.Validation.Result )
|
|
125
|
-
|
|
126
|
-
CommonEffects( {
|
|
127
|
-
type: 'richSelect',
|
|
128
|
-
params,
|
|
129
|
-
val_status,
|
|
130
|
-
set_status,
|
|
131
|
-
ExtraOverrideParams: {
|
|
132
|
-
dataValue: value,
|
|
133
|
-
formatValue: value,
|
|
134
|
-
},
|
|
135
|
-
val_validate,
|
|
136
|
-
set_validate,
|
|
137
|
-
DefaultValidation,
|
|
138
|
-
onUpdateValue,
|
|
139
|
-
onUpdateValidValue
|
|
140
|
-
} )
|
|
141
|
-
|
|
142
|
-
let SelectedElement: ReactElement = <Box fontColor='4.thin' textAlign='left'>{ placeholder || '選択' }</Box>
|
|
143
|
-
if ( val_status.dataValue ) {
|
|
144
|
-
let Selected = options.find( ( option ) => option.type == 'button' && option.value == val_status.dataValue )
|
|
145
|
-
if ( Selected ) {
|
|
146
|
-
SelectedElement = Selected.selectedLabel || Selected.label
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
return <BoxWrapper
|
|
151
|
-
val_status={ val_status }
|
|
152
|
-
set_status={ set_status }
|
|
153
|
-
val_validate={ val_validate }
|
|
154
|
-
params={ params }
|
|
155
|
-
>
|
|
156
|
-
<button
|
|
157
|
-
{ ...others as any }
|
|
158
|
-
data-form={ form }
|
|
159
|
-
data-validation={ val_validate.ok }
|
|
160
|
-
data-component-id={ val_status.componentID }
|
|
161
|
-
data-value={ val_status.dataValue }
|
|
162
|
-
data-input-type={ 'richSelect' }
|
|
163
|
-
className={ [
|
|
164
|
-
className,
|
|
165
|
-
style.SelectLegend,
|
|
166
|
-
coreStyle.InputCover
|
|
167
|
-
].join( ' ' ) }
|
|
168
|
-
onClick={ ( e ) => {
|
|
169
|
-
Tooltips.open( {
|
|
170
|
-
tipsID: val_tipID,
|
|
171
|
-
parent: e.currentTarget,
|
|
172
|
-
gravityPoint: gravityPoint || 13,
|
|
173
|
-
close_option: {
|
|
174
|
-
elementBlur: ''
|
|
175
|
-
},
|
|
176
|
-
content: () => {
|
|
177
|
-
let Options = options.map( ( option ) => {
|
|
178
|
-
let {
|
|
179
|
-
type,
|
|
180
|
-
value,
|
|
181
|
-
label
|
|
182
|
-
} = option
|
|
183
|
-
|
|
184
|
-
if ( type == 'button' ) {
|
|
185
|
-
return <Buttons.Button.Clear.R
|
|
186
|
-
color='cloud'
|
|
187
|
-
borderRadius={ 0 }
|
|
188
|
-
fontColor='2.normal'
|
|
189
|
-
textAlign='left'
|
|
190
|
-
padding={ 0 }
|
|
191
|
-
onClick={ () => {
|
|
192
|
-
set_status( {
|
|
193
|
-
...val_status,
|
|
194
|
-
dataValue: value,
|
|
195
|
-
eventType: 'update',
|
|
196
|
-
eventID: $.uuidGen()
|
|
197
|
-
} )
|
|
198
|
-
Tooltips.close( val_tipID )
|
|
199
|
-
} }
|
|
200
|
-
{ ...cellStyles }
|
|
201
|
-
>
|
|
202
|
-
{ label }
|
|
203
|
-
</Buttons.Button.Clear.R>
|
|
204
|
-
} else {
|
|
205
|
-
return label
|
|
206
|
-
}
|
|
207
|
-
} )
|
|
208
|
-
return <Column
|
|
209
|
-
ssCardBox
|
|
210
|
-
padding={ [ 1,0 ] }
|
|
211
|
-
gap={ 0 }
|
|
212
|
-
// maxHeight={ 'viewHeight' }
|
|
213
|
-
overflow={ 'auto' }
|
|
214
|
-
{ ...sheetStyles }
|
|
215
|
-
freeCSS={ {
|
|
216
|
-
minWidth: 12 * 20,
|
|
217
|
-
maxHeight: '90vh',
|
|
218
|
-
...sheetStyles?.freeCSS
|
|
219
|
-
} }
|
|
220
|
-
>
|
|
221
|
-
{ Options }
|
|
222
|
-
</Column>
|
|
223
|
-
}
|
|
224
|
-
} )
|
|
225
|
-
} }
|
|
226
|
-
>
|
|
227
|
-
{ SelectedElement }
|
|
228
|
-
</button>
|
|
229
|
-
</BoxWrapper>
|
|
230
|
-
}
|