ingred-ui 33.4.1 → 33.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/AdvancedFilter/constants.d.ts +1 -0
- package/dist/components/AdvancedFilter/index.d.ts +3 -3
- package/dist/components/AdvancedFilter/internal/ConfigPanelPersistOption.d.ts +7 -0
- package/dist/components/AdvancedFilter/styled.d.ts +2 -1
- package/dist/components/AdvancedFilter/types.d.ts +29 -0
- package/dist/components/AdvancedFilter/utils/helpers.d.ts +8 -0
- package/dist/index.es.js +836 -818
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +799 -781
- package/dist/index.js.map +1 -1
- package/dist/utils/asComponentRef.d.ts +6 -0
- package/package.json +1 -1
|
@@ -22,6 +22,7 @@ export declare const ADVANCED_FILTER_CONSTANTS: {
|
|
|
22
22
|
readonly TRANSITION_DURATION: 200;
|
|
23
23
|
readonly MIN_VALUE_LENGTH: 1;
|
|
24
24
|
};
|
|
25
|
+
export declare const DEFAULT_PERSIST_OPTION_LABEL = "\u6761\u4EF6\u3092\u7DAD\u6301";
|
|
25
26
|
export declare const ADVANCED_FILTER_SELECTORS: {
|
|
26
27
|
readonly TAG_ELEMENT: "[data-tag]";
|
|
27
28
|
readonly MENU_ELEMENT: "[role=\"menu\"]";
|
|
@@ -29,7 +29,7 @@ export { useFilterMenuPosition } from "./hooks/useFilterMenuPosition";
|
|
|
29
29
|
export { TEXT_OPERATORS, NUMBER_OPERATORS, DATE_OPERATORS, SELECTION_OPERATORS, PRESET_OPERATORS, getPresetOperators, createOperator, combineOperators, overrideOperatorLabels, changeOperatorLabel, getPresetOperatorsWithLabels, selectOperators, selectOperatorsByIndex, applyOperatorToValue, applyFilter, applyMultipleFilters, evaluateFilterConditions, normalizeForSearch, } from "./utils/operators";
|
|
30
30
|
export { createValue, combineValues, overrideValueLabels, changeValueLabel, selectValues, selectValuesByIndex, getValueStrings, getValueLabels, getLabelsForValues, mergeValues, sortValues, } from "./utils/values";
|
|
31
31
|
export type { ValueDefinition } from "./utils/values";
|
|
32
|
-
export { isRangeOperator, isCustomOperator, isValidFilterConfig, isValidFilterType, generateTagText, generateTagTitle, getTagBoldText, getAvailableTypes, getFilterTypeLabel, buildFilterSlots, getPresetSlotId, isConfiguredFilter, getConfiguredFilters, } from "./utils/helpers";
|
|
32
|
+
export { isRangeOperator, isCustomOperator, isValidFilterConfig, isValidFilterType, generateTagText, generateTagTitle, getTagBoldText, getAvailableTypes, getFilterTypeLabel, buildFilterSlots, getPresetSlotId, isConfiguredFilter, getConfiguredFilters, isPersistOptionEnabled, getInitialPersistValue, getPersistOptionLabel, } from "./utils/helpers";
|
|
33
33
|
export { FilterPositionCalculator } from "./utils/positionCalculator";
|
|
34
|
-
export { ADVANCED_FILTER_CONSTANTS } from "./constants";
|
|
35
|
-
export type { AdvancedFilterProps, FilterType, FilterTypeConfig, FilterConfig, AppliedFilter, OperatorDefinition, AdvancedFilterSize, AdvancedFilterVariant, FilterOperator, FilterInputType, FilterPresetType, AdvancedFilterSelectionMode, FilterSlotView, MultiConditionLogic, } from "./types";
|
|
34
|
+
export { ADVANCED_FILTER_CONSTANTS, DEFAULT_PERSIST_OPTION_LABEL, } from "./constants";
|
|
35
|
+
export type { AdvancedFilterProps, FilterType, FilterTypeConfig, FilterConfig, AppliedFilter, OperatorDefinition, AdvancedFilterSize, AdvancedFilterVariant, FilterOperator, FilterInputType, FilterPresetType, AdvancedFilterSelectionMode, FilterSlotView, MultiConditionLogic, FilterPersistOption, } from "./types";
|
|
@@ -154,6 +154,7 @@ export declare const Section: import("styled-components/dist/types").IStyledComp
|
|
|
154
154
|
*/
|
|
155
155
|
export declare const ErrorMessageWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never> & Partial<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>> & string;
|
|
156
156
|
/**
|
|
157
|
-
*
|
|
157
|
+
* ボタンコントロールラッパー(persist チェックと確定ボタンを同列に配置)
|
|
158
158
|
*/
|
|
159
159
|
export declare const ButtonControlsWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never> & Partial<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>> & string;
|
|
160
|
+
export declare const ButtonControlsActions: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never> & Partial<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>> & string;
|
|
@@ -62,6 +62,22 @@ export type ValueDefinition = {
|
|
|
62
62
|
};
|
|
63
63
|
/** 複数条件フィルタ内の条件結合ロジック */
|
|
64
64
|
export type MultiConditionLogic = "and" | "or";
|
|
65
|
+
/**
|
|
66
|
+
* フィルタ条件を次回訪問時も維持するかの ConfigPanel オプション(opt-in)
|
|
67
|
+
* enabled が true のときのみチェックボックスを表示する
|
|
68
|
+
*
|
|
69
|
+
* 永続化そのもの(IndexedDB / localStorage / API 等への保存・復元)は
|
|
70
|
+
* consumer が `onFiltersChange` と `initialAppliedFilters` で実装する。
|
|
71
|
+
* 適用時に付与される `AppliedFilter.persist` を保存ポリシーに利用する。
|
|
72
|
+
*/
|
|
73
|
+
export type FilterPersistOption = {
|
|
74
|
+
/** チェックボックスを表示するか。未指定/false = 非表示(後方互換) */
|
|
75
|
+
enabled?: boolean;
|
|
76
|
+
/** 新規適用時の初期値。未指定時は false */
|
|
77
|
+
defaultValue?: boolean;
|
|
78
|
+
/** ラベル上書き。未指定時は「条件を維持」 */
|
|
79
|
+
label?: string;
|
|
80
|
+
};
|
|
65
81
|
/**
|
|
66
82
|
* 1つのフィルタタイプで複数のフィルタリング条件を設定するための設定定義
|
|
67
83
|
* 例: 複合フィルタで「性別」と「年齢」の2つの条件を設定
|
|
@@ -130,6 +146,8 @@ export type FilterTypeConfig = {
|
|
|
130
146
|
multiConditionLogic?: MultiConditionLogic;
|
|
131
147
|
/** 日付の表示フォーマット(dayjs形式)。指定時は Tag と DatePicker で同一フォーマット。未指定は YYYY-MM-DD */
|
|
132
148
|
dateFormat?: string;
|
|
149
|
+
/** 条件維持オプション。enabled 時のみ ConfigPanel にチェックボックスを表示 */
|
|
150
|
+
persistOption?: FilterPersistOption;
|
|
133
151
|
};
|
|
134
152
|
/**
|
|
135
153
|
* 1つのフィルタリング条件(オペレーターと値の組み合わせ)
|
|
@@ -153,6 +171,11 @@ export type FilterConfig = {
|
|
|
153
171
|
isRange?: boolean;
|
|
154
172
|
/** 複数条件フィルタ用:複数のフィルタリング条件 */
|
|
155
173
|
conditions?: FilterCondition[];
|
|
174
|
+
/**
|
|
175
|
+
* 条件を次回訪問時も維持するか(consumer が保存ポリシーに利用)
|
|
176
|
+
* persistOption.enabled 時のみ ConfigPanel 適用で付与される
|
|
177
|
+
*/
|
|
178
|
+
persist?: boolean;
|
|
156
179
|
};
|
|
157
180
|
export type AppliedFilter = {
|
|
158
181
|
id: string;
|
|
@@ -165,6 +188,11 @@ export type AppliedFilter = {
|
|
|
165
188
|
isRange?: boolean;
|
|
166
189
|
/** 複数条件フィルタ用:複数のフィルタリング条件 */
|
|
167
190
|
conditions?: FilterCondition[];
|
|
191
|
+
/**
|
|
192
|
+
* 条件を次回訪問時も維持するか(consumer が保存ポリシーに利用)
|
|
193
|
+
* persistOption.enabled 時のみ ConfigPanel 適用で付与される
|
|
194
|
+
*/
|
|
195
|
+
persist?: boolean;
|
|
168
196
|
};
|
|
169
197
|
export type AdvancedFilterProps = {
|
|
170
198
|
types: FilterType[];
|
|
@@ -211,6 +239,7 @@ export type AdvancedFilterConfigPanelProps = {
|
|
|
211
239
|
operator: string;
|
|
212
240
|
values: (string | boolean)[];
|
|
213
241
|
conditions?: FilterCondition[];
|
|
242
|
+
persist?: boolean;
|
|
214
243
|
} | null;
|
|
215
244
|
filterConfig?: FilterTypeConfig;
|
|
216
245
|
savedCoordinates?: {
|
|
@@ -23,6 +23,14 @@ export declare const isRangeOperator: (operator: string, filterConfig?: FilterTy
|
|
|
23
23
|
* カスタムオペレーターかどうかを判定する
|
|
24
24
|
*/
|
|
25
25
|
export declare const isCustomOperator: (operator: string, filterConfig?: FilterTypeConfig) => boolean;
|
|
26
|
+
/** persistOption が有効か(ConfigPanel にチェックボックスを表示するか) */
|
|
27
|
+
export declare const isPersistOptionEnabled: (filterConfig?: FilterTypeConfig) => boolean;
|
|
28
|
+
/** ConfigPanel チェックボックスの初期値 */
|
|
29
|
+
export declare const getInitialPersistValue: (filterConfig?: FilterTypeConfig, editingFilter?: {
|
|
30
|
+
persist?: boolean;
|
|
31
|
+
} | null) => boolean;
|
|
32
|
+
/** persistOption の表示ラベル */
|
|
33
|
+
export declare const getPersistOptionLabel: (filterConfig?: FilterTypeConfig) => string;
|
|
26
34
|
/**
|
|
27
35
|
* フィルターを適用する
|
|
28
36
|
*/
|