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,458 +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 __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
14
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
15
- return new (P || (P = Promise))(function (resolve, reject) {
16
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
17
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
18
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
19
- step((generator = generator.apply(thisArg, _arguments || [])).next());
20
- });
21
- };
22
- var __generator = (this && this.__generator) || function (thisArg, body) {
23
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
24
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
25
- function verb(n) { return function (v) { return step([n, v]); }; }
26
- function step(op) {
27
- if (f) throw new TypeError("Generator is already executing.");
28
- while (_) try {
29
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
30
- if (y = 0, t) op = [op[0] & 2, t.value];
31
- switch (op[0]) {
32
- case 0: case 1: t = op; break;
33
- case 4: _.label++; return { value: op[1], done: false };
34
- case 5: _.label++; y = op[1]; op = [0]; continue;
35
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
36
- default:
37
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
38
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
39
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
40
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
41
- if (t[2]) _.ops.pop();
42
- _.trys.pop(); continue;
43
- }
44
- op = body.call(thisArg, _);
45
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
46
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
47
- }
48
- };
49
- var __rest = (this && this.__rest) || function (s, e) {
50
- var t = {};
51
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
52
- t[p] = s[p];
53
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
54
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
55
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
56
- t[p[i]] = s[p[i]];
57
- }
58
- return t;
59
- };
60
- var __read = (this && this.__read) || function (o, n) {
61
- var m = typeof Symbol === "function" && o[Symbol.iterator];
62
- if (!m) return o;
63
- var i = m.call(o), r, ar = [], e;
64
- try {
65
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
66
- }
67
- catch (error) { e = { error: error }; }
68
- finally {
69
- try {
70
- if (r && !r.done && (m = i["return"])) m.call(i);
71
- }
72
- finally { if (e) throw e.error; }
73
- }
74
- return ar;
75
- };
76
- var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
77
- if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
78
- if (ar || !(i in from)) {
79
- if (!ar) ar = Array.prototype.slice.call(from, 0, i);
80
- ar[i] = from[i];
81
- }
82
- }
83
- return to.concat(ar || Array.prototype.slice.call(from));
84
- };
85
- var __importDefault = (this && this.__importDefault) || function (mod) {
86
- return (mod && mod.__esModule) ? mod : { "default": mod };
87
- };
88
- Object.defineProperty(exports, "__esModule", { value: true });
89
- exports.FileInput = void 0;
90
- var _export_1 = require("../../../Global/@export");
91
- var useEffect = React.useEffect, useState = React.useState;
92
- var _export_2 = require("../../../Atoms/@export");
93
- var _export_3 = require("../../../Molecules/@export");
94
- var _export_4 = require("../../../Functions/@export");
95
- var core_1 = require("../core");
96
- var style_module_scss_1 = __importDefault(require("./style.module.scss"));
97
- function DefaultValidation(props) {
98
- var value = props.value, params = props.params;
99
- var required = params.required;
100
- var notice = [];
101
- if (required && !value.length) {
102
- notice.push({ type: 'invalid', label: '必須項目です' });
103
- }
104
- return {
105
- ok: !notice.filter(function (_a) {
106
- var type = _a.type;
107
- return type == 'invalid';
108
- }).length,
109
- notice: notice
110
- };
111
- }
112
- var FileComponent = function (params) {
113
- var tone = params.tone, required = params.required, form = params.form, _a = params.fileNameEdit, fileNameEdit = _a === void 0 ? true : _a, _b = params.systemOnly, systemOnly = _b === void 0 ? false : _b, _c = params.accept, accept = _c === void 0 ? '*' : _c, _d = params.limit, limit = _d === void 0 ? 1 : _d, checkValidationAtFirst = params.checkValidationAtFirst, onChange = params.onChange, onValidate = params.onValidate, onUpdateValue = params.onUpdateValue, onUpdateValidValue = params.onUpdateValidValue, _e = params.value, value = _e === void 0 ? [] : _e, className = params.className, cellStyles = params.cellStyles, cellClassName = params.cellClassName, others = __rest(params, ["tone", "required", "form", "fileNameEdit", "systemOnly", "accept", "limit", "checkValidationAtFirst", "onChange", "onValidate", "onUpdateValue", "onUpdateValidValue", "value", "className", "cellStyles", "cellClassName"]);
114
- var Default_Status = {
115
- componentID: params.componentID || '',
116
- dataValue: value,
117
- eventType: 'init',
118
- eventID: $.uuidGen()
119
- };
120
- var _f = __read(useState(Default_Status), 2), val_status = _f[0], set_status = _f[1];
121
- var _g = __read(useState({
122
- ok: false,
123
- notice: []
124
- }), 2), val_validate = _g[0], set_validate = _g[1];
125
- (0, core_1.CommonEffects)({
126
- type: 'file',
127
- params: params,
128
- val_status: val_status,
129
- set_status: set_status,
130
- val_validate: val_validate,
131
- set_validate: set_validate,
132
- DefaultValidation: DefaultValidation,
133
- onUpdateValue: onUpdateValue,
134
- onUpdateValidValue: onUpdateValidValue,
135
- ExtraOverrideParams: {
136
- dataValue: value,
137
- formatValue: value,
138
- },
139
- ExtraStoreParams: {
140
- AddFiles: function (files) { return __awaiter(void 0, void 0, void 0, function () {
141
- var currentFiles, newFiles, i, file, type, name_1;
142
- return __generator(this, function (_a) {
143
- currentFiles = _export_1.useStore.get(val_status.componentID).Files;
144
- newFiles = [];
145
- for (i = 0; i < (files === null || files === void 0 ? void 0 : files.length); i++) {
146
- file = files[i];
147
- type = file.type, name_1 = file.name;
148
- if (i + 1 + currentFiles.length > limit) {
149
- _export_4.SnackBar.add({
150
- componentID: name_1,
151
- secondsToClose: 12000,
152
- children: "\u30D5\u30A1\u30A4\u30EB\u9078\u629E\u4E0A\u9650\u3092\u8D85\u3048\u305F\u305F\u3081\u3001".concat(name_1, "}\u306F\u8FFD\u52A0\u3067\u304D\u307E\u305B\u3093\u3002"),
153
- backgroundColor: 'nega'
154
- });
155
- continue;
156
- }
157
- if (accept) {
158
- if (accept == 'image') {
159
- if (!type.match(/image/)) {
160
- _export_4.SnackBar.add({
161
- componentID: name_1,
162
- secondsToClose: 12000,
163
- children: "\u30D5\u30A1\u30A4\u30EB\u5F62\u5F0F\u304C\u7570\u306A\u308B\u305F\u3081\u3001".concat(name_1, " \u306F\u8FFD\u52A0\u3067\u304D\u307E\u305B\u3093\u3002"),
164
- backgroundColor: 'nega'
165
- });
166
- continue;
167
- }
168
- }
169
- }
170
- newFiles.push(file);
171
- }
172
- set_status(__assign(__assign({}, val_status), { dataValue: __spreadArray(__spreadArray([], __read(currentFiles), false), __read(newFiles), false), eventType: 'update', eventID: $.uuidGen() }));
173
- return [2 /*return*/];
174
- });
175
- }); }
176
- }
177
- });
178
- var Accept = '';
179
- if (accept) {
180
- if (accept == 'image')
181
- Accept = 'image/png,image/jpeg';
182
- else
183
- Accept = accept;
184
- }
185
- return (React.createElement(core_1.BoxWrapper, { val_status: val_status, set_status: set_status, val_validate: val_validate, params: params },
186
- React.createElement("input", __assign({ type: 'file', className: style_module_scss_1.default.Input, "data-form": form, "data-input-type": 'file', "data-component-id": val_status.componentID, "data-validation": val_validate.ok, accept: Accept, multiple: limit == 1 ? false : true, onChange: function (event) { return __awaiter(void 0, void 0, void 0, function () {
187
- var Input, files, newFiles, i, file, fileName;
188
- return __generator(this, function (_a) {
189
- Input = event.target;
190
- files = Input.files;
191
- newFiles = [];
192
- for (i = 0; i < (files === null || files === void 0 ? void 0 : files.length); i++) {
193
- file = files[i];
194
- fileName = file.name;
195
- file.id = $.uuidGen();
196
- if (i + 1 + val_status.dataValue.length > limit) {
197
- _export_4.SnackBar.add({
198
- componentID: fileName,
199
- secondsToClose: 12000,
200
- children: "\u30D5\u30A1\u30A4\u30EB\u767B\u9332\u6570\u3092\u8D85\u3048\u305F\u305F\u3081\u3001".concat(fileName, "}\u306F\u8FFD\u52A0\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002"),
201
- backgroundColor: 'nega'
202
- });
203
- continue;
204
- }
205
- newFiles.push(file);
206
- }
207
- set_status(__assign(__assign({}, val_status), { dataValue: __spreadArray(__spreadArray([], __read(val_status.dataValue), false), __read(newFiles), false), eventType: 'update', eventID: $.uuidGen() }));
208
- Input.value = '';
209
- return [2 /*return*/];
210
- });
211
- }); } }, others, { tabIndex: -1, value: '' })),
212
- !systemOnly ? React.createElement(FileList, { files: val_status.dataValue, params: params, val_status: val_status, set_status: set_status }) : null));
213
- };
214
- var FileList = function (props) {
215
- var files = props.files, params = props.params, val_status = props.val_status, set_status = props.set_status;
216
- var Left = (params.limit || 1) - val_status.dataValue.length;
217
- var Files = files.map(function (file, index) {
218
- return (React.createElement(FileCell, { key: file.name, index: index, file: file, className: params.cellClassName, val_status: val_status, set_status: set_status, fileNameEdit: params.fileNameEdit }));
219
- });
220
- if (Left > 0) {
221
- Files.push(React.createElement(_export_4.Buttons.Label.Plain, { key: 'AddButton', className: [params.cellClassName, style_module_scss_1.default.AddButton].join(' '), htmlFor: params.id, tabIndex: params.tabIndex, onKeyDown: function (event) {
222
- var key = event.key;
223
- if (params.tabIndex != -1) {
224
- if ([' ', 'Enter'].includes(key)) {
225
- $('#' + params.id).click();
226
- }
227
- }
228
- } },
229
- React.createElement(_export_3.Row.Center, { padding: ['1/3', 0] },
230
- React.createElement(_export_2.Box, { isRounded: true, className: style_module_scss_1.default.AddIcon },
231
- React.createElement(_export_2.FAIcon, { d: 'cloud-arrow-up', className: style_module_scss_1.default.Icon, fontColor: 'theme', backgroundColor: 'tcOpLow', padding: 0, unitWidth: 4, unitHeight: 4, isRounded: true })),
232
- React.createElement(_export_2.Box, null,
233
- React.createElement(_export_2.Box, { children: 'ファイルを選択' + "\uFF08".concat(Left, "\uFF09"), fontColor: 'theme', fontSize: '2.normal', isBoldFont: true }),
234
- React.createElement(_export_2.Box, { children: 'または、ファイルをドロップ', fontColor: '4.thin', fontSize: '0.xs' })))));
235
- }
236
- return (React.createElement(_export_3.Column, { flexSizing: 'auto', className: params.className, children: Files }));
237
- };
238
- var FileCell = function (props) {
239
- var index = props.index, file = props.file, className = props.className, val_status = props.val_status, set_status = props.set_status, _a = props.fileNameEdit, fileNameEdit = _a === void 0 ? true : _a;
240
- var fileName = file.name, size = file.size, type = file.type;
241
- var _b = __read(useState(false), 2), val_edit = _b[0], set_edit = _b[1];
242
- var FileID = $.uuidGen();
243
- var Size = size.rank();
244
- var _c = __read(fileName
245
- .replace(/\s/, '')
246
- .replace(/(.*)\.(.*)$/, '$1 $2').split(' '), 2), name = _c[0], extension = _c[1];
247
- var FileType = {
248
- name: '不明',
249
- icon: 'fal file'
250
- };
251
- if (type.match(/image/)) {
252
- FileType = {
253
- name: type.replace(/image\//, ''),
254
- icon: 'image'
255
- };
256
- }
257
- else if (type.match(/pdf/)) {
258
- FileType = {
259
- name: 'PDF',
260
- icon: 'file-pdf'
261
- };
262
- }
263
- else if (type.match(/csv/)) {
264
- FileType = {
265
- name: 'CSV',
266
- icon: 'file-csv'
267
- };
268
- }
269
- else if (type.match(/spreadsheet/)) {
270
- FileType = {
271
- name: 'SpreadSheet',
272
- icon: 'file-excel'
273
- };
274
- }
275
- else if (type.match(/presentation/)) {
276
- FileType = {
277
- name: 'PowerPoint',
278
- icon: 'file-powerpoint'
279
- };
280
- }
281
- else if (type.match(/word/)) {
282
- FileType = {
283
- name: 'Word',
284
- icon: 'file-word'
285
- };
286
- }
287
- else if (type.match(/zip/)) {
288
- FileType = {
289
- name: 'Zip',
290
- icon: 'file-zipper'
291
- };
292
- }
293
- else if (type.match(/powerpoint/)) {
294
- FileType = {
295
- name: 'PowerPoint',
296
- icon: 'file-powerpoint'
297
- };
298
- }
299
- else if (type.match(/html/)) {
300
- FileType = {
301
- name: 'HTML',
302
- icon: 'fab html5'
303
- };
304
- }
305
- else if (type.match(/js/)) {
306
- FileType = {
307
- name: 'JS',
308
- icon: 'fab js-square'
309
- };
310
- }
311
- else if (type.match(/css/)) {
312
- FileType = {
313
- name: 'CSS',
314
- icon: 'fab css3-alt'
315
- };
316
- }
317
- else if (type.match(/text\/plain/)) {
318
- FileType = {
319
- name: 'テキスト',
320
- icon: 'file-lines'
321
- };
322
- }
323
- useEffect(function () {
324
- if (val_edit) {
325
- setTimeout(function () {
326
- $('#' + FileID)[0].focus();
327
- }, 100);
328
- }
329
- }, [val_edit]);
330
- return (React.createElement(_export_2.Flex, { verticalAlign: 'center', flexWrap: false, gap: 1, className: className },
331
- React.createElement(_export_2.FAIcon, { fontSize: '4.thirdTitle', fontColor: 'theme', d: FileType.icon }),
332
- React.createElement(_export_2.Box, { flexSizing: 0 },
333
- React.createElement(_export_2.Box, null,
334
- React.createElement(_export_2.Flex, { verticalAlign: 'center', gap: '2/3', flexWrap: false, className: style_module_scss_1.default.FileName, children: !val_edit ? React.createElement(React.Fragment, null,
335
- fileName,
336
- fileNameEdit ?
337
- React.createElement(_export_4.Buttons.Button.Clear.R, { padding: '1/3', ssEffectsOnActive: 'expand', children: React.createElement(_export_2.FAIcon, { d: 'pen' }), onClick: function () {
338
- set_edit(true);
339
- } }) : null) : React.createElement(React.Fragment, null,
340
- React.createElement(_export_3.Column, { gap: '1/2', flexSizing: 0 },
341
- React.createElement(_export_2.Flex, { gap: '2/3', verticalAlign: 'center' },
342
- React.createElement(_export_4.Input.Text.Normal, { tone: 'border', wrapStyles: {
343
- flexSizing: 'auto'
344
- }, restrict: 'fileName', name: 'name', required: true, id: FileID, form: 'form-' + FileID, enableFormSubmit: true, value: name, onKeyDown: function (event) {
345
- var key = event.key;
346
- if (key == 'Escape')
347
- set_edit(false);
348
- } }),
349
- React.createElement(_export_2.Box, null,
350
- ". ",
351
- extension)),
352
- React.createElement(_export_2.Flex, { gap: '2/3', horizontalAlign: 'right', flexWrap: false },
353
- React.createElement(_export_4.Buttons.Button.Sub.R, { padding: ['2/3', 1], children: '閉じる', onClick: function () {
354
- set_edit(false);
355
- } }),
356
- React.createElement(_export_4.Buttons.Button.Prime.R, { padding: ['2/3', 1], submitOption: {
357
- formName: 'form-' + FileID,
358
- submitDelegationKey: 'auxEnter',
359
- callback: function (form) { return __awaiter(void 0, void 0, void 0, function () {
360
- var name, nextFiles, prevFile, id, target, dataUrl, newBlob, newFile;
361
- return __generator(this, function (_a) {
362
- switch (_a.label) {
363
- case 0:
364
- name = form.name;
365
- nextFiles = __spreadArray([], __read(val_status.dataValue), false);
366
- prevFile = nextFiles[index];
367
- id = prevFile.id;
368
- if (!prevFile)
369
- return [2 /*return*/];
370
- return [4 /*yield*/, prevFile.read()];
371
- case 1:
372
- target = (_a.sent()).target;
373
- if (!target)
374
- return [2 /*return*/];
375
- dataUrl = String(target.result);
376
- return [4 /*yield*/, dataUrl.toBlob(file.type)];
377
- case 2:
378
- newBlob = _a.sent();
379
- if (!newBlob)
380
- return [2 /*return*/];
381
- newFile = new File([newBlob], name + '.' + extension, { type: prevFile.type });
382
- newFile.id = id;
383
- nextFiles[index] = newFile;
384
- set_status(__assign(__assign({}, val_status), { dataValue: nextFiles, eventType: 'update', eventID: $.uuidGen() }));
385
- set_edit(false);
386
- return [2 /*return*/];
387
- }
388
- });
389
- }); }
390
- } }, "\u6C7A\u5B9A")))) })),
391
- !val_edit ? React.createElement(React.Fragment, null,
392
- React.createElement(_export_2.Box, { fontSize: '1.mini', fontColor: '4.thin', flexSizing: 0, children: FileType.name + 'ファイル / ' + Size + 'B' })) : null),
393
- React.createElement(_export_4.Buttons.Button.Sub.R, { ssSphere: 3, onClick: function () {
394
- var nextFiles = __spreadArray([], __read(val_status.dataValue), false);
395
- var prevFile = nextFiles[index];
396
- if (!prevFile)
397
- return;
398
- nextFiles.splice(index, 1);
399
- set_status(__assign(__assign({}, val_status), { dataValue: nextFiles, eventType: 'update', eventID: $.uuidGen() }));
400
- } },
401
- React.createElement(_export_2.FAIcon.Times, null))));
402
- };
403
- (function () { return __awaiter(void 0, void 0, void 0, function () {
404
- return __generator(this, function (_a) {
405
- $(document).addEvent({
406
- eventType: 'dragover',
407
- callback: function (event) {
408
- event.preventDefault();
409
- $('.' + style_module_scss_1.default.AddButton).addClass(style_module_scss_1.default.Draggable);
410
- },
411
- option: {
412
- passive: false
413
- }
414
- }).addEvent({
415
- eventType: 'drop',
416
- callback: function (event) {
417
- event.preventDefault();
418
- $('.' + style_module_scss_1.default.AddButton).removeClass(style_module_scss_1.default.Draggable);
419
- var Files = event.dataTransfer.files;
420
- if (Files.length) {
421
- var Target = event.target;
422
- if ($(Target).hasClass(style_module_scss_1.default.AddButton)) {
423
- var inputComponentId = Target.dataset.inputComponentId;
424
- var component = _export_1.useStore.get(inputComponentId);
425
- if (component && component.AddFiles)
426
- component.AddFiles(Files);
427
- }
428
- }
429
- },
430
- option: {
431
- passive: false
432
- }
433
- });
434
- return [2 /*return*/];
435
- });
436
- }); })();
437
- var FileInput = FileComponent;
438
- exports.FileInput = FileInput;
439
- FileInput.fn = {
440
- openDialog: function (params) {
441
- var multiple = params.multiple, accept = params.accept;
442
- return new Promise(function (resolve) {
443
- var input = document.createElement('input');
444
- input.type = 'file';
445
- input.multiple = multiple !== null && multiple !== void 0 ? multiple : true;
446
- if (accept) {
447
- if (accept == 'image')
448
- input.accept = 'image/png,image/jpeg';
449
- else
450
- input.accept = accept;
451
- }
452
- input.onchange = function (event) {
453
- resolve(event.target.files);
454
- };
455
- input.click();
456
- });
457
- }
458
- };
@@ -1 +0,0 @@
1
- export declare const HiddenInput: FNC<amotify.fn.Input.Hidden.PlainParams>;
@@ -1,30 +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
- Object.defineProperty(exports, "__esModule", { value: true });
25
- exports.HiddenInput = void 0;
26
- var HiddenInput = function (params) {
27
- var _a = params.componentID, componentID = _a === void 0 ? '' : _a, form = params.form, _b = params.value, value = _b === void 0 ? '' : _b, others = __rest(params, ["componentID", "form", "value"]);
28
- return (React.createElement("input", __assign({ value: JSON.stringify(value), "data-input-type": 'hidden', "data-form": form, "data-component-id": componentID, "data-value": JSON.stringify(value) }, others, { type: 'hidden' })));
29
- };
30
- exports.HiddenInput = HiddenInput;
@@ -1 +0,0 @@
1
- export declare const ListInput: FNC<amotify.fn.Input.List.OriginParams>;