@themarioga/grid-editor 8.7.1 → 8.8.1
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 +28 -0
- package/README.md +23 -6
- package/dist/grideditor.bundle.min.js +2 -2
- package/dist/grideditor.css +32 -0
- package/dist/grideditor.d.ts +44 -1
- package/dist/grideditor.esm.js +43 -5
- package/dist/grideditor.js +43 -5
- package/dist/grideditor.min.css +1 -1
- package/dist/grideditor.min.css.map +1 -1
- package/dist/grideditor.min.js +1 -1
- package/dist/grideditor.min.js.map +3 -3
- package/dist/locales/grideditor.es.esm.js +27 -0
- package/dist/locales/grideditor.es.js +27 -0
- package/dist/locales/grideditor.es.min.js +1 -1
- package/dist/locales/grideditor.es.min.js.map +2 -2
- package/dist/plugins/grideditor.carousel.esm.js +775 -0
- package/dist/plugins/grideditor.carousel.js +780 -0
- package/dist/plugins/grideditor.carousel.min.js +1 -0
- package/dist/plugins/grideditor.carousel.min.js.map +7 -0
- package/dist/plugins/grideditor.tabs.esm.js +4 -0
- package/dist/plugins/grideditor.tabs.js +4 -0
- package/dist/plugins/grideditor.tabs.min.js +1 -1
- package/dist/plugins/grideditor.tabs.min.js.map +2 -2
- package/docs/events.md +6 -3
- package/docs/locale-keys.md +29 -2
- package/docs/plugins.md +17 -14
- package/example/containers.html +48 -8
- package/package.json +1 -1
- package/src/js/grideditor.js +58 -17
- package/src/js/locales/grideditor.es.js +27 -0
- package/src/js/plugins/grideditor.carousel.js +780 -0
- package/src/js/plugins/grideditor.tabs.js +4 -0
- package/src/less/grideditor.less +35 -0
- package/types/grideditor.d.ts +44 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,34 @@ 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.8.1] - 2026-10-06
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
- tabs: `getHtml` gives the tabs without the editor's `ge-tab` class, which
|
|
12
|
+
it left on every tab since it was written. The canvas still uses it while
|
|
13
|
+
editing.
|
|
14
|
+
|
|
15
|
+
## [8.8.0] - 2026-10-06
|
|
16
|
+
|
|
17
|
+
### Added
|
|
18
|
+
- The carousel plugin, `dist/plugins/grideditor.carousel.js`: a Bootstrap 5
|
|
19
|
+
carousel whose slides are regions. One slide shows at a time, the arrows in
|
|
20
|
+
the container's drawer move between them and each slide's drawer moves it a
|
|
21
|
+
place; Bootstrap's own arrows and indicators are drawn but do not answer.
|
|
22
|
+
`getHtml` gives the carousel starting at the first slide.
|
|
23
|
+
- A carousel's options - arrows, indicators, fade, dark theme, autoplay and
|
|
24
|
+
its interval, pause, wrap, keyboard and touch - in a *Carousel* section of
|
|
25
|
+
its settings panel, in the `carousel` setting for the ones made new, and in
|
|
26
|
+
the options of `createContainer('carousel', …)`; a slide's own interval in
|
|
27
|
+
its settings panel. The setting `carousel_tools` adds host tools to a slide's
|
|
28
|
+
drawer.
|
|
29
|
+
- `addPane(container, options?)` adds a pane to a container of any type that
|
|
30
|
+
has them, and `addTab` and `addAccordionItem` stay as they were.
|
|
31
|
+
- For plugins: a container's definition can have `paneClass` and
|
|
32
|
+
`paneLabelKey`, which is how the editor names its panes in events and in
|
|
33
|
+
their settings panel; and `ge.suspendToggles` and `ge.resumeToggles` put
|
|
34
|
+
aside `data-bs-slide`, `data-bs-slide-to` and `data-bs-ride` as well.
|
|
35
|
+
|
|
8
36
|
## [8.7.1] - 2026-10-02
|
|
9
37
|
|
|
10
38
|
### Fixed
|
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Grid Editor
|
|
2
2
|
===========
|
|
3
3
|
|
|
4
|
-
Grid Editor is a visual javascript editor for the [bootstrap 5 grid system](https://getbootstrap.com/docs/5.3/layout/grid/), in plain DOM: no jQuery needed. You can create, drag, resize and delete rows and columns — sized in units, equal (`col`) or to their content (`col-auto`), or shared out by their row (`row-cols-*`) — indent them, group them in sections (`.container`), copy and paste them, and give each of bootstrap's six breakpoints its own layout — or edit them all at once, with a mouse or with a finger. Bootstrap's responsive utilities — display, flex, order, alignment, gutters, spacing, text alignment, sticky and float — are edited per breakpoint too, and any row, column, container or element can be given inline css, with Bootstrap's classes for it offered as chips. It also edits tabs, accordions, popups and cards, and any markup you mark as an element, and it tells your application about every change it makes.
|
|
4
|
+
Grid Editor is a visual javascript editor for the [bootstrap 5 grid system](https://getbootstrap.com/docs/5.3/layout/grid/), in plain DOM: no jQuery needed. You can create, drag, resize and delete rows and columns — sized in units, equal (`col`) or to their content (`col-auto`), or shared out by their row (`row-cols-*`) — indent them, group them in sections (`.container`), copy and paste them, and give each of bootstrap's six breakpoints its own layout — or edit them all at once, with a mouse or with a finger. Bootstrap's responsive utilities — display, flex, order, alignment, gutters, spacing, text alignment, sticky and float — are edited per breakpoint too, and any row, column, container or element can be given inline css, with Bootstrap's classes for it offered as chips. It also edits tabs, accordions, popups, carousels and cards, and any markup you mark as an element, and it tells your application about every change it makes.
|
|
5
5
|
|
|
6
6
|
This is a fork of [Friendly-Pixel/grid-editor](https://github.com/Friendly-Pixel/grid-editor)
|
|
7
7
|
by Simon Epskamp, carrying it on from 2.x. It is published as
|
|
@@ -27,7 +27,7 @@ from any web server, or from GitHub Pages, with no build step.
|
|
|
27
27
|
| [example/breakpoints.html](example/breakpoints.html) | The six breakpoints and the "all sizes" view | [live](https://themarioga.github.io/grid-editor/example/breakpoints.html) |
|
|
28
28
|
| [example/plugins.html](example/plugins.html) | The plugin model, with one written in the page itself | [live](https://themarioga.github.io/grid-editor/example/plugins.html) |
|
|
29
29
|
| [example/attributes.html](example/attributes.html) | A plugin of your own: a drawer tool, a modal, and its settings saved as an attribute | [live](https://themarioga.github.io/grid-editor/example/attributes.html) |
|
|
30
|
-
| [example/containers.html](example/containers.html) | Tabs, accordions, popups and cards, two levels deep | [live](https://themarioga.github.io/grid-editor/example/containers.html) |
|
|
30
|
+
| [example/containers.html](example/containers.html) | Tabs, accordions, popups, carousels and cards, two levels deep | [live](https://themarioga.github.io/grid-editor/example/containers.html) |
|
|
31
31
|
| [example/elements.html](example/elements.html) | Element level controls, including an element with no visual output | [live](https://themarioga.github.io/grid-editor/example/elements.html) |
|
|
32
32
|
| [example/autocols.html](example/autocols.html) | Equal and auto columns, columns per row, and sections | [live](https://themarioga.github.io/grid-editor/example/autocols.html) |
|
|
33
33
|
| [example/utilities.html](example/utilities.html) | Bootstrap's responsive utilities, edited per breakpoint | [live](https://themarioga.github.io/grid-editor/example/utilities.html) |
|
|
@@ -190,9 +190,10 @@ has, with the options it was made with, and warns once.
|
|
|
190
190
|
| `createSection` | `options?` | `Element` | A section, with the sections plugin. `options`: `width` (`'fixed'`, `'fluid'` or a breakpoint), `rows` (layouts), and a placement |
|
|
191
191
|
| `createElement` | `content`, `options?` | `Element` | Host markup wrapped as an element. `options`: `type`, `label` |
|
|
192
192
|
| `createText` | `type?`, `options?` | `Element` | A content area for a text editor, the first one offered by default. `options`: `content`, and a placement. `null` if the editor is not loaded, or no text editor is |
|
|
193
|
-
| `createContainer` | `type`, `options?` | `Element` | `'tabs'`, `'accordion'` or `'
|
|
193
|
+
| `createContainer` | `type`, `options?` | `Element` | `'tabs'`, `'accordion'`, `'popup'`, `'carousel'` or `'card'` |
|
|
194
194
|
| `addTab` | `container`, `options?` | `Element` | Appends a tab, returns its pane |
|
|
195
195
|
| `addAccordionItem` | `container`, `options?` | `Element` | Appends an item, returns its body |
|
|
196
|
+
| `addPane` | `container`, `options?` | `Element` | Appends a pane to a container of any type that has them - a tab, an item, a carousel slide, whose `options.interval` is its time in milliseconds - and returns it. `null`, and a warning, for a node that is not one |
|
|
196
197
|
| `getUtility` | `node`, `family`, `view?` | `String` | A utility plugin's value on a node in a view (the current one by default), or `null` |
|
|
197
198
|
| `setUtility` | `node`, `family`, `value`, `view?` | `Boolean` | Write it through the events; `null` is inherit. `false` if canceled or nothing changed |
|
|
198
199
|
|
|
@@ -893,8 +894,8 @@ place to keep work.
|
|
|
893
894
|
|
|
894
895
|
### Containers
|
|
895
896
|
|
|
896
|
-
Tabs, accordions, popups and cards. A tabs, accordion
|
|
897
|
-
panes; a card holds one region. Either way a region is an ordinary one: rows,
|
|
897
|
+
Tabs, accordions, popups, carousels and cards. A tabs, accordion, popup or
|
|
898
|
+
carousel container holds panes; a card holds one region. Either way a region is an ordinary one: rows,
|
|
898
899
|
columns, content areas and elements nest inside it exactly as they do at the
|
|
899
900
|
top level.
|
|
900
901
|
|
|
@@ -906,6 +907,7 @@ it available:
|
|
|
906
907
|
<script src="grid-editor/dist/plugins/grideditor.tabs.min.js"></script>
|
|
907
908
|
<script src="grid-editor/dist/plugins/grideditor.accordion.min.js"></script>
|
|
908
909
|
<script src="grid-editor/dist/plugins/grideditor.popup.min.js"></script>
|
|
910
|
+
<script src="grid-editor/dist/plugins/grideditor.carousel.min.js"></script>
|
|
909
911
|
<script src="grid-editor/dist/plugins/grideditor.card.min.js"></script>
|
|
910
912
|
```
|
|
911
913
|
|
|
@@ -925,7 +927,15 @@ new GridEditor('#myGrid', { tabs: { variant: 'pills', vertical: 'md' } }); //
|
|
|
925
927
|
ge.createContainer('tabs', { variant: 'underline', width: 'fill' }); // an option given wins
|
|
926
928
|
```
|
|
927
929
|
|
|
928
|
-
__`
|
|
930
|
+
__`carousel`:__ The options of the carousels made new, from the toolbar or with `createContainer`, as Bootstrap has them: `controls` and `indicators` (the arrows and the dots, both `true`), `fade`, `dark` (`data-bs-theme="dark"`), `ride` (`false`, `'carousel'` to start on load, or `'true'` to start after the first interaction), `interval` (milliseconds, 1000 or more, `null` for Bootstrap's own), `pause`, `wrap`, `keyboard` and `touch` (all `true`), and `slides` (how many, 2). A value a key does not take is warned about and its default used. Every carousel also has a *Carousel* section in its settings panel, which changes its own, and every slide an interval in its own. It is all Bootstrap's classes and attributes, so a page's markup says it too.
|
|
931
|
+
|
|
932
|
+
```javascript
|
|
933
|
+
new GridEditor('#myGrid', { carousel: { fade: true, ride: 'carousel', interval: 4000 } });
|
|
934
|
+
ge.createContainer('carousel', { slides: 3, controls: false }); // an option given wins
|
|
935
|
+
ge.addPane(carousel, { interval: 8000 }); // a slide that stays for 8 seconds
|
|
936
|
+
```
|
|
937
|
+
|
|
938
|
+
__`container_tools`, `tab_tools`, `accordion_tools`, `carousel_tools`:__ Extra tools on the container drawer and on each pane's drawer, same shape as `row_tools`.
|
|
929
939
|
|
|
930
940
|
```javascript
|
|
931
941
|
var tabs = ge.createContainer('tabs', {
|
|
@@ -951,6 +961,13 @@ the trigger. Any node in the canvas carrying
|
|
|
951
961
|
`data-ge-popup-target="<popup id>"` is a trigger too — grid-editor leaves your
|
|
952
962
|
markup alone and writes Bootstrap's attributes onto it in the output.
|
|
953
963
|
|
|
964
|
+
A carousel shows one slide at a time while editing, as it does on the page.
|
|
965
|
+
The container's drawer has the arrows and says which slide it is on, and
|
|
966
|
+
Bootstrap's own arrows and indicators are drawn but do not answer: the editor
|
|
967
|
+
puts the attributes Bootstrap's javascript acts on aside, so an autoplay never
|
|
968
|
+
starts over the canvas. Each slide's drawer moves it a place back or on. What
|
|
969
|
+
`getHtml` gives starts at the first slide, whichever one the canvas was on.
|
|
970
|
+
|
|
954
971
|
See [example/containers.html](example/containers.html).
|
|
955
972
|
|
|
956
973
|
### Localization
|