@seamapi/react 2.6.0 → 2.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/README.md +1 -1
  2. package/dist/elements.js +2898 -2838
  3. package/dist/elements.js.map +1 -1
  4. package/dist/index.css +29 -0
  5. package/dist/index.css.map +1 -1
  6. package/dist/index.min.css +1 -1
  7. package/dist/index.min.css.map +1 -1
  8. package/lib/icons/InfoBlue.d.ts +2 -0
  9. package/lib/icons/InfoBlue.js +7 -0
  10. package/lib/icons/InfoBlue.js.map +1 -0
  11. package/lib/seam/components/SupportedDeviceTable/SupportedDeviceFilterArea.d.ts +1 -1
  12. package/lib/seam/components/SupportedDeviceTable/SupportedDeviceFilterArea.js +5 -9
  13. package/lib/seam/components/SupportedDeviceTable/SupportedDeviceFilterArea.js.map +1 -1
  14. package/lib/seam/components/SupportedDeviceTable/SupportedDeviceManufacturerSection.js +5 -1
  15. package/lib/seam/components/SupportedDeviceTable/SupportedDeviceManufacturerSection.js.map +1 -1
  16. package/lib/seam/components/SupportedDeviceTable/use-filtered-device-models.d.ts +2 -0
  17. package/lib/seam/components/SupportedDeviceTable/use-filtered-device-models.js +8 -2
  18. package/lib/seam/components/SupportedDeviceTable/use-filtered-device-models.js.map +1 -1
  19. package/lib/seam/components/SupportedDeviceTable/use-filtered-manufacturers.d.ts +4 -2
  20. package/lib/seam/components/SupportedDeviceTable/use-filtered-manufacturers.js +2 -1
  21. package/lib/seam/components/SupportedDeviceTable/use-filtered-manufacturers.js.map +1 -1
  22. package/lib/version.d.ts +1 -1
  23. package/lib/version.js +1 -1
  24. package/package.json +4 -4
  25. package/src/lib/icons/InfoBlue.tsx +36 -0
  26. package/src/lib/seam/components/SupportedDeviceTable/SupportedDeviceFilterArea.tsx +12 -12
  27. package/src/lib/seam/components/SupportedDeviceTable/SupportedDeviceManufacturerSection.tsx +24 -1
  28. package/src/lib/seam/components/SupportedDeviceTable/use-filtered-device-models.ts +12 -2
  29. package/src/lib/seam/components/SupportedDeviceTable/use-filtered-manufacturers.ts +12 -4
  30. package/src/lib/version.ts +1 -1
  31. package/src/styles/_colors.scss +1 -0
  32. package/src/styles/_supported-device-table.scss +31 -0
@@ -1,6 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import classNames from 'classnames';
3
3
  import { ChevronRightIcon } from '../../../../lib/icons/ChevronRight.js';
4
+ import { InfoBlueIcon } from '../../../../lib/icons/InfoBlue.js';
4
5
  import { HiddenDevicesOverlay } from '../../../../lib/seam/components/SupportedDeviceTable/HiddenDevicesOverlay.js';
5
6
  import { ShowAllDevicesButton } from '../../../../lib/seam/components/SupportedDeviceTable/ShowAllDevicesButton.js';
6
7
  import { SupportedDeviceRow } from '../../../../lib/seam/components/SupportedDeviceTable/SupportedDeviceRow.js';
@@ -27,7 +28,10 @@ export function SupportedDeviceManufacturerSection({ manufacturerId, deviceModel
27
28
  return (_jsxs("div", { className: classNames('seam-manufacturer-section', {
28
29
  'can-expand': canExpand,
29
30
  expanded,
30
- }), children: [_jsxs("div", { className: 'seam-header', onClick: handleHeaderClick, children: [_jsx("img", { src: manufacturer?.logo?.url, alt: manufacturer?.display_name, className: 'seam-manufacturer-image' }), _jsxs("h5", { className: 'seam-manufacturer-name', children: [manufacturer?.display_name, " ", t.devices] }), canExpand && _jsx(ChevronRightIcon, { className: 'chevron' })] }), _jsx("div", { className: 'seam-supported-device-table-content', children: visibleDevices.map((deviceModel) => (_jsx(SupportedDeviceRow, { deviceModel: deviceModel }, deviceModel.device_model_id))) }), _jsx(ShowAllDevicesButton, { visible: canExpand, onClick: toggleExpand, expanded: expanded, totalDeviceCount: deviceModels.length }), _jsx(HiddenDevicesOverlay, { visible: canExpand && !expanded })] }));
31
+ }), children: [_jsxs("div", { className: 'seam-header', onClick: handleHeaderClick, children: [_jsx("img", { src: manufacturer?.logo?.url, alt: manufacturer?.display_name, className: 'seam-manufacturer-image' }), _jsxs("h5", { className: 'seam-manufacturer-name', children: [manufacturer?.display_name, " ", t.devices] }), canExpand && _jsx(ChevronRightIcon, { className: 'chevron' })] }), manufacturer?.annotations.map((annotation, idx) => (_jsx(ManufacturerAnnotationBox, { annotation: annotation }, [annotation.annotation_code, idx].join('_')))), _jsx("div", { className: 'seam-supported-device-table-content', children: visibleDevices.map((deviceModel) => (_jsx(SupportedDeviceRow, { deviceModel: deviceModel }, deviceModel.device_model_id))) }), _jsx(ShowAllDevicesButton, { visible: canExpand, onClick: toggleExpand, expanded: expanded, totalDeviceCount: deviceModels.length }), _jsx(HiddenDevicesOverlay, { visible: canExpand && !expanded })] }));
32
+ }
33
+ function ManufacturerAnnotationBox({ annotation, }) {
34
+ return (_jsxs("div", { className: 'seam-manufacturer-annotation-box', children: [_jsx(InfoBlueIcon, {}), _jsx("p", { className: 'seam-annotation', children: annotation.message })] }));
31
35
  }
32
36
  const t = {
33
37
  devices: 'Devices',
@@ -1 +1 @@
1
- {"version":3,"file":"SupportedDeviceManufacturerSection.js","sourceRoot":"","sources":["../../../../src/lib/seam/components/SupportedDeviceTable/SupportedDeviceManufacturerSection.tsx"],"names":[],"mappings":";AACA,OAAO,UAAU,MAAM,YAAY,CAAA;AAEnC,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAA;AAC5D,OAAO,EAAE,oBAAoB,EAAE,MAAM,kEAAkE,CAAA;AACvG,OAAO,EAAE,oBAAoB,EAAE,MAAM,kEAAkE,CAAA;AACvG,OAAO,EAAE,kBAAkB,EAAE,MAAM,gEAAgE,CAAA;AACnG,OAAO,EAAE,eAAe,EAAE,MAAM,8DAA8D,CAAA;AAC9F,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AAEhD;;;GAGG;AACH,MAAM,0BAA0B,GAAG,CAAC,CAAA;AAOpC,MAAM,UAAU,kCAAkC,CAAC,EACjD,cAAc,EACd,YAAY,GAC4B;IACxC,MAAM,EAAE,YAAY,EAAE,GAAG,e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EAClB,gBAAgB,EAAE,YAAY,CAAC,MAAM,GACrC,EACF,KAAC,oBAAoB,IAAC,OAAO,EAAE,SAAS,IAAI,CAAC,QAAQ,GAAI,IACrD,CACP,CAAA;AACH,CAAC;AAED,MAAM,CAAC,GAAG;IACR,OAAO,EAAE,SAAS;CACnB,CAAA"}
1
+ {"version":3,"file":"SupportedDeviceManufacturerSection.js","sourceRoot":"","sources":["../../../../src/lib/seam/components/SupportedDeviceTable/SupportedDeviceManufacturerSection.tsx"],"names":[],"mappings":";AAIA,OAAO,UAAU,MAAM,YAAY,CAAA;AAEnC,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAA;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AACpD,OAAO,EAAE,oBAAoB,EAAE,MAAM,kEAAkE,CAAA;AACvG,OAAO,EAAE,oBAAoB,EAAE,MAAM,kEAAkE,CAAA;AACvG,OAAO,EAAE,kBAAkB,EAAE,MAAM,gEAAgE,CAAA;AACnG,OAAO,EAAE,eAAe,EAAE,MAAM,8DAA8D,CAAA;AAC9F,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AAEhD;;;GAGG;AACH,MAAM,0BAA0B,GAAG,CAAC,CAAA;AAOpC,MAAM,UAAU,kCAAkC,CAAC,EACjD,cAAc,EACd,YAAY,GAC4B;IACxC,MAAM,EAAE,YAAY,EAAE,GAAG,eAAe,CAAC,EAAE,eAAe,EAAE,cAAc,EAAE,CAAC,CAAA;IAE7E,MAAM,CAAC,QAAQ,EAAE,YAAY,CAAC,GAAG,SAAS,EAAE,CAAA;IAE5C,MAAM,SAAS,GAAG,YAAY,CAAC,MAAM,GAAG,0BAA0B,CAAA;IAElE,MAAM,cAAc,GAClB,CAAC,SAAS,IAAI,QAAQ;QACpB,CAAC,CAAC,YAAY;QACd,CAAC,CAAC,YAAY,CAAC,MAAM,CACjB,CAAC,YAAY,EAAE,KAAK,EAAE,EAAE,CAAC,KAAK,GAA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A;AACH,CAAC;AAED,SAAS,yBAAyB,CAAC,EACjC,UAAU,GAGX;IACC,OAAO,CACL,eAAK,SAAS,EAAC,kCAAkC,aAC/C,KAAC,YAAY,KAAG,EAChB,YAAG,SAAS,EAAC,iBAAiB,YAAE,UAAU,CAAC,OAAO,GAAK,IACnD,CACP,CAAA;AACH,CAAC;AAED,MAAM,CAAC,GAAG;IACR,OAAO,EAAE,SAAS;CACnB,CAAA"}
@@ -1,8 +1,10 @@
1
+ import type { ManufacturerIntegrationSupportLevel } from '@seamapi/types/devicedb';
1
2
  import { useDeviceModels } from '../../../../lib/seam/components/SupportedDeviceTable/use-device-models.js';
2
3
  export interface DeviceModelFilters {
3
4
  supportedOnly: boolean;
4
5
  manufacturer: string | null;
5
6
  }
7
+ export declare const supportedIntegrationSupportLevels: ManufacturerIntegrationSupportLevel[];
6
8
  export declare const useFilteredDeviceModels: ({ filterValue, filters, includeIf, excludeIf, ...manufacturersParams }: {
7
9
  filterValue: string;
8
10
  filters: DeviceModelFilters;
@@ -1,7 +1,13 @@
1
1
  import { useDeviceModels, } from '../../../../lib/seam/components/SupportedDeviceTable/use-device-models.js';
2
2
  import { useFilteredManufacturers } from './use-filtered-manufacturers.js';
3
+ export const supportedIntegrationSupportLevels = ['stable', 'beta'];
3
4
  export const useFilteredDeviceModels = ({ filterValue, filters, includeIf, excludeIf, ...manufacturersParams }) => {
4
- const { manufacturers } = useFilteredManufacturers(manufacturersParams);
5
+ const { manufacturers } = useFilteredManufacturers({
6
+ ...manufacturersParams,
7
+ integrationSupportLevels: filters.supportedOnly
8
+ ? supportedIntegrationSupportLevels
9
+ : null,
10
+ });
5
11
  const params = {};
6
12
  if (excludeIf.length > 0) {
7
13
  params.exclude_if = excludeIf;
@@ -14,7 +20,7 @@ export const useFilteredDeviceModels = ({ filterValue, filters, includeIf, exclu
14
20
  params.text_search = filterValue.trim();
15
21
  }
16
22
  if (filters.supportedOnly) {
17
- params.integration_status = 'stable';
23
+ params.integration_support_levels = supportedIntegrationSupportLevels;
18
24
  }
19
25
  if (filters.manufacturer !== null) {
20
26
  const manufacturer = manufacturers?.find((manufacturer) => manufacturer.display_name === filters.manufacturer);
@@ -1 +1 @@
1
- {"version":3,"file":"use-filtered-device-models.js","sourceRoot":"","sources":["../../../../src/lib/seam/components/SupportedDeviceTable/use-filtered-device-models.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,GAEhB,MAAM,+DAA+D,CAAA;AAEtE,OAAO,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAA;AAO1E,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,EACtC,WAAW,EACX,OAAO,EACP,SAAS,EACT,SAAS,EACT,GAAG,mBAAmB,EAQvB,EAAsC,EAAE;IACvC,MAAM,EAAE,aAAa,EAAE,GAAG,wBAAwB,CAAC,mBAAmB,CAAC,CAAA;IAEvE,MAAM,MAAM,GAA0B,EAAE,CAAA;IAExC,IAAI,SAAS,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACzB,MAAM,CAAC,UAAU,GAAG,SAAS,CAAA;IAC/B,CAAC;IAED,6DAA6D;IAC7D,IAAI,SAAS,IAAI,IAAI,IAAI,SAAS,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC9C,MAAM,CAAC,UAAU,GAAG,SAAS,CAAA;IAC/B,CAAC;IAED,IAAI,WAAW,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC;QAC9B,MAAM,CAAC,WAAW,GAAG,WAAW,CAAC,IAAI,EAAE,CAAA;IACzC,CAAC;IAED,IAAI,OAAO,CAAC,aAAa,EAAE,CAAC;QAC1B,MAAM,CAAC,kBAAkB,GAAG,QAAQ,CAAA;IACtC,CAAC;IAED,IAAI,OAAO,CAAC,YAAY,KAAK,IAAI,EAAE,CAAC;QAClC,MAAM,YAAY,GAAG,aAAa,EAAE,IAAI,CACtC,CAAC,YAAY,EAAE,EAAE,CAAC,YAAY,CAAC,YAAY,KAAK,OAAO,CAAC,YAAY,CACrE,CAAA;QAED,IAAI,YAAY,IAAI,IAAI,EAAE,CAAC;YACzB,MAAM,CAAC,eAAe,GAAG,YAAY,CAAC,eAAe,CAAA;QACvD,CAAC;IACH,CAAC;IAED,IAAI,OAAO,CAAC,YAAY,IAAI,IAAI,IAAI,aAAa,IAAI,IAAI,EAAE,CAAC;QAC1D,MAAM,CAAC,gBAAgB,GAAG,aAAa,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,eAAe,CAAC,CAAA;IACvE,CAAC;IAED,MAAM,EAAE,YAAY,EAAE,GAAG,IAAI,EAAE,GAAG,eAAe,CAAC,MAAM,CAAC,CAAA;IAEzD,OAAO;QACL,GAAG,IAAI;QACP,YAAY;QACV,6DAA6D;QAC7D,SAAS,EAAE,MAAM,KAAK,CAAC;YACrB,CAAC,CAAC,EAAE;YACJ,CAAC,CAAC,YAAY,EAAE,MAAM,CAClB,CAAC,WAAW,EAAE,EAAE,CACd,aAAa,EAAE,IAAI,CACjB,CAAC,YAAY,EAAE,EAAE,CACf,WAAW,CAAC,YAAY,CAAC,eAAe;gBACxC,YAAY,CAAC,eAAe,CAC/B,CACJ;KACR,CAAA;AACH,CAAC,CAAA"}
1
+ {"version":3,"file":"use-filtered-device-models.js","sourceRoot":"","sources":["../../../../src/lib/seam/components/SupportedDeviceTable/use-filtered-device-models.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,eAAe,GAEhB,MAAM,+DAA+D,CAAA;AAEtE,OAAO,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAA;AAO1E,MAAM,CAAC,MAAM,iCAAiC,GAC5C,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAA;AAEpB,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,EACtC,WAAW,EACX,OAAO,EACP,SAAS,EACT,SAAS,EACT,GAAG,mBAAmB,EAQvB,EAAsC,EAAE;IACvC,MAAM,EAAE,aAAa,EAAE,GAAG,wBAAwB,CAAC;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MAAM,CAAC,CAAA;IAEzD,OAAO;QACL,GAAG,IAAI;QACP,YAAY;QACV,6DAA6D;QAC7D,SAAS,EAAE,MAAM,KAAK,CAAC;YACrB,CAAC,CAAC,EAAE;YACJ,CAAC,CAAC,YAAY,EAAE,MAAM,CAClB,CAAC,WAAW,EAAE,EAAE,CACd,aAAa,EAAE,IAAI,CACjB,CAAC,YAAY,EAAE,EAAE,CACf,WAAW,CAAC,YAAY,CAAC,eAAe;gBACxC,YAAY,CAAC,eAAe,CAC/B,CACJ;KACR,CAAA;AACH,CAAC,CAAA"}
@@ -1,8 +1,10 @@
1
+ import type { ManufacturerIntegrationSupportLevel } from '@seamapi/types/devicedb';
1
2
  import { useManufacturers } from '../../../../lib/seam/components/SupportedDeviceTable/use-manufacturers.js';
2
3
  interface Params {
3
4
  manufacturers: string[] | null;
4
5
  excludedManufacturers: string[];
6
+ integrationSupportLevels: ManufacturerIntegrationSupportLevel[] | null;
5
7
  }
6
- export declare const useFilteredManufacturers: (params: Params) => ReturnType<typeof useManufacturers>;
7
- export declare const createLiqeQuery: ({ manufacturers, excludedManufacturers, }: Params) => string | undefined;
8
+ export declare const useFilteredManufacturers: ({ integrationSupportLevels, ...params }: Params) => ReturnType<typeof useManufacturers>;
9
+ export declare const createLiqeQuery: ({ manufacturers, excludedManufacturers, }: Pick<Params, 'manufacturers' | 'excludedManufacturers'>) => string | undefined;
8
10
  export {};
@@ -1,6 +1,7 @@
1
1
  import { useManufacturers } from '../../../../lib/seam/components/SupportedDeviceTable/use-manufacturers.js';
2
- export const useFilteredManufacturers = (params) => {
2
+ export const useFilteredManufacturers = ({ integrationSupportLevels, ...params }) => {
3
3
  const { manufacturers, ...rest } = useManufacturers({
4
+ integration_support_levels: integrationSupportLevels ?? undefined,
4
5
  liqe_query: createLiqeQuery(params),
5
6
  });
6
7
  return {
@@ -1 +1 @@
1
- {"version":3,"file":"use-filtered-manufacturers.js","sourceRoot":"","sources":["../../../../src/lib/seam/components/SupportedDeviceTable/use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B,CAAA;IAE1E,OAAO,GAAG,2BAA2B,QAAQ,2BAA2B,EAAE,CAAA;AAC5E,CAAC,CAAA;AAED,MAAM,qBAAqB,GAAG,CAAC,KAAa,EAAU,EAAE;IACtD,MAAM,CAAC,YAAY,EAAE,IAAI,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;IAC7C,IAAI,IAAI,IAAI,IAAI;QAAE,OAAO,oBAAoB,IAAI,GAAG,CAAA;IACpD,OAAO,iBAAiB,YAAY,GAAG,CAAA;AACzC,CAAC,CAAA;AAED,MAAM,cAAc,GAAG,CAAC,KAAa,EAAW,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAA"}
1
+ {"version":3,"file":"use-filtered-manufacturers.js","sourceRoot":"","sources":["../../../../src/lib/seam/components/SupportedDeviceTable/use-filtered-manufacturers.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,+DAA+D,CAAA;AAQhG,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,EACvC,wBAAwB,EACxB,GAAG,MAAM,EACF,EAAuC,EAAE;IAChD,MAAM,EAAE,aAAa,EAAE,GAAG,IAAI,EAAE,GAAG,gBAAgB,CAAC;QAClD,0BAA0B,EAAE,wBAAwB,IAAI,SAAS;QACjE,UAAU,EAAE,eAAe,CAAC,MAAM,CAAC;KACpC,CAAC,CAAA;IAEF,OAAO;QACL,GAAG,IAAI;QACP,aAAa,EAAE,aAAa,EAAE,MAAM,CAClC,CAAC,YAAY,EAAE,EAAE,CAAC,YAAY,CAAC,kBAAkB,GAAG,CAAC,CACtD;KACF,CAAA;AACH,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,EAC9B,aAAa,EACb,qBAAqB,GACmC,EAE5C,EAAE;IACd,IACE,CAAC,aAAa,EAAE,IAAI,CAAC,cAAc,CAAC,IAAI,KAAK,CAAC;QAC9C,qBAAqB,CAAC,IAAI,CAAC,cAAc,CAAC,EAC1C,CAAC;QACD,OAAO,SAAS,CAAA;IAClB,CAAC;IAED,MAAM,2BAA2B,GAAG,QAAQ,qBAAqB;SAC9D,GAAG,CAAC,qBAAqB,CAAC;SAC1B,IAAI,CAAC,MAAM,CAAC,GAAG,CAAA;IAElB,IAAI,aAAa,IAAI,IAAI,EAAE,CAAC;QAC1B,IAAI,qBAAqB,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO,SAAS,CAAA;QACxD,OAAO,2BAA2B,CAAA;IACpC,CAAC;IAED,IAAI,aAAa,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC/B,OAAO,sBAAsB,CAAA;IAC/B,CAAC;IAED,MAAM,2BAA2B,GAAG,IAAI,aAAa;SAClD,GAAG,CAAC,qBAAqB,CAAC;SAC1B,IAAI,CAAC,MAAM,CAAC,GAAG,CAAA;IAElB,IAAI,qBAAqB,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,2BAA2B,CAAA;IAE1E,OAAO,GAAG,2BAA2B,QAAQ,2BAA2B,EAAE,CAAA;AAC5E,CAAC,CAAA;AAED,MAAM,qBAAqB,GAAG,CAAC,KAAa,EAAU,EAAE;IACtD,MAAM,CAAC,YAAY,EAAE,IAAI,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;IAC7C,IAAI,IAAI,IAAI,IAAI;QAAE,OAAO,oBAAoB,IAAI,GAAG,CAAA;IACpD,OAAO,iBAAiB,YAAY,GAAG,CAAA;AACzC,CAAC,CAAA;AAED,MAAM,cAAc,GAAG,CAAC,KAAa,EAAW,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAA"}
package/lib/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- declare const seamapiReactVersion = "2.6.0";
1
+ declare const seamapiReactVersion = "2.8.0";
2
2
  export default seamapiReactVersion;
package/lib/version.js CHANGED
@@ -1,3 +1,3 @@
1
- const seamapiReactVersion = '2.6.0';
1
+ const seamapiReactVersion = '2.8.0';
2
2
  export default seamapiReactVersion;
3
3
  //# sourceMappingURL=version.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seamapi/react",
3
- "version": "2.6.0",
3
+ "version": "2.8.0",
4
4
  "description": "Seam Components.",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -140,10 +140,10 @@
140
140
  "@mui/icons-material": "^5.11.16",
141
141
  "@mui/material": "^5.12.2",
142
142
  "@rxfork/r2wc-react-to-web-component": "^2.4.0",
143
- "@seamapi/fake-devicedb": "^1.3.0",
144
- "@seamapi/fake-seam-connect": "^1.42.0",
143
+ "@seamapi/fake-devicedb": "^1.4.0",
144
+ "@seamapi/fake-seam-connect": "^1.44.3",
145
145
  "@seamapi/http": "^0.2.1",
146
- "@seamapi/types": "^1.64.0",
146
+ "@seamapi/types": "^1.68.0",
147
147
  "@storybook/addon-designs": "^7.0.1",
148
148
  "@storybook/addon-essentials": "^7.0.2",
149
149
  "@storybook/addon-links": "^7.0.2",
@@ -0,0 +1,36 @@
1
+ /*
2
+ * Automatically generated by SVGR from assets/icons/*.svg.
3
+ * Do not edit this file or add other components to this directory.
4
+ */
5
+ import type { SVGProps } from 'react'
6
+ export function InfoBlueIcon(props: SVGProps<SVGSVGElement>): JSX.Element {
7
+ return (
8
+ <svg
9
+ xmlns='http://www.w3.org/2000/svg'
10
+ width={16}
11
+ height={16}
12
+ fill='none'
13
+ {...props}
14
+ >
15
+ <mask
16
+ id='info-blue_svg__a'
17
+ width={16}
18
+ height={16}
19
+ x={0}
20
+ y={0}
21
+ maskUnits='userSpaceOnUse'
22
+ style={{
23
+ maskType: 'alpha',
24
+ }}
25
+ >
26
+ <path fill='#D9D9D9' d='M0 0h16v16H0z' />
27
+ </mask>
28
+ <g mask='url(#info-blue_svg__a)'>
29
+ <path
30
+ fill='#007AFC'
31
+ d='M7.333 11.333h1.334v-4H7.333zM8 6a.645.645 0 0 0 .475-.192.645.645 0 0 0 .192-.475.645.645 0 0 0-.192-.475A.645.645 0 0 0 8 4.667a.645.645 0 0 0-.475.191.645.645 0 0 0-.192.475c0 .19.064.348.192.475A.645.645 0 0 0 8 6m0 8.667a6.492 6.492 0 0 1-2.6-.525 6.732 6.732 0 0 1-2.117-1.425A6.733 6.733 0 0 1 1.858 10.6 6.492 6.492 0 0 1 1.333 8c0-.922.175-1.789.525-2.6a6.732 6.732 0 0 1 1.425-2.117c.6-.6 1.306-1.075 2.117-1.425A6.492 6.492 0 0 1 8 1.333c.922 0 1.789.175 2.6.525.811.35 1.517.825 2.117 1.425.6.6 1.075 1.306 1.425 2.117.35.811.525 1.678.525 2.6 0 .922-.175 1.789-.525 2.6a6.733 6.733 0 0 1-1.425 2.117c-.6.6-1.306 1.075-2.117 1.425a6.492 6.492 0 0 1-2.6.525'
32
+ />
33
+ </g>
34
+ </svg>
35
+ )
36
+ }
@@ -1,7 +1,10 @@
1
1
  import type { Dispatch, SetStateAction } from 'react'
2
2
 
3
3
  import { FilterCategoryMenu } from 'lib/seam/components/SupportedDeviceTable/FilterCategoryMenu.js'
4
- import type { DeviceModelFilters } from 'lib/seam/components/SupportedDeviceTable/use-filtered-device-models.js'
4
+ import {
5
+ type DeviceModelFilters,
6
+ supportedIntegrationSupportLevels,
7
+ } from 'lib/seam/components/SupportedDeviceTable/use-filtered-device-models.js'
5
8
  import { Button } from 'lib/ui/Button.js'
6
9
  import { Menu } from 'lib/ui/Menu/Menu.js'
7
10
  import { SearchTextField } from 'lib/ui/TextField/SearchTextField.js'
@@ -28,6 +31,9 @@ export function SupportedDeviceFilterArea({
28
31
  const appliedFiltersCount = getAppliedFilterCount(filters)
29
32
 
30
33
  const { manufacturers: manufacturersData } = useFilteredManufacturers({
34
+ integrationSupportLevels: filters.supportedOnly
35
+ ? supportedIntegrationSupportLevels
36
+ : null,
31
37
  manufacturers,
32
38
  excludedManufacturers,
33
39
  })
@@ -44,16 +50,6 @@ export function SupportedDeviceFilterArea({
44
50
 
45
51
  const allLabel = t.all
46
52
 
47
- const options =
48
- manufacturersData
49
- ?.filter((manufacturer) => {
50
- if (filters.supportedOnly) {
51
- return ['stable', 'beta'].includes(manufacturer.integration)
52
- }
53
- return true
54
- })
55
- ?.map((manufacturer) => manufacturer.display_name) ?? []
56
-
57
53
  return (
58
54
  <div className='seam-supported-device-table-filter-area'>
59
55
  <div className='seam-deliberate-block' />
@@ -79,7 +75,11 @@ export function SupportedDeviceFilterArea({
79
75
  <FilterCategoryMenu
80
76
  label={t.manufacturer}
81
77
  allLabel={allLabel}
82
- options={options}
78
+ options={
79
+ manufacturersData?.map(
80
+ (manufacturer) => manufacturer.display_name
81
+ ) ?? []
82
+ }
83
83
  onSelect={(manufacturer: string) => {
84
84
  setFilters((filters) => ({
85
85
  ...filters,
@@ -1,7 +1,11 @@
1
- import type { DeviceModelV1 } from '@seamapi/types/devicedb'
1
+ import type {
2
+ DeviceModelV1,
3
+ ManufacturerAnnotation,
4
+ } from '@seamapi/types/devicedb'
2
5
  import classNames from 'classnames'
3
6
 
4
7
  import { ChevronRightIcon } from 'lib/icons/ChevronRight.js'
8
+ import { InfoBlueIcon } from 'lib/icons/InfoBlue.js'
5
9
  import { HiddenDevicesOverlay } from 'lib/seam/components/SupportedDeviceTable/HiddenDevicesOverlay.js'
6
10
  import { ShowAllDevicesButton } from 'lib/seam/components/SupportedDeviceTable/ShowAllDevicesButton.js'
7
11
  import { SupportedDeviceRow } from 'lib/seam/components/SupportedDeviceTable/SupportedDeviceRow.js'
@@ -62,6 +66,12 @@ export function SupportedDeviceManufacturerSection({
62
66
  </h5>
63
67
  {canExpand && <ChevronRightIcon className='chevron' />}
64
68
  </div>
69
+ {manufacturer?.annotations.map((annotation, idx) => (
70
+ <ManufacturerAnnotationBox
71
+ key={[annotation.annotation_code, idx].join('_')}
72
+ annotation={annotation}
73
+ />
74
+ ))}
65
75
  <div className='seam-supported-device-table-content'>
66
76
  {visibleDevices.map((deviceModel) => (
67
77
  <SupportedDeviceRow
@@ -81,6 +91,19 @@ export function SupportedDeviceManufacturerSection({
81
91
  )
82
92
  }
83
93
 
94
+ function ManufacturerAnnotationBox({
95
+ annotation,
96
+ }: {
97
+ annotation: ManufacturerAnnotation
98
+ }): JSX.Element {
99
+ return (
100
+ <div className='seam-manufacturer-annotation-box'>
101
+ <InfoBlueIcon />
102
+ <p className='seam-annotation'>{annotation.message}</p>
103
+ </div>
104
+ )
105
+ }
106
+
84
107
  const t = {
85
108
  devices: 'Devices',
86
109
  }
@@ -1,3 +1,5 @@
1
+ import type { ManufacturerIntegrationSupportLevel } from '@seamapi/types/devicedb'
2
+
1
3
  import {
2
4
  useDeviceModels,
3
5
  type UseDeviceModelsParams,
@@ -10,6 +12,9 @@ export interface DeviceModelFilters {
10
12
  manufacturer: string | null
11
13
  }
12
14
 
15
+ export const supportedIntegrationSupportLevels: ManufacturerIntegrationSupportLevel[] =
16
+ ['stable', 'beta']
17
+
13
18
  export const useFilteredDeviceModels = ({
14
19
  filterValue,
15
20
  filters,
@@ -24,7 +29,12 @@ export const useFilteredDeviceModels = ({
24
29
  includeIf: string[] | null
25
30
  excludeIf: string[]
26
31
  }): ReturnType<typeof useDeviceModels> => {
27
- const { manufacturers } = useFilteredManufacturers(manufacturersParams)
32
+ const { manufacturers } = useFilteredManufacturers({
33
+ ...manufacturersParams,
34
+ integrationSupportLevels: filters.supportedOnly
35
+ ? supportedIntegrationSupportLevels
36
+ : null,
37
+ })
28
38
 
29
39
  const params: UseDeviceModelsParams = {}
30
40
 
@@ -42,7 +52,7 @@ export const useFilteredDeviceModels = ({
42
52
  }
43
53
 
44
54
  if (filters.supportedOnly) {
45
- params.integration_status = 'stable'
55
+ params.integration_support_levels = supportedIntegrationSupportLevels
46
56
  }
47
57
 
48
58
  if (filters.manufacturer !== null) {
@@ -1,13 +1,19 @@
1
+ import type { ManufacturerIntegrationSupportLevel } from '@seamapi/types/devicedb'
2
+
1
3
  import { useManufacturers } from 'lib/seam/components/SupportedDeviceTable/use-manufacturers.js'
2
4
 
3
5
  interface Params {
4
6
  manufacturers: string[] | null
5
7
  excludedManufacturers: string[]
8
+ integrationSupportLevels: ManufacturerIntegrationSupportLevel[] | null
6
9
  }
7
- export const useFilteredManufacturers = (
8
- params: Params
9
- ): ReturnType<typeof useManufacturers> => {
10
+
11
+ export const useFilteredManufacturers = ({
12
+ integrationSupportLevels,
13
+ ...params
14
+ }: Params): ReturnType<typeof useManufacturers> => {
10
15
  const { manufacturers, ...rest } = useManufacturers({
16
+ integration_support_levels: integrationSupportLevels ?? undefined,
11
17
  liqe_query: createLiqeQuery(params),
12
18
  })
13
19
 
@@ -22,7 +28,9 @@ export const useFilteredManufacturers = (
22
28
  export const createLiqeQuery = ({
23
29
  manufacturers,
24
30
  excludedManufacturers,
25
- }: Params): string | undefined => {
31
+ }: Pick<Params, 'manufacturers' | 'excludedManufacturers'>):
32
+ | string
33
+ | undefined => {
26
34
  if (
27
35
  (manufacturers?.some(isInvalidInput) ?? false) ||
28
36
  excludedManufacturers.some(isInvalidInput)
@@ -1,3 +1,3 @@
1
- const seamapiReactVersion = '2.6.0'
1
+ const seamapiReactVersion = '2.8.0'
2
2
 
3
3
  export default seamapiReactVersion
@@ -8,6 +8,7 @@ $primary-8: color.scale($primary, $lightness: 92%);
8
8
  $primary-5: color.scale($primary, $lightness: 95%);
9
9
  $primary-dark: color.scale($primary, $lightness: -10%);
10
10
  $primary-dim: color.scale($primary-15, $lightness: -5%);
11
+ $primary-transparent: color.adjust($primary, $alpha: 0.08 - 1);
11
12
  $text-default: #232b3a;
12
13
  $text-gray-1: #6e7179;
13
14
  $text-gray-2: #9da1a9;
@@ -99,6 +99,37 @@ $row-padding: 8px;
99
99
  .seam-manufacturer-section {
100
100
  margin-bottom: 32px;
101
101
  position: relative;
102
+ display: flex;
103
+ padding: 8px 16px 16px;
104
+ flex-direction: column;
105
+ justify-content: center;
106
+ align-items: flex-start;
107
+ gap: 10px;
108
+ align-self: stretch;
109
+
110
+ .seam-manufacturer-annotation-box {
111
+ display: flex;
112
+ padding: 8px;
113
+ align-items: center;
114
+ align-content: center;
115
+ gap: 0 8px;
116
+ align-self: stretch;
117
+ flex-wrap: wrap;
118
+ border-radius: 6px;
119
+ background-color: colors.$primary-transparent;
120
+
121
+ .seam-annotation {
122
+ display: flex;
123
+ align-items: flex-start;
124
+ align-content: flex-start;
125
+ gap: 2px;
126
+ flex: 1 0 0;
127
+ flex-wrap: wrap;
128
+ color: colors.$text-gray-1;
129
+ font-size: 14px;
130
+ line-height: 120%;
131
+ }
132
+ }
102
133
 
103
134
  .seam-header {
104
135
  display: flex;