@stancer/stancer 1.0.0 → 1.0.2
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/CHANGELOG.md +17 -0
- package/dist/address/api-endpoint.d.ts +20 -0
- package/dist/address/api-endpoint.d.ts.map +1 -0
- package/dist/address/api-endpoint.js +28 -0
- package/dist/address/api-endpoint.js.map +1 -0
- package/dist/address/model.d.ts +35 -0
- package/dist/address/model.d.ts.map +1 -0
- package/dist/address/model.js +63 -0
- package/dist/address/model.js.map +1 -0
- package/dist/address/repository.d.ts +7 -0
- package/dist/address/repository.d.ts.map +1 -0
- package/dist/address/repository.js +14 -0
- package/dist/address/repository.js.map +1 -0
- package/dist/address/validator.d.ts +4 -0
- package/dist/address/validator.d.ts.map +1 -0
- package/dist/address/validator.js +32 -0
- package/dist/address/validator.js.map +1 -0
- package/dist/api-endpoint/abstract-api-endpoint.d.ts +46 -0
- package/dist/api-endpoint/abstract-api-endpoint.d.ts.map +1 -0
- package/dist/api-endpoint/abstract-api-endpoint.js +220 -0
- package/dist/api-endpoint/abstract-api-endpoint.js.map +1 -0
- package/dist/api-endpoint/configuration.d.ts +34 -0
- package/dist/api-endpoint/configuration.d.ts.map +1 -0
- package/dist/api-endpoint/configuration.js +99 -0
- package/dist/api-endpoint/configuration.js.map +1 -0
- package/dist/api-endpoint/http/fetch-http-client.d.ts +3 -0
- package/dist/api-endpoint/http/fetch-http-client.d.ts.map +1 -0
- package/dist/api-endpoint/http/fetch-http-client.js +28 -0
- package/dist/api-endpoint/http/fetch-http-client.js.map +1 -0
- package/dist/api-endpoint/http/http.d.ts +18 -0
- package/dist/api-endpoint/http/http.d.ts.map +1 -0
- package/dist/api-endpoint/http/http.js +47 -0
- package/dist/api-endpoint/http/http.js.map +1 -0
- package/dist/api-endpoint/http/index.d.ts +3 -0
- package/dist/api-endpoint/http/index.d.ts.map +1 -0
- package/dist/api-endpoint/http/index.js +3 -0
- package/dist/api-endpoint/http/index.js.map +1 -0
- package/dist/api-endpoint/version.d.ts +5 -0
- package/dist/api-endpoint/version.d.ts.map +1 -0
- package/dist/api-endpoint/version.js +6 -0
- package/dist/api-endpoint/version.js.map +1 -0
- package/dist/card/api-endpoint.d.ts +28 -0
- package/dist/card/api-endpoint.d.ts.map +1 -0
- package/dist/card/api-endpoint.js +37 -0
- package/dist/card/api-endpoint.js.map +1 -0
- package/dist/card/enum/funding.d.ts +3 -0
- package/dist/card/enum/funding.d.ts.map +1 -0
- package/dist/card/enum/funding.js +10 -0
- package/dist/card/enum/funding.js.map +1 -0
- package/dist/card/enum/nature.d.ts +3 -0
- package/dist/card/enum/nature.d.ts.map +1 -0
- package/dist/card/enum/nature.js +6 -0
- package/dist/card/enum/nature.js.map +1 -0
- package/dist/card/enum/network.d.ts +5 -0
- package/dist/card/enum/network.d.ts.map +1 -0
- package/dist/card/enum/network.js +12 -0
- package/dist/card/enum/network.js.map +1 -0
- package/dist/card/model.d.ts +55 -0
- package/dist/card/model.d.ts.map +1 -0
- package/dist/card/model.js +90 -0
- package/dist/card/model.js.map +1 -0
- package/dist/card/repository.d.ts +7 -0
- package/dist/card/repository.d.ts.map +1 -0
- package/dist/card/repository.js +10 -0
- package/dist/card/repository.js.map +1 -0
- package/dist/card/validator.d.ts +8 -0
- package/dist/card/validator.d.ts.map +1 -0
- package/dist/card/validator.js +71 -0
- package/dist/card/validator.js.map +1 -0
- package/dist/core/abstract-model.d.ts +51 -0
- package/dist/core/abstract-model.d.ts.map +1 -0
- package/dist/core/abstract-model.js +93 -0
- package/dist/core/abstract-model.js.map +1 -0
- package/dist/core/abstract-repository.d.ts +86 -0
- package/dist/core/abstract-repository.d.ts.map +1 -0
- package/dist/core/abstract-repository.js +97 -0
- package/dist/core/abstract-repository.js.map +1 -0
- package/dist/core/common/branded-type.d.ts +6 -0
- package/dist/core/common/branded-type.d.ts.map +1 -0
- package/dist/core/common/branded-type.js +9 -0
- package/dist/core/common/branded-type.js.map +1 -0
- package/dist/core/common/handler/date-handler.d.ts +5 -0
- package/dist/core/common/handler/date-handler.d.ts.map +1 -0
- package/dist/core/common/handler/date-handler.js +23 -0
- package/dist/core/common/handler/date-handler.js.map +1 -0
- package/dist/core/common/handler/enum-handler.d.ts +3 -0
- package/dist/core/common/handler/enum-handler.d.ts.map +1 -0
- package/dist/core/common/handler/enum-handler.js +14 -0
- package/dist/core/common/handler/enum-handler.js.map +1 -0
- package/dist/core/common/handler/handler.d.ts +24 -0
- package/dist/core/common/handler/handler.d.ts.map +1 -0
- package/dist/core/common/handler/handler.js +33 -0
- package/dist/core/common/handler/handler.js.map +1 -0
- package/dist/core/common/handler/id-handler.d.ts +4 -0
- package/dist/core/common/handler/id-handler.d.ts.map +1 -0
- package/dist/core/common/handler/id-handler.js +21 -0
- package/dist/core/common/handler/id-handler.js.map +1 -0
- package/dist/core/common/id-validator.d.ts +10 -0
- package/dist/core/common/id-validator.d.ts.map +1 -0
- package/dist/core/common/id-validator.js +17 -0
- package/dist/core/common/id-validator.js.map +1 -0
- package/dist/core/common/mutation-tracked-object.d.ts +8 -0
- package/dist/core/common/mutation-tracked-object.d.ts.map +1 -0
- package/dist/core/common/mutation-tracked-object.js +38 -0
- package/dist/core/common/mutation-tracked-object.js.map +1 -0
- package/dist/core/endpoint-interface.d.ts +38 -0
- package/dist/core/endpoint-interface.d.ts.map +1 -0
- package/dist/core/endpoint-interface.js +2 -0
- package/dist/core/endpoint-interface.js.map +1 -0
- package/dist/core/error/base-error.d.ts +3 -0
- package/dist/core/error/base-error.d.ts.map +1 -0
- package/dist/core/error/base-error.js +3 -0
- package/dist/core/error/base-error.js.map +1 -0
- package/dist/core/error/endpoint/api/api-conflict-error.d.ts +5 -0
- package/dist/core/error/endpoint/api/api-conflict-error.d.ts.map +1 -0
- package/dist/core/error/endpoint/api/api-conflict-error.js +7 -0
- package/dist/core/error/endpoint/api/api-conflict-error.js.map +1 -0
- package/dist/core/error/endpoint/api/api-error.d.ts +6 -0
- package/dist/core/error/endpoint/api/api-error.d.ts.map +1 -0
- package/dist/core/error/endpoint/api/api-error.js +9 -0
- package/dist/core/error/endpoint/api/api-error.js.map +1 -0
- package/dist/core/error/endpoint/api/api-not-found-error.d.ts +5 -0
- package/dist/core/error/endpoint/api/api-not-found-error.d.ts.map +1 -0
- package/dist/core/error/endpoint/api/api-not-found-error.js +7 -0
- package/dist/core/error/endpoint/api/api-not-found-error.js.map +1 -0
- package/dist/core/error/endpoint/api/api-unauthorized-error.d.ts +5 -0
- package/dist/core/error/endpoint/api/api-unauthorized-error.d.ts.map +1 -0
- package/dist/core/error/endpoint/api/api-unauthorized-error.js +7 -0
- package/dist/core/error/endpoint/api/api-unauthorized-error.js.map +1 -0
- package/dist/core/error/endpoint/api/api-unknown-error.d.ts +5 -0
- package/dist/core/error/endpoint/api/api-unknown-error.d.ts.map +1 -0
- package/dist/core/error/endpoint/api/api-unknown-error.js +7 -0
- package/dist/core/error/endpoint/api/api-unknown-error.js.map +1 -0
- package/dist/core/error/endpoint/api/api-validation-error.d.ts +11 -0
- package/dist/core/error/endpoint/api/api-validation-error.d.ts.map +1 -0
- package/dist/core/error/endpoint/api/api-validation-error.js +9 -0
- package/dist/core/error/endpoint/api/api-validation-error.js.map +1 -0
- package/dist/core/error/endpoint/api/index.d.ts +7 -0
- package/dist/core/error/endpoint/api/index.d.ts.map +1 -0
- package/dist/core/error/endpoint/api/index.js +7 -0
- package/dist/core/error/endpoint/api/index.js.map +1 -0
- package/dist/core/error/endpoint/route-inaccessible-error.d.ts +5 -0
- package/dist/core/error/endpoint/route-inaccessible-error.d.ts.map +1 -0
- package/dist/core/error/endpoint/route-inaccessible-error.js +8 -0
- package/dist/core/error/endpoint/route-inaccessible-error.js.map +1 -0
- package/dist/core/error/unpopulated-error.d.ts +4 -0
- package/dist/core/error/unpopulated-error.d.ts.map +1 -0
- package/dist/core/error/unpopulated-error.js +4 -0
- package/dist/core/error/unpopulated-error.js.map +1 -0
- package/dist/core/error/unsendable-error.d.ts +4 -0
- package/dist/core/error/unsendable-error.d.ts.map +1 -0
- package/dist/core/error/unsendable-error.js +4 -0
- package/dist/core/error/unsendable-error.js.map +1 -0
- package/dist/core/error/validation-error.d.ts +4 -0
- package/dist/core/error/validation-error.d.ts.map +1 -0
- package/dist/core/error/validation-error.js +4 -0
- package/dist/core/error/validation-error.js.map +1 -0
- package/dist/core/validator.d.ts +63 -0
- package/dist/core/validator.d.ts.map +1 -0
- package/dist/core/validator.js +73 -0
- package/dist/core/validator.js.map +1 -0
- package/dist/customer/api-endpoint.d.ts +21 -0
- package/dist/customer/api-endpoint.d.ts.map +1 -0
- package/dist/customer/api-endpoint.js +27 -0
- package/dist/customer/api-endpoint.js.map +1 -0
- package/dist/customer/model.d.ts +39 -0
- package/dist/customer/model.d.ts.map +1 -0
- package/dist/customer/model.js +73 -0
- package/dist/customer/model.js.map +1 -0
- package/dist/customer/repository.d.ts +7 -0
- package/dist/customer/repository.d.ts.map +1 -0
- package/dist/customer/repository.js +10 -0
- package/dist/customer/repository.js.map +1 -0
- package/dist/customer/validator.d.ts +4 -0
- package/dist/customer/validator.d.ts.map +1 -0
- package/dist/customer/validator.js +23 -0
- package/dist/customer/validator.js.map +1 -0
- package/dist/main.d.ts +2 -0
- package/dist/main.d.ts.map +1 -0
- package/dist/main.js +2 -0
- package/dist/main.js.map +1 -0
- package/dist/payment/api-endpoint.d.ts +51 -0
- package/dist/payment/api-endpoint.d.ts.map +1 -0
- package/dist/payment/api-endpoint.js +110 -0
- package/dist/payment/api-endpoint.js.map +1 -0
- package/dist/payment/enum/currency.d.ts +3 -0
- package/dist/payment/enum/currency.d.ts.map +1 -0
- package/dist/payment/enum/currency.js +13 -0
- package/dist/payment/enum/currency.js.map +1 -0
- package/dist/payment/enum/method.d.ts +3 -0
- package/dist/payment/enum/method.d.ts.map +1 -0
- package/dist/payment/enum/method.js +2 -0
- package/dist/payment/enum/method.js.map +1 -0
- package/dist/payment/enum/status.d.ts +4 -0
- package/dist/payment/enum/status.d.ts.map +1 -0
- package/dist/payment/enum/status.js +19 -0
- package/dist/payment/enum/status.js.map +1 -0
- package/dist/payment/model.d.ts +135 -0
- package/dist/payment/model.d.ts.map +1 -0
- package/dist/payment/model.js +232 -0
- package/dist/payment/model.js.map +1 -0
- package/dist/payment/repository.d.ts +17 -0
- package/dist/payment/repository.d.ts.map +1 -0
- package/dist/payment/repository.js +56 -0
- package/dist/payment/repository.js.map +1 -0
- package/dist/payment/validator.d.ts +16 -0
- package/dist/payment/validator.d.ts.map +1 -0
- package/dist/payment/validator.js +81 -0
- package/dist/payment/validator.js.map +1 -0
- package/dist/payment-intent/api-endpoint.d.ts +48 -0
- package/dist/payment-intent/api-endpoint.d.ts.map +1 -0
- package/dist/payment-intent/api-endpoint.js +94 -0
- package/dist/payment-intent/api-endpoint.js.map +1 -0
- package/dist/payment-intent/enum/status.d.ts +5 -0
- package/dist/payment-intent/enum/status.d.ts.map +1 -0
- package/dist/payment-intent/enum/status.js +20 -0
- package/dist/payment-intent/enum/status.js.map +1 -0
- package/dist/payment-intent/enum/threeds.d.ts +3 -0
- package/dist/payment-intent/enum/threeds.d.ts.map +1 -0
- package/dist/payment-intent/enum/threeds.js +2 -0
- package/dist/payment-intent/enum/threeds.js.map +1 -0
- package/dist/payment-intent/model.d.ts +90 -0
- package/dist/payment-intent/model.d.ts.map +1 -0
- package/dist/payment-intent/model.js +177 -0
- package/dist/payment-intent/model.js.map +1 -0
- package/dist/payment-intent/repository.d.ts +13 -0
- package/dist/payment-intent/repository.d.ts.map +1 -0
- package/dist/payment-intent/repository.js +65 -0
- package/dist/payment-intent/repository.js.map +1 -0
- package/dist/payment-intent/validator.d.ts +4 -0
- package/dist/payment-intent/validator.d.ts.map +1 -0
- package/dist/payment-intent/validator.js +38 -0
- package/dist/payment-intent/validator.js.map +1 -0
- package/dist/payout/model.d.ts +7 -0
- package/dist/payout/model.d.ts.map +1 -0
- package/dist/payout/model.js +6 -0
- package/dist/payout/model.js.map +1 -0
- package/dist/refund/api-endpoint.d.ts +22 -0
- package/dist/refund/api-endpoint.d.ts.map +1 -0
- package/dist/refund/api-endpoint.js +32 -0
- package/dist/refund/api-endpoint.js.map +1 -0
- package/dist/refund/enum/refund-status.d.ts +3 -0
- package/dist/refund/enum/refund-status.d.ts.map +1 -0
- package/dist/refund/enum/refund-status.js +10 -0
- package/dist/refund/enum/refund-status.js.map +1 -0
- package/dist/refund/model.d.ts +38 -0
- package/dist/refund/model.d.ts.map +1 -0
- package/dist/refund/model.js +51 -0
- package/dist/refund/model.js.map +1 -0
- package/dist/refund/repository.d.ts +7 -0
- package/dist/refund/repository.d.ts.map +1 -0
- package/dist/refund/repository.js +10 -0
- package/dist/refund/repository.js.map +1 -0
- package/dist/refund/validator.d.ts +4 -0
- package/dist/refund/validator.d.ts.map +1 -0
- package/dist/refund/validator.js +41 -0
- package/dist/refund/validator.js.map +1 -0
- package/dist/sepa/api-endpoint.d.ts +19 -0
- package/dist/sepa/api-endpoint.d.ts.map +1 -0
- package/dist/sepa/api-endpoint.js +25 -0
- package/dist/sepa/api-endpoint.js.map +1 -0
- package/dist/sepa/model.d.ts +32 -0
- package/dist/sepa/model.d.ts.map +1 -0
- package/dist/sepa/model.js +53 -0
- package/dist/sepa/model.js.map +1 -0
- package/dist/sepa/repository.d.ts +7 -0
- package/dist/sepa/repository.d.ts.map +1 -0
- package/dist/sepa/repository.js +10 -0
- package/dist/sepa/repository.js.map +1 -0
- package/dist/sepa/validator.d.ts +8 -0
- package/dist/sepa/validator.d.ts.map +1 -0
- package/dist/sepa/validator.js +47 -0
- package/dist/sepa/validator.js.map +1 -0
- package/package.json +7 -1
- package/reports/base.css +362 -0
- package/reports/block-navigation.js +75 -0
- package/reports/cobertura-coverage.xml +18 -0
- package/reports/favicon.png +0 -0
- package/reports/index.html +177 -0
- package/reports/junit.xml +25 -0
- package/reports/prettify.css +101 -0
- package/reports/prettify.js +955 -0
- package/reports/sort-arrow-sprite.png +0 -0
- package/reports/sorter.js +205 -0
- package/.editorconfig +0 -14
- package/.gitlab-ci.yml +0 -159
- package/.prettierignore +0 -3
- package/eslint.config.js +0 -14
- package/pnpm-workspace.yaml +0 -19
- package/prettier.config.js +0 -3
- package/tsconfig.json +0 -50
- package/vitest.config.ts +0 -20
|
Binary file
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
var addSorting = (function () {
|
|
3
|
+
'use strict';
|
|
4
|
+
var cols,
|
|
5
|
+
currentSort = {
|
|
6
|
+
index: 0,
|
|
7
|
+
desc: false,
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
// returns the summary table element
|
|
11
|
+
function getTable() {
|
|
12
|
+
return document.querySelector('.coverage-summary');
|
|
13
|
+
}
|
|
14
|
+
// returns the thead element of the summary table
|
|
15
|
+
function getTableHeader() {
|
|
16
|
+
return getTable().querySelector('thead tr');
|
|
17
|
+
}
|
|
18
|
+
// returns the tbody element of the summary table
|
|
19
|
+
function getTableBody() {
|
|
20
|
+
return getTable().querySelector('tbody');
|
|
21
|
+
}
|
|
22
|
+
// returns the th element for nth column
|
|
23
|
+
function getNthColumn(n) {
|
|
24
|
+
return getTableHeader().querySelectorAll('th')[n];
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
function onFilterInput() {
|
|
28
|
+
const searchValue = document.getElementById('fileSearch').value;
|
|
29
|
+
const rows = document.getElementsByTagName('tbody')[0].children;
|
|
30
|
+
|
|
31
|
+
// Try to create a RegExp from the searchValue. If it fails (invalid regex),
|
|
32
|
+
// it will be treated as a plain text search
|
|
33
|
+
let searchRegex;
|
|
34
|
+
try {
|
|
35
|
+
searchRegex = new RegExp(searchValue, 'i'); // 'i' for case-insensitive
|
|
36
|
+
} catch (error) {
|
|
37
|
+
searchRegex = null;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
for (let i = 0; i < rows.length; i++) {
|
|
41
|
+
const row = rows[i];
|
|
42
|
+
let isMatch = false;
|
|
43
|
+
|
|
44
|
+
if (searchRegex) {
|
|
45
|
+
// If a valid regex was created, use it for matching
|
|
46
|
+
isMatch = searchRegex.test(row.textContent);
|
|
47
|
+
} else {
|
|
48
|
+
// Otherwise, fall back to the original plain text search
|
|
49
|
+
isMatch = row.textContent.toLowerCase().includes(searchValue.toLowerCase());
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
row.style.display = isMatch ? '' : 'none';
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// loads the search box
|
|
57
|
+
function addSearchBox() {
|
|
58
|
+
var template = document.getElementById('filterTemplate');
|
|
59
|
+
var templateClone = template.content.cloneNode(true);
|
|
60
|
+
templateClone.getElementById('fileSearch').oninput = onFilterInput;
|
|
61
|
+
template.parentElement.appendChild(templateClone);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
// loads all columns
|
|
65
|
+
function loadColumns() {
|
|
66
|
+
var colNodes = getTableHeader().querySelectorAll('th'),
|
|
67
|
+
colNode,
|
|
68
|
+
cols = [],
|
|
69
|
+
col,
|
|
70
|
+
i;
|
|
71
|
+
|
|
72
|
+
for (i = 0; i < colNodes.length; i += 1) {
|
|
73
|
+
colNode = colNodes[i];
|
|
74
|
+
col = {
|
|
75
|
+
key: colNode.getAttribute('data-col'),
|
|
76
|
+
sortable: !colNode.getAttribute('data-nosort'),
|
|
77
|
+
type: colNode.getAttribute('data-type') || 'string',
|
|
78
|
+
};
|
|
79
|
+
cols.push(col);
|
|
80
|
+
if (col.sortable) {
|
|
81
|
+
col.defaultDescSort = col.type === 'number';
|
|
82
|
+
colNode.innerHTML = colNode.innerHTML + '<span class="sorter"></span>';
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
return cols;
|
|
86
|
+
}
|
|
87
|
+
// attaches a data attribute to every tr element with an object
|
|
88
|
+
// of data values keyed by column name
|
|
89
|
+
function loadRowData(tableRow) {
|
|
90
|
+
var tableCols = tableRow.querySelectorAll('td'),
|
|
91
|
+
colNode,
|
|
92
|
+
col,
|
|
93
|
+
data = {},
|
|
94
|
+
i,
|
|
95
|
+
val;
|
|
96
|
+
for (i = 0; i < tableCols.length; i += 1) {
|
|
97
|
+
colNode = tableCols[i];
|
|
98
|
+
col = cols[i];
|
|
99
|
+
val = colNode.getAttribute('data-value');
|
|
100
|
+
if (col.type === 'number') {
|
|
101
|
+
val = Number(val);
|
|
102
|
+
}
|
|
103
|
+
data[col.key] = val;
|
|
104
|
+
}
|
|
105
|
+
return data;
|
|
106
|
+
}
|
|
107
|
+
// loads all row data
|
|
108
|
+
function loadData() {
|
|
109
|
+
var rows = getTableBody().querySelectorAll('tr'),
|
|
110
|
+
i;
|
|
111
|
+
|
|
112
|
+
for (i = 0; i < rows.length; i += 1) {
|
|
113
|
+
rows[i].data = loadRowData(rows[i]);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
// sorts the table using the data for the ith column
|
|
117
|
+
function sortByIndex(index, desc) {
|
|
118
|
+
var key = cols[index].key,
|
|
119
|
+
sorter = function (a, b) {
|
|
120
|
+
a = a.data[key];
|
|
121
|
+
b = b.data[key];
|
|
122
|
+
return a < b ? -1 : a > b ? 1 : 0;
|
|
123
|
+
},
|
|
124
|
+
finalSorter = sorter,
|
|
125
|
+
tableBody = document.querySelector('.coverage-summary tbody'),
|
|
126
|
+
rowNodes = tableBody.querySelectorAll('tr'),
|
|
127
|
+
rows = [],
|
|
128
|
+
i;
|
|
129
|
+
|
|
130
|
+
if (desc) {
|
|
131
|
+
finalSorter = function (a, b) {
|
|
132
|
+
return -1 * sorter(a, b);
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
for (i = 0; i < rowNodes.length; i += 1) {
|
|
137
|
+
rows.push(rowNodes[i]);
|
|
138
|
+
tableBody.removeChild(rowNodes[i]);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
rows.sort(finalSorter);
|
|
142
|
+
|
|
143
|
+
for (i = 0; i < rows.length; i += 1) {
|
|
144
|
+
tableBody.appendChild(rows[i]);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
// removes sort indicators for current column being sorted
|
|
148
|
+
function removeSortIndicators() {
|
|
149
|
+
var col = getNthColumn(currentSort.index),
|
|
150
|
+
cls = col.className;
|
|
151
|
+
|
|
152
|
+
cls = cls.replace(/ sorted$/, '').replace(/ sorted-desc$/, '');
|
|
153
|
+
col.className = cls;
|
|
154
|
+
}
|
|
155
|
+
// adds sort indicators for current column being sorted
|
|
156
|
+
function addSortIndicators() {
|
|
157
|
+
getNthColumn(currentSort.index).className += currentSort.desc ? ' sorted-desc' : ' sorted';
|
|
158
|
+
}
|
|
159
|
+
// adds event listeners for all sorter widgets
|
|
160
|
+
function enableUI() {
|
|
161
|
+
var i,
|
|
162
|
+
el,
|
|
163
|
+
ithSorter = function ithSorter(i) {
|
|
164
|
+
var col = cols[i];
|
|
165
|
+
|
|
166
|
+
return function () {
|
|
167
|
+
var desc = col.defaultDescSort;
|
|
168
|
+
|
|
169
|
+
if (currentSort.index === i) {
|
|
170
|
+
desc = !currentSort.desc;
|
|
171
|
+
}
|
|
172
|
+
sortByIndex(i, desc);
|
|
173
|
+
removeSortIndicators();
|
|
174
|
+
currentSort.index = i;
|
|
175
|
+
currentSort.desc = desc;
|
|
176
|
+
addSortIndicators();
|
|
177
|
+
};
|
|
178
|
+
};
|
|
179
|
+
for (i = 0; i < cols.length; i += 1) {
|
|
180
|
+
if (cols[i].sortable) {
|
|
181
|
+
// add the click event handler on the th so users
|
|
182
|
+
// dont have to click on those tiny arrows
|
|
183
|
+
el = getNthColumn(i).querySelector('.sorter').parentElement;
|
|
184
|
+
if (el.addEventListener) {
|
|
185
|
+
el.addEventListener('click', ithSorter(i));
|
|
186
|
+
} else {
|
|
187
|
+
el.attachEvent('onclick', ithSorter(i));
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
// adds sorting functionality to the UI
|
|
193
|
+
return function () {
|
|
194
|
+
if (!getTable()) {
|
|
195
|
+
return;
|
|
196
|
+
}
|
|
197
|
+
cols = loadColumns();
|
|
198
|
+
loadData();
|
|
199
|
+
addSearchBox();
|
|
200
|
+
addSortIndicators();
|
|
201
|
+
enableUI();
|
|
202
|
+
};
|
|
203
|
+
})();
|
|
204
|
+
|
|
205
|
+
window.addEventListener('load', addSorting);
|
package/.editorconfig
DELETED
package/.gitlab-ci.yml
DELETED
|
@@ -1,159 +0,0 @@
|
|
|
1
|
-
spec:
|
|
2
|
-
inputs:
|
|
3
|
-
nodeVersion:
|
|
4
|
-
default: 22
|
|
5
|
-
description: Node version.
|
|
6
|
-
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
.cache: &cache
|
|
10
|
-
key:
|
|
11
|
-
files:
|
|
12
|
-
- pnpm-lock.yaml
|
|
13
|
-
paths:
|
|
14
|
-
- node_modules/.bin
|
|
15
|
-
- node_modules/.cache/pnpm
|
|
16
|
-
- node_modules/.pnpm
|
|
17
|
-
- node_modules/@**
|
|
18
|
-
- node_modules/[a-z]**
|
|
19
|
-
- node_modules/.modules.yaml
|
|
20
|
-
unprotect: true
|
|
21
|
-
when: always
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
.base:
|
|
25
|
-
image: wearestancer/node:$[[ inputs.nodeVersion ]]
|
|
26
|
-
|
|
27
|
-
before_script:
|
|
28
|
-
- section_start --collapsed node_install "Package install"
|
|
29
|
-
- echo "node $(node --version)"
|
|
30
|
-
- echo "pnpm $(pnpm --version)"
|
|
31
|
-
- pnpm config set store-dir node_modules/.cache/pnpm
|
|
32
|
-
- pnpm install --frozen-lockfile --prefer-offline
|
|
33
|
-
- section_end node_install
|
|
34
|
-
|
|
35
|
-
cache:
|
|
36
|
-
- <<: *cache
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
stages:
|
|
40
|
-
- test
|
|
41
|
-
- build
|
|
42
|
-
- deploy
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
workflow:
|
|
46
|
-
auto_cancel:
|
|
47
|
-
on_job_failure: none
|
|
48
|
-
on_new_commit: interruptible
|
|
49
|
-
rules:
|
|
50
|
-
- if: $CI_COMMIT_REF_PROTECTED == "true"
|
|
51
|
-
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
|
|
52
|
-
- if: $CI_PIPELINE_SOURCE == "web"
|
|
53
|
-
- if: "$CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS"
|
|
54
|
-
when: never
|
|
55
|
-
- when: always
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
variables:
|
|
59
|
-
FF_SCRIPT_SECTIONS: true
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
ESLint:
|
|
63
|
-
extends:
|
|
64
|
-
- .base
|
|
65
|
-
|
|
66
|
-
stage: test
|
|
67
|
-
|
|
68
|
-
script:
|
|
69
|
-
- pnpm exec eslint --cache --cache-location 'node_modules/.cache/eslint' "**/*.{js,ts,vue}" || true
|
|
70
|
-
- pnpm exec eslint --cache --cache-location 'node_modules/.cache/eslint' --max-warnings 0 --format junit "**/*.{js,ts,vue}" > junit.xml
|
|
71
|
-
|
|
72
|
-
cache:
|
|
73
|
-
- <<: *cache
|
|
74
|
-
- key: "${CI_COMMIT_REF_SLUG}-eslint"
|
|
75
|
-
fallback_keys:
|
|
76
|
-
- "${CI_DEFAULT_BRANCH}-eslint"
|
|
77
|
-
paths:
|
|
78
|
-
- node_modules/.cache/eslint
|
|
79
|
-
unprotect: true
|
|
80
|
-
when: always
|
|
81
|
-
|
|
82
|
-
artifacts:
|
|
83
|
-
reports:
|
|
84
|
-
junit:
|
|
85
|
-
- junit.xml
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
Build Node package:
|
|
89
|
-
extends:
|
|
90
|
-
- .base
|
|
91
|
-
|
|
92
|
-
stage: build
|
|
93
|
-
|
|
94
|
-
script:
|
|
95
|
-
- section_start publish "Publish"
|
|
96
|
-
- pnpm publish --dry-run --no-git-check --report-summary
|
|
97
|
-
- section_end publish
|
|
98
|
-
|
|
99
|
-
rules:
|
|
100
|
-
- if: "$CI_COMMIT_TAG"
|
|
101
|
-
when: never
|
|
102
|
-
- when: on_success
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
Prettier check:
|
|
106
|
-
extends:
|
|
107
|
-
- .base
|
|
108
|
-
|
|
109
|
-
stage: test
|
|
110
|
-
|
|
111
|
-
script:
|
|
112
|
-
- section_start --collapsed prettier "Prettier rewrite files"
|
|
113
|
-
- pnpm exec prettier --cache-location node_modules/.cache/prettier --write . || true
|
|
114
|
-
- section_end prettier
|
|
115
|
-
|
|
116
|
-
- if [[ -f .npmrc ]]; then git restore .npmrc; fi
|
|
117
|
-
- git diff
|
|
118
|
-
- if [ -n "$(git status --untracked-files=no --porcelain)" ]; then exit 1; fi
|
|
119
|
-
|
|
120
|
-
cache:
|
|
121
|
-
- <<: *cache
|
|
122
|
-
- key: "${CI_COMMIT_REF_SLUG}-prettier"
|
|
123
|
-
fallback_keys:
|
|
124
|
-
- "${CI_DEFAULT_BRANCH}-prettier"
|
|
125
|
-
paths:
|
|
126
|
-
- node_modules/.cache/prettier
|
|
127
|
-
unprotect: true
|
|
128
|
-
when: always
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
Type check:
|
|
132
|
-
extends:
|
|
133
|
-
- .base
|
|
134
|
-
|
|
135
|
-
stage: test
|
|
136
|
-
|
|
137
|
-
script:
|
|
138
|
-
- pnpm exec tsc
|
|
139
|
-
- pnpm exec tsc --noEmit
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
Vitest:
|
|
143
|
-
extends:
|
|
144
|
-
- .base
|
|
145
|
-
|
|
146
|
-
stage: test
|
|
147
|
-
|
|
148
|
-
script:
|
|
149
|
-
- pnpm exec vitest --reporter=verbose --reporter=junit --outputFile.junit=reports/junit.xml
|
|
150
|
-
|
|
151
|
-
coverage: "/All\\sfiles.*?\\s+(\\d+.\\d+)/"
|
|
152
|
-
|
|
153
|
-
artifacts:
|
|
154
|
-
reports:
|
|
155
|
-
coverage_report:
|
|
156
|
-
coverage_format: cobertura
|
|
157
|
-
path: reports/cobertura-coverage.xml
|
|
158
|
-
junit:
|
|
159
|
-
- reports/junit.xml
|
package/.prettierignore
DELETED
package/eslint.config.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import js from '@eslint/js';
|
|
2
|
-
import { defineConfig } from 'eslint/config';
|
|
3
|
-
import globals from 'globals';
|
|
4
|
-
import tseslint from 'typescript-eslint';
|
|
5
|
-
|
|
6
|
-
export default defineConfig([
|
|
7
|
-
{
|
|
8
|
-
files: ['**/*.{js,mjs,cjs,ts,mts,cts}'],
|
|
9
|
-
plugins: { js },
|
|
10
|
-
extends: ['js/recommended'],
|
|
11
|
-
languageOptions: { globals: globals.node },
|
|
12
|
-
},
|
|
13
|
-
tseslint.configs.recommended,
|
|
14
|
-
]);
|
package/pnpm-workspace.yaml
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
catalogs:
|
|
2
|
-
eslint:
|
|
3
|
-
"@eslint/js": ^10.0.0
|
|
4
|
-
eslint: ^10.0.0
|
|
5
|
-
eslint-formatter-junit: ^9.0.0
|
|
6
|
-
globals: ^17.0.0
|
|
7
|
-
typescript-eslint: ^8.0.0
|
|
8
|
-
|
|
9
|
-
prettier:
|
|
10
|
-
"@stancer/prettier": ^3.0.0
|
|
11
|
-
prettier: ^3.0.0
|
|
12
|
-
|
|
13
|
-
vitest:
|
|
14
|
-
"@vitest/coverage-v8": ^4.0.0
|
|
15
|
-
vitest: ^4.0.0
|
|
16
|
-
|
|
17
|
-
lockfileIncludeTarballUrl: true
|
|
18
|
-
|
|
19
|
-
minimumReleaseAge: 10080 # 7days
|
package/prettier.config.js
DELETED
package/tsconfig.json
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"declaration": true,
|
|
4
|
-
"declarationMap": true,
|
|
5
|
-
"esModuleInterop": true,
|
|
6
|
-
"exactOptionalPropertyTypes": true,
|
|
7
|
-
"isolatedModules": true,
|
|
8
|
-
"lib": [
|
|
9
|
-
"ESNext"
|
|
10
|
-
],
|
|
11
|
-
"module": "NodeNext",
|
|
12
|
-
"moduleDetection": "force",
|
|
13
|
-
"noFallthroughCasesInSwitch": true,
|
|
14
|
-
"noImplicitOverride": true,
|
|
15
|
-
"noImplicitReturns": true,
|
|
16
|
-
"noPropertyAccessFromIndexSignature": true,
|
|
17
|
-
"noUncheckedIndexedAccess": true,
|
|
18
|
-
"noUncheckedSideEffectImports": true,
|
|
19
|
-
"noUnusedLocals": true,
|
|
20
|
-
"noUnusedParameters": true,
|
|
21
|
-
"outDir": "./dist",
|
|
22
|
-
"paths": {
|
|
23
|
-
"#api/*": [
|
|
24
|
-
"./src/api-endpoint/*"
|
|
25
|
-
],
|
|
26
|
-
"#error/*": [
|
|
27
|
-
"./src/core/error/*"
|
|
28
|
-
],
|
|
29
|
-
"#core/*": [
|
|
30
|
-
"./src/core/*"
|
|
31
|
-
],
|
|
32
|
-
"#test/*": [
|
|
33
|
-
"./test/*"
|
|
34
|
-
]
|
|
35
|
-
},
|
|
36
|
-
"resolveJsonModule": true,
|
|
37
|
-
"rootDir": "./src",
|
|
38
|
-
"skipLibCheck": true,
|
|
39
|
-
"sourceMap": true,
|
|
40
|
-
"strict": true,
|
|
41
|
-
"target": "ESNext",
|
|
42
|
-
"types": [
|
|
43
|
-
"node"
|
|
44
|
-
],
|
|
45
|
-
"verbatimModuleSyntax": true
|
|
46
|
-
},
|
|
47
|
-
"include": [
|
|
48
|
-
"./src/"
|
|
49
|
-
]
|
|
50
|
-
}
|
package/vitest.config.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { defineConfig } from 'vitest/config';
|
|
2
|
-
|
|
3
|
-
export default defineConfig({
|
|
4
|
-
test: {
|
|
5
|
-
coverage: {
|
|
6
|
-
enabled: true,
|
|
7
|
-
exclude: [
|
|
8
|
-
'**/dist',
|
|
9
|
-
'**/*.config.ts',
|
|
10
|
-
'**/*.ignore.ts',
|
|
11
|
-
'**/*.js',
|
|
12
|
-
],
|
|
13
|
-
provider: 'v8',
|
|
14
|
-
reporter: ['cobertura', 'html', 'text'],
|
|
15
|
-
reportsDirectory: 'reports/',
|
|
16
|
-
},
|
|
17
|
-
outputFile: 'reports/junit.xml',
|
|
18
|
-
reporters: ['default', 'junit'],
|
|
19
|
-
},
|
|
20
|
-
});
|