Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
experience_builder
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
experience_builder
Merge requests
!562
#3499927
create Code Component config entity
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
#3499927
create Code Component config entity
issue/experience_builder-3499927:3499927-cc-config
into
0.x
Overview
96
Commits
49
Pipelines
41
Changes
6
Merged
Ted Bowman
requested to merge
issue/experience_builder-3499927:3499927-cc-config
into
0.x
2 weeks ago
Overview
31
Commits
49
Pipelines
41
Changes
6
Expand
add config entity class from
!384
Closes
#3499927
0
0
Merge request reports
Compare
0.x
version 40
4e03a64f
1 week ago
version 39
07873aff
1 week ago
version 38
238b081d
1 week ago
version 37
528a68f4
1 week ago
version 36
e36c9bf4
1 week ago
version 35
d4e34d61
1 week ago
version 34
411ec553
1 week ago
version 33
61f91bf0
1 week ago
version 32
392a9b48
1 week ago
version 31
735f2a21
1 week ago
version 30
04a0a162
1 week ago
version 29
3f885350
1 week ago
version 28
51238f51
1 week ago
version 27
c7f6368d
1 week ago
version 26
d1dac0fb
1 week ago
version 25
0139d04e
1 week ago
version 24
61020b45
1 week ago
version 23
e94c2398
1 week ago
version 22
9aaca0de
1 week ago
version 21
9809f06f
1 week ago
version 20
877a679e
1 week ago
version 19
18d2db93
1 week ago
version 18
55746669
1 week ago
version 17
f02e70de
1 week ago
version 16
5bc9186d
1 week ago
version 15
a6dfe306
1 week ago
version 14
832e6268
1 week ago
version 13
bdccebb3
1 week ago
version 12
a1b7eaa3
1 week ago
version 11
bcc45af4
2 weeks ago
version 10
46d7ab1f
2 weeks ago
version 9
d79586d7
2 weeks ago
version 8
e0782c33
2 weeks ago
version 7
a15d8bf6
2 weeks ago
version 6
4ed69df0
2 weeks ago
version 5
118cde30
2 weeks ago
version 4
cdcb1b72
2 weeks ago
version 3
d7f8aa82
2 weeks ago
version 2
aac65b08
2 weeks ago
version 1
b830f8a8
2 weeks ago
0.x (base)
and
latest version
latest version
6b915a47
49 commits,
1 week ago
version 40
4e03a64f
49 commits,
1 week ago
version 39
07873aff
48 commits,
1 week ago
version 38
238b081d
47 commits,
1 week ago
version 37
528a68f4
45 commits,
1 week ago
version 36
e36c9bf4
44 commits,
1 week ago
version 35
d4e34d61
43 commits,
1 week ago
version 34
411ec553
42 commits,
1 week ago
version 33
61f91bf0
41 commits,
1 week ago
version 32
392a9b48
40 commits,
1 week ago
version 31
735f2a21
39 commits,
1 week ago
version 30
04a0a162
38 commits,
1 week ago
version 29
3f885350
37 commits,
1 week ago
version 28
51238f51
36 commits,
1 week ago
version 27
c7f6368d
35 commits,
1 week ago
version 26
d1dac0fb
31 commits,
1 week ago
version 25
0139d04e
30 commits,
1 week ago
version 24
61020b45
29 commits,
1 week ago
version 23
e94c2398
28 commits,
1 week ago
version 22
9aaca0de
26 commits,
1 week ago
version 21
9809f06f
25 commits,
1 week ago
version 20
877a679e
24 commits,
1 week ago
version 19
18d2db93
23 commits,
1 week ago
version 18
55746669
22 commits,
1 week ago
version 17
f02e70de
21 commits,
1 week ago
version 16
5bc9186d
20 commits,
1 week ago
version 15
a6dfe306
19 commits,
1 week ago
version 14
832e6268
18 commits,
1 week ago
version 13
bdccebb3
17 commits,
1 week ago
version 12
a1b7eaa3
16 commits,
1 week ago
version 11
bcc45af4
15 commits,
2 weeks ago
version 10
46d7ab1f
14 commits,
2 weeks ago
version 9
d79586d7
13 commits,
2 weeks ago
version 8
e0782c33
11 commits,
2 weeks ago
version 7
a15d8bf6
10 commits,
2 weeks ago
version 6
4ed69df0
9 commits,
2 weeks ago
version 5
118cde30
8 commits,
2 weeks ago
version 4
cdcb1b72
7 commits,
2 weeks ago
version 3
d7f8aa82
6 commits,
2 weeks ago
version 2
aac65b08
5 commits,
2 weeks ago
version 1
b830f8a8
4 commits,
2 weeks ago
6 files
+
683
−
0
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
6
Search (e.g. *.vue) (Ctrl+P)
config/schema/experience_builder.schema.yml
+
102
−
0
Options
@@ -44,6 +44,108 @@ experience_builder.component.*:
settings
:
type
:
experience_builder.component_source_settings.[%parent.source]
# The \Drupal\experience_builder\Entity\JavaScriptComponent config aims to provide metadata compatible with SDC.
# Hence the data it contains consists of two parts:
# 1. The metadata key-value pairs aim to match SDC's schema precisely, expressed in a directory's *.component.yml file.
# (Additional restrictions are in place, to disallow props that use types that are not yet supported.)
# 2. The sole metadata key-value pair for metadata that SDC does not have: `status`, which tracks whether this
# Code Component should be available in XB's component library or not.
# 3. The code key-value pairs must be able to match what SDC achieves using the directory's Twig+CSS+JS files.
+3
experience_builder.js_component.*
:
type
:
config_entity
constraints
:
FullyValidatable
:
~
mapping
:
# Change the label of the `status` key-value pair inherited from `type: config_entity` to track whether this
# component should be exposed in Experience Builder's component library or not. (See its ComponentSource plugin.)
status
:
label
:
"
Available
in
Experience
Builder's
component
library"
# See core/assets/schemas/v1/metadata-full.schema.json#properties.machineName
machineName
:
type
:
machine_name
label
:
'
Machine
Name'
constraints
:
Regex
:
pattern
:
'
/^[a-z]([a-zA-Z0-9_-]*[a-zA-Z0-9])*$/'
message
:
'
The
%value
machine
name
is
not
valid.'
# See core/assets/schemas/v1/metadata-full.schema.json#properties.name
name
:
type
:
required_label
label
:
'
Name'
# See core/assets/schemas/v1/metadata-full.schema.json#properties.props.properties.required
required
:
type
:
sequence
label
:
'
Required
props'
sequence
:
type
:
string
label
:
'
Prop'
# This MUST be one of the keys available at %parent.props. Rather than repeating that validation logic here, let
# the JsComponentHasValidSdcMetadata constraint take care of that.
constraints
:
{}
# See core/assets/schemas/v1/metadata-full.schema.json#properties.props
props
:
type
:
sequence
sequence
:
type
:
mapping
mapping
:
title
:
type
:
string
label
:
'
Name'
type
:
type
:
string
label
:
'
Type'
constraints
:
Choice
:
# Not all JSON Schema basic types make sense (for example: `null`).
# @see https://json-schema.org/understanding-json-schema/reference/type
-
'
string'
-
'
number'
-
'
integer'
-
'
boolean'
# @todo Consider adding `array` after https://www.drupal.org/i/3467870 is fixed.
# @todo Consider adding `object`, but defining _arbitrary_ object shapes is not yet supported.
# @see \Drupal\experience_builder\JsonSchemaInterpreter\SdcPropJsonSchemaType::computeStorablePropShape()
examples
:
type
:
sequence
label
:
'
Examples'
sequence
:
type
:
string
enum
:
requiredKey
:
false
type
:
sequence
sequence
:
type
:
string
# See core/assets/schemas/v1/metadata-full.schema.json#properties.slots
slots
:
type
:
sequence
sequence
:
# See core/assets/schemas/v1/metadata-full.schema.json#$defs.slotDefinition
type
:
mapping
mapping
:
title
:
type
:
string
label
:
Title
description
:
type
:
string
label
:
Description
examples
:
type
:
sequence
sequence
:
type
:
string
# JS and CSS is compiled and validated in browser, no further validation is required here.
source_code_js
:
type
:
string
label
:
'
JavaScript
Source
code'
source_code_css
:
type
:
string
label
:
'
CSS
Source
code'
compiled_js
:
type
:
string
label
:
'
Compiled
JavaScript'
compiled_css
:
type
:
string
+2
label
:
'
Compiled
CSS'
# At most a single entity of this type is allowed to exist. If it exists, it *replaces* the theme's `page.html.twig`.
experience_builder.global_page_template.*
:
type
:
config_entity
Loading