@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.
- package/CHANGELOG.md +16 -0
- package/package.json +1 -1
- package/source/components/datatable/dataset.mjs +327 -305
- package/source/components/datatable/datasource/dom.mjs +37 -1
- package/source/components/datatable/datasource/rest.mjs +481 -449
- package/source/components/datatable/datasource.mjs +23 -15
- package/source/components/datatable/embedded-pagination.mjs +11 -0
- package/source/components/datatable/pagination.mjs +444 -422
- package/source/components/datatable/status.mjs +1 -1
- package/source/components/datatable/style/pagination.pcss +2 -2
- package/source/components/datatable/stylesheet/pagination.mjs +7 -14
- package/source/components/datatable/util.mjs +1 -0
- package/source/components/host/config-manager.mjs +1 -3
- package/source/components/layout/tabs.mjs +35 -23
- package/source/data/datasource/server/restapi.mjs +23 -16
- package/source/data/datasource/server.mjs +1 -0
- package/source/dom/customelement.mjs +34 -0
- package/source/types/has.mjs +29 -0
@@ -30,21 +30,16 @@ const dataSourceSymbol = Symbol.for(
|
|
30
30
|
);
|
31
31
|
|
32
32
|
/**
|
33
|
-
*
|
33
|
+
* A datasource
|
34
34
|
*
|
35
|
-
*
|
35
|
+
* @fragments /fragments/components/datatable/datasource
|
36
36
|
*
|
37
|
-
*
|
37
|
+
* @example /examples/components/datatable/datasource
|
38
38
|
*
|
39
|
-
* @
|
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
|
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 {
|
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: {
|