@seamapi/react 1.64.0 → 2.0.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 (132) hide show
  1. package/README.md +16 -4
  2. package/dist/elements.js +5533 -5359
  3. package/dist/elements.js.map +1 -1
  4. package/dist/index.css +17 -19
  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/seam/components/AccessCodeDetails/AccessCodeDetails.d.ts +1 -1
  9. package/lib/seam/components/AccessCodeDetails/AccessCodeDetails.js +11 -13
  10. package/lib/seam/components/AccessCodeDetails/AccessCodeDetails.js.map +1 -1
  11. package/lib/seam/components/AccessCodeTable/AccessCodeHealthBar.d.ts +4 -1
  12. package/lib/seam/components/AccessCodeTable/AccessCodeHealthBar.js +3 -2
  13. package/lib/seam/components/AccessCodeTable/AccessCodeHealthBar.js.map +1 -1
  14. package/lib/seam/components/AccessCodeTable/AccessCodeTable.d.ts +1 -5
  15. package/lib/seam/components/AccessCodeTable/AccessCodeTable.js +15 -11
  16. package/lib/seam/components/AccessCodeTable/AccessCodeTable.js.map +1 -1
  17. package/lib/seam/components/ClimateSettingScheduleDetails/ClimateSettingScheduleDetails.d.ts +1 -1
  18. package/lib/seam/components/ClimateSettingScheduleDetails/ClimateSettingScheduleDetails.js +2 -2
  19. package/lib/seam/components/ClimateSettingScheduleDetails/ClimateSettingScheduleDetails.js.map +1 -1
  20. package/lib/seam/components/ClimateSettingScheduleTable/ClimateSettingScheduleTable.d.ts +1 -1
  21. package/lib/seam/components/ClimateSettingScheduleTable/ClimateSettingScheduleTable.js +12 -7
  22. package/lib/seam/components/ClimateSettingScheduleTable/ClimateSettingScheduleTable.js.map +1 -1
  23. package/lib/seam/components/DeviceDetails/LockDeviceDetails.js +11 -4
  24. package/lib/seam/components/DeviceDetails/LockDeviceDetails.js.map +1 -1
  25. package/lib/seam/components/DeviceDetails/ThermostatDeviceDetails.d.ts +1 -1
  26. package/lib/seam/components/DeviceDetails/ThermostatDeviceDetails.js +4 -4
  27. package/lib/seam/components/DeviceDetails/ThermostatDeviceDetails.js.map +1 -1
  28. package/lib/seam/components/DeviceTable/DeviceHealthBar.d.ts +3 -1
  29. package/lib/seam/components/DeviceTable/DeviceHealthBar.js +4 -3
  30. package/lib/seam/components/DeviceTable/DeviceHealthBar.js.map +1 -1
  31. package/lib/seam/components/DeviceTable/DeviceTable.d.ts +1 -5
  32. package/lib/seam/components/DeviceTable/DeviceTable.js +14 -9
  33. package/lib/seam/components/DeviceTable/DeviceTable.js.map +1 -1
  34. package/lib/seam/components/SupportedDeviceTable/SupportedDeviceContent.d.ts +3 -3
  35. package/lib/seam/components/SupportedDeviceTable/SupportedDeviceContent.js +11 -17
  36. package/lib/seam/components/SupportedDeviceTable/SupportedDeviceContent.js.map +1 -1
  37. package/lib/seam/components/SupportedDeviceTable/SupportedDeviceContentRows.d.ts +1 -1
  38. package/lib/seam/components/SupportedDeviceTable/SupportedDeviceContentRows.js +1 -7
  39. package/lib/seam/components/SupportedDeviceTable/SupportedDeviceContentRows.js.map +1 -1
  40. package/lib/seam/components/SupportedDeviceTable/SupportedDeviceFilterArea.d.ts +3 -3
  41. package/lib/seam/components/SupportedDeviceTable/SupportedDeviceFilterArea.js +12 -31
  42. package/lib/seam/components/SupportedDeviceTable/SupportedDeviceFilterArea.js.map +1 -1
  43. package/lib/seam/components/SupportedDeviceTable/SupportedDeviceFilterResultRow.d.ts +2 -2
  44. package/lib/seam/components/SupportedDeviceTable/SupportedDeviceFilterResultRow.js +2 -4
  45. package/lib/seam/components/SupportedDeviceTable/SupportedDeviceFilterResultRow.js.map +1 -1
  46. package/lib/seam/components/SupportedDeviceTable/SupportedDeviceManufacturerSection.d.ts +8 -0
  47. package/lib/seam/components/SupportedDeviceTable/SupportedDeviceManufacturerSection.js +35 -0
  48. package/lib/seam/components/SupportedDeviceTable/SupportedDeviceManufacturerSection.js.map +1 -0
  49. package/lib/seam/components/SupportedDeviceTable/SupportedDeviceRow.d.ts +2 -1
  50. package/lib/seam/components/SupportedDeviceTable/SupportedDeviceRow.js +10 -6
  51. package/lib/seam/components/SupportedDeviceTable/SupportedDeviceRow.js.map +1 -1
  52. package/lib/seam/components/SupportedDeviceTable/SupportedDeviceTable.d.ts +3 -7
  53. package/lib/seam/components/SupportedDeviceTable/SupportedDeviceTable.js +4 -5
  54. package/lib/seam/components/SupportedDeviceTable/SupportedDeviceTable.js.map +1 -1
  55. package/lib/seam/components/SupportedDeviceTable/use-device-model.d.ts +7 -0
  56. package/lib/seam/components/SupportedDeviceTable/use-device-model.js +18 -0
  57. package/lib/seam/components/SupportedDeviceTable/use-device-model.js.map +1 -0
  58. package/lib/seam/components/SupportedDeviceTable/use-device-models.d.ts +7 -0
  59. package/lib/seam/components/SupportedDeviceTable/use-device-models.js +17 -0
  60. package/lib/seam/components/SupportedDeviceTable/use-device-models.js.map +1 -0
  61. package/lib/seam/components/SupportedDeviceTable/use-filtered-device-models.d.ts +5 -5
  62. package/lib/seam/components/SupportedDeviceTable/use-filtered-device-models.js +16 -17
  63. package/lib/seam/components/SupportedDeviceTable/use-filtered-device-models.js.map +1 -1
  64. package/lib/seam/components/SupportedDeviceTable/use-filtered-manufacturers.d.ts +8 -0
  65. package/lib/seam/components/SupportedDeviceTable/use-filtered-manufacturers.js +37 -0
  66. package/lib/seam/components/SupportedDeviceTable/use-filtered-manufacturers.js.map +1 -0
  67. package/lib/seam/components/SupportedDeviceTable/use-manufacturer.d.ts +7 -0
  68. package/lib/seam/components/SupportedDeviceTable/use-manufacturer.js +18 -0
  69. package/lib/seam/components/SupportedDeviceTable/use-manufacturer.js.map +1 -0
  70. package/lib/seam/components/SupportedDeviceTable/use-manufacturers.d.ts +7 -0
  71. package/lib/seam/components/SupportedDeviceTable/use-manufacturers.js +17 -0
  72. package/lib/seam/components/SupportedDeviceTable/use-manufacturers.js.map +1 -0
  73. package/lib/seam/components/common-props.d.ts +3 -0
  74. package/lib/seam/components/common-props.js.map +1 -1
  75. package/lib/seam/filters.d.ts +8 -0
  76. package/lib/seam/filters.js +16 -0
  77. package/lib/seam/filters.js.map +1 -0
  78. package/lib/telemetry/client.js.map +1 -1
  79. package/lib/ui/Snackbar/Snackbar.d.ts +1 -1
  80. package/lib/ui/Snackbar/Snackbar.js +1 -1
  81. package/lib/ui/Snackbar/Snackbar.js.map +1 -1
  82. package/lib/version.d.ts +1 -1
  83. package/lib/version.js +1 -1
  84. package/lib/version.js.map +1 -1
  85. package/package.json +14 -4
  86. package/src/lib/element.tsx +2 -0
  87. package/src/lib/seam/components/AccessCodeDetails/AccessCodeDetails.tsx +24 -30
  88. package/src/lib/seam/components/AccessCodeTable/AccessCodeHealthBar.tsx +9 -1
  89. package/src/lib/seam/components/AccessCodeTable/AccessCodeTable.tsx +34 -13
  90. package/src/lib/seam/components/ClimateSettingScheduleDetails/ClimateSettingScheduleDetails.tsx +4 -0
  91. package/src/lib/seam/components/ClimateSettingScheduleTable/ClimateSettingScheduleTable.tsx +21 -5
  92. package/src/lib/seam/components/DeviceDetails/LockDeviceDetails.tsx +19 -8
  93. package/src/lib/seam/components/DeviceDetails/ThermostatDeviceDetails.tsx +6 -2
  94. package/src/lib/seam/components/DeviceTable/DeviceHealthBar.tsx +10 -2
  95. package/src/lib/seam/components/DeviceTable/DeviceTable.tsx +31 -15
  96. package/src/lib/seam/components/SupportedDeviceTable/SupportedDeviceContent.tsx +23 -29
  97. package/src/lib/seam/components/SupportedDeviceTable/SupportedDeviceContentRows.tsx +3 -9
  98. package/src/lib/seam/components/SupportedDeviceTable/SupportedDeviceFilterArea.tsx +22 -41
  99. package/src/lib/seam/components/SupportedDeviceTable/SupportedDeviceFilterResultRow.tsx +8 -12
  100. package/src/lib/seam/components/SupportedDeviceTable/{SupportedDeviceBrandSection.tsx → SupportedDeviceManufacturerSection.tsx} +19 -26
  101. package/src/lib/seam/components/SupportedDeviceTable/SupportedDeviceRow.tsx +20 -11
  102. package/src/lib/seam/components/SupportedDeviceTable/SupportedDeviceTable.element.ts +2 -3
  103. package/src/lib/seam/components/SupportedDeviceTable/SupportedDeviceTable.tsx +10 -17
  104. package/src/lib/seam/components/SupportedDeviceTable/use-device-model.ts +45 -0
  105. package/src/lib/seam/components/SupportedDeviceTable/use-device-models.ts +43 -0
  106. package/src/lib/seam/components/SupportedDeviceTable/use-filtered-device-models.ts +31 -20
  107. package/src/lib/seam/components/SupportedDeviceTable/use-filtered-manufacturers.ts +54 -0
  108. package/src/lib/seam/components/SupportedDeviceTable/use-manufacturer.ts +45 -0
  109. package/src/lib/seam/components/SupportedDeviceTable/use-manufacturers.ts +43 -0
  110. package/src/lib/seam/components/common-props.tsx +10 -0
  111. package/src/lib/seam/filters.ts +32 -0
  112. package/src/lib/telemetry/client.ts +3 -3
  113. package/src/lib/ui/Snackbar/Snackbar.tsx +2 -2
  114. package/src/lib/version.ts +1 -1
  115. package/src/styles/_device-details.scss +1 -2
  116. package/src/styles/_supported-device-table.scss +4 -4
  117. package/src/styles/_thermostat.scss +1 -2
  118. package/lib/seam/components/SupportedDeviceTable/SupportedDeviceBrandSection.d.ts +0 -8
  119. package/lib/seam/components/SupportedDeviceTable/SupportedDeviceBrandSection.js +0 -42
  120. package/lib/seam/components/SupportedDeviceTable/SupportedDeviceBrandSection.js.map +0 -1
  121. package/lib/seam/components/SupportedDeviceTable/use-device-provider.d.ts +0 -2
  122. package/lib/seam/components/SupportedDeviceTable/use-device-provider.js +0 -13
  123. package/lib/seam/components/SupportedDeviceTable/use-device-provider.js.map +0 -1
  124. package/lib/seam/device-models/use-device-models.d.ts +0 -5
  125. package/lib/seam/device-models/use-device-models.js +0 -19
  126. package/lib/seam/device-models/use-device-models.js.map +0 -1
  127. package/lib/strings.d.ts +0 -1
  128. package/lib/strings.js +0 -4
  129. package/lib/strings.js.map +0 -1
  130. package/src/lib/seam/components/SupportedDeviceTable/use-device-provider.ts +0 -16
  131. package/src/lib/seam/device-models/use-device-models.ts +0 -39
  132. package/src/lib/strings.ts +0 -3
@@ -12,12 +12,8 @@ export interface DeviceTableProps extends CommonProps {
12
12
  onDeviceClick?: (deviceId: string) => void;
13
13
  preventDefaultOnDeviceClick?: boolean;
14
14
  heading?: string | null;
15
- /**
16
- * @deprecated Use heading.
17
- */
18
- title?: string | null;
19
15
  }
20
16
  export declare const defaultDeviceFilter: (device: CommonDevice, searchInputValue: string) => boolean;
21
17
  export declare const NestedDeviceTable: (props: Partial<import("../../../../lib/seam/components/common-props.js").RequiredCommonProps> & JSX.IntrinsicAttributes & import("../../../../lib/seam/components/common-props.js").RequiredCommonProps) => JSX.Element | null;
22
- export declare function DeviceTable({ deviceIds, connectedAccountIds, disableSearch, onDeviceClick, preventDefaultOnDeviceClick, deviceFilter, deviceComparator, heading, title, disableLockUnlock, disableCreateAccessCode, disableEditAccessCode, disableDeleteAccessCode, disableResourceIds, onBack, className, }?: DeviceTableProps): JSX.Element;
18
+ export declare function DeviceTable({ deviceIds, connectedAccountIds, disableSearch, onDeviceClick, preventDefaultOnDeviceClick, deviceFilter, deviceComparator, heading, errorFilter, warningFilter, disableLockUnlock, disableCreateAccessCode, disableEditAccessCode, disableDeleteAccessCode, disableResourceIds, onBack, className, }?: DeviceTableProps): JSX.Element;
23
19
  export {};
@@ -11,6 +11,7 @@ import { DeviceRow } from '../../../../lib/seam/components/DeviceTable/DeviceRow
11
11
  import { useDevices, } from '../../../../lib/seam/devices/use-devices.js';
12
12
  import { ContentHeader } from '../../../../lib/ui/layout/ContentHeader.js';
13
13
  import { LoadingToast } from '../../../../lib/ui/LoadingToast/LoadingToast.js';
14
+ import { Snackbar } from '../../../../lib/ui/Snackbar/Snackbar.js';
14
15
  import { EmptyPlaceholder } from '../../../../lib/ui/Table/EmptyPlaceholder.js';
15
16
  import { TableBody } from '../../../../lib/ui/Table/TableBody.js';
16
17
  import { TableHeader } from '../../../../lib/ui/Table/TableHeader.js';
@@ -24,9 +25,9 @@ export const defaultDeviceFilter = (device, searchInputValue) => {
24
25
  return device.properties.name.toLowerCase().includes(value);
25
26
  };
26
27
  export const NestedDeviceTable = withRequiredCommonProps(DeviceTable);
27
- export function DeviceTable({ deviceIds, connectedAccountIds, disableSearch = false, onDeviceClick = () => { }, preventDefaultOnDeviceClick = false, deviceFilter = defaultDeviceFilter, deviceComparator = compareByCreatedAtDesc, heading = t.devices, title = t.devices, disableLockUnlock = false, disableCreateAccessCode = false, disableEditAccessCode = false, disableDeleteAccessCode = false, disableResourceIds = false, onBack, className, } = {}) {
28
+ export function DeviceTable({ deviceIds, connectedAccountIds, disableSearch = false, onDeviceClick = () => { }, preventDefaultOnDeviceClick = false, deviceFilter = defaultDeviceFilter, deviceComparator = compareByCreatedAtDesc, heading = t.devices, errorFilter = () => true, warningFilter = () => true, disableLockUnlock = false, disableCreateAccessCode = false, disableEditAccessCode = false, disableDeleteAccessCode = false, disableResourceIds = false, onBack, className, } = {}) {
28
29
  useComponentTelemetry('DeviceTable');
29
- const { devices, isInitialLoading, isError, error } = useDevices({
30
+ const { devices, isInitialLoading, isError, refetch } = useDevices({
30
31
  device_ids: deviceIds,
31
32
  connected_account_ids: connectedAccountIds,
32
33
  });
@@ -43,17 +44,19 @@ export function DeviceTable({ deviceIds, connectedAccountIds, disableSearch = fa
43
44
  setSelectedDeviceId(deviceId);
44
45
  }, [onDeviceClick, preventDefaultOnDeviceClick, setSelectedDeviceId]);
45
46
  if (selectedDeviceId != null) {
46
- return (_jsx(NestedDeviceDetails, { deviceId: selectedDeviceId, disableLockUnlock: disableLockUnlock, disableCreateAccessCode: disableCreateAccessCode, disableEditAccessCode: disableEditAccessCode, disableDeleteAccessCode: disableDeleteAccessCode, disableResourceIds: disableResourceIds, onBack: () => {
47
+ return (_jsx(NestedDeviceDetails, { deviceId: selectedDeviceId, errorFilter: errorFilter, warningFilter: warningFilter, disableLockUnlock: disableLockUnlock, disableCreateAccessCode: disableCreateAccessCode, disableEditAccessCode: disableEditAccessCode, disableDeleteAccessCode: disableDeleteAccessCode, disableResourceIds: disableResourceIds, onBack: () => {
47
48
  setSelectedDeviceId(null);
48
49
  }, className: className }));
49
50
  }
50
- if (isError) {
51
- return _jsx("p", { className: className, children: error?.message });
52
- }
53
- return (_jsxs("div", { className: classNames('seam-device-table', className), children: [_jsx(ContentHeader, { onBack: onBack }), _jsxs(TableHeader, { children: [title != null ? (_jsxs(TableTitle, { children: [heading ?? title ?? t.devices, ' ', _jsxs(Caption, { children: ["(", filteredDevices.length, ")"] })] })) : (_jsx("div", { className: 'seam-fragment' })), _jsx("div", { className: 'seam-table-header-loading-wrap', children: _jsx(LoadingToast, { isLoading: isInitialLoading, label: t.loading, top: -20 }) }), !disableSearch && (_jsx(SearchTextField, { value: searchInputValue, onChange: setSearchInputValue, disabled: (devices?.length ?? 0) === 0 }))] }), _jsx(TableBody, { children: _jsx(Content, { devices: filteredDevices, onDeviceClick: handleDeviceClick }) })] }));
51
+ return (_jsxs("div", { className: classNames('seam-device-table', className), children: [_jsx(ContentHeader, { onBack: onBack }), _jsxs(TableHeader, { children: [heading != null ? (_jsxs(TableTitle, { children: [heading, " ", _jsxs(Caption, { children: ["(", filteredDevices.length, ")"] })] })) : (_jsx("div", { className: 'seam-fragment' })), _jsx("div", { className: 'seam-table-header-loading-wrap', children: _jsx(LoadingToast, { isLoading: isInitialLoading, label: t.loading, top: -20 }) }), !disableSearch && (_jsx(SearchTextField, { value: searchInputValue, onChange: setSearchInputValue, disabled: (devices?.length ?? 0) === 0 }))] }), _jsx(TableBody, { children: _jsx(Content, { devices: filteredDevices, onDeviceClick: handleDeviceClick, errorFilter: errorFilter }) }), _jsx(Snackbar, { variant: 'error', visible: isError, message: t.fallbackErrorMessage, action: {
52
+ label: t.tryAgain,
53
+ onClick: () => {
54
+ void refetch();
55
+ },
56
+ }, disableCloseButton: true })] }));
54
57
  }
55
58
  function Content(props) {
56
- const { devices, onDeviceClick } = props;
59
+ const { devices, onDeviceClick, errorFilter } = props;
57
60
  const [filter, setFilter] = useState(null);
58
61
  if (devices.length === 0) {
59
62
  return _jsx(EmptyPlaceholder, { children: t.noDevicesMessage });
@@ -71,7 +74,7 @@ function Content(props) {
71
74
  }
72
75
  return true;
73
76
  });
74
- return (_jsxs(_Fragment, { children: [_jsx(DeviceHealthBar, { devices: devices, filter: filter, onFilterSelect: setFilter }), filteredDevices.map((device) => (_jsx(DeviceRow, { device: device, onClick: () => {
77
+ return (_jsxs(_Fragment, { children: [_jsx(DeviceHealthBar, { devices: devices, filter: filter, onFilterSelect: setFilter, errorFilter: errorFilter }), filteredDevices.map((device) => (_jsx(DeviceRow, { device: device, onClick: () => {
75
78
  onDeviceClick(device.device_id);
76
79
  } }, device.device_id)))] }));
77
80
  }
@@ -79,5 +82,7 @@ const t = {
79
82
  devices: 'Devices',
80
83
  noDevicesMessage: 'Sorry, no devices were found',
81
84
  loading: 'Loading devices',
85
+ tryAgain: 'Try again',
86
+ fallbackErrorMessage: 'Devices could not be loaded',
82
87
  };
83
88
  //# sourceMappingURL=DeviceTable.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DeviceTable.js","sourceRoot":"","sources":["../../../../src/lib/seam/components/DeviceTable/DeviceTable.tsx"],"names":[],"mappings":";AAAA,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AACtD,OAAO,EAAqB,YAAY,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAA;AAE7E,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAA;AAE9D,OAAO,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAA;AACrD,OAAO,EAEL,uBAAuB,GACxB,MAAM,qCAAqC,CAAA;AAC5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,oDAAoD,CAAA;AACxF,OAAO,EAGL,eAAe,GAChB,MAAM,oDAAoD,CAAA;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,8CAA8C,CAAA;AACxE,OAAO,EACL,UAAU,GAEX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KAAK,gBAAgB,EAAE;YAC/B,OAAO,CACL,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,4BAA4B,IAAI,KAAK,CAAC;iBACnE,MAAM,GAAG,CAAC,CACd,CAAA;SACF;QAED,IAAI,MAAM,KAAK,eAAe,EAAE;YAC9B,OAAO,CACL,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,iBAAiB,IAAI,KAAK,CAAC,CAAC,MAAM,GAAG,CAAC,CACvE,CAAA;SACF;QAED,OAAO,IAAI,CAAA;IACb,CAAC,CAAC,CAAA;IAEF,OAAO,CACL,8BACE,KAAC,eAAe,IACd,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,MAAM,EACd,cAAc,EAAE,SAAS,EACzB,WAAW,EAAE,WAAW,GACxB,EACD,eAAe,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAC/B,KAAC,SAAS,IACR,MAAM,EAAE,MAAM,EAEd,OAAO,EAAE,GAAG,EAAE;oBACZ,aAAa,CAAC,MAAM,CAAC,SAAS,CAAC,CAAA;gBACjC,CAAC,IAHI,MAAM,CAAC,SAAS,CAIrB,CACH,CAAC,IACD,CACJ,CAAA;AACH,CAAC;AAED,MAAM,CAAC,GAAG;IACR,OAAO,EAAE,SAAS;IAClB,gBAAgB,EAAE,8BAA8B;IAChD,OAAO,EAAE,iBAAiB;IAC1B,QAAQ,EAAE,WAAW;IACrB,oBAAoB,EAAE,6BAA6B;CACpD,CAAA"}
@@ -4,8 +4,8 @@ interface SupportedDeviceContentProps {
4
4
  filterValue: string;
5
5
  resetFilterValue: () => void;
6
6
  filters: DeviceModelFilters;
7
- brands: string[] | null;
8
- excludedBrands: string[];
7
+ manufacturers: string[] | null;
8
+ excludedManufacturers: string[];
9
9
  }
10
- export declare function SupportedDeviceContent({ resetFilterValue, filterValue, filters, brands, excludedBrands, }: SupportedDeviceContentProps): JSX.Element | null;
10
+ export declare function SupportedDeviceContent({ resetFilterValue, filterValue, filters, manufacturers, excludedManufacturers, }: SupportedDeviceContentProps): JSX.Element | null;
11
11
  export {};
@@ -1,14 +1,14 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
- import { SupportedDeviceBrandSection } from '../../../../lib/seam/components/SupportedDeviceTable/SupportedDeviceBrandSection.js';
3
2
  import { SupportedDeviceFilterResultRow } from '../../../../lib/seam/components/SupportedDeviceTable/SupportedDeviceFilterResultRow.js';
3
+ import { SupportedDeviceManufacturerSection } from '../../../../lib/seam/components/SupportedDeviceTable/SupportedDeviceManufacturerSection.js';
4
4
  import { useFilteredDeviceModels, } from '../../../../lib/seam/components/SupportedDeviceTable/use-filtered-device-models.js';
5
5
  import { Button } from '../../../../lib/ui/Button.js';
6
- export function SupportedDeviceContent({ resetFilterValue, filterValue, filters, brands, excludedBrands, }) {
6
+ export function SupportedDeviceContent({ resetFilterValue, filterValue, filters, manufacturers, excludedManufacturers, }) {
7
7
  const { deviceModels, isLoading, isError, refetch } = useFilteredDeviceModels({
8
8
  filterValue,
9
9
  filters,
10
- brands,
11
- excludedBrands,
10
+ manufacturers,
11
+ excludedManufacturers,
12
12
  });
13
13
  if (isLoading) {
14
14
  return (_jsx("div", { className: 'seam-supported-device-table-content-state-block', children: _jsx("p", { children: t.loading }) }));
@@ -25,28 +25,22 @@ export function SupportedDeviceContent({ resetFilterValue, filterValue, filters,
25
25
  if (isEmpty) {
26
26
  return (_jsx("div", { className: 'seam-supported-device-table-content', children: _jsx(EmptyResult, { filterValue: filterValue, resetFilterValue: resetFilterValue }) }));
27
27
  }
28
- const hasFilters = filterValue.trim() !== '' || filters.brand !== null;
28
+ const hasFilters = filterValue.trim() !== '' || filters.manufacturer !== null;
29
29
  if (hasFilters) {
30
- return (_jsx("div", { className: 'seam-supported-device-table-content', children: deviceModels.map((deviceModel, index) => (_jsx(SupportedDeviceFilterResultRow, { deviceModel: deviceModel }, [
31
- deviceModel.main_category,
32
- deviceModel.brand,
33
- deviceModel.model_name,
34
- deviceModel.manufacturer_model_id,
35
- index,
36
- ].join(':')))) }));
30
+ return (_jsx("div", { className: 'seam-supported-device-table-content', children: deviceModels.map((deviceModel) => (_jsx(SupportedDeviceFilterResultRow, { deviceModel: deviceModel }, deviceModel.device_model_id))) }));
37
31
  }
38
- return (_jsx(_Fragment, { children: Object.entries(groupDeviceModelsByBrand(deviceModels)).map(([brand, models]) => (_jsx(SupportedDeviceBrandSection, { brand: brand, deviceModels: models }, brand))) }));
32
+ return (_jsx(_Fragment, { children: Object.entries(groupDeviceModelsByManufacturer(deviceModels)).map(([manufacturerId, models]) => (_jsx(SupportedDeviceManufacturerSection, { manufacturerId: manufacturerId, deviceModels: models }, manufacturerId))) }));
39
33
  }
40
34
  function EmptyResult({ filterValue, resetFilterValue, }) {
41
35
  const noMatchingRows = (_jsxs(_Fragment, { children: [_jsx("p", { children: t.noMatch }), _jsx(Button, { variant: 'outline', size: 'small', onClick: resetFilterValue, className: 'seam-supported-device-table-content-message-clear-search', children: t.clear })] }));
42
36
  return (_jsx("div", { className: 'seam-supported-device-table-content-message-row', children: _jsx("div", { children: _jsx("div", { className: 'seam-supported-device-table-content-message', children: filterValue.length === 0 ? _jsx("p", { children: t.noneFound }) : noMatchingRows }) }) }));
43
37
  }
44
- function groupDeviceModelsByBrand(deviceModels) {
38
+ function groupDeviceModelsByManufacturer(deviceModels) {
45
39
  const result = {};
46
40
  for (const model of deviceModels) {
47
- const { brand } = model;
48
- const list = result[brand] ?? [];
49
- result[brand] = [...list, model];
41
+ const { manufacturer } = model;
42
+ const list = result[manufacturer.manufacturer_id] ?? [];
43
+ result[manufacturer.manufacturer_id] = [...list, model];
50
44
  }
51
45
  return result;
52
46
  }
@@ -1 +1 @@
1
- {"version":3,"file":"SupportedDeviceContent.js","sourceRoot":"","sources":["../../../../src/lib/seam/components/SupportedDeviceTable/SupportedDeviceContent.tsx"],"names":[],"mappings":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iC;IAEjC,MAAM,MAAM,GAAkC,EAAE,CAAA;IAEhD,KAAK,MAAM,KAAK,IAAI,YAAY,EAAE;QAChC,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,CAAA;QACvB,MAAM,IAAI,GAAG,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE,CAAA;QAChC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,IAAI,EAAE,KAAK,CAAC,CAAA;KACjC;IACD,OAAO,MAAM,CAAA;AACf,CAAC;AAED,MAAM,CAAC,GAAG;IACR,OAAO,EAAE,0BAA0B;IACnC,KAAK,EAAE,OAAO;IACd,KAAK,EAAE,4CAA4C;IACnD,SAAS,EAAE,yBAAyB;IACpC,OAAO,EAAE,uCAAuC;IAChD,KAAK,EAAE,oBAAoB;CAC5B,CAAA"}
1
+ {"version":3,"file":"SupportedDeviceContent.js","sourceRoot":"","sources":["../../../../src/lib/seam/components/SupportedDeviceTable/SupportedDeviceContent.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,8BAA8B,EAAE,MAAM,4EAA4E,CAAA;AAC3H,OAAO,EAAE,kCAAkC,EAAE,MAAM,gFAAgF,CAAA;AAEnI,OAAO,EAEL,uBAAuB,GACxB,MAAM,wEAAwE,CAAA;AAC/E,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AAUzC,MAAM,UAAU,sBAAsB,CAAC,EACrC,gBAAgB,EAChB,WAAW,EACX,OAAO,EACP,aAAa,EACb,qBAAqB,GACO;IAC5B,MAAM,EAAE,YAAY,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,uBAAuB,CAC3E;QACE,WAAW;QACX,OAAO;QACP,aAAa;QACb,qBAAqB;KACtB,CACF,CAAA;IAED,IAAI,SAAS,EAAE;QACb,OAAO,CACL,cAAK,SAAS,EAAC,iDAAiD,YAC9D,sBAAI,CAAC,CAAC,OAAO,GAAK,GACd,CACP,CAAA;KACF;IAED,IAAI,OAAO,EAAE;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AAM,cAAc,GAAG,CACrB,8BACE,sBAAI,CAAC,CAAC,OAAO,GAAK,EAClB,KAAC,MAAM,IACL,OAAO,EAAC,SAAS,EACjB,IAAI,EAAC,OAAO,EACZ,OAAO,EAAE,gBAAgB,EACzB,SAAS,EAAC,0DAA0D,YAEnE,CAAC,CAAC,KAAK,GACD,IACR,CACJ,CAAA;IAED,OAAO,CACL,cAAK,SAAS,EAAC,iDAAiD,YAC9D,wBACE,cAAK,SAAS,EAAC,6CAA6C,YACzD,WAAW,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,sBAAI,CAAC,CAAC,SAAS,GAAK,CAAC,CAAC,CAAC,cAAc,GAC7D,GACF,GACF,CACP,CAAA;AACH,CAAC;AAED,SAAS,+BAA+B,CACtC,YAAiC;IAEjC,MAAM,MAAM,GAAoC,EAAE,CAAA;IAElD,KAAK,MAAM,KAAK,IAAI,YAAY,EAAE;QAChC,MAAM,EAAE,YAAY,EAAE,GAAG,KAAK,CAAA;QAC9B,MAAM,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,eAAe,CAAC,IAAI,EAAE,CAAA;QACvD,MAAM,CAAC,YAAY,CAAC,eAAe,CAAC,GAAG,CAAC,GAAG,IAAI,EAAE,KAAK,CAAC,CAAA;KACxD;IACD,OAAO,MAAM,CAAA;AACf,CAAC;AAED,MAAM,CAAC,GAAG;IACR,OAAO,EAAE,0BAA0B;IACnC,KAAK,EAAE,OAAO;IACd,KAAK,EAAE,4CAA4C;IACnD,SAAS,EAAE,yBAAyB;IACpC,OAAO,EAAE,uCAAuC;IAChD,KAAK,EAAE,oBAAoB;CAC5B,CAAA"}
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" resolution-mode="require"/>
2
- import type { UseDeviceModelsData } from '../../../../lib/seam/device-models/use-device-models.js';
2
+ import type { UseDeviceModelsData } from '../../../../lib/seam/components/SupportedDeviceTable/use-device-models.js';
3
3
  interface SupportedDeviceContentRowsProps {
4
4
  deviceModels: UseDeviceModelsData;
5
5
  }
@@ -1,12 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { SupportedDeviceRow } from '../../../../lib/seam/components/SupportedDeviceTable/SupportedDeviceRow.js';
3
3
  export function SupportedDeviceContentRows({ deviceModels, }) {
4
- return (_jsx("div", { className: 'seam-supported-device-table-content', children: deviceModels.map((deviceModel, index) => (_jsx(SupportedDeviceRow, { deviceModel: deviceModel }, [
5
- deviceModel.main_category,
6
- deviceModel.brand,
7
- deviceModel.model_name,
8
- deviceModel.manufacturer_model_id,
9
- index,
10
- ].join(':')))) }));
4
+ return (_jsx("div", { className: 'seam-supported-device-table-content', children: deviceModels.map((deviceModel) => (_jsx(SupportedDeviceRow, { deviceModel: deviceModel }, deviceModel.device_model_id))) }));
11
5
  }
12
6
  //# sourceMappingURL=SupportedDeviceContentRows.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SupportedDeviceContentRows.js","sourceRoot":"","sources":["../../../../src/lib/seam/components/SupportedDeviceTable/SupportedDeviceContentRows.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,gEAAgE,CAAA;AAOnG,MAAM,UAAU,0BAA0B,CAAC,EACzC,YAAY,GACoB;IAChC,OAAO,CACL,cAAK,SAAS,EAAC,qCAAqC,YACjD,YAAY,CAAC,GAAG,CAAC,CAAC,WAAW,EAAE,KAAK,EAAE,EAAE,CAAC,CACxC,KAAC,kBAAkB,IAQjB,WAAW,EAAE,WAAW,IAPnB;YACH,WAAW,CAAC,aAAa;YACzB,WAAW,CAAC,KAAK;YACjB,WAAW,CAAC,UAAU;YACtB,WAAW,CAAC,qBAAqB;YACjC,KAAK;SACN,CAAC,IAAI,CAAC,GAAG,CAAC,CAEX,CACH,CAAC,GACE,CACP,CAAA;AACH,CAAC"}
1
+ {"version":3,"file":"SupportedDeviceContentRows.js","sourceRoot":"","sources":["../../../../src/lib/seam/components/SupportedDeviceTable/SupportedDeviceContentRows.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,gEAAgE,CAAA;AAOnG,MAAM,UAAU,0BAA0B,CAAC,EACzC,YAAY,GACoB;IAChC,OAAO,CACL,cAAK,SAAS,EAAC,qCAAqC,YACjD,YAAY,CAAC,GAAG,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC,CACjC,KAAC,kBAAkB,IAEjB,WAAW,EAAE,WAAW,IADnB,WAAW,CAAC,eAAe,CAEhC,CACH,CAAC,GACE,CACP,CAAA;AACH,CAAC"}
@@ -5,8 +5,8 @@ interface SupportedDeviceFilterAreaProps {
5
5
  setFilterValue: (filter: string) => void;
6
6
  filters: DeviceModelFilters;
7
7
  setFilters: Dispatch<SetStateAction<DeviceModelFilters>>;
8
- brands: string[] | null;
9
- excludedBrands: string[];
8
+ manufacturers: string[] | null;
9
+ excludedManufacturers: string[];
10
10
  }
11
- export declare function SupportedDeviceFilterArea({ filterValue, setFilterValue, filters, setFilters, brands, excludedBrands, }: SupportedDeviceFilterAreaProps): JSX.Element;
11
+ export declare function SupportedDeviceFilterArea({ filterValue, setFilterValue, filters, setFilters, manufacturers, excludedManufacturers, }: SupportedDeviceFilterAreaProps): JSX.Element;
12
12
  export {};
@@ -1,13 +1,15 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { FilterCategoryMenu } from '../../../../lib/seam/components/SupportedDeviceTable/FilterCategoryMenu.js';
3
- import { useDeviceModels } from '../../../../lib/seam/device-models/use-device-models.js';
4
- import { capitalize } from '../../../../lib/strings.js';
5
3
  import { Button } from '../../../../lib/ui/Button.js';
6
4
  import { Menu } from '../../../../lib/ui/Menu/Menu.js';
7
5
  import { SearchTextField } from '../../../../lib/ui/TextField/SearchTextField.js';
8
- export function SupportedDeviceFilterArea({ filterValue, setFilterValue, filters, setFilters, brands, excludedBrands, }) {
6
+ import { useFilteredManufacturers } from './use-filtered-manufacturers.js';
7
+ export function SupportedDeviceFilterArea({ filterValue, setFilterValue, filters, setFilters, manufacturers, excludedManufacturers, }) {
9
8
  const appliedFiltersCount = getAppliedFilterCount(filters);
10
- const availableBrands = useAvailableBrands(brands, excludedBrands);
9
+ const { manufacturers: availableManufacturers } = useFilteredManufacturers({
10
+ manufacturers,
11
+ excludedManufacturers,
12
+ });
11
13
  const resetFilter = (filterType) => {
12
14
  setFilters((filters) => ({
13
15
  ...filters,
@@ -18,13 +20,13 @@ export function SupportedDeviceFilterArea({ filterValue, setFilterValue, filters
18
20
  const allLabel = t.all;
19
21
  return (_jsxs("div", { className: 'seam-supported-device-table-filter-area', children: [_jsx("div", { className: 'seam-deliberate-block' }), _jsxs("div", { className: 'seam-filters-wrap', children: [_jsx(Menu, { renderButton: ({ onOpen }) => (_jsx(Button, { variant: 'outline', className: 'seam-filters-button', onClick: onOpen, children: filterButtonLabel })), children: _jsxs("div", { className: 'seam-supported-device-table-filter-menu', onClick: (event) => {
20
22
  event.stopPropagation();
21
- }, children: [_jsx("div", { className: 'seam-filter-menu-row', children: _jsx(FilterCategoryMenu, { label: t.brand, allLabel: allLabel, options: availableBrands, onSelect: (brand) => {
23
+ }, children: [_jsx("div", { className: 'seam-filter-menu-row', children: _jsx(FilterCategoryMenu, { label: t.manufacturer, allLabel: allLabel, options: availableManufacturers?.map((manufacturer) => manufacturer.display_name) ?? [], onSelect: (manufacturer) => {
22
24
  setFilters((filters) => ({
23
25
  ...filters,
24
- brand,
26
+ manufacturer,
25
27
  }));
26
- }, buttonLabel: filters.brand ?? allLabel, onAllOptionSelect: () => {
27
- resetFilter('brand');
28
+ }, buttonLabel: filters.manufacturer ?? allLabel, onAllOptionSelect: () => {
29
+ resetFilter('manufacturer');
28
30
  } }) }), _jsx("div", { className: 'seam-filter-menu-row', children: _jsxs("label", { htmlFor: 'supportedOnly', className: 'seam-filter-checkbox-label', children: [_jsx("p", { children: t.supported }), _jsx("input", { id: 'supportedOnly', name: 'supportedOnly', type: 'checkbox', className: 'seam-filter-checkbox', checked: filters.supportedOnly, onChange: (event) => {
29
31
  setFilters((filters) => ({
30
32
  ...filters,
@@ -36,36 +38,15 @@ export function SupportedDeviceFilterArea({ filterValue, setFilterValue, filters
36
38
  }
37
39
  const getAppliedFilterCount = (filters) => {
38
40
  let count = 0;
39
- if (filters.brand !== null)
41
+ if (filters.manufacturer !== null)
40
42
  count++;
41
43
  if (!filters.supportedOnly)
42
44
  count++;
43
45
  return count;
44
46
  };
45
- const useAvailableBrands = (brands, excludedBrands) => {
46
- const { deviceModels } = useDeviceModels();
47
- if (deviceModels == null)
48
- return [];
49
- const availableBrands = deviceModels
50
- .map(({ brand }) => brand.trim())
51
- .filter((brand) => {
52
- // UPSTREAM: API can return an empty value for brand.
53
- return brand !== '';
54
- })
55
- .filter((brand) => {
56
- if (brands === null)
57
- return true;
58
- return brands.includes(brand);
59
- })
60
- .filter((brand) => {
61
- return !excludedBrands.includes(brand);
62
- })
63
- .map((brand) => capitalize(brand));
64
- return Array.from(new Set(availableBrands));
65
- };
66
47
  const t = {
67
48
  all: 'All',
68
- brand: 'Brand',
49
+ manufacturer: 'Manufacturer',
69
50
  supported: 'Supported',
70
51
  filter: 'Filter',
71
52
  filters: 'Filters',
@@ -1 +1 @@
1
- {"version":3,"file":"SupportedDeviceFilterArea.js","sourceRoot":"","sources":["../../../../src/lib/seam/components/SupportedDeviceTable/SupportedDeviceFilterArea.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,gEAAgE,CAAA;AAEnG,OAAO,EAAE,eAAe,EAAE,MAAM,6CAA6C,CAAA;AAC7E,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAA;AAC1C,OAAO,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAA;AAWrE,MAAM,UAAU,yBAAyB,CAAC,EACxC,WAAW,EACX,cAAc,EACd,O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,MAAuB,EACvB,cAAwB,EACd,EAAE;IACZ,MAAM,EAAE,YAAY,EAAE,GAAG,eAAe,EAAE,CAAA;IAE1C,IAAI,YAAY,IAAI,IAAI;QAAE,OAAO,EAAE,CAAA;IAEnC,MAAM,eAAe,GAAG,YAAY;SACjC,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;SAChC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE;QAChB,qDAAqD;QACrD,OAAO,KAAK,KAAK,EAAE,CAAA;IACrB,CAAC,CAAC;SACD,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE;QAChB,IAAI,MAAM,KAAK,IAAI;YAAE,OAAO,IAAI,CAAA;QAChC,OAAO,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAA;IAC/B,CAAC,CAAC;SACD,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE;QAChB,OAAO,CAAC,cAAc,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAA;IACxC,CAAC,CAAC;SACD,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAA;IAEpC,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,eAAe,CAAC,CAAC,CAAA;AAC7C,CAAC,CAAA;AAED,MAAM,CAAC,GAAG;IACR,GAAG,EAAE,KAAK;IACV,KAAK,EAAE,OAAO;IACd,SAAS,EAAE,WAAW;IACtB,MAAM,EAAE,QAAQ;IAChB,OAAO,EAAE,SAAS;CACnB,CAAA"}
1
+ {"version":3,"file":"SupportedDeviceFilterArea.js","sourceRoot":"","sources":["../../../../src/lib/seam/components/SupportedDeviceTable/SupportedDeviceFilterArea.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,gEAAgE,CAAA;AAEnG,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACzC,OA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AAC,oDAAoD,GAC9D,GACE,IACF,IACF,CACP,CAAA;AACH,CAAC;AAED,MAAM,qBAAqB,GAAG,CAAC,OAA2B,EAAU,EAAE;IACpE,IAAI,KAAK,GAAG,CAAC,CAAA;IACb,IAAI,OAAO,CAAC,YAAY,KAAK,IAAI;QAAE,KAAK,EAAE,CAAA;IAC1C,IAAI,CAAC,OAAO,CAAC,aAAa;QAAE,KAAK,EAAE,CAAA;IACnC,OAAO,KAAK,CAAA;AACd,CAAC,CAAA;AAED,MAAM,CAAC,GAAG;IACR,GAAG,EAAE,KAAK;IACV,YAAY,EAAE,cAAc;IAC5B,SAAS,EAAE,WAAW;IACtB,MAAM,EAAE,QAAQ;IAChB,OAAO,EAAE,SAAS;CACnB,CAAA"}
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" resolution-mode="require"/>
2
- import type { DeviceModel } from 'seamapi';
2
+ import type { DeviceModelV1 } from '@seamapi/types/devicedb';
3
3
  interface SupportedDeviceFilterResultRowProps {
4
- deviceModel: DeviceModel;
4
+ deviceModel: DeviceModelV1;
5
5
  }
6
6
  export declare function SupportedDeviceFilterResultRow({ deviceModel, }: SupportedDeviceFilterResultRowProps): JSX.Element;
7
7
  export declare function ModelColumn({ deviceModel, }: SupportedDeviceFilterResultRowProps): JSX.Element;
@@ -1,12 +1,10 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { connectionTypeNames, ImageColumn, StatusColumn, } from '../../../../lib/seam/components/SupportedDeviceTable/SupportedDeviceRow.js';
3
- import { useDeviceProvider } from '../../../../lib/seam/components/SupportedDeviceTable/use-device-provider.js';
2
+ import { ImageColumn, StatusColumn, } from '../../../../lib/seam/components/SupportedDeviceTable/SupportedDeviceRow.js';
4
3
  import { DotDivider } from '../../../../lib/ui/layout/DotDivider.js';
5
4
  export function SupportedDeviceFilterResultRow({ deviceModel, }) {
6
5
  return (_jsxs("div", { className: 'seam-row filter-result-row', children: [_jsx(ImageColumn, { deviceModel: deviceModel }), _jsx(ModelColumn, { deviceModel: deviceModel }), _jsx(StatusColumn, { deviceModel: deviceModel })] }));
7
6
  }
8
7
  export function ModelColumn({ deviceModel, }) {
9
- const deviceProvider = useDeviceProvider(deviceModel.brand);
10
- return (_jsxs("div", { className: 'seam-col seam-model-col', children: [_jsxs("div", { className: 'seam-model-name', children: [_jsx("img", { src: deviceProvider.image_url, alt: deviceModel.brand, className: 'seam-brand-image' }), ' ', _jsx("div", { className: 'seam-truncated-text', children: deviceModel.model_name })] }), _jsx("div", { className: 'seam-model-id', children: _jsxs("div", { className: 'seam-truncated-text', children: [deviceModel.manufacturer_model_id, _jsx(DotDivider, {}), connectionTypeNames[deviceModel.connection_type]] }) })] }));
8
+ return (_jsxs("div", { className: 'seam-col seam-model-col', children: [_jsxs("div", { className: 'seam-model-name', children: [_jsx("img", { src: deviceModel.manufacturer.logo?.url, alt: deviceModel.manufacturer.display_name, className: 'seam-manufacturer-image' }), ' ', _jsx("div", { className: 'seam-truncated-text', children: deviceModel.display_name })] }), _jsx("div", { className: 'seam-model-id', children: _jsxs("div", { className: 'seam-truncated-text', children: [deviceModel.device_model_id, _jsx(DotDivider, {}), deviceModel.main_connection_type] }) })] }));
11
9
  }
12
10
  //# sourceMappingURL=SupportedDeviceFilterResultRow.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SupportedDeviceFilterResultRow.js","sourceRoot":"","sources":["../../../../src/lib/seam/components/SupportedDeviceTable/SupportedDeviceFilterResultRow.tsx"],"names":[],"mappings":";AAEA,OAAO,EACL,mBAAmB,EACnB,WAAW,EACX,YAAY,GACb,MAAM,gEAAgE,CAAA;AACvE,OAAO,EAAE,iBAAiB,EAAE,MAAM,iEAAiE,CAAA;AACnG,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAA;AAMxD,MAAM,UAAU,8BAA8B,CAAC,EAC7C,WAAW,GACyB;IACpC,OAAO,CACL,eAAK,SAAS,EAAC,4BAA4B,aACzC,KAAC,WAAW,IAAC,WAAW,EAAE,WAAW,GAAI,EACzC,KAAC,WAAW,IAAC,WAAW,EAAE,WAAW,GAAI,EACzC,KAAC,YAAY,IAAC,WAAW,EAAE,WAAW,GAAI,IACtC,CACP,CAAA;AACH,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,EAC1B,WAAW,GACyB;IACpC,MAAM,cAAc,GAAG,iBAAiB,CAAC,WAAW,CAAC,KAAK,CAAC,CAAA;IAE3D,OAAO,CACL,eAAK,SAAS,EAAC,yBAAyB,aACtC,eAAK,SAAS,EAAC,iBAAiB,aAC9B,cACE,GAAG,EAAE,cAAc,CAAC,SAAS,EAC7B,GAAG,EAAE,WAAW,CAAC,KAAK,EACtB,SAAS,EAAC,kBAAkB,GAC5B,EAAC,GAAG,EACN,cAAK,SAAS,EAAC,qBAAqB,YAAE,WAAW,CAAC,UAAU,GAAO,IAC/D,EACN,cAAK,SAAS,EAAC,eAAe,YAC5B,eAAK,SAAS,EAAC,qBAAqB,aACjC,WAAW,CAAC,qBAAqB,EAClC,KAAC,UAAU,KAAG,EACb,mBAAmB,CAAC,WAAW,CAAC,eAAe,CAAC,IAC7C,GACF,IACF,CACP,CAAA;AACH,CAAC"}
1
+ {"version":3,"file":"SupportedDeviceFilterResultRow.js","sourceRoot":"","sources":["../../../../src/lib/seam/components/SupportedDeviceTable/SupportedDeviceFilterResultRow.tsx"],"names":[],"mappings":";AAEA,OAAO,EACL,WAAW,EACX,YAAY,GACb,MAAM,gEAAgE,CAAA;AACvE,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAA;AAMxD,MAAM,UAAU,8BAA8B,CAAC,EAC7C,WAAW,GACyB;IACpC,OAAO,CACL,eAAK,SAAS,EAAC,4BAA4B,aACzC,KAAC,WAAW,IAAC,WAAW,EAAE,WAAW,GAAI,EACzC,KAAC,WAAW,IAAC,WAAW,EAAE,WAAW,GAAI,EACzC,KAAC,YAAY,IAAC,WAAW,EAAE,WAAW,GAAI,IACtC,CACP,CAAA;AACH,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,EAC1B,WAAW,GACyB;IACpC,OAAO,CACL,eAAK,SAAS,EAAC,yBAAyB,aACtC,eAAK,SAAS,EAAC,iBAAiB,aAC9B,cACE,GAAG,EAAE,WAAW,CAAC,YAAY,CAAC,IAAI,EAAE,GAAG,EACvC,GAAG,EAAE,WAAW,CAAC,YAAY,CAAC,YAAY,EAC1C,SAAS,EAAC,yBAAyB,GACnC,EAAC,GAAG,EACN,cAAK,SAAS,EAAC,qBAAqB,YAAE,WAAW,CAAC,YAAY,GAAO,IACjE,EACN,cAAK,SAAS,EAAC,eAAe,YAC5B,eAAK,SAAS,EAAC,qBAAqB,aACjC,WAAW,CAAC,eAAe,EAC5B,KAAC,UAAU,KAAG,EACb,WAAW,CAAC,oBAAoB,IAC7B,GACF,IACF,CACP,CAAA;AACH,CAAC"}
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" resolution-mode="require"/>
2
+ import type { DeviceModelV1 } from '@seamapi/types/devicedb';
3
+ interface SupportedDeviceManufacturerSectionProps {
4
+ manufacturerId: string;
5
+ deviceModels: DeviceModelV1[];
6
+ }
7
+ export declare function SupportedDeviceManufacturerSection({ manufacturerId, deviceModels, }: SupportedDeviceManufacturerSectionProps): JSX.Element | null;
8
+ export {};
@@ -0,0 +1,35 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import classNames from 'classnames';
3
+ import { ChevronRightIcon } from '../../../../lib/icons/ChevronRight.js';
4
+ import { HiddenDevicesOverlay } from '../../../../lib/seam/components/SupportedDeviceTable/HiddenDevicesOverlay.js';
5
+ import { ShowAllDevicesButton } from '../../../../lib/seam/components/SupportedDeviceTable/ShowAllDevicesButton.js';
6
+ import { SupportedDeviceRow } from '../../../../lib/seam/components/SupportedDeviceTable/SupportedDeviceRow.js';
7
+ import { useManufacturer } from '../../../../lib/seam/components/SupportedDeviceTable/use-manufacturer.js';
8
+ import { useToggle } from '../../../../lib/ui/use-toggle.js';
9
+ /**
10
+ * How many device models required before collapsing the list,
11
+ * and requiring the user to click to view all.
12
+ */
13
+ const maxDevicesBeforeCollapsing = 3;
14
+ export function SupportedDeviceManufacturerSection({ manufacturerId, deviceModels, }) {
15
+ const { manufacturer } = useManufacturer({ manufacturer_id: manufacturerId });
16
+ const [expanded, toggleExpand] = useToggle();
17
+ const canExpand = deviceModels.length > maxDevicesBeforeCollapsing;
18
+ const visibleDevices = !canExpand || expanded
19
+ ? deviceModels
20
+ : deviceModels.filter((_deviceModel, index) => index < maxDevicesBeforeCollapsing);
21
+ const handleHeaderClick = () => {
22
+ if (!canExpand) {
23
+ return;
24
+ }
25
+ toggleExpand();
26
+ };
27
+ return (_jsxs("div", { className: classNames('seam-manufacturer-section', {
28
+ 'can-expand': canExpand,
29
+ 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
+ }
32
+ const t = {
33
+ devices: 'Devices',
34
+ };
35
+ //# sourceMappingURL=SupportedDeviceManufacturerSection.js.map
@@ -0,0 +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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AAS,EAAC,wBAAwB,aACnC,YAAY,EAAE,YAAY,OAAG,CAAC,CAAC,OAAO,IACpC,EACJ,SAAS,IAAI,KAAC,gBAAgB,IAAC,SAAS,EAAC,SAAS,GAAG,IAClD,EACN,cAAK,SAAS,EAAC,qCAAqC,YACjD,cAAc,CAAC,GAAG,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC,CACnC,KAAC,kBAAkB,IAEjB,WAAW,EAAE,WAAW,IADnB,WAAW,CAAC,eAAe,CAEhC,CACH,CAAC,GACE,EACN,KAAC,oBAAoB,IACnB,OAAO,EAAE,SAAS,EAClB,OAAO,EAAE,YAAY,EACrB,QAAQ,EAAE,QAAQ,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,7 +1,8 @@
1
1
  /// <reference types="react" resolution-mode="require"/>
2
+ import type { DeviceModelV1 } from '@seamapi/types/devicedb';
2
3
  import type { DeviceModel } from 'seamapi';
3
4
  interface SupportedDeviceRowProps {
4
- deviceModel: DeviceModel;
5
+ deviceModel: DeviceModelV1;
5
6
  }
6
7
  export declare function SupportedDeviceRow({ deviceModel, }: SupportedDeviceRowProps): JSX.Element;
7
8
  export declare function ImageColumn({ deviceModel, }: SupportedDeviceRowProps): JSX.Element;
@@ -5,24 +5,28 @@ export function SupportedDeviceRow({ deviceModel, }) {
5
5
  return (_jsxs("div", { className: 'seam-row', children: [_jsx(ImageColumn, { deviceModel: deviceModel }), _jsx(ModelColumn, { deviceModel: deviceModel }), _jsx(StatusColumn, { deviceModel: deviceModel })] }));
6
6
  }
7
7
  export function ImageColumn({ deviceModel, }) {
8
- return (_jsx("div", { className: 'seam-col seam-device-image-col', children: _jsx("div", { className: 'seam-image-box', children: _jsx("img", { width: 40, src: deviceModel.icon_url }) }) }));
8
+ return (_jsx("div", { className: 'seam-col seam-device-image-col', children: _jsx("div", { className: 'seam-image-box', children: _jsx("img", { width: 40, src: deviceModel.aesthetic_variants[0]?.images[0]?.url }) }) }));
9
9
  }
10
10
  export function ModelColumn({ deviceModel, }) {
11
- return (_jsxs("div", { className: 'seam-col seam-model-col', children: [_jsx("div", { className: 'seam-model-name', children: _jsx("div", { className: 'seam-truncated-text', children: deviceModel.model_name }) }), _jsx("div", { className: 'seam-model-id', children: _jsxs("div", { className: 'seam-truncated-text', children: [deviceModel.manufacturer_model_id, _jsx(DotDivider, {}), connectionTypeNames[deviceModel.connection_type]] }) })] }));
11
+ return (_jsxs("div", { className: 'seam-col seam-model-col', children: [_jsx("div", { className: 'seam-model-name', children: _jsx("div", { className: 'seam-truncated-text', children: deviceModel.display_name }) }), _jsx("div", { className: 'seam-model-id', children: _jsxs("div", { className: 'seam-truncated-text', children: [deviceModel.device_model_id, _jsx(DotDivider, {}), deviceModel.main_connection_type] }) })] }));
12
12
  }
13
13
  export function StatusColumn({ deviceModel, }) {
14
- const statusColor = supportLevelColors[deviceModel.support_level] ?? 'unknown';
15
- return (_jsx("div", { className: 'seam-col seam-status-col', children: _jsx("div", { className: classNames('seam-status-pill', `status-${statusColor}`), children: _jsx("span", { children: status[deviceModel.support_level] }) }) }));
14
+ const statusColor = supportLevelColors[deviceModel.manufacturer.integration] ?? 'unknown';
15
+ return (_jsx("div", { className: 'seam-col seam-status-col', children: _jsx("div", { className: classNames('seam-status-pill', `status-${statusColor}`), children: _jsx("span", { children: status[deviceModel.manufacturer.integration] }) }) }));
16
16
  }
17
17
  const supportLevelColors = {
18
- live: 'green',
18
+ stable: 'green',
19
19
  beta: 'blue',
20
+ planned: 'unknown',
20
21
  unsupported: 'unknown',
22
+ inquire: 'unknown',
21
23
  };
22
24
  const status = {
23
- live: 'LIVE',
25
+ stable: 'LIVE',
24
26
  beta: 'BETA',
25
27
  unsupported: 'Inquire',
28
+ planned: 'Inquire',
29
+ inquire: 'Inquire',
26
30
  };
27
31
  export const connectionTypeNames = {
28
32
  wifi: 'Wifi',
@@ -1 +1 @@
1
- {"version":3,"file":"SupportedDeviceRow.js","sourceRoot":"","sources":["../../../../src/lib/seam/components/SupportedDeviceTable/SupportedDeviceRow.tsx"],"names":[],"mappings":";AAAA,OAAO,UAAU,MAAM,YAAY,CAAA;AAGnC,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAA;AAMxD,MAAM,UAAU,kBAAkB,CAAC,EACjC,WAAW,GACa;IACxB,OAAO,CACL,eAAK,SAAS,EAAC,UAAU,aACvB,KAAC,WAAW,IAAC,WAAW,EAAE,WAAW,GAAI,EACzC,KAAC,WAAW,IAAC,WAAW,EAAE,WAAW,GAAI,EACzC,KAAC,YAAY,IAAC,WAAW,EAAE,WAAW,GAAI,IACtC,CACP,CAAA;AACH,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,EAC1B,WAAW,GACa;IACxB,OAAO,CACL,cAAK,SAAS,EAAC,gCAAgC,YAC7C,cAAK,SAAS,EAAC,gBAAgB,YAC7B,cAAK,KAAK,EAAE,EAAE,EAAE,GAAG,EAAE,WAAW,CAAC,QAAQ,GAAI,GACzC,GACF,CACP,CAAA;AACH,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,EAC1B,WAAW,GACa;IACxB,OAAO,CACL,eAAK,SAAS,EAAC,yBAAyB,aACtC,cAAK,SAAS,EAAC,iBAAiB,YAC9B,cAAK,SAAS,EAAC,qBAAqB,YAAE,WAAW,CAAC,UAAU,GAAO,GAC/D,EACN,cAAK,SAAS,EAAC,eAAe,YAC5B,eAAK,SAAS,EAAC,qBAAqB,aACjC,WAAW,CAAC,qBAAqB,EAClC,KAAC,UAAU,KAAG,EACb,mBAAmB,CAAC,WAAW,CAAC,eAAe,CAAC,IAC7C,GACF,IACF,CACP,CAAA;AACH,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,EAC3B,WAAW,GACa;IACxB,MAAM,WAAW,GAAG,kBAAkB,CAAC,WAAW,CAAC,aAAa,CAAC,IAAI,SAAS,CAAA;IAE9E,OAAO,CACL,cAAK,SAAS,EAAC,0BAA0B,YACvC,cAAK,SAAS,EAAE,UAAU,CAAC,kBAAkB,EAAE,UAAU,WAAW,EAAE,CAAC,YACrE,yBAAO,MAAM,CAAC,WAAW,CAAC,aAAa,CAAC,GAAQ,GAC5C,GACF,CACP,CAAA;AACH,CAAC;AAED,MAAM,kBAAkB,GAGpB;IACF,IAAI,EAAE,OAAO;IACb,IAAI,EAAE,MAAM;IACZ,WAAW,EAAE,SAAS;CACvB,CAAA;AAED,MAAM,MAAM,GAAiD;IAC3D,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,MAAM;IACZ,WAAW,EAAE,SAAS;CACvB,CAAA;AAED,MAAM,CAAC,MAAM,mBAAmB,GAG5B;IACF,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,QAAQ;IACf,MAAM,EAAE,QAAQ;IAChB,OAAO,EAAE,SAAS;CACnB,CAAA"}
1
+ {"version":3,"file":"SupportedDeviceRow.js","sourceRoot":"","sources":["../../../../src/lib/seam/components/SupportedDeviceTable/SupportedDeviceRow.tsx"],"names":[],"mappings":";AACA,OAAO,UAAU,MAAM,YAAY,CAAA;AAGnC,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAA;AAMxD,MAAM,UAAU,kBAAkB,CAAC,EACjC,WAAW,GACa;IACxB,OAAO,CACL,eAAK,SAAS,EAAC,UAAU,aACvB,KAAC,WAAW,IAAC,WAAW,EAAE,WAAW,GAAI,EACzC,KAAC,WAAW,IAAC,WAAW,EAAE,WAAW,GAAI,EACzC,KAAC,YAAY,IAAC,WAAW,EAAE,WAAW,GAAI,IACtC,CACP,CAAA;AACH,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,EAC1B,WAAW,GACa;IACxB,OAAO,CACL,cAAK,SAAS,EAAC,gCAAgC,YAC7C,cAAK,SAAS,EAAC,gBAAgB,YA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,GAG5B;IACF,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,QAAQ;IACf,MAAM,EAAE,QAAQ;IAChB,OAAO,EAAE,SAAS;CACnB,CAAA"}
@@ -2,12 +2,8 @@
2
2
  import { type CommonProps } from '../../../../lib/seam/components/common-props.js';
3
3
  export interface SupportedDeviceTableProps extends CommonProps {
4
4
  disableFilter?: boolean;
5
- /**
6
- * @deprecated Use disableFilter.
7
- */
8
- cannotFilter?: boolean;
9
- brands?: string[] | null;
10
- excludedBrands?: string[];
5
+ manufacturers?: string[] | null;
6
+ excludedManufacturers?: string[];
11
7
  }
12
8
  export declare const NestedSupportedDeviceTable: (props: Partial<import("../../../../lib/seam/components/common-props.js").RequiredCommonProps> & JSX.IntrinsicAttributes & import("../../../../lib/seam/components/common-props.js").RequiredCommonProps) => JSX.Element | null;
13
- export declare function SupportedDeviceTable({ disableFilter, cannotFilter, brands, excludedBrands, className, }?: SupportedDeviceTableProps): JSX.Element;
9
+ export declare function SupportedDeviceTable({ disableFilter, manufacturers, excludedManufacturers, className, }?: SupportedDeviceTableProps): JSX.Element;
@@ -6,16 +6,15 @@ import { withRequiredCommonProps, } from '../../../../lib/seam/components/common
6
6
  import { SupportedDeviceContent } from '../../../../lib/seam/components/SupportedDeviceTable/SupportedDeviceContent.js';
7
7
  import { SupportedDeviceFilterArea } from '../../../../lib/seam/components/SupportedDeviceTable/SupportedDeviceFilterArea.js';
8
8
  export const NestedSupportedDeviceTable = withRequiredCommonProps(SupportedDeviceTable);
9
- export function SupportedDeviceTable({ disableFilter = false, cannotFilter, brands = null, excludedBrands = [], className, } = {}) {
9
+ export function SupportedDeviceTable({ disableFilter = false, manufacturers = null, excludedManufacturers = [], className, } = {}) {
10
10
  useComponentTelemetry('SupportedDeviceTable');
11
11
  const [filterValue, setFilterValue] = useState('');
12
12
  const [filters, setFilters] = useState({
13
13
  supportedOnly: true,
14
- brand: null,
14
+ manufacturer: null,
15
15
  });
16
- const hideFilter = cannotFilter ?? disableFilter;
17
- return (_jsxs("div", { className: classNames('seam-supported-device-table-content-wrap', className), children: [!hideFilter && (_jsx(SupportedDeviceFilterArea, { filterValue: filterValue, setFilterValue: setFilterValue, filters: filters, setFilters: setFilters, brands: brands, excludedBrands: excludedBrands })), _jsx(SupportedDeviceContent, { resetFilterValue: () => {
16
+ return (_jsxs("div", { className: classNames('seam-supported-device-table-content-wrap', className), children: [!disableFilter && (_jsx(SupportedDeviceFilterArea, { filterValue: filterValue, setFilterValue: setFilterValue, filters: filters, setFilters: setFilters, manufacturers: manufacturers, excludedManufacturers: excludedManufacturers })), _jsx(SupportedDeviceContent, { resetFilterValue: () => {
18
17
  setFilterValue('');
19
- }, filterValue: filterValue, filters: filters, brands: brands, excludedBrands: excludedBrands })] }));
18
+ }, filterValue: filterValue, filters: filters, manufacturers: manufacturers, excludedManufacturers: excludedManufacturers })] }));
20
19
  }
21
20
  //# sourceMappingURL=SupportedDeviceTable.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SupportedDeviceTable.js","sourceRoot":"","sources":["../../../../src/lib/seam/components/SupportedDeviceTable/SupportedDeviceTable.tsx"],"names":[],"mappings":";AAAA,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAEhC,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAA;AAE9D,OAAO,EAEL,uBAAuB,GACxB,MAAM,qCAAqC,CAAA;AAC5C,OAAO,EAAE,sBAAsB,EAAE,MAAM,oEAAoE,CAAA;AAC3G,OAAO,EAAE,yBAAyB,EAAE,MAAM,uEAAuE,CAAA;AAajH,MAAM,CAAC,MAAM,0BAA0B,GACrC,uBAAuB,CAAC,oBAAoB,CAAC,CAAA;AAE/C,MAAM,UAAU,oBAAoB,CAAC,EACnC,aAAa,GAAG,KAAK,EACrB,YAAY,EACZ,MAAM,GAAG,IAAI,EACb,cAAc,GAAG,EAAE,EACnB,SAAS,MACoB,EAAE;IAC/B,qBAAqB,CAAC,sBAAsB,CAAC,CAAA;IAE7C,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAA;IAClD,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAqB;QACzD,aAAa,EAAE,IAAI;QACnB,KAAK,EAAE,IAAI;KACZ,CAAC,CAAA;IAEF,MAAM,UAAU,GAAG,YAAY,IAAI,aAAa,CAAA;IAEhD,OAAO,CACL,eACE,SAAS,EAAE,UAAU,CACnB,0CAA0C,EAC1C,SAAS,CACV,aAEA,CAAC,UAAU,IAAI,CACd,KAAC,yBAAyB,IACxB,WAAW,EAAE,WAAW,EACxB,cAAc,EAAE,cAAc,EAC9B,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,UAAU,EACtB,MAAM,EAAE,MAAM,EACd,cAAc,EAAE,cAAc,GAC9B,CACH,EACD,KAAC,sBAAsB,IACrB,gBAAgB,EAAE,GAAG,EAAE;oBACrB,cAAc,CAAC,EAAE,CAAC,CAAA;gBACpB,CAAC,EACD,WAAW,EAAE,WAAW,EACxB,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,MAAM,EACd,cAAc,EAAE,cAAc,GAC9B,IACE,CACP,CAAA;AACH,CAAC"}
1
+ {"version":3,"file":"SupportedDeviceTable.js","sourceRoot":"","sources":["../../../../src/lib/seam/components/SupportedDeviceTable/SupportedDeviceTable.tsx"],"names":[],"mappings":";AAAA,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAEhC,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAA;AAE9D,OAAO,EAEL,uBAAuB,GACxB,MAAM,qCAAqC,CAAA;AAC5C,OAAO,EAAE,sBAAsB,EAAE,MAAM,oEAAoE,CAAA;AAC3G,OAAO,EAAE,yBAAyB,EAAE,MAAM,uEAAuE,CAAA;AASjH,MAAM,CAAC,MAAM,0BAA0B,GACrC,uBAAuB,CAAC,oBAAoB,CAAC,CAAA;AAE/C,MAAM,UAAU,oBAAoB,CAAC,EACnC,aAAa,GAAG,KAAK,EACrB,aAAa,GAAG,IAAI,EACpB,qBAAqB,GAAG,EAAE,EAC1B,SAAS,MACoB,EAAE;IAC/B,qBAAqB,CAAC,sBAAsB,CAAC,CAAA;IAE7C,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAA;IAClD,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAqB;QACzD,aAAa,EAAE,IAAI;QACnB,YAAY,EAAE,IAAI;KACnB,CAAC,CAAA;IAEF,OAAO,CACL,eACE,SAAS,EAAE,UAAU,CACnB,0CAA0C,EAC1C,SAAS,CACV,aAEA,CAAC,aAAa,IAAI,CACjB,KAAC,yBAAyB,IACxB,WAAW,EAAE,WAAW,EACxB,cAAc,EAAE,cAAc,EAC9B,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,UAAU,EACtB,aAAa,EAAE,aAAa,EAC5B,qBAAqB,EAAE,qBAAqB,GAC5C,CACH,EACD,KAAC,sBAAsB,IACrB,gBAAgB,EAAE,GAAG,EAAE;oBACrB,cAAc,CAAC,EAAE,CAAC,CAAA;gBACpB,CAAC,EACD,WAAW,EAAE,WAAW,EACxB,OAAO,EAAE,OAAO,EAChB,aAAa,EAAE,aAAa,EAC5B,qBAAqB,EAAE,qBAAqB,GAC5C,IACE,CACP,CAAA;AACH,CAAC"}
@@ -0,0 +1,7 @@
1
+ import type { DeviceModelV1, RouteRequestParams } from '@seamapi/types/devicedb';
2
+ import type { UseSeamQueryResult } from '../../../../lib/seam/use-seam-query-result.js';
3
+ export type UseDeviceModelParams = DeviceModelsGetParams | string;
4
+ export type UseDeviceModelData = DeviceModelV1 | null;
5
+ export declare function useDeviceModel(params?: UseDeviceModelParams): UseSeamQueryResult<'deviceModel', UseDeviceModelData>;
6
+ type DeviceModelsGetParams = RouteRequestParams<'/v1/device_models/get'>;
7
+ export {};
@@ -0,0 +1,18 @@
1
+ import { useQuery } from '@tanstack/react-query';
2
+ import { useSeamClient } from '../../../../lib/seam/use-seam-client.js';
3
+ export function useDeviceModel(params) {
4
+ const normalizedParams = typeof params === 'string' ? { device_model_id: params } : params;
5
+ const { client: seam } = useSeamClient();
6
+ const { data, ...rest } = useQuery({
7
+ enabled: seam != null,
8
+ queryKey: ['internal', 'device_models', 'get', normalizedParams],
9
+ queryFn: async () => {
10
+ if (seam == null)
11
+ return null;
12
+ const { data: { device_model: deviceModel }, } = await seam.client.get('/internal/devicedb/v1/device_models/get', { params: normalizedParams });
13
+ return deviceModel;
14
+ },
15
+ });
16
+ return { ...rest, deviceModel: data };
17
+ }
18
+ //# sourceMappingURL=use-device-model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-device-model.js","sourceRoot":"","sources":["../../../../src/lib/seam/components/SupportedDeviceTable/use-device-model.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAGhD,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAA;AAM3D,MAAM,UAAU,cAAc,CAC5B,MAA6B;IAE7B,MAAM,gBAAgB,GACpB,OAAO,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,EAAE,eAAe,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,MAAM,CAAA;IAEnE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,aAAa,EAAE,CAAA;IACxC,MAAM,EAAE,IAAI,EAAE,GAAG,IAAI,EAAE,GAAG,QAAQ,CAGhC;QACA,OAAO,EAAE,IAAI,IAAI,IAAI;QACrB,QAAQ,EAAE,CAAC,UAAU,EAAE,eAAe,EAAE,KAAK,EAAE,gBAAgB,CAAC;QAChE,OAAO,EAAE,KAAK,IAAI,EAAE;YAClB,IAAI,IAAI,IAAI,IAAI;gBAAE,OAAO,IAAI,CAAA;YAC7B,MAAM,EACJ,IAAI,EAAE,EAAE,YAAY,EAAE,WAAW,EAAE,GACpC,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,GAAG,CACvB,yCAAyC,EACzC,EAAE,MAAM,EAAE,gBAAgB,EAAE,CAC7B,CAAA;YACD,OAAO,WAAW,CAAA;QACpB,CAAC;KACF,CAAC,CAAA;IAEF,OAAO,EAAE,GAAG,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,CAAA;AACvC,CAAC"}
@@ -0,0 +1,7 @@
1
+ import type { DeviceModelV1, RouteRequestParams } from '@seamapi/types/devicedb';
2
+ import type { UseSeamQueryResult } from '../../../../lib/seam/use-seam-query-result.js';
3
+ export type UseDeviceModelsParams = DeviceModelsListParams;
4
+ export type UseDeviceModelsData = DeviceModelV1[];
5
+ export declare function useDeviceModels(params?: UseDeviceModelsParams): UseSeamQueryResult<'deviceModels', UseDeviceModelsData>;
6
+ type DeviceModelsListParams = RouteRequestParams<'/v1/device_models/list'>;
7
+ export {};