not-bulma 1.0.49 → 1.0.51

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "not-bulma",
3
- "version": "1.0.49",
3
+ "version": "1.0.51",
4
4
  "description": "not-* family UI components on Bulma CSS Framework",
5
5
  "main": "src/index.js",
6
6
  "svelte": "src/index.js",
@@ -467,7 +467,7 @@ class notCommon {
467
467
  }
468
468
 
469
469
  static strLengthCap(str, MAX_TITLE_LENGTH = 50, POST_FIX = "...") {
470
- if (str.length > MAX_TITLE_LENGTH) {
470
+ if (typeof str === "string" && str.length > MAX_TITLE_LENGTH) {
471
471
  return str.substr(0, MAX_TITLE_LENGTH) + POST_FIX;
472
472
  } else {
473
473
  return str;
@@ -12,7 +12,7 @@ class notSideMenu extends Menu {
12
12
  section: "any",
13
13
  sectionTitle: "Меню",
14
14
  priority: 0,
15
- open: false,
15
+ open: true,
16
16
  };
17
17
 
18
18
  static options = {
@@ -22,9 +22,11 @@ class notSideMenu extends Menu {
22
22
  targetSelector: `#${TYPE}-menu`,
23
23
  toggleSelector: `.${TYPE}-menu-toggle`,
24
24
  root: "/",
25
- open: false,
25
+ open: true,
26
26
  navigate: (urls) => {
27
- this.hide();
27
+ if (this.isTouch()) {
28
+ this.hide();
29
+ }
28
30
  if (!this.isDirectNavigation() && this.app) {
29
31
  let func = this.app.getWorking("router");
30
32
  if (func) {
@@ -109,10 +111,12 @@ class notSideMenu extends Menu {
109
111
  this.resizeAsideAndMain(this.aside, this.main, this.nav);
110
112
  this.resizeMain(this.main, this.aside);
111
113
  window.addEventListener("resize", this.resizeMain.bind(this));
112
- if (this.getOptions().open) {
113
- this.show();
114
- } else {
115
- this.hide();
114
+ if (this.isTouch()) {
115
+ if (this.getOptions().open) {
116
+ this.show();
117
+ } else {
118
+ this.hide();
119
+ }
116
120
  }
117
121
  }
118
122
 
@@ -192,7 +196,11 @@ class notSideMenu extends Menu {
192
196
 
193
197
  static isOpen() {
194
198
  if (this.aside) {
195
- return this.aside.classList.contains("is-active");
199
+ if (this.isTouch()) {
200
+ return this.aside.classList.contains("is-active");
201
+ } else {
202
+ return !this.aside.classList.contains("is-closed");
203
+ }
196
204
  } else {
197
205
  return true;
198
206
  }
@@ -37,6 +37,7 @@ import {
37
37
  notForm,
38
38
  notFormSet,
39
39
  notFormUtils,
40
+ notFormHelpers,
40
41
  notBreadcrumbs,
41
42
  notTopMenu,
42
43
  notSideMenu,