2017 © Pedro Peláez
 

magento2-module mx-widgetcomponent

Inviqa - MX Widget Component

image

inviqa/mx-widgetcomponent

Inviqa - MX Widget Component

  • Tuesday, May 15, 2018
  • by inviqa-session
  • Repository
  • 20 Watchers
  • 1 Stars
  • 6,184 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 5 Forks
  • 2 Open issues
  • 14 Versions
  • 39 % Grown

The README.md

MX_WidgetComponent

The module provides useful widget components to be able to create complex widgets in Magento 2., (*1)

List of available components

Image Picker

Allows to use the cms image uploader on the widget forms, which makes it easy to upload/select an image for the widget., (*2)

Features of this component: - Upload cms image - Select already uploaded cms image - Configurable image choose button label - Restrict the allowed images by with/height - Restrict the allowed images by file size - (allowed file types are configured in the cms module OOB), (*3)

Video Picker

Allows to use the cms uploader on the widget forms, which makes it easy to upload/select an video for the widget., (*4)

Features of this component: - Upload cms video - Select already uploaded cms video - Configurable video choose button label - Restrict the allowed videos by file size - (allowed file types are configured in the specific xml file), (*5)

Date Picker

Allows to pick date using the default datepicker js component., (*6)

Features of this component: - Date format is configurable - Time format is configurable (if not provided only date chooser will appear) - Image of the date-picker component is configurable - Date field can be configured to be disabled (read-only), (*7)

Datetime Picker

Same as the datepicker component, just comes with a pre-configured time format, so it will appear as a date-time chooser by default., (*8)

Textarea

Allows to use textarea on the widget forms., (*9)

Features of this component: - Visible width of a text area (cols) is configurable - Visible number of lines in a text area (rows) is configurable - Maximum number of characters allowed (maxlenght) is configurable - Dinamically shows the number of characters remaining if maxlength configured, (*10)

Checkbox

Allows to use checkboxes on the widget form. Useful for replacing the Yes/No select which usually used., (*11)

Features of this component: - The checkbox value is configurable (by default it is '1' when checked), (*12)

SubWidget

Allows to embed a widget into another widget. Useful to create custom reusable widget components. E.g. a link sub-widget which is a combination of 3 fields: url, link text and 'should open in new window' can be reused in many widget., (*13)

Features of this component: - The label of the sub-widget cofiguration button is configurable - Allows to embed widget in any depth (sub-widget can also have a sub-widget), (*14)

For more information please see the Usage section., (*15)

Compatibility

Magento 2.X (tested in magento 2.0.10, 2.1.2, 2.2.3), (*16)

Usage

Image Picker

<parameter name="my_param" xsi:type="block" visible="true" required="false">
    <label translate="true">Image</label>
    <block class="MX\WidgetComponent\Block\Adminhtml\Component\ImagePicker">
        <!-- Optional configuration parameters -->
        <data>
            <item name="dimension" xsi:type="array">
                <item name="max-width" xsi:type="string">500</item>
                <item name="max-height" xsi:type="string">500</item>
            </item>
            <item name="max-size" xsi:type="string">50000</item>
            <item name="button" xsi:type="array">
                <item name="open" xsi:type="string">Select Image...</item>
            </item>
        </data>
        <!-- Optional configuration parameters -->
    </block>
</parameter>

Video Picker

<parameter name="my_param" xsi:type="block" visible="true" required="false">
    <label translate="true">Video</label>
    <block class="MX\WidgetComponent\Block\Adminhtml\Component\VideoPicker">
        <!-- Optional configuration parameters -->
        <data>
            <item name="max-size" xsi:type="string">500000</item>
            <item name="button" xsi:type="array">
                <item name="open" xsi:type="string">Select Video...</item>
            </item>
        </data>
        <!-- Optional configuration parameters -->
    </block>
</parameter>

Date Picker

<parameter name="my_param" xsi:type="block" visible="true" required="false">
    <label translate="true">Date</label>
    <block class="MX\WidgetComponent\Block\Adminhtml\Component\DatePicker">
        <!-- Optional configuration parameters -->
        <data>
            <item name="dateFormat" xsi:type="string">yyyy-MM-dd</item>
            <item name="timeFormat" xsi:type="string">HH:mm:ss</item>
            <item name="image" xsi:type="string">path-to/url</item>
            <item name="disabled" xsi:type="boolean">true</item>
        </data>
        <!-- Optional configuration parameters -->
    </block>
</parameter>

Datetime Picker

<parameter name="my_param" xsi:type="block" visible="true" required="false">
    <label translate="true">Datetime</label>
    <block class="MX\WidgetComponent\Block\Adminhtml\Component\DateTimePicker">
        <!-- Optional configuration parameters -->
        <data>
            <item name="dateFormat" xsi:type="string">yyyy-MM-dd</item>
            <item name="timeFormat" xsi:type="string">HH:mm:ss</item>
            <item name="image" xsi:type="string">path-to/url</item>
            <item name="disabled" xsi:type="boolean">true</item>
        </data>
        <!-- Optional configuration parameters -->
    </block>
</parameter>

Textarea

<parameter name="my_param" xsi:type="block" visible="true" required="false">
    <label translate="true">Textarea</label>
    <block class="MX\WidgetComponent\Block\Adminhtml\Component\Textarea">
        <!-- Optional configuration parameters -->
        <data>
            <item name="cols" xsi:type="string">visible width of a text area</item>
            <item name="rows" xsi:type="string">visible number of lines in a text area</item>
            <item name="maxlength" xsi:type="string">maximum number of characters allowed in the text area</item>
        </data>
        <!-- Optional configuration parameters -->
    </block>
</parameter>

Checkbox

<parameter name="my_param" xsi:type="block" visible="true" required="false">
    <label translate="true">Checkbox</label>
    <block class="MX\WidgetComponent\Block\Adminhtml\Component\Checkbox">
        <!-- Optional configuration parameters -->
        <data>
            <item name="value" xsi:type="string">checkbox_value</item>
        </data>
        <!-- Optional configuration parameters -->
    </block>
</parameter>

SubWidget

<parameter name="my_param" xsi:type="block" visible="true" required="true" sort_order="10">
    <label translate="true">Sub-Widget</label>
    <block class="MX\WidgetComponent\Block\Adminhtml\Component\SubWidget">
        <data>
            <!-- Optional configuration parameters -->
            <item name="button-label" xsi:type="string">Subwidget configuration button text</item>
            <!-- Optional configuration parameters -->
            <item name="widget-type-id" xsi:type="string">the_id_of_the_sub_widget</item>
        </data>
    </block>
</parameter>

The Versions

15/05 2018

dev-master

9999999-dev

Inviqa - MX Widget Component

  Sources   Download

MIT

The Requires

  • php >=5.5
  • symfony/yaml ~2.1|~3.0
  • magento/framework ^100.1|^101.0
  • magento/module-backend ^100.1|^100.2
  • magento/module-cms ^101.0|^102.0
  • magento/module-ui ^100.1|^101.0
  • magento/module-catalog ^101.0|^102.0

 

11/05 2018

2.2.1

2.2.1.0

Inviqa - MX Widget Component

  Sources   Download

MIT

The Requires

  • php >=5.5
  • symfony/yaml ~2.1|~3.0
  • magento/framework ^100.1|^101.0
  • magento/module-backend ^100.1|^100.2
  • magento/module-cms ^101.0|^102.0
  • magento/module-ui ^100.1|^101.0
  • magento/module-catalog ^101.0|^102.0

 

11/05 2018

2.2.0

2.2.0.0

Inviqa - MX Widget Component

  Sources   Download

MIT

The Requires

  • php >=5.5
  • symfony/yaml ~2.1|~3.0
  • magento/framework ^100.1|^101.0
  • magento/module-backend ^100.1|^100.2
  • magento/module-cms ^101.0|^102.0
  • magento/module-ui ^100.1|^101.0
  • magento/module-catalog ^101.0|^102.0

 

25/04 2018

2.1.0

2.1.0.0

Inviqa - MX Widget Component

  Sources   Download

MIT

The Requires

  • php >=5.5
  • symfony/yaml ~2.1|~3.0
  • magento/framework ^100.1|^101.0
  • magento/module-backend ^100.1|^100.2
  • magento/module-cms ^101.0|^102.0
  • magento/module-ui ^100.1|^101.0
  • magento/module-catalog ^101.0|^102.0

 

25/04 2018

dev-feature/image-picker-remove-image

dev-feature/image-picker-remove-image

Inviqa - MX Widget Component

  Sources   Download

MIT

The Requires

  • php >=5.5
  • symfony/yaml ~2.1|~3.0
  • magento/framework ^100.1|^101.0
  • magento/module-backend ^100.1|^100.2
  • magento/module-cms ^101.0|^102.0
  • magento/module-ui ^100.1|^101.0
  • magento/module-catalog ^101.0|^102.0

 

28/02 2018

2.0.1

2.0.1.0

Inviqa - MX Widget Component

  Sources   Download

MIT

The Requires

  • php >=5.5
  • symfony/yaml ~2.1|~3.0
  • magento/framework ^100.1|^101.0
  • magento/module-backend ^100.1|^100.2
  • magento/module-cms ^101.0|^102.0
  • magento/module-ui ^100.1|^101.0
  • magento/module-catalog ^101.0|^102.0

 

26/05 2017

2.0.0

2.0.0.0

Inviqa - MX Widget Component

  Sources   Download

MIT

The Requires

  • php >=5.5
  • symfony/yaml ~2.1|~3.0
  • magento/framework ^100.1
  • magento/module-backend ^100.1
  • magento/module-cms ^101.0
  • magento/module-ui ^100.1
  • magento/module-catalog ^101.0

 

21/04 2017

1.6.1

1.6.1.0

Inviqa - MX Widget Component

  Sources   Download

The Requires

  • php >=5.5

 

20/04 2017

1.6.0

1.6.0.0

Inviqa - MX Widget Component

  Sources   Download

The Requires

  • php >=5.5

 

07/04 2017

1.5.0

1.5.0.0

Inviqa - MX Widget Component

  Sources   Download

The Requires

  • php ~5.5.0|~5.6.0|~7.0.0

 

01/04 2017

1.4.0

1.4.0.0

Inviqa - MX Widget Component

  Sources   Download

The Requires

  • php ~5.5.0|~5.6.0|~7.0.0

 

31/03 2017

1.3.1

1.3.1.0

Inviqa - MX Widget Component

  Sources   Download

The Requires

  • php ~5.5.0|~5.6.0|~7.0.0

 

08/03 2017

1.3.0

1.3.0.0

Inviqa - MX Widget Component

  Sources   Download

The Requires

  • php ~5.5.0|~5.6.0|~7.0.0

 

13/12 2016

1.0.0

1.0.0.0

Inviqa - MX Widget Component

  Sources   Download

The Requires

  • php ~5.5.0|~5.6.0|~7.0.0