amotify 0.0.8 → 0.0.9

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 (260) hide show
  1. package/{dist/@types/_.d.ts → @types/_.tsx} +3 -3
  2. package/{src/@types → @types}/amot.tsx +0 -1
  3. package/{src/@types → @types}/fn.tsx +1 -2
  4. package/{src/@types → @types}/index.tsx +1 -5
  5. package/{src/@types → @types}/jsminAmotifyExtension.tsx +1 -2
  6. package/dist/amotify.js +1 -0
  7. package/dist/amotify.min.css +24 -0
  8. package/package.json +4 -9
  9. package/src/{Atoms/@export.tsx → @atoms.tsx} +3 -3
  10. package/src/@functions.tsx +29 -0
  11. package/src/{Global/@export.tsx → @global.tsx} +2 -2
  12. package/src/@jsminAmotifyExtension/formCollect.tsx +1 -1
  13. package/src/{Molecules/@export.tsx → @molecules.tsx} +4 -4
  14. package/src/@organisms.tsx +5 -0
  15. package/src/@styles/UniStyling.scss +1 -1
  16. package/src/@styles/init.scss +1 -1
  17. package/src/@styles/styleSet.scss +1 -1
  18. package/src/{Templates/@export.tsx → @templates.tsx} +1 -1
  19. package/src/{Atoms → atoms}/FAIcon/style.module.scss +1 -2
  20. package/src/{Atoms → atoms}/Logo/parts.tsx +1 -2
  21. package/src/{Atoms → atoms}/Logo/style.module.scss +1 -2
  22. package/src/{Atoms → atoms}/Various/parts.tsx +1 -1
  23. package/src/{Atoms → atoms}/Various/style.module.scss +3 -2
  24. package/src/{Functions → functions}/Button/_.tsx +1 -1
  25. package/src/{Functions → functions}/Button/style.module.scss +3 -2
  26. package/src/{Functions → functions}/Cropper/parts.tsx +4 -4
  27. package/src/{Functions → functions}/Cropper/style.module.scss +1 -1
  28. package/src/{Functions → functions}/Effects/Fade.tsx +2 -2
  29. package/src/{Functions → functions}/Effects/style.module.scss +1 -1
  30. package/src/{Functions → functions}/Input/Chips/Selector.tsx +4 -5
  31. package/src/{Functions → functions}/Input/Chips/_.tsx +3 -7
  32. package/src/functions/Input/Chips/style.module.scss +6 -0
  33. package/src/{Functions → functions}/Input/DigitCharacters.tsx +3 -3
  34. package/src/{Functions → functions}/Input/File/_.tsx +4 -4
  35. package/src/{Functions → functions}/Input/File/style.module.scss +1 -1
  36. package/src/{Functions → functions}/Input/List/_.tsx +3 -3
  37. package/src/{Functions → functions}/Input/List/style.module.scss +1 -1
  38. package/src/{Functions → functions}/Input/Segmented/_.tsx +1 -1
  39. package/src/{Functions → functions}/Input/Segmented/style.module.scss +2 -2
  40. package/src/{Functions → functions}/Input/Select/_.tsx +3 -3
  41. package/src/{Functions → functions}/Input/Select/style.module.scss +1 -1
  42. package/src/{Functions → functions}/Input/Slider/_.tsx +3 -3
  43. package/src/{Functions → functions}/Input/Slider/style.module.scss +2 -2
  44. package/src/{Functions → functions}/Input/Switch/_.tsx +4 -4
  45. package/src/{Functions → functions}/Input/Switch/style.module.scss +1 -1
  46. package/src/{Functions → functions}/Input/Text.tsx +2 -2
  47. package/src/{Functions → functions}/Input/TextArea.tsx +1 -1
  48. package/src/{Functions → functions}/Input/Time/Picker.tsx +4 -4
  49. package/src/{Functions → functions}/Input/Time/_.tsx +3 -3
  50. package/src/{Functions → functions}/Input/Time/style.module.scss +1 -1
  51. package/src/{Functions → functions}/Input/_.tsx +4 -4
  52. package/src/{Functions → functions}/Input/core.tsx +4 -4
  53. package/src/{Functions → functions}/Input/style.module.scss +1 -1
  54. package/src/{Functions → functions}/Inputs/style.module.scss +1 -1
  55. package/src/{Functions → functions}/Inputs/text.tsx +4 -17
  56. package/src/functions/Inputs/types.d.ts +13 -0
  57. package/src/{Functions → functions}/Layout/PageNotFound.tsx +4 -6
  58. package/src/{Functions → functions}/Layout/PageRouter.tsx +2 -2
  59. package/src/{Functions → functions}/Layout/PageViewController/parts.tsx +4 -2
  60. package/src/{Functions → functions}/Layout/Plate.tsx +1 -1
  61. package/src/{Functions → functions}/Layout/RootViewController/parts.tsx +6 -8
  62. package/src/{Functions → functions}/Layout/RootViewController/style.module.scss +1 -1
  63. package/src/{Functions → functions}/Layout/SwipeView/parts.tsx +2 -3
  64. package/src/{Functions → functions}/Layout/SwipeView/style.module.scss +1 -1
  65. package/src/{Functions → functions}/Layout/TabBar.tsx +4 -4
  66. package/src/{Functions → functions}/Loader/corner.tsx +3 -3
  67. package/src/{Functions → functions}/Loader/mini.tsx +2 -2
  68. package/src/{Functions → functions}/Loader/parts.tsx +1 -1
  69. package/src/{Functions → functions}/Loader/style.module.scss +1 -1
  70. package/src/{Functions → functions}/Loader/top.tsx +3 -3
  71. package/src/{Functions → functions}/Sheet/parts.tsx +4 -4
  72. package/src/{Functions → functions}/Sheet/style.module.scss +1 -1
  73. package/src/{Functions → functions}/SnackBar/parts.tsx +4 -4
  74. package/src/{Functions → functions}/SnackBar/style.module.scss +1 -1
  75. package/src/{Functions → functions}/Table/Data/parts.tsx +4 -4
  76. package/src/{Functions → functions}/Table/Drag/parts.tsx +3 -3
  77. package/src/{Functions → functions}/Table/Normal/parts.tsx +1 -2
  78. package/src/{Functions → functions}/Table/_.tsx +3 -4
  79. package/src/{Functions → functions}/Table/style.module.scss +3 -2
  80. package/src/{Functions → functions}/Tooltips/parts.tsx +2 -2
  81. package/src/{Global → global}/styleConverter.tsx +1 -5
  82. package/src/launch.tsx +8 -8
  83. package/src/{Molecules → molecules}/Accordion/parts.tsx +2 -2
  84. package/src/{Molecules → molecules}/Accordion/style.module.scss +1 -1
  85. package/src/{Molecules → molecules}/LinkifyText/parts.tsx +2 -2
  86. package/src/{Molecules → molecules}/List.tsx +1 -1
  87. package/src/{Organisms → organisms}/DisplayStyleInput/darkmode.tsx +4 -4
  88. package/src/{Organisms → organisms}/DisplayStyleInput/themeColor.tsx +4 -4
  89. package/src/{Templates → templates}/PlayGround/parts.tsx +26 -40
  90. package/src/{Templates → templates}/PlayGround/style.module.scss +1 -1
  91. package/tsconfig.json +19 -5
  92. package/webpack.config.js +13 -2
  93. package/dist/@jsminAmotifyExtension/_.d.ts +0 -4
  94. package/dist/@jsminAmotifyExtension/_.js +0 -6
  95. package/dist/@jsminAmotifyExtension/fetch.d.ts +0 -9
  96. package/dist/@jsminAmotifyExtension/fetch.js +0 -199
  97. package/dist/@jsminAmotifyExtension/formCollect.d.ts +0 -1
  98. package/dist/@jsminAmotifyExtension/formCollect.js +0 -137
  99. package/dist/@jsminAmotifyExtension/spreadSheet.d.ts +0 -4
  100. package/dist/@jsminAmotifyExtension/spreadSheet.js +0 -314
  101. package/dist/@jsminAmotifyExtension/variables.d.ts +0 -0
  102. package/dist/@jsminAmotifyExtension/variables.js +0 -186
  103. package/dist/@types/_.js +0 -8
  104. package/dist/@types/amot.d.ts +0 -260
  105. package/dist/@types/amot.js +0 -2
  106. package/dist/@types/fn.d.ts +0 -1040
  107. package/dist/@types/fn.js +0 -2
  108. package/dist/@types/index.d.ts +0 -62
  109. package/dist/@types/index.js +0 -2
  110. package/dist/@types/jsminAmotifyExtension.d.ts +0 -134
  111. package/dist/@types/jsminAmotifyExtension.js +0 -2
  112. package/dist/@types/module.d.ts +0 -2
  113. package/dist/@types/module.js +0 -1
  114. package/dist/@types/state.d.ts +0 -145
  115. package/dist/@types/state.js +0 -2
  116. package/dist/Atoms/@export.d.ts +0 -4
  117. package/dist/Atoms/@export.js +0 -16
  118. package/dist/Atoms/FAIcon/parts.d.ts +0 -2
  119. package/dist/Atoms/FAIcon/parts.js +0 -152
  120. package/dist/Atoms/Logo/parts.d.ts +0 -1
  121. package/dist/Atoms/Logo/parts.js +0 -154
  122. package/dist/Atoms/Various/parts.d.ts +0 -9
  123. package/dist/Atoms/Various/parts.js +0 -113
  124. package/dist/Functions/@export.d.ts +0 -12
  125. package/dist/Functions/@export.js +0 -25
  126. package/dist/Functions/Button/_.d.ts +0 -1
  127. package/dist/Functions/Button/_.js +0 -270
  128. package/dist/Functions/Cropper/parts.d.ts +0 -1
  129. package/dist/Functions/Cropper/parts.js +0 -783
  130. package/dist/Functions/Effects/Fade.d.ts +0 -1
  131. package/dist/Functions/Effects/Fade.js +0 -82
  132. package/dist/Functions/Effects/Ripple.d.ts +0 -1
  133. package/dist/Functions/Effects/Ripple.js +0 -107
  134. package/dist/Functions/Effects/_.d.ts +0 -3
  135. package/dist/Functions/Effects/_.js +0 -43
  136. package/dist/Functions/Input/Chips/Selector.d.ts +0 -1
  137. package/dist/Functions/Input/Chips/Selector.js +0 -356
  138. package/dist/Functions/Input/Chips/_.d.ts +0 -2
  139. package/dist/Functions/Input/Chips/_.js +0 -218
  140. package/dist/Functions/Input/DigitCharacters.d.ts +0 -1
  141. package/dist/Functions/Input/DigitCharacters.js +0 -178
  142. package/dist/Functions/Input/File/_.d.ts +0 -2
  143. package/dist/Functions/Input/File/_.js +0 -458
  144. package/dist/Functions/Input/Hidden.d.ts +0 -1
  145. package/dist/Functions/Input/Hidden.js +0 -30
  146. package/dist/Functions/Input/List/_.d.ts +0 -1
  147. package/dist/Functions/Input/List/_.js +0 -232
  148. package/dist/Functions/Input/Segmented/_.d.ts +0 -1
  149. package/dist/Functions/Input/Segmented/_.js +0 -111
  150. package/dist/Functions/Input/Select/_.d.ts +0 -1
  151. package/dist/Functions/Input/Select/_.js +0 -154
  152. package/dist/Functions/Input/Slider/_.d.ts +0 -1
  153. package/dist/Functions/Input/Slider/_.js +0 -308
  154. package/dist/Functions/Input/Switch/_.d.ts +0 -1
  155. package/dist/Functions/Input/Switch/_.js +0 -120
  156. package/dist/Functions/Input/Text.d.ts +0 -5
  157. package/dist/Functions/Input/Text.js +0 -340
  158. package/dist/Functions/Input/TextArea.d.ts +0 -1
  159. package/dist/Functions/Input/TextArea.js +0 -98
  160. package/dist/Functions/Input/Time/Picker.d.ts +0 -1
  161. package/dist/Functions/Input/Time/Picker.js +0 -581
  162. package/dist/Functions/Input/Time/_.d.ts +0 -2
  163. package/dist/Functions/Input/Time/_.js +0 -567
  164. package/dist/Functions/Input/_.d.ts +0 -5
  165. package/dist/Functions/Input/_.js +0 -446
  166. package/dist/Functions/Input/core.d.ts +0 -34
  167. package/dist/Functions/Input/core.js +0 -324
  168. package/dist/Functions/Inputs/_.d.ts +0 -3
  169. package/dist/Functions/Inputs/_.js +0 -7
  170. package/dist/Functions/Inputs/text.d.ts +0 -12
  171. package/dist/Functions/Inputs/text.js +0 -46
  172. package/dist/Functions/Layout/PageNotFound.d.ts +0 -1
  173. package/dist/Functions/Layout/PageNotFound.js +0 -30
  174. package/dist/Functions/Layout/PageRouter.d.ts +0 -2
  175. package/dist/Functions/Layout/PageRouter.js +0 -65
  176. package/dist/Functions/Layout/PageViewController/parts.d.ts +0 -1
  177. package/dist/Functions/Layout/PageViewController/parts.js +0 -31
  178. package/dist/Functions/Layout/Plate.d.ts +0 -1
  179. package/dist/Functions/Layout/Plate.js +0 -39
  180. package/dist/Functions/Layout/RootViewController/parts.d.ts +0 -1
  181. package/dist/Functions/Layout/RootViewController/parts.js +0 -202
  182. package/dist/Functions/Layout/SwipeView/parts.d.ts +0 -2
  183. package/dist/Functions/Layout/SwipeView/parts.js +0 -319
  184. package/dist/Functions/Layout/TabBar.d.ts +0 -1
  185. package/dist/Functions/Layout/TabBar.js +0 -49
  186. package/dist/Functions/Layout/_.d.ts +0 -2
  187. package/dist/Functions/Layout/_.js +0 -20
  188. package/dist/Functions/Loader/corner.d.ts +0 -1
  189. package/dist/Functions/Loader/corner.js +0 -59
  190. package/dist/Functions/Loader/mini.d.ts +0 -33
  191. package/dist/Functions/Loader/mini.js +0 -126
  192. package/dist/Functions/Loader/parts.d.ts +0 -3
  193. package/dist/Functions/Loader/parts.js +0 -108
  194. package/dist/Functions/Loader/top.d.ts +0 -1
  195. package/dist/Functions/Loader/top.js +0 -69
  196. package/dist/Functions/Sheet/parts.d.ts +0 -2
  197. package/dist/Functions/Sheet/parts.js +0 -724
  198. package/dist/Functions/SnackBar/parts.d.ts +0 -2
  199. package/dist/Functions/SnackBar/parts.js +0 -171
  200. package/dist/Functions/Table/Data/parts.d.ts +0 -3
  201. package/dist/Functions/Table/Data/parts.js +0 -629
  202. package/dist/Functions/Table/Drag/parts.d.ts +0 -1
  203. package/dist/Functions/Table/Drag/parts.js +0 -359
  204. package/dist/Functions/Table/Normal/parts.d.ts +0 -1
  205. package/dist/Functions/Table/Normal/parts.js +0 -92
  206. package/dist/Functions/Table/_.d.ts +0 -9
  207. package/dist/Functions/Table/_.js +0 -153
  208. package/dist/Functions/Tooltips/parts.d.ts +0 -2
  209. package/dist/Functions/Tooltips/parts.js +0 -71
  210. package/dist/Global/@export.d.ts +0 -12
  211. package/dist/Global/@export.js +0 -198
  212. package/dist/Global/LaunchReactApplication.d.ts +0 -1
  213. package/dist/Global/LaunchReactApplication.js +0 -48
  214. package/dist/Global/styleConverter.d.ts +0 -2
  215. package/dist/Global/styleConverter.js +0 -349
  216. package/dist/Molecules/@export.d.ts +0 -21
  217. package/dist/Molecules/@export.js +0 -41
  218. package/dist/Molecules/Accordion/parts.d.ts +0 -2
  219. package/dist/Molecules/Accordion/parts.js +0 -165
  220. package/dist/Molecules/LinkifyText/parts.d.ts +0 -1
  221. package/dist/Molecules/LinkifyText/parts.js +0 -39
  222. package/dist/Molecules/List.d.ts +0 -1
  223. package/dist/Molecules/List.js +0 -35
  224. package/dist/Organisms/@export.d.ts +0 -2
  225. package/dist/Organisms/@export.js +0 -5
  226. package/dist/Organisms/DisplayStyleInput/_.d.ts +0 -1
  227. package/dist/Organisms/DisplayStyleInput/_.js +0 -15
  228. package/dist/Organisms/DisplayStyleInput/darkmode.d.ts +0 -1
  229. package/dist/Organisms/DisplayStyleInput/darkmode.js +0 -77
  230. package/dist/Organisms/DisplayStyleInput/themeColor.d.ts +0 -27
  231. package/dist/Organisms/DisplayStyleInput/themeColor.js +0 -185
  232. package/dist/Templates/@export.d.ts +0 -2
  233. package/dist/Templates/@export.js +0 -5
  234. package/dist/Templates/PlayGround/parts.d.ts +0 -1
  235. package/dist/Templates/PlayGround/parts.js +0 -55
  236. package/dist/config.d.ts +0 -16
  237. package/dist/config.js +0 -171
  238. package/dist/launch.d.ts +0 -9
  239. package/dist/launch.js +0 -46
  240. package/dist/preload.d.ts +0 -1
  241. package/dist/preload.js +0 -73
  242. package/public/amotify.js +0 -310
  243. package/public/amotify.min.css +0 -12724
  244. package/src/@types/_.tsx +0 -6
  245. package/src/Functions/@export.tsx +0 -29
  246. package/src/Functions/Input/Chips/style.module.scss +0 -6
  247. package/src/Functions/Inputs/types.d.ts +0 -1
  248. package/src/Global/exe.tsx +0 -0
  249. package/src/Organisms/@export.tsx +0 -5
  250. package/src/index.js +0 -0
  251. /package/{src/@types → @types}/module.tsx +0 -0
  252. /package/{src/@types → @types}/state.tsx +0 -0
  253. /package/src/{Atoms → atoms}/FAIcon/parts.tsx +0 -0
  254. /package/src/{Functions → functions}/Effects/Ripple.tsx +0 -0
  255. /package/src/{Functions → functions}/Effects/_.tsx +0 -0
  256. /package/src/{Functions → functions}/Input/Hidden.tsx +0 -0
  257. /package/src/{Functions → functions}/Inputs/_.tsx +0 -0
  258. /package/src/{Functions → functions}/Layout/_.tsx +0 -0
  259. /package/src/{Global → global}/LaunchReactApplication.tsx +0 -0
  260. /package/src/{Organisms → organisms}/DisplayStyleInput/_.tsx +0 -0
@@ -1,218 +0,0 @@
1
- "use strict";
2
- var __assign = (this && this.__assign) || function () {
3
- __assign = Object.assign || function(t) {
4
- for (var s, i = 1, n = arguments.length; i < n; i++) {
5
- s = arguments[i];
6
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
- t[p] = s[p];
8
- }
9
- return t;
10
- };
11
- return __assign.apply(this, arguments);
12
- };
13
- var __rest = (this && this.__rest) || function (s, e) {
14
- var t = {};
15
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
16
- t[p] = s[p];
17
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
18
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
19
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
20
- t[p[i]] = s[p[i]];
21
- }
22
- return t;
23
- };
24
- var __read = (this && this.__read) || function (o, n) {
25
- var m = typeof Symbol === "function" && o[Symbol.iterator];
26
- if (!m) return o;
27
- var i = m.call(o), r, ar = [], e;
28
- try {
29
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
30
- }
31
- catch (error) { e = { error: error }; }
32
- finally {
33
- try {
34
- if (r && !r.done && (m = i["return"])) m.call(i);
35
- }
36
- finally { if (e) throw e.error; }
37
- }
38
- return ar;
39
- };
40
- var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
41
- if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
42
- if (ar || !(i in from)) {
43
- if (!ar) ar = Array.prototype.slice.call(from, 0, i);
44
- ar[i] = from[i];
45
- }
46
- }
47
- return to.concat(ar || Array.prototype.slice.call(from));
48
- };
49
- Object.defineProperty(exports, "__esModule", { value: true });
50
- exports.ChipsInput = void 0;
51
- var useEffect = React.useEffect, useState = React.useState;
52
- var _export_1 = require("../../../Atoms/@export");
53
- var _export_2 = require("../../../Molecules/@export");
54
- var _export_3 = require("../../../Functions/@export");
55
- var core_1 = require("../core");
56
- var Selector_1 = require("./Selector");
57
- function DefaultValidation(props) {
58
- var value = props.value, params = props.params;
59
- var required = params.required;
60
- var notice = [];
61
- if (required && !value.length) {
62
- notice.push({ type: 'invalid', label: '一つ以上選択してください' });
63
- }
64
- return {
65
- ok: !notice.filter(function (_a) {
66
- var type = _a.type;
67
- return type == 'invalid';
68
- }).length,
69
- notice: notice
70
- };
71
- }
72
- var DataWrapping = function (params) {
73
- var DefaultValues = __spreadArray([], __read((params.value || [])), false);
74
- var Values = DefaultValues.splice(0, params.limit || 65535);
75
- return (React.createElement(Core, __assign({ SelectedCellComponent: function (params) {
76
- var value = params.value, label = params.label, removeCallback = params.removeCallback;
77
- return React.createElement(_export_2.Row.Left, { ssCardBox: true, padding: '1/2', gap: '1/2', isRounded: true, textAlign: 'left' },
78
- label,
79
- params.defaultRemoveButton);
80
- }, AddButtonComponent: function (props) {
81
- if (params.limit && params.limit <= props.selected.length)
82
- return null;
83
- return React.createElement(_export_3.Buttons.Button.Sub.R, { color: 'cloud', padding: '1/2', onClick: function () {
84
- props.openCallback();
85
- } },
86
- React.createElement(_export_1.FAIcon.Plus, null),
87
- "\u8FFD\u52A0\u3059\u308B");
88
- } }, params, { value: Values })));
89
- };
90
- var Core = function (params) {
91
- var required = params.required, form = params.form, name = params.name, checkValidationAtFirst = params.checkValidationAtFirst, onValidate = params.onValidate, onUpdateValue = params.onUpdateValue, onUpdateValidValue = params.onUpdateValidValue, _a = params.value, value = _a === void 0 ? [] : _a, limit = params.limit, SelectedCellComponent = params.SelectedCellComponent, AddButtonComponent = params.AddButtonComponent, others = __rest(params, ["required", "form", "name", "checkValidationAtFirst", "onValidate", "onUpdateValue", "onUpdateValidValue", "value", "limit", "SelectedCellComponent", "AddButtonComponent"]);
92
- AddButtonComponent = AddButtonComponent;
93
- var _b = __read(useState($.uuidGen()), 1), val_selectorID = _b[0];
94
- var _c = __read(useState({
95
- componentID: params.componentID || '',
96
- dataValue: value.map(function (val) { return val; }),
97
- eventID: $.uuidGen(),
98
- eventType: 'init'
99
- }), 2), val_status = _c[0], set_status = _c[1];
100
- var _d = __read(useState({
101
- ok: false,
102
- notice: []
103
- }), 2), val_validate = _d[0], set_validate = _d[1];
104
- var _e = __read(useState(__spreadArray([], __read(value), false)), 2), val_selected = _e[0], set_selected = _e[1];
105
- (0, core_1.CommonEffects)({
106
- params: params,
107
- val_status: val_status,
108
- set_status: set_status,
109
- val_validate: val_validate,
110
- set_validate: set_validate,
111
- DefaultValidation: DefaultValidation,
112
- onUpdateValue: onUpdateValue,
113
- onUpdateValidValue: onUpdateValidValue,
114
- ExtraOverrideParams: {
115
- formatValue: val_selected,
116
- dataValue: val_selected.map(function (val) { return val; })
117
- },
118
- ExtraStoreParams: {
119
- searchTimer: null
120
- }
121
- });
122
- var UpdateValue = function (values) {
123
- set_selected(values);
124
- set_status(__assign(__assign({}, val_status), { dataValue: values.map(function (val) { return val; }), eventID: $.uuidGen(), eventType: 'update' }));
125
- };
126
- var OpenSelector = function () {
127
- Selector_1.ChipsInputFNs.openSelector({
128
- parent: DefaultParentQuerySelector,
129
- gravityPoint: params.selectorGravityPoint,
130
- SelectorCellComponent: params.SelectorCellComponent,
131
- selectorID: val_selectorID,
132
- options: params.defaultOptions || [],
133
- selected: val_selected,
134
- limit: params.limit,
135
- onDynamicSearch: params.onDynamicSearch,
136
- onUpdated: function (args) {
137
- UpdateValue(args.values);
138
- },
139
- onClosed: function () {
140
- $(DefaultParentQuerySelector).focus();
141
- }
142
- });
143
- };
144
- var DefaultParentQuerySelector = "[data-chips-input-wrapper=\"".concat(val_selectorID, "\"]");
145
- var isFully = limit && limit <= val_selected.length;
146
- var mounted = React.useRef(false);
147
- useEffect(function () {
148
- if (mounted.current) {
149
- if (isFully) {
150
- _export_3.Sheet.close(val_selectorID);
151
- $(DefaultParentQuerySelector).focus();
152
- }
153
- }
154
- else {
155
- mounted.current = true;
156
- }
157
- }, [val_selected]);
158
- var Selected = val_selected.map(function (s) {
159
- var value = s.value, label = s.label;
160
- SelectedCellComponent = SelectedCellComponent;
161
- var removeCallback = function () {
162
- var findIndex = val_selected.findIndex(function (v) { return v.value == value; });
163
- if (findIndex == -1)
164
- return;
165
- var newSelected = __spreadArray([], __read(val_selected), false);
166
- newSelected.splice(findIndex, 1);
167
- UpdateValue(newSelected);
168
- if (!newSelected.length) {
169
- setTimeout(function () {
170
- $(DefaultParentQuerySelector).focus();
171
- }, 200);
172
- }
173
- };
174
- return React.createElement(SelectedCellComponent, { value: value, label: label, removeCallback: removeCallback, defaultRemoveButton: React.createElement(_export_3.Buttons.Button.Sub.S, { flexSizing: 'none', color: 'cloud', backgroundColor: 'cloud', isRounded: true, onClick: function () {
175
- removeCallback();
176
- } },
177
- React.createElement(_export_1.FAIcon.Times, null)), openCallback: function () {
178
- OpenSelector();
179
- } });
180
- });
181
- return (React.createElement(core_1.BoxWrapper, { val_status: val_status, set_status: set_status, val_validate: val_validate, params: params },
182
- React.createElement(_export_3.Input.Hidden, { "data-value": JSON.stringify(val_status.dataValue.map(function (v) { return v.value; })), name: name, form: form, "data-input-type": 'chips-' + ['single', 'multi'][Number(params.limit != 1)], "data-validation": val_validate.ok, componentID: val_status.componentID, "data-focusor": val_selectorID }),
183
- React.createElement("button", __assign({ "data-chips-input-wrapper": val_selectorID, onKeyDown: function (e) {
184
- var key = e.key, ctrlKey = e.ctrlKey, metaKey = e.metaKey, keyCode = e.keyCode;
185
- var auxKey = ctrlKey || metaKey;
186
- var isString = (keyCode >= 48 && keyCode <= 57) || (keyCode >= 65 && keyCode <= 90) || (keyCode >= 96 && keyCode <= 105);
187
- if (isString) {
188
- if (isFully)
189
- return;
190
- OpenSelector();
191
- }
192
- else if (key == 'Tab') {
193
- }
194
- else if (key == 'Backspace') {
195
- if (!val_selected.length)
196
- return;
197
- if (auxKey) {
198
- UpdateValue([]);
199
- }
200
- else {
201
- var newSelected = __spreadArray([], __read(val_selected), false);
202
- newSelected.pop();
203
- UpdateValue(newSelected);
204
- }
205
- }
206
- }, onClick: function () {
207
- if (isFully)
208
- return;
209
- if (val_selected.length)
210
- return;
211
- OpenSelector();
212
- } }, others),
213
- !isFully ? React.createElement(AddButtonComponent, { selected: val_selected, openCallback: OpenSelector }) : null,
214
- Selected)));
215
- };
216
- var ChipsInput = DataWrapping;
217
- exports.ChipsInput = ChipsInput;
218
- ChipsInput.fn = Selector_1.ChipsInputFNs;
@@ -1 +0,0 @@
1
- export declare const DigitCharactersInput: FNC<amotify.fn.Input.DigitCharacters.PlainParams>;
@@ -1,178 +0,0 @@
1
- "use strict";
2
- var __assign = (this && this.__assign) || function () {
3
- __assign = Object.assign || function(t) {
4
- for (var s, i = 1, n = arguments.length; i < n; i++) {
5
- s = arguments[i];
6
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
- t[p] = s[p];
8
- }
9
- return t;
10
- };
11
- return __assign.apply(this, arguments);
12
- };
13
- var __rest = (this && this.__rest) || function (s, e) {
14
- var t = {};
15
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
16
- t[p] = s[p];
17
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
18
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
19
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
20
- t[p[i]] = s[p[i]];
21
- }
22
- return t;
23
- };
24
- var __read = (this && this.__read) || function (o, n) {
25
- var m = typeof Symbol === "function" && o[Symbol.iterator];
26
- if (!m) return o;
27
- var i = m.call(o), r, ar = [], e;
28
- try {
29
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
30
- }
31
- catch (error) { e = { error: error }; }
32
- finally {
33
- try {
34
- if (r && !r.done && (m = i["return"])) m.call(i);
35
- }
36
- finally { if (e) throw e.error; }
37
- }
38
- return ar;
39
- };
40
- Object.defineProperty(exports, "__esModule", { value: true });
41
- exports.DigitCharactersInput = void 0;
42
- var _export_1 = require("../../Global/@export");
43
- var useState = _export_1.React.useState;
44
- var _export_2 = require("../../Atoms/@export");
45
- var _export_3 = require("../../Functions/@export");
46
- var core_1 = require("./core");
47
- function DefaultValidation(props) {
48
- var value = props.value, params = props.params;
49
- var _a = params, required = _a.required, _b = _a.numericOnly, numericOnly = _b === void 0 ? false : _b, digits = _a.digits;
50
- var notice = [];
51
- if (required && !value) {
52
- notice.push({ type: 'invalid', label: '必須項目です' });
53
- }
54
- if (value) {
55
- if (numericOnly && value.match(/\D/)) {
56
- notice.push({ type: 'invalid', label: '数字のみで入力してください' });
57
- }
58
- if (value.length != digits) {
59
- notice.push({ type: 'warn', label: '最後まで入力してください' });
60
- }
61
- }
62
- return {
63
- ok: !notice.filter(function (_a) {
64
- var type = _a.type;
65
- return type == 'invalid' || type == 'warn';
66
- }).length,
67
- notice: notice
68
- };
69
- }
70
- var dataToFormat = function (digits, value) {
71
- if (value === void 0) { value = ''; }
72
- var dataValue = String(value);
73
- var formatValue = [];
74
- for (var index = 0; index < digits; index++) {
75
- formatValue[index] = dataValue[index] || '';
76
- }
77
- return {
78
- formatValue: formatValue,
79
- dataValue: dataValue
80
- };
81
- };
82
- var formatToData = function (value) {
83
- if (value === void 0) { value = ''; }
84
- var formatValue = value;
85
- var dataValue = formatValue.join('');
86
- return {
87
- formatValue: formatValue,
88
- dataValue: dataValue
89
- };
90
- };
91
- var DigitCharactersInput = function (params) {
92
- var tone = params.tone, required = params.required, form = params.form, name = params.name, _a = params.className, className = _a === void 0 ? '' : _a, digits = params.digits, _b = params.numericOnly, numericOnly = _b === void 0 ? false : _b, enableFormSubmit = params.enableFormSubmit, checkValidationAtFirst = params.checkValidationAtFirst, onChange = params.onChange, onKeyDown = params.onKeyDown, onValidate = params.onValidate, onUpdateValue = params.onUpdateValue, onUpdateValidValue = params.onUpdateValidValue, _c = params.value, value = _c === void 0 ? '' : _c, override = params.override, statusID = params.statusID, componentID = params.componentID, listStyles = params.listStyles, others = __rest(params, ["tone", "required", "form", "name", "className", "digits", "numericOnly", "enableFormSubmit", "checkValidationAtFirst", "onChange", "onKeyDown", "onValidate", "onUpdateValue", "onUpdateValidValue", "value", "override", "statusID", "componentID", "listStyles"]);
93
- if (numericOnly) {
94
- params.inputMode = params.inputMode || 'numeric';
95
- }
96
- var Default_Status = __assign(__assign({ componentID: params.componentID || '' }, dataToFormat(digits, value)), { eventType: 'init', eventID: $.uuidGen() });
97
- var _d = __read(useState(Default_Status), 2), val_status = _d[0], set_status = _d[1];
98
- var _e = __read(useState({
99
- ok: false,
100
- notice: []
101
- }), 2), val_validate = _e[0], set_validate = _e[1];
102
- (0, core_1.CommonEffects)({
103
- params: params,
104
- val_status: val_status,
105
- set_status: set_status,
106
- val_validate: val_validate,
107
- set_validate: set_validate,
108
- onUpdateValue: onUpdateValue,
109
- onUpdateValidValue: onUpdateValidValue,
110
- DefaultValidation: DefaultValidation
111
- });
112
- var Digits = [];
113
- var _loop_1 = function (index) {
114
- var Character = val_status.formatValue[index];
115
- var Styles = {};
116
- if (params.combineInput) {
117
- if (index == 0) {
118
- Styles = {
119
- borderTopLeftRadius: 'inherit',
120
- borderBottomLeftRadius: 'inherit'
121
- };
122
- }
123
- else if (index == digits - 1) {
124
- Styles = {
125
- borderTopRightRadius: 'inherit',
126
- borderBottomRightRadius: 'inherit'
127
- };
128
- }
129
- }
130
- Digits.push(_export_1.React.createElement("input", { type: 'text', inputMode: params.inputMode || 'text', value: Character, "data-form-name": form, id: 'Digit-' + index + '-' + val_status.componentID, className: className, style: __assign(__assign({}, params.style), Styles), onKeyDown: function (event) {
131
- var key = event.key, code = event.code;
132
- if (key == 'Tab')
133
- return;
134
- event.preventDefault();
135
- var nextFocusIndex = null;
136
- if (key == 'Backspace') {
137
- var newFormatValue = val_status.formatValue;
138
- newFormatValue[index] = '';
139
- set_status(__assign(__assign(__assign({}, val_status), formatToData(newFormatValue)), { eventType: 'update', eventID: $.uuidGen() }));
140
- nextFocusIndex = index - 1;
141
- }
142
- else if (['ArrowLeft', 'ArrowRight'].includes(key)) {
143
- var dir = Number(key == 'ArrowRight') * 2 - 1;
144
- nextFocusIndex = index + dir;
145
- }
146
- else {
147
- if (enableFormSubmit)
148
- (0, core_1.SubmitForm)(event);
149
- (function () {
150
- var regExp = code.match(/^(Key(.)|Digit(\d)|Numpad(\d))/);
151
- if (!regExp)
152
- return;
153
- var newCharacter = regExp[2] || regExp[3] || regExp[4];
154
- if (numericOnly) {
155
- if (!newCharacter.match(/\d/))
156
- return;
157
- }
158
- if (!newCharacter)
159
- return;
160
- var newFormatValue = val_status.formatValue;
161
- newFormatValue[index] = newCharacter;
162
- set_status(__assign(__assign(__assign({}, val_status), formatToData(newFormatValue)), { eventType: 'update', eventID: $.uuidGen() }));
163
- nextFocusIndex = index + 1;
164
- })();
165
- }
166
- if ($.is.exist(nextFocusIndex)) {
167
- $('#Digit-' + nextFocusIndex + '-' + val_status.componentID).focus();
168
- }
169
- } }));
170
- };
171
- for (var index = 0; index < digits; index++) {
172
- _loop_1(index);
173
- }
174
- return (_export_1.React.createElement(core_1.BoxWrapper, { val_status: val_status, set_status: set_status, val_validate: val_validate, params: params },
175
- _export_1.React.createElement(_export_3.Input.Hidden, __assign({ name: name, "data-input-type": 'digitCharacters', "data-form": form, "data-validation": val_validate.ok, componentID: val_status.componentID, "data-value": val_status.dataValue }, others)),
176
- _export_1.React.createElement(_export_2.Flex, __assign({ gap: '1/2', flexChilds: 'even', flexWrap: false, flexSizing: 'auto' }, listStyles), Digits)));
177
- };
178
- exports.DigitCharactersInput = DigitCharactersInput;
@@ -1,2 +0,0 @@
1
- declare const FileInput: amotify.fn.Input.Filer.Methods;
2
- export { FileInput };