@ui5/webcomponents-base 2.20.0-rc.1 → 2.20.0-rc.3

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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/UI5ElementMetadata.ts"],
4
- "sourcesContent": ["import { camelToKebabCase, kebabToCamelCase } from \"./util/StringHelper.js\";\nimport { getSlottedNodes } from \"./util/SlotsHelper.js\";\nimport { getEffectiveScopingSuffixForTag } from \"./CustomElementsScopeUtils.js\";\nimport type UI5Element from \"./UI5Element.js\";\n\ntype SlotInvalidation = {\n\tproperties: boolean | Array<string>,\n\tslots: boolean | Array<string>,\n}\n\ntype Slot = {\n\ttype: typeof Node | typeof HTMLElement,\n\tdefault?: boolean,\n\tpropertyName?: string,\n\tindividualSlots?: boolean,\n\tinvalidateOnChildChange?: boolean | SlotInvalidation,\n};\n\ntype SlotValue = Node;\n\ntype Property = {\n\ttype?: BooleanConstructor | StringConstructor | ObjectConstructor | NumberConstructor | ArrayConstructor,\n\tnoAttribute?: boolean,\n\tconverter?: {\n\t\tfromAttribute(value: string | null, type: unknown): PropertyValue,\n\t\ttoAttribute(value: unknown, type: unknown): string | null,\n\t}\n}\n\ntype PropertyValue = boolean | number | string | object | undefined | null;\n\ntype EventData = Record<string, { detail?: Record<string, object>, cancelable?: boolean, bubbles?: boolean }>;\n\ntype I18nBundleAccessorValue = {\n\tbundleName: string,\n\ttarget: typeof UI5Element\n};\n\ntype I18nBundleAccessors = Record<string, I18nBundleAccessorValue>;\n\ntype Metadata = {\n\ttag?: string,\n\tmanagedSlots?: boolean,\n\tproperties?: Record<string, Property>,\n\tslots?: Record<string, Slot>,\n\tevents?: EventData,\n\tfastNavigation?: boolean,\n\tthemeAware?: boolean,\n\tlanguageAware?: boolean,\n\tcldr?: boolean,\n\tformAssociated?: boolean,\n\tshadowRootOptions?: Partial<ShadowRootInit>\n\tfeatures?: Array<string>\n\ti18n?: I18nBundleAccessors\n};\n\ntype State = Record<string, PropertyValue | Array<SlotValue>>;\n\n/**\n * @class\n * @public\n */\nclass UI5ElementMetadata {\n\tmetadata: Metadata;\n\t_initialState: State | undefined;\n\n\tconstructor(metadata: Metadata) {\n\t\tthis.metadata = metadata;\n\t}\n\n\tgetInitialState() {\n\t\tif (Object.prototype.hasOwnProperty.call(this, \"_initialState\")) {\n\t\t\treturn this._initialState!;\n\t\t}\n\t\tconst initialState: State = {};\n\t\tconst slotsAreManaged = this.slotsAreManaged();\n\n\t\t// Initialize slots\n\t\tif (slotsAreManaged) {\n\t\t\tconst slots = this.getSlots();\n\t\t\tfor (const [slotName, slotData] of Object.entries<Slot>(slots)) { // eslint-disable-line\n\t\t\t\tconst propertyName = slotData.propertyName || slotName;\n\t\t\t\tinitialState[propertyName] = [];\n\t\t\t\tinitialState[kebabToCamelCase(propertyName)] = initialState[propertyName];\n\t\t\t}\n\t\t}\n\n\t\tthis._initialState = initialState;\n\t\treturn initialState;\n\t}\n\n\t/**\n\t * Validates the slot's value and returns it if correct\n\t * or throws an exception if not.\n\t * **Note:** Only intended for use by UI5Element.js\n\t * @public\n\t */\n\tstatic validateSlotValue(value: Node, slotData: Slot): Node {\n\t\treturn validateSingleSlot(value, slotData);\n\t}\n\n\t/**\n\t * Returns the tag of the UI5 Element without the scope\n\t * @public\n\t */\n\tgetPureTag(): string {\n\t\treturn this.metadata.tag || \"\";\n\t}\n\n\t/**\n\t * Returns the tag of the UI5 Element\n\t * @public\n\t */\n\tgetTag(): string {\n\t\tconst pureTag = this.metadata.tag;\n\n\t\tif (!pureTag) {\n\t\t\treturn \"\";\n\t\t}\n\n\t\tconst suffix = getEffectiveScopingSuffixForTag(pureTag);\n\t\tif (!suffix) {\n\t\t\treturn pureTag;\n\t\t}\n\n\t\treturn `${pureTag}-${suffix}`;\n\t}\n\n\t/**\n\t * Determines whether a property should have an attribute counterpart\n\t * @public\n\t * @param propName\n\t */\n\thasAttribute(propName: string): boolean {\n\t\tconst propData = this.getProperties()[propName];\n\t\treturn propData.type !== Object && propData.type !== Array && !propData.noAttribute;\n\t}\n\n\t/**\n\t * Returns an array with the properties of the UI5 Element (in camelCase)\n\t * @public\n\t */\n\tgetPropertiesList(): Array<string> {\n\t\treturn Object.keys(this.getProperties());\n\t}\n\n\t/**\n\t * Returns an array with the attributes of the UI5 Element (in kebab-case)\n\t * @public\n\t */\n\tgetAttributesList(): Array<string> {\n\t\treturn this.getPropertiesList().filter(this.hasAttribute.bind(this)).map(camelToKebabCase);\n\t}\n\n\t/**\n\t * Determines whether this UI5 Element has a default slot of type Node, therefore can slot text\n\t */\n\tcanSlotText() {\n\t\treturn (this.getSlots().default)?.type === Node;\n\t}\n\n\t/**\n\t * Determines whether this UI5 Element supports any slots\n\t * @public\n\t */\n\thasSlots(): boolean {\n\t\treturn !!Object.entries(this.getSlots()).length;\n\t}\n\n\t/**\n\t * Determines whether this UI5 Element supports any slots with \"individualSlots: true\"\n\t * @public\n\t */\n\thasIndividualSlots(): boolean {\n\t\treturn this.slotsAreManaged() && Object.values(this.getSlots()).some(slotData => slotData.individualSlots);\n\t}\n\n\t/**\n\t * Determines whether this UI5 Element needs to invalidate if children are added/removed/changed\n\t * @public\n\t */\n\tslotsAreManaged(): boolean {\n\t\treturn !!this.metadata.managedSlots;\n\t}\n\n\t/**\n\t * Determines whether this control supports F6 fast navigation\n\t * @public\n\t */\n\tsupportsF6FastNavigation(): boolean {\n\t\treturn !!this.metadata.fastNavigation;\n\t}\n\n\t/**\n\t * Returns an object with key-value pairs of properties and their metadata definitions\n\t * @public\n\t */\n\tgetProperties(): Record<string, Property> {\n\t\tif (!this.metadata.properties) {\n\t\t\tthis.metadata.properties = {};\n\t\t}\n\t\treturn this.metadata.properties;\n\t}\n\n\t/**\n\t * Returns an object with key-value pairs of events and their metadata definitions\n\t * @public\n\t */\n\tgetEvents(): EventData {\n\t\tif (!this.metadata.events) {\n\t\t\tthis.metadata.events = {};\n\t\t}\n\t\treturn this.metadata.events;\n\t}\n\n\t/**\n\t * Returns an object with key-value pairs of slots and their metadata definitions\n\t * @public\n\t */\n\t getSlots(): Record<string, Slot> {\n\t\tif (!this.metadata.slots) {\n\t\t\tthis.metadata.slots = {};\n\t\t}\n\t\treturn this.metadata.slots;\n\t}\n\n\t/**\n\t * Determines whether this UI5 Element has any translatable texts (needs to be invalidated upon language change)\n\t */\n\tisLanguageAware(): boolean {\n\t\treturn !!this.metadata.languageAware;\n\t}\n\n\t/**\n\t * Determines whether this UI5 Element has any theme dependant carachteristics.\n\t */\n\t isThemeAware(): boolean {\n\t\treturn !!this.metadata.themeAware;\n\t}\n\n\t/**\n\t * Determines whether this UI5 Element needs CLDR assets to be fetched to work correctly\n\t */\n\tneedsCLDR(): boolean {\n\t\treturn !!this.metadata.cldr;\n\t}\n\n\tgetShadowRootOptions(): Partial<ShadowRootInit> {\n\t\treturn this.metadata.shadowRootOptions || {};\n\t}\n\n\t/**\n\t * Determines whether this UI5 Element has any theme dependant carachteristics.\n\t */\n\t isFormAssociated(): boolean {\n\t\treturn !!this.metadata.formAssociated;\n\t}\n\n\t/**\n\t * Matches a changed entity (property/slot) with the given name against the \"invalidateOnChildChange\" configuration\n\t * and determines whether this should cause and invalidation\n\t *\n\t * @param slotName the name of the slot in which a child was changed\n\t * @param type the type of change in the child: \"property\" or \"slot\"\n\t * @param name the name of the property/slot that changed\n\t */\n\tshouldInvalidateOnChildChange(slotName: string, type: \"property\" | \"slot\", name: string): boolean {\n\t\tconst config = this.getSlots()[slotName].invalidateOnChildChange;\n\n\t\t// invalidateOnChildChange was not set in the slot metadata - by default child changes do not affect the component\n\t\tif (config === undefined) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// The simple format was used: invalidateOnChildChange: true/false;\n\t\tif (typeof config === \"boolean\") {\n\t\t\treturn config;\n\t\t}\n\n\t\t// The complex format was used: invalidateOnChildChange: { properties, slots }\n\t\tif (typeof config === \"object\") {\n\t\t\t// A property was changed\n\t\t\tif (type === \"property\") {\n\t\t\t\t// The config object does not have a properties field\n\t\t\t\tif (config.properties === undefined) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\t// The config object has the short format: properties: true/false\n\t\t\t\tif (typeof config.properties === \"boolean\") {\n\t\t\t\t\treturn config.properties;\n\t\t\t\t}\n\n\t\t\t\t// The config object has the complex format: properties: [...]\n\t\t\t\tif (Array.isArray(config.properties)) {\n\t\t\t\t\treturn config.properties.includes(name);\n\t\t\t\t}\n\n\t\t\t\tthrow new Error(\"Wrong format for invalidateOnChildChange.properties: boolean or array is expected\");\n\t\t\t}\n\n\t\t\t// A slot was changed\n\t\t\tif (type === \"slot\") {\n\t\t\t\t// The config object does not have a slots field\n\t\t\t\tif (config.slots === undefined) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\t// The config object has the short format: slots: true/false\n\t\t\t\tif (typeof config.slots === \"boolean\") {\n\t\t\t\t\treturn config.slots;\n\t\t\t\t}\n\n\t\t\t\t// The config object has the complex format: slots: [...]\n\t\t\t\tif (Array.isArray(config.slots)) {\n\t\t\t\t\treturn config.slots.includes(name);\n\t\t\t\t}\n\n\t\t\t\tthrow new Error(\"Wrong format for invalidateOnChildChange.slots: boolean or array is expected\");\n\t\t\t}\n\t\t}\n\n\t\tthrow new Error(\"Wrong format for invalidateOnChildChange: boolean or object is expected\");\n\t}\n\n\tgetI18n(): I18nBundleAccessors {\n\t\tif (!this.metadata.i18n) {\n\t\t\tthis.metadata.i18n = {};\n\t\t}\n\t\treturn this.metadata.i18n;\n\t}\n}\n\nconst validateSingleSlot = (value: Node, slotData: Slot) => {\n\tvalue && getSlottedNodes(value).forEach(el => {\n\t\tif (!(el instanceof slotData.type)) {\n\t\t\tthrow new Error(`The element is not of type ${slotData.type.toString()}`);\n\t\t}\n\t});\n\n\treturn value;\n};\n\nexport default UI5ElementMetadata;\nexport type {\n\tProperty,\n\tPropertyValue,\n\tSlot,\n\tSlotValue,\n\tEventData,\n\tState,\n\tMetadata,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O,WAIf,GAAI,MAAM,QAAQA,EAAO,UAAU,EAClC,OAAOA,EAAO,WAAW,SAASD,CAAI,EAGvC,MAAM,IAAI,MAAM,mFAAmF,CACpG,CAGA,GAAID,IAAS,OAAQ,CAEpB,GAAIE,EAAO,QAAU,OACpB,MAAO,GAIR,GAAI,OAAOA,EAAO,OAAU,UAC3B,OAAOA,EAAO,MAIf,GAAI,MAAM,QAAQA,EAAO,KAAK,EAC7B,OAAOA,EAAO,MAAM,SAASD,CAAI,EAGlC,MAAM,IAAI,MAAM,8EAA8E,CAC/F,CACD,CAEA,MAAM,IAAI,MAAM,yEAAyE,CAC1F,CAEA,SAA+B,CAC9B,OAAK,KAAK,SAAS,OAClB,KAAK,SAAS,KAAO,CAAC,GAEhB,KAAK,SAAS,IACtB,CACD,CAEA,MAAMN,EAAqB,CAACD,EAAaF,KACxCE,GAAST,EAAgBS,CAAK,EAAE,QAAQS,GAAM,CAC7C,GAAI,EAAEA,aAAcX,EAAS,MAC5B,MAAM,IAAI,MAAM,8BAA8BA,EAAS,KAAK,SAAS,CAAC,EAAE,CAE1E,CAAC,EAEME,GAGR,eAAeP",
4
+ "sourcesContent": ["import { camelToKebabCase, kebabToCamelCase } from \"./util/StringHelper.js\";\nimport { getSlottedNodes } from \"./util/SlotsHelper.js\";\nimport { getEffectiveScopingSuffixForTag } from \"./CustomElementsScopeUtils.js\";\nimport type UI5Element from \"./UI5Element.js\";\n\ntype SlotInvalidation = {\n\tproperties: boolean | Array<string>,\n\tslots: boolean | Array<string>,\n}\n\ntype Slot = {\n\ttype: typeof Node | typeof HTMLElement,\n\tdefault?: boolean,\n\tpropertyName?: string,\n\tindividualSlots?: boolean,\n\tinvalidateOnChildChange?: boolean | SlotInvalidation,\n};\n\ntype SlotValue = Node;\n\ntype Property = {\n\ttype?: BooleanConstructor | StringConstructor | ObjectConstructor | NumberConstructor | ArrayConstructor,\n\tnoAttribute?: boolean,\n\tconverter?: {\n\t\tfromAttribute(value: string | null, type: unknown): PropertyValue,\n\t\ttoAttribute(value: unknown, type: unknown): string | null,\n\t}\n}\n\ntype PropertyValue = boolean | number | string | object | undefined | null;\n\ntype EventData = Record<string, { detail?: Record<string, object>, cancelable?: boolean, bubbles?: boolean }>;\n\ntype I18nBundleAccessorValue = {\n\tbundleName: string,\n\ttarget: typeof UI5Element\n};\n\ntype I18nBundleAccessors = Record<string, I18nBundleAccessorValue>;\n\ntype Metadata = {\n\ttag?: string,\n\tmanagedSlots?: boolean,\n\tproperties?: Record<string, Property>,\n\tslots?: Record<string, Slot>,\n\tevents?: EventData,\n\tfastNavigation?: boolean,\n\tthemeAware?: boolean,\n\tlanguageAware?: boolean,\n\tcldr?: boolean,\n\tformAssociated?: boolean,\n\tshadowRootOptions?: Partial<ShadowRootInit>\n\tfeatures?: Array<string>\n\ti18n?: I18nBundleAccessors\n};\n\ntype State = Record<string, PropertyValue | Array<SlotValue>>;\n\n/**\n * @class\n * @public\n */\nclass UI5ElementMetadata {\n\tmetadata: Metadata;\n\t_initialState: State | undefined;\n\n\tconstructor(metadata: Metadata) {\n\t\tthis.metadata = metadata;\n\t}\n\n\tgetInitialState() {\n\t\tif (Object.prototype.hasOwnProperty.call(this, \"_initialState\")) {\n\t\t\treturn this._initialState!;\n\t\t}\n\t\tconst initialState: State = {};\n\t\tconst slotsAreManaged = this.slotsAreManaged();\n\n\t\t// Initialize slots\n\t\tif (slotsAreManaged) {\n\t\t\tconst slots = this.getSlots();\n\t\t\tfor (const [slotName, slotData] of Object.entries<Slot>(slots)) { // eslint-disable-line\n\t\t\t\tconst propertyName = slotData.propertyName || slotName;\n\t\t\t\tinitialState[propertyName] = [];\n\t\t\t\tinitialState[kebabToCamelCase(propertyName)] = initialState[propertyName];\n\t\t\t}\n\t\t}\n\n\t\tthis._initialState = initialState;\n\t\treturn initialState;\n\t}\n\n\t/**\n\t * Validates the slot's value and returns it if correct\n\t * or throws an exception if not.\n\t * **Note:** Only intended for use by UI5Element.js\n\t * @public\n\t */\n\tstatic validateSlotValue(value: Node, slotData: Slot): Node {\n\t\treturn validateSingleSlot(value, slotData);\n\t}\n\n\t/**\n\t * Returns the tag of the UI5 Element without the scope\n\t * @public\n\t */\n\tgetPureTag(): string {\n\t\treturn this.metadata.tag || \"\";\n\t}\n\n\t/**\n\t * Returns the tag of the UI5 Element\n\t * @public\n\t */\n\tgetTag(): string {\n\t\tconst pureTag = this.metadata.tag;\n\n\t\tif (!pureTag) {\n\t\t\treturn \"\";\n\t\t}\n\n\t\tconst suffix = getEffectiveScopingSuffixForTag(pureTag);\n\t\tif (!suffix) {\n\t\t\treturn pureTag;\n\t\t}\n\n\t\treturn `${pureTag}-${suffix}`;\n\t}\n\n\t/**\n\t * Determines whether a property should have an attribute counterpart\n\t * @public\n\t * @param propName\n\t */\n\thasAttribute(propName: string): boolean {\n\t\tconst propData = this.getProperties()[propName];\n\t\treturn propData.type !== Object && !propData.noAttribute;\n\t}\n\n\t/**\n\t * Returns an array with the properties of the UI5 Element (in camelCase)\n\t * @public\n\t */\n\tgetPropertiesList(): Array<string> {\n\t\treturn Object.keys(this.getProperties());\n\t}\n\n\t/**\n\t * Returns an array with the attributes of the UI5 Element (in kebab-case)\n\t * @public\n\t */\n\tgetAttributesList(): Array<string> {\n\t\treturn this.getPropertiesList().filter(this.hasAttribute.bind(this)).map(camelToKebabCase);\n\t}\n\n\t/**\n\t * Determines whether this UI5 Element has a default slot of type Node, therefore can slot text\n\t */\n\tcanSlotText() {\n\t\treturn (this.getSlots().default)?.type === Node;\n\t}\n\n\t/**\n\t * Determines whether this UI5 Element supports any slots\n\t * @public\n\t */\n\thasSlots(): boolean {\n\t\treturn !!Object.entries(this.getSlots()).length;\n\t}\n\n\t/**\n\t * Determines whether this UI5 Element supports any slots with \"individualSlots: true\"\n\t * @public\n\t */\n\thasIndividualSlots(): boolean {\n\t\treturn this.slotsAreManaged() && Object.values(this.getSlots()).some(slotData => slotData.individualSlots);\n\t}\n\n\t/**\n\t * Determines whether this UI5 Element needs to invalidate if children are added/removed/changed\n\t * @public\n\t */\n\tslotsAreManaged(): boolean {\n\t\treturn !!this.metadata.managedSlots;\n\t}\n\n\t/**\n\t * Determines whether this control supports F6 fast navigation\n\t * @public\n\t */\n\tsupportsF6FastNavigation(): boolean {\n\t\treturn !!this.metadata.fastNavigation;\n\t}\n\n\t/**\n\t * Returns an object with key-value pairs of properties and their metadata definitions\n\t * @public\n\t */\n\tgetProperties(): Record<string, Property> {\n\t\tif (!this.metadata.properties) {\n\t\t\tthis.metadata.properties = {};\n\t\t}\n\t\treturn this.metadata.properties;\n\t}\n\n\t/**\n\t * Returns an object with key-value pairs of events and their metadata definitions\n\t * @public\n\t */\n\tgetEvents(): EventData {\n\t\tif (!this.metadata.events) {\n\t\t\tthis.metadata.events = {};\n\t\t}\n\t\treturn this.metadata.events;\n\t}\n\n\t/**\n\t * Returns an object with key-value pairs of slots and their metadata definitions\n\t * @public\n\t */\n\t getSlots(): Record<string, Slot> {\n\t\tif (!this.metadata.slots) {\n\t\t\tthis.metadata.slots = {};\n\t\t}\n\t\treturn this.metadata.slots;\n\t}\n\n\t/**\n\t * Determines whether this UI5 Element has any translatable texts (needs to be invalidated upon language change)\n\t */\n\tisLanguageAware(): boolean {\n\t\treturn !!this.metadata.languageAware;\n\t}\n\n\t/**\n\t * Determines whether this UI5 Element has any theme dependant carachteristics.\n\t */\n\t isThemeAware(): boolean {\n\t\treturn !!this.metadata.themeAware;\n\t}\n\n\t/**\n\t * Determines whether this UI5 Element needs CLDR assets to be fetched to work correctly\n\t */\n\tneedsCLDR(): boolean {\n\t\treturn !!this.metadata.cldr;\n\t}\n\n\tgetShadowRootOptions(): Partial<ShadowRootInit> {\n\t\treturn this.metadata.shadowRootOptions || {};\n\t}\n\n\t/**\n\t * Determines whether this UI5 Element has any theme dependant carachteristics.\n\t */\n\t isFormAssociated(): boolean {\n\t\treturn !!this.metadata.formAssociated;\n\t}\n\n\t/**\n\t * Matches a changed entity (property/slot) with the given name against the \"invalidateOnChildChange\" configuration\n\t * and determines whether this should cause and invalidation\n\t *\n\t * @param slotName the name of the slot in which a child was changed\n\t * @param type the type of change in the child: \"property\" or \"slot\"\n\t * @param name the name of the property/slot that changed\n\t */\n\tshouldInvalidateOnChildChange(slotName: string, type: \"property\" | \"slot\", name: string): boolean {\n\t\tconst config = this.getSlots()[slotName].invalidateOnChildChange;\n\n\t\t// invalidateOnChildChange was not set in the slot metadata - by default child changes do not affect the component\n\t\tif (config === undefined) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// The simple format was used: invalidateOnChildChange: true/false;\n\t\tif (typeof config === \"boolean\") {\n\t\t\treturn config;\n\t\t}\n\n\t\t// The complex format was used: invalidateOnChildChange: { properties, slots }\n\t\tif (typeof config === \"object\") {\n\t\t\t// A property was changed\n\t\t\tif (type === \"property\") {\n\t\t\t\t// The config object does not have a properties field\n\t\t\t\tif (config.properties === undefined) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\t// The config object has the short format: properties: true/false\n\t\t\t\tif (typeof config.properties === \"boolean\") {\n\t\t\t\t\treturn config.properties;\n\t\t\t\t}\n\n\t\t\t\t// The config object has the complex format: properties: [...]\n\t\t\t\tif (Array.isArray(config.properties)) {\n\t\t\t\t\treturn config.properties.includes(name);\n\t\t\t\t}\n\n\t\t\t\tthrow new Error(\"Wrong format for invalidateOnChildChange.properties: boolean or array is expected\");\n\t\t\t}\n\n\t\t\t// A slot was changed\n\t\t\tif (type === \"slot\") {\n\t\t\t\t// The config object does not have a slots field\n\t\t\t\tif (config.slots === undefined) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\t// The config object has the short format: slots: true/false\n\t\t\t\tif (typeof config.slots === \"boolean\") {\n\t\t\t\t\treturn config.slots;\n\t\t\t\t}\n\n\t\t\t\t// The config object has the complex format: slots: [...]\n\t\t\t\tif (Array.isArray(config.slots)) {\n\t\t\t\t\treturn config.slots.includes(name);\n\t\t\t\t}\n\n\t\t\t\tthrow new Error(\"Wrong format for invalidateOnChildChange.slots: boolean or array is expected\");\n\t\t\t}\n\t\t}\n\n\t\tthrow new Error(\"Wrong format for invalidateOnChildChange: boolean or object is expected\");\n\t}\n\n\tgetI18n(): I18nBundleAccessors {\n\t\tif (!this.metadata.i18n) {\n\t\t\tthis.metadata.i18n = {};\n\t\t}\n\t\treturn this.metadata.i18n;\n\t}\n}\n\nconst validateSingleSlot = (value: Node, slotData: Slot) => {\n\tvalue && getSlottedNodes(value).forEach(el => {\n\t\tif (!(el instanceof slotData.type)) {\n\t\t\tthrow new Error(`The element is not of type ${slotData.type.toString()}`);\n\t\t}\n\t});\n\n\treturn value;\n};\n\nexport default UI5ElementMetadata;\nexport type {\n\tProperty,\n\tPropertyValue,\n\tSlot,\n\tSlotValue,\n\tEventData,\n\tState,\n\tMetadata,\n};\n"],
5
+ "mappings": "aAAA,OAAS,oBAAAA,EAAkB,oBAAAC,MAAwB,yBACnD,OAAS,mBAAAC,MAAuB,wBAChC,OAAS,mCAAAC,MAAuC,gCA4DhD,MAAMC,CAAmB,CAIxB,YAAYC,EAAoB,CAC/B,KAAK,SAAWA,CACjB,CAEA,iBAAkB,CACjB,GAAI,OAAO,UAAU,eAAe,KAAK,KAAM,eAAe,EAC7D,OAAO,KAAK,cAEb,MAAMC,EAAsB,CAAC,EAI7B,GAHwB,KAAK,gBAAgB,EAGxB,CACpB,MAAMC,EAAQ,KAAK,SAAS,EAC5B,SAAW,CAACC,EAAUC,CAAQ,IAAK,OAAO,QAAcF,CAAK,EAAG,CAC/D,MAAMG,EAAeD,EAAS,cAAgBD,EAC9CF,EAAaI,CAAY,EAAI,CAAC,EAC9BJ,EAAaL,EAAiBS,CAAY,CAAC,EAAIJ,EAAaI,CAAY,CACzE,CACD,CAEA,YAAK,cAAgBJ,EACdA,CACR,CAQA,OAAO,kBAAkBK,EAAaF,EAAsB,CAC3D,OAAOG,EAAmBD,EAAOF,CAAQ,CAC1C,CAMA,YAAqB,CACpB,OAAO,KAAK,SAAS,KAAO,EAC7B,CAM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veScopingSuffixForTag", "UI5ElementMetadata", "metadata", "initialState", "slots", "slotName", "slotData", "propertyName", "value", "validateSingleSlot", "pureTag", "suffix", "propName", "propData", "type", "name", "config", "el"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";const e={version:"2.20.0-rc.1",major:2,minor:20,patch:0,suffix:"-rc.1",isNext:!1,buildTime:1771488836};export default e;
1
+ "use strict";const e={version:"2.20.0-rc.3",major:2,minor:20,patch:0,suffix:"-rc.3",isNext:!1,buildTime:1772698275};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.20.0-rc.1\",\n\tmajor: 2,\n\tminor: 20,\n\tpatch: 0,\n\tsuffix: \"-rc.1\",\n\tisNext: false,\n\tbuildTime: 1771488836,\n};\nexport default VersionInfo;"],
4
+ "sourcesContent": ["const VersionInfo = {\n\tversion: \"2.20.0-rc.3\",\n\tmajor: 2,\n\tminor: 20,\n\tpatch: 0,\n\tsuffix: \"-rc.3\",\n\tisNext: false,\n\tbuildTime: 1772698275,\n};\nexport default VersionInfo;"],
5
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
  }
@@ -1,2 +1,2 @@
1
- "use strict";import s from"../../generated/css/MultipleDragGhost.css.js";import{getI18nBundle as i}from"../../i18nBundle.js";import{DRAG_DROP_MULTIPLE_TEXT as c}from"../../generated/i18n/i18n-defaults.js";const l=2;let a=null;const g=e=>{a=e},d=()=>{a=null},p=()=>a,u=async e=>{const t=document.createElement("div"),n=await i("@ui5/webcomponents-base"),r=t.attachShadow({mode:"open"}),o=new CSSStyleSheet;return o.replaceSync(s),r.adoptedStyleSheets=[o],r.textContent=n.getText(c,e),t},m=async(e,t)=>{if(e<l){console.warn(`Cannot start multiple drag with count ${e}. Minimum is ${l}.`);return}if(!t.dataTransfer)return;const n=await u(e);document.body.appendChild(n),t.dataTransfer.setDragImage(n,0,0),requestAnimationFrame(()=>{n.remove()})},D={setDraggedElement:g,clearDraggedElement:d,getDraggedElement:p,startMultipleDrag:m};export default D;export{m as startMultipleDrag};
1
+ "use strict";import m from"../../generated/css/MultipleDragGhost.css.js";import{getI18nBundle as i}from"../../i18nBundle.js";import{DRAG_DROP_MULTIPLE_TEXT as c}from"../../generated/i18n/i18n-defaults.js";const l=2;let a=null;const g=(e,t)=>{a=e,t?.dataTransfer?.setData("text/plain",e?e.id:"")},d=()=>{a=null},p=()=>a,u=async e=>{const t=document.createElement("div"),n=await i("@ui5/webcomponents-base"),r=t.attachShadow({mode:"open"}),o=new CSSStyleSheet;return o.replaceSync(m),r.adoptedStyleSheets=[o],r.textContent=n.getText(c,e),t},s=async(e,t)=>{if(e<l){console.warn(`Cannot start multiple drag with count ${e}. Minimum is ${l}.`);return}if(!t.dataTransfer)return;const n=await u(e);document.body.appendChild(n),t.dataTransfer.setDragImage(n,0,0),requestAnimationFrame(()=>{n.remove()})},D={setDraggedElement:g,clearDraggedElement:d,getDraggedElement:p,startMultipleDrag:s};export default D;export{s as startMultipleDrag};
2
2
  //# sourceMappingURL=DragRegistry.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/util/dragAndDrop/DragRegistry.ts"],
4
- "sourcesContent": ["import type MovePlacement from \"../../types/MovePlacement.js\";\nimport MultipleDragGhostCss from \"../../generated/css/MultipleDragGhost.css.js\";\n\nimport { getI18nBundle } from \"../../i18nBundle.js\";\n\nimport {\n\tDRAG_DROP_MULTIPLE_TEXT,\n} from \"../../generated/i18n/i18n-defaults.js\";\n\nconst MIN_MULTI_DRAG_COUNT = 2;\n\nlet draggedElement: HTMLElement | null = null;\n\nconst setDraggedElement = (element: HTMLElement | null) => {\n\tdraggedElement = element;\n};\n\nconst clearDraggedElement = () => {\n\tdraggedElement = null;\n};\n\nconst getDraggedElement = () => {\n\treturn draggedElement;\n};\n\nconst createDefaultMultiDragElement = async (count: number): Promise<HTMLElement> => {\n\tconst dragElement = document.createElement(\"div\");\n\tconst i18nBundle = await getI18nBundle(\"@ui5/webcomponents-base\");\n\n\tconst dragElementShadow = dragElement.attachShadow({ mode: \"open\" });\n\n\tconst styles = new CSSStyleSheet();\n\tstyles.replaceSync(MultipleDragGhostCss);\n\n\tdragElementShadow.adoptedStyleSheets = [styles];\n\tdragElementShadow.textContent = i18nBundle.getText(DRAG_DROP_MULTIPLE_TEXT, count);\n\n\treturn dragElement;\n};\n\n/**\n * Starts a multiple drag operation by creating a drag ghost element.\n * The drag ghost will be displayed when dragging multiple items.\n *\n * @param {number} count - The number of items being dragged.\n * @param {DragEvent} e - The drag event that triggered the operation.\n * @public\n */\nconst startMultipleDrag = async (count: number, e: DragEvent) => {\n\tif (count < MIN_MULTI_DRAG_COUNT) {\n\t\tconsole.warn(`Cannot start multiple drag with count ${count}. Minimum is ${MIN_MULTI_DRAG_COUNT}.`); // eslint-disable-line\n\t\treturn;\n\t}\n\n\tif (!e.dataTransfer) {\n\t\treturn;\n\t}\n\n\tconst customDragElement = await createDefaultMultiDragElement(count);\n\n\t// Add to document body temporarily\n\tdocument.body.appendChild(customDragElement);\n\n\te.dataTransfer.setDragImage(customDragElement, 0, 0);\n\n\t// Clean up the temporary element after the drag operation starts\n\trequestAnimationFrame(() => {\n\t\tcustomDragElement.remove();\n\t});\n};\n\ntype DragAndDropSettings = {\n\t/**\n\t * Allow cross-browser and file drag and drop.\n\t */\n\tcrossDnD?: boolean;\n\t/**\n\t * Pass the original event in the event parameters.\n\t */\n\toriginalEvent?: boolean;\n};\n\ntype MoveEventDetail = {\n\toriginalEvent: Event,\n\tsource: {\n\t\telement: HTMLElement,\n\t},\n\tdestination: {\n\t\telement: HTMLElement,\n\t\tplacement: `${MovePlacement}`,\n\t}\n};\n\nconst DragRegistry = {\n\tsetDraggedElement,\n\tclearDraggedElement,\n\tgetDraggedElement,\n\tstartMultipleDrag,\n};\n\nexport default DragRegistry;\nexport {\n\tstartMultipleDrag,\n};\n\nexport type {\n\tDragAndDropSettings,\n\tMoveEventDetail,\n};\n"],
5
- "mappings": "aACA,OAAOA,MAA0B,+CAEjC,OAAS,iBAAAC,MAAqB,sBAE9B,OACC,2BAAAC,MACM,wCAEP,MAAMC,EAAuB,EAE7B,IAAIC,EAAqC,KAEzC,MAAMC,EAAqBC,GAAgC,CAC1DF,EAAiBE,CAClB,EAEMC,EAAsB,IAAM,CACjCH,EAAiB,IAClB,EAEMI,EAAoB,IAClBJ,EAGFK,EAAgC,MAAOC,GAAwC,CACpF,MAAMC,EAAc,SAAS,cAAc,KAAK,EAC1CC,EAAa,MAAMX,EAAc,yBAAyB,EAE1DY,EAAoBF,EAAY,aAAa,CAAE,KAAM,MAAO,CAAC,EAE7DG,EAAS,IAAI,cACnB,OAAAA,EAAO,YAAYd,CAAoB,EAEvCa,EAAkB,mBAAqB,CAACC,CAAM,EAC9CD,EAAkB,YAAcD,EAAW,QAAQV,EAAyBQ,CAAK,EAE1EC,CACR,EAUMI,EAAoB,MAAOL,EAAeM,IAAiB,CAChE,GAAIN,EAAQP,EAAsB,CACjC,QAAQ,KAAK,yCAAyCO,CAAK,gBAAgBP,CAAoB,GAAG,EAClG,MACD,CAEA,GAAI,CAACa,EAAE,aACN,OAGD,MAAMC,EAAoB,MAAMR,EAA8BC,CAAK,EAGnE,SAAS,KAAK,YAAYO,CAAiB,EAE3CD,EAAE,aAAa,aAAaC,EAAmB,EAAG,CAAC,EAGnD,sBAAsB,IAAM,CAC3BA,EAAkB,OAAO,CAC1B,CAAC,CACF,EAwBMC,EAAe,CACpB,kBAAAb,EACA,oBAAAE,EACA,kBAAAC,EACA,kBAAAO,CACD,EAEA,eAAeG,EACf,OACCH,KAAA",
6
- "names": ["MultipleDragGhostCss", "getI18nBundle", "DRAG_DROP_MULTIPLE_TEXT", "MIN_MULTI_DRAG_COUNT", "draggedElement", "setDraggedElement", "element", "clearDraggedElement", "getDraggedElement", "createDefaultMultiDragElement", "count", "dragElement", "i18nBundle", "dragElementShadow", "styles", "startMultipleDrag", "e", "customDragElement", "DragRegistry"]
4
+ "sourcesContent": ["import type MovePlacement from \"../../types/MovePlacement.js\";\nimport MultipleDragGhostCss from \"../../generated/css/MultipleDragGhost.css.js\";\n\nimport { getI18nBundle } from \"../../i18nBundle.js\";\n\nimport {\n\tDRAG_DROP_MULTIPLE_TEXT,\n} from \"../../generated/i18n/i18n-defaults.js\";\n\nconst MIN_MULTI_DRAG_COUNT = 2;\n\nlet draggedElement: HTMLElement | null = null;\n\nconst setDraggedElement = (element: HTMLElement | null, e?: DragEvent) => {\n\tdraggedElement = element;\n\n\t// Store the dragged element's ID in the dataTransfer object to ensure\n\t// the drag operation is recognized across different browsers and contexts.\n\t// Without this, Safari browser in iOS may not recognize the drag operation.\n\te?.dataTransfer?.setData(\"text/plain\", element ? element.id : \"\");\n};\n\nconst clearDraggedElement = () => {\n\tdraggedElement = null;\n};\n\nconst getDraggedElement = () => {\n\treturn draggedElement;\n};\n\nconst createDefaultMultiDragElement = async (count: number): Promise<HTMLElement> => {\n\tconst dragElement = document.createElement(\"div\");\n\tconst i18nBundle = await getI18nBundle(\"@ui5/webcomponents-base\");\n\n\tconst dragElementShadow = dragElement.attachShadow({ mode: \"open\" });\n\n\tconst styles = new CSSStyleSheet();\n\tstyles.replaceSync(MultipleDragGhostCss);\n\n\tdragElementShadow.adoptedStyleSheets = [styles];\n\tdragElementShadow.textContent = i18nBundle.getText(DRAG_DROP_MULTIPLE_TEXT, count);\n\n\treturn dragElement;\n};\n\n/**\n * Starts a multiple drag operation by creating a drag ghost element.\n * The drag ghost will be displayed when dragging multiple items.\n *\n * @param {number} count - The number of items being dragged.\n * @param {DragEvent} e - The drag event that triggered the operation.\n * @public\n */\nconst startMultipleDrag = async (count: number, e: DragEvent) => {\n\tif (count < MIN_MULTI_DRAG_COUNT) {\n\t\tconsole.warn(`Cannot start multiple drag with count ${count}. Minimum is ${MIN_MULTI_DRAG_COUNT}.`); // eslint-disable-line\n\t\treturn;\n\t}\n\n\tif (!e.dataTransfer) {\n\t\treturn;\n\t}\n\n\tconst customDragElement = await createDefaultMultiDragElement(count);\n\n\t// Add to document body temporarily\n\tdocument.body.appendChild(customDragElement);\n\n\te.dataTransfer.setDragImage(customDragElement, 0, 0);\n\n\t// Clean up the temporary element after the drag operation starts\n\trequestAnimationFrame(() => {\n\t\tcustomDragElement.remove();\n\t});\n};\n\ntype DragAndDropSettings = {\n\t/**\n\t * Allow cross-browser and file drag and drop.\n\t */\n\tcrossDnD?: boolean;\n\t/**\n\t * Pass the original event in the event parameters.\n\t */\n\toriginalEvent?: boolean;\n};\n\ntype MoveEventDetail = {\n\toriginalEvent: Event,\n\tsource: {\n\t\telement: HTMLElement,\n\t},\n\tdestination: {\n\t\telement: HTMLElement,\n\t\tplacement: `${MovePlacement}`,\n\t}\n};\n\nconst DragRegistry = {\n\tsetDraggedElement,\n\tclearDraggedElement,\n\tgetDraggedElement,\n\tstartMultipleDrag,\n};\n\nexport default DragRegistry;\nexport {\n\tstartMultipleDrag,\n};\n\nexport type {\n\tDragAndDropSettings,\n\tMoveEventDetail,\n};\n"],
5
+ "mappings": "aACA,OAAOA,MAA0B,+CAEjC,OAAS,iBAAAC,MAAqB,sBAE9B,OACC,2BAAAC,MACM,wCAEP,MAAMC,EAAuB,EAE7B,IAAIC,EAAqC,KAEzC,MAAMC,EAAoB,CAACC,EAA6BC,IAAkB,CACzEH,EAAiBE,EAKjBC,GAAG,cAAc,QAAQ,aAAcD,EAAUA,EAAQ,GAAK,EAAE,CACjE,EAEME,EAAsB,IAAM,CACjCJ,EAAiB,IAClB,EAEMK,EAAoB,IAClBL,EAGFM,EAAgC,MAAOC,GAAwC,CACpF,MAAMC,EAAc,SAAS,cAAc,KAAK,EAC1CC,EAAa,MAAMZ,EAAc,yBAAyB,EAE1Da,EAAoBF,EAAY,aAAa,CAAE,KAAM,MAAO,CAAC,EAE7DG,EAAS,IAAI,cACnB,OAAAA,EAAO,YAAYf,CAAoB,EAEvCc,EAAkB,mBAAqB,CAACC,CAAM,EAC9CD,EAAkB,YAAcD,EAAW,QAAQX,EAAyBS,CAAK,EAE1EC,CACR,EAUMI,EAAoB,MAAOL,EAAeJ,IAAiB,CAChE,GAAII,EAAQR,EAAsB,CACjC,QAAQ,KAAK,yCAAyCQ,CAAK,gBAAgBR,CAAoB,GAAG,EAClG,MACD,CAEA,GAAI,CAACI,EAAE,aACN,OAGD,MAAMU,EAAoB,MAAMP,EAA8BC,CAAK,EAGnE,SAAS,KAAK,YAAYM,CAAiB,EAE3CV,EAAE,aAAa,aAAaU,EAAmB,EAAG,CAAC,EAGnD,sBAAsB,IAAM,CAC3BA,EAAkB,OAAO,CAC1B,CAAC,CACF,EAwBMC,EAAe,CACpB,kBAAAb,EACA,oBAAAG,EACA,kBAAAC,EACA,kBAAAO,CACD,EAEA,eAAeE,EACf,OACCF,KAAA",
6
+ "names": ["MultipleDragGhostCss", "getI18nBundle", "DRAG_DROP_MULTIPLE_TEXT", "MIN_MULTI_DRAG_COUNT", "draggedElement", "setDraggedElement", "element", "e", "clearDraggedElement", "getDraggedElement", "createDefaultMultiDragElement", "count", "dragElement", "i18nBundle", "dragElementShadow", "styles", "startMultipleDrag", "customDragElement", "DragRegistry"]
7
7
  }
@@ -29,7 +29,7 @@ type MoveEventDetail = {
29
29
  };
30
30
  };
31
31
  declare const DragRegistry: {
32
- setDraggedElement: (element: HTMLElement | null) => void;
32
+ setDraggedElement: (element: HTMLElement | null, e?: DragEvent) => void;
33
33
  clearDraggedElement: () => void;
34
34
  getDraggedElement: () => HTMLElement | null;
35
35
  startMultipleDrag: (count: number, e: DragEvent) => Promise<void>;
@@ -3,8 +3,12 @@ import { getI18nBundle } from "../../i18nBundle.js";
3
3
  import { DRAG_DROP_MULTIPLE_TEXT, } from "../../generated/i18n/i18n-defaults.js";
4
4
  const MIN_MULTI_DRAG_COUNT = 2;
5
5
  let draggedElement = null;
6
- const setDraggedElement = (element) => {
6
+ const setDraggedElement = (element, e) => {
7
7
  draggedElement = element;
8
+ // Store the dragged element's ID in the dataTransfer object to ensure
9
+ // the drag operation is recognized across different browsers and contexts.
10
+ // Without this, Safari browser in iOS may not recognize the drag operation.
11
+ e?.dataTransfer?.setData("text/plain", element ? element.id : "");
8
12
  };
9
13
  const clearDraggedElement = () => {
10
14
  draggedElement = null;
@@ -1 +1 @@
1
- {"version":3,"file":"DragRegistry.js","sourceRoot":"","sources":["../../../src/util/dragAndDrop/DragRegistry.ts"],"names":[],"mappings":"AACA,OAAO,oBAAoB,MAAM,8CAA8C,CAAC;AAEhF,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,OAAO,EACN,uBAAuB,GACvB,MAAM,uCAAuC,CAAC;AAE/C,MAAM,oBAAoB,GAAG,CAAC,CAAC;AAE/B,IAAI,cAAc,GAAuB,IAAI,CAAC;AAE9C,MAAM,iBAAiB,GAAG,CAAC,OAA2B,EAAE,EAAE;IACzD,cAAc,GAAG,OAAO,CAAC;AAC1B,CAAC,CAAC;AAEF,MAAM,mBAAmB,GAAG,GAAG,EAAE;IAChC,cAAc,GAAG,IAAI,CAAC;AACvB,CAAC,CAAC;AAEF,MAAM,iBAAiB,GAAG,GAAG,EAAE;IAC9B,OAAO,cAAc,CAAC;AACvB,CAAC,CAAC;AAEF,MAAM,6BAA6B,GAAG,KAAK,EAAE,KAAa,EAAwB,EAAE;IACnF,MAAM,WAAW,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IAClD,MAAM,UAAU,GAAG,MAAM,aAAa,CAAC,yBAAyB,CAAC,CAAC;IAElE,MAAM,iBAAiB,GAAG,WAAW,CAAC,YAAY,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC;IAErE,MAAM,MAAM,GAAG,IAAI,aAAa,EAAE,CAAC;IACnC,MAAM,CAAC,WAAW,CAAC,oBAAoB,CAAC,CAAC;IAEzC,iBAAiB,CAAC,kBAAkB,GAAG,CAAC,MAAM,CAAC,CAAC;IAChD,iBAAiB,CAAC,WAAW,GAAG,UAAU,CAAC,OAAO,CAAC,uBAAuB,EAAE,KAAK,CAAC,CAAC;IAEnF,OAAO,WAAW,CAAC;AACpB,CAAC,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,iBAAiB,GAAG,KAAK,EAAE,KAAa,EAAE,CAAY,EAAE,EAAE;IAC/D,IAAI,KAAK,GAAG,oBAAoB,EAAE,CAAC;QAClC,OAAO,CAAC,IAAI,CAAC,yCAAyC,KAAK,gBAAgB,oBAAoB,GAAG,CAAC,CAAC,CAAC,sBAAsB;QAC3H,OAAO;IACR,CAAC;IAED,IAAI,CAAC,CAAC,CAAC,YAAY,EAAE,CAAC;QACrB,OAAO;IACR,CAAC;IAED,MAAM,iBAAiB,GAAG,MAAM,6BAA6B,CAAC,KAAK,CAAC,CAAC;IAErE,mCAAmC;IACnC,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,iBAAiB,CAAC,CAAC;IAE7C,CAAC,CAAC,YAAY,CAAC,YAAY,CAAC,iBAAiB,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;IAErD,iEAAiE;IACjE,qBAAqB,CAAC,GAAG,EAAE;QAC1B,iBAAiB,CAAC,MAAM,EAAE,CAAC;IAC5B,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC;AAwBF,MAAM,YAAY,GAAG;IACpB,iBAAiB;IACjB,mBAAmB;IACnB,iBAAiB;IACjB,iBAAiB;CACjB,CAAC;AAEF,eAAe,YAAY,CAAC;AAC5B,OAAO,EACN,iBAAiB,GACjB,CAAC","sourcesContent":["import type MovePlacement from \"../../types/MovePlacement.js\";\nimport MultipleDragGhostCss from \"../../generated/css/MultipleDragGhost.css.js\";\n\nimport { getI18nBundle } from \"../../i18nBundle.js\";\n\nimport {\n\tDRAG_DROP_MULTIPLE_TEXT,\n} from \"../../generated/i18n/i18n-defaults.js\";\n\nconst MIN_MULTI_DRAG_COUNT = 2;\n\nlet draggedElement: HTMLElement | null = null;\n\nconst setDraggedElement = (element: HTMLElement | null) => {\n\tdraggedElement = element;\n};\n\nconst clearDraggedElement = () => {\n\tdraggedElement = null;\n};\n\nconst getDraggedElement = () => {\n\treturn draggedElement;\n};\n\nconst createDefaultMultiDragElement = async (count: number): Promise<HTMLElement> => {\n\tconst dragElement = document.createElement(\"div\");\n\tconst i18nBundle = await getI18nBundle(\"@ui5/webcomponents-base\");\n\n\tconst dragElementShadow = dragElement.attachShadow({ mode: \"open\" });\n\n\tconst styles = new CSSStyleSheet();\n\tstyles.replaceSync(MultipleDragGhostCss);\n\n\tdragElementShadow.adoptedStyleSheets = [styles];\n\tdragElementShadow.textContent = i18nBundle.getText(DRAG_DROP_MULTIPLE_TEXT, count);\n\n\treturn dragElement;\n};\n\n/**\n * Starts a multiple drag operation by creating a drag ghost element.\n * The drag ghost will be displayed when dragging multiple items.\n *\n * @param {number} count - The number of items being dragged.\n * @param {DragEvent} e - The drag event that triggered the operation.\n * @public\n */\nconst startMultipleDrag = async (count: number, e: DragEvent) => {\n\tif (count < MIN_MULTI_DRAG_COUNT) {\n\t\tconsole.warn(`Cannot start multiple drag with count ${count}. Minimum is ${MIN_MULTI_DRAG_COUNT}.`); // eslint-disable-line\n\t\treturn;\n\t}\n\n\tif (!e.dataTransfer) {\n\t\treturn;\n\t}\n\n\tconst customDragElement = await createDefaultMultiDragElement(count);\n\n\t// Add to document body temporarily\n\tdocument.body.appendChild(customDragElement);\n\n\te.dataTransfer.setDragImage(customDragElement, 0, 0);\n\n\t// Clean up the temporary element after the drag operation starts\n\trequestAnimationFrame(() => {\n\t\tcustomDragElement.remove();\n\t});\n};\n\ntype DragAndDropSettings = {\n\t/**\n\t * Allow cross-browser and file drag and drop.\n\t */\n\tcrossDnD?: boolean;\n\t/**\n\t * Pass the original event in the event parameters.\n\t */\n\toriginalEvent?: boolean;\n};\n\ntype MoveEventDetail = {\n\toriginalEvent: Event,\n\tsource: {\n\t\telement: HTMLElement,\n\t},\n\tdestination: {\n\t\telement: HTMLElement,\n\t\tplacement: `${MovePlacement}`,\n\t}\n};\n\nconst DragRegistry = {\n\tsetDraggedElement,\n\tclearDraggedElement,\n\tgetDraggedElement,\n\tstartMultipleDrag,\n};\n\nexport default DragRegistry;\nexport {\n\tstartMultipleDrag,\n};\n\nexport type {\n\tDragAndDropSettings,\n\tMoveEventDetail,\n};\n"]}
1
+ {"version":3,"file":"DragRegistry.js","sourceRoot":"","sources":["../../../src/util/dragAndDrop/DragRegistry.ts"],"names":[],"mappings":"AACA,OAAO,oBAAoB,MAAM,8CAA8C,CAAC;AAEhF,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,OAAO,EACN,uBAAuB,GACvB,MAAM,uCAAuC,CAAC;AAE/C,MAAM,oBAAoB,GAAG,CAAC,CAAC;AAE/B,IAAI,cAAc,GAAuB,IAAI,CAAC;AAE9C,MAAM,iBAAiB,GAAG,CAAC,OAA2B,EAAE,CAAa,EAAE,EAAE;IACxE,cAAc,GAAG,OAAO,CAAC;IAEzB,sEAAsE;IACtE,2EAA2E;IAC3E,4EAA4E;IAC5E,CAAC,EAAE,YAAY,EAAE,OAAO,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;AACnE,CAAC,CAAC;AAEF,MAAM,mBAAmB,GAAG,GAAG,EAAE;IAChC,cAAc,GAAG,IAAI,CAAC;AACvB,CAAC,CAAC;AAEF,MAAM,iBAAiB,GAAG,GAAG,EAAE;IAC9B,OAAO,cAAc,CAAC;AACvB,CAAC,CAAC;AAEF,MAAM,6BAA6B,GAAG,KAAK,EAAE,KAAa,EAAwB,EAAE;IACnF,MAAM,WAAW,GAAG,QAAQ,CA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B,iBAAiB;CACjB,CAAC;AAEF,eAAe,YAAY,CAAC;AAC5B,OAAO,EACN,iBAAiB,GACjB,CAAC","sourcesContent":["import type MovePlacement from \"../../types/MovePlacement.js\";\nimport MultipleDragGhostCss from \"../../generated/css/MultipleDragGhost.css.js\";\n\nimport { getI18nBundle } from \"../../i18nBundle.js\";\n\nimport {\n\tDRAG_DROP_MULTIPLE_TEXT,\n} from \"../../generated/i18n/i18n-defaults.js\";\n\nconst MIN_MULTI_DRAG_COUNT = 2;\n\nlet draggedElement: HTMLElement | null = null;\n\nconst setDraggedElement = (element: HTMLElement | null, e?: DragEvent) => {\n\tdraggedElement = element;\n\n\t// Store the dragged element's ID in the dataTransfer object to ensure\n\t// the drag operation is recognized across different browsers and contexts.\n\t// Without this, Safari browser in iOS may not recognize the drag operation.\n\te?.dataTransfer?.setData(\"text/plain\", element ? element.id : \"\");\n};\n\nconst clearDraggedElement = () => {\n\tdraggedElement = null;\n};\n\nconst getDraggedElement = () => {\n\treturn draggedElement;\n};\n\nconst createDefaultMultiDragElement = async (count: number): Promise<HTMLElement> => {\n\tconst dragElement = document.createElement(\"div\");\n\tconst i18nBundle = await getI18nBundle(\"@ui5/webcomponents-base\");\n\n\tconst dragElementShadow = dragElement.attachShadow({ mode: \"open\" });\n\n\tconst styles = new CSSStyleSheet();\n\tstyles.replaceSync(MultipleDragGhostCss);\n\n\tdragElementShadow.adoptedStyleSheets = [styles];\n\tdragElementShadow.textContent = i18nBundle.getText(DRAG_DROP_MULTIPLE_TEXT, count);\n\n\treturn dragElement;\n};\n\n/**\n * Starts a multiple drag operation by creating a drag ghost element.\n * The drag ghost will be displayed when dragging multiple items.\n *\n * @param {number} count - The number of items being dragged.\n * @param {DragEvent} e - The drag event that triggered the operation.\n * @public\n */\nconst startMultipleDrag = async (count: number, e: DragEvent) => {\n\tif (count < MIN_MULTI_DRAG_COUNT) {\n\t\tconsole.warn(`Cannot start multiple drag with count ${count}. Minimum is ${MIN_MULTI_DRAG_COUNT}.`); // eslint-disable-line\n\t\treturn;\n\t}\n\n\tif (!e.dataTransfer) {\n\t\treturn;\n\t}\n\n\tconst customDragElement = await createDefaultMultiDragElement(count);\n\n\t// Add to document body temporarily\n\tdocument.body.appendChild(customDragElement);\n\n\te.dataTransfer.setDragImage(customDragElement, 0, 0);\n\n\t// Clean up the temporary element after the drag operation starts\n\trequestAnimationFrame(() => {\n\t\tcustomDragElement.remove();\n\t});\n};\n\ntype DragAndDropSettings = {\n\t/**\n\t * Allow cross-browser and file drag and drop.\n\t */\n\tcrossDnD?: boolean;\n\t/**\n\t * Pass the original event in the event parameters.\n\t */\n\toriginalEvent?: boolean;\n};\n\ntype MoveEventDetail = {\n\toriginalEvent: Event,\n\tsource: {\n\t\telement: HTMLElement,\n\t},\n\tdestination: {\n\t\telement: HTMLElement,\n\t\tplacement: `${MovePlacement}`,\n\t}\n};\n\nconst DragRegistry = {\n\tsetDraggedElement,\n\tclearDraggedElement,\n\tgetDraggedElement,\n\tstartMultipleDrag,\n};\n\nexport default DragRegistry;\nexport {\n\tstartMultipleDrag,\n};\n\nexport type {\n\tDragAndDropSettings,\n\tMoveEventDetail,\n};\n"]}
@@ -3,7 +3,7 @@
3
3
  "tags": [
4
4
  {
5
5
  "name": "ui5element",
6
- "description": "Base class for all UI5 Web Components\n\n\n---\n\n\n\n\n### **Methods:**\n - **onBeforeRendering(): _void_** - Called every time before the component renders.\n- **onAfterRendering(): _void_** - Called every time after the component renders.\n- **onEnterDOM(): _void_** - Called on connectedCallback - added to the DOM.\n- **onExitDOM(): _void_** - Called on disconnectedCallback - removed from the DOM.\n- **attachInvalidate(callback: _(param: InvalidationInfo) => void_): _void_** - Attach a callback that will be executed whenever the component is invalidated\n- **detachInvalidate(callback: _(param: InvalidationInfo) => void_): _void_** - Detach the callback that is executed whenever the component is invalidated\n- **onInvalidation(changeInfo: _ChangeInfo_): _void_** - A callback that is executed each time an already rendered component is invalidated (scheduled for re-rendering)\n- **getDomRef(): _HTMLElement | undefined_** - Returns the DOM Element inside the Shadow Root that corresponds to the opening tag in the UI5 Web Component's template\n*Note:* For logical (abstract) elements (items, options, etc...), returns the part of the parent's DOM that represents this option\nUse this method instead of \"this.shadowRoot\" to read the Shadow DOM, if ever necessary\n- **getFocusDomRef(): _HTMLElement | undefined_** - Returns the DOM Element marked with \"data-sap-focus-ref\" inside the template.\nThis is the element that will receive the focus by default.\n- **getFocusDomRefAsync(): _Promise<HTMLElement | undefined>_** - Waits for dom ref and then returns the DOM Element marked with \"data-sap-focus-ref\" inside the template.\nThis is the element that will receive the focus by default.\n- **focus(focusOptions: _FocusOptions_): _Promise<void>_** - Set the focus to the element, returned by \"getFocusDomRef()\" (marked by \"data-sap-focus-ref\")\n- **fireDecoratorEvent(name: _N_, data: _this[\"eventDetails\"][N] | undefined_): _boolean_** - Fires a custom event, configured via the \"event\" decorator.\n- **getSlottedNodes(): _Array<T>_** - Returns the actual children, associated with a slot.\nUseful when there are transitive slots in nested component scenarios and you don't want to get a list of the slots, but rather of their content.\n- **attachComponentStateFinalized(callback: _() => void_): _void_** - Attach a callback that will be executed whenever the component's state is finalized\n- **detachComponentStateFinalized(callback: _() => void_): _void_** - Detach the callback that is executed whenever the component's state is finalized\n- **getUniqueDependencies(): _Array<typeof UI5Element>_** - Returns a list of the unique dependencies for this UI5 Web Component\n- **define(): _typeof UI5Element_** - Registers a UI5 Web Component in the browser window object\n- **getMetadata(): _UI5ElementMetadata_** - Returns an instance of UI5ElementMetadata.js representing this UI5 Web Component's full metadata (its and its parents')\nNote: not to be confused with the \"get metadata()\" method, which returns an object for this class's metadata only",
6
+ "description": "Base class for all UI5 Web Components\n\n\n---\n\n\n\n\n### **Methods:**\n - **attachComponentStateFinalized(callback: _() => void_): _void_** - Attach a callback that will be executed whenever the component's state is finalized\n- **attachInvalidate(callback: _(param: InvalidationInfo) => void_): _void_** - Attach a callback that will be executed whenever the component is invalidated\n- **define(): _typeof UI5Element_** - Registers a UI5 Web Component in the browser window object\n- **detachComponentStateFinalized(callback: _() => void_): _void_** - Detach the callback that is executed whenever the component's state is finalized\n- **detachInvalidate(callback: _(param: InvalidationInfo) => void_): _void_** - Detach the callback that is executed whenever the component is invalidated\n- **fireDecoratorEvent(data: _this[\"eventDetails\"][N] | undefined_, name: _N_): _boolean_** - Fires a custom event, configured via the \"event\" decorator.\n- **focus(focusOptions: _FocusOptions_): _Promise<void>_** - Set the focus to the element, returned by \"getFocusDomRef()\" (marked by \"data-sap-focus-ref\")\n- **getDomRef(): _HTMLElement | undefined_** - Returns the DOM Element inside the Shadow Root that corresponds to the opening tag in the UI5 Web Component's template\n*Note:* For logical (abstract) elements (items, options, etc...), returns the part of the parent's DOM that represents this option\nUse this method instead of \"this.shadowRoot\" to read the Shadow DOM, if ever necessary\n- **getFocusDomRef(): _HTMLElement | undefined_** - Returns the DOM Element marked with \"data-sap-focus-ref\" inside the template.\nThis is the element that will receive the focus by default.\n- **getFocusDomRefAsync(): _Promise<HTMLElement | undefined>_** - Waits for dom ref and then returns the DOM Element marked with \"data-sap-focus-ref\" inside the template.\nThis is the element that will receive the focus by default.\n- **getMetadata(): _UI5ElementMetadata_** - Returns an instance of UI5ElementMetadata.js representing this UI5 Web Component's full metadata (its and its parents')\nNote: not to be confused with the \"get metadata()\" method, which returns an object for this class's metadata only\n- **getSlottedNodes(): _Array<T>_** - Returns the actual children, associated with a slot.\nUseful when there are transitive slots in nested component scenarios and you don't want to get a list of the slots, but rather of their content.\n- **getUniqueDependencies(): _Array<typeof UI5Element>_** - Returns a list of the unique dependencies for this UI5 Web Component\n- **onAfterRendering(): _void_** - Called every time after the component renders.\n- **onBeforeRendering(): _void_** - Called every time before the component renders.\n- **onEnterDOM(): _void_** - Called on connectedCallback - added to the DOM.\n- **onExitDOM(): _void_** - Called on disconnectedCallback - removed from the DOM.\n- **onInvalidation(changeInfo: _ChangeInfo_): _void_** - A callback that is executed each time an already rendered component is invalidated (scheduled for re-rendering)",
7
7
  "attributes": [
8
8
  {
9
9
  "name": "effective-dir",
@@ -70,12 +70,12 @@ const scripts = {
70
70
  "ui5": `ui5nps-script "${LIB}copy-and-watch/index.js" "dist/sap/**/*" dist/prod/sap/`,
71
71
  "preact": `ui5nps-script "${LIB}copy-and-watch/index.js" "dist/thirdparty/preact/**/*.js" dist/prod/thirdparty/preact/`,
72
72
  "assets": `ui5nps-script "${LIB}copy-and-watch/index.js" "dist/generated/assets/**/*.json" dist/prod/generated/assets/`,
73
- }
74
- },
73
+ }
74
+ },
75
75
  generateAPI: {
76
- default: "ui5nps generateAPI.generateCEM generateAPI.validateCEM",
77
76
  generateCEM: `ui5nps-script "${LIB}/cem/cem.js" analyze --config "${LIB}cem/custom-elements-manifest.config.mjs"`,
78
77
  validateCEM: `ui5nps-script "${LIB}/cem/validate.js"`,
78
+ mergeCEM: `ui5nps-script "${LIB}cem/merge.mjs"`,
79
79
  },
80
80
  watch: {
81
81
  default: 'ui5nps-p watch.src watch.styles', // concurently
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ui5/webcomponents-base",
3
- "version": "2.20.0-rc.1",
3
+ "version": "2.20.0-rc.3",
4
4
  "description": "UI5 Web Components: webcomponents.base",
5
5
  "author": "SAP SE (https://www.sap.com)",
6
6
  "license": "Apache-2.0",
@@ -48,7 +48,9 @@
48
48
  "start": "wc-dev start",
49
49
  "build": "wc-dev build",
50
50
  "generate": "wc-dev generate",
51
- "generateAPI": "wc-dev generateAPI",
51
+ "generateCEM": "wc-dev generateAPI.generateCEM",
52
+ "mergeCEM": "wc-dev generateAPI.mergeCEM",
53
+ "validateCEM": "wc-dev generateAPI.validateCEM",
52
54
  "generateProd": "wc-dev generateProd",
53
55
  "bundle": "wc-dev build.bundle",
54
56
  "test": "wc-dev test",
@@ -64,7 +66,7 @@
64
66
  "@openui5/sap.ui.core": "1.120.17",
65
67
  "@sap-theming/theming-base-content": "11.33.0",
66
68
  "@ui5/cypress-internal": "0.1.0",
67
- "@ui5/webcomponents-tools": "2.20.0-rc.1",
69
+ "@ui5/webcomponents-tools": "2.20.0-rc.3",
68
70
  "clean-css": "^5.2.2",
69
71
  "cypress": "15.9.0",
70
72
  "mocha": "^11.7.2",
@@ -75,5 +77,5 @@
75
77
  "vite": "5.4.21"
76
78
  },
77
79
  "customElements": "dist/custom-elements.json",
78
- "gitHead": "26e4c88a89fdbd5f7545d05b04e75d7b5080ab17"
80
+ "gitHead": "d1767f2375f2b81e1187f9c58bb3b0eaf28b139e"
79
81
  }