@schukai/monster 3.52.0 → 3.53.0
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 +22 -1
- package/README.md +1 -1
- package/example/data/datasource/server/restapi.mjs +7 -1
- package/package.json +1 -1
- package/source/components/datatable/columnbar.mjs +2 -3
- package/source/components/datatable/dataset.mjs +3 -5
- package/source/components/datatable/datasource/dom.mjs +5 -8
- package/source/components/datatable/datasource/rest.mjs +12 -18
- package/source/components/datatable/datasource.mjs +1 -1
- package/source/components/datatable/datatable/header.mjs +3 -5
- package/source/components/datatable/datatable.mjs +13 -18
- package/source/components/datatable/filter/date-range.mjs +15 -27
- package/source/components/datatable/filter/input.mjs +3 -5
- package/source/components/datatable/filter/range.mjs +10 -17
- package/source/components/datatable/filter/settings.mjs +6 -7
- package/source/components/datatable/filter.mjs +14 -21
- package/source/components/datatable/pagination.mjs +5 -7
- package/source/components/datatable/stylesheet/column-bar.mjs +8 -14
- package/source/components/datatable/stylesheet/dataset.mjs +8 -14
- package/source/components/datatable/stylesheet/datasource.mjs +7 -13
- package/source/components/datatable/stylesheet/datatable.mjs +8 -14
- package/source/components/datatable/stylesheet/embedded-pagination.mjs +7 -13
- package/source/components/datatable/stylesheet/filter-button.mjs +7 -13
- package/source/components/datatable/stylesheet/filter-controls-defaults.mjs +7 -13
- package/source/components/datatable/stylesheet/filter-date-range.mjs +7 -13
- package/source/components/datatable/stylesheet/filter-range.mjs +7 -13
- package/source/components/datatable/stylesheet/filter.mjs +8 -14
- package/source/components/datatable/stylesheet/pagination.mjs +8 -14
- package/source/components/datatable/stylesheet/select-filter.mjs +8 -14
- package/source/components/datatable/util.mjs +1 -2
- package/source/components/form/action-button.mjs +2 -3
- package/source/components/form/api-button.mjs +5 -9
- package/source/components/form/button-bar.mjs +15 -27
- package/source/components/form/button.mjs +2 -2
- package/source/components/form/confirm-button.mjs +9 -12
- package/source/components/form/form.mjs +8 -14
- package/source/components/form/message-state-button.mjs +4 -5
- package/source/components/form/popper-button.mjs +7 -11
- package/source/components/form/popper.mjs +7 -11
- package/source/components/form/reload.mjs +5 -7
- package/source/components/form/select.mjs +42 -74
- package/source/components/form/style/tabs.pcss +22 -19
- package/source/components/form/stylesheet/action-button.mjs +7 -13
- package/source/components/form/stylesheet/api-button.mjs +7 -13
- package/source/components/form/stylesheet/button-bar.mjs +8 -14
- package/source/components/form/stylesheet/button.mjs +8 -14
- package/source/components/form/stylesheet/confirm-button.mjs +7 -13
- package/source/components/form/stylesheet/context-help.mjs +7 -13
- package/source/components/form/stylesheet/form.mjs +7 -13
- package/source/components/form/stylesheet/message-state-button.mjs +7 -13
- package/source/components/form/stylesheet/popper-button.mjs +8 -14
- package/source/components/form/stylesheet/popper.mjs +7 -13
- package/source/components/form/stylesheet/select.mjs +7 -13
- package/source/components/form/stylesheet/state-button.mjs +7 -13
- package/source/components/form/stylesheet/tabs.mjs +8 -14
- package/source/components/form/stylesheet/tree-select.mjs +7 -13
- package/source/components/form/tabs.mjs +59 -45
- package/source/components/form/template.mjs +6 -9
- package/source/components/form/tree-select.mjs +7 -10
- package/source/components/form/util/popper.mjs +1 -2
- package/source/components/host/call-button.mjs +4 -6
- package/source/components/host/collapse.mjs +14 -22
- package/source/components/host/config-manager.mjs +7 -9
- package/source/components/host/details.mjs +5 -8
- package/source/components/host/host.mjs +7 -12
- package/source/components/host/overlay.mjs +4 -6
- package/source/components/host/stylesheet/call-button.mjs +8 -14
- package/source/components/host/stylesheet/collapse.mjs +8 -14
- package/source/components/host/stylesheet/config-manager.mjs +7 -13
- package/source/components/host/stylesheet/details.mjs +8 -14
- package/source/components/host/stylesheet/host.mjs +7 -13
- package/source/components/host/stylesheet/overlay.mjs +7 -13
- package/source/components/host/stylesheet/toggle-button.mjs +8 -14
- package/source/components/host/stylesheet/viewer.mjs +8 -14
- package/source/components/host/viewer.mjs +2 -3
- package/source/components/notify/message.mjs +10 -13
- package/source/components/notify/notify.mjs +4 -6
- package/source/components/notify/stylesheet/message.mjs +7 -13
- package/source/components/notify/stylesheet/notify.mjs +7 -13
- package/source/components/state/log/entry.mjs +1 -1
- package/source/components/state/log.mjs +6 -11
- package/source/components/state/stylesheet/log.mjs +7 -13
- package/source/components/state/stylesheet/state.mjs +8 -14
- package/source/components/style/common.pcss +12 -10
- package/source/components/style/icons.pcss +110 -0
- package/source/components/style/link.pcss +1 -1
- package/source/components/style/mixin/button.pcss +0 -2
- package/source/components/style/mixin/icon.pcss +43 -0
- package/source/components/style/mixin/property.pcss +4 -0
- package/source/components/stylesheet/badge.mjs +7 -13
- package/source/components/stylesheet/border.mjs +7 -13
- package/source/components/stylesheet/button.mjs +8 -14
- package/source/components/stylesheet/card.mjs +7 -13
- package/source/components/stylesheet/color.mjs +7 -13
- package/source/components/stylesheet/common.mjs +8 -14
- package/source/components/stylesheet/control.mjs +7 -13
- package/source/components/stylesheet/data-grid.mjs +7 -13
- package/source/components/stylesheet/display.mjs +7 -13
- package/source/components/stylesheet/floating-ui.mjs +7 -13
- package/source/components/stylesheet/form.mjs +7 -13
- package/source/components/stylesheet/host.mjs +7 -13
- package/source/components/stylesheet/icons.mjs +27 -0
- package/source/components/stylesheet/link.mjs +8 -14
- package/source/components/stylesheet/normalize.mjs +7 -13
- package/source/components/stylesheet/popper.mjs +7 -13
- package/source/components/stylesheet/property.mjs +7 -13
- package/source/components/stylesheet/ripple.mjs +7 -13
- package/source/components/stylesheet/skeleton.mjs +7 -13
- package/source/components/stylesheet/space.mjs +7 -13
- package/source/components/stylesheet/spinner.mjs +7 -13
- package/source/components/stylesheet/table.mjs +7 -13
- package/source/components/stylesheet/theme.mjs +7 -13
- package/source/components/stylesheet/typography.mjs +7 -13
- package/source/components/tree-menu/stylesheet/tree-menu.mjs +7 -13
- package/source/components/tree-menu/tree-menu.mjs +9 -14
- package/source/data/datasource/server/restapi/writeerror.mjs +2 -1
- package/source/data/datasource/server.mjs +4 -4
- package/source/data/datasource.mjs +1 -1
- package/source/data/transformer.mjs +9 -4
- package/source/dom/customelement.mjs +1 -1
- package/source/dom/util.mjs +4 -5
- package/source/monster.mjs +0 -1
- package/source/types/observer.mjs +10 -2
- package/source/types/version.mjs +1 -1
- package/source/util/clone.mjs +1 -1
- package/test/cases/monster.mjs +1 -1
- package/test/web/test.html +1 -1
|
@@ -1140,7 +1140,7 @@ function registerCustomElement(element) {
|
|
|
1140
1140
|
if (customElements === undefined) {
|
|
1141
1141
|
throw new Error("customElements is not supported.");
|
|
1142
1142
|
}
|
|
1143
|
-
|
|
1143
|
+
|
|
1144
1144
|
const tag = element?.getTag();
|
|
1145
1145
|
if (!isString(tag) || tag === "") {
|
|
1146
1146
|
throw new Error("tag is not set.");
|
package/source/dom/util.mjs
CHANGED
|
@@ -266,19 +266,18 @@ function getContainingDocument(element) {
|
|
|
266
266
|
return traverseShadowRoots(element) || null;
|
|
267
267
|
}
|
|
268
268
|
|
|
269
|
-
|
|
270
269
|
/**
|
|
271
270
|
* Returns a list of all registered custom elements in the current document.
|
|
272
|
-
*
|
|
271
|
+
*
|
|
273
272
|
* @returns {string[]}
|
|
274
273
|
* @since 4.0.0
|
|
275
274
|
* @memberOf Monster.DOM
|
|
276
275
|
* @returns {string[]}
|
|
277
276
|
*/
|
|
278
277
|
function getRegisteredCustomElements() {
|
|
279
|
-
const customElementTags = Array.from(document.querySelectorAll(
|
|
280
|
-
.map(tag => tag.tagName.toLowerCase())
|
|
281
|
-
.filter(tagName => tagName.includes(
|
|
278
|
+
const customElementTags = Array.from(document.querySelectorAll("*"))
|
|
279
|
+
.map((tag) => tag.tagName.toLowerCase())
|
|
280
|
+
.filter((tagName) => tagName.includes("-") && customElements.get(tagName));
|
|
282
281
|
|
|
283
282
|
return Array.from(new Set(customElementTags));
|
|
284
283
|
}
|
package/source/monster.mjs
CHANGED
|
@@ -15,8 +15,16 @@ export { Observer };
|
|
|
15
15
|
/**
|
|
16
16
|
* An observer manages a callback function
|
|
17
17
|
*
|
|
18
|
-
* The update method is called with the subject object as this pointer. For this reason
|
|
19
|
-
* be an arrow function, because it gets this pointer of its own context.
|
|
18
|
+
* The update method is called with the subject object as this pointer. For this reason
|
|
19
|
+
* the callback should not be an arrow function, because it gets this pointer of its own context.
|
|
20
|
+
*
|
|
21
|
+
* Include this class in your project with the following code:
|
|
22
|
+
*
|
|
23
|
+
* ```js
|
|
24
|
+
* import { Observer } from "@schukai/monster/source/types/observer.mjs";
|
|
25
|
+
* ```
|
|
26
|
+
*
|
|
27
|
+
* The callback function is passed as the first argument to the constructor.
|
|
20
28
|
*
|
|
21
29
|
* ```js
|
|
22
30
|
* new Observer(()=>{
|
package/source/types/version.mjs
CHANGED
package/source/util/clone.mjs
CHANGED
package/test/cases/monster.mjs
CHANGED
package/test/web/test.html
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<title>Mocha Monster</title>
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
|
7
7
|
<link rel="stylesheet" href="mocha.css"/>
|
|
8
|
-
<script id="polyfill" src="https://polyfill.io/v3/polyfill.min.js?features=Array.
|
|
8
|
+
<script id="polyfill" src="https://polyfill.io/v3/polyfill.min.js?features=AbortController,Array.prototype.entries,Array.prototype.fill,Array.prototype.find,Array.prototype.includes,Array.prototype.keys,Array.prototype.sort,Array.prototype.values,atob,AudioContext,blissfuljs,Blob,CharacterData.prototype.nextElementSibling,CharacterData.prototype.previousElementSibling,CharacterData.prototype.remove,console,console.error,console.log,CSS.supports,CustomEvent,DocumentFragment,DocumentFragment.prototype.append,DocumentFragment.prototype.prepend,DOMRect,DOMTokenList,DOMTokenList.prototype.forEach,DOMTokenList.prototype.replace,Element.prototype.append,Element.prototype.getAttributeNames,Element.prototype.prepend,Element.prototype.remove,Element.prototype.scroll,Event,EventSource,fetch,Function.prototype.name,globalThis,HTMLDocument,HTMLPictureElement,HTMLTemplateElement,IntersectionObserver,IntersectionObserverEntry,Intl,Intl.DateTimeFormat,Intl.NumberFormat,Intl.PluralRules,Map,Math.log2,MutationObserver,Node.prototype.contains,Node.prototype.getRootNode,Node.prototype.isConnected,Node.prototype.isSameNode,NodeList.prototype.forEach,Number.isFinite,Number.isInteger,Object.assign,Object.entries,Object.freeze,Object.getOwnPropertyNames,Object.prototype.toString,Reflect,Reflect.defineProperty,Reflect.get,Reflect.getOwnPropertyDescriptor,Reflect.setPrototypeOf,requestAnimationFrame,ResizeObserver,Set,String.prototype.includes,String.prototype.matchAll,String.prototype.padStart,Symbol,Symbol.for,Symbol.hasInstance,Symbol.iterator,TextDecoder,TextEncoder,Uint16Array,Uint8Array,URLSearchParams,WeakSet"
|
|
9
9
|
src="https://polyfill.io/v3/polyfill.min.js?features=Array.from,Array.isArray,Array.prototype.entries,Array.prototype.every,Array.prototype.fill,Array.prototype.filter,Array.prototype.find,Array.prototype.forEach,Array.prototype.includes,Array.prototype.indexOf,Array.prototype.keys,Array.prototype.lastIndexOf,Array.prototype.map,Array.prototype.reduce,Array.prototype.some,Array.prototype.sort,Array.prototype.values,ArrayBuffer,atob,Blob,console,CustomEvent,DataView,Date.prototype.toISOString,document,Document,DocumentFragment,Element,Event,fetch,Function.prototype.bind,getComputedStyle,globalThis,HTMLDocument,HTMLTemplateElement,IntersectionObserver,Intl,JSON,Map,Math.log2,MutationObserver,Number.isFinite,Number.isInteger,Object.assign,Object.defineProperty,Object.entries,Object.freeze,Object.getOwnPropertyDescriptor,Object.getOwnPropertyNames,Object.getPrototypeOf,Object.keys,Promise,Reflect,Reflect.defineProperty,Reflect.get,Reflect.getOwnPropertyDescriptor,Reflect.setPrototypeOf,requestAnimationFrame,ResizeObserver,Set,String.prototype.endsWith,String.prototype.includes,String.prototype.matchAll,String.prototype.padStart,String.prototype.startsWith,String.prototype.trim,Symbol,Symbol.for,Symbol.hasInstance,Symbol.iterator,Uint16Array,Uint8Array,URL,WeakMap,WeakSet"
|
|
10
10
|
src="https://polyfill.io/v3/polyfill.min.js?features=Array.from,Array.isArray,Array.prototype.entries,Array.prototype.fill,Array.prototype.forEach,Array.prototype.indexOf,Array.prototype.keys,Array.prototype.lastIndexOf,Array.prototype.map,Array.prototype.reduce,Array.prototype.sort,ArrayBuffer,atob,DataView,document,DocumentFragment,Element,Event,globalThis,HTMLDocument,HTMLTemplateElement,JSON,Map,Math.log2,Number.isInteger,Object.assign,Object.defineProperty,Object.entries,Object.getOwnPropertyDescriptor,Object.getPrototypeOf,Object.keys,Promise,Reflect,Reflect.defineProperty,Reflect.get,Reflect.getOwnPropertyDescriptor,Reflect.setPrototypeOf,Set,String.prototype.endsWith,String.prototype.matchAll,String.prototype.padStart,String.prototype.startsWith,String.prototype.trim,Symbol,Symbol.iterator,WeakMap,WeakSet"
|
|
11
11
|
crossorigin="anonymous"
|