@websy/websy-designs 1.11.1 → 1.11.3
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/dist/websy-designs-es6.debug.js +14 -5
- package/dist/websy-designs-es6.js +13 -5
- package/dist/websy-designs-es6.min.js +1 -1
- package/dist/websy-designs.debug.js +14 -5
- package/dist/websy-designs.js +13 -5
- package/dist/websy-designs.min.css +1 -1
- package/dist/websy-designs.min.js +1 -1
- package/package.json +1 -1
|
@@ -1922,9 +1922,16 @@ class WebsyDropdown {
|
|
|
1922
1922
|
}
|
|
1923
1923
|
else if (this.options.style === 'plain' && headerPos.width === 0 && headerPos.height === 0) {
|
|
1924
1924
|
const targetPos = WebsyUtils.getElementPos(event.target)
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1925
|
+
if (Math.max(this.options.minWidth, targetPos.width) > targetPos.right) {
|
|
1926
|
+
contentEl.style.left = `${targetPos.left}px`
|
|
1927
|
+
contentEl.style.right = 'unset'
|
|
1928
|
+
contentEl.style.width = `${Math.max(this.options.minWidth, targetPos.width)}px`
|
|
1929
|
+
}
|
|
1930
|
+
else {
|
|
1931
|
+
contentEl.style.left = 'unset'
|
|
1932
|
+
contentEl.style.right = `calc(100vw - ${targetPos.right}px)`
|
|
1933
|
+
contentEl.style.width = `${Math.max(this.options.minWidth, targetPos.width)}px`
|
|
1934
|
+
}
|
|
1928
1935
|
}
|
|
1929
1936
|
if (this.options.disableSearch !== true) {
|
|
1930
1937
|
const searchEl = document.getElementById(`${this.elementId}_search`)
|
|
@@ -3349,13 +3356,14 @@ class WebsyNavigationMenu {
|
|
|
3349
3356
|
let selected = '' // items[i].default === true ? 'selected' : ''
|
|
3350
3357
|
let active = items[i].default === true ? 'active' : ''
|
|
3351
3358
|
let currentBlock = this.normaliseString(items[i].text)
|
|
3359
|
+
let isLast = items[i].items && items[i].items.length > 0 ? '' : 'websy-menu-last-level'
|
|
3352
3360
|
let blockId = items[i].id // || `${this.elementId}_${currentBlock}_label`
|
|
3353
3361
|
if (Array.isArray(items[i].classes)) {
|
|
3354
3362
|
items[i].classes = items[i].classes.join(' ')
|
|
3355
3363
|
}
|
|
3356
3364
|
html += `
|
|
3357
3365
|
<li class='websy-${this.options.orientation}-list-item ${items[i].alwaysOpen === true ? 'always-open' : ''}'>
|
|
3358
|
-
<div class='websy-menu-header websy-menu-level-${level} ${items[i].classes || ''} ${selected} ${active}'
|
|
3366
|
+
<div class='websy-menu-header ${isLast} websy-menu-level-${level} ${items[i].classes || ''} ${selected} ${active}'
|
|
3359
3367
|
id='${blockId}'
|
|
3360
3368
|
data-id='${currentBlock}'
|
|
3361
3369
|
data-path='${items[i].path}'
|
|
@@ -4390,7 +4398,8 @@ class WebsyRouter {
|
|
|
4390
4398
|
defaultGroup: 'main',
|
|
4391
4399
|
subscribers: { show: [], hide: [] },
|
|
4392
4400
|
persistentParameters: false,
|
|
4393
|
-
fieldValueSeparator: ':'
|
|
4401
|
+
fieldValueSeparator: ':',
|
|
4402
|
+
views: {}
|
|
4394
4403
|
}
|
|
4395
4404
|
this.apiService = new WebsyDesigns.APIService('')
|
|
4396
4405
|
this.triggerIdList = []
|
|
@@ -1893,9 +1893,15 @@ var WebsyDropdown = /*#__PURE__*/function () {
|
|
|
1893
1893
|
}
|
|
1894
1894
|
} else if (this.options.style === 'plain' && headerPos.width === 0 && headerPos.height === 0) {
|
|
1895
1895
|
var targetPos = WebsyUtils.getElementPos(event.target);
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1896
|
+
if (Math.max(this.options.minWidth, targetPos.width) > targetPos.right) {
|
|
1897
|
+
contentEl.style.left = "".concat(targetPos.left, "px");
|
|
1898
|
+
contentEl.style.right = 'unset';
|
|
1899
|
+
contentEl.style.width = "".concat(Math.max(this.options.minWidth, targetPos.width), "px");
|
|
1900
|
+
} else {
|
|
1901
|
+
contentEl.style.left = 'unset';
|
|
1902
|
+
contentEl.style.right = "calc(100vw - ".concat(targetPos.right, "px)");
|
|
1903
|
+
contentEl.style.width = "".concat(Math.max(this.options.minWidth, targetPos.width), "px");
|
|
1904
|
+
}
|
|
1899
1905
|
}
|
|
1900
1906
|
if (this.options.disableSearch !== true) {
|
|
1901
1907
|
var searchEl = document.getElementById("".concat(this.elementId, "_search"));
|
|
@@ -3199,11 +3205,12 @@ var WebsyNavigationMenu = /*#__PURE__*/function () {
|
|
|
3199
3205
|
var selected = ''; // items[i].default === true ? 'selected' : ''
|
|
3200
3206
|
var active = items[i]["default"] === true ? 'active' : '';
|
|
3201
3207
|
var currentBlock = this.normaliseString(items[i].text);
|
|
3208
|
+
var isLast = items[i].items && items[i].items.length > 0 ? '' : 'websy-menu-last-level';
|
|
3202
3209
|
var blockId = items[i].id; // || `${this.elementId}_${currentBlock}_label`
|
|
3203
3210
|
if (Array.isArray(items[i].classes)) {
|
|
3204
3211
|
items[i].classes = items[i].classes.join(' ');
|
|
3205
3212
|
}
|
|
3206
|
-
html += "\n\t\t\t<li class='websy-".concat(this.options.orientation, "-list-item ").concat(items[i].alwaysOpen === true ? 'always-open' : '', "'>\n\t\t\t\t<div class='websy-menu-header websy-menu-level-").concat(level, " ").concat(items[i].classes || '', " ").concat(selected, " ").concat(active, "' \n id='").concat(blockId, "' \n data-id='").concat(currentBlock, "'\n data-path='").concat(items[i].path, "'\n data-menu-id='").concat(this.elementId, "_").concat(currentBlock, "_list'\n data-popout-id='").concat(level > 1 ? block : currentBlock, "'\n data-text='").concat(items[i].isLink !== true ? items[i].text : '', "'\n style='").concat(this.options.indent, "-left: ").concat(level * this.options.childIndentation, "px'\n ").concat(items[i].attributes && items[i].attributes.join(' ') || '', "\n >\n ");
|
|
3213
|
+
html += "\n\t\t\t<li class='websy-".concat(this.options.orientation, "-list-item ").concat(items[i].alwaysOpen === true ? 'always-open' : '', "'>\n\t\t\t\t<div class='websy-menu-header ").concat(isLast, " websy-menu-level-").concat(level, " ").concat(items[i].classes || '', " ").concat(selected, " ").concat(active, "' \n id='").concat(blockId, "' \n data-id='").concat(currentBlock, "'\n data-path='").concat(items[i].path, "'\n data-menu-id='").concat(this.elementId, "_").concat(currentBlock, "_list'\n data-popout-id='").concat(level > 1 ? block : currentBlock, "'\n data-text='").concat(items[i].isLink !== true ? items[i].text : '', "'\n style='").concat(this.options.indent, "-left: ").concat(level * this.options.childIndentation, "px'\n ").concat(items[i].attributes && items[i].attributes.join(' ') || '', "\n >\n ");
|
|
3207
3214
|
if (this.options.orientation === 'horizontal') {
|
|
3208
3215
|
html += items[i].text;
|
|
3209
3216
|
}
|
|
@@ -4180,7 +4187,8 @@ var WebsyRouter = /*#__PURE__*/function () {
|
|
|
4180
4187
|
hide: []
|
|
4181
4188
|
},
|
|
4182
4189
|
persistentParameters: false,
|
|
4183
|
-
fieldValueSeparator: ':'
|
|
4190
|
+
fieldValueSeparator: ':',
|
|
4191
|
+
views: {}
|
|
4184
4192
|
};
|
|
4185
4193
|
this.apiService = new WebsyDesigns.APIService('');
|
|
4186
4194
|
this.triggerIdList = [];
|