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.
Files changed (275) hide show
  1. package/dist/amotify.js +3 -2
  2. package/dist/amotify.min.css +2 -2
  3. package/dist/coreVender.js +14 -2
  4. package/dist/node_modules/@fortawesome/free-regular-svg-icons/faCalendarAlt.d.ts +7 -0
  5. package/dist/node_modules/@fortawesome/free-regular-svg-icons/faCalendarDays.d.ts +14 -0
  6. package/dist/node_modules/@fortawesome/free-regular-svg-icons/faClock.d.ts +14 -0
  7. package/dist/node_modules/@fortawesome/free-solid-svg-icons/faAngleDown.d.ts +14 -0
  8. package/dist/node_modules/@fortawesome/free-solid-svg-icons/faAngleLeft.d.ts +14 -0
  9. package/dist/node_modules/@fortawesome/free-solid-svg-icons/faAngleRight.d.ts +14 -0
  10. package/dist/node_modules/@fortawesome/free-solid-svg-icons/faAngleUp.d.ts +14 -0
  11. package/dist/node_modules/@fortawesome/free-solid-svg-icons/faArrowDown.d.ts +14 -0
  12. package/dist/node_modules/@fortawesome/free-solid-svg-icons/faArrowLeft.d.ts +14 -0
  13. package/dist/node_modules/@fortawesome/free-solid-svg-icons/faArrowRight.d.ts +14 -0
  14. package/dist/node_modules/@fortawesome/free-solid-svg-icons/faArrowRotateRight.d.ts +14 -0
  15. package/dist/node_modules/@fortawesome/free-solid-svg-icons/faArrowUp.d.ts +14 -0
  16. package/dist/node_modules/@fortawesome/free-solid-svg-icons/faBars.d.ts +14 -0
  17. package/dist/node_modules/@fortawesome/free-solid-svg-icons/faBarsStaggered.d.ts +14 -0
  18. package/dist/node_modules/@fortawesome/free-solid-svg-icons/faCaretDown.d.ts +14 -0
  19. package/dist/node_modules/@fortawesome/free-solid-svg-icons/faCaretLeft.d.ts +14 -0
  20. package/dist/node_modules/@fortawesome/free-solid-svg-icons/faCaretRight.d.ts +14 -0
  21. package/dist/node_modules/@fortawesome/free-solid-svg-icons/faCaretUp.d.ts +14 -0
  22. package/dist/node_modules/@fortawesome/free-solid-svg-icons/faCheck.d.ts +14 -0
  23. package/dist/node_modules/@fortawesome/free-solid-svg-icons/faCheckCircle.d.ts +7 -0
  24. package/dist/node_modules/@fortawesome/free-solid-svg-icons/faChevronDown.d.ts +14 -0
  25. package/dist/node_modules/@fortawesome/free-solid-svg-icons/faChevronLeft.d.ts +14 -0
  26. package/dist/node_modules/@fortawesome/free-solid-svg-icons/faChevronRight.d.ts +14 -0
  27. package/dist/node_modules/@fortawesome/free-solid-svg-icons/faChevronUp.d.ts +14 -0
  28. package/dist/node_modules/@fortawesome/free-solid-svg-icons/faCircleCheck.d.ts +14 -0
  29. package/dist/node_modules/@fortawesome/free-solid-svg-icons/faCircleQuestion.d.ts +14 -0
  30. package/dist/node_modules/@fortawesome/free-solid-svg-icons/faCloudArrowUp.d.ts +14 -0
  31. package/dist/node_modules/@fortawesome/free-solid-svg-icons/faCopy.d.ts +14 -0
  32. package/dist/node_modules/@fortawesome/free-solid-svg-icons/faDownload.d.ts +14 -0
  33. package/dist/node_modules/@fortawesome/free-solid-svg-icons/faEdit.d.ts +7 -0
  34. package/dist/node_modules/@fortawesome/free-solid-svg-icons/faEllipsis.d.ts +14 -0
  35. package/dist/node_modules/@fortawesome/free-solid-svg-icons/faEllipsisH.d.ts +7 -0
  36. package/dist/node_modules/@fortawesome/free-solid-svg-icons/faEllipsisV.d.ts +7 -0
  37. package/dist/node_modules/@fortawesome/free-solid-svg-icons/faEllipsisVertical.d.ts +14 -0
  38. package/dist/node_modules/@fortawesome/free-solid-svg-icons/faExclamation.d.ts +14 -0
  39. package/dist/node_modules/@fortawesome/free-solid-svg-icons/faExclamationTriangle.d.ts +7 -0
  40. package/dist/node_modules/@fortawesome/free-solid-svg-icons/faExternalLinkAlt.d.ts +7 -0
  41. package/dist/node_modules/@fortawesome/free-solid-svg-icons/faEye.d.ts +14 -0
  42. package/dist/node_modules/@fortawesome/free-solid-svg-icons/faFile.d.ts +14 -0
  43. package/dist/node_modules/@fortawesome/free-solid-svg-icons/faFilter.d.ts +14 -0
  44. package/dist/node_modules/@fortawesome/free-solid-svg-icons/faGear.d.ts +14 -0
  45. package/dist/node_modules/@fortawesome/free-solid-svg-icons/faGripVertical.d.ts +14 -0
  46. package/dist/node_modules/@fortawesome/free-solid-svg-icons/faHeart.d.ts +14 -0
  47. package/dist/node_modules/@fortawesome/free-solid-svg-icons/faHome.d.ts +7 -0
  48. package/dist/node_modules/@fortawesome/free-solid-svg-icons/faHouse.d.ts +14 -0
  49. package/dist/node_modules/@fortawesome/free-solid-svg-icons/faImage.d.ts +14 -0
  50. package/dist/node_modules/@fortawesome/free-solid-svg-icons/faLink.d.ts +14 -0
  51. package/dist/node_modules/@fortawesome/free-solid-svg-icons/faLinkSlash.d.ts +14 -0
  52. package/dist/node_modules/@fortawesome/free-solid-svg-icons/faMagnifyingGlass.d.ts +14 -0
  53. package/dist/node_modules/@fortawesome/free-solid-svg-icons/faMinus.d.ts +14 -0
  54. package/dist/node_modules/@fortawesome/free-solid-svg-icons/faPalette.d.ts +14 -0
  55. package/dist/node_modules/@fortawesome/free-solid-svg-icons/faPaperPlane.d.ts +14 -0
  56. package/dist/node_modules/@fortawesome/free-solid-svg-icons/faPen.d.ts +14 -0
  57. package/dist/node_modules/@fortawesome/free-solid-svg-icons/faPenToSquare.d.ts +14 -0
  58. package/dist/node_modules/@fortawesome/free-solid-svg-icons/faPlus.d.ts +14 -0
  59. package/dist/node_modules/@fortawesome/free-solid-svg-icons/faQuestion.d.ts +14 -0
  60. package/dist/node_modules/@fortawesome/free-solid-svg-icons/faQuestionCircle.d.ts +7 -0
  61. package/dist/node_modules/@fortawesome/free-solid-svg-icons/faRedo.d.ts +7 -0
  62. package/dist/node_modules/@fortawesome/free-solid-svg-icons/faRotate.d.ts +14 -0
  63. package/dist/node_modules/@fortawesome/free-solid-svg-icons/faRotateLeft.d.ts +14 -0
  64. package/dist/node_modules/@fortawesome/free-solid-svg-icons/faRotateRight.d.ts +14 -0
  65. package/dist/node_modules/@fortawesome/free-solid-svg-icons/faSearch.d.ts +7 -0
  66. package/dist/node_modules/@fortawesome/free-solid-svg-icons/faShare.d.ts +14 -0
  67. package/dist/node_modules/@fortawesome/free-solid-svg-icons/faStar.d.ts +14 -0
  68. package/dist/node_modules/@fortawesome/free-solid-svg-icons/faTimes.d.ts +7 -0
  69. package/dist/node_modules/@fortawesome/free-solid-svg-icons/faTrashAlt.d.ts +7 -0
  70. package/dist/node_modules/@fortawesome/free-solid-svg-icons/faTrashCan.d.ts +14 -0
  71. package/dist/node_modules/@fortawesome/free-solid-svg-icons/faTriangleExclamation.d.ts +14 -0
  72. package/dist/node_modules/@fortawesome/free-solid-svg-icons/faUpRightFromSquare.d.ts +14 -0
  73. package/dist/node_modules/@fortawesome/free-solid-svg-icons/faUser.d.ts +14 -0
  74. package/dist/node_modules/@fortawesome/free-solid-svg-icons/faXmark.d.ts +14 -0
  75. package/dist/node_modules/@fortawesome/free-solid-svg-icons/faYenSign.d.ts +14 -0
  76. package/dist/node_modules/@fortawesome/react-fontawesome/index.es.d.ts +2 -0
  77. package/dist/node_modules/@remix-run/router/dist/router.d.ts +317 -0
  78. package/dist/node_modules/css-loader/dist/runtime/api.d.ts +2 -0
  79. package/dist/node_modules/css-loader/dist/runtime/noSourceMaps.d.ts +2 -0
  80. package/dist/node_modules/jsmin-front/dist/jsmin.d.ts +3 -0
  81. package/dist/node_modules/prop-types/factoryWithThrowingShims.d.ts +86 -0
  82. package/dist/node_modules/prop-types/index.d.ts +2 -0
  83. package/dist/node_modules/prop-types/lib/ReactPropTypesSecret.d.ts +2 -0
  84. package/dist/node_modules/react/cjs/react.production.min.d.ts +116 -0
  85. package/dist/node_modules/react/index.d.ts +2 -0
  86. package/dist/node_modules/react-dom/cjs/react-dom.production.min.d.ts +37 -0
  87. package/dist/node_modules/react-dom/client.d.ts +2 -0
  88. package/dist/node_modules/react-dom/index.d.ts +2 -0
  89. package/dist/node_modules/react-router/dist/index.d.ts +241 -0
  90. package/dist/node_modules/react-router-dom/dist/index.d.ts +139 -0
  91. package/dist/node_modules/scheduler/cjs/scheduler.production.min.d.ts +20 -0
  92. package/dist/node_modules/scheduler/index.d.ts +2 -0
  93. package/dist/src/@atoms.d.ts +4 -0
  94. package/dist/src/@declations/_.d.ts +23 -0
  95. package/dist/src/@declations/amotify.d.ts +1358 -0
  96. package/dist/src/@declations/jsminAmotifyExtension.d.ts +132 -0
  97. package/dist/src/@declations/module.d.ts +1 -0
  98. package/dist/src/@declations/styles.d.ts +145 -0
  99. package/dist/src/@functions.d.ts +12 -0
  100. package/dist/src/@global.d.ts +23 -0
  101. package/dist/src/@jsminAmotifyExtension/_.d.ts +4 -0
  102. package/dist/src/@jsminAmotifyExtension/fetch.d.ts +1 -0
  103. package/dist/src/@jsminAmotifyExtension/formCollect.d.ts +1 -0
  104. package/dist/src/@jsminAmotifyExtension/spreadSheet.d.ts +4 -0
  105. package/dist/src/@jsminAmotifyExtension/variables.d.ts +1 -0
  106. package/dist/src/@molecules.d.ts +23 -0
  107. package/dist/src/@organisms.d.ts +1 -0
  108. package/dist/src/@templates.d.ts +2 -0
  109. package/dist/src/@variables.d.ts +8 -0
  110. package/dist/src/atoms/FAI/parts.d.ts +3 -0
  111. package/dist/src/atoms/Logo/parts.d.ts +2 -0
  112. package/dist/src/atoms/Various/parts.d.ts +11 -0
  113. package/dist/src/config.d.ts +19 -0
  114. package/dist/src/functions/Button/_.d.ts +2 -0
  115. package/dist/src/functions/Cropper/parts.d.ts +2 -0
  116. package/dist/src/functions/Effects/Fade.d.ts +2 -0
  117. package/dist/src/functions/Effects/Ripple.d.ts +1 -0
  118. package/dist/src/functions/Effects/_.d.ts +4 -0
  119. package/dist/src/functions/Input/Chips/Selector.d.ts +2 -0
  120. package/dist/src/functions/Input/Chips/_.d.ts +3 -0
  121. package/dist/src/functions/Input/Contenteditable.d.ts +4 -0
  122. package/dist/src/functions/Input/DigitCharacters.d.ts +4 -0
  123. package/dist/src/functions/Input/File/_.d.ts +3 -0
  124. package/dist/src/functions/Input/Hidden.d.ts +3 -0
  125. package/dist/src/functions/Input/List/_.d.ts +4 -0
  126. package/dist/src/functions/Input/RichSelect/_.d.ts +4 -0
  127. package/dist/src/functions/Input/Segmented/_.d.ts +2 -0
  128. package/dist/src/functions/Input/Select/_.d.ts +4 -0
  129. package/dist/src/functions/Input/Slider/_.d.ts +4 -0
  130. package/dist/src/functions/Input/Switch/_.d.ts +4 -0
  131. package/dist/src/functions/Input/Text.d.ts +8 -0
  132. package/dist/src/functions/Input/TextArea.d.ts +4 -0
  133. package/dist/src/functions/Input/Time/Picker.d.ts +4 -0
  134. package/dist/src/functions/Input/Time/_.d.ts +5 -0
  135. package/dist/src/functions/Input/_.d.ts +6 -0
  136. package/dist/src/functions/Input/core.d.ts +36 -0
  137. package/dist/src/functions/Inputs/_.d.ts +4 -0
  138. package/dist/src/functions/Inputs/text.d.ts +3 -0
  139. package/dist/src/functions/Layout/PageNotFound.d.ts +2 -0
  140. package/dist/src/functions/Layout/PageRouter.d.ts +4 -0
  141. package/dist/src/functions/Layout/PageViewController/parts.d.ts +4 -0
  142. package/dist/src/functions/Layout/Plate.d.ts +3 -0
  143. package/dist/src/functions/Layout/RootViewController/parts.d.ts +2 -0
  144. package/dist/src/functions/Layout/SwipeView/parts.d.ts +5 -0
  145. package/dist/src/functions/Layout/TabBar.d.ts +4 -0
  146. package/dist/src/functions/Layout/_.d.ts +3 -0
  147. package/dist/src/functions/Loader/corner.d.ts +3 -0
  148. package/dist/src/functions/Loader/mini.d.ts +7 -0
  149. package/dist/src/functions/Loader/parts.d.ts +4 -0
  150. package/dist/src/functions/Loader/top.d.ts +3 -0
  151. package/dist/src/functions/Sheet/parts.d.ts +3 -0
  152. package/dist/src/functions/SnackBar/parts.d.ts +3 -0
  153. package/dist/src/functions/Table/Data/parts.d.ts +6 -0
  154. package/dist/src/functions/Table/Drag/parts.d.ts +4 -0
  155. package/dist/src/functions/Table/Normal/parts.d.ts +3 -0
  156. package/dist/src/functions/Table/_.d.ts +10 -0
  157. package/dist/src/functions/Tooltips/parts.d.ts +3 -0
  158. package/dist/src/global/LaunchReactApplication.d.ts +3 -0
  159. package/dist/src/global/styleConverter.d.ts +3 -0
  160. package/dist/src/launch.d.ts +10 -0
  161. package/dist/src/molecules/Accordion/parts.d.ts +3 -0
  162. package/dist/src/molecules/LinkifyText/parts.d.ts +3 -0
  163. package/dist/src/molecules/List.d.ts +3 -0
  164. package/dist/src/templates/PlayGround/parts.d.ts +2 -0
  165. package/package.json +10 -10
  166. package/tsconfig.json +14 -7
  167. package/@types/_.tsx +0 -7
  168. package/@types/amot.tsx +0 -355
  169. package/@types/fn.tsx +0 -1280
  170. package/@types/jsminAmotifyExtension.tsx +0 -137
  171. package/@types/module.tsx +0 -1
  172. package/@types/state.tsx +0 -231
  173. package/src/@atoms.tsx +0 -34
  174. package/src/@functions.tsx +0 -29
  175. package/src/@global.tsx +0 -145
  176. package/src/@jsminAmotifyExtension/_.tsx +0 -4
  177. package/src/@jsminAmotifyExtension/fetch.tsx +0 -110
  178. package/src/@jsminAmotifyExtension/formCollect.tsx +0 -94
  179. package/src/@jsminAmotifyExtension/spreadSheet.tsx +0 -165
  180. package/src/@jsminAmotifyExtension/variables.tsx +0 -137
  181. package/src/@molecules.tsx +0 -96
  182. package/src/@organisms.tsx +0 -1
  183. package/src/@reactPacks/reactProduction@18.2.0.js +0 -79
  184. package/src/@reactPacks/reactRouterDomProduction@18.2.0.js +0 -31
  185. package/src/@styles/@app.scss +0 -4
  186. package/src/@styles/UniStyling.scss +0 -1028
  187. package/src/@styles/init.scss +0 -94
  188. package/src/@styles/props.scss +0 -109
  189. package/src/@styles/styleSet.scss +0 -38
  190. package/src/@styles/themeColor.scss +0 -71
  191. package/src/@styles/var.scss +0 -182
  192. package/src/@templates.tsx +0 -7
  193. package/src/@variables.tsx +0 -74
  194. package/src/atoms/FAI/parts.tsx +0 -139
  195. package/src/atoms/Logo/parts.tsx +0 -335
  196. package/src/atoms/Logo/style.module.scss +0 -96
  197. package/src/atoms/Various/parts.tsx +0 -159
  198. package/src/atoms/Various/style.module.scss +0 -46
  199. package/src/config.tsx +0 -191
  200. package/src/functions/Button/_.tsx +0 -331
  201. package/src/functions/Button/style.module.scss +0 -157
  202. package/src/functions/Cropper/parts.tsx +0 -1084
  203. package/src/functions/Cropper/style.module.scss +0 -64
  204. package/src/functions/Effects/Fade.tsx +0 -76
  205. package/src/functions/Effects/Ripple.tsx +0 -141
  206. package/src/functions/Effects/_.tsx +0 -33
  207. package/src/functions/Effects/style.module.scss +0 -91
  208. package/src/functions/Input/Chips/Selector.tsx +0 -445
  209. package/src/functions/Input/Chips/_.tsx +0 -289
  210. package/src/functions/Input/Chips/style.module.scss +0 -6
  211. package/src/functions/Input/Contenteditable.tsx +0 -114
  212. package/src/functions/Input/DigitCharacters.tsx +0 -235
  213. package/src/functions/Input/File/_.tsx +0 -553
  214. package/src/functions/Input/File/style.module.scss +0 -34
  215. package/src/functions/Input/Hidden.tsx +0 -21
  216. package/src/functions/Input/List/_.tsx +0 -383
  217. package/src/functions/Input/List/style.module.scss +0 -84
  218. package/src/functions/Input/RichSelect/_.tsx +0 -230
  219. package/src/functions/Input/RichSelect/style.module.scss +0 -11
  220. package/src/functions/Input/Segmented/_.tsx +0 -246
  221. package/src/functions/Input/Segmented/style.module.scss +0 -81
  222. package/src/functions/Input/Select/_.tsx +0 -218
  223. package/src/functions/Input/Select/style.module.scss +0 -11
  224. package/src/functions/Input/Slider/_.tsx +0 -524
  225. package/src/functions/Input/Slider/style.module.scss +0 -67
  226. package/src/functions/Input/Switch/_.tsx +0 -176
  227. package/src/functions/Input/Switch/style.module.scss +0 -18
  228. package/src/functions/Input/Text.tsx +0 -487
  229. package/src/functions/Input/TextArea.tsx +0 -109
  230. package/src/functions/Input/Time/Picker.tsx +0 -1361
  231. package/src/functions/Input/Time/_.tsx +0 -749
  232. package/src/functions/Input/Time/style.module.scss +0 -79
  233. package/src/functions/Input/_.tsx +0 -881
  234. package/src/functions/Input/core.tsx +0 -473
  235. package/src/functions/Input/style.module.scss +0 -102
  236. package/src/functions/Inputs/_.tsx +0 -5
  237. package/src/functions/Inputs/style.module.scss +0 -15
  238. package/src/functions/Inputs/text.tsx +0 -53
  239. package/src/functions/Inputs/types.d.ts +0 -13
  240. package/src/functions/Layout/PageNotFound.tsx +0 -78
  241. package/src/functions/Layout/PageRouter.tsx +0 -89
  242. package/src/functions/Layout/PageViewController/parts.tsx +0 -27
  243. package/src/functions/Layout/Plate.tsx +0 -30
  244. package/src/functions/Layout/RootViewController/parts.tsx +0 -300
  245. package/src/functions/Layout/RootViewController/style.module.scss +0 -23
  246. package/src/functions/Layout/SwipeView/parts.tsx +0 -375
  247. package/src/functions/Layout/SwipeView/style.module.scss +0 -20
  248. package/src/functions/Layout/TabBar.tsx +0 -60
  249. package/src/functions/Layout/_.tsx +0 -20
  250. package/src/functions/Loader/corner.tsx +0 -74
  251. package/src/functions/Loader/mini.tsx +0 -114
  252. package/src/functions/Loader/parts.tsx +0 -103
  253. package/src/functions/Loader/style.module.scss +0 -223
  254. package/src/functions/Loader/top.tsx +0 -84
  255. package/src/functions/Sheet/parts.tsx +0 -994
  256. package/src/functions/Sheet/style.module.scss +0 -208
  257. package/src/functions/SnackBar/parts.tsx +0 -215
  258. package/src/functions/SnackBar/style.module.scss +0 -25
  259. package/src/functions/Table/Data/parts.tsx +0 -965
  260. package/src/functions/Table/Drag/parts.tsx +0 -442
  261. package/src/functions/Table/Normal/parts.tsx +0 -124
  262. package/src/functions/Table/_.tsx +0 -177
  263. package/src/functions/Table/style.module.scss +0 -93
  264. package/src/functions/Tooltips/parts.tsx +0 -53
  265. package/src/global/LaunchReactApplication.tsx +0 -40
  266. package/src/global/styleConverter.tsx +0 -465
  267. package/src/launch.tsx +0 -117
  268. package/src/molecules/Accordion/parts.tsx +0 -146
  269. package/src/molecules/Accordion/style.module.scss +0 -13
  270. package/src/molecules/LinkifyText/parts.tsx +0 -52
  271. package/src/molecules/List.tsx +0 -31
  272. package/src/preload.tsx +0 -31
  273. package/src/templates/PlayGround/parts.tsx +0 -96
  274. package/src/templates/PlayGround/style.module.scss +0 -38
  275. package/webpack.config.js +0 -146
@@ -1,965 +0,0 @@
1
- import {
2
- useStore,
3
- React
4
- } from '@global'
5
- import {
6
- Flex,
7
- Box,
8
- Span,
9
- FAI
10
- } from '@atoms'
11
- import {
12
- Column,
13
- Row,Text
14
- } from '@mols'
15
- import {
16
- Buttons,
17
- Input,
18
- Sheet,
19
- } from '@fn'
20
-
21
- import { faArrowUp } from '@fortawesome/free-solid-svg-icons/faArrowUp'
22
- import { faArrowDown } from '@fortawesome/free-solid-svg-icons/faArrowDown'
23
- import { faArrowRight } from '@fortawesome/free-solid-svg-icons/faArrowRight'
24
- import { faFilter } from '@fortawesome/free-solid-svg-icons/faFilter'
25
-
26
- import style from '../style.module.scss'
27
-
28
- import {
29
- Comps,
30
- DefaultCellSystemStyles,
31
- } from '../_'
32
-
33
- type DataTableOptionParams = {
34
- tableID: string
35
- componentID: string
36
-
37
- colLength: number
38
- checker: boolean
39
-
40
- searchKeyword: string
41
- filter: {
42
- enabled: boolean
43
- column: boolean[]
44
- current: ( string[] )[]
45
- }
46
- order: {
47
- enabled: boolean
48
- column: boolean[]
49
- current: amotify.fn.Tables.Data.OrderParams
50
- }
51
- paging: {
52
- rowLength: number
53
- pageLength: number
54
- currentPageIndex: number
55
- }
56
- head: amotify.fn.Tables.Data.HeadRowParams
57
- rows: amotify.fn.Tables.Data.BodyRowParams[]
58
-
59
- noRecords: ReactElement
60
- cellStyles?: amotifyUniStyleParams
61
- cellClassName?: string
62
- cellStylesCallback?: {
63
- ( params: amotify.fn.Tables.StylesCallbackInput ): amotifyUniStyleParams
64
- }
65
- onRowClick?: amotify.fn.Tables.OnRowClick
66
- onOrderChanged?: {
67
- ( args: amotify.fn.Tables.Data.OrderParams ): void
68
- }
69
- }
70
-
71
- const Components = {
72
- __memoryID: $.uuidGen(),
73
- Header: ( params: {
74
- val_status: DataTableOptionParams
75
- set_status: React.Dispatch<React.SetStateAction<DataTableOptionParams>>
76
-
77
- KeywordFilterRows: amotify.fn.Tables.Data.BodyRowParams[]
78
- } ) => {
79
- let {
80
- val_status,
81
- set_status,
82
- KeywordFilterRows
83
- } = { ...params }
84
-
85
- let {
86
- order,
87
- filter
88
- } = val_status
89
- let [ orderIndex,orderDirection ] = order.current
90
-
91
- let Cols = []
92
-
93
- let HEAD = [ ...val_status.head ]
94
- if ( val_status.checker ) {
95
- Cols.push( <Comps.TH
96
- { ...val_status.cellStyles }
97
- fontWeight='2.normal'
98
- position='sticky'
99
- top={ 0 }
100
- unitWidth={ 4 }
101
- padding={ 0 }
102
- { ...DefaultCellSystemStyles( {
103
- top: true,
104
- bottom: !val_status.rows.length,
105
- left: true,
106
- right: !val_status.colLength
107
- } ) }
108
- { ...val_status.cellStylesCallback ? val_status.cellStylesCallback( {
109
- top: true,
110
- bottom: !val_status.rows.length,
111
- left: true,
112
- right: !val_status.colLength,
113
- rowIndex: 0,
114
- colIndex: 0,
115
- isBody: false,
116
- isHeader: true
117
- } ) : {} }
118
- className={ [
119
- style.Cell,
120
- val_status.cellClassName
121
- ].join( ' ' ) }
122
- freeCSS={ {
123
- zIndex: 2
124
- } }
125
- >
126
- <Box flexCenter>
127
- <Input.Checker
128
- label={ null }
129
- value={ false }
130
- onUpdateValidValue={ ( { value } ) => {
131
- let newRows = val_status.rows
132
- newRows.forEach( ( rows ) => {
133
- rows.checked = value
134
- } )
135
- set_status( {
136
- ...val_status,
137
- rows: newRows
138
- } )
139
- } }
140
- />
141
- </Box>
142
- </Comps.TH> )
143
- }
144
-
145
- for ( let colIndex = 0; colIndex < val_status.colLength; colIndex++ ) {
146
- let col = HEAD[ colIndex ]
147
- if ( !col ) continue
148
-
149
- let DisplayLabel = col.children || col.data
150
-
151
- let orderable = order.enabled && order.column[ colIndex ]
152
- let filterable = filter.enabled && filter.column[ colIndex ]
153
-
154
- let OrderButton = orderable ? <FAI
155
- fontSize={ '1.mini' }
156
- fontColor={ colIndex == orderIndex ? '1.clear' : '5.translucent' }
157
- icon={ colIndex == orderIndex
158
- ? orderDirection == 'DESC'
159
- ? faArrowDown
160
- : faArrowUp
161
- : faArrowRight }
162
- /> : null
163
-
164
- let FilterButton = <></>
165
- if ( filterable ) {
166
- let ColumnDatas = KeywordFilterRows.map( ( row ) => {
167
- return row[ colIndex ]?.data
168
- } )
169
- ColumnDatas = [ ... new Set( ColumnDatas ) ].order( {
170
- direction: 'ASC',
171
- } )
172
- let filterList: any = filter.current[ colIndex ]
173
-
174
- if ( filterList ) {
175
- let ValueList = ColumnDatas.filter( ( data ) => !filterList.includes( data ) )
176
- let SelectList: amotify.fn.Input.List.OptionParams[] = []
177
- ColumnDatas.forEach( ( data ) => {
178
- if ( !data ) return
179
- SelectList.push( {
180
- value: data,
181
- label: <Box
182
- flexSizing={ 'auto' }
183
- >
184
- { data }
185
- </Box>
186
- } )
187
- } )
188
-
189
- let FilterModaButtonID = 'BUTTON-' + val_status.componentID + '-' + colIndex
190
- let FilterSheetID = val_status.componentID + '-' + colIndex
191
-
192
- let SheetParams: amotify.fn.Sheet.Params = {
193
- sheetID: FilterSheetID,
194
- parent: '#' + FilterModaButtonID,
195
- gravityPoint: 23,
196
- type: 'custom',
197
- content: <Flex
198
- flexType='col'
199
- border
200
- boxShadow={ '3.remark' }
201
- backgroundColor={ '1.layer.base' }
202
- borderRadius={ 1 }
203
- freeCSS={ {
204
- minWidth: 12 * 20,
205
- maxWidth: 12 * 30
206
- } }
207
- >
208
- <Column
209
- gap={ '1/3' }
210
- overflow={ 'auto' }
211
- padding={ '2/3' }
212
- freeCSS={ {
213
- maxHeight: 12 * 30
214
- } }
215
- >
216
- <Input.Checkbox
217
- tone='cloud'
218
- icon
219
- value={ ValueList }
220
- display='flex'
221
- gap={ '1/2' }
222
- override='force'
223
- options={ SelectList }
224
- hideInput
225
- name={ 'DTFilter-col-' + colIndex + '-table-' + val_status.componentID }
226
- cellStyles={ {
227
- flexSizing: 'auto',
228
- padding: '2/3'
229
- } }
230
- onUpdateValidValue={ ( { value } ) => {
231
- let DropValues = ColumnDatas.filter( ( data ) => !value.includes( data ) )
232
- let newOptions = { ...val_status }
233
- newOptions.filter.current[ colIndex ] = DropValues as string[]
234
-
235
- set_status( newOptions )
236
- } }
237
- />
238
- </Column>
239
- <Row.Separate
240
- gap={ '2/3' }
241
- padding={ '2/3' }
242
- horizontalAlign='right'
243
- >
244
- <Buttons.Button.Border.S
245
- isRounded
246
- onClick={ () => {
247
- Sheet.close( FilterSheetID )
248
- } }
249
- >
250
- 閉じる
251
- </Buttons.Button.Border.S>
252
- <Buttons.Button.Prime.S
253
- color='theme'
254
- isRounded
255
- ssEffectsOnActive='shrink'
256
- onClick={ () => {
257
- let newFilterList = [] as string[]
258
- if ( !filterList.length ) newFilterList = ColumnDatas as string[]
259
-
260
- let newOptions = { ...val_status }
261
- newOptions.filter.current[ colIndex ] = newFilterList
262
-
263
- set_status( newOptions )
264
- } }
265
- >
266
- 全選択
267
- </Buttons.Button.Prime.S>
268
- </Row.Separate>
269
- </Flex>
270
- }
271
-
272
- Sheet.refresh( SheetParams,true )
273
-
274
- FilterButton = <Box className={ style.FilterRegion }>
275
- <Buttons.Button.Sub.S
276
- ssSphere={ 2.5 }
277
- fontSize={ '1.mini' }
278
- className={ style[ 'Filtering_' + !!filterList.length ] }
279
- id={ FilterModaButtonID }
280
- onClick={ ( event ) => {
281
- event.stopPropagation()
282
- Sheet.open( SheetParams )
283
- } }
284
- >
285
- <FAI icon={ faFilter } />
286
- </Buttons.Button.Sub.S>
287
- </Box>
288
- }
289
- }
290
-
291
- col = {
292
- ...val_status.cellStyles,
293
- ...col,
294
- ...DefaultCellSystemStyles( {
295
- top: true,
296
- bottom: !val_status.rows.length,
297
- left: colIndex == Number( val_status.checker ),
298
- right: colIndex == val_status.colLength - 1
299
- } ),
300
- ...val_status.cellStylesCallback ? val_status.cellStylesCallback( {
301
- top: true,
302
- bottom: !val_status.rows.length,
303
- left: colIndex == Number( val_status.checker ),
304
- right: colIndex == val_status.colLength - 1,
305
- rowIndex: 0,
306
- colIndex,
307
- isBody: false,
308
- isHeader: true
309
- } ) : {},
310
- ssPushable: orderable,
311
- className: [
312
- style.Cell,
313
- val_status.cellClassName,
314
- col.className
315
- ].join( ' ' )
316
- }
317
-
318
- Cols.push( <Comps.TH
319
- fontWeight='2.normal'
320
- position='sticky'
321
- top={ 0 }
322
- { ...col }
323
- freeCSS={ {
324
- zIndex: 2,
325
- ...col.freeCSS
326
- } }
327
- onClick={ ( event ) => {
328
- if ( orderable ) {
329
- let newOptions = { ...val_status }
330
- let orderObject: amotify.fn.Tables.Data.OrderParams = [ colIndex,orderIndex === colIndex && orderDirection == 'ASC' ? 'DESC' : 'ASC' ]
331
- newOptions.order.current = orderObject
332
- set_status( newOptions )
333
- val_status.onOrderChanged && val_status.onOrderChanged( orderObject )
334
- }
335
- } }
336
- >
337
- <Flex
338
- flexType='row-r'
339
- flexWrap={ false }
340
- height={ 1 }
341
- borderRadius='inherit'
342
- flexCenter
343
- >
344
- { FilterButton }
345
- <Flex
346
- flexSizing={ 0 }
347
- position='relative'
348
- borderRadius='inherit'
349
- gap={ '1/3' }
350
- flexWrap={ false }
351
- horizontalAlign='center'
352
- >
353
- { OrderButton }
354
- { DisplayLabel }
355
- </Flex>
356
- </Flex>
357
- </Comps.TH> )
358
- }
359
-
360
- return <Comps.Row
361
- className={ [ style.Row,style.HeadRow ].join( ' ' ) }
362
- children={ Cols }
363
- />
364
- },
365
- Body: ( params: {
366
- val_status: DataTableOptionParams
367
- set_status: React.Dispatch<React.SetStateAction<DataTableOptionParams>>
368
- PageRows: amotify.fn.Tables.Data.BodyRowParams[]
369
- } ) => {
370
- let {
371
- val_status,
372
- PageRows
373
- } = params
374
-
375
- let BodyRows: ReactElement[] = []
376
- PageRows.forEach( ( row,rowIndex ) => {
377
- let ROW = [ ...row ]
378
- let Cols: ReactElement[] = []
379
-
380
- if ( val_status.checker ) {
381
- Cols.push( <Comps.TH
382
- unitWidth={ 4 }
383
- padding={ 0 }
384
- borderRight
385
- { ...val_status.cellStyles }
386
- { ...DefaultCellSystemStyles( {
387
- top: rowIndex == 0 && !val_status.head,
388
- bottom: rowIndex == PageRows.length - 1,
389
- left: true,
390
- right: !val_status.colLength
391
- } ) }
392
- { ...val_status.cellStylesCallback ? val_status.cellStylesCallback( {
393
- top: rowIndex == 0 && !val_status.head,
394
- bottom: rowIndex == PageRows.length - 1,
395
- left: true,
396
- right: !val_status.colLength,
397
- rowIndex,
398
- colIndex: 0,
399
- isBody: true,
400
- isHeader: false
401
- } ) : {} }
402
- className={ [
403
- style.Cell,
404
- val_status.cellClassName
405
- ].join( ' ' ) }
406
- >
407
- <Box flexCenter>
408
- <Input.Checker
409
- label={ null }
410
- value={ row.checked }
411
- override='force'
412
- onUpdateValidValue={ ( { value } ) => {
413
- let newRows = val_status.rows
414
- newRows[ rowIndex ].checked = value
415
- params.set_status( {
416
- ...val_status,
417
- rows: newRows
418
- } )
419
- } }
420
- />
421
- </Box>
422
- </Comps.TH> )
423
- }
424
-
425
- ROW.forEach( ( col,colIndex ) => {
426
- if ( !col ) return
427
- let {
428
- type = 'td',
429
- ...Params
430
- } = col
431
-
432
- Params = {
433
- ...val_status.cellStyles,
434
- ...Params,
435
- ...DefaultCellSystemStyles( {
436
- top: rowIndex == 0 && !val_status.head,
437
- bottom: rowIndex == PageRows.length - 1,
438
- left: val_status.checker ? false : colIndex == 0,
439
- right: colIndex == val_status.colLength - 1
440
- } ),
441
- ...val_status.cellStylesCallback ? val_status.cellStylesCallback( {
442
- top: rowIndex == 0 && !val_status.head,
443
- bottom: rowIndex == PageRows.length - 1,
444
- left: val_status.checker ? false : colIndex == 0,
445
- right: colIndex == val_status.colLength - 1,
446
- rowIndex,
447
- colIndex,
448
- isBody: true,
449
- isHeader: false
450
- } ) : {},
451
- className: [
452
- style.Cell,
453
- val_status.cellClassName,
454
- Params.className
455
- ].join( ' ' )
456
- }
457
-
458
- let Cell = Comps[ type == 'td' ? 'TD' : 'TH' ]
459
- Cols.push( <Cell
460
- key={ colIndex }
461
- { ...Params } /> )
462
- } )
463
-
464
- BodyRows.push( <Comps.Row
465
- key={ rowIndex }
466
- className={ [ style.Row,style.BodyRow ].join( ' ' ) }
467
- children={ Cols }
468
- onClick={ ( event ) => {
469
- if ( !val_status.onRowClick ) return
470
- val_status.onRowClick( JSON.parse( row.rowID ) as any,event )
471
- } }
472
- /> )
473
- } )
474
-
475
- if ( !PageRows.length ) {
476
- let Content = <Box
477
- padding={ 2 }
478
- fontColor={ '4.thin' }
479
- freeCSS={ {
480
- textAlign: 'center'
481
- } }
482
- borderTop='1.thin'
483
- children={ 'テーブルがありません' }
484
- />
485
- if ( val_status.noRecords ) {
486
- Content = <>
487
- { val_status.noRecords }
488
- </>
489
- }
490
-
491
- BodyRows.push( <Comps.Row
492
- key={ 'dataNotFound' }
493
- className={ [
494
- style.Row,
495
- style.BodyRow,
496
- style.DataNotFound
497
- ].join( ' ' ) }
498
- >
499
- <Comps.TD
500
- colSpan={ val_status.colLength }
501
- className={ style.Cell }
502
- >
503
- { Content }
504
- </Comps.TD>
505
- </Comps.Row> )
506
- }
507
- return <>{ BodyRows }</>
508
- },
509
- Core: ( params: {
510
- val_status: DataTableOptionParams
511
- set_status: React.Dispatch<React.SetStateAction<DataTableOptionParams>>
512
- } ) => {
513
- let {
514
- val_status,
515
- set_status
516
- } = params
517
-
518
- let {
519
- searchKeyword,
520
- filter,
521
- order,
522
- paging
523
- } = val_status
524
-
525
- let MotherRows = [ ...val_status.rows ]
526
- let KeywordFilterRows = [ ...val_status.rows ]
527
- let FilterRows = [ ...val_status.rows ]
528
- let PageRows = [ ...val_status.rows ]
529
-
530
- if ( searchKeyword ) {
531
- KeywordFilterRows = MotherRows.filter( ( row ) => {
532
- if ( ( row.__sys4SearchKey || '' ).match( new RegExp( searchKeyword,'i' ) ) ) return 1
533
- return 0
534
- } )
535
- FilterRows = [ ...KeywordFilterRows ]
536
- PageRows = [ ...KeywordFilterRows ]
537
- }
538
- if ( filter.enabled ) {
539
- for ( let i = 0; i < val_status.colLength; i++ ) {
540
- let enabled = filter.column[ i ]
541
- let current = filter.current[ i ]
542
-
543
- if ( enabled && current && current.length ) {
544
- FilterRows = FilterRows.filter( ( row ) => !current.includes( row[ i ].data as string ) )
545
- PageRows = [ ...FilterRows ]
546
- }
547
- }
548
- }
549
- if ( order.enabled ) {
550
- FilterRows = FilterRows.order( {
551
- direction: order.current[ 1 ],
552
- keys: [
553
- order.current[ 0 ],
554
- 'orderIndex'
555
- ]
556
- } )
557
- PageRows = [ ...FilterRows ]
558
- }
559
-
560
- {
561
- let {
562
- currentPageIndex,
563
- rowLength
564
- } = paging
565
- PageRows = [ ...PageRows ].splice( ( currentPageIndex - 1 ) * rowLength,rowLength )
566
- }
567
-
568
- let tableObjectID = Components.__memoryID + '_' + val_status.tableID
569
-
570
- let useStatusOutput: amotify.fn.Tables.Data.useStatusOutput = {
571
- tableComponentDidMount: true,
572
- totalRows: MotherRows.length,
573
- pageRows: PageRows.length,
574
- filteredRows: FilterRows.length,
575
-
576
- filter: val_status.filter,
577
- order: val_status.order,
578
- paging: val_status.paging,
579
- searchKeyword: val_status.searchKeyword,
580
- }
581
- useStore.update( {
582
- key: tableObjectID,
583
- value: {
584
- status: useStatusOutput,
585
- updatePageIndex: ( index: number ) => {
586
- let Index = Math.min( Math.max( 1,index ),val_status.paging.pageLength )
587
- let newOptions = { ...val_status }
588
- newOptions.paging.currentPageIndex = Index
589
- set_status( newOptions )
590
- },
591
- updateRowLength: ( index: number ) => {
592
- let newOptions = { ...val_status }
593
- newOptions.paging = {
594
- rowLength: index,
595
- currentPageIndex: 1,
596
- pageLength: Math.ceil( FilterRows.length / index )
597
- }
598
- set_status( newOptions )
599
- },
600
- updateKeyword: ( keyword: string ) => {
601
- $.interval.clear( 'InputSearchTime' )
602
- $.interval.standBy( 'InputSearchTime',200,() => {
603
- let newOptions = { ...val_status }
604
-
605
- newOptions.searchKeyword = keyword
606
- newOptions.paging.currentPageIndex = 1
607
- newOptions.filter.current = newOptions.filter.current.map( () => [] )
608
-
609
- set_status( newOptions )
610
- } )
611
- },
612
- getRowData: () => {
613
- let ReturnRows = [ ...MotherRows ]
614
-
615
- if ( order.enabled ) {
616
- ReturnRows = ReturnRows.order( {
617
- direction: order.current[ 1 ],
618
- keys: [
619
- order.current[ 0 ],
620
- 'orderIndex'
621
- ]
622
- } )
623
- }
624
-
625
- ReturnRows.forEach( ( row ) => {
626
- row.currentPage = false
627
- row.filtered = false
628
- // row.checked = val_checked[ row.rowID! ]
629
- } )
630
- PageRows.forEach( ( row ) => {
631
- let { rowID } = row
632
- ReturnRows.find( ( row ) => row.rowID == rowID )!.currentPage = true
633
- } )
634
- FilterRows.forEach( ( row ) => {
635
- let { rowID } = row
636
- ReturnRows.find( ( row ) => row.rowID == rowID )!.filtered = true
637
- } )
638
- return ReturnRows
639
- }
640
- }
641
- } )
642
-
643
- React.useEffect( () => {
644
- let Propagations = Components.Propagations[ val_status.tableID ] || []
645
- Object.keys( Propagations ).forEach( ( key ) => {
646
- let propagationObject = useStore.get( key )
647
- if ( !propagationObject?.refresh ) return
648
- propagationObject.refresh()
649
- } )
650
- } )
651
-
652
- return <Box
653
- className={ style.TableBase }
654
- >
655
- <Comps.Table className={ style.Table }>
656
- <Components.Header
657
- val_status={ val_status }
658
- set_status={ set_status }
659
- KeywordFilterRows={ KeywordFilterRows }
660
- />
661
- <Components.Body
662
- val_status={ val_status }
663
- set_status={ set_status }
664
- PageRows={ PageRows }
665
- />
666
- </Comps.Table>
667
- </Box>
668
- },
669
- Propagations: {} as any,
670
-
671
- DataLeveler: ( params: amotify.fn.Tables.Data.Params ) => {
672
- params = { ...params }
673
- params.filter = params.filter ?? false
674
- params.filter = Array.from( { length: params.colLength } ).map( ( a,index ) => {
675
- if ( $.is.boolean( params.filter ) ) {
676
- return params.filter
677
- }
678
- return ( params.filter as boolean[] )![ index ] ?? false
679
- } )
680
-
681
- params.order = params.order ?? true
682
- params.order = Array.from( { length: params.colLength } ).map( ( a,index ) => {
683
- if ( $.is.boolean( params.order ) ) {
684
- return params.order
685
- }
686
- return ( params.order as boolean[] )![ index ] ?? true
687
- } )
688
-
689
- params = {
690
- checker: false,
691
- searchKeyword: '',
692
- filter: false,
693
- order: true,
694
- defaultOrder: [ 0,'ASC' ],
695
- ...params
696
- }
697
- params.rows.forEach( ( row,rowIndex ) => {
698
- row.rowID = JSON.stringify( row.rowID || rowIndex )
699
- let __sys4SearchKey: string[] = []
700
- row.forEach( ( col,colIndex ) => {
701
- let {
702
- data,
703
- children,
704
- orderIndex
705
- } = col
706
- col.orderIndex = $.is.exist( orderIndex ) ? String( orderIndex ) : String( data )
707
- col.children = children || String( data )
708
- __sys4SearchKey.push( String( col.data ) )
709
- } )
710
- row.__sys4SearchKey = __sys4SearchKey.join( '/' )
711
- } )
712
- return <Components.StateManager
713
- eventID={ $.uuidGen() }
714
- { ...params }
715
- />
716
- },
717
- StateManager: ( params: amotify.fn.Tables.Data.Params ) => {
718
- let {
719
- colLength,
720
- eventID,
721
- checker = false,
722
- searchKeyword = '',
723
- filter,
724
- order,
725
- defaultOrder = [ 0,'ASC' ] as amotify.fn.Tables.Data.OrderParams,
726
- pageRowLength = 30
727
- } = params
728
- let [ val_componentID ] = React.useState( $.uuidGen() )
729
-
730
- let DefStatus: DataTableOptionParams = {
731
- tableID: params.tableID || val_componentID,
732
- componentID: val_componentID,
733
- colLength,
734
- checker,
735
- searchKeyword: searchKeyword,
736
- filter: {
737
- enabled: filter !== false,
738
- column: filter as boolean[],
739
- current: Array.from( { length: colLength },() => [] )
740
- },
741
- order: {
742
- enabled: order !== false,
743
- column: order as boolean[],
744
- current: defaultOrder
745
- },
746
- paging: {
747
- rowLength: pageRowLength,
748
- pageLength: Math.ceil( params.rows.length / pageRowLength ),
749
- currentPageIndex: 1
750
- },
751
- head: params.head,
752
- rows: params.rows,
753
- noRecords: params.noRecords,
754
- cellStyles: params.cellStyles || {},
755
- cellClassName: params.cellClassName || '',
756
- cellStylesCallback: params.cellStylesCallback,
757
- onRowClick: params.onRowClick,
758
- onOrderChanged: params.onOrderChanged
759
- }
760
- let [ val_status,set_status ] = React.useState( DefStatus )
761
-
762
- let [ val_eventID,set_eventID ] = React.useState( params.eventID )
763
- if ( val_eventID != params.eventID ) {
764
- set_eventID( params.eventID )
765
- set_status( DefStatus )
766
- }
767
-
768
- return <Components.Core
769
- val_status={ val_status }
770
- set_status={ set_status }
771
- />
772
- }
773
- }
774
-
775
- export const DataFNs: amotify.fn.Tables.Data.FNs = {
776
- __memoryID: Components.__memoryID,
777
- useStatus: ( tableID ) => {
778
- let [ val_statusID ] = React.useState( $.uuidGen() )
779
- let [ val_refresh,set_refresh ] = React.useState( $.uuidGen() )
780
-
781
- let tableObjectID = Components.__memoryID + '_' + tableID
782
- React.useEffect( () => {
783
- Components.Propagations[ tableID ] = {
784
- ...Components.Propagations[ tableID ],
785
- [ val_statusID ]: 1
786
- }
787
- useStore.set( {
788
- key: val_statusID,
789
- value: {
790
- refresh: () => {
791
- set_refresh( $.uuidGen() )
792
- }
793
- }
794
- } )
795
-
796
- return () => {
797
- delete Components.Propagations[ tableID ][ val_statusID ]
798
- }
799
- },[] )
800
-
801
- return useStore.get( tableObjectID )?.status || {
802
- tableComponentDidMount: false
803
- }
804
- },
805
- getRowData: ( tableID ) => {
806
- let tableObject = useStore.get( Components.__memoryID + '_' + tableID )
807
- if ( !tableObject?.getRowData ) return
808
- return tableObject.getRowData()
809
- },
810
- setPageIndex: ( tableID,pageIndex ) => {
811
- let tableObject = useStore.get( Components.__memoryID + '_' + tableID )
812
- if ( !tableObject?.updatePageIndex ) return
813
- tableObject.updatePageIndex( pageIndex )
814
- },
815
- setRowLength: ( tableID,rowLength ) => {
816
- let tableObject = useStore.get( Components.__memoryID + '_' + tableID )
817
- if ( !tableObject?.updateRowLength ) return
818
- tableObject.updateRowLength( rowLength )
819
- },
820
- setSearchKeyword: ( tableID,keyword ) => {
821
- let tableObject = useStore.get( Components.__memoryID + '_' + tableID )
822
- if ( !tableObject?.updateKeyword ) return
823
- tableObject.updateKeyword( keyword )
824
- },
825
- }
826
- export const DataComps: amotify.fn.Tables.Data.Comps = {
827
- SearchInput: ( params ) => {
828
- let status = DataFNs.useStatus( params.tableID )
829
- if ( !status.tableComponentDidMount ) return null
830
-
831
- return <Input.Text.Normal
832
- placeholder='検索...'
833
- clearButton
834
- padding={ '2/3' }
835
- paddingRight={ 3 }
836
- rightIcon={ <Input.Comps.RightIcon
837
- fontColor={ '5.translucent' }
838
- right={ '2/3' }
839
- >
840
- <FAI.Search />
841
- </Input.Comps.RightIcon> }
842
- override='force'
843
- value={ status.searchKeyword }
844
- onUpdateValidValue={ ( { value } ) => {
845
- DataFNs.setSearchKeyword( params.tableID,value )
846
- } }
847
- />
848
- },
849
- Info: ( params ) => {
850
- let status = DataFNs.useStatus( params.tableID )
851
- if ( !status.tableComponentDidMount ) return null
852
- let Ratio = status.filteredRows.ratio( status.totalRows ) || 0
853
-
854
- return <Flex
855
- verticalAlign='baseline'
856
- gap={ '1/2' }
857
- fontSize='1.mini'
858
- fontColor='3.blur'
859
- >
860
- <Span
861
- fontSize='4.thirdTitle'
862
- fontColor='theme'
863
- >
864
- { status.filteredRows.toLocaleString() }
865
- </Span>
866
- / { status.totalRows.toLocaleString() }件 ({ Ratio }%)
867
- </Flex>
868
- },
869
- Paging: ( params ) => {
870
- let status = DataFNs.useStatus( params.tableID )
871
- if ( !status.tableComponentDidMount ) return null
872
-
873
- let PageSelect: amotify.fn.Input.Select.OptionProps[] = []
874
- for ( let index = 0; index < status.paging.pageLength; index++ ) {
875
- PageSelect.push( { value: index + 1,label: ( index + 1 ).toString() } )
876
- }
877
-
878
- return <Row.Center>
879
- <Row.Center
880
- gap={ '1/2' }
881
- >
882
- ページ :
883
- <Input.Select
884
- enableUnSelected={ false }
885
- padding={ [ '1/3','2/3' ] }
886
- rightIcon={ false }
887
- placeholder=''
888
- override='force'
889
- value={ status.paging.currentPageIndex }
890
- options={ PageSelect }
891
- onUpdateValidValue={ ( { value } ) => {
892
- DataFNs.setPageIndex( params.tableID,value )
893
- } }
894
- />
895
- / { status.paging.pageLength }
896
- </Row.Center>
897
- <Row.Right gap={ '1/2' }>
898
- <Buttons.Button.Sub.R
899
- ssSphere={ 3 }
900
- onClick={ () => {
901
- if ( status.paging.currentPageIndex == 1 ) {
902
- DataFNs.setPageIndex( params.tableID,status.paging.pageLength )
903
- return
904
- }
905
- DataFNs.setPageIndex( params.tableID,status.paging.currentPageIndex - 1 )
906
- } }
907
- >
908
- <FAI.ChevronLeft />
909
- </Buttons.Button.Sub.R>
910
- <Buttons.Button.Sub.R
911
- ssSphere={ 3 }
912
- onClick={ () => {
913
- if ( status.paging.currentPageIndex == status.paging.pageLength ) {
914
- DataFNs.setPageIndex( params.tableID,1 )
915
- return
916
- }
917
- DataFNs.setPageIndex( params.tableID,status.paging.currentPageIndex + 1 )
918
- } }
919
- >
920
- <FAI.ChevronRight />
921
- </Buttons.Button.Sub.R>
922
- </Row.Right>
923
- </Row.Center>
924
- },
925
- RowLength: ( params ) => {
926
- let status = DataFNs.useStatus( params.tableID )
927
- if ( !status.tableComponentDidMount ) return null
928
-
929
- let currentLength = status.paging.rowLength
930
- let ExistCurrentLength = 0
931
- let LengthList: amotify.fn.Input.Select.OptionProps[] = params.lengthSelect.map( ( l ) => {
932
- ExistCurrentLength |= Number( l == currentLength )
933
-
934
- return { value: l,label: l.toString() }
935
- } )
936
- if ( !ExistCurrentLength ) {
937
- LengthList.push( { value: currentLength,label: currentLength.toString() } )
938
- }
939
-
940
- LengthList = LengthList.order( {
941
- direction: 'ASC',
942
- keys: [ 'value' ],
943
- } )
944
-
945
- return <Row.Center
946
- gap={ '1/2' }
947
- >
948
- 件数 :
949
- <Input.Select
950
- enableUnSelected={ false }
951
- rightIcon={ false }
952
- placeholder='選択'
953
- override='force'
954
- padding={ [ '1/3','2/3' ] }
955
- value={ status.paging.rowLength }
956
- options={ LengthList }
957
- onUpdateValidValue={ ( { value } ) => {
958
- DataFNs.setRowLength( params.tableID,value )
959
- } }
960
- />
961
- </Row.Center>
962
- },
963
- }
964
-
965
- export const DataTable = ( params: amotify.fn.Tables.Data.Params ) => ( <Components.DataLeveler{ ...params } /> )