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.9 KiB
JavaScript
2 lines
1.9 KiB
JavaScript
var y=Object.create;var d=Object.defineProperty;var R=Object.getOwnPropertyDescriptor;var W=Object.getOwnPropertyNames;var b=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty;var x=(e,n)=>{for(var s in n)d(e,s,{get:n[s],enumerable:!0})},h=(e,n,s,i)=>{if(n&&typeof n=="object"||typeof n=="function")for(let t of W(n))!A.call(e,t)&&t!==s&&d(e,t,{get:()=>n[t],enumerable:!(i=R(n,t))||i.enumerable});return e};var V=(e,n,s)=>(s=e!=null?y(b(e)):{},h(n||!e||!e.__esModule?d(s,"default",{value:e,enumerable:!0}):s,e)),D=e=>h(d({},"__esModule",{value:!0}),e);var U={};x(U,{lint:()=>P,ruleType:()=>m});module.exports=D(U);var j=require("semver"),O=e=>typeof e=="object"&&e.hasOwnProperty("exceptions");var F=(e,n)=>e.startsWith(n,0);var f=(e,n,s,i)=>{let t=!1,l=[],a=[];if(!e.hasOwnProperty(n))return{hasInvalidRangeVersions:t,dependenciesWithInvalidVersionRange:l,dependenciesWithoutInvalidVersionRange:a};for(let o in e[n]){if(O(i)&&i.exceptions.includes(o))continue;let g=e[n][o];F(g,s)?(t=!0,l.push(o)):a.push(o)}return{hasInvalidRangeVersions:t,dependenciesWithInvalidVersionRange:l,dependenciesWithoutInvalidVersionRange:a}};var r=V(require("chalk")),u=V(require("log-symbols"));var c=class{constructor(n,s,i,t){this.lintId=n,this.severity=s,this.node=i,this.lintMessage=t}toString(){let n=this.severity==="error"?u.default.error:u.default.warning,s=r.default.cyan.bold(this.lintId),i=r.default.magenta.bold(this.node),t=this.severity==="error"?r.default.red.bold(this.lintMessage):r.default.yellow(this.lintMessage);return`${n} ${s} - node: ${i} - ${t}`}};var v="no-tilde-version-devDependencies",p="devDependencies",m="optionalObject",P=(e,n,s)=>{let t=f(e,p,"~",s);return e.hasOwnProperty(p)&&t.hasInvalidRangeVersions?new c(v,n,p,`You are using an invalid version range. Please do not use ~. Invalid ${p} include: ${t.dependenciesWithInvalidVersionRange.join(", ")}`):null};0&&(module.exports={lint,ruleType});
|