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

[6.x] Vue 3 #11339

Merged
merged 146 commits into from
Feb 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
146 commits
Select commit Hold shift + click to select a range
108c49a
Bare minimum to get Vue 3 compiling ...
jasonvarga Jan 8, 2025
9d1cef3
Dump the vue app object and imports into the new app file
jasonvarga Jan 8, 2025
6ac9750
Avoid usage of global "Vue"
jasonvarga Jan 8, 2025
22bad66
Migrate stuff
jasonvarga Jan 8, 2025
84c9f8f
Actually mount the vue app
jasonvarga Jan 8, 2025
dd5239d
Use new clickaway to get rid of compile error ...
jasonvarga Jan 8, 2025
a47f568
Disable some stuff temporarily to make compile work.
jasonvarga Jan 8, 2025
8c60fca
Needs to be function
jasonvarga Jan 9, 2025
4233b28
Moment
jasonvarga Jan 9, 2025
51ad46b
Vuex store, config, and event bus
jasonvarga Jan 9, 2025
1b16034
Nitpick
jasonvarga Jan 9, 2025
efaa5fe
Remove store. Already migrated.
jasonvarga Jan 9, 2025
2b9ed62
Register global components in a vue3 compatible way
jasonvarga Jan 9, 2025
0824c99
Refactor login component away from inline-template which isn't suppor…
jasonvarga Jan 9, 2025
427dc7b
Add vue click away. Continues dd5239df
jasonvarga Jan 9, 2025
e4def78
More store removal
jasonvarga Jan 9, 2025
4c3365d
More clickaway
jasonvarga Jan 9, 2025
72a556d
Tooltips
jasonvarga Jan 9, 2025
cf6e60e
Expose axios
jasonvarga Jan 9, 2025
c894796
Preferences
jasonvarga Jan 9, 2025
d023a87
Keys
jasonvarga Jan 9, 2025
ea0daf5
Migrate SvgIcon to composition api ...
jasonvarga Jan 9, 2025
8b756be
Make progress bar into a composable
jasonvarga Jan 9, 2025
63686dc
scopedSlots become slots
jasonvarga Jan 9, 2025
1c04f85
Render functions no longer receive argument
jasonvarga Jan 9, 2025
1c0fef2
Update SortableList
jasonvarga Jan 9, 2025
8d20f2e
Unused prop was causing warning
jasonvarga Jan 9, 2025
47414d1
Make collection listing work
jasonvarga Jan 9, 2025
b805480
Fieldtypes ...
jasonvarga Jan 9, 2025
3de1062
Revert and refactor global component registration to match how fieldt…
jasonvarga Jan 9, 2025
a333a23
Incorrect find replace from 6ac97506
jasonvarga Jan 9, 2025
0ffa27f
Should have been functions
jasonvarga Jan 9, 2025
e6446f5
Add __ as a global property so it can be used in vue component templates
jasonvarga Jan 9, 2025
72c8595
Remove filters ...
jasonvarga Jan 9, 2025
84d1477
Forgot to remove this
jasonvarga Jan 9, 2025
5bafa69
Bring across can method
jasonvarga Jan 9, 2025
b99ec09
Fix field actions
jasonvarga Jan 9, 2025
c4eb27d
Bring back callbacks
jasonvarga Jan 10, 2025
db8c24a
Axios request cancelling is done like this now
jasonvarga Jan 10, 2025
1baf70d
Disable portals for now to prevent error
jasonvarga Jan 10, 2025
331b880
Disable toast for now to prevent error
jasonvarga Jan 10, 2025
0eb182a
Disable popover here for now to prevent error
jasonvarga Jan 10, 2025
6605274
Vue.set and delete is no longer supported or necessary
jasonvarga Jan 10, 2025
3f6c041
Avoid more global Vue usage. 6ac97506
jasonvarga Jan 10, 2025
09fe9ba
Avoid moment on global Vue. It's available as $moment
jasonvarga Jan 10, 2025
a116d26
Fix listing rendering. domProps are now flattened.
jasonvarga Jan 10, 2025
ee1616b
Define emitted events
jasonvarga Jan 10, 2025
fe9d8b0
Prevent infinite loops on publish forms in validation mixin
jasonvarga Jan 10, 2025
9b47e54
Use provide inject instead of tree traversal. parent.constructor.name…
jasonvarga Jan 10, 2025
f519b8a
Bring back dirty state as a composable
jasonvarga Jan 10, 2025
c3afd2b
Expose Statamic.$preferences - only this.$preferences was working.
jasonvarga Jan 10, 2025
4d78293
Bring back Statamic.user
jasonvarga Jan 10, 2025
ff67ebf
Fix element container
jasonvarga Jan 10, 2025
0173660
There's no concept of a sidebar in a configuration publish form ...
jasonvarga Jan 10, 2025
987e986
Fix a handful of publish related warnings. Slots, events, missing pro…
jasonvarga Jan 10, 2025
25c239c
Statamic.darkMode
jasonvarga Jan 10, 2025
8030250
Fix date fieldtype ...
jasonvarga Jan 10, 2025
101d308
Bring back and fix $slugs ...
jasonvarga Jan 10, 2025
b76b3a3
Fix widget
jasonvarga Jan 13, 2025
aa6add8
shh its fine
jasonvarga Jan 13, 2025
b03a1aa
Fix portals, stacks, popovers, dropdown list, and $wait ...
jasonvarga Jan 13, 2025
72c272a
Fix dropdown list and popover classes ...
jasonvarga Jan 13, 2025
32ad138
Fix slug fieldtype and slugify component ...
jasonvarga Jan 13, 2025
41a8d6d
Always get the first element of a datalist
jasonvarga Jan 13, 2025
b958a8d
text/textarea updates
jasonvarga Jan 13, 2025
1b88b18
Port toasts ...
jasonvarga Jan 13, 2025
10ce6d6
Fix hooks
jasonvarga Jan 14, 2025
f1b1f6f
Fix entry publish form and live preview
jasonvarga Jan 14, 2025
2333e38
Prevent radio fieldtype input event bubbling up and fix save button o…
jasonvarga Jan 14, 2025
31d7eab
These should have been update not updated in order for v-model to work
jasonvarga Jan 14, 2025
b13679b
Fix width fieldtype and component
jasonvarga Jan 14, 2025
ffc90d4
Update uids for vue3
jasonvarga Jan 14, 2025
b677df1
List emits in fieldtype mixin
jasonvarga Jan 14, 2025
2be8a74
Fix select fieldtype and mixin ...
jasonvarga Jan 14, 2025
eb28fd0
Fix blueprint builder
jasonvarga Jan 14, 2025
c88ae90
Bring over v-select customizations
jasonvarga Jan 14, 2025
5d95feb
Modals ...
jasonvarga Jan 14, 2025
c287699
Fix asset browser ...
jasonvarga Jan 14, 2025
8b3cc97
Fix conditions and select input
jasonvarga Jan 15, 2025
cb76f5a
slot-scope changes
jasonvarga Jan 15, 2025
7ad9529
Remove unused prop causing warning
jasonvarga Jan 15, 2025
ca20fba
Fix integer fieldtype
jasonvarga Jan 15, 2025
f2fb28d
Bring over __n, the last of the mixins
jasonvarga Jan 15, 2025
fa4c291
Render first element in container ...
jasonvarga Jan 15, 2025
ec24b05
Page trees wip (collection pages, navs)
jasonvarga Jan 15, 2025
c115ea4
Merge branch 'master' into vue-3-upgrade
jasonvarga Jan 22, 2025
d2f8e54
Fix nav page editor not applying changes the second time you open a p…
jasonvarga Jan 22, 2025
60e4628
Use vue 3 lifecycle hooks
jasonvarga Jan 22, 2025
8b2c5a1
Avoid reactivity in portals, which fixes error when closing/destroyin…
jasonvarga Jan 23, 2025
d63327d
Update usages of this.$set()
jasonvarga Jan 24, 2025
2a1dca2
Expose axios itself through $axios ...
jasonvarga Jan 24, 2025
4f9cd0d
Fix filters ...
jasonvarga Jan 24, 2025
3939035
maintain support for v-model on form-group
jasonvarga Jan 27, 2025
6ff6219
Warning not needed.
jasonvarga Jan 28, 2025
770d27c
Remove debug
jasonvarga Jan 28, 2025
70d5c0f
Fix a bunch of fieldtypes
jasonvarga Jan 28, 2025
525d443
Prevent double adding
jasonvarga Jan 28, 2025
b6fd8db
Expect click event so it doesn't trigger twice (second time is for th…
jasonvarga Jan 28, 2025
a82ac00
Portal components use teleport instead of portal-vue ...
jasonvarga Jan 28, 2025
bd3f6d5
Fix markdown and code fieldtypes ...
jasonvarga Jan 28, 2025
a8e1a35
Fix bard
jasonvarga Jan 28, 2025
8e2fbec
Fix replicator set toggle
jasonvarga Jan 28, 2025
6ea1afa
Fix assets fieldtype
jasonvarga Jan 28, 2025
9c5d886
Port booting and booted callbacks
jasonvarga Jan 28, 2025
77256ee
Expose Vue on window so addons etc can use the same instance
jasonvarga Jan 29, 2025
d7bcf62
Fix $components api
jasonvarga Jan 29, 2025
c5eac04
Port field conditions
jasonvarga Jan 29, 2025
485eb6e
Statamic.user should be a property
jasonvarga Jan 29, 2025
3da4667
Keep Statamic.component() working
jasonvarga Jan 29, 2025
a114f30
Bring over $reveal as a todo.
jasonvarga Jan 29, 2025
9e86a34
Blindly bring over echo
jasonvarga Jan 29, 2025
9e74bf8
Fix prop/event
jasonvarga Jan 29, 2025
75c31da
Fix usage when not in a publish container
jasonvarga Jan 29, 2025
9f26e7b
Get JS tests running
jasonvarga Jan 29, 2025
ebd97b4
Fix
jasonvarga Jan 30, 2025
738e2ce
Emit to prevent warning
jasonvarga Jan 30, 2025
8d7d3ee
Tree fixes ...
jasonvarga Jan 30, 2025
f1b2cdc
Emit to prevent warning
jasonvarga Jan 30, 2025
46a9c81
Fix field display fieldtype by providing functions instead of needing…
jasonvarga Jan 30, 2025
60a5505
Fix dropdown
jasonvarga Jan 30, 2025
cdae919
Emit to prevent warnings
jasonvarga Jan 30, 2025
b26af08
Update the two usages of publish-container that use v-model
jasonvarga Jan 30, 2025
cb00b2d
Port $permissions
jasonvarga Jan 30, 2025
7874361
Port appropriate plugins/methods/directives ...
jasonvarga Jan 30, 2025
a50935a
Start Alpine
jasonvarga Jan 30, 2025
09bacfe
Bring over axios defaults
jasonvarga Jan 30, 2025
6b136c6
Bring over mixins that were on the window onto an importable file ...
jasonvarga Jan 30, 2025
b792822
Unused
jasonvarga Jan 30, 2025
c307907
Unused
jasonvarga Jan 30, 2025
26f4209
Everything in here has been ported now
jasonvarga Jan 30, 2025
36ecb87
mitt was unused
jasonvarga Jan 30, 2025
f765374
Unused
jasonvarga Jan 30, 2025
5fe552e
update fieldtype stub
jasonvarga Jan 30, 2025
165b0ba
Unused
jasonvarga Jan 30, 2025
1bb4697
$dirty.names and $progress.names should be functions
jasonvarga Jan 30, 2025
61534a9
extra quote caused an error
jasonvarga Jan 30, 2025
acb232c
npm audit fix
jasonvarga Jan 30, 2025
aeb065a
Upgrade laravel-vite-plugin which fixes an error
jasonvarga Jan 30, 2025
3266398
Upgrade to vite 6
jasonvarga Jan 30, 2025
89ee214
Use :deep syntax to avoid deprecation warning
jasonvarga Jan 30, 2025
f313714
Unused
jasonvarga Jan 31, 2025
20b65a5
Remove old filter usage
jasonvarga Jan 31, 2025
0e3650c
Rework the nav builder ...
jasonvarga Feb 3, 2025
77d8fc5
Rename mainTree to just tree now that there's only one tree
jasonvarga Feb 3, 2025
becd27e
Fix adding sections
jasonvarga Feb 4, 2025
afd90b6
Merge branch 'master' into vue-3-upgrade
jasonvarga Feb 4, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
4 changes: 3 additions & 1 deletion jest.config.js → jest.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,9 @@ module.exports = {
// ],

// A map from regular expressions to module names that allow to stub out resources with a single module
// moduleNameMapper: {},
moduleNameMapper: {
"^@vue/test-utils": "<rootDir>/node_modules/@vue/test-utils/dist/vue-test-utils.cjs.js"
},

// An array of regexp pattern strings, matched against all module paths before considered 'visible' to the module loader
// modulePathIgnorePatterns: [],
Expand Down
6,115 changes: 3,702 additions & 2,413 deletions package-lock.json

Large diffs are not rendered by default.

55 changes: 31 additions & 24 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "statamic",
"type": "module",
"private": true,
"scripts": {
"dev": "rm -rf resources/dist/build && vite",
Expand All @@ -12,13 +13,17 @@
},
"dependencies": {
"@floating-ui/dom": "^1.2.5",
"@floating-ui/vue": "^1.0.6",
"@he-tree/vue": "^2.8.2",
"@hoppscotch/vue-toasted": "^0.1.0",
"@shopify/draggable": "^1.0.0-beta.12",
"@tiptap/core": "^2.0.2",
"@tiptap/extension-blockquote": "^2.0.2",
"@tiptap/extension-bold": "^2.0.2",
"@tiptap/extension-bullet-list": "^2.0.2",
"@tiptap/extension-character-count": "^2.0.2",
"@tiptap/extension-code": "^2.0.2",
"@tiptap/extension-code-block": "^2.4.0",
"@tiptap/extension-code-block-lowlight": "^2.0.2",
"@tiptap/extension-document": "^2.0.2",
"@tiptap/extension-dropcursor": "^2.0.2",
Expand All @@ -44,60 +49,62 @@
"@tiptap/extension-typography": "^2.0.2",
"@tiptap/extension-underline": "^2.0.2",
"@tiptap/pm": "^2.0.2",
"@tiptap/vue-2": "^2.0.2",
"@tiptap/vue-3": "^2.4.0",
"alpinejs": "^3.1.1",
"autosize": "~3.0.12",
"axios": "^1.7.4",
"autosize": "~6.0.1",
"axios": "^1.6.0",
"body-scroll-lock": "^4.0.0-beta.0",
"codemirror": "^5.58.2",
"codemirror": "5.65.12",
"cookies-js": "^1.2.2",
"floating-vue": "^1.0.0-beta.19",
"floating-vue": "^5.2.2",
"fuse.js": "^7.0.0",
"highlight.js": "^11.7.0",
"imask": "^6.6.0-alpha.0",
"imask": "^7.6.1",
"laravel-echo": "^1.16.0",
"lowlight": "^2.8.1",
"marked": "^4.0.10",
"lowlight": "^3.1.0",
"marked": "^13.0.0",
"marked-plaintext": "0.0.2",
"moment": "^2.29.4",
"mousetrap": "~1.5.3",
"mousetrap": "~1.6.5",
"nprogress": "^0.2.0",
"pdfobject": "^2.2.7",
"portal-vue": "^1.5.1",
"portal-vue": "^3.0.0",
"pretty": "^2.0.0",
"pusher-js": "^4.4.0",
"pusher-js": "^8.4.0-rc2",
"qs": "^6.9.7",
"read-time-estimate": "0.0.2",
"read-time-estimate": "0.0.3",
"resize-observer-polyfill": "^1.5.1",
"speakingurl": "^14.0.1",
"striptags": "^3.2.0",
"svgo": "^3.0.0",
"tiny-emitter": "^2.1.0",
"underscore": "~1.13.2",
"uniqid": "^5.2.0",
"upload": "^1.3.2",
"v-calendar": "^2.3.0",
"v-calendar": "^3.1.2",
"validator": "^13.7.0",
"vue": "^2.7.14",
"vue-clickaway": "~2.2.2",
"vue-draggable-nested-tree": "^2.3.0-beta.1",
"vue-js-modal": "^2.0.1",
"vue-select": "^3.10.1",
"vue-toasted": "^1.1.27",
"vuex": "^3.1.2"
"vite-svg-loader": "^5.1.0",
"vue": "^3.4.27",
"vue-final-modal": "^4.5.4",
"vue-screen-utils": "^1.0.0-beta.13",
"vue-select": "4.0.0-beta.6",
"vue3-click-away": "^1.2.4",
"vuex": "^4.1.0"
},
"devDependencies": {
"@babel/preset-env": "^7.20.2",
"@rollup/plugin-inject": "^5.0.3",
"@tailwindcss/container-queries": "^0.1.0",
"@tailwindcss/typography": "^0.5.9",
"@vitejs/plugin-vue2": "^2.2.0",
"@vitejs/plugin-vue": "^5.2.1",
"@vue/test-utils": "^2.4.6",
"autoprefixer": "^10.4.0",
"cross-env": "^5.2.1",
"cross-env": "^7.0.3",
"jest": "^29.4.2",
"jest-environment-jsdom": "^29.4.2",
"laravel-vite-plugin": "^0.7.2",
"laravel-vite-plugin": "^1.2.0",
"postcss": "^8.4.31",
"tailwindcss": "^3.3.0",
"vite": "^4.5.5"
"vite": "^6.0"
}
}
File renamed without changes.
11 changes: 6 additions & 5 deletions resources/css/components/fieldtypes/datetime.css
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,14 @@
@apply flex;
}

/* Remove style from datepicker in popover since the popover has them. */
.popover-content .vc-container {
@apply border-none bg-none;
/* VCalendar dark mode background */
.vc-container, .vc-date-picker-content {
@apply dark:bg-dark-500 dark:border-dark-700;
}

.vc-container.vc-is-dark {
@apply dark:bg-transparent;
/* VCalendar dark mode year/month popover */
.vc-nav-popover-container {
@apply dark:bg-dark-700 dark:border-dark-900;
}

/* Time Field
Expand Down
7 changes: 4 additions & 3 deletions resources/css/components/modal.css
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
/* ==========================================================================
MODALS
========================================================================== */
.vm--container {
.vfm {
direction: ltr;
}

.vm--modal {
.vfm__content {
@apply rounded-lg dark:bg-dark-600 dark:shadow-dark !important;
@apply bg-white shadow-2xl overflow-clip;

[dir='rtl'] & {
direction: rtl;
}
}

.vm--overlay {
.vfm__overlay {
background: hsla(210, 20%, 10%, .15) !important;
}

Expand Down
22 changes: 1 addition & 21 deletions resources/css/components/page-tree.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
@apply dark:mb-1;
}

.tree-node-inner {
.page-tree-branch {
@apply relative text-xs bg-white shadow rounded;
@apply dark:bg-dark-600 dark:shadow-dark;

Expand All @@ -17,13 +17,6 @@
@apply dark:mt-1;
}

.draggable-placeholder-inner {
border: 1px dashed #0088F8;
background: rgba(0, 136, 249, 0.09);

* { display: none; }
}

.page-move {
@apply w-6 rtl:border-l ltr:border-r rtl:rounded-r ltr:rounded-l dark:text-dark-175 dark:border-dark-900;
cursor: grab;
Expand All @@ -44,16 +37,3 @@
@apply flex w-6 rtl:rounded-r ltr:rounded-l items-center rtl:border-l ltr:border-r dark:border-dark-900;
}
}

.page-tree-with-sections {
> .tree-node > .tree-node-children > .tree-node {
@apply mb-8;
}

.section-placeholder-inner {
@apply rounded;
border: 1px dashed #0088F8;
background: rgba(0, 136, 249, 0.09);
min-height: 42px;
}
}
Loading