Skip to content

Commit f8ed4f1

Browse files
committed
feat: support user defined data-aue-label
1 parent f72c9d9 commit f8ed4f1

File tree

11 files changed

+173
-6
lines changed

11 files changed

+173
-6
lines changed

blocks/cards/_cards.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"resourceType": "core/franklin/components/block/v1/block",
1010
"template": {
1111
"name": "Cards",
12+
"model": "cards",
1213
"filter": "cards"
1314
}
1415
}
@@ -32,9 +33,28 @@
3233
}
3334
],
3435
"models": [
36+
{
37+
"id": "cards",
38+
"fields": [
39+
{
40+
"component": "text",
41+
"name": "aueLabel",
42+
"label": "Editor Label",
43+
"description": "The label of this component in the editor overlay and content tree.",
44+
"value": "Cards"
45+
}
46+
]
47+
},
3548
{
3649
"id": "card",
3750
"fields": [
51+
{
52+
"component": "text",
53+
"name": "aueLabel",
54+
"label": "Editor Label",
55+
"description": "The label of this component in the editor overlay and content tree.",
56+
"value": "Card"
57+
},
3858
{
3959
"component": "reference",
4060
"valueType": "string",

blocks/columns/_columns.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
"page": {
99
"resourceType": "core/franklin/components/columns/v1/columns",
1010
"template": {
11+
"model": "columns",
12+
"template": "columns",
1113
"columns": "2",
1214
"rows": "1"
1315
}
@@ -20,6 +22,13 @@
2022
{
2123
"id": "columns",
2224
"fields": [
25+
{
26+
"component": "text",
27+
"name": "aueLabel",
28+
"label": "Editor Label",
29+
"description": "The label of this component in the editor overlay and content tree.",
30+
"value": "Columns"
31+
},
2332
{
2433
"component": "text",
2534
"valueType": "number",

blocks/fragment/_fragment.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,13 @@
2020
{
2121
"id": "fragment",
2222
"fields": [
23+
{
24+
"component": "text",
25+
"name": "aueLabel",
26+
"label": "Editor Label",
27+
"description": "The label of this component in the editor overlay and content tree.",
28+
"value": "Fragment"
29+
},
2330
{
2431
"component": "aem-content",
2532
"name": "reference",

blocks/hero/_hero.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,13 @@
2020
{
2121
"id": "hero",
2222
"fields": [
23+
{
24+
"component": "text",
25+
"name": "aueLabel",
26+
"label": "Editor Label",
27+
"description": "The label of this component in the editor overlay and content tree.",
28+
"value": "Hero"
29+
},
2330
{
2431
"component": "reference",
2532
"valueType": "string",

component-definition.json

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@
1111
"xwalk": {
1212
"page": {
1313
"resourceType": "core/franklin/components/text/v1/text",
14-
"template": {}
14+
"template": {
15+
"model": "text"
16+
}
1517
}
1618
}
1719
}
@@ -37,7 +39,9 @@
3739
"xwalk": {
3840
"page": {
3941
"resourceType": "core/franklin/components/image/v1/image",
40-
"template": {}
42+
"template": {
43+
"model": "image"
44+
}
4145
}
4246
}
4347
}
@@ -91,6 +95,7 @@
9195
"resourceType": "core/franklin/components/block/v1/block",
9296
"template": {
9397
"name": "Cards",
98+
"model": "cards",
9499
"filter": "cards"
95100
}
96101
}
@@ -120,6 +125,8 @@
120125
"page": {
121126
"resourceType": "core/franklin/components/columns/v1/columns",
122127
"template": {
128+
"model": "columns",
129+
"template": "columns",
123130
"columns": "2",
124131
"rows": "1"
125132
}

component-models.json

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,13 @@
2626
{
2727
"id": "image",
2828
"fields": [
29+
{
30+
"component": "text",
31+
"name": "aueLabel",
32+
"label": "Editor Label",
33+
"description": "The label of this component in the editor overlay and content tree.",
34+
"value": "Image"
35+
},
2936
{
3037
"component": "reference",
3138
"name": "image",
@@ -42,6 +49,13 @@
4249
{
4350
"id": "title",
4451
"fields": [
52+
{
53+
"component": "text",
54+
"name": "aueLabel",
55+
"label": "Editor Label",
56+
"description": "The label of this component in the editor overlay and content tree.",
57+
"value": "Title"
58+
},
4559
{
4660
"component": "text",
4761
"name": "title",
@@ -80,9 +94,28 @@
8094
}
8195
]
8296
},
97+
{
98+
"id": "text",
99+
"fields": [
100+
{
101+
"component": "text",
102+
"name": "aueLabel",
103+
"label": "Editor Label",
104+
"description": "The label of this component in the editor overlay and content tree.",
105+
"value": "Text"
106+
}
107+
]
108+
},
83109
{
84110
"id": "button",
85111
"fields": [
112+
{
113+
"component": "text",
114+
"name": "aueLabel",
115+
"label": "Editor Label",
116+
"description": "The label of this component in the editor overlay and content tree.",
117+
"value": "Button"
118+
},
86119
{
87120
"component": "aem-content",
88121
"name": "link",
@@ -141,9 +174,28 @@
141174
}
142175
]
143176
},
177+
{
178+
"id": "cards",
179+
"fields": [
180+
{
181+
"component": "text",
182+
"name": "aueLabel",
183+
"label": "Editor Label",
184+
"description": "The label of this component in the editor overlay and content tree.",
185+
"value": "Cards"
186+
}
187+
]
188+
},
144189
{
145190
"id": "card",
146191
"fields": [
192+
{
193+
"component": "text",
194+
"name": "aueLabel",
195+
"label": "Editor Label",
196+
"description": "The label of this component in the editor overlay and content tree.",
197+
"value": "Card"
198+
},
147199
{
148200
"component": "reference",
149201
"valueType": "string",
@@ -163,6 +215,13 @@
163215
{
164216
"id": "columns",
165217
"fields": [
218+
{
219+
"component": "text",
220+
"name": "aueLabel",
221+
"label": "Editor Label",
222+
"description": "The label of this component in the editor overlay and content tree.",
223+
"value": "Columns"
224+
},
166225
{
167226
"component": "text",
168227
"valueType": "number",
@@ -182,6 +241,13 @@
182241
{
183242
"id": "fragment",
184243
"fields": [
244+
{
245+
"component": "text",
246+
"name": "aueLabel",
247+
"label": "Editor Label",
248+
"description": "The label of this component in the editor overlay and content tree.",
249+
"value": "Fragment"
250+
},
185251
{
186252
"component": "aem-content",
187253
"name": "reference",
@@ -192,6 +258,13 @@
192258
{
193259
"id": "hero",
194260
"fields": [
261+
{
262+
"component": "text",
263+
"name": "aueLabel",
264+
"label": "Editor Label",
265+
"description": "The label of this component in the editor overlay and content tree.",
266+
"value": "Hero"
267+
},
195268
{
196269
"component": "reference",
197270
"valueType": "string",

models/_button.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,13 @@
1919
{
2020
"id": "button",
2121
"fields": [
22+
{
23+
"component": "text",
24+
"name": "aueLabel",
25+
"label": "Editor Label",
26+
"description": "The label of this component in the editor overlay and content tree.",
27+
"value": "Button"
28+
},
2229
{
2330
"component": "aem-content",
2431
"name": "link",

models/_image.json

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
"xwalk": {
88
"page": {
99
"resourceType": "core/franklin/components/image/v1/image",
10-
"template": {}
10+
"template": {
11+
"model": "image"
12+
}
1113
}
1214
}
1315
}
@@ -17,6 +19,13 @@
1719
{
1820
"id": "image",
1921
"fields": [
22+
{
23+
"component": "text",
24+
"name": "aueLabel",
25+
"label": "Editor Label",
26+
"description": "The label of this component in the editor overlay and content tree.",
27+
"value": "Image"
28+
},
2029
{
2130
"component": "reference",
2231
"name": "image",

models/_text.json

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,26 @@
77
"xwalk": {
88
"page": {
99
"resourceType": "core/franklin/components/text/v1/text",
10-
"template": {}
10+
"template": {
11+
"model": "text"
12+
}
1113
}
1214
}
1315
}
1416
}
1517
],
16-
"models": []
18+
"models": [
19+
{
20+
"id": "text",
21+
"fields": [
22+
{
23+
"component": "text",
24+
"name": "aueLabel",
25+
"label": "Editor Label",
26+
"description": "The label of this component in the editor overlay and content tree.",
27+
"value": "Text"
28+
}
29+
]
30+
}
31+
]
1732
}

models/_title.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,13 @@
1919
{
2020
"id": "title",
2121
"fields": [
22+
{
23+
"component": "text",
24+
"name": "aueLabel",
25+
"label": "Editor Label",
26+
"description": "The label of this component in the editor overlay and content tree.",
27+
"value": "Title"
28+
},
2229
{
2330
"component": "text",
2431
"name": "title",

0 commit comments

Comments
 (0)