amotify 0.0.7 → 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/{public → dist}/amotify.min.css +22 -22
- 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/{Molecules/@export.tsx → @molecules.tsx} +3 -3
- package/src/@organisms.tsx +5 -0
- package/src/@styles/@app.scss +2 -2
- package/src/@styles/UniStyling.scss +3 -3
- package/src/@styles/init.scss +1 -1
- package/src/@styles/{@variables/styleSet.scss → 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 +0 -1
- package/src/{Atoms → atoms}/Logo/style.module.scss +1 -2
- package/src/{Atoms → atoms}/Various/style.module.scss +2 -1
- package/src/{Functions → functions}/Button/style.module.scss +2 -1
- package/src/{Functions → functions}/Cropper/parts.tsx +1 -1
- package/src/{Functions → functions}/Cropper/style.module.scss +1 -1
- package/src/{Functions → functions}/Effects/style.module.scss +1 -1
- package/src/{Functions → functions}/Input/Chips/Selector.tsx +1 -2
- package/src/{Functions → functions}/Input/Chips/_.tsx +1 -5
- package/src/{Functions → functions}/Input/Chips/style.module.scss +1 -1
- package/src/{Functions → functions}/Input/DigitCharacters.tsx +1 -1
- package/src/{Functions → functions}/Input/File/_.tsx +1 -1
- package/src/{Functions → functions}/Input/File/style.module.scss +1 -1
- package/src/{Functions → functions}/Input/List/_.tsx +1 -1
- package/src/{Functions → functions}/Input/List/style.module.scss +1 -1
- package/src/{Functions → functions}/Input/Segmented/style.module.scss +1 -1
- package/src/{Functions → functions}/Input/Select/_.tsx +1 -1
- package/src/{Functions → functions}/Input/Select/style.module.scss +1 -1
- package/src/{Functions → functions}/Input/Slider/_.tsx +1 -1
- package/src/{Functions → functions}/Input/Slider/style.module.scss +1 -1
- package/src/{Functions → functions}/Input/Switch/_.tsx +1 -1
- package/src/{Functions → functions}/Input/Switch/style.module.scss +1 -1
- package/src/{Functions → functions}/Input/Time/Picker.tsx +1 -1
- package/src/{Functions → functions}/Input/Time/_.tsx +2 -2
- package/src/{Functions → functions}/Input/Time/style.module.scss +1 -1
- package/src/{Functions → functions}/Input/_.tsx +1 -1
- package/src/{Functions → functions}/Input/core.tsx +1 -1
- 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 +3 -16
- package/src/functions/Inputs/types.d.ts +13 -0
- package/src/{Functions → functions}/Layout/PageNotFound.tsx +2 -4
- package/src/{Functions → functions}/Layout/PageRouter.tsx +1 -1
- package/src/{Functions → functions}/Layout/PageViewController/parts.tsx +3 -1
- package/src/{Functions → functions}/Layout/RootViewController/parts.tsx +3 -5
- package/src/{Functions → functions}/Layout/RootViewController/style.module.scss +1 -1
- package/src/{Functions → functions}/Layout/SwipeView/parts.tsx +0 -1
- package/src/{Functions → functions}/Layout/SwipeView/style.module.scss +1 -1
- package/src/{Functions → functions}/Layout/TabBar.tsx +1 -1
- package/src/{Functions → functions}/Loader/style.module.scss +1 -1
- package/src/{Functions → functions}/Sheet/parts.tsx +1 -1
- package/src/{Functions → functions}/Sheet/style.module.scss +1 -1
- package/src/{Functions → functions}/SnackBar/parts.tsx +1 -1
- package/src/{Functions → functions}/SnackBar/style.module.scss +1 -1
- package/src/{Functions → functions}/Table/Data/parts.tsx +1 -1
- package/src/{Functions → functions}/Table/Drag/parts.tsx +1 -1
- package/src/{Functions → functions}/Table/Normal/parts.tsx +1 -2
- package/src/{Functions → functions}/Table/_.tsx +1 -2
- package/src/{Functions → functions}/Table/style.module.scss +2 -1
- package/src/{Functions → functions}/Tooltips/parts.tsx +1 -1
- package/src/{Global → global}/styleConverter.tsx +1 -5
- package/src/launch.tsx +5 -5
- package/src/{Molecules → molecules}/Accordion/style.module.scss +1 -1
- package/src/{Molecules → molecules}/LinkifyText/parts.tsx +1 -1
- package/src/{Organisms → organisms}/DisplayStyleInput/darkmode.tsx +1 -1
- package/src/{Organisms → organisms}/DisplayStyleInput/themeColor.tsx +1 -1
- package/src/{Templates → templates}/PlayGround/parts.tsx +26 -39
- package/src/{Templates → templates}/PlayGround/style.module.scss +1 -1
- package/tsconfig.json +20 -24
- package/webpack.config.js +11 -9
- 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 -1
- package/src/@types/_.tsx +0 -6
- package/src/Functions/@export.tsx +0 -29
- 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/@types → @types}/module.tsx +0 -0
- /package/{src/@types → @types}/state.tsx +0 -0
- /package/src/@styles/{@variables/customProps.scss → props.scss} +0 -0
- /package/src/@styles/{@variables/themeColor.scss → themeColor.scss} +0 -0
- /package/src/@styles/{@variables/var.scss → var.scss} +0 -0
- /package/src/{Atoms → atoms}/FAIcon/parts.tsx +0 -0
- /package/src/{Atoms → atoms}/Various/parts.tsx +0 -0
- /package/src/{Functions → functions}/Button/_.tsx +0 -0
- /package/src/{Functions → functions}/Effects/Fade.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}/Input/Segmented/_.tsx +0 -0
- /package/src/{Functions → functions}/Input/Text.tsx +0 -0
- /package/src/{Functions → functions}/Input/TextArea.tsx +0 -0
- /package/src/{Functions → functions}/Inputs/_.tsx +0 -0
- /package/src/{Functions → functions}/Layout/Plate.tsx +0 -0
- /package/src/{Functions → functions}/Layout/_.tsx +0 -0
- /package/src/{Functions → functions}/Loader/corner.tsx +0 -0
- /package/src/{Functions → functions}/Loader/mini.tsx +0 -0
- /package/src/{Functions → functions}/Loader/parts.tsx +0 -0
- /package/src/{Functions → functions}/Loader/top.tsx +0 -0
- /package/src/{Global → global}/LaunchReactApplication.tsx +0 -0
- /package/src/{Molecules → molecules}/Accordion/parts.tsx +0 -0
- /package/src/{Molecules → molecules}/List.tsx +0 -0
- /package/src/{Organisms → organisms}/DisplayStyleInput/_.tsx +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const FadeEffects: amotify.fn.Effects.Methods;
|
|
@@ -1,82 +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
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
41
|
-
exports.FadeEffects = void 0;
|
|
42
|
-
var _global_1 = require("../../Global/@export");
|
|
43
|
-
var _atoms_1 = require("../../Atoms/@export");
|
|
44
|
-
var useState = _global_1.React.useState, useEffect = _global_1.React.useEffect;
|
|
45
|
-
exports.FadeEffects = __assign(__assign({}, {}), { FadeIn: function (params) {
|
|
46
|
-
var _a = params.animationDelay, animationDelay = _a === void 0 ? 100 : _a, _b = params.animationTime, animationTime = _b === void 0 ? 300 : _b, _c = params.componentID, componentID = _c === void 0 ? $.uuidGen() : _c, others = __rest(params, ["animationDelay", "animationTime", "componentID"]);
|
|
47
|
-
var _d = __read(useState(componentID), 1), val_componentID = _d[0];
|
|
48
|
-
useEffect(function () {
|
|
49
|
-
setTimeout(function () {
|
|
50
|
-
var Element = $('[data-component-id="' + val_componentID + '"]');
|
|
51
|
-
if (!Element[0])
|
|
52
|
-
return;
|
|
53
|
-
Element.css({
|
|
54
|
-
transition: animationTime + 'ms'
|
|
55
|
-
})
|
|
56
|
-
.await(1)
|
|
57
|
-
.css({
|
|
58
|
-
opacity: 1
|
|
59
|
-
});
|
|
60
|
-
}, animationDelay);
|
|
61
|
-
}, []);
|
|
62
|
-
return (_global_1.React.createElement(_atoms_1.Box, __assign({}, others, { freeCSS: __assign(__assign({}, others.freeCSS), { opacity: 0 }), componentID: val_componentID })));
|
|
63
|
-
}, FadeUp: function (params) {
|
|
64
|
-
var _a = params.animationDelay, animationDelay = _a === void 0 ? 100 : _a, _b = params.animationTime, animationTime = _b === void 0 ? 300 : _b, _c = params.componentID, componentID = _c === void 0 ? $.uuidGen() : _c, others = __rest(params, ["animationDelay", "animationTime", "componentID"]);
|
|
65
|
-
var _d = __read(useState(componentID), 1), val_componentID = _d[0];
|
|
66
|
-
useEffect(function () {
|
|
67
|
-
setTimeout(function () {
|
|
68
|
-
var Element = $('[data-component-id="' + val_componentID + '"]');
|
|
69
|
-
if (!Element[0])
|
|
70
|
-
return;
|
|
71
|
-
Element.css({
|
|
72
|
-
transition: animationTime + 'ms'
|
|
73
|
-
})
|
|
74
|
-
.await(1)
|
|
75
|
-
.css({
|
|
76
|
-
opacity: 1,
|
|
77
|
-
paddingTop: 0
|
|
78
|
-
});
|
|
79
|
-
}, animationDelay);
|
|
80
|
-
}, []);
|
|
81
|
-
return (_global_1.React.createElement(_atoms_1.Box, __assign({ paddingTop: 2 }, others, { freeCSS: __assign(__assign({}, others.freeCSS), { opacity: 0 }), componentID: val_componentID })));
|
|
82
|
-
} });
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
var style_module_scss_1 = __importDefault(require("./style.module.scss"));
|
|
7
|
-
new /** @class */ (function () {
|
|
8
|
-
function class_1() {
|
|
9
|
-
this.UserEvent();
|
|
10
|
-
}
|
|
11
|
-
class_1.prototype.UserEvent = function () {
|
|
12
|
-
var RippleElementClassName = 'eff_ripple';
|
|
13
|
-
var EffectStart = function (event) {
|
|
14
|
-
var startedAt = $.Time().time;
|
|
15
|
-
var target = event.target;
|
|
16
|
-
var RippleElement = $(target.closest('.' + RippleElementClassName));
|
|
17
|
-
var Color = RippleElement.findClass(/^eff_ripple-/)[0].split('-')[1];
|
|
18
|
-
var ID = 'RippleWrap-' + $.uuidGen(), _a = RippleElement.position(), left = _a.left, top = _a.top, height = _a.height, width = _a.width, _b = $.getScreenSize(), pageXOffset = _b.pageXOffset, pageYOffset = _b.pageYOffset, _c = $.getCursor(event), cursorX = _c.x, cursorY = _c.y, size = Math.min(width * 1.5, 300), x = Math.max(cursorX - (left + pageXOffset), 0), y = Math.max(cursorY - (top + pageYOffset), 0);
|
|
19
|
-
var effectInfo = {
|
|
20
|
-
RippleElement: RippleElement,
|
|
21
|
-
startedAt: startedAt,
|
|
22
|
-
size: size
|
|
23
|
-
};
|
|
24
|
-
$(document).addEvent({
|
|
25
|
-
eventID: 'RippleMouseUp',
|
|
26
|
-
eventType: 'mouseup',
|
|
27
|
-
callback: function () {
|
|
28
|
-
EffectEnd(effectInfo);
|
|
29
|
-
}
|
|
30
|
-
}).addEvent({
|
|
31
|
-
eventID: 'RippleTouchEnd',
|
|
32
|
-
eventType: 'touchend',
|
|
33
|
-
callback: function () {
|
|
34
|
-
setTimeout(function () {
|
|
35
|
-
EffectEnd(effectInfo);
|
|
36
|
-
}, 20);
|
|
37
|
-
}
|
|
38
|
-
});
|
|
39
|
-
$(RippleElement)
|
|
40
|
-
.addClass([
|
|
41
|
-
style_module_scss_1.default.RippleElement,
|
|
42
|
-
style_module_scss_1.default['Color_' + Color]
|
|
43
|
-
])
|
|
44
|
-
.append("<div class=\"".concat(style_module_scss_1.default.RippleWrap, "\" id=\"").concat(ID, "\">\n <div class=\"").concat(style_module_scss_1.default.Wave, "\" />\n </div>"))
|
|
45
|
-
.addEvent({
|
|
46
|
-
eventID: 'RippleMouseOut',
|
|
47
|
-
eventType: 'mouseout',
|
|
48
|
-
callback: function (event) {
|
|
49
|
-
EffectEnd(effectInfo);
|
|
50
|
-
}
|
|
51
|
-
})
|
|
52
|
-
.find('#' + ID)
|
|
53
|
-
.find('.' + style_module_scss_1.default.Wave)
|
|
54
|
-
.css({ left: x, top: y })
|
|
55
|
-
.await(10)
|
|
56
|
-
.css({
|
|
57
|
-
height: size,
|
|
58
|
-
width: size,
|
|
59
|
-
opacity: '.3',
|
|
60
|
-
transition: '.25s'
|
|
61
|
-
});
|
|
62
|
-
};
|
|
63
|
-
var EffectEnd = function (effectInfo) {
|
|
64
|
-
var RippleElement = effectInfo.RippleElement, startedAt = effectInfo.startedAt, size = effectInfo.size;
|
|
65
|
-
var processTime = $.Time().time - startedAt;
|
|
66
|
-
var transition = processTime <= 400 ? '.75s' : '.55s';
|
|
67
|
-
var diameter = size * 2.5;
|
|
68
|
-
$(document).removeEvent([
|
|
69
|
-
'RippleMouseUp',
|
|
70
|
-
'RippleTouchMove',
|
|
71
|
-
'RippleTouchEnd',
|
|
72
|
-
]);
|
|
73
|
-
RippleElement
|
|
74
|
-
.removeEvent(['RippleMouseOut'])
|
|
75
|
-
.find('.' + style_module_scss_1.default.Wave)
|
|
76
|
-
.css({
|
|
77
|
-
height: diameter,
|
|
78
|
-
width: diameter,
|
|
79
|
-
opacity: '0',
|
|
80
|
-
transition: transition
|
|
81
|
-
})
|
|
82
|
-
.await(750)
|
|
83
|
-
.parent()
|
|
84
|
-
.callback(function (Parent) {
|
|
85
|
-
Parent.remove();
|
|
86
|
-
});
|
|
87
|
-
};
|
|
88
|
-
$(document)
|
|
89
|
-
.addEvent({
|
|
90
|
-
eventType: 'touchstart',
|
|
91
|
-
target: '.' + RippleElementClassName,
|
|
92
|
-
callback: function (event) {
|
|
93
|
-
EffectStart(event);
|
|
94
|
-
}
|
|
95
|
-
})
|
|
96
|
-
.addEvent({
|
|
97
|
-
eventType: 'mousedown',
|
|
98
|
-
target: '.' + RippleElementClassName,
|
|
99
|
-
callback: function (event) {
|
|
100
|
-
if (amotify.config.device.isTouchDevice)
|
|
101
|
-
return;
|
|
102
|
-
EffectStart(event);
|
|
103
|
-
}
|
|
104
|
-
});
|
|
105
|
-
};
|
|
106
|
-
return class_1;
|
|
107
|
-
}());
|
|
@@ -1,43 +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 __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.Effects = void 0;
|
|
18
|
-
require("./Ripple");
|
|
19
|
-
var style_module_scss_1 = __importDefault(require("./style.module.scss"));
|
|
20
|
-
var Fade_1 = require("./Fade");
|
|
21
|
-
var Effects = __assign({}, Fade_1.FadeEffects);
|
|
22
|
-
exports.Effects = Effects;
|
|
23
|
-
/** PuddingEffect */
|
|
24
|
-
new /** @class */ (function () {
|
|
25
|
-
function class_1() {
|
|
26
|
-
this.UserEvent();
|
|
27
|
-
}
|
|
28
|
-
class_1.prototype.UserEvent = function () {
|
|
29
|
-
$(document).addEvent({
|
|
30
|
-
eventType: 'click',
|
|
31
|
-
target: '.eff_pudding',
|
|
32
|
-
callback: function () {
|
|
33
|
-
$(this)
|
|
34
|
-
.removeClass(style_module_scss_1.default.PuddingEffect)
|
|
35
|
-
.await(1)
|
|
36
|
-
.addClass(style_module_scss_1.default.PuddingEffect)
|
|
37
|
-
.await(510)
|
|
38
|
-
.removeClass(style_module_scss_1.default.PuddingEffect);
|
|
39
|
-
}
|
|
40
|
-
});
|
|
41
|
-
};
|
|
42
|
-
return class_1;
|
|
43
|
-
}());
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const ChipsInputFNs: amotify.fn.Input.Chips.FNs;
|
|
@@ -1,356 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
14
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
15
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
16
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
17
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
18
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
19
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
20
|
-
});
|
|
21
|
-
};
|
|
22
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
23
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
24
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
25
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
26
|
-
function step(op) {
|
|
27
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
28
|
-
while (_) try {
|
|
29
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
30
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
31
|
-
switch (op[0]) {
|
|
32
|
-
case 0: case 1: t = op; break;
|
|
33
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
34
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
35
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
36
|
-
default:
|
|
37
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
38
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
39
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
40
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
41
|
-
if (t[2]) _.ops.pop();
|
|
42
|
-
_.trys.pop(); continue;
|
|
43
|
-
}
|
|
44
|
-
op = body.call(thisArg, _);
|
|
45
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
46
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
47
|
-
}
|
|
48
|
-
};
|
|
49
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
50
|
-
var t = {};
|
|
51
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
52
|
-
t[p] = s[p];
|
|
53
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
54
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
55
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
56
|
-
t[p[i]] = s[p[i]];
|
|
57
|
-
}
|
|
58
|
-
return t;
|
|
59
|
-
};
|
|
60
|
-
var __read = (this && this.__read) || function (o, n) {
|
|
61
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
62
|
-
if (!m) return o;
|
|
63
|
-
var i = m.call(o), r, ar = [], e;
|
|
64
|
-
try {
|
|
65
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
66
|
-
}
|
|
67
|
-
catch (error) { e = { error: error }; }
|
|
68
|
-
finally {
|
|
69
|
-
try {
|
|
70
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
71
|
-
}
|
|
72
|
-
finally { if (e) throw e.error; }
|
|
73
|
-
}
|
|
74
|
-
return ar;
|
|
75
|
-
};
|
|
76
|
-
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
77
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
78
|
-
if (ar || !(i in from)) {
|
|
79
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
80
|
-
ar[i] = from[i];
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
84
|
-
};
|
|
85
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
86
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
87
|
-
};
|
|
88
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
89
|
-
exports.ChipsInputFNs = void 0;
|
|
90
|
-
var _global_1 = require("../../../Global/@export");
|
|
91
|
-
var useEffect = React.useEffect, useState = React.useState;
|
|
92
|
-
var _atoms_1 = require("../../../Atoms/@export");
|
|
93
|
-
var _mols_1 = require("../../../Molecules/@export");
|
|
94
|
-
var _functions_1 = require("../../@export");
|
|
95
|
-
var style_module_scss_1 = __importDefault(require("./style.module.scss"));
|
|
96
|
-
var Selector = function (params) {
|
|
97
|
-
var _a = __read(useState('show'), 2), val_status = _a[0], set_status = _a[1];
|
|
98
|
-
var _b = __read(useState(''), 2), val_keyword = _b[0], set_keyword = _b[1];
|
|
99
|
-
var _c = __read(useState($.uuidGen()), 1), val_componentID = _c[0];
|
|
100
|
-
var _d = __read(useState(params.options), 2), val_options = _d[0], set_options = _d[1];
|
|
101
|
-
var _e = __read(useState(val_options[0] || null), 2), val_focus = _e[0], set_focus = _e[1];
|
|
102
|
-
var _f = __read(useState(params.selected), 2), val_selected = _f[0], set_selected = _f[1];
|
|
103
|
-
var _g = __read(useState('init'), 2), val_keyEvent = _g[0], set_keyEvent = _g[1];
|
|
104
|
-
useEffect(function () {
|
|
105
|
-
_global_1.useStore.set({
|
|
106
|
-
key: params.selectorID,
|
|
107
|
-
value: {
|
|
108
|
-
updateOptions: function (options) {
|
|
109
|
-
set_options(options);
|
|
110
|
-
},
|
|
111
|
-
updateSelected: function (selected) {
|
|
112
|
-
set_selected(selected);
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
});
|
|
116
|
-
}, []);
|
|
117
|
-
var mountedOptions = React.useRef(false);
|
|
118
|
-
useEffect(function () {
|
|
119
|
-
if (mountedOptions.current) {
|
|
120
|
-
_functions_1.Sheet.reposition(params.selectorID);
|
|
121
|
-
}
|
|
122
|
-
else {
|
|
123
|
-
mountedOptions.current = true;
|
|
124
|
-
}
|
|
125
|
-
}, [val_options]);
|
|
126
|
-
var mountedKeyword = React.useRef(false);
|
|
127
|
-
useEffect(function () {
|
|
128
|
-
if (mountedKeyword.current) {
|
|
129
|
-
set_status('interlude');
|
|
130
|
-
set_focus(val_options[0] || null);
|
|
131
|
-
if (params.onDynamicSearch) {
|
|
132
|
-
$.interval.clear(val_componentID + '-dynamicSearch');
|
|
133
|
-
$.interval.standBy(val_componentID + '-dynamicSearch', 400, function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
134
|
-
var options;
|
|
135
|
-
return __generator(this, function (_a) {
|
|
136
|
-
switch (_a.label) {
|
|
137
|
-
case 0: return [4 /*yield*/, params.onDynamicSearch(val_keyword)];
|
|
138
|
-
case 1:
|
|
139
|
-
options = (_a.sent()).options;
|
|
140
|
-
set_options(options);
|
|
141
|
-
set_status('show');
|
|
142
|
-
return [2 /*return*/];
|
|
143
|
-
}
|
|
144
|
-
});
|
|
145
|
-
}); });
|
|
146
|
-
}
|
|
147
|
-
else {
|
|
148
|
-
$.interval.clear(val_componentID + '-staticSearch');
|
|
149
|
-
$.interval.standBy(val_componentID + '-staticSearch', 400, function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
150
|
-
var regExp, newSelection;
|
|
151
|
-
return __generator(this, function (_a) {
|
|
152
|
-
regExp = new RegExp(val_keyword, 'ig');
|
|
153
|
-
newSelection = [];
|
|
154
|
-
__spreadArray([], __read(params.options), false).forEach(function (o) {
|
|
155
|
-
var _a;
|
|
156
|
-
var match = Boolean(!val_keyword || ((_a = String(o.label)) !== null && _a !== void 0 ? _a : String(o.value)).match(regExp));
|
|
157
|
-
if (match)
|
|
158
|
-
newSelection.push(o);
|
|
159
|
-
});
|
|
160
|
-
set_options(newSelection);
|
|
161
|
-
set_status('show');
|
|
162
|
-
return [2 /*return*/];
|
|
163
|
-
});
|
|
164
|
-
}); });
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
else {
|
|
168
|
-
mountedKeyword.current = true;
|
|
169
|
-
}
|
|
170
|
-
}, [val_keyword]);
|
|
171
|
-
var mountedSelected = React.useRef(false);
|
|
172
|
-
useEffect(function () {
|
|
173
|
-
if (mountedSelected.current) {
|
|
174
|
-
params.onUpdated({
|
|
175
|
-
values: val_selected
|
|
176
|
-
});
|
|
177
|
-
}
|
|
178
|
-
else {
|
|
179
|
-
mountedSelected.current = true;
|
|
180
|
-
}
|
|
181
|
-
}, [val_selected]);
|
|
182
|
-
useEffect(function () {
|
|
183
|
-
$.fnScope(function () {
|
|
184
|
-
if ($.is.nullish(val_focus))
|
|
185
|
-
return;
|
|
186
|
-
if (val_keyEvent == 'MouseEvent')
|
|
187
|
-
return;
|
|
188
|
-
var Wrapper = $('#' + val_componentID + '-Selector-Cell-Wrap');
|
|
189
|
-
if (!Wrapper[0])
|
|
190
|
-
return;
|
|
191
|
-
var focusCell = $('[data-chips-selector-cell="' + val_componentID + '-' + JSON.stringify((val_focus === null || val_focus === void 0 ? void 0 : val_focus.value) || '').replace(/\"/ig, '') + '"]');
|
|
192
|
-
if (!focusCell[0])
|
|
193
|
-
return;
|
|
194
|
-
var _a = Wrapper.position(), pTop = _a.top, pHeight = _a.height;
|
|
195
|
-
var _b = focusCell.position(), cTop = _b.top, cHeight = _b.height;
|
|
196
|
-
if (pTop <= cTop && cTop + cHeight <= pTop + pHeight)
|
|
197
|
-
return;
|
|
198
|
-
var scroll = Wrapper[0].scrollTop + (cTop - pTop);
|
|
199
|
-
if (val_keyEvent == 'ArrowDown') {
|
|
200
|
-
scroll -= (pHeight - cHeight) - 20;
|
|
201
|
-
}
|
|
202
|
-
else if (val_keyEvent == 'ArrowUp') {
|
|
203
|
-
scroll -= 20;
|
|
204
|
-
}
|
|
205
|
-
Wrapper[0].scrollTop = scroll;
|
|
206
|
-
});
|
|
207
|
-
}, [val_focus]);
|
|
208
|
-
var List = [];
|
|
209
|
-
if (val_status == 'interlude') {
|
|
210
|
-
List = [React.createElement(_mols_1.Row.Center, { padding: 2, gap: 0 },
|
|
211
|
-
React.createElement(_functions_1.Loader.Theme.R, { showInitial: true }),
|
|
212
|
-
React.createElement(_atoms_1.Box, { padding: [0, 1], fontSize: '1.mini', fontColor: '4.thin' }, "\u691C\u7D22\u4E2D..."))];
|
|
213
|
-
}
|
|
214
|
-
else {
|
|
215
|
-
List = [
|
|
216
|
-
val_options.map(function (option, index) {
|
|
217
|
-
var value = option.value, label = option.label;
|
|
218
|
-
var safeValue = String(JSON.stringify(value));
|
|
219
|
-
var findIndex = val_selected.findIndex(function (v) { return JSON.stringify(v.value) == safeValue; });
|
|
220
|
-
var isSelected = findIndex != -1;
|
|
221
|
-
var isFocused = JSON.stringify((val_focus === null || val_focus === void 0 ? void 0 : val_focus.value) || '') == safeValue;
|
|
222
|
-
var styles = {};
|
|
223
|
-
if (isSelected || isFocused) {
|
|
224
|
-
styles = {
|
|
225
|
-
fontColor: 'theme',
|
|
226
|
-
isBoldFont: true,
|
|
227
|
-
};
|
|
228
|
-
}
|
|
229
|
-
if (isFocused) {
|
|
230
|
-
styles = __assign(__assign({}, styles), { backgroundColor: 'cloud', paddingLeft: '2/3' });
|
|
231
|
-
}
|
|
232
|
-
if (isSelected) {
|
|
233
|
-
styles = __assign(__assign({}, styles), { backgroundColor: 'tcOpFew' });
|
|
234
|
-
}
|
|
235
|
-
return React.createElement(_functions_1.Buttons.Button.Clear.R, __assign({ color: 'cloud', padding: '1/3', tabIndex: -1, textAlign: 'left', "data-chips-selector-cell": val_componentID + '-' + safeValue.replace(/\"/ig, ''), isActive: isSelected || isFocused, isActiveStyles: styles }, styles, { onMouseOver: function () {
|
|
236
|
-
set_keyEvent('MouseEvent');
|
|
237
|
-
set_focus(option);
|
|
238
|
-
}, onClick: function () {
|
|
239
|
-
var newSelected = __spreadArray([], __read(val_selected), false);
|
|
240
|
-
if (isSelected) {
|
|
241
|
-
newSelected.splice(findIndex, 1);
|
|
242
|
-
}
|
|
243
|
-
else {
|
|
244
|
-
newSelected = __spreadArray(__spreadArray([], __read(newSelected), false), [
|
|
245
|
-
option
|
|
246
|
-
], false);
|
|
247
|
-
if (params.limit && newSelected.length > params.limit) {
|
|
248
|
-
newSelected.shift();
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
set_selected(newSelected);
|
|
252
|
-
} }),
|
|
253
|
-
React.createElement(params.SelectorCellComponent, { isSelected: isSelected, isFocused: isFocused, value: value, label: label }));
|
|
254
|
-
})
|
|
255
|
-
];
|
|
256
|
-
}
|
|
257
|
-
return (React.createElement(React.Fragment, null,
|
|
258
|
-
React.createElement(_mols_1.Column, { padding: '2/3', gap: '2/3', borderBottom: true },
|
|
259
|
-
React.createElement(_mols_1.Row.Separate, null,
|
|
260
|
-
React.createElement(_functions_1.Input.Text.Normal, { value: val_keyword, onUpdateValidValue: function (_a) {
|
|
261
|
-
var value = _a.value;
|
|
262
|
-
set_keyword(value);
|
|
263
|
-
}, id: params.selectorID + '-KeywordInput', padding: '2/3', placeholder: '\u691C\u7D22...', leftIcon: React.createElement(_functions_1.Input.Comps.LeftIcon, { right: '2/3', fontSize: '1.mini', fontColor: '3.blur' },
|
|
264
|
-
React.createElement(_atoms_1.FAIcon.Search, null)), onKeyDown: function (event) {
|
|
265
|
-
var key = event.key, metaKey = event.metaKey, ctrlKey = event.ctrlKey;
|
|
266
|
-
var auxKey = metaKey || ctrlKey;
|
|
267
|
-
if (['ArrowDown', 'ArrowUp'].includes(key)) {
|
|
268
|
-
var dir = Number(key == 'ArrowDown') * 2 - 1;
|
|
269
|
-
if (auxKey) {
|
|
270
|
-
var next = val_options[dir == 1 ? val_options.length - 1 : 0];
|
|
271
|
-
set_focus(next);
|
|
272
|
-
}
|
|
273
|
-
else {
|
|
274
|
-
var nextIndex = val_options.findIndex(function (v) { return JSON.stringify(v.value) == JSON.stringify((val_focus === null || val_focus === void 0 ? void 0 : val_focus.value) || ''); }) + dir;
|
|
275
|
-
if (val_options[nextIndex]) {
|
|
276
|
-
set_focus(val_options[nextIndex]);
|
|
277
|
-
}
|
|
278
|
-
else {
|
|
279
|
-
set_focus(val_options[dir == 1 ? 0 : val_options.length - 1] || null);
|
|
280
|
-
}
|
|
281
|
-
}
|
|
282
|
-
}
|
|
283
|
-
else if (key == 'Enter') {
|
|
284
|
-
var selectedIndex = val_selected.findIndex(function (v) { return JSON.stringify(v.value) == JSON.stringify((val_focus === null || val_focus === void 0 ? void 0 : val_focus.value) || ''); });
|
|
285
|
-
var isSelected = selectedIndex != -1;
|
|
286
|
-
var newSelected = __spreadArray([], __read(val_selected), false);
|
|
287
|
-
if (isSelected) {
|
|
288
|
-
newSelected.splice(selectedIndex, 1);
|
|
289
|
-
}
|
|
290
|
-
else {
|
|
291
|
-
var optionsIndex = val_options.findIndex(function (v) { return JSON.stringify(v.value) == JSON.stringify((val_focus === null || val_focus === void 0 ? void 0 : val_focus.value) || ''); });
|
|
292
|
-
if (optionsIndex == -1)
|
|
293
|
-
return;
|
|
294
|
-
newSelected = __spreadArray(__spreadArray([], __read(newSelected), false), [
|
|
295
|
-
val_options[optionsIndex],
|
|
296
|
-
], false);
|
|
297
|
-
if (params.limit && newSelected.length > params.limit) {
|
|
298
|
-
newSelected.shift();
|
|
299
|
-
}
|
|
300
|
-
}
|
|
301
|
-
set_selected(newSelected);
|
|
302
|
-
}
|
|
303
|
-
set_keyEvent(key);
|
|
304
|
-
} }),
|
|
305
|
-
React.createElement(_functions_1.Buttons.Button.Border.S, { marginRight: '1/3', ssSphere: 2, backgroundColor: 'cloud', borderRadius: '2.tone.secondary', onClick: function () {
|
|
306
|
-
_functions_1.Sheet.close(params.selectorID);
|
|
307
|
-
} },
|
|
308
|
-
React.createElement(_atoms_1.FAIcon, { d: 'window-minimize' }))),
|
|
309
|
-
React.createElement(_mols_1.Row.Separate, null,
|
|
310
|
-
React.createElement(_mols_1.Row.Left, { gap: '1/2', verticalAlign: 'baseline' },
|
|
311
|
-
React.createElement(_atoms_1.Span, { fontColor: 'theme' }, val_options.length),
|
|
312
|
-
React.createElement(_atoms_1.Box, { fontSize: '1.mini', fontColor: '3.blur' }, "\u4EF6\u306E\u30D2\u30C3\u30C8")),
|
|
313
|
-
React.createElement(_mols_1.Row.Right, null, params.limit ? React.createElement(_atoms_1.Span, { fontColor: '3.blur', fontSize: '1.mini' },
|
|
314
|
-
React.createElement(_atoms_1.Span, { fontSize: '3.paragraph', fontColor: 'theme', isBoldFont: true }, val_selected.length),
|
|
315
|
-
" / ",
|
|
316
|
-
params.limit,
|
|
317
|
-
" \u4EF6") : null))),
|
|
318
|
-
React.createElement(_mols_1.Column, { gap: '1/4', padding: '1/2', overflow: 'auto', freeCSS: {
|
|
319
|
-
maxHeight: 12 * 26,
|
|
320
|
-
maxWidth: 12 * 26
|
|
321
|
-
}, id: val_componentID + '-Selector-Cell-Wrap', className: style_module_scss_1.default.SelectorWrapper }, List),
|
|
322
|
-
params.bottomContent));
|
|
323
|
-
};
|
|
324
|
-
exports.ChipsInputFNs = {
|
|
325
|
-
openSelector: function (params) {
|
|
326
|
-
var selectorID = params.selectorID, options = params.options, selected = params.selected, limit = params.limit, bottomContent = params.bottomContent, onDynamicSearch = params.onDynamicSearch, SelectorCellComponent = params.SelectorCellComponent, onUpdated = params.onUpdated, onClosed = params.onClosed, parent = params.parent, sheetarams = __rest(params, ["selectorID", "options", "selected", "limit", "bottomContent", "onDynamicSearch", "SelectorCellComponent", "onUpdated", "onClosed", "parent"]);
|
|
327
|
-
var sheetID = selectorID;
|
|
328
|
-
SelectorCellComponent = SelectorCellComponent || (function (params) {
|
|
329
|
-
return React.createElement(_mols_1.Row.Left, null,
|
|
330
|
-
React.createElement(_atoms_1.FAIcon.CheckCircle, { isSolidIcon: params.isSelected, isRegularIcon: !params.isSelected, fontColor: params.isSelected ? 'theme' : '6.clear' }),
|
|
331
|
-
params.label);
|
|
332
|
-
});
|
|
333
|
-
_functions_1.Sheet.open(__assign(__assign({ parent: parent, sheetID: sheetID, type: 'custom', gravityPoint: 22, padding: [1, 0], holdState: true, closeOption: {
|
|
334
|
-
aroundClick: true,
|
|
335
|
-
escapeKeyDown: true
|
|
336
|
-
} }, sheetarams), { content: React.createElement(_atoms_1.Box, { borderRadius: '2.tone.secondary', backgroundColor: '1.layer.base', border: true, boxShadow: 'borderBox', overflow: 'hidden' },
|
|
337
|
-
React.createElement(Selector, { selectorID: selectorID, options: options, limit: limit, selected: selected, onUpdated: onUpdated, SelectorCellComponent: SelectorCellComponent, bottomContent: bottomContent, onDynamicSearch: onDynamicSearch })), openAfter: function () {
|
|
338
|
-
$('#' + params.selectorID + '-KeywordInput').focus();
|
|
339
|
-
}, closeAfter: function () {
|
|
340
|
-
onClosed();
|
|
341
|
-
} }));
|
|
342
|
-
},
|
|
343
|
-
closeSelector: function (selectorID) {
|
|
344
|
-
_functions_1.Sheet.close(selectorID);
|
|
345
|
-
},
|
|
346
|
-
updateOptions: function (selectorID, options) {
|
|
347
|
-
var C = _global_1.useStore.get(selectorID);
|
|
348
|
-
if (C && C.updateOptions)
|
|
349
|
-
C.updateOptions(options);
|
|
350
|
-
},
|
|
351
|
-
updateSelected: function (selectorID, selected) {
|
|
352
|
-
var C = _global_1.useStore.get(selectorID);
|
|
353
|
-
if (C && C.updateSelected)
|
|
354
|
-
C.updateSelected(selected);
|
|
355
|
-
}
|
|
356
|
-
};
|