From ada1f3a623057dbf669488540b3bb6afbe929d03 Mon Sep 17 00:00:00 2001 From: Nate Ferrero Date: Thu, 19 Sep 2024 16:37:16 -0400 Subject: [PATCH 1/3] react 17 --- apps/react17/app.tsx | 116 +++++++ apps/react17/index.html | 7 + apps/react17/main.tsx | 12 + apps/react17/package.json | 23 ++ apps/react17/utils/document.ts | 6 + apps/react17/utils/sheet.ts | 58 ++++ apps/react17/utils/workbook.ts | 15 + apps/react17/vite.config.ts | 10 + package-lock.json | 583 ++++++++++++++++++++++++++++++++- 9 files changed, 823 insertions(+), 7 deletions(-) create mode 100644 apps/react17/app.tsx create mode 100644 apps/react17/index.html create mode 100644 apps/react17/main.tsx create mode 100644 apps/react17/package.json create mode 100644 apps/react17/utils/document.ts create mode 100644 apps/react17/utils/sheet.ts create mode 100644 apps/react17/utils/workbook.ts create mode 100644 apps/react17/vite.config.ts diff --git a/apps/react17/app.tsx b/apps/react17/app.tsx new file mode 100644 index 00000000..81584931 --- /dev/null +++ b/apps/react17/app.tsx @@ -0,0 +1,116 @@ +import { + Document, + FlatfileProvider, + Sheet, + Space, + useFlatfile, + useListener, + Workbook, +} from '@flatfile/react' +import React, { useCallback } from 'react' +import { document } from './utils/document' +import { workbook } from './utils/workbook' + +import { recordHook } from '@flatfile/plugin-record-hook' + +const S: (props: any) => null = Sheet as any +const FP: (props: any) => null = FlatfileProvider as any + +export default function App() { + return ( + + + + ) +} + +function Portal() { + const logClosed = useCallback(() => { + console.log(`Flatfile Portal closed`) + }, []) + + useListener((client) => { + client.use( + recordHook('contacts2', (record) => { + const firstName = record.get('firstName') + console.log({ firstName }) + + record.set('lastName', 'Rocks') + return record + }) + ) + }, []) + + const { openPortal } = useFlatfile({ onClose: logClosed }) + + return ( + <> + + + + { + console.log('on Workbook Submit ', { sheet }) + }} + onRecordHooks={[ + [ + (record) => { + record.set('email', 'SHEET 1 RECORDHOOKS') + return record + }, + ], + [ + (record) => { + record.set('email', 'SHEET 2 RECORDHOOKS') + return record + }, + ], + ]} + > + { + record.set('email', 'SHEET 3 RECORDHOOK') + return record + }} + onSubmit={async (sheet) => { + console.log('onSubmit from Sheet 3', { sheet }) + }} + /> + { + record.set('email', 'SHEET 4 RECORDHOOK') + return record + }} + onSubmit={(sheet) => { + console.log('onSubmit from Sheet 4', { sheet }) + }} + /> + + + + ) +} diff --git a/apps/react17/index.html b/apps/react17/index.html new file mode 100644 index 00000000..9c72eb32 --- /dev/null +++ b/apps/react17/index.html @@ -0,0 +1,7 @@ + + React 17 + + + +
+ diff --git a/apps/react17/main.tsx b/apps/react17/main.tsx new file mode 100644 index 00000000..3bc0a4b1 --- /dev/null +++ b/apps/react17/main.tsx @@ -0,0 +1,12 @@ +import React, { version as ReactVersion } from 'react' +import ReactDOM from 'react-dom' + +import App from './App' + +ReactDOM.render( + <> +

Hello world, I am React {ReactVersion}

+ + , + document.getElementById('root') +) diff --git a/apps/react17/package.json b/apps/react17/package.json new file mode 100644 index 00000000..0b7a0369 --- /dev/null +++ b/apps/react17/package.json @@ -0,0 +1,23 @@ +{ + "name": "react-17-example", + "version": "0.0.0", + "private": true, + "scripts": { + "dev": "vite", + "build": "vite build", + "serve": "vite preview" + }, + "dependencies": { + "@flatfile/api": "*", + "@flatfile/react": "*", + "@flatfile/plugin-record-hook": "*", + "react": "^17.0.2", + "react-dom": "^17.0.2" + }, + "devDependencies": { + "vite": "^2.6.14", + "@vitejs/plugin-react": "^1.0.0", + "@types/react": "^17.0.2", + "@types/react-dom": "^17.0.2" + } +} diff --git a/apps/react17/utils/document.ts b/apps/react17/utils/document.ts new file mode 100644 index 00000000..1ea6d54e --- /dev/null +++ b/apps/react17/utils/document.ts @@ -0,0 +1,6 @@ +import { Flatfile } from '@flatfile/api' + +export const document: Flatfile.DocumentConfig = { + title: 'Carry On My Wayward Son - A Markdown Journey', + body: "# Carry On My Wayward Son - A Markdown Journey\n\n## Introduction\n\"Carry On My Wayward Son\" is a classic rock song by Kansas, released in 1976. It has become an anthem for generations, known for its powerful melody, intricate harmonies, and meaningful lyrics.\n\n![Carry On My Wayward Son Album Cover](https://example.com/album-cover.jpg)\n\n## Lyrics Analysis\n\n### Verse 1\n```\nCarry on my wayward son,\nThere'll be peace when you are done.\nLay your weary head to rest,\nDon't you cry no more.\n```\nThis verse speaks to the universal journey of finding peace through trials and tribulations. The song immediately addresses the listener or \"wayward son,\" encouraging perseverance and hope.\n\n### Chorus\n```\nMasquerading as a man with a reason,\nMy charade is the event of the season.\nAnd if I claim to be a wise man, it surely means that I don't know.\n```\nThe chorus delves into themes of identity, purpose, and the humility in acknowledging one's limitations.\n\n## Interpretations\n\n- **Personal Growth:** The song is often seen as a metaphor for personal development and the struggles one faces along the way.\n- **Spiritual Journey:** Some interpret it as a spiritual quest towards enlightenment or peace.\n\n## Guitar Solo Analysis\n\nThe iconic guitar solo of the song represents a climax in the musical journey, mirroring the emotional and spiritual ascent of the lyrics.\n\n```python\n# Example Python code to play a simple melody\nnotes = ['G', 'B', 'D', 'F#', 'G', 'D', 'B', 'G']\nfor note in notes:\n play(note)\n```\n\n## Historical Context\n\n| Year | Event |\n|------|----------------------------------------------|\n| 1976 | Song released on the album *Leftoverture*. |\n| 1977 | Reached No. 11 on the Billboard Hot 100. |\n| 2000s| Became a cultural icon, featured in TV shows.|\n\n## Notable Covers and Uses\n\n- **TV Series**: \"Supernatural\" famously used the song in several episodes, enhancing its cultural significance.\n- **Live Performances**: Kansas continues to perform this song, captivating audiences worldwide.\n\n## Conclusion\n\n\"Carry On My Wayward Son\" remains a timeless piece, resonating with audiences for its profound lyrics and dynamic composition. It encourages listeners to persevere through hardships, promising peace and rest at the journey's end.\n\n> \"A song that encapsulates the essence of human struggle and the hope for a better tomorrow.\"\n\n## References\n\n- [Kansas Official Website](https://www.kansasband.com)\n- [Lyrics Analysis](https://www.genius.com/Kansas-carry-on-my-wayward-son-lyrics)\n- [Song Facts](https://www.songfacts.com/facts/kansas/carry-on-wayward-son)\n" +} diff --git a/apps/react17/utils/sheet.ts b/apps/react17/utils/sheet.ts new file mode 100644 index 00000000..4f8a84e9 --- /dev/null +++ b/apps/react17/utils/sheet.ts @@ -0,0 +1,58 @@ +import { Flatfile } from '@flatfile/api' + +export const sheet: Flatfile.SheetConfig = { + name: 'Contacts', + slug: 'contacts', + fields: [ + { + key: 'firstName', + type: 'string', + label: 'First Name', + config: undefined, + } as Flatfile.Property.String, + { + key: 'lastName', + type: 'string', + label: 'Last Name', + config: undefined, + } as Flatfile.Property.String, + { + key: 'email', + type: 'string', + label: 'Email', + config: undefined, + } as Flatfile.Property.String, + { + key: 'status', + type: 'enum', + label: 'Status', + config: { + allowCustom: true, + options: [ + { + value: 'blocked', + label: 'Blocked', + }, + { + value: 'in-progress', + label: 'In Progress', + }, + { + value: 'completed', + label: 'Completed', + }, + ], + }, + }, + ], + allowAdditionalFields: true, + actions: [ + { + operation: 'submitActionFg', + mode: 'background', + label: 'Submit foreground', + description: 'Submit data to webhook.site', + primary: true, + }, + ], +} diff --git a/apps/react17/utils/workbook.ts b/apps/react17/utils/workbook.ts new file mode 100644 index 00000000..69b74b94 --- /dev/null +++ b/apps/react17/utils/workbook.ts @@ -0,0 +1,15 @@ +import { Flatfile } from '@flatfile/api' +import { sheet } from './sheet' +const sheet2 = { ...sheet, name: 'Contacts 2', slug: 'contacts2' } +export const workbook: Flatfile.CreateWorkbookConfig = { + name: 'Contacts', + sheets: [sheet, sheet2], + actions: [ + { + operation: 'submitActionFg', + mode: 'background', + label: 'Submit background', + description: 'Submit data to webhook.site', + }, + ], +} diff --git a/apps/react17/vite.config.ts b/apps/react17/vite.config.ts new file mode 100644 index 00000000..3027546d --- /dev/null +++ b/apps/react17/vite.config.ts @@ -0,0 +1,10 @@ +import { defineConfig } from 'vite' +import react from '@vitejs/plugin-react' + +// https://vitejs.dev/config/ +export default defineConfig({ + plugins: [react], + build: { + sourcemap: 'inline', + }, +}) diff --git a/package-lock.json b/package-lock.json index 97bd89ac..891f16a8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,6 @@ "cfg/*" ], "dependencies": { - "@flatfile/changelog": "1.0.3", "esbuild-loader": "^2.20.0", "rollup": "^2.79.1" }, @@ -193,6 +192,181 @@ "url": "https://opencollective.com/eslint" } }, + "apps/react17": { + "name": "react-17-example", + "version": "0.0.0", + "dependencies": { + "@flatfile/api": "*", + "@flatfile/plugin-record-hook": "*", + "@flatfile/react": "*", + "react": "^17.0.2", + "react-dom": "^17.0.2" + }, + "devDependencies": { + "@types/react": "^17.0.2", + "@types/react-dom": "^17.0.2", + "@vitejs/plugin-react": "^1.0.0", + "vite": "^2.6.14" + } + }, + "apps/react17/node_modules/@esbuild/linux-loong64": { + "version": "0.14.54", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.14.54.tgz", + "integrity": "sha512-bZBrLAIX1kpWelV0XemxBZllyRmM6vgFQQG2GdNb+r3Fkp0FOh1NJSvekXDs7jq70k4euu1cryLMfU+mTXlEpw==", + "cpu": [ + "loong64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "apps/react17/node_modules/@types/react": { + "version": "17.0.82", + "resolved": "https://registry.npmjs.org/@types/react/-/react-17.0.82.tgz", + "integrity": "sha512-wTW8Lu/PARGPFE8tOZqCvprOKg5sen/2uS03yKn2xbCDFP9oLncm7vMDQ2+dEQXHVIXrOpW6u72xUXEXO0ypSw==", + "dev": true, + "dependencies": { + "@types/prop-types": "*", + "@types/scheduler": "^0.16", + "csstype": "^3.0.2" + } + }, + "apps/react17/node_modules/@types/react-dom": { + "version": "17.0.25", + "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-17.0.25.tgz", + "integrity": "sha512-urx7A7UxkZQmThYA4So0NelOVjx3V4rNFVJwp0WZlbIK5eM4rNJDiN3R/E9ix0MBh6kAEojk/9YL+Te6D9zHNA==", + "dev": true, + "dependencies": { + "@types/react": "^17" + } + }, + "apps/react17/node_modules/esbuild": { + "version": "0.14.54", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.14.54.tgz", + "integrity": "sha512-Cy9llcy8DvET5uznocPyqL3BFRrFXSVqbgpMJ9Wz8oVjZlh/zUSNbPRbov0VX7VxN2JH1Oa0uNxZ7eLRb62pJA==", + "dev": true, + "hasInstallScript": true, + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/linux-loong64": "0.14.54", + "esbuild-android-64": "0.14.54", + "esbuild-android-arm64": "0.14.54", + "esbuild-darwin-64": "0.14.54", + "esbuild-darwin-arm64": "0.14.54", + "esbuild-freebsd-64": "0.14.54", + "esbuild-freebsd-arm64": "0.14.54", + "esbuild-linux-32": "0.14.54", + "esbuild-linux-64": "0.14.54", + "esbuild-linux-arm": "0.14.54", + "esbuild-linux-arm64": "0.14.54", + "esbuild-linux-mips64le": "0.14.54", + "esbuild-linux-ppc64le": "0.14.54", + "esbuild-linux-riscv64": "0.14.54", + "esbuild-linux-s390x": "0.14.54", + "esbuild-netbsd-64": "0.14.54", + "esbuild-openbsd-64": "0.14.54", + "esbuild-sunos-64": "0.14.54", + "esbuild-windows-32": "0.14.54", + "esbuild-windows-64": "0.14.54", + "esbuild-windows-arm64": "0.14.54" + } + }, + "apps/react17/node_modules/react": { + "version": "17.0.2", + "resolved": "https://registry.npmjs.org/react/-/react-17.0.2.tgz", + "integrity": "sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA==", + "dependencies": { + "loose-envify": "^1.1.0", + "object-assign": "^4.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "apps/react17/node_modules/react-dom": { + "version": "17.0.2", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-17.0.2.tgz", + "integrity": "sha512-s4h96KtLDUQlsENhMn1ar8t2bEa+q/YAtj8pPPdIjPDGBDIVNsrD9aXNWqspUe6AzKCIG0C1HZZLqLV7qpOBGA==", + "dependencies": { + "loose-envify": "^1.1.0", + "object-assign": "^4.1.1", + "scheduler": "^0.20.2" + }, + "peerDependencies": { + "react": "17.0.2" + } + }, + "apps/react17/node_modules/rollup": { + "version": "2.77.3", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.77.3.tgz", + "integrity": "sha512-/qxNTG7FbmefJWoeeYJFbHehJ2HNWnjkAFRKzWN/45eNBBF/r8lo992CwcJXEzyVxs5FmfId+vTSTQDb+bxA+g==", + "dev": true, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=10.0.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "apps/react17/node_modules/scheduler": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.20.2.tgz", + "integrity": "sha512-2eWfGgAqqWFGqtdMmcL5zCMK1U8KlXv8SQFGglL3CEtd0aDVDWgeF/YoCmvln55m5zSk3J/20hTaSBeSObsQDQ==", + "dependencies": { + "loose-envify": "^1.1.0", + "object-assign": "^4.1.1" + } + }, + "apps/react17/node_modules/vite": { + "version": "2.9.18", + "resolved": "https://registry.npmjs.org/vite/-/vite-2.9.18.tgz", + "integrity": "sha512-sAOqI5wNM9QvSEE70W3UGMdT8cyEn0+PmJMTFvTB8wB0YbYUWw3gUbY62AOyrXosGieF2htmeLATvNxpv/zNyQ==", + "dev": true, + "dependencies": { + "esbuild": "^0.14.27", + "postcss": "^8.4.13", + "resolve": "^1.22.0", + "rollup": ">=2.59.0 <2.78.0" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": ">=12.2.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + }, + "peerDependencies": { + "less": "*", + "sass": "*", + "stylus": "*" + }, + "peerDependenciesMeta": { + "less": { + "optional": true + }, + "sass": { + "optional": true + }, + "stylus": { + "optional": true + } + } + }, "apps/sandbox": { "name": "@private/sandbox", "version": "1.0.6", @@ -2341,6 +2515,36 @@ "@babel/core": "^7.0.0-0" } }, + "node_modules/@babel/plugin-transform-react-jsx-self": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-self/-/plugin-transform-react-jsx-self-7.24.7.tgz", + "integrity": "sha512-fOPQYbGSgH0HUp4UJO4sMBFjY6DuWq+2i8rixyUMb3CdGixs/gccURvYOAhajBdKDoGajFr3mUq5rH3phtkGzw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-react-jsx-source": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.24.7.tgz", + "integrity": "sha512-J2z+MWzZHVOemyLweMqngXrgGC42jQ//R0KdxqkIz/OrbVIIlhFI3WigZ5fO+nwFvBlncr4MGapd8vTyc7RPNQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, "node_modules/@babel/plugin-transform-react-pure-annotations": { "version": "7.24.7", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-pure-annotations/-/plugin-transform-react-pure-annotations-7.24.7.tgz", @@ -9224,6 +9428,47 @@ "vite": "^3.0.0 || ^4.0.0" } }, + "node_modules/@vitejs/plugin-react": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-1.3.2.tgz", + "integrity": "sha512-aurBNmMo0kz1O4qRoY+FM4epSA39y3ShWGuqfLRA/3z0oEJAdtoSfgA3aO98/PCCHAqMaduLxIxErWrVKIFzXA==", + "dev": true, + "dependencies": { + "@babel/core": "^7.17.10", + "@babel/plugin-transform-react-jsx": "^7.17.3", + "@babel/plugin-transform-react-jsx-development": "^7.16.7", + "@babel/plugin-transform-react-jsx-self": "^7.16.7", + "@babel/plugin-transform-react-jsx-source": "^7.16.7", + "@rollup/pluginutils": "^4.2.1", + "react-refresh": "^0.13.0", + "resolve": "^1.22.0" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/@vitejs/plugin-react/node_modules/@rollup/pluginutils": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-4.2.1.tgz", + "integrity": "sha512-iKnFXr7NkdZAIHiIWE+BX5ULi/ucVFYWD6TbAV+rZctiRTY2PL6tsIKhoIOaoskiWAkgu+VsbXgUVDNLHf+InQ==", + "dev": true, + "dependencies": { + "estree-walker": "^2.0.1", + "picomatch": "^2.2.2" + }, + "engines": { + "node": ">= 8.0.0" + } + }, + "node_modules/@vitejs/plugin-react/node_modules/react-refresh": { + "version": "0.13.0", + "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.13.0.tgz", + "integrity": "sha512-XP8A9BT0CpRBD+NYLLeIhld/RqG9+gktUjW1FkE+Vm7OCinbG1SshcK5tb9ls4kzvjZr9mOQc7HYgBngEyPAXg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/@volar/language-core": { "version": "1.11.1", "resolved": "https://registry.npmjs.org/@volar/language-core/-/language-core-1.11.1.tgz", @@ -14075,6 +14320,230 @@ "@esbuild/win32-x64": "0.16.17" } }, + "node_modules/esbuild-android-64": { + "version": "0.14.54", + "resolved": "https://registry.npmjs.org/esbuild-android-64/-/esbuild-android-64-0.14.54.tgz", + "integrity": "sha512-Tz2++Aqqz0rJ7kYBfz+iqyE3QMycD4vk7LBRyWaAVFgFtQ/O8EJOnVmTOiDWYZ/uYzB4kvP+bqejYdVKzE5lAQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-android-arm64": { + "version": "0.14.54", + "resolved": "https://registry.npmjs.org/esbuild-android-arm64/-/esbuild-android-arm64-0.14.54.tgz", + "integrity": "sha512-F9E+/QDi9sSkLaClO8SOV6etqPd+5DgJje1F9lOWoNncDdOBL2YF59IhsWATSt0TLZbYCf3pNlTHvVV5VfHdvg==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-darwin-64": { + "version": "0.14.54", + "resolved": "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.14.54.tgz", + "integrity": "sha512-jtdKWV3nBviOd5v4hOpkVmpxsBy90CGzebpbO9beiqUYVMBtSc0AL9zGftFuBon7PNDcdvNCEuQqw2x0wP9yug==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-darwin-arm64": { + "version": "0.14.54", + "resolved": "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.54.tgz", + "integrity": "sha512-OPafJHD2oUPyvJMrsCvDGkRrVCar5aVyHfWGQzY1dWnzErjrDuSETxwA2HSsyg2jORLY8yBfzc1MIpUkXlctmw==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-freebsd-64": { + "version": "0.14.54", + "resolved": "https://registry.npmjs.org/esbuild-freebsd-64/-/esbuild-freebsd-64-0.14.54.tgz", + "integrity": "sha512-OKwd4gmwHqOTp4mOGZKe/XUlbDJ4Q9TjX0hMPIDBUWWu/kwhBAudJdBoxnjNf9ocIB6GN6CPowYpR/hRCbSYAg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-freebsd-arm64": { + "version": "0.14.54", + "resolved": "https://registry.npmjs.org/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.14.54.tgz", + "integrity": "sha512-sFwueGr7OvIFiQT6WeG0jRLjkjdqWWSrfbVwZp8iMP+8UHEHRBvlaxL6IuKNDwAozNUmbb8nIMXa7oAOARGs1Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-linux-32": { + "version": "0.14.54", + "resolved": "https://registry.npmjs.org/esbuild-linux-32/-/esbuild-linux-32-0.14.54.tgz", + "integrity": "sha512-1ZuY+JDI//WmklKlBgJnglpUL1owm2OX+8E1syCD6UAxcMM/XoWd76OHSjl/0MR0LisSAXDqgjT3uJqT67O3qw==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-linux-64": { + "version": "0.14.54", + "resolved": "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.14.54.tgz", + "integrity": "sha512-EgjAgH5HwTbtNsTqQOXWApBaPVdDn7XcK+/PtJwZLT1UmpLoznPd8c5CxqsH2dQK3j05YsB3L17T8vE7cp4cCg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-linux-arm": { + "version": "0.14.54", + "resolved": "https://registry.npmjs.org/esbuild-linux-arm/-/esbuild-linux-arm-0.14.54.tgz", + "integrity": "sha512-qqz/SjemQhVMTnvcLGoLOdFpCYbz4v4fUo+TfsWG+1aOu70/80RV6bgNpR2JCrppV2moUQkww+6bWxXRL9YMGw==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-linux-arm64": { + "version": "0.14.54", + "resolved": "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.14.54.tgz", + "integrity": "sha512-WL71L+0Rwv+Gv/HTmxTEmpv0UgmxYa5ftZILVi2QmZBgX3q7+tDeOQNqGtdXSdsL8TQi1vIaVFHUPDe0O0kdig==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-linux-mips64le": { + "version": "0.14.54", + "resolved": "https://registry.npmjs.org/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.14.54.tgz", + "integrity": "sha512-qTHGQB8D1etd0u1+sB6p0ikLKRVuCWhYQhAHRPkO+OF3I/iSlTKNNS0Lh2Oc0g0UFGguaFZZiPJdJey3AGpAlw==", + "cpu": [ + "mips64el" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-linux-ppc64le": { + "version": "0.14.54", + "resolved": "https://registry.npmjs.org/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.14.54.tgz", + "integrity": "sha512-j3OMlzHiqwZBDPRCDFKcx595XVfOfOnv68Ax3U4UKZ3MTYQB5Yz3X1mn5GnodEVYzhtZgxEBidLWeIs8FDSfrQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-linux-riscv64": { + "version": "0.14.54", + "resolved": "https://registry.npmjs.org/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.14.54.tgz", + "integrity": "sha512-y7Vt7Wl9dkOGZjxQZnDAqqn+XOqFD7IMWiewY5SPlNlzMX39ocPQlOaoxvT4FllA5viyV26/QzHtvTjVNOxHZg==", + "cpu": [ + "riscv64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-linux-s390x": { + "version": "0.14.54", + "resolved": "https://registry.npmjs.org/esbuild-linux-s390x/-/esbuild-linux-s390x-0.14.54.tgz", + "integrity": "sha512-zaHpW9dziAsi7lRcyV4r8dhfG1qBidQWUXweUjnw+lliChJqQr+6XD71K41oEIC3Mx1KStovEmlzm+MkGZHnHA==", + "cpu": [ + "s390x" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, "node_modules/esbuild-loader": { "version": "2.21.0", "resolved": "https://registry.npmjs.org/esbuild-loader/-/esbuild-loader-2.21.0.tgz", @@ -14094,6 +14563,54 @@ "webpack": "^4.40.0 || ^5.0.0" } }, + "node_modules/esbuild-netbsd-64": { + "version": "0.14.54", + "resolved": "https://registry.npmjs.org/esbuild-netbsd-64/-/esbuild-netbsd-64-0.14.54.tgz", + "integrity": "sha512-PR01lmIMnfJTgeU9VJTDY9ZerDWVFIUzAtJuDHwwceppW7cQWjBBqP48NdeRtoP04/AtO9a7w3viI+PIDr6d+w==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-openbsd-64": { + "version": "0.14.54", + "resolved": "https://registry.npmjs.org/esbuild-openbsd-64/-/esbuild-openbsd-64-0.14.54.tgz", + "integrity": "sha512-Qyk7ikT2o7Wu76UsvvDS5q0amJvmRzDyVlL0qf5VLsLchjCa1+IAvd8kTBgUxD7VBUUVgItLkk609ZHUc1oCaw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-sunos-64": { + "version": "0.14.54", + "resolved": "https://registry.npmjs.org/esbuild-sunos-64/-/esbuild-sunos-64-0.14.54.tgz", + "integrity": "sha512-28GZ24KmMSeKi5ueWzMcco6EBHStL3B6ubM7M51RmPwXQGLe0teBGJocmWhgwccA1GeFXqxzILIxXpHbl9Q/Kw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=12" + } + }, "node_modules/esbuild-wasm": { "version": "0.19.12", "resolved": "https://registry.npmjs.org/esbuild-wasm/-/esbuild-wasm-0.19.12.tgz", @@ -14106,6 +14623,54 @@ "node": ">=12" } }, + "node_modules/esbuild-windows-32": { + "version": "0.14.54", + "resolved": "https://registry.npmjs.org/esbuild-windows-32/-/esbuild-windows-32-0.14.54.tgz", + "integrity": "sha512-T+rdZW19ql9MjS7pixmZYVObd9G7kcaZo+sETqNH4RCkuuYSuv9AGHUVnPoP9hhuE1WM1ZimHz1CIBHBboLU7w==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-windows-64": { + "version": "0.14.54", + "resolved": "https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-0.14.54.tgz", + "integrity": "sha512-AoHTRBUuYwXtZhjXZbA1pGfTo8cJo3vZIcWGLiUcTNgHpJJMC1rVA44ZereBHMJtotyN71S8Qw0npiCIkW96cQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-windows-arm64": { + "version": "0.14.54", + "resolved": "https://registry.npmjs.org/esbuild-windows-arm64/-/esbuild-windows-arm64-0.14.54.tgz", + "integrity": "sha512-M0kuUvXhot1zOISQGXwWn6YtS+Y/1RT9WrVIOywZnJHo3jCDyewAc79aKNQWFCQm+xNHVTq9h8dZKvygoXQQRg==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, "node_modules/escalade": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", @@ -25373,6 +25938,10 @@ "node": ">=0.10.0" } }, + "node_modules/react-17-example": { + "resolved": "apps/react17", + "link": true + }, "node_modules/react-dom": { "version": "18.2.0", "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.2.0.tgz", @@ -33595,7 +34164,7 @@ }, "packages/embedded-utils": { "name": "@flatfile/embedded-utils", - "version": "1.3.0", + "version": "1.3.1", "license": "ISC", "dependencies": { "@flatfile/api": "^1.8.9", @@ -33719,10 +34288,10 @@ }, "packages/javascript": { "name": "@flatfile/javascript", - "version": "1.4.1", + "version": "1.4.2", "license": "ISC", "dependencies": { - "@flatfile/embedded-utils": "^1.3.0", + "@flatfile/embedded-utils": "^1.3.1", "@flatfile/listener": "^1.0.4", "@flatfile/plugin-record-hook": "^1.5.2", "i18next": "^23.11.5", @@ -37060,7 +37629,7 @@ }, "packages/react": { "name": "@flatfile/react", - "version": "7.12.1", + "version": "7.12.4", "license": "ISC", "dependencies": { "@flatfile/api": "^1.8.5", @@ -39025,9 +39594,9 @@ }, "packages/vue": { "name": "@flatfile/vue", - "version": "1.0.18", + "version": "1.0.19", "dependencies": { - "@flatfile/embedded-utils": "1.3.0", + "@flatfile/embedded-utils": "1.3.1", "@flatfile/listener": "^1.0.4", "@flatfile/plugin-record-hook": "^1.5.2", "@vue/runtime-dom": "^3.3.4", From f3eb16f2c3aff41c835a51f173811ef541797c90 Mon Sep 17 00:00:00 2001 From: Nate Ferrero Date: Thu, 19 Sep 2024 17:20:55 -0400 Subject: [PATCH 2/3] react 17 upgrade vite and example --- apps/react17/app.tsx | 116 --- apps/react17/index.html | 20 +- apps/react17/main.tsx | 12 - apps/react17/package.json | 18 +- apps/react17/public/vite.svg | 1 + apps/react17/src/App.css | 42 + apps/react17/src/App.tsx | 38 + apps/react17/src/FlatfilePlatform.tsx | 48 + apps/react17/src/assets/react.svg | 1 + apps/react17/src/config.ts | 1 + apps/react17/src/index.css | 68 ++ apps/react17/src/main.tsx | 28 + .../upload-components/ClickableComponent.tsx | 21 + apps/react17/src/upload-components/index.ts | 3 + .../src/upload-components/useListener.ts | 26 + .../src/upload-components/useWorkbook.ts | 53 + apps/react17/src/vite-env.d.ts | 1 + apps/react17/tsconfig.app.json | 27 + apps/react17/tsconfig.json | 11 + apps/react17/tsconfig.node.json | 13 + apps/react17/utils/document.ts | 6 - apps/react17/utils/sheet.ts | 58 -- apps/react17/utils/workbook.ts | 15 - apps/react17/vite.config.ts | 5 +- package-lock.json | 904 ++++++++++-------- 25 files changed, 893 insertions(+), 643 deletions(-) delete mode 100644 apps/react17/app.tsx delete mode 100644 apps/react17/main.tsx create mode 100644 apps/react17/public/vite.svg create mode 100644 apps/react17/src/App.css create mode 100644 apps/react17/src/App.tsx create mode 100644 apps/react17/src/FlatfilePlatform.tsx create mode 100644 apps/react17/src/assets/react.svg create mode 100644 apps/react17/src/config.ts create mode 100644 apps/react17/src/index.css create mode 100644 apps/react17/src/main.tsx create mode 100644 apps/react17/src/upload-components/ClickableComponent.tsx create mode 100644 apps/react17/src/upload-components/index.ts create mode 100644 apps/react17/src/upload-components/useListener.ts create mode 100644 apps/react17/src/upload-components/useWorkbook.ts create mode 100644 apps/react17/src/vite-env.d.ts create mode 100644 apps/react17/tsconfig.app.json create mode 100644 apps/react17/tsconfig.json create mode 100644 apps/react17/tsconfig.node.json delete mode 100644 apps/react17/utils/document.ts delete mode 100644 apps/react17/utils/sheet.ts delete mode 100644 apps/react17/utils/workbook.ts diff --git a/apps/react17/app.tsx b/apps/react17/app.tsx deleted file mode 100644 index 81584931..00000000 --- a/apps/react17/app.tsx +++ /dev/null @@ -1,116 +0,0 @@ -import { - Document, - FlatfileProvider, - Sheet, - Space, - useFlatfile, - useListener, - Workbook, -} from '@flatfile/react' -import React, { useCallback } from 'react' -import { document } from './utils/document' -import { workbook } from './utils/workbook' - -import { recordHook } from '@flatfile/plugin-record-hook' - -const S: (props: any) => null = Sheet as any -const FP: (props: any) => null = FlatfileProvider as any - -export default function App() { - return ( - - - - ) -} - -function Portal() { - const logClosed = useCallback(() => { - console.log(`Flatfile Portal closed`) - }, []) - - useListener((client) => { - client.use( - recordHook('contacts2', (record) => { - const firstName = record.get('firstName') - console.log({ firstName }) - - record.set('lastName', 'Rocks') - return record - }) - ) - }, []) - - const { openPortal } = useFlatfile({ onClose: logClosed }) - - return ( - <> - - - - { - console.log('on Workbook Submit ', { sheet }) - }} - onRecordHooks={[ - [ - (record) => { - record.set('email', 'SHEET 1 RECORDHOOKS') - return record - }, - ], - [ - (record) => { - record.set('email', 'SHEET 2 RECORDHOOKS') - return record - }, - ], - ]} - > - { - record.set('email', 'SHEET 3 RECORDHOOK') - return record - }} - onSubmit={async (sheet) => { - console.log('onSubmit from Sheet 3', { sheet }) - }} - /> - { - record.set('email', 'SHEET 4 RECORDHOOK') - return record - }} - onSubmit={(sheet) => { - console.log('onSubmit from Sheet 4', { sheet }) - }} - /> - - - - ) -} diff --git a/apps/react17/index.html b/apps/react17/index.html index 9c72eb32..e4b78eae 100644 --- a/apps/react17/index.html +++ b/apps/react17/index.html @@ -1,7 +1,13 @@ - - React 17 - - - -
- + + + + + + + Vite + React + TS + + +
+ + + diff --git a/apps/react17/main.tsx b/apps/react17/main.tsx deleted file mode 100644 index 3bc0a4b1..00000000 --- a/apps/react17/main.tsx +++ /dev/null @@ -1,12 +0,0 @@ -import React, { version as ReactVersion } from 'react' -import ReactDOM from 'react-dom' - -import App from './App' - -ReactDOM.render( - <> -

Hello world, I am React {ReactVersion}

- - , - document.getElementById('root') -) diff --git a/apps/react17/package.json b/apps/react17/package.json index 0b7a0369..23df2fee 100644 --- a/apps/react17/package.json +++ b/apps/react17/package.json @@ -1,23 +1,27 @@ { "name": "react-17-example", - "version": "0.0.0", "private": true, + "version": "0.0.0", + "type": "module", "scripts": { "dev": "vite", - "build": "vite build", - "serve": "vite preview" + "build": "tsc -b && vite build", + "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0", + "preview": "vite preview" }, "dependencies": { "@flatfile/api": "*", - "@flatfile/react": "*", + "@flatfile/hooks": "*", + "@flatfile/listener": "*", "@flatfile/plugin-record-hook": "*", + "@flatfile/react": "*", "react": "^17.0.2", "react-dom": "^17.0.2" }, "devDependencies": { - "vite": "^2.6.14", - "@vitejs/plugin-react": "^1.0.0", "@types/react": "^17.0.2", - "@types/react-dom": "^17.0.2" + "@types/react-dom": "^17.0.2", + "@vitejs/plugin-react": "^4.3.1", + "vite": "^4.5.5" } } diff --git a/apps/react17/public/vite.svg b/apps/react17/public/vite.svg new file mode 100644 index 00000000..e7b8dfb1 --- /dev/null +++ b/apps/react17/public/vite.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/apps/react17/src/App.css b/apps/react17/src/App.css new file mode 100644 index 00000000..b9d355df --- /dev/null +++ b/apps/react17/src/App.css @@ -0,0 +1,42 @@ +#root { + max-width: 1280px; + margin: 0 auto; + padding: 2rem; + text-align: center; +} + +.logo { + height: 6em; + padding: 1.5em; + will-change: filter; + transition: filter 300ms; +} +.logo:hover { + filter: drop-shadow(0 0 2em #646cffaa); +} +.logo.react:hover { + filter: drop-shadow(0 0 2em #61dafbaa); +} + +@keyframes logo-spin { + from { + transform: rotate(0deg); + } + to { + transform: rotate(360deg); + } +} + +@media (prefers-reduced-motion: no-preference) { + a:nth-of-type(2) .logo { + animation: logo-spin infinite 20s linear; + } +} + +.card { + padding: 2em; +} + +.read-the-docs { + color: #888; +} diff --git a/apps/react17/src/App.tsx b/apps/react17/src/App.tsx new file mode 100644 index 00000000..3fe8a120 --- /dev/null +++ b/apps/react17/src/App.tsx @@ -0,0 +1,38 @@ +'use client' +import reactLogo from './assets/react.svg' +import viteLogo from '/vite.svg' +import './App.css' +import { FlatFilePlatform } from './FlatfilePlatform' +import { + ClickableComponent, + useListner, + useWorkbook, +} from './upload-components' +import { FlatfileProvider } from '@flatfile/react' +import { version as ReactVersion } from 'react' + +export const App = ({ PUBLISHABLE_KEY }: { PUBLISHABLE_KEY: string }) => { + console.log('APP APP APP') + const listener = useListner() + console.log({ listener }) + const workbook = useWorkbook() + return ( + +
+

Hello from {ReactVersion}

+ + Vite logo + + + React logo + +
+

Flatfile Platform

+ +
+ ) +} diff --git a/apps/react17/src/FlatfilePlatform.tsx b/apps/react17/src/FlatfilePlatform.tsx new file mode 100644 index 00000000..a464eef1 --- /dev/null +++ b/apps/react17/src/FlatfilePlatform.tsx @@ -0,0 +1,48 @@ +import { FC } from 'react'; +import { Space, Workbook, useFlatfile, useListener, } from '@flatfile/react'; +import FlatfileListener from '@flatfile/listener'; +import { CreateWorkbookConfig } from '@flatfile/api/api'; + +interface ActionComponentProps { + open: boolean; + closePortal: () => void; + openPortal: () => void; +} + +export const FlatFilePlatform: FC<{ + workbook: CreateWorkbookConfig; + listener: (client: FlatfileListener) => void; + ActionComponent: React.FC; +}> = (props) => { + + const { workbook, listener, ActionComponent } = props; + + const { open, openPortal, closePortal } = useFlatfile(); + useListener(listener, [listener]) + + + return
+ + + { + console.log('submitted'); + }} + /> + +
+}; diff --git a/apps/react17/src/assets/react.svg b/apps/react17/src/assets/react.svg new file mode 100644 index 00000000..6c87de9b --- /dev/null +++ b/apps/react17/src/assets/react.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/apps/react17/src/config.ts b/apps/react17/src/config.ts new file mode 100644 index 00000000..b0125e73 --- /dev/null +++ b/apps/react17/src/config.ts @@ -0,0 +1 @@ +export const PUBLISHABLE_KEY = "pk_aa746df15610411e9649124119d6ec4c"; diff --git a/apps/react17/src/index.css b/apps/react17/src/index.css new file mode 100644 index 00000000..6119ad9a --- /dev/null +++ b/apps/react17/src/index.css @@ -0,0 +1,68 @@ +:root { + font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif; + line-height: 1.5; + font-weight: 400; + + color-scheme: light dark; + color: rgba(255, 255, 255, 0.87); + background-color: #242424; + + font-synthesis: none; + text-rendering: optimizeLegibility; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +a { + font-weight: 500; + color: #646cff; + text-decoration: inherit; +} +a:hover { + color: #535bf2; +} + +body { + margin: 0; + display: flex; + place-items: center; + min-width: 320px; + min-height: 100vh; +} + +h1 { + font-size: 3.2em; + line-height: 1.1; +} + +button { + border-radius: 8px; + border: 1px solid transparent; + padding: 0.6em 1.2em; + font-size: 1em; + font-weight: 500; + font-family: inherit; + background-color: #1a1a1a; + cursor: pointer; + transition: border-color 0.25s; +} +button:hover { + border-color: #646cff; +} +button:focus, +button:focus-visible { + outline: 4px auto -webkit-focus-ring-color; +} + +@media (prefers-color-scheme: light) { + :root { + color: #213547; + background-color: #ffffff; + } + a:hover { + color: #747bff; + } + button { + background-color: #f9f9f9; + } +} diff --git a/apps/react17/src/main.tsx b/apps/react17/src/main.tsx new file mode 100644 index 00000000..781a78ff --- /dev/null +++ b/apps/react17/src/main.tsx @@ -0,0 +1,28 @@ +import React from "react"; + +// use this for react 17 +import ReactDOM from "react-dom"; + +// use this for react 18 +// import ReactDOM from 'react-dom/client'; + +import "./index.css"; +import { PUBLISHABLE_KEY } from "./config.ts"; +import { App } from "./App.tsx"; + +const rootEl = document.getElementById("root")!; + +// Use this for React 17 +ReactDOM.render( + + + , + rootEl +); + +// Use this for React 18 +// ReactDOM.createRoot(rootEl).render( +// +// +// +// ); diff --git a/apps/react17/src/upload-components/ClickableComponent.tsx b/apps/react17/src/upload-components/ClickableComponent.tsx new file mode 100644 index 00000000..1f1192a5 --- /dev/null +++ b/apps/react17/src/upload-components/ClickableComponent.tsx @@ -0,0 +1,21 @@ +import { FC } from 'react'; + +export const ClickableComponent: FC<{ + closePortal: () => void; + openPortal: () => void; + open: any; +}> = ({ open, closePortal, openPortal }) => { + return ( + <> +
+ +
+ + ); +}; diff --git a/apps/react17/src/upload-components/index.ts b/apps/react17/src/upload-components/index.ts new file mode 100644 index 00000000..b53a1168 --- /dev/null +++ b/apps/react17/src/upload-components/index.ts @@ -0,0 +1,3 @@ +export * from './ClickableComponent'; +export * from './useListener'; +export * from './useWorkbook'; diff --git a/apps/react17/src/upload-components/useListener.ts b/apps/react17/src/upload-components/useListener.ts new file mode 100644 index 00000000..6be738ff --- /dev/null +++ b/apps/react17/src/upload-components/useListener.ts @@ -0,0 +1,26 @@ +import { FlatfileListener } from "@flatfile/listener"; +import { recordHook } from "@flatfile/plugin-record-hook"; + +const regex = /^[a-zA-Z0-9\s.\-_,']+$/; + +export const useListner = (): ((client: FlatfileListener) => void) => { + console.log("USE LISTENER HOOK"); + return (client: FlatfileListener) => { + console.log("TEST TEST"); + client.use( + recordHook("test", (record) => { + console.log({ record }); + record.validate( + "code", + (value) => { + console.log(value); + return value !== null && regex.test(value.toString()); + }, + "Invalid code, allowed characters are: a-z, A-Z, 0-9, space, ., -, _, ', and ," + ); + + return record; + }) + ); + }; +}; diff --git a/apps/react17/src/upload-components/useWorkbook.ts b/apps/react17/src/upload-components/useWorkbook.ts new file mode 100644 index 00000000..fde15cd0 --- /dev/null +++ b/apps/react17/src/upload-components/useWorkbook.ts @@ -0,0 +1,53 @@ +import { Flatfile } from '@flatfile/api'; + +export const useWorkbook = (): Pick< + Flatfile.CreateWorkbookConfig, + 'name' | 'labels' | 'sheets' | 'actions' +> => { + + return { + name: 'All Data', + labels: ['pinned'], + sheets: [ + { + name: 'Test', + slug: 'test', + fields: [ + { + key: 'code', + type: 'string', + label: 'Code', + }, + { + key: 'type', + type: 'enum', + label: 'Quote Type', + + config: { + options: [ + { + value: 'cost', + label: 'Cost', + }, + { + value: 'revenue', + label: 'Revenue', + } + ] + }, + }, + ] + }, + ], + actions: [ + { + operation: 'submitActionFg', + mode: 'foreground', + label: 'Submit foreground', + description: 'Submit jobId, envId, workbookId to data upload services', + primary: true, + constraints: [{ type: 'hasAllValid' }, { type: 'hasData' }], + }, + ], + }; +}; diff --git a/apps/react17/src/vite-env.d.ts b/apps/react17/src/vite-env.d.ts new file mode 100644 index 00000000..11f02fe2 --- /dev/null +++ b/apps/react17/src/vite-env.d.ts @@ -0,0 +1 @@ +/// diff --git a/apps/react17/tsconfig.app.json b/apps/react17/tsconfig.app.json new file mode 100644 index 00000000..d739292a --- /dev/null +++ b/apps/react17/tsconfig.app.json @@ -0,0 +1,27 @@ +{ + "compilerOptions": { + "composite": true, + "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo", + "target": "ES2020", + "useDefineForClassFields": true, + "lib": ["ES2020", "DOM", "DOM.Iterable"], + "module": "ESNext", + "skipLibCheck": true, + + /* Bundler mode */ + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "resolveJsonModule": true, + "isolatedModules": true, + "moduleDetection": "force", + "noEmit": true, + "jsx": "react-jsx", + + /* Linting */ + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true + }, + "include": ["src"] +} diff --git a/apps/react17/tsconfig.json b/apps/react17/tsconfig.json new file mode 100644 index 00000000..ea9d0cd8 --- /dev/null +++ b/apps/react17/tsconfig.json @@ -0,0 +1,11 @@ +{ + "files": [], + "references": [ + { + "path": "./tsconfig.app.json" + }, + { + "path": "./tsconfig.node.json" + } + ] +} diff --git a/apps/react17/tsconfig.node.json b/apps/react17/tsconfig.node.json new file mode 100644 index 00000000..3afdd6e3 --- /dev/null +++ b/apps/react17/tsconfig.node.json @@ -0,0 +1,13 @@ +{ + "compilerOptions": { + "composite": true, + "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo", + "skipLibCheck": true, + "module": "ESNext", + "moduleResolution": "bundler", + "allowSyntheticDefaultImports": true, + "strict": true, + "noEmit": true + }, + "include": ["vite.config.ts"] +} diff --git a/apps/react17/utils/document.ts b/apps/react17/utils/document.ts deleted file mode 100644 index 1ea6d54e..00000000 --- a/apps/react17/utils/document.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { Flatfile } from '@flatfile/api' - -export const document: Flatfile.DocumentConfig = { - title: 'Carry On My Wayward Son - A Markdown Journey', - body: "# Carry On My Wayward Son - A Markdown Journey\n\n## Introduction\n\"Carry On My Wayward Son\" is a classic rock song by Kansas, released in 1976. It has become an anthem for generations, known for its powerful melody, intricate harmonies, and meaningful lyrics.\n\n![Carry On My Wayward Son Album Cover](https://example.com/album-cover.jpg)\n\n## Lyrics Analysis\n\n### Verse 1\n```\nCarry on my wayward son,\nThere'll be peace when you are done.\nLay your weary head to rest,\nDon't you cry no more.\n```\nThis verse speaks to the universal journey of finding peace through trials and tribulations. The song immediately addresses the listener or \"wayward son,\" encouraging perseverance and hope.\n\n### Chorus\n```\nMasquerading as a man with a reason,\nMy charade is the event of the season.\nAnd if I claim to be a wise man, it surely means that I don't know.\n```\nThe chorus delves into themes of identity, purpose, and the humility in acknowledging one's limitations.\n\n## Interpretations\n\n- **Personal Growth:** The song is often seen as a metaphor for personal development and the struggles one faces along the way.\n- **Spiritual Journey:** Some interpret it as a spiritual quest towards enlightenment or peace.\n\n## Guitar Solo Analysis\n\nThe iconic guitar solo of the song represents a climax in the musical journey, mirroring the emotional and spiritual ascent of the lyrics.\n\n```python\n# Example Python code to play a simple melody\nnotes = ['G', 'B', 'D', 'F#', 'G', 'D', 'B', 'G']\nfor note in notes:\n play(note)\n```\n\n## Historical Context\n\n| Year | Event |\n|------|----------------------------------------------|\n| 1976 | Song released on the album *Leftoverture*. |\n| 1977 | Reached No. 11 on the Billboard Hot 100. |\n| 2000s| Became a cultural icon, featured in TV shows.|\n\n## Notable Covers and Uses\n\n- **TV Series**: \"Supernatural\" famously used the song in several episodes, enhancing its cultural significance.\n- **Live Performances**: Kansas continues to perform this song, captivating audiences worldwide.\n\n## Conclusion\n\n\"Carry On My Wayward Son\" remains a timeless piece, resonating with audiences for its profound lyrics and dynamic composition. It encourages listeners to persevere through hardships, promising peace and rest at the journey's end.\n\n> \"A song that encapsulates the essence of human struggle and the hope for a better tomorrow.\"\n\n## References\n\n- [Kansas Official Website](https://www.kansasband.com)\n- [Lyrics Analysis](https://www.genius.com/Kansas-carry-on-my-wayward-son-lyrics)\n- [Song Facts](https://www.songfacts.com/facts/kansas/carry-on-wayward-son)\n" -} diff --git a/apps/react17/utils/sheet.ts b/apps/react17/utils/sheet.ts deleted file mode 100644 index 4f8a84e9..00000000 --- a/apps/react17/utils/sheet.ts +++ /dev/null @@ -1,58 +0,0 @@ -import { Flatfile } from '@flatfile/api' - -export const sheet: Flatfile.SheetConfig = { - name: 'Contacts', - slug: 'contacts', - fields: [ - { - key: 'firstName', - type: 'string', - label: 'First Name', - config: undefined, - } as Flatfile.Property.String, - { - key: 'lastName', - type: 'string', - label: 'Last Name', - config: undefined, - } as Flatfile.Property.String, - { - key: 'email', - type: 'string', - label: 'Email', - config: undefined, - } as Flatfile.Property.String, - { - key: 'status', - type: 'enum', - label: 'Status', - config: { - allowCustom: true, - options: [ - { - value: 'blocked', - label: 'Blocked', - }, - { - value: 'in-progress', - label: 'In Progress', - }, - { - value: 'completed', - label: 'Completed', - }, - ], - }, - }, - ], - allowAdditionalFields: true, - actions: [ - { - operation: 'submitActionFg', - mode: 'background', - label: 'Submit foreground', - description: 'Submit data to webhook.site', - primary: true, - }, - ], -} diff --git a/apps/react17/utils/workbook.ts b/apps/react17/utils/workbook.ts deleted file mode 100644 index 69b74b94..00000000 --- a/apps/react17/utils/workbook.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { Flatfile } from '@flatfile/api' -import { sheet } from './sheet' -const sheet2 = { ...sheet, name: 'Contacts 2', slug: 'contacts2' } -export const workbook: Flatfile.CreateWorkbookConfig = { - name: 'Contacts', - sheets: [sheet, sheet2], - actions: [ - { - operation: 'submitActionFg', - mode: 'background', - label: 'Submit background', - description: 'Submit data to webhook.site', - }, - ], -} diff --git a/apps/react17/vite.config.ts b/apps/react17/vite.config.ts index 3027546d..5a33944a 100644 --- a/apps/react17/vite.config.ts +++ b/apps/react17/vite.config.ts @@ -3,8 +3,5 @@ import react from '@vitejs/plugin-react' // https://vitejs.dev/config/ export default defineConfig({ - plugins: [react], - build: { - sourcemap: 'inline', - }, + plugins: [react()], }) diff --git a/package-lock.json b/package-lock.json index 891f16a8..88a64d2b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -197,6 +197,8 @@ "version": "0.0.0", "dependencies": { "@flatfile/api": "*", + "@flatfile/hooks": "*", + "@flatfile/listener": "*", "@flatfile/plugin-record-hook": "*", "@flatfile/react": "*", "react": "^17.0.2", @@ -205,14 +207,174 @@ "devDependencies": { "@types/react": "^17.0.2", "@types/react-dom": "^17.0.2", - "@vitejs/plugin-react": "^1.0.0", - "vite": "^2.6.14" + "@vitejs/plugin-react": "^4.3.1", + "vite": "^4.5.5" + } + }, + "apps/react17/node_modules/@esbuild/android-arm": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.18.20.tgz", + "integrity": "sha512-fyi7TDI/ijKKNZTUJAQqiG5T7YjJXgnzkURqmGj13C6dCqckZBLdl4h7bkhHt/t0WP+zO9/zwroDvANaOqO5Sw==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "apps/react17/node_modules/@esbuild/android-arm64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.18.20.tgz", + "integrity": "sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "apps/react17/node_modules/@esbuild/android-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.18.20.tgz", + "integrity": "sha512-8GDdlePJA8D6zlZYJV/jnrRAi6rOiNaCC/JclcXpB+KIuvfBN4owLtgzY2bsxnx666XjJx2kDPUmnTtR8qKQUg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "apps/react17/node_modules/@esbuild/darwin-arm64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.18.20.tgz", + "integrity": "sha512-bxRHW5kHU38zS2lPTPOyuyTm+S+eobPUnTNkdJEfAddYgEcll4xkT8DB9d2008DtTbl7uJag2HuE5NZAZgnNEA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "apps/react17/node_modules/@esbuild/darwin-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.18.20.tgz", + "integrity": "sha512-pc5gxlMDxzm513qPGbCbDukOdsGtKhfxD1zJKXjCCcU7ju50O7MeAZ8c4krSJcOIJGFR+qx21yMMVYwiQvyTyQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "apps/react17/node_modules/@esbuild/freebsd-arm64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.18.20.tgz", + "integrity": "sha512-yqDQHy4QHevpMAaxhhIwYPMv1NECwOvIpGCZkECn8w2WFHXjEwrBn3CeNIYsibZ/iZEUemj++M26W3cNR5h+Tw==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "apps/react17/node_modules/@esbuild/freebsd-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.18.20.tgz", + "integrity": "sha512-tgWRPPuQsd3RmBZwarGVHZQvtzfEBOreNuxEMKFcd5DaDn2PbBxfwLcj4+aenoh7ctXcbXmOQIn8HI6mCSw5MQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "apps/react17/node_modules/@esbuild/linux-arm": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.18.20.tgz", + "integrity": "sha512-/5bHkMWnq1EgKr1V+Ybz3s1hWXok7mDFUMQ4cG10AfW3wL02PSZi5kFpYKrptDsgb2WAJIvRcDm+qIvXf/apvg==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "apps/react17/node_modules/@esbuild/linux-arm64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.18.20.tgz", + "integrity": "sha512-2YbscF+UL7SQAVIpnWvYwM+3LskyDmPhe31pE7/aoTMFKKzIc9lLbyGUpmmb8a8AixOL61sQ/mFh3jEjHYFvdA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "apps/react17/node_modules/@esbuild/linux-ia32": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.18.20.tgz", + "integrity": "sha512-P4etWwq6IsReT0E1KHU40bOnzMHoH73aXp96Fs8TIT6z9Hu8G6+0SHSw9i2isWrD2nbx2qo5yUqACgdfVGx7TA==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" } }, "apps/react17/node_modules/@esbuild/linux-loong64": { - "version": "0.14.54", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.14.54.tgz", - "integrity": "sha512-bZBrLAIX1kpWelV0XemxBZllyRmM6vgFQQG2GdNb+r3Fkp0FOh1NJSvekXDs7jq70k4euu1cryLMfU+mTXlEpw==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.18.20.tgz", + "integrity": "sha512-nXW8nqBTrOpDLPgPY9uV+/1DjxoQ7DoB2N8eocyq8I9XuqJ7BiAMDMf9n1xZM9TgW0J8zrquIb/A7s3BJv7rjg==", "cpu": [ "loong64" ], @@ -225,6 +387,182 @@ "node": ">=12" } }, + "apps/react17/node_modules/@esbuild/linux-mips64el": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.18.20.tgz", + "integrity": "sha512-d5NeaXZcHp8PzYy5VnXV3VSd2D328Zb+9dEq5HE6bw6+N86JVPExrA6O68OPwobntbNJ0pzCpUFZTo3w0GyetQ==", + "cpu": [ + "mips64el" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "apps/react17/node_modules/@esbuild/linux-ppc64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.18.20.tgz", + "integrity": "sha512-WHPyeScRNcmANnLQkq6AfyXRFr5D6N2sKgkFo2FqguP44Nw2eyDlbTdZwd9GYk98DZG9QItIiTlFLHJHjxP3FA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "apps/react17/node_modules/@esbuild/linux-riscv64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.18.20.tgz", + "integrity": "sha512-WSxo6h5ecI5XH34KC7w5veNnKkju3zBRLEQNY7mv5mtBmrP/MjNBCAlsM2u5hDBlS3NGcTQpoBvRzqBcRtpq1A==", + "cpu": [ + "riscv64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "apps/react17/node_modules/@esbuild/linux-s390x": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.18.20.tgz", + "integrity": "sha512-+8231GMs3mAEth6Ja1iK0a1sQ3ohfcpzpRLH8uuc5/KVDFneH6jtAJLFGafpzpMRO6DzJ6AvXKze9LfFMrIHVQ==", + "cpu": [ + "s390x" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "apps/react17/node_modules/@esbuild/linux-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.18.20.tgz", + "integrity": "sha512-UYqiqemphJcNsFEskc73jQ7B9jgwjWrSayxawS6UVFZGWrAAtkzjxSqnoclCXxWtfwLdzU+vTpcNYhpn43uP1w==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "apps/react17/node_modules/@esbuild/netbsd-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.18.20.tgz", + "integrity": "sha512-iO1c++VP6xUBUmltHZoMtCUdPlnPGdBom6IrO4gyKPFFVBKioIImVooR5I83nTew5UOYrk3gIJhbZh8X44y06A==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=12" + } + }, + "apps/react17/node_modules/@esbuild/openbsd-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.18.20.tgz", + "integrity": "sha512-e5e4YSsuQfX4cxcygw/UCPIEP6wbIL+se3sxPdCiMbFLBWu0eiZOJ7WoD+ptCLrmjZBK1Wk7I6D/I3NglUGOxg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=12" + } + }, + "apps/react17/node_modules/@esbuild/sunos-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.18.20.tgz", + "integrity": "sha512-kDbFRFp0YpTQVVrqUd5FTYmWo45zGaXe0X8E1G/LKFC0v8x0vWrhOWSLITcCn63lmZIxfOMXtCfti/RxN/0wnQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=12" + } + }, + "apps/react17/node_modules/@esbuild/win32-arm64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.18.20.tgz", + "integrity": "sha512-ddYFR6ItYgoaq4v4JmQQaAI5s7npztfV4Ag6NrhiaW0RrnOXqBkgwZLofVTlq1daVTQNhtI5oieTvkRPfZrePg==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "apps/react17/node_modules/@esbuild/win32-ia32": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.18.20.tgz", + "integrity": "sha512-Wv7QBi3ID/rROT08SABTS7eV4hX26sVduqDOTe1MvGMjNd3EjOz4b7zeexIR62GTIEKrfJXKL9LFxTYgkyeu7g==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "apps/react17/node_modules/@esbuild/win32-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.18.20.tgz", + "integrity": "sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, "apps/react17/node_modules/@types/react": { "version": "17.0.82", "resolved": "https://registry.npmjs.org/@types/react/-/react-17.0.82.tgz", @@ -245,10 +583,29 @@ "@types/react": "^17" } }, + "apps/react17/node_modules/@vitejs/plugin-react": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-4.3.1.tgz", + "integrity": "sha512-m/V2syj5CuVnaxcUJOQRel/Wr31FFXRFlnOoq1TVtkCxsY5veGMTEmpWHndrhB2U8ScHtCQB1e+4hWYExQc6Lg==", + "dev": true, + "dependencies": { + "@babel/core": "^7.24.5", + "@babel/plugin-transform-react-jsx-self": "^7.24.5", + "@babel/plugin-transform-react-jsx-source": "^7.24.1", + "@types/babel__core": "^7.20.5", + "react-refresh": "^0.14.2" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "peerDependencies": { + "vite": "^4.2.0 || ^5.0.0" + } + }, "apps/react17/node_modules/esbuild": { - "version": "0.14.54", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.14.54.tgz", - "integrity": "sha512-Cy9llcy8DvET5uznocPyqL3BFRrFXSVqbgpMJ9Wz8oVjZlh/zUSNbPRbov0VX7VxN2JH1Oa0uNxZ7eLRb62pJA==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.18.20.tgz", + "integrity": "sha512-ceqxoedUrcayh7Y7ZX6NdbbDzGROiyVBgC4PriJThBKSVPWnnFHZAkfI1lJT8QFkOwH4qOS2SJkS4wvpGl8BpA==", "dev": true, "hasInstallScript": true, "bin": { @@ -258,27 +615,62 @@ "node": ">=12" }, "optionalDependencies": { - "@esbuild/linux-loong64": "0.14.54", - "esbuild-android-64": "0.14.54", - "esbuild-android-arm64": "0.14.54", - "esbuild-darwin-64": "0.14.54", - "esbuild-darwin-arm64": "0.14.54", - "esbuild-freebsd-64": "0.14.54", - "esbuild-freebsd-arm64": "0.14.54", - "esbuild-linux-32": "0.14.54", - "esbuild-linux-64": "0.14.54", - "esbuild-linux-arm": "0.14.54", - "esbuild-linux-arm64": "0.14.54", - "esbuild-linux-mips64le": "0.14.54", - "esbuild-linux-ppc64le": "0.14.54", - "esbuild-linux-riscv64": "0.14.54", - "esbuild-linux-s390x": "0.14.54", - "esbuild-netbsd-64": "0.14.54", - "esbuild-openbsd-64": "0.14.54", - "esbuild-sunos-64": "0.14.54", - "esbuild-windows-32": "0.14.54", - "esbuild-windows-64": "0.14.54", - "esbuild-windows-arm64": "0.14.54" + "@esbuild/android-arm": "0.18.20", + "@esbuild/android-arm64": "0.18.20", + "@esbuild/android-x64": "0.18.20", + "@esbuild/darwin-arm64": "0.18.20", + "@esbuild/darwin-x64": "0.18.20", + "@esbuild/freebsd-arm64": "0.18.20", + "@esbuild/freebsd-x64": "0.18.20", + "@esbuild/linux-arm": "0.18.20", + "@esbuild/linux-arm64": "0.18.20", + "@esbuild/linux-ia32": "0.18.20", + "@esbuild/linux-loong64": "0.18.20", + "@esbuild/linux-mips64el": "0.18.20", + "@esbuild/linux-ppc64": "0.18.20", + "@esbuild/linux-riscv64": "0.18.20", + "@esbuild/linux-s390x": "0.18.20", + "@esbuild/linux-x64": "0.18.20", + "@esbuild/netbsd-x64": "0.18.20", + "@esbuild/openbsd-x64": "0.18.20", + "@esbuild/sunos-x64": "0.18.20", + "@esbuild/win32-arm64": "0.18.20", + "@esbuild/win32-ia32": "0.18.20", + "@esbuild/win32-x64": "0.18.20" + } + }, + "apps/react17/node_modules/picocolors": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.0.tgz", + "integrity": "sha512-TQ92mBOW0l3LeMeyLV6mzy/kWr8lkd/hp3mTg7wYK7zJhuBStmGMBG0BdeDZS/dZx1IukaX6Bk11zcln25o1Aw==", + "dev": true + }, + "apps/react17/node_modules/postcss": { + "version": "8.4.47", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.47.tgz", + "integrity": "sha512-56rxCq7G/XfB4EkXq9Egn5GCqugWvDFjafDOThIdMBsI15iqPqR5r15TfSr1YPYeEI19YeaXMCbY6u88Y76GLQ==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "nanoid": "^3.3.7", + "picocolors": "^1.1.0", + "source-map-js": "^1.2.1" + }, + "engines": { + "node": "^10 || ^12 || >=14" } }, "apps/react17/node_modules/react": { @@ -306,16 +698,26 @@ "react": "17.0.2" } }, + "apps/react17/node_modules/react-refresh": { + "version": "0.14.2", + "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.14.2.tgz", + "integrity": "sha512-jCvmsr+1IUSMUyzOkRcvnVbX3ZYC6g9TDrDbFuFmRDq7PD4yaGbLKNQL6k2jnArV8hjYxh7hVhAZB6s9HDGpZA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "apps/react17/node_modules/rollup": { - "version": "2.77.3", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.77.3.tgz", - "integrity": "sha512-/qxNTG7FbmefJWoeeYJFbHehJ2HNWnjkAFRKzWN/45eNBBF/r8lo992CwcJXEzyVxs5FmfId+vTSTQDb+bxA+g==", + "version": "3.29.4", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.29.4.tgz", + "integrity": "sha512-oWzmBZwvYrU0iJHtDmhsm662rC15FRXmcjCk1xD771dFDx5jJ02ufAQQTn0etB2emNk4J9EZg/yWKpsn9BWGRw==", "dev": true, "bin": { "rollup": "dist/bin/rollup" }, "engines": { - "node": ">=10.0.0" + "node": ">=14.18.0", + "npm": ">=8.0.0" }, "optionalDependencies": { "fsevents": "~2.3.2" @@ -330,40 +732,67 @@ "object-assign": "^4.1.1" } }, + "apps/react17/node_modules/source-map-js": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "apps/react17/node_modules/vite": { - "version": "2.9.18", - "resolved": "https://registry.npmjs.org/vite/-/vite-2.9.18.tgz", - "integrity": "sha512-sAOqI5wNM9QvSEE70W3UGMdT8cyEn0+PmJMTFvTB8wB0YbYUWw3gUbY62AOyrXosGieF2htmeLATvNxpv/zNyQ==", + "version": "4.5.5", + "resolved": "https://registry.npmjs.org/vite/-/vite-4.5.5.tgz", + "integrity": "sha512-ifW3Lb2sMdX+WU91s3R0FyQlAyLxOzCSCP37ujw0+r5POeHPwe6udWVIElKQq8gk3t7b8rkmvqC6IHBpCff4GQ==", "dev": true, "dependencies": { - "esbuild": "^0.14.27", - "postcss": "^8.4.13", - "resolve": "^1.22.0", - "rollup": ">=2.59.0 <2.78.0" + "esbuild": "^0.18.10", + "postcss": "^8.4.27", + "rollup": "^3.27.1" }, "bin": { "vite": "bin/vite.js" }, "engines": { - "node": ">=12.2.0" + "node": "^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" }, "optionalDependencies": { "fsevents": "~2.3.2" }, "peerDependencies": { + "@types/node": ">= 14", "less": "*", + "lightningcss": "^1.21.0", "sass": "*", - "stylus": "*" + "stylus": "*", + "sugarss": "*", + "terser": "^5.4.0" }, "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, "less": { "optional": true }, + "lightningcss": { + "optional": true + }, "sass": { "optional": true }, "stylus": { "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true } } }, @@ -9407,66 +9836,25 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==" - }, - "node_modules/@vercel/ncc": { - "version": "0.36.1", - "resolved": "https://registry.npmjs.org/@vercel/ncc/-/ncc-0.36.1.tgz", - "integrity": "sha512-S4cL7Taa9yb5qbv+6wLgiKVZ03Qfkc4jGRuiUQMQ8HGBD5pcNRnHeYM33zBvJE4/zJGjJJ8GScB+WmTsn9mORw==", - "bin": { - "ncc": "dist/ncc/cli.js" - } - }, - "node_modules/@vitejs/plugin-basic-ssl": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@vitejs/plugin-basic-ssl/-/plugin-basic-ssl-1.0.1.tgz", - "integrity": "sha512-pcub+YbFtFhaGRTo1832FQHQSHvMrlb43974e2eS8EKleR3p1cDdkJFPci1UhwkEf1J9Bz+wKBSzqpKp7nNj2A==", - "dev": true, - "engines": { - "node": ">=14.6.0" - }, - "peerDependencies": { - "vite": "^3.0.0 || ^4.0.0" - } - }, - "node_modules/@vitejs/plugin-react": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-1.3.2.tgz", - "integrity": "sha512-aurBNmMo0kz1O4qRoY+FM4epSA39y3ShWGuqfLRA/3z0oEJAdtoSfgA3aO98/PCCHAqMaduLxIxErWrVKIFzXA==", - "dev": true, - "dependencies": { - "@babel/core": "^7.17.10", - "@babel/plugin-transform-react-jsx": "^7.17.3", - "@babel/plugin-transform-react-jsx-development": "^7.16.7", - "@babel/plugin-transform-react-jsx-self": "^7.16.7", - "@babel/plugin-transform-react-jsx-source": "^7.16.7", - "@rollup/pluginutils": "^4.2.1", - "react-refresh": "^0.13.0", - "resolve": "^1.22.0" - }, - "engines": { - "node": ">=12.0.0" - } - }, - "node_modules/@vitejs/plugin-react/node_modules/@rollup/pluginutils": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-4.2.1.tgz", - "integrity": "sha512-iKnFXr7NkdZAIHiIWE+BX5ULi/ucVFYWD6TbAV+rZctiRTY2PL6tsIKhoIOaoskiWAkgu+VsbXgUVDNLHf+InQ==", - "dev": true, - "dependencies": { - "estree-walker": "^2.0.1", - "picomatch": "^2.2.2" - }, - "engines": { - "node": ">= 8.0.0" + }, + "node_modules/@vercel/ncc": { + "version": "0.36.1", + "resolved": "https://registry.npmjs.org/@vercel/ncc/-/ncc-0.36.1.tgz", + "integrity": "sha512-S4cL7Taa9yb5qbv+6wLgiKVZ03Qfkc4jGRuiUQMQ8HGBD5pcNRnHeYM33zBvJE4/zJGjJJ8GScB+WmTsn9mORw==", + "bin": { + "ncc": "dist/ncc/cli.js" } }, - "node_modules/@vitejs/plugin-react/node_modules/react-refresh": { - "version": "0.13.0", - "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.13.0.tgz", - "integrity": "sha512-XP8A9BT0CpRBD+NYLLeIhld/RqG9+gktUjW1FkE+Vm7OCinbG1SshcK5tb9ls4kzvjZr9mOQc7HYgBngEyPAXg==", + "node_modules/@vitejs/plugin-basic-ssl": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@vitejs/plugin-basic-ssl/-/plugin-basic-ssl-1.0.1.tgz", + "integrity": "sha512-pcub+YbFtFhaGRTo1832FQHQSHvMrlb43974e2eS8EKleR3p1cDdkJFPci1UhwkEf1J9Bz+wKBSzqpKp7nNj2A==", "dev": true, "engines": { - "node": ">=0.10.0" + "node": ">=14.6.0" + }, + "peerDependencies": { + "vite": "^3.0.0 || ^4.0.0" } }, "node_modules/@volar/language-core": { @@ -14320,230 +14708,6 @@ "@esbuild/win32-x64": "0.16.17" } }, - "node_modules/esbuild-android-64": { - "version": "0.14.54", - "resolved": "https://registry.npmjs.org/esbuild-android-64/-/esbuild-android-64-0.14.54.tgz", - "integrity": "sha512-Tz2++Aqqz0rJ7kYBfz+iqyE3QMycD4vk7LBRyWaAVFgFtQ/O8EJOnVmTOiDWYZ/uYzB4kvP+bqejYdVKzE5lAQ==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild-android-arm64": { - "version": "0.14.54", - "resolved": "https://registry.npmjs.org/esbuild-android-arm64/-/esbuild-android-arm64-0.14.54.tgz", - "integrity": "sha512-F9E+/QDi9sSkLaClO8SOV6etqPd+5DgJje1F9lOWoNncDdOBL2YF59IhsWATSt0TLZbYCf3pNlTHvVV5VfHdvg==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild-darwin-64": { - "version": "0.14.54", - "resolved": "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.14.54.tgz", - "integrity": "sha512-jtdKWV3nBviOd5v4hOpkVmpxsBy90CGzebpbO9beiqUYVMBtSc0AL9zGftFuBon7PNDcdvNCEuQqw2x0wP9yug==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild-darwin-arm64": { - "version": "0.14.54", - "resolved": "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.54.tgz", - "integrity": "sha512-OPafJHD2oUPyvJMrsCvDGkRrVCar5aVyHfWGQzY1dWnzErjrDuSETxwA2HSsyg2jORLY8yBfzc1MIpUkXlctmw==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild-freebsd-64": { - "version": "0.14.54", - "resolved": "https://registry.npmjs.org/esbuild-freebsd-64/-/esbuild-freebsd-64-0.14.54.tgz", - "integrity": "sha512-OKwd4gmwHqOTp4mOGZKe/XUlbDJ4Q9TjX0hMPIDBUWWu/kwhBAudJdBoxnjNf9ocIB6GN6CPowYpR/hRCbSYAg==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild-freebsd-arm64": { - "version": "0.14.54", - "resolved": "https://registry.npmjs.org/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.14.54.tgz", - "integrity": "sha512-sFwueGr7OvIFiQT6WeG0jRLjkjdqWWSrfbVwZp8iMP+8UHEHRBvlaxL6IuKNDwAozNUmbb8nIMXa7oAOARGs1Q==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild-linux-32": { - "version": "0.14.54", - "resolved": "https://registry.npmjs.org/esbuild-linux-32/-/esbuild-linux-32-0.14.54.tgz", - "integrity": "sha512-1ZuY+JDI//WmklKlBgJnglpUL1owm2OX+8E1syCD6UAxcMM/XoWd76OHSjl/0MR0LisSAXDqgjT3uJqT67O3qw==", - "cpu": [ - "ia32" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild-linux-64": { - "version": "0.14.54", - "resolved": "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.14.54.tgz", - "integrity": "sha512-EgjAgH5HwTbtNsTqQOXWApBaPVdDn7XcK+/PtJwZLT1UmpLoznPd8c5CxqsH2dQK3j05YsB3L17T8vE7cp4cCg==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild-linux-arm": { - "version": "0.14.54", - "resolved": "https://registry.npmjs.org/esbuild-linux-arm/-/esbuild-linux-arm-0.14.54.tgz", - "integrity": "sha512-qqz/SjemQhVMTnvcLGoLOdFpCYbz4v4fUo+TfsWG+1aOu70/80RV6bgNpR2JCrppV2moUQkww+6bWxXRL9YMGw==", - "cpu": [ - "arm" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild-linux-arm64": { - "version": "0.14.54", - "resolved": "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.14.54.tgz", - "integrity": "sha512-WL71L+0Rwv+Gv/HTmxTEmpv0UgmxYa5ftZILVi2QmZBgX3q7+tDeOQNqGtdXSdsL8TQi1vIaVFHUPDe0O0kdig==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild-linux-mips64le": { - "version": "0.14.54", - "resolved": "https://registry.npmjs.org/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.14.54.tgz", - "integrity": "sha512-qTHGQB8D1etd0u1+sB6p0ikLKRVuCWhYQhAHRPkO+OF3I/iSlTKNNS0Lh2Oc0g0UFGguaFZZiPJdJey3AGpAlw==", - "cpu": [ - "mips64el" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild-linux-ppc64le": { - "version": "0.14.54", - "resolved": "https://registry.npmjs.org/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.14.54.tgz", - "integrity": "sha512-j3OMlzHiqwZBDPRCDFKcx595XVfOfOnv68Ax3U4UKZ3MTYQB5Yz3X1mn5GnodEVYzhtZgxEBidLWeIs8FDSfrQ==", - "cpu": [ - "ppc64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild-linux-riscv64": { - "version": "0.14.54", - "resolved": "https://registry.npmjs.org/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.14.54.tgz", - "integrity": "sha512-y7Vt7Wl9dkOGZjxQZnDAqqn+XOqFD7IMWiewY5SPlNlzMX39ocPQlOaoxvT4FllA5viyV26/QzHtvTjVNOxHZg==", - "cpu": [ - "riscv64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild-linux-s390x": { - "version": "0.14.54", - "resolved": "https://registry.npmjs.org/esbuild-linux-s390x/-/esbuild-linux-s390x-0.14.54.tgz", - "integrity": "sha512-zaHpW9dziAsi7lRcyV4r8dhfG1qBidQWUXweUjnw+lliChJqQr+6XD71K41oEIC3Mx1KStovEmlzm+MkGZHnHA==", - "cpu": [ - "s390x" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, "node_modules/esbuild-loader": { "version": "2.21.0", "resolved": "https://registry.npmjs.org/esbuild-loader/-/esbuild-loader-2.21.0.tgz", @@ -14563,54 +14727,6 @@ "webpack": "^4.40.0 || ^5.0.0" } }, - "node_modules/esbuild-netbsd-64": { - "version": "0.14.54", - "resolved": "https://registry.npmjs.org/esbuild-netbsd-64/-/esbuild-netbsd-64-0.14.54.tgz", - "integrity": "sha512-PR01lmIMnfJTgeU9VJTDY9ZerDWVFIUzAtJuDHwwceppW7cQWjBBqP48NdeRtoP04/AtO9a7w3viI+PIDr6d+w==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "netbsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild-openbsd-64": { - "version": "0.14.54", - "resolved": "https://registry.npmjs.org/esbuild-openbsd-64/-/esbuild-openbsd-64-0.14.54.tgz", - "integrity": "sha512-Qyk7ikT2o7Wu76UsvvDS5q0amJvmRzDyVlL0qf5VLsLchjCa1+IAvd8kTBgUxD7VBUUVgItLkk609ZHUc1oCaw==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "openbsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild-sunos-64": { - "version": "0.14.54", - "resolved": "https://registry.npmjs.org/esbuild-sunos-64/-/esbuild-sunos-64-0.14.54.tgz", - "integrity": "sha512-28GZ24KmMSeKi5ueWzMcco6EBHStL3B6ubM7M51RmPwXQGLe0teBGJocmWhgwccA1GeFXqxzILIxXpHbl9Q/Kw==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "sunos" - ], - "engines": { - "node": ">=12" - } - }, "node_modules/esbuild-wasm": { "version": "0.19.12", "resolved": "https://registry.npmjs.org/esbuild-wasm/-/esbuild-wasm-0.19.12.tgz", @@ -14623,54 +14739,6 @@ "node": ">=12" } }, - "node_modules/esbuild-windows-32": { - "version": "0.14.54", - "resolved": "https://registry.npmjs.org/esbuild-windows-32/-/esbuild-windows-32-0.14.54.tgz", - "integrity": "sha512-T+rdZW19ql9MjS7pixmZYVObd9G7kcaZo+sETqNH4RCkuuYSuv9AGHUVnPoP9hhuE1WM1ZimHz1CIBHBboLU7w==", - "cpu": [ - "ia32" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild-windows-64": { - "version": "0.14.54", - "resolved": "https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-0.14.54.tgz", - "integrity": "sha512-AoHTRBUuYwXtZhjXZbA1pGfTo8cJo3vZIcWGLiUcTNgHpJJMC1rVA44ZereBHMJtotyN71S8Qw0npiCIkW96cQ==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/esbuild-windows-arm64": { - "version": "0.14.54", - "resolved": "https://registry.npmjs.org/esbuild-windows-arm64/-/esbuild-windows-arm64-0.14.54.tgz", - "integrity": "sha512-M0kuUvXhot1zOISQGXwWn6YtS+Y/1RT9WrVIOywZnJHo3jCDyewAc79aKNQWFCQm+xNHVTq9h8dZKvygoXQQRg==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, "node_modules/escalade": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", From 83b43c4a72d3df68887fda046c0c78e0397c72fc Mon Sep 17 00:00:00 2001 From: Nate Ferrero Date: Thu, 19 Sep 2024 17:21:12 -0400 Subject: [PATCH 3/3] react 17 upgrade vite and example --- apps/react17/src/App.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/react17/src/App.tsx b/apps/react17/src/App.tsx index 3fe8a120..b4ef21e5 100644 --- a/apps/react17/src/App.tsx +++ b/apps/react17/src/App.tsx @@ -19,7 +19,7 @@ export const App = ({ PUBLISHABLE_KEY }: { PUBLISHABLE_KEY: string }) => { return (
-

Hello from {ReactVersion}

+

Hello from React {ReactVersion}

Vite logo