@schukai/monster 3.100.12 → 3.100.13
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
CHANGED
package/package.json
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"author":"schukai GmbH","dependencies":{"@floating-ui/dom":"^1.6.13","@popperjs/core":"^2.11.8"},"description":"Monster is a simple library for creating fast, robust and lightweight websites.","homepage":"https://monsterjs.org/","keywords":["framework","web","dom","css","sass","mobile-first","app","front-end","templates","schukai","core","shopcloud","alvine","monster","buildmap","stack","observer","observable","uuid","node","nodelist","css-in-js","logger","log","theme"],"license":"AGPL 3.0","main":"source/monster.mjs","module":"source/monster.mjs","name":"@schukai/monster","repository":{"type":"git","url":"https://gitlab.schukai.com/oss/libraries/javascript/monster.git"},"type":"module","version":"3.100.
|
1
|
+
{"author":"schukai GmbH","dependencies":{"@floating-ui/dom":"^1.6.13","@popperjs/core":"^2.11.8"},"description":"Monster is a simple library for creating fast, robust and lightweight websites.","homepage":"https://monsterjs.org/","keywords":["framework","web","dom","css","sass","mobile-first","app","front-end","templates","schukai","core","shopcloud","alvine","monster","buildmap","stack","observer","observable","uuid","node","nodelist","css-in-js","logger","log","theme"],"license":"AGPL 3.0","main":"source/monster.mjs","module":"source/monster.mjs","name":"@schukai/monster","repository":{"type":"git","url":"https://gitlab.schukai.com/oss/libraries/javascript/monster.git"},"type":"module","version":"3.100.13"}
|
@@ -39,58 +39,7 @@ export { Reload };
|
|
39
39
|
const intersectionObserverWasInitialized = Symbol("wasInitialized");
|
40
40
|
|
41
41
|
/**
|
42
|
-
* This CustomControl reloads the content of
|
43
|
-
*
|
44
|
-
* <img src="./images/reload.png">
|
45
|
-
*
|
46
|
-
* You can create this control either by specifying the HTML tag `<monster-reload />` directly in the HTML or using
|
47
|
-
* Javascript via the `document.createElement('monster-reload');` method.
|
48
|
-
*
|
49
|
-
* ```html
|
50
|
-
* <monster-reload></monster-reload>
|
51
|
-
*
|
52
|
-
* <script type="module">
|
53
|
-
* import {Reload} from '@schukai/component-form/source/reload.js';
|
54
|
-
* document.createElement('monster-reload');
|
55
|
-
* </script>
|
56
|
-
* ```
|
57
|
-
*
|
58
|
-
* A simple configuration can look like this
|
59
|
-
*
|
60
|
-
* ```html
|
61
|
-
* <script id="config"
|
62
|
-
* type="application/json">
|
63
|
-
* {
|
64
|
-
* "url": "./content.html",
|
65
|
-
* }
|
66
|
-
* </script>
|
67
|
-
*
|
68
|
-
* <monster-reload data-monster-options-selector="#config">
|
69
|
-
* </monster-reload>
|
70
|
-
* ```
|
71
|
-
*
|
72
|
-
* If you want to display a loader, you can insert a div with the attribute `data-monster-role="container"`.
|
73
|
-
* The content of this div will be replaced by the loaded code.
|
74
|
-
*
|
75
|
-
* ```html
|
76
|
-
* <monster-reload data-monster-options-selector="#config">
|
77
|
-
* <div data-monster-role="container">
|
78
|
-
* LOADER ...
|
79
|
-
* </div>
|
80
|
-
* </monster-reload>
|
81
|
-
* ```
|
82
|
-
*
|
83
|
-
* If you need additional structure, you can simply specify it.
|
84
|
-
*
|
85
|
-
* ```html
|
86
|
-
* <monster-reload data-monster-options-selector="#config">
|
87
|
-
* <div class="row">
|
88
|
-
* <div class="col" data-monster-role="container">
|
89
|
-
* LOADER ...
|
90
|
-
* </div>
|
91
|
-
* </div>
|
92
|
-
* </monster-reload>
|
93
|
-
* ```
|
42
|
+
* This CustomControl reloads the content of an url and embeds it into the dom.
|
94
43
|
*
|
95
44
|
* @fragments /fragments/components/form/reload/
|
96
45
|
*
|
@@ -119,16 +68,16 @@ class Reload extends CustomElement {
|
|
119
68
|
*
|
120
69
|
* @property {Object} templates Template definitions
|
121
70
|
* @property {string} templates.main Main template
|
122
|
-
* @property {string} url
|
123
|
-
* @property {string} reload
|
124
|
-
* @property {string} filter
|
125
|
-
* @property {Object
|
126
|
-
* @property {
|
127
|
-
* @property {
|
128
|
-
* @property {
|
129
|
-
* @property {
|
130
|
-
* @property {
|
131
|
-
* @property {
|
71
|
+
* @property {string} url url to fetch
|
72
|
+
* @property {string} reload onshow, always
|
73
|
+
* @property {string} filter css selector
|
74
|
+
* @property {Object} fetch fetch options for the request
|
75
|
+
* @property {string} fetch.redirect error, follow, manual
|
76
|
+
* @property {string} fetch.method GET, POST, PUT, DELETE
|
77
|
+
* @property {string} fetch.mode same-origin, cors, no-cors, navigate
|
78
|
+
* @property {string} fetch.credentials omit, same-origin, include
|
79
|
+
* @property {Object} fetch.headers
|
80
|
+
* @property {string} fetch.headers.accept text/html, application/json
|
132
81
|
*/
|
133
82
|
get defaults() {
|
134
83
|
return Object.assign(
|
@@ -227,12 +176,6 @@ class Reload extends CustomElement {
|
|
227
176
|
}
|
228
177
|
|
229
178
|
/**
|
230
|
-
* This attribute can be used to pass a URL to this select.
|
231
|
-
*
|
232
|
-
* ```
|
233
|
-
* <monster-select data-monster-url="https://example.com/"></monster-select>
|
234
|
-
* ```
|
235
|
-
*
|
236
179
|
* @private
|
237
180
|
* @return {object}
|
238
181
|
*/
|
@@ -284,10 +227,10 @@ function initIntersectionObserver() {
|
|
284
227
|
|
285
228
|
try {
|
286
229
|
loadContent.call(this).catch((e) => {
|
287
|
-
|
230
|
+
addErrorAttribute(this, e);
|
288
231
|
});
|
289
232
|
} catch (e) {
|
290
|
-
|
233
|
+
addErrorAttribute(this, e);
|
291
234
|
}
|
292
235
|
}
|
293
236
|
}
|
@@ -23,7 +23,7 @@ export { ShadowReload };
|
|
23
23
|
*
|
24
24
|
* @fragments /fragments/components/form/shadow-reload/
|
25
25
|
*
|
26
|
-
* @example /examples/components/form/shadow-reload-simple
|
26
|
+
* @example /examples/components/form/shadow-reload-simple simple shadow reload
|
27
27
|
*
|
28
28
|
* @since 3.6.0
|
29
29
|
* @copyright schukai GmbH
|