Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

References

DataTable

Re-exports DataTable

DataTableCustomFilter

Re-exports DataTableCustomFilter

EntityEditor

Re-exports EntityEditor

FileUpload

Re-exports FileUpload

ImagePreview

Re-exports ImagePreview

NestedEntitiesTableField

Re-exports NestedEntitiesTableField

NestedEntityField

Re-exports NestedEntityField

Type aliases

ComparisonType

ComparisonType: OperatorType | "inInterval"

CustomFilterInputValue

CustomFilterInputValue: string | number | boolean | string[] | number[] | TemporalInterval | null | undefined

FormFieldComponentProps

FormFieldComponentProps: SelectProps<SelectValue> | InputProps | InputNumberProps | CheckboxProps | DatePickerProps | TimePickerProps | FileUploadProps | NestedEntityFieldProps | NestedEntitiesTableFieldProps

FormFieldProps

FormFieldProps: MainStoreInjected & { disabled?: boolean; entityName: string; nestedEntityView?: string; optionsContainer?: DataCollectionStore<WithId>; parentEntityInstanceId?: string; propertyName: string } & FormFieldComponentProps

MultilineTextProps

MultilineTextProps: { lines: string[] }

Type declaration

  • lines: string[]

ServerValidationErrors

ServerValidationErrors: { fieldErrors: Map<string, string[]>; globalErrors: string[] }

Type declaration

  • fieldErrors: Map<string, string[]>
  • globalErrors: string[]

Variables

Const EntityProperty

EntityProperty: (props: EntityPropertyProps) => Element & IWrappedComponent<(props: EntityPropertyProps) => Element> = ...

Const EnumField

EnumField: (__namedParameters: EnumFieldProps) => Element & IWrappedComponent<(__namedParameters: EnumFieldProps) => Element> = ...

Const Field

Field: (props: FieldProps) => Element & IWrappedComponent<(props: FieldProps) => Element> = ...

Const FormField

FormField: ForwardRefExoticComponent<(MainStoreInjected & { disabled?: boolean; entityName: string; nestedEntityView?: string; optionsContainer?: DataCollectionStore<WithId>; parentEntityInstanceId?: string; propertyName: string } & FileUploadProps & RefAttributes<unknown>) | (MainStoreInjected & { disabled?: boolean; entityName: string; nestedEntityView?: string; optionsContainer?: DataCollectionStore<WithId>; parentEntityInstanceId?: string; propertyName: string } & InputNumberProps & RefAttributes<unknown>) | (MainStoreInjected & { disabled?: boolean; entityName: string; nestedEntityView?: string; optionsContainer?: DataCollectionStore<WithId>; parentEntityInstanceId?: string; propertyName: string } & SelectProps<SelectValue> & RefAttributes<unknown>) | (MainStoreInjected & { disabled?: boolean; entityName: string; nestedEntityView?: string; optionsContainer?: DataCollectionStore<WithId>; parentEntityInstanceId?: string; propertyName: string } & InputProps & RefAttributes<unknown>) | (MainStoreInjected & { disabled?: boolean; entityName: string; nestedEntityView?: string; optionsContainer?: DataCollectionStore<WithId>; parentEntityInstanceId?: string; propertyName: string } & CheckboxProps & RefAttributes<unknown>) | (MainStoreInjected & { disabled?: boolean; entityName: string; nestedEntityView?: string; optionsContainer?: DataCollectionStore<WithId>; parentEntityInstanceId?: string; propertyName: string } & Pick<PickerBaseProps<Moment>, "value" | "onChange" | "disabled" | "defaultValue" | "autoComplete" | "autoFocus" | "name" | "placeholder" | "className" | "id" | "style" | "tabIndex" | "role" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "onFocus" | "onBlur" | "onKeyDown" | "onClick" | "onContextMenu" | "onMouseDown" | "onMouseEnter" | "onMouseLeave" | "onMouseUp" | "onSelect" | "prefixCls" | "allowClear" | "picker" | "mode" | "defaultPickerValue" | "disabledDate" | "dateRender" | "monthCellRender" | "renderExtraFooter" | "onPanelChange" | "onOk" | "direction" | "dropdownClassName" | "dropdownAlign" | "popupStyle" | "transitionName" | "open" | "defaultOpen" | "inputReadOnly" | "format" | "suffixIcon" | "clearIcon" | "getPopupContainer" | "panelRender" | "onOpenChange" | "pickerRef"> & { bordered?: boolean; locale?: PickerLocale; size?: SizeType } & RefAttributes<unknown>) | (MainStoreInjected & { disabled?: boolean; entityName: string; nestedEntityView?: string; optionsContainer?: DataCollectionStore<WithId>; parentEntityInstanceId?: string; propertyName: string } & Pick<PickerDateProps<Moment>, "value" | "onChange" | "disabled" | "defaultValue" | "autoComplete" | "autoFocus" | "name" | "placeholder" | "className" | "id" | "style" | "tabIndex" | "role" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "onFocus" | "onBlur" | "onKeyDown" | "onClick" | "onContextMenu" | "onMouseDown" | "onMouseEnter" | "onMouseLeave" | "onMouseUp" | "onSelect" | "prefixCls" | "allowClear" | "picker" | "mode" | "defaultPickerValue" | "disabledDate" | "dateRender" | "monthCellRender" | "renderExtraFooter" | "onPanelChange" | "onOk" | "direction" | "dropdownClassName" | "dropdownAlign" | "popupStyle" | "transitionName" | "open" | "defaultOpen" | "inputReadOnly" | "format" | "suffixIcon" | "clearIcon" | "getPopupContainer" | "panelRender" | "onOpenChange" | "pickerRef" | "showToday" | "showNow" | "showTime" | "disabledTime"> & { bordered?: boolean; locale?: PickerLocale; size?: SizeType } & RefAttributes<unknown>) | (MainStoreInjected & { disabled?: boolean; entityName: string; nestedEntityView?: string; optionsContainer?: DataCollectionStore<WithId>; parentEntityInstanceId?: string; propertyName: string } & Pick<PickerTimeProps<Moment>, "value" | "onChange" | "disabled" | "defaultValue" | "autoComplete" | "autoFocus" | "name" | "placeholder" | "className" | "id" | "style" | "tabIndex" | "role" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "onFocus" | "onBlur" | "onKeyDown" | "onClick" | "onContextMenu" | "onMouseDown" | "onMouseEnter" | "onMouseLeave" | "onMouseUp" | "onSelect" | "prefixCls" | "allowClear" | "picker" | "mode" | "defaultPickerValue" | "disabledDate" | "dateRender" | "monthCellRender" | "renderExtraFooter" | "onPanelChange" | "onOk" | "direction" | "dropdownClassName" | "dropdownAlign" | "popupStyle" | "transitionName" | "open" | "defaultOpen" | "inputReadOnly" | "format" | "suffixIcon" | "clearIcon" | "getPopupContainer" | "panelRender" | "onOpenChange" | "pickerRef" | "showNow" | "showHour" | "showMinute" | "showSecond" | "use12Hours" | "hourStep" | "minuteStep" | "secondStep" | "hideDisabledOptions" | "disabledHours" | "disabledMinutes" | "disabledSeconds" | "defaultOpenValue"> & { bordered?: boolean; locale?: PickerLocale; size?: SizeType } & RefAttributes<unknown>) | (MainStoreInjected & { disabled?: boolean; entityName: string; nestedEntityView?: string; optionsContainer?: DataCollectionStore<WithId>; parentEntityInstanceId?: string; propertyName: string } & TimePickerProps & RefAttributes<unknown>) | (MainStoreInjected & { disabled?: boolean; entityName: string; nestedEntityView?: string; optionsContainer?: DataCollectionStore<WithId>; parentEntityInstanceId?: string; propertyName: string } & NestedEntityFieldProps & RefAttributes<unknown>) | (MainStoreInjected & { disabled?: boolean; entityName: string; nestedEntityView?: string; optionsContainer?: DataCollectionStore<WithId>; parentEntityInstanceId?: string; propertyName: string } & NestedEntitiesTableFieldProps & RefAttributes<unknown>)> & IWrappedComponent<ForwardRefExoticComponent<(MainStoreInjected & { disabled?: boolean; entityName: string; nestedEntityView?: string; optionsContainer?: DataCollectionStore<WithId>; parentEntityInstanceId?: string; propertyName: string } & FileUploadProps & RefAttributes<unknown>) | (MainStoreInjected & { disabled?: boolean; entityName: string; nestedEntityView?: string; optionsContainer?: DataCollectionStore<WithId>; parentEntityInstanceId?: string; propertyName: string } & InputNumberProps & RefAttributes<unknown>) | (MainStoreInjected & { disabled?: boolean; entityName: string; nestedEntityView?: string; optionsContainer?: DataCollectionStore<WithId>; parentEntityInstanceId?: string; propertyName: string } & SelectProps<SelectValue> & RefAttributes<unknown>) | (MainStoreInjected & { disabled?: boolean; entityName: string; nestedEntityView?: string; optionsContainer?: DataCollectionStore<WithId>; parentEntityInstanceId?: string; propertyName: string } & InputProps & RefAttributes<unknown>) | (MainStoreInjected & { disabled?: boolean; entityName: string; nestedEntityView?: string; optionsContainer?: DataCollectionStore<WithId>; parentEntityInstanceId?: string; propertyName: string } & CheckboxProps & RefAttributes<unknown>) | (MainStoreInjected & { disabled?: boolean; entityName: string; nestedEntityView?: string; optionsContainer?: DataCollectionStore<WithId>; parentEntityInstanceId?: string; propertyName: string } & Pick<PickerBaseProps<Moment>, "value" | "onChange" | "disabled" | "defaultValue" | "autoComplete" | "autoFocus" | "name" | "placeholder" | "className" | "id" | "style" | "tabIndex" | "role" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "onFocus" | "onBlur" | "onKeyDown" | "onClick" | "onContextMenu" | "onMouseDown" | "onMouseEnter" | "onMouseLeave" | "onMouseUp" | "onSelect" | "prefixCls" | "allowClear" | "picker" | "mode" | "defaultPickerValue" | "disabledDate" | "dateRender" | "monthCellRender" | "renderExtraFooter" | "onPanelChange" | "onOk" | "direction" | "dropdownClassName" | "dropdownAlign" | "popupStyle" | "transitionName" | "open" | "defaultOpen" | "inputReadOnly" | "format" | "suffixIcon" | "clearIcon" | "getPopupContainer" | "panelRender" | "onOpenChange" | "pickerRef"> & { bordered?: boolean; locale?: PickerLocale; size?: SizeType } & RefAttributes<unknown>) | (MainStoreInjected & { disabled?: boolean; entityName: string; nestedEntityView?: string; optionsContainer?: DataCollectionStore<WithId>; parentEntityInstanceId?: string; propertyName: string } & Pick<PickerDateProps<Moment>, "value" | "onChange" | "disabled" | "defaultValue" | "autoComplete" | "autoFocus" | "name" | "placeholder" | "className" | "id" | "style" | "tabIndex" | "role" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "onFocus" | "onBlur" | "onKeyDown" | "onClick" | "onContextMenu" | "onMouseDown" | "onMouseEnter" | "onMouseLeave" | "onMouseUp" | "onSelect" | "prefixCls" | "allowClear" | "picker" | "mode" | "defaultPickerValue" | "disabledDate" | "dateRender" | "monthCellRender" | "renderExtraFooter" | "onPanelChange" | "onOk" | "direction" | "dropdownClassName" | "dropdownAlign" | "popupStyle" | "transitionName" | "open" | "defaultOpen" | "inputReadOnly" | "format" | "suffixIcon" | "clearIcon" | "getPopupContainer" | "panelRender" | "onOpenChange" | "pickerRef" | "showToday" | "showNow" | "showTime" | "disabledTime"> & { bordered?: boolean; locale?: PickerLocale; size?: SizeType } & RefAttributes<unknown>) | (MainStoreInjected & { disabled?: boolean; entityName: string; nestedEntityView?: string; optionsContainer?: DataCollectionStore<WithId>; parentEntityInstanceId?: string; propertyName: string } & Pick<PickerTimeProps<Moment>, "value" | "onChange" | "disabled" | "defaultValue" | "autoComplete" | "autoFocus" | "name" | "placeholder" | "className" | "id" | "style" | "tabIndex" | "role" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "onFocus" | "onBlur" | "onKeyDown" | "onClick" | "onContextMenu" | "onMouseDown" | "onMouseEnter" | "onMouseLeave" | "onMouseUp" | "onSelect" | "prefixCls" | "allowClear" | "picker" | "mode" | "defaultPickerValue" | "disabledDate" | "dateRender" | "monthCellRender" | "renderExtraFooter" | "onPanelChange" | "onOk" | "direction" | "dropdownClassName" | "dropdownAlign" | "popupStyle" | "transitionName" | "open" | "defaultOpen" | "inputReadOnly" | "format" | "suffixIcon" | "clearIcon" | "getPopupContainer" | "panelRender" | "onOpenChange" | "pickerRef" | "showNow" | "showHour" | "showMinute" | "showSecond" | "use12Hours" | "hourStep" | "minuteStep" | "secondStep" | "hideDisabledOptions" | "disabledHours" | "disabledMinutes" | "disabledSeconds" | "defaultOpenValue"> & { bordered?: boolean; locale?: PickerLocale; size?: SizeType } & RefAttributes<unknown>) | (MainStoreInjected & { disabled?: boolean; entityName: string; nestedEntityView?: string; optionsContainer?: DataCollectionStore<WithId>; parentEntityInstanceId?: string; propertyName: string } & TimePickerProps & RefAttributes<unknown>) | (MainStoreInjected & { disabled?: boolean; entityName: string; nestedEntityView?: string; optionsContainer?: DataCollectionStore<WithId>; parentEntityInstanceId?: string; propertyName: string } & NestedEntityFieldProps & RefAttributes<unknown>) | (MainStoreInjected & { disabled?: boolean; entityName: string; nestedEntityView?: string; optionsContainer?: DataCollectionStore<WithId>; parentEntityInstanceId?: string; propertyName: string } & NestedEntitiesTableFieldProps & RefAttributes<unknown>)>> = ...

Const Msg

Msg: (__namedParameters: Props) => Element & IWrappedComponent<(__namedParameters: Props) => Element> = ...

Const defaultPagingConfig

defaultPagingConfig: PaginationConfig = ...

Paging defaults

Functions

Const I18nProvider

  • I18nProvider(__namedParameters: I18nProviderProps): null | Element

MultilineText

Spinner

  • Spinner(): Element

addPagingParams

  • addPagingParams(url: string, current: number | undefined, pageSize: number | undefined): string
  • Add paging params at the end of url string. Returns url with Note - expects that url has no params, so this method add '?' before params.

    Parameters

    • url: string

      params will be added to this url

    • current: number | undefined

      current page

    • pageSize: number | undefined

      page size

    Returns string

clearFieldErrors

  • clearFieldErrors(formInstance: FormInstance): void

constructFieldsWithErrors

  • constructFieldsWithErrors(fieldErrors: Map<string, string[]>, formInstance: FormInstance): FieldData[]
  • Constructs antd form fields object containing given errors

    Parameters

    • fieldErrors: Map<string, string[]>
    • formInstance: FormInstance

    Returns FieldData[]

createAntdFormValidationMessages

  • createAntdFormValidationMessages(intl: IntlShape): { array: { len: string; max: string; min: string; range: string }; date: { format: string; invalid: string; parse: string }; default: string; enum: string; number: { len: string; max: string; min: string; range: string }; pattern: { mismatch: string }; required: string; string: { len: string; max: string; min: string; range: string }; types: { array: string; boolean: string; date: string; email: string; float: string; hex: string; integer: string; method: string; number: string; object: string; regexp: string; string: string; url: string }; whitespace: string }
  • Parameters

    • intl: IntlShape

    Returns { array: { len: string; max: string; min: string; range: string }; date: { format: string; invalid: string; parse: string }; default: string; enum: string; number: { len: string; max: string; min: string; range: string }; pattern: { mismatch: string }; required: string; string: { len: string; max: string; min: string; range: string }; types: { array: string; boolean: string; date: string; email: string; float: string; hex: string; integer: string; method: string; number: string; object: string; regexp: string; string: string; url: string }; whitespace: string }

    • array: { len: string; max: string; min: string; range: string }
      • len: string
      • max: string
      • min: string
      • range: string
    • date: { format: string; invalid: string; parse: string }
      • format: string
      • invalid: string
      • parse: string
    • default: string
    • enum: string
    • number: { len: string; max: string; min: string; range: string }
      • len: string
      • max: string
      • min: string
      • range: string
    • pattern: { mismatch: string }
      • mismatch: string
    • required: string
    • string: { len: string; max: string; min: string; range: string }
      • len: string
      • max: string
      • min: string
      • range: string
    • types: { array: string; boolean: string; date: string; email: string; float: string; hex: string; integer: string; method: string; number: string; object: string; regexp: string; string: string; url: string }
      • array: string
      • boolean: string
      • date: string
      • email: string
      • float: string
      • hex: string
      • integer: string
      • method: string
      • number: string
      • object: string
      • regexp: string
      • string: string
      • url: string
    • whitespace: string

createPagingConfig

  • createPagingConfig(urlParams: string, disabled?: boolean, prevConfig?: PaginationConfig): { className?: string; current?: number; defaultCurrent?: number; defaultPageSize?: number; disabled?: boolean; hideOnSinglePage?: boolean; itemRender?: (page: number, type: "next" | "page" | "prev" | "jump-prev" | "jump-next", originalElement: ReactElement<HTMLElement, string | ((props: any) => null | ReactElement<any, any>) | (new (props: any) => Component<any, any, any>)>) => ReactNode; locale?: Object; onChange?: (page: number, pageSize?: number) => void; onShowSizeChange?: (current: number, size: number) => void; pageSize?: number; pageSizeOptions?: string[]; position?: "both" | "top" | "bottom"; prefixCls?: string; responsive?: boolean; role?: string; selectPrefixCls?: string; showLessItems?: boolean; showQuickJumper?: boolean | { goButton?: ReactNode }; showSizeChanger?: boolean; showTitle?: boolean; showTotal?: (total: number, range: [number, number]) => ReactNode; simple?: boolean; size?: "small" | "default"; style?: CSSProperties; total?: number } | { config: { className?: string; current?: number; defaultCurrent?: number; defaultPageSize?: number; disabled?: boolean; hideOnSinglePage?: boolean; itemRender?: (page: number, type: "next" | "page" | "prev" | "jump-prev" | "jump-next", originalElement: ReactElement<HTMLElement, string | ((props: any) => null | ReactElement<any, any>) | (new (props: any) => Component<any, any, any>)>) => ReactNode; locale?: Object; onChange?: (page: number, pageSize?: number) => void; onShowSizeChange?: (current: number, size: number) => void; pageSize?: number; pageSizeOptions?: string[]; position?: "both" | "top" | "bottom"; prefixCls?: string; responsive?: boolean; role?: string; selectPrefixCls?: string; showLessItems?: boolean; showQuickJumper?: boolean | { goButton?: ReactNode }; showSizeChanger?: boolean; showTitle?: boolean; showTotal?: (total: number, range: [number, number]) => ReactNode; simple?: boolean; size?: "small" | "default"; style?: CSSProperties; total?: number }; disabled: boolean }
  • Parameters

    • urlParams: string

      query params from 'location.history'

    • disabled: boolean = false

      set to true, if no pagination required for component

    • prevConfig: PaginationConfig = ...

      previous paging configuration, by default used Paging#defaultPagingConfig

    Returns { className?: string; current?: number; defaultCurrent?: number; defaultPageSize?: number; disabled?: boolean; hideOnSinglePage?: boolean; itemRender?: (page: number, type: "next" | "page" | "prev" | "jump-prev" | "jump-next", originalElement: ReactElement<HTMLElement, string | ((props: any) => null | ReactElement<any, any>) | (new (props: any) => Component<any, any, any>)>) => ReactNode; locale?: Object; onChange?: (page: number, pageSize?: number) => void; onShowSizeChange?: (current: number, size: number) => void; pageSize?: number; pageSizeOptions?: string[]; position?: "both" | "top" | "bottom"; prefixCls?: string; responsive?: boolean; role?: string; selectPrefixCls?: string; showLessItems?: boolean; showQuickJumper?: boolean | { goButton?: ReactNode }; showSizeChanger?: boolean; showTitle?: boolean; showTotal?: (total: number, range: [number, number]) => ReactNode; simple?: boolean; size?: "small" | "default"; style?: CSSProperties; total?: number } | { config: { className?: string; current?: number; defaultCurrent?: number; defaultPageSize?: number; disabled?: boolean; hideOnSinglePage?: boolean; itemRender?: (page: number, type: "next" | "page" | "prev" | "jump-prev" | "jump-next", originalElement: ReactElement<HTMLElement, string | ((props: any) => null | ReactElement<any, any>) | (new (props: any) => Component<any, any, any>)>) => ReactNode; locale?: Object; onChange?: (page: number, pageSize?: number) => void; onShowSizeChange?: (current: number, size: number) => void; pageSize?: number; pageSizeOptions?: string[]; position?: "both" | "top" | "bottom"; prefixCls?: string; responsive?: boolean; role?: string; selectPrefixCls?: string; showLessItems?: boolean; showQuickJumper?: boolean | { goButton?: ReactNode }; showSizeChanger?: boolean; showTitle?: boolean; showTotal?: (total: number, range: [number, number]) => ReactNode; simple?: boolean; size?: "small" | "default"; style?: CSSProperties; total?: number }; disabled: boolean }

Const defaultHandleFinish

  • defaultHandleFinish<E>(values: Record<string, any>, dataInstance: DataInstanceStore<E>, intl: IntlShape, formInstance: FormInstance<any>, commitMode?: "create" | "edit"): Promise<{ globalErrors: string[]; success: boolean }>
  • Type parameters

    • E: unknown

    Parameters

    • values: Record<string, any>
    • dataInstance: DataInstanceStore<E>
    • intl: IntlShape
    • formInstance: FormInstance<any>
    • Optional commitMode: "create" | "edit"

    Returns Promise<{ globalErrors: string[]; success: boolean }>

defaultMapJmixRestErrorToIntlId

  • defaultMapJmixRestErrorToIntlId(error: JmixRestError): string

entityFilterToTableFilters

  • entityFilterToTableFilters(entityFilter: EntityFilter, fields?: string[]): Record<string, any>
  • Converts EntityFilter to antd table filters object. Useful e.g. to set the initial state of table filters when the table is loaded with a predefined EntityFilter.

    Parameters

    • entityFilter: EntityFilter
    • Optional fields: string[]

      names of the entity properties displayed in the table. Allows to check the EntityFilter.conditions against the list of displayed fields and ensure that only the conditions related to the displayed fields are used.

    Returns Record<string, any>

extractServerValidationErrors

generateCustomFilterDropdown

  • generateCustomFilterDropdown(propertyName: string, entityName: string, operator: ComparisonType | undefined, onOperatorChange: (operator: ComparisonType, propertyName: string) => void, value: any, onValueChange: (value: any, propertyName: string) => void, customFilterRefCallback?: (instance: FormInstance) => void): (props: FilterDropdownProps) => React.ReactNode
  • Parameters

    • propertyName: string
    • entityName: string
    • operator: ComparisonType | undefined
    • onOperatorChange: (operator: ComparisonType, propertyName: string) => void
    • value: any
    • onValueChange: (value: any, propertyName: string) => void
        • (value: any, propertyName: string): void
        • Parameters

          • value: any
          • propertyName: string

          Returns void

    • Optional customFilterRefCallback: (instance: FormInstance) => void
        • (instance: FormInstance): void
        • Parameters

          • instance: FormInstance

          Returns void

    Returns (props: FilterDropdownProps) => React.ReactNode

      • (props: FilterDropdownProps): React.ReactNode
      • Parameters

        • props: FilterDropdownProps

        Returns React.ReactNode

generateDataColumn

  • generateDataColumn<EntityType>(config: DataColumnConfig): ColumnProps<EntityType>
  • remarks

    It is possible to create a vanilla antd Table and customize some of its columns with DataTable's custom filters using this helper function.

    NOTE: it might be simpler to achieve the desired result using DataTableProps.columnDefinitions.

    example
     import * as React from "react";
     import {action, observable} from 'mobx';
     import {observer} from "mobx-react";
     import {Table,} from "antd";
     import {Car} from "../../cuba/entities/mpg$Car";
     import {
      collection, injectMainStore, MainStoreInjected,
      generateDataColumn, ComparisonType, handleTableChange,
    } from "@cuba-platform/react";
     import {injectIntl, WrappedComponentProps} from 'react-intl';
     import {PaginationConfig} from 'antd/es/pagination';
     import { SorterResult } from "antd/es/table";
    
     @injectMainStore
     @observer
     class CarTableComponent extends React.Component<MainStoreInjected & WrappedComponentProps> {
    
      dataCollection = collection<Car>(Car.NAME, {view: 'car-edit', sort: '-updateTs'});
    
      fields = ['purchaseDate','price','regNumber'];
    
      @observable.ref filters: Record<string, string[]> | undefined;
      @observable operator: ComparisonType | undefined;
      @observable value: any;
    
      @action
      handleOperatorChange = (operator: ComparisonType) => this.operator = operator;
    
      @action
      handleValueChange = (value: any) => this.value = value;
    
      @action
      handleChange = (pagination: PaginationConfig, tableFilters: Record<string, string[]>, sorter: SorterResult<Car>): void => {
        this.filters = tableFilters;
    
        handleTableChange({
          pagination: pagination,
          filters: tableFilters,
          sorter: sorter,
          defaultSort: '-updateTs',
          fields: this.fields,
          mainStore: this.props.mainStore!,
          dataCollection: this.dataCollection
        });
      };
    
      render() {
    
        return (
          <Table
            dataSource={this.dataCollection.items.slice()}
            columns={[
              { title: 'Purchase Date', dataIndex: 'purchaseDate', key: 'purchaseDate', render: (text: any) => <b>{text}</b> },
              { title: 'Price', dataIndex: 'price', key: 'price' },
              generateDataColumn({
                propertyName: 'regNumber',
                entityName: this.dataCollection.entityName,
                filters: this.filters,
                operator: this.operator,
                onOperatorChange: this.handleOperatorChange,
                value: this.value,
                onValueChange: this.handleValueChange,
                enableSorter: true,
                mainStore: this.props.mainStore!
              })
            ]}
            onChange={this.handleChange}
            pagination={{
              showSizeChanger: true,
              total: this.dataCollection.count,
            }}
          />
        );
      }
    
    }
    
     const CarTable = injectIntl(CarTableComponent);
    
     export default CarTable;
    

    Type parameters

    • EntityType

    Parameters

    Returns ColumnProps<EntityType>

generateEnumFilter

  • generateEnumFilter(propertyInfo: MetaPropertyInfo, mainStore: MainStore): ColumnFilterItem[]
  • Generates a standard antd table column filter for enum fields.

    Parameters

    • propertyInfo: MetaPropertyInfo
    • mainStore: MainStore

    Returns ColumnFilterItem[]

getEntityProperties

  • getEntityProperties(entityName: string, fields: string[], metadata: MetaClassInfo[]): MetaPropertyInfo[]
  • Parameters

    • entityName: string
    • fields: string[]
    • metadata: MetaClassInfo[]

    Returns MetaPropertyInfo[]

handleTableChange

  • handleTableChange<E>(tableChangeDTO: TableChangeDTO<E>): Promise<void>
  • When called from antd Table's onChange callback this function will reload data collection taking into account Table's filters, sorter and pagination.

    Type parameters

    • E

      entity type.

    Parameters

    Returns Promise<void>

isConditionsGroup

  • isConditionsGroup(conditionOrConditionsGroup: Condition | ConditionsGroup): boolean

isPreservedCondition

  • isPreservedCondition(condition: Condition | ConditionsGroup, fields: string[]): boolean
  • Determines whether a condition shall be preserved in DataCollectionStore when clearing table filters.

    remarks

    Preserved conditions include ConditionGroups and conditions on fields that are not displayed in the table. Effectively they act as invisible filters that cannot be disabled.

    Parameters

    • condition: Condition | ConditionsGroup
    • fields: string[]

      names of the entity properties displayed in the table

    Returns boolean

Const loginMapJmixRestErrorToIntlId

  • loginMapJmixRestErrorToIntlId(error: JmixRestError): string

mapJmixRestErrorToIntlId

  • mapJmixRestErrorToIntlId(localMapJmixRestErrorToIntlId: (error: JmixRestError) => string | void, error: JmixRestError): string
  • Parameters

    • localMapJmixRestErrorToIntlId: (error: JmixRestError) => string | void
        • (error: JmixRestError): string | void
        • Parameters

          • error: JmixRestError

          Returns string | void

    • error: JmixRestError

    Returns string

operatorToOptionClassName

parsePagingParams

  • parsePagingParams(locationSearch: string, currentPrev: number | undefined, pageSizePrev: number | undefined): PaginationConfig
  • Returns new PaginationConfig object with 'current' and 'pageSize' params, parsed from location.search. If param not found in search url, previous value (currentPrev, pageSizePrev) will be returned. If new pageSize not contains in config pageSizeOptions - previous config will be returned.

    Parameters

    • locationSearch: string

      trying to find paging params here

    • currentPrev: number | undefined

      previous value, will be returned in result if new value not found in locationSearch

    • pageSizePrev: number | undefined

      previous value, will be returned in result if new value not found in locationSearch

    Returns PaginationConfig

setFilters

  • setFilters<E>(tableFilters: Record<string, (ReactText | boolean)[] | null>, fields: string[], mainStore: MainStore, dataCollection: DataCollectionStore<E>): void
  • Sets filters on provided dataCollection based on current state of table filters

    Type parameters

    • E

    Parameters

    • tableFilters: Record<string, (ReactText | boolean)[] | null>
    • fields: string[]
    • mainStore: MainStore
    • dataCollection: DataCollectionStore<E>

    Returns void

setPagination

  • setPagination<E>(pagination: PaginationConfig | TablePaginationConfig, dataCollection: DataCollectionStore<E>, reload?: boolean): void
  • Apply paginationConfig to collectionDataStore, reload dataStore if required

    Type parameters

    • E

    Parameters

    • pagination: PaginationConfig | TablePaginationConfig

      PaginationConfig

    • dataCollection: DataCollectionStore<E>

      -page size and current page will be set to this collection data store

    • reload: boolean = false

      reload collection data store, if needsr

    Returns void

setSorter

  • setSorter<E>(sorter: SorterResult<E> | SorterResult<E>[], defaultSort: string | undefined, dataCollection: DataCollectionStore<E>): void
  • Sets sort field/order on provided dataCollection based on current state of table sorter.

    Type parameters

    • E

    Parameters

    • sorter: SorterResult<E> | SorterResult<E>[]
    • defaultSort: string | undefined

      name of the field to be sorted by. If the name is preceeding by the '+' character, then the sort order is ascending, if by the '-' character then descending. If there is no special character before the property name, then ascending sort will be used.

    • dataCollection: DataCollectionStore<E>

    Returns void

Generated using TypeDoc