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.
- package/{dist/@types/_.d.ts → @types/_.tsx} +3 -3
- package/{src/@types → @types}/amot.tsx +0 -1
- package/{src/@types → @types}/fn.tsx +1 -2
- package/{src/@types → @types}/index.tsx +1 -5
- package/{src/@types → @types}/jsminAmotifyExtension.tsx +1 -2
- package/dist/amotify.js +1 -0
- package/dist/amotify.min.css +24 -0
- package/package.json +4 -9
- package/src/{Atoms/@export.tsx → @atoms.tsx} +3 -3
- package/src/@functions.tsx +29 -0
- package/src/{Global/@export.tsx → @global.tsx} +2 -2
- package/src/@jsminAmotifyExtension/formCollect.tsx +1 -1
- package/src/{Molecules/@export.tsx → @molecules.tsx} +4 -4
- package/src/@organisms.tsx +5 -0
- package/src/@styles/UniStyling.scss +1 -1
- package/src/@styles/init.scss +1 -1
- package/src/@styles/styleSet.scss +1 -1
- package/src/{Templates/@export.tsx → @templates.tsx} +1 -1
- package/src/{Atoms → atoms}/FAIcon/style.module.scss +1 -2
- package/src/{Atoms → atoms}/Logo/parts.tsx +1 -2
- package/src/{Atoms → atoms}/Logo/style.module.scss +1 -2
- package/src/{Atoms → atoms}/Various/parts.tsx +1 -1
- package/src/{Atoms → atoms}/Various/style.module.scss +3 -2
- package/src/{Functions → functions}/Button/_.tsx +1 -1
- package/src/{Functions → functions}/Button/style.module.scss +3 -2
- package/src/{Functions → functions}/Cropper/parts.tsx +4 -4
- package/src/{Functions → functions}/Cropper/style.module.scss +1 -1
- package/src/{Functions → functions}/Effects/Fade.tsx +2 -2
- package/src/{Functions → functions}/Effects/style.module.scss +1 -1
- package/src/{Functions → functions}/Input/Chips/Selector.tsx +4 -5
- package/src/{Functions → functions}/Input/Chips/_.tsx +3 -7
- package/src/functions/Input/Chips/style.module.scss +6 -0
- package/src/{Functions → functions}/Input/DigitCharacters.tsx +3 -3
- package/src/{Functions → functions}/Input/File/_.tsx +4 -4
- package/src/{Functions → functions}/Input/File/style.module.scss +1 -1
- package/src/{Functions → functions}/Input/List/_.tsx +3 -3
- package/src/{Functions → functions}/Input/List/style.module.scss +1 -1
- package/src/{Functions → functions}/Input/Segmented/_.tsx +1 -1
- package/src/{Functions → functions}/Input/Segmented/style.module.scss +2 -2
- package/src/{Functions → functions}/Input/Select/_.tsx +3 -3
- package/src/{Functions → functions}/Input/Select/style.module.scss +1 -1
- package/src/{Functions → functions}/Input/Slider/_.tsx +3 -3
- package/src/{Functions → functions}/Input/Slider/style.module.scss +2 -2
- package/src/{Functions → functions}/Input/Switch/_.tsx +4 -4
- package/src/{Functions → functions}/Input/Switch/style.module.scss +1 -1
- package/src/{Functions → functions}/Input/Text.tsx +2 -2
- package/src/{Functions → functions}/Input/TextArea.tsx +1 -1
- package/src/{Functions → functions}/Input/Time/Picker.tsx +4 -4
- package/src/{Functions → functions}/Input/Time/_.tsx +3 -3
- package/src/{Functions → functions}/Input/Time/style.module.scss +1 -1
- package/src/{Functions → functions}/Input/_.tsx +4 -4
- package/src/{Functions → functions}/Input/core.tsx +4 -4
- package/src/{Functions → functions}/Input/style.module.scss +1 -1
- package/src/{Functions → functions}/Inputs/style.module.scss +1 -1
- package/src/{Functions → functions}/Inputs/text.tsx +4 -17
- package/src/functions/Inputs/types.d.ts +13 -0
- package/src/{Functions → functions}/Layout/PageNotFound.tsx +4 -6
- package/src/{Functions → functions}/Layout/PageRouter.tsx +2 -2
- package/src/{Functions → functions}/Layout/PageViewController/parts.tsx +4 -2
- package/src/{Functions → functions}/Layout/Plate.tsx +1 -1
- package/src/{Functions → functions}/Layout/RootViewController/parts.tsx +6 -8
- package/src/{Functions → functions}/Layout/RootViewController/style.module.scss +1 -1
- package/src/{Functions → functions}/Layout/SwipeView/parts.tsx +2 -3
- package/src/{Functions → functions}/Layout/SwipeView/style.module.scss +1 -1
- package/src/{Functions → functions}/Layout/TabBar.tsx +4 -4
- package/src/{Functions → functions}/Loader/corner.tsx +3 -3
- package/src/{Functions → functions}/Loader/mini.tsx +2 -2
- package/src/{Functions → functions}/Loader/parts.tsx +1 -1
- package/src/{Functions → functions}/Loader/style.module.scss +1 -1
- package/src/{Functions → functions}/Loader/top.tsx +3 -3
- package/src/{Functions → functions}/Sheet/parts.tsx +4 -4
- package/src/{Functions → functions}/Sheet/style.module.scss +1 -1
- package/src/{Functions → functions}/SnackBar/parts.tsx +4 -4
- package/src/{Functions → functions}/SnackBar/style.module.scss +1 -1
- package/src/{Functions → functions}/Table/Data/parts.tsx +4 -4
- package/src/{Functions → functions}/Table/Drag/parts.tsx +3 -3
- package/src/{Functions → functions}/Table/Normal/parts.tsx +1 -2
- package/src/{Functions → functions}/Table/_.tsx +3 -4
- package/src/{Functions → functions}/Table/style.module.scss +3 -2
- package/src/{Functions → functions}/Tooltips/parts.tsx +2 -2
- package/src/{Global → global}/styleConverter.tsx +1 -5
- package/src/launch.tsx +8 -8
- package/src/{Molecules → molecules}/Accordion/parts.tsx +2 -2
- package/src/{Molecules → molecules}/Accordion/style.module.scss +1 -1
- package/src/{Molecules → molecules}/LinkifyText/parts.tsx +2 -2
- package/src/{Molecules → molecules}/List.tsx +1 -1
- package/src/{Organisms → organisms}/DisplayStyleInput/darkmode.tsx +4 -4
- package/src/{Organisms → organisms}/DisplayStyleInput/themeColor.tsx +4 -4
- package/src/{Templates → templates}/PlayGround/parts.tsx +26 -40
- package/src/{Templates → templates}/PlayGround/style.module.scss +1 -1
- package/tsconfig.json +19 -5
- package/webpack.config.js +13 -2
- package/dist/@jsminAmotifyExtension/_.d.ts +0 -4
- package/dist/@jsminAmotifyExtension/_.js +0 -6
- package/dist/@jsminAmotifyExtension/fetch.d.ts +0 -9
- package/dist/@jsminAmotifyExtension/fetch.js +0 -199
- package/dist/@jsminAmotifyExtension/formCollect.d.ts +0 -1
- package/dist/@jsminAmotifyExtension/formCollect.js +0 -137
- package/dist/@jsminAmotifyExtension/spreadSheet.d.ts +0 -4
- package/dist/@jsminAmotifyExtension/spreadSheet.js +0 -314
- package/dist/@jsminAmotifyExtension/variables.d.ts +0 -0
- package/dist/@jsminAmotifyExtension/variables.js +0 -186
- package/dist/@types/_.js +0 -8
- package/dist/@types/amot.d.ts +0 -260
- package/dist/@types/amot.js +0 -2
- package/dist/@types/fn.d.ts +0 -1040
- package/dist/@types/fn.js +0 -2
- package/dist/@types/index.d.ts +0 -62
- package/dist/@types/index.js +0 -2
- package/dist/@types/jsminAmotifyExtension.d.ts +0 -134
- package/dist/@types/jsminAmotifyExtension.js +0 -2
- package/dist/@types/module.d.ts +0 -2
- package/dist/@types/module.js +0 -1
- package/dist/@types/state.d.ts +0 -145
- package/dist/@types/state.js +0 -2
- package/dist/Atoms/@export.d.ts +0 -4
- package/dist/Atoms/@export.js +0 -16
- package/dist/Atoms/FAIcon/parts.d.ts +0 -2
- package/dist/Atoms/FAIcon/parts.js +0 -152
- package/dist/Atoms/Logo/parts.d.ts +0 -1
- package/dist/Atoms/Logo/parts.js +0 -154
- package/dist/Atoms/Various/parts.d.ts +0 -9
- package/dist/Atoms/Various/parts.js +0 -113
- package/dist/Functions/@export.d.ts +0 -12
- package/dist/Functions/@export.js +0 -25
- package/dist/Functions/Button/_.d.ts +0 -1
- package/dist/Functions/Button/_.js +0 -270
- package/dist/Functions/Cropper/parts.d.ts +0 -1
- package/dist/Functions/Cropper/parts.js +0 -783
- package/dist/Functions/Effects/Fade.d.ts +0 -1
- package/dist/Functions/Effects/Fade.js +0 -82
- package/dist/Functions/Effects/Ripple.d.ts +0 -1
- package/dist/Functions/Effects/Ripple.js +0 -107
- package/dist/Functions/Effects/_.d.ts +0 -3
- package/dist/Functions/Effects/_.js +0 -43
- package/dist/Functions/Input/Chips/Selector.d.ts +0 -1
- package/dist/Functions/Input/Chips/Selector.js +0 -356
- package/dist/Functions/Input/Chips/_.d.ts +0 -2
- package/dist/Functions/Input/Chips/_.js +0 -218
- package/dist/Functions/Input/DigitCharacters.d.ts +0 -1
- package/dist/Functions/Input/DigitCharacters.js +0 -178
- package/dist/Functions/Input/File/_.d.ts +0 -2
- package/dist/Functions/Input/File/_.js +0 -458
- package/dist/Functions/Input/Hidden.d.ts +0 -1
- package/dist/Functions/Input/Hidden.js +0 -30
- package/dist/Functions/Input/List/_.d.ts +0 -1
- package/dist/Functions/Input/List/_.js +0 -232
- package/dist/Functions/Input/Segmented/_.d.ts +0 -1
- package/dist/Functions/Input/Segmented/_.js +0 -111
- package/dist/Functions/Input/Select/_.d.ts +0 -1
- package/dist/Functions/Input/Select/_.js +0 -154
- package/dist/Functions/Input/Slider/_.d.ts +0 -1
- package/dist/Functions/Input/Slider/_.js +0 -308
- package/dist/Functions/Input/Switch/_.d.ts +0 -1
- package/dist/Functions/Input/Switch/_.js +0 -120
- package/dist/Functions/Input/Text.d.ts +0 -5
- package/dist/Functions/Input/Text.js +0 -340
- package/dist/Functions/Input/TextArea.d.ts +0 -1
- package/dist/Functions/Input/TextArea.js +0 -98
- package/dist/Functions/Input/Time/Picker.d.ts +0 -1
- package/dist/Functions/Input/Time/Picker.js +0 -581
- package/dist/Functions/Input/Time/_.d.ts +0 -2
- package/dist/Functions/Input/Time/_.js +0 -567
- package/dist/Functions/Input/_.d.ts +0 -5
- package/dist/Functions/Input/_.js +0 -446
- package/dist/Functions/Input/core.d.ts +0 -34
- package/dist/Functions/Input/core.js +0 -324
- package/dist/Functions/Inputs/_.d.ts +0 -3
- package/dist/Functions/Inputs/_.js +0 -7
- package/dist/Functions/Inputs/text.d.ts +0 -12
- package/dist/Functions/Inputs/text.js +0 -46
- package/dist/Functions/Layout/PageNotFound.d.ts +0 -1
- package/dist/Functions/Layout/PageNotFound.js +0 -30
- package/dist/Functions/Layout/PageRouter.d.ts +0 -2
- package/dist/Functions/Layout/PageRouter.js +0 -65
- package/dist/Functions/Layout/PageViewController/parts.d.ts +0 -1
- package/dist/Functions/Layout/PageViewController/parts.js +0 -31
- package/dist/Functions/Layout/Plate.d.ts +0 -1
- package/dist/Functions/Layout/Plate.js +0 -39
- package/dist/Functions/Layout/RootViewController/parts.d.ts +0 -1
- package/dist/Functions/Layout/RootViewController/parts.js +0 -202
- package/dist/Functions/Layout/SwipeView/parts.d.ts +0 -2
- package/dist/Functions/Layout/SwipeView/parts.js +0 -319
- package/dist/Functions/Layout/TabBar.d.ts +0 -1
- package/dist/Functions/Layout/TabBar.js +0 -49
- package/dist/Functions/Layout/_.d.ts +0 -2
- package/dist/Functions/Layout/_.js +0 -20
- package/dist/Functions/Loader/corner.d.ts +0 -1
- package/dist/Functions/Loader/corner.js +0 -59
- package/dist/Functions/Loader/mini.d.ts +0 -33
- package/dist/Functions/Loader/mini.js +0 -126
- package/dist/Functions/Loader/parts.d.ts +0 -3
- package/dist/Functions/Loader/parts.js +0 -108
- package/dist/Functions/Loader/top.d.ts +0 -1
- package/dist/Functions/Loader/top.js +0 -69
- package/dist/Functions/Sheet/parts.d.ts +0 -2
- package/dist/Functions/Sheet/parts.js +0 -724
- package/dist/Functions/SnackBar/parts.d.ts +0 -2
- package/dist/Functions/SnackBar/parts.js +0 -171
- package/dist/Functions/Table/Data/parts.d.ts +0 -3
- package/dist/Functions/Table/Data/parts.js +0 -629
- package/dist/Functions/Table/Drag/parts.d.ts +0 -1
- package/dist/Functions/Table/Drag/parts.js +0 -359
- package/dist/Functions/Table/Normal/parts.d.ts +0 -1
- package/dist/Functions/Table/Normal/parts.js +0 -92
- package/dist/Functions/Table/_.d.ts +0 -9
- package/dist/Functions/Table/_.js +0 -153
- package/dist/Functions/Tooltips/parts.d.ts +0 -2
- package/dist/Functions/Tooltips/parts.js +0 -71
- package/dist/Global/@export.d.ts +0 -12
- package/dist/Global/@export.js +0 -198
- package/dist/Global/LaunchReactApplication.d.ts +0 -1
- package/dist/Global/LaunchReactApplication.js +0 -48
- package/dist/Global/styleConverter.d.ts +0 -2
- package/dist/Global/styleConverter.js +0 -349
- package/dist/Molecules/@export.d.ts +0 -21
- package/dist/Molecules/@export.js +0 -41
- package/dist/Molecules/Accordion/parts.d.ts +0 -2
- package/dist/Molecules/Accordion/parts.js +0 -165
- package/dist/Molecules/LinkifyText/parts.d.ts +0 -1
- package/dist/Molecules/LinkifyText/parts.js +0 -39
- package/dist/Molecules/List.d.ts +0 -1
- package/dist/Molecules/List.js +0 -35
- package/dist/Organisms/@export.d.ts +0 -2
- package/dist/Organisms/@export.js +0 -5
- package/dist/Organisms/DisplayStyleInput/_.d.ts +0 -1
- package/dist/Organisms/DisplayStyleInput/_.js +0 -15
- package/dist/Organisms/DisplayStyleInput/darkmode.d.ts +0 -1
- package/dist/Organisms/DisplayStyleInput/darkmode.js +0 -77
- package/dist/Organisms/DisplayStyleInput/themeColor.d.ts +0 -27
- package/dist/Organisms/DisplayStyleInput/themeColor.js +0 -185
- package/dist/Templates/@export.d.ts +0 -2
- package/dist/Templates/@export.js +0 -5
- package/dist/Templates/PlayGround/parts.d.ts +0 -1
- package/dist/Templates/PlayGround/parts.js +0 -55
- package/dist/config.d.ts +0 -16
- package/dist/config.js +0 -171
- package/dist/launch.d.ts +0 -9
- package/dist/launch.js +0 -46
- package/dist/preload.d.ts +0 -1
- package/dist/preload.js +0 -73
- package/public/amotify.js +0 -310
- package/public/amotify.min.css +0 -12724
- package/src/@types/_.tsx +0 -6
- package/src/Functions/@export.tsx +0 -29
- package/src/Functions/Input/Chips/style.module.scss +0 -6
- package/src/Functions/Inputs/types.d.ts +0 -1
- package/src/Global/exe.tsx +0 -0
- package/src/Organisms/@export.tsx +0 -5
- package/src/index.js +0 -0
- /package/{src/@types → @types}/module.tsx +0 -0
- /package/{src/@types → @types}/state.tsx +0 -0
- /package/src/{Atoms → atoms}/FAIcon/parts.tsx +0 -0
- /package/src/{Functions → functions}/Effects/Ripple.tsx +0 -0
- /package/src/{Functions → functions}/Effects/_.tsx +0 -0
- /package/src/{Functions → functions}/Input/Hidden.tsx +0 -0
- /package/src/{Functions → functions}/Inputs/_.tsx +0 -0
- /package/src/{Functions → functions}/Layout/_.tsx +0 -0
- /package/src/{Global → global}/LaunchReactApplication.tsx +0 -0
- /package/src/{Organisms → organisms}/DisplayStyleInput/_.tsx +0 -0
|
@@ -1,581 +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 __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 _export_1 = require("../../../Global/@export");
|
|
44
|
-
var _export_2 = require("../../../Atoms/@export");
|
|
45
|
-
var _export_3 = require("../../../Molecules/@export");
|
|
46
|
-
var _export_4 = require("../../../Functions/@export");
|
|
47
|
-
var useEffect = _export_1.React.useEffect, useRef = _export_1.React.useRef, useState = _export_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 (_export_1.React.createElement(_export_2.Box, { backgroundColor: '1.layer.base', borderRadius: '2.tone.secondary', boxShadow: 3, border: true, overflow: 'hidden' },
|
|
160
|
-
_export_1.React.createElement(_export_2.Box, { overflow: 'auto', className: style_module_scss_1.default[restrict.toCapital() + 'Base'], children: restrict == 'clock' ? _export_1.React.createElement(Comps.Clock._, __assign({}, Params))
|
|
161
|
-
: restrict == 'date' ? _export_1.React.createElement(Comps.Date._, __assign({}, Params))
|
|
162
|
-
: restrict == 'week' ? ''
|
|
163
|
-
: restrict == 'month' ? _export_1.React.createElement(Comps.Month._, __assign({}, Params))
|
|
164
|
-
: restrict == 'year' ? _export_1.React.createElement(Comps.Year._, __assign({}, Params))
|
|
165
|
-
: restrict == 'dates' ? ''
|
|
166
|
-
: restrict == 'months' ? ''
|
|
167
|
-
: restrict == 'dateWareki' ? ''
|
|
168
|
-
: _export_1.React.createElement(_export_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 (_export_1.React.createElement(_export_3.Column, { padding: 1 },
|
|
182
|
-
_export_1.React.createElement(_export_2.Flex, { flexType: 'row', flexWrap: false, gap: 1, className: style_module_scss_1.default.Body },
|
|
183
|
-
_export_1.React.createElement(_export_3.Column, { className: style_module_scss_1.default.DesignSide, flexSizing: 0 },
|
|
184
|
-
_export_1.React.createElement(_export_2.Box, { className: style_module_scss_1.default.ClockUiBase, padding: [1, '2/3'], flexCenter: true },
|
|
185
|
-
_export_1.React.createElement(_export_2.Box, { className: style_module_scss_1.default.ClockUi, backgroundColor: 'tcOpLow', isRounded: true, position: 'relative' },
|
|
186
|
-
_export_1.React.createElement(_export_2.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
|
-
_export_1.React.createElement(_export_2.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
|
-
_export_1.React.createElement(_export_4.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
|
-
_export_1.React.createElement(_export_2.Box, { borderTop: true, margin: [0, 1] }),
|
|
217
|
-
_export_1.React.createElement(_export_4.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
|
-
_export_1.React.createElement(_export_3.Column, null,
|
|
230
|
-
_export_1.React.createElement(_export_2.Box, { flexCenter: true, fontSize: '3.paragraph', isBoldFont: true },
|
|
231
|
-
val_value.hour.zeroEmbed(2),
|
|
232
|
-
" : ",
|
|
233
|
-
val_value.minutes.zeroEmbed(2)),
|
|
234
|
-
_export_1.React.createElement(_export_2.Flex, { flexWrap: false, borderRadius: '1.tone.primary', boxShadow: -1, flexChilds: 'even', freeCSS: {
|
|
235
|
-
minWidth: 12 * 12
|
|
236
|
-
}, padding: ['1/3', 0] },
|
|
237
|
-
_export_1.React.createElement(_export_3.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
|
-
_export_1.React.createElement(_export_3.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
|
-
_export_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(_export_1.React.createElement(_export_4.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(_export_1.React.createElement(_export_4.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 (_export_1.React.createElement(_export_3.Column, { padding: 1 },
|
|
314
|
-
_export_1.React.createElement(_export_2.Flex, { horizontalAlign: 'between', verticalAlign: 'center', flexWrap: false },
|
|
315
|
-
_export_1.React.createElement(_export_2.Flex, { verticalAlign: 'bottom', horizontalAlign: 'left', gap: '2/3', flexWrap: false },
|
|
316
|
-
_export_1.React.createElement(_export_4.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
|
-
_export_1.React.createElement(_export_4.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
|
-
_export_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
|
-
_export_1.React.createElement(_export_2.Box, { borderTop: true }),
|
|
368
|
-
_export_1.React.createElement(_export_2.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
|
-
_export_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(_export_1.React.createElement(_export_2.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(_export_1.React.createElement(_export_2.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(_export_1.React.createElement(_export_4.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(_export_1.React.createElement(_export_2.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 (_export_1.React.createElement(_export_2.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 (_export_1.React.createElement(_export_3.Column, { padding: 1 },
|
|
459
|
-
_export_1.React.createElement(_export_3.Row.Separate, { gap: 0 },
|
|
460
|
-
_export_1.React.createElement(_export_3.Row.Center, { verticalAlign: 'bottom', gap: '2/3' },
|
|
461
|
-
_export_1.React.createElement(_export_4.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
|
-
_export_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
|
-
_export_1.React.createElement(_export_2.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
|
-
_export_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(_export_1.React.createElement(_export_4.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 (_export_1.React.createElement(_export_2.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 (_export_1.React.createElement(_export_3.Column, { padding: 1 },
|
|
537
|
-
_export_1.React.createElement(_export_4.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
|
-
_export_1.React.createElement(Comps.Variables.Footer, { tipsID: tipsID, onValueUpdate: onValueUpdate })));
|
|
545
|
-
}
|
|
546
|
-
},
|
|
547
|
-
Variables: {
|
|
548
|
-
Footer: function (params) {
|
|
549
|
-
return (_export_1.React.createElement(_export_2.Flex, { flexWrap: false, gap: 1, flexChilds: 'even', freeCSS: {
|
|
550
|
-
whiteSpace: 'nowrap'
|
|
551
|
-
} },
|
|
552
|
-
_export_1.React.createElement(_export_4.Buttons.Button.Border.R, { onClick: function () {
|
|
553
|
-
params.onValueUpdate('');
|
|
554
|
-
}, tabIndex: -1, flexSizing: 'none', padding: ['2/3', 1] },
|
|
555
|
-
_export_1.React.createElement(_export_2.FAIcon.Times, null),
|
|
556
|
-
" \u524A\u9664"),
|
|
557
|
-
_export_1.React.createElement(_export_4.Buttons.Button.Prime.R, { flexSizing: 'auto', onClick: function () {
|
|
558
|
-
_export_4.Tooltips.close(params.tipsID);
|
|
559
|
-
}, tabIndex: -1, children: '決定', padding: ['2/3', 1] })));
|
|
560
|
-
},
|
|
561
|
-
ShiftButtons: function (params) {
|
|
562
|
-
return _export_1.React.createElement(_export_2.Flex, { flexWrap: false, gap: '1/3' },
|
|
563
|
-
_export_1.React.createElement(_export_4.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
|
-
_export_1.React.createElement(_export_2.FAIcon.ChevronLeft, null)),
|
|
567
|
-
_export_1.React.createElement(_export_4.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
|
-
_export_1.React.createElement(_export_2.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
|
-
};
|