@schukai/monster 3.95.0 → 3.95.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.
@@ -30,21 +30,16 @@ const dataSourceSymbol = Symbol.for(
30
30
  );
31
31
 
32
32
  /**
33
- * The Datasource component is a basic class for the datatable component.
33
+ * A datasource
34
34
  *
35
- * <img src="./images/datasource.png">
35
+ * @fragments /fragments/components/datatable/datasource
36
36
  *
37
- * Dependencies: the system uses functions of the [monsterjs](https://monsterjs.org/) library
37
+ * @example /examples/components/datatable/datasource
38
38
  *
39
- * @startuml datasource.png
40
- * skinparam monochrome true
41
- * skinparam shadowing false
42
- * HTMLElement <|-- CustomElement
43
- * CustomElement <|-- Datasource
44
- * @enduml
39
+ * @issue https://localhost.alvine.dev:8443/development/issues/closed/272.html
45
40
  *
46
41
  * @copyright schukai GmbH
47
- * @summary A abstract datasource
42
+ * @summary A generic datasource
48
43
  */
49
44
  class Datasource extends CustomElement {
50
45
  /**
@@ -77,8 +72,7 @@ class Datasource extends CustomElement {
77
72
  }
78
73
 
79
74
  /**
80
- *
81
- * @return {Monster.Components.Form.Form}
75
+ * @return {void}
82
76
  */
83
77
  [assembleMethodSymbol]() {
84
78
  super[assembleMethodSymbol]();
@@ -93,7 +87,7 @@ class Datasource extends CustomElement {
93
87
  }
94
88
 
95
89
  /**
96
- * set the data
90
+ * set the data with proxy
97
91
  * @param {Object} data
98
92
  */
99
93
  set data(data) {
@@ -101,18 +95,32 @@ class Datasource extends CustomElement {
101
95
  }
102
96
 
103
97
  /**
104
- * Get the datasource
105
- * @return {Monster.Data.Datasource}
98
+ * Get the base datasource
99
+ * @return {Datasource}
106
100
  */
107
101
  get datasource() {
108
102
  return this[dataSourceSymbol];
109
103
  }
110
104
 
105
+ /**
106
+ * Wrapper for the write method of the datasource
107
+ */
111
108
  write() {
112
109
  this[dataSourceSymbol].write();
113
110
  }
114
111
 
112
+ /**
113
+ * Wrapper for the read method of the datasource
114
+ */
115
115
  read() {
116
116
  this[dataSourceSymbol].read();
117
117
  }
118
+
119
+ /**
120
+ * @return {int}
121
+ * @throws {Error} this method must be implemented by derived classes.
122
+ */
123
+ currentPage() {
124
+ throw new Error("this method must be implemented by derived classes");
125
+ }
118
126
  }
@@ -42,10 +42,21 @@ class EmbeddedPagination extends Pagination {
42
42
  return Symbol.for("@schukai/monster/components/embedded-pagination");
43
43
  }
44
44
 
45
+ /**
46
+ * @private
47
+ */
45
48
  [assembleMethodSymbol]() {
46
49
  super[assembleMethodSymbol]();
47
50
  }
48
51
 
52
+ /**
53
+ *
54
+ * @property {Object} classes Class definitions
55
+ * @property {string} classes.spinner Spinner class
56
+ * @property {string} classes.spinnerContainer Spinner container class
57
+ * @property {string} classes.error Error class
58
+ * @property {string} classes.errorContainer Error container class
59
+ */
49
60
  get defaults() {
50
61
  return Object.assign({}, super.defaults, {
51
62
  classes: {