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,445 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
useStore,
|
|
3
|
-
React
|
|
4
|
-
} from '@global'
|
|
5
|
-
import {
|
|
6
|
-
Box,
|
|
7
|
-
FAI,
|
|
8
|
-
Span
|
|
9
|
-
} from '@atoms'
|
|
10
|
-
import {
|
|
11
|
-
Column,
|
|
12
|
-
Row,
|
|
13
|
-
Text
|
|
14
|
-
} from '@mols'
|
|
15
|
-
import {
|
|
16
|
-
Input,
|
|
17
|
-
Buttons,
|
|
18
|
-
Loader,
|
|
19
|
-
Sheet
|
|
20
|
-
} from '@fn'
|
|
21
|
-
|
|
22
|
-
import style from './style.module.scss'
|
|
23
|
-
|
|
24
|
-
const Selector = ( params: {
|
|
25
|
-
selectorID: string
|
|
26
|
-
bottomContent: ReactElement
|
|
27
|
-
options: amotify.fn.Input.Chips.OptionParams[]
|
|
28
|
-
limit?: number
|
|
29
|
-
selected: amotify.fn.Input.Chips.OptionParams[]
|
|
30
|
-
SelectorCellComponent: amotify.fn.Input.Chips.SelectorCellComponentInput
|
|
31
|
-
onUpdated( params: {
|
|
32
|
-
values: any[]
|
|
33
|
-
} ): void
|
|
34
|
-
onDynamicSearch?: amotify.fn.Input.Chips.onDynamicSearch
|
|
35
|
-
} ) => {
|
|
36
|
-
type StatusTypes = 'show' | 'interlude'
|
|
37
|
-
let [ val_status,set_status ] = React.useState( 'show' as StatusTypes )
|
|
38
|
-
let [ val_keyword,set_keyword ] = React.useState( '' )
|
|
39
|
-
let [ val_componentID ] = React.useState( $.uuidGen() )
|
|
40
|
-
|
|
41
|
-
let [ val_options,set_options ] = React.useState( params.options )
|
|
42
|
-
let [ val_focus,set_focus ] = React.useState( val_options[ 0 ] || null )
|
|
43
|
-
let [ val_selected,set_selected ] = React.useState( params.selected )
|
|
44
|
-
let [ val_keyEvent,set_keyEvent ] = React.useState( 'init' )
|
|
45
|
-
|
|
46
|
-
React.useEffect( () => {
|
|
47
|
-
useStore.set( {
|
|
48
|
-
key: params.selectorID,
|
|
49
|
-
value: {
|
|
50
|
-
updateOptions: ( options: amotify.fn.Input.Chips.OptionParams[] ) => {
|
|
51
|
-
set_options( options )
|
|
52
|
-
},
|
|
53
|
-
updateSelected: ( selected: amotify.fn.Input.Chips.OptionParams[] ) => {
|
|
54
|
-
set_selected( selected )
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
} )
|
|
58
|
-
},[] )
|
|
59
|
-
const mountedOptions = React.useRef( false )
|
|
60
|
-
React.useEffect( () => {
|
|
61
|
-
if ( mountedOptions.current ) {
|
|
62
|
-
Sheet.reposition( params.selectorID )
|
|
63
|
-
} else {
|
|
64
|
-
mountedOptions.current = true
|
|
65
|
-
}
|
|
66
|
-
},[ val_options ] )
|
|
67
|
-
const mountedKeyword = React.useRef( false )
|
|
68
|
-
React.useEffect( () => {
|
|
69
|
-
if ( mountedKeyword.current ) {
|
|
70
|
-
set_status( 'interlude' )
|
|
71
|
-
set_focus( val_options[ 0 ] || null )
|
|
72
|
-
|
|
73
|
-
if ( params.onDynamicSearch ) {
|
|
74
|
-
$.interval.clear( val_componentID + '-dynamicSearch' )
|
|
75
|
-
$.interval.standBy(
|
|
76
|
-
val_componentID + '-dynamicSearch',
|
|
77
|
-
400,
|
|
78
|
-
async () => {
|
|
79
|
-
let {
|
|
80
|
-
options
|
|
81
|
-
} = await params.onDynamicSearch!( val_keyword )
|
|
82
|
-
set_options( options )
|
|
83
|
-
set_status( 'show' )
|
|
84
|
-
}
|
|
85
|
-
)
|
|
86
|
-
} else {
|
|
87
|
-
$.interval.clear( val_componentID + '-staticSearch' )
|
|
88
|
-
$.interval.standBy(
|
|
89
|
-
val_componentID + '-staticSearch',
|
|
90
|
-
400,
|
|
91
|
-
async () => {
|
|
92
|
-
let regExp = new RegExp( val_keyword,'ig' )
|
|
93
|
-
let newSelection: amotify.fn.Input.Chips.OptionParams[] = [];
|
|
94
|
-
[ ...params.options ].forEach( ( o ) => {
|
|
95
|
-
let match = Boolean( !val_keyword || ( String( o.label ) ?? String( o.value ) ).match( regExp ) )
|
|
96
|
-
if ( match ) newSelection.push( o )
|
|
97
|
-
} )
|
|
98
|
-
|
|
99
|
-
set_options( newSelection )
|
|
100
|
-
set_status( 'show' )
|
|
101
|
-
}
|
|
102
|
-
)
|
|
103
|
-
}
|
|
104
|
-
} else {
|
|
105
|
-
mountedKeyword.current = true
|
|
106
|
-
}
|
|
107
|
-
},[ val_keyword ] )
|
|
108
|
-
const mountedSelected = React.useRef( false )
|
|
109
|
-
React.useEffect( () => {
|
|
110
|
-
if ( mountedSelected.current ) {
|
|
111
|
-
params.onUpdated( {
|
|
112
|
-
values: val_selected
|
|
113
|
-
} )
|
|
114
|
-
} else {
|
|
115
|
-
mountedSelected.current = true
|
|
116
|
-
}
|
|
117
|
-
},[ val_selected ] )
|
|
118
|
-
React.useEffect( () => {
|
|
119
|
-
$.fnScope( () => {
|
|
120
|
-
if ( $.is.nullish( val_focus ) ) return
|
|
121
|
-
if ( val_keyEvent == 'MouseEvent' ) return
|
|
122
|
-
|
|
123
|
-
let Wrapper = $( '#' + val_componentID + '-Selector-Cell-Wrap' )
|
|
124
|
-
if ( !Wrapper[ 0 ] ) return
|
|
125
|
-
|
|
126
|
-
let focusCell = $( '[data-chips-selector-cell="' + val_componentID + '-' + JSON.stringify( val_focus?.value || '' ).replace( /\"/ig,'' ) + '"]' )
|
|
127
|
-
if ( !focusCell[ 0 ] ) return
|
|
128
|
-
|
|
129
|
-
let { top: pTop,height: pHeight } = Wrapper.position()
|
|
130
|
-
let { top: cTop,height: cHeight } = focusCell.position()
|
|
131
|
-
if ( pTop <= cTop && cTop + cHeight <= pTop + pHeight ) return
|
|
132
|
-
|
|
133
|
-
let scroll = Wrapper[ 0 ].scrollTop + ( cTop - pTop )
|
|
134
|
-
if ( val_keyEvent == 'ArrowDown' ) {
|
|
135
|
-
scroll -= ( pHeight - cHeight ) - 20
|
|
136
|
-
} else if ( val_keyEvent == 'ArrowUp' ) {
|
|
137
|
-
scroll -= 20
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
Wrapper[ 0 ].scrollTop = scroll
|
|
141
|
-
} )
|
|
142
|
-
},[ val_focus ] )
|
|
143
|
-
|
|
144
|
-
let List: ReactElement[] = []
|
|
145
|
-
|
|
146
|
-
if ( val_status == 'interlude' ) {
|
|
147
|
-
List = [ <Row.Center
|
|
148
|
-
padding={ 2 }
|
|
149
|
-
gap={ 0 }
|
|
150
|
-
>
|
|
151
|
-
<Loader.Theme.R
|
|
152
|
-
showInitial
|
|
153
|
-
/>
|
|
154
|
-
<Box
|
|
155
|
-
padding={ [ 0,1 ] }
|
|
156
|
-
fontSize='1.mini'
|
|
157
|
-
fontColor='4.thin'
|
|
158
|
-
>
|
|
159
|
-
検索中...
|
|
160
|
-
</Box>
|
|
161
|
-
</Row.Center> ]
|
|
162
|
-
} else {
|
|
163
|
-
List = [
|
|
164
|
-
val_options.map( ( option,index ) => {
|
|
165
|
-
let {
|
|
166
|
-
value,label
|
|
167
|
-
} = option
|
|
168
|
-
|
|
169
|
-
let safeValue = String( JSON.stringify( value ) )
|
|
170
|
-
|
|
171
|
-
let findIndex = val_selected.findIndex( ( v ) => JSON.stringify( v.value ) == safeValue )
|
|
172
|
-
|
|
173
|
-
let isSelected = findIndex != -1
|
|
174
|
-
let isFocused = JSON.stringify( val_focus?.value || '' ) == safeValue
|
|
175
|
-
|
|
176
|
-
let styles: amotifyUniStyleParams = {}
|
|
177
|
-
if ( isSelected || isFocused ) {
|
|
178
|
-
styles = {
|
|
179
|
-
fontColor: 'theme',
|
|
180
|
-
isSemiBoldFont: true,
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
if ( isFocused ) {
|
|
184
|
-
styles = {
|
|
185
|
-
...styles,
|
|
186
|
-
backgroundColor: 'cloud',
|
|
187
|
-
paddingLeft: '2/3'
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
if ( isSelected ) {
|
|
191
|
-
styles = {
|
|
192
|
-
...styles,
|
|
193
|
-
backgroundColor: 'tcOpFew',
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
return <Buttons.Button.Clear.R
|
|
198
|
-
key={ index }
|
|
199
|
-
color='cloud'
|
|
200
|
-
padding={ '1/3' }
|
|
201
|
-
tabIndex={ -1 }
|
|
202
|
-
textAlign='left'
|
|
203
|
-
data-chips-selector-cell={ val_componentID + '-' + safeValue.replace( /\"/ig,'' ) }
|
|
204
|
-
isActive={ isSelected || isFocused }
|
|
205
|
-
isActiveStyles={ styles }
|
|
206
|
-
{ ...styles }
|
|
207
|
-
onMouseOver={ () => {
|
|
208
|
-
set_keyEvent( 'MouseEvent' )
|
|
209
|
-
set_focus( option )
|
|
210
|
-
} }
|
|
211
|
-
onClick={ () => {
|
|
212
|
-
let newSelected = [ ...val_selected ]
|
|
213
|
-
if ( isSelected ) {
|
|
214
|
-
newSelected.splice( findIndex,1 )
|
|
215
|
-
} else {
|
|
216
|
-
newSelected = [
|
|
217
|
-
...newSelected,
|
|
218
|
-
option
|
|
219
|
-
]
|
|
220
|
-
|
|
221
|
-
if ( params.limit && newSelected.length > params.limit ) {
|
|
222
|
-
newSelected.shift()
|
|
223
|
-
}
|
|
224
|
-
}
|
|
225
|
-
set_selected( newSelected )
|
|
226
|
-
} }
|
|
227
|
-
>
|
|
228
|
-
<params.SelectorCellComponent
|
|
229
|
-
isSelected={ isSelected }
|
|
230
|
-
isFocused={ isFocused }
|
|
231
|
-
value={ value }
|
|
232
|
-
label={ label }
|
|
233
|
-
/>
|
|
234
|
-
</Buttons.Button.Clear.R>
|
|
235
|
-
} )
|
|
236
|
-
]
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
return <>
|
|
240
|
-
<Column
|
|
241
|
-
padding={ '2/3' }
|
|
242
|
-
gap={ '2/3' }
|
|
243
|
-
borderBottom
|
|
244
|
-
>
|
|
245
|
-
<Row.Separate>
|
|
246
|
-
<Input.Text.Normal
|
|
247
|
-
value={ val_keyword }
|
|
248
|
-
onUpdateValidValue={ ( { value } ) => {
|
|
249
|
-
set_keyword( value )
|
|
250
|
-
} }
|
|
251
|
-
id={ params.selectorID + '-KeywordInput' }
|
|
252
|
-
padding={ '2/3' }
|
|
253
|
-
placeholder='検索...'
|
|
254
|
-
leftIcon={ <Input.Comps.LeftIcon
|
|
255
|
-
right={ '2/3' }
|
|
256
|
-
fontSize={ '1.mini' }
|
|
257
|
-
fontColor='3.blur'
|
|
258
|
-
>
|
|
259
|
-
<FAI.Search />
|
|
260
|
-
</Input.Comps.LeftIcon> }
|
|
261
|
-
onKeyDown={ ( event ) => {
|
|
262
|
-
let {
|
|
263
|
-
key,
|
|
264
|
-
metaKey,ctrlKey
|
|
265
|
-
} = event
|
|
266
|
-
let auxKey = metaKey || ctrlKey
|
|
267
|
-
|
|
268
|
-
if ( [ 'ArrowDown','ArrowUp' ].includes( key ) ) {
|
|
269
|
-
let dir = Number( key == 'ArrowDown' ) * 2 - 1
|
|
270
|
-
if ( auxKey ) {
|
|
271
|
-
let next = val_options[ dir == 1 ? val_options.length - 1 : 0 ]
|
|
272
|
-
set_focus( next )
|
|
273
|
-
} else {
|
|
274
|
-
let nextIndex = val_options.findIndex( ( v ) => JSON.stringify( v.value ) == JSON.stringify( val_focus?.value || '' ) ) + dir
|
|
275
|
-
|
|
276
|
-
if ( val_options[ nextIndex ] ) {
|
|
277
|
-
set_focus( val_options[ nextIndex ] )
|
|
278
|
-
} else {
|
|
279
|
-
set_focus( val_options[ dir == 1 ? 0 : val_options.length - 1 ] || null )
|
|
280
|
-
}
|
|
281
|
-
}
|
|
282
|
-
} else if ( key == 'Enter' ) {
|
|
283
|
-
let selectedIndex = val_selected.findIndex( ( v ) => JSON.stringify( v.value ) == JSON.stringify( val_focus?.value || '' ) )
|
|
284
|
-
let isSelected = selectedIndex != -1
|
|
285
|
-
let newSelected = [ ...val_selected ]
|
|
286
|
-
if ( isSelected ) {
|
|
287
|
-
newSelected.splice( selectedIndex,1 )
|
|
288
|
-
} else {
|
|
289
|
-
let optionsIndex = val_options.findIndex( ( v ) => JSON.stringify( v.value ) == JSON.stringify( val_focus?.value || '' ) )
|
|
290
|
-
if ( optionsIndex == -1 ) return
|
|
291
|
-
newSelected = [
|
|
292
|
-
...newSelected,
|
|
293
|
-
val_options[ optionsIndex ],
|
|
294
|
-
]
|
|
295
|
-
|
|
296
|
-
if ( params.limit && newSelected.length > params.limit ) {
|
|
297
|
-
newSelected.shift()
|
|
298
|
-
}
|
|
299
|
-
}
|
|
300
|
-
|
|
301
|
-
set_selected( newSelected )
|
|
302
|
-
}
|
|
303
|
-
set_keyEvent( key )
|
|
304
|
-
} }
|
|
305
|
-
/>
|
|
306
|
-
<Buttons.Button.Border.S
|
|
307
|
-
marginRight={ '1/3' }
|
|
308
|
-
ssSphere={ 2 }
|
|
309
|
-
backgroundColor='cloud'
|
|
310
|
-
borderRadius={ '2.tone.secondary' }
|
|
311
|
-
onClick={ () => {
|
|
312
|
-
Sheet.close( params.selectorID! )
|
|
313
|
-
} }
|
|
314
|
-
>
|
|
315
|
-
<FAI.Times />
|
|
316
|
-
</Buttons.Button.Border.S>
|
|
317
|
-
</Row.Separate>
|
|
318
|
-
<Row.Separate>
|
|
319
|
-
<Row.Left
|
|
320
|
-
gap={ '1/2' }
|
|
321
|
-
verticalAlign='baseline'
|
|
322
|
-
>
|
|
323
|
-
<Span
|
|
324
|
-
fontColor={ 'theme' }
|
|
325
|
-
>
|
|
326
|
-
{ val_options.length }
|
|
327
|
-
</Span>
|
|
328
|
-
<Box
|
|
329
|
-
fontSize='1.mini'
|
|
330
|
-
fontColor='3.blur'
|
|
331
|
-
>
|
|
332
|
-
件のヒット
|
|
333
|
-
</Box>
|
|
334
|
-
</Row.Left>
|
|
335
|
-
<Row.Right>
|
|
336
|
-
{ params.limit ? <Span
|
|
337
|
-
fontColor={ '3.blur' }
|
|
338
|
-
fontSize='1.mini'
|
|
339
|
-
>
|
|
340
|
-
<Span
|
|
341
|
-
fontSize='3.paragraph'
|
|
342
|
-
fontColor='theme'
|
|
343
|
-
isSemiBoldFont
|
|
344
|
-
>
|
|
345
|
-
{ val_selected.length }
|
|
346
|
-
</Span> / { params.limit } 件
|
|
347
|
-
</Span> : null }
|
|
348
|
-
</Row.Right>
|
|
349
|
-
</Row.Separate>
|
|
350
|
-
</Column>
|
|
351
|
-
<Column
|
|
352
|
-
gap={ '1/4' }
|
|
353
|
-
padding={ '1/2' }
|
|
354
|
-
overflow={ 'auto' }
|
|
355
|
-
freeCSS={ {
|
|
356
|
-
maxHeight: 12 * 26,
|
|
357
|
-
maxWidth: 12 * 26
|
|
358
|
-
} }
|
|
359
|
-
id={ val_componentID + '-Selector-Cell-Wrap' }
|
|
360
|
-
className={ style.SelectorWrapper }
|
|
361
|
-
>
|
|
362
|
-
{ List }
|
|
363
|
-
</Column>
|
|
364
|
-
{ params.bottomContent }
|
|
365
|
-
</>
|
|
366
|
-
}
|
|
367
|
-
|
|
368
|
-
export const ChipsInputFNs: amotify.fn.Input.Chips.FNs = {
|
|
369
|
-
openSelector: ( params ) => {
|
|
370
|
-
let {
|
|
371
|
-
selectorID,
|
|
372
|
-
options,
|
|
373
|
-
selected,
|
|
374
|
-
limit,
|
|
375
|
-
bottomContent,
|
|
376
|
-
onDynamicSearch,
|
|
377
|
-
SelectorCellComponent,
|
|
378
|
-
onUpdated,
|
|
379
|
-
onClosed,
|
|
380
|
-
parent,
|
|
381
|
-
...sheetarams
|
|
382
|
-
} = params
|
|
383
|
-
let sheetID = selectorID
|
|
384
|
-
|
|
385
|
-
SelectorCellComponent = SelectorCellComponent || ( ( params ) => {
|
|
386
|
-
return <Row.Left>
|
|
387
|
-
<FAI.CheckCircle
|
|
388
|
-
// isSolidIcon={ params.isSelected }
|
|
389
|
-
// isRegularIcon={ !params.isSelected }
|
|
390
|
-
fontColor={ params.isSelected ? 'theme' : '6.clear' }
|
|
391
|
-
/>
|
|
392
|
-
{ params.label }
|
|
393
|
-
</Row.Left>
|
|
394
|
-
} )
|
|
395
|
-
|
|
396
|
-
Sheet.open( {
|
|
397
|
-
parent,
|
|
398
|
-
sheetID,
|
|
399
|
-
type: 'custom',
|
|
400
|
-
gravityPoint: 22,
|
|
401
|
-
padding: [ 1,0 ],
|
|
402
|
-
hold_state: true,
|
|
403
|
-
close_option: {
|
|
404
|
-
aroundClick: true,
|
|
405
|
-
escapeKeyDown: true
|
|
406
|
-
},
|
|
407
|
-
...sheetarams,
|
|
408
|
-
content: <Box
|
|
409
|
-
borderRadius={ '2.tone.secondary' }
|
|
410
|
-
backgroundColor={ '1.layer.base' }
|
|
411
|
-
border
|
|
412
|
-
boxShadow={ '1.normal' }
|
|
413
|
-
overflow='hidden'
|
|
414
|
-
>
|
|
415
|
-
<Selector
|
|
416
|
-
selectorID={ selectorID }
|
|
417
|
-
options={ options }
|
|
418
|
-
limit={ limit }
|
|
419
|
-
selected={ selected }
|
|
420
|
-
onUpdated={ onUpdated }
|
|
421
|
-
SelectorCellComponent={ SelectorCellComponent }
|
|
422
|
-
bottomContent={ bottomContent }
|
|
423
|
-
onDynamicSearch={ onDynamicSearch }
|
|
424
|
-
/>
|
|
425
|
-
</Box>,
|
|
426
|
-
openAfter: () => {
|
|
427
|
-
$( '#' + params.selectorID + '-KeywordInput' ).focus()
|
|
428
|
-
},
|
|
429
|
-
closeAfter: () => {
|
|
430
|
-
onClosed()
|
|
431
|
-
}
|
|
432
|
-
} )
|
|
433
|
-
},
|
|
434
|
-
closeSelector: ( selectorID ) => {
|
|
435
|
-
Sheet.close( selectorID )
|
|
436
|
-
},
|
|
437
|
-
updateOptions: ( selectorID,options ) => {
|
|
438
|
-
let C = useStore.get( selectorID )
|
|
439
|
-
if ( C && C.updateOptions ) C.updateOptions( options )
|
|
440
|
-
},
|
|
441
|
-
updateSelected: ( selectorID,selected ) => {
|
|
442
|
-
let C = useStore.get( selectorID )
|
|
443
|
-
if ( C && C.updateSelected ) C.updateSelected( selected )
|
|
444
|
-
}
|
|
445
|
-
}
|