infinity-forge 0.31.0 → 0.31.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/README.md +21 -21
- package/dist/system/data/use-cases/notifications/remote-notifications.d.ts +2 -2
- package/dist/system/data/use-cases/notifications/remote-notifications.js +6 -4
- package/dist/system/data/use-cases/notifications/remote-notifications.js.map +1 -1
- package/dist/system/domain/use-cases/notifications/load-all.d.ts +1 -0
- package/dist/system/presentation/components/layout/header/components/menu-right/notifications/card/index.d.ts +1 -1
- package/dist/system/presentation/components/layout/header/components/menu-right/notifications/card/index.js +4 -1
- package/dist/system/presentation/components/layout/header/components/menu-right/notifications/card/index.js.map +1 -1
- package/dist/system/presentation/components/layout/header/components/menu-right/notifications/index.js +4 -4
- package/dist/system/presentation/components/layout/header/components/menu-right/notifications/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
{
|
|
2
|
-
"include": ["src/**/*"],
|
|
3
|
-
"compilerOptions": {
|
|
4
|
-
"lib": ["es2021", "dom"],
|
|
5
|
-
"types": ["reflect-metadata", "node"],
|
|
6
|
-
"experimentalDecorators": true,
|
|
7
|
-
"emitDecoratorMetadata": true,
|
|
8
|
-
"jsx": "react-jsx",
|
|
9
|
-
"baseUrl": "./src",
|
|
10
|
-
"outDir": "./dist",
|
|
11
|
-
"declaration": true,
|
|
12
|
-
"sourceMap": true,
|
|
13
|
-
"paths": {
|
|
14
|
-
"
|
|
15
|
-
},
|
|
16
|
-
"esModuleInterop": true,
|
|
17
|
-
"moduleResolution": "node",
|
|
18
|
-
"skipLibCheck": true
|
|
19
|
-
},
|
|
20
|
-
"afterDeclarations": true
|
|
21
|
-
}
|
|
1
|
+
<!-- {
|
|
2
|
+
"include": ["src/**/*"],
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"lib": ["es2021", "dom"],
|
|
5
|
+
"types": ["reflect-metadata", "node"],
|
|
6
|
+
"experimentalDecorators": true,
|
|
7
|
+
"emitDecoratorMetadata": true,
|
|
8
|
+
"jsx": "react-jsx",
|
|
9
|
+
"baseUrl": "./src",
|
|
10
|
+
"outDir": "./dist",
|
|
11
|
+
"declaration": true,
|
|
12
|
+
"sourceMap": true,
|
|
13
|
+
"paths": {
|
|
14
|
+
"@/*": ["./*"]
|
|
15
|
+
},
|
|
16
|
+
"esModuleInterop": true,
|
|
17
|
+
"moduleResolution": "node",
|
|
18
|
+
"skipLibCheck": true
|
|
19
|
+
},
|
|
20
|
+
"afterDeclarations": true
|
|
21
|
+
} -->
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as domain from '../../../../system/domain/index.js';
|
|
2
|
-
import
|
|
2
|
+
import { makeApiURL } from '../../../../system/container/infra/make-api-url.js';
|
|
3
3
|
export declare class RemoteNotifications implements domain.LoadNoReadNotifications, domain.CreateNotification, domain.LoadAllNotifications, domain.ReadNotifications {
|
|
4
4
|
private readonly makeApiURL;
|
|
5
5
|
private readonly httpClient;
|
|
6
|
-
constructor(makeApiURL:
|
|
6
|
+
constructor(makeApiURL: makeApiURL, httpClient: domain.HttpClient);
|
|
7
7
|
loadAll(params: domain.LoadAllNotifications.Params): Promise<any>;
|
|
8
8
|
create(params: domain.CreateNotification.Params): Promise<domain.CreateNotification.Model>;
|
|
9
9
|
loadNoRead(): Promise<domain.LoadNoReadNotifications.Model>;
|
|
@@ -73,7 +73,9 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
73
73
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
74
74
|
exports.RemoteNotifications = void 0;
|
|
75
75
|
var inversify_1 = require("inversify");
|
|
76
|
-
var
|
|
76
|
+
var domain = __importStar(require("../../../../system/domain/index.js"));
|
|
77
|
+
var types_1 = require("../../../../system/container/infra/types.js");
|
|
78
|
+
var make_api_url_1 = require("../../../../system/container/infra/make-api-url.js");
|
|
77
79
|
var RemoteNotifications = /** @class */ (function () {
|
|
78
80
|
function RemoteNotifications(makeApiURL, httpClient) {
|
|
79
81
|
this.makeApiURL = makeApiURL;
|
|
@@ -148,9 +150,9 @@ var RemoteNotifications = /** @class */ (function () {
|
|
|
148
150
|
};
|
|
149
151
|
RemoteNotifications = __decorate([
|
|
150
152
|
(0, inversify_1.injectable)(),
|
|
151
|
-
__param(0, (0, inversify_1.inject)(
|
|
152
|
-
__param(1, (0, inversify_1.inject)(
|
|
153
|
-
__metadata("design:paramtypes", [
|
|
153
|
+
__param(0, (0, inversify_1.inject)(types_1.InfraTypes.makeApiURL)),
|
|
154
|
+
__param(1, (0, inversify_1.inject)(types_1.InfraTypes.authorizeAdminHttp)),
|
|
155
|
+
__metadata("design:paramtypes", [make_api_url_1.makeApiURL, Object])
|
|
154
156
|
], RemoteNotifications);
|
|
155
157
|
return RemoteNotifications;
|
|
156
158
|
}());
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remote-notifications.js","sourceRoot":"","sources":["../../../../../src/system/data/use-cases/notifications/remote-notifications.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAA8C;
|
|
1
|
+
{"version":3,"file":"remote-notifications.js","sourceRoot":"","sources":["../../../../../src/system/data/use-cases/notifications/remote-notifications.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAA8C;AAE9C,sDAAyC;AACzC,wDAA2D;AAC3D,sEAAkE;AAGlE;IAOE,6BACkD,UAAsB,EACd,UAA6B;QADrC,eAAU,GAAV,UAAU,CAAY;QACd,eAAU,GAAV,UAAU,CAAmB;IACpF,CAAC;IAEE,qCAAO,GAAb,UAAc,MAA0C;;;;;4BACrC,qBAAM,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC;4BAC7C,GAAG,EAAE,IAAI,CAAC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CADsB,yBAAU;OAR7D,mBAAmB,CAkD/B;IAAD,0BAAC;CAAA,AAnDD,IAmDC;AAlDY,kDAAmB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { INotification } from '../../../../../../../../../system/domain/index.js';
|
|
2
|
-
export declare function NotificationCard({ title, createdAtText, message }: INotification): import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare function NotificationCard({ title, createdAtText, message, status }: INotification): import("react/jsx-runtime").JSX.Element;
|
|
@@ -28,7 +28,10 @@ var jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
28
28
|
var ui_1 = require("../../../../../../../../../ui/index.js");
|
|
29
29
|
var S = __importStar(require("./styles.js"));
|
|
30
30
|
function NotificationCard(_a) {
|
|
31
|
-
|
|
31
|
+
// function renderStatus() {
|
|
32
|
+
// // if (status === "")
|
|
33
|
+
// // }
|
|
34
|
+
var title = _a.title, createdAtText = _a.createdAtText, message = _a.message, status = _a.status;
|
|
32
35
|
return ((0, jsx_runtime_1.jsx)(ui_1.Error, { name: 'NotificationCard', children: (0, jsx_runtime_1.jsxs)(S.NotificationCard, { children: [(0, jsx_runtime_1.jsxs)("div", { className: 'top', children: [title && (0, jsx_runtime_1.jsx)("h4", { className: 'font-16-bold', children: title }), createdAtText && (0, jsx_runtime_1.jsx)("span", { className: 'font-12-regular', children: createdAtText })] }), message && (0, jsx_runtime_1.jsx)("div", { className: 'description font-16-regular', dangerouslySetInnerHTML: { __html: message } })] }) }));
|
|
33
36
|
}
|
|
34
37
|
exports.NotificationCard = NotificationCard;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../../../src/system/presentation/components/layout/header/components/menu-right/notifications/card/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2BAA4B;AAI5B,0CAA6B;AAE7B,SAAgB,gBAAgB,CAAC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../../../src/system/presentation/components/layout/header/components/menu-right/notifications/card/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2BAA4B;AAI5B,0CAA6B;AAE7B,SAAgB,gBAAgB,CAAC,EAAwD;IACvF,8BAA8B;IAC9B,wBAAwB;IACxB,SAAS;QAHwB,KAAK,WAAA,EAAE,aAAa,mBAAA,EAAE,OAAO,aAAA,EAAE,MAAM,YAAA;IAKtE,OAAO,CACL,uBAAC,UAAK,IAAC,IAAI,EAAC,kBAAkB,YAC5B,wBAAC,CAAC,CAAC,gBAAgB,eACjB,iCAAK,SAAS,EAAC,KAAK,aACjB,KAAK,IAAI,+BAAI,SAAS,EAAC,cAAc,YAAE,KAAK,GAAM,EAClD,aAAa,IAAI,iCAAM,SAAS,EAAC,iBAAiB,YAAE,aAAa,GAAQ,IACtE,EAEL,OAAO,IAAI,gCAAK,SAAS,EAAC,6BAA6B,EAAC,uBAAuB,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,GAAI,IACtF,GACf,CACT,CAAA;AACH,CAAC;AAjBD,4CAiBC"}
|
|
@@ -91,7 +91,7 @@ function Notifications() {
|
|
|
91
91
|
return __generator(this, function (_a) {
|
|
92
92
|
switch (_a.label) {
|
|
93
93
|
case 0:
|
|
94
|
-
noReadNotifications = notifications.filter(function (notification) { return !notification.isRead; }).map(function (noRead) { return noRead.id; });
|
|
94
|
+
noReadNotifications = notifications === null || notifications === void 0 ? void 0 : notifications.filter(function (notification) { return !notification.isRead; }).map(function (noRead) { return noRead.id; });
|
|
95
95
|
return [4 /*yield*/, system_1.container.get(system_1.Types.RemoteNotifications).readAll({ ids: noReadNotifications })];
|
|
96
96
|
case 1:
|
|
97
97
|
_a.sent();
|
|
@@ -102,9 +102,9 @@ function Notifications() {
|
|
|
102
102
|
});
|
|
103
103
|
});
|
|
104
104
|
}
|
|
105
|
-
return ((0, jsx_runtime_1.jsx)(ui_1.Error, { name: 'Notifications', children: (0, jsx_runtime_1.jsx)(S.Notifications, { children: (0, jsx_runtime_1.jsx)(semantic_ui_react_1.Popup, { trigger: (0, jsx_runtime_1.jsxs)(styles_1.ActionBox, { type: 'button', children: [(data === null || data === void 0 ? void 0 : data.number) > 0 && (0, jsx_runtime_1.jsx)("div", { className: 'circle' }), (0, jsx_runtime_1.jsx)(ui_1.Icon, { name: 'IconFullFieldBell' })] }), position: 'bottom right', on: 'click', style: { padding: '0', borderRadius: 5 }, onOpen: handleOnOpen, content: (0, jsx_runtime_1.
|
|
106
|
-
|
|
107
|
-
|
|
105
|
+
return ((0, jsx_runtime_1.jsx)(ui_1.Error, { name: 'Notifications', children: (0, jsx_runtime_1.jsx)(S.Notifications, { children: (0, jsx_runtime_1.jsx)(semantic_ui_react_1.Popup, { trigger: (0, jsx_runtime_1.jsxs)(styles_1.ActionBox, { type: 'button', children: [(data === null || data === void 0 ? void 0 : data.number) > 0 && (0, jsx_runtime_1.jsx)("div", { className: 'circle' }), (0, jsx_runtime_1.jsx)(ui_1.Icon, { name: 'IconFullFieldBell' })] }), position: 'bottom right', on: 'click', style: { padding: '0', borderRadius: 5 }, onOpen: handleOnOpen, content: (0, jsx_runtime_1.jsxs)(S.Content, { children: [!notifications && (0, jsx_runtime_1.jsx)("div", {}), notifications &&
|
|
106
|
+
notifications.length > 0 &&
|
|
107
|
+
notifications.map(function (notification) { return (0, jsx_runtime_1.jsx)(card_1.NotificationCard, __assign({}, notification)); })] }) }) }) }));
|
|
108
108
|
}
|
|
109
109
|
exports.Notifications = Notifications;
|
|
110
110
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../../src/system/presentation/components/layout/header/components/menu-right/notifications/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2BAA4B;AAC5B,uDAAyC;AAEzC,2BAAkC;AAClC,mCAAqH;AAErH,+BAAyC;AAEzC,0CAA6B;AAC7B,oCAAqC;AACrC,SAAgB,aAAa;IACnB,IAAA,IAAI,GAAK,IAAA,mCAA0B,GAAE,KAAjC,CAAiC;IACrC,IAAA,aAAa,GAAK,IAAA,gCAAuB,GAAE,cAA9B,CAA8B;IAEnD,IAAI,CAAC,IAAI,EAAE,CAAC;QACV,OAAM;IACR,CAAC;IAED,SAAe,YAAY;;;;;;wBACnB,mBAAmB,GAAG,aAAa,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../../src/system/presentation/components/layout/header/components/menu-right/notifications/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2BAA4B;AAC5B,uDAAyC;AAEzC,2BAAkC;AAClC,mCAAqH;AAErH,+BAAyC;AAEzC,0CAA6B;AAC7B,oCAAqC;AACrC,SAAgB,aAAa;IACnB,IAAA,IAAI,GAAK,IAAA,mCAA0B,GAAE,KAAjC,CAAiC;IACrC,IAAA,aAAa,GAAK,IAAA,gCAAuB,GAAE,cAA9B,CAA8B;IAEnD,IAAI,CAAC,IAAI,EAAE,CAAC;QACV,OAAM;IACR,CAAC;IAED,SAAe,YAAY;;;;;;wBACnB,mBAAmB,GAAG,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,MAAM,CAAC,UAAC,YAAY,IAAK,OAAA,CAAC,YAAY,CAAC,MAAM,EAApB,CAAoB,EAAE,GAAG,CAAC,UAAC,MAAM,IAAK,OAAA,MAAM,CAAC,EAAE,EAAT,CAAS,CAAC,CAAA;wBAEpH,qBAAM,kBAAS,CAAC,GAAG,CAAsB,cAAK,CAAC,mBAAmB,CAAC,CAAC,OAAO,CAAC,EAAE,GAAG,EAAE,mBAAmB,EAAE,CAAC,EAAA;;wBAAzG,SAAyG,CAAA;wBACzG,IAAA,YAAM,EAA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