@ui5/webcomponents-base 2.19.1 → 2.20.0-rc.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/AGENTS.md +3 -1
- package/CHANGELOG.md +1 -1
- package/dist/.tsbuildinfobuild +1 -1
- package/dist/decorators/slot-strict.d.ts +23 -0
- package/dist/decorators/slot-strict.js +23 -0
- package/dist/decorators/slot-strict.js.map +1 -1
- package/dist/decorators/slot.d.ts +18 -0
- package/dist/decorators/slot.js +18 -0
- package/dist/decorators/slot.js.map +1 -1
- package/dist/generated/VersionInfo.js +5 -5
- package/dist/generated/VersionInfo.js.map +1 -1
- package/dist/prod/decorators/slot-strict.js.map +2 -2
- package/dist/prod/decorators/slot.js.map +2 -2
- package/dist/prod/generated/VersionInfo.js +1 -1
- package/dist/prod/generated/VersionInfo.js.map +2 -2
- package/package.json +4 -4
|
@@ -1,4 +1,27 @@
|
|
|
1
1
|
import type { Slot, DefaultSlot } from "../UI5Element.js";
|
|
2
2
|
import type { Slot as SlotMetadata } from "../UI5ElementMetadata.js";
|
|
3
|
+
/**
|
|
4
|
+
* Decorator for declaring a slot in a UI5 Web Component.
|
|
5
|
+
* It adds the slot metadata to the component's constructor.
|
|
6
|
+
*
|
|
7
|
+
* @public
|
|
8
|
+
* @since 2.19.0
|
|
9
|
+
* @param { SlotMetadata } slotData - Optional metadata for the slot, including type and default flag.
|
|
10
|
+
*
|
|
11
|
+
* Example usage:
|
|
12
|
+
* ```ts
|
|
13
|
+
* import slot from "@ui5/webcomponents-base/dist/decorators/slot-strict.js";
|
|
14
|
+
* import type { DefaultSlot, Slot } from "@ui5/webcomponents-base/dist/UI5Element.js";
|
|
15
|
+
*
|
|
16
|
+
* class MyComponent extends UI5Element {
|
|
17
|
+
*
|
|
18
|
+
* @slot()
|
|
19
|
+
* header!: Slot<HTMLElement>;
|
|
20
|
+
*
|
|
21
|
+
* @slot({ type: HTMLElement, default: true })
|
|
22
|
+
* items!: DefaultSlot<HTMLElement>;
|
|
23
|
+
* }
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
3
26
|
declare function slot<T extends Record<K, Slot<unknown> | DefaultSlot<unknown>>, K extends string>(slotData?: SlotMetadata): (target: T, prop: K) => void;
|
|
4
27
|
export default slot;
|
|
@@ -1,3 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Decorator for declaring a slot in a UI5 Web Component.
|
|
3
|
+
* It adds the slot metadata to the component's constructor.
|
|
4
|
+
*
|
|
5
|
+
* @public
|
|
6
|
+
* @since 2.19.0
|
|
7
|
+
* @param { SlotMetadata } slotData - Optional metadata for the slot, including type and default flag.
|
|
8
|
+
*
|
|
9
|
+
* Example usage:
|
|
10
|
+
* ```ts
|
|
11
|
+
* import slot from "@ui5/webcomponents-base/dist/decorators/slot-strict.js";
|
|
12
|
+
* import type { DefaultSlot, Slot } from "@ui5/webcomponents-base/dist/UI5Element.js";
|
|
13
|
+
*
|
|
14
|
+
* class MyComponent extends UI5Element {
|
|
15
|
+
*
|
|
16
|
+
* @slot()
|
|
17
|
+
* header!: Slot<HTMLElement>;
|
|
18
|
+
*
|
|
19
|
+
* @slot({ type: HTMLElement, default: true })
|
|
20
|
+
* items!: DefaultSlot<HTMLElement>;
|
|
21
|
+
* }
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
1
24
|
function slot(slotData) {
|
|
2
25
|
return (target, slotKey) => {
|
|
3
26
|
const ctor = target.constructor;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slot-strict.js","sourceRoot":"","sources":["../../src/decorators/slot-strict.ts"],"names":[],"mappings":"AAIA,SAAS,IAAI,CAGX,QAAuB;IACxB,OAAO,CAAC,MAAW,EAAE,OAAwB,EAAE,EAAE;QAChD,MAAM,IAAI,GAAG,MAAM,CAAC,WAAgC,CAAC;QAErD,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,EAAE,UAAU,CAAC,EAAE,CAAC;YAC7D,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAC;QACpB,CAAC;QAED,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;QAC/B,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC;YACrB,QAAQ,CAAC,KAAK,GAAG,EAAE,CAAC;QACrB,CAAC;QAED,MAAM,YAAY,GAAG,QAAQ,CAAC,KAAK,CAAC;QAEpC,IAAI,QAAQ,IAAI,QAAQ,CAAC,OAAO,IAAI,YAAY,CAAC,OAAO,EAAE,CAAC;YAC1D,MAAM,IAAI,KAAK,CAAC,wCAAwC,CAAC,CAAC;QAC3D,CAAC;QAED,MAAM,GAAG,GAAG,QAAQ,IAAI,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAE,OAAkB,CAAC;QAC3E,QAAQ,GAAG,QAAQ,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC;QAE7C,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;YACpB,QAAQ,CAAC,IAAI,GAAG,WAAW,CAAC;QAC7B,CAAC;QAED,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,EAAE,CAAC;YACxB,YAAY,CAAC,GAAG,CAAC,GAAG,QAAQ,CAAC;QAC9B,CAAC;QAED,IAAI,QAAQ,CAAC,OAAO,EAAE,CAAC;YACtB,OAAO,YAAY,CAAC,OAAO,CAAC,OAAO,CAAC;YACpC,YAAY,CAAC,OAAO,CAAC,YAAY,GAAG,OAAiB,CAAC;QACvD,CAAC;QAED,IAAI,CAAC,QAAQ,CAAC,YAAY,GAAG,IAAI,CAAC;IACnC,CAAC,CAAC;AACH,CAAC;AAED,eAAe,IAAI,CAAC","sourcesContent":["import type UI5Element from \"../UI5Element.js\";\nimport type { Slot, DefaultSlot } from \"../UI5Element.js\";\nimport type { Slot as SlotMetadata } from \"../UI5ElementMetadata.js\";\n\nfunction slot<\n\tT extends Record<K, Slot<unknown> | DefaultSlot<unknown>>,\n\tK extends string\n>(slotData?: SlotMetadata): (target: T, prop: K) => void {\n\treturn (target: any, slotKey: string | symbol) => {\n\t\tconst ctor = target.constructor as typeof UI5Element;\n\n\t\tif (!Object.prototype.hasOwnProperty.call(ctor, \"metadata\")) {\n\t\t\tctor.metadata = {};\n\t\t}\n\n\t\tconst metadata = ctor.metadata;\n\t\tif (!metadata.slots) {\n\t\t\tmetadata.slots = {};\n\t\t}\n\n\t\tconst slotMetadata = metadata.slots;\n\n\t\tif (slotData && slotData.default && slotMetadata.default) {\n\t\t\tthrow new Error(\"Only one slot can be the default slot.\");\n\t\t}\n\n\t\tconst key = slotData && slotData.default ? \"default\" : (slotKey as string);\n\t\tslotData = slotData || { type: HTMLElement };\n\n\t\tif (!slotData.type) {\n\t\t\tslotData.type = HTMLElement;\n\t\t}\n\n\t\tif (!slotMetadata[key]) {\n\t\t\tslotMetadata[key] = slotData;\n\t\t}\n\n\t\tif (slotData.default) {\n\t\t\tdelete slotMetadata.default.default;\n\t\t\tslotMetadata.default.propertyName = slotKey as string;\n\t\t}\n\n\t\tctor.metadata.managedSlots = true;\n\t};\n}\n\nexport default slot;\n"]}
|
|
1
|
+
{"version":3,"file":"slot-strict.js","sourceRoot":"","sources":["../../src/decorators/slot-strict.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,SAAS,IAAI,CAGX,QAAuB;IACxB,OAAO,CAAC,MAAW,EAAE,OAAwB,EAAE,EAAE;QAChD,MAAM,IAAI,GAAG,MAAM,CAAC,WAAgC,CAAC;QAErD,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,EAAE,UAAU,CAAC,EAAE,CAAC;YAC7D,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAC;QACpB,CAAC;QAED,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;QAC/B,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC;YACrB,QAAQ,CAAC,KAAK,GAAG,EAAE,CAAC;QACrB,CAAC;QAED,MAAM,YAAY,GAAG,QAAQ,CAAC,KAAK,CAAC;QAEpC,IAAI,QAAQ,IAAI,QAAQ,CAAC,OAAO,IAAI,YAAY,CAAC,OAAO,EAAE,CAAC;YAC1D,MAAM,IAAI,KAAK,CAAC,wCAAwC,CAAC,CAAC;QAC3D,CAAC;QAED,MAAM,GAAG,GAAG,QAAQ,IAAI,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAE,OAAkB,CAAC;QAC3E,QAAQ,GAAG,QAAQ,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC;QAE7C,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;YACpB,QAAQ,CAAC,IAAI,GAAG,WAAW,CAAC;QAC7B,CAAC;QAED,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,EAAE,CAAC;YACxB,YAAY,CAAC,GAAG,CAAC,GAAG,QAAQ,CAAC;QAC9B,CAAC;QAED,IAAI,QAAQ,CAAC,OAAO,EAAE,CAAC;YACtB,OAAO,YAAY,CAAC,OAAO,CAAC,OAAO,CAAC;YACpC,YAAY,CAAC,OAAO,CAAC,YAAY,GAAG,OAAiB,CAAC;QACvD,CAAC;QAED,IAAI,CAAC,QAAQ,CAAC,YAAY,GAAG,IAAI,CAAC;IACnC,CAAC,CAAC;AACH,CAAC;AAED,eAAe,IAAI,CAAC","sourcesContent":["import type UI5Element from \"../UI5Element.js\";\nimport type { Slot, DefaultSlot } from \"../UI5Element.js\";\nimport type { Slot as SlotMetadata } from \"../UI5ElementMetadata.js\";\n\n/**\n * Decorator for declaring a slot in a UI5 Web Component.\n * It adds the slot metadata to the component's constructor.\n *\n * @public\n * @since 2.19.0\n * @param { SlotMetadata } slotData - Optional metadata for the slot, including type and default flag.\n *\n * Example usage:\n * ```ts\n * import slot from \"@ui5/webcomponents-base/dist/decorators/slot-strict.js\";\n * import type { DefaultSlot, Slot } from \"@ui5/webcomponents-base/dist/UI5Element.js\";\n *\n * class MyComponent extends UI5Element {\n *\n * @slot()\n * header!: Slot<HTMLElement>;\n *\n * @slot({ type: HTMLElement, default: true })\n * items!: DefaultSlot<HTMLElement>;\n * }\n * ```\n */\nfunction slot<\n\tT extends Record<K, Slot<unknown> | DefaultSlot<unknown>>,\n\tK extends string\n>(slotData?: SlotMetadata): (target: T, prop: K) => void {\n\treturn (target: any, slotKey: string | symbol) => {\n\t\tconst ctor = target.constructor as typeof UI5Element;\n\n\t\tif (!Object.prototype.hasOwnProperty.call(ctor, \"metadata\")) {\n\t\t\tctor.metadata = {};\n\t\t}\n\n\t\tconst metadata = ctor.metadata;\n\t\tif (!metadata.slots) {\n\t\t\tmetadata.slots = {};\n\t\t}\n\n\t\tconst slotMetadata = metadata.slots;\n\n\t\tif (slotData && slotData.default && slotMetadata.default) {\n\t\t\tthrow new Error(\"Only one slot can be the default slot.\");\n\t\t}\n\n\t\tconst key = slotData && slotData.default ? \"default\" : (slotKey as string);\n\t\tslotData = slotData || { type: HTMLElement };\n\n\t\tif (!slotData.type) {\n\t\t\tslotData.type = HTMLElement;\n\t\t}\n\n\t\tif (!slotMetadata[key]) {\n\t\t\tslotMetadata[key] = slotData;\n\t\t}\n\n\t\tif (slotData.default) {\n\t\t\tdelete slotMetadata.default.default;\n\t\t\tslotMetadata.default.propertyName = slotKey as string;\n\t\t}\n\n\t\tctor.metadata.managedSlots = true;\n\t};\n}\n\nexport default slot;\n"]}
|
|
@@ -3,6 +3,24 @@ import type { Slot } from "../UI5ElementMetadata.js";
|
|
|
3
3
|
* Returns a slot decorator.
|
|
4
4
|
*
|
|
5
5
|
* @param { Slot } slotData
|
|
6
|
+
* @deprecated since 2.19.0, please use the `@ui5/webcomponents-base/dist/decorators/slot-strict.js` decorator instead.
|
|
7
|
+
* For Example:
|
|
8
|
+
* ```ts
|
|
9
|
+
* // If you previously used the `slot` decorator:
|
|
10
|
+
* import slot from "@ui5/webcomponents-base/dist/decorators/slot.js";
|
|
11
|
+
*
|
|
12
|
+
* // Now use `slot-strict` decorator + `DefaultSlot` and `Slot` types for slot members:
|
|
13
|
+
* import slot from "@ui5/webcomponents-base/dist/decorators/slot-strict.js";
|
|
14
|
+
* import type { DefaultSlot, Slot } from "@ui5/webcomponents-base/dist/UI5Element.js";
|
|
15
|
+
*
|
|
16
|
+
* class MyComponent extends UI5Element {
|
|
17
|
+
* @slot()
|
|
18
|
+
* header!: Slot<T> // Array<T> -> Slot<T>
|
|
19
|
+
*
|
|
20
|
+
* @slot({ type: HTMLElement, default: true })
|
|
21
|
+
* items!: DefaultSlot<T>; // Array<T> -> DefaultSlot<T>
|
|
22
|
+
* }
|
|
23
|
+
* ```
|
|
6
24
|
* @returns { PropertyDecorator }
|
|
7
25
|
*/
|
|
8
26
|
declare const slot: (slotData?: Slot) => PropertyDecorator;
|
package/dist/decorators/slot.js
CHANGED
|
@@ -2,6 +2,24 @@
|
|
|
2
2
|
* Returns a slot decorator.
|
|
3
3
|
*
|
|
4
4
|
* @param { Slot } slotData
|
|
5
|
+
* @deprecated since 2.19.0, please use the `@ui5/webcomponents-base/dist/decorators/slot-strict.js` decorator instead.
|
|
6
|
+
* For Example:
|
|
7
|
+
* ```ts
|
|
8
|
+
* // If you previously used the `slot` decorator:
|
|
9
|
+
* import slot from "@ui5/webcomponents-base/dist/decorators/slot.js";
|
|
10
|
+
*
|
|
11
|
+
* // Now use `slot-strict` decorator + `DefaultSlot` and `Slot` types for slot members:
|
|
12
|
+
* import slot from "@ui5/webcomponents-base/dist/decorators/slot-strict.js";
|
|
13
|
+
* import type { DefaultSlot, Slot } from "@ui5/webcomponents-base/dist/UI5Element.js";
|
|
14
|
+
*
|
|
15
|
+
* class MyComponent extends UI5Element {
|
|
16
|
+
* @slot()
|
|
17
|
+
* header!: Slot<T> // Array<T> -> Slot<T>
|
|
18
|
+
*
|
|
19
|
+
* @slot({ type: HTMLElement, default: true })
|
|
20
|
+
* items!: DefaultSlot<T>; // Array<T> -> DefaultSlot<T>
|
|
21
|
+
* }
|
|
22
|
+
* ```
|
|
5
23
|
* @returns { PropertyDecorator }
|
|
6
24
|
*/
|
|
7
25
|
const slot = (slotData) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slot.js","sourceRoot":"","sources":["../../src/decorators/slot.ts"],"names":[],"mappings":"AAGA
|
|
1
|
+
{"version":3,"file":"slot.js","sourceRoot":"","sources":["../../src/decorators/slot.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,IAAI,GAAG,CAAC,QAAe,EAAqB,EAAE;IACnD,OAAO,CAAC,MAAW,EAAE,OAAwB,EAAE,EAAE;QAChD,MAAM,IAAI,GAAG,MAAM,CAAC,WAAgC,CAAC;QAErD,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,EAAE,UAAU,CAAC,EAAE,CAAC;YAC7D,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAC;QACpB,CAAC;QAED,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;QAC/B,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC;YACrB,QAAQ,CAAC,KAAK,GAAG,EAAE,CAAC;QACrB,CAAC;QAED,MAAM,YAAY,GAAG,QAAQ,CAAC,KAAK,CAAC;QAEpC,IAAI,QAAQ,IAAI,QAAQ,CAAC,OAAO,IAAI,YAAY,CAAC,OAAO,EAAE,CAAC;YAC1D,MAAM,IAAI,KAAK,CAAC,wCAAwC,CAAC,CAAC;QAC3D,CAAC;QAED,MAAM,GAAG,GAAG,QAAQ,IAAI,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,OAAiB,CAAC;QACzE,QAAQ,GAAG,QAAQ,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC;QAE7C,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;YACpB,QAAQ,CAAC,IAAI,GAAG,WAAW,CAAC;QAC7B,CAAC;QAED,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,EAAE,CAAC;YACxB,YAAY,CAAC,GAAG,CAAC,GAAG,QAAQ,CAAC;QAC9B,CAAC;QAED,IAAI,QAAQ,CAAC,OAAO,EAAE,CAAC;YACtB,OAAO,YAAY,CAAC,OAAO,CAAC,OAAO,CAAC;YACpC,YAAY,CAAC,OAAO,CAAC,YAAY,GAAG,OAAiB,CAAC;QACvD,CAAC;QAED,IAAI,CAAC,QAAQ,CAAC,YAAY,GAAG,IAAI,CAAC;IACnC,CAAC,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,IAAI,CAAC","sourcesContent":["import type UI5Element from \"../UI5Element.js\";\nimport type { Slot } from \"../UI5ElementMetadata.js\";\n\n/**\n * Returns a slot decorator.\n *\n * @param { Slot } slotData\n * @deprecated since 2.19.0, please use the `@ui5/webcomponents-base/dist/decorators/slot-strict.js` decorator instead.\n * For Example:\n * ```ts\n * // If you previously used the `slot` decorator:\n * import slot from \"@ui5/webcomponents-base/dist/decorators/slot.js\";\n *\n * // Now use `slot-strict` decorator + `DefaultSlot` and `Slot` types for slot members:\n * import slot from \"@ui5/webcomponents-base/dist/decorators/slot-strict.js\";\n * import type { DefaultSlot, Slot } from \"@ui5/webcomponents-base/dist/UI5Element.js\";\n *\n * class MyComponent extends UI5Element {\n * @slot()\n * header!: Slot<T> // Array<T> -> Slot<T>\n *\n * @slot({ type: HTMLElement, default: true })\n * items!: DefaultSlot<T>; // Array<T> -> DefaultSlot<T>\n * }\n * ```\n * @returns { PropertyDecorator }\n */\nconst slot = (slotData?: Slot): PropertyDecorator => {\n\treturn (target: any, slotKey: string | symbol) => {\n\t\tconst ctor = target.constructor as typeof UI5Element;\n\n\t\tif (!Object.prototype.hasOwnProperty.call(ctor, \"metadata\")) {\n\t\t\tctor.metadata = {};\n\t\t}\n\n\t\tconst metadata = ctor.metadata;\n\t\tif (!metadata.slots) {\n\t\t\tmetadata.slots = {};\n\t\t}\n\n\t\tconst slotMetadata = metadata.slots;\n\n\t\tif (slotData && slotData.default && slotMetadata.default) {\n\t\t\tthrow new Error(\"Only one slot can be the default slot.\");\n\t\t}\n\n\t\tconst key = slotData && slotData.default ? \"default\" : slotKey as string;\n\t\tslotData = slotData || { type: HTMLElement };\n\n\t\tif (!slotData.type) {\n\t\t\tslotData.type = HTMLElement;\n\t\t}\n\n\t\tif (!slotMetadata[key]) {\n\t\t\tslotMetadata[key] = slotData;\n\t\t}\n\n\t\tif (slotData.default) {\n\t\t\tdelete slotMetadata.default.default;\n\t\t\tslotMetadata.default.propertyName = slotKey as string;\n\t\t}\n\n\t\tctor.metadata.managedSlots = true;\n\t};\n};\n\nexport default slot;\n"]}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
const VersionInfo = {
|
|
2
|
-
version: "2.
|
|
2
|
+
version: "2.20.0-rc.0",
|
|
3
3
|
major: 2,
|
|
4
|
-
minor:
|
|
5
|
-
patch:
|
|
6
|
-
suffix: "",
|
|
4
|
+
minor: 20,
|
|
5
|
+
patch: 0,
|
|
6
|
+
suffix: "-rc.0",
|
|
7
7
|
isNext: false,
|
|
8
|
-
buildTime:
|
|
8
|
+
buildTime: 1770884040,
|
|
9
9
|
};
|
|
10
10
|
export default VersionInfo;
|
|
11
11
|
//# sourceMappingURL=VersionInfo.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VersionInfo.js","sourceRoot":"","sources":["../../src/generated/VersionInfo.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,GAAG;IACnB,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"VersionInfo.js","sourceRoot":"","sources":["../../src/generated/VersionInfo.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,GAAG;IACnB,OAAO,EAAE,aAAa;IACtB,KAAK,EAAE,CAAC;IACR,KAAK,EAAE,EAAE;IACT,KAAK,EAAE,CAAC;IACR,MAAM,EAAE,OAAO;IACf,MAAM,EAAE,KAAK;IACb,SAAS,EAAE,UAAU;CACrB,CAAC;AACF,eAAe,WAAW,CAAC","sourcesContent":["const VersionInfo = {\n\tversion: \"2.20.0-rc.0\",\n\tmajor: 2,\n\tminor: 20,\n\tpatch: 0,\n\tsuffix: \"-rc.0\",\n\tisNext: false,\n\tbuildTime: 1770884040,\n};\nexport default VersionInfo;"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/decorators/slot-strict.ts"],
|
|
4
|
-
"sourcesContent": ["import type UI5Element from \"../UI5Element.js\";\nimport type { Slot, DefaultSlot } from \"../UI5Element.js\";\nimport type { Slot as SlotMetadata } from \"../UI5ElementMetadata.js\";\n\nfunction slot<\n\tT extends Record<K, Slot<unknown> | DefaultSlot<unknown>>,\n\tK extends string\n>(slotData?: SlotMetadata): (target: T, prop: K) => void {\n\treturn (target: any, slotKey: string | symbol) => {\n\t\tconst ctor = target.constructor as typeof UI5Element;\n\n\t\tif (!Object.prototype.hasOwnProperty.call(ctor, \"metadata\")) {\n\t\t\tctor.metadata = {};\n\t\t}\n\n\t\tconst metadata = ctor.metadata;\n\t\tif (!metadata.slots) {\n\t\t\tmetadata.slots = {};\n\t\t}\n\n\t\tconst slotMetadata = metadata.slots;\n\n\t\tif (slotData && slotData.default && slotMetadata.default) {\n\t\t\tthrow new Error(\"Only one slot can be the default slot.\");\n\t\t}\n\n\t\tconst key = slotData && slotData.default ? \"default\" : (slotKey as string);\n\t\tslotData = slotData || { type: HTMLElement };\n\n\t\tif (!slotData.type) {\n\t\t\tslotData.type = HTMLElement;\n\t\t}\n\n\t\tif (!slotMetadata[key]) {\n\t\t\tslotMetadata[key] = slotData;\n\t\t}\n\n\t\tif (slotData.default) {\n\t\t\tdelete slotMetadata.default.default;\n\t\t\tslotMetadata.default.propertyName = slotKey as string;\n\t\t}\n\n\t\tctor.metadata.managedSlots = true;\n\t};\n}\n\nexport default slot;\n"],
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["import type UI5Element from \"../UI5Element.js\";\nimport type { Slot, DefaultSlot } from \"../UI5Element.js\";\nimport type { Slot as SlotMetadata } from \"../UI5ElementMetadata.js\";\n\n/**\n * Decorator for declaring a slot in a UI5 Web Component.\n * It adds the slot metadata to the component's constructor.\n *\n * @public\n * @since 2.19.0\n * @param { SlotMetadata } slotData - Optional metadata for the slot, including type and default flag.\n *\n * Example usage:\n * ```ts\n * import slot from \"@ui5/webcomponents-base/dist/decorators/slot-strict.js\";\n * import type { DefaultSlot, Slot } from \"@ui5/webcomponents-base/dist/UI5Element.js\";\n *\n * class MyComponent extends UI5Element {\n *\n * @slot()\n * header!: Slot<HTMLElement>;\n *\n * @slot({ type: HTMLElement, default: true })\n * items!: DefaultSlot<HTMLElement>;\n * }\n * ```\n */\nfunction slot<\n\tT extends Record<K, Slot<unknown> | DefaultSlot<unknown>>,\n\tK extends string\n>(slotData?: SlotMetadata): (target: T, prop: K) => void {\n\treturn (target: any, slotKey: string | symbol) => {\n\t\tconst ctor = target.constructor as typeof UI5Element;\n\n\t\tif (!Object.prototype.hasOwnProperty.call(ctor, \"metadata\")) {\n\t\t\tctor.metadata = {};\n\t\t}\n\n\t\tconst metadata = ctor.metadata;\n\t\tif (!metadata.slots) {\n\t\t\tmetadata.slots = {};\n\t\t}\n\n\t\tconst slotMetadata = metadata.slots;\n\n\t\tif (slotData && slotData.default && slotMetadata.default) {\n\t\t\tthrow new Error(\"Only one slot can be the default slot.\");\n\t\t}\n\n\t\tconst key = slotData && slotData.default ? \"default\" : (slotKey as string);\n\t\tslotData = slotData || { type: HTMLElement };\n\n\t\tif (!slotData.type) {\n\t\t\tslotData.type = HTMLElement;\n\t\t}\n\n\t\tif (!slotMetadata[key]) {\n\t\t\tslotMetadata[key] = slotData;\n\t\t}\n\n\t\tif (slotData.default) {\n\t\t\tdelete slotMetadata.default.default;\n\t\t\tslotMetadata.default.propertyName = slotKey as string;\n\t\t}\n\n\t\tctor.metadata.managedSlots = true;\n\t};\n}\n\nexport default slot;\n"],
|
|
5
|
+
"mappings": "aA2BA,SAASA,EAGPC,EAAuD,CACxD,MAAO,CAACC,EAAaC,IAA6B,CACjD,MAAMC,EAAOF,EAAO,YAEf,OAAO,UAAU,eAAe,KAAKE,EAAM,UAAU,IACzDA,EAAK,SAAW,CAAC,GAGlB,MAAMC,EAAWD,EAAK,SACjBC,EAAS,QACbA,EAAS,MAAQ,CAAC,GAGnB,MAAMC,EAAeD,EAAS,MAE9B,GAAIJ,GAAYA,EAAS,SAAWK,EAAa,QAChD,MAAM,IAAI,MAAM,wCAAwC,EAGzD,MAAMC,EAAMN,GAAYA,EAAS,QAAU,UAAaE,EACxDF,EAAWA,GAAY,CAAE,KAAM,WAAY,EAEtCA,EAAS,OACbA,EAAS,KAAO,aAGZK,EAAaC,CAAG,IACpBD,EAAaC,CAAG,EAAIN,GAGjBA,EAAS,UACZ,OAAOK,EAAa,QAAQ,QAC5BA,EAAa,QAAQ,aAAeH,GAGrCC,EAAK,SAAS,aAAe,EAC9B,CACD,CAEA,eAAeJ",
|
|
6
6
|
"names": ["slot", "slotData", "target", "slotKey", "ctor", "metadata", "slotMetadata", "key"]
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/decorators/slot.ts"],
|
|
4
|
-
"sourcesContent": ["import type UI5Element from \"../UI5Element.js\";\nimport type { Slot } from \"../UI5ElementMetadata.js\";\n\n/**\n * Returns a slot decorator.\n *\n * @param { Slot } slotData\n * @returns { PropertyDecorator }\n */\nconst slot = (slotData?: Slot): PropertyDecorator => {\n\treturn (target: any, slotKey: string | symbol) => {\n\t\tconst ctor = target.constructor as typeof UI5Element;\n\n\t\tif (!Object.prototype.hasOwnProperty.call(ctor, \"metadata\")) {\n\t\t\tctor.metadata = {};\n\t\t}\n\n\t\tconst metadata = ctor.metadata;\n\t\tif (!metadata.slots) {\n\t\t\tmetadata.slots = {};\n\t\t}\n\n\t\tconst slotMetadata = metadata.slots;\n\n\t\tif (slotData && slotData.default && slotMetadata.default) {\n\t\t\tthrow new Error(\"Only one slot can be the default slot.\");\n\t\t}\n\n\t\tconst key = slotData && slotData.default ? \"default\" : slotKey as string;\n\t\tslotData = slotData || { type: HTMLElement };\n\n\t\tif (!slotData.type) {\n\t\t\tslotData.type = HTMLElement;\n\t\t}\n\n\t\tif (!slotMetadata[key]) {\n\t\t\tslotMetadata[key] = slotData;\n\t\t}\n\n\t\tif (slotData.default) {\n\t\t\tdelete slotMetadata.default.default;\n\t\t\tslotMetadata.default.propertyName = slotKey as string;\n\t\t}\n\n\t\tctor.metadata.managedSlots = true;\n\t};\n};\n\nexport default slot;\n"],
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["import type UI5Element from \"../UI5Element.js\";\nimport type { Slot } from \"../UI5ElementMetadata.js\";\n\n/**\n * Returns a slot decorator.\n *\n * @param { Slot } slotData\n * @deprecated since 2.19.0, please use the `@ui5/webcomponents-base/dist/decorators/slot-strict.js` decorator instead.\n * For Example:\n * ```ts\n * // If you previously used the `slot` decorator:\n * import slot from \"@ui5/webcomponents-base/dist/decorators/slot.js\";\n *\n * // Now use `slot-strict` decorator + `DefaultSlot` and `Slot` types for slot members:\n * import slot from \"@ui5/webcomponents-base/dist/decorators/slot-strict.js\";\n * import type { DefaultSlot, Slot } from \"@ui5/webcomponents-base/dist/UI5Element.js\";\n *\n * class MyComponent extends UI5Element {\n * @slot()\n * header!: Slot<T> // Array<T> -> Slot<T>\n *\n * @slot({ type: HTMLElement, default: true })\n * items!: DefaultSlot<T>; // Array<T> -> DefaultSlot<T>\n * }\n * ```\n * @returns { PropertyDecorator }\n */\nconst slot = (slotData?: Slot): PropertyDecorator => {\n\treturn (target: any, slotKey: string | symbol) => {\n\t\tconst ctor = target.constructor as typeof UI5Element;\n\n\t\tif (!Object.prototype.hasOwnProperty.call(ctor, \"metadata\")) {\n\t\t\tctor.metadata = {};\n\t\t}\n\n\t\tconst metadata = ctor.metadata;\n\t\tif (!metadata.slots) {\n\t\t\tmetadata.slots = {};\n\t\t}\n\n\t\tconst slotMetadata = metadata.slots;\n\n\t\tif (slotData && slotData.default && slotMetadata.default) {\n\t\t\tthrow new Error(\"Only one slot can be the default slot.\");\n\t\t}\n\n\t\tconst key = slotData && slotData.default ? \"default\" : slotKey as string;\n\t\tslotData = slotData || { type: HTMLElement };\n\n\t\tif (!slotData.type) {\n\t\t\tslotData.type = HTMLElement;\n\t\t}\n\n\t\tif (!slotMetadata[key]) {\n\t\t\tslotMetadata[key] = slotData;\n\t\t}\n\n\t\tif (slotData.default) {\n\t\t\tdelete slotMetadata.default.default;\n\t\t\tslotMetadata.default.propertyName = slotKey as string;\n\t\t}\n\n\t\tctor.metadata.managedSlots = true;\n\t};\n};\n\nexport default slot;\n"],
|
|
5
|
+
"mappings": "aA2BA,MAAMA,EAAQC,GACN,CAACC,EAAaC,IAA6B,CACjD,MAAMC,EAAOF,EAAO,YAEf,OAAO,UAAU,eAAe,KAAKE,EAAM,UAAU,IACzDA,EAAK,SAAW,CAAC,GAGlB,MAAMC,EAAWD,EAAK,SACjBC,EAAS,QACbA,EAAS,MAAQ,CAAC,GAGnB,MAAMC,EAAeD,EAAS,MAE9B,GAAIJ,GAAYA,EAAS,SAAWK,EAAa,QAChD,MAAM,IAAI,MAAM,wCAAwC,EAGzD,MAAMC,EAAMN,GAAYA,EAAS,QAAU,UAAYE,EACvDF,EAAWA,GAAY,CAAE,KAAM,WAAY,EAEtCA,EAAS,OACbA,EAAS,KAAO,aAGZK,EAAaC,CAAG,IACpBD,EAAaC,CAAG,EAAIN,GAGjBA,EAAS,UACZ,OAAOK,EAAa,QAAQ,QAC5BA,EAAa,QAAQ,aAAeH,GAGrCC,EAAK,SAAS,aAAe,EAC9B,EAGD,eAAeJ",
|
|
6
6
|
"names": ["slot", "slotData", "target", "slotKey", "ctor", "metadata", "slotMetadata", "key"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const e={version:"2.
|
|
1
|
+
"use strict";const e={version:"2.20.0-rc.0",major:2,minor:20,patch:0,suffix:"-rc.0",isNext:!1,buildTime:1770884040};export default e;
|
|
2
2
|
//# sourceMappingURL=VersionInfo.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/generated/VersionInfo.ts"],
|
|
4
|
-
"sourcesContent": ["const VersionInfo = {\n\tversion: \"2.
|
|
5
|
-
"mappings": "aAAA,MAAMA,EAAc,CACnB,QAAS,
|
|
4
|
+
"sourcesContent": ["const VersionInfo = {\n\tversion: \"2.20.0-rc.0\",\n\tmajor: 2,\n\tminor: 20,\n\tpatch: 0,\n\tsuffix: \"-rc.0\",\n\tisNext: false,\n\tbuildTime: 1770884040,\n};\nexport default VersionInfo;"],
|
|
5
|
+
"mappings": "aAAA,MAAMA,EAAc,CACnB,QAAS,cACT,MAAO,EACP,MAAO,GACP,MAAO,EACP,OAAQ,QACR,OAAQ,GACR,UAAW,UACZ,EACA,eAAeA",
|
|
6
6
|
"names": ["VersionInfo"]
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ui5/webcomponents-base",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.20.0-rc.0",
|
|
4
4
|
"description": "UI5 Web Components: webcomponents.base",
|
|
5
5
|
"author": "SAP SE (https://www.sap.com)",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -64,9 +64,9 @@
|
|
|
64
64
|
"@openui5/sap.ui.core": "1.120.17",
|
|
65
65
|
"@sap-theming/theming-base-content": "11.29.3",
|
|
66
66
|
"@ui5/cypress-internal": "0.1.0",
|
|
67
|
-
"@ui5/webcomponents-tools": "2.
|
|
67
|
+
"@ui5/webcomponents-tools": "2.20.0-rc.0",
|
|
68
68
|
"clean-css": "^5.2.2",
|
|
69
|
-
"cypress": "
|
|
69
|
+
"cypress": "15.9.0",
|
|
70
70
|
"mocha": "^11.7.2",
|
|
71
71
|
"replace-in-file": "^6.3.5",
|
|
72
72
|
"resolve": "^1.20.0",
|
|
@@ -75,5 +75,5 @@
|
|
|
75
75
|
"vite": "5.4.21"
|
|
76
76
|
},
|
|
77
77
|
"customElements": "dist/custom-elements.json",
|
|
78
|
-
"gitHead": "
|
|
78
|
+
"gitHead": "1fa124de424f2dd51e0283a942e903c01e176de2"
|
|
79
79
|
}
|