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.
- package/LICENSE +21 -0
- package/README.md +903 -0
- package/dist/Client.Index.d.ts +44 -0
- package/dist/Client.Index.js +49 -0
- package/dist/Components/Documents/Button.d.ts +29 -0
- package/dist/Components/Documents/Button.js +11 -0
- package/dist/Components/Documents/Menu.d.ts +102 -0
- package/dist/Components/Documents/Menu.js +238 -0
- package/dist/Components/Documents/SplitButton.d.ts +64 -0
- package/dist/Components/Documents/SplitButton.js +127 -0
- package/dist/Components/Documents/TabButtons.d.ts +62 -0
- package/dist/Components/Documents/TabButtons.js +19 -0
- package/dist/Components/Forms/ApiForm.d.ts +21 -0
- package/dist/Components/Forms/ApiForm.js +99 -0
- package/dist/Components/Forms/Crud.d.ts +17 -0
- package/dist/Components/Forms/Crud.js +556 -0
- package/dist/Components/Forms/CrudParts.d.ts +15 -0
- package/dist/Components/Forms/CrudParts.js +36 -0
- package/dist/Components/Forms/Form.d.ts +52 -0
- package/dist/Components/Forms/Form.js +319 -0
- package/dist/Components/Forms/SubmitForm.d.ts +65 -0
- package/dist/Components/Forms/SubmitForm.js +198 -0
- package/dist/Components/Inputs/Calendar.d.ts +69 -0
- package/dist/Components/Inputs/Calendar.js +258 -0
- package/dist/Components/Inputs/CheckBox.d.ts +53 -0
- package/dist/Components/Inputs/CheckBox.js +87 -0
- package/dist/Components/Inputs/CheckBoxGroup.d.ts +20 -0
- package/dist/Components/Inputs/CheckBoxGroup.js +80 -0
- package/dist/Components/Inputs/ChoiceField.d.ts +122 -0
- package/dist/Components/Inputs/ChoiceField.js +169 -0
- package/dist/Components/Inputs/DatePicker.d.ts +54 -0
- package/dist/Components/Inputs/DatePicker.js +246 -0
- package/dist/Components/Inputs/DateRangePicker.d.ts +62 -0
- package/dist/Components/Inputs/DateRangePicker.js +283 -0
- package/dist/Components/Inputs/DateTimePicker.d.ts +75 -0
- package/dist/Components/Inputs/DateTimePicker.js +399 -0
- package/dist/Components/Inputs/Dropdown.d.ts +117 -0
- package/dist/Components/Inputs/Dropdown.js +839 -0
- package/dist/Components/Inputs/DropdownParts.d.ts +84 -0
- package/dist/Components/Inputs/DropdownParts.js +102 -0
- package/dist/Components/Inputs/EditorShell.d.ts +45 -0
- package/dist/Components/Inputs/EditorShell.js +214 -0
- package/dist/Components/Inputs/Field.d.ts +53 -0
- package/dist/Components/Inputs/Field.js +16 -0
- package/dist/Components/Inputs/GroupForm.d.ts +20 -0
- package/dist/Components/Inputs/GroupForm.js +170 -0
- package/dist/Components/Inputs/InputField.d.ts +59 -0
- package/dist/Components/Inputs/InputField.js +169 -0
- package/dist/Components/Inputs/InputRenderer.d.ts +35 -0
- package/dist/Components/Inputs/InputRenderer.js +99 -0
- package/dist/Components/Inputs/MarkdownEditor.d.ts +67 -0
- package/dist/Components/Inputs/MarkdownEditor.js +289 -0
- package/dist/Components/Inputs/NumberBox.d.ts +53 -0
- package/dist/Components/Inputs/NumberBox.js +228 -0
- package/dist/Components/Inputs/RadioGroup.d.ts +20 -0
- package/dist/Components/Inputs/RadioGroup.js +43 -0
- package/dist/Components/Inputs/ReadOnlyNotice.d.ts +36 -0
- package/dist/Components/Inputs/ReadOnlyNotice.js +116 -0
- package/dist/Components/Inputs/RichTextEditor.d.ts +103 -0
- package/dist/Components/Inputs/RichTextEditor.js +1170 -0
- package/dist/Components/Inputs/RichTextParts.d.ts +63 -0
- package/dist/Components/Inputs/RichTextParts.js +157 -0
- package/dist/Components/Inputs/RowsInput.d.ts +104 -0
- package/dist/Components/Inputs/RowsInput.js +259 -0
- package/dist/Components/Inputs/Slider.d.ts +87 -0
- package/dist/Components/Inputs/Slider.js +216 -0
- package/dist/Components/Inputs/TabularForm.d.ts +23 -0
- package/dist/Components/Inputs/TabularForm.js +283 -0
- package/dist/Components/Inputs/TextArea.d.ts +43 -0
- package/dist/Components/Inputs/TextArea.js +31 -0
- package/dist/Components/Inputs/TextBox.d.ts +52 -0
- package/dist/Components/Inputs/TextBox.js +58 -0
- package/dist/Components/Inputs/TextField.d.ts +31 -0
- package/dist/Components/Inputs/TextField.js +35 -0
- package/dist/Components/Inputs/TimePanel.d.ts +34 -0
- package/dist/Components/Inputs/TimePanel.js +288 -0
- package/dist/Components/Inputs/TimePicker.d.ts +54 -0
- package/dist/Components/Inputs/TimePicker.js +239 -0
- package/dist/Components/Inputs/TreeView.d.ts +160 -0
- package/dist/Components/Inputs/TreeView.js +947 -0
- package/dist/Components/Layouts/MessageBox.d.ts +71 -0
- package/dist/Components/Layouts/MessageBox.js +104 -0
- package/dist/Components/Layouts/Popup.d.ts +92 -0
- package/dist/Components/Layouts/Popup.js +376 -0
- package/dist/Components/Layouts/PopupContext.d.ts +2 -0
- package/dist/Components/Layouts/PopupContext.js +4 -0
- package/dist/Components/Layouts/PopupDock.d.ts +22 -0
- package/dist/Components/Layouts/PopupDock.js +121 -0
- package/dist/Components/Layouts/PopupHost.d.ts +56 -0
- package/dist/Components/Layouts/PopupHost.js +163 -0
- package/dist/Components/Layouts/PopupRules.d.ts +30 -0
- package/dist/Components/Layouts/PopupRules.js +63 -0
- package/dist/Components/Layouts/ThemePicker.d.ts +13 -0
- package/dist/Components/Layouts/ThemePicker.js +22 -0
- package/dist/Components/Layouts/ThemeScript.d.ts +14 -0
- package/dist/Components/Layouts/ThemeScript.js +13 -0
- package/dist/Components/Layouts/ThemeSwitcher.d.ts +13 -0
- package/dist/Components/Layouts/ThemeSwitcher.js +29 -0
- package/dist/Components/Layouts/Toaster.d.ts +76 -0
- package/dist/Components/Layouts/Toaster.js +172 -0
- package/dist/Components/Viewers/DataTable.d.ts +25 -0
- package/dist/Components/Viewers/DataTable.js +542 -0
- package/dist/Components/Viewers/DataTableParts.d.ts +134 -0
- package/dist/Components/Viewers/DataTableParts.js +145 -0
- package/dist/Components/Viewers/MarkdownView.d.ts +26 -0
- package/dist/Components/Viewers/MarkdownView.js +79 -0
- package/dist/Components/Viewers/RichTextView.d.ts +18 -0
- package/dist/Components/Viewers/RichTextView.js +17 -0
- package/dist/Helpers/AnimationHelpers.d.ts +6 -0
- package/dist/Helpers/AnimationHelpers.js +35 -0
- package/dist/Helpers/ApiClient.d.ts +74 -0
- package/dist/Helpers/ApiClient.js +197 -0
- package/dist/Helpers/ApiFormHelpers.d.ts +26 -0
- package/dist/Helpers/ApiFormHelpers.js +56 -0
- package/dist/Helpers/ApiModules.d.ts +135 -0
- package/dist/Helpers/ApiModules.js +194 -0
- package/dist/Helpers/ApiResponses.d.ts +41 -0
- package/dist/Helpers/ApiResponses.js +159 -0
- package/dist/Helpers/ApiRoutes.d.ts +150 -0
- package/dist/Helpers/ApiRoutes.js +191 -0
- package/dist/Helpers/ApiToasts.d.ts +21 -0
- package/dist/Helpers/ApiToasts.js +22 -0
- package/dist/Helpers/ClassHelpers.d.ts +3 -0
- package/dist/Helpers/ClassHelpers.js +4 -0
- package/dist/Helpers/CrudBackend.d.ts +56 -0
- package/dist/Helpers/CrudBackend.js +119 -0
- package/dist/Helpers/CrudHelpers.d.ts +76 -0
- package/dist/Helpers/CrudHelpers.js +202 -0
- package/dist/Helpers/DateHelpers.d.ts +88 -0
- package/dist/Helpers/DateHelpers.js +363 -0
- package/dist/Helpers/DatePreferences.d.ts +14 -0
- package/dist/Helpers/DatePreferences.js +94 -0
- package/dist/Helpers/DateTimeHelpers.d.ts +87 -0
- package/dist/Helpers/DateTimeHelpers.js +286 -0
- package/dist/Helpers/DragHelpers.d.ts +129 -0
- package/dist/Helpers/DragHelpers.js +281 -0
- package/dist/Helpers/DropdownHelpers.d.ts +56 -0
- package/dist/Helpers/DropdownHelpers.js +180 -0
- package/dist/Helpers/FormDrafts.d.ts +18 -0
- package/dist/Helpers/FormDrafts.js +76 -0
- package/dist/Helpers/FormStore.d.ts +231 -0
- package/dist/Helpers/FormStore.js +734 -0
- package/dist/Helpers/InputParamsHelpers.d.ts +79 -0
- package/dist/Helpers/InputParamsHelpers.js +388 -0
- package/dist/Helpers/MarkdownEditing.d.ts +27 -0
- package/dist/Helpers/MarkdownEditing.js +250 -0
- package/dist/Helpers/MarkdownHelpers.d.ts +82 -0
- package/dist/Helpers/MarkdownHelpers.js +775 -0
- package/dist/Helpers/MessageBuilder.d.ts +74 -0
- package/dist/Helpers/MessageBuilder.js +254 -0
- package/dist/Helpers/NepaliCalendar.d.ts +25 -0
- package/dist/Helpers/NepaliCalendar.js +107 -0
- package/dist/Helpers/NumberHelpers.d.ts +71 -0
- package/dist/Helpers/NumberHelpers.js +202 -0
- package/dist/Helpers/Permissions.d.ts +62 -0
- package/dist/Helpers/Permissions.js +133 -0
- package/dist/Helpers/PopoverHelpers.d.ts +43 -0
- package/dist/Helpers/PopoverHelpers.js +91 -0
- package/dist/Helpers/RichTextHelpers.d.ts +77 -0
- package/dist/Helpers/RichTextHelpers.js +1072 -0
- package/dist/Helpers/RowsStore.d.ts +160 -0
- package/dist/Helpers/RowsStore.js +584 -0
- package/dist/Helpers/TableColumns.d.ts +40 -0
- package/dist/Helpers/TableColumns.js +254 -0
- package/dist/Helpers/TableExport.d.ts +30 -0
- package/dist/Helpers/TableExport.js +97 -0
- package/dist/Helpers/TableHelpers.d.ts +102 -0
- package/dist/Helpers/TableHelpers.js +281 -0
- package/dist/Helpers/TableStore.d.ts +142 -0
- package/dist/Helpers/TableStore.js +530 -0
- package/dist/Helpers/ThemeHelpers.d.ts +15 -0
- package/dist/Helpers/ThemeHelpers.js +16 -0
- package/dist/Helpers/TimeHelpers.d.ts +73 -0
- package/dist/Helpers/TimeHelpers.js +253 -0
- package/dist/Helpers/TreeStore.d.ts +188 -0
- package/dist/Helpers/TreeStore.js +577 -0
- package/dist/Helpers/ValidationHelpers.d.ts +124 -0
- package/dist/Helpers/ValidationHelpers.js +301 -0
- package/dist/Interfaces/ApiInterfaces.d.ts +149 -0
- package/dist/Interfaces/ApiInterfaces.js +24 -0
- package/dist/Interfaces/CrudInterfaces.d.ts +171 -0
- package/{src/sso-client.tsx → dist/Interfaces/CrudInterfaces.js} +1 -1
- package/dist/Interfaces/DateInterfaces.d.ts +154 -0
- package/dist/Interfaces/DateInterfaces.js +29 -0
- package/dist/Interfaces/FormInterfaces.d.ts +352 -0
- package/dist/Interfaces/FormInterfaces.js +1 -0
- package/dist/Interfaces/InputInterfaces.d.ts +141 -0
- package/dist/Interfaces/InputInterfaces.js +1 -0
- package/dist/Interfaces/MessageInterfaces.d.ts +111 -0
- package/dist/Interfaces/MessageInterfaces.js +5 -0
- package/dist/Interfaces/TableInterfaces.d.ts +291 -0
- package/dist/Interfaces/TableInterfaces.js +1 -0
- package/dist/Interfaces/ThemeInterfaces.d.ts +17 -0
- package/dist/Interfaces/ThemeInterfaces.js +17 -0
- package/dist/Interfaces/TypeInterfaces.d.ts +4 -0
- package/dist/Interfaces/TypeInterfaces.js +1 -0
- package/dist/Server.Index.d.ts +2 -0
- package/dist/Server.Index.js +5 -0
- package/dist/Services/ApiProxy.d.ts +32 -0
- package/dist/Services/ApiProxy.js +111 -0
- package/dist/Services/BrowserApi.d.ts +78 -0
- package/dist/Services/BrowserApi.js +111 -0
- package/dist/Services/ServerApi.d.ts +49 -0
- package/dist/Services/ServerApi.js +75 -0
- package/dist/Services/ThemeService.d.ts +17 -0
- package/dist/Services/ThemeService.js +83 -0
- package/dist/Shared.Index.d.ts +43 -0
- package/dist/Shared.Index.js +47 -0
- package/package.json +82 -33
- package/src/Styles/Nexus.Base.css +70 -0
- package/src/Styles/Nexus.Button.css +151 -0
- package/src/Styles/Nexus.Calendar.css +275 -0
- package/src/Styles/Nexus.Choice.css +345 -0
- package/src/Styles/Nexus.Crud.css +84 -0
- package/src/Styles/Nexus.DateTime.css +81 -0
- package/src/Styles/Nexus.Dropdown.css +774 -0
- package/src/Styles/Nexus.Editor.css +297 -0
- package/src/Styles/Nexus.Form.css +298 -0
- package/src/Styles/Nexus.Index.css +34 -0
- package/src/Styles/Nexus.Input.css +637 -0
- package/src/Styles/Nexus.Markdown.css +265 -0
- package/src/Styles/Nexus.Menu.css +249 -0
- package/src/Styles/Nexus.Popup.css +731 -0
- package/src/Styles/Nexus.RichText.css +463 -0
- package/src/Styles/Nexus.Rows.css +566 -0
- package/src/Styles/Nexus.Slider.css +278 -0
- package/src/Styles/Nexus.Tab.Buttons.css +364 -0
- package/src/Styles/Nexus.Table.css +1014 -0
- package/src/Styles/Nexus.Theme.Picker.css +159 -0
- package/src/Styles/Nexus.Themes.css +194 -0
- package/src/Styles/Nexus.Time.css +147 -0
- package/src/Styles/Nexus.Toast.css +265 -0
- package/src/Styles/Nexus.Tokens.css +72 -0
- package/src/Styles/Nexus.Tree.css +435 -0
- package/src/api-services/authentication-service.tsx +0 -23
- package/src/api-services/preference-service.tsx +0 -5
- package/src/api-services/system-service.tsx +0 -34
- package/src/client.ts +0 -31
- package/src/components/documents/button.tsx +0 -142
- package/src/components/documents/icon-box.tsx +0 -93
- package/src/components/documents/page-title.tsx +0 -7
- package/src/components/documents/tab-button.tsx +0 -172
- package/src/components/documents/tag.tsx +0 -30
- package/src/components/index.js +0 -0
- package/src/components/inputs/checkbox-input.tsx +0 -66
- package/src/components/inputs/input-box.tsx +0 -48
- package/src/components/inputs/input-element.tsx +0 -65
- package/src/components/inputs/input-form.tsx +0 -164
- package/src/components/inputs/input.tsx +0 -181
- package/src/components/inputs/number-input.tsx +0 -108
- package/src/components/inputs/radiobox-input.tsx +0 -53
- package/src/components/inputs/textarea-input.tsx +0 -47
- package/src/components/inputs/textbox-input.tsx +0 -45
- package/src/components/layouts/global-dialogbox.tsx +0 -431
- package/src/components/layouts/global-layout.tsx +0 -59
- package/src/components/layouts/layout-helpers.tsx +0 -20
- package/src/components/layouts/panels/user-panel.tsx +0 -112
- package/src/components/layouts/utility-menu.tsx +0 -49
- package/src/components/panels/theme-panel.tsx +0 -46
- package/src/helpers/bitwise-helpers.tsx +0 -11
- package/src/helpers/browser-helpers.tsx +0 -156
- package/src/helpers/datasource-helpers.tsx +0 -99
- package/src/helpers/element-helpers.tsx +0 -57
- package/src/helpers/input-helpers.tsx +0 -74
- package/src/helpers/string-helpers.tsx +0 -28
- package/src/helpers/utility-helpers.tsx +0 -45
- package/src/helpers/validation-helpers.tsx +0 -302
- package/src/index.ts +0 -26
- package/src/interface.ts +0 -19
- package/src/interfaces/auth-token-interfaces.tsx +0 -6
- package/src/interfaces/browser-interfaces.tsx +0 -36
- package/src/interfaces/button-interfaces.tsx +0 -63
- package/src/interfaces/datasource-interfaces.tsx +0 -22
- package/src/interfaces/datatable-interfaces.tsx +0 -25
- package/src/interfaces/dialogbox-interfaces.tsx +0 -5
- package/src/interfaces/exception-interfaces.tsx +0 -99
- package/src/interfaces/http-interfaces.tsx +0 -129
- package/src/interfaces/icon-interfaces.tsx +0 -129
- package/src/interfaces/input-interfaces.tsx +0 -410
- package/src/interfaces/layout-interfaces.tsx +0 -191
- package/src/interfaces/menu-interfaces.tsx +0 -49
- package/src/interfaces/message-interfaces.tsx +0 -32
- package/src/interfaces/permission-interfaces.tsx +0 -9
- package/src/interfaces/storage-interfaces.tsx +0 -5
- package/src/interfaces/system-interfaces.tsx +0 -22
- package/src/interfaces/theme-interfaces.tsx +0 -123
- package/src/interfaces/type-interfaces.tsx +0 -28
- package/src/interfaces/user-interfaces.tsx +0 -47
- package/src/nexus-client.tsx +0 -21
- package/src/nexus.environments.tsx +0 -66
- package/src/proxy-api/proxy-backend.tsx +0 -60
- package/src/proxy-api/proxy-constants.tsx +0 -28
- package/src/proxy-api/proxy-helpers.tsx +0 -91
- package/src/proxy-api-client.tsx +0 -1
- package/src/proxy-api-server.tsx +0 -2
- package/src/services/http-client-services.tsx +0 -75
- package/src/services/http-services.tsx +0 -158
- package/src/services/loader-service.tsx +0 -185
- package/src/services/localstorage-service.tsx +0 -119
- package/src/services/message-services.tsx +0 -383
- package/src/services/theme-service.tsx +0 -161
- package/src/services/user-services.tsx +0 -10
- package/src/sso-config/auth-token-validation.ts +0 -16
- package/src/sso-config/callback-route.tsx +0 -35
- package/src/sso-config/cookie-encryption.ts +0 -51
- package/src/sso-config/cookie-helpers.tsx +0 -102
- package/src/sso-config/forgot-password-route.tsx +0 -36
- package/src/sso-config/oauth-callback-state.ts +0 -61
- package/src/sso-config/pkce-helpers.ts +0 -9
- package/src/sso-config/provider-complete-route.tsx +0 -18
- package/src/sso-config/redirect-context-actions.tsx +0 -45
- package/src/sso-config/redirect-context-helpers.tsx +0 -159
- package/src/sso-config/redirect-context-persist.tsx +0 -18
- package/src/sso-config/redirect-context-route.tsx +0 -45
- package/src/sso-config/refresh-route.tsx +0 -23
- package/src/sso-config/sign-in-route.tsx +0 -74
- package/src/sso-config/sign-out-route.tsx +0 -57
- package/src/sso-config/sign-up-route.tsx +0 -57
- package/src/sso-config/sso-backend-flow.ts +0 -38
- package/src/sso-config/sso-complete-route.tsx +0 -50
- package/src/sso-config/sso-config.ts +0 -59
- package/src/sso-config/sso-interfaces.tsx +0 -99
- package/src/sso-config/sso-response-helpers.tsx +0 -20
- package/src/sso-server.tsx +0 -21
- package/src/styles/nexus.animation.css +0 -269
- package/src/styles/nexus.core.css +0 -119
- package/src/styles/nexus.dialog.css +0 -144
- package/src/styles/nexus.icon.css +0 -51
- package/src/styles/nexus.input.css +0 -207
- package/src/styles/nexus.loader.css +0 -11
- package/src/styles/nexus.logic.css +0 -47
- package/src/styles/nexus.utility.css +0 -347
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
import { NEXUS_INFO } from "../nexus.environments";
|
|
2
|
-
import { GetRootApi } from "../services/http-services";
|
|
3
|
-
import { EErrorCodes, EExceptionCategories } from "./exception-interfaces";
|
|
4
|
-
import { EModules } from "./system-interfaces";
|
|
5
|
-
import { IInterface, UN } from "./type-interfaces";
|
|
6
|
-
|
|
7
|
-
export const PROXY_PUBLIC_BASE_PATH = "/api/app";
|
|
8
|
-
|
|
9
|
-
export enum EActions {
|
|
10
|
-
Get = 1,
|
|
11
|
-
Post = 2,
|
|
12
|
-
Put = 3,
|
|
13
|
-
Delete = 4,
|
|
14
|
-
}
|
|
15
|
-
export interface IApiInformations {
|
|
16
|
-
module: EModules;
|
|
17
|
-
apiName: string;
|
|
18
|
-
method: EActions;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export interface IGetApiInformations extends IApiInformations {
|
|
22
|
-
cacheCode?: string;
|
|
23
|
-
/** In Minutes */
|
|
24
|
-
cacheLifetime?: number;
|
|
25
|
-
bodyType?: EBody;
|
|
26
|
-
parameters?: any;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export interface IRootRespose extends IInterface {
|
|
30
|
-
isSuccess: boolean;
|
|
31
|
-
code: number;
|
|
32
|
-
message?: string | UN;
|
|
33
|
-
messageCode?: string | UN;
|
|
34
|
-
exceptionCategory?: EExceptionCategories | UN;
|
|
35
|
-
errorCode?: EErrorCodes | UN;
|
|
36
|
-
inputName?: string | UN;
|
|
37
|
-
result?: any | UN;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
export interface IErrorRespose extends IRootRespose {
|
|
41
|
-
exception?: any | UN;
|
|
42
|
-
}
|
|
43
|
-
export interface ISuccessResponse extends IRootRespose {}
|
|
44
|
-
export enum EBody {
|
|
45
|
-
JSON = "application/json",
|
|
46
|
-
MULTIPART_FORM_DATA = "application/x-www-form-urlencoded",
|
|
47
|
-
FORM_DATA = "multipart/form-data",
|
|
48
|
-
}
|
|
49
|
-
export const GetMethod = (method?: EActions) => {
|
|
50
|
-
switch (method) {
|
|
51
|
-
case EActions.Delete:
|
|
52
|
-
return "DELETE";
|
|
53
|
-
case EActions.Post:
|
|
54
|
-
return "POST";
|
|
55
|
-
case EActions.Put:
|
|
56
|
-
return "PUT";
|
|
57
|
-
default:
|
|
58
|
-
return "GET";
|
|
59
|
-
}
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
export const GetResponse = {
|
|
63
|
-
ERROR: (message: string = "An error occurred.", messageCode: string = "GENERIC_ERROR", exceptionCategory: EExceptionCategories = EExceptionCategories.Application, errorCode: EErrorCodes = EErrorCodes.Unknown, inputName: string | undefined = undefined, exception: any | null = null, code: number = 400): IErrorRespose => ({
|
|
64
|
-
isSuccess: false,
|
|
65
|
-
exception: exception,
|
|
66
|
-
code: code,
|
|
67
|
-
message: message,
|
|
68
|
-
messageCode: messageCode,
|
|
69
|
-
exceptionCategory: exceptionCategory,
|
|
70
|
-
errorCode: errorCode,
|
|
71
|
-
inputName: inputName,
|
|
72
|
-
result: null,
|
|
73
|
-
}),
|
|
74
|
-
SUCCESS: (result: any | UN, message: string = "Success", messageCode: string = "SUCCESS", code: number = 200): ISuccessResponse => ({
|
|
75
|
-
isSuccess: true,
|
|
76
|
-
result: result,
|
|
77
|
-
message: message,
|
|
78
|
-
messageCode: messageCode,
|
|
79
|
-
code: code,
|
|
80
|
-
}),
|
|
81
|
-
};
|
|
82
|
-
|
|
83
|
-
const GET_API_KEYS = ["cacheCode", "cacheLifetime", "bodyType", "parameters"];
|
|
84
|
-
const _isApi = (apiInformations: any | IApiInformations): boolean => {
|
|
85
|
-
if (!apiInformations || (!apiInformations.module && apiInformations.module !== EModules.None) || !apiInformations.apiName || !apiInformations.method) return false;
|
|
86
|
-
return true;
|
|
87
|
-
};
|
|
88
|
-
|
|
89
|
-
export const GetApiInformations = {
|
|
90
|
-
API: (module: EModules, apiName: string, method?: EActions | UN): IApiInformations => ({
|
|
91
|
-
module: module,
|
|
92
|
-
apiName: apiName,
|
|
93
|
-
method: method ?? EActions.Get,
|
|
94
|
-
}),
|
|
95
|
-
IS_API: _isApi,
|
|
96
|
-
GET_API: (module: EModules, apiName: string, method?: EActions | UN, cacheCode?: string | UN, cacheLifetime?: number | UN, bodyType?: EBody | UN, parameters?: any | UN): IGetApiInformations => {
|
|
97
|
-
return {
|
|
98
|
-
module: module,
|
|
99
|
-
apiName: apiName,
|
|
100
|
-
method: method ?? EActions.Get,
|
|
101
|
-
cacheCode: cacheCode,
|
|
102
|
-
cacheLifetime: cacheLifetime,
|
|
103
|
-
bodyType: bodyType,
|
|
104
|
-
parameters: parameters,
|
|
105
|
-
} as IGetApiInformations;
|
|
106
|
-
},
|
|
107
|
-
IS_GET_API: (apiInformations: any | IApiInformations): boolean => {
|
|
108
|
-
if (!_isApi(apiInformations)) return false;
|
|
109
|
-
const keys = Object.keys(apiInformations);
|
|
110
|
-
return GET_API_KEYS.every((key) => keys.includes(key));
|
|
111
|
-
},
|
|
112
|
-
BUILD_API: (apiInformations: IApiInformations, parameters?: any | UN) => {
|
|
113
|
-
const isProxyServer = NEXUS_INFO.IS_PROXY_SERVER;
|
|
114
|
-
if (isProxyServer) return BuildProxyApiUrl(apiInformations.module, apiInformations.apiName);
|
|
115
|
-
return `${GetRootApi(apiInformations.module)}/${apiInformations.apiName}`;
|
|
116
|
-
},
|
|
117
|
-
};
|
|
118
|
-
export const BuildProxyApiUrl = (module: EModules, relativePath: string, query?: string): string => {
|
|
119
|
-
const normalizedPath = relativePath.replace(/^\/+/, "");
|
|
120
|
-
if (module === EModules.None) return `/api/${normalizedPath}`;
|
|
121
|
-
const base = `${PROXY_PUBLIC_BASE_PATH}/${module}/${normalizedPath}`;
|
|
122
|
-
|
|
123
|
-
if (!query) {
|
|
124
|
-
return base;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
const normalizedQuery = query.replace(/^\?+/, "");
|
|
128
|
-
return normalizedQuery ? `${base}?${normalizedQuery}` : base;
|
|
129
|
-
};
|
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
import { ESizes } from "./layout-interfaces";
|
|
2
|
-
|
|
3
|
-
export const DEFAULT_ICON_ELEMENT_NAME = "ion-icon";
|
|
4
|
-
export const DEFAULT_SMALL_ICON_BOX_SIZE = 1 / 1.25;
|
|
5
|
-
export const DEFAULT_ICON_SIZE = ESizes.VerySmall;
|
|
6
|
-
export enum EIconTypes {
|
|
7
|
-
OUTLINED = "-outline",
|
|
8
|
-
SHARP = "-sharp",
|
|
9
|
-
FILLED = "",
|
|
10
|
-
}
|
|
11
|
-
export enum EIcons {
|
|
12
|
-
COPYRIGHT = "copyright",
|
|
13
|
-
WOMAN = "woman",
|
|
14
|
-
MAN = "man",
|
|
15
|
-
AT = "at",
|
|
16
|
-
BRIEFCASE = "briefcase",
|
|
17
|
-
LOCK_CLOSED = "lock-closed",
|
|
18
|
-
BOOKMARK = "bookmark",
|
|
19
|
-
CODE_WORKING = "code-working",
|
|
20
|
-
BOOKMARKS = "bookmarks",
|
|
21
|
-
READER = "reader",
|
|
22
|
-
SHARE_SOCIAL = "share-social",
|
|
23
|
-
ALERT_CIRCLE = "alert-circle",
|
|
24
|
-
SEND = "send",
|
|
25
|
-
FOOTBALL = "football",
|
|
26
|
-
BALLOON = "balloon",
|
|
27
|
-
SCHOOL = "school",
|
|
28
|
-
WALK = "walk",
|
|
29
|
-
GAME_CONTROLLER = "game-controller",
|
|
30
|
-
WATER = "water",
|
|
31
|
-
NOTIFICATIONS = "notifications",
|
|
32
|
-
LANGUAGE = "language",
|
|
33
|
-
CUBE = "cube",
|
|
34
|
-
FLAME = "flame",
|
|
35
|
-
BED = "bed",
|
|
36
|
-
DOCUMENT = "document",
|
|
37
|
-
START = "star",
|
|
38
|
-
CALENDAR = "calendar",
|
|
39
|
-
START_HALF = "star-half",
|
|
40
|
-
PEOPLE = "people",
|
|
41
|
-
MEGAPHONE = "megaphone",
|
|
42
|
-
SETTINGS = "settings",
|
|
43
|
-
PERSON_ADD = "person-add",
|
|
44
|
-
ANALYTICS = "analytics",
|
|
45
|
-
HOURGLASS = "hourglass",
|
|
46
|
-
STATS_CHART = "stats-chart",
|
|
47
|
-
GRID = "grid",
|
|
48
|
-
HEART = "heart",
|
|
49
|
-
CART = "cart",
|
|
50
|
-
REPEAT = "repeat",
|
|
51
|
-
HOME = "home",
|
|
52
|
-
WALLET = "wallet",
|
|
53
|
-
RELOAD = "reload",
|
|
54
|
-
CASH = "cash",
|
|
55
|
-
IMAGES = "images",
|
|
56
|
-
IMAGE = "image",
|
|
57
|
-
LOCK_OPEN = "lock-open",
|
|
58
|
-
CHATBOT_ELLIPSES = "chatbox-ellipses",
|
|
59
|
-
LOCATION = "location",
|
|
60
|
-
BUSINESS = "business",
|
|
61
|
-
CONSTRUCT = "construct",
|
|
62
|
-
CALENDER_NUMBER = "calendar-number",
|
|
63
|
-
HEART_CIRCLE = "heart-circle",
|
|
64
|
-
PERSON = "person",
|
|
65
|
-
CALL = "call",
|
|
66
|
-
FLAG = "flag",
|
|
67
|
-
TRANSGENDER = "transgender",
|
|
68
|
-
CARD = "card",
|
|
69
|
-
ID_CARD = "id-card",
|
|
70
|
-
MAIL = "mail",
|
|
71
|
-
MAIL_UNREAD = "mail-unread",
|
|
72
|
-
KEY = "key",
|
|
73
|
-
CREATE = "create",
|
|
74
|
-
MENU = "menu",
|
|
75
|
-
ARCHIVE = "archive",
|
|
76
|
-
ELLIPSIS_HORIZONTAL = "ellipsis-horizontal",
|
|
77
|
-
CHEVRON_DOWN = "chevron-down",
|
|
78
|
-
ARROW_FORWARD = "arrow-forward",
|
|
79
|
-
CHECKMARK_DOUBLE = "checkmark-done",
|
|
80
|
-
CLOSE = "close",
|
|
81
|
-
WARNING = "warning",
|
|
82
|
-
INFORMATION = "information",
|
|
83
|
-
HELP = "help",
|
|
84
|
-
HELP_CIRCLE = "help-circle",
|
|
85
|
-
TRASH_BIN = "trash-bin",
|
|
86
|
-
CLOUD_DOWNLOAD = "cloud-download",
|
|
87
|
-
CLOUD_UPLOAD = "cloud-upload",
|
|
88
|
-
EXIT = "exit",
|
|
89
|
-
CAMERA = "camera",
|
|
90
|
-
SUNNY = "sunny",
|
|
91
|
-
MOON = "moon",
|
|
92
|
-
COLOR_PALETTE = "color-palette",
|
|
93
|
-
RESIZE = "resize",
|
|
94
|
-
EXPAND = "expand",
|
|
95
|
-
REMOVE = "remove",
|
|
96
|
-
EYE = "eye",
|
|
97
|
-
OPTIONS = "options",
|
|
98
|
-
SEARCH = "search",
|
|
99
|
-
LIST = "list",
|
|
100
|
-
TRASH = "trash",
|
|
101
|
-
ADD = "add",
|
|
102
|
-
ADD_CIRCLE = "add-circle",
|
|
103
|
-
CARET_DOWN = "caret-down",
|
|
104
|
-
CARET_UP = "caret-up",
|
|
105
|
-
FUNNEL = "funnel",
|
|
106
|
-
BARBELL = "barbell",
|
|
107
|
-
DESKTOP = "desktop",
|
|
108
|
-
BUILD = "build",
|
|
109
|
-
BULB = "bulb",
|
|
110
|
-
NEWSPAPER = "newspaper",
|
|
111
|
-
CODE_SLASH = "code-slash",
|
|
112
|
-
GLOBE = "globe",
|
|
113
|
-
LEAF = "leaf",
|
|
114
|
-
REFRESH = "refresh",
|
|
115
|
-
LOGIN = "log-in",
|
|
116
|
-
SAVE = "save",
|
|
117
|
-
STOREFRONT = "storefront",
|
|
118
|
-
TEXT = "text",
|
|
119
|
-
|
|
120
|
-
LOGO_GOOGLE = "logo-google",
|
|
121
|
-
LOGO_FACEBOOK = "logo-facebook",
|
|
122
|
-
LOGO_INSTAGRAM = "logo-instagram",
|
|
123
|
-
LOGO_TIKTOK = "logo-tiktok",
|
|
124
|
-
LOGO_LINKEDIN = "logo-linkedin",
|
|
125
|
-
LOGO_GITHUB = "logo-github",
|
|
126
|
-
LOGO_TWITTER = "logo-twitter",
|
|
127
|
-
LOGO_WHATSAPP = "logo-whatsapp",
|
|
128
|
-
LOGO_YOUTUBE = "logo-youtube",
|
|
129
|
-
}
|
|
@@ -1,410 +0,0 @@
|
|
|
1
|
-
import { EButtonTypes, ETargets } from "./button-interfaces";
|
|
2
|
-
import { DatasourceTypes } from "./datasource-interfaces";
|
|
3
|
-
import { IColumn } from "./datatable-interfaces";
|
|
4
|
-
import { EActions, IApiInformations, IErrorRespose, ISuccessResponse } from "./http-interfaces";
|
|
5
|
-
import { EIcons, EIconTypes } from "./icon-interfaces";
|
|
6
|
-
import { EFlexPositions, EOpacity, ESizes } from "./layout-interfaces";
|
|
7
|
-
import { EBackgrounds } from "./theme-interfaces";
|
|
8
|
-
import { ClickHandler, IInterface, UN } from "./type-interfaces";
|
|
9
|
-
|
|
10
|
-
export type OnInputChangeHandler<T> = (currentValue: T, isInitilizing: boolean, isForcedChanged: boolean, isDisposed: boolean, inputKey: string, dataSource?: any | any[]) => void;
|
|
11
|
-
export type OnElementLoad = (inputBox: HTMLElement | null, inputWrapper: HTMLElement | null, isInitilizing: boolean, isForcedChanged: boolean, isDisposed: boolean, currentKey: string, index: number) => void;
|
|
12
|
-
export type AutoCompletes = "on" | "off";
|
|
13
|
-
export type ForceChangeDefaultValue<T> = (defaultValue: T, type?: EValueChangeTypes, invokeOnChanged?: boolean | UN) => boolean;
|
|
14
|
-
export type OnFormChangeHandler = (currentValue: any, isInitilizing: boolean, isForcedChanged: boolean, isDisposed: boolean, currentKey: string, index: number, type?: EValueChangeTypes, dataSource?: any | any[]) => void;
|
|
15
|
-
export type OnFormSubmitHandler = (currentValue: any, isValidForm: boolean, event: Event, form: IFormCreateResults, defaultValue: any | UN) => void;
|
|
16
|
-
export type OnApiFormSubmitHandler = (currentValue: any, apiResponse: ISuccessResponse | IErrorRespose, formResults: ISubmitFormCreateResults, defaultValue: any | UN) => void;
|
|
17
|
-
export type OverrideValidation = (currentValue: any, isValidForm: boolean, formReference: IFormCreateResults | null, action?: EActions | UN) => boolean;
|
|
18
|
-
export type RegexTypes = ERegexs | string[] | UN;
|
|
19
|
-
|
|
20
|
-
export const DEFAULT_INPUT_BACKGROUND = EBackgrounds.Background1;
|
|
21
|
-
export const MAX_INPUT_TYPE = 1900;
|
|
22
|
-
export const DEFAULT_INPUT_BORDER_SIZE = 1;
|
|
23
|
-
export const DEFAULT_TEXTAREA_ROWS = 3;
|
|
24
|
-
export const DEFAULT_ROW_GAP = 3;
|
|
25
|
-
|
|
26
|
-
export const REQUIRED_TEXT1 = "✲";
|
|
27
|
-
|
|
28
|
-
export enum EValueChangeTypes {
|
|
29
|
-
Default = 0,
|
|
30
|
-
ForceChanged = 1,
|
|
31
|
-
FormCleared = 2,
|
|
32
|
-
FormReset = 3,
|
|
33
|
-
Disposed = 4,
|
|
34
|
-
}
|
|
35
|
-
export enum ERegexs {
|
|
36
|
-
Fullname = "^[A-Za-z]+(?: [A-Za-z]+)*[0-9]?$",
|
|
37
|
-
Email = "^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$",
|
|
38
|
-
/** Allow Null */
|
|
39
|
-
Email_NULL = "^$|^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+.[a-zA-Z]{2,}$",
|
|
40
|
-
EmailUsername = "^(?=.*[a-zA-Z0-9])[a-zA-Z0-9]+@[a-zA-Z0-9]+\\.[a-zA-Z]{2,}$|[a-zA-Z0-9]{8,100}$",
|
|
41
|
-
Password = "^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[!@#$%^&*()_+{}|:,.<>?/~]).{8,30}$",
|
|
42
|
-
Hexadecimal = "^[0-9A-Fa-f]{8}$",
|
|
43
|
-
ContactEmail = "^(?:[0-9]{10}|[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,})$",
|
|
44
|
-
|
|
45
|
-
/** Allow Null */
|
|
46
|
-
ContactNumber_NULL = "^$|^[0-9]{10}$",
|
|
47
|
-
|
|
48
|
-
ContactNumber = "^[0-9]{10}$",
|
|
49
|
-
Username = "^(?!.*[._-]{2})[a-zA-Z0-9]+(?:[._-][a-zA-Z0-9]+)*$",
|
|
50
|
-
EmailUsernameMobile = "^(?:[0-9]{10}|(?!.*[._-]{2})[a-zA-Z0-9]+(?:[._-][a-zA-Z0-9]+)*|[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[A-Za-z]{2,})$",
|
|
51
|
-
}
|
|
52
|
-
export enum EInputTypes {
|
|
53
|
-
Textbox = 1,
|
|
54
|
-
Textarea = 5,
|
|
55
|
-
Texteditor = 10,
|
|
56
|
-
Timepicker = 15,
|
|
57
|
-
Datepicker = 20,
|
|
58
|
-
Datetimepicker = 25,
|
|
59
|
-
DateRangepicker = 30,
|
|
60
|
-
DatetimeRangepicker = 35,
|
|
61
|
-
SingleSelection = 40,
|
|
62
|
-
MultiSelection = 45,
|
|
63
|
-
Checkbox = 50,
|
|
64
|
-
Radiobox = 55,
|
|
65
|
-
Radiogroup = 60,
|
|
66
|
-
Number = 65,
|
|
67
|
-
TabularForm = 70,
|
|
68
|
-
InputForm = 75,
|
|
69
|
-
Range = 80,
|
|
70
|
-
Slider = 85,
|
|
71
|
-
LinkButton = 2000,
|
|
72
|
-
HtmlElement = 3000,
|
|
73
|
-
FormTitle = 4000,
|
|
74
|
-
SubmitButton = 5000,
|
|
75
|
-
}
|
|
76
|
-
export interface IInputIcon {
|
|
77
|
-
icon: EIcons;
|
|
78
|
-
iconSize?: ESizes | UN;
|
|
79
|
-
boxSize?: ESizes | UN;
|
|
80
|
-
opacity?: EOpacity | UN;
|
|
81
|
-
type?: EIconTypes | UN;
|
|
82
|
-
background?: EBackgrounds | UN;
|
|
83
|
-
onClicked?: ClickHandler | UN;
|
|
84
|
-
onMouseEnter?: ClickHandler | UN;
|
|
85
|
-
}
|
|
86
|
-
export interface IInputRootParameters<T> extends IInterface {
|
|
87
|
-
id: string;
|
|
88
|
-
inputType: EInputTypes;
|
|
89
|
-
columnSize: number;
|
|
90
|
-
displayOrder: number;
|
|
91
|
-
borderSize: number;
|
|
92
|
-
background?: EBackgrounds | UN;
|
|
93
|
-
inputSize?: ESizes | UN;
|
|
94
|
-
defaultClass?: string | UN;
|
|
95
|
-
autoAdjustColumn?: boolean | UN;
|
|
96
|
-
icon?: IInputIcon | UN;
|
|
97
|
-
parentKey?: string;
|
|
98
|
-
defaultValue?: T | UN;
|
|
99
|
-
onChanged?: OnInputChangeHandler<T> | UN;
|
|
100
|
-
placeholder?: string | UN;
|
|
101
|
-
label?: string | UN;
|
|
102
|
-
}
|
|
103
|
-
export interface IInputBaseParameters<T> extends IInputRootParameters<T> {
|
|
104
|
-
validatorKey?: string | UN;
|
|
105
|
-
isRequired: boolean;
|
|
106
|
-
autoComplete?: AutoCompletes | UN;
|
|
107
|
-
isReadonly?: boolean | UN;
|
|
108
|
-
}
|
|
109
|
-
export interface IElement extends IInputRootParameters<void> {
|
|
110
|
-
onLoad?: OnElementLoad | UN;
|
|
111
|
-
}
|
|
112
|
-
export interface IInputParameters<T> extends IInputBaseParameters<T> {
|
|
113
|
-
minLength?: number | UN;
|
|
114
|
-
maxLength?: number | UN;
|
|
115
|
-
}
|
|
116
|
-
export interface ILinkbutton extends IElement {
|
|
117
|
-
href: string;
|
|
118
|
-
onClicked?: ClickHandler | UN;
|
|
119
|
-
borderBottom?: boolean | UN;
|
|
120
|
-
opacity?: EOpacity | UN;
|
|
121
|
-
position?: EFlexPositions | UN;
|
|
122
|
-
target?: ETargets | UN;
|
|
123
|
-
}
|
|
124
|
-
export interface ISubmitbutton extends IElement {
|
|
125
|
-
onClicked?: ClickHandler | UN;
|
|
126
|
-
type?: EButtonTypes | UN;
|
|
127
|
-
}
|
|
128
|
-
export interface ITextbox extends IInputParameters<string | null> {
|
|
129
|
-
isPassword?: boolean | UN;
|
|
130
|
-
regexKey?: RegexTypes | UN;
|
|
131
|
-
}
|
|
132
|
-
export interface ISlider extends IInputParameters<number | null> {
|
|
133
|
-
step?: number | UN;
|
|
134
|
-
showTitleOnTop?: boolean | UN;
|
|
135
|
-
}
|
|
136
|
-
export interface ICheckbox extends IInputBaseParameters<boolean | any> {
|
|
137
|
-
checkedValue?: any | UN;
|
|
138
|
-
groupId?: string | UN;
|
|
139
|
-
}
|
|
140
|
-
export interface IRadiobox extends ICheckbox {}
|
|
141
|
-
export interface ITextarea extends IInputParameters<string | null> {
|
|
142
|
-
isShowPreview?: boolean | UN;
|
|
143
|
-
rows?: number | UN;
|
|
144
|
-
regexKey?: RegexTypes | UN;
|
|
145
|
-
}
|
|
146
|
-
export interface INumber extends IInputParameters<number | null> {
|
|
147
|
-
floatingPoint?: number | UN;
|
|
148
|
-
isAutoAdjust?: boolean | UN;
|
|
149
|
-
step?: number | string | UN;
|
|
150
|
-
}
|
|
151
|
-
export interface IDate extends IInputBaseParameters<string | Date | null> {
|
|
152
|
-
minDate?: Date | string | UN;
|
|
153
|
-
maxDate?: Date | string | UN;
|
|
154
|
-
}
|
|
155
|
-
export interface ISelection extends IInputBaseParameters<any | any[] | null> {
|
|
156
|
-
isSearchable: boolean | UN;
|
|
157
|
-
valueKey: string | UN;
|
|
158
|
-
labelKey: string | UN;
|
|
159
|
-
selectedLabel?: string | UN;
|
|
160
|
-
columnName?: string | UN;
|
|
161
|
-
dataSource: DatasourceTypes | UN;
|
|
162
|
-
onSelectionChanged?: OnInputChangeHandler<any | any[] | null> | UN;
|
|
163
|
-
columns?: IColumn[] | UN;
|
|
164
|
-
minDialogWidth?: number | UN;
|
|
165
|
-
bitwiseEnum?: any | UN;
|
|
166
|
-
}
|
|
167
|
-
export interface ITablularForm extends IInputParameters<any[]> {
|
|
168
|
-
inputs: IInputRootParameters<any>[];
|
|
169
|
-
disabledAdd?: boolean | UN;
|
|
170
|
-
disabledRemove?: boolean | UN;
|
|
171
|
-
}
|
|
172
|
-
export interface IInputCreateResults {
|
|
173
|
-
input: IInputRootParameters<any>;
|
|
174
|
-
/** This is input element like: textbox, textarea, checkbox */
|
|
175
|
-
inputElement: HTMLElement;
|
|
176
|
-
/** input element base parent like: formGroup/formWrapper */
|
|
177
|
-
rootElement: HTMLElement;
|
|
178
|
-
forceChangeDefaultValue: ForceChangeDefaultValue<any> | null;
|
|
179
|
-
dispose: (invokeOnChanged?: boolean | UN) => void;
|
|
180
|
-
onParentChanged?: OnFormChangeHandler | UN;
|
|
181
|
-
}
|
|
182
|
-
export interface IForm {
|
|
183
|
-
inputs: IInputRootParameters<any>[];
|
|
184
|
-
onChanged: OnFormChangeHandler;
|
|
185
|
-
index: number;
|
|
186
|
-
isTabularForm: boolean;
|
|
187
|
-
defaultValue?: any | UN;
|
|
188
|
-
}
|
|
189
|
-
export interface ISubmitForm {
|
|
190
|
-
inputs: IInputRootParameters<any>[];
|
|
191
|
-
onChanged: OnFormChangeHandler | UN;
|
|
192
|
-
defaultValue?: DatasourceTypes | UN;
|
|
193
|
-
onSubmit: OnFormSubmitHandler;
|
|
194
|
-
onCancelClick?: ClickHandler | UN;
|
|
195
|
-
overrideValidation?: OverrideValidation | UN;
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
export interface IApiForm {
|
|
199
|
-
inputs: IInputRootParameters<any>[];
|
|
200
|
-
api: IApiInformations;
|
|
201
|
-
onApiSubmit: OnApiFormSubmitHandler;
|
|
202
|
-
onChanged: OnFormChangeHandler | UN;
|
|
203
|
-
onSubmit: OnFormSubmitHandler | UN;
|
|
204
|
-
defaultValue?: DatasourceTypes | UN;
|
|
205
|
-
onCancelClick?: ClickHandler | UN;
|
|
206
|
-
overrideValidation?: OverrideValidation | UN;
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
export interface IFormCreateResults {
|
|
210
|
-
inputResults: IInputCreateResults[];
|
|
211
|
-
formElement: HTMLElement;
|
|
212
|
-
dispose: (invokeOnChanged?: boolean) => void;
|
|
213
|
-
forceChangeDefaultValue: ForceChangeDefaultValue<any> | null;
|
|
214
|
-
}
|
|
215
|
-
export interface ISubmitFormCreateResults {
|
|
216
|
-
formElement: HTMLElement;
|
|
217
|
-
dispose: () => void;
|
|
218
|
-
formObject: IFormCreateResults;
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
export const GetForms = {
|
|
222
|
-
FORM: (inputs: IInputRootParameters<any>[], onChanged: OnFormChangeHandler, defaultValue?: any | UN, index?: number | UN, isTabularForm?: boolean | UN): IForm => ({ inputs, onChanged, index: index ?? 0, isTabularForm: isTabularForm ?? false, defaultValue }),
|
|
223
|
-
SUBMITFORM: (inputs: IInputRootParameters<any>[], onSubmit: OnFormSubmitHandler, defaultValue?: DatasourceTypes | UN, overrideValidation?: OverrideValidation | UN, onChanged?: OnFormChangeHandler | UN, onCancelClick?: ClickHandler | UN): ISubmitForm => ({
|
|
224
|
-
inputs,
|
|
225
|
-
onChanged,
|
|
226
|
-
defaultValue,
|
|
227
|
-
onSubmit,
|
|
228
|
-
onCancelClick,
|
|
229
|
-
overrideValidation,
|
|
230
|
-
}),
|
|
231
|
-
APIFORM: (inputs: IInputRootParameters<any>[], api: IApiInformations, onApiSubmit: OnApiFormSubmitHandler, defaultValue?: DatasourceTypes | UN, onSubmit?: OnFormSubmitHandler | UN, overrideValidation?: OverrideValidation | UN, onCancelClick?: ClickHandler | UN, onChanged?: OnFormChangeHandler | UN): IApiForm => ({
|
|
232
|
-
inputs,
|
|
233
|
-
api,
|
|
234
|
-
onApiSubmit,
|
|
235
|
-
onChanged,
|
|
236
|
-
defaultValue,
|
|
237
|
-
onSubmit,
|
|
238
|
-
onCancelClick,
|
|
239
|
-
overrideValidation,
|
|
240
|
-
}),
|
|
241
|
-
};
|
|
242
|
-
export const GetInputs = {
|
|
243
|
-
ICON: (icon: EIcons, iconSize?: ESizes | UN, boxSize?: ESizes | UN, opacity?: EOpacity | UN, type?: EIconTypes | UN, background?: EBackgrounds | UN, onClicked?: ClickHandler | UN, onMouseEnter?: ClickHandler | UN): IInputIcon => ({
|
|
244
|
-
icon: icon,
|
|
245
|
-
iconSize: iconSize,
|
|
246
|
-
boxSize: boxSize,
|
|
247
|
-
opacity: opacity,
|
|
248
|
-
type: type,
|
|
249
|
-
background: background,
|
|
250
|
-
onClicked: onClicked,
|
|
251
|
-
onMouseEnter: onMouseEnter,
|
|
252
|
-
}),
|
|
253
|
-
TEXTBOX: (id: string, columnSize: number, displayOrder: number, label?: string | UN, placeholder?: string | UN, validatorKey?: string | UN, minLength?: number | UN, maxLength?: number | UN, regexKey?: RegexTypes | UN, isPassword?: boolean | UN, isReadonly?: boolean | UN, isAutoComplete?: boolean | UN, defaultValue?: string | UN, background?: EBackgrounds | UN, borderSize?: number | UN, inputSize?: ESizes | UN, icon?: IInputIcon | UN, defaultClass?: string | UN, onChanged?: OnInputChangeHandler<string | null> | UN): ITextbox => ({
|
|
254
|
-
id: id,
|
|
255
|
-
columnSize: columnSize,
|
|
256
|
-
displayOrder: displayOrder,
|
|
257
|
-
label: label,
|
|
258
|
-
placeholder: placeholder,
|
|
259
|
-
validatorKey: validatorKey,
|
|
260
|
-
minLength: minLength,
|
|
261
|
-
maxLength: maxLength,
|
|
262
|
-
regexKey: regexKey,
|
|
263
|
-
defaultValue: defaultValue,
|
|
264
|
-
background: background,
|
|
265
|
-
borderSize: borderSize ?? DEFAULT_INPUT_BORDER_SIZE,
|
|
266
|
-
inputSize: inputSize,
|
|
267
|
-
isPassword: isPassword,
|
|
268
|
-
icon: icon,
|
|
269
|
-
isReadonly: isReadonly,
|
|
270
|
-
defaultClass: defaultClass,
|
|
271
|
-
onChanged: onChanged,
|
|
272
|
-
isRequired: (minLength !== undefined && minLength !== null && minLength > 0) ?? false,
|
|
273
|
-
inputType: EInputTypes.Textbox,
|
|
274
|
-
autoComplete: isAutoComplete !== false ? undefined : "off",
|
|
275
|
-
}),
|
|
276
|
-
TEXTAREA: (id: string, columnSize: number, displayOrder: number, label?: string | UN, placeholder?: string | UN, validatorKey?: string | UN, minLength?: number | UN, maxLength?: number | UN, rows?: number | UN, isShowPreview?: boolean | UN, defaultValue?: string | UN, regexKey?: RegexTypes | UN, isReadonly?: boolean | UN, isAutoComplete?: boolean | UN, background?: EBackgrounds | UN, borderSize?: number | UN, inputSize?: ESizes | UN, icon?: IInputIcon | UN, defaultClass?: string | UN, onChanged?: OnInputChangeHandler<string | null> | UN): ITextarea => ({
|
|
277
|
-
id: id,
|
|
278
|
-
columnSize: columnSize,
|
|
279
|
-
displayOrder: displayOrder,
|
|
280
|
-
label: label,
|
|
281
|
-
placeholder: placeholder,
|
|
282
|
-
validatorKey: validatorKey,
|
|
283
|
-
minLength: minLength,
|
|
284
|
-
maxLength: maxLength,
|
|
285
|
-
isShowPreview: isShowPreview,
|
|
286
|
-
rows: rows ?? DEFAULT_TEXTAREA_ROWS,
|
|
287
|
-
regexKey: regexKey,
|
|
288
|
-
defaultValue: defaultValue,
|
|
289
|
-
background: background,
|
|
290
|
-
borderSize: borderSize ?? DEFAULT_INPUT_BORDER_SIZE,
|
|
291
|
-
inputSize: inputSize,
|
|
292
|
-
icon: icon,
|
|
293
|
-
isReadonly: isReadonly,
|
|
294
|
-
defaultClass: defaultClass,
|
|
295
|
-
onChanged: onChanged,
|
|
296
|
-
isRequired: (minLength !== undefined && minLength !== null && minLength > 0) ?? false,
|
|
297
|
-
inputType: EInputTypes.Textarea,
|
|
298
|
-
autoComplete: isAutoComplete !== false ? undefined : "off",
|
|
299
|
-
}),
|
|
300
|
-
NUMBER: (id: string, columnSize: number, displayOrder: number, label?: string | UN, placeholder?: string | UN, validatorKey?: string | UN, floatingPoint?: number | UN, isAutoAdjust?: boolean | UN, step?: number | string | UN, minLength?: number | UN, maxLength?: number | UN, defaultValue?: number | UN, isAutoComplete?: boolean | UN, background?: EBackgrounds | UN, borderSize?: number | UN, inputSize?: ESizes | UN, icon?: IInputIcon | UN, isReadonly?: boolean | UN, defaultClass?: string | UN, onChanged?: OnInputChangeHandler<number | null> | UN): INumber => ({
|
|
301
|
-
id: id,
|
|
302
|
-
columnSize: columnSize,
|
|
303
|
-
displayOrder: displayOrder,
|
|
304
|
-
label: label,
|
|
305
|
-
placeholder: placeholder,
|
|
306
|
-
validatorKey: validatorKey,
|
|
307
|
-
minLength: minLength,
|
|
308
|
-
maxLength: maxLength,
|
|
309
|
-
floatingPoint: floatingPoint,
|
|
310
|
-
isAutoAdjust: isAutoAdjust,
|
|
311
|
-
step: step,
|
|
312
|
-
defaultValue: defaultValue,
|
|
313
|
-
background: background,
|
|
314
|
-
borderSize: borderSize ?? DEFAULT_INPUT_BORDER_SIZE,
|
|
315
|
-
inputSize: inputSize,
|
|
316
|
-
icon: icon,
|
|
317
|
-
isReadonly: isReadonly,
|
|
318
|
-
defaultClass: defaultClass,
|
|
319
|
-
onChanged: onChanged,
|
|
320
|
-
isRequired: (minLength !== undefined && minLength !== null && minLength > 0) ?? false,
|
|
321
|
-
inputType: EInputTypes.Number,
|
|
322
|
-
autoComplete: isAutoComplete !== false ? undefined : "off",
|
|
323
|
-
}),
|
|
324
|
-
|
|
325
|
-
CHECKBOX: (id: string, columnSize: number, displayOrder: number, label?: string | UN, defaultValue?: boolean | UN, groupId?: string | UN, checkedValue?: any | UN, isAutoComplete?: boolean | UN, background?: EBackgrounds | UN, borderSize?: number | UN, inputSize?: ESizes | UN, icon?: IInputIcon | UN, isRequired?: boolean | UN, isReadonly?: boolean | UN, defaultClass?: string | UN, onChanged?: OnInputChangeHandler<boolean | any | null> | UN): ICheckbox => ({
|
|
326
|
-
id: id,
|
|
327
|
-
columnSize: columnSize,
|
|
328
|
-
displayOrder: displayOrder,
|
|
329
|
-
label: label,
|
|
330
|
-
defaultValue: defaultValue,
|
|
331
|
-
groupId: groupId,
|
|
332
|
-
checkedValue: checkedValue,
|
|
333
|
-
background: background,
|
|
334
|
-
borderSize: borderSize ?? 0,
|
|
335
|
-
inputSize: inputSize,
|
|
336
|
-
icon: icon,
|
|
337
|
-
isReadonly: isReadonly,
|
|
338
|
-
defaultClass: defaultClass,
|
|
339
|
-
onChanged: onChanged,
|
|
340
|
-
isRequired: isRequired ?? false,
|
|
341
|
-
inputType: EInputTypes.Checkbox,
|
|
342
|
-
autoComplete: isAutoComplete !== false ? undefined : "off",
|
|
343
|
-
}),
|
|
344
|
-
RADIOBOX: (id: string, columnSize: number, displayOrder: number, label?: string | UN, defaultValue?: boolean | UN, groupId?: string | UN, checkedValue?: any | UN, isAutoComplete?: boolean | UN, background?: EBackgrounds | UN, borderSize?: number | UN, inputSize?: ESizes | UN, icon?: IInputIcon | UN, isRequired?: boolean | UN, isReadonly?: boolean | UN, defaultClass?: string | UN, onChanged?: OnInputChangeHandler<boolean | any | null> | UN): ICheckbox => ({
|
|
345
|
-
id: id,
|
|
346
|
-
columnSize: columnSize,
|
|
347
|
-
displayOrder: displayOrder,
|
|
348
|
-
label: label,
|
|
349
|
-
groupId: groupId,
|
|
350
|
-
checkedValue: checkedValue,
|
|
351
|
-
defaultValue: defaultValue,
|
|
352
|
-
background: background,
|
|
353
|
-
borderSize: borderSize ?? 0,
|
|
354
|
-
inputSize: inputSize,
|
|
355
|
-
icon: icon,
|
|
356
|
-
isReadonly: isReadonly,
|
|
357
|
-
defaultClass: defaultClass,
|
|
358
|
-
onChanged: onChanged,
|
|
359
|
-
isRequired: isRequired ?? false,
|
|
360
|
-
inputType: EInputTypes.Radiobox,
|
|
361
|
-
autoComplete: isAutoComplete !== false ? undefined : "off",
|
|
362
|
-
}),
|
|
363
|
-
LINKBUTTON: (id: string, columnSize: number, displayOrder: number, href: string, label?: string | UN, onClicked?: ClickHandler | UN, onLoad?: OnElementLoad | UN, borderBottom?: boolean | UN, opacity?: EOpacity | UN, position?: EFlexPositions | UN, target?: ETargets | UN, background?: EBackgrounds | UN, borderSize?: number | UN, inputSize?: ESizes | UN, defaultClass?: string | UN): ILinkbutton => ({
|
|
364
|
-
id: id,
|
|
365
|
-
columnSize: columnSize,
|
|
366
|
-
displayOrder: displayOrder,
|
|
367
|
-
href: href,
|
|
368
|
-
label: label,
|
|
369
|
-
onClicked: onClicked,
|
|
370
|
-
onLoad: onLoad,
|
|
371
|
-
borderBottom: borderBottom,
|
|
372
|
-
opacity: opacity,
|
|
373
|
-
position: position,
|
|
374
|
-
target: target,
|
|
375
|
-
background: background,
|
|
376
|
-
borderSize: borderSize ?? 0,
|
|
377
|
-
inputSize: inputSize,
|
|
378
|
-
defaultClass: defaultClass,
|
|
379
|
-
inputType: EInputTypes.LinkButton,
|
|
380
|
-
}),
|
|
381
|
-
BUTTON: (
|
|
382
|
-
//
|
|
383
|
-
id: string,
|
|
384
|
-
columnSize: number,
|
|
385
|
-
displayOrder: number,
|
|
386
|
-
label?: string | UN,
|
|
387
|
-
onClicked?: ClickHandler | UN,
|
|
388
|
-
type?: EButtonTypes | UN,
|
|
389
|
-
onLoad?: OnElementLoad | UN,
|
|
390
|
-
background?: EBackgrounds | UN,
|
|
391
|
-
borderSize?: number | UN,
|
|
392
|
-
inputSize?: ESizes | UN,
|
|
393
|
-
defaultClass?: string | UN,
|
|
394
|
-
icon?: IInputIcon | UN,
|
|
395
|
-
): ISubmitbutton => ({
|
|
396
|
-
id: id,
|
|
397
|
-
columnSize: columnSize,
|
|
398
|
-
displayOrder: displayOrder,
|
|
399
|
-
label: label,
|
|
400
|
-
type: type,
|
|
401
|
-
onClicked: onClicked,
|
|
402
|
-
onLoad: onLoad,
|
|
403
|
-
background: background ?? EBackgrounds.PrimaryColor,
|
|
404
|
-
borderSize: borderSize ?? DEFAULT_INPUT_BORDER_SIZE,
|
|
405
|
-
inputSize: inputSize,
|
|
406
|
-
defaultClass: defaultClass,
|
|
407
|
-
inputType: EInputTypes.SubmitButton,
|
|
408
|
-
icon: icon,
|
|
409
|
-
}),
|
|
410
|
-
};
|