namirasoft-site-react 1.5.37 → 1.5.39

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.
Files changed (85) hide show
  1. package/dist/App.js +38 -0
  2. package/dist/App.js.map +1 -1
  3. package/dist/NSBoxBuilder.js +9 -7
  4. package/dist/NSBoxBuilder.js.map +1 -1
  5. package/dist/components/NSBanner.d.ts +1 -1
  6. package/dist/components/NSBarAction.d.ts +1 -1
  7. package/dist/components/NSBarNotification.js +1 -1
  8. package/dist/components/NSBarNotification.js.map +1 -1
  9. package/dist/components/NSBarTitle.js +1 -1
  10. package/dist/components/NSBarTitle.js.map +1 -1
  11. package/dist/components/NSBoxDateTime.js +1 -1
  12. package/dist/components/NSBoxDateTime.js.map +1 -1
  13. package/dist/components/NSBoxDuration.js +1 -1
  14. package/dist/components/NSBoxDuration.js.map +1 -1
  15. package/dist/components/NSBoxEntity.d.ts +2 -1
  16. package/dist/components/NSBoxEntity.js.map +1 -1
  17. package/dist/components/NSBoxTime.js +1 -1
  18. package/dist/components/NSBoxTime.js.map +1 -1
  19. package/dist/components/NSDialogInfo.js +1 -1
  20. package/dist/components/NSDialogInfo.js.map +1 -1
  21. package/dist/components/NSGaugeDate.d.ts +1 -1
  22. package/dist/components/NSGaugeDate.js +5 -1
  23. package/dist/components/NSGaugeDate.js.map +1 -1
  24. package/dist/components/NSGaugeNumber.d.ts +1 -1
  25. package/dist/components/NSGaugeNumber.js +3 -1
  26. package/dist/components/NSGaugeNumber.js.map +1 -1
  27. package/dist/components/NSHeader.js +26 -26
  28. package/dist/components/NSHeader.js.map +1 -1
  29. package/dist/components/NSHeader.module.css +32 -3
  30. package/dist/components/NSID.d.ts +1 -1
  31. package/dist/components/NSID.js +2 -1
  32. package/dist/components/NSID.js.map +1 -1
  33. package/dist/components/NSLabel.js +1 -1
  34. package/dist/components/NSLabel.js.map +1 -1
  35. package/dist/components/NSLink.js +1 -1
  36. package/dist/components/NSLink.js.map +1 -1
  37. package/dist/components/NSLink.module.css +20 -36
  38. package/dist/components/NSLinkBlue.js +1 -9
  39. package/dist/components/NSLinkBlue.js.map +1 -1
  40. package/dist/components/NSLinkGreen.js +1 -1
  41. package/dist/components/NSLinkGreen.js.map +1 -1
  42. package/dist/components/NSLinkRed.js +1 -1
  43. package/dist/components/NSLinkRed.js.map +1 -1
  44. package/dist/components/NSListProduct.d.ts +2 -1
  45. package/dist/components/NSListProduct.js.map +1 -1
  46. package/dist/components/NSTabPage.d.ts +1 -1
  47. package/dist/components/NSTabPage.js +1 -1
  48. package/dist/components/NSTabPage.js.map +1 -1
  49. package/dist/formatter/BaseURLImageFormatter.d.ts +1 -1
  50. package/dist/formatter/EmailFormatter.d.ts +1 -1
  51. package/dist/formatter/JsonFormatter.d.ts +1 -1
  52. package/dist/formatter/PhoneFormatter.d.ts +1 -1
  53. package/dist/formatter/SensitiveFormatter.d.ts +1 -1
  54. package/dist/formatter/URLFormatter.d.ts +1 -1
  55. package/package.json +6 -6
  56. package/src/App.tsx +39 -0
  57. package/src/NSBoxBuilder.tsx +5 -4
  58. package/src/components/NSBanner.tsx +1 -1
  59. package/src/components/NSBarAction.tsx +1 -1
  60. package/src/components/NSBarNotification.tsx +1 -1
  61. package/src/components/NSBarTitle.tsx +1 -1
  62. package/src/components/NSBoxDateTime.tsx +1 -1
  63. package/src/components/NSBoxDuration.tsx +1 -1
  64. package/src/components/NSBoxEntity.tsx +2 -1
  65. package/src/components/NSBoxTime.tsx +1 -1
  66. package/src/components/NSDialogInfo.tsx +1 -1
  67. package/src/components/NSGaugeDate.tsx +6 -1
  68. package/src/components/NSGaugeNumber.tsx +4 -1
  69. package/src/components/NSHeader.module.css +32 -3
  70. package/src/components/NSHeader.tsx +4 -2
  71. package/src/components/NSID.tsx +3 -1
  72. package/src/components/NSLabel.tsx +1 -1
  73. package/src/components/NSLink.module.css +20 -36
  74. package/src/components/NSLink.tsx +22 -26
  75. package/src/components/NSLinkBlue.tsx +15 -22
  76. package/src/components/NSLinkGreen.tsx +13 -13
  77. package/src/components/NSLinkRed.tsx +13 -13
  78. package/src/components/NSListProduct.tsx +2 -1
  79. package/src/components/NSTabPage.tsx +1 -1
  80. package/src/formatter/BaseURLImageFormatter.tsx +1 -1
  81. package/src/formatter/EmailFormatter.tsx +1 -1
  82. package/src/formatter/JsonFormatter.tsx +1 -1
  83. package/src/formatter/PhoneFormatter.tsx +1 -1
  84. package/src/formatter/SensitiveFormatter.tsx +1 -1
  85. package/src/formatter/URLFormatter.tsx +1 -1
@@ -1,5 +1,5 @@
1
1
  import { HTMLAttributeAnchorTarget } from "react";
2
- import { TableColumnInfo, TableRowInfo } from "../main";
2
+ import { TableColumnInfo, TableRowInfo } from "../components/NSTable";
3
3
  import { BaseColumnFormatter } from "./BaseColumnFormatter";
4
4
  export declare class URLFormatter extends BaseColumnFormatter {
5
5
  private formatter;
package/package.json CHANGED
@@ -8,7 +8,7 @@
8
8
  "framework": "npm",
9
9
  "application": "package",
10
10
  "private": false,
11
- "version": "1.5.37",
11
+ "version": "1.5.39",
12
12
  "author": "Amir Abolhasani",
13
13
  "license": "MIT",
14
14
  "main": "./dist/main.js",
@@ -24,15 +24,15 @@
24
24
  "@ant-design/icons": "^6.3.2",
25
25
  "@babel/plugin-proposal-private-property-in-object": "^7.21.11",
26
26
  "@babel/plugin-transform-private-property-in-object": "^7.29.7",
27
- "@types/node": "^26.2.0",
27
+ "@types/node": "^26.4.0",
28
28
  "@types/react": "^18.3.12",
29
29
  "@types/react-bootstrap": "^1.1.0",
30
30
  "@types/react-dom": "^18.3.1",
31
31
  "@types/react-gtm-module": "^2.0.4",
32
32
  "@uiw/react-json-view": "^2.0.0-alpha.43",
33
- "antd": "^6.6.1",
33
+ "antd": "^6.6.2",
34
34
  "async-mutex": "^0.5.0",
35
- "axios": "^1.19.0",
35
+ "axios": "^1.20.0",
36
36
  "bootstrap": "^5.3.8",
37
37
  "chart.js": "^4.5.1",
38
38
  "copyfiles": "^2.4.1",
@@ -42,7 +42,7 @@
42
42
  "namirasoft-core": "^1.5.10",
43
43
  "namirasoft-schema": "^1.5.0",
44
44
  "namirasoft-site": "^1.5.1",
45
- "namirasoft-site-map": "^1.5.1",
45
+ "namirasoft-site-map": "^1.5.2",
46
46
  "os-browserify": "^0.3.0",
47
47
  "path-browserify": "^1.0.1",
48
48
  "process": "^0.11.10",
@@ -56,7 +56,7 @@
56
56
  "react-phone-input-2": "^2.15.1",
57
57
  "react-router-dom": "7.9.1",
58
58
  "react-scripts": "^5.0.1",
59
- "webpack": "^5.109.2",
59
+ "webpack": "^5.110.1",
60
60
  "xlsx": "^0.18.5"
61
61
  },
62
62
  "eslintConfig": {
package/src/App.tsx CHANGED
@@ -128,6 +128,45 @@ export class App extends Component<AppProps, AppState>
128
128
  },
129
129
  mega_menu: true,
130
130
  onCollapse: () => { },
131
+ filters_postprocessor: (filters) =>
132
+ {
133
+ const now = new Date();
134
+ const names = [
135
+ "Model", "Load Balancer", "Failover", "Race", "Support",
136
+ "Analytics", "Billing", "Reports", "Settings", "Integrations",
137
+ "Users", "Teams", "Roles", "Audit Logs", "Notifications",
138
+ "API Keys", "Webhooks"
139
+ ];
140
+ const mocks = names.map((name, i) => ({
141
+ id: 100000 + i,
142
+ parent_id: null,
143
+ filter_id: 0,
144
+ link_id: i,
145
+ name,
146
+ logo: null,
147
+ order: i,
148
+ created_at: now,
149
+ updated_at: now,
150
+ filter: {} as any,
151
+ link: {
152
+ id: i,
153
+ category_id: 0,
154
+ domain_id: 0,
155
+ name,
156
+ url: `https://example.com/mock/${i}`,
157
+ logo: "",
158
+ public: true,
159
+ private: true,
160
+ importance: 0,
161
+ description: "",
162
+ created_at: now,
163
+ updated_at: now,
164
+ category: {} as any,
165
+ domain: {} as any,
166
+ },
167
+ }));
168
+ return [...filters, ...mocks];
169
+ },
131
170
  }}
132
171
  isLoggedIn={() => true}
133
172
  logo='https://static.namirasoft.com/image/namirasoft/access/logo/base.png'
@@ -29,7 +29,8 @@ import { INSBox } from "./components/INSBox";
29
29
  import { createRef } from "react";
30
30
  import { NSBoxBaseLayoutRecursive } from "./components/NSBoxBaseLayoutRecursive";
31
31
  import { NSMenuButtonMenuProps, safeMenuMenuItem } from "./components/NSMenuButton";
32
- import { NSBoxSchemaBase, NSBoxSchemaVariable } from "./main";
32
+ import { NSBoxSchemaBase } from "./components/NSBoxSchemaBase";
33
+ import { NSBoxSchemaVariable } from "./components/NSBoxSchemaVariable";
33
34
  import { NamirasoftMap } from "namirasoft-site-map";
34
35
 
35
36
  export class NSBoxBuilder extends BaseTypeBuilder<React.JSX.Element | null>
@@ -59,8 +60,8 @@ export class NSBoxBuilder extends BaseTypeBuilder<React.JSX.Element | null>
59
60
  this.title = this.props.title;
60
61
  if (!this.title)
61
62
  this.title = NamingConvention.auto.convert(this.props.variable.name, NamingConvention.Pascal_Case_Space);
62
- this.placeholder = props.variable.type.example ?? "";
63
- this.multiple = props.variable.tags["multiple"] === "true";
63
+ this.placeholder = props.variable.type?.example ?? "";
64
+ this.multiple = props.variable.tags?.["multiple"] === "true";
64
65
  this.menu = safeMenuMenuItem(this.props, () => { });
65
66
  this.menu.builtin.delete = { enabled: onDelete != null, onDelete: () => { onDelete?.() } };
66
67
  this.builders = this.ifOjbect((_, fields) =>
@@ -87,7 +88,7 @@ export class NSBoxBuilder extends BaseTypeBuilder<React.JSX.Element | null>
87
88
  }
88
89
  private ifOjbect<T>(handler: (schema: ObjectSchema, fields: BaseVariableSchema[]) => T): T | null
89
90
  {
90
- if (this.props.variable.type.type === VariableType.Object)
91
+ if (this.props.variable.type?.type === VariableType.Object)
91
92
  {
92
93
  let schema = this.props.variable.type as ObjectSchema;
93
94
 
@@ -1,5 +1,5 @@
1
1
  // todo move to its own probject: I guess this is Timify
2
- import { IImageProps } from "../main";
2
+ import { IImageProps } from "../props/IImageProps";
3
3
  import { IBaseComponentProps } from "../props/IBaseComponentProps";
4
4
  import Styles from "./NSBanner.module.css"
5
5
 
@@ -1,5 +1,5 @@
1
1
  import { ReactNode, useState } from 'react';
2
- import { IBaseComponentProps } from '../main';
2
+ import { IBaseComponentProps } from '../props/IBaseComponentProps';
3
3
  import Styles from './NSBarAction.module.css';
4
4
  import { NSDialogInfo } from './NSDialogInfo';
5
5
  import { NSMenuAction, NSMenuActionProps } from './NSMenuAction';
@@ -1,5 +1,5 @@
1
1
  import { useEffect } from "react";
2
- import { StringFormatter } from "../main";
2
+ import { StringFormatter } from "../formatter/StringFormatter";
3
3
  import { IBaseComponentProps } from "../props/IBaseComponentProps";
4
4
  import Styles from "./NSBarNotification.module.css";
5
5
 
@@ -1,5 +1,5 @@
1
1
  import Styles from './NSBarTitle.module.css';
2
- import { StringFormatter } from '../main';
2
+ import { StringFormatter } from '../formatter/StringFormatter';
3
3
 
4
4
  export interface NSBarTitleProps
5
5
  {
@@ -2,7 +2,7 @@
2
2
 
3
3
  import { NamingConvention, TimeOperation } from "namirasoft-core";
4
4
  import React, { createRef } from "react";
5
- import { DateTimeFormatter } from "../main";
5
+ import { DateTimeFormatter } from "../formatter/DateTimeFormatter";
6
6
  import { IBaseComponentProps } from "../props/IBaseComponentProps";
7
7
  import { IValidationProps } from "../props/IValidationProps";
8
8
  import { Validator } from "../Validator";
@@ -12,7 +12,7 @@ import { safeMenuMenuItem } from "./NSMenuButton";
12
12
  import { INSBoxBaseLayoutProps, NSBoxBaseLayout } from "./NSBoxBaseLayout";
13
13
  import { NamingConvention } from "namirasoft-core";
14
14
  import { INSBox } from "./INSBox";
15
- import { DurationFormatter } from "../main";
15
+ import { DurationFormatter } from "../formatter/DurationFormatter";
16
16
 
17
17
  export interface NSBoxDurationProps extends IBaseComponentProps, IValidationProps, IValidationStringProps, IValidationNumberProps, INSBoxBaseLayoutProps<NSBoxDuration, string>
18
18
  {
@@ -4,7 +4,8 @@ import { BaseMetaColumn, BaseMetaTable, FilterItem, FilterItemOperator, SortItem
4
4
  import { NSBaseMetaTable } from "namirasoft-site";
5
5
  import React, { createRef } from "react";
6
6
  import { INSBoxBaseComboProps, NSBoxBaseCombo } from "../components/NSBoxBaseCombo";
7
- import { IBaseComponentProps, IValidationProps } from "../main";
7
+ import { IBaseComponentProps } from "../props/IBaseComponentProps";
8
+ import { IValidationProps } from "../props/IValidationProps";
8
9
  import { INSBox } from "./INSBox";
9
10
 
10
11
  export type NSBoxEntityProps<Data> = NSBoxEntityPropsOption<Data> & NSBoxEntityPropsInner<Data> & IBaseComponentProps & IValidationProps & INSBoxBaseComboProps<NSBoxEntity<Data>>
@@ -11,7 +11,7 @@ import { INSBoxBaseLayoutProps, NSBoxBaseLayout } from "./NSBoxBaseLayout";
11
11
  import { safeMenuMenuItem } from "./NSMenuButton";
12
12
  import { NamingConvention } from "namirasoft-core";
13
13
  import { INSBox } from "./INSBox";
14
- import { TimeFormatter } from "../main";
14
+ import { TimeFormatter } from "../formatter/TimeFormatter";
15
15
 
16
16
  export interface NSBoxTimeProps extends IBaseComponentProps, IValidationProps, IValidationStringProps, INSBoxBaseLayoutProps<NSBoxTime, string>
17
17
  {
@@ -1,4 +1,4 @@
1
- import { StringFormatter } from "../main";
1
+ import { StringFormatter } from "../formatter/StringFormatter";
2
2
  import { NSDialogProps, NSDialog } from "./NSDialog";
3
3
  import { NSSpace, NSSpaceSizeType } from "./NSSpace";
4
4
  import { NSTitle } from "./NSTitle";
@@ -1,6 +1,11 @@
1
1
  import { URLOperation } from "namirasoft-core";
2
2
  import { useEffect, useState } from "react";
3
- import { IBaseComponentProps, NSDownTimer, NSLoading, NSNoData, NSPanel, NSSpace, NSSpaceSizeType } from "../main";
3
+ import { IBaseComponentProps } from "../props/IBaseComponentProps";
4
+ import { NSDownTimer } from "./NSDownTimer";
5
+ import { NSLoading } from "./NSLoading";
6
+ import { NSNoData } from "./NSNoData";
7
+ import { NSPanel } from "./NSPanel";
8
+ import { NSSpace, NSSpaceSizeType } from "./NSSpace";
4
9
  import { ILinkProps } from "../props/ILinkProps";
5
10
  import { NSGauge, NSGaugeColorProps } from "./NSGauge";
6
11
  import Styles from "./NSGaugeDate.module.css";
@@ -1,5 +1,8 @@
1
1
  import { URLOperation } from "namirasoft-core";
2
- import { IBaseComponentProps, NSLoading, NSNoData, NSPanel } from "../main";
2
+ import { IBaseComponentProps } from "../props/IBaseComponentProps";
3
+ import { NSLoading } from "./NSLoading";
4
+ import { NSNoData } from "./NSNoData";
5
+ import { NSPanel } from "./NSPanel";
3
6
  import { ILinkProps } from "../props/ILinkProps";
4
7
  import { NSGauge, NSGaugeColorProps } from "./NSGauge";
5
8
  import Styles from "./NSGaugeNumber.module.css";
@@ -18,11 +18,31 @@
18
18
 
19
19
  .ns_navbar_content {
20
20
  display: flex;
21
- flex-wrap: wrap-reverse;
21
+ flex-wrap: wrap;
22
22
  justify-content: flex-end;
23
23
  align-items: center;
24
24
  width: 100%;
25
25
  gap: 8px;
26
+ row-gap: 10px;
27
+ min-width: 0;
28
+ }
29
+
30
+ .ns_navbar_right_group {
31
+ display: flex;
32
+ align-items: center;
33
+ gap: 12px;
34
+ flex-shrink: 0;
35
+ margin-left: auto;
36
+ }
37
+
38
+ .ns_navbar_right_icons {
39
+ flex-shrink: 0;
40
+ }
41
+
42
+ .ns_navbar_search {
43
+ flex: 0 1 18rem;
44
+ min-width: 12rem;
45
+ max-width: 22rem;
26
46
  }
27
47
 
28
48
  .ns_navbar_login_status {
@@ -90,7 +110,7 @@
90
110
  .ns_navbar_items_container {
91
111
  margin-right: auto;
92
112
  margin-inline-end: auto;
93
- --bs-nav-link-padding-x: 1rem;
113
+ --bs-nav-link-padding-x: 0.75rem;
94
114
  --bs-nav-link-padding-y: 0.5rem;
95
115
  --bs-nav-link-font-weight: ;
96
116
  --bs-nav-link-color: var(--bs-link-color);
@@ -98,6 +118,9 @@
98
118
  --bs-nav-link-disabled-color: var(--bs-secondary-color);
99
119
  display: flex;
100
120
  flex-wrap: wrap;
121
+ align-items: center;
122
+ row-gap: 4px;
123
+ column-gap: 2px;
101
124
  padding-left: 0;
102
125
  margin-bottom: 0;
103
126
  list-style: none;
@@ -161,7 +184,13 @@
161
184
 
162
185
  @media only screen and (min-width: 1023px) {
163
186
  .ns_navbar_content {
164
- justify-content: space-between;
187
+ justify-content: flex-start;
188
+ flex-wrap: nowrap;
189
+ }
190
+
191
+ .ns_navbar_elements {
192
+ flex: 1 1 auto;
193
+ min-width: 0;
165
194
  }
166
195
 
167
196
  .ns_navbar_parent_content {
@@ -168,6 +168,7 @@ export class NSHeader extends Component<NSHeaderProps, NSHeaderState>
168
168
  <div className={`${Styles.ns_navbar_elements} ${this.state.show_navbar && Styles.ns_navbar_active}`}>
169
169
  {this.render_menu(0, null)}
170
170
  </div>
171
+ <div className={Styles.ns_navbar_right_group}>
171
172
  <NSBoxSearch
172
173
  ref={this.NSBoxSearch_Ref}
173
174
  required={false}
@@ -175,7 +176,7 @@ export class NSHeader extends Component<NSHeaderProps, NSHeaderState>
175
176
  hideHeader
176
177
  placeholder="Search"
177
178
  autoComplete="one-time-code"
178
- style={{ flex: 0.8, minWidth: "15rem" }}
179
+ classList={[Styles.ns_navbar_search]}
179
180
  input={{
180
181
  style: { zIndex: 800 },
181
182
  name: "search",
@@ -212,7 +213,7 @@ export class NSHeader extends Component<NSHeaderProps, NSHeaderState>
212
213
  }
213
214
  {
214
215
  this.props.right &&
215
- <div className="d-flex gap-3 align-items-center">
216
+ <div className={`d-flex gap-3 align-items-center ${Styles.ns_navbar_right_icons}`}>
216
217
  {
217
218
  this.props.right?.title &&
218
219
  <span className={Styles.ns_navbar_title}>{this.props.right?.title}</span>
@@ -270,6 +271,7 @@ export class NSHeader extends Component<NSHeaderProps, NSHeaderState>
270
271
  }
271
272
  </div>
272
273
  }
274
+ </div>
273
275
  </div>
274
276
  </div>
275
277
  </nav>
@@ -2,7 +2,9 @@ import { BaseUUID, CacheService, EncodingOperation, EncodingOperationPartType, I
2
2
  import { NSBaseMetaTable, NSBaseServer } from 'namirasoft-site';
3
3
  import { NamirasoftMap } from 'namirasoft-site-map';
4
4
  import React from 'react';
5
- import { BaseURLImageFormatter, IBaseComponentProps, NSCopy } from '../main';
5
+ import { BaseURLImageFormatter } from '../formatter/BaseURLImageFormatter';
6
+ import { IBaseComponentProps } from '../props/IBaseComponentProps';
7
+ import { NSCopy } from './NSCopy';
6
8
 
7
9
  export interface NSIDProps extends IBaseComponentProps
8
10
  {
@@ -4,7 +4,7 @@ import Styles from './NSLabel.module.css'
4
4
  import React from "react";
5
5
  import { ReactNode } from "react";
6
6
  import { IBaseComponentProps } from '../props/IBaseComponentProps';
7
- import { StringFormatter } from '../main';
7
+ import { StringFormatter } from '../formatter/StringFormatter';
8
8
 
9
9
  export interface NSLabelProps extends IBaseComponentProps
10
10
  {
@@ -1,37 +1,21 @@
1
- .ns_link_parent {
2
- display: flex;
3
- flex-direction: column;
4
- justify-content: center;
5
- align-items: center;
6
- width: 100%;
7
- gap: 24px;
8
- }
9
-
10
- .ns_link {
11
- text-decoration: none;
12
- /* box-shadow: inset 2px 2px 2px 0 #1754F3; */
13
- box-shadow: inset 0 -4px 4px 0px rgb(0 0 0 / 25%);
14
- color: #fff;
15
- font-size: 16px;
16
- font-weight: 600;
17
- line-height: 16px;
18
- display: flex;
19
- justify-content: center;
20
- align-items: center;
21
- border-radius: 8px;
22
- width: 358px;
23
- height: 48px;
24
- width: 100%;
25
- }
26
-
27
- .ns_link_absolute {
28
- position: absolute;
29
- width: 100%;
30
- height: 100%;
31
- left: 0;
32
- right: 0;
33
- top: 0;
34
- bottom: 0;
35
- cursor: pointer;
36
- background-color: transparent !important;
1
+ .ns_link_parent {
2
+ display: inline;
3
+ }
4
+
5
+ .ns_link {
6
+ text-decoration: underline;
7
+ cursor: pointer;
8
+ font-weight: 500;
9
+ }
10
+
11
+ .ns_link_absolute {
12
+ position: absolute;
13
+ width: 100%;
14
+ height: 100%;
15
+ left: 0;
16
+ right: 0;
17
+ top: 0;
18
+ bottom: 0;
19
+ cursor: pointer;
20
+ background-color: transparent !important;
37
21
  }
@@ -1,27 +1,23 @@
1
- import { IBaseComponentProps } from "../props/IBaseComponentProps";
2
- import { ILinkProps } from "../props/ILinkProps";
3
- import Styles from "./NSLink.module.css";
4
-
5
- export interface NSLinkProps extends ILinkProps, IBaseComponentProps
6
- {
7
- children?: React.ReactNode;
8
- }
9
-
10
- export function NSLink(props: NSLinkProps)
11
- {
12
- return (
13
- <div
14
- id={props.id}
15
- className={`${Styles.ns_link_parent} ${props.classList?.join(" ") ?? ""}`}
16
- >
17
- <a
18
- className={`text-white text-decoration-none ${props.children ? Styles.ns_link : Styles.ns_link_absolute}`}
19
- href={props.href}
20
- target={props?.target ?? "_self"}
21
- style={props.style}
22
- >
23
- {props.children}
24
- </a>
25
- </div>
26
- );
1
+ import { IBaseComponentProps } from "../props/IBaseComponentProps";
2
+ import { ILinkProps } from "../props/ILinkProps";
3
+ import Styles from "./NSLink.module.css";
4
+
5
+ export interface NSLinkProps extends ILinkProps, IBaseComponentProps
6
+ {
7
+ children?: React.ReactNode;
8
+ }
9
+
10
+ export function NSLink(props: NSLinkProps)
11
+ {
12
+ return (
13
+ <a
14
+ id={props.id}
15
+ className={`${props.children ? Styles.ns_link : Styles.ns_link_absolute} ${props.classList?.join(" ") ?? ""}`}
16
+ href={props.href}
17
+ target={props?.target ?? "_self"}
18
+ style={props.style}
19
+ >
20
+ {props.children}
21
+ </a>
22
+ );
27
23
  }
@@ -1,23 +1,16 @@
1
- import { NSBox } from "./NSBox";
2
- import { NSLink, NSLinkProps } from "./NSLink";
3
-
4
- export function NSLinkBlue(props: NSLinkProps)
5
- {
6
- return (
7
- <NSLink
8
- id={props.id}
9
- style=
10
- {{
11
- color: "#fff",
12
- border: "none",
13
- backgroundColor: "rgba(3, 119, 255, 1)",
14
- width: NSBox.width.one,
15
- height: NSBox.height.box,
16
- boxShadow: "inset 0 - 4px 4px 0px rgb(0 0 0 / 25 %)"
17
- }}
18
- href={props.href}
19
- target={props.target ?? "_self"}
20
- >
21
- {props.children}
22
- </NSLink>);
1
+ import { NSLink, NSLinkProps } from "./NSLink";
2
+
3
+ export function NSLinkBlue(props: NSLinkProps)
4
+ {
5
+ return (
6
+ <NSLink
7
+ id={props.id}
8
+ classList={props.classList}
9
+ style={{ color: "rgba(3, 119, 255, 1)", ...props.style }}
10
+ href={props.href}
11
+ target={props.target ?? "_self"}
12
+ >
13
+ {props.children}
14
+ </NSLink>
15
+ );
23
16
  }
@@ -1,14 +1,14 @@
1
- import { NSLink, NSLinkProps } from "./NSLink";
2
-
3
- export function NSLinkGreen(props: NSLinkProps)
4
- {
5
- return <NSLink
6
- id={props.id}
7
- classList={props.classList}
8
- style={{ ...props.style, backgroundColor: "#06D182" }}
9
- href={props.href}
10
- target={props.target ?? "_self"}
11
- >
12
- {props.children}
13
- </NSLink>;
1
+ import { NSLink, NSLinkProps } from "./NSLink";
2
+
3
+ export function NSLinkGreen(props: NSLinkProps)
4
+ {
5
+ return <NSLink
6
+ id={props.id}
7
+ classList={props.classList}
8
+ style={{ color: "#06D182", ...props.style }}
9
+ href={props.href}
10
+ target={props.target ?? "_self"}
11
+ >
12
+ {props.children}
13
+ </NSLink>;
14
14
  }
@@ -1,14 +1,14 @@
1
- import { NSLink, NSLinkProps } from "./NSLink";
2
-
3
- export function NSLinkRed(props: NSLinkProps)
4
- {
5
- return <NSLink
6
- id={props.id}
7
- classList={props.classList}
8
- style={{ ...props.style, backgroundColor: "rgb(265, 63, 63, 1)" }}
9
- href={props.href}
10
- target={props.target ?? "_self"}
11
- >
12
- {props.children}
13
- </NSLink>;
1
+ import { NSLink, NSLinkProps } from "./NSLink";
2
+
3
+ export function NSLinkRed(props: NSLinkProps)
4
+ {
5
+ return <NSLink
6
+ id={props.id}
7
+ classList={props.classList}
8
+ style={{ color: "rgb(265, 63, 63, 1)", ...props.style }}
9
+ href={props.href}
10
+ target={props.target ?? "_self"}
11
+ >
12
+ {props.children}
13
+ </NSLink>;
14
14
  }
@@ -1,7 +1,8 @@
1
1
  import { NamirasoftAPIProductServer, ProductFullRow } from "namirasoft-api-product";
2
2
  import { EnvService, SearchOperation } from 'namirasoft-core';
3
3
  import { useEffect, useState } from "react";
4
- import { IImageProps, ILinkProps } from "../main";
4
+ import { IImageProps } from "../props/IImageProps";
5
+ import { ILinkProps } from "../props/ILinkProps";
5
6
  import { NSCard } from "./NSCard";
6
7
  import { NSSection } from "./NSSection";
7
8
 
@@ -2,7 +2,7 @@
2
2
  import { Component, createRef } from "react";
3
3
  import { IBaseComponentProps } from "../props/IBaseComponentProps";
4
4
  import Styles from './NSTabPage.module.css';
5
- import { NSInfo, NSInfoProps } from "../main";
5
+ import { NSInfo, NSInfoProps } from "./NSInfo";
6
6
 
7
7
  export interface NSTabPageTab extends IBaseComponentProps
8
8
  {
@@ -1,5 +1,5 @@
1
1
  import { HTMLAttributeAnchorTarget } from "react";
2
- import { TableColumnInfo, TableRowInfo } from "../main";
2
+ import { TableColumnInfo, TableRowInfo } from "../components/NSTable";
3
3
  import { BaseColumnFormatter } from "./BaseColumnFormatter";
4
4
 
5
5
  export class BaseURLImageFormatter extends BaseColumnFormatter
@@ -1,4 +1,4 @@
1
- import { TableColumnInfo, TableRowInfo } from "../main";
1
+ import { TableColumnInfo, TableRowInfo } from "../components/NSTable";
2
2
  import { BaseColumnFormatter } from "./BaseColumnFormatter";
3
3
  import { BaseURLImageFormatter } from "./BaseURLImageFormatter";
4
4
 
@@ -1,5 +1,5 @@
1
1
  import { BaseColumnFormatter } from "./BaseColumnFormatter";
2
- import { TableColumnInfo, TableRowInfo } from "../main";
2
+ import { TableColumnInfo, TableRowInfo } from "../components/NSTable";
3
3
  import JsonView from "@uiw/react-json-view";
4
4
 
5
5
  export class JsonFormatter extends BaseColumnFormatter
@@ -1,4 +1,4 @@
1
- import { TableColumnInfo, TableRowInfo } from "../main";
1
+ import { TableColumnInfo, TableRowInfo } from "../components/NSTable";
2
2
  import { BaseColumnFormatter } from "./BaseColumnFormatter";
3
3
  import { BaseURLImageFormatter } from "./BaseURLImageFormatter";
4
4
 
@@ -1,5 +1,5 @@
1
1
  import NSLabelSensitive from "../components/NSLabelSensitive";
2
- import { TableColumnInfo, TableRowInfo } from "../main";
2
+ import { TableColumnInfo, TableRowInfo } from "../components/NSTable";
3
3
  import { BaseColumnFormatter } from "./BaseColumnFormatter";
4
4
 
5
5
  export class SensitiveFormatter<RowType = any> extends BaseColumnFormatter
@@ -1,5 +1,5 @@
1
1
  import { HTMLAttributeAnchorTarget } from "react";
2
- import { TableColumnInfo, TableRowInfo } from "../main";
2
+ import { TableColumnInfo, TableRowInfo } from "../components/NSTable";
3
3
  import { BaseColumnFormatter } from "./BaseColumnFormatter";
4
4
  import { BaseURLImageFormatter } from "./BaseURLImageFormatter";
5
5