namirasoft-site-react 1.3.112 → 1.3.114

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 (124) hide show
  1. package/dist/App.js +4 -3
  2. package/dist/App.js.map +1 -1
  3. package/dist/components/{NSInputDate.d.ts → NSBoxDate.d.ts} +4 -4
  4. package/dist/components/{NSInputDate.js → NSBoxDate.js} +5 -5
  5. package/dist/components/NSBoxDate.js.map +1 -0
  6. package/dist/components/NSBoxDateTime.d.ts +21 -0
  7. package/dist/components/NSBoxDateTime.js +41 -0
  8. package/dist/components/NSBoxDateTime.js.map +1 -0
  9. package/dist/components/{NSInputInteger.d.ts → NSBoxDouble.d.ts} +5 -5
  10. package/dist/components/{NSInputPrice.js → NSBoxDouble.js} +8 -8
  11. package/dist/components/NSBoxDouble.js.map +1 -0
  12. package/dist/components/{NSInputDuration.d.ts → NSBoxDuration.d.ts} +4 -4
  13. package/dist/components/{NSInputDuration.js → NSBoxDuration.js} +5 -5
  14. package/dist/components/NSBoxDuration.js.map +1 -0
  15. package/dist/components/{NSInputTime.d.ts → NSBoxEmail.d.ts} +5 -5
  16. package/dist/components/{NSInputEmail.js → NSBoxEmail.js} +5 -5
  17. package/dist/components/NSBoxEmail.js.map +1 -0
  18. package/dist/components/NSBoxEntity.d.ts +12 -0
  19. package/dist/components/NSBoxEntity.js +10 -0
  20. package/dist/components/NSBoxEntity.js.map +1 -0
  21. package/dist/components/NSBoxEnum.d.ts +7 -0
  22. package/dist/components/NSBoxEnum.js +38 -0
  23. package/dist/components/NSBoxEnum.js.map +1 -0
  24. package/dist/components/NSBoxErrorNotifier.d.ts +5 -0
  25. package/dist/components/{NSInputErrorNotifier.js → NSBoxErrorNotifier.js} +3 -3
  26. package/dist/components/NSBoxErrorNotifier.js.map +1 -0
  27. package/dist/components/{NSInputIP.d.ts → NSBoxIPV4.d.ts} +4 -4
  28. package/dist/components/{NSInputIP.js → NSBoxIPV4.js} +6 -5
  29. package/dist/components/NSBoxIPV4.js.map +1 -0
  30. package/dist/components/{NSInputEmail.d.ts → NSBoxIPV6.d.ts} +5 -5
  31. package/dist/components/NSBoxIPV6.js +44 -0
  32. package/dist/components/NSBoxIPV6.js.map +1 -0
  33. package/dist/components/{NSInputFloat.d.ts → NSBoxInteger.d.ts} +5 -5
  34. package/dist/components/{NSInputInteger.js → NSBoxInteger.js} +5 -5
  35. package/dist/components/NSBoxInteger.js.map +1 -0
  36. package/dist/components/{NSInputString.d.ts → NSBoxPassword.d.ts} +4 -4
  37. package/dist/components/{NSInputPassword.js → NSBoxPassword.js} +5 -5
  38. package/dist/components/NSBoxPassword.js.map +1 -0
  39. package/dist/components/{NSInputPhone.d.ts → NSBoxPhone.d.ts} +4 -4
  40. package/dist/components/{NSInputPhone.js → NSBoxPhone.js} +5 -5
  41. package/dist/components/NSBoxPhone.js.map +1 -0
  42. package/dist/components/{NSInputPrice.d.ts → NSBoxPrice.d.ts} +5 -5
  43. package/dist/components/{NSInputFloat.js → NSBoxPrice.js} +5 -5
  44. package/dist/components/NSBoxPrice.js.map +1 -0
  45. package/dist/components/{NSInputSearch.d.ts → NSBoxSearch.d.ts} +4 -4
  46. package/dist/components/{NSInputSearch.js → NSBoxSearch.js} +5 -5
  47. package/dist/components/NSBoxSearch.js.map +1 -0
  48. package/dist/components/{NSInputText.d.ts → NSBoxString.d.ts} +4 -4
  49. package/dist/components/{NSInputString.js → NSBoxString.js} +5 -5
  50. package/dist/components/NSBoxString.js.map +1 -0
  51. package/dist/components/NSBoxText.d.ts +22 -0
  52. package/dist/components/{NSInputText.js → NSBoxText.js} +5 -5
  53. package/dist/components/NSBoxText.js.map +1 -0
  54. package/dist/components/NSBoxTime.d.ts +22 -0
  55. package/dist/components/{NSInputTime.js → NSBoxTime.js} +5 -5
  56. package/dist/components/NSBoxTime.js.map +1 -0
  57. package/dist/components/NSHeader.module.css +4 -3
  58. package/dist/components/NSSelectBox.d.ts +1 -0
  59. package/dist/components/NSSelectBox.js +3 -2
  60. package/dist/components/NSSelectBox.js.map +1 -1
  61. package/dist/components/NSTable.js +2 -2
  62. package/dist/components/NSTable.js.map +1 -1
  63. package/dist/main.d.ts +15 -14
  64. package/dist/main.js +15 -14
  65. package/dist/main.js.map +1 -1
  66. package/package.json +2 -2
  67. package/src/App.tsx +13 -2
  68. package/src/components/NSBoxDate.tsx +81 -0
  69. package/src/components/NSBoxDateTime.tsx +81 -0
  70. package/src/components/NSBoxDouble.tsx +92 -0
  71. package/src/components/NSBoxDuration.tsx +91 -0
  72. package/src/components/NSBoxEmail.tsx +90 -0
  73. package/src/components/NSBoxEntity.tsx +29 -0
  74. package/src/components/NSBoxEnum.tsx +54 -0
  75. package/src/components/NSBoxErrorNotifier.tsx +28 -0
  76. package/src/components/NSBoxIPV4.tsx +96 -0
  77. package/src/components/NSBoxIPV6.tsx +93 -0
  78. package/src/components/NSBoxInteger.tsx +89 -0
  79. package/src/components/NSBoxPassword.tsx +89 -0
  80. package/src/components/NSBoxPhone.tsx +83 -0
  81. package/src/components/NSBoxPrice.tsx +91 -0
  82. package/src/components/{NSInputSearch.tsx → NSBoxSearch.tsx} +9 -9
  83. package/src/components/NSBoxString.tsx +89 -0
  84. package/src/components/NSBoxText.tsx +89 -0
  85. package/src/components/NSBoxTime.tsx +91 -0
  86. package/src/components/NSHeader.module.css +4 -3
  87. package/src/components/NSSelectBox.tsx +94 -93
  88. package/src/components/NSTable.tsx +130 -130
  89. package/src/main.ts +15 -14
  90. package/dist/components/NSInputDate.js.map +0 -1
  91. package/dist/components/NSInputDuration.js.map +0 -1
  92. package/dist/components/NSInputEmail.js.map +0 -1
  93. package/dist/components/NSInputErrorNotifier.d.ts +0 -5
  94. package/dist/components/NSInputErrorNotifier.js.map +0 -1
  95. package/dist/components/NSInputFloat.js.map +0 -1
  96. package/dist/components/NSInputIP.js.map +0 -1
  97. package/dist/components/NSInputInteger.js.map +0 -1
  98. package/dist/components/NSInputPassword.d.ts +0 -22
  99. package/dist/components/NSInputPassword.js.map +0 -1
  100. package/dist/components/NSInputPhone.js.map +0 -1
  101. package/dist/components/NSInputPrice.js.map +0 -1
  102. package/dist/components/NSInputSearch.js.map +0 -1
  103. package/dist/components/NSInputString.js.map +0 -1
  104. package/dist/components/NSInputText.js.map +0 -1
  105. package/dist/components/NSInputTime.js.map +0 -1
  106. package/src/components/NSInputDate.tsx +0 -81
  107. package/src/components/NSInputDuration.tsx +0 -91
  108. package/src/components/NSInputEmail.tsx +0 -90
  109. package/src/components/NSInputErrorNotifier.tsx +0 -28
  110. package/src/components/NSInputFloat.tsx +0 -89
  111. package/src/components/NSInputIP.tsx +0 -90
  112. package/src/components/NSInputInteger.tsx +0 -89
  113. package/src/components/NSInputPassword.tsx +0 -89
  114. package/src/components/NSInputPhone.tsx +0 -83
  115. package/src/components/NSInputPrice.tsx +0 -90
  116. package/src/components/NSInputString.tsx +0 -89
  117. package/src/components/NSInputText.tsx +0 -89
  118. package/src/components/NSInputTime.tsx +0 -91
  119. /package/dist/components/{NSInput.module.css → NSBox.module.css} +0 -0
  120. /package/dist/components/{NSInputDate.module.css → NSBoxDate.module.css} +0 -0
  121. /package/dist/components/{NSInputErrorNotifier.module.css → NSBoxErrorNotifier.module.css} +0 -0
  122. /package/src/components/{NSInput.module.css → NSBox.module.css} +0 -0
  123. /package/src/components/{NSInputDate.module.css → NSBoxDate.module.css} +0 -0
  124. /package/src/components/{NSInputErrorNotifier.module.css → NSBoxErrorNotifier.module.css} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"NSTable.js","sourceRoot":"","sources":["../../src/components/NSTable.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AACrD,OAAO,MAAM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EACR,KAAC,OAAO,IAAC,IAAI,EAAE,eAAe,CAAC,KAAK,GAAI,EACxC,mBAAS,SAAS,EAAE,MAAM,CAAC,oBAAoB,aAC9C,KAAC,YAAY,IAAC,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,CAAC,GAAI,EACnC,KAAC,OAAO,IAAC,IAAI,EAAE,eAAe,CAAC,KAAK,GAAI,EACxC,eAAK,SAAS,EAAE,MAAM,CAAC,SAAS,aAC/B,KAAC,QAAQ,IAAC,KAAK,EAAC,QAAQ,EAAC,IAAI,EAAE,EAAE,GAAG,EAAE,kCAAkC,EAAE,EAAE,OAAO,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,iCAAiC,EAAE,KAAK,EAAE,OAAO,EAAE,GAAI,EACxK,KAAC,QAAQ,IAAC,KAAK,EAAC,SAAS,EAAC,IAAI,EAAE,EAAE,GAAG,EAAE,mCAAmC,EAAE,EAAE,OAAO,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,gCAAgC,EAAE,KAAK,EAAE,OAAO,EAAE,GAAI,IACpK,IACG,EACV,KAAC,OAAO,IAAC,IAAI,EAAE,eAAe,CAAC,KAAK,GAAI,EACxC,KAAC,OAAO,IACP,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,EAC3B,WAAW,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,WAAW,EACzC,OAAO,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,EACpC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,GACtB,IACI,CACP,CAAA;IACF,CAAC;CACD"}
package/dist/main.d.ts CHANGED
@@ -1,3 +1,15 @@
1
+ export * from "./components/NSBoxDate";
2
+ export * from "./components/NSBoxDouble";
3
+ export * from "./components/NSBoxDuration";
4
+ export * from "./components/NSBoxEmail";
5
+ export * from "./components/NSBoxErrorNotifier";
6
+ export * from "./components/NSBoxInteger";
7
+ export * from "./components/NSBoxIPV4";
8
+ export * from "./components/NSBoxIPV6";
9
+ export * from "./components/NSBoxPassword";
10
+ export * from "./components/NSBoxPhone";
11
+ export * from "./components/NSBoxPrice";
12
+ export * from "./components/NSBoxString";
1
13
  export * from "./components/NSButtonBlue";
2
14
  export * from "./components/NSButtonGreen";
3
15
  export * from "./components/NSButton";
@@ -5,23 +17,12 @@ export * from "./components/NSButtonRed";
5
17
  export * from "./components/NSCard";
6
18
  export * from "./components/NSEntityCardBackground";
7
19
  export * from "./components/NSEntityBar";
8
- export * from "./components/NSInputErrorNotifier";
9
20
  export * from "./components/NSFooter";
10
21
  export * from "./components/NSHeader";
11
22
  export * from "./components/NSCopyToClipboard";
12
- export * from "./components/NSInputDate";
13
- export * from "./components/NSInputDuration";
14
- export * from "./components/NSInputEmail";
15
- export * from "./components/NSInputFloat";
16
- export * from "./components/NSInputIP";
17
- export * from "./components/NSInputPassword";
18
- export * from "./components/NSInputInteger";
19
- export * from "./components/NSInputPhone";
20
- export * from "./components/NSInputPrice";
21
- export * from "./components/NSInputSearch";
22
- export * from "./components/NSInputString";
23
- export * from "./components/NSInputText";
24
- export * from "./components/NSInputTime";
23
+ export * from "./components/NSBoxSearch";
24
+ export * from "./components/NSBoxText";
25
+ export * from "./components/NSBoxTime";
25
26
  export * from "./components/NSLayout";
26
27
  export * from "./components/NSLayoutAction";
27
28
  export * from "./components/NSLayoutHeroBanner";
package/dist/main.js CHANGED
@@ -1,3 +1,15 @@
1
+ export * from "./components/NSBoxDate";
2
+ export * from "./components/NSBoxDouble";
3
+ export * from "./components/NSBoxDuration";
4
+ export * from "./components/NSBoxEmail";
5
+ export * from "./components/NSBoxErrorNotifier";
6
+ export * from "./components/NSBoxInteger";
7
+ export * from "./components/NSBoxIPV4";
8
+ export * from "./components/NSBoxIPV6";
9
+ export * from "./components/NSBoxPassword";
10
+ export * from "./components/NSBoxPhone";
11
+ export * from "./components/NSBoxPrice";
12
+ export * from "./components/NSBoxString";
1
13
  export * from "./components/NSButtonBlue";
2
14
  export * from "./components/NSButtonGreen";
3
15
  export * from "./components/NSButton";
@@ -5,23 +17,12 @@ export * from "./components/NSButtonRed";
5
17
  export * from "./components/NSCard";
6
18
  export * from "./components/NSEntityCardBackground";
7
19
  export * from "./components/NSEntityBar";
8
- export * from "./components/NSInputErrorNotifier";
9
20
  export * from "./components/NSFooter";
10
21
  export * from "./components/NSHeader";
11
22
  export * from "./components/NSCopyToClipboard";
12
- export * from "./components/NSInputDate";
13
- export * from "./components/NSInputDuration";
14
- export * from "./components/NSInputEmail";
15
- export * from "./components/NSInputFloat";
16
- export * from "./components/NSInputIP";
17
- export * from "./components/NSInputPassword";
18
- export * from "./components/NSInputInteger";
19
- export * from "./components/NSInputPhone";
20
- export * from "./components/NSInputPrice";
21
- export * from "./components/NSInputSearch";
22
- export * from "./components/NSInputString";
23
- export * from "./components/NSInputText";
24
- export * from "./components/NSInputTime";
23
+ export * from "./components/NSBoxSearch";
24
+ export * from "./components/NSBoxText";
25
+ export * from "./components/NSBoxTime";
25
26
  export * from "./components/NSLayout";
26
27
  export * from "./components/NSLayoutAction";
27
28
  export * from "./components/NSLayoutHeroBanner";
package/dist/main.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"main.js","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qCAAqC,CAAC;AACpD,cAAc,0BAA0B,CAAC;AACzC,cAAc,mCAAmC,CAAC;AAClD,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,0BAA0B,CAAC;AACzC,cAAc,8BAA8B,CAAC;AAC7C,cA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AAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,0BAA0B,CAAC;AACzC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,oBAAoB,CAAC;AACnC,cAAc,yBAAyB,CAAC"}
package/package.json CHANGED
@@ -8,7 +8,7 @@
8
8
  "framework": "npm",
9
9
  "application": "package",
10
10
  "private": false,
11
- "version": "1.3.112",
11
+ "version": "1.3.114",
12
12
  "author": "Amir Abolhasani, Alireza Esmaeeli, Sepideh Mazloumi, Hooman Shashaeh",
13
13
  "license": "MIT",
14
14
  "main": "./dist/main.js",
@@ -29,7 +29,7 @@
29
29
  "copyfiles": "^2.4.1",
30
30
  "link-react": "^3.0.0",
31
31
  "namirasoft-api-link": "^1.3.4",
32
- "namirasoft-core": "^1.3.20",
32
+ "namirasoft-core": "^1.3.25",
33
33
  "path-browserify": "^1.0.1",
34
34
  "react": "^18.3.1",
35
35
  "react-app-rewired": "^2.2.1",
package/src/App.tsx CHANGED
@@ -1,8 +1,9 @@
1
1
  import './App.css';
2
2
  import 'bootstrap/dist/css/bootstrap.min.css';
3
- import { NSTable } from './main';
3
+ import { NSBoxIPV4, NSTable } from './main';
4
4
  import { useRef } from 'react';
5
5
  import { NSLayoutAction } from './components/NSLayoutAction';
6
+ import { NSBoxIPV6 } from './components/NSBoxIPV6';
6
7
 
7
8
  const actions = [
8
9
  {
@@ -111,7 +112,7 @@ export function App()
111
112
  actions={actions}
112
113
  title='Test'
113
114
  description='Lorem lorem orem Lorem lorem orem Lorem lorem orem Lorem lorem orem Lorem lorem orem Lorem lorem orem '
114
- scope='Namira Software Corporation'
115
+ scope='Namirasoft Account Console'
115
116
  logo='https://static.namirasoft.com/image/namirasoft/site/logo/base.png'
116
117
  >
117
118
  <div>
@@ -125,6 +126,16 @@ export function App()
125
126
  onChanged={onChange}
126
127
  />
127
128
  </div>
129
+ <NSBoxIPV6
130
+ title='IPV6'
131
+ required={false}
132
+ />
133
+
134
+ <NSBoxIPV4
135
+ title='IPV4'
136
+ required={false}
137
+ />
138
+
128
139
  </NSLayoutAction>
129
140
  </>
130
141
  );
@@ -0,0 +1,81 @@
1
+ "use client";
2
+
3
+ import React from "react";
4
+ import Styles from "./NSBoxDate.module.css";
5
+ import { IBaseComponentProps } from "../props/IBaseComponentProps";
6
+ import { NSBoxErrorNotifier } from "./NSBoxErrorNotifier";
7
+ import { IValidationProps } from "../props/IValidationProps";
8
+ import { Validator } from "../Validator";
9
+
10
+ export interface INSBoxDateProps extends IBaseComponentProps, IValidationProps
11
+ {
12
+ title: string;
13
+ defaultValue?: string;
14
+ onChanged?: (e: React.ChangeEvent<HTMLInputElement>) => void;
15
+ placeholder?: string;
16
+ }
17
+
18
+ export interface INSBoxDateState
19
+ {
20
+ value: string;
21
+ error?: string;
22
+ }
23
+
24
+ export class NSBoxDate extends React.Component<INSBoxDateProps, INSBoxDateState>
25
+ {
26
+ constructor(props: INSBoxDateProps)
27
+ {
28
+ super(props);
29
+ this.state = { value: props.defaultValue ?? "" };
30
+ this.setValue = this.setValue.bind(this);
31
+ this.getValue = this.getValue.bind(this);
32
+ this.onChanged = this.onChanged.bind(this);
33
+ }
34
+ getError(): string | null
35
+ {
36
+ return (
37
+ Validator.getError(this.props.title, this.state.value, this.props) &&
38
+ Validator.getErrorDate(this.props.title, this.state.value)
39
+ );
40
+ }
41
+ getValue(): string
42
+ {
43
+ let error = this.getError();
44
+ if (error)
45
+ {
46
+ this.setState({ error });
47
+ throw new Error(error);
48
+ }
49
+ return this.state.value;
50
+ }
51
+ setValue(value: string): void
52
+ {
53
+ this.setState({ value });
54
+ }
55
+ private onChanged(e: React.ChangeEvent<HTMLInputElement>): void
56
+ {
57
+ this.setValue(e.target.value);
58
+ if (this.props.onChanged)
59
+ this.props.onChanged(e);
60
+ }
61
+ override render()
62
+ {
63
+ return (
64
+ <>
65
+ <div className={`${Styles.ns_input_parent} ${this.props.classList?.join(" ")}`} style={this.props.style}>
66
+ <span className={Styles.ns_input_title}> {this.props.required && <span style={{ color: "red" }} >*</span>} {this.props.title} </span>
67
+ <input
68
+ id={this.props.id}
69
+ value={this.state.value}
70
+ onChange={this.onChanged}
71
+ type="date"
72
+ className={Styles.ns_input}
73
+ placeholder={this.props.placeholder}
74
+ onClick={() => { }}
75
+ />
76
+ </div>
77
+ <NSBoxErrorNotifier error={this.state.error} />
78
+ </>
79
+ );
80
+ }
81
+ }
@@ -0,0 +1,81 @@
1
+ "use client";
2
+
3
+ import React from "react";
4
+ import Styles from "./NSBoxDate.module.css";
5
+ import { IBaseComponentProps } from "../props/IBaseComponentProps";
6
+ import { NSBoxErrorNotifier } from "./NSBoxErrorNotifier";
7
+ import { IValidationProps } from "../props/IValidationProps";
8
+ import { Validator } from "../Validator";
9
+
10
+ export interface INSBoxDateTimeProps extends IBaseComponentProps, IValidationProps
11
+ {
12
+ title: string;
13
+ defaultValue?: string;
14
+ onChanged?: (e: React.ChangeEvent<HTMLInputElement>) => void;
15
+ placeholder?: string;
16
+ }
17
+
18
+ export interface INSBoxDateTimeState
19
+ {
20
+ value: string;
21
+ error?: string;
22
+ }
23
+
24
+ export class NSBoxDateTime extends React.Component<INSBoxDateTimeProps, INSBoxDateTimeState>
25
+ {
26
+ constructor(props: INSBoxDateTimeProps)
27
+ {
28
+ super(props);
29
+ this.state = { value: props.defaultValue ?? "" };
30
+ this.setValue = this.setValue.bind(this);
31
+ this.getValue = this.getValue.bind(this);
32
+ this.onChanged = this.onChanged.bind(this);
33
+ }
34
+ getError(): string | null
35
+ {
36
+ return (
37
+ Validator.getError(this.props.title, this.state.value, this.props) &&
38
+ Validator.getErrorDate(this.props.title, this.state.value)
39
+ );
40
+ }
41
+ getValue(): string
42
+ {
43
+ let error = this.getError();
44
+ if (error)
45
+ {
46
+ this.setState({ error });
47
+ throw new Error(error);
48
+ }
49
+ return this.state.value;
50
+ }
51
+ setValue(value: string): void
52
+ {
53
+ this.setState({ value });
54
+ }
55
+ private onChanged(e: React.ChangeEvent<HTMLInputElement>): void
56
+ {
57
+ this.setValue(e.target.value);
58
+ if (this.props.onChanged)
59
+ this.props.onChanged(e);
60
+ }
61
+ override render()
62
+ {
63
+ return (
64
+ <>
65
+ <div className={`${Styles.ns_input_parent} ${this.props.classList?.join(" ")}`} style={this.props.style}>
66
+ <span className={Styles.ns_input_title}> {this.props.required && <span style={{ color: "red" }} >*</span>} {this.props.title} </span>
67
+ <input
68
+ id={this.props.id}
69
+ value={this.state.value}
70
+ onChange={this.onChanged}
71
+ type="datetime-local"
72
+ className={Styles.ns_input}
73
+ placeholder={this.props.placeholder}
74
+ onClick={() => { }}
75
+ />
76
+ </div>
77
+ <NSBoxErrorNotifier error={this.state.error} />
78
+ </>
79
+ );
80
+ }
81
+ }
@@ -0,0 +1,92 @@
1
+ "use client";
2
+
3
+ import React from "react";
4
+ import Styles from "./NSBox.module.css";
5
+ import IconInputFloat from '../assets/images/icon-input-float.svg';
6
+ import { IBaseComponentProps } from "../props/IBaseComponentProps";
7
+ import { IValidationProps } from "../props/IValidationProps";
8
+ import { IValidationNumberProps } from "../props/IValidationNumberProps";
9
+ import { Validator } from "../Validator";
10
+ import { NSBoxErrorNotifier } from "./NSBoxErrorNotifier";
11
+
12
+ export interface INSBoxDoubleProps extends IBaseComponentProps, IValidationProps, IValidationNumberProps
13
+ {
14
+ title: string;
15
+ defaultValue?: number;
16
+ onChanged?: (e: React.ChangeEvent<HTMLInputElement>) => void;
17
+ placeholder?: string;
18
+ }
19
+
20
+ export interface INSBoxDoubleState
21
+ {
22
+ value?: number;
23
+ error?: string;
24
+ }
25
+
26
+ export class NSBoxDouble extends React.Component<INSBoxDoubleProps, INSBoxDoubleState>
27
+ {
28
+ constructor(props: INSBoxDoubleProps)
29
+ {
30
+ super(props);
31
+ this.state = { value: props.defaultValue };
32
+ this.setValue = this.setValue.bind(this);
33
+ this.getValue = this.getValue.bind(this);
34
+ this.onChanged = this.onChanged.bind(this);
35
+ }
36
+ getError(): string | null
37
+ {
38
+ return (
39
+ Validator.getError(this.props.title, this.state.value, this.props) &&
40
+ Validator.getErrorNumber(this.props.title, this.state.value, this.props)
41
+ );
42
+ }
43
+ getValue(): number | undefined
44
+ {
45
+ let error = this.getError();
46
+ if (error)
47
+ {
48
+ this.setState({ error });
49
+ throw new Error(error);
50
+ }
51
+ return this.state.value;
52
+ }
53
+ setValue(value: number | undefined): void
54
+ {
55
+ this.setState({ value });
56
+ }
57
+ private onChanged(e: React.ChangeEvent<HTMLInputElement>): void
58
+ {
59
+ this.setValue(parseFloat(e.target.value));
60
+ if (this.props.onChanged)
61
+ this.props.onChanged(e);
62
+ }
63
+ override render()
64
+ {
65
+ return (
66
+ <>
67
+ <div className={`${Styles.ns_input_parent} p-2 ${this.props.classList?.join(" ")}`} style={this.props.style}>
68
+ <span className={Styles.ns_input_title}> {this.props.required && <span style={{ color: "red" }} >*</span>} {this.props.title} </span>
69
+ <img
70
+ className={Styles.ns_input_icon}
71
+ src={IconInputFloat}
72
+ alt="Flaot Icon"
73
+ width={24}
74
+ height={24}
75
+ />
76
+ <input
77
+ id={this.props.id}
78
+ value={this.state.value}
79
+ onChange={this.onChanged}
80
+ type="number"
81
+ inputMode="decimal"
82
+ //todo: check pattern
83
+ pattern="[0-9]*[.,]?[0-9]*"
84
+ className={Styles.ns_input}
85
+ placeholder={this.props.placeholder}
86
+ />
87
+ </div>
88
+ <NSBoxErrorNotifier error={this.state.error} />
89
+ </>
90
+ );
91
+ }
92
+ }
@@ -0,0 +1,91 @@
1
+ "use client";
2
+
3
+ import React from "react";
4
+ import Styles from "./NSBox.module.css";
5
+ import IconInputDuration from '../assets/images/icon-input-duration.svg';
6
+ import { IBaseComponentProps } from "../props/IBaseComponentProps";
7
+ import { IValidationProps } from "../props/IValidationProps";
8
+ import { IValidationNumberProps } from "../props/IValidationNumberProps";
9
+ import { IValidationStringProps } from "../props/IValidationStringProps";
10
+ import { Validator } from "../Validator";
11
+ import { NSBoxErrorNotifier } from "./NSBoxErrorNotifier";
12
+
13
+ export interface INSBoxDurationProps extends IBaseComponentProps, IValidationProps, IValidationStringProps, IValidationNumberProps
14
+ {
15
+ title: string;
16
+ defaultValue?: string;
17
+ onChanged?: (e: React.ChangeEvent<HTMLInputElement>) => void;
18
+ placeholder?: string;
19
+ }
20
+
21
+ export interface INSBoxDurationState
22
+ {
23
+ value: string;
24
+ error?: string;
25
+ }
26
+
27
+ export class NSBoxDuration extends React.Component<INSBoxDurationProps, INSBoxDurationState>
28
+ {
29
+ constructor(props: INSBoxDurationProps)
30
+ {
31
+ super(props);
32
+ this.state = { value: props.defaultValue ?? "" };
33
+ this.getValue = this.getValue.bind(this);
34
+ this.setValue = this.setValue.bind(this);
35
+ this.onChanged = this.onChanged.bind(this);
36
+ }
37
+ getError(): string | null
38
+ {
39
+ return (
40
+ Validator.getError(this.props.title, this.state.value, this.props) &&
41
+ Validator.getErrorDuration(this.props.title, this.state.value)
42
+ );
43
+ }
44
+ getValue(): string
45
+ {
46
+ let error = this.getError();
47
+ if (error)
48
+ {
49
+ this.setState({ error });
50
+ throw new Error(error);
51
+ }
52
+ return this.state.value;
53
+ }
54
+ setValue(value: string): void
55
+ {
56
+ this.setState({ value });
57
+ }
58
+ private onChanged(e: React.ChangeEvent<HTMLInputElement>): void
59
+ {
60
+ this.setValue(e.target.value);
61
+ if (this.props.onChanged)
62
+ this.props.onChanged(e);
63
+ }
64
+ override render()
65
+ {
66
+ return (
67
+ <>
68
+ <div className={`${Styles.ns_input_parent} p-2 ${this.props.classList?.join(" ")}`} style={this.props.style}>
69
+ <span className={Styles.ns_input_title}> {this.props.required && <span style={{ color: "red" }} >*</span>} {this.props.title} </span>
70
+ <img
71
+ className={Styles.ns_input_icon}
72
+ src={IconInputDuration}
73
+ alt="Duration Icon"
74
+ width={24}
75
+ height={24}
76
+ />
77
+ <input
78
+ id={this.props.id}
79
+ value={this.state.value}
80
+ onChange={this.onChanged}
81
+ type="time"
82
+ className={Styles.ns_input}
83
+ placeholder={this.props.placeholder}
84
+ step="2"
85
+ />
86
+ </div>
87
+ <NSBoxErrorNotifier error={this.state.error} />
88
+ </>
89
+ );
90
+ }
91
+ }
@@ -0,0 +1,90 @@
1
+ "use client";
2
+
3
+ import React from "react";
4
+ import Styles from "./NSBox.module.css";
5
+ import IconInputEmail from '../assets/images/icon-input-email.svg';
6
+ import { Validator } from "../Validator";
7
+ import { IValidationProps } from "../props/IValidationProps";
8
+ import { IValidationStringProps } from "../props/IValidationStringProps";
9
+ import { IBaseComponentProps } from "../props/IBaseComponentProps";
10
+ import { NSBoxErrorNotifier } from "./NSBoxErrorNotifier";
11
+
12
+ export interface INSBoxEmailProps extends IBaseComponentProps, IValidationProps, IValidationStringProps
13
+ {
14
+ title: string;
15
+ defaultValue?: string;
16
+ onChanged?: (e: React.ChangeEvent<HTMLInputElement>) => void;
17
+ placeholder?: string;
18
+ }
19
+
20
+ export interface INSBoxEmailState
21
+ {
22
+ value: string;
23
+ error?: string;
24
+ }
25
+
26
+ export class NSBoxEmail extends React.Component<INSBoxEmailProps, INSBoxEmailState>
27
+ {
28
+ constructor(props: INSBoxEmailProps)
29
+ {
30
+ super(props);
31
+ this.state = { value: props.defaultValue ?? "" };
32
+ this.setValue = this.setValue.bind(this);
33
+ this.getValue = this.getValue.bind(this);
34
+ this.onChanged = this.onChanged.bind(this);
35
+ }
36
+ getError(): string | null
37
+ {
38
+ return (
39
+ Validator.getError(this.props.title, this.state.value, this.props) &&
40
+ Validator.getErrorString(this.props.title, this.state.value, this.props) &&
41
+ Validator.getErrorEmail(this.props.title, this.state.value)
42
+ );
43
+ }
44
+ getValue(): string
45
+ {
46
+ let error = this.getError();
47
+ if (error)
48
+ {
49
+ this.setState({ error });
50
+ throw new Error(error);
51
+ }
52
+ return this.state.value;
53
+ }
54
+ setValue(value: string): void
55
+ {
56
+ this.setState({ value });
57
+ }
58
+ private onChanged(e: React.ChangeEvent<HTMLInputElement>): void
59
+ {
60
+ this.setValue(e.target.value);
61
+ if (this.props.onChanged)
62
+ this.props.onChanged(e);
63
+ }
64
+ override render()
65
+ {
66
+ return (
67
+ <>
68
+ <div className={`${Styles.ns_input_parent} ${this.props.classList?.join(" ")}`} style={this.props.style}>
69
+ <span className={Styles.ns_input_title}> {this.props.required && <span style={{ color: "red" }} >*</span>} {this.props.title} </span>
70
+ <img
71
+ className={Styles.ns_input_icon}
72
+ src={IconInputEmail}
73
+ alt="Email Icon"
74
+ width={24}
75
+ height={24}
76
+ />
77
+ <input
78
+ id={this.props.id}
79
+ value={this.state.value}
80
+ onChange={this.onChanged}
81
+ type="email"
82
+ className={Styles.ns_input}
83
+ placeholder={this.props.placeholder}
84
+ />
85
+ </div>
86
+ <NSBoxErrorNotifier error={this.state.error} />
87
+ </>
88
+ );
89
+ }
90
+ }
@@ -0,0 +1,29 @@
1
+ "use client";
2
+ import React from "react";
3
+ import type { SelectProps } from 'antd';
4
+ import { IBaseComponentProps } from "../props/IBaseComponentProps";
5
+ import { IValidationProps } from "../props/IValidationProps";
6
+ import { NSSelectBox } from "./NSSelectBox";
7
+
8
+ export interface INSBoxEntityProps extends IBaseComponentProps, IValidationProps
9
+ {
10
+ title: string;
11
+ options: SelectProps['options'];
12
+ multiple: boolean;
13
+ }
14
+
15
+ export class NSBoxEntity extends React.Component<INSBoxEntityProps>
16
+ {
17
+ override render(): React.ReactNode
18
+ {
19
+ return (
20
+ <NSSelectBox
21
+ placeHolder="Entity Box"
22
+ title={this.props.title}
23
+ multiple={false}
24
+ options={this.props.options}
25
+ required={false}
26
+ />
27
+ )
28
+ }
29
+ }