@seamapi/react 1.18.2 → 1.19.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.
@@ -1,6 +1,10 @@
1
1
  /// <reference types="react" />
2
2
  export interface SupportedDeviceTableProps {
3
+ disableFilter?: boolean;
4
+ /**
5
+ * @deprecated Use disableFilter.
6
+ */
3
7
  cannotFilter?: boolean;
4
8
  className?: string;
5
9
  }
6
- export declare function SupportedDeviceTable({ cannotFilter, className, }?: SupportedDeviceTableProps): JSX.Element;
10
+ export declare function SupportedDeviceTable({ disableFilter, cannotFilter, className, }?: SupportedDeviceTableProps): JSX.Element;
@@ -3,14 +3,15 @@ import classNames from 'classnames';
3
3
  import { useState } from 'react';
4
4
  import { SupportedDeviceContent } from '../../../../lib/seam/components/SupportedDeviceTable/SupportedDeviceContent.js';
5
5
  import { SupportedDeviceFilterArea } from '../../../../lib/seam/components/SupportedDeviceTable/SupportedDeviceFilterArea.js';
6
- export function SupportedDeviceTable({ cannotFilter = false, className, } = {}) {
6
+ export function SupportedDeviceTable({ disableFilter = false, cannotFilter, className, } = {}) {
7
7
  const [filterValue, setFilterValue] = useState('');
8
8
  const [filters, setFilters] = useState({
9
9
  supportedOnly: false,
10
10
  category: null,
11
11
  brand: null,
12
12
  });
13
- return (_jsxs("div", { className: classNames('seam-supported-device-table-content-wrap', className), children: [!cannotFilter && (_jsx(SupportedDeviceFilterArea, { filterValue: filterValue, setFilterValue: setFilterValue, filters: filters, setFilters: setFilters })), _jsx(SupportedDeviceContent, { resetFilterValue: () => {
13
+ const hideFilter = cannotFilter ?? disableFilter;
14
+ return (_jsxs("div", { className: classNames('seam-supported-device-table-content-wrap', className), children: [!hideFilter && (_jsx(SupportedDeviceFilterArea, { filterValue: filterValue, setFilterValue: setFilterValue, filters: filters, setFilters: setFilters })), _jsx(SupportedDeviceContent, { resetFilterValue: () => {
14
15
  setFilterValue('');
15
16
  }, filterValue: filterValue, filters: filters })] }));
16
17
  }
@@ -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,sBAAsB,EAAE,MAAM,oEAAoE,CAAA;AAC3G,OAAO,EAAE,yBAAyB,EAAE,MAAM,uEAAuE,CAAA;AAQjH,MAAM,UAAU,oBAAoB,CAAC,EACnC,YAAY,GAAG,KAAK,EACpB,SAAS,MACoB,EAAE;IAC/B,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,KAAK;QACpB,QAAQ,EAAE,IAAI;QACd,KAAK,EAAE,IAAI;KACZ,CAAC,CAAA;IAEF,OAAO,CACL,eACE,SAAS,EAAE,UAAU,CACnB,0CAA0C,EAC1C,SAAS,CACV,aAEA,CAAC,YAAY,IAAI,CAChB,KAAC,yBAAyB,IACxB,WAAW,EAAE,WAAW,EACxB,cAAc,EAAE,cAAc,EAC9B,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,UAAU,GACtB,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,GAChB,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,sBAAsB,EAAE,MAAM,oEAAoE,CAAA;AAC3G,OAAO,EAAE,yBAAyB,EAAE,MAAM,uEAAuE,CAAA;AAYjH,MAAM,UAAU,oBAAoB,CAAC,EACnC,aAAa,GAAG,KAAK,EACrB,YAAY,EACZ,SAAS,MACoB,EAAE;IAC/B,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,KAAK;QACpB,QAAQ,EAAE,IAAI;QACd,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,GACtB,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,GAChB,IACE,CACP,CAAA;AACH,CAAC"}
package/lib/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- declare const seamapiReactVersion = "1.18.2";
1
+ declare const seamapiReactVersion = "1.19.0";
2
2
  export default seamapiReactVersion;
package/lib/version.js CHANGED
@@ -1,3 +1,3 @@
1
- const seamapiReactVersion = '1.18.2';
1
+ const seamapiReactVersion = '1.19.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": "1.18.2",
3
+ "version": "1.19.0",
4
4
  "description": "Seam Components.",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -6,6 +6,7 @@ export const name = 'seam-supported-device-table'
6
6
 
7
7
  export const props: ElementProps<SupportedDeviceTableProps> = {
8
8
  cannotFilter: 'boolean',
9
+ disableFilter: 'boolean',
9
10
  className: 'string',
10
11
  }
11
12
 
@@ -6,12 +6,17 @@ import { SupportedDeviceFilterArea } from 'lib/seam/components/SupportedDeviceTa
6
6
  import type { DeviceModelFilters } from 'lib/seam/components/SupportedDeviceTable/use-filtered-device-models.js'
7
7
 
8
8
  export interface SupportedDeviceTableProps {
9
+ disableFilter?: boolean
10
+ /**
11
+ * @deprecated Use disableFilter.
12
+ */
9
13
  cannotFilter?: boolean
10
14
  className?: string
11
15
  }
12
16
 
13
17
  export function SupportedDeviceTable({
14
- cannotFilter = false,
18
+ disableFilter = false,
19
+ cannotFilter,
15
20
  className,
16
21
  }: SupportedDeviceTableProps = {}): JSX.Element {
17
22
  const [filterValue, setFilterValue] = useState('')
@@ -21,6 +26,8 @@ export function SupportedDeviceTable({
21
26
  brand: null,
22
27
  })
23
28
 
29
+ const hideFilter = cannotFilter ?? disableFilter
30
+
24
31
  return (
25
32
  <div
26
33
  className={classNames(
@@ -28,7 +35,7 @@ export function SupportedDeviceTable({
28
35
  className
29
36
  )}
30
37
  >
31
- {!cannotFilter && (
38
+ {!hideFilter && (
32
39
  <SupportedDeviceFilterArea
33
40
  filterValue={filterValue}
34
41
  setFilterValue={setFilterValue}
@@ -1,3 +1,3 @@
1
- const seamapiReactVersion = '1.18.2'
1
+ const seamapiReactVersion = '1.19.0'
2
2
 
3
3
  export default seamapiReactVersion