@ui5/webcomponents-base 2.7.0-rc.1 → 2.7.0-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/dist/.tsbuildinfobuild +1 -1
- package/dist/FeaturesRegistry.d.ts +1 -16
- package/dist/FeaturesRegistry.js +1 -37
- package/dist/FeaturesRegistry.js.map +1 -1
- package/dist/UI5Element.js +0 -8
- package/dist/UI5Element.js.map +1 -1
- package/dist/UI5ElementMetadata.d.ts +0 -5
- package/dist/UI5ElementMetadata.js +0 -7
- package/dist/UI5ElementMetadata.js.map +1 -1
- package/dist/decorators/customElement.d.ts +1 -0
- package/dist/decorators/customElement.js +1 -4
- package/dist/decorators/customElement.js.map +1 -1
- package/dist/features/F6Navigation.d.ts +1 -0
- package/dist/features/F6Navigation.js +14 -1
- package/dist/features/F6Navigation.js.map +1 -1
- package/dist/generated/VersionInfo.js +3 -3
- package/dist/generated/VersionInfo.js.map +1 -1
- package/dist/prod/FeaturesRegistry.js +1 -1
- package/dist/prod/FeaturesRegistry.js.map +3 -3
- package/dist/prod/UI5Element.js +1 -1
- package/dist/prod/UI5Element.js.map +3 -3
- package/dist/prod/UI5ElementMetadata.js +1 -1
- package/dist/prod/UI5ElementMetadata.js.map +2 -2
- package/dist/prod/decorators/customElement.js +1 -1
- package/dist/prod/decorators/customElement.js.map +3 -3
- package/dist/prod/features/F6Navigation.js +1 -1
- package/dist/prod/features/F6Navigation.js.map +3 -3
- package/dist/prod/generated/VersionInfo.js +1 -1
- package/dist/prod/generated/VersionInfo.js.map +1 -1
- package/dist/prod/util/getFastNavigationGroups.js +1 -1
- package/dist/prod/util/getFastNavigationGroups.js.map +2 -2
- package/dist/util/getFastNavigationGroups.js +6 -1
- package/dist/util/getFastNavigationGroups.js.map +1 -1
- package/package.json +3 -3
|
@@ -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): string | number | boolean | null | undefined,\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 without the scope\n\t * @private\n\t */\n\tgetFeatures(): Array<string> {\n\t\treturn this.metadata.features || [];\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,\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,CAMA,
|
|
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): string | number | boolean | null | undefined,\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,\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,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": ["camelToKebabCase", "kebabToCamelCase", "getSlottedNodes", "getEffectiveScopingSuffixForTag", "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 m=(a={})=>e=>{if(Object.prototype.hasOwnProperty.call(e,"metadata")||(e.metadata={}),typeof a=="string"){e.metadata.tag=a;return}const{tag:
|
|
1
|
+
"use strict";const m=(a={})=>e=>{if(Object.prototype.hasOwnProperty.call(e,"metadata")||(e.metadata={}),typeof a=="string"){e.metadata.tag=a;return}const{tag:i,languageAware:o,themeAware:r,cldr:s,fastNavigation:l,formAssociated:n,shadowRootOptions:d}=a;e.metadata.tag=i,o&&(e.metadata.languageAware=o),s&&(e.metadata.cldr=s),r&&(e.metadata.themeAware=r),l&&(e.metadata.fastNavigation=l),n&&(e.metadata.formAssociated=n),d&&(e.metadata.shadowRootOptions=d),["renderer","template","styles","dependencies"].forEach(t=>{a[t]&&Object.defineProperty(e,t,{get:()=>a[t]})})};export default m;
|
|
2
2
|
//# sourceMappingURL=customElement.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/decorators/customElement.ts"],
|
|
4
|
-
"sourcesContent": ["import type UI5Element from \"../UI5Element.js\";\nimport type { Renderer } from \"../UI5Element.js\";\nimport type { TemplateFunction as Template } from \"../renderer/executeTemplate.js\";\nimport type { ComponentStylesData as Styles } from \"../types.js\";\n\n/**\n * Returns a custom element class decorator.\n *\n * @param { string | object } tagNameOrComponentSettings\n * @returns { ClassDecorator }\n */\nconst customElement = (tagNameOrComponentSettings: string | {\n\t/**\n\t * The tag name of the custom element (will be suffixed if the scoping feature is used).\n\t */\n\ttag?: string,\n\t/**\n\t * The renderer of the custom element - officially supported are: jsxRenderer and litRender (deprecated).\n\t */\n\trenderer?: Renderer,\n\t/**\n\t * The styles to be injected into the shadow root of the custom element.\n\t */\n\tstyles?: Styles,\n\t/**\n\t * The template function of the custom element - must match the renderer.\n\t */\n\ttemplate?: Template,\n\t/**\n\t * Other custom elements used in the shadow root of the custom element.\n\t * @deprecated no longer necessary for jsxRenderer-enabled components\n\t */\n\tdependencies?: Array<typeof UI5Element>,\n\t/**\n\t * Whether the custom element should be re-rendered when the language changes.\n\t */\n\tlanguageAware?: boolean,\n\t/**\n\t * Whether the custom element should be re-rendered when the theme changes.\n\t */\n\tthemeAware?: boolean,\n\t/**\n\t * Whether the custom element needs the CLDR assets.\n\t */\n\tcldr?: boolean,\n\t/**\n\t * Whether the custom element supports the F6 Fast navigation feature (is a fast-navigation group).\n\t */\n\tfastNavigation?: boolean,\n\t/**\n\t * Whether the custom element is form-associated and implements form-relevant features.\n\t */\n\tformAssociated?: boolean,\n\t/**\n\t * The shadow root options of the custom element.\n\t */\n\tshadowRootOptions?: Partial<ShadowRootInit>,\n\t/**\n\t * A list of all features, supported by the custom element.\n\t */\n\tfeatures?: Array<string>,\n} = {}): ClassDecorator => {\n\treturn (target: any) => {\n\t\tif (!Object.prototype.hasOwnProperty.call(target, \"metadata\")) {\n\t\t\ttarget.metadata = {};\n\t\t}\n\n\t\tif (typeof tagNameOrComponentSettings === \"string\") {\n\t\t\ttarget.metadata.tag = tagNameOrComponentSettings;\n\t\t\treturn;\n\t\t}\n\n\t\tconst {\n\t\t\ttag,\n\t\t\tlanguageAware,\n\t\t\tthemeAware,\n\t\t\tcldr,\n\t\t\tfastNavigation,\n\t\t\tformAssociated,\n\t\t\tshadowRootOptions,\n\t\t
|
|
5
|
-
"mappings": "aAWA,MAAMA,EAAgB,CAACC,
|
|
6
|
-
"names": ["customElement", "tagNameOrComponentSettings", "target", "tag", "languageAware", "themeAware", "cldr", "fastNavigation", "formAssociated", "shadowRootOptions", "
|
|
4
|
+
"sourcesContent": ["import type UI5Element from \"../UI5Element.js\";\nimport type { Renderer } from \"../UI5Element.js\";\nimport type { TemplateFunction as Template } from \"../renderer/executeTemplate.js\";\nimport type { ComponentStylesData as Styles } from \"../types.js\";\n\n/**\n * Returns a custom element class decorator.\n *\n * @param { string | object } tagNameOrComponentSettings\n * @returns { ClassDecorator }\n */\nconst customElement = (tagNameOrComponentSettings: string | {\n\t/**\n\t * The tag name of the custom element (will be suffixed if the scoping feature is used).\n\t */\n\ttag?: string,\n\t/**\n\t * The renderer of the custom element - officially supported are: jsxRenderer and litRender (deprecated).\n\t */\n\trenderer?: Renderer,\n\t/**\n\t * The styles to be injected into the shadow root of the custom element.\n\t */\n\tstyles?: Styles,\n\t/**\n\t * The template function of the custom element - must match the renderer.\n\t */\n\ttemplate?: Template,\n\t/**\n\t * Other custom elements used in the shadow root of the custom element.\n\t * @deprecated no longer necessary for jsxRenderer-enabled components\n\t */\n\tdependencies?: Array<typeof UI5Element>,\n\t/**\n\t * Whether the custom element should be re-rendered when the language changes.\n\t */\n\tlanguageAware?: boolean,\n\t/**\n\t * Whether the custom element should be re-rendered when the theme changes.\n\t */\n\tthemeAware?: boolean,\n\t/**\n\t * Whether the custom element needs the CLDR assets.\n\t */\n\tcldr?: boolean,\n\t/**\n\t * Whether the custom element supports the F6 Fast navigation feature (is a fast-navigation group).\n\t */\n\tfastNavigation?: boolean,\n\t/**\n\t * Whether the custom element is form-associated and implements form-relevant features.\n\t */\n\tformAssociated?: boolean,\n\t/**\n\t * The shadow root options of the custom element.\n\t */\n\tshadowRootOptions?: Partial<ShadowRootInit>,\n\t/**\n\t * A list of all features, supported by the custom element.\n\t * @deprecated no longer necessary for jsxRenderer-enabled components\n\t */\n\tfeatures?: Array<string>,\n} = {}): ClassDecorator => {\n\treturn (target: any) => {\n\t\tif (!Object.prototype.hasOwnProperty.call(target, \"metadata\")) {\n\t\t\ttarget.metadata = {};\n\t\t}\n\n\t\tif (typeof tagNameOrComponentSettings === \"string\") {\n\t\t\ttarget.metadata.tag = tagNameOrComponentSettings;\n\t\t\treturn;\n\t\t}\n\n\t\tconst {\n\t\t\ttag,\n\t\t\tlanguageAware,\n\t\t\tthemeAware,\n\t\t\tcldr,\n\t\t\tfastNavigation,\n\t\t\tformAssociated,\n\t\t\tshadowRootOptions,\n\t\t } = tagNameOrComponentSettings;\n\n\t\ttarget.metadata.tag = tag;\n\t\tif (languageAware) {\n\t\t\ttarget.metadata.languageAware = languageAware;\n\t\t}\n\t\tif (cldr) {\n\t\t\ttarget.metadata.cldr = cldr;\n\t\t}\n\n\t\tif (themeAware) {\n\t\t\ttarget.metadata.themeAware = themeAware;\n\t\t}\n\t\tif (fastNavigation) {\n\t\t\ttarget.metadata.fastNavigation = fastNavigation;\n\t\t}\n\t\tif (formAssociated) {\n\t\t\ttarget.metadata.formAssociated = formAssociated;\n\t\t}\n\n\t\tif (shadowRootOptions) {\n\t\t\ttarget.metadata.shadowRootOptions = shadowRootOptions;\n\t\t}\n\n\t\t[\"renderer\", \"template\", \"styles\", \"dependencies\"].forEach((customElementEntity: string) => {\n\t\t\tconst customElementEntityValue = tagNameOrComponentSettings[customElementEntity as keyof typeof tag];\n\n\t\t\tcustomElementEntityValue && Object.defineProperty(target, customElementEntity, {\n\t\t\t\tget: () => tagNameOrComponentSettings[customElementEntity as keyof typeof tag],\n\t\t\t});\n\t\t});\n\t};\n};\n\nexport default customElement;\n"],
|
|
5
|
+
"mappings": "aAWA,MAAMA,EAAgB,CAACC,EAmDnB,CAAC,IACIC,GAAgB,CAKvB,GAJK,OAAO,UAAU,eAAe,KAAKA,EAAQ,UAAU,IAC3DA,EAAO,SAAW,CAAC,GAGhB,OAAOD,GAA+B,SAAU,CACnDC,EAAO,SAAS,IAAMD,EACtB,MACD,CAEA,KAAM,CACL,IAAAE,EACA,cAAAC,EACA,WAAAC,EACA,KAAAC,EACA,eAAAC,EACA,eAAAC,EACA,kBAAAC,CACA,EAAIR,EAELC,EAAO,SAAS,IAAMC,EAClBC,IACHF,EAAO,SAAS,cAAgBE,GAE7BE,IACHJ,EAAO,SAAS,KAAOI,GAGpBD,IACHH,EAAO,SAAS,WAAaG,GAE1BE,IACHL,EAAO,SAAS,eAAiBK,GAE9BC,IACHN,EAAO,SAAS,eAAiBM,GAG9BC,IACHP,EAAO,SAAS,kBAAoBO,GAGrC,CAAC,WAAY,WAAY,SAAU,cAAc,EAAE,QAASC,GAAgC,CAC1DT,EAA2BS,CAAuC,GAEvE,OAAO,eAAeR,EAAQQ,EAAqB,CAC9E,IAAK,IAAMT,EAA2BS,CAAuC,CAC9E,CAAC,CACF,CAAC,CACF,EAGD,eAAeV",
|
|
6
|
+
"names": ["customElement", "tagNameOrComponentSettings", "target", "tag", "languageAware", "themeAware", "cldr", "fastNavigation", "formAssociated", "shadowRootOptions", "customElementEntity"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";import{registerFeature as
|
|
1
|
+
"use strict";import{registerFeature as l}from"../FeaturesRegistry.js";import{isF6Next as u,isF6Previous as m}from"../Keys.js";import{instanceOfUI5Element as d}from"../UI5Element.js";import{getFirstFocusableElement as p}from"../util/FocusableElements.js";import h from"../util/getFastNavigationGroups.js";import c from"../util/isElementClickable.js";import{getCurrentRuntimeIndex as f,compareRuntimes as g}from"../Runtimes.js";import E from"../getSharedResource.js";const a=f(),w=r=>r===void 0?!0:g(a,r)===1;class i{constructor(){this.selectedGroup=null;this.groups=[];this.keydownHandler=this._keydownHandler.bind(this),this.attachEventListeners()}attachEventListeners(){document.addEventListener("keydown",this.keydownHandler)}removeEventListeners(){document.removeEventListener("keydown",this.keydownHandler)}async groupElementToFocus(e){let t=e;if(d(e)&&(t=e.getDomRef()||e.firstElementChild),t){if(c(t))return t;const o=await p(t);if(o)return o}}async findNextFocusableGroupElement(e){let t;for(let o=0;o<this.groups.length;o++){let s;if(e>-1?e+1>=this.groups.length?(e=0,s=this.groups[e]):(e+=1,s=this.groups[e]):(e=0,s=this.groups[e]),t=await this.groupElementToFocus(s),t)break}return t}async findPreviousFocusableGroupElement(e){let t;for(let o=0;o<this.groups.length;o++){let s;if(e>0?(e=await this.groupElementToFocus(this.groups[e-1])===await this.groupElementToFocus(this.groups[e])?e-2:e-1,e<0&&(e=this.groups.length-1),s=this.groups[e]):(e=this.groups.length-1,s=this.groups[e]),t=await this.groupElementToFocus(s),t)break}return t}async _keydownHandler(e){const t=u(e),o=m(e);if(!(t||o)||(this.updateGroups(),this.groups.length<1))return;e.preventDefault();let s;if(this.groups.length===0)return s=await this.groupElementToFocus(this.groups[0]),s?.focus();let n=-1;this.selectedGroup&&(n=this.groups.indexOf(this.selectedGroup)),t&&(s=await this.findNextFocusableGroupElement(n)),o&&(s=await this.findPreviousFocusableGroupElement(n)),s?.focus()}updateGroups(){const e=this.findContainer();this.setSelectedGroup(),this.groups=h(e)}findContainer(){const e=window.document.querySelector("html");let t=this.deepActive(window.document);for(;t&&t!==e;){const o=t.closest("[data-sap-ui-fastnavgroup-container='true']");if(o)return o;t=t.parentElement?t.parentElement:t.parentNode.host}return document.body}setSelectedGroup(e=window.document){const t=window.document.querySelector("html");let o=this.deepActive(e);for(;o&&o.getAttribute("data-sap-ui-fastnavgroup")!=="true"&&o!==t;)o=o.parentElement?o.parentNode:o.parentNode.host;this.selectedGroup=o}deepActive(e){return e?.activeElement?.shadowRoot?.activeElement?this.deepActive(e.activeElement.shadowRoot):e.activeElement}destroy(){this.removeEventListeners()}get _ui5RuntimeIndex(){return a}static init(){const e=E("F6Registry",{});e.instance?w(e.instance?._ui5RuntimeIndex)&&(e.instance?.destroy(),e.instance=new i):e.instance=new i}}l("F6Navigation",i);export default i;
|
|
2
2
|
//# sourceMappingURL=F6Navigation.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/features/F6Navigation.ts"],
|
|
4
|
-
"sourcesContent": ["import { registerFeature } from \"../FeaturesRegistry.js\";\nimport { isF6Next, isF6Previous } from \"../Keys.js\";\nimport { instanceOfUI5Element } from \"../UI5Element.js\";\nimport { getFirstFocusableElement } from \"../util/FocusableElements.js\";\nimport getFastNavigationGroups from \"../util/getFastNavigationGroups.js\";\nimport isElementClickable from \"../util/isElementClickable.js\";\nimport { getCurrentRuntimeIndex, compareRuntimes } from \"../Runtimes.js\";\nimport getSharedResource from \"../getSharedResource.js\";\n\ntype F6Registry = {\n\tinstance?: F6Navigation,\n}\n\nconst currentRuntimeINdex = getCurrentRuntimeIndex();\n\nconst shouldUpdate = (runtimeIndex: number | undefined) => {\n\tif (runtimeIndex === undefined) {\n\t\treturn true;\n\t}\n\treturn compareRuntimes(currentRuntimeINdex, runtimeIndex) === 1; // 1 means the current is newer, 0 means the same, -1 means the resource's runtime is newer\n};\n\nclass F6Navigation {\n\tkeydownHandler: (event: KeyboardEvent) => void;\n\tselectedGroup: HTMLElement | null = null;\n\tgroups: Array<HTMLElement> = [];\n\n\tconstructor() {\n\t\tthis.keydownHandler = this._keydownHandler.bind(this) as (event: KeyboardEvent) => void;\n\t\tthis.attachEventListeners();\n\t}\n\n\tattachEventListeners() {\n\t\tdocument.addEventListener(\"keydown\", this.keydownHandler);\n\t}\n\n\tremoveEventListeners() {\n\t\tdocument.removeEventListener(\"keydown\", this.keydownHandler);\n\t}\n\n\tasync groupElementToFocus(nextElement: HTMLElement) {\n\t\tlet nextElementDomRef = nextElement;\n\n\t\tif (instanceOfUI5Element(nextElement)) {\n\t\t\tnextElementDomRef = nextElement.getDomRef() || nextElement.firstElementChild as HTMLElement;\n\t\t}\n\n\t\tif (nextElementDomRef) {\n\t\t\tif (isElementClickable(nextElementDomRef)) {\n\t\t\t\treturn nextElementDomRef;\n\t\t\t}\n\n\t\t\tconst elementToFocus = await getFirstFocusableElement(nextElementDomRef);\n\n\t\t\tif (elementToFocus) {\n\t\t\t\treturn elementToFocus;\n\t\t\t}\n\t\t}\n\t}\n\n\tasync findNextFocusableGroupElement(currentIndex: number) {\n\t\tlet elementToFocus;\n\n\t\t/* eslint-disable no-await-in-loop */\n\t\tfor (let index = 0; index < this.groups.length; index++) {\n\t\t\tlet nextElement;\n\n\t\t\tif (currentIndex > -1) {\n\t\t\t\tif (currentIndex + 1 >= this.groups.length) {\n\t\t\t\t\tcurrentIndex = 0;\n\t\t\t\t\tnextElement = this.groups[currentIndex];\n\t\t\t\t} else {\n\t\t\t\t\tcurrentIndex += 1;\n\t\t\t\t\tnextElement = this.groups[currentIndex];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tcurrentIndex = 0;\n\t\t\t\tnextElement = this.groups[currentIndex];\n\t\t\t}\n\n\t\t\telementToFocus = await this.groupElementToFocus(nextElement);\n\n\t\t\tif (elementToFocus) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t/* eslint-enable no-await-in-loop */\n\n\t\treturn elementToFocus;\n\t}\n\n\tasync findPreviousFocusableGroupElement(currentIndex: number) {\n\t\tlet elementToFocus;\n\n\t\t/* eslint-disable no-await-in-loop */\n\t\tfor (let index = 0; index < this.groups.length; index++) {\n\t\t\tlet nextElement;\n\n\t\t\tif (currentIndex > 0) {\n\t\t\t\t// Handle the situation where the first focusable element of two neighbor groups is the same\n\t\t\t\t// For example:\n\t\t\t\t// <ui5-flexible-column-layout>\n\t\t\t\t// <ui5-list>\n\t\t\t\t// <ui5-li>List Item</ui5-li>\n\t\t\t\t// </ui5-list>\n\t\t\t\t// </ui5-flexible-column-layout>\n\t\t\t\t// Here for both FCL & List the firstFoccusableElement is the same (the ui5-li)\n\t\t\t\tconst firstFocusable = await this.groupElementToFocus(this.groups[currentIndex - 1]);\n\t\t\t\tconst shouldSkipParent = firstFocusable === await this.groupElementToFocus(this.groups[currentIndex]);\n\n\t\t\t\tcurrentIndex = shouldSkipParent ? currentIndex - 2 : currentIndex - 1;\n\n\t\t\t\tif (currentIndex < 0) {\n\t\t\t\t\tcurrentIndex = this.groups.length - 1;\n\t\t\t\t}\n\n\t\t\t\tnextElement = this.groups[currentIndex];\n\t\t\t} else {\n\t\t\t\tcurrentIndex = this.groups.length - 1;\n\t\t\t\tnextElement = this.groups[currentIndex];\n\t\t\t}\n\n\t\t\telementToFocus = await this.groupElementToFocus(nextElement);\n\n\t\t\tif (elementToFocus) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t/* eslint-enable no-await-in-loop */\n\n\t\treturn elementToFocus;\n\t}\n\n\tasync _keydownHandler(event: KeyboardEvent) {\n\t\tconst forward = isF6Next(event);\n\t\tconst backward = isF6Previous(event);\n\t\tif (!(forward || backward)) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.updateGroups();\n\n\t\tif (this.groups.length < 1) {\n\t\t\treturn;\n\t\t}\n\n\t\tevent.preventDefault();\n\n\t\tlet elementToFocus;\n\n\t\tif (this.groups.length === 0) {\n\t\t\telementToFocus = await this.groupElementToFocus(this.groups[0]);\n\n\t\t\treturn elementToFocus?.focus();\n\t\t}\n\n\t\tlet currentIndex = -1;\n\n\t\tif (this.selectedGroup) {\n\t\t\tcurrentIndex = this.groups.indexOf(this.selectedGroup);\n\t\t}\n\n\t\tif (forward) {\n\t\t\telementToFocus = await this.findNextFocusableGroupElement(currentIndex);\n\t\t}\n\n\t\tif (backward) {\n\t\t\telementToFocus = await this.findPreviousFocusableGroupElement(currentIndex);\n\t\t}\n\n\t\telementToFocus?.focus();\n\t}\n\n\tupdateGroups() {\n\t\tthis.setSelectedGroup();\n\t\tthis.groups = getFastNavigationGroups(document.
|
|
5
|
-
"mappings": "aAAA,OAAS,mBAAAA,MAAuB,yBAChC,OAAS,YAAAC,EAAU,gBAAAC,MAAoB,aACvC,OAAS,wBAAAC,MAA4B,mBACrC,OAAS,4BAAAC,MAAgC,+BACzC,OAAOC,MAA6B,qCACpC,OAAOC,MAAwB,gCAC/B,OAAS,0BAAAC,EAAwB,mBAAAC,MAAuB,iBACxD,OAAOC,MAAuB,0BAM9B,MAAMC,EAAsBH,EAAuB,EAE7CI,EAAgBC,GACjBA,IAAiB,OACb,GAEDJ,EAAgBE,EAAqBE,CAAY,IAA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O,OAAS,GAGrCH,EAAc,KAAK,OAAOG,CAAY,IAEtCA,EAAe,KAAK,OAAO,OAAS,EACpCH,EAAc,KAAK,OAAOG,CAAY,GAGvCD,EAAiB,MAAM,KAAK,oBAAoBF,CAAW,EAEvDE,EACH,KAEF,CAGA,OAAOA,CACR,CAEA,MAAM,gBAAgBG,EAAsB,CAC3C,MAAMC,EAAUnB,EAASkB,CAAK,EACxBE,EAAWnB,EAAaiB,CAAK,EAOnC,GANI,EAAEC,GAAWC,KAIjB,KAAK,aAAa,EAEd,KAAK,OAAO,OAAS,GACxB,OAGDF,EAAM,eAAe,EAErB,IAAIH,EAEJ,GAAI,KAAK,OAAO,SAAW,EAC1B,OAAAA,EAAiB,MAAM,KAAK,oBAAoB,KAAK,OAAO,CAAC,CAAC,EAEvDA,GAAgB,MAAM,EAG9B,IAAIC,EAAe,GAEf,KAAK,gBACRA,EAAe,KAAK,OAAO,QAAQ,KAAK,aAAa,GAGlDG,IACHJ,EAAiB,MAAM,KAAK,8BAA8BC,CAAY,GAGnEI,IACHL,EAAiB,MAAM,KAAK,kCAAkCC,CAAY,GAG3ED,GAAgB,MAAM,CACvB,CAEA,cAAe,CACd,KAAK,iBAAiB,EACtB,KAAK,
|
|
6
|
-
"names": ["registerFeature", "isF6Next", "isF6Previous", "instanceOfUI5Element", "getFirstFocusableElement", "getFastNavigationGroups", "isElementClickable", "getCurrentRuntimeIndex", "compareRuntimes", "getSharedResource", "currentRuntimeINdex", "shouldUpdate", "runtimeIndex", "F6Navigation", "nextElement", "nextElementDomRef", "elementToFocus", "currentIndex", "index", "event", "forward", "backward", "
|
|
4
|
+
"sourcesContent": ["import { registerFeature } from \"../FeaturesRegistry.js\";\nimport { isF6Next, isF6Previous } from \"../Keys.js\";\nimport { instanceOfUI5Element } from \"../UI5Element.js\";\nimport { getFirstFocusableElement } from \"../util/FocusableElements.js\";\nimport getFastNavigationGroups from \"../util/getFastNavigationGroups.js\";\nimport isElementClickable from \"../util/isElementClickable.js\";\nimport { getCurrentRuntimeIndex, compareRuntimes } from \"../Runtimes.js\";\nimport getSharedResource from \"../getSharedResource.js\";\n\ntype F6Registry = {\n\tinstance?: F6Navigation,\n}\n\nconst currentRuntimeINdex = getCurrentRuntimeIndex();\n\nconst shouldUpdate = (runtimeIndex: number | undefined) => {\n\tif (runtimeIndex === undefined) {\n\t\treturn true;\n\t}\n\treturn compareRuntimes(currentRuntimeINdex, runtimeIndex) === 1; // 1 means the current is newer, 0 means the same, -1 means the resource's runtime is newer\n};\n\nclass F6Navigation {\n\tkeydownHandler: (event: KeyboardEvent) => void;\n\tselectedGroup: HTMLElement | null = null;\n\tgroups: Array<HTMLElement> = [];\n\n\tconstructor() {\n\t\tthis.keydownHandler = this._keydownHandler.bind(this) as (event: KeyboardEvent) => void;\n\t\tthis.attachEventListeners();\n\t}\n\n\tattachEventListeners() {\n\t\tdocument.addEventListener(\"keydown\", this.keydownHandler);\n\t}\n\n\tremoveEventListeners() {\n\t\tdocument.removeEventListener(\"keydown\", this.keydownHandler);\n\t}\n\n\tasync groupElementToFocus(nextElement: HTMLElement) {\n\t\tlet nextElementDomRef = nextElement;\n\n\t\tif (instanceOfUI5Element(nextElement)) {\n\t\t\tnextElementDomRef = nextElement.getDomRef() || nextElement.firstElementChild as HTMLElement;\n\t\t}\n\n\t\tif (nextElementDomRef) {\n\t\t\tif (isElementClickable(nextElementDomRef)) {\n\t\t\t\treturn nextElementDomRef;\n\t\t\t}\n\n\t\t\tconst elementToFocus = await getFirstFocusableElement(nextElementDomRef);\n\n\t\t\tif (elementToFocus) {\n\t\t\t\treturn elementToFocus;\n\t\t\t}\n\t\t}\n\t}\n\n\tasync findNextFocusableGroupElement(currentIndex: number) {\n\t\tlet elementToFocus;\n\n\t\t/* eslint-disable no-await-in-loop */\n\t\tfor (let index = 0; index < this.groups.length; index++) {\n\t\t\tlet nextElement;\n\n\t\t\tif (currentIndex > -1) {\n\t\t\t\tif (currentIndex + 1 >= this.groups.length) {\n\t\t\t\t\tcurrentIndex = 0;\n\t\t\t\t\tnextElement = this.groups[currentIndex];\n\t\t\t\t} else {\n\t\t\t\t\tcurrentIndex += 1;\n\t\t\t\t\tnextElement = this.groups[currentIndex];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tcurrentIndex = 0;\n\t\t\t\tnextElement = this.groups[currentIndex];\n\t\t\t}\n\n\t\t\telementToFocus = await this.groupElementToFocus(nextElement);\n\n\t\t\tif (elementToFocus) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t/* eslint-enable no-await-in-loop */\n\n\t\treturn elementToFocus;\n\t}\n\n\tasync findPreviousFocusableGroupElement(currentIndex: number) {\n\t\tlet elementToFocus;\n\n\t\t/* eslint-disable no-await-in-loop */\n\t\tfor (let index = 0; index < this.groups.length; index++) {\n\t\t\tlet nextElement;\n\n\t\t\tif (currentIndex > 0) {\n\t\t\t\t// Handle the situation where the first focusable element of two neighbor groups is the same\n\t\t\t\t// For example:\n\t\t\t\t// <ui5-flexible-column-layout>\n\t\t\t\t// <ui5-list>\n\t\t\t\t// <ui5-li>List Item</ui5-li>\n\t\t\t\t// </ui5-list>\n\t\t\t\t// </ui5-flexible-column-layout>\n\t\t\t\t// Here for both FCL & List the firstFoccusableElement is the same (the ui5-li)\n\t\t\t\tconst firstFocusable = await this.groupElementToFocus(this.groups[currentIndex - 1]);\n\t\t\t\tconst shouldSkipParent = firstFocusable === await this.groupElementToFocus(this.groups[currentIndex]);\n\n\t\t\t\tcurrentIndex = shouldSkipParent ? currentIndex - 2 : currentIndex - 1;\n\n\t\t\t\tif (currentIndex < 0) {\n\t\t\t\t\tcurrentIndex = this.groups.length - 1;\n\t\t\t\t}\n\n\t\t\t\tnextElement = this.groups[currentIndex];\n\t\t\t} else {\n\t\t\t\tcurrentIndex = this.groups.length - 1;\n\t\t\t\tnextElement = this.groups[currentIndex];\n\t\t\t}\n\n\t\t\telementToFocus = await this.groupElementToFocus(nextElement);\n\n\t\t\tif (elementToFocus) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t/* eslint-enable no-await-in-loop */\n\n\t\treturn elementToFocus;\n\t}\n\n\tasync _keydownHandler(event: KeyboardEvent) {\n\t\tconst forward = isF6Next(event);\n\t\tconst backward = isF6Previous(event);\n\t\tif (!(forward || backward)) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.updateGroups();\n\n\t\tif (this.groups.length < 1) {\n\t\t\treturn;\n\t\t}\n\n\t\tevent.preventDefault();\n\n\t\tlet elementToFocus;\n\n\t\tif (this.groups.length === 0) {\n\t\t\telementToFocus = await this.groupElementToFocus(this.groups[0]);\n\n\t\t\treturn elementToFocus?.focus();\n\t\t}\n\n\t\tlet currentIndex = -1;\n\n\t\tif (this.selectedGroup) {\n\t\t\tcurrentIndex = this.groups.indexOf(this.selectedGroup);\n\t\t}\n\n\t\tif (forward) {\n\t\t\telementToFocus = await this.findNextFocusableGroupElement(currentIndex);\n\t\t}\n\n\t\tif (backward) {\n\t\t\telementToFocus = await this.findPreviousFocusableGroupElement(currentIndex);\n\t\t}\n\n\t\telementToFocus?.focus();\n\t}\n\n\tupdateGroups() {\n\t\tconst container = this.findContainer();\n\n\t\tthis.setSelectedGroup();\n\t\tthis.groups = getFastNavigationGroups(container);\n\t}\n\n\tfindContainer() {\n\t\tconst htmlElement = window.document.querySelector(\"html\");\n\t\tlet element = this.deepActive(window.document);\n\n\t\twhile (element && element !== htmlElement) {\n\t\t\tconst closestScopeEl = element.closest<HTMLElement>(\"[data-sap-ui-fastnavgroup-container='true']\");\n\n\t\t\tif (closestScopeEl) {\n\t\t\t\treturn closestScopeEl;\n\t\t\t}\n\n\t\t\telement = element.parentElement ? element.parentElement : (element.parentNode as ShadowRoot).host;\n\t\t}\n\n\t\treturn document.body;\n\t}\n\n\tsetSelectedGroup(root: DocumentOrShadowRoot = window.document) {\n\t\tconst htmlElement = window.document.querySelector(\"html\");\n\t\tlet element: Element | null | ParentNode = this.deepActive(root);\n\n\t\twhile (element && (element as Element).getAttribute(\"data-sap-ui-fastnavgroup\") !== \"true\" && element !== htmlElement) {\n\t\t\telement = element.parentElement ? element.parentNode : (element.parentNode as ShadowRoot).host;\n\t\t}\n\n\t\tthis.selectedGroup = element as HTMLElement;\n\t}\n\n\tdeepActive(root: DocumentOrShadowRoot): Element | null {\n\t\tif (root?.activeElement?.shadowRoot?.activeElement) {\n\t\t\treturn this.deepActive(root.activeElement.shadowRoot);\n\t\t}\n\n\t\treturn root.activeElement;\n\t}\n\n\tdestroy() {\n\t\tthis.removeEventListeners();\n\t}\n\n\tget _ui5RuntimeIndex() {\n\t\treturn currentRuntimeINdex;\n\t}\n\n\tstatic init() {\n\t\tconst f6Registry = getSharedResource<F6Registry>(\"F6Registry\", {});\n\n\t\tif (!f6Registry.instance) {\n\t\t\tf6Registry.instance = new F6Navigation();\n\t\t} else if (shouldUpdate(f6Registry.instance?._ui5RuntimeIndex)) {\n\t\t\tf6Registry.instance?.destroy();\n\t\t\tf6Registry.instance = new F6Navigation();\n\t\t}\n\t}\n}\n\nregisterFeature(\"F6Navigation\", F6Navigation);\n\nexport default F6Navigation;\n"],
|
|
5
|
+
"mappings": "aAAA,OAAS,mBAAAA,MAAuB,yBAChC,OAAS,YAAAC,EAAU,gBAAAC,MAAoB,aACvC,OAAS,wBAAAC,MAA4B,mBACrC,OAAS,4BAAAC,MAAgC,+BACzC,OAAOC,MAA6B,qCACpC,OAAOC,MAAwB,gCAC/B,OAAS,0BAAAC,EAAwB,mBAAAC,MAAuB,iBACxD,OAAOC,MAAuB,0BAM9B,MAAMC,EAAsBH,EAAuB,EAE7CI,EAAgBC,GACjBA,IAAiB,OACb,GAEDJ,EAAgBE,EAAqBE,CAAY,IAAM,EAG/D,MAAMC,CAAa,CAKlB,aAAc,CAHd,mBAAoC,KACpC,YAA6B,CAAC,EAG7B,KAAK,eAAiB,KAAK,gBAAgB,KAAK,IAAI,EACpD,KAAK,qBAAqB,CAC3B,CAEA,sBAAuB,CACtB,SAAS,iBAAiB,UAAW,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,GAAM,eAAe,YAAY,cAC7B,KAAK,WAAWA,EAAK,cAAc,UAAU,EAG9CA,EAAK,aACb,CAEA,SAAU,CACT,KAAK,qBAAqB,CAC3B,CAEA,IAAI,kBAAmB,CACtB,OAAOhB,CACR,CAEA,OAAO,MAAO,CACb,MAAMiB,EAAalB,EAA8B,aAAc,CAAC,CAAC,EAE5DkB,EAAW,SAELhB,EAAagB,EAAW,UAAU,gBAAgB,IAC5DA,EAAW,UAAU,QAAQ,EAC7BA,EAAW,SAAW,IAAId,GAH1Bc,EAAW,SAAW,IAAId,CAK5B,CACD,CAEAb,EAAgB,eAAgBa,CAAY,EAE5C,eAAeA",
|
|
6
|
+
"names": ["registerFeature", "isF6Next", "isF6Previous", "instanceOfUI5Element", "getFirstFocusableElement", "getFastNavigationGroups", "isElementClickable", "getCurrentRuntimeIndex", "compareRuntimes", "getSharedResource", "currentRuntimeINdex", "shouldUpdate", "runtimeIndex", "F6Navigation", "nextElement", "nextElementDomRef", "elementToFocus", "currentIndex", "index", "event", "forward", "backward", "container", "htmlElement", "element", "closestScopeEl", "root", "f6Registry"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const e={version:"2.7.0-rc.
|
|
1
|
+
"use strict";const e={version:"2.7.0-rc.2",major:2,minor:7,patch:0,suffix:"-rc.2",isNext:!1,buildTime:1738224493};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.7.0-rc.
|
|
4
|
+
"sourcesContent": ["const VersionInfo = {\n\tversion: \"2.7.0-rc.2\",\n\tmajor: 2,\n\tminor: 7,\n\tpatch: 0,\n\tsuffix: \"-rc.2\",\n\tisNext: false,\n\tbuildTime: 1738224493,\n};\nexport default VersionInfo;"],
|
|
5
5
|
"mappings": "aAAA,MAAMA,EAAc,CACnB,QAAS,aACT,MAAO,EACP,MAAO,EACP,MAAO,EACP,OAAQ,QACR,OAAQ,GACR,UAAW,UACZ,EACA,eAAeA",
|
|
6
6
|
"names": ["VersionInfo"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";let i=[];const a=e=>e.getAttribute("data-sap-ui-fastnavgroup")==="true",u=e=>{const
|
|
1
|
+
"use strict";let i=[];const a=e=>e.getAttribute("data-sap-ui-fastnavgroup")==="true",u=e=>{const l=window.getComputedStyle(e);return l.width!=="0px"&&l.height!=="0px"&&l.opacity!=="0"&&l.display!=="none"&&l.visibility!=="hidden"},d=(e,l)=>{let t,s,n=0;if(u(e))for(a(e)&&i.push(e),e.shadowRoot?t=e.shadowRoot.firstChild:e instanceof HTMLSlotElement&&e.assignedNodes()?(s=e.assignedNodes(),t=s[0]):l?t=e:t=e.firstElementChild;t;){const o=t;if(!t)return;t.nodeType===1&&d(t,!1),t===e?t=s&&s.length?s[++n]:null:t=s&&s.length?s[++n]:o.nextElementSibling}},f=e=>(i=[],d(e,!0),i);export default f;
|
|
2
2
|
//# sourceMappingURL=getFastNavigationGroups.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/util/getFastNavigationGroups.ts"],
|
|
4
|
-
"sourcesContent": ["let groups: Array<HTMLElement> = [];\n\nconst isFastNavGroupElemenet = (el: HTMLElement) => {\n\treturn el.getAttribute(\"data-sap-ui-fastnavgroup\") === \"true\";\n};\n\nconst isElementVisible = (el: HTMLElement) => {\n\tconst style = window.getComputedStyle(el);\n\n\treturn style.width !== \"0px\"\n\t\t&& style.height !== \"0px\"\n\t\t&& style.opacity !== \"0\"\n\t\t&& style.display !== \"none\"\n\t\t&& style.visibility !== \"hidden\";\n};\n\nconst findFastNavigationGroups = (container: HTMLElement, startFromContainer?: boolean) => {\n\tlet child,\n\t\tassignedElements,\n\t\tindex = 0;\n\n\tif (!isElementVisible(container)) {\n\t\treturn;\n\t}\n\n\tif (isFastNavGroupElemenet(container)) {\n\t\tgroups.push(container);\n\t}\n\n\tif (container.shadowRoot) {\n\t\tchild = container.shadowRoot.firstChild;\n\t} else if (container instanceof HTMLSlotElement && container.assignedNodes()) {\n\t\tassignedElements = container.assignedNodes();\n\t\tchild = assignedElements[0];\n\t} else if (startFromContainer) {\n\t\tchild = container;\n\t} else {\n\t\tchild = container.firstElementChild;\n\t}\n\n\twhile (child) {\n\t\tconst originalChild: HTMLElement = child as HTMLElement;\n\t\tif (!child) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (child.nodeType === 1) {\n\t\t\tfindFastNavigationGroups(child as HTMLElement, false);\n\t\t}\n\n\t\tchild = assignedElements && assignedElements.length ? assignedElements[++index] : originalChild.nextElementSibling;\n\t}\n};\n\nconst getFastNavigationGroups = (container: HTMLElement) => {\n\tgroups = [];\n\n\tfindFastNavigationGroups(container, true);\n\n\treturn groups;\n};\n\nexport default getFastNavigationGroups;\n"],
|
|
5
|
-
"mappings": "aAAA,IAAIA,EAA6B,CAAC,EAElC,MAAMC,EAA0BC,GACxBA,EAAG,aAAa,0BAA0B,IAAM,OAGlDC,EAAoBD,GAAoB,CAC7C,MAAME,EAAQ,OAAO,iBAAiBF,CAAE,EAExC,OAAOE,EAAM,QAAU,OACnBA,EAAM,SAAW,OACjBA,EAAM,UAAY,KAClBA,EAAM,UAAY,QAClBA,EAAM,aAAe,QAC1B,EAEMC,EAA2B,CAACC,EAAwBC,IAAiC,CAC1F,IAAIC,EACHC,EACAC,EAAQ,EAET,GAAKP,EAAiBG,CAAS,EAmB/B,IAfIL,EAAuBK,CAAS,GACnCN,EAAO,KAAKM,CAAS,EAGlBA,EAAU,WACbE,EAAQF,EAAU,WAAW,WACnBA,aAAqB,iBAAmBA,EAAU,cAAc,GAC1EG,EAAmBH,EAAU,cAAc,EAC3CE,EAAQC,EAAiB,CAAC,GAChBF,EACVC,EAAQF,EAERE,EAAQF,EAAU,kBAGZE,GAAO,CACb,MAAMG,EAA6BH,EACnC,GAAI,CAACA,EACJ,OAGGA,EAAM,WAAa,GACtBH,EAAyBG,EAAsB,EAAK,
|
|
4
|
+
"sourcesContent": ["let groups: Array<HTMLElement> = [];\n\nconst isFastNavGroupElemenet = (el: HTMLElement) => {\n\treturn el.getAttribute(\"data-sap-ui-fastnavgroup\") === \"true\";\n};\n\nconst isElementVisible = (el: HTMLElement) => {\n\tconst style = window.getComputedStyle(el);\n\n\treturn style.width !== \"0px\"\n\t\t&& style.height !== \"0px\"\n\t\t&& style.opacity !== \"0\"\n\t\t&& style.display !== \"none\"\n\t\t&& style.visibility !== \"hidden\";\n};\n\nconst findFastNavigationGroups = (container: HTMLElement, startFromContainer?: boolean) => {\n\tlet child,\n\t\tassignedElements,\n\t\tindex = 0;\n\n\tif (!isElementVisible(container)) {\n\t\treturn;\n\t}\n\n\tif (isFastNavGroupElemenet(container)) {\n\t\tgroups.push(container);\n\t}\n\n\tif (container.shadowRoot) {\n\t\tchild = container.shadowRoot.firstChild;\n\t} else if (container instanceof HTMLSlotElement && container.assignedNodes()) {\n\t\tassignedElements = container.assignedNodes();\n\t\tchild = assignedElements[0];\n\t} else if (startFromContainer) {\n\t\tchild = container;\n\t} else {\n\t\tchild = container.firstElementChild;\n\t}\n\n\twhile (child) {\n\t\tconst originalChild: HTMLElement = child as HTMLElement;\n\t\tif (!child) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (child.nodeType === 1) {\n\t\t\tfindFastNavigationGroups(child as HTMLElement, false);\n\t\t}\n\n\t\tif (child === container) {\n\t\t\tchild = assignedElements && assignedElements.length ? assignedElements[++index] : null;\n\t\t} else {\n\t\t\tchild = assignedElements && assignedElements.length ? assignedElements[++index] : originalChild.nextElementSibling;\n\t\t}\n\t}\n};\n\nconst getFastNavigationGroups = (container: HTMLElement) => {\n\tgroups = [];\n\n\tfindFastNavigationGroups(container, true);\n\n\treturn groups;\n};\n\nexport default getFastNavigationGroups;\n"],
|
|
5
|
+
"mappings": "aAAA,IAAIA,EAA6B,CAAC,EAElC,MAAMC,EAA0BC,GACxBA,EAAG,aAAa,0BAA0B,IAAM,OAGlDC,EAAoBD,GAAoB,CAC7C,MAAME,EAAQ,OAAO,iBAAiBF,CAAE,EAExC,OAAOE,EAAM,QAAU,OACnBA,EAAM,SAAW,OACjBA,EAAM,UAAY,KAClBA,EAAM,UAAY,QAClBA,EAAM,aAAe,QAC1B,EAEMC,EAA2B,CAACC,EAAwBC,IAAiC,CAC1F,IAAIC,EACHC,EACAC,EAAQ,EAET,GAAKP,EAAiBG,CAAS,EAmB/B,IAfIL,EAAuBK,CAAS,GACnCN,EAAO,KAAKM,CAAS,EAGlBA,EAAU,WACbE,EAAQF,EAAU,WAAW,WACnBA,aAAqB,iBAAmBA,EAAU,cAAc,GAC1EG,EAAmBH,EAAU,cAAc,EAC3CE,EAAQC,EAAiB,CAAC,GAChBF,EACVC,EAAQF,EAERE,EAAQF,EAAU,kBAGZE,GAAO,CACb,MAAMG,EAA6BH,EACnC,GAAI,CAACA,EACJ,OAGGA,EAAM,WAAa,GACtBH,EAAyBG,EAAsB,EAAK,EAGjDA,IAAUF,EACbE,EAAQC,GAAoBA,EAAiB,OAASA,EAAiB,EAAEC,CAAK,EAAI,KAElFF,EAAQC,GAAoBA,EAAiB,OAASA,EAAiB,EAAEC,CAAK,EAAIC,EAAc,kBAElG,CACD,EAEMC,EAA2BN,IAChCN,EAAS,CAAC,EAEVK,EAAyBC,EAAW,EAAI,EAEjCN,GAGR,eAAeY",
|
|
6
6
|
"names": ["groups", "isFastNavGroupElemenet", "el", "isElementVisible", "style", "findFastNavigationGroups", "container", "startFromContainer", "child", "assignedElements", "index", "originalChild", "getFastNavigationGroups"]
|
|
7
7
|
}
|
|
@@ -39,7 +39,12 @@ const findFastNavigationGroups = (container, startFromContainer) => {
|
|
|
39
39
|
if (child.nodeType === 1) {
|
|
40
40
|
findFastNavigationGroups(child, false);
|
|
41
41
|
}
|
|
42
|
-
child
|
|
42
|
+
if (child === container) {
|
|
43
|
+
child = assignedElements && assignedElements.length ? assignedElements[++index] : null;
|
|
44
|
+
}
|
|
45
|
+
else {
|
|
46
|
+
child = assignedElements && assignedElements.length ? assignedElements[++index] : originalChild.nextElementSibling;
|
|
47
|
+
}
|
|
43
48
|
}
|
|
44
49
|
};
|
|
45
50
|
const getFastNavigationGroups = (container) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getFastNavigationGroups.js","sourceRoot":"","sources":["../../src/util/getFastNavigationGroups.ts"],"names":[],"mappings":"AAAA,IAAI,MAAM,GAAuB,EAAE,CAAC;AAEpC,MAAM,sBAAsB,GAAG,CAAC,EAAe,EAAE,EAAE;IAClD,OAAO,EAAE,CAAC,YAAY,CAAC,0BAA0B,CAAC,KAAK,MAAM,CAAC;AAC/D,CAAC,CAAC;AAEF,MAAM,gBAAgB,GAAG,CAAC,EAAe,EAAE,EAAE;IAC5C,MAAM,KAAK,GAAG,MAAM,CAAC,gBAAgB,CAAC,EAAE,CAAC,CAAC;IAE1C,OAAO,KAAK,CAAC,KAAK,KAAK,KAAK;WACxB,KAAK,CAAC,MAAM,KAAK,KAAK;WACtB,KAAK,CAAC,OAAO,KAAK,GAAG;WACrB,KAAK,CAAC,OAAO,KAAK,MAAM;WACxB,KAAK,CAAC,UAAU,KAAK,QAAQ,CAAC;AACnC,CAAC,CAAC;AAEF,MAAM,wBAAwB,GAAG,CAAC,SAAsB,EAAE,kBAA4B,EAAE,EAAE;IACzF,IAAI,KAAK,EACR,gBAAgB,EAChB,KAAK,GAAG,CAAC,CAAC;IAEX,IAAI,CAAC,gBAAgB,CAAC,SAAS,CAAC,EAAE,CAAC;QAClC,OAAO;IACR,CAAC;IAED,IAAI,sBAAsB,CAAC,SAAS,CAAC,EAAE,CAAC;QACvC,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IACxB,CAAC;IAED,I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E,CAAC;YACzB,KAAK,GAAG,gBAAgB,IAAI,gBAAgB,CAAC,MAAM,CAAC,CAAC,CAAC,gBAAgB,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;QACxF,CAAC;aAAM,CAAC;YACP,KAAK,GAAG,gBAAgB,IAAI,gBAAgB,CAAC,MAAM,CAAC,CAAC,CAAC,gBAAgB,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,kBAAkB,CAAC;QACpH,CAAC;IACF,CAAC;AACF,CAAC,CAAC;AAEF,MAAM,uBAAuB,GAAG,CAAC,SAAsB,EAAE,EAAE;IAC1D,MAAM,GAAG,EAAE,CAAC;IAEZ,wBAAwB,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;IAE1C,OAAO,MAAM,CAAC;AACf,CAAC,CAAC;AAEF,eAAe,uBAAuB,CAAC","sourcesContent":["let groups: Array<HTMLElement> = [];\n\nconst isFastNavGroupElemenet = (el: HTMLElement) => {\n\treturn el.getAttribute(\"data-sap-ui-fastnavgroup\") === \"true\";\n};\n\nconst isElementVisible = (el: HTMLElement) => {\n\tconst style = window.getComputedStyle(el);\n\n\treturn style.width !== \"0px\"\n\t\t&& style.height !== \"0px\"\n\t\t&& style.opacity !== \"0\"\n\t\t&& style.display !== \"none\"\n\t\t&& style.visibility !== \"hidden\";\n};\n\nconst findFastNavigationGroups = (container: HTMLElement, startFromContainer?: boolean) => {\n\tlet child,\n\t\tassignedElements,\n\t\tindex = 0;\n\n\tif (!isElementVisible(container)) {\n\t\treturn;\n\t}\n\n\tif (isFastNavGroupElemenet(container)) {\n\t\tgroups.push(container);\n\t}\n\n\tif (container.shadowRoot) {\n\t\tchild = container.shadowRoot.firstChild;\n\t} else if (container instanceof HTMLSlotElement && container.assignedNodes()) {\n\t\tassignedElements = container.assignedNodes();\n\t\tchild = assignedElements[0];\n\t} else if (startFromContainer) {\n\t\tchild = container;\n\t} else {\n\t\tchild = container.firstElementChild;\n\t}\n\n\twhile (child) {\n\t\tconst originalChild: HTMLElement = child as HTMLElement;\n\t\tif (!child) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (child.nodeType === 1) {\n\t\t\tfindFastNavigationGroups(child as HTMLElement, false);\n\t\t}\n\n\t\tif (child === container) {\n\t\t\tchild = assignedElements && assignedElements.length ? assignedElements[++index] : null;\n\t\t} else {\n\t\t\tchild = assignedElements && assignedElements.length ? assignedElements[++index] : originalChild.nextElementSibling;\n\t\t}\n\t}\n};\n\nconst getFastNavigationGroups = (container: HTMLElement) => {\n\tgroups = [];\n\n\tfindFastNavigationGroups(container, true);\n\n\treturn groups;\n};\n\nexport default getFastNavigationGroups;\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ui5/webcomponents-base",
|
|
3
|
-
"version": "2.7.0-rc.
|
|
3
|
+
"version": "2.7.0-rc.2",
|
|
4
4
|
"description": "UI5 Web Components: webcomponents.base",
|
|
5
5
|
"author": "SAP SE (https://www.sap.com)",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
59
|
"@openui5/sap.ui.core": "1.120.17",
|
|
60
|
-
"@ui5/webcomponents-tools": "2.7.0-rc.
|
|
60
|
+
"@ui5/webcomponents-tools": "2.7.0-rc.2",
|
|
61
61
|
"chromedriver": "^131.0.0",
|
|
62
62
|
"clean-css": "^5.2.2",
|
|
63
63
|
"copy-and-watch": "^0.1.5",
|
|
@@ -68,5 +68,5 @@
|
|
|
68
68
|
"resolve": "^1.20.0",
|
|
69
69
|
"touch": "^3.1.0"
|
|
70
70
|
},
|
|
71
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "26546e81e1e1e3c9186a9540b979ec7032a8cf95"
|
|
72
72
|
}
|