@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.
Files changed (127) hide show
  1. package/CHANGELOG.md +22 -1
  2. package/README.md +1 -1
  3. package/example/data/datasource/server/restapi.mjs +7 -1
  4. package/package.json +1 -1
  5. package/source/components/datatable/columnbar.mjs +2 -3
  6. package/source/components/datatable/dataset.mjs +3 -5
  7. package/source/components/datatable/datasource/dom.mjs +5 -8
  8. package/source/components/datatable/datasource/rest.mjs +12 -18
  9. package/source/components/datatable/datasource.mjs +1 -1
  10. package/source/components/datatable/datatable/header.mjs +3 -5
  11. package/source/components/datatable/datatable.mjs +13 -18
  12. package/source/components/datatable/filter/date-range.mjs +15 -27
  13. package/source/components/datatable/filter/input.mjs +3 -5
  14. package/source/components/datatable/filter/range.mjs +10 -17
  15. package/source/components/datatable/filter/settings.mjs +6 -7
  16. package/source/components/datatable/filter.mjs +14 -21
  17. package/source/components/datatable/pagination.mjs +5 -7
  18. package/source/components/datatable/stylesheet/column-bar.mjs +8 -14
  19. package/source/components/datatable/stylesheet/dataset.mjs +8 -14
  20. package/source/components/datatable/stylesheet/datasource.mjs +7 -13
  21. package/source/components/datatable/stylesheet/datatable.mjs +8 -14
  22. package/source/components/datatable/stylesheet/embedded-pagination.mjs +7 -13
  23. package/source/components/datatable/stylesheet/filter-button.mjs +7 -13
  24. package/source/components/datatable/stylesheet/filter-controls-defaults.mjs +7 -13
  25. package/source/components/datatable/stylesheet/filter-date-range.mjs +7 -13
  26. package/source/components/datatable/stylesheet/filter-range.mjs +7 -13
  27. package/source/components/datatable/stylesheet/filter.mjs +8 -14
  28. package/source/components/datatable/stylesheet/pagination.mjs +8 -14
  29. package/source/components/datatable/stylesheet/select-filter.mjs +8 -14
  30. package/source/components/datatable/util.mjs +1 -2
  31. package/source/components/form/action-button.mjs +2 -3
  32. package/source/components/form/api-button.mjs +5 -9
  33. package/source/components/form/button-bar.mjs +15 -27
  34. package/source/components/form/button.mjs +2 -2
  35. package/source/components/form/confirm-button.mjs +9 -12
  36. package/source/components/form/form.mjs +8 -14
  37. package/source/components/form/message-state-button.mjs +4 -5
  38. package/source/components/form/popper-button.mjs +7 -11
  39. package/source/components/form/popper.mjs +7 -11
  40. package/source/components/form/reload.mjs +5 -7
  41. package/source/components/form/select.mjs +42 -74
  42. package/source/components/form/style/tabs.pcss +22 -19
  43. package/source/components/form/stylesheet/action-button.mjs +7 -13
  44. package/source/components/form/stylesheet/api-button.mjs +7 -13
  45. package/source/components/form/stylesheet/button-bar.mjs +8 -14
  46. package/source/components/form/stylesheet/button.mjs +8 -14
  47. package/source/components/form/stylesheet/confirm-button.mjs +7 -13
  48. package/source/components/form/stylesheet/context-help.mjs +7 -13
  49. package/source/components/form/stylesheet/form.mjs +7 -13
  50. package/source/components/form/stylesheet/message-state-button.mjs +7 -13
  51. package/source/components/form/stylesheet/popper-button.mjs +8 -14
  52. package/source/components/form/stylesheet/popper.mjs +7 -13
  53. package/source/components/form/stylesheet/select.mjs +7 -13
  54. package/source/components/form/stylesheet/state-button.mjs +7 -13
  55. package/source/components/form/stylesheet/tabs.mjs +8 -14
  56. package/source/components/form/stylesheet/tree-select.mjs +7 -13
  57. package/source/components/form/tabs.mjs +59 -45
  58. package/source/components/form/template.mjs +6 -9
  59. package/source/components/form/tree-select.mjs +7 -10
  60. package/source/components/form/util/popper.mjs +1 -2
  61. package/source/components/host/call-button.mjs +4 -6
  62. package/source/components/host/collapse.mjs +14 -22
  63. package/source/components/host/config-manager.mjs +7 -9
  64. package/source/components/host/details.mjs +5 -8
  65. package/source/components/host/host.mjs +7 -12
  66. package/source/components/host/overlay.mjs +4 -6
  67. package/source/components/host/stylesheet/call-button.mjs +8 -14
  68. package/source/components/host/stylesheet/collapse.mjs +8 -14
  69. package/source/components/host/stylesheet/config-manager.mjs +7 -13
  70. package/source/components/host/stylesheet/details.mjs +8 -14
  71. package/source/components/host/stylesheet/host.mjs +7 -13
  72. package/source/components/host/stylesheet/overlay.mjs +7 -13
  73. package/source/components/host/stylesheet/toggle-button.mjs +8 -14
  74. package/source/components/host/stylesheet/viewer.mjs +8 -14
  75. package/source/components/host/viewer.mjs +2 -3
  76. package/source/components/notify/message.mjs +10 -13
  77. package/source/components/notify/notify.mjs +4 -6
  78. package/source/components/notify/stylesheet/message.mjs +7 -13
  79. package/source/components/notify/stylesheet/notify.mjs +7 -13
  80. package/source/components/state/log/entry.mjs +1 -1
  81. package/source/components/state/log.mjs +6 -11
  82. package/source/components/state/stylesheet/log.mjs +7 -13
  83. package/source/components/state/stylesheet/state.mjs +8 -14
  84. package/source/components/style/common.pcss +12 -10
  85. package/source/components/style/icons.pcss +110 -0
  86. package/source/components/style/link.pcss +1 -1
  87. package/source/components/style/mixin/button.pcss +0 -2
  88. package/source/components/style/mixin/icon.pcss +43 -0
  89. package/source/components/style/mixin/property.pcss +4 -0
  90. package/source/components/stylesheet/badge.mjs +7 -13
  91. package/source/components/stylesheet/border.mjs +7 -13
  92. package/source/components/stylesheet/button.mjs +8 -14
  93. package/source/components/stylesheet/card.mjs +7 -13
  94. package/source/components/stylesheet/color.mjs +7 -13
  95. package/source/components/stylesheet/common.mjs +8 -14
  96. package/source/components/stylesheet/control.mjs +7 -13
  97. package/source/components/stylesheet/data-grid.mjs +7 -13
  98. package/source/components/stylesheet/display.mjs +7 -13
  99. package/source/components/stylesheet/floating-ui.mjs +7 -13
  100. package/source/components/stylesheet/form.mjs +7 -13
  101. package/source/components/stylesheet/host.mjs +7 -13
  102. package/source/components/stylesheet/icons.mjs +27 -0
  103. package/source/components/stylesheet/link.mjs +8 -14
  104. package/source/components/stylesheet/normalize.mjs +7 -13
  105. package/source/components/stylesheet/popper.mjs +7 -13
  106. package/source/components/stylesheet/property.mjs +7 -13
  107. package/source/components/stylesheet/ripple.mjs +7 -13
  108. package/source/components/stylesheet/skeleton.mjs +7 -13
  109. package/source/components/stylesheet/space.mjs +7 -13
  110. package/source/components/stylesheet/spinner.mjs +7 -13
  111. package/source/components/stylesheet/table.mjs +7 -13
  112. package/source/components/stylesheet/theme.mjs +7 -13
  113. package/source/components/stylesheet/typography.mjs +7 -13
  114. package/source/components/tree-menu/stylesheet/tree-menu.mjs +7 -13
  115. package/source/components/tree-menu/tree-menu.mjs +9 -14
  116. package/source/data/datasource/server/restapi/writeerror.mjs +2 -1
  117. package/source/data/datasource/server.mjs +4 -4
  118. package/source/data/datasource.mjs +1 -1
  119. package/source/data/transformer.mjs +9 -4
  120. package/source/dom/customelement.mjs +1 -1
  121. package/source/dom/util.mjs +4 -5
  122. package/source/monster.mjs +0 -1
  123. package/source/types/observer.mjs +10 -2
  124. package/source/types/version.mjs +1 -1
  125. package/source/util/clone.mjs +1 -1
  126. package/test/cases/monster.mjs +1 -1
  127. 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.");
@@ -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('-') && customElements.get(tagName));
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
  }
@@ -1,4 +1,3 @@
1
-
2
1
  /**
3
2
  * Copyright schukai GmbH and contributors 2023. All Rights Reserved.
4
3
  * Node module: @schukai/monster
@@ -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 the callback should not
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(()=>{
@@ -152,7 +152,7 @@ function getMonsterVersion() {
152
152
  }
153
153
 
154
154
  /** don't touch, replaced by make with package.json version */
155
- monsterVersion = new Version("3.52.0");
155
+ monsterVersion = new Version("3.53.0");
156
156
 
157
157
  return monsterVersion;
158
158
  }
@@ -48,7 +48,7 @@ function clone(obj) {
48
48
  // Handle Array
49
49
  if (isArray(obj)) {
50
50
  const copy = [];
51
- for (var i = 0, len = obj.length; i < len; i++) {
51
+ for (let i = 0, len = obj.length; i < len; i++) {
52
52
  copy[i] = clone(obj[i]);
53
53
  }
54
54
 
@@ -7,7 +7,7 @@ describe('Monster', function () {
7
7
  let monsterVersion
8
8
 
9
9
  /** don´t touch, replaced by make with package.json version */
10
- monsterVersion = new Version("3.52.0")
10
+ monsterVersion = new Version("3.53.0")
11
11
 
12
12
  let m = getMonsterVersion();
13
13
 
@@ -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.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"
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"