@themarioga/grid-editor 4.1.0 → 5.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.
Files changed (36) hide show
  1. package/CHANGELOG.md +53 -0
  2. package/README.md +68 -8
  3. package/UPGRADING.md +55 -0
  4. package/dist/grideditor.css +461 -0
  5. package/dist/grideditor.min.css +1 -1
  6. package/dist/grideditor.min.css.map +1 -1
  7. package/dist/jquery.grideditor.bundle.min.js +2 -2
  8. package/dist/jquery.grideditor.js +634 -109
  9. package/dist/jquery.grideditor.min.js +1 -1
  10. package/dist/jquery.grideditor.min.js.map +1 -1
  11. package/dist/locales/grideditor.es.js +26 -0
  12. package/dist/locales/grideditor.es.min.js +1 -1
  13. package/dist/locales/grideditor.es.min.js.map +1 -1
  14. package/dist/plugins/grideditor.float.js +56 -0
  15. package/dist/plugins/grideditor.float.min.js +2 -0
  16. package/dist/plugins/grideditor.float.min.js.map +1 -0
  17. package/dist/plugins/grideditor.sections.js +199 -0
  18. package/dist/plugins/grideditor.sections.min.js +2 -0
  19. package/dist/plugins/grideditor.sections.min.js.map +1 -0
  20. package/dist/plugins/grideditor.textalign.js +60 -0
  21. package/dist/plugins/grideditor.textalign.min.js +2 -0
  22. package/dist/plugins/grideditor.textalign.min.js.map +1 -0
  23. package/docs/events.md +13 -2
  24. package/docs/locale-keys.md +36 -1
  25. package/docs/plugins.md +35 -2
  26. package/example/autocols.html +137 -0
  27. package/example/breakpoints.html +7 -5
  28. package/example/index.html +16 -2
  29. package/example/utilities.html +22 -1
  30. package/package.json +1 -1
  31. package/src/js/jquery.grideditor.js +635 -110
  32. package/src/js/locales/grideditor.es.js +26 -0
  33. package/src/js/plugins/grideditor.float.js +56 -0
  34. package/src/js/plugins/grideditor.sections.js +199 -0
  35. package/src/js/plugins/grideditor.textalign.js +60 -0
  36. package/src/less/grideditor.less +132 -0
@@ -23,9 +23,10 @@
23
23
  new_row_layouts: [[12], [6,6], [4,4,4], [8,4]],
24
24
  content_types: [],
25
25
 
26
- // The default: every size and offset change is written to all
27
- // six breakpoints at once. Switch the dropdown to a single
28
- // breakpoint to tune that one on its own.
26
+ // The default: a size or offset change is written once, as the
27
+ // class with no breakpoint, and replaces what the breakpoints
28
+ // said. Switch the dropdown to a single breakpoint to tune
29
+ // that one on its own.
29
30
  default_view: 'all',
30
31
 
31
32
  // A host that wants the old three-mode feel can offer three
@@ -55,8 +56,9 @@
55
56
  <p class="form-text">
56
57
  The dropdown on the right of the toolbar picks the layout
57
58
  mode. In <strong>All sizes</strong> the canvas renders as
58
- the browser would, and the width and indent tools write
59
- every breakpoint at once. Pick a single breakpoint and the
59
+ the browser would, and the width and indent tools write one
60
+ class for every size (<code>col-4</code>), replacing what
61
+ the breakpoints had. Pick a single breakpoint and the
60
62
  canvas narrows to that tier's width, that tier's classes
61
63
  become the effective ones whatever your window is doing,
62
64
  and the tools write only that tier.
@@ -31,7 +31,13 @@
31
31
  editor and SortableJS in one file.
32
32
  </p>
33
33
  <p class="text-body-secondary">
34
- New in 4.1: utility plugins, which edit Bootstrap's responsive
34
+ New in 5.0: equal and auto columns, columns per row, and sections
35
+ for Bootstrap's containers &mdash; see
36
+ <a href="autocols.html">Column sizes and sections</a>. The
37
+ <em>All sizes</em> view now writes one class for every size.
38
+ </p>
39
+ <p class="text-body-secondary">
40
+ Since 4.1: utility plugins, which edit Bootstrap's responsive
35
41
  utility classes &mdash; visibility, column order, alignment,
36
42
  gutters and spacing &mdash; per breakpoint. See
37
43
  <a href="utilities.html">Responsive utilities</a>.
@@ -79,12 +85,20 @@
79
85
  <span class="text-body-secondary">The six breakpoints, the &ldquo;all sizes&rdquo; view, and resizing by dragging</span>
80
86
  </a>
81
87
 
88
+ <a class="list-group-item list-group-item-action" href="autocols.html">
89
+ <div class="d-flex justify-content-between">
90
+ <strong>Column sizes and sections</strong>
91
+ <code class="text-body-secondary">autocols.html</code>
92
+ </div>
93
+ <span class="text-body-secondary">Equal and auto columns, columns per row, and Bootstrap's containers as sections</span>
94
+ </a>
95
+
82
96
  <a class="list-group-item list-group-item-action" href="utilities.html">
83
97
  <div class="d-flex justify-content-between">
84
98
  <strong>Responsive utilities</strong>
85
99
  <code class="text-body-secondary">utilities.html</code>
86
100
  </div>
87
- <span class="text-body-secondary">Bootstrap's utility classes edited per breakpoint: visibility, column order, alignment, gutters and spacing</span>
101
+ <span class="text-body-secondary">Bootstrap's utility classes edited per breakpoint: visibility, column order, alignment, gutters, spacing, text alignment and float</span>
88
102
  </a>
89
103
 
90
104
  <a class="list-group-item list-group-item-action" href="locale.html">
@@ -23,6 +23,10 @@
23
23
  <script src="../dist/plugins/grideditor.alignment.min.js"></script>
24
24
  <script src="../dist/plugins/grideditor.gutters.min.js"></script>
25
25
  <script src="../dist/plugins/grideditor.spacing.min.js"></script>
26
+ <script src="../dist/plugins/grideditor.textalign.min.js"></script>
27
+ <!-- Float works on elements, so the elements plugin comes first -->
28
+ <script src="../dist/plugins/grideditor.elements.min.js"></script>
29
+ <script src="../dist/plugins/grideditor.float.min.js"></script>
26
30
 
27
31
  <script>
28
32
  $(function() {
@@ -101,6 +105,13 @@
101
105
  every panel, each a side and a value. The centred column
102
106
  below gets more padding from small desktop up.
103
107
  </p>
108
+ <p class="form-text">
109
+ <strong>Text alignment:</strong> a field in every panel.
110
+ The centred column's text is centred from small desktop
111
+ up. <strong>Float:</strong> a field in an element's panel;
112
+ the quote in the last row floats to the end from tablet up,
113
+ with the text flowing round it.
114
+ </p>
104
115
  <p class="form-text">Last change: <span id="last">none yet</span></p>
105
116
  <button class="btn btn-sm btn-secondary" id="output" type="button">Show the html this produces</button>
106
117
  <pre id="html" class="form-text"></pre>
@@ -132,12 +143,22 @@
132
143
  </div>
133
144
 
134
145
  <div class="row justify-content-md-center">
135
- <div class="col-12 col-md-6 py-2 py-md-4">
146
+ <div class="col-12 col-md-6 py-2 py-md-4 text-md-center">
136
147
  <h2 class="h5">Centred</h2>
137
148
  <p>Its row has <code>justify-content-md-center</code>, and it has <code>py-2 py-md-4</code>.</p>
138
149
  </div>
139
150
  </div>
140
151
 
152
+ <div class="row">
153
+ <div class="col-12">
154
+ <blockquote data-ge-element="quote" data-ge-label="Pull quote" class="float-sm-end ms-sm-3 p-3 border-start border-4">
155
+ A floated element, <code>float-sm-end</code>.
156
+ </blockquote>
157
+ <p>The text of the content area flows round the quote from tablet up, and runs under it on phones, where it does not float. Switch between Phone and Tablet in the dropdown to see it move, or choose another float in the element's panel.</p>
158
+ <p>A second paragraph, so there is enough text to flow.</p>
159
+ </div>
160
+ </div>
161
+
141
162
  </div> <!-- /#myGrid -->
142
163
  </div> <!-- /.container -->
143
164
 
package/package.json CHANGED
@@ -34,7 +34,7 @@
34
34
  "comment": "A scoped package publishes restricted unless it is told otherwise.",
35
35
  "access": "public"
36
36
  },
37
- "version": "4.1.0",
37
+ "version": "5.0.0",
38
38
  "main": "dist/jquery.grideditor.js",
39
39
  "files": [
40
40
  "dist",