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,629 +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 __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
41
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
42
|
-
if (ar || !(i in from)) {
|
|
43
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
44
|
-
ar[i] = from[i];
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
48
|
-
};
|
|
49
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
50
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
51
|
-
};
|
|
52
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
53
|
-
exports.DataTable = exports.DataComps = exports.DataFNs = void 0;
|
|
54
|
-
var _export_1 = require("../../../Global/@export");
|
|
55
|
-
var _export_2 = require("../../../Atoms/@export");
|
|
56
|
-
var _export_3 = require("../../../Molecules/@export");
|
|
57
|
-
var _export_4 = require("../../../Functions/@export");
|
|
58
|
-
var style_module_scss_1 = __importDefault(require("../style.module.scss"));
|
|
59
|
-
var _1 = require("../_");
|
|
60
|
-
var Components = {
|
|
61
|
-
__memoryID: $.uuidGen(),
|
|
62
|
-
Header: function (params) {
|
|
63
|
-
var _a = __assign({}, params), val_status = _a.val_status, set_status = _a.set_status, KeywordFilterRows = _a.KeywordFilterRows;
|
|
64
|
-
var order = val_status.order, filter = val_status.filter;
|
|
65
|
-
var _b = __read(order.current, 2), orderIndex = _b[0], orderDirection = _b[1];
|
|
66
|
-
var Cols = [];
|
|
67
|
-
var HEAD = __spreadArray([], __read(val_status.head), false);
|
|
68
|
-
if (val_status.checker) {
|
|
69
|
-
Cols.push(_export_1.React.createElement(_1.Comps.TH, __assign({}, val_status.cellStyles, { fontWeight: '2.normal', position: 'sticky', top: 0, unitWidth: 4, padding: 0 }, (0, _1.DefaultCellSystemStyles)({
|
|
70
|
-
top: true,
|
|
71
|
-
bottom: !val_status.rows.length,
|
|
72
|
-
left: true,
|
|
73
|
-
right: !val_status.colLength
|
|
74
|
-
}), val_status.cellStylesCallback ? val_status.cellStylesCallback({
|
|
75
|
-
top: true,
|
|
76
|
-
bottom: !val_status.rows.length,
|
|
77
|
-
left: true,
|
|
78
|
-
right: !val_status.colLength,
|
|
79
|
-
rowIndex: 0,
|
|
80
|
-
colIndex: 0,
|
|
81
|
-
isBody: false,
|
|
82
|
-
isHeader: true
|
|
83
|
-
}) : {}, { className: [
|
|
84
|
-
style_module_scss_1.default.Cell,
|
|
85
|
-
val_status.cellClassName
|
|
86
|
-
].join(' '), freeCSS: {
|
|
87
|
-
zIndex: 2
|
|
88
|
-
} }),
|
|
89
|
-
_export_1.React.createElement(_export_2.Box, { flexCenter: true },
|
|
90
|
-
_export_1.React.createElement(_export_4.Input.Checker, { label: null, value: false, onUpdateValidValue: function (_a) {
|
|
91
|
-
var value = _a.value;
|
|
92
|
-
var newRows = val_status.rows;
|
|
93
|
-
newRows.forEach(function (rows) {
|
|
94
|
-
rows.checked = value;
|
|
95
|
-
});
|
|
96
|
-
set_status(__assign(__assign({}, val_status), { rows: newRows }));
|
|
97
|
-
} }))));
|
|
98
|
-
}
|
|
99
|
-
var _loop_1 = function (colIndex) {
|
|
100
|
-
var col = HEAD[colIndex];
|
|
101
|
-
if (!col)
|
|
102
|
-
return "continue";
|
|
103
|
-
var DisplayLabel = col.children || col.data;
|
|
104
|
-
var orderable = order.enabled && order.column[colIndex];
|
|
105
|
-
var filterable = filter.enabled && filter.column[colIndex];
|
|
106
|
-
var OrderButton = orderable ? _export_1.React.createElement(_export_2.FAIcon, { fontSize: '1.mini', fontColor: colIndex == orderIndex ? '1.clear' : '5.translucent', d: colIndex == orderIndex
|
|
107
|
-
? 'arrow-' + ['up', 'down'][Number(orderDirection == 'DESC')]
|
|
108
|
-
: 'arrow-down-arrow-up' }) : null;
|
|
109
|
-
var FilterButton = _export_1.React.createElement(_export_1.React.Fragment, null);
|
|
110
|
-
if (filterable) {
|
|
111
|
-
var ColumnDatas_1 = KeywordFilterRows.map(function (row) {
|
|
112
|
-
var _a;
|
|
113
|
-
return (_a = row[colIndex]) === null || _a === void 0 ? void 0 : _a.data;
|
|
114
|
-
});
|
|
115
|
-
ColumnDatas_1 = __spreadArray([], __read(new Set(ColumnDatas_1)), false).order({
|
|
116
|
-
direction: 'ASC',
|
|
117
|
-
});
|
|
118
|
-
var filterList_1 = filter.current[colIndex];
|
|
119
|
-
if (filterList_1) {
|
|
120
|
-
var ValueList = ColumnDatas_1.filter(function (data) { return !filterList_1.includes(data); });
|
|
121
|
-
var SelectList_1 = [];
|
|
122
|
-
ColumnDatas_1.forEach(function (data) {
|
|
123
|
-
if (!data)
|
|
124
|
-
return;
|
|
125
|
-
SelectList_1.push({
|
|
126
|
-
value: data,
|
|
127
|
-
label: _export_1.React.createElement(_export_2.Box, { flexSizing: 'auto' }, data)
|
|
128
|
-
});
|
|
129
|
-
});
|
|
130
|
-
var FilterModaButtonID = 'BUTTON-' + val_status.componentID + '-' + colIndex;
|
|
131
|
-
var FilterSheetID_1 = val_status.componentID + '-' + colIndex;
|
|
132
|
-
var SheetParams_1 = {
|
|
133
|
-
sheetID: FilterSheetID_1,
|
|
134
|
-
parent: '#' + FilterModaButtonID,
|
|
135
|
-
gravityPoint: 23,
|
|
136
|
-
type: 'custom',
|
|
137
|
-
content: _export_1.React.createElement(_export_2.Flex, { flexType: 'col', border: true, boxShadow: 3, backgroundColor: '1.layer.base', borderRadius: 1, freeCSS: {
|
|
138
|
-
minWidth: 12 * 20,
|
|
139
|
-
maxWidth: 12 * 30
|
|
140
|
-
} },
|
|
141
|
-
_export_1.React.createElement(_export_3.Column, { gap: '1/3', overflow: 'auto', padding: '2/3', freeCSS: {
|
|
142
|
-
maxHeight: 12 * 30
|
|
143
|
-
} },
|
|
144
|
-
_export_1.React.createElement(_export_4.Input.Checkbox, { tone: 'cloud', icon: true, value: ValueList, display: 'flex', gap: '1/2', override: 'force', options: SelectList_1, hideInput: true, name: 'DTFilter-col-' + colIndex + '-table-' + val_status.componentID, cellStyles: {
|
|
145
|
-
flexSizing: 'auto',
|
|
146
|
-
padding: '2/3'
|
|
147
|
-
}, onUpdateValidValue: function (_a) {
|
|
148
|
-
var value = _a.value;
|
|
149
|
-
var DropValues = ColumnDatas_1.filter(function (data) { return !value.includes(data); });
|
|
150
|
-
var newOptions = __assign({}, val_status);
|
|
151
|
-
newOptions.filter.current[colIndex] = DropValues;
|
|
152
|
-
set_status(newOptions);
|
|
153
|
-
} })),
|
|
154
|
-
_export_1.React.createElement(_export_3.Row.Separate, { gap: '2/3', padding: '2/3', horizontalAlign: 'right' },
|
|
155
|
-
_export_1.React.createElement(_export_4.Buttons.Button.Border.S, { isRounded: true, onClick: function () {
|
|
156
|
-
_export_4.Sheet.close(FilterSheetID_1);
|
|
157
|
-
} }, "\u9589\u3058\u308B"),
|
|
158
|
-
_export_1.React.createElement(_export_4.Buttons.Button.Prime.S, { color: 'theme', isRounded: true, ssEffectsOnActive: 'shrink', onClick: function () {
|
|
159
|
-
var newFilterList = [];
|
|
160
|
-
if (!filterList_1.length)
|
|
161
|
-
newFilterList = ColumnDatas_1;
|
|
162
|
-
var newOptions = __assign({}, val_status);
|
|
163
|
-
newOptions.filter.current[colIndex] = newFilterList;
|
|
164
|
-
set_status(newOptions);
|
|
165
|
-
} }, "\u5168\u9078\u629E")))
|
|
166
|
-
};
|
|
167
|
-
_export_4.Sheet.refresh(SheetParams_1, true);
|
|
168
|
-
FilterButton = _export_1.React.createElement(_export_2.Box, { className: style_module_scss_1.default.FilterRegion },
|
|
169
|
-
_export_1.React.createElement(_export_4.Buttons.Button.Sub.S, { ssSphere: 2.5, fontSize: '1.mini', className: style_module_scss_1.default['Filtering_' + !!filterList_1.length], id: FilterModaButtonID, children: _export_1.React.createElement(_export_2.FAIcon, { d: 'bars-filter' }), onClick: function (event) {
|
|
170
|
-
event.stopPropagation();
|
|
171
|
-
_export_4.Sheet.open(SheetParams_1);
|
|
172
|
-
} }));
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
col = __assign(__assign(__assign(__assign(__assign({}, val_status.cellStyles), col), (0, _1.DefaultCellSystemStyles)({
|
|
176
|
-
top: true,
|
|
177
|
-
bottom: !val_status.rows.length,
|
|
178
|
-
left: colIndex == Number(val_status.checker),
|
|
179
|
-
right: colIndex == val_status.colLength - 1
|
|
180
|
-
})), val_status.cellStylesCallback ? val_status.cellStylesCallback({
|
|
181
|
-
top: true,
|
|
182
|
-
bottom: !val_status.rows.length,
|
|
183
|
-
left: colIndex == Number(val_status.checker),
|
|
184
|
-
right: colIndex == val_status.colLength - 1,
|
|
185
|
-
rowIndex: 0,
|
|
186
|
-
colIndex: colIndex,
|
|
187
|
-
isBody: false,
|
|
188
|
-
isHeader: true
|
|
189
|
-
}) : {}), { ssPushable: orderable, className: [
|
|
190
|
-
style_module_scss_1.default.Cell,
|
|
191
|
-
val_status.cellClassName,
|
|
192
|
-
col.className
|
|
193
|
-
].join(' ') });
|
|
194
|
-
Cols.push(_export_1.React.createElement(_1.Comps.TH, __assign({ fontWeight: '2.normal', position: 'sticky', top: 0 }, col, { freeCSS: __assign({ zIndex: 2 }, col.freeCSS), onClick: function (event) {
|
|
195
|
-
if (orderable) {
|
|
196
|
-
var newOptions = __assign({}, val_status);
|
|
197
|
-
newOptions.order.current = [colIndex, orderIndex === colIndex && orderDirection == 'ASC' ? 'DESC' : 'ASC'];
|
|
198
|
-
set_status(newOptions);
|
|
199
|
-
}
|
|
200
|
-
} }),
|
|
201
|
-
_export_1.React.createElement(_export_2.Flex, { flexType: 'row-r', flexWrap: false, height: 1, borderRadius: 'inherit', flexCenter: true },
|
|
202
|
-
FilterButton,
|
|
203
|
-
_export_1.React.createElement(_export_2.Flex, { flexSizing: 0, position: 'relative', borderRadius: 'inherit', gap: '1/3', flexWrap: false, horizontalAlign: 'center' },
|
|
204
|
-
DisplayLabel,
|
|
205
|
-
OrderButton))));
|
|
206
|
-
};
|
|
207
|
-
for (var colIndex = 0; colIndex < val_status.colLength; colIndex++) {
|
|
208
|
-
_loop_1(colIndex);
|
|
209
|
-
}
|
|
210
|
-
return (_export_1.React.createElement(_1.Comps.Row, { className: [style_module_scss_1.default.Row, style_module_scss_1.default.HeadRow].join(' '), children: Cols }));
|
|
211
|
-
},
|
|
212
|
-
Body: function (params) {
|
|
213
|
-
var val_status = params.val_status, PageRows = params.PageRows;
|
|
214
|
-
var BodyRows = [];
|
|
215
|
-
PageRows.forEach(function (row, rowIndex) {
|
|
216
|
-
var ROW = __spreadArray([], __read(row), false);
|
|
217
|
-
var Cols = [];
|
|
218
|
-
if (val_status.checker) {
|
|
219
|
-
Cols.push(_export_1.React.createElement(_1.Comps.TH, __assign({ unitWidth: 4, padding: 0, borderRight: true }, val_status.cellStyles, (0, _1.DefaultCellSystemStyles)({
|
|
220
|
-
top: rowIndex == 0 && !val_status.head,
|
|
221
|
-
bottom: rowIndex == PageRows.length - 1,
|
|
222
|
-
left: true,
|
|
223
|
-
right: !val_status.colLength
|
|
224
|
-
}), val_status.cellStylesCallback ? val_status.cellStylesCallback({
|
|
225
|
-
top: rowIndex == 0 && !val_status.head,
|
|
226
|
-
bottom: rowIndex == PageRows.length - 1,
|
|
227
|
-
left: true,
|
|
228
|
-
right: !val_status.colLength,
|
|
229
|
-
rowIndex: rowIndex,
|
|
230
|
-
colIndex: 0,
|
|
231
|
-
isBody: true,
|
|
232
|
-
isHeader: false
|
|
233
|
-
}) : {}, { className: [
|
|
234
|
-
style_module_scss_1.default.Cell,
|
|
235
|
-
val_status.cellClassName
|
|
236
|
-
].join(' ') }),
|
|
237
|
-
_export_1.React.createElement(_export_2.Box, { flexCenter: true },
|
|
238
|
-
_export_1.React.createElement(_export_4.Input.Checker, { label: null, value: row.checked, override: 'force', onUpdateValidValue: function (_a) {
|
|
239
|
-
var value = _a.value;
|
|
240
|
-
var newRows = val_status.rows;
|
|
241
|
-
newRows[rowIndex].checked = value;
|
|
242
|
-
params.set_status(__assign(__assign({}, val_status), { rows: newRows }));
|
|
243
|
-
} }))));
|
|
244
|
-
}
|
|
245
|
-
ROW.forEach(function (col, colIndex) {
|
|
246
|
-
if (!col)
|
|
247
|
-
return;
|
|
248
|
-
var _a = col.type, type = _a === void 0 ? 'td' : _a, Params = __rest(col, ["type"]);
|
|
249
|
-
Params = __assign(__assign(__assign(__assign(__assign({}, val_status.cellStyles), Params), (0, _1.DefaultCellSystemStyles)({
|
|
250
|
-
top: rowIndex == 0 && !val_status.head,
|
|
251
|
-
bottom: rowIndex == PageRows.length - 1,
|
|
252
|
-
left: val_status.checker ? false : colIndex == 0,
|
|
253
|
-
right: colIndex == val_status.colLength - 1
|
|
254
|
-
})), val_status.cellStylesCallback ? val_status.cellStylesCallback({
|
|
255
|
-
top: rowIndex == 0 && !val_status.head,
|
|
256
|
-
bottom: rowIndex == PageRows.length - 1,
|
|
257
|
-
left: val_status.checker ? false : colIndex == 0,
|
|
258
|
-
right: colIndex == val_status.colLength - 1,
|
|
259
|
-
rowIndex: rowIndex,
|
|
260
|
-
colIndex: colIndex,
|
|
261
|
-
isBody: true,
|
|
262
|
-
isHeader: false
|
|
263
|
-
}) : {}), { className: [
|
|
264
|
-
style_module_scss_1.default.Cell,
|
|
265
|
-
val_status.cellClassName,
|
|
266
|
-
Params.className
|
|
267
|
-
].join(' ') });
|
|
268
|
-
var Cell = _1.Comps[type == 'td' ? 'TD' : 'TH'];
|
|
269
|
-
Cols.push(_export_1.React.createElement(Cell, __assign({ key: colIndex }, Params)));
|
|
270
|
-
});
|
|
271
|
-
BodyRows.push(_export_1.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) {
|
|
272
|
-
if (!val_status.onRowClick)
|
|
273
|
-
return;
|
|
274
|
-
val_status.onRowClick(JSON.parse(row.rowID), event);
|
|
275
|
-
} }));
|
|
276
|
-
});
|
|
277
|
-
if (!PageRows.length) {
|
|
278
|
-
var Content = _export_1.React.createElement(_export_2.Box, { padding: 2, fontColor: '4.thin', freeCSS: {
|
|
279
|
-
textAlign: 'center'
|
|
280
|
-
}, borderTop: '1.thin', children: 'テーブルがありません' });
|
|
281
|
-
if (val_status.noRecords) {
|
|
282
|
-
Content = _export_1.React.createElement(_export_1.React.Fragment, null, val_status.noRecords);
|
|
283
|
-
}
|
|
284
|
-
BodyRows.push(_export_1.React.createElement(_1.Comps.Row, { key: 'dataNotFound', className: [
|
|
285
|
-
style_module_scss_1.default.Row,
|
|
286
|
-
style_module_scss_1.default.BodyRow,
|
|
287
|
-
style_module_scss_1.default.DataNotFound
|
|
288
|
-
].join(' ') },
|
|
289
|
-
_export_1.React.createElement(_1.Comps.TD, { colSpan: val_status.colLength, className: style_module_scss_1.default.Cell }, Content)));
|
|
290
|
-
}
|
|
291
|
-
return (_export_1.React.createElement(_export_1.React.Fragment, null, BodyRows));
|
|
292
|
-
},
|
|
293
|
-
Core: function (params) {
|
|
294
|
-
var val_status = params.val_status, set_status = params.set_status;
|
|
295
|
-
var searchKeyword = val_status.searchKeyword, filter = val_status.filter, order = val_status.order, paging = val_status.paging;
|
|
296
|
-
var MotherRows = __spreadArray([], __read(val_status.rows), false);
|
|
297
|
-
var KeywordFilterRows = __spreadArray([], __read(val_status.rows), false);
|
|
298
|
-
var FilterRows = __spreadArray([], __read(val_status.rows), false);
|
|
299
|
-
var PageRows = __spreadArray([], __read(val_status.rows), false);
|
|
300
|
-
if (searchKeyword) {
|
|
301
|
-
KeywordFilterRows = MotherRows.filter(function (row) {
|
|
302
|
-
if ((row.__sys4SearchKey || '').match(new RegExp(searchKeyword, 'i')))
|
|
303
|
-
return 1;
|
|
304
|
-
return 0;
|
|
305
|
-
});
|
|
306
|
-
FilterRows = __spreadArray([], __read(KeywordFilterRows), false);
|
|
307
|
-
PageRows = __spreadArray([], __read(KeywordFilterRows), false);
|
|
308
|
-
}
|
|
309
|
-
if (filter.enabled) {
|
|
310
|
-
var _loop_2 = function (i) {
|
|
311
|
-
var enabled = filter.column[i];
|
|
312
|
-
var current = filter.current[i];
|
|
313
|
-
if (enabled && current && current.length) {
|
|
314
|
-
FilterRows = FilterRows.filter(function (row) { return !current.includes(row[i].data); });
|
|
315
|
-
PageRows = __spreadArray([], __read(FilterRows), false);
|
|
316
|
-
}
|
|
317
|
-
};
|
|
318
|
-
for (var i = 0; i < val_status.colLength; i++) {
|
|
319
|
-
_loop_2(i);
|
|
320
|
-
}
|
|
321
|
-
}
|
|
322
|
-
if (order.enabled) {
|
|
323
|
-
FilterRows = FilterRows.order({
|
|
324
|
-
direction: order.current[1],
|
|
325
|
-
keys: [
|
|
326
|
-
order.current[0],
|
|
327
|
-
'orderIndex'
|
|
328
|
-
]
|
|
329
|
-
});
|
|
330
|
-
PageRows = __spreadArray([], __read(FilterRows), false);
|
|
331
|
-
}
|
|
332
|
-
{
|
|
333
|
-
var currentPageIndex = paging.currentPageIndex, rowLength = paging.rowLength;
|
|
334
|
-
PageRows = __spreadArray([], __read(PageRows), false).splice((currentPageIndex - 1) * rowLength, rowLength);
|
|
335
|
-
}
|
|
336
|
-
var tableObjectID = Components.__memoryID + '_' + val_status.tableID;
|
|
337
|
-
var useStatusOutput = {
|
|
338
|
-
tableComponentDidMount: true,
|
|
339
|
-
totalRows: MotherRows.length,
|
|
340
|
-
pageRows: PageRows.length,
|
|
341
|
-
filteredRows: FilterRows.length,
|
|
342
|
-
filter: val_status.filter,
|
|
343
|
-
order: val_status.order,
|
|
344
|
-
paging: val_status.paging,
|
|
345
|
-
searchKeyword: val_status.searchKeyword,
|
|
346
|
-
};
|
|
347
|
-
_export_1.useStore.update({
|
|
348
|
-
key: tableObjectID,
|
|
349
|
-
value: {
|
|
350
|
-
status: useStatusOutput,
|
|
351
|
-
updatePageIndex: function (index) {
|
|
352
|
-
var Index = Math.min(Math.max(1, index), val_status.paging.pageLength);
|
|
353
|
-
var newOptions = __assign({}, val_status);
|
|
354
|
-
newOptions.paging.currentPageIndex = Index;
|
|
355
|
-
set_status(newOptions);
|
|
356
|
-
},
|
|
357
|
-
updateRowLength: function (index) {
|
|
358
|
-
var newOptions = __assign({}, val_status);
|
|
359
|
-
newOptions.paging = {
|
|
360
|
-
rowLength: index,
|
|
361
|
-
currentPageIndex: 1,
|
|
362
|
-
pageLength: Math.ceil(FilterRows.length / index)
|
|
363
|
-
};
|
|
364
|
-
set_status(newOptions);
|
|
365
|
-
},
|
|
366
|
-
updateKeyword: function (keyword) {
|
|
367
|
-
$.interval.clear('InputSearchTime');
|
|
368
|
-
$.interval.standBy('InputSearchTime', 200, function () {
|
|
369
|
-
var newOptions = __assign({}, val_status);
|
|
370
|
-
newOptions.searchKeyword = keyword;
|
|
371
|
-
newOptions.paging.currentPageIndex = 1;
|
|
372
|
-
newOptions.filter.current = newOptions.filter.current.map(function () { return []; });
|
|
373
|
-
set_status(newOptions);
|
|
374
|
-
});
|
|
375
|
-
},
|
|
376
|
-
getRowData: function () {
|
|
377
|
-
var ReturnRows = __spreadArray([], __read(MotherRows), false);
|
|
378
|
-
if (order.enabled) {
|
|
379
|
-
ReturnRows = ReturnRows.order({
|
|
380
|
-
direction: order.current[1],
|
|
381
|
-
keys: [
|
|
382
|
-
order.current[0],
|
|
383
|
-
'orderIndex'
|
|
384
|
-
]
|
|
385
|
-
});
|
|
386
|
-
}
|
|
387
|
-
ReturnRows.forEach(function (row) {
|
|
388
|
-
row.currentPage = false;
|
|
389
|
-
row.filtered = false;
|
|
390
|
-
// row.checked = val_checked[ row.rowID! ];
|
|
391
|
-
});
|
|
392
|
-
PageRows.forEach(function (row) {
|
|
393
|
-
var rowID = row.rowID;
|
|
394
|
-
ReturnRows.find(function (row) { return row.rowID == rowID; }).currentPage = true;
|
|
395
|
-
});
|
|
396
|
-
FilterRows.forEach(function (row) {
|
|
397
|
-
var rowID = row.rowID;
|
|
398
|
-
ReturnRows.find(function (row) { return row.rowID == rowID; }).filtered = true;
|
|
399
|
-
});
|
|
400
|
-
return ReturnRows;
|
|
401
|
-
}
|
|
402
|
-
}
|
|
403
|
-
});
|
|
404
|
-
_export_1.React.useEffect(function () {
|
|
405
|
-
var Propagations = Components.Propagations[val_status.tableID] || [];
|
|
406
|
-
Object.keys(Propagations).forEach(function (key) {
|
|
407
|
-
var propagationObject = _export_1.useStore.get(key);
|
|
408
|
-
if (!(propagationObject === null || propagationObject === void 0 ? void 0 : propagationObject.refresh))
|
|
409
|
-
return;
|
|
410
|
-
propagationObject.refresh();
|
|
411
|
-
});
|
|
412
|
-
});
|
|
413
|
-
return (_export_1.React.createElement(_export_1.React.Fragment, null,
|
|
414
|
-
_export_1.React.createElement(_export_2.Box, { className: style_module_scss_1.default.TableBase },
|
|
415
|
-
_export_1.React.createElement(_1.Comps.Table, { className: style_module_scss_1.default.Table },
|
|
416
|
-
_export_1.React.createElement(Components.Header, { val_status: val_status, set_status: set_status, KeywordFilterRows: KeywordFilterRows }),
|
|
417
|
-
_export_1.React.createElement(Components.Body, { val_status: val_status, set_status: set_status, PageRows: PageRows })))));
|
|
418
|
-
},
|
|
419
|
-
Propagations: {},
|
|
420
|
-
DataLeveler: function (params) {
|
|
421
|
-
var _a, _b;
|
|
422
|
-
params.filter = (_a = params.filter) !== null && _a !== void 0 ? _a : false;
|
|
423
|
-
params.filter = Array.from({ length: params.colLength }).map(function (a, index) {
|
|
424
|
-
var _a;
|
|
425
|
-
if ($.is.boolean(params.filter)) {
|
|
426
|
-
return params.filter;
|
|
427
|
-
}
|
|
428
|
-
return (_a = params.filter[index]) !== null && _a !== void 0 ? _a : false;
|
|
429
|
-
});
|
|
430
|
-
params.order = (_b = params.order) !== null && _b !== void 0 ? _b : true;
|
|
431
|
-
params.order = Array.from({ length: params.colLength }).map(function (a, index) {
|
|
432
|
-
var _a;
|
|
433
|
-
if ($.is.boolean(params.order)) {
|
|
434
|
-
return params.order;
|
|
435
|
-
}
|
|
436
|
-
return (_a = params.order[index]) !== null && _a !== void 0 ? _a : true;
|
|
437
|
-
});
|
|
438
|
-
params = __assign({ checker: false, searchKeyword: '', filter: false, order: true, defaultOrder: [0, 'ASC'] }, params);
|
|
439
|
-
params.rows.forEach(function (row, rowIndex) {
|
|
440
|
-
row.rowID = JSON.stringify(row.rowID || rowIndex);
|
|
441
|
-
var __sys4SearchKey = [];
|
|
442
|
-
row.forEach(function (col, colIndex) {
|
|
443
|
-
var data = col.data, children = col.children, orderIndex = col.orderIndex;
|
|
444
|
-
col.orderIndex = $.is.exist(orderIndex) ? String(orderIndex) : String(data);
|
|
445
|
-
col.children = children || String(data);
|
|
446
|
-
__sys4SearchKey.push(String(col.data));
|
|
447
|
-
});
|
|
448
|
-
row.__sys4SearchKey = __sys4SearchKey.join('/;');
|
|
449
|
-
});
|
|
450
|
-
return (_export_1.React.createElement(Components.StateManager, __assign({ eventID: $.uuidGen() }, params)));
|
|
451
|
-
},
|
|
452
|
-
StateManager: function (params) {
|
|
453
|
-
var colLength = params.colLength, eventID = params.eventID, _a = params.checker, checker = _a === void 0 ? false : _a, _b = params.searchKeyword, searchKeyword = _b === void 0 ? '' : _b, filter = params.filter, order = params.order, _c = params.defaultOrder, defaultOrder = _c === void 0 ? [0, 'ASC'] : _c, _d = params.pageRowLength, pageRowLength = _d === void 0 ? 30 : _d;
|
|
454
|
-
var _e = __read(_export_1.React.useState($.uuidGen()), 1), val_componentID = _e[0];
|
|
455
|
-
var DefStatus = {
|
|
456
|
-
tableID: params.tableID || val_componentID,
|
|
457
|
-
componentID: val_componentID,
|
|
458
|
-
colLength: colLength,
|
|
459
|
-
checker: checker,
|
|
460
|
-
searchKeyword: searchKeyword,
|
|
461
|
-
filter: {
|
|
462
|
-
enabled: filter !== false,
|
|
463
|
-
column: filter,
|
|
464
|
-
current: Array.from({ length: colLength }, function () { return []; })
|
|
465
|
-
},
|
|
466
|
-
order: {
|
|
467
|
-
enabled: order !== false,
|
|
468
|
-
column: order,
|
|
469
|
-
current: defaultOrder
|
|
470
|
-
},
|
|
471
|
-
paging: {
|
|
472
|
-
rowLength: pageRowLength,
|
|
473
|
-
pageLength: Math.ceil(params.rows.length / pageRowLength),
|
|
474
|
-
currentPageIndex: 1
|
|
475
|
-
},
|
|
476
|
-
head: params.head,
|
|
477
|
-
rows: params.rows,
|
|
478
|
-
noRecords: params.noRecords,
|
|
479
|
-
cellStyles: params.cellStyles || {},
|
|
480
|
-
cellClassName: params.cellClassName || '',
|
|
481
|
-
cellStylesCallback: params.cellStylesCallback,
|
|
482
|
-
onRowClick: params.onRowClick,
|
|
483
|
-
};
|
|
484
|
-
var _f = __read(_export_1.React.useState(DefStatus), 2), val_status = _f[0], set_status = _f[1];
|
|
485
|
-
var _g = __read(_export_1.React.useState(params.eventID), 2), val_eventID = _g[0], set_eventID = _g[1];
|
|
486
|
-
if (val_eventID != params.eventID) {
|
|
487
|
-
set_eventID(params.eventID);
|
|
488
|
-
set_status(DefStatus);
|
|
489
|
-
}
|
|
490
|
-
return (_export_1.React.createElement(Components.Core, { val_status: val_status, set_status: set_status }));
|
|
491
|
-
}
|
|
492
|
-
};
|
|
493
|
-
exports.DataFNs = {
|
|
494
|
-
__memoryID: Components.__memoryID,
|
|
495
|
-
useStatus: function (tableID) {
|
|
496
|
-
var _a;
|
|
497
|
-
var _b = __read(_export_1.React.useState($.uuidGen()), 1), val_statusID = _b[0];
|
|
498
|
-
var _c = __read(_export_1.React.useState($.uuidGen()), 2), val_refresh = _c[0], set_refresh = _c[1];
|
|
499
|
-
var tableObjectID = Components.__memoryID + '_' + tableID;
|
|
500
|
-
_export_1.React.useEffect(function () {
|
|
501
|
-
var _a;
|
|
502
|
-
Components.Propagations[tableID] = __assign(__assign({}, Components.Propagations[tableID]), (_a = {}, _a[val_statusID] = 1, _a));
|
|
503
|
-
_export_1.useStore.set({
|
|
504
|
-
key: val_statusID,
|
|
505
|
-
value: {
|
|
506
|
-
refresh: function () {
|
|
507
|
-
set_refresh($.uuidGen());
|
|
508
|
-
}
|
|
509
|
-
}
|
|
510
|
-
});
|
|
511
|
-
return function () {
|
|
512
|
-
delete Components.Propagations[tableID][val_statusID];
|
|
513
|
-
};
|
|
514
|
-
}, []);
|
|
515
|
-
return ((_a = _export_1.useStore.get(tableObjectID)) === null || _a === void 0 ? void 0 : _a.status) || {
|
|
516
|
-
tableComponentDidMount: false
|
|
517
|
-
};
|
|
518
|
-
},
|
|
519
|
-
getRowData: function (tableID) {
|
|
520
|
-
var tableObject = _export_1.useStore.get(Components.__memoryID + '_' + tableID);
|
|
521
|
-
if (!(tableObject === null || tableObject === void 0 ? void 0 : tableObject.getRowData))
|
|
522
|
-
return;
|
|
523
|
-
return tableObject.getRowData();
|
|
524
|
-
},
|
|
525
|
-
setPageIndex: function (tableID, pageIndex) {
|
|
526
|
-
var tableObject = _export_1.useStore.get(Components.__memoryID + '_' + tableID);
|
|
527
|
-
if (!(tableObject === null || tableObject === void 0 ? void 0 : tableObject.updatePageIndex))
|
|
528
|
-
return;
|
|
529
|
-
tableObject.updatePageIndex(pageIndex);
|
|
530
|
-
},
|
|
531
|
-
setRowLength: function (tableID, rowLength) {
|
|
532
|
-
var tableObject = _export_1.useStore.get(Components.__memoryID + '_' + tableID);
|
|
533
|
-
if (!(tableObject === null || tableObject === void 0 ? void 0 : tableObject.updateRowLength))
|
|
534
|
-
return;
|
|
535
|
-
tableObject.updateRowLength(rowLength);
|
|
536
|
-
},
|
|
537
|
-
setSearchKeyword: function (tableID, keyword) {
|
|
538
|
-
var tableObject = _export_1.useStore.get(Components.__memoryID + '_' + tableID);
|
|
539
|
-
if (!(tableObject === null || tableObject === void 0 ? void 0 : tableObject.updateKeyword))
|
|
540
|
-
return;
|
|
541
|
-
tableObject.updateKeyword(keyword);
|
|
542
|
-
},
|
|
543
|
-
};
|
|
544
|
-
exports.DataComps = {
|
|
545
|
-
SearchInput: function (params) {
|
|
546
|
-
var status = exports.DataFNs.useStatus(params.tableID);
|
|
547
|
-
if (!status.tableComponentDidMount)
|
|
548
|
-
return (null);
|
|
549
|
-
return (_export_1.React.createElement(_export_4.Input.Text.Normal, { placeholder: '\u691C\u7D22...', clearButton: true, padding: '2/3', paddingRight: 3, rightIcon: _export_1.React.createElement(_export_4.Input.Comps.RightIcon, { fontColor: '5.translucent', right: '2/3' },
|
|
550
|
-
_export_1.React.createElement(_export_2.FAIcon.Search, null)), override: 'force', value: status.searchKeyword, onUpdateValidValue: function (_a) {
|
|
551
|
-
var value = _a.value;
|
|
552
|
-
exports.DataFNs.setSearchKeyword(params.tableID, value);
|
|
553
|
-
} }));
|
|
554
|
-
},
|
|
555
|
-
Info: function (params) {
|
|
556
|
-
var status = exports.DataFNs.useStatus(params.tableID);
|
|
557
|
-
if (!status.tableComponentDidMount)
|
|
558
|
-
return (null);
|
|
559
|
-
var Ratio = status.filteredRows.ratio(status.totalRows) || 0;
|
|
560
|
-
return (_export_1.React.createElement(_export_2.Flex, { verticalAlign: 'baseline', gap: '1/2', fontSize: '1.mini', fontColor: '3.blur' },
|
|
561
|
-
_export_1.React.createElement(_export_2.Span, { fontSize: '4.thirdTitle', fontColor: 'theme' }, status.filteredRows.toLocaleString()),
|
|
562
|
-
"/ ",
|
|
563
|
-
status.totalRows.toLocaleString(),
|
|
564
|
-
"\u4EF6 (",
|
|
565
|
-
Ratio,
|
|
566
|
-
"%)"));
|
|
567
|
-
},
|
|
568
|
-
Paging: function (params) {
|
|
569
|
-
var status = exports.DataFNs.useStatus(params.tableID);
|
|
570
|
-
if (!status.tableComponentDidMount)
|
|
571
|
-
return (null);
|
|
572
|
-
var PageSelect = [];
|
|
573
|
-
for (var index = 0; index < status.paging.pageLength; index++) {
|
|
574
|
-
PageSelect.push({ value: index + 1, label: (index + 1).toString() });
|
|
575
|
-
}
|
|
576
|
-
return (_export_1.React.createElement(_export_3.Row.Center, null,
|
|
577
|
-
_export_1.React.createElement(_export_3.Row.Center, { gap: '1/2' },
|
|
578
|
-
"\u30DA\u30FC\u30B8 :",
|
|
579
|
-
_export_1.React.createElement(_export_4.Input.Select, { enableUnSelected: false, padding: ['1/3', '2/3'], rightIcon: false, placeholder: '', override: 'force', value: status.paging.currentPageIndex, options: PageSelect, onUpdateValidValue: function (_a) {
|
|
580
|
-
var value = _a.value;
|
|
581
|
-
exports.DataFNs.setPageIndex(params.tableID, value);
|
|
582
|
-
} }),
|
|
583
|
-
"/ ",
|
|
584
|
-
status.paging.pageLength),
|
|
585
|
-
_export_1.React.createElement(_export_3.Row.Right, { gap: '1/2' },
|
|
586
|
-
_export_1.React.createElement(_export_4.Buttons.Button.Sub.R, { ssSphere: 3, onClick: function () {
|
|
587
|
-
if (status.paging.currentPageIndex == 1) {
|
|
588
|
-
exports.DataFNs.setPageIndex(params.tableID, status.paging.pageLength);
|
|
589
|
-
return;
|
|
590
|
-
}
|
|
591
|
-
exports.DataFNs.setPageIndex(params.tableID, status.paging.currentPageIndex - 1);
|
|
592
|
-
} },
|
|
593
|
-
_export_1.React.createElement(_export_2.FAIcon.ChevronLeft, null)),
|
|
594
|
-
_export_1.React.createElement(_export_4.Buttons.Button.Sub.R, { ssSphere: 3, onClick: function () {
|
|
595
|
-
if (status.paging.currentPageIndex == status.paging.pageLength) {
|
|
596
|
-
exports.DataFNs.setPageIndex(params.tableID, 1);
|
|
597
|
-
return;
|
|
598
|
-
}
|
|
599
|
-
exports.DataFNs.setPageIndex(params.tableID, status.paging.currentPageIndex + 1);
|
|
600
|
-
} },
|
|
601
|
-
_export_1.React.createElement(_export_2.FAIcon.ChevronRight, null)))));
|
|
602
|
-
},
|
|
603
|
-
RowLength: function (params) {
|
|
604
|
-
var status = exports.DataFNs.useStatus(params.tableID);
|
|
605
|
-
if (!status.tableComponentDidMount)
|
|
606
|
-
return (null);
|
|
607
|
-
var currentLength = status.paging.rowLength;
|
|
608
|
-
var ExistCurrentLength = 0;
|
|
609
|
-
var LengthList = params.lengthSelect.map(function (l) {
|
|
610
|
-
ExistCurrentLength |= Number(l == currentLength);
|
|
611
|
-
return { value: l, label: l.toString() };
|
|
612
|
-
});
|
|
613
|
-
if (!ExistCurrentLength) {
|
|
614
|
-
LengthList.push({ value: currentLength, label: currentLength.toString() });
|
|
615
|
-
}
|
|
616
|
-
LengthList = LengthList.order({
|
|
617
|
-
direction: 'ASC',
|
|
618
|
-
keys: ['value'],
|
|
619
|
-
});
|
|
620
|
-
return (_export_1.React.createElement(_export_3.Row.Center, { gap: '1/2' },
|
|
621
|
-
"\u4EF6\u6570 :",
|
|
622
|
-
_export_1.React.createElement(_export_4.Input.Select, { enableUnSelected: false, rightIcon: false, placeholder: '\u9078\u629E', override: 'force', padding: ['1/3', '2/3'], value: status.paging.rowLength, options: LengthList, onUpdateValidValue: function (_a) {
|
|
623
|
-
var value = _a.value;
|
|
624
|
-
exports.DataFNs.setRowLength(params.tableID, value);
|
|
625
|
-
} })));
|
|
626
|
-
},
|
|
627
|
-
};
|
|
628
|
-
var DataTable = function (params) { return (_export_1.React.createElement(Components.DataLeveler, __assign({}, params))); };
|
|
629
|
-
exports.DataTable = DataTable;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const DragTable: FNC<amotify.fn.Tables.Drag.Params>;
|