From ad723c15e4b6325767afff45dc504215622da022 Mon Sep 17 00:00:00 2001 From: Oliver Date: Tue, 3 Nov 2026 15:37:53 +1100 Subject: [PATCH] Update frontend plugin lib (#13173) * Update frontend plugin lib * Bump package.json version --- src/frontend/CHANGELOG.md | 49 ++++++++++++++++++++++++++++++++++++++- src/frontend/lib/index.ts | 10 +++++++- src/frontend/package.json | 2 +- 3 files changed, 58 insertions(+), 3 deletions(-) diff --git a/src/frontend/CHANGELOG.md b/src/frontend/CHANGELOG.md index 217e2b90bc..f7af13746b 100644 --- a/src/frontend/CHANGELOG.md +++ b/src/frontend/CHANGELOG.md @@ -2,7 +2,54 @@ This file contains historical changelog information for the InvenTree UI components library. -### 1.6.0 - November 2026 +### 1.7.0 - November 2026 + +Updated UI components library to match 1.7.0 InvenTree release. + +#### Breaking Changes + +Changes to `ApiEndpoints`: +- Pricing endpoints have moved to a dedicated `pricing/` API ([#13034](https://github.com/inventree/InvenTree/pull/13034)): + - `part_pricing` is now `pricing/part/:id/` + - `part_pricing_internal` is now `pricing/internal-price/` + - `part_pricing_sale` is now `pricing/sale-price/` +- Removed `stock_tracking_list` - stock history is now provided by the audit log (`audit_log_list`) ([#13101](https://github.com/inventree/InvenTree/pull/13101)) +- Removed `notes_image_upload` - replaced by `notes_image_list` (`note/image/`) ([#11971](https://github.com/inventree/InvenTree/pull/11971)) + +Changes to `ModelInformationDict`: +- The `stockhistory` model now uses the `audit_log_list` API endpoint +- The `url_detail` entry has been removed for the following models, which do not have a dedicated detail page: `parttesttemplate`, `buildline`, `projectcode`, `address`, `contact`, `owner`, `importsession` + +Changes to type definitions: +- `AuthContext`: The `status`, `data` and `meta` fields have been removed, and replaced with an optional top-level `flows` field +- `Flow`: The `is_pending` field is now a `boolean` (previously `boolean[]`), and an optional `provider` field has been added +- `Setting`: Adds a required `flags` field (see `SettingFlag`) + +#### New Features + +- Tables support nested (child) rows via the new `nestedRows` table property ([#12952](https://github.com/inventree/InvenTree/pull/12952)) +- Adds the `tableActionsFullWidth` table property, allowing custom table actions to use the available header width ([#12799](https://github.com/inventree/InvenTree/pull/12799)) +- Adds the `json` form field type ([#12799](https://github.com/inventree/InvenTree/pull/12799)) +- `SearchInput` now has a minimum width of 150px ([#12810](https://github.com/inventree/InvenTree/pull/12810)) + +New user state functions and data, available via the `user` plugin context: +- `hasViewVisible` - check if a user has view permission for a role, *and* the associated interface is enabled ([#12842](https://github.com/inventree/InvenTree/pull/12842)) +- `tips`, `done_tips` and `setTips` - first time user guide tips ([#12978](https://github.com/inventree/InvenTree/pull/12978)) + +New enum values: +- `ModelType.notetemplate` (and associated `ModelInformationDict` entry) ([#11971](https://github.com/inventree/InvenTree/pull/11971)) +- `UserRoles.pricing` ([#13034](https://github.com/inventree/InvenTree/pull/13034)) +- New `ApiEndpoints` values: `user_me_tips`, `auth_provider_signup`, `audit_log_list`, `instance_info`, `note_list`, `notes_image_list`, `admin_oauth`, `admin_oauth_regenerate`, `scim_config`, `scim_generate`, `scim_disable`, `sso_list` + +#### New Exports + +Exposes the following additional definitions from the library: +- `InvenTreeTableNestedRowProps` - type definition for nested table rows +- `SettingFlag` - enumeration of setting flags +- `roleToViewSettingMap` - mapping between user roles and the global settings which enable the associated interface +- `UserTips` - type definition for user tips + +### notYetImplemented Removes the `notYetImplemented` notification function, which is no longer used by the InvenTree user interface. Plugins which import this function must be updated. diff --git a/src/frontend/lib/index.ts b/src/frontend/lib/index.ts index 6415bb4eda..dc64c9c94d 100644 --- a/src/frontend/lib/index.ts +++ b/src/frontend/lib/index.ts @@ -10,7 +10,12 @@ export { export { ApiEndpoints } from './enums/ApiEndpoints'; export { ModelType } from './enums/ModelType'; export type { ModelDict } from './enums/ModelInformation'; -export { UserRoles, UserPermissions } from './enums/Roles'; +export { + UserRoles, + UserPermissions, + roleToViewSettingMap +} from './enums/Roles'; +export { SettingFlag } from './types/Settings'; export type { InvenTreePluginContext, @@ -34,9 +39,12 @@ export type { TableColumnProps, TableState, InvenTreeTableProps, + InvenTreeTableNestedRowProps, InvenTreeTableRenderProps } from './types/Tables'; +export type { UserTips } from './types/User'; + export type { TableFilterChoice, TableFilterType, diff --git a/src/frontend/package.json b/src/frontend/package.json index 7857fe9a51..03e20cd24d 100644 --- a/src/frontend/package.json +++ b/src/frontend/package.json @@ -1,7 +1,7 @@ { "name": "@inventreedb/ui", "description": "UI components for the InvenTree project", - "version": "1.6.0", + "version": "1.7.0", "private": false, "type": "module", "license": "MIT",