@redneckz/wildless-cms-uni-blocks 0.14.247 → 0.14.249
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/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +16 -10
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/BankAccountFiltration/BankAccountFiltrationContent.d.ts +2 -3
- package/dist/components/BankAccountFiltration/BankAccountFiltration.js +14 -6
- package/dist/components/BankAccountFiltration/BankAccountFiltration.js.map +1 -1
- package/dist/components/BankAccountFiltration/BankAccountFiltrationContent.d.ts +2 -3
- package/lib/common.css +1 -1
- package/lib/components/BankAccountFiltration/BankAccountFiltration.js +14 -6
- package/lib/components/BankAccountFiltration/BankAccountFiltration.js.map +1 -1
- package/lib/components/BankAccountFiltration/BankAccountFiltrationContent.d.ts +2 -3
- package/mobile/bundle/bundle.umd.js +1 -1
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/BankAccountFiltration/BankAccountFiltrationContent.d.ts +2 -3
- package/mobile/dist/components/BankAccountFiltration/BankAccountFiltration.js +14 -6
- package/mobile/dist/components/BankAccountFiltration/BankAccountFiltration.js.map +1 -1
- package/mobile/dist/components/BankAccountFiltration/BankAccountFiltrationContent.d.ts +2 -3
- package/mobile/lib/components/BankAccountFiltration/BankAccountFiltration.js +14 -6
- package/mobile/lib/components/BankAccountFiltration/BankAccountFiltration.js.map +1 -1
- package/mobile/lib/components/BankAccountFiltration/BankAccountFiltrationContent.d.ts +2 -3
- package/mobile/src/components/BankAccountFiltration/BankAccountFiltration.example.json +1 -1
- package/mobile/src/components/BankAccountFiltration/BankAccountFiltration.tsx +40 -28
- package/mobile/src/components/BankAccountFiltration/BankAccountFiltrationContent.ts +2 -2
- package/package.json +1 -1
- package/src/components/BankAccountFiltration/BankAccountFiltration.example.json +1 -1
- package/src/components/BankAccountFiltration/BankAccountFiltration.fixture.tsx +26 -4
- package/src/components/BankAccountFiltration/BankAccountFiltration.tsx +40 -28
- package/src/components/BankAccountFiltration/BankAccountFiltrationContent.ts +2 -2
package/bundle/bundle.umd.js
CHANGED
|
@@ -1949,6 +1949,10 @@
|
|
|
1949
1949
|
|
|
1950
1950
|
const NotFound = JSX(({ title, description }) => (jsxs("div", { className: "bg-white p-6xl py-20 flex gap-s flex-col @xl:items-center", children: [jsx(Img, { image: { icon: 'MagnifierIcon', iconVersion: 'normal' }, width: "120", height: "120" }), jsx(Headline, { title: title, description: description, headlineVersion: "S", isEmbedded: true, align: AlignStyles })] })));
|
|
1951
1951
|
|
|
1952
|
+
const getBorderStyle = (showBorder = false) => showBorder
|
|
1953
|
+
? 'border border-solid border-gray group-data-secondary:border-white/50 group-data-gray:border-main-divider'
|
|
1954
|
+
: '';
|
|
1955
|
+
|
|
1952
1956
|
const useCarouselControls = (props, initialIndex = 0) => {
|
|
1953
1957
|
const { itemCount, visibleItemCount } = props;
|
|
1954
1958
|
const [activeIndex, setActiveIndex] = useState(initialIndex);
|
|
@@ -2200,10 +2204,6 @@
|
|
|
2200
2204
|
|
|
2201
2205
|
const ITEMS_GAP = 16;
|
|
2202
2206
|
|
|
2203
|
-
const getBorderStyle = (showBorder = false) => showBorder
|
|
2204
|
-
? 'border border-solid border-gray group-data-secondary:border-white/50 group-data-gray:border-main-divider'
|
|
2205
|
-
: '';
|
|
2206
|
-
|
|
2207
2207
|
const renderCardHighlight = ({ className, text = 'ХИТ' } = {}) => (jsxs("div", { className: style('w-14 h-14 bg-white flex flex-col items-center justify-center rounded-md shadow-main-black', className), children: [jsx(Icon, { iconVersion: "black", name: "HeartIcon", width: "24", height: "24" }), jsx(Paragraph, { size: "text-s", font: "font-normal", align: "text-center", color: "text-primary-text", children: text })] }));
|
|
2208
2208
|
|
|
2209
2209
|
const cardBaseStyle = 'relative h-full';
|
|
@@ -2268,24 +2268,30 @@
|
|
|
2268
2268
|
});
|
|
2269
2269
|
|
|
2270
2270
|
const EMPTY_SCHEMA = {};
|
|
2271
|
+
const initialFiltrationState$3 = {};
|
|
2271
2272
|
const BankAccountFiltration = UniBlock(({ className, filtrationSchema = EMPTY_SCHEMA, resetButton, notFound, ...rest }) => {
|
|
2272
|
-
const [, { blocksToRender }, { field, reset }] = useFiltrationForm(
|
|
2273
|
+
const [, { blocksToRender }, { field, reset }] = useFiltrationForm(initialFiltrationState$3, {
|
|
2273
2274
|
block: rest.block,
|
|
2274
2275
|
page: rest.options?.page,
|
|
2275
2276
|
});
|
|
2276
|
-
const selectArrProps =
|
|
2277
|
+
const selectArrProps = Object.entries(filtrationSchema)
|
|
2277
2278
|
// Only StringArray
|
|
2278
2279
|
.filter(([, schema]) => schema.type === 'array' && schema.ui === 'dropdown')
|
|
2279
2280
|
.map(([name, schema]) => ({
|
|
2280
2281
|
className: 'w-64',
|
|
2282
|
+
label: schema.title,
|
|
2281
2283
|
options: stringArrayToOptions(schema),
|
|
2282
2284
|
...field(name, {
|
|
2283
2285
|
parse: ({ key }) => [key],
|
|
2284
|
-
format: ([value]) => stringArrayToOptions(schema).find((_) => _.key === value) || { key: '' },
|
|
2286
|
+
format: ([value] = []) => stringArrayToOptions(schema).find((_) => _.key === value) || { key: '' },
|
|
2285
2287
|
}),
|
|
2286
|
-
}))
|
|
2288
|
+
}));
|
|
2287
2289
|
const Selects = selectArrProps.map((props, i) => jsx(Select, { ...props }, String(i)));
|
|
2288
|
-
return (jsxs(BlockWrapper, { className: style(className), defaultPadding: "p-0", version: "transparent", ...rest, children: [jsx(FiltrationForm, { filtrationSchema: filtrationSchema, field: field, reset: reset, children: jsxs("div", { children: [Selects, jsx("div", { children: jsx(Button, { type: "reset", className: "mt-lg w-64", onClick: reset, version: resetButton?.version, children: resetButton?.text }) })] }) }), jsx("div", { className: style(blocksToRender?.length ? 'hidden' : 'block'), children: notFound ? jsx(NotFound, { ...notFound }) : null }), jsx(Carousel, { padding: "p-0", isEmbedded: true, visibleItemCount: 0, isAlignCenter: true, isGap: false,
|
|
2290
|
+
return (jsxs(BlockWrapper, { className: style(className), defaultPadding: "p-0", version: "transparent", ...rest, children: [jsx(FiltrationForm, { filtrationSchema: filtrationSchema, field: field, reset: reset, children: jsxs("div", { children: [Selects, jsx("div", { children: jsx(Button, { type: "reset", className: "mt-lg w-64", onClick: reset, version: resetButton?.version, children: resetButton?.text }) })] }) }), jsx("div", { className: style(blocksToRender?.length ? 'hidden' : 'block'), children: notFound ? jsx(NotFound, { ...notFound }) : null }), jsx(Carousel, { padding: "p-0", isEmbedded: true, itemCount: blocksToRender?.length, visibleItemCount: 0, isAlignCenter: true, isGap: false, children: renderBlocksList(blocksToRender, {
|
|
2291
|
+
...rest.options,
|
|
2292
|
+
parent: rest.block,
|
|
2293
|
+
renderProps: (block, options, i) => (jsx("div", { className: style('relative min-w-80', getBorderStyle(true)), children: renderBlock$1(block, options) }, String(i))),
|
|
2294
|
+
}) })] }));
|
|
2289
2295
|
}, {
|
|
2290
2296
|
childrenTypes: ['CarouselTariffsCard'],
|
|
2291
2297
|
childSchema: (content) => content?.filtrationSchema || {},
|
|
@@ -6081,7 +6087,7 @@
|
|
|
6081
6087
|
slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
|
|
6082
6088
|
});
|
|
6083
6089
|
|
|
6084
|
-
const packageVersion = "0.14.
|
|
6090
|
+
const packageVersion = "0.14.248";
|
|
6085
6091
|
|
|
6086
6092
|
exports.Blocks = Blocks;
|
|
6087
6093
|
exports.ContentPage = ContentPage;
|