! Magento 2 -. M2 , 2 , â , UI (Ui Components). , , , . , . M2 Ui Components, . , Ui Components , . , , , . !
, Ui Components. , , , , , , . , , .
UiComponents , ( ) , .
(M2 2.4.2) M2 , , 2 Ui Components. M2 Ui Components , , Magento Coding Standards, .
, , , , .
, 2.
, ( ) .
, , , Ui .
JS . , , :
<script type="text/x-magento-init">
{"*": {"Magento_Ui/js/core/app": {...}}}
</script>
( ).
JSON , :
{
...
"components": {
"white_rabbit_listing": {
"children": {
"white_rabbit_listing": {
"children": {
"listing_top": {
"type": "container",
"name": "listing_top",
"children": {
"bookmarks": {...},
"columns_controls": {...},
"listing_filters": {...},
"listing_massaction": {...},
"listing_paging": {...}
âŠ
}
, Ui : white_rabbit_listing Listing, bookmarks â c, Bookmarks .. , ., , HTML , , , knockout.js !
, , ( , , , .)
. , Ui .
, , . : Listing Component Form Component. , , - . .
, . , (, â Listing Form ( ) , ). ( , - M2), , , CSS.
Listing Component
Listing Component c (!)
ActionsColumn â : , .
Bookmarks â
Button â
Column â
Columns â
ColumnsControls â
ColumnsEditor â ,
ColumnsEditorRecord â ColumnsEditor, , , , ColumnsEditor Select Multiselect
ColumnsEditorView â ColumnsEditor,
ColumnsEditingBulk â ColumnsEditor
ColumnsEditingClient â ColumnsEditor
ColumnsResize â
DateColumn â
DragAndDrop â
Expandable â , ; show more. Tooltip c
ExportButton â
Filters â
FiltersChips â Filters
GridDataProvider â data provider
ImagePreview â ThumbnailColumn
InsertListing â Listing Ui
LinkColumn â ,
Masonry â Listing, ( )
MassActions â
MultiselectColumn â , MassActions
OnOffColumn â On/Off
Paging â
Range â ââ ââ. . Input, (, Date)
Search â
SelectColumn â
Sizes â ,
Sortby â ASC DESC
ThumbnailColumn â
TimelineColumns â . Magento 2 Commerce Edition
ListingToolbar â , : , .
TreeMassActions â MassActions,
UI-select â -, ( )
Form Component
Form Component (!)
ActionDelete â DynamicRows
Checkbox â
CheckboxToggleNotice â ,
Checkboxset â Checkbox
ColorPicker â
Container â
DataSource â
Date â
DynamicRows â , , . Ui
DynamicRowsDragAndDrop â DynamicRows
DynamicRowsRecord â DynamicRows
Email â Input email
FieldSet â
File â Input file
FileUploader â ( JQuery JQuery-File-Upload)
FormDataProvider â ,
Hidden â Input hidden
HtmlContent â , HTML
Input â , Input
InsertForm â Ui
Modal â ,
Multiline â , ( M2 )
Multiselect â , ctrl
Nav â Tab . Tab
Radioset â Checkboxset
Select â Select
Tab â Tab- Nav
Text â
Textarea â , textarea
UrlInput â urlInput
Wysiwyg â , TinyMCE textarea
, , 2. , , - . Decorator Adapter.
. , :
XML-.
JS , UIElement, UIClass UICollection
( ), .
XML , . Input Form:
<field name="id" formElement="input">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="source" xsi:type="string">white_rabbit</item>
</item>
</argument>
<settings>
<dataType>text</dataType>
<dataScope>id</dataScope>
</settings>
</field>
XML , ( ).
JS , . - , . :
HTML knockout.js.
Checkbox:
<div class="admin__field admin__field-option">
<input type="checkbox"
class="admin__control-checkbox"
simple-checked="checked"
ko-disabled="disabled"
ko-focused="focused"
ko-value="value"
attr="id: uid, name: inputName"/>
<label class="admin__field-label" text="description" attr="for: uid"/>
</div>
, (XML ), , ( ), , . , .
Ui Components. , , , , M2.=
, , XML .
. . !