@ultraviolet/ui 3.18.1 → 3.19.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/Radio/index.d.ts.map +1 -1
- package/dist/components/Radio/index.js +1 -0
- package/dist/components/SelectInput/components/SelectBar/selectBar.css.d.ts.map +1 -1
- package/dist/composition.js +5 -1
- package/dist/compositions/EstimateCost/styles.css.js +2 -0
- package/dist/compositions/Filters/Filters.d.ts +9 -0
- package/dist/compositions/Filters/Filters.d.ts.map +1 -0
- package/dist/compositions/Filters/Filters.js +36 -0
- package/dist/compositions/Filters/filterTypes/FilterDatetimeRange/Dropdown.d.ts +16 -0
- package/dist/compositions/Filters/filterTypes/FilterDatetimeRange/Dropdown.d.ts.map +1 -0
- package/dist/compositions/Filters/filterTypes/FilterDatetimeRange/Dropdown.js +137 -0
- package/dist/compositions/Filters/filterTypes/FilterDatetimeRange/FilterDatetimeRange.d.ts +6 -0
- package/dist/compositions/Filters/filterTypes/FilterDatetimeRange/FilterDatetimeRange.d.ts.map +1 -0
- package/dist/compositions/Filters/filterTypes/FilterDatetimeRange/FilterDatetimeRange.js +74 -0
- package/dist/compositions/Filters/filterTypes/FilterDatetimeRange/filterDatetimeRange.styles.css.d.ts +5 -0
- package/dist/compositions/Filters/filterTypes/FilterDatetimeRange/filterDatetimeRange.styles.css.d.ts.map +1 -0
- package/dist/compositions/Filters/filterTypes/FilterDatetimeRange/filterDatetimeRange.styles.css.js +16 -0
- package/dist/compositions/Filters/filterTypes/FilterDatetimeRange/filterDatetimeRange.styles.css.ts.vanilla.js +8 -0
- package/dist/compositions/Filters/filterTypes/FilterDatetimeRange/type.d.ts +16 -0
- package/dist/compositions/Filters/filterTypes/FilterDatetimeRange/type.d.ts.map +1 -0
- package/dist/compositions/Filters/filterTypes/FilterMultiSelect.d.ts +5 -0
- package/dist/compositions/Filters/filterTypes/FilterMultiSelect.d.ts.map +1 -0
- package/dist/compositions/Filters/filterTypes/FilterMultiSelect.js +53 -0
- package/dist/compositions/Filters/filterTypes/FilterNumber.d.ts +5 -0
- package/dist/compositions/Filters/filterTypes/FilterNumber.d.ts.map +1 -0
- package/dist/compositions/Filters/filterTypes/FilterNumber.js +24 -0
- package/dist/compositions/Filters/filterTypes/FilterSearch.d.ts +5 -0
- package/dist/compositions/Filters/filterTypes/FilterSearch.d.ts.map +1 -0
- package/dist/compositions/Filters/filterTypes/FilterSearch.js +42 -0
- package/dist/compositions/Filters/filterTypes/FilterSelect.d.ts +6 -0
- package/dist/compositions/Filters/filterTypes/FilterSelect.d.ts.map +1 -0
- package/dist/compositions/Filters/filterTypes/FilterSelect.js +46 -0
- package/dist/compositions/Filters/filterTypes/FilterSlider.d.ts +5 -0
- package/dist/compositions/Filters/filterTypes/FilterSlider.d.ts.map +1 -0
- package/dist/compositions/Filters/filterTypes/FilterSlider.js +31 -0
- package/dist/compositions/Filters/filterTypes/FilterText.d.ts +5 -0
- package/dist/compositions/Filters/filterTypes/FilterText.d.ts.map +1 -0
- package/dist/compositions/Filters/filterTypes/FilterText.js +42 -0
- package/dist/compositions/Filters/index.d.ts +7 -0
- package/dist/compositions/Filters/index.d.ts.map +1 -0
- package/dist/compositions/Filters/index.js +12 -0
- package/dist/compositions/Filters/parts/AbstractFilter.d.ts +8 -0
- package/dist/compositions/Filters/parts/AbstractFilter.d.ts.map +1 -0
- package/dist/compositions/Filters/parts/AbstractFilter.js +54 -0
- package/dist/compositions/Filters/parts/ExpandableFilterGroup.d.ts +9 -0
- package/dist/compositions/Filters/parts/ExpandableFilterGroup.d.ts.map +1 -0
- package/dist/compositions/Filters/parts/ExpandableFilterGroup.js +59 -0
- package/dist/compositions/Filters/parts/FiltersDrawer.d.ts +13 -0
- package/dist/compositions/Filters/parts/FiltersDrawer.d.ts.map +1 -0
- package/dist/compositions/Filters/parts/FiltersDrawer.js +100 -0
- package/dist/compositions/Filters/parts/FiltersMainRow.d.ts +19 -0
- package/dist/compositions/Filters/parts/FiltersMainRow.d.ts.map +1 -0
- package/dist/compositions/Filters/parts/FiltersMainRow.js +85 -0
- package/dist/compositions/Filters/parts/FiltersProvider.d.ts +17 -0
- package/dist/compositions/Filters/parts/FiltersProvider.d.ts.map +1 -0
- package/dist/compositions/Filters/parts/FiltersProvider.js +55 -0
- package/dist/compositions/Filters/parts/helpers.d.ts +5 -0
- package/dist/compositions/Filters/parts/helpers.d.ts.map +1 -0
- package/dist/compositions/Filters/parts/helpers.js +38 -0
- package/dist/compositions/Filters/parts/reducer.d.ts +40 -0
- package/dist/compositions/Filters/parts/reducer.d.ts.map +1 -0
- package/dist/compositions/Filters/parts/reducer.js +50 -0
- package/dist/compositions/Filters/parts/styles.css.d.ts +4 -0
- package/dist/compositions/Filters/parts/styles.css.d.ts.map +1 -0
- package/dist/compositions/Filters/parts/styles.css.js +13 -0
- package/dist/compositions/Filters/parts/styles.css.ts.vanilla.js +8 -0
- package/dist/compositions/Filters/parts/useFilters.d.ts +28 -0
- package/dist/compositions/Filters/parts/useFilters.d.ts.map +1 -0
- package/dist/compositions/Filters/parts/useFilters.js +100 -0
- package/dist/compositions/Filters/types.d.ts +80 -0
- package/dist/compositions/Filters/types.d.ts.map +1 -0
- package/dist/compositions/InfoTable/styles.css.js +0 -14
- package/dist/compositions/Navigation/styles.css.js +2 -0
- package/dist/compositions/Navigation/variables.css.js +0 -2
- package/dist/compositions/OfferList/components/Row.d.ts +1 -1
- package/dist/compositions/OfferList/components/Row.d.ts.map +1 -1
- package/dist/compositions/OfferList/components/Row.js +3 -2
- package/dist/compositions/OfferList/index.d.ts +1 -1
- package/dist/compositions/OptionSelector/styles.css.js +14 -0
- package/dist/compositions/SteppedListCard/styles.css.js +0 -2
- package/dist/compositions/index.d.ts +2 -0
- package/dist/compositions/index.d.ts.map +1 -1
- package/dist/compositions/index.js +6 -0
- package/dist/ui.css +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { AnyObject } from '../types';
|
|
2
|
+
export type FiltersState<V extends AnyObject> = {
|
|
3
|
+
values: V;
|
|
4
|
+
lastSubmittedValues: V;
|
|
5
|
+
defaultValues: V;
|
|
6
|
+
};
|
|
7
|
+
export type FiltersAction<V extends AnyObject> = {
|
|
8
|
+
type: 'SET_VALUE';
|
|
9
|
+
payload: {
|
|
10
|
+
name: keyof V;
|
|
11
|
+
value: unknown;
|
|
12
|
+
};
|
|
13
|
+
} | {
|
|
14
|
+
type: 'SET_VALUES';
|
|
15
|
+
payload: {
|
|
16
|
+
values: Partial<V>;
|
|
17
|
+
};
|
|
18
|
+
} | {
|
|
19
|
+
type: 'RESET_FIELD';
|
|
20
|
+
payload: {
|
|
21
|
+
name: keyof V;
|
|
22
|
+
defaultValue?: V[keyof V];
|
|
23
|
+
};
|
|
24
|
+
} | {
|
|
25
|
+
type: 'RESET_FIELDS';
|
|
26
|
+
payload: {
|
|
27
|
+
names: (keyof V)[];
|
|
28
|
+
};
|
|
29
|
+
} | {
|
|
30
|
+
type: 'RESET';
|
|
31
|
+
payload: {
|
|
32
|
+
values?: Partial<V>;
|
|
33
|
+
};
|
|
34
|
+
} | {
|
|
35
|
+
type: 'SUBMIT';
|
|
36
|
+
} | {
|
|
37
|
+
type: 'DISCARD';
|
|
38
|
+
};
|
|
39
|
+
export declare const filtersReducer: <V extends AnyObject>(state: FiltersState<V>, action: FiltersAction<V>) => FiltersState<V>;
|
|
40
|
+
//# sourceMappingURL=reducer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reducer.d.ts","sourceRoot":"","sources":["../../../../src/compositions/Filters/parts/reducer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAA;AAGzC,MAAM,MAAM,YAAY,CAAC,CAAC,SAAS,SAAS,IAAI;IAC9C,MAAM,EAAE,CAAC,CAAA;IACT,mBAAmB,EAAE,CAAC,CAAA;IACtB,aAAa,EAAE,CAAC,CAAA;CACjB,CAAA;AAED,MAAM,MAAM,aAAa,CAAC,CAAC,SAAS,SAAS,IACzC;IAAE,IAAI,EAAE,WAAW,CAAC;IAAC,OAAO,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC,CAAC;QAAC,KAAK,EAAE,OAAO,CAAA;KAAE,CAAA;CAAE,GACjE;IAAE,IAAI,EAAE,YAAY,CAAC;IAAC,OAAO,EAAE;QAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,CAAA;KAAE,CAAA;CAAE,GACvD;IAAE,IAAI,EAAE,aAAa,CAAC;IAAC,OAAO,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC,CAAC;QAAC,YAAY,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAA;KAAE,CAAA;CAAE,GAC9E;IAAE,IAAI,EAAE,cAAc,CAAC;IAAC,OAAO,EAAE;QAAE,KAAK,EAAE,CAAC,MAAM,CAAC,CAAC,EAAE,CAAA;KAAE,CAAA;CAAE,GACzD;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE;QAAE,MAAM,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,CAAA;KAAE,CAAA;CAAE,GACnD;IAAE,IAAI,EAAE,QAAQ,CAAA;CAAE,GAClB;IAAE,IAAI,EAAE,SAAS,CAAA;CAAE,CAAA;AAavB,eAAO,MAAM,cAAc,GAAI,CAAC,SAAS,SAAS,SACzC,YAAY,CAAC,CAAC,CAAC,UACd,aAAa,CAAC,CAAC,CAAC,KACvB,YAAY,CAAC,CAAC,CAuFhB,CAAA"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { __esmMin, __name } from "../../../_virtual/_rolldown/runtime.js";
|
|
2
|
+
import { _objectSpread2, init_objectSpread2 } from "../../../_virtual/_@oxc-project_runtime@0.133.0/helpers/esm/objectSpread2.js";
|
|
3
|
+
import { init_helpers, isSameValues } from "./helpers.js";
|
|
4
|
+
|
|
5
|
+
//#region src/compositions/Filters/parts/reducer.ts
|
|
6
|
+
var getNewState, filtersReducer;
|
|
7
|
+
var init_reducer = __esmMin(() => {
|
|
8
|
+
init_helpers();
|
|
9
|
+
init_objectSpread2();
|
|
10
|
+
getNewState = (newValues, state) => {
|
|
11
|
+
if (isSameValues(newValues, state.values)) return state;
|
|
12
|
+
return _objectSpread2(_objectSpread2({}, state), {}, { values: newValues });
|
|
13
|
+
};
|
|
14
|
+
filtersReducer = (state, action) => {
|
|
15
|
+
switch (action.type) {
|
|
16
|
+
case "SET_VALUE": return getNewState(_objectSpread2(_objectSpread2({}, state.values), {}, { [action.payload.name]: action.payload.value }), state);
|
|
17
|
+
case "SET_VALUES": return getNewState(_objectSpread2(_objectSpread2({}, state.values), action.payload.values), state);
|
|
18
|
+
case "RESET_FIELD": {
|
|
19
|
+
const newDefaultValue = action.payload.defaultValue === void 0 ? state.defaultValues[action.payload.name] : action.payload.defaultValue;
|
|
20
|
+
const newValues = _objectSpread2(_objectSpread2({}, state.values), {}, { [action.payload.name]: newDefaultValue });
|
|
21
|
+
const newDefaultValues = _objectSpread2(_objectSpread2({}, state.defaultValues), {}, { [action.payload.name]: newDefaultValue });
|
|
22
|
+
if (isSameValues(newValues, state.values) && isSameValues(newDefaultValues, state.defaultValues)) return state;
|
|
23
|
+
return _objectSpread2(_objectSpread2({}, state), {}, {
|
|
24
|
+
values: newValues,
|
|
25
|
+
defaultValues: newDefaultValues
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
case "RESET_FIELDS": {
|
|
29
|
+
const newValues = _objectSpread2({}, state.values);
|
|
30
|
+
for (const key of action.payload.names) newValues[key] = state.defaultValues[key];
|
|
31
|
+
return getNewState(newValues, state);
|
|
32
|
+
}
|
|
33
|
+
case "RESET": {
|
|
34
|
+
const newDefaultValues = _objectSpread2(_objectSpread2({}, state.defaultValues), action.payload.values);
|
|
35
|
+
if (isSameValues(newDefaultValues, state.values) && isSameValues(newDefaultValues, state.defaultValues)) return state;
|
|
36
|
+
return _objectSpread2(_objectSpread2({}, state), {}, {
|
|
37
|
+
values: newDefaultValues,
|
|
38
|
+
defaultValues: newDefaultValues
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
case "SUBMIT": return _objectSpread2(_objectSpread2({}, state), {}, { lastSubmittedValues: state.values });
|
|
42
|
+
case "DISCARD": return getNewState(state.lastSubmittedValues, state);
|
|
43
|
+
default: return state;
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
//#endregion
|
|
49
|
+
init_reducer();
|
|
50
|
+
export { filtersReducer, init_reducer };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.css.d.ts","sourceRoot":"","sources":["../../../../src/compositions/Filters/parts/styles.css.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,YAAY;;CAExB,CAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { __esmMin } from "../../../_virtual/_rolldown/runtime.js";
|
|
2
|
+
import { init_styles_css_ts_vanilla } from "./styles.css.ts.vanilla.js";
|
|
3
|
+
|
|
4
|
+
//#region src/compositions/Filters/parts/styles.css.ts
|
|
5
|
+
var filterStyles;
|
|
6
|
+
var init_styles_css = __esmMin(() => {
|
|
7
|
+
init_styles_css_ts_vanilla();
|
|
8
|
+
filterStyles = { mainRow: "uv_1mgfhqz0" };
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
//#endregion
|
|
12
|
+
init_styles_css();
|
|
13
|
+
export { filterStyles, init_styles_css };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { __esmMin } from "../../../_virtual/_rolldown/runtime.js";
|
|
2
|
+
|
|
3
|
+
//#region src/compositions/Filters/parts/styles.css.ts.vanilla.css
|
|
4
|
+
var init_styles_css_ts_vanilla = __esmMin(() => {});
|
|
5
|
+
|
|
6
|
+
//#endregion
|
|
7
|
+
init_styles_css_ts_vanilla();
|
|
8
|
+
export { init_styles_css_ts_vanilla };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { AnyObject } from '../types';
|
|
2
|
+
export type UseFiltersParams<V extends AnyObject> = {
|
|
3
|
+
defaultValues: V;
|
|
4
|
+
initialValues?: Partial<V>;
|
|
5
|
+
onChange?: (values: V) => void;
|
|
6
|
+
onSubmit?: (values: V) => void;
|
|
7
|
+
};
|
|
8
|
+
export type UseFiltersReturn<V extends AnyObject> = ReturnType<typeof useFilters<V>>;
|
|
9
|
+
/**
|
|
10
|
+
* UI-agnostic implementation of the filters logic.
|
|
11
|
+
*/
|
|
12
|
+
export declare const useFilters: <V extends AnyObject>({ defaultValues, initialValues, onChange, onSubmit, }: UseFiltersParams<V>) => {
|
|
13
|
+
values: V;
|
|
14
|
+
defaultValues: V;
|
|
15
|
+
dirtyFilters: (keyof V)[];
|
|
16
|
+
appliedFilters: (keyof V)[];
|
|
17
|
+
lastSubmittedValues: V;
|
|
18
|
+
setValue: <K extends keyof V>(name: K, value: V[K]) => void;
|
|
19
|
+
setValues: (values: Partial<V>) => void;
|
|
20
|
+
resetField: <K extends keyof V>(name: K, options?: {
|
|
21
|
+
defaultValue?: V[K];
|
|
22
|
+
}) => void;
|
|
23
|
+
resetFields: (names: (keyof V)[]) => void;
|
|
24
|
+
reset: (values?: Partial<V>) => void;
|
|
25
|
+
submit: (overrideValues?: Partial<V>) => void;
|
|
26
|
+
discard: () => void;
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=useFilters.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useFilters.d.ts","sourceRoot":"","sources":["../../../../src/compositions/Filters/parts/useFilters.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAA;AAIzC,MAAM,MAAM,gBAAgB,CAAC,CAAC,SAAS,SAAS,IAAI;IAClD,aAAa,EAAE,CAAC,CAAA;IAChB,aAAa,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,CAAA;IAC1B,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,KAAK,IAAI,CAAA;IAC9B,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,KAAK,IAAI,CAAA;CAC/B,CAAA;AAED,MAAM,MAAM,gBAAgB,CAAC,CAAC,SAAS,SAAS,IAAI,UAAU,CAAC,OAAO,UAAU,CAAC,CAAC,CAAC,CAAC,CAAA;AAEpF;;GAEG;AACH,eAAO,MAAM,UAAU,GAAI,CAAC,SAAS,SAAS,yDAK3C,gBAAgB,CAAC,CAAC,CAAC;;;;;;eAmCF,CAAC,SAAS,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;wBAI9B,OAAO,CAAC,CAAC,CAAC;iBAIjB,CAAC,SAAS,MAAM,CAAC,QAAQ,CAAC,YAAY;QAAE,YAAY,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE;yBAIrD,CAAC,MAAM,CAAC,CAAC,EAAE;qBAIf,OAAO,CAAC,CAAC,CAAC;8BAID,OAAO,CAAC,CAAC,CAAC;;CA2B5C,CAAA"}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { __esmMin, __name } from "../../../_virtual/_rolldown/runtime.js";
|
|
2
|
+
import { _objectSpread2, init_objectSpread2 } from "../../../_virtual/_@oxc-project_runtime@0.133.0/helpers/esm/objectSpread2.js";
|
|
3
|
+
import { getKeysWithDifferentValues, init_helpers, isSameValues } from "./helpers.js";
|
|
4
|
+
import { filtersReducer, init_reducer } from "./reducer.js";
|
|
5
|
+
import { useEffect, useMemo, useReducer } from "react";
|
|
6
|
+
|
|
7
|
+
//#region src/compositions/Filters/parts/useFilters.ts
|
|
8
|
+
var useFilters;
|
|
9
|
+
var init_useFilters = __esmMin(() => {
|
|
10
|
+
init_helpers();
|
|
11
|
+
init_reducer();
|
|
12
|
+
init_objectSpread2();
|
|
13
|
+
useFilters = ({ defaultValues, initialValues = {}, onChange, onSubmit }) => {
|
|
14
|
+
const initialState = useMemo(() => {
|
|
15
|
+
const stateInitialValues = _objectSpread2(_objectSpread2({}, defaultValues), initialValues);
|
|
16
|
+
return {
|
|
17
|
+
values: stateInitialValues,
|
|
18
|
+
lastSubmittedValues: stateInitialValues,
|
|
19
|
+
defaultValues
|
|
20
|
+
};
|
|
21
|
+
}, [defaultValues, initialValues]);
|
|
22
|
+
const [state, dispatch] = useReducer(filtersReducer, initialState);
|
|
23
|
+
useEffect(() => {
|
|
24
|
+
if (state.values !== initialState.values) onChange === null || onChange === void 0 || onChange(state.values);
|
|
25
|
+
}, [
|
|
26
|
+
state.values,
|
|
27
|
+
onChange,
|
|
28
|
+
initialState.values
|
|
29
|
+
]);
|
|
30
|
+
/**
|
|
31
|
+
* Names of filters that have been modified from the default values AND submitted
|
|
32
|
+
*/
|
|
33
|
+
const appliedFilters = useMemo(() => getKeysWithDifferentValues(state.lastSubmittedValues, state.defaultValues), [state.lastSubmittedValues, state.defaultValues]);
|
|
34
|
+
/**
|
|
35
|
+
* Names of filters that have been modified from the default values
|
|
36
|
+
*/
|
|
37
|
+
const dirtyFilters = useMemo(() => getKeysWithDifferentValues(state.values, state.defaultValues), [state.values, state.defaultValues]);
|
|
38
|
+
const setValue = (name, value) => {
|
|
39
|
+
dispatch({
|
|
40
|
+
type: "SET_VALUE",
|
|
41
|
+
payload: {
|
|
42
|
+
name,
|
|
43
|
+
value
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
};
|
|
47
|
+
const setValues = (values) => {
|
|
48
|
+
dispatch({
|
|
49
|
+
type: "SET_VALUES",
|
|
50
|
+
payload: { values }
|
|
51
|
+
});
|
|
52
|
+
};
|
|
53
|
+
const resetField = (name, options) => {
|
|
54
|
+
dispatch({
|
|
55
|
+
type: "RESET_FIELD",
|
|
56
|
+
payload: {
|
|
57
|
+
name,
|
|
58
|
+
defaultValue: options === null || options === void 0 ? void 0 : options.defaultValue
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
};
|
|
62
|
+
const resetFields = (names) => {
|
|
63
|
+
dispatch({
|
|
64
|
+
type: "RESET_FIELDS",
|
|
65
|
+
payload: { names }
|
|
66
|
+
});
|
|
67
|
+
};
|
|
68
|
+
const reset = (values) => {
|
|
69
|
+
dispatch({
|
|
70
|
+
type: "RESET",
|
|
71
|
+
payload: { values }
|
|
72
|
+
});
|
|
73
|
+
};
|
|
74
|
+
const submit = (overrideValues) => {
|
|
75
|
+
dispatch({ type: "SUBMIT" });
|
|
76
|
+
if (!isSameValues(_objectSpread2(_objectSpread2({}, state.values), overrideValues), state.lastSubmittedValues)) onSubmit === null || onSubmit === void 0 || onSubmit(_objectSpread2(_objectSpread2({}, state.values), overrideValues));
|
|
77
|
+
};
|
|
78
|
+
const discard = () => {
|
|
79
|
+
dispatch({ type: "DISCARD" });
|
|
80
|
+
};
|
|
81
|
+
return {
|
|
82
|
+
values: state.values,
|
|
83
|
+
defaultValues: state.defaultValues,
|
|
84
|
+
dirtyFilters,
|
|
85
|
+
appliedFilters,
|
|
86
|
+
lastSubmittedValues: state.lastSubmittedValues,
|
|
87
|
+
setValue,
|
|
88
|
+
setValues,
|
|
89
|
+
resetField,
|
|
90
|
+
resetFields,
|
|
91
|
+
reset,
|
|
92
|
+
submit,
|
|
93
|
+
discard
|
|
94
|
+
};
|
|
95
|
+
};
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
//#endregion
|
|
99
|
+
init_useFilters();
|
|
100
|
+
export { init_useFilters, useFilters };
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import type { ComponentProps } from 'react';
|
|
2
|
+
import type { DateInput } from '../../components/DateInput';
|
|
3
|
+
import type { SelectInput } from '../../components/SelectInput';
|
|
4
|
+
import type { Slider } from '../../components/Slider';
|
|
5
|
+
import type { DatetimeRangeLocales } from './filterTypes/FilterDatetimeRange/type';
|
|
6
|
+
export type AnyObject = Record<string, unknown>;
|
|
7
|
+
export type FilterPropsBase<Value> = {
|
|
8
|
+
value: Value;
|
|
9
|
+
onChange: (value: Value) => void;
|
|
10
|
+
hideLabel?: boolean;
|
|
11
|
+
};
|
|
12
|
+
export type FilterConfigItemBase = {
|
|
13
|
+
name: string;
|
|
14
|
+
label: string;
|
|
15
|
+
placeholder?: string;
|
|
16
|
+
hideInDrawer?: boolean;
|
|
17
|
+
expanded?: boolean;
|
|
18
|
+
};
|
|
19
|
+
export type FilterConfigItemText = FilterConfigItemBase & {
|
|
20
|
+
type: 'text';
|
|
21
|
+
regexp?: RegExp;
|
|
22
|
+
debounceDuration?: number;
|
|
23
|
+
};
|
|
24
|
+
export type FilterConfigItemSearch = FilterConfigItemBase & {
|
|
25
|
+
type: 'search';
|
|
26
|
+
regexp?: RegExp;
|
|
27
|
+
debounceDuration?: number;
|
|
28
|
+
};
|
|
29
|
+
export type FilterConfigItemSelect<V extends AnyObject = AnyObject> = FilterConfigItemBase & {
|
|
30
|
+
type: 'select';
|
|
31
|
+
options: ComponentProps<typeof SelectInput>['options'] | ((values: V) => ComponentProps<typeof SelectInput>['options']);
|
|
32
|
+
clearable?: boolean;
|
|
33
|
+
};
|
|
34
|
+
export type FilterConfigItemMultiSelect<V extends AnyObject = AnyObject> = FilterConfigItemBase & Pick<ComponentProps<typeof SelectInput>, 'searchable' | 'clearable' | 'selectAll' | 'selectAllGroup'> & {
|
|
35
|
+
type: 'multiselect';
|
|
36
|
+
options: ComponentProps<typeof SelectInput>['options'] | ((values: V) => ComponentProps<typeof SelectInput>['options']);
|
|
37
|
+
};
|
|
38
|
+
export type FilterConfigItemSlider = FilterConfigItemBase & Pick<ComponentProps<typeof Slider>, 'options' | 'step' | 'unit' | 'min' | 'max' | 'double'> & {
|
|
39
|
+
type: 'slider';
|
|
40
|
+
};
|
|
41
|
+
type RelativePreset = {
|
|
42
|
+
label: string;
|
|
43
|
+
value: string;
|
|
44
|
+
relativeTime: number;
|
|
45
|
+
};
|
|
46
|
+
export type FilterConfigItemDatetimeRange = FilterConfigItemBase & {
|
|
47
|
+
type: 'datetimeRange';
|
|
48
|
+
minDate?: Date;
|
|
49
|
+
maxDate?: Date;
|
|
50
|
+
dateFormatter: (date: Date) => string;
|
|
51
|
+
texts: DatetimeRangeLocales;
|
|
52
|
+
dateInputLocale: ComponentProps<typeof DateInput>['locale'];
|
|
53
|
+
relativePresets: [RelativePreset, ...RelativePreset[]];
|
|
54
|
+
};
|
|
55
|
+
export type FilterConfigItemNumber = FilterConfigItemBase & {
|
|
56
|
+
type: 'number';
|
|
57
|
+
min?: number;
|
|
58
|
+
max?: number;
|
|
59
|
+
step?: number;
|
|
60
|
+
};
|
|
61
|
+
export type FilterConfigItemCustom = FilterConfigItemBase & {
|
|
62
|
+
type: string;
|
|
63
|
+
};
|
|
64
|
+
export type FilterConfigItem<V extends AnyObject = AnyObject> = FilterConfigItemText | FilterConfigItemSearch | FilterConfigItemSelect<V> | FilterConfigItemMultiSelect<V> | FilterConfigItemSlider | FilterConfigItemDatetimeRange | FilterConfigItemCustom;
|
|
65
|
+
export type FilterConfigGroup<V extends AnyObject = AnyObject> = {
|
|
66
|
+
type: 'group';
|
|
67
|
+
label: string;
|
|
68
|
+
items: FilterConfigItem<V>[];
|
|
69
|
+
hideInDrawer?: boolean;
|
|
70
|
+
expanded?: boolean;
|
|
71
|
+
};
|
|
72
|
+
export type FilterConfig<V extends AnyObject = AnyObject> = FilterConfigGroup<V> | FilterConfigItem<V>;
|
|
73
|
+
export type FilterComponentProps<Value = any, Config = any, Values extends AnyObject = AnyObject> = FilterPropsBase<Value> & {
|
|
74
|
+
config: Config;
|
|
75
|
+
size: 'large' | 'medium';
|
|
76
|
+
directionContext: 'column' | 'row';
|
|
77
|
+
values: Values;
|
|
78
|
+
};
|
|
79
|
+
export {};
|
|
80
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/compositions/Filters/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;AAC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@ -81,13 +81,6 @@ import { init_styles_css_ts_vanilla as init_styles_css_ts_vanilla$71 } from "../
|
|
|
81
81
|
import { init_styles_css_ts_vanilla as init_styles_css_ts_vanilla$72 } from "../../components/ToggleGroup/styles.css.ts.vanilla.js";
|
|
82
82
|
import { init_styles_css_ts_vanilla as init_styles_css_ts_vanilla$73 } from "../../components/TreeMapChart/styles.css.ts.vanilla.js";
|
|
83
83
|
import { init_styles_css_ts_vanilla as init_styles_css_ts_vanilla$74 } from "../../components/VerificationCode/styles.css.ts.vanilla.js";
|
|
84
|
-
import { init_variables_css_ts_vanilla as init_variables_css_ts_vanilla$2 } from "../../components/Avatar/variables.css.ts.vanilla.js";
|
|
85
|
-
import { init_variables_css_ts_vanilla as init_variables_css_ts_vanilla$3 } from "../../components/List/variables.css.ts.vanilla.js";
|
|
86
|
-
import { init_variables_css_ts_vanilla as init_variables_css_ts_vanilla$4 } from "../../components/SelectableCard/variables.css.ts.vanilla.js";
|
|
87
|
-
import { init_variables_css_ts_vanilla as init_variables_css_ts_vanilla$5 } from "../../components/Text/variables.css.ts.vanilla.js";
|
|
88
|
-
import { init_variables_css_ts_vanilla as init_variables_css_ts_vanilla$6 } from "../../components/Popup/variables.css.ts.vanilla.js";
|
|
89
|
-
import { init_variables_css_ts_vanilla as init_variables_css_ts_vanilla$7 } from "../../components/ProgressBar/variables.css.ts.vanilla.js";
|
|
90
|
-
import { init_variables_css_ts_vanilla as init_variables_css_ts_vanilla$8 } from "../../components/Table/variables.css.ts.vanilla.js";
|
|
91
84
|
import { init_styles_css_ts_vanilla as init_styles_css_ts_vanilla$75 } from "./styles.css.ts.vanilla.js";
|
|
92
85
|
import { createRuntimeFn } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
93
86
|
|
|
@@ -97,7 +90,6 @@ var init_styles_css = __esmMin(() => {
|
|
|
97
90
|
init_animationsVanillaExtract_css_ts_vanilla();
|
|
98
91
|
init_styles_css_ts_vanilla$29();
|
|
99
92
|
init_styles_css_ts_vanilla$18();
|
|
100
|
-
init_variables_css_ts_vanilla$2();
|
|
101
93
|
init_styles_css_ts_vanilla$30();
|
|
102
94
|
init_styles_css_ts_vanilla$12();
|
|
103
95
|
init_styles_css_ts_vanilla$32();
|
|
@@ -110,9 +102,7 @@ var init_styles_css = __esmMin(() => {
|
|
|
110
102
|
init_styles_css_ts_vanilla$28();
|
|
111
103
|
init_styles_css_ts_vanilla$37();
|
|
112
104
|
init_styles_css_ts_vanilla$23();
|
|
113
|
-
init_variables_css_ts_vanilla$3();
|
|
114
105
|
init_styles_css_ts_vanilla$24();
|
|
115
|
-
init_variables_css_ts_vanilla$4();
|
|
116
106
|
init_styles_css_ts_vanilla$25();
|
|
117
107
|
init_styles_css_ts_vanilla$26();
|
|
118
108
|
init_styles_css_ts_vanilla$38();
|
|
@@ -142,11 +132,8 @@ var init_styles_css = __esmMin(() => {
|
|
|
142
132
|
init_styles_css_ts_vanilla$54();
|
|
143
133
|
init_styles_css_ts_vanilla$1();
|
|
144
134
|
init_styles_css_ts_vanilla$2();
|
|
145
|
-
init_variables_css_ts_vanilla$5();
|
|
146
135
|
init_style_css_ts_vanilla();
|
|
147
|
-
init_variables_css_ts_vanilla$6();
|
|
148
136
|
init_styles_css_ts_vanilla$3();
|
|
149
|
-
init_variables_css_ts_vanilla$7();
|
|
150
137
|
init_styles_css_ts_vanilla$55();
|
|
151
138
|
init_styles_css_ts_vanilla$20();
|
|
152
139
|
init_styles_css_ts_vanilla$56();
|
|
@@ -170,7 +157,6 @@ var init_styles_css = __esmMin(() => {
|
|
|
170
157
|
init_styles_css_ts_vanilla$63();
|
|
171
158
|
init_styles_css_ts_vanilla$64();
|
|
172
159
|
init_styles_css_ts_vanilla$65();
|
|
173
|
-
init_variables_css_ts_vanilla$8();
|
|
174
160
|
init_styles_css_ts_vanilla$66();
|
|
175
161
|
init_styles_css_ts_vanilla$67();
|
|
176
162
|
init_styles_css_ts_vanilla$68();
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { __esmMin } from "../../_virtual/_rolldown/runtime.js";
|
|
2
2
|
import { init_animationsVanillaExtract_css_ts_vanilla } from "../../utils/animations/animationsVanillaExtract.css.ts.vanilla.js";
|
|
3
3
|
import { init_items_css_ts_vanilla } from "./components/items.css.ts.vanilla.js";
|
|
4
|
+
import { init_variables_css_ts_vanilla } from "./variables.css.ts.vanilla.js";
|
|
4
5
|
import { init_styles_css_ts_vanilla } from "./components/styles.css.ts.vanilla.js";
|
|
5
6
|
import { init_styles_css_ts_vanilla as init_styles_css_ts_vanilla$1 } from "./styles.css.ts.vanilla.js";
|
|
6
7
|
import { createRuntimeFn } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
@@ -10,6 +11,7 @@ var navigationStyle;
|
|
|
10
11
|
var init_styles_css = __esmMin(() => {
|
|
11
12
|
init_animationsVanillaExtract_css_ts_vanilla();
|
|
12
13
|
init_items_css_ts_vanilla();
|
|
14
|
+
init_variables_css_ts_vanilla();
|
|
13
15
|
init_styles_css_ts_vanilla();
|
|
14
16
|
init_styles_css_ts_vanilla$1();
|
|
15
17
|
navigationStyle = {
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { __esmMin } from "../../_virtual/_rolldown/runtime.js";
|
|
2
|
-
import { init_variables_css_ts_vanilla } from "./variables.css.ts.vanilla.js";
|
|
3
2
|
|
|
4
3
|
//#region src/compositions/Navigation/variables.css.ts
|
|
5
4
|
var widthNavigationContainer, widthNavigationContainerExpanded, widthNavigationContainerDuration;
|
|
6
5
|
var init_variables_css = __esmMin(() => {
|
|
7
|
-
init_variables_css_ts_vanilla();
|
|
8
6
|
widthNavigationContainer = "var(--uv_10912fi0)";
|
|
9
7
|
widthNavigationContainerExpanded = "var(--uv_10912fi1)";
|
|
10
8
|
widthNavigationContainerDuration = "var(--uv_10912fi2)";
|
|
@@ -14,6 +14,6 @@ type RowProps = ComponentProps<typeof List.Row> & {
|
|
|
14
14
|
};
|
|
15
15
|
style?: CSSProperties;
|
|
16
16
|
};
|
|
17
|
-
export declare const Row: ({ children, disabled, id, banner, expandablePadding, offerName, expandable: expandableContent, selectDisabled, highlightAnimation, expanded, className, 'data-dragging': dataDragging, 'data-testid': dataTestId, style, badge, }: RowProps) => import("react").JSX.Element;
|
|
17
|
+
export declare const Row: ({ children, disabled, id, banner, expandablePadding, offerName, expandable: expandableContent, selectDisabled, highlightAnimation, expanded, className, 'data-dragging': dataDragging, 'data-testid': dataTestId, style, badge, onClick, }: RowProps) => import("react").JSX.Element;
|
|
18
18
|
export {};
|
|
19
19
|
//# sourceMappingURL=Row.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Row.d.ts","sourceRoot":"","sources":["../../../../src/compositions/OfferList/components/Row.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACrE,OAAO,KAAK,EAAE,KAAK,IAAI,OAAO,EAAE,MAAM,2BAA2B,CAAA;AAEjE,OAAO,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAA;AAO/C,KAAK,QAAQ,GAAG,cAAc,CAAC,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG;IAChD,MAAM,CAAC,EAAE;QACP,IAAI,EAAE,SAAS,CAAA;QACf,SAAS,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAA;KACzD,CAAA;IACD,SAAS,EAAE,MAAM,CAAA;IACjB,KAAK,CAAC,EAAE;QACN,IAAI,EAAE,MAAM,CAAA;QACZ,SAAS,CAAC,EAAE,cAAc,CAAC,OAAO,OAAO,CAAC,CAAC,WAAW,CAAC,CAAA;QACvD,UAAU,CAAC,EAAE,cAAc,CAAC,OAAO,OAAO,CAAC,CAAC,YAAY,CAAC,CAAA;KAC1D,CAAA;IACD,KAAK,CAAC,EAAE,aAAa,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,GAAG,
|
|
1
|
+
{"version":3,"file":"Row.d.ts","sourceRoot":"","sources":["../../../../src/compositions/OfferList/components/Row.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACrE,OAAO,KAAK,EAAE,KAAK,IAAI,OAAO,EAAE,MAAM,2BAA2B,CAAA;AAEjE,OAAO,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAA;AAO/C,KAAK,QAAQ,GAAG,cAAc,CAAC,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG;IAChD,MAAM,CAAC,EAAE;QACP,IAAI,EAAE,SAAS,CAAA;QACf,SAAS,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAA;KACzD,CAAA;IACD,SAAS,EAAE,MAAM,CAAA;IACjB,KAAK,CAAC,EAAE;QACN,IAAI,EAAE,MAAM,CAAA;QACZ,SAAS,CAAC,EAAE,cAAc,CAAC,OAAO,OAAO,CAAC,CAAC,WAAW,CAAC,CAAA;QACvD,UAAU,CAAC,EAAE,cAAc,CAAC,OAAO,OAAO,CAAC,CAAC,YAAY,CAAC,CAAA;KAC1D,CAAA;IACD,KAAK,CAAC,EAAE,aAAa,CAAA;CACtB,CAAA;AAED,eAAO,MAAM,GAAG,+OAiBb,QAAQ,gCAyKV,CAAA"}
|
|
@@ -25,7 +25,7 @@ var init_Row = __esmMin(() => {
|
|
|
25
25
|
init_OfferListRowProvider();
|
|
26
26
|
init_SelectableCell();
|
|
27
27
|
init_styles_css();
|
|
28
|
-
Row = ({ children, disabled, id, banner, expandablePadding: expandablePadding$1, offerName, expandable: expandableContent, selectDisabled, highlightAnimation, expanded, className, "data-dragging": dataDragging, "data-testid": dataTestId, style, badge }) => {
|
|
28
|
+
Row = ({ children, disabled, id, banner, expandablePadding: expandablePadding$1, offerName, expandable: expandableContent, selectDisabled, highlightAnimation, expanded, className, "data-dragging": dataDragging, "data-testid": dataTestId, style, badge, onClick }) => {
|
|
29
29
|
const { selectable, radioSelectedRow, setRadioSelectedRow, checkboxSelectedRows, setCheckboxSelectedRows, expandable, loading, onChangeSelect, autoCollapse } = useOfferListContext();
|
|
30
30
|
const { expandedRowIds, collapseRow, expandRow } = List.useListContext();
|
|
31
31
|
const [isHovered, setHovered] = useState(false);
|
|
@@ -103,10 +103,11 @@ var init_Row = __esmMin(() => {
|
|
|
103
103
|
expanded: expanded !== null && expanded !== void 0 ? expanded : expandedRowIds[id],
|
|
104
104
|
highlightAnimation,
|
|
105
105
|
id,
|
|
106
|
-
onClick: () => {
|
|
106
|
+
onClick: (localId) => {
|
|
107
107
|
if (selectDisabled || disabled || loading) return;
|
|
108
108
|
if (selectable === "radio") handleChangeRadio();
|
|
109
109
|
if (selectable === "checkbox") handleChangeCheckbox();
|
|
110
|
+
onClick === null || onClick === void 0 || onClick(localId);
|
|
110
111
|
},
|
|
111
112
|
onMouseEnter: () => setHovered(true),
|
|
112
113
|
onMouseLeave: () => setHovered(false),
|
|
@@ -16,7 +16,7 @@ type OfferListProps = Omit<ComponentProps<typeof List>, 'selectable' | 'onSelect
|
|
|
16
16
|
};
|
|
17
17
|
export declare function OfferList({ expandable, type, columns, children, loading, autoCollapse, selected, onChangeSelect, className, style, 'data-testid': dataTestId, }: OfferListProps): import("react").JSX.Element;
|
|
18
18
|
export declare namespace OfferList {
|
|
19
|
-
var Row: ({ children, disabled, id, banner, expandablePadding, offerName, expandable: expandableContent, selectDisabled, highlightAnimation, expanded, className, 'data-dragging': dataDragging, 'data-testid': dataTestId, style, badge, }: {
|
|
19
|
+
var Row: ({ children, disabled, id, banner, expandablePadding, offerName, expandable: expandableContent, selectDisabled, highlightAnimation, expanded, className, 'data-dragging': dataDragging, 'data-testid': dataTestId, style, badge, onClick, }: {
|
|
20
20
|
children: import("react").ReactNode;
|
|
21
21
|
id: string;
|
|
22
22
|
expandable?: import("react").ReactNode;
|
|
@@ -81,6 +81,13 @@ import { init_styles_css_ts_vanilla as init_styles_css_ts_vanilla$71 } from "../
|
|
|
81
81
|
import { init_styles_css_ts_vanilla as init_styles_css_ts_vanilla$72 } from "../../components/ToggleGroup/styles.css.ts.vanilla.js";
|
|
82
82
|
import { init_styles_css_ts_vanilla as init_styles_css_ts_vanilla$73 } from "../../components/TreeMapChart/styles.css.ts.vanilla.js";
|
|
83
83
|
import { init_styles_css_ts_vanilla as init_styles_css_ts_vanilla$74 } from "../../components/VerificationCode/styles.css.ts.vanilla.js";
|
|
84
|
+
import { init_variables_css_ts_vanilla as init_variables_css_ts_vanilla$2 } from "../../components/Avatar/variables.css.ts.vanilla.js";
|
|
85
|
+
import { init_variables_css_ts_vanilla as init_variables_css_ts_vanilla$3 } from "../../components/List/variables.css.ts.vanilla.js";
|
|
86
|
+
import { init_variables_css_ts_vanilla as init_variables_css_ts_vanilla$4 } from "../../components/SelectableCard/variables.css.ts.vanilla.js";
|
|
87
|
+
import { init_variables_css_ts_vanilla as init_variables_css_ts_vanilla$5 } from "../../components/Text/variables.css.ts.vanilla.js";
|
|
88
|
+
import { init_variables_css_ts_vanilla as init_variables_css_ts_vanilla$6 } from "../../components/Popup/variables.css.ts.vanilla.js";
|
|
89
|
+
import { init_variables_css_ts_vanilla as init_variables_css_ts_vanilla$7 } from "../../components/ProgressBar/variables.css.ts.vanilla.js";
|
|
90
|
+
import { init_variables_css_ts_vanilla as init_variables_css_ts_vanilla$8 } from "../../components/Table/variables.css.ts.vanilla.js";
|
|
84
91
|
import { init_styles_css_ts_vanilla as init_styles_css_ts_vanilla$75 } from "./styles.css.ts.vanilla.js";
|
|
85
92
|
import { createRuntimeFn } from "@vanilla-extract/recipes/createRuntimeFn";
|
|
86
93
|
|
|
@@ -90,6 +97,7 @@ var init_styles_css = __esmMin(() => {
|
|
|
90
97
|
init_animationsVanillaExtract_css_ts_vanilla();
|
|
91
98
|
init_styles_css_ts_vanilla$29();
|
|
92
99
|
init_styles_css_ts_vanilla$18();
|
|
100
|
+
init_variables_css_ts_vanilla$2();
|
|
93
101
|
init_styles_css_ts_vanilla$30();
|
|
94
102
|
init_styles_css_ts_vanilla$12();
|
|
95
103
|
init_styles_css_ts_vanilla$32();
|
|
@@ -102,7 +110,9 @@ var init_styles_css = __esmMin(() => {
|
|
|
102
110
|
init_styles_css_ts_vanilla$28();
|
|
103
111
|
init_styles_css_ts_vanilla$37();
|
|
104
112
|
init_styles_css_ts_vanilla$23();
|
|
113
|
+
init_variables_css_ts_vanilla$3();
|
|
105
114
|
init_styles_css_ts_vanilla$24();
|
|
115
|
+
init_variables_css_ts_vanilla$4();
|
|
106
116
|
init_styles_css_ts_vanilla$25();
|
|
107
117
|
init_styles_css_ts_vanilla$26();
|
|
108
118
|
init_styles_css_ts_vanilla$38();
|
|
@@ -132,8 +142,11 @@ var init_styles_css = __esmMin(() => {
|
|
|
132
142
|
init_styles_css_ts_vanilla$54();
|
|
133
143
|
init_styles_css_ts_vanilla$1();
|
|
134
144
|
init_styles_css_ts_vanilla$2();
|
|
145
|
+
init_variables_css_ts_vanilla$5();
|
|
135
146
|
init_style_css_ts_vanilla();
|
|
147
|
+
init_variables_css_ts_vanilla$6();
|
|
136
148
|
init_styles_css_ts_vanilla$3();
|
|
149
|
+
init_variables_css_ts_vanilla$7();
|
|
137
150
|
init_styles_css_ts_vanilla$55();
|
|
138
151
|
init_styles_css_ts_vanilla$20();
|
|
139
152
|
init_styles_css_ts_vanilla$56();
|
|
@@ -157,6 +170,7 @@ var init_styles_css = __esmMin(() => {
|
|
|
157
170
|
init_styles_css_ts_vanilla$63();
|
|
158
171
|
init_styles_css_ts_vanilla$64();
|
|
159
172
|
init_styles_css_ts_vanilla$65();
|
|
173
|
+
init_variables_css_ts_vanilla$8();
|
|
160
174
|
init_styles_css_ts_vanilla$66();
|
|
161
175
|
init_styles_css_ts_vanilla$67();
|
|
162
176
|
init_styles_css_ts_vanilla$68();
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { __esmMin } from "../../_virtual/_rolldown/runtime.js";
|
|
2
|
-
import { init_themes_css_js_vanilla } from "../../themes/dist/vanilla/themes.css.js.vanilla.js";
|
|
3
2
|
import { init_styles_css_ts_vanilla } from "./styles.css.ts.vanilla.js";
|
|
4
3
|
|
|
5
4
|
//#region src/compositions/SteppedListCard/styles.css.ts
|
|
6
5
|
var steppedListCardStyle;
|
|
7
6
|
var init_styles_css = __esmMin(() => {
|
|
8
|
-
init_themes_css_js_vanilla();
|
|
9
7
|
init_styles_css_ts_vanilla();
|
|
10
8
|
steppedListCardStyle = {
|
|
11
9
|
steppedListCard: "uv_1q0npw30",
|
|
@@ -13,4 +13,6 @@ export { RichTextInput } from './RichTextInput';
|
|
|
13
13
|
export { OrderSummary } from './OrderSummary';
|
|
14
14
|
export { Plans } from './Plans';
|
|
15
15
|
export { SteppedListCard } from './SteppedListCard';
|
|
16
|
+
export { Filters, useFiltersContext, FiltersProvider, FiltersMainRow, FiltersDrawer } from './Filters';
|
|
17
|
+
export type { FiltersProps, FilterConfig, FilterConfigGroup, FilterConfigItemBase, FilterConfigItem, FilterConfigItemDatetimeRange, FilterConfigItemMultiSelect, FilterConfigItemNumber, FilterConfigItemSelect, FilterConfigItemSlider, FilterConfigItemText, FilterComponentProps, } from './Filters';
|
|
16
18
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/compositions/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAC7C,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAC7D,OAAO,EAAE,YAAY,EAAE,0BAA0B,EAAE,MAAM,gBAAgB,CAAA;AACzE,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,C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,EAAE,MAAM,SAAS,CAAA;AAC/B,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,WAAW,CAAA;AACtG,YAAY,EACV,YAAY,EACZ,YAAY,EACZ,iBAAiB,EACjB,oBAAoB,EACpB,gBAAgB,EAChB,6BAA6B,EAC7B,2BAA2B,EAC3B,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,EACtB,oBAAoB,EACpB,oBAAoB,GACrB,MAAM,WAAW,CAAA"}
|
|
@@ -16,6 +16,11 @@ import { RichTextInput, init_RichTextInput } from "./RichTextInput/index.js";
|
|
|
16
16
|
import { OrderSummary, init_OrderSummary } from "./OrderSummary/index.js";
|
|
17
17
|
import { Plans, init_Plans } from "./Plans/index.js";
|
|
18
18
|
import { SteppedListCard, init_SteppedListCard } from "./SteppedListCard/index.js";
|
|
19
|
+
import { FiltersProvider, init_FiltersProvider, useFiltersContext } from "./Filters/parts/FiltersProvider.js";
|
|
20
|
+
import { FiltersDrawer, init_FiltersDrawer } from "./Filters/parts/FiltersDrawer.js";
|
|
21
|
+
import { FiltersMainRow, init_FiltersMainRow } from "./Filters/parts/FiltersMainRow.js";
|
|
22
|
+
import { Filters, init_Filters } from "./Filters/Filters.js";
|
|
23
|
+
import { init_Filters as init_Filters$1 } from "./Filters/index.js";
|
|
19
24
|
|
|
20
25
|
//#region src/compositions/index.ts
|
|
21
26
|
var init_compositions = __esmMin(() => {
|
|
@@ -34,6 +39,7 @@ var init_compositions = __esmMin(() => {
|
|
|
34
39
|
init_OrderSummary();
|
|
35
40
|
init_Plans();
|
|
36
41
|
init_SteppedListCard();
|
|
42
|
+
init_Filters$1();
|
|
37
43
|
});
|
|
38
44
|
|
|
39
45
|
//#endregion
|