npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

vue2-postmonger

v1.0.7

Published

Postmonger implementation for the Salesforce Marketing Cloud custom activity development

Downloads

12

Readme

This is postmonger wrapper for Vue.js 2

Installation:

npm i vue2-postmonger

Global install:

import Vue from 'vue';
import VuePostmonger from 'vue2-postmonger';

Vue.use(VuePostmonger);

Local installation (preffered):

import VuePostmonger from 'vue2-postmonger/mixin.js';

export default {
    mixins: [VuePostmonger],
    data() {},
}

Mixin runs in mounted hook and triggers ready. Then mixin will do request to /ui/auth enpoint to get token. To change endpoint change prop in your component data:

data() {
    return {
        routes: {
            auth: '/ui/auth', // default endpoint
        },
    }
} 

Or set routes.auth to null if you don't need to get tokens.

The plugin is using axios for auth calls. Set axios.defaults.baseURL to add your baseUrl to all axios queries or modify routes.auth.

If initialization was successful then it runs this.loaded() method that you have to implement on your side. On this step activity is loaded and you can access majority of properties or run methods described bellow.

Behavior description of implemented postmonger methods:

  1. updateButton() - update this.button and run this method to update button
  2. requestSchema() - writes data to this.schema and returns it
  3. requestTokens() - writes data to this.tokens.token, this.tokens.fuel2token and returns it
  4. requestTriggerEventDefinition() - writes data to this.deid and returns it
  5. requestInteraction() - writes data to this.interaction and returns it
  6. initActivity() - writes data to this.activity and returns it
  7. updateActivity() - update this.activity and run this method to update activity
  8. onClickedNext(callback)
  9. onClickedBack(callback)
  10. onGoToStep(callback)
  11. nextStep()
  12. previousStep()
  13. prevStep()
  14. requestDataSources() - writes data to this.dataSource and returns it
  15. registerAllowedOriginResponse() - writes data to this.registeredAllowedOriginResponse and returns it
  16. requestInteractionGoalStats() - writes data to this.interactionGoalStats and returns it
  17. requestActivityPermissions() - writes data to this.activityPermissions and returns it
  18. requestEngineSettings() - writes data to this.engineSettings and returns it
  19. requestDataLibrarySource() - writes data to this.dataLibrarySource and returns it
  20. requestContactsSchema() - writes data to this.contactsSchema and returns it
  21. requestExpressionBuilderAttributes() - writes data to this.expressionBuilderAttributes and returns it
  22. requestUserTimeZone() - writes data to this.userTimeZone and returns it
  23. requestEntryEventDefinitionKey() - writes data to this.entryEventDefinitionKey and returns it
  24. requestI18nConfig() - writes data to this.i18nConfig and returns it
  25. requestActivityPayload() - writes data to this.activityPayload and returns it

Author: Dmitrii Averin