neo.mjs 5.15.5 → 5.16.1

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 (33) hide show
  1. package/apps/ServiceWorker.mjs +2 -2
  2. package/buildScripts/docs/jsdocx.mjs +8 -6
  3. package/docs/app/view/MainContainer.mjs +10 -0
  4. package/docs/app/view/classdetails/HeaderComponent.mjs +3 -3
  5. package/docs/app/view/classdetails/MainContainer.mjs +14 -4
  6. package/docs/app/view/classdetails/MembersList.mjs +5 -5
  7. package/examples/ServiceWorker.mjs +2 -2
  8. package/examples/form/field/fileupload/MainContainer.mjs +68 -10
  9. package/examples/form/field/fileupload/README.md +9 -0
  10. package/examples/form/field/fileupload/server.mjs +49 -0
  11. package/examples/form/field/switch/MainContainer.mjs +124 -0
  12. package/examples/form/field/switch/app.mjs +6 -0
  13. package/examples/form/field/switch/index.html +11 -0
  14. package/examples/form/field/switch/neo-config.json +6 -0
  15. package/package.json +2 -1
  16. package/resources/scss/src/apps/docs/HeaderContainer.scss +1 -1
  17. package/resources/scss/src/apps/docs/MainContainer.scss +5 -1
  18. package/resources/scss/src/apps/docs/classdetails/HeaderComponent.scss +2 -5
  19. package/resources/scss/src/apps/docs/classdetails/MainContainer.scss +1 -1
  20. package/resources/scss/src/component/Splitter.scss +3 -1
  21. package/resources/scss/src/form/field/FileUpload.scss +248 -2
  22. package/resources/scss/src/form/field/Switch.scss +85 -115
  23. package/resources/scss/src/tree/List.scss +2 -1
  24. package/resources/scss/theme-dark/form/field/FileUpload.scss +20 -4
  25. package/resources/scss/theme-dark/form/field/Switch.scss +10 -10
  26. package/resources/scss/theme-light/form/field/FileUpload.scss +20 -4
  27. package/resources/scss/theme-light/form/field/Switch.scss +10 -10
  28. package/src/DefaultConfig.mjs +2 -2
  29. package/src/component/Splitter.mjs +27 -22
  30. package/src/form/field/FileUpload.mjs +512 -4
  31. package/src/form/field/Switch.mjs +11 -11
  32. package/src/main/addon/Markdown.mjs +2 -2
  33. package/src/main/addon/ResizeObserver.mjs +79 -0
@@ -44,7 +44,7 @@ class Markdown extends Base {
44
44
  */
45
45
  construct(config) {
46
46
  super.construct(config);
47
- DomAccess.addScript({src: this.showdownPath});
47
+ DomAccess.addScript({src: this.showdownPath})
48
48
  }
49
49
 
50
50
  /**
@@ -55,7 +55,7 @@ class Markdown extends Base {
55
55
  markdownToHtml(markdown) {
56
56
  let converter = new showdown.Converter();
57
57
 
58
- return converter.makeHtml(markdown);
58
+ return converter.makeHtml(markdown)
59
59
  }
60
60
  }
61
61
 
@@ -0,0 +1,79 @@
1
+ import Base from '../../core/Base.mjs';
2
+ import DomAccess from '../DomAccess.mjs'
3
+
4
+ /**
5
+ * @class Neo.main.addon.ResizeObserver
6
+ * @extends Neo.core.Base
7
+ * @singleton
8
+ */
9
+ class ResizeObserver extends Base {
10
+ static config = {
11
+ /**
12
+ * @member {String} className='Neo.main.addon.ResizeObserver'
13
+ * @protected
14
+ */
15
+ className: 'Neo.main.addon.ResizeObserver',
16
+ /**
17
+ * @member {#ResizeObserver|null} instance=null
18
+ * @protected
19
+ */
20
+ instance: null,
21
+ /**
22
+ * Remote method access for other workers
23
+ * @member {Object} remote
24
+ * @protected
25
+ */
26
+ remote: {
27
+ app: [
28
+ 'register',
29
+ 'unregister'
30
+ ]
31
+ },
32
+ /**
33
+ * @member {Boolean} singleton=true
34
+ * @protected
35
+ */
36
+ singleton: true
37
+ }
38
+
39
+ /**
40
+ * @param {Object} config
41
+ */
42
+ construct(config) {
43
+ let me = this;
44
+
45
+ me.resizeObserver = new ResizeObserver(me.onResize.bind(me))
46
+ }
47
+
48
+ /**
49
+ * Internal callback for the ResizeObserver instance
50
+ * @param {HTMLElement[]} entries
51
+ * @param {ResizeObserver} observer
52
+ * @protected
53
+ */
54
+ onResize(entries, observer) {
55
+ console.log('onResize', entries)
56
+ }
57
+
58
+ /**
59
+ * @param {Object} data
60
+ * @param {String} data.id
61
+ */
62
+ register(data) {
63
+ this.instance.observe(DomAccess.getElement(data.id))
64
+ }
65
+
66
+ /**
67
+ * @param {Object} data
68
+ * @param {String} data.id
69
+ */
70
+ unregister(data) {
71
+ this.instance.unobserve(DomAccess.getElement(data.id))
72
+ }
73
+ }
74
+
75
+ Neo.applyClassConfig(ResizeObserver);
76
+
77
+ let instance = Neo.applyClassConfig(ResizeObserver);
78
+
79
+ export default instance;