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,724 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
14
|
-
var t = {};
|
|
15
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
16
|
-
t[p] = s[p];
|
|
17
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
18
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
19
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
20
|
-
t[p[i]] = s[p[i]];
|
|
21
|
-
}
|
|
22
|
-
return t;
|
|
23
|
-
};
|
|
24
|
-
var __read = (this && this.__read) || function (o, n) {
|
|
25
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
26
|
-
if (!m) return o;
|
|
27
|
-
var i = m.call(o), r, ar = [], e;
|
|
28
|
-
try {
|
|
29
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
30
|
-
}
|
|
31
|
-
catch (error) { e = { error: error }; }
|
|
32
|
-
finally {
|
|
33
|
-
try {
|
|
34
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
35
|
-
}
|
|
36
|
-
finally { if (e) throw e.error; }
|
|
37
|
-
}
|
|
38
|
-
return ar;
|
|
39
|
-
};
|
|
40
|
-
var __values = (this && this.__values) || function(o) {
|
|
41
|
-
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
42
|
-
if (m) return m.call(o);
|
|
43
|
-
if (o && typeof o.length === "number") return {
|
|
44
|
-
next: function () {
|
|
45
|
-
if (o && i >= o.length) o = void 0;
|
|
46
|
-
return { value: o && o[i++], done: !o };
|
|
47
|
-
}
|
|
48
|
-
};
|
|
49
|
-
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
50
|
-
};
|
|
51
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
52
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
53
|
-
};
|
|
54
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
55
|
-
exports.Sheet = void 0;
|
|
56
|
-
var _export_1 = require("../../Global/@export");
|
|
57
|
-
var _export_2 = require("../../Atoms/@export");
|
|
58
|
-
var _export_3 = require("../../Molecules/@export");
|
|
59
|
-
var _export_4 = require("../../Functions/@export");
|
|
60
|
-
var useEffect = React.useEffect, useState = React.useState;
|
|
61
|
-
var style_module_scss_1 = __importDefault(require("./style.module.scss"));
|
|
62
|
-
var Comps = {
|
|
63
|
-
contents: {},
|
|
64
|
-
Launch: function (params) {
|
|
65
|
-
params = __assign(__assign({ sheetID: $.uuidGen(), sheetGroups: params.sheetGroups || [], overwrap: params.type == 'custom' ? true : false, holdState: false }, params), { closeOption: __assign({ pageTransit: true, escapeKeyDown: true, aroundClick: false }, params.closeOption) });
|
|
66
|
-
if (this.contents[params.sheetID]) {
|
|
67
|
-
/** open Exist Sheet */
|
|
68
|
-
var component = _export_1.useStore.get(params.sheetID);
|
|
69
|
-
if (component && component.refresh)
|
|
70
|
-
component.refresh(params, true);
|
|
71
|
-
return;
|
|
72
|
-
}
|
|
73
|
-
/** create Sheet */
|
|
74
|
-
var Content = React.createElement(Comps.Core, __assign({}, params));
|
|
75
|
-
this.contents[params.sheetID] = {
|
|
76
|
-
open: true,
|
|
77
|
-
holdState: !!params.holdState,
|
|
78
|
-
params: params,
|
|
79
|
-
created_at: $.Time()
|
|
80
|
-
};
|
|
81
|
-
$('#SHEET')
|
|
82
|
-
.append("<div id=\"Sheet-".concat(params.sheetID, "\"></div>"))
|
|
83
|
-
.callback(function () {
|
|
84
|
-
(0, _export_1.LaunchReactApplication)({
|
|
85
|
-
baseElement: '#Sheet-' + params.sheetID,
|
|
86
|
-
reactElement: Content,
|
|
87
|
-
});
|
|
88
|
-
});
|
|
89
|
-
},
|
|
90
|
-
mainSheetScrolls: 0,
|
|
91
|
-
subSheetLength: 0,
|
|
92
|
-
Core: function (params) {
|
|
93
|
-
var _a;
|
|
94
|
-
var _b = __read(useState($.uuidGen()), 1), val_componentID = _b[0];
|
|
95
|
-
var _c = __read(useState(params), 2), val_params = _c[0], set_params = _c[1];
|
|
96
|
-
var _d = __read(useState(true), 2), val_open = _d[0], set_open = _d[1];
|
|
97
|
-
var type = val_params.type, sheetID = val_params.sheetID, openAfter = val_params.openAfter, closeAfter = val_params.closeAfter;
|
|
98
|
-
var isNewSheet = !params.overwrap;
|
|
99
|
-
var ContentFC = Comps.Types[{
|
|
100
|
-
'normal.topLeft': 'Normal',
|
|
101
|
-
'normal.topCenter': 'Normal',
|
|
102
|
-
'normal.topRight': 'Normal',
|
|
103
|
-
'normal.middleLeft': 'Normal',
|
|
104
|
-
'normal.middleCenter': 'Normal',
|
|
105
|
-
'normal.middleRight': 'Normal',
|
|
106
|
-
'normal.bottomLeft': 'Normal',
|
|
107
|
-
'normal.bottomCenter': 'Normal',
|
|
108
|
-
'normal.bottomRight': 'Normal',
|
|
109
|
-
'image': 'Normal',
|
|
110
|
-
'drawer.left': 'Edge',
|
|
111
|
-
'drawer.right': 'Edge',
|
|
112
|
-
'drawer.bottom': 'Bottom',
|
|
113
|
-
'custom': 'Custom',
|
|
114
|
-
}[type]];
|
|
115
|
-
useEffect(function () {
|
|
116
|
-
_export_1.useStore.set({
|
|
117
|
-
key: sheetID,
|
|
118
|
-
value: {
|
|
119
|
-
refresh: function (params, open) {
|
|
120
|
-
set_params(params);
|
|
121
|
-
set_open(open !== null && open !== void 0 ? open : false);
|
|
122
|
-
},
|
|
123
|
-
resize: function (size) {
|
|
124
|
-
if (type == 'drawer.bottom') {
|
|
125
|
-
var component = _export_1.useStore.get(val_componentID);
|
|
126
|
-
if (component && component.resize)
|
|
127
|
-
component.resize(size);
|
|
128
|
-
}
|
|
129
|
-
else if (val_params.type.includes('normal') ||
|
|
130
|
-
val_params.type.includes('drawer')) {
|
|
131
|
-
set_params(__assign(__assign({}, val_params), { size: size }));
|
|
132
|
-
}
|
|
133
|
-
},
|
|
134
|
-
close: function () {
|
|
135
|
-
Comps.contents[sheetID].open = false;
|
|
136
|
-
set_open(false);
|
|
137
|
-
},
|
|
138
|
-
open: function () {
|
|
139
|
-
Comps.contents[sheetID].open = true;
|
|
140
|
-
set_open(true);
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
});
|
|
144
|
-
});
|
|
145
|
-
useEffect(function () {
|
|
146
|
-
var closeOption = params.closeOption;
|
|
147
|
-
$.fnScope(function () {
|
|
148
|
-
if (!(closeOption === null || closeOption === void 0 ? void 0 : closeOption.elementBlur))
|
|
149
|
-
return;
|
|
150
|
-
var element = $(closeOption.elementBlur);
|
|
151
|
-
if (!element[0])
|
|
152
|
-
return;
|
|
153
|
-
$(element).addEvent({
|
|
154
|
-
eventID: 'SheetClosation-' + sheetID,
|
|
155
|
-
eventType: 'mouseout',
|
|
156
|
-
callback: function () {
|
|
157
|
-
Sheet.close(sheetID);
|
|
158
|
-
$().removeEvent('SheetClosation-' + sheetID);
|
|
159
|
-
}
|
|
160
|
-
});
|
|
161
|
-
});
|
|
162
|
-
}, []);
|
|
163
|
-
useEffect(function () {
|
|
164
|
-
$.fnScope(function () {
|
|
165
|
-
// #ROOT
|
|
166
|
-
if (!isNewSheet)
|
|
167
|
-
return;
|
|
168
|
-
Comps.subSheetLength = Comps.subSheetLength + (val_open ? 1 : -1);
|
|
169
|
-
if (val_open) {
|
|
170
|
-
var html = $('html');
|
|
171
|
-
if (Comps.subSheetLength == 1) {
|
|
172
|
-
var scroll_1 = html[0].scrollTop;
|
|
173
|
-
Comps.mainSheetScrolls = scroll_1;
|
|
174
|
-
}
|
|
175
|
-
if (!amotify.config.device.isBreakpoint()) {
|
|
176
|
-
html
|
|
177
|
-
.abort()
|
|
178
|
-
.addClass(style_module_scss_1.default.FixHeight)
|
|
179
|
-
.callback(function () {
|
|
180
|
-
$('#ROOT')[0].scrollTop = Comps.mainSheetScrolls;
|
|
181
|
-
})
|
|
182
|
-
.addClass([
|
|
183
|
-
style_module_scss_1.default.FloatMainSheet,
|
|
184
|
-
style_module_scss_1.default['Type_' + type]
|
|
185
|
-
])[0].scrollTop = 0;
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
else {
|
|
189
|
-
if (Comps.subSheetLength != 0)
|
|
190
|
-
return;
|
|
191
|
-
if (amotify.config.device.isBreakpoint())
|
|
192
|
-
return;
|
|
193
|
-
var html = $('html');
|
|
194
|
-
html
|
|
195
|
-
.abort()
|
|
196
|
-
.removeClass(style_module_scss_1.default.FloatMainSheet)
|
|
197
|
-
.await(251)
|
|
198
|
-
.removeClass(style_module_scss_1.default.FixHeight)
|
|
199
|
-
.callback(function (html) {
|
|
200
|
-
html[0].scrollTop = Comps.mainSheetScrolls | 0;
|
|
201
|
-
$('#ROOT')[0].scrollTop = 0;
|
|
202
|
-
});
|
|
203
|
-
}
|
|
204
|
-
});
|
|
205
|
-
$.fnScope(function () {
|
|
206
|
-
if (val_open) {
|
|
207
|
-
$('#' + val_componentID)
|
|
208
|
-
.abort()
|
|
209
|
-
.await(10)
|
|
210
|
-
.removeClass(style_module_scss_1.default.Hide)
|
|
211
|
-
.await(10)
|
|
212
|
-
.addClass(style_module_scss_1.default.Open)
|
|
213
|
-
.callback(function () {
|
|
214
|
-
if (openAfter)
|
|
215
|
-
openAfter();
|
|
216
|
-
});
|
|
217
|
-
}
|
|
218
|
-
else {
|
|
219
|
-
$('#' + val_componentID)
|
|
220
|
-
.abort()
|
|
221
|
-
.await(10)
|
|
222
|
-
.removeClass(style_module_scss_1.default.Open)
|
|
223
|
-
.await(251)
|
|
224
|
-
.addClass(style_module_scss_1.default.Hide)
|
|
225
|
-
.callback(function () {
|
|
226
|
-
!closeAfter || closeAfter();
|
|
227
|
-
params.holdState || $.fnScope(function () {
|
|
228
|
-
delete Comps.contents[sheetID];
|
|
229
|
-
$('#Sheet-' + sheetID).remove();
|
|
230
|
-
$().removeEvent('SheetClosation-' + sheetID);
|
|
231
|
-
});
|
|
232
|
-
});
|
|
233
|
-
}
|
|
234
|
-
});
|
|
235
|
-
}, [val_open]);
|
|
236
|
-
var _e = __read(type.split('.'), 2), Tcate = _e[0], Tpos = _e[1];
|
|
237
|
-
return (React.createElement(_export_2.Box, { className: [
|
|
238
|
-
style_module_scss_1.default.Wrap,
|
|
239
|
-
style_module_scss_1.default['Tcate_' + Tcate],
|
|
240
|
-
style_module_scss_1.default['Tpos_' + Tpos],
|
|
241
|
-
style_module_scss_1.default['isNewSheet_' + isNewSheet],
|
|
242
|
-
].join(' '), width: 1, height: 0, ssAbsoluteCovered: true, freeCSS: {
|
|
243
|
-
zIndex: Object.keys(Comps.contents).length + 1
|
|
244
|
-
}, id: val_componentID },
|
|
245
|
-
React.createElement(_export_3.Column, { className: style_module_scss_1.default.Content, gap: 0, height: 'viewHeight', overflow: 'auto', transition: 'middle' },
|
|
246
|
-
isNewSheet ? React.createElement(Comps.TapSensor, { sheetID: sheetID, delegateAroundClick: (_a = params.closeOption) === null || _a === void 0 ? void 0 : _a.aroundClick }) : null,
|
|
247
|
-
React.createElement(ContentFC, __assign({ componentID: val_componentID }, val_params)))));
|
|
248
|
-
},
|
|
249
|
-
Types: {
|
|
250
|
-
Normal: function (params) {
|
|
251
|
-
var sheetID = params.sheetID, Content = params.content, _a = params.className, className = _a === void 0 ? '' : _a, type = params.type, _b = params.size, size = _b === void 0 ? 'R' : _b, freeCSS = params.freeCSS, styles = __rest(params, ["sheetID", "content", "className", "type", "size", "freeCSS"]);
|
|
252
|
-
var _c = __read(type.split('.'), 2), Tcate = _c[0], Tpos = _c[1];
|
|
253
|
-
var SysStyles = {};
|
|
254
|
-
var transformOrigins = [];
|
|
255
|
-
if (Tpos.match(/top/)) {
|
|
256
|
-
transformOrigins.push('top');
|
|
257
|
-
SysStyles.marginBottom = 'auto';
|
|
258
|
-
}
|
|
259
|
-
else if (Tpos.match(/middle/)) {
|
|
260
|
-
transformOrigins.push('center');
|
|
261
|
-
SysStyles.marginTop = 'auto';
|
|
262
|
-
SysStyles.marginBottom = 'auto';
|
|
263
|
-
}
|
|
264
|
-
else if (Tpos.match(/bottom/)) {
|
|
265
|
-
transformOrigins.push('bottom');
|
|
266
|
-
SysStyles.marginTop = 'auto';
|
|
267
|
-
}
|
|
268
|
-
if (Tpos.match(/left/i)) {
|
|
269
|
-
transformOrigins.push('left');
|
|
270
|
-
SysStyles.marginRight = 'auto';
|
|
271
|
-
}
|
|
272
|
-
else if (Tpos.match(/center/i)) {
|
|
273
|
-
transformOrigins.push('center');
|
|
274
|
-
SysStyles.marginLeft = 'auto';
|
|
275
|
-
SysStyles.marginRight = 'auto';
|
|
276
|
-
}
|
|
277
|
-
else if (Tpos.match(/right/i)) {
|
|
278
|
-
transformOrigins.push('right');
|
|
279
|
-
SysStyles.marginLeft = 'auto';
|
|
280
|
-
}
|
|
281
|
-
return (React.createElement(_export_2.Box, __assign({ className: [
|
|
282
|
-
style_module_scss_1.default.BB,
|
|
283
|
-
className
|
|
284
|
-
].join(' '), transition: 'long', opacity: 'trans' }, SysStyles, styles, { freeCSS: __assign({ width: {
|
|
285
|
-
'S': '26rem',
|
|
286
|
-
'R': '36rem',
|
|
287
|
-
'L': '44rem',
|
|
288
|
-
'2L': '60rem',
|
|
289
|
-
'3L': '72rem',
|
|
290
|
-
'MAX': '95vw'
|
|
291
|
-
}[size], maxWidth: '96vw', transformOrigin: transformOrigins.join(' ') }, freeCSS), children: $.is.function(Content) ? React.createElement(Content, null) : Content })));
|
|
292
|
-
},
|
|
293
|
-
Edge: function (params) {
|
|
294
|
-
var sheetID = params.sheetID, type = params.type, Content = params.content, _a = params.className, className = _a === void 0 ? '' : _a, _b = params.size, size = _b === void 0 ? 'R' : _b, freeCSS = params.freeCSS, styles = __rest(params, ["sheetID", "type", "content", "className", "size", "freeCSS"]);
|
|
295
|
-
return (React.createElement(_export_2.Box, __assign({ opacity: 'trans', transition: 'long', position: 'relative', backgroundColor: '1.layer.base', flexSizing: 'none', minHeight: 'viewHeight', boxShadow: 3, className: [
|
|
296
|
-
style_module_scss_1.default.BB,
|
|
297
|
-
className
|
|
298
|
-
].join(' ') }, type == 'drawer.right' ? {
|
|
299
|
-
marginLeft: 'auto'
|
|
300
|
-
} : type == 'drawer.left' ? {
|
|
301
|
-
marginRight: 'auto'
|
|
302
|
-
} : {}, styles, { freeCSS: __assign({ width: {
|
|
303
|
-
'S': '20rem',
|
|
304
|
-
'R': '27rem',
|
|
305
|
-
'L': '32rem',
|
|
306
|
-
'2L': '40rem',
|
|
307
|
-
'3L': '58rem',
|
|
308
|
-
'MAX': '95vw'
|
|
309
|
-
}[size] }, freeCSS), children: $.is.function(Content) ? React.createElement(Content, null) : Content })));
|
|
310
|
-
},
|
|
311
|
-
Bottom: function (params) {
|
|
312
|
-
var componentID = params.componentID, sheetID = params.sheetID, Content = params.content, _a = params.size, size = _a === void 0 ? 'R' : _a, sizeChanged = params.sizeChanged, baseStyles = params.baseStyles, _b = params.closeOption, _c = _b === void 0 ? {} : _b, _d = _c.swipeDown, swipeDown = _d === void 0 ? true : _d, styles = __rest(params, ["componentID", "sheetID", "content", "size", "sizeChanged", "baseStyles", "closeOption"]);
|
|
313
|
-
var screen = $.getScreenSize();
|
|
314
|
-
var sizeArray = [0, .2, .6, .95];
|
|
315
|
-
var SizeSets = {
|
|
316
|
-
'ZERO': 0,
|
|
317
|
-
'S': 1,
|
|
318
|
-
'R': 2,
|
|
319
|
-
'L': 3
|
|
320
|
-
};
|
|
321
|
-
var _e = __read(useState(size), 2), val_stableSize = _e[0], set_stableSize = _e[1];
|
|
322
|
-
var _f = __read(useState({
|
|
323
|
-
process: false,
|
|
324
|
-
processStart: 0,
|
|
325
|
-
originY: 0,
|
|
326
|
-
originValue: 0,
|
|
327
|
-
viewHeight: 0,
|
|
328
|
-
value: sizeArray[SizeSets[size]]
|
|
329
|
-
}), 2), val_edit = _f[0], set_edit = _f[1];
|
|
330
|
-
_export_1.useStore.update({
|
|
331
|
-
key: componentID,
|
|
332
|
-
value: {
|
|
333
|
-
val_edit: val_edit,
|
|
334
|
-
resize: function (size) {
|
|
335
|
-
var Size = sizeArray[SizeSets[size]];
|
|
336
|
-
set_edit(__assign(__assign({}, val_edit), { value: Size }));
|
|
337
|
-
set_stableSize(size);
|
|
338
|
-
}
|
|
339
|
-
}
|
|
340
|
-
});
|
|
341
|
-
var Effects = {
|
|
342
|
-
Start: function (event) {
|
|
343
|
-
$(document)
|
|
344
|
-
.addEvent({ eventID: 'BottomSheetMouseMove', eventType: 'mousemove', callback: Effects.Move })
|
|
345
|
-
.addEvent({ eventID: 'BottomSheetTouchMove', eventType: 'touchmove', callback: Effects.Move })
|
|
346
|
-
.addEvent({ eventID: 'BottomSheetMouseUp', eventType: 'mouseup', callback: Effects.End })
|
|
347
|
-
.addEvent({ eventID: 'BottomSheetTouchEnd', eventType: 'touchend', callback: Effects.End });
|
|
348
|
-
var cursor = $.getCursor(event);
|
|
349
|
-
var newEditInfo = __assign(__assign({}, val_edit), { process: true, processStart: new Date().getTime(), originY: cursor.y, originValue: val_edit.value, viewHeight: $.getScreenSize().height });
|
|
350
|
-
_export_1.useStore.update({
|
|
351
|
-
key: componentID,
|
|
352
|
-
value: {
|
|
353
|
-
val_edit: newEditInfo
|
|
354
|
-
}
|
|
355
|
-
});
|
|
356
|
-
set_edit(newEditInfo);
|
|
357
|
-
},
|
|
358
|
-
Move: function (event) {
|
|
359
|
-
var _a;
|
|
360
|
-
var editInfo = (_a = _export_1.useStore.get(componentID)) === null || _a === void 0 ? void 0 : _a.val_edit;
|
|
361
|
-
if (!editInfo.process)
|
|
362
|
-
return;
|
|
363
|
-
var margin = $.getCursor(event).y - editInfo.originY;
|
|
364
|
-
var marginRate = margin / editInfo.viewHeight;
|
|
365
|
-
var newRate = editInfo.originValue - marginRate;
|
|
366
|
-
if (newRate > .95) {
|
|
367
|
-
var margin_1 = newRate - .95;
|
|
368
|
-
newRate = .95 + margin_1 * .5;
|
|
369
|
-
}
|
|
370
|
-
else if (newRate < .2) {
|
|
371
|
-
var margin_2 = .2 - newRate;
|
|
372
|
-
margin_2 -= .1;
|
|
373
|
-
newRate = .1 + (.1 - margin_2) * .5;
|
|
374
|
-
}
|
|
375
|
-
set_edit(__assign(__assign({}, editInfo), { value: newRate }));
|
|
376
|
-
},
|
|
377
|
-
End: function (event) {
|
|
378
|
-
var _a;
|
|
379
|
-
var editInfo = (_a = _export_1.useStore.get(componentID)) === null || _a === void 0 ? void 0 : _a.val_edit;
|
|
380
|
-
if (!editInfo.process)
|
|
381
|
-
return;
|
|
382
|
-
$(document).removeEvent([
|
|
383
|
-
'BottomSheetMouseMove',
|
|
384
|
-
'BottomSheetTouchMove',
|
|
385
|
-
'BottomSheetMouseUp',
|
|
386
|
-
'BottomSheetTouchEnd'
|
|
387
|
-
]);
|
|
388
|
-
var sizeIndex = 0;
|
|
389
|
-
if (editInfo.value < .1) {
|
|
390
|
-
}
|
|
391
|
-
else if (editInfo.value < .5) {
|
|
392
|
-
sizeIndex = 1;
|
|
393
|
-
}
|
|
394
|
-
else if (editInfo.value > .75) {
|
|
395
|
-
sizeIndex = 3;
|
|
396
|
-
}
|
|
397
|
-
else {
|
|
398
|
-
sizeIndex = 2;
|
|
399
|
-
}
|
|
400
|
-
var ms = new Date().getTime() - editInfo.processStart;
|
|
401
|
-
if (ms < 300) {
|
|
402
|
-
var margin = $.getCursor(event).y - editInfo.originY;
|
|
403
|
-
if (Math.abs(margin) >= 20) {
|
|
404
|
-
var dir = Number(margin < 0) * 2 - 1;
|
|
405
|
-
sizeIndex += dir;
|
|
406
|
-
sizeIndex = Math.min(Math.max(sizeIndex, 0), sizeArray.length - 1);
|
|
407
|
-
}
|
|
408
|
-
}
|
|
409
|
-
if (sizeIndex == 0) {
|
|
410
|
-
if (!swipeDown)
|
|
411
|
-
sizeIndex = 1;
|
|
412
|
-
}
|
|
413
|
-
set_stableSize(['ZERO', 'S', 'R', 'L'][sizeIndex]);
|
|
414
|
-
set_edit(__assign(__assign({}, editInfo), { value: sizeArray[sizeIndex], process: false }));
|
|
415
|
-
}
|
|
416
|
-
};
|
|
417
|
-
var mounted = React.useRef(false);
|
|
418
|
-
useEffect(function () {
|
|
419
|
-
if (mounted.current) {
|
|
420
|
-
if (val_stableSize == 'ZERO') {
|
|
421
|
-
if (swipeDown)
|
|
422
|
-
Sheet.close(sheetID);
|
|
423
|
-
}
|
|
424
|
-
else {
|
|
425
|
-
setTimeout(function () {
|
|
426
|
-
if (params.sizeChanged)
|
|
427
|
-
params.sizeChanged(val_stableSize);
|
|
428
|
-
}, 250);
|
|
429
|
-
}
|
|
430
|
-
}
|
|
431
|
-
else {
|
|
432
|
-
mounted.current = true;
|
|
433
|
-
}
|
|
434
|
-
}, [val_stableSize]);
|
|
435
|
-
return (React.createElement(_export_2.Box, { className: style_module_scss_1.default.BB, margin: [0, 'auto'], marginTop: 'auto', opacity: 'trans', width: 1, transition: 'long', freeCSS: __assign({ maxWidth: 12 * 60, height: screen.height * val_edit.value }, val_edit.process ? {
|
|
436
|
-
transition: '0s'
|
|
437
|
-
} : {}) },
|
|
438
|
-
React.createElement(_export_3.Column, __assign({ gap: 0, flexSizing: 'none', borderTopLeftRadius: '1.tone.primary', borderTopRightRadius: '1.tone.primary', border: true, borderBottom: 'unset', boxShadow: 3, position: 'relative', overflow: 'hidden', height: 1 }, baseStyles),
|
|
439
|
-
React.createElement(_export_2.Flex, { verticalAlign: 'center', flexChilds: 'even', padding: '1/2', backgroundColor: '1.layer.base', position: 'relative', freeCSS: {
|
|
440
|
-
userSelect: 'none'
|
|
441
|
-
} },
|
|
442
|
-
React.createElement(_export_3.Row.Center, null,
|
|
443
|
-
React.createElement(_export_2.Box, { padding: '2/3', onMouseDown: Effects.Start, onTouchStart: Effects.Start, ssPushable: true, isRounded: true, freeCSS: {
|
|
444
|
-
cursor: 'grab',
|
|
445
|
-
userSelect: 'none'
|
|
446
|
-
} },
|
|
447
|
-
React.createElement(_export_2.Box, { unitWidth: 6, unitHeight: '1/2', backgroundColor: '5.layer.darker', isRounded: true, className: style_module_scss_1.default.DragBar }))),
|
|
448
|
-
React.createElement(_export_3.Row.Right, null,
|
|
449
|
-
React.createElement(_export_4.Buttons.Button.Sub.R, { color: 'cloud', ssSphere: 2, onClick: function () {
|
|
450
|
-
Sheet.close(sheetID);
|
|
451
|
-
} },
|
|
452
|
-
React.createElement(_export_2.FAIcon.Times, null)))),
|
|
453
|
-
React.createElement(_export_2.Box, __assign({ backgroundColor: '1.layer.base', flexSizing: 0, overflow: 'auto' }, styles, { children: $.is.function(Content) ? React.createElement(Content, null) : Content })))));
|
|
454
|
-
},
|
|
455
|
-
Custom: function (params) {
|
|
456
|
-
var sheetID = params.sheetID, parent = params.parent, _a = params.gravityPoint, GPT = _a === void 0 ? 22 : _a, Content = params.content, others = __rest(params, ["sheetID", "parent", "gravityPoint", "content"]);
|
|
457
|
-
var _b = __read(React.useState($.uuidGen()), 1), val_componentID = _b[0];
|
|
458
|
-
var Parent = $(parent);
|
|
459
|
-
var Query = '[data-sheet-id="' + val_componentID + '"]';
|
|
460
|
-
var ContentQuery = '[data-sheet-content="' + val_componentID + '"]';
|
|
461
|
-
GPT = GPT;
|
|
462
|
-
var column = GPT % 5 || 5;
|
|
463
|
-
var row = Math.ceil(GPT / 5);
|
|
464
|
-
var getWrapperCSS = function () {
|
|
465
|
-
var WrapperCSS = {};
|
|
466
|
-
var _a = Parent.position(), top = _a.top, right = _a.right, bottom = _a.bottom, left = _a.left, height = _a.height, width = _a.width;
|
|
467
|
-
if ([1, 2].includes(column)) {
|
|
468
|
-
WrapperCSS.left = left;
|
|
469
|
-
}
|
|
470
|
-
else if (column == 3) {
|
|
471
|
-
WrapperCSS.left = left + width / 2;
|
|
472
|
-
}
|
|
473
|
-
else if ([4, 5].includes(column)) {
|
|
474
|
-
WrapperCSS.left = right;
|
|
475
|
-
}
|
|
476
|
-
if (GPT <= 10) {
|
|
477
|
-
WrapperCSS.top = top;
|
|
478
|
-
}
|
|
479
|
-
else if (GPT <= 15) {
|
|
480
|
-
WrapperCSS.top = top + height / 2;
|
|
481
|
-
}
|
|
482
|
-
else if (GPT <= 25) {
|
|
483
|
-
WrapperCSS.top = bottom;
|
|
484
|
-
}
|
|
485
|
-
return WrapperCSS;
|
|
486
|
-
};
|
|
487
|
-
var _c = __read(React.useState(getWrapperCSS()), 2), val_Styles = _c[0], set_Styles = _c[1];
|
|
488
|
-
var AdjustExtrusion = function () {
|
|
489
|
-
var ContentRect = $(ContentQuery).position();
|
|
490
|
-
var screen = $.getScreenSize();
|
|
491
|
-
var newStyles = __assign({}, val_Styles);
|
|
492
|
-
if (ContentRect.top < 0) {
|
|
493
|
-
if (ContentRect.height < screen.height) {
|
|
494
|
-
newStyles.top = ContentRect.top - ContentRect.top;
|
|
495
|
-
}
|
|
496
|
-
}
|
|
497
|
-
if (ContentRect.left < 0) {
|
|
498
|
-
if (ContentRect.width < screen.width) {
|
|
499
|
-
newStyles.left = ContentRect.left - ContentRect.left;
|
|
500
|
-
}
|
|
501
|
-
}
|
|
502
|
-
if (ContentRect.right > screen.width) {
|
|
503
|
-
if (ContentRect.width < screen.width) {
|
|
504
|
-
var shift = ContentRect.right - screen.width;
|
|
505
|
-
newStyles.left = ContentRect.left - shift;
|
|
506
|
-
}
|
|
507
|
-
}
|
|
508
|
-
if (ContentRect.bottom > screen.height) {
|
|
509
|
-
if (ContentRect.height < screen.height) {
|
|
510
|
-
var shift = ContentRect.bottom - screen.height;
|
|
511
|
-
newStyles.top = ContentRect.top - shift;
|
|
512
|
-
}
|
|
513
|
-
}
|
|
514
|
-
return newStyles;
|
|
515
|
-
};
|
|
516
|
-
React.useEffect(function () {
|
|
517
|
-
$(Query)
|
|
518
|
-
.await(10)
|
|
519
|
-
.addClass(style_module_scss_1.default.Open)
|
|
520
|
-
.await(250)
|
|
521
|
-
.callback(function () {
|
|
522
|
-
set_Styles(AdjustExtrusion());
|
|
523
|
-
});
|
|
524
|
-
_export_1.useStore.update({
|
|
525
|
-
key: 'customSheet-' + params.sheetID,
|
|
526
|
-
value: {
|
|
527
|
-
reposition: function () {
|
|
528
|
-
setTimeout(function () {
|
|
529
|
-
set_Styles(AdjustExtrusion());
|
|
530
|
-
}, 200);
|
|
531
|
-
}
|
|
532
|
-
}
|
|
533
|
-
});
|
|
534
|
-
}, []);
|
|
535
|
-
if (!Parent[0])
|
|
536
|
-
return (null);
|
|
537
|
-
return (React.createElement(_export_2.Box, { className: [
|
|
538
|
-
style_module_scss_1.default.BB,
|
|
539
|
-
style_module_scss_1.default.CustomSheet
|
|
540
|
-
].join(' '), "data-sheet-id": val_componentID, transition: 'long', opacity: 'trans', position: 'absolute', width: 0, height: 0, flexCenter: true, freeCSS: val_Styles },
|
|
541
|
-
React.createElement(_export_2.Flex, { className: [
|
|
542
|
-
style_module_scss_1.default.GPT,
|
|
543
|
-
style_module_scss_1.default['GPT_' + GPT],
|
|
544
|
-
style_module_scss_1.default['Col_' + column],
|
|
545
|
-
style_module_scss_1.default['Row_' + row],
|
|
546
|
-
].join(' '), position: 'absolute' },
|
|
547
|
-
React.createElement(_export_2.Box, __assign({ flexSizing: 'none', "data-sheet-content": val_componentID }, others, { children: $.is.function(Content) ? React.createElement(Content, null) : Content })))));
|
|
548
|
-
},
|
|
549
|
-
},
|
|
550
|
-
TapSensor: function (params) { return (React.createElement(_export_4.Buttons.Button.Plain, { className: style_module_scss_1.default.TapSensor, onClick: function () {
|
|
551
|
-
var _a;
|
|
552
|
-
if ((_a = params.delegateAroundClick) !== null && _a !== void 0 ? _a : false)
|
|
553
|
-
Sheet.close(params.sheetID);
|
|
554
|
-
}, freeCSS: {
|
|
555
|
-
cursor: 'default'
|
|
556
|
-
} },
|
|
557
|
-
React.createElement(_export_2.Box, { className: style_module_scss_1.default.TapContent }))); }
|
|
558
|
-
};
|
|
559
|
-
$(document)
|
|
560
|
-
.addEvent({
|
|
561
|
-
eventType: 'keyup',
|
|
562
|
-
callback: function (event) {
|
|
563
|
-
var _a = event, key = _a.key, metaKey = _a.metaKey;
|
|
564
|
-
if (key == 'Escape' || key == ',' && metaKey) {
|
|
565
|
-
var OpenSheets = Object.values(Comps.contents).filter(function (elm) { return elm.open; });
|
|
566
|
-
if (!OpenSheets.length)
|
|
567
|
-
return;
|
|
568
|
-
var latestSheet = OpenSheets.reduce(function (a, b) {
|
|
569
|
-
return a.created_at.value > b.created_at.value ? a : b;
|
|
570
|
-
});
|
|
571
|
-
Sheet.close(latestSheet.params.sheetID);
|
|
572
|
-
}
|
|
573
|
-
}
|
|
574
|
-
})
|
|
575
|
-
.addEvent({
|
|
576
|
-
eventType: 'click',
|
|
577
|
-
callback: function (event) {
|
|
578
|
-
var _a;
|
|
579
|
-
var customSheets = Object.values(Comps.contents).filter(function (elm) { return elm.params.type == 'custom'; });
|
|
580
|
-
if (!customSheets.length)
|
|
581
|
-
return;
|
|
582
|
-
var isParent = !!customSheets.find(function (customSheet) {
|
|
583
|
-
var params = customSheet.params;
|
|
584
|
-
var Parent = $(params.parent);
|
|
585
|
-
var Target = $(event.target);
|
|
586
|
-
return Parent[0] == Target[0] || !!Parent.find(Target).length;
|
|
587
|
-
});
|
|
588
|
-
if (isParent)
|
|
589
|
-
return;
|
|
590
|
-
if ((_a = event.target) === null || _a === void 0 ? void 0 : _a.closest('.' + style_module_scss_1.default.CustomSheet))
|
|
591
|
-
return;
|
|
592
|
-
customSheets.forEach(function (customSheets) {
|
|
593
|
-
var _a;
|
|
594
|
-
if (!!((_a = customSheets.params.closeOption) === null || _a === void 0 ? void 0 : _a.aroundClick)) {
|
|
595
|
-
Sheet.close(customSheets.params.sheetID);
|
|
596
|
-
}
|
|
597
|
-
});
|
|
598
|
-
}
|
|
599
|
-
});
|
|
600
|
-
var Sheet = {
|
|
601
|
-
open: function (params) {
|
|
602
|
-
params.sheetID = (params.sheetID || '').replace(/\./g, '-');
|
|
603
|
-
if (params.type == 'image') {
|
|
604
|
-
var _a = params, type = _a.type, _b = _a.sheetID, sheetID_1 = _b === void 0 ? $.uuidGen() : _b, src_1 = _a.src, others = __rest(_a, ["type", "sheetID", "src"]);
|
|
605
|
-
Sheet.open(__assign(__assign({ type: 'normal.topCenter', sheetID: sheetID_1, backgroundColor: 'trans', boxShadow: 'none' }, others), { closeOption: __assign({}, params.closeOption), freeCSS: {
|
|
606
|
-
maxWidth: '96vw',
|
|
607
|
-
transformOrigin: 'top'
|
|
608
|
-
}, content: function () {
|
|
609
|
-
var _a = __read(useState($.flatArray(src_1)), 1), val_image = _a[0];
|
|
610
|
-
var _b = __read(useState(0), 2), val_viewIndex = _b[0], set_viewIndex = _b[1];
|
|
611
|
-
var Radio = [];
|
|
612
|
-
var Slides = [];
|
|
613
|
-
val_image.forEach(function (src, index) {
|
|
614
|
-
Radio.push({
|
|
615
|
-
value: index,
|
|
616
|
-
label: React.createElement(_export_2.Img, { src: $.flatArray(src)[0], width: 'auto', height: 1, freeCSS: {
|
|
617
|
-
maxHeight: 12 * 3
|
|
618
|
-
} })
|
|
619
|
-
});
|
|
620
|
-
Slides.push(React.createElement(_export_2.Img, { width: 1, height: 'auto', src: $.flatArray(src)[0] }));
|
|
621
|
-
});
|
|
622
|
-
return (React.createElement(_export_3.Column, { gap: 0 },
|
|
623
|
-
React.createElement(_export_3.Row.Separate, { gap: 2, padding: 1, backgroundColor: '1.layer.base', borderTopLeftRadius: '1.tone.primary', borderTopRightRadius: '1.tone.primary' },
|
|
624
|
-
React.createElement(_export_4.Input.Radio, { tone: 'border', icon: false, value: val_viewIndex, override: 'force', horizontalAlign: 'center', onUpdateValidValue: function (_a) {
|
|
625
|
-
var value = _a.value;
|
|
626
|
-
set_viewIndex(value[0]);
|
|
627
|
-
}, cellStyles: {
|
|
628
|
-
borderWidth: 2,
|
|
629
|
-
padding: '1/3'
|
|
630
|
-
}, options: Radio }),
|
|
631
|
-
React.createElement(_export_4.Buttons.Button.Sub.R, { color: 'cloud', ssSphere: 3, fontSize: '4.thirdTitle', onClick: function () {
|
|
632
|
-
Sheet.close(sheetID_1);
|
|
633
|
-
} },
|
|
634
|
-
React.createElement(_export_2.FAIcon.Times, null))),
|
|
635
|
-
React.createElement(_export_4.Layout.SwipeView, { slideIndex: val_viewIndex, options: {
|
|
636
|
-
loop: val_image.length > 1,
|
|
637
|
-
onSlideCallback: function (index) {
|
|
638
|
-
set_viewIndex(index);
|
|
639
|
-
}
|
|
640
|
-
}, slides: Slides, wrapper: function (View) { return (React.createElement(_export_2.Box, { borderBottomLeftRadius: '1.tone.primary', borderBottomRightRadius: '1.tone.primary' }, View)); } })));
|
|
641
|
-
} }));
|
|
642
|
-
return;
|
|
643
|
-
}
|
|
644
|
-
Comps.Launch(params);
|
|
645
|
-
},
|
|
646
|
-
refresh: function (params, open) {
|
|
647
|
-
params.sheetID = (params.sheetID || '').replace(/\./g, '-');
|
|
648
|
-
var component = _export_1.useStore.get(params.sheetID);
|
|
649
|
-
if (component && component.refresh)
|
|
650
|
-
component.refresh(params, open);
|
|
651
|
-
},
|
|
652
|
-
resize: function (params) {
|
|
653
|
-
params.sheetID = (params.sheetID || '').replace(/\./g, '-');
|
|
654
|
-
var component = _export_1.useStore.get(params.sheetID);
|
|
655
|
-
if (component && component.resize)
|
|
656
|
-
component.resize(params.size);
|
|
657
|
-
},
|
|
658
|
-
reposition: function (sheetID) {
|
|
659
|
-
var Comps = _export_1.useStore.get('customSheet-' + sheetID);
|
|
660
|
-
if (Comps && Comps.reposition)
|
|
661
|
-
Comps.reposition();
|
|
662
|
-
},
|
|
663
|
-
close: function (sheetID, et) {
|
|
664
|
-
var _a;
|
|
665
|
-
var Content;
|
|
666
|
-
sheetID = sheetID === null || sheetID === void 0 ? void 0 : sheetID.replace(/\./g, '-');
|
|
667
|
-
Content = Comps.contents[sheetID];
|
|
668
|
-
if (!Content)
|
|
669
|
-
return;
|
|
670
|
-
if (et == 'escape' && !((_a = Content.params.closeOption) === null || _a === void 0 ? void 0 : _a.escapeKeyDown))
|
|
671
|
-
return;
|
|
672
|
-
{
|
|
673
|
-
var params = Content.params;
|
|
674
|
-
var sheetID_2 = params.sheetID;
|
|
675
|
-
var component = _export_1.useStore.get(sheetID_2);
|
|
676
|
-
if (component && component.close)
|
|
677
|
-
component.close();
|
|
678
|
-
}
|
|
679
|
-
},
|
|
680
|
-
closeGroup: function (sheetGroup) {
|
|
681
|
-
var e_1, _a;
|
|
682
|
-
var _b;
|
|
683
|
-
sheetGroup = (sheetGroup || '').replace(/\./g, '-');
|
|
684
|
-
try {
|
|
685
|
-
for (var _c = __values(Object.entries(Comps.contents)), _d = _c.next(); !_d.done; _d = _c.next()) {
|
|
686
|
-
var _e = __read(_d.value, 2), key = _e[0], value = _e[1];
|
|
687
|
-
if ((_b = value.params.sheetGroups) === null || _b === void 0 ? void 0 : _b.includes(sheetGroup))
|
|
688
|
-
Sheet.close(key);
|
|
689
|
-
}
|
|
690
|
-
}
|
|
691
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
692
|
-
finally {
|
|
693
|
-
try {
|
|
694
|
-
if (_d && !_d.done && (_a = _c.return)) _a.call(_c);
|
|
695
|
-
}
|
|
696
|
-
finally { if (e_1) throw e_1.error; }
|
|
697
|
-
}
|
|
698
|
-
},
|
|
699
|
-
closeAll: function (pageTransit) {
|
|
700
|
-
var e_2, _a;
|
|
701
|
-
var _b;
|
|
702
|
-
try {
|
|
703
|
-
for (var _c = __values(Object.entries(Comps.contents)), _d = _c.next(); !_d.done; _d = _c.next()) {
|
|
704
|
-
var _e = __read(_d.value, 2), key = _e[0], value = _e[1];
|
|
705
|
-
if (pageTransit) {
|
|
706
|
-
if (((_b = value.params.closeOption) === null || _b === void 0 ? void 0 : _b.pageTransit) == false)
|
|
707
|
-
continue;
|
|
708
|
-
}
|
|
709
|
-
Sheet.close(key, 'pageTransit');
|
|
710
|
-
}
|
|
711
|
-
}
|
|
712
|
-
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
713
|
-
finally {
|
|
714
|
-
try {
|
|
715
|
-
if (_d && !_d.done && (_a = _c.return)) _a.call(_c);
|
|
716
|
-
}
|
|
717
|
-
finally { if (e_2) throw e_2.error; }
|
|
718
|
-
}
|
|
719
|
-
},
|
|
720
|
-
Comps: {
|
|
721
|
-
Body: function (params) { return (React.createElement(_export_2.Box, __assign({ className: style_module_scss_1.default.BaseBody, backgroundColor: '1.layer.base', borderRadius: '1.tone.primary', position: 'relative', boxShadow: 3, transition: 'long' }, params))); },
|
|
722
|
-
}
|
|
723
|
-
};
|
|
724
|
-
exports.Sheet = Sheet;
|