namirasoft-site-react 1.3.251 → 1.3.252

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 (73) hide show
  1. package/dist/components/NSBoxDate.d.ts +2 -2
  2. package/dist/components/NSBoxDate.js +4 -3
  3. package/dist/components/NSBoxDate.js.map +1 -1
  4. package/dist/components/NSBoxDateTime.d.ts +2 -2
  5. package/dist/components/NSBoxDateTime.js +4 -3
  6. package/dist/components/NSBoxDateTime.js.map +1 -1
  7. package/dist/components/NSBoxDouble.d.ts +2 -2
  8. package/dist/components/NSBoxDouble.js +4 -3
  9. package/dist/components/NSBoxDouble.js.map +1 -1
  10. package/dist/components/NSBoxDuration.d.ts +2 -2
  11. package/dist/components/NSBoxDuration.js +4 -3
  12. package/dist/components/NSBoxDuration.js.map +1 -1
  13. package/dist/components/NSBoxEmail.d.ts +2 -2
  14. package/dist/components/NSBoxEmail.js +5 -4
  15. package/dist/components/NSBoxEmail.js.map +1 -1
  16. package/dist/components/NSBoxEntity.d.ts +3 -1
  17. package/dist/components/NSBoxEntity.js +1 -1
  18. package/dist/components/NSBoxEntity.js.map +1 -1
  19. package/dist/components/NSBoxEnum.d.ts +3 -2
  20. package/dist/components/NSBoxEnum.js +5 -5
  21. package/dist/components/NSBoxEnum.js.map +1 -1
  22. package/dist/components/NSBoxIPV4.d.ts +2 -2
  23. package/dist/components/NSBoxIPV4.js +4 -3
  24. package/dist/components/NSBoxIPV4.js.map +1 -1
  25. package/dist/components/NSBoxIPV6.d.ts +2 -2
  26. package/dist/components/NSBoxIPV6.js +4 -3
  27. package/dist/components/NSBoxIPV6.js.map +1 -1
  28. package/dist/components/NSBoxInteger.d.ts +2 -2
  29. package/dist/components/NSBoxInteger.js +4 -3
  30. package/dist/components/NSBoxInteger.js.map +1 -1
  31. package/dist/components/NSBoxOTP.d.ts +2 -0
  32. package/dist/components/NSBoxOTP.js.map +1 -1
  33. package/dist/components/NSBoxPassword.d.ts +2 -2
  34. package/dist/components/NSBoxPassword.js +4 -3
  35. package/dist/components/NSBoxPassword.js.map +1 -1
  36. package/dist/components/NSBoxPhone.d.ts +2 -2
  37. package/dist/components/NSBoxPrice.d.ts +2 -2
  38. package/dist/components/NSBoxPrice.js +6 -5
  39. package/dist/components/NSBoxPrice.js.map +1 -1
  40. package/dist/components/NSBoxString.d.ts +2 -2
  41. package/dist/components/NSBoxString.js +4 -3
  42. package/dist/components/NSBoxString.js.map +1 -1
  43. package/dist/components/NSBoxTextArea.d.ts +2 -2
  44. package/dist/components/NSBoxTextArea.js +4 -3
  45. package/dist/components/NSBoxTextArea.js.map +1 -1
  46. package/dist/components/NSBoxTime.d.ts +2 -2
  47. package/dist/components/NSBoxTime.js +4 -3
  48. package/dist/components/NSBoxTime.js.map +1 -1
  49. package/dist/components/NSFilterBoxDialog.js +1 -1
  50. package/dist/components/NSGroupedList.module.css +1 -0
  51. package/dist/components/NSPagination.js +1 -1
  52. package/dist/components/NSPagination.js.map +1 -1
  53. package/package.json +1 -1
  54. package/src/components/NSBoxDate.tsx +7 -5
  55. package/src/components/NSBoxDateTime.tsx +7 -5
  56. package/src/components/NSBoxDouble.tsx +7 -5
  57. package/src/components/NSBoxDuration.tsx +7 -5
  58. package/src/components/NSBoxEmail.tsx +9 -7
  59. package/src/components/NSBoxEntity.tsx +4 -2
  60. package/src/components/NSBoxEnum.tsx +8 -7
  61. package/src/components/NSBoxIPV4.tsx +7 -5
  62. package/src/components/NSBoxIPV6.tsx +7 -5
  63. package/src/components/NSBoxInteger.tsx +7 -5
  64. package/src/components/NSBoxOTP.tsx +2 -0
  65. package/src/components/NSBoxPassword.tsx +7 -5
  66. package/src/components/NSBoxPhone.tsx +3 -3
  67. package/src/components/NSBoxPrice.tsx +8 -6
  68. package/src/components/NSBoxString.tsx +7 -5
  69. package/src/components/NSBoxTextArea.tsx +9 -6
  70. package/src/components/NSBoxTime.tsx +7 -5
  71. package/src/components/NSFilterBoxDialog.tsx +2 -2
  72. package/src/components/NSGroupedList.module.css +1 -0
  73. package/src/components/NSPagination.tsx +1 -1
@@ -12,9 +12,9 @@ import { NSBoxErrorNotifier } from "./NSBoxErrorNotifier";
12
12
  export interface INSBoxPriceProps extends IBaseComponentProps, IValidationProps, IValidationNumberProps
13
13
  {
14
14
  title: string;
15
+ placeholder?: number;
15
16
  defaultValue?: number;
16
- onChanged?: (e: React.ChangeEvent<HTMLInputElement>) => void;
17
- placeholder?: string;
17
+ onChanged?: (e: NSBoxPrice) => void;
18
18
  }
19
19
 
20
20
  export interface INSBoxPriceState
@@ -56,13 +56,15 @@ export class NSBoxPrice extends React.Component<INSBoxPriceProps, INSBoxPriceSta
56
56
  }
57
57
  setValue(value: number | undefined): void
58
58
  {
59
- this.setState({ value });
59
+ this.setState({ value }, () =>
60
+ {
61
+ if (this.props.onChanged)
62
+ this.props.onChanged(this);
63
+ });
60
64
  }
61
65
  private onChanged(e: React.ChangeEvent<HTMLInputElement>): void
62
66
  {
63
67
  this.setValue(parseFloat(e.target.value));
64
- if (this.props.onChanged)
65
- this.props.onChanged(e);
66
68
  }
67
69
  override render()
68
70
  {
@@ -78,7 +80,7 @@ export class NSBoxPrice extends React.Component<INSBoxPriceProps, INSBoxPriceSta
78
80
  step="0.01"
79
81
  min="0"
80
82
  className={Styles.ns_input}
81
- placeholder={this.props.placeholder}
83
+ placeholder={this.props.placeholder?.toString.name}
82
84
  style={{ background: `url(${IconInputFloat}) white no-repeat scroll center right 16px` }}
83
85
  />
84
86
  </div>
@@ -15,9 +15,9 @@ import CopyToClipboard from '../CopyToClipboard';
15
15
  export interface INSBoxStringProps extends IBaseComponentProps, IValidationProps, IValidationStringProps
16
16
  {
17
17
  title: string;
18
- defaultValue?: string;
19
- onChanged?: (e: React.ChangeEvent<HTMLInputElement>) => void;
20
18
  placeholder?: string;
19
+ defaultValue?: string;
20
+ onChanged?: (e: NSBoxString) => void;
21
21
  }
22
22
 
23
23
  export interface INSBoxStringState
@@ -62,13 +62,15 @@ export class NSBoxString extends React.Component<INSBoxStringProps, INSBoxString
62
62
  }
63
63
  setValue(value: string): void
64
64
  {
65
- this.setState({ value });
65
+ this.setState({ value }, () =>
66
+ {
67
+ if (this.props.onChanged)
68
+ this.props.onChanged(this);
69
+ });
66
70
  }
67
71
  private onChanged(e: React.ChangeEvent<HTMLInputElement>): void
68
72
  {
69
73
  this.setValue(e.target.value);
70
- if (this.props.onChanged)
71
- this.props.onChanged(e);
72
74
  }
73
75
  private toggleFullScreen(): void
74
76
  {
@@ -15,9 +15,9 @@ import CopyToClipboard from '../CopyToClipboard';
15
15
  export interface INSBoxTextAreaProps extends IBaseComponentProps, IValidationProps, IValidationStringProps
16
16
  {
17
17
  title: string;
18
- defaultValue?: string;
19
- onChanged?: () => void;
20
18
  placeholder?: string;
19
+ defaultValue?: string;
20
+ onChanged?: (e: NSBoxTextArea) => void;
21
21
  cols?: number;
22
22
  rows?: number;
23
23
  }
@@ -65,13 +65,16 @@ export class NSBoxTextArea extends React.Component<INSBoxTextAreaProps, INSBoxTe
65
65
  }
66
66
  setValue(value: string): void
67
67
  {
68
- this.setState({ value });
68
+ this.setState({ value }, () =>
69
+ {
70
+ if (this.props.onChanged)
71
+ this.props.onChanged(this);
72
+ }
73
+ );
69
74
  }
70
75
  private onChanged = async (e: React.ChangeEvent<HTMLTextAreaElement>): Promise<void> =>
71
76
  {
72
77
  await this.setValue(e.target.value);
73
- if (this.props.onChanged)
74
- this.props.onChanged();
75
78
  }
76
79
  private toggleFullScreen(): void
77
80
  {
@@ -81,7 +84,7 @@ export class NSBoxTextArea extends React.Component<INSBoxTextAreaProps, INSBoxTe
81
84
  {
82
85
  return (
83
86
  <>
84
- <div className={`${Styles.ns_text_area_parent} ${this.props.classList?.join(" ")} ${this.state.isFullScreen ? Styles.ns_full_screen : ""}`} style={this.props.style} onClick={this.state.isFullScreen ? ()=>{} : ()=>{}}>
87
+ <div className={`${Styles.ns_text_area_parent} ${this.props.classList?.join(" ")} ${this.state.isFullScreen ? Styles.ns_full_screen : ""}`} style={this.props.style} onClick={this.state.isFullScreen ? () => { } : () => { }}>
85
88
  <div className="d-flex justify-content-between align-items-center">
86
89
  <span className={Styles.ns_input_title}>
87
90
  {this.props.required && <span style={{ color: "red" }}>*</span>} {this.props.title}
@@ -12,9 +12,9 @@ import { NSBoxErrorNotifier } from "./NSBoxErrorNotifier";
12
12
  export interface INSBoxTimeProps extends IBaseComponentProps, IValidationProps, IValidationStringProps
13
13
  {
14
14
  title: string;
15
- defaultValue?: string;
16
- onChanged?: (e: React.ChangeEvent<HTMLInputElement>) => void;
17
15
  placeholder?: string;
16
+ defaultValue?: string;
17
+ onChanged?: (e: NSBoxTime) => void;
18
18
  }
19
19
 
20
20
  export interface INSBoxTimeState
@@ -57,13 +57,15 @@ export class NSBoxTime extends React.Component<INSBoxTimeProps, INSBoxTimeState>
57
57
  }
58
58
  setValue(value: string): void
59
59
  {
60
- this.setState({ value });
60
+ this.setState({ value }, () =>
61
+ {
62
+ if (this.props.onChanged)
63
+ this.props.onChanged(this);
64
+ });
61
65
  }
62
66
  private onChanged(e: React.ChangeEvent<HTMLInputElement>): void
63
67
  {
64
68
  this.setValue(e.target.value);
65
- if (this.props.onChanged)
66
- this.props.onChanged(e);
67
69
  }
68
70
  override render()
69
71
  {
@@ -30,7 +30,7 @@ export class NSFilterBoxDialog extends Component<INSFilterBoxDialogProps, INSFil
30
30
  </h3>
31
31
  <NSBoxEnum
32
32
  title={"this.props.title"}
33
- placeHolder=""
33
+ placeholder=""
34
34
  options={[]}
35
35
  multiple={false}
36
36
  required={false}
@@ -38,7 +38,7 @@ export class NSFilterBoxDialog extends Component<INSFilterBoxDialogProps, INSFil
38
38
 
39
39
  <NSBoxEnum
40
40
  title={"this.props.title"}
41
- placeHolder=""
41
+ placeholder=""
42
42
  options={[]}
43
43
  multiple={false}
44
44
  required={false}
@@ -9,6 +9,7 @@
9
9
  overflow: auto;
10
10
  position: absolute;
11
11
  z-index: 10;
12
+ margin-top: 50px;
12
13
  }
13
14
 
14
15
  .ns_group_list_parent::-webkit-scrollbar {
@@ -136,7 +136,7 @@ export function NSPagination(props: INSPaginationProps)
136
136
  multiple={false}
137
137
  required={false}
138
138
  options={pageSizes.map(pagesize => { return { desc: pagesize.toString(), value: pagesize.toString() } })}
139
- onChange={() =>
139
+ onChanged={() =>
140
140
  {
141
141
  setState({ pageSize: parseInt(PageSize.current?.getValue() ?? pageSizes[0].toString()) });
142
142
  onPageChange(currentPage + 1, state.pageSize);