Files
formipay/node_modules/postcss-scss/lib/scss-stringifier.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

52 lines
1.3 KiB
JavaScript

let Stringifier = require('postcss/lib/stringifier')
class ScssStringifier extends Stringifier {
comment(node) {
let left = this.raw(node, 'left', 'commentLeft')
let right = this.raw(node, 'right', 'commentRight')
if (node.raws.inline) {
let text = node.raws.text || node.text
this.builder('//' + left + text + right, node)
} else {
this.builder('/*' + left + node.text + right + '*/', node)
}
}
decl(node, semicolon) {
if (!node.isNested) {
super.decl(node, semicolon)
} else {
let between = this.raw(node, 'between', 'colon')
let string = node.prop + between + this.rawValue(node, 'value')
if (node.important) {
string += node.raws.important || ' !important'
}
this.builder(string + '{', node, 'start')
let after
if (node.nodes && node.nodes.length) {
this.body(node)
after = this.raw(node, 'after')
} else {
after = this.raw(node, 'after', 'emptyBody')
}
if (after) this.builder(after)
this.builder('}', node, 'end')
}
}
rawValue(node, prop) {
let value = node[prop]
let raw = node.raws[prop]
if (raw && raw.value === value) {
return raw.scss ? raw.scss : raw.raw
} else {
return value
}
}
}
module.exports = ScssStringifier