@ercioko/meblotex-api 0.1.7 → 0.2.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/dist/api/Api.js +12 -12
- package/dist/api/utils/getAlert.js +1 -1
- package/dist/app_types.d.ts +1 -2
- package/dist/app_types.js +12 -12
- package/dist/components/ApiHostProvider.d.ts +3 -3
- package/dist/components/Table/DataTableWrapper.d.ts +2 -1
- package/dist/components/Table/FloatingActions.d.ts +0 -1
- package/dist/components/Table/FloatingActions.js +1 -1
- package/dist/components/Table/Spinner.js +1 -1
- package/dist/components/Table/Table.js +1 -1
- package/dist/components/Table/addIndexToObject.js +1 -1
- package/dist/components/Table/areProvidedColumnsDifferent.js +1 -1
- package/dist/components/Table/hooks/useFetchPage.js +1 -1
- package/dist/components/Table/hooks/useGetCellRenderer.d.ts +8 -1
- package/dist/components/Table/hooks/useGetCellRenderer.js +1 -1
- package/dist/components/Table/hooks/useGetColumnsWithCheckbox.js +1 -1
- package/dist/components/Table/hooks/useGetDeleteRow.js +1 -1
- package/dist/components/Table/hooks/useGetResizeColumn.d.ts +0 -1
- package/dist/components/Table/hooks/useGetResizeColumn.js +1 -1
- package/dist/components/Table/hooks/useGetRowCheckbox.js +1 -1
- package/dist/components/Table/hooks/useLoadDataSource.js +1 -1
- package/dist/components/Table/hooks/usePageSize.js +1 -2
- package/dist/components/Table/hooks/useRenderRowActions.js +1 -1
- package/dist/components/Table/hooks/useResizeColumns.js +1 -1
- package/dist/components/Table/styles.d.ts +6 -6
- package/dist/hooks/useApi.js +1 -1
- package/dist/hooks/useEndpoint.js +1 -1
- package/dist/lib/jednostkaNazwa.js +2 -2
- package/dist/utils/getWzNumber.d.ts +1 -1
- package/dist/utils/getZamowienieDokumentNumber.d.ts +1 -1
- package/package.json +16 -16
package/dist/api/Api.js
CHANGED
|
@@ -70,10 +70,10 @@ var Api = /** @class */ (function () {
|
|
|
70
70
|
this.endpoint = endpoint;
|
|
71
71
|
this.endpointUrl = "".concat(this.host).concat(this.namespace, "/").concat(this.endpoint);
|
|
72
72
|
}
|
|
73
|
-
Api.prototype.get = function (
|
|
74
|
-
|
|
75
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
73
|
+
Api.prototype.get = function () {
|
|
74
|
+
return __awaiter(this, arguments, void 0, function (opts) {
|
|
76
75
|
var headers, options, url;
|
|
76
|
+
if (opts === void 0) { opts = {}; }
|
|
77
77
|
return __generator(this, function (_a) {
|
|
78
78
|
headers = new Headers();
|
|
79
79
|
if (opts.token)
|
|
@@ -87,10 +87,10 @@ var Api = /** @class */ (function () {
|
|
|
87
87
|
});
|
|
88
88
|
});
|
|
89
89
|
};
|
|
90
|
-
Api.prototype.post = function (
|
|
91
|
-
|
|
92
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
90
|
+
Api.prototype.post = function (data_1) {
|
|
91
|
+
return __awaiter(this, arguments, void 0, function (data, opts) {
|
|
93
92
|
var headers, body, url;
|
|
93
|
+
if (opts === void 0) { opts = {}; }
|
|
94
94
|
return __generator(this, function (_a) {
|
|
95
95
|
headers = new Headers();
|
|
96
96
|
body = JSON.stringify(data);
|
|
@@ -107,10 +107,10 @@ var Api = /** @class */ (function () {
|
|
|
107
107
|
});
|
|
108
108
|
});
|
|
109
109
|
};
|
|
110
|
-
Api.prototype.put = function (
|
|
111
|
-
|
|
112
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
110
|
+
Api.prototype.put = function (id_1, data_1) {
|
|
111
|
+
return __awaiter(this, arguments, void 0, function (id, data, opts) {
|
|
113
112
|
var body, headers, url;
|
|
113
|
+
if (opts === void 0) { opts = {}; }
|
|
114
114
|
return __generator(this, function (_a) {
|
|
115
115
|
body = JSON.stringify(data);
|
|
116
116
|
headers = new Headers();
|
|
@@ -127,10 +127,10 @@ var Api = /** @class */ (function () {
|
|
|
127
127
|
});
|
|
128
128
|
});
|
|
129
129
|
};
|
|
130
|
-
Api.prototype.delete = function (
|
|
131
|
-
|
|
132
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
130
|
+
Api.prototype.delete = function (id_1) {
|
|
131
|
+
return __awaiter(this, arguments, void 0, function (id, opts) {
|
|
133
132
|
var headers, url;
|
|
133
|
+
if (opts === void 0) { opts = {}; }
|
|
134
134
|
return __generator(this, function (_a) {
|
|
135
135
|
headers = new Headers();
|
|
136
136
|
if (opts.token)
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = getAlert;
|
|
3
4
|
var error_1 = require("../error");
|
|
4
5
|
var status_1 = require("../status");
|
|
5
6
|
var severity = {
|
|
@@ -62,4 +63,3 @@ function getAlert(status) {
|
|
|
62
63
|
}
|
|
63
64
|
}
|
|
64
65
|
}
|
|
65
|
-
exports.default = getAlert;
|
package/dist/app_types.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { UzytkownikAttributes, WplataAttributes, ZamowienieDokumentAttributes, ZamowienieDokumentMagazynAttributes } from './db_types';
|
|
3
2
|
type PrefixKeys<T, Prefix extends string> = {
|
|
4
3
|
[K in keyof T as `${Prefix}.${string & K}`]: T[K];
|
|
@@ -244,7 +243,7 @@ export declare enum Jednostka {
|
|
|
244
243
|
m2old = -2
|
|
245
244
|
}
|
|
246
245
|
export declare enum RabatPrefix {
|
|
247
|
-
Brak = "N"
|
|
246
|
+
Brak = "N",// TODO
|
|
248
247
|
Narzut = "P",
|
|
249
248
|
Rabat = "M"
|
|
250
249
|
}
|
package/dist/app_types.js
CHANGED
|
@@ -5,71 +5,71 @@ var Zrodlo;
|
|
|
5
5
|
(function (Zrodlo) {
|
|
6
6
|
Zrodlo["Web"] = "M";
|
|
7
7
|
Zrodlo["Producent"] = "P";
|
|
8
|
-
})(Zrodlo
|
|
8
|
+
})(Zrodlo || (exports.Zrodlo = Zrodlo = {}));
|
|
9
9
|
var Jednostka;
|
|
10
10
|
(function (Jednostka) {
|
|
11
11
|
Jednostka[Jednostka["m2"] = 3] = "m2";
|
|
12
12
|
Jednostka[Jednostka["systemowy"] = null] = "systemowy";
|
|
13
13
|
Jednostka[Jednostka["szt"] = 1] = "szt";
|
|
14
14
|
Jednostka[Jednostka["m2old"] = -2] = "m2old";
|
|
15
|
-
})(Jednostka
|
|
15
|
+
})(Jednostka || (exports.Jednostka = Jednostka = {}));
|
|
16
16
|
var RabatPrefix;
|
|
17
17
|
(function (RabatPrefix) {
|
|
18
18
|
RabatPrefix["Brak"] = "N";
|
|
19
19
|
RabatPrefix["Narzut"] = "P";
|
|
20
20
|
RabatPrefix["Rabat"] = "M";
|
|
21
|
-
})(RabatPrefix
|
|
21
|
+
})(RabatPrefix || (exports.RabatPrefix = RabatPrefix = {}));
|
|
22
22
|
var RabatSufix;
|
|
23
23
|
(function (RabatSufix) {
|
|
24
24
|
RabatSufix["Procent"] = "%";
|
|
25
25
|
RabatSufix["Brak"] = "";
|
|
26
|
-
})(RabatSufix
|
|
26
|
+
})(RabatSufix || (exports.RabatSufix = RabatSufix = {}));
|
|
27
27
|
var BuforStatus;
|
|
28
28
|
(function (BuforStatus) {
|
|
29
29
|
BuforStatus["False"] = "F";
|
|
30
30
|
BuforStatus["New"] = "N";
|
|
31
31
|
BuforStatus["Bufor"] = "B";
|
|
32
|
-
})(BuforStatus
|
|
32
|
+
})(BuforStatus || (exports.BuforStatus = BuforStatus = {}));
|
|
33
33
|
var CechaKontrolka;
|
|
34
34
|
(function (CechaKontrolka) {
|
|
35
35
|
CechaKontrolka["PC_EDIT"] = "pcEdit ";
|
|
36
36
|
CechaKontrolka["PC_CBX"] = "pcCbx ";
|
|
37
37
|
CechaKontrolka["PC_HIDE"] = "pcHide ";
|
|
38
38
|
CechaKontrolka["PT_BOOL"] = "ptBool ";
|
|
39
|
-
})(CechaKontrolka
|
|
39
|
+
})(CechaKontrolka || (exports.CechaKontrolka = CechaKontrolka = {}));
|
|
40
40
|
var CechaTyp;
|
|
41
41
|
(function (CechaTyp) {
|
|
42
42
|
CechaTyp["PT_INT"] = "ptInt ";
|
|
43
43
|
CechaTyp["PT_TXT"] = "ptTxt ";
|
|
44
|
-
})(CechaTyp
|
|
44
|
+
})(CechaTyp || (exports.CechaTyp = CechaTyp = {}));
|
|
45
45
|
var RownanieTyp;
|
|
46
46
|
(function (RownanieTyp) {
|
|
47
47
|
RownanieTyp["Kalkulacja"] = "K";
|
|
48
|
-
})(RownanieTyp
|
|
48
|
+
})(RownanieTyp || (exports.RownanieTyp = RownanieTyp = {}));
|
|
49
49
|
var TypWplaty;
|
|
50
50
|
(function (TypWplaty) {
|
|
51
51
|
TypWplaty["Gotowka"] = "KP";
|
|
52
52
|
TypWplaty["Zaliczka"] = "ZA";
|
|
53
53
|
TypWplaty["Karta"] = "DK";
|
|
54
54
|
TypWplaty["Przelew"] = "DB";
|
|
55
|
-
})(TypWplaty
|
|
55
|
+
})(TypWplaty || (exports.TypWplaty = TypWplaty = {}));
|
|
56
56
|
var FormaPlatnosci;
|
|
57
57
|
(function (FormaPlatnosci) {
|
|
58
58
|
FormaPlatnosci["Gotowka"] = "G";
|
|
59
59
|
FormaPlatnosci["Pobranie"] = "O";
|
|
60
60
|
FormaPlatnosci["Karta"] = "K";
|
|
61
61
|
FormaPlatnosci["Przelew"] = "P";
|
|
62
|
-
})(FormaPlatnosci
|
|
62
|
+
})(FormaPlatnosci || (exports.FormaPlatnosci = FormaPlatnosci = {}));
|
|
63
63
|
var TypDokumentu;
|
|
64
64
|
(function (TypDokumentu) {
|
|
65
65
|
TypDokumentu["Faktura"] = "FA";
|
|
66
66
|
TypDokumentu["FakturaDetal"] = "DE";
|
|
67
67
|
TypDokumentu["FakturaEksport"] = "EX";
|
|
68
68
|
TypDokumentu["Paragon"] = "PA";
|
|
69
|
-
})(TypDokumentu
|
|
69
|
+
})(TypDokumentu || (exports.TypDokumentu = TypDokumentu = {}));
|
|
70
70
|
var DokumentTyp;
|
|
71
71
|
(function (DokumentTyp) {
|
|
72
72
|
DokumentTyp["WydanieZewnetrzne"] = "WZ";
|
|
73
73
|
DokumentTyp["WydanieWewnetrzne"] = "WW";
|
|
74
74
|
DokumentTyp["PrzychodWewnetrzny"] = "PW";
|
|
75
|
-
})(DokumentTyp
|
|
75
|
+
})(DokumentTyp || (exports.DokumentTyp = DokumentTyp = {}));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { FC } from 'react';
|
|
2
|
-
type Props = {
|
|
1
|
+
import { FC, PropsWithChildren } from 'react';
|
|
2
|
+
type Props = PropsWithChildren<{
|
|
3
3
|
host: string;
|
|
4
|
-
}
|
|
4
|
+
}>;
|
|
5
5
|
export declare const ApiHostProvider: FC<Props>;
|
|
6
6
|
export declare const useApiHost: () => string;
|
|
7
7
|
export {};
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare const Wrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
2
3
|
export default Wrapper;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { ActionFunction, Actions, DataRow } from '../../app_types';
|
|
3
2
|
export default function FloatingActions<DataType = DataRow>({ actionsDimensions, actionsFor, floatingButtons, actionHover, actionLeave, hide, actions, }: {
|
|
4
3
|
actionsDimensions: {
|
|
@@ -7,6 +7,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
7
7
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
8
8
|
};
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.default = FloatingActions;
|
|
10
11
|
var antd_1 = require("antd");
|
|
11
12
|
var react_1 = __importDefault(require("react"));
|
|
12
13
|
var icons_1 = require("@ant-design/icons");
|
|
@@ -28,5 +29,4 @@ function FloatingActions(_a) {
|
|
|
28
29
|
// onClick={() => deleteRow(actionsFor.id)}
|
|
29
30
|
twoToneColor: "#F5222D" })))) : undefined)));
|
|
30
31
|
}
|
|
31
|
-
exports.default = FloatingActions;
|
|
32
32
|
var templateObject_1;
|
|
@@ -7,6 +7,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
7
7
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
8
8
|
};
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.default = Spinner;
|
|
10
11
|
var config_1 = __importDefault(require("../../config"));
|
|
11
12
|
var antd_1 = require("antd");
|
|
12
13
|
var react_1 = __importDefault(require("react"));
|
|
@@ -22,5 +23,4 @@ function Spinner() {
|
|
|
22
23
|
} },
|
|
23
24
|
react_1.default.createElement(antd_1.Spin, { style: { margin: 0 } })));
|
|
24
25
|
}
|
|
25
|
-
exports.default = Spinner;
|
|
26
26
|
var templateObject_1;
|
|
@@ -116,7 +116,7 @@ function BaseTable(_a) {
|
|
|
116
116
|
hoveredRow: hoveredRow,
|
|
117
117
|
selected: typeof selected === 'object'
|
|
118
118
|
? selected === null || selected === void 0 ? void 0 : selected.id
|
|
119
|
-
: selected,
|
|
119
|
+
: selected, // TODO fix types
|
|
120
120
|
checked: checked,
|
|
121
121
|
});
|
|
122
122
|
var RowActions = (0, useRenderRowActions_1.default)({ data: data, actions: actions, deleteRow: deleteRow });
|
|
@@ -11,7 +11,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
11
11
|
return __assign.apply(this, arguments);
|
|
12
12
|
};
|
|
13
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.default = addIndexToObject;
|
|
14
15
|
function addIndexToObject(e, i) {
|
|
15
16
|
return __assign(__assign({}, e), { index: i + 1 });
|
|
16
17
|
}
|
|
17
|
-
exports.default = addIndexToObject;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = areProvidedColumnsDifferent;
|
|
3
4
|
function areProvidedColumnsDifferent(providedColumns, currentColumns) {
|
|
4
5
|
var providedKeys = providedColumns.map(function (c) { return String(c.key).toLowerCase(); });
|
|
5
6
|
var currentKeys = currentColumns.map(function (c) { return String(c.key).toLowerCase(); });
|
|
@@ -13,4 +14,3 @@ function areProvidedColumnsDifferent(providedColumns, currentColumns) {
|
|
|
13
14
|
}
|
|
14
15
|
return (JSON.stringify(providedKeysWithAdditional) !== JSON.stringify(currentKeys));
|
|
15
16
|
}
|
|
16
|
-
exports.default = areProvidedColumnsDifferent;
|
|
@@ -48,6 +48,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
48
48
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
49
49
|
};
|
|
50
50
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
51
|
+
exports.default = useFetchPage;
|
|
51
52
|
var antd_1 = require("antd");
|
|
52
53
|
var react_1 = require("react");
|
|
53
54
|
var addIndexToObject_1 = __importDefault(require("../addIndexToObject"));
|
|
@@ -120,4 +121,3 @@ function useFetchPage(_a) {
|
|
|
120
121
|
});
|
|
121
122
|
}); }, [suspend, pageSize, loadPage, filters, data, order]);
|
|
122
123
|
}
|
|
123
|
-
exports.default = useFetchPage;
|
|
@@ -14,5 +14,12 @@ type Props<DataType = DataRow> = {
|
|
|
14
14
|
selected: number | DataType;
|
|
15
15
|
checked: number[];
|
|
16
16
|
};
|
|
17
|
-
export default function useGetCellRenderer<DataType extends object>({ columns, data, actions, resizeCol, setHoveredRow, hoveredRow, selected, checked, idKey, }: Props<DataType>): ({ columnIndex, rowIndex, rowKey, style, isScrolling, isVisible }:
|
|
17
|
+
export default function useGetCellRenderer<DataType extends object>({ columns, data, actions, resizeCol, setHoveredRow, hoveredRow, selected, checked, idKey, }: Props<DataType>): ({ columnIndex, rowIndex, rowKey, style, isScrolling, isVisible }: {
|
|
18
|
+
columnIndex: any;
|
|
19
|
+
rowIndex: any;
|
|
20
|
+
rowKey: any;
|
|
21
|
+
style: any;
|
|
22
|
+
isScrolling: any;
|
|
23
|
+
isVisible: any;
|
|
24
|
+
}) => React.JSX.Element;
|
|
18
25
|
export {};
|
|
@@ -46,6 +46,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
46
46
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
47
47
|
};
|
|
48
48
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
49
|
+
exports.default = useGetCellRenderer;
|
|
49
50
|
var react_1 = __importStar(require("react"));
|
|
50
51
|
var react_draggable_1 = __importDefault(require("react-draggable"));
|
|
51
52
|
var OrderProvider_1 = require("../providers/OrderProvider");
|
|
@@ -163,4 +164,3 @@ function useGetCellRenderer(_a) {
|
|
|
163
164
|
sortByColumn,
|
|
164
165
|
]);
|
|
165
166
|
}
|
|
166
|
-
exports.default = useGetCellRenderer;
|
|
@@ -23,6 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.default = useGetColumnsWithCheckbox;
|
|
26
27
|
var antd_1 = require("antd");
|
|
27
28
|
var react_1 = __importStar(require("react"));
|
|
28
29
|
function useGetColumnsWithCheckbox(_a) {
|
|
@@ -41,7 +42,6 @@ function useGetColumnsWithCheckbox(_a) {
|
|
|
41
42
|
return updatedColumns;
|
|
42
43
|
}, [checked, data, RowCheckbox]);
|
|
43
44
|
}
|
|
44
|
-
exports.default = useGetColumnsWithCheckbox;
|
|
45
45
|
function getCheckboxColumn(_a) {
|
|
46
46
|
var allChecked = _a.allChecked, RowCheckbox = _a.RowCheckbox;
|
|
47
47
|
return {
|
|
@@ -39,6 +39,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
39
39
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
40
40
|
};
|
|
41
41
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42
|
+
exports.default = useGetDeleteRow;
|
|
42
43
|
var antd_1 = require("antd");
|
|
43
44
|
var react_1 = require("react");
|
|
44
45
|
var addIndexToObject_1 = __importDefault(require("../addIndexToObject"));
|
|
@@ -71,4 +72,3 @@ function useGetDeleteRow(_a) {
|
|
|
71
72
|
});
|
|
72
73
|
}); }, [data, onDelete, setData]);
|
|
73
74
|
}
|
|
74
|
-
exports.default = useGetDeleteRow;
|
|
@@ -11,6 +11,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
11
11
|
return __assign.apply(this, arguments);
|
|
12
12
|
};
|
|
13
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.default = useGetResizeColumn;
|
|
14
15
|
// TODO: fix resizing
|
|
15
16
|
var react_1 = require("react");
|
|
16
17
|
function useGetResizeColumn(_a) {
|
|
@@ -25,4 +26,3 @@ function useGetResizeColumn(_a) {
|
|
|
25
26
|
// setColumns(updatedColumns);
|
|
26
27
|
}, [columns, setColumns]);
|
|
27
28
|
}
|
|
28
|
-
exports.default = useGetResizeColumn;
|
|
@@ -32,6 +32,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
32
32
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
33
33
|
};
|
|
34
34
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35
|
+
exports.default = useGetRowCheckbox;
|
|
35
36
|
var antd_1 = require("antd");
|
|
36
37
|
var react_1 = __importStar(require("react"));
|
|
37
38
|
function useGetRowCheckbox(_a) {
|
|
@@ -51,4 +52,3 @@ function useGetRowCheckbox(_a) {
|
|
|
51
52
|
return react_1.default.createElement(antd_1.Checkbox, { checked: isInChecked, onChange: handleOnChange });
|
|
52
53
|
}, [checked]);
|
|
53
54
|
}
|
|
54
|
-
exports.default = useGetRowCheckbox;
|
|
@@ -3,6 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.default = useLoadDataSource;
|
|
6
7
|
var react_1 = require("react");
|
|
7
8
|
var addIndexToObject_1 = __importDefault(require("../addIndexToObject"));
|
|
8
9
|
function useLoadDataSource(_a) {
|
|
@@ -17,4 +18,3 @@ function useLoadDataSource(_a) {
|
|
|
17
18
|
}
|
|
18
19
|
}, [filters, added, dataSource]);
|
|
19
20
|
}
|
|
20
|
-
exports.default = useLoadDataSource;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.usePageSize =
|
|
3
|
+
exports.usePageSize = usePageSize;
|
|
4
4
|
var react_1 = require("react");
|
|
5
5
|
var Table_1 = require("../Table");
|
|
6
6
|
function usePageSize(_a) {
|
|
@@ -14,4 +14,3 @@ function usePageSize(_a) {
|
|
|
14
14
|
return 2;
|
|
15
15
|
}, [mainRef]);
|
|
16
16
|
}
|
|
17
|
-
exports.usePageSize = usePageSize;
|
|
@@ -30,6 +30,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
30
30
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
31
31
|
};
|
|
32
32
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
33
|
+
exports.default = useRenderRowActions;
|
|
33
34
|
var antd_1 = require("antd");
|
|
34
35
|
var react_1 = __importStar(require("react"));
|
|
35
36
|
var icons_1 = require("@ant-design/icons");
|
|
@@ -47,5 +48,4 @@ function useRenderRowActions(_a) {
|
|
|
47
48
|
react_1.default.createElement(icons_1.DeleteTwoTone, { onClick: function () { return deleteRow(data[rowIndex - 1]); }, twoToneColor: "#F5222D" }))) : undefined));
|
|
48
49
|
}, [data, actions, deleteRow]);
|
|
49
50
|
}
|
|
50
|
-
exports.default = useRenderRowActions;
|
|
51
51
|
var templateObject_1;
|
|
@@ -12,6 +12,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
12
12
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
13
|
};
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.default = useResizeColumns;
|
|
15
16
|
var react_1 = require("react");
|
|
16
17
|
var areProvidedColumnsDifferent_1 = __importDefault(require("../areProvidedColumnsDifferent"));
|
|
17
18
|
var SCROLLBAR_WIDTH = 16;
|
|
@@ -57,4 +58,3 @@ function useResizeColumns(_a) {
|
|
|
57
58
|
grid,
|
|
58
59
|
]);
|
|
59
60
|
}
|
|
60
|
-
exports.default = useResizeColumns;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export declare const DataTable: import("styled-components").
|
|
2
|
-
export declare const StyledTable: import("styled-components").
|
|
3
|
-
export declare const TableHeader: import("styled-components").
|
|
4
|
-
export declare const TableData: import("styled-components").
|
|
5
|
-
$align?:
|
|
6
|
-
}
|
|
1
|
+
export declare const DataTable: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
2
|
+
export declare const StyledTable: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
3
|
+
export declare const TableHeader: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
4
|
+
export declare const TableData: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
5
|
+
$align?: "right";
|
|
6
|
+
}>> & string;
|
package/dist/hooks/useApi.js
CHANGED
|
@@ -3,6 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.default = useApi;
|
|
6
7
|
var react_1 = require("react");
|
|
7
8
|
var createApi_1 = require("../api/createApi");
|
|
8
9
|
var Endpoint_1 = __importDefault(require("../api/Endpoint"));
|
|
@@ -39,4 +40,3 @@ function useApi(onUnauthorized) {
|
|
|
39
40
|
}, [onUnauthorized]);
|
|
40
41
|
return api;
|
|
41
42
|
}
|
|
42
|
-
exports.default = useApi;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = useEndpoint;
|
|
3
4
|
var react_1 = require("react");
|
|
4
5
|
var createApi_1 = require("../api/createApi");
|
|
5
6
|
var components_1 = require("../components");
|
|
@@ -31,4 +32,3 @@ function useEndpoint(path, onError) {
|
|
|
31
32
|
}, [path, handleErrors, host]);
|
|
32
33
|
return endpoint;
|
|
33
34
|
}
|
|
34
|
-
exports.default = useEndpoint;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { ZamowienieDokumentMagazynAttributes } from '../db_types';
|
|
2
|
-
export declare const getWZNumber: ({ numer, numer_idx, }: Pick<ZamowienieDokumentMagazynAttributes,
|
|
2
|
+
export declare const getWZNumber: ({ numer, numer_idx, }: Pick<ZamowienieDokumentMagazynAttributes, "numer_idx" | "numer">) => string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { ZamowienieDokument } from '../app_types';
|
|
2
|
-
export declare const getZamowienieDokumentNumber: (row: Pick<ZamowienieDokument,
|
|
2
|
+
export declare const getZamowienieDokumentNumber: (row: Pick<ZamowienieDokument, "typ_dokumentu" | "numer_idx" | "numer">) => string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ercioko/meblotex-api",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Shared modules for Meblotex app",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"typings": "./dist/index.d.ts",
|
|
@@ -27,30 +27,30 @@
|
|
|
27
27
|
"./dist"
|
|
28
28
|
],
|
|
29
29
|
"peerDependencies": {
|
|
30
|
-
"react": "^
|
|
31
|
-
"react-dom": "^
|
|
32
|
-
"react-redux": "^
|
|
33
|
-
"styled-components": "^
|
|
30
|
+
"react": "^18.3.1",
|
|
31
|
+
"react-dom": "^18.3.1",
|
|
32
|
+
"react-redux": "^9.1.2",
|
|
33
|
+
"styled-components": "^6.1.12"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"antd": "^
|
|
36
|
+
"antd": "^5.19.4",
|
|
37
37
|
"react-draggable": "^4.4.6",
|
|
38
|
-
"react-virtualized": "^9.22.5"
|
|
39
|
-
"typescript": "^4.9.5"
|
|
38
|
+
"react-virtualized": "^9.22.5"
|
|
40
39
|
},
|
|
41
40
|
"devDependencies": {
|
|
42
|
-
"@babel/core": "^7.
|
|
41
|
+
"@babel/core": "^7.25.2",
|
|
43
42
|
"@swc/cli": "^0.4.0",
|
|
44
|
-
"@swc/core": "^1.
|
|
45
|
-
"@types/react": "^
|
|
43
|
+
"@swc/core": "^1.7.3",
|
|
44
|
+
"@types/react": "^18.3.3",
|
|
46
45
|
"@types/styled-components": "^5.1.34",
|
|
47
|
-
"babel-loader": "^
|
|
48
|
-
"eslint": "^8.
|
|
49
|
-
"eslint-config-prettier": "^
|
|
50
|
-
"prettier": "^
|
|
46
|
+
"babel-loader": "^9.1.3",
|
|
47
|
+
"eslint": "^9.8.0",
|
|
48
|
+
"eslint-config-prettier": "^9.1.0",
|
|
49
|
+
"prettier": "^3.3.3",
|
|
51
50
|
"sequelize": "^6.37.3",
|
|
52
51
|
"ts-loader": "^9.5.1",
|
|
53
|
-
"
|
|
52
|
+
"typescript": "^5.5.4",
|
|
53
|
+
"webpack-cli": "^5.1.4"
|
|
54
54
|
},
|
|
55
55
|
"sideEffects": false,
|
|
56
56
|
"keywords": [
|