@procore/saved-views 5.0.0-alpha.4 → 5.1.0-alpha
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 +13 -27
- package/dist/legacy/index.d.ts +13 -27
- package/dist/legacy/index.js +708 -383
- package/dist/legacy/index.mjs +707 -382
- package/dist/modern/index.d.mts +13 -27
- package/dist/modern/index.d.ts +13 -27
- package/dist/modern/index.js +707 -381
- package/dist/modern/index.mjs +706 -380
- package/package.json +4 -2
package/dist/legacy/index.d.mts
CHANGED
|
@@ -2,9 +2,8 @@ import { Locale, MapLocalesToTranslations } from '@procore/globalization-toolkit
|
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import React__default from 'react';
|
|
4
4
|
import { DataTableConfig, TableApi, ColumnDefinition } from '@procore/data-table';
|
|
5
|
-
import { ColumnState, FilterModel, GridApi } from 'ag-grid-community';
|
|
5
|
+
import { ColumnState, Column, 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
|
|
|
@@ -27,7 +26,7 @@ interface ISmartGridConfig {
|
|
|
27
26
|
groupId: string;
|
|
28
27
|
open: boolean;
|
|
29
28
|
}[];
|
|
30
|
-
rowGroupState:
|
|
29
|
+
rowGroupState: Column[];
|
|
31
30
|
rowHeight: number | undefined;
|
|
32
31
|
filterState: FilterModel;
|
|
33
32
|
}
|
|
@@ -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 = {
|
|
@@ -111,7 +96,9 @@ declare const ExpandedPanel: styled_components.StyledComponent<any, any, any, an
|
|
|
111
96
|
|
|
112
97
|
declare enum ModalType {
|
|
113
98
|
CREATE = "create",
|
|
114
|
-
UPDATE = "update"
|
|
99
|
+
UPDATE = "update",
|
|
100
|
+
DELETE = "delete",
|
|
101
|
+
CROSS_USER = "crossUser"
|
|
115
102
|
}
|
|
116
103
|
|
|
117
104
|
type PanelContentProps = {
|
|
@@ -128,8 +115,8 @@ type PanelContentProps = {
|
|
|
128
115
|
provider: TableProvider;
|
|
129
116
|
defaultView: ISavedView;
|
|
130
117
|
stickyViewsKey: string;
|
|
131
|
-
userId:
|
|
132
|
-
|
|
118
|
+
userId: number;
|
|
119
|
+
savedViews?: ISavedView[];
|
|
133
120
|
};
|
|
134
121
|
declare const PanelContent: (props: PanelContentProps) => React__default.JSX.Element;
|
|
135
122
|
|
|
@@ -160,7 +147,6 @@ type SavedViewsFormModalProps = {
|
|
|
160
147
|
onSelect: (item: ISavedView) => void;
|
|
161
148
|
setOpenEditCreateModal: (open: boolean) => void;
|
|
162
149
|
defaultView: ISavedView;
|
|
163
|
-
backend: ISavedViewsBackend;
|
|
164
150
|
};
|
|
165
151
|
declare const SavedViewsFormModal: React__default.FC<SavedViewsFormModalProps>;
|
|
166
152
|
|
package/dist/legacy/index.d.ts
CHANGED
|
@@ -2,9 +2,8 @@ import { Locale, MapLocalesToTranslations } from '@procore/globalization-toolkit
|
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import React__default from 'react';
|
|
4
4
|
import { DataTableConfig, TableApi, ColumnDefinition } from '@procore/data-table';
|
|
5
|
-
import { ColumnState, FilterModel, GridApi } from 'ag-grid-community';
|
|
5
|
+
import { ColumnState, Column, 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
|
|
|
@@ -27,7 +26,7 @@ interface ISmartGridConfig {
|
|
|
27
26
|
groupId: string;
|
|
28
27
|
open: boolean;
|
|
29
28
|
}[];
|
|
30
|
-
rowGroupState:
|
|
29
|
+
rowGroupState: Column[];
|
|
31
30
|
rowHeight: number | undefined;
|
|
32
31
|
filterState: FilterModel;
|
|
33
32
|
}
|
|
@@ -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 = {
|
|
@@ -111,7 +96,9 @@ declare const ExpandedPanel: styled_components.StyledComponent<any, any, any, an
|
|
|
111
96
|
|
|
112
97
|
declare enum ModalType {
|
|
113
98
|
CREATE = "create",
|
|
114
|
-
UPDATE = "update"
|
|
99
|
+
UPDATE = "update",
|
|
100
|
+
DELETE = "delete",
|
|
101
|
+
CROSS_USER = "crossUser"
|
|
115
102
|
}
|
|
116
103
|
|
|
117
104
|
type PanelContentProps = {
|
|
@@ -128,8 +115,8 @@ type PanelContentProps = {
|
|
|
128
115
|
provider: TableProvider;
|
|
129
116
|
defaultView: ISavedView;
|
|
130
117
|
stickyViewsKey: string;
|
|
131
|
-
userId:
|
|
132
|
-
|
|
118
|
+
userId: number;
|
|
119
|
+
savedViews?: ISavedView[];
|
|
133
120
|
};
|
|
134
121
|
declare const PanelContent: (props: PanelContentProps) => React__default.JSX.Element;
|
|
135
122
|
|
|
@@ -160,7 +147,6 @@ type SavedViewsFormModalProps = {
|
|
|
160
147
|
onSelect: (item: ISavedView) => void;
|
|
161
148
|
setOpenEditCreateModal: (open: boolean) => void;
|
|
162
149
|
defaultView: ISavedView;
|
|
163
|
-
backend: ISavedViewsBackend;
|
|
164
150
|
};
|
|
165
151
|
declare const SavedViewsFormModal: React__default.FC<SavedViewsFormModalProps>;
|
|
166
152
|
|