@schukai/monster 4.54.1 → 4.56.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 +20 -0
- package/README.md +2 -2
- package/package.json +1 -1
- package/source/components/accessibility/locale-picker.mjs +3 -3
- package/source/components/accessibility/locale-select.mjs +3 -3
- package/source/components/accessibility/stylesheet/locale-picker.mjs +2 -2
- package/source/components/constants.mjs +2 -2
- package/source/components/content/camera-capture.mjs +3 -3
- package/source/components/content/copy.mjs +3 -3
- package/source/components/content/fetch-box.mjs +3 -3
- package/source/components/content/stylesheet/camera-capture.mjs +2 -2
- package/source/components/content/stylesheet/copy.mjs +2 -2
- package/source/components/content/stylesheet/fetch-box.mjs +2 -2
- package/source/components/content/stylesheet/viewer.mjs +2 -2
- package/source/components/content/viewer/html.mjs +3 -3
- package/source/components/content/viewer/message.mjs +3 -3
- package/source/components/content/viewer/stylesheet/html.mjs +2 -2
- package/source/components/content/viewer/stylesheet/message.mjs +2 -2
- package/source/components/content/viewer.mjs +3 -3
- package/source/components/data/kpi-tile.mjs +3 -3
- package/source/components/data/metric-graph.mjs +3 -3
- package/source/components/data/metric.mjs +3 -3
- package/source/components/data/stylesheet/kpi-tile.mjs +2 -2
- package/source/components/data/stylesheet/metric-graph.mjs +2 -2
- package/source/components/data/stylesheet/metric.mjs +2 -2
- package/source/components/datatable/change-button.mjs +3 -3
- package/source/components/datatable/columnbar.mjs +3 -3
- package/source/components/datatable/constants.mjs +2 -2
- package/source/components/datatable/dataset.mjs +3 -3
- package/source/components/datatable/datasource/dom.mjs +3 -3
- package/source/components/datatable/datasource/rest.mjs +3 -3
- package/source/components/datatable/datasource.mjs +3 -3
- package/source/components/datatable/datatable/header.mjs +3 -3
- package/source/components/datatable/datatable.mjs +3 -3
- package/source/components/datatable/embedded-pagination.mjs +3 -3
- package/source/components/datatable/filter/abstract-base.mjs +3 -3
- package/source/components/datatable/filter/date-range.mjs +3 -3
- package/source/components/datatable/filter/input.mjs +3 -3
- package/source/components/datatable/filter/range.mjs +3 -3
- package/source/components/datatable/filter/select.mjs +3 -3
- package/source/components/datatable/filter/settings.mjs +3 -3
- package/source/components/datatable/filter/util.mjs +2 -2
- package/source/components/datatable/filter-button.mjs +3 -3
- package/source/components/datatable/filter.mjs +3 -3
- package/source/components/datatable/pagination.mjs +3 -3
- package/source/components/datatable/save-button.mjs +3 -3
- package/source/components/datatable/status.mjs +3 -3
- package/source/components/datatable/stylesheet/change-button.mjs +2 -2
- package/source/components/datatable/stylesheet/column-bar.mjs +2 -2
- package/source/components/datatable/stylesheet/dataset.mjs +2 -2
- package/source/components/datatable/stylesheet/datasource.mjs +2 -2
- package/source/components/datatable/stylesheet/datatable.mjs +2 -2
- package/source/components/datatable/stylesheet/embedded-pagination.mjs +2 -2
- package/source/components/datatable/stylesheet/filter-button.mjs +2 -2
- package/source/components/datatable/stylesheet/filter-controls-defaults.mjs +2 -2
- package/source/components/datatable/stylesheet/filter-date-range.mjs +2 -2
- package/source/components/datatable/stylesheet/filter-range.mjs +2 -2
- package/source/components/datatable/stylesheet/filter-select.mjs +2 -2
- package/source/components/datatable/stylesheet/filter.mjs +2 -2
- package/source/components/datatable/stylesheet/pagination.mjs +2 -2
- package/source/components/datatable/stylesheet/save-button.mjs +2 -2
- package/source/components/datatable/stylesheet/status.mjs +2 -2
- package/source/components/datatable/util.mjs +2 -2
- package/source/components/form/action-button.mjs +3 -3
- package/source/components/form/api-bar.mjs +3 -3
- package/source/components/form/api-button.mjs +4 -4
- package/source/components/form/button-bar.mjs +6 -4
- package/source/components/form/button.mjs +3 -3
- package/source/components/form/confirm-button.mjs +3 -3
- package/source/components/form/constants.mjs +2 -2
- package/source/components/form/context-error.mjs +3 -3
- package/source/components/form/context-help.mjs +3 -3
- package/source/components/form/digits.mjs +3 -3
- package/source/components/form/field-set.mjs +3 -3
- package/source/components/form/form.mjs +3 -3
- package/source/components/form/input-group.mjs +3 -3
- package/source/components/form/login.mjs +3 -3
- package/source/components/form/message-state-button.mjs +3 -3
- package/source/components/form/password.mjs +3 -3
- package/source/components/form/popper-button.mjs +3 -3
- package/source/components/form/popper.mjs +3 -3
- package/source/components/form/quantity.mjs +3 -3
- package/source/components/form/reload.mjs +3 -3
- package/source/components/form/select.mjs +3 -3
- package/source/components/form/shadow-reload.mjs +3 -3
- package/source/components/form/state-button.mjs +3 -3
- package/source/components/form/stylesheet/action-button.mjs +2 -2
- package/source/components/form/stylesheet/api-bar.mjs +2 -2
- package/source/components/form/stylesheet/api-button.mjs +2 -2
- package/source/components/form/stylesheet/button-bar.mjs +2 -2
- package/source/components/form/stylesheet/button.mjs +2 -2
- package/source/components/form/stylesheet/confirm-button.mjs +2 -2
- package/source/components/form/stylesheet/context-error.mjs +2 -2
- package/source/components/form/stylesheet/context-help.mjs +2 -2
- package/source/components/form/stylesheet/digits.mjs +2 -2
- package/source/components/form/stylesheet/field-set.mjs +2 -2
- package/source/components/form/stylesheet/form.mjs +2 -2
- package/source/components/form/stylesheet/input-group.mjs +2 -2
- package/source/components/form/stylesheet/invalid.mjs +2 -2
- package/source/components/form/stylesheet/login.mjs +2 -2
- package/source/components/form/stylesheet/message-state-button.mjs +2 -2
- package/source/components/form/stylesheet/password.mjs +2 -2
- package/source/components/form/stylesheet/popper-button.mjs +2 -2
- package/source/components/form/stylesheet/quantity.mjs +2 -2
- package/source/components/form/stylesheet/select.mjs +2 -2
- package/source/components/form/stylesheet/state-button.mjs +2 -2
- package/source/components/form/stylesheet/toggle-switch.mjs +2 -2
- package/source/components/form/stylesheet/tree-select.mjs +2 -2
- package/source/components/form/tabs.mjs +3 -3
- package/source/components/form/template.mjs +3 -3
- package/source/components/form/toggle-switch.mjs +3 -3
- package/source/components/form/tree-select.mjs +3 -3
- package/source/components/form/types/state.mjs +3 -3
- package/source/components/form/util/fetch.mjs +2 -2
- package/source/components/form/util/floating-ui.mjs +2 -2
- package/source/components/form/util/popper.mjs +2 -2
- package/source/components/host/call-button.mjs +3 -3
- package/source/components/host/collapse.mjs +3 -3
- package/source/components/host/config-manager.mjs +3 -3
- package/source/components/host/constants.mjs +2 -2
- package/source/components/host/details.mjs +3 -3
- package/source/components/host/host.mjs +3 -3
- package/source/components/host/overlay.mjs +3 -3
- package/source/components/host/stylesheet/call-button.mjs +2 -2
- package/source/components/host/stylesheet/config-manager.mjs +2 -2
- package/source/components/host/stylesheet/host.mjs +2 -2
- package/source/components/host/stylesheet/toggle-button.mjs +2 -2
- package/source/components/host/toggle-button.mjs +3 -3
- package/source/components/host/util.mjs +2 -2
- package/source/components/host/viewer.mjs +3 -3
- package/source/components/layout/board.mjs +3 -3
- package/source/components/layout/collapse.mjs +3 -3
- package/source/components/layout/details.mjs +3 -3
- package/source/components/layout/full-screen.mjs +3 -3
- package/source/components/layout/iframe.mjs +3 -3
- package/source/components/layout/overlay.mjs +3 -3
- package/source/components/layout/panel.mjs +3 -3
- package/source/components/layout/popper.mjs +3 -3
- package/source/components/layout/slider.mjs +3 -3
- package/source/components/layout/split-panel.mjs +3 -3
- package/source/components/layout/stylesheet/board.mjs +2 -2
- package/source/components/layout/stylesheet/collapse.mjs +2 -2
- package/source/components/layout/stylesheet/details.mjs +2 -2
- package/source/components/layout/stylesheet/full-screen.mjs +2 -2
- package/source/components/layout/stylesheet/iframe.mjs +2 -2
- package/source/components/layout/stylesheet/overlay.mjs +2 -2
- package/source/components/layout/stylesheet/panel.mjs +2 -2
- package/source/components/layout/stylesheet/popper.mjs +2 -2
- package/source/components/layout/stylesheet/slider.mjs +2 -2
- package/source/components/layout/stylesheet/split-panel.mjs +2 -2
- package/source/components/layout/stylesheet/tabs.mjs +2 -2
- package/source/components/layout/stylesheet/width-toggle.mjs +2 -2
- package/source/components/layout/tabs.mjs +3 -3
- package/source/components/layout/width-toggle.mjs +3 -3
- package/source/components/navigation/site-navigation.mjs +2 -2
- package/source/components/navigation/stylesheet/site-navigation.mjs +2 -2
- package/source/components/navigation/stylesheet/table-of-content.mjs +2 -2
- package/source/components/navigation/stylesheet/wizard-navigation.mjs +2 -2
- package/source/components/navigation/table-of-content.mjs +3 -3
- package/source/components/navigation/wizard-navigation.mjs +1 -1
- package/source/components/notify/constants.mjs +2 -2
- package/source/components/notify/message.mjs +3 -3
- package/source/components/notify/monitor-attribute-errors.mjs +3 -3
- package/source/components/notify/notify.mjs +3 -3
- package/source/components/notify/stylesheet/message.mjs +2 -2
- package/source/components/notify/stylesheet/monitor-attribute-errors.mjs +2 -2
- package/source/components/notify/stylesheet/notify.mjs +2 -2
- package/source/components/state/log/entry.mjs +3 -3
- package/source/components/state/log.mjs +3 -3
- package/source/components/state/state.mjs +3 -3
- package/source/components/state/stylesheet/log.mjs +2 -2
- package/source/components/state/stylesheet/state.mjs +2 -2
- package/source/components/stylesheet/accessibility.mjs +2 -2
- package/source/components/stylesheet/badge.mjs +2 -2
- package/source/components/stylesheet/border.mjs +2 -2
- package/source/components/stylesheet/button.mjs +2 -2
- package/source/components/stylesheet/card.mjs +2 -2
- package/source/components/stylesheet/color.mjs +2 -2
- package/source/components/stylesheet/common.mjs +2 -2
- package/source/components/stylesheet/control.mjs +2 -2
- package/source/components/stylesheet/data-grid.mjs +2 -2
- package/source/components/stylesheet/display.mjs +2 -2
- package/source/components/stylesheet/floating-ui.mjs +2 -2
- package/source/components/stylesheet/form.mjs +2 -2
- package/source/components/stylesheet/host.mjs +2 -2
- package/source/components/stylesheet/icons.mjs +2 -2
- package/source/components/stylesheet/link.mjs +2 -2
- package/source/components/stylesheet/mixin/badge.mjs +2 -2
- package/source/components/stylesheet/mixin/button.mjs +2 -2
- package/source/components/stylesheet/mixin/hover.mjs +2 -2
- package/source/components/stylesheet/mixin/icon.mjs +2 -2
- package/source/components/stylesheet/mixin/media.mjs +2 -2
- package/source/components/stylesheet/mixin/property.mjs +2 -2
- package/source/components/stylesheet/mixin/skeleton.mjs +2 -2
- package/source/components/stylesheet/mixin/spinner.mjs +2 -2
- package/source/components/stylesheet/mixin/typography.mjs +2 -2
- package/source/components/stylesheet/normalize.mjs +2 -2
- package/source/components/stylesheet/popper.mjs +2 -2
- package/source/components/stylesheet/property.mjs +2 -2
- package/source/components/stylesheet/ripple.mjs +2 -2
- package/source/components/stylesheet/skeleton.mjs +2 -2
- package/source/components/stylesheet/space.mjs +2 -2
- package/source/components/stylesheet/spinner.mjs +2 -2
- package/source/components/stylesheet/table.mjs +2 -2
- package/source/components/stylesheet/theme.mjs +2 -2
- package/source/components/stylesheet/tree-menu.mjs +2 -2
- package/source/components/stylesheet/typography.mjs +2 -2
- package/source/components/time/day.mjs +3 -3
- package/source/components/time/month-calendar.mjs +3 -3
- package/source/components/time/stylesheet/day.mjs +2 -2
- package/source/components/time/stylesheet/month-calendar.mjs +2 -2
- package/source/components/time/timeline/appointment.mjs +3 -3
- package/source/components/time/timeline/segment.mjs +3 -3
- package/source/components/time/timeline/stylesheet/appointment.mjs +2 -2
- package/source/components/time/timeline/stylesheet/segment.mjs +2 -2
- package/source/components/tree-menu/dragable-tree-menu.mjs +3 -3
- package/source/components/tree-menu/stylesheet/tree-menu.mjs +2 -2
- package/source/components/tree-menu/tree-menu.mjs +2 -2
- package/source/constants.mjs +2 -2
- package/source/constraints/abstract.mjs +20 -20
- package/source/constraints/abstractoperator.mjs +3 -3
- package/source/constraints/andoperator.mjs +3 -3
- package/source/constraints/invalid.mjs +3 -3
- package/source/constraints/isarray.mjs +3 -3
- package/source/constraints/isobject.mjs +3 -3
- package/source/constraints/oroperator.mjs +3 -3
- package/source/constraints/valid.mjs +3 -3
- package/source/data/buildmap.mjs +2 -2
- package/source/data/buildtree.mjs +2 -2
- package/source/data/datasource/dom.mjs +3 -3
- package/source/data/datasource/server/restapi/data-fetch-error.mjs +3 -3
- package/source/data/datasource/server/restapi/writeerror.mjs +3 -3
- package/source/data/datasource/server/restapi.mjs +3 -3
- package/source/data/datasource/server/webconnect.mjs +3 -3
- package/source/data/datasource/server.mjs +3 -3
- package/source/data/datasource/storage/localstorage.mjs +3 -3
- package/source/data/datasource/storage/sessionstorage.mjs +3 -3
- package/source/data/datasource/storage.mjs +3 -3
- package/source/data/datasource.mjs +3 -3
- package/source/data/diff.mjs +3 -3
- package/source/data/extend.mjs +3 -3
- package/source/data/pathfinder.mjs +3 -3
- package/source/data/pipe.mjs +3 -3
- package/source/data/transformer.mjs +3 -3
- package/source/dom/assembler.mjs +3 -3
- package/source/dom/attributes.mjs +15 -15
- package/source/dom/constants.mjs +2 -2
- package/source/dom/customcontrol.mjs +2 -2
- package/source/dom/customelement.mjs +4 -4
- package/source/dom/dimension.mjs +3 -3
- package/source/dom/error.mjs +3 -3
- package/source/dom/events.mjs +4 -4
- package/source/dom/focusmanager.mjs +3 -3
- package/source/dom/locale.mjs +3 -3
- package/source/dom/ready.mjs +2 -2
- package/source/dom/resource/data.mjs +3 -3
- package/source/dom/resource/link/stylesheet.mjs +3 -3
- package/source/dom/resource/link.mjs +3 -3
- package/source/dom/resource/script.mjs +3 -3
- package/source/dom/resource.mjs +3 -3
- package/source/dom/resourcemanager.mjs +3 -3
- package/source/dom/slotted.mjs +2 -2
- package/source/dom/template.mjs +4 -4
- package/source/dom/theme.mjs +3 -3
- package/source/dom/updater.mjs +33 -3
- package/source/dom/util/extract-keys.mjs +2 -2
- package/source/dom/util/init-options-from-attributes.mjs +2 -2
- package/source/dom/util/set-option-from-attribute.mjs +2 -2
- package/source/dom/util.mjs +6 -6
- package/source/dom/worker/factory.mjs +3 -3
- package/source/i18n/formatter.mjs +3 -3
- package/source/i18n/internal.mjs +2 -2
- package/source/i18n/locale.mjs +4 -4
- package/source/i18n/map/languages.mjs +2 -2
- package/source/i18n/provider.mjs +3 -3
- package/source/i18n/providers/embed.mjs +3 -3
- package/source/i18n/providers/fetch.mjs +3 -3
- package/source/i18n/time-ago.mjs +2 -2
- package/source/i18n/translations.mjs +3 -3
- package/source/i18n/util.mjs +2 -2
- package/source/logging/handler/console.mjs +3 -3
- package/source/logging/handler.mjs +3 -3
- package/source/logging/logentry.mjs +3 -3
- package/source/logging/logger.mjs +3 -3
- package/source/math/random.mjs +3 -3
- package/source/monster.mjs +4 -4
- package/source/net/webconnect/message.mjs +3 -3
- package/source/net/webconnect.mjs +3 -3
- package/source/text/bracketed-key-value-hash.mjs +2 -2
- package/source/text/formatter.mjs +3 -3
- package/source/text/generate-range-comparison-expression.mjs +3 -3
- package/source/text/markdown-parser.mjs +2 -2
- package/source/text/util.mjs +2 -2
- package/source/types/base.mjs +3 -3
- package/source/types/basewithoptions.mjs +3 -3
- package/source/types/binary.mjs +2 -2
- package/source/types/dataurl.mjs +3 -3
- package/source/types/global.mjs +2 -2
- package/source/types/has.mjs +2 -2
- package/source/types/id.mjs +3 -3
- package/source/types/internal.mjs +3 -3
- package/source/types/is.mjs +12 -12
- package/source/types/mediatype.mjs +3 -3
- package/source/types/node.mjs +3 -3
- package/source/types/nodelist.mjs +3 -3
- package/source/types/noderecursiveiterator.mjs +2 -2
- package/source/types/observablequeue.mjs +3 -3
- package/source/types/observer.mjs +2 -2
- package/source/types/observerlist.mjs +2 -2
- package/source/types/proxyobserver.mjs +4 -4
- package/source/types/queue.mjs +2 -2
- package/source/types/randomid.mjs +3 -3
- package/source/types/regex.mjs +3 -3
- package/source/types/stack.mjs +3 -3
- package/source/types/tokenlist.mjs +3 -3
- package/source/types/typeof.mjs +3 -3
- package/source/types/uniquequeue.mjs +3 -3
- package/source/types/uuid.mjs +3 -3
- package/source/types/validate.mjs +12 -12
- package/source/types/version.mjs +6 -6
- package/source/util/accessiblecolor.mjs +2 -2
- package/source/util/clone.mjs +3 -3
- package/source/util/comparator.mjs +2 -2
- package/source/util/deadmansswitch.mjs +3 -3
- package/source/util/freeze.mjs +3 -3
- package/source/util/processing/callback.mjs +2 -2
- package/source/util/processing.mjs +3 -3
- package/source/util/runtime.mjs +2 -2
- package/source/util/sleep.mjs +2 -2
- package/source/util/trimspaces.mjs +3 -3
- package/test/cases/components/form/button-bar.mjs +62 -0
- package/test/cases/dom/updater.mjs +120 -0
- package/test/cases/types/proxyobserver.mjs +14 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright ©
|
|
2
|
+
* Copyright © Volker Schukai and all contributing authors, {{copyRightYear}}. All rights reserved.
|
|
3
3
|
* Node module: @schukai/monster
|
|
4
4
|
*
|
|
5
5
|
* This source code is licensed under the GNU Affero General Public License version 3 (AGPLv3).
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*
|
|
8
8
|
* For those who do not wish to adhere to the AGPLv3, a commercial license is available.
|
|
9
9
|
* Acquiring a commercial license allows you to use this software without complying with the AGPLv3 terms.
|
|
10
|
-
* For more information about purchasing a commercial license, please contact
|
|
10
|
+
* For more information about purchasing a commercial license, please contact Volker Schukai.
|
|
11
11
|
*
|
|
12
12
|
* SPDX-License-Identifier: AGPL-3.0
|
|
13
13
|
*/
|
|
@@ -27,7 +27,7 @@ export { TokenList };
|
|
|
27
27
|
*
|
|
28
28
|
* @license AGPLv3
|
|
29
29
|
* @since 1.2.0
|
|
30
|
-
* @copyright
|
|
30
|
+
* @copyright Volker Schukai
|
|
31
31
|
*/
|
|
32
32
|
class TokenList extends Base {
|
|
33
33
|
/**
|
package/source/types/typeof.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright ©
|
|
2
|
+
* Copyright © Volker Schukai and all contributing authors, {{copyRightYear}}. All rights reserved.
|
|
3
3
|
* Node module: @schukai/monster
|
|
4
4
|
*
|
|
5
5
|
* This source code is licensed under the GNU Affero General Public License version 3 (AGPLv3).
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*
|
|
8
8
|
* For those who do not wish to adhere to the AGPLv3, a commercial license is available.
|
|
9
9
|
* Acquiring a commercial license allows you to use this software without complying with the AGPLv3 terms.
|
|
10
|
-
* For more information about purchasing a commercial license, please contact
|
|
10
|
+
* For more information about purchasing a commercial license, please contact Volker Schukai.
|
|
11
11
|
*
|
|
12
12
|
* SPDX-License-Identifier: AGPL-3.0
|
|
13
13
|
*/
|
|
@@ -22,7 +22,7 @@ export { typeOf };
|
|
|
22
22
|
* @return {string}
|
|
23
23
|
* @license AGPLv3
|
|
24
24
|
* @since 1.7.0
|
|
25
|
-
* @copyright
|
|
25
|
+
* @copyright Volker Schukai
|
|
26
26
|
* @throws {TypeError} value is not a primitive
|
|
27
27
|
*/
|
|
28
28
|
function typeOf(value) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright ©
|
|
2
|
+
* Copyright © Volker Schukai and all contributing authors, {{copyRightYear}}. All rights reserved.
|
|
3
3
|
* Node module: @schukai/monster
|
|
4
4
|
*
|
|
5
5
|
* This source code is licensed under the GNU Affero General Public License version 3 (AGPLv3).
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*
|
|
8
8
|
* For those who do not wish to adhere to the AGPLv3, a commercial license is available.
|
|
9
9
|
* Acquiring a commercial license allows you to use this software without complying with the AGPLv3 terms.
|
|
10
|
-
* For more information about purchasing a commercial license, please contact
|
|
10
|
+
* For more information about purchasing a commercial license, please contact Volker Schukai.
|
|
11
11
|
*
|
|
12
12
|
* SPDX-License-Identifier: AGPL-3.0
|
|
13
13
|
*/
|
|
@@ -23,7 +23,7 @@ export { UniqueQueue };
|
|
|
23
23
|
*
|
|
24
24
|
* @license AGPLv3
|
|
25
25
|
* @since 1.4.0
|
|
26
|
-
* @copyright
|
|
26
|
+
* @copyright Volker Schukai
|
|
27
27
|
* @summary A queue for unique values
|
|
28
28
|
*/
|
|
29
29
|
class UniqueQueue extends Queue {
|
package/source/types/uuid.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright ©
|
|
2
|
+
* Copyright © Volker Schukai and all contributing authors, {{copyRightYear}}. All rights reserved.
|
|
3
3
|
* Node module: @schukai/monster
|
|
4
4
|
*
|
|
5
5
|
* This source code is licensed under the GNU Affero General Public License version 3 (AGPLv3).
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*
|
|
8
8
|
* For those who do not wish to adhere to the AGPLv3, a commercial license is available.
|
|
9
9
|
* Acquiring a commercial license allows you to use this software without complying with the AGPLv3 terms.
|
|
10
|
-
* For more information about purchasing a commercial license, please contact
|
|
10
|
+
* For more information about purchasing a commercial license, please contact Volker Schukai.
|
|
11
11
|
*
|
|
12
12
|
* SPDX-License-Identifier: AGPL-3.0
|
|
13
13
|
*/
|
|
@@ -25,7 +25,7 @@ export { UUID };
|
|
|
25
25
|
*
|
|
26
26
|
* @license AGPLv3
|
|
27
27
|
* @since 1.25.0
|
|
28
|
-
* @copyright
|
|
28
|
+
* @copyright Volker Schukai
|
|
29
29
|
* @throws {Error} unsupported
|
|
30
30
|
*/
|
|
31
31
|
class UUID extends Base {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright ©
|
|
2
|
+
* Copyright © Volker Schukai and all contributing authors, {{copyRightYear}}. All rights reserved.
|
|
3
3
|
* Node module: @schukai/monster
|
|
4
4
|
*
|
|
5
5
|
* This source code is licensed under the GNU Affero General Public License version 3 (AGPLv3).
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*
|
|
8
8
|
* For those who do not wish to adhere to the AGPLv3, a commercial license is available.
|
|
9
9
|
* Acquiring a commercial license allows you to use this software without complying with the AGPLv3 terms.
|
|
10
|
-
* For more information about purchasing a commercial license, please contact
|
|
10
|
+
* For more information about purchasing a commercial license, please contact Volker Schukai.
|
|
11
11
|
*
|
|
12
12
|
* SPDX-License-Identifier: AGPL-3.0
|
|
13
13
|
*/
|
|
@@ -53,7 +53,7 @@ export {
|
|
|
53
53
|
* @return {*}
|
|
54
54
|
* @license AGPLv3
|
|
55
55
|
* @since 1.2.0
|
|
56
|
-
* @copyright
|
|
56
|
+
* @copyright Volker Schukai
|
|
57
57
|
* @throws {TypeError} value is not a primitive
|
|
58
58
|
* @see {@link isPrimitive}
|
|
59
59
|
* @see {@link Monster.Types.isPrimitive}
|
|
@@ -81,7 +81,7 @@ function validateIterable(value) {
|
|
|
81
81
|
* @return {*}
|
|
82
82
|
* @license AGPLv3
|
|
83
83
|
* @since 1.0.0
|
|
84
|
-
* @copyright
|
|
84
|
+
* @copyright Volker Schukai
|
|
85
85
|
* @throws {TypeError} value is not a primitive
|
|
86
86
|
* @see {@link isPrimitive}
|
|
87
87
|
* @see {@link Monster.Types.isPrimitive}
|
|
@@ -110,7 +110,7 @@ function validatePrimitive(value) {
|
|
|
110
110
|
* @return {*}
|
|
111
111
|
* @license AGPLv3
|
|
112
112
|
* @since 1.0.0
|
|
113
|
-
* @copyright
|
|
113
|
+
* @copyright Volker Schukai
|
|
114
114
|
|
|
115
115
|
* @throws {TypeError} value is not primitive
|
|
116
116
|
*/
|
|
@@ -136,7 +136,7 @@ function validateBoolean(value) {
|
|
|
136
136
|
* @return {*}
|
|
137
137
|
* @license AGPLv3
|
|
138
138
|
* @since 1.0.0
|
|
139
|
-
* @copyright
|
|
139
|
+
* @copyright Volker Schukai
|
|
140
140
|
* @throws {TypeError} value is not a string
|
|
141
141
|
*/
|
|
142
142
|
function validateString(value) {
|
|
@@ -162,7 +162,7 @@ function validateString(value) {
|
|
|
162
162
|
* @return {*}
|
|
163
163
|
* @license AGPLv3
|
|
164
164
|
* @since 1.0.0
|
|
165
|
-
* @copyright
|
|
165
|
+
* @copyright Volker Schukai
|
|
166
166
|
* @throws {TypeError} value is not a object
|
|
167
167
|
*/
|
|
168
168
|
function validateObject(value) {
|
|
@@ -189,7 +189,7 @@ function validateObject(value) {
|
|
|
189
189
|
* @return {*}
|
|
190
190
|
* @license AGPLv3
|
|
191
191
|
* @since 1.5.0
|
|
192
|
-
* @copyright
|
|
192
|
+
* @copyright Volker Schukai
|
|
193
193
|
* @throws {TypeError} value is not an instance of
|
|
194
194
|
*/
|
|
195
195
|
function validateInstance(value, instance) {
|
|
@@ -223,7 +223,7 @@ function validateInstance(value, instance) {
|
|
|
223
223
|
* @return {*}
|
|
224
224
|
* @license AGPLv3
|
|
225
225
|
* @since 1.0.0
|
|
226
|
-
* @copyright
|
|
226
|
+
* @copyright Volker Schukai
|
|
227
227
|
* @throws {TypeError} value is not an array
|
|
228
228
|
*/
|
|
229
229
|
function validateArray(value) {
|
|
@@ -248,7 +248,7 @@ function validateArray(value) {
|
|
|
248
248
|
* @return {*}
|
|
249
249
|
* @license AGPLv3
|
|
250
250
|
* @since 1.9.0
|
|
251
|
-
* @copyright
|
|
251
|
+
* @copyright Volker Schukai
|
|
252
252
|
* @throws {TypeError} value is not an symbol
|
|
253
253
|
*/
|
|
254
254
|
function validateSymbol(value) {
|
|
@@ -274,7 +274,7 @@ function validateSymbol(value) {
|
|
|
274
274
|
* @return {*}
|
|
275
275
|
* @license AGPLv3
|
|
276
276
|
* @since 1.0.0
|
|
277
|
-
* @copyright
|
|
277
|
+
* @copyright Volker Schukai
|
|
278
278
|
* @throws {TypeError} value is not a function
|
|
279
279
|
*/
|
|
280
280
|
function validateFunction(value) {
|
|
@@ -300,7 +300,7 @@ function validateFunction(value) {
|
|
|
300
300
|
* @return {*}
|
|
301
301
|
* @license AGPLv3
|
|
302
302
|
* @since 1.4.0
|
|
303
|
-
* @copyright
|
|
303
|
+
* @copyright Volker Schukai
|
|
304
304
|
* @throws {TypeError} value is not an integer
|
|
305
305
|
*/
|
|
306
306
|
function validateInteger(value) {
|
package/source/types/version.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright ©
|
|
2
|
+
* Copyright © Volker Schukai and all contributing authors, {{copyRightYear}}. All rights reserved.
|
|
3
3
|
* Node module: @schukai/monster
|
|
4
4
|
*
|
|
5
5
|
* This source code is licensed under the GNU Affero General Public License version 3 (AGPLv3).
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*
|
|
8
8
|
* For those who do not wish to adhere to the AGPLv3, a commercial license is available.
|
|
9
9
|
* Acquiring a commercial license allows you to use this software without complying with the AGPLv3 terms.
|
|
10
|
-
* For more information about purchasing a commercial license, please contact
|
|
10
|
+
* For more information about purchasing a commercial license, please contact Volker Schukai.
|
|
11
11
|
*
|
|
12
12
|
* SPDX-License-Identifier: AGPL-3.0
|
|
13
13
|
*/
|
|
@@ -23,8 +23,8 @@ export { Version, getMonsterVersion };
|
|
|
23
23
|
* @externalExample ../../example/types/version-1.mjs
|
|
24
24
|
* @license AGPLv3
|
|
25
25
|
* @since 1.0.0
|
|
26
|
-
* @author
|
|
27
|
-
* @copyright
|
|
26
|
+
* @author Volker Schukai
|
|
27
|
+
* @copyright Volker Schukai
|
|
28
28
|
* @summary The version object contains a semantic version number
|
|
29
29
|
*/
|
|
30
30
|
class Version extends Base {
|
|
@@ -147,8 +147,8 @@ let monsterVersion;
|
|
|
147
147
|
* @return {Version}
|
|
148
148
|
* @license AGPLv3
|
|
149
149
|
* @since 1.0.0
|
|
150
|
-
* @copyright
|
|
151
|
-
* @author
|
|
150
|
+
* @copyright Volker Schukai
|
|
151
|
+
* @author Volker Schukai
|
|
152
152
|
*/
|
|
153
153
|
function getMonsterVersion() {
|
|
154
154
|
if (monsterVersion instanceof Version) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright ©
|
|
2
|
+
* Copyright © Volker Schukai and all contributing authors, {{copyRightYear}}. All rights reserved.
|
|
3
3
|
* Node module: @schukai/monster
|
|
4
4
|
*
|
|
5
5
|
* This source code is licensed under the GNU Affero General Public License version 3 (AGPLv3).
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*
|
|
8
8
|
* For those who do not wish to adhere to the AGPLv3, a commercial license is available.
|
|
9
9
|
* Acquiring a commercial license allows you to use this software without complying with the AGPLv3 terms.
|
|
10
|
-
* For more information about purchasing a commercial license, please contact
|
|
10
|
+
* For more information about purchasing a commercial license, please contact Volker Schukai.
|
|
11
11
|
*
|
|
12
12
|
* SPDX-License-Identifier: AGPL-3.0
|
|
13
13
|
*/
|
package/source/util/clone.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright ©
|
|
2
|
+
* Copyright © Volker Schukai and all contributing authors, {{copyRightYear}}. All rights reserved.
|
|
3
3
|
* Node module: @schukai/monster
|
|
4
4
|
*
|
|
5
5
|
* This source code is licensed under the GNU Affero General Public License version 3 (AGPLv3).
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*
|
|
8
8
|
* For those who do not wish to adhere to the AGPLv3, a commercial license is available.
|
|
9
9
|
* Acquiring a commercial license allows you to use this software without complying with the AGPLv3 terms.
|
|
10
|
-
* For more information about purchasing a commercial license, please contact
|
|
10
|
+
* For more information about purchasing a commercial license, please contact Volker Schukai.
|
|
11
11
|
*
|
|
12
12
|
* SPDX-License-Identifier: AGPL-3.0
|
|
13
13
|
*/
|
|
@@ -38,7 +38,7 @@ export { clone };
|
|
|
38
38
|
* @return {*}
|
|
39
39
|
* @license AGPLv3
|
|
40
40
|
* @since 1.0.0
|
|
41
|
-
* @copyright
|
|
41
|
+
* @copyright Volker Schukai
|
|
42
42
|
* @throws {Error} unable to clone obj! its type isn't supported.
|
|
43
43
|
*/
|
|
44
44
|
function clone(obj) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright ©
|
|
2
|
+
* Copyright © Volker Schukai and all contributing authors, {{copyRightYear}}. All rights reserved.
|
|
3
3
|
* Node module: @schukai/monster
|
|
4
4
|
*
|
|
5
5
|
* This source code is licensed under the GNU Affero General Public License version 3 (AGPLv3).
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*
|
|
8
8
|
* For those who do not wish to adhere to the AGPLv3, a commercial license is available.
|
|
9
9
|
* Acquiring a commercial license allows you to use this software without complying with the AGPLv3 terms.
|
|
10
|
-
* For more information about purchasing a commercial license, please contact
|
|
10
|
+
* For more information about purchasing a commercial license, please contact Volker Schukai.
|
|
11
11
|
*
|
|
12
12
|
* SPDX-License-Identifier: AGPL-3.0
|
|
13
13
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright ©
|
|
2
|
+
* Copyright © Volker Schukai and all contributing authors, {{copyRightYear}}. All rights reserved.
|
|
3
3
|
* Node module: @schukai/monster
|
|
4
4
|
*
|
|
5
5
|
* This source code is licensed under the GNU Affero General Public License version 3 (AGPLv3).
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*
|
|
8
8
|
* For those who do not wish to adhere to the AGPLv3, a commercial license is available.
|
|
9
9
|
* Acquiring a commercial license allows you to use this software without complying with the AGPLv3 terms.
|
|
10
|
-
* For more information about purchasing a commercial license, please contact
|
|
10
|
+
* For more information about purchasing a commercial license, please contact Volker Schukai.
|
|
11
11
|
*
|
|
12
12
|
* SPDX-License-Identifier: AGPL-3.0
|
|
13
13
|
*/
|
|
@@ -25,7 +25,7 @@ export { DeadMansSwitch };
|
|
|
25
25
|
* and again within a defined period of time.
|
|
26
26
|
*
|
|
27
27
|
* @example /example/util/deadmansswitch/simple/ Simple example
|
|
28
|
-
* @copyright
|
|
28
|
+
* @copyright Volker Schukai
|
|
29
29
|
* @license AGPLv3
|
|
30
30
|
* @since 1.29.0
|
|
31
31
|
* @summary Class to be able to execute function chains
|
package/source/util/freeze.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright ©
|
|
2
|
+
* Copyright © Volker Schukai and all contributing authors, {{copyRightYear}}. All rights reserved.
|
|
3
3
|
* Node module: @schukai/monster
|
|
4
4
|
*
|
|
5
5
|
* This source code is licensed under the GNU Affero General Public License version 3 (AGPLv3).
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*
|
|
8
8
|
* For those who do not wish to adhere to the AGPLv3, a commercial license is available.
|
|
9
9
|
* Acquiring a commercial license allows you to use this software without complying with the AGPLv3 terms.
|
|
10
|
-
* For more information about purchasing a commercial license, please contact
|
|
10
|
+
* For more information about purchasing a commercial license, please contact Volker Schukai.
|
|
11
11
|
*
|
|
12
12
|
* SPDX-License-Identifier: AGPL-3.0
|
|
13
13
|
*/
|
|
@@ -23,7 +23,7 @@ export { deepFreeze };
|
|
|
23
23
|
* @license AGPLv3
|
|
24
24
|
* @since 1.0.0
|
|
25
25
|
* @return {object}
|
|
26
|
-
* @copyright
|
|
26
|
+
* @copyright Volker Schukai
|
|
27
27
|
* @throws {TypeError} value is not a object
|
|
28
28
|
*/
|
|
29
29
|
function deepFreeze(object) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright ©
|
|
2
|
+
* Copyright © Volker Schukai and all contributing authors, {{copyRightYear}}. All rights reserved.
|
|
3
3
|
* Node module: @schukai/monster
|
|
4
4
|
*
|
|
5
5
|
* This source code is licensed under the GNU Affero General Public License version 3 (AGPLv3).
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*
|
|
8
8
|
* For those who do not wish to adhere to the AGPLv3, a commercial license is available.
|
|
9
9
|
* Acquiring a commercial license allows you to use this software without complying with the AGPLv3 terms.
|
|
10
|
-
* For more information about purchasing a commercial license, please contact
|
|
10
|
+
* For more information about purchasing a commercial license, please contact Volker Schukai.
|
|
11
11
|
*
|
|
12
12
|
* SPDX-License-Identifier: AGPL-3.0
|
|
13
13
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright ©
|
|
2
|
+
* Copyright © Volker Schukai and all contributing authors, {{copyRightYear}}. All rights reserved.
|
|
3
3
|
* Node module: @schukai/monster
|
|
4
4
|
*
|
|
5
5
|
* This source code is licensed under the GNU Affero General Public License version 3 (AGPLv3).
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*
|
|
8
8
|
* For those who do not wish to adhere to the AGPLv3, a commercial license is available.
|
|
9
9
|
* Acquiring a commercial license allows you to use this software without complying with the AGPLv3 terms.
|
|
10
|
-
* For more information about purchasing a commercial license, please contact
|
|
10
|
+
* For more information about purchasing a commercial license, please contact Volker Schukai.
|
|
11
11
|
*
|
|
12
12
|
* SPDX-License-Identifier: AGPL-3.0
|
|
13
13
|
*/
|
|
@@ -36,7 +36,7 @@ export { Processing };
|
|
|
36
36
|
*
|
|
37
37
|
* @example /examples/libraries/util/processing/simple/ A simple example
|
|
38
38
|
*
|
|
39
|
-
* @copyright
|
|
39
|
+
* @copyright Volker Schukai
|
|
40
40
|
* @license AGPLv3
|
|
41
41
|
* @since 1.21.0
|
|
42
42
|
* @summary Class to be able to execute function chains
|
package/source/util/runtime.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright ©
|
|
2
|
+
* Copyright © Volker Schukai and all contributing authors, {{copyRightYear}}. All rights reserved.
|
|
3
3
|
* Node module: @schukai/monster
|
|
4
4
|
*
|
|
5
5
|
* This source code is licensed under the GNU Affero General Public License version 3 (AGPLv3).
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*
|
|
8
8
|
* For those who do not wish to adhere to the AGPLv3, a commercial license is available.
|
|
9
9
|
* Acquiring a commercial license allows you to use this software without complying with the AGPLv3 terms.
|
|
10
|
-
* For more information about purchasing a commercial license, please contact
|
|
10
|
+
* For more information about purchasing a commercial license, please contact Volker Schukai.
|
|
11
11
|
*
|
|
12
12
|
* SPDX-License-Identifier: AGPL-3.0
|
|
13
13
|
*/
|
package/source/util/sleep.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright ©
|
|
2
|
+
* Copyright © Volker Schukai and all contributing authors, {{copyRightYear}}. All rights reserved.
|
|
3
3
|
* Node module: @schukai/monster
|
|
4
4
|
*
|
|
5
5
|
* This source code is licensed under the GNU Affero General Public License version 3 (AGPLv3).
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*
|
|
8
8
|
* For those who do not wish to adhere to the AGPLv3, a commercial license is available.
|
|
9
9
|
* Acquiring a commercial license allows you to use this software without complying with the AGPLv3 terms.
|
|
10
|
-
* For more information about purchasing a commercial license, please contact
|
|
10
|
+
* For more information about purchasing a commercial license, please contact Volker Schukai.
|
|
11
11
|
*
|
|
12
12
|
* SPDX-License-Identifier: AGPL-3.0
|
|
13
13
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright ©
|
|
2
|
+
* Copyright © Volker Schukai and all contributing authors, {{copyRightYear}}. All rights reserved.
|
|
3
3
|
* Node module: @schukai/monster
|
|
4
4
|
*
|
|
5
5
|
* This source code is licensed under the GNU Affero General Public License version 3 (AGPLv3).
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*
|
|
8
8
|
* For those who do not wish to adhere to the AGPLv3, a commercial license is available.
|
|
9
9
|
* Acquiring a commercial license allows you to use this software without complying with the AGPLv3 terms.
|
|
10
|
-
* For more information about purchasing a commercial license, please contact
|
|
10
|
+
* For more information about purchasing a commercial license, please contact Volker Schukai.
|
|
11
11
|
*
|
|
12
12
|
* SPDX-License-Identifier: AGPL-3.0
|
|
13
13
|
*/
|
|
@@ -37,7 +37,7 @@ export { trimSpaces };
|
|
|
37
37
|
*
|
|
38
38
|
* @license AGPLv3
|
|
39
39
|
* @since 1.24.0
|
|
40
|
-
* @copyright
|
|
40
|
+
* @copyright Volker Schukai
|
|
41
41
|
* @param {string} value
|
|
42
42
|
* @return {string}
|
|
43
43
|
* @throws {TypeError} value is not a string
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import * as chai from "chai";
|
|
2
|
+
import { chaiDom } from "../../../util/chai-dom.mjs";
|
|
3
|
+
import { initJSDOM } from "../../../util/jsdom.mjs";
|
|
4
|
+
|
|
5
|
+
let expect = chai.expect;
|
|
6
|
+
chai.use(chaiDom);
|
|
7
|
+
|
|
8
|
+
const html = `
|
|
9
|
+
<div id="test1">
|
|
10
|
+
<monster-button-bar id="bar"></monster-button-bar>
|
|
11
|
+
</div>
|
|
12
|
+
`;
|
|
13
|
+
|
|
14
|
+
let ButtonBar;
|
|
15
|
+
|
|
16
|
+
describe("ButtonBar", function () {
|
|
17
|
+
before(function (done) {
|
|
18
|
+
initJSDOM()
|
|
19
|
+
.then(() => {
|
|
20
|
+
import("../../../../source/components/form/button-bar.mjs")
|
|
21
|
+
.then((m) => {
|
|
22
|
+
ButtonBar = m.ButtonBar;
|
|
23
|
+
done();
|
|
24
|
+
})
|
|
25
|
+
.catch((e) => done(e));
|
|
26
|
+
})
|
|
27
|
+
.catch((e) => done(e));
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
beforeEach(() => {
|
|
31
|
+
const mocks = document.getElementById("mocks");
|
|
32
|
+
mocks.innerHTML = html;
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
afterEach(() => {
|
|
36
|
+
const mocks = document.getElementById("mocks");
|
|
37
|
+
mocks.innerHTML = "";
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
it("should create a button bar element", function () {
|
|
41
|
+
const bar = document.getElementById("bar");
|
|
42
|
+
expect(bar).to.be.instanceof(ButtonBar);
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
it("should keep the popper switch hidden when no buttons are slotted", function (done) {
|
|
46
|
+
const bar = document.getElementById("bar");
|
|
47
|
+
|
|
48
|
+
setTimeout(() => {
|
|
49
|
+
try {
|
|
50
|
+
const switchButton = bar.shadowRoot.querySelector(
|
|
51
|
+
'[data-monster-role="switch"]',
|
|
52
|
+
);
|
|
53
|
+
expect(switchButton).to.be.instanceof(HTMLButtonElement);
|
|
54
|
+
expect(switchButton.hasAttribute("hidden")).to.be.true;
|
|
55
|
+
expect(switchButton.classList.contains("hidden")).to.be.true;
|
|
56
|
+
done();
|
|
57
|
+
} catch (e) {
|
|
58
|
+
done(e);
|
|
59
|
+
}
|
|
60
|
+
}, 50);
|
|
61
|
+
});
|
|
62
|
+
});
|
|
@@ -109,6 +109,15 @@ let html4 = `
|
|
|
109
109
|
|
|
110
110
|
`;
|
|
111
111
|
|
|
112
|
+
let htmlNested = `
|
|
113
|
+
<div id="parent">
|
|
114
|
+
<input id="parent-input" type="text" data-monster-bind="path:parentVal">
|
|
115
|
+
<div id="child">
|
|
116
|
+
<input id="child-input" type="text" data-monster-bind="path:childVal">
|
|
117
|
+
</div>
|
|
118
|
+
</div>
|
|
119
|
+
`;
|
|
120
|
+
|
|
112
121
|
describe("DOM", function () {
|
|
113
122
|
let Updater = null;
|
|
114
123
|
|
|
@@ -525,6 +534,117 @@ describe("DOM", function () {
|
|
|
525
534
|
});
|
|
526
535
|
});
|
|
527
536
|
|
|
537
|
+
describe("Updater()", function () {
|
|
538
|
+
beforeEach(() => {
|
|
539
|
+
let mocks = document.getElementById("mocks");
|
|
540
|
+
mocks.innerHTML = htmlNested;
|
|
541
|
+
});
|
|
542
|
+
|
|
543
|
+
describe("Nested Eventhandling", function () {
|
|
544
|
+
it("should not propagate child events to parent updater", function (done) {
|
|
545
|
+
const parentObserver = new ProxyObserver({});
|
|
546
|
+
const childObserver = new ProxyObserver({});
|
|
547
|
+
const parentUpdater = new Updater(
|
|
548
|
+
document.getElementById("parent"),
|
|
549
|
+
parentObserver,
|
|
550
|
+
);
|
|
551
|
+
const childUpdater = new Updater(
|
|
552
|
+
document.getElementById("child"),
|
|
553
|
+
childObserver,
|
|
554
|
+
);
|
|
555
|
+
|
|
556
|
+
parentUpdater.enableEventProcessing();
|
|
557
|
+
childUpdater.enableEventProcessing();
|
|
558
|
+
|
|
559
|
+
let parentNotified = false;
|
|
560
|
+
parentObserver.attachObserver(
|
|
561
|
+
new Observer(function () {
|
|
562
|
+
parentNotified = true;
|
|
563
|
+
}),
|
|
564
|
+
);
|
|
565
|
+
|
|
566
|
+
childObserver.attachObserver(
|
|
567
|
+
new Observer(function () {
|
|
568
|
+
try {
|
|
569
|
+
expect(childUpdater.getSubject()["childVal"]).to.equal("child");
|
|
570
|
+
expect(parentUpdater.getSubject()).to.not.have.property(
|
|
571
|
+
"childVal",
|
|
572
|
+
);
|
|
573
|
+
setTimeout(() => {
|
|
574
|
+
if (parentNotified) {
|
|
575
|
+
done(
|
|
576
|
+
new Error(
|
|
577
|
+
"parent updater should not react to child bind events",
|
|
578
|
+
),
|
|
579
|
+
);
|
|
580
|
+
} else {
|
|
581
|
+
done();
|
|
582
|
+
}
|
|
583
|
+
}, 10);
|
|
584
|
+
} catch (e) {
|
|
585
|
+
done(e);
|
|
586
|
+
}
|
|
587
|
+
}),
|
|
588
|
+
);
|
|
589
|
+
|
|
590
|
+
const childInput = document.getElementById("child-input");
|
|
591
|
+
childInput.value = "child";
|
|
592
|
+
childInput.click();
|
|
593
|
+
});
|
|
594
|
+
|
|
595
|
+
it("should handle parent events without triggering child updater", function (done) {
|
|
596
|
+
const parentObserver = new ProxyObserver({});
|
|
597
|
+
const childObserver = new ProxyObserver({});
|
|
598
|
+
const parentUpdater = new Updater(
|
|
599
|
+
document.getElementById("parent"),
|
|
600
|
+
parentObserver,
|
|
601
|
+
);
|
|
602
|
+
const childUpdater = new Updater(
|
|
603
|
+
document.getElementById("child"),
|
|
604
|
+
childObserver,
|
|
605
|
+
);
|
|
606
|
+
|
|
607
|
+
parentUpdater.enableEventProcessing();
|
|
608
|
+
childUpdater.enableEventProcessing();
|
|
609
|
+
|
|
610
|
+
let childNotified = false;
|
|
611
|
+
childObserver.attachObserver(
|
|
612
|
+
new Observer(function () {
|
|
613
|
+
childNotified = true;
|
|
614
|
+
}),
|
|
615
|
+
);
|
|
616
|
+
|
|
617
|
+
parentObserver.attachObserver(
|
|
618
|
+
new Observer(function () {
|
|
619
|
+
try {
|
|
620
|
+
expect(parentUpdater.getSubject()["parentVal"]).to.equal("parent");
|
|
621
|
+
expect(childUpdater.getSubject()).to.not.have.property(
|
|
622
|
+
"parentVal",
|
|
623
|
+
);
|
|
624
|
+
setTimeout(() => {
|
|
625
|
+
if (childNotified) {
|
|
626
|
+
done(
|
|
627
|
+
new Error(
|
|
628
|
+
"child updater should not react to parent bind events",
|
|
629
|
+
),
|
|
630
|
+
);
|
|
631
|
+
} else {
|
|
632
|
+
done();
|
|
633
|
+
}
|
|
634
|
+
}, 10);
|
|
635
|
+
} catch (e) {
|
|
636
|
+
done(e);
|
|
637
|
+
}
|
|
638
|
+
}),
|
|
639
|
+
);
|
|
640
|
+
|
|
641
|
+
const parentInput = document.getElementById("parent-input");
|
|
642
|
+
parentInput.value = "parent";
|
|
643
|
+
parentInput.click();
|
|
644
|
+
});
|
|
645
|
+
});
|
|
646
|
+
});
|
|
647
|
+
|
|
528
648
|
describe("Updater()", function () {
|
|
529
649
|
beforeEach(() => {
|
|
530
650
|
let mocks = document.getElementById("mocks");
|
|
@@ -216,5 +216,18 @@ describe('ProxyObserver', function () {
|
|
|
216
216
|
});
|
|
217
217
|
});
|
|
218
218
|
|
|
219
|
-
|
|
219
|
+
describe('setPrototypeOf', function () {
|
|
220
|
+
it('should allow setPrototypeOf and notify observer', function (done) {
|
|
221
|
+
const proxy = new ProxyObserver({});
|
|
222
|
+
const observer = new Observer(function () {
|
|
223
|
+
done();
|
|
224
|
+
});
|
|
225
|
+
proxy.attachObserver(observer);
|
|
226
|
+
|
|
227
|
+
const proto = {flag: true};
|
|
228
|
+
Object.setPrototypeOf(proxy.getSubject(), proto);
|
|
229
|
+
expect(Object.getPrototypeOf(proxy.getSubject())).to.equal(proto);
|
|
230
|
+
});
|
|
231
|
+
});
|
|
220
232
|
|
|
233
|
+
})
|