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,359 +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 __read = (this && this.__read) || function (o, n) {
|
|
50
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
51
|
-
if (!m) return o;
|
|
52
|
-
var i = m.call(o), r, ar = [], e;
|
|
53
|
-
try {
|
|
54
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
55
|
-
}
|
|
56
|
-
catch (error) { e = { error: error }; }
|
|
57
|
-
finally {
|
|
58
|
-
try {
|
|
59
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
60
|
-
}
|
|
61
|
-
finally { if (e) throw e.error; }
|
|
62
|
-
}
|
|
63
|
-
return ar;
|
|
64
|
-
};
|
|
65
|
-
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
66
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
67
|
-
if (ar || !(i in from)) {
|
|
68
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
69
|
-
ar[i] = from[i];
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
73
|
-
};
|
|
74
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
75
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
76
|
-
};
|
|
77
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
78
|
-
exports.DragTable = void 0;
|
|
79
|
-
var _export_1 = require("../../../Global/@export");
|
|
80
|
-
var _export_2 = require("../../../Atoms/@export");
|
|
81
|
-
var _export_3 = require("../../../Functions/@export");
|
|
82
|
-
var useState = React.useState, useEffect = React.useEffect;
|
|
83
|
-
var _1 = require("../_");
|
|
84
|
-
var style_module_scss_1 = __importDefault(require("../style.module.scss"));
|
|
85
|
-
var HeadRow = function (props) {
|
|
86
|
-
var _a = props.cellStyles, cellStyles = _a === void 0 ? {} : _a, _b = props.cellClassName, cellClassName = _b === void 0 ? '' : _b, cellStylesCallback = props.cellStylesCallback, colLength = props.colLength, head = props.head, rows = props.rows;
|
|
87
|
-
if (!head)
|
|
88
|
-
return null;
|
|
89
|
-
var Cols = [];
|
|
90
|
-
for (var colIndex = 0; colIndex < colLength; colIndex++) {
|
|
91
|
-
var col = head[colIndex];
|
|
92
|
-
var Cell = _1.Comps[col.type == 'th' ? 'TH' : 'TD'];
|
|
93
|
-
Cols.push(React.createElement(Cell, __assign({}, cellStyles, (0, _1.DefaultCellSystemStyles)({
|
|
94
|
-
top: true,
|
|
95
|
-
bottom: !rows.length,
|
|
96
|
-
left: colIndex == 0,
|
|
97
|
-
right: colIndex == colLength - 1
|
|
98
|
-
}), cellStylesCallback ? cellStylesCallback({
|
|
99
|
-
top: true,
|
|
100
|
-
bottom: !rows.length,
|
|
101
|
-
left: colIndex == 0,
|
|
102
|
-
right: colIndex == colLength - 1,
|
|
103
|
-
rowIndex: 0,
|
|
104
|
-
colIndex: colIndex,
|
|
105
|
-
isBody: false,
|
|
106
|
-
isHeader: true,
|
|
107
|
-
}) : {}, { className: [
|
|
108
|
-
style_module_scss_1.default.Cell,
|
|
109
|
-
cellClassName,
|
|
110
|
-
col.className,
|
|
111
|
-
].join(' ') }, col)));
|
|
112
|
-
}
|
|
113
|
-
return (React.createElement(_1.Comps.Row, { className: [style_module_scss_1.default.Row, style_module_scss_1.default.HeadRow].join(' '), children: Cols }));
|
|
114
|
-
};
|
|
115
|
-
var BodyRows = function (props) {
|
|
116
|
-
var _a = props.cellStyles, cellStyles = _a === void 0 ? {} : _a, _b = props.cellClassName, cellClassName = _b === void 0 ? '' : _b, cellStylesCallback = props.cellStylesCallback, head = props.head, rows = props.rows, colLength = props.colLength, onOrderChanged = props.onOrderChanged;
|
|
117
|
-
var _c = __read(useState($.uuidGen()), 1), val_componentID = _c[0];
|
|
118
|
-
var _d = __read(useState({
|
|
119
|
-
rows: rows,
|
|
120
|
-
origin: 0,
|
|
121
|
-
to: NaN
|
|
122
|
-
}), 2), val_info = _d[0], set_info = _d[1];
|
|
123
|
-
var BodyRows = [];
|
|
124
|
-
val_info.rows.forEach(function (cols, rowIndex) {
|
|
125
|
-
var Cols = [];
|
|
126
|
-
{
|
|
127
|
-
Cols.push(React.createElement(_1.Comps.TH, __assign({ key: 'DragOrigin' }, cellStyles, (0, _1.DefaultCellSystemStyles)({
|
|
128
|
-
top: rowIndex == 0 && !head,
|
|
129
|
-
bottom: rowIndex == rows.length - 1,
|
|
130
|
-
left: true,
|
|
131
|
-
right: false
|
|
132
|
-
}), cellStylesCallback ? cellStylesCallback({
|
|
133
|
-
top: rowIndex == 0 && !head,
|
|
134
|
-
bottom: rowIndex == rows.length - 1,
|
|
135
|
-
left: true,
|
|
136
|
-
right: false,
|
|
137
|
-
rowIndex: rowIndex,
|
|
138
|
-
colIndex: 0,
|
|
139
|
-
isBody: true,
|
|
140
|
-
isHeader: false,
|
|
141
|
-
}) : {}, { padding: 0, borderRight: true, className: [
|
|
142
|
-
style_module_scss_1.default.Cell,
|
|
143
|
-
style_module_scss_1.default.Draggable,
|
|
144
|
-
cellClassName
|
|
145
|
-
].join(' ') }),
|
|
146
|
-
React.createElement(_export_3.Buttons.Button.Clear.R, { className: style_module_scss_1.default.DragableButton, fontColor: '5.translucent', fontSize: '3.paragraph', margin: 'auto', tabIndex: -1, ssSphere: 3, onMouseDown: function (event) {
|
|
147
|
-
EffectStart(event, {
|
|
148
|
-
id: val_componentID,
|
|
149
|
-
index: rowIndex,
|
|
150
|
-
rows: val_info.rows,
|
|
151
|
-
maxLength: rows.length
|
|
152
|
-
});
|
|
153
|
-
}, onTouchStart: function (event) {
|
|
154
|
-
EffectStart(event, {
|
|
155
|
-
id: val_componentID,
|
|
156
|
-
index: rowIndex,
|
|
157
|
-
rows: val_info.rows,
|
|
158
|
-
maxLength: rows.length
|
|
159
|
-
});
|
|
160
|
-
} },
|
|
161
|
-
React.createElement(_export_2.FAIcon, { d: 'grip-dots-vertical' }))));
|
|
162
|
-
}
|
|
163
|
-
cols.forEach(function (col, colIndex) {
|
|
164
|
-
col = __assign({}, col);
|
|
165
|
-
var Cell = _1.Comps[col.type == 'th' ? 'TH' : 'TD'];
|
|
166
|
-
Cols.push(React.createElement(Cell, __assign({}, cellStyles, (0, _1.DefaultCellSystemStyles)({
|
|
167
|
-
top: !!head && !head.length,
|
|
168
|
-
bottom: rowIndex == rows.length - 1,
|
|
169
|
-
left: false,
|
|
170
|
-
right: colIndex == colLength - 2
|
|
171
|
-
}), cellStylesCallback ? cellStylesCallback({
|
|
172
|
-
top: !!head && !head.length,
|
|
173
|
-
bottom: rowIndex == rows.length - 1,
|
|
174
|
-
left: false,
|
|
175
|
-
right: colIndex == colLength - 2,
|
|
176
|
-
rowIndex: rowIndex,
|
|
177
|
-
colIndex: colIndex,
|
|
178
|
-
isBody: true,
|
|
179
|
-
isHeader: false,
|
|
180
|
-
}) : {}, { className: [
|
|
181
|
-
style_module_scss_1.default.Cell,
|
|
182
|
-
cellClassName,
|
|
183
|
-
col.className,
|
|
184
|
-
].join(' ') }, col)));
|
|
185
|
-
});
|
|
186
|
-
BodyRows.push(React.createElement(_1.Comps.Row, { key: rowIndex, id: 'TableRow-' + val_componentID + '-' + rowIndex, "data-rowId": rowIndex, className: [style_module_scss_1.default.Row, style_module_scss_1.default.BodyRow].join(' '), children: Cols }));
|
|
187
|
-
});
|
|
188
|
-
if (!isNaN(val_info.to)) {
|
|
189
|
-
var origin_1 = val_info.origin, to = val_info.to;
|
|
190
|
-
var Cols_1 = [];
|
|
191
|
-
Cols_1.push(React.createElement(_1.Comps.TH, { key: 'dragButton', backgroundColor: 'tcOpLow', padding: 0, borderRight: '2.normal', className: [
|
|
192
|
-
style_module_scss_1.default.Cell,
|
|
193
|
-
style_module_scss_1.default.Draggable,
|
|
194
|
-
cellClassName
|
|
195
|
-
].join(' ') },
|
|
196
|
-
React.createElement(_export_2.FAIcon.ArrowRight, { fontColor: 'theme' })));
|
|
197
|
-
var cols = val_info.rows[origin_1];
|
|
198
|
-
cols.forEach(function (col, colIndex) {
|
|
199
|
-
col = __assign({}, col);
|
|
200
|
-
var Cell = _1.Comps[col.type == 'th' ? 'TH' : 'TD'];
|
|
201
|
-
Cols_1.push(React.createElement(Cell, __assign({}, cellStyles, (0, _1.DefaultCellSystemStyles)({
|
|
202
|
-
top: false,
|
|
203
|
-
bottom: false,
|
|
204
|
-
left: false,
|
|
205
|
-
right: false
|
|
206
|
-
}), cellStylesCallback ? cellStylesCallback({
|
|
207
|
-
top: false,
|
|
208
|
-
bottom: false,
|
|
209
|
-
left: false,
|
|
210
|
-
right: false,
|
|
211
|
-
rowIndex: -1,
|
|
212
|
-
colIndex: -1,
|
|
213
|
-
isBody: true,
|
|
214
|
-
isHeader: false,
|
|
215
|
-
}) : {}, { className: [
|
|
216
|
-
style_module_scss_1.default.Cell,
|
|
217
|
-
cellClassName,
|
|
218
|
-
col.className,
|
|
219
|
-
].join(' '), backgroundColor: 'tcOpLow' }, col)));
|
|
220
|
-
});
|
|
221
|
-
BodyRows.splice(to, 0, React.createElement(_1.Comps.Row, { key: 'preSet', className: [style_module_scss_1.default.Row, style_module_scss_1.default.Pre].join(' '), children: Cols_1 }));
|
|
222
|
-
}
|
|
223
|
-
useEffect(function () {
|
|
224
|
-
_export_1.useStore.set({
|
|
225
|
-
key: val_componentID,
|
|
226
|
-
value: {
|
|
227
|
-
swap: function (rowIndex, insertIndex) {
|
|
228
|
-
if (insertIndex || insertIndex == 0) {
|
|
229
|
-
var targetRow = val_info.rows[rowIndex];
|
|
230
|
-
var newRows = __spreadArray([], __read(val_info.rows), false);
|
|
231
|
-
newRows.splice(rowIndex, 1);
|
|
232
|
-
newRows.splice(insertIndex - (rowIndex < insertIndex ? 1 : 0), 0, targetRow);
|
|
233
|
-
set_info({
|
|
234
|
-
rows: newRows,
|
|
235
|
-
origin: 0,
|
|
236
|
-
to: NaN
|
|
237
|
-
});
|
|
238
|
-
onOrderChanged(newRows.map(function (row) { return JSON.parse(row.rowID); }));
|
|
239
|
-
}
|
|
240
|
-
},
|
|
241
|
-
preSet: function (props) {
|
|
242
|
-
var origin = props.origin, index = props.index;
|
|
243
|
-
set_info({
|
|
244
|
-
rows: val_info.rows,
|
|
245
|
-
origin: origin,
|
|
246
|
-
to: index
|
|
247
|
-
});
|
|
248
|
-
}
|
|
249
|
-
}
|
|
250
|
-
});
|
|
251
|
-
});
|
|
252
|
-
useEffect(function () {
|
|
253
|
-
return function () {
|
|
254
|
-
_export_1.useStore.delete(val_componentID);
|
|
255
|
-
};
|
|
256
|
-
}, []);
|
|
257
|
-
return (React.createElement(React.Fragment, null, BodyRows));
|
|
258
|
-
};
|
|
259
|
-
var DragTable = function (params) {
|
|
260
|
-
params.colLength = params.colLength + 1;
|
|
261
|
-
if (params.head) {
|
|
262
|
-
params.head = __spreadArray([
|
|
263
|
-
{
|
|
264
|
-
children: React.createElement(_export_3.Buttons.Button.Plain, { ssSphere: 3, fontSize: '3.paragraph', fontColor: 'theme', onMouseOver: function (event) {
|
|
265
|
-
_export_3.Tooltips.open({
|
|
266
|
-
parent: event.currentTarget,
|
|
267
|
-
padding: [0, 1],
|
|
268
|
-
content: React.createElement(_export_3.Tooltips.Comps.Body, null,
|
|
269
|
-
React.createElement(_export_2.FAIcon, { d: 'grip-dots-vertical' }),
|
|
270
|
-
"\u30DC\u30BF\u30F3\u3092\u30C9\u30E9\u30C3\u30B0\u3057\u3066\u9806\u5E8F\u3092\u5909\u66F4")
|
|
271
|
-
});
|
|
272
|
-
} },
|
|
273
|
-
React.createElement(_export_2.FAIcon.QuestionCircle, null)),
|
|
274
|
-
padding: [0, 1],
|
|
275
|
-
unitWidth: 4
|
|
276
|
-
}
|
|
277
|
-
], __read(params.head), false);
|
|
278
|
-
}
|
|
279
|
-
params.rows = params.rows.map(function (row, rowIndex) {
|
|
280
|
-
row.rowID = JSON.stringify(row.rowID || rowIndex);
|
|
281
|
-
return row;
|
|
282
|
-
});
|
|
283
|
-
return (React.createElement(_1.Comps.Table, { className: style_module_scss_1.default.Table },
|
|
284
|
-
React.createElement(HeadRow, __assign({}, params)),
|
|
285
|
-
React.createElement(BodyRows, __assign({}, params))));
|
|
286
|
-
};
|
|
287
|
-
exports.DragTable = DragTable;
|
|
288
|
-
var EffectStart = function (event, info) {
|
|
289
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
290
|
-
var id, index, rows, maxLength;
|
|
291
|
-
return __generator(this, function (_a) {
|
|
292
|
-
event.stopPropagation();
|
|
293
|
-
event.preventDefault();
|
|
294
|
-
id = info.id, index = info.index, rows = info.rows, maxLength = info.maxLength;
|
|
295
|
-
$('#TableRow-' + id + '-' + index).addClass(style_module_scss_1.default.DraggerOrigin);
|
|
296
|
-
$(document)
|
|
297
|
-
.addEvent({
|
|
298
|
-
eventID: 'DragMouseMove',
|
|
299
|
-
eventType: 'mousemove',
|
|
300
|
-
callback: function (event) { EffectMove(event, info); },
|
|
301
|
-
option: { passive: false }
|
|
302
|
-
})
|
|
303
|
-
.addEvent({
|
|
304
|
-
eventID: 'DragTouchMove',
|
|
305
|
-
eventType: 'touchmove',
|
|
306
|
-
callback: function (event) { EffectMove(event, info); },
|
|
307
|
-
option: { passive: false }
|
|
308
|
-
})
|
|
309
|
-
.addEvent({
|
|
310
|
-
eventID: 'DragMouseUp',
|
|
311
|
-
eventType: 'mouseup',
|
|
312
|
-
callback: function (event) { EffectEnd(event, info); }
|
|
313
|
-
})
|
|
314
|
-
.addEvent({
|
|
315
|
-
eventID: 'DragTouchEnd',
|
|
316
|
-
eventType: 'touchend',
|
|
317
|
-
callback: function (event) { EffectEnd(event, info); }
|
|
318
|
-
});
|
|
319
|
-
return [2 /*return*/];
|
|
320
|
-
});
|
|
321
|
-
});
|
|
322
|
-
};
|
|
323
|
-
var EffectMove = function (event, info) {
|
|
324
|
-
var id = info.id, maxLength = info.maxLength;
|
|
325
|
-
var Y = $.getCursor(event).y - $.getScreenSize().scrollY;
|
|
326
|
-
for (var rowIndex = 0; rowIndex < maxLength; rowIndex++) {
|
|
327
|
-
var Row = $('#TableRow-' + id + '-' + rowIndex);
|
|
328
|
-
var _a = Row.position(), rT = _a.top, rB = _a.bottom, rH = _a.height;
|
|
329
|
-
if (rowIndex == 0 && Y < rT) {
|
|
330
|
-
info.insertIndex = 0;
|
|
331
|
-
}
|
|
332
|
-
else if (rowIndex === maxLength - 1 && rB <= Y) {
|
|
333
|
-
info.insertIndex = maxLength;
|
|
334
|
-
}
|
|
335
|
-
else if (Y >= rT && Y < rB) {
|
|
336
|
-
info.insertIndex = rowIndex + 1;
|
|
337
|
-
}
|
|
338
|
-
}
|
|
339
|
-
{
|
|
340
|
-
var index = info.index, insertIndex = info.insertIndex;
|
|
341
|
-
var component = _export_1.useStore.get(id);
|
|
342
|
-
if (component && component.preSet)
|
|
343
|
-
component.preSet({
|
|
344
|
-
origin: index,
|
|
345
|
-
index: insertIndex
|
|
346
|
-
});
|
|
347
|
-
}
|
|
348
|
-
event.stopPropagation();
|
|
349
|
-
event.preventDefault();
|
|
350
|
-
return false;
|
|
351
|
-
};
|
|
352
|
-
var EffectEnd = function (event, info) {
|
|
353
|
-
var id = info.id, index = info.index, insertIndex = info.insertIndex;
|
|
354
|
-
var component = _export_1.useStore.get(id);
|
|
355
|
-
if (component && component.swap)
|
|
356
|
-
component.swap(index, insertIndex);
|
|
357
|
-
$('#TableRow-' + id + '-' + index).removeClass(style_module_scss_1.default.DraggerOrigin);
|
|
358
|
-
$(document).removeEvent(['DragMouseMove', 'DragTouchMove', 'DragMouseUp', 'DragTouchEnd']);
|
|
359
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const NormalTable: FNC<amotify.fn.Tables.Normal.Params>;
|
|
@@ -1,92 +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.NormalTable = void 0;
|
|
18
|
-
var style_module_scss_1 = __importDefault(require("../style.module.scss"));
|
|
19
|
-
var _1 = require("../_");
|
|
20
|
-
var HeadRow = function (params) {
|
|
21
|
-
var _a = params.cellStyles, cellStyles = _a === void 0 ? {} : _a, _b = params.cellClassName, cellClassName = _b === void 0 ? '' : _b, cellStylesCallback = params.cellStylesCallback, colLength = params.colLength, head = params.head, rows = params.rows;
|
|
22
|
-
if (!head)
|
|
23
|
-
return null;
|
|
24
|
-
var Cols = [];
|
|
25
|
-
head.forEach(function (col, colIndex) {
|
|
26
|
-
var Cell = _1.Comps[col.type == 'th' ? 'TH' : 'TD'];
|
|
27
|
-
Cols.push(React.createElement(Cell, __assign({}, cellStyles, (0, _1.DefaultCellSystemStyles)({
|
|
28
|
-
top: true,
|
|
29
|
-
bottom: !rows.length,
|
|
30
|
-
left: colIndex == 0,
|
|
31
|
-
right: colIndex == colLength - 1
|
|
32
|
-
}), cellStylesCallback ? cellStylesCallback({
|
|
33
|
-
top: true,
|
|
34
|
-
bottom: !rows.length,
|
|
35
|
-
left: colIndex == 0,
|
|
36
|
-
right: colIndex == colLength - 1,
|
|
37
|
-
rowIndex: 0,
|
|
38
|
-
colIndex: colIndex,
|
|
39
|
-
isBody: false,
|
|
40
|
-
isHeader: true,
|
|
41
|
-
}) : {}, { className: [
|
|
42
|
-
style_module_scss_1.default.Cell,
|
|
43
|
-
cellClassName,
|
|
44
|
-
col.className,
|
|
45
|
-
].join(' ') }, col)));
|
|
46
|
-
});
|
|
47
|
-
return (React.createElement(_1.Comps.Row, { className: [style_module_scss_1.default.Row, style_module_scss_1.default.HeadRow].join(' '), children: Cols }));
|
|
48
|
-
};
|
|
49
|
-
var BodyRows = function (params) {
|
|
50
|
-
var _a = params.cellStyles, cellStyles = _a === void 0 ? {} : _a, _b = params.cellClassName, cellClassName = _b === void 0 ? '' : _b, cellStylesCallback = params.cellStylesCallback, head = params.head, rows = params.rows, colLength = params.colLength, onRowClick = params.onRowClick;
|
|
51
|
-
var BodyRows = [];
|
|
52
|
-
rows.forEach(function (cols, rowIndex) {
|
|
53
|
-
var Cols = [];
|
|
54
|
-
cols.forEach(function (col, colIndex) {
|
|
55
|
-
var Cell = _1.Comps[col.type == 'th' ? 'TH' : 'TD'];
|
|
56
|
-
Cols.push(React.createElement(Cell, __assign({}, cellStyles, (0, _1.DefaultCellSystemStyles)({
|
|
57
|
-
top: rowIndex == 0 && !head,
|
|
58
|
-
bottom: rowIndex == rows.length - 1,
|
|
59
|
-
left: colIndex == 0,
|
|
60
|
-
right: colIndex == colLength - 1
|
|
61
|
-
}), cellStylesCallback ? cellStylesCallback({
|
|
62
|
-
top: rowIndex == 0 && !head,
|
|
63
|
-
bottom: rowIndex == rows.length - 1,
|
|
64
|
-
left: colIndex == 0,
|
|
65
|
-
right: colIndex == colLength - 1,
|
|
66
|
-
rowIndex: rowIndex,
|
|
67
|
-
colIndex: colIndex,
|
|
68
|
-
isBody: true,
|
|
69
|
-
isHeader: false,
|
|
70
|
-
}) : {}, { className: [
|
|
71
|
-
style_module_scss_1.default.Cell,
|
|
72
|
-
cellClassName,
|
|
73
|
-
col.className,
|
|
74
|
-
].join(' ') }, col)));
|
|
75
|
-
});
|
|
76
|
-
BodyRows.push(React.createElement(_1.Comps.Row, { key: rowIndex, className: [style_module_scss_1.default.Row, style_module_scss_1.default.BodyRow].join(' '), children: Cols, onClick: function (event) {
|
|
77
|
-
if (onRowClick)
|
|
78
|
-
onRowClick(cols.rowID, event);
|
|
79
|
-
} }));
|
|
80
|
-
});
|
|
81
|
-
return (React.createElement(React.Fragment, null, BodyRows));
|
|
82
|
-
};
|
|
83
|
-
var NormalTable = function (params) {
|
|
84
|
-
params.rows = params.rows.map(function (row, rowIndex) {
|
|
85
|
-
row.rowID = row.rowID || rowIndex;
|
|
86
|
-
return row;
|
|
87
|
-
});
|
|
88
|
-
return (React.createElement(_1.Comps.Table, { className: style_module_scss_1.default.Table },
|
|
89
|
-
React.createElement(HeadRow, __assign({}, params)),
|
|
90
|
-
React.createElement(BodyRows, __assign({}, params))));
|
|
91
|
-
};
|
|
92
|
-
exports.NormalTable = NormalTable;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export declare const Comps: amotify.fn.Tables.CompsMethods;
|
|
2
|
-
export declare const Table: amotify.fn.Tables.Methods;
|
|
3
|
-
export declare const DefaultCellStyles: (type: amotify.fn.Tables.Types, tone: amotify.fn.Tables.Tones) => amotifyUniStyleParams;
|
|
4
|
-
export declare const DefaultCellSystemStyles: (args: {
|
|
5
|
-
top: boolean;
|
|
6
|
-
bottom: boolean;
|
|
7
|
-
left: boolean;
|
|
8
|
-
right: boolean;
|
|
9
|
-
}) => amotifyUniStyleParams;
|
|
@@ -1,153 +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 __importDefault = (this && this.__importDefault) || function (mod) {
|
|
41
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
42
|
-
};
|
|
43
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
44
|
-
exports.DefaultCellSystemStyles = exports.DefaultCellStyles = exports.Table = exports.Comps = void 0;
|
|
45
|
-
var _export_1 = require("../../Global/@export");
|
|
46
|
-
var _export_2 = require("../../Atoms/@export");
|
|
47
|
-
exports.Comps = {
|
|
48
|
-
Table: function (params) { return (React.createElement("table", __assign({}, _export_1.StyleConverter.ToClassName(params)))); },
|
|
49
|
-
Head: function (params) { return (React.createElement("thead", __assign({}, _export_1.StyleConverter.ToClassName(params)))); },
|
|
50
|
-
Body: function (params) { return (React.createElement("tbody", __assign({}, _export_1.StyleConverter.ToClassName(params)))); },
|
|
51
|
-
Row: function (params) { return (React.createElement("tr", __assign({}, _export_1.StyleConverter.ToClassName(params)))); },
|
|
52
|
-
TH: function (params) { return (React.createElement("th", __assign({}, _export_1.StyleConverter.ToClassName(params)))); },
|
|
53
|
-
TD: function (params) { return (React.createElement("td", __assign({}, _export_1.StyleConverter.ToClassName(params)))); },
|
|
54
|
-
RightIndicator: {
|
|
55
|
-
type: 'td',
|
|
56
|
-
unitWidth: 4,
|
|
57
|
-
// data: '',
|
|
58
|
-
children: React.createElement(_export_2.FAIcon.AngleRight, { fontColor: 'theme', fontSize: '4.thirdTitle' })
|
|
59
|
-
}
|
|
60
|
-
};
|
|
61
|
-
var parts_1 = require("./Normal/parts");
|
|
62
|
-
var parts_2 = require("./Data/parts");
|
|
63
|
-
var parts_3 = require("./Drag/parts");
|
|
64
|
-
var style_module_scss_1 = __importDefault(require("./style.module.scss"));
|
|
65
|
-
var Wrapper = function (params) {
|
|
66
|
-
var tone = params.tone, type = params.type;
|
|
67
|
-
params.tableID = params.tableID || $.uuidGen();
|
|
68
|
-
tone = tone || 'auto';
|
|
69
|
-
if (tone == 'auto') {
|
|
70
|
-
if (type == 'drag') {
|
|
71
|
-
tone = 'rowBorder';
|
|
72
|
-
}
|
|
73
|
-
else {
|
|
74
|
-
tone = 'border';
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
var Params = __assign(__assign(__assign({}, tone != 'plain' ? {
|
|
78
|
-
backgroundColor: '1.layer.base',
|
|
79
|
-
borderRadius: '1.tone.primary',
|
|
80
|
-
} : {}), params), { cellStyles: __assign(__assign({ padding: '3/4', backgroundColor: '1.layer.base', transition: 'short', textAlign: 'center' }, (0, exports.DefaultCellStyles)(type, tone)), params.cellStyles), tone: tone });
|
|
81
|
-
var _a = _export_1.StyleConverter.ToClassName(Params), className = _a.className, freeCSS = _a.style, others = __rest(_a, ["className", "style"]);
|
|
82
|
-
var ClassName = [
|
|
83
|
-
className,
|
|
84
|
-
style_module_scss_1.default.Wrap,
|
|
85
|
-
style_module_scss_1.default['TableType_' + type],
|
|
86
|
-
style_module_scss_1.default['RowClickable_' + !!params.onRowClick]
|
|
87
|
-
].join(' ');
|
|
88
|
-
var TableComponent = {
|
|
89
|
-
'normal': parts_1.NormalTable,
|
|
90
|
-
'data': parts_2.DataTable,
|
|
91
|
-
'drag': parts_3.DragTable,
|
|
92
|
-
'spread': ''
|
|
93
|
-
}[type];
|
|
94
|
-
return (React.createElement(_export_2.Box, { className: ClassName, style: freeCSS },
|
|
95
|
-
React.createElement(TableComponent, __assign({}, others))));
|
|
96
|
-
};
|
|
97
|
-
var DataComponent = function (props) { return (React.createElement(Wrapper, __assign({ type: 'data' }, props))); };
|
|
98
|
-
Object.entries(parts_2.DataFNs).forEach(function (_a) {
|
|
99
|
-
var _b = __read(_a, 2), key = _b[0], value = _b[1];
|
|
100
|
-
DataComponent[key] = value;
|
|
101
|
-
});
|
|
102
|
-
Object.entries(parts_2.DataComps).forEach(function (_a) {
|
|
103
|
-
var _b = __read(_a, 2), key = _b[0], value = _b[1];
|
|
104
|
-
DataComponent[key] = value;
|
|
105
|
-
});
|
|
106
|
-
exports.Table = {
|
|
107
|
-
Normal: function (props) { return (React.createElement(Wrapper, __assign({ type: 'normal' }, props))); },
|
|
108
|
-
Data: DataComponent,
|
|
109
|
-
Drag: function (props) { return (React.createElement(Wrapper, __assign({ type: 'drag' }, props))); },
|
|
110
|
-
Spread: function () { return (React.createElement(React.Fragment, null, "Table.Spread ( in Progress )")); },
|
|
111
|
-
Comps: exports.Comps
|
|
112
|
-
};
|
|
113
|
-
var DefaultCellStyles = function (type, tone) {
|
|
114
|
-
if (tone == 'plain')
|
|
115
|
-
return {};
|
|
116
|
-
var Styles = {};
|
|
117
|
-
if (type == 'drag') {
|
|
118
|
-
Styles.padding = 1;
|
|
119
|
-
}
|
|
120
|
-
if (['border', 'rowBorder', 'cellBorder'].includes(tone)) {
|
|
121
|
-
Styles.borderBottom = '2.normal';
|
|
122
|
-
}
|
|
123
|
-
if (['border', 'cellBorder'].includes(tone)) {
|
|
124
|
-
Styles.borderRight = '2.normal';
|
|
125
|
-
}
|
|
126
|
-
return Styles;
|
|
127
|
-
};
|
|
128
|
-
exports.DefaultCellStyles = DefaultCellStyles;
|
|
129
|
-
var DefaultCellSystemStyles = function (args) {
|
|
130
|
-
var Styles = {};
|
|
131
|
-
if (args.right) {
|
|
132
|
-
Styles.borderRight = 'unset';
|
|
133
|
-
}
|
|
134
|
-
if (args.top) {
|
|
135
|
-
if (args.left) {
|
|
136
|
-
Styles.borderTopLeftRadius = 'inherit';
|
|
137
|
-
}
|
|
138
|
-
if (args.right) {
|
|
139
|
-
Styles.borderTopRightRadius = 'inherit';
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
if (args.bottom) {
|
|
143
|
-
Styles.borderBottom = 'unset';
|
|
144
|
-
if (args.left) {
|
|
145
|
-
Styles.borderBottomLeftRadius = 'inherit';
|
|
146
|
-
}
|
|
147
|
-
if (args.right) {
|
|
148
|
-
Styles.borderBottomRightRadius = 'inherit';
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
return Styles;
|
|
152
|
-
};
|
|
153
|
-
exports.DefaultCellSystemStyles = DefaultCellSystemStyles;
|