tinacms 0.57.3 → 0.59.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.
- package/CHANGELOG.md +45 -0
- package/dist/admin/components/GetCollection.d.ts +7 -0
- package/dist/admin/components/GetDocumentFields.d.ts +6 -3
- package/dist/admin/plugins/route-mapping.d.ts +32 -0
- package/dist/auth/TinaCloudProvider.d.ts +1 -1
- package/dist/client/index.d.ts +3 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.es.js +336 -198
- package/dist/index.js +334 -195
- package/dist/tina-cms.d.ts +2 -2
- package/dist/utils/client.d.ts +29 -0
- package/package.json +6 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,50 @@
|
|
|
1
1
|
# tinacms
|
|
2
2
|
|
|
3
|
+
## 0.59.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- df3030990: Add basic branch switcher
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- 9ecceb59f: Always include `collection` for TinaAdmin `createDocument()` and `updateDocument()`
|
|
12
|
+
- Updated dependencies [df3030990]
|
|
13
|
+
- @tinacms/toolkit@0.56.0
|
|
14
|
+
|
|
15
|
+
## 0.58.1
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- e6995cfcb: Adds README for TinaAdmin
|
|
20
|
+
- 60729f60c: Adds a `reference` field
|
|
21
|
+
- 19e02829f: Add ability to control plugin layout for global plugins from formify
|
|
22
|
+
- Updated dependencies [60729f60c]
|
|
23
|
+
- @tinacms/toolkit@0.55.4
|
|
24
|
+
|
|
25
|
+
## 0.58.0
|
|
26
|
+
|
|
27
|
+
### Minor Changes
|
|
28
|
+
|
|
29
|
+
- d1ed404ba: Add support for auto-generated SDK for type-safe data fetching
|
|
30
|
+
|
|
31
|
+
### Patch Changes
|
|
32
|
+
|
|
33
|
+
- 138ceb8c4: Clean up dependencies
|
|
34
|
+
- 0417e3750: Adds RouteMapperPlugin and FormMetaPlugin
|
|
35
|
+
- Updated dependencies [138ceb8c4]
|
|
36
|
+
- Updated dependencies [0417e3750]
|
|
37
|
+
- Updated dependencies [d9f37ea7e]
|
|
38
|
+
- @tinacms/toolkit@0.55.3
|
|
39
|
+
|
|
40
|
+
## 0.57.4
|
|
41
|
+
|
|
42
|
+
### Patch Changes
|
|
43
|
+
|
|
44
|
+
- 4b7795612: Adds support for collection.templates to TinaAdmin
|
|
45
|
+
- a39ddc611: update media store to load only when in edit mode
|
|
46
|
+
- 1096fe3e4: Ensure forms unmount properly when `useGraphQLForms` unmounts
|
|
47
|
+
|
|
3
48
|
## 0.57.3
|
|
4
49
|
|
|
5
50
|
### Patch Changes
|
|
@@ -14,6 +14,7 @@ import type { TinaCMS } from '@tinacms/toolkit';
|
|
|
14
14
|
interface Document {
|
|
15
15
|
node: {
|
|
16
16
|
sys: {
|
|
17
|
+
template: string;
|
|
17
18
|
breadcrumbs: string[];
|
|
18
19
|
path: string;
|
|
19
20
|
basename: string;
|
|
@@ -23,10 +24,16 @@ interface Document {
|
|
|
23
24
|
};
|
|
24
25
|
};
|
|
25
26
|
}
|
|
27
|
+
export interface Template {
|
|
28
|
+
name: string;
|
|
29
|
+
label: string;
|
|
30
|
+
fields: any[];
|
|
31
|
+
}
|
|
26
32
|
export interface Collection {
|
|
27
33
|
label: string;
|
|
28
34
|
name: string;
|
|
29
35
|
format: string;
|
|
36
|
+
templates: Template[];
|
|
30
37
|
documents: {
|
|
31
38
|
totalCount: number;
|
|
32
39
|
edges: Document[];
|
|
@@ -14,21 +14,24 @@ import type { TinaCMS } from '@tinacms/toolkit';
|
|
|
14
14
|
interface GetDocumentFields {
|
|
15
15
|
[collectionName: string]: {
|
|
16
16
|
collection: Object;
|
|
17
|
-
|
|
17
|
+
templates?: Object[];
|
|
18
|
+
fields?: Object[];
|
|
18
19
|
};
|
|
19
20
|
}
|
|
20
21
|
export interface Info {
|
|
21
22
|
collection: Object | undefined;
|
|
23
|
+
template: Object | undefined;
|
|
22
24
|
fields: Object[] | undefined;
|
|
23
25
|
mutationInfo: {
|
|
24
26
|
includeCollection: boolean;
|
|
25
27
|
includeTemplate: boolean;
|
|
26
28
|
};
|
|
27
29
|
}
|
|
28
|
-
export declare const useGetDocumentFields: (cms: TinaCMS, collectionName: string) => Info;
|
|
29
|
-
declare const GetDocumentFields: ({ cms, collectionName, children, }: {
|
|
30
|
+
export declare const useGetDocumentFields: (cms: TinaCMS, collectionName: string, templateName: string) => Info;
|
|
31
|
+
declare const GetDocumentFields: ({ cms, collectionName, templateName, children, }: {
|
|
30
32
|
cms: TinaCMS;
|
|
31
33
|
collectionName: string;
|
|
34
|
+
templateName?: string;
|
|
32
35
|
children: any;
|
|
33
36
|
}) => JSX.Element;
|
|
34
37
|
export default GetDocumentFields;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
Copyright 2021 Forestry.io Holdings, Inc.
|
|
3
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
you may not use this file except in compliance with the License.
|
|
5
|
+
You may obtain a copy of the License at
|
|
6
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
+
Unless required by applicable law or agreed to in writing, software
|
|
8
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
9
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
10
|
+
See the License for the specific language governing permissions and
|
|
11
|
+
limitations under the License.
|
|
12
|
+
*/
|
|
13
|
+
import { Plugin } from '@tinacms/toolkit';
|
|
14
|
+
import { Collection } from '../components/GetCollection';
|
|
15
|
+
interface Document {
|
|
16
|
+
sys: {
|
|
17
|
+
template: string;
|
|
18
|
+
breadcrumbs: string[];
|
|
19
|
+
path: string;
|
|
20
|
+
basename: string;
|
|
21
|
+
relativePath: string;
|
|
22
|
+
filename: string;
|
|
23
|
+
extension: string;
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
export declare class RouteMappingPlugin implements Plugin {
|
|
27
|
+
__type: string;
|
|
28
|
+
name: string;
|
|
29
|
+
mapper: (collection: Collection, document: Document) => string | undefined;
|
|
30
|
+
constructor(mapper: (collection: Collection, document: Document) => string | undefined);
|
|
31
|
+
}
|
|
32
|
+
export {};
|
|
@@ -29,7 +29,7 @@ export interface TinaCloudAuthWallProps {
|
|
|
29
29
|
action: () => Promise<void>;
|
|
30
30
|
primary: boolean;
|
|
31
31
|
}[];
|
|
32
|
-
mediaStore?: TinaCloudMediaStoreClass | Promise<TinaCloudMediaStoreClass
|
|
32
|
+
mediaStore?: TinaCloudMediaStoreClass | (() => Promise<TinaCloudMediaStoreClass>);
|
|
33
33
|
}
|
|
34
34
|
export declare const AuthWallInner: ({ children, cms, loginScreen, getModalActions, }: TinaCloudAuthWallProps) => JSX.Element;
|
|
35
35
|
/**
|
package/dist/client/index.d.ts
CHANGED
|
@@ -33,6 +33,7 @@ export declare class Client {
|
|
|
33
33
|
identityApiUrl: string;
|
|
34
34
|
schema: GraphQLSchema;
|
|
35
35
|
clientId: string;
|
|
36
|
+
contentApiBase: string;
|
|
36
37
|
query: string;
|
|
37
38
|
setToken: (_token: TokenObject) => void;
|
|
38
39
|
private getToken;
|
|
@@ -64,8 +65,8 @@ export declare class Client {
|
|
|
64
65
|
*/
|
|
65
66
|
fetchWithToken(input: RequestInfo, init?: RequestInit): Promise<Response>;
|
|
66
67
|
getUser(): Promise<any>;
|
|
67
|
-
listBranches(
|
|
68
|
-
createBranch({
|
|
68
|
+
listBranches(): Promise<any>;
|
|
69
|
+
createBranch({ baseBranch, branchName }: BranchData): Promise<string>;
|
|
69
70
|
}
|
|
70
71
|
export declare const DEFAULT_LOCAL_TINA_GQL_SERVER_URL = "http://localhost:4001/graphql";
|
|
71
72
|
export declare class LocalClient extends Client {
|
package/dist/index.d.ts
CHANGED
|
@@ -18,5 +18,6 @@ export { useGraphqlForms } from './hooks/use-graphql-forms';
|
|
|
18
18
|
export { useDocumentCreatorPlugin } from './hooks/use-content-creator';
|
|
19
19
|
export * from '@tinacms/toolkit';
|
|
20
20
|
export { TinaAdmin } from './admin';
|
|
21
|
+
export { RouteMappingPlugin } from './admin/plugins/route-mapping';
|
|
21
22
|
import { TinaCMSProvider2 } from './tina-cms';
|
|
22
23
|
export default TinaCMSProvider2;
|