@procore/saved-views 5.0.0-alpha.4 → 5.0.0-alpha.90
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/dist/legacy/index.d.mts +7 -24
- package/dist/legacy/index.d.ts +7 -24
- package/dist/legacy/index.js +230 -265
- package/dist/legacy/index.mjs +198 -233
- package/dist/modern/index.d.mts +7 -24
- package/dist/modern/index.d.ts +7 -24
- package/dist/modern/index.js +230 -264
- package/dist/modern/index.mjs +198 -232
- package/package.json +1 -1
package/dist/legacy/index.d.mts
CHANGED
|
@@ -4,7 +4,6 @@ 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
6
|
import * as styled_components from 'styled-components';
|
|
7
|
-
import { UseQueryResult, UseMutationResult } from '@tanstack/react-query';
|
|
8
7
|
|
|
9
8
|
declare function getTranslations(envLocale: Locale): Partial<MapLocalesToTranslations>;
|
|
10
9
|
|
|
@@ -45,32 +44,14 @@ interface ISavedView {
|
|
|
45
44
|
|
|
46
45
|
type TableProvider = 'smart-grid' | 'data-table';
|
|
47
46
|
|
|
48
|
-
interface ISavedViewError {
|
|
49
|
-
code: string;
|
|
50
|
-
message: string | Record<string, string[]> | Record<string, string>;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
interface IPermissions {
|
|
54
|
-
can_create_project_saved_views: boolean;
|
|
55
|
-
can_create_company_saved_views: boolean;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
interface ISavedViewsBackend {
|
|
59
|
-
useSavedViewsQuery: (props: IQueryInputProps) => UseQueryResult<ISavedView[], Error>;
|
|
60
|
-
useSavedViewsPermissions: (props: IQueryInputProps) => UseQueryResult<IPermissions, Error>;
|
|
61
|
-
useCreateSavedView: (props: IQueryInputProps) => UseMutationResult<ISavedView, ISavedViewError, ISavedView, unknown>;
|
|
62
|
-
useUpdateSavedView: (props: IQueryInputProps) => UseMutationResult<ISavedView, ISavedViewError, ISavedView, unknown>;
|
|
63
|
-
useDeleteSavedView: (props: IQueryInputProps) => UseMutationResult<ISavedView, ISavedViewError, ISavedView, unknown>;
|
|
64
|
-
}
|
|
65
47
|
interface IBaseSavedViewsProps {
|
|
66
48
|
tableName: string;
|
|
67
49
|
domain: string;
|
|
68
50
|
stickyViewsKey: string;
|
|
69
51
|
enableSavedViews: boolean;
|
|
70
|
-
userId:
|
|
52
|
+
userId: number;
|
|
71
53
|
projectId: number;
|
|
72
54
|
companyId: number;
|
|
73
|
-
backend?: ISavedViewsBackend;
|
|
74
55
|
}
|
|
75
56
|
|
|
76
57
|
interface IDataTableSavedViewsExternalConsumerProps extends IBaseSavedViewsProps {
|
|
@@ -86,7 +67,11 @@ interface ISmartGridSavedViewsExternalConsumerProps extends IBaseSavedViewsProps
|
|
|
86
67
|
defaultViewName?: string;
|
|
87
68
|
defaultViewFilters: FilterModel | null;
|
|
88
69
|
defaultRowHeight: number;
|
|
89
|
-
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
interface IPermissions {
|
|
73
|
+
can_create_project_saved_views: boolean;
|
|
74
|
+
can_create_company_saved_views: boolean;
|
|
90
75
|
}
|
|
91
76
|
|
|
92
77
|
type SavedViewCollectionMenuItemProps = {
|
|
@@ -128,8 +113,7 @@ type PanelContentProps = {
|
|
|
128
113
|
provider: TableProvider;
|
|
129
114
|
defaultView: ISavedView;
|
|
130
115
|
stickyViewsKey: string;
|
|
131
|
-
userId:
|
|
132
|
-
backend: ISavedViewsBackend;
|
|
116
|
+
userId: number;
|
|
133
117
|
};
|
|
134
118
|
declare const PanelContent: (props: PanelContentProps) => React__default.JSX.Element;
|
|
135
119
|
|
|
@@ -160,7 +144,6 @@ type SavedViewsFormModalProps = {
|
|
|
160
144
|
onSelect: (item: ISavedView) => void;
|
|
161
145
|
setOpenEditCreateModal: (open: boolean) => void;
|
|
162
146
|
defaultView: ISavedView;
|
|
163
|
-
backend: ISavedViewsBackend;
|
|
164
147
|
};
|
|
165
148
|
declare const SavedViewsFormModal: React__default.FC<SavedViewsFormModalProps>;
|
|
166
149
|
|
package/dist/legacy/index.d.ts
CHANGED
|
@@ -4,7 +4,6 @@ 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
6
|
import * as styled_components from 'styled-components';
|
|
7
|
-
import { UseQueryResult, UseMutationResult } from '@tanstack/react-query';
|
|
8
7
|
|
|
9
8
|
declare function getTranslations(envLocale: Locale): Partial<MapLocalesToTranslations>;
|
|
10
9
|
|
|
@@ -45,32 +44,14 @@ interface ISavedView {
|
|
|
45
44
|
|
|
46
45
|
type TableProvider = 'smart-grid' | 'data-table';
|
|
47
46
|
|
|
48
|
-
interface ISavedViewError {
|
|
49
|
-
code: string;
|
|
50
|
-
message: string | Record<string, string[]> | Record<string, string>;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
interface IPermissions {
|
|
54
|
-
can_create_project_saved_views: boolean;
|
|
55
|
-
can_create_company_saved_views: boolean;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
interface ISavedViewsBackend {
|
|
59
|
-
useSavedViewsQuery: (props: IQueryInputProps) => UseQueryResult<ISavedView[], Error>;
|
|
60
|
-
useSavedViewsPermissions: (props: IQueryInputProps) => UseQueryResult<IPermissions, Error>;
|
|
61
|
-
useCreateSavedView: (props: IQueryInputProps) => UseMutationResult<ISavedView, ISavedViewError, ISavedView, unknown>;
|
|
62
|
-
useUpdateSavedView: (props: IQueryInputProps) => UseMutationResult<ISavedView, ISavedViewError, ISavedView, unknown>;
|
|
63
|
-
useDeleteSavedView: (props: IQueryInputProps) => UseMutationResult<ISavedView, ISavedViewError, ISavedView, unknown>;
|
|
64
|
-
}
|
|
65
47
|
interface IBaseSavedViewsProps {
|
|
66
48
|
tableName: string;
|
|
67
49
|
domain: string;
|
|
68
50
|
stickyViewsKey: string;
|
|
69
51
|
enableSavedViews: boolean;
|
|
70
|
-
userId:
|
|
52
|
+
userId: number;
|
|
71
53
|
projectId: number;
|
|
72
54
|
companyId: number;
|
|
73
|
-
backend?: ISavedViewsBackend;
|
|
74
55
|
}
|
|
75
56
|
|
|
76
57
|
interface IDataTableSavedViewsExternalConsumerProps extends IBaseSavedViewsProps {
|
|
@@ -86,7 +67,11 @@ interface ISmartGridSavedViewsExternalConsumerProps extends IBaseSavedViewsProps
|
|
|
86
67
|
defaultViewName?: string;
|
|
87
68
|
defaultViewFilters: FilterModel | null;
|
|
88
69
|
defaultRowHeight: number;
|
|
89
|
-
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
interface IPermissions {
|
|
73
|
+
can_create_project_saved_views: boolean;
|
|
74
|
+
can_create_company_saved_views: boolean;
|
|
90
75
|
}
|
|
91
76
|
|
|
92
77
|
type SavedViewCollectionMenuItemProps = {
|
|
@@ -128,8 +113,7 @@ type PanelContentProps = {
|
|
|
128
113
|
provider: TableProvider;
|
|
129
114
|
defaultView: ISavedView;
|
|
130
115
|
stickyViewsKey: string;
|
|
131
|
-
userId:
|
|
132
|
-
backend: ISavedViewsBackend;
|
|
116
|
+
userId: number;
|
|
133
117
|
};
|
|
134
118
|
declare const PanelContent: (props: PanelContentProps) => React__default.JSX.Element;
|
|
135
119
|
|
|
@@ -160,7 +144,6 @@ type SavedViewsFormModalProps = {
|
|
|
160
144
|
onSelect: (item: ISavedView) => void;
|
|
161
145
|
setOpenEditCreateModal: (open: boolean) => void;
|
|
162
146
|
defaultView: ISavedView;
|
|
163
|
-
backend: ISavedViewsBackend;
|
|
164
147
|
};
|
|
165
148
|
declare const SavedViewsFormModal: React__default.FC<SavedViewsFormModalProps>;
|
|
166
149
|
|