namirasoft-account-react 1.3.78 → 1.3.80
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/config-overrides.js +72 -72
- package/dist/App.js +3 -2
- package/dist/App.js.map +1 -1
- package/dist/components/NSAMessageDialog.js +6 -3
- package/dist/components/NSAMessageDialog.js.map +1 -1
- package/dist/components/NSAMessageDialog.module.css +89 -62
- package/dist/layouts/NSASectionList.js +1 -1
- package/dist/layouts/NSASectionList.js.map +1 -1
- package/dist/pages/NSALoginPage.module.css +19 -19
- package/package.json +64 -64
- package/public/index.html +21 -21
- package/src/App.css +31 -56
- package/src/App.tsx +12 -10
- package/src/IEntityInfo.ts +23 -23
- package/src/INSARouterMaker.ts +8 -8
- package/src/INSARouterProps.ts +17 -17
- package/src/INSARouterState.ts +5 -5
- package/src/Info.ts +20 -20
- package/src/NSARouterMaker.tsx +138 -138
- package/src/components/NSADeleteModal.tsx +24 -24
- package/src/components/NSAMessageDialog.module.css +89 -62
- package/src/components/NSAMessageDialog.tsx +83 -65
- package/src/index.tsx +7 -7
- package/src/layouts/Actions.ts +92 -92
- package/src/layouts/NSALayout.tsx +193 -193
- package/src/layouts/NSASectionEdit.tsx +97 -97
- package/src/layouts/NSASectionList.tsx +105 -105
- package/src/layouts/NSASectionTabs.tsx +36 -36
- package/src/layouts/NSASectionView.tsx +15 -15
- package/src/main.ts +16 -16
- package/src/pages/NSALoginPage.module.css +19 -19
- package/src/pages/NSALoginPage.tsx +37 -37
- package/tsconfig.json +43 -43
- package/dist/App.css +0 -57
- package/dist/IAccountProps.d.ts +0 -22
- package/dist/IAccountProps.js +0 -3
- package/dist/IAccountProps.js.map +0 -10
- package/dist/IRouterMaker.d.ts +0 -8
- package/dist/IRouterMaker.js +0 -3
- package/dist/IRouterMaker.js.map +0 -1
- package/dist/IRouterState.d.ts +0 -5
- package/dist/IRouterState.js +0 -3
- package/dist/IRouterState.js.map +0 -1
- package/dist/IStorageCookie.d.ts +0 -10
- package/dist/IStorageCookie.js +0 -27
- package/dist/IStorageCookie.js.map +0 -1
- package/dist/Messenger.d.ts +0 -16
- package/dist/Messenger.js +0 -78
- package/dist/Messenger.js.map +0 -1
- package/dist/Notification.d.ts +0 -6
- package/dist/Notification.js +0 -3
- package/dist/Notification.js.map +0 -1
- package/dist/NotificationType.d.ts +0 -6
- package/dist/NotificationType.js +0 -11
- package/dist/NotificationType.js.map +0 -1
- package/dist/RouterMaker.d.ts +0 -25
- package/dist/RouterMaker.js +0 -125
- package/dist/RouterMaker.js.map +0 -1
- package/dist/RouterMaker.jsx +0 -118
- package/dist/RouterMaker.jsx.map +0 -1
- package/dist/components/NSALayoutAction.d.ts +0 -17
- package/dist/components/NSALayoutAction.js +0 -6
- package/dist/components/NSALayoutAction.js.map +0 -1
- package/dist/components/NSALayoutAction.module.css +0 -0
- package/dist/index.css +0 -0
- package/dist/layouts/NSALayoutList.d.ts +0 -17
- package/dist/layouts/NSALayoutList.js +0 -19
- package/dist/layouts/NSALayoutList.js.map +0 -1
- package/dist/layouts/NSASectionNew.d.ts +0 -9
- package/dist/layouts/NSASectionNew.js +0 -5
- package/dist/layouts/NSASectionNew.js.map +0 -1
- /package/dist/assets/images/{icon_close.png → icon-close.png} +0 -0
- /package/src/assets/images/{icon_close.png → icon-close.png} +0 -0
|
@@ -1,63 +1,90 @@
|
|
|
1
|
-
.nsa_message_icon {
|
|
2
|
-
cursor: pointer;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
.nsa_message_title {
|
|
6
|
-
color: hsla(212, 100%, 51%, 1)
|
|
7
|
-
}
|
|
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: rgba(3, 119, 255, 1);
|
|
49
|
-
right: -5px;
|
|
50
|
-
top: -5px;
|
|
51
|
-
color: #fff;
|
|
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;
|
|
1
|
+
.nsa_message_icon {
|
|
2
|
+
cursor: pointer;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.nsa_message_title {
|
|
6
|
+
color: hsla(212, 100%, 51%, 1)
|
|
7
|
+
}
|
|
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: rgba(3, 119, 255, 1);
|
|
49
|
+
right: -5px;
|
|
50
|
+
top: -5px;
|
|
51
|
+
color: #fff;
|
|
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
|
+
}
|
|
64
|
+
|
|
65
|
+
.nsa_toast_body {
|
|
66
|
+
padding: 0 !important;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.nsa_toast_header {
|
|
70
|
+
padding: 16px !important;
|
|
71
|
+
display: flex;
|
|
72
|
+
justify-content: space-between !important;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.nsa_toast {
|
|
76
|
+
|
|
77
|
+
width: max-content;
|
|
78
|
+
max-width: 100vw;
|
|
79
|
+
border: 8px;
|
|
80
|
+
position: absolute;
|
|
81
|
+
top: 0;
|
|
82
|
+
right: 0;
|
|
83
|
+
}
|
|
84
|
+
.nsa_toast div{
|
|
85
|
+
width: 100% !important;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.nsa_close_icon {
|
|
89
|
+
cursor: pointer;
|
|
63
90
|
}
|
|
@@ -1,66 +1,84 @@
|
|
|
1
|
-
import { Component } from 'react';
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
this.
|
|
22
|
-
this.
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
1
|
+
import { Component } from 'react';
|
|
2
|
+
import MessageHeader from '../assets/images/icon-notification-header.png';
|
|
3
|
+
import CloseToast from '../assets/images/icon-close.png';
|
|
4
|
+
import Styles from './NSAMessageDialog.module.css';
|
|
5
|
+
import Toast from 'react-bootstrap/Toast';
|
|
6
|
+
import { NSButtonBlue } from "namirasoft-site-react";
|
|
7
|
+
|
|
8
|
+
export interface NSAMessageDialogProps
|
|
9
|
+
{ }
|
|
10
|
+
|
|
11
|
+
export interface NSAMessageDialogState
|
|
12
|
+
{
|
|
13
|
+
show: boolean;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export class NSAMessageDialog extends Component<NSAMessageDialogProps, NSAMessageDialogState>
|
|
17
|
+
{
|
|
18
|
+
constructor(props: NSAMessageDialogProps)
|
|
19
|
+
{
|
|
20
|
+
super(props);
|
|
21
|
+
this.state = { show: false };
|
|
22
|
+
this.show = this.show.bind(this);
|
|
23
|
+
this.hide = this.hide.bind(this);
|
|
24
|
+
}
|
|
25
|
+
show()
|
|
26
|
+
{
|
|
27
|
+
this.setState({ show: true });
|
|
28
|
+
}
|
|
29
|
+
hide()
|
|
30
|
+
{
|
|
31
|
+
debugger
|
|
32
|
+
this.setState({ show: false });
|
|
33
|
+
}
|
|
34
|
+
override render()
|
|
35
|
+
{
|
|
36
|
+
return (
|
|
37
|
+
<>
|
|
38
|
+
{this.state.show &&
|
|
39
|
+
<div className={Styles.nsa_toast}>
|
|
40
|
+
<Toast show={this.state.show} onClose={this.hide}>
|
|
41
|
+
<div className={Styles.nsa_toast_header}>
|
|
42
|
+
<div>
|
|
43
|
+
<img
|
|
44
|
+
src={MessageHeader}
|
|
45
|
+
alt="MessageHeader"
|
|
46
|
+
width={22}
|
|
47
|
+
/>
|
|
48
|
+
<span className={`${Styles.nsa_message_title} ms-2`}>Mark All As Read</span>
|
|
49
|
+
</div>
|
|
50
|
+
<div>
|
|
51
|
+
<img
|
|
52
|
+
src={CloseToast}
|
|
53
|
+
alt="Close"
|
|
54
|
+
width={18}
|
|
55
|
+
onClick={this.hide}
|
|
56
|
+
className={Styles.nsa_close_icon}
|
|
57
|
+
/>
|
|
58
|
+
</div>
|
|
59
|
+
</div>
|
|
60
|
+
<div className={Styles.nsa_toast_body}>
|
|
61
|
+
<div className={Styles.nsa_body_green}>
|
|
62
|
+
<h3 className={`${Styles.nsa_message_item_title} nsa_font_16_bold`}>
|
|
63
|
+
<div className={`${Styles.nsa_message_item_dot_green}`}></div>
|
|
64
|
+
You’ve Unlocked Our Gold Membership!</h3>
|
|
65
|
+
<p className={`${Styles.nsa_message_item_content} nsa_font_13_normal`}>Learn More!</p>
|
|
66
|
+
</div>
|
|
67
|
+
<div className={Styles.nsa_body_gray}>
|
|
68
|
+
<h3 className={`${Styles.nsa_message_item_title} nsa_font_16_bold`}>
|
|
69
|
+
<div className={`${Styles.nsa_message_item_dot_gray}`}></div>
|
|
70
|
+
You’ve Unlocked Our Gold Membership!</h3>
|
|
71
|
+
<p className={`${Styles.nsa_message_item_content} nsa_font_13_normal`}>Learn More!</p>
|
|
72
|
+
</div>
|
|
73
|
+
<div className='p-3 mx-0 d-flex justify-content-center'>
|
|
74
|
+
<NSButtonBlue onClick={() => { }} title='View All' />
|
|
75
|
+
</div>
|
|
76
|
+
</div>
|
|
77
|
+
</Toast>
|
|
78
|
+
</div>
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
</>
|
|
82
|
+
);
|
|
83
|
+
}
|
|
66
84
|
}
|
package/src/index.tsx
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import ReactDOM from 'react-dom/client';
|
|
2
|
-
import './index.css';
|
|
3
|
-
import { App } from './App';
|
|
4
|
-
|
|
5
|
-
const root = ReactDOM.createRoot(
|
|
6
|
-
document.getElementById('root') as HTMLElement
|
|
7
|
-
);
|
|
1
|
+
import ReactDOM from 'react-dom/client';
|
|
2
|
+
import './index.css';
|
|
3
|
+
import { App } from './App';
|
|
4
|
+
|
|
5
|
+
const root = ReactDOM.createRoot(
|
|
6
|
+
document.getElementById('root') as HTMLElement
|
|
7
|
+
);
|
|
8
8
|
root.render(<App />);
|
package/src/layouts/Actions.ts
CHANGED
|
@@ -1,93 +1,93 @@
|
|
|
1
|
-
import { INSActionMenuProps } from "namirasoft-site-react";
|
|
2
|
-
import { INSARouterProps } from "../INSARouterProps";
|
|
3
|
-
import { IEntityInfo } from "../IEntityInfo";
|
|
4
|
-
|
|
5
|
-
export class Actions
|
|
6
|
-
{
|
|
7
|
-
static apply(handler: () => void): INSActionMenuProps
|
|
8
|
-
{
|
|
9
|
-
return {
|
|
10
|
-
id: "0",
|
|
11
|
-
menu_item: "Apply",
|
|
12
|
-
handler,
|
|
13
|
-
isActive() { return true; }
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
static new(props: INSARouterProps, entity: IEntityInfo<any>): INSActionMenuProps
|
|
17
|
-
{
|
|
18
|
-
return {
|
|
19
|
-
id: "1",
|
|
20
|
-
menu_item: "New",
|
|
21
|
-
handler: () =>
|
|
22
|
-
{
|
|
23
|
-
let link = props.url.getLink(entity.client.getNewURL(), {});
|
|
24
|
-
window.open(link, "_blank");
|
|
25
|
-
},
|
|
26
|
-
isActive() { return true; }
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
static view(props: INSARouterProps, entity: IEntityInfo<any>, getIDs: () => string[]): INSActionMenuProps
|
|
30
|
-
{
|
|
31
|
-
return {
|
|
32
|
-
id: "2",
|
|
33
|
-
menu_item: "View",
|
|
34
|
-
handler: () =>
|
|
35
|
-
{
|
|
36
|
-
let ids = getIDs();
|
|
37
|
-
let link = props.url.getLink(entity.client.getViewURL(ids[0]), {});
|
|
38
|
-
window.open(link, "_blank");
|
|
39
|
-
},
|
|
40
|
-
isActive() { return getIDs().length == 1; }
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
static viewHistory(getIDs: () => string[]): INSActionMenuProps
|
|
44
|
-
{
|
|
45
|
-
return {
|
|
46
|
-
id: "3",
|
|
47
|
-
menu_item: "View History",
|
|
48
|
-
handler: () =>
|
|
49
|
-
{
|
|
50
|
-
let link = "https://history.namirasoft.com/history/view?id=" + getIDs()[0];
|
|
51
|
-
window.open(link, "_blank");
|
|
52
|
-
},
|
|
53
|
-
isActive() { return getIDs().length == 1; }
|
|
54
|
-
};
|
|
55
|
-
}
|
|
56
|
-
static copy(props: INSARouterProps, entity: IEntityInfo<any>, getIDs: () => string[]): INSActionMenuProps
|
|
57
|
-
{
|
|
58
|
-
return {
|
|
59
|
-
id: "4",
|
|
60
|
-
menu_item: "Copy",
|
|
61
|
-
handler: () =>
|
|
62
|
-
{
|
|
63
|
-
let ids = getIDs();
|
|
64
|
-
let link = props.url.getLink(entity.client.getCopyURL(ids[0]), {});
|
|
65
|
-
window.open(link, "_blank");
|
|
66
|
-
},
|
|
67
|
-
isActive() { return getIDs().length == 1; }
|
|
68
|
-
};
|
|
69
|
-
}
|
|
70
|
-
static edit(props: INSARouterProps, entity: IEntityInfo<any>, getIDs: () => string[]): INSActionMenuProps
|
|
71
|
-
{
|
|
72
|
-
return {
|
|
73
|
-
id: "5",
|
|
74
|
-
menu_item: "Edit",
|
|
75
|
-
handler: () =>
|
|
76
|
-
{
|
|
77
|
-
let ids = getIDs();
|
|
78
|
-
let link = props.url.getLink(entity.client.getEditURL(ids[0]), {});
|
|
79
|
-
window.open(link, "_blank");
|
|
80
|
-
},
|
|
81
|
-
isActive() { return getIDs().length == 1; }
|
|
82
|
-
};
|
|
83
|
-
}
|
|
84
|
-
static delete(getIDs: () => string[], showDeleteModal: () => void): INSActionMenuProps
|
|
85
|
-
{
|
|
86
|
-
return {
|
|
87
|
-
id: "6",
|
|
88
|
-
menu_item: "Delete",
|
|
89
|
-
handler: showDeleteModal,
|
|
90
|
-
isActive() { return getIDs().length != 0; }
|
|
91
|
-
}
|
|
92
|
-
}
|
|
1
|
+
import { INSActionMenuProps } from "namirasoft-site-react";
|
|
2
|
+
import { INSARouterProps } from "../INSARouterProps";
|
|
3
|
+
import { IEntityInfo } from "../IEntityInfo";
|
|
4
|
+
|
|
5
|
+
export class Actions
|
|
6
|
+
{
|
|
7
|
+
static apply(handler: () => void): INSActionMenuProps
|
|
8
|
+
{
|
|
9
|
+
return {
|
|
10
|
+
id: "0",
|
|
11
|
+
menu_item: "Apply",
|
|
12
|
+
handler,
|
|
13
|
+
isActive() { return true; }
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
static new(props: INSARouterProps, entity: IEntityInfo<any>): INSActionMenuProps
|
|
17
|
+
{
|
|
18
|
+
return {
|
|
19
|
+
id: "1",
|
|
20
|
+
menu_item: "New",
|
|
21
|
+
handler: () =>
|
|
22
|
+
{
|
|
23
|
+
let link = props.url.getLink(entity.client.getNewURL(), {});
|
|
24
|
+
window.open(link, "_blank");
|
|
25
|
+
},
|
|
26
|
+
isActive() { return true; }
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
static view(props: INSARouterProps, entity: IEntityInfo<any>, getIDs: () => string[]): INSActionMenuProps
|
|
30
|
+
{
|
|
31
|
+
return {
|
|
32
|
+
id: "2",
|
|
33
|
+
menu_item: "View",
|
|
34
|
+
handler: () =>
|
|
35
|
+
{
|
|
36
|
+
let ids = getIDs();
|
|
37
|
+
let link = props.url.getLink(entity.client.getViewURL(ids[0]), {});
|
|
38
|
+
window.open(link, "_blank");
|
|
39
|
+
},
|
|
40
|
+
isActive() { return getIDs().length == 1; }
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
static viewHistory(getIDs: () => string[]): INSActionMenuProps
|
|
44
|
+
{
|
|
45
|
+
return {
|
|
46
|
+
id: "3",
|
|
47
|
+
menu_item: "View History",
|
|
48
|
+
handler: () =>
|
|
49
|
+
{
|
|
50
|
+
let link = "https://history.namirasoft.com/history/view?id=" + getIDs()[0];
|
|
51
|
+
window.open(link, "_blank");
|
|
52
|
+
},
|
|
53
|
+
isActive() { return getIDs().length == 1; }
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
static copy(props: INSARouterProps, entity: IEntityInfo<any>, getIDs: () => string[]): INSActionMenuProps
|
|
57
|
+
{
|
|
58
|
+
return {
|
|
59
|
+
id: "4",
|
|
60
|
+
menu_item: "Copy",
|
|
61
|
+
handler: () =>
|
|
62
|
+
{
|
|
63
|
+
let ids = getIDs();
|
|
64
|
+
let link = props.url.getLink(entity.client.getCopyURL(ids[0]), {});
|
|
65
|
+
window.open(link, "_blank");
|
|
66
|
+
},
|
|
67
|
+
isActive() { return getIDs().length == 1; }
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
static edit(props: INSARouterProps, entity: IEntityInfo<any>, getIDs: () => string[]): INSActionMenuProps
|
|
71
|
+
{
|
|
72
|
+
return {
|
|
73
|
+
id: "5",
|
|
74
|
+
menu_item: "Edit",
|
|
75
|
+
handler: () =>
|
|
76
|
+
{
|
|
77
|
+
let ids = getIDs();
|
|
78
|
+
let link = props.url.getLink(entity.client.getEditURL(ids[0]), {});
|
|
79
|
+
window.open(link, "_blank");
|
|
80
|
+
},
|
|
81
|
+
isActive() { return getIDs().length == 1; }
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
static delete(getIDs: () => string[], showDeleteModal: () => void): INSActionMenuProps
|
|
85
|
+
{
|
|
86
|
+
return {
|
|
87
|
+
id: "6",
|
|
88
|
+
menu_item: "Delete",
|
|
89
|
+
handler: showDeleteModal,
|
|
90
|
+
isActive() { return getIDs().length != 0; }
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
93
|
}
|