namirasoft-site-react 1.3.308 → 1.3.310

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 (268) hide show
  1. package/dist/components/NSBoxEntity.module.css +17 -0
  2. package/package.json +1 -1
  3. package/src/App.tsx +2 -2
  4. package/src/components/NSBoxEntity.module.css +17 -0
  5. package/src/components/NSBoxEntity.tsx +3 -3
  6. package/src/components/NSTable.tsx +1 -0
  7. package/tsconfig.json +8 -7
  8. package/dist/App.d.ts +0 -9
  9. package/dist/App.js +0 -96
  10. package/dist/App.js.map +0 -1
  11. package/dist/CopyToClipboard.d.ts +0 -3
  12. package/dist/CopyToClipboard.js +0 -7
  13. package/dist/CopyToClipboard.js.map +0 -1
  14. package/dist/Validator.d.ts +0 -14
  15. package/dist/Validator.js +0 -94
  16. package/dist/Validator.js.map +0 -1
  17. package/dist/components/NSActionMenu.d.ts +0 -14
  18. package/dist/components/NSActionMenu.js +0 -33
  19. package/dist/components/NSActionMenu.js.map +0 -1
  20. package/dist/components/NSAssistantButton.d.ts +0 -6
  21. package/dist/components/NSAssistantButton.js +0 -20
  22. package/dist/components/NSAssistantButton.js.map +0 -1
  23. package/dist/components/NSBarAction.d.ts +0 -12
  24. package/dist/components/NSBarAction.js +0 -20
  25. package/dist/components/NSBarAction.js.map +0 -1
  26. package/dist/components/NSBarHeroBanner.d.ts +0 -7
  27. package/dist/components/NSBarHeroBanner.js +0 -8
  28. package/dist/components/NSBarHeroBanner.js.map +0 -1
  29. package/dist/components/NSBarNotification.d.ts +0 -21
  30. package/dist/components/NSBarNotification.js +0 -37
  31. package/dist/components/NSBarNotification.js.map +0 -1
  32. package/dist/components/NSBarTitle.d.ts +0 -5
  33. package/dist/components/NSBarTitle.js +0 -11
  34. package/dist/components/NSBarTitle.js.map +0 -1
  35. package/dist/components/NSBoxBoolean.d.ts +0 -23
  36. package/dist/components/NSBoxBoolean.js +0 -40
  37. package/dist/components/NSBoxBoolean.js.map +0 -1
  38. package/dist/components/NSBoxCombo.d.ts +0 -33
  39. package/dist/components/NSBoxCombo.js +0 -65
  40. package/dist/components/NSBoxCombo.js.map +0 -1
  41. package/dist/components/NSBoxDate.d.ts +0 -22
  42. package/dist/components/NSBoxDate.js +0 -42
  43. package/dist/components/NSBoxDate.js.map +0 -1
  44. package/dist/components/NSBoxDateTime.d.ts +0 -22
  45. package/dist/components/NSBoxDateTime.js +0 -42
  46. package/dist/components/NSBoxDateTime.js.map +0 -1
  47. package/dist/components/NSBoxDouble.d.ts +0 -23
  48. package/dist/components/NSBoxDouble.js +0 -42
  49. package/dist/components/NSBoxDouble.js.map +0 -1
  50. package/dist/components/NSBoxDuration.d.ts +0 -24
  51. package/dist/components/NSBoxDuration.js +0 -43
  52. package/dist/components/NSBoxDuration.js.map +0 -1
  53. package/dist/components/NSBoxEmail.d.ts +0 -25
  54. package/dist/components/NSBoxEmail.js +0 -50
  55. package/dist/components/NSBoxEmail.js.map +0 -1
  56. package/dist/components/NSBoxEntity.d.ts +0 -42
  57. package/dist/components/NSBoxEntity.js +0 -86
  58. package/dist/components/NSBoxEntity.js.map +0 -1
  59. package/dist/components/NSBoxEnum.d.ts +0 -19
  60. package/dist/components/NSBoxEnum.js +0 -46
  61. package/dist/components/NSBoxEnum.js.map +0 -1
  62. package/dist/components/NSBoxErrorNotifier.d.ts +0 -6
  63. package/dist/components/NSBoxErrorNotifier.js +0 -11
  64. package/dist/components/NSBoxErrorNotifier.js.map +0 -1
  65. package/dist/components/NSBoxIPV4.d.ts +0 -23
  66. package/dist/components/NSBoxIPV4.js +0 -45
  67. package/dist/components/NSBoxIPV4.js.map +0 -1
  68. package/dist/components/NSBoxIPV6.d.ts +0 -23
  69. package/dist/components/NSBoxIPV6.js +0 -45
  70. package/dist/components/NSBoxIPV6.js.map +0 -1
  71. package/dist/components/NSBoxInteger.d.ts +0 -23
  72. package/dist/components/NSBoxInteger.js +0 -42
  73. package/dist/components/NSBoxInteger.js.map +0 -1
  74. package/dist/components/NSBoxLabel.d.ts +0 -12
  75. package/dist/components/NSBoxLabel.js +0 -11
  76. package/dist/components/NSBoxLabel.js.map +0 -1
  77. package/dist/components/NSBoxOTP.d.ts +0 -9
  78. package/dist/components/NSBoxOTP.js +0 -34
  79. package/dist/components/NSBoxOTP.js.map +0 -1
  80. package/dist/components/NSBoxPassword.d.ts +0 -23
  81. package/dist/components/NSBoxPassword.js +0 -43
  82. package/dist/components/NSBoxPassword.js.map +0 -1
  83. package/dist/components/NSBoxPhone.d.ts +0 -25
  84. package/dist/components/NSBoxPhone.js +0 -45
  85. package/dist/components/NSBoxPhone.js.map +0 -1
  86. package/dist/components/NSBoxPrice.d.ts +0 -23
  87. package/dist/components/NSBoxPrice.js +0 -42
  88. package/dist/components/NSBoxPrice.js.map +0 -1
  89. package/dist/components/NSBoxSearch.d.ts +0 -25
  90. package/dist/components/NSBoxSearch.js +0 -52
  91. package/dist/components/NSBoxSearch.js.map +0 -1
  92. package/dist/components/NSBoxString.d.ts +0 -25
  93. package/dist/components/NSBoxString.js +0 -48
  94. package/dist/components/NSBoxString.js.map +0 -1
  95. package/dist/components/NSBoxTextArea.d.ts +0 -27
  96. package/dist/components/NSBoxTextArea.js +0 -60
  97. package/dist/components/NSBoxTextArea.js.map +0 -1
  98. package/dist/components/NSBoxTime.d.ts +0 -23
  99. package/dist/components/NSBoxTime.js +0 -44
  100. package/dist/components/NSBoxTime.js.map +0 -1
  101. package/dist/components/NSButton.d.ts +0 -9
  102. package/dist/components/NSButton.js +0 -8
  103. package/dist/components/NSButton.js.map +0 -1
  104. package/dist/components/NSButtonBlue.d.ts +0 -2
  105. package/dist/components/NSButtonBlue.js +0 -11
  106. package/dist/components/NSButtonBlue.js.map +0 -1
  107. package/dist/components/NSButtonGreen.d.ts +0 -2
  108. package/dist/components/NSButtonGreen.js +0 -11
  109. package/dist/components/NSButtonGreen.js.map +0 -1
  110. package/dist/components/NSButtonRed.d.ts +0 -2
  111. package/dist/components/NSButtonRed.js +0 -11
  112. package/dist/components/NSButtonRed.js.map +0 -1
  113. package/dist/components/NSCard.d.ts +0 -14
  114. package/dist/components/NSCard.js +0 -18
  115. package/dist/components/NSCard.js.map +0 -1
  116. package/dist/components/NSCopyToClipboard.d.ts +0 -6
  117. package/dist/components/NSCopyToClipboard.js +0 -12
  118. package/dist/components/NSCopyToClipboard.js.map +0 -1
  119. package/dist/components/NSElectronicCard.d.ts +0 -9
  120. package/dist/components/NSElectronicCard.js +0 -13
  121. package/dist/components/NSElectronicCard.js.map +0 -1
  122. package/dist/components/NSEntityBar.d.ts +0 -8
  123. package/dist/components/NSEntityBar.js +0 -7
  124. package/dist/components/NSEntityBar.js.map +0 -1
  125. package/dist/components/NSEntityCardBackground.d.ts +0 -7
  126. package/dist/components/NSEntityCardBackground.js +0 -9
  127. package/dist/components/NSEntityCardBackground.js.map +0 -1
  128. package/dist/components/NSFilterBox.d.ts +0 -61
  129. package/dist/components/NSFilterBox.js +0 -230
  130. package/dist/components/NSFilterBox.js.map +0 -1
  131. package/dist/components/NSFilterBoxDialog.d.ts +0 -12
  132. package/dist/components/NSFilterBoxDialog.js +0 -17
  133. package/dist/components/NSFilterBoxDialog.js.map +0 -1
  134. package/dist/components/NSFilterItem.d.ts +0 -17
  135. package/dist/components/NSFilterItem.js +0 -30
  136. package/dist/components/NSFilterItem.js.map +0 -1
  137. package/dist/components/NSFooter.d.ts +0 -20
  138. package/dist/components/NSFooter.js +0 -56
  139. package/dist/components/NSFooter.js.map +0 -1
  140. package/dist/components/NSGroupedList.d.ts +0 -31
  141. package/dist/components/NSGroupedList.js +0 -42
  142. package/dist/components/NSGroupedList.js.map +0 -1
  143. package/dist/components/NSHeader.d.ts +0 -26
  144. package/dist/components/NSHeader.js +0 -81
  145. package/dist/components/NSHeader.js.map +0 -1
  146. package/dist/components/NSLayout.d.ts +0 -22
  147. package/dist/components/NSLayout.js +0 -30
  148. package/dist/components/NSLayout.js.map +0 -1
  149. package/dist/components/NSLine.d.ts +0 -4
  150. package/dist/components/NSLine.js +0 -6
  151. package/dist/components/NSLine.js.map +0 -1
  152. package/dist/components/NSLink.d.ts +0 -5
  153. package/dist/components/NSLink.js +0 -7
  154. package/dist/components/NSLink.js.map +0 -1
  155. package/dist/components/NSLinkBlue.d.ts +0 -2
  156. package/dist/components/NSLinkBlue.js +0 -13
  157. package/dist/components/NSLinkBlue.js.map +0 -1
  158. package/dist/components/NSLinkGreen.d.ts +0 -2
  159. package/dist/components/NSLinkGreen.js +0 -6
  160. package/dist/components/NSLinkGreen.js.map +0 -1
  161. package/dist/components/NSLinkRed.d.ts +0 -2
  162. package/dist/components/NSLinkRed.js +0 -6
  163. package/dist/components/NSLinkRed.js.map +0 -1
  164. package/dist/components/NSLoading.d.ts +0 -4
  165. package/dist/components/NSLoading.js +0 -7
  166. package/dist/components/NSLoading.js.map +0 -1
  167. package/dist/components/NSModal.d.ts +0 -10
  168. package/dist/components/NSModal.js +0 -13
  169. package/dist/components/NSModal.js.map +0 -1
  170. package/dist/components/NSNoData.d.ts +0 -5
  171. package/dist/components/NSNoData.js +0 -7
  172. package/dist/components/NSNoData.js.map +0 -1
  173. package/dist/components/NSPagination.d.ts +0 -20
  174. package/dist/components/NSPagination.js +0 -82
  175. package/dist/components/NSPagination.js.map +0 -1
  176. package/dist/components/NSPanel.d.ts +0 -7
  177. package/dist/components/NSPanel.js +0 -7
  178. package/dist/components/NSPanel.js.map +0 -1
  179. package/dist/components/NSPrintModal.d.ts +0 -15
  180. package/dist/components/NSPrintModal.js +0 -35
  181. package/dist/components/NSPrintModal.js.map +0 -1
  182. package/dist/components/NSRadioButton.d.ts +0 -5
  183. package/dist/components/NSRadioButton.js +0 -15
  184. package/dist/components/NSRadioButton.js.map +0 -1
  185. package/dist/components/NSSection.d.ts +0 -7
  186. package/dist/components/NSSection.js +0 -10
  187. package/dist/components/NSSection.js.map +0 -1
  188. package/dist/components/NSSectionBars.d.ts +0 -7
  189. package/dist/components/NSSectionBars.js +0 -10
  190. package/dist/components/NSSectionBars.js.map +0 -1
  191. package/dist/components/NSSectionCards.d.ts +0 -13
  192. package/dist/components/NSSectionCards.js +0 -15
  193. package/dist/components/NSSectionCards.js.map +0 -1
  194. package/dist/components/NSSectionTitle.d.ts +0 -7
  195. package/dist/components/NSSectionTitle.js +0 -8
  196. package/dist/components/NSSectionTitle.js.map +0 -1
  197. package/dist/components/NSSpace.d.ts +0 -17
  198. package/dist/components/NSSpace.js +0 -19
  199. package/dist/components/NSSpace.js.map +0 -1
  200. package/dist/components/NSTabPage.d.ts +0 -13
  201. package/dist/components/NSTabPage.js +0 -9
  202. package/dist/components/NSTabPage.js.map +0 -1
  203. package/dist/components/NSTable.d.ts +0 -50
  204. package/dist/components/NSTable.js +0 -153
  205. package/dist/components/NSTable.js.map +0 -1
  206. package/dist/components/NSTag.d.ts +0 -2
  207. package/dist/components/NSTag.js +0 -22
  208. package/dist/components/NSTag.js.map +0 -1
  209. package/dist/components/NSTitle.d.ts +0 -5
  210. package/dist/components/NSTitle.js +0 -7
  211. package/dist/components/NSTitle.js.map +0 -1
  212. package/dist/components/NSVerification.d.ts +0 -9
  213. package/dist/components/NSVerification.js +0 -19
  214. package/dist/components/NSVerification.js.map +0 -1
  215. package/dist/index.d.ts +0 -1
  216. package/dist/index.js +0 -7
  217. package/dist/index.js.map +0 -1
  218. package/dist/main.d.ts +0 -81
  219. package/dist/main.js +0 -82
  220. package/dist/main.js.map +0 -1
  221. package/dist/pages/NSLoginPage.d.ts +0 -6
  222. package/dist/pages/NSLoginPage.js +0 -8
  223. package/dist/pages/NSLoginPage.js.map +0 -1
  224. package/dist/pages/NSNotFoundPage.d.ts +0 -1
  225. package/dist/pages/NSNotFoundPage.js +0 -7
  226. package/dist/pages/NSNotFoundPage.js.map +0 -1
  227. package/dist/props/IBaseComponentProps.d.ts +0 -7
  228. package/dist/props/IBaseComponentProps.js +0 -2
  229. package/dist/props/IBaseComponentProps.js.map +0 -1
  230. package/dist/props/IHeaderIconProps.d.ts +0 -8
  231. package/dist/props/IHeaderIconProps.js +0 -2
  232. package/dist/props/IHeaderIconProps.js.map +0 -1
  233. package/dist/props/IHeaderProps.d.ts +0 -5
  234. package/dist/props/IHeaderProps.js +0 -2
  235. package/dist/props/IHeaderProps.js.map +0 -1
  236. package/dist/props/IImageProps.d.ts +0 -4
  237. package/dist/props/IImageProps.js +0 -2
  238. package/dist/props/IImageProps.js.map +0 -1
  239. package/dist/props/ILinkProps.d.ts +0 -5
  240. package/dist/props/ILinkProps.js +0 -2
  241. package/dist/props/ILinkProps.js.map +0 -1
  242. package/dist/props/IValidationNumberProps.d.ts +0 -4
  243. package/dist/props/IValidationNumberProps.js +0 -2
  244. package/dist/props/IValidationNumberProps.js.map +0 -1
  245. package/dist/props/IValidationProps.d.ts +0 -6
  246. package/dist/props/IValidationProps.js +0 -2
  247. package/dist/props/IValidationProps.js.map +0 -1
  248. package/dist/props/IValidationRegexProps.d.ts +0 -4
  249. package/dist/props/IValidationRegexProps.js +0 -2
  250. package/dist/props/IValidationRegexProps.js.map +0 -1
  251. package/dist/props/IValidationStringProps.d.ts +0 -4
  252. package/dist/props/IValidationStringProps.js +0 -2
  253. package/dist/props/IValidationStringProps.js.map +0 -1
  254. package/dist/routing/INSRouterMaker.d.ts +0 -5
  255. package/dist/routing/INSRouterMaker.js +0 -2
  256. package/dist/routing/INSRouterMaker.js.map +0 -1
  257. package/dist/routing/INSRouterProps.d.ts +0 -4
  258. package/dist/routing/INSRouterProps.js +0 -2
  259. package/dist/routing/INSRouterProps.js.map +0 -1
  260. package/dist/routing/INSRouterState.d.ts +0 -4
  261. package/dist/routing/INSRouterState.js +0 -2
  262. package/dist/routing/INSRouterState.js.map +0 -1
  263. package/dist/routing/NSRouterMaker.d.ts +0 -11
  264. package/dist/routing/NSRouterMaker.js +0 -23
  265. package/dist/routing/NSRouterMaker.js.map +0 -1
  266. package/dist/routing/Notifier.d.ts +0 -16
  267. package/dist/routing/Notifier.js +0 -68
  268. package/dist/routing/Notifier.js.map +0 -1
@@ -1,11 +0,0 @@
1
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
- import Styles from './NSBarTitle.module.css';
3
- export function NSBarTitle(props) {
4
- var _a;
5
- let lines = ((_a = props.description) !== null && _a !== void 0 ? _a : "").split(/(\n|\\n|<br>|<br\s*\/>)/gm);
6
- return (_jsxs("div", { className: "container", children: [_jsx("h1", { className: Styles.title, children: props.title }), props.description && lines &&
7
- _jsx("p", { className: Styles.description, children: lines.map((line, index) => {
8
- return _jsxs(_Fragment, { children: [line.trim(), index !== lines.length - 1 && _jsx("br", {})] });
9
- }) })] }));
10
- }
11
- //# sourceMappingURL=NSBarTitle.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"NSBarTitle.js","sourceRoot":"","sources":["../../src/components/NSBarTitle.tsx"],"names":[],"mappings":";AAAA,OAAO,MAAM,MAAM,yBAAyB,CAAC;AAQ7C,MAAM,UAAU,UAAU,CAAC,KAAuB;;IAEjD,IAAI,KAAK,GAAG,CAAC,MAAA,KAAK,CAAC,WAAW,mCAAI,EAAE,CAAC,CAAC,KAAK,CAAC,2BAA2B,CAAC,CAAC;IACzE,OAAO,CACN,eAAK,SAAS,EAAC,WAAW,aACzB,aAAI,SAAS,EAAE,MAAM,CAAC,KAAK,YAAG,KAAK,CAAC,KAAK,GAAM,EAE9C,KAAK,CAAC,WAAW,IAAI,KAAK;gBAC1B,YAAG,SAAS,EAAE,MAAM,CAAC,WAAW,YAC/B,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE;wBAEzB,OAAO,8BACL,IAAI,CAAC,IAAI,EAAE,EACX,KAAK,KAAK,KAAK,CAAC,MAAM,GAAG,CAAC,IAAI,cAAM,IACnC,CAAC;oBACL,CAAC,CAAC,GACE,IAED,CACN,CAAC;AACH,CAAC"}
@@ -1,23 +0,0 @@
1
- import React from "react";
2
- import { IBaseComponentProps } from "../props/IBaseComponentProps";
3
- import { IValidationProps } from "../props/IValidationProps";
4
- import { IValidationStringProps } from "../props/IValidationStringProps";
5
- export interface INSBoxBooleanProps extends IBaseComponentProps, IValidationProps, IValidationStringProps {
6
- title: string;
7
- placeholder?: string;
8
- defaultValue?: boolean;
9
- onChanged?: (e: NSBoxBoolean) => void;
10
- onClicked?: (e: NSBoxBoolean) => void;
11
- }
12
- export interface INSBoxBooelanState {
13
- value: boolean;
14
- error?: string;
15
- }
16
- export declare class NSBoxBoolean extends React.Component<INSBoxBooleanProps, INSBoxBooelanState> {
17
- constructor(props: INSBoxBooleanProps);
18
- getError(): string | null;
19
- getValue(): boolean;
20
- setValue(value: boolean): void;
21
- private onChanged;
22
- render(): import("react/jsx-runtime").JSX.Element;
23
- }
@@ -1,40 +0,0 @@
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 "./NSBoxBoolean.module.css";
5
- import { NSBoxErrorNotifier } from "./NSBoxErrorNotifier";
6
- export class NSBoxBoolean extends React.Component {
7
- constructor(props) {
8
- var _a;
9
- super(props);
10
- this.state = { value: (_a = props.defaultValue) !== null && _a !== void 0 ? _a : false };
11
- this.getValue = this.getValue.bind(this);
12
- this.setValue = this.setValue.bind(this);
13
- this.onChanged = this.onChanged.bind(this);
14
- }
15
- getError() {
16
- return null;
17
- }
18
- getValue() {
19
- let error = this.getError();
20
- if (error) {
21
- this.setState({ error });
22
- throw new Error(error);
23
- }
24
- return this.state.value;
25
- }
26
- setValue(value) {
27
- this.setState({ value }, () => {
28
- if (this.props.onChanged)
29
- this.props.onChanged(this);
30
- });
31
- }
32
- onChanged(e) {
33
- this.setValue(e.target.checked);
34
- }
35
- render() {
36
- var _a;
37
- return (_jsxs(_Fragment, { children: [_jsx("div", { id: this.props.id, className: `${Styles.ns_input_parent} ${(_a = this.props.classList) === null || _a === void 0 ? void 0 : _a.join(" ")}`, style: this.props.style, children: _jsxs("div", { className: Styles.ns_checkbox_parent, children: [_jsx("input", { type: "checkbox", name: this.props.name, className: Styles.ns_input, checked: this.state.value, onChange: this.onChanged, onClick: () => this.props.onClicked }), _jsxs("span", { className: Styles.ns_input_title, children: [" ", this.props.required && _jsx("span", { style: { color: "red" }, children: "*" }), " ", this.props.title, " "] }), _jsx("label", { className: "ns-font-16-normal", htmlFor: this.props.id, children: this.props.name })] }) }), _jsx(NSBoxErrorNotifier, { error: this.state.error, clearError: () => this.setState({ error: "" }) })] }));
38
- }
39
- }
40
- //# sourceMappingURL=NSBoxBoolean.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"NSBoxBoolean.js","sourceRoot":"","sources":["../../src/components/NSBoxBoolean.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,MAAM,MAAM,2BAA2B,CAAC;AAI/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAiB1D,MAAM,OAAO,YAAa,SAAQ,KAAK,CAAC,SAAiD;IAExF,YAAY,KAAyB;;QAEpC,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,KAAK,GAAG,EAAE,KAAK,EAAE,MAAA,KAAK,CAAC,YAAY,mCAAI,KAAK,EAAE,CAAC;QACpD,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,IAAI,CAAC;IACb,CAAC;IACD,QAAQ;QAEP,IAAI,KAAK,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC;QAC5B,IAAI,KAAK,EACT;YACC,IAAI,CAAC,QAAQ,CAAC,EAAE,KAAK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,EACrI,gBAAO,SAAS,EAAC,mBAAmB,EAAC,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,EAAE,YACzD,IAAI,CAAC,KAAK,CAAC,IAAI,GACT,IACH,GACD,EACN,KAAC,kBAAkB,IAAC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,UAAU,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,GAAI,IAC7F,CACH,CAAC;IACH,CAAC;CACD"}
@@ -1,33 +0,0 @@
1
- import React from "react";
2
- import { IBaseComponentProps } from "../props/IBaseComponentProps";
3
- import { IValidationProps } from "../props/IValidationProps";
4
- import { BaseOptionType } from "antd/es/select";
5
- export interface INSBoxComboOption extends BaseOptionType {
6
- desc: string;
7
- value: string;
8
- }
9
- export interface INSBoxComboProps extends IBaseComponentProps, IValidationProps {
10
- title: string;
11
- options: INSBoxComboOption[];
12
- multiple: boolean;
13
- customClass?: string;
14
- placeholder?: string;
15
- defaultValue?: string;
16
- onChanged?: (e: NSBoxCombo) => void;
17
- searchable?: boolean;
18
- }
19
- export interface INSBoxComboState {
20
- value: string | null;
21
- values: string[];
22
- error?: string;
23
- }
24
- export declare class NSBoxCombo extends React.Component<INSBoxComboProps, INSBoxComboState> {
25
- constructor(props: INSBoxComboProps);
26
- getError(value: string): string | null;
27
- getValue(): string | null;
28
- getValues(): string[];
29
- setValue(value: string | null): void;
30
- setValues(values: string[]): void;
31
- onChange(value: string | null | string[]): void;
32
- render(): import("react/jsx-runtime").JSX.Element;
33
- }
@@ -1,65 +0,0 @@
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 "./NSBoxCombo.module.css";
5
- import { Select, Space } from 'antd';
6
- import IconSelectBox from '../assets/images/icon-select-box.svg';
7
- import { Validator } from "../Validator";
8
- import { NSBoxErrorNotifier } from "./NSBoxErrorNotifier";
9
- export class NSBoxCombo extends React.Component {
10
- constructor(props) {
11
- super(props);
12
- this.state = {
13
- value: null,
14
- values: [],
15
- };
16
- this.getValues = this.getValues.bind(this);
17
- this.setValues = this.setValues.bind(this);
18
- this.setValue = this.setValue.bind(this);
19
- this.getValue = this.getValue.bind(this);
20
- this.onChange = this.onChange.bind(this);
21
- }
22
- getError(value) {
23
- return (Validator.getError(this.props.title, value, this.props));
24
- }
25
- getValue() {
26
- let error = this.getError(this.state.value || "");
27
- if (error) {
28
- this.setState({ error });
29
- throw new Error(error);
30
- }
31
- return this.state.value;
32
- }
33
- getValues() {
34
- this.state.values.forEach(value => {
35
- let error = this.getError(value || "");
36
- if (error) {
37
- this.setState({ error });
38
- throw new Error(error);
39
- }
40
- });
41
- return this.state.values;
42
- }
43
- setValue(value) {
44
- this.setState({ value }, () => {
45
- if (this.props.onChanged)
46
- this.props.onChanged(this);
47
- });
48
- }
49
- setValues(values) {
50
- this.setState({ values }, () => {
51
- if (this.props.onChanged)
52
- this.props.onChanged(this);
53
- });
54
- }
55
- onChange(value) {
56
- if (this.props.multiple)
57
- this.setValues(value);
58
- else
59
- this.setValue(value);
60
- }
61
- render() {
62
- return (_jsx(_Fragment, { children: _jsxs("div", { id: this.props.id, className: `${Styles.ns_input_parent} ${this.props.customClass}`, children: [_jsxs("span", { className: Styles.ns_input_title, children: [" ", this.props.required && _jsx("span", { style: { color: "red" }, children: "*" }), " ", this.props.title, " "] }), _jsx(Select, { showSearch: this.props.searchable != false ? true : undefined, mode: this.props.multiple ? "multiple" : undefined, className: Styles.ns_input_select, placeholder: this.props.placeholder, onChange: this.onChange, optionLabelProp: "label", options: this.props.options, defaultValue: this.props.defaultValue, optionRender: (option) => (_jsx(Space, { className: Styles.ns_input_select_option, children: option.data.desc })), suffixIcon: _jsx("img", { src: IconSelectBox, alt: "SelectBox Icon" }) }), _jsx(NSBoxErrorNotifier, { error: this.state.error, clearError: () => this.setState({ error: "" }) })] }) }));
63
- }
64
- }
65
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AAE,UAAU,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,GAAI,IAC1F,GACJ,CACH,CAAC;IACH,CAAC;CACD"}
@@ -1,22 +0,0 @@
1
- import React from "react";
2
- import { IBaseComponentProps } from "../props/IBaseComponentProps";
3
- import { IValidationProps } from "../props/IValidationProps";
4
- export interface INSBoxDateProps extends IBaseComponentProps, IValidationProps {
5
- title: string;
6
- placeholder?: string;
7
- defaultValue?: string;
8
- onChanged?: (e: NSBoxDate) => void;
9
- onClicked?: (e: NSBoxDate) => void;
10
- }
11
- export interface INSBoxDateState {
12
- value: string;
13
- error?: string;
14
- }
15
- export declare class NSBoxDate extends React.Component<INSBoxDateProps, INSBoxDateState> {
16
- constructor(props: INSBoxDateProps);
17
- getError(): string | null;
18
- getValue(): string;
19
- setValue(value: string): void;
20
- private onChanged;
21
- render(): import("react/jsx-runtime").JSX.Element;
22
- }
@@ -1,42 +0,0 @@
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 NSBoxDate 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
- if (this.props.onChanged)
31
- this.props.onChanged(this);
32
- });
33
- }
34
- onChanged(e) {
35
- this.setValue(e.target.value);
36
- }
37
- render() {
38
- var _a;
39
- return (_jsxs(_Fragment, { children: [_jsxs("div", { id: this.props.id, 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", { type: "date", name: this.props.name, className: Styles.ns_input, placeholder: this.props.placeholder, value: this.state.value, onChange: this.onChanged, onClick: () => this.props.onClicked })] }), _jsx(NSBoxErrorNotifier, { error: this.state.error, clearError: () => this.setState({ error: "" }) })] }));
40
- }
41
- }
42
- //# sourceMappingURL=NSBoxDate.js.map
@@ -1 +0,0 @@
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;AAiBzC,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,IAA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AAK,CAAC,QAAQ,IAAI,eAAM,KAAK,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,kBAAW,OAAG,IAAI,CAAC,KAAK,CAAC,KAAK,SAAS,EACrI,gBACC,IAAI,EAAC,MAAM,EACX,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,EACrB,SAAS,EAAE,MAAM,CAAC,QAAQ,EAC1B,WAAW,EAAE,IAAI,CAAC,KAAK,CAAC,WAAW,EACnC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EACvB,QAAQ,EAAE,IAAI,CAAC,SAAS,EACxB,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,SAAS,GAClC,IACG,EACN,KAAC,kBAAkB,IAAC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,UAAU,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,GAAI,IAC7F,CACH,CAAC;IACH,CAAC;CACD"}
@@ -1,22 +0,0 @@
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
- placeholder?: string;
7
- defaultValue?: string;
8
- onChanged?: (e: NSBoxDateTime) => void;
9
- onClicked?: (e: NSBoxDateTime) => void;
10
- }
11
- export interface INSBoxDateTimeState {
12
- value: string;
13
- error?: string;
14
- }
15
- export declare class NSBoxDateTime extends React.Component<INSBoxDateTimeProps, INSBoxDateTimeState> {
16
- constructor(props: INSBoxDateTimeProps);
17
- getError(): string | null;
18
- getValue(): string;
19
- setValue(value: string): void;
20
- private onChanged;
21
- render(): import("react/jsx-runtime").JSX.Element;
22
- }
@@ -1,42 +0,0 @@
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
- if (this.props.onChanged)
31
- this.props.onChanged(this);
32
- });
33
- }
34
- onChanged(e) {
35
- this.setValue(e.target.value);
36
- }
37
- render() {
38
- var _a;
39
- return (_jsxs(_Fragment, { children: [_jsxs("div", { id: this.props.id, 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", { type: "datetime-local", name: this.props.name, className: Styles.ns_input, placeholder: this.props.placeholder, value: this.state.value, onChange: this.onChanged, onClick: () => this.props.onClicked })] }), _jsx(NSBoxErrorNotifier, { error: this.state.error, clearError: () => this.setState({ error: "" }) })] }));
40
- }
41
- }
42
- //# sourceMappingURL=NSBoxDateTime.js.map
@@ -1 +0,0 @@
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;AAE5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from "react";
2
- import { IBaseComponentProps } from "../props/IBaseComponentProps";
3
- import { IValidationProps } from "../props/IValidationProps";
4
- import { IValidationNumberProps } from "../props/IValidationNumberProps";
5
- export interface INSBoxDoubleProps extends IBaseComponentProps, IValidationProps, IValidationNumberProps {
6
- title: string;
7
- placeholder?: string;
8
- defaultValue?: number;
9
- onChanged?: (e: NSBoxDouble) => void;
10
- onClicked?: (e: NSBoxDouble) => void;
11
- }
12
- export interface INSBoxDoubleState {
13
- value?: number;
14
- error?: string;
15
- }
16
- export declare class NSBoxDouble extends React.Component<INSBoxDoubleProps, INSBoxDoubleState> {
17
- constructor(props: INSBoxDoubleProps);
18
- getError(): string | null;
19
- getValue(): number | undefined;
20
- setValue(value: number | undefined): void;
21
- private onChanged;
22
- render(): import("react/jsx-runtime").JSX.Element;
23
- }
@@ -1,42 +0,0 @@
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 IconInputFloat from '../assets/images/icon-input-float.svg';
6
- import { Validator } from "../Validator";
7
- import { NSBoxErrorNotifier } from "./NSBoxErrorNotifier";
8
- export class NSBoxDouble extends React.Component {
9
- constructor(props) {
10
- super(props);
11
- this.state = { value: props.defaultValue };
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.getErrorNumber(this.props.title, this.state.value, this.props));
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
- if (this.props.onChanged)
31
- this.props.onChanged(this);
32
- });
33
- }
34
- onChanged(e) {
35
- this.setValue(parseFloat(e.target.value));
36
- }
37
- render() {
38
- var _a;
39
- return (_jsxs(_Fragment, { children: [_jsxs("div", { id: this.props.id, 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", { type: "number", name: this.props.name, className: Styles.ns_input, placeholder: this.props.placeholder, value: this.state.value, onChange: this.onChanged, onClick: () => this.props.onClicked, inputMode: "decimal", pattern: "[0-9]*[.,]?[0-9]*", style: { background: `url(${IconInputFloat}) white no-repeat scroll center right 16px` } })] }), _jsx(NSBoxErrorNotifier, { error: this.state.error, clearError: () => this.setState({ error: "" }) })] }));
40
- }
41
- }
42
- //# sourceMappingURL=NSBoxDouble.js.map
@@ -1 +0,0 @@
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;AAiB1D,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,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,gBAAM,SAAS,EAAE,MAAM,CAAC,cAAc,kBAAI,IAAI,CAAC,KAAK,CAAC,QAAQ,IAAI,eAAM,KAAK,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,kBAAW,OAAG,IAAI,CAAC,KAAK,CAAC,KAAK,SAAS,EACrI,gBACC,IAAI,EAAC,QAAQ,EACb,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,EACrB,SAAS,EAAE,MAAM,CAAC,QAAQ,EAC1B,WAAW,EAAE,IAAI,CAAC,KAAK,CAAC,WAAW,EACnC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EACvB,QAAQ,EAAE,IAAI,CAAC,SAAS,EACxB,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,SAAS,EACnC,SAAS,EAAC,SAAS,EACnB,OAAO,EAAC,mBAAmB,EAC3B,KAAK,EAAE,EAAE,UAAU,EAAE,OAAO,cAAc,4CAA4C,EAAE,GACvF,IACG,EACN,KAAC,kBAAkB,IAAC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,UAAU,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,GAAI,IAC7F,CACH,CAAC;IACH,CAAC;CACD"}
@@ -1,24 +0,0 @@
1
- import React from "react";
2
- import { IBaseComponentProps } from "../props/IBaseComponentProps";
3
- import { IValidationProps } from "../props/IValidationProps";
4
- import { IValidationNumberProps } from "../props/IValidationNumberProps";
5
- import { IValidationStringProps } from "../props/IValidationStringProps";
6
- export interface INSBoxDurationProps extends IBaseComponentProps, IValidationProps, IValidationStringProps, IValidationNumberProps {
7
- title: string;
8
- placeholder?: string;
9
- defaultValue?: string;
10
- onChanged?: (e: NSBoxDuration) => void;
11
- onClicked?: (e: NSBoxDuration) => void;
12
- }
13
- export interface INSBoxDurationState {
14
- value: string;
15
- error?: string;
16
- }
17
- export declare class NSBoxDuration extends React.Component<INSBoxDurationProps, INSBoxDurationState> {
18
- constructor(props: INSBoxDurationProps);
19
- getError(): string | null;
20
- getValue(): string;
21
- setValue(value: string): void;
22
- private onChanged;
23
- render(): import("react/jsx-runtime").JSX.Element;
24
- }
@@ -1,43 +0,0 @@
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 IconInputDuration from '../assets/images/icon-input-duration.svg';
6
- import { Validator } from "../Validator";
7
- import { NSBoxErrorNotifier } from "./NSBoxErrorNotifier";
8
- export class NSBoxDuration extends React.Component {
9
- constructor(props) {
10
- var _a;
11
- super(props);
12
- this.state = { value: (_a = props.defaultValue) !== null && _a !== void 0 ? _a : "" };
13
- this.getValue = this.getValue.bind(this);
14
- this.setValue = this.setValue.bind(this);
15
- this.onChanged = this.onChanged.bind(this);
16
- }
17
- getError() {
18
- return (Validator.getError(this.props.title, this.state.value, this.props) ||
19
- Validator.getErrorDuration(this.props.title, this.state.value));
20
- }
21
- getValue() {
22
- let error = this.getError();
23
- if (error) {
24
- this.setState({ error });
25
- throw new Error(error);
26
- }
27
- return this.state.value;
28
- }
29
- setValue(value) {
30
- this.setState({ value }, () => {
31
- if (this.props.onChanged)
32
- this.props.onChanged(this);
33
- });
34
- }
35
- onChanged(e) {
36
- this.setValue(e.target.value);
37
- }
38
- render() {
39
- var _a;
40
- return (_jsxs(_Fragment, { children: [_jsxs("div", { id: this.props.id, 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", { type: "time", name: this.props.name, className: Styles.ns_input, placeholder: this.props.placeholder, value: this.state.value, onChange: this.onChanged, onClick: () => this.props.onClicked, step: "2", style: { background: `url(${IconInputDuration}) white no-repeat scroll center right 16px` } })] }), _jsx(NSBoxErrorNotifier, { error: this.state.error, clearError: () => this.setState({ error: "" }) })] }));
41
- }
42
- }
43
- //# sourceMappingURL=NSBoxDuration.js.map
@@ -1 +0,0 @@
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;AAiB1D,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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C,KAAK,CAAC,KAAK,EACvB,QAAQ,EAAE,IAAI,CAAC,SAAS,EACxB,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,SAAS,EACnC,IAAI,EAAC,GAAG,EACR,KAAK,EAAE,EAAE,UAAU,EAAE,OAAO,iBAAiB,4CAA4C,EAAE,GAC1F,IACG,EACN,KAAC,kBAAkB,IAAC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,UAAU,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,GAAI,IAC7F,CACH,CAAC;IACH,CAAC;CACD"}
@@ -1,25 +0,0 @@
1
- import React from "react";
2
- import { IValidationProps } from "../props/IValidationProps";
3
- import { IValidationStringProps } from "../props/IValidationStringProps";
4
- import { IBaseComponentProps } from "../props/IBaseComponentProps";
5
- export interface INSBoxEmailProps extends IBaseComponentProps, IValidationProps, IValidationStringProps {
6
- title: string;
7
- defaultValue?: string;
8
- onChanged?: (e: React.ChangeEvent<HTMLInputElement>) => void;
9
- placeholder?: string;
10
- }
11
- export interface INSBoxEmailState {
12
- value: string;
13
- error?: string;
14
- isFullScreen: boolean;
15
- }
16
- export declare class NSBoxEmail extends React.Component<INSBoxEmailProps, INSBoxEmailState> {
17
- constructor(props: INSBoxEmailProps);
18
- getError(): string | null;
19
- getValue(): string;
20
- setValue(value: string): void;
21
- private onChanged;
22
- private toggleFullScreen;
23
- render(): import("react/jsx-runtime").JSX.Element;
24
- }
25
- export default NSBoxEmail;
@@ -1,50 +0,0 @@
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 IconInputEmail from '../assets/images/icon-input-email.svg';
6
- import { Validator } from "../Validator";
7
- import { NSBoxErrorNotifier } from "./NSBoxErrorNotifier";
8
- import NSAssistantButton from "./NSAssistantButton";
9
- export class NSBoxEmail extends React.Component {
10
- constructor(props) {
11
- var _a;
12
- super(props);
13
- this.state = { value: (_a = props.defaultValue) !== null && _a !== void 0 ? _a : "", isFullScreen: false };
14
- this.setValue = this.setValue.bind(this);
15
- this.getValue = this.getValue.bind(this);
16
- this.onChanged = this.onChanged.bind(this);
17
- this.toggleFullScreen = this.toggleFullScreen.bind(this);
18
- }
19
- getError() {
20
- return (Validator.getError(this.props.title, this.state.value, this.props) ||
21
- Validator.getErrorString(this.props.title, this.state.value, this.props) ||
22
- Validator.getErrorEmail(this.props.title, this.state.value));
23
- }
24
- getValue() {
25
- let error = this.getError();
26
- if (error) {
27
- this.setState({ error });
28
- throw new Error(error);
29
- }
30
- return this.state.value;
31
- }
32
- setValue(value) {
33
- this.setState({ value });
34
- }
35
- onChanged(e) {
36
- this.setValue(e.target.value);
37
- if (this.props.onChanged) {
38
- this.props.onChanged(e);
39
- }
40
- }
41
- toggleFullScreen() {
42
- this.setState(prevState => ({ isFullScreen: !prevState.isFullScreen }));
43
- }
44
- render() {
45
- var _a;
46
- return (_jsx(_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("div", { className: "d-flex justify-content-between align-items-center", children: [_jsxs("span", { className: Styles.ns_input_title, children: [this.props.required && _jsx("span", { style: { color: "red" }, children: "*" }), " ", this.props.title] }), _jsx(NSAssistantButton, { value: this.state.value, setValue: this.setValue })] }), _jsx("input", { id: this.props.id, value: this.state.value, onChange: this.onChanged, type: "email", className: Styles.ns_input, placeholder: this.props.placeholder, style: { background: `url(${IconInputEmail}) white no-repeat scroll center right 16px` } }), _jsx(NSBoxErrorNotifier, { error: this.state.error, clearError: () => this.setState({ error: "" }) })] }) }));
47
- }
48
- }
49
- export default NSBoxEmail;
50
- //# sourceMappingURL=NSBoxEmail.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"NSBoxEmail.js","sourceR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AK,CAAC,KAAK,IAC5E,EACP,KAAC,iBAAiB,IAAC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,GAAI,IAClE,EACN,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,OAAO,EACZ,SAAS,EAAE,MAAM,CAAC,QAAQ,EAC1B,WAAW,EAAE,IAAI,CAAC,KAAK,CAAC,WAAW,EACnC,KAAK,EAAE,EAAE,UAAU,EAAE,OAAO,cAAc,4CAA4C,EAAE,GACvF,EACF,KAAC,kBAAkB,IAAC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,UAAU,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,GAAI,IAC1F,GACJ,CACH,CAAC;IACH,CAAC;CACD;AAED,eAAe,UAAU,CAAC"}
@@ -1,42 +0,0 @@
1
- import React from "react";
2
- import { IBaseComponentProps } from "../props/IBaseComponentProps";
3
- import { IValidationProps } from "../props/IValidationProps";
4
- import { BaseOptionType } from "antd/es/select";
5
- import { FilterItem } from "namirasoft-core";
6
- interface INSBoxEntitOption extends BaseOptionType {
7
- desc: string;
8
- value: string;
9
- }
10
- export interface INSBoxEntityProps<Data> extends IBaseComponentProps, IValidationProps {
11
- title: string;
12
- placeholder?: string;
13
- defaultValue?: string;
14
- onChanged?: (e: NSBoxEntity<Data>) => void;
15
- onClicked?: (e: NSBoxEntity<Data>) => void;
16
- multiple: boolean;
17
- getItems: (filters: FilterItem[] | null, page: number | null, size: number | null) => Promise<{
18
- count: number;
19
- rows: Data[];
20
- }>;
21
- getValue: (item: Data) => string;
22
- getText: (item: Data) => string;
23
- }
24
- export interface INSBoxEntityState<Data> {
25
- items: Data[] | null;
26
- items_string: INSBoxEntitOption[] | null;
27
- value: Data | null;
28
- values: Data[];
29
- error?: string;
30
- }
31
- export declare class NSBoxEntity<Data> extends React.Component<INSBoxEntityProps<Data>, INSBoxEntityState<Data>> {
32
- constructor(props: INSBoxEntityProps<Data>);
33
- getError(value: Data | null): string | null;
34
- getValue(): Data | null;
35
- getValues(): Data[];
36
- setValue(value: Data | null): void;
37
- setValues(values: Data[]): void;
38
- private onChanged;
39
- componentDidMount(): void;
40
- render(): import("react/jsx-runtime").JSX.Element;
41
- }
42
- export {};