ag-common 0.0.710 → 0.0.712
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/helpers/ses.js +1 -0
- package/dist/common/helpers/array.js +1 -0
- package/dist/common/helpers/csv.d.ts +3 -1
- package/dist/common/helpers/csv.js +2 -7
- package/dist/common/helpers/index.d.ts +0 -2
- package/dist/common/helpers/index.js +0 -2
- package/dist/common/helpers/xml.d.ts +3 -1
- package/dist/common/helpers/xml.js +3 -28
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/node/helpers/index.d.ts +2 -0
- package/dist/node/helpers/index.js +18 -0
- package/dist/node/index.d.ts +1 -0
- package/dist/node/index.js +17 -0
- package/dist/ui/components/Confirm/Dialog.js +7 -2
- package/dist/ui/components/Prompt/Modal.js +7 -2
- package/dist/ui/components/Search/Dialog.js +7 -2
- package/dist/ui/components/Toast/base.js +5 -0
- package/package.json +1 -1
- /package/dist/{common → node}/helpers/fetch.d.ts +0 -0
- /package/dist/{common → node}/helpers/fetch.js +0 -0
- /package/dist/{common → node}/helpers/fs.d.ts +0 -0
- /package/dist/{common → node}/helpers/fs.js +0 -0
package/dist/api/helpers/ses.js
CHANGED
|
@@ -28,6 +28,7 @@ const sendEmail = (_a) => __awaiter(void 0, [_a], void 0, function* ({ to, messa
|
|
|
28
28
|
(0, exports.setSes)(sourceArnRegion);
|
|
29
29
|
}
|
|
30
30
|
const ishtml = message.startsWith('<!DOCTYPE HTML') || message.startsWith('<html');
|
|
31
|
+
(0, log_1.warn)('sending email. html=' + ishtml);
|
|
31
32
|
yield exports.ses.send(new client_ses_1.SendEmailCommand({
|
|
32
33
|
Destination: {
|
|
33
34
|
CcAddresses: [],
|
|
@@ -1,15 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.loadCsvAsJson = void 0;
|
|
7
|
-
const fs_1 = __importDefault(require("fs"));
|
|
8
4
|
const math_1 = require("./math");
|
|
9
5
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
10
|
-
function loadCsvAsJson(
|
|
11
|
-
const
|
|
12
|
-
const lines = fileData.split(/[\r]?\n/);
|
|
6
|
+
function loadCsvAsJson(p) {
|
|
7
|
+
const lines = p.fileData.split(/[\r]?\n/);
|
|
13
8
|
let sep = ',';
|
|
14
9
|
if (lines[0].split(',').length === 1 && lines[0].split(';').length > 1) {
|
|
15
10
|
sep = ';';
|
|
@@ -20,8 +20,6 @@ __exportStar(require("./binary"), exports);
|
|
|
20
20
|
__exportStar(require("./csv"), exports);
|
|
21
21
|
__exportStar(require("./date"), exports);
|
|
22
22
|
__exportStar(require("./email"), exports);
|
|
23
|
-
__exportStar(require("./fetch"), exports);
|
|
24
|
-
__exportStar(require("./fs"), exports);
|
|
25
23
|
__exportStar(require("./func"), exports);
|
|
26
24
|
__exportStar(require("./generator"), exports);
|
|
27
25
|
__exportStar(require("./groupBy"), exports);
|
|
@@ -1,27 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
2
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
25
3
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
26
4
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
27
5
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -33,12 +11,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
33
11
|
};
|
|
34
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35
13
|
exports.XMLParser = exports.convertXmlToJson = void 0;
|
|
36
|
-
|
|
37
|
-
const fs = __importStar(require("fs"));
|
|
38
|
-
const convertXmlToJson = (xmlFilePath) => __awaiter(void 0, void 0, void 0, function* () {
|
|
39
|
-
const xmlData = yield fs.readFileSync(xmlFilePath, 'utf8');
|
|
14
|
+
const convertXmlToJson = (p) => __awaiter(void 0, void 0, void 0, function* () {
|
|
40
15
|
const parser = new XMLParser();
|
|
41
|
-
const ret = parser.parse(xmlData);
|
|
16
|
+
const ret = parser.parse(p.xmlData);
|
|
42
17
|
return ret;
|
|
43
18
|
});
|
|
44
19
|
exports.convertXmlToJson = convertXmlToJson;
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -16,4 +16,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./api"), exports);
|
|
18
18
|
__exportStar(require("./common"), exports);
|
|
19
|
+
__exportStar(require("./node"), exports);
|
|
19
20
|
__exportStar(require("./ui"), 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("./fetch"), exports);
|
|
18
|
+
__exportStar(require("./fs"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './helpers';
|
|
@@ -0,0 +1,17 @@
|
|
|
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("./helpers"), exports);
|
|
@@ -38,8 +38,13 @@ const ConfirmDialog = (_a) => __awaiter(void 0, [_a], void 0, function* ({ botto
|
|
|
38
38
|
res(v);
|
|
39
39
|
}
|
|
40
40
|
finally {
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
try {
|
|
42
|
+
root.unmount();
|
|
43
|
+
wrapper.remove();
|
|
44
|
+
}
|
|
45
|
+
catch (e) {
|
|
46
|
+
//
|
|
47
|
+
}
|
|
43
48
|
}
|
|
44
49
|
};
|
|
45
50
|
root.render(react_1.default.createElement(Modal_1.ConfirmModal, { bottomText: bottomText, topText: topText, onSubmit: onSubmit, style: style }));
|
|
@@ -71,8 +71,13 @@ const PromptModal = ({ root, wrapper, res, bottomText, topText, okText = 'OK', c
|
|
|
71
71
|
res(v);
|
|
72
72
|
}
|
|
73
73
|
finally {
|
|
74
|
-
|
|
75
|
-
|
|
74
|
+
try {
|
|
75
|
+
root === null || root === void 0 ? void 0 : root.unmount();
|
|
76
|
+
wrapper === null || wrapper === void 0 ? void 0 : wrapper.remove();
|
|
77
|
+
}
|
|
78
|
+
catch (e) {
|
|
79
|
+
//
|
|
80
|
+
}
|
|
76
81
|
}
|
|
77
82
|
};
|
|
78
83
|
return (react_1.default.createElement(Modal_1.Modal, { position: "center", topPosition: "center", open: true, setOpen: () => ret(undefined), showCloseButton: false, closeOnClickOutside: false },
|
|
@@ -45,8 +45,13 @@ const SearchDialog = (p) => __awaiter(void 0, void 0, void 0, function* () {
|
|
|
45
45
|
res(f);
|
|
46
46
|
}
|
|
47
47
|
finally {
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
try {
|
|
49
|
+
root.unmount();
|
|
50
|
+
wrapper.remove();
|
|
51
|
+
}
|
|
52
|
+
catch (e) {
|
|
53
|
+
//
|
|
54
|
+
}
|
|
50
55
|
}
|
|
51
56
|
} })));
|
|
52
57
|
});
|
|
@@ -117,6 +117,11 @@ const Toast = ({ toast, close, style, }) => {
|
|
|
117
117
|
icon = react_1.default.createElement(Warning_1.Warning, null);
|
|
118
118
|
break;
|
|
119
119
|
}
|
|
120
|
+
case 'success':
|
|
121
|
+
default: {
|
|
122
|
+
icon = react_1.default.createElement(Tick_1.Tick, null);
|
|
123
|
+
break;
|
|
124
|
+
}
|
|
120
125
|
}
|
|
121
126
|
(0, react_1.useEffect)(() => {
|
|
122
127
|
if (!closeMs) {
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|