not-bulma 2.0.4 → 2.0.6

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 (62) hide show
  1. package/package.json +1 -1
  2. package/src/elements/button/ui.buttons.svelte +21 -14
  3. package/src/elements/common.js +7 -0
  4. package/src/elements/form/ui.json.area.svelte +1 -1
  5. package/src/elements/form/ui.list.of.models.svelte +1 -1
  6. package/src/elements/form/ui.select.from.model.svelte +3 -3
  7. package/src/elements/image/ui.images.svelte +1 -1
  8. package/src/elements/link/ui.link.svelte +25 -33
  9. package/src/elements/modal/ui.generic.selector.svelte +79 -101
  10. package/src/elements/modal/ui.overlay.svelte +8 -8
  11. package/src/elements/navigation/item/ui.navbar.item.svelte +1 -1
  12. package/src/elements/navigation/menu/ui.navbar.menu.svelte +8 -1
  13. package/src/elements/navigation/ui.navbar.svelte +9 -8
  14. package/src/elements/various/ui.select.from.model.on.demand.inline.svelte +7 -6
  15. package/src/elements/various/ui.select.from.model.with.search.modal.svelte +6 -14
  16. package/src/frame/app.js +1 -1
  17. package/src/frame/base.js +2 -2
  18. package/src/frame/components/action/action.ui.js +5 -5
  19. package/src/frame/components/breadcrumbs/breadcrumbs.svelte.js +5 -7
  20. package/src/frame/components/breadcrumbs/index.js +1 -1
  21. package/src/frame/components/breadcrumbs/ui.breadcrumbs.svelte +40 -32
  22. package/src/frame/components/form/form.js +16 -16
  23. package/src/frame/components/form/form.set.js +3 -3
  24. package/src/frame/components/form/form.set.svelte +3 -2
  25. package/src/frame/components/form/form.set.svelte.js +9 -9
  26. package/src/frame/components/form/form.svelte.js +41 -45
  27. package/src/frame/components/navigation/index.js +2 -2
  28. package/src/frame/components/navigation/menu.svelte.js +295 -0
  29. package/src/frame/components/navigation/side/index.js +1 -1
  30. package/src/frame/components/navigation/side/index.svelte.js +1 -1
  31. package/src/frame/components/navigation/side/ui.burger.svelte +40 -40
  32. package/src/frame/components/navigation/side/ui.item.label.svelte +16 -21
  33. package/src/frame/components/navigation/side/ui.item.with.children.svelte +42 -37
  34. package/src/frame/components/navigation/side/ui.item.without.children.svelte +39 -42
  35. package/src/frame/components/navigation/side/ui.items.svelte +65 -49
  36. package/src/frame/components/navigation/side/ui.section.svelte +30 -36
  37. package/src/frame/components/navigation/side/ui.side.menu.svelte +32 -24
  38. package/src/frame/components/navigation/side/ui.trigger.svelte +7 -6
  39. package/src/frame/components/navigation/side.menu.svelte.js +216 -0
  40. package/src/frame/components/navigation/top/index.js +4 -4
  41. package/src/frame/components/navigation/top/index.svelte.js +29 -53
  42. package/src/frame/components/navigation/top.menu.svelte.js +111 -0
  43. package/src/frame/components/table/controls/ui.switch.svelte +44 -41
  44. package/src/frame/components/table/controls/ui.tags.svelte +8 -13
  45. package/src/frame/components/table/notTable.js +18 -16
  46. package/src/frame/components/table/notTable.svelte +28 -34
  47. package/src/frame/components/table/notTableCell.svelte +3 -3
  48. package/src/frame/components/table/notTableRow.svelte +53 -47
  49. package/src/frame/controller.js +3 -3
  50. package/src/frame/crud/actions/generic/action.js +20 -12
  51. package/src/frame/crud/actions/generic/create.js +3 -3
  52. package/src/frame/crud/actions/generic/read.js +3 -6
  53. package/src/frame/crud/actions/generic/update.js +6 -9
  54. package/src/frame/crud/controller.crud.svelte.js +466 -0
  55. package/src/frame/crud/create.crud.action.ui.update.js +3 -3
  56. package/src/frame/crud/create.crud.action.ui.view.js +14 -7
  57. package/src/frame/crud/message.js +3 -2
  58. package/src/frame/crud/search.service.js +26 -22
  59. package/src/frame/index.js +5 -1
  60. package/src/frame/router.js +2 -2
  61. package/src/frame/ui.adapter.svelte.js +106 -0
  62. package/src/locale/notLocale.js +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "not-bulma",
3
- "version": "2.0.4",
3
+ "version": "2.0.6",
4
4
  "description": "not-* family UI components on Bulma CSS Framework",
5
5
  "main": "src/index.js",
6
6
  "svelte": "src/index.js",
@@ -1,8 +1,8 @@
1
1
  <script>
2
- import { createEventDispatcher } from "svelte";
3
- const dispatch = createEventDispatcher();
4
- import UIButton from "./ui.button.svelte";
2
+ import { onMount } from "svelte";
3
+ import UICommon from "../common";
5
4
 
5
+ import UIButton from "./ui.button.svelte";
6
6
 
7
7
  /**
8
8
  * @typedef {Object} Props
@@ -21,10 +21,15 @@
21
21
  right = false,
22
22
  classes = "",
23
23
  buttonComponent = UIButton,
24
+ onclick = () => {},
24
25
  action = (e) => {
25
- dispatch("click", e);
26
- }
26
+ onclick(e);
27
+ },
27
28
  } = $props();
29
+
30
+ if (!values.every((itm) => Object.hasOwn(itm, "id"))) {
31
+ values = UICommon.addIds(values);
32
+ }
28
33
  </script>
29
34
 
30
35
  <div
@@ -32,13 +37,15 @@
32
37
  ? 'is-right'
33
38
  : ''} {classes}"
34
39
  >
35
- {#each values as item (item.id)}
36
- {@const SvelteComponent = buttonComponent}
37
- <SvelteComponent
38
- {...item}
39
- bind:value={item.value}
40
- action={item.action ? item.action : action}
41
- on:click
42
- />
43
- {/each}
40
+ {#if Array.isArray(values)}
41
+ {#each values as item (item.id)}
42
+ {@const SvelteComponent = buttonComponent}
43
+ <SvelteComponent
44
+ {...item}
45
+ bind:value={item.value}
46
+ action={item.action ? item.action : action}
47
+ {onclick}
48
+ />
49
+ {/each}
50
+ {/if}
44
51
  </div>
@@ -169,4 +169,11 @@ export default class UICommon {
169
169
  return `${hours} ${unit} назад`;
170
170
  }
171
171
  }
172
+
173
+ static addIds(arr, fieldName = 'id'){
174
+ return arr.map((itm, index)=>{
175
+ itm[fieldName] = index;
176
+ return itm;
177
+ });
178
+ }
172
179
  }
@@ -67,7 +67,7 @@
67
67
  }
68
68
 
69
69
  function onChange(ev) {
70
- validateValueAndChange(ev.detail.value);
70
+ validateValueAndChange(ev.value);
71
71
  return true;
72
72
  }
73
73
  </script>
@@ -168,7 +168,7 @@
168
168
  bind:errors
169
169
  bind:formErrors
170
170
  bind:formLevelError
171
- on:resolve={(e) => addItem(e.detail)}
171
+ on:resolve={(e) => addItem(e)}
172
172
  {onchange}
173
173
  />
174
174
  {/if}
@@ -100,11 +100,11 @@
100
100
  function onChange(e) {
101
101
  if (returnVariant) {
102
102
  onchange({
103
- ...e.detail,
104
- value: variants.find((itm) => itm.id === e.detail.value),
103
+ ...e,
104
+ value: variants.find((itm) => itm.id === e.value),
105
105
  });
106
106
  } else {
107
- onchange(e.detail);
107
+ onchange(e);
108
108
  }
109
109
  }
110
110
  </script>
@@ -3,6 +3,6 @@
3
3
  let { values = [] } = $props();
4
4
  </script>
5
5
 
6
- {#each values as item (item.url)}
6
+ {#each values as item (item.href)}
7
7
  <UIImage {...item} on:click />
8
8
  {/each}
@@ -1,16 +1,10 @@
1
1
  <script>
2
- import { run } from 'svelte/legacy';
3
-
2
+ import { getContext, hasContext, onMount } from "svelte";
4
3
  import { LOCALE } from "../../locale";
5
-
6
-
7
-
8
-
9
-
10
4
  /**
11
5
  * @typedef {Object} Props
12
6
  * @property {string} [title] - attributes
13
- * @property {string} [url]
7
+ * @property {string} [href]
14
8
  * @property {any} download
15
9
  * @property {string} [target]
16
10
  * @property {any} rel
@@ -35,7 +29,7 @@
35
29
  /** @type {Props} */
36
30
  let {
37
31
  title = "",
38
- url = "",
32
+ href = "",
39
33
  download,
40
34
  target = "_blank",
41
35
  rel,
@@ -50,40 +44,38 @@
50
44
  type = "",
51
45
  color = "",
52
46
  size = "",
53
- classes = $bindable(""),
47
+ class: classes = "",
54
48
  icon = false,
55
49
  iconSide = "right",
56
- action = () => {
57
- return true;
58
- },
59
- children
50
+ action: onclick = () => {
51
+ return true;
52
+ },
53
+ children,
60
54
  } = $props();
61
55
 
62
- run(() => {
63
- classes =
64
- (button ? "button " : "") +
65
- (state && state.length > 0 ? ` is-${state} ` : "") +
66
- (light ? ` is-light ` : "") +
67
- (type && type.length > 0 ? ` is-${type} ` : "") +
68
- (size && size.length > 0 ? ` is-${size} ` : "");
69
- });
56
+ const root = hasContext("root") ? getContext("root") || "" : "";
70
57
  </script>
71
58
 
72
59
  <a
73
- onclick={action}
60
+ {onclick}
74
61
  {target}
75
- href={url}
62
+ href={root + href}
76
63
  {download}
77
64
  {rel}
78
- class="{classes} {state ? `is-${state}` : ''} {inverted
79
- ? `is-inverted`
80
- : ''} {outlined ? `is-outlined` : ''} {raised
81
- ? `is-raised`
82
- : ''} {rounded ? `is-rounded` : ''} {light ? `is-light` : ''} {loading
83
- ? `is-loading`
84
- : ''} {color ? `is-${color}` : ''} {type ? `is-${type}` : ''} {size
85
- ? `is-${size}`
86
- : ''}"
65
+ class={[
66
+ classes,
67
+ button && "button",
68
+ inverted && "is-inverted",
69
+ outlined && "is-outlined",
70
+ raised && "is-raised",
71
+ rounded && "is-rounded",
72
+ loading && "is-loading",
73
+ light && `is-light`,
74
+ color && `is-${color}`,
75
+ state && `is-${state}`,
76
+ type && `is-${type}`,
77
+ size && `is-${size}`,
78
+ ]}
87
79
  >
88
80
  {#if icon}
89
81
  {#if iconSide === "left"}
@@ -1,117 +1,95 @@
1
1
  <script>
2
- import {LOCALE} from '../../locale';
3
- import UIButtons from '../button/ui.buttons.svelte';
4
- import UIOverlay from './ui.overlay.svelte';
5
-
6
- import {UIEndlessList} from '../list/endless';
7
- import UISimpleSearchInput from '../various/ui.simple.search.input.svelte';
8
-
9
- import {
10
- onMount,
11
- createEventDispatcher
12
- } from 'svelte';
13
-
14
- let dispatch = createEventDispatcher();
15
-
16
-
17
- /**
18
- * @typedef {Object} Props
19
- * @property {boolean} [show]
20
- * @property {string} [term]
21
- * @property {string} [size]
22
- * @property {any} [inputComponent]
23
- * @property {any} [inputComponentProps]
24
- * @property {any} [outputComponent]
25
- * @property {any} [outputComponentProps]
26
- * @property {any} [results]
27
- */
2
+ import { LOCALE } from "../../locale";
3
+ import UIButtons from "../button/ui.buttons.svelte";
4
+ import UIOverlay from "./ui.overlay.svelte";
5
+
6
+ import { UIEndlessList } from "../list/endless";
7
+ import UISimpleSearchInput from "../various/ui.simple.search.input.svelte";
8
+
9
+ import { onMount } from "svelte";
10
+
11
+ /**
12
+ * @typedef {Object} Props
13
+ * @property {boolean} [show]
14
+ * @property {string} [term]
15
+ * @property {string} [size]
16
+ * @property {any} [inputComponent]
17
+ * @property {any} [inputComponentProps]
18
+ * @property {any} [outputComponent]
19
+ * @property {any} [outputComponentProps]
20
+ * @property {any} [results]
21
+ */
22
+
23
+ /** @type {Props} */
24
+ let {
25
+ show = true,
26
+ term = $bindable(""),
27
+ size = "narrow",
28
+ inputComponent = UISimpleSearchInput,
29
+ inputComponentProps = {},
30
+ outputComponent = UIEndlessList,
31
+ outputComponentProps = {},
32
+ results = $bindable({ list: [], page: 0, pages: 0, skip: 0, count: 0 }),
33
+ onreject = () => {},
34
+ onresolve = () => {},
35
+ onTermChange = () => {},
36
+ onprev = () => {},
37
+ onnext = () => {},
38
+ } = $props();
39
+
40
+ onMount(() => {});
28
41
 
29
- /** @type {Props} */
30
- let {
31
- show = true,
32
- term = $bindable(''),
33
- size = 'narrow',
34
- inputComponent = UISimpleSearchInput,
35
- inputComponentProps = {},
36
- outputComponent = UIEndlessList,
37
- outputComponentProps = {},
38
- results = $bindable({list:[], page:0, pages:0,skip:0,count:0})
39
- } = $props();
40
-
41
-
42
- onMount(() => {
43
-
44
- });
45
-
46
42
  const buttons = [
47
- {
48
- title: $LOCALE['not-node:button_cancel_label'],
49
- action: () => reject(),
50
- }
43
+ {
44
+ title: $LOCALE["not-node:button_cancel_label"],
45
+ action: onreject,
46
+ },
51
47
  ];
52
-
53
- function overlayClosed() {
54
- dispatch('reject');
55
- }
56
-
57
- function select({
58
- detail
59
- }) {
60
- console.log('selected user', detail);
61
- dispatch('resolve', detail);
62
- }
63
-
64
- function reject(){
65
- dispatch('reject');
66
- }
67
-
68
-
69
- </script>
70
-
71
-
72
- <UIOverlay on:reject="{overlayClosed}" {show} closeOnClick={true} closeButton={false}>
48
+ </script>
49
+
50
+ <UIOverlay {onreject} {show} closeOnClick={true} closeButton={false}>
73
51
  {@const SvelteComponent = inputComponent}
74
52
  {@const SvelteComponent_1 = outputComponent}
75
53
  <div class="paper box block {size}">
76
- <SvelteComponent on:termChange bind:term={term} {...inputComponentProps}></SvelteComponent>
77
- <SvelteComponent_1
78
- bind:data={results}
79
- on:prev
80
- on:next
81
- on:select={select}
82
- {...outputComponentProps}
54
+ <SvelteComponent {onTermChange} bind:term {...inputComponentProps}
55
+ ></SvelteComponent>
56
+ <SvelteComponent_1
57
+ bind:data={results}
58
+ {onprev}
59
+ {onnext}
60
+ onselect={onresolve}
61
+ {...outputComponentProps}
83
62
  ></SvelteComponent_1>
84
- <UIButtons values={buttons} centered={true} classes="mt-5"/>
63
+ <UIButtons values={buttons} centered={true} classes="mt-5" />
85
64
  </div>
86
- </UIOverlay>
87
-
88
- <style>
65
+ </UIOverlay>
66
+
67
+ <style>
89
68
  .paper.box {
90
- margin: 10vh auto auto auto;
69
+ margin: 10vh auto auto auto;
91
70
  }
92
-
93
- .paper.box.fullscreen{
94
- width: 100vw;
71
+
72
+ .paper.box.fullscreen {
73
+ width: 100vw;
95
74
  }
96
-
97
- .paper.box.wide{
98
- width: 75vw;
75
+
76
+ .paper.box.wide {
77
+ width: 75vw;
99
78
  }
100
-
101
- .paper.box.normal{
102
- width: 50vw;
79
+
80
+ .paper.box.normal {
81
+ width: 50vw;
103
82
  }
104
-
105
- .paper.box.narrow{
106
- width: 25vw;
107
- }
108
-
83
+
84
+ .paper.box.narrow {
85
+ width: 25vw;
86
+ }
87
+
109
88
  @media (max-width: 700px) {
110
- .paper.box {
111
- width: 100vw;
112
- height: 100vh;
113
- margin: 0vh auto auto auto;
114
- }
89
+ .paper.box {
90
+ width: 100vw;
91
+ height: 100vh;
92
+ margin: 0vh auto auto auto;
93
+ }
115
94
  }
116
- </style>
117
-
95
+ </style>
@@ -1,16 +1,14 @@
1
1
  <script>
2
- import { run } from 'svelte/legacy';
2
+ import { run } from "svelte/legacy";
3
3
 
4
4
  let overflowSave = $state("");
5
5
 
6
6
  import { fade } from "svelte/transition";
7
7
 
8
- import { createEventDispatcher, onMount, onDestroy } from "svelte";
8
+ import { onMount, onDestroy } from "svelte";
9
9
 
10
10
  const zIndexStep = 1000;
11
11
 
12
- const dispatch = createEventDispatcher();
13
-
14
12
  /**
15
13
  * @typedef {Object} Props
16
14
  * @property {boolean} [closeButton]
@@ -30,7 +28,8 @@
30
28
  closeSize = "normal",
31
29
  layer = 1,
32
30
  classes = "",
33
- children
31
+ children,
32
+ onreject = () => {},
34
33
  } = $props();
35
34
 
36
35
  run(() => {
@@ -62,11 +61,11 @@
62
61
  rejectOverlay();
63
62
  }
64
63
  }
65
- } catch (_) {}
64
+ } catch {}
66
65
  }
67
66
 
68
67
  function rejectOverlay(data = {}) {
69
- dispatch("reject", data);
68
+ onreject(data);
70
69
  }
71
70
  /*
72
71
  function resolveOverlay(data = {}) {
@@ -93,7 +92,8 @@
93
92
  style="z-index: {zIndexStep * layer};"
94
93
  >
95
94
  {#if closeButton}
96
- <button onclick={closeButtonClick} class="delete is-{closeSize}"></button>
95
+ <button onclick={closeButtonClick} class="delete is-{closeSize}"
96
+ ></button>
97
97
  {/if}
98
98
  {@render children?.()}
99
99
  </div>
@@ -4,7 +4,7 @@
4
4
  import UINavbarItemContent from "./primitives/ui.navbar.item.content.svelte";
5
5
  import UINavbarItemDevider from "./primitives/ui.navbar.item.devider.svelte";
6
6
 
7
- let { class: classes = "", item, children, ...other } = $props();
7
+ let { class: classes = "", item, children, url, ...other } = $props();
8
8
  </script>
9
9
 
10
10
  {#if item.break}
@@ -15,6 +15,7 @@
15
15
  onclick,
16
16
  class: classes = "",
17
17
  children,
18
+ url,
18
19
  ...other
19
20
  } = $props();
20
21
 
@@ -50,7 +51,12 @@
50
51
  <UINavbarMenuStart>
51
52
  {#each items as item (item.id)}
52
53
  {#if placeIs(item.place, "start")}
53
- <UINavbarItemGeneric hidden="touch" {root} {item} {onclick}
54
+ <UINavbarItemGeneric
55
+ hidden="touch"
56
+ {root}
57
+ {item}
58
+ {onclick}
59
+ {url}
54
60
  ></UINavbarItemGeneric>
55
61
  {/if}
56
62
  {/each}
@@ -61,6 +67,7 @@
61
67
  <UINavbarItemGeneric
62
68
  hidden="touch"
63
69
  {root}
70
+ {url}
64
71
  {item}
65
72
  {onclick}
66
73
  right={true}
@@ -18,15 +18,16 @@
18
18
  burgerControlsSidemenu = true,
19
19
  class: classes = "",
20
20
  onclick = () => {},
21
+ url,
21
22
  } = $props();
22
23
 
23
- onMount(() => {
24
- setContext("root", root);
25
- setContext("navigate", navigate);
26
- setContext("burgerControlsSidemenu", burgerControlsSidemenu);
27
- setContext("navbarId", id);
28
- setContext("onclick", onclick);
29
- });
24
+ setContext("root", root);
25
+ setContext("navigate", navigate);
26
+ setContext("burgerControlsSidemenu", burgerControlsSidemenu);
27
+ setContext("navbarId", id);
28
+ setContext("onclick", onclick);
29
+
30
+ onMount(() => {});
30
31
 
31
32
  function onBurgerClick() {
32
33
  active = !active;
@@ -44,5 +45,5 @@
44
45
  {:else if burger}
45
46
  <UINavbarBurger {active} onclick={onBurgerClick}></UINavbarBurger>
46
47
  {/if}
47
- <UINavbarMenu {active} {items}></UINavbarMenu>
48
+ <UINavbarMenu {active} {items} {url}></UINavbarMenu>
48
49
  </UINavbarWrapper>
@@ -5,8 +5,7 @@
5
5
  import notCommon from "../../frame/common";
6
6
  import { DEFAULT_STATUS_SUCCESS } from "../../frame/const";
7
7
 
8
- import { onMount, createEventDispatcher } from "svelte";
9
- const dispatch = createEventDispatcher();
8
+ import { onMount } from "svelte";
10
9
 
11
10
  /**
12
11
  * @typedef {Object} Props
@@ -59,7 +58,9 @@
59
58
  validated = false,
60
59
  errors = $bindable(false),
61
60
  formErrors = false,
62
- formLevelError = false
61
+ formLevelError = false,
62
+ onreject = () => {},
63
+ onresolve = () => {},
63
64
  } = $props();
64
65
 
65
66
  function argumentsSetProvided() {
@@ -117,7 +118,7 @@
117
118
  color: "primary",
118
119
  action() {
119
120
  state = "hidden";
120
- dispatch("resolve", resolvedValue);
121
+ onresolve(resolvedValue);
121
122
  },
122
123
  },
123
124
  reject: {
@@ -125,7 +126,7 @@
125
126
  color: "danger",
126
127
  action() {
127
128
  state = "hidden";
128
- dispatch("reject");
129
+ onreject();
129
130
  },
130
131
  },
131
132
  };
@@ -152,7 +153,7 @@
152
153
  {errors}
153
154
  {formErrors}
154
155
  {formLevelError}
155
- on:change={onModelChanged}
156
+ onchange={onModelChanged}
156
157
  />
157
158
  </div>
158
159
  <div class="control">
@@ -1,20 +1,11 @@
1
1
  <script>
2
- import { run } from 'svelte/legacy';
2
+ import { run } from "svelte/legacy";
3
3
 
4
4
  import notCommon from "../../frame/common";
5
5
 
6
6
  import { UIButtons } from "../button";
7
7
 
8
- import { createEventDispatcher, onMount } from "svelte";
9
- let dispatch = createEventDispatcher();
10
-
11
-
12
-
13
-
14
-
15
-
16
-
17
-
8
+ import { onMount } from "svelte";
18
9
 
19
10
  /**
20
11
  * @typedef {Object} Props
@@ -47,7 +38,8 @@
47
38
  loading = $bindable(false),
48
39
  selectedModelTitleFormatter = (data) => `${data._id}`,
49
40
  loadingLabel = "not-node:loading_label",
50
- isEmptyLabel = "not-node:field_value_is_empty_placeholder"
41
+ isEmptyLabel = "not-node:field_value_is_empty_placeholder",
42
+ onchange = () => {},
51
43
  } = $props();
52
44
 
53
45
  function getService() {
@@ -68,7 +60,7 @@
68
60
  })
69
61
  .then((value) => {
70
62
  inputStarted = true;
71
- dispatch("change", {
63
+ onchange({
72
64
  field: fieldname,
73
65
  value,
74
66
  });
@@ -81,7 +73,7 @@
81
73
  function resetSelectedModel() {
82
74
  value = undefined;
83
75
  modelData = null;
84
- dispatch("change", {
76
+ onchange({
85
77
  field: fieldname,
86
78
  value,
87
79
  });
package/src/frame/app.js CHANGED
@@ -142,7 +142,7 @@ class notApp extends notBase {
142
142
  //создать контроллеры
143
143
  //роутер и привязать к нему контроллеры
144
144
  this.execRouter();
145
- this.emit("afterStarted", this);
145
+ this.emit("onAfterStarted", this);
146
146
  }
147
147
 
148
148
  /**
package/src/frame/base.js CHANGED
@@ -101,7 +101,7 @@ export default class notBase extends EventEmitter {
101
101
  } else {
102
102
  this.setCommon(this.getData(), arguments);
103
103
  }
104
- this.emit("change");
104
+ this.emit("onchange");
105
105
  return this;
106
106
  }
107
107
 
@@ -150,6 +150,6 @@ export default class notBase extends EventEmitter {
150
150
  this.setOptions(null);
151
151
  this.setWorking(null);
152
152
  this.setData(null);
153
- this.emit("destroy");
153
+ this.emit("ondestroy");
154
154
  }
155
155
  }