@themarioga/grid-editor 8.0.0-beta.2 → 8.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +39 -0
- package/README.md +16 -9
- package/UPGRADING.md +21 -11
- package/dist/grideditor.bundle.min.js +3 -3
- package/dist/grideditor.css +77 -35
- package/dist/grideditor.d.ts +29 -8
- package/dist/grideditor.esm.js +7 -1
- package/dist/grideditor.js +7 -1
- package/dist/grideditor.min.css +1 -1
- package/dist/grideditor.min.css.map +1 -1
- package/dist/grideditor.min.js +2 -2
- package/dist/grideditor.min.js.map +3 -3
- package/dist/locales/grideditor.es.esm.js +86 -68
- package/dist/locales/grideditor.es.js +86 -68
- package/dist/locales/grideditor.es.min.js +1 -1
- package/dist/locales/grideditor.es.min.js.map +2 -2
- package/dist/plugins/grideditor.alignment.min.js.map +1 -1
- package/dist/plugins/{grideditor.style.esm.js → grideditor.inline-style.esm.js} +184 -184
- package/dist/plugins/{grideditor.style.js → grideditor.inline-style.js} +182 -182
- package/dist/plugins/grideditor.inline-style.min.js +4 -0
- package/dist/plugins/grideditor.inline-style.min.js.map +7 -0
- package/dist/plugins/grideditor.tabs.esm.js +274 -6
- package/dist/plugins/grideditor.tabs.js +274 -6
- package/dist/plugins/grideditor.tabs.min.js +1 -1
- package/dist/plugins/grideditor.tabs.min.js.map +3 -3
- package/docs/locale-keys.md +97 -79
- package/docs/plugins.md +5 -5
- package/example/containers.html +64 -2
- package/example/index.html +6 -6
- package/example/{style.html → inline-style.html} +5 -5
- package/example/utilities.html +3 -3
- package/package.json +1 -1
- package/src/js/grideditor.js +8 -0
- package/src/js/{style → inline-style}/accordion.js +9 -9
- package/src/js/{style → inline-style}/catalog.js +6 -6
- package/src/js/{style → inline-style}/custom.js +4 -4
- package/src/js/{style → inline-style}/display.js +2 -2
- package/src/js/{style → inline-style}/drawerflow.js +1 -1
- package/src/js/{style → inline-style}/fields.js +25 -25
- package/src/js/{style → inline-style}/flex.js +2 -2
- package/src/js/{style → inline-style}/float.js +2 -2
- package/src/js/{style → inline-style}/options.js +5 -5
- package/src/js/{style → inline-style}/sections.js +50 -50
- package/src/js/{style → inline-style}/spacing.js +2 -2
- package/src/js/{style → inline-style}/sticky.js +2 -2
- package/src/js/{style → inline-style}/textalign.js +2 -2
- package/src/js/locales/grideditor.es.js +86 -68
- package/src/js/plugins/grideditor.alignment.js +1 -1
- package/src/js/plugins/grideditor.inline-style.js +185 -0
- package/src/js/plugins/grideditor.tabs.js +311 -5
- package/src/less/grideditor.less +71 -25
- package/types/grideditor.d.ts +29 -8
- package/dist/plugins/grideditor.style.min.js +0 -4
- package/dist/plugins/grideditor.style.min.js.map +0 -7
- package/src/js/plugins/grideditor.style.js +0 -185
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,45 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
|
5
5
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
6
|
|
|
7
7
|
|
|
8
|
+
## [8.0.0] - 2026-09-30
|
|
9
|
+
|
|
10
|
+
The first stable 8.0: what 8.0.0-beta.1 to 8.0.0-beta.3 below brought, and
|
|
11
|
+
these changes on top of beta.3. See [UPGRADING.md](UPGRADING.md).
|
|
12
|
+
|
|
13
|
+
### Changed
|
|
14
|
+
- **BREAKING:** The style plugin is renamed `inline-style`, with the same
|
|
15
|
+
behaviour: `grideditor.inline-style.js` (`plugins/inline-style` as a
|
|
16
|
+
module), `'inline-style'` in `plugins`, `GridEditor.utilities['inline-style']`,
|
|
17
|
+
the `inline_style` setting (`InlineStyleOptions` in the types), the
|
|
18
|
+
`inline_style.*` locale keys and the `ge-inline-style-*` classes and
|
|
19
|
+
attributes. There is no alias for the old names. `example/style.html` is
|
|
20
|
+
`example/inline-style.html`.
|
|
21
|
+
- A node's settings panel names each of its sections: a heading over the id,
|
|
22
|
+
the classes and the presets (`panel.section_general`, "Id and classes"),
|
|
23
|
+
and over each plugin's section - Style, Tabs - where it is in the panel
|
|
24
|
+
rather than behind a button. The sections are set off by a line.
|
|
25
|
+
|
|
26
|
+
### Fixed
|
|
27
|
+
- A row's drawer starts at the row's edge, as a column's does: Bootstrap's
|
|
28
|
+
gutter padding for a row's children no longer pushes its tools in, nor its
|
|
29
|
+
max width keeps the drawer from reaching the other side.
|
|
30
|
+
|
|
31
|
+
## [8.0.0-beta.3] - 2026-09-30
|
|
32
|
+
|
|
33
|
+
### Added
|
|
34
|
+
- Variants for the tabs container: style (`nav-tabs`, `nav-pills`,
|
|
35
|
+
`nav-underline`), width (`nav-fill`, `nav-justified`), alignment
|
|
36
|
+
(`justify-content-center`, `-end`) and a vertical layout, always or from a
|
|
37
|
+
breakpoint up (`d-{bp}-flex`, `flex-{bp}-column`). They are chosen in a
|
|
38
|
+
Tabs section of the container's settings panel, given to
|
|
39
|
+
`createContainer('tabs', { variant, width, align, vertical })`, or set for
|
|
40
|
+
the new ones with the `tabs` setting. While editing, each view shows the
|
|
41
|
+
layout its breakpoint has.
|
|
42
|
+
|
|
43
|
+
### Fixed
|
|
44
|
+
- A tab strip without `nav-tabs` - pills or underline written by hand - is
|
|
45
|
+
recognised as tabs.
|
|
46
|
+
|
|
8
47
|
## [8.0.0-beta.2] - 2026-09-29
|
|
9
48
|
|
|
10
49
|
### Added
|
package/README.md
CHANGED
|
@@ -560,13 +560,13 @@ __`element_tools`:__ Extra tools on every element drawer, same shape as `row_too
|
|
|
560
560
|
See [example/elements.html](example/elements.html), which also shows the
|
|
561
561
|
pattern for an element with no visual output of its own.
|
|
562
562
|
|
|
563
|
-
###
|
|
563
|
+
### Inline style
|
|
564
564
|
|
|
565
565
|
Inline css for rows, columns, containers, panes, elements and sections, and
|
|
566
566
|
Bootstrap's classes for it. A plugin:
|
|
567
567
|
|
|
568
568
|
```html
|
|
569
|
-
<script src="grid-editor/dist/plugins/grideditor.style.min.js"></script> <!-- after grideditor.elements -->
|
|
569
|
+
<script src="grid-editor/dist/plugins/grideditor.inline-style.min.js"></script> <!-- after grideditor.elements -->
|
|
570
570
|
```
|
|
571
571
|
|
|
572
572
|
Each of those nodes gets a *Style* accordion in its settings panel, between
|
|
@@ -606,11 +606,11 @@ the node also sets says which class takes priority.
|
|
|
606
606
|
With `settings_panel: 'popover'` or `'inline'` the panel has a *Style* button
|
|
607
607
|
instead, which opens the accordion in a dialog.
|
|
608
608
|
|
|
609
|
-
__`
|
|
609
|
+
__`inline_style`:__ Every section, unless you say otherwise.
|
|
610
610
|
|
|
611
611
|
```javascript
|
|
612
612
|
new GridEditor('#myGrid', {
|
|
613
|
-
|
|
613
|
+
inline_style: {
|
|
614
614
|
sections: {
|
|
615
615
|
position: false, // no Position section
|
|
616
616
|
border: { properties: ['border-width', 'border-color'], catalog: false }, // two fields, no chips
|
|
@@ -634,18 +634,18 @@ A node that is flex or grid in the view you are in - a column with `d-flex`,
|
|
|
634
634
|
a row with `flex-nowrap` - has its drawer on top, out of the flow, so the
|
|
635
635
|
canvas lays out its content as the page will.
|
|
636
636
|
|
|
637
|
-
See [example/style.html](example/style.html).
|
|
637
|
+
See [example/inline-style.html](example/inline-style.html).
|
|
638
638
|
|
|
639
639
|
### Responsive utilities
|
|
640
640
|
|
|
641
641
|
Bootstrap's responsive utility classes, edited per breakpoint. The grid's are
|
|
642
|
-
plugins of their own; the ones that style a node are the style plugin's, above.
|
|
642
|
+
plugins of their own; the ones that style a node are the inline-style plugin's, above.
|
|
643
643
|
|
|
644
644
|
```html
|
|
645
645
|
<script src="grid-editor/dist/plugins/grideditor.order.min.js"></script>
|
|
646
646
|
<script src="grid-editor/dist/plugins/grideditor.alignment.min.js"></script>
|
|
647
647
|
<script src="grid-editor/dist/plugins/grideditor.gutters.min.js"></script>
|
|
648
|
-
<script src="grid-editor/dist/plugins/grideditor.style.min.js"></script>
|
|
648
|
+
<script src="grid-editor/dist/plugins/grideditor.inline-style.min.js"></script>
|
|
649
649
|
```
|
|
650
650
|
|
|
651
651
|
| Plugin | Classes | On |
|
|
@@ -653,10 +653,10 @@ plugins of their own; the ones that style a node are the style plugin's, above.
|
|
|
653
653
|
| `order` | `order-{bp}-{first,0–5,last}` | columns |
|
|
654
654
|
| `alignment` | `align-self-{bp}-*` | columns |
|
|
655
655
|
| `gutters` | `g-{bp}-{0–5}`, `gx-{bp}-*`, `gy-{bp}-*` | rows |
|
|
656
|
-
| `style` | display, flex (a row's `justify-content-*` and `align-items-*` among it), spacing, text alignment, sticky and float; see [
|
|
656
|
+
| `inline-style` | display, flex (a row's `justify-content-*` and `align-items-*` among it), spacing, text alignment, sticky and float; see [Inline style](#inline-style) | rows, columns, elements, containers, texts |
|
|
657
657
|
|
|
658
658
|
A plugin puts a field in the *Responsive* section of each drawer's settings
|
|
659
|
-
panel - or, for the style plugin, in its section of the *Style* accordion -
|
|
659
|
+
panel - or, for the inline-style plugin, in its section of the *Style* accordion -
|
|
660
660
|
and some add a tool to the drawer. In a breakpoint view a change is
|
|
661
661
|
written for that breakpoint alone, and the field says what it inherits and from
|
|
662
662
|
where. In the all view it is written once, as the class with no breakpoint, and
|
|
@@ -777,6 +777,13 @@ __`plugins`:__ Which of the loaded plugins to use, containers, features and util
|
|
|
777
777
|
new GridEditor('#myGrid', { plugins: ['tabs', 'elements'] });
|
|
778
778
|
```
|
|
779
779
|
|
|
780
|
+
__`tabs`:__ The variant of the tabs containers made new, from the toolbar or with `createContainer`: `variant` (`'tabs'`, `'pills'` or `'underline'`), `width` (`'natural'`, `'fill'` or `'justified'`), `align` (`'start'`, `'center'` or `'end'`, with the natural width only) and `vertical` (`false`, `true`, or a breakpoint to go vertical from, `'md'`). Every tabs container also has a *Tabs* section in its settings panel, which changes its own. It is all Bootstrap's classes on the strip and the container, so a page's markup says it too - pills written by hand are tabs.
|
|
781
|
+
|
|
782
|
+
```javascript
|
|
783
|
+
new GridEditor('#myGrid', { tabs: { variant: 'pills', vertical: 'md' } }); // a side menu from tablet up
|
|
784
|
+
ge.createContainer('tabs', { variant: 'underline', width: 'fill' }); // an option given wins
|
|
785
|
+
```
|
|
786
|
+
|
|
780
787
|
__`container_tools`, `tab_tools`, `accordion_tools`:__ Extra tools on the container drawer and on each pane's drawer, same shape as `row_tools`.
|
|
781
788
|
|
|
782
789
|
```javascript
|
package/UPGRADING.md
CHANGED
|
@@ -4,16 +4,26 @@ Upgrading from grid-editor `7.x` to `8.0`
|
|
|
4
4
|
8.0 takes out what kept pages, plugins and options of earlier versions
|
|
5
5
|
working. Nothing it removes warns: an option that is gone is ignored like any
|
|
6
6
|
option the editor does not know. The jQuery adapter stays, and so does the
|
|
7
|
-
conversion of markup 5.x saved. `8.0.0
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
conversion of markup 5.x saved. From the `8.0.0` betas (on npm's `next`
|
|
8
|
+
tag), the one change to make is the first point below, the rename of the
|
|
9
|
+
style plugin.
|
|
10
|
+
|
|
11
|
+
* __The style plugin is `inline-style`.__ Its file is
|
|
12
|
+
`grideditor.inline-style.js` (`@themarioga/grid-editor/plugins/inline-style`
|
|
13
|
+
as a module), its name in `plugins` is `'inline-style'`, its setting is
|
|
14
|
+
`inline_style`, its locale keys are `inline_style.*` rather than `style.*`,
|
|
15
|
+
and its css classes and attributes are `ge-inline-style-*` rather than
|
|
16
|
+
`ge-style-*` - `[data-ge-inline-style-section="spacing"]` and the others.
|
|
17
|
+
What it does is the same. The old names are not an alias: `'style'` in
|
|
18
|
+
`plugins` is a plugin that is not loaded, and a `style` setting is not
|
|
19
|
+
read. This came in `8.0.0`, after the betas; the points below use the new
|
|
20
|
+
names.
|
|
11
21
|
* __The spacing, textalign, visibility and float plugins are gone.__ Load
|
|
12
|
-
`grideditor.style.js`, which has carried them since 7.3, and name it in the
|
|
22
|
+
`grideditor.inline-style.js`, which has carried them since 7.3, and name it in the
|
|
13
23
|
`plugins` setting: `'spacing'`, `'textalign'`, `'visibility'` and `'float'`
|
|
14
24
|
there are plugins that are not loaded now, and only get the usual warning.
|
|
15
25
|
* __`utilities.spacing` and `utilities.visibility` are not read.__ They are
|
|
16
|
-
`
|
|
26
|
+
`inline_style.spacing` and `inline_style.visibility`.
|
|
17
27
|
* __`replaces` on a plugin's factory does nothing.__ A plugin that stood in
|
|
18
28
|
for another is loaded beside it, like any two plugins.
|
|
19
29
|
* __`changeView`, `getUtility` and `setUtility` take a view key only.__ The
|
|
@@ -36,20 +46,20 @@ conversion of markup 5.x saved. `8.0.0-beta.2` is the first beta published
|
|
|
36
46
|
`warning.oninit_removed` and `warning.plugin_6x`. A locale of your own
|
|
37
47
|
can drop them.
|
|
38
48
|
|
|
39
|
-
|
|
49
|
+
8.0 also changes what the inline-style plugin edits:
|
|
40
50
|
|
|
41
51
|
* __The `visibility` utility is `display`.__ It edits every `d-{bp}-*`
|
|
42
52
|
value now, not only hidden and shown: `setUtility(node, 'display', 'none',
|
|
43
53
|
'md')`, and `before-utility` and `after-utility` say `family: 'display'`.
|
|
44
54
|
`'visibility'` is a family no plugin declares, and gets the usual warning.
|
|
45
|
-
The eye and `
|
|
46
|
-
* __A row's `justify-content-*` and `align-items-*` are the style plugin's.__
|
|
55
|
+
The eye and `inline_style.visibility.drawer` are as they were.
|
|
56
|
+
* __A row's `justify-content-*` and `align-items-*` are the inline-style plugin's.__
|
|
47
57
|
They are in its Flex section, on rows and on anything made flex, and the
|
|
48
58
|
alignment plugin keeps `align-self-*` only. A page that loads alignment
|
|
49
|
-
without style has no field for them: load `grideditor.style.js`.
|
|
59
|
+
without inline-style has no field for them: load `grideditor.inline-style.js`.
|
|
50
60
|
* __Locale keys:__ `utility.visibility` and `utility.visibility_shown` are
|
|
51
61
|
gone, and `utility.display` is new; `utility.justify_content` and
|
|
52
|
-
`utility.align_items` come with the style plugin now. The Flex section and
|
|
62
|
+
`utility.align_items` come with the inline-style plugin now. The Flex section and
|
|
53
63
|
sticky bring keys of their own, listed in
|
|
54
64
|
[docs/locale-keys.md](docs/locale-keys.md).
|
|
55
65
|
|