DOCUMENTATION

DOCUMENTATION

  • Official Web Site

›General

Before We Start

  • What is Net Core Genesis
  • Prerequisites
  • Software Architecture
  • Future Vision

Getting Started

  • Release Notes
  • Direct Download as Boilerplate
  • Download AutoCode Solution Generator
  • Using AutoCode Solution Generator
  • Run Your Web Application
  • Tutorial

General

  • API Layer
  • Authentication & Authorization
  • Blockchain
  • Built-in UI Components
  • CLI Commands
  • Communication Middleware
  • Configuration
  • Data Access
  • Demo & Live Preview
  • Distributed Cache
  • Elastic Stack
  • Exception Handling
  • Folder Structures
  • Fundamentals
  • Genesis Database
  • Grid
  • JSON-Based UI Screen Rendering
  • Localization
  • Logging
  • Management Module
  • Microservice Architecture
  • Multi-Tenancy
  • Queuing & Message Broker
  • Adding New Page
  • Scheduler & Background Jobs
  • Workflow

FAQ

  • Security
  • Custom UI Pages
  • Backend Questions
  • UI Questions
  • Useful Documents

Server & System

  • Server Requirements
  • Server Setup & Deployment
  • Deploy on Web Server
  • DevOps & Dockerization
  • Performance & Scalability
  • CI/CD Management

Other

  • 3rd Party Licences
  • BaGet Server Installation

Built-in UI Components

src/common/typeConfig.ts -> enum ComponentType

ComponentDescriptionLibrary
FORM_CONTROL (Default)Text inputhttps://reactstrap.github.io/
TOGGLEOn/Off buttonhttps://www.npmjs.com/package/react-toggle
DATE_PICKERDate picker without time zonehttps://react-day-picker.js.org/
DATE_PICKER_TZDate picker with time zonehttps://react-day-picker.js.org/
TIME_PICKERTime picker with hour and minutehttp://react-component.github.io/time-picker/
DROPDOWNDropdown or Comboboxhttps://react-select.com/
DROPDOWN_ASYNCDropdown with online search capability as you typehttps://react-select.com/
NUMERIC_INPUTNumber inputhttps://www.npmjs.com/package/react-number-format
UPLOAD_CONTAINERMultiple file uploadhttps://reactjs.org/docs/uncontrolled-components.html#the-file-input-tag
COLOR_PICKERColor pickerhttps://casesandberg.github.io/react-color/
FILE_UPLOADERSingle file uploadhttps://reactjs.org/docs/uncontrolled-components.html#the-file-input-tag
MULTIPLE_SELECTMultiple selectable dropdownhttps://react-select.com/
MULTIPLE_SELECT_ASYNCMultiple selectable dropdown with online search capability as you typehttps://react-select.com/
PHONE_INPUTPhone input with country code selectablehttps://www.npmjs.com/package/react-intl-tel-input
EDITORHTML editorhttps://ckeditor.com/
TEXT_AREAText areahttps://reactstrap.github.io/
TAG_INPUTSpecial multiple addible text inputhttps://react-select.com/
LABELDisabled labelhttps://reactstrap.github.io/
BAR_CHARTBar charthttps://github.com/jerairrest/react-chartjs-2
LINE_CHARTLine charthttps://github.com/jerairrest/react-chartjs-2
PIE_CHARTPie charthttps://github.com/jerairrest/react-chartjs-2
JSON_VIEWJSON inputhttps://www.npmjs.com/package/react-json-view
RADIO_BUTTONRadio buttonhttps://reactstrap.github.io/
PROGRESS_BARProgress barhttps://reactstrap.github.io/components/progress/
MULTIPLE_PROGRESS_BARMultiple progress barhttps://reactstrap.github.io/components/progress/
TABLETable to use for 1-n relationshttps://www.ag-grid.com/

FORM_CONTROL

Property NameProperty TypeDescription
typestring = "text" / "password"type can be things like text, password, (typical input types) as well as select and textarea, providing children as you normally would to those.
sizestring = "xs" / "sm" / "md" / "lg" / "xl"
bsSizestring = "xs" / "sm" / "md" / "lg" / "xl"
tagfunction / string
innerRefstringref will only get you a reference to the Input component, use innerRef to get a reference to the DOM input (for things like focus management).
plaintextstring
addonstring
classNamestring
cssModulestring

TOGGLE

Property NameProperty TypeDescription
checkedbooleanIf true, the toggle is checked. If false, the toggle is unchecked. Use this if you want to treat the toggle as a controlled component
defaultCheckedbooleanIf true on initial render, the toggle is checked. If false on initial render, the toggle is unchecked. Use this if you want to treat the toggle as an uncontrolled component
onChangefunctionCallback function to invoke when the user clicks on the toggle. The function signature should be the following: function(e) { }. To get the current checked status from the event, use e.target.checked.
onFocusfunctionCallback function to invoke when field has focus. The function signature should be the following: function(e) { }
onBlurfunctionCallback function to invoke when field loses focus. The function signature should be the following: function(e) { }
namestringThe value of the name attribute of the wrapped <input> element
valuestringThe value of the value attribute of the wrapped <input> element
idstringThe value of the id attribute of the wrapped <input> element
iconsobjectIf false, no icons are displayed. You may also pass custom icon components in icons={{{checked: <CheckedIcon />, unchecked: <UncheckedIcon />}}
aria-labelledbystringThe value of the aria-labelledby attribute of the wrapped <input> element
aria-labelstringThe value of the aria-label attribute of the wrapped <input> element
disabledbooleanIf true, the toggle is disabled. If false, the toggle is enabled

DATE_PICKER / DATE_PICKER_TZ

Property NameProperty TypeDescription
classNamesobjectCustomize the CSS class names used when rendering the component.
clickUnselectsDayboolean = false
componentstring / React.Component = "input"
dayPickerPropsobject
formatstring / string[]ref will only get you a reference to the Input component, use innerRef to get a reference to the DOM input (for things like focus management).
formatDate(date: Date?, format: string? / string[]?, locale: string?) ⇒ string
hideOnDayClickboolean = true
inputPropsobject
keepFocusboolean = true
overlayComponentReact.Component
parseDate(str: string?, format: string? / string[]?, locale: string?) ⇒ Datevoid
placeholderstring
showOverlayboolean = false
styleobject
valuestring / Date
onDayChange(day: ?Date, modifiers: Object, dayPickerInput: DayPickerInput) ⇒ void
onDayPickerHide() ⇒ void
onDayPickerShow() ⇒ void

TIME_PICKER

NameTypeDefaultDescription
prefixClsString'rc-time-picker'prefixCls of this component
clearTextString'clear'clear tooltip of icon
disabledBooleanfalsewhether picker is disabled
allowEmptyBooleantrueallow clearing text
openBooleanfalsecurrent open state of picker. controlled prop
defaultValuemomentnulldefault initial value
defaultOpenValuemomentmoment()default open panel value, used to set utcOffset,locale if value/defaultValue absent
valuemomentnullcurrent value
placeholderString''time input's placeholder
classNameString''time picker className
idString''time picker id
popupClassNameString''time panel className
popupStyleobject{}customize popup style
showHourBooleantruewhether show hour
showMinuteBooleantruewhether show minute
showSecondBooleantruewhether show second
formatString-moment format
disabledHoursFunction-disabled hour options
disabledMinutesFunction-disabled minute options
disabledSecondsFunction-disabled second options
use12HoursBooleanfalse12 hours display mode
hideDisabledOptionsBooleanfalsewhether hide disabled options
onChangeFunctionnullcalled when select a different value
onAmPmChangeFunctionnullcalled when select an am/pm value
addonFunction-called from timepicker panel to render some addon to its bottom, like an OK button. Receives panel instance as parameter, to be able to close it like panel.close()
placementStringbottomLeftone of ['topLeft', 'topRight', 'bottomLeft', 'bottomRight']
transitionNameString''
nameString-sets the name of the generated input
onOpenFunction({ open })when TimePicker panel is opened
onCloseFunction({ open })when TimePicker panel is closed
hourStepNumber1interval between hours in picker
minuteStepNumber1interval between minutes in picker
secondStepNumber1interval between seconds in picker
focusOnOpenBooleanfalseautomatically focus the input when the picker opens
inputReadOnlyBooleanfalseset input to read only
inputIconReactNodespecific the select icon
clearIconReactNodespecific the clear icon

DROPDOWN / DROPDOWN_ASYNC / MULTIPLE_SELECT / MULTIPLE_SELECT_ASYNC / TAG_INPUT

These are too comprehensive components to write down in a limited area. Please visit https://react-select.com/props for prop details.

NUMERIC_INPUT

PropsOptionsDefaultDescription
thousandSeparatormixed: single character string or boolean true (true is default to ,)noneAdd thousand separators on number
decimalSeparatorsingle character string.Support decimal point on a number
thousandsGroupStyleOne of ['thousand', 'lakh', 'wan']thousandDefine the thousand grouping style, It support three types. thousand style (thousand) : 123,456,789, indian style (lakh) : 12,34,56,789, chinese style (wan) : 1,2345,6789
decimalScalenumbernoneIf defined it limits to given decimal scale
fixedDecimalScalebooleanfalseIf true it add 0s to match given decimalScale
allowNegativebooleantrueallow negative numbers (Only when format option is not provided)
allowEmptyFormattingbooleantrueApply formatting to empty inputs
allowLeadingZerosbooleanfalseAllow leading zeros at beginning of number
prefixString (ex : $)noneAdd a prefix before the number
suffixString (ex : /-)noneAdd a suffix after the number
valueNumber or StringnullValue to the number format. It can be a float number, or formatted string. If value is string representation of number (unformatted), isNumericString props should be passed as true.
defaultValueNumber or StringnullValue to the used as default value if value is not provided. The format of defaultValue should be similar as defined for the value.
isNumericStringbooleanfalseIf value is passed as string representation of numbers (unformatted) then this should be passed as true
displayTypeString: text / inputinputIf input it renders a input element where formatting happens as you input characters. If text it renders it as a normal text in a span formatting the given value
typeOne of ['text', 'tel', 'password']textInput type attribute
formatString : Hash based ex (#### #### #### ####)
Or Function
noneIf format given as hash string allow number input inplace of hash. If format given as function, component calls the function with unformatted number and expects formatted number.
removeFormatting(formattedValue) => numericStringnoneIf you are providing custom format method and it add numbers as format you will need to add custom removeFormatting logic
maskString (ex : _)' 'If mask defined, component will show non entered placed with masked value.
customInputComponent ReferenceinputThis allow supporting custom inputs with number format.
onValueChange(values) => {}noneonValueChange handler accepts values object
isAllowedvalues => true or falsenoneA checker function to check if input value is valid or not
renderText(formattedValue) => React ElementnullA renderText method useful if you want to render formattedValue in different element other than span.
getInputRef(elm) => voidnullMethod to get reference of input, span (based on displayType prop) or the customInput's reference.
allowedDecimalSeparatorsarray of char

PHONE_INPUT

PropertyPropTypeRequiredDefaultDescription
containerClassNamestring-'intl-tel-input'Container CSS class name.
inputClassNamestring-''Text input CSS class name.
fieldNamestring-''It's used as input field name attribute.
fieldIdstring-''It's used as input field id attribute.
defaultValuestring-''The value used to initialize input. This will only work on uncontrolled component.
countriesData[array]-nullCountries data can be configured, it defaults to data defined in AllCountries.
allowDropdownbool-trueWhether or not to allow the dropdown. If disabled, there is no dropdown arrow, and the selected flag is not clickable. Also we display the selected flag on the right instead because it is just a marker of state.
autoHideDialCodebool-trueIf there is just a dial code in the input: remove it on blur, and re-add it on focus.
autoPlaceholderbool-trueAdd or remove input placeholder with an example number for the selected country.
customPlaceholderfunc-nullChange the placeholder generated by autoPlaceholder. Must return a string.
excludeCountries[string]-[]Don't display the countries you specify. (Array)
formatOnInitbool-trueFormat the input value during initialisation.
separateDialCodebool-falseDisplay the country dial code next to the selected flag so it's not part of the typed number. Note that this will disable nationalMode because technically we are dealing with international numbers, but with the dial code separated.
defaultCountrystring-''Default country.
geoIpLookupfunc-nullGeoIp lookup function.
nationalModebool-trueDon't insert international dial codes.
numberTypestring-'MOBILE'Number type to use for placeholders.
noCountryDataHandlerfunc-nullThe function which can catch the "no this default country" exception.
onlyCountries[string]-[]Display only these countries.
preferredCountries[string]-['us', 'gb']The countries at the top of the list. defaults to United States and United Kingdom.
onPhoneNumberChangefunc-nullOptional validation callback function. It returns validation status, input box value and selected country data.
onPhoneNumberBlurfunc-nullOptional validation callback function. It returns validation status, input box value and selected country data.
onPhoneNumberFocusfunc-nullOptional validation callback function. It returns validation status, input box value and selected country data.
onSelectFlagfunc-nullAllow main app to do things when a country is selected.
disabledbool-falseDisable this component.
autoFocusbool-falseEnable auto focus
useMobileFullscreenDropdownbool-trueRender fullscreen flag dropdown when mobile useragent is detected. The dropdown element is rendered as a direct child of document.body
autoCompletestring-'off'Set the value of the autoComplete attribute on the input. For example, set it to phone to tell the browser where to auto complete phone numbers.
telInputPropsobject-{}Pass through arbitrary props to the tel input element.
formatbool-falseFormat the number.
onFlagClickfunc-nullAllow main app to do things when flag icon is clicked.
valuestring--The value of the input field. Useful for making input value controlled from outside the component.
placeholderstring--Static placeholder for input controller. When defined it takes priority over autoPlaceholder.
stylecustom--Style object for the wrapper div. Useful for setting 100% width on the wrapper, etc.

TABLE

PropertyPropTypeRequiredDefaultDescription
referredPageConfigIPageConfigYes-Page config to use for the table and related features
referredTabIndexNumber-0Tab index in the specified page config
customEventsITableCustomEvent--
forceGetRecordFromPageConfigbool-true
hideRefreshButtonbool-false
hideFiltersbool-false
filterByfunc-'(params: object, type: ITypeRuntime)
refreshButtonPropsobject--ICustomProps & { refreshButtonText?: string }

TODOs

UPLOAD_CONTAINER

FILE_UPLOADER

EDITOR

TEXT_AREA

LABEL

BAR_CHART / LINE_CHART / PIE_CHART

JSON_VIEW

RADIO_BUTTON

Last updated on 10/28/2020
← BlockchainCLI Commands →
  • FORM_CONTROL
  • TOGGLE
  • DATE_PICKER / DATE_PICKER_TZ
  • TIME_PICKER
  • DROPDOWN / DROPDOWN_ASYNC / MULTIPLE_SELECT / MULTIPLE_SELECT_ASYNC / TAG_INPUT
  • NUMERIC_INPUT
  • PHONE_INPUT
  • TABLE
  • TODOs
    • UPLOAD_CONTAINER
    • FILE_UPLOADER
    • EDITOR
    • TEXT_AREA
    • LABEL
    • BAR_CHART / LINE_CHART / PIE_CHART
    • JSON_VIEW
    • RADIO_BUTTON
Copyright © 2021 Net Core Genesis
www.NetCoreGenesis.com