Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[1.x] Inertia v1 #238

Merged
merged 12 commits into from
Jan 17, 2023
Prev Previous commit
Next Next commit
Rename imports
jessarcher committed Jan 16, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 1c018a5fe032e68a3408aa786b93b988b6518216
2 changes: 1 addition & 1 deletion stubs/inertia-react/resources/js/Components/Dropdown.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useState, createContext, useContext, Fragment } from 'react';
import { Link } from '@inertiajs/inertia-react';
import { Link } from '@inertiajs/react';
import { Transition } from '@headlessui/react';

const DropDownContext = createContext();
2 changes: 1 addition & 1 deletion stubs/inertia-react/resources/js/Components/NavLink.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Link } from '@inertiajs/inertia-react';
import { Link } from '@inertiajs/react';

export default function NavLink({ href, active, children }) {
return (
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Link } from '@inertiajs/inertia-react';
import { Link } from '@inertiajs/react';

export default function ResponsiveNavLink({ method = 'get', as = 'a', href, active = false, children }) {
return (
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@ import ApplicationLogo from '@/Components/ApplicationLogo';
import Dropdown from '@/Components/Dropdown';
import NavLink from '@/Components/NavLink';
import ResponsiveNavLink from '@/Components/ResponsiveNavLink';
import { Link } from '@inertiajs/inertia-react';
import { Link } from '@inertiajs/react';

export default function Authenticated({ auth, header, children }) {
const [showingNavigationDropdown, setShowingNavigationDropdown] = useState(false);
2 changes: 1 addition & 1 deletion stubs/inertia-react/resources/js/Layouts/GuestLayout.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import ApplicationLogo from '@/Components/ApplicationLogo';
import { Link } from '@inertiajs/inertia-react';
import { Link } from '@inertiajs/react';

export default function Guest({ children }) {
return (
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@ import InputError from '@/Components/InputError';
import InputLabel from '@/Components/InputLabel';
import PrimaryButton from '@/Components/PrimaryButton';
import TextInput from '@/Components/TextInput';
import { Head, useForm } from '@inertiajs/inertia-react';
import { Head, useForm } from '@inertiajs/react';

export default function ConfirmPassword() {
const { data, setData, post, processing, errors, reset } = useForm({
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@ import GuestLayout from '@/Layouts/GuestLayout';
import InputError from '@/Components/InputError';
import PrimaryButton from '@/Components/PrimaryButton';
import TextInput from '@/Components/TextInput';
import { Head, useForm } from '@inertiajs/inertia-react';
import { Head, useForm } from '@inertiajs/react';

export default function ForgotPassword({ status }) {
const { data, setData, post, processing, errors } = useForm({
2 changes: 1 addition & 1 deletion stubs/inertia-react/resources/js/Pages/Auth/Login.jsx
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@ import InputError from '@/Components/InputError';
import InputLabel from '@/Components/InputLabel';
import PrimaryButton from '@/Components/PrimaryButton';
import TextInput from '@/Components/TextInput';
import { Head, Link, useForm } from '@inertiajs/inertia-react';
import { Head, Link, useForm } from '@inertiajs/react';

export default function Login({ status, canResetPassword }) {
const { data, setData, post, processing, errors, reset } = useForm({
2 changes: 1 addition & 1 deletion stubs/inertia-react/resources/js/Pages/Auth/Register.jsx
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@ import InputError from '@/Components/InputError';
import InputLabel from '@/Components/InputLabel';
import PrimaryButton from '@/Components/PrimaryButton';
import TextInput from '@/Components/TextInput';
import { Head, Link, useForm } from '@inertiajs/inertia-react';
import { Head, Link, useForm } from '@inertiajs/react';

export default function Register() {
const { data, setData, post, processing, errors, reset } = useForm({
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@ import InputError from '@/Components/InputError';
import InputLabel from '@/Components/InputLabel';
import PrimaryButton from '@/Components/PrimaryButton';
import TextInput from '@/Components/TextInput';
import { Head, useForm } from '@inertiajs/inertia-react';
import { Head, useForm } from '@inertiajs/react';

export default function ResetPassword({ token, email }) {
const { data, setData, post, processing, errors, reset } = useForm({
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import GuestLayout from '@/Layouts/GuestLayout';
import PrimaryButton from '@/Components/PrimaryButton';
import { Head, Link, useForm } from '@inertiajs/inertia-react';
import { Head, Link, useForm } from '@inertiajs/react';

export default function VerifyEmail({ status }) {
const { post, processing } = useForm();
2 changes: 1 addition & 1 deletion stubs/inertia-react/resources/js/Pages/Dashboard.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import AuthenticatedLayout from '@/Layouts/AuthenticatedLayout';
import { Head } from '@inertiajs/inertia-react';
import { Head } from '@inertiajs/react';

export default function Dashboard(props) {
return (
2 changes: 1 addition & 1 deletion stubs/inertia-react/resources/js/Pages/Profile/Edit.jsx
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@ import AuthenticatedLayout from '@/Layouts/AuthenticatedLayout';
import DeleteUserForm from './Partials/DeleteUserForm';
import UpdatePasswordForm from './Partials/UpdatePasswordForm';
import UpdateProfileInformationForm from './Partials/UpdateProfileInformationForm';
import { Head } from '@inertiajs/inertia-react';
import { Head } from '@inertiajs/react';

export default function Edit({ auth, mustVerifyEmail, status }) {
return (
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@ import InputLabel from '@/Components/InputLabel';
import Modal from '@/Components/Modal';
import SecondaryButton from '@/Components/SecondaryButton';
import TextInput from '@/Components/TextInput';
import { useForm } from '@inertiajs/inertia-react';
import { useForm } from '@inertiajs/react';

export default function DeleteUserForm({ className }) {
const [confirmingUserDeletion, setConfirmingUserDeletion] = useState(false);
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@ import InputError from '@/Components/InputError';
import InputLabel from '@/Components/InputLabel';
import PrimaryButton from '@/Components/PrimaryButton';
import TextInput from '@/Components/TextInput';
import { useForm } from '@inertiajs/inertia-react';
import { useForm } from '@inertiajs/react';
import { Transition } from '@headlessui/react';

export default function UpdatePasswordForm({ className }) {
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@ import InputError from '@/Components/InputError';
import InputLabel from '@/Components/InputLabel';
import PrimaryButton from '@/Components/PrimaryButton';
import TextInput from '@/Components/TextInput';
import { Link, useForm, usePage } from '@inertiajs/inertia-react';
import { Link, useForm, usePage } from '@inertiajs/react';
import { Transition } from '@headlessui/react';

export default function UpdateProfileInformation({ mustVerifyEmail, status, className }) {
2 changes: 1 addition & 1 deletion stubs/inertia-react/resources/js/Pages/Welcome.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Link, Head } from '@inertiajs/inertia-react';
import { Link, Head } from '@inertiajs/react';

export default function Welcome(props) {
return (
2 changes: 1 addition & 1 deletion stubs/inertia-react/resources/js/app.jsx
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@ import './bootstrap';
import '../css/app.css';

import { createRoot } from 'react-dom/client';
import { createInertiaApp } from '@inertiajs/inertia-react';
import { createInertiaApp } from '@inertiajs/react';
import { InertiaProgress } from '@inertiajs/progress';
import { resolvePageComponent } from 'laravel-vite-plugin/inertia-helpers';

4 changes: 2 additions & 2 deletions stubs/inertia-react/resources/js/ssr.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import ReactDOMServer from 'react-dom/server';
import { createInertiaApp } from '@inertiajs/inertia-react';
import createServer from '@inertiajs/server';
import { createInertiaApp } from '@inertiajs/react';
import createServer from '@inertiajs/react/server';
import { resolvePageComponent } from 'laravel-vite-plugin/inertia-helpers';
import route from '../../vendor/tightenco/ziggy/dist/index.m';

2 changes: 1 addition & 1 deletion stubs/inertia-vue/resources/js/Components/DropdownLink.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script setup>
import { Link } from '@inertiajs/inertia-vue3';
import { Link } from '@inertiajs/vue3';
</script>

<template>
2 changes: 1 addition & 1 deletion stubs/inertia-vue/resources/js/Components/NavLink.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script setup>
import { computed } from 'vue';
import { Link } from '@inertiajs/inertia-vue3';
import { Link } from '@inertiajs/vue3';

const props = defineProps(['href', 'active']);

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script setup>
import { computed } from 'vue';
import { Link } from '@inertiajs/inertia-vue3';
import { Link } from '@inertiajs/vue3';

const props = defineProps(['href', 'active']);

Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@ import Dropdown from '@/Components/Dropdown.vue';
import DropdownLink from '@/Components/DropdownLink.vue';
import NavLink from '@/Components/NavLink.vue';
import ResponsiveNavLink from '@/Components/ResponsiveNavLink.vue';
import { Link } from '@inertiajs/inertia-vue3';
import { Link } from '@inertiajs/vue3';

const showingNavigationDropdown = ref(false);
</script>
2 changes: 1 addition & 1 deletion stubs/inertia-vue/resources/js/Layouts/GuestLayout.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script setup>
import ApplicationLogo from '@/Components/ApplicationLogo.vue';
import { Link } from '@inertiajs/inertia-vue3';
import { Link } from '@inertiajs/vue3';
</script>

<template>
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@ import InputError from '@/Components/InputError.vue';
import InputLabel from '@/Components/InputLabel.vue';
import PrimaryButton from '@/Components/PrimaryButton.vue';
import TextInput from '@/Components/TextInput.vue';
import { Head, useForm } from '@inertiajs/inertia-vue3';
import { Head, useForm } from '@inertiajs/vue3';

const form = useForm({
password: '',
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@ import InputError from '@/Components/InputError.vue';
import InputLabel from '@/Components/InputLabel.vue';
import PrimaryButton from '@/Components/PrimaryButton.vue';
import TextInput from '@/Components/TextInput.vue';
import { Head, useForm } from '@inertiajs/inertia-vue3';
import { Head, useForm } from '@inertiajs/vue3';

defineProps({
status: String,
2 changes: 1 addition & 1 deletion stubs/inertia-vue/resources/js/Pages/Auth/Login.vue
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@ import InputError from '@/Components/InputError.vue';
import InputLabel from '@/Components/InputLabel.vue';
import PrimaryButton from '@/Components/PrimaryButton.vue';
import TextInput from '@/Components/TextInput.vue';
import { Head, Link, useForm } from '@inertiajs/inertia-vue3';
import { Head, Link, useForm } from '@inertiajs/vue3';

defineProps({
canResetPassword: Boolean,
2 changes: 1 addition & 1 deletion stubs/inertia-vue/resources/js/Pages/Auth/Register.vue
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@ import InputError from '@/Components/InputError.vue';
import InputLabel from '@/Components/InputLabel.vue';
import PrimaryButton from '@/Components/PrimaryButton.vue';
import TextInput from '@/Components/TextInput.vue';
import { Head, Link, useForm } from '@inertiajs/inertia-vue3';
import { Head, Link, useForm } from '@inertiajs/vue3';

const form = useForm({
name: '',
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@ import InputError from '@/Components/InputError.vue';
import InputLabel from '@/Components/InputLabel.vue';
import PrimaryButton from '@/Components/PrimaryButton.vue';
import TextInput from '@/Components/TextInput.vue';
import { Head, useForm } from '@inertiajs/inertia-vue3';
import { Head, useForm } from '@inertiajs/vue3';

const props = defineProps({
email: String,
2 changes: 1 addition & 1 deletion stubs/inertia-vue/resources/js/Pages/Auth/VerifyEmail.vue
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
import { computed } from 'vue';
import GuestLayout from '@/Layouts/GuestLayout.vue';
import PrimaryButton from '@/Components/PrimaryButton.vue';
import { Head, Link, useForm } from '@inertiajs/inertia-vue3';
import { Head, Link, useForm } from '@inertiajs/vue3';

const props = defineProps({
status: String,
2 changes: 1 addition & 1 deletion stubs/inertia-vue/resources/js/Pages/Dashboard.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script setup>
import AuthenticatedLayout from '@/Layouts/AuthenticatedLayout.vue';
import { Head } from '@inertiajs/inertia-vue3';
import { Head } from '@inertiajs/vue3';
</script>

<template>
2 changes: 1 addition & 1 deletion stubs/inertia-vue/resources/js/Pages/Profile/Edit.vue
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@ import AuthenticatedLayout from '@/Layouts/AuthenticatedLayout.vue';
import DeleteUserForm from './Partials/DeleteUserForm.vue';
import UpdatePasswordForm from './Partials/UpdatePasswordForm.vue';
import UpdateProfileInformationForm from './Partials/UpdateProfileInformationForm.vue';
import { Head } from '@inertiajs/inertia-vue3';
import { Head } from '@inertiajs/vue3';
defineProps({
mustVerifyEmail: Boolean,
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@ import InputLabel from '@/Components/InputLabel.vue';
import Modal from '@/Components/Modal.vue';
import SecondaryButton from '@/Components/SecondaryButton.vue';
import TextInput from '@/Components/TextInput.vue';
import { useForm } from '@inertiajs/inertia-vue3';
import { useForm } from '@inertiajs/vue3';
import { nextTick, ref } from 'vue';
const confirmingUserDeletion = ref(false);
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@ import InputError from '@/Components/InputError.vue';
import InputLabel from '@/Components/InputLabel.vue';
import PrimaryButton from '@/Components/PrimaryButton.vue';
import TextInput from '@/Components/TextInput.vue';
import { useForm } from '@inertiajs/inertia-vue3';
import { useForm } from '@inertiajs/vue3';
import { ref } from 'vue';
const passwordInput = ref(null);
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@ import InputError from '@/Components/InputError.vue';
import InputLabel from '@/Components/InputLabel.vue';
import PrimaryButton from '@/Components/PrimaryButton.vue';
import TextInput from '@/Components/TextInput.vue';
import { Link, useForm, usePage } from '@inertiajs/inertia-vue3';
import { Link, useForm, usePage } from '@inertiajs/vue3';
const props = defineProps({
mustVerifyEmail: Boolean,
2 changes: 1 addition & 1 deletion stubs/inertia-vue/resources/js/Pages/Welcome.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script setup>
import { Head, Link } from '@inertiajs/inertia-vue3';
import { Head, Link } from '@inertiajs/vue3';
defineProps({
canLogin: Boolean,
2 changes: 1 addition & 1 deletion stubs/inertia-vue/resources/js/app.js
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@ import './bootstrap';
import '../css/app.css';

import { createApp, h } from 'vue';
import { createInertiaApp } from '@inertiajs/inertia-vue3';
import { createInertiaApp } from '@inertiajs/vue3';
import { InertiaProgress } from '@inertiajs/progress';
import { resolvePageComponent } from 'laravel-vite-plugin/inertia-helpers';
import { ZiggyVue } from '../../vendor/tightenco/ziggy/dist/vue.m';
4 changes: 2 additions & 2 deletions stubs/inertia-vue/resources/js/ssr.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { createSSRApp, h } from 'vue';
import { renderToString } from '@vue/server-renderer';
import { createInertiaApp } from '@inertiajs/inertia-vue3';
import createServer from '@inertiajs/server';
import { createInertiaApp } from '@inertiajs/vue3';
import createServer from '@inertiajs/vue3/server';
import { resolvePageComponent } from 'laravel-vite-plugin/inertia-helpers';
import { ZiggyVue } from '../../vendor/tightenco/ziggy/dist/vue.m';