@procore/saved-views 5.1.0-alpha.7 → 6.0.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.
@@ -1,11 +1,13 @@
1
- import { Locale, MapLocalesToTranslations } from '@procore/globalization-toolkit';
2
- import * as React from 'react';
1
+ import { Locale } from '@procore/globalization-toolkit';
2
+ import * as React$1 from 'react';
3
3
  import React__default from 'react';
4
4
  import { DataTableConfig, TableApi, ColumnDefinition } from '@procore/data-table';
5
5
  import { ColumnState, FilterModel, GridApi } from 'ag-grid-community';
6
- import * as styled_components from 'styled-components';
6
+ import * as _procore_core_react_dist_Panel_Panel_types from '@procore/core-react/dist/Panel/Panel.types';
7
+ import * as styled_components_dist_types from 'styled-components/dist/types';
8
+ import * as _procore_core_react from '@procore/core-react';
7
9
 
8
- declare function getTranslations(envLocale: Locale): Partial<MapLocalesToTranslations>;
10
+ declare function getTranslations(envLocale: Locale): Record<string, object>;
9
11
 
10
12
  declare const useSavedViewsPanel: (domain: string, tableName: string) => {
11
13
  isOpen: boolean;
@@ -15,7 +17,7 @@ declare const useSavedViewsPanel: (domain: string, tableName: string) => {
15
17
  interface IQueryInputProps {
16
18
  domain: string;
17
19
  tableName: string;
18
- projectId: number;
20
+ projectId?: number;
19
21
  companyId: number;
20
22
  }
21
23
 
@@ -30,8 +32,8 @@ interface ISmartGridConfig {
30
32
  filterState: FilterModel;
31
33
  }
32
34
 
33
- declare const VIEW_LEVELS: readonly ["company", "project", "personal"];
34
- type ViewLevel = (typeof VIEW_LEVELS)[number];
35
+ declare const PROJECT_LEVEL_TOOL_VIEW_LEVELS: readonly ["company", "project", "personal"];
36
+ type ViewLevel = (typeof PROJECT_LEVEL_TOOL_VIEW_LEVELS)[number];
35
37
 
36
38
  interface ISavedView {
37
39
  id: string;
@@ -59,7 +61,7 @@ interface IBaseSavedViewsProps {
59
61
  tableName: string;
60
62
  domain: string;
61
63
  userId: number;
62
- projectId: number;
64
+ projectId?: number;
63
65
  companyId: number;
64
66
  stickyViewsKey: string;
65
67
  }
@@ -71,10 +73,11 @@ interface ISavedViewsProps extends Omit<IBaseSavedViewsProps, 'stickyViewsKey'>
71
73
  }) => ISavedView;
72
74
  tableConfig: ISmartGridConfig | DataTableConfig;
73
75
  provider: TableProvider;
76
+ isPanelOpen?: boolean;
74
77
  }
75
78
 
76
79
  interface IDataTableSavedViewsExternalConsumerProps extends IBaseSavedViewsProps {
77
- tableApi: TableApi;
80
+ tableApi?: TableApi;
78
81
  defaultViews: IDataTableDefaultViewConfig[];
79
82
  columnDefinitions: ColumnDefinition[];
80
83
  }
@@ -130,9 +133,28 @@ type SavedViewCollectionMenuItemProps = {
130
133
  permissions?: IPermissions;
131
134
  onClearTemporary?: () => void;
132
135
  };
133
- declare const SavedViewCollectionMenuItem: (props: SavedViewCollectionMenuItemProps) => React.JSX.Element;
136
+ declare const SavedViewCollectionMenuItem: (props: SavedViewCollectionMenuItemProps) => React$1.JSX.Element;
134
137
 
135
- declare const ExpandedPanel: styled_components.StyledComponent<any, any, any, any>;
138
+ declare const ExpandedPanel: styled_components_dist_types.IStyledComponentBase<"web", styled_components_dist_types.Substitute<Omit<_procore_core_react.PanelProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
139
+ ref?: ((instance: HTMLDivElement | null) => void | React$1.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof React$1.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | React$1.RefObject<HTMLDivElement> | null | undefined;
140
+ }, {
141
+ provider: TableProvider;
142
+ }>> & string & Omit<React$1.ForwardRefExoticComponent<_procore_core_react.PanelProps & React$1.RefAttributes<HTMLDivElement>> & {
143
+ Body: React.ForwardRefExoticComponent<_procore_core_react.PanelBodyProps & React.RefAttributes<HTMLDivElement>>;
144
+ Footer: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
145
+ FooterActions: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
146
+ FooterNotation: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
147
+ Header: React.ForwardRefExoticComponent<_procore_core_react.PanelHeaderProps & React.RefAttributes<HTMLDivElement>>;
148
+ HeaderAction: React.ForwardRefExoticComponent<_procore_core_react.PanelHeaderActionProps & React.RefAttributes<HTMLSpanElement>>;
149
+ HeaderActions: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
150
+ qa?: Pick<_procore_core_react_dist_Panel_Panel_types.PanelQaTags, "moreIcon"> | undefined;
151
+ } & React.RefAttributes<HTMLDivElement>>;
152
+ Section: React.ForwardRefExoticComponent<_procore_core_react.SectionProps & React.RefAttributes<HTMLDivElement>>;
153
+ Title: React.ForwardRefExoticComponent<_procore_core_react.TypographyProps & {
154
+ qa?: Pick<_procore_core_react_dist_Panel_Panel_types.PanelQaTags, "title"> | undefined;
155
+ id?: string | undefined;
156
+ } & React.RefAttributes<HTMLHeadingElement>>;
157
+ }, keyof React$1.Component<any, {}, any>>;
136
158
 
137
159
  declare const PanelContent: (props: IPanelContentProps) => React__default.JSX.Element;
138
160
 
@@ -1,11 +1,13 @@
1
- import { Locale, MapLocalesToTranslations } from '@procore/globalization-toolkit';
2
- import * as React from 'react';
1
+ import { Locale } from '@procore/globalization-toolkit';
2
+ import * as React$1 from 'react';
3
3
  import React__default from 'react';
4
4
  import { DataTableConfig, TableApi, ColumnDefinition } from '@procore/data-table';
5
5
  import { ColumnState, FilterModel, GridApi } from 'ag-grid-community';
6
- import * as styled_components from 'styled-components';
6
+ import * as _procore_core_react_dist_Panel_Panel_types from '@procore/core-react/dist/Panel/Panel.types';
7
+ import * as styled_components_dist_types from 'styled-components/dist/types';
8
+ import * as _procore_core_react from '@procore/core-react';
7
9
 
8
- declare function getTranslations(envLocale: Locale): Partial<MapLocalesToTranslations>;
10
+ declare function getTranslations(envLocale: Locale): Record<string, object>;
9
11
 
10
12
  declare const useSavedViewsPanel: (domain: string, tableName: string) => {
11
13
  isOpen: boolean;
@@ -15,7 +17,7 @@ declare const useSavedViewsPanel: (domain: string, tableName: string) => {
15
17
  interface IQueryInputProps {
16
18
  domain: string;
17
19
  tableName: string;
18
- projectId: number;
20
+ projectId?: number;
19
21
  companyId: number;
20
22
  }
21
23
 
@@ -30,8 +32,8 @@ interface ISmartGridConfig {
30
32
  filterState: FilterModel;
31
33
  }
32
34
 
33
- declare const VIEW_LEVELS: readonly ["company", "project", "personal"];
34
- type ViewLevel = (typeof VIEW_LEVELS)[number];
35
+ declare const PROJECT_LEVEL_TOOL_VIEW_LEVELS: readonly ["company", "project", "personal"];
36
+ type ViewLevel = (typeof PROJECT_LEVEL_TOOL_VIEW_LEVELS)[number];
35
37
 
36
38
  interface ISavedView {
37
39
  id: string;
@@ -59,7 +61,7 @@ interface IBaseSavedViewsProps {
59
61
  tableName: string;
60
62
  domain: string;
61
63
  userId: number;
62
- projectId: number;
64
+ projectId?: number;
63
65
  companyId: number;
64
66
  stickyViewsKey: string;
65
67
  }
@@ -71,10 +73,11 @@ interface ISavedViewsProps extends Omit<IBaseSavedViewsProps, 'stickyViewsKey'>
71
73
  }) => ISavedView;
72
74
  tableConfig: ISmartGridConfig | DataTableConfig;
73
75
  provider: TableProvider;
76
+ isPanelOpen?: boolean;
74
77
  }
75
78
 
76
79
  interface IDataTableSavedViewsExternalConsumerProps extends IBaseSavedViewsProps {
77
- tableApi: TableApi;
80
+ tableApi?: TableApi;
78
81
  defaultViews: IDataTableDefaultViewConfig[];
79
82
  columnDefinitions: ColumnDefinition[];
80
83
  }
@@ -130,9 +133,28 @@ type SavedViewCollectionMenuItemProps = {
130
133
  permissions?: IPermissions;
131
134
  onClearTemporary?: () => void;
132
135
  };
133
- declare const SavedViewCollectionMenuItem: (props: SavedViewCollectionMenuItemProps) => React.JSX.Element;
136
+ declare const SavedViewCollectionMenuItem: (props: SavedViewCollectionMenuItemProps) => React$1.JSX.Element;
134
137
 
135
- declare const ExpandedPanel: styled_components.StyledComponent<any, any, any, any>;
138
+ declare const ExpandedPanel: styled_components_dist_types.IStyledComponentBase<"web", styled_components_dist_types.Substitute<Omit<_procore_core_react.PanelProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
139
+ ref?: ((instance: HTMLDivElement | null) => void | React$1.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof React$1.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | React$1.RefObject<HTMLDivElement> | null | undefined;
140
+ }, {
141
+ provider: TableProvider;
142
+ }>> & string & Omit<React$1.ForwardRefExoticComponent<_procore_core_react.PanelProps & React$1.RefAttributes<HTMLDivElement>> & {
143
+ Body: React.ForwardRefExoticComponent<_procore_core_react.PanelBodyProps & React.RefAttributes<HTMLDivElement>>;
144
+ Footer: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
145
+ FooterActions: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
146
+ FooterNotation: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
147
+ Header: React.ForwardRefExoticComponent<_procore_core_react.PanelHeaderProps & React.RefAttributes<HTMLDivElement>>;
148
+ HeaderAction: React.ForwardRefExoticComponent<_procore_core_react.PanelHeaderActionProps & React.RefAttributes<HTMLSpanElement>>;
149
+ HeaderActions: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
150
+ qa?: Pick<_procore_core_react_dist_Panel_Panel_types.PanelQaTags, "moreIcon"> | undefined;
151
+ } & React.RefAttributes<HTMLDivElement>>;
152
+ Section: React.ForwardRefExoticComponent<_procore_core_react.SectionProps & React.RefAttributes<HTMLDivElement>>;
153
+ Title: React.ForwardRefExoticComponent<_procore_core_react.TypographyProps & {
154
+ qa?: Pick<_procore_core_react_dist_Panel_Panel_types.PanelQaTags, "title"> | undefined;
155
+ id?: string | undefined;
156
+ } & React.RefAttributes<HTMLHeadingElement>>;
157
+ }, keyof React$1.Component<any, {}, any>>;
136
158
 
137
159
  declare const PanelContent: (props: IPanelContentProps) => React__default.JSX.Element;
138
160