Socket
Socket
Sign inDemoInstall

@lrnwebcomponents/hax-body-behaviors

Package Overview
Dependencies
Maintainers
4
Versions
127
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lrnwebcomponents/hax-body-behaviors - npm Package Compare versions

Comparing version 8.0.0 to 8.0.1

6

lib/HAXFields.js

@@ -127,2 +127,8 @@ /**

},
radio: {
defaultSettings: {
type: "string",
format: "radio",
},
},
slider: {

@@ -129,0 +135,0 @@ defaultSettings: {

30

lib/HAXLayouts.js

@@ -65,3 +65,3 @@ import { css } from "lit";

opacity: 0.2;
transition: 0.2s all ease-in-out;
transition: 0.3s all ease-in-out;
}

@@ -176,11 +176,11 @@ :host([data-hax-ray]) ::slotted(*:hover) {

"dragenter",
this._dragEnter.bind(this)
this._dragEnter.bind(this),
);
container.addEventListener(
"dragleave",
this._dragLeave.bind(this)
this._dragLeave.bind(this),
);
});
slots.forEach((slot) =>
slot.addEventListener("slotchange", this._slotMonitor.bind(this))
slot.addEventListener("slotchange", this._slotMonitor.bind(this)),
);

@@ -231,7 +231,7 @@ this.observer = new MutationObserver((mutations) => {

"dragenter",
this._dragEnter.bind(this)
this._dragEnter.bind(this),
);
container.removeEventListener(
"dragleave",
this._dragLeave.bind(this)
this._dragLeave.bind(this),
);

@@ -242,4 +242,4 @@ });

"slotchange",
this._slotMonitor.bind(this)
)
this._slotMonitor.bind(this),
),
);

@@ -251,3 +251,3 @@ }

["responsiveSize", "layout", "layouts", "disableResponsive"].includes(
propName
propName,
)

@@ -261,3 +261,3 @@ ) {

this.layouts,
this.disableResponsive
this.disableResponsive,
);

@@ -278,3 +278,3 @@ }, 0);

detail: this[propName],
})
}),
);

@@ -360,3 +360,3 @@ break;

.map((container) =>
parseInt(container.getAttribute("data-layout-order") || -1)
parseInt(container.getAttribute("data-layout-order") || -1),
)

@@ -378,3 +378,3 @@ .sort((a, b) => a - b),

container = this.shadowRoot.querySelector(
`[data-layout-order=${dest}]`
`[data-layout-order=${dest}]`,
),

@@ -394,3 +394,3 @@ slot = container.getAttribute("data-layout-slotname");

? [...this.shadowRoot.querySelectorAll("[data-layout-order]")].map(
(container) => container.getAttribute("data-layout-slotname")
(container) => container.getAttribute("data-layout-slotname"),
)

@@ -411,3 +411,3 @@ : [];

},
[]
[],
);

@@ -414,0 +414,0 @@ // sort the children by slot id being low to high

@@ -248,10 +248,10 @@ /**

}
window.addEventListener(
globalThis.addEventListener(
"hax-store-ready",
this._haxStoreReady.bind(this)
this._haxStoreReady.bind(this),
);
if (
typeof window.HaxStore !== typeof undefined &&
window.HaxStore.instance != null &&
window.HaxStore.instance.ready
typeof globalThis.HaxStore !== typeof undefined &&
globalThis.HaxStore.instance != null &&
globalThis.HaxStore.instance.ready
) {

@@ -275,3 +275,3 @@ return this.setHaxProperties(props, tag, context, true);

let context = this;
if (tag != "" && typeof window.HaxStore === typeof undefined) {
if (tag != "" && typeof globalThis.HaxStore === typeof undefined) {
const evt = new CustomEvent("hax-register-properties", {

@@ -289,3 +289,3 @@ bubbles: true,

tag != "" &&
typeof window.HaxStore.instance.elementList[tag.toLowerCase()] ===
typeof globalThis.HaxStore.instance.elementList[tag.toLowerCase()] ===
typeof undefined

@@ -305,3 +305,3 @@ ) {

typeof this.tagName !== typeof undefined &&
typeof window.HaxStore.instance.elementList[
typeof globalThis.HaxStore.instance.elementList[
this.tagName.toLowerCase()

@@ -332,3 +332,3 @@ ] === typeof undefined

context = document,
isReady = false
isReady = false,
) => {

@@ -382,4 +382,4 @@ // support remote loading from a string

var basePath;
if (window.WCGlobalBasePath) {
basePath = window.WCGlobalBasePath;
if (globalThis.WCGlobalBasePath) {
basePath = globalThis.WCGlobalBasePath;
} else {

@@ -400,3 +400,3 @@ basePath = new URL("./../../../", import.meta.url).href;

props.settings.configure[i] = this.validateSetting(
props.settings.configure[i]
props.settings.configure[i],
);

@@ -412,3 +412,3 @@ if (!props.settings.configure[i]) {

props.settings.advanced[i] = this.validateSetting(
props.settings.advanced[i]
props.settings.advanced[i],
);

@@ -424,3 +424,3 @@ if (!props.settings.advanced[i]) {

props.settings.developer[i] = this.validateSetting(
props.settings.developer[i]
props.settings.developer[i],
);

@@ -473,3 +473,3 @@ if (!props.settings.developer[i]) {

console.warn(
"This is't a valid usage of hax API. See hax-body-behaviors/lib/HAXWiring.js for more details on how to implement the API. https://haxtheweb.org/hax-schema for details but we will try and guess the wiring"
"This is't a valid usage of hax API. See hax-body-behaviors/lib/HAXWiring.js for more details on how to implement the API. https://haxtheweb.org/hax-schema for details but we will try and guess the wiring",
);

@@ -479,3 +479,3 @@ }

this.readyToFireHAXSchema = (tag, props, context) => {
if (tag != "" && typeof window.HaxStore === typeof undefined) {
if (tag != "" && typeof globalThis.HaxStore === typeof undefined) {
const evt = new CustomEvent("hax-register-properties", {

@@ -527,3 +527,3 @@ bubbles: true,

console.warn(
`${tag} missed our checks and has an issue in implementation with HAX`
`${tag} missed our checks and has an issue in implementation with HAX`,
);

@@ -809,5 +809,5 @@ }

haxProperties.gizmo.tag &&
window.customElements.get(haxProperties.gizmo.tag)
globalThis.customElements.get(haxProperties.gizmo.tag)
) {
let tmp = document.createElement(haxProperties.gizmo.tag);
let tmp = globalThis.document.createElement(haxProperties.gizmo.tag);
if (typeof tmp.postProcessgetHaxJSONSchema === "function") {

@@ -852,3 +852,3 @@ schema = tmp.postProcessgetHaxJSONSchema(schema);

var methods = Object.keys(
new SimpleFields().fieldsConversion.inputMethod
new SimpleFields().fieldsConversion.inputMethod,
);

@@ -994,3 +994,3 @@ return methods;

*/
haxProperties: window.HAXWiring.haxProperties,
haxProperties: globalThis.HAXWiring.haxProperties,
};

@@ -1008,5 +1008,5 @@ }

if (
window.HaxStore &&
window.HaxStore.instance != null &&
window.HaxStore.instance.ready
globalThis.HaxStore &&
globalThis.HaxStore.instance != null &&
globalThis.HaxStore.instance.ready
) {

@@ -1016,6 +1016,6 @@ return this.HAXWiring.setHaxProperties(props, tag, context, true);

// slow load environment, set listener and hold off of processing
window.addEventListener(
globalThis.addEventListener(
"hax-store-ready",
this._haxStoreReady.bind(this),
{ signal: this.windowControllers.signal }
{ signal: this.windowControllers.signal },
);

@@ -1106,6 +1106,6 @@

// invoke an instance so we can support behaviors as well
window.HAXWiring = new HAXWiring();
globalThis.HAXWiring = new HAXWiring();
// ensure HAXPropertiesBehaviors exists
window.HAXBehaviors = window.HAXBehaviors || {};
window.HAXBehaviors.PropertiesBehaviors = {
globalThis.HAXBehaviors = globalThis.HAXBehaviors || {};
globalThis.HAXBehaviors.PropertiesBehaviors = {
properties: {

@@ -1115,3 +1115,3 @@ /**

*/
haxProperties: window.HAXWiring.haxProperties,
haxProperties: globalThis.HAXWiring.haxProperties,
},

@@ -1127,11 +1127,14 @@ /**

}
window.addEventListener("hax-store-ready", this._haxStoreReady.bind(this));
globalThis.addEventListener(
"hax-store-ready",
this._haxStoreReady.bind(this),
);
if (
typeof window.HaxStore !== typeof undefined &&
window.HaxStore.instance != null &&
window.HaxStore.instance.ready
typeof globalThis.HaxStore !== typeof undefined &&
globalThis.HaxStore.instance != null &&
globalThis.HaxStore.instance.ready
) {
return window.HAXWiring.setHaxProperties(props, tag, context, true);
return globalThis.HAXWiring.setHaxProperties(props, tag, context, true);
} else {
return window.HAXWiring.setHaxProperties(props, tag, context, false);
return globalThis.HAXWiring.setHaxProperties(props, tag, context, false);
}

@@ -1143,3 +1146,3 @@ },

_haxStoreReady: function (e) {
return window.HAXWiring._haxStoreReady(e);
return globalThis.HAXWiring._haxStoreReady(e);
},

@@ -1150,3 +1153,3 @@ /**

validateSetting: function (setting) {
return window.HAXWiring.validateSetting(setting);
return globalThis.HAXWiring.validateSetting(setting);
},

@@ -1165,3 +1168,3 @@ /**

getHaxJSONSchema: function (type, haxProperties, target = this) {
return window.HAXWiring.getHaxJSONSchema(type, haxProperties, target);
return globalThis.HAXWiring.getHaxJSONSchema(type, haxProperties, target);
},

@@ -1172,3 +1175,3 @@ /**

postProcessgetHaxJSONSchema: function (schema) {
return window.HAXWiring.postProcessgetHaxJSONSchema(schema);
return globalThis.HAXWiring.postProcessgetHaxJSONSchema(schema);
},

@@ -1186,3 +1189,3 @@ /**

getHaxJSONSchemaType: function (inputMethod) {
return window.HAXWiring.getHaxJSONSchemaType(inputMethod);
return globalThis.HAXWiring.getHaxJSONSchemaType(inputMethod);
},

@@ -1193,3 +1196,3 @@ /**

validHAXPropertyInputMethod: function () {
return window.HAXWiring.validHAXPropertyInputMethod();
return globalThis.HAXWiring.validHAXPropertyInputMethod();
},

@@ -1200,4 +1203,4 @@ /**

prototypeHaxProperties: function () {
return window.HAXWiring.prototypeHaxProperties();
return globalThis.HAXWiring.prototypeHaxProperties();
},
};

@@ -15,3 +15,3 @@ {

},
"version": "8.0.0",
"version": "8.0.1",
"description": "Wire any element up to HAX",

@@ -32,18 +32,19 @@ "repository": {

"lighthouse": "gulp lighthouse --gulpfile=gulpfile.cjs",
"test:watch": "web-test-runner \"test/**/*.test.js\" --node-resolve --config=../../web-test-runner.config.mjs --playwright --browsers chromium firefox --watch",
"test": "web-test-runner \"test/**/*.test.js\" --node-resolve --config=../../web-test-runner.config.mjs --playwright --browsers chromium firefox"
"test:watch": "web-test-runner \"test/**/*.test.js\" --node-resolve --config=../../web-test-runner.config.mjs --playwright --browsers chromium --watch",
"test": "web-test-runner \"test/**/*.test.js\" --node-resolve --config=../../web-test-runner.config.mjs --playwright --browsers chromium"
},
"author": {
"name": "btopro"
"name": "haxtheweb",
"url": "https://hax.psu.edu/"
},
"license": "Apache-2.0",
"devDependencies": {
"@lrnwebcomponents/deduping-fix": "^8.0.0",
"@lrnwebcomponents/storybook-utilities": "^8.0.0",
"@open-wc/testing": "3.2.0",
"@lrnwebcomponents/deduping-fix": "^8.0.1",
"@lrnwebcomponents/storybook-utilities": "^8.0.1",
"@open-wc/testing": "4.0.0",
"@polymer/iron-component-page": "github:PolymerElements/iron-component-page",
"@polymer/iron-demo-helpers": "3.1.0",
"@web/dev-server": "0.3.1",
"@web/dev-server": "0.4.2",
"@webcomponents/webcomponentsjs": "^2.8.0",
"concurrently": "8.2.0",
"concurrently": "8.2.2",
"wct-browser-legacy": "1.0.2"

@@ -60,3 +61,3 @@ },

],
"gitHead": "2791492ff7ab40c7d4c827c4b305e33c0a971230"
"gitHead": "246242dfc335bb0f3baa59f801241be9d3b69180"
}

@@ -8,5 +8,5 @@ import { fixture, expect, html } from "@open-wc/testing";

beforeEach(async () => {
element = await fixture(
html` <hax-body-behaviors title="test-title"></hax-body-behaviors> `
);
element = await fixture(html`
<hax-body-behaviors title="test-title"></hax-body-behaviors>
`);
});

@@ -13,0 +13,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc