quadra-component 0.0.3 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
package/README.md CHANGED
@@ -121,20 +121,46 @@ This component is used when you need pagination for the table
121
121
  import React from "react";
122
122
  import { Pagination, Table } from "quadra-component";
123
123
  const App = () =>{
124
- <Table<Forum>
125
- columns={header}
126
- data={data}
127
- loading={isLoading}
128
- />
129
- <Pagination
130
- currentPage={data!?.meta.currentPage}
131
- totalPages={data!?.meta.totalPages}
132
- onPageChange={handlePageChange}
133
- />
124
+ <>
125
+ <Table<Forum>
126
+ columns={header}
127
+ data={data}
128
+ loading={isLoading}
129
+ />
130
+ <Pagination
131
+ currentPage={data!?.meta.currentPage}
132
+ totalPages={data!?.meta.totalPages}
133
+ onPageChange={handlePageChange}
134
+ />
135
+ </>
134
136
  }
135
137
  export default App;
136
138
  ```
137
139
 
140
+ #### 3. Svg Icon Components
141
+
142
+ This component allows you to changes the svg colors
143
+
144
+ #### Props
145
+
146
+ - `svg` (number): The svg you want to change.
147
+ - `className` (number): The react className.
148
+ - `normalWidth` (void function): The normal width for 1.5rem / 24px
149
+
150
+ #### Usage
151
+
152
+ ```jsx
153
+ import React from "react";
154
+ import { SvgIcon } from "quadra-component";
155
+ import { ChevronLeftSVG } from "assets/images";
156
+ const App = () => {
157
+ <>
158
+ <SVGIcon svg={ChevronLeftSVG} className="bg-red" />
159
+ </>;
160
+ };
161
+ export default App;
162
+ ```
163
+
138
164
  ## License
139
165
 
140
166
  This project is licensed under the ISC License.
package/dist/cjs/index.js CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("react"),t=function(){return t=Object.assign||function(e){for(var r,t=1,i=arguments.length;t<i;t++)for(var n in r=arguments[t])Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n]);return e},t.apply(this,arguments)};"function"==typeof SuppressedError&&SuppressedError;exports.Pagination=function(i){var n=i.currentPage,d=i.totalPages,o=i.onPageChange,l=i.color,s=void 0===l?"#234764":l,a=r.useState(n),c=a[0],h=a[1];r.useEffect((function(){h(n)}),[n]);return e.jsxs("div",t({style:{display:"grid",gridTemplateColumns:"repeat(10, minmax(0, 1fr))",marginTop:"4rem",gap:"1rem"}},{children:[e.jsx("div",{style:{gridColumn:"span 2 / span 2"}}),e.jsx("div",t({style:{paddingTop:"1px",gridColumn:"span 6 / span 6"}},{children:e.jsxs("div",t({style:{display:"flex",justifyContent:"center",alignItems:"center"}},{children:[e.jsx("a",t({href:"#",onClick:function(){n>1&&o(n-1)},style:{display:"inline-flex",justifyContent:"center",alignItems:"center",marginLeft:"0.5rem",marginRight:"0.5rem",color:"#262626",width:"1.5rem",height:"1.5rem"}},{children:e.jsx("svg",t({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 320 512",style:{width:"1.5rem",height:"1.5rem"}},{children:e.jsx("path",{d:"M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l192 192c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L77.3 256 246.6 86.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-192 192z"})}))})),function(){var r=[],i=Math.floor(3.5),l=Math.max(1,n-i),a=Math.min(l+7-1,d);a-l<6&&(l=Math.max(1,a-7+1));for(var c=function(i){r.push(e.jsx("a",t({href:"#",style:{backgroundColor:i===n?s:"transparent",color:i===n?"#ffffff":"#262626",borderRadius:"9999px",width:"1.5rem",height:"1.5rem",marginLeft:"0.5rem",marginRight:"0.5rem",display:"inline-flex",justifyContent:"center",alignItems:"center",fontSize:"0.75rem",lineHeight:"1rem"},onClick:function(){o(i)}},{children:i}),i))},h=l;h<=a;h++)c(h);return r}(),e.jsx("a",t({href:"#",onClick:function(){n<d&&o(n+1)},style:{display:"inline-flex",justifyContent:"center",alignItems:"center",marginLeft:"0.5rem",marginRight:"0.5rem",color:"#262626",width:"1.5rem",height:"1.5rem"}},{children:e.jsx("svg",t({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 320 512",style:{width:"1.5rem",height:"1.5rem"}},{children:e.jsx("path",{d:"M310.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L242.7 256 73.4 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z"})}))}))]}))})),e.jsx("div",t({style:{gridColumn:"span 2 / span 2"}},{children:e.jsxs("div",t({style:{display:"flex",justifyContent:"center",alignItems:"center",gap:"1rem"}},{children:[e.jsx("div",t({style:{flex:"none"}},{children:e.jsx("div",t({style:{fontSize:"0.75rem",lineHeight:"23px",height:"23px",display:"block",color:"#bdbdbd"}},{children:"Go to page"}))})),e.jsx("div",t({style:{flex:"1 1 0%"}},{children:e.jsx("input",{onChange:function(e){h(e.target.value)},value:c,type:"text",style:{borderWidth:"1px",borderRadius:"9999px",borderColor:s,display:"block",width:"100%",paddingLeft:"0.5rem",paddingRight:"0.5rem",height:"23px",color:"#262626",fontSize:"0.875rem",lineHeight:"1.25rem",outlineWidth:"0px"}})})),e.jsx("div",t({style:{flex:"1 1 0%"}},{children:e.jsx("button",t({type:"button",onClick:function(){c>=1&&c<=d?o(c):h(n)},style:{display:"inline-flex",justifyContent:"center",alignItems:"center",fontSize:"0.75rem",lineHeight:"1rem",height:"23px",paddingLeft:"1rem",paddingRight:"1rem",fontWeight:600,borderRadius:"9999px",color:"#ffffff",backgroundColor:s}},{children:"Go"}))}))]}))}))]}))},exports.Table=function(r){var i=r.data,n=void 0===i?[]:i,d=r.columns,o=void 0===d?[]:d,l=r.loading,s=void 0!==l&&l,a=r.error,c=void 0===a?"":a,h=r.action,p=void 0!==h&&h,f=r.currentPage,g=void 0===f?1:f,x=r.limit,m=void 0===x?0:x,u=r.onRowClick,y=r.color,b=void 0===y?"#234764":y,v=r.textColor,j=void 0===v?"#fff":v;return e.jsxs("table",t({style:{minWidth:"100%"}},{children:[e.jsx("thead",t({style:{backgroundColor:b}},{children:e.jsx("tr",{children:o.map((function(r,i){return e.jsx("th",t({scope:"col",style:{borderRightWidth:"1px",borderLeftWidth:"1px",borderColor:"#bdbdbd",padding:"1rem",textAlign:"center",whiteSpace:"nowrap",fontSize:"0.875rem",lineHeight:"1.25rem",color:j,fontWeight:600}},{children:e.jsxs("div",t({style:{display:"flex",justifyContent:"center"}},{children:[r.label,void 0!==(null==r?void 0:r.renderHeader)&&(null==r?void 0:r.renderHeader())]}))}),i)}))})})),e.jsxs("tbody",t({style:{backgroundColor:"#ffffff"}},{children:[!0!==s&&!c&&n&&(null==n?void 0:n.map((function(r,i){return e.jsx("tr",t({onClick:function(){var e;e=r,void 0!==u&&u(e)},role:p?"button":void 0},{children:o.map((function(n,d){return e.jsxs("td",t({style:{borderRightWidth:"0px",borderLeftWidth:"1px",borderColor:"#bdbdbd",padding:"1rem",textAlign:"center",whiteSpace:"nowrap",lineHeight:"1.75rem",fontSize:"0.875rem",color:"#201B1C"}},{children:["index"===n.fieldId&&i+1+(g-1)*m,void 0===(null==n?void 0:n.render)&&r[n.fieldId],e.jsx("p",t({className:"text-gray-500"},{children:void 0!==(null==n?void 0:n.fieldId2)&&r[n.fieldId2]})),void 0!==(null==n?void 0:n.render)&&n.render(r),e.jsx("span",{children:void 0!==(null==n?void 0:n.fieldId3)&&r[n.fieldId3]})]}),d)}))}),i)}))),!0!==s&&!c&&!n&&e.jsx("tr",{children:e.jsx("td",t({colSpan:o.length,style:{borderRightWidth:"0px",borderLeftWidth:"1px",borderColor:"#bdbdbd",padding:"1rem",textAlign:"center",whiteSpace:"nowrap",lineHeight:"1.25rem",fontSize:"0.875rem",color:"#201B1C"}},{children:e.jsx("div",t({style:{display:"flex",flexDirection:"column",alignItems:"center"}},{children:e.jsx("span",t({style:{paddingTop:"1.5rem",paddingBottom:"1.5rem",color:"#7c7c7c"}},{children:"No Data Here"}))}))}))}),!0!==s&&c&&e.jsx("tr",{children:e.jsx("td",t({colSpan:o.length,style:{borderRightWidth:"0px",borderLeftWidth:"1px",borderColor:"#bdbdbd",padding:"1rem",textAlign:"center",whiteSpace:"nowrap",lineHeight:"1.25rem",fontSize:"0.875rem",color:"#201B1C"}},{children:c}))}),!0===s&&e.jsx("tr",{children:e.jsx("td",t({colSpan:o.length,style:{borderRightWidth:"0px",borderLeftWidth:"1px",borderColor:"#bdbdbd",padding:"1rem",textAlign:"center",whiteSpace:"nowrap",lineHeight:"1.25rem",fontSize:"0.875rem",color:"#201B1C"}},{children:"Loading..."}))})]}))]}))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("react"),t=function(){return t=Object.assign||function(e){for(var r,t=1,i=arguments.length;t<i;t++)for(var n in r=arguments[t])Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n]);return e},t.apply(this,arguments)};"function"==typeof SuppressedError&&SuppressedError;exports.Pagination=function(i){var n=i.currentPage,o=i.totalPages,d=i.onPageChange,l=i.color,s=void 0===l?"#234764":l,a=r.useState(n),c=a[0],h=a[1];r.useEffect((function(){h(n)}),[n]);return e.jsxs("div",t({style:{display:"grid",gridTemplateColumns:"repeat(10, minmax(0, 1fr))",marginTop:"4rem",gap:"1rem"}},{children:[e.jsx("div",{style:{gridColumn:"span 2 / span 2"}}),e.jsx("div",t({style:{paddingTop:"1px",gridColumn:"span 6 / span 6"}},{children:e.jsxs("div",t({style:{display:"flex",justifyContent:"center",alignItems:"center"}},{children:[e.jsx("a",t({href:"#",onClick:function(){n>1&&d(n-1)},style:{display:"inline-flex",justifyContent:"center",alignItems:"center",marginLeft:"0.5rem",marginRight:"0.5rem",color:"#262626",width:"1.5rem",height:"1.5rem"}},{children:e.jsx("svg",t({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 320 512",style:{width:"1.5rem",height:"1.5rem"}},{children:e.jsx("path",{d:"M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l192 192c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L77.3 256 246.6 86.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-192 192z"})}))})),function(){var r=[],i=Math.floor(3.5),l=Math.max(1,n-i),a=Math.min(l+7-1,o);a-l<6&&(l=Math.max(1,a-7+1));for(var c=function(i){r.push(e.jsx("a",t({href:"#",style:{backgroundColor:i===n?s:"transparent",color:i===n?"#ffffff":"#262626",borderRadius:"9999px",width:"1.5rem",height:"1.5rem",marginLeft:"0.5rem",marginRight:"0.5rem",display:"inline-flex",justifyContent:"center",alignItems:"center",fontSize:"0.75rem",lineHeight:"1rem"},onClick:function(){d(i)}},{children:i}),i))},h=l;h<=a;h++)c(h);return r}(),e.jsx("a",t({href:"#",onClick:function(){n<o&&d(n+1)},style:{display:"inline-flex",justifyContent:"center",alignItems:"center",marginLeft:"0.5rem",marginRight:"0.5rem",color:"#262626",width:"1.5rem",height:"1.5rem"}},{children:e.jsx("svg",t({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 320 512",style:{width:"1.5rem",height:"1.5rem"}},{children:e.jsx("path",{d:"M310.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L242.7 256 73.4 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z"})}))}))]}))})),e.jsx("div",t({style:{gridColumn:"span 2 / span 2"}},{children:e.jsxs("div",t({style:{display:"flex",justifyContent:"center",alignItems:"center",gap:"1rem"}},{children:[e.jsx("div",t({style:{flex:"none"}},{children:e.jsx("div",t({style:{fontSize:"0.75rem",lineHeight:"23px",height:"23px",display:"block",color:"#bdbdbd"}},{children:"Go to page"}))})),e.jsx("div",t({style:{flex:"1 1 0%"}},{children:e.jsx("input",{onChange:function(e){h(e.target.value)},value:c,type:"text",style:{borderWidth:"1px",borderRadius:"9999px",borderColor:s,display:"block",width:"100%",paddingLeft:"0.5rem",paddingRight:"0.5rem",height:"23px",color:"#262626",fontSize:"0.875rem",lineHeight:"1.25rem",outlineWidth:"0px"}})})),e.jsx("div",t({style:{flex:"1 1 0%"}},{children:e.jsx("button",t({type:"button",onClick:function(){c>=1&&c<=o?d(c):h(n)},style:{display:"inline-flex",justifyContent:"center",alignItems:"center",fontSize:"0.75rem",lineHeight:"1rem",height:"23px",paddingLeft:"1rem",paddingRight:"1rem",fontWeight:600,borderRadius:"9999px",color:"#ffffff",backgroundColor:s}},{children:"Go"}))}))]}))}))]}))},exports.SvgIcon=function(r){var t=r.svg,i=r.className,n=r.normalWidth,o=void 0===n||n;return e.jsx("div",{className:i,style:{maskImage:"url(".concat(t,")"),WebkitMaskImage:"url(".concat(t,")"),maskSize:"90%",maskRepeat:"no-repeat",WebkitMaskRepeat:"no-repeat",maskPosition:"center",height:o?"1.5rem":"",width:o?"1.5rem":""}})},exports.Table=function(r){var i=r.data,n=void 0===i?[]:i,o=r.columns,d=void 0===o?[]:o,l=r.loading,s=void 0!==l&&l,a=r.error,c=void 0===a?"":a,h=r.action,p=void 0!==h&&h,g=r.currentPage,f=void 0===g?1:g,m=r.limit,x=void 0===m?0:m,u=r.onRowClick,v=r.color,b=void 0===v?"#234764":v,y=r.textColor,j=void 0===y?"#fff":y;return e.jsxs("table",t({style:{minWidth:"100%"}},{children:[e.jsx("thead",t({style:{backgroundColor:b}},{children:e.jsx("tr",{children:d.map((function(r,i){return e.jsx("th",t({scope:"col",style:{borderRightWidth:"1px",borderLeftWidth:"1px",borderColor:"#bdbdbd",padding:"1rem",textAlign:"center",whiteSpace:"nowrap",fontSize:"0.875rem",lineHeight:"1.25rem",color:j,fontWeight:600}},{children:e.jsxs("div",t({style:{display:"flex",justifyContent:"center"}},{children:[r.label,void 0!==(null==r?void 0:r.renderHeader)&&(null==r?void 0:r.renderHeader())]}))}),i)}))})})),e.jsxs("tbody",t({style:{backgroundColor:"#ffffff"}},{children:[!0!==s&&!c&&n&&(null==n?void 0:n.map((function(r,i){return e.jsx("tr",t({onClick:function(){var e;e=r,void 0!==u&&u(e)},role:p?"button":void 0},{children:d.map((function(n,o){return e.jsxs("td",t({style:{borderRightWidth:"0px",borderLeftWidth:"1px",borderColor:"#bdbdbd",padding:"1rem",textAlign:"center",whiteSpace:"nowrap",lineHeight:"1.75rem",fontSize:"0.875rem",color:"#201B1C"}},{children:["index"===n.fieldId&&i+1+(f-1)*x,void 0===(null==n?void 0:n.render)&&r[n.fieldId],e.jsx("p",t({className:"text-gray-500"},{children:void 0!==(null==n?void 0:n.fieldId2)&&r[n.fieldId2]})),void 0!==(null==n?void 0:n.render)&&n.render(r),e.jsx("span",{children:void 0!==(null==n?void 0:n.fieldId3)&&r[n.fieldId3]})]}),o)}))}),i)}))),!0!==s&&!c&&!n&&e.jsx("tr",{children:e.jsx("td",t({colSpan:d.length,style:{borderRightWidth:"0px",borderLeftWidth:"1px",borderColor:"#bdbdbd",padding:"1rem",textAlign:"center",whiteSpace:"nowrap",lineHeight:"1.25rem",fontSize:"0.875rem",color:"#201B1C"}},{children:e.jsx("div",t({style:{display:"flex",flexDirection:"column",alignItems:"center"}},{children:e.jsx("span",t({style:{paddingTop:"1.5rem",paddingBottom:"1.5rem",color:"#7c7c7c"}},{children:"No Data Here"}))}))}))}),!0!==s&&c&&e.jsx("tr",{children:e.jsx("td",t({colSpan:d.length,style:{borderRightWidth:"0px",borderLeftWidth:"1px",borderColor:"#bdbdbd",padding:"1rem",textAlign:"center",whiteSpace:"nowrap",lineHeight:"1.25rem",fontSize:"0.875rem",color:"#201B1C"}},{children:c}))}),!0===s&&e.jsx("tr",{children:e.jsx("td",t({colSpan:d.length,style:{borderRightWidth:"0px",borderLeftWidth:"1px",borderColor:"#bdbdbd",padding:"1rem",textAlign:"center",whiteSpace:"nowrap",lineHeight:"1.25rem",fontSize:"0.875rem",color:"#201B1C"}},{children:"Loading..."}))})]}))]}))};
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../node_modules/tslib/tslib.es6.mjs","../../src/components/Pagination/Pagination.tsx","../../src/components/Table/Table.tsx"],"sourcesContent":["/******************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\n/* global Reflect, Promise, SuppressedError, Symbol, Iterator */\n\nvar extendStatics = function(d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n};\n\nexport function __extends(d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\n\nexport var __assign = function() {\n __assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n }\n return __assign.apply(this, arguments);\n}\n\nexport function __rest(s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n}\n\nexport function __decorate(decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\n\nexport function __param(paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n}\n\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n var _, done = false;\n for (var i = decorators.length - 1; i >= 0; i--) {\n var context = {};\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\n if (kind === \"accessor\") {\n if (result === void 0) continue;\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\n if (_ = accept(result.get)) descriptor.get = _;\n if (_ = accept(result.set)) descriptor.set = _;\n if (_ = accept(result.init)) initializers.unshift(_);\n }\n else if (_ = accept(result)) {\n if (kind === \"field\") initializers.unshift(_);\n else descriptor[key] = _;\n }\n }\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\n done = true;\n};\n\nexport function __runInitializers(thisArg, initializers, value) {\n var useValue = arguments.length > 2;\n for (var i = 0; i < initializers.length; i++) {\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\n }\n return useValue ? value : void 0;\n};\n\nexport function __propKey(x) {\n return typeof x === \"symbol\" ? x : \"\".concat(x);\n};\n\nexport function __setFunctionName(f, name, prefix) {\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\n};\n\nexport function __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\n\nexport function __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\n\nexport function __generator(thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\n return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n 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;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n}\n\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n});\n\nexport function __exportStar(m, o) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\n}\n\nexport function __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\n\nexport function __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n}\n\n/** @deprecated */\nexport function __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++)\n ar = ar.concat(__read(arguments[i]));\n return ar;\n}\n\n/** @deprecated */\nexport function __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n}\n\nexport function __spreadArray(to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n}\n\nexport function __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\n\nexport function __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = Object.create((typeof AsyncIterator === \"function\" ? AsyncIterator : Object).prototype), verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n}\n\nexport function __asyncDelegator(o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\n}\n\nexport function __asyncValues(o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator], i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n}\n\nexport function __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\n return cooked;\n};\n\nvar __setModuleDefault = Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n};\n\nexport function __importStar(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n}\n\nexport function __importDefault(mod) {\n return (mod && mod.__esModule) ? mod : { default: mod };\n}\n\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n}\n\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n}\n\nexport function __classPrivateFieldIn(state, receiver) {\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\n}\n\nexport function __addDisposableResource(env, value, async) {\n if (value !== null && value !== void 0) {\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\n var dispose, inner;\n if (async) {\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\n dispose = value[Symbol.asyncDispose];\n }\n if (dispose === void 0) {\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\n dispose = value[Symbol.dispose];\n if (async) inner = dispose;\n }\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\n env.stack.push({ value: value, dispose: dispose, async: async });\n }\n else if (async) {\n env.stack.push({ async: true });\n }\n return value;\n}\n\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\n var e = new Error(message);\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\n};\n\nexport function __disposeResources(env) {\n function fail(e) {\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\n env.hasError = true;\n }\n var r, s = 0;\n function next() {\n while (r = env.stack.pop()) {\n try {\n if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);\n if (r.dispose) {\n var result = r.dispose.call(r.value);\n if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\n }\n else s |= 1;\n }\n catch (e) {\n fail(e);\n }\n }\n if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();\n if (env.hasError) throw env.error;\n }\n return next();\n}\n\nexport default {\n __extends,\n __assign,\n __rest,\n __decorate,\n __param,\n __metadata,\n __awaiter,\n __generator,\n __createBinding,\n __exportStar,\n __values,\n __read,\n __spread,\n __spreadArrays,\n __spreadArray,\n __await,\n __asyncGenerator,\n __asyncDelegator,\n __asyncValues,\n __makeTemplateObject,\n __importStar,\n __importDefault,\n __classPrivateFieldGet,\n __classPrivateFieldSet,\n __classPrivateFieldIn,\n __addDisposableResource,\n __disposeResources,\n};\n","import { useEffect, useState } from \"react\";\ninterface PaginationProps {\n currentPage: number;\n totalPages: number;\n onPageChange: (page: number) => void;\n color?: string;\n}\n\nconst Pagination: React.FC<PaginationProps> = ({\n currentPage,\n totalPages,\n onPageChange,\n color = \"#234764\",\n}) => {\n const [inputPage, setInputPage] = useState<any>(currentPage);\n\n useEffect(() => {\n setInputPage(currentPage);\n }, [currentPage]);\n\n const handleInputChange = (e: React.ChangeEvent<HTMLInputElement>): void => {\n setInputPage(e.target.value);\n };\n\n const handlePageChange = (): void => {\n if (inputPage >= 1 && inputPage <= totalPages) {\n onPageChange(inputPage);\n } else {\n setInputPage(currentPage);\n }\n };\n\n const handlePreviousPage = (): void => {\n if (currentPage > 1) {\n onPageChange(currentPage - 1);\n }\n };\n\n const handleNextPage = (): void => {\n if (currentPage < totalPages) {\n onPageChange(currentPage + 1);\n }\n };\n\n const handlePageButtonClick = (page: number): void => {\n onPageChange(page);\n };\n\n const generatePageButtons = (): React.ReactNode => {\n const buttons = [];\n const maxButtons = 7;\n const halfMaxButtons = Math.floor(maxButtons / 2);\n let start: number = Math.max(1, currentPage - halfMaxButtons);\n const end: number = Math.min(start + maxButtons - 1, totalPages);\n\n if (end - start < maxButtons - 1) {\n start = Math.max(1, end - maxButtons + 1);\n }\n\n for (let i = start; i <= end; i++) {\n buttons.push(\n <a\n key={i}\n href=\"#\"\n style={{\n backgroundColor: i === currentPage ? color : \"transparent\",\n color: i === currentPage ? \"#ffffff\" : \"#262626\",\n borderRadius: \"9999px\",\n width: \"1.5rem\",\n height: \"1.5rem\",\n marginLeft: \"0.5rem\",\n marginRight: \"0.5rem\",\n display: \"inline-flex\",\n justifyContent: \"center\",\n alignItems: \"center\",\n fontSize: \"0.75rem\",\n lineHeight: \"1rem\",\n }}\n onClick={() => {\n handlePageButtonClick(i);\n }}\n >\n {i}\n </a>\n );\n }\n\n return buttons;\n };\n\n return (\n <div\n style={{\n display: \"grid\",\n gridTemplateColumns: \"repeat(10, minmax(0, 1fr))\",\n marginTop: \"4rem\",\n gap: \"1rem\",\n }}\n >\n <div style={{ gridColumn: \"span 2 / span 2\" }} />\n <div style={{ paddingTop: \"1px\", gridColumn: \"span 6 / span 6\" }}>\n <div\n style={{\n display: \"flex\",\n justifyContent: \"center\",\n alignItems: \"center\",\n }}\n >\n <a\n href=\"#\"\n onClick={handlePreviousPage}\n style={{\n display: \"inline-flex\",\n justifyContent: \"center\",\n alignItems: \"center\",\n marginLeft: \"0.5rem\",\n marginRight: \"0.5rem\",\n color: \"#262626\",\n width: \"1.5rem\",\n height: \"1.5rem\",\n }}\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 320 512\"\n style={{ width: \"1.5rem\", height: \"1.5rem\" }}\n >\n <path d=\"M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l192 192c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L77.3 256 246.6 86.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-192 192z\" />\n </svg>\n </a>\n {generatePageButtons()}\n <a\n href=\"#\"\n onClick={handleNextPage}\n style={{\n display: \"inline-flex\",\n justifyContent: \"center\",\n alignItems: \"center\",\n marginLeft: \"0.5rem\",\n marginRight: \"0.5rem\",\n color: \"#262626\",\n width: \"1.5rem\",\n height: \"1.5rem\",\n }}\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 320 512\"\n style={{ width: \"1.5rem\", height: \"1.5rem\" }}\n >\n <path d=\"M310.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L242.7 256 73.4 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z\" />\n </svg>\n </a>\n </div>\n </div>\n <div style={{ gridColumn: \"span 2 / span 2\" }}>\n <div\n style={{\n display: \"flex\",\n justifyContent: \"center\",\n alignItems: \"center\",\n gap: \"1rem\",\n }}\n >\n <div style={{ flex: \"none\" }}>\n <div\n style={{\n fontSize: \"0.75rem\",\n lineHeight: \"23px\",\n height: \"23px\",\n display: \"block\",\n color: \"#bdbdbd\",\n }}\n >\n Go to page\n </div>\n </div>\n <div style={{ flex: \"1 1 0%\" }}>\n <input\n onChange={handleInputChange}\n value={inputPage}\n type=\"text\"\n style={{\n borderWidth: \"1px\",\n borderRadius: \"9999px\",\n borderColor: color,\n display: \"block\",\n width: \"100%\",\n paddingLeft: \"0.5rem\",\n paddingRight: \"0.5rem\",\n height: \"23px\",\n color: \"#262626\",\n fontSize: \"0.875rem\",\n lineHeight: \"1.25rem\",\n outlineWidth: \"0px\",\n }}\n />\n </div>\n <div style={{ flex: \"1 1 0%\" }}>\n <button\n type=\"button\"\n onClick={handlePageChange}\n style={{\n display: \"inline-flex\",\n justifyContent: \"center\",\n alignItems: \"center\",\n fontSize: \"0.75rem\",\n lineHeight: \"1rem\",\n height: \"23px\",\n paddingLeft: \"1rem\",\n paddingRight: \"1rem\",\n fontWeight: 600,\n borderRadius: \"9999px\",\n color: \"#ffffff\",\n backgroundColor: color,\n }}\n >\n Go\n </button>\n </div>\n </div>\n </div>\n </div>\n );\n};\n\nexport default Pagination;\n","export interface Columns<T> {\n fieldId: string;\n fieldId2?: string;\n fieldId3?: string;\n label: string | React.ReactElement;\n render?: (data?: T) => React.ReactElement | string;\n renderHeader?: () => React.ReactElement | string;\n}\n\ninterface Props<T> {\n data?: any[];\n columns: Columns<T>[];\n loading?: boolean | null;\n error?: string;\n action?: boolean;\n currentPage?: number;\n limit?: number;\n onRowClick?: (item: T) => void;\n color?: string;\n textColor?: string;\n}\n\nexport default function Table<T>({\n data = [],\n columns = [],\n loading = false,\n error = \"\",\n action = false,\n currentPage = 1,\n limit = 0,\n onRowClick,\n color = \"#234764\",\n textColor = \"#fff\",\n}: Props<T>): React.ReactElement {\n const handleRowClick = (item: T): void => {\n if (onRowClick !== undefined) {\n onRowClick(item);\n }\n };\n return (\n <table style={{ minWidth: \"100%\" }}>\n <thead style={{ backgroundColor: color }}>\n <tr>\n {columns.map((column, index) => (\n <th\n key={index}\n scope=\"col\"\n style={{\n borderRightWidth: \"1px\",\n borderLeftWidth: \"1px\",\n borderColor: \"#bdbdbd\",\n padding: \"1rem\",\n textAlign: \"center\",\n whiteSpace: \"nowrap\",\n fontSize: \"0.875rem\",\n lineHeight: \"1.25rem\",\n color: textColor,\n fontWeight: 600,\n }}\n >\n <div style={{ display: \"flex\", justifyContent: \"center\" }}>\n {column.label}\n {column?.renderHeader !== undefined && column?.renderHeader()}\n </div>\n </th>\n ))}\n </tr>\n </thead>\n <tbody style={{ backgroundColor: \"#ffffff\" }}>\n {loading !== true &&\n !error &&\n data &&\n data?.map((data, index) => (\n <tr\n key={index}\n onClick={(): void => {\n handleRowClick(data);\n }}\n role={action ? \"button\" : undefined}\n >\n {columns.map((column, row) => (\n <td\n key={row}\n style={{\n borderRightWidth: \"0px\",\n borderLeftWidth: \"1px\",\n borderColor: \"#bdbdbd\",\n padding: \"1rem\",\n textAlign: \"center\",\n whiteSpace: \"nowrap\",\n lineHeight: \"1.75rem\",\n fontSize: \"0.875rem\",\n color: \"#201B1C\",\n }}\n >\n {column.fieldId === \"index\" &&\n index + 1 + (currentPage - 1) * limit}\n {column?.render === undefined && data[column.fieldId]}\n <p className=\"text-gray-500\">\n {column?.fieldId2 !== undefined && data[column.fieldId2]}\n </p>\n {column?.render !== undefined && column.render(data)}\n <span>\n {column?.fieldId3 !== undefined && data[column.fieldId3]}\n </span>\n </td>\n ))}\n </tr>\n ))}\n {loading !== true && !error && !data && (\n <tr>\n <td\n colSpan={columns.length}\n style={{\n borderRightWidth: \"0px\",\n borderLeftWidth: \"1px\",\n borderColor: \"#bdbdbd\",\n padding: \"1rem\",\n textAlign: \"center\",\n whiteSpace: \"nowrap\",\n lineHeight: \"1.25rem\",\n fontSize: \"0.875rem\",\n color: \"#201B1C\",\n }}\n >\n <div\n style={{\n display: \"flex\",\n flexDirection: \"column\",\n alignItems: \"center\",\n }}\n >\n <span\n style={{\n paddingTop: \"1.5rem\",\n paddingBottom: \"1.5rem\",\n color: \"#7c7c7c\",\n }}\n >\n No Data Here\n </span>\n </div>\n </td>\n </tr>\n )}\n {loading !== true && error && (\n <tr>\n <td\n colSpan={columns.length}\n style={{\n borderRightWidth: \"0px\",\n borderLeftWidth: \"1px\",\n borderColor: \"#bdbdbd\",\n padding: \"1rem\",\n textAlign: \"center\",\n whiteSpace: \"nowrap\",\n lineHeight: \"1.25rem\",\n fontSize: \"0.875rem\",\n color: \"#201B1C\",\n }}\n >\n {error}\n </td>\n </tr>\n )}\n {loading === true && (\n <tr>\n <td\n colSpan={columns.length}\n style={{\n borderRightWidth: \"0px\",\n borderLeftWidth: \"1px\",\n borderColor: \"#bdbdbd\",\n padding: \"1rem\",\n textAlign: \"center\",\n whiteSpace: \"nowrap\",\n lineHeight: \"1.25rem\",\n fontSize: \"0.875rem\",\n color: \"#201B1C\",\n }}\n >\n Loading...\n </td>\n </tr>\n )}\n </tbody>\n </table>\n );\n}\n"],"names":["__assign","Object","assign","t","s","i","n","arguments","length","p","prototype","hasOwnProperty","call","apply","this","SuppressedError","_a","currentPage","totalPages","onPageChange","_b","color","_c","useState","inputPage","setInputPage","useEffect","_jsxs","style","display","gridTemplateColumns","marginTop","gap","children","_jsx","jsx","gridColumn","paddingTop","justifyContent","alignItems","href","onClick","marginLeft","marginRight","width","height","xmlns","viewBox","d","buttons","halfMaxButtons","Math","floor","maxButtons","start","max","end","min","push","backgroundColor","borderRadius","fontSize","lineHeight","generatePageButtons","flex","onChange","e","target","value","type","borderWidth","borderColor","paddingLeft","paddingRight","outlineWidth","fontWeight","data","columns","_d","loading","_e","error","_f","action","_g","_h","limit","onRowClick","_j","_k","textColor","minWidth","map","column","index","scope","borderRightWidth","borderLeftWidth","padding","textAlign","whiteSpace","label","undefined","renderHeader","jsxs","item","role","row","fieldId","render","className","fieldId2","fieldId3","colSpan","flexDirection","paddingBottom"],"mappings":"0HA+BWA,EAAW,WAQpB,OAPAA,EAAWC,OAAOC,QAAU,SAAkBC,GAC1C,IAAK,IAAIC,EAAGC,EAAI,EAAGC,EAAIC,UAAUC,OAAQH,EAAIC,EAAGD,IAE5C,IAAK,IAAII,KADTL,EAAIG,UAAUF,GACOJ,OAAOS,UAAUC,eAAeC,KAAKR,EAAGK,KAAIN,EAAEM,GAAKL,EAAEK,IAE9E,OAAON,CACV,EACMH,EAASa,MAAMC,KAAMP,UAC9B,EAsRkD,mBAApBQ,iBAAiCA,mCCtTjB,SAACC,GAC7C,IAAAC,EAAWD,EAAAC,YACXC,EAAUF,EAAAE,WACVC,EAAYH,EAAAG,aACZC,EAAiBJ,EAAAK,MAAjBA,OAAK,IAAAD,EAAG,UAASA,EAEXE,EAA4BC,EAAAA,SAAcN,GAAzCO,EAASF,EAAA,GAAEG,EAAYH,EAAA,GAE9BI,EAAAA,WAAU,WACRD,EAAaR,EACf,GAAG,CAACA,IAwEJ,OACEU,OACE,MAAA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,CAAAD,cAAqBqE,KAArBT,aAAM,EAANA,EAAQmB,WAA0BpC,EAAKiB,EAAOmB,eArB5CL,EAwBR,MAhCIb,QAmCE,IAAZf,IAAqBE,IAAUL,GAC9B1C,EAAAA,IACE,KAAA,CAAAD,SAAAC,MAAA,KAAAlC,EAAA,CACEiH,QAASpC,EAAQrE,OACjBoB,MAAO,CACLoE,iBAAkB,MAClBC,gBAAiB,MACjB1B,YAAa,UACb2B,QAAS,OACTC,UAAW,SACXC,WAAY,SACZtC,WAAY,UACZD,SAAU,WACVxC,MAAO,YAGT,CAAAY,SAAAC,EAAAA,IAAA,MAAAlC,EAAA,CACE4B,MAAO,CACLC,QAAS,OACTqF,cAAe,SACf3E,WAAY,WAGd,CAAAN,SAAAC,EAAAA,IAAA,OAAAlC,EAAA,CACE4B,MAAO,CACLS,WAAY,SACZ8E,cAAe,SACf9F,MAAO,YAIJ,CAAAY,SAAA,2BAKF,IAAZ8C,GAAoBE,GACnB/C,EAAAA,IAAA,KAAA,CAAAD,SACEC,cACE+E,QAASpC,EAAQrE,OACjBoB,MAAO,CACLoE,iBAAkB,MAClBC,gBAAiB,MACjB1B,YAAa,UACb2B,QAAS,OACTC,UAAW,SACXC,WAAY,SACZtC,WAAY,UACZD,SAAU,WACVxC,MAAO,YACR,CAAAY,SAEAgD,QAIM,IAAZF,GACC7C,EACEC,IAAA,KAAA,CAAAF,SAAAC,EAAAC,IAAA,KAAAnC,EAAA,CACEiH,QAASpC,EAAQrE,OACjBoB,MAAO,CACLoE,iBAAkB,MAClBC,gBAAiB,MACjB1B,YAAa,UACb2B,QAAS,OACTC,UAAW,SACXC,WAAY,SACZtC,WAAY,UACZD,SAAU,WACVxC,MAAO,YACR,CAAAY,SAAA,yBASf"}
1
+ {"version":3,"file":"index.js","sources":["../../node_modules/tslib/tslib.es6.mjs","../../src/components/Pagination/Pagination.tsx","../../src/components/SvgIcon/SvgIcon.tsx","../../src/components/Table/Table.tsx"],"sourcesContent":["/******************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\n/* global Reflect, Promise, SuppressedError, Symbol, Iterator */\n\nvar extendStatics = function(d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n};\n\nexport function __extends(d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\n\nexport var __assign = function() {\n __assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n }\n return __assign.apply(this, arguments);\n}\n\nexport function __rest(s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n}\n\nexport function __decorate(decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\n\nexport function __param(paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n}\n\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n var _, done = false;\n for (var i = decorators.length - 1; i >= 0; i--) {\n var context = {};\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\n if (kind === \"accessor\") {\n if (result === void 0) continue;\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\n if (_ = accept(result.get)) descriptor.get = _;\n if (_ = accept(result.set)) descriptor.set = _;\n if (_ = accept(result.init)) initializers.unshift(_);\n }\n else if (_ = accept(result)) {\n if (kind === \"field\") initializers.unshift(_);\n else descriptor[key] = _;\n }\n }\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\n done = true;\n};\n\nexport function __runInitializers(thisArg, initializers, value) {\n var useValue = arguments.length > 2;\n for (var i = 0; i < initializers.length; i++) {\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\n }\n return useValue ? value : void 0;\n};\n\nexport function __propKey(x) {\n return typeof x === \"symbol\" ? x : \"\".concat(x);\n};\n\nexport function __setFunctionName(f, name, prefix) {\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\n};\n\nexport function __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\n\nexport function __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\n\nexport function __generator(thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\n return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n 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;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n}\n\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n});\n\nexport function __exportStar(m, o) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\n}\n\nexport function __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\n\nexport function __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n}\n\n/** @deprecated */\nexport function __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++)\n ar = ar.concat(__read(arguments[i]));\n return ar;\n}\n\n/** @deprecated */\nexport function __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n}\n\nexport function __spreadArray(to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n}\n\nexport function __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\n\nexport function __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = Object.create((typeof AsyncIterator === \"function\" ? AsyncIterator : Object).prototype), verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n}\n\nexport function __asyncDelegator(o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\n}\n\nexport function __asyncValues(o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator], i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n}\n\nexport function __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\n return cooked;\n};\n\nvar __setModuleDefault = Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n};\n\nexport function __importStar(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n}\n\nexport function __importDefault(mod) {\n return (mod && mod.__esModule) ? mod : { default: mod };\n}\n\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n}\n\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n}\n\nexport function __classPrivateFieldIn(state, receiver) {\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\n}\n\nexport function __addDisposableResource(env, value, async) {\n if (value !== null && value !== void 0) {\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\n var dispose, inner;\n if (async) {\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\n dispose = value[Symbol.asyncDispose];\n }\n if (dispose === void 0) {\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\n dispose = value[Symbol.dispose];\n if (async) inner = dispose;\n }\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\n env.stack.push({ value: value, dispose: dispose, async: async });\n }\n else if (async) {\n env.stack.push({ async: true });\n }\n return value;\n}\n\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\n var e = new Error(message);\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\n};\n\nexport function __disposeResources(env) {\n function fail(e) {\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\n env.hasError = true;\n }\n var r, s = 0;\n function next() {\n while (r = env.stack.pop()) {\n try {\n if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);\n if (r.dispose) {\n var result = r.dispose.call(r.value);\n if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\n }\n else s |= 1;\n }\n catch (e) {\n fail(e);\n }\n }\n if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();\n if (env.hasError) throw env.error;\n }\n return next();\n}\n\nexport default {\n __extends,\n __assign,\n __rest,\n __decorate,\n __param,\n __metadata,\n __awaiter,\n __generator,\n __createBinding,\n __exportStar,\n __values,\n __read,\n __spread,\n __spreadArrays,\n __spreadArray,\n __await,\n __asyncGenerator,\n __asyncDelegator,\n __asyncValues,\n __makeTemplateObject,\n __importStar,\n __importDefault,\n __classPrivateFieldGet,\n __classPrivateFieldSet,\n __classPrivateFieldIn,\n __addDisposableResource,\n __disposeResources,\n};\n","import { useEffect, useState } from \"react\";\ninterface PaginationProps {\n currentPage: number;\n totalPages: number;\n onPageChange: (page: number) => void;\n color?: string;\n}\n\nconst Pagination: React.FC<PaginationProps> = ({\n currentPage,\n totalPages,\n onPageChange,\n color = \"#234764\",\n}) => {\n const [inputPage, setInputPage] = useState<any>(currentPage);\n\n useEffect(() => {\n setInputPage(currentPage);\n }, [currentPage]);\n\n const handleInputChange = (e: React.ChangeEvent<HTMLInputElement>): void => {\n setInputPage(e.target.value);\n };\n\n const handlePageChange = (): void => {\n if (inputPage >= 1 && inputPage <= totalPages) {\n onPageChange(inputPage);\n } else {\n setInputPage(currentPage);\n }\n };\n\n const handlePreviousPage = (): void => {\n if (currentPage > 1) {\n onPageChange(currentPage - 1);\n }\n };\n\n const handleNextPage = (): void => {\n if (currentPage < totalPages) {\n onPageChange(currentPage + 1);\n }\n };\n\n const handlePageButtonClick = (page: number): void => {\n onPageChange(page);\n };\n\n const generatePageButtons = (): React.ReactNode => {\n const buttons = [];\n const maxButtons = 7;\n const halfMaxButtons = Math.floor(maxButtons / 2);\n let start: number = Math.max(1, currentPage - halfMaxButtons);\n const end: number = Math.min(start + maxButtons - 1, totalPages);\n\n if (end - start < maxButtons - 1) {\n start = Math.max(1, end - maxButtons + 1);\n }\n\n for (let i = start; i <= end; i++) {\n buttons.push(\n <a\n key={i}\n href=\"#\"\n style={{\n backgroundColor: i === currentPage ? color : \"transparent\",\n color: i === currentPage ? \"#ffffff\" : \"#262626\",\n borderRadius: \"9999px\",\n width: \"1.5rem\",\n height: \"1.5rem\",\n marginLeft: \"0.5rem\",\n marginRight: \"0.5rem\",\n display: \"inline-flex\",\n justifyContent: \"center\",\n alignItems: \"center\",\n fontSize: \"0.75rem\",\n lineHeight: \"1rem\",\n }}\n onClick={() => {\n handlePageButtonClick(i);\n }}\n >\n {i}\n </a>\n );\n }\n\n return buttons;\n };\n\n return (\n <div\n style={{\n display: \"grid\",\n gridTemplateColumns: \"repeat(10, minmax(0, 1fr))\",\n marginTop: \"4rem\",\n gap: \"1rem\",\n }}\n >\n <div style={{ gridColumn: \"span 2 / span 2\" }} />\n <div style={{ paddingTop: \"1px\", gridColumn: \"span 6 / span 6\" }}>\n <div\n style={{\n display: \"flex\",\n justifyContent: \"center\",\n alignItems: \"center\",\n }}\n >\n <a\n href=\"#\"\n onClick={handlePreviousPage}\n style={{\n display: \"inline-flex\",\n justifyContent: \"center\",\n alignItems: \"center\",\n marginLeft: \"0.5rem\",\n marginRight: \"0.5rem\",\n color: \"#262626\",\n width: \"1.5rem\",\n height: \"1.5rem\",\n }}\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 320 512\"\n style={{ width: \"1.5rem\", height: \"1.5rem\" }}\n >\n <path d=\"M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l192 192c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L77.3 256 246.6 86.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-192 192z\" />\n </svg>\n </a>\n {generatePageButtons()}\n <a\n href=\"#\"\n onClick={handleNextPage}\n style={{\n display: \"inline-flex\",\n justifyContent: \"center\",\n alignItems: \"center\",\n marginLeft: \"0.5rem\",\n marginRight: \"0.5rem\",\n color: \"#262626\",\n width: \"1.5rem\",\n height: \"1.5rem\",\n }}\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 320 512\"\n style={{ width: \"1.5rem\", height: \"1.5rem\" }}\n >\n <path d=\"M310.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L242.7 256 73.4 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z\" />\n </svg>\n </a>\n </div>\n </div>\n <div style={{ gridColumn: \"span 2 / span 2\" }}>\n <div\n style={{\n display: \"flex\",\n justifyContent: \"center\",\n alignItems: \"center\",\n gap: \"1rem\",\n }}\n >\n <div style={{ flex: \"none\" }}>\n <div\n style={{\n fontSize: \"0.75rem\",\n lineHeight: \"23px\",\n height: \"23px\",\n display: \"block\",\n color: \"#bdbdbd\",\n }}\n >\n Go to page\n </div>\n </div>\n <div style={{ flex: \"1 1 0%\" }}>\n <input\n onChange={handleInputChange}\n value={inputPage}\n type=\"text\"\n style={{\n borderWidth: \"1px\",\n borderRadius: \"9999px\",\n borderColor: color,\n display: \"block\",\n width: \"100%\",\n paddingLeft: \"0.5rem\",\n paddingRight: \"0.5rem\",\n height: \"23px\",\n color: \"#262626\",\n fontSize: \"0.875rem\",\n lineHeight: \"1.25rem\",\n outlineWidth: \"0px\",\n }}\n />\n </div>\n <div style={{ flex: \"1 1 0%\" }}>\n <button\n type=\"button\"\n onClick={handlePageChange}\n style={{\n display: \"inline-flex\",\n justifyContent: \"center\",\n alignItems: \"center\",\n fontSize: \"0.75rem\",\n lineHeight: \"1rem\",\n height: \"23px\",\n paddingLeft: \"1rem\",\n paddingRight: \"1rem\",\n fontWeight: 600,\n borderRadius: \"9999px\",\n color: \"#ffffff\",\n backgroundColor: color,\n }}\n >\n Go\n </button>\n </div>\n </div>\n </div>\n </div>\n );\n};\n\nexport default Pagination;\n","interface props {\n svg: string;\n className: string;\n normalWidth?: boolean;\n}\n\nexport const SvgIcon: React.FC<props> = ({\n svg,\n className,\n normalWidth = true,\n}) => {\n return (\n <div\n className={className}\n style={{\n maskImage: `url(${svg})`,\n WebkitMaskImage: `url(${svg})`,\n maskSize: \"90%\",\n maskRepeat: \"no-repeat\",\n WebkitMaskRepeat: \"no-repeat\",\n maskPosition: \"center\",\n height: normalWidth ? \"1.5rem\" : \"\",\n width: normalWidth ? \"1.5rem\" : \"\",\n }}\n />\n );\n};\n\nexport default SvgIcon;\n","import { Columns } from \"../../types/interface\";\n\ninterface Props<T> {\n data?: any[];\n columns: Columns<T>[];\n loading?: boolean | null;\n error?: string;\n action?: boolean;\n currentPage?: number;\n limit?: number;\n onRowClick?: (item: T) => void;\n color?: string;\n textColor?: string;\n}\n\nexport default function Table<T>({\n data = [],\n columns = [],\n loading = false,\n error = \"\",\n action = false,\n currentPage = 1,\n limit = 0,\n onRowClick,\n color = \"#234764\",\n textColor = \"#fff\",\n}: Props<T>): React.ReactElement {\n const handleRowClick = (item: T): void => {\n if (onRowClick !== undefined) {\n onRowClick(item);\n }\n };\n return (\n <table style={{ minWidth: \"100%\" }}>\n <thead style={{ backgroundColor: color }}>\n <tr>\n {columns.map((column, index) => (\n <th\n key={index}\n scope=\"col\"\n style={{\n borderRightWidth: \"1px\",\n borderLeftWidth: \"1px\",\n borderColor: \"#bdbdbd\",\n padding: \"1rem\",\n textAlign: \"center\",\n whiteSpace: \"nowrap\",\n fontSize: \"0.875rem\",\n lineHeight: \"1.25rem\",\n color: textColor,\n fontWeight: 600,\n }}\n >\n <div style={{ display: \"flex\", justifyContent: \"center\" }}>\n {column.label}\n {column?.renderHeader !== undefined && column?.renderHeader()}\n </div>\n </th>\n ))}\n </tr>\n </thead>\n <tbody style={{ backgroundColor: \"#ffffff\" }}>\n {loading !== true &&\n !error &&\n data &&\n data?.map((data, index) => (\n <tr\n key={index}\n onClick={(): void => {\n handleRowClick(data);\n }}\n role={action ? \"button\" : undefined}\n >\n {columns.map((column, row) => (\n <td\n key={row}\n style={{\n borderRightWidth: \"0px\",\n borderLeftWidth: \"1px\",\n borderColor: \"#bdbdbd\",\n padding: \"1rem\",\n textAlign: \"center\",\n whiteSpace: \"nowrap\",\n lineHeight: \"1.75rem\",\n fontSize: \"0.875rem\",\n color: \"#201B1C\",\n }}\n >\n {column.fieldId === \"index\" &&\n index + 1 + (currentPage - 1) * limit}\n {column?.render === undefined && data[column.fieldId]}\n <p className=\"text-gray-500\">\n {column?.fieldId2 !== undefined && data[column.fieldId2]}\n </p>\n {column?.render !== undefined && column.render(data)}\n <span>\n {column?.fieldId3 !== undefined && data[column.fieldId3]}\n </span>\n </td>\n ))}\n </tr>\n ))}\n {loading !== true && !error && !data && (\n <tr>\n <td\n colSpan={columns.length}\n style={{\n borderRightWidth: \"0px\",\n borderLeftWidth: \"1px\",\n borderColor: \"#bdbdbd\",\n padding: \"1rem\",\n textAlign: \"center\",\n whiteSpace: \"nowrap\",\n lineHeight: \"1.25rem\",\n fontSize: \"0.875rem\",\n color: \"#201B1C\",\n }}\n >\n <div\n style={{\n display: \"flex\",\n flexDirection: \"column\",\n alignItems: \"center\",\n }}\n >\n <span\n style={{\n paddingTop: \"1.5rem\",\n paddingBottom: \"1.5rem\",\n color: \"#7c7c7c\",\n }}\n >\n No Data Here\n </span>\n </div>\n </td>\n </tr>\n )}\n {loading !== true && error && (\n <tr>\n <td\n colSpan={columns.length}\n style={{\n borderRightWidth: \"0px\",\n borderLeftWidth: \"1px\",\n borderColor: \"#bdbdbd\",\n padding: \"1rem\",\n textAlign: \"center\",\n whiteSpace: \"nowrap\",\n lineHeight: \"1.25rem\",\n fontSize: \"0.875rem\",\n color: \"#201B1C\",\n }}\n >\n {error}\n </td>\n </tr>\n )}\n {loading === true && (\n <tr>\n <td\n colSpan={columns.length}\n style={{\n borderRightWidth: \"0px\",\n borderLeftWidth: \"1px\",\n borderColor: \"#bdbdbd\",\n padding: \"1rem\",\n textAlign: \"center\",\n whiteSpace: \"nowrap\",\n lineHeight: \"1.25rem\",\n fontSize: \"0.875rem\",\n color: \"#201B1C\",\n }}\n >\n Loading...\n </td>\n </tr>\n )}\n </tbody>\n </table>\n );\n}\n"],"names":["__assign","Object","assign","t","s","i","n","arguments","length","p","prototype","hasOwnProperty","call","apply","this","SuppressedError","_a","currentPage","totalPages","onPageChange","_b","color","_c","useState","inputPage","setInputPage","useEffect","_jsxs","style","display","gridTemplateColumns","marginTop","gap","children","_jsx","jsx","gridColumn","paddingTop","justifyContent","alignItems","href","onClick","marginLeft","marginRight","width","height","xmlns","viewBox","d","buttons","halfMaxButtons","Math","floor","maxButtons","start","max","end","min","push","backgroundColor","borderRadius","fontSize","lineHeight","generatePageButtons","flex","onChange","e","target","value","type","borderWidth","borderColor","paddingLeft","paddingRight","outlineWidth","fontWeight","svg","className","normalWidth","maskImage","concat","WebkitMaskImage","maskSize","maskRepeat","WebkitMaskRepeat","maskPosition","data","columns","_d","loading","_e","error","_f","action","_g","_h","limit","onRowClick","_j","_k","textColor","minWidth","map","column","index","scope","borderRightWidth","borderLeftWidth","padding","textAlign","whiteSpace","label","undefined","renderHeader","jsxs","item","role","row","fieldId","render","fieldId2","fieldId3","colSpan","flexDirection","paddingBottom"],"mappings":"0HA+BWA,EAAW,WAQpB,OAPAA,EAAWC,OAAOC,QAAU,SAAkBC,GAC1C,IAAK,IAAIC,EAAGC,EAAI,EAAGC,EAAIC,UAAUC,OAAQH,EAAIC,EAAGD,IAE5C,IAAK,IAAII,KADTL,EAAIG,UAAUF,GACOJ,OAAOS,UAAUC,eAAeC,KAAKR,EAAGK,KAAIN,EAAEM,GAAKL,EAAEK,IAE9E,OAAON,CACV,EACMH,EAASa,MAAMC,KAAMP,UAC9B,EAsRkD,mBAApBQ,iBAAiCA,mCCtTjB,SAACC,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AAAA,IAAA,KAAA,CAAAD,SACEC,cACEwF,QAASnC,EAAQ/E,OACjBoB,MAAO,CACL8E,iBAAkB,MAClBC,gBAAiB,MACjBpC,YAAa,UACbqC,QAAS,OACTC,UAAW,SACXC,WAAY,SACZhD,WAAY,UACZD,SAAU,WACVxC,MAAO,YACR,CAAAY,SAEA0D,QAIM,IAAZF,GACCvD,EACEC,IAAA,KAAA,CAAAF,SAAAC,EAAAC,IAAA,KAAAnC,EAAA,CACE0H,QAASnC,EAAQ/E,OACjBoB,MAAO,CACL8E,iBAAkB,MAClBC,gBAAiB,MACjBpC,YAAa,UACbqC,QAAS,OACTC,UAAW,SACXC,WAAY,SACZhD,WAAY,UACZD,SAAU,WACVxC,MAAO,YACR,CAAAY,SAAA,yBASf"}
package/dist/esm/index.js CHANGED
@@ -1,2 +1,2 @@
1
- import{jsxs as e,jsx as r}from"react/jsx-runtime";import{useState as t,useEffect as i}from"react";var n=function(){return n=Object.assign||function(e){for(var r,t=1,i=arguments.length;t<i;t++)for(var n in r=arguments[t])Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n]);return e},n.apply(this,arguments)};"function"==typeof SuppressedError&&SuppressedError;var d=function(d){var o=d.currentPage,l=d.totalPages,a=d.onPageChange,c=d.color,h=void 0===c?"#234764":c,p=t(o),f=p[0],g=p[1];i((function(){g(o)}),[o]);return e("div",n({style:{display:"grid",gridTemplateColumns:"repeat(10, minmax(0, 1fr))",marginTop:"4rem",gap:"1rem"}},{children:[r("div",{style:{gridColumn:"span 2 / span 2"}}),r("div",n({style:{paddingTop:"1px",gridColumn:"span 6 / span 6"}},{children:e("div",n({style:{display:"flex",justifyContent:"center",alignItems:"center"}},{children:[r("a",n({href:"#",onClick:function(){o>1&&a(o-1)},style:{display:"inline-flex",justifyContent:"center",alignItems:"center",marginLeft:"0.5rem",marginRight:"0.5rem",color:"#262626",width:"1.5rem",height:"1.5rem"}},{children:r("svg",n({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 320 512",style:{width:"1.5rem",height:"1.5rem"}},{children:r("path",{d:"M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l192 192c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L77.3 256 246.6 86.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-192 192z"})}))})),function(){var e=[],t=Math.floor(3.5),i=Math.max(1,o-t),d=Math.min(i+7-1,l);d-i<6&&(i=Math.max(1,d-7+1));for(var c=function(t){e.push(r("a",n({href:"#",style:{backgroundColor:t===o?h:"transparent",color:t===o?"#ffffff":"#262626",borderRadius:"9999px",width:"1.5rem",height:"1.5rem",marginLeft:"0.5rem",marginRight:"0.5rem",display:"inline-flex",justifyContent:"center",alignItems:"center",fontSize:"0.75rem",lineHeight:"1rem"},onClick:function(){a(t)}},{children:t}),t))},p=i;p<=d;p++)c(p);return e}(),r("a",n({href:"#",onClick:function(){o<l&&a(o+1)},style:{display:"inline-flex",justifyContent:"center",alignItems:"center",marginLeft:"0.5rem",marginRight:"0.5rem",color:"#262626",width:"1.5rem",height:"1.5rem"}},{children:r("svg",n({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 320 512",style:{width:"1.5rem",height:"1.5rem"}},{children:r("path",{d:"M310.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L242.7 256 73.4 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z"})}))}))]}))})),r("div",n({style:{gridColumn:"span 2 / span 2"}},{children:e("div",n({style:{display:"flex",justifyContent:"center",alignItems:"center",gap:"1rem"}},{children:[r("div",n({style:{flex:"none"}},{children:r("div",n({style:{fontSize:"0.75rem",lineHeight:"23px",height:"23px",display:"block",color:"#bdbdbd"}},{children:"Go to page"}))})),r("div",n({style:{flex:"1 1 0%"}},{children:r("input",{onChange:function(e){g(e.target.value)},value:f,type:"text",style:{borderWidth:"1px",borderRadius:"9999px",borderColor:h,display:"block",width:"100%",paddingLeft:"0.5rem",paddingRight:"0.5rem",height:"23px",color:"#262626",fontSize:"0.875rem",lineHeight:"1.25rem",outlineWidth:"0px"}})})),r("div",n({style:{flex:"1 1 0%"}},{children:r("button",n({type:"button",onClick:function(){f>=1&&f<=l?a(f):g(o)},style:{display:"inline-flex",justifyContent:"center",alignItems:"center",fontSize:"0.75rem",lineHeight:"1rem",height:"23px",paddingLeft:"1rem",paddingRight:"1rem",fontWeight:600,borderRadius:"9999px",color:"#ffffff",backgroundColor:h}},{children:"Go"}))}))]}))}))]}))};function o(t){var i=t.data,d=void 0===i?[]:i,o=t.columns,l=void 0===o?[]:o,a=t.loading,c=void 0!==a&&a,h=t.error,p=void 0===h?"":h,f=t.action,g=void 0!==f&&f,s=t.currentPage,m=void 0===s?1:s,u=t.limit,y=void 0===u?0:u,v=t.onRowClick,b=t.color,x=void 0===b?"#234764":b,C=t.textColor,w=void 0===C?"#fff":C;return e("table",n({style:{minWidth:"100%"}},{children:[r("thead",n({style:{backgroundColor:x}},{children:r("tr",{children:l.map((function(t,i){return r("th",n({scope:"col",style:{borderRightWidth:"1px",borderLeftWidth:"1px",borderColor:"#bdbdbd",padding:"1rem",textAlign:"center",whiteSpace:"nowrap",fontSize:"0.875rem",lineHeight:"1.25rem",color:w,fontWeight:600}},{children:e("div",n({style:{display:"flex",justifyContent:"center"}},{children:[t.label,void 0!==(null==t?void 0:t.renderHeader)&&(null==t?void 0:t.renderHeader())]}))}),i)}))})})),e("tbody",n({style:{backgroundColor:"#ffffff"}},{children:[!0!==c&&!p&&d&&(null==d?void 0:d.map((function(t,i){return r("tr",n({onClick:function(){var e;e=t,void 0!==v&&v(e)},role:g?"button":void 0},{children:l.map((function(d,o){return e("td",n({style:{borderRightWidth:"0px",borderLeftWidth:"1px",borderColor:"#bdbdbd",padding:"1rem",textAlign:"center",whiteSpace:"nowrap",lineHeight:"1.75rem",fontSize:"0.875rem",color:"#201B1C"}},{children:["index"===d.fieldId&&i+1+(m-1)*y,void 0===(null==d?void 0:d.render)&&t[d.fieldId],r("p",n({className:"text-gray-500"},{children:void 0!==(null==d?void 0:d.fieldId2)&&t[d.fieldId2]})),void 0!==(null==d?void 0:d.render)&&d.render(t),r("span",{children:void 0!==(null==d?void 0:d.fieldId3)&&t[d.fieldId3]})]}),o)}))}),i)}))),!0!==c&&!p&&!d&&r("tr",{children:r("td",n({colSpan:l.length,style:{borderRightWidth:"0px",borderLeftWidth:"1px",borderColor:"#bdbdbd",padding:"1rem",textAlign:"center",whiteSpace:"nowrap",lineHeight:"1.25rem",fontSize:"0.875rem",color:"#201B1C"}},{children:r("div",n({style:{display:"flex",flexDirection:"column",alignItems:"center"}},{children:r("span",n({style:{paddingTop:"1.5rem",paddingBottom:"1.5rem",color:"#7c7c7c"}},{children:"No Data Here"}))}))}))}),!0!==c&&p&&r("tr",{children:r("td",n({colSpan:l.length,style:{borderRightWidth:"0px",borderLeftWidth:"1px",borderColor:"#bdbdbd",padding:"1rem",textAlign:"center",whiteSpace:"nowrap",lineHeight:"1.25rem",fontSize:"0.875rem",color:"#201B1C"}},{children:p}))}),!0===c&&r("tr",{children:r("td",n({colSpan:l.length,style:{borderRightWidth:"0px",borderLeftWidth:"1px",borderColor:"#bdbdbd",padding:"1rem",textAlign:"center",whiteSpace:"nowrap",lineHeight:"1.25rem",fontSize:"0.875rem",color:"#201B1C"}},{children:"Loading..."}))})]}))]}))}export{d as Pagination,o as Table};
1
+ import{jsxs as e,jsx as r}from"react/jsx-runtime";import{useState as t,useEffect as i}from"react";var n=function(){return n=Object.assign||function(e){for(var r,t=1,i=arguments.length;t<i;t++)for(var n in r=arguments[t])Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n]);return e},n.apply(this,arguments)};"function"==typeof SuppressedError&&SuppressedError;var o=function(o){var d=o.currentPage,l=o.totalPages,a=o.onPageChange,c=o.color,h=void 0===c?"#234764":c,s=t(d),p=s[0],m=s[1];i((function(){m(d)}),[d]);return e("div",n({style:{display:"grid",gridTemplateColumns:"repeat(10, minmax(0, 1fr))",marginTop:"4rem",gap:"1rem"}},{children:[r("div",{style:{gridColumn:"span 2 / span 2"}}),r("div",n({style:{paddingTop:"1px",gridColumn:"span 6 / span 6"}},{children:e("div",n({style:{display:"flex",justifyContent:"center",alignItems:"center"}},{children:[r("a",n({href:"#",onClick:function(){d>1&&a(d-1)},style:{display:"inline-flex",justifyContent:"center",alignItems:"center",marginLeft:"0.5rem",marginRight:"0.5rem",color:"#262626",width:"1.5rem",height:"1.5rem"}},{children:r("svg",n({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 320 512",style:{width:"1.5rem",height:"1.5rem"}},{children:r("path",{d:"M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l192 192c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L77.3 256 246.6 86.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-192 192z"})}))})),function(){var e=[],t=Math.floor(3.5),i=Math.max(1,d-t),o=Math.min(i+7-1,l);o-i<6&&(i=Math.max(1,o-7+1));for(var c=function(t){e.push(r("a",n({href:"#",style:{backgroundColor:t===d?h:"transparent",color:t===d?"#ffffff":"#262626",borderRadius:"9999px",width:"1.5rem",height:"1.5rem",marginLeft:"0.5rem",marginRight:"0.5rem",display:"inline-flex",justifyContent:"center",alignItems:"center",fontSize:"0.75rem",lineHeight:"1rem"},onClick:function(){a(t)}},{children:t}),t))},s=i;s<=o;s++)c(s);return e}(),r("a",n({href:"#",onClick:function(){d<l&&a(d+1)},style:{display:"inline-flex",justifyContent:"center",alignItems:"center",marginLeft:"0.5rem",marginRight:"0.5rem",color:"#262626",width:"1.5rem",height:"1.5rem"}},{children:r("svg",n({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 320 512",style:{width:"1.5rem",height:"1.5rem"}},{children:r("path",{d:"M310.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L242.7 256 73.4 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z"})}))}))]}))})),r("div",n({style:{gridColumn:"span 2 / span 2"}},{children:e("div",n({style:{display:"flex",justifyContent:"center",alignItems:"center",gap:"1rem"}},{children:[r("div",n({style:{flex:"none"}},{children:r("div",n({style:{fontSize:"0.75rem",lineHeight:"23px",height:"23px",display:"block",color:"#bdbdbd"}},{children:"Go to page"}))})),r("div",n({style:{flex:"1 1 0%"}},{children:r("input",{onChange:function(e){m(e.target.value)},value:p,type:"text",style:{borderWidth:"1px",borderRadius:"9999px",borderColor:h,display:"block",width:"100%",paddingLeft:"0.5rem",paddingRight:"0.5rem",height:"23px",color:"#262626",fontSize:"0.875rem",lineHeight:"1.25rem",outlineWidth:"0px"}})})),r("div",n({style:{flex:"1 1 0%"}},{children:r("button",n({type:"button",onClick:function(){p>=1&&p<=l?a(p):m(d)},style:{display:"inline-flex",justifyContent:"center",alignItems:"center",fontSize:"0.75rem",lineHeight:"1rem",height:"23px",paddingLeft:"1rem",paddingRight:"1rem",fontWeight:600,borderRadius:"9999px",color:"#ffffff",backgroundColor:h}},{children:"Go"}))}))]}))}))]}))};function d(t){var i=t.data,o=void 0===i?[]:i,d=t.columns,l=void 0===d?[]:d,a=t.loading,c=void 0!==a&&a,h=t.error,s=void 0===h?"":h,p=t.action,m=void 0!==p&&p,g=t.currentPage,f=void 0===g?1:g,u=t.limit,v=void 0===u?0:u,y=t.onRowClick,b=t.color,x=void 0===b?"#234764":b,C=t.textColor,w=void 0===C?"#fff":C;return e("table",n({style:{minWidth:"100%"}},{children:[r("thead",n({style:{backgroundColor:x}},{children:r("tr",{children:l.map((function(t,i){return r("th",n({scope:"col",style:{borderRightWidth:"1px",borderLeftWidth:"1px",borderColor:"#bdbdbd",padding:"1rem",textAlign:"center",whiteSpace:"nowrap",fontSize:"0.875rem",lineHeight:"1.25rem",color:w,fontWeight:600}},{children:e("div",n({style:{display:"flex",justifyContent:"center"}},{children:[t.label,void 0!==(null==t?void 0:t.renderHeader)&&(null==t?void 0:t.renderHeader())]}))}),i)}))})})),e("tbody",n({style:{backgroundColor:"#ffffff"}},{children:[!0!==c&&!s&&o&&(null==o?void 0:o.map((function(t,i){return r("tr",n({onClick:function(){var e;e=t,void 0!==y&&y(e)},role:m?"button":void 0},{children:l.map((function(o,d){return e("td",n({style:{borderRightWidth:"0px",borderLeftWidth:"1px",borderColor:"#bdbdbd",padding:"1rem",textAlign:"center",whiteSpace:"nowrap",lineHeight:"1.75rem",fontSize:"0.875rem",color:"#201B1C"}},{children:["index"===o.fieldId&&i+1+(f-1)*v,void 0===(null==o?void 0:o.render)&&t[o.fieldId],r("p",n({className:"text-gray-500"},{children:void 0!==(null==o?void 0:o.fieldId2)&&t[o.fieldId2]})),void 0!==(null==o?void 0:o.render)&&o.render(t),r("span",{children:void 0!==(null==o?void 0:o.fieldId3)&&t[o.fieldId3]})]}),d)}))}),i)}))),!0!==c&&!s&&!o&&r("tr",{children:r("td",n({colSpan:l.length,style:{borderRightWidth:"0px",borderLeftWidth:"1px",borderColor:"#bdbdbd",padding:"1rem",textAlign:"center",whiteSpace:"nowrap",lineHeight:"1.25rem",fontSize:"0.875rem",color:"#201B1C"}},{children:r("div",n({style:{display:"flex",flexDirection:"column",alignItems:"center"}},{children:r("span",n({style:{paddingTop:"1.5rem",paddingBottom:"1.5rem",color:"#7c7c7c"}},{children:"No Data Here"}))}))}))}),!0!==c&&s&&r("tr",{children:r("td",n({colSpan:l.length,style:{borderRightWidth:"0px",borderLeftWidth:"1px",borderColor:"#bdbdbd",padding:"1rem",textAlign:"center",whiteSpace:"nowrap",lineHeight:"1.25rem",fontSize:"0.875rem",color:"#201B1C"}},{children:s}))}),!0===c&&r("tr",{children:r("td",n({colSpan:l.length,style:{borderRightWidth:"0px",borderLeftWidth:"1px",borderColor:"#bdbdbd",padding:"1rem",textAlign:"center",whiteSpace:"nowrap",lineHeight:"1.25rem",fontSize:"0.875rem",color:"#201B1C"}},{children:"Loading..."}))})]}))]}))}var l=function(e){var t=e.svg,i=e.className,n=e.normalWidth,o=void 0===n||n;return r("div",{className:i,style:{maskImage:"url(".concat(t,")"),WebkitMaskImage:"url(".concat(t,")"),maskSize:"90%",maskRepeat:"no-repeat",WebkitMaskRepeat:"no-repeat",maskPosition:"center",height:o?"1.5rem":"",width:o?"1.5rem":""}})};export{o as Pagination,l as SvgIcon,d as Table};
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../node_modules/tslib/tslib.es6.mjs","../../src/components/Pagination/Pagination.tsx","../../src/components/Table/Table.tsx"],"sourcesContent":["/******************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\n/* global Reflect, Promise, SuppressedError, Symbol, Iterator */\n\nvar extendStatics = function(d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n};\n\nexport function __extends(d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\n\nexport var __assign = function() {\n __assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n }\n return __assign.apply(this, arguments);\n}\n\nexport function __rest(s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n}\n\nexport function __decorate(decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\n\nexport function __param(paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n}\n\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n var _, done = false;\n for (var i = decorators.length - 1; i >= 0; i--) {\n var context = {};\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\n if (kind === \"accessor\") {\n if (result === void 0) continue;\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\n if (_ = accept(result.get)) descriptor.get = _;\n if (_ = accept(result.set)) descriptor.set = _;\n if (_ = accept(result.init)) initializers.unshift(_);\n }\n else if (_ = accept(result)) {\n if (kind === \"field\") initializers.unshift(_);\n else descriptor[key] = _;\n }\n }\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\n done = true;\n};\n\nexport function __runInitializers(thisArg, initializers, value) {\n var useValue = arguments.length > 2;\n for (var i = 0; i < initializers.length; i++) {\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\n }\n return useValue ? value : void 0;\n};\n\nexport function __propKey(x) {\n return typeof x === \"symbol\" ? x : \"\".concat(x);\n};\n\nexport function __setFunctionName(f, name, prefix) {\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\n};\n\nexport function __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\n\nexport function __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\n\nexport function __generator(thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\n return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n 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;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n}\n\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n});\n\nexport function __exportStar(m, o) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\n}\n\nexport function __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\n\nexport function __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n}\n\n/** @deprecated */\nexport function __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++)\n ar = ar.concat(__read(arguments[i]));\n return ar;\n}\n\n/** @deprecated */\nexport function __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n}\n\nexport function __spreadArray(to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n}\n\nexport function __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\n\nexport function __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = Object.create((typeof AsyncIterator === \"function\" ? AsyncIterator : Object).prototype), verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n}\n\nexport function __asyncDelegator(o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\n}\n\nexport function __asyncValues(o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator], i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n}\n\nexport function __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\n return cooked;\n};\n\nvar __setModuleDefault = Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n};\n\nexport function __importStar(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n}\n\nexport function __importDefault(mod) {\n return (mod && mod.__esModule) ? mod : { default: mod };\n}\n\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n}\n\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n}\n\nexport function __classPrivateFieldIn(state, receiver) {\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\n}\n\nexport function __addDisposableResource(env, value, async) {\n if (value !== null && value !== void 0) {\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\n var dispose, inner;\n if (async) {\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\n dispose = value[Symbol.asyncDispose];\n }\n if (dispose === void 0) {\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\n dispose = value[Symbol.dispose];\n if (async) inner = dispose;\n }\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\n env.stack.push({ value: value, dispose: dispose, async: async });\n }\n else if (async) {\n env.stack.push({ async: true });\n }\n return value;\n}\n\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\n var e = new Error(message);\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\n};\n\nexport function __disposeResources(env) {\n function fail(e) {\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\n env.hasError = true;\n }\n var r, s = 0;\n function next() {\n while (r = env.stack.pop()) {\n try {\n if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);\n if (r.dispose) {\n var result = r.dispose.call(r.value);\n if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\n }\n else s |= 1;\n }\n catch (e) {\n fail(e);\n }\n }\n if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();\n if (env.hasError) throw env.error;\n }\n return next();\n}\n\nexport default {\n __extends,\n __assign,\n __rest,\n __decorate,\n __param,\n __metadata,\n __awaiter,\n __generator,\n __createBinding,\n __exportStar,\n __values,\n __read,\n __spread,\n __spreadArrays,\n __spreadArray,\n __await,\n __asyncGenerator,\n __asyncDelegator,\n __asyncValues,\n __makeTemplateObject,\n __importStar,\n __importDefault,\n __classPrivateFieldGet,\n __classPrivateFieldSet,\n __classPrivateFieldIn,\n __addDisposableResource,\n __disposeResources,\n};\n","import { useEffect, useState } from \"react\";\ninterface PaginationProps {\n currentPage: number;\n totalPages: number;\n onPageChange: (page: number) => void;\n color?: string;\n}\n\nconst Pagination: React.FC<PaginationProps> = ({\n currentPage,\n totalPages,\n onPageChange,\n color = \"#234764\",\n}) => {\n const [inputPage, setInputPage] = useState<any>(currentPage);\n\n useEffect(() => {\n setInputPage(currentPage);\n }, [currentPage]);\n\n const handleInputChange = (e: React.ChangeEvent<HTMLInputElement>): void => {\n setInputPage(e.target.value);\n };\n\n const handlePageChange = (): void => {\n if (inputPage >= 1 && inputPage <= totalPages) {\n onPageChange(inputPage);\n } else {\n setInputPage(currentPage);\n }\n };\n\n const handlePreviousPage = (): void => {\n if (currentPage > 1) {\n onPageChange(currentPage - 1);\n }\n };\n\n const handleNextPage = (): void => {\n if (currentPage < totalPages) {\n onPageChange(currentPage + 1);\n }\n };\n\n const handlePageButtonClick = (page: number): void => {\n onPageChange(page);\n };\n\n const generatePageButtons = (): React.ReactNode => {\n const buttons = [];\n const maxButtons = 7;\n const halfMaxButtons = Math.floor(maxButtons / 2);\n let start: number = Math.max(1, currentPage - halfMaxButtons);\n const end: number = Math.min(start + maxButtons - 1, totalPages);\n\n if (end - start < maxButtons - 1) {\n start = Math.max(1, end - maxButtons + 1);\n }\n\n for (let i = start; i <= end; i++) {\n buttons.push(\n <a\n key={i}\n href=\"#\"\n style={{\n backgroundColor: i === currentPage ? color : \"transparent\",\n color: i === currentPage ? \"#ffffff\" : \"#262626\",\n borderRadius: \"9999px\",\n width: \"1.5rem\",\n height: \"1.5rem\",\n marginLeft: \"0.5rem\",\n marginRight: \"0.5rem\",\n display: \"inline-flex\",\n justifyContent: \"center\",\n alignItems: \"center\",\n fontSize: \"0.75rem\",\n lineHeight: \"1rem\",\n }}\n onClick={() => {\n handlePageButtonClick(i);\n }}\n >\n {i}\n </a>\n );\n }\n\n return buttons;\n };\n\n return (\n <div\n style={{\n display: \"grid\",\n gridTemplateColumns: \"repeat(10, minmax(0, 1fr))\",\n marginTop: \"4rem\",\n gap: \"1rem\",\n }}\n >\n <div style={{ gridColumn: \"span 2 / span 2\" }} />\n <div style={{ paddingTop: \"1px\", gridColumn: \"span 6 / span 6\" }}>\n <div\n style={{\n display: \"flex\",\n justifyContent: \"center\",\n alignItems: \"center\",\n }}\n >\n <a\n href=\"#\"\n onClick={handlePreviousPage}\n style={{\n display: \"inline-flex\",\n justifyContent: \"center\",\n alignItems: \"center\",\n marginLeft: \"0.5rem\",\n marginRight: \"0.5rem\",\n color: \"#262626\",\n width: \"1.5rem\",\n height: \"1.5rem\",\n }}\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 320 512\"\n style={{ width: \"1.5rem\", height: \"1.5rem\" }}\n >\n <path d=\"M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l192 192c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L77.3 256 246.6 86.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-192 192z\" />\n </svg>\n </a>\n {generatePageButtons()}\n <a\n href=\"#\"\n onClick={handleNextPage}\n style={{\n display: \"inline-flex\",\n justifyContent: \"center\",\n alignItems: \"center\",\n marginLeft: \"0.5rem\",\n marginRight: \"0.5rem\",\n color: \"#262626\",\n width: \"1.5rem\",\n height: \"1.5rem\",\n }}\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 320 512\"\n style={{ width: \"1.5rem\", height: \"1.5rem\" }}\n >\n <path d=\"M310.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L242.7 256 73.4 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z\" />\n </svg>\n </a>\n </div>\n </div>\n <div style={{ gridColumn: \"span 2 / span 2\" }}>\n <div\n style={{\n display: \"flex\",\n justifyContent: \"center\",\n alignItems: \"center\",\n gap: \"1rem\",\n }}\n >\n <div style={{ flex: \"none\" }}>\n <div\n style={{\n fontSize: \"0.75rem\",\n lineHeight: \"23px\",\n height: \"23px\",\n display: \"block\",\n color: \"#bdbdbd\",\n }}\n >\n Go to page\n </div>\n </div>\n <div style={{ flex: \"1 1 0%\" }}>\n <input\n onChange={handleInputChange}\n value={inputPage}\n type=\"text\"\n style={{\n borderWidth: \"1px\",\n borderRadius: \"9999px\",\n borderColor: color,\n display: \"block\",\n width: \"100%\",\n paddingLeft: \"0.5rem\",\n paddingRight: \"0.5rem\",\n height: \"23px\",\n color: \"#262626\",\n fontSize: \"0.875rem\",\n lineHeight: \"1.25rem\",\n outlineWidth: \"0px\",\n }}\n />\n </div>\n <div style={{ flex: \"1 1 0%\" }}>\n <button\n type=\"button\"\n onClick={handlePageChange}\n style={{\n display: \"inline-flex\",\n justifyContent: \"center\",\n alignItems: \"center\",\n fontSize: \"0.75rem\",\n lineHeight: \"1rem\",\n height: \"23px\",\n paddingLeft: \"1rem\",\n paddingRight: \"1rem\",\n fontWeight: 600,\n borderRadius: \"9999px\",\n color: \"#ffffff\",\n backgroundColor: color,\n }}\n >\n Go\n </button>\n </div>\n </div>\n </div>\n </div>\n );\n};\n\nexport default Pagination;\n","export interface Columns<T> {\n fieldId: string;\n fieldId2?: string;\n fieldId3?: string;\n label: string | React.ReactElement;\n render?: (data?: T) => React.ReactElement | string;\n renderHeader?: () => React.ReactElement | string;\n}\n\ninterface Props<T> {\n data?: any[];\n columns: Columns<T>[];\n loading?: boolean | null;\n error?: string;\n action?: boolean;\n currentPage?: number;\n limit?: number;\n onRowClick?: (item: T) => void;\n color?: string;\n textColor?: string;\n}\n\nexport default function Table<T>({\n data = [],\n columns = [],\n loading = false,\n error = \"\",\n action = false,\n currentPage = 1,\n limit = 0,\n onRowClick,\n color = \"#234764\",\n textColor = \"#fff\",\n}: Props<T>): React.ReactElement {\n const handleRowClick = (item: T): void => {\n if (onRowClick !== undefined) {\n onRowClick(item);\n }\n };\n return (\n <table style={{ minWidth: \"100%\" }}>\n <thead style={{ backgroundColor: color }}>\n <tr>\n {columns.map((column, index) => (\n <th\n key={index}\n scope=\"col\"\n style={{\n borderRightWidth: \"1px\",\n borderLeftWidth: \"1px\",\n borderColor: \"#bdbdbd\",\n padding: \"1rem\",\n textAlign: \"center\",\n whiteSpace: \"nowrap\",\n fontSize: \"0.875rem\",\n lineHeight: \"1.25rem\",\n color: textColor,\n fontWeight: 600,\n }}\n >\n <div style={{ display: \"flex\", justifyContent: \"center\" }}>\n {column.label}\n {column?.renderHeader !== undefined && column?.renderHeader()}\n </div>\n </th>\n ))}\n </tr>\n </thead>\n <tbody style={{ backgroundColor: \"#ffffff\" }}>\n {loading !== true &&\n !error &&\n data &&\n data?.map((data, index) => (\n <tr\n key={index}\n onClick={(): void => {\n handleRowClick(data);\n }}\n role={action ? \"button\" : undefined}\n >\n {columns.map((column, row) => (\n <td\n key={row}\n style={{\n borderRightWidth: \"0px\",\n borderLeftWidth: \"1px\",\n borderColor: \"#bdbdbd\",\n padding: \"1rem\",\n textAlign: \"center\",\n whiteSpace: \"nowrap\",\n lineHeight: \"1.75rem\",\n fontSize: \"0.875rem\",\n color: \"#201B1C\",\n }}\n >\n {column.fieldId === \"index\" &&\n index + 1 + (currentPage - 1) * limit}\n {column?.render === undefined && data[column.fieldId]}\n <p className=\"text-gray-500\">\n {column?.fieldId2 !== undefined && data[column.fieldId2]}\n </p>\n {column?.render !== undefined && column.render(data)}\n <span>\n {column?.fieldId3 !== undefined && data[column.fieldId3]}\n </span>\n </td>\n ))}\n </tr>\n ))}\n {loading !== true && !error && !data && (\n <tr>\n <td\n colSpan={columns.length}\n style={{\n borderRightWidth: \"0px\",\n borderLeftWidth: \"1px\",\n borderColor: \"#bdbdbd\",\n padding: \"1rem\",\n textAlign: \"center\",\n whiteSpace: \"nowrap\",\n lineHeight: \"1.25rem\",\n fontSize: \"0.875rem\",\n color: \"#201B1C\",\n }}\n >\n <div\n style={{\n display: \"flex\",\n flexDirection: \"column\",\n alignItems: \"center\",\n }}\n >\n <span\n style={{\n paddingTop: \"1.5rem\",\n paddingBottom: \"1.5rem\",\n color: \"#7c7c7c\",\n }}\n >\n No Data Here\n </span>\n </div>\n </td>\n </tr>\n )}\n {loading !== true && error && (\n <tr>\n <td\n colSpan={columns.length}\n style={{\n borderRightWidth: \"0px\",\n borderLeftWidth: \"1px\",\n borderColor: \"#bdbdbd\",\n padding: \"1rem\",\n textAlign: \"center\",\n whiteSpace: \"nowrap\",\n lineHeight: \"1.25rem\",\n fontSize: \"0.875rem\",\n color: \"#201B1C\",\n }}\n >\n {error}\n </td>\n </tr>\n )}\n {loading === true && (\n <tr>\n <td\n colSpan={columns.length}\n style={{\n borderRightWidth: \"0px\",\n borderLeftWidth: \"1px\",\n borderColor: \"#bdbdbd\",\n padding: \"1rem\",\n textAlign: \"center\",\n whiteSpace: \"nowrap\",\n lineHeight: \"1.25rem\",\n fontSize: \"0.875rem\",\n color: \"#201B1C\",\n }}\n >\n Loading...\n </td>\n </tr>\n )}\n </tbody>\n </table>\n );\n}\n"],"names":["__assign","Object","assign","t","s","i","n","arguments","length","p","prototype","hasOwnProperty","call","apply","this","SuppressedError","Pagination","_a","currentPage","totalPages","onPageChange","_b","color","_c","useState","inputPage","setInputPage","useEffect","_jsxs","style","display","gridTemplateColumns","marginTop","gap","children","_jsx","gridColumn","paddingTop","justifyContent","alignItems","href","onClick","marginLeft","marginRight","width","height","xmlns","viewBox","d","buttons","halfMaxButtons","Math","floor","maxButtons","start","max","end","min","push","backgroundColor","borderRadius","fontSize","lineHeight","generatePageButtons","flex","onChange","e","target","value","type","borderWidth","borderColor","paddingLeft","paddingRight","outlineWidth","fontWeight","Table","data","columns","_d","loading","_e","error","_f","action","_g","_h","limit","onRowClick","_j","_k","textColor","minWidth","map","column","index","scope","borderRightWidth","borderLeftWidth","padding","textAlign","whiteSpace","label","undefined","renderHeader","item","role","row","fieldId","render","className","fieldId2","fieldId3","colSpan","flexDirection","paddingBottom"],"mappings":"kGA+BO,IAAIA,EAAW,WAQpB,OAPAA,EAAWC,OAAOC,QAAU,SAAkBC,GAC1C,IAAK,IAAIC,EAAGC,EAAI,EAAGC,EAAIC,UAAUC,OAAQH,EAAIC,EAAGD,IAE5C,IAAK,IAAII,KADTL,EAAIG,UAAUF,GACOJ,OAAOS,UAAUC,eAAeC,KAAKR,E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ACZvC,WAAY,UACZD,SAAU,WACVvC,MAAO,YACR,CAAAY,SAAA,yBASf"}
1
+ {"version":3,"file":"index.js","sources":["../../node_modules/tslib/tslib.es6.mjs","../../src/components/Pagination/Pagination.tsx","../../src/components/Table/Table.tsx","../../src/components/SvgIcon/SvgIcon.tsx"],"sourcesContent":["/******************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\n/* global Reflect, Promise, SuppressedError, Symbol, Iterator */\n\nvar extendStatics = function(d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n};\n\nexport function __extends(d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\n\nexport var __assign = function() {\n __assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n }\n return __assign.apply(this, arguments);\n}\n\nexport function __rest(s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n}\n\nexport function __decorate(decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\n\nexport function __param(paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n}\n\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n var _, done = false;\n for (var i = decorators.length - 1; i >= 0; i--) {\n var context = {};\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\n if (kind === \"accessor\") {\n if (result === void 0) continue;\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\n if (_ = accept(result.get)) descriptor.get = _;\n if (_ = accept(result.set)) descriptor.set = _;\n if (_ = accept(result.init)) initializers.unshift(_);\n }\n else if (_ = accept(result)) {\n if (kind === \"field\") initializers.unshift(_);\n else descriptor[key] = _;\n }\n }\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\n done = true;\n};\n\nexport function __runInitializers(thisArg, initializers, value) {\n var useValue = arguments.length > 2;\n for (var i = 0; i < initializers.length; i++) {\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\n }\n return useValue ? value : void 0;\n};\n\nexport function __propKey(x) {\n return typeof x === \"symbol\" ? x : \"\".concat(x);\n};\n\nexport function __setFunctionName(f, name, prefix) {\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\n};\n\nexport function __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\n\nexport function __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\n\nexport function __generator(thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\n return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n 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;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n}\n\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n});\n\nexport function __exportStar(m, o) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\n}\n\nexport function __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\n\nexport function __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n}\n\n/** @deprecated */\nexport function __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++)\n ar = ar.concat(__read(arguments[i]));\n return ar;\n}\n\n/** @deprecated */\nexport function __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n}\n\nexport function __spreadArray(to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n}\n\nexport function __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\n\nexport function __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = Object.create((typeof AsyncIterator === \"function\" ? AsyncIterator : Object).prototype), verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n}\n\nexport function __asyncDelegator(o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\n}\n\nexport function __asyncValues(o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator], i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n}\n\nexport function __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\n return cooked;\n};\n\nvar __setModuleDefault = Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n};\n\nexport function __importStar(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n}\n\nexport function __importDefault(mod) {\n return (mod && mod.__esModule) ? mod : { default: mod };\n}\n\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n}\n\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n}\n\nexport function __classPrivateFieldIn(state, receiver) {\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\n}\n\nexport function __addDisposableResource(env, value, async) {\n if (value !== null && value !== void 0) {\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\n var dispose, inner;\n if (async) {\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\n dispose = value[Symbol.asyncDispose];\n }\n if (dispose === void 0) {\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\n dispose = value[Symbol.dispose];\n if (async) inner = dispose;\n }\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\n env.stack.push({ value: value, dispose: dispose, async: async });\n }\n else if (async) {\n env.stack.push({ async: true });\n }\n return value;\n}\n\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\n var e = new Error(message);\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\n};\n\nexport function __disposeResources(env) {\n function fail(e) {\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\n env.hasError = true;\n }\n var r, s = 0;\n function next() {\n while (r = env.stack.pop()) {\n try {\n if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);\n if (r.dispose) {\n var result = r.dispose.call(r.value);\n if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\n }\n else s |= 1;\n }\n catch (e) {\n fail(e);\n }\n }\n if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();\n if (env.hasError) throw env.error;\n }\n return next();\n}\n\nexport default {\n __extends,\n __assign,\n __rest,\n __decorate,\n __param,\n __metadata,\n __awaiter,\n __generator,\n __createBinding,\n __exportStar,\n __values,\n __read,\n __spread,\n __spreadArrays,\n __spreadArray,\n __await,\n __asyncGenerator,\n __asyncDelegator,\n __asyncValues,\n __makeTemplateObject,\n __importStar,\n __importDefault,\n __classPrivateFieldGet,\n __classPrivateFieldSet,\n __classPrivateFieldIn,\n __addDisposableResource,\n __disposeResources,\n};\n","import { useEffect, useState } from \"react\";\ninterface PaginationProps {\n currentPage: number;\n totalPages: number;\n onPageChange: (page: number) => void;\n color?: string;\n}\n\nconst Pagination: React.FC<PaginationProps> = ({\n currentPage,\n totalPages,\n onPageChange,\n color = \"#234764\",\n}) => {\n const [inputPage, setInputPage] = useState<any>(currentPage);\n\n useEffect(() => {\n setInputPage(currentPage);\n }, [currentPage]);\n\n const handleInputChange = (e: React.ChangeEvent<HTMLInputElement>): void => {\n setInputPage(e.target.value);\n };\n\n const handlePageChange = (): void => {\n if (inputPage >= 1 && inputPage <= totalPages) {\n onPageChange(inputPage);\n } else {\n setInputPage(currentPage);\n }\n };\n\n const handlePreviousPage = (): void => {\n if (currentPage > 1) {\n onPageChange(currentPage - 1);\n }\n };\n\n const handleNextPage = (): void => {\n if (currentPage < totalPages) {\n onPageChange(currentPage + 1);\n }\n };\n\n const handlePageButtonClick = (page: number): void => {\n onPageChange(page);\n };\n\n const generatePageButtons = (): React.ReactNode => {\n const buttons = [];\n const maxButtons = 7;\n const halfMaxButtons = Math.floor(maxButtons / 2);\n let start: number = Math.max(1, currentPage - halfMaxButtons);\n const end: number = Math.min(start + maxButtons - 1, totalPages);\n\n if (end - start < maxButtons - 1) {\n start = Math.max(1, end - maxButtons + 1);\n }\n\n for (let i = start; i <= end; i++) {\n buttons.push(\n <a\n key={i}\n href=\"#\"\n style={{\n backgroundColor: i === currentPage ? color : \"transparent\",\n color: i === currentPage ? \"#ffffff\" : \"#262626\",\n borderRadius: \"9999px\",\n width: \"1.5rem\",\n height: \"1.5rem\",\n marginLeft: \"0.5rem\",\n marginRight: \"0.5rem\",\n display: \"inline-flex\",\n justifyContent: \"center\",\n alignItems: \"center\",\n fontSize: \"0.75rem\",\n lineHeight: \"1rem\",\n }}\n onClick={() => {\n handlePageButtonClick(i);\n }}\n >\n {i}\n </a>\n );\n }\n\n return buttons;\n };\n\n return (\n <div\n style={{\n display: \"grid\",\n gridTemplateColumns: \"repeat(10, minmax(0, 1fr))\",\n marginTop: \"4rem\",\n gap: \"1rem\",\n }}\n >\n <div style={{ gridColumn: \"span 2 / span 2\" }} />\n <div style={{ paddingTop: \"1px\", gridColumn: \"span 6 / span 6\" }}>\n <div\n style={{\n display: \"flex\",\n justifyContent: \"center\",\n alignItems: \"center\",\n }}\n >\n <a\n href=\"#\"\n onClick={handlePreviousPage}\n style={{\n display: \"inline-flex\",\n justifyContent: \"center\",\n alignItems: \"center\",\n marginLeft: \"0.5rem\",\n marginRight: \"0.5rem\",\n color: \"#262626\",\n width: \"1.5rem\",\n height: \"1.5rem\",\n }}\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 320 512\"\n style={{ width: \"1.5rem\", height: \"1.5rem\" }}\n >\n <path d=\"M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l192 192c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L77.3 256 246.6 86.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-192 192z\" />\n </svg>\n </a>\n {generatePageButtons()}\n <a\n href=\"#\"\n onClick={handleNextPage}\n style={{\n display: \"inline-flex\",\n justifyContent: \"center\",\n alignItems: \"center\",\n marginLeft: \"0.5rem\",\n marginRight: \"0.5rem\",\n color: \"#262626\",\n width: \"1.5rem\",\n height: \"1.5rem\",\n }}\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 320 512\"\n style={{ width: \"1.5rem\", height: \"1.5rem\" }}\n >\n <path d=\"M310.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L242.7 256 73.4 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z\" />\n </svg>\n </a>\n </div>\n </div>\n <div style={{ gridColumn: \"span 2 / span 2\" }}>\n <div\n style={{\n display: \"flex\",\n justifyContent: \"center\",\n alignItems: \"center\",\n gap: \"1rem\",\n }}\n >\n <div style={{ flex: \"none\" }}>\n <div\n style={{\n fontSize: \"0.75rem\",\n lineHeight: \"23px\",\n height: \"23px\",\n display: \"block\",\n color: \"#bdbdbd\",\n }}\n >\n Go to page\n </div>\n </div>\n <div style={{ flex: \"1 1 0%\" }}>\n <input\n onChange={handleInputChange}\n value={inputPage}\n type=\"text\"\n style={{\n borderWidth: \"1px\",\n borderRadius: \"9999px\",\n borderColor: color,\n display: \"block\",\n width: \"100%\",\n paddingLeft: \"0.5rem\",\n paddingRight: \"0.5rem\",\n height: \"23px\",\n color: \"#262626\",\n fontSize: \"0.875rem\",\n lineHeight: \"1.25rem\",\n outlineWidth: \"0px\",\n }}\n />\n </div>\n <div style={{ flex: \"1 1 0%\" }}>\n <button\n type=\"button\"\n onClick={handlePageChange}\n style={{\n display: \"inline-flex\",\n justifyContent: \"center\",\n alignItems: \"center\",\n fontSize: \"0.75rem\",\n lineHeight: \"1rem\",\n height: \"23px\",\n paddingLeft: \"1rem\",\n paddingRight: \"1rem\",\n fontWeight: 600,\n borderRadius: \"9999px\",\n color: \"#ffffff\",\n backgroundColor: color,\n }}\n >\n Go\n </button>\n </div>\n </div>\n </div>\n </div>\n );\n};\n\nexport default Pagination;\n","import { Columns } from \"../../types/interface\";\n\ninterface Props<T> {\n data?: any[];\n columns: Columns<T>[];\n loading?: boolean | null;\n error?: string;\n action?: boolean;\n currentPage?: number;\n limit?: number;\n onRowClick?: (item: T) => void;\n color?: string;\n textColor?: string;\n}\n\nexport default function Table<T>({\n data = [],\n columns = [],\n loading = false,\n error = \"\",\n action = false,\n currentPage = 1,\n limit = 0,\n onRowClick,\n color = \"#234764\",\n textColor = \"#fff\",\n}: Props<T>): React.ReactElement {\n const handleRowClick = (item: T): void => {\n if (onRowClick !== undefined) {\n onRowClick(item);\n }\n };\n return (\n <table style={{ minWidth: \"100%\" }}>\n <thead style={{ backgroundColor: color }}>\n <tr>\n {columns.map((column, index) => (\n <th\n key={index}\n scope=\"col\"\n style={{\n borderRightWidth: \"1px\",\n borderLeftWidth: \"1px\",\n borderColor: \"#bdbdbd\",\n padding: \"1rem\",\n textAlign: \"center\",\n whiteSpace: \"nowrap\",\n fontSize: \"0.875rem\",\n lineHeight: \"1.25rem\",\n color: textColor,\n fontWeight: 600,\n }}\n >\n <div style={{ display: \"flex\", justifyContent: \"center\" }}>\n {column.label}\n {column?.renderHeader !== undefined && column?.renderHeader()}\n </div>\n </th>\n ))}\n </tr>\n </thead>\n <tbody style={{ backgroundColor: \"#ffffff\" }}>\n {loading !== true &&\n !error &&\n data &&\n data?.map((data, index) => (\n <tr\n key={index}\n onClick={(): void => {\n handleRowClick(data);\n }}\n role={action ? \"button\" : undefined}\n >\n {columns.map((column, row) => (\n <td\n key={row}\n style={{\n borderRightWidth: \"0px\",\n borderLeftWidth: \"1px\",\n borderColor: \"#bdbdbd\",\n padding: \"1rem\",\n textAlign: \"center\",\n whiteSpace: \"nowrap\",\n lineHeight: \"1.75rem\",\n fontSize: \"0.875rem\",\n color: \"#201B1C\",\n }}\n >\n {column.fieldId === \"index\" &&\n index + 1 + (currentPage - 1) * limit}\n {column?.render === undefined && data[column.fieldId]}\n <p className=\"text-gray-500\">\n {column?.fieldId2 !== undefined && data[column.fieldId2]}\n </p>\n {column?.render !== undefined && column.render(data)}\n <span>\n {column?.fieldId3 !== undefined && data[column.fieldId3]}\n </span>\n </td>\n ))}\n </tr>\n ))}\n {loading !== true && !error && !data && (\n <tr>\n <td\n colSpan={columns.length}\n style={{\n borderRightWidth: \"0px\",\n borderLeftWidth: \"1px\",\n borderColor: \"#bdbdbd\",\n padding: \"1rem\",\n textAlign: \"center\",\n whiteSpace: \"nowrap\",\n lineHeight: \"1.25rem\",\n fontSize: \"0.875rem\",\n color: \"#201B1C\",\n }}\n >\n <div\n style={{\n display: \"flex\",\n flexDirection: \"column\",\n alignItems: \"center\",\n }}\n >\n <span\n style={{\n paddingTop: \"1.5rem\",\n paddingBottom: \"1.5rem\",\n color: \"#7c7c7c\",\n }}\n >\n No Data Here\n </span>\n </div>\n </td>\n </tr>\n )}\n {loading !== true && error && (\n <tr>\n <td\n colSpan={columns.length}\n style={{\n borderRightWidth: \"0px\",\n borderLeftWidth: \"1px\",\n borderColor: \"#bdbdbd\",\n padding: \"1rem\",\n textAlign: \"center\",\n whiteSpace: \"nowrap\",\n lineHeight: \"1.25rem\",\n fontSize: \"0.875rem\",\n color: \"#201B1C\",\n }}\n >\n {error}\n </td>\n </tr>\n )}\n {loading === true && (\n <tr>\n <td\n colSpan={columns.length}\n style={{\n borderRightWidth: \"0px\",\n borderLeftWidth: \"1px\",\n borderColor: \"#bdbdbd\",\n padding: \"1rem\",\n textAlign: \"center\",\n whiteSpace: \"nowrap\",\n lineHeight: \"1.25rem\",\n fontSize: \"0.875rem\",\n color: \"#201B1C\",\n }}\n >\n Loading...\n </td>\n </tr>\n )}\n </tbody>\n </table>\n );\n}\n","interface props {\n svg: string;\n className: string;\n normalWidth?: boolean;\n}\n\nexport const SvgIcon: React.FC<props> = ({\n svg,\n className,\n normalWidth = true,\n}) => {\n return (\n <div\n className={className}\n style={{\n maskImage: `url(${svg})`,\n WebkitMaskImage: `url(${svg})`,\n maskSize: \"90%\",\n maskRepeat: \"no-repeat\",\n WebkitMaskRepeat: \"no-repeat\",\n maskPosition: \"center\",\n height: normalWidth ? \"1.5rem\" : \"\",\n width: normalWidth ? \"1.5rem\" : \"\",\n }}\n />\n );\n};\n\nexport default SvgIcon;\n"],"names":["__assign","Object","assign","t","s","i","n","arguments","length","p","prototype","hasOwnProperty","call","apply","this","SuppressedError","Pagination","_a","currentPage","totalPages","onPageChange","_b","color","_c","useState","inputPage","setInputPage","useEffect","_jsxs","style","display","gridTemplateColumns","marginTop","gap","children","_jsx","gridColumn","paddingTop","justifyContent","alignItems","href","onClick","marginLeft","marginRight","width","height","xmlns","viewBox","d","buttons","halfMaxButtons","Math","floor","maxButtons","start","max","end","min","push","backgroundColor","borderRadius","fontSize","lineHeight","generatePageButtons","flex","onChange","e","target","value","type","borderWidth","borderColor","paddingLeft","paddingRight","outlineWidth","fontWeight","Table","data","columns","_d","loading","_e","error","_f","action","_g","_h","limit","onRowClick","_j","_k","textColor","minWidth","map","column","index","scope","borderRightWidth","borderLeftWidth","padding","textAlign","whiteSpace","label","undefined","renderHeader","item","role","row","fieldId","render","className","fieldId2","fieldId3","colSpan","flexDirection","paddingBottom","SvgIcon","svg","normalWidth","maskImage","concat","WebkitMaskImage","maskSize","maskRepeat","WebkitMaskRepeat","maskPosition"],"mappings":"kGA+BO,IAAIA,EAAW,WAQpB,OAPAA,EAAWC,OAAOC,QAAU,SAAkBC,GAC1C,IAAK,IAAIC,EAAGC,EAAI,EAAGC,EAAIC,UAAUC,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OACjBqB,MAAO,CACLoE,iBAAkB,MAClBC,gBAAiB,MACjB3B,YAAa,UACb4B,QAAS,OACTC,UAAW,SACXC,WAAY,SACZvC,WAAY,UACZD,SAAU,WACVvC,MAAO,YACR,CAAAY,SAAA,yBASf,CC/KO,IAAMkF,EAA2B,SAACnG,OACvCoG,EAAGpG,EAAAoG,IACHP,EAAS7F,EAAA6F,UACTzF,gBAAAiG,OAAc,IAAAjG,GAAIA,EAElB,OACEc,EACE,MAAA,CAAA2E,UAAWA,EACXjF,MAAO,CACL0F,UAAW,OAAOC,OAAAH,EAAM,KACxBI,gBAAiB,OAAOD,OAAAH,EAAM,KAC9BK,SAAU,MACVC,WAAY,YACZC,iBAAkB,YAClBC,aAAc,SACdhF,OAAQyE,EAAc,SAAW,GACjC1E,MAAO0E,EAAc,SAAW,KAIxC"}
package/dist/index.d.ts CHANGED
@@ -6,7 +6,7 @@ interface PaginationProps {
6
6
  }
7
7
  declare const Pagination: React.FC<PaginationProps>;
8
8
 
9
- interface Columns$1<T> {
9
+ interface Columns<T> {
10
10
  fieldId: string;
11
11
  fieldId2?: string;
12
12
  fieldId3?: string;
@@ -14,9 +14,10 @@ interface Columns$1<T> {
14
14
  render?: (data?: T) => React.ReactElement | string;
15
15
  renderHeader?: () => React.ReactElement | string;
16
16
  }
17
+
17
18
  interface Props<T> {
18
19
  data?: any[];
19
- columns: Columns$1<T>[];
20
+ columns: Columns<T>[];
20
21
  loading?: boolean | null;
21
22
  error?: string;
22
23
  action?: boolean;
@@ -28,13 +29,11 @@ interface Props<T> {
28
29
  }
29
30
  declare function Table<T>({ data, columns, loading, error, action, currentPage, limit, onRowClick, color, textColor, }: Props<T>): React.ReactElement;
30
31
 
31
- interface Columns<T> {
32
- fieldId: string;
33
- fieldId2?: string;
34
- fieldId3?: string;
35
- label: string | React.ReactElement;
36
- render?: (data?: T) => React.ReactElement | string;
37
- renderHeader?: () => React.ReactElement | string;
32
+ interface props {
33
+ svg: string;
34
+ className: string;
35
+ normalWidth?: boolean;
38
36
  }
37
+ declare const SvgIcon: React.FC<props>;
39
38
 
40
- export { Columns, Pagination, Table };
39
+ export { Columns, Pagination, SvgIcon, Table };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "quadra-component",
3
- "version": "0.0.3",
3
+ "version": "0.0.5",
4
4
  "description": "NPM package for quadra karya santosa developer",
5
5
  "scripts": {
6
6
  "rollup": "rollup -c"