@redneckz/wildless-cms-uni-blocks 0.13.6 → 0.13.7
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/bin/migration-scripts/0.13.6.js +33 -0
- package/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +75 -45
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/HorizontalLayout/HorizontalLayout.d.ts +2 -1
- package/bundle/components/HorizontalLayout/HorizontalLayoutContent.d.ts +2 -0
- package/bundle/components/MortgageFiltration/MortgageFiltrationContent.d.ts +13 -9
- package/bundle/ui-kit/Badge/Badge.d.ts +6 -0
- package/bundle/ui-kit/BaseFiltration/HotFilterBase.d.ts +7 -0
- package/bundle/ui-kit/BaseFiltration/getBadgeCount.d.ts +3 -0
- package/bundle/ui-kit/BaseFiltration/hotFilterRecordCmp.d.ts +1 -0
- package/bundle/ui-kit/BaseFiltration/useHotFilters.d.ts +14 -0
- package/bundle/ui-kit/TabsControl/TabItem.d.ts +5 -2
- package/dist/components/Blocks.mobile.js +6 -0
- package/dist/components/Blocks.mobile.js.map +1 -1
- package/dist/components/Bonus/Bonus.js +1 -2
- package/dist/components/Bonus/Bonus.js.map +1 -1
- package/dist/components/CarouselEventCard/CarouselEventCard.js +2 -3
- package/dist/components/CarouselEventCard/CarouselEventCard.js.map +1 -1
- package/dist/components/ErrorBlock/ErrorBlock.js +2 -3
- package/dist/components/ErrorBlock/ErrorBlock.js.map +1 -1
- package/dist/components/Footer/TextInformation.js +2 -1
- package/dist/components/Footer/TextInformation.js.map +1 -1
- package/dist/components/HorizontalLayout/HorizontalLayout.d.ts +2 -1
- package/dist/components/HorizontalLayout/HorizontalLayout.js +8 -1
- package/dist/components/HorizontalLayout/HorizontalLayout.js.map +1 -1
- package/dist/components/HorizontalLayout/HorizontalLayoutContent.d.ts +2 -0
- package/dist/components/InvestmentInfo/InvestmentInfo.js +1 -1
- package/dist/components/InvestmentInfo/InvestmentInfo.js.map +1 -1
- package/dist/components/MortgageFiltration/MortgageFiltration.js +10 -15
- package/dist/components/MortgageFiltration/MortgageFiltration.js.map +1 -1
- package/dist/components/MortgageFiltration/MortgageFiltrationContent.d.ts +13 -9
- package/dist/ui-kit/Badge/Badge.d.ts +6 -0
- package/dist/ui-kit/Badge/Badge.js +18 -0
- package/dist/ui-kit/Badge/Badge.js.map +1 -0
- package/dist/ui-kit/BaseFiltration/BaseFiltrationInner.js +4 -5
- package/dist/ui-kit/BaseFiltration/BaseFiltrationInner.js.map +1 -1
- package/dist/ui-kit/BaseFiltration/HotFilterBase.d.ts +7 -0
- package/dist/ui-kit/BaseFiltration/HotFilterBase.js +2 -0
- package/dist/ui-kit/BaseFiltration/HotFilterBase.js.map +1 -0
- package/dist/ui-kit/BaseFiltration/getBadgeCount.d.ts +3 -0
- package/dist/ui-kit/BaseFiltration/getBadgeCount.js +6 -0
- package/dist/ui-kit/BaseFiltration/getBadgeCount.js.map +1 -0
- package/dist/ui-kit/BaseFiltration/hotFilterRecordCmp.d.ts +1 -0
- package/{mobile/dist/components/MortgageFiltration/HotFilterRecord.js → dist/ui-kit/BaseFiltration/hotFilterRecordCmp.js} +1 -1
- package/dist/ui-kit/BaseFiltration/hotFilterRecordCmp.js.map +1 -0
- package/dist/ui-kit/BaseFiltration/renderFiltrationForm.js +1 -1
- package/dist/ui-kit/BaseFiltration/renderFiltrationForm.js.map +1 -1
- package/dist/ui-kit/BaseFiltration/useHotFilters.d.ts +14 -0
- package/dist/ui-kit/BaseFiltration/useHotFilters.js +26 -0
- package/dist/ui-kit/BaseFiltration/useHotFilters.js.map +1 -0
- package/dist/ui-kit/BaseTile/BaseTile.js +1 -5
- package/dist/ui-kit/BaseTile/BaseTile.js.map +1 -1
- package/dist/ui-kit/TabsControl/TabItem.d.ts +5 -2
- package/dist/ui-kit/TabsControl/TabItem.js.map +1 -1
- package/dist/ui-kit/TabsControl/TabItemInner.js +2 -2
- package/dist/ui-kit/TabsControl/TabItemInner.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/Blocks.mobile.js +6 -0
- package/lib/components/Blocks.mobile.js.map +1 -1
- package/lib/components/Bonus/Bonus.js +1 -2
- package/lib/components/Bonus/Bonus.js.map +1 -1
- package/lib/components/CarouselEventCard/CarouselEventCard.js +2 -3
- package/lib/components/CarouselEventCard/CarouselEventCard.js.map +1 -1
- package/lib/components/ErrorBlock/ErrorBlock.js +2 -3
- package/lib/components/ErrorBlock/ErrorBlock.js.map +1 -1
- package/lib/components/Footer/TextInformation.js +2 -1
- package/lib/components/Footer/TextInformation.js.map +1 -1
- package/lib/components/HorizontalLayout/HorizontalLayout.d.ts +2 -1
- package/lib/components/HorizontalLayout/HorizontalLayout.fixture.d.ts +1 -0
- package/lib/components/HorizontalLayout/HorizontalLayout.js +8 -1
- package/lib/components/HorizontalLayout/HorizontalLayout.js.map +1 -1
- package/lib/components/HorizontalLayout/HorizontalLayoutContent.d.ts +2 -0
- package/lib/components/InvestmentInfo/InvestmentInfo.js +1 -1
- package/lib/components/InvestmentInfo/InvestmentInfo.js.map +1 -1
- package/lib/components/MortgageFiltration/MortgageFiltration.js +11 -16
- package/lib/components/MortgageFiltration/MortgageFiltration.js.map +1 -1
- package/lib/components/MortgageFiltration/MortgageFiltrationContent.d.ts +13 -9
- package/lib/ui-kit/Badge/Badge.d.ts +6 -0
- package/lib/ui-kit/Badge/Badge.fixture.d.ts +6 -0
- package/lib/ui-kit/Badge/Badge.js +16 -0
- package/lib/ui-kit/Badge/Badge.js.map +1 -0
- package/lib/ui-kit/BaseFiltration/BaseFiltrationInner.js +4 -5
- package/lib/ui-kit/BaseFiltration/BaseFiltrationInner.js.map +1 -1
- package/lib/ui-kit/BaseFiltration/HotFilterBase.d.ts +7 -0
- package/lib/ui-kit/BaseFiltration/HotFilterBase.js +2 -0
- package/lib/ui-kit/BaseFiltration/HotFilterBase.js.map +1 -0
- package/lib/ui-kit/BaseFiltration/getBadgeCount.d.ts +3 -0
- package/lib/ui-kit/BaseFiltration/getBadgeCount.js +3 -0
- package/lib/ui-kit/BaseFiltration/getBadgeCount.js.map +1 -0
- package/lib/ui-kit/BaseFiltration/hotFilterRecordCmp.d.ts +1 -0
- package/lib/{components/MortgageFiltration/HotFilterRecord.js → ui-kit/BaseFiltration/hotFilterRecordCmp.js} +1 -1
- package/lib/ui-kit/BaseFiltration/hotFilterRecordCmp.js.map +1 -0
- package/lib/ui-kit/BaseFiltration/renderFiltrationForm.js +1 -1
- package/lib/ui-kit/BaseFiltration/renderFiltrationForm.js.map +1 -1
- package/lib/ui-kit/BaseFiltration/useHotFilters.d.ts +14 -0
- package/lib/ui-kit/BaseFiltration/useHotFilters.js +23 -0
- package/lib/ui-kit/BaseFiltration/useHotFilters.js.map +1 -0
- package/lib/ui-kit/BaseTile/BaseTile.js +1 -5
- package/lib/ui-kit/BaseTile/BaseTile.js.map +1 -1
- package/lib/ui-kit/TabsControl/TabItem.d.ts +5 -2
- package/lib/ui-kit/TabsControl/TabItem.js.map +1 -1
- package/lib/ui-kit/TabsControl/TabItemInner.js +3 -3
- package/lib/ui-kit/TabsControl/TabItemInner.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +60 -25
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/HorizontalLayout/HorizontalLayoutContent.d.ts +2 -0
- package/mobile/bundle/components/MortgageFiltration/MortgageFiltrationContent.d.ts +13 -9
- package/mobile/bundle/ui-kit/Badge/Badge.d.ts +6 -0
- package/mobile/bundle/ui-kit/BaseFiltration/HotFilterBase.d.ts +7 -0
- package/mobile/bundle/ui-kit/BaseFiltration/getBadgeCount.d.ts +3 -0
- package/mobile/bundle/ui-kit/BaseFiltration/hotFilterRecordCmp.d.ts +1 -0
- package/mobile/bundle/ui-kit/BaseFiltration/useHotFilters.d.ts +14 -0
- package/mobile/bundle/ui-kit/TabsControl/TabItem.d.ts +5 -2
- package/mobile/dist/components/Blocks.js +6 -0
- package/mobile/dist/components/Blocks.js.map +1 -1
- package/mobile/dist/components/Bonus/Bonus.js +1 -2
- package/mobile/dist/components/Bonus/Bonus.js.map +1 -1
- package/mobile/dist/components/CarouselEventCard/CarouselEventCard.js +2 -3
- package/mobile/dist/components/CarouselEventCard/CarouselEventCard.js.map +1 -1
- package/mobile/dist/components/ErrorBlock/ErrorBlock.js +2 -3
- package/mobile/dist/components/ErrorBlock/ErrorBlock.js.map +1 -1
- package/mobile/dist/components/Footer/TextInformation.js +2 -1
- package/mobile/dist/components/Footer/TextInformation.js.map +1 -1
- package/mobile/dist/components/HorizontalLayout/HorizontalLayoutContent.d.ts +2 -0
- package/mobile/dist/components/InvestmentInfo/InvestmentInfo.js +1 -1
- package/mobile/dist/components/InvestmentInfo/InvestmentInfo.js.map +1 -1
- package/mobile/dist/components/MortgageFiltration/MortgageFiltration.js +10 -15
- package/mobile/dist/components/MortgageFiltration/MortgageFiltration.js.map +1 -1
- package/mobile/dist/components/MortgageFiltration/MortgageFiltrationContent.d.ts +13 -9
- package/mobile/dist/ui-kit/Badge/Badge.d.ts +6 -0
- package/mobile/dist/ui-kit/Badge/Badge.js +18 -0
- package/mobile/dist/ui-kit/Badge/Badge.js.map +1 -0
- package/mobile/dist/ui-kit/BaseFiltration/BaseFiltrationInner.js +4 -5
- package/mobile/dist/ui-kit/BaseFiltration/BaseFiltrationInner.js.map +1 -1
- package/mobile/dist/ui-kit/BaseFiltration/HotFilterBase.d.ts +7 -0
- package/mobile/dist/ui-kit/BaseFiltration/HotFilterBase.js +2 -0
- package/mobile/dist/ui-kit/BaseFiltration/HotFilterBase.js.map +1 -0
- package/mobile/dist/ui-kit/BaseFiltration/getBadgeCount.d.ts +3 -0
- package/mobile/dist/ui-kit/BaseFiltration/getBadgeCount.js +6 -0
- package/mobile/dist/ui-kit/BaseFiltration/getBadgeCount.js.map +1 -0
- package/mobile/dist/ui-kit/BaseFiltration/hotFilterRecordCmp.d.ts +1 -0
- package/{dist/components/MortgageFiltration/HotFilterRecord.js → mobile/dist/ui-kit/BaseFiltration/hotFilterRecordCmp.js} +1 -1
- package/mobile/dist/ui-kit/BaseFiltration/hotFilterRecordCmp.js.map +1 -0
- package/mobile/dist/ui-kit/BaseFiltration/renderFiltrationForm.js +1 -1
- package/mobile/dist/ui-kit/BaseFiltration/renderFiltrationForm.js.map +1 -1
- package/mobile/dist/ui-kit/BaseFiltration/useHotFilters.d.ts +14 -0
- package/mobile/dist/ui-kit/BaseFiltration/useHotFilters.js +26 -0
- package/mobile/dist/ui-kit/BaseFiltration/useHotFilters.js.map +1 -0
- package/mobile/dist/ui-kit/BaseTile/BaseTile.js +1 -5
- package/mobile/dist/ui-kit/BaseTile/BaseTile.js.map +1 -1
- package/mobile/dist/ui-kit/TabsControl/TabItem.d.ts +5 -2
- package/mobile/dist/ui-kit/TabsControl/TabItem.js.map +1 -1
- package/mobile/dist/ui-kit/TabsControl/TabItemInner.js +2 -2
- package/mobile/dist/ui-kit/TabsControl/TabItemInner.js.map +1 -1
- package/mobile/lib/common.css +1 -1
- package/mobile/lib/components/Blocks.js +6 -0
- package/mobile/lib/components/Blocks.js.map +1 -1
- package/mobile/lib/components/Bonus/Bonus.js +1 -2
- package/mobile/lib/components/Bonus/Bonus.js.map +1 -1
- package/mobile/lib/components/CarouselEventCard/CarouselEventCard.js +2 -3
- package/mobile/lib/components/CarouselEventCard/CarouselEventCard.js.map +1 -1
- package/mobile/lib/components/ErrorBlock/ErrorBlock.js +2 -3
- package/mobile/lib/components/ErrorBlock/ErrorBlock.js.map +1 -1
- package/mobile/lib/components/Footer/TextInformation.js +2 -1
- package/mobile/lib/components/Footer/TextInformation.js.map +1 -1
- package/mobile/lib/components/HorizontalLayout/HorizontalLayoutContent.d.ts +2 -0
- package/mobile/lib/components/InvestmentInfo/InvestmentInfo.js +1 -1
- package/mobile/lib/components/InvestmentInfo/InvestmentInfo.js.map +1 -1
- package/mobile/lib/components/MortgageFiltration/MortgageFiltration.js +11 -16
- package/mobile/lib/components/MortgageFiltration/MortgageFiltration.js.map +1 -1
- package/mobile/lib/components/MortgageFiltration/MortgageFiltrationContent.d.ts +13 -9
- package/mobile/lib/ui-kit/Badge/Badge.d.ts +6 -0
- package/mobile/lib/ui-kit/Badge/Badge.js +16 -0
- package/mobile/lib/ui-kit/Badge/Badge.js.map +1 -0
- package/mobile/lib/ui-kit/BaseFiltration/BaseFiltrationInner.js +4 -5
- package/mobile/lib/ui-kit/BaseFiltration/BaseFiltrationInner.js.map +1 -1
- package/mobile/lib/ui-kit/BaseFiltration/HotFilterBase.d.ts +7 -0
- package/mobile/lib/ui-kit/BaseFiltration/HotFilterBase.js +2 -0
- package/mobile/lib/ui-kit/BaseFiltration/HotFilterBase.js.map +1 -0
- package/mobile/lib/ui-kit/BaseFiltration/getBadgeCount.d.ts +3 -0
- package/mobile/lib/ui-kit/BaseFiltration/getBadgeCount.js +3 -0
- package/mobile/lib/ui-kit/BaseFiltration/getBadgeCount.js.map +1 -0
- package/mobile/lib/ui-kit/BaseFiltration/hotFilterRecordCmp.d.ts +1 -0
- package/mobile/lib/{components/MortgageFiltration/HotFilterRecord.js → ui-kit/BaseFiltration/hotFilterRecordCmp.js} +1 -1
- package/mobile/lib/ui-kit/BaseFiltration/hotFilterRecordCmp.js.map +1 -0
- package/mobile/lib/ui-kit/BaseFiltration/renderFiltrationForm.js +1 -1
- package/mobile/lib/ui-kit/BaseFiltration/renderFiltrationForm.js.map +1 -1
- package/mobile/lib/ui-kit/BaseFiltration/useHotFilters.d.ts +14 -0
- package/mobile/lib/ui-kit/BaseFiltration/useHotFilters.js +23 -0
- package/mobile/lib/ui-kit/BaseFiltration/useHotFilters.js.map +1 -0
- package/mobile/lib/ui-kit/BaseTile/BaseTile.js +1 -5
- package/mobile/lib/ui-kit/BaseTile/BaseTile.js.map +1 -1
- package/mobile/lib/ui-kit/TabsControl/TabItem.d.ts +5 -2
- package/mobile/lib/ui-kit/TabsControl/TabItem.js.map +1 -1
- package/mobile/lib/ui-kit/TabsControl/TabItemInner.js +3 -3
- package/mobile/lib/ui-kit/TabsControl/TabItemInner.js.map +1 -1
- package/mobile/src/components/Blocks.ts +6 -0
- package/mobile/src/components/Bonus/Bonus.tsx +7 -13
- package/mobile/src/components/CarouselEventCard/CarouselEventCard.tsx +10 -12
- package/mobile/src/components/ErrorBlock/ErrorBlock.tsx +2 -10
- package/mobile/src/components/Footer/TextInformation.tsx +3 -2
- package/mobile/src/components/HorizontalLayout/HorizontalLayoutContent.ts +2 -0
- package/mobile/src/components/InvestmentInfo/InvestmentInfo.tsx +1 -1
- package/mobile/src/components/MortgageFiltration/MortgageFiltration.tsx +17 -37
- package/mobile/src/components/MortgageFiltration/MortgageFiltrationContent.ts +13 -9
- package/mobile/src/ui-kit/Badge/Badge.tsx +34 -0
- package/mobile/src/ui-kit/BaseFiltration/BaseFiltrationInner.tsx +5 -20
- package/mobile/src/ui-kit/BaseFiltration/HotFilterBase.ts +7 -0
- package/mobile/src/ui-kit/BaseFiltration/getBadgeCount.ts +6 -0
- package/mobile/src/ui-kit/BaseFiltration/hotFilterRecordCmp.ts +3 -0
- package/mobile/src/ui-kit/BaseFiltration/renderFiltrationForm.tsx +1 -1
- package/mobile/src/ui-kit/BaseFiltration/useHotFilters.tsx +65 -0
- package/mobile/src/ui-kit/BaseTile/BaseTile.tsx +3 -12
- package/mobile/src/ui-kit/TabsControl/TabItem.tsx +5 -3
- package/mobile/src/ui-kit/TabsControl/TabItemInner.tsx +2 -1
- package/package.json +1 -1
- package/src/components/Blocks.mobile.ts +6 -0
- package/src/components/Bonus/Bonus.tsx +7 -13
- package/src/components/CarouselEventCard/CarouselEventCard.tsx +10 -12
- package/src/components/ErrorBlock/ErrorBlock.tsx +2 -10
- package/src/components/Footer/TextInformation.tsx +3 -2
- package/src/components/HorizontalLayout/HorizontalLayout.fixture.tsx +21 -0
- package/src/components/HorizontalLayout/HorizontalLayout.tsx +10 -2
- package/src/components/HorizontalLayout/HorizontalLayoutContent.ts +2 -0
- package/src/components/InvestmentInfo/InvestmentInfo.tsx +1 -1
- package/src/components/MortgageFiltration/MortgageFiltration.fixture.tsx +5 -2
- package/src/components/MortgageFiltration/MortgageFiltration.tsx +17 -37
- package/src/components/MortgageFiltration/MortgageFiltrationContent.ts +13 -9
- package/src/ui-kit/Badge/Badge.fixture.tsx +24 -0
- package/src/ui-kit/Badge/Badge.tsx +34 -0
- package/src/ui-kit/BaseFiltration/BaseFiltrationInner.tsx +5 -20
- package/src/ui-kit/BaseFiltration/HotFilterBase.ts +7 -0
- package/src/ui-kit/BaseFiltration/getBadgeCount.ts +6 -0
- package/src/ui-kit/BaseFiltration/hotFilterRecordCmp.ts +3 -0
- package/src/ui-kit/BaseFiltration/renderFiltrationForm.tsx +1 -1
- package/src/ui-kit/BaseFiltration/useHotFilters.tsx +65 -0
- package/src/ui-kit/BaseTile/BaseTile.tsx +3 -12
- package/src/ui-kit/TabsControl/TabItem.tsx +5 -3
- package/src/ui-kit/TabsControl/TabItemInner.tsx +2 -1
- package/bundle/components/MortgageFiltration/HotFilterRecord.d.ts +0 -11
- package/dist/components/MortgageFiltration/HotFilterRecord.d.ts +0 -11
- package/dist/components/MortgageFiltration/HotFilterRecord.js.map +0 -1
- package/lib/components/MortgageFiltration/HotFilterRecord.d.ts +0 -11
- package/lib/components/MortgageFiltration/HotFilterRecord.js.map +0 -1
- package/mobile/bundle/components/MortgageFiltration/HotFilterRecord.d.ts +0 -11
- package/mobile/dist/components/MortgageFiltration/HotFilterRecord.d.ts +0 -11
- package/mobile/dist/components/MortgageFiltration/HotFilterRecord.js.map +0 -1
- package/mobile/lib/components/MortgageFiltration/HotFilterRecord.d.ts +0 -11
- package/mobile/lib/components/MortgageFiltration/HotFilterRecord.js.map +0 -1
- package/mobile/src/components/MortgageFiltration/HotFilterRecord.ts +0 -14
- package/src/components/MortgageFiltration/HotFilterRecord.ts +0 -14
|
@@ -1,60 +1,45 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
-
import { useCallback
|
|
2
|
+
import { useCallback } from '@redneckz/uni-jsx/lib/hooks';
|
|
3
3
|
import { useForm } from '../../hooks/useForm';
|
|
4
4
|
import type { JSXBlock, UniBlockProps } from '../../model/JSXBlock';
|
|
5
5
|
import { BaseFiltrationInner } from '../../ui-kit/BaseFiltration/BaseFiltrationInner';
|
|
6
6
|
import { renderFiltrationForm } from '../../ui-kit/BaseFiltration/renderFiltrationForm';
|
|
7
|
+
import { useHotFilters } from '../../ui-kit/BaseFiltration/useHotFilters';
|
|
7
8
|
import { BlockWrapper } from '../../ui-kit/BlockWrapper';
|
|
8
|
-
import type { TabItemBase } from '../../ui-kit/TabsControl/TabItem';
|
|
9
9
|
import { TabsControl } from '../../ui-kit/TabsControl/TabsControl';
|
|
10
10
|
import { style } from '../../utils/style';
|
|
11
|
-
import { hotFilterRecordCmp } from './HotFilterRecord';
|
|
12
11
|
import type {
|
|
13
12
|
MortgageFiltrationContent,
|
|
14
13
|
MortgageFiltrationSchema,
|
|
15
14
|
} from './MortgageFiltrationContent';
|
|
16
15
|
|
|
17
|
-
|
|
16
|
+
type MortgageFiltrationState = Partial<Record<keyof MortgageFiltrationSchema, string[]>>;
|
|
18
17
|
|
|
19
|
-
const initialFiltrationState:
|
|
18
|
+
const initialFiltrationState: MortgageFiltrationState = {
|
|
20
19
|
categories: [],
|
|
21
20
|
extraOptions: [],
|
|
22
21
|
propertyType: [],
|
|
23
22
|
stage: [],
|
|
24
23
|
};
|
|
25
24
|
|
|
25
|
+
interface MortgageFiltrationProps extends MortgageFiltrationContent, UniBlockProps {}
|
|
26
|
+
|
|
26
27
|
export const MortgageFiltration: JSXBlock<MortgageFiltrationProps> = JSX<MortgageFiltrationProps>(
|
|
27
|
-
({ className, hotFilters
|
|
28
|
+
({ className, hotFilters, filtrationSchema = {}, resetButton, ...rest }) => {
|
|
28
29
|
const [filtrationState, { field, reset, update: replaceFiltrationState }] =
|
|
29
30
|
useForm(initialFiltrationState);
|
|
30
31
|
|
|
31
|
-
const
|
|
32
|
-
() =>
|
|
33
|
-
|
|
34
|
-
text,
|
|
35
|
-
})),
|
|
36
|
-
[hotFilters],
|
|
32
|
+
const handleFiltrationStateChange = useCallback(
|
|
33
|
+
(_: MortgageFiltrationState = initialFiltrationState) => replaceFiltrationState(_),
|
|
34
|
+
[],
|
|
37
35
|
);
|
|
38
36
|
|
|
39
|
-
const
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
hotFilters[tabsControlItems.indexOf(_)].filter || initialFiltrationState,
|
|
46
|
-
);
|
|
47
|
-
},
|
|
48
|
-
[hotFilters, tabsControlItems],
|
|
49
|
-
);
|
|
50
|
-
|
|
51
|
-
useEffect(() => {
|
|
52
|
-
const suggestedHotFilterIndex = hotFilters.findIndex((_) =>
|
|
53
|
-
hotFilterRecordCmp(_.filter, filtrationState),
|
|
54
|
-
);
|
|
55
|
-
|
|
56
|
-
setHotFilterIndex(suggestedHotFilterIndex !== -1 ? suggestedHotFilterIndex : 0);
|
|
57
|
-
}, [hotFilters, filtrationState]);
|
|
37
|
+
const tabsControlProps = useHotFilters({
|
|
38
|
+
hotFilters,
|
|
39
|
+
filtrationState,
|
|
40
|
+
blocks: rest.block?.blocks,
|
|
41
|
+
onFiltrationStateChange: handleFiltrationStateChange,
|
|
42
|
+
});
|
|
58
43
|
|
|
59
44
|
return (
|
|
60
45
|
<BlockWrapper
|
|
@@ -63,12 +48,7 @@ export const MortgageFiltration: JSXBlock<MortgageFiltrationProps> = JSX<Mortgag
|
|
|
63
48
|
version="transparent"
|
|
64
49
|
{...rest}
|
|
65
50
|
>
|
|
66
|
-
<TabsControl
|
|
67
|
-
className="mb-2xs"
|
|
68
|
-
items={tabsControlItems}
|
|
69
|
-
value={tabsControlItems[hotFilterIndex]}
|
|
70
|
-
onChange={handleHotFilterSelect}
|
|
71
|
-
/>
|
|
51
|
+
<TabsControl {...tabsControlProps} />
|
|
72
52
|
{renderFiltrationForm({ field, reset, filtrationSchema, resetButton })}
|
|
73
53
|
<BaseFiltrationInner filtrationState={filtrationState} {...rest} />
|
|
74
54
|
</BlockWrapper>
|
|
@@ -2,7 +2,7 @@ import type {
|
|
|
2
2
|
BaseFiltrationInnerContent,
|
|
3
3
|
StringArray,
|
|
4
4
|
} from '../../ui-kit/BaseFiltration/BaseFiltrationContent';
|
|
5
|
-
import type {
|
|
5
|
+
import type { HotFilterBase } from '../../ui-kit/BaseFiltration/HotFilterBase';
|
|
6
6
|
|
|
7
7
|
export type MortgageFiltrationSchema = {
|
|
8
8
|
/** @title Тип недвижимости */
|
|
@@ -15,14 +15,18 @@ export type MortgageFiltrationSchema = {
|
|
|
15
15
|
extraOptions?: StringArray;
|
|
16
16
|
};
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
* @title Кнопка фильтрации
|
|
20
|
-
*/
|
|
21
|
-
export interface HotFilterButton {
|
|
22
|
-
/** @title Текст */
|
|
23
|
-
text?: string;
|
|
18
|
+
export interface MortgageFiltrationHotFilter extends HotFilterBase {
|
|
24
19
|
/** @title Применяемые фильтры */
|
|
25
|
-
filter?:
|
|
20
|
+
filter?: {
|
|
21
|
+
/** @title Тип недвижимости */
|
|
22
|
+
propertyType?: string[];
|
|
23
|
+
/** @title Этап строительства */
|
|
24
|
+
stage?: string[];
|
|
25
|
+
/** @title Категории */
|
|
26
|
+
categories?: string[];
|
|
27
|
+
/** @title Дополнительно */
|
|
28
|
+
extraOptions?: string[];
|
|
29
|
+
};
|
|
26
30
|
}
|
|
27
31
|
|
|
28
32
|
/**
|
|
@@ -32,5 +36,5 @@ export interface MortgageFiltrationContent extends BaseFiltrationInnerContent {
|
|
|
32
36
|
/** @title Параметры фильтрации */
|
|
33
37
|
filtrationSchema?: MortgageFiltrationSchema;
|
|
34
38
|
/** @title Горячие фильтры */
|
|
35
|
-
hotFilters?:
|
|
39
|
+
hotFilters?: MortgageFiltrationHotFilter[];
|
|
36
40
|
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import '../../setup-fixture';
|
|
2
|
+
|
|
3
|
+
import { Badge } from './Badge';
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
default: (
|
|
7
|
+
<div className="container grid-cols-12">
|
|
8
|
+
<section className="col-span-12 bg-white p-6xl">
|
|
9
|
+
<button className="p-xs border-2 border-green rounded-md flex justify-center w-52 mb-3xs">
|
|
10
|
+
<div className="mr-2xs">
|
|
11
|
+
<span>Какой-то текст</span>
|
|
12
|
+
</div>
|
|
13
|
+
<Badge count={3} />
|
|
14
|
+
</button>
|
|
15
|
+
<button className="p-xs border-2 border-green bg-green rounded-md flex justify-center w-52 text-white">
|
|
16
|
+
<div className="mr-2xs">
|
|
17
|
+
<span>Какой-то текст</span>
|
|
18
|
+
</div>
|
|
19
|
+
<Badge count={3} version="primary" />
|
|
20
|
+
</button>
|
|
21
|
+
</section>
|
|
22
|
+
</div>
|
|
23
|
+
),
|
|
24
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
+
import { style } from '../../utils/style';
|
|
3
|
+
import { Text } from '../Text/Text';
|
|
4
|
+
import type { TextColor } from '../Text/TextProps';
|
|
5
|
+
|
|
6
|
+
interface BadgeProps {
|
|
7
|
+
count?: number;
|
|
8
|
+
version?: 'primary' | 'secondary';
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const badgeBgStyleMap: Record<string, string> = {
|
|
12
|
+
primary: 'bg-white/30',
|
|
13
|
+
secondary: 'bg-main-divider',
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
const badgeTextColorStyleMap: Record<string, TextColor> = {
|
|
17
|
+
primary: 'text-white',
|
|
18
|
+
secondary: 'text-secondary-text',
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export const Badge = JSX<BadgeProps>(({ count, version = 'secondary' }) => {
|
|
22
|
+
return (
|
|
23
|
+
<div
|
|
24
|
+
className={style(
|
|
25
|
+
'w-6 h-6 rounded-full flex items-center justify-center',
|
|
26
|
+
badgeBgStyleMap[version],
|
|
27
|
+
)}
|
|
28
|
+
>
|
|
29
|
+
<Text size="text-xs" color={badgeTextColorStyleMap[version]}>
|
|
30
|
+
{count}
|
|
31
|
+
</Text>
|
|
32
|
+
</div>
|
|
33
|
+
);
|
|
34
|
+
});
|
|
@@ -8,8 +8,7 @@ import { checkShouldRenderBlock } from '../BaseFiltration/checkShouldRenderBlock
|
|
|
8
8
|
import { DefaultFoldButton } from '../Foldable/DefaultFoldButton';
|
|
9
9
|
import { Foldable } from '../Foldable/Foldable';
|
|
10
10
|
import { FoldableSection } from '../Foldable/FoldableSection';
|
|
11
|
-
import {
|
|
12
|
-
import { Text } from '../Text/Text';
|
|
11
|
+
import { Headline } from '../../components/Headline/Headline';
|
|
13
12
|
|
|
14
13
|
const ICONS: IconName[] = ['ArrowDownIcon', 'ArrowUpIcon'];
|
|
15
14
|
|
|
@@ -34,17 +33,14 @@ export const BaseFiltrationInner = JSX<BaseFiltrationInnerProps>(
|
|
|
34
33
|
<div className={style(blocksToRender.length ? 'hidden' : 'block')}>
|
|
35
34
|
{notFound ? renderNotFound(notFound) : null}
|
|
36
35
|
</div>
|
|
37
|
-
<div className={style(blocksToRender.length ? '' : 'hidden')}>
|
|
38
|
-
<div className={style(
|
|
36
|
+
<div className={style('space-y-2xs', blocksToRender.length ? '' : 'hidden')}>
|
|
37
|
+
<div className={style(resultsGridStyle)}>
|
|
39
38
|
{renderBlocksList(visibleBlocks, { ...rest.options, parent: block })}
|
|
40
39
|
</div>
|
|
41
40
|
<Foldable
|
|
42
41
|
renderFoldableSection={({ isUnfolded }) => {
|
|
43
42
|
return (
|
|
44
|
-
<FoldableSection
|
|
45
|
-
className={style(resultsGridStyle, isUnfolded ? 'mb-2xs' : '')}
|
|
46
|
-
isUnfolded={isUnfolded}
|
|
47
|
-
>
|
|
43
|
+
<FoldableSection className={style(resultsGridStyle)} isUnfolded={isUnfolded}>
|
|
48
44
|
{renderBlocksList(hiddenBlocks, { ...rest.options, parent: block })}
|
|
49
45
|
</FoldableSection>
|
|
50
46
|
);
|
|
@@ -69,18 +65,7 @@ export const BaseFiltrationInner = JSX<BaseFiltrationInnerProps>(
|
|
|
69
65
|
function renderNotFound({ title, description }: NotFound) {
|
|
70
66
|
return (
|
|
71
67
|
<div className="bg-white py-20">
|
|
72
|
-
{title
|
|
73
|
-
<div className="mb-xs">
|
|
74
|
-
<Paragraph align="text-center">
|
|
75
|
-
<Text size="text-h4">{title}</Text>
|
|
76
|
-
</Paragraph>
|
|
77
|
-
</div>
|
|
78
|
-
) : null}
|
|
79
|
-
{description ? (
|
|
80
|
-
<Paragraph size="text-xl" font="font-light" align="text-center">
|
|
81
|
-
{description}
|
|
82
|
-
</Paragraph>
|
|
83
|
-
) : null}
|
|
68
|
+
<Headline title={title} description={description} headlineVersion="S" isEmbedded={true} />
|
|
84
69
|
</div>
|
|
85
70
|
);
|
|
86
71
|
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { BlockDef } from '../../model/ContentPageDef';
|
|
2
|
+
import { checkShouldRenderBlock } from '../../ui-kit/BaseFiltration/checkShouldRenderBlock';
|
|
3
|
+
import type { BaseFilter } from './useHotFilters';
|
|
4
|
+
|
|
5
|
+
export const getBadgeCount = (blocks: BlockDef[] = [], filter: BaseFilter = {}) =>
|
|
6
|
+
blocks.filter(({ content = {} }) => checkShouldRenderBlock(filter, content)).length;
|
|
@@ -29,7 +29,7 @@ export const renderFiltrationForm = ({
|
|
|
29
29
|
resetButton,
|
|
30
30
|
children,
|
|
31
31
|
}: RenderFiltrationFormProps) => (
|
|
32
|
-
<form className="flex justify-between bg-white p-4xl
|
|
32
|
+
<form className="flex justify-between bg-white p-4xl">
|
|
33
33
|
<div className="flex gap-5xl">
|
|
34
34
|
{children}
|
|
35
35
|
{Object.entries(filtrationSchema).map(renderFormItem(field))}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { useCallback, useMemo } from '@redneckz/uni-jsx/lib/hooks';
|
|
2
|
+
import type { BlockDef } from '../../model/ContentPageDef';
|
|
3
|
+
import { Badge } from '../Badge/Badge';
|
|
4
|
+
import type { TabItemBase } from '../TabsControl/TabItem';
|
|
5
|
+
import type { TabsControlProps } from '../TabsControl/TabsControlProps';
|
|
6
|
+
import { getBadgeCount } from './getBadgeCount';
|
|
7
|
+
import { HotFilterBase } from './HotFilterBase';
|
|
8
|
+
import { hotFilterRecordCmp } from './hotFilterRecordCmp';
|
|
9
|
+
|
|
10
|
+
const EMPTY_ARR = [];
|
|
11
|
+
const EMPTY_OBJ = {};
|
|
12
|
+
|
|
13
|
+
export type BaseFilter = HotFilterBase & {
|
|
14
|
+
filter?: Record<string, string[]>;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
interface UseHotFiltersParams {
|
|
18
|
+
hotFilters?: BaseFilter[];
|
|
19
|
+
filtrationState?: Record<string, string[]>;
|
|
20
|
+
blocks?: BlockDef[];
|
|
21
|
+
onFiltrationStateChange: (_?: Record<string, string[]>) => void;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export const useHotFilters = ({
|
|
25
|
+
hotFilters = EMPTY_ARR,
|
|
26
|
+
filtrationState = EMPTY_OBJ,
|
|
27
|
+
blocks = EMPTY_ARR,
|
|
28
|
+
onFiltrationStateChange,
|
|
29
|
+
}: UseHotFiltersParams): TabsControlProps => {
|
|
30
|
+
const activeItemIndex = useMemo(
|
|
31
|
+
() =>
|
|
32
|
+
Math.max(
|
|
33
|
+
0,
|
|
34
|
+
hotFilters.findIndex((_) => hotFilterRecordCmp(_.filter, filtrationState)),
|
|
35
|
+
),
|
|
36
|
+
[hotFilters, filtrationState],
|
|
37
|
+
);
|
|
38
|
+
|
|
39
|
+
const items: TabItemBase[] = useMemo(
|
|
40
|
+
() =>
|
|
41
|
+
hotFilters.map((_) => ({
|
|
42
|
+
text: _.text,
|
|
43
|
+
appendRight: (
|
|
44
|
+
<Badge
|
|
45
|
+
version={_ === hotFilters[activeItemIndex] ? 'primary' : 'secondary'}
|
|
46
|
+
count={getBadgeCount(blocks, _.filter)}
|
|
47
|
+
/>
|
|
48
|
+
),
|
|
49
|
+
})),
|
|
50
|
+
[hotFilters, blocks, activeItemIndex],
|
|
51
|
+
);
|
|
52
|
+
|
|
53
|
+
const handleChange = useCallback(
|
|
54
|
+
(_: TabItemBase) => {
|
|
55
|
+
onFiltrationStateChange(hotFilters[items.indexOf(_)].filter);
|
|
56
|
+
},
|
|
57
|
+
[hotFilters, items],
|
|
58
|
+
);
|
|
59
|
+
|
|
60
|
+
return {
|
|
61
|
+
value: items[activeItemIndex],
|
|
62
|
+
items: items,
|
|
63
|
+
onChange: handleChange,
|
|
64
|
+
};
|
|
65
|
+
};
|
|
@@ -66,20 +66,11 @@ export const BaseTile = JSX<BaseTileProps>(
|
|
|
66
66
|
const renderImageContainer = (
|
|
67
67
|
image: VNode | undefined,
|
|
68
68
|
{ className, imageAlign }: { className?: string; imageAlign?: Align },
|
|
69
|
-
) =>
|
|
70
|
-
|
|
71
|
-
const fullWidth = image?.props?.image?.size?.width > 400;
|
|
72
|
-
|
|
73
|
-
return image ? (
|
|
69
|
+
) =>
|
|
70
|
+
image ? (
|
|
74
71
|
<div
|
|
75
|
-
className={style(
|
|
76
|
-
'flex-shrink-0',
|
|
77
|
-
fullWidth ? 'w-full @xl:w-auto' : '',
|
|
78
|
-
imageAlign && imageAlignmentMap[imageAlign],
|
|
79
|
-
className,
|
|
80
|
-
)}
|
|
72
|
+
className={style('md:flex-shrink-0', imageAlign && imageAlignmentMap[imageAlign], className)}
|
|
81
73
|
>
|
|
82
74
|
{image}
|
|
83
75
|
</div>
|
|
84
76
|
) : null;
|
|
85
|
-
};
|
|
@@ -2,18 +2,20 @@ import { JSX } from '@redneckz/uni-jsx';
|
|
|
2
2
|
import { useCallback } from '@redneckz/uni-jsx/lib/hooks';
|
|
3
3
|
import { useLink } from '../../hooks/useLink';
|
|
4
4
|
import type { LinkProps } from '../../model/LinkProps';
|
|
5
|
+
import type { VNode } from '../../model/VNode';
|
|
5
6
|
import { TabItemInner } from './TabItemInner';
|
|
6
7
|
import type { TabsControlProps } from './TabsControlProps';
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
export interface TabItemBase extends LinkProps {
|
|
9
|
+
appendRight?: VNode;
|
|
10
|
+
}
|
|
9
11
|
|
|
10
12
|
export type TabType = 'default' | 'underlined' | 'rounded';
|
|
11
13
|
|
|
12
14
|
export interface TabItemProps {
|
|
13
15
|
item?: TabItemBase;
|
|
14
16
|
isActive?: boolean;
|
|
15
|
-
onClick?: TabsControlProps['onChange'];
|
|
16
17
|
type?: TabType;
|
|
18
|
+
onClick?: TabsControlProps['onChange'];
|
|
17
19
|
}
|
|
18
20
|
|
|
19
21
|
export const TabItem = JSX<TabItemProps>((props) =>
|
|
@@ -37,7 +37,7 @@ export const TabItemInner = JSX<TabItemInnerProps>(
|
|
|
37
37
|
({ tag = 'div', item = {}, isActive, type = 'default', onClick }) => {
|
|
38
38
|
const Tag: any = tag;
|
|
39
39
|
|
|
40
|
-
const { text, ...link } = item;
|
|
40
|
+
const { text, appendRight, ...link } = item;
|
|
41
41
|
|
|
42
42
|
return (
|
|
43
43
|
<Tag
|
|
@@ -62,6 +62,7 @@ export const TabItemInner = JSX<TabItemInnerProps>(
|
|
|
62
62
|
)}
|
|
63
63
|
>
|
|
64
64
|
<Text size="text-m">{text}</Text>
|
|
65
|
+
{appendRight ? <div className="ml-xs">{appendRight}</div> : null}
|
|
65
66
|
</div>
|
|
66
67
|
</Tag>
|
|
67
68
|
);
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export declare type HotFilterRecord = {
|
|
2
|
-
/** @title Тип недвижимости */
|
|
3
|
-
propertyType?: string[];
|
|
4
|
-
/** @title Этап строительства */
|
|
5
|
-
stage?: string[];
|
|
6
|
-
/** @title Категории */
|
|
7
|
-
categories?: string[];
|
|
8
|
-
/** @title Дополнительно */
|
|
9
|
-
extraOptions?: string[];
|
|
10
|
-
};
|
|
11
|
-
export declare const hotFilterRecordCmp: (a: Record<string, string[]> | null | undefined, b: Record<string, string[]> | null | undefined) => boolean;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export declare type HotFilterRecord = {
|
|
2
|
-
/** @title Тип недвижимости */
|
|
3
|
-
propertyType?: string[];
|
|
4
|
-
/** @title Этап строительства */
|
|
5
|
-
stage?: string[];
|
|
6
|
-
/** @title Категории */
|
|
7
|
-
categories?: string[];
|
|
8
|
-
/** @title Дополнительно */
|
|
9
|
-
extraOptions?: string[];
|
|
10
|
-
};
|
|
11
|
-
export declare const hotFilterRecordCmp: (a: Record<string, string[]> | null | undefined, b: Record<string, string[]> | null | undefined) => boolean;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"HotFilterRecord.js","sourceRoot":"","sources":["../../../src/components/MortgageFiltration/HotFilterRecord.ts"],"names":[],"mappings":";;AAAA,+DAAwF;AAa3E,QAAA,kBAAkB,GAAG,IAAA,uBAAM,EAAW,IAAA,gCAAe,EAAC,0BAAS,EAAE,IAAA,uBAAM,GAAE,CAAC,CAAC,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export declare type HotFilterRecord = {
|
|
2
|
-
/** @title Тип недвижимости */
|
|
3
|
-
propertyType?: string[];
|
|
4
|
-
/** @title Этап строительства */
|
|
5
|
-
stage?: string[];
|
|
6
|
-
/** @title Категории */
|
|
7
|
-
categories?: string[];
|
|
8
|
-
/** @title Дополнительно */
|
|
9
|
-
extraOptions?: string[];
|
|
10
|
-
};
|
|
11
|
-
export declare const hotFilterRecordCmp: (a: Record<string, string[]> | null | undefined, b: Record<string, string[]> | null | undefined) => boolean;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"HotFilterRecord.js","sourceRoot":"","sources":["../../../src/components/MortgageFiltration/HotFilterRecord.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAaxF,MAAM,CAAC,MAAM,kBAAkB,GAAG,MAAM,CAAW,eAAe,CAAC,SAAS,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export declare type HotFilterRecord = {
|
|
2
|
-
/** @title Тип недвижимости */
|
|
3
|
-
propertyType?: string[];
|
|
4
|
-
/** @title Этап строительства */
|
|
5
|
-
stage?: string[];
|
|
6
|
-
/** @title Категории */
|
|
7
|
-
categories?: string[];
|
|
8
|
-
/** @title Дополнительно */
|
|
9
|
-
extraOptions?: string[];
|
|
10
|
-
};
|
|
11
|
-
export declare const hotFilterRecordCmp: (a: Record<string, string[]> | null | undefined, b: Record<string, string[]> | null | undefined) => boolean;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export declare type HotFilterRecord = {
|
|
2
|
-
/** @title Тип недвижимости */
|
|
3
|
-
propertyType?: string[];
|
|
4
|
-
/** @title Этап строительства */
|
|
5
|
-
stage?: string[];
|
|
6
|
-
/** @title Категории */
|
|
7
|
-
categories?: string[];
|
|
8
|
-
/** @title Дополнительно */
|
|
9
|
-
extraOptions?: string[];
|
|
10
|
-
};
|
|
11
|
-
export declare const hotFilterRecordCmp: (a: Record<string, string[]> | null | undefined, b: Record<string, string[]> | null | undefined) => boolean;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"HotFilterRecord.js","sourceRoot":"","sources":["../../../src/components/MortgageFiltration/HotFilterRecord.ts"],"names":[],"mappings":";;AAAA,+DAAwF;AAa3E,QAAA,kBAAkB,GAAG,IAAA,uBAAM,EAAW,IAAA,gCAAe,EAAC,0BAAS,EAAE,IAAA,uBAAM,GAAE,CAAC,CAAC,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export declare type HotFilterRecord = {
|
|
2
|
-
/** @title Тип недвижимости */
|
|
3
|
-
propertyType?: string[];
|
|
4
|
-
/** @title Этап строительства */
|
|
5
|
-
stage?: string[];
|
|
6
|
-
/** @title Категории */
|
|
7
|
-
categories?: string[];
|
|
8
|
-
/** @title Дополнительно */
|
|
9
|
-
extraOptions?: string[];
|
|
10
|
-
};
|
|
11
|
-
export declare const hotFilterRecordCmp: (a: Record<string, string[]> | null | undefined, b: Record<string, string[]> | null | undefined) => boolean;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"HotFilterRecord.js","sourceRoot":"","sources":["../../../src/components/MortgageFiltration/HotFilterRecord.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAaxF,MAAM,CAAC,MAAM,kBAAkB,GAAG,MAAM,CAAW,eAAe,CAAC,SAAS,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { arrCmp, combineBoolCmps, objCmp, scalarCmp } from '../../utils/BoolComparator';
|
|
2
|
-
|
|
3
|
-
export type HotFilterRecord = {
|
|
4
|
-
/** @title Тип недвижимости */
|
|
5
|
-
propertyType?: string[];
|
|
6
|
-
/** @title Этап строительства */
|
|
7
|
-
stage?: string[];
|
|
8
|
-
/** @title Категории */
|
|
9
|
-
categories?: string[];
|
|
10
|
-
/** @title Дополнительно */
|
|
11
|
-
extraOptions?: string[];
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
export const hotFilterRecordCmp = objCmp<string[]>(combineBoolCmps(scalarCmp, arrCmp()));
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { arrCmp, combineBoolCmps, objCmp, scalarCmp } from '../../utils/BoolComparator';
|
|
2
|
-
|
|
3
|
-
export type HotFilterRecord = {
|
|
4
|
-
/** @title Тип недвижимости */
|
|
5
|
-
propertyType?: string[];
|
|
6
|
-
/** @title Этап строительства */
|
|
7
|
-
stage?: string[];
|
|
8
|
-
/** @title Категории */
|
|
9
|
-
categories?: string[];
|
|
10
|
-
/** @title Дополнительно */
|
|
11
|
-
extraOptions?: string[];
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
export const hotFilterRecordCmp = objCmp<string[]>(combineBoolCmps(scalarCmp, arrCmp()));
|