amotify 0.0.0

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 (148) hide show
  1. package/dist/@comps/@core/bios.d.ts +14 -0
  2. package/dist/@comps/@core/bios.js +228 -0
  3. package/dist/@comps/@core/exe.d.ts +9 -0
  4. package/dist/@comps/@core/exe.js +12 -0
  5. package/dist/@comps/@core/jsminAmotifyExtension/_.d.ts +4 -0
  6. package/dist/@comps/@core/jsminAmotifyExtension/_.js +6 -0
  7. package/dist/@comps/@core/jsminAmotifyExtension/fetch.d.ts +9 -0
  8. package/dist/@comps/@core/jsminAmotifyExtension/fetch.js +199 -0
  9. package/dist/@comps/@core/jsminAmotifyExtension/formCollect.d.ts +1 -0
  10. package/dist/@comps/@core/jsminAmotifyExtension/formCollect.js +137 -0
  11. package/dist/@comps/@core/jsminAmotifyExtension/spreadSheet.d.ts +4 -0
  12. package/dist/@comps/@core/jsminAmotifyExtension/spreadSheet.js +314 -0
  13. package/dist/@comps/@core/jsminAmotifyExtension/variables.d.ts +0 -0
  14. package/dist/@comps/@core/jsminAmotifyExtension/variables.js +186 -0
  15. package/dist/@comps/@core/styleConverter.d.ts +2 -0
  16. package/dist/@comps/@core/styleConverter.js +349 -0
  17. package/dist/@comps/Atoms/@export.d.ts +4 -0
  18. package/dist/@comps/Atoms/@export.js +29 -0
  19. package/dist/@comps/Atoms/FAIcon/parts.d.ts +2 -0
  20. package/dist/@comps/Atoms/FAIcon/parts.js +153 -0
  21. package/dist/@comps/Atoms/Logo/parts.d.ts +1 -0
  22. package/dist/@comps/Atoms/Logo/parts.js +154 -0
  23. package/dist/@comps/Atoms/Various/parts.d.ts +9 -0
  24. package/dist/@comps/Atoms/Various/parts.js +113 -0
  25. package/dist/@comps/Functions/@export.d.ts +12 -0
  26. package/dist/@comps/Functions/@export.js +38 -0
  27. package/dist/@comps/Functions/Button/_.d.ts +1 -0
  28. package/dist/@comps/Functions/Button/_.js +270 -0
  29. package/dist/@comps/Functions/Cropper/parts.d.ts +1 -0
  30. package/dist/@comps/Functions/Cropper/parts.js +783 -0
  31. package/dist/@comps/Functions/Effects/Fade.d.ts +1 -0
  32. package/dist/@comps/Functions/Effects/Fade.js +80 -0
  33. package/dist/@comps/Functions/Effects/Ripple.d.ts +1 -0
  34. package/dist/@comps/Functions/Effects/Ripple.js +107 -0
  35. package/dist/@comps/Functions/Effects/_.d.ts +3 -0
  36. package/dist/@comps/Functions/Effects/_.js +43 -0
  37. package/dist/@comps/Functions/Input/Chips/Selector.d.ts +1 -0
  38. package/dist/@comps/Functions/Input/Chips/Selector.js +356 -0
  39. package/dist/@comps/Functions/Input/Chips/_.d.ts +2 -0
  40. package/dist/@comps/Functions/Input/Chips/_.js +218 -0
  41. package/dist/@comps/Functions/Input/DigitCharacters.d.ts +1 -0
  42. package/dist/@comps/Functions/Input/DigitCharacters.js +178 -0
  43. package/dist/@comps/Functions/Input/File/_.d.ts +2 -0
  44. package/dist/@comps/Functions/Input/File/_.js +458 -0
  45. package/dist/@comps/Functions/Input/Hidden.d.ts +1 -0
  46. package/dist/@comps/Functions/Input/Hidden.js +30 -0
  47. package/dist/@comps/Functions/Input/List/_.d.ts +1 -0
  48. package/dist/@comps/Functions/Input/List/_.js +232 -0
  49. package/dist/@comps/Functions/Input/Segmented/_.d.ts +1 -0
  50. package/dist/@comps/Functions/Input/Segmented/_.js +111 -0
  51. package/dist/@comps/Functions/Input/Select/_.d.ts +1 -0
  52. package/dist/@comps/Functions/Input/Select/_.js +154 -0
  53. package/dist/@comps/Functions/Input/Slider/_.d.ts +1 -0
  54. package/dist/@comps/Functions/Input/Slider/_.js +308 -0
  55. package/dist/@comps/Functions/Input/Switch/_.d.ts +1 -0
  56. package/dist/@comps/Functions/Input/Switch/_.js +120 -0
  57. package/dist/@comps/Functions/Input/Text.d.ts +5 -0
  58. package/dist/@comps/Functions/Input/Text.js +340 -0
  59. package/dist/@comps/Functions/Input/TextArea.d.ts +1 -0
  60. package/dist/@comps/Functions/Input/TextArea.js +98 -0
  61. package/dist/@comps/Functions/Input/Time/Picker.d.ts +1 -0
  62. package/dist/@comps/Functions/Input/Time/Picker.js +581 -0
  63. package/dist/@comps/Functions/Input/Time/_.d.ts +2 -0
  64. package/dist/@comps/Functions/Input/Time/_.js +567 -0
  65. package/dist/@comps/Functions/Input/_.d.ts +5 -0
  66. package/dist/@comps/Functions/Input/_.js +446 -0
  67. package/dist/@comps/Functions/Input/core.d.ts +34 -0
  68. package/dist/@comps/Functions/Input/core.js +324 -0
  69. package/dist/@comps/Functions/Inputs/_.d.ts +3 -0
  70. package/dist/@comps/Functions/Inputs/_.js +7 -0
  71. package/dist/@comps/Functions/Inputs/text.d.ts +12 -0
  72. package/dist/@comps/Functions/Inputs/text.js +46 -0
  73. package/dist/@comps/Functions/Layout/PageNotFound.d.ts +1 -0
  74. package/dist/@comps/Functions/Layout/PageNotFound.js +30 -0
  75. package/dist/@comps/Functions/Layout/PageRouter.d.ts +2 -0
  76. package/dist/@comps/Functions/Layout/PageRouter.js +65 -0
  77. package/dist/@comps/Functions/Layout/PageViewController/parts.d.ts +1 -0
  78. package/dist/@comps/Functions/Layout/PageViewController/parts.js +30 -0
  79. package/dist/@comps/Functions/Layout/Plate.d.ts +1 -0
  80. package/dist/@comps/Functions/Layout/Plate.js +39 -0
  81. package/dist/@comps/Functions/Layout/RootViewController/parts.d.ts +1 -0
  82. package/dist/@comps/Functions/Layout/RootViewController/parts.js +202 -0
  83. package/dist/@comps/Functions/Layout/SwipeView/parts.d.ts +2 -0
  84. package/dist/@comps/Functions/Layout/SwipeView/parts.js +319 -0
  85. package/dist/@comps/Functions/Layout/TabBar.d.ts +1 -0
  86. package/dist/@comps/Functions/Layout/TabBar.js +49 -0
  87. package/dist/@comps/Functions/Layout/_.d.ts +2 -0
  88. package/dist/@comps/Functions/Layout/_.js +20 -0
  89. package/dist/@comps/Functions/Loader/corner.d.ts +1 -0
  90. package/dist/@comps/Functions/Loader/corner.js +59 -0
  91. package/dist/@comps/Functions/Loader/mini.d.ts +33 -0
  92. package/dist/@comps/Functions/Loader/mini.js +126 -0
  93. package/dist/@comps/Functions/Loader/parts.d.ts +3 -0
  94. package/dist/@comps/Functions/Loader/parts.js +108 -0
  95. package/dist/@comps/Functions/Loader/top.d.ts +1 -0
  96. package/dist/@comps/Functions/Loader/top.js +69 -0
  97. package/dist/@comps/Functions/Sheet/parts.d.ts +2 -0
  98. package/dist/@comps/Functions/Sheet/parts.js +724 -0
  99. package/dist/@comps/Functions/SnackBar/parts.d.ts +2 -0
  100. package/dist/@comps/Functions/SnackBar/parts.js +171 -0
  101. package/dist/@comps/Functions/Table/Data/parts.d.ts +3 -0
  102. package/dist/@comps/Functions/Table/Data/parts.js +629 -0
  103. package/dist/@comps/Functions/Table/Drag/parts.d.ts +1 -0
  104. package/dist/@comps/Functions/Table/Drag/parts.js +359 -0
  105. package/dist/@comps/Functions/Table/Normal/parts.d.ts +1 -0
  106. package/dist/@comps/Functions/Table/Normal/parts.js +92 -0
  107. package/dist/@comps/Functions/Table/_.d.ts +9 -0
  108. package/dist/@comps/Functions/Table/_.js +153 -0
  109. package/dist/@comps/Functions/Tooltips/parts.d.ts +2 -0
  110. package/dist/@comps/Functions/Tooltips/parts.js +71 -0
  111. package/dist/@comps/Molecules/@export.d.ts +21 -0
  112. package/dist/@comps/Molecules/@export.js +50 -0
  113. package/dist/@comps/Molecules/Accordion/parts.d.ts +2 -0
  114. package/dist/@comps/Molecules/Accordion/parts.js +165 -0
  115. package/dist/@comps/Molecules/LinkifyText/parts.d.ts +1 -0
  116. package/dist/@comps/Molecules/LinkifyText/parts.js +39 -0
  117. package/dist/@comps/Molecules/List.d.ts +1 -0
  118. package/dist/@comps/Molecules/List.js +35 -0
  119. package/dist/@comps/Organisms/@export.d.ts +2 -0
  120. package/dist/@comps/Organisms/@export.js +9 -0
  121. package/dist/@comps/Organisms/DisplayStyleInput/_.d.ts +1 -0
  122. package/dist/@comps/Organisms/DisplayStyleInput/_.js +15 -0
  123. package/dist/@comps/Organisms/DisplayStyleInput/darkmode.d.ts +1 -0
  124. package/dist/@comps/Organisms/DisplayStyleInput/darkmode.js +77 -0
  125. package/dist/@comps/Organisms/DisplayStyleInput/themeColor.d.ts +27 -0
  126. package/dist/@comps/Organisms/DisplayStyleInput/themeColor.js +185 -0
  127. package/dist/@comps/Templates/@export.d.ts +2 -0
  128. package/dist/@comps/Templates/@export.js +9 -0
  129. package/dist/@comps/Templates/PlayGround/parts.d.ts +1 -0
  130. package/dist/@comps/Templates/PlayGround/parts.js +55 -0
  131. package/dist/@types/_.d.ts +6 -0
  132. package/dist/@types/_.js +8 -0
  133. package/dist/@types/amot.d.ts +260 -0
  134. package/dist/@types/amot.js +2 -0
  135. package/dist/@types/fn.d.ts +1040 -0
  136. package/dist/@types/fn.js +2 -0
  137. package/dist/@types/index.d.ts +59 -0
  138. package/dist/@types/index.js +2 -0
  139. package/dist/@types/jsminAmotifyExtension.d.ts +134 -0
  140. package/dist/@types/jsminAmotifyExtension.js +2 -0
  141. package/dist/@types/module.d.ts +2 -0
  142. package/dist/@types/module.js +1 -0
  143. package/dist/@types/state.d.ts +145 -0
  144. package/dist/@types/state.js +2 -0
  145. package/dist/launch.d.ts +3 -0
  146. package/dist/launch.js +282 -0
  147. package/package.json +65 -0
  148. package/tsconfig.json +48 -0
@@ -0,0 +1,581 @@
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 __read = (this && this.__read) || function (o, n) {
14
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
15
+ if (!m) return o;
16
+ var i = m.call(o), r, ar = [], e;
17
+ try {
18
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
19
+ }
20
+ catch (error) { e = { error: error }; }
21
+ finally {
22
+ try {
23
+ if (r && !r.done && (m = i["return"])) m.call(i);
24
+ }
25
+ finally { if (e) throw e.error; }
26
+ }
27
+ return ar;
28
+ };
29
+ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
30
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
31
+ if (ar || !(i in from)) {
32
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
33
+ ar[i] = from[i];
34
+ }
35
+ }
36
+ return to.concat(ar || Array.prototype.slice.call(from));
37
+ };
38
+ var __importDefault = (this && this.__importDefault) || function (mod) {
39
+ return (mod && mod.__esModule) ? mod : { "default": mod };
40
+ };
41
+ Object.defineProperty(exports, "__esModule", { value: true });
42
+ exports.Picker = void 0;
43
+ var _global_1 = require("@global");
44
+ var _atoms_1 = require("@atoms");
45
+ var _mols_1 = require("@mols");
46
+ var _functions_1 = require("@functions");
47
+ var useEffect = _global_1.React.useEffect, useRef = _global_1.React.useRef, useState = _global_1.React.useState;
48
+ var style_module_scss_1 = __importDefault(require("./style.module.scss"));
49
+ var YearOptions = function (params) {
50
+ var _a, _b;
51
+ var Years = [];
52
+ var minYear = Number((_a = params === null || params === void 0 ? void 0 : params.min) !== null && _a !== void 0 ? _a : 1900);
53
+ var maxYear = Number((_b = params === null || params === void 0 ? void 0 : params.max) !== null && _b !== void 0 ? _b : $.Time().addYear(10).year);
54
+ for (var year = minYear; year <= maxYear; year++) {
55
+ Years.push({
56
+ value: year,
57
+ label: __spreadArray([year], __read($.transformer.wareki(year).value), false).join(' - '),
58
+ // displayLabel: year + '年'
59
+ });
60
+ }
61
+ return Years;
62
+ };
63
+ var Picker = function (params) {
64
+ var restrict = params.restrict, _a = params.defaultValue, defaultValue = _a === void 0 ? '' : _a;
65
+ params.tipsID = params.tipsID || $.uuidGen();
66
+ var mounted = useRef(false);
67
+ var _b = __read(useState((function () {
68
+ var _a, _b, _c;
69
+ var _d;
70
+ if (restrict == 'clock') {
71
+ var partValues = String(defaultValue).split(/[^\d]/);
72
+ if (!partValues[0])
73
+ partValues = [0, 0];
74
+ var hour = Number(partValues[0]);
75
+ var minutes = Number(partValues[1]);
76
+ return {
77
+ modifiedType: 'init',
78
+ hour: hour,
79
+ minutes: minutes
80
+ };
81
+ }
82
+ else if (restrict == 'date') {
83
+ var _e = __read((_d = String(defaultValue)) === null || _d === void 0 ? void 0 : _d.split(/\D/), 3), year = _e[0], month = _e[1], date = _e[2];
84
+ if ($.is.nullish(year) || $.is.nullish(month) || $.is.nullish(date)) {
85
+ _a = __read($.Time().toFormat('%Y-%M-%D').split('-'), 3), year = _a[0], month = _a[1], date = _a[2];
86
+ }
87
+ return {
88
+ modifiedType: 'init',
89
+ year: Number(year),
90
+ month: Number(month),
91
+ date: Number(date)
92
+ };
93
+ }
94
+ else if (restrict == 'week') {
95
+ }
96
+ else if (restrict == 'month') {
97
+ var _f = __read(String(defaultValue).split(/\D/), 2), year = _f[0], month = _f[1];
98
+ if ($.is.nullish(year) || $.is.nullish(month)) {
99
+ _b = __read($.Time().toFormat('%Y-%M').split('-'), 2), year = _b[0], month = _b[1];
100
+ }
101
+ return {
102
+ modifiedType: 'init',
103
+ year: Number(year),
104
+ month: Number(month)
105
+ };
106
+ }
107
+ else if (restrict == 'year') {
108
+ var _g = __read(String(defaultValue).split(/\D/), 1), year = _g[0];
109
+ if ($.is.nullish(year)) {
110
+ _c = __read($.Time().toFormat('%Y').split('-'), 1), year = _c[0];
111
+ }
112
+ return {
113
+ modifiedType: 'init',
114
+ year: Number(year)
115
+ };
116
+ }
117
+ return {};
118
+ })()), 2), val_value = _b[0], set_value = _b[1];
119
+ useEffect(function () {
120
+ if (mounted.current) {
121
+ if (val_value.modifiedType == 'update') {
122
+ var sendValue = '';
123
+ if (restrict == 'clock') {
124
+ var _a = val_value, hour = _a.hour, minutes = _a.minutes;
125
+ sendValue = [
126
+ hour.zeroEmbed(2),
127
+ minutes.zeroEmbed(2)
128
+ ].join('/');
129
+ }
130
+ else if (restrict == 'date') {
131
+ var _b = val_value, year = _b.year, month = _b.month, date = _b.date;
132
+ sendValue = [
133
+ year,
134
+ month.zeroEmbed(2),
135
+ date.zeroEmbed(2)
136
+ ].join('/');
137
+ }
138
+ else if (restrict == 'week') {
139
+ }
140
+ else if (restrict == 'month') {
141
+ var _c = val_value, year = _c.year, month = _c.month;
142
+ sendValue = [
143
+ year,
144
+ month.zeroEmbed(2)
145
+ ].join('/');
146
+ }
147
+ else if (restrict == 'year') {
148
+ var year = val_value.year;
149
+ sendValue = String(year);
150
+ }
151
+ params.onValueUpdate(sendValue);
152
+ }
153
+ }
154
+ else {
155
+ mounted.current = true;
156
+ }
157
+ }, [val_value]);
158
+ var Params = __assign(__assign({}, params), { val_value: val_value, set_value: set_value });
159
+ return (_global_1.React.createElement(_atoms_1.Box, { backgroundColor: '1.layer.base', borderRadius: '2.tone.secondary', boxShadow: 3, border: true, overflow: 'hidden' },
160
+ _global_1.React.createElement(_atoms_1.Box, { overflow: 'auto', className: style_module_scss_1.default[restrict.toCapital() + 'Base'], children: restrict == 'clock' ? _global_1.React.createElement(Comps.Clock._, __assign({}, Params))
161
+ : restrict == 'date' ? _global_1.React.createElement(Comps.Date._, __assign({}, Params))
162
+ : restrict == 'week' ? ''
163
+ : restrict == 'month' ? _global_1.React.createElement(Comps.Month._, __assign({}, Params))
164
+ : restrict == 'year' ? _global_1.React.createElement(Comps.Year._, __assign({}, Params))
165
+ : restrict == 'dates' ? ''
166
+ : restrict == 'months' ? ''
167
+ : restrict == 'dateWareki' ? ''
168
+ : _global_1.React.createElement(_global_1.React.Fragment, null) })));
169
+ };
170
+ exports.Picker = Picker;
171
+ var Comps = {
172
+ Clock: {
173
+ _: function (params) {
174
+ var min = params.min, max = params.max, onValueUpdate = params.onValueUpdate, tipsID = params.tipsID, val_value = params.val_value, set_value = params.set_value;
175
+ var _a = __read(useState(val_value.hour > 12 ? 2 : 1), 2), val_ampm = _a[0], set_ampm = _a[1];
176
+ var _b = __read(useState(Number(localStorage.getItem('timePickerUnit') || 5)), 2), val_unit = _b[0], set_unit = _b[1];
177
+ useEffect(function () {
178
+ localStorage.setItem('timePickerUnit', String(val_unit));
179
+ }, [val_unit]);
180
+ var hour = val_value.hour, minutes = val_value.minutes;
181
+ return (_global_1.React.createElement(_mols_1.Column, { padding: 1 },
182
+ _global_1.React.createElement(_atoms_1.Flex, { flexType: 'row', flexWrap: false, gap: 1, className: style_module_scss_1.default.Body },
183
+ _global_1.React.createElement(_mols_1.Column, { className: style_module_scss_1.default.DesignSide, flexSizing: 0 },
184
+ _global_1.React.createElement(_atoms_1.Box, { className: style_module_scss_1.default.ClockUiBase, padding: [1, '2/3'], flexCenter: true },
185
+ _global_1.React.createElement(_atoms_1.Box, { className: style_module_scss_1.default.ClockUi, backgroundColor: 'tcOpLow', isRounded: true, position: 'relative' },
186
+ _global_1.React.createElement(_atoms_1.Box, { position: 'absolute', backgroundColor: 'theme', unitWidth: '1/12', className: [
187
+ style_module_scss_1.default.Needle,
188
+ style_module_scss_1.default.hour
189
+ ].join(' '), freeCSS: {
190
+ transform: "rotate(".concat(hour * 30 + minutes / 2, "deg)")
191
+ } }),
192
+ _global_1.React.createElement(_atoms_1.Box, { position: 'absolute', backgroundColor: 'theme', unitWidth: '1/12', className: [
193
+ style_module_scss_1.default.Needle,
194
+ style_module_scss_1.default.minute
195
+ ].join(' '), freeCSS: {
196
+ transform: "rotate(".concat(minutes * 6, "deg)")
197
+ } }))),
198
+ _global_1.React.createElement(_functions_1.Input.Radio, { tone: 'plain', icon: true, value: [val_ampm], options: [
199
+ { value: 1, label: 'AM' },
200
+ { value: 2, label: 'PM' }
201
+ ], flexType: 'col', gap: 0, cellStyles: {
202
+ padding: '1/2',
203
+ horizontalAlign: 'between',
204
+ gap: '1/3'
205
+ }, tabIndex: -1, onUpdateValidValue: function (_a) {
206
+ var value = _a.value;
207
+ var prevHour = val_value.hour % 12;
208
+ var Hour = prevHour + (value == 2 ? 12 : 0);
209
+ set_ampm(value);
210
+ set_value({
211
+ modifiedType: 'update',
212
+ hour: Hour,
213
+ minutes: val_value.minutes
214
+ });
215
+ } }),
216
+ _global_1.React.createElement(_atoms_1.Box, { borderTop: true, margin: [0, 1] }),
217
+ _global_1.React.createElement(_functions_1.Input.Radio, { tone: 'plain', icon: true, value: [val_unit], options: [
218
+ { value: 1, label: '/ 1分' },
219
+ { value: 2, label: '/ 2分' },
220
+ { value: 5, label: '/ 5分' }
221
+ ], flexType: 'col', gap: 0, cellStyles: {
222
+ padding: '1/2',
223
+ horizontalAlign: 'between',
224
+ gap: '1/3'
225
+ }, tabIndex: -1, onUpdateValidValue: function (_a) {
226
+ var value = _a.value;
227
+ set_unit(value);
228
+ } })),
229
+ _global_1.React.createElement(_mols_1.Column, null,
230
+ _global_1.React.createElement(_atoms_1.Box, { flexCenter: true, fontSize: '3.paragraph', isBoldFont: true },
231
+ val_value.hour.zeroEmbed(2),
232
+ " : ",
233
+ val_value.minutes.zeroEmbed(2)),
234
+ _global_1.React.createElement(_atoms_1.Flex, { flexWrap: false, borderRadius: '1.tone.primary', boxShadow: -1, flexChilds: 'even', freeCSS: {
235
+ minWidth: 12 * 12
236
+ }, padding: ['1/3', 0] },
237
+ _global_1.React.createElement(_mols_1.Column, { gap: 0, overflow: 'auto', padding: '2/3', borderRight: true, freeCSS: {
238
+ maxHeight: 12 * 22
239
+ }, children: Comps.Clock.Hours({
240
+ onClick: function (index) {
241
+ var Hour = index + (val_ampm == 2 ? 12 : 0);
242
+ set_value({
243
+ modifiedType: 'update',
244
+ hour: Hour,
245
+ minutes: val_value.minutes
246
+ });
247
+ },
248
+ min: min,
249
+ max: max,
250
+ ampm: val_ampm
251
+ }) }),
252
+ _global_1.React.createElement(_mols_1.Column, { gap: 0, overflow: 'auto', padding: '2/3', freeCSS: {
253
+ maxHeight: 12 * 22
254
+ }, children: Comps.Clock.Minutes({
255
+ onClick: function (index) {
256
+ set_value({
257
+ modifiedType: 'update',
258
+ hour: val_value.hour,
259
+ minutes: index
260
+ });
261
+ },
262
+ min: min,
263
+ max: max,
264
+ unit: val_unit
265
+ }) })))),
266
+ _global_1.React.createElement(Comps.Variables.Footer, { tipsID: tipsID, onValueUpdate: onValueUpdate })));
267
+ },
268
+ Hours: function (params) {
269
+ var list = [];
270
+ var _loop_1 = function (index) {
271
+ var labelIndex = params.ampm == 2 ? index + 12 : index;
272
+ var Disabled = false;
273
+ {
274
+ var VAL = Number(String(labelIndex * 100).replace(/\D/ig, ''));
275
+ if (params.min) {
276
+ var MIN = Number(String(params.min).replace(/\D/ig, ''));
277
+ if (MIN > VAL)
278
+ Disabled = true;
279
+ }
280
+ if (params.max) {
281
+ var MAX = Number(String(params.max).replace(/\D/ig, ''));
282
+ if (VAL > MAX)
283
+ Disabled = true;
284
+ }
285
+ }
286
+ list.push(_global_1.React.createElement(_functions_1.Buttons.Button.Normal.R, { key: index, isLocked: Disabled, borderBottom: true, borderRadius: 0, padding: ['1/2', 1], freeCSS: { whiteSpace: 'nowrap' }, tabIndex: -1, onClick: function () {
287
+ params.onClick(index);
288
+ }, children: labelIndex.zeroEmbed(2) }));
289
+ };
290
+ for (var index = 0; index < 12; index++) {
291
+ _loop_1(index);
292
+ }
293
+ return list;
294
+ },
295
+ Minutes: function (params) {
296
+ var list = [];
297
+ var _loop_2 = function (index) {
298
+ var Value = index * params.unit;
299
+ list.push(_global_1.React.createElement(_functions_1.Buttons.Button.Normal.R, { key: Value, borderBottom: true, borderRadius: 0, padding: ['1/2', 1], freeCSS: { whiteSpace: 'nowrap' }, tabIndex: -1, onClick: function () {
300
+ params.onClick(Value);
301
+ }, children: Value.zeroEmbed(2) }));
302
+ };
303
+ for (var index = 0; index < 60 / params.unit; index++) {
304
+ _loop_2(index);
305
+ }
306
+ return list;
307
+ }
308
+ },
309
+ Date: {
310
+ _: function (params) {
311
+ var min = params.min, max = params.max, onValueUpdate = params.onValueUpdate, tipsID = params.tipsID, val_value = params.val_value, set_value = params.set_value;
312
+ var year = val_value.year, month = val_value.month, date = val_value.date;
313
+ return (_global_1.React.createElement(_mols_1.Column, { padding: 1 },
314
+ _global_1.React.createElement(_atoms_1.Flex, { horizontalAlign: 'between', verticalAlign: 'center', flexWrap: false },
315
+ _global_1.React.createElement(_atoms_1.Flex, { verticalAlign: 'bottom', horizontalAlign: 'left', gap: '2/3', flexWrap: false },
316
+ _global_1.React.createElement(_functions_1.Input.Select, { override: 'force', enableUnSelected: false, value: year, options: YearOptions(), border: '1.thin', padding: ['1/3', '2/3'], paddingRight: 2, rightIconStyles: {
317
+ right: '1/3'
318
+ }, onUpdateValidValue: function (_a) {
319
+ var value = _a.value;
320
+ set_value({
321
+ modifiedType: 'update',
322
+ year: Number(value),
323
+ month: month,
324
+ date: date
325
+ });
326
+ } }),
327
+ _global_1.React.createElement(_functions_1.Input.Select, { override: 'force', enableUnSelected: false, value: month, options: (function () {
328
+ var options = [];
329
+ for (var i = 1; i <= 12; i++) {
330
+ options.push({
331
+ value: i,
332
+ label: String(i),
333
+ displayLabel: String(i) + '月'
334
+ });
335
+ }
336
+ return options;
337
+ })(), placeholder: '', border: '1.thin', padding: ['1/3', '2/3'], paddingRight: 2, rightIconStyles: {
338
+ right: '1/3'
339
+ }, onUpdateValidValue: function (_a) {
340
+ var value = _a.value;
341
+ set_value({
342
+ modifiedType: 'update',
343
+ year: year,
344
+ month: Number(value),
345
+ date: date
346
+ });
347
+ } })),
348
+ _global_1.React.createElement(Comps.Variables.ShiftButtons, { callback: function (dir) {
349
+ var newMonth = month + dir;
350
+ var newYear = year;
351
+ if (dir == -1) {
352
+ if (newMonth <= 0)
353
+ newYear--;
354
+ newMonth = newMonth || 12;
355
+ }
356
+ else {
357
+ if (month == 12)
358
+ newYear++;
359
+ }
360
+ set_value({
361
+ modifiedType: 'update',
362
+ year: newYear,
363
+ month: newMonth,
364
+ date: val_value.date
365
+ });
366
+ } })),
367
+ _global_1.React.createElement(_atoms_1.Box, { borderTop: true }),
368
+ _global_1.React.createElement(_atoms_1.Box, { children: Comps.Date.MonthCalendar({
369
+ min: min,
370
+ max: max,
371
+ year: val_value.year,
372
+ month: val_value.month,
373
+ current: [val_value.year, val_value.month, val_value.date],
374
+ callback: (function (val) {
375
+ var _a = __read(val, 3), year = _a[0], month = _a[1], date = _a[2];
376
+ set_value({
377
+ modifiedType: 'update',
378
+ year: year,
379
+ month: month,
380
+ date: date
381
+ });
382
+ })
383
+ }) }),
384
+ _global_1.React.createElement(Comps.Variables.Footer, { tipsID: tipsID, onValueUpdate: onValueUpdate })));
385
+ },
386
+ MonthCalendar: function (params) {
387
+ var min = params.min, max = params.max, year = params.year, month = params.month, current = params.current, callback = params.callback;
388
+ var today = $.Time();
389
+ var firstDate = $.Time([year, month.zeroEmbed(2), '01'].join('/'));
390
+ var lastDate = firstDate.getLastDayOfTheMonth();
391
+ var lastMonthLastDay = $.Time(firstDate).addMonth(-1).getLastDayOfTheMonth().date;
392
+ var legends = [], lastMonthLastishDates = [], thisMonthDates = [], nextMonthFirstishDates = [];
393
+ var commonStyle = {
394
+ padding: 0,
395
+ unitWidth: 3,
396
+ unitHeight: 3,
397
+ flexCenter: true,
398
+ borderRadius: '3.tone.tertiary'
399
+ };
400
+ for (var i = 0; i < 7; i++) {
401
+ legends.push(_global_1.React.createElement(_atoms_1.Box, __assign({ className: [
402
+ style_module_scss_1.default.CalendarDay,
403
+ style_module_scss_1.default.Legend
404
+ ].join(' ') }, commonStyle, { key: i }), ['日', '月', '火', '水', '木', '金', '土'][i]));
405
+ }
406
+ for (var i = 0; i < firstDate.weekday; i++) {
407
+ lastMonthLastishDates.unshift(_global_1.React.createElement(_atoms_1.Box, __assign({ className: [
408
+ style_module_scss_1.default.CalendarDay,
409
+ style_module_scss_1.default.Dummy
410
+ ].join(' '), fontColor: '4.thin' }, commonStyle, { key: i }), lastMonthLastDay - i));
411
+ }
412
+ var _loop_3 = function () {
413
+ var idx = i;
414
+ var isToday = year == today.year && month == today.month && i == today.date;
415
+ var isLocked = false;
416
+ {
417
+ var VAL = Number(String([year, month.zeroEmbed(2), i.zeroEmbed(2)].join('/')).replace(/\D/ig, ''));
418
+ if (params.min) {
419
+ var MIN = Number(String(params.min).replace(/\D/ig, ''));
420
+ if (MIN > VAL)
421
+ isLocked = true;
422
+ }
423
+ if (params.max) {
424
+ var MAX = Number(String(params.max).replace(/\D/ig, ''));
425
+ if (VAL > MAX)
426
+ isLocked = true;
427
+ }
428
+ }
429
+ thisMonthDates.push(_global_1.React.createElement(_functions_1.Buttons.Button.Clear.R, __assign({ className: [
430
+ style_module_scss_1.default.CalendarDay,
431
+ ].join(' ') }, commonStyle, { onClick: function () {
432
+ callback([year, month, idx]);
433
+ }, tabIndex: -1, key: idx, isLocked: isLocked, fontColor: '1.clear', ssEffectsOnActive: 'shrink', padding: 0, flexCenter: true, borderRadius: 'sphere' }, isToday ? {
434
+ backgroundColor: 'warn',
435
+ fontColor: 'white'
436
+ } : null, { children: i })));
437
+ };
438
+ for (var i = 1; i <= lastDate.date; i++) {
439
+ _loop_3();
440
+ }
441
+ for (var i = 1; i < 7 - lastDate.weekday; i++) {
442
+ nextMonthFirstishDates.push(_global_1.React.createElement(_atoms_1.Box, __assign({ className: [
443
+ style_module_scss_1.default.CalendarDay,
444
+ style_module_scss_1.default.Dummy
445
+ ].join(' '), fontColor: '4.thin' }, commonStyle, { key: i }), i));
446
+ }
447
+ return (_global_1.React.createElement(_atoms_1.Grid, { gridCols: 7, gap: '1/3' },
448
+ legends,
449
+ lastMonthLastishDates,
450
+ thisMonthDates,
451
+ nextMonthFirstishDates));
452
+ }
453
+ },
454
+ Month: {
455
+ _: function (params) {
456
+ var min = params.min, max = params.max, onValueUpdate = params.onValueUpdate, tipsID = params.tipsID, val_value = params.val_value, set_value = params.set_value;
457
+ var year = val_value.year, month = val_value.month;
458
+ return (_global_1.React.createElement(_mols_1.Column, { padding: 1 },
459
+ _global_1.React.createElement(_mols_1.Row.Separate, { gap: 0 },
460
+ _global_1.React.createElement(_mols_1.Row.Center, { verticalAlign: 'bottom', gap: '2/3' },
461
+ _global_1.React.createElement(_functions_1.Input.Select, { enableUnSelected: false, value: year, options: YearOptions(), override: 'force', border: '1.thin', padding: ['1/3', '2/3'], paddingRight: 2, rightIconStyles: {
462
+ right: '1/3'
463
+ }, onUpdateValidValue: function (_a) {
464
+ var value = _a.value;
465
+ set_value({
466
+ modifiedType: 'update',
467
+ year: Number(value),
468
+ month: month
469
+ });
470
+ } })),
471
+ _global_1.React.createElement(Comps.Variables.ShiftButtons, { callback: function (dir) {
472
+ var newYear = Math.min(Math.max(year + dir, 1900), 2100);
473
+ set_value({
474
+ modifiedType: 'update',
475
+ year: newYear,
476
+ month: month
477
+ });
478
+ } })),
479
+ _global_1.React.createElement(_atoms_1.Box, { borderTop: true }),
480
+ Comps.Month.Months({
481
+ min: min,
482
+ max: max,
483
+ year: val_value.year,
484
+ current: [val_value.year, val_value.month],
485
+ callback: (function (val) {
486
+ var _a = __read(val, 2), year = _a[0], month = _a[1];
487
+ set_value({
488
+ modifiedType: 'update',
489
+ year: year,
490
+ month: month
491
+ });
492
+ })
493
+ }),
494
+ _global_1.React.createElement(Comps.Variables.Footer, { tipsID: tipsID, onValueUpdate: onValueUpdate })));
495
+ },
496
+ Months: function (params) {
497
+ var year = params.year, current = params.current, callback = params.callback;
498
+ var _a = __read(current, 2), currentYear = _a[0], currentMonth = _a[1];
499
+ var Months = [];
500
+ var _loop_4 = function (index) {
501
+ var Checked = year == currentYear && index == currentMonth;
502
+ var isLocked = false;
503
+ {
504
+ var VAL = Number(String([year, index.zeroEmbed(2)].join('/')).replace(/\D/ig, ''));
505
+ if (params.min) {
506
+ var MIN = Number(String(params.min).replace(/\D/ig, ''));
507
+ if (MIN > VAL)
508
+ isLocked = true;
509
+ }
510
+ if (params.max) {
511
+ var MAX = Number(String(params.max).replace(/\D/ig, ''));
512
+ if (VAL > MAX)
513
+ isLocked = true;
514
+ }
515
+ }
516
+ var ClassName = [
517
+ style_module_scss_1.default.Cell,
518
+ Checked ? style_module_scss_1.default.Checked : ''
519
+ ].join(' ');
520
+ Months.push(_global_1.React.createElement(_functions_1.Buttons.Button.Clear.R, { key: year + '-' + index, className: ClassName, isLocked: isLocked, fontColor: '2.normal', padding: ['2/3', 1], ssEffectsOnActive: 'shrink', onClick: function () {
521
+ callback([year, index]);
522
+ } },
523
+ index,
524
+ " \u6708"));
525
+ };
526
+ for (var index = 1; index <= 12; index++) {
527
+ _loop_4(index);
528
+ }
529
+ return (_global_1.React.createElement(_atoms_1.Grid, { gridCols: 4, gap: '2/3', children: Months }));
530
+ }
531
+ },
532
+ Year: {
533
+ _: function (params) {
534
+ var min = params.min, max = params.max, onValueUpdate = params.onValueUpdate, tipsID = params.tipsID, val_value = params.val_value, set_value = params.set_value;
535
+ var year = val_value.year;
536
+ return (_global_1.React.createElement(_mols_1.Column, { padding: 1 },
537
+ _global_1.React.createElement(_functions_1.Input.Select, { enableUnSelected: false, value: year, override: 'force', options: YearOptions({ min: min, max: max }), onUpdateValidValue: function (_a) {
538
+ var value = _a.value;
539
+ set_value({
540
+ modifiedType: 'update',
541
+ year: Number(value)
542
+ });
543
+ } }),
544
+ _global_1.React.createElement(Comps.Variables.Footer, { tipsID: tipsID, onValueUpdate: onValueUpdate })));
545
+ }
546
+ },
547
+ Variables: {
548
+ Footer: function (params) {
549
+ return (_global_1.React.createElement(_atoms_1.Flex, { flexWrap: false, gap: 1, flexChilds: 'even', freeCSS: {
550
+ whiteSpace: 'nowrap'
551
+ } },
552
+ _global_1.React.createElement(_functions_1.Buttons.Button.Border.R, { onClick: function () {
553
+ params.onValueUpdate('');
554
+ }, tabIndex: -1, flexSizing: 'none', padding: ['2/3', 1] },
555
+ _global_1.React.createElement(_atoms_1.FAIcon.Times, null),
556
+ " \u524A\u9664"),
557
+ _global_1.React.createElement(_functions_1.Buttons.Button.Prime.R, { flexSizing: 'auto', onClick: function () {
558
+ _functions_1.Tooltips.close(params.tipsID);
559
+ }, tabIndex: -1, children: '決定', padding: ['2/3', 1] })));
560
+ },
561
+ ShiftButtons: function (params) {
562
+ return _global_1.React.createElement(_atoms_1.Flex, { flexWrap: false, gap: '1/3' },
563
+ _global_1.React.createElement(_functions_1.Buttons.Button.Clear.R, __assign({ className: style_module_scss_1.default.LeftButton, tabIndex: -1, right: 0 }, Comps.Variables.ShiftButtonStyles, { onClick: function () {
564
+ params.callback(-1);
565
+ } }),
566
+ _global_1.React.createElement(_atoms_1.FAIcon.ChevronLeft, null)),
567
+ _global_1.React.createElement(_functions_1.Buttons.Button.Clear.R, __assign({ className: style_module_scss_1.default.RightButton, tabIndex: -1, left: 0 }, Comps.Variables.ShiftButtonStyles, { onClick: function () {
568
+ params.callback(1);
569
+ } }),
570
+ _global_1.React.createElement(_atoms_1.FAIcon.ChevronRight, null)));
571
+ },
572
+ ShiftButtonStyles: {
573
+ flexCenter: true,
574
+ padding: 0,
575
+ unitWidth: 3,
576
+ unitHeight: 3,
577
+ borderRadius: 'sphere',
578
+ position: 'relative'
579
+ }
580
+ }
581
+ };
@@ -0,0 +1,2 @@
1
+ export declare const TimeInput: FNC<amotify.fn.Input.Time.OriginParams>;
2
+ export declare const TimeFNs: amotify.fn.Input.Time.FNTypes;