Skip to content

Commit 1f5180f

Browse files
chore(content-explorer): Migrate ContentExplorer (#3870)
1 parent 84594ac commit 1f5180f

File tree

15 files changed

+1561
-893
lines changed

15 files changed

+1561
-893
lines changed

scripts/styleguide.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const allSections = [
1212
{
1313
name: 'Elements',
1414
components: () => [
15-
'../src/elements/content-explorer/ContentExplorer.js',
15+
'../src/elements/content-explorer/ContentExplorer.tsx',
1616
'../src/elements/content-picker/ContentPicker.js',
1717
'../src/elements/content-preview/ContentPreview.js',
1818
'../src/elements/content-sharing/ContentSharing.js',
Lines changed: 144 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,144 @@
1+
const mockMetadata = {
2+
entries: [
3+
{
4+
name: 'File1',
5+
etag: '2',
6+
metadata: {
7+
enterprise_0: {
8+
templateName: {
9+
$scope: 'enterprise_0',
10+
role: ['Business Owner', 'Marketing'],
11+
$template: 'templateName',
12+
$parent: 'file_1188899160835',
13+
name: 'something',
14+
industry: 'Technology',
15+
last_contacted_at: '2023-11-16T00:00:00.000Z',
16+
$version: 6,
17+
},
18+
},
19+
},
20+
id: '1188899160835',
21+
modified_at: '2023-04-12T10:06:04-07:00',
22+
type: 'file',
23+
},
24+
{
25+
name: 'File2',
26+
etag: '1',
27+
metadata: {
28+
enterprise_0: {
29+
templateName: {
30+
$scope: 'enterprise_0',
31+
role: ['Developer'],
32+
$template: 'templateName',
33+
$parent: 'file_1318276254035',
34+
name: '1',
35+
industry: 'Healthcare',
36+
last_contacted_at: '2023-11-01T00:00:00.000Z',
37+
$version: 1,
38+
},
39+
},
40+
},
41+
id: '1318276254035',
42+
modified_at: '2023-09-26T14:04:52-07:00',
43+
type: 'file',
44+
},
45+
{
46+
name: 'File3',
47+
etag: '0',
48+
metadata: {
49+
enterprise_0: {
50+
templateName: {
51+
$scope: 'enterprise_0',
52+
$template: 'templateName',
53+
$parent: 'folder_218662304788',
54+
$version: 0,
55+
},
56+
},
57+
},
58+
id: '218662304788',
59+
modified_at: '2024-06-13T15:53:23-07:00',
60+
type: 'folder',
61+
},
62+
],
63+
limit: 50,
64+
};
65+
66+
const mockSchema = {
67+
id: '26b5527a-bdf5-4e30-a1cb-310bff2b02b9',
68+
type: 'metadata_template',
69+
templateKey: 'templateName',
70+
scope: 'enterprise_0',
71+
displayName: 'templateName',
72+
hidden: false,
73+
copyInstanceOnItemCopy: false,
74+
fields: [
75+
{
76+
id: '56b6f00e-5db3-4875-a31d-14b20f63c0ea',
77+
type: 'string',
78+
key: 'name',
79+
displayName: 'Name',
80+
hidden: false,
81+
description: 'The customer name',
82+
},
83+
{
84+
id: '07d3c06c-5db4-4f3f-821e-19219ba70ed3',
85+
type: 'date',
86+
key: 'last_contacted_at',
87+
displayName: 'Last Contacted At',
88+
hidden: false,
89+
description: 'When this customer was last contacted at',
90+
},
91+
{
92+
id: 'b03f5855-d269-4dcf-8d14-dcae89b25aa6',
93+
type: 'enum',
94+
key: 'industry',
95+
displayName: 'Industry',
96+
hidden: false,
97+
options: [
98+
{
99+
id: 'f552fe3f-0ccb-4ae1-9c21-508c49be3750',
100+
key: 'Technology',
101+
},
102+
{
103+
id: '53006247-72b4-4719-931a-7f9327a6e31d',
104+
key: 'Healthcare',
105+
},
106+
{
107+
id: 'bda9a5fb-8069-4977-87fd-870b8503095a',
108+
key: 'Legal',
109+
},
110+
],
111+
},
112+
{
113+
id: '1436c58a-5df5-44b5-b854-9a49e8f50e30',
114+
type: 'multiSelect',
115+
key: 'role',
116+
displayName: 'Contact Role',
117+
hidden: false,
118+
options: [
119+
{
120+
id: '6dc57bab-b62d-4aec-8be0-fb8becae9b9a',
121+
key: 'Developer',
122+
},
123+
{
124+
id: '5373e8e1-1e8a-4649-9e06-370407772aa1',
125+
key: 'Business Owner',
126+
},
127+
{
128+
id: '78bdac5b-2639-4d68-9081-b8f2cdf6a9a1',
129+
key: 'Marketing',
130+
},
131+
{
132+
id: 'e3500aa8-5643-46b7-b58d-fbd7caa9d927',
133+
key: 'Legal',
134+
},
135+
{
136+
id: 'e7ef8b21-b6ec-4c9f-9899-4415d98e5c45',
137+
key: 'Sales',
138+
},
139+
],
140+
},
141+
],
142+
};
143+
144+
export { mockMetadata, mockSchema };

0 commit comments

Comments
 (0)