Files
klz-cables.com/.pnpm-store/v10/files/3c/dbbbb05dda1726b2d84ae24387de4526bf16b76a092c623fbfe26c0045eb25187be4de865bc335e717c81f1a59fbad0b3f5c84fb915f8d4beb93660e0ab037
Marc Mintel 5397309103
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
fix(products): fix breadcrumbs and product filtering (backport from main)
2026-02-24 16:04:21 +01:00

57 lines
1.4 KiB
Plaintext

/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
'use strict';
var list = require('@lexical/list');
var LexicalComposerContext = require('@lexical/react/LexicalComposerContext');
var react = require('react');
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
function useList(editor) {
react.useEffect(() => {
return list.registerList(editor);
}, [editor]);
}
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
function ListPlugin({
hasStrictIndent = false
}) {
const [editor] = LexicalComposerContext.useLexicalComposerContext();
react.useEffect(() => {
if (!editor.hasNodes([list.ListNode, list.ListItemNode])) {
throw new Error('ListPlugin: ListNode and/or ListItemNode not registered on editor');
}
}, [editor]);
react.useEffect(() => {
if (!hasStrictIndent) {
return;
}
return list.registerListStrictIndentTransform(editor);
}, [editor, hasStrictIndent]);
useList(editor);
return null;
}
exports.ListPlugin = ListPlugin;