namirasoft-site-react 1.4.69 → 1.4.73
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/components/NSActionMenu.js +1 -1
- package/dist/components/NSActionMenu.js.map +1 -1
- package/dist/components/NSBarAction.js +2 -2
- package/dist/components/NSBarAction.js.map +1 -1
- package/dist/components/NSBarAction.module.css +1 -1
- package/dist/components/NSBarTitle.js +1 -1
- package/dist/components/NSBarTitle.js.map +1 -1
- package/dist/components/NSBoxBooleans.js +1 -1
- package/dist/components/NSBoxBooleans.js.map +1 -1
- package/dist/components/NSFilterBox.js +1 -1
- package/dist/components/NSFilterBox.js.map +1 -1
- package/dist/components/NSGroupedList.js +1 -1
- package/dist/components/NSGroupedList.js.map +1 -1
- package/dist/components/NSHeader.js +1 -1
- package/dist/components/NSHeader.js.map +1 -1
- package/dist/components/NSLayout.js +1 -1
- package/dist/components/NSLayout.js.map +1 -1
- package/dist/components/NSLoading.module.css +5 -3
- package/dist/components/NSRange.js +1 -1
- package/dist/components/NSRange.js.map +1 -1
- package/dist/components/NSRepeater.js +1 -1
- package/dist/components/NSRepeater.js.map +1 -1
- package/dist/components/NSTabPage.d.ts +1 -1
- package/dist/components/NSTabPage.js +2 -2
- package/dist/components/NSTabPage.js.map +1 -1
- package/dist/components/NSTimelineMonthly.js +2 -2
- package/dist/components/NSTimelineMonthly.js.map +1 -1
- package/dist/main.d.ts +1 -1
- package/dist/main.js +1 -1
- package/dist/main.js.map +1 -1
- package/package.json +2 -2
- package/src/components/NSActionMenu.tsx +1 -0
- package/src/components/NSBarAction.module.css +1 -1
- package/src/components/NSBarAction.tsx +2 -2
- package/src/components/NSBarTitle.tsx +1 -1
- package/src/components/NSBoxBooleans.tsx +1 -1
- package/src/components/NSFilterBox.tsx +1 -1
- package/src/components/NSGroupedList.tsx +20 -12
- package/src/components/NSHeader.tsx +214 -214
- package/src/components/NSLayout.tsx +2 -2
- package/src/components/NSLoading.module.css +5 -3
- package/src/components/NSRange.tsx +1 -2
- package/src/components/NSRepeater.tsx +1 -1
- package/src/components/NSTabPage.tsx +4 -4
- package/src/components/NSTimelineMonthly.tsx +2 -2
- package/src/main.ts +2 -2
|
@@ -29,7 +29,8 @@ interface INSGroupedListState
|
|
|
29
29
|
isVisible: boolean;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
export class NSGroupedList extends Component<INSGroupedListProps, INSGroupedListState>
|
|
32
|
+
export class NSGroupedList extends Component<INSGroupedListProps, INSGroupedListState>
|
|
33
|
+
{
|
|
33
34
|
private groupListRef = createRef<HTMLDivElement>();
|
|
34
35
|
|
|
35
36
|
constructor(props: INSGroupedListProps)
|
|
@@ -40,7 +41,7 @@ export class NSGroupedList extends Component<INSGroupedListProps, INSGroupedList
|
|
|
40
41
|
};
|
|
41
42
|
this.handleClickOutside = this.handleClickOutside.bind(this);
|
|
42
43
|
this.hide = this.hide.bind(this);
|
|
43
|
-
this.show = this.show.bind(this);
|
|
44
|
+
this.show = this.show.bind(this);
|
|
44
45
|
}
|
|
45
46
|
|
|
46
47
|
override componentDidMount()
|
|
@@ -48,36 +49,43 @@ export class NSGroupedList extends Component<INSGroupedListProps, INSGroupedList
|
|
|
48
49
|
document.addEventListener('mousedown', this.handleClickOutside);
|
|
49
50
|
}
|
|
50
51
|
|
|
51
|
-
override componentWillUnmount()
|
|
52
|
+
override componentWillUnmount()
|
|
53
|
+
{
|
|
52
54
|
document.removeEventListener('mousedown', this.handleClickOutside);
|
|
53
55
|
}
|
|
54
56
|
|
|
55
|
-
handleClickOutside(event: MouseEvent)
|
|
56
|
-
|
|
57
|
+
handleClickOutside(event: MouseEvent)
|
|
58
|
+
{
|
|
59
|
+
if (this.groupListRef.current && !this.groupListRef.current.contains(event.target as Node))
|
|
60
|
+
{
|
|
57
61
|
this.hide();
|
|
58
62
|
}
|
|
59
63
|
}
|
|
60
64
|
|
|
61
|
-
hide()
|
|
65
|
+
hide()
|
|
66
|
+
{
|
|
62
67
|
this.setState({ isVisible: false });
|
|
63
68
|
}
|
|
64
69
|
|
|
65
|
-
show()
|
|
70
|
+
show()
|
|
71
|
+
{
|
|
66
72
|
this.setState({ isVisible: true }, () =>
|
|
67
73
|
{
|
|
68
74
|
console.log("State after show:", this.state);
|
|
69
75
|
});
|
|
70
76
|
}
|
|
71
77
|
|
|
72
|
-
override render()
|
|
73
|
-
|
|
78
|
+
override render()
|
|
79
|
+
{
|
|
80
|
+
if (!this.state.isVisible)
|
|
81
|
+
{
|
|
74
82
|
return null;
|
|
75
83
|
}
|
|
76
84
|
|
|
77
85
|
return (
|
|
78
86
|
<div ref={this.groupListRef} className={Styles.ns_group_list_parent}>
|
|
79
87
|
{this.props.groups.map((group, index) => (
|
|
80
|
-
<ul key={index} className={Styles.ns_group_list}>
|
|
88
|
+
<ul key={`NSGroupedList_ul_key_${index}`} className={Styles.ns_group_list}>
|
|
81
89
|
<div className='d-flex w-100 justify-content-between align-items-center'>
|
|
82
90
|
<span className={Styles.ns_group_category}>{group.text}
|
|
83
91
|
<img
|
|
@@ -89,8 +97,8 @@ export class NSGroupedList extends Component<INSGroupedListProps, INSGroupedList
|
|
|
89
97
|
/>
|
|
90
98
|
</span>
|
|
91
99
|
</div>
|
|
92
|
-
{group.items.map((item
|
|
93
|
-
<li key={index} onClick={() => this.props.onClick(group.name, item.name)}>
|
|
100
|
+
{group.items.map((item) => (
|
|
101
|
+
<li key={`NSGroupedList_li_key_${index}`} onClick={() => this.props.onClick(group.name, item.name)}>
|
|
94
102
|
<div className={Styles.ns_group_item}>
|
|
95
103
|
<span>{item.text && <span>{item.text}</span>}</span>
|
|
96
104
|
<span style={item.text_bold ? { fontWeight: 'bold' } : {}}>
|
|
@@ -11,241 +11,241 @@ import { EnvService } from 'namirasoft-core'
|
|
|
11
11
|
import { INSRouterProps } from "../routing/INSRouterProps";
|
|
12
12
|
export interface INSHeaderProps extends IBaseComponentProps, INSRouterProps
|
|
13
13
|
{
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
14
|
+
scope: string;
|
|
15
|
+
name: string;
|
|
16
|
+
logo: string;
|
|
17
|
+
nav?: IBaseComponentProps;
|
|
18
|
+
header: IHeaderProps;
|
|
19
|
+
isLoggedIn: () => boolean;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
export interface NSHeaderState
|
|
23
23
|
{
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
filters: FilterLinkFullRow[];
|
|
25
|
+
selected: FilterLinkFullRow | null;
|
|
26
|
+
showNavbar: boolean;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
export class NSHeader extends React.Component<INSHeaderProps, NSHeaderState>
|
|
30
30
|
{
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
31
|
+
private cache: CacheService<{
|
|
32
|
+
rows: FilterLinkFullRow[];
|
|
33
|
+
count: number;
|
|
34
|
+
}>;
|
|
35
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
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
36
|
+
constructor(props: INSHeaderProps)
|
|
37
|
+
{
|
|
38
|
+
super(props);
|
|
39
|
+
this.state = {
|
|
40
|
+
filters: [],
|
|
41
|
+
selected: null,
|
|
42
|
+
showNavbar: false
|
|
43
|
+
};
|
|
44
|
+
this.hasChild = this.hasChild.bind(this);
|
|
45
|
+
this.onMenuItemToggled = this.onMenuItemToggled.bind(this);
|
|
46
|
+
this.render_menu = this.render_menu.bind(this);
|
|
47
|
+
this.render_menuItem = this.render_menuItem.bind(this);
|
|
48
|
+
this.handleShowNavbar = this.handleShowNavbar.bind(this);
|
|
49
|
+
this.cache = new CacheService<{
|
|
50
|
+
rows: FilterLinkFullRow[];
|
|
51
|
+
count: number;
|
|
52
|
+
}>("ns-header", 720, new IStorageLocal(), async () =>
|
|
53
|
+
{
|
|
54
|
+
let REACT_APP_BASE_URL_API_LINK = new EnvService("REACT_APP_BASE_URL_API_LINK", true).getString();
|
|
55
|
+
let server = new NamirasoftAPILinkServer(REACT_APP_BASE_URL_API_LINK, props.notifier.onError);
|
|
56
|
+
return server.filter.ListFilterLinks(this.props.scope, this.props.name, null, null, null);
|
|
57
|
+
}, () => { });
|
|
58
|
+
}
|
|
59
|
+
override componentDidMount(): void
|
|
60
|
+
{
|
|
61
|
+
this.cache.get().then(filters =>
|
|
62
|
+
{
|
|
63
|
+
this.setState({ filters: filters.rows });
|
|
64
|
+
}).catch(() => { });
|
|
65
|
+
}
|
|
66
|
+
private onMenuItemToggled(checked: boolean, selected: FilterLinkFullRow)
|
|
67
|
+
{
|
|
68
|
+
if (checked)
|
|
69
|
+
this.setState({ selected });
|
|
70
|
+
}
|
|
71
|
+
private getFilters(): FilterLinkFullRow[]
|
|
72
|
+
{
|
|
73
|
+
let loggedin = this.props.isLoggedIn();
|
|
74
|
+
let ans = this.state.filters?.filter(f =>
|
|
75
|
+
{
|
|
76
|
+
if (f.link)
|
|
77
|
+
{
|
|
78
|
+
if (loggedin)
|
|
79
|
+
return f.link.private;
|
|
80
|
+
return f.link.public;
|
|
81
|
+
}
|
|
82
|
+
return true;
|
|
83
|
+
}) ?? [];
|
|
84
84
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
85
|
+
while (true)
|
|
86
|
+
{
|
|
87
|
+
let old_length = ans.length;
|
|
88
|
+
let old = ans;
|
|
89
|
+
ans = ans.filter(f =>
|
|
90
|
+
{
|
|
91
|
+
if (f.link?.url)
|
|
92
|
+
return true;
|
|
93
|
+
return old.filter(x => x.parent_id === f.id).length > 0;
|
|
94
|
+
});
|
|
95
|
+
let new_length = ans.length;
|
|
96
|
+
if (old_length === new_length)
|
|
97
|
+
break;
|
|
98
|
+
}
|
|
99
99
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
100
|
+
return ans;
|
|
101
|
+
}
|
|
102
|
+
private hasChild(id: number): boolean
|
|
103
|
+
{
|
|
104
|
+
return this.getFilters().filter(f => f.parent_id === id).length > 0;
|
|
105
|
+
}
|
|
106
|
+
handleShowNavbar(): void
|
|
107
|
+
{
|
|
108
|
+
this.setState({ showNavbar: !this.state.showNavbar });
|
|
109
|
+
}
|
|
110
|
+
override render()
|
|
111
|
+
{
|
|
112
|
+
let nav: IBaseComponentProps | undefined = this.props.nav;
|
|
113
|
+
if (!nav)
|
|
114
|
+
nav = { style: {} };
|
|
115
|
+
if (!nav.style)
|
|
116
|
+
nav.style = {};
|
|
117
|
+
if (!nav.style?.backgroundColor)
|
|
118
|
+
nav.style.backgroundColor = "rgba(20, 27, 92, 1)";
|
|
119
|
+
return (
|
|
120
|
+
<header id={this.props.id}
|
|
121
|
+
className={`${Styles.ns_header} ${this.props.classList?.join(" ")}`}
|
|
122
|
+
style={this.props.style}
|
|
123
|
+
>
|
|
124
|
+
<nav
|
|
125
|
+
id={this.props.nav?.id}
|
|
126
|
+
className={`${Styles.ns_navbar} ${this.props.nav?.classList?.join(" ")}`}
|
|
127
|
+
style={nav?.style}
|
|
128
|
+
>
|
|
129
|
+
<div className={`${Styles.ns_navbar_parent_content} container`}>
|
|
130
|
+
<a className="me-2" href="/">
|
|
131
|
+
<img
|
|
132
|
+
src={this.props.logo}
|
|
133
|
+
alt="Logo"
|
|
134
|
+
width={48}
|
|
135
|
+
height={48}
|
|
136
|
+
/>
|
|
137
137
|
</a>
|
|
138
|
-
{
|
|
138
|
+
{this.props.header.logo_title &&
|
|
139
139
|
<h2 className={`${Styles.ns_navbar_title} mb-0 flex-shrink-0`}>
|
|
140
140
|
{this.props.header.logo_title}
|
|
141
|
-
</h2>
|
|
141
|
+
</h2>
|
|
142
142
|
}
|
|
143
143
|
<div className={`${Styles.ns_navbar_content} `} >
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
144
|
+
<div className={`${Styles.ns_navbar_elements} ${this.state.showNavbar && Styles.ns_navbar_active}`}>
|
|
145
|
+
{this.render_menu(0, null)}
|
|
146
|
+
</div>
|
|
147
|
+
{
|
|
148
|
+
this.props.header &&
|
|
149
|
+
<div className="d-flex gap-3 align-items-center">
|
|
150
|
+
<span className={Styles.ns_navbar_title}>{this.props.header?.title}</span>
|
|
151
|
+
{
|
|
152
|
+
this.props.header.icons.map((icon, index) =>
|
|
153
153
|
<div
|
|
154
|
-
key={index}
|
|
154
|
+
key={`NSHeader_div_icon_key${index}`}
|
|
155
155
|
title={icon.tooltip}
|
|
156
|
-
className={Styles.ns_header_icon}
|
|
156
|
+
className={Styles.ns_header_icon}
|
|
157
157
|
>
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
158
|
+
<img
|
|
159
|
+
src={icon.src}
|
|
160
|
+
alt={icon.alt}
|
|
161
|
+
width={20}
|
|
162
|
+
height={20}
|
|
163
163
|
onClick={() => icon.onClicked(icon)}
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
164
|
+
/>
|
|
165
|
+
{
|
|
166
|
+
icon.count !== 0 && icon.count &&
|
|
167
167
|
<div
|
|
168
168
|
className={Styles.ns_navbar_notification_count}
|
|
169
169
|
onClick={() => icon.onClicked(icon)}
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
170
|
+
>
|
|
171
|
+
{
|
|
172
|
+
icon.count < 100 ? icon.count : "+99"
|
|
173
|
+
}
|
|
174
|
+
</div>
|
|
175
|
+
}
|
|
176
|
+
{
|
|
177
|
+
icon.children
|
|
178
|
+
}
|
|
179
|
+
</div>
|
|
180
|
+
)
|
|
181
|
+
}
|
|
182
|
+
</div>
|
|
183
|
+
}
|
|
184
|
+
<div className={Styles.ns_navbar_menu_icon} onClick={this.handleShowNavbar}>
|
|
185
|
+
<img
|
|
186
|
+
src=
|
|
187
|
+
{
|
|
188
|
+
this.state.showNavbar ?
|
|
189
|
+
"https://static.namirasoft.com/image/concept/close/white.svg"
|
|
190
|
+
: "https://static.namirasoft.com/image/concept/menu/burger-white.svg"
|
|
191
|
+
}
|
|
192
|
+
alt="Menu Icon"
|
|
193
|
+
width={24}
|
|
194
|
+
height={24}
|
|
195
|
+
/>
|
|
196
|
+
</div>
|
|
197
|
+
</div>
|
|
198
|
+
</div>
|
|
199
|
+
</nav>
|
|
200
|
+
</header>
|
|
201
|
+
);
|
|
202
|
+
}
|
|
203
|
+
private render_menu(level: number, parent_id: number | null)
|
|
204
|
+
{
|
|
205
|
+
let fs: FilterLinkFullRow[] = this.getFilters().filter(f => f.parent_id === parent_id);
|
|
206
|
+
return (
|
|
207
|
+
<div className={`me-auto nav ${Styles.ns_navbar_items_container}`} >
|
|
208
|
+
{(fs?.map(f => this.render_menuItem(level, f)))}
|
|
209
|
+
</div>
|
|
210
|
+
);
|
|
211
|
+
}
|
|
212
|
+
private render_menuItem(level: number, filter: FilterLinkFullRow)
|
|
213
|
+
{
|
|
214
|
+
if (this.hasChild(filter.id))
|
|
215
|
+
{
|
|
216
|
+
let sub_menus = <></>;
|
|
217
|
+
if (level === 0)
|
|
218
|
+
if (this.state.selected)
|
|
219
|
+
{
|
|
220
|
+
sub_menus =
|
|
221
|
+
<div
|
|
222
|
+
id={`dropdown_items${filter.id}`}>
|
|
223
|
+
{this.render_menu(1, this.state.selected.id)}
|
|
224
|
+
</div >
|
|
225
|
+
}
|
|
226
|
+
return <NavDropdown
|
|
227
|
+
onToggle={(checked) => this.onMenuItemToggled(checked, filter)}
|
|
228
|
+
className={level === 0 ? Styles.ns_navbar_first_level_item : Styles.ns_navbar_second_level_item}
|
|
229
|
+
title={filter.name}
|
|
230
|
+
key={filter.id}
|
|
231
|
+
id={`dropdown_parent${filter.id}`}>
|
|
232
|
+
{sub_menus}
|
|
233
|
+
</NavDropdown >;
|
|
234
|
+
}
|
|
235
|
+
else
|
|
236
|
+
{
|
|
237
|
+
let href = filter.link?.url;
|
|
238
|
+
if (process.env.REACT_APP_STANDALONE)
|
|
239
|
+
if (href)
|
|
240
|
+
{
|
|
241
|
+
let url = new URL(href);
|
|
242
|
+
url.host = window.location.host;
|
|
243
|
+
url.protocol = window.location.protocol;
|
|
244
|
+
href = url.toString();
|
|
245
|
+
}
|
|
246
|
+
return (
|
|
247
|
+
<a key={filter.id} className={`${Styles.ns_navbar_items_link} ${level === 0 ? Styles.ns_navbar_first_level_item : Styles.ns_navbar_second_level_item}`} href={href}>{filter.name}</a>
|
|
248
|
+
);
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
251
|
}
|
|
@@ -71,7 +71,7 @@ export function NSLayout(props: INSLayoutProps)
|
|
|
71
71
|
<>
|
|
72
72
|
{
|
|
73
73
|
props.notifications.map((notification, index) =>
|
|
74
|
-
<Fragment key={index}>
|
|
74
|
+
<Fragment key={`NSLayout_fragment_key_${index}`}>
|
|
75
75
|
<NSBarNotification {...notification} />
|
|
76
76
|
</Fragment>
|
|
77
77
|
)
|
|
@@ -79,7 +79,7 @@ export function NSLayout(props: INSLayoutProps)
|
|
|
79
79
|
</>
|
|
80
80
|
}
|
|
81
81
|
{
|
|
82
|
-
alerts.length !== 0 && alerts.map((alert, index) => <NSBarAlert key={index} {...alert} />)
|
|
82
|
+
alerts.length !== 0 && alerts.map((alert, index) => <NSBarAlert key={`NSLayout_NSBarAlert_key_${index}`} {...alert} />)
|
|
83
83
|
}
|
|
84
84
|
{
|
|
85
85
|
isValidAction(props.action) && <NSBarAction {...props.action} />
|
|
@@ -21,9 +21,11 @@
|
|
|
21
21
|
repeating-conic-gradient(#0000 0deg, #000 1deg 20deg, #0000 21deg 36deg),
|
|
22
22
|
radial-gradient(farthest-side, #0000 calc(100% - 9px), #000 calc(100% - 8px));
|
|
23
23
|
-webkit-mask-composite: destination-in;
|
|
24
|
-
|
|
25
|
-
mask:
|
|
26
|
-
|
|
24
|
+
|
|
25
|
+
mask:
|
|
26
|
+
repeating-conic-gradient(#0000 0deg, #000 1deg 20deg, #0000 21deg 36deg),
|
|
27
|
+
radial-gradient(farthest-side, #0000 calc(100% - 9px), #000 calc(100% - 8px));
|
|
28
|
+
mask-composite: destination-in;
|
|
27
29
|
animation: s4 1s infinite steps(10);
|
|
28
30
|
}
|
|
29
31
|
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { useEffect, useState } from 'react';
|
|
2
2
|
import Styles from './NSRange.module.css';
|
|
3
3
|
import { IBaseComponentProps } from '../props/IBaseComponentProps';
|
|
4
|
-
|
|
5
4
|
import { Color } from "../Color";
|
|
6
5
|
|
|
7
6
|
export interface NSRangeRow
|
|
@@ -60,7 +59,7 @@ export function NSRange(props: INSRangeProps)
|
|
|
60
59
|
{
|
|
61
60
|
props.data?.map((data, index) =>
|
|
62
61
|
<span
|
|
63
|
-
key={index}
|
|
62
|
+
key={`NSRange_span_key_${index}`}
|
|
64
63
|
className={Styles.ns_range_time_line}
|
|
65
64
|
style={{
|
|
66
65
|
background: Color.getColor(data?.percentage),
|
|
@@ -166,7 +166,7 @@ export class NSRepeater<ItemType, ValueType> extends Component<NSRepeaterProps<I
|
|
|
166
166
|
{
|
|
167
167
|
if (this.state.items[index])
|
|
168
168
|
return this.props.createItem(i++, ref, this.onChange, this.onDelete);
|
|
169
|
-
return <Fragment key={index}></Fragment>;
|
|
169
|
+
return <Fragment key={`NSRepeater_fragment_key_${index}`}></Fragment>;
|
|
170
170
|
}
|
|
171
171
|
)
|
|
172
172
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import Styles from './NSTabPage.module.css';
|
|
3
|
-
import { IBaseComponentProps } from "../props/IBaseComponentProps";
|
|
4
2
|
import { Component } from "react";
|
|
3
|
+
import { IBaseComponentProps } from "../props/IBaseComponentProps";
|
|
4
|
+
import Styles from './NSTabPage.module.css';
|
|
5
5
|
|
|
6
6
|
export interface NSTabPageTab
|
|
7
7
|
{
|
|
@@ -46,7 +46,7 @@ export class NSTabPage extends Component<NSTabPageProps, NSTabPageState>
|
|
|
46
46
|
{
|
|
47
47
|
this.props.tabs.map((tab, index) => (
|
|
48
48
|
<li
|
|
49
|
-
key={index}
|
|
49
|
+
key={`NSTabPage_li_key_${index}`}
|
|
50
50
|
className={this.state.activeTabIndex === index ? Styles.active : ''}
|
|
51
51
|
onClick={() =>
|
|
52
52
|
{
|
|
@@ -63,7 +63,7 @@ export class NSTabPage extends Component<NSTabPageProps, NSTabPageState>
|
|
|
63
63
|
{
|
|
64
64
|
this.props.tabs.map((tab, index) => (
|
|
65
65
|
<div
|
|
66
|
-
key={index}
|
|
66
|
+
key={`NSTabPage_div_key_${index}`}
|
|
67
67
|
className={this.props.grid ? Styles.ns_tab_content_grid : Styles.ns_tab_content_column}
|
|
68
68
|
style={{ display: index === this.state.activeTabIndex ? "flex" : "none" }}
|
|
69
69
|
>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import Styles from './NSTimelineMonthly.module.css';
|
|
2
1
|
import { IBaseComponentProps } from "../props/IBaseComponentProps";
|
|
3
2
|
import { Color } from "../Color"
|
|
3
|
+
import Styles from './NSTimelineMonthly.module.css';
|
|
4
4
|
export interface NSdata
|
|
5
5
|
{
|
|
6
6
|
title: string;
|
|
@@ -27,7 +27,7 @@ export function NSTimelineMonthly(props: INSNSTimelineMonthlyProps)
|
|
|
27
27
|
<div className={Styles.ns_time_line_monthly}>
|
|
28
28
|
{
|
|
29
29
|
props.data.map((card, index) => (
|
|
30
|
-
<div className={Styles.ns_time_line_monthly_card} key={index}>
|
|
30
|
+
<div className={Styles.ns_time_line_monthly_card} key={`NSTimelineMonthly_div_key_${index}`}>
|
|
31
31
|
<h5 className={Styles.ns_time_line_monthly_card_week_day}>{card.title}</h5>
|
|
32
32
|
<span className={Styles.ns_time_line_cards_hour}>{card.value}</span>
|
|
33
33
|
<div className={Styles.ns_time_line_monthly_card_parent_chart}>
|
package/src/main.ts
CHANGED
|
@@ -102,6 +102,7 @@ export * from "./formatter/StringFormatter";
|
|
|
102
102
|
export * from "./formatter/TimeFormatter";
|
|
103
103
|
export * from "./formatter/UnknowFormatter";
|
|
104
104
|
export * from "./pages/NSNotFoundPage";
|
|
105
|
+
export * from "./pages/NSUpdating";
|
|
105
106
|
export * from "./props/IBaseComponentProps";
|
|
106
107
|
export * from "./props/IHeaderIconProps";
|
|
107
108
|
export * from "./props/IHeaderProps";
|
|
@@ -115,5 +116,4 @@ export * from "./routing/INSRouterMaker";
|
|
|
115
116
|
export * from "./routing/INSRouterProps";
|
|
116
117
|
export * from "./routing/INSRouterState";
|
|
117
118
|
export * from "./routing/Notifier";
|
|
118
|
-
export * from "./routing/NSRouterMaker";
|
|
119
|
-
export * from "./pages/NSUpdating";
|
|
119
|
+
export * from "./routing/NSRouterMaker";
|