Giter Site home page Giter Site logo

jerrywu001 / vue3-toastify Goto Github PK

View Code? Open in Web Editor NEW
364.0 364.0 30.0 712 KB

🎉 Vue3-Toastify allows you to add notifications to your app with ease.

Home Page: https://vue3-toastify.js-bridge.com

License: MIT License

JavaScript 5.03% Shell 0.16% TypeScript 66.34% HTML 0.75% Vue 14.32% CSS 0.59% SCSS 12.81%
alert notification toast vue3

vue3-toastify's Introduction

Requirements

vue version >=3.2.0

Installation

npm install --save vue3-toastify
# yarn add vue3-toastify

Demo

A demo is worth a thousand words

备用地址

Document

Check the documentation to get you started!

备用地址

The gist

<template>
  <div>
    <button @click="notify">Notify !</button>
  </div>
</template>

<script>
import { toast } from 'vue3-toastify';
import 'vue3-toastify/dist/index.css';

export default {
   name: "App",
   setup() {
    const notify = () => {
      toast("Wow so easy !", {
        autoClose: 1000,
      }); // ToastOptions
    }
    return { notify };
   }
};
</script>

Init/Update Global Props

// main.ts
import Vue3Toastify, { type ToastContainerOptions } from 'vue3-toastify';

app.use(Vue3Toastify, {
  autoClose: 3000,
} as ToastContainerOptions);
// tsconfig.json
{
  "compilerOptions": {
    "types": [
      "vue3-toastify/global"
    ]
  }
}

or

updateGlobalOptions({ rtl: true });

toast.success('Wow so easy!');

nuxt

A nuxt demo

  • plugins/vue3-toastify.ts
import Vue3Toastify, { toast } from 'vue3-toastify';
import 'vue3-toastify/dist/index.css';

export default defineNuxtPlugin((nuxtApp) => {
  nuxtApp.vueApp.use(Vue3Toastify, { autoClose: 1000 });

  return {
    provide: { toast },
  };
});
  • demo.vue
<script setup>
// import { toast } from 'vue3-toastify';

nextTick(() => {
  if (process.client) {
    useNuxtApp().$toast('notify after nextTick');
  }
});

const notify = () => {
  useNuxtApp().$toast.info('toastify success');
  // or
  // toast.info('toastify success');
};
</script>

<template>
  <button @click="notify">notify by click</button>
</template>

Using the ES Module Build

jsfiddle demo

<html lang="en">

<head>
  <link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/index.css" rel="stylesheet" />
  <title>Using the ES Module Build</title>
</head>

<body>
  <div id="app">
    <button @click="notify">show toast</button>
    <span>&nbsp;&nbsp;</span>
    <button @click="dismiss">dismiss</button>
  </div>
  <script type="importmap">
    {
      "imports": {
        "vue": "https://unpkg.com/vue@3/dist/vue.esm-browser.js"
      }
    }
  </script>
  <script type="module">
    import { createApp } from 'vue'
    import { toast } from 'https://unpkg.com/[email protected]/dist/index.mjs'

    createApp({
      data() {
        return {
          toastId: '',
          toastIds: [],
        };
      },
      methods: {
        notify() {
          const toastId = toast.info(
            'hello',
            {
              rtl: true,
              limit: 3,
              position: toast.POSITION.BOTTOM_CENTER,
            },
          );
          this.toastIds.push(toastId);
        },
        dismiss() {
          console.log(this.toastIds)
          this.toastIds.forEach(id => {
            toast.remove(this.toastId);
          });
          /* toast.clearAll() */;
        },
      }
    }).mount('#app')
  </script>
</body>

</html>

Sponsors

Special Sponsor

special sponsor appwrite

vue3-toastify's People

Contributors

jerrywu001 avatar marquaye avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

vue3-toastify's Issues

Routing hides toast instantly.

Hi,

Is there a reason why the toast code is hiding the toast when you do a route to another location in a project?
Can I configure the toast to defeat this "hide on route"-functionality? ;)

My current workaround:

setTimeout(function () { 
  toast("My Task...");
}, 1);

Toastify stops working when routing

When routing inside the vue3 app, the toasts dissapear with the page and if the new page triggers a new toast, it won't be shown. I have set the clearOnUrlChange: true but this doesn't trigger (fast enough?). I am working with page transitions in vue3. Is there something I'm missing?

remove toasts on router.push()

When a user types incorrect credentials for login I trigger a toast and after use router.push('/login'), this results in the toast being shown for a very short time (< 100ms) and then gets removed.

How do I display a toast independent of router changes?

Issue making a standalone Nuxt wrapper

Hello!
At my company we're looking to make a reusable Nuxt module for this, using the example provided in the README.md.
When trying to package it however, I get the following error:

npm ERR! src/runtime/plugin.ts(5,1): error TS4082: Default export of the module has or is using private name 'ToastPromiseParams'.

I do see in the code that ToastPromiseParams is already exported though... So I'm not sure what the root of the problem is (or if something even can be changed in this repo to fix it).

Steps to reproduce:

git clone https://github.com/ModelW/toast-ts
cd toast-ts
npm ci
npm run dev:build
npm pack

A plugin must either be a function or an object with an "install" function.

按照您的代码:

export default defineNuxtPlugin((nuxtApp) => {
    nuxtApp.vueApp.use(Vue3Toastify, { 
        autoClose: 1000, 
        hideProgressBar: true, 
        clearOnUrlChange: false 
    })
    return {
        provide: { toast },
    }
})

然后nuxt build之后,运行node .output/server/index.mjs
会提示 A plugin must either be a function or an object with an "install" function.
因为Vue3Toastify变成了下面这样,
image,
开发时本来是这样的:
image
所以代码改成这样就不报警告了:

export default defineNuxtPlugin((nuxtApp) => {
    // @ts-ignore
    nuxtApp.vueApp.use(Vue3Toastify.default || Vue3Toastify, { 
        autoClose: 1000, 
        hideProgressBar: true, 
        clearOnUrlChange: false 
    })
    return {
        provide: { toast },
    }
})

想知道这种情况您有什么更好的办法吗,您那个stackblitz的示例也有这个问题

how to get toast dom by id

import { toast, getToast } from 'vue3-toastify';
const id = toast('message', {});
console.log(getToast(id)) // => undefined ?

pauseOnFocusLoss do work

It seams that pauseOnFocusLoss do work if window not focused when toast created.
It does work if toast was created during window was active and loss focus during autoClose timeout
Was this how it was intended?

Toast container not getting removed when calling remove, toasts not showing configured limit.

See https://codesandbox.io/s/vue3-ts-forked-lcnm3e?file=/src/App.vue for running example.

The example above has a configured limit of 3 toasts.

Steps to reproduce. Click notify 3 times, then dismiss before the timeout. Click notify and it seems at most 2 can queue.

Some root cause analysis determined the issue was referencing the method this.remove instead of ToastActions.remove on line: https://github.com/jerrywu001/vue3-toastify/blob/main/src/store/toastContainers.ts#L182

Two apps cannot use vue3-toastify at the same time

In my case I had two apps (different package.json) using toast. One of only custom components (web components).
For some reason, when one used toast, the other couldn't (they are not displayed, without error).

My solution:

main.ts (top-first app)

import 'vue3-toastify/dist/index.css';
import Vue3Toastify, { toast, type ToastContainerOptions } from 'vue3-toastify';
(window as any).toast = toast;
app.use(Vue3Toastify, {
     autoClose: 3000, theme: "dark"
} asToastContainerOptions);

(second app)

shared/getGlobalToast.ts

import { toast } from "vue3-toastify";
export function getGlobalToast() {
    if ((window as any).toast == null) return toast;
    type MY_TYPE = typeof toast;
    return (window as any).toast as MY_TYPE;
}

(anywhere in second app)

  getGlobalToast().success(`...`);

Luckily the Typo is not lost

I found a other way for use it in nuxt3.

file: @/plugins/vue3-toastify.client.ts

`import toastify, { toast } from 'vue3-toastify';
import 'vue3-toastify/dist/index.css';
const options = {
position:'top-center',//top-left,top-center,top-right,bottom-left,bottom-center,bottom-right
autoClose:4000,
hideProgressBar:true,
closeButton:true,
theme:'auto',//auto,colored,dark,light
transition:'bounce',//bounce,flip,slide,zoom
pauseOnFocusLoss:true,
pauseOnHover:true,
rtl:false,
style: {
opacity: '0.95',
userSelect: 'none',
zIndex:'20'
},
};

export default defineNuxtPlugin((nuxtApp) => {
nuxtApp.vueApp.use(toastify,options);
return {provide:{toast}};
})`

any view page

useNuxtApp().$toast.info('toastify success');
or
this.$toast.success('toastify is word');

toast not rendered properly on page after NProgress executed

I have a vue page build with Laravel Inertiajs

after having page interactions with backend, which will trigger Inertiajs' progress loading bar, which is NProgress under the hood. toastify styling is broken

these are the rendered toast

<div id="rbkw9fi" class="Toastify__toast Toastify__toast-theme--nprogress-busy Toastify__toast--success" data-testid="toast-item-rbkw9fi">
<div id="h974b8c" class="Toastify__toast Toastify__toast-theme-- Toastify__toast--warning" data-testid="toast-item-h974b8c">

these are the class when before having any inertiajs progress loading
Toastify__toast Toastify__toast-theme--light Toastify__toast--warning

i tested to disable inertiajs progress loading bar, the issue is gone, but that's not the solution. any help?

Installation fails: rimraf: not found

Hi, on attempting to install I get an error

$ npm install --save vue3-toastify
npm ERR! code 127
npm ERR! path /home/tomas/code/pesto-client/node_modules/vue3-toastify
npm ERR! command failed
npm ERR! command sh -c -- rimraf rf ./node_modules/@types/react
npm ERR! sh: 1: rimraf: not found

Module parse failed: Unexpected token

Cannot make it work in vue3 project, it was working some days ago, some hint?

Error in ./node_modules/vue3-toastify/dist/esm/index.js

Module parse failed: Unexpected token
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders

| }
| function oe(e) {
>   return (se(e.content) ? T(e.content.props) : null) ?? T(e.data ?? {});
| }
| function Fe(e) {

@ ./src/main.ts 16:0-52 97:10-22 98:14-19 100:11-16
@ multi (webpack)-dev-server/client?http://192.168.1.55:8080&sockPath=/sockjs-node (webpack)/hot/dev-server.js ./src/main.ts

Toasts not displaying after clearAll is called and limit set

Steps to reproduce:

  1. Navigate to https://vue3-toastify.js-bridge.com/
  2. Set limit to 5
  3. Click 'normal toast' 5 times
  4. Click 'unmount all container' (e.g. toasts.clearAll())
  5. Before the animation completes, repeatedly click 'normal toast'
  6. Toasts are no longer displayed

We have toasts being created asynchronously (not user driven interaction) and when clearAll is called by the user there appears to be a race condition where the toast is queued but there are no toast containers. This prevents toasts from being displayed from subsequent toast calls.

I've logged inside openToast and watingForQueue and seen that once this condition occurs, displayedCount is 0, queue.items.length > 0. There is a main condition in openToast that checks if the queue is empty, and if so, only then it will append the toast.

// toast.tsx L69

else if (!queue.items.length) {
  doAppend(content, options);
}

In general we've also found other instances where limit is not being respected (showing more or less than configured). Will report issues when a reproducible test is found for those cases.

Update and autoClose

It seams that update does not ignores autoClose

Original toast
toast.error("Error message", { toastId: 'status', autoClose: false, theme: 'colored', hideProgressBar: true });
And updated
toast.update('status', { type: "success", render: "Success", autoClose: 1500, theme: 'colored', hideProgressBar: true });
And updated toast do not close it

Using vuetify components inside a custom component "Failed to resolve component"

In my project I have installed and configured vuetify correct and it is working everywhere.
But when I use some vuetity components inside a Toast component I get the error "Failed to resolve component: v-card"

component:

<template>
	<div>
		<v-card title="title"> </v-card>
	</div>
</template>

<script setup lang="ts">
	import { PropType } from "vue";
	import type { ToastOptions } from "vue3-toastify";
	defineProps({
		closeToast: {
			type: Function as PropType<(e?: MouseEvent) => void>,
			required: true,
		},
		toastProps: {
			type: Object as PropType<ToastOptions>,
			required: true,
		},
	});
</script>

<style scoped></style>

call of the custom compnent:

import ToastComponent from "./ToastComponent.vue";

export function failure(message: string, error: any) {
	toast(ToastComponent, {
		closeOnClick: false,
		position: toast.POSITION.BOTTOM_CENTER,
		data: error,
		type: toast.TYPE.ERROR,
		autoClose: false,
	});
}

How can I use vuetify components inside a custom toast component?

Issue on Promise Toast in TOP position

Hi,

I really like your component and I wanted to go next level and use the Promise feature for the app I'm working on.
I have a weird issue and I don't really a way of solving it without having your help.

In my component MyAccount.vue, I've a form with user information and the user can update his infos.

There is a Promise since i'm using an API.

If the toast is on the bottom there is no issue, but when the toast is on the top, there is the rainbow color on the top of the toast.
Can't really use that in my app, sometime the same issue appear on your demo and I have the same issue when I edit your documentation :

https://vue3-toastify.js-bridge.com/usage/promise.html#toast-promise

toast.promise(
    resolveAfter3Sec,
    {
      pending: 'Promise is pending',
      success: 'Promise resolved 👌',
      error: 'Promise rejected 🤯',
    },
    {
      position: toast.POSITION.TOP_RIGHT,
      transition: toast.TRANSITIONS.FLIP
    },
  );

https://github.com/jerrywu001/vue3-toastify/assets/11020188/0d5a0063-4297-4bd8-9b77-8070623a0500
https://github.com/jerrywu001/vue3-toastify/assets/11020188/ec4025bb-7500-425d-a5ec-394cd7aa3371

Would be an awesome fix.

Thank you.
Don't hesitate if I can be of any help.

how to use it in nuxt3.like this example but not work.

in @/plugins/vue3toastify.client.ts

import Vue3Toasity from 'vue3-toastify';
import 'vue3-toastify/dist/index.css';

export default defineNuxtPlugin((nuxtApp) => {
nuxtApp.vueApp.use(Vue3Toasity,
{
autoClose: 3000,
},
);
})

Global ToastContainerOptions not working

I cant get the global options working in my vite / vue3 project... I have the following Setup:

i installed the version 0.1.14 and changed the types in tsconfig.ts to "types": ["vue3-toastify/global"]

My files:

//plugins/toastify.ts
export const toastOptions = {
    newestOnTop: true,
    dangerouslyHTMLString: true,
    transition: toast.TRANSITIONS.FLIP,
    position: toast.POSITION.BOTTOM_LEFT,
    limit: 5,
    autoClose: AUTO_CLOSE.DEFAULT,
    clearOnUrlChange: false,
} as ToastContainerOptions
//main.ts
import Vue3Toastify from 'vue3-toastify'
import {toastOptions} from "@/plugins/toastify";
import App from '@/App.vue'

const app = createApp(App)
app.use(Vue3Toastify, toastOptions)
//Home.vue
<template></template>
import {toast} from "vue3-toastify";
export default {
  setup() {
    toast.success('test')
  }
}

But the global settings are ignored.

It only works, if i add the updateGlobalOptions to the Home Component like:

//Home.vue
<template></template>
import {toastOptions} from "@/plugins/toastify";
import {toast, updateGlobalOptions} from "vue3-toastify";

export default {
  setup() {
    updateGlobalOptions(toastOptions)
    toast.success('test')
  }
}

But this will only work for the current Home Component. I tried placing the updateGlobalOptions in the App.vue, main.ts... nothing works :(

config to show one at a time

Hello,

Unless I'm missing something in the docs, it would be great to have the option of only showing one notification at a time rather than stacking them.

Notification not showing after redirection

Hello,

I'm using nuxt 3, I want to show toast info after success login, the popup shows for less then a second, here is my code

# stores/Auth.js

// some await useFetch functions
toast.info('Welcome', {
  duration: 5000,
})

return navigateTo('/')

Changing Icons globally

Hi and thanks for your great package !
I would like to konw if there is a way to change the icons globally in the project ?

Using 'limit' param can break promise toasts

Demo:
Notice the promise modals do not close until removed and restarted manually.
https://jam.dev/c/628dd8da-b239-46ab-afc4-db5d063a5f26

Reproduce:

  • Go to the demo page @ https://vue3-toastify.js-bridge.com/
  • Set the 'Limit' to something, e.g. 5 (doesn't matter what as long as it's set)
  • Press the 'with promise' button
  • While the promise toasts are open, press the 'normal toast' button several times, so the queued toasts exceed the limit number

Expected:
Queued toasts show, and the promise toasts complete

Actual:
Queued toasts show, but the promise toasts never complete

Notes:
Appears to require a combination of limit + promise + normal + a queue/backlog of toasts to cause the issue.

Persist toasts across router changes

Hello. Nice Toast but...

I'm using Nuxt3 SPA, and when I change the route with router.push("/") then any toasts close immediately rather than waiting for the set timeout.

  • It happens even if I call the toast from the root app, not from within a page.
  • It also happens even if I set autoClose to false

Is there a way to persist the toasts so they don't close when the route changes?

Thanks

toast.promise doesn't apply `toastClassName`

Hi, I'm trying to add toastClassName to a promise, but it seems the class is not being added

toast.promise(
  promise,
  {
    pending: ...,
    success: ...,
    error: ...,
  },
  {
    toastClassName: 'toast-review', // <- this is not working
    position: toast.POSITION.BOTTOM_RIGHT,
  },
)

no toast-review in the div

Screenshot 2023-09-22 at 11 30 40 pm

but when I update the toast, it works:

toast.update(id, {
  render: 'Lease saved',
  autoClose: 200,
  closeOnClick: true,
  close-button: true,
  type: 'success',
  isLoading: false,
  toastClassName: 'toast-review',
})

Toastify from cdn not working

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Vue Toastify Example</title>
    <script src="https://unpkg.com/vue@latest"></script>
    <script src="https://unpkg.com/vue-toastify@latest"></script>
</head>
<body>
    <div id="app">
        <button @click="showToast">Show Toast</button>
    </div>

    <script>
        const app = Vue.createApp({
            methods: {
                showToast() {
                    toast("Hello! Wow so easy!", {
                    "theme": "auto",
                    "type": "default",
                    "dangerouslyHTMLString": true
                    })
                }
            }
        });

        app.mount('#app');
    </script>
</body>
</html>

obraz_2024-05-19_214959054

ignore vscode inject

Position property don´t work in global config and Nuxt 3

Position don´t work in Nuxt 3

My global config in plugins file

import { toast, updateGlobalOptions } from 'vue3-toastify';
import 'vue3-toastify/dist/index.css';

export default defineNuxtPlugin((nuxtApp) => {
  nuxtApp.vueApp.config.globalProperties.Vue3Toastify = {
    install: () => {
      updateGlobalOptions({ autoClose: 5000, pauseOnFocusLoss: false, position: toast.POSITION.TOP_CENTER });
    },
  };

  return {
    provide: {
      toast,
    },
  };
});

Stackblitz reproduction
https://stackblitz.com/edit/nuxt-starter-5man4a?file=plugins%2Fvue3-toastify.ts

[Request] Smoother v-move animation

Currently there doesn't seem to be a v-move animation set when the option of newest on top is selected. Instead of an animation where the older toasts snap to the beneath the newest one, would it be possible to get a smoother transition?

Text on multiline or HTML

So I would like to have a more complicated toast msg than just a text...
How can I do a multiline msg? like
toast.success("Your registration was successfull!\n\nYou can log-in now")

I would not actually do that, but it's an example... I have many occasions to use multiline msg

also sometimes I would like to use some HTML inside like
toas.success("You have topped-up your account\nYour new balance is <b>10,000</b> sausages");

Is there a way to do it?

Toast options don't affect toast.promise

Hey, it seems that specifying options on toast.promise does not actually do anything. It'd be nice to have support for autoClose & dismiss on click for those as well.

can it be in 1 file?

hi
where i can get 1 file of this plugin?
i use vue like src=../js/vue.js in plain js, without any frameworks or builders
and my project is local, without internet
with npm it didnt work, many errors when i try to use like src='"../" because it use many import without .js

toast.update and autoClose reset millisec

I'm trying to update a toast with new autoClose value but the updated toast seem to run on the original toast's autoClose value. If i set 5000 on original toast and 10000 on the updated toast and wait 4 seconds before updating then I will only have 6 seconds left on the updated toast.

Maybe this is a feature and not a bug, if it is a feature I would like to suggest that this can be implemented.

I'm using 0.2.1

const undo = () => toastId.value = toast(
          ToastComp,
          {
            position: toast.POSITION.BOTTOM_RIGHT,
            type: 'info',
            closeOnClick: false,
            theme: 'colored',
            autoClose: 5000,
            data: { title: 'title', buttonText: 'Undo', deleted: true },
          },
        )
            toast.update(toastId.value, {
            render: SuccessToast,
            theme: 'colored',
            type: 'success',
            autoClose: 10000,
          })

Feature request: Persistant toaster when page changes

Hello,
I have used this library in multiple of my own projects, and have found to be truely the perfect solution for my needs except for one thing.

When the page URL window.location.href changes, the toasters are all cleared. I want a way to disable this. Since i do want the toaster to persist in my application especially when i am navigating with vue router using router.push (It's not a page reload).

An example scenario is for example when logging in a user,
On successful login i want to show a toaster that will remain as they are being navigated away from login and to the homepage for example.

Current behaviour would clear the toaster the min a change in window.location.href occurs.

Can this be added as an toast option?

Nuxt not Updating Toast

Hi, love the module. Though, I'm struggling to update the Toast within a nuxt 3 app.

    const toastId = useNuxtApp().$toast.loading('I'm Loading!...', { timeout: -1 });  
    console.log(toastId)
    useNuxtApp().$toast.update(toastId, {
        render: 'Not loading anymore',
        autoClose: true,
        closeOnClick: true,
        closeButton: true,
        type: 'success',
        isLoading: false,
    });

How to install in main.js? not in main.ts

I am triyng to install in vue3 project without typescript but it doesnt works. The images show the problem.

I cant use main.ts.

I will be very grateful if you show me how to use in a SFC component with the correct import in the main.js

Thanks for help.

Captura de pantalla 2023-06-01 154150
Captura de pantalla 2023-06-01 154212

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.