@themarioga/grid-editor 8.8.0 → 8.8.2

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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/js/register.js", "../../src/js/dom.js", "../../src/js/plugins/grideditor.tabs.js"],
4
- "sourcesContent": ["/**\n * What a plugin's or a locale's classic script imports in place of the\n * editor: the GridEditor the page already loaded.\n *\n * The build points `import { GridEditor } from '../grideditor.js'` here for\n * the classic scripts, so each registers on the editor the page has rather\n * than bringing its own. Loaded before the editor there is nothing to\n * register on, and saying so is better than a TypeError three calls later.\n */\nvar GridEditor = window.GridEditor;\n\nif (!GridEditor || typeof GridEditor.get !== 'function') {\n throw new Error('grid-editor: load grideditor.js (or grideditor.bundle.min.js) before its plugins, ' +\n 'its locales and grideditor.jquery.js');\n}\n\nexport { GridEditor };\nexport default GridEditor;\n", "/**\n * The DOM, the way grid-editor uses it.\n *\n * Small helpers over the browser's own API, for the core and the shipped\n * plugins. Not a public API: a plugin of a host's own is free to write its\n * DOM code however it likes, and this file makes no promise to it.\n *\n * Stateless on purpose. The build puts a copy of this file in each plugin's\n * classic script, so anything kept here would be kept once per copy; a\n * module that needs to remember something about a node keeps its own\n * WeakMap.\n */\n\n/** Every element under `root` matching `selector`, as an array. */\nexport function all(root, selector) {\n return root ? Array.prototype.slice.call(root.querySelectorAll(selector)) : [];\n}\n\n/** The first element under `root` matching `selector`, or null. */\nexport function one(root, selector) {\n return root ? root.querySelector(selector) : null;\n}\n\n/** `root` itself when it matches, then every element under it that does. */\nexport function selfAndAll(root, selector) {\n if (!root) { return []; }\n\n var found = all(root, selector);\n if (root.nodeType === 1 && root.matches(selector)) { found.unshift(root); }\n return found;\n}\n\n/** The element children of `node`, those matching `selector` if one is given. */\nexport function children(node, selector) {\n if (!node) { return []; }\n\n return Array.prototype.filter.call(node.children, function(each) {\n return !selector || each.matches(selector);\n });\n}\n\n/** The first element child matching `selector`, or null. */\nexport function child(node, selector) {\n return children(node, selector)[0] || null;\n}\n\n/** The nearest ancestor-or-self matching `selector` below `stopAt`, or null. */\nexport function closest(node, selector, stopAt) {\n var found = node && node.nodeType === 1 ? node.closest(selector) : null;\n\n if (found && stopAt && found !== stopAt && !stopAt.contains(found)) { return null; }\n return found;\n}\n\n/** Whether `node` is an element matching `selector`. */\nexport function is(node, selector) {\n return !!node && node.nodeType === 1 && node.matches(selector);\n}\n\n/** Whether `node` is in the document. */\nexport function attached(node) {\n return !!node && document.documentElement.contains(node);\n}\n\n/** The element siblings after `node` that match `selector`. */\nexport function nextAll(node, selector) {\n var found = [];\n\n for (var next = node.nextElementSibling; next; next = next.nextElementSibling) {\n if (!selector || next.matches(selector)) { found.push(next); }\n }\n return found;\n}\n\n/** The ancestors of `node` up to, and not including, `stop`, nearest first. */\nexport function parentsUntil(node, stop) {\n var found = [];\n\n for (var parent = node.parentElement; parent && parent !== stop; parent = parent.parentElement) {\n found.push(parent);\n }\n return found;\n}\n\n/**\n * The nodes the html parses into, detached. Parsed the way innerHTML parses,\n * so a <script> in it never runs, here or once it is in the page.\n */\nexport function parse(html) {\n var template = document.createElement('template');\n template.innerHTML = html;\n return Array.prototype.slice.call(template.content.childNodes);\n}\n\n/** The one element the html is, detached. */\nexport function create(html) {\n var nodes = parse(html.trim());\n\n for (var i = 0; i < nodes.length; i++) {\n if (nodes[i].nodeType === 1) { return nodes[i]; }\n }\n return null;\n}\n\n/** An element of `tag`, with `attributes` and `text`. */\nexport function element(tag, attributes, text) {\n var node = document.createElement(tag);\n\n Object.keys(attributes || {}).forEach(function(name) {\n var value = attributes[name];\n if (value !== null && value !== undefined && value !== false) { node.setAttribute(name, value); }\n });\n if (text !== undefined && text !== null) { node.textContent = text; }\n\n return node;\n}\n\n/** Replace what `node` holds with `html`. A <script> in it does not run. */\nexport function setHtml(node, html) {\n node.innerHTML = html === undefined || html === null ? '' : String(html);\n return node;\n}\n\n/** Add one or several space separated classes. */\nexport function addClass(node, names) {\n split(names).forEach(function(name) { node.classList.add(name); });\n return node;\n}\n\nexport function removeClass(node, names) {\n split(names).forEach(function(name) { node.classList.remove(name); });\n return node;\n}\n\n/** Each class on, or off, or flipped when `on` is not given. */\nexport function toggleClass(node, names, state) {\n split(names).forEach(function(name) {\n if (state === undefined) {\n node.classList.toggle(name);\n } else {\n node.classList.toggle(name, !!state);\n }\n });\n return node;\n}\n\nexport function hasClass(node, name) {\n return !!node && node.nodeType === 1 && node.classList.contains(name);\n}\n\nfunction split(names) {\n return String(names || '').split(/\\s+/).filter(Boolean);\n}\n\n/** Take the class attribute off when there is nothing left in it. */\nexport function dropEmptyClass(node) {\n if (!node.getAttribute('class')) { node.removeAttribute('class'); }\n return node;\n}\n\n/** Take the style attribute off when there is nothing left in it. */\nexport function dropEmptyStyle(node) {\n if (!node.getAttribute('style')) { node.removeAttribute('style'); }\n return node;\n}\n\n/** Set attributes; a null or undefined value takes the attribute off. */\nexport function attr(node, attributes) {\n Object.keys(attributes).forEach(function(name) {\n var value = attributes[name];\n\n if (value === null || value === undefined) {\n node.removeAttribute(name);\n } else {\n node.setAttribute(name, value);\n }\n });\n return node;\n}\n\n/**\n * Inline styles, by css property name. A number is pixels for the properties\n * that take a length, as jQuery had it; an empty string takes one off.\n */\nexport function css(node, styles) {\n Object.keys(styles).forEach(function(property) {\n var value = styles[property];\n\n if (typeof value === 'number' && !UNITLESS[property]) { value = value + 'px'; }\n node.style.setProperty(property, value === null || value === undefined ? '' : String(value));\n });\n return node;\n}\n\nvar UNITLESS = { opacity: true, 'z-index': true, 'flex-grow': true, 'flex-shrink': true, order: true };\n\n/** What an element of this tag shows as when nothing hides it. */\nvar defaultDisplays = {};\n\nfunction defaultDisplay(node) {\n var tag = node.nodeName;\n\n if (!defaultDisplays[tag]) {\n var probe = document.body.appendChild(document.createElement(tag));\n defaultDisplays[tag] = getComputedStyle(probe).display;\n probe.remove();\n if (defaultDisplays[tag] === 'none') { defaultDisplays[tag] = 'block'; }\n }\n return defaultDisplays[tag];\n}\n\n/** Show a node: its inline display:none off, and a display of its own if a stylesheet hides it. */\nexport function show(node) {\n node.style.removeProperty('display');\n if (getComputedStyle(node).display === 'none') { node.style.display = defaultDisplay(node); }\n return node;\n}\n\nexport function hide(node) {\n node.style.display = 'none';\n return node;\n}\n\n/** Show or hide; flip when `on` is not given. */\nexport function toggle(node, state) {\n if (state === undefined) { state = !visible(node); }\n return state ? show(node) : hide(node);\n}\n\n/** Whether a node takes up room: what jQuery's :visible meant. */\nexport function visible(node) {\n return !!(node.offsetWidth || node.offsetHeight || node.getClientRects().length);\n}\n\n/** The border box's width, fractions included. */\nexport function outerWidth(node) {\n return node.getBoundingClientRect().width;\n}\n\nexport function outerHeight(node) {\n return node.getBoundingClientRect().height;\n}\n\n/** The content box's height, which is what jQuery's height() gave. */\nexport function contentHeight(node) {\n var style = getComputedStyle(node);\n return node.clientHeight - parseFloat(style.paddingTop) - parseFloat(style.paddingBottom);\n}\n\n/** Where a node is on the page, not in the window. */\nexport function offset(node) {\n var box = node.getBoundingClientRect();\n return { top: box.top + window.pageYOffset, left: box.left + window.pageXOffset };\n}\n\n/** Its index among its parent's element children, those matching `selector` if given. */\nexport function indexIn(node, selector) {\n return children(node.parentElement, selector).indexOf(node);\n}\n\n/** Put `node` right after `reference`. */\nexport function insertAfter(node, reference) {\n reference.parentNode.insertBefore(node, reference.nextSibling);\n return node;\n}\n\n/** Replace `node` with what it holds. */\nexport function unwrap(node) {\n var parent = node.parentNode;\n\n while (node.firstChild) { parent.insertBefore(node.firstChild, node); }\n node.remove();\n}\n\n/** Put `node` inside `wrapper`, where `node` was. */\nexport function wrap(node, wrapper) {\n node.parentNode.insertBefore(wrapper, node);\n wrapper.appendChild(node);\n return wrapper;\n}\n\n/**\n * Listen on `root` for `types` (space separated) on descendants that match\n * `selector`, with `this` the matched element, as jQuery's delegated\n * handlers had it. Hands back the listener, for removeEventListener; a\n * signal in `options` removes it too.\n */\nexport function delegate(root, types, selector, handler, options) {\n var listener = function(event) {\n var match = closest(event.target, selector, root);\n if (match && root.contains(match)) { return handler.call(match, event); }\n return undefined;\n };\n\n split(types).forEach(function(type) { root.addEventListener(type, listener, options); });\n return listener;\n}\n\n/** Listen for several space separated event types with one handler. */\nexport function on(target, types, handler, options) {\n split(types).forEach(function(type) { target.addEventListener(type, handler, options); });\n return handler;\n}\n\nexport function off(target, types, handler, options) {\n split(types).forEach(function(type) { target.removeEventListener(type, handler, options); });\n}\n\n/** A mouse event of `type` sent to `node`, the way a pointer would. */\nexport function fire(node, type) {\n node.dispatchEvent(new MouseEvent(type, { bubbles: type !== 'mouseenter' && type !== 'mouseleave' }));\n}\n\n/* ------------------------------------------------------------------\n * Taking a node away, visibly.\n *\n * The durations are jQuery's: 400 ms unless the caller says otherwise. `done` runs once the node is out of sight, which is\n * when the caller removes it; a node that is already out of sight is done at\n * once, on the next task, as jQuery had it.\n * ------------------------------------------------------------------ */\n\nvar DEFAULT_DURATION = 400;\n\nfunction animateAway(node, frames, duration, done) {\n duration = duration === undefined ? DEFAULT_DURATION : duration;\n\n var finish = function() {\n hide(node);\n if (done) { done(); }\n };\n\n if (!visible(node) || !node.animate || duration <= 0) {\n window.setTimeout(finish, 0);\n return;\n }\n\n var animation = node.animate(frames(getComputedStyle(node)), {\n duration: duration,\n easing: 'ease-in-out',\n });\n var called = false;\n var once = function() {\n if (called) { return; }\n called = true;\n finish();\n };\n\n animation.onfinish = once;\n animation.oncancel = once;\n}\n\n/** Fold a node up to nothing, then hide it. */\nexport function slideUp(node, duration, done) {\n if (typeof duration === 'function') {\n done = duration;\n duration = undefined;\n }\n\n node.style.overflow = 'hidden';\n animateAway(node, function(style) {\n return [\n {\n height: style.height,\n paddingTop: style.paddingTop,\n paddingBottom: style.paddingBottom,\n marginTop: style.marginTop,\n marginBottom: style.marginBottom,\n },\n { height: '0px', paddingTop: '0px', paddingBottom: '0px', marginTop: '0px', marginBottom: '0px' },\n ];\n }, duration, function() {\n node.style.removeProperty('overflow');\n if (done) { done(); }\n });\n}\n\n/** Fade a node out, then hide it. */\nexport function fadeOut(node, duration, done) {\n animateAway(node, function(style) {\n return [{ opacity: style.opacity }, { opacity: 0 }];\n }, duration, done);\n}\n\n/** Fade and fold a node, in height and, with `width`, sideways too, then hide it. */\nexport function shrinkAway(node, duration, done, width) {\n node.style.overflow = 'hidden';\n animateAway(node, function(style) {\n var from = { opacity: style.opacity, height: style.height };\n var to = { opacity: 0, height: '0px' };\n\n if (width) {\n from.width = style.width;\n to.width = '0px';\n }\n return [from, to];\n }, duration, function() {\n node.style.removeProperty('overflow');\n if (done) { done(); }\n });\n}\n", "/**\n * Tabs for grid-editor.\n *\n * A container plugin: load this file after the editor and the toolbar offers\n * a tabs container. What it can ask the editor for is the handle its factory is\n * called with, described in docs/plugins.md.\n *\n * <script src=\"dist/grideditor.min.js\"></script>\n * <script src=\"dist/plugins/grideditor.tabs.min.js\"></script>\n *\n * A container's variant - its style, width, alignment and whether it is laid\n * out vertically, from a breakpoint up - is Bootstrap's classes on its strip\n * and on itself, and nothing else: it is read from the markup, chosen in the\n * container's settings panel, or given to createContainer and the tabs\n * setting for the ones made new.\n */\nimport { GridEditor } from '../grideditor.js';\nimport * as dom from '../dom.js';\n\nObject.assign(GridEditor.locales.en, {\n 'container.add_tabs': 'Tabs',\n 'container.add_tab': 'Add tab',\n 'container.tab_label': 'Tab {number}',\n 'confirm.delete_tab': 'Delete this tab and everything in it?',\n 'container.tabs_section': 'Tabs',\n 'container.tabs_style': 'Style',\n 'container.tabs_style_tabs': 'Tabs',\n 'container.tabs_style_pills': 'Pills',\n 'container.tabs_style_underline': 'Underline',\n 'container.tabs_width': 'Width',\n 'container.tabs_width_natural': 'Natural',\n 'container.tabs_width_fill': 'Fill',\n 'container.tabs_width_justified': 'Justified',\n 'container.tabs_align': 'Alignment',\n 'container.tabs_align_start': 'Start',\n 'container.tabs_align_center': 'Center',\n 'container.tabs_align_end': 'End',\n 'container.tabs_layout': 'Layout',\n 'container.tabs_layout_horizontal': 'Horizontal',\n 'container.tabs_layout_vertical': 'Vertical',\n 'container.tabs_layout_vertical_from': 'Vertical from {breakpoint}',\n});\n\n/** Each variant's values, the first its default, and the class each puts on the strip. */\nvar STYLES = { tabs: 'nav-tabs', pills: 'nav-pills', underline: 'nav-underline' };\nvar WIDTHS = { natural: null, fill: 'nav-fill', justified: 'nav-justified' };\nvar ALIGNS = { start: null, center: 'justify-content-center', end: 'justify-content-end' };\nvar DEFAULTS = { variant: 'tabs', width: 'natural', align: 'start', vertical: false };\n\n/** Each variant's select in the panel: its label, and its choices'. */\nvar FIELDS = {\n variant: { labelKey: 'container.tabs_style', choices: [\n { value: 'tabs', labelKey: 'container.tabs_style_tabs' },\n { value: 'pills', labelKey: 'container.tabs_style_pills' },\n { value: 'underline', labelKey: 'container.tabs_style_underline' },\n ] },\n width: { labelKey: 'container.tabs_width', choices: [\n { value: 'natural', labelKey: 'container.tabs_width_natural' },\n { value: 'fill', labelKey: 'container.tabs_width_fill' },\n { value: 'justified', labelKey: 'container.tabs_width_justified' },\n ] },\n align: { labelKey: 'container.tabs_align', choices: [\n { value: 'start', labelKey: 'container.tabs_align_start' },\n { value: 'center', labelKey: 'container.tabs_align_center' },\n { value: 'end', labelKey: 'container.tabs_align_end' },\n ] },\n vertical: { labelKey: 'container.tabs_layout' },\n};\n\nvar fieldCounter = 0;\n\n/** Where the layout marks what the view being edited lays the tabs out as. */\nvar LAYOUT_ATTR = 'data-ge-tabs-layout';\n\nfunction classValues(map) {\n return Object.keys(map).map(function(key) { return map[key]; }).filter(Boolean);\n}\n\nGridEditor.containers.tabs = function(ge) {\n\n var sections = []; // { container, render } for every panel section built\n\n /** The strip: the container's first .nav, whatever its style. */\n function stripOf(container) {\n return dom.child(container, '.nav');\n }\n\n /** The breakpoints a layout can go vertical from; xs is always. */\n function fromBreakpoints() {\n return ge.breakpoints.slice(1);\n }\n\n /** The infix of a vertical layout's classes: none for always. */\n function infix(vertical) {\n return vertical === true ? '' : '-' + vertical;\n }\n\n function verticalClasses(vertical) {\n var at = infix(vertical);\n\n return {\n container: ['d' + at + '-flex', 'align-items' + at + '-start'],\n strip: ['flex' + at + '-column', 'me' + at + '-3'],\n };\n }\n\n /** Every vertical value: always, and from each breakpoint. */\n function verticals() {\n return [true].concat(fromBreakpoints());\n }\n\n /**\n * What a container's classes say it is. Vertical is read only when the\n * container's flex and the strip's column are of the same breakpoint;\n * anything else is horizontal, and is left as it is.\n */\n function read(container) {\n var strip = stripOf(container);\n var has = function(node, name) { return !!node && dom.hasClass(node, name); };\n var found = function(map, fallback) {\n return Object.keys(map).filter(function(key) { return map[key] && has(strip, map[key]); })[0] || fallback;\n };\n\n var vertical = verticals().filter(function(each) {\n var classes = verticalClasses(each);\n return has(container, classes.container[0]) && has(strip, classes.strip[0]);\n })[0];\n\n return {\n variant: found(STYLES, 'tabs'),\n width: found(WIDTHS, 'natural'),\n align: found(ALIGNS, 'start'),\n vertical: vertical === undefined ? false : vertical,\n };\n }\n\n /**\n * Write one variant, and take off what it makes meaningless: a vertical\n * layout has no width or alignment, and a full width no alignment.\n * Choosing a layout clears every layout class, at any breakpoint, the\n * user's own included.\n */\n function write(container, key, value) {\n var strip = stripOf(container);\n if (!strip) { return; }\n\n if (key === 'variant') {\n dom.removeClass(strip, classValues(STYLES).join(' '));\n dom.addClass(strip, STYLES[value]);\n }\n\n if (key === 'width' || key === 'vertical') {\n dom.removeClass(strip, classValues(WIDTHS).join(' '));\n if (key === 'width' && WIDTHS[value]) { dom.addClass(strip, WIDTHS[value]); }\n }\n\n if (key === 'align' || key === 'vertical' || (key === 'width' && value !== 'natural')) {\n dom.removeClass(strip, classValues(ALIGNS).join(' '));\n if (key === 'align' && ALIGNS[value]) { dom.addClass(strip, ALIGNS[value]); }\n }\n\n if (key === 'vertical') {\n verticals().forEach(function(each) {\n var classes = verticalClasses(each);\n dom.removeClass(container, classes.container.join(' '));\n dom.removeClass(strip, classes.strip.join(' '));\n });\n strip.removeAttribute('aria-orientation');\n\n if (value !== false) {\n var layout = verticalClasses(value);\n dom.addClass(container, layout.container.join(' '));\n dom.addClass(strip, layout.strip.join(' '));\n strip.setAttribute('aria-orientation', 'vertical');\n }\n }\n\n dom.dropEmptyClass(container);\n }\n\n /** The values a variant takes, as the warning lists them. */\n function valuesOf(key) {\n if (key === 'variant') { return Object.keys(STYLES); }\n if (key === 'width') { return Object.keys(WIDTHS); }\n if (key === 'align') { return Object.keys(ALIGNS); }\n\n return [false].concat(verticals());\n }\n\n /**\n * A variant for a new container: the option, or the tabs setting, or the\n * default. A value it does not take is warned about and the default used.\n */\n function chosen(options, key) {\n var setting = ge.settings.tabs || {};\n var value = options[key] !== undefined ? options[key] : setting[key];\n\n if (value === undefined) { return DEFAULTS[key]; }\n if (valuesOf(key).indexOf(value) !== -1) { return value; }\n\n ge.warn('tabs: ' + JSON.stringify(value) + ' is not a ' + key + ', which takes ' +\n JSON.stringify(valuesOf(key)) + ': ' + JSON.stringify(DEFAULTS[key]) + ' is used');\n return DEFAULTS[key];\n }\n\n /**\n * What the view being edited lays a container out as. A breakpoint view\n * narrows the canvas, not the window, and Bootstrap's classes answer to\n * the window: so the view says it, from the breakpoint the container\n * goes vertical at. The all view shows what the window gives.\n */\n function layoutHere(container) {\n var vertical = read(container).vertical;\n if (vertical === false) { return null; }\n\n if (ge.view() === 'all') {\n container.removeAttribute(LAYOUT_ATTR);\n return /flex$/.test(getComputedStyle(container).display) ? 'vertical' : 'horizontal';\n }\n if (vertical === true) { return 'vertical'; }\n\n return ge.breakpoints.indexOf(ge.view()) >= ge.breakpoints.indexOf(vertical) ? 'vertical' : 'horizontal';\n }\n\n function markLayout(container) {\n var layout = layoutHere(container);\n\n if (layout) {\n container.setAttribute(LAYOUT_ATTR, layout);\n } else {\n container.removeAttribute(LAYOUT_ATTR);\n }\n }\n\n function select(labelKey, options, onChange) {\n var box = dom.element('div', { 'class': 'ge-tabs-variant' });\n var id = 'ge-tabs-variant-' + (++fieldCounter);\n\n box.appendChild(dom.element('label', { 'class': 'form-label', 'for': id }, ge.t(labelKey)));\n var field = box.appendChild(dom.element('select', { 'class': 'form-select form-select-sm', id: id }));\n\n options.forEach(function(option) {\n field.appendChild(dom.element('option', { value: option.value }, option.label));\n });\n field.addEventListener('change', function() { onChange(field.value); });\n\n return { box: box, field: field };\n }\n\n /** The Tabs section of a tabs container's settings panel: a select per variant. */\n function createSection(container) {\n var body = dom.element('div', { 'class': 'ge-tabs-variants' });\n var fields = {};\n\n function change(key, value) {\n write(container, key, value);\n markLayout(container);\n render();\n }\n\n function options(key) {\n return FIELDS[key].choices.map(function(choice) {\n return { value: choice.value, label: ge.t(choice.labelKey) };\n });\n }\n\n ['variant', 'width', 'align'].forEach(function(key) {\n fields[key] = select(FIELDS[key].labelKey, options(key), function(value) { change(key, value); });\n });\n fields.vertical = select(FIELDS.vertical.labelKey, [\n { value: 'false', label: ge.t('container.tabs_layout_horizontal') },\n { value: 'true', label: ge.t('container.tabs_layout_vertical') },\n ].concat(fromBreakpoints().map(function(key) {\n return { value: key, label: ge.t('container.tabs_layout_vertical_from', { breakpoint: key }) };\n })), function(value) {\n change('vertical', value === 'true' ? true : value === 'false' ? false : value);\n });\n\n ['variant', 'width', 'align', 'vertical'].forEach(function(key) {\n fields[key].box.setAttribute('data-ge-tabs-variant', key);\n body.appendChild(fields[key].box);\n });\n\n /** Fill the selects from the classes, and turn off what does not apply. */\n function render() {\n var values = read(container);\n\n fields.variant.field.value = values.variant;\n fields.width.field.value = values.width;\n fields.align.field.value = values.align;\n fields.vertical.field.value = String(values.vertical);\n fields.width.field.disabled = values.vertical !== false;\n fields.align.field.disabled = values.vertical !== false || values.width !== 'natural';\n }\n\n render();\n sections.push({ container: container, element: body, render: render });\n\n return body;\n }\n\n function addTabTo(container, options) {\n options = options || {};\n\n var strip = stripOf(container);\n var content = dom.one(container, ':scope > .tab-content');\n var id = ge.containerId('tab');\n var number = dom.children(strip, '.nav-item').length + 1;\n\n var tab = strip.appendChild(dom.element('li', { 'class': 'nav-item ge-tab', role: 'presentation' }));\n var button = tab.appendChild(dom.element('button', {\n 'class': 'nav-link',\n type: 'button',\n role: 'tab',\n 'data-bs-toggle': 'tab',\n 'data-bs-target': '#' + id,\n 'aria-controls': id,\n }));\n button.appendChild(dom.element('span', { 'class': 'ge-pane-label' },\n options.label || ge.t('container.tab_label', { number: number })));\n\n var pane = content.appendChild(dom.element('div', {\n 'class': 'tab-pane fade',\n role: 'tabpanel',\n tabindex: '0',\n id: id,\n }));\n pane.appendChild(ge.defaultRegion());\n\n if (options.activate || number === 1) { activatePane(container, pane); }\n\n return pane;\n }\n\n function activatePane(container, pane) {\n var id = pane.getAttribute('id');\n\n dom.all(container, ':scope > .tab-content > .tab-pane').forEach(function(each) {\n dom.removeClass(each, 'show active');\n });\n dom.addClass(pane, 'show active');\n\n dom.all(stripOf(container) || container, '.nav-link').forEach(function(button) {\n var active = button.getAttribute('data-bs-target') === '#' + id;\n\n dom.toggleClass(button, 'active', active);\n button.setAttribute('aria-selected', active ? 'true' : 'false');\n });\n }\n\n function paneOf(container, tab) {\n var link = dom.one(tab, '.nav-link');\n var target = link ? link.getAttribute('data-bs-target') : null;\n\n return target ? dom.one(container, target) : null;\n }\n\n return {\n labelKey: 'container.add_tabs',\n\n // A tab strip sorts its own tabs, and the panes follow them. No\n // group: a tab belongs to the strip it was made in.\n onSortable: function(sortable) {\n sortable(dom.all(ge.canvas, '.ge-container-tabs').map(stripOf).filter(Boolean), {\n draggable: '.ge-tab',\n });\n },\n addPaneKey: 'container.add_tab',\n paneKind: 'tab',\n\n create: function(options) {\n var container = dom.element('div', { 'data-ge-container': 'tabs' });\n var labels = options.labels || [];\n var count = options.tabs || labels.length || 2;\n\n container.appendChild(dom.element('ul', { 'class': 'nav nav-tabs', role: 'tablist' }));\n container.appendChild(dom.element('div', { 'class': 'tab-content' }));\n\n // The layout last: it takes off what a vertical strip has no use for\n ['variant', 'width', 'align', 'vertical'].forEach(function(key) {\n write(container, key, chosen(options, key));\n });\n\n for (var i = 0; i < count; i++) {\n addTabTo(container, { label: labels[i] });\n }\n\n return container;\n },\n\n addPane: addTabTo,\n\n mark: function(container) {\n dom.all(container, ':scope > .tab-content > .tab-pane').forEach(function(pane) {\n dom.addClass(pane, 'ge-tab-pane');\n });\n\n dom.children(stripOf(container) || container, '.nav-item').forEach(function(tab) {\n dom.addClass(tab, 'ge-tab');\n\n var link = dom.one(tab, '.nav-link');\n if (link) { ge.makeLabelEditable(ge.labelIn(link)); }\n\n if (dom.child(tab, '.ge-tools-drawer')) { return; }\n\n ge.createPaneControls(tab, 'tab', ge.settings.tab_tools, ge.t('confirm.delete_tab'),\n function(removed) {\n var pane = paneOf(container, tab);\n var wasActive = dom.hasClass(pane, 'active');\n\n dom.fadeOut(tab, 200, function() {\n if (pane) { pane.remove(); }\n removed();\n\n var first = dom.one(container, ':scope > .tab-content > .tab-pane');\n if (wasActive && first) { activatePane(container, first); }\n });\n });\n });\n },\n\n unmark: function(container) {\n ge.resumeToggles(container);\n container.removeAttribute(LAYOUT_ATTR);\n dom.all(container, '.ge-tab-pane').forEach(function(pane) {\n dom.removeClass(pane, 'ge-tab-pane');\n });\n ge.unwrapLabels(container);\n },\n\n // The same, on a copy of the canvas: unmark only touches markup\n cleanMarkup: function(root) {\n var definition = this;\n dom.all(root, '[data-ge-container=\"tabs\"]').forEach(function(container) { definition.unmark(container); });\n },\n\n panelSection: function(node, kind) {\n if (kind !== 'tabs' || !stripOf(node)) { return null; }\n\n return { labelKey: 'container.tabs_section', body: createSection(node) };\n },\n\n // After a view change or a change of classes: the layout marks and the\n // sections follow\n onRefresh: function(scope) {\n dom.selfAndAll(scope, '[data-ge-container=\"tabs\"]').forEach(markLayout);\n\n sections = sections.filter(function(entry) { return entry.element.isConnected; });\n sections.forEach(function(entry) {\n if (entry.container === scope || scope.contains(entry.container)) { entry.render(); }\n });\n },\n\n onDeinit: function() {\n sections = [];\n },\n\n /** Panes read in tab order, whatever order they were dropped in. */\n afterPaneMove: function(container) {\n var content = dom.one(container, ':scope > .tab-content');\n\n dom.children(stripOf(container) || container, '.nav-item').forEach(function(tab) {\n var pane = paneOf(container, tab);\n if (pane) { content.appendChild(pane); }\n });\n },\n };\n};\n"],
5
- "mappings": "MASA,IAAIA,EAAa,OAAO,WAExB,GAAI,CAACA,GAAc,OAAOA,EAAW,KAAQ,WACzC,MAAM,IAAI,MAAM,wHAC0B,ECCvC,SAASC,EAAIC,EAAMC,EAAU,CAChC,OAAOD,EAAO,MAAM,UAAU,MAAM,KAAKA,EAAK,iBAAiBC,CAAQ,CAAC,EAAI,CAAC,CACjF,CAGO,SAASC,EAAIF,EAAMC,EAAU,CAChC,OAAOD,EAAOA,EAAK,cAAcC,CAAQ,EAAI,IACjD,CAGO,SAASE,EAAWH,EAAMC,EAAU,CACvC,GAAI,CAACD,EAAQ,MAAO,CAAC,EAErB,IAAII,EAAQL,EAAIC,EAAMC,CAAQ,EAC9B,OAAID,EAAK,WAAa,GAAKA,EAAK,QAAQC,CAAQ,GAAKG,EAAM,QAAQJ,CAAI,EAChEI,CACX,CAGO,SAASC,EAASC,EAAML,EAAU,CACrC,OAAKK,EAEE,MAAM,UAAU,OAAO,KAAKA,EAAK,SAAU,SAASC,EAAM,CAC7D,MAAO,CAACN,GAAYM,EAAK,QAAQN,CAAQ,CAC7C,CAAC,EAJmB,CAAC,CAKzB,CAGO,SAASO,EAAMF,EAAML,EAAU,CAClC,OAAOI,EAASC,EAAML,CAAQ,EAAE,CAAC,GAAK,IAC1C,CA6DO,SAASQ,EAAQC,EAAKC,EAAYC,EAAM,CAC3C,IAAIC,EAAO,SAAS,cAAcH,CAAG,EAErC,cAAO,KAAKC,GAAc,CAAC,CAAC,EAAE,QAAQ,SAASG,EAAM,CACjD,IAAIC,EAAQJ,EAAWG,CAAI,EACvBC,GAAU,MAA+BA,IAAU,IAASF,EAAK,aAAaC,EAAMC,CAAK,CACjG,CAAC,EACyBH,GAAS,OAAQC,EAAK,YAAcD,GAEvDC,CACX,CASO,SA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AS,OAAO,SAAS2E,EAAO,CAAE,OAAOA,EAAM,QAAQ,WAAa,CAAC,EAChF3E,EAAS,QAAQ,SAAS2E,EAAO,EACzBA,EAAM,YAAcF,GAASA,EAAM,SAASE,EAAM,SAAS,IAAKA,EAAM,OAAO,CACrF,CAAC,CACL,EAEA,SAAU,UAAW,CACjB3E,EAAW,CAAC,CAChB,EAGA,cAAe,SAASE,EAAW,CAC/B,IAAI8C,EAAcC,EAAI/C,EAAW,uBAAuB,EAEpDiD,EAASlD,EAAQC,CAAS,GAAKA,EAAW,WAAW,EAAE,QAAQ,SAASkD,EAAK,CAC7E,IAAIE,EAAOK,EAAOzD,EAAWkD,CAAG,EAC5BE,GAAQN,EAAQ,YAAYM,CAAI,CACxC,CAAC,CACL,CACJ,CACJ",
4
+ "sourcesContent": ["/**\n * What a plugin's or a locale's classic script imports in place of the\n * editor: the GridEditor the page already loaded.\n *\n * The build points `import { GridEditor } from '../grideditor.js'` here for\n * the classic scripts, so each registers on the editor the page has rather\n * than bringing its own. Loaded before the editor there is nothing to\n * register on, and saying so is better than a TypeError three calls later.\n */\nvar GridEditor = window.GridEditor;\n\nif (!GridEditor || typeof GridEditor.get !== 'function') {\n throw new Error('grid-editor: load grideditor.js (or grideditor.bundle.min.js) before its plugins, ' +\n 'its locales and grideditor.jquery.js');\n}\n\nexport { GridEditor };\nexport default GridEditor;\n", "/**\n * The DOM, the way grid-editor uses it.\n *\n * Small helpers over the browser's own API, for the core and the shipped\n * plugins. Not a public API: a plugin of a host's own is free to write its\n * DOM code however it likes, and this file makes no promise to it.\n *\n * Stateless on purpose. The build puts a copy of this file in each plugin's\n * classic script, so anything kept here would be kept once per copy; a\n * module that needs to remember something about a node keeps its own\n * WeakMap.\n */\n\n/** Every element under `root` matching `selector`, as an array. */\nexport function all(root, selector) {\n return root ? Array.prototype.slice.call(root.querySelectorAll(selector)) : [];\n}\n\n/** The first element under `root` matching `selector`, or null. */\nexport function one(root, selector) {\n return root ? root.querySelector(selector) : null;\n}\n\n/** `root` itself when it matches, then every element under it that does. */\nexport function selfAndAll(root, selector) {\n if (!root) { return []; }\n\n var found = all(root, selector);\n if (root.nodeType === 1 && root.matches(selector)) { found.unshift(root); }\n return found;\n}\n\n/** The element children of `node`, those matching `selector` if one is given. */\nexport function children(node, selector) {\n if (!node) { return []; }\n\n return Array.prototype.filter.call(node.children, function(each) {\n return !selector || each.matches(selector);\n });\n}\n\n/** The first element child matching `selector`, or null. */\nexport function child(node, selector) {\n return children(node, selector)[0] || null;\n}\n\n/** The nearest ancestor-or-self matching `selector` below `stopAt`, or null. */\nexport function closest(node, selector, stopAt) {\n var found = node && node.nodeType === 1 ? node.closest(selector) : null;\n\n if (found && stopAt && found !== stopAt && !stopAt.contains(found)) { return null; }\n return found;\n}\n\n/** Whether `node` is an element matching `selector`. */\nexport function is(node, selector) {\n return !!node && node.nodeType === 1 && node.matches(selector);\n}\n\n/** Whether `node` is in the document. */\nexport function attached(node) {\n return !!node && document.documentElement.contains(node);\n}\n\n/** The element siblings after `node` that match `selector`. */\nexport function nextAll(node, selector) {\n var found = [];\n\n for (var next = node.nextElementSibling; next; next = next.nextElementSibling) {\n if (!selector || next.matches(selector)) { found.push(next); }\n }\n return found;\n}\n\n/** The ancestors of `node` up to, and not including, `stop`, nearest first. */\nexport function parentsUntil(node, stop) {\n var found = [];\n\n for (var parent = node.parentElement; parent && parent !== stop; parent = parent.parentElement) {\n found.push(parent);\n }\n return found;\n}\n\n/**\n * The nodes the html parses into, detached. Parsed the way innerHTML parses,\n * so a <script> in it never runs, here or once it is in the page.\n */\nexport function parse(html) {\n var template = document.createElement('template');\n template.innerHTML = html;\n return Array.prototype.slice.call(template.content.childNodes);\n}\n\n/** The one element the html is, detached. */\nexport function create(html) {\n var nodes = parse(html.trim());\n\n for (var i = 0; i < nodes.length; i++) {\n if (nodes[i].nodeType === 1) { return nodes[i]; }\n }\n return null;\n}\n\n/** An element of `tag`, with `attributes` and `text`. */\nexport function element(tag, attributes, text) {\n var node = document.createElement(tag);\n\n Object.keys(attributes || {}).forEach(function(name) {\n var value = attributes[name];\n if (value !== null && value !== undefined && value !== false) { node.setAttribute(name, value); }\n });\n if (text !== undefined && text !== null) { node.textContent = text; }\n\n return node;\n}\n\n/** Replace what `node` holds with `html`. A <script> in it does not run. */\nexport function setHtml(node, html) {\n node.innerHTML = html === undefined || html === null ? '' : String(html);\n return node;\n}\n\n/** Add one or several space separated classes. */\nexport function addClass(node, names) {\n split(names).forEach(function(name) { node.classList.add(name); });\n return node;\n}\n\nexport function removeClass(node, names) {\n split(names).forEach(function(name) { node.classList.remove(name); });\n return node;\n}\n\n/** Each class on, or off, or flipped when `on` is not given. */\nexport function toggleClass(node, names, state) {\n split(names).forEach(function(name) {\n if (state === undefined) {\n node.classList.toggle(name);\n } else {\n node.classList.toggle(name, !!state);\n }\n });\n return node;\n}\n\nexport function hasClass(node, name) {\n return !!node && node.nodeType === 1 && node.classList.contains(name);\n}\n\nfunction split(names) {\n return String(names || '').split(/\\s+/).filter(Boolean);\n}\n\n/** Take the class attribute off when there is nothing left in it. */\nexport function dropEmptyClass(node) {\n if (!node.getAttribute('class')) { node.removeAttribute('class'); }\n return node;\n}\n\n/** Take the style attribute off when there is nothing left in it. */\nexport function dropEmptyStyle(node) {\n if (!node.getAttribute('style')) { node.removeAttribute('style'); }\n return node;\n}\n\n/** Set attributes; a null or undefined value takes the attribute off. */\nexport function attr(node, attributes) {\n Object.keys(attributes).forEach(function(name) {\n var value = attributes[name];\n\n if (value === null || value === undefined) {\n node.removeAttribute(name);\n } else {\n node.setAttribute(name, value);\n }\n });\n return node;\n}\n\n/**\n * Inline styles, by css property name. A number is pixels for the properties\n * that take a length, as jQuery had it; an empty string takes one off.\n */\nexport function css(node, styles) {\n Object.keys(styles).forEach(function(property) {\n var value = styles[property];\n\n if (typeof value === 'number' && !UNITLESS[property]) { value = value + 'px'; }\n node.style.setProperty(property, value === null || value === undefined ? '' : String(value));\n });\n return node;\n}\n\nvar UNITLESS = { opacity: true, 'z-index': true, 'flex-grow': true, 'flex-shrink': true, order: true };\n\n/** What an element of this tag shows as when nothing hides it. */\nvar defaultDisplays = {};\n\nfunction defaultDisplay(node) {\n var tag = node.nodeName;\n\n if (!defaultDisplays[tag]) {\n var probe = document.body.appendChild(document.createElement(tag));\n defaultDisplays[tag] = getComputedStyle(probe).display;\n probe.remove();\n if (defaultDisplays[tag] === 'none') { defaultDisplays[tag] = 'block'; }\n }\n return defaultDisplays[tag];\n}\n\n/** Show a node: its inline display:none off, and a display of its own if a stylesheet hides it. */\nexport function show(node) {\n node.style.removeProperty('display');\n if (getComputedStyle(node).display === 'none') { node.style.display = defaultDisplay(node); }\n return node;\n}\n\nexport function hide(node) {\n node.style.display = 'none';\n return node;\n}\n\n/** Show or hide; flip when `on` is not given. */\nexport function toggle(node, state) {\n if (state === undefined) { state = !visible(node); }\n return state ? show(node) : hide(node);\n}\n\n/** Whether a node takes up room: what jQuery's :visible meant. */\nexport function visible(node) {\n return !!(node.offsetWidth || node.offsetHeight || node.getClientRects().length);\n}\n\n/** The border box's width, fractions included. */\nexport function outerWidth(node) {\n return node.getBoundingClientRect().width;\n}\n\nexport function outerHeight(node) {\n return node.getBoundingClientRect().height;\n}\n\n/** The content box's height, which is what jQuery's height() gave. */\nexport function contentHeight(node) {\n var style = getComputedStyle(node);\n return node.clientHeight - parseFloat(style.paddingTop) - parseFloat(style.paddingBottom);\n}\n\n/** Where a node is on the page, not in the window. */\nexport function offset(node) {\n var box = node.getBoundingClientRect();\n return { top: box.top + window.pageYOffset, left: box.left + window.pageXOffset };\n}\n\n/** Its index among its parent's element children, those matching `selector` if given. */\nexport function indexIn(node, selector) {\n return children(node.parentElement, selector).indexOf(node);\n}\n\n/** Put `node` right after `reference`. */\nexport function insertAfter(node, reference) {\n reference.parentNode.insertBefore(node, reference.nextSibling);\n return node;\n}\n\n/** Replace `node` with what it holds. */\nexport function unwrap(node) {\n var parent = node.parentNode;\n\n while (node.firstChild) { parent.insertBefore(node.firstChild, node); }\n node.remove();\n}\n\n/** Put `node` inside `wrapper`, where `node` was. */\nexport function wrap(node, wrapper) {\n node.parentNode.insertBefore(wrapper, node);\n wrapper.appendChild(node);\n return wrapper;\n}\n\n/**\n * Listen on `root` for `types` (space separated) on descendants that match\n * `selector`, with `this` the matched element, as jQuery's delegated\n * handlers had it. Hands back the listener, for removeEventListener; a\n * signal in `options` removes it too.\n */\nexport function delegate(root, types, selector, handler, options) {\n var listener = function(event) {\n var match = closest(event.target, selector, root);\n if (match && root.contains(match)) { return handler.call(match, event); }\n return undefined;\n };\n\n split(types).forEach(function(type) { root.addEventListener(type, listener, options); });\n return listener;\n}\n\n/** Listen for several space separated event types with one handler. */\nexport function on(target, types, handler, options) {\n split(types).forEach(function(type) { target.addEventListener(type, handler, options); });\n return handler;\n}\n\nexport function off(target, types, handler, options) {\n split(types).forEach(function(type) { target.removeEventListener(type, handler, options); });\n}\n\n/** A mouse event of `type` sent to `node`, the way a pointer would. */\nexport function fire(node, type) {\n node.dispatchEvent(new MouseEvent(type, { bubbles: type !== 'mouseenter' && type !== 'mouseleave' }));\n}\n\n/* ------------------------------------------------------------------\n * Taking a node away, visibly.\n *\n * The durations are jQuery's: 400 ms unless the caller says otherwise. `done` runs once the node is out of sight, which is\n * when the caller removes it; a node that is already out of sight is done at\n * once, on the next task, as jQuery had it.\n * ------------------------------------------------------------------ */\n\nvar DEFAULT_DURATION = 400;\n\nfunction animateAway(node, frames, duration, done) {\n duration = duration === undefined ? DEFAULT_DURATION : duration;\n\n var finish = function() {\n hide(node);\n if (done) { done(); }\n };\n\n if (!visible(node) || !node.animate || duration <= 0) {\n window.setTimeout(finish, 0);\n return;\n }\n\n var animation = node.animate(frames(getComputedStyle(node)), {\n duration: duration,\n easing: 'ease-in-out',\n });\n var called = false;\n var once = function() {\n if (called) { return; }\n called = true;\n finish();\n };\n\n animation.onfinish = once;\n animation.oncancel = once;\n}\n\n/** Fold a node up to nothing, then hide it. */\nexport function slideUp(node, duration, done) {\n if (typeof duration === 'function') {\n done = duration;\n duration = undefined;\n }\n\n node.style.overflow = 'hidden';\n animateAway(node, function(style) {\n return [\n {\n height: style.height,\n paddingTop: style.paddingTop,\n paddingBottom: style.paddingBottom,\n marginTop: style.marginTop,\n marginBottom: style.marginBottom,\n },\n { height: '0px', paddingTop: '0px', paddingBottom: '0px', marginTop: '0px', marginBottom: '0px' },\n ];\n }, duration, function() {\n node.style.removeProperty('overflow');\n if (done) { done(); }\n });\n}\n\n/** Fade a node out, then hide it. */\nexport function fadeOut(node, duration, done) {\n animateAway(node, function(style) {\n return [{ opacity: style.opacity }, { opacity: 0 }];\n }, duration, done);\n}\n\n/** Fade and fold a node, in height and, with `width`, sideways too, then hide it. */\nexport function shrinkAway(node, duration, done, width) {\n node.style.overflow = 'hidden';\n animateAway(node, function(style) {\n var from = { opacity: style.opacity, height: style.height };\n var to = { opacity: 0, height: '0px' };\n\n if (width) {\n from.width = style.width;\n to.width = '0px';\n }\n return [from, to];\n }, duration, function() {\n node.style.removeProperty('overflow');\n if (done) { done(); }\n });\n}\n", "/**\n * Tabs for grid-editor.\n *\n * A container plugin: load this file after the editor and the toolbar offers\n * a tabs container. What it can ask the editor for is the handle its factory is\n * called with, described in docs/plugins.md.\n *\n * <script src=\"dist/grideditor.min.js\"></script>\n * <script src=\"dist/plugins/grideditor.tabs.min.js\"></script>\n *\n * A container's variant - its style, width, alignment and whether it is laid\n * out vertically, from a breakpoint up - is Bootstrap's classes on its strip\n * and on itself, and nothing else: it is read from the markup, chosen in the\n * container's settings panel, or given to createContainer and the tabs\n * setting for the ones made new.\n */\nimport { GridEditor } from '../grideditor.js';\nimport * as dom from '../dom.js';\n\nObject.assign(GridEditor.locales.en, {\n 'container.add_tabs': 'Tabs',\n 'container.add_tab': 'Add tab',\n 'container.tab_label': 'Tab {number}',\n 'confirm.delete_tab': 'Delete this tab and everything in it?',\n 'container.tabs_section': 'Tabs',\n 'container.tabs_style': 'Style',\n 'container.tabs_style_tabs': 'Tabs',\n 'container.tabs_style_pills': 'Pills',\n 'container.tabs_style_underline': 'Underline',\n 'container.tabs_width': 'Width',\n 'container.tabs_width_natural': 'Natural',\n 'container.tabs_width_fill': 'Fill',\n 'container.tabs_width_justified': 'Justified',\n 'container.tabs_align': 'Alignment',\n 'container.tabs_align_start': 'Start',\n 'container.tabs_align_center': 'Center',\n 'container.tabs_align_end': 'End',\n 'container.tabs_layout': 'Layout',\n 'container.tabs_layout_horizontal': 'Horizontal',\n 'container.tabs_layout_vertical': 'Vertical',\n 'container.tabs_layout_vertical_from': 'Vertical from {breakpoint}',\n});\n\n/** Each variant's values, the first its default, and the class each puts on the strip. */\nvar STYLES = { tabs: 'nav-tabs', pills: 'nav-pills', underline: 'nav-underline' };\nvar WIDTHS = { natural: null, fill: 'nav-fill', justified: 'nav-justified' };\nvar ALIGNS = { start: null, center: 'justify-content-center', end: 'justify-content-end' };\nvar DEFAULTS = { variant: 'tabs', width: 'natural', align: 'start', vertical: false };\n\n/** Each variant's select in the panel: its label, and its choices'. */\nvar FIELDS = {\n variant: { labelKey: 'container.tabs_style', choices: [\n { value: 'tabs', labelKey: 'container.tabs_style_tabs' },\n { value: 'pills', labelKey: 'container.tabs_style_pills' },\n { value: 'underline', labelKey: 'container.tabs_style_underline' },\n ] },\n width: { labelKey: 'container.tabs_width', choices: [\n { value: 'natural', labelKey: 'container.tabs_width_natural' },\n { value: 'fill', labelKey: 'container.tabs_width_fill' },\n { value: 'justified', labelKey: 'container.tabs_width_justified' },\n ] },\n align: { labelKey: 'container.tabs_align', choices: [\n { value: 'start', labelKey: 'container.tabs_align_start' },\n { value: 'center', labelKey: 'container.tabs_align_center' },\n { value: 'end', labelKey: 'container.tabs_align_end' },\n ] },\n vertical: { labelKey: 'container.tabs_layout' },\n};\n\nvar fieldCounter = 0;\n\n/** Where the layout marks what the view being edited lays the tabs out as. */\nvar LAYOUT_ATTR = 'data-ge-tabs-layout';\n\nfunction classValues(map) {\n return Object.keys(map).map(function(key) { return map[key]; }).filter(Boolean);\n}\n\nGridEditor.containers.tabs = function(ge) {\n\n var sections = []; // { container, render } for every panel section built\n\n /** The strip: the container's first .nav, whatever its style. */\n function stripOf(container) {\n return dom.child(container, '.nav');\n }\n\n /** The breakpoints a layout can go vertical from; xs is always. */\n function fromBreakpoints() {\n return ge.breakpoints.slice(1);\n }\n\n /** The infix of a vertical layout's classes: none for always. */\n function infix(vertical) {\n return vertical === true ? '' : '-' + vertical;\n }\n\n function verticalClasses(vertical) {\n var at = infix(vertical);\n\n return {\n container: ['d' + at + '-flex', 'align-items' + at + '-start'],\n strip: ['flex' + at + '-column', 'me' + at + '-3'],\n };\n }\n\n /** Every vertical value: always, and from each breakpoint. */\n function verticals() {\n return [true].concat(fromBreakpoints());\n }\n\n /**\n * What a container's classes say it is. Vertical is read only when the\n * container's flex and the strip's column are of the same breakpoint;\n * anything else is horizontal, and is left as it is.\n */\n function read(container) {\n var strip = stripOf(container);\n var has = function(node, name) { return !!node && dom.hasClass(node, name); };\n var found = function(map, fallback) {\n return Object.keys(map).filter(function(key) { return map[key] && has(strip, map[key]); })[0] || fallback;\n };\n\n var vertical = verticals().filter(function(each) {\n var classes = verticalClasses(each);\n return has(container, classes.container[0]) && has(strip, classes.strip[0]);\n })[0];\n\n return {\n variant: found(STYLES, 'tabs'),\n width: found(WIDTHS, 'natural'),\n align: found(ALIGNS, 'start'),\n vertical: vertical === undefined ? false : vertical,\n };\n }\n\n /**\n * Write one variant, and take off what it makes meaningless: a vertical\n * layout has no width or alignment, and a full width no alignment.\n * Choosing a layout clears every layout class, at any breakpoint, the\n * user's own included.\n */\n function write(container, key, value) {\n var strip = stripOf(container);\n if (!strip) { return; }\n\n if (key === 'variant') {\n dom.removeClass(strip, classValues(STYLES).join(' '));\n dom.addClass(strip, STYLES[value]);\n }\n\n if (key === 'width' || key === 'vertical') {\n dom.removeClass(strip, classValues(WIDTHS).join(' '));\n if (key === 'width' && WIDTHS[value]) { dom.addClass(strip, WIDTHS[value]); }\n }\n\n if (key === 'align' || key === 'vertical' || (key === 'width' && value !== 'natural')) {\n dom.removeClass(strip, classValues(ALIGNS).join(' '));\n if (key === 'align' && ALIGNS[value]) { dom.addClass(strip, ALIGNS[value]); }\n }\n\n if (key === 'vertical') {\n verticals().forEach(function(each) {\n var classes = verticalClasses(each);\n dom.removeClass(container, classes.container.join(' '));\n dom.removeClass(strip, classes.strip.join(' '));\n });\n strip.removeAttribute('aria-orientation');\n\n if (value !== false) {\n var layout = verticalClasses(value);\n dom.addClass(container, layout.container.join(' '));\n dom.addClass(strip, layout.strip.join(' '));\n strip.setAttribute('aria-orientation', 'vertical');\n }\n }\n\n dom.dropEmptyClass(container);\n }\n\n /** The values a variant takes, as the warning lists them. */\n function valuesOf(key) {\n if (key === 'variant') { return Object.keys(STYLES); }\n if (key === 'width') { return Object.keys(WIDTHS); }\n if (key === 'align') { return Object.keys(ALIGNS); }\n\n return [false].concat(verticals());\n }\n\n /**\n * A variant for a new container: the option, or the tabs setting, or the\n * default. A value it does not take is warned about and the default used.\n */\n function chosen(options, key) {\n var setting = ge.settings.tabs || {};\n var value = options[key] !== undefined ? options[key] : setting[key];\n\n if (value === undefined) { return DEFAULTS[key]; }\n if (valuesOf(key).indexOf(value) !== -1) { return value; }\n\n ge.warn('tabs: ' + JSON.stringify(value) + ' is not a ' + key + ', which takes ' +\n JSON.stringify(valuesOf(key)) + ': ' + JSON.stringify(DEFAULTS[key]) + ' is used');\n return DEFAULTS[key];\n }\n\n /**\n * What the view being edited lays a container out as. A breakpoint view\n * narrows the canvas, not the window, and Bootstrap's classes answer to\n * the window: so the view says it, from the breakpoint the container\n * goes vertical at. The all view shows what the window gives.\n */\n function layoutHere(container) {\n var vertical = read(container).vertical;\n if (vertical === false) { return null; }\n\n if (ge.view() === 'all') {\n container.removeAttribute(LAYOUT_ATTR);\n return /flex$/.test(getComputedStyle(container).display) ? 'vertical' : 'horizontal';\n }\n if (vertical === true) { return 'vertical'; }\n\n return ge.breakpoints.indexOf(ge.view()) >= ge.breakpoints.indexOf(vertical) ? 'vertical' : 'horizontal';\n }\n\n function markLayout(container) {\n var layout = layoutHere(container);\n\n if (layout) {\n container.setAttribute(LAYOUT_ATTR, layout);\n } else {\n container.removeAttribute(LAYOUT_ATTR);\n }\n }\n\n function select(labelKey, options, onChange) {\n var box = dom.element('div', { 'class': 'ge-tabs-variant' });\n var id = 'ge-tabs-variant-' + (++fieldCounter);\n\n box.appendChild(dom.element('label', { 'class': 'form-label', 'for': id }, ge.t(labelKey)));\n var field = box.appendChild(dom.element('select', { 'class': 'form-select form-select-sm', id: id }));\n\n options.forEach(function(option) {\n field.appendChild(dom.element('option', { value: option.value }, option.label));\n });\n field.addEventListener('change', function() { onChange(field.value); });\n\n return { box: box, field: field };\n }\n\n /** The Tabs section of a tabs container's settings panel: a select per variant. */\n function createSection(container) {\n var body = dom.element('div', { 'class': 'ge-tabs-variants' });\n var fields = {};\n\n function change(key, value) {\n write(container, key, value);\n markLayout(container);\n render();\n }\n\n function options(key) {\n return FIELDS[key].choices.map(function(choice) {\n return { value: choice.value, label: ge.t(choice.labelKey) };\n });\n }\n\n ['variant', 'width', 'align'].forEach(function(key) {\n fields[key] = select(FIELDS[key].labelKey, options(key), function(value) { change(key, value); });\n });\n fields.vertical = select(FIELDS.vertical.labelKey, [\n { value: 'false', label: ge.t('container.tabs_layout_horizontal') },\n { value: 'true', label: ge.t('container.tabs_layout_vertical') },\n ].concat(fromBreakpoints().map(function(key) {\n return { value: key, label: ge.t('container.tabs_layout_vertical_from', { breakpoint: key }) };\n })), function(value) {\n change('vertical', value === 'true' ? true : value === 'false' ? false : value);\n });\n\n ['variant', 'width', 'align', 'vertical'].forEach(function(key) {\n fields[key].box.setAttribute('data-ge-tabs-variant', key);\n body.appendChild(fields[key].box);\n });\n\n /** Fill the selects from the classes, and turn off what does not apply. */\n function render() {\n var values = read(container);\n\n fields.variant.field.value = values.variant;\n fields.width.field.value = values.width;\n fields.align.field.value = values.align;\n fields.vertical.field.value = String(values.vertical);\n fields.width.field.disabled = values.vertical !== false;\n fields.align.field.disabled = values.vertical !== false || values.width !== 'natural';\n }\n\n render();\n sections.push({ container: container, element: body, render: render });\n\n return body;\n }\n\n function addTabTo(container, options) {\n options = options || {};\n\n var strip = stripOf(container);\n var content = dom.one(container, ':scope > .tab-content');\n var id = ge.containerId('tab');\n var number = dom.children(strip, '.nav-item').length + 1;\n\n var tab = strip.appendChild(dom.element('li', { 'class': 'nav-item ge-tab', role: 'presentation' }));\n var button = tab.appendChild(dom.element('button', {\n 'class': 'nav-link',\n type: 'button',\n role: 'tab',\n 'data-bs-toggle': 'tab',\n 'data-bs-target': '#' + id,\n 'aria-controls': id,\n }));\n button.appendChild(dom.element('span', { 'class': 'ge-pane-label' },\n options.label || ge.t('container.tab_label', { number: number })));\n\n var pane = content.appendChild(dom.element('div', {\n 'class': 'tab-pane fade',\n role: 'tabpanel',\n tabindex: '0',\n id: id,\n }));\n pane.appendChild(ge.defaultRegion());\n\n if (options.activate || number === 1) { activatePane(container, pane); }\n\n return pane;\n }\n\n function activatePane(container, pane) {\n var id = pane.getAttribute('id');\n\n dom.all(container, ':scope > .tab-content > .tab-pane').forEach(function(each) {\n dom.removeClass(each, 'show active');\n });\n dom.addClass(pane, 'show active');\n\n dom.all(stripOf(container) || container, '.nav-link').forEach(function(button) {\n var active = button.getAttribute('data-bs-target') === '#' + id;\n\n dom.toggleClass(button, 'active', active);\n button.setAttribute('aria-selected', active ? 'true' : 'false');\n });\n }\n\n function paneOf(container, tab) {\n var link = dom.one(tab, '.nav-link');\n var target = link ? link.getAttribute('data-bs-target') : null;\n\n return target ? dom.one(container, target) : null;\n }\n\n return {\n labelKey: 'container.add_tabs',\n\n // A tab strip sorts its own tabs, and the panes follow them. No\n // group: a tab belongs to the strip it was made in.\n onSortable: function(sortable) {\n sortable(dom.all(ge.canvas, '.ge-container-tabs').map(stripOf).filter(Boolean), {\n draggable: '.ge-tab',\n });\n },\n addPaneKey: 'container.add_tab',\n paneKind: 'tab',\n\n create: function(options) {\n var container = dom.element('div', { 'data-ge-container': 'tabs' });\n var labels = options.labels || [];\n var count = options.tabs || labels.length || 2;\n\n container.appendChild(dom.element('ul', { 'class': 'nav nav-tabs', role: 'tablist' }));\n container.appendChild(dom.element('div', { 'class': 'tab-content' }));\n\n // The layout last: it takes off what a vertical strip has no use for\n ['variant', 'width', 'align', 'vertical'].forEach(function(key) {\n write(container, key, chosen(options, key));\n });\n\n for (var i = 0; i < count; i++) {\n addTabTo(container, { label: labels[i] });\n }\n\n return container;\n },\n\n addPane: addTabTo,\n\n mark: function(container) {\n dom.all(container, ':scope > .tab-content > .tab-pane').forEach(function(pane) {\n dom.addClass(pane, 'ge-tab-pane');\n });\n\n dom.children(stripOf(container) || container, '.nav-item').forEach(function(tab) {\n dom.addClass(tab, 'ge-tab');\n\n var link = dom.one(tab, '.nav-link');\n if (link) { ge.makeLabelEditable(ge.labelIn(link)); }\n\n if (dom.child(tab, '.ge-tools-drawer')) { return; }\n\n ge.createPaneControls(tab, 'tab', ge.settings.tab_tools, ge.t('confirm.delete_tab'),\n function(removed) {\n var pane = paneOf(container, tab);\n var wasActive = dom.hasClass(pane, 'active');\n\n dom.fadeOut(tab, 200, function() {\n if (pane) { pane.remove(); }\n removed();\n\n var first = dom.one(container, ':scope > .tab-content > .tab-pane');\n if (wasActive && first) { activatePane(container, first); }\n });\n });\n });\n },\n\n unmark: function(container) {\n ge.resumeToggles(container);\n container.removeAttribute(LAYOUT_ATTR);\n dom.all(container, '.ge-tab-pane').forEach(function(pane) {\n dom.removeClass(pane, 'ge-tab-pane');\n });\n dom.all(container, '.ge-tab').forEach(function(tab) {\n dom.removeClass(tab, 'ge-tab');\n dom.dropEmptyClass(tab);\n });\n ge.unwrapLabels(container);\n },\n\n // The same, on a copy of the canvas: unmark only touches markup\n cleanMarkup: function(root) {\n var definition = this;\n dom.all(root, '[data-ge-container=\"tabs\"]').forEach(function(container) { definition.unmark(container); });\n },\n\n panelSection: function(node, kind) {\n if (kind !== 'tabs' || !stripOf(node)) { return null; }\n\n return { labelKey: 'container.tabs_section', body: createSection(node) };\n },\n\n // After a view change or a change of classes: the layout marks and the\n // sections follow\n onRefresh: function(scope) {\n dom.selfAndAll(scope, '[data-ge-container=\"tabs\"]').forEach(markLayout);\n\n sections = sections.filter(function(entry) { return entry.element.isConnected; });\n sections.forEach(function(entry) {\n if (entry.container === scope || scope.contains(entry.container)) { entry.render(); }\n });\n },\n\n onDeinit: function() {\n sections = [];\n },\n\n /** Panes read in tab order, whatever order they were dropped in. */\n afterPaneMove: function(container) {\n var content = dom.one(container, ':scope > .tab-content');\n\n dom.children(stripOf(container) || container, '.nav-item').forEach(function(tab) {\n var pane = paneOf(container, tab);\n if (pane) { content.appendChild(pane); }\n });\n },\n };\n};\n"],
5
+ "mappings": "MASA,IAAIA,EAAa,OAAO,WAExB,GAAI,CAACA,GAAc,OAAOA,EAAW,KAAQ,WACzC,MAAM,IAAI,MAAM,wHAC0B,ECCvC,SAASC,EAAIC,EAAMC,EAAU,CAChC,OAAOD,EAAO,MAAM,UAAU,MAAM,KAAKA,EAAK,iBAAiBC,CAAQ,CAAC,EAAI,CAAC,CACjF,CAGO,SAASC,EAAIF,EAAMC,EAAU,CAChC,OAAOD,EAAOA,EAAK,cAAcC,CAAQ,EAAI,IACjD,CAGO,SAASE,EAAWH,EAAMC,EAAU,CACvC,GAAI,CAACD,EAAQ,MAAO,CAAC,EAErB,IAAII,EAAQL,EAAIC,EAAMC,CAAQ,EAC9B,OAAID,EAAK,WAAa,GAAKA,EAAK,QAAQC,CAAQ,GAAKG,EAAM,QAAQJ,CAAI,EAChEI,CACX,CAGO,SAASC,EAASC,EAAML,EAAU,CACrC,OAAKK,EAEE,MAAM,UAAU,OAAO,KAAKA,EAAK,SAAU,SAASC,EAAM,CAC7D,MAAO,CAACN,GAAYM,EAAK,QAAQN,CAAQ,CAC7C,CAAC,EAJmB,CAAC,CAKzB,CAGO,SAASO,EAAMF,EAAML,EAAU,CAClC,OAAOI,EAASC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,EACzB3B,EAAe2B,CAAG,CAC1B,CAAC,EACDrD,EAAG,aAAaG,CAAS,CAC7B,EAGA,YAAa,SAASoE,EAAM,CACxB,IAAIC,EAAa,KACbf,EAAIc,EAAM,4BAA4B,EAAE,QAAQ,SAASpE,EAAW,CAAEqE,EAAW,OAAOrE,CAAS,CAAG,CAAC,CAC7G,EAEA,aAAc,SAASW,EAAM2D,EAAM,CAC/B,OAAIA,IAAS,QAAU,CAACvE,EAAQY,CAAI,EAAY,KAEzC,CAAE,SAAU,yBAA0B,KAAM2B,EAAc3B,CAAI,CAAE,CAC3E,EAIA,UAAW,SAAS4D,EAAO,CACnBC,EAAWD,EAAO,4BAA4B,EAAE,QAAQ1C,CAAU,EAEtE/B,EAAWA,EAAS,OAAO,SAAS2E,EAAO,CAAE,OAAOA,EAAM,QAAQ,WAAa,CAAC,EAChF3E,EAAS,QAAQ,SAAS2E,EAAO,EACzBA,EAAM,YAAcF,GAASA,EAAM,SAASE,EAAM,SAAS,IAAKA,EAAM,OAAO,CACrF,CAAC,CACL,EAEA,SAAU,UAAW,CACjB3E,EAAW,CAAC,CAChB,EAGA,cAAe,SAASE,EAAW,CAC/B,IAAI8C,EAAcC,EAAI/C,EAAW,uBAAuB,EAEpDiD,EAASlD,EAAQC,CAAS,GAAKA,EAAW,WAAW,EAAE,QAAQ,SAASkD,EAAK,CAC7E,IAAIE,EAAOK,EAAOzD,EAAWkD,CAAG,EAC5BE,GAAQN,EAAQ,YAAYM,CAAI,CACxC,CAAC,CACL,CACJ,CACJ",
6
6
  "names": ["GridEditor", "all", "root", "selector", "one", "selfAndAll", "found", "children", "node", "each", "child", "element", "tag", "attributes", "text", "node", "name", "value", "addClass", "node", "names", "split", "name", "removeClass", "toggleClass", "state", "hasClass", "dropEmptyClass", "hide", "node", "visible", "node", "DEFAULT_DURATION", "animateAway", "node", "frames", "duration", "done", "finish", "hide", "visible", "animation", "called", "once", "fadeOut", "node", "duration", "done", "animateAway", "style", "GridEditor", "STYLES", "WIDTHS", "ALIGNS", "DEFAULTS", "FIELDS", "fieldCounter", "LAYOUT_ATTR", "classValues", "map", "key", "ge", "sections", "stripOf", "container", "child", "fromBreakpoints", "infix", "vertical", "verticalClasses", "at", "verticals", "read", "strip", "has", "node", "name", "hasClass", "found", "fallback", "each", "classes", "write", "value", "removeClass", "addClass", "layout", "dropEmptyClass", "valuesOf", "chosen", "options", "setting", "layoutHere", "markLayout", "select", "labelKey", "onChange", "box", "element", "id", "field", "option", "createSection", "body", "fields", "change", "render", "choice", "values", "addTabTo", "content", "one", "number", "children", "tab", "button", "pane", "activatePane", "all", "active", "toggleClass", "paneOf", "link", "target", "sortable", "labels", "count", "i", "removed", "wasActive", "fadeOut", "first", "root", "definition", "kind", "scope", "selfAndAll", "entry"]
7
7
  }
@@ -123,10 +123,10 @@
123
123
  <div class="col-lg-6">
124
124
  <div data-ge-container="tabs">
125
125
  <ul class="nav nav-tabs" role="tablist">
126
- <li class="nav-item ge-tab" role="presentation">
126
+ <li class="nav-item" role="presentation">
127
127
  <button class="nav-link active" type="button" role="tab" data-bs-toggle="tab" data-bs-target="#example-tab-one" aria-controls="example-tab-one" aria-selected="true">Overview</button>
128
128
  </li>
129
- <li class="nav-item ge-tab" role="presentation">
129
+ <li class="nav-item" role="presentation">
130
130
  <button class="nav-link" type="button" role="tab" data-bs-toggle="tab" data-bs-target="#example-tab-two" aria-controls="example-tab-two">Details</button>
131
131
  </li>
132
132
  </ul>
@@ -219,10 +219,10 @@
219
219
  <div class="accordion-body">
220
220
  <div data-ge-container="tabs">
221
221
  <ul class="nav nav-tabs" role="tablist">
222
- <li class="nav-item ge-tab" role="presentation">
222
+ <li class="nav-item" role="presentation">
223
223
  <button class="nav-link active" type="button" role="tab" data-bs-toggle="tab" data-bs-target="#nested-tab-one" aria-controls="nested-tab-one" aria-selected="true">Nested</button>
224
224
  </li>
225
- <li class="nav-item ge-tab" role="presentation">
225
+ <li class="nav-item" role="presentation">
226
226
  <button class="nav-link" type="button" role="tab" data-bs-toggle="tab" data-bs-target="#nested-tab-two" aria-controls="nested-tab-two">Two levels</button>
227
227
  </li>
228
228
  </ul>
package/package.json CHANGED
@@ -32,7 +32,7 @@
32
32
  "publishConfig": {
33
33
  "access": "public"
34
34
  },
35
- "version": "8.8.0",
35
+ "version": "8.8.2",
36
36
  "main": "dist/grideditor.js",
37
37
  "module": "dist/grideditor.esm.js",
38
38
  "types": "dist/grideditor.d.ts",
@@ -11,7 +11,8 @@
11
11
  *
12
12
  * Only one slide shows on the canvas, as on the page. The container's drawer
13
13
  * says which, and moves to the next and the previous; Bootstrap's own arrows
14
- * and indicators are drawn but do not answer, and neither does its javascript:
14
+ * are kept in the markup but not drawn, its indicators are drawn but do not
15
+ * answer, and neither does its javascript:
15
16
  * the attributes it acts on are put aside while editing. A carousel's options
16
17
  * - arrows, indicators, fade, dark theme, autoplay and its interval, pause,
17
18
  * wrap, keyboard and touch - are Bootstrap's classes and attributes and
@@ -425,6 +425,10 @@ GridEditor.containers.tabs = function(ge) {
425
425
  dom.all(container, '.ge-tab-pane').forEach(function(pane) {
426
426
  dom.removeClass(pane, 'ge-tab-pane');
427
427
  });
428
+ dom.all(container, '.ge-tab').forEach(function(tab) {
429
+ dom.removeClass(tab, 'ge-tab');
430
+ dom.dropEmptyClass(tab);
431
+ });
428
432
  ge.unwrapLabels(container);
429
433
  },
430
434
 
@@ -909,10 +909,11 @@
909
909
  }
910
910
 
911
911
  /* A carousel shows one slide, the one Bootstrap's .active says, and the
912
- container's drawer moves between them. Bootstrap's arrows and
913
- indicators are drawn but the editor's javascript answers, not theirs:
914
- a click goes through them to what is under, and a slide is changed
915
- with no transition */
912
+ container's drawer moves between them. Bootstrap's arrows are kept in
913
+ the markup but not drawn: they would sit over the slide's content and
914
+ the drawer's already do their work. Its indicators are drawn but the
915
+ editor's javascript answers, not theirs: a click goes through them to
916
+ what is under, and a slide is changed with no transition */
916
917
  .ge-container-carousel {
917
918
  .carousel-inner {
918
919
  overflow: visible;
@@ -921,7 +922,9 @@
921
922
  transition: none;
922
923
  }
923
924
  .carousel-control-prev,
924
- .carousel-control-next,
925
+ .carousel-control-next {
926
+ display: none;
927
+ }
925
928
  .carousel-indicators {
926
929
  pointer-events: none;
927
930
  }