namirasoft-site-react 1.3.113 → 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 (122) 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/NSSelectBox.d.ts +1 -0
  58. package/dist/components/NSSelectBox.js +3 -2
  59. package/dist/components/NSSelectBox.js.map +1 -1
  60. package/dist/components/NSTable.js +2 -2
  61. package/dist/components/NSTable.js.map +1 -1
  62. package/dist/main.d.ts +15 -14
  63. package/dist/main.js +15 -14
  64. package/dist/main.js.map +1 -1
  65. package/package.json +1 -1
  66. package/src/App.tsx +12 -1
  67. package/src/components/NSBoxDate.tsx +81 -0
  68. package/src/components/NSBoxDateTime.tsx +81 -0
  69. package/src/components/NSBoxDouble.tsx +92 -0
  70. package/src/components/NSBoxDuration.tsx +91 -0
  71. package/src/components/NSBoxEmail.tsx +90 -0
  72. package/src/components/NSBoxEntity.tsx +29 -0
  73. package/src/components/NSBoxEnum.tsx +54 -0
  74. package/src/components/NSBoxErrorNotifier.tsx +28 -0
  75. package/src/components/NSBoxIPV4.tsx +96 -0
  76. package/src/components/NSBoxIPV6.tsx +93 -0
  77. package/src/components/NSBoxInteger.tsx +89 -0
  78. package/src/components/NSBoxPassword.tsx +89 -0
  79. package/src/components/NSBoxPhone.tsx +83 -0
  80. package/src/components/NSBoxPrice.tsx +91 -0
  81. package/src/components/{NSInputSearch.tsx → NSBoxSearch.tsx} +9 -9
  82. package/src/components/NSBoxString.tsx +89 -0
  83. package/src/components/NSBoxText.tsx +89 -0
  84. package/src/components/NSBoxTime.tsx +91 -0
  85. package/src/components/NSSelectBox.tsx +94 -93
  86. package/src/components/NSTable.tsx +130 -130
  87. package/src/main.ts +15 -14
  88. package/dist/components/NSInputDate.js.map +0 -1
  89. package/dist/components/NSInputDuration.js.map +0 -1
  90. package/dist/components/NSInputEmail.js.map +0 -1
  91. package/dist/components/NSInputErrorNotifier.d.ts +0 -5
  92. package/dist/components/NSInputErrorNotifier.js.map +0 -1
  93. package/dist/components/NSInputFloat.js.map +0 -1
  94. package/dist/components/NSInputIP.js.map +0 -1
  95. package/dist/components/NSInputInteger.js.map +0 -1
  96. package/dist/components/NSInputPassword.d.ts +0 -22
  97. package/dist/components/NSInputPassword.js.map +0 -1
  98. package/dist/components/NSInputPhone.js.map +0 -1
  99. package/dist/components/NSInputPrice.js.map +0 -1
  100. package/dist/components/NSInputSearch.js.map +0 -1
  101. package/dist/components/NSInputString.js.map +0 -1
  102. package/dist/components/NSInputText.js.map +0 -1
  103. package/dist/components/NSInputTime.js.map +0 -1
  104. package/src/components/NSInputDate.tsx +0 -81
  105. package/src/components/NSInputDuration.tsx +0 -91
  106. package/src/components/NSInputEmail.tsx +0 -90
  107. package/src/components/NSInputErrorNotifier.tsx +0 -28
  108. package/src/components/NSInputFloat.tsx +0 -89
  109. package/src/components/NSInputIP.tsx +0 -90
  110. package/src/components/NSInputInteger.tsx +0 -89
  111. package/src/components/NSInputPassword.tsx +0 -89
  112. package/src/components/NSInputPhone.tsx +0 -83
  113. package/src/components/NSInputPrice.tsx +0 -90
  114. package/src/components/NSInputString.tsx +0 -89
  115. package/src/components/NSInputText.tsx +0 -89
  116. package/src/components/NSInputTime.tsx +0 -91
  117. /package/dist/components/{NSInput.module.css → NSBox.module.css} +0 -0
  118. /package/dist/components/{NSInputDate.module.css → NSBoxDate.module.css} +0 -0
  119. /package/dist/components/{NSInputErrorNotifier.module.css → NSBoxErrorNotifier.module.css} +0 -0
  120. /package/src/components/{NSInput.module.css → NSBox.module.css} +0 -0
  121. /package/src/components/{NSInputDate.module.css → NSBoxDate.module.css} +0 -0
  122. /package/src/components/{NSInputErrorNotifier.module.css → NSBoxErrorNotifier.module.css} +0 -0
package/dist/App.js CHANGED
@@ -1,9 +1,10 @@
1
- import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  import './App.css';
3
3
  import 'bootstrap/dist/css/bootstrap.min.css';
4
- import { NSTable } from './main';
4
+ import { NSBoxIPV4, NSTable } from './main';
5
5
  import { useRef } from 'react';
6
6
  import { NSLayoutAction } from './components/NSLayoutAction';
7
+ import { NSBoxIPV6 } from './components/NSBoxIPV6';
7
8
  const actions = [
8
9
  {
9
10
  group: "test-1",
@@ -82,6 +83,6 @@ export function App() {
82
83
  return row[column];
83
84
  }
84
85
  function onChange() { }
85
- return (_jsx(_Fragment, { children: _jsx(NSLayoutAction, { notifications: [], actions: actions, title: 'Test', description: 'Lorem lorem orem Lorem lorem orem Lorem lorem orem Lorem lorem orem Lorem lorem orem Lorem lorem orem ', scope: 'Namirasoft Account Console', logo: 'https://static.namirasoft.com/image/namirasoft/site/logo/base.png', children: _jsx("div", { children: _jsx(NSTable, { ref: table, columns: columns, rows: rows, getCell: getCell, getColumnAttributes: () => { return {}; }, getRowKey: row => row.id.toString(), onChanged: onChange }) }) }) }));
86
+ return (_jsx(_Fragment, { children: _jsxs(NSLayoutAction, { notifications: [], actions: actions, title: 'Test', description: 'Lorem lorem orem Lorem lorem orem Lorem lorem orem Lorem lorem orem Lorem lorem orem Lorem lorem orem ', scope: 'Namirasoft Account Console', logo: 'https://static.namirasoft.com/image/namirasoft/site/logo/base.png', children: [_jsx("div", { children: _jsx(NSTable, { ref: table, columns: columns, rows: rows, getCell: getCell, getColumnAttributes: () => { return {}; }, getRowKey: row => row.id.toString(), onChanged: onChange }) }), _jsx(NSBoxIPV6, { title: 'IPV6', required: false }), _jsx(NSBoxIPV4, { title: 'IPV4', required: false })] }) }));
86
87
  }
87
88
  //# sourceMappingURL=App.js.map
package/dist/App.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"App.js","sourceRoot":"","sources":["../src/App.tsx"],"names":[],"mappings":";AAAA,OAAO,WAAW,CAAC;AACnB,OAAO,sCAAsC,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AACjC,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAE7D,MAAM,OAAO,GAAG;IACf;QACC,KAAK,EAAE,QAAQ;QACf,KAAK,EAAE;YACN;gBACC,EAAE,EAAE,GAAG;gBACP,SAAS,EAAE,MAAM;gBACjB,OAAO;o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MAAM;SACd;KACA,CAAA;IAUD,SAAS,OAAO,CAAC,GAAQ,EAAE,MAAc;QAExC,OAAQ,GAAW,CAAC,MAAM,CAAC,CAAC;IAC7B,CAAC;IACD,SAAS,QAAQ,KAChB,CAAC;IAEF,OAAO,CACN,4BACC,MAAC,cAAc,IACd,aAAa,EAAE,EAAE,EACjB,OAAO,EAAE,OAAO,EAChB,KAAK,EAAC,MAAM,EACZ,WAAW,EAAC,wGAAwG,EACpH,KAAK,EAAC,4BAA4B,EAClC,IAAI,EAAC,mEAAmE,aAExE,wBACC,KAAC,OAAO,IACP,GAAG,EAAE,KAAK,EACV,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,OAAO,EAChB,mBAAmB,EAAE,GAAG,EAAE,GAAG,OAAO,EAAE,CAAA,CAAC,CAAC,EACxC,SAAS,EAAE,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,QAAQ,EAAE,EACnC,SAAS,EAAE,QAAQ,GAClB,GACG,EACN,KAAC,SAAS,IACT,KAAK,EAAC,MAAM,EACZ,QAAQ,EAAE,KAAK,GACd,EAEF,KAAC,SAAS,IACT,KAAK,EAAC,MAAM,EACZ,QAAQ,EAAE,KAAK,GACd,IAEc,GACf,CACH,CAAC;AACH,CAAC"}
@@ -1,18 +1,18 @@
1
1
  import React from "react";
2
2
  import { IBaseComponentProps } from "../props/IBaseComponentProps";
3
3
  import { IValidationProps } from "../props/IValidationProps";
4
- export interface INSInputDateProps extends IBaseComponentProps, IValidationProps {
4
+ export interface INSBoxDateProps extends IBaseComponentProps, IValidationProps {
5
5
  title: string;
6
6
  defaultValue?: string;
7
7
  onChanged?: (e: React.ChangeEvent<HTMLInputElement>) => void;
8
8
  placeholder?: string;
9
9
  }
10
- export interface NSInputDateState {
10
+ export interface INSBoxDateState {
11
11
  value: string;
12
12
  error?: string;
13
13
  }
14
- export declare class NSInputDate extends React.Component<INSInputDateProps, NSInputDateState> {
15
- constructor(props: INSInputDateProps);
14
+ export declare class NSBoxDate extends React.Component<INSBoxDateProps, INSBoxDateState> {
15
+ constructor(props: INSBoxDateProps);
16
16
  getError(): string | null;
17
17
  getValue(): string;
18
18
  setValue(value: string): void;
@@ -1,10 +1,10 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
3
  import React from "react";
4
- import Styles from "./NSInputDate.module.css";
5
- import { NSInputErrorNotifier } from "./NSInputErrorNotifier";
4
+ import Styles from "./NSBoxDate.module.css";
5
+ import { NSBoxErrorNotifier } from "./NSBoxErrorNotifier";
6
6
  import { Validator } from "../Validator";
7
- export class NSInputDate extends React.Component {
7
+ export class NSBoxDate extends React.Component {
8
8
  constructor(props) {
9
9
  var _a;
10
10
  super(props);
@@ -35,7 +35,7 @@ export class NSInputDate extends React.Component {
35
35
  }
36
36
  render() {
37
37
  var _a;
38
- return (_jsxs(_Fragment, { children: [_jsxs("div", { className: `${Styles.ns_input_parent} ${(_a = this.props.classList) === null || _a === void 0 ? void 0 : _a.join(" ")}`, style: this.props.style, children: [_jsxs("span", { className: Styles.ns_input_title, children: [" ", this.props.required && _jsx("span", { style: { color: "red" }, children: "*" }), " ", this.props.title, " "] }), _jsx("input", { id: this.props.id, value: this.state.value, onChange: this.onChanged, type: "date", className: Styles.ns_input, placeholder: this.props.placeholder, onClick: () => { } })] }), _jsx(NSInputErrorNotifier, { error: this.state.error })] }));
38
+ return (_jsxs(_Fragment, { children: [_jsxs("div", { className: `${Styles.ns_input_parent} ${(_a = this.props.classList) === null || _a === void 0 ? void 0 : _a.join(" ")}`, style: this.props.style, children: [_jsxs("span", { className: Styles.ns_input_title, children: [" ", this.props.required && _jsx("span", { style: { color: "red" }, children: "*" }), " ", this.props.title, " "] }), _jsx("input", { id: this.props.id, value: this.state.value, onChange: this.onChanged, type: "date", className: Styles.ns_input, placeholder: this.props.placeholder, onClick: () => { } })] }), _jsx(NSBoxErrorNotifier, { error: this.state.error })] }));
39
39
  }
40
40
  }
41
- //# sourceMappingURL=NSInputDate.js.map
41
+ //# sourceMappingURL=NSBoxDate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NSBoxDate.js","sourceRoot":"","sources":["../../src/components/NSBoxDate.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,MAAM,MAAM,wBAAwB,CAAC;AAE5C,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAgBzC,MAAM,OAAO,SAAU,SAAQ,KAAK,CAAC,SAA2C;IAE/E,YAAY,KAAsB;;QAEjC,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,KAAK,GAAG,EAAE,KAAK,EAAE,MAAA,KAAK,CAAC,YAAY,mCAAI,EAAE,EAAE,CAAC;QACjD,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACzC,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACzC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC5C,CAAC;IACD,QAAQ;QAEP,OAAO,CACN,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC;YAClE,SAAS,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAC1D,CAAC;IACH,CAAC;IACD,QAAQ;QAEP,IAAI,KAAK,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC;QAC5B,IAAI,KAAK,EACT;Y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K,CAAC,KAAK,GAAI,IAC7C,CACH,CAAC;IACH,CAAC;CACD"}
@@ -0,0 +1,21 @@
1
+ import React from "react";
2
+ import { IBaseComponentProps } from "../props/IBaseComponentProps";
3
+ import { IValidationProps } from "../props/IValidationProps";
4
+ export interface INSBoxDateTimeProps extends IBaseComponentProps, IValidationProps {
5
+ title: string;
6
+ defaultValue?: string;
7
+ onChanged?: (e: React.ChangeEvent<HTMLInputElement>) => void;
8
+ placeholder?: string;
9
+ }
10
+ export interface INSBoxDateTimeState {
11
+ value: string;
12
+ error?: string;
13
+ }
14
+ export declare class NSBoxDateTime extends React.Component<INSBoxDateTimeProps, INSBoxDateTimeState> {
15
+ constructor(props: INSBoxDateTimeProps);
16
+ getError(): string | null;
17
+ getValue(): string;
18
+ setValue(value: string): void;
19
+ private onChanged;
20
+ render(): import("react/jsx-runtime").JSX.Element;
21
+ }
@@ -0,0 +1,41 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
+ import React from "react";
4
+ import Styles from "./NSBoxDate.module.css";
5
+ import { NSBoxErrorNotifier } from "./NSBoxErrorNotifier";
6
+ import { Validator } from "../Validator";
7
+ export class NSBoxDateTime extends React.Component {
8
+ constructor(props) {
9
+ var _a;
10
+ super(props);
11
+ this.state = { value: (_a = props.defaultValue) !== null && _a !== void 0 ? _a : "" };
12
+ this.setValue = this.setValue.bind(this);
13
+ this.getValue = this.getValue.bind(this);
14
+ this.onChanged = this.onChanged.bind(this);
15
+ }
16
+ getError() {
17
+ return (Validator.getError(this.props.title, this.state.value, this.props) &&
18
+ Validator.getErrorDate(this.props.title, this.state.value));
19
+ }
20
+ getValue() {
21
+ let error = this.getError();
22
+ if (error) {
23
+ this.setState({ error });
24
+ throw new Error(error);
25
+ }
26
+ return this.state.value;
27
+ }
28
+ setValue(value) {
29
+ this.setState({ value });
30
+ }
31
+ onChanged(e) {
32
+ this.setValue(e.target.value);
33
+ if (this.props.onChanged)
34
+ this.props.onChanged(e);
35
+ }
36
+ render() {
37
+ var _a;
38
+ return (_jsxs(_Fragment, { children: [_jsxs("div", { className: `${Styles.ns_input_parent} ${(_a = this.props.classList) === null || _a === void 0 ? void 0 : _a.join(" ")}`, style: this.props.style, children: [_jsxs("span", { className: Styles.ns_input_title, children: [" ", this.props.required && _jsx("span", { style: { color: "red" }, children: "*" }), " ", this.props.title, " "] }), _jsx("input", { id: this.props.id, value: this.state.value, onChange: this.onChanged, type: "datetime-local", className: Styles.ns_input, placeholder: this.props.placeholder, onClick: () => { } })] }), _jsx(NSBoxErrorNotifier, { error: this.state.error })] }));
39
+ }
40
+ }
41
+ //# sourceMappingURL=NSBoxDateTime.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NSBoxDateTime.js","sourceRoot":"","sources":["../../src/components/NSBoxDateTime.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,MAAM,MAAM,wBAAwB,CAAC;AAE5C,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAgBzC,MAAM,OAAO,aAAc,SAAQ,KAAK,CAAC,SAAmD;IAE3F,YAAY,KAA0B;;QAErC,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,KAAK,GAAG,EAAE,KAAK,EAAE,MAAA,KAAK,CAAC,YAAY,mCAAI,EAAE,EAAE,CAAC;QACjD,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACzC,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACzC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC5C,CAAC;IACD,QAAQ;QAE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ACrI,gBACC,EAAE,EAAE,IAAI,CAAC,KAAK,CAAC,EAAE,EACjB,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EACvB,QAAQ,EAAE,IAAI,CAAC,SAAS,EACxB,IAAI,EAAC,gBAAgB,EACrB,SAAS,EAAE,MAAM,CAAC,QAAQ,EAC1B,WAAW,EAAE,IAAI,CAAC,KAAK,CAAC,WAAW,EACnC,OAAO,EAAE,GAAG,EAAE,GAAG,CAAC,GACjB,IACG,EACN,KAAC,kBAAkB,IAAC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,GAAI,IAC7C,CACH,CAAC;IACH,CAAC;CACD"}
@@ -1,19 +1,19 @@
1
1
  import React from "react";
2
2
  import { IBaseComponentProps } from "../props/IBaseComponentProps";
3
- import { IValidationNumberProps } from "../props/IValidationNumberProps";
4
3
  import { IValidationProps } from "../props/IValidationProps";
5
- export interface INSInputIntegerProps extends IBaseComponentProps, IValidationProps, IValidationNumberProps {
4
+ import { IValidationNumberProps } from "../props/IValidationNumberProps";
5
+ export interface INSBoxDoubleProps extends IBaseComponentProps, IValidationProps, IValidationNumberProps {
6
6
  title: string;
7
7
  defaultValue?: number;
8
8
  onChanged?: (e: React.ChangeEvent<HTMLInputElement>) => void;
9
9
  placeholder?: string;
10
10
  }
11
- export interface NSInputIntegerState {
11
+ export interface INSBoxDoubleState {
12
12
  value?: number;
13
13
  error?: string;
14
14
  }
15
- export declare class NSInputInteger extends React.Component<INSInputIntegerProps, NSInputIntegerState> {
16
- constructor(props: INSInputIntegerProps);
15
+ export declare class NSBoxDouble extends React.Component<INSBoxDoubleProps, INSBoxDoubleState> {
16
+ constructor(props: INSBoxDoubleProps);
17
17
  getError(): string | null;
18
18
  getValue(): number | undefined;
19
19
  setValue(value: number | undefined): void;
@@ -1,16 +1,16 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
3
  import React from "react";
4
- import Styles from "./NSInput.module.css";
5
- import IconInputPrice from '../assets/images/icon-input-price.svg';
4
+ import Styles from "./NSBox.module.css";
5
+ import IconInputFloat from '../assets/images/icon-input-float.svg';
6
6
  import { Validator } from "../Validator";
7
- import { NSInputErrorNotifier } from "./NSInputErrorNotifier";
8
- export class NSInputPrice extends React.Component {
7
+ import { NSBoxErrorNotifier } from "./NSBoxErrorNotifier";
8
+ export class NSBoxDouble extends React.Component {
9
9
  constructor(props) {
10
10
  super(props);
11
11
  this.state = { value: props.defaultValue };
12
- this.getValue = this.getValue.bind(this);
13
12
  this.setValue = this.setValue.bind(this);
13
+ this.getValue = this.getValue.bind(this);
14
14
  this.onChanged = this.onChanged.bind(this);
15
15
  }
16
16
  getError() {
@@ -29,13 +29,13 @@ export class NSInputPrice extends React.Component {
29
29
  this.setState({ value });
30
30
  }
31
31
  onChanged(e) {
32
- this.setValue(parseInt(e.target.value));
32
+ this.setValue(parseFloat(e.target.value));
33
33
  if (this.props.onChanged)
34
34
  this.props.onChanged(e);
35
35
  }
36
36
  render() {
37
37
  var _a;
38
- return (_jsxs(_Fragment, { children: [_jsxs("div", { className: `${Styles.ns_input_parent} p-2 ${(_a = this.props.classList) === null || _a === void 0 ? void 0 : _a.join(" ")}`, style: this.props.style, children: [_jsxs("span", { className: Styles.ns_input_title, children: [" ", this.props.required && _jsx("span", { style: { color: "red" }, children: "*" }), " ", this.props.title, " "] }), _jsx("img", { className: Styles.ns_input_icon, src: IconInputPrice, alt: "Price Icon", width: 24, height: 24 }), _jsx("input", { id: this.props.id, value: this.state.value, onChange: this.onChanged, type: "number", step: "20", className: Styles.ns_input, placeholder: this.props.placeholder })] }), _jsx(NSInputErrorNotifier, { error: this.state.error })] }));
38
+ return (_jsxs(_Fragment, { children: [_jsxs("div", { className: `${Styles.ns_input_parent} p-2 ${(_a = this.props.classList) === null || _a === void 0 ? void 0 : _a.join(" ")}`, style: this.props.style, children: [_jsxs("span", { className: Styles.ns_input_title, children: [" ", this.props.required && _jsx("span", { style: { color: "red" }, children: "*" }), " ", this.props.title, " "] }), _jsx("img", { className: Styles.ns_input_icon, src: IconInputFloat, alt: "Flaot Icon", width: 24, height: 24 }), _jsx("input", { id: this.props.id, value: this.state.value, onChange: this.onChanged, type: "number", inputMode: "decimal", pattern: "[0-9]*[.,]?[0-9]*", className: Styles.ns_input, placeholder: this.props.placeholder })] }), _jsx(NSBoxErrorNotifier, { error: this.state.error })] }));
39
39
  }
40
40
  }
41
- //# sourceMappingURL=NSInputPrice.js.map
41
+ //# sourceMappingURL=NSBoxDouble.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NSBoxDouble.js","sourceRoot":"","sources":["../../src/components/NSBoxDouble.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,MAAM,MAAM,oBAAoB,CAAC;AACxC,OAAO,cAAc,MAAM,uCAAuC,CAAC;AAInE,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAgB1D,MAAM,OAAO,WAAY,SAAQ,KAAK,CAAC,SAA+C;IAErF,YAAY,KAAwB;QAEnC,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,KAAK,GAAG,EAAE,KAAK,EAAE,KAAK,CAAC,YAAY,EAAE,CAAC;QAC3C,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACzC,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACzC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC5C,CAAC;IACD,QAAQ;QAEP,OAAO,CACN,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,IAAI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aAAa,EAC/B,GAAG,EAAE,cAAc,EACnB,GAAG,EAAC,YAAY,EAChB,KAAK,EAAE,EAAE,EACT,MAAM,EAAE,EAAE,GACT,EACF,gBACC,EAAE,EAAE,IAAI,CAAC,KAAK,CAAC,EAAE,EACjB,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EACvB,QAAQ,EAAE,IAAI,CAAC,SAAS,EACxB,IAAI,EAAC,QAAQ,EACb,SAAS,EAAC,SAAS,EAEnB,OAAO,EAAC,mBAAmB,EAC3B,SAAS,EAAE,MAAM,CAAC,QAAQ,EAC1B,WAAW,EAAE,IAAI,CAAC,KAAK,CAAC,WAAW,GAClC,IACG,EACN,KAAC,kBAAkB,IAAC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,GAAI,IAC7C,CACH,CAAC;IACH,CAAC;CACD"}
@@ -3,18 +3,18 @@ import { IBaseComponentProps } from "../props/IBaseComponentProps";
3
3
  import { IValidationProps } from "../props/IValidationProps";
4
4
  import { IValidationNumberProps } from "../props/IValidationNumberProps";
5
5
  import { IValidationStringProps } from "../props/IValidationStringProps";
6
- export interface INSInputDurationProps extends IBaseComponentProps, IValidationProps, IValidationStringProps, IValidationNumberProps {
6
+ export interface INSBoxDurationProps extends IBaseComponentProps, IValidationProps, IValidationStringProps, IValidationNumberProps {
7
7
  title: string;
8
8
  defaultValue?: string;
9
9
  onChanged?: (e: React.ChangeEvent<HTMLInputElement>) => void;
10
10
  placeholder?: string;
11
11
  }
12
- export interface NSInputDurationState {
12
+ export interface INSBoxDurationState {
13
13
  value: string;
14
14
  error?: string;
15
15
  }
16
- export declare class NSInputDuration extends React.Component<INSInputDurationProps, NSInputDurationState> {
17
- constructor(props: INSInputDurationProps);
16
+ export declare class NSBoxDuration extends React.Component<INSBoxDurationProps, INSBoxDurationState> {
17
+ constructor(props: INSBoxDurationProps);
18
18
  getError(): string | null;
19
19
  getValue(): string;
20
20
  setValue(value: string): void;
@@ -1,11 +1,11 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
3
  import React from "react";
4
- import Styles from "./NSInput.module.css";
4
+ import Styles from "./NSBox.module.css";
5
5
  import IconInputDuration from '../assets/images/icon-input-duration.svg';
6
6
  import { Validator } from "../Validator";
7
- import { NSInputErrorNotifier } from "./NSInputErrorNotifier";
8
- export class NSInputDuration extends React.Component {
7
+ import { NSBoxErrorNotifier } from "./NSBoxErrorNotifier";
8
+ export class NSBoxDuration extends React.Component {
9
9
  constructor(props) {
10
10
  var _a;
11
11
  super(props);
@@ -36,7 +36,7 @@ export class NSInputDuration extends React.Component {
36
36
  }
37
37
  render() {
38
38
  var _a;
39
- return (_jsxs(_Fragment, { children: [_jsxs("div", { className: `${Styles.ns_input_parent} p-2 ${(_a = this.props.classList) === null || _a === void 0 ? void 0 : _a.join(" ")}`, style: this.props.style, children: [_jsxs("span", { className: Styles.ns_input_title, children: [" ", this.props.required && _jsx("span", { style: { color: "red" }, children: "*" }), " ", this.props.title, " "] }), _jsx("img", { className: Styles.ns_input_icon, src: IconInputDuration, alt: "Duration Icon", width: 24, height: 24 }), _jsx("input", { id: this.props.id, value: this.state.value, onChange: this.onChanged, type: "time", className: Styles.ns_input, placeholder: this.props.placeholder, step: "2" })] }), _jsx(NSInputErrorNotifier, { error: this.state.error })] }));
39
+ return (_jsxs(_Fragment, { children: [_jsxs("div", { className: `${Styles.ns_input_parent} p-2 ${(_a = this.props.classList) === null || _a === void 0 ? void 0 : _a.join(" ")}`, style: this.props.style, children: [_jsxs("span", { className: Styles.ns_input_title, children: [" ", this.props.required && _jsx("span", { style: { color: "red" }, children: "*" }), " ", this.props.title, " "] }), _jsx("img", { className: Styles.ns_input_icon, src: IconInputDuration, alt: "Duration Icon", width: 24, height: 24 }), _jsx("input", { id: this.props.id, value: this.state.value, onChange: this.onChanged, type: "time", className: Styles.ns_input, placeholder: this.props.placeholder, step: "2" })] }), _jsx(NSBoxErrorNotifier, { error: this.state.error })] }));
40
40
  }
41
41
  }
42
- //# sourceMappingURL=NSInputDuration.js.map
42
+ //# sourceMappingURL=NSBoxDuration.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NSBoxDuration.js","sourceRoot":"","sources":["../../src/components/NSBoxDuration.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,MAAM,MAAM,oBAAoB,CAAC;AACxC,OAAO,iBAAiB,MAAM,0CAA0C,CAAC;AAKzE,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAgB1D,MAAM,OAAO,aAAc,SAAQ,KAAK,CAAC,SAAmD;IAE3F,YAAY,KAA0B;;QAErC,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,KAAK,GAAG,EAAE,KAAK,EAAE,MAAA,KAAK,CAAC,YAAY,mCAAI,EAAE,EAAE,CAAC;QACjD,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACzC,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACzC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC5C,CAAC;IACD,QAAQ;QAEP,OAAO,CACN,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC;YAClE,SAAS,CAAC,gBAAgB,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAC9D,CAAC;IACH,CAAC;IACD,QAAQ;QAEP,IAAI,KAAK,GAAG,IAAI,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AAM,EACX,SAAS,EAAE,MAAM,CAAC,QAAQ,EAC1B,WAAW,EAAE,IAAI,CAAC,KAAK,CAAC,WAAW,EACnC,IAAI,EAAC,GAAG,GACP,IACG,EACN,KAAC,kBAAkB,IAAC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,GAAI,IAC7C,CACH,CAAC;IACH,CAAC;CACD"}
@@ -1,19 +1,19 @@
1
1
  import React from "react";
2
- import { IBaseComponentProps } from "../props/IBaseComponentProps";
3
2
  import { IValidationProps } from "../props/IValidationProps";
4
3
  import { IValidationStringProps } from "../props/IValidationStringProps";
5
- export interface INSInputTimeProps extends IBaseComponentProps, IValidationProps, IValidationStringProps {
4
+ import { IBaseComponentProps } from "../props/IBaseComponentProps";
5
+ export interface INSBoxEmailProps extends IBaseComponentProps, IValidationProps, IValidationStringProps {
6
6
  title: string;
7
7
  defaultValue?: string;
8
8
  onChanged?: (e: React.ChangeEvent<HTMLInputElement>) => void;
9
9
  placeholder?: string;
10
10
  }
11
- export interface NSInputTimeState {
11
+ export interface INSBoxEmailState {
12
12
  value: string;
13
13
  error?: string;
14
14
  }
15
- export declare class NSInputTime extends React.Component<INSInputTimeProps, NSInputTimeState> {
16
- constructor(props: INSInputTimeProps);
15
+ export declare class NSBoxEmail extends React.Component<INSBoxEmailProps, INSBoxEmailState> {
16
+ constructor(props: INSBoxEmailProps);
17
17
  getError(): string | null;
18
18
  getValue(): string;
19
19
  setValue(value: string): void;
@@ -1,11 +1,11 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
3
  import React from "react";
4
- import Styles from "./NSInput.module.css";
4
+ import Styles from "./NSBox.module.css";
5
5
  import IconInputEmail from '../assets/images/icon-input-email.svg';
6
6
  import { Validator } from "../Validator";
7
- import { NSInputErrorNotifier } from "./NSInputErrorNotifier";
8
- export class NSInputEmail extends React.Component {
7
+ import { NSBoxErrorNotifier } from "./NSBoxErrorNotifier";
8
+ export class NSBoxEmail extends React.Component {
9
9
  constructor(props) {
10
10
  var _a;
11
11
  super(props);
@@ -37,7 +37,7 @@ export class NSInputEmail extends React.Component {
37
37
  }
38
38
  render() {
39
39
  var _a;
40
- return (_jsxs(_Fragment, { children: [_jsxs("div", { className: `${Styles.ns_input_parent} ${(_a = this.props.classList) === null || _a === void 0 ? void 0 : _a.join(" ")}`, style: this.props.style, children: [_jsxs("span", { className: Styles.ns_input_title, children: [" ", this.props.required && _jsx("span", { style: { color: "red" }, children: "*" }), " ", this.props.title, " "] }), _jsx("img", { className: Styles.ns_input_icon, src: IconInputEmail, alt: "Email Icon", width: 24, height: 24 }), _jsx("input", { id: this.props.id, value: this.state.value, onChange: this.onChanged, type: "email", className: Styles.ns_input, placeholder: this.props.placeholder })] }), _jsx(NSInputErrorNotifier, { error: this.state.error })] }));
40
+ return (_jsxs(_Fragment, { children: [_jsxs("div", { className: `${Styles.ns_input_parent} ${(_a = this.props.classList) === null || _a === void 0 ? void 0 : _a.join(" ")}`, style: this.props.style, children: [_jsxs("span", { className: Styles.ns_input_title, children: [" ", this.props.required && _jsx("span", { style: { color: "red" }, children: "*" }), " ", this.props.title, " "] }), _jsx("img", { className: Styles.ns_input_icon, src: IconInputEmail, alt: "Email Icon", width: 24, height: 24 }), _jsx("input", { id: this.props.id, value: this.state.value, onChange: this.onChanged, type: "email", className: Styles.ns_input, placeholder: this.props.placeholder })] }), _jsx(NSBoxErrorNotifier, { error: this.state.error })] }));
41
41
  }
42
42
  }
43
- //# sourceMappingURL=NSInputEmail.js.map
43
+ //# sourceMappingURL=NSBoxEmail.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NSBoxEmail.js","sourceRoot":"","sources":["../../src/components/NSBoxEmail.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,MAAM,MAAM,oBAAoB,CAAC;AACxC,OAAO,cAAc,MAAM,uCAAuC,CAAC;AACn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0,0 +1,12 @@
1
+ import React from "react";
2
+ import type { SelectProps } from 'antd';
3
+ import { IBaseComponentProps } from "../props/IBaseComponentProps";
4
+ import { IValidationProps } from "../props/IValidationProps";
5
+ export interface INSBoxEntityProps extends IBaseComponentProps, IValidationProps {
6
+ title: string;
7
+ options: SelectProps['options'];
8
+ multiple: boolean;
9
+ }
10
+ export declare class NSBoxEntity extends React.Component<INSBoxEntityProps> {
11
+ render(): React.ReactNode;
12
+ }
@@ -0,0 +1,10 @@
1
+ "use client";
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import React from "react";
4
+ import { NSSelectBox } from "./NSSelectBox";
5
+ export class NSBoxEntity extends React.Component {
6
+ render() {
7
+ return (_jsx(NSSelectBox, { placeHolder: "Entity Box", title: this.props.title, multiple: false, options: this.props.options, required: false }));
8
+ }
9
+ }
10
+ //# sourceMappingURL=NSBoxEntity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NSBoxEntity.js","sourceRoot":"","sources":["../../src/components/NSBoxEntity.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AACb,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAS5C,MAAM,OAAO,WAAY,SAAQ,KAAK,CAAC,SAA4B;IAEzD,MAAM;QAEd,OAAO,CACN,KAAC,WAAW,IACX,WAAW,EAAC,YAAY,EACxB,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EACvB,QAAQ,EAAE,KAAK,EACf,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,OAAO,EAC3B,QAAQ,EAAE,KAAK,GACd,CACF,CAAA;IACF,CAAC;CACD"}
@@ -0,0 +1,7 @@
1
+ import { IBaseComponentProps } from "../props/IBaseComponentProps";
2
+ import { IValidationProps } from "../props/IValidationProps";
3
+ export interface INSBoxEnumProps extends IBaseComponentProps, IValidationProps {
4
+ title: string;
5
+ multiple: boolean;
6
+ }
7
+ export declare function NSBoxEnum(props: INSBoxEnumProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,38 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { NSSelectBox } from "./NSSelectBox";
3
+ const options = [
4
+ {
5
+ date: {
6
+ desc: "test"
7
+ },
8
+ },
9
+ {
10
+ date: {
11
+ desc: "test"
12
+ },
13
+ },
14
+ {
15
+ date: {
16
+ desc: "test"
17
+ },
18
+ },
19
+ {
20
+ date: {
21
+ desc: "test"
22
+ },
23
+ },
24
+ {
25
+ date: {
26
+ desc: "test"
27
+ },
28
+ },
29
+ {
30
+ date: {
31
+ desc: "test"
32
+ },
33
+ },
34
+ ];
35
+ export function NSBoxEnum(props) {
36
+ return (_jsx(NSSelectBox, { placeHolder: "Enum Box", title: props.title, multiple: false, options: options, required: false }));
37
+ }
38
+ //# sourceMappingURL=NSBoxEnum.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NSBoxEnum.js","sourceRoot":"","sources":["../../src/components/NSBoxEnum.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,MAAM,OAAO,GAAI;IAChB;QACC,IAAI,EAAE;YACL,IAAI,EAAG,MAAM;SACb;KACD;IACD;QACC,IAAI,EAAE;YACL,IAAI,EAAG,MAAM;SACb;KACD;IACD;QACC,IAAI,EAAE;YACL,IAAI,EAAG,MAAM;SACb;KACD;IACD;QACC,IAAI,EAAE;YACL,IAAI,EAAG,MAAM;SACb;KACD;IACD;QACC,IAAI,EAAE;YACL,IAAI,EAAG,MAAM;SACb;KACD;IACD;QACC,IAAI,EAAE;YACL,IAAI,EAAG,MAAM;SACb;KACD;CACD,CAAA;AAOD,MAAM,UAAU,SAAS,CAAC,KAAsB;IAE/C,OAAO,CACN,KAAC,WAAW,IACX,WAAW,EAAC,UAAU,EACtB,KAAK,EAAE,KAAK,CAAC,KAAK,EAClB,QAAQ,EAAE,KAAK,EACf,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,KAAK,GACd,CACF,CAAA;AACF,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { IBaseComponentProps } from "../props/IBaseComponentProps";
2
+ export interface INSBoxErrorNotifierProps extends IBaseComponentProps {
3
+ error?: string;
4
+ }
5
+ export declare function NSBoxErrorNotifier(props: INSBoxErrorNotifierProps): import("react/jsx-runtime").JSX.Element;
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
- import Styles from "./NSInputErrorNotifier.module.css";
2
+ import Styles from "./NSBoxErrorNotifier.module.css";
3
3
  import Danger from '../assets/images/danger.svg';
4
- export function NSInputErrorNotifier(props) {
4
+ export function NSBoxErrorNotifier(props) {
5
5
  return _jsx(_Fragment, { children: props.error && (_jsxs("div", { className: "d-flex justify-content-start align-items-center gap-2 ms-2", children: [_jsx("img", { className: "", src: Danger, alt: "Error Icon", width: 13, height: 13 }), _jsx("span", { className: Styles.ns_input_error, children: props.error })] })) });
6
6
  }
7
- //# sourceMappingURL=NSInputErrorNotifier.js.map
7
+ //# sourceMappingURL=NSBoxErrorNotifier.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NSBoxErrorNotifier.js","sourceRoot":"","sources":["../../src/components/NSBoxErrorNotifier.tsx"],"names":[],"mappings":";AAAA,OAAO,MAAM,MAAM,iCAAiC,CAAC;AACrD,OAAO,MAAM,MAAM,6BAA6B,CAAC;AAQjD,MAAM,UAAU,kBAAkB,CAAC,KAA+B;IAEjE,OAAO,4BAEL,KAAK,CAAC,KAAK,IAAI,CACd,eAAK,SAAS,EAAC,4DAA4D,aAC1E,cACC,SAAS,EAAE,EAAE,EACb,GAAG,EAAE,MAAM,EACX,GAAG,EAAC,YAAY,EAChB,KAAK,EAAE,EAAE,EACT,MAAM,EAAE,EAAE,GACT,EACF,eAAM,SAAS,EAAE,MAAM,CAAC,cAAc,YAAG,KAAK,CAAC,KAAK,GAAQ,IACtD,CACP,GAEA,CAAC;AACL,CAAC"}
@@ -2,18 +2,18 @@ import React from "react";
2
2
  import { IBaseComponentProps } from "../props/IBaseComponentProps";
3
3
  import { IValidationProps } from "../props/IValidationProps";
4
4
  import { IValidationStringProps } from "../props/IValidationStringProps";
5
- export interface INSInputIPProps extends IBaseComponentProps, IValidationProps, IValidationStringProps {
5
+ export interface INSBoxIPV4Props extends IBaseComponentProps, IValidationProps, IValidationStringProps {
6
6
  title: string;
7
7
  defaultValue?: string;
8
8
  onChanged?: (e: React.ChangeEvent<HTMLInputElement>) => void;
9
9
  placeholder?: string;
10
10
  }
11
- export interface NSInputIPState {
11
+ export interface INSBoxIPV4State {
12
12
  value: string;
13
13
  error?: string;
14
14
  }
15
- export declare class NSInputIP extends React.Component<INSInputIPProps, NSInputIPState> {
16
- constructor(props: INSInputIPProps);
15
+ export declare class NSBoxIPV4 extends React.Component<INSBoxIPV4Props, INSBoxIPV4State> {
16
+ constructor(props: INSBoxIPV4Props);
17
17
  getError(): string | null;
18
18
  getValue(): string;
19
19
  setValue(value: string): void;
@@ -1,11 +1,12 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
3
  import React from "react";
4
- import Styles from "./NSInput.module.css";
4
+ import Styles from "./NSBox.module.css";
5
5
  import IconInputIP from '../assets/images/icon-input-ip.svg';
6
6
  import { Validator } from "../Validator";
7
- import { NSInputErrorNotifier } from "./NSInputErrorNotifier";
8
- export class NSInputIP extends React.Component {
7
+ import { NSBoxErrorNotifier } from "./NSBoxErrorNotifier";
8
+ const IPV4_PATTERN = "^((\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.){3}(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$";
9
+ export class NSBoxIPV4 extends React.Component {
9
10
  constructor(props) {
10
11
  var _a;
11
12
  super(props);
@@ -37,7 +38,7 @@ export class NSInputIP extends React.Component {
37
38
  }
38
39
  render() {
39
40
  var _a;
40
- return (_jsxs(_Fragment, { children: [_jsxs("div", { className: `${Styles.ns_input_parent} ${(_a = this.props.classList) === null || _a === void 0 ? void 0 : _a.join(" ")}`, style: this.props.style, children: [_jsxs("span", { className: Styles.ns_input_title, children: [" ", this.props.required && _jsx("span", { style: { color: "red" }, children: "*" }), " ", this.props.title, " "] }), _jsx("img", { className: Styles.ns_input_icon, src: IconInputIP, alt: "IP Icon", width: 24, height: 24 }), _jsx("input", { id: this.props.id, value: this.state.value, onChange: this.onChanged, type: "text", className: Styles.ns_input, placeholder: this.props.placeholder })] }), _jsx(NSInputErrorNotifier, { error: this.state.error })] }));
41
+ return (_jsxs(_Fragment, { children: [_jsxs("div", { className: `${Styles.ns_input_parent} ${(_a = this.props.classList) === null || _a === void 0 ? void 0 : _a.join(" ")}`, style: this.props.style, children: [_jsxs("span", { className: Styles.ns_input_title, children: [" ", this.props.required && _jsx("span", { style: { color: "red" }, children: "*" }), " ", this.props.title, " "] }), _jsx("img", { className: Styles.ns_input_icon, src: IconInputIP, alt: "IP Icon", width: 24, height: 24 }), _jsx("input", { id: this.props.id, value: this.state.value, onChange: this.onChanged, type: "text", className: Styles.ns_input, placeholder: this.props.placeholder, minLength: 7, maxLength: 15, size: 15, pattern: IPV4_PATTERN })] }), _jsx(NSBoxErrorNotifier, { error: this.state.error })] }));
41
42
  }
42
43
  }
43
- //# sourceMappingURL=NSInputIP.js.map
44
+ //# sourceMappingURL=NSBoxIPV4.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NSBoxIPV4.js","sourceRoot":"","sources":["../../src/components/NSBoxIPV4.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,MAAM,MAAM,oBAAoB,CAAC;AACxC,OAAO,WAAW,MAAM,oCAAoC,CAAC;AAI7D,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC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ACH,CAAC;IACH,CAAC;CACD"}
@@ -1,19 +1,19 @@
1
1
  import React from "react";
2
+ import { IBaseComponentProps } from "../props/IBaseComponentProps";
2
3
  import { IValidationProps } from "../props/IValidationProps";
3
4
  import { IValidationStringProps } from "../props/IValidationStringProps";
4
- import { IBaseComponentProps } from "../props/IBaseComponentProps";
5
- export interface INSInputEmailProps extends IBaseComponentProps, IValidationProps, IValidationStringProps {
5
+ export interface INSBoxIPV6Props extends IBaseComponentProps, IValidationProps, IValidationStringProps {
6
6
  title: string;
7
7
  defaultValue?: string;
8
8
  onChanged?: (e: React.ChangeEvent<HTMLInputElement>) => void;
9
9
  placeholder?: string;
10
10
  }
11
- export interface NSInputEmailState {
11
+ export interface INSBoxIPV6State {
12
12
  value: string;
13
13
  error?: string;
14
14
  }
15
- export declare class NSInputEmail extends React.Component<INSInputEmailProps, NSInputEmailState> {
16
- constructor(props: INSInputEmailProps);
15
+ export declare class NSBoxIPV6 extends React.Component<INSBoxIPV6Props, INSBoxIPV6State> {
16
+ constructor(props: INSBoxIPV6Props);
17
17
  getError(): string | null;
18
18
  getValue(): string;
19
19
  setValue(value: string): void;
@@ -0,0 +1,44 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
+ import React from "react";
4
+ import Styles from "./NSBox.module.css";
5
+ import IconInputIP from '../assets/images/icon-input-ip.svg';
6
+ import { Validator } from "../Validator";
7
+ import { NSBoxErrorNotifier } from "./NSBoxErrorNotifier";
8
+ const IPV6_PATTERN = '^((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?$';
9
+ export class NSBoxIPV6 extends React.Component {
10
+ constructor(props) {
11
+ var _a;
12
+ super(props);
13
+ this.state = { value: (_a = props.defaultValue) !== null && _a !== void 0 ? _a : "" };
14
+ this.getValue = this.getValue.bind(this);
15
+ this.setValue = this.setValue.bind(this);
16
+ this.onChanged = this.onChanged.bind(this);
17
+ }
18
+ getError() {
19
+ return (Validator.getError(this.props.title, this.state.value, this.props) &&
20
+ Validator.getErrorString(this.props.title, this.state.value, this.props) &&
21
+ Validator.getErrorIP(this.props.title, this.state.value));
22
+ }
23
+ getValue() {
24
+ let error = this.getError();
25
+ if (error) {
26
+ this.setState({ error });
27
+ throw new Error(error);
28
+ }
29
+ return this.state.value;
30
+ }
31
+ setValue(value) {
32
+ this.setState({ value });
33
+ }
34
+ onChanged(e) {
35
+ this.setValue(e.target.value);
36
+ if (this.props.onChanged)
37
+ this.props.onChanged(e);
38
+ }
39
+ render() {
40
+ var _a;
41
+ return (_jsxs(_Fragment, { children: [_jsxs("div", { className: `${Styles.ns_input_parent} ${(_a = this.props.classList) === null || _a === void 0 ? void 0 : _a.join(" ")}`, style: this.props.style, children: [_jsxs("span", { className: Styles.ns_input_title, children: [" ", this.props.required && _jsx("span", { style: { color: "red" }, children: "*" }), " ", this.props.title, " "] }), _jsx("img", { className: Styles.ns_input_icon, src: IconInputIP, alt: "IP Icon", width: 24, height: 24 }), _jsx("input", { id: this.props.id, value: this.state.value, onChange: this.onChanged, type: "text", className: Styles.ns_input, placeholder: this.props.placeholder, pattern: IPV6_PATTERN })] }), _jsx(NSBoxErrorNotifier, { error: this.state.error })] }));
42
+ }
43
+ }
44
+ //# sourceMappingURL=NSBoxIPV6.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NSBoxIPV6.js","sourceRoot":"","sources":["../../src/components/NSBoxIPV6.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,MAAM,MAAM,oBAAoB,CAAC;AACxC,OAAO,WAAW,MAAM,oCAAoC,CAAC;AAI7D,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAG1D,MAAM,YAAY,GAAW,mjCAAmjC,CAAC;AAejlC,MAAM,OAAO,SAAU,SAAQ,KAAK,CAAC,SAA2C;IAE/E,YAAY,KAAsB;;QAEjC,KAAK,CAAC,KAAK,CAAC,CAAC;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