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>
45 lines
1.6 KiB
JavaScript
45 lines
1.6 KiB
JavaScript
"use client";
|
|
|
|
// src/form.ts
|
|
import { useFormStore } from "@ariakit/react-core/form/form-store";
|
|
import { useFormContext } from "@ariakit/react-core/form/form-context";
|
|
import { Form } from "@ariakit/react-core/form/form";
|
|
import { FormProvider } from "@ariakit/react-core/form/form-provider";
|
|
import { FormControl } from "@ariakit/react-core/form/form-control";
|
|
import { FormCheckbox } from "@ariakit/react-core/form/form-checkbox";
|
|
import { FormDescription } from "@ariakit/react-core/form/form-description";
|
|
import { FormError } from "@ariakit/react-core/form/form-error";
|
|
import { FormField } from "@ariakit/react-core/form/form-field";
|
|
import { FormGroupLabel } from "@ariakit/react-core/form/form-group-label";
|
|
import { FormGroup } from "@ariakit/react-core/form/form-group";
|
|
import { FormInput } from "@ariakit/react-core/form/form-input";
|
|
import { FormLabel } from "@ariakit/react-core/form/form-label";
|
|
import { FormPush } from "@ariakit/react-core/form/form-push";
|
|
import { FormRadioGroup } from "@ariakit/react-core/form/form-radio-group";
|
|
import { FormRadio } from "@ariakit/react-core/form/form-radio";
|
|
import { FormRemove } from "@ariakit/react-core/form/form-remove";
|
|
import { FormReset } from "@ariakit/react-core/form/form-reset";
|
|
import { FormSubmit } from "@ariakit/react-core/form/form-submit";
|
|
|
|
export {
|
|
useFormStore,
|
|
useFormContext,
|
|
Form,
|
|
FormProvider,
|
|
FormControl,
|
|
FormCheckbox,
|
|
FormDescription,
|
|
FormError,
|
|
FormField,
|
|
FormGroupLabel,
|
|
FormGroup,
|
|
FormInput,
|
|
FormLabel,
|
|
FormPush,
|
|
FormRadioGroup,
|
|
FormRadio,
|
|
FormRemove,
|
|
FormReset,
|
|
FormSubmit
|
|
};
|