@ercioko/meblotex-api 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/dist/api/Api.d.ts +31 -0
- package/dist/api/Api.js +167 -0
- package/dist/api/Endpoint.d.ts +13 -0
- package/dist/api/Endpoint.js +125 -0
- package/dist/api/createApi.d.ts +52 -0
- package/dist/api/createApi.js +81 -0
- package/dist/api/error.d.ts +15 -0
- package/dist/api/error.js +18 -0
- package/dist/api/index.d.ts +50 -0
- package/dist/api/index.js +37 -0
- package/dist/api/status.d.ts +3 -0
- package/dist/api/status.js +6 -0
- package/dist/api/utils/getAlert.d.ts +6 -0
- package/dist/api/utils/getAlert.js +65 -0
- package/dist/api/utils/index.d.ts +1 -0
- package/dist/api/utils/index.js +8 -0
- package/dist/app_types.d.ts +608 -0
- package/dist/app_types.js +75 -0
- package/dist/components/StatusTag.d.ts +11 -0
- package/dist/components/StatusTag.js +86 -0
- package/dist/components/Table/DataTableWrapper.d.ts +2 -0
- package/dist/components/Table/DataTableWrapper.js +44 -0
- package/dist/components/Table/FloatingActions.d.ts +15 -0
- package/dist/components/Table/FloatingActions.js +32 -0
- package/dist/components/Table/Spinner.d.ts +2 -0
- package/dist/components/Table/Spinner.js +26 -0
- package/dist/components/Table/Summary.js +16 -0
- package/dist/components/Table/Table.d.ts +28 -0
- package/dist/components/Table/Table.js +330 -0
- package/dist/components/Table/addIndexToObject.d.ts +3 -0
- package/dist/components/Table/addIndexToObject.js +17 -0
- package/dist/components/Table/areProvidedColumnsDifferent.d.ts +2 -0
- package/dist/components/Table/areProvidedColumnsDifferent.js +16 -0
- package/dist/components/Table/clicked.js +11 -0
- package/dist/components/Table/displayActions.js +11 -0
- package/dist/components/Table/hooks/useFetchPage.d.ts +18 -0
- package/dist/components/Table/hooks/useFetchPage.js +123 -0
- package/dist/components/Table/hooks/useGetCellRenderer.d.ts +18 -0
- package/dist/components/Table/hooks/useGetCellRenderer.js +166 -0
- package/dist/components/Table/hooks/useGetColumnsWithCheckbox.d.ts +5 -0
- package/dist/components/Table/hooks/useGetColumnsWithCheckbox.js +53 -0
- package/dist/components/Table/hooks/useGetDeleteRow.d.ts +9 -0
- package/dist/components/Table/hooks/useGetDeleteRow.js +74 -0
- package/dist/components/Table/hooks/useGetResizeColumn.d.ts +9 -0
- package/dist/components/Table/hooks/useGetResizeColumn.js +28 -0
- package/dist/components/Table/hooks/useGetRowCheckbox.d.ts +5 -0
- package/dist/components/Table/hooks/useGetRowCheckbox.js +54 -0
- package/dist/components/Table/hooks/useLoadDataSource.d.ts +10 -0
- package/dist/components/Table/hooks/useLoadDataSource.js +20 -0
- package/dist/components/Table/hooks/usePageSize.d.ts +5 -0
- package/dist/components/Table/hooks/usePageSize.js +17 -0
- package/dist/components/Table/hooks/useRenderRowActions.d.ts +6 -0
- package/dist/components/Table/hooks/useRenderRowActions.js +51 -0
- package/dist/components/Table/hooks/useResizeColumns.d.ts +9 -0
- package/dist/components/Table/hooks/useResizeColumns.js +60 -0
- package/dist/components/Table/index.d.ts +1 -0
- package/dist/components/Table/index.js +8 -0
- package/dist/components/Table/providers/OrderProvider.d.ts +9 -0
- package/dist/components/Table/providers/OrderProvider.js +17 -0
- package/dist/components/Table/styles.d.ts +6 -0
- package/dist/components/Table/styles.js +37 -0
- package/dist/components/index.d.ts +3 -0
- package/dist/components/index.js +25 -0
- package/dist/config.d.ts +9 -0
- package/dist/config.js +12 -0
- package/dist/db_types.d.ts +208 -0
- package/dist/db_types.js +2 -0
- package/dist/hooks/index.d.ts +2 -0
- package/dist/hooks/index.js +10 -0
- package/dist/hooks/useApi.d.ts +2 -0
- package/dist/hooks/useApi.js +40 -0
- package/dist/hooks/useEndpoint.d.ts +2 -0
- package/dist/hooks/useEndpoint.js +32 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +25 -0
- package/dist/lib/index.d.ts +2 -0
- package/dist/lib/index.js +18 -0
- package/dist/lib/jednostka.d.ts +6 -0
- package/dist/lib/jednostkaNazwa.d.ts +6 -0
- package/dist/lib/jednostkaNazwa.js +9 -0
- package/dist/lib/typDokumentuNazwa.d.ts +6 -0
- package/dist/lib/typDokumentuNazwa.js +11 -0
- package/dist/lib/typ_dokument.d.ts +0 -0
- package/dist/lib/typ_dokumentu.d.ts +6 -0
- package/dist/lib/unit.d.ts +0 -0
- package/dist/src/api/Api.js +313 -0
- package/dist/src/api/Endpoint.js +364 -0
- package/dist/src/api/createApi.js +50 -0
- package/dist/src/api/error.js +15 -0
- package/dist/src/api/index.js +8 -0
- package/dist/src/api/status.js +3 -0
- package/dist/src/api/utils/getAlert.js +63 -0
- package/dist/src/api/utils/index.js +1 -0
- package/dist/src/app_types.js +72 -0
- package/dist/src/components/StatusTag.js +153 -0
- package/dist/src/components/Table/DataTableWrapper.js +115 -0
- package/dist/src/components/Table/FloatingActions.js +60 -0
- package/dist/src/components/Table/Spinner.js +40 -0
- package/dist/src/components/Table/Summary.js +16 -0
- package/dist/src/components/Table/Table.js +498 -0
- package/dist/src/components/Table/addIndexToObject.js +57 -0
- package/dist/src/components/Table/areProvidedColumnsDifferent.js +19 -0
- package/dist/src/components/Table/clicked.js +12 -0
- package/dist/src/components/Table/displayActions.js +11 -0
- package/dist/src/components/Table/hooks/useFetchPage.js +254 -0
- package/dist/src/components/Table/hooks/useGetCellRenderer.js +231 -0
- package/dist/src/components/Table/hooks/useGetColumnsWithCheckbox.js +33 -0
- package/dist/src/components/Table/hooks/useGetDeleteRow.js +181 -0
- package/dist/src/components/Table/hooks/useGetResizeColumn.js +72 -0
- package/dist/src/components/Table/hooks/useGetRowCheckbox.js +55 -0
- package/dist/src/components/Table/hooks/useLoadDataSource.js +16 -0
- package/dist/src/components/Table/hooks/usePageSize.js +15 -0
- package/dist/src/components/Table/hooks/useRenderRowActions.js +50 -0
- package/dist/src/components/Table/hooks/useResizeColumns.js +70 -0
- package/dist/src/components/Table/index.js +1 -0
- package/dist/src/components/Table/providers/OrderProvider.js +65 -0
- package/dist/src/components/Table/styles.js +66 -0
- package/dist/src/components/index.js +3 -0
- package/dist/src/config.js +10 -0
- package/dist/src/db_types.js +1 -0
- package/dist/src/hooks/index.js +2 -0
- package/dist/src/hooks/useApi.js +82 -0
- package/dist/src/hooks/useEndpoint.js +57 -0
- package/dist/src/index.js +4 -0
- package/dist/src/lib/index.js +2 -0
- package/dist/src/lib/jednostkaNazwa.js +6 -0
- package/dist/src/lib/typDokumentuNazwa.js +16 -0
- package/dist/src/utils/Query.js +73 -0
- package/dist/src/utils/getWZNumber.js +4 -0
- package/dist/src/utils/getZamowienieDokumentNumber.js +4 -0
- package/dist/src/utils/index.js +3 -0
- package/dist/utils/AlertContext.d.ts +3 -0
- package/dist/utils/AlertContext.js +3 -0
- package/dist/utils/Query.d.ts +6 -0
- package/dist/utils/Query.js +33 -0
- package/dist/utils/geNumber.d.ts +2 -0
- package/dist/utils/getDocNumber.d.ts +2 -0
- package/dist/utils/getWZNumber.js +10 -0
- package/dist/utils/getWzNumber.d.ts +2 -0
- package/dist/utils/getZamowienieDokumentNumber copy.d.ts +2 -0
- package/dist/utils/getZamowienieDokumentNumber.d.ts +2 -0
- package/dist/utils/getZamowienieDokumentNumber.js +8 -0
- package/dist/utils/index.d.ts +3 -0
- package/dist/utils/index.js +12 -0
- package/package.json +60 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
+
return cooked;
|
|
5
|
+
};
|
|
6
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
7
|
+
if (k2 === undefined) k2 = k;
|
|
8
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
9
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
10
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
11
|
+
}
|
|
12
|
+
Object.defineProperty(o, k2, desc);
|
|
13
|
+
}) : (function(o, m, k, k2) {
|
|
14
|
+
if (k2 === undefined) k2 = k;
|
|
15
|
+
o[k2] = m[k];
|
|
16
|
+
}));
|
|
17
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
18
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
19
|
+
}) : function(o, v) {
|
|
20
|
+
o["default"] = v;
|
|
21
|
+
});
|
|
22
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
23
|
+
if (mod && mod.__esModule) return mod;
|
|
24
|
+
var result = {};
|
|
25
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
26
|
+
__setModuleDefault(result, mod);
|
|
27
|
+
return result;
|
|
28
|
+
};
|
|
29
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
|
+
exports.TableData = exports.TableHeader = exports.StyledTable = exports.DataTable = void 0;
|
|
31
|
+
var styled_components_1 = __importStar(require("styled-components"));
|
|
32
|
+
exports.DataTable = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: relative;\n width: 100%;\n flex: 1;\n\n & > div {\n width: 100%;\n margin-top: 16px;\n }\n & .data-table-no-data {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n color: #262626;\n }\n & .resized {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n display: block;\n }\n & .DragHandle {\n flex: 0 0 16px;\n z-index: 2;\n cursor: col-resize;\n color: #1890ff;\n right: 0;\n position: absolute;\n }\n & .DragHandle:hover {\n background-color: rgba(0, 0, 0, 0.1);\n }\n & .DragHandleActive,\n & .DragHandleActive:hover {\n color: #1890ff;\n z-index: 3;\n }\n & .DragHandleIcon {\n flex: 0 0 12px;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n }\n\n .data-table-wrapper .table .td.table-actions div .action span {\n padding: 6px;\n border-radius: 100px;\n transition: 150ms ease-in-out;\n display: flex;\n align-items: center;\n justify-content: center;\n }\n .data-table-wrapper .table .td.table-actions div .action span:hover {\n cursor: pointer;\n background: rgba(0, 0, 0, 0.1);\n }\n & .table .td p {\n margin: 0;\n }\n & .table .td .ant-tag {\n line-height: 16.5px;\n }\n & .spinner-wrapper {\n position: absolute;\n bottom: -34px;\n left: 50%;\n }\n & .ant-spin {\n display: flex;\n justify-content: center;\n margin: 15px 0;\n }\n"], ["\n position: relative;\n width: 100%;\n flex: 1;\n\n & > div {\n width: 100%;\n margin-top: 16px;\n }\n & .data-table-no-data {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n color: #262626;\n }\n & .resized {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n display: block;\n }\n & .DragHandle {\n flex: 0 0 16px;\n z-index: 2;\n cursor: col-resize;\n color: #1890ff;\n right: 0;\n position: absolute;\n }\n & .DragHandle:hover {\n background-color: rgba(0, 0, 0, 0.1);\n }\n & .DragHandleActive,\n & .DragHandleActive:hover {\n color: #1890ff;\n z-index: 3;\n }\n & .DragHandleIcon {\n flex: 0 0 12px;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n }\n\n .data-table-wrapper .table .td.table-actions div .action span {\n padding: 6px;\n border-radius: 100px;\n transition: 150ms ease-in-out;\n display: flex;\n align-items: center;\n justify-content: center;\n }\n .data-table-wrapper .table .td.table-actions div .action span:hover {\n cursor: pointer;\n background: rgba(0, 0, 0, 0.1);\n }\n & .table .td p {\n margin: 0;\n }\n & .table .td .ant-tag {\n line-height: 16.5px;\n }\n & .spinner-wrapper {\n position: absolute;\n bottom: -34px;\n left: 50%;\n }\n & .ant-spin {\n display: flex;\n justify-content: center;\n margin: 15px 0;\n }\n"])));
|
|
33
|
+
exports.StyledTable = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n width: 100%;\n min-height: fit-content;\n background: #f5f5f5;\n\n &:focus {\n border: none;\n outline: none;\n }\n\n &:hover:not(.selected):not(:first-child):not(.summary) {\n background: #d5f0ff !important;\n }\n\n .td-light {\n background-color: white;\n }\n\n .header {\n background: #e8e8e8;\n }\n :not(:first-child) {\n height: 39px;\n }\n :nth-child(2n) {\n background: #fff;\n }\n .selected > td {\n background: #bae7ff;\n }\n .selectable:hover {\n cursor: pointer;\n }\n .summary {\n border-bottom: none;\n }\n .summary .td {\n color: #000;\n font-weight: 600;\n }\n .summary .td:not(.orphan) {\n border-bottom: 1px solid #e8e8e8;\n }\n"], ["\n width: 100%;\n min-height: fit-content;\n background: #f5f5f5;\n\n &:focus {\n border: none;\n outline: none;\n }\n\n &:hover:not(.selected):not(:first-child):not(.summary) {\n background: #d5f0ff !important;\n }\n\n .td-light {\n background-color: white;\n }\n\n .header {\n background: #e8e8e8;\n }\n :not(:first-child) {\n height: 39px;\n }\n :nth-child(2n) {\n background: #fff;\n }\n .selected > td {\n background: #bae7ff;\n }\n .selectable:hover {\n cursor: pointer;\n }\n .summary {\n border-bottom: none;\n }\n .summary .td {\n color: #000;\n font-weight: 600;\n }\n .summary .td:not(.orphan) {\n border-bottom: 1px solid #e8e8e8;\n }\n"])));
|
|
34
|
+
var tableData = (0, styled_components_1.css)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n color: #000;\n line-height: 24px;\n font-size: 14px;\n padding: 0 8px;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n\n &.checkbox-cell {\n display: flex;\n align-items: center;\n justify-content: center;\n }\n &.table-actions {\n padding-top: 0;\n padding-bottom: 0;\n }\n &.table-actions div {\n height: 100%;\n display: flex;\n align-items: center;\n }\n &.table-actions div .action {\n height: 24px;\n width: 24px;\n display: flex;\n align-items: center;\n justify-content: center;\n }\n"], ["\n color: #000;\n line-height: 24px;\n font-size: 14px;\n padding: 0 8px;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n\n &.checkbox-cell {\n display: flex;\n align-items: center;\n justify-content: center;\n }\n &.table-actions {\n padding-top: 0;\n padding-bottom: 0;\n }\n &.table-actions div {\n height: 100%;\n display: flex;\n align-items: center;\n }\n &.table-actions div .action {\n height: 24px;\n width: 24px;\n display: flex;\n align-items: center;\n justify-content: center;\n }\n"])));
|
|
35
|
+
exports.TableHeader = styled_components_1.default.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n ", ";\n border: none;\n position: sticky;\n top: 0;\n z-index: 1;\n background: #e8e8e8;\n display: flex;\n align-items: center;\n background: #e8e8e8;\n color: #262626;\n padding: 0 5px 0 0;\n font-weight: 600;\n font-size: 16px;\n height: 55px;\n\n &:hover {\n cursor: pointer;\n }\n\n & > div {\n text-overflow: ellipsis;\n overflow: hidden;\n }\n &:not(:first-child) {\n border-left: 1px solid #fff;\n }\n & > span {\n padding: 15px 6px 15px 11px;\n width: 100%;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n }\n & > span:hover,\n &.table-actions:hover {\n cursor: initial;\n }\n &.checkbox-header {\n align-items: center;\n justify-content: center;\n padding: 0;\n }\n"], ["\n ", ";\n border: none;\n position: sticky;\n top: 0;\n z-index: 1;\n background: #e8e8e8;\n display: flex;\n align-items: center;\n background: #e8e8e8;\n color: #262626;\n padding: 0 5px 0 0;\n font-weight: 600;\n font-size: 16px;\n height: 55px;\n\n &:hover {\n cursor: pointer;\n }\n\n & > div {\n text-overflow: ellipsis;\n overflow: hidden;\n }\n &:not(:first-child) {\n border-left: 1px solid #fff;\n }\n & > span {\n padding: 15px 6px 15px 11px;\n width: 100%;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n }\n & > span:hover,\n &.table-actions:hover {\n cursor: initial;\n }\n &.checkbox-header {\n align-items: center;\n justify-content: center;\n padding: 0;\n }\n"])), tableData);
|
|
36
|
+
exports.TableData = styled_components_1.default.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n ", "\n ", "\n"], ["\n ", "\n ", "\n"])), tableData, function (p) { return (p.$align ? 'text-align: ' + p.$align + ';' : ''); });
|
|
37
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
17
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
18
|
+
};
|
|
19
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
+
exports.StatusTag = exports.Table = void 0;
|
|
21
|
+
__exportStar(require("./Table"), exports);
|
|
22
|
+
var Table_1 = require("./Table");
|
|
23
|
+
Object.defineProperty(exports, "Table", { enumerable: true, get: function () { return __importDefault(Table_1).default; } });
|
|
24
|
+
var StatusTag_1 = require("./StatusTag");
|
|
25
|
+
Object.defineProperty(exports, "StatusTag", { enumerable: true, get: function () { return __importDefault(StatusTag_1).default; } });
|
package/dist/config.d.ts
ADDED
package/dist/config.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var nextHost = process.env.NEXT_PUBLIC_HOST;
|
|
4
|
+
var config = {
|
|
5
|
+
api: {
|
|
6
|
+
host: process.env.API_HOST || nextHost && "".concat(nextHost, "/api") || 'http://localhost:8443',
|
|
7
|
+
},
|
|
8
|
+
ROW_SIZE: 24,
|
|
9
|
+
ROW_SIZE_MOBILE: 48,
|
|
10
|
+
MOBILE_BREAKPOINT: 375,
|
|
11
|
+
};
|
|
12
|
+
exports.default = config;
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
import { DokumentTyp, DokumentTypDowolny, FormaPlatnosci, TypDokumentu, TypWplaty } from './app_types';
|
|
2
|
+
export interface BufferAttributes {
|
|
3
|
+
id: number;
|
|
4
|
+
date_buffer: Date;
|
|
5
|
+
date_completion: Date;
|
|
6
|
+
buffer_type: string;
|
|
7
|
+
buffer_method: string;
|
|
8
|
+
buffer_status: string;
|
|
9
|
+
foreign_number: string;
|
|
10
|
+
pieces: number;
|
|
11
|
+
meters: number;
|
|
12
|
+
sq_meters: number;
|
|
13
|
+
value: number;
|
|
14
|
+
file_path: string;
|
|
15
|
+
comments: string;
|
|
16
|
+
}
|
|
17
|
+
export interface KlientAttributes {
|
|
18
|
+
id_klient: number;
|
|
19
|
+
nazwa_skrocona: string;
|
|
20
|
+
nazwa1: string;
|
|
21
|
+
nazwa2: string;
|
|
22
|
+
nazwa3: string;
|
|
23
|
+
kraj: string;
|
|
24
|
+
miasto: string;
|
|
25
|
+
wojewodztwo: string;
|
|
26
|
+
ulica: string;
|
|
27
|
+
numer_domu: string;
|
|
28
|
+
numer_lokalu: string;
|
|
29
|
+
ulica_txt: string;
|
|
30
|
+
kod: string;
|
|
31
|
+
poczta: string;
|
|
32
|
+
nip_kraj: string;
|
|
33
|
+
nip: string;
|
|
34
|
+
vip: boolean;
|
|
35
|
+
platnik_vat: boolean;
|
|
36
|
+
regon: string;
|
|
37
|
+
pesel: string;
|
|
38
|
+
telefon1: string;
|
|
39
|
+
telefon2: string;
|
|
40
|
+
fax: string;
|
|
41
|
+
email: string;
|
|
42
|
+
www: string;
|
|
43
|
+
uwagi: string;
|
|
44
|
+
frontman: boolean;
|
|
45
|
+
frontman_login: string;
|
|
46
|
+
frontman_haslo: string;
|
|
47
|
+
frontman_data_login: Date | number;
|
|
48
|
+
frontman_data_logout: Date | number;
|
|
49
|
+
portal: boolean;
|
|
50
|
+
portal_login: string;
|
|
51
|
+
portal_haslo: string;
|
|
52
|
+
}
|
|
53
|
+
export interface UzytkownikAttributes {
|
|
54
|
+
id_uzytkownik: number;
|
|
55
|
+
login: string;
|
|
56
|
+
haslo: string;
|
|
57
|
+
imie?: string;
|
|
58
|
+
nazwisko?: string;
|
|
59
|
+
inicjaly?: string;
|
|
60
|
+
data_login?: Date | number;
|
|
61
|
+
data_logout?: Date | number;
|
|
62
|
+
czas_dodanie: Date;
|
|
63
|
+
czas_edycja?: Date;
|
|
64
|
+
}
|
|
65
|
+
export interface WplataAttributes {
|
|
66
|
+
id_wplata: number;
|
|
67
|
+
data_wplaty: Date;
|
|
68
|
+
typ_wplaty: TypWplaty;
|
|
69
|
+
numer_idx: number;
|
|
70
|
+
numer: number;
|
|
71
|
+
kwota_wplaty: number;
|
|
72
|
+
uwagi: string;
|
|
73
|
+
rozliczono: number;
|
|
74
|
+
id_klient?: number;
|
|
75
|
+
id_zamowienie_dokument?: number;
|
|
76
|
+
id_uzytkownik_dodanie?: number;
|
|
77
|
+
}
|
|
78
|
+
export interface ZamowienieDokumentAttributes {
|
|
79
|
+
id_zamowienie_dokument: number;
|
|
80
|
+
data_sprzedazy: Date;
|
|
81
|
+
data_wystawienia: Date;
|
|
82
|
+
data_platnosci: Date;
|
|
83
|
+
typ_dokumentu: TypDokumentu;
|
|
84
|
+
numer: number;
|
|
85
|
+
numer_idx: number;
|
|
86
|
+
forma_platnosci: FormaPlatnosci;
|
|
87
|
+
wartosc: number;
|
|
88
|
+
netto: number;
|
|
89
|
+
nazwa_skrocona: string;
|
|
90
|
+
nazwa1: string;
|
|
91
|
+
nazwa2: string;
|
|
92
|
+
nazwa3: string;
|
|
93
|
+
kraj: string;
|
|
94
|
+
miasto: string;
|
|
95
|
+
ulica: string;
|
|
96
|
+
numer_domu: string;
|
|
97
|
+
numer_lokalu: string;
|
|
98
|
+
ulica_txt: string;
|
|
99
|
+
kod: string;
|
|
100
|
+
nip_kraj: string;
|
|
101
|
+
nip: string;
|
|
102
|
+
id_klient?: number;
|
|
103
|
+
id_klient_nabywca?: number;
|
|
104
|
+
id_zamowienie_dokument_parent?: number;
|
|
105
|
+
id_zamowienie?: number;
|
|
106
|
+
id_uzytkownik_dodanie?: number;
|
|
107
|
+
czas_edycja?: Date;
|
|
108
|
+
}
|
|
109
|
+
export interface ZamowienieElementAttributes {
|
|
110
|
+
id_zamowienie_element: number;
|
|
111
|
+
zrodlo: string;
|
|
112
|
+
nazwa: string;
|
|
113
|
+
towar_kategoria: string;
|
|
114
|
+
sztuk: number;
|
|
115
|
+
metry: string;
|
|
116
|
+
metry_kw: string;
|
|
117
|
+
jednostka: number;
|
|
118
|
+
cena_jednostka: string;
|
|
119
|
+
cena: string;
|
|
120
|
+
podatek: number;
|
|
121
|
+
rabat_cena: number;
|
|
122
|
+
rabat_prefix: string;
|
|
123
|
+
rabat_sufix: string;
|
|
124
|
+
etykieta: boolean;
|
|
125
|
+
id_atrybut_konfig_grupa?: number;
|
|
126
|
+
id_zamowienie_element_parent?: number;
|
|
127
|
+
id_zamowienie?: number;
|
|
128
|
+
czas_dodanie?: Date;
|
|
129
|
+
czas_edycja?: Date;
|
|
130
|
+
}
|
|
131
|
+
export interface ZamowienieElementAtrybutAttributes {
|
|
132
|
+
id_zamowienie_element_atrybut: number;
|
|
133
|
+
cecha: string;
|
|
134
|
+
cecha_typ: string;
|
|
135
|
+
wartosc_opis: string;
|
|
136
|
+
wartosc: string;
|
|
137
|
+
wartosc_rownanie: number;
|
|
138
|
+
narzut_cena: number;
|
|
139
|
+
narzut_prefix: string;
|
|
140
|
+
narzut_sufix: string;
|
|
141
|
+
nazwa_zasob: string;
|
|
142
|
+
predef: boolean;
|
|
143
|
+
czas_dodanie?: Date;
|
|
144
|
+
czas_edycja?: Date;
|
|
145
|
+
}
|
|
146
|
+
export interface AtrybutKonfigGrupaAttributes {
|
|
147
|
+
id_atrybut_konfig_grupa: number;
|
|
148
|
+
data_utworzenia: Date;
|
|
149
|
+
data_zamkniecia: Date;
|
|
150
|
+
}
|
|
151
|
+
export interface ZamowienieAttributes {
|
|
152
|
+
id_zamowienie: number;
|
|
153
|
+
data_przyjecia: Date;
|
|
154
|
+
data_realizacji: Date;
|
|
155
|
+
data_status: Date;
|
|
156
|
+
zamowienie_status: string;
|
|
157
|
+
zamowienie_typ: string;
|
|
158
|
+
zamowienie_metoda: string;
|
|
159
|
+
numer: number;
|
|
160
|
+
numer_idx: number;
|
|
161
|
+
numer_obcy: string;
|
|
162
|
+
sztuk: number;
|
|
163
|
+
metry: number;
|
|
164
|
+
metry_kw: number;
|
|
165
|
+
wartosc: number;
|
|
166
|
+
paczki: number;
|
|
167
|
+
plik_sciezka: string;
|
|
168
|
+
uwagi: string;
|
|
169
|
+
portal_archiwum: boolean;
|
|
170
|
+
numer_konsumenta: string;
|
|
171
|
+
numer_txt: string;
|
|
172
|
+
id_klient?: number;
|
|
173
|
+
id_zamowienie_wydanie?: number;
|
|
174
|
+
id_zamowienie_dokument?: number;
|
|
175
|
+
}
|
|
176
|
+
export interface ZamowienieDokumentElementAttributes {
|
|
177
|
+
id_zamowienie_dokument_element: number;
|
|
178
|
+
korekta: boolean;
|
|
179
|
+
nazwa: string;
|
|
180
|
+
jednostka: number;
|
|
181
|
+
cena_jednostka: number;
|
|
182
|
+
cena_jednostka_netto: number;
|
|
183
|
+
podatek: number;
|
|
184
|
+
ilosc: number;
|
|
185
|
+
wartosc: number;
|
|
186
|
+
netto: number;
|
|
187
|
+
czas_dodanie: string;
|
|
188
|
+
czas_edycja: string;
|
|
189
|
+
id_zamowienie_dokument?: number;
|
|
190
|
+
id_uzytkownik?: number;
|
|
191
|
+
}
|
|
192
|
+
export interface ZamowienieDokumentMagazynAttributes {
|
|
193
|
+
id_zamowienie_dokument_magazyn: number;
|
|
194
|
+
data_wystawienia: Date;
|
|
195
|
+
dokument_typ: DokumentTyp | DokumentTypDowolny;
|
|
196
|
+
numer: number;
|
|
197
|
+
numer_idx: number;
|
|
198
|
+
id_zamowienie?: number;
|
|
199
|
+
id_zamowienie_dokument?: number;
|
|
200
|
+
id_uzytkownik_dodanie?: number;
|
|
201
|
+
id_uzytkownik_edycja?: number;
|
|
202
|
+
}
|
|
203
|
+
export interface ZaliczkaRozliczenieAttributes {
|
|
204
|
+
id_zaliczka_rozliczenie: number;
|
|
205
|
+
kwota_rozliczenia: number;
|
|
206
|
+
id_zamowienie_dokument?: number;
|
|
207
|
+
id_wplata?: number;
|
|
208
|
+
}
|
package/dist/db_types.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.useApi = exports.useEndpoint = void 0;
|
|
7
|
+
var useEndpoint_1 = require("./useEndpoint");
|
|
8
|
+
Object.defineProperty(exports, "useEndpoint", { enumerable: true, get: function () { return __importDefault(useEndpoint_1).default; } });
|
|
9
|
+
var useApi_1 = require("./useApi");
|
|
10
|
+
Object.defineProperty(exports, "useApi", { enumerable: true, get: function () { return __importDefault(useApi_1).default; } });
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
var react_1 = require("react");
|
|
7
|
+
var createApi_1 = require("../api/createApi");
|
|
8
|
+
var Endpoint_1 = __importDefault(require("../api/Endpoint"));
|
|
9
|
+
function useApi(onUnauthorized) {
|
|
10
|
+
if (onUnauthorized === void 0) { onUnauthorized = function () { }; }
|
|
11
|
+
var api = (0, react_1.useMemo)(function () {
|
|
12
|
+
return Object.fromEntries(Object.entries((0, createApi_1.createApi)()).map(function (_a) {
|
|
13
|
+
var key = _a[0], endpoint = _a[1].endpoint;
|
|
14
|
+
return [
|
|
15
|
+
key,
|
|
16
|
+
new Endpoint_1.default(endpoint, errorCallback),
|
|
17
|
+
];
|
|
18
|
+
}));
|
|
19
|
+
}, []);
|
|
20
|
+
var errorCallback = (0, react_1.useCallback)(function (e) {
|
|
21
|
+
var error;
|
|
22
|
+
try {
|
|
23
|
+
error = JSON.parse(e.message);
|
|
24
|
+
}
|
|
25
|
+
catch (syntaxError) {
|
|
26
|
+
error = { statusText: e.message };
|
|
27
|
+
}
|
|
28
|
+
if (error.status === 401) {
|
|
29
|
+
onUnauthorized();
|
|
30
|
+
}
|
|
31
|
+
if (error.status === 400) {
|
|
32
|
+
throw Error("".concat(error.statusText, ": ").concat(error.text));
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
throw Error(error.statusText);
|
|
36
|
+
}
|
|
37
|
+
}, [onUnauthorized]);
|
|
38
|
+
return api;
|
|
39
|
+
}
|
|
40
|
+
exports.default = useApi;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var react_1 = require("react");
|
|
4
|
+
var createApi_1 = require("../api/createApi");
|
|
5
|
+
function useEndpoint(path, onError) {
|
|
6
|
+
if (onError === void 0) { onError = function () { }; }
|
|
7
|
+
var handleErrors = (0, react_1.useCallback)(function (func) {
|
|
8
|
+
return function () {
|
|
9
|
+
var args = [];
|
|
10
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
11
|
+
args[_i] = arguments[_i];
|
|
12
|
+
}
|
|
13
|
+
try {
|
|
14
|
+
func.apply(void 0, args);
|
|
15
|
+
}
|
|
16
|
+
catch (e) {
|
|
17
|
+
var error = JSON.parse(e.message);
|
|
18
|
+
onError(error);
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
}, [onError]);
|
|
22
|
+
var endpoint = (0, react_1.useMemo)(function () {
|
|
23
|
+
var endpoint = (0, createApi_1.createApi)()[path];
|
|
24
|
+
endpoint.get = handleErrors(endpoint.get);
|
|
25
|
+
endpoint.post = handleErrors(endpoint.post);
|
|
26
|
+
endpoint.put = handleErrors(endpoint.put);
|
|
27
|
+
endpoint.delete = handleErrors(endpoint.delete);
|
|
28
|
+
return endpoint;
|
|
29
|
+
}, [path, handleErrors]);
|
|
30
|
+
return endpoint;
|
|
31
|
+
}
|
|
32
|
+
exports.default = useEndpoint;
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
17
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
18
|
+
};
|
|
19
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
+
exports.default = void 0;
|
|
21
|
+
__exportStar(require("./api"), exports);
|
|
22
|
+
var api_1 = require("./api");
|
|
23
|
+
Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(api_1).default; } });
|
|
24
|
+
__exportStar(require("./components"), exports);
|
|
25
|
+
__exportStar(require("./lib"), exports);
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./jednostkaNazwa"), exports);
|
|
18
|
+
__exportStar(require("./typDokumentuNazwa"), exports);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var _a;
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.typDokumentuNazwa = void 0;
|
|
5
|
+
var app_types_1 = require("../app_types");
|
|
6
|
+
exports.typDokumentuNazwa = (_a = {},
|
|
7
|
+
_a[app_types_1.TypDokumentu.Faktura] = 'Faktura VAT',
|
|
8
|
+
_a[app_types_1.TypDokumentu.FakturaDetal] = 'Faktura FADET',
|
|
9
|
+
_a[app_types_1.TypDokumentu.FakturaEksport] = 'Faktura Eksportowa',
|
|
10
|
+
_a[app_types_1.TypDokumentu.Paragon] = 'Paragon',
|
|
11
|
+
_a);
|
|
File without changes
|
|
File without changes
|