@redneckz/wildless-cms-uni-blocks 0.14.867 → 0.14.869
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.14.869.js +13 -0
- package/bundle/bundle.umd.js +9 -5
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/GalleryLayout/useSortProductBlocks.d.ts +1 -1
- package/bundle/model/FormTypeFieldDef.d.ts +1 -1
- package/dist/components/GalleryLayout/useSortProductBlocks.d.ts +1 -1
- package/dist/components/GalleryLayout/useSortProductBlocks.js +8 -4
- package/dist/components/GalleryLayout/useSortProductBlocks.js.map +1 -1
- package/dist/model/FormTypeFieldDef.d.ts +1 -1
- package/lib/components/GalleryLayout/useSortProductBlocks.d.ts +1 -1
- package/lib/components/GalleryLayout/useSortProductBlocks.js +8 -4
- package/lib/components/GalleryLayout/useSortProductBlocks.js.map +1 -1
- package/lib/model/FormTypeFieldDef.d.ts +1 -1
- package/mobile/bundle/bundle.umd.js +9 -5
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/GalleryLayout/useSortProductBlocks.d.ts +1 -1
- package/mobile/bundle/model/FormTypeFieldDef.d.ts +1 -1
- package/mobile/dist/components/GalleryLayout/useSortProductBlocks.d.ts +1 -1
- package/mobile/dist/components/GalleryLayout/useSortProductBlocks.js +8 -4
- package/mobile/dist/components/GalleryLayout/useSortProductBlocks.js.map +1 -1
- package/mobile/dist/model/FormTypeFieldDef.d.ts +1 -1
- package/mobile/lib/components/GalleryLayout/useSortProductBlocks.d.ts +1 -1
- package/mobile/lib/components/GalleryLayout/useSortProductBlocks.js +8 -4
- package/mobile/lib/components/GalleryLayout/useSortProductBlocks.js.map +1 -1
- package/mobile/lib/model/FormTypeFieldDef.d.ts +1 -1
- package/mobile/src/components/ApplicationForm/ApplicationForm.example.json +3 -3
- package/mobile/src/components/GalleryLayout/useSortProductBlocks.ts +9 -4
- package/mobile/src/model/FormTypeFieldDef.ts +1 -1
- package/package.json +1 -1
- package/src/components/ApplicationForm/ApplicationForm.example.json +3 -3
- package/src/components/ApplicationForm/ApplicationForm.fixture.mobile.tsx +2 -2
- package/src/components/ApplicationForm/ApplicationForm.fixture.tsx +2 -2
- package/src/components/GalleryLayout/useSortProductBlocks.ts +9 -4
- package/src/model/FormTypeFieldDef.ts +1 -1
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { traversePageBlocks } from '../utils.js';
|
|
2
|
+
|
|
3
|
+
export const description = 'v0.14.869';
|
|
4
|
+
|
|
5
|
+
export default traversePageBlocks(adjustFromType);
|
|
6
|
+
|
|
7
|
+
function adjustFromType(block) {
|
|
8
|
+
const content = block?.content;
|
|
9
|
+
|
|
10
|
+
if (block?.type === 'ApplicationForm' && content?.typeForm === 'RFB') {
|
|
11
|
+
content.typeForm = 'FCB';
|
|
12
|
+
}
|
|
13
|
+
}
|
package/bundle/bundle.umd.js
CHANGED
|
@@ -9898,7 +9898,7 @@
|
|
|
9898
9898
|
'': '',
|
|
9899
9899
|
};
|
|
9900
9900
|
|
|
9901
|
-
const useSortProductBlocks = (parentBlock
|
|
9901
|
+
const useSortProductBlocks = (parentBlock) => {
|
|
9902
9902
|
const [blocks, setBlocks] = useState(parentBlock.blocks ?? []);
|
|
9903
9903
|
const sessionStore = useSessionStore();
|
|
9904
9904
|
const offerIds = sessionStore?.offerIds || [];
|
|
@@ -9907,10 +9907,14 @@
|
|
|
9907
9907
|
const blocksByOfferIds = offerIds
|
|
9908
9908
|
.map((id) => blocksMap.get(id))
|
|
9909
9909
|
.filter((block) => Boolean(block));
|
|
9910
|
-
const tailBlocks = blocks
|
|
9910
|
+
const tailBlocks = parentBlock.blocks?.filter(({ __id = '' }) => !offerIds.includes(__id)) ?? [];
|
|
9911
9911
|
return [...blocksByOfferIds, ...tailBlocks];
|
|
9912
|
-
}, [
|
|
9913
|
-
useEffect(() =>
|
|
9912
|
+
}, [parentBlock, offerIds]);
|
|
9913
|
+
useEffect(() => {
|
|
9914
|
+
if (sortedBlocks.length) {
|
|
9915
|
+
setBlocks(sortedBlocks);
|
|
9916
|
+
}
|
|
9917
|
+
}, [parentBlock]);
|
|
9914
9918
|
return blocks;
|
|
9915
9919
|
};
|
|
9916
9920
|
|
|
@@ -11147,7 +11151,7 @@
|
|
|
11147
11151
|
slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
|
|
11148
11152
|
});
|
|
11149
11153
|
|
|
11150
|
-
const packageVersion = "0.14.
|
|
11154
|
+
const packageVersion = "0.14.868";
|
|
11151
11155
|
|
|
11152
11156
|
exports.Blocks = Blocks;
|
|
11153
11157
|
exports.ContentPage = ContentPage;
|