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>
2 lines
1.8 KiB
JavaScript
2 lines
1.8 KiB
JavaScript
var g=Object.create;var c=Object.defineProperty;var y=Object.getOwnPropertyDescriptor;var W=Object.getOwnPropertyNames;var R=Object.getPrototypeOf,b=Object.prototype.hasOwnProperty;var A=(e,n)=>{for(var s in n)c(e,s,{get:n[s],enumerable:!0})},h=(e,n,s,t)=>{if(n&&typeof n=="object"||typeof n=="function")for(let i of W(n))!b.call(e,i)&&i!==s&&c(e,i,{get:()=>n[i],enumerable:!(t=y(n,i))||t.enumerable});return e};var V=(e,n,s)=>(s=e!=null?g(R(e)):{},h(n||!e||!e.__esModule?c(s,"default",{value:e,enumerable:!0}):s,e)),x=e=>h(c({},"__esModule",{value:!0}),e);var P={};A(P,{lint:()=>O,minItems:()=>F,ruleType:()=>m});module.exports=x(P);var U=require("semver");var f=(e,n,s)=>{let t=!1,i=[],l=[];if(!e.hasOwnProperty(n))return{hasDependencyWithRestrictedVersion:t,dependenciesWithRestrictedVersion:i,dependenciesWithoutRestrictedVersion:l};for(let r in e[n])for(let d of s)d===r||d.endsWith("*")&&r.startsWith(d.slice(0,Math.max(0,d.length-1)))?(t=!0,i.push(r)):l.push(r);return{hasDependencyWithRestrictedVersion:t,dependenciesWithRestrictedVersion:i,dependenciesWithoutRestrictedVersion:l}};var o=V(require("chalk")),a=V(require("log-symbols"));var p=class{constructor(n,s,t,i){this.lintId=n,this.severity=s,this.node=t,this.lintMessage=i}toString(){let n=this.severity==="error"?a.default.error:a.default.warning,s=o.default.cyan.bold(this.lintId),t=o.default.magenta.bold(this.node),i=this.severity==="error"?o.default.red.bold(this.lintMessage):o.default.yellow(this.lintMessage);return`${n} ${s} - node: ${t} - ${i}`}};var D="no-restricted-devDependencies",u="devDependencies",m="array",F=1,O=(e,n,s)=>{let t=f(e,u,s);return t.hasDependencyWithRestrictedVersion?new p(D,n,u,`You are using a restricted dependency. Please remove it. Invalid ${u} include: ${t.dependenciesWithRestrictedVersion.join(", ")}`):null};0&&(module.exports={lint,minItems,ruleType});
|