@accitdg/web-helpers 0.0.4 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +177 -0
- package/dist/index.esm.js +164 -0
- package/package.json +14 -2
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
function _defineProperty(e, r, t) {
|
|
6
|
+
return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
7
|
+
value: t,
|
|
8
|
+
enumerable: !0,
|
|
9
|
+
configurable: !0,
|
|
10
|
+
writable: !0
|
|
11
|
+
}) : e[r] = t, e;
|
|
12
|
+
}
|
|
13
|
+
function ownKeys(e, r) {
|
|
14
|
+
var t = Object.keys(e);
|
|
15
|
+
if (Object.getOwnPropertySymbols) {
|
|
16
|
+
var o = Object.getOwnPropertySymbols(e);
|
|
17
|
+
r && (o = o.filter(function (r) {
|
|
18
|
+
return Object.getOwnPropertyDescriptor(e, r).enumerable;
|
|
19
|
+
})), t.push.apply(t, o);
|
|
20
|
+
}
|
|
21
|
+
return t;
|
|
22
|
+
}
|
|
23
|
+
function _objectSpread2(e) {
|
|
24
|
+
for (var r = 1; r < arguments.length; r++) {
|
|
25
|
+
var t = null != arguments[r] ? arguments[r] : {};
|
|
26
|
+
r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {
|
|
27
|
+
_defineProperty(e, r, t[r]);
|
|
28
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
|
|
29
|
+
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
return e;
|
|
33
|
+
}
|
|
34
|
+
function _toPrimitive(t, r) {
|
|
35
|
+
if ("object" != typeof t || !t) return t;
|
|
36
|
+
var e = t[Symbol.toPrimitive];
|
|
37
|
+
if (void 0 !== e) {
|
|
38
|
+
var i = e.call(t, r || "default");
|
|
39
|
+
if ("object" != typeof i) return i;
|
|
40
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
41
|
+
}
|
|
42
|
+
return ("string" === r ? String : Number)(t);
|
|
43
|
+
}
|
|
44
|
+
function _toPropertyKey(t) {
|
|
45
|
+
var i = _toPrimitive(t, "string");
|
|
46
|
+
return "symbol" == typeof i ? i : i + "";
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
var convertNumberToCurrency = function convertNumberToCurrency(numberValue) {
|
|
50
|
+
var formattedValue = numberValue.toLocaleString("en-PH", {
|
|
51
|
+
style: "currency",
|
|
52
|
+
currency: "PHP"
|
|
53
|
+
});
|
|
54
|
+
return formattedValue;
|
|
55
|
+
};
|
|
56
|
+
var restoreBase64 = function restoreBase64(cleanedBase64) {
|
|
57
|
+
var imageType = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "png";
|
|
58
|
+
return "data:image/".concat(imageType, ";base64,").concat(cleanedBase64);
|
|
59
|
+
};
|
|
60
|
+
var cleanBase64 = function cleanBase64(base64) {
|
|
61
|
+
return base64.replace(/^data:[a-zA-Z0-9\\/\\+\\-]+;base64,/, "").replace(/^data:(application\/pdf|application\/vnd.openxmlformats-officedocument.wordprocessingml.document|application\/vnd.openxmlformats-officedocument.spreadsheetml.sheet|image\/[a-z]+);base64,/, "").replace("data:application/vnd.openxmlformats-officedocument.wordprocessingml.template;base64,", "");
|
|
62
|
+
};
|
|
63
|
+
var downloadBase64File = function downloadBase64File(base64Data, filename) {
|
|
64
|
+
var byteCharacters = atob(restoreBase64(cleanBase64(base64Data)).split(",")[1]);
|
|
65
|
+
var byteArray = new Uint8Array(byteCharacters.length);
|
|
66
|
+
for (var i = 0; i < byteCharacters.length; i++) {
|
|
67
|
+
byteArray[i] = byteCharacters.charCodeAt(i);
|
|
68
|
+
}
|
|
69
|
+
var blob = new Blob([byteArray], {
|
|
70
|
+
type: "application/octet-stream"
|
|
71
|
+
});
|
|
72
|
+
var link = document.createElement("a");
|
|
73
|
+
link.href = URL.createObjectURL(blob);
|
|
74
|
+
link.download = filename;
|
|
75
|
+
document.body.appendChild(link);
|
|
76
|
+
link.click();
|
|
77
|
+
document.body.removeChild(link);
|
|
78
|
+
};
|
|
79
|
+
var arrayBufferToBase64 = function arrayBufferToBase64(buffer) {
|
|
80
|
+
var binary = "";
|
|
81
|
+
var bytes = new Uint8Array(buffer);
|
|
82
|
+
var len = bytes.byteLength;
|
|
83
|
+
for (var i = 0; i < len; i++) {
|
|
84
|
+
binary += String.fromCharCode(bytes[i]);
|
|
85
|
+
}
|
|
86
|
+
return window.btoa(binary);
|
|
87
|
+
};
|
|
88
|
+
var getFileExtensionFromBase64 = function getFileExtensionFromBase64(base64String) {
|
|
89
|
+
try {
|
|
90
|
+
var contentType = base64String.split(";")[0].split(":")[1];
|
|
91
|
+
var extension = contentType.split("/")[1];
|
|
92
|
+
return extension;
|
|
93
|
+
} catch (error) {
|
|
94
|
+
return null;
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
var createPayload = function createPayload(args) {
|
|
98
|
+
var _args$payload, _args$payload2, _ref, _args$notifId, _WEB_HELPERS_CONFIG, _WEB_HELPERS_CONFIG$, _WEB_HELPERS_CONFIG2, _args$pagination;
|
|
99
|
+
// ...existing code...
|
|
100
|
+
var param = typeof globalThis.objTrim === "function" ? globalThis.objTrim((_args$payload = args.payload) !== null && _args$payload !== void 0 ? _args$payload : {}) : (_args$payload2 = args.payload) !== null && _args$payload2 !== void 0 ? _args$payload2 : {};
|
|
101
|
+
var data = {
|
|
102
|
+
isLazyLoading: false,
|
|
103
|
+
notificationId: (_ref = (_args$notifId = args.notifId) !== null && _args$notifId !== void 0 ? _args$notifId : (_WEB_HELPERS_CONFIG = globalThis.__WEB_HELPERS_CONFIG) === null || _WEB_HELPERS_CONFIG === void 0 ? void 0 : _WEB_HELPERS_CONFIG.notificationId) !== null && _ref !== void 0 ? _ref : null,
|
|
104
|
+
applicationId: (_WEB_HELPERS_CONFIG$ = (_WEB_HELPERS_CONFIG2 = globalThis.__WEB_HELPERS_CONFIG) === null || _WEB_HELPERS_CONFIG2 === void 0 ? void 0 : _WEB_HELPERS_CONFIG2.applicationId) !== null && _WEB_HELPERS_CONFIG$ !== void 0 ? _WEB_HELPERS_CONFIG$ : null,
|
|
105
|
+
geoLocation: {
|
|
106
|
+
latitude: "0",
|
|
107
|
+
longitude: "0",
|
|
108
|
+
dateTime: new Date().toISOString()
|
|
109
|
+
},
|
|
110
|
+
pagination: (_args$pagination = args.pagination) !== null && _args$pagination !== void 0 ? _args$pagination : {
|
|
111
|
+
count: 0,
|
|
112
|
+
page: 0
|
|
113
|
+
},
|
|
114
|
+
payload: param
|
|
115
|
+
};
|
|
116
|
+
return data;
|
|
117
|
+
};
|
|
118
|
+
var createPayload2 = function createPayload2() {
|
|
119
|
+
var _ref3, _ref4;
|
|
120
|
+
var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
121
|
+
_ref2$pagination = _ref2.pagination,
|
|
122
|
+
pagination = _ref2$pagination === void 0 ? {
|
|
123
|
+
c: 0,
|
|
124
|
+
p: 0
|
|
125
|
+
} : _ref2$pagination,
|
|
126
|
+
_ref2$payload = _ref2.payload,
|
|
127
|
+
payload = _ref2$payload === void 0 ? {} : _ref2$payload,
|
|
128
|
+
notifId = _ref2.notifId,
|
|
129
|
+
applicationId = _ref2.applicationId;
|
|
130
|
+
var cfg = globalThis.__WEB_HELPERS_CONFIG || {};
|
|
131
|
+
var nId = (_ref3 = notifId !== null && notifId !== void 0 ? notifId : cfg.notificationId) !== null && _ref3 !== void 0 ? _ref3 : null;
|
|
132
|
+
var aId = (_ref4 = applicationId !== null && applicationId !== void 0 ? applicationId : cfg.applicationId) !== null && _ref4 !== void 0 ? _ref4 : null;
|
|
133
|
+
var objTrimFn = typeof globalThis.objTrim === "function" ? globalThis.objTrim : function (o) {
|
|
134
|
+
return o;
|
|
135
|
+
};
|
|
136
|
+
var param = objTrimFn(payload);
|
|
137
|
+
return {
|
|
138
|
+
isLl: false,
|
|
139
|
+
nId: nId,
|
|
140
|
+
aId: aId,
|
|
141
|
+
gL: {
|
|
142
|
+
lt: "0",
|
|
143
|
+
"long": "0",
|
|
144
|
+
date: new Date().toISOString()
|
|
145
|
+
},
|
|
146
|
+
pg: pagination,
|
|
147
|
+
p: param
|
|
148
|
+
};
|
|
149
|
+
};
|
|
150
|
+
// Add this helper to configure global values (call once during app init)
|
|
151
|
+
var configureHelpers = function configureHelpers(config) {
|
|
152
|
+
globalThis.__WEB_HELPERS_CONFIG = _objectSpread2(_objectSpread2({}, globalThis.__WEB_HELPERS_CONFIG || {}), config);
|
|
153
|
+
};
|
|
154
|
+
|
|
155
|
+
var webHelpers = /*#__PURE__*/Object.freeze({
|
|
156
|
+
__proto__: null,
|
|
157
|
+
convertNumberToCurrency: convertNumberToCurrency,
|
|
158
|
+
restoreBase64: restoreBase64,
|
|
159
|
+
cleanBase64: cleanBase64,
|
|
160
|
+
downloadBase64File: downloadBase64File,
|
|
161
|
+
arrayBufferToBase64: arrayBufferToBase64,
|
|
162
|
+
getFileExtensionFromBase64: getFileExtensionFromBase64,
|
|
163
|
+
createPayload: createPayload,
|
|
164
|
+
createPayload2: createPayload2,
|
|
165
|
+
configureHelpers: configureHelpers
|
|
166
|
+
});
|
|
167
|
+
|
|
168
|
+
exports.arrayBufferToBase64 = arrayBufferToBase64;
|
|
169
|
+
exports.cleanBase64 = cleanBase64;
|
|
170
|
+
exports.configureHelpers = configureHelpers;
|
|
171
|
+
exports.convertNumberToCurrency = convertNumberToCurrency;
|
|
172
|
+
exports.createPayload = createPayload;
|
|
173
|
+
exports.createPayload2 = createPayload2;
|
|
174
|
+
exports["default"] = webHelpers;
|
|
175
|
+
exports.downloadBase64File = downloadBase64File;
|
|
176
|
+
exports.getFileExtensionFromBase64 = getFileExtensionFromBase64;
|
|
177
|
+
exports.restoreBase64 = restoreBase64;
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
function _defineProperty(e, r, t) {
|
|
2
|
+
return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
3
|
+
value: t,
|
|
4
|
+
enumerable: !0,
|
|
5
|
+
configurable: !0,
|
|
6
|
+
writable: !0
|
|
7
|
+
}) : e[r] = t, e;
|
|
8
|
+
}
|
|
9
|
+
function ownKeys(e, r) {
|
|
10
|
+
var t = Object.keys(e);
|
|
11
|
+
if (Object.getOwnPropertySymbols) {
|
|
12
|
+
var o = Object.getOwnPropertySymbols(e);
|
|
13
|
+
r && (o = o.filter(function (r) {
|
|
14
|
+
return Object.getOwnPropertyDescriptor(e, r).enumerable;
|
|
15
|
+
})), t.push.apply(t, o);
|
|
16
|
+
}
|
|
17
|
+
return t;
|
|
18
|
+
}
|
|
19
|
+
function _objectSpread2(e) {
|
|
20
|
+
for (var r = 1; r < arguments.length; r++) {
|
|
21
|
+
var t = null != arguments[r] ? arguments[r] : {};
|
|
22
|
+
r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {
|
|
23
|
+
_defineProperty(e, r, t[r]);
|
|
24
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
|
|
25
|
+
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
return e;
|
|
29
|
+
}
|
|
30
|
+
function _toPrimitive(t, r) {
|
|
31
|
+
if ("object" != typeof t || !t) return t;
|
|
32
|
+
var e = t[Symbol.toPrimitive];
|
|
33
|
+
if (void 0 !== e) {
|
|
34
|
+
var i = e.call(t, r || "default");
|
|
35
|
+
if ("object" != typeof i) return i;
|
|
36
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
37
|
+
}
|
|
38
|
+
return ("string" === r ? String : Number)(t);
|
|
39
|
+
}
|
|
40
|
+
function _toPropertyKey(t) {
|
|
41
|
+
var i = _toPrimitive(t, "string");
|
|
42
|
+
return "symbol" == typeof i ? i : i + "";
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
var convertNumberToCurrency = function convertNumberToCurrency(numberValue) {
|
|
46
|
+
var formattedValue = numberValue.toLocaleString("en-PH", {
|
|
47
|
+
style: "currency",
|
|
48
|
+
currency: "PHP"
|
|
49
|
+
});
|
|
50
|
+
return formattedValue;
|
|
51
|
+
};
|
|
52
|
+
var restoreBase64 = function restoreBase64(cleanedBase64) {
|
|
53
|
+
var imageType = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "png";
|
|
54
|
+
return "data:image/".concat(imageType, ";base64,").concat(cleanedBase64);
|
|
55
|
+
};
|
|
56
|
+
var cleanBase64 = function cleanBase64(base64) {
|
|
57
|
+
return base64.replace(/^data:[a-zA-Z0-9\\/\\+\\-]+;base64,/, "").replace(/^data:(application\/pdf|application\/vnd.openxmlformats-officedocument.wordprocessingml.document|application\/vnd.openxmlformats-officedocument.spreadsheetml.sheet|image\/[a-z]+);base64,/, "").replace("data:application/vnd.openxmlformats-officedocument.wordprocessingml.template;base64,", "");
|
|
58
|
+
};
|
|
59
|
+
var downloadBase64File = function downloadBase64File(base64Data, filename) {
|
|
60
|
+
var byteCharacters = atob(restoreBase64(cleanBase64(base64Data)).split(",")[1]);
|
|
61
|
+
var byteArray = new Uint8Array(byteCharacters.length);
|
|
62
|
+
for (var i = 0; i < byteCharacters.length; i++) {
|
|
63
|
+
byteArray[i] = byteCharacters.charCodeAt(i);
|
|
64
|
+
}
|
|
65
|
+
var blob = new Blob([byteArray], {
|
|
66
|
+
type: "application/octet-stream"
|
|
67
|
+
});
|
|
68
|
+
var link = document.createElement("a");
|
|
69
|
+
link.href = URL.createObjectURL(blob);
|
|
70
|
+
link.download = filename;
|
|
71
|
+
document.body.appendChild(link);
|
|
72
|
+
link.click();
|
|
73
|
+
document.body.removeChild(link);
|
|
74
|
+
};
|
|
75
|
+
var arrayBufferToBase64 = function arrayBufferToBase64(buffer) {
|
|
76
|
+
var binary = "";
|
|
77
|
+
var bytes = new Uint8Array(buffer);
|
|
78
|
+
var len = bytes.byteLength;
|
|
79
|
+
for (var i = 0; i < len; i++) {
|
|
80
|
+
binary += String.fromCharCode(bytes[i]);
|
|
81
|
+
}
|
|
82
|
+
return window.btoa(binary);
|
|
83
|
+
};
|
|
84
|
+
var getFileExtensionFromBase64 = function getFileExtensionFromBase64(base64String) {
|
|
85
|
+
try {
|
|
86
|
+
var contentType = base64String.split(";")[0].split(":")[1];
|
|
87
|
+
var extension = contentType.split("/")[1];
|
|
88
|
+
return extension;
|
|
89
|
+
} catch (error) {
|
|
90
|
+
return null;
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
var createPayload = function createPayload(args) {
|
|
94
|
+
var _args$payload, _args$payload2, _ref, _args$notifId, _WEB_HELPERS_CONFIG, _WEB_HELPERS_CONFIG$, _WEB_HELPERS_CONFIG2, _args$pagination;
|
|
95
|
+
// ...existing code...
|
|
96
|
+
var param = typeof globalThis.objTrim === "function" ? globalThis.objTrim((_args$payload = args.payload) !== null && _args$payload !== void 0 ? _args$payload : {}) : (_args$payload2 = args.payload) !== null && _args$payload2 !== void 0 ? _args$payload2 : {};
|
|
97
|
+
var data = {
|
|
98
|
+
isLazyLoading: false,
|
|
99
|
+
notificationId: (_ref = (_args$notifId = args.notifId) !== null && _args$notifId !== void 0 ? _args$notifId : (_WEB_HELPERS_CONFIG = globalThis.__WEB_HELPERS_CONFIG) === null || _WEB_HELPERS_CONFIG === void 0 ? void 0 : _WEB_HELPERS_CONFIG.notificationId) !== null && _ref !== void 0 ? _ref : null,
|
|
100
|
+
applicationId: (_WEB_HELPERS_CONFIG$ = (_WEB_HELPERS_CONFIG2 = globalThis.__WEB_HELPERS_CONFIG) === null || _WEB_HELPERS_CONFIG2 === void 0 ? void 0 : _WEB_HELPERS_CONFIG2.applicationId) !== null && _WEB_HELPERS_CONFIG$ !== void 0 ? _WEB_HELPERS_CONFIG$ : null,
|
|
101
|
+
geoLocation: {
|
|
102
|
+
latitude: "0",
|
|
103
|
+
longitude: "0",
|
|
104
|
+
dateTime: new Date().toISOString()
|
|
105
|
+
},
|
|
106
|
+
pagination: (_args$pagination = args.pagination) !== null && _args$pagination !== void 0 ? _args$pagination : {
|
|
107
|
+
count: 0,
|
|
108
|
+
page: 0
|
|
109
|
+
},
|
|
110
|
+
payload: param
|
|
111
|
+
};
|
|
112
|
+
return data;
|
|
113
|
+
};
|
|
114
|
+
var createPayload2 = function createPayload2() {
|
|
115
|
+
var _ref3, _ref4;
|
|
116
|
+
var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
117
|
+
_ref2$pagination = _ref2.pagination,
|
|
118
|
+
pagination = _ref2$pagination === void 0 ? {
|
|
119
|
+
c: 0,
|
|
120
|
+
p: 0
|
|
121
|
+
} : _ref2$pagination,
|
|
122
|
+
_ref2$payload = _ref2.payload,
|
|
123
|
+
payload = _ref2$payload === void 0 ? {} : _ref2$payload,
|
|
124
|
+
notifId = _ref2.notifId,
|
|
125
|
+
applicationId = _ref2.applicationId;
|
|
126
|
+
var cfg = globalThis.__WEB_HELPERS_CONFIG || {};
|
|
127
|
+
var nId = (_ref3 = notifId !== null && notifId !== void 0 ? notifId : cfg.notificationId) !== null && _ref3 !== void 0 ? _ref3 : null;
|
|
128
|
+
var aId = (_ref4 = applicationId !== null && applicationId !== void 0 ? applicationId : cfg.applicationId) !== null && _ref4 !== void 0 ? _ref4 : null;
|
|
129
|
+
var objTrimFn = typeof globalThis.objTrim === "function" ? globalThis.objTrim : function (o) {
|
|
130
|
+
return o;
|
|
131
|
+
};
|
|
132
|
+
var param = objTrimFn(payload);
|
|
133
|
+
return {
|
|
134
|
+
isLl: false,
|
|
135
|
+
nId: nId,
|
|
136
|
+
aId: aId,
|
|
137
|
+
gL: {
|
|
138
|
+
lt: "0",
|
|
139
|
+
"long": "0",
|
|
140
|
+
date: new Date().toISOString()
|
|
141
|
+
},
|
|
142
|
+
pg: pagination,
|
|
143
|
+
p: param
|
|
144
|
+
};
|
|
145
|
+
};
|
|
146
|
+
// Add this helper to configure global values (call once during app init)
|
|
147
|
+
var configureHelpers = function configureHelpers(config) {
|
|
148
|
+
globalThis.__WEB_HELPERS_CONFIG = _objectSpread2(_objectSpread2({}, globalThis.__WEB_HELPERS_CONFIG || {}), config);
|
|
149
|
+
};
|
|
150
|
+
|
|
151
|
+
var webHelpers = /*#__PURE__*/Object.freeze({
|
|
152
|
+
__proto__: null,
|
|
153
|
+
convertNumberToCurrency: convertNumberToCurrency,
|
|
154
|
+
restoreBase64: restoreBase64,
|
|
155
|
+
cleanBase64: cleanBase64,
|
|
156
|
+
downloadBase64File: downloadBase64File,
|
|
157
|
+
arrayBufferToBase64: arrayBufferToBase64,
|
|
158
|
+
getFileExtensionFromBase64: getFileExtensionFromBase64,
|
|
159
|
+
createPayload: createPayload,
|
|
160
|
+
createPayload2: createPayload2,
|
|
161
|
+
configureHelpers: configureHelpers
|
|
162
|
+
});
|
|
163
|
+
|
|
164
|
+
export { arrayBufferToBase64, cleanBase64, configureHelpers, convertNumberToCurrency, createPayload, createPayload2, webHelpers as default, downloadBase64File, getFileExtensionFromBase64, restoreBase64 };
|
package/package.json
CHANGED
|
@@ -1,9 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@accitdg/web-helpers",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.6",
|
|
4
4
|
"type": "module",
|
|
5
|
+
"main": "dist/index.cjs.js",
|
|
6
|
+
"module": "dist/index.esm.js",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"import": "./dist/index.esm.js",
|
|
11
|
+
"require": "./dist/index.cjs.js",
|
|
12
|
+
"types": "./dist/index.d.ts"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
5
15
|
"scripts": {
|
|
6
|
-
"build": "rollup -c",
|
|
16
|
+
"build": "rollup -c && tsc --emitDeclarationOnly --declaration --declarationDir dist",
|
|
7
17
|
"prepublishOnly": "npm run build",
|
|
8
18
|
"test": "jest"
|
|
9
19
|
},
|
|
@@ -42,6 +52,8 @@
|
|
|
42
52
|
"uuid": "^13.0.0"
|
|
43
53
|
},
|
|
44
54
|
"devDependencies": {
|
|
55
|
+
"@babel/core": "^7.28.5",
|
|
56
|
+
"@babel/preset-env": "^7.28.5",
|
|
45
57
|
"@babel/preset-react": "^7.28.5",
|
|
46
58
|
"@babel/preset-typescript": "^7.28.5",
|
|
47
59
|
"@eslint/js": "^9.28.0",
|