nexus-shared 1.1.20 → 2.0.0

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 (332) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +903 -0
  3. package/dist/Client.Index.d.ts +44 -0
  4. package/dist/Client.Index.js +49 -0
  5. package/dist/Components/Documents/Button.d.ts +29 -0
  6. package/dist/Components/Documents/Button.js +11 -0
  7. package/dist/Components/Documents/Menu.d.ts +102 -0
  8. package/dist/Components/Documents/Menu.js +238 -0
  9. package/dist/Components/Documents/SplitButton.d.ts +64 -0
  10. package/dist/Components/Documents/SplitButton.js +127 -0
  11. package/dist/Components/Documents/TabButtons.d.ts +62 -0
  12. package/dist/Components/Documents/TabButtons.js +19 -0
  13. package/dist/Components/Forms/ApiForm.d.ts +21 -0
  14. package/dist/Components/Forms/ApiForm.js +99 -0
  15. package/dist/Components/Forms/Crud.d.ts +17 -0
  16. package/dist/Components/Forms/Crud.js +556 -0
  17. package/dist/Components/Forms/CrudParts.d.ts +15 -0
  18. package/dist/Components/Forms/CrudParts.js +36 -0
  19. package/dist/Components/Forms/Form.d.ts +52 -0
  20. package/dist/Components/Forms/Form.js +319 -0
  21. package/dist/Components/Forms/SubmitForm.d.ts +65 -0
  22. package/dist/Components/Forms/SubmitForm.js +198 -0
  23. package/dist/Components/Inputs/Calendar.d.ts +69 -0
  24. package/dist/Components/Inputs/Calendar.js +258 -0
  25. package/dist/Components/Inputs/CheckBox.d.ts +53 -0
  26. package/dist/Components/Inputs/CheckBox.js +87 -0
  27. package/dist/Components/Inputs/CheckBoxGroup.d.ts +20 -0
  28. package/dist/Components/Inputs/CheckBoxGroup.js +80 -0
  29. package/dist/Components/Inputs/ChoiceField.d.ts +122 -0
  30. package/dist/Components/Inputs/ChoiceField.js +169 -0
  31. package/dist/Components/Inputs/DatePicker.d.ts +54 -0
  32. package/dist/Components/Inputs/DatePicker.js +246 -0
  33. package/dist/Components/Inputs/DateRangePicker.d.ts +62 -0
  34. package/dist/Components/Inputs/DateRangePicker.js +283 -0
  35. package/dist/Components/Inputs/DateTimePicker.d.ts +75 -0
  36. package/dist/Components/Inputs/DateTimePicker.js +399 -0
  37. package/dist/Components/Inputs/Dropdown.d.ts +117 -0
  38. package/dist/Components/Inputs/Dropdown.js +839 -0
  39. package/dist/Components/Inputs/DropdownParts.d.ts +84 -0
  40. package/dist/Components/Inputs/DropdownParts.js +102 -0
  41. package/dist/Components/Inputs/EditorShell.d.ts +45 -0
  42. package/dist/Components/Inputs/EditorShell.js +214 -0
  43. package/dist/Components/Inputs/Field.d.ts +53 -0
  44. package/dist/Components/Inputs/Field.js +16 -0
  45. package/dist/Components/Inputs/GroupForm.d.ts +20 -0
  46. package/dist/Components/Inputs/GroupForm.js +170 -0
  47. package/dist/Components/Inputs/InputField.d.ts +59 -0
  48. package/dist/Components/Inputs/InputField.js +169 -0
  49. package/dist/Components/Inputs/InputRenderer.d.ts +35 -0
  50. package/dist/Components/Inputs/InputRenderer.js +99 -0
  51. package/dist/Components/Inputs/MarkdownEditor.d.ts +67 -0
  52. package/dist/Components/Inputs/MarkdownEditor.js +289 -0
  53. package/dist/Components/Inputs/NumberBox.d.ts +53 -0
  54. package/dist/Components/Inputs/NumberBox.js +228 -0
  55. package/dist/Components/Inputs/RadioGroup.d.ts +20 -0
  56. package/dist/Components/Inputs/RadioGroup.js +43 -0
  57. package/dist/Components/Inputs/ReadOnlyNotice.d.ts +36 -0
  58. package/dist/Components/Inputs/ReadOnlyNotice.js +116 -0
  59. package/dist/Components/Inputs/RichTextEditor.d.ts +103 -0
  60. package/dist/Components/Inputs/RichTextEditor.js +1170 -0
  61. package/dist/Components/Inputs/RichTextParts.d.ts +63 -0
  62. package/dist/Components/Inputs/RichTextParts.js +157 -0
  63. package/dist/Components/Inputs/RowsInput.d.ts +104 -0
  64. package/dist/Components/Inputs/RowsInput.js +259 -0
  65. package/dist/Components/Inputs/Slider.d.ts +87 -0
  66. package/dist/Components/Inputs/Slider.js +216 -0
  67. package/dist/Components/Inputs/TabularForm.d.ts +23 -0
  68. package/dist/Components/Inputs/TabularForm.js +283 -0
  69. package/dist/Components/Inputs/TextArea.d.ts +43 -0
  70. package/dist/Components/Inputs/TextArea.js +31 -0
  71. package/dist/Components/Inputs/TextBox.d.ts +52 -0
  72. package/dist/Components/Inputs/TextBox.js +58 -0
  73. package/dist/Components/Inputs/TextField.d.ts +31 -0
  74. package/dist/Components/Inputs/TextField.js +35 -0
  75. package/dist/Components/Inputs/TimePanel.d.ts +34 -0
  76. package/dist/Components/Inputs/TimePanel.js +288 -0
  77. package/dist/Components/Inputs/TimePicker.d.ts +54 -0
  78. package/dist/Components/Inputs/TimePicker.js +239 -0
  79. package/dist/Components/Inputs/TreeView.d.ts +160 -0
  80. package/dist/Components/Inputs/TreeView.js +947 -0
  81. package/dist/Components/Layouts/MessageBox.d.ts +71 -0
  82. package/dist/Components/Layouts/MessageBox.js +104 -0
  83. package/dist/Components/Layouts/Popup.d.ts +92 -0
  84. package/dist/Components/Layouts/Popup.js +376 -0
  85. package/dist/Components/Layouts/PopupContext.d.ts +2 -0
  86. package/dist/Components/Layouts/PopupContext.js +4 -0
  87. package/dist/Components/Layouts/PopupDock.d.ts +22 -0
  88. package/dist/Components/Layouts/PopupDock.js +121 -0
  89. package/dist/Components/Layouts/PopupHost.d.ts +56 -0
  90. package/dist/Components/Layouts/PopupHost.js +163 -0
  91. package/dist/Components/Layouts/PopupRules.d.ts +30 -0
  92. package/dist/Components/Layouts/PopupRules.js +63 -0
  93. package/dist/Components/Layouts/ThemePicker.d.ts +13 -0
  94. package/dist/Components/Layouts/ThemePicker.js +22 -0
  95. package/dist/Components/Layouts/ThemeScript.d.ts +14 -0
  96. package/dist/Components/Layouts/ThemeScript.js +13 -0
  97. package/dist/Components/Layouts/ThemeSwitcher.d.ts +13 -0
  98. package/dist/Components/Layouts/ThemeSwitcher.js +29 -0
  99. package/dist/Components/Layouts/Toaster.d.ts +76 -0
  100. package/dist/Components/Layouts/Toaster.js +172 -0
  101. package/dist/Components/Viewers/DataTable.d.ts +25 -0
  102. package/dist/Components/Viewers/DataTable.js +542 -0
  103. package/dist/Components/Viewers/DataTableParts.d.ts +134 -0
  104. package/dist/Components/Viewers/DataTableParts.js +145 -0
  105. package/dist/Components/Viewers/MarkdownView.d.ts +26 -0
  106. package/dist/Components/Viewers/MarkdownView.js +79 -0
  107. package/dist/Components/Viewers/RichTextView.d.ts +18 -0
  108. package/dist/Components/Viewers/RichTextView.js +17 -0
  109. package/dist/Helpers/AnimationHelpers.d.ts +6 -0
  110. package/dist/Helpers/AnimationHelpers.js +35 -0
  111. package/dist/Helpers/ApiClient.d.ts +74 -0
  112. package/dist/Helpers/ApiClient.js +197 -0
  113. package/dist/Helpers/ApiFormHelpers.d.ts +26 -0
  114. package/dist/Helpers/ApiFormHelpers.js +56 -0
  115. package/dist/Helpers/ApiModules.d.ts +135 -0
  116. package/dist/Helpers/ApiModules.js +194 -0
  117. package/dist/Helpers/ApiResponses.d.ts +41 -0
  118. package/dist/Helpers/ApiResponses.js +159 -0
  119. package/dist/Helpers/ApiRoutes.d.ts +150 -0
  120. package/dist/Helpers/ApiRoutes.js +191 -0
  121. package/dist/Helpers/ApiToasts.d.ts +21 -0
  122. package/dist/Helpers/ApiToasts.js +22 -0
  123. package/dist/Helpers/ClassHelpers.d.ts +3 -0
  124. package/dist/Helpers/ClassHelpers.js +4 -0
  125. package/dist/Helpers/CrudBackend.d.ts +56 -0
  126. package/dist/Helpers/CrudBackend.js +119 -0
  127. package/dist/Helpers/CrudHelpers.d.ts +76 -0
  128. package/dist/Helpers/CrudHelpers.js +202 -0
  129. package/dist/Helpers/DateHelpers.d.ts +88 -0
  130. package/dist/Helpers/DateHelpers.js +363 -0
  131. package/dist/Helpers/DatePreferences.d.ts +14 -0
  132. package/dist/Helpers/DatePreferences.js +94 -0
  133. package/dist/Helpers/DateTimeHelpers.d.ts +87 -0
  134. package/dist/Helpers/DateTimeHelpers.js +286 -0
  135. package/dist/Helpers/DragHelpers.d.ts +129 -0
  136. package/dist/Helpers/DragHelpers.js +281 -0
  137. package/dist/Helpers/DropdownHelpers.d.ts +56 -0
  138. package/dist/Helpers/DropdownHelpers.js +180 -0
  139. package/dist/Helpers/FormDrafts.d.ts +18 -0
  140. package/dist/Helpers/FormDrafts.js +76 -0
  141. package/dist/Helpers/FormStore.d.ts +231 -0
  142. package/dist/Helpers/FormStore.js +734 -0
  143. package/dist/Helpers/InputParamsHelpers.d.ts +79 -0
  144. package/dist/Helpers/InputParamsHelpers.js +388 -0
  145. package/dist/Helpers/MarkdownEditing.d.ts +27 -0
  146. package/dist/Helpers/MarkdownEditing.js +250 -0
  147. package/dist/Helpers/MarkdownHelpers.d.ts +82 -0
  148. package/dist/Helpers/MarkdownHelpers.js +775 -0
  149. package/dist/Helpers/MessageBuilder.d.ts +74 -0
  150. package/dist/Helpers/MessageBuilder.js +254 -0
  151. package/dist/Helpers/NepaliCalendar.d.ts +25 -0
  152. package/dist/Helpers/NepaliCalendar.js +107 -0
  153. package/dist/Helpers/NumberHelpers.d.ts +71 -0
  154. package/dist/Helpers/NumberHelpers.js +202 -0
  155. package/dist/Helpers/Permissions.d.ts +62 -0
  156. package/dist/Helpers/Permissions.js +133 -0
  157. package/dist/Helpers/PopoverHelpers.d.ts +43 -0
  158. package/dist/Helpers/PopoverHelpers.js +91 -0
  159. package/dist/Helpers/RichTextHelpers.d.ts +77 -0
  160. package/dist/Helpers/RichTextHelpers.js +1072 -0
  161. package/dist/Helpers/RowsStore.d.ts +160 -0
  162. package/dist/Helpers/RowsStore.js +584 -0
  163. package/dist/Helpers/TableColumns.d.ts +40 -0
  164. package/dist/Helpers/TableColumns.js +254 -0
  165. package/dist/Helpers/TableExport.d.ts +30 -0
  166. package/dist/Helpers/TableExport.js +97 -0
  167. package/dist/Helpers/TableHelpers.d.ts +102 -0
  168. package/dist/Helpers/TableHelpers.js +281 -0
  169. package/dist/Helpers/TableStore.d.ts +142 -0
  170. package/dist/Helpers/TableStore.js +530 -0
  171. package/dist/Helpers/ThemeHelpers.d.ts +15 -0
  172. package/dist/Helpers/ThemeHelpers.js +16 -0
  173. package/dist/Helpers/TimeHelpers.d.ts +73 -0
  174. package/dist/Helpers/TimeHelpers.js +253 -0
  175. package/dist/Helpers/TreeStore.d.ts +188 -0
  176. package/dist/Helpers/TreeStore.js +577 -0
  177. package/dist/Helpers/ValidationHelpers.d.ts +124 -0
  178. package/dist/Helpers/ValidationHelpers.js +301 -0
  179. package/dist/Interfaces/ApiInterfaces.d.ts +149 -0
  180. package/dist/Interfaces/ApiInterfaces.js +24 -0
  181. package/dist/Interfaces/CrudInterfaces.d.ts +171 -0
  182. package/{src/sso-client.tsx → dist/Interfaces/CrudInterfaces.js} +1 -1
  183. package/dist/Interfaces/DateInterfaces.d.ts +154 -0
  184. package/dist/Interfaces/DateInterfaces.js +29 -0
  185. package/dist/Interfaces/FormInterfaces.d.ts +352 -0
  186. package/dist/Interfaces/FormInterfaces.js +1 -0
  187. package/dist/Interfaces/InputInterfaces.d.ts +141 -0
  188. package/dist/Interfaces/InputInterfaces.js +1 -0
  189. package/dist/Interfaces/MessageInterfaces.d.ts +111 -0
  190. package/dist/Interfaces/MessageInterfaces.js +5 -0
  191. package/dist/Interfaces/TableInterfaces.d.ts +291 -0
  192. package/dist/Interfaces/TableInterfaces.js +1 -0
  193. package/dist/Interfaces/ThemeInterfaces.d.ts +17 -0
  194. package/dist/Interfaces/ThemeInterfaces.js +17 -0
  195. package/dist/Interfaces/TypeInterfaces.d.ts +4 -0
  196. package/dist/Interfaces/TypeInterfaces.js +1 -0
  197. package/dist/Server.Index.d.ts +2 -0
  198. package/dist/Server.Index.js +5 -0
  199. package/dist/Services/ApiProxy.d.ts +32 -0
  200. package/dist/Services/ApiProxy.js +111 -0
  201. package/dist/Services/BrowserApi.d.ts +78 -0
  202. package/dist/Services/BrowserApi.js +111 -0
  203. package/dist/Services/ServerApi.d.ts +49 -0
  204. package/dist/Services/ServerApi.js +75 -0
  205. package/dist/Services/ThemeService.d.ts +17 -0
  206. package/dist/Services/ThemeService.js +83 -0
  207. package/dist/Shared.Index.d.ts +43 -0
  208. package/dist/Shared.Index.js +47 -0
  209. package/package.json +82 -33
  210. package/src/Styles/Nexus.Base.css +70 -0
  211. package/src/Styles/Nexus.Button.css +151 -0
  212. package/src/Styles/Nexus.Calendar.css +275 -0
  213. package/src/Styles/Nexus.Choice.css +345 -0
  214. package/src/Styles/Nexus.Crud.css +84 -0
  215. package/src/Styles/Nexus.DateTime.css +81 -0
  216. package/src/Styles/Nexus.Dropdown.css +774 -0
  217. package/src/Styles/Nexus.Editor.css +297 -0
  218. package/src/Styles/Nexus.Form.css +298 -0
  219. package/src/Styles/Nexus.Index.css +34 -0
  220. package/src/Styles/Nexus.Input.css +637 -0
  221. package/src/Styles/Nexus.Markdown.css +265 -0
  222. package/src/Styles/Nexus.Menu.css +249 -0
  223. package/src/Styles/Nexus.Popup.css +731 -0
  224. package/src/Styles/Nexus.RichText.css +463 -0
  225. package/src/Styles/Nexus.Rows.css +566 -0
  226. package/src/Styles/Nexus.Slider.css +278 -0
  227. package/src/Styles/Nexus.Tab.Buttons.css +364 -0
  228. package/src/Styles/Nexus.Table.css +1014 -0
  229. package/src/Styles/Nexus.Theme.Picker.css +159 -0
  230. package/src/Styles/Nexus.Themes.css +194 -0
  231. package/src/Styles/Nexus.Time.css +147 -0
  232. package/src/Styles/Nexus.Toast.css +265 -0
  233. package/src/Styles/Nexus.Tokens.css +72 -0
  234. package/src/Styles/Nexus.Tree.css +435 -0
  235. package/src/api-services/authentication-service.tsx +0 -23
  236. package/src/api-services/preference-service.tsx +0 -5
  237. package/src/api-services/system-service.tsx +0 -34
  238. package/src/client.ts +0 -31
  239. package/src/components/documents/button.tsx +0 -142
  240. package/src/components/documents/icon-box.tsx +0 -93
  241. package/src/components/documents/page-title.tsx +0 -7
  242. package/src/components/documents/tab-button.tsx +0 -172
  243. package/src/components/documents/tag.tsx +0 -30
  244. package/src/components/index.js +0 -0
  245. package/src/components/inputs/checkbox-input.tsx +0 -66
  246. package/src/components/inputs/input-box.tsx +0 -48
  247. package/src/components/inputs/input-element.tsx +0 -65
  248. package/src/components/inputs/input-form.tsx +0 -164
  249. package/src/components/inputs/input.tsx +0 -181
  250. package/src/components/inputs/number-input.tsx +0 -108
  251. package/src/components/inputs/radiobox-input.tsx +0 -53
  252. package/src/components/inputs/textarea-input.tsx +0 -47
  253. package/src/components/inputs/textbox-input.tsx +0 -45
  254. package/src/components/layouts/global-dialogbox.tsx +0 -431
  255. package/src/components/layouts/global-layout.tsx +0 -59
  256. package/src/components/layouts/layout-helpers.tsx +0 -20
  257. package/src/components/layouts/panels/user-panel.tsx +0 -112
  258. package/src/components/layouts/utility-menu.tsx +0 -49
  259. package/src/components/panels/theme-panel.tsx +0 -46
  260. package/src/helpers/bitwise-helpers.tsx +0 -11
  261. package/src/helpers/browser-helpers.tsx +0 -156
  262. package/src/helpers/datasource-helpers.tsx +0 -99
  263. package/src/helpers/element-helpers.tsx +0 -57
  264. package/src/helpers/input-helpers.tsx +0 -74
  265. package/src/helpers/string-helpers.tsx +0 -28
  266. package/src/helpers/utility-helpers.tsx +0 -45
  267. package/src/helpers/validation-helpers.tsx +0 -302
  268. package/src/index.ts +0 -26
  269. package/src/interface.ts +0 -19
  270. package/src/interfaces/auth-token-interfaces.tsx +0 -6
  271. package/src/interfaces/browser-interfaces.tsx +0 -36
  272. package/src/interfaces/button-interfaces.tsx +0 -63
  273. package/src/interfaces/datasource-interfaces.tsx +0 -22
  274. package/src/interfaces/datatable-interfaces.tsx +0 -25
  275. package/src/interfaces/dialogbox-interfaces.tsx +0 -5
  276. package/src/interfaces/exception-interfaces.tsx +0 -99
  277. package/src/interfaces/http-interfaces.tsx +0 -129
  278. package/src/interfaces/icon-interfaces.tsx +0 -129
  279. package/src/interfaces/input-interfaces.tsx +0 -410
  280. package/src/interfaces/layout-interfaces.tsx +0 -191
  281. package/src/interfaces/menu-interfaces.tsx +0 -49
  282. package/src/interfaces/message-interfaces.tsx +0 -32
  283. package/src/interfaces/permission-interfaces.tsx +0 -9
  284. package/src/interfaces/storage-interfaces.tsx +0 -5
  285. package/src/interfaces/system-interfaces.tsx +0 -22
  286. package/src/interfaces/theme-interfaces.tsx +0 -123
  287. package/src/interfaces/type-interfaces.tsx +0 -28
  288. package/src/interfaces/user-interfaces.tsx +0 -47
  289. package/src/nexus-client.tsx +0 -21
  290. package/src/nexus.environments.tsx +0 -66
  291. package/src/proxy-api/proxy-backend.tsx +0 -60
  292. package/src/proxy-api/proxy-constants.tsx +0 -28
  293. package/src/proxy-api/proxy-helpers.tsx +0 -91
  294. package/src/proxy-api-client.tsx +0 -1
  295. package/src/proxy-api-server.tsx +0 -2
  296. package/src/services/http-client-services.tsx +0 -75
  297. package/src/services/http-services.tsx +0 -158
  298. package/src/services/loader-service.tsx +0 -185
  299. package/src/services/localstorage-service.tsx +0 -119
  300. package/src/services/message-services.tsx +0 -383
  301. package/src/services/theme-service.tsx +0 -161
  302. package/src/services/user-services.tsx +0 -10
  303. package/src/sso-config/auth-token-validation.ts +0 -16
  304. package/src/sso-config/callback-route.tsx +0 -35
  305. package/src/sso-config/cookie-encryption.ts +0 -51
  306. package/src/sso-config/cookie-helpers.tsx +0 -102
  307. package/src/sso-config/forgot-password-route.tsx +0 -36
  308. package/src/sso-config/oauth-callback-state.ts +0 -61
  309. package/src/sso-config/pkce-helpers.ts +0 -9
  310. package/src/sso-config/provider-complete-route.tsx +0 -18
  311. package/src/sso-config/redirect-context-actions.tsx +0 -45
  312. package/src/sso-config/redirect-context-helpers.tsx +0 -159
  313. package/src/sso-config/redirect-context-persist.tsx +0 -18
  314. package/src/sso-config/redirect-context-route.tsx +0 -45
  315. package/src/sso-config/refresh-route.tsx +0 -23
  316. package/src/sso-config/sign-in-route.tsx +0 -74
  317. package/src/sso-config/sign-out-route.tsx +0 -57
  318. package/src/sso-config/sign-up-route.tsx +0 -57
  319. package/src/sso-config/sso-backend-flow.ts +0 -38
  320. package/src/sso-config/sso-complete-route.tsx +0 -50
  321. package/src/sso-config/sso-config.ts +0 -59
  322. package/src/sso-config/sso-interfaces.tsx +0 -99
  323. package/src/sso-config/sso-response-helpers.tsx +0 -20
  324. package/src/sso-server.tsx +0 -21
  325. package/src/styles/nexus.animation.css +0 -269
  326. package/src/styles/nexus.core.css +0 -119
  327. package/src/styles/nexus.dialog.css +0 -144
  328. package/src/styles/nexus.icon.css +0 -51
  329. package/src/styles/nexus.input.css +0 -207
  330. package/src/styles/nexus.loader.css +0 -11
  331. package/src/styles/nexus.logic.css +0 -47
  332. package/src/styles/nexus.utility.css +0 -347
@@ -1,302 +0,0 @@
1
- import { EInputTypes, ICheckbox, IDate, IInputCreateResults, IInputParameters, IInputRootParameters, INumber, ISelection, ITablularForm, ITextbox, RegexTypes, UN } from "../interface";
2
- import { BitwiseToList } from "./bitwise-helpers";
3
- import { GetInputId } from "./input-helpers";
4
- import { IsNullOrEmpty, MakeFirstLetterUpperCase } from "./string-helpers";
5
-
6
- export const MAX_INPUT_TYPE = 1900;
7
- export const MAX_HINT_LENGTH = 5;
8
-
9
- export const IsValidInputs = (inputObjects: IInputCreateResults[] | UN, inputFormValues: any, isAutoError: boolean, isAutoFocus: boolean): boolean => {
10
- let isValid = true;
11
- if (!inputObjects || inputObjects.length === 0) return true;
12
- const sortedObjects = [...inputObjects].sort((a, b) => b.input.displayOrder - a.input.displayOrder);
13
- for (const obj of sortedObjects) {
14
- // Skip unsupported input types
15
- if (obj.input.inputType >= MAX_INPUT_TYPE) continue;
16
-
17
- const inputId = GetInputId(obj.input);
18
- const inputValue = inputFormValues?.[inputId] ?? null;
19
- const isValidInput = IsValidInput(obj, inputValue, isAutoError, isAutoFocus);
20
- if (isValid) isValid = isValidInput;
21
- }
22
- return isValid;
23
- };
24
-
25
- export const IsValidInput = (inputObject: IInputCreateResults, inputValue: any, isAutoError: boolean, isAutoFocus: boolean): boolean => {
26
- const input = inputObject.inputElement;
27
- const inputParameters = inputObject.input;
28
- const value = inputValue;
29
-
30
- switch (inputParameters.inputType) {
31
- //---------------------
32
- case EInputTypes.Textbox:
33
- case EInputTypes.Textarea:
34
- case EInputTypes.Texteditor:
35
- return IsValidTextbox(inputParameters as ITextbox, value, isAutoFocus, isAutoError, input);
36
- //---------------------
37
- case EInputTypes.Checkbox:
38
- return IsValidCheck(inputParameters as ICheckbox, value as boolean, isAutoFocus, isAutoError, input);
39
- //---------------------
40
- case EInputTypes.MultiSelection:
41
- case EInputTypes.SingleSelection:
42
- return IsValidSelectionbox(inputParameters as ISelection, value, isAutoFocus, isAutoError, input);
43
- //---------------------
44
- case EInputTypes.Datepicker:
45
- return IsValidDate(inputParameters as IDate, value as Date | UN, isAutoFocus, isAutoError, input);
46
- //---------------------
47
- case EInputTypes.Number:
48
- return IsValidNumber(inputParameters as INumber, value as number | UN, isAutoFocus, isAutoError, input);
49
- //---------------------
50
- case EInputTypes.TabularForm:
51
- return IsValidTabularform(inputParameters as ITablularForm, value as any[], isAutoFocus, isAutoError, input);
52
- //---------------------
53
- case EInputTypes.Radiobox:
54
- return true;
55
-
56
- default:
57
- return false;
58
- }
59
- };
60
-
61
- // ------------- Start Textbox Validation -------------
62
- function IsValidTextbox<T>(inputParameters: ITextbox, value: T | UN, isNeedFocus: boolean, isAutoError: boolean, input: HTMLElement | UN): boolean {
63
- if (!inputParameters) return false;
64
- return IsValidInputValueWithRegex(inputParameters, input, inputParameters.validatorKey, value as string | UN, inputParameters.minLength ?? 0, inputParameters.maxLength ?? 0, isAutoError, isNeedFocus, inputParameters.regexKey).isValid;
65
- }
66
- export function IsValidInputValueWithRegex(inputParameters: ITextbox, input: HTMLElement | UN, key: string | UN, value: string | UN, min: number, max: number, isAutoError: boolean = true, isNeedFocus: boolean, regularExpression: RegexTypes | UN): IValidationMessage {
67
- const valid = IsValidInputValueWithLength(inputParameters, input, key, value, min, max, false, isNeedFocus);
68
- if (Array.isArray(regularExpression)) {
69
- if (IsNullOrEmpty(value)) return { isValid: false, message: InvalidValueMessage(key) };
70
-
71
- const isMatch = regularExpression.includes(value as string);
72
- const msg = !isMatch ? `${InvalidValueMessage(key)}\nOnly allowed values are: ${MakeFirstLetterUpperCase(regularExpression.slice(0, MAX_HINT_LENGTH).join(", "))}${regularExpression.length > MAX_HINT_LENGTH ? `...` : "."}` : null;
73
- if (isAutoError) AddRemoveErrorFromInput(inputParameters, input, !isMatch, msg, isNeedFocus);
74
-
75
- return { isValid: isMatch, message: msg };
76
- } else if (typeof regularExpression === "string") {
77
- const isMatch = IsMatchRejex(value, regularExpression);
78
- if (!isMatch) {
79
- const msg = InvalidValueMessage(key ?? "Input-Value");
80
- if (isAutoError) AddRemoveErrorFromInput(inputParameters, input, true, msg, isNeedFocus);
81
- return { isValid: isMatch, message: msg };
82
- }
83
- }
84
-
85
- if (!valid.isValid) {
86
- AddRemoveErrorFromInput(inputParameters, input, isAutoError, valid.message, isNeedFocus);
87
- return valid;
88
- }
89
-
90
- if (regularExpression && (regularExpression as string) !== "") {
91
- const isMatch = IsMatchRejex(value, regularExpression);
92
- if (!isMatch) {
93
- const msg = InvalidValueMessage(key ?? "Input-Value");
94
- if (isAutoError) AddRemoveErrorFromInput(inputParameters, input, true, msg, isNeedFocus);
95
- return { isValid: isMatch, message: msg };
96
- }
97
- }
98
- if (isAutoError) AddRemoveErrorFromInput(inputParameters, input, false);
99
- return { isValid: true, message: "Valid" };
100
- }
101
- export function IsValidInputValueWithLength(inputParameters: IInputParameters<any>, input: HTMLElement | UN, key: string | UN, value: string | UN, min: number, max: number, isAutoError: boolean = true, isNeedFocus: boolean): IValidationMessage {
102
- if (IsNullOrEmpty(value) && min > 0) {
103
- const mes = RequiredMessage(key);
104
- if (isAutoError) AddRemoveErrorFromInput(inputParameters, input, true, mes, isNeedFocus);
105
- return { isValid: false, message: mes };
106
- }
107
- value = value ?? "";
108
- if (min > 0 && value.length < min) {
109
- const mes = MinLengthNotValidMessage(key ?? "Input-Value", min, false);
110
- if (isAutoError) AddRemoveErrorFromInput(inputParameters, input, true, mes, isNeedFocus);
111
- return { isValid: false, message: mes };
112
- } else if (max > 0 && value.length > max) {
113
- const mes = MaxLengthNotValidMessage(key ?? "Input-Value", max, false);
114
- if (isAutoError) AddRemoveErrorFromInput(inputParameters, input, true, mes, isNeedFocus);
115
- return { isValid: false, message: mes };
116
- }
117
- if (isAutoError) AddRemoveErrorFromInput(inputParameters, input, false);
118
- return { isValid: true, message: "Valid" };
119
- }
120
- // ------------- End Textbox Validation -------------
121
-
122
- // ------------- Start Checkbox Validation -------------
123
- function IsValidCheck(inputParameters: ICheckbox, value: boolean, isNeedFocus: boolean, isAutoError: boolean, input: HTMLElement | UN): boolean {
124
- if (!inputParameters) return false;
125
- if (!value) {
126
- if (inputParameters.isRequired) {
127
- const requiredMessage = RequiredMessage(inputParameters.validatorKey);
128
- if (isAutoError) AddRemoveErrorFromInput(inputParameters, input, true, requiredMessage, isNeedFocus);
129
- return false;
130
- } else {
131
- if (isAutoError) AddRemoveErrorFromInput(inputParameters, input, false, undefined, isNeedFocus);
132
- return true;
133
- }
134
- }
135
-
136
- if (isAutoError) AddRemoveErrorFromInput(inputParameters, input, false, undefined, isNeedFocus);
137
- return true;
138
- }
139
- // ------------- End Checkbox Validation -------------
140
-
141
- // ------------- Start Selectionbox Validation -------------
142
- function IsValidSelectionbox(inputParameters: ISelection, value: any | UN, isNeedFocus: boolean, isAutoError: boolean, input: HTMLElement | UN): boolean {
143
- let isValid = true;
144
- const isMulti = inputParameters.inputType === EInputTypes.MultiSelection;
145
- if (!inputParameters) isValid = false;
146
- else if (!inputParameters.isRequired) isValid = true;
147
- else isValid = isMulti ? value?.length > 0 : value !== null;
148
-
149
- if (!isValid && isMulti && inputParameters.bitwiseEnum !== undefined && inputParameters.bitwiseEnum !== null) isValid = BitwiseToList(inputParameters.bitwiseEnum, value).length > 0;
150
-
151
- if (isValid) {
152
- AddRemoveErrorFromInput(inputParameters, input, false);
153
- return isValid;
154
- }
155
-
156
- const msg = RequiredMessage(inputParameters.validatorKey ?? "Input-Value");
157
- if (isAutoError) AddRemoveErrorFromInput(inputParameters, input, true, msg, isNeedFocus);
158
- return isValid;
159
- }
160
- // ------------- End Selectionbox Validation -------------
161
-
162
- // ------------- Start Date Validation -------------
163
- function IsValidDate(inputParameters: IDate, value: Date | UN, isNeedFocus: boolean, isAutoError: boolean, input: HTMLElement | UN): boolean {
164
- if (!inputParameters) return false;
165
- return false;
166
- }
167
- // ------------- End Date Validation -------------
168
-
169
- // ------------- Start Number Validation -------------
170
- function IsValidNumber(inputParameters: INumber, value: number | UN, isNeedFocus: boolean, isAutoError: boolean, input: HTMLElement | UN): boolean {
171
- if (!inputParameters) return false;
172
- if (value === null || value === undefined) {
173
- if (inputParameters.isRequired) {
174
- const requiredMessage = RequiredMessage(inputParameters.validatorKey);
175
- if (isAutoError) AddRemoveErrorFromInput(inputParameters, input, true, requiredMessage, isNeedFocus);
176
- return false;
177
- } else {
178
- if (isAutoError) AddRemoveErrorFromInput(inputParameters, input, false, undefined, isNeedFocus);
179
- return true;
180
- }
181
- }
182
-
183
- if (inputParameters.minLength !== undefined && inputParameters.minLength !== null && value < inputParameters.minLength) {
184
- const msg = MinLengthNotValidMessage(inputParameters.validatorKey ?? "Input", inputParameters.minLength, false);
185
- if (isAutoError) AddRemoveErrorFromInput(inputParameters, input, true, msg, isNeedFocus);
186
- return false;
187
- } else if (inputParameters.maxLength !== undefined && inputParameters.maxLength !== null && value > inputParameters.maxLength) {
188
- const msg = MaxLengthNotValidMessage(inputParameters.validatorKey ?? "Input", inputParameters.maxLength, false);
189
- if (isAutoError) AddRemoveErrorFromInput(inputParameters, input, true, msg, isNeedFocus);
190
- return false;
191
- }
192
-
193
- if (isAutoError) AddRemoveErrorFromInput(inputParameters, input, false, undefined, isNeedFocus);
194
- return true;
195
- }
196
- // ------------- End Number Validation -------------
197
-
198
- // ------------- Start Tabularform Validation -------------
199
- function IsValidTabularform(inputParameters: ITablularForm, value: any[], isNeedFocus: boolean, isAutoError: boolean, input: HTMLElement | UN) {
200
- return false;
201
- }
202
- // ------------- End Tabularform Validation -------------
203
-
204
- // ------------- Starting Input Error Handling -------------
205
- export const AddRemoveErrorFromInput = (inputParameters: IInputRootParameters<any>, input: HTMLElement | UN, isShowError: boolean, errorMessage?: string | UN, isNeedFocus?: boolean) => {
206
- if (!input) return;
207
- const formGroup = input.parentElement;
208
- if (!formGroup) return;
209
-
210
- const errorMessageTitle_Class = "input-error-message-popup";
211
- if ((formGroup as any).cleanup) (formGroup as any).cleanup();
212
- const formWrapper = formGroup.parentElement;
213
- if (isShowError) {
214
- formGroup.classList.add("error");
215
- const errorMessageTitle = GetValidationMessage(inputParameters);
216
- //const errorMessageBox = CreateTitle(errorMessageTitle, formGroup);
217
- //errorMessageBox.titleElement.classList.add(errorMessageTitle_Class);
218
- if (formWrapper && formWrapper.classList.contains("ipt-wp")) ShowError(input, formWrapper, errorMessage, isNeedFocus);
219
- else if (formGroup.classList.contains("ipt-wp")) ShowError(input, formGroup, errorMessage, isNeedFocus);
220
- } else {
221
- formGroup.classList.remove("error");
222
- if (formWrapper && formWrapper.classList.contains("ipt-wp")) formWrapper.querySelector(".msg")?.remove();
223
- else if (formGroup.classList.contains("ipt-wp")) formGroup.querySelector(".msg")?.remove();
224
- }
225
- };
226
- const ShowError = (input: HTMLElement, formWrapper: HTMLElement, errorMessage?: string | UN, isNeedFocus?: boolean) => {
227
- formWrapper.querySelector(".msg")?.remove();
228
- const p = document.createElement("p") as HTMLParagraphElement;
229
- p.classList.add("msg", "fw500", "fs-08");
230
- p.style.color = "var(--B13)";
231
- errorMessage = errorMessage ?? "Input is not valid";
232
- p.innerHTML = errorMessage;
233
- p.setAttribute("nlt", errorMessage ?? "");
234
- formWrapper.querySelector(".smb")?.appendChild(p);
235
- if (isNeedFocus) input.focus();
236
- };
237
- // ------------- End Input Error Handling -------------
238
- interface IValidationMessage {
239
- message: string | UN;
240
- isValid: boolean;
241
- }
242
-
243
- export const IsMatchRejex = (value?: string | UN, reg?: string | UN): boolean => {
244
- if (!reg) return true;
245
- const regex = new RegExp(reg);
246
- return regex.test(value ?? "");
247
- };
248
- export function RequiredMessage(key?: string | UN) {
249
- return IsNullOrEmpty(key) ? "Invalid Request, Required validation error." : `Invalid Request, ${MakeFirstLetterUpperCase(key ?? "")} is Required.`;
250
- }
251
- export function GetValidationMessage(inputParams: IInputRootParameters<any>): string {
252
- const messages: string[] = [];
253
- const param = inputParams as IInputParameters<any>;
254
-
255
- if (param.isRequired) {
256
- messages.push("This field is required.");
257
- }
258
-
259
- if (param.minLength && param.maxLength) messages.push(`Must be between ${param.minLength} and ${param.maxLength} characters.`);
260
- else if (param.minLength) messages.push(`Minimum length is ${param.minLength} characters.`);
261
- else if (param.maxLength) messages.push(`Maximum length is ${param.maxLength} characters.`);
262
-
263
- if ((param as any).regexKey) {
264
- const pattern = (param as any).regexKey;
265
-
266
- if (pattern === "^[a-zA-Z0-9_]+$") messages.push("Only letters, numbers, and underscores are allowed.");
267
- else if (pattern === "^[0-9]+$") messages.push("Only numbers are allowed.");
268
- else if (pattern === "^[a-zA-Z]+$") messages.push("Only letters are allowed.");
269
- else if (pattern === "^[a-zA-Z0-9]+$") messages.push("Only letters and numbers are allowed.");
270
- else messages.push("Please follow the required format.");
271
- }
272
-
273
- return messages.join("<br>");
274
- }
275
- export function MinLengthNotValidMessage(key: string, min: number, isArrayOrList: boolean = false): string {
276
- return !isArrayOrList ? `Invalid Request, ${MakeFirstLetterUpperCase(key)} must be at least ${min} characters long.` : `Invalid Request, Please provide at least ${min} ${MakeFirstLetterUpperCase(key)}.`;
277
- }
278
- export function MinDateNotValidMessage(key: string, min: Date): string {
279
- //const formattedDate = EasyDateFormater(min, false);
280
- const formattedDate = min;
281
- return `Invalid Request, ${MakeFirstLetterUpperCase(key)} must be on or after ${formattedDate}.`;
282
- }
283
-
284
- export function MaxLengthNotValidMessage(key: string, max: number, isArrayOrList: boolean = false, isSelected?: boolean): string {
285
- const formattedKey = MakeFirstLetterUpperCase(key);
286
-
287
- if (isArrayOrList) return `You can provide a maximum of ${max} ${formattedKey}.`;
288
- if (isSelected) return `You cannot select more than ${max} ${formattedKey}.`;
289
- return `Invalid request: ${formattedKey} cannot exceed ${max} characters.`;
290
- }
291
-
292
- export function MaxDateNotValidMessage(key: string, max: Date): string {
293
- //const formattedDate = EasyDateFormater(max, false);
294
- const formattedDate = max;
295
- return `Invalid Request, ${MakeFirstLetterUpperCase(key)} cannot be after ${formattedDate}.`;
296
- }
297
- export function InvalidValueMessage(key: string | UN): string {
298
- return IsNullOrEmpty(key) ? "Invalid Request, Given value is not valid." : `Invalid Request, ${MakeFirstLetterUpperCase(key ?? "")} is not valid.`;
299
- }
300
- export function UnauthorizedMessage(key?: string) {
301
- return IsNullOrEmpty(key) ? "Invalid Request, You haven't permission to access this." : `Invalid Request, You haven't permission to access ${MakeFirstLetterUpperCase(key)}.`;
302
- }
package/src/index.ts DELETED
@@ -1,26 +0,0 @@
1
- // API services
2
- export * from "./api-services/preference-service";
3
- export * from "./api-services/system-service";
4
-
5
- // Components — documents (server-safe)
6
- export * from "./components/documents/page-title";
7
-
8
- // Components — layouts (server-safe)
9
- export * from "./components/layouts/global-layout";
10
-
11
- // Helpers
12
- export * from "./helpers/bitwise-helpers";
13
- export * from "./helpers/datasource-helpers";
14
- export * from "./helpers/element-helpers";
15
- export * from "./helpers/input-helpers";
16
- export * from "./helpers/string-helpers";
17
- export * from "./helpers/utility-helpers";
18
-
19
- // Interfaces
20
- export * from "./interface";
21
-
22
- // Core
23
- export * from "./nexus.environments";
24
- export * from "./proxy-api-server";
25
- export * from "./services/http-services";
26
- export * from "./sso-server";
package/src/interface.ts DELETED
@@ -1,19 +0,0 @@
1
- export * from "./interfaces/auth-token-interfaces";
2
- export * from "./interfaces/browser-interfaces";
3
- export * from "./interfaces/button-interfaces";
4
- export * from "./interfaces/datasource-interfaces";
5
- export * from "./interfaces/datatable-interfaces";
6
- export * from "./interfaces/dialogbox-interfaces";
7
- export * from "./interfaces/exception-interfaces";
8
- export * from "./interfaces/http-interfaces";
9
- export * from "./interfaces/icon-interfaces";
10
- export * from "./interfaces/input-interfaces";
11
- export * from "./interfaces/layout-interfaces";
12
- export * from "./interfaces/menu-interfaces";
13
- export * from "./interfaces/message-interfaces";
14
- export * from "./interfaces/permission-interfaces";
15
- export * from "./interfaces/storage-interfaces";
16
- export * from "./interfaces/system-interfaces";
17
- export * from "./interfaces/theme-interfaces";
18
- export * from "./interfaces/type-interfaces";
19
- export * from "./interfaces/user-interfaces";
@@ -1,6 +0,0 @@
1
- /** Token lifetimes from TBAuthentications.ClientApplications (seconds). */
2
- export interface IClientTokenLifetimes {
3
- accessTokenLifetimeSeconds: number;
4
- refreshTokenLifetimeSeconds: number;
5
- ssoSessionLifetimeSeconds: number;
6
- }
@@ -1,36 +0,0 @@
1
- export const DEFAULT_MOBILE_VIEW_WIDTH = 768;
2
-
3
- export enum EKeys {
4
- TAB = "Tab",
5
- DELETE = "Delete",
6
- ENTER = "Enter",
7
- ESCAPE = "Escape",
8
- SPACE = " ",
9
- BACKSPACE = "Backspace",
10
- ARROW_UP = "ArrowUp",
11
- ARROW_DOWN = "ArrowDown",
12
- ARROW_LEFT = "ArrowLeft",
13
- ARROW_RIGHT = "ArrowRight",
14
- A = "a",
15
- B = "b",
16
- C = "c",
17
- D = "d",
18
- DOT = ".",
19
- }
20
- export enum EKeyModifier {
21
- None = 0,
22
- Shift = 1 << 0, // 1
23
- Ctrl = 1 << 1, // 2
24
- Alt = 1 << 2, // 4
25
- }
26
- export enum EFileSizes {
27
- ORGINAL = 0,
28
- SIZE_16 = 1,
29
- SIZE_32 = 2,
30
- SIZE_64 = 3,
31
- SIZE_128 = 4,
32
- SIZE_256 = 5,
33
- SIZE_512 = 6,
34
- SIZE_1024 = 7,
35
- SIZE_2048 = 8,
36
- }
@@ -1,63 +0,0 @@
1
- import { EIcons, EIconTypes } from "./icon-interfaces";
2
- import { ESizes } from "./layout-interfaces";
3
- import { EBackgrounds } from "./theme-interfaces";
4
- import { ClickHandler, StringCallbackHandler, UN } from "./type-interfaces";
5
-
6
- export const DEFAULT_BUTTON_CLASS = (column?: number | UN, padding?: number | UN, borderSize?: number | UN, background?: EBackgrounds | UN, defaultClass?: string | UN, needColumnSize?: boolean | UN) => {
7
- const col = `btn pr h w100 sn db toh p${padding ?? 3} ${background ?? EBackgrounds.Background1} df ac ${borderSize ? "bb" + borderSize : ""} ${defaultClass ?? ""}`;
8
- if (needColumnSize !== false) return `${col} col-sm-12 ${`col-${column ?? 12}`}`;
9
- return col;
10
- };
11
-
12
- export const DEFAULT_LINK_BUTTON_STYLE: React.CSSProperties = {
13
- color: "var(--B20)",
14
- borderBottom: "var(--BRD1) solid var(--B20)",
15
- width: "fit-content",
16
- };
17
-
18
- export enum ETargets {
19
- Blank = "_blank",
20
- Self = "_self",
21
- Parent = "_parent",
22
- Top = "_top",
23
- }
24
- export enum EButtonTypes {
25
- BUTTON = "button",
26
- SUBMIT = "submit",
27
- }
28
-
29
- export interface IButton {
30
- label?: string | StringCallbackHandler | string | UN;
31
- id?: string | UN;
32
- icon?: EIcons | UN;
33
- onClick?: ClickHandler | UN;
34
- url?: string | UN;
35
- background?: EBackgrounds | UN;
36
- defaultClass?: string | UN;
37
- displayOrder?: number | UN;
38
- data?: any | Event | UN;
39
- iconType?: EIconTypes | UN;
40
- iconSize?: ESizes | UN;
41
- columnSize?: number | UN;
42
- borderSize?: number | UN;
43
- target?: ETargets | EButtonTypes | UN;
44
- }
45
-
46
- export const GetButton = (label?: string | StringCallbackHandler | string | UN, id?: string | UN, url?: string | UN, icon?: EIcons | UN, onClick?: ClickHandler | UN, data?: any | Event | UN, background?: EBackgrounds | UN, defaultClass?: string | UN, displayOrder?: number | UN, iconType?: EIconTypes | UN, iconSize?: ESizes | UN, columnSize?: number | UN, borderSize?: number | UN, target?: ETargets | EButtonTypes | UN): IButton => {
47
- return {
48
- label: label,
49
- id: id,
50
- icon: icon,
51
- onClick: onClick,
52
- url: url,
53
- background: background,
54
- defaultClass: defaultClass,
55
- displayOrder: displayOrder,
56
- data: data,
57
- iconType: iconType,
58
- iconSize: iconSize,
59
- columnSize: columnSize,
60
- borderSize: borderSize,
61
- target: target,
62
- };
63
- };
@@ -1,22 +0,0 @@
1
- import { IApiInformations, IGetApiInformations } from "./http-interfaces";
2
-
3
- export type DatasourceTypes = any[] | IApiInformations | IJoining | IGetApiInformations;
4
-
5
- export interface IJoiningKey {
6
- /** someting we do not need from just need only TOs
7
- * LIKE: City case,
8
- * City have , Cityname, Countryname, CountryCode so, we do not need FROMs, we need only TOs
9
- */
10
- from?: string;
11
- to: string;
12
- status?: string;
13
- }
14
- export interface IJoining {
15
- /** Root Client side ID KEY */
16
- rootFrom: string;
17
- /** Root Servier side ID KEY */
18
- rootTo: string;
19
- joinings: IJoiningKey[];
20
- /** Comes From Server */
21
- apiInformation: IGetApiInformations;
22
- }
@@ -1,25 +0,0 @@
1
- import { IJoining } from "./datasource-interfaces";
2
-
3
- export type OnRenderTableData = (data: any, object: any, index: number, tr: HTMLElement | null, td: HTMLElement | null, isDatatable?: boolean) => any;
4
-
5
- export interface IColumn {
6
- systemName: string;
7
- displayName: string;
8
- displayOrder: number;
9
- isVisible: boolean;
10
- isSearchable: boolean;
11
- isSortable: boolean;
12
- render?: OnRenderTableData;
13
- defaultWidth?: number | string;
14
- minWidth?: string | number;
15
- maxWidth?: string | number;
16
- joining?: IJoining;
17
- defaultClass?: string;
18
- childColumns?: IColumn[];
19
- rowSpan?: number;
20
- colSpan: number;
21
- columnSize?: number;
22
- isSerialNumber: boolean;
23
- allowResize: boolean;
24
- //filterInput?: IInputBaseParameters<any>;
25
- }
@@ -1,5 +0,0 @@
1
- export interface IDialogboxResults {
2
- visibility: (isVisible: boolean, isInitial?: boolean) => void;
3
- isValid: () => boolean;
4
- destroy: () => void;
5
- }
@@ -1,99 +0,0 @@
1
- export enum EErrorCodes {
2
- Unknown = 0,
3
-
4
- /// <summary>
5
- /// Indicates that the format of the input is invalid.
6
- /// </summary>
7
- FormatInvalid = 1001,
8
-
9
- /// <summary>
10
- /// Indicates that the operation failed due to lack of authorization.
11
- /// </summary>
12
- /// <remarks>Use this value to represent scenarios where access is denied because the user or
13
- /// process does not have the required permissions.</remarks>
14
- Unauthorized = 2001,
15
-
16
- /// <summary>
17
- /// Indicates that the requested operation is forbidden due to insufficient permissions.
18
- /// </summary>
19
- Forbidden = 2002,
20
-
21
- /// <summary>
22
- /// Indicates that the authentication token has expired.
23
- /// </summary>
24
- /// <remarks>This value can be used to identify error conditions where a user's session or access
25
- /// token is no longer valid and re-authentication is required.</remarks>
26
- TokenExpired = 2003,
27
-
28
- /// <summary>
29
- /// Indicates that the requested resource could not be found.
30
- /// </summary>
31
- ResourceNotFound = 3001,
32
-
33
- /// <summary>
34
- /// Indicates that the specified resource already exists.
35
- /// </summary>
36
- AlreadyExists = 3002,
37
-
38
- /// <summary>
39
- /// Indicates that the requested operation or feature is not implemented.
40
- /// </summary>
41
- /// <remarks>Use this value to represent an error condition where a requested functionality is not
42
- /// available or has not been provided by the system.</remarks>
43
- NotImplemented = 4001,
44
-
45
- /// <summary>
46
- /// Indicates that a compile-time error has occurred.
47
- /// </summary>
48
- CompileTimeError = 4002,
49
-
50
- /// <summary>
51
- /// Indicates that a runtime error occurred during compilation.
52
- /// </summary>
53
- CompileRuntimeError = 4003,
54
- }
55
- export enum EExceptionCategories {
56
- /// <summary>
57
- /// Indicates that the associated value or member is related to validation operations.
58
- /// </summary>
59
- Validation = 1,
60
-
61
- /// <summary>
62
- /// Specifies that the item relates to security functionality or concerns.
63
- /// </summary>
64
- Security = 2,
65
-
66
- /// <summary>
67
- /// Represents an input/output file resource type.
68
- /// </summary>
69
- /// <remarks>Use this value to indicate that the resource is a file used for input or output
70
- /// operations. This can be useful when distinguishing between different resource types in file handling or
71
- /// resource management scenarios.</remarks>
72
- IO_File = 3,
73
-
74
- /// <summary>
75
- /// Indicates that the log entry is related to database operations.
76
- /// </summary>
77
- Database = 4,
78
-
79
- /// <summary>
80
- /// Specifies that the log entry is associated with application-level events or messages.
81
- /// </summary>
82
- Application = 5,
83
-
84
- /// <summary>
85
- /// Indicates an internal service type that is not intended for external use.
86
- /// </summary>
87
- /// <remarks>This value is typically used to distinguish services that are only accessible within
88
- /// the system or application. It may be used for internal routing, diagnostics, or other infrastructure
89
- /// purposes.</remarks>
90
- InternalService = 6,
91
-
92
- /// <summary>
93
- /// Indicates that the log entry is related to an external service.
94
- /// </summary>
95
- /// <remarks>Use this value to categorize logs that pertain to interactions with third-party or
96
- /// external systems, such as APIs or external databases. This can help in filtering and analyzing logs specific
97
- /// to external dependencies.</remarks>
98
- ExternalService = 7,
99
- }