blixify-ui-web 0.1.6
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/README.md +1 -0
- package/lib/components/action/button/index.d.ts +16 -0
- package/lib/components/action/button/index.d.ts.map +1 -0
- package/lib/components/action/button/index.js +90 -0
- package/lib/components/action/button/index.js.map +1 -0
- package/lib/components/action/buttonGroup/index.d.ts +17 -0
- package/lib/components/action/buttonGroup/index.d.ts.map +1 -0
- package/lib/components/action/buttonGroup/index.js +74 -0
- package/lib/components/action/buttonGroup/index.js.map +1 -0
- package/lib/components/action/iconButton/index.d.ts +14 -0
- package/lib/components/action/iconButton/index.d.ts.map +1 -0
- package/lib/components/action/iconButton/index.js +71 -0
- package/lib/components/action/iconButton/index.js.map +1 -0
- package/lib/components/action/textButton/index.d.ts +13 -0
- package/lib/components/action/textButton/index.d.ts.map +1 -0
- package/lib/components/action/textButton/index.js +62 -0
- package/lib/components/action/textButton/index.js.map +1 -0
- package/lib/components/action/toggle/index.d.ts +17 -0
- package/lib/components/action/toggle/index.d.ts.map +1 -0
- package/lib/components/action/toggle/index.js +91 -0
- package/lib/components/action/toggle/index.js.map +1 -0
- package/lib/components/data/readQuery/index.d.ts +46 -0
- package/lib/components/data/readQuery/index.d.ts.map +1 -0
- package/lib/components/data/readQuery/index.js +210 -0
- package/lib/components/data/readQuery/index.js.map +1 -0
- package/lib/components/data/readQueryHoc/index.d.ts +24 -0
- package/lib/components/data/readQueryHoc/index.d.ts.map +1 -0
- package/lib/components/data/readQueryHoc/index.js +255 -0
- package/lib/components/data/readQueryHoc/index.js.map +1 -0
- package/lib/components/data/writeQuery/index.d.ts +14 -0
- package/lib/components/data/writeQuery/index.d.ts.map +1 -0
- package/lib/components/data/writeQuery/index.js +120 -0
- package/lib/components/data/writeQuery/index.js.map +1 -0
- package/lib/components/display/detailList/index.d.ts +17 -0
- package/lib/components/display/detailList/index.d.ts.map +1 -0
- package/lib/components/display/detailList/index.js +68 -0
- package/lib/components/display/detailList/index.js.map +1 -0
- package/lib/components/display/feeds/index.d.ts +19 -0
- package/lib/components/display/feeds/index.d.ts.map +1 -0
- package/lib/components/display/feeds/index.js +79 -0
- package/lib/components/display/feeds/index.js.map +1 -0
- package/lib/components/display/grid/index.d.ts +33 -0
- package/lib/components/display/grid/index.d.ts.map +1 -0
- package/lib/components/display/grid/index.js +180 -0
- package/lib/components/display/grid/index.js.map +1 -0
- package/lib/components/display/list/index.d.ts +30 -0
- package/lib/components/display/list/index.d.ts.map +1 -0
- package/lib/components/display/list/index.js +160 -0
- package/lib/components/display/list/index.js.map +1 -0
- package/lib/components/display/loading/index.d.ts +6 -0
- package/lib/components/display/loading/index.d.ts.map +1 -0
- package/lib/components/display/loading/index.js +55 -0
- package/lib/components/display/loading/index.js.map +1 -0
- package/lib/components/display/modal/index.d.ts +16 -0
- package/lib/components/display/modal/index.d.ts.map +1 -0
- package/lib/components/display/modal/index.js +67 -0
- package/lib/components/display/modal/index.js.map +1 -0
- package/lib/components/display/notification/index.d.ts +20 -0
- package/lib/components/display/notification/index.d.ts.map +1 -0
- package/lib/components/display/notification/index.js +69 -0
- package/lib/components/display/notification/index.js.map +1 -0
- package/lib/components/display/table/index.d.ts +32 -0
- package/lib/components/display/table/index.d.ts.map +1 -0
- package/lib/components/display/table/index.js +202 -0
- package/lib/components/display/table/index.js.map +1 -0
- package/lib/components/index.d.ts +30 -0
- package/lib/components/index.d.ts.map +1 -0
- package/lib/components/index.js +62 -0
- package/lib/components/index.js.map +1 -0
- package/lib/components/input/address/index.d.ts +41 -0
- package/lib/components/input/address/index.d.ts.map +1 -0
- package/lib/components/input/address/index.js +162 -0
- package/lib/components/input/address/index.js.map +1 -0
- package/lib/components/input/datePicker/index.d.ts +26 -0
- package/lib/components/input/datePicker/index.d.ts.map +1 -0
- package/lib/components/input/datePicker/index.js +132 -0
- package/lib/components/input/datePicker/index.js.map +1 -0
- package/lib/components/input/form/index.d.ts +14 -0
- package/lib/components/input/form/index.d.ts.map +1 -0
- package/lib/components/input/form/index.js +77 -0
- package/lib/components/input/form/index.js.map +1 -0
- package/lib/components/input/select/index.d.ts +40 -0
- package/lib/components/input/select/index.d.ts.map +1 -0
- package/lib/components/input/select/index.js +269 -0
- package/lib/components/input/select/index.js.map +1 -0
- package/lib/components/input/textArea/index.d.ts +23 -0
- package/lib/components/input/textArea/index.d.ts.map +1 -0
- package/lib/components/input/textArea/index.js +95 -0
- package/lib/components/input/textArea/index.js.map +1 -0
- package/lib/components/input/textInput/index.d.ts +25 -0
- package/lib/components/input/textInput/index.d.ts.map +1 -0
- package/lib/components/input/textInput/index.js +121 -0
- package/lib/components/input/textInput/index.js.map +1 -0
- package/lib/components/input/uploadInput/index.d.ts +23 -0
- package/lib/components/input/uploadInput/index.d.ts.map +1 -0
- package/lib/components/input/uploadInput/index.js +103 -0
- package/lib/components/input/uploadInput/index.js.map +1 -0
- package/lib/components/navigation/bars/index.d.ts +17 -0
- package/lib/components/navigation/bars/index.d.ts.map +1 -0
- package/lib/components/navigation/bars/index.js +73 -0
- package/lib/components/navigation/bars/index.js.map +1 -0
- package/lib/components/navigation/header/index.d.ts +35 -0
- package/lib/components/navigation/header/index.d.ts.map +1 -0
- package/lib/components/navigation/header/index.js +167 -0
- package/lib/components/navigation/header/index.js.map +1 -0
- package/lib/components/navigation/tabs/index.d.ts +16 -0
- package/lib/components/navigation/tabs/index.d.ts.map +1 -0
- package/lib/components/navigation/tabs/index.js +70 -0
- package/lib/components/navigation/tabs/index.js.map +1 -0
- package/lib/components/structure/column/index.d.ts +13 -0
- package/lib/components/structure/column/index.d.ts.map +1 -0
- package/lib/components/structure/column/index.js +89 -0
- package/lib/components/structure/column/index.js.map +1 -0
- package/lib/components/structure/container/index.d.ts +11 -0
- package/lib/components/structure/container/index.d.ts.map +1 -0
- package/lib/components/structure/container/index.js +57 -0
- package/lib/components/structure/container/index.js.map +1 -0
- package/lib/components/structure/text/index.d.ts +16 -0
- package/lib/components/structure/text/index.d.ts.map +1 -0
- package/lib/components/structure/text/index.js +153 -0
- package/lib/components/structure/text/index.js.map +1 -0
- package/lib/index.css +105 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +18 -0
- package/lib/index.js.map +1 -0
- package/package.json +104 -0
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
18
|
+
if (k2 === undefined) k2 = k;
|
|
19
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
20
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
21
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
22
|
+
}
|
|
23
|
+
Object.defineProperty(o, k2, desc);
|
|
24
|
+
}) : (function(o, m, k, k2) {
|
|
25
|
+
if (k2 === undefined) k2 = k;
|
|
26
|
+
o[k2] = m[k];
|
|
27
|
+
}));
|
|
28
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
29
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
30
|
+
}) : function(o, v) {
|
|
31
|
+
o["default"] = v;
|
|
32
|
+
});
|
|
33
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
34
|
+
if (mod && mod.__esModule) return mod;
|
|
35
|
+
var result = {};
|
|
36
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
37
|
+
__setModuleDefault(result, mod);
|
|
38
|
+
return result;
|
|
39
|
+
};
|
|
40
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
41
|
+
exports.List = void 0;
|
|
42
|
+
var outline_1 = require("@heroicons/react/24/outline");
|
|
43
|
+
var react_1 = __importStar(require("react"));
|
|
44
|
+
require("../../../index.css");
|
|
45
|
+
var iconButton_1 = require("../../action/iconButton");
|
|
46
|
+
var defaultLimit = 10;
|
|
47
|
+
var defaultPageSize = 5;
|
|
48
|
+
var List = /** @class */ (function (_super) {
|
|
49
|
+
__extends(List, _super);
|
|
50
|
+
function List() {
|
|
51
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
52
|
+
_this.handleClick = function (id, event) {
|
|
53
|
+
if (_this.props.onClickRow) {
|
|
54
|
+
_this.props.onClickRow(id);
|
|
55
|
+
}
|
|
56
|
+
event.preventDefault();
|
|
57
|
+
};
|
|
58
|
+
_this.renderBodyContent = function () {
|
|
59
|
+
var _a, _b;
|
|
60
|
+
var renderBody = [];
|
|
61
|
+
var listComp = function (eachList) {
|
|
62
|
+
return (react_1.default.createElement("li", { key: eachList.id, onClick: _this.handleClick.bind(_this, eachList.id) },
|
|
63
|
+
react_1.default.createElement("div", { className: "block cursor-pointer hover:bg-gray-50" },
|
|
64
|
+
react_1.default.createElement("div", { className: "px-4 py-4" },
|
|
65
|
+
react_1.default.createElement("div", { className: "flex items-center justify-between" },
|
|
66
|
+
react_1.default.createElement("p", { className: "truncate text-sm font-medium text-indigo-600" }, eachList.title),
|
|
67
|
+
react_1.default.createElement("div", { className: "ml-2 flex flex-shrink-0" },
|
|
68
|
+
react_1.default.createElement("p", { className: "inline-flex rounded-full bg-green-100 px-2 text-xs font-semibold leading-5 text-green-800" }, eachList.tag))),
|
|
69
|
+
react_1.default.createElement("div", { className: "mt-2" },
|
|
70
|
+
react_1.default.createElement("div", { className: "sm:flex" },
|
|
71
|
+
react_1.default.createElement("p", { className: "flex items-center text-sm text-gray-500" }, eachList.description)),
|
|
72
|
+
react_1.default.createElement("div", { className: "mt-2 flex items-center text-sm text-gray-500" }, eachList.date.toDateString()))))));
|
|
73
|
+
};
|
|
74
|
+
if (_this.props.paginationType === "cursor") {
|
|
75
|
+
var minIndex_1 = ((_a = _this.props.pageIndex) !== null && _a !== void 0 ? _a : 0) * ((_b = _this.props.limit) !== null && _b !== void 0 ? _b : defaultLimit);
|
|
76
|
+
_this.props.list.map(function (eachList, index) {
|
|
77
|
+
var _a;
|
|
78
|
+
if (index >= minIndex_1 &&
|
|
79
|
+
index < minIndex_1 + ((_a = _this.props.limit) !== null && _a !== void 0 ? _a : defaultLimit)) {
|
|
80
|
+
renderBody.push(listComp(eachList));
|
|
81
|
+
}
|
|
82
|
+
return null;
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
else {
|
|
86
|
+
_this.props.list.map(function (eachList) {
|
|
87
|
+
renderBody.push(listComp(eachList));
|
|
88
|
+
return null;
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
return renderBody;
|
|
92
|
+
};
|
|
93
|
+
_this.renderPageNumber = function () {
|
|
94
|
+
var _a, _b, _c, _d;
|
|
95
|
+
var pageNumberList = [];
|
|
96
|
+
var pageOffset = Math.floor(((_a = _this.props.pageIndex) !== null && _a !== void 0 ? _a : 0) / defaultPageSize);
|
|
97
|
+
for (var i = pageOffset * defaultPageSize; i * ((_b = _this.props.limit) !== null && _b !== void 0 ? _b : defaultLimit) < ((_c = _this.props.size) !== null && _c !== void 0 ? _c : 0) &&
|
|
98
|
+
i < pageOffset * defaultPageSize + defaultPageSize; i++) {
|
|
99
|
+
var pageNumberClassName = "relative items-center px-3 py-2 border text-sm font-medium cursor-pointer sm:px-4";
|
|
100
|
+
if (_this.props.pageIndex === i) {
|
|
101
|
+
pageNumberClassName +=
|
|
102
|
+
" z-10 bg-primary-50 border-primary-500 text-primary-600";
|
|
103
|
+
}
|
|
104
|
+
else {
|
|
105
|
+
pageNumberClassName +=
|
|
106
|
+
" border-gray-300 bg-white text-gray-500 hover:text-gray-500 hover:bg-gray-100 bg-white";
|
|
107
|
+
}
|
|
108
|
+
pageNumberList.push(react_1.default.createElement("span", { "aria-current": "page", className: pageNumberClassName, onClick: _this.props.pageIndex !== i
|
|
109
|
+
? (_d = _this.props.handleUpdatePageIndex) === null || _d === void 0 ? void 0 : _d.bind(_this, i)
|
|
110
|
+
: function () { } }, i + 1));
|
|
111
|
+
}
|
|
112
|
+
return pageNumberList;
|
|
113
|
+
};
|
|
114
|
+
_this.renderPagination = function () {
|
|
115
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
116
|
+
var paginationClassName = "relative inline-flex items-center px-2 py-2 border border-gray-300 bg-white text-sm font-medium text-gray-500";
|
|
117
|
+
var nextDataAvailable = _this.props.list.length >
|
|
118
|
+
(((_a = _this.props.pageIndex) !== null && _a !== void 0 ? _a : 0) + 1) *
|
|
119
|
+
((_b = _this.props.limit) !== null && _b !== void 0 ? _b : defaultLimit) || _this.props.cursor;
|
|
120
|
+
switch (_this.props.paginationType) {
|
|
121
|
+
case "cursor":
|
|
122
|
+
return (react_1.default.createElement("nav", { className: "relative z-0 inline-flex rounded-md shadow-sm -space-x-px", "aria-label": "Pagination" },
|
|
123
|
+
react_1.default.createElement(iconButton_1.IconButton, { disabled: _this.props.pageIndex === 0 ? true : false, icon: react_1.default.createElement(outline_1.ChevronLeftIcon, { className: "h-5 w-5", "aria-hidden": "true" }), className: "".concat(_this.props.pageIndex === 0
|
|
124
|
+
? "cursor-not-allowed"
|
|
125
|
+
: "bg-primary-50", " ").concat(paginationClassName, " rounded-l-md"), onClick: (_c = _this.props.handleUpdatePageIndex) === null || _c === void 0 ? void 0 : _c.bind(_this, "prev") }),
|
|
126
|
+
react_1.default.createElement("span", { "aria-current": "page", className: "z-10 bg-white relative inline-flex items-center px-4 py-2 border text-sm font-medium" }, ((_d = _this.props.pageIndex) !== null && _d !== void 0 ? _d : 0) + 1),
|
|
127
|
+
react_1.default.createElement(iconButton_1.IconButton, { disabled: nextDataAvailable ? false : true, icon: react_1.default.createElement(outline_1.ChevronRightIcon, { className: "h-5 w-5", "aria-hidden": "true" }), className: "".concat(nextDataAvailable ? "bg-primary-50" : "cursor-not-allowed", " ").concat(paginationClassName, " rounded-r-md"), onClick: (_e = _this.props.handleUpdatePageIndex) === null || _e === void 0 ? void 0 : _e.bind(_this, "next") })));
|
|
128
|
+
case "page":
|
|
129
|
+
return (react_1.default.createElement("nav", { className: "relative inline-flex rounded-md shadow-sm -space-x-px", "aria-label": "Pagination" },
|
|
130
|
+
react_1.default.createElement(iconButton_1.IconButton, { disabled: _this.props.pageIndex === 0 ? true : false, icon: react_1.default.createElement(outline_1.ChevronLeftIcon, { className: "h-5 w-5", "aria-hidden": "true" }), className: "".concat(_this.props.pageIndex === 0
|
|
131
|
+
? "cursor-not-allowed"
|
|
132
|
+
: "bg-primary-50", " ").concat(paginationClassName, " rounded-l-md"), onClick: (_f = _this.props.handleUpdatePageIndex) === null || _f === void 0 ? void 0 : _f.bind(_this, ((_g = _this.props.pageIndex) !== null && _g !== void 0 ? _g : 0) - 1) }),
|
|
133
|
+
_this.renderPageNumber(),
|
|
134
|
+
react_1.default.createElement(iconButton_1.IconButton, { disabled: nextDataAvailable ? false : true, icon: react_1.default.createElement(outline_1.ChevronRightIcon, { className: "h-5 w-5", "aria-hidden": "true" }), className: "".concat(nextDataAvailable ? "bg-primary-50" : "cursor-not-allowed", " ").concat(paginationClassName, " rounded-r-md"), onClick: (_h = _this.props.handleUpdatePageIndex) === null || _h === void 0 ? void 0 : _h.bind(_this, ((_j = _this.props.pageIndex) !== null && _j !== void 0 ? _j : 0) + 1) })));
|
|
135
|
+
default:
|
|
136
|
+
return react_1.default.createElement("div", null);
|
|
137
|
+
}
|
|
138
|
+
};
|
|
139
|
+
_this.renderPageResult = function () {
|
|
140
|
+
if (_this.props.paginationType === "page") {
|
|
141
|
+
return "Showing ".concat(_this.props.size, " result(s)");
|
|
142
|
+
}
|
|
143
|
+
else {
|
|
144
|
+
return "Showing ".concat(_this.props.list.length, " result(s)");
|
|
145
|
+
}
|
|
146
|
+
};
|
|
147
|
+
return _this;
|
|
148
|
+
}
|
|
149
|
+
List.prototype.render = function () {
|
|
150
|
+
return (react_1.default.createElement("div", { className: this.props.className },
|
|
151
|
+
react_1.default.createElement("div", { className: "overflow-hidden bg-white shadow" },
|
|
152
|
+
react_1.default.createElement("ul", { className: "divide-y divide-gray-200" }, this.renderBodyContent())),
|
|
153
|
+
react_1.default.createElement("div", { className: "w-full flex flex-row items-center justify-end mt-5" },
|
|
154
|
+
react_1.default.createElement("span", { className: "text-sm mr-4" }, this.renderPageResult()),
|
|
155
|
+
this.props.paginationType && this.renderPagination())));
|
|
156
|
+
};
|
|
157
|
+
return List;
|
|
158
|
+
}(react_1.Component));
|
|
159
|
+
exports.List = List;
|
|
160
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/display/list/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uDAAgF;AAChF,6CAAyC;AACzC,8BAA4B;AAC5B,sDAAqD;AAsBrD,IAAM,YAAY,GAAG,EAAE,CAAC;AACxB,IAAM,eAAe,GAAG,CAAC,CAAC;AAE1B;IAA0B,wBAAgB;IAA1C;QAAA,qEA4MC;QA3MC,iBAAW,GAAG,UAAC,EAAU,EAAE,KAAU;YACnC,IAAI,KAAI,CAAC,KAAK,CAAC,U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../../src/components/display/loading/index.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACzC,OAAO,oBAAoB,CAAC;AAE5B,qBAAa,OAAQ,SAAQ,SAAS;IACpC,MAAM;CAKP"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
18
|
+
if (k2 === undefined) k2 = k;
|
|
19
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
20
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
21
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
22
|
+
}
|
|
23
|
+
Object.defineProperty(o, k2, desc);
|
|
24
|
+
}) : (function(o, m, k, k2) {
|
|
25
|
+
if (k2 === undefined) k2 = k;
|
|
26
|
+
o[k2] = m[k];
|
|
27
|
+
}));
|
|
28
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
29
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
30
|
+
}) : function(o, v) {
|
|
31
|
+
o["default"] = v;
|
|
32
|
+
});
|
|
33
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
34
|
+
if (mod && mod.__esModule) return mod;
|
|
35
|
+
var result = {};
|
|
36
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
37
|
+
__setModuleDefault(result, mod);
|
|
38
|
+
return result;
|
|
39
|
+
};
|
|
40
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
41
|
+
exports.Loading = void 0;
|
|
42
|
+
var react_1 = __importStar(require("react"));
|
|
43
|
+
require("../../../index.css");
|
|
44
|
+
var Loading = /** @class */ (function (_super) {
|
|
45
|
+
__extends(Loading, _super);
|
|
46
|
+
function Loading() {
|
|
47
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
48
|
+
}
|
|
49
|
+
Loading.prototype.render = function () {
|
|
50
|
+
return (react_1.default.createElement("div", { className: "mx-auto h-10 w-10 rounded-full border-4 border-t-4 border-primary-100 loading-spinner" }));
|
|
51
|
+
};
|
|
52
|
+
return Loading;
|
|
53
|
+
}(react_1.Component));
|
|
54
|
+
exports.Loading = Loading;
|
|
55
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/display/loading/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAAyC;AACzC,8BAA4B;AAE5B;IAA6B,2BAAS;IAAtC;;IAMA,CAAC;IALC,wBAAM,GAAN;QACE,OAAO,CACL,uCAAK,SAAS,EAAC,uFAAuF,GAAG,CAC1G,CAAC;IACJ,CAAC;IACH,cAAC;AAAD,CAAC,AAND,CAA6B,iBAAS,GAMrC;AANY,0BAAO"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Component } from "react";
|
|
2
|
+
import "../../../index.css";
|
|
3
|
+
interface Props {
|
|
4
|
+
open: boolean;
|
|
5
|
+
lib: {
|
|
6
|
+
Dialog: any;
|
|
7
|
+
Transition: any;
|
|
8
|
+
};
|
|
9
|
+
title?: string;
|
|
10
|
+
renderContent?: () => any;
|
|
11
|
+
}
|
|
12
|
+
export declare class Modal extends Component<Props> {
|
|
13
|
+
render(): JSX.Element;
|
|
14
|
+
}
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/display/modal/index.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,SAAS,EAAY,MAAM,OAAO,CAAC;AACnD,OAAO,oBAAoB,CAAC;AAE5B,UAAU,KAAK;IACb,IAAI,EAAE,OAAO,CAAC;IACd,GAAG,EAAE;QACH,MAAM,EAAE,GAAG,CAAC;QACZ,UAAU,EAAE,GAAG,CAAC;KACjB,CAAC;IACF,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,MAAM,GAAG,CAAC;CAC3B;AAED,qBAAa,KAAM,SAAQ,SAAS,CAAC,KAAK,CAAC;IACzC,MAAM;CA+DP"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
18
|
+
if (k2 === undefined) k2 = k;
|
|
19
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
20
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
21
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
22
|
+
}
|
|
23
|
+
Object.defineProperty(o, k2, desc);
|
|
24
|
+
}) : (function(o, m, k, k2) {
|
|
25
|
+
if (k2 === undefined) k2 = k;
|
|
26
|
+
o[k2] = m[k];
|
|
27
|
+
}));
|
|
28
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
29
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
30
|
+
}) : function(o, v) {
|
|
31
|
+
o["default"] = v;
|
|
32
|
+
});
|
|
33
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
34
|
+
if (mod && mod.__esModule) return mod;
|
|
35
|
+
var result = {};
|
|
36
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
37
|
+
__setModuleDefault(result, mod);
|
|
38
|
+
return result;
|
|
39
|
+
};
|
|
40
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
41
|
+
exports.Modal = void 0;
|
|
42
|
+
var react_1 = __importStar(require("react"));
|
|
43
|
+
require("../../../index.css");
|
|
44
|
+
var Modal = /** @class */ (function (_super) {
|
|
45
|
+
__extends(Modal, _super);
|
|
46
|
+
function Modal() {
|
|
47
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
48
|
+
}
|
|
49
|
+
Modal.prototype.render = function () {
|
|
50
|
+
var _a = this.props.lib, Dialog = _a.Dialog, Transition = _a.Transition;
|
|
51
|
+
return (react_1.default.createElement(Transition.Root, { show: this.props.open, as: react_1.Fragment },
|
|
52
|
+
react_1.default.createElement(Dialog, { as: "div", static: true, className: "fixed z-10 inset-0 overflow-y-auto", open: this.props.open, onClose: function () { } },
|
|
53
|
+
react_1.default.createElement("div", { className: "flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0" },
|
|
54
|
+
react_1.default.createElement(Transition.Child, { as: react_1.Fragment, enter: "ease-out duration-300", enterFrom: "opacity-0", enterTo: "opacity-100", leave: "ease-in duration-200", leaveFrom: "opacity-100", leaveTo: "opacity-0" },
|
|
55
|
+
react_1.default.createElement(Dialog.Overlay, { className: "fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity" })),
|
|
56
|
+
react_1.default.createElement("span", { className: "hidden sm:inline-block sm:align-middle sm:h-screen", "aria-hidden": "true" }, "\u200B"),
|
|
57
|
+
react_1.default.createElement(Transition.Child, { as: react_1.Fragment, enter: "ease-out duration-300", enterFrom: "opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95", enterTo: "opacity-100 translate-y-0 sm:scale-100", leave: "ease-in duration-200", leaveFrom: "opacity-100 translate-y-0 sm:scale-100", leaveTo: "opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95" },
|
|
58
|
+
react_1.default.createElement("div", { className: "inline-block w-full align-bottom bg-white rounded-lg px-4 pt-5 pb-10 text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:align-middle sm:max-w-lg sm:p-6" },
|
|
59
|
+
react_1.default.createElement("div", null,
|
|
60
|
+
this.props.title && (react_1.default.createElement("div", { className: " border-b border-gray-200 pb-4" },
|
|
61
|
+
react_1.default.createElement(Dialog.Title, { as: "h3", className: "text-lg leading-6 font-medium text-gray-900" }, this.props.title))),
|
|
62
|
+
react_1.default.createElement("div", { className: "mt-2" }, this.props.renderContent && this.props.renderContent()))))))));
|
|
63
|
+
};
|
|
64
|
+
return Modal;
|
|
65
|
+
}(react_1.Component));
|
|
66
|
+
exports.Modal = Modal;
|
|
67
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/display/modal/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAAmD;AACnD,8BAA4B;AAY5B;IAA2B,yBAAgB;IAA3C;;IAgEA,CAAC;IA/DC,sBAAM,GAAN;QACQ,IAAA,KAAyB,IAAI,CAAC,KAAK,CAAC,GAAG,EAArC,MAAM,YAAA,EAAE,UAAU,gBAAmB,CAAC;QAC9C,OAAO,CACL,8BAAC,UAAU,CAAC,IAAI,IAAC,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,EAAE,EAAE,gBAAQ;YAClD,8BAAC,MAAM,IACL,EAAE,EAAC,KAAK,EACR,MAAM,QACN,SAAS,EAAC,oCAAoC,EAC9C,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,EACrB,OAAO,EAAE,cAAO,CAAC;gBAEjB,uCAAK,SAAS,EAAC,wFAAwF;oBACrG,8BAAC,UAAU,CAAC,KAAK,IACf,EAAE,EAAE,gBAAQ,EACZ,KAAK,EAAC,uBAAuB,EAC7B,SAAS,EAAC,WAAW,EACrB,OAAO,EAAC,aAAa,EACrB,KAAK,EAAC,sBAAsB,EAC5B,SAAS,EAAC,aAAa,EACvB,OAAO,EAAC,WAAW;wBAEnB,8BAAC,MAAM,CAAC,OAAO,IAAC,SAAS,EAAC,4DAA4D,GAAG,CACxE;oBAGnB,wCACE,SAAS,EAAC,oDAAoD,iBAClD,MAAM,aAGb;oBACP,8BAAC,UAAU,CAAC,KAAK,IACf,EAAE,EAAE,gBAAQ,EACZ,KAAK,EAAC,uBAAuB,EAC7B,SAAS,EAAC,sDAAsD,EAChE,OAAO,EAAC,wCAAwC,EAChD,KAAK,EAAC,sBAAsB,EAC5B,SAAS,EAAC,wCAAwC,EAClD,OAAO,EAAC,sDAAsD;wBAE9D,uCAAK,SAAS,EAAC,8KAA8K;4BAC3L;gCACG,IAAI,CAAC,KAAK,CAAC,KAAK,IAAI,CACnB,uCAAK,SAAS,EAAC,gCAAgC;oCAC7C,8BAAC,MAAM,CAAC,KAAK,IACX,EAAE,EAAC,IAAI,EACP,SAAS,EAAC,6CAA6C,IAEtD,IAAI,CAAC,KAAK,CAAC,KAAK,CACJ,CACX,CACP;gCACD,uCAAK,SAAS,EAAC,MAAM,IAClB,IAAI,CAAC,KAAK,CAAC,aAAa,IAAI,IAAI,CAAC,KAAK,CAAC,aAAa,EAAE,CACnD,CACF,CACF,CACW,CACf,CACC,CACO,CACnB,CAAC;IACJ,CAAC;IACH,YAAC;AAAD,CAAC,AAhED,CAA2B,iBAAS,GAgEnC;AAhEY,sBAAK"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Component, ReactElement } from "react";
|
|
2
|
+
import "../../../index.css";
|
|
3
|
+
interface NotificationAttribute {
|
|
4
|
+
visible: boolean;
|
|
5
|
+
title: string;
|
|
6
|
+
desc: string;
|
|
7
|
+
}
|
|
8
|
+
interface Props {
|
|
9
|
+
icon: ReactElement;
|
|
10
|
+
notificationAttribute: NotificationAttribute;
|
|
11
|
+
lib: {
|
|
12
|
+
Transition: any;
|
|
13
|
+
};
|
|
14
|
+
onClose?: () => {};
|
|
15
|
+
}
|
|
16
|
+
export declare class Notification extends Component<Props> {
|
|
17
|
+
render(): JSX.Element;
|
|
18
|
+
}
|
|
19
|
+
export {};
|
|
20
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/display/notification/index.tsx"],"names":[],"mappings":"AACA,OAAc,EAAE,SAAS,EAAY,YAAY,EAAE,MAAM,OAAO,CAAC;AACjE,OAAO,oBAAoB,CAAC;AAG5B,UAAU,qBAAqB;IAC7B,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CACd;AAED,UAAU,KAAK;IACb,IAAI,EAAE,YAAY,CAAC;IACnB,qBAAqB,EAAE,qBAAqB,CAAC;IAC7C,GAAG,EAAE;QACH,UAAU,EAAE,GAAG,CAAC;KACjB,CAAC;IACF,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;CACpB;AAED,qBAAa,YAAa,SAAQ,SAAS,CAAC,KAAK,CAAC;IAChD,MAAM;CA0CP"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
18
|
+
if (k2 === undefined) k2 = k;
|
|
19
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
20
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
21
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
22
|
+
}
|
|
23
|
+
Object.defineProperty(o, k2, desc);
|
|
24
|
+
}) : (function(o, m, k, k2) {
|
|
25
|
+
if (k2 === undefined) k2 = k;
|
|
26
|
+
o[k2] = m[k];
|
|
27
|
+
}));
|
|
28
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
29
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
30
|
+
}) : function(o, v) {
|
|
31
|
+
o["default"] = v;
|
|
32
|
+
});
|
|
33
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
34
|
+
if (mod && mod.__esModule) return mod;
|
|
35
|
+
var result = {};
|
|
36
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
37
|
+
__setModuleDefault(result, mod);
|
|
38
|
+
return result;
|
|
39
|
+
};
|
|
40
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
41
|
+
exports.Notification = void 0;
|
|
42
|
+
var outline_1 = require("@heroicons/react/24/outline");
|
|
43
|
+
var react_1 = __importStar(require("react"));
|
|
44
|
+
require("../../../index.css");
|
|
45
|
+
var iconButton_1 = require("../../action/iconButton");
|
|
46
|
+
var Notification = /** @class */ (function (_super) {
|
|
47
|
+
__extends(Notification, _super);
|
|
48
|
+
function Notification() {
|
|
49
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
50
|
+
}
|
|
51
|
+
Notification.prototype.render = function () {
|
|
52
|
+
var Transition = this.props.lib.Transition;
|
|
53
|
+
return (react_1.default.createElement(Transition, { as: react_1.Fragment, show: this.props.notificationAttribute.visible, enter: "transform transition duration-[400ms]", enterFrom: "opacity-0 scale-50", leave: "transform duration-200 transition ease-in-out", leaveTo: "opacity-0 scale-95 " },
|
|
54
|
+
react_1.default.createElement("div", { "aria-live": "assertive", className: "fixed inset-0 flex items-end px-4 py-6 pointer-events-none z-50 sm:p-6 sm:items-start" },
|
|
55
|
+
react_1.default.createElement("div", { className: "w-full flex flex-col items-center space-y-4 sm:items-end" },
|
|
56
|
+
react_1.default.createElement("div", { className: "max-w-sm w-full bg-white shadow-lg rounded-lg pointer-events-auto ring-1 ring-black ring-opacity-5 overflow-hidden" },
|
|
57
|
+
react_1.default.createElement("div", { className: "p-4" },
|
|
58
|
+
react_1.default.createElement("div", { className: "flex items-center" },
|
|
59
|
+
react_1.default.createElement("div", { className: "flex-shrink-0" }, this.props.icon),
|
|
60
|
+
react_1.default.createElement("div", { className: "ml-3 w-0 flex-1 pt-0.5" },
|
|
61
|
+
react_1.default.createElement("p", { className: "text-sm font-medium text-gray-900" }, this.props.notificationAttribute.title),
|
|
62
|
+
react_1.default.createElement("p", { className: "mt-1 text-sm text-gray-500" }, this.props.notificationAttribute.desc)),
|
|
63
|
+
react_1.default.createElement("div", { className: "ml-4 flex-shrink-0 flex" },
|
|
64
|
+
react_1.default.createElement(iconButton_1.IconButton, { icon: react_1.default.createElement(outline_1.XMarkIcon, { className: "h-5 w-5 text-gray-400" }), onClick: this.props.onClose })))))))));
|
|
65
|
+
};
|
|
66
|
+
return Notification;
|
|
67
|
+
}(react_1.Component));
|
|
68
|
+
exports.Notification = Notification;
|
|
69
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/display/notification/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uDAAwD;AACxD,6CAAiE;AACjE,8BAA4B;AAC5B,sDAAqD;AAiBrD;IAAkC,gCAAgB;IAAlD;;IA2CA,CAAC;IA1CC,6BAAM,GAAN;QACU,IAAA,UAAU,GAAK,IAAI,CAAC,KAAK,CAAC,GAAG,WAAnB,CAAoB;QACtC,OAAO,CACL,8BAAC,UAAU,IACT,EAAE,EAAE,gBAAQ,EACZ,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,qBAAqB,CAAC,OAAO,EAC9C,KAAK,EAAC,uCAAuC,EAC7C,SAAS,EAAC,oBAAoB,EAC9B,KAAK,EAAC,+CAA+C,EACrD,OAAO,EAAC,qBAAqB;YAE7B,oDACY,WAAW,EACrB,SAAS,EAAC,uFAAuF;gBAEjG,uCAAK,SAAS,EAAC,0DAA0D;oBACvE,uCAAK,SAAS,EAAC,oHAAoH;wBACjI,uCAAK,SAAS,EAAC,KAAK;4BAClB,uCAAK,SAAS,EAAC,mBAAmB;gCAChC,uCAAK,SAAS,EAAC,eAAe,IAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAO;gCACtD,uCAAK,SAAS,EAAC,wBAAwB;oCACrC,qCAAG,SAAS,EAAC,mCAAmC,IAC7C,IAAI,CAAC,KAAK,CAAC,qBAAqB,CAAC,KAAK,CACrC;oCACJ,qCAAG,SAAS,EAAC,4BAA4B,IACtC,IAAI,CAAC,KAAK,CAAC,qBAAqB,CAAC,IAAI,CACpC,CACA;gCACN,uCAAK,SAAS,EAAC,yBAAyB;oCACtC,8BAAC,uBAAU,IACT,IAAI,EAAE,8BAAC,mBAAS,IAAC,SAAS,EAAC,uBAAuB,GAAG,EACrD,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,OAAO,GAC3B,CACE,CACF,CACF,CACF,CACF,CACF,CACK,CACd,CAAC;IACJ,CAAC;IACH,mBAAC;AAAD,CAAC,AA3CD,CAAkC,iBAAS,GA2C1C;AA3CY,oCAAY"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Component } from "react";
|
|
2
|
+
import "../../../index.css";
|
|
3
|
+
export interface TableHeader {
|
|
4
|
+
key: string;
|
|
5
|
+
title: string;
|
|
6
|
+
}
|
|
7
|
+
interface Props {
|
|
8
|
+
header: TableHeader[];
|
|
9
|
+
data: Object[];
|
|
10
|
+
loading: boolean;
|
|
11
|
+
limit?: number;
|
|
12
|
+
pageIndex?: number;
|
|
13
|
+
paginationType?: "cursor" | "page";
|
|
14
|
+
cursor?: string | Date;
|
|
15
|
+
size?: number;
|
|
16
|
+
className?: string;
|
|
17
|
+
newTabUrl?: string;
|
|
18
|
+
onClickRow?: (id: string) => void;
|
|
19
|
+
handleUpdatePageIndex?: (value: string | number) => void;
|
|
20
|
+
}
|
|
21
|
+
export declare class Table extends Component<Props> {
|
|
22
|
+
handleClick: (id: string, event: any) => void;
|
|
23
|
+
renderTableHeader: () => any;
|
|
24
|
+
renderTableBody: () => any;
|
|
25
|
+
renderRowData: (eachData: any, index: number) => any;
|
|
26
|
+
renderPageNumber: () => JSX.Element[];
|
|
27
|
+
renderPagination: () => JSX.Element;
|
|
28
|
+
renderPageResult: () => string;
|
|
29
|
+
render(): JSX.Element;
|
|
30
|
+
}
|
|
31
|
+
export {};
|
|
32
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/display/table/index.tsx"],"names":[],"mappings":"AACA,OAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACzC,OAAO,oBAAoB,CAAC;AAG5B,MAAM,WAAW,WAAW;IAC1B,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;CACf;AAED,UAAU,KAAK;IACb,MAAM,EAAE,WAAW,EAAE,CAAC;IACtB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,QAAQ,GAAG,MAAM,CAAC;IACnC,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,qBAAqB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,KAAK,IAAI,CAAC;CAC1D;AAKD,qBAAa,KAAM,SAAQ,SAAS,CAAC,KAAK,CAAC;IACzC,WAAW,OAAQ,MAAM,SAAS,GAAG,UAKnC;IAEF,iBAAiB,YAiBf;IAEF,eAAe,YAsEb;IAEF,aAAa,aAAc,GAAG,SAAS,MAAM,SAkC3C;IAEF,gBAAgB,sBAkCd;IAEF,gBAAgB,oBA6Ed;IAEF,gBAAgB,eAMd;IAEF,MAAM;CAkCP"}
|