@atlaskit/dynamic-table 14.8.17 → 14.9.1

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # @atlaskit/dynamic-table
2
2
 
3
+ ## 14.9.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`41fae2c6f68`](https://bitbucket.org/atlassian/atlassian-frontend/commits/41fae2c6f68) - Upgrade Typescript from `4.5.5` to `4.9.5`
8
+
9
+ ## 14.9.0
10
+
11
+ ### Minor Changes
12
+
13
+ - [`56507598609`](https://bitbucket.org/atlassian/atlassian-frontend/commits/56507598609) - Skip minor dependency bump
14
+
15
+ ### Patch Changes
16
+
17
+ - Updated dependencies
18
+
3
19
  ## 14.8.17
4
20
 
5
21
  ### Patch Changes
@@ -75,6 +75,7 @@ var LoadingContainerAdvanced = /*#__PURE__*/function (_React$Component) {
75
75
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "getThisNode", function () {
76
76
  return safeFindDOMNode((0, _assertThisInitialized2.default)(_this));
77
77
  });
78
+ // @ts-ignore - this.spinnerRef is not assignable to type 'ReactInstance'
78
79
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "getSpinnerNode", function () {
79
80
  return safeFindDOMNode(_this.spinnerRef);
80
81
  });
@@ -115,7 +116,7 @@ var LoadingContainerAdvanced = /*#__PURE__*/function (_React$Component) {
115
116
  }
116
117
  });
117
118
  return _this;
118
- } // @ts-ignore - this.spinnerRef is not assignable to type 'ReactInstance'
119
+ }
119
120
  (0, _createClass2.default)(LoadingContainerAdvanced, [{
120
121
  key: "attachListeners",
121
122
  value: function attachListeners() {
@@ -29,7 +29,7 @@ var _tableHead = _interopRequireDefault(require("./table-head"));
29
29
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
30
30
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
31
31
  var packageName = "@atlaskit/dynamic-table";
32
- var packageVersion = "14.8.17";
32
+ var packageVersion = "14.9.1";
33
33
  function toggleSortOrder(currentSortOrder) {
34
34
  switch (currentSortOrder) {
35
35
  case _constants.DESC:
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/dynamic-table",
3
- "version": "14.8.17",
3
+ "version": "14.9.1",
4
4
  "sideEffects": false
5
5
  }
@@ -52,6 +52,7 @@ export default class LoadingContainerAdvanced extends React.Component {
52
52
  return targetNode;
53
53
  });
54
54
  _defineProperty(this, "getThisNode", () => safeFindDOMNode(this));
55
+ // @ts-ignore - this.spinnerRef is not assignable to type 'ReactInstance'
55
56
  _defineProperty(this, "getSpinnerNode", () => safeFindDOMNode(this.spinnerRef));
56
57
  _defineProperty(this, "hasTargetNode", nextProps => !!this.getTargetNode(nextProps));
57
58
  _defineProperty(this, "isVerticallyVisible", (elementRect, viewportHeight) => {
@@ -92,7 +93,7 @@ export default class LoadingContainerAdvanced extends React.Component {
92
93
  targetNode.style.opacity = isLoading ? contentsOpacity.toString() : '';
93
94
  }
94
95
  });
95
- } // @ts-ignore - this.spinnerRef is not assignable to type 'ReactInstance'
96
+ }
96
97
  attachListeners() {
97
98
  window.addEventListener('scroll', this.handleScroll);
98
99
  window.addEventListener('resize', this.handleResize);
@@ -14,7 +14,7 @@ import ManagedPagination from './managed-pagination';
14
14
  import RankableTableBody from './rankable/body';
15
15
  import TableHead from './table-head';
16
16
  const packageName = "@atlaskit/dynamic-table";
17
- const packageVersion = "14.8.17";
17
+ const packageVersion = "14.9.1";
18
18
  function toggleSortOrder(currentSortOrder) {
19
19
  switch (currentSortOrder) {
20
20
  case DESC:
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/dynamic-table",
3
- "version": "14.8.17",
3
+ "version": "14.9.1",
4
4
  "sideEffects": false
5
5
  }
@@ -69,6 +69,7 @@ var LoadingContainerAdvanced = /*#__PURE__*/function (_React$Component) {
69
69
  _defineProperty(_assertThisInitialized(_this), "getThisNode", function () {
70
70
  return safeFindDOMNode(_assertThisInitialized(_this));
71
71
  });
72
+ // @ts-ignore - this.spinnerRef is not assignable to type 'ReactInstance'
72
73
  _defineProperty(_assertThisInitialized(_this), "getSpinnerNode", function () {
73
74
  return safeFindDOMNode(_this.spinnerRef);
74
75
  });
@@ -109,7 +110,7 @@ var LoadingContainerAdvanced = /*#__PURE__*/function (_React$Component) {
109
110
  }
110
111
  });
111
112
  return _this;
112
- } // @ts-ignore - this.spinnerRef is not assignable to type 'ReactInstance'
113
+ }
113
114
  _createClass(LoadingContainerAdvanced, [{
114
115
  key: "attachListeners",
115
116
  value: function attachListeners() {
@@ -22,7 +22,7 @@ import ManagedPagination from './managed-pagination';
22
22
  import RankableTableBody from './rankable/body';
23
23
  import TableHead from './table-head';
24
24
  var packageName = "@atlaskit/dynamic-table";
25
- var packageVersion = "14.8.17";
25
+ var packageVersion = "14.9.1";
26
26
  function toggleSortOrder(currentSortOrder) {
27
27
  switch (currentSortOrder) {
28
28
  case DESC:
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/dynamic-table",
3
- "version": "14.8.17",
3
+ "version": "14.9.1",
4
4
  "sideEffects": false
5
5
  }
@@ -23,7 +23,7 @@ export default class LoadingContainerAdvanced extends React.Component<LoadingCon
23
23
  getTargetNode: (nextProps?: LoadingContainerAdvancedProps) => Element | Text | null;
24
24
  getThisNode: () => Element | Text | null;
25
25
  getSpinnerNode: () => Element | Text | null;
26
- hasTargetNode: (nextProps?: LoadingContainerAdvancedProps | undefined) => boolean;
26
+ hasTargetNode: (nextProps?: LoadingContainerAdvancedProps) => boolean;
27
27
  isVerticallyVisible: (elementRect: {
28
28
  top: number;
29
29
  bottom: number;
@@ -36,7 +36,7 @@ export default class LoadingContainerAdvanced extends React.Component<LoadingCon
36
36
  detachListeners(): void;
37
37
  handleResize: () => void;
38
38
  handleScroll: () => void;
39
- translateSpinner: (spinnerNode: HTMLElement, transformY: number, isFixed?: boolean | undefined) => void;
39
+ translateSpinner: (spinnerNode: HTMLElement, transformY: number, isFixed?: boolean) => void;
40
40
  updateTargetAppearance: () => void;
41
41
  updateSpinnerPosition(): void;
42
42
  render(): JSX.Element;
@@ -9,7 +9,7 @@ interface ManagedPaginationProps {
9
9
  testId?: string;
10
10
  }
11
11
  export default class ManagedPagination extends React.Component<ManagedPaginationProps> {
12
- onChange: (_event: any, newValue: any, analyticsEvent?: UIAnalyticsEvent | undefined) => void;
12
+ onChange: (_event: any, newValue: any, analyticsEvent?: UIAnalyticsEvent) => void;
13
13
  render(): JSX.Element;
14
14
  }
15
15
  export {};
@@ -51,8 +51,8 @@ export default class DynamicTable extends React.Component<StatefulProps, State>
51
51
  rows: RowType[] | undefined;
52
52
  };
53
53
  UNSAFE_componentWillReceiveProps(newProps: StatefulProps): void;
54
- onSetPageHandler: (page: number, analyticsEvent?: UIAnalyticsEvent | undefined) => void;
55
- onSortHandler: ({ key, item, sortOrder }: any, analyticsEvent?: UIAnalyticsEvent | undefined) => void;
54
+ onSetPageHandler: (page: number, analyticsEvent?: UIAnalyticsEvent) => void;
55
+ onSortHandler: ({ key, item, sortOrder }: any, analyticsEvent?: UIAnalyticsEvent) => void;
56
56
  onRankEndIfExistsHandler: (params: RankEnd) => void;
57
57
  onRankEndHandler: (params: RankEnd) => void;
58
58
  render(): JSX.Element;
@@ -30,7 +30,7 @@ declare class DynamicTable extends React.Component<Props, State> {
30
30
  UNSAFE_componentWillMount(): void;
31
31
  UNSAFE_componentWillReceiveProps(nextProps: Props): void;
32
32
  onSortHandler: (item: RowCellType) => () => void;
33
- onSetPageHandler: (page: number, event?: UIAnalyticsEvent | undefined) => void;
33
+ onSetPageHandler: (page: number, event?: UIAnalyticsEvent) => void;
34
34
  onRankStartHandler: (params: RankStart) => void;
35
35
  onRankEndHandler: (params: RankEnd) => void;
36
36
  getSpinnerSize: () => import("../types").LoadingSpinnerSizeType;
@@ -1,7 +1,7 @@
1
1
  import { HeadType, RankEnd, RowType } from '../types';
2
- export declare const getPageRows: (allRows: Array<RowType>, pageNumber?: number | undefined, rowsPerPage?: number | undefined) => Array<RowType>;
3
- export declare const assertIsSortable: (head?: HeadType | undefined) => void;
4
- export declare const validateSortKey: (sortKey?: string | undefined, head?: HeadType | undefined) => void;
5
- export declare const inlineStylesIfRanking: (isRanking: boolean, width: number, height?: number | undefined) => {};
6
- export declare const computeIndex: (index: number, page: number, rowsPerPage?: number | undefined) => number;
7
- export declare const reorderRows: (rankEnd: RankEnd, rows: RowType[], page?: number, rowsPerPage?: number | undefined) => RowType[];
2
+ export declare const getPageRows: (allRows: Array<RowType>, pageNumber?: number, rowsPerPage?: number) => Array<RowType>;
3
+ export declare const assertIsSortable: (head?: HeadType) => void;
4
+ export declare const validateSortKey: (sortKey?: string, head?: HeadType) => void;
5
+ export declare const inlineStylesIfRanking: (isRanking: boolean, width: number, height?: number) => {};
6
+ export declare const computeIndex: (index: number, page: number, rowsPerPage?: number) => number;
7
+ export declare const reorderRows: (rankEnd: RankEnd, rows: RowType[], page?: number, rowsPerPage?: number) => RowType[];
@@ -1,6 +1,6 @@
1
1
  /** @jsx jsx */
2
2
  import { FC, HTMLProps, ReactNode } from 'react';
3
- export declare type TableProps = HTMLProps<HTMLTableElement> & {
3
+ export type TableProps = HTMLProps<HTMLTableElement> & {
4
4
  isFixedSize?: boolean;
5
5
  hasDataRow: boolean;
6
6
  testId?: string;
@@ -1,10 +1,10 @@
1
1
  /** @jsx jsx */
2
2
  import { FC, ReactNode } from 'react';
3
- declare type EmptyViewWithFixedHeightProps = {
3
+ type EmptyViewWithFixedHeightProps = {
4
4
  testId?: string;
5
5
  children?: ReactNode;
6
6
  };
7
- declare type EmptyViewContainerProps = {
7
+ type EmptyViewContainerProps = {
8
8
  testId?: string;
9
9
  children: ReactNode;
10
10
  };
@@ -1,11 +1,11 @@
1
1
  /** @jsx jsx */
2
2
  import { FC, HTMLProps, ReactNode } from 'react';
3
3
  import { jsx } from '@emotion/react';
4
- declare type ContainerProps = HTMLProps<HTMLDivElement> & {
4
+ type ContainerProps = HTMLProps<HTMLDivElement> & {
5
5
  testId?: string;
6
6
  };
7
7
  export declare const Container: (props: ContainerProps) => jsx.JSX.Element;
8
- declare type SpinnerBackdropProps = {
8
+ type SpinnerBackdropProps = {
9
9
  testId?: string;
10
10
  children: ReactNode;
11
11
  };
@@ -1,11 +1,11 @@
1
1
  /** @jsx jsx */
2
2
  import { FC, ReactNode } from 'react';
3
3
  export declare const CSS_VAR_CONTENTS_OPACITY = "--contents-opacity";
4
- declare type ContainerProps = {
4
+ type ContainerProps = {
5
5
  testId?: string;
6
6
  children: ReactNode;
7
7
  };
8
- declare type LoadingContainerProps = ContainerProps & {
8
+ type LoadingContainerProps = ContainerProps & {
9
9
  contentsOpacity: number;
10
10
  };
11
11
  export declare const Container: FC<ContainerProps>;
@@ -1,7 +1,7 @@
1
1
  /** @jsx jsx */
2
2
  import { FC, HTMLProps, ReactNode } from 'react';
3
3
  import { TruncateStyleProps } from '../constants';
4
- declare type RankableTableBodyCellProps = HTMLProps<HTMLTableCellElement | HTMLTableRowElement> & TruncateStyleProps & {
4
+ type RankableTableBodyCellProps = HTMLProps<HTMLTableCellElement | HTMLTableRowElement> & TruncateStyleProps & {
5
5
  isRanking?: boolean;
6
6
  children?: ReactNode;
7
7
  };
@@ -1,7 +1,7 @@
1
1
  /** @jsx jsx */
2
2
  import { HTMLAttributes } from 'react';
3
3
  import { ITableRowProps } from '../table-row';
4
- export declare type RankableTableBodyRowProps = HTMLAttributes<HTMLTableRowElement> & ITableRowProps & {
4
+ export type RankableTableBodyRowProps = HTMLAttributes<HTMLTableRowElement> & ITableRowProps & {
5
5
  isRanking?: boolean;
6
6
  isRankingItem?: boolean;
7
7
  testId?: string;
@@ -8,7 +8,7 @@ interface HeadProps {
8
8
  testId?: string;
9
9
  }
10
10
  export declare const Head: FC<HeadProps>;
11
- declare type HeadCellProps = TruncateStyleProps & HTMLProps<HTMLTableCellElement> & {
11
+ type HeadCellProps = TruncateStyleProps & HTMLProps<HTMLTableCellElement> & {
12
12
  onClick?: () => void;
13
13
  isSortable?: boolean;
14
14
  sortOrder?: SortOrderType;
@@ -1,6 +1,6 @@
1
1
  /** @jsx jsx */
2
2
  import { CSSProperties, ReactNode } from 'react';
3
- export declare type ITableRowProps = {
3
+ export type ITableRowProps = {
4
4
  isHighlighted?: boolean;
5
5
  children?: ReactNode;
6
6
  style?: CSSProperties;
@@ -305,13 +305,13 @@ export interface RowType extends React.ComponentPropsWithoutRef<'tr'> {
305
305
  /**
306
306
  * Enum style type to determine whether sort results are ascending or descending.
307
307
  */
308
- export declare type SortOrderType = 'ASC' | 'DESC';
308
+ export type SortOrderType = 'ASC' | 'DESC';
309
309
  /**
310
310
  * Determines the size of the table loading spinner.
311
311
  * This matches the underlying `Size` type in `@atlaskit/spinner`
312
312
  */
313
- export declare type SpinnerSizeType = SizeType;
314
- export declare type LoadingSpinnerSizeType = 'small' | 'large';
313
+ export type SpinnerSizeType = SizeType;
314
+ export type LoadingSpinnerSizeType = 'small' | 'large';
315
315
  export interface HeadCellType extends RowCellType {
316
316
  /**
317
317
  * Whether the column the cell sits above is sortable.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/dynamic-table",
3
- "version": "14.8.17",
3
+ "version": "14.9.1",
4
4
  "description": "A dynamic table displays rows of data with built-in pagination, sorting, and re-ordering functionality.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -13,6 +13,14 @@
13
13
  "module": "dist/esm/index.js",
14
14
  "module:es2019": "dist/es2019/index.js",
15
15
  "types": "dist/types/index.d.ts",
16
+ "typesVersions": {
17
+ ">=4.5 <4.9": {
18
+ "*": [
19
+ "dist/types-ts4.5/*",
20
+ "dist/types-ts4.5/index.d.ts"
21
+ ]
22
+ }
23
+ },
16
24
  "sideEffects": false,
17
25
  "atlaskit:src": "src/index.tsx",
18
26
  "atlassian": {
@@ -25,12 +33,12 @@
25
33
  }
26
34
  },
27
35
  "dependencies": {
28
- "@atlaskit/analytics-next": "^9.0.0",
29
- "@atlaskit/ds-lib": "^2.1.0",
30
- "@atlaskit/pagination": "^14.2.0",
31
- "@atlaskit/spinner": "^15.4.0",
32
- "@atlaskit/theme": "^12.4.0",
33
- "@atlaskit/tokens": "^1.2.0",
36
+ "@atlaskit/analytics-next": "^9.1.0",
37
+ "@atlaskit/ds-lib": "^2.2.0",
38
+ "@atlaskit/pagination": "^14.3.0",
39
+ "@atlaskit/spinner": "^15.5.0",
40
+ "@atlaskit/theme": "^12.5.0",
41
+ "@atlaskit/tokens": "^1.4.0",
34
42
  "@babel/runtime": "^7.0.0",
35
43
  "@emotion/react": "^11.7.1",
36
44
  "react-beautiful-dnd": "^12.1.1"
@@ -40,12 +48,12 @@
40
48
  "react-dom": "^16.8.0"
41
49
  },
42
50
  "devDependencies": {
43
- "@atlaskit/avatar": "^21.2.0",
44
- "@atlaskit/button": "^16.6.0",
51
+ "@atlaskit/avatar": "^21.3.0",
52
+ "@atlaskit/button": "^16.7.0",
45
53
  "@atlaskit/docs": "*",
46
- "@atlaskit/dropdown-menu": "^11.7.0",
54
+ "@atlaskit/dropdown-menu": "^11.8.0",
47
55
  "@atlaskit/ssr": "*",
48
- "@atlaskit/toggle": "^12.5.0",
56
+ "@atlaskit/toggle": "^12.6.0",
49
57
  "@atlaskit/visual-regression": "*",
50
58
  "@atlaskit/webdriver-runner": "*",
51
59
  "@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
@@ -53,7 +61,7 @@
53
61
  "@testing-library/react": "^12.1.5",
54
62
  "@testing-library/user-event": "^14.4.3",
55
63
  "react-dom": "^16.8.0",
56
- "typescript": "4.5.5"
64
+ "typescript": "~4.9.5"
57
65
  },
58
66
  "techstack": {
59
67
  "@atlassian/frontend": {
@@ -6,9 +6,9 @@
6
6
  "sideEffects": false,
7
7
  "types": "../dist/types/theme.d.ts",
8
8
  "typesVersions": {
9
- ">=4.0 <4.5": {
9
+ ">=4.5 <4.9": {
10
10
  "*": [
11
- "../dist/types-ts4.0/theme.d.ts"
11
+ "../dist/types-ts4.5/theme.d.ts"
12
12
  ]
13
13
  }
14
14
  }
@@ -6,9 +6,9 @@
6
6
  "sideEffects": false,
7
7
  "types": "../dist/types/types.d.ts",
8
8
  "typesVersions": {
9
- ">=4.0 <4.5": {
9
+ ">=4.5 <4.9": {
10
10
  "*": [
11
- "../dist/types-ts4.0/types.d.ts"
11
+ "../dist/types-ts4.5/types.d.ts"
12
12
  ]
13
13
  }
14
14
  }