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.
- package/dist/@comps/@core/bios.d.ts +14 -0
- package/dist/@comps/@core/bios.js +228 -0
- package/dist/@comps/@core/exe.d.ts +9 -0
- package/dist/@comps/@core/exe.js +12 -0
- package/dist/@comps/@core/jsminAmotifyExtension/_.d.ts +4 -0
- package/dist/@comps/@core/jsminAmotifyExtension/_.js +6 -0
- package/dist/@comps/@core/jsminAmotifyExtension/fetch.d.ts +9 -0
- package/dist/@comps/@core/jsminAmotifyExtension/fetch.js +199 -0
- package/dist/@comps/@core/jsminAmotifyExtension/formCollect.d.ts +1 -0
- package/dist/@comps/@core/jsminAmotifyExtension/formCollect.js +137 -0
- package/dist/@comps/@core/jsminAmotifyExtension/spreadSheet.d.ts +4 -0
- package/dist/@comps/@core/jsminAmotifyExtension/spreadSheet.js +314 -0
- package/dist/@comps/@core/jsminAmotifyExtension/variables.d.ts +0 -0
- package/dist/@comps/@core/jsminAmotifyExtension/variables.js +186 -0
- package/dist/@comps/@core/styleConverter.d.ts +2 -0
- package/dist/@comps/@core/styleConverter.js +349 -0
- package/dist/@comps/Atoms/@export.d.ts +4 -0
- package/dist/@comps/Atoms/@export.js +29 -0
- package/dist/@comps/Atoms/FAIcon/parts.d.ts +2 -0
- package/dist/@comps/Atoms/FAIcon/parts.js +153 -0
- package/dist/@comps/Atoms/Logo/parts.d.ts +1 -0
- package/dist/@comps/Atoms/Logo/parts.js +154 -0
- package/dist/@comps/Atoms/Various/parts.d.ts +9 -0
- package/dist/@comps/Atoms/Various/parts.js +113 -0
- package/dist/@comps/Functions/@export.d.ts +12 -0
- package/dist/@comps/Functions/@export.js +38 -0
- package/dist/@comps/Functions/Button/_.d.ts +1 -0
- package/dist/@comps/Functions/Button/_.js +270 -0
- package/dist/@comps/Functions/Cropper/parts.d.ts +1 -0
- package/dist/@comps/Functions/Cropper/parts.js +783 -0
- package/dist/@comps/Functions/Effects/Fade.d.ts +1 -0
- package/dist/@comps/Functions/Effects/Fade.js +80 -0
- package/dist/@comps/Functions/Effects/Ripple.d.ts +1 -0
- package/dist/@comps/Functions/Effects/Ripple.js +107 -0
- package/dist/@comps/Functions/Effects/_.d.ts +3 -0
- package/dist/@comps/Functions/Effects/_.js +43 -0
- package/dist/@comps/Functions/Input/Chips/Selector.d.ts +1 -0
- package/dist/@comps/Functions/Input/Chips/Selector.js +356 -0
- package/dist/@comps/Functions/Input/Chips/_.d.ts +2 -0
- package/dist/@comps/Functions/Input/Chips/_.js +218 -0
- package/dist/@comps/Functions/Input/DigitCharacters.d.ts +1 -0
- package/dist/@comps/Functions/Input/DigitCharacters.js +178 -0
- package/dist/@comps/Functions/Input/File/_.d.ts +2 -0
- package/dist/@comps/Functions/Input/File/_.js +458 -0
- package/dist/@comps/Functions/Input/Hidden.d.ts +1 -0
- package/dist/@comps/Functions/Input/Hidden.js +30 -0
- package/dist/@comps/Functions/Input/List/_.d.ts +1 -0
- package/dist/@comps/Functions/Input/List/_.js +232 -0
- package/dist/@comps/Functions/Input/Segmented/_.d.ts +1 -0
- package/dist/@comps/Functions/Input/Segmented/_.js +111 -0
- package/dist/@comps/Functions/Input/Select/_.d.ts +1 -0
- package/dist/@comps/Functions/Input/Select/_.js +154 -0
- package/dist/@comps/Functions/Input/Slider/_.d.ts +1 -0
- package/dist/@comps/Functions/Input/Slider/_.js +308 -0
- package/dist/@comps/Functions/Input/Switch/_.d.ts +1 -0
- package/dist/@comps/Functions/Input/Switch/_.js +120 -0
- package/dist/@comps/Functions/Input/Text.d.ts +5 -0
- package/dist/@comps/Functions/Input/Text.js +340 -0
- package/dist/@comps/Functions/Input/TextArea.d.ts +1 -0
- package/dist/@comps/Functions/Input/TextArea.js +98 -0
- package/dist/@comps/Functions/Input/Time/Picker.d.ts +1 -0
- package/dist/@comps/Functions/Input/Time/Picker.js +581 -0
- package/dist/@comps/Functions/Input/Time/_.d.ts +2 -0
- package/dist/@comps/Functions/Input/Time/_.js +567 -0
- package/dist/@comps/Functions/Input/_.d.ts +5 -0
- package/dist/@comps/Functions/Input/_.js +446 -0
- package/dist/@comps/Functions/Input/core.d.ts +34 -0
- package/dist/@comps/Functions/Input/core.js +324 -0
- package/dist/@comps/Functions/Inputs/_.d.ts +3 -0
- package/dist/@comps/Functions/Inputs/_.js +7 -0
- package/dist/@comps/Functions/Inputs/text.d.ts +12 -0
- package/dist/@comps/Functions/Inputs/text.js +46 -0
- package/dist/@comps/Functions/Layout/PageNotFound.d.ts +1 -0
- package/dist/@comps/Functions/Layout/PageNotFound.js +30 -0
- package/dist/@comps/Functions/Layout/PageRouter.d.ts +2 -0
- package/dist/@comps/Functions/Layout/PageRouter.js +65 -0
- package/dist/@comps/Functions/Layout/PageViewController/parts.d.ts +1 -0
- package/dist/@comps/Functions/Layout/PageViewController/parts.js +30 -0
- package/dist/@comps/Functions/Layout/Plate.d.ts +1 -0
- package/dist/@comps/Functions/Layout/Plate.js +39 -0
- package/dist/@comps/Functions/Layout/RootViewController/parts.d.ts +1 -0
- package/dist/@comps/Functions/Layout/RootViewController/parts.js +202 -0
- package/dist/@comps/Functions/Layout/SwipeView/parts.d.ts +2 -0
- package/dist/@comps/Functions/Layout/SwipeView/parts.js +319 -0
- package/dist/@comps/Functions/Layout/TabBar.d.ts +1 -0
- package/dist/@comps/Functions/Layout/TabBar.js +49 -0
- package/dist/@comps/Functions/Layout/_.d.ts +2 -0
- package/dist/@comps/Functions/Layout/_.js +20 -0
- package/dist/@comps/Functions/Loader/corner.d.ts +1 -0
- package/dist/@comps/Functions/Loader/corner.js +59 -0
- package/dist/@comps/Functions/Loader/mini.d.ts +33 -0
- package/dist/@comps/Functions/Loader/mini.js +126 -0
- package/dist/@comps/Functions/Loader/parts.d.ts +3 -0
- package/dist/@comps/Functions/Loader/parts.js +108 -0
- package/dist/@comps/Functions/Loader/top.d.ts +1 -0
- package/dist/@comps/Functions/Loader/top.js +69 -0
- package/dist/@comps/Functions/Sheet/parts.d.ts +2 -0
- package/dist/@comps/Functions/Sheet/parts.js +724 -0
- package/dist/@comps/Functions/SnackBar/parts.d.ts +2 -0
- package/dist/@comps/Functions/SnackBar/parts.js +171 -0
- package/dist/@comps/Functions/Table/Data/parts.d.ts +3 -0
- package/dist/@comps/Functions/Table/Data/parts.js +629 -0
- package/dist/@comps/Functions/Table/Drag/parts.d.ts +1 -0
- package/dist/@comps/Functions/Table/Drag/parts.js +359 -0
- package/dist/@comps/Functions/Table/Normal/parts.d.ts +1 -0
- package/dist/@comps/Functions/Table/Normal/parts.js +92 -0
- package/dist/@comps/Functions/Table/_.d.ts +9 -0
- package/dist/@comps/Functions/Table/_.js +153 -0
- package/dist/@comps/Functions/Tooltips/parts.d.ts +2 -0
- package/dist/@comps/Functions/Tooltips/parts.js +71 -0
- package/dist/@comps/Molecules/@export.d.ts +21 -0
- package/dist/@comps/Molecules/@export.js +50 -0
- package/dist/@comps/Molecules/Accordion/parts.d.ts +2 -0
- package/dist/@comps/Molecules/Accordion/parts.js +165 -0
- package/dist/@comps/Molecules/LinkifyText/parts.d.ts +1 -0
- package/dist/@comps/Molecules/LinkifyText/parts.js +39 -0
- package/dist/@comps/Molecules/List.d.ts +1 -0
- package/dist/@comps/Molecules/List.js +35 -0
- package/dist/@comps/Organisms/@export.d.ts +2 -0
- package/dist/@comps/Organisms/@export.js +9 -0
- package/dist/@comps/Organisms/DisplayStyleInput/_.d.ts +1 -0
- package/dist/@comps/Organisms/DisplayStyleInput/_.js +15 -0
- package/dist/@comps/Organisms/DisplayStyleInput/darkmode.d.ts +1 -0
- package/dist/@comps/Organisms/DisplayStyleInput/darkmode.js +77 -0
- package/dist/@comps/Organisms/DisplayStyleInput/themeColor.d.ts +27 -0
- package/dist/@comps/Organisms/DisplayStyleInput/themeColor.js +185 -0
- package/dist/@comps/Templates/@export.d.ts +2 -0
- package/dist/@comps/Templates/@export.js +9 -0
- package/dist/@comps/Templates/PlayGround/parts.d.ts +1 -0
- package/dist/@comps/Templates/PlayGround/parts.js +55 -0
- package/dist/@types/_.d.ts +6 -0
- package/dist/@types/_.js +8 -0
- package/dist/@types/amot.d.ts +260 -0
- package/dist/@types/amot.js +2 -0
- package/dist/@types/fn.d.ts +1040 -0
- package/dist/@types/fn.js +2 -0
- package/dist/@types/index.d.ts +59 -0
- package/dist/@types/index.js +2 -0
- package/dist/@types/jsminAmotifyExtension.d.ts +134 -0
- package/dist/@types/jsminAmotifyExtension.js +2 -0
- package/dist/@types/module.d.ts +2 -0
- package/dist/@types/module.js +1 -0
- package/dist/@types/state.d.ts +145 -0
- package/dist/@types/state.js +2 -0
- package/dist/launch.d.ts +3 -0
- package/dist/launch.js +282 -0
- package/package.json +65 -0
- package/tsconfig.json +48 -0
|
@@ -0,0 +1,202 @@
|
|
|
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.RootViewController = void 0;
|
|
56
|
+
var _global_1 = require("@global");
|
|
57
|
+
var _atoms_1 = require("@atoms");
|
|
58
|
+
var _mols_1 = require("@mols");
|
|
59
|
+
var _functions_1 = require("@functions");
|
|
60
|
+
var style_module_scss_1 = __importDefault(require("./style.module.scss"));
|
|
61
|
+
exports.RootViewController = {
|
|
62
|
+
Base: function (params) {
|
|
63
|
+
var topNavigation = params.topNavigation, sideNavigation = params.sideNavigation, footerNavigation = params.footerNavigation, children = params.children, className = params.className, others = __rest(params, ["topNavigation", "sideNavigation", "footerNavigation", "children", "className"]);
|
|
64
|
+
var Key = _global_1.useRecycle.set('RootViewController');
|
|
65
|
+
_global_1.React.useEffect(function () {
|
|
66
|
+
calcHeights();
|
|
67
|
+
setTimeout(function () {
|
|
68
|
+
calcHeights();
|
|
69
|
+
}, 100);
|
|
70
|
+
var getSideNavigationHeight = 'ResizeCB';
|
|
71
|
+
var beforeunload = 'RemovePageEventCB';
|
|
72
|
+
$(window).addEvent({
|
|
73
|
+
eventType: 'resize',
|
|
74
|
+
eventID: getSideNavigationHeight,
|
|
75
|
+
callback: function () {
|
|
76
|
+
if (!amotify.config.device.isPhonepoint())
|
|
77
|
+
calcHeights();
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
return function () {
|
|
81
|
+
$(window).removeEvent(beforeunload);
|
|
82
|
+
$(window).removeEvent(getSideNavigationHeight);
|
|
83
|
+
};
|
|
84
|
+
}, []);
|
|
85
|
+
var Chilren = children;
|
|
86
|
+
return (_global_1.React.createElement(_mols_1.Column, __assign({ key: Key, className: [
|
|
87
|
+
className,
|
|
88
|
+
style_module_scss_1.default.Root,
|
|
89
|
+
].join(' '), backgroundColor: '1.layer.base' }, others, { gap: 0, minHeight: 'viewHeight' }),
|
|
90
|
+
topNavigation,
|
|
91
|
+
_global_1.React.createElement(_atoms_1.Flex, { className: style_module_scss_1.default.Body, flexWrap: false, position: 'relative', flexSizing: 0 },
|
|
92
|
+
sideNavigation,
|
|
93
|
+
_global_1.React.createElement(_atoms_1.Box, { className: style_module_scss_1.default.Content, position: 'relative', flexSizing: 0, width: 0, UnderBreakPointStyles: {
|
|
94
|
+
width: 1
|
|
95
|
+
} }, Chilren)),
|
|
96
|
+
footerNavigation));
|
|
97
|
+
},
|
|
98
|
+
TopNavigation: function (params) {
|
|
99
|
+
var className = params.className, children = params.children, others = __rest(params, ["className", "children"]);
|
|
100
|
+
var _a = __read(_global_1.React.useState($.uuidGen()), 1), val_componentID = _a[0];
|
|
101
|
+
_global_1.React.useEffect(function () {
|
|
102
|
+
var height = $("[data-id=\"".concat(val_componentID, "\"]")).position().height;
|
|
103
|
+
height = height | 0;
|
|
104
|
+
var topBase = height;
|
|
105
|
+
if ($('#TopNavigation').getStyleProperty('position') != 'sticky') {
|
|
106
|
+
topBase = 0;
|
|
107
|
+
}
|
|
108
|
+
$(document.body)
|
|
109
|
+
.setStyleProperty('--topNavHeight', height + 'px')
|
|
110
|
+
.setStyleProperty('--topBase', topBase + 'px');
|
|
111
|
+
}, []);
|
|
112
|
+
return (_global_1.React.createElement(_atoms_1.Flex, __assign({ key: val_componentID, "data-id": val_componentID, flexSizing: 'none', flexType: 'col', position: 'sticky', top: 0, backgroundColor: '1.layer.base' }, others, { id: 'TopNavigation', className: [
|
|
113
|
+
className,
|
|
114
|
+
style_module_scss_1.default.TopNav
|
|
115
|
+
].join(' ') }),
|
|
116
|
+
_global_1.React.createElement(_atoms_1.Box, { position: 'absolute', left: 0, right: 0, backgroundColor: 'inherit', className: style_module_scss_1.default.TopCover, freeCSS: {
|
|
117
|
+
top: '-1rem',
|
|
118
|
+
height: '2rem',
|
|
119
|
+
zIndex: -1
|
|
120
|
+
} }),
|
|
121
|
+
children));
|
|
122
|
+
},
|
|
123
|
+
SideNavigation: function (params) {
|
|
124
|
+
var _a = params.className, className = _a === void 0 ? '' : _a, baseStyles = params.baseStyles, others = __rest(params, ["className", "baseStyles"]);
|
|
125
|
+
return (_global_1.React.createElement(_atoms_1.Box, __assign({ flexSizing: 'none', className: [
|
|
126
|
+
className,
|
|
127
|
+
style_module_scss_1.default.SideNav
|
|
128
|
+
].join(' '), minHeight: 'sideNavigationHeight' }, others)));
|
|
129
|
+
},
|
|
130
|
+
FooterNavigation: function (params) {
|
|
131
|
+
var _a = params.className, className = _a === void 0 ? '' : _a, baseStyles = params.baseStyles, others = __rest(params, ["className", "baseStyles"]);
|
|
132
|
+
var _b = __read(_global_1.React.useState($.uuidGen()), 1), val_componentID = _b[0];
|
|
133
|
+
_global_1.React.useEffect(function () {
|
|
134
|
+
var height = $("[data-id=\"".concat(val_componentID, "\"]")).position().height;
|
|
135
|
+
height = height | 0;
|
|
136
|
+
$(document.body).setStyleProperty('--footerNavHeight', height + 'px');
|
|
137
|
+
}, []);
|
|
138
|
+
return (_global_1.React.createElement(_atoms_1.Flex, __assign({ "data-id": val_componentID, borderTop: true, position: 'sticky', bottom: 0, overflow: 'auto', backgroundColor: '1.layer.base', paddingBottom: 'safeAreaBottom', display: 'none' }, baseStyles, { UnderBreakPointStyles: __assign({ display: 'flex' }, baseStyles === null || baseStyles === void 0 ? void 0 : baseStyles.UnderBreakPointStyles), className: [
|
|
139
|
+
style_module_scss_1.default.FooterNav,
|
|
140
|
+
className
|
|
141
|
+
].join(' ') }),
|
|
142
|
+
_global_1.React.createElement(_atoms_1.Flex, __assign({ gap: 1, flexWrap: false, padding: '2/3', margin: 'auto' }, others))));
|
|
143
|
+
},
|
|
144
|
+
Comps: {
|
|
145
|
+
Button: function (params) {
|
|
146
|
+
var e_1, _a;
|
|
147
|
+
var isActive = params.isActive, uri = params.uri, uriGroup = params.uriGroup, _b = params.activeClassName, activeClassName = _b === void 0 ? '' : _b, others = __rest(params, ["isActive", "uri", "uriGroup", "activeClassName"]);
|
|
148
|
+
var groups = $.flatArray(uriGroup);
|
|
149
|
+
var currentURL = location.pathname + location.search;
|
|
150
|
+
{
|
|
151
|
+
var isCurrentURL = false;
|
|
152
|
+
if ($.is.exist(uri) && $.is.string(uri)) {
|
|
153
|
+
var url = [
|
|
154
|
+
location.origin,
|
|
155
|
+
uri.replace(/\//, '')
|
|
156
|
+
].join('/');
|
|
157
|
+
isCurrentURL = currentURL == new URL(url).pathname;
|
|
158
|
+
}
|
|
159
|
+
if (!isCurrentURL) {
|
|
160
|
+
if (groups.length) {
|
|
161
|
+
try {
|
|
162
|
+
for (var groups_1 = __values(groups), groups_1_1 = groups_1.next(); !groups_1_1.done; groups_1_1 = groups_1.next()) {
|
|
163
|
+
var group = groups_1_1.value;
|
|
164
|
+
if ($.is.nullish(group))
|
|
165
|
+
continue;
|
|
166
|
+
if (!!currentURL.match(new RegExp(group)))
|
|
167
|
+
isCurrentURL = true;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
171
|
+
finally {
|
|
172
|
+
try {
|
|
173
|
+
if (groups_1_1 && !groups_1_1.done && (_a = groups_1.return)) _a.call(groups_1);
|
|
174
|
+
}
|
|
175
|
+
finally { if (e_1) throw e_1.error; }
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
isActive = isActive !== null && isActive !== void 0 ? isActive : isCurrentURL;
|
|
180
|
+
}
|
|
181
|
+
return _global_1.React.createElement(_functions_1.Buttons.Button.Clear.R, __assign({ padding: ['3/4', 1], display: 'flex', gap: '1/2', fontColor: 'inherit', width: 1, flexSizing: 'none', flexWrap: false, ssEffectsOnActive: 'ripple.cloud', verticalAlign: 'center', textAlign: 'left', isBoldFont: true, isActive: isActive, isActiveStyles: {
|
|
182
|
+
fontColor: 'theme',
|
|
183
|
+
backgroundColor: 'cloud'
|
|
184
|
+
}, onClick: function (event) {
|
|
185
|
+
if ($.is.exist(uri) && $.is.string(uri))
|
|
186
|
+
_global_1.pageTransit.push(uri, event.ctrlKey || event.metaKey);
|
|
187
|
+
}, color: 'cloud' }, others));
|
|
188
|
+
},
|
|
189
|
+
Bar: function (params) { return (_global_1.React.createElement(_atoms_1.Box, __assign({ backgroundColor: 'lcOpMiddle', unitHeight: '1/3', margin: ['2/3', 1], borderRadius: 'sphere' }, params))); },
|
|
190
|
+
Title: function (params) { return (_global_1.React.createElement(_atoms_1.Box, __assign({ fontSize: '3.paragraph', isBoldFont: true, padding: [0, 1] }, params))); },
|
|
191
|
+
}
|
|
192
|
+
};
|
|
193
|
+
var calcHeights = function () {
|
|
194
|
+
var Body = $(document.body);
|
|
195
|
+
var viewHeight = window.innerHeight;
|
|
196
|
+
var topNavHeight = Number(Body.getStyleProperty('--topNavHeight').removeLetters());
|
|
197
|
+
var footerNavHeight = Number(Body.getStyleProperty('--footerNavHeight').removeLetters());
|
|
198
|
+
var contentHeight = viewHeight - topNavHeight - footerNavHeight;
|
|
199
|
+
Body.setStyleProperty('--viewHeight', viewHeight + 'px')
|
|
200
|
+
.setStyleProperty('--sideNavHeight', contentHeight + 'px')
|
|
201
|
+
.setStyleProperty('--contentHeight', contentHeight + 'px');
|
|
202
|
+
};
|
|
@@ -0,0 +1,319 @@
|
|
|
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 __importDefault = (this && this.__importDefault) || function (mod) {
|
|
41
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
42
|
+
};
|
|
43
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
44
|
+
exports.Core = exports.SwipeView = void 0;
|
|
45
|
+
var _global_1 = require("@global");
|
|
46
|
+
var _atoms_1 = require("@atoms");
|
|
47
|
+
var useState = React.useState, useEffect = React.useEffect, useRef = React.useRef;
|
|
48
|
+
var style_module_scss_1 = __importDefault(require("./style.module.scss"));
|
|
49
|
+
var SwipeView = function (params) {
|
|
50
|
+
return (React.createElement(exports.Core, __assign({}, params, { slideIndex: Math.max(Math.min(params.slideIndex, params.slides.length - 1), 0) })));
|
|
51
|
+
};
|
|
52
|
+
exports.SwipeView = SwipeView;
|
|
53
|
+
var Core = function (params) {
|
|
54
|
+
var _a = params.options, _b = _a === void 0 ? {} : _a, onSlideCallback = _b.onSlideCallback, _c = _b.visibilitySurroundSlide, visibilitySurroundSlide = _c === void 0 ? true : _c, _d = _b.autoSwipeSeconds, autoSwipeSeconds = _d === void 0 ? 0 : _d, _e = _b.loop, loop = _e === void 0 ? false : _e, _f = _b.disableMousedrag, disableMousedrag = _f === void 0 ? false : _f, _g = _b.disableTouch, disableTouch = _g === void 0 ? false : _g, _h = params.wrapper, wrapper = _h === void 0 ? function (slide) { return (slide); } : _h, _j = params.slides, slides = _j === void 0 ? [] : _j, others = __rest(params, ["options", "wrapper", "slides"]);
|
|
55
|
+
var _k = __read(useState($.uuidGen()), 1), val_swipeID = _k[0];
|
|
56
|
+
var _l = __read(useState({
|
|
57
|
+
eventType: 'init',
|
|
58
|
+
index: params.slideIndex
|
|
59
|
+
}), 2), val_event = _l[0], set_event = _l[1];
|
|
60
|
+
useEffect(function () {
|
|
61
|
+
_global_1.useStore.set({
|
|
62
|
+
key: 'SwipeTimer-' + val_swipeID,
|
|
63
|
+
value: null
|
|
64
|
+
});
|
|
65
|
+
}, []);
|
|
66
|
+
var mounted = useRef(false);
|
|
67
|
+
useEffect(function () {
|
|
68
|
+
set_event({
|
|
69
|
+
eventType: 'usr',
|
|
70
|
+
index: params.slideIndex
|
|
71
|
+
});
|
|
72
|
+
if (!mounted.current)
|
|
73
|
+
mounted.current = true;
|
|
74
|
+
}, [params.slideIndex]);
|
|
75
|
+
useEffect(function () {
|
|
76
|
+
var Index = val_event.index + (loop ? 1 : 0);
|
|
77
|
+
var CopyIndex = [-1, slides.length].includes(val_event.index);
|
|
78
|
+
if (!CopyIndex)
|
|
79
|
+
if (onSlideCallback)
|
|
80
|
+
setTimeout(function () {
|
|
81
|
+
onSlideCallback(val_event.index);
|
|
82
|
+
}, 300);
|
|
83
|
+
var Base = $('#Swiper-' + val_swipeID);
|
|
84
|
+
if (val_event.eventType == 'adjustLoop') {
|
|
85
|
+
Base
|
|
86
|
+
.await(250)
|
|
87
|
+
.css({
|
|
88
|
+
transition: '0s',
|
|
89
|
+
transform: FNs.TrasformString(Index)
|
|
90
|
+
})
|
|
91
|
+
.children()
|
|
92
|
+
.removeClass(style_module_scss_1.default.Display)
|
|
93
|
+
.parent().children(Index)
|
|
94
|
+
.addClass([style_module_scss_1.default.Display, style_module_scss_1.default.LoopAdjusting])
|
|
95
|
+
.await(100).removeClass(style_module_scss_1.default.LoopAdjusting);
|
|
96
|
+
}
|
|
97
|
+
else if (val_event.eventType == 'sys') {
|
|
98
|
+
Base
|
|
99
|
+
.await(250)
|
|
100
|
+
.css({
|
|
101
|
+
transform: FNs.TrasformString(Index)
|
|
102
|
+
})
|
|
103
|
+
.children()
|
|
104
|
+
.removeClass(style_module_scss_1.default.Display)
|
|
105
|
+
.parent().children(Index)
|
|
106
|
+
.addClass(style_module_scss_1.default.Display);
|
|
107
|
+
}
|
|
108
|
+
else {
|
|
109
|
+
Base
|
|
110
|
+
.children()
|
|
111
|
+
.removeClass(style_module_scss_1.default.Display)
|
|
112
|
+
.parent().children(Index)
|
|
113
|
+
.addClass(style_module_scss_1.default.Display)
|
|
114
|
+
.parent()
|
|
115
|
+
.css({
|
|
116
|
+
transition: '0.3s',
|
|
117
|
+
transform: FNs.TrasformString(Index)
|
|
118
|
+
})
|
|
119
|
+
.await(250).css({ transition: '0s' });
|
|
120
|
+
if (CopyIndex) {
|
|
121
|
+
var ajastIndex = val_event.index == -1 ? slides.length - 1 : 0;
|
|
122
|
+
set_event({
|
|
123
|
+
eventType: 'adjustLoop',
|
|
124
|
+
index: ajastIndex
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
if (autoSwipeSeconds && !CopyIndex) {
|
|
129
|
+
$.interval.clear('SwipeTimer-' + val_swipeID);
|
|
130
|
+
$.interval.standBy('SwipeTimer-' + val_swipeID, autoSwipeSeconds - (val_event.eventType == 'sys' ? 310 : 0), function () {
|
|
131
|
+
var newIndex = val_event.index + 1;
|
|
132
|
+
if (!loop && newIndex > slides.length - 1)
|
|
133
|
+
newIndex = 0;
|
|
134
|
+
set_event({
|
|
135
|
+
eventType: 'usr',
|
|
136
|
+
index: newIndex
|
|
137
|
+
});
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
}, [val_event]);
|
|
141
|
+
var Slides = slides.map(function (slide, index) { return React.createElement(_atoms_1.Box, { key: index, flexSizing: 'none', width: 1, height: 0, className: style_module_scss_1.default.Child, children: wrapper(slide) }); });
|
|
142
|
+
if (loop) {
|
|
143
|
+
Slides.push(Slides[0]);
|
|
144
|
+
Slides.unshift(Slides[Slides.length - 2]);
|
|
145
|
+
}
|
|
146
|
+
var info = {
|
|
147
|
+
x: 0,
|
|
148
|
+
y: 0,
|
|
149
|
+
process: false,
|
|
150
|
+
effectStartAt: 0,
|
|
151
|
+
id: val_swipeID,
|
|
152
|
+
loop: loop,
|
|
153
|
+
index: val_event.index,
|
|
154
|
+
minIndex: loop ? -1 : 0,
|
|
155
|
+
maxIndex: slides.length + (loop ? 1 : -1),
|
|
156
|
+
width: 0,
|
|
157
|
+
set_event: set_event
|
|
158
|
+
};
|
|
159
|
+
var Index = val_event.index + (loop ? 1 : 0);
|
|
160
|
+
return (React.createElement(_atoms_1.Box, __assign({ overflow: 'hidden', position: 'relative' }, others, { freeCSS: __assign({ zIndex: 1 }, others.freeCSS), "data-swipe-id": val_swipeID, onMouseDown: function (event) {
|
|
161
|
+
if (disableMousedrag)
|
|
162
|
+
return;
|
|
163
|
+
if (event.buttons != 1)
|
|
164
|
+
return;
|
|
165
|
+
FNs.EffectStart(event, info);
|
|
166
|
+
}, onTouchStart: function (event) {
|
|
167
|
+
var _a;
|
|
168
|
+
if (disableTouch)
|
|
169
|
+
return;
|
|
170
|
+
if (((_a = event.touches) === null || _a === void 0 ? void 0 : _a.length) != 1)
|
|
171
|
+
return;
|
|
172
|
+
FNs.EffectStart(event, info);
|
|
173
|
+
} }),
|
|
174
|
+
React.createElement(_atoms_1.Flex, { flexWrap: false, gap: 1, transition: 'long', className: [
|
|
175
|
+
style_module_scss_1.default.Rail,
|
|
176
|
+
style_module_scss_1.default['ShowOther_' + visibilitySurroundSlide]
|
|
177
|
+
].join(' '), id: 'Swiper-' + val_swipeID, freeCSS: __assign({}, !mounted.current ? {
|
|
178
|
+
transform: FNs.TrasformString(Index)
|
|
179
|
+
} : {}), children: Slides })));
|
|
180
|
+
};
|
|
181
|
+
exports.Core = Core;
|
|
182
|
+
var FNs = {
|
|
183
|
+
TrasformString: function (Index) { return ("translateX( calc( ".concat(-100 * Index, "% - ").concat(12 * (Index), "px ) )")); },
|
|
184
|
+
EffectStart: function (event, info) {
|
|
185
|
+
var _a = $.getCursor(event), x = _a.x, y = _a.y;
|
|
186
|
+
var eventTarget = event.currentTarget;
|
|
187
|
+
var target = event.target;
|
|
188
|
+
if (['SELECT', 'BUTTON', 'LABEL', 'INPUT'].includes(target.tagName))
|
|
189
|
+
return;
|
|
190
|
+
info = __assign(__assign({}, info), { x: x - info.x + window.scrollX, y: y - info.y + window.scrollY, effectStartAt: new Date().getTime(), width: $('#Swiper-' + info.id).position().width });
|
|
191
|
+
var swipeId = eventTarget.dataset.swipeId;
|
|
192
|
+
if (swipeId == info.id) {
|
|
193
|
+
$(document)
|
|
194
|
+
.addEvent({
|
|
195
|
+
eventID: 'SwipeMouseMove', eventType: 'mousemove',
|
|
196
|
+
callback: function (event) { FNs.EffectCheck(event, info); },
|
|
197
|
+
option: { passive: false }
|
|
198
|
+
})
|
|
199
|
+
.addEvent({
|
|
200
|
+
eventID: 'SwipeTouchMove', eventType: 'touchmove',
|
|
201
|
+
callback: function (event) { FNs.EffectCheck(event, info); },
|
|
202
|
+
option: { passive: false }
|
|
203
|
+
})
|
|
204
|
+
.addEvent({
|
|
205
|
+
eventID: 'SwipeMouseUp', eventType: 'mouseup',
|
|
206
|
+
callback: function (event) { FNs.EffectEnd(event, info); },
|
|
207
|
+
option: { passive: false }
|
|
208
|
+
})
|
|
209
|
+
.addEvent({
|
|
210
|
+
eventID: 'SwipeTouchEnd', eventType: 'touchend',
|
|
211
|
+
callback: function (event) { FNs.EffectEnd(event, info); },
|
|
212
|
+
option: { passive: false }
|
|
213
|
+
});
|
|
214
|
+
}
|
|
215
|
+
},
|
|
216
|
+
EffectCheck: function (event, info) {
|
|
217
|
+
if (info.process)
|
|
218
|
+
return;
|
|
219
|
+
var _a = $.getCursor(event), x = _a.x, y = _a.y;
|
|
220
|
+
var X = Math.abs(x - info.x + window.scrollX);
|
|
221
|
+
var Y = Math.abs(y - info.y + window.scrollY);
|
|
222
|
+
if (event.touches && event.touches.length > 1)
|
|
223
|
+
return;
|
|
224
|
+
if (Y + X < 15)
|
|
225
|
+
return;
|
|
226
|
+
if (Y > X / 2) {
|
|
227
|
+
$(document).removeEvent([
|
|
228
|
+
'SwipeMouseMove',
|
|
229
|
+
'SwipeTouchMove'
|
|
230
|
+
]);
|
|
231
|
+
}
|
|
232
|
+
else {
|
|
233
|
+
info.process = true;
|
|
234
|
+
var Index = info.index + (info.loop ? 1 : 0);
|
|
235
|
+
$('#Swiper-' + info.id).children(Index - 1).addClass(style_module_scss_1.default.Display);
|
|
236
|
+
$('#Swiper-' + info.id).children(Index + 1).addClass(style_module_scss_1.default.Display);
|
|
237
|
+
$(document)
|
|
238
|
+
.addEvent({
|
|
239
|
+
eventID: 'SwipeCheckMouseMove', eventType: 'mousemove',
|
|
240
|
+
callback: function (event) { FNs.EffectMove(event, info); },
|
|
241
|
+
option: { passive: false }
|
|
242
|
+
})
|
|
243
|
+
.addEvent({
|
|
244
|
+
eventID: 'SwipeCheckTouchMove', eventType: 'touchmove',
|
|
245
|
+
callback: function (event) { FNs.EffectMove(event, info); },
|
|
246
|
+
option: { passive: false }
|
|
247
|
+
});
|
|
248
|
+
event.preventDefault();
|
|
249
|
+
return;
|
|
250
|
+
}
|
|
251
|
+
},
|
|
252
|
+
EffectMove: function (event, info) {
|
|
253
|
+
if (event.touches && event.touches.length > 1)
|
|
254
|
+
return;
|
|
255
|
+
var x = $.getCursor(event).x;
|
|
256
|
+
var X = x - info.x + window.scrollX;
|
|
257
|
+
var Index = info.index + (info.loop ? 1 : 0);
|
|
258
|
+
var rate = Index - X / info.width;
|
|
259
|
+
if (rate < 0) {
|
|
260
|
+
rate /= 2;
|
|
261
|
+
}
|
|
262
|
+
else if (rate > info.maxIndex) {
|
|
263
|
+
var excess = rate - info.maxIndex;
|
|
264
|
+
rate = info.maxIndex + excess / 2;
|
|
265
|
+
}
|
|
266
|
+
$('#Swiper-' + info.id).css({
|
|
267
|
+
transition: '0s',
|
|
268
|
+
transform: FNs.TrasformString(rate)
|
|
269
|
+
});
|
|
270
|
+
event.preventDefault();
|
|
271
|
+
return;
|
|
272
|
+
},
|
|
273
|
+
EffectEnd: function (event, info) {
|
|
274
|
+
if (info.process) {
|
|
275
|
+
var cursor = $.getCursor(event);
|
|
276
|
+
var X = cursor.x - info.x + window.scrollX;
|
|
277
|
+
var current = new Date().getTime();
|
|
278
|
+
var totalTime = current - info.effectStartAt;
|
|
279
|
+
var Index = info.index + (info.loop ? 1 : 0);
|
|
280
|
+
var newIndex = 0;
|
|
281
|
+
if (totalTime < 400) {
|
|
282
|
+
newIndex = Index - (Number(X > 0) * 2 - 1);
|
|
283
|
+
}
|
|
284
|
+
else {
|
|
285
|
+
newIndex = Math.round(Index - X / info.width);
|
|
286
|
+
}
|
|
287
|
+
newIndex = Math.max(Math.min(newIndex, info.maxIndex), info.minIndex);
|
|
288
|
+
info.process = false;
|
|
289
|
+
if (Index === newIndex) {
|
|
290
|
+
info.effectStartAt = current;
|
|
291
|
+
$('#Swiper-' + info.id)
|
|
292
|
+
.css({
|
|
293
|
+
transition: '.2s',
|
|
294
|
+
transform: FNs.TrasformString(newIndex)
|
|
295
|
+
})
|
|
296
|
+
.await(310)
|
|
297
|
+
.css({
|
|
298
|
+
transition: '0s'
|
|
299
|
+
})
|
|
300
|
+
.children().removeClass(style_module_scss_1.default.Display)
|
|
301
|
+
.parent().children(Index).addClass(style_module_scss_1.default.Display);
|
|
302
|
+
}
|
|
303
|
+
else {
|
|
304
|
+
info.set_event({
|
|
305
|
+
eventType: 'usr',
|
|
306
|
+
index: newIndex + info.minIndex
|
|
307
|
+
});
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
$(document).removeEvent([
|
|
311
|
+
'SwipeMouseMove',
|
|
312
|
+
'SwipeTouchMove',
|
|
313
|
+
'SwipeCheckMouseMove',
|
|
314
|
+
'SwipeCheckTouchMove',
|
|
315
|
+
'SwipeMouseUp',
|
|
316
|
+
'SwipeTouchEnd'
|
|
317
|
+
]);
|
|
318
|
+
}
|
|
319
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const TabBar: FNC<amotify.fn.Layout.TabBar.Params>;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
14
|
+
var t = {};
|
|
15
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
16
|
+
t[p] = s[p];
|
|
17
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
18
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
19
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
20
|
+
t[p[i]] = s[p[i]];
|
|
21
|
+
}
|
|
22
|
+
return t;
|
|
23
|
+
};
|
|
24
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
exports.TabBar = void 0;
|
|
26
|
+
var _global_1 = require("@global");
|
|
27
|
+
var _atoms_1 = require("@atoms");
|
|
28
|
+
var _functions_1 = require("@functions");
|
|
29
|
+
var useEffect = _global_1.React.useEffect, useState = _global_1.React.useState;
|
|
30
|
+
var TabBar = function (params) {
|
|
31
|
+
var tabIndex = params.tabIndex, tabs = params.tabs, onTabChange = params.onTabChange, componentDidMount = params.componentDidMount, others = __rest(params, ["tabIndex", "tabs", "onTabChange", "componentDidMount"]);
|
|
32
|
+
useEffect(function () {
|
|
33
|
+
if (componentDidMount)
|
|
34
|
+
componentDidMount();
|
|
35
|
+
}, []);
|
|
36
|
+
return (_global_1.React.createElement(_atoms_1.Flex, __assign({ position: 'relative', overflow: 'auto', flexWrap: false }, others, { freeCSS: __assign({ zIndex: 3, whiteSpace: 'nowrap' }, others.freeCSS) }),
|
|
37
|
+
_global_1.React.createElement(_atoms_1.Box, { margin: [0, 'auto'] },
|
|
38
|
+
_global_1.React.createElement(_functions_1.Input.Segmented.BottomLine, { value: tabIndex, fontColor: 'inherit', override: 'force', gap: 0, options: tabs.map(function (tab, index) {
|
|
39
|
+
return {
|
|
40
|
+
value: index,
|
|
41
|
+
label: tab
|
|
42
|
+
};
|
|
43
|
+
}), onUpdateValidValue: function (args) {
|
|
44
|
+
var value = args.value[0];
|
|
45
|
+
if (onTabChange)
|
|
46
|
+
onTabChange(value);
|
|
47
|
+
} }))));
|
|
48
|
+
};
|
|
49
|
+
exports.TabBar = TabBar;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Layout = void 0;
|
|
4
|
+
var parts_1 = require("./SwipeView/parts");
|
|
5
|
+
var parts_2 = require("./PageViewController/parts");
|
|
6
|
+
var TabBar_1 = require("./TabBar");
|
|
7
|
+
var Plate_1 = require("./Plate");
|
|
8
|
+
var PageNotFound_1 = require("./PageNotFound");
|
|
9
|
+
var PageRouter_1 = require("./PageRouter");
|
|
10
|
+
var parts_3 = require("./RootViewController/parts");
|
|
11
|
+
var Layout = {
|
|
12
|
+
PageViewController: parts_2.PageViewController,
|
|
13
|
+
TabBar: TabBar_1.TabBar,
|
|
14
|
+
Plate: Plate_1.Plate,
|
|
15
|
+
SwipeView: parts_1.SwipeView,
|
|
16
|
+
PageRouter: PageRouter_1.PageRouter,
|
|
17
|
+
PageNotFound: PageNotFound_1.PageNotFound,
|
|
18
|
+
RootViewController: parts_3.RootViewController
|
|
19
|
+
};
|
|
20
|
+
exports.Layout = Layout;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const Corner: () => JSX.Element;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __read = (this && this.__read) || function (o, n) {
|
|
3
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
4
|
+
if (!m) return o;
|
|
5
|
+
var i = m.call(o), r, ar = [], e;
|
|
6
|
+
try {
|
|
7
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
8
|
+
}
|
|
9
|
+
catch (error) { e = { error: error }; }
|
|
10
|
+
finally {
|
|
11
|
+
try {
|
|
12
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
13
|
+
}
|
|
14
|
+
finally { if (e) throw e.error; }
|
|
15
|
+
}
|
|
16
|
+
return ar;
|
|
17
|
+
};
|
|
18
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
19
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
20
|
+
};
|
|
21
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
+
exports.Corner = void 0;
|
|
23
|
+
var _global_1 = require("@global");
|
|
24
|
+
var _atoms_1 = require("@atoms");
|
|
25
|
+
var useEffect = React.useEffect, useState = React.useState;
|
|
26
|
+
var style_module_scss_1 = __importDefault(require("./style.module.scss"));
|
|
27
|
+
var parts_1 = require("./parts");
|
|
28
|
+
var Corner = function () {
|
|
29
|
+
var _a = __read(useState(false), 2), val_active = _a[0], set_active = _a[1];
|
|
30
|
+
useEffect(function () {
|
|
31
|
+
_global_1.useStore.set({
|
|
32
|
+
key: parts_1.memoryID + '-corner',
|
|
33
|
+
value: {
|
|
34
|
+
active: function () {
|
|
35
|
+
set_active(true);
|
|
36
|
+
},
|
|
37
|
+
stop: function () {
|
|
38
|
+
set_active(false);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
}, []);
|
|
43
|
+
return React.createElement(_atoms_1.Flex, { className: [
|
|
44
|
+
style_module_scss_1.default.CornerLoader,
|
|
45
|
+
style_module_scss_1.default['Active_' + val_active]
|
|
46
|
+
].join(' '), gap: '1/2', padding: ['1/2', '3/4'], borderRadius: '2/3', backgroundColor: 'theme', position: 'fixed', boxShadow: 2, right: 1, bottom: 1, opacity: 'trans', transition: 'short', freeCSS: {
|
|
47
|
+
pointerEvents: 'none'
|
|
48
|
+
} },
|
|
49
|
+
React.createElement(_atoms_1.Flex, { className: style_module_scss_1.default.Wrap, flexWrap: false, verticalAlign: 'center', horizontalAlign: 'center' },
|
|
50
|
+
React.createElement(_atoms_1.Box, { className: style_module_scss_1.default.Ld4 }),
|
|
51
|
+
React.createElement(_atoms_1.Box, { className: style_module_scss_1.default.Ld3 }),
|
|
52
|
+
React.createElement(_atoms_1.Box, { className: style_module_scss_1.default.Ld2 }),
|
|
53
|
+
React.createElement(_atoms_1.Box, { className: style_module_scss_1.default.Ld1 }),
|
|
54
|
+
React.createElement(_atoms_1.Box, { className: style_module_scss_1.default.Ld2 }),
|
|
55
|
+
React.createElement(_atoms_1.Box, { className: style_module_scss_1.default.Ld3 }),
|
|
56
|
+
React.createElement(_atoms_1.Box, { className: style_module_scss_1.default.Ld4 })),
|
|
57
|
+
React.createElement(_atoms_1.Box, { fontColor: 'white', fontSize: '0.xs', isBoldFont: true }, "Loading"));
|
|
58
|
+
};
|
|
59
|
+
exports.Corner = Corner;
|