-
-
Notifications
You must be signed in to change notification settings - Fork 150
Version 5 #355
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
base: main
Are you sure you want to change the base?
Version 5 #355
Conversation
This new branch is now using vue-demi as the main development wrapper to add support to vue 2 later. Currently, this branch is experimenting 2 types of usage. First, the purely component approach which has more template codes but is more straight forward and easier to understand. The second one is but using a more leaner approach using composables. With only exposing useStripe with two main methors initStripe and initElements, you'll easily get the stripe instance and the elements instance which promotes a more robust usage because you already have the access to the instances inside the script compared to the component where they're only in the slot scope variables.
The LinkAuthentication component is now included in the export list of the index.js file. This allows other modules to import and use the LinkAuthentication component.
…handling authentication with Stripe The LinkAuthentication component is added to handle authentication with Stripe. It provides a template with a mount point for rendering the authentication elements. The component accepts props for configuring the Stripe instance, elements, options, and confirm parameters. It exposes a submit method to initiate the authentication process. The component uses the useElement composable to create and mount the authentication element. The init function initializes the authentication process by creating and mounting the element. The submit method handles the submission of the authentication form and emits loading and error events accordingly.
…Point for clarity and consistency ✨ feat(PaymentIntent.vue): refactor component to use the useElement composable for improved code organization and reusability The ref `stripeElementMountPoint` has been renamed to `mountPoint` to improve clarity and consistency with other variable names. The component has been refactored to use the `useElement` composable, which provides a cleaner and more organized way to handle the creation and mounting of the payment element. This refactor also improves reusability of the component by separating concerns and making it easier to understand and maintain.
…reation and mounting The `useElement` composable is added to handle the creation and mounting of elements. It exports functions for creating an element, mounting it to a mount point, and handling various element events such as change, ready, focus, blur, and escape. This composable utilizes the `vue-demi` library's `ref` function to create reactive references for the element and loading state.
…elements initialization The `useElements` composable is added to handle the initialization of Stripe elements. It uses the `inject` function from `vue-demi` to retrieve the `stripe-instance` from the parent component. The `initializeElements` function takes a `clientSecret` and `options` as parameters and returns the initialized elements. This composable provides a convenient way to handle the initialization of Stripe elements in Vue components.
…e for clarity and consistency 🔧 chore(use-stripe.js): remove unused initElements function The function initStripe has been renamed to initializeStripe to improve clarity and consistency with other function names. The unused function initElements has been removed to eliminate unnecessary code.
The new banner image has been added to enhance the visual appeal of the application.
The README.md file has been updated to include a new banner image and updated headings. The banner image now displays a Vue Stripe logo, and the headings have been styled to match the design of the project.
…ents function to improve consistency 🔀 refactor(use-stripe.js): remove unused console.log statements and provide injection of 'stripe-instance' 🔀 chore(index.js): import and export useElements from use-elements.js The parameter order in the initializeElements function in use-elements.js has been changed to improve consistency with other functions. The console.log statements in use-stripe.js have been removed as they were no longer needed. The provide injection of 'stripe-instance' in use-stripe.js has been removed as it was not being used. The useElements function has been imported and exported in index.js to make it available for use.
…structure The cleanUrls option is set to 'with-subfolders' to improve the URL structure of the website. This will remove the file extensions from the URLs and create cleaner and more user-friendly URLs with subfolders.
…e Stripe components and composables
The commit removes unused dependencies in the docs cache directory. These files were no longer needed and were deleted to clean up the repository. Refactor the docs cache by removing unused dependencies
…ymentElementDemo component import
The LinkAuthentication component has been removed from the project. This component was no longer being used and has been deleted to clean up the codebase.
refactor: Add PaymentElement component This commit adds the PaymentElement component, which is responsible for rendering the payment element on the page. It imports necessary dependencies, defines props and emits, and initializes the element when props change. The component also handles loading and error states.
This commit removes the unused `loading` variable in the `useElement` composable and deletes the `useElements` composable file, which is no longer needed. Refactor the code to improve readability and remove unnecessary files.
- Added AddressElement component for collecting billing and shipping addresses - Created demos for shipping and billing address modes - Updated documentation with usage instructions, props, events, and methods - Updated index.js to export AddressElement component
- Updated the link text in the Vue 2 Support section of the documentation from "Intro" to "README".
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Visit the preview URL for this PR (updated for commit f88f5c0): https://vue-stripe-docs-next--pr355-refactor-next-8blohg0l.web.app (expires Mon, 18 Nov 2024 01:41:34 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: 589eb374829fa7138896d3de1d01ef17abfdf50e |
@jofftiquez Thank you for all of your work on this! When are you expecting next release to support the new Elements? |
Thank you for the appreciation, man! I'm in the final testing now, all the components and composables are working now. I just need to complete the guide a bit more. I'm guessing in a few days, worst case next week. I have a lot of time this coming weekend. I'll keep y'all posted. Thanks! |
@jofftiquez any ETA on this getting merged ? if not soon, would it be possible to release this as alpha/beta/rc in the meantime ? |
This commit adds two new components, AuBankAccountElement and IbanElement, to the project. These components are used for handling Australian bank account and IBAN inputs respectively. They are implemented using the vue-demi library and follow the same structure as other elements in the project. The AuBankAccountElement component is responsible for rendering and managing the AU_BANK_ACCOUNT_ELEMENT_TYPE element, while the IbanElement component handles the IBAN_ELEMENT_TYPE element. Both components have similar logic for initializing the elements, mounting them to the DOM, and handling various events. This commit also includes the necessary changes to the index.js file to export the new components.
@jofftiquez Can you please post an ETA? |
@jofftiquez do you need any help? |
This version includes: