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,51 +1,37 @@
1
- import {
2
- React,
3
- } from '~/Global/@export';
4
- const {
5
- useEffect,
6
- useState
7
- } = React;
1
+ // import {
2
+ // React,
3
+ // } from '@global';
4
+ // const {
5
+ // useEffect,
6
+ // useState
7
+ // } = React;
8
8
 
9
9
  import {
10
10
  Box
11
- } from '~/Atoms/@export';
12
- import {
13
- Column,
14
- Row,
15
- Text
16
- } from '~/Molecules/@export';
17
- import {
18
- DisplayStyleInput
19
- } from '~/Organisms/@export';
11
+ } from '@atoms';
12
+ // import {
13
+ // Column
14
+ // } from '@mols';
20
15
 
21
- import {
22
- Buttons,
23
- Input,
24
- Inputs
25
- } from '~/Functions/@export';
16
+ // import {
17
+ // Buttons,
18
+ // Input,
19
+ // Inputs
20
+ // } from '@fn';
26
21
 
27
22
  import style from './style.module.scss';
28
23
 
29
24
  export const PlayGround: FNC<{}> = () => {
30
25
  return ( <>
31
- <Column
26
+ <Box
27
+ padding={ 2 }
28
+ backgroundColor='cloud'
29
+ >
30
+ AAAA
31
+ </Box>
32
+ {/* <Column
32
33
  gap={ 2 }
33
34
  >
34
- <DisplayStyleInput.Darkmode
35
- onUpdate={ ( value ) => {
36
- amotify.config.update.darkMode( value );
37
- } }
38
- />
39
- <DisplayStyleInput.ThemeColor.Originals
40
- onUpdate={ ( value ) => {
41
- amotify.config.update.themeColor( value );
42
- } }
43
- />
44
- <DisplayStyleInput.ThemeColor.Brands
45
- onUpdate={ ( value ) => {
46
- amotify.config.update.themeColor( value );
47
- } }
48
- />
49
35
  <Input.Text.Normal
50
36
  />
51
37
  <Input.Select
@@ -105,12 +91,12 @@ export const PlayGround: FNC<{}> = () => {
105
91
  unitWidth={ 6 }
106
92
  />
107
93
  </Box>
108
- {/* <Input.Select
94
+ <Input.Select
109
95
  name='test-segmented'
110
96
  form='test'
111
97
  required
112
98
  list={ val_select }
113
- /> */}
114
- </Column>
99
+ />
100
+ </Column> */}
115
101
  </> );
116
102
  }
@@ -1,4 +1,4 @@
1
- @use 'src/@styles/props' as *;
1
+ @use '@props' as *;
2
2
  .TestAnimation {
3
3
  animation: .25s ease-in-out jiggly infinite;
4
4
  cursor: grab;
package/tsconfig.json CHANGED
@@ -15,13 +15,29 @@
15
15
  "~/*": [
16
16
  "src/*"
17
17
  ],
18
+ "@uniVar": [
19
+ "src/@styles/props"
20
+ ],
21
+ "@brandVar": [
22
+ "src/@styles/brand"
23
+ ],
24
+ "@styleSet": [
25
+ "src/@styles/styleSet"
26
+ ],
27
+
28
+ "@global": [ "src/@global" ],
29
+ "@atoms": [ "src/@atoms" ],
30
+ "@mols": [ "src/@molecules" ],
31
+ "@orgs": [ "src/@organisms" ],
32
+ "@temps": [ "src/@templates" ],
33
+ "@fn": [ "src/@functions" ],
18
34
  },
19
35
  "strict": true,
20
36
  "skipLibCheck": true,
21
37
  "forceConsistentCasingInFileNames": true,
22
38
  "downlevelIteration": true,
23
39
  "allowJs": true,
24
- "declaration": true,
40
+ "declaration": false,
25
41
  // "emitDeclarationOnly": true,
26
42
  "outDir": "./dist",
27
43
  "noImplicitAny": true,
@@ -35,9 +51,7 @@
35
51
  },
36
52
  "exclude": [
37
53
  "node_modules",
38
- "public"
39
- ],
40
- "include": [
41
- "src/launch.tsx"
54
+ "public/*",
55
+ "dist/*"
42
56
  ]
43
57
  }
package/webpack.config.js CHANGED
@@ -24,7 +24,7 @@ module.exports = ( () => {
24
24
  entry: entry,
25
25
  output: {
26
26
  filename: '[name].js',
27
- path: __dirname + '/public/',
27
+ path: __dirname + '/dist/',
28
28
  devtoolModuleFilenameTemplate: 'src/[resource-path]'
29
29
  },
30
30
  optimization: {
@@ -98,7 +98,18 @@ module.exports = ( () => {
98
98
  modules: [ 'node_modules' ],
99
99
  extensions: [ '.js', '.jsx', '.tsx', 'ts' ],
100
100
  alias: {
101
- '~': `${ __dirname }/src`
101
+ '~': `${ __dirname }/src`,
102
+
103
+ '@props': path.resolve( __dirname, 'src/@styles/props' ),
104
+ '@brandVar': path.resolve( __dirname, 'src/@styles/brand' ),
105
+ '@styleSet': path.resolve( __dirname, 'src/@styles/styleSet' ),
106
+
107
+ '@global': path.resolve( __dirname, 'src/@global' ),
108
+ '@atoms': path.resolve( __dirname, 'src/@atoms' ),
109
+ '@mols': path.resolve( __dirname, 'src/@molecules' ),
110
+ '@orgs': path.resolve( __dirname, 'src/@organisms' ),
111
+ '@temps': path.resolve( __dirname, 'src/@templates' ),
112
+ '@fn': path.resolve( __dirname, 'src/@functions' ),
102
113
  }
103
114
  },
104
115
  }
@@ -1,4 +0,0 @@
1
- import './variables';
2
- import './fetch';
3
- import './formCollect';
4
- import './spreadSheet';
@@ -1,6 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- require("./variables");
4
- require("./fetch");
5
- require("./formCollect");
6
- require("./spreadSheet");
@@ -1,9 +0,0 @@
1
- declare const fetcher: (params: {
2
- key: string;
3
- topLoader?: boolean | undefined;
4
- cornerLoader?: boolean | undefined;
5
- trafficControl?: number | undefined;
6
- preventMultiRequest?: boolean | undefined;
7
- } & Omit<Jsmin.Fetch.Input, "method"> & {
8
- method: string;
9
- }, callback?: JsminExtension.Fetch.callback | undefined) => Promise<Jsmin.Fetch.Output>;
@@ -1,199 +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 fetcher = function (params, callback) { return __awaiter(void 0, void 0, void 0, function () {
86
- var _a, method, _b, key, _c, url, _d, trafficControl, _e,
87
- // trafficControl = 1000,
88
- preventMultiRequest, _f, topLoader, _g, cornerLoader, Params, result;
89
- return __generator(this, function (_h) {
90
- switch (_h.label) {
91
- case 0:
92
- _a = params || {}, method = _a.method, _b = _a.key, key = _b === void 0 ? $.uuidGen(16) : _b, _c = _a.url, url = _c === void 0 ? '' : _c, _d = _a.trafficControl, trafficControl = _d === void 0 ? 500 : _d, _e = _a.preventMultiRequest, preventMultiRequest = _e === void 0 ? true : _e, _f = _a.topLoader, topLoader = _f === void 0 ? false : _f, _g = _a.cornerLoader, cornerLoader = _g === void 0 ? true : _g, Params = __rest(_a, ["method", "key", "url", "trafficControl", "preventMultiRequest", "topLoader", "cornerLoader"]);
93
- return [4 /*yield*/, (function () { return __awaiter(void 0, void 0, void 0, function () {
94
- var exist, result, requestTime, CoolDownTime_1;
95
- return __generator(this, function (_a) {
96
- switch (_a.label) {
97
- case 0:
98
- exist = $.fetch.waitList.includes(key);
99
- if (preventMultiRequest && exist) {
100
- return [2 /*return*/, {
101
- ok: false,
102
- status: 405,
103
- statusText: 'NoAcceptedMultiRequests',
104
- body: 'NoAcceptedMultiRequests',
105
- requestTime: 0,
106
- rawData: null
107
- }];
108
- }
109
- $.fetch.waitList = __spreadArray(__spreadArray([], __read($.fetch.waitList), false), [key], false);
110
- if (!url.match(/https?:/)) {
111
- url = '/' + url.replace(/^\//, "");
112
- Params.headers = __assign(__assign({}, $.fetch.defaultHeaders || {}), Params.headers || {});
113
- }
114
- amotify.fn.Loader.fn.mini.active(params.key || '');
115
- !topLoader || amotify.fn.Loader.fn.top.active();
116
- !cornerLoader || amotify.fn.Loader.fn.corner.active();
117
- return [4 /*yield*/, $.ajax(__assign({ method: method, url: url }, Params))];
118
- case 1:
119
- result = _a.sent();
120
- if ($.fetch.defaultResultCallback)
121
- $.fetch.defaultResultCallback(result);
122
- if (!trafficControl) return [3 /*break*/, 3];
123
- requestTime = result.requestTime;
124
- if (!(requestTime <= trafficControl)) return [3 /*break*/, 3];
125
- CoolDownTime_1 = Number(trafficControl - requestTime);
126
- return [4 /*yield*/, (function () {
127
- result.requestTime = trafficControl;
128
- return new Promise(function (resolve, reject) {
129
- setTimeout(function () {
130
- resolve(void 0);
131
- }, CoolDownTime_1);
132
- });
133
- })()];
134
- case 2:
135
- _a.sent();
136
- _a.label = 3;
137
- case 3:
138
- amotify.fn.Loader.fn.mini.stop(params.key || '');
139
- !topLoader || amotify.fn.Loader.fn.top.stop();
140
- !cornerLoader || amotify.fn.Loader.fn.corner.stop();
141
- $.fetch.waitList.splice($.fetch.waitList.findIndex(function (a) { return a == key; }), 1);
142
- return [2 /*return*/, result];
143
- }
144
- });
145
- }); })()];
146
- case 1:
147
- result = _h.sent();
148
- if (callback)
149
- callback(result);
150
- return [2 /*return*/, result];
151
- }
152
- });
153
- }); };
154
- $.fetch = {
155
- get: function (params, callback) { return __awaiter(void 0, void 0, void 0, function () {
156
- return __generator(this, function (_a) {
157
- switch (_a.label) {
158
- case 0: return [4 /*yield*/, fetcher(__assign(__assign({}, params), { method: 'get' }), callback)];
159
- case 1: return [2 /*return*/, _a.sent()];
160
- }
161
- });
162
- }); },
163
- post: function (params, callback) { return __awaiter(void 0, void 0, void 0, function () {
164
- return __generator(this, function (_a) {
165
- switch (_a.label) {
166
- case 0: return [4 /*yield*/, fetcher(__assign(__assign({}, params), { method: 'post' }), callback)];
167
- case 1: return [2 /*return*/, _a.sent()];
168
- }
169
- });
170
- }); },
171
- options: function (params, callback) { return __awaiter(void 0, void 0, void 0, function () {
172
- return __generator(this, function (_a) {
173
- switch (_a.label) {
174
- case 0: return [4 /*yield*/, fetcher(__assign(__assign({}, params), { method: 'options' }), callback)];
175
- case 1: return [2 /*return*/, _a.sent()];
176
- }
177
- });
178
- }); },
179
- put: function (params, callback) { return __awaiter(void 0, void 0, void 0, function () {
180
- return __generator(this, function (_a) {
181
- switch (_a.label) {
182
- case 0: return [4 /*yield*/, fetcher(__assign(__assign({}, params), { method: 'put' }), callback)];
183
- case 1: return [2 /*return*/, _a.sent()];
184
- }
185
- });
186
- }); },
187
- waitList: [],
188
- defaultHeaders: {},
189
- defaultResultCallback: function (result) {
190
- var status = result.status, statusText = result.statusText;
191
- if (status == 500) {
192
- $.NoticeHttpStatus({
193
- status: status,
194
- statusText: statusText,
195
- label: React.createElement(React.Fragment, null, "Internal Server Error")
196
- });
197
- }
198
- }
199
- };
@@ -1 +0,0 @@
1
- export {};
@@ -1,137 +0,0 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- var __generator = (this && this.__generator) || function (thisArg, body) {
12
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
13
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
- function verb(n) { return function (v) { return step([n, v]); }; }
15
- function step(op) {
16
- if (f) throw new TypeError("Generator is already executing.");
17
- while (_) try {
18
- 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;
19
- if (y = 0, t) op = [op[0] & 2, t.value];
20
- switch (op[0]) {
21
- case 0: case 1: t = op; break;
22
- case 4: _.label++; return { value: op[1], done: false };
23
- case 5: _.label++; y = op[1]; op = [0]; continue;
24
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
25
- default:
26
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
27
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
28
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
29
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
30
- if (t[2]) _.ops.pop();
31
- _.trys.pop(); continue;
32
- }
33
- op = body.call(thisArg, _);
34
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
35
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
36
- }
37
- };
38
- Object.defineProperty(exports, "__esModule", { value: true });
39
- var _export_1 = require("../Global/@export");
40
- var formProcess = false;
41
- $.formCollect = function (form) { return __awaiter(void 0, void 0, void 0, function () {
42
- var focusElement, Inputs, totalValid, Values, index, Input, _a, componentId, componentData, _b, displayValue, name_1, checked, _c, value, _d, inputType, validation, Value, files, valid;
43
- return __generator(this, function (_e) {
44
- switch (_e.label) {
45
- case 0:
46
- if (formProcess)
47
- return [2 /*return*/, {
48
- valid: false,
49
- data: {}
50
- }];
51
- focusElement = document.activeElement;
52
- if (focusElement)
53
- focusElement.blur();
54
- formProcess = true;
55
- Inputs = $("[data-form=\"".concat(form, "\"]")), totalValid = 1, Values = {};
56
- index = 0;
57
- _e.label = 1;
58
- case 1:
59
- if (!(index < Inputs.length)) return [3 /*break*/, 5];
60
- Input = Inputs[index];
61
- _a = Input.dataset.componentId, componentId = _a === void 0 ? '' : _a;
62
- componentData = _export_1.useStore.get(componentId);
63
- if (!(componentData && componentData.Refresh)) return [3 /*break*/, 3];
64
- return [4 /*yield*/, componentData.Refresh()];
65
- case 2:
66
- _e.sent();
67
- _e.label = 3;
68
- case 3:
69
- _b = Inputs[index], displayValue = _b.value, name_1 = _b.name, checked = _b.checked, _c = _b.dataset, value = _c.value, _d = _c.inputType, inputType = _d === void 0 ? '' : _d, validation = _c.validation;
70
- Value = value;
71
- validation = Number((validation !== null && validation !== void 0 ? validation : 'true') == 'true');
72
- if (inputType == 'hidden') {
73
- if (Value)
74
- Value = JSON.parse(Value);
75
- }
76
- else if (['radio', 'checkbox', 'checker'].includes(inputType)) {
77
- if (Value) {
78
- Value = JSON.parse(Value);
79
- if ($.is.array(Value)) {
80
- Value = Value.map(function (v) { return JSON.parse(v); });
81
- }
82
- else {
83
- Value = JSON.parse(Value);
84
- }
85
- if (inputType == 'radio') {
86
- Value = Value[0];
87
- }
88
- if (inputType == 'checker') {
89
- Value = Boolean(Value[0]);
90
- }
91
- }
92
- }
93
- else if (['chips-single', 'chips-multi'].includes(inputType)) {
94
- Value = JSON.parse(Value);
95
- if (Value.length) {
96
- if (inputType == 'chips-single')
97
- Value = Value[0];
98
- }
99
- }
100
- else if (inputType == 'time') {
101
- if (Value)
102
- Value = JSON.parse(Value);
103
- }
104
- else if (inputType == 'select') {
105
- if (Value)
106
- Value = JSON.parse(Value);
107
- }
108
- else if (inputType == 'file') {
109
- if (componentData) {
110
- files = componentData.Files;
111
- Value = files;
112
- }
113
- }
114
- else if (inputType == 'slider') {
115
- if (Value)
116
- Value = JSON.parse(Value);
117
- }
118
- else if (inputType == 'switch') {
119
- Value = checked | 0;
120
- }
121
- valid = (validation !== null && validation !== void 0 ? validation : 1) | 0;
122
- totalValid &= valid;
123
- if (validation)
124
- Values[name_1] = Value;
125
- _e.label = 4;
126
- case 4:
127
- index++;
128
- return [3 /*break*/, 1];
129
- case 5:
130
- formProcess = false;
131
- return [2 /*return*/, {
132
- valid: Boolean(totalValid),
133
- data: Values
134
- }];
135
- }
136
- });
137
- }); };
@@ -1,4 +0,0 @@
1
- export {};
2
- declare global {
3
- var ExcelJS: any;
4
- }