dinocollab-core 2.2.52 → 2.2.54
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/filter-bar/index.js +1 -1
- package/dist/form/index.js +1 -1
- package/dist/src/filter-bar/components/filter-input.js +1 -1
- package/dist/src/filter-bar/components/filter-input.js.map +1 -1
- package/dist/src/filter-bar/components/filter-summary.js +1 -1
- package/dist/src/filter-bar/components/filter-summary.js.map +1 -1
- package/dist/src/filter-bar/components/ui.units.js +1 -1
- package/dist/src/filter-bar/components/ui.units.js.map +1 -1
- package/dist/src/filter-bar/convert-to-graphql.js +1 -1
- package/dist/src/filter-bar/convert-to-graphql.js.map +1 -1
- package/dist/src/filter-bar/helpers.js +1 -1
- package/dist/src/filter-bar/helpers.js.map +1 -1
- package/dist/src/filter-bar/index.create.js +1 -1
- package/dist/src/filter-bar/index.create.js.map +1 -1
- package/dist/src/filter-bar/index.dino.js +1 -1
- package/dist/src/filter-bar/index.dino.js.map +1 -1
- package/dist/src/filter-bar/menu/create-form-field-boolean.js +1 -1
- package/dist/src/filter-bar/menu/create-form-field-boolean.js.map +1 -1
- package/dist/src/filter-bar/menu/create-form-field-datetime.js +1 -1
- package/dist/src/filter-bar/menu/create-form-field-datetime.js.map +1 -1
- package/dist/src/filter-bar/menu/create-form-field-number.js +1 -1
- package/dist/src/filter-bar/menu/create-form-field-number.js.map +1 -1
- package/dist/src/filter-bar/menu/create-form-field-select-with-api.js +1 -1
- package/dist/src/filter-bar/menu/create-form-field-select-with-api.js.map +1 -1
- package/dist/src/filter-bar/menu/create-form-field-select.js +1 -1
- package/dist/src/filter-bar/menu/create-form-field-select.js.map +1 -1
- package/dist/src/filter-bar/menu/create-form-field-string.js +1 -1
- package/dist/src/filter-bar/menu/create-form-field-string.js.map +1 -1
- package/dist/src/filter-bar/menu/create.js +1 -1
- package/dist/src/filter-bar/menu/create.js.map +1 -1
- package/dist/src/filter-bar/types.js.map +1 -1
- package/dist/src/form/create.autocomplete.chips.js +1 -1
- package/dist/src/form/create.autocomplete.chips.js.map +1 -1
- package/dist/src/form/create.checkbox.js +1 -1
- package/dist/src/form/create.checkbox.js.map +1 -1
- package/dist/src/form/create.color-picker.js +1 -1
- package/dist/src/form/create.color-picker.js.map +1 -1
- package/dist/src/form/create.date-expired.js +1 -1
- package/dist/src/form/create.date-expired.js.map +1 -1
- package/dist/src/form/create.date-picker.js +1 -1
- package/dist/src/form/create.date-picker.js.map +1 -1
- package/dist/src/form/create.form-base.js +1 -1
- package/dist/src/form/create.form-base.js.map +1 -1
- package/dist/src/form/create.form-grid-layout.js +1 -1
- package/dist/src/form/create.form-grid-layout.js.map +1 -1
- package/dist/src/form/create.input.file.js +1 -1
- package/dist/src/form/create.input.file.js.map +1 -1
- package/dist/src/form/create.input.js +1 -1
- package/dist/src/form/create.input.js.map +1 -1
- package/dist/src/form/create.select-simple.js +1 -1
- package/dist/src/form/create.select-simple.js.map +1 -1
- package/dist/src/form/create.select-with-api.js +1 -1
- package/dist/src/form/create.select-with-api.js.map +1 -1
- package/dist/src/form/decorator.form.js +1 -1
- package/dist/src/form/decorator.form.js.map +1 -1
- package/dist/src/form/decorator.js +1 -1
- package/dist/src/form/decorator.js.map +1 -1
- package/dist/src/form/dino-form.js +1 -1
- package/dist/src/form/dino-form.js.map +1 -1
- package/dist/src/form/error-handler.js +1 -1
- package/dist/src/form/error-handler.js.map +1 -1
- package/dist/src/form/helpers.js +1 -1
- package/dist/src/form/helpers.js.map +1 -1
- package/dist/src/form/v2/create.autocomplete.chips.js +1 -1
- package/dist/src/form/v2/create.autocomplete.chips.js.map +1 -1
- package/dist/src/form/v2/create.color-picker.js +1 -1
- package/dist/src/form/v2/create.color-picker.js.map +1 -1
- package/dist/src/form/v2/create.date-expired.js +1 -1
- package/dist/src/form/v2/create.date-expired.js.map +1 -1
- package/dist/src/form/v2/create.date-picker.js +1 -1
- package/dist/src/form/v2/create.date-picker.js.map +1 -1
- package/dist/src/form/v2/create.input.js +1 -1
- package/dist/src/form/v2/create.input.js.map +1 -1
- package/dist/src/form/v2/create.select-simple.js +1 -1
- package/dist/src/form/v2/create.select-simple.js.map +1 -1
- package/dist/src/form/v2/create.select-with-api.js +1 -1
- package/dist/src/form/v2/create.select-with-api.js.map +1 -1
- package/dist/src/form/validator.js +1 -1
- package/dist/src/form/validator.js.map +1 -1
- package/dist/src/http-service/graphql/request-param.js +1 -1
- package/dist/src/http-service/graphql/request-param.js.map +1 -1
- package/dist/src/utils/helpers.js +1 -1
- package/dist/src/utils/helpers.js.map +1 -1
- package/dist/types/filter-bar/components/filter-input.d.ts +1 -0
- package/dist/types/filter-bar/components/filter-input.types.d.ts +6 -1
- package/dist/types/filter-bar/components/filter-summary.types.d.ts +2 -2
- package/dist/types/filter-bar/components/ui.units.d.ts +3 -3
- package/dist/types/filter-bar/helpers.d.ts +8 -0
- package/dist/types/filter-bar/index.create.d.ts +1 -1
- package/dist/types/filter-bar/index.d.ts +2 -1
- package/dist/types/filter-bar/index.dino.d.ts +3 -2
- package/dist/types/filter-bar/menu/create-form-field-boolean.d.ts +3 -3
- package/dist/types/filter-bar/menu/create-form-field-datetime.d.ts +17 -27
- package/dist/types/filter-bar/menu/create-form-field-number.d.ts +2 -2
- package/dist/types/filter-bar/menu/create-form-field-select-with-api.d.ts +3 -8
- package/dist/types/filter-bar/menu/create-form-field-select.d.ts +15 -1
- package/dist/types/filter-bar/menu/types.d.ts +4 -2
- package/dist/types/filter-bar/types.d.ts +8 -1
- package/dist/types/form/decorator.d.ts +28 -2
- package/dist/types/form/dino-form.d.ts +2 -2
- package/dist/types/form/helpers.d.ts +1 -1
- package/dist/types/form/index.d.ts +1 -1
- package/dist/types/form/types.d.ts +12 -2
- package/dist/types/form/validator.d.ts +82 -32
- package/dist/types/utils/helpers.d.ts +6 -1
- package/package.json +1 -1
- package/dist/src/filter-bar/components/filter-input.mobile.js +0 -2
- package/dist/src/filter-bar/components/filter-input.mobile.js.map +0 -1
|
@@ -1,16 +1,8 @@
|
|
|
1
1
|
import type { FC } from 'react';
|
|
2
|
-
import type { TDateLogic,
|
|
2
|
+
import type { TDateLogic, TValueFormatterParam } from '../types';
|
|
3
3
|
import type { IFieldMenuConfig, IFilterMenuFormProps } from './types';
|
|
4
|
-
/** Date logic options available in `single` mode. */
|
|
5
|
-
export type TDateSingleLogic = Exclude<TDateLogic, 'range'>;
|
|
6
4
|
/** The MUI picker variant to render inside the filter menu. */
|
|
7
|
-
export type TDateTimePickerType = 'date' | 'datetime'
|
|
8
|
-
/**
|
|
9
|
-
* Selection mode for the DateTime filter.
|
|
10
|
-
* - `'single'` — one value per Apply; values accumulate with OR / AND logic.
|
|
11
|
-
* - `'range'` — two pickers (From / To); always stores exactly `[fromISO, toISO]`.
|
|
12
|
-
*/
|
|
13
|
-
export type TDateTimeMode = 'single' | 'range';
|
|
5
|
+
export type TDateTimePickerType = 'date' | 'datetime';
|
|
14
6
|
/** Props for the `FormFieldDateTime` component returned by `createFormFieldDateTime`. Extends the base filter-menu form props. */
|
|
15
7
|
export interface IFormFieldDateTimeProps<T> extends IFilterMenuFormProps<T> {
|
|
16
8
|
}
|
|
@@ -22,40 +14,38 @@ export interface IFormFieldDateTimeParam<T> {
|
|
|
22
14
|
* Controls which MUI picker is rendered.
|
|
23
15
|
* - `'date'` → `DatePicker` (default)
|
|
24
16
|
* - `'datetime'` → `DateTimePicker`
|
|
25
|
-
*
|
|
26
|
-
* @default 'datetime'
|
|
17
|
+
* @default 'date'
|
|
27
18
|
*/
|
|
28
19
|
pickerType?: TDateTimePickerType;
|
|
29
20
|
/**
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
|
|
33
|
-
|
|
21
|
+
* Allowed date logic options for toggle.
|
|
22
|
+
* @default ['before', 'after', 'range']
|
|
23
|
+
*/
|
|
24
|
+
allowedLogics?: TDateLogic[];
|
|
25
|
+
/**
|
|
26
|
+
* Default date logic selected when opening the form for the first time.
|
|
27
|
+
* @default 'before'
|
|
34
28
|
*/
|
|
35
|
-
|
|
29
|
+
defaultLogic?: TDateLogic;
|
|
36
30
|
}
|
|
37
31
|
/**
|
|
38
32
|
* Factory function that creates a `FormFieldDateTime` filter-menu component.
|
|
39
33
|
*
|
|
40
34
|
* The generated component renders a date / time picker inside a popper/menu panel.
|
|
41
|
-
*
|
|
42
|
-
* - **single** (default) — user picks one value per submission; values accumulate
|
|
43
|
-
* and an OR / AND logic toggle appears when more than one value is active.
|
|
44
|
-
* - **range** — two pickers rendered (From / To); always stores exactly
|
|
45
|
-
* `[fromISO, toISO]`, replacing any previous range on each Apply.
|
|
35
|
+
* Supports dynamic switching between `before`, `after`, and `range` conditions.
|
|
46
36
|
*
|
|
47
37
|
* All stored values are ISO 8601 strings (`TFieldValid = string`).
|
|
48
38
|
*
|
|
49
|
-
* @param params - Static configuration (picker type,
|
|
39
|
+
* @param params - Static configuration (picker type, allowed logics, optional field config override)
|
|
50
40
|
* @returns A React FC ready to be used as a date/time filter-menu field component
|
|
51
41
|
*/
|
|
52
42
|
export declare function createFormFieldDateTime<T>(params?: IFormFieldDateTimeParam<T>): FC<IFormFieldDateTimeProps<T>>;
|
|
53
43
|
export default createFormFieldDateTime;
|
|
44
|
+
export interface IFormatterDateTimeOptions {
|
|
45
|
+
pickerType?: TDateTimePickerType;
|
|
46
|
+
}
|
|
54
47
|
/**
|
|
55
48
|
* Creates a labelFormatter for use in summaryConfig.
|
|
56
49
|
* Formats ISO date strings to a human-readable format.
|
|
57
|
-
* For range fields, values are displayed as-is (no From/To prefix since index is unavailable).
|
|
58
50
|
*/
|
|
59
|
-
export declare function formatterDateTime(
|
|
60
|
-
dateLogic?: TDateLogic;
|
|
61
|
-
}) => string | undefined;
|
|
51
|
+
export declare function formatterDateTime<T = any>(options?: IFormatterDateTimeOptions): (param: TValueFormatterParam<T>) => string | undefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { FC } from 'react';
|
|
2
2
|
import type { IFieldMenuConfig, IFilterMenuFormProps } from './types';
|
|
3
|
-
import type { TFieldValid, TNumberOperator } from '../types';
|
|
3
|
+
import type { TFieldValid, TValueFormatterParam, TNumberOperator } from '../types';
|
|
4
4
|
/** Encodes operator + number into a single string stored in `values[]`. e.g. `"gt:18"` */
|
|
5
5
|
export declare function encodeNumberValue(operator: TNumberOperator, num: number): string;
|
|
6
6
|
/** Decodes an encoded number value back into its parts. Returns `null` if invalid. */
|
|
@@ -55,4 +55,4 @@ export default createFormFieldNumber;
|
|
|
55
55
|
* labelFormatter: { age: formatterNumber() }
|
|
56
56
|
* }
|
|
57
57
|
*/
|
|
58
|
-
export declare function formatterNumber(): (
|
|
58
|
+
export declare function formatterNumber<T = any>(): (param: TValueFormatterParam<T>) => string | undefined;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { FC, ReactNode } from 'react';
|
|
2
|
+
export { DEFAULT_STORAGE_KEY, getOptionLabelFromLocal, saveOptionLabelToLocal, saveOptionLabelsToLocal } from '../helpers';
|
|
2
3
|
import type { IFieldSelectOption } from './create-form-field-select';
|
|
3
|
-
import type { TFieldValid, TLogic } from '../types';
|
|
4
|
+
import type { TFieldType, TFieldValid, TLogic, TValueFormatterParam } from '../types';
|
|
4
5
|
import type { IFieldMenuConfig, IFilterMenuFormProps } from './types';
|
|
5
6
|
/** Props for the `FormFieldSelectWithApi` component returned by `createFormFieldSelectWithApi`. Extends the base filter-menu form props. */
|
|
6
7
|
export interface IFormFieldSelectWithApiProps<T> extends IFilterMenuFormProps<T> {
|
|
@@ -42,10 +43,4 @@ export interface IFormFieldSelectWithApiParam<T> {
|
|
|
42
43
|
*/
|
|
43
44
|
declare function createFormFieldSelectWithApi<T>(params: IFormFieldSelectWithApiParam<T>): FC<IFormFieldSelectWithApiProps<T>>;
|
|
44
45
|
export default createFormFieldSelectWithApi;
|
|
45
|
-
export declare function
|
|
46
|
-
value: string;
|
|
47
|
-
label: string;
|
|
48
|
-
}[], storageKey?: string): void;
|
|
49
|
-
export declare function saveOptionLabelToLocal(field: string, value: string, label: string, storageKey?: string): void;
|
|
50
|
-
export declare function getOptionLabelFromLocal(field: string, value: string, storageKey?: string): string | undefined;
|
|
51
|
-
export declare function formatterSelectWithApi<T = any>(field: keyof T | string, storageKey?: string): (value: TFieldValid) => string;
|
|
46
|
+
export declare function formatterSelectWithApi<T = any>(field: TFieldType<T>, storageKey?: string): (param: TValueFormatterParam<T>) => string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FC, ReactNode } from 'react';
|
|
2
|
-
import type { TFieldValid, TLogic } from '../types';
|
|
2
|
+
import type { TFieldType, TFieldValid, TLogic, TValueFormatterParam } from '../types';
|
|
3
3
|
import type { IFieldMenuConfig, IFilterMenuFormProps } from './types';
|
|
4
4
|
/** Props for the `FormFieldSelect` component returned by `createFormFieldSelect`. Extends the base filter-menu form props. */
|
|
5
5
|
export interface IFormFieldSelectProps<T> extends IFilterMenuFormProps<T> {
|
|
@@ -29,6 +29,8 @@ export interface IFormFieldSelectParam<T> {
|
|
|
29
29
|
top?: ReactNode;
|
|
30
30
|
/** If true, disables the field after submission (only for multi-select). @default false */
|
|
31
31
|
disabledAfterSubmit?: boolean;
|
|
32
|
+
/** Custom storage key for saving option labels to localStorage. Defaults to 'dino-filter-api-labels' */
|
|
33
|
+
storageKey?: string;
|
|
32
34
|
}
|
|
33
35
|
/**
|
|
34
36
|
* Factory function that creates a `FormFieldSelect` filter-menu component.
|
|
@@ -45,4 +47,16 @@ export interface IFormFieldSelectParam<T> {
|
|
|
45
47
|
* @returns A React FC ready to be used as a filter-menu field component
|
|
46
48
|
*/
|
|
47
49
|
declare function createFormFieldSelect<T>(params: IFormFieldSelectParam<T>): FC<IFormFieldSelectProps<T>>;
|
|
50
|
+
/**
|
|
51
|
+
* Creates a labelFormatter for use in summaryConfig / menuConfig.
|
|
52
|
+
* Formats select field values to their human-readable labels from local storage.
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* summaryConfig: {
|
|
56
|
+
* fields: {
|
|
57
|
+
* categories: { labelFormatter: dinoFilterBar.formatterSelect('categories') }
|
|
58
|
+
* }
|
|
59
|
+
* }
|
|
60
|
+
*/
|
|
61
|
+
export declare function formatterSelect<T = any>(field: TFieldType<T>, storageKey?: string): (param: TValueFormatterParam<T>) => string;
|
|
48
62
|
export default createFormFieldSelect;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ComponentType, ReactNode } from 'react';
|
|
2
2
|
import type { BoxProps, PopperProps } from '@mui/material';
|
|
3
3
|
import type { FormValidator, IFormValidatorConfig } from '../../form/validator';
|
|
4
|
-
import type { TFieldModelValid, TFieldType, TFieldValid, TFieldValue, TLogic } from '../types';
|
|
4
|
+
import type { TFieldModelValid, TFieldType, TFieldValid, TFieldValue, TLogic, TValueFormatter } from '../types';
|
|
5
5
|
export type TFetchStatus = 'loading' | 'loaded' | 'error';
|
|
6
6
|
export interface IFieldMenuConfig<T> {
|
|
7
7
|
/** The field this menu config applies to. Should be unique across all configs in the same menu. */
|
|
@@ -24,6 +24,8 @@ export interface IFieldMenuConfig<T> {
|
|
|
24
24
|
defaultLogic?: TLogic;
|
|
25
25
|
/** Tooltip for the field */
|
|
26
26
|
tooltip?: string | ((values?: TFieldValid[]) => string);
|
|
27
|
+
/** Formatter for formatting value labels in menu tooltips and chip displays */
|
|
28
|
+
valueFormatter?: TValueFormatter<T>;
|
|
27
29
|
/** Default form component for the field is `String` */
|
|
28
30
|
FormComponent?: ComponentType<IFilterMenuFormProps<T>>;
|
|
29
31
|
/** Element to render before the form component */
|
|
@@ -53,7 +55,7 @@ export interface IFilterMenuConfig<T> extends IFilterMenuSlots {
|
|
|
53
55
|
validation?: IFormValidatorConfig<Partial<TFieldModelValid<T>>>;
|
|
54
56
|
element?: ComponentType<IFilterMenuProps<T>>;
|
|
55
57
|
quickSearchHint?: string | ((currentHint: string) => string);
|
|
56
|
-
/** Option to enable or disable quick search @default
|
|
58
|
+
/** Option to enable or disable quick search @default false */
|
|
57
59
|
enableQuickSearch?: boolean;
|
|
58
60
|
/** Option to close the menu after submitting a value @default true */
|
|
59
61
|
closeAfterSubmit?: boolean;
|
|
@@ -31,6 +31,13 @@ export type KeySpecial = keyof typeof KeySpecial;
|
|
|
31
31
|
* - Muc dich: cho phep filter tham chieu truong model hoac key UI dac biet.
|
|
32
32
|
*/
|
|
33
33
|
export type TFieldType<T> = keyof T | keyof typeof KeySpecial;
|
|
34
|
+
export type TValueFormatterParam<T> = {
|
|
35
|
+
key: TFieldType<T>;
|
|
36
|
+
value: TFieldValid;
|
|
37
|
+
index: number;
|
|
38
|
+
fieldValue: TFieldValue;
|
|
39
|
+
};
|
|
40
|
+
export type TValueFormatter<T> = (param: TValueFormatterParam<T>) => string | undefined;
|
|
34
41
|
/**
|
|
35
42
|
* @en
|
|
36
43
|
* - Merge external model with special filter keys so filters can reference both.
|
|
@@ -59,7 +66,7 @@ export type TFieldSort<T> = {
|
|
|
59
66
|
* @vi Dinh nghia cac kieu co ban cho he thong filter bar, bao gom gia tri filter, kieu field va cau truc tong the cua filter state.
|
|
60
67
|
*/
|
|
61
68
|
export type TLogic = 'and' | 'or';
|
|
62
|
-
export type TDateLogic = 'before' | 'after' | '
|
|
69
|
+
export type TDateLogic = 'before' | 'after' | 'range';
|
|
63
70
|
export type TNumberOperator = 'eq' | 'lt' | 'lte' | 'gt' | 'gte';
|
|
64
71
|
/**
|
|
65
72
|
* @en
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import 'reflect-metadata';
|
|
2
2
|
import { ComponentType } from 'react';
|
|
3
3
|
import { IFormInputBase } from './types';
|
|
4
|
-
import {
|
|
4
|
+
import { IFieldValidateConfig, IFormValidatorConfig } from './validator';
|
|
5
5
|
export declare function registerForm(name?: string): <T extends new (...args: any[]) => {}>(constructor: T) => {
|
|
6
6
|
new (...args: any[]): {
|
|
7
7
|
__class: string;
|
|
@@ -21,26 +21,52 @@ export declare function registerForm(name?: string): <T extends new (...args: an
|
|
|
21
21
|
* constructor name).
|
|
22
22
|
*/
|
|
23
23
|
export declare function isFormRegistered(target: any): boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Metadata interface for pre-submit form handler.
|
|
26
|
+
*/
|
|
24
27
|
export interface IPreSubmitMetadata<T = any> {
|
|
28
|
+
/** Callback handler executed before submitting form data */
|
|
25
29
|
handler: (data: Partial<T>, oldData?: T) => Promise<any> | any;
|
|
26
30
|
}
|
|
27
31
|
export declare function formPreSubmit<T = any>(handler: IPreSubmitMetadata<T>['handler']): <T_1 extends new (...args: any[]) => {}>(constructor: T_1) => T_1;
|
|
28
32
|
export declare function getFormPreSubmit<T = any>(targetClass: any): IPreSubmitMetadata<T> | undefined;
|
|
33
|
+
/**
|
|
34
|
+
* Responsive size mappings for form field layout grids.
|
|
35
|
+
*/
|
|
29
36
|
export type ISizes = Partial<Record<'xs' | 'sm' | 'md' | 'lg' | 'xl', number>>;
|
|
37
|
+
/**
|
|
38
|
+
* Metadata configuration for a single form field.
|
|
39
|
+
*/
|
|
30
40
|
export interface IFieldMetadata<T = any, O = {}> {
|
|
41
|
+
/** Name of the field key in object T */
|
|
31
42
|
name: keyof T;
|
|
43
|
+
/** Label text displayed for the form field */
|
|
32
44
|
label?: string;
|
|
45
|
+
/** Placeholder text displayed inside the input element */
|
|
33
46
|
placeholder?: string;
|
|
47
|
+
/** Default value for the field */
|
|
34
48
|
defaultValue?: any;
|
|
49
|
+
/**
|
|
50
|
+
* Type constructor or type identifier for the field.
|
|
51
|
+
* @default 'string'
|
|
52
|
+
*/
|
|
35
53
|
type?: any;
|
|
54
|
+
/** Grid sizing configuration or factory function based on form state */
|
|
36
55
|
sizes?: ISizes | ((data?: T, formState?: Partial<T>) => ISizes);
|
|
56
|
+
/** Visibility status or factory function determining if field is visible */
|
|
37
57
|
visible?: boolean | ((data?: T, formState?: Partial<T>) => boolean);
|
|
58
|
+
/** Disabled status or factory function determining if field is disabled */
|
|
38
59
|
disabled?: boolean | ((data?: T, formState?: Partial<T>) => boolean);
|
|
60
|
+
/** Custom React component to render the input control */
|
|
39
61
|
renderInput?: ComponentType<IFormInputBase<T>>;
|
|
40
62
|
}
|
|
41
63
|
export declare function formField<T = any>(options: Omit<IFieldMetadata<T>, 'name'>): (target: any, propertyKey: string) => void;
|
|
42
64
|
export declare function getFormFields<T = any>(targetClass: any): IFieldMetadata<T>[];
|
|
43
|
-
|
|
65
|
+
/**
|
|
66
|
+
* Metadata configuration for field validation.
|
|
67
|
+
*/
|
|
68
|
+
export interface IValidationMetadata extends IFieldValidateConfig {
|
|
69
|
+
/** Name of the target field property */
|
|
44
70
|
name: string;
|
|
45
71
|
}
|
|
46
72
|
export declare function formValidate(options: Omit<IValidationMetadata, 'name'>): (target: any, propertyKey: string) => void;
|
|
@@ -13,7 +13,7 @@ import createSelectWithApi from './create.select-with-api';
|
|
|
13
13
|
import createSelectWithApiV2 from './v2/create.select-with-api';
|
|
14
14
|
import CreateAutocompleteChip from './create.autocomplete.chips';
|
|
15
15
|
import createAutocompleteChipV2 from './v2/create.autocomplete.chips';
|
|
16
|
-
declare class
|
|
16
|
+
export declare class DinoForm {
|
|
17
17
|
ModalWrap: import("react").FC<import("./modal-wrapper").IFormModalWrapperProps>;
|
|
18
18
|
BottomBarWrap: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
19
19
|
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
@@ -41,5 +41,5 @@ declare class DinoFormBase {
|
|
|
41
41
|
createSelectWithApi: typeof createSelectWithApi;
|
|
42
42
|
createSelectWithApiV2: typeof createSelectWithApiV2;
|
|
43
43
|
}
|
|
44
|
-
declare const DinoForm: DinoFormBase;
|
|
45
44
|
export default DinoForm;
|
|
45
|
+
export declare const dinoForm: DinoForm;
|
|
@@ -9,7 +9,7 @@ export declare const singleValidate: <T, TPartial = T>(key: keyof T, modelState:
|
|
|
9
9
|
[key: string]: any;
|
|
10
10
|
} | null;
|
|
11
11
|
export declare const clearFieldEmpty: <T>(model: Extract<T, IModelBase>) => void;
|
|
12
|
-
export declare const validateMerge: <T>(...
|
|
12
|
+
export declare const validateMerge: <T>(...validators: (FormValidator<T> | undefined)[]) => FormValidator<T>;
|
|
13
13
|
/** Interface representing the result of a CSV validation. */
|
|
14
14
|
export interface IValidateCsv {
|
|
15
15
|
/** Indicates whether the CSV data is valid */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export * from './types';
|
|
2
2
|
export { default as FormValidator } from './validator';
|
|
3
3
|
export * from './validator';
|
|
4
|
-
export
|
|
4
|
+
export * from './dino-form';
|
|
5
5
|
export { getErrorMessage, convertFormDataToJson, validateCsvModel } from './helpers';
|
|
6
6
|
export type { ISelectWithApiOption, ISelectWithApiFetchData, ISelectWithApiParams, ISelectWithApiHandle } from './create.select-with-api';
|
|
7
7
|
export type { InputBaseImage } from './create.input';
|
|
@@ -5,15 +5,25 @@ export interface IFormBaseContext<T> {
|
|
|
5
5
|
modelState?: Partial<T>;
|
|
6
6
|
setModelState: ISetModelStateFunc<T>;
|
|
7
7
|
messageErrors: IPartialError<T>;
|
|
8
|
-
|
|
8
|
+
checkValidateField: (keyName: keyof T) => void;
|
|
9
|
+
checkValidateAll: () => IPartialError<T>;
|
|
9
10
|
setError: (keyName: keyof T, message: string) => void;
|
|
10
11
|
removeError: (keyNames: keyof T | (keyof T)[]) => void;
|
|
11
12
|
clearErrorAll: () => void;
|
|
13
|
+
/**
|
|
14
|
+
* Register a temporary real value (e.g. File[]) for a field to be used during validation.
|
|
15
|
+
* Useful for image/file fields where the form value is a serialized URL string after upload,
|
|
16
|
+
* but validation needs the original File objects.
|
|
17
|
+
*/
|
|
18
|
+
registerValidationOverride: (key: keyof T, value: any) => void;
|
|
19
|
+
/** Remove a previously registered validation override for a field. */
|
|
20
|
+
unregisterValidationOverride: (key: keyof T) => void;
|
|
12
21
|
}
|
|
13
22
|
export interface IFormBase<T> {
|
|
14
23
|
data?: Partial<T>;
|
|
15
24
|
messageErrors: IPartialError<T>;
|
|
16
|
-
|
|
25
|
+
checkValidateField?: (keyName: keyof T) => void;
|
|
26
|
+
checkValidateAll?: () => IPartialError<T>;
|
|
17
27
|
disabled?: boolean;
|
|
18
28
|
}
|
|
19
29
|
export interface IFormInputBase<T, S = any> extends Partial<IFormBase<T>> {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export type IModelBase = {
|
|
2
2
|
[key: string]: any;
|
|
3
3
|
};
|
|
4
|
-
export declare enum
|
|
4
|
+
export declare enum EValidateRule {
|
|
5
5
|
Required = "Required",
|
|
6
6
|
Regex = "Regex",
|
|
7
7
|
RequiredValue = "RequiredValue",
|
|
@@ -11,58 +11,108 @@ export declare enum SingleRuleValidate {
|
|
|
11
11
|
PhoneNumber = "PhoneNumber",
|
|
12
12
|
Url = "Url",
|
|
13
13
|
File = "File",
|
|
14
|
+
FileImage = "FileImage",
|
|
14
15
|
FileRequired = "FileRequired",
|
|
15
16
|
Custom = "Custom"
|
|
16
17
|
}
|
|
18
|
+
export type EValidateRuleString = `${EValidateRule}`;
|
|
19
|
+
type IValidateRuleType = EValidateRule | EValidateRuleString;
|
|
20
|
+
export interface IFileRuleOptions {
|
|
21
|
+
/** Max size of single file in bytes */
|
|
22
|
+
maxSize?: number;
|
|
23
|
+
/** If true, maxSize applies to the total combined size of all files instead of each individual file */
|
|
24
|
+
sumSize?: boolean;
|
|
25
|
+
/** Exact number of files required */
|
|
26
|
+
count?: number;
|
|
27
|
+
/** Max number of files allowed */
|
|
28
|
+
maxCount?: number;
|
|
29
|
+
/** Min number of files required */
|
|
30
|
+
minCount?: number;
|
|
31
|
+
}
|
|
32
|
+
export interface IFileImageRuleOptions extends IFileRuleOptions {
|
|
33
|
+
/** Max image width in pixels */
|
|
34
|
+
maxWidth?: number;
|
|
35
|
+
/** Max image height in pixels */
|
|
36
|
+
maxHeight?: number;
|
|
37
|
+
/** Min image width in pixels */
|
|
38
|
+
minWidth?: number;
|
|
39
|
+
/** Min image height in pixels */
|
|
40
|
+
minHeight?: number;
|
|
41
|
+
}
|
|
42
|
+
export interface IArrayRuleOptions {
|
|
43
|
+
/** Exact number of items required in the array */
|
|
44
|
+
count?: number;
|
|
45
|
+
/** Max number of items allowed in the array */
|
|
46
|
+
maxCount?: number;
|
|
47
|
+
/** Min number of items required in the array */
|
|
48
|
+
minCount?: number;
|
|
49
|
+
}
|
|
17
50
|
export interface IRuleOptions {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
51
|
+
/** Only apply for file rule */
|
|
52
|
+
file?: IFileRuleOptions;
|
|
53
|
+
/** Only apply for file image rule */
|
|
54
|
+
image?: IFileImageRuleOptions;
|
|
55
|
+
/** Only apply for array rule */
|
|
56
|
+
array?: IArrayRuleOptions;
|
|
22
57
|
}
|
|
23
|
-
export
|
|
24
|
-
|
|
25
|
-
rule:
|
|
58
|
+
export interface IValidateRule<T = any> {
|
|
59
|
+
/** The validation rule type to execute */
|
|
60
|
+
rule: IValidateRuleType;
|
|
61
|
+
/** Custom error message string returned when validation fails */
|
|
26
62
|
message?: string;
|
|
27
|
-
|
|
28
|
-
|
|
63
|
+
/**
|
|
64
|
+
* - Custom target value, RegExp pattern, max count limit, or predicate function.
|
|
65
|
+
* - For predicate function `(value, model)`: returning `true` or a non-empty `string` (custom error message) indicates INVALID (has error), while returning `false` indicates VALID (no error).
|
|
66
|
+
*/
|
|
67
|
+
custom?: RegExp | ((value: any, model: T) => boolean | string) | number | Array<any> | boolean | string;
|
|
68
|
+
/** Additional rule options (e.g. file size limits or image dimension constraints) */
|
|
69
|
+
options?: IRuleOptions;
|
|
29
70
|
}
|
|
30
|
-
|
|
31
|
-
|
|
71
|
+
/**
|
|
72
|
+
* - Handler function to validate a single rule against a field value and model state.
|
|
73
|
+
* - Returns `true` or an error message string if validation fails (invalid state), or `false` if validation passes (valid state).
|
|
74
|
+
*
|
|
75
|
+
* @param value Current value of the field being validated
|
|
76
|
+
* @param ruleOption Configuration options for the rule being validated
|
|
77
|
+
* @param model Entire form model data
|
|
78
|
+
* @returns `boolean | string` (true / string = validation failed, false = valid)
|
|
79
|
+
*/
|
|
80
|
+
export type IRuleValidatorHandler<T = any> = (value: any, ruleOption?: IValidateRule<T>, model?: T) => boolean | string;
|
|
81
|
+
export interface IFieldValidateConfig<T = any> {
|
|
32
82
|
label?: string;
|
|
83
|
+
rules: IValidateRule<T>[];
|
|
33
84
|
}
|
|
34
85
|
export interface IModelError {
|
|
35
86
|
message: string;
|
|
36
87
|
error: boolean;
|
|
37
88
|
}
|
|
38
89
|
export type IFormValidatorConfig<T> = {
|
|
39
|
-
[key in keyof Extract<T, IModelBase>]?:
|
|
90
|
+
[key in keyof Extract<T, IModelBase>]?: IFieldValidateConfig<T>;
|
|
40
91
|
};
|
|
41
92
|
export type IPartialError<T> = {
|
|
42
|
-
[key in keyof T]?:
|
|
93
|
+
[key in keyof T]?: IValidateRule<T>[];
|
|
43
94
|
};
|
|
44
95
|
export declare class FormValidator<T> {
|
|
45
96
|
configs: IFormValidatorConfig<T>;
|
|
46
97
|
constructor(configs: IFormValidatorConfig<T>);
|
|
47
|
-
static
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
98
|
+
static initialize: <T_1>(configs: IFormValidatorConfig<T_1>) => FormValidator<T_1>;
|
|
99
|
+
addRules: (key: keyof T, ...rule: IValidateRule<T>[]) => this;
|
|
100
|
+
private handleRequired;
|
|
101
|
+
private handleRegex;
|
|
102
|
+
private handleRequiredValue;
|
|
103
|
+
private handleCustom;
|
|
104
|
+
private handleArray;
|
|
105
|
+
private handleNumber;
|
|
106
|
+
private handleEmail;
|
|
107
|
+
private handlePhoneNumber;
|
|
108
|
+
private handleUrl;
|
|
109
|
+
private handleFile;
|
|
110
|
+
private handleFileImage;
|
|
111
|
+
private handleFileRequired;
|
|
112
|
+
private renderMessage;
|
|
113
|
+
private getRuleValidator;
|
|
114
|
+
private executed;
|
|
61
115
|
run: (model: T) => IPartialError<T>;
|
|
62
|
-
Executed: (Config: IConfigValue, valueField: any, model: any) => {
|
|
63
|
-
value: string | boolean;
|
|
64
|
-
rule: IRuleOption<any>;
|
|
65
|
-
}[];
|
|
66
116
|
}
|
|
67
117
|
export default FormValidator;
|
|
68
118
|
export declare const createFormValidator: <T>() => FormValidator<Partial<T>>;
|
|
@@ -50,7 +50,12 @@ export declare const tryParseIntRequired: (value: any, defaultValue: number) =>
|
|
|
50
50
|
export declare const tryParseCsvFileToArray: (file: File) => Promise<Record<string, string>[]>;
|
|
51
51
|
export declare const formatFileSize: (sizeInKb: number) => string;
|
|
52
52
|
export declare const formatDuration: (duration?: number) => string;
|
|
53
|
-
export
|
|
53
|
+
export interface IFormatCurrencyOptions {
|
|
54
|
+
prefix?: string;
|
|
55
|
+
suffix?: string;
|
|
56
|
+
thousandSeparator?: string;
|
|
57
|
+
}
|
|
58
|
+
export declare const formatCurrency: (value?: any, options?: IFormatCurrencyOptions) => string;
|
|
54
59
|
export declare const formatNumberWithCommas: (number: number) => string;
|
|
55
60
|
export declare const formatCapitalizeFirstText: (value?: string) => string;
|
|
56
61
|
export type FormatDatetimeStyle = 'style1' | 'style2' | 'style3';
|
package/package.json
CHANGED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{defineProperty as r,slicedToArray as e,toConsumableArray as n}from"../../../_virtual/_rollupPluginBabelHelpers.js";import{jsxs as t,Fragment as o,jsx as i}from"react/jsx-runtime";import{useState as a,useRef as l,useEffect as c,useMemo as u}from"react";import{styled as s,InputBase as d,Box as p,SwipeableDrawer as h,Tooltip as m,IconButton as f,Stack as v,Typography as g}from"@mui/material";import y from"@mui/icons-material/Clear";import b from"@mui/icons-material/Search";import x from"@mui/icons-material/NorthWest";import C from"@mui/icons-material/ChevronLeft";import{InputAdornmentRight as S}from"./filter-input.units.js";var w="dino_search_history_v1",R=function(r){var e=r.placeholder,n=void 0===e?"Search...":e,t=r.inputRef,o=r.hasKeyword,a=r.onEnter,u=r.onChange,s=r.onClear,d=l(null),p=null!=t?t:d;return c(function(){var r=setTimeout(function(){var r;return null===(r=p.current)||void 0===r?void 0:r.focus()},50);return function(){try{var e;null===(e=p.current)||void 0===e||e.blur()}catch(r){}clearTimeout(r)}},[p]),i(k,{fullWidth:!0,inputRef:p,placeholder:n,inputProps:{autoCapitalize:"off",autoComplete:"off"},onKeyDown:function(r){"Enter"===r.key&&(r.preventDefault(),null==a||a())},onChange:function(r){return null==u?void 0:u(r.target.value)},endAdornment:i(S,{hasKeyword:o,onSubmit:a,onClear:s})})},k=s(d)(function(r){var e=r.theme;return{border:"1px solid ".concat(e.palette.divider),borderRadius:e.shape.borderRadius,padding:e.spacing(.5,1)}}),z=function(r){var e=r.history,n=r.onSelect,o=r.onFillInput,a=r.onClear;return e&&0!==e.length?t(A,{className:I.root,children:[t(v,{direction:"row",justifyContent:"space-between",alignItems:"center",sx:{mb:1},children:[i(g,{variant:"subtitle2",fontWeight:600,children:"Recent Searches"}),a&&i(m,{title:"Clear history",arrow:!0,children:i(f,{size:"small",onClick:a,children:i(y,{fontSize:"small"})})})]}),i(v,{className:I.items,children:e.map(function(r,e){return t(p,{className:I.item,onClick:function(){return n(r)},sx:{cursor:"pointer"},children:[i(g,{variant:"body2",noWrap:!0,sx:{flex:1},children:r}),i(m,{title:"Fill input",arrow:!0,children:i(f,{size:"small",sx:{color:"text.secondary","&:hover":{color:"text.primary"}},onClick:function(e){e.stopPropagation(),null==o||o(r)},children:i(x,{fontSize:"small"})})})]},e)})})]}):i(D,{children:i(g,{variant:"body2",color:"textSecondary",children:"No recent searches."})})},I={root:"DinoSearchHistory-root",items:"DinoSearchHistory-items",item:"DinoSearchHistory-item"},A=s(p)(function(e){var n=e.theme;return r(r({padding:"8px 16px",marginTop:1},".".concat(I.items),{}),".".concat(I.item),{display:"flex",alignItems:"center",gap:n.spacing(1),padding:n.spacing(.5,1),marginBottom:n.spacing(.5),borderRadius:n.shape.borderRadius,backgroundColor:"rgba(0,0,0,0.02)","&:hover":{backgroundColor:"rgba(0,0,0,0.04)"},"&:first-of-type":{marginTop:0}})}),D=s(p)(function(r){var e=r.theme;return{padding:e.spacing(2),textAlign:"center",color:e.palette.text.secondary,border:"0.5px dashed ".concat(e.palette.divider),borderRadius:e.shape.borderRadius,display:"flex",flexDirection:"column",alignItems:"center",gap:e.spacing(1),margin:e.spacing(1,2)}}),T=function(r){var s=r.onSearching,d=r.placeholder,h=a(!1),y=e(h,2),x=y[0],S=y[1],k=a([]),I=e(k,2),A=I[0],D=I[1],T=a(""),j=e(T,2),B=j[0],H=j[1],P=l(null);c(function(){if("undefined"!=typeof window)try{var r=localStorage.getItem(w);if(r){var e=JSON.parse(r);Array.isArray(e)&&D(e)}}catch(r){}},[]);var W=function(r){var e=r.trim();e&&D(function(r){var t=[e].concat(n(r.filter(function(r){return r!==e}))).slice(0,20);try{localStorage.setItem(w,JSON.stringify(t))}catch(r){}return t})},_=u(function(){var r=(B||"").trim();return r?A.filter(function(e){return e.toLowerCase().includes(r.toLowerCase())}).slice(0,5):A.slice(0,5)},[B,A]),E=function(){var r,e=(null===(r=P.current)||void 0===r||null===(r=r.value)||void 0===r?void 0:r.trim())||"";e&&(W(e),null==s||s(e),K())},K=function(){try{var r;null===(r=P.current)||void 0===r||r.blur()}catch(r){}S(!1)},L=function(){S(!0),H(""),P.current&&(P.current.value="")};return t(o,{children:[i(m,{title:"Search",arrow:!0,children:i(f,{size:"small",onClick:L,"aria-label":"Open search",children:i(b,{})})}),t(N,{anchor:"bottom",open:x,onClose:K,onOpen:L,disableBackdropTransition:!1,disableDiscovery:!1,swipeAreaWidth:20,children:[i(p,{sx:{display:"flex",justifyContent:"center",py:1},children:i(p,{sx:{width:40,height:4,borderRadius:2,backgroundColor:"divider"}})}),t(v,{gap:1,style:{flexDirection:"row",alignItems:"center",padding:"0 8px"},children:[i(m,{title:"Back",arrow:!0,children:i(f,{size:"small",onClick:function(){H("");try{var r;null===(r=P.current)||void 0===r||r.blur()}catch(r){}S(!1)},children:i(C,{fontSize:"small"})})}),i(R,{placeholder:d,inputRef:P,hasKeyword:Boolean(B),onEnter:E,onChange:H,onClear:function(){var r;P.current&&(P.current.value=""),H(""),null===(r=P.current)||void 0===r||r.focus()}}),i(m,{title:"Search",arrow:!0,children:i(f,{size:"small",onClick:E,"aria-label":"Apply search",children:i(b,{fontSize:"small"})})})]}),i(g,{variant:"caption",color:"textSecondary",sx:{px:2,mt:1},children:"Enter the value to search for and hit enter or click the enter icon to apply."}),i(z,{history:_,onSelect:function(r){P.current&&(P.current.value=r),H(r),W(r),null==s||s(r),K()},onFillInput:function(r){var e;P.current&&(P.current.value=r),H(r),null===(e=P.current)||void 0===e||e.focus()},onClear:function(){D([]);try{localStorage.removeItem(w)}catch(r){}}})]})]})},N=s(h)(function(r){return{zIndex:r.theme.zIndex.modal-10,".MuiPaper-root":{height:"calc(100svh - 56px)",maxHeight:"calc(100svh - 56px)",borderTopLeftRadius:12,borderTopRightRadius:12,overflow:"auto"}}});export{T as MobileSearchButton,T as default};
|
|
2
|
-
//# sourceMappingURL=filter-input.mobile.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"filter-input.mobile.js","sources":["../../../../src/filter-bar/components/filter-input.mobile.tsx"],"sourcesContent":["// imports\r\nimport { useEffect, useMemo, useRef, useState } from 'react'\r\nimport { Box, IconButton, InputBase, styled, Tooltip, SwipeableDrawer, Stack, Typography } from '@mui/material'\r\nimport ClearIcon from '@mui/icons-material/Clear'\r\nimport SearchIcon from '@mui/icons-material/Search'\r\nimport NorthWestIcon from '@mui/icons-material/NorthWest'\r\nimport ChevronLeftIcon from '@mui/icons-material/ChevronLeft'\r\nimport { InputAdornmentRight } from './filter-input.units'\r\n// types\r\nimport type { FC, RefObject } from 'react'\r\n\r\nconst DEFAULT_PLACEHOLDER = 'Search...'\r\nconst HISTORY_KEY = 'dino_search_history_v1'\r\nconst MAX_HISTORY_STORED = 20\r\nconst MAX_HISTORY_DISPLAYED = 5\r\n\r\n// const Root = styled(Box)(({ theme }) => ({\r\n// padding: theme.spacing(2),\r\n// display: 'flex',\r\n// flexDirection: 'column',\r\n// gap: theme.spacing(1)\r\n// }))\r\n\r\n// const Header = styled('div')(({ theme }) => ({\r\n// display: 'flex',\r\n// alignItems: 'center',\r\n// gap: theme.spacing(1)\r\n// }))\r\n\r\n//#region InputSearch\r\ninterface IInputSearchProps {\r\n placeholder?: string\r\n inputRef?: RefObject<HTMLInputElement>\r\n hasKeyword?: boolean\r\n onEnter?: () => void\r\n onChange?: (value: string) => void\r\n onClear?: () => void\r\n}\r\nconst InputSearch: FC<IInputSearchProps> = (props) => {\r\n const { placeholder = DEFAULT_PLACEHOLDER, inputRef, hasKeyword, onEnter, onChange, onClear } = props\r\n const localRef = useRef<HTMLInputElement | null>(null)\r\n const refToUse = (inputRef as RefObject<HTMLInputElement>) ?? localRef\r\n\r\n useEffect(() => {\r\n // ensure focus opens mobile keyboard — sometimes requires a small delay\r\n const t = setTimeout(() => refToUse.current?.focus(), 50)\r\n return () => {\r\n // blur on unmount to dismiss soft keyboard before drawer closes\r\n try {\r\n refToUse.current?.blur()\r\n } catch {\r\n // ignore\r\n }\r\n clearTimeout(t)\r\n }\r\n }, [refToUse])\r\n\r\n return (\r\n <SearchInput\r\n fullWidth\r\n inputRef={refToUse}\r\n placeholder={placeholder}\r\n inputProps={{ autoCapitalize: 'off', autoComplete: 'off' }}\r\n onKeyDown={(e) => {\r\n if (e.key === 'Enter') {\r\n e.preventDefault()\r\n onEnter?.()\r\n }\r\n }}\r\n onChange={(e) => onChange?.(e.target.value)}\r\n endAdornment={<InputAdornmentRight hasKeyword={hasKeyword} onSubmit={onEnter} onClear={onClear} />}\r\n />\r\n )\r\n}\r\n\r\nconst SearchInput = styled(InputBase)(({ theme }) => ({\r\n border: `1px solid ${theme.palette.divider}`,\r\n borderRadius: theme.shape.borderRadius,\r\n padding: theme.spacing(0.5, 1)\r\n}))\r\n//#endregion\r\n\r\n//#region SearchHistory\r\ninterface ISearchHistoryProps {\r\n history: string[]\r\n onSelect: (keyword: string) => void\r\n onFillInput?: (keyword: string) => void\r\n onClear?: () => void\r\n}\r\nconst SearchHistory: FC<ISearchHistoryProps> = (props) => {\r\n const { history, onSelect, onFillInput, onClear } = props\r\n if (!history || history.length === 0) {\r\n return (\r\n <SearchHistoryNoResults>\r\n <Typography variant='body2' color='textSecondary'>\r\n No recent searches.\r\n </Typography>\r\n </SearchHistoryNoResults>\r\n )\r\n }\r\n\r\n return (\r\n <SearchHistoryStyled className={searchHistoryClasses.root}>\r\n <Stack direction='row' justifyContent='space-between' alignItems='center' sx={{ mb: 1 }}>\r\n <Typography variant='subtitle2' fontWeight={600}>\r\n Recent Searches\r\n </Typography>\r\n {onClear && (\r\n <Tooltip title='Clear history' arrow>\r\n <IconButton size='small' onClick={onClear}>\r\n <ClearIcon fontSize='small' />\r\n </IconButton>\r\n </Tooltip>\r\n )}\r\n </Stack>\r\n <Stack className={searchHistoryClasses.items}>\r\n {history.map((keyword, idx) => (\r\n <Box key={idx} className={searchHistoryClasses.item} onClick={() => onSelect(keyword)} sx={{ cursor: 'pointer' }}>\r\n <Typography variant='body2' noWrap sx={{ flex: 1 }}>\r\n {keyword}\r\n </Typography>\r\n <Tooltip title='Fill input' arrow>\r\n <IconButton\r\n size='small'\r\n sx={{ color: 'text.secondary', '&:hover': { color: 'text.primary' } }}\r\n onClick={(e) => {\r\n e.stopPropagation()\r\n onFillInput?.(keyword)\r\n }}\r\n >\r\n <NorthWestIcon fontSize='small' />\r\n </IconButton>\r\n </Tooltip>\r\n </Box>\r\n ))}\r\n </Stack>\r\n </SearchHistoryStyled>\r\n )\r\n}\r\nconst searchHistoryClasses = {\r\n root: 'DinoSearchHistory-root',\r\n items: 'DinoSearchHistory-items',\r\n item: 'DinoSearchHistory-item'\r\n}\r\nconst SearchHistoryStyled = styled(Box)(({ theme }) => ({\r\n padding: '8px 16px',\r\n marginTop: 1,\r\n [`.${searchHistoryClasses.items}`]: {},\r\n [`.${searchHistoryClasses.item}`]: {\r\n display: 'flex',\r\n alignItems: 'center',\r\n gap: theme.spacing(1),\r\n padding: theme.spacing(0.5, 1),\r\n marginBottom: theme.spacing(0.5),\r\n borderRadius: theme.shape.borderRadius,\r\n backgroundColor: 'rgba(0,0,0,0.02)',\r\n '&:hover': { backgroundColor: 'rgba(0,0,0,0.04)' },\r\n '&:first-of-type': { marginTop: 0 }\r\n }\r\n}))\r\n\r\nconst SearchHistoryNoResults = styled(Box)(({ theme }) => ({\r\n padding: theme.spacing(2),\r\n textAlign: 'center',\r\n color: theme.palette.text.secondary,\r\n border: `0.5px dashed ${theme.palette.divider}`,\r\n borderRadius: theme.shape.borderRadius,\r\n display: 'flex',\r\n flexDirection: 'column',\r\n alignItems: 'center',\r\n gap: theme.spacing(1),\r\n margin: theme.spacing(1, 2)\r\n}))\r\n\r\n//#endregion\r\n//#region Main Component\r\nexport interface IMobileSearchButtonProps {\r\n placeholder?: string\r\n onSearching?: (keyword: string) => void\r\n}\r\n\r\nexport const MobileSearchButton: FC<IMobileSearchButtonProps> = (props) => {\r\n const { onSearching, placeholder } = props\r\n\r\n const [isOpenDrawer, setIsOpenDrawer] = useState(false)\r\n const [history, setHistory] = useState<string[]>([])\r\n const [inputValue, setInputValue] = useState('')\r\n\r\n const refInput = useRef<HTMLInputElement | null>(null)\r\n\r\n // Load history from localStorage on mount\r\n useEffect(() => {\r\n if (typeof window === 'undefined') return\r\n try {\r\n const raw = localStorage.getItem(HISTORY_KEY)\r\n if (raw) {\r\n const parsed = JSON.parse(raw)\r\n if (Array.isArray(parsed)) setHistory(parsed)\r\n }\r\n } catch {\r\n // ignore\r\n }\r\n }, [])\r\n\r\n // Save keyword to history (dedupe, limit to MAX_HISTORY_STORED)\r\n const pushHistory = (keyword: string) => {\r\n const trimmed = keyword.trim()\r\n if (!trimmed) return\r\n\r\n setHistory((prev) => {\r\n const next = [trimmed, ...prev.filter((x) => x !== trimmed)].slice(0, MAX_HISTORY_STORED)\r\n try {\r\n localStorage.setItem(HISTORY_KEY, JSON.stringify(next))\r\n } catch {\r\n // ignore\r\n }\r\n return next\r\n })\r\n }\r\n\r\n // Filter history based on current input (limit to MAX_HISTORY_DISPLAYED)\r\n const filteredHistory = useMemo(() => {\r\n const finalValue = (inputValue || '').trim()\r\n if (!finalValue) return history.slice(0, MAX_HISTORY_DISPLAYED)\r\n return history.filter((kw) => kw.toLowerCase().includes(finalValue.toLowerCase())).slice(0, MAX_HISTORY_DISPLAYED)\r\n }, [inputValue, history])\r\n\r\n const handleBack = () => {\r\n setInputValue('')\r\n try {\r\n refInput.current?.blur()\r\n } catch {\r\n // ignore\r\n }\r\n setIsOpenDrawer(false)\r\n }\r\n\r\n const handleSearch = () => {\r\n const keyword = refInput.current?.value?.trim() || ''\r\n if (keyword) {\r\n pushHistory(keyword)\r\n onSearching?.(keyword)\r\n handleCloseDrawer()\r\n }\r\n }\r\n\r\n const handleSelectHistory = (keyword: string) => {\r\n if (refInput.current) refInput.current.value = keyword\r\n setInputValue(keyword)\r\n pushHistory(keyword)\r\n onSearching?.(keyword)\r\n handleCloseDrawer()\r\n }\r\n\r\n const handleFillInput = (keyword: string) => {\r\n if (refInput.current) refInput.current.value = keyword\r\n setInputValue(keyword)\r\n refInput.current?.focus()\r\n }\r\n\r\n const handleClearHistory = () => {\r\n setHistory([])\r\n try {\r\n localStorage.removeItem(HISTORY_KEY)\r\n } catch {\r\n // ignore\r\n }\r\n }\r\n\r\n const handleClearInput = () => {\r\n if (refInput.current) refInput.current.value = ''\r\n setInputValue('')\r\n refInput.current?.focus()\r\n }\r\n\r\n const handleCloseDrawer = () => {\r\n try {\r\n refInput.current?.blur()\r\n } catch {}\r\n setIsOpenDrawer(false)\r\n }\r\n\r\n const handleOpenDrawer = () => {\r\n setIsOpenDrawer(true)\r\n setInputValue('')\r\n if (refInput.current) refInput.current.value = ''\r\n }\r\n\r\n return (\r\n <>\r\n <Tooltip title='Search' arrow>\r\n <IconButton size='small' onClick={handleOpenDrawer} aria-label='Open search'>\r\n <SearchIcon />\r\n </IconButton>\r\n </Tooltip>\r\n <SwipeableDrawerStyled\r\n anchor='bottom'\r\n open={isOpenDrawer}\r\n onClose={handleCloseDrawer}\r\n onOpen={handleOpenDrawer}\r\n disableBackdropTransition={false}\r\n disableDiscovery={false}\r\n swipeAreaWidth={20}\r\n >\r\n <Box sx={{ display: 'flex', justifyContent: 'center', py: 1 }}>\r\n <Box sx={{ width: 40, height: 4, borderRadius: 2, backgroundColor: 'divider' }} />\r\n </Box>\r\n <Stack gap={1} style={{ flexDirection: 'row', alignItems: 'center', padding: '0 8px' }}>\r\n <Tooltip title='Back' arrow>\r\n <IconButton size='small' onClick={handleBack}>\r\n <ChevronLeftIcon fontSize='small' />\r\n </IconButton>\r\n </Tooltip>\r\n <InputSearch\r\n placeholder={placeholder}\r\n inputRef={refInput}\r\n hasKeyword={Boolean(inputValue)}\r\n onEnter={handleSearch}\r\n onChange={setInputValue}\r\n onClear={handleClearInput}\r\n />\r\n <Tooltip title='Search' arrow>\r\n <IconButton size='small' onClick={handleSearch} aria-label='Apply search'>\r\n <SearchIcon fontSize='small' />\r\n </IconButton>\r\n </Tooltip>\r\n </Stack>\r\n <Typography variant='caption' color='textSecondary' sx={{ px: 2, mt: 1 }}>\r\n Enter the value to search for and hit enter or click the enter icon to apply.\r\n </Typography>\r\n <SearchHistory history={filteredHistory} onSelect={handleSelectHistory} onFillInput={handleFillInput} onClear={handleClearHistory} />\r\n </SwipeableDrawerStyled>\r\n </>\r\n )\r\n}\r\n\r\nexport default MobileSearchButton\r\n\r\nconst SwipeableDrawerStyled = styled(SwipeableDrawer)(({ theme }) => ({\r\n zIndex: theme.zIndex.modal - 10, // ensure it's below any modal that might be opened from the filter bar\r\n '.MuiPaper-root': {\r\n height: 'calc(100svh - 56px)',\r\n maxHeight: 'calc(100svh - 56px)',\r\n borderTopLeftRadius: 12,\r\n borderTopRightRadius: 12,\r\n overflow: 'auto'\r\n }\r\n}))\r\n//#endregion\r\n"],"names":["HISTORY_KEY","InputSearch","props","_props$placeholder","placeholder","DEFAULT_PLACEHOLDER","inputRef","hasKeyword","onEnter","onChange","onClear","localRef","useRef","refToUse","useEffect","t","setTimeout","_refToUse$current","current","focus","_refToUse$current2","blur","_unused","clearTimeout","_jsx","SearchInput","fullWidth","inputProps","autoCapitalize","autoComplete","onKeyDown","e","key","preventDefault","target","value","endAdornment","InputAdornmentRight","onSubmit","styled","InputBase","_ref","theme","border","concat","palette","divider","borderRadius","shape","padding","spacing","SearchHistory","history","onSelect","onFillInput","length","_jsxs","SearchHistoryStyled","className","searchHistoryClasses","root","Stack","direction","justifyContent","alignItems","sx","mb","children","Typography","variant","fontWeight","Tooltip","title","arrow","IconButton","size","onClick","ClearIcon","fontSize","items","map","keyword","idx","Box","item","cursor","noWrap","flex","color","stopPropagation","NorthWestIcon","SearchHistoryNoResults","_ref2","_defineProperty","marginTop","display","gap","marginBottom","backgroundColor","_ref4","textAlign","text","secondary","flexDirection","margin","MobileSearchButton","onSearching","_useState","useState","_useState2","_slicedToArray","isOpenDrawer","setIsOpenDrawer","_useState3","_useState4","setHistory","_useState5","_useState6","inputValue","setInputValue","refInput","window","raw","localStorage","getItem","parsed","JSON","parse","Array","isArray","_unused2","pushHistory","trimmed","trim","prev","next","_toConsumableArray","filter","x","slice","setItem","stringify","_unused3","filteredHistory","useMemo","finalValue","kw","toLowerCase","includes","handleSearch","_refInput$current2","handleCloseDrawer","_refInput$current5","_unused6","handleOpenDrawer","_Fragment","SearchIcon","SwipeableDrawerStyled","anchor","open","onClose","onOpen","disableBackdropTransition","disableDiscovery","swipeAreaWidth","py","width","height","style","_refInput$current","_unused4","ChevronLeftIcon","Boolean","_refInput$current4","px","mt","_refInput$current3","removeItem","_unused5","SwipeableDrawer","_ref5","zIndex","modal","maxHeight","borderTopLeftRadius","borderTopRightRadius","overflow"],"mappings":"4nBAWA,IACMA,EAAc,yBA0BdC,EAAqC,SAACC,GAC1C,IAAAC,EAAgGD,EAAxFE,YAAAA,OAAcC,IAAHF,EA5BO,YA4BeA,EAAEG,EAAqDJ,EAArDI,SAAUC,EAA2CL,EAA3CK,WAAYC,EAA+BN,EAA/BM,QAASC,EAAsBP,EAAtBO,SAAUC,EAAYR,EAAZQ,QAC9EC,EAAWC,EAAgC,MAC3CC,EAAYP,QAAAA,EAA4CK,EAgB9D,OAdAG,EAAU,WAER,IAAMC,EAAIC,WAAW,WAAA,IAAAC,EAAA,OAAsB,QAAtBA,EAAMJ,EAASK,eAAO,IAAAD,OAAA,EAAhBA,EAAkBE,OAAO,EAAE,IACtD,OAAO,WAEL,IAAI,IAAAC,EACc,QAAhBA,EAAAP,EAASK,eAAO,IAAAE,GAAhBA,EAAkBC,MACnB,CAAC,MAAAC,GACA,CAEFC,aAAaR,EACd,CACH,EAAG,CAACF,IAGFW,EAACC,EAAW,CACVC,WAAS,EACTpB,SAAUO,EACVT,YAAaA,EACbuB,WAAY,CAAEC,eAAgB,MAAOC,aAAc,OACnDC,UAAW,SAACC,GACI,UAAVA,EAAEC,MACJD,EAAEE,iBACFzB,SAAAA,IAEH,EACDC,SAAU,SAACsB,GAAC,OAAKtB,aAAAA,EAAAA,EAAWsB,EAAEG,OAAOC,MAAM,EAC3CC,aAAcZ,EAACa,EAAmB,CAAC9B,WAAYA,EAAY+B,SAAU9B,EAASE,QAASA,KAG7F,EAEMe,EAAcc,EAAOC,EAAPD,CAAkB,SAAAE,GAAA,IAAGC,EAAKD,EAALC,MAAK,MAAQ,CACpDC,OAAM,aAAAC,OAAeF,EAAMG,QAAQC,SACnCC,aAAcL,EAAMM,MAAMD,aAC1BE,QAASP,EAAMQ,QAAQ,GAAK,GAC7B,GAUKC,EAAyC,SAACjD,GAC9C,IAAQkD,EAA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