namirasoft-account-react 1.3.37 → 1.3.40
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/App.css +43 -0
- package/dist/assets/images/icon-notification-header.png +0 -0
- package/dist/assets/images/icon-notification.png +0 -0
- package/dist/assets/images/icon_close.png +0 -0
- package/dist/components/NSADeleteModal.module.css +0 -0
- package/dist/components/NSALayoutAction.module.css +0 -0
- package/dist/components/NSAMessageDialog.js.map +1 -1
- package/dist/components/NSAMessageDialog.module.css +63 -0
- package/dist/index.css +0 -0
- package/dist/layouts/NSALayout.d.ts +1 -5
- package/dist/layouts/NSALayout.js +6 -36
- package/dist/layouts/NSALayout.js.map +1 -1
- package/dist/pages/NSALoginPage.module.css +20 -0
- package/package.json +2 -2
- package/src/App.css +1 -1
- package/src/components/NSAMessageDialog.tsx +1 -5
- package/src/layouts/NSALayout.tsx +41 -39
- package/src/main.ts +1 -1
package/dist/App.css
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
@font-face {
|
|
2
|
+
font-family: inter;
|
|
3
|
+
src: url("../src/assets/fonts/Inter-Regular.ttf");
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
body {
|
|
7
|
+
margin: 0;
|
|
8
|
+
font-family: inter;
|
|
9
|
+
-webkit-font-smoothing: antialiased;
|
|
10
|
+
-moz-osx-font-smoothing: grayscale;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.toast-header {
|
|
14
|
+
padding: 16px !important;
|
|
15
|
+
justify-content: space-between !important;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.toast {
|
|
19
|
+
width: max-content !important;
|
|
20
|
+
max-width: 100%;
|
|
21
|
+
border: 8px;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.toast-body {
|
|
25
|
+
padding: 0 !important;
|
|
26
|
+
}
|
|
27
|
+
.btn-close{
|
|
28
|
+
background: url(./assets/images/icon_close.png) center/1em auto no-repeat!important;
|
|
29
|
+
opacity: 1 !important;
|
|
30
|
+
}
|
|
31
|
+
.nsa_font_16_bold {
|
|
32
|
+
font-size: 16px;
|
|
33
|
+
font-weight: 600;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.nsa_font_13_normal {
|
|
37
|
+
font-size: 13px;
|
|
38
|
+
font-weight: 300;
|
|
39
|
+
}
|
|
40
|
+
.nsa_font_12_normal {
|
|
41
|
+
font-size: 12px;
|
|
42
|
+
font-weight: 300;
|
|
43
|
+
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
File without changes
|
|
File without changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NSAMessageDialog.js","sourceRoot":"","sources":["../../src/components/NSAMessageDialog.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"NSAMessageDialog.js","sourceRoot":"","sources":["../../src/components/NSAMessageDialog.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,OAAO,MAAM,wCAAwC,CAAC;AAC7D,OAAO,aAAa,MAAM,+CAA+C,CAAC;AAC1E,OAAO,MAAM,MAAM,+BAA+B,CAAC;AACnD,OAAO,KAAK,MAAM,uBAAuB,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAKrD,MAAM,UAAU,gBAAgB;IAE5B,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IACxC,MAAM,UAAU,GAAG,GAAG,EAAE,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC;IAExC,OAAO,CACH,8BACI,eAAK,SAAS,EAAE,GAAG,MAAM,CAAC,gBAAgB,OAAO,aAC7C,cAAK,SAAS,EAAE,GAAG,MAAM,CAAC,SAAS,qBAAqB,kBAAS,EACjE,cACI,SAAS,EAAE,MAAM,CAAC,gBAAgB,EAClC,OAAO,EAAE,UAAU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8
|
+
|
|
9
|
+
.nsa_message_item_title {
|
|
10
|
+
color: hsla(234, 64%, 22%, 1);
|
|
11
|
+
display: flex;
|
|
12
|
+
align-items: center;
|
|
13
|
+
gap: 8px;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.nsa_message_item_content {
|
|
17
|
+
color: hsla(234, 64%, 22%, 1);
|
|
18
|
+
margin: 0;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.nsa_message_item_dot_green {
|
|
22
|
+
width: 8px;
|
|
23
|
+
height: 8px;
|
|
24
|
+
background: hsla(157, 94%, 42%, 1);
|
|
25
|
+
border-radius: 50%;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.nsa_message_item_dot_gray {
|
|
29
|
+
width: 8px;
|
|
30
|
+
height: 8px;
|
|
31
|
+
background: hsla(228, 9%, 66%, 1);
|
|
32
|
+
border-radius: 50%;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.nsa_body_green {
|
|
36
|
+
background-color: hsla(157, 94%, 42%, 0.1);
|
|
37
|
+
padding: 16px;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.nsa_body_gray {
|
|
41
|
+
background-color: #fff;
|
|
42
|
+
padding: 16px;
|
|
43
|
+
box-shadow: 0px 2px 5px #e6e6e6;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.nsa_count {
|
|
47
|
+
position: absolute;
|
|
48
|
+
background: #fff;
|
|
49
|
+
right: -7px;
|
|
50
|
+
top: -7px;
|
|
51
|
+
color: hsla(234, 64%, 22%, 1);
|
|
52
|
+
width: 18px;
|
|
53
|
+
height: 18px;
|
|
54
|
+
border-radius: 50%;
|
|
55
|
+
display: flex;
|
|
56
|
+
justify-content: center;
|
|
57
|
+
align-items: center;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.nsa_parent_count {
|
|
61
|
+
position: relative;
|
|
62
|
+
width: max-content;
|
|
63
|
+
}
|
package/dist/index.css
ADDED
|
File without changes
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { INSBarActionProps, INSBarHeroBannerProps, INSBarNotificationProps, INSBarTitleProps } from 'namirasoft-site-react';
|
|
2
1
|
import { NSASectionListProps } from './NSASectionList';
|
|
3
2
|
import { NSASectionNewProps } from './NSASectionNew';
|
|
4
3
|
import { NSASectionViewProps } from './NSASectionView';
|
|
@@ -10,10 +9,7 @@ export interface NSALayoutProps<EntityType> extends INSARouterProps {
|
|
|
10
9
|
logo: string;
|
|
11
10
|
background?: string;
|
|
12
11
|
header?: IHeaderProps;
|
|
13
|
-
notifications:
|
|
14
|
-
action?: INSBarActionProps;
|
|
15
|
-
banner?: INSBarHeroBannerProps;
|
|
16
|
-
title?: INSBarTitleProps;
|
|
12
|
+
notifications: [];
|
|
17
13
|
pages?: {
|
|
18
14
|
list?: NSASectionListProps<EntityType>;
|
|
19
15
|
new?: NSASectionNewProps<EntityType>;
|
|
@@ -12,9 +12,8 @@ import { NSLayout } from 'namirasoft-site-react';
|
|
|
12
12
|
import { NSASectionList } from './NSASectionList';
|
|
13
13
|
import { NSASectionNew } from './NSASectionNew';
|
|
14
14
|
import { NSASectionView } from './NSASectionView';
|
|
15
|
-
import { Actions } from './Actions';
|
|
16
15
|
export function NSALayout(props) {
|
|
17
|
-
var _a, _b, _c, _d, _e, _f, _g
|
|
16
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
18
17
|
const onLogout = () => __awaiter(this, void 0, void 0, function* () {
|
|
19
18
|
yield props.account.server.session.Logout().then(() => {
|
|
20
19
|
props.notifier.onSuccess("You have successfully logged out");
|
|
@@ -29,47 +28,18 @@ export function NSALayout(props) {
|
|
|
29
28
|
{ src: "https://static.namirasoft.com/image/concept/message/white.svg", alt: "Message", onClicked: onNotiffication, count: 1 },
|
|
30
29
|
];
|
|
31
30
|
let user_name = props.account.token_manager.getUserData(user => [user.first_name, user.last_name].filter(n => n).join(" "), "");
|
|
32
|
-
let action = props.action;
|
|
33
|
-
if (!action)
|
|
34
|
-
action = { title: "", description: "", menus: {} };
|
|
35
|
-
let groupname = "Actions";
|
|
36
|
-
if (((_a = props.pages) === null || _a === void 0 ? void 0 : _a.list) || ((_b = props.pages) === null || _b === void 0 ? void 0 : _b.new))
|
|
37
|
-
if (!action.menus[groupname])
|
|
38
|
-
action.menus[groupname] = [];
|
|
39
|
-
if ((_c = props.pages) === null || _c === void 0 ? void 0 : _c.list) {
|
|
40
|
-
action.menus[groupname].push(Actions.view([]));
|
|
41
|
-
action.menus[groupname].push(Actions.viewHistory([]));
|
|
42
|
-
action.menus[groupname].push(Actions.edit([]));
|
|
43
|
-
action.menus[groupname].push(Actions.delete([]));
|
|
44
|
-
}
|
|
45
|
-
if ((_d = props.pages) === null || _d === void 0 ? void 0 : _d.new) {
|
|
46
|
-
action.menus[groupname].push(Actions.view([]));
|
|
47
|
-
action.menus[groupname].push(Actions.viewHistory([]));
|
|
48
|
-
action.menus[groupname].push(Actions.edit([]));
|
|
49
|
-
action.menus[groupname].push(Actions.delete([]));
|
|
50
|
-
}
|
|
51
|
-
if ((_e = props.pages) === null || _e === void 0 ? void 0 : _e.view) {
|
|
52
|
-
action.menus[groupname].push(Actions.view([]));
|
|
53
|
-
action.menus[groupname].push(Actions.viewHistory([]));
|
|
54
|
-
action.menus[groupname].push(Actions.edit([]));
|
|
55
|
-
action.menus[groupname].push(Actions.delete([]));
|
|
56
|
-
}
|
|
57
31
|
let content;
|
|
58
|
-
if ((
|
|
32
|
+
if ((_a = props.pages) === null || _a === void 0 ? void 0 : _a.list)
|
|
59
33
|
content = _jsx(NSASectionList, Object.assign({}, props.pages.list, { children: props.children }));
|
|
60
|
-
else if ((
|
|
34
|
+
else if ((_b = props.pages) === null || _b === void 0 ? void 0 : _b.new)
|
|
61
35
|
content = _jsx(_Fragment, { children: _jsx(NSASectionNew, Object.assign({}, props.pages.new, { children: props.children })) });
|
|
62
|
-
else if ((
|
|
36
|
+
else if ((_c = props.pages) === null || _c === void 0 ? void 0 : _c.view)
|
|
63
37
|
content = _jsx(NSASectionView, Object.assign({}, props.pages.view, { children: props.children }));
|
|
64
38
|
else
|
|
65
39
|
content = props.children;
|
|
66
40
|
return (_jsx(NSLayout, Object.assign({}, props, { header: {
|
|
67
|
-
title: (user_name + " " + ((
|
|
68
|
-
icons: [...icons, ...((
|
|
69
|
-
}, action: {
|
|
70
|
-
title: (_p = (_o = props.action) === null || _o === void 0 ? void 0 : _o.title) !== null && _p !== void 0 ? _p : "",
|
|
71
|
-
description: (_q = props.action) === null || _q === void 0 ? void 0 : _q.description,
|
|
72
|
-
menus: action.menus
|
|
41
|
+
title: (user_name + " " + ((_e = (_d = props.header) === null || _d === void 0 ? void 0 : _d.title) !== null && _e !== void 0 ? _e : "")).trim(),
|
|
42
|
+
icons: [...icons, ...((_g = (_f = props.header) === null || _f === void 0 ? void 0 : _f.icons) !== null && _g !== void 0 ? _g : [])]
|
|
73
43
|
}, children: _jsx("div", { className: "container-fluid", children: content }) })));
|
|
74
44
|
}
|
|
75
45
|
//# sourceMappingURL=NSALayout.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NSALayout.js","sourceRoot":"","sources":["../../src/layouts/NSALayout.tsx"],"names":[],"mappings":";;;;;;;;;;AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"NSALayout.js","sourceRoot":"","sources":["../../src/layouts/NSALayout.tsx"],"names":[],"mappings":";;;;;;;;;;AAAA,OAAO,EAAG,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAElD,OAAO,EAAE,cAAc,EAAuB,MAAM,kBAAkB,CAAC;AACvE,OAAO,EAAE,aAAa,EAAsB,MAAM,iBAAiB,CAAC;AACpE,OAAO,EAAE,cAAc,EAAuB,MAAM,kBAAkB,CAAC;AAyBvE,MAAM,UAAU,SAAS,CAAa,KAAiC;;IAEtE,MAAM,QAAQ,GAAG,GAAS,EAAE;QAE3B,MAAM,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,E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I,MAAA,KAAK,CAAC,KAAK,0CAAE,IAAI;QACzB,OAAO,GAAG,KAAC,cAAc,oBAAiB,KAAK,CAAC,KAAK,CAAC,IAAI,cAAG,KAAK,CAAC,QAAQ,IAAkB,CAAC;;QAE9F,OAAO,GAAG,KAAK,CAAC,QAAQ,CAAC;IAE1B,OAAO,CACN,KAAC,QAAQ,oBACJ,KAAK,IACT,MAAM,EAAE;YACP,KAAK,EAAE,CAAC,SAAS,GAAG,GAAG,GAAG,CAAC,MAAA,MAAA,KAAK,CAAC,MAAM,0CAAE,KAAK,mCAAI,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE;YAC7D,KAAK,EAAE,CAAC,GAAG,KAAK,EAAE,GAAG,CAAC,MAAA,MAAA,KAAK,CAAC,MAAM,0CAAE,KAAK,mCAAI,EAAE,CAAC,CAAC;SACjD,YAOD,cAAK,SAAS,EAAC,iBAAiB,YAC9B,OAAO,GACH,IACI,CACX,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
.ns_login_container {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
align-items: center;
|
|
5
|
+
justify-content: center;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.ns_logo {
|
|
9
|
+
text-align: center;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.ns_title {
|
|
13
|
+
font-size: 32px;
|
|
14
|
+
font-weight: 700;
|
|
15
|
+
text-align: center;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.ns_button {
|
|
19
|
+
text-align: center;
|
|
20
|
+
}
|
package/package.json
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"framework": "npm",
|
|
9
9
|
"application": "package",
|
|
10
10
|
"private": false,
|
|
11
|
-
"version": "1.3.
|
|
11
|
+
"version": "1.3.40",
|
|
12
12
|
"author": "Amir Abolhasani",
|
|
13
13
|
"license": "MIT",
|
|
14
14
|
"main": "./dist/main.js",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"namirasoft-account": "^1.3.24",
|
|
28
28
|
"namirasoft-account-client": "^1.3.0",
|
|
29
29
|
"namirasoft-core": "^1.3.46",
|
|
30
|
-
"namirasoft-site-react": "^1.3.
|
|
30
|
+
"namirasoft-site-react": "^1.3.182",
|
|
31
31
|
"os-browserify": "^0.3.0",
|
|
32
32
|
"path-browserify": "^1.0.1",
|
|
33
33
|
"process": "^0.11.10",
|
package/src/App.css
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
1
|
import { useState } from 'react';
|
|
3
2
|
import message from '../assets/images/icon-notification.png';
|
|
4
3
|
import messageHeader from '../assets/images/icon-notification-header.png';
|
|
@@ -6,11 +5,8 @@ import Styles from './NSAMessageDialog.module.css';
|
|
|
6
5
|
import Toast from 'react-bootstrap/Toast';
|
|
7
6
|
import { NSButtonBlue } from "namirasoft-site-react";
|
|
8
7
|
|
|
9
|
-
|
|
10
8
|
export interface NSAMessageDialogProps
|
|
11
|
-
{
|
|
12
|
-
|
|
13
|
-
}
|
|
9
|
+
{}
|
|
14
10
|
|
|
15
11
|
export function NSAMessageDialog()
|
|
16
12
|
{
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { NSLayout } from 'namirasoft-site-react';
|
|
2
|
+
// import { INSBarActionProps, INSBarHeroBannerProps, INSBarNotificationProps, INSBarTitleProps, NSLayout } from 'namirasoft-site-react';
|
|
2
3
|
import { NSASectionList, NSASectionListProps } from './NSASectionList';
|
|
3
4
|
import { NSASectionNew, NSASectionNewProps } from './NSASectionNew';
|
|
4
5
|
import { NSASectionView, NSASectionViewProps } from './NSASectionView';
|
|
5
6
|
import { IHeaderProps } from 'namirasoft-site-react/dist/props/IHeaderProps';
|
|
6
7
|
import { ReactNode } from 'react';
|
|
7
|
-
import { Actions } from './Actions';
|
|
8
|
+
// import { Actions } from './Actions';
|
|
8
9
|
import { INSARouterProps } from '../INSARouterProps';
|
|
9
10
|
|
|
10
11
|
export interface NSALayoutProps<EntityType> extends INSARouterProps
|
|
@@ -13,10 +14,11 @@ export interface NSALayoutProps<EntityType> extends INSARouterProps
|
|
|
13
14
|
logo: string;
|
|
14
15
|
background?: string;
|
|
15
16
|
header?: IHeaderProps;
|
|
16
|
-
notifications:
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
notifications:[];
|
|
18
|
+
// notifications: INSBarNotificationProps[];
|
|
19
|
+
// action?: INSBarActionProps;
|
|
20
|
+
// banner?: INSBarHeroBannerProps;
|
|
21
|
+
// title?: INSBarTitleProps;
|
|
20
22
|
pages?: {
|
|
21
23
|
list?: NSASectionListProps<EntityType>;
|
|
22
24
|
new?: NSASectionNewProps<EntityType>;
|
|
@@ -48,35 +50,35 @@ export function NSALayout<EntityType>(props: NSALayoutProps<EntityType>)
|
|
|
48
50
|
|
|
49
51
|
let user_name = props.account.token_manager.getUserData(user => [user.first_name, user.last_name].filter(n => n).join(" "), "");
|
|
50
52
|
|
|
51
|
-
let action: INSBarActionProps | undefined = props.action;
|
|
52
|
-
if (!action)
|
|
53
|
-
|
|
53
|
+
// let action: INSBarActionProps | undefined = props.action;
|
|
54
|
+
// if (!action)
|
|
55
|
+
// action = { title: "", description: "", menus: {} };
|
|
54
56
|
|
|
55
|
-
let groupname = "Actions";
|
|
56
|
-
if (props.pages?.list || props.pages?.new)
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
if (props.pages?.list)
|
|
60
|
-
{
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
}
|
|
66
|
-
if (props.pages?.new)
|
|
67
|
-
{
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
}
|
|
73
|
-
if (props.pages?.view)
|
|
74
|
-
{
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
}
|
|
57
|
+
// let groupname = "Actions";
|
|
58
|
+
// if (props.pages?.list || props.pages?.new)
|
|
59
|
+
// if (!action.menus[groupname])
|
|
60
|
+
// action.menus[groupname] = [];
|
|
61
|
+
// if (props.pages?.list)
|
|
62
|
+
// {
|
|
63
|
+
// action.menus[groupname].push(Actions.view([]));
|
|
64
|
+
// action.menus[groupname].push(Actions.viewHistory([]));
|
|
65
|
+
// action.menus[groupname].push(Actions.edit([]));
|
|
66
|
+
// action.menus[groupname].push(Actions.delete([]));
|
|
67
|
+
// }
|
|
68
|
+
// if (props.pages?.new)
|
|
69
|
+
// {
|
|
70
|
+
// action.menus[groupname].push(Actions.view([]));
|
|
71
|
+
// action.menus[groupname].push(Actions.viewHistory([]));
|
|
72
|
+
// action.menus[groupname].push(Actions.edit([]));
|
|
73
|
+
// action.menus[groupname].push(Actions.delete([]));
|
|
74
|
+
// }
|
|
75
|
+
// if (props.pages?.view)
|
|
76
|
+
// {
|
|
77
|
+
// action.menus[groupname].push(Actions.view([]));
|
|
78
|
+
// action.menus[groupname].push(Actions.viewHistory([]));
|
|
79
|
+
// action.menus[groupname].push(Actions.edit([]));
|
|
80
|
+
// action.menus[groupname].push(Actions.delete([]));
|
|
81
|
+
// }
|
|
80
82
|
|
|
81
83
|
let content;
|
|
82
84
|
if (props.pages?.list)
|
|
@@ -95,11 +97,11 @@ export function NSALayout<EntityType>(props: NSALayoutProps<EntityType>)
|
|
|
95
97
|
title: (user_name + " " + (props.header?.title ?? "")).trim(),
|
|
96
98
|
icons: [...icons, ...(props.header?.icons ?? [])]
|
|
97
99
|
}}
|
|
98
|
-
action={{
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
}}
|
|
100
|
+
// action={{
|
|
101
|
+
// title: props.action?.title ?? "",
|
|
102
|
+
// description: props.action?.description,
|
|
103
|
+
// menus: action.menus
|
|
104
|
+
// }}
|
|
103
105
|
>
|
|
104
106
|
<div className="container-fluid">
|
|
105
107
|
{content}
|
package/src/main.ts
CHANGED