How to use the ringcentral-widgets/lib/withPhone function in ringcentral-widgets

To help you get started, we’ve selected a few ringcentral-widgets 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 ringcentral / ringcentral-js-widgets / packages / glip-widgets / containers / GlipChat / index.js View on Github external
atRender: getAtRender({
      glipGroups,
      glipPersons,
      onViewPersonProfile,
      onViewGroup,
    }),
    viewProfile(personId) {
      if (personId) {
        onViewPersonProfile(personId);
      }
    },
    dateTimeFormatter,
  };
}

const GlipChatPage = withPhone(
  connect(
    mapToProps,
    mapToFunctions,
  )(GlipChatPanel),
);

export default GlipChatPage;
github ringcentral / ringcentral-js-widgets / packages / glip-widgets / containers / GlipGroups / index.js View on Github external
glipGroups.updateFilter({ pageNumber });
    },
    updateContactSearchFilter(searchFilter) {
      contacts.updateFilter({ searchFilter });
    },
    async createTeam({ teamName, selectedContacts }) {
      const groupId = await glipGroups.createTeam(
        teamName,
        selectedContacts.map((sc) => sc.email),
      );
      onSelectGroup(groupId);
    },
  };
}

const GlipGroupsPage = withPhone(
  connect(
    mapToProps,
    mapToFunctions,
  )(GlipGroupsPanel),
);

export default GlipGroupsPage;
github ringcentral / ringcentral-embeddable / src / containers / MainView / index.js View on Github external
}
function mapToFunctions(_, {
  phone: {
    routerInteraction,
  }
}) {
  return {
    goTo: (path) => {
      if (path) {
        routerInteraction.push(path);
      }
    },
  };
}

const MainView = withPhone(connect(
  mapToProps,
  mapToFunctions
)(TabNavigationView));

export default MainView;
github ringcentral / ringcentral-embeddable / src / containers / CallsListPage / index.js View on Github external
callLogSection.handleLogSection(call);
            } else {
              callLogger.logCall({
                call,
              });
            }
          }}
          currentLocale={locale.currentLocale}
          logTitle={callLogger.logButtonTitle}
        />
      );
    },
  };
}

const CallsListPage = withPhone(connect(mapToProps, mapToFunctions)(CallsListPanel));

export default CallsListPage;
github embbnux / SimpleGlip / src / containers / MainView / index.js View on Github external
routerInteraction,
  }
}) {
  return {
    onSelectMenu: (menu) => {
      if (menu && menu.path) {
        routerInteraction.push(menu.path);
      }
    },
    onClickAvatar: () => {
      routerInteraction.push('/glip/persons/me');
    }
  };
}

const MainView = withPhone(connect(
  mapToProps,
  mapToFunctions
)(SideBarView));

export default MainView;
github embbnux / SimpleGlip / src / containers / GlipGroups / index.js View on Github external
glipGroups.updateFilter({ searchFilter });
    },
    onNextPage: (pageNumber) => {
      glipGroups.updateFilter({ pageNumber });
    },
    updateContactSearchFilter: (searchFilter) => {
      contacts.updateFilter({ searchFilter });
    },
    createTeam: async ({ teamName, selectedContacts }) => {
      const groupId = await glipGroups.createTeam(teamName, selectedContacts.map(sc => sc.email));
      routerInteraction.push(`/glip/groups/${groupId}`);
    }
  };
}

const GlipGroupsPage = withPhone(connect(
  mapToProps,
  mapToFunctions
)(GlipGroupsPanel));

export default GlipGroupsPage;
github ringcentral / ringcentral-embeddable / src / containers / SettingsPage / index.js View on Github external
thirdPartyService,
    settingsPageUI,
  } = phone;
  return {
    ...settingsPageUI.getUIFunctions({ phone, ...props }),
    onAutoLogChange(autoLog) { callLogger.setAutoLog(autoLog); },
    onAutoLogSMSChange(autoLog) { conversationLogger.setAutoLog(autoLog); },
    onThirdPartyAuthorize: () => thirdPartyService.authorizeService(),
    onFeedbackSettingsLinkClick() {
      thirdPartyService.onShowFeedback();
    },
    onSettingToggle: setting => thirdPartyService.onSettingToggle(setting),
  };
}

const SettingsPage = withPhone(connect(
  mapToProps,
  mapToFunctions,
)(NewSettingsPanel));

export default SettingsPage;
github embbnux / SimpleGlip / src / containers / GlipPersonProfile / index.js View on Github external
phone: {
    routerInteraction,
    glipGroups,
  }
}) {
  return {
    startChat: async (personId) => {
      const group = await glipGroups.startChat(personId);
      if (group) {
        routerInteraction.push(`/glip/groups/${group.id}`);
      }
    },
  };
}

const GlipPersonProfilePage = withPhone(connect(
  mapToProps,
  mapToFunctions
)(GlipPersonProfile));

export default GlipPersonProfilePage;
github embbnux / SimpleGlip / src / containers / GlipChat / index.js View on Github external
}
      };
      return (
        <a href="{`#${id}`}">@{name}</a>
      );
    },
    viewProfile: (personId) =&gt; {
      if (personId) {
        routerInteraction.push(`/glip/persons/${personId}`);
      }
    },
    dateTimeFormatter,
  };
}

const GlipChatPage = withPhone(connect(
  mapToProps,
  mapToFunctions
)(GlipChatPanel));

export default GlipChatPage;
github ringcentral / ringcentral-embeddable / src / containers / AlertContainer / index.js View on Github external
rateLimiter,
    brand,
    routerInteraction,
    regionSettingsUrl,
    callingSettingsUrl,
  }),
}) {
  return {
    getRenderer,
    dismiss: (id) => {
      alert.dismiss(id);
    },
  };
}

const AlertContainer = withPhone(connect(
  mapToProps,
  mapToFunctions
)(AlertDisplay));

AlertContainer.propTypes = {
  getRenderer: PropTypes.func,
};
AlertContainer.defaultProps = {
  getRenderer: undefined,
};

export default AlertContainer;

ringcentral-widgets

RingCentral Integration Widget Library

MIT
Latest version published 3 years ago

Package Health Score

43 / 100
Full package analysis

Similar packages