@esvndev/es-react-table-interface 1.9.57 → 1.9.59
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/dist/component/ExternalInterface/View/ViewBuilderUI/components/action-builder.d.ts +6 -0
- package/dist/component/ExternalInterface/View/ViewBuilderUI/components/aggregate-builder.d.ts +6 -0
- package/dist/component/ExternalInterface/View/ViewBuilderUI/components/audience-permission-builder.d.ts +8 -0
- package/dist/component/ExternalInterface/View/ViewBuilderUI/components/available-field-list.d.ts +9 -0
- package/dist/component/ExternalInterface/View/ViewBuilderUI/components/common/badge.d.ts +1 -0
- package/dist/component/ExternalInterface/View/ViewBuilderUI/components/common/button.d.ts +1 -0
- package/dist/component/ExternalInterface/View/ViewBuilderUI/components/common/choice-cards.d.ts +1 -0
- package/dist/component/ExternalInterface/View/ViewBuilderUI/components/common/empty-state.d.ts +1 -0
- package/dist/component/ExternalInterface/View/ViewBuilderUI/components/common/index.d.ts +1 -0
- package/dist/component/ExternalInterface/View/ViewBuilderUI/components/common/section-card.d.ts +9 -0
- package/dist/component/ExternalInterface/View/ViewBuilderUI/components/common/segment.d.ts +11 -0
- package/dist/component/ExternalInterface/View/ViewBuilderUI/components/common/tooltip-icon-button.d.ts +13 -0
- package/dist/component/ExternalInterface/View/ViewBuilderUI/components/conditional-format-builder.d.ts +7 -0
- package/dist/component/ExternalInterface/View/ViewBuilderUI/components/filter-builder.d.ts +6 -0
- package/dist/component/ExternalInterface/View/ViewBuilderUI/components/filter-value-editor.d.ts +7 -0
- package/dist/component/ExternalInterface/View/ViewBuilderUI/components/form/checkbox-input.d.ts +13 -0
- package/dist/component/ExternalInterface/View/ViewBuilderUI/components/form/color-picker-input.d.ts +11 -0
- package/dist/component/ExternalInterface/View/ViewBuilderUI/components/form/creatable-select-box.d.ts +17 -0
- package/dist/component/ExternalInterface/View/ViewBuilderUI/components/form/date-picker-input.d.ts +18 -0
- package/dist/component/ExternalInterface/View/ViewBuilderUI/components/form/datetime-picker-input.d.ts +1 -0
- package/dist/component/ExternalInterface/View/ViewBuilderUI/components/form/form-field.d.ts +13 -0
- package/dist/component/ExternalInterface/View/ViewBuilderUI/components/form/index.d.ts +10 -0
- package/dist/component/ExternalInterface/View/ViewBuilderUI/components/form/multi-select-box.d.ts +19 -0
- package/dist/component/ExternalInterface/View/ViewBuilderUI/components/form/number-input.d.ts +22 -0
- package/dist/component/ExternalInterface/View/ViewBuilderUI/components/form/radio-input.d.ts +1 -0
- package/dist/component/ExternalInterface/View/ViewBuilderUI/components/form/select-box.d.ts +27 -0
- package/dist/component/ExternalInterface/View/ViewBuilderUI/components/form/switch-input.d.ts +13 -0
- package/dist/component/ExternalInterface/View/ViewBuilderUI/components/form/text-input.d.ts +28 -0
- package/dist/component/ExternalInterface/View/ViewBuilderUI/components/group-builder.d.ts +8 -0
- package/dist/component/ExternalInterface/View/ViewBuilderUI/components/quick-filter-builder.d.ts +6 -0
- package/dist/component/ExternalInterface/View/ViewBuilderUI/components/renderer-options-editor.d.ts +8 -0
- package/dist/component/ExternalInterface/View/ViewBuilderUI/components/selected-column-editor.d.ts +9 -0
- package/dist/component/ExternalInterface/View/ViewBuilderUI/components/selected-column-list.d.ts +14 -0
- package/dist/component/ExternalInterface/View/ViewBuilderUI/components/sort-builder.d.ts +6 -0
- package/dist/component/ExternalInterface/View/ViewBuilderUI/components/validation-summary.d.ts +6 -0
- package/dist/component/ExternalInterface/View/ViewBuilderUI/components/view-live-preview.d.ts +13 -0
- package/dist/component/ExternalInterface/View/ViewBuilderUI/components/view-stepper.d.ts +8 -0
- package/dist/component/ExternalInterface/View/ViewBuilderUI/index.d.ts +9 -0
- package/dist/component/ExternalInterface/View/ViewBuilderUI/steps/view-actions-display-step.d.ts +6 -0
- package/dist/component/ExternalInterface/View/ViewBuilderUI/steps/view-columns-step-2.d.ts +10 -0
- package/dist/component/ExternalInterface/View/ViewBuilderUI/steps/view-filter-sort-step.d.ts +6 -0
- package/dist/component/ExternalInterface/View/ViewBuilderUI/steps/view-format-step.d.ts +6 -0
- package/dist/component/ExternalInterface/View/ViewBuilderUI/steps/view-group-aggregate-step.d.ts +8 -0
- package/dist/component/ExternalInterface/View/ViewBuilderUI/steps/view-information-step.d.ts +9 -0
- package/dist/component/ExternalInterface/View/ViewBuilderUI/steps/view-permission-step.d.ts +7 -0
- package/dist/component/ExternalInterface/View/ViewBuilderUI/steps/view-summary-step.d.ts +12 -0
- package/dist/component/ExternalInterface/View/ViewBuilderUI/view-builder-context.d.ts +29 -0
- package/dist/component/ExternalInterface/View/ViewBuilderUI/view-builder-defaults.d.ts +16 -0
- package/dist/component/ExternalInterface/View/ViewBuilderUI/view-builder-metadata.d.ts +2 -0
- package/dist/component/ExternalInterface/View/ViewBuilderUI/view-builder-options.d.ts +15 -0
- package/dist/component/ExternalInterface/View/ViewBuilderUI/view-builder-preview-adapter.d.ts +20 -0
- package/dist/component/ExternalInterface/View/ViewBuilderUI/view-builder-types.d.ts +317 -0
- package/dist/component/ExternalInterface/View/ViewBuilderUI/view-builder-validator.d.ts +6 -0
- package/dist/component/ExternalInterface/View/ViewBuilderUI/view-builder-wizard.d.ts +16 -0
- package/dist/component/ExternalInterface/View/ViewBuilderUI/view-permission-data.d.ts +41 -0
- package/dist/component/ExternalInterface/View/index.d.ts +24 -0
- package/dist/component/ExternalInterface/columns.d.ts +7 -2
- package/dist/component/ExternalInterface/index.d.ts +1 -1
- package/dist/component/ExternalInterface/modalSetView.d.ts +32 -0
- package/dist/component/ExternalInterface/modalView.d.ts +21 -0
- package/dist/component/ToolbarTemplate/ToolbarTemplate.d.ts +10 -0
- package/dist/component/export/component/icon/index.d.ts +3 -0
- package/dist/component/export/component/input/index.d.ts +3 -0
- package/dist/component/export/component/input/input-checkbox/index.d.ts +4 -0
- package/dist/component/export/component/input/input-number/index.d.ts +4 -0
- package/dist/component/export/component/input/input-style/fonts.d.ts +4 -0
- package/dist/component/export/component/input/input-style/index.d.ts +4 -0
- package/dist/component/export/component/input/input-style/input-box.d.ts +4 -0
- package/dist/component/export/component/input/input-text/index.d.ts +4 -0
- package/dist/component/export/component/modal-export-excel/default-data.d.ts +3 -0
- package/dist/component/export/component/modal-export-excel/index.d.ts +4 -0
- package/dist/component/export/component/modal-header/index.d.ts +4 -0
- package/dist/component/export/component/modal-import-excel/index.d.ts +4 -0
- package/dist/component/export/component/modal-import-excel/tab-handle-error.d.ts +12 -0
- package/dist/component/export/component/modal-import-excel/tab-merge.d.ts +4 -0
- package/dist/component/export/component/modal-import-excel/tab-select-file.d.ts +4 -0
- package/dist/component/export/component/modal-import-excel/tab-validate.d.ts +4 -0
- package/dist/component/export/component/modal-import-excel/utils.d.ts +7 -0
- package/dist/component/export/component/notifications.d.ts +9 -0
- package/dist/component/export/component/request/index.d.ts +4 -0
- package/dist/component/export/component/select-table/index.d.ts +4 -0
- package/dist/component/export/component/sidebar/index.d.ts +4 -0
- package/dist/component/export/component/type/index.d.ts +351 -0
- package/dist/component/export/component/utils.d.ts +19 -0
- package/dist/component/export/component/wizard/index.d.ts +4 -0
- package/dist/component/export/index.d.ts +6 -0
- package/dist/component/option_configs/index.d.ts +12 -2
- package/dist/component/table_configs/index.d.ts +13 -1
- package/dist/component/table_configs/table.d.ts +1 -1
- package/dist/component/table_configs/tableConfig.d.ts +2 -13
- package/dist/func.d.ts +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +26 -9
- package/dist/index.js.map +1 -1
- package/dist/interface.d.ts +12 -1
- package/dist/libs/breadcrumbs-not-link/index.d.ts +1 -8
- package/dist/libs/initAbility/index.d.ts +4 -0
- package/dist/libs/input-no-control/input-text/index.d.ts +1 -0
- package/dist/libs/select/select.d.ts +2 -1
- package/dist/libs/template/index.d.ts +5 -4
- package/dist/ultility/Export/InterfaceExport.d.ts +1 -1
- package/dist/ultility/api/menu/index.d.ts +1 -2
- package/dist/ultility/api/requester.d.ts +7 -6
- package/dist/ultility/request/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ViewColumnConfig } from '../view-builder-types';
|
|
3
|
+
export declare const AggregateBuilder: ({ columns, onChangeColumns }: {
|
|
4
|
+
columns: ViewColumnConfig[];
|
|
5
|
+
onChangeColumns: (columns: ViewColumnConfig[]) => void;
|
|
6
|
+
}) => React.JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { AudiencePermission, ViewScope } from '../view-builder-types';
|
|
3
|
+
export declare const AudiencePermissionBuilder: ({ audiences, onChange, scope, readOnly }: {
|
|
4
|
+
audiences: AudiencePermission[];
|
|
5
|
+
onChange: (audiences: AudiencePermission[]) => void;
|
|
6
|
+
scope: ViewScope;
|
|
7
|
+
readOnly?: boolean;
|
|
8
|
+
}) => React.JSX.Element;
|
package/dist/component/ExternalInterface/View/ViewBuilderUI/components/available-field-list.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { FieldMetadata } from '../view-builder-types';
|
|
3
|
+
export declare const AvailableFieldList: ({ metadata, selected, checked, onChecked, onRemoveColumn }: {
|
|
4
|
+
metadata: FieldMetadata[];
|
|
5
|
+
selected: string[];
|
|
6
|
+
checked: string[];
|
|
7
|
+
onChecked: (fields: string[]) => void;
|
|
8
|
+
onRemoveColumn?: (columnId: string) => void;
|
|
9
|
+
}) => React.JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/component/ExternalInterface/View/ViewBuilderUI/components/common/choice-cards.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/component/ExternalInterface/View/ViewBuilderUI/components/common/empty-state.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './tooltip-icon-button';
|
package/dist/component/ExternalInterface/View/ViewBuilderUI/components/common/section-card.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
|
+
export declare const SectionCard: ({ title, description, actions, children, className }: {
|
|
4
|
+
title: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
actions?: ReactNode;
|
|
7
|
+
children: ReactNode;
|
|
8
|
+
className?: string;
|
|
9
|
+
}) => React.JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { Dispatch } from 'react';
|
|
3
|
+
export declare const Segment: <T extends string>({ value, options, onChange, ariaLabel }: {
|
|
4
|
+
value: T;
|
|
5
|
+
options: Array<{
|
|
6
|
+
value: T;
|
|
7
|
+
label: string;
|
|
8
|
+
}>;
|
|
9
|
+
onChange: Dispatch<T>;
|
|
10
|
+
ariaLabel: string;
|
|
11
|
+
}) => React.JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type MouseEventHandler, type ReactNode } from 'react';
|
|
3
|
+
export type TooltipIconButtonProps = {
|
|
4
|
+
tooltip: string;
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
className?: string;
|
|
7
|
+
color?: string;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
onClick?: MouseEventHandler<HTMLButtonElement>;
|
|
10
|
+
outline?: boolean;
|
|
11
|
+
size?: 'sm' | 'lg';
|
|
12
|
+
};
|
|
13
|
+
export declare const TooltipIconButton: ({ tooltip, children, className, color, disabled, onClick, outline, size }: TooltipIconButtonProps) => React.JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ConditionalFormatRule, FieldMetadata } from '../view-builder-types';
|
|
3
|
+
export declare const ConditionalFormatBuilder: ({ rules, metadata, onChange }: {
|
|
4
|
+
rules: ConditionalFormatRule[];
|
|
5
|
+
metadata: FieldMetadata[];
|
|
6
|
+
onChange: (rules: ConditionalFormatRule[]) => void;
|
|
7
|
+
}) => React.JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { FilterCondition } from '../view-builder-types';
|
|
3
|
+
export declare const FilterBuilder: ({ conditions, onChange }: {
|
|
4
|
+
conditions: FilterCondition[];
|
|
5
|
+
onChange: (conditions: FilterCondition[]) => void;
|
|
6
|
+
}) => React.JSX.Element;
|
package/dist/component/ExternalInterface/View/ViewBuilderUI/components/filter-value-editor.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { FieldMetadata, FilterCondition, ViewColumnConfig } from '../view-builder-types';
|
|
3
|
+
export declare const FilterValueEditor: ({ condition, field, onChange }: {
|
|
4
|
+
condition: FilterCondition;
|
|
5
|
+
field?: FieldMetadata | ViewColumnConfig;
|
|
6
|
+
onChange: (changes: Partial<FilterCondition>) => void;
|
|
7
|
+
}) => React.JSX.Element;
|
package/dist/component/ExternalInterface/View/ViewBuilderUI/components/form/checkbox-input.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type ReactNode } from 'react';
|
|
3
|
+
export type CheckboxInputProps = {
|
|
4
|
+
label?: ReactNode;
|
|
5
|
+
description?: ReactNode;
|
|
6
|
+
checked?: boolean;
|
|
7
|
+
onChange?: (checked: boolean) => void;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
compact?: boolean;
|
|
10
|
+
className?: string;
|
|
11
|
+
ariaLabel?: string;
|
|
12
|
+
};
|
|
13
|
+
export declare const CheckboxInput: ({ label, description, checked, onChange, disabled, compact, className, ariaLabel }: CheckboxInputProps) => React.JSX.Element;
|
package/dist/component/ExternalInterface/View/ViewBuilderUI/components/form/color-picker-input.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
|
+
export type ColorPickerInputProps = {
|
|
4
|
+
label?: ReactNode;
|
|
5
|
+
description?: ReactNode;
|
|
6
|
+
value?: string;
|
|
7
|
+
onChange?: (value: string) => void;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
className?: string;
|
|
10
|
+
};
|
|
11
|
+
export declare const ColorPickerInput: ({ label, description, value, onChange, disabled, className }: ColorPickerInputProps) => React.JSX.Element;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
|
+
import type { SelectOption } from './select-box';
|
|
4
|
+
export type CreatableSelectBoxProps = {
|
|
5
|
+
label?: ReactNode;
|
|
6
|
+
description?: ReactNode;
|
|
7
|
+
error?: ReactNode;
|
|
8
|
+
required?: boolean;
|
|
9
|
+
value?: string[];
|
|
10
|
+
options?: SelectOption<string>[];
|
|
11
|
+
onChange?: (value: string[]) => void;
|
|
12
|
+
placeholder?: string;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
className?: string;
|
|
15
|
+
inputClassName?: string;
|
|
16
|
+
};
|
|
17
|
+
export declare const CreatableSelectBox: ({ label, description, error, required, value, options, onChange, placeholder, disabled, className, inputClassName }: CreatableSelectBoxProps) => React.JSX.Element;
|
package/dist/component/ExternalInterface/View/ViewBuilderUI/components/form/date-picker-input.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
|
+
export type DatePickerInputProps = {
|
|
4
|
+
label?: ReactNode;
|
|
5
|
+
description?: ReactNode;
|
|
6
|
+
error?: ReactNode;
|
|
7
|
+
required?: boolean;
|
|
8
|
+
value?: Date | string | null;
|
|
9
|
+
onChange?: (value: Date | undefined) => void;
|
|
10
|
+
min?: Date;
|
|
11
|
+
max?: Date;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
placeholder?: string;
|
|
14
|
+
format?: string;
|
|
15
|
+
className?: string;
|
|
16
|
+
enableMask?: boolean;
|
|
17
|
+
};
|
|
18
|
+
export declare const DatePickerInput: ({ label, description, error, required, value, onChange, min, max, disabled, placeholder, format, className, enableMask }: DatePickerInputProps) => React.JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { CSSProperties, ReactNode } from 'react';
|
|
3
|
+
export type FormFieldProps = {
|
|
4
|
+
label?: ReactNode;
|
|
5
|
+
description?: ReactNode;
|
|
6
|
+
error?: ReactNode;
|
|
7
|
+
required?: boolean;
|
|
8
|
+
className?: string;
|
|
9
|
+
inputClassName?: string;
|
|
10
|
+
style?: CSSProperties;
|
|
11
|
+
children: ReactNode;
|
|
12
|
+
};
|
|
13
|
+
export declare const FormField: ({ label, description, error, required, className, inputClassName, style, children }: FormFieldProps) => React.JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export * from './form-field';
|
|
2
|
+
export * from './text-input';
|
|
3
|
+
export * from './number-input';
|
|
4
|
+
export * from './select-box';
|
|
5
|
+
export * from './multi-select-box';
|
|
6
|
+
export * from './creatable-select-box';
|
|
7
|
+
export * from './checkbox-input';
|
|
8
|
+
export * from './switch-input';
|
|
9
|
+
export * from './date-picker-input';
|
|
10
|
+
export * from './color-picker-input';
|
package/dist/component/ExternalInterface/View/ViewBuilderUI/components/form/multi-select-box.d.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
|
+
import type { SelectOption } from './select-box';
|
|
4
|
+
export type MultiSelectBoxProps<T = string> = {
|
|
5
|
+
label?: ReactNode;
|
|
6
|
+
description?: ReactNode;
|
|
7
|
+
error?: ReactNode;
|
|
8
|
+
required?: boolean;
|
|
9
|
+
value?: T[];
|
|
10
|
+
options: Array<SelectOption<T>>;
|
|
11
|
+
onChange?: (value: T[]) => void;
|
|
12
|
+
placeholder?: string;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
searchable?: boolean;
|
|
15
|
+
className?: string;
|
|
16
|
+
inputClassName?: string;
|
|
17
|
+
menuPosition?: 'fixed' | 'absolute';
|
|
18
|
+
};
|
|
19
|
+
export declare const MultiSelectBox: <T>({ label, description, error, required, value, options, onChange, placeholder, disabled, searchable, className, inputClassName, menuPosition }: MultiSelectBoxProps<T>) => React.JSX.Element;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
|
+
export type NumberInputProps = {
|
|
4
|
+
label?: ReactNode;
|
|
5
|
+
description?: ReactNode;
|
|
6
|
+
error?: ReactNode;
|
|
7
|
+
required?: boolean;
|
|
8
|
+
value?: number | null;
|
|
9
|
+
onChange?: (value: number | undefined) => void;
|
|
10
|
+
min?: number;
|
|
11
|
+
max?: number;
|
|
12
|
+
step?: number;
|
|
13
|
+
format?: string;
|
|
14
|
+
placeholder?: string;
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
readOnly?: boolean;
|
|
17
|
+
showSpinButton?: boolean;
|
|
18
|
+
className?: string;
|
|
19
|
+
inputClassName?: string;
|
|
20
|
+
width?: number | string;
|
|
21
|
+
};
|
|
22
|
+
export declare const NumberInput: ({ label, description, error, required, value, onChange, min, max, step, format, placeholder, disabled, readOnly, showSpinButton, className, inputClassName, width }: NumberInputProps) => React.JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
|
+
export type SelectOption<T = string> = {
|
|
4
|
+
value: T;
|
|
5
|
+
label: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
[key: string]: unknown;
|
|
8
|
+
};
|
|
9
|
+
export type SelectBoxProps<T = string> = {
|
|
10
|
+
label?: ReactNode;
|
|
11
|
+
description?: ReactNode;
|
|
12
|
+
error?: ReactNode;
|
|
13
|
+
required?: boolean;
|
|
14
|
+
value?: T | null;
|
|
15
|
+
options: Array<SelectOption<T>>;
|
|
16
|
+
onChange?: (value: T | undefined) => void;
|
|
17
|
+
callback?: (value: any) => void;
|
|
18
|
+
placeholder?: string;
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
clearable?: boolean;
|
|
21
|
+
searchable?: boolean;
|
|
22
|
+
className?: string;
|
|
23
|
+
inputClassName?: string;
|
|
24
|
+
menuPosition?: 'fixed' | 'absolute';
|
|
25
|
+
ariaLabel?: string;
|
|
26
|
+
};
|
|
27
|
+
export declare const SelectBox: <T>({ label, description, error, required, value, options, onChange, callback, placeholder, disabled, clearable, searchable, className, inputClassName, menuPosition, ariaLabel }: SelectBoxProps<T>) => React.JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type ReactNode } from 'react';
|
|
3
|
+
export type SwitchInputProps = {
|
|
4
|
+
label: ReactNode;
|
|
5
|
+
description?: ReactNode;
|
|
6
|
+
checked: boolean;
|
|
7
|
+
onChange: (checked: boolean) => void;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
compact?: boolean;
|
|
10
|
+
className?: string;
|
|
11
|
+
suffix?: ReactNode;
|
|
12
|
+
};
|
|
13
|
+
export declare const SwitchInput: ({ label, description, checked, onChange, disabled, compact, className, suffix }: SwitchInputProps) => React.JSX.Element;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { InputHTMLAttributes, ReactNode, TextareaHTMLAttributes } from 'react';
|
|
3
|
+
type SharedProps = {
|
|
4
|
+
label?: ReactNode;
|
|
5
|
+
description?: ReactNode;
|
|
6
|
+
error?: ReactNode;
|
|
7
|
+
required?: boolean;
|
|
8
|
+
value?: string | number | readonly string[] | null;
|
|
9
|
+
onChange?: (value: string) => void;
|
|
10
|
+
onBlur?: (value: string) => void;
|
|
11
|
+
className?: string;
|
|
12
|
+
inputClassName?: string;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
readOnly?: boolean;
|
|
15
|
+
placeholder?: string;
|
|
16
|
+
id?: string;
|
|
17
|
+
name?: string;
|
|
18
|
+
};
|
|
19
|
+
type TextInputProps = SharedProps & Omit<InputHTMLAttributes<HTMLInputElement>, 'value' | 'onChange' | 'onBlur' | 'type' | 'className'> & {
|
|
20
|
+
type?: 'text' | 'password' | 'email' | 'search' | 'tel' | 'url';
|
|
21
|
+
};
|
|
22
|
+
type TextAreaProps = SharedProps & Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, 'value' | 'onChange' | 'onBlur' | 'className'> & {
|
|
23
|
+
type: 'textarea';
|
|
24
|
+
rows?: number;
|
|
25
|
+
};
|
|
26
|
+
export type ViewTextInputProps = TextInputProps | TextAreaProps;
|
|
27
|
+
export declare const TextInput: (props: ViewTextInputProps) => React.JSX.Element;
|
|
28
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { FieldMetadata, GroupRule } from '../view-builder-types';
|
|
3
|
+
export declare const GroupBuilder: ({ groups, metadata, disabled, onChange }: {
|
|
4
|
+
groups: GroupRule[];
|
|
5
|
+
metadata: FieldMetadata[];
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
onChange: (groups: GroupRule[]) => void;
|
|
8
|
+
}) => React.JSX.Element;
|
package/dist/component/ExternalInterface/View/ViewBuilderUI/components/quick-filter-builder.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { QuickFilterConfig } from '../view-builder-types';
|
|
3
|
+
export declare const QuickFilterBuilder: ({ filters, onChange }: {
|
|
4
|
+
filters: QuickFilterConfig[];
|
|
5
|
+
onChange: (filters: QuickFilterConfig[]) => void;
|
|
6
|
+
}) => React.JSX.Element;
|
package/dist/component/ExternalInterface/View/ViewBuilderUI/components/renderer-options-editor.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { FieldMetadata, ViewColumnConfig } from '../view-builder-types';
|
|
3
|
+
export declare const createRendererDefaults: (renderer: string) => Record<string, unknown>;
|
|
4
|
+
export declare const RendererOptionsEditor: ({ column, metadata, onChange }: {
|
|
5
|
+
column: ViewColumnConfig;
|
|
6
|
+
metadata: FieldMetadata[];
|
|
7
|
+
onChange: (changes: Partial<ViewColumnConfig>) => void;
|
|
8
|
+
}) => React.JSX.Element;
|
package/dist/component/ExternalInterface/View/ViewBuilderUI/components/selected-column-editor.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { FieldMetadata, ViewColumnConfig, ViewDisplayConfig } from '../view-builder-types';
|
|
3
|
+
export declare const SelectedColumnEditor: ({ column, metadata, previewRow, display, onChange }: {
|
|
4
|
+
column?: ViewColumnConfig;
|
|
5
|
+
metadata: FieldMetadata[];
|
|
6
|
+
previewRow?: Record<string, unknown>;
|
|
7
|
+
display?: ViewDisplayConfig;
|
|
8
|
+
onChange: (changes: Partial<ViewColumnConfig>) => void;
|
|
9
|
+
}) => React.JSX.Element | null;
|
package/dist/component/ExternalInterface/View/ViewBuilderUI/components/selected-column-list.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { FieldMetadata, ViewColumnConfig } from '../view-builder-types';
|
|
3
|
+
export declare const SelectedColumnList: ({ columns, metadata, selectedId, checked, onChecked, onSelect, onChangeColumn, isExpanded, onToggleExpand, onDragDropInsert }: {
|
|
4
|
+
columns: ViewColumnConfig[];
|
|
5
|
+
metadata: FieldMetadata[];
|
|
6
|
+
selectedId?: string;
|
|
7
|
+
checked: string[];
|
|
8
|
+
onChecked: (ids: string[]) => void;
|
|
9
|
+
onSelect: (id: string) => void;
|
|
10
|
+
onChangeColumn: (id: string, changes: Partial<ViewColumnConfig>) => void;
|
|
11
|
+
isExpanded: boolean;
|
|
12
|
+
onToggleExpand: () => void;
|
|
13
|
+
onDragDropInsert?: (draggedData: any, targetIndex: number) => void;
|
|
14
|
+
}) => React.JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { FieldMetadata, PreviewDevice, PreviewState, ViewDefinition } from '../view-builder-types';
|
|
3
|
+
export declare const ViewLivePreview: ({ view, metadata, rows, device, state, onDevice, onState, layout, onChangeLayout }: {
|
|
4
|
+
view: ViewDefinition;
|
|
5
|
+
metadata: FieldMetadata[];
|
|
6
|
+
rows: Record<string, unknown>[];
|
|
7
|
+
device: PreviewDevice;
|
|
8
|
+
state: PreviewState;
|
|
9
|
+
onDevice: (device: PreviewDevice) => void;
|
|
10
|
+
onState: (state: PreviewState) => void;
|
|
11
|
+
layout?: "normal" | "minimized" | "expanded";
|
|
12
|
+
onChangeLayout?: (layout: "normal" | "minimized" | "expanded") => void;
|
|
13
|
+
}) => React.JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
type Props = {
|
|
3
|
+
step: number;
|
|
4
|
+
onStep: (step: number) => void;
|
|
5
|
+
};
|
|
6
|
+
export declare const VIEW_BUILDER_STEPS: readonly ["Thông tin View", "Cấu hình cột", "Bộ lọc mặc định", "Hành động & hiển thị", "Phân quyền View"];
|
|
7
|
+
export declare const ViewStepper: ({ step, onStep }: Props) => React.JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import './view-builder.scss';
|
|
2
|
+
export { ViewBuilderWizard } from './view-builder-wizard';
|
|
3
|
+
export type { ViewBuilderWizardProps } from './view-builder-wizard';
|
|
4
|
+
export { createDefaultView, createColumnsFromMetadata, createColumnFromMetadata, DEFAULT_DISPLAY_CONFIG } from './view-builder-defaults';
|
|
5
|
+
export { mapGridColumnsToFieldMetadata } from './view-builder-metadata';
|
|
6
|
+
export { validateView } from './view-builder-validator';
|
|
7
|
+
export { ViewBuilderProvider, useViewBuilderContext } from './view-builder-context';
|
|
8
|
+
export type { ViewBuilderContextValue } from './view-builder-context';
|
|
9
|
+
export * from './view-builder-types';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type ViewDefinition } from '../view-builder-types';
|
|
3
|
+
export declare const ViewColumnsStep2: ({ data, selectedId, onSelect, onChange, isExpanded, onToggleExpand }: {
|
|
4
|
+
data: ViewDefinition;
|
|
5
|
+
selectedId?: string;
|
|
6
|
+
onSelect: (id: string) => void;
|
|
7
|
+
onChange: (changes: Partial<ViewDefinition>) => void;
|
|
8
|
+
isExpanded: boolean;
|
|
9
|
+
onToggleExpand: () => void;
|
|
10
|
+
}) => React.JSX.Element;
|
package/dist/component/ExternalInterface/View/ViewBuilderUI/steps/view-group-aggregate-step.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ViewDefinition } from '../view-builder-types';
|
|
3
|
+
type ViewDefinitionChangeHandler = (changes: Partial<ViewDefinition>) => void;
|
|
4
|
+
export declare const ViewGroupAggregateStep: ({ data, onChange }: {
|
|
5
|
+
data: ViewDefinition;
|
|
6
|
+
onChange: ViewDefinitionChangeHandler;
|
|
7
|
+
}) => React.JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ViewBuilderMode, ViewDefinition } from '../view-builder-types';
|
|
3
|
+
export declare const ViewInformationStep: ({ data, mode, canAssignPermission, onChange, onClear }: {
|
|
4
|
+
data: ViewDefinition;
|
|
5
|
+
mode: ViewBuilderMode;
|
|
6
|
+
canAssignPermission: boolean;
|
|
7
|
+
onChange: (changes: Partial<ViewDefinition>) => void;
|
|
8
|
+
onClear?: () => void;
|
|
9
|
+
}) => React.JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ViewDefinition } from '../view-builder-types';
|
|
3
|
+
export declare const ViewPermissionStep: ({ data, readOnly, onChange }: {
|
|
4
|
+
data: ViewDefinition;
|
|
5
|
+
readOnly: boolean;
|
|
6
|
+
onChange: (changes: Partial<ViewDefinition>) => void;
|
|
7
|
+
}) => React.JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ViewBuilderMode, ViewDefinition } from '../view-builder-types';
|
|
3
|
+
import type { ViewValidation } from '../view-builder-validator';
|
|
4
|
+
export declare const ViewSummaryStep: ({ data, validation, onStep, mode, canDelete, onSubmit, onDelete }: {
|
|
5
|
+
data: ViewDefinition;
|
|
6
|
+
validation: ViewValidation;
|
|
7
|
+
onStep: (step: number) => void;
|
|
8
|
+
mode: ViewBuilderMode;
|
|
9
|
+
canDelete: boolean;
|
|
10
|
+
onSubmit: () => void;
|
|
11
|
+
onDelete: () => void;
|
|
12
|
+
}) => React.JSX.Element;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { IExternalInterface } from '../../../../interface';
|
|
3
|
+
import type { FieldMetadata, ViewActionConfig, ViewColumnConfig } from './view-builder-types';
|
|
4
|
+
export type ViewBuilderContextValue = {
|
|
5
|
+
metadata: FieldMetadata[];
|
|
6
|
+
defaultColumns: ViewColumnConfig[];
|
|
7
|
+
detailColumns: ViewColumnConfig[];
|
|
8
|
+
rows: Record<string, unknown>[];
|
|
9
|
+
paramToolbar: any[];
|
|
10
|
+
optionConfig: Record<string, any[]>;
|
|
11
|
+
optionTemplateOptions: Array<{
|
|
12
|
+
value: string;
|
|
13
|
+
label: string;
|
|
14
|
+
}>;
|
|
15
|
+
actionOptions: ViewActionConfig[];
|
|
16
|
+
actionsLoaded: boolean;
|
|
17
|
+
t: any;
|
|
18
|
+
processEnv?: any;
|
|
19
|
+
externalInterfaceProps?: IExternalInterface;
|
|
20
|
+
viewPayload?: Record<string, any>;
|
|
21
|
+
showPreviewSteps: number[];
|
|
22
|
+
defaultShowPreviewSteps: number[];
|
|
23
|
+
optionView?: any[];
|
|
24
|
+
onSelectViewToEdit?: (viewId: string) => void;
|
|
25
|
+
selectedSourceViewId?: string;
|
|
26
|
+
};
|
|
27
|
+
export declare const ViewBuilderContext: React.Context<ViewBuilderContextValue>;
|
|
28
|
+
export declare const ViewBuilderProvider: React.Provider<ViewBuilderContextValue>;
|
|
29
|
+
export declare const useViewBuilderContext: () => ViewBuilderContextValue;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { FieldMetadata, ViewColumnConfig, ViewDefinition, ViewDisplayConfig, ViewScope } from './view-builder-types';
|
|
2
|
+
export declare const DEFAULT_DISPLAY_CONFIG: ViewDisplayConfig;
|
|
3
|
+
export declare const createColumnFromMetadata: (meta: FieldMetadata, order: number, freeze?: ViewColumnConfig["freeze"]) => ViewColumnConfig;
|
|
4
|
+
export declare const createColumnsFromMetadata: (metadata: FieldMetadata[], limit?: number) => ViewColumnConfig[];
|
|
5
|
+
export type CreateDefaultViewOptions = {
|
|
6
|
+
resourceCode: string;
|
|
7
|
+
moduleCode?: string;
|
|
8
|
+
code?: string;
|
|
9
|
+
name?: string;
|
|
10
|
+
description?: string;
|
|
11
|
+
folder?: string;
|
|
12
|
+
scope?: ViewScope;
|
|
13
|
+
isDefault?: boolean;
|
|
14
|
+
defaultColumnCount?: number;
|
|
15
|
+
};
|
|
16
|
+
export declare const createDefaultView: (metadata: FieldMetadata[], options: CreateDefaultViewOptions) => ViewDefinition;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { FieldDataType, LoadingMode, OptionItem, RendererOptionDefinition } from './view-builder-types';
|
|
2
|
+
export declare const RENDERER_OPTIONS: Record<FieldDataType, OptionItem[]>;
|
|
3
|
+
export declare const FORMAT_OPTIONS: Record<FieldDataType, OptionItem[]>;
|
|
4
|
+
export declare const FILTER_OPERATORS: Record<FieldDataType, OptionItem[]>;
|
|
5
|
+
export declare const QUICK_FILTER_CONTROLS: Record<FieldDataType, OptionItem[]>;
|
|
6
|
+
export declare const AGGREGATE_FUNCTIONS: Record<FieldDataType, OptionItem[]>;
|
|
7
|
+
export declare const LOADING_MODE_OPTIONS: OptionItem<LoadingMode>[];
|
|
8
|
+
export declare const PAGE_SIZE_OPTIONS: number[];
|
|
9
|
+
export declare const AUTO_REFRESH_OPTIONS: number[];
|
|
10
|
+
export declare const RENDERER_OPTION_SCHEMAS: Record<string, RendererOptionDefinition[]>;
|
|
11
|
+
export declare const getRendererOptions: (dataType: FieldDataType) => OptionItem[];
|
|
12
|
+
export declare const getFormatOptions: (dataType: FieldDataType) => OptionItem[];
|
|
13
|
+
export declare const getFilterOperators: (dataType: FieldDataType) => OptionItem[];
|
|
14
|
+
export declare const getQuickFilterControls: (dataType: FieldDataType) => OptionItem[];
|
|
15
|
+
export declare const getAggregateFunctions: (dataType: FieldDataType) => OptionItem[];
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { CSSProperties, ReactNode } from 'react';
|
|
3
|
+
import type { AggregateRule, ConditionalFormatRule, FieldMetadata, FilterCondition, QuickFilterConfig, ViewColumnConfig, ViewDefinition, ViewDisplayConfig } from './view-builder-types';
|
|
4
|
+
export type PreviewRuntimeContext = {
|
|
5
|
+
currentUserId?: string;
|
|
6
|
+
currentDepartmentId?: string;
|
|
7
|
+
};
|
|
8
|
+
export declare const conditionMatches: (row: Record<string, unknown>, conditionInput: FilterCondition, context?: PreviewRuntimeContext) => boolean;
|
|
9
|
+
export declare const applyViewRows: (rows: Record<string, unknown>[], view: ViewDefinition, context?: PreviewRuntimeContext) => Record<string, unknown>[];
|
|
10
|
+
export declare const applyQuickFilters: (rows: Record<string, unknown>[], quickFilters: QuickFilterConfig[], values: Record<string, unknown>) => Record<string, unknown>[];
|
|
11
|
+
export declare const aggregate: (rows: Record<string, unknown>[], rule: AggregateRule) => unknown;
|
|
12
|
+
export declare const conditionalPresentation: (row: Record<string, unknown>, rules: ConditionalFormatRule[], columnField?: string) => {
|
|
13
|
+
rowStyle?: CSSProperties;
|
|
14
|
+
cellStyle?: CSSProperties;
|
|
15
|
+
icon?: string;
|
|
16
|
+
};
|
|
17
|
+
export declare const conditionalStyle: (row: Record<string, unknown>, rules: ConditionalFormatRule[]) => React.CSSProperties | undefined;
|
|
18
|
+
export declare const formatPreviewValue: (raw: unknown, field: FieldMetadata | undefined, column: ViewColumnConfig, row?: Record<string, unknown>, display?: ViewDisplayConfig) => ReactNode;
|
|
19
|
+
export declare const formatAggregateValue: (raw: unknown, rule: AggregateRule, field: FieldMetadata | undefined, display: ViewDisplayConfig) => string;
|
|
20
|
+
export declare const operatorLabel: (dataType: FieldMetadata["dataType"], operator: string) => string;
|