Socket
Socket
Sign inDemoInstall

@ui5/webcomponents-base

Package Overview
Dependencies
Maintainers
5
Versions
482
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ui5/webcomponents-base - npm Package Compare versions

Comparing version 1.24.0-rc.3 to 1.24.0-rc.4

dist/renderer/directives/style-map.d.ts

1

bundle.esm.js

@@ -8,2 +8,3 @@ import { registerThemePropertiesLoader } from "./dist/AssetRegistry.js";

// Test components
import "./test/elements/Accessor.js";
import "./test/elements/Generic.js";

@@ -10,0 +11,0 @@ import "./test/elements/NoShadowDOM.js";

6

dist/generated/VersionInfo.js
const VersionInfo = {
version: "1.24.0-rc.3",
version: "1.24.0-rc.4",
major: 1,
minor: 24,
patch: 0,
suffix: "-rc.3",
suffix: "-rc.4",
isNext: false,
buildTime: 1711613172,
buildTime: 1712218015,
};
export default VersionInfo;
//# sourceMappingURL=VersionInfo.js.map

@@ -0,1 +1,3 @@

// @ts-nocheck
/* eslint-disable */
/**

@@ -6,68 +8,66 @@ * @license

*/
/**
* This is the original style-map.js directive from lit-html 2 with the only difference that "render" is not called even for the first rendering (update is used instead)
*/
import { noChange } from 'lit-html';
import { directive, Directive, PartType, } from 'lit-html/directive.js';
class StyleMapDirective extends Directive {
constructor(partInfo) {
var _a;
super(partInfo);
if (partInfo.type !== PartType.ATTRIBUTE ||
partInfo.name !== 'style' ||
((_a = partInfo.strings) === null || _a === void 0 ? void 0 : _a.length) > 2) {
throw new Error('The `styleMap` directive must be used in the `style` attribute ' +
'and must be the only part in the attribute.');
}
}
render(styleInfo) {
return "";
}
update(part, [styleInfo]) {
const { style } = part.element;
if (this._previousStyleProperties === undefined) {
this._previousStyleProperties = new Set();
for (const name in styleInfo) {
this._previousStyleProperties.add(name);
}
// return this.render(styleInfo);
}
// Remove old properties that no longer exist in styleInfo
// We use forEach() instead of for-of so that re don't require down-level
// iteration.
this._previousStyleProperties.forEach((name) => {
// If the name isn't in styleInfo or it's null/undefined
if (styleInfo[name] == null) {
this._previousStyleProperties.delete(name);
if (name.includes('-')) {
style.removeProperty(name);
}
else {
// Note reset using empty string (vs null) as IE11 does not always
// reset via null (https://developer.mozilla.org/en-US/docs/Web/API/ElementCSSInlineStyle/style#setting_styles)
// eslint-disable-next-line @typescript-eslint/no-explicit-any
style[name] = '';
}
}
});
// Add or update properties
for (const name in styleInfo) {
const value = styleInfo[name];
if (value != null) {
this._previousStyleProperties.add(name);
if (name.includes('-')) {
style.setProperty(name, value);
}
else {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
style[name] = value;
}
}
}
return noChange;
}
constructor(partInfo) {
var _a;
super(partInfo);
if (partInfo.type !== PartType.ATTRIBUTE ||
partInfo.name !== 'style' ||
((_a = partInfo.strings) === null || _a === void 0 ? void 0 : _a.length) > 2) {
throw new Error('The `styleMap` directive must be used in the `style` attribute ' +
'and must be the only part in the attribute.');
}
}
render(styleInfo) {
return "";
}
update(part, [styleInfo]) {
const { style } = part.element;
if (this._previousStyleProperties === undefined) {
this._previousStyleProperties = new Set();
for (const name in styleInfo) {
this._previousStyleProperties.add(name);
}
// return this.render(styleInfo);
}
// Remove old properties that no longer exist in styleInfo
// We use forEach() instead of for-of so that re don't require down-level
// iteration.
this._previousStyleProperties.forEach((name) => {
// If the name isn't in styleInfo or it's null/undefined
if (styleInfo[name] == null) {
this._previousStyleProperties.delete(name);
if (name.includes('-')) {
style.removeProperty(name);
}
else {
// Note reset using empty string (vs null) as IE11 does not always
// reset via null (https://developer.mozilla.org/en-US/docs/Web/API/ElementCSSInlineStyle/style#setting_styles)
// eslint-disable-next-line @typescript-eslint/no-explicit-any
style[name] = '';
}
}
});
// Add or update properties
for (const name in styleInfo) {
const value = styleInfo[name];
if (value != null) {
this._previousStyleProperties.add(name);
if (name.includes('-')) {
style.setProperty(name, value);
}
else {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
style[name] = value;
}
}
}
return noChange;
}
}
export const styleMap = directive(StyleMapDirective);
//# sourceMappingURL=style-map.js.map

@@ -18,2 +18,12 @@ type PromiseResolve = (value: void | PromiseLike<void>) => void;

};
export type { PromiseResolve, Timeout, Interval, StyleData, StyleDataCSP, ComponentStylesData, ClassMap, ClassMapValue, PassiveEventListenerObject, };
type LowercaseString<T> = T extends string ? Lowercase<T> : never;
type AccessibilityInfo = {
role?: LowercaseString<string>;
type?: LowercaseString<string>;
description?: string;
disabled?: boolean;
readonly?: boolean;
required?: boolean;
children?: Array<HTMLElement>;
};
export type { AccessibilityInfo, PromiseResolve, Timeout, Interval, StyleData, StyleDataCSP, ComponentStylesData, ClassMap, ClassMapValue, PassiveEventListenerObject, };

@@ -6,3 +6,3 @@ import "@ui5/webcomponents-base/dist/ssr-dom.js";

import type { TemplateFunction, TemplateFunctionResult } from "./renderer/executeTemplate.js";
import type { PromiseResolve, ComponentStylesData, ClassMap } from "./types.js";
import type { AccessibilityInfo, PromiseResolve, ComponentStylesData, ClassMap } from "./types.js";
type Renderer = (templateResult: TemplateFunctionResult, container: HTMLElement | DocumentFragment, styleStrOrHrefsArr: string | Array<string> | undefined, forStaticArea: boolean, options: RendererOptions) => void;

@@ -308,2 +308,7 @@ type RendererOptions = {

/**
* Returns the component accessibility info.
* @private
*/
get accessibilityInfo(): AccessibilityInfo;
/**
* Do not override this method in derivatives of UI5Element, use metadata properties instead

@@ -310,0 +315,0 @@ * @private

@@ -736,2 +736,9 @@ // eslint-disable-next-line import/no-extraneous-dependencies

/**
* Returns the component accessibility info.
* @private
*/
get accessibilityInfo() {
return {};
}
/**
* Do not override this method in derivatives of UI5Element, use metadata properties instead

@@ -795,4 +802,21 @@ * @private

}
const descriptor = Object.getOwnPropertyDescriptor(proto, prop);
// if the decorator is on a setter, proxy the new setter to it
let origSet;
if (descriptor?.set) {
// eslint-disable-next-line @typescript-eslint/unbound-method
origSet = descriptor.set;
}
// if the decorator is on a setter, there will be a corresponding getter - proxy the new getter to it
let origGet;
if (descriptor?.get) {
// eslint-disable-next-line @typescript-eslint/unbound-method
origGet = descriptor.get;
}
Object.defineProperty(proto, prop, {
get() {
// proxy the getter to the original accessor if there was one
if (origGet) {
return origGet.call(this);
}
if (this._state[prop] !== undefined) {

@@ -822,3 +846,3 @@ return this._state[prop];

let propertyValidator = propData.validator;
const oldState = this._state[prop];
const oldState = origGet ? origGet.call(this) : this._state[prop];
if (propertyType && propertyType.isDataTypeClass) {

@@ -837,3 +861,9 @@ propertyValidator = propertyType;

if (isDifferent) {
this._state[prop] = value;
// if the decorator is on a setter, use it for storage
if (origSet) {
origSet.call(this, value);
}
else {
this._state[prop] = value;
}
_invalidate.call(this, {

@@ -840,0 +870,0 @@ type: "property",

@@ -74,2 +74,3 @@ import type UI5Element from "../UI5Element.js";

readonly classes: import("../types.js").ClassMap;
readonly accessibilityInfo: import("../types.js").AccessibilityInfo;
getStaticAreaItemDomRef(): Promise<ShadowRoot | null>;

@@ -76,0 +77,0 @@ accessKey: string;

{
"name": "@ui5/webcomponents-base",
"version": "1.24.0-rc.3",
"version": "1.24.0-rc.4",
"description": "UI5 Web Components: webcomponents.base",

@@ -48,3 +48,3 @@ "author": "SAP SE (https://www.sap.com)",

"@openui5/sap.ui.core": "1.120.5",
"@ui5/webcomponents-tools": "1.24.0-rc.3",
"@ui5/webcomponents-tools": "1.24.0-rc.4",
"chromedriver": "^122.0.6",

@@ -59,3 +59,3 @@ "clean-css": "^5.2.2",

},
"gitHead": "6d87e2d4ab7f291614bf56ab81422cfa5565bea1"
"gitHead": "58608f25543f7ec7287f673a607f867d457d9850"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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