Files
formipay/node_modules/@wordpress/primitives/build/block-quotation/index.native.js
dwindown e8fbfb14c1 fix: prevent asset conflicts between React and Grid.js versions
Add coexistence checks to all enqueue methods to prevent loading
both React and Grid.js assets simultaneously.

Changes:
- ReactAdmin.php: Only enqueue React assets when ?react=1
- Init.php: Skip Grid.js when React active on admin pages
- Form.php, Coupon.php, Access.php: Restore classic assets when ?react=0
- Customer.php, Product.php, License.php: Add coexistence checks

Now the toggle between Classic and React versions works correctly.

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-18 17:02:14 +07:00

66 lines
1.9 KiB
JavaScript

"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.BlockQuotation = void 0;
var _react = require("react");
var _reactNative = require("react-native");
var _element = require("@wordpress/element");
var _compose = require("@wordpress/compose");
var _style = _interopRequireDefault(require("./style.scss"));
/**
* External dependencies
*/
/**
* WordPress dependencies
*/
/**
* Internal dependencies
*/
const BlockQuotation = exports.BlockQuotation = (0, _element.forwardRef)(({
...props
}, ref) => {
const {
style
} = props;
const blockQuoteStyle = [(0, _compose.usePreferredColorSchemeStyle)(_style.default.wpBlockQuoteLight, _style.default.wpBlockQuoteDark), style?.baseColors?.color?.text && {
borderLeftColor: style.baseColors.color.text
}, style?.color && {
borderLeftColor: style.color
}, style, style?.backgroundColor && _style.default.paddingWithBackground];
const colorStyle = style?.color ? {
color: style.color
} : {};
const newChildren = _element.Children.map(props.children, child => {
const {
identifier,
attributeKey
} = child?.props || {};
const identifierKey = identifier !== null && identifier !== void 0 ? identifier : attributeKey;
if (identifierKey === 'citation') {
return (0, _element.cloneElement)(child, {
style: {
..._style.default.wpBlockQuoteCitation,
...colorStyle
}
});
}
if (child && child.props.identifier === 'value') {
return (0, _element.cloneElement)(child, {
tagsToEliminate: ['div'],
style: colorStyle
});
}
return child;
});
return (0, _react.createElement)(_reactNative.View, {
ref: ref,
style: blockQuoteStyle
}, newChildren);
});
//# sourceMappingURL=index.native.js.map