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

@ichicraft/widgets-widget-base

v1.11.4

Published

Part of the Widget Development Kit for building widgets for Ichicraft Boards

Downloads

341

Readme

This package supports development of widgets built using the Widget Development Kit

This package is part of the Widget Development Kit, which is a collection of NPM packages that empower developers to create widgets for Ichicraft Boards.

Changelog

All notable changes to this project will be documented here.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

1.11.4 - 2024-11-08

  • Added driveId property to FilePickerFileProps interface.

1.11.3 - 2024-11-05

  • Added fileName property to FilePickerFileProps interface.

1.11.2 - 2024-10-21

  • Added optional objectId property to the ICPersona interface.

1.11.1 - 2024-10-17

  • Made buddy property of type WidgetBuddyContext optional.

1.11.0 - 2024-10-17

  • Added renderBuddy function to the BaseWidget class, to support rendering widgets as a buddy.
  • Added buddy property of type WidgetBuddyContext to the WidgetContext interface, to support utility functions specifically for a widget buddy.
  • Added setBadgeProperties function to the WidgetBuddyContext interface, to allow rendering a badge on top of the buddy.

1.10.8 - 2024-10-15

  • Added buddybar to the BoardType type, to support widgets that run in the scope of the upcoming buddy bar feature

1.10.7 - 2024-08-20

  • Replaced onInit function with a new asynchronous init function in the BaseWidget class, to allow waiting until initialization is complete.

1.10.6 - 2024-08-19

  • Added userDisplayName property to the WidgetContext interface, to allow using the currently signed-in user's display name in widgets.

1.10.5 - 2024-08-07

  • Added onSearch property to the CommandBarSearchItem interface, to allow executing a callback when the user presses enter in the search box.

1.10.4 - 2024-07-23

  • Added SearchBar value to the CommandBarItemType enum, to allow rendering a command bar item as a search bar.
  • Added CommandBarSearchItem interface, to allow passing extra search-related props to a CommandBarItem of type SearchBar.
  • Added optional overflowButtonIconName and overflowButtonTooltip properties to the CommandBarTabOptions interface, to allow customization of the overflow menu button.
  • Added optional itemCount property to the CommandBarTab interface.
  • Added summaries to functions and interfaces related to widget command bar tabs.

1.10.3 - 2024-07-22

  • Added override in package.json to use version 2.3.7 instead of 2.3.6 of requirejs because the latter has vulnerability CVE-2024-38999

1.10.2 - 2024-07-19

  • Added registerTabs function to the WidgetInstanceContext interface, to allow rendering of tabs in the widget header.
  • Added setSelectedTab function to the WidgetInstanceContext interface, to allow setting the current selected tab in the widget header.
  • Added CommandBarTab interface.
  • Added CommandBarTabOptions interface.

1.10.1 - 2024-07-08

  • Added widget-administrator role to the UserRole type.

1.10.0 - 2024-06-25

  • Added optional updateDataAccess() function to the BaseWidget class, used to update access to widget-specific data.
  • Added administrators property to the WidgetVariantContext interface.

1.9.14 - 2024-06-18

  • Change import of SPFI type to decrease bundle sizes in widgets.

1.9.13 - 2024-06-18

  • Added spHttpClient property to WidgetContext interface, to perform REST calls against SharePoint.
  • Added spHttpClientConfiguration property to WidgetContext interface.

1.9.12 - 2024-06-17

  • Added sp property to WidgetContext interface, to allow using a centralized PnPjs version across all widgets.
  • Added siteId property to WidgetContext interface.
  • Added boardsInstanceId property to WidgetContext interface.

1.9.11 - 2024-06-14

  • Fixed handling of null ICPersonaType values in isCurrentUserInScope function of UserHelper class.

1.9.10 - 2024-06-04

  • Renamed CustomCommandBarItemProps interface to CommandBarItemProps.
  • Merged CommandBarIcon, CommandBarLink and CommandBarItemBase interfaces into the CommandBarItemProps interface, to simplify adding custom command bar items.
  • Added Overflow type to CommandBarItemType enum, to allow rendering an item inside the overflow menu.
  • Added highlighted property to the CommandBarItemProps interface, to allow rendering an item as if it is being hovered.
  • Added cursor property to the CommandBarItemProps interface, to allow a different cursor when hovering over an item.
  • Added disabled property to the CommandBarItemProps interface, to allow rendering an item in a disabled state.

1.9.9 - 2024-05-14

  • Changed return type of createDeepLink function of the WidgetInstanceContext interface from void to string.

1.9.8 - 2024-05-13

  • Added createDeepLink property to the WidgetInstanceContext interface, to allow creating a deep link URL based on the current board and a widget instance.
  • Added setDeepLinkData property to the WidgetInstanceContext interface, to allow setting deep link data related to a widget instance in the URL of the current page.
  • Added getDeepLinkData property to the WidgetInstanceContext interface, to allow getting deep link data related to a widget instance from the URL of the current page.

1.9.7 - 2024-04-19

  • Added hideSpHubNav property to the IFrameDialogOptions interface, to allow hiding the Hub navigation on SharePoint sites.
  • Added hideSpSiteHeader property to the IFrameDialogOptions interface, to allow hiding the site header on SharePoint sites.
  • Added showHistoryButtons property to the IFrameDialogOptions interface, to render back and forward buttons, allowing the user to navigate the browser history.
  • Added showOpenInNewWindow property to the IFrameDialogOptions interface, to render an 'open in new window' button, allowing the user to open the iframe url in a new browser window.

1.9.6 - 2024-04-19

  • Changed onRenderHeaderIcon property of the IFrameDialogOptions interface, to work similarly to the widget render functions.

1.9.5 - 2024-04-18

  • Added title property to the IFrameDialogOptions interface, to allow rendering a title in the dialog header.
  • Added titleUrl property to the IFrameDialogOptions interface, to allow making the dialog header title clickable.
  • Added onRenderHeaderIcon property to the IFrameDialogOptions interface, to allow rendering an icon in the dialog header.
  • Added onLoad property to the IFrameDialogOptions interface, to support executing some code after the iframe finishes loading.

1.9.4 - 2024-04-11

  • Reintroduced the following types: AadHttpClient,AadHttpClientConfiguration,AadHttpClientFactory,AadHttpClientResponse, AadTokenProvider, AadTokenProviderFactory

1.9.2 - 2024-03-21

  • Added CommandBarIcon interface, to allow rendering a CustomCommandBarItem as a single icon or an icon button.
  • Added CommandBarLink interface, to allow rendering a CustomCommandBarItem as a clickable link.
  • Added CommandBarItemBase interface, to act as a base for different types of CustomCommandBarItem.
  • Added elementBorderRadius property to the WidgetContext interface, to allow styling widgets according to the configured design preferences.
  • Changed CustomCommandBarItemProps type to accept either a CommandBarIcon or a CommandBarLink.

1.9.1 - 2023-10-20

  • Added WidgetInstanceContext interface, to allow typing the instance property of the WidgetContext interface.
  • Added WidgetVariantContext interface, to allow typing the definition property of the WidgetContext interface.
  • Added WidgetManifestContext interface, to allow typing the manifest property of the WidgetContext interface.

1.9.0 - 2023-10-20

  • Added optional importData() function to the BaseWidget class, used to import widget-specific data.
  • Added optional exportData() function to the BaseWidget class, used to export widget-specific data.
  • Added new exported ExportData type.

1.8.17 - 2023-10-09

  • Added iconName property to the definition object of the WidgetContext interface, to support using an icon to represent a widget.

1.8.16 - 2023-09-26

  • Added Custom value to ICPersonaType enum, to support a custom ICPersona.

1.8.15 - 2023-09-01

  • Added thumbnailUrl property to WidgetManifestConfig interface, as a non-translatable substitute of the newly deprecated preview_small property from WidgetImages interface.
  • Removed the deprecated preview_small property from WidgetImages interface.

1.8.14 - 2023-09-01

  • Added iconName property to WidgetManifestConfig interface, to support using an icon to represent a widget, e.g. in the widget library or widget header.
  • Removed the deprecated notificationIcon property from WidgetManifestConfig interface.

1.8.13 - 2023-06-08

  • Removed the deprecated resolved property from ICPersona interface

1.8.12 - 2023-04-04

  • Changed openFilePicker function to return more details of the picked file in the shape of FilePickerFileProps

1.8.11 - 2023-04-03

  • Changed openFilePicker function to return more details of the picked file in the shape of FilePickerFileProps

1.8.10 - 2023-03-30

  • Changed openFilePicker function to accept options, to support configuration of picker behavior

1.8.9 - 2023-03-06

  • Added registerCustomCommandBarItems function to the instance object of the WidgetContext interface, to support multiple custom buttons in the widget header.
  • Added unregisterCustomCommandBarItems function to the instance object of the WidgetContext interface, to support removing all custom buttons in the widget header.
  • Added optional id property to exported CustomCommandBarItemProps type, to support removing a custom command bar item by id.
  • Added optional pinned property to exported CustomCommandBarItemProps type, to support forcing the widget header to always be visible.
  • Added optional showNotificationBadge property to exported CustomCommandBarItemProps type, to support showing a red notification badge over the custom command bar item.
  • Added optional order property to exported CustomCommandBarItemProps type, to support changing the order of custom command bar items.
  • Changed unregisterCustomCommandBarItem function of the instance object of the WidgetContext interface, to support removing a custom command bar item by id.

1.8.8 - 2023-02-16

  • Removed all SharePoint and Teams dependencies.

1.8.7 - 2022-12-13

  • Added userRoles property to the WidgetContext interface, to inform widgets of the roles of the current user.
  • Added new exported UserRole type.

1.8.6 - 2022-12-08

  • Added boardType property to the instance object of the WidgetContext interface, to inform widgets of the type of their board.
  • Added allowedBoardTypes property to the definition object of the WidgetContext interface, to inform widget variants of the types of boards it is allowed to be added to.
  • Added new exported BoardType type.

1.8.5 - 2022-09-30

  • Added setWidgetTitleSuffix() function to the instance object of the WidgetContext interface, to support appending the title of the widget with additional text.
  • Added setWidgetSubtitle() function to the instance object of the WidgetContext interface, to support overriding the subtitle of the widget.
  • Added setUserConfigButtonVisibilty() function to the instance object of the WidgetContext interface, to support hiding the settings button from the widget header.
  • Fixed spelling of setWidgetHeaderVisibilty() function. The function is now called setWidgetHeaderVisibility().

1.8.4 - 2022-09-05

  • Added openIFrameDialog() function to the WidgetContext interface. This has the same functionality as the openUrlInDialog() function of the instance object, but adds more control over the dimensions of the dialog. The function openUrlInDialog() is now deprecated.

1.8.3 - 2022-08-16

  • Added openFilePicker() function to the WidgetContext interface to support file selection from within a widget.

1.8.2 - 2022-07-06

  • Added subtitle property to the WidgetResource interface.

1.8.1 - 2022-06-17

  • Added new section analytics to WidgetManifestConfig interface to allow definition of time-based events that can be raised by a widget.
  • Added raiseEvent(...) to the instance object of the WidgetContent interface, allowing widgets to raise an event.

1.7.11 - 2022-03-23

  • Added setWidgetHeaderVisibilty() function to the instance object of the WidgetContext interface, allowing widgets to render in full height.

1.7.9 - 2022-01-20

  • Added userAccountCreated date/time to the WidgetContext interface.

1.7.8 - 2022-01-18

Changed

  • Added initiateWidgetDeletion() function to the WidgetContext interface.

1.7.7 - 2022-01-14

Changed

  • Added tenantId property to the WidgetContext interface.

1.7.6 - 2021-11-04

Changed

  • Added theme property to the WidgetContext interface to give access to currently applied theme.

1.7.5 - 2021-10-26

Changed

  • Added userSecurityGroups and userSharePointGroups properties to the WidgetContext interface to inform widgets of SharePoint and security group memberships of the current user.

1.7.4 - 2021-10-20

Changed

  • Added contentLanguages property to the WidgetContext interface to inform widgets of the available content languages as configured in Ichicraft Boards.

1.7.3 - 2021-10-04

Changed

  • Added manifestVersion property to the WidgetManifestConfig interface to support multiple versions of the manifest. Current version is 2 which introduced this and the externals property.
  • Added externals property to the WidgetManifestConfig interface to support libraries that can be loaded separately from the widget bundle. This reduces widget bundle size and improves overal performance of Ichicraft Boards.

1.6.1 - 2021-02-18

Changed

  • Added userEmail property to the WidgetContext interface to provide current user's email address to widgets.

1.5.0 - 2021-02-16

Changed

  • Added teamsSdk property to the WidgetContext interface to allow interaction with Teams in case widget board is running in Teams client. Will be undefined if running in SharePoint.

1.4.0 - 2021-01-25

Changed

  • Added several properties to the WidgetContext interface to identify the context in which the widget is shown (e.g. Team Browser hosted)

1.3.0 - 2021-01-15

Changed

  • registerCustomCommandBarItem() is added to the WidgetContext interface as a function to call from within a widget instance to render an additional command bar item in the widget header.
  • unregisterCustomCommandBarItem() is added to the WidgetContext interface as a function to call from within a widget instance to remove a previously added command bar item from the widget header.

1.2.0 - 2021-01-15

Changed

  • loadScript() is added to the WidgetContext interface as a function to call from within a widget in case an external script needs to be loaded. This allows the widget board to load external javascript.

1.1.0 - 2021-01-11

Changed

  • handleFatalError() is added to the WidgetContext interface as a function to call from within a widget in case of an unhandled/unresolvable error. This allows the widget board to handle this situation gracefully.
  • deps: removed dependency ajv

<= 1.0.5 - 2020-12-07

No changelog was maintained for the earlier versions.