amotify 0.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (148) hide show
  1. package/dist/@comps/@core/bios.d.ts +14 -0
  2. package/dist/@comps/@core/bios.js +228 -0
  3. package/dist/@comps/@core/exe.d.ts +9 -0
  4. package/dist/@comps/@core/exe.js +12 -0
  5. package/dist/@comps/@core/jsminAmotifyExtension/_.d.ts +4 -0
  6. package/dist/@comps/@core/jsminAmotifyExtension/_.js +6 -0
  7. package/dist/@comps/@core/jsminAmotifyExtension/fetch.d.ts +9 -0
  8. package/dist/@comps/@core/jsminAmotifyExtension/fetch.js +199 -0
  9. package/dist/@comps/@core/jsminAmotifyExtension/formCollect.d.ts +1 -0
  10. package/dist/@comps/@core/jsminAmotifyExtension/formCollect.js +137 -0
  11. package/dist/@comps/@core/jsminAmotifyExtension/spreadSheet.d.ts +4 -0
  12. package/dist/@comps/@core/jsminAmotifyExtension/spreadSheet.js +314 -0
  13. package/dist/@comps/@core/jsminAmotifyExtension/variables.d.ts +0 -0
  14. package/dist/@comps/@core/jsminAmotifyExtension/variables.js +186 -0
  15. package/dist/@comps/@core/styleConverter.d.ts +2 -0
  16. package/dist/@comps/@core/styleConverter.js +349 -0
  17. package/dist/@comps/Atoms/@export.d.ts +4 -0
  18. package/dist/@comps/Atoms/@export.js +29 -0
  19. package/dist/@comps/Atoms/FAIcon/parts.d.ts +2 -0
  20. package/dist/@comps/Atoms/FAIcon/parts.js +153 -0
  21. package/dist/@comps/Atoms/Logo/parts.d.ts +1 -0
  22. package/dist/@comps/Atoms/Logo/parts.js +154 -0
  23. package/dist/@comps/Atoms/Various/parts.d.ts +9 -0
  24. package/dist/@comps/Atoms/Various/parts.js +113 -0
  25. package/dist/@comps/Functions/@export.d.ts +12 -0
  26. package/dist/@comps/Functions/@export.js +38 -0
  27. package/dist/@comps/Functions/Button/_.d.ts +1 -0
  28. package/dist/@comps/Functions/Button/_.js +270 -0
  29. package/dist/@comps/Functions/Cropper/parts.d.ts +1 -0
  30. package/dist/@comps/Functions/Cropper/parts.js +783 -0
  31. package/dist/@comps/Functions/Effects/Fade.d.ts +1 -0
  32. package/dist/@comps/Functions/Effects/Fade.js +80 -0
  33. package/dist/@comps/Functions/Effects/Ripple.d.ts +1 -0
  34. package/dist/@comps/Functions/Effects/Ripple.js +107 -0
  35. package/dist/@comps/Functions/Effects/_.d.ts +3 -0
  36. package/dist/@comps/Functions/Effects/_.js +43 -0
  37. package/dist/@comps/Functions/Input/Chips/Selector.d.ts +1 -0
  38. package/dist/@comps/Functions/Input/Chips/Selector.js +356 -0
  39. package/dist/@comps/Functions/Input/Chips/_.d.ts +2 -0
  40. package/dist/@comps/Functions/Input/Chips/_.js +218 -0
  41. package/dist/@comps/Functions/Input/DigitCharacters.d.ts +1 -0
  42. package/dist/@comps/Functions/Input/DigitCharacters.js +178 -0
  43. package/dist/@comps/Functions/Input/File/_.d.ts +2 -0
  44. package/dist/@comps/Functions/Input/File/_.js +458 -0
  45. package/dist/@comps/Functions/Input/Hidden.d.ts +1 -0
  46. package/dist/@comps/Functions/Input/Hidden.js +30 -0
  47. package/dist/@comps/Functions/Input/List/_.d.ts +1 -0
  48. package/dist/@comps/Functions/Input/List/_.js +232 -0
  49. package/dist/@comps/Functions/Input/Segmented/_.d.ts +1 -0
  50. package/dist/@comps/Functions/Input/Segmented/_.js +111 -0
  51. package/dist/@comps/Functions/Input/Select/_.d.ts +1 -0
  52. package/dist/@comps/Functions/Input/Select/_.js +154 -0
  53. package/dist/@comps/Functions/Input/Slider/_.d.ts +1 -0
  54. package/dist/@comps/Functions/Input/Slider/_.js +308 -0
  55. package/dist/@comps/Functions/Input/Switch/_.d.ts +1 -0
  56. package/dist/@comps/Functions/Input/Switch/_.js +120 -0
  57. package/dist/@comps/Functions/Input/Text.d.ts +5 -0
  58. package/dist/@comps/Functions/Input/Text.js +340 -0
  59. package/dist/@comps/Functions/Input/TextArea.d.ts +1 -0
  60. package/dist/@comps/Functions/Input/TextArea.js +98 -0
  61. package/dist/@comps/Functions/Input/Time/Picker.d.ts +1 -0
  62. package/dist/@comps/Functions/Input/Time/Picker.js +581 -0
  63. package/dist/@comps/Functions/Input/Time/_.d.ts +2 -0
  64. package/dist/@comps/Functions/Input/Time/_.js +567 -0
  65. package/dist/@comps/Functions/Input/_.d.ts +5 -0
  66. package/dist/@comps/Functions/Input/_.js +446 -0
  67. package/dist/@comps/Functions/Input/core.d.ts +34 -0
  68. package/dist/@comps/Functions/Input/core.js +324 -0
  69. package/dist/@comps/Functions/Inputs/_.d.ts +3 -0
  70. package/dist/@comps/Functions/Inputs/_.js +7 -0
  71. package/dist/@comps/Functions/Inputs/text.d.ts +12 -0
  72. package/dist/@comps/Functions/Inputs/text.js +46 -0
  73. package/dist/@comps/Functions/Layout/PageNotFound.d.ts +1 -0
  74. package/dist/@comps/Functions/Layout/PageNotFound.js +30 -0
  75. package/dist/@comps/Functions/Layout/PageRouter.d.ts +2 -0
  76. package/dist/@comps/Functions/Layout/PageRouter.js +65 -0
  77. package/dist/@comps/Functions/Layout/PageViewController/parts.d.ts +1 -0
  78. package/dist/@comps/Functions/Layout/PageViewController/parts.js +30 -0
  79. package/dist/@comps/Functions/Layout/Plate.d.ts +1 -0
  80. package/dist/@comps/Functions/Layout/Plate.js +39 -0
  81. package/dist/@comps/Functions/Layout/RootViewController/parts.d.ts +1 -0
  82. package/dist/@comps/Functions/Layout/RootViewController/parts.js +202 -0
  83. package/dist/@comps/Functions/Layout/SwipeView/parts.d.ts +2 -0
  84. package/dist/@comps/Functions/Layout/SwipeView/parts.js +319 -0
  85. package/dist/@comps/Functions/Layout/TabBar.d.ts +1 -0
  86. package/dist/@comps/Functions/Layout/TabBar.js +49 -0
  87. package/dist/@comps/Functions/Layout/_.d.ts +2 -0
  88. package/dist/@comps/Functions/Layout/_.js +20 -0
  89. package/dist/@comps/Functions/Loader/corner.d.ts +1 -0
  90. package/dist/@comps/Functions/Loader/corner.js +59 -0
  91. package/dist/@comps/Functions/Loader/mini.d.ts +33 -0
  92. package/dist/@comps/Functions/Loader/mini.js +126 -0
  93. package/dist/@comps/Functions/Loader/parts.d.ts +3 -0
  94. package/dist/@comps/Functions/Loader/parts.js +108 -0
  95. package/dist/@comps/Functions/Loader/top.d.ts +1 -0
  96. package/dist/@comps/Functions/Loader/top.js +69 -0
  97. package/dist/@comps/Functions/Sheet/parts.d.ts +2 -0
  98. package/dist/@comps/Functions/Sheet/parts.js +724 -0
  99. package/dist/@comps/Functions/SnackBar/parts.d.ts +2 -0
  100. package/dist/@comps/Functions/SnackBar/parts.js +171 -0
  101. package/dist/@comps/Functions/Table/Data/parts.d.ts +3 -0
  102. package/dist/@comps/Functions/Table/Data/parts.js +629 -0
  103. package/dist/@comps/Functions/Table/Drag/parts.d.ts +1 -0
  104. package/dist/@comps/Functions/Table/Drag/parts.js +359 -0
  105. package/dist/@comps/Functions/Table/Normal/parts.d.ts +1 -0
  106. package/dist/@comps/Functions/Table/Normal/parts.js +92 -0
  107. package/dist/@comps/Functions/Table/_.d.ts +9 -0
  108. package/dist/@comps/Functions/Table/_.js +153 -0
  109. package/dist/@comps/Functions/Tooltips/parts.d.ts +2 -0
  110. package/dist/@comps/Functions/Tooltips/parts.js +71 -0
  111. package/dist/@comps/Molecules/@export.d.ts +21 -0
  112. package/dist/@comps/Molecules/@export.js +50 -0
  113. package/dist/@comps/Molecules/Accordion/parts.d.ts +2 -0
  114. package/dist/@comps/Molecules/Accordion/parts.js +165 -0
  115. package/dist/@comps/Molecules/LinkifyText/parts.d.ts +1 -0
  116. package/dist/@comps/Molecules/LinkifyText/parts.js +39 -0
  117. package/dist/@comps/Molecules/List.d.ts +1 -0
  118. package/dist/@comps/Molecules/List.js +35 -0
  119. package/dist/@comps/Organisms/@export.d.ts +2 -0
  120. package/dist/@comps/Organisms/@export.js +9 -0
  121. package/dist/@comps/Organisms/DisplayStyleInput/_.d.ts +1 -0
  122. package/dist/@comps/Organisms/DisplayStyleInput/_.js +15 -0
  123. package/dist/@comps/Organisms/DisplayStyleInput/darkmode.d.ts +1 -0
  124. package/dist/@comps/Organisms/DisplayStyleInput/darkmode.js +77 -0
  125. package/dist/@comps/Organisms/DisplayStyleInput/themeColor.d.ts +27 -0
  126. package/dist/@comps/Organisms/DisplayStyleInput/themeColor.js +185 -0
  127. package/dist/@comps/Templates/@export.d.ts +2 -0
  128. package/dist/@comps/Templates/@export.js +9 -0
  129. package/dist/@comps/Templates/PlayGround/parts.d.ts +1 -0
  130. package/dist/@comps/Templates/PlayGround/parts.js +55 -0
  131. package/dist/@types/_.d.ts +6 -0
  132. package/dist/@types/_.js +8 -0
  133. package/dist/@types/amot.d.ts +260 -0
  134. package/dist/@types/amot.js +2 -0
  135. package/dist/@types/fn.d.ts +1040 -0
  136. package/dist/@types/fn.js +2 -0
  137. package/dist/@types/index.d.ts +59 -0
  138. package/dist/@types/index.js +2 -0
  139. package/dist/@types/jsminAmotifyExtension.d.ts +134 -0
  140. package/dist/@types/jsminAmotifyExtension.js +2 -0
  141. package/dist/@types/module.d.ts +2 -0
  142. package/dist/@types/module.js +1 -0
  143. package/dist/@types/state.d.ts +145 -0
  144. package/dist/@types/state.js +2 -0
  145. package/dist/launch.d.ts +3 -0
  146. package/dist/launch.js +282 -0
  147. package/package.json +65 -0
  148. package/tsconfig.json +48 -0
@@ -0,0 +1,359 @@
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 _global_1 = require("@global");
80
+ var _atoms_1 = require("@atoms");
81
+ var _functions_1 = require("@functions");
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(_functions_1.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(_atoms_1.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(_atoms_1.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
+ _global_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
+ _global_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(_functions_1.Buttons.Button.Plain, { ssSphere: 3, fontSize: '3.paragraph', fontColor: 'theme', onMouseOver: function (event) {
265
+ _functions_1.Tooltips.open({
266
+ parent: event.currentTarget,
267
+ padding: [0, 1],
268
+ content: React.createElement(_functions_1.Tooltips.Comps.Body, null,
269
+ React.createElement(_atoms_1.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(_atoms_1.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 = _global_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 = _global_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
+ };
@@ -0,0 +1 @@
1
+ export declare const NormalTable: FNC<amotify.fn.Tables.Normal.Params>;
@@ -0,0 +1,92 @@
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;
@@ -0,0 +1,9 @@
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;
@@ -0,0 +1,153 @@
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 _global_1 = require("@global");
46
+ var _atoms_1 = require("@atoms");
47
+ exports.Comps = {
48
+ Table: function (params) { return (React.createElement("table", __assign({}, _global_1.StyleConverter.ToClassName(params)))); },
49
+ Head: function (params) { return (React.createElement("thead", __assign({}, _global_1.StyleConverter.ToClassName(params)))); },
50
+ Body: function (params) { return (React.createElement("tbody", __assign({}, _global_1.StyleConverter.ToClassName(params)))); },
51
+ Row: function (params) { return (React.createElement("tr", __assign({}, _global_1.StyleConverter.ToClassName(params)))); },
52
+ TH: function (params) { return (React.createElement("th", __assign({}, _global_1.StyleConverter.ToClassName(params)))); },
53
+ TD: function (params) { return (React.createElement("td", __assign({}, _global_1.StyleConverter.ToClassName(params)))); },
54
+ RightIndicator: {
55
+ type: 'td',
56
+ unitWidth: 4,
57
+ // data: '',
58
+ children: React.createElement(_atoms_1.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 = _global_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(_atoms_1.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;
@@ -0,0 +1,2 @@
1
+ declare const Tooltips: amotify.fn.Tooltips.Methods;
2
+ export { Tooltips };