How to use @webex/common - 9 common examples

To help you get started, we’ve selected a few @webex/common examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github webex / react-widgets / packages / node_modules / @ciscospark / react-component-utils / src / activity.js View on Github external
export function constructActivityEventData(activity) {
  const hydraActivity = Object.assign({}, activity);

  hydraActivity.actorId = base64.encode(`ciscospark://us/PEOPLE/${activity.actor.id}`);
  // Base64 encode uuids
  hydraActivity.id = base64.encode(`ciscospark://us/MESSAGE/${activity.id}`);
  hydraActivity.roomId = base64.encode(`ciscospark://us/ROOM/${activity.target.id}`);
  hydraActivity.target = Object.assign({}, activity.target, {
    id: base64.encode(`ciscospark://us/ROOM/${activity.target.id}`)
  });

  return hydraActivity;
}
github webex / react-widgets / packages / node_modules / @ciscospark / react-component-utils / src / activity.js View on Github external
export function constructActivityEventData(activity) {
  const hydraActivity = Object.assign({}, activity);

  hydraActivity.actorId = base64.encode(`ciscospark://us/PEOPLE/${activity.actor.id}`);
  // Base64 encode uuids
  hydraActivity.id = base64.encode(`ciscospark://us/MESSAGE/${activity.id}`);
  hydraActivity.roomId = base64.encode(`ciscospark://us/ROOM/${activity.target.id}`);
  hydraActivity.target = Object.assign({}, activity.target, {
    id: base64.encode(`ciscospark://us/ROOM/${activity.target.id}`)
  });

  return hydraActivity;
}
github webex / react-widgets / packages / node_modules / @ciscospark / react-component-utils / src / activity.js View on Github external
export function constructActivityEventData(activity) {
  const hydraActivity = Object.assign({}, activity);

  hydraActivity.actorId = base64.encode(`ciscospark://us/PEOPLE/${activity.actor.id}`);
  // Base64 encode uuids
  hydraActivity.id = base64.encode(`ciscospark://us/MESSAGE/${activity.id}`);
  hydraActivity.roomId = base64.encode(`ciscospark://us/ROOM/${activity.target.id}`);
  hydraActivity.target = Object.assign({}, activity.target, {
    id: base64.encode(`ciscospark://us/ROOM/${activity.target.id}`)
  });

  return hydraActivity;
}
github webex / react-widgets / packages / node_modules / @ciscospark / react-component-utils / src / activity.js View on Github external
export function constructActivityEventData(activity) {
  const hydraActivity = Object.assign({}, activity);

  hydraActivity.actorId = base64.encode(`ciscospark://us/PEOPLE/${activity.actor.id}`);
  // Base64 encode uuids
  hydraActivity.id = base64.encode(`ciscospark://us/MESSAGE/${activity.id}`);
  hydraActivity.roomId = base64.encode(`ciscospark://us/ROOM/${activity.target.id}`);
  hydraActivity.target = Object.assign({}, activity.target, {
    id: base64.encode(`ciscospark://us/ROOM/${activity.target.id}`)
  });

  return hydraActivity;
}
github webex / react-widgets / test / journeys / lib / hydra.js View on Github external
export function deconstructHydraId(id) {
  const payload = base64.decode(id).split('/');

  return {
    id: payload.pop(),
    type: payload.pop()
  };
}
github webex / react-widgets / test / journeys / lib / hydra.js View on Github external
export function constructHydraId(type, id) {
  return base64.encode(`ciscospark://us/${type.toUpperCase()}/${id}`);
}
github webex / react-widgets / rollup.config.js View on Github external
generateScopedName: (name, filename, css) => {
          let componentName;
          const cssHash = base64.encode(css).substring(0, 8);
          const paths = filename.split('/');
          let index = paths.indexOf('@ciscospark');

          if (index === -1) {
            index = paths.indexOf('@webex');
          }

          if (index !== -1) {
            componentName = paths[index + 1];
          }
          else {
            componentName = filename;
          }

          return `${componentName}__${name}__${cssHash}`;
        }
github webex / react-widgets / packages / node_modules / @ciscospark / react-component-utils / src / uuid-utils.js View on Github external
export function deconstructHydraId(id) {
  const payload = base64.decode(id).split('/');

  return {
    id: payload.pop(),
    type: payload.pop()
  };
}
github webex / react-widgets / packages / node_modules / @ciscospark / react-component-utils / src / uuid-utils.js View on Github external
export function constructHydraId(type, id) {
  return base64.encode(`ciscospark://us/${type.toUpperCase()}/${id}`);
}

@webex/common

Common utilities for Cisco Webex

MIT
Latest version published 19 days ago

Package Health Score

90 / 100
Full package analysis

Similar packages